@frontile/theme 0.18.0-alpha.2 → 0.18.0-alpha.20
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/README.md +22 -23
- package/declarations/colors/config.d.ts +18 -36
- package/declarations/colors/palette-absolute.d.ts +2 -2
- package/declarations/colors/palette.d.ts +1 -1
- package/declarations/colors/semantic.d.ts +4 -0
- package/declarations/colors/types.d.ts +190 -134
- package/declarations/colors/util.d.ts +2 -1
- package/declarations/colors.d.ts +1 -0
- package/declarations/components/accordion.d.ts +308 -0
- package/declarations/components/alert.d.ts +294 -0
- package/declarations/components/avatar.d.ts +9 -7
- package/declarations/components/button.d.ts +131 -48
- package/declarations/components/calendar.d.ts +382 -0
- package/declarations/components/chip.d.ts +79 -42
- package/declarations/components/close-button.d.ts +9 -7
- package/declarations/components/command.d.ts +281 -0
- package/declarations/components/divider.d.ts +9 -7
- package/declarations/components/dropdown.d.ts +11 -9
- package/declarations/components/external-link.d.ts +160 -0
- package/declarations/components/forms/forms-legacy.d.ts +108 -84
- package/declarations/components/forms/forms.d.ts +1040 -159
- package/declarations/components/index.d.ts +11 -0
- package/declarations/components/kbd.d.ts +315 -0
- package/declarations/components/listbox.d.ts +122 -18
- package/declarations/components/notification-card.d.ts +182 -111
- package/declarations/components/notifications-container.d.ts +111 -40
- package/declarations/components/overlays.d.ts +429 -29
- package/declarations/components/pagination.d.ts +359 -0
- package/declarations/components/popover.d.ts +11 -9
- package/declarations/components/progress-bar.d.ts +39 -7
- package/declarations/components/segmented-control.d.ts +463 -0
- package/declarations/components/shared.d.ts +9 -0
- package/declarations/components/skeleton.d.ts +151 -0
- package/declarations/components/spinner.d.ts +19 -7
- package/declarations/components/table.d.ts +17 -9
- package/declarations/components/tabs.d.ts +463 -0
- package/declarations/components/tooltip.d.ts +270 -0
- package/declarations/plugin/default-config.d.ts +18 -36
- package/declarations/tw.d.ts +9 -7
- package/declarations/types.d.ts +18 -1
- package/dist/colors.js +2 -1
- package/dist/colors.js.map +1 -1
- package/dist/index.js +3825 -5
- package/dist/index.js.map +1 -1
- package/dist/overlays-DIZlPzFH.js +654 -0
- package/dist/overlays-DIZlPzFH.js.map +1 -0
- package/dist/plugin.js +60 -85
- package/dist/plugin.js.map +1 -1
- package/dist/util-Dp_dlOPq.js +482 -0
- package/dist/util-Dp_dlOPq.js.map +1 -0
- package/package.json +17 -14
- package/public/fonts/domine-variable.woff2 +0 -0
- package/public/fonts/open-sans-italic-variable.woff2 +0 -0
- package/public/fonts/open-sans-variable.woff2 +0 -0
- package/public/fonts/source-code-pro-italic-variable.woff2 +0 -0
- package/public/fonts/source-code-pro-variable.woff2 +0 -0
- package/src/index.css +64 -15
- package/src/styles/font-faces.css +70 -8
- package/src/styles/theme.css +18 -7
- package/src/styles/typography.css +229 -126
- package/declarations/colors/contrast.d.ts +0 -16
- package/declarations/colors/defaults.d.ts +0 -66
- package/declarations/colors/palette-dark.d.ts +0 -123
- package/declarations/colors/palette-light.d.ts +0 -123
- package/dist/config-4CswsBlg.js +0 -342
- package/dist/config-4CswsBlg.js.map +0 -1
- package/dist/config-B3XkEtHW.js +0 -377
- package/dist/config-B3XkEtHW.js.map +0 -1
- package/dist/config-BpWBpuzR.js +0 -335
- package/dist/config-BpWBpuzR.js.map +0 -1
- package/dist/config-Cle59Y4k.js +0 -523
- package/dist/config-Cle59Y4k.js.map +0 -1
- package/dist/config-D0EoeVzn.js +0 -388
- package/dist/config-D0EoeVzn.js.map +0 -1
- package/dist/config-DBAavoE2.js +0 -336
- package/dist/config-DBAavoE2.js.map +0 -1
- package/dist/config-Oysuq2Z9.js +0 -341
- package/dist/config-Oysuq2Z9.js.map +0 -1
- package/dist/config-PYki2g7N.js +0 -335
- package/dist/config-PYki2g7N.js.map +0 -1
- package/dist/forms-legacy-15iy0KmK.js +0 -1851
- package/dist/forms-legacy-15iy0KmK.js.map +0 -1
- package/dist/forms-legacy-B-L2HELt.js +0 -1881
- package/dist/forms-legacy-B-L2HELt.js.map +0 -1
- package/dist/forms-legacy-BMIAioRi.js +0 -1807
- package/dist/forms-legacy-BMIAioRi.js.map +0 -1
- package/dist/forms-legacy-B_EygtyK.js +0 -1763
- package/dist/forms-legacy-B_EygtyK.js.map +0 -1
- package/dist/forms-legacy-Bg_UoLDR.js +0 -1763
- package/dist/forms-legacy-Bg_UoLDR.js.map +0 -1
- package/dist/forms-legacy-CVLZ-9BG.js +0 -1804
- package/dist/forms-legacy-CVLZ-9BG.js.map +0 -1
- package/dist/forms-legacy-CuFc3hcn.js +0 -1807
- package/dist/forms-legacy-CuFc3hcn.js.map +0 -1
- package/dist/forms-legacy-DiKImAli.js +0 -1809
- package/dist/forms-legacy-DiKImAli.js.map +0 -1
- package/dist/forms-legacy-edWQVbZP.js +0 -1809
- package/dist/forms-legacy-edWQVbZP.js.map +0 -1
- package/dist/index.css +0 -63
- package/dist/semantic-DUv6Lpqq.js +0 -218
- package/dist/semantic-DUv6Lpqq.js.map +0 -1
- package/dist/styles/font-faces.css +0 -26
- package/dist/styles/theme.css +0 -48
- package/dist/styles/typography.css +0 -291
- package/public/fonts/stix-two-text-italic-variable.woff2 +0 -0
- package/public/fonts/stix-two-text-variable.woff2 +0 -0
package/README.md
CHANGED
|
@@ -85,18 +85,18 @@ module.exports = frontile({
|
|
|
85
85
|
themes: {
|
|
86
86
|
light: {
|
|
87
87
|
colors: {
|
|
88
|
-
|
|
88
|
+
primary: {
|
|
89
89
|
subtle: '#3b82f6',
|
|
90
|
-
|
|
90
|
+
DEFAULT: '#2563eb',
|
|
91
91
|
strong: '#1d4ed8',
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
dark: {
|
|
96
96
|
colors: {
|
|
97
|
-
|
|
97
|
+
primary: {
|
|
98
98
|
subtle: '#60a5fa',
|
|
99
|
-
|
|
99
|
+
DEFAULT: '#3b82f6',
|
|
100
100
|
strong: '#2563eb',
|
|
101
101
|
}
|
|
102
102
|
}
|
|
@@ -114,7 +114,7 @@ module.exports = frontile({
|
|
|
114
114
|
themes: {
|
|
115
115
|
light: {
|
|
116
116
|
colors: {
|
|
117
|
-
|
|
117
|
+
primary: {
|
|
118
118
|
subtle: 'var(--color-surface-solid-6)',
|
|
119
119
|
}
|
|
120
120
|
}
|
|
@@ -127,7 +127,7 @@ module.exports = frontile({
|
|
|
127
127
|
|
|
128
128
|
### Customizing On-Colors
|
|
129
129
|
|
|
130
|
-
The theme system automatically generates "on-color" variants (e.g., `on-
|
|
130
|
+
The theme system automatically generates "on-color" variants (e.g., `on-primary`, `on-success`) for semantic colors to ensure optimal text contrast. These colors are used as text/foreground colors on semantic backgrounds.
|
|
131
131
|
|
|
132
132
|
By default, on-colors are calculated using WCAG contrast guidelines and will be either pure white or pure black. However, you can override these auto-generated colors to match your brand or design requirements:
|
|
133
133
|
|
|
@@ -139,18 +139,16 @@ module.exports = frontile({
|
|
|
139
139
|
light: {
|
|
140
140
|
colors: {
|
|
141
141
|
// Define background colors as usual
|
|
142
|
-
|
|
142
|
+
primary: {
|
|
143
143
|
subtle: '#3b82f6',
|
|
144
144
|
soft: '#2563eb',
|
|
145
|
-
medium: '#1e40af',
|
|
146
145
|
strong: '#1e3a8a',
|
|
147
146
|
DEFAULT: '#1e40af'
|
|
148
147
|
},
|
|
149
148
|
// Override on-colors to use custom values
|
|
150
|
-
'on-
|
|
149
|
+
'on-primary': {
|
|
151
150
|
subtle: '#ffffff', // Pure white
|
|
152
151
|
soft: '#e0f2ff', // Light blue tint instead of pure white
|
|
153
|
-
medium: '#ffffff', // Pure white
|
|
154
152
|
strong: '#bfdbfe', // Lighter blue
|
|
155
153
|
DEFAULT: '#ffffff' // Pure white
|
|
156
154
|
}
|
|
@@ -167,13 +165,13 @@ module.exports = frontile({
|
|
|
167
165
|
themes: {
|
|
168
166
|
light: {
|
|
169
167
|
colors: {
|
|
170
|
-
|
|
168
|
+
primary: {
|
|
171
169
|
subtle: '#3b82f6',
|
|
172
|
-
|
|
170
|
+
DEFAULT: '#1e40af',
|
|
173
171
|
strong: '#1e3a8a',
|
|
174
172
|
},
|
|
175
|
-
'on-
|
|
176
|
-
|
|
173
|
+
'on-primary': {
|
|
174
|
+
DEFAULT: '#e0f2ff', // Only override the DEFAULT level, others auto-generate
|
|
177
175
|
}
|
|
178
176
|
}
|
|
179
177
|
}
|
|
@@ -182,8 +180,9 @@ module.exports = frontile({
|
|
|
182
180
|
```
|
|
183
181
|
|
|
184
182
|
You can override on-colors for any semantic color category:
|
|
185
|
-
- `on-neutral`, `on-
|
|
186
|
-
- `on-
|
|
183
|
+
- `on-neutral`, `on-primary`, `on-secondary`, `on-tertiary`, `on-success`,
|
|
184
|
+
`on-warning`, `on-danger`
|
|
185
|
+
- `on-surface-modal`
|
|
187
186
|
|
|
188
187
|
#### Option 2: Via CSS Variables
|
|
189
188
|
|
|
@@ -195,15 +194,15 @@ Override colors directly in your CSS:
|
|
|
195
194
|
@source '../../node_modules/@frontile';
|
|
196
195
|
|
|
197
196
|
@theme {
|
|
198
|
-
/* Override
|
|
199
|
-
--color-
|
|
200
|
-
--color-
|
|
201
|
-
--color-
|
|
197
|
+
/* Override primary colors */
|
|
198
|
+
--color-primary-subtle: #3b82f6;
|
|
199
|
+
--color-primary: #2563eb;
|
|
200
|
+
--color-primary-strong: #1d4ed8;
|
|
202
201
|
|
|
203
202
|
/* Manually define "on-" colors for text contrast */
|
|
204
|
-
--color-on-
|
|
205
|
-
--color-on-
|
|
206
|
-
--color-on-
|
|
203
|
+
--color-on-primary-subtle: #ffffff;
|
|
204
|
+
--color-on-primary: #ffffff;
|
|
205
|
+
--color-on-primary-strong: #ffffff;
|
|
207
206
|
}
|
|
208
207
|
```
|
|
209
208
|
|
|
@@ -1,63 +1,45 @@
|
|
|
1
1
|
export declare const semanticColors: {
|
|
2
2
|
light: {
|
|
3
3
|
neutral: import("./types").SemanticColorCategory;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
primary: import("./types").SemanticColorCategory;
|
|
5
|
+
secondary: import("./types").SemanticColorCategory;
|
|
6
|
+
tertiary: import("./types").SemanticColorCategory;
|
|
6
7
|
success: import("./types").SemanticColorCategory;
|
|
7
8
|
warning: import("./types").SemanticColorCategory;
|
|
8
9
|
danger: import("./types").SemanticColorCategory;
|
|
9
10
|
surface: import("./types").SurfaceColors;
|
|
10
11
|
'on-neutral'?: import("./types").OnColorCategory;
|
|
11
|
-
'on-
|
|
12
|
-
'on-
|
|
12
|
+
'on-primary'?: import("./types").OnColorCategory;
|
|
13
|
+
'on-secondary'?: import("./types").OnColorCategory;
|
|
14
|
+
'on-tertiary'?: import("./types").OnColorCategory;
|
|
13
15
|
'on-success'?: import("./types").OnColorCategory;
|
|
14
16
|
'on-warning'?: import("./types").OnColorCategory;
|
|
15
17
|
'on-danger'?: import("./types").OnColorCategory;
|
|
16
|
-
'on-surface-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
2?: string;
|
|
20
|
-
3?: string;
|
|
21
|
-
4?: string;
|
|
22
|
-
5?: string;
|
|
23
|
-
6?: string;
|
|
24
|
-
7?: string;
|
|
25
|
-
8?: string;
|
|
26
|
-
9?: string;
|
|
27
|
-
10?: string;
|
|
28
|
-
11?: string;
|
|
29
|
-
};
|
|
18
|
+
'on-surface-input'?: string;
|
|
19
|
+
'on-surface-modal'?: string;
|
|
20
|
+
background: import("./types").ColorScale;
|
|
30
21
|
divider: import("./types").ColorScale;
|
|
31
22
|
focus: import("./types").ColorScale;
|
|
32
23
|
};
|
|
33
24
|
dark: {
|
|
34
25
|
neutral: import("./types").SemanticColorCategory;
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
primary: import("./types").SemanticColorCategory;
|
|
27
|
+
secondary: import("./types").SemanticColorCategory;
|
|
28
|
+
tertiary: import("./types").SemanticColorCategory;
|
|
37
29
|
success: import("./types").SemanticColorCategory;
|
|
38
30
|
warning: import("./types").SemanticColorCategory;
|
|
39
31
|
danger: import("./types").SemanticColorCategory;
|
|
40
32
|
surface: import("./types").SurfaceColors;
|
|
41
33
|
'on-neutral'?: import("./types").OnColorCategory;
|
|
42
|
-
'on-
|
|
43
|
-
'on-
|
|
34
|
+
'on-primary'?: import("./types").OnColorCategory;
|
|
35
|
+
'on-secondary'?: import("./types").OnColorCategory;
|
|
36
|
+
'on-tertiary'?: import("./types").OnColorCategory;
|
|
44
37
|
'on-success'?: import("./types").OnColorCategory;
|
|
45
38
|
'on-warning'?: import("./types").OnColorCategory;
|
|
46
39
|
'on-danger'?: import("./types").OnColorCategory;
|
|
47
|
-
'on-surface-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
2?: string;
|
|
51
|
-
3?: string;
|
|
52
|
-
4?: string;
|
|
53
|
-
5?: string;
|
|
54
|
-
6?: string;
|
|
55
|
-
7?: string;
|
|
56
|
-
8?: string;
|
|
57
|
-
9?: string;
|
|
58
|
-
10?: string;
|
|
59
|
-
11?: string;
|
|
60
|
-
};
|
|
40
|
+
'on-surface-input'?: string;
|
|
41
|
+
'on-surface-modal'?: string;
|
|
42
|
+
background: import("./types").ColorScale;
|
|
61
43
|
divider: import("./types").ColorScale;
|
|
62
44
|
focus: import("./types").ColorScale;
|
|
63
45
|
};
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Absolute OKLCH colors that remain constant across light/dark themes.
|
|
5
5
|
*/
|
|
6
|
-
declare const black = "
|
|
7
|
-
declare const white = "
|
|
6
|
+
declare const black = "#000000";
|
|
7
|
+
declare const white = "#ffffff";
|
|
8
8
|
export { black, white };
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Frontile Semantic Colors
|
|
3
3
|
*
|
|
4
4
|
* Semantic color mappings for light and dark themes.
|
|
5
|
+
*
|
|
6
|
+
* Values are transcribed from the Beacon design tokens (Figma), where alpha is
|
|
7
|
+
* expressed as a 0–1 float. Here it is folded into the color as a two-digit
|
|
8
|
+
* hex suffix — e.g. 20% becomes `33` (round(0.2 * 255) = 51 = 0x33).
|
|
5
9
|
*/
|
|
6
10
|
import type { ThemeColors } from './types';
|
|
7
11
|
declare const _default: {
|