@pure-ds/storybook 0.3.19 → 0.4.0

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 (39) hide show
  1. package/.storybook/addons/pds-configurator/SearchTool.js +44 -44
  2. package/dist/pds-reference.json +65 -13
  3. package/package.json +50 -50
  4. package/stories/components/PdsCalendar.stories.js +266 -263
  5. package/stories/components/PdsDrawer.stories.js +2 -2
  6. package/stories/components/PdsIcon.stories.js +2 -2
  7. package/stories/components/PdsJsonform.stories.js +2 -2
  8. package/stories/components/PdsRichtext.stories.js +367 -367
  9. package/stories/components/PdsScrollrow.stories.js +140 -140
  10. package/stories/components/PdsSplitpanel.stories.js +502 -502
  11. package/stories/components/PdsTabstrip.stories.js +2 -2
  12. package/stories/components/PdsToaster.stories.js +186 -186
  13. package/stories/components/PdsUpload.stories.js +66 -66
  14. package/stories/enhancements/Dropdowns.stories.js +185 -185
  15. package/stories/enhancements/InteractiveStates.stories.js +625 -625
  16. package/stories/enhancements/MeshGradients.stories.js +321 -320
  17. package/stories/enhancements/OpenGroups.stories.js +227 -227
  18. package/stories/enhancements/RangeSliders.stories.js +232 -232
  19. package/stories/enhancements/RequiredFields.stories.js +189 -189
  20. package/stories/enhancements/Toggles.stories.js +167 -167
  21. package/stories/foundations/Colors.stories.js +2 -1
  22. package/stories/foundations/Icons.stories.js +4 -0
  23. package/stories/foundations/SmartSurfaces.stories.js +485 -367
  24. package/stories/foundations/Spacing.stories.js +5 -1
  25. package/stories/foundations/Typography.stories.js +4 -0
  26. package/stories/foundations/ZIndex.stories.js +329 -325
  27. package/stories/layout/LayoutOverview.stories.js +247 -0
  28. package/stories/layout/LayoutSystem.stories.js +852 -0
  29. package/stories/patterns/BorderEffects.stories.js +74 -72
  30. package/stories/primitives/Accordion.stories.js +5 -3
  31. package/stories/primitives/Alerts.stories.js +261 -46
  32. package/stories/primitives/Badges.stories.js +4 -0
  33. package/stories/primitives/Buttons.stories.js +2 -2
  34. package/stories/primitives/Cards.stories.js +98 -170
  35. package/stories/primitives/Media.stories.js +442 -203
  36. package/stories/primitives/Tables.stories.js +358 -232
  37. package/stories/utilities/Backdrop.stories.js +197 -0
  38. package/stories/patterns/Layout.stories.js +0 -99
  39. package/stories/utilities/GridSystem.stories.js +0 -208
@@ -15,161 +15,47 @@ export default {
15
15
  }
16
16
  };
17
17
 
