@phcdevworks/spectre-tokens 2.7.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.css CHANGED
@@ -37,6 +37,41 @@
37
37
  --sp-icon-box-icon-success: #16a34a;
38
38
  --sp-icon-box-icon-warning: #d48806;
39
39
  --sp-icon-box-icon-danger: #dc2626;
40
+ --sp-nav-bg: #ffffff;
41
+ --sp-nav-text: #141b24;
42
+ --sp-nav-link: #374253;
43
+ --sp-nav-link-hover: #1f57db;
44
+ --sp-nav-link-active: #1946b4;
45
+ --sp-nav-border: #d9dfeb;
46
+ --sp-modal-bg: #ffffff;
47
+ --sp-modal-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.20);
48
+ --sp-modal-border: #d9dfeb;
49
+ --sp-modal-overlay: rgba(0, 0, 0, 0.6);
50
+ --sp-toast-success-bg: #f0fdf4;
51
+ --sp-toast-success-text: #166534;
52
+ --sp-toast-success-border: #bbf7d0;
53
+ --sp-toast-success-icon: #16a34a;
54
+ --sp-toast-warning-bg: #fffbea;
55
+ --sp-toast-warning-text: #8f5200;
56
+ --sp-toast-warning-border: #ffe08a;
57
+ --sp-toast-warning-icon: #d48806;
58
+ --sp-toast-danger-bg: #fef2f2;
59
+ --sp-toast-danger-text: #991b1b;
60
+ --sp-toast-danger-border: #fecaca;
61
+ --sp-toast-danger-icon: #dc2626;
62
+ --sp-toast-info-bg: #f0f9ff;
63
+ --sp-toast-info-text: #0c4a6e;
64
+ --sp-toast-info-border: #bae6fd;
65
+ --sp-toast-info-icon: #0369a1;
66
+ --sp-tooltip-bg: #141b24;
67
+ --sp-tooltip-text: #ffffff;
68
+ --sp-tooltip-border: #374253;
69
+ --sp-dropdown-bg: #ffffff;
70
+ --sp-dropdown-border: #d9dfeb;
71
+ --sp-dropdown-item-default: transparent;
72
+ --sp-dropdown-item-hover: #eef1f6;
73
+ --sp-dropdown-item-active: #f0f9ff;
74
+ --sp-dropdown-item-text: #141b24;
40
75
  --sp-color-brand-50: #eef4ff;
41
76
  --sp-color-brand-100: #d9e7ff;
42
77
  --sp-color-brand-200: #b9d2ff;
@@ -116,17 +151,24 @@
116
151
  --sp-color-white: #ffffff;
117
152
  --sp-color-black: #000000;
118
153
  --sp-space-0: 0rem;
154
+ --sp-space-1: 0.0625rem;
155
+ --sp-space-2: 0.125rem;
119
156
  --sp-space-4: 0.25rem;
157
+ --sp-space-6: 0.375rem;
120
158
  --sp-space-8: 0.5rem;
159
+ --sp-space-10: 0.625rem;
121
160
  --sp-space-12: 0.75rem;
161
+ --sp-space-14: 0.875rem;
122
162
  --sp-space-16: 1rem;
123
163
  --sp-space-20: 1.25rem;
124
164
  --sp-space-24: 1.5rem;
165
+ --sp-space-28: 1.75rem;
125
166
  --sp-space-32: 2rem;
126
167
  --sp-space-40: 2.5rem;
127
168
  --sp-space-48: 3rem;
128
169
  --sp-space-56: 3.5rem;
129
170
  --sp-space-64: 4rem;
171
+ --sp-space-72: 4.5rem;
130
172
  --sp-space-80: 5rem;
131
173
  --sp-space-96: 6rem;
132
174
  --sp-layout-section-padding-sm: 1.5rem;
@@ -142,16 +184,21 @@
142
184
  --sp-layout-container-padding-inline-md: 1.5rem;
143
185
  --sp-layout-container-padding-inline-lg: 2rem;
