@pure-ds/storybook 0.1.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 (129) hide show
  1. package/.storybook/addons/description/preview.js +15 -0
  2. package/.storybook/addons/description/register.js +60 -0
  3. package/.storybook/addons/html-preview/Panel.jsx +327 -0
  4. package/.storybook/addons/html-preview/constants.js +6 -0
  5. package/.storybook/addons/html-preview/preview.js +178 -0
  6. package/.storybook/addons/html-preview/register.js +16 -0
  7. package/.storybook/addons/pds-configurator/SearchTool.js +44 -0
  8. package/.storybook/addons/pds-configurator/Tool.js +30 -0
  9. package/.storybook/addons/pds-configurator/constants.js +9 -0
  10. package/.storybook/addons/pds-configurator/preview.js +159 -0
  11. package/.storybook/addons/pds-configurator/register.js +24 -0
  12. package/.storybook/docs.css +35 -0
  13. package/.storybook/htmlPreview.css +103 -0
  14. package/.storybook/htmlPreview.js +271 -0
  15. package/.storybook/main.js +160 -0
  16. package/.storybook/preview-body.html +48 -0
  17. package/.storybook/preview-head.html +11 -0
  18. package/.storybook/preview.js +1563 -0
  19. package/README.md +266 -0
  20. package/bin/index.js +40 -0
  21. package/dist/pds-reference.json +2101 -0
  22. package/package.json +45 -0
  23. package/pds.config.js +6 -0
  24. package/public/assets/css/app.css +1216 -0
  25. package/public/assets/data/auto-design-advanced.json +704 -0
  26. package/public/assets/data/auto-design-simple.json +123 -0
  27. package/public/assets/img/icon-512x512.png +0 -0
  28. package/public/assets/img/logo-trans.png +0 -0
  29. package/public/assets/img/logo.png +0 -0
  30. package/public/assets/js/app.js +15088 -0
  31. package/public/assets/js/app.js.map +7 -0
  32. package/public/assets/js/lit.js +1176 -0
  33. package/public/assets/js/lit.js.map +7 -0
  34. package/public/assets/js/pds.js +9801 -0
  35. package/public/assets/js/pds.js.map +7 -0
  36. package/public/assets/pds/components/pds-calendar.js +837 -0
  37. package/public/assets/pds/components/pds-drawer.js +857 -0
  38. package/public/assets/pds/components/pds-icon.js +338 -0
  39. package/public/assets/pds/components/pds-jsonform.js +1775 -0
  40. package/public/assets/pds/components/pds-richtext.js +1035 -0
  41. package/public/assets/pds/components/pds-scrollrow.js +331 -0
  42. package/public/assets/pds/components/pds-splitpanel.js +401 -0
  43. package/public/assets/pds/components/pds-tabstrip.js +251 -0
  44. package/public/assets/pds/components/pds-toaster.js +446 -0
  45. package/public/assets/pds/components/pds-upload.js +657 -0
  46. package/public/assets/pds/custom-elements.json +2003 -0
  47. package/public/assets/pds/icons/pds-icons.svg +498 -0
  48. package/public/assets/pds/pds-css-complete.json +1861 -0
  49. package/public/assets/pds/pds-runtime-config.json +11 -0
  50. package/public/assets/pds/pds.css-data.json +2152 -0
  51. package/public/assets/pds/styles/pds-components.css +1944 -0
  52. package/public/assets/pds/styles/pds-components.css.js +3895 -0
  53. package/public/assets/pds/styles/pds-primitives.css +352 -0
  54. package/public/assets/pds/styles/pds-primitives.css.js +711 -0
  55. package/public/assets/pds/styles/pds-styles.css +3761 -0
  56. package/public/assets/pds/styles/pds-styles.css.js +7529 -0
  57. package/public/assets/pds/styles/pds-tokens.css +699 -0
  58. package/public/assets/pds/styles/pds-tokens.css.js +1405 -0
  59. package/public/assets/pds/styles/pds-utilities.css +763 -0
  60. package/public/assets/pds/styles/pds-utilities.css.js +1533 -0
  61. package/public/assets/pds/vscode-custom-data.json +824 -0
  62. package/scripts/build-pds-reference.mjs +807 -0
  63. package/scripts/generate-stories.js +542 -0
  64. package/scripts/package-build.js +86 -0
  65. package/src/js/app.js +17 -0
  66. package/src/js/common/ask.js +208 -0
  67. package/src/js/common/common.js +20 -0
  68. package/src/js/common/font-loader.js +200 -0
  69. package/src/js/common/msg.js +90 -0
  70. package/src/js/lit.js +40 -0
  71. package/src/js/pds-core/pds-config.js +1162 -0
  72. package/src/js/pds-core/pds-enhancer-metadata.js +75 -0
  73. package/src/js/pds-core/pds-enhancers.js +357 -0
  74. package/src/js/pds-core/pds-enums.js +86 -0
  75. package/src/js/pds-core/pds-generator.js +5317 -0
  76. package/src/js/pds-core/pds-ontology.js +256 -0
  77. package/src/js/pds-core/pds-paths.js +109 -0
  78. package/src/js/pds-core/pds-query.js +571 -0
  79. package/src/js/pds-core/pds-registry.js +129 -0
  80. package/src/js/pds-core/pds.d.ts +129 -0
  81. package/src/js/pds.d.ts +408 -0
  82. package/src/js/pds.js +1579 -0
  83. package/src/pds-core/pds-api.js +105 -0
  84. package/stories/GettingStarted.md +96 -0
  85. package/stories/GettingStarted.stories.js +144 -0
  86. package/stories/WhatIsPDS.md +194 -0
  87. package/stories/WhatIsPDS.stories.js +144 -0
  88. package/stories/components/PdsCalendar.stories.js +263 -0
  89. package/stories/components/PdsDrawer.stories.js +623 -0
  90. package/stories/components/PdsIcon.stories.js +78 -0
  91. package/stories/components/PdsJsonform.stories.js +1444 -0
  92. package/stories/components/PdsRichtext.stories.js +367 -0
  93. package/stories/components/PdsScrollrow.stories.js +140 -0
  94. package/stories/components/PdsSplitpanel.stories.js +502 -0
  95. package/stories/components/PdsTabstrip.stories.js +442 -0
  96. package/stories/components/PdsToaster.stories.js +186 -0
  97. package/stories/components/PdsUpload.stories.js +66 -0
  98. package/stories/enhancements/Dropdowns.stories.js +185 -0
  99. package/stories/enhancements/InteractiveStates.stories.js +625 -0
  100. package/stories/enhancements/MeshGradients.stories.js +320 -0
  101. package/stories/enhancements/OpenGroups.stories.js +227 -0
  102. package/stories/enhancements/RangeSliders.stories.js +232 -0
  103. package/stories/enhancements/RequiredFields.stories.js +189 -0
  104. package/stories/enhancements/Toggles.stories.js +167 -0
  105. package/stories/foundations/Colors.stories.js +283 -0
  106. package/stories/foundations/Icons.stories.js +305 -0
  107. package/stories/foundations/SmartSurfaces.stories.js +367 -0
  108. package/stories/foundations/Spacing.stories.js +175 -0
  109. package/stories/foundations/Typography.stories.js +960 -0
  110. package/stories/foundations/ZIndex.stories.js +325 -0
  111. package/stories/patterns/BorderEffects.stories.js +72 -0
  112. package/stories/patterns/Layout.stories.js +99 -0
  113. package/stories/patterns/Utilities.stories.js +107 -0
  114. package/stories/primitives/Accordion.stories.js +359 -0
  115. package/stories/primitives/Alerts.stories.js +64 -0
  116. package/stories/primitives/Badges.stories.js +183 -0
  117. package/stories/primitives/Buttons.stories.js +229 -0
  118. package/stories/primitives/Cards.stories.js +353 -0
  119. package/stories/primitives/FormGroups.stories.js +569 -0
  120. package/stories/primitives/Forms.stories.js +131 -0
  121. package/stories/primitives/Media.stories.js +203 -0
  122. package/stories/primitives/Tables.stories.js +232 -0
  123. package/stories/reference/ReferenceCatalog.stories.js +28 -0
  124. package/stories/reference/reference-catalog.js +413 -0
  125. package/stories/reference/reference-docs.js +302 -0
  126. package/stories/reference/reference-helpers.js +310 -0
  127. package/stories/utilities/GridSystem.stories.js +208 -0
  128. package/stories/utils/PdsAsk.stories.js +420 -0
  129. package/stories/utils/toast-utils.js +148 -0
