@pure-ds/storybook 0.3.19 → 0.4.1

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 (40) hide show
  1. package/.storybook/addons/pds-configurator/SearchTool.js +44 -44
  2. package/.storybook/preview.js +6 -2
  3. package/dist/pds-reference.json +65 -13
  4. package/package.json +50 -50
  5. package/stories/components/PdsCalendar.stories.js +266 -263
  6. package/stories/components/PdsDrawer.stories.js +2 -2
  7. package/stories/components/PdsIcon.stories.js +2 -2
  8. package/stories/components/PdsJsonform.stories.js +2 -2
  9. package/stories/components/PdsRichtext.stories.js +367 -367
  10. package/stories/components/PdsScrollrow.stories.js +140 -140
  11. package/stories/components/PdsSplitpanel.stories.js +502 -502
  12. package/stories/components/PdsTabstrip.stories.js +2 -2
  13. package/stories/components/PdsToaster.stories.js +186 -186
  14. package/stories/components/PdsUpload.stories.js +66 -66
  15. package/stories/enhancements/Dropdowns.stories.js +185 -185
  16. package/stories/enhancements/InteractiveStates.stories.js +625 -625
  17. package/stories/enhancements/MeshGradients.stories.js +321 -320
  18. package/stories/enhancements/OpenGroups.stories.js +227 -227
  19. package/stories/enhancements/RangeSliders.stories.js +232 -232
  20. package/stories/enhancements/RequiredFields.stories.js +189 -189
  21. package/stories/enhancements/Toggles.stories.js +167 -167
  22. package/stories/foundations/Colors.stories.js +2 -1
  23. package/stories/foundations/Icons.stories.js +4 -0
  24. package/stories/foundations/SmartSurfaces.stories.js +485 -367
  25. package/stories/foundations/Spacing.stories.js +5 -1
  26. package/stories/foundations/Typography.stories.js +4 -0
  27. package/stories/foundations/ZIndex.stories.js +329 -325
  28. package/stories/layout/LayoutOverview.stories.js +247 -0
  29. package/stories/layout/LayoutSystem.stories.js +852 -0
  30. package/stories/patterns/BorderEffects.stories.js +74 -72
  31. package/stories/primitives/Accordion.stories.js +5 -3
  32. package/stories/primitives/Alerts.stories.js +261 -46
  33. package/stories/primitives/Badges.stories.js +4 -0
  34. package/stories/primitives/Buttons.stories.js +2 -2
  35. package/stories/primitives/Cards.stories.js +98 -170
  36. package/stories/primitives/Media.stories.js +442 -203
  37. package/stories/primitives/Tables.stories.js +358 -232
  38. package/stories/utilities/Backdrop.stories.js +197 -0
  39. package/stories/patterns/Layout.stories.js +0 -99
  40. package/stories/utilities/GridSystem.stories.js +0 -208