18
+ // Minimal styles for demo-specific gradients only
18
19
  const cardsStoryStyles = html`
19
20
  <style>
20
- .cards-story-section {
21
- padding: var(--spacing-4);
22
- }
23
- .cards-basic-grid {
24
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
25
- }
26
- .cards-surface-grid {
27
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
28
- }
29
- .cards-helper {
30
- margin-bottom: var(--spacing-4);
31
- opacity: 0.8;
32
- }
33
- .cards-inline-actions {
34
- margin-top: var(--spacing-3);
35
- }
36
- .cards-nested-shell {
37
- max-width: 37.5rem;
38
- }
39
- .cards-nested-spacing {
40
- margin-top: var(--spacing-4);
41
- }
42
- .cards-nested-deep {
43
- margin-top: var(--spacing-3);
44
- }
45
- .cards-parent-action {
46
- margin-top: var(--spacing-4);
47
- }
48
- .cards-horizontal-card {
49
- max-width: 37.5rem;
50
- margin-bottom: var(--spacing-6);
51
- }
52
- .cards-horizontal-media {
53
- flex-shrink: 0;
54
- width: 7.5rem;
55
- height: 7.5rem;
56
- background: var(--color-primary);
57
- border-radius: var(--radius-md);
58
- }
59
- .cards-horizontal-icon {
60
- color: white;
61
- opacity: 0.6;
62
- }
63
- .cards-horizontal-body {
64
- flex: 1;
65
- }
66
- .cards-grid-visuals {
67
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
68
- }
69
- .cards-visual-block {
70
- height: 100px;
71
- border-radius: var(--radius-sm);
72
- margin-bottom: var(--spacing-3);
73
- }
74
21
  .cards-gradient-one {
75
- background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
22
+ background: linear-gradient(135deg, var(--color-primary-500), var(--color-secondary-500));
76
23
  }
77
24
  .cards-gradient-two {
78
- background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
25
+ background: linear-gradient(135deg, var(--color-secondary-500), var(--color-primary-500));
79
26
  }
80
27
  .cards-gradient-three {
81
- background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
82
- }
83
- .cards-small-copy {
84
- font-size: 0.9rem;
85
- }
86
- .cards-complex-grid {
87
- grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
88
- }
89
- .cards-profile-header {
90
- margin-bottom: var(--spacing-4);
91
- }
92
- .cards-profile-avatar {
93
- width: 48px;
94
- height: 48px;
95
- background: var(--color-primary);
96
- border-radius: 50%;
97
- }
98
- .cards-profile-avatar pds-icon {
99
- color: white;
100
- }
101
- .cards-profile-title {
102
- margin: 0;
103
- }
104
- .cards-profile-meta {
105
- margin: 0;
106
- font-size: 0.85rem;
107
- opacity: 0.7;
108
- }
109
- .cards-profile-actions {
110
- margin-top: var(--spacing-4);
111
- }
112
- .cards-premium-header {
113
- margin-bottom: var(--spacing-3);
114
- }
115
- .cards-pro-badge {
116
- padding: var(--spacing-1) var(--spacing-2);
117
- background: var(--color-primary);
118
- color: white;
119
- border-radius: var(--radius-full);
120
- font-size: 0.75rem;
121
- font-weight: 600;
122
- }
123
- .cards-premium-list {
124
- margin: var(--spacing-3) 0;
125
- }
126
- .cards-stats-grid {
127
- margin: var(--spacing-4) 0;
128
- }
129
- .cards-stat-value {
130
- font-size: 2rem;
131
- font-weight: 700;
132
- }
133
- .cards-stat-value.primary {
134
- color: var(--color-primary);
135
- }
136
- .cards-stat-value.secondary {
137
- color: var(--color-secondary);
138
- }
139
- .cards-stat-label {
140
- font-size: 0.85rem;
141
- opacity: 0.7;
28
+ background: linear-gradient(135deg, var(--color-primary-500), var(--color-accent-500));
142
29
  }
143
30
  </style>
144
31
  `;
145
32
 
146
33
  export const BasicCards = () => html`
147
- ${cardsStoryStyles}
148
- <div class="cards-story-section">
34
+ <div class="card">
149
35
  <h3>Basic Cards</h3>
150
- <div class="grid gap-md cards-basic-grid">
151
- <article class="card">
36
+ <div class="grid grid-auto-md gap-md">
37
+ <article class="card card-basic">
152
38
  <h3>Default Card</h3>
153
39
  <p>Card content goes here. This is a basic card primitive with automatic theming.</p>
154
- <button class="btn-primary">Action</button>
40
+ <button>Action</button>
155
41
  </article>
156
42
 
157
43
  <article class="card">
158
44
  <h3>With Icon</h3>
159
- <div class="flex items-start gap-sm">
45
+ <div class="flex gap-sm justify-start">
160
46
  <pds-icon icon="star" size="lg" class="icon-primary"></pds-icon>
161
47
  <div>
162
- <p>Cards can contain icons, buttons, forms, and any other content.</p>
48
+ Cards can contain icons, buttons, forms, and any other content.
163
49
  </div>
164
50
  </div>
165
- <button class="btn-outline">Learn More</button>
51
+ <button class="btn-outline" style="margin-top: var(--spacing-3);">Learn More</button>
166
52
  </article>
167
53
 
168
- <article class="card">
54
+ <article class="card card-interactive">
169
55
  <h3>Interactive Card</h3>
170
56
  <p>With multiple actions and rich content.</p>
171
- <div class="flex gap-sm cards-inline-actions">
172
- <button class="btn-primary btn-sm">
57
+ <div class="flex gap-sm" style="margin-top: var(--spacing-3);">
58
+ <button class="btn-sm">
173
59
  <pds-icon icon="heart" size="sm"></pds-icon>
174
60
  Like
175
61
  </button>
@@ -189,14 +75,13 @@ export const BasicCards = () => html`
189
75
  BasicCards.storyName = 'Basic Cards';
