Skip to content

Commit 9daeadd

Browse files
committed
Merge branch '631-stepper-updating-stepper-with-new-props' into rc
# Conflicts: # docs/INSTALLATION.md
2 parents 8c7b092 + fc1d47b commit 9daeadd

80 files changed

Lines changed: 584 additions & 353 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.

.claude/commands/sgds-writing

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/chonglukhei/Repositories/singapore-design-system/sgds-web-component-toast/skills/sgds-writing

.github/skills/storybook-stories/SKILL.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,20 @@ metadata:
99

1010
# Storybook Stories
1111

12-
## File Structure
12+
## Writing style
13+
14+
All prose in `additional.mdx` files and story display names MUST follow the [sgds-writing skill](../../../skills/sgds-writing/SKILL.md). Before writing or editing any `.mdx` documentation, read the sgds-writing skill and apply its rules:
15+
16+
- **Sentence case** for all headings (capitalise first word and proper nouns only)
17+
- **UK English** spelling (colour, behaviour, organisation, customise)
18+
- **No contractions** (use "do not" instead of "don't")
19+
- **No em dashes** (use colons, commas, or separate sentences)
20+
- **No "please"** in instructions (use direct imperatives)
21+
- **No subjective adjectives** (do not say "simple", "easy", "important")
22+
- **Active voice** preferred
23+
- **Oxford comma** in lists of three or more
24+
25+
## File structure
1326

1427
```
1528
stories/component-templates/[ComponentName]/
@@ -18,9 +31,9 @@ stories/component-templates/[ComponentName]/
1831
└── additional.mdx Documentation for additional stories
1932
```
2033

21-
### File Concatenation
34+
### File concatenation
2235

23-
`basic.js` is automatically concatenated with `additional.stories.js` at load time. Do NOT import from `basic.js` in `additional.stories.js` `Template`, `args`, and `parameters` are already in scope.
36+
`basic.js` is automatically concatenated with `additional.stories.js` at load time. Do NOT import from `basic.js` in `additional.stories.js`. `Template`, `args`, and `parameters` are already in scope.
2437

2538
## basic.js Pattern
2639