144
186
  --sp-layout-container-max-width: 72rem;
187
+ --sp-border-width-none: 0;
145
188
  --sp-border-width-base: 1px;
146
189
  --sp-border-width-thick: 2px;
147
190
  --sp-border-style-none: none;
148
191
  --sp-border-style-solid: solid;
192
+ --sp-border-style-dashed: dashed;
193
+ --sp-border-style-dotted: dotted;
149
194
  --sp-radius-none: 0;
150
195
  --sp-radius-sm: 2px;
151
196
  --sp-radius-md: 4px;
152
197
  --sp-radius-lg: 8px;
153
198
  --sp-radius-xl: 12px;
154
199
  --sp-radius-2xl: 16px;
200
+ --sp-radius-3xl: 24px;
201
+ --sp-radius-4xl: 32px;
155
202
  --sp-radius-pill: 999px;
156
203
  --sp-font-family-sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
157
204
  --sp-font-family-serif: 'Times New Roman', Times, serif;
@@ -216,6 +263,7 @@
216
263
  --sp-z-index-popover: 1500;
217
264
  --sp-z-index-tooltip: 1600;
218
265
  --sp-z-index-toast: 1700;
266
+ --sp-duration-reduced: 0.01ms;
219
267
  --sp-duration-instant: 75ms;
220
268
  --sp-duration-fast: 150ms;
221
269
  --sp-duration-base: 200ms;
@@ -243,6 +291,7 @@
243
291
  --sp-focus-ring-style: solid;
244
292
  --sp-min-touch-target: 44px;
245
293
  --sp-min-text-size: 16px;
294
+ --sp-reduced-motion: 0.01ms;
246
295
  --sp-button-primary-bg: #0369a1;
247
296
  --sp-button-primary-bghover: #075985;
248
297
  --sp-button-primary-bgactive: #0c4a6e;
@@ -276,6 +325,7 @@
276
325
  --sp-button-danger-text: #ffffff;
277
326
  --sp-button-danger-textdisabled: #8a96ad;
278
327
  --sp-button-danger-focusring: rgba(239, 68, 68, 0.4);
328
+ --sp-button-danger-focusvisible: rgba(239, 68, 68, 0.4);
279
329
  --sp-button-success-bg: #15803d;
280
330
  --sp-button-success-bghover: #166534;
281
331
  --sp-button-success-bgactive: #14532d;
@@ -283,6 +333,7 @@
283
333
  --sp-button-success-text: #ffffff;
284
334
  --sp-button-success-textdisabled: #8a96ad;
285
335
  --sp-button-success-focusring: rgba(34, 197, 94, 0.4);
336
+ --sp-button-success-focusvisible: rgba(34, 197, 94, 0.4);
286
337
  --sp-button-cta-bg: #1f57db;
287
338
  --sp-button-cta-bghover: #1946b4;
288
339
  --sp-button-cta-bgactive: #173b8f;
@@ -341,6 +392,30 @@
341
392
  --sp-animation-pulse-duration: 1200ms;
342
393
  --sp-animation-pulse-easing: cubic-bezier(0.4, 0, 0.2, 1);
343
394
  --sp-animation-pulse-keyframes: pulse;
