@fpkit/acss 3.9.0 → 4.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.
- package/libs/components/alert/alert.css +1 -1
- package/libs/components/alert/alert.css.map +1 -1
- package/libs/components/alert/alert.min.css +2 -2
- package/libs/components/badge/badge.css +1 -1
- package/libs/components/badge/badge.css.map +1 -1
- package/libs/components/badge/badge.min.css +2 -2
- package/libs/components/buttons/button.css +1 -1
- package/libs/components/buttons/button.css.map +1 -1
- package/libs/components/buttons/button.min.css +2 -2
- package/libs/components/cards/card.css +1 -1
- package/libs/components/cards/card.css.map +1 -1
- package/libs/components/cards/card.min.css +2 -2
- package/libs/components/details/details.css +1 -1
- package/libs/components/details/details.css.map +1 -1
- package/libs/components/details/details.min.css +2 -2
- package/libs/components/dialog/dialog.css +1 -1
- package/libs/components/dialog/dialog.css.map +1 -1
- package/libs/components/dialog/dialog.min.css +2 -2
- package/libs/components/form/checkbox.css +1 -1
- package/libs/components/form/checkbox.css.map +1 -1
- package/libs/components/form/checkbox.min.css +2 -2
- package/libs/components/form/form.css +1 -1
- package/libs/components/form/form.css.map +1 -1
- package/libs/components/form/form.min.css +2 -2
- package/libs/components/icons/icon.d.cts +1 -1
- package/libs/components/icons/icon.d.ts +1 -1
- package/libs/components/link/link.css +1 -1
- package/libs/components/link/link.css.map +1 -1
- package/libs/components/link/link.min.css +2 -2
- package/libs/components/nav/nav.css +1 -1
- package/libs/components/nav/nav.css.map +1 -1
- package/libs/components/nav/nav.min.css +2 -2
- package/libs/components/progress/progress.css +1 -1
- package/libs/components/progress/progress.css.map +1 -1
- package/libs/components/progress/progress.min.css +2 -2
- package/libs/components/tag/tag.css +1 -1
- package/libs/components/tag/tag.css.map +1 -1
- package/libs/components/tag/tag.min.css +2 -2
- package/libs/components/text-to-speech/text-to-speech.css +1 -1
- package/libs/components/text-to-speech/text-to-speech.css.map +1 -1
- package/libs/components/text-to-speech/text-to-speech.min.css +2 -2
- package/libs/components/title/title.css +1 -1
- package/libs/components/title/title.css.map +1 -1
- package/libs/components/title/title.min.css +2 -2
- package/libs/{icons-df8e744f.d.ts → icons-952d9bc5.d.ts} +32 -32
- package/libs/icons.d.cts +1 -1
- package/libs/icons.d.ts +1 -1
- package/libs/index.css +1 -1
- package/libs/index.css.map +1 -1
- package/libs/index.d.cts +2 -2
- package/libs/index.d.ts +2 -2
- package/package.json +2 -2
- package/src/components/alert/alert.scss +22 -22
- package/src/components/badge/badge.scss +1 -1
- package/src/components/buttons/button.scss +8 -8
- package/src/components/cards/card.scss +7 -7
- package/src/components/details/details.scss +2 -3
- package/src/components/dialog/dialog.scss +4 -4
- package/src/components/form/checkbox.scss +11 -11
- package/src/components/form/form.scss +19 -10
- package/src/components/link/link.scss +1 -1
- package/src/components/nav/nav.scss +1 -1
- package/src/components/progress/progress.scss +2 -2
- package/src/components/tag/tag.scss +7 -7
- package/src/components/text-to-speech/text-to-speech.scss +1 -1
- package/src/components/title/title.scss +4 -4
- package/src/index.scss +15 -1
- package/src/sass/_globals.scss +3 -3
- package/src/sass/styles/_colors.scss +16 -0
- package/src/sass/tokens/_color-primitives.scss +112 -0
- package/src/sass/tokens/_color-semantic.scss +144 -0
- package/src/sass/tokens/_index.scss +15 -0
- package/src/sass/utilities/_color-bg.scss +62 -0
- package/src/sass/utilities/_color-border.scss +61 -0
- package/src/sass/utilities/_color-text.scss +58 -0
- package/src/sass/utilities/_index.scss +17 -0
- package/src/sass/utilities/color-utilities.stories.tsx +608 -0
- package/src/styles/alert/alert.css +19 -19
- package/src/styles/badge/badge.css +1 -1
- package/src/styles/buttons/button.css +8 -8
- package/src/styles/cards/card.css +7 -7
- package/src/styles/details/details.css +2 -3
- package/src/styles/details/details.css.map +1 -1
- package/src/styles/dialog/dialog.css +4 -4
- package/src/styles/form/checkbox.css +11 -11
- package/src/styles/form/form.css +26 -21
- package/src/styles/form/form.css.map +1 -1
- package/src/styles/index.css +516 -82
- package/src/styles/index.css.map +1 -1
- package/src/styles/link/link.css +1 -1
- package/src/styles/nav/nav.css +1 -1
- package/src/styles/progress/progress.css +2 -2
- package/src/styles/tag/tag.css +7 -7
- package/src/styles/text-to-speech/text-to-speech.css +1 -1
- package/src/styles/title/title.css +4 -4
- package/src/styles/title/title.css.map +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
// Base card properties
|
|
3
3
|
--card-padding: 1.5rem;
|
|
4
|
-
--card-bg: var(--color-surface
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
15
|
-
* - --checkbox-focus-ring-color: Focus ring color (default:
|
|
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:
|
|
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
|
*
|
|
@@ -44,7 +44,7 @@ div:has(> input[type="checkbox"]) {
|
|
|
44
44
|
// Hover state (only when not disabled) - WCAG 1.4.13 Content on Hover
|
|
45
45
|
&:not(:has(> input[aria-disabled="true"])):hover {
|
|
46
46
|
.checkbox-label {
|
|
47
|
-
color: var(--checkbox-hover-label-color,
|
|
47
|
+
color: var(--checkbox-hover-label-color, currentColor);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -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,
|
|
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,
|
|
69
|
+
color: var(--checkbox-disabled-color, var(--color-disabled-text));
|
|
70
70
|
cursor: not-allowed;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -75,14 +75,14 @@ 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,
|
|
78
|
+
color: var(--checkbox-error-label-color, var(--color-error-text));
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// Valid state styling (when checked and explicitly marked valid)
|
|
83
83
|
&:has(> input[aria-invalid="false"]:checked) {
|
|
84
|
-
|
|
85
|
-
color: var(--checkbox-valid-label-color,
|
|
84
|
+
label[for] {
|
|
85
|
+
color: var(--checkbox-valid-label-color, currentColor);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -104,7 +104,7 @@ div:has(> input[type="checkbox"]) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
.checkbox-required {
|
|
107
|
-
color: var(--color-required
|
|
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:
|
|
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:
|
|
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:
|
|
26
|
+
--placeholder-color: var(--color-text-tertiary);
|
|
27
27
|
--placeholder-style: italic;
|
|
28
28
|
--placeholder-fs: smaller;
|
|
29
29
|
|
|
@@ -43,12 +43,19 @@
|
|
|
43
43
|
========================================================================== */
|
|
44
44
|
|
|
45
45
|
--checkbox-size: var(--checkbox-size-md);
|
|
46
|
-
--checkbox-bg:
|
|
47
|
-
--checkbox-border: 0.125rem solid
|
|
48
|
-
--checkbox-border-color:
|
|
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);
|
|
52
|
+
|
|
53
|
+
/* ==========================================================================
|
|
54
|
+
Checked State Properties
|
|
55
|
+
========================================================================== */
|
|
56
|
+
|
|
57
|
+
--checkbox-checked-outline-color: var(--color-success);
|
|
58
|
+
--checkbox-checked-bg: var(--color-success);
|
|
52
59
|
}
|
|
53
60
|
|
|
54
61
|
form {
|
|
@@ -76,7 +83,7 @@ input {
|
|
|
76
83
|
padding-inline: var(--input-padding-inline);
|
|
77
84
|
padding-block: var(--input-padding-block);
|
|
78
85
|
border-radius: var(--input-radius);
|
|
79
|
-
background-color: var(--input-bg,
|
|
86
|
+
background-color: var(--input-bg, var(--color-surface));
|
|
80
87
|
|
|
81
88
|
&:focus-visible,
|
|
82
89
|
&:focus {
|
|
@@ -86,7 +93,7 @@ input {
|
|
|
86
93
|
|
|
87
94
|
&[aria-disabled="true"],
|
|
88
95
|
&:disabled {
|
|
89
|
-
--input-border-color:
|
|
96
|
+
--input-border-color: var(--color-border-subtle);
|
|
90
97
|
background-color: var(--input-disabled-bg);
|
|
91
98
|
opacity: var(--input-disabled-opacity);
|
|
92
99
|
cursor: var(--input-disabled-cursor);
|
|
@@ -125,8 +132,10 @@ input[type="checkbox"] {
|
|
|
125
132
|
|
|
126
133
|
&:checked {
|
|
127
134
|
background-color: var(--checkbox-bg, red);
|
|
128
|
-
outline:
|
|
129
|
-
background:
|
|
135
|
+
outline: var(--checkbox-checked-outline-color) solid 2px;
|
|
136
|
+
background: var(--checkbox-checked-bg)
|
|
137
|
+
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M6.173 11.414l-3.89-3.89 1.414-1.414 2.476 2.475 5.657-5.657 1.414 1.414z'/></svg>")
|
|
138
|
+
no-repeat center center;
|
|
130
139
|
}
|
|
131
140
|
}
|
|
132
141
|
|
|
@@ -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,
|
|
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:
|
|
7
|
-
--progress-color:
|
|
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:
|
|
24
|
-
--stable:
|
|
25
|
-
--production:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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 */
|
|
@@ -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:
|
|
41
|
-
&[data-title~="secondary"] { --title-color:
|
|
42
|
-
&[data-title~="accent"] { --title-color:
|
|
43
|
-
&[data-title~="muted"] { --title-color:
|
|
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
|
-
|
|
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";
|
package/src/sass/_globals.scss
CHANGED
|
@@ -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,
|
|
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
|
|
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
|
|
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
|
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color Primitives - Foundation Layer (Tier 1)
|
|
3
|
+
*
|
|
4
|
+
* Raw color values that form the foundation of the design system.
|
|
5
|
+
* All colors are WCAG AA compliant (4.5:1 for text, 3:1 for UI components).
|
|
6
|
+
*
|
|
7
|
+
* Pattern: --color-{hue}-{scale}
|
|
8
|
+
* Scale: 50 (lightest) to 900 (darkest)
|
|
9
|
+
*
|
|
10
|
+
* Industry-standard palette based on accessible color scales.
|
|
11
|
+
* No rebeccapurple or purple colors per project requirements.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
:root {
|
|
15
|
+
/* ========================================
|
|
16
|
+
Neutral Scale (Grays)
|
|
17
|
+
Purpose: Text, borders, surfaces, backgrounds
|
|
18
|
+
======================================== */
|
|
19
|
+
|
|
20
|
+
--color-neutral-0: #ffffff; /* Pure white - Surfaces, text inverse */
|
|
21
|
+
--color-neutral-50: #fafafa; /* Off-white - Secondary surfaces */
|
|
22
|
+
--color-neutral-100: #f5f5f5; /* Light gray - Disabled backgrounds, tertiary surfaces */
|
|
23
|
+
--color-neutral-200: #e5e5e5; /* Border subtle - Light borders, dividers */
|
|
24
|
+
--color-neutral-300: #d4d4d4; /* Border default - Standard borders */
|
|
25
|
+
--color-neutral-400: #a3a3a3; /* Border interactive - Hover borders, interactive elements */
|
|
26
|
+
--color-neutral-500: #737373; /* Text disabled - Disabled text, placeholders */
|
|
27
|
+
--color-neutral-600: #525252; /* Text tertiary - Less emphasized text */
|
|
28
|
+
--color-neutral-700: #404040; /* Text secondary - Secondary text */
|
|
29
|
+
--color-neutral-800: #262626; /* Text primary - Body text, primary content */
|
|
30
|
+
--color-neutral-900: #171717; /* Text emphasis - Headings, emphasized text */
|
|
31
|
+
|
|
32
|
+
/* ========================================
|
|
33
|
+
Blue Scale (Primary/Info)
|
|
34
|
+
Purpose: Primary brand, focus states, links, info messages
|
|
35
|
+
WCAG: 4.5:1+ contrast ratios verified
|
|
36
|
+
======================================== */
|
|
37
|
+
|
|
38
|
+
--color-blue-100: #dbeafe; /* Info background light - Subtle info backgrounds */
|
|
39
|
+
--color-blue-200: #bfdbfe; /* Info background - Info alert backgrounds */
|
|
40
|
+
--color-blue-300: #93c5fd; /* Info border light - Light info borders */
|
|
41
|
+
--color-blue-400: #60a5fa; /* Info hover - Hover states for info elements */
|
|
42
|
+
--color-blue-500: #3b82f6; /* Info default - Standard info color */
|
|
43
|
+
--color-blue-600: #2563eb; /* Primary default - Primary brand color */
|
|
44
|
+
--color-blue-700: #1d4ed8; /* Primary hover - Primary button hover */
|
|
45
|
+
--color-blue-800: #1e40af; /* Primary active - Primary button active/pressed */
|
|
46
|
+
--color-blue-900: #1e3a8a; /* Info text - Dark text on info backgrounds (WCAG AAA: 12.6:1) */
|
|
47
|
+
|
|
48
|
+
/* ========================================
|
|
49
|
+
Green Scale (Success)
|
|
50
|
+
Purpose: Success states, positive feedback, valid inputs
|
|
51
|
+
WCAG: 4.5:1+ contrast ratios verified
|
|
52
|
+
======================================== */
|
|
53
|
+
|
|
54
|
+
--color-green-100: #dcfce7; /* Success background light - Subtle success backgrounds */
|
|
55
|
+
--color-green-200: #bbf7d0; /* Success background - Success alert backgrounds */
|
|
56
|
+
--color-green-300: #86efac; /* Success border light - Light success borders */
|
|
57
|
+
--color-green-400: #4ade80; /* Success hover - Hover states for success elements */
|
|
58
|
+
--color-green-500: #22c55e; /* Success default - Standard success color */
|
|
59
|
+
--color-green-600: #16a34a; /* Success border - Success borders, checkmarks */
|
|
60
|
+
--color-green-700: #15803d; /* Success dark - Dark success emphasis */
|
|
61
|
+
--color-green-800: #166534; /* Success text - Dark text on success backgrounds (WCAG AAA: 8.3:1) */
|
|
62
|
+
--color-green-900: #14532d; /* Success emphasis - Highest contrast success text */
|
|
63
|
+
|
|
64
|
+
/* ========================================
|
|
65
|
+
Red Scale (Error/Danger)
|
|
66
|
+
Purpose: Errors, destructive actions, invalid inputs, alerts
|
|
67
|
+
WCAG: 4.5:1+ contrast ratios verified
|
|
68
|
+
======================================== */
|
|
69
|
+
|
|
70
|
+
--color-red-100: #fee2e2; /* Error background light - Subtle error backgrounds */
|
|
71
|
+
--color-red-200: #fecaca; /* Error background - Error alert backgrounds */
|
|
72
|
+
--color-red-300: #fca5a5; /* Error border light - Light error borders */
|
|
73
|
+
--color-red-400: #f87171; /* Error hover - Hover states for error elements */
|
|
74
|
+
--color-red-500: #ef4444; /* Error default - Standard error color */
|
|
75
|
+
--color-red-600: #dc2626; /* Error border - Error borders, icons */
|
|
76
|
+
--color-red-700: #b91c1c; /* Error dark - Dark error emphasis */
|
|
77
|
+
--color-red-800: #991b1b; /* Error text - Dark text on error backgrounds (WCAG AAA: 10.3:1) */
|
|
78
|
+
--color-red-900: #7f1d1d; /* Error emphasis - Highest contrast error text */
|
|
79
|
+
|
|
80
|
+
/* ========================================
|
|
81
|
+
Amber Scale (Warning)
|
|
82
|
+
Purpose: Warnings, cautions, pending states
|
|
83
|
+
WCAG: 4.5:1+ contrast ratios verified
|
|
84
|
+
======================================== */
|
|
85
|
+
|
|
86
|
+
--color-amber-100: #fef3c7; /* Warning background light - Subtle warning backgrounds */
|
|
87
|
+
--color-amber-200: #fde68a; /* Warning background - Warning alert backgrounds */
|
|
88
|
+
--color-amber-300: #fcd34d; /* Warning border light - Light warning borders */
|
|
89
|
+
--color-amber-400: #fbbf24; /* Warning hover - Hover states for warning elements */
|
|
90
|
+
--color-amber-500: #f59e0b; /* Warning default - Standard warning color */
|
|
91
|
+
--color-amber-600: #d97706; /* Warning border - Warning borders, icons */
|
|
92
|
+
--color-amber-700: #b45309; /* Warning dark - Dark warning emphasis */
|
|
93
|
+
--color-amber-800: #92400e; /* Warning text - Dark text on warning backgrounds (WCAG AAA: 9.8:1) */
|
|
94
|
+
--color-amber-900: #78350f; /* Warning emphasis - Highest contrast warning text */
|
|
95
|
+
|
|
96
|
+
/* ========================================
|
|
97
|
+
Cyan Scale (Info Alternative)
|
|
98
|
+
Purpose: Alternative info states, highlights, accents
|
|
99
|
+
WCAG: 4.5:1+ contrast ratios verified
|
|
100
|
+
Note: Used instead of purple/rebeccapurple per requirements
|
|
101
|
+
======================================== */
|
|
102
|
+
|
|
103
|
+
--color-cyan-100: #cffafe; /* Info alt background light - Subtle cyan backgrounds */
|
|
104
|
+
--color-cyan-200: #a5f3fc; /* Info alt background - Cyan alert backgrounds */
|
|
105
|
+
--color-cyan-300: #67e8f9; /* Info alt border light - Light cyan borders */
|
|
106
|
+
--color-cyan-400: #22d3ee; /* Info alt hover - Hover states for cyan elements */
|
|
107
|
+
--color-cyan-500: #06b6d4; /* Info alt default - Standard cyan color */
|
|
108
|
+
--color-cyan-600: #0891b2; /* Info alt border - Cyan borders, icons */
|
|
109
|
+
--color-cyan-700: #0e7490; /* Info alt dark - Dark cyan emphasis */
|
|
110
|
+
--color-cyan-800: #155e75; /* Info alt text - Dark text on cyan backgrounds (WCAG AAA: 7.2:1) */
|
|
111
|
+
--color-cyan-900: #164e63; /* Info alt emphasis - Highest contrast cyan text */
|
|
112
|
+
}
|