@@ -1,367 +1,485 @@
1
- import { html } from 'lit';
2
-
3
- export default {
4
- title: 'Foundations/Smart Surfaces',
5
- parameters: {
6
- pds: {
7
- tags: ['surface', 'colors', 'layout']
8
- },
9
- docs: {
10
- description: {
11
- component: 'Smart surface system that automatically adapts text, icons, shadows, and borders based on backgrounds. Maintains WCAG AA contrast ratios automatically.'
12
- }
13
- }
14
- }
15
- };
16
-
17
- const smartSurfacesStoryStyles = html`
18
- <style>
19
- .smart-surfaces-section {
20
- padding: var(--spacing-4);
21
- }
22
- .smart-surfaces-subtitle {
23
- margin-bottom: var(--spacing-6);
24
- }
25
- .smart-surfaces-grid--variants {
26
- display: grid;
27
- grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
28
- gap: var(--spacing-4);
29
- }
30
- .smart-surfaces-grid--shadows {
31
- display: grid;
32
- grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
33
- gap: var(--spacing-6);
34
- }
35
- .smart-surfaces-grid--inversion {
36
- display: grid;
37
- grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
38
- gap: var(--spacing-4);
39
- }
40
- .smart-surfaces-grid--borders {
41
- display: grid;
42
- grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
43
- gap: var(--spacing-6);
44
- }
45
- .smart-surfaces-surface {
46
- padding: var(--spacing-6);
47
- border-radius: var(--radius-md);
48
- }
49
- .smart-surfaces-title {
50
- display: flex;
51
- align-items: center;
52
- gap: var(--spacing-2);
53
- }
54
- .smart-surfaces-description {
55
- margin-top: var(--spacing-2);
56
- }
57
- .smart-surfaces-button-spacing {
58
- margin-top: var(--spacing-3);
59
- }
60
- .smart-surfaces-button-spacing-sm {
61
- margin-top: var(--spacing-2);
62
- }
63
- .smart-surfaces-shadow-card {
64
- padding: var(--spacing-6);
65
- border-radius: var(--radius-md);
66
- text-align: center;
67
- }
68
- .smart-surfaces-shadow-label {
69
- display: block;
70
- margin-top: var(--spacing-2);
71
- }
72
- .smart-surfaces-shadow-token {
73
- margin: var(--spacing-1) 0 0 0;
74
- opacity: 0.7;
75
- }
76
- .smart-surfaces-nested {
77
- padding: var(--spacing-6);
78
- border-radius: var(--radius-md);
79
- }
80
- .smart-surfaces-nested-inner {
81
- padding: var(--spacing-6);
82
- margin-top: var(--spacing-4);
83
- border-radius: var(--radius-md);
84
- }
85
- .smart-surfaces-nested-grid {
86
- display: grid;
87
- grid-template-columns: repeat(2, 1fr);
88
- gap: var(--spacing-4);
89
- margin-top: var(--spacing-4);
90
- }
91
- .smart-surfaces-card {
92
- padding: var(--spacing-4);
93
- }
94
- .smart-surfaces-sunken {
95
- padding: var(--spacing-4);
96
- margin-top: var(--spacing-3);
97
- border-radius: var(--radius-sm);
98
- }
99
- .smart-surfaces-inline {
100
- display: flex;
101
- align-items: center;
102
- gap: var(--spacing-2);
103
- }
104
- .smart-surfaces-border-card {
105
- padding: var(--spacing-6);
106
- }
107
- .smart-surfaces-border-code {
108
- font-size: var(--font-size-sm);
109
- opacity: 0.7;
110
- }
111
- </style>
112
- `;
113
-
114
- export const SurfaceVariants = () => html`
115
- ${smartSurfacesStoryStyles}
116
- <div class="smart-surfaces-section">
117
- <h2>Surface Variants</h2>
118
- <p class="smart-surfaces-subtitle">
119
- All surfaces automatically adjust text, icon, shadow, and border colors to maintain proper contrast.
120
- </p>
121
-
122
- <div class="smart-surfaces-grid--variants">
123
- <div class="surface-base smart-surfaces-surface">
124
- <strong class="surface-title smart-surfaces-title">
125
- <pds-icon icon="square"></pds-icon>
126
- Base Surface
127
- </strong>
128
- <p class="surface-description smart-surfaces-description">
129
- Default background with auto-adjusted text and icons
130
- </p>
131
- <button class="btn-primary smart-surfaces-button-spacing">
132
- Button
133
- </button>
134
- </div>
135
-
136
- <div class="surface-subtle smart-surfaces-surface">
137
- <strong class="surface-title smart-surfaces-title">
138
- <pds-icon icon="square"></pds-icon>
139
- Subtle Surface
140
- </strong>
141
- <p class="surface-description smart-surfaces-description">
142
- Slightly different tone for visual hierarchy
143
- </p>
144
- <button class="btn-secondary smart-surfaces-button-spacing">
145
- Button
146
- </button>
147
- </div>
148
-
149
- <div class="surface-elevated smart-surfaces-surface">
150
- <strong class="surface-title smart-surfaces-title">
151
- <pds-icon icon="arrow-up"></pds-icon>
152
- Elevated Surface
153
- </strong>
154
- <p class="surface-description smart-surfaces-description">
155
- Raised with smart shadows that adapt in dark mode
156
- </p>
157
- <button class="btn-primary smart-surfaces-button-spacing">
158
- Button
159
- </button>
160
- </div>
161
-
162
- <div class="surface-overlay smart-surfaces-surface">
163
- <strong class="surface-title smart-surfaces-title">
164
- <pds-icon icon="desktop"></pds-icon>
165
- Overlay Surface
166
- </strong>
167
- <p class="surface-description smart-surfaces-description">
168
- Modal/dropdown backgrounds with stronger shadows
169
- </p>
170
- <button class="btn-outline smart-surfaces-button-spacing">
171
- Button
172
- </button>
173
- </div>
174
- </div>
175
- </div>
176
- `;
177
-
178
- SurfaceVariants.storyName = 'Surface Variants';
179
-
180
- export const ContextAwareShadows = () => html`
181
- ${smartSurfacesStoryStyles}
182
- <div class="smart-surfaces-section">
183
- <h2>Context-Aware Shadows</h2>
184
- <p class="smart-surfaces-subtitle">
185
- Shadows automatically invert in dark mode: dark shadows on light surfaces, light shadows on dark surfaces.
186
- </p>
187
-
188
- <div class="smart-surfaces-grid--shadows">
189
- <div class="shadow-sm surface-elevated smart-surfaces-shadow-card">
190
- <pds-icon icon="feather" size="lg"></pds-icon>
191
- <strong class="smart-surfaces-shadow-label">Small</strong>
192
- <p class="smart-surfaces-shadow-token">--shadow-sm</p>
193
- </div>
194
-
195
- <div class="shadow-md surface-elevated smart-surfaces-shadow-card">
196
- <pds-icon icon="grid-four" size="lg"></pds-icon>
197
- <strong class="smart-surfaces-shadow-label">Medium</strong>
198
- <p class="smart-surfaces-shadow-token">--shadow-md</p>
199
- </div>
200
-
201
- <div class="shadow-lg surface-elevated smart-surfaces-shadow-card">
202
- <pds-icon icon="rocket" size="lg"></pds-icon>
203
- <strong class="smart-surfaces-shadow-label">Large</strong>
204
- <p class="smart-surfaces-shadow-token">--shadow-lg</p>
205
- </div>
206
- </div>
207
- </div>
208
- `;
209
-
210
- ContextAwareShadows.storyName = 'Context-Aware Shadows';
211
-
212
- export const NestedSurfaces = () => html`
213
- ${smartSurfacesStoryStyles}
214
- <div class="smart-surfaces-section">
215
- <h2>Nested Surfaces</h2>
216
- <p class="smart-surfaces-subtitle">
217
- Surfaces can be nested infinitely. Each level maintains proper contrast and visual hierarchy automatically.
218
- </p>
219
-
220
- <div class="surface-base smart-surfaces-nested">
221
- <h4 class="smart-surfaces-title">
222
- <pds-icon icon="circle"></pds-icon>
223
- Level 1: Base Surface
224
- </h4>
225
- <p>Notice how icons and text adapt at each nesting level to maintain readability.</p>
226
-
227
- <div class="surface-elevated smart-surfaces-nested-inner">
228
- <h5 class="smart-surfaces-title">
229
- <pds-icon icon="arrow-right"></pds-icon>
230
- Level 2: Elevated Surface
231
- </h5>
232
- <p>Shadows and text colors automatically adjust</p>
233
-
234
- <div class="smart-surfaces-nested-grid">
235
- <div class="card smart-surfaces-card">
236
- <h6 class="smart-surfaces-title">
237
- <pds-icon icon="check"></pds-icon>
238
- Level 3: Card
239
- </h6>
240
- <p>Perfect contrast maintained</p>
241
-
242
- <div class="surface-sunken smart-surfaces-sunken">
243
- <small class="smart-surfaces-inline">
244
- <pds-icon icon="info" size="sm"></pds-icon>
245
- Level 4: Sunken surface inside card
246
- </small>
247
- </div>
248
- </div>
249
-
250
- <div class="card smart-surfaces-card">
251
- <h6 class="smart-surfaces-title">
252
- <pds-icon icon="star"></pds-icon>
253
- Another Card
254
- </h6>
255
- <p>All elements adapt automatically</p>
256
- <button class="btn-primary btn-sm smart-surfaces-button-spacing-sm">
257
- <pds-icon icon="heart" size="sm"></pds-icon>
258
- Action
259
- </button>
260
- </div>
261
- </div>
262
- </div>
263
- </div>
264
- </div>
265
- `;
266
-
267
- NestedSurfaces.storyName = 'Nested Surfaces';
268
-
269
- export const SurfaceInversion = () => html`
270
- ${smartSurfacesStoryStyles}
271
- <div class="smart-surfaces-section">
272
- <h2>Surface Inversion</h2>
273
- <p class="smart-surfaces-subtitle">
274
- The smart surface system automatically inverts text and icon colors on contrasting backgrounds. Toggle dark mode to see the magic!
275
- </p>
276
-
277
- <div class="smart-surfaces-grid--inversion">
278
- <div class="surface-inverse smart-surfaces-surface">
279
- <h4 class="smart-surfaces-title">
280
- <pds-icon icon="moon"></pds-icon>
281
- Automatic Inversion
282
- </h4>
283
- <p>
284
- This inverted surface automatically uses contrasting text and icons for perfect readability
285
- </p>
286
- <button class="btn-primary smart-surfaces-button-spacing">
287
- Primary Button
288
- </button>
289
- </div>
290
-
291
- <div class="surface-overlay smart-surfaces-surface">
292
- <h4 class="smart-surfaces-title">
293
- <pds-icon icon="palette"></pds-icon>
294
- Overlay Surface
295
- </h4>
296
- <p>Text and icons auto-adapt to maintain WCAG AA contrast</p>
297
- <button class="btn-secondary smart-surfaces-button-spacing">
298
- Secondary Button
299
- </button>
300
- </div>
301
- </div>
302
- </div>
303
- `;
304
-
305
- SurfaceInversion.storyName = 'Surface Inversion';
306
-
307
- export const BorderGradients = () => html`
308
- ${smartSurfacesStoryStyles}
309
- <div class="smart-surfaces-section">
310
- <h2>Surface Border Effects</h2>
311
- <p class="smart-surfaces-subtitle">
312
- Advanced border gradient effects for standout surfaces. All gradients are animated and adapt to your theme.
313
- </p>
314
-
315
- <div class="smart-surfaces-grid--borders">
316
- <article class="card border-gradient smart-surfaces-border-card">
317
- <h3>Default Gradient</h3>
318
- <p>A card with a subtle animated border gradient that follows your color palette.</p>
319
- <code class="smart-surfaces-border-code">.border-gradient</code>
320
- </article>
321
-
322
- <article class="card border-gradient-primary smart-surfaces-border-card">
323
- <h3>Primary Gradient</h3>
324
- <p>Border gradient using the primary color scheme for brand emphasis.</p>
325
- <code class="smart-surfaces-border-code">.border-gradient-primary</code>
326
- </article>
327
-
328
- <article class="card border-gradient-accent smart-surfaces-border-card">
329
- <h3>Accent Gradient</h3>
330
- <p>Border gradient using the accent color for highlights and attention.</p>
331
- <code class="smart-surfaces-border-code">.border-gradient-accent</code>
332
- </article>
333
-
334
- <article class="card border-gradient-secondary smart-surfaces-border-card">
335
- <h3>Secondary Gradient</h3>
336
- <p>Border gradient using the secondary color palette for variety.</p>
337
- <code class="smart-surfaces-border-code">.border-gradient-secondary</code>
338
- </article>
339
-
340
- <article class="card border-gradient-soft smart-surfaces-border-card">
341
- <h3>Soft Gradient</h3>
342
- <p>A gentle, subdued border gradient for subtle visual interest.</p>
343
- <code class="smart-surfaces-border-code">.border-gradient-soft</code>
344
- </article>
345
-
346
- <article class="card border-gradient-medium smart-surfaces-border-card">
347
- <h3>Medium Gradient</h3>
348
- <p>A balanced border gradient with moderate intensity and presence.</p>
349
- <code class="smart-surfaces-border-code">.border-gradient-medium</code>
350
- </article>
351
-
352
- <article class="card border-gradient-strong smart-surfaces-border-card">
353
- <h3>Strong Gradient</h3>
354
- <p>A bold, vibrant border gradient for maximum visual impact.</p>
355
- <code class="smart-surfaces-border-code">.border-gradient-strong</code>
356
- </article>
357
-
358
- <article class="card border-gradient-glow smart-surfaces-border-card">
359
- <h3>Glowing Border</h3>
360
- <p>A card with a glowing border gradient effect for emphasis and visual interest.</p>
361
- <code class="smart-surfaces-border-code">.border-gradient-glow</code>
362
- </article>
363
- </div>
364
- </div>
365
- `;
366
-
367
- BorderGradients.storyName = 'Border Gradients';
1
+ import { html } from 'lit';
2
+
3
+ export default {
4
+ title: 'Foundations/Smart Surfaces',
5
+ tags: ['surface', 'background', 'theming', 'contrast', 'elevated'],
6
+ parameters: {
7
+ pds: {
8
+ tags: ['surface', 'background', 'theming', 'contrast', 'elevated', 'subtle', 'sunken', 'overlay', 'inverse', 'colors', 'layout']
9
+ },
10
+ docs: {
11
+ description: {
12
+ component: 'Smart surface system that automatically adapts text, icons, shadows, and borders based on backgrounds. Maintains WCAG AA contrast ratios automatically.'
13
+ }
14
+ }
15
+ }
16
+ };
17
+
18
+ const smartSurfacesStoryStyles = html`
19
+ <style>
20
+ .smart-surfaces-section {
21
+ padding: var(--spacing-4);
22
+ }
23
+ .smart-surfaces-subtitle {
24
+ margin-bottom: var(--spacing-6);
25
+ }
26
+ .smart-surfaces-grid--variants {
27
+ display: grid;
28
+ grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
29
+ gap: var(--spacing-4);
30
+ }
31
+ .smart-surfaces-grid--shadows {
32
+ display: grid;
33
+ grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
34
+ gap: var(--spacing-6);
35
+ }
36
+ .smart-surfaces-grid--inversion {
37
+ display: grid;
38
+ grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
39
+ gap: var(--spacing-4);
40
+ }
41
+ .smart-surfaces-grid--borders {
42
+ display: grid;
43
+ grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
44
+ gap: var(--spacing-6);
45
+ }
46
+ .smart-surfaces-surface {
47
+ padding: var(--spacing-6);
48
+ border-radius: var(--radius-md);
49
+ }
50
+ .smart-surfaces-title {
51
+ display: flex;
52
+ align-items: center;
53
+ gap: var(--spacing-2);
54
+ }
55
+ .smart-surfaces-description {
56
+ margin-top: var(--spacing-2);
57
+ }
58
+ .smart-surfaces-button-spacing {
59
+ margin-top: var(--spacing-3);
60
+ }
61
+ .smart-surfaces-button-spacing-sm {
62
+ margin-top: var(--spacing-2);
63
+ }
64
+ .smart-surfaces-shadow-card {
65
+ padding: var(--spacing-6);
66
+ border-radius: var(--radius-md);
67
+ text-align: center;
68
+ }
69
+ .smart-surfaces-shadow-label {
70
+ display: block;
71
+ margin-top: var(--spacing-2);
72
+ }
73
+ .smart-surfaces-shadow-token {
74
+ margin: var(--spacing-1) 0 0 0;
75
+ opacity: 0.7;
76
+ }
77
+ .smart-surfaces-nested {
78
+ padding: var(--spacing-6);
79
+ border-radius: var(--radius-md);
80
+ }
81
+ .smart-surfaces-nested-inner {
82
+ padding: var(--spacing-6);
83
+ margin-top: var(--spacing-4);
84
+ border-radius: var(--radius-md);
85
+ }
86
+ .smart-surfaces-nested-grid {
87
+ display: grid;
88
+ grid-template-columns: repeat(2, 1fr);
89
+ gap: var(--spacing-4);
90
+ margin-top: var(--spacing-4);
91
+ }
92
+ .smart-surfaces-card {
93
+ padding: var(--spacing-4);
94
+ }
95
+ .smart-surfaces-sunken {
96
+ padding: var(--spacing-4);
97
+ margin-top: var(--spacing-3);
98
+ border-radius: var(--radius-sm);
99
+ }
100
+ .smart-surfaces-inline {
101
+ display: flex;
102
+ align-items: center;
103
+ gap: var(--spacing-2);
104
+ }
105
+ .smart-surfaces-border-card {
106
+ padding: var(--spacing-6);
107
+ }
108
+ .smart-surfaces-border-code {
109
+ font-size: var(--font-size-sm);
110
+ opacity: 0.7;
111
+ }
112
+ </style>
113
+ `;
114
+
115
+ export const SurfaceVariants = () => html`
116
+ ${smartSurfacesStoryStyles}
117
+ <div class="smart-surfaces-section">
118
+ <h2>Surface Variants</h2>
119
+ <p class="smart-surfaces-subtitle">
120
+ All surfaces automatically adjust text, icon, shadow, and border colors to maintain proper contrast.
121
+ </p>
122
+
123
+ <div class="smart-surfaces-grid--variants">
124
+ <div class="surface-base smart-surfaces-surface">
125
+ <strong class="surface-title smart-surfaces-title">
126
+ <pds-icon icon="square"></pds-icon>
127
+ Base Surface
128
+ </strong>
129
+ <p class="surface-description smart-surfaces-description">
130
+ Default background with auto-adjusted text and icons
131
+ </p>
132
+ <button class="btn-primary smart-surfaces-button-spacing">
133
+ Button
134
+ </button>
135
+ </div>
136
+
137
+ <div class="surface-subtle smart-surfaces-surface">
138
+ <strong class="surface-title smart-surfaces-title">
139
+ <pds-icon icon="square"></pds-icon>
140
+ Subtle Surface
141
+ </strong>
142
+ <p class="surface-description smart-surfaces-description">
143
+ Slightly different tone for visual hierarchy
144
+ </p>
145
+ <button class="btn-secondary smart-surfaces-button-spacing">
146
+ Button
147
+ </button>
148
+ </div>
149
+
150
+ <div class="surface-elevated smart-surfaces-surface">
151
+ <strong class="surface-title smart-surfaces-title">
152
+ <pds-icon icon="arrow-up"></pds-icon>
153
+ Elevated Surface
154
+ </strong>
155
+ <p class="surface-description smart-surfaces-description">
156
+ Raised with smart shadows that adapt in dark mode
157
+ </p>
158
+ <button class="btn-primary smart-surfaces-button-spacing">
159
+ Button
160
+ </button>
161
+ </div>
162
+
163
+ <div class="surface-overlay smart-surfaces-surface">
164
+ <strong class="surface-title smart-surfaces-title">
165
+ <pds-icon icon="desktop"></pds-icon>
166
+ Overlay Surface
167
+ </strong>
168
+ <p class="surface-description smart-surfaces-description">
169
+ Modal/dropdown backgrounds with stronger shadows
170
+ </p>
171
+ <button class="btn-outline smart-surfaces-button-spacing">
172
+ Button
173
+ </button>
174
+ </div>
175
+ </div>
176
+ </div>
177
+ `;
178
+
179
+ SurfaceVariants.storyName = 'Surface Variants';
180
+
181
+ export const ContextAwareShadows = () => html`
182
+ ${smartSurfacesStoryStyles}
183
+ <div class="smart-surfaces-section">
184
+ <h2>Context-Aware Shadows</h2>
185
+ <p class="smart-surfaces-subtitle">
186
+ Shadows automatically invert in dark mode: dark shadows on light surfaces, light shadows on dark surfaces.
187
+ </p>
188
+
189
+ <div class="smart-surfaces-grid--shadows">
190
+ <div class="shadow-sm surface-elevated smart-surfaces-shadow-card">
191
+ <pds-icon icon="feather" size="lg"></pds-icon>
192
+ <strong class="smart-surfaces-shadow-label">Small</strong>
193
+ <p class="smart-surfaces-shadow-token">--shadow-sm</p>
194
+ </div>
195
+
196
+ <div class="shadow-md surface-elevated smart-surfaces-shadow-card">
197
+ <pds-icon icon="grid-four" size="lg"></pds-icon>
198
+ <strong class="smart-surfaces-shadow-label">Medium</strong>
199
+ <p class="smart-surfaces-shadow-token">--shadow-md</p>
200
+ </div>
201
+
202
+ <div class="shadow-lg surface-elevated smart-surfaces-shadow-card">
203
+ <pds-icon icon="rocket" size="lg"></pds-icon>
204
+ <strong class="smart-surfaces-shadow-label">Large</strong>
205
+ <p class="smart-surfaces-shadow-token">--shadow-lg</p>
206
+ </div>
207
+ </div>
208
+ </div>
209
+ `;
210
+
211
+ ContextAwareShadows.storyName = 'Context-Aware Shadows';
212
+
213
+ export const NestedSurfaces = () => html`
214
+ ${smartSurfacesStoryStyles}
215
+ <div class="smart-surfaces-section">
216
+ <h2>Nested Surfaces</h2>
217
+ <p class="smart-surfaces-subtitle">
218
+ Surfaces can be nested infinitely. Each level maintains proper contrast and visual hierarchy automatically.
219
+ </p>
220
+
221
+ <div class="surface-base smart-surfaces-nested">
222
+ <h4 class="smart-surfaces-title">
223
+ <pds-icon icon="circle"></pds-icon>
224
+ Level 1: Base Surface
225
+ </h4>
226
+ <p>Notice how icons and text adapt at each nesting level to maintain readability.</p>
227
+
228
+ <div class="surface-elevated smart-surfaces-nested-inner">
229
+ <h5 class="smart-surfaces-title">
230
+ <pds-icon icon="arrow-right"></pds-icon>
231
+ Level 2: Elevated Surface
232
+ </h5>
233
+ <p>Shadows and text colors automatically adjust</p>
234
+
235
+ <div class="smart-surfaces-nested-grid">
236
+ <div class="card smart-surfaces-card">
237
+ <h6 class="smart-surfaces-title">
238
+ <pds-icon icon="check"></pds-icon>
239
+ Level 3: Card
240
+ </h6>
241
+ <p>Perfect contrast maintained</p>
242
+
243
+ <div class="surface-sunken smart-surfaces-sunken">
244
+ <small class="smart-surfaces-inline">
245
+ <pds-icon icon="info" size="sm"></pds-icon>
246
+ Level 4: Sunken surface inside card
247
+ </small>
248
+ </div>
249
+ </div>
250
+
251
+ <div class="card smart-surfaces-card">
252
+ <h6 class="smart-surfaces-title">
253
+ <pds-icon icon="star"></pds-icon>
254
+ Another Card
255
+ </h6>
256
+ <p>All elements adapt automatically</p>
257
+ <button class="btn-primary btn-sm smart-surfaces-button-spacing-sm">
258
+ <pds-icon icon="heart" size="sm"></pds-icon>
259
+ Action
260
+ </button>
261
+ </div>
262
+ </div>
263
+ </div>
264
+ </div>
265
+ </div>
266
+ `;
267
+
268
+ NestedSurfaces.storyName = 'Nested Surfaces';
269
+
270
+ export const SurfaceInversion = () => html`
271
+ ${smartSurfacesStoryStyles}
272
+ <div class="smart-surfaces-section">
273
+ <h2>Surface Inversion</h2>
274
+ <p class="smart-surfaces-subtitle">
275
+ The smart surface system automatically inverts text and icon colors on contrasting backgrounds. Toggle dark mode to see the magic!
276
+ </p>
277
+
278
+ <div class="smart-surfaces-grid--inversion">
279
+ <div class="surface-inverse smart-surfaces-surface">
280
+ <h4 class="smart-surfaces-title">
281
+ <pds-icon icon="moon"></pds-icon>
282
+ Automatic Inversion
283
+ </h4>
284
+ <p>
285
+ This inverted surface automatically uses contrasting text and icons for perfect readability
286
+ </p>
287
+ <button class="btn-primary smart-surfaces-button-spacing">
288
+ Primary Button
289
+ </button>
290
+ </div>
291
+
292
+ <div class="surface-overlay smart-surfaces-surface">
293
+ <h4 class="smart-surfaces-title">
294
+ <pds-icon icon="palette"></pds-icon>
295
+ Overlay Surface
296
+ </h4>
297
+ <p>Text and icons auto-adapt to maintain WCAG AA contrast</p>
298
+ <button class="btn-secondary smart-surfaces-button-spacing">
299
+ Secondary Button
300
+ </button>
301
+ </div>
302
+ </div>
303
+ </div>
304
+ `;
305
+
306
+ SurfaceInversion.storyName = 'Surface Inversion';
307
+
308
+ export const BorderGradients = () => html`
309
+ ${smartSurfacesStoryStyles}
310
+ <div class="smart-surfaces-section">
311
+ <h2>Surface Border Effects</h2>
312
+ <p class="smart-surfaces-subtitle">
313
+ Advanced border gradient effects for standout surfaces. All gradients are animated and adapt to your theme.
314
+ </p>
315
+
316
+ <div class="smart-surfaces-grid--borders">
317
+ <article class="card border-gradient smart-surfaces-border-card">
318
+ <h3>Default Gradient</h3>
319
+ <p>A card with a subtle animated border gradient that follows your color palette.</p>
320
+ <code class="smart-surfaces-border-code">.border-gradient</code>
321
+ </article>
322
+
323
+ <article class="card border-gradient-primary smart-surfaces-border-card">
324
+ <h3>Primary Gradient</h3>
325
+ <p>Border gradient using the primary color scheme for brand emphasis.</p>
326
+ <code class="smart-surfaces-border-code">.border-gradient-primary</code>
327
+ </article>
328
+
329
+ <article class="card border-gradient-accent smart-surfaces-border-card">
330
+ <h3>Accent Gradient</h3>
331
+ <p>Border gradient using the accent color for highlights and attention.</p>
332
+ <code class="smart-surfaces-border-code">.border-gradient-accent</code>
333
+ </article>
334
+
335
+ <article class="card border-gradient-secondary smart-surfaces-border-card">
336
+ <h3>Secondary Gradient</h3>
337
+ <p>Border gradient using the secondary color palette for variety.</p>
338
+ <code class="smart-surfaces-border-code">.border-gradient-secondary</code>
339
+ </article>
340
+
341
+ <article class="card border-gradient-soft smart-surfaces-border-card">
342
+ <h3>Soft Gradient</h3>
343
+ <p>A gentle, subdued border gradient for subtle visual interest.</p>
344
+ <code class="smart-surfaces-border-code">.border-gradient-soft</code>
345
+ </article>
346
+
347
+ <article class="card border-gradient-medium smart-surfaces-border-card">
348
+ <h3>Medium Gradient</h3>
349
+ <p>A balanced border gradient with moderate intensity and presence.</p>
350
+ <code class="smart-surfaces-border-code">.border-gradient-medium</code>
351
+ </article>
352
+
353
+ <article class="card border-gradient-strong smart-surfaces-border-card">
354
+ <h3>Strong Gradient</h3>
355
+ <p>A bold, vibrant border gradient for maximum visual impact.</p>
356
+ <code class="smart-surfaces-border-code">.border-gradient-strong</code>
357
+ </article>
358
+
359
+ <article class="card border-gradient-glow smart-surfaces-border-card">
360
+ <h3>Glowing Border</h3>
361
+ <p>A card with a glowing border gradient effect for emphasis and visual interest.</p>
362
+ <code class="smart-surfaces-border-code">.border-gradient-glow</code>
363
+ </article>
364
+ </div>
365
+ </div>
366
+ `;
367
+
368
+ BorderGradients.storyName = 'Border Gradients';
369
+
370
+ export const TranslucentSurfaces = () => html`
371
+ ${smartSurfacesStoryStyles}
372
+ <div class="smart-surfaces-section">
373
+ <h2>Translucent Surfaces</h2>
374
+ <p class="smart-surfaces-subtitle">
375
+ Semi-transparent surfaces for glassmorphism effects and layered UI.
376
+ Works beautifully over images and gradients.
377
+ </p>
378
+
379
+ <div style="position: relative; padding: var(--spacing-8); border-radius: var(--radius-lg); overflow: hidden;">
380
+ <img
381
+ src="https://picsum.photos/1200/600?random=10"
382
+ alt="Background"
383
+ style="position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;"
384
+ />
385
+
386
+ <div class="grid grid-auto-md gap-lg" style="position: relative; z-index: 1;">
387
+ <article class="surface-translucent-25 smart-surfaces-surface" style="backdrop-filter: blur(10px);">
388
+ <h4>.surface-translucent-25</h4>
389
+ <p>25% opacity - very subtle, mostly transparent</p>
390
+ <code>--color-surface-translucent-25</code>
391
+ </article>
392
+
393
+ <article class="surface-translucent-50 smart-surfaces-surface" style="backdrop-filter: blur(10px);">
394
+ <h4>.surface-translucent-50</h4>
395
+ <p>50% opacity - balanced transparency</p>
396
+ <code>--color-surface-translucent-50</code>
397
+ </article>
398
+
399
+ <article class="surface-translucent-75 smart-surfaces-surface" style="backdrop-filter: blur(10px);">
400
+ <h4>.surface-translucent-75</h4>
401
+ <p>75% opacity - more solid, less see-through</p>
402
+ <code>--color-surface-translucent-75</code>
403
+ </article>
404
+
405
+ <article class="surface-translucent smart-surfaces-surface" style="backdrop-filter: blur(10px);">
406
+ <h4>.surface-translucent</h4>
407
+ <p>Default (50%) - alias for translucent-50</p>
408
+ <code>Shorthand class</code>
409
+ </article>
410
+ </div>
411
+ </div>
412
+ </div>
413
+ `;
414
+
415
+ TranslucentSurfaces.storyName = 'Translucent Surfaces';
416
+
417
+ export const SurfaceInverseExpanded = () => html`
418
+ ${smartSurfacesStoryStyles}
419
+ <div class="smart-surfaces-section">
420
+ <h2>Inverse Surface Deep Dive</h2>
421
+ <p class="smart-surfaces-subtitle">
422
+ The <code>.surface-inverse</code> class automatically inverts all text, icon, and border colors
423
+ for perfect contrast on dark backgrounds.
424
+ </p>
425
+
426
+ <div class="grid grid-auto-md gap-lg">
427
+ <article class="surface-inverse smart-surfaces-surface">
428
+ <h3 class="smart-surfaces-title">
429
+ <pds-icon icon="moon"></pds-icon>
430
+ Inverse Surface
431
+ </h3>
432
+ <p>All text automatically uses light colors for dark backgrounds.</p>
433
+ <p class="text-muted">Even muted text adapts correctly.</p>
434
+ <div class="flex gap-sm smart-surfaces-button-spacing">
435
+ <button class="btn-primary">Primary</button>
436
+ <button class="btn-secondary">Secondary</button>
437
+ </div>
438
+ </article>
439
+
440
+ <article class="surface-inverse smart-surfaces-surface">
441
+ <h4>Code on Inverse</h4>
442
+ <p>Inline <code>code elements</code> also adapt their background for visibility.</p>
443
+ <pre><code>// Code blocks work too
444
+ const example = "Hello!";</code></pre>
445
+ </article>
446
+
447
+ <article class="surface-inverse smart-surfaces-surface">
448
+ <h4>Icons on Inverse</h4>
449
+ <div class="flex gap-md flex-wrap">
450
+ <pds-icon icon="check" size="lg"></pds-icon>
451
+ <pds-icon icon="star" size="lg"></pds-icon>
452
+ <pds-icon icon="heart" size="lg"></pds-icon>
453
+ <pds-icon icon="settings" size="lg"></pds-icon>
454
+ <pds-icon icon="bell" size="lg"></pds-icon>
455
+ </div>
456
+ <p style="margin-top: var(--spacing-3);">Icons inherit the correct inverse color automatically.</p>
457
+ </article>
458
+
459
+ <article class="surface-inverse smart-surfaces-surface">
460
+ <h4>Form Elements</h4>
461
+ <label style="margin-bottom: var(--spacing-3);">
462
+ <span>Input Field</span>
463
+ <input type="text" placeholder="Type here..." />
464
+ </label>
465
+ <button class="btn-outline" style="border-color: currentColor;">Outline Button</button>
466
+ </article>
467
+ </div>
468
+
469
+ <div class="card" style="margin-top: var(--spacing-8);">
470
+ <h3>CSS Variables Set by .surface-inverse</h3>
471
+ <pre><code>.surface-inverse {
472
+ background-color: var(--color-surface-inverse);
473
+ color: var(--surface-inverse-text);
474
+ --color-text-primary: var(--surface-inverse-text);
475
+ --color-text-secondary: var(--surface-inverse-text-secondary);
476
+ --color-text-muted: var(--surface-inverse-text-muted);
477
+ --color-surface-muted: rgba(255, 255, 255, 0.08);
478
+ --color-border: var(--surface-inverse-border);
479
+ }</code></pre>
480
+ </div>
481
+ </div>
482
+ `;
483
+
484
+ SurfaceInverseExpanded.storyName = 'Inverse Surface Details';
485
+