395
+ --sp-animation-reduced-motion-fadein-duration: 0.01ms;
396
+ --sp-animation-reduced-motion-fadein-easing: linear;
397
+ --sp-animation-reduced-motion-fadein-keyframes: fade-in;
398
+ --sp-animation-reduced-motion-fadeout-duration: 0.01ms;
399
+ --sp-animation-reduced-motion-fadeout-easing: linear;
400
+ --sp-animation-reduced-motion-fadeout-keyframes: fade-out;
401
+ --sp-animation-reduced-motion-slideup-duration: 0.01ms;
402
+ --sp-animation-reduced-motion-slideup-easing: linear;
403
+ --sp-animation-reduced-motion-slideup-keyframes: slide-up;
404
+ --sp-animation-reduced-motion-slidedown-duration: 0.01ms;
405
+ --sp-animation-reduced-motion-slidedown-easing: linear;
406
+ --sp-animation-reduced-motion-slidedown-keyframes: slide-down;
407
+ --sp-animation-reduced-motion-scalein-duration: 0.01ms;
408
+ --sp-animation-reduced-motion-scalein-easing: linear;
409
+ --sp-animation-reduced-motion-scalein-keyframes: scale-in;
410
+ --sp-animation-reduced-motion-bounce-duration: 0.01ms;
411
+ --sp-animation-reduced-motion-bounce-easing: linear;
412
+ --sp-animation-reduced-motion-bounce-keyframes: bounce;
413
+ --sp-animation-reduced-motion-shake-duration: 0.01ms;
414
+ --sp-animation-reduced-motion-shake-easing: linear;
415
+ --sp-animation-reduced-motion-shake-keyframes: shake;
416
+ --sp-animation-reduced-motion-pulse-duration: 0.01ms;
417
+ --sp-animation-reduced-motion-pulse-easing: linear;
418
+ --sp-animation-reduced-motion-pulse-keyframes: pulse;
344
419
  }
345
420
  :root[data-spectre-theme="dark"] {
346
421
  --sp-surface-page: #141b24;
@@ -381,4 +456,39 @@
381
456
  --sp-icon-box-icon-success: #4ade80;
382
457
  --sp-icon-box-icon-warning: #ffc21a;
383
458
  --sp-icon-box-icon-danger: #f87171;
459
+ --sp-nav-bg: #141b24;
460
+ --sp-nav-text: #f7f8fb;
461
+ --sp-nav-link: #b7c1d4;
462
+ --sp-nav-link-hover: #5a92ff;
463
+ --sp-nav-link-active: #8ab6ff;
464
+ --sp-nav-border: #374253;
465
+ --sp-modal-bg: #222b38;
466
+ --sp-modal-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.20);
467
+ --sp-modal-border: #374253;
468
+ --sp-modal-overlay: rgba(0, 0, 0, 0.6);
469
+ --sp-toast-success-bg: #14532d;
470
+ --sp-toast-success-text: #dcfce7;
471
+ --sp-toast-success-border: #15803d;
472
+ --sp-toast-success-icon: #4ade80;
473
+ --sp-toast-warning-bg: #734000;
474
+ --sp-toast-warning-text: #fff1c2;
475
+ --sp-toast-warning-border: #ad6800;
476
+ --sp-toast-warning-icon: #ffc21a;
477
+ --sp-toast-danger-bg: #7f1d1d;
478
+ --sp-toast-danger-text: #fee2e2;
479
+ --sp-toast-danger-border: #b91c1c;
480
+ --sp-toast-danger-icon: #f87171;
481
+ --sp-toast-info-bg: #082f49;
482
+ --sp-toast-info-text: #e0f2fe;
483
+ --sp-toast-info-border: #075985;
484
+ --sp-toast-info-icon: #38bdf8;
485
+ --sp-tooltip-bg: #f7f8fb;
486
+ --sp-tooltip-text: #141b24;
487
+ --sp-tooltip-border: #b7c1d4;
488
+ --sp-dropdown-bg: #222b38;
489
+ --sp-dropdown-border: #374253;
490
+ --sp-dropdown-item-default: transparent;
491
+ --sp-dropdown-item-hover: #374253;
492
+ --sp-dropdown-item-active: #082f49;
493
+ --sp-dropdown-item-text: #eef1f6;
384
494
  }
package/dist/index.d.cts CHANGED
@@ -62,6 +62,61 @@ interface SpectreGeneratedTokens {
62
62
  starEmpty: string;
63
63
  text: string;
64
64
  };
