@pure-ds/storybook 0.4.16 → 0.4.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/.storybook/addons/html-preview/Panel.jsx +80 -29
  2. package/.storybook/addons/html-preview/preview.js +4 -5
  3. package/.storybook/manager.js +337 -49
  4. package/.storybook/preview-head.html +2 -2
  5. package/.storybook/preview.js +2 -2
  6. package/README.md +2 -2
  7. package/dist/pds-reference.json +1916 -267
  8. package/package.json +2 -2
  9. package/public/assets/css/app.css +2 -2
  10. package/public/assets/js/app.js +645 -10574
  11. package/public/assets/js/lit.js +3 -1048
  12. package/public/assets/js/pds.js +429 -7368
  13. package/public/assets/pds/components/pds-calendar.js +1 -1
  14. package/public/assets/pds/components/{pds-jsonform.js → pds-form.js} +536 -45
  15. package/public/assets/pds/custom-elements.json +271 -26
  16. package/public/assets/pds/pds-runtime-config.json +1 -1
  17. package/public/assets/pds/styles/pds-components.css +83 -221
  18. package/public/assets/pds/styles/pds-components.css.js +166 -442
  19. package/public/assets/pds/styles/pds-styles.css +240 -437
  20. package/public/assets/pds/styles/pds-styles.css.js +479 -881
  21. package/public/assets/pds/styles/pds-utilities.css +151 -214
  22. package/public/assets/pds/styles/pds-utilities.css.js +302 -428
  23. package/public/assets/pds/vscode-custom-data.json +63 -63
  24. package/scripts/build-pds-reference.mjs +112 -38
  25. package/scripts/generate-stories.js +2 -2
  26. package/src/js/common/ask.js +48 -21
  27. package/src/js/pds-configurator/pds-config-form.js +9 -9
  28. package/src/js/pds-configurator/pds-demo.js +2 -2
  29. package/src/js/pds-core/pds-config.js +14 -14
  30. package/src/js/pds-core/pds-generator.js +113 -50
  31. package/src/js/pds-core/pds-ontology.js +6 -6
  32. package/src/js/pds.d.ts +2 -2
  33. package/stories/GettingStarted.stories.js +3 -0
  34. package/stories/WhatIsPDS.stories.js +3 -0
  35. package/stories/components/PdsCalendar.stories.js +2 -2
  36. package/stories/components/PdsDrawer.stories.js +15 -15
  37. package/stories/components/PdsForm.stories.js +4356 -0
  38. package/stories/components/{PdsJsonformUiSchema.md → PdsFormUiSchema.md} +2 -2
  39. package/stories/components/PdsRichtext.stories.js +4 -17
  40. package/stories/components/PdsScrollrow.stories.js +224 -72
  41. package/stories/components/PdsSplitpanel.stories.js +63 -28
  42. package/stories/components/PdsTabstrip.stories.js +7 -7
  43. package/stories/enhancements/Accordion.stories.js +2 -2
  44. package/stories/enhancements/Dropdowns.stories.js +13 -10
  45. package/stories/enhancements/RangeSliders.stories.js +9 -9
  46. package/stories/enhancements/RequiredFields.stories.js +8 -8
  47. package/stories/enhancements/Toggles.stories.js +45 -36
  48. package/stories/enhancements/_enhancement-header.js +2 -2
  49. package/stories/foundations/Colors.stories.js +13 -13
  50. package/stories/foundations/HTMLDefaults.stories.js +4 -4
  51. package/stories/foundations/Icons.stories.js +123 -288
  52. package/stories/foundations/MeshGradients.stories.js +161 -250
  53. package/stories/foundations/SmartSurfaces.stories.js +147 -64
  54. package/stories/foundations/Spacing.stories.js +30 -30
  55. package/stories/foundations/Typography.stories.js +352 -723
  56. package/stories/foundations/ZIndex.stories.js +124 -141
  57. package/stories/layout/LayoutOverview.stories.js +345 -250
  58. package/stories/layout/LayoutSystem.stories.js +60 -76
  59. package/stories/patterns/InteractiveStates.stories.js +29 -29
  60. package/stories/patterns/Utilities.stories.js +17 -5
  61. package/stories/primitives/Alerts.stories.js +6 -6
  62. package/stories/primitives/Cards.stories.js +22 -11
  63. package/stories/primitives/{Forms.stories.js → FormElements.stories.js} +20 -11
  64. package/stories/primitives/HtmlFormElements.stories.js +128 -0
  65. package/stories/primitives/{FormGroups.stories.js → HtmlFormGroups.stories.js} +70 -21
  66. package/stories/primitives/Media.stories.js +23 -20
  67. package/stories/utilities/Backdrop.stories.js +68 -27
  68. package/stories/utils/PdsAsk.stories.js +15 -14
  69. package/public/assets/js/app.js.map +0 -7
  70. package/public/assets/js/lit.js.map +0 -7
  71. package/public/assets/js/pds.js.map +0 -7
  72. package/stories/components/PdsJsonform.stories.js +0 -1929
  73. /package/src/{pds-core → node-api}/pds-api.js +0 -0