190
76
 
191
77
  export const SurfaceVariants = () => html`
192
- ${cardsStoryStyles}
193
- <div class="cards-story-section">
78
+ <div class="card">
194
79
  <h3>Surface Variants</h3>
195
- <p class="cards-helper">
80
+ <p class="text-muted">
196
81
  Different surface levels create visual hierarchy
197
82
  </p>
198
83
 
199
- <div class="grid gap-md cards-surface-grid">
84
+ <div class="grid grid-auto-md gap-md">
200
85
  <article class="card">
201
86
  <h4>Default Surface</h4>
202
87
  <p>Standard card surface level. Use for most content containers.</p>
@@ -221,32 +106,31 @@ export const SurfaceVariants = () => html`
221
106
  SurfaceVariants.storyName = 'Surface Variants';
222
107
 
223
108
  export const NestedCards = () => html`
224
- ${cardsStoryStyles}
225
- <div class="cards-story-section">
109
+ <div class="card">
226
110
  <h3>Nested Cards</h3>
227
- <p class="cards-helper">
111
+ <p class="text-muted">
228
112
  Surface variants enable natural nesting without visual confusion
229
113
  </p>
230
114
 
231
- <article class="card cards-nested-shell">
115
+ <article class="card max-w-md">
232
116
  <h3>Parent Card (Default Surface)</h3>
233
117
  <p>This is the outer container using the default card surface.</p>
234
118
 
235
- <div class="cards-nested-spacing">
119
+ <div style="margin-top: var(--spacing-4);">
236
120
  <article class="card surface-elevated">
237
121
  <h4>Nested Card (Elevated)</h4>
238
122
  <p>This card is nested inside the parent and uses the elevated surface for clear visual separation.</p>
239
123
 
240
- <div class="cards-nested-deep">
124
+ <div style="margin-top: var(--spacing-3);">
241
125
  <article class="card surface-overlay">
242
126
  <h5>Deeply Nested (Overlay)</h5>
243
- <p class="cards-small-copy">Even deeper nesting maintains readability with the overlay surface.</p>
127
+ <p style="font-size: var(--font-size-sm);">Even deeper nesting maintains readability with the overlay surface.</p>
244
128
  </article>
245
129
  </div>
246
130
  </article>
247
131
  </div>
248
132
 
249
- <button class="btn-primary cards-parent-action">Parent Action</button>
133
+ <button style="margin-top: var(--spacing-4);">Parent Action</button>
250
134
  </article>
251
135
  </div>
252
136
  `;
@@ -255,13 +139,13 @@ NestedCards.storyName = 'Nested Cards';
255
139
 
