@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.
- package/.storybook/addons/pds-configurator/SearchTool.js +44 -44
- package/dist/pds-reference.json +65 -13
- package/package.json +50 -50
- package/stories/components/PdsCalendar.stories.js +266 -263
- package/stories/components/PdsDrawer.stories.js +2 -2
- package/stories/components/PdsIcon.stories.js +2 -2
- package/stories/components/PdsJsonform.stories.js +2 -2
- package/stories/components/PdsRichtext.stories.js +367 -367
- package/stories/components/PdsScrollrow.stories.js +140 -140
- package/stories/components/PdsSplitpanel.stories.js +502 -502
- package/stories/components/PdsTabstrip.stories.js +2 -2
- package/stories/components/PdsToaster.stories.js +186 -186
- package/stories/components/PdsUpload.stories.js +66 -66
- package/stories/enhancements/Dropdowns.stories.js +185 -185
- package/stories/enhancements/InteractiveStates.stories.js +625 -625
- package/stories/enhancements/MeshGradients.stories.js +321 -320
- package/stories/enhancements/OpenGroups.stories.js +227 -227
- package/stories/enhancements/RangeSliders.stories.js +232 -232
- package/stories/enhancements/RequiredFields.stories.js +189 -189
- package/stories/enhancements/Toggles.stories.js +167 -167
- package/stories/foundations/Colors.stories.js +2 -1
- package/stories/foundations/Icons.stories.js +4 -0
- package/stories/foundations/SmartSurfaces.stories.js +485 -367
- package/stories/foundations/Spacing.stories.js +5 -1
- package/stories/foundations/Typography.stories.js +4 -0
- package/stories/foundations/ZIndex.stories.js +329 -325
- package/stories/layout/LayoutOverview.stories.js +247 -0
- package/stories/layout/LayoutSystem.stories.js +852 -0
- package/stories/patterns/BorderEffects.stories.js +74 -72
- package/stories/primitives/Accordion.stories.js +5 -3
- package/stories/primitives/Alerts.stories.js +261 -46
- package/stories/primitives/Badges.stories.js +4 -0
- package/stories/primitives/Buttons.stories.js +2 -2
- package/stories/primitives/Cards.stories.js +98 -170
- package/stories/primitives/Media.stories.js +442 -203
- package/stories/primitives/Tables.stories.js +358 -232
- package/stories/utilities/Backdrop.stories.js +197 -0
- package/stories/patterns/Layout.stories.js +0 -99
- 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
|
-
|
|
148
|
-
<div class="cards-story-section">
|
|
34
|
+
<div class="card">
|
|
149
35
|
<h3>Basic Cards</h3>
|
|
150
|
-
<div class="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
|
|
40
|
+
<button>Action</button>
|
|
155
41
|
</article>
|
|
156
42
|
|
|
157
43
|
<article class="card">
|
|
158
44
|
<h3>With Icon</h3>
|
|
159
|
-
<div class="flex
|
|
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
|
-
|
|
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
|
|
172
|
-
<button class="btn-
|
|
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
|
-
|
|
193
|
-
<div class="cards-story-section">
|
|
78
|
+
<div class="card">
|
|
194
79
|
<h3>Surface Variants</h3>
|
|
195
|
-
<p class="
|
|
80
|
+
<p class="text-muted">
|
|
196
81
|
Different surface levels create visual hierarchy
|
|
197
82
|
</p>
|
|
198
83
|
|
|
199
|
-
<div class="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
|
-
|
|
225
|
-
<div class="cards-story-section">
|
|
109
|
+
<div class="card">
|
|
226
110
|
<h3>Nested Cards</h3>
|
|
227
|
-
<p class="
|
|
111
|
+
<p class="text-muted">
|
|
228
112
|
Surface variants enable natural nesting without visual confusion
|
|
229
113
|
</p>
|
|
230
114
|
|
|
231
|
-
<article class="card
|
|
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
|
|
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
|
|
124
|
+
<div style="margin-top: var(--spacing-3);">
|
|
241
125
|
<article class="card surface-overlay">
|
|
242
126
|
<h5>Deeply Nested (Overlay)</h5>
|
|
243
|
-
<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
|
|
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="
|
|
142
|
+
<div class="card">
|
|
259
143
|
<h3>Horizontal Card</h3>
|
|
260
|
-
<article class="card flex gap-md
|
|
261
|
-
<div class="flex items-center justify-center
|
|
262
|
-
<pds-icon icon="image" size="xl"
|
|
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
|
|
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
|
|
156
|
+
<div class="grid grid-auto-sm gap-sm">
|
|
273
157
|
<article class="card">
|
|
274
|
-
<div class="cards-
|
|
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
|
|
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-
|
|
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
|
|
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-
|
|
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
|
|
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
|
-
|
|
296
|
-
<div class="cards-story-section">
|
|
179
|
+
<div class="card">
|
|
297
180
|
<h3>Complex Card Examples</h3>
|
|
298
|
-
<div class="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
|
|
302
|
-
<div class="flex items-center justify-center
|
|
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
|
|
307
|
-
<p class="
|
|
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
|
|
312
|
-
<button class="btn-
|
|
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
|
|
201
|
+
<div class="flex justify-between items-start" style="margin-bottom: var(--spacing-3);">
|
|
319
202
|
<h4>Premium Feature</h4>
|
|
320
|
-
<span class="
|
|
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
|
|
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
|
|
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
|
|
219
|
+
<div class="grid grid-cols-2 gap-md" style="margin: var(--spacing-4) 0;">
|
|
337
220
|
<div>
|
|
338
|
-
<div
|
|
339
|
-
<div class="
|
|
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
|
|
343
|
-
<div class="
|
|
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';
|