@fpkit/acss 4.0.0 → 5.0.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 (95) hide show
  1. package/libs/components/alert/alert.css +1 -1
  2. package/libs/components/alert/alert.css.map +1 -1
  3. package/libs/components/alert/alert.min.css +2 -2
  4. package/libs/components/badge/badge.css +1 -1
  5. package/libs/components/badge/badge.css.map +1 -1
  6. package/libs/components/badge/badge.min.css +2 -2
  7. package/libs/components/buttons/button.css +1 -1
  8. package/libs/components/buttons/button.css.map +1 -1
  9. package/libs/components/buttons/button.min.css +2 -2
  10. package/libs/components/cards/card.css +1 -1
  11. package/libs/components/cards/card.css.map +1 -1
  12. package/libs/components/cards/card.min.css +2 -2
  13. package/libs/components/details/details.css +1 -1
  14. package/libs/components/details/details.css.map +1 -1
  15. package/libs/components/details/details.min.css +2 -2
  16. package/libs/components/dialog/dialog.css +1 -1
  17. package/libs/components/dialog/dialog.css.map +1 -1
  18. package/libs/components/dialog/dialog.min.css +2 -2
  19. package/libs/components/form/checkbox.css +1 -1
  20. package/libs/components/form/checkbox.css.map +1 -1
  21. package/libs/components/form/checkbox.min.css +2 -2
  22. package/libs/components/form/form.css +1 -1
  23. package/libs/components/form/form.css.map +1 -1
  24. package/libs/components/form/form.min.css +2 -2
  25. package/libs/components/link/link.css +1 -1
  26. package/libs/components/link/link.css.map +1 -1
  27. package/libs/components/link/link.min.css +2 -2
  28. package/libs/components/nav/nav.css +1 -1
  29. package/libs/components/nav/nav.css.map +1 -1
  30. package/libs/components/nav/nav.min.css +2 -2
  31. package/libs/components/progress/progress.css +1 -1
  32. package/libs/components/progress/progress.css.map +1 -1
  33. package/libs/components/progress/progress.min.css +2 -2
  34. package/libs/components/tag/tag.css +1 -1
  35. package/libs/components/tag/tag.css.map +1 -1
  36. package/libs/components/tag/tag.min.css +2 -2
  37. package/libs/components/text-to-speech/text-to-speech.css +1 -1
  38. package/libs/components/text-to-speech/text-to-speech.css.map +1 -1
  39. package/libs/components/text-to-speech/text-to-speech.min.css +2 -2
  40. package/libs/components/title/title.css +1 -1
  41. package/libs/components/title/title.css.map +1 -1
  42. package/libs/components/title/title.min.css +2 -2
  43. package/libs/index.cjs +1 -1
  44. package/libs/index.cjs.map +1 -1
  45. package/libs/index.css +1 -1
  46. package/libs/index.css.map +1 -1
  47. package/libs/index.js +1 -1
  48. package/libs/index.js.map +1 -1
  49. package/package.json +2 -2
  50. package/src/components/alert/alert.scss +22 -22
  51. package/src/components/alert/views/alert-view.tsx +6 -2
  52. package/src/components/badge/badge.scss +1 -1
  53. package/src/components/buttons/button.scss +8 -8
  54. package/src/components/cards/card.scss +7 -7
  55. package/src/components/details/details.scss +2 -3
  56. package/src/components/dialog/dialog.scss +4 -4
  57. package/src/components/form/checkbox.scss +8 -8
  58. package/src/components/form/form.scss +10 -10
  59. package/src/components/form/input.stories.tsx +17 -4
  60. package/src/components/link/link.scss +1 -1
  61. package/src/components/nav/nav.scss +1 -1
  62. package/src/components/progress/progress.scss +2 -2
  63. package/src/components/tag/tag.scss +7 -7
  64. package/src/components/text-to-speech/text-to-speech.scss +1 -1
  65. package/src/components/title/title.scss +4 -4
  66. package/src/index.scss +15 -1
  67. package/src/sass/_globals.scss +3 -3
  68. package/src/sass/styles/_colors.scss +16 -0
  69. package/src/sass/tokens/_color-primitives.scss +112 -0
  70. package/src/sass/tokens/_color-semantic.scss +144 -0
  71. package/src/sass/tokens/_index.scss +15 -0
  72. package/src/sass/utilities/_color-bg.scss +62 -0
  73. package/src/sass/utilities/_color-border.scss +61 -0
  74. package/src/sass/utilities/_color-text.scss +58 -0
  75. package/src/sass/utilities/_index.scss +17 -0
  76. package/src/sass/utilities/color-utilities.stories.tsx +608 -0
  77. package/src/styles/alert/alert.css +19 -19
  78. package/src/styles/badge/badge.css +1 -1
  79. package/src/styles/buttons/button.css +8 -8
  80. package/src/styles/cards/card.css +7 -7
  81. package/src/styles/details/details.css +2 -3
  82. package/src/styles/details/details.css.map +1 -1
  83. package/src/styles/dialog/dialog.css +4 -4
  84. package/src/styles/form/checkbox.css +11 -11
  85. package/src/styles/form/form.css +26 -21
  86. package/src/styles/form/form.css.map +1 -1
  87. package/src/styles/index.css +516 -82
  88. package/src/styles/index.css.map +1 -1
  89. package/src/styles/link/link.css +1 -1
  90. package/src/styles/nav/nav.css +1 -1
  91. package/src/styles/progress/progress.css +2 -2
  92. package/src/styles/tag/tag.css +7 -7
  93. package/src/styles/text-to-speech/text-to-speech.css +1 -1
  94. package/src/styles/title/title.css +4 -4
  95. package/src/styles/title/title.css.map +1 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fpkit/acss",