@@ -0,0 +1,960 @@
1
+ import { html } from 'lit';
2
+
3
+ const typographyStoryStyles = html`
4
+ <style>
5
+ .typography-heading-scale,
6
+ .typography-text-styles,
7
+ .typography-line-heights,
8
+ .typography-ui-components,
9
+ .typography-data-display,
10
+ .typography-text-selection {
11
+ padding: 2rem;
12
+ max-width: 1200px;
13
+ margin: 0 auto;
14
+ }
15
+
16
+ .typography-heading-scale__description {
17
+ margin-top: -0.5rem;
18
+ margin-bottom: 2rem;
19
+ }
20
+
21
+ .typography-heading-scale__description--compact {
22
+ margin-bottom: 1rem;
23
+ }
24
+
25
+ .typography-text-styles__section {
26
+ margin-bottom: 3rem;
27
+ }
28
+
29
+ .typography-text-styles__weights p {
30
+ margin: 0.5rem 0;
31
+ }
32
+
33
+ .typography-text-styles__weight--light {
34
+ font-weight: 300;
35
+ }
36
+
37
+ .typography-text-styles__weight--normal {
38
+ font-weight: 400;
39
+ }
40
+
41
+ .typography-text-styles__weight--medium {
42
+ font-weight: 500;
43
+ }
44
+
45
+ .typography-text-styles__weight--semibold {
46
+ font-weight: 600;
47
+ }
48
+
49
+ .typography-text-styles__weight--bold {
50
+ font-weight: 700;
51
+ }
52
+
53
+ .typography-text-styles__colors {
54
+ display: grid;
55
+ gap: 0.5rem;
56
+ }
57
+
58
+ .typography-text-styles__color--primary {
59
+ color: var(--color-primary);
60
+ }
61
+
62
+ .typography-text-styles__color--success {
63
+ color: var(--color-success);
64
+ }
65
+
66
+ .typography-text-styles__color--warning {
67
+ color: var(--color-warning);
68
+ }
69
+
70
+ .typography-text-styles__color--danger {
71
+ color: var(--color-danger);
72
+ }
73
+
74
+ .typography-line-heights__paragraph {
75
+ max-width: 60ch;
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
+ }
486
+ </style>
487
+ `;
488
+
489
+ export default {
490
+ title: 'Foundations/Typography',
491
+ parameters: {
492
+ docs: {
493
+ description: {
494
+ component: 'Typography system with scales, weights, line heights, and semantic text styles for building clear content hierarchy and readable interfaces.'
495
+ }
496
+ }
497
+ }
498
+ };
499
+
500
+ export const HeadingScale = {
501
+ name: 'Heading Scale',
502
+ render: () => html`
503
+ ${typographyStoryStyles}
504
+ <div class="typography-heading-scale">
505
+ <h1>Heading Level 1</h1>
506
+ <p class="typography-heading-scale__description">
507
+ Page title or hero heading - 2.5rem (40px) at default scale
508
+ </p>
509
+
510
+ <h2>Heading Level 2</h2>
511
+ <p class="typography-heading-scale__description">
512
+ Section heading - 2rem (32px) at default scale
513
+ </p>
514
+
515
+ <h3>Heading Level 3</h3>
516
+ <p class="typography-heading-scale__description">
517
+ Subsection heading - 1.5rem (24px) at default scale
518
+ </p>
519
+
520
+ <h4>Heading Level 4</h4>
521
+ <p class="typography-heading-scale__description">
522
+ Card or component heading - 1.25rem (20px) at default scale
523
+ </p>
524
+
525
+ <h5>Heading Level 5</h5>
526
+ <p class="typography-heading-scale__description">
527
+ Small heading - 1.125rem (18px) at default scale
528
+ </p>
529
+
530
+ <h6>Heading Level 6</h6>
531
+ <p class="typography-heading-scale__description typography-heading-scale__description--compact">
532
+ Smallest heading - 1rem (16px) at default scale
533
+ </p>
534
+ </div>
535
+ `
536
+ };
537
+
538
+ export const TextStyles = {
539
+ name: 'Text Styles & Weights',
540
+ render: () => html`
541
+ ${typographyStoryStyles}
542
+ <div class="typography-text-styles">
543
+ <h2>Font Weights</h2>
544
+ <div class="typography-text-styles__section typography-text-styles__weights">
545
+ <p class="typography-text-styles__weight typography-text-styles__weight--light">Light (300) - Subtle, delicate text</p>
546
+ <p class="typography-text-styles__weight typography-text-styles__weight--normal">Normal (400) - Default body text</p>
547
+ <p class="typography-text-styles__weight typography-text-styles__weight--medium">Medium (500) - Slightly emphasized</p>
548
+ <p class="typography-text-styles__weight typography-text-styles__weight--semibold">Semibold (600) - Strong emphasis</p>
549
+ <p class="typography-text-styles__weight typography-text-styles__weight--bold">Bold (700) - Heavy emphasis</p>
550
+ </div>
551
+
552
+ <h2>Text Decorations</h2>
553
+ <div class="typography-text-styles__section">
554
+ <p><strong>Bold text</strong> for important terms and emphasis</p>
555
+ <p><em>Italic text</em> for subtle emphasis and citations</p>
556
+ <p><u>Underlined text</u> - use sparingly, reserve for links</p>
557
+ <p><del>Strikethrough text</del> for deprecated or removed content</p>
558
+ <p><mark>Highlighted text</mark> for search results or important notes</p>
559
+ <p><code>Inline code</code> for technical terms and commands</p>
560
+ <p><small>Small text</small> for fine print and disclaimers</p>
561
+ </div>
562
+
563
+ <h2>Semantic Text Colors</h2>
564
+ <div class="typography-text-styles__colors">
565
+ <p>Normal text - default color for body content</p>
566
+ <p class="text-muted">Muted text - secondary information, captions, timestamps</p>
567
+ <p class="typography-text-styles__color typography-text-styles__color--primary">Primary colored text - brand accent, links</p>
568
+ <p class="typography-text-styles__color typography-text-styles__color--success">Success text - positive feedback, completed states</p>
569
+ <p class="typography-text-styles__color typography-text-styles__color--warning">Warning text - caution messages, pending states</p>
570
+ <p class="typography-text-styles__color typography-text-styles__color--danger">Danger text - errors, critical alerts, destructive actions</p>
571
+ </div>
572
+ </div>
573
+ `
574
+ };
575
+
576
+ export const LineHeights = {
577
+ name: 'Line Heights & Readability',
578
+ render: () => html`
579
+ ${typographyStoryStyles}
580
+ <div class="typography-line-heights">
581
+ <h2>Tight Line Height (1.2)</h2>
582
+ <p class="typography-line-heights__paragraph typography-line-heights__paragraph--tight">
583
+ Tight line height is best for headings and short text blocks where vertical space is limited.
584
+ This creates a compact, dense appearance that works well for titles, labels, and UI components
585
+ where readability of longer passages isn't a concern. Notice how the lines feel close together.
586
+ </p>
587
+
588
+ <h2>Normal Line Height (1.5)</h2>
589
+ <p class="typography-line-heights__paragraph typography-line-heights__paragraph--normal">
590
+ Normal line height provides a balanced reading experience for most body text. This is the default
591
+ for paragraphs and longer content blocks. It offers good readability without feeling too spacious
592
+ or too cramped. Most interfaces use this as the standard for general content.
593
+ </p>
594
+
595
+ <h2>Relaxed Line Height (1.8)</h2>
596
+ <p class="typography-line-heights__paragraph typography-line-heights__paragraph--relaxed">
597
+ Relaxed line height creates more breathing room between lines, improving readability for longer
598
+ articles and documentation. This is ideal for blog posts, help content, and any text that users
599
+ will spend extended time reading. The extra space reduces eye strain and makes it easier to
600
+ track lines across the page.
601
+ </p>
602
+
603
+ <div class="card typography-line-heights__card">
604
+ <h3>Pro Tip: Measure (Line Length)</h3>
605
+ <p>
606
+ The optimal line length for readability is 50-75 characters per line (roughly 60ch).
607
+ Lines that are too long make it difficult for readers to find the start of the next line.
608
+ Lines that are too short cause the eye to travel back and forth too often.
609
+ </p>
610
+ </div>
611
+ </div>
612
+ `
613
+ };
614
+
615
+ export const ArticleLayout = {
616
+ name: 'Article Layout',
617
+ render: () => html`
618
+ ${typographyStoryStyles}
619
+ <article class="typography-article">
620
+ <header class="typography-article__header">
621
+ <p class="text-muted typography-article__eyebrow">
622
+ Design Systems
623
+ </p>
624
+ <h1 class="typography-article__title">Building Scalable Design Systems for Modern Web Applications</h1>
625
+ <div class="typography-article__meta">
626
+ <span>By Sarah Chen</span>
627
+ <span>•</span>
628
+ <time>November 17, 2025</time>
629
+ <span>•</span>
630
+ <span>8 min read</span>
631
+ </div>
632
+ </header>
633
+
634
+ <div class="typography-article__content">
635
+ <p class="typography-article__intro">
636
+ A design system is more than a component library—it's a shared language that bridges design
637
+ and development, ensuring consistency and quality across your entire product ecosystem.
638
+ </p>
639
+
640
+ <p>
641
+ In today's fast-paced development environment, maintaining visual and functional consistency
642
+ across multiple products and teams is increasingly challenging. Design systems have emerged
643
+ as the solution, providing a single source of truth for design decisions, component patterns,
644
+ and implementation guidelines.
645
+ </p>
646
+
647
+ <h2 class="typography-article__section-heading">Key Components of a Design System</h2>
648
+
649
+ <p>
650
+ A comprehensive design system consists of several interconnected layers, each serving a
651
+ specific purpose in the overall architecture:
652
+ </p>
653
+
654
+ <ul class="typography-article__list">
655
+ <li class="typography-article__list-item">
656
+ <strong>Design Tokens:</strong> The foundational layer defining colors, typography, spacing, and other atomic values
657
+ </li>
658
+ <li class="typography-article__list-item">
659
+ <strong>Component Library:</strong> Reusable UI components built with consistent patterns
660
+ </li>
661
+ <li class="typography-article__list-item">
662
+ <strong>Documentation:</strong> Clear guidelines on when and how to use each component
663
+ </li>
664
+ <li class="typography-article__list-item">
665
+ <strong>Tools & Resources:</strong> Figma libraries, code templates, and development tools
666
+ </li>
667
+ </ul>
668
+
669
+ <blockquote class="typography-article__blockquote">
670
+ "A design system isn't a project. It's a product serving products."
671
+ <footer>
672
+ — Nathan Curtis, Design Systems Expert
673
+ </footer>
674
+ </blockquote>
675
+
676
+ <h3 class="typography-article__section-heading">Getting Started with Design Tokens</h3>
677
+
678
+ <p>
679
+ Design tokens are the DNA of your design system. These named values represent design decisions
680
+ that can be shared across platforms and technologies. For example, instead of hardcoding
681
+ <code>#0066cc</code>, you define <code>--color-primary</code> which can be updated globally.
682
+ </p>
683
+
684
+ <div class="card typography-article__card">
685
+ <h4 class="typography-article__card-title">Implementation Example</h4>
686
+ <pre class="typography-article__code"><code>/* Design tokens in CSS */
687
+ :root {
688
+ --color-primary: #0066cc;
689
+ --spacing-unit: 4px;
690
+ --font-family-base: system-ui, sans-serif;
691
+ --border-radius-md: 8px;
692
+ }</code></pre>
693
+ </div>
694
+
695
+ <p>
696
+ By adopting this approach, you create a flexible foundation that can evolve with your
697
+ product needs while maintaining consistency across all touchpoints.
698
+ </p>
699
+ </div>
700
+
701
+ <footer class="typography-article__footer">
702
+ <div class="typography-article__tag-list">
703
+ <span class="typography-article__tag">
704
+ Design Systems
705
+ </span>
706
+ <span class="typography-article__tag">
707
+ Web Components
708
+ </span>
709
+ <span class="typography-article__tag">
710
+ CSS Architecture
711
+ </span>
712
+ </div>
713
+ </footer>
714
+ </article>
715
+ `
716
+ };
717
+
718
+ export const UIComponents = {
719
+ name: 'UI Component Text',
720
+ render: () => html`
721
+ ${typographyStoryStyles}
722
+ <div class="typography-ui-components">
723
+ <h2>Form Labels & Help Text</h2>
724
+ <div class="typography-ui-components__section">
725
+ <div class="card typography-ui-components__card">
726
+ <div class="typography-ui-components__field">
727
+ <label class="typography-ui-components__label">
728
+ Email Address
729
+ </label>
730
+ <label class="input-icon">
731
+ <pds-icon icon="envelope"></pds-icon>
732
+ <input type="email" placeholder="you@example.com">
733
+ </label>
734
+ <p class="text-muted typography-ui-components__help">
735
+ We'll never share your email with anyone else.
736
+ </p>
737
+ </div>
738
+
739
+ <div class="typography-ui-components__field">
740
+ <label>
741
+ Password
742
+
743
+ <div class="input-icon">
744
+ <pds-icon icon="lock"></pds-icon>
745
+ <input type="password" placeholder="••••••••">
746
+ </div>
747
+ </label>
748
+ <p>
749
+ Password must be at least 8 characters long.
750
+ </p>
751
+ </div>
752
+
753
+ <div>
754
+ <label data-toggle>
755
+ <input type="checkbox">
756
+ <span>Remember me for 30 days</span>
757
+ </label>
758
+ </div>
759
+ </div>
760
+ </div>
761
+
762
+ <h2>Notifications & Messages</h2>
763
+ <div class="flex flex-col gap-md">
764
+ <div class="card alert alert-success">
765
+ <b>Success</b>
766
+ <span>Your profile has been updated successfully.</span>
767
+ </div>
768
+
769
+ <div class="card alert alert-warning">
770
+ <b>Warning</b>
771
+ <span>Your subscription will expire in 3 days. Renew now to continue access.</span>
772
+ </div>
773
+
774
+ <div class="alert alert-danger card">
775
+ <b>Error</b>
776
+ <span>Unable to connect to the server. Please check your connection and try again.</span>
777
+ </div>
778
+
779
+ <div class="card alert alert-info">
780
+ <b>Information</b>
781
+ <span>New features available! Check out our latest updates in the changelog.</span>
782
+ </div>
783
+ </div>
784
+ </div>
785
+ `
786
+ };
787
+
788
+ export const DataDisplay = {
789
+ name: 'Data Display & Lists',
790
+ render: () => html`
791
+ ${typographyStoryStyles}
792
+ <div class="typography-data-display">
793
+ <h2>User List with Metadata</h2>
794
+ <div class="card typography-data-display__card">
795
+ ${[
796
+ { name: 'Alex Morgan', role: 'Product Designer', status: 'Active', lastSeen: '2 hours ago' },
797
+ { name: 'Jordan Lee', role: 'Senior Developer', status: 'Active', lastSeen: 'Just now' },
798
+ { name: 'Sam Taylor', role: 'UX Researcher', status: 'Away', lastSeen: '1 day ago' },
799
+ { name: 'Casey Chen', role: 'Engineering Manager', status: 'Offline', lastSeen: '3 days ago' }
800
+ ].map((user) => html`
801
+ <div class="typography-data-display__list-item">
802
+ <div class="typography-data-display__list-content">
803
+ <div>
804
+ <div class="typography-data-display__user-name">
805
+ ${user.name}
806
+ </div>
807
+ <div class="text-muted typography-data-display__user-role">
808
+ ${user.role}
809
+ </div>
810
+ </div>
811
+ <div class="typography-data-display__status">
812
+ <div
813
+ class="typography-data-display__status-badge ${user.status === 'Active' ? 'typography-data-display__status-badge--active' : ''} ${user.status === 'Away' ? 'typography-data-display__status-badge--away' : ''} ${user.status === 'Offline' ? 'typography-data-display__status-badge--offline' : ''}"
814
+ >
815
+ ${user.status}
816
+ </div>
817
+ <div class="text-muted typography-data-display__status-meta">
818
+ ${user.lastSeen}
819
+ </div>
820
+ </div>
821
+ </div>
822
+ </div>
823
+ `)}
824
+ </div>
825
+
826
+ <h2>Stats & Metrics</h2>
827
+ <div class="typography-data-display__stats">
828
+ <div class="card typography-data-display__stat-card">
829
+ <div class="text-muted typography-data-display__stat-label">
830
+ Total Revenue
831
+ </div>
832
+ <div class="typography-data-display__stat-value">
833
+ $127,543
834
+ </div>
835
+ <div class="typography-data-display__stat-trend typography-data-display__stat-trend--positive">
836
+ ↑ 12.5% from last month
837
+ </div>
838
+ </div>
839
+
840
+ <div class="card typography-data-display__stat-card">
841
+ <div class="text-muted typography-data-display__stat-label">
842
+ Active Users
843
+ </div>
844
+ <div class="typography-data-display__stat-value">
845
+ 8,432
846
+ </div>
847
+ <div class="typography-data-display__stat-trend typography-data-display__stat-trend--positive">
848
+ ↑ 5.2% from last month
849
+ </div>
850
+ </div>
851
+
852
+ <div class="card typography-data-display__stat-card">
853
+ <div class="text-muted typography-data-display__stat-label">
854
+ Conversion Rate
855
+ </div>
856
+ <div class="typography-data-display__stat-value">
857
+ 3.8%
858
+ </div>
859
+ <div class="typography-data-display__stat-trend typography-data-display__stat-trend--negative">
860
+ ↓ 0.3% from last month
861
+ </div>
862
+ </div>
863
+ </div>
864
+
865
+ <h2 class="typography-data-display__timeline-title">Activity Timeline</h2>
866
+ <div class="card typography-data-display__timeline-card">
867
+ ${[
868
+ { time: '2:34 PM', action: 'Project deployed to production', user: 'Jordan Lee' },
869
+ { time: '1:15 PM', action: 'Code review completed', user: 'Alex Morgan' },
870
+ { time: '11:23 AM', action: 'New pull request opened', user: 'Sam Taylor' },
871
+ { time: '9:45 AM', action: 'Design assets updated', user: 'Casey Chen' }
872
+ ].map((item) => html`
873
+ <div class="typography-data-display__timeline-entry">
874
+ <div class="text-muted typography-data-display__timeline-time">
875
+ ${item.time}
876
+ </div>
877
+ <div class="typography-data-display__timeline-content">
878
+ <div class="typography-data-display__timeline-action">
879
+ ${item.action}
880
+ </div>
881
+ <div class="text-muted typography-data-display__timeline-meta">
882
+ by ${item.user}
883
+ </div>
884
+ </div>
885
+ </div>
886
+ `)}
887
+ </div>
888
+ </div>
889
+ `
890
+ };
891
+
892
+ export const TextSelection = {
893
+ name: 'Text Selection & Interaction',
894
+ render: () => html`
895
+ ${typographyStoryStyles}
896
+ <div class="typography-text-selection">
897
+ <h2>Selectable Text Examples</h2>
898
+ <p class="text-muted typography-text-selection__intro">
899
+ Try selecting text in the examples below to see the selection styling.
900
+ </p>
901
+
902
+ <div class="card typography-text-selection__card">
903
+ <h3>Code Snippets</h3>
904
+ <p class="text-muted typography-text-selection__description">
905
+ Monospace text for code should be easily selectable and copyable:
906
+ </p>
907
+ <pre class="typography-text-selection__code"><code>npm install pure-design-system --save
908
+ pds configure --preset ocean-breeze
909
+ pds build --watch</code></pre>
910
+ </div>
911
+
912
+ <div class="card typography-text-selection__card">
913
+ <h3>API Keys & Tokens</h3>
914
+ <p class="text-muted typography-text-selection__description">
915
+ Long strings that users need to copy:
916
+ </p>
917
+ <div class="typography-text-selection__api-row">
918
+ <code class="typography-text-selection__api-code">
919
+ pds_example_api_key_1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7a8b9c0d1e2f3g4h5i6j7k8l9m0n1o2p
920
+ </code>
921
+ <button class="button-secondary typography-text-selection__api-button">Copy</button>
922
+ </div>
923
+ </div>
924
+
925
+ <div class="card typography-text-selection__card">
926
+ <h3>Text with Different States</h3>
927
+ <div class="typography-text-selection__grid">
928
+ <div>
929
+ <div class="typography-text-selection__subheading">Default Text</div>
930
+ <p>This is normal, selectable paragraph text. You can highlight and copy it naturally.</p>
931
+ </div>
932
+
933
+ <div>
934
+ <div class="typography-text-selection__subheading">Muted Text</div>
935
+ <p class="text-muted">This is muted text, often used for secondary information. It's still fully selectable.</p>
936
+ </div>
937
+
938
+ <div>
939
+ <div class="typography-text-selection__subheading">Non-Selectable Text (UI Labels)</div>
940
+ <p class="typography-text-selection__non-selectable">This text cannot be selected - useful for UI chrome and labels that shouldn't be copied.</p>
941
+ </div>
942
+
943
+ <div>
944
+ <div class="typography-text-selection__subheading">Pre-Selected Text</div>
945
+ <div class="input-icon">
946
+ <pds-icon icon="envelope"></pds-icon>
947
+ <input
948
+ type="text"
949
+ value="pre-selected@example.com"
950
+ readonly
951
+ onclick="this.select()"
952
+ >
953
+ </div>
954
+ <p class="text-muted"><small>Click to select all</small></p>
955
+ </div>
956
+ </div>
957
+ </div>
958
+ </div>
959
+ `
960
+ };