Skip to content

Commit a7a3550

Browse files
committed
chore(*): update branch from master'
2 parents 738ef72 + cc4e2ef commit a7a3550

88 files changed

Lines changed: 8617 additions & 1444 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.storybook/preview.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ export const parameters = {
8888
"Blocks",
8989
"Templates",
9090
["Introduction"],
91+
"Layouts",
92+
[
93+
"Introduction",
94+
"Full Width",
95+
["Default", "Breadcrumb", "Split", "Aside Left", "Aside Right", "Aside Both"],
96+
"With Sidebar",
97+
["Default", "Split", "Aside Left", "Aside Right"]
98+
],
9199
"Troubleshoot"
92100
]
93101
}

cypress/apps/next-app/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,44 @@
11
'use client';
22

3+
import { SgdsAccordion, SgdsAccordionItem } from '@govtechsg/sgds-web-component/react';
4+
35
export const Accordion = () => {
46
return (
57
<>
6-
<sgds-accordion suppressHydrationWarning>
7-
<sgds-accordion-item suppressHydrationWarning>
8+
<SgdsAccordion density="spacious">
9+
<SgdsAccordionItem>
810
<div className="m-0" slot="header">This is a solo accordion</div>
911
<span slot="content">
1012
Lorem ipsum dolor sit amet consectetur adipisicing elit. Maiores soluta eaque fugit fuga distinctio? Eum.
1113
</span>
12-
</sgds-accordion-item>
13-
</sgds-accordion>
14-
<sgds-accordion suppressHydrationWarning>
15-
<sgds-accordion-item suppressHydrationWarning>
14+
</SgdsAccordionItem>
15+
</SgdsAccordion>
16+
<SgdsAccordion>
17+
<SgdsAccordionItem>
1618
<div className="m-0" slot="header">This is an accordion</div>
1719
<span slot="content">
1820
Lorem ipsum dolor sit amet consectetur adipisicing elit. Maiores soluta eaque fugit fuga distinctio? Eum.
1921
</span>
20-
</sgds-accordion-item>
21-
<sgds-accordion-item suppressHydrationWarning>
22+
</SgdsAccordionItem>
23+
<SgdsAccordionItem>
2224
<div className="m-0" slot="header">Accordion 1</div>
2325
<span slot="content">
2426
Lorem ipsum dolor sit amet consectetur adipisicing elit. Maiores soluta eaque fugit fuga distinctio? Eum.
2527
</span>
26-
</sgds-accordion-item>
27-
<sgds-accordion-item open suppressHydrationWarning>
28+
</SgdsAccordionItem>
29+
<SgdsAccordionItem open>
2830
<div className="m-0" slot="header">Accordion 2</div>
2931
<span slot="content">
3032
Lorem ipsum dolor sit amet consectetur adipisicing elit. Maiores soluta eaque fugit fuga distinctio? Eum.
3133
</span>
32-
</sgds-accordion-item>
33-
<sgds-accordion-item suppressHydrationWarning>
34+
</SgdsAccordionItem>
35+
<SgdsAccordionItem>
3436
<div className="m-0" slot="header">Accordion 3</div>
3537
<span slot="content">
3638
Lorem ipsum dolor sit amet consectetur adipisicing elit. Maiores soluta eaque fugit fuga distinctio? Eum.
3739
</span>
38-
</sgds-accordion-item>
39-
</sgds-accordion>
40+
</SgdsAccordionItem>
41+
</SgdsAccordion>
4042
</>
4143
);
4244
};

cypress/apps/next-app/src/app/components/Alert.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
export const Alert = () => {
44
return (
55
<>
6-
<sgds-alert variant="primary" show suppressHydrationWarning>
6+
<sgds-alert variant="neutral" show suppressHydrationWarning>
77
<span slot="icon">
88
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" className="bi bi-exclamation-circle" viewBox="0 0 16 16">
99
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"></path>

cypress/apps/next-app/src/app/components/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
export const Card = () => {
44
return (
5-
<sgds-thumbnail-card stretchedlink="" orientation="vertical" suppressHydrationWarning>
5+
<sgds-thumbnail-card stretchedLink orientation="vertical" suppressHydrationWarning>
66
<span slot="subtitle">EXPLORE THE FEATURES</span>
77
<span slot="title">Innovative Solutions for You</span>
88
<span slot="description">
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
11
declare module "@webcomponents/scoped-custom-element-registry";
2-
3-
declare module "react" {
4-
namespace JSX {
5-
interface IntrinsicElements {
6-
[key: `sgds-${string}`]: { [key: string]: any };
7-
}
8-
}
9-
}

cypress/apps/next-app/types.d.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
declare module "@webcomponents/scoped-custom-element-registry";
2+
import "@govtechsg/sgds-web-component/types/react";
23

34
import "react";
4-
5-
declare module "react" {
6-
namespace JSX {
7-
interface IntrinsicElements {
8-
[key: `sgds-${string}`]: any;
9-
}
10-
}
11-
}

docs/INSTALLATION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ This method registers all SGDS elements up front in the Custom Elements Registry
5757
<link href='https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component@3.18.1/css/sgds.css' rel='stylesheet' type='text/css' />
5858

5959
// it is recommended to load a particular version when using cdn e.g. https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component@1.0.2
60-
<script src="https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component@3.18.1" async crossorigin="anonymous" integrity="sha384-xZvACocZK19Q7376mEWGi8gUu3n1G9nEP71U33AIeW7QCwypwm713C0KwWNayxKj"></script>
60+
<script src="https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component@3.18.1" async crossorigin="anonymous" integrity="sha384-ewDyP7iuhEi/APW3O4ZFey3S0vb27mI5WsOsGi909tRPhaiVbPrjhr1be+HllmaM"></script>
6161

6262
//or load a single component e.g. Masthead
63-
<script src="https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component@3.18.1/components/Masthead/index.umd.min.js" async crossorigin="anonymous" integrity="sha384-Q6FLIOexz0nU1QlEkBydWY+wgRVck2LGBUYyzvlNBhib5juEnbFSZzxcmFc0uhWk"></script>
63+
<script src="https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component@3.18.1/components/Masthead/index.umd.min.js" async crossorigin="anonymous" integrity="sha384-5OKa7RaQpYeIsx/ZOXW2ttNUa7ftAEKXiWuSgFRmlXJUaJ1Bvf3etjlCw2qqjia8"></script>
6464

6565
```
6666

mocks/pagination.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { html, LitElement } from "lit";
22
import { customElement } from "lit/decorators.js";
3-
import { SgdsTable } from "../src/components/Table/sgds-table";
4-
import { SgdsPagination } from "../src/components/Pagination/sgds-pagination";
3+
import { SgdsTable } from "../lib/components/Table/sgds-table";
4+
import { SgdsPagination } from "../lib/components/Pagination/sgds-pagination";
55

66
interface Post {
77
id: number | string;
@@ -65,8 +65,8 @@ export class MockPagination extends LitElement {
6565
.slice(indexOfFirstItem, indexOfLastItem)
6666
.map(post => [post.id, post.title, post.body]);
6767

68-
const table = this.shadowRoot?.querySelector("sgds-table") as SgdsTable;
69-
const pagination = this.shadowRoot?.querySelector("sgds-pagination") as SgdsPagination;
68+
const table = this.shadowRoot?.querySelector<SgdsTable>("sgds-table");
69+
const pagination = this.shadowRoot?.querySelector<SgdsPagination>("sgds-pagination");
7070

7171
if (table && pagination) {
7272
table.rowHeader = this.rowHeader;

0 commit comments

Comments
 (0)