65
+ nav: {
66
+ bg: string;
67
+ text: string;
68
+ link: string;
69
+ linkHover: string;
70
+ linkActive: string;
71
+ border: string;
72
+ };
73
+ modal: {
74
+ bg: string;
75
+ shadow: string;
76
+ border: string;
77
+ overlay: string;
78
+ };
79
+ toast: {
80
+ success: {
81
+ bg: string;
82
+ text: string;
83
+ border: string;
84
+ icon: string;
85
+ };
86
+ warning: {
87
+ bg: string;
88
+ text: string;
89
+ border: string;
90
+ icon: string;
91
+ };
92
+ danger: {
93
+ bg: string;
94
+ text: string;
95
+ border: string;
96
+ icon: string;
97
+ };
98
+ info: {
99
+ bg: string;
100
+ text: string;
101
+ border: string;
102
+ icon: string;
103
+ };
104
+ };
105
+ tooltip: {
106
+ bg: string;
107
+ text: string;
108
+ border: string;
109
+ };
110
+ dropdown: {
111
+ bg: string;
112
+ border: string;
113
+ item: {
114
+ default: string;
115
+ hover: string;
116
+ active: string;
117
+ text: string;
118
+ };
119
+ };
65
120
  };
66
121
  buttons: {
67
122
  primary: {
@@ -104,6 +159,7 @@ interface SpectreGeneratedTokens {
104
159
  text: string;
105
160
  textDisabled: string;
106
161
  focusRing: string;
162
+ focusVisible: string;
107
163
  };
108
164
  success: {
109
165
  bg: string;
@@ -113,6 +169,7 @@ interface SpectreGeneratedTokens {
113
169
  text: string;
114
170
  textDisabled: string;
115
171
  focusRing: string;
172
+ focusVisible: string;
116
173
  };
117
174
  cta: {
118
175
  bg: string;
@@ -178,6 +235,10 @@ interface SpectreGeneratedTokens {
178
235
  overlay: string;
179
236
  alternate: string;
180
237
  hero: string;
238
+ hover: string;
239
+ selected: string;
240
+ active: string;
241
+ divider: string;
181
242
  };
182
243
  text: {
183
244
  onPage: {
@@ -255,6 +316,61 @@ interface SpectreGeneratedTokens {
255
316
  starEmpty: string;
256
317
  text: string;
257
318
  };
319
+ nav: {
320
+ bg: string;
321
+ text: string;
322
+ link: string;
323
+ linkHover: string;
324
+ linkActive: string;
325
+ border: string;
326
+ };
327
+ modal: {
328
+ bg: string;
329
+ shadow: string;
330
+ border: string;
331
+ overlay: string;
332
+ };
333
+ toast: {
334
+ success: {
335
+ bg: string;
336
+ text: string;
337
+ border: string;
338
+ icon: string;
339
+ };
340
+ warning: {
341
+ bg: string;
342
+ text: string;
343
+ border: string;
344
+ icon: string;
345
+ };
346
+ danger: {
347
+ bg: string;
348
+ text: string;
349
+ border: string;
350
+ icon: string;
351
+ };
352
+ info: {
353
+ bg: string;
354
+ text: string;
355
+ border: string;
356
+ icon: string;
357
+ };
358
+ };
359
+ tooltip: {
360
+ bg: string;
361
+ text: string;
362
+ border: string;
363
+ };
364
+ dropdown: {
365
+ bg: string;
366
+ border: string;
367
+ item: {
368
+ default: string;
369
+ hover: string;
370
+ active: string;
371
+ text: string;
372
+ };
373
+ };
258
374
  };
259
375
  };
260
376
  dark: {
@@ -265,6 +381,10 @@ interface SpectreGeneratedTokens {
265
381
  overlay: string;
266
382
  alternate: string;
267
383
  hero: string;
384
+ hover: string;
385
+ selected: string;
386
+ active: string;
387
+ divider: string;
268
388
  };
269
389
  text: {
270
390
  onPage: {
@@ -345,6 +465,61 @@ interface SpectreGeneratedTokens {
345
465
  starEmpty: string;
346
466
  text: string;
347
467
  };
468
+ nav: {
469
+ bg: string;
470
+ text: string;
471
+ link: string;
472
+ linkHover: string;
473
+ linkActive: string;
474
+ border: string;
475
+ };
476
+ modal: {
477
+ bg: string;
478
+ shadow: string;
479
+ border: string;
480
+ overlay: string;
481
+ };
482
+ toast: {
483
+ success: {
484
+ bg: string;
485
+ text: string;
486
+ border: string;
487
+ icon: string;
488
+ };
489
+ warning: {
490
+ bg: string;
491
+ text: string;
492
+ border: string;
493
+ icon: string;
494
+ };
495
+ danger: {
496
+ bg: string;
497
+ text: string;
498
+ border: string;
499
+ icon: string;
500
+ };
501
+ info: {
502
+ bg: string;
503
+ text: string;
504
+ border: string;
505
+ icon: string;
506
+ };
507
+ };
508
+ tooltip: {
509
+ bg: string;
510
+ text: string;
511
+ border: string;
512
+ };
513
+ dropdown: {
514
+ bg: string;
515
+ border: string;
516
+ item: {
517
+ default: string;
518
+ hover: string;
519
+ active: string;
520
+ text: string;
521
+ };
522
+ };
348
523
  };
349
524
  };
350
525
  };
@@ -450,17 +625,24 @@ interface SpectreGeneratedTokens {
450
625
  };
451
626
  space: {
452
627
  '0': string;
628
+ '1': string;
629
+ '2': string;
453
630
  '4': string;
631
+ '6': string;
454
632
  '8': string;
633
+ '10': string;
455
634
  '12': string;
635
+ '14': string;
456
636
  '16': string;
457
637
  '20': string;
458
638
  '24': string;
639
+ '28': string;
459
640
  '32': string;
460
641
  '40': string;
461
642
  '48': string;
462
643
  '56': string;
463
644
  '64': string;
645
+ '72': string;
464
646
  '80': string;
465
647
  '96': string;
466
648
  };
@@ -471,6 +653,8 @@ interface SpectreGeneratedTokens {
471
653
  lg: string;
472
654
  xl: string;
473
655
  '2xl': string;
656
+ '3xl': string;
657
+ '4xl': string;
474
658
  pill: string;
475
659
  };
476
660
  shadows: {
@@ -501,6 +685,7 @@ interface SpectreGeneratedTokens {
501
685
  };
502
686
  transitions: {
503
687
  duration: {
688
+ reduced: string;
504
689
  instant: string;
505
690
  fast: string;
506
691
  base: string;
@@ -561,6 +746,48 @@ interface SpectreGeneratedTokens {
561
746
  easing: string;
562
747
  keyframes: string;
563
748
  };
749
+ reducedMotion: {
750
+ fadeIn: {
751
+ duration: string;
752
+ easing: string;
753
+ keyframes: string;
754
+ };
755
+ fadeOut: {
756
+ duration: string;
757
+ easing: string;
758
+ keyframes: string;
759
+ };
760
+ slideUp: {
761
+ duration: string;
762
+ easing: string;
763
+ keyframes: string;
764
+ };
765
+ slideDown: {
766
+ duration: string;
767
+ easing: string;
768
+ keyframes: string;
769
+ };
770
+ scaleIn: {
771
+ duration: string;
772
+ easing: string;
773
+ keyframes: string;
774
+ };
775
+ bounce: {
776
+ duration: string;
777
+ easing: string;
778
+ keyframes: string;
779
+ };
780
+ shake: {
781
+ duration: string;
782
+ easing: string;
783
+ keyframes: string;
784
+ };
785
+ pulse: {
786
+ duration: string;
787
+ easing: string;
788
+ keyframes: string;
789
+ };
790
+ };
564
791
  };
565
792
  opacity: {
566
793
  disabled: string;
@@ -595,17 +822,22 @@ interface SpectreGeneratedTokens {
595
822
  offset: string;
596
823
  style: string;
597
824
  };
825
+ reducedMotion: string;
826
+ forcedColors: string;
598
827
  minTouchTarget: string;
599
828
  minTextSize: string;
600
829
  };
601
830
  border: {
602
831
  width: {
832
+ none: string;
603
833
  base: string;
604
834
  thick: string;
605
835
  };
606
836
  style: {
607
837
  none: string;
608
838
  solid: string;
839
+ dashed: string;
840
+ dotted: string;
609
841
  };
610
842
  };
611
843
  surface: {
@@ -613,6 +845,16 @@ interface SpectreGeneratedTokens {
613
845
  card: string;
614
846
  input: string;
615
847
  overlay: string;
848
+ hover: string;
849
+ selected: string;
850
+ active: string;
851
+ divider: string;
852
+ };
853
+ link: {
854
+ default: string;
855
+ hover: string;
856
+ active: string;
857
+ visited: string;
616
858
  };
617
859
  text: {
618
860
  onPage: {
@@ -892,6 +1134,47 @@ interface ComponentRatingTokens<Value = string> {
892
1134
  starEmpty: Value;
893
1135
  text: Value;
894
1136
  }
1137
+ interface ComponentNavTokens<Value = string> {
1138
+ bg: Value;
1139
+ text: Value;
1140
+ link: Value;
1141
+ linkHover: Value;
1142
+ linkActive: Value;
1143
+ border: Value;
1144
+ }
1145
+ interface ComponentModalTokens<Value = string> {
1146
+ bg: Value;
1147
+ shadow: Value;
1148
+ border: Value;
1149
+ overlay: Value;
1150
+ }
1151
+ interface ComponentToastVariantTokens<Value = string> {
1152
+ bg: Value;
1153
+ text: Value;
1154
+ border: Value;
1155
+ icon: Value;
1156
+ }
1157
+ interface ComponentToastTokens<Value = string> {
1158
+ success: ComponentToastVariantTokens<Value>;
1159
+ warning: ComponentToastVariantTokens<Value>;
1160
+ danger: ComponentToastVariantTokens<Value>;
1161
+ info: ComponentToastVariantTokens<Value>;
1162
+ }
1163
+ interface ComponentTooltipTokens<Value = string> {
1164
+ bg: Value;
1165
+ text: Value;
1166
+ border: Value;
1167
+ }
1168
+ interface ComponentDropdownTokens<Value = string> {
1169
+ bg: Value;
1170
+ border: Value;
1171
+ item: {
1172
+ default: Value;
1173
+ hover: Value;
1174
+ active: Value;
1175
+ text: Value;
1176
+ };
1177
+ }
895
1178
  interface ComponentTokens<Value = string> {
896
1179
  card: {
897
1180
  text: Value;
@@ -910,6 +1193,11 @@ interface ComponentTokens<Value = string> {
910
1193
  testimonial: ComponentTestimonialTokens<Value>;
911
1194
  pricingCard: ComponentPricingCardTokens<Value>;
912
1195
  rating: ComponentRatingTokens<Value>;
1196
+ nav: ComponentNavTokens<Value>;
1197
+ modal: ComponentModalTokens<Value>;
1198
+ toast: ComponentToastTokens<Value>;
1199
+ tooltip: ComponentTooltipTokens<Value>;
1200
+ dropdown: ComponentDropdownTokens<Value>;
913
1201
  [key: string]: unknown;
914
1202
  }
915
1203
  type SpectreModeName = 'default' | 'dark';
@@ -922,6 +1210,10 @@ interface SpectreModeTokens {
922
1210
  overlay: SemanticTokenValue;
923
1211
  alternate: SemanticTokenValue;
924
1212
  hero: SemanticTokenValue;
1213
+ hover: SemanticTokenValue;
1214
+ selected: SemanticTokenValue;
1215
+ active: SemanticTokenValue;
1216
+ divider: SemanticTokenValue;
925
1217
  };
926
1218
  text: {
927
1219
  onPage: {