@@ -75,11 +88,11 @@ export const ShowMore = {
7588

7689
See [reference/examples.md](reference/examples.md) for full real-world component examples.
7790

78-
## DRY Rules
91+
## DRY rules
7992

8093
The folder name is the namespace. Strip it from filenames and export names.
8194

82-
### File Naming
95+
### File naming
8396

8497
```
8598
stories/utilities/border/
@@ -95,7 +108,7 @@ stories/utilities/spacing/padding/
95108
✅ layout.stories.js ❌ layout-padding.stories.js
96109
```
97110

98-
### Storybook Title
111+
### Storybook title
99112

100113
```javascript
101114
// ✅ Folder path already provides context
@@ -107,7 +120,7 @@ export default { title: "Utilities/Border/Border Color" };
107120
export default { title: "Utilities/Spacing/Gap/Form Gap" };
108121
```
109122

110-
### Export Names
123+
### Export names
111124

112125
```javascript
113126
// In stories/utilities/border/color.stories.js
@@ -116,11 +129,11 @@ export const Grayscales = ... // ✅ not BorderGrayscales
116129
export const Primary = ... // ✅ not PrimaryBorder
117130
```
118131

119-
## Story Naming Conventions
132+
## Story naming conventions
120133

121134
- **Export name:** PascalCase (`NoClampAction`)
122-
- **Display name:** Title Case (`"No Clamp Action"`)
123-
- Be descriptive, not generic — avoid `Story1`, `Story2`
135+
- **Display name:** Sentence case (`"No clamp action"`)
136+
- Be descriptive, not generic. Avoid `Story1`, `Story2`
124137

125138
## Commands
126139

docs/AgentSkills.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Agent Skills <sgds-badge outlined variant="warning">beta</sgds-badge>
22

3-
SGDS ships a set of **agent skills** structured knowledge files that teach AI coding assistants (GitHub Copilot, Claude Code, Cursor, Windsurf, and others) how to build with SGDS correctly.
3+
SGDS ships a set of **agent skills**: structured knowledge files that teach AI coding assistants (GitHub Copilot, Claude Code, Cursor, Windsurf, and others) how to build with SGDS correctly.
44

55
Once installed, your AI assistant can answer questions like:
66

@@ -32,9 +32,9 @@ Select all existing skills from the list. This pulls the latest skills from the
3232

3333
---
3434

35-
## Add SGDS to Your Agent Instructions File
35+
## Add SGDS to your agent instructions file
3636

37-
The most reliable way to ensure your agent always uses SGDS skills is to add it to your project's agent instructions file so the rule is persistent across every session without needing to repeat it.
37+
The most reliable way to ensure your agent always uses SGDS skills is to add it to your project's agent instructions file, so the rule is persistent across every session without needing to repeat it.
3838

3939
Depending on your agent or IDE, add the following to the relevant file:
4040

@@ -51,18 +51,18 @@ Add a line like:
5151
When building any UI, always use the SGDS web component library and SGDS Tailwind utilities for styling. Consult the SGDS skills for correct component usage, slot structure, design patterns, and utility classes.
5252
```
5353

54-
This means every new session automatically inherits the SGDS constraint — you never have to remind the agent to use SGDS, and it will consult the skills before reaching for non-SGDS patterns.
54+
This means every new session automatically inherits the SGDS constraint. You never have to remind the agent to use SGDS, and it will consult the skills before reaching for non-SGDS patterns.
5555

5656
---
5757

58-
## Available Skills
58+
## Available skills
5959

6060
| Skill | What it covers |
6161
|---|---|
62-
| **sgds-workflow** | Start here when unsure. Maps all SGDS skills and the order to use them new app path and existing app navigation. |
62+
| **sgds-workflow** | Start here when unsure. Maps all SGDS skills and the order to use them: new app path and existing app navigation. |
6363
| **sgds-getting-started** | Technical setup: Inter font, CSS import order, component registration, and app layout templates. |
64-
| **sgds-components** | All 46 `<sgds-*>` web components accordion through tooltip with attributes, slots, events, and usage examples. |
65-
| **sgds-utilities** | All `sgds:` Tailwind utility classes: grid, spacing, typography, color semantics, backgrounds, borders, opacity, and more. |
64+
| **sgds-components** | All 46 `<sgds-*>` web components (accordion through tooltip) with attributes, slots, events, and usage examples. |
65+
| **sgds-utilities** | All `sgds:` Tailwind utility classes: grid, spacing, typography, colour semantics, backgrounds, borders, opacity, and more. |
6666
| **sgds-theming** | Brand colour overrides, day/night mode setup, and font customisation via CSS token overrides. |
6767
| **sgds-forms** | Form validation using `ElementInternals`, `hasFeedback`, constraint validation, `FormData`, and `setInvalid`. |
6868
| **sgds-pattern-block-templates** | Application shell (masthead, mainnav, footer) and self-contained UI blocks: filter sidebar, session detail, and more. |
@@ -71,36 +71,36 @@ This means every new session automatically inherits the SGDS constraint — you
7171

7272
---
7373

74-
## Recommended Workflow
74+
## Recommended workflow
7575

7676
For a **new application**, work through skills in this order:
7777

78-
1. **sgds-getting-started** complete project setup before writing any component code
79-
2. **sgds-components** + **sgds-utilities** your day-to-day references while building
80-
3. **sgds-templates** + **sgds-pattern-block-templates** when assembling full pages
81-
4. **sgds-forms** when any `<form>` element is involved
82-
5. **sgds-data-visualisation** only when charts or dashboards are needed
78+
1. **sgds-getting-started**: complete project setup before writing any component code
79+
2. **sgds-components** + **sgds-utilities**: your day-to-day references while building
80+
3. **sgds-templates** + **sgds-pattern-block-templates**: when assembling full pages
81+
4. **sgds-forms**: when any `<form>` element is involved
82+
5. **sgds-data-visualisation**: only when charts or dashboards are needed
8383

8484
For an **existing application** with sgds v3 setup done, skip setup skills and go directly to the relevant skill using the table above.
8585

8686
If unsure where to start, ask your AI assistant to read the **sgds-workflow** skill first.
8787

8888
---
8989

90-
## How It Works
90+
## How it works
9191

9292
Skills are plain Markdown files structured for AI consumption. Each skill contains:
9393

94-
- A **Quick Decision Guide** decision trees for choosing the right token or component variant
95-
- An **API Summary** compact attribute/property tables
96-
- **Usage examples** idiomatic HTML the AI can produce and adapt
97-
- **For AI Agents** section explicit rules and common mistakes to avoid
94+
- A **Quick Decision Guide**: decision trees for choosing the right token or component variant
95+
- An **API Summary**: compact attribute/property tables
96+
- **Usage examples**: idiomatic HTML the AI can produce and adapt
97+
- **For AI Agents** section: explicit rules and common mistakes to avoid
9898

99-
Skills are read by the agent at query time — they do not add runtime dependencies to your project.
99+
Skills are read by the agent at query time. They do not add runtime dependencies to your project.
100100

101101
---
102102

103-
## Keeping Skills Up to Date
103+
## Keeping skills up to date
104104

105105
Run the following command to pull the latest skill updates:
106106

docs/Attributes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Attributes and Properties
1+
# Attributes and properties
22

33
## String
44

5-
The web components uses attributes to set the properties. For example, the variant attribute is used to set the variant property of the button and in turn alters its class and changes its color
5+
The web components uses attributes to set the properties. For example, the variant attribute is used to set the variant property of the button and in turn alters its class and changes its colour
66

77
```html
88
<sgds-button variant="secondary"></sgds-button>
@@ -18,7 +18,7 @@ Boolean properties are usually false by default. To set it to true, add it as an
1818
<sgds-input disabled></sgds-input>
1919
```
2020

21-
## Objects, Arrays and Functions
21+
## Objects, arrays, and functions
2222

2323
Functions have to be passed in via javascript. For attributes that accepts Objects or Arrays, you can pass in as a JSON string or via javascript.
2424

docs/Extendable.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ For users who are leveraging on sgds-web-component as a building block to build
44

55
## Scoped Elements
66

7-
The CustomElementRegistry is a global registry that provides methods for registering custom elements. One of the limitations of working with this global registry is that multiple versions of the same element cannot co-exist. This causes bottlenecks in software delivery that should be managed by the teams and complex build systems. Scoped Custom Element Registries is a proposal that will solve the problem. Since this functionality won't be available (especially not cross browser) anytime soon, we've adopted [OpenWC's Scoped Elements](https://open-wc.org/docs/development/scoped-elements/).
7+
The CustomElementRegistry is a global registry that provides methods for registering custom elements. One of the limitations of working with this global registry is that multiple versions of the same element cannot co-exist. This causes bottlenecks in software delivery that should be managed by the teams and complex build systems. Scoped Custom Element Registries is a proposal that will solve the problem. Since this functionality will not be available (especially not cross browser) anytime soon, we have adopted [OpenWC's Scoped Elements](https://open-wc.org/docs/development/scoped-elements/).
88

99
From version 3.0.0 onwards, our library has stopped the use of Scoped Elements mixin to dedupe our component registration when reusing components.
1010

11-
For users who are building component libraries on top of sgds-web-component and facing clashing registration issues, you can adopt [OpenWC's scoped elements](https://open-wc.org/docs/development/scoped-elements/) to prevent exporting our registered custom elements. Please read up about OpenWC's scoped elements for more updated information.
11+
For users who are building component libraries on top of sgds-web-component and facing clashing registration issues, you can adopt [OpenWC's scoped elements](https://open-wc.org/docs/development/scoped-elements/) to prevent exporting our registered custom elements. Read up about OpenWC's scoped elements for more updated information.
1212

1313
Things to note:
1414

docs/FlashOfUnstyledContent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Flash of unstyled content
22

3-
Flash of unstyled content (FOUC) is the the momentary flicker where the user sees a page (or a part of it) before styles have finished applying typically showing raw HTML without CSS styling or custom element rendering.
3+
Flash of unstyled content (FOUC) is the momentary flicker where the user sees a page (or a part of it) before styles have finished applying, typically showing raw HTML without CSS styling or custom element rendering.
44

55
Web Components rely on custom elements and Shadow DOM, both of which depend on client-side JavaScript to define and hydrate those components.
66

docs/Grid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The **SGDS Grid System** is a mobile-first, fully responsive layout system based
4040
6. **Centered Columns (`.sgds-col-*-center-*`)**:
4141
- Horizontally centers grid items by calculating the appropriate starting column (grid-column) based on the number of columns the item spans.
4242
- Only available for even-numbered column spans (e.g., 2, 4, 6, 8, 10) within a 12-column grid.
43-
- Example: `.sgds-col-lg-center-4` centers a 4-column-wide item by starting it at column 5 calculated as `(12 - 4) / 2 = 4`, so it starts at the 5th grid line.
43+
- Example: `.sgds-col-lg-center-4` centres a 4-column-wide item by starting it at column 5. This is calculated as `(12 - 4) / 2 = 4`, so it starts at the 5th grid line.
4444
- Enables centered layout alignment without manually adding offset classes or wrappers.
4545
- Defined per breakpoint (e.g., `-sm-center-*`, `-md-center-*`, etc.) to support responsive designs.
4646

docs/INSTALLATION.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Install SGDS web components locally with the following command
88

99
```js
1010

11-
npm install @govtechsg/sgds-web-component@3.18.1
11+
npm install @govtechsg/sgds-web-component@3.18.0
1212

1313
```
1414

@@ -53,14 +53,14 @@ This method registers all SGDS elements up front in the Custom Elements Registry
5353
5454
```js
5555
// Load global css file
56-
<link href='https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component@3.18.1/themes/day.css' rel='stylesheet' type='text/css' />
57-
<link href='https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component@3.18.1/css/sgds.css' rel='stylesheet' type='text/css' />
56+
<link href='https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component@3.18.0/themes/day.css' rel='stylesheet' type='text/css' />
57+
<link href='https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component@3.18.0/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-A/Aw0SV7NIDpdI/fkHIa0CoWOs92wi5e853upwMm9w6IlWd76pi6886k876++Ur7"></script>
60+
<script src="https://cdn.jsdelivr.net/npm/@govtechsg/sgds-web-component@3.18.0" async crossorigin="anonymous" integrity="sha384-44G1UGlj3rZfq1YaIMzFpYWhR6UJ6ltSHtipxyukThIEqZ6UAKR0KGxW+5rybhzh"></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.0/components/Masthead/index.umd.min.js" async crossorigin="anonymous" integrity="sha384-E79KylNKbLcetOvEpGua4HTBNkhQfVUh2LfbACzab8iYapmUtkK4CWEV+1+sPq7B"></script>
6464

6565
```
6666

docs/Imports.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import "@govtechsg/sgds-web-component";
1616
// <sgds-button>Hello World</sgds-button>
1717
```
1818

19-
## Typescript: Using the component's class object
19+
## TypeScript: using the component's class object
2020

2121
When writing with Typescript, you might be required to type the components in certain cases. Import the component class like so.
2222
Each component's Class is exported via named exports, prefixed with `Sgds`.

docs/Layouts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# App Layout Templates
1+
# App layout templates
22

33
Layout templates for common application patterns, helping you structure your pages with consistent spacing, navigation, and content containers.
44

@@ -8,7 +8,7 @@ Before using the app layout templates, ensure that you have set up the **utility
88

99
For more details, see the [Utilities documentation](/docs/utilities-introduction--docs).
1010

11-
### Import CSS Files
11+
### Import CSS files
1212

1313
```javascript
1414
// Theme files

0 commit comments

Comments
 (0)