dynamic-ds 1.0.4 → 1.0.6

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.
@@ -0,0 +1,587 @@
1
+ // ============================================================================
2
+ // TYPOGRAPHY SYSTEM - Dynamic Design System
3
+ // ============================================================================
4
+ // Comprehensive typography utilities for consistent text styling
5
+ // ============================================================================
6
+
7
+ // ============================================================================
8
+ // 1. FONT FAMILY TOKENS
9
+ // ============================================================================
10
+ $font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
11
+ $font-family-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
12
+ $font-family-serif: Georgia, Cambria, 'Times New Roman', Times, serif;
13
+
14
+ :root {
15
+ --font-sans: #{$font-family-sans};
16
+ --font-mono: #{$font-family-mono};
17
+ --font-serif: #{$font-family-serif};
18
+ }
19
+
20
+ // ============================================================================
21
+ // 2. FONT SIZE SCALE (Based on 4px grid, rem units)
22
+ // ============================================================================
23
+ // Using modular scale with 1rem = 16px base
24
+ $font-size-2xs: 0.625rem; // 10px
25
+ $font-size-xs: 0.75rem; // 12px
26
+ $font-size-sm: 0.875rem; // 14px
27
+ $font-size-base: 1rem; // 16px
28
+ $font-size-lg: 1.125rem; // 18px
29
+ $font-size-xl: 1.25rem; // 20px
30
+ $font-size-2xl: 1.5rem; // 24px
31
+ $font-size-3xl: 1.875rem; // 30px
32
+ $font-size-4xl: 2.25rem; // 36px
33
+ $font-size-5xl: 3rem; // 48px
34
+ $font-size-6xl: 3.75rem; // 60px
35
+
36
+ $font-sizes-map: (
37
+ '2xs': $font-size-2xs,
38
+ 'xs': $font-size-xs,
39
+ 'sm': $font-size-sm,
40
+ 'base': $font-size-base,
41
+ 'lg': $font-size-lg,
42
+ 'xl': $font-size-xl,
43
+ '2xl': $font-size-2xl,
44
+ '3xl': $font-size-3xl,
45
+ '4xl': $font-size-4xl,
46
+ '5xl': $font-size-5xl,
47
+ '6xl': $font-size-6xl,
48
+ );
49
+
50
+ :root {
51
+ --text-2xs: #{$font-size-2xs};
52
+ --text-xs: #{$font-size-xs};
53
+ --text-sm: #{$font-size-sm};
54
+ --text-base: #{$font-size-base};
55
+ --text-lg: #{$font-size-lg};
56
+ --text-xl: #{$font-size-xl};
57
+ --text-2xl: #{$font-size-2xl};
58
+ --text-3xl: #{$font-size-3xl};
59
+ --text-4xl: #{$font-size-4xl};
60
+ --text-5xl: #{$font-size-5xl};
61
+ --text-6xl: #{$font-size-6xl};
62
+ }
63
+
64
+ // ============================================================================
65
+ // 3. FONT WEIGHT SCALE
66
+ // ============================================================================
67
+ $font-weight-thin: 100;
68
+ $font-weight-extralight: 200;
69
+ $font-weight-light: 300;
70
+ $font-weight-normal: 400;
71
+ $font-weight-medium: 500;
72
+ $font-weight-semibold: 600;
73
+ $font-weight-bold: 700;
74
+ $font-weight-extrabold: 800;
75
+ $font-weight-black: 900;
76
+
77
+ $font-weights: (
78
+ 'thin': $font-weight-thin,
79
+ 'extralight': $font-weight-extralight,
80
+ 'light': $font-weight-light,
81
+ 'normal': $font-weight-normal,
82
+ 'medium': $font-weight-medium,
83
+ 'semibold': $font-weight-semibold,
84
+ 'bold': $font-weight-bold,
85
+ 'extrabold': $font-weight-extrabold,
86
+ 'black': $font-weight-black,
87
+ );
88
+
89
+ :root {
90
+ --font-thin: #{$font-weight-thin};
91
+ --font-extralight: #{$font-weight-extralight};
92
+ --font-light: #{$font-weight-light};
93
+ --font-normal: #{$font-weight-normal};
94
+ --font-medium: #{$font-weight-medium};
95
+ --font-semibold: #{$font-weight-semibold};
96
+ --font-bold: #{$font-weight-bold};
97
+ --font-extrabold: #{$font-weight-extrabold};
98
+ --font-black: #{$font-weight-black};
99
+ }
100
+
101
+ // ============================================================================
102
+ // 4. LINE HEIGHT SCALE
103
+ // ============================================================================
104
+ $line-height-none: 1;
105
+ $line-height-tight: 1.25;
106
+ $line-height-snug: 1.375;
107
+ $line-height-normal: 1.5;
108
+ $line-height-relaxed: 1.625;
109
+ $line-height-loose: 2;
110
+
111
+ $line-heights: (
112
+ 'none': $line-height-none,
113
+ 'tight': $line-height-tight,
114
+ 'snug': $line-height-snug,
115
+ 'normal': $line-height-normal,
116
+ 'relaxed': $line-height-relaxed,
117
+ 'loose': $line-height-loose,
118
+ );
119
+
120
+ :root {
121
+ --leading-none: #{$line-height-none};
122
+ --leading-tight: #{$line-height-tight};
123
+ --leading-snug: #{$line-height-snug};
124
+ --leading-normal: #{$line-height-normal};
125
+ --leading-relaxed: #{$line-height-relaxed};
126
+ --leading-loose: #{$line-height-loose};
127
+ }
128
+
129
+ // ============================================================================
130
+ // 5. LETTER SPACING SCALE
131
+ // ============================================================================
132
+ $letter-spacing-tighter: -0.05em;
133
+ $letter-spacing-tight: -0.025em;
134
+ $letter-spacing-normal: 0;
135
+ $letter-spacing-wide: 0.025em;
136
+ $letter-spacing-wider: 0.05em;
137
+ $letter-spacing-widest: 0.1em;
138
+
139
+ $letter-spacings: (
140
+ 'tighter': $letter-spacing-tighter,
141
+ 'tight': $letter-spacing-tight,
142
+ 'normal': $letter-spacing-normal,
143
+ 'wide': $letter-spacing-wide,
144
+ 'wider': $letter-spacing-wider,
145
+ 'widest': $letter-spacing-widest,
146
+ );
147
+
148
+ :root {
149
+ --tracking-tighter: #{$letter-spacing-tighter};
150
+ --tracking-tight: #{$letter-spacing-tight};
151
+ --tracking-normal: #{$letter-spacing-normal};
152
+ --tracking-wide: #{$letter-spacing-wide};
153
+ --tracking-wider: #{$letter-spacing-wider};
154
+ --tracking-widest: #{$letter-spacing-widest};
155
+ }
156
+
157
+ // ============================================================================
158
+ // 6. HEADING PRESETS
159
+ // ============================================================================
160
+ // Semantic heading styles combining size, weight, and line-height
161
+
162
+ :root {
163
+ // Display headings (for hero sections, landing pages)
164
+ --heading-display-xl: #{$font-weight-bold} #{$font-size-6xl}/#{$line-height-tight} var(--font-sans);
165
+ --heading-display-lg: #{$font-weight-bold} #{$font-size-5xl}/#{$line-height-tight} var(--font-sans);
166
+ --heading-display-md: #{$font-weight-bold} #{$font-size-4xl}/#{$line-height-tight} var(--font-sans);
167
+
168
+ // Standard headings
169
+ --heading-h1: #{$font-weight-bold} #{$font-size-3xl}/#{$line-height-tight} var(--font-sans);
170
+ --heading-h2: #{$font-weight-semibold} #{$font-size-2xl}/#{$line-height-snug} var(--font-sans);
171
+ --heading-h3: #{$font-weight-semibold} #{$font-size-xl}/#{$line-height-snug} var(--font-sans);
172
+ --heading-h4: #{$font-weight-semibold} #{$font-size-lg}/#{$line-height-normal} var(--font-sans);
173
+ --heading-h5: #{$font-weight-medium} #{$font-size-base}/#{$line-height-normal} var(--font-sans);
174
+ --heading-h6: #{$font-weight-medium} #{$font-size-sm}/#{$line-height-normal} var(--font-sans);
175
+ }
176
+
177
+ // ============================================================================
178
+ // 7. BODY TEXT PRESETS
179
+ // ============================================================================
180
+ :root {
181
+ --body-lg: #{$font-weight-normal} #{$font-size-lg}/#{$line-height-relaxed} var(--font-sans);
182
+ --body-base: #{$font-weight-normal} #{$font-size-base}/#{$line-height-normal} var(--font-sans);
183
+ --body-sm: #{$font-weight-normal} #{$font-size-sm}/#{$line-height-normal} var(--font-sans);
184
+ --body-xs: #{$font-weight-normal} #{$font-size-xs}/#{$line-height-normal} var(--font-sans);
185
+ }
186
+
187
+ // ============================================================================
188
+ // 8. UTILITY TEXT PRESETS
189
+ // ============================================================================
190
+ :root {
191
+ // Labels
192
+ --label-lg: #{$font-weight-medium} #{$font-size-base}/#{$line-height-tight} var(--font-sans);
193
+ --label-base: #{$font-weight-medium} #{$font-size-sm}/#{$line-height-tight} var(--font-sans);
194
+ --label-sm: #{$font-weight-medium} #{$font-size-xs}/#{$line-height-tight} var(--font-sans);
195
+
196
+ // Captions
197
+ --caption: #{$font-weight-normal} #{$font-size-xs}/#{$line-height-normal} var(--font-sans);
198
+ --caption-strong: #{$font-weight-medium} #{$font-size-xs}/#{$line-height-normal} var(--font-sans);
199
+
200
+ // Overline (small caps style)
201
+ --overline: #{$font-weight-semibold} #{$font-size-2xs}/#{$line-height-normal} var(--font-sans);
202
+
203
+ // Code/Monospace
204
+ --code: #{$font-weight-normal} #{$font-size-sm}/#{$line-height-normal} var(--font-mono);
205
+ --code-sm: #{$font-weight-normal} #{$font-size-xs}/#{$line-height-normal} var(--font-mono);
206
+ }
207
+
208
+ // ============================================================================
209
+ // 9. FONT FAMILY UTILITY CLASSES
210
+ // ============================================================================
211
+ .font-sans { font-family: var(--font-sans) !important; }
212
+ .font-mono { font-family: var(--font-mono) !important; }
213
+ .font-serif { font-family: var(--font-serif) !important; }
214
+
215
+ // ============================================================================
216
+ // 10. FONT SIZE UTILITY CLASSES
217
+ // ============================================================================
218
+ @each $name, $size in $font-sizes-map {
219
+ .text-#{$name} {
220
+ font-size: $size !important;
221
+ }
222
+ }
223
+
224
+ // ============================================================================
225
+ // 11. FONT WEIGHT UTILITY CLASSES
226
+ // ============================================================================
227
+ @each $name, $weight in $font-weights {
228
+ .font-#{$name} {
229
+ font-weight: $weight !important;
230
+ }
231
+ }
232
+
233
+ // ============================================================================
234
+ // 12. LINE HEIGHT UTILITY CLASSES
235
+ // ============================================================================
236
+ @each $name, $height in $line-heights {
237
+ .leading-#{$name} {
238
+ line-height: $height !important;
239
+ }
240
+ }
241
+
242
+ // Fixed line heights (for precise control)
243
+ .leading-3 { line-height: 0.75rem !important; } // 12px
244
+ .leading-4 { line-height: 1rem !important; } // 16px
245
+ .leading-5 { line-height: 1.25rem !important; } // 20px
246
+ .leading-6 { line-height: 1.5rem !important; } // 24px
247
+ .leading-7 { line-height: 1.75rem !important; } // 28px
248
+ .leading-8 { line-height: 2rem !important; } // 32px
249
+ .leading-9 { line-height: 2.25rem !important; } // 36px
250
+ .leading-10 { line-height: 2.5rem !important; } // 40px
251
+
252
+ // ============================================================================
253
+ // 13. LETTER SPACING UTILITY CLASSES
254
+ // ============================================================================
255
+ @each $name, $spacing in $letter-spacings {
256
+ .tracking-#{$name} {
257
+ letter-spacing: $spacing !important;
258
+ }
259
+ }
260
+
261
+ // ============================================================================
262
+ // 14. TEXT ALIGNMENT UTILITY CLASSES
263
+ // ============================================================================
264
+ .text-left { text-align: left !important; }
265
+ .text-center { text-align: center !important; }
266
+ .text-right { text-align: right !important; }
267
+ .text-justify { text-align: justify !important; }
268
+ .text-start { text-align: start !important; }
269
+ .text-end { text-align: end !important; }
270
+
271
+ // ============================================================================
272
+ // 15. TEXT DECORATION UTILITY CLASSES
273
+ // ============================================================================
274
+ .underline { text-decoration: underline !important; }
275
+ .overline { text-decoration: overline !important; }
276
+ .line-through { text-decoration: line-through !important; }
277
+ .no-underline { text-decoration: none !important; }
278
+
279
+ // Decoration styles
280
+ .decoration-solid { text-decoration-style: solid !important; }
281
+ .decoration-double { text-decoration-style: double !important; }
282
+ .decoration-dotted { text-decoration-style: dotted !important; }
283
+ .decoration-dashed { text-decoration-style: dashed !important; }
284
+ .decoration-wavy { text-decoration-style: wavy !important; }
285
+
286
+ // Decoration thickness
287
+ .decoration-thin { text-decoration-thickness: 1px !important; }
288
+ .decoration-thick { text-decoration-thickness: 2px !important; }
289
+ .decoration-auto { text-decoration-thickness: auto !important; }
290
+
291
+ // ============================================================================
292
+ // 16. TEXT TRANSFORM UTILITY CLASSES
293
+ // ============================================================================
294
+ .uppercase { text-transform: uppercase !important; }
295
+ .lowercase { text-transform: lowercase !important; }
296
+ .capitalize { text-transform: capitalize !important; }
297
+ .normal-case { text-transform: none !important; }
298
+
299
+ // ============================================================================
300
+ // 17. TEXT OVERFLOW & WRAPPING UTILITY CLASSES
301
+ // ============================================================================
302
+ .truncate {
303
+ overflow: hidden !important;
304
+ text-overflow: ellipsis !important;
305
+ white-space: nowrap !important;
306
+ }
307
+
308
+ .text-ellipsis { text-overflow: ellipsis !important; }
309
+ .text-clip { text-overflow: clip !important; }
310
+
311
+ .whitespace-normal { white-space: normal !important; }
312
+ .whitespace-nowrap { white-space: nowrap !important; }
313
+ .whitespace-pre { white-space: pre !important; }
314
+ .whitespace-pre-line { white-space: pre-line !important; }
315
+ .whitespace-pre-wrap { white-space: pre-wrap !important; }
316
+ .whitespace-break-spaces { white-space: break-spaces !important; }
317
+
318
+ .break-normal {
319
+ overflow-wrap: normal !important;
320
+ word-break: normal !important;
321
+ }
322
+ .break-words { overflow-wrap: break-word !important; }
323
+ .break-all { word-break: break-all !important; }
324
+ .break-keep { word-break: keep-all !important; }
325
+
326
+ // Line clamp utilities (multi-line truncation)
327
+ .line-clamp-1 {
328
+ display: -webkit-box !important;
329
+ -webkit-line-clamp: 1 !important;
330
+ -webkit-box-orient: vertical !important;
331
+ overflow: hidden !important;
332
+ }
333
+ .line-clamp-2 {
334
+ display: -webkit-box !important;
335
+ -webkit-line-clamp: 2 !important;
336
+ -webkit-box-orient: vertical !important;
337
+ overflow: hidden !important;
338
+ }
339
+ .line-clamp-3 {
340
+ display: -webkit-box !important;
341
+ -webkit-line-clamp: 3 !important;
342
+ -webkit-box-orient: vertical !important;
343
+ overflow: hidden !important;
344
+ }
345
+ .line-clamp-4 {
346
+ display: -webkit-box !important;
347
+ -webkit-line-clamp: 4 !important;
348
+ -webkit-box-orient: vertical !important;
349
+ overflow: hidden !important;
350
+ }
351
+ .line-clamp-5 {
352
+ display: -webkit-box !important;
353
+ -webkit-line-clamp: 5 !important;
354
+ -webkit-box-orient: vertical !important;
355
+ overflow: hidden !important;
356
+ }
357
+ .line-clamp-none {
358
+ -webkit-line-clamp: unset !important;
359
+ }
360
+
361
+ // ============================================================================
362
+ // 18. SEMANTIC HEADING CLASSES
363
+ // ============================================================================
364
+ .display-xl {
365
+ font: var(--heading-display-xl);
366
+ color: var(--neutral-color-900);
367
+ }
368
+ .display-lg {
369
+ font: var(--heading-display-lg);
370
+ color: var(--neutral-color-900);
371
+ }
372
+ .display-md {
373
+ font: var(--heading-display-md);
374
+ color: var(--neutral-color-900);
375
+ }
376
+
377
+ .heading-h1, h1.ds {
378
+ font: var(--heading-h1);
379
+ color: var(--neutral-color-875);
380
+ margin: 0 0 0.5em;
381
+ }
382
+ .heading-h2, h2.ds {
383
+ font: var(--heading-h2);
384
+ color: var(--neutral-color-875);
385
+ margin: 0 0 0.5em;
386
+ }
387
+ .heading-h3, h3.ds {
388
+ font: var(--heading-h3);
389
+ color: var(--neutral-color-850);
390
+ margin: 0 0 0.5em;
391
+ }
392
+ .heading-h4, h4.ds {
393
+ font: var(--heading-h4);
394
+ color: var(--neutral-color-850);
395
+ margin: 0 0 0.5em;
396
+ }
397
+ .heading-h5, h5.ds {
398
+ font: var(--heading-h5);
399
+ color: var(--neutral-color-800);
400
+ margin: 0 0 0.5em;
401
+ }
402
+ .heading-h6, h6.ds {
403
+ font: var(--heading-h6);
404
+ color: var(--neutral-color-800);
405
+ margin: 0 0 0.5em;
406
+ }
407
+
408
+ // ============================================================================
409
+ // 19. SEMANTIC BODY TEXT CLASSES
410
+ // ============================================================================
411
+ .body-lg {
412
+ font: var(--body-lg);
413
+ color: var(--neutral-color-700);
414
+ }
415
+ .body-base, p.ds {
416
+ font: var(--body-base);
417
+ color: var(--neutral-color-700);
418
+ margin: 0 0 1em;
419
+ }
420
+ .body-sm {
421
+ font: var(--body-sm);
422
+ color: var(--neutral-color-600);
423
+ }
424
+ .body-xs {
425
+ font: var(--body-xs);
426
+ color: var(--neutral-color-600);
427
+ }
428
+
429
+ // ============================================================================
430
+ // 20. SEMANTIC UTILITY TEXT CLASSES
431
+ // ============================================================================
432
+ .label-lg {
433
+ font: var(--label-lg);
434
+ color: var(--neutral-color-800);
435
+ }
436
+ .label-base {
437
+ font: var(--label-base);
438
+ color: var(--neutral-color-800);
439
+ }
440
+ .label-sm {
441
+ font: var(--label-sm);
442
+ color: var(--neutral-color-700);
443
+ }
444
+
445
+ .caption {
446
+ font: var(--caption);
447
+ color: var(--neutral-color-500);
448
+ }
449
+ .caption-strong {
450
+ font: var(--caption-strong);
451
+ color: var(--neutral-color-600);
452
+ }
453
+
454
+ .overline-text {
455
+ font: var(--overline);
456
+ color: var(--neutral-color-500);
457
+ text-transform: uppercase;
458
+ letter-spacing: var(--tracking-wider);
459
+ }
460
+
461
+ .code {
462
+ font: var(--code);
463
+ color: var(--neutral-color-800);
464
+ background-color: var(--neutral-color-25);
465
+ padding: 0.125em 0.25em;
466
+ border-radius: 0.25em;
467
+ }
468
+ .code-sm {
469
+ font: var(--code-sm);
470
+ color: var(--neutral-color-800);
471
+ background-color: var(--neutral-color-25);
472
+ padding: 0.125em 0.25em;
473
+ border-radius: 0.25em;
474
+ }
475
+
476
+ // ============================================================================
477
+ // 21. VERTICAL RHYTHM HELPERS
478
+ // ============================================================================
479
+ .prose {
480
+ font: var(--body-base);
481
+ color: var(--neutral-color-700);
482
+ max-width: 65ch;
483
+
484
+ > * + * {
485
+ margin-top: 1.25em;
486
+ }
487
+
488
+ h1, h2, h3, h4, h5, h6 {
489
+ margin-top: 2em;
490
+ margin-bottom: 0.75em;
491
+ }
492
+
493
+ h1 { font: var(--heading-h1); color: var(--neutral-color-875); }
494
+ h2 { font: var(--heading-h2); color: var(--neutral-color-875); }
495
+ h3 { font: var(--heading-h3); color: var(--neutral-color-850); }
496
+ h4 { font: var(--heading-h4); color: var(--neutral-color-850); }
497
+
498
+ p { margin: 1.25em 0; }
499
+
500
+ ul, ol {
501
+ padding-left: 1.5em;
502
+ margin: 1.25em 0;
503
+ }
504
+
505
+ li {
506
+ margin: 0.5em 0;
507
+ }
508
+
509
+ blockquote {
510
+ border-left: 3px solid var(--primary-300);
511
+ padding-left: 1em;
512
+ margin: 1.5em 0;
513
+ font-style: italic;
514
+ color: var(--neutral-color-600);
515
+ }
516
+
517
+ code {
518
+ font: var(--code);
519
+ background-color: var(--neutral-color-25);
520
+ padding: 0.125em 0.25em;
521
+ border-radius: 0.25em;
522
+ }
523
+
524
+ pre {
525
+ background-color: var(--neutral-color-875);
526
+ color: var(--neutral-color-100);
527
+ padding: 1em;
528
+ border-radius: 0.5em;
529
+ overflow-x: auto;
530
+
531
+ code {
532
+ background: none;
533
+ padding: 0;
534
+ color: inherit;
535
+ }
536
+ }
537
+
538
+ a {
539
+ color: var(--primary-600);
540
+ text-decoration: underline;
541
+
542
+ &:hover {
543
+ color: var(--primary-700);
544
+ }
545
+ }
546
+
547
+ hr {
548
+ border: none;
549
+ border-top: 1px solid var(--neutral-color-100);
550
+ margin: 2em 0;
551
+ }
552
+ }
553
+
554
+ // Compact prose variant
555
+ .prose-sm {
556
+ @extend .prose;
557
+ font: var(--body-sm);
558
+
559
+ > * + * {
560
+ margin-top: 1em;
561
+ }
562
+
563
+ h1, h2, h3, h4, h5, h6 {
564
+ margin-top: 1.5em;
565
+ margin-bottom: 0.5em;
566
+ }
567
+ }
568
+
569
+ // ============================================================================
570
+ // 22. SELECTION STYLING
571
+ // ============================================================================
572
+ ::selection {
573
+ background-color: var(--primary-200);
574
+ color: var(--primary-900);
575
+ }
576
+
577
+ .selection-primary::selection,
578
+ .selection-primary *::selection {
579
+ background-color: var(--primary-200);
580
+ color: var(--primary-900);
581
+ }
582
+
583
+ .selection-brand::selection,
584
+ .selection-brand *::selection {
585
+ background-color: var(--brand-200);
586
+ color: var(--brand-900);
587
+ }
@@ -579,6 +579,21 @@ $radius: (
579
579
  }
580
580
 
581
581
  // ============================================================================
582
- // 10. ICON SYSTEM
582
+ // 10. TYPOGRAPHY SYSTEM
583
+ // ============================================================================
584
+ @import "typography";
585
+
586
+ // ============================================================================
587
+ // 11. SPACING & LAYOUT SYSTEM
588
+ // ============================================================================
589
+ @import "spacing";
590
+
591
+ // ============================================================================
592
+ // 12. ANIMATION SYSTEM
593
+ // ============================================================================
594
+ @import "animations";
595
+
596
+ // ============================================================================
597
+ // 13. ICON SYSTEM
583
598
  // ============================================================================
584
599
  @import "icons";