256
140
  export const CardLayouts = () => html`
257
141
  ${cardsStoryStyles}
258
- <div class="cards-story-section">
142
+ <div class="card">
259
143
  <h3>Horizontal Card</h3>
260
- <article class="card flex gap-md cards-horizontal-card">
261
- <div class="flex items-center justify-center cards-horizontal-media">
262
- <pds-icon icon="image" size="xl" class="cards-horizontal-icon"></pds-icon>
144
+ <article class="card flex gap-md max-w-md" style="margin-bottom: var(--spacing-6);">
145
+ <div class="flex items-center justify-center" style="flex-shrink: 0; width: 7.5rem; height: 7.5rem; background: var(--color-primary-500); border-radius: var(--radius-md);">
146
+ <pds-icon icon="image" size="xl" style="opacity: 0.6;"></pds-icon>
263
147
  </div>
264
- <div class="cards-horizontal-body">
148
+ <div style="flex: 1;">
265
149
  <h4>Horizontal Layout</h4>
266
150
  <p>Cards work great with flexbox for horizontal layouts.</p>
267
151
  <button class="btn-outline btn-sm">View Details</button>
@@ -269,21 +153,21 @@ export const CardLayouts = () => html`
269
153
  </article>
270
154
 
271
155
  <h3>Card Grid</h3>
272
- <div class="grid gap-sm cards-grid-visuals">
156
+ <div class="grid grid-auto-sm gap-sm">
273
157
  <article class="card">
274
- <div class="cards-visual-block cards-gradient-one"></div>
158
+ <div class="cards-gradient-one" style="height: 100px; border-radius: var(--radius-sm); margin-bottom: var(--spacing-3);"></div>
275
159
  <h4>Card 1</h4>
276
- <p class="cards-small-copy">Grid layout with cards.</p>
160
+ <p style="font-size: var(--font-size-sm);">Grid layout with cards.</p>
277
161
  </article>
278
162
  <article class="card">
279
- <div class="cards-visual-block cards-gradient-two"></div>
163
+ <div class="cards-gradient-two" style="height: 100px; border-radius: var(--radius-sm); margin-bottom: var(--spacing-3);"></div>
280
164
  <h4>Card 2</h4>
281
- <p class="cards-small-copy">Responsive and flexible.</p>
165
+ <p style="font-size: var(--font-size-sm);">Responsive and flexible.</p>
282
166
  </article>
283
167
  <article class="card">
284
- <div class="cards-visual-block cards-gradient-three"></div>
168
+ <div class="cards-gradient-three" style="height: 100px; border-radius: var(--radius-sm); margin-bottom: var(--spacing-3);"></div>
285
169
  <h4>Card 3</h4>
286
- <p class="cards-small-copy">Auto-fits to space.</p>
170
+ <p style="font-size: var(--font-size-sm);">Auto-fits to space.</p>
287
171
  </article>
288
172
  </div>
289
173
  </div>
@@ -292,40 +176,39 @@ export const CardLayouts = () => html`
292
176
  CardLayouts.storyName = 'Card Layouts';
293
177
 
294
178
  export const ComplexCards = () => html`
295
- ${cardsStoryStyles}
296
- <div class="cards-story-section">
179
+ <div class="card">
297
180
  <h3>Complex Card Examples</h3>
298
- <div class="grid gap-md cards-complex-grid">
181
+ <div class="grid grid-auto-md gap-md">
299
182
 
300
183
  <article class="card">
301
- <div class="flex items-center gap-sm cards-profile-header">
302
- <div class="flex items-center justify-center cards-profile-avatar">
184
+ <div class="flex items-center gap-sm" style="margin-bottom: var(--spacing-4);">
185
+ <div class="flex items-center justify-center" style="width: 48px; height: 48px; background: var(--color-primary-500); border-radius: 50%;">
303
186
  <pds-icon icon="user"></pds-icon>
304
187
  </div>
305
188
  <div>
306
- <h4 class="cards-profile-title">User Profile</h4>
307
- <p class="cards-profile-meta">@username</p>
189
+ <h4 style="margin: 0;">User Profile</h4>
190
+ <p class="text-muted" style="margin: 0; font-size: var(--font-size-sm);">@username</p>
308
191
  </div>
309
192
  </div>
310
193
  <p>Profile description goes here with some interesting details about the user.</p>
311
- <div class="flex gap-sm cards-profile-actions">
312
- <button class="btn-primary btn-sm">Follow</button>
194
+ <div class="flex gap-sm" style="margin-top: var(--spacing-4);">
195
+ <button class="btn-sm">Follow</button>
313
196
  <button class="btn-outline btn-sm">Message</button>
