Skip to content

Commit 9d3f2fb

Browse files
petrinetangclaude
andcommitted
feat(components): refresh component doc pages with segmented control and playgrounds
- Add mobile-responsive SegmentedControl with overflow arrows and sliding indicator, used by configuration and structure demos - Add AlertPlayground and ComponentPlayground for interactive exploration of props - Add ThemeControls and scoped theming composable for per-page theme preview - Consolidate AccordionV2 page into shared component-docs structure - Refresh component data (badge variants/outlined/dismissible/icon sections, card/combo-box/table content) and related section components - Add sgds-writing skill for docs copy guidance Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4ee1512 commit 9d3f2fb

53 files changed

Lines changed: 4626 additions & 921 deletions

Some content is hidden

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

.agents/skills/sgds-components/reference/accordion.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ Accordion items support two expand modes:
7474

7575
**Compact spacing?**`density="compact"` on `<sgds-accordion>`
7676

77+
**Spacious spacing?**`density="spacious"` on `<sgds-accordion>`
78+
79+
**Icon before the header?** → Use the `icon` slot on `<sgds-accordion-item>`
80+
81+
**Badge after the header?** → Use the `badge` slot on `<sgds-accordion-item>`
82+
7783
**Start an item open?** → Add `open` on `<sgds-accordion-item>`
7884

7985
```html
@@ -112,6 +118,22 @@ Accordion items support two expand modes:
112118
<div slot="content">Content B.</div>
113119
</sgds-accordion-item>
114120
</sgds-accordion>
121+
122+
<!-- Spacious density with icon and badge slots -->
123+
<sgds-accordion density="spacious">
124+
<sgds-accordion-item open>
125+
<sgds-icon slot="icon" name="info-circle" size="xl"></sgds-icon>
126+
<div slot="header">Section with icon</div>
127+
<sgds-badge slot="badge" variant="primary">New</sgds-badge>
128+
<div slot="content">Content here.</div>
129+
</sgds-accordion-item>
130+
<sgds-accordion-item>
131+
<sgds-icon slot="icon" name="info-circle" size="xl"></sgds-icon>
132+
<div slot="header">Another section</div>
133+
<sgds-badge slot="badge" variant="warning">Updated</sgds-badge>
134+
<div slot="content">More content here.</div>
135+
</sgds-accordion-item>
136+
</sgds-accordion>
115137
```
116138

117139
## API Summary
@@ -122,7 +144,7 @@ Accordion items support two expand modes:
122144
|---|---|---|---|
123145
| `allowMultiple` | boolean | `false` | Allows multiple items to be open simultaneously |
124146
| `variant` | `default \| border` | `default` | Visual style of the accordion |
125-
| `density` | `default \| compact` | `default` | Spacing density of accordion items |
147+
| `density` | `default \| compact \| spacious` | `default` | Spacing density of accordion items |
126148

127149
### `<sgds-accordion-item>`
128150

@@ -135,9 +157,11 @@ Accordion items support two expand modes:
135157

136158
| Slot | Purpose |
137159
|---|---|
160+
| `icon` | An icon placed before the header text |
138161
| `header` | The clickable header / title of the accordion item |
139-
| `content` | The body content shown when the item is expanded |
162+
| `badge` | A badge placed after the header text, aligned to the right |
140163
| `caret` | Custom caret/icon replacing the default chevron |
164+
| `content` | The body content shown when the item is expanded |
141165

142166
## Events (`<sgds-accordion-item>`)
143167

.agents/skills/sgds-components/reference/alert.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ No CSS styling modifications — custom properties and CSS parts are not exposed
4141

4242
## Component Composition
4343

44-
**`icon` slot** — a single `<sgds-icon>` that matches the alert's semantic variant:
45-
- `info``<sgds-icon name="info-circle-fill">`
46-
- `success``<sgds-icon name="check-circle-fill">`
47-
- `danger``<sgds-icon name="exclamation-circle-fill">`
48-
- `warning``<sgds-icon name="exclamation-triangle-fill">`
44+
**`icon` slot** — a single `<sgds-icon size="md">` that matches the alert's semantic variant:
45+
- `info``<sgds-icon name="info-circle-fill" size="md">`
46+
- `success``<sgds-icon name="check-circle-fill" size="md">`
47+
- `danger``<sgds-icon name="exclamation-circle-fill" size="md">`
48+
- `warning``<sgds-icon name="exclamation-triangle-fill" size="md">`
4949
- Omit the slot entirely for a text-only (no icon) alert.
50+
- Always set `size="md"` on the icon — this is the required size for alert icons.
5051

