@pure-ds/storybook 0.4.15 → 0.4.17
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/html-preview/Panel.jsx +75 -23
- package/.storybook/addons/html-preview/preview.js +27 -1
- package/.storybook/docs.css +7 -0
- package/.storybook/htmlPreview.css +6 -6
- package/.storybook/htmlPreview.js +27 -1
- package/.storybook/manager-head.html +13 -0
- package/.storybook/preview-head.html +5 -0
- package/.storybook/preview.js +1 -1
- package/dist/pds-reference.json +2 -7
- package/package.json +2 -2
- package/public/assets/js/app.js +617 -10565
- package/public/assets/js/lit.js +3 -1048
- package/public/assets/js/pds.js +396 -7354
- package/public/assets/pds/components/pds-calendar.js +1 -1
- package/public/assets/pds/custom-elements.json +263 -18
- package/public/assets/pds/pds-runtime-config.json +1 -1
- package/public/assets/pds/styles/pds-components.css +83 -221
- package/public/assets/pds/styles/pds-components.css.js +166 -442
- package/public/assets/pds/styles/pds-styles.css +240 -437
- package/public/assets/pds/styles/pds-styles.css.js +479 -881
- package/public/assets/pds/styles/pds-utilities.css +151 -214
- package/public/assets/pds/styles/pds-utilities.css.js +302 -428
- package/src/js/pds-configurator/pds-demo.js +11 -1
- package/src/js/pds-core/pds-generator.js +88 -38
- package/src/js/pds-core/pds-ontology.js +1 -1
- package/stories/components/PdsCalendar.stories.js +2 -2
- package/stories/components/PdsDrawer.stories.js +15 -15
- package/stories/components/PdsJsonform.stories.js +78 -0
- package/stories/components/PdsRichtext.stories.js +4 -17
- package/stories/components/PdsScrollrow.stories.js +224 -72
- package/stories/components/PdsSplitpanel.stories.js +63 -28
- package/stories/components/PdsTabstrip.stories.js +7 -7
- package/stories/enhancements/Accordion.stories.js +2 -2
- package/stories/enhancements/Dropdowns.stories.js +13 -10
- package/stories/enhancements/RangeSliders.stories.js +9 -9
- package/stories/enhancements/RequiredFields.stories.js +8 -8
- package/stories/enhancements/Toggles.stories.js +45 -36
- package/stories/enhancements/_enhancement-header.js +2 -2
- package/stories/foundations/Colors.stories.js +13 -13
- package/stories/foundations/HTMLDefaults.stories.js +4 -4
- package/stories/foundations/Icons.stories.js +123 -288
- package/stories/foundations/MeshGradients.stories.js +161 -250
- package/stories/foundations/SmartSurfaces.stories.js +147 -64
- package/stories/foundations/Spacing.stories.js +30 -30
- package/stories/foundations/Typography.stories.js +352 -723
- package/stories/foundations/ZIndex.stories.js +124 -141
- package/stories/layout/LayoutOverview.stories.js +343 -250
- package/stories/layout/LayoutSystem.stories.js +60 -76
- package/stories/patterns/InteractiveStates.stories.js +29 -29
- package/stories/patterns/Utilities.stories.js +17 -5
- package/stories/primitives/Alerts.stories.js +6 -6
- package/stories/primitives/Cards.stories.js +22 -11
- package/stories/primitives/Forms.stories.js +17 -8
- package/stories/primitives/Media.stories.js +23 -20
- package/stories/utilities/Backdrop.stories.js +68 -27
- package/stories/utils/PdsAsk.stories.js +1 -1
- package/public/assets/js/app.js.map +0 -7
- package/public/assets/js/lit.js.map +0 -7
- package/public/assets/js/pds.js.map +0 -7
|
@@ -1,632 +1,233 @@
|
|
|
1
|
-
import { html } from
|
|
1
|
+
import { html } from "lit";
|
|
2
2
|
|
|
3
|
+
// Story-specific styles (not PDS classes - demo only)
|
|
3
4
|
const typographyStoryStyles = html`
|
|
4
5
|
<style>
|
|
5
|
-
|
|
6
|
-
.
|
|
7
|
-
.
|
|
8
|
-
.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
.
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.
|
|
75
|
-
|
|
76
|
-
margin-bottom: 2rem;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.typography-line-heights__paragraph--tight {
|
|
80
|
-
line-height: 1.2;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.typography-line-heights__paragraph--normal {
|
|
84
|
-
line-height: 1.5;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.typography-line-heights__paragraph--relaxed {
|
|
88
|
-
line-height: 1.8;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.typography-line-heights__card {
|
|
92
|
-
margin-top: 2rem;
|
|
93
|
-
padding: 1.5rem;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.typography-article {
|
|
97
|
-
padding: 2rem;
|
|
98
|
-
max-width: 800px;
|
|
99
|
-
margin: 0 auto;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.typography-article__header {
|
|
103
|
-
margin-bottom: 2rem;
|
|
104
|
-
padding-bottom: 2rem;
|
|
105
|
-
border-bottom: 1px solid var(--color-border-subtle);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.typography-article__eyebrow {
|
|
109
|
-
font-size: 0.875rem;
|
|
110
|
-
text-transform: uppercase;
|
|
111
|
-
letter-spacing: 0.05em;
|
|
112
|
-
margin-bottom: 0.5rem;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.typography-article__title {
|
|
116
|
-
margin-bottom: 1rem;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.typography-article__meta {
|
|
120
|
-
display: flex;
|
|
121
|
-
gap: 1rem;
|
|
122
|
-
align-items: center;
|
|
123
|
-
color: var(--color-text-subtle);
|
|
124
|
-
flex-wrap: wrap;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.typography-article__content {
|
|
128
|
-
line-height: 1.7;
|
|
129
|
-
font-size: 1.0625rem;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.typography-article__intro {
|
|
133
|
-
font-size: 1.25rem;
|
|
134
|
-
line-height: 1.6;
|
|
135
|
-
color: var(--color-text-subtle);
|
|
136
|
-
margin-bottom: 2rem;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.typography-article__section-heading {
|
|
140
|
-
margin-top: 2rem;
|
|
141
|
-
margin-bottom: 1rem;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.typography-article__list {
|
|
145
|
-
margin: 1.5rem 0;
|
|
146
|
-
padding-left: 1.5rem;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.typography-article__list-item {
|
|
150
|
-
margin-bottom: 0.75rem;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.typography-article__blockquote {
|
|
154
|
-
margin: 2rem 0;
|
|
155
|
-
padding-left: 1.5rem;
|
|
156
|
-
border-left: 4px solid var(--color-primary);
|
|
157
|
-
font-style: italic;
|
|
158
|
-
color: var(--color-text-subtle);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.typography-article__blockquote footer {
|
|
162
|
-
margin-top: 0.5rem;
|
|
163
|
-
font-style: normal;
|
|
164
|
-
font-size: 0.875rem;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.typography-article__card {
|
|
168
|
-
margin: 2rem 0;
|
|
169
|
-
padding: 1.5rem;
|
|
170
|
-
background: var(--color-surface-elevated);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.typography-article__card-title {
|
|
174
|
-
margin-bottom: 0.75rem;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.typography-article__code {
|
|
178
|
-
background: var(--color-surface);
|
|
179
|
-
padding: 1rem;
|
|
180
|
-
border-radius: 8px;
|
|
181
|
-
overflow-x: auto;
|
|
182
|
-
font-size: 0.875rem;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
.typography-article__footer {
|
|
186
|
-
margin-top: 3rem;
|
|
187
|
-
padding-top: 2rem;
|
|
188
|
-
border-top: 1px solid var(--color-border-subtle);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.typography-article__tag-list {
|
|
192
|
-
display: flex;
|
|
193
|
-
gap: 1rem;
|
|
194
|
-
flex-wrap: wrap;
|
|
195
|
-
font-size: 0.875rem;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.typography-article__tag {
|
|
199
|
-
padding: 0.25rem 0.75rem;
|
|
200
|
-
background: var(--color-surface-elevated);
|
|
201
|
-
border-radius: 16px;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
.typography-ui-components__section {
|
|
205
|
-
margin-bottom: 3rem;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.typography-ui-components__card {
|
|
209
|
-
padding: 2rem;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.typography-ui-components__field {
|
|
213
|
-
margin-bottom: 1.5rem;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.typography-ui-components__label {
|
|
217
|
-
display: block;
|
|
218
|
-
font-weight: 600;
|
|
219
|
-
margin-bottom: 0.5rem;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.typography-ui-components__input {
|
|
223
|
-
width: 100%;
|
|
224
|
-
padding: 0.75rem;
|
|
225
|
-
border: 1px solid var(--color-border);
|
|
226
|
-
border-radius: 8px;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.typography-ui-components__help {
|
|
230
|
-
font-size: 0.875rem;
|
|
231
|
-
margin-top: 0.5rem;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.typography-ui-components__error {
|
|
235
|
-
font-size: 0.875rem;
|
|
236
|
-
margin-top: 0.5rem;
|
|
237
|
-
color: var(--color-danger);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.typography-ui-components__checkbox {
|
|
241
|
-
display: flex;
|
|
242
|
-
align-items: center;
|
|
243
|
-
gap: 0.5rem;
|
|
244
|
-
cursor: pointer;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.typography-ui-components__notifications {
|
|
248
|
-
display: grid;
|
|
249
|
-
gap: 1rem;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.typography-ui-components__notification {
|
|
253
|
-
padding: 1rem;
|
|
254
|
-
border-left: 4px solid transparent;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.typography-ui-components__notification--success {
|
|
258
|
-
border-color: var(--color-success);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.typography-ui-components__notification--warning {
|
|
262
|
-
border-color: var(--color-warning);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.typography-ui-components__notification--danger {
|
|
266
|
-
border-color: var(--color-danger);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.typography-ui-components__notification--info {
|
|
270
|
-
border-color: var(--color-primary);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.typography-ui-components__notification-title {
|
|
274
|
-
font-weight: 600;
|
|
275
|
-
margin-bottom: 0.25rem;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.typography-ui-components__notification-text {
|
|
279
|
-
margin: 0;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
.typography-data-display__card {
|
|
283
|
-
margin-bottom: 3rem;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.typography-data-display__list-item {
|
|
287
|
-
padding: 1.25rem;
|
|
288
|
-
border-bottom: 1px solid var(--color-border-subtle);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.typography-data-display__list-item:last-child {
|
|
292
|
-
border-bottom: none;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.typography-data-display__list-content {
|
|
296
|
-
display: flex;
|
|
297
|
-
justify-content: space-between;
|
|
298
|
-
align-items: flex-start;
|
|
299
|
-
gap: 1rem;
|
|
300
|
-
margin-bottom: 0.5rem;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.typography-data-display__user-name {
|
|
304
|
-
font-weight: 600;
|
|
305
|
-
font-size: 1.0625rem;
|
|
306
|
-
margin-bottom: 0.25rem;
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.typography-data-display__user-role {
|
|
310
|
-
font-size: 0.875rem;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.typography-data-display__status {
|
|
314
|
-
text-align: right;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.typography-data-display__status-badge {
|
|
318
|
-
font-size: 0.75rem;
|
|
319
|
-
text-transform: uppercase;
|
|
320
|
-
letter-spacing: 0.05em;
|
|
321
|
-
padding: 0.25rem 0.5rem;
|
|
322
|
-
border-radius: 12px;
|
|
323
|
-
display: inline-block;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.typography-data-display__status-badge--active {
|
|
327
|
-
background: var(--color-success-bg);
|
|
328
|
-
color: var(--color-success);
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.typography-data-display__status-badge--away {
|
|
332
|
-
background: var(--color-warning-bg);
|
|
333
|
-
color: var(--color-warning);
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.typography-data-display__status-badge--offline {
|
|
337
|
-
background: var(--color-surface-elevated);
|
|
338
|
-
color: var(--color-text-subtle);
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
.typography-data-display__status-meta {
|
|
342
|
-
font-size: 0.8125rem;
|
|
343
|
-
margin-top: 0.25rem;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
.typography-data-display__stats {
|
|
347
|
-
display: grid;
|
|
348
|
-
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
349
|
-
gap: 1rem;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.typography-data-display__stat-card {
|
|
353
|
-
padding: 1.5rem;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
.typography-data-display__stat-label {
|
|
357
|
-
font-size: 0.875rem;
|
|
358
|
-
text-transform: uppercase;
|
|
359
|
-
letter-spacing: 0.05em;
|
|
360
|
-
margin-bottom: 0.5rem;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.typography-data-display__stat-value {
|
|
364
|
-
font-size: 2rem;
|
|
365
|
-
font-weight: 700;
|
|
366
|
-
margin-bottom: 0.25rem;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.typography-data-display__stat-trend {
|
|
370
|
-
font-size: 0.875rem;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
.typography-data-display__stat-trend--positive {
|
|
374
|
-
color: var(--color-success);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
.typography-data-display__stat-trend--negative {
|
|
378
|
-
color: var(--color-danger);
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.typography-data-display__timeline-title {
|
|
382
|
-
margin-top: 3rem;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.typography-data-display__timeline-card {
|
|
386
|
-
padding: 1.5rem;
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
.typography-data-display__timeline-entry {
|
|
390
|
-
display: flex;
|
|
391
|
-
gap: 1rem;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
.typography-data-display__timeline-entry + .typography-data-display__timeline-entry {
|
|
395
|
-
margin-top: 1.25rem;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
.typography-data-display__timeline-time {
|
|
399
|
-
font-size: 0.875rem;
|
|
400
|
-
min-width: 70px;
|
|
401
|
-
font-variant-numeric: tabular-nums;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.typography-data-display__timeline-content {
|
|
405
|
-
flex: 1;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.typography-data-display__timeline-action {
|
|
409
|
-
margin-bottom: 0.125rem;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
.typography-data-display__timeline-meta {
|
|
413
|
-
font-size: 0.875rem;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.typography-text-selection__intro {
|
|
417
|
-
margin-bottom: 2rem;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
.typography-text-selection__card {
|
|
421
|
-
padding: 2rem;
|
|
422
|
-
margin-bottom: 2rem;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
.typography-text-selection__description {
|
|
426
|
-
margin-bottom: 1rem;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.typography-text-selection__code {
|
|
430
|
-
background: var(--color-surface);
|
|
431
|
-
padding: 1rem;
|
|
432
|
-
border-radius: 8px;
|
|
433
|
-
overflow-x: auto;
|
|
434
|
-
font-family: var(--font-family-mono);
|
|
435
|
-
user-select: all;
|
|
436
|
-
cursor: text;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
.typography-text-selection__api-row {
|
|
440
|
-
display: flex;
|
|
441
|
-
align-items: center;
|
|
442
|
-
gap: 1rem;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.typography-text-selection__api-code {
|
|
446
|
-
flex: 1;
|
|
447
|
-
background: var(--color-surface);
|
|
448
|
-
padding: 0.75rem;
|
|
449
|
-
border-radius: 8px;
|
|
450
|
-
font-family: var(--font-family-mono);
|
|
451
|
-
user-select: all;
|
|
452
|
-
word-break: break-all;
|
|
453
|
-
text-overflow: ellipsis;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
.typography-text-selection__api-button {
|
|
457
|
-
white-space: nowrap;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
.typography-text-selection__grid {
|
|
461
|
-
display: grid;
|
|
462
|
-
gap: 1.5rem;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
.typography-text-selection__subheading {
|
|
466
|
-
font-weight: 600;
|
|
467
|
-
margin-bottom: 0.5rem;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
.typography-text-selection__non-selectable {
|
|
471
|
-
user-select: none;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
.typography-text-selection__input {
|
|
475
|
-
width: 100%;
|
|
476
|
-
padding: 0.75rem;
|
|
477
|
-
border: 1px solid var(--color-border);
|
|
478
|
-
border-radius: 8px;
|
|
479
|
-
font-family: var(--font-family-mono);
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
.typography-text-selection__note {
|
|
483
|
-
font-size: 0.875rem;
|
|
484
|
-
margin-top: 0.5rem;
|
|
485
|
-
}
|
|
6
|
+
/* Heading scale demo */
|
|
7
|
+
.story-heading-container { padding: var(--spacing-8); max-width: 1200px; margin: 0 auto; }
|
|
8
|
+
.story-heading-description { margin-top: calc(-1 * var(--spacing-2)); margin-bottom: var(--spacing-6); }
|
|
9
|
+
.story-heading-description-last { margin-top: calc(-1 * var(--spacing-2)); margin-bottom: var(--spacing-4); }
|
|
10
|
+
|
|
11
|
+
/* Font weight demo */
|
|
12
|
+
.story-font-light { font-weight: var(--font-weight-light); }
|
|
13
|
+
.story-font-normal { font-weight: var(--font-weight-normal); }
|
|
14
|
+
.story-font-medium { font-weight: var(--font-weight-medium); }
|
|
15
|
+
.story-font-semibold { font-weight: var(--font-weight-semibold); }
|
|
16
|
+
.story-font-bold { font-weight: var(--font-weight-bold); }
|
|
17
|
+
.story-weights-section { margin-bottom: var(--spacing-8); }
|
|
18
|
+
|
|
19
|
+
/* Line height demo */
|
|
20
|
+
.story-line-height-container { padding: var(--spacing-8); max-width: 64rem; margin: 0 auto; }
|
|
21
|
+
.story-leading-tight { line-height: var(--font-line-height-tight); }
|
|
22
|
+
.story-leading-normal { line-height: var(--font-line-height-normal); }
|
|
23
|
+
.story-leading-relaxed { line-height: var(--font-line-height-relaxed); }
|
|
24
|
+
.story-line-height-example { max-width: 40rem; margin-bottom: var(--spacing-6); }
|
|
25
|
+
.story-tip-card { margin-top: var(--spacing-6); }
|
|
26
|
+
|
|
27
|
+
/* Article layout demo */
|
|
28
|
+
.story-article-meta { font-size: var(--font-size-sm); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--spacing-2); }
|
|
29
|
+
.story-section-heading { margin-top: var(--spacing-8); margin-bottom: var(--spacing-4); }
|
|
30
|
+
.story-article-list { margin: var(--spacing-6) 0; padding-left: var(--spacing-6); }
|
|
31
|
+
.story-article-list li { margin-bottom: var(--spacing-3); }
|
|
32
|
+
.story-impl-heading { margin-bottom: var(--spacing-3); }
|
|
33
|
+
.story-code-block { padding: var(--spacing-4); border-radius: var(--radius-md); overflow-x: auto; font-size: var(--font-size-sm); }
|
|
34
|
+
|
|
35
|
+
/* UI components demo */
|
|
36
|
+
.story-form-wrapper { margin-bottom: var(--spacing-8); }
|
|
37
|
+
.story-form-card { padding: var(--spacing-8); }
|
|
38
|
+
.story-form-section { margin-bottom: var(--spacing-6); }
|
|
39
|
+
.story-form-label { display: block; font-weight: var(--font-weight-semibold); margin-bottom: var(--spacing-2); }
|
|
40
|
+
.story-help-text { font-size: var(--font-size-sm); margin-top: var(--spacing-2); }
|
|
41
|
+
|
|
42
|
+
/* Data display demo */
|
|
43
|
+
.story-user-list { margin-bottom: var(--spacing-8); }
|
|
44
|
+
.story-user-item { padding: var(--spacing-5); border-bottom: 1px solid var(--color-border); }
|
|
45
|
+
.story-user-item:last-child { border-bottom: none; }
|
|
46
|
+
.story-user-header { margin-bottom: var(--spacing-2); }
|
|
47
|
+
.story-user-name { font-weight: var(--font-weight-semibold); font-size: var(--font-size-base); margin-bottom: var(--spacing-1); }
|
|
48
|
+
.story-user-role { font-size: var(--font-size-sm); }
|
|
49
|
+
.story-user-meta { text-align: right; }
|
|
50
|
+
.story-user-lastseen { font-size: var(--font-size-xs); margin-top: var(--spacing-1); }
|
|
51
|
+
.story-stats-grid { display: grid; gap: var(--spacing-4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
|
|
52
|
+
.story-stat-card { padding: var(--spacing-6); }
|
|
53
|
+
.story-stat-label { font-size: var(--font-size-sm); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--spacing-2); }
|
|
54
|
+
.story-stat-value { font-size: var(--font-size-3xl); font-weight: var(--font-weight-bold); margin-bottom: var(--spacing-1); }
|
|
55
|
+
.story-stat-change { font-size: var(--font-size-sm); }
|
|
56
|
+
.story-stat-positive { color: var(--color-success-600); }
|
|
57
|
+
.story-stat-negative { color: var(--color-danger-600); }
|
|
58
|
+
.story-timeline-heading { margin-top: var(--spacing-8); }
|
|
59
|
+
.story-timeline-card { padding: var(--spacing-6); }
|
|
60
|
+
.story-timeline-item { display: flex; gap: var(--spacing-4); }
|
|
61
|
+
.story-timeline-time { min-width: 70px; font-size: var(--font-size-sm); font-variant-numeric: tabular-nums; }
|
|
62
|
+
.story-timeline-content { flex: 1; }
|
|
63
|
+
.story-timeline-action { margin-bottom: 2px; }
|
|
64
|
+
.story-timeline-user { font-size: var(--font-size-sm); }
|
|
65
|
+
|
|
66
|
+
/* Text selection demo */
|
|
67
|
+
.story-selection-intro { margin-bottom: var(--spacing-6); }
|
|
68
|
+
.story-selection-card { padding: var(--spacing-8); margin-bottom: var(--spacing-6); }
|
|
69
|
+
.story-selection-description { margin-bottom: var(--spacing-4); }
|
|
70
|
+
.story-code-pre { padding: var(--spacing-4); border-radius: var(--radius-md); overflow-x: auto; font-family: var(--font-family-mono); user-select: all; cursor: text; }
|
|
71
|
+
.story-api-key { flex: 1; padding: var(--spacing-3); border-radius: var(--radius-md); font-family: var(--font-family-mono); word-break: break-all; user-select: all; }
|
|
72
|
+
.story-copy-btn { white-space: nowrap; }
|
|
73
|
+
.story-text-state-grid { display: grid; gap: var(--spacing-6); }
|
|
74
|
+
.story-state-label { font-weight: var(--font-weight-semibold); margin-bottom: var(--spacing-2); }
|
|
75
|
+
.story-no-select { user-select: none; }
|
|
76
|
+
.story-select-hint { margin-top: var(--spacing-2); font-size: var(--font-size-sm); }
|
|
486
77
|
</style>
|
|
487
78
|
`;
|
|
488
79
|
|
|
489
80
|
export default {
|
|
490
|
-
title:
|
|
491
|
-
tags: [
|
|
81
|
+
title: "Foundations/Typography",
|
|
82
|
+
tags: ["typography", "font", "text", "heading", "body", "size", "weight"],
|
|
492
83
|
parameters: {
|
|
493
84
|
pds: {
|
|
494
|
-
tags: [
|
|
85
|
+
tags: [
|
|
86
|
+
"typography",
|
|
87
|
+
"font",
|
|
88
|
+
"text",
|
|
89
|
+
"heading",
|
|
90
|
+
"body",
|
|
91
|
+
"size",
|
|
92
|
+
"weight",
|
|
93
|
+
"family",
|
|
94
|
+
"tokens",
|
|
95
|
+
"scale",
|
|
96
|
+
],
|
|
495
97
|
},
|
|
496
98
|
docs: {
|
|
497
99
|
description: {
|
|
498
|
-
component:
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
100
|
+
component:
|
|
101
|
+
"Typography system with scales, weights, line heights, and semantic text styles for building clear content hierarchy and readable interfaces.",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
502
105
|
};
|
|
503
106
|
|
|
504
107
|
export const HeadingScale = {
|
|
505
|
-
name:
|
|
108
|
+
name: "Heading Scale",
|
|
506
109
|
render: () => html`
|
|
507
110
|
${typographyStoryStyles}
|
|
508
|
-
<div class="
|
|
111
|
+
<div class="stack-sm story-heading-container">
|
|
509
112
|
<h1>Heading Level 1</h1>
|
|
510
|
-
<p class="
|
|
113
|
+
<p class="text-muted story-heading-description">
|
|
511
114
|
Page title or hero heading - 2.5rem (40px) at default scale
|
|
512
115
|
</p>
|
|
513
116
|
|
|
514
117
|
<h2>Heading Level 2</h2>
|
|
515
|
-
<p class="
|
|
118
|
+
<p class="text-muted story-heading-description">
|
|
516
119
|
Section heading - 2rem (32px) at default scale
|
|
517
120
|
</p>
|
|
518
121
|
|
|
519
122
|
<h3>Heading Level 3</h3>
|
|
520
|
-
<p class="
|
|
123
|
+
<p class="text-muted story-heading-description">
|
|
521
124
|
Subsection heading - 1.5rem (24px) at default scale
|
|
522
125
|
</p>
|
|
523
126
|
|
|
524
127
|
<h4>Heading Level 4</h4>
|
|
525
|
-
<p class="
|
|
128
|
+
<p class="text-muted story-heading-description">
|
|
526
129
|
Card or component heading - 1.25rem (20px) at default scale
|
|
527
130
|
</p>
|
|
528
131
|
|
|
529
132
|
<h5>Heading Level 5</h5>
|
|
530
|
-
<p class="
|
|
133
|
+
<p class="text-muted story-heading-description">
|
|
531
134
|
Small heading - 1.125rem (18px) at default scale
|
|
532
135
|
</p>
|
|
533
136
|
|
|
534
137
|
<h6>Heading Level 6</h6>
|
|
535
|
-
<p class="
|
|
138
|
+
<p class="text-muted story-heading-description-last">
|
|
536
139
|
Smallest heading - 1rem (16px) at default scale
|
|
537
140
|
</p>
|
|
538
141
|
</div>
|
|
539
|
-
|
|
142
|
+
`,
|
|
540
143
|
};
|
|
541
144
|
|
|
542
145
|
export const TextStyles = {
|
|
543
|
-
name:
|
|
146
|
+
name: "Text Styles & Weights",
|
|
544
147
|
render: () => html`
|
|
545
148
|
${typographyStoryStyles}
|
|
546
|
-
<div class="
|
|
149
|
+
<div class="stack-sm">
|
|
547
150
|
<h2>Font Weights</h2>
|
|
548
|
-
<div class="
|
|
549
|
-
<p class="
|
|
550
|
-
<p class="
|
|
551
|
-
<p class="
|
|
552
|
-
<p class="
|
|
553
|
-
<p class="
|
|
151
|
+
<div class="stack-sm story-weights-section">
|
|
152
|
+
<p class="story-font-light">Light (300) - Subtle, delicate text</p>
|
|
153
|
+
<p class="story-font-normal">Normal (400) - Default body text</p>
|
|
154
|
+
<p class="story-font-medium">Medium (500) - Slightly emphasized</p>
|
|
155
|
+
<p class="story-font-semibold">Semibold (600) - Strong emphasis</p>
|
|
156
|
+
<p class="story-font-bold">Bold (700) - Heavy emphasis</p>
|
|
554
157
|
</div>
|
|
555
158
|
|
|
556
159
|
<h2>Text Decorations</h2>
|
|
557
|
-
<div class="
|
|
160
|
+
<div class="stack-sm">
|
|
558
161
|
<p><strong>Bold text</strong> for important terms and emphasis</p>
|
|
559
162
|
<p><em>Italic text</em> for subtle emphasis and citations</p>
|
|
560
163
|
<p><u>Underlined text</u> - use sparingly, reserve for links</p>
|
|
561
164
|
<p><del>Strikethrough text</del> for deprecated or removed content</p>
|
|
562
|
-
<p
|
|
165
|
+
<p>
|
|
166
|
+
<mark>Highlighted text</mark> for search results or important notes
|
|
167
|
+
</p>
|
|
563
168
|
<p><code>Inline code</code> for technical terms and commands</p>
|
|
564
169
|
<p><small>Small text</small> for fine print and disclaimers</p>
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
<div class="typography-text-styles__colors">
|
|
569
|
-
<p>Normal text - default color for body content</p>
|
|
570
|
-
<p class="text-muted">Muted text - secondary information, captions, timestamps</p>
|
|
571
|
-
<p class="typography-text-styles__color typography-text-styles__color--primary">Primary colored text - brand accent, links</p>
|
|
572
|
-
<p class="typography-text-styles__color typography-text-styles__color--success">Success text - positive feedback, completed states</p>
|
|
573
|
-
<p class="typography-text-styles__color typography-text-styles__color--warning">Warning text - caution messages, pending states</p>
|
|
574
|
-
<p class="typography-text-styles__color typography-text-styles__color--danger">Danger text - errors, critical alerts, destructive actions</p>
|
|
170
|
+
<p class="text-muted">
|
|
171
|
+
Muted text - secondary information, captions, timestamps
|
|
172
|
+
</p>
|
|
575
173
|
</div>
|
|
576
174
|
</div>
|
|
577
|
-
|
|
175
|
+
`,
|
|
578
176
|
};
|
|
579
177
|
|
|
580
178
|
export const LineHeights = {
|
|
581
|
-
name:
|
|
179
|
+
name: "Line Heights & Readability",
|
|
582
180
|
render: () => html`
|
|
583
181
|
${typographyStoryStyles}
|
|
584
|
-
<div class="
|
|
585
|
-
<h2>Tight Line Height (1.
|
|
586
|
-
<p class="
|
|
587
|
-
Tight line height is best for headings and short text blocks where
|
|
588
|
-
This creates a compact, dense appearance that
|
|
589
|
-
|
|
182
|
+
<div class="stack-lg story-line-height-container">
|
|
183
|
+
<h2>Tight Line Height (1.25)</h2>
|
|
184
|
+
<p class="story-leading-tight story-line-height-example">
|
|
185
|
+
Tight line height is best for headings and short text blocks where
|
|
186
|
+
vertical space is limited. This creates a compact, dense appearance that
|
|
187
|
+
works well for titles, labels, and UI components where readability of
|
|
188
|
+
longer passages isn't a concern. Notice how the lines feel close
|
|
189
|
+
together.
|
|
590
190
|
</p>
|
|
591
191
|
|
|
592
192
|
<h2>Normal Line Height (1.5)</h2>
|
|
593
|
-
<p class="
|
|
594
|
-
Normal line height provides a balanced reading experience for most body
|
|
595
|
-
for paragraphs and longer content blocks. It
|
|
596
|
-
|
|
193
|
+
<p class="story-leading-normal story-line-height-example">
|
|
194
|
+
Normal line height provides a balanced reading experience for most body
|
|
195
|
+
text. This is the default for paragraphs and longer content blocks. It
|
|
196
|
+
offers good readability without feeling too spacious or too cramped.
|
|
197
|
+
Most interfaces use this as the standard for general content.
|
|
597
198
|
</p>
|
|
598
199
|
|
|
599
|
-
<h2>Relaxed Line Height (1.
|
|
600
|
-
<p class="
|
|
601
|
-
Relaxed line height creates more breathing room between lines, improving
|
|
602
|
-
articles and documentation. This is ideal for
|
|
603
|
-
|
|
200
|
+
<h2>Relaxed Line Height (1.75)</h2>
|
|
201
|
+
<p class="story-leading-relaxed story-line-height-example">
|
|
202
|
+
Relaxed line height creates more breathing room between lines, improving
|
|
203
|
+
readability for longer articles and documentation. This is ideal for
|
|
204
|
+
blog posts, help content, and any text that users will spend extended
|
|
205
|
+
time reading. The extra space reduces eye strain and makes it easier to
|
|
604
206
|
track lines across the page.
|
|
605
207
|
</p>
|
|
606
208
|
|
|
607
|
-
<div class="card
|
|
209
|
+
<div class="card story-tip-card">
|
|
608
210
|
<h3>Pro Tip: Measure (Line Length)</h3>
|
|
609
211
|
<p>
|
|
610
|
-
The optimal line length for readability is 50-75 characters per line
|
|
611
|
-
Lines that are too long make it difficult for readers
|
|
612
|
-
|
|
212
|
+
The optimal line length for readability is 50-75 characters per line
|
|
213
|
+
(roughly 60ch). Lines that are too long make it difficult for readers
|
|
214
|
+
to find the start of the next line. Lines that are too short cause the
|
|
215
|
+
eye to travel back and forth too often.
|
|
613
216
|
</p>
|
|
614
217
|
</div>
|
|
615
218
|
</div>
|
|
616
|
-
|
|
219
|
+
`,
|
|
617
220
|
};
|
|
618
221
|
|
|
619
222
|
export const ArticleLayout = {
|
|
620
|
-
name:
|
|
223
|
+
name: "Article Layout",
|
|
621
224
|
render: () => html`
|
|
622
225
|
${typographyStoryStyles}
|
|
623
|
-
<article class="
|
|
624
|
-
<header
|
|
625
|
-
<p class="text-muted
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
<h1 class="typography-article__title">Building Scalable Design Systems for Modern Web Applications</h1>
|
|
629
|
-
<div class="typography-article__meta">
|
|
226
|
+
<article class="stack-md">
|
|
227
|
+
<header>
|
|
228
|
+
<p class="text-muted story-article-meta">Design Systems</p>
|
|
229
|
+
<h1>Building Scalable Design Systems for Modern Web Applications</h1>
|
|
230
|
+
<div class="flex gap-sm text-muted flex-wrap">
|
|
630
231
|
<span>By Sarah Chen</span>
|
|
631
232
|
<span>•</span>
|
|
632
233
|
<time>November 17, 2025</time>
|
|
@@ -635,128 +236,128 @@ export const ArticleLayout = {
|
|
|
635
236
|
</div>
|
|
636
237
|
</header>
|
|
637
238
|
|
|
638
|
-
<
|
|
639
|
-
<
|
|
640
|
-
A design system is more than a component library—it's a shared
|
|
641
|
-
and development, ensuring consistency and
|
|
642
|
-
|
|
239
|
+
<section>
|
|
240
|
+
<strong>
|
|
241
|
+
A design system is more than a component library—it's a shared
|
|
242
|
+
language that bridges design and development, ensuring consistency and
|
|
243
|
+
quality across your entire product ecosystem.
|
|
244
|
+
</strong>
|
|
643
245
|
|
|
644
246
|
<p>
|
|
645
|
-
In today's fast-paced development environment, maintaining visual and
|
|
646
|
-
across multiple products and teams is
|
|
647
|
-
|
|
648
|
-
|
|
247
|
+
In today's fast-paced development environment, maintaining visual and
|
|
248
|
+
functional consistency across multiple products and teams is
|
|
249
|
+
increasingly challenging. Design systems have emerged as the solution,
|
|
250
|
+
providing a single source of truth for design decisions, component
|
|
251
|
+
patterns, and implementation guidelines.
|
|
649
252
|
</p>
|
|
253
|
+
</section>
|
|
650
254
|
|
|
651
|
-
|
|
255
|
+
<section>
|
|
256
|
+
<h2 class="story-section-heading">Key Components of a Design System</h2>
|
|
652
257
|
|
|
653
258
|
<p>
|
|
654
|
-
A comprehensive design system consists of several interconnected
|
|
655
|
-
specific purpose in the overall architecture:
|
|
259
|
+
A comprehensive design system consists of several interconnected
|
|
260
|
+
layers, each serving a specific purpose in the overall architecture:
|
|
656
261
|
</p>
|
|
657
262
|
|
|
658
|
-
<ul class="
|
|
659
|
-
<li
|
|
660
|
-
<strong>Design Tokens:</strong> The foundational layer defining
|
|
263
|
+
<ul class="story-article-list">
|
|
264
|
+
<li>
|
|
265
|
+
<strong>Design Tokens:</strong> The foundational layer defining
|
|
266
|
+
colors, typography, spacing, and other atomic values
|
|
661
267
|
</li>
|
|
662
|
-
<li
|
|
663
|
-
<strong>Component Library:</strong> Reusable UI components built
|
|
268
|
+
<li>
|
|
269
|
+
<strong>Component Library:</strong> Reusable UI components built
|
|
270
|
+
with consistent patterns
|
|
664
271
|
</li>
|
|
665
|
-
<li
|
|
666
|
-
<strong>Documentation:</strong> Clear guidelines on when and how to
|
|
272
|
+
<li>
|
|
273
|
+
<strong>Documentation:</strong> Clear guidelines on when and how to
|
|
274
|
+
use each component
|
|
667
275
|
</li>
|
|
668
|
-
<li
|
|
669
|
-
<strong>Tools & Resources:</strong> Figma libraries, code templates,
|
|
276
|
+
<li>
|
|
277
|
+
<strong>Tools & Resources:</strong> Figma libraries, code templates,
|
|
278
|
+
and development tools
|
|
670
279
|
</li>
|
|
671
280
|
</ul>
|
|
672
281
|
|
|
673
|
-
<blockquote
|
|
674
|
-
|
|
675
|
-
<
|
|
676
|
-
— Nathan Curtis, Design Systems Expert
|
|
677
|
-
</footer>
|
|
282
|
+
<blockquote>
|
|
283
|
+
<p>A design system isn't a project. It's a product serving products.</p>
|
|
284
|
+
<cite>Nathan Curtis, Design Systems Expert</cite>
|
|
678
285
|
</blockquote>
|
|
286
|
+
</section>
|
|
679
287
|
|
|
680
|
-
|
|
288
|
+
<h3>Getting Started with Design Tokens</h3>
|
|
681
289
|
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
</
|
|
290
|
+
<p>
|
|
291
|
+
Design tokens are the DNA of your design system. These named values
|
|
292
|
+
represent design decisions that can be shared across platforms and
|
|
293
|
+
technologies. For example, instead of hardcoding
|
|
294
|
+
<code>#0066cc</code>, you define <code>--color-primary</code> which can
|
|
295
|
+
be updated globally.
|
|
296
|
+
</p>
|
|
687
297
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
298
|
+
<section>
|
|
299
|
+
<h4 class="story-impl-heading">Implementation Example</h4>
|
|
300
|
+
<pre class="surface-base story-code-block"><code>/* Design tokens in CSS */
|
|
691
301
|
:root {
|
|
692
302
|
--color-primary: #0066cc;
|
|
693
303
|
--spacing-unit: 4px;
|
|
694
304
|
--font-family-base: system-ui, sans-serif;
|
|
695
305
|
--border-radius-md: 8px;
|
|
696
306
|
}</code></pre>
|
|
697
|
-
</div>
|
|
698
307
|
|
|
699
308
|
<p>
|
|
700
|
-
By adopting this approach, you create a flexible foundation that can
|
|
701
|
-
product needs while maintaining consistency across
|
|
309
|
+
By adopting this approach, you create a flexible foundation that can
|
|
310
|
+
evolve with your product needs while maintaining consistency across
|
|
311
|
+
all touchpoints.
|
|
702
312
|
</p>
|
|
703
|
-
</
|
|
313
|
+
</section>
|
|
704
314
|
|
|
705
|
-
<footer
|
|
706
|
-
<div class="
|
|
707
|
-
<span class="
|
|
708
|
-
|
|
709
|
-
</span>
|
|
710
|
-
<span class="typography-article__tag">
|
|
711
|
-
Web Components
|
|
712
|
-
</span>
|
|
713
|
-
<span class="typography-article__tag">
|
|
714
|
-
CSS Architecture
|
|
715
|
-
</span>
|
|
315
|
+
<footer>
|
|
316
|
+
<div class="flex gap-md flex-wrap">
|
|
317
|
+
<span class="badge">Design Systems</span>
|
|
318
|
+
<span class="badge">Web Components</span>
|
|
319
|
+
<span class="badge">CSS Architecture</span>
|
|
716
320
|
</div>
|
|
717
321
|
</footer>
|
|
718
322
|
</article>
|
|
719
|
-
|
|
323
|
+
`,
|
|
720
324
|
};
|
|
721
325
|
|
|
722
326
|
export const UIComponents = {
|
|
723
|
-
name:
|
|
327
|
+
name: "UI Component Text",
|
|
724
328
|
render: () => html`
|
|
725
329
|
${typographyStoryStyles}
|
|
726
|
-
<div class="
|
|
330
|
+
<div class="stack-sm">
|
|
727
331
|
<h2>Form Labels & Help Text</h2>
|
|
728
|
-
<div class="
|
|
729
|
-
<div class="card
|
|
730
|
-
<div class="
|
|
731
|
-
<label class="
|
|
732
|
-
Email Address
|
|
733
|
-
</label>
|
|
332
|
+
<div class="story-form-wrapper">
|
|
333
|
+
<div class="card story-form-card">
|
|
334
|
+
<div class="story-form-section">
|
|
335
|
+
<label class="story-form-label">Email Address</label>
|
|
734
336
|
<label class="input-icon">
|
|
735
337
|
<pds-icon icon="envelope"></pds-icon>
|
|
736
|
-
<input type="email" placeholder="you@example.com"
|
|
338
|
+
<input type="email" placeholder="you@example.com" />
|
|
737
339
|
</label>
|
|
738
|
-
<p class="text-muted
|
|
340
|
+
<p class="text-muted story-help-text">
|
|
739
341
|
We'll never share your email with anyone else.
|
|
740
342
|
</p>
|
|
741
343
|
</div>
|
|
742
344
|
|
|
743
|
-
<div class="
|
|
345
|
+
<div class="story-form-section">
|
|
744
346
|
<label>
|
|
745
347
|
Password
|
|
746
|
-
|
|
747
348
|
<div class="input-icon">
|
|
748
349
|
<pds-icon icon="lock"></pds-icon>
|
|
749
|
-
<input type="password" placeholder="••••••••"
|
|
350
|
+
<input type="password" placeholder="••••••••" />
|
|
750
351
|
</div>
|
|
751
352
|
</label>
|
|
752
|
-
<p>
|
|
353
|
+
<p class="story-help-text">
|
|
753
354
|
Password must be at least 8 characters long.
|
|
754
355
|
</p>
|
|
755
356
|
</div>
|
|
756
357
|
|
|
757
358
|
<div>
|
|
758
359
|
<label data-toggle>
|
|
759
|
-
<input type="checkbox"
|
|
360
|
+
<input type="checkbox" />
|
|
760
361
|
<span>Remember me for 30 days</span>
|
|
761
362
|
</label>
|
|
762
363
|
</div>
|
|
@@ -764,188 +365,215 @@ export const UIComponents = {
|
|
|
764
365
|
</div>
|
|
765
366
|
|
|
766
367
|
<h2>Notifications & Messages</h2>
|
|
767
|
-
<div class="
|
|
768
|
-
<div class="
|
|
368
|
+
<div class="stack-md">
|
|
369
|
+
<div class="alert alert-success">
|
|
769
370
|
<b>Success</b>
|
|
770
371
|
<span>Your profile has been updated successfully.</span>
|
|
771
372
|
</div>
|
|
772
373
|
|
|
773
|
-
<div class="
|
|
374
|
+
<div class="alert alert-warning">
|
|
774
375
|
<b>Warning</b>
|
|
775
376
|
<span>Your subscription will expire in 3 days. Renew now to continue access.</span>
|
|
776
377
|
</div>
|
|
777
378
|
|
|
778
|
-
<div class="alert alert-danger
|
|
379
|
+
<div class="alert alert-danger">
|
|
779
380
|
<b>Error</b>
|
|
780
381
|
<span>Unable to connect to the server. Please check your connection and try again.</span>
|
|
781
382
|
</div>
|
|
782
383
|
|
|
783
|
-
<div class="
|
|
384
|
+
<div class="alert alert-info">
|
|
784
385
|
<b>Information</b>
|
|
785
386
|
<span>New features available! Check out our latest updates in the changelog.</span>
|
|
786
387
|
</div>
|
|
787
388
|
</div>
|
|
788
389
|
</div>
|
|
789
|
-
|
|
390
|
+
`,
|
|
790
391
|
};
|
|
791
392
|
|
|
792
393
|
export const DataDisplay = {
|
|
793
|
-
name:
|
|
394
|
+
name: "Data Display & Lists",
|
|
794
395
|
render: () => html`
|
|
795
396
|
${typographyStoryStyles}
|
|
796
|
-
<div class="
|
|
397
|
+
<div class="stack-sm">
|
|
797
398
|
<h2>User List with Metadata</h2>
|
|
798
|
-
<div class="card
|
|
399
|
+
<div class="card story-user-list">
|
|
799
400
|
${[
|
|
800
|
-
{
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
401
|
+
{
|
|
402
|
+
name: "Alex Morgan",
|
|
403
|
+
role: "Product Designer",
|
|
404
|
+
status: "Active",
|
|
405
|
+
lastSeen: "2 hours ago",
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
name: "Jordan Lee",
|
|
409
|
+
role: "Senior Developer",
|
|
410
|
+
status: "Active",
|
|
411
|
+
lastSeen: "Just now",
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
name: "Sam Taylor",
|
|
415
|
+
role: "UX Researcher",
|
|
416
|
+
status: "Away",
|
|
417
|
+
lastSeen: "1 day ago",
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
name: "Casey Chen",
|
|
421
|
+
role: "Engineering Manager",
|
|
422
|
+
status: "Offline",
|
|
423
|
+
lastSeen: "3 days ago",
|
|
424
|
+
},
|
|
425
|
+
].map(
|
|
426
|
+
(user) => html`
|
|
427
|
+
<div class="story-user-item">
|
|
428
|
+
<div class="flex justify-between items-start story-user-header">
|
|
429
|
+
<div>
|
|
430
|
+
<div class="story-user-name">${user.name}</div>
|
|
431
|
+
<div class="text-muted story-user-role">${user.role}</div>
|
|
810
432
|
</div>
|
|
811
|
-
<div class="
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
433
|
+
<div class="story-user-meta">
|
|
434
|
+
<span
|
|
435
|
+
class="badge ${user.status === "Active"
|
|
436
|
+
? "badge-success"
|
|
437
|
+
: ""} ${user.status === "Away"
|
|
438
|
+
? "badge-warning"
|
|
439
|
+
: ""} ${user.status === "Offline"
|
|
440
|
+
? "badge-secondary"
|
|
441
|
+
: ""}"
|
|
442
|
+
>
|
|
443
|
+
${user.status}
|
|
444
|
+
</span>
|
|
445
|
+
<div class="text-muted story-user-lastseen">${user.lastSeen}</div>
|
|
823
446
|
</div>
|
|
824
447
|
</div>
|
|
825
448
|
</div>
|
|
826
|
-
|
|
827
|
-
|
|
449
|
+
`
|
|
450
|
+
)}
|
|
828
451
|
</div>
|
|
829
452
|
|
|
830
453
|
<h2>Stats & Metrics</h2>
|
|
831
|
-
<div class="
|
|
832
|
-
<div class="card
|
|
833
|
-
<div class="text-muted
|
|
834
|
-
|
|
835
|
-
</div>
|
|
836
|
-
<div class="typography-data-display__stat-value">
|
|
837
|
-
$127,543
|
|
838
|
-
</div>
|
|
839
|
-
<div class="typography-data-display__stat-trend typography-data-display__stat-trend--positive">
|
|
840
|
-
↑ 12.5% from last month
|
|
841
|
-
</div>
|
|
454
|
+
<div class="story-stats-grid">
|
|
455
|
+
<div class="card story-stat-card">
|
|
456
|
+
<div class="text-muted story-stat-label">Total Revenue</div>
|
|
457
|
+
<div class="story-stat-value">$127,543</div>
|
|
458
|
+
<div class="story-stat-change story-stat-positive">↑ 12.5% from last month</div>
|
|
842
459
|
</div>
|
|
843
460
|
|
|
844
|
-
<div class="card
|
|
845
|
-
<div class="text-muted
|
|
846
|
-
|
|
847
|
-
</div>
|
|
848
|
-
<div class="typography-data-display__stat-value">
|
|
849
|
-
8,432
|
|
850
|
-
</div>
|
|
851
|
-
<div class="typography-data-display__stat-trend typography-data-display__stat-trend--positive">
|
|
852
|
-
↑ 5.2% from last month
|
|
853
|
-
</div>
|
|
461
|
+
<div class="card story-stat-card">
|
|
462
|
+
<div class="text-muted story-stat-label">Active Users</div>
|
|
463
|
+
<div class="story-stat-value">8,432</div>
|
|
464
|
+
<div class="story-stat-change story-stat-positive">↑ 5.2% from last month</div>
|
|
854
465
|
</div>
|
|
855
466
|
|
|
856
|
-
<div class="card
|
|
857
|
-
<div class="text-muted
|
|
858
|
-
|
|
859
|
-
</div>
|
|
860
|
-
<div class="typography-data-display__stat-value">
|
|
861
|
-
3.8%
|
|
862
|
-
</div>
|
|
863
|
-
<div class="typography-data-display__stat-trend typography-data-display__stat-trend--negative">
|
|
864
|
-
↓ 0.3% from last month
|
|
865
|
-
</div>
|
|
467
|
+
<div class="card story-stat-card">
|
|
468
|
+
<div class="text-muted story-stat-label">Conversion Rate</div>
|
|
469
|
+
<div class="story-stat-value">3.8%</div>
|
|
470
|
+
<div class="story-stat-change story-stat-negative">↓ 0.3% from last month</div>
|
|
866
471
|
</div>
|
|
867
472
|
</div>
|
|
868
473
|
|
|
869
|
-
<h2 class="
|
|
870
|
-
<div class="card
|
|
871
|
-
|
|
872
|
-
{
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
474
|
+
<h2 class="story-timeline-heading">Activity Timeline</h2>
|
|
475
|
+
<div class="card story-timeline-card">
|
|
476
|
+
<div class="stack-md">
|
|
477
|
+
${[
|
|
478
|
+
{
|
|
479
|
+
time: "2:34 PM",
|
|
480
|
+
action: "Project deployed to production",
|
|
481
|
+
user: "Jordan Lee",
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
time: "1:15 PM",
|
|
485
|
+
action: "Code review completed",
|
|
486
|
+
user: "Alex Morgan",
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
time: "11:23 AM",
|
|
490
|
+
action: "New pull request opened",
|
|
491
|
+
user: "Sam Taylor",
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
time: "9:45 AM",
|
|
495
|
+
action: "Design assets updated",
|
|
496
|
+
user: "Casey Chen",
|
|
497
|
+
},
|
|
498
|
+
].map(
|
|
499
|
+
(item) => html`
|
|
500
|
+
<div class="story-timeline-item">
|
|
501
|
+
<div class="text-muted story-timeline-time">${item.time}</div>
|
|
502
|
+
<div class="story-timeline-content">
|
|
503
|
+
<div class="story-timeline-action">${item.action}</div>
|
|
504
|
+
<div class="text-muted story-timeline-user">by ${item.user}</div>
|
|
505
|
+
</div>
|
|
887
506
|
</div>
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
507
|
+
`
|
|
508
|
+
)}
|
|
509
|
+
</div>
|
|
891
510
|
</div>
|
|
892
511
|
</div>
|
|
893
|
-
|
|
512
|
+
`,
|
|
894
513
|
};
|
|
895
514
|
|
|
896
515
|
export const TextSelection = {
|
|
897
|
-
name:
|
|
516
|
+
name: "Text Selection & Interaction",
|
|
898
517
|
render: () => html`
|
|
899
518
|
${typographyStoryStyles}
|
|
900
|
-
<div class="
|
|
519
|
+
<div class="stack-sm">
|
|
901
520
|
<h2>Selectable Text Examples</h2>
|
|
902
|
-
<p class="text-muted
|
|
521
|
+
<p class="text-muted story-selection-intro">
|
|
903
522
|
Try selecting text in the examples below to see the selection styling.
|
|
904
523
|
</p>
|
|
905
524
|
|
|
906
|
-
<div class="card
|
|
525
|
+
<div class="card story-selection-card">
|
|
907
526
|
<h3>Code Snippets</h3>
|
|
908
|
-
<p class="text-muted
|
|
527
|
+
<p class="text-muted story-selection-description">
|
|
909
528
|
Monospace text for code should be easily selectable and copyable:
|
|
910
529
|
</p>
|
|
911
|
-
<pre class="
|
|
530
|
+
<pre class="surface-base story-code-pre"><code>npm install pure-design-system --save
|
|
912
531
|
pds configure --preset ocean-breeze
|
|
913
532
|
pds build --watch</code></pre>
|
|
914
533
|
</div>
|
|
915
534
|
|
|
916
|
-
<div class="card
|
|
535
|
+
<div class="card story-selection-card">
|
|
917
536
|
<h3>API Keys & Tokens</h3>
|
|
918
|
-
<p class="text-muted
|
|
537
|
+
<p class="text-muted story-selection-description">
|
|
919
538
|
Long strings that users need to copy:
|
|
920
539
|
</p>
|
|
921
|
-
<div class="
|
|
922
|
-
<code class="
|
|
540
|
+
<div class="flex items-center gap-md">
|
|
541
|
+
<code class="surface-base story-api-key">
|
|
923
542
|
pds_example_api_key_1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7a8b9c0d1e2f3g4h5i6j7k8l9m0n1o2p
|
|
924
543
|
</code>
|
|
925
|
-
<button class="
|
|
544
|
+
<button class="btn-secondary story-copy-btn">Copy</button>
|
|
926
545
|
</div>
|
|
927
546
|
</div>
|
|
928
547
|
|
|
929
|
-
<div class="card
|
|
548
|
+
<div class="card story-selection-card">
|
|
930
549
|
<h3>Text with Different States</h3>
|
|
931
|
-
<div class="
|
|
550
|
+
<div class="story-text-state-grid">
|
|
932
551
|
<div>
|
|
933
|
-
<div class="
|
|
934
|
-
<p>
|
|
552
|
+
<div class="story-state-label">Default Text</div>
|
|
553
|
+
<p>
|
|
554
|
+
This is normal, selectable paragraph text. You can highlight and
|
|
555
|
+
copy it naturally.
|
|
556
|
+
</p>
|
|
935
557
|
</div>
|
|
936
558
|
|
|
937
559
|
<div>
|
|
938
|
-
<div class="
|
|
939
|
-
<p class="text-muted">
|
|
560
|
+
<div class="story-state-label">Muted Text</div>
|
|
561
|
+
<p class="text-muted">
|
|
562
|
+
This is muted text, often used for secondary information. It's
|
|
563
|
+
still fully selectable.
|
|
564
|
+
</p>
|
|
940
565
|
</div>
|
|
941
566
|
|
|
942
567
|
<div>
|
|
943
|
-
<div class="
|
|
944
|
-
<p class="
|
|
568
|
+
<div class="story-state-label">Non-Selectable Text (UI Labels)</div>
|
|
569
|
+
<p class="story-no-select">
|
|
570
|
+
This text cannot be selected - useful for UI chrome and labels
|
|
571
|
+
that shouldn't be copied.
|
|
572
|
+
</p>
|
|
945
573
|
</div>
|
|
946
574
|
|
|
947
575
|
<div>
|
|
948
|
-
<div class="
|
|
576
|
+
<div class="story-state-label">Pre-Selected Text</div>
|
|
949
577
|
<div class="input-icon">
|
|
950
578
|
<pds-icon icon="envelope"></pds-icon>
|
|
951
579
|
<input
|
|
@@ -953,12 +581,13 @@ pds build --watch</code></pre>
|
|
|
953
581
|
value="pre-selected@example.com"
|
|
954
582
|
readonly
|
|
955
583
|
onclick="this.select()"
|
|
956
|
-
|
|
584
|
+
/>
|
|
957
585
|
</div>
|
|
958
|
-
<p class="text-muted"
|
|
586
|
+
<p class="text-muted story-select-hint">Click to select all</p>
|
|
959
587
|
</div>
|
|
960
588
|
</div>
|
|
961
589
|
</div>
|
|
962
590
|
</div>
|
|
963
|
-
|
|
591
|
+
`,
|
|
964
592
|
};
|
|
593
|
+
|