@frontile/theme 0.18.0-alpha.5 → 0.18.0-alpha.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.
- package/README.md +20 -22
- package/declarations/colors/config.d.ts +8 -32
- package/declarations/colors/palette-absolute.d.ts +2 -2
- package/declarations/colors/palette.d.ts +1 -1
- package/declarations/colors/types.d.ts +102 -151
- package/declarations/components/button.d.ts +25 -0
- package/declarations/components/dropdown.d.ts +2 -2
- package/declarations/components/forms/forms.d.ts +9 -4
- package/declarations/components/listbox.d.ts +5 -0
- package/declarations/components/popover.d.ts +2 -2
- package/declarations/components/progress-bar.d.ts +15 -0
- package/declarations/components/spinner.d.ts +5 -0
- package/declarations/plugin/default-config.d.ts +8 -32
- package/dist/colors.js +1 -1
- package/dist/config-C7vXQ4-a.js +539 -0
- package/dist/config-C7vXQ4-a.js.map +1 -0
- package/dist/config-CBa5Uj8t.js +523 -0
- package/dist/config-CBa5Uj8t.js.map +1 -0
- package/dist/config-CHoxd5sI.js +523 -0
- package/dist/config-CHoxd5sI.js.map +1 -0
- package/dist/config-CWYC8yYP.js +535 -0
- package/dist/config-CWYC8yYP.js.map +1 -0
- package/dist/config-DloXBqGi.js +370 -0
- package/dist/config-DloXBqGi.js.map +1 -0
- package/dist/config-mOd3rEnK.js +414 -0
- package/dist/config-mOd3rEnK.js.map +1 -0
- package/dist/forms-legacy-CrC9B8no.js +1869 -0
- package/dist/forms-legacy-CrC9B8no.js.map +1 -0
- package/dist/forms-legacy-DpUs6ftu.js +1944 -0
- package/dist/forms-legacy-DpUs6ftu.js.map +1 -0
- package/dist/forms-legacy-zJdd4qoI.js +1944 -0
- package/dist/forms-legacy-zJdd4qoI.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/plugin.js +4 -4
- package/dist/plugin.js.map +1 -1
- package/dist/styles/font-faces.css +52 -8
- package/dist/styles/typography.css +213 -117
- package/package.json +22 -20
- 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/styles/font-faces.css +52 -8
- package/src/styles/typography.css +213 -117
- 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,7 +180,7 @@ module.exports = frontile({
|
|
|
182
180
|
```
|
|
183
181
|
|
|
184
182
|
You can override on-colors for any semantic color category:
|
|
185
|
-
- `on-neutral`, `on-
|
|
183
|
+
- `on-neutral`, `on-primary`, `on-accent`, `on-success`, `on-warning`, `on-danger`
|
|
186
184
|
- `on-surface-solid` (with numeric keys 0-11)
|
|
187
185
|
|
|
188
186
|
#### Option 2: Via CSS Variables
|
|
@@ -195,15 +193,15 @@ Override colors directly in your CSS:
|
|
|
195
193
|
@source '../../node_modules/@frontile';
|
|
196
194
|
|
|
197
195
|
@theme {
|
|
198
|
-
/* Override
|
|
199
|
-
--color-
|
|
200
|
-
--color-
|
|
201
|
-
--color-
|
|
196
|
+
/* Override primary colors */
|
|
197
|
+
--color-primary-subtle: #3b82f6;
|
|
198
|
+
--color-primary: #2563eb;
|
|
199
|
+
--color-primary-strong: #1d4ed8;
|
|
202
200
|
|
|
203
201
|
/* Manually define "on-" colors for text contrast */
|
|
204
|
-
--color-on-
|
|
205
|
-
--color-on-
|
|
206
|
-
--color-on-
|
|
202
|
+
--color-on-primary-subtle: #ffffff;
|
|
203
|
+
--color-on-primary: #ffffff;
|
|
204
|
+
--color-on-primary-strong: #ffffff;
|
|
207
205
|
}
|
|
208
206
|
```
|
|
209
207
|
|
|
@@ -1,63 +1,39 @@
|
|
|
1
1
|
export declare const semanticColors: {
|
|
2
2
|
light: {
|
|
3
3
|
neutral: import("./types").SemanticColorCategory;
|
|
4
|
-
|
|
4
|
+
primary: import("./types").SemanticColorCategory;
|
|
5
5
|
accent: import("./types").SemanticColorCategory;
|
|
6
6
|
success: import("./types").SemanticColorCategory;
|
|
7
7
|
warning: import("./types").SemanticColorCategory;
|
|
8
8
|
danger: import("./types").SemanticColorCategory;
|
|
9
9
|
surface: import("./types").SurfaceColors;
|
|
10
10
|
'on-neutral'?: import("./types").OnColorCategory;
|
|
11
|
-
'on-
|
|
11
|
+
'on-primary'?: import("./types").OnColorCategory;
|
|
12
12
|
'on-accent'?: import("./types").OnColorCategory;
|
|
13
13
|
'on-success'?: import("./types").OnColorCategory;
|
|
14
14
|
'on-warning'?: import("./types").OnColorCategory;
|
|
15
15
|
'on-danger'?: import("./types").OnColorCategory;
|
|
16
|
-
'on-surface-
|
|
17
|
-
|
|
18
|
-
1?: string;
|
|
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
|
-
};
|
|
16
|
+
'on-surface-modal'?: string;
|
|
17
|
+
background: import("./types").ColorScale;
|
|
30
18
|
divider: import("./types").ColorScale;
|
|
31
19
|
focus: import("./types").ColorScale;
|
|
32
20
|
};
|
|
33
21
|
dark: {
|
|
34
22
|
neutral: import("./types").SemanticColorCategory;
|
|
35
|
-
|
|
23
|
+
primary: import("./types").SemanticColorCategory;
|
|
36
24
|
accent: import("./types").SemanticColorCategory;
|
|
37
25
|
success: import("./types").SemanticColorCategory;
|
|
38
26
|
warning: import("./types").SemanticColorCategory;
|
|
39
27
|
danger: import("./types").SemanticColorCategory;
|
|
40
28
|
surface: import("./types").SurfaceColors;
|
|
41
29
|
'on-neutral'?: import("./types").OnColorCategory;
|
|
42
|
-
'on-
|
|
30
|
+
'on-primary'?: import("./types").OnColorCategory;
|
|
43
31
|
'on-accent'?: import("./types").OnColorCategory;
|
|
44
32
|
'on-success'?: import("./types").OnColorCategory;
|
|
45
33
|
'on-warning'?: import("./types").OnColorCategory;
|
|
46
34
|
'on-danger'?: import("./types").OnColorCategory;
|
|
47
|
-
'on-surface-
|
|
48
|
-
|
|
49
|
-
1?: string;
|
|
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
|
-
};
|
|
35
|
+
'on-surface-modal'?: string;
|
|
36
|
+
background: import("./types").ColorScale;
|
|
61
37
|
divider: import("./types").ColorScale;
|
|
62
38
|
focus: import("./types").ColorScale;
|
|
63
39
|
};
|
|
@@ -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 };
|
|
@@ -13,6 +13,7 @@ export type ColorScale = Partial<{
|
|
|
13
13
|
DEFAULT: string;
|
|
14
14
|
}> | string;
|
|
15
15
|
export type BaseColors = {
|
|
16
|
+
background: ColorScale;
|
|
16
17
|
divider: ColorScale;
|
|
17
18
|
focus: ColorScale;
|
|
18
19
|
};
|
|
@@ -20,16 +21,61 @@ export type SemanticBaseColors = {
|
|
|
20
21
|
light: BaseColors;
|
|
21
22
|
dark: BaseColors;
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Semantic color levels are split into two bands that share one emphasis
|
|
26
|
+
* vocabulary but are consumed by different CSS properties. In Tailwind's
|
|
27
|
+
* shared-palette model a token name maps to exactly one color value, so the
|
|
28
|
+
* band a level belongs to is what tells you which property it is meant for:
|
|
29
|
+
* surface-band levels are fills, ink-band levels are legible foregrounds.
|
|
30
|
+
*
|
|
31
|
+
* Every name describes emphasis RANK, never brightness. A level can be dark in
|
|
32
|
+
* light mode and light in dark mode — interaction direction inverts between
|
|
33
|
+
* schemes (light lightens on hover / darkens on press; dark does the reverse)
|
|
34
|
+
* — so a brightness word like "deep" or "light" would be a lie in one theme.
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* Surface band — fills. Backgrounds and decorative borders for filled/tinted
|
|
38
|
+
* surfaces, ordered low → high emphasis:
|
|
39
|
+
*
|
|
40
|
+
* subtle → muted → soft → DEFAULT → firm
|
|
41
|
+
*
|
|
42
|
+
* `DEFAULT` is the resting fill (the bare `bg-{category}` class); `firm` is the
|
|
43
|
+
* most emphatic fill, e.g. a pressed/active background.
|
|
44
|
+
*/
|
|
45
|
+
export interface SurfaceBand {
|
|
46
|
+
/** Faintest tint — hairline fills, tonal resting backgrounds. */
|
|
24
47
|
subtle: string;
|
|
48
|
+
/** Light tint — hover on tonal fills, chip/close-button backgrounds. */
|
|
25
49
|
muted: string;
|
|
50
|
+
/** Soft fill — the hover step for solid fills. */
|
|
26
51
|
soft: string;
|
|
27
|
-
|
|
52
|
+
/** Resting fill — the bare `bg-{category}` / `border-{category}` token. */
|
|
28
53
|
DEFAULT: string;
|
|
54
|
+
/** Most emphatic fill — pressed/active backgrounds. */
|
|
29
55
|
firm: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Ink band — legible foregrounds. Text, and the borders of outlined controls,
|
|
59
|
+
* that must stay readable on the page and on surface-band fills, ordered
|
|
60
|
+
* low → high emphasis:
|
|
61
|
+
*
|
|
62
|
+
* strong → bolder
|
|
63
|
+
*
|
|
64
|
+
* `strong` is the default legible foreground; `bolder` is the highest-emphasis
|
|
65
|
+
* foreground (headings, hover/active text).
|
|
66
|
+
*/
|
|
67
|
+
export interface InkBand {
|
|
68
|
+
/** Default legible foreground — body text, outlined-control text/border. */
|
|
30
69
|
strong: string;
|
|
70
|
+
/** Highest-emphasis foreground — headings, hover/active text. */
|
|
31
71
|
bolder: string;
|
|
32
|
-
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A semantic color category is the union of both bands: fills (surface band)
|
|
75
|
+
* plus legible foregrounds (ink band). See {@link SurfaceBand} and
|
|
76
|
+
* {@link InkBand} for how each level is intended to be consumed.
|
|
77
|
+
*/
|
|
78
|
+
export interface SemanticColorCategory extends SurfaceBand, InkBand {
|
|
33
79
|
}
|
|
34
80
|
/**
|
|
35
81
|
* Optional on-color overrides for semantic color categories.
|
|
@@ -42,60 +88,53 @@ export interface SemanticColorCategory {
|
|
|
42
88
|
* that match your brand or design requirements.
|
|
43
89
|
*
|
|
44
90
|
* @example
|
|
45
|
-
* // Override on-colors for
|
|
91
|
+
* // Override on-colors for primary
|
|
46
92
|
* const colors: Partial<ThemeColors> = {
|
|
47
|
-
*
|
|
93
|
+
* primary: {
|
|
48
94
|
* subtle: '#3b82f6',
|
|
49
|
-
* medium: '#1e40af',
|
|
50
95
|
* DEFAULT: '#1e40af'
|
|
51
96
|
* },
|
|
52
|
-
* 'on-
|
|
97
|
+
* 'on-primary': {
|
|
53
98
|
* subtle: '#ffffff',
|
|
54
|
-
*
|
|
55
|
-
* DEFAULT: '#ffffff'
|
|
99
|
+
* DEFAULT: '#e0f2ff' // Light blue tint instead of pure white
|
|
56
100
|
* }
|
|
57
101
|
* };
|
|
58
102
|
*/
|
|
59
103
|
export interface OnColorCategory {
|
|
60
104
|
subtle?: string;
|
|
105
|
+
muted?: string;
|
|
61
106
|
soft?: string;
|
|
62
|
-
medium?: string;
|
|
63
|
-
strong?: string;
|
|
64
107
|
DEFAULT?: string;
|
|
108
|
+
firm?: string;
|
|
109
|
+
strong?: string;
|
|
110
|
+
bolder?: string;
|
|
65
111
|
}
|
|
66
112
|
export interface SurfaceOverlay {
|
|
67
113
|
subtle: string;
|
|
68
114
|
soft: string;
|
|
69
115
|
medium: string;
|
|
70
116
|
strong: string;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
6: string;
|
|
86
|
-
7: string;
|
|
87
|
-
8: string;
|
|
88
|
-
9: string;
|
|
89
|
-
10: string;
|
|
90
|
-
11: string;
|
|
117
|
+
/**
|
|
118
|
+
* Heavy backdrop tint for modal/drawer scrims, one step past `strong`.
|
|
119
|
+
*
|
|
120
|
+
* Follows the same darken-in-light / lighten-in-dark direction as
|
|
121
|
+
* `subtle`/`soft`/`medium`/`strong`, just at much higher opacity (75%) so it
|
|
122
|
+
* reads as a deliberate backdrop rather than a hover/elevation hint. A black
|
|
123
|
+
* tint is used in light mode; a black scrim in dark mode would barely
|
|
124
|
+
* register against an already near-black page, so dark mode lightens
|
|
125
|
+
* (white tint) instead — same visual weight, opposite direction.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* <div className="fixed inset-0 bg-surface-overlay-scrim">
|
|
129
|
+
*/
|
|
130
|
+
scrim: string;
|
|
91
131
|
}
|
|
92
132
|
/**
|
|
93
133
|
* Surface color system defining background colors for UI containers.
|
|
94
134
|
*
|
|
95
|
-
* Surface tokens organize backgrounds into
|
|
135
|
+
* Surface tokens organize backgrounds into two categories:
|
|
96
136
|
* 1. **Roles**: Component context tokens (where in layout hierarchy)
|
|
97
|
-
* 2. **
|
|
98
|
-
* 3. **Overlay**: Translucent layers for elevation and depth
|
|
137
|
+
* 2. **Overlay**: Translucent layers for elevation and depth
|
|
99
138
|
*/
|
|
100
139
|
export interface SurfaceColors {
|
|
101
140
|
/**
|
|
@@ -115,29 +154,9 @@ export interface SurfaceColors {
|
|
|
115
154
|
* <div className="bg-surface-card hover:bg-surface-overlay-subtle" />
|
|
116
155
|
*
|
|
117
156
|
* // Stacking overlays for depth
|
|
118
|
-
* <div className="bg-surface-
|
|
157
|
+
* <div className="bg-surface-app bg-surface-overlay-soft" />
|
|
119
158
|
*/
|
|
120
159
|
overlay: SurfaceOverlay;
|
|
121
|
-
/**
|
|
122
|
-
* Base 12-step achromatic scale (0-11) for surface backgrounds.
|
|
123
|
-
*
|
|
124
|
-
* Foundation for all surface roles, providing a consistent grayscale progression
|
|
125
|
-
* that inverts between themes to support the elevation-luminance principle.
|
|
126
|
-
*
|
|
127
|
-
* Light theme: 0 (white) → 11 (black) - darkening progression
|
|
128
|
-
* Dark theme: 0 (black) → 11 (white) - lightening progression
|
|
129
|
-
*
|
|
130
|
-
* The scale is bidirectional and theme-agnostic. Surface roles typically
|
|
131
|
-
* reference steps 0-3, while higher steps (4-11) are available for custom
|
|
132
|
-
* surface needs and direct usage.
|
|
133
|
-
*
|
|
134
|
-
* @example
|
|
135
|
-
* // Using solid scale directly
|
|
136
|
-
* bg-surface-solid-0 // Extreme anchor: white (light) or black (dark)
|
|
137
|
-
* bg-surface-solid-1 // Near-white (light) or near-black (dark)
|
|
138
|
-
* bg-surface-solid-11 // Opposite extreme: black (light) or white (dark)
|
|
139
|
-
*/
|
|
140
|
-
solid: SurfaceSolid;
|
|
141
160
|
/**
|
|
142
161
|
* Root application background layer (hierarchy level 0).
|
|
143
162
|
*
|
|
@@ -203,141 +222,73 @@ export interface SurfaceColors {
|
|
|
203
222
|
*/
|
|
204
223
|
card: string;
|
|
205
224
|
/**
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
* Used for navigation sidebars, inspector panels, and tool palettes.
|
|
209
|
-
* Provides consistent container background for grouped sections.
|
|
225
|
+
* Form control surface for inputs, checkboxes, radios, and similar controls
|
|
226
|
+
* (hierarchy level -1).
|
|
210
227
|
*
|
|
211
|
-
* Light: Pure white
|
|
212
|
-
* Dark:
|
|
213
|
-
*
|
|
214
|
-
* @example
|
|
215
|
-
* // Navigation sidebar
|
|
216
|
-
* <aside className="bg-surface-panel border-r border-neutral-subtle">
|
|
217
|
-
* <nav>...</nav>
|
|
218
|
-
* </aside>
|
|
219
|
-
*
|
|
220
|
-
* @example
|
|
221
|
-
* // Inspector panel
|
|
222
|
-
* <div className="bg-surface-panel p-4">
|
|
223
|
-
* <h3>Properties</h3>
|
|
224
|
-
* </div>
|
|
225
|
-
*/
|
|
226
|
-
panel: string;
|
|
227
|
-
/**
|
|
228
|
-
* Popover and tooltip container surface (hierarchy level 2).
|
|
229
|
-
*
|
|
230
|
-
* Used for dropdown menus, tooltips, context menus, and toast notifications.
|
|
231
|
-
* Provides higher elevation than cards for floating UI elements.
|
|
232
|
-
*
|
|
233
|
-
* Light: Pure white, high elevation
|
|
234
|
-
* Dark: Medium gray, lighter than card for higher elevation
|
|
235
|
-
*
|
|
236
|
-
* @example
|
|
237
|
-
* // Dropdown menu
|
|
238
|
-
* <div className="bg-surface-popover rounded-md shadow-lg border border-neutral-subtle">
|
|
239
|
-
* <MenuItem />
|
|
240
|
-
* </div>
|
|
241
|
-
*
|
|
242
|
-
* @example
|
|
243
|
-
* // Tooltip
|
|
244
|
-
* <div className="bg-surface-popover px-2 py-1 rounded text-sm">
|
|
245
|
-
* Helpful tip
|
|
246
|
-
* </div>
|
|
247
|
-
*/
|
|
248
|
-
popover: string;
|
|
249
|
-
/**
|
|
250
|
-
* Recessed surface for inputs, wells, and embedded content (hierarchy level -1).
|
|
251
|
-
*
|
|
252
|
-
* Context-adaptive overlay that always darkens relative to its parent surface
|
|
253
|
-
* via alpha compositing. Used for text inputs, search fields, code blocks,
|
|
254
|
-
* and embedded content that should appear recessed.
|
|
255
|
-
*
|
|
256
|
-
* Works on any surface: Translucent black overlay that darkens the parent
|
|
257
|
-
* surface, creating a consistent recessed appearance across all contexts.
|
|
228
|
+
* Light: Pure white
|
|
229
|
+
* Dark: Near-black, the darkest step in the neutral scale
|
|
258
230
|
*
|
|
259
231
|
* @example
|
|
260
232
|
* // Text input
|
|
261
|
-
* <input className="bg-surface-
|
|
262
|
-
*
|
|
263
|
-
* @example
|
|
264
|
-
* // Code block
|
|
265
|
-
* <pre className="bg-surface-inset rounded-md p-4">
|
|
266
|
-
* <code>const example = true;</code>
|
|
267
|
-
* </pre>
|
|
268
|
-
*
|
|
269
|
-
* @example
|
|
270
|
-
* // Search field
|
|
271
|
-
* <div className="bg-surface-inset rounded-full px-4 py-2">
|
|
272
|
-
* <input type="search" />
|
|
273
|
-
* </div>
|
|
233
|
+
* <input className="bg-surface-input border border-neutral rounded px-3 py-2" />
|
|
274
234
|
*/
|
|
275
|
-
|
|
235
|
+
input: string;
|
|
276
236
|
/**
|
|
277
|
-
* Modal and
|
|
237
|
+
* Modal, drawer, and popover container surface, highest elevation
|
|
238
|
+
* (hierarchy level 3).
|
|
278
239
|
*
|
|
279
|
-
* Used for modal dialogs, drawers, and other
|
|
280
|
-
* above all other surfaces.
|
|
240
|
+
* Used for modal dialogs, drawers, dropdown menus, and other floating
|
|
241
|
+
* content that appears above all other surfaces. Modals and drawers pair it
|
|
242
|
+
* with a scrim backdrop to focus attention.
|
|
281
243
|
*
|
|
282
244
|
* Light: Pure white, highest elevation
|
|
283
245
|
* Dark: Medium gray, lightest surface for maximum elevation
|
|
284
246
|
*
|
|
285
247
|
* @example
|
|
286
248
|
* // Modal dialog
|
|
287
|
-
* <div className="bg-surface-
|
|
249
|
+
* <div className="bg-surface-modal rounded-lg shadow-2xl p-6">
|
|
288
250
|
* <h2>Confirm Action</h2>
|
|
289
251
|
* <p>Are you sure?</p>
|
|
290
252
|
* </div>
|
|
291
253
|
*
|
|
292
254
|
* @example
|
|
293
255
|
* // Drawer with backdrop
|
|
294
|
-
* <div className="fixed inset-0 bg-surface-overlay-
|
|
295
|
-
* <aside className="bg-surface-
|
|
256
|
+
* <div className="fixed inset-0 bg-surface-overlay-scrim">
|
|
257
|
+
* <aside className="bg-surface-modal h-full w-80">
|
|
296
258
|
* <DrawerContent />
|
|
297
259
|
* </aside>
|
|
298
260
|
* </div>
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* // Dropdown menu
|
|
264
|
+
* <div className="bg-surface-modal rounded-md shadow-lg border border-neutral-subtle">
|
|
265
|
+
* <MenuItem />
|
|
266
|
+
* </div>
|
|
299
267
|
*/
|
|
300
|
-
|
|
268
|
+
modal: string;
|
|
301
269
|
}
|
|
302
270
|
export interface ThemeColors {
|
|
303
271
|
neutral: SemanticColorCategory;
|
|
304
|
-
|
|
272
|
+
primary: SemanticColorCategory;
|
|
305
273
|
accent: SemanticColorCategory;
|
|
306
274
|
success: SemanticColorCategory;
|
|
307
275
|
warning: SemanticColorCategory;
|
|
308
276
|
danger: SemanticColorCategory;
|
|
309
277
|
surface: SurfaceColors;
|
|
310
278
|
'on-neutral'?: OnColorCategory;
|
|
311
|
-
'on-
|
|
279
|
+
'on-primary'?: OnColorCategory;
|
|
312
280
|
'on-accent'?: OnColorCategory;
|
|
313
281
|
'on-success'?: OnColorCategory;
|
|
314
282
|
'on-warning'?: OnColorCategory;
|
|
315
283
|
'on-danger'?: OnColorCategory;
|
|
316
284
|
/**
|
|
317
|
-
* Optional on-color
|
|
285
|
+
* Optional on-color override for the `surface-modal` background.
|
|
318
286
|
*
|
|
319
|
-
*
|
|
287
|
+
* By default, auto-generated for optimal WCAG contrast, same as the other
|
|
288
|
+
* semantic categories.
|
|
320
289
|
*
|
|
321
290
|
* @example
|
|
322
|
-
*
|
|
323
|
-
* 'on-surface-solid': {
|
|
324
|
-
* 0: '#000000', // Text color on surface-solid-0
|
|
325
|
-
* 5: '#ffffff', // Text color on surface-solid-5
|
|
326
|
-
* 11: '#ffffff' // Text color on surface-solid-11
|
|
327
|
-
* }
|
|
291
|
+
* 'on-surface-modal': '#111111'
|
|
328
292
|
*/
|
|
329
|
-
'on-surface-
|
|
330
|
-
0?: string;
|
|
331
|
-
1?: string;
|
|
332
|
-
2?: string;
|
|
333
|
-
3?: string;
|
|
334
|
-
4?: string;
|
|
335
|
-
5?: string;
|
|
336
|
-
6?: string;
|
|
337
|
-
7?: string;
|
|
338
|
-
8?: string;
|
|
339
|
-
9?: string;
|
|
340
|
-
10?: string;
|
|
341
|
-
11?: string;
|
|
342
|
-
};
|
|
293
|
+
'on-surface-modal'?: string;
|
|
343
294
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const button: import("tailwind-variants").TVReturnType<{
|
|
2
2
|
appearance: {
|
|
3
3
|
default: string;
|
|
4
|
+
soft: string;
|
|
4
5
|
outlined: string;
|
|
5
6
|
minimal: string;
|
|
6
7
|
tonal: string;
|
|
@@ -70,6 +71,8 @@ declare const button: import("tailwind-variants").TVReturnType<{
|
|
|
70
71
|
md: string;
|
|
71
72
|
lg: string;
|
|
72
73
|
xl: string;
|
|
74
|
+
'2xl': string;
|
|
75
|
+
'3xl': string;
|
|
73
76
|
};
|
|
74
77
|
isInGroup: {
|
|
75
78
|
true: string[];
|
|
@@ -92,6 +95,8 @@ declare const button: import("tailwind-variants").TVReturnType<{
|
|
|
92
95
|
md: string;
|
|
93
96
|
lg: string;
|
|
94
97
|
xl: string;
|
|
98
|
+
'2xl': string;
|
|
99
|
+
'3xl': string;
|
|
95
100
|
};
|
|
96
101
|
isInGroup: {
|
|
97
102
|
true: string[];
|
|
@@ -160,6 +165,8 @@ declare const button: import("tailwind-variants").TVReturnType<{
|
|
|
160
165
|
md: string;
|
|
161
166
|
lg: string;
|
|
162
167
|
xl: string;
|
|
168
|
+
'2xl': string;
|
|
169
|
+
'3xl': string;
|
|
163
170
|
};
|
|
164
171
|
isInGroup: {
|
|
165
172
|
true: string[];
|
|
@@ -182,6 +189,8 @@ declare const button: import("tailwind-variants").TVReturnType<{
|
|
|
182
189
|
md: string;
|
|
183
190
|
lg: string;
|
|
184
191
|
xl: string;
|
|
192
|
+
'2xl': string;
|
|
193
|
+
'3xl': string;
|
|
185
194
|
};
|
|
186
195
|
isInGroup: {
|
|
187
196
|
true: string[];
|
|
@@ -204,6 +213,8 @@ declare const button: import("tailwind-variants").TVReturnType<{
|
|
|
204
213
|
md: string;
|
|
205
214
|
lg: string;
|
|
206
215
|
xl: string;
|
|
216
|
+
'2xl': string;
|
|
217
|
+
'3xl': string;
|
|
207
218
|
};
|
|
208
219
|
isInGroup: {
|
|
209
220
|
true: string[];
|
|
@@ -226,6 +237,8 @@ declare const button: import("tailwind-variants").TVReturnType<{
|
|
|
226
237
|
md: string;
|
|
227
238
|
lg: string;
|
|
228
239
|
xl: string;
|
|
240
|
+
'2xl': string;
|
|
241
|
+
'3xl': string;
|
|
229
242
|
};
|
|
230
243
|
isInGroup: {
|
|
231
244
|
true: string[];
|
|
@@ -300,6 +313,8 @@ declare const toggleButton: import("tailwind-variants").TVReturnType<{
|
|
|
300
313
|
md: string;
|
|
301
314
|
lg: string;
|
|
302
315
|
xl: string;
|
|
316
|
+
'2xl': string;
|
|
317
|
+
'3xl': string;
|
|
303
318
|
};
|
|
304
319
|
isInGroup: {
|
|
305
320
|
true: string[];
|
|
@@ -322,6 +337,8 @@ declare const toggleButton: import("tailwind-variants").TVReturnType<{
|
|
|
322
337
|
md: string;
|
|
323
338
|
lg: string;
|
|
324
339
|
xl: string;
|
|
340
|
+
'2xl': string;
|
|
341
|
+
'3xl': string;
|
|
325
342
|
};
|
|
326
343
|
isInGroup: {
|
|
327
344
|
true: string[];
|
|
@@ -390,6 +407,8 @@ declare const toggleButton: import("tailwind-variants").TVReturnType<{
|
|
|
390
407
|
md: string;
|
|
391
408
|
lg: string;
|
|
392
409
|
xl: string;
|
|
410
|
+
'2xl': string;
|
|
411
|
+
'3xl': string;
|
|
393
412
|
};
|
|
394
413
|
isInGroup: {
|
|
395
414
|
true: string[];
|
|
@@ -412,6 +431,8 @@ declare const toggleButton: import("tailwind-variants").TVReturnType<{
|
|
|
412
431
|
md: string;
|
|
413
432
|
lg: string;
|
|
414
433
|
xl: string;
|
|
434
|
+
'2xl': string;
|
|
435
|
+
'3xl': string;
|
|
415
436
|
};
|
|
416
437
|
isInGroup: {
|
|
417
438
|
true: string[];
|
|
@@ -434,6 +455,8 @@ declare const toggleButton: import("tailwind-variants").TVReturnType<{
|
|
|
434
455
|
md: string;
|
|
435
456
|
lg: string;
|
|
436
457
|
xl: string;
|
|
458
|
+
'2xl': string;
|
|
459
|
+
'3xl': string;
|
|
437
460
|
};
|
|
438
461
|
isInGroup: {
|
|
439
462
|
true: string[];
|
|
@@ -456,6 +479,8 @@ declare const toggleButton: import("tailwind-variants").TVReturnType<{
|
|
|
456
479
|
md: string;
|
|
457
480
|
lg: string;
|
|
458
481
|
xl: string;
|
|
482
|
+
'2xl': string;
|
|
483
|
+
'3xl': string;
|
|
459
484
|
};
|
|
460
485
|
isInGroup: {
|
|
461
486
|
true: string[];
|