3
3
  "description": "A lightweight React UI library for building modern and accessible components that leverage CSS custom properties for reactive Styles.",
4
4
  "private": false,
5
- "version": "4.0.0",
5
+ "version": "5.0.0",
6
6
  "engines": {
7
7
  "node": ">=22.12.0",
8
8
  "npm": ">=8.0.0"
@@ -126,5 +126,5 @@
126
126
  "publishConfig": {
127
127
  "access": "public"
128
128
  },
129
- "gitHead": "2ffaeeeb8cebe0a38f95f65837f505c56218ee67"
129
+ "gitHead": "79600c132b52299259f087d029847acfcb2196e1"
130
130
  }
@@ -12,34 +12,34 @@
12
12
  }
13
13
 
14
14
  [role="alert"] {
15
- /* Success colors */
16
- --alert-success-bg: #e6f4ea;
17
- --alert-success-border: #34a853;
18
- --alert-success-text: #1e4620;
19
-
20
- /* Error colors */
21
- --alert-error-bg: #fdeded;
22
- --alert-error-border: #d32f2f;
23
- --alert-error-text: #5f2120;
24
-
25
- /* Warning colors */
26
- --alert-warning-bg: #fff4e5;
27
- --alert-warning-border: #ff9800;
28
- --alert-warning-text: #663c00;
29
-
30
- /* Info colors */
31
- --alert-info-bg: #e5f6fd;
32
- --alert-info-border: #0288d1;
33
- --alert-info-text: #084154;
15
+ /* Success colors - WCAG AA compliant (mapped to semantic tokens) */
16
+ --alert-success-bg: var(--color-success-bg);
17
+ --alert-success-border: var(--color-success-border);
18
+ --alert-success-text: var(--color-success-text);
19
+
20
+ /* Error colors - WCAG AA compliant (mapped to semantic tokens) */
21
+ --alert-error-bg: var(--color-error-bg);
22
+ --alert-error-border: var(--color-error-border);
23
+ --alert-error-text: var(--color-error-text);
24
+
25
+ /* Warning colors - WCAG AA compliant (mapped to semantic tokens) */
26
+ --alert-warning-bg: var(--color-warning-bg);
27
+ --alert-warning-border: var(--color-warning-border);
28
+ --alert-warning-text: var(--color-warning-text);
29
+
30
+ /* Info colors - WCAG AA compliant (mapped to semantic tokens) */
31
+ --alert-info-bg: var(--color-info-bg);
32
+ --alert-info-border: var(--color-info-border);
33
+ --alert-info-text: var(--color-info-text);
34
34
 
35
35
  /* Animation */
36
36
  --alert-transition-duration: 0.3s;
37
37
 
38
38
  --alert-border: thin solid currentColor;
39
39
 
40
- background-color: var(--alert-bg, whitesmoke);
41
- border: var(--alert-border, currentColor);
42
- color: var(--alert-color, currentColor);
40
+ background-color: var(--alert-bg, var(--color-surface));
41
+ border: var(--alert-border, var(--color-border));
42
+ color: var(--alert-color, var(--color-text));
43
43
  padding: var(--alert-padding, var(--spc-4));
44
44
  margin-block-end: var(--alert-margin-block-end);
45
45
  font-size: var(--fs-0);
@@ -143,8 +143,12 @@ export const AlertView = React.forwardRef<HTMLDivElement, AlertViewProps>(
143
143
  {...props}
144
144
  >
145
145
  <AlertScreenReaderText severity={severity} />
146
- <AlertIcon severity={severity} iconProps={iconProps} hideIcon={hideIcon} />
147
- <UI as="div" className="alert-message">
146
+ <AlertIcon
147
+ severity={severity}
148
+ iconProps={iconProps}
149
+ hideIcon={hideIcon}
150
+ />
151
+ <UI as="div" classes="alert-message">
148
152
  <AlertTitle title={title} titleLevel={titleLevel} />
149
153
  <AlertContent contentType={contentType}>{children}</AlertContent>
150
154
  <AlertActions actions={actions} />
@@ -1,5 +1,5 @@
1
1
  sup:has(> span) {
2
- --badge-bg: lightgray;
2
+ --badge-bg: var(--color-neutral-300);
3
3
  --badge-color: currentColor;
4
4
  --badge-radius: 0.5rem;
5
5
  --badge-padding: 0.3rem;
@@ -7,7 +7,7 @@ button {
7
7
  --btn-pill: 100rem;
8
8
  --btn-fs: var(--btn-size-md);
9
9
  --btn-height: calc(var(--btn-fs) * 2.25);
10
- --btn-bg: lightgray;
10
+ --btn-bg: var(--color-neutral-300);
11
11
  --btn-width: max-content;
12
12
 
13
13
  font-size: var(--btn-fs);
@@ -36,14 +36,14 @@ button {
36
36
  line-height: 0cap;
37
37
 
38
38
  &[type] {
39
- background-color: var(--btn-bg, var(--neutral-300));
39
+ background-color: var(--btn-bg, var(--color-neutral-300));
40
40
  --btn-border: solid var(--btn-sg);
41
41
  }
42
42
 
43
43
  &[type="submit"],
44
44
  &[style*="submit"] {
45
- --btn-bg: var(--primary-500, royal-blue);
46
- --btn-color: white;
45
+ --btn-bg: var(--color-primary);
46
+ --btn-color: var(--color-text-inverse);
47
47
  }
48
48
 
49
49
  &[disabled],
@@ -81,13 +81,13 @@ button {
81
81
 
82
82
  &[type="reset"] {
83
83
  --btn-bg: transparent;
84
- --btn-color: gray;
85
- --btn-border: gray thin solid;
84
+ --btn-color: var(--color-text-secondary);
85
+ --btn-border: var(--color-border) thin solid;
86
86
  }
87
87
 
88
88
  &[type="submit"] {
89
- --btn-bg: var(--primary-700, blue);
90
- --btn-color: #fff;
89
+ --btn-bg: var(--color-primary);
90
+ --btn-color: var(--color-text-inverse);
91
91
  --btn-border: none;
92
92
  }
93
93
 
@@ -1,24 +1,24 @@
1
1
  :root {
2
2
  // Base card properties
3
3
  --card-padding: 1.5rem;
4
- --card-bg: var(--color-surface, #ffffff);
4
+ --card-bg: var(--color-surface);
5
5
  --card-radius: calc(var(--card-padding) / 4);
6
6
  --card-gap: 1rem;
7
7
 
8
8
  // Element-specific variables (NEW - for complex card layouts)
9
9
  --card-header-padding: 1rem 1.5rem;
10
- --card-header-bg: var(--color-surface-secondary, #f8f9fa);
10
+ --card-header-bg: var(--color-surface-secondary);
11
11
  --card-header-border-bottom-width: 0.0625rem;
12
12
  --card-header-border-bottom-style: solid;
13
- --card-header-border-bottom-color: var(--color-border, #dee2e6);
13
+ --card-header-border-bottom-color: var(--color-border);
14
14
 
15
15
  --card-body-padding: 1.5rem;
16
16
 
17
17
  --card-footer-padding: 1rem 1.5rem;
18
- --card-footer-bg: var(--color-surface-secondary, #f8f9fa);
18
+ --card-footer-bg: var(--color-surface-secondary);
19
19
  --card-footer-border-top-width: 0.0625rem;
20
20
  --card-footer-border-top-style: solid;
21
- --card-footer-border-top-color: var(--color-border, #dee2e6);
21
+ --card-footer-border-top-color: var(--color-border);
22
22
  }
23
23
 
24
24
  [data-card],
@@ -27,7 +27,7 @@
27
27
  flex-direction: column;
28
28
  gap: var(--card-gap);
29
29
  border-radius: var(--card-radius);
30
- border: var(--card-border, 0.0625rem solid rgba(0, 0, 0, 0.08));
30
+ border: var(--card-border, 0.0625rem solid var(--color-border-subtle));
31
31
  background-color: var(--card-bg);
32
32
  text-align: var(--card-align, left);
33
33
 
@@ -99,7 +99,7 @@
99
99
 
100
100
  // Visible focus indicator with 3:1 minimum contrast (WCAG 2.4.7)
101
101
  &:focus-visible {
102
- outline: 0.125rem solid var(--color-focus, #0066cc);
102
+ outline: 0.125rem solid var(--color-focus);
103
103
  outline-offset: 0.125rem;
104
104
  }
105
105
 
@@ -1,5 +1,5 @@
1
1
  details {
2
- --details-border: 0.0625rem solid #dfdfdf;
2
+ --details-border: 0.0625rem solid var(--color-border-subtle);
3
3
  --details-direction: column;
4
4
  --details-display: flex;
5
5
  --details-gap: 0rem;
@@ -33,7 +33,6 @@ details {
33
33
 
34
34
  @starting-style {
35
35
  transition: var(--summary-transitions);
36
- color: red;
37
36
  }
38
37
 
39
38
  & + details {
@@ -77,7 +76,7 @@ details {
77
76
  &:focus-within {
78
77
  outline: none;
79
78
  border-bottom: solid 2px currentColor;
80
- background-color: whitesmoke;
79
+ background-color: var(--color-surface-secondary);
81
80
  }
82
81
 
83
82
  /* This ensures no bullet points are shown */
@@ -1,21 +1,21 @@
1
1
  :root {
2
2
  --dialog-min-width: max(20rem, 80%);
3
3
  --dialog-gap: 0.625rem;
4
- --dialog-border-color: lightgray;
4
+ --dialog-border-color: var(--color-border);
5
5
  --dialog-border-width: thin;
6
6
  --dialog-border-style: solid;
7
7
  --dialog-border-radius: var(--border-radius);
8
8
  --dialog-padding: 1.5rem;
9
9
  --dialog-padding-inline: 1rem;
10
- --dialog-close-color: gray;
10
+ --dialog-close-color: var(--color-text-secondary);
11
11
  --dialog-button-bg: transparent;
12
12
  --dialog-button-border: transparent thin solid;
13
- --dialog-button-hover-bg: whitesmoke;
13
+ --dialog-button-hover-bg: var(--color-surface-secondary);
14
14
  --dialog-display: flex;
15
15
  --dialog-flex-direction: column;
16
16
 
17
17
  /* Focus and accessibility */
18
- --dialog-focus-color: #0066cc;
18
+ --dialog-focus-color: var(--color-focus);
19
19
  --dialog-focus-width: 0.125rem;
20
20
  --dialog-focus-offset: 0.125rem;
21
21
  --dialog-focus-outline: var(--dialog-focus-width) solid var(--dialog-focus-color);
@@ -8,15 +8,15 @@
8
8
  * CSS Custom Properties:
9
9
  * - --checkbox-gap: Space between checkbox and label (default: 0.5rem)
10
10
  * - --checkbox-disabled-opacity: Opacity for disabled state (default: 0.6)
11
- * - --checkbox-disabled-color: Label color when disabled (default: #6b7280)
11
+ * - --checkbox-disabled-color: Label color when disabled (default: var(--color-disabled-text))
12
12
  * - --checkbox-label-fs: Label font size (default: 1rem)
13
13
  * - --checkbox-label-lh: Label line height (default: 1.5)
14
- * - --color-required: Required indicator color (default: #dc2626)
15
- * - --checkbox-focus-ring-color: Focus ring color (default: #2563eb)
14
+ * - --color-required: Required indicator color (default: var(--color-required))
15
+ * - --checkbox-focus-ring-color: Focus ring color (default: var(--color-focus-ring))
16
16
  * - --checkbox-focus-ring-width: Focus ring width (default: 0.125rem)
17
17
  * - --checkbox-focus-ring-offset: Focus ring offset (default: 0.125rem)
18
18
  * - --checkbox-hover-label-color: Label color on hover (default: inherit)
19
- * - --checkbox-error-label-color: Label color when invalid (default: #dc2626)
19
+ * - --checkbox-error-label-color: Label color when invalid (default: var(--color-error-text))
20
20
  * - --checkbox-valid-label-color: Label color when valid (default: #16a34a)
21
21
  * - --checkbox-focus-radius: Focus outline border radius (default: 0.125rem)
22
22
  *
@@ -53,7 +53,7 @@ div:has(> input[type="checkbox"]) {
53
53
  &:has(> input:focus-visible) {
54
54
  .checkbox-label {
55
55
  outline: var(--checkbox-focus-ring-width, 0.125rem) solid
56
- var(--checkbox-focus-ring-color, #2563eb);
56
+ var(--checkbox-focus-ring-color, var(--color-focus-ring));
57
57
  outline-offset: var(--checkbox-focus-ring-offset, 0.125rem);
58
58
  border-radius: var(--checkbox-focus-radius, 0.125rem);
59
59
  }
@@ -66,7 +66,7 @@ div:has(> input[type="checkbox"]) {
66
66
  cursor: not-allowed;
67
67
 
68
68
  .checkbox-label {
69
- color: var(--checkbox-disabled-color, #6b7280);
69
+ color: var(--checkbox-disabled-color, var(--color-disabled-text));
70
70
  cursor: not-allowed;
71
71
  }
72
72
  }
@@ -75,7 +75,7 @@ div:has(> input[type="checkbox"]) {
75
75
  // Color alone is not sufficient - error message text must also be provided
76
76
  &:has(> input[aria-invalid="true"]) {
77
77
  .checkbox-label {
78
- color: var(--checkbox-error-label-color, #dc2626);
78
+ color: var(--checkbox-error-label-color, var(--color-error-text));
79
79
  }
80
80
  }
81
81
 
@@ -104,7 +104,7 @@ div:has(> input[type="checkbox"]) {
104
104
  }
105
105
 
106
106
  .checkbox-required {
107
- color: var(--color-required, #dc2626);
107
+ color: var(--color-required);
108
108
  font-weight: 600;
109
109
  margin-inline-start: 0.125rem;
110
110
  }
@@ -2,7 +2,7 @@
2
2
  @use "./checkbox";
3
3
 
4
4
  :root {
5
- --input-border-color: gray;
5
+ --input-border-color: var(--color-border);
6
6
  --input-appearance: none;
7
7
  --input-bg: inherit;
8
8
  --input-border: none;
@@ -18,12 +18,12 @@
18
18
  --input-focus-outline-offset: 0;
19
19
 
20
20
  // Disabled state variables (NEW)
21
- --input-disabled-bg: #f5f5f5;
21
+ --input-disabled-bg: var(--color-disabled-bg);
22
22
  --input-disabled-opacity: 0.6;
23
23
  --input-disabled-cursor: not-allowed;
24
24
 
25
25
  // Placeholder variables
26
- --placeholder-color: gray;
26
+ --placeholder-color: var(--color-text-tertiary);
27
27
  --placeholder-style: italic;
28
28
  --placeholder-fs: smaller;
29
29
 
@@ -43,9 +43,9 @@
43
43
  ========================================================================== */
44
44
 
45
45
  --checkbox-size: var(--checkbox-size-md);
46
- --checkbox-bg: #ffffff;
47
- --checkbox-border: 0.125rem solid #6b7280; /* 2px border */
48
- --checkbox-border-color: #6b7280; /* Gray 500 */
46
+ --checkbox-bg: var(--color-surface);
47
+ --checkbox-border: 0.125rem solid var(--color-neutral-600); /* 2px border */
48
+ --checkbox-border-color: var(--color-neutral-600); /* Gray 500 */
49
49
  --checkbox-radius: 0.25rem; /* 4px */
50
50
  --checkbox-cursor: pointer;
51
51
  --checkbox-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
@@ -54,8 +54,8 @@
54
54
  Checked State Properties
55
55
  ========================================================================== */
56
56
 
57
- --checkbox-checked-outline-color: darkgreen;
58
- --checkbox-checked-bg: green;
57
+ --checkbox-checked-outline-color: var(--color-success);
58
+ --checkbox-checked-bg: var(--color-success);
59
59
  }
60
60
 
61
61
  form {
@@ -83,7 +83,7 @@ input {
83
83
  padding-inline: var(--input-padding-inline);
84
84
  padding-block: var(--input-padding-block);
85
85
  border-radius: var(--input-radius);
86
- background-color: var(--input-bg, #fff);
86
+ background-color: var(--input-bg, var(--color-surface));
87
87
 
88
88
  &:focus-visible,
89
89
  &:focus {
@@ -93,7 +93,7 @@ input {
93
93
 
94
94
  &[aria-disabled="true"],
95
95
  &:disabled {
96
- --input-border-color: lightgray;
96
+ --input-border-color: var(--color-border-subtle);
97
97
  background-color: var(--input-disabled-bg);
98
98
  opacity: var(--input-disabled-opacity);
99
99
  cursor: var(--input-disabled-cursor);
@@ -407,7 +407,8 @@ export const CheckboxWithHint: Story = {
407
407
  /**
408
408
  * CheckboxCustomSize - Custom sized checkboxes using CSS variables
409
409
  *
410
- * Demonstrates responsive sizing via --checkbox-size variable.
410
+ * Demonstrates responsive sizing by overriding --checkbox-size and --checkbox-gap variables.
411
+ * Useful for contexts requiring larger touch targets or compact layouts.
411
412
  */
412
413
  export const CheckboxCustomSize: Story = {
413
414
  render: () => (
@@ -415,21 +416,33 @@ export const CheckboxCustomSize: Story = {
415
416
  <CheckboxComponent
416
417
  id="small"
417
418
  label="Small (1rem)"
418
- styles={{ "--checkbox-gap": "0.375rem" } as React.CSSProperties}
419
+ styles={{
420
+ "--checkbox-size": "1rem",
421
+ "--checkbox-gap": "0.5rem",
422
+ } as React.CSSProperties}
419
423
  />
420
424
  <CheckboxComponent
421
425
  id="medium"
422
426
  label="Medium (1.25rem - default)"
427
+ styles={{
428
+ "--checkbox-gap": "0.5rem",
429
+ } as React.CSSProperties}
423
430
  />
424
431
  <CheckboxComponent
425
432
  id="large"
426
433
  label="Large (1.5rem)"
427
- styles={{ "--checkbox-gap": "0.75rem" } as React.CSSProperties}
434
+ styles={{
435
+ "--checkbox-size": "1.5rem",
436
+ "--checkbox-gap": "0.625rem",
437
+ } as React.CSSProperties}
428
438
  />
429
439
  <CheckboxComponent
430
440
  id="xlarge"
431
441
  label="Extra Large (2rem)"
432
- styles={{ "--checkbox-gap": "1rem" } as React.CSSProperties}
442
+ styles={{
443
+ "--checkbox-size": "2rem",
444
+ "--checkbox-gap": "0.75rem",
445
+ } as React.CSSProperties}
433
446
  />
434
447
  </div>
435
448
  ),
@@ -14,7 +14,7 @@
14
14
 
15
15
  a[href] {
16
16
  // Color & Typography
17
- --link-color: #085ab7;
17
+ --link-color: var(--color-link);
18
18
  --link-fw: 400;
19
19
  --link-fs: 1rem;
20
20
 
@@ -22,7 +22,7 @@ body > nav,
22
22
  padding-inline: var(--nav-padding-inline, 0.75rem);
23
23
 
24
24
  &:hover {
25
- background-color: var(--nav-hover-bg, #e8e8e8);
25
+ background-color: var(--nav-hover-bg, var(--color-surface-secondary));
26
26
  }
27
27
  &:hover:has(img, button) {
28
28
  background-color: transparent;
@@ -3,8 +3,8 @@ progress {
3
3
  all: revert;
4
4
  --progress-width: 100%;
5
5
  --progress-height: 1rem;
6
- --progress-bg: #cccccc;
7
- --progress-color: rgb(71, 71, 245);
6
+ --progress-bg: var(--color-neutral-300);
7
+ --progress-color: var(--color-primary);
8
8
  --progress-accent-color: var(--progress-color);
9
9
 
10
10
  /* This code changes the color of the progress bar. */
@@ -20,16 +20,16 @@ p[role='note'],
20
20
  small > span,
21
21
  [data-tag] {
22
22
  /* Variant color tokens - WCAG AA compliant colors */
23
- --beta: #fbbf24; /* Amber: 6.94:1 contrast with black */
24
- --stable: #0f7c3e; /* Dark green: 4.56:1 contrast with white */
25
- --production: #1e3a8a; /* Dark blue: 8.59:1 contrast with white */
23
+ --beta: var(--color-amber-400); /* Amber: 6.94:1 contrast with black */
24
+ --stable: var(--color-green-700); /* Dark green: 4.56:1 contrast with white */
25
+ --production: var(--color-blue-900); /* Dark blue: 8.59:1 contrast with white */
26
26
 
27
27
  /* Tag component tokens */
28
28
  --tag-padding-inline: 0.7rem; /* Horizontal padding (11.2px at 16px base) */
29
29
  --tag-padding-block: 0.2rem; /* Vertical padding (3.2px at 16px base) */
30
30
  --tag-fs: 0.8rem; /* Font size (12.8px at 16px base) */
31
31
  --tag-radius: 99rem; /* Fully rounded pill shape */
32
- --tag-bg: lightgray; /* Default background color */
32
+ --tag-bg: var(--color-neutral-300); /* Default background color */
33
33
  --tag-fw: 500; /* Medium font weight */
34
34
  --tag-color: currentColor; /* Default text color (inherits) */
35
35
  --tag-display: inline-block; /* Display type */
@@ -65,7 +65,7 @@ small > span,
65
65
 
66
66
  /* Alpha variant - early development stage */
67
67
  &[data-tag~='alpha'] {
68
- --tag-color: #000000; /* Black: maximum contrast with amber background */
68
+ --tag-color: var(--color-neutral-900); /* Black: maximum contrast with amber background */
69
69
  --tag-bg: var(--beta);
70
70
 
71
71
  /* Visual indicator beyond color - warning symbol */
@@ -79,7 +79,7 @@ small > span,
79
79
 
80
80
  /* Beta variant - pre-release version */
81
81
  &[data-tag~='beta'] {
82
- --tag-color: #000000; /* Black: maximum contrast with amber background */
82
+ --tag-color: var(--color-neutral-900); /* Black: maximum contrast with amber background */
83
83
  --tag-bg: var(--beta);
84
84
 
85
85
  /* Visual indicator beyond color - warning symbol */
@@ -93,7 +93,7 @@ small > span,
93
93
 
94
94
  /* Stable variant - production-ready release */
95
95
  &[data-tag~='stable'] {
96
- --tag-color: #ffffff; /* White: 4.56:1 contrast with dark green */
96
+ --tag-color: var(--color-text-inverse); /* White: 4.56:1 contrast with dark green */
97
97
  --tag-bg: var(--stable);
98
98
 
99
99
  /* Visual indicator beyond color - checkmark symbol */
@@ -1,6 +1,6 @@
1
1
  [data-tts] {
2
2
  --tts-gap: 0.5rem;
3
- --tts-bg: #fff;
3
+ --tts-bg: var(--color-surface);
4
4
  --tts-border-width: 0.125rem;
5
5
  --tts-border-style: solid;
6
6
  --tts-border-color: currentColor;
@@ -37,10 +37,10 @@
37
37
  &[data-title~="2xl"] { --title-fs: var(--title-size-2xl); }
38
38
 
39
39
  /* Color variants - WCAG AA compliant (4.5:1 minimum) */
40
- &[data-title~="primary"] { --title-color: #1e3a8a; } /* 8.59:1 */
41
- &[data-title~="secondary"] { --title-color: #4b5563; } /* 7.56:1 */
42
- &[data-title~="accent"] { --title-color: #7c3aed; } /* 4.62:1 */
43
- &[data-title~="muted"] { --title-color: #6b7280; } /* 5.49:1 */
40
+ &[data-title~="primary"] { --title-color: var(--color-primary); } /* 8.59:1 */
41
+ &[data-title~="secondary"] { --title-color: var(--color-text-secondary); } /* 7.56:1 */
42
+ &[data-title~="accent"] { --title-color: var(--color-primary); } /* 4.62:1 */
43
+ &[data-title~="muted"] { --title-color: var(--color-text-tertiary); } /* 5.49:1 */
44
44
  &[data-title~="inherit"] { --title-color: inherit; }
45
45
  }
46
46
 
package/src/index.scss CHANGED
@@ -1,10 +1,24 @@
1
+ // ============================================
2
+ // TOKENS - Foundation Layer (Tier 1 & 2)
3
+ // Must load FIRST to be available to all components
4
+ // ============================================
5
+ @use "./sass/tokens";
6
+
7
+ // ============================================
8
+ // Base Styles
9
+ // ============================================
1
10
  @use "./sass/reset";
2
11
  @use "./sass/layout";
3
12
  @use "./sass/type";
4
13
  @use "./sass/properties";
5
14
  @use "./sass/globals";
6
15
  @use "./sass/elements";
7
- @use "./styles/utilities/disabled";
16
+
17
+ // ============================================
18
+ // Utilities
19
+ // Loaded after tokens, before components
20
+ // ============================================
21
+ @use "./sass/utilities";
8
22
  @use "./components/buttons/button.scss";
9
23
  @use "./components/tag/tag.scss";
10
24
  @use "./components/images/img.scss";
@@ -66,7 +66,7 @@ body {
66
66
  z-index: 100;
67
67
  transition: top 0.3s;
68
68
  border-radius: 0;
69
- background-color: var(--color-skip-link-bg, #f5f5f5);
69
+ background-color: var(--color-skip-link-bg, var(--color-neutral-100));
70
70
  &:focus {
71
71
  top: 0;
72
72
  }
@@ -128,7 +128,7 @@ blockquote {
128
128
  --blockquote-padding: 1rem;
129
129
  --blockquote-border-width: 0.3125rem;
130
130
  --blockquote-border-style: solid;
131
- --blockquote-border-color: var(--color-border, #d3d3d3);
131
+ --blockquote-border-color: var(--color-border);
132
132
  padding: var(--blockquote-padding);
133
133
  border-left: var(--blockquote-border-width) var(--blockquote-border-style) var(--blockquote-border-color);
134
134
  }
@@ -151,7 +151,7 @@ h6 {
151
151
 
152
152
  hr {
153
153
  --hr-border-width: 0.0625rem;
154
- --hr-border-color: var(--color-border-subtle, #d3d3d3);
154
+ --hr-border-color: var(--color-border-subtle);
155
155
  --hr-margin-block: 1.5rem;
156
156
  --hr-border-style: solid;
157
157
  border: none;
@@ -1,3 +1,19 @@
1
+ /**
2
+ * DEPRECATED: This file is deprecated in favor of the new token system.
3
+ *
4
+ * Use tokens from src/sass/tokens/ instead:
5
+ * - Primitives: src/sass/tokens/_color-primitives.scss
6
+ * - Semantic: src/sass/tokens/_color-semantic.scss
7
+ *
8
+ * Use utility classes from src/sass/utilities/ for quick styling:
9
+ * - .text-primary, .text-success, .text-error, etc.
10
+ * - .bg-primary, .bg-success, .bg-error, etc.
11
+ * - .border-primary, .border-success, .border-error, etc.
12
+ *
13
+ * This file will be removed in v6.0.0
14
+ * Keeping for backward compatibility only.
15
+ */
16
+
1
17
  :root {
2
18
  --transparent: transparent;
3
19
  }