@@ -19,31 +19,42 @@ export default {
19
19
  const cardsStoryStyles = html`
20
20
  <style>
21
21
  /* Demo-specific gradient backgrounds */
22
- .cards-gradient-one {
22
+ .story-cards-gradient-one {
23
23
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-secondary-500));
24
24
  }
25
- .cards-gradient-two {
25
+ .story-cards-gradient-two {
26
26
  background: linear-gradient(135deg, var(--color-secondary-500), var(--color-primary-500));
27
27
  }
28
- .cards-gradient-three {
28
+ .story-cards-gradient-three {
29
29
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-accent-500));
30
30
  }
31
31
  /* Demo placeholder dimensions */
32
- .cards-placeholder {
32
+ .story-cards-placeholder {
33
33
  height: 100px;
34
34
  border-radius: var(--radius-sm);
35
35
  }
36
- .cards-avatar-placeholder {
36
+ .story-cards-avatar-placeholder {
37
37
  width: 48px;
38
38
  height: 48px;
39
39
  border-radius: var(--radius-full);
40
40
  }
41
- .cards-media-placeholder {
41
+ .story-cards-media-placeholder {
42
42
  flex-shrink: 0;
43
43
  width: 7.5rem;
44
44
  height: 7.5rem;
45
45
  border-radius: var(--radius-md);
46
46
  }
47
+ /* Stats card */
48
+ .story-stat-number {
49
+ font-size: var(--font-size-2xl);
50
+ font-weight: var(--font-weight-bold);
51
+ }
52
+ .story-stat-primary {
53
+ color: var(--color-primary-600);
54
+ }
55
+ .story-stat-secondary {
56
+ color: var(--color-secondary-600);
57
+ }
47
58
  </style>
48
59
  `;
49
60
 
@@ -167,17 +178,17 @@ export const CardLayouts = () => html`
167
178
  <h3>Card Grid</h3>
168
179
  <div class="grid grid-auto-sm gap-sm">
169
180
  <article class="card stack-md">
170
- <div class="cards-gradient-one cards-placeholder"></div>
181
+ <div class="story-cards-gradient-one cards-placeholder"></div>
171
182
  <h4>Card 1</h4>
172
183
  <small>Grid layout with cards.</small>
173
184
  </article>
174
185
  <article class="card stack-md">
175
- <div class="cards-gradient-two cards-placeholder"></div>
186
+ <div class="story-cards-gradient-two cards-placeholder"></div>
176
187
  <h4>Card 2</h4>
177
188
  <small>Responsive and flexible.</small>
178
189
  </article>
179
190
  <article class="card stack-md">
180
- <div class="cards-gradient-three cards-placeholder"></div>
191
+ <div class="story-cards-gradient-three cards-placeholder"></div>
181
192
  <h4>Card 3</h4>
182
193
  <small>Auto-fits to space.</small>
183
194
  </article>
@@ -232,11 +243,11 @@ export const ComplexCards = () => html`
232
243
  <h4>Stats Card</h4>
233
244
  <div class="grid grid-cols-2 gap-md">
234
245
  <div>
235
- <div class="text-2xl font-bold text-primary">1.2K</div>
246
+ <div class="story-stat-number story-stat-primary">1.2K</div>
236
247
  <small class="text-muted">Followers</small>
237
248
  </div>
238
249
  <div>
239
- <div class="text-2xl font-bold text-secondary">847</div>
250
+ <div class="story-stat-number story-stat-secondary">847</div>
240
251
  <small class="text-muted">Following</small>
241
252
  </div>
242
253
  </div>
@@ -1,8 +1,15 @@
1
- import { html } from 'lit';
1
+ import { html } from 'lit';
2
2
  import { toastFormData } from '../utils/toast-utils.js';
3
3
 
4
+ // Story-specific styles (not PDS classes - demo only)
5
+ const formsStoryStyles = html`
6
+ <style>
7
+ .story-form-max { max-width: 24rem; }
8
+ </style>
9
+ `;
10
+
4
11
  export default {
5
- title: 'Primitives/Forms',
12
+ title: 'Primitives/Form Elements',
6
13
  tags: ['buttons', 'forms'],
7
14
  parameters: {
8
15
  pds: {
@@ -12,7 +19,7 @@ export default {
12
19
  description: {
13
20
  component: `Standard HTML form controls styled by PDS.
14
21
 
15
- **💡 For modern apps, consider using [pds-jsonform](/story/components-pds-jsonform--simple-form)** - a powerful web component that automatically generates forms from JSON Schema with built-in validation, conditional logic, and data binding.
22
+ **💡 For modern apps, consider using [pds-form](/story/components-pds-form--simple-form)** - a powerful web component that automatically generates forms from JSON Schema with built-in validation, conditional logic, and data binding.
16
23
 
17
24
  These primitive form controls provide the foundation for manual form building when you need full control over the markup.`
18
25
  }
@@ -44,21 +51,22 @@ export const Default = {
44
51
  };
45
52
 
46
53
  return html`
54
+ ${formsStoryStyles}
47
55
  <div class="card">
48
- <form class="max-w-sm" @submit=${handleSubmit}>
56
+ <form class="story-form-max" @submit=${handleSubmit}>
49
57
  <label>
50
- <span>Text Input</span>
58
+ <span data-label>Text Input</span>
51
59
  <input type="text" name="text" placeholder="Enter text...">
52
60
  </label>
53
61
  <label>
54
- <span>Email</span>
62
+ <span data-label>Email</span>
55
63
  <div class="input-icon">
56
64
  <pds-icon icon="envelope"></pds-icon>
57
65
  <input type="email" name="email" required placeholder="email@example.com">
58
66
  </div>
59
67
  </label>
60
68
  <label>
61
- <span>Select</span>
69
+ <span data-label>Select</span>
62
70
  <select name="select">
63
71
  <option>Option 1</option>
64
72
  <option>Option 2</option>
@@ -66,7 +74,7 @@ export const Default = {
66
74
  </select>
67
75
  </label>
68
76
  <label>
69
- <span>Textarea</span>
77
+ <span data-label>Textarea</span>
70
78
  <textarea name="textarea" rows="4" placeholder="Enter longer text..."></textarea>
71
79
  </label>
72
80
  <button type="submit" class="btn-primary">Submit</button>
@@ -82,13 +90,14 @@ export const Default = {
82
90
  export const InputsWithIcons = {
83
91
  render: (args) => {
84
92
  return html`
93
+ ${formsStoryStyles}
85
94
  <div class="card stack-md">
86
95
  <h3>Inputs with Icons</h3>
87
96
  <p>Enhance inputs with icons for better UX. Icons can be positioned at the start or end of the input.</p>
88
97
 
89
- <div class="flex flex-col gap-lg max-w-sm">
98
+ <div class="stack-lg story-form-max">
90
99
  <label>
91
- <span>Search (Icon Start)</span>
100
+ <span data-label>Search (Icon Start)</span>
92
101
  <div class="input-icon">
93
102
  <pds-icon icon="magnifying-glass"></pds-icon>
94
103
  <input type="search" placeholder="Search..." />
@@ -96,7 +105,7 @@ export const InputsWithIcons = {
96
105
  </label>
97
106
 
98
107
  <label>
99
- <span>Username (Icon End)</span>
108
+ <span data-label>Username (Icon End)</span>
100
109
  <div class="input-icon input-icon-end">
101
110
  <input type="text" placeholder="Username" />
102
111
  <pds-icon icon="user"></pds-icon>
@@ -0,0 +1,128 @@
1
+ import { html } from 'lit';
2
+ import { toastFormData } from '../utils/toast-utils.js';
3
+
4
+ // Story-specific styles (not PDS classes - demo only)
5
+ const formsStoryStyles = html`
6
+ <style>
7
+ .story-form-max { max-width: 24rem; }
8
+ </style>
9
+ `;
10
+
11
+ export default {
12
+ title: 'Primitives/HTML Form Elements',
13
+ tags: ['buttons', 'forms'],
14
+ parameters: {
15
+ pds: {
16
+ tags: ['buttons', 'forms']
17
+ },
18
+ docs: {
19
+ description: {
20
+ component: `Standard HTML form controls styled by PDS.
21
+
22
+ **💡 For modern apps, consider using [pds-form](/story/components-pds-form--simple-form)** - a powerful web component that automatically generates forms from JSON Schema with built-in validation, conditional logic, and data binding.
23
+
24
+ These primitive form controls provide the foundation for manual form building when you need full control over the markup.`
25
+ }
26
+ }
27
+ },
28
+ argTypes: {
29
+ preset: {
30
+ control: 'select',
31
+ options: ['default', 'ocean-breeze', 'midnight-steel', 'sunset-vibes', 'forest-calm', 'lavender-dream'],
32
+ description: 'Choose a design preset'
33
+ },
34
+ primaryColor: {
35
+ control: 'color',
36
+ description: 'Override primary color'
37
+ },
38
+ secondaryColor: {
39
+ control: 'color',
40
+ description: 'Override secondary color'
41
+ }
42
+ }
43
+ };
44
+
45
+ export const Default = {
46
+ render: (args) => {
47
+ // Preset changes are handled by toolbar in preview.js
48
+ const handleSubmit = (event) => {
49
+ event.preventDefault();
50
+ toastFormData(new FormData(event.target));
51
+ };
52
+
53
+ return html`
54
+ ${formsStoryStyles}
55
+ <div class="card">
56
+ <form class="story-form-max" @submit=${handleSubmit}>
57
+ <label>
58
+ <span data-label>Text Input</span>
59
+ <input type="text" name="text" placeholder="Enter text...">
60
+ </label>
61
+ <label>
62
+ <span data-label>Email</span>
63
+ <div class="input-icon">
64
+ <pds-icon icon="envelope"></pds-icon>
65
+ <input type="email" name="email" required placeholder="email@example.com">
66
+ </div>
67
+ </label>
68
+ <label>
69
+ <span data-label>Select</span>
70
+ <select name="select">
71
+ <option>Option 1</option>
72
+ <option>Option 2</option>
73
+ <option>Option 3</option>
74
+ </select>
75
+ </label>
76
+ <label>
77
+ <span data-label>Textarea</span>
78
+ <textarea name="textarea" rows="4" placeholder="Enter longer text..."></textarea>
79
+ </label>
80
+ <button type="submit" class="btn-primary">Submit</button>
81
+ </form>
82
+ </div>
83
+ `;
84
+ },
85
+ args: {
86
+ preset: 'default'
87
+ }
88
+ };
89
+
90
+ export const InputsWithIcons = {
91
+ render: (args) => {
92
+ return html`
93
+ ${formsStoryStyles}
94
+ <div class="card stack-md">
95
+ <h3>Inputs with Icons</h3>
96
+ <p>Enhance inputs with icons for better UX. Icons can be positioned at the start or end of the input.</p>
97
+
98
+ <div class="stack-lg story-form-max">
99
+ <label>
100
+ <span data-label>Search (Icon Start)</span>
101
+ <div class="input-icon">
102
+ <pds-icon icon="magnifying-glass"></pds-icon>
103
+ <input type="search" placeholder="Search..." />
104
+ </div>
105
+ </label>
106
+
107
+ <label>
108
+ <span data-label>Username (Icon End)</span>
109
+ <div class="input-icon input-icon-end">
110
+ <input type="text" placeholder="Username" />
111
+ <pds-icon icon="user"></pds-icon>
112
+ </div>
113
+ </label>
114
+ </div>
115
+ </div>
116
+ `;
117
+ },
118
+ args: {
119
+ preset: 'default'
120
+ },
121
+ parameters: {
122
+ docs: {
123
+ description: {
124
+ story: 'Input fields can be enhanced with icons to provide visual context. Use the `input-icon` class wrapper and position icons at the start (default) or end (`input-icon-end`) of the input.'
125
+ }
126
+ }
127
+ }
128
+ };
@@ -1,12 +1,20 @@
1
- import { html } from 'lit';
2
- import { toastFormData } from '../utils/toast-utils.js';
3
-
1
+ import { html } from "lit";
2
+ import { toastFormData } from "../utils/toast-utils.js";
3
+
4
+ const styles = html`
5
+ <style>
6
+ /* Story-specific styles for form group demos */
7
+ .card:has(fieldset) {
8
+ max-width: 28rem;
9
+ }
10
+ </style>
11
+ `;
4
12
  export default {
5
- title: "Primitives/Form Groups",
6
- tags: ['grouping'],
13
+ title: 'Primitives/HTML Form Groups',
14
+ tags: ["grouping"],
7
15
  parameters: {
8
16
  pds: {
9
- tags: ['forms', 'grouping']
17
+ tags: ["forms", "radio", "checkbox", "grouping"],
10
18
  },
11
19
  docs: {
12
20
  description: {
@@ -38,10 +46,13 @@ Add the \`.buttons\` class to either type for outlined button-style controls:
38
46
  };
39
47
 
40
48
  export const RadioGroupDefault = () => html`
49
+ ${styles}
41
50
  <div class="card stack-md">
42
51
  <header>
43
52
  <h3>Radio Group - Default Style</h3>
44
- <small class="text-muted">Default radio group with visible radio buttons, vertical layout</small>
53
+ <small class="text-muted"
54
+ >Default radio group with visible radio buttons, vertical layout</small
55
+ >
45
56
  </header>
46
57
  <fieldset role="radiogroup">
47
58
  <legend>Select your plan</legend>
@@ -64,10 +75,14 @@ export const RadioGroupDefault = () => html`
64
75
  RadioGroupDefault.storyName = "Radio Group - Default";
65
76
 
66
77
  export const RadioGroupButtons = () => html`
78
+ ${styles}
67
79
  <div class="card stack-md">
68
80
  <header>
69
81
  <h3>Radio Group - Button Style</h3>
70
- <small class="text-muted">Add <code>class="buttons"</code> for outlined button-style radio controls</small>
82
+ <small class="text-muted"
83
+ >Add <code>class="buttons"</code> for outlined button-style radio
84
+ controls</small
85
+ >
71
86
  </header>
72
87
  <fieldset role="radiogroup" class="buttons">
73
88
  <legend>Select your plan</legend>
@@ -90,10 +105,13 @@ export const RadioGroupButtons = () => html`
90
105
  RadioGroupButtons.storyName = "Radio Group - Buttons";
91
106
 
92
107
  export const CheckboxGroupDefault = () => html`
108
+ ${styles}
93
109
  <div class="card stack-md">
94
110
  <header>
95
111
  <h3>Checkbox Group - Default Style</h3>
96
- <small class="text-muted">Default checkbox group with visible checkboxes, vertical layout</small>
112
+ <small class="text-muted"
113
+ >Default checkbox group with visible checkboxes, vertical layout</small
114
+ >
97
115
  </header>
98
116
  <fieldset role="group">
99
117
  <legend>Select features</legend>
@@ -125,10 +143,14 @@ export const CheckboxGroupDefault = () => html`
125
143
  CheckboxGroupDefault.storyName = "Checkbox Group - Default";
126
144
 
127
145
  export const CheckboxGroupButtons = () => html`
146
+ ${styles}
128
147
  <div class="card stack-md">
129
148
  <header>
130
149
  <h3>Checkbox Group - Button Style</h3>
131
- <small class="text-muted">Add <code>class="buttons"</code> for outlined button-style checkboxes</small>
150
+ <small class="text-muted"
151
+ >Add <code>class="buttons"</code> for outlined button-style
152
+ checkboxes</small
153
+ >
132
154
  </header>
133
155
  <fieldset role="group" class="buttons">
134
156
  <legend>Select features</legend>
@@ -160,10 +182,15 @@ export const CheckboxGroupButtons = () => html`
160
182
  CheckboxGroupButtons.storyName = "Checkbox Group - Buttons";
161
183
 
162
184
  export const StyleComparison = () => html`
185
+
186
+ ${styles}
163
187
  <div class="card stack-md">
164
188
  <header>
165
189
  <h3>Side-by-Side Comparison</h3>
166
- <small class="text-muted">Compare default vs button styles for both radio and checkbox groups</small>
190
+ <small class="text-muted"
191
+ >Compare default vs button styles for both radio and checkbox
192
+ groups</small
193
+ >
167
194
  </header>
168
195
  <div class="grid grid-cols-2 gap-lg">
169
196
  <div class="stack-md">
@@ -256,10 +283,14 @@ export const StyleComparison = () => html`
256
283
  StyleComparison.storyName = "Style Comparison";
257
284
 
258
285
  export const ToggleSwitches = () => html`
286
+ ${styles}
259
287
  <div class="card stack-md gap-lg">
260
288
  <header>
261
289
  <h3>Toggle Switches</h3>
262
- <small class="text-muted">Uses <code>data-toggle</code> attribute for enhanced toggle switch styling</small>
290
+ <small class="text-muted"
291
+ >Uses <code>data-toggle</code> attribute for enhanced toggle switch
292
+ styling</small
293
+ >
263
294
  </header>
264
295
 
265
296
  <section class="card">
@@ -298,11 +329,14 @@ export const ToggleSwitches = () => html`
298
329
  ToggleSwitches.storyName = "Toggle Switches";
299
330
 
300
331
  export const CustomLayout = () => html`
332
+ ${styles}
301
333
  <div class="card stack-md">
302
334
  <h3>Custom Layout with Flex Utilities</h3>
303
- <div class="alert alert-info">Override default column layout using standard CSS flex properties</div>
335
+ <div class="alert alert-info">
336
+ Override default column layout using standard CSS flex properties
337
+ </div>
304
338
 
305
- <fieldset role="radiogroup" class="flex flex-wrap gap-sm">
339
+ <fieldset role="radiogroup" class="flex-row flex-wrap gap-sm">
306
340
  <legend>Horizontal Radio Group (flex-direction: row)</legend>
307
341
  <label>
308
342
  <input type="radio" name="horizontal-radio" value="1" checked />
@@ -318,7 +352,7 @@ export const CustomLayout = () => html`
318
352
  </label>
319
353
  </fieldset>
320
354
 
321
- <fieldset role="group" class="flex flex-wrap gap-sm">
355
+ <fieldset role="group" class="flex-row flex-wrap gap-sm">
322
356
  <legend>Horizontal Checkbox Group (flex-direction: row)</legend>
323
357
  <label>
324
358
  <input type="checkbox" name="horizontal-check" value="1" checked />
@@ -339,10 +373,13 @@ export const CustomLayout = () => html`
339
373
  CustomLayout.storyName = "Custom Layout";
340
374
 
341
375
  export const ButtonStyleVariants = () => html`
376
+ ${styles}
342
377
  <div class="card stack-md">
343
378
  <header>
344
379
  <h3>Button Style Variants</h3>
345
- <small class="text-muted">Examples of button-style groups in different contexts</small>
380
+ <small class="text-muted"
381
+ >Examples of button-style groups in different contexts</small
382
+ >
346
383
  </header>
347
384
  <div class="stack-md gap-lg max-w-lg">
348
385
  <fieldset role="radiogroup" class="buttons">
@@ -421,7 +458,10 @@ export const AccessibleFormGroups = {
421
458
  <div class="card stack-md">
422
459
  <header>
423
460
  <h2>Accessibility Features</h2>
424
- <small class="text-muted">Form groups include proper ARIA attributes, semantic HTML, and keyboard navigation support.</small>
461
+ <small class="text-muted"
462
+ >Form groups include proper ARIA attributes, semantic HTML, and
463
+ keyboard navigation support.</small
464
+ >
425
465
  </header>
426
466
  <div class="card max-w-md">
427
467
  <form class="stack-md gap-lg" @submit=${handleSubmit}>
@@ -436,7 +476,12 @@ export const AccessibleFormGroups = {
436
476
 
437
477
  <fieldset role="group" class="flex flex-row">
438
478
  <label>
439
- <input type="radio" name="notification" value="email" checked />
479
+ <input
480
+ type="radio"
481
+ name="notification"
482
+ value="email"
483
+ checked
484
+ />
440
485
  <span>Email only</span>
441
486
  </label>
442
487
  <label>
@@ -456,7 +501,9 @@ export const AccessibleFormGroups = {
456
501
 
457
502
  <fieldset role="group" aria-describedby="topics-help">
458
503
  <legend>Topics to Follow</legend>
459
- <small id="topics-help" class="text-muted">Select all topics you're interested in</small>
504
+ <small id="topics-help" class="text-muted"
505
+ >Select all topics you're interested in</small
506
+ >
460
507
  <label data-toggle>
461
508
  <input type="checkbox" name="topics" value="product" checked />
462
509
  <span>Product Updates</span>
@@ -472,14 +519,16 @@ export const AccessibleFormGroups = {
472
519
  </fieldset>
473
520
 
474
521
  <nav class="flex gap-sm">
475
- <button type="submit" class="btn-primary">Save Preferences</button>
522
+ <button type="submit" class="btn-primary">
523
+ Save Preferences
524
+ </button>
476
525
  <button type="reset" class="btn-secondary">Reset</button>
477
526
  </nav>
478
527
  </form>
479
528
  </div>
480
529
  </div>
481
530
  `;
482
- }
531
+ },
483
532
  };
484
533
 
485
534
  AccessibleFormGroups.storyName = "Accessible Form Groups";
@@ -15,13 +15,21 @@ export default {
15
15
  }
16
16
  };
17
17
 
18
- // Minimal story-specific styles - only for demo-specific visuals not covered by PDS
18
+ // Story-specific styles - only for demo-specific visuals not covered by PDS
19
19
  const mediaStoryStyles = html`
20
20
  <style>
21
21
  /* Video shell max-width constraint */
22
- .media-video-shell {
22
+ .story-media-video-shell {
23
23
  max-width: 56.25rem;
24
24
  }
25
+ /* Violations fixed */
26
+ .story-img-full-width {
27
+ width: 100%;
28
+ }
29
+ .story-img-circle {
30
+ width: 200px;
31
+ aspect-ratio: 1;
32
+ }
25
33
  </style>
26
34
  `;
27
35
 
@@ -112,8 +120,7 @@ export const ImageRoundedUtilities = () => html`
112
120
  <img
113
121
  src="https://picsum.photos/300/200?random=40"
114
122
  alt="Small radius"
115
- class="img-rounded-sm"
116
- style="width: 100%;"
123
+ class="img-rounded-sm story-img-full-width"
117
124
  />
118
125
  <figcaption><code>.img-rounded-sm</code></figcaption>
119
126
  </figure>
@@ -122,8 +129,7 @@ export const ImageRoundedUtilities = () => html`
122
129
  <img
123
130
  src="https://picsum.photos/300/200?random=41"
124
131
  alt="Medium radius"
125
- class="img-rounded-md"
126
- style="width: 100%;"
132
+ class="img-rounded-md story-img-full-width"
127
133
  />
128
134
  <figcaption><code>.img-rounded-md</code></figcaption>
129
135
  </figure>
@@ -132,8 +138,7 @@ export const ImageRoundedUtilities = () => html`
132
138
  <img
133
139
  src="https://picsum.photos/300/200?random=42"
134
140
  alt="Large radius"
135
- class="img-rounded-lg"
136
- style="width: 100%;"
141
+ class="img-rounded-lg story-img-full-width"
137
142
  />
138
143
  <figcaption><code>.img-rounded-lg</code></figcaption>
139
144
  </figure>
@@ -142,8 +147,7 @@ export const ImageRoundedUtilities = () => html`
142
147
  <img
143
148
  src="https://picsum.photos/300/200?random=43"
144
149
  alt="Extra large radius"
145
- class="img-rounded-xl"
146
- style="width: 100%;"
150
+ class="img-rounded-xl story-img-full-width"
147
151
  />
148
152
  <figcaption><code>.img-rounded-xl</code></figcaption>
149
153
  </figure>
@@ -152,8 +156,7 @@ export const ImageRoundedUtilities = () => html`
152
156
  <img
153
157
  src="https://picsum.photos/200/200?random=44"
154
158
  alt="Full radius (circle)"
155
- class="img-rounded-full"
156
- style="width: 200px; aspect-ratio: 1;"
159
+ class="img-rounded-full story-img-circle"
157
160
  />
158
161
  <figcaption><code>.img-rounded-full</code></figcaption>
159
162
  </figure>
@@ -195,26 +198,26 @@ export const InlineImages = () => html`
195
198
  <div class="card stack-md">
196
199
  <p>
197
200
  The team includes
198
- <img src="https://i.pravatar.cc/60?img=1" alt="Alice" class="img-inline" />
201
+ <img src="https://i.pravatar.cc/60?img=1" alt="Alice" class="story-img-inline" />
199
202
  Alice,
200
- <img src="https://i.pravatar.cc/60?img=2" alt="Bob" class="img-inline" />
203
+ <img src="https://i.pravatar.cc/60?img=2" alt="Bob" class="story-img-inline" />
201
204
  Bob, and
202
- <img src="https://i.pravatar.cc/60?img=3" alt="Carol" class="img-inline" />
205
+ <img src="https://i.pravatar.cc/60?img=3" alt="Carol" class="story-img-inline" />
203
206
  Carol who have been working on this project.
204
207
  </p>
205
208
 
206
209
  <p>
207
210
  Click the
208
- <img src="https://picsum.photos/60/60?random=60" alt="Settings icon" class="img-inline" />
211
+ <img src="https://picsum.photos/60/60?random=60" alt="Settings icon" class="story-img-inline" />
209
212
  icon to access settings, or the
210
- <img src="https://picsum.photos/60/60?random=61" alt="Help icon" class="img-inline" />
213
+ <img src="https://picsum.photos/60/60?random=61" alt="Help icon" class="story-img-inline" />
211
214
  icon for help.
212
215
  </p>
213
216
  </div>
214
217
 
215
218
  <div class="card">
216
219
  <h3>CSS Properties</h3>
217
- <pre><code>.img-inline {
220
+ <pre><code>.story-img-inline {
218
221
  display: inline;
219
222
  vertical-align: middle;
220
223
  border-radius: var(--radius-xs);
@@ -236,7 +239,7 @@ export const VideoResponsive = () => html`
236
239
  </div>
237
240
 
238
241
  <video
239
- class="video-responsive"
242
+ class="story-video-responsive"
240
243
  controls
241
244
  poster="https://picsum.photos/600/338?random=70"
242
245
  >
@@ -249,7 +252,7 @@ export const VideoResponsive = () => html`
249
252
 
250
253
  <div class="card">
251
254
  <h3>CSS Properties</h3>
252
- <pre><code>.video-responsive {
255
+ <pre><code>.story-video-responsive {
253
256
  width: 100%;
254
257
  max-width: 600px;
255
258
  height: auto;