314
197
  </div>
315
198
  </article>
316
199
 
317
200
  <article class="card surface-elevated">
318
- <div class="flex justify-between items-start cards-premium-header">
201
+ <div class="flex justify-between items-start" style="margin-bottom: var(--spacing-3);">
319
202
  <h4>Premium Feature</h4>
320
- <span class="cards-pro-badge">PRO</span>
203
+ <span class="badge badge-primary">PRO</span>
321
204
  </div>
322
205
  <p>This elevated card highlights a premium feature with a badge and special styling.</p>
323
- <ul class="cards-premium-list">
206
+ <ul style="margin: var(--spacing-3) 0;">
324
207
  <li>Feature benefit one</li>
325
208
  <li>Feature benefit two</li>
326
209
  <li>Feature benefit three</li>
327
210
  </ul>
328
- <button class="btn-primary">
211
+ <button>
329
212
  <pds-icon icon="star"></pds-icon>
330
213
  Upgrade Now
331
214
  </button>
@@ -333,14 +216,14 @@ export const ComplexCards = () => html`
333
216
 
334
217
  <article class="card">
335
218
  <h4>Stats Card</h4>
336
- <div class="grid grid-cols-2 gap-md cards-stats-grid">
219
+ <div class="grid grid-cols-2 gap-md" style="margin: var(--spacing-4) 0;">
337
220
  <div>
338
- <div class="cards-stat-value primary">1.2K</div>
339
- <div class="cards-stat-label">Followers</div>
221
+ <div style="font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); color: var(--color-primary-600);">1.2K</div>
222
+ <div class="text-muted" style="font-size: var(--font-size-sm);">Followers</div>
340
223
  </div>
341
224
  <div>
342
- <div class="cards-stat-value secondary">847</div>
343
- <div class="cards-stat-label">Following</div>
225
+ <div style="font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); color: var(--color-secondary-600);">847</div>
226
+ <div class="text-muted" style="font-size: var(--font-size-sm);">Following</div>
344
227
  </div>
345
228
  </div>
346
229
  <button class="btn-outline btn-sm">View All</button>
@@ -351,3 +234,48 @@ export const ComplexCards = () => html`
351
234
  `;
352
235
 
353
236
  ComplexCards.storyName = 'Complex Cards';
237
+
238
+ export const CardVariantsReference = () => html`
239
+ <div class="card">
240
+ <h2>Card Classes Reference</h2>
241
+ </div>
242
+
243
+ <table class="table-bordered">
244
+ <thead>
245
+ <tr>
246
+ <th>Class</th>
247
+ <th>Description</th>
248
+ </tr>
249
+ </thead>
250
+ <tbody>
251
+ <tr>
252
+ <td><code>.card</code></td>
253
+ <td>Base card with padding and border-radius</td>
254
+ </tr>
255
+ <tr>
256
+ <td><code>.card-basic</code> / <code>.card-outlined</code></td>
257
+ <td>Card with border, no elevation</td>
258
+ </tr>
259
+ <tr>
260
+ <td><code>.card-elevated</code></td>
261
+ <td>Card with shadow and elevated background</td>
262
+ </tr>
263
+ <tr>
264
+ <td><code>.card-interactive</code></td>
265
+ <td>Card with hover lift and shadow transition</td>
266
+ </tr>
267
+ </tbody>
268
+ </table>
269
+
270
+ <div class="card">
271
+ <h3>Combine with Surface Utilities</h3>
272
+ <p>Cards work with any surface utility:</p>
273
+ <ul>
274
+ <li><code>.card.surface-elevated</code> – elevated background with card styling</li>
275
+ <li><code>.card.surface-overlay</code> – overlay-level card</li>
276
+ <li><code>.card.surface-subtle</code> – subtle background card</li>
277
+ </ul>
278
+ </div>
279
+ `;
280
+
281
+ CardVariantsReference.storyName = 'Reference';