5152
**Default slot (body)** — paragraph text and `<sgds-alert-link>` elements for inline links. Basic HTML is permitted (`<strong>`, `<em>`, `<p>`). Avoid placing interactive components in the body — alerts are informational only.
5253

@@ -109,40 +110,40 @@ No CSS styling modifications — custom properties and CSS parts are not exposed
109110
```html
110111
<!-- Basic alert with icon -->
111112
<sgds-alert show variant="info" title="Title">
112-
<sgds-icon slot="icon" name="info-circle-fill"></sgds-icon>
113+
<sgds-icon slot="icon" name="info-circle-fill" size="md"></sgds-icon>
113114
<div>Description with <sgds-alert-link href="#">link</sgds-alert-link></div>
114115
</sgds-alert>
115116

116117
<!-- All variants -->
117118
<sgds-alert show variant="success" title="Success alert">
118-
<sgds-icon slot="icon" name="check-circle-fill"></sgds-icon>
119+
<sgds-icon slot="icon" name="check-circle-fill" size="md"></sgds-icon>
119120
<div>Operation completed.</div>
120121
</sgds-alert>
121122

122123
<sgds-alert show variant="danger" title="Error alert">
123-
<sgds-icon slot="icon" name="exclamation-circle-fill"></sgds-icon>
124+
<sgds-icon slot="icon" name="exclamation-circle-fill" size="md"></sgds-icon>
124125
<div>Something went wrong.</div>
125126
</sgds-alert>
126127

127128
<sgds-alert show variant="warning" title="Warning alert">
128-
<sgds-icon slot="icon" name="exclamation-triangle-fill"></sgds-icon>
129+
<sgds-icon slot="icon" name="exclamation-triangle-fill" size="md"></sgds-icon>
129130
<div>Proceed with caution.</div>
130131
</sgds-alert>
131132

132133
<sgds-alert show variant="neutral" title="Neutral alert">
133-
<sgds-icon slot="icon" name="info-circle-fill"></sgds-icon>
134+
<sgds-icon slot="icon" name="info-circle-fill" size="md"></sgds-icon>
134135
<div>Here is some information.</div>
135136
</sgds-alert>
136137

137138
<!-- Outlined variant -->
138139
<sgds-alert show variant="info" title="Title" outlined>
139-
<sgds-icon slot="icon" name="info-circle-fill"></sgds-icon>
140+
<sgds-icon slot="icon" name="info-circle-fill" size="md"></sgds-icon>
140141
<div>Outlined alert.</div>
141142
</sgds-alert>
142143

143144
<!-- Dismissible alert -->
144145
<sgds-alert show variant="info" title="Title" dismissible>
145-
<sgds-icon slot="icon" name="info-circle-fill"></sgds-icon>
146+
<sgds-icon slot="icon" name="info-circle-fill" size="md"></sgds-icon>
146147
<div>This alert can be closed.</div>
147148
</sgds-alert>
148149

@@ -202,7 +203,7 @@ For framework-specific event syntax (React, Vue, Angular) see the **[sgds-compon
202203
**For AI agents**:
203204
1. Always use `<sgds-alert>` for feedback messages — never suggest custom `<div>` banners.
204205
2. `show` must be set to `true` for the alert to be visible regardless of whether it is `dismissible`.
205-
3. The `icon` slot is optional; omit it for a text-only alert.
206+
3. The `icon` slot is optional; omit it for a text-only alert. When using it, always set `size="md"` on the `<sgds-icon>`.
206207
4. Use `<sgds-alert-link>` (not a plain `<a>` tag) for any link inside the alert body.
207208
5. `title` accepts plain text only — do not pass HTML into the `title` attribute.
208209
6. `close()` programmatically dismisses the alert; listening for `sgds-hide` confirms it has closed.

0 commit comments

Comments
 (0)