@sanity/ui 3.0.0-static.34 → 3.0.0-static.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_visual-editing.d.cts +853 -2
- package/dist/_visual-editing.d.ts +853 -2
- package/dist/css/index.cjs +356 -14
- package/dist/css/index.cjs.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/css/index.d.cts +1118 -783
- package/dist/css/index.d.ts +1118 -783
- package/dist/css/index.js +358 -14
- package/dist/css/index.js.map +1 -1
- package/dist/index.d.cts +2390 -995
- package/dist/index.d.ts +2390 -995
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.d.cts +446 -314
- package/dist/theme.d.ts +446 -314
- package/dist/theme.js.map +1 -1
- package/package.json +1 -1
- package/src/css/index.ts +4 -4
- package/src/css/primitives/root/root.ts +1 -1
- package/src/css/primitives/{_selectable/_selectable.css.ts → selectable/selectable.css.ts} +2 -2
- package/src/css/primitives/{_selectable → selectable}/selectable.ts +1 -1
- package/src/css/theme/buildCSSThemeTokens.ts +481 -0
- package/src/css/theme/defaultTheme.css.ts +64 -0
- package/src/css/types.ts +3 -3
- package/src/css/vars.css.ts +6 -6
- package/src/theme/buildTheme.ts +2 -2
- package/src/theme/types.ts +1 -1
- package/dist/portalProvider-DgNIVviV.d.ts +0 -575
- package/src/css/defaultTheme.css.ts +0 -520
- package/src/css/util.ts +0 -22
- /package/src/css/primitives/{_selectable → selectable}/types.ts +0 -0
package/dist/theme.d.cts
CHANGED
|
@@ -1,369 +1,501 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/** @public */
|
|
5
|
-
declare const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/** @public */
|
|
21
|
-
declare
|
|
1
|
+
import type {ColorHues} from '@sanity/color'
|
|
2
|
+
import type {ColorTint} from '@sanity/color'
|
|
3
|
+
|
|
4
|
+
/** @public */
|
|
5
|
+
export declare const AVATAR_COLORS: readonly [
|
|
6
|
+
'gray',
|
|
7
|
+
'blue',
|
|
8
|
+
'purple',
|
|
9
|
+
'magenta',
|
|
10
|
+
'red',
|
|
11
|
+
'orange',
|
|
12
|
+
'yellow',
|
|
13
|
+
'green',
|
|
14
|
+
'cyan',
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
/** @public */
|
|
18
|
+
export declare const AVATAR_SIZE: readonly [0, 1, 2, 3]
|
|
19
|
+
|
|
20
|
+
/** @public */
|
|
21
|
+
export declare type AvatarColor = (typeof AVATAR_COLORS)[number]
|
|
22
|
+
|
|
23
|
+
/** @public */
|
|
24
|
+
export declare interface AvatarColorProperties {
|
|
25
|
+
_hue: Hue
|
|
26
|
+
bg: ColorValue
|
|
27
|
+
fg: ColorValue
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** @public */
|
|
31
|
+
export declare type AvatarsColor = Record<AvatarColor, AvatarColorProperties>
|
|
32
|
+
|
|
33
|
+
/** @public */
|
|
34
|
+
export declare type AvatarSize = (typeof AVATAR_SIZE)[number]
|
|
35
|
+
|
|
36
|
+
/** @public */
|
|
37
|
+
export declare type BoxShadow = [number, number, number, number]
|
|
38
|
+
|
|
39
|
+
/** @public */
|
|
40
|
+
export declare function buildTheme(options?: ThemeOptions): Theme
|
|
41
|
+
|
|
42
|
+
/** @public */
|
|
43
|
+
export declare const BUTTON_MODES: readonly ['default', 'ghost', 'bleed']
|
|
44
|
+
|
|
45
|
+
/** @public */
|
|
46
|
+
export declare type ButtonMode = (typeof BUTTON_MODES)[number]
|
|
47
|
+
|
|
48
|
+
/** @public */
|
|
49
|
+
export declare const CARD_TONES: readonly [
|
|
50
|
+
'transparent',
|
|
51
|
+
'default',
|
|
52
|
+
'neutral',
|
|
53
|
+
'primary',
|
|
54
|
+
'suggest',
|
|
55
|
+
'positive',
|
|
56
|
+
'caution',
|
|
57
|
+
'critical',
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
/** @public */
|
|
61
|
+
export declare interface CardColorTokens {
|
|
62
|
+
_hue: Hue
|
|
63
|
+
avatar: AvatarsColor
|
|
64
|
+
backdrop: ColorValue
|
|
65
|
+
code: {
|
|
66
|
+
bg: ColorValue
|
|
67
|
+
fg: ColorValue
|
|
68
|
+
token: {
|
|
69
|
+
atrule: ColorValue
|
|
70
|
+
attrName: ColorValue
|
|
71
|
+
attrValue: ColorValue
|
|
72
|
+
attribute: ColorValue
|
|
73
|
+
boolean: ColorValue
|
|
74
|
+
builtin: ColorValue
|
|
75
|
+
cdata: ColorValue
|
|
76
|
+
char: ColorValue
|
|
77
|
+
class: ColorValue
|
|
78
|
+
className: ColorValue
|
|
79
|
+
comment: ColorValue
|
|
80
|
+
constant: ColorValue
|
|
81
|
+
deleted: ColorValue
|
|
82
|
+
doctype: ColorValue
|
|
83
|
+
entity: ColorValue
|
|
84
|
+
function: ColorValue
|
|
85
|
+
hexcode: ColorValue
|
|
86
|
+
id: ColorValue
|
|
87
|
+
important: ColorValue
|
|
88
|
+
inserted: ColorValue
|
|
89
|
+
keyword: ColorValue
|
|
90
|
+
number: ColorValue
|
|
91
|
+
operator: ColorValue
|
|
92
|
+
prolog: ColorValue
|
|
93
|
+
property: ColorValue
|
|
94
|
+
pseudoClass: ColorValue
|
|
95
|
+
pseudoElement: ColorValue
|
|
96
|
+
punctuation: ColorValue
|
|
97
|
+
regex: ColorValue
|
|
98
|
+
selector: ColorValue
|
|
99
|
+
string: ColorValue
|
|
100
|
+
symbol: ColorValue
|
|
101
|
+
tag: ColorValue
|
|
102
|
+
unit: ColorValue
|
|
103
|
+
url: ColorValue
|
|
104
|
+
variable: ColorValue
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
focusRing: ColorValue
|
|
108
|
+
link: {
|
|
109
|
+
fg: ColorValue
|
|
110
|
+
}
|
|
111
|
+
shadow: {
|
|
112
|
+
outline: ColorValue
|
|
113
|
+
umbra: ColorValue
|
|
114
|
+
penumbra: ColorValue
|
|
115
|
+
ambient: ColorValue
|
|
116
|
+
}
|
|
117
|
+
skeleton: {
|
|
118
|
+
from: ColorValue
|
|
119
|
+
to: ColorValue
|
|
120
|
+
}
|
|
121
|
+
variant: Record<ColorVariant, ElementsColorTokens>
|
|
122
|
+
}
|
|
123
|
+
|
|
22
124
|
/** @public */
|
|
23
|
-
declare
|
|
125
|
+
export declare type CardTone = (typeof CARD_TONES)[number]
|
|
126
|
+
|
|
24
127
|
/** @public */
|
|
25
|
-
declare
|
|
128
|
+
export declare type Color = Record<CardTone, CardColorTokens>
|
|
129
|
+
|
|
26
130
|
/** @public */
|
|
27
|
-
declare const COLOR_SCHEMES: readonly [
|
|
131
|
+
export declare const COLOR_SCHEMES: readonly ['light', 'dark']
|
|
132
|
+
|
|
28
133
|
/** @public */
|
|
29
|
-
declare const COLOR_VARIANTS: readonly [
|
|
134
|
+
export declare const COLOR_VARIANTS: readonly ['tinted', 'solid']
|
|
135
|
+
|
|
136
|
+
/** @internal */
|
|
137
|
+
export declare interface ColorInheritNode {
|
|
138
|
+
type: 'inherit'
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/** @internal */
|
|
142
|
+
export declare interface ColorNode {
|
|
143
|
+
type: 'color'
|
|
144
|
+
name: 'black' | 'white'
|
|
145
|
+
/** Between 0 and 1 */
|
|
146
|
+
opacity: number
|
|
147
|
+
/** Between 0 and 1 */
|
|
148
|
+
mix: number
|
|
149
|
+
}
|
|
150
|
+
|
|
30
151
|
/** @public */
|
|
31
|
-
declare
|
|
152
|
+
export declare type ColorScheme = (typeof COLOR_SCHEMES)[number]
|
|
153
|
+
|
|
154
|
+
/** @internal */
|
|
155
|
+
export declare interface ColorTintNode {
|
|
156
|
+
type: 'tint'
|
|
157
|
+
hue: Hue
|
|
158
|
+
tint: Tint
|
|
159
|
+
/** Between 0 and 1 */
|
|
160
|
+
opacity: number
|
|
161
|
+
/** Between 0 and 1 */
|
|
162
|
+
mix: number
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** @public */
|
|
166
|
+
export declare type ColorToken =
|
|
167
|
+
| `inherit`
|
|
168
|
+
| `black`
|
|
169
|
+
| `black/${ColorTokenOpacityValue}`
|
|
170
|
+
| `white`
|
|
171
|
+
| `white/${ColorTokenOpacityValue}`
|
|
172
|
+
| `${Hue}-${Tint}`
|
|
173
|
+
| `${Hue}-${Tint}/${ColorTokenOpacityValue}`
|
|
174
|
+
| `${Hue}-${Tint} ${number}%`
|
|
175
|
+
| `${Tint}`
|
|
176
|
+
| `${Tint}/${ColorTokenOpacityValue}`
|
|
177
|
+
| `${Tint} ${number}%`
|
|
178
|
+
|
|
179
|
+
/** @public */
|
|
180
|
+
export declare type ColorTokenOpacityValue = `0` | `0.${number}` | `1`
|
|
181
|
+
|
|
182
|
+
/** @public */
|
|
183
|
+
export declare type ColorTokens = Record<'*' | CardTone, CardColorTokens>
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Theme color values are tuples of [light, dark] color tokens.
|
|
187
|
+
*
|
|
188
|
+
* @public
|
|
189
|
+
*/
|
|
190
|
+
export declare type ColorValue = [ColorToken, ColorToken]
|
|
191
|
+
|
|
192
|
+
/** @public */
|
|
193
|
+
export declare type ColorVariant = (typeof COLOR_VARIANTS)[number]
|
|
194
|
+
|
|
195
|
+
/** @public */
|
|
196
|
+
export declare const CONTAINER: [...typeof CONTAINER_SCALE, 'auto']
|
|
197
|
+
|
|
198
|
+
/** @public */
|
|
199
|
+
export declare const CONTAINER_SCALE: readonly [0, 1, 2, 3, 4, 5]
|
|
200
|
+
|
|
201
|
+
/** @public */
|
|
202
|
+
export declare type ContainerScale = (typeof CONTAINER_SCALE)[number]
|
|
203
|
+
|
|
204
|
+
/** @public */
|
|
205
|
+
export declare type ContainerWidth = (typeof CONTAINER)[number]
|
|
206
|
+
|
|
207
|
+
/** @public */
|
|
208
|
+
export declare const ELEMENT_TONES: readonly [
|
|
209
|
+
'default',
|
|
210
|
+
'neutral',
|
|
211
|
+
'primary',
|
|
212
|
+
'suggest',
|
|
213
|
+
'positive',
|
|
214
|
+
'caution',
|
|
215
|
+
'critical',
|
|
216
|
+
]
|
|
217
|
+
|
|
218
|
+
/** @public */
|
|
219
|
+
export declare interface ElementColorTokens {
|
|
220
|
+
_hue: Hue
|
|
221
|
+
bg: {
|
|
222
|
+
0: ColorValue
|
|
223
|
+
4: ColorValue
|
|
224
|
+
}
|
|
225
|
+
border: {
|
|
226
|
+
0: ColorValue
|
|
227
|
+
4: ColorValue
|
|
228
|
+
}
|
|
229
|
+
fg: {
|
|
230
|
+
0: ColorValue
|
|
231
|
+
4: ColorValue
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
32
235
|
/** @public */
|
|
33
|
-
declare
|
|
236
|
+
export declare type ElementsColorTokens = Record<'*' | ElementTone, ElementColorTokens>
|
|
237
|
+
|
|
34
238
|
/** @public */
|
|
35
|
-
declare
|
|
239
|
+
export declare type ElementTone = (typeof ELEMENT_TONES)[number]
|
|
240
|
+
|
|
36
241
|
/** @public */
|
|
37
|
-
declare
|
|
242
|
+
export declare interface FocusRing {
|
|
243
|
+
offset: number
|
|
244
|
+
width: number
|
|
245
|
+
}
|
|
246
|
+
|
|
38
247
|
/** @public */
|
|
39
|
-
|
|
248
|
+
export declare interface Font {
|
|
249
|
+
family: string
|
|
250
|
+
featureSettings?: string
|
|
251
|
+
weight: FontWeights
|
|
252
|
+
scale: FontSize[]
|
|
253
|
+
}
|
|
254
|
+
|
|
40
255
|
/** @public */
|
|
41
|
-
|
|
256
|
+
export declare const FONT_CODE_SIZE: readonly [0, 1, 2, 3, 4]
|
|
257
|
+
|
|
42
258
|
/** @public */
|
|
43
|
-
|
|
259
|
+
export declare const FONT_HEADING_SIZE: readonly [0, 1, 2, 3, 4, 5]
|
|
260
|
+
|
|
44
261
|
/** @public */
|
|
45
|
-
|
|
262
|
+
export declare const FONT_LABEL_SIZE: readonly [0, 1, 2, 3, 4, 5]
|
|
263
|
+
|
|
46
264
|
/** @public */
|
|
47
|
-
|
|
265
|
+
export declare const FONT_TEXT_SIZE: readonly [0, 1, 2, 3, 4]
|
|
266
|
+
|
|
48
267
|
/** @public */
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
type: "inherit";
|
|
52
|
-
} | {
|
|
53
|
-
type: "black" | "white";
|
|
54
|
-
} | {
|
|
55
|
-
type: "hue";
|
|
56
|
-
hue: Hue;
|
|
57
|
-
tint: Tint;
|
|
58
|
-
};
|
|
59
|
-
opacity: number;
|
|
60
|
-
mix: number;
|
|
61
|
-
}
|
|
268
|
+
export declare type FontCodeSize = (typeof FONT_CODE_SIZE)[number]
|
|
269
|
+
|
|
62
270
|
/** @public */
|
|
63
|
-
type
|
|
271
|
+
export declare type FontHeadingSize = (typeof FONT_HEADING_SIZE)[number]
|
|
272
|
+
|
|
64
273
|
/** @public */
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
274
|
+
export declare type FontLabelSize = (typeof FONT_LABEL_SIZE)[number]
|
|
275
|
+
|
|
68
276
|
/** @public */
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
*/
|
|
75
|
-
type ColorValue = [ColorToken, ColorToken];
|
|
76
|
-
/** @public */
|
|
77
|
-
interface AvatarColorProperties {
|
|
78
|
-
_hue: Hue;
|
|
79
|
-
bg: ColorValue;
|
|
80
|
-
fg: ColorValue;
|
|
277
|
+
export declare interface Fonts {
|
|
278
|
+
code: Font
|
|
279
|
+
heading: Font
|
|
280
|
+
label: Font
|
|
281
|
+
text: Font
|
|
81
282
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
0: ColorValue;
|
|
93
|
-
4: ColorValue;
|
|
94
|
-
};
|
|
95
|
-
fg: {
|
|
96
|
-
0: ColorValue;
|
|
97
|
-
4: ColorValue;
|
|
98
|
-
};
|
|
283
|
+
|
|
284
|
+
/** @public */
|
|
285
|
+
export declare interface FontSize {
|
|
286
|
+
ascenderHeight: number
|
|
287
|
+
descenderHeight: number
|
|
288
|
+
fontSize: number
|
|
289
|
+
iconSize: number
|
|
290
|
+
letterSpacing: number
|
|
291
|
+
lineHeight: number
|
|
292
|
+
customIconSize: number
|
|
99
293
|
}
|
|
294
|
+
|
|
100
295
|
/** @public */
|
|
101
|
-
type
|
|
296
|
+
export declare type FontTextSize = (typeof FONT_TEXT_SIZE)[number]
|
|
297
|
+
|
|
102
298
|
/** @public */
|
|
103
|
-
type
|
|
299
|
+
export declare type FontWeight = 'regular' | 'medium' | 'semibold' | 'bold'
|
|
300
|
+
|
|
104
301
|
/** @public */
|
|
105
|
-
interface
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
bg: ColorValue;
|
|
111
|
-
fg: ColorValue;
|
|
112
|
-
token: {
|
|
113
|
-
atrule: ColorValue;
|
|
114
|
-
attrName: ColorValue;
|
|
115
|
-
attrValue: ColorValue;
|
|
116
|
-
attribute: ColorValue;
|
|
117
|
-
boolean: ColorValue;
|
|
118
|
-
builtin: ColorValue;
|
|
119
|
-
cdata: ColorValue;
|
|
120
|
-
char: ColorValue;
|
|
121
|
-
class: ColorValue;
|
|
122
|
-
className: ColorValue;
|
|
123
|
-
comment: ColorValue;
|
|
124
|
-
constant: ColorValue;
|
|
125
|
-
deleted: ColorValue;
|
|
126
|
-
doctype: ColorValue;
|
|
127
|
-
entity: ColorValue;
|
|
128
|
-
function: ColorValue;
|
|
129
|
-
hexcode: ColorValue;
|
|
130
|
-
id: ColorValue;
|
|
131
|
-
important: ColorValue;
|
|
132
|
-
inserted: ColorValue;
|
|
133
|
-
keyword: ColorValue;
|
|
134
|
-
number: ColorValue;
|
|
135
|
-
operator: ColorValue;
|
|
136
|
-
prolog: ColorValue;
|
|
137
|
-
property: ColorValue;
|
|
138
|
-
pseudoClass: ColorValue;
|
|
139
|
-
pseudoElement: ColorValue;
|
|
140
|
-
punctuation: ColorValue;
|
|
141
|
-
regex: ColorValue;
|
|
142
|
-
selector: ColorValue;
|
|
143
|
-
string: ColorValue;
|
|
144
|
-
symbol: ColorValue;
|
|
145
|
-
tag: ColorValue;
|
|
146
|
-
unit: ColorValue;
|
|
147
|
-
url: ColorValue;
|
|
148
|
-
variable: ColorValue;
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
focusRing: ColorValue;
|
|
152
|
-
link: {
|
|
153
|
-
fg: ColorValue;
|
|
154
|
-
};
|
|
155
|
-
shadow: {
|
|
156
|
-
outline: ColorValue;
|
|
157
|
-
umbra: ColorValue;
|
|
158
|
-
penumbra: ColorValue;
|
|
159
|
-
ambient: ColorValue;
|
|
160
|
-
};
|
|
161
|
-
skeleton: {
|
|
162
|
-
from: ColorValue;
|
|
163
|
-
to: ColorValue;
|
|
164
|
-
};
|
|
165
|
-
variant: Record<ColorVariant, ElementsColorTokens>;
|
|
302
|
+
export declare interface FontWeights {
|
|
303
|
+
regular: number
|
|
304
|
+
medium: number
|
|
305
|
+
semibold: number
|
|
306
|
+
bold: number
|
|
166
307
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
308
|
+
|
|
309
|
+
/** @public */
|
|
310
|
+
export declare type Hue = (typeof HUES)[number]
|
|
311
|
+
|
|
312
|
+
/** @public */
|
|
313
|
+
export declare const HUES: readonly [
|
|
314
|
+
'gray',
|
|
315
|
+
'blue',
|
|
316
|
+
'purple',
|
|
317
|
+
'magenta',
|
|
318
|
+
'red',
|
|
319
|
+
'orange',
|
|
320
|
+
'yellow',
|
|
321
|
+
'green',
|
|
322
|
+
'cyan',
|
|
323
|
+
]
|
|
324
|
+
|
|
325
|
+
/** @public */
|
|
326
|
+
export declare interface Input {
|
|
171
327
|
checkbox: {
|
|
172
|
-
size: number
|
|
173
|
-
focusRing: FocusRing
|
|
174
|
-
}
|
|
328
|
+
size: number
|
|
329
|
+
focusRing: FocusRing
|
|
330
|
+
}
|
|
175
331
|
radio: {
|
|
176
|
-
size: number
|
|
177
|
-
markSize: number
|
|
178
|
-
focusRing: FocusRing
|
|
179
|
-
}
|
|
332
|
+
size: number
|
|
333
|
+
markSize: number
|
|
334
|
+
focusRing: FocusRing
|
|
335
|
+
}
|
|
180
336
|
switch: {
|
|
181
|
-
width: number
|
|
182
|
-
height: number
|
|
183
|
-
padding: number
|
|
184
|
-
transitionDurationMs: number
|
|
185
|
-
transitionTimingFunction: string
|
|
186
|
-
focusRing: FocusRing
|
|
187
|
-
}
|
|
337
|
+
width: number
|
|
338
|
+
height: number
|
|
339
|
+
padding: number
|
|
340
|
+
transitionDurationMs: number
|
|
341
|
+
transitionTimingFunction: string
|
|
342
|
+
focusRing: FocusRing
|
|
343
|
+
}
|
|
188
344
|
border: {
|
|
189
|
-
width: number
|
|
190
|
-
}
|
|
345
|
+
width: number
|
|
346
|
+
}
|
|
191
347
|
select: {
|
|
192
|
-
focusRing: FocusRing
|
|
193
|
-
}
|
|
348
|
+
focusRing: FocusRing
|
|
349
|
+
}
|
|
194
350
|
text: {
|
|
195
|
-
focusRing: FocusRing
|
|
196
|
-
}
|
|
351
|
+
focusRing: FocusRing
|
|
352
|
+
}
|
|
197
353
|
}
|
|
354
|
+
|
|
198
355
|
/** @public */
|
|
199
|
-
|
|
200
|
-
/** @public */
|
|
201
|
-
type CardTone = (typeof CARD_TONES)[number];
|
|
202
|
-
/** @public */
|
|
203
|
-
type ElementTone = (typeof ELEMENT_TONES)[number];
|
|
204
|
-
/** @public */
|
|
205
|
-
type ButtonMode = (typeof BUTTON_MODES)[number];
|
|
206
|
-
/** @public */
|
|
207
|
-
interface ThemeAvatar {
|
|
208
|
-
sizes: {
|
|
209
|
-
/** Spacing between avatars in an <AvatarStack> component (px) */
|
|
210
|
-
distance: number;
|
|
211
|
-
/** Diameter of the avatar (px) */
|
|
212
|
-
size: number;
|
|
213
|
-
}[];
|
|
214
|
-
focusRing: FocusRing;
|
|
215
|
-
}
|
|
216
|
-
/** @public */
|
|
217
|
-
type BoxShadow = [number, number, number, number];
|
|
218
|
-
/** @public */
|
|
219
|
-
interface ShadowProperties {
|
|
220
|
-
umbra: BoxShadow;
|
|
221
|
-
penumbra: BoxShadow;
|
|
222
|
-
ambient: BoxShadow;
|
|
223
|
-
}
|
|
224
|
-
/** @public */
|
|
225
|
-
interface Layer {
|
|
356
|
+
export declare interface Layer {
|
|
226
357
|
dialog: {
|
|
227
|
-
zOffset: number
|
|
228
|
-
}
|
|
358
|
+
zOffset: number
|
|
359
|
+
}
|
|
229
360
|
popover: {
|
|
230
|
-
zOffset: number
|
|
231
|
-
}
|
|
361
|
+
zOffset: number
|
|
362
|
+
}
|
|
232
363
|
tooltip: {
|
|
233
|
-
zOffset: number
|
|
234
|
-
}
|
|
364
|
+
zOffset: number
|
|
365
|
+
}
|
|
235
366
|
}
|
|
367
|
+
|
|
236
368
|
/** @public */
|
|
237
|
-
interface
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
bold: number;
|
|
369
|
+
export declare interface Palette {
|
|
370
|
+
black: ColorTint
|
|
371
|
+
white: ColorTint
|
|
372
|
+
hues: ColorHues
|
|
242
373
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
374
|
+
|
|
375
|
+
/** @internal */
|
|
376
|
+
export declare function _parseColorToken(
|
|
377
|
+
str: ColorToken,
|
|
378
|
+
options: {
|
|
379
|
+
defaultHue: Hue
|
|
380
|
+
},
|
|
381
|
+
): TokenizeColorResult
|
|
382
|
+
|
|
383
|
+
/** @public */
|
|
384
|
+
export declare type PartialTokens<T> = T extends [ColorToken, ColorToken]
|
|
385
|
+
? T
|
|
386
|
+
: T extends {}
|
|
387
|
+
? {
|
|
388
|
+
[P in keyof T]?: PartialTokens<T[P]>
|
|
389
|
+
}
|
|
390
|
+
: T
|
|
391
|
+
|
|
392
|
+
/** @public */
|
|
393
|
+
export declare const RADIUS: readonly [0, 1, 2, 3, 4, 5, 6]
|
|
394
|
+
|
|
395
|
+
/** @public */
|
|
396
|
+
export declare type Radius = (typeof RADIUS)[number]
|
|
397
|
+
|
|
398
|
+
/** @public */
|
|
399
|
+
export declare interface ResolvedColorToken {
|
|
400
|
+
color:
|
|
401
|
+
| {
|
|
402
|
+
type: 'inherit'
|
|
403
|
+
}
|
|
404
|
+
| {
|
|
405
|
+
type: 'black' | 'white'
|
|
406
|
+
}
|
|
407
|
+
| {
|
|
408
|
+
type: 'hue'
|
|
409
|
+
hue: Hue
|
|
410
|
+
tint: Tint
|
|
411
|
+
}
|
|
412
|
+
opacity: number
|
|
413
|
+
mix: number
|
|
247
414
|
}
|
|
415
|
+
|
|
416
|
+
/** @internal */
|
|
417
|
+
export declare function resolveTokens(tokens?: PartialTokens<Tokens>): Tokens
|
|
418
|
+
|
|
248
419
|
/** @public */
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
type ContainerScale = (typeof CONTAINER_SCALE)[number];
|
|
252
|
-
/** @public */
|
|
253
|
-
type ContainerWidth = (typeof CONTAINER)[number];
|
|
254
|
-
/** @public */
|
|
255
|
-
type Radius = (typeof RADIUS)[number];
|
|
256
|
-
/** @public */
|
|
257
|
-
type Space = (typeof SPACE)[number];
|
|
258
|
-
/** @public */
|
|
259
|
-
type FontWeight = "regular" | "medium" | "semibold" | "bold";
|
|
260
|
-
/** @public */
|
|
261
|
-
type FontCodeSize = (typeof FONT_CODE_SIZE)[number];
|
|
262
|
-
/** @public */
|
|
263
|
-
type FontHeadingSize = (typeof FONT_HEADING_SIZE)[number];
|
|
264
|
-
/** @public */
|
|
265
|
-
type FontLabelSize = (typeof FONT_LABEL_SIZE)[number];
|
|
266
|
-
/** @public */
|
|
267
|
-
type FontTextSize = (typeof FONT_TEXT_SIZE)[number];
|
|
268
|
-
/** @public */
|
|
269
|
-
type Shadow = (typeof SHADOW)[number];
|
|
270
|
-
/** @public */
|
|
271
|
-
interface Options {
|
|
272
|
-
tokens?: PartialTokens<Tokens>;
|
|
273
|
-
}
|
|
420
|
+
export declare const SHADOW: readonly [0, 1, 2, 3, 4, 5]
|
|
421
|
+
|
|
274
422
|
/** @public */
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
white: ColorTint;
|
|
278
|
-
hues: ColorHues;
|
|
279
|
-
}
|
|
423
|
+
export declare type Shadow = (typeof SHADOW)[number]
|
|
424
|
+
|
|
280
425
|
/** @public */
|
|
281
|
-
interface
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
iconSize: number;
|
|
286
|
-
letterSpacing: number;
|
|
287
|
-
lineHeight: number;
|
|
288
|
-
customIconSize: number;
|
|
426
|
+
export declare interface ShadowProperties {
|
|
427
|
+
umbra: BoxShadow
|
|
428
|
+
penumbra: BoxShadow
|
|
429
|
+
ambient: BoxShadow
|
|
289
430
|
}
|
|
431
|
+
|
|
290
432
|
/** @public */
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
featureSettings?: string;
|
|
294
|
-
weight: FontWeights;
|
|
295
|
-
scale: FontSize[];
|
|
296
|
-
}
|
|
433
|
+
export declare const SPACE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
|
434
|
+
|
|
297
435
|
/** @public */
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
heading: Font;
|
|
301
|
-
label: Font;
|
|
302
|
-
text: Font;
|
|
303
|
-
}
|
|
436
|
+
export declare type Space = (typeof SPACE)[number]
|
|
437
|
+
|
|
304
438
|
/** @public */
|
|
305
|
-
interface Theme {
|
|
306
|
-
_version: 3
|
|
307
|
-
_tokens: Tokens
|
|
308
|
-
avatar: ThemeAvatar
|
|
439
|
+
export declare interface Theme {
|
|
440
|
+
_version: 3
|
|
441
|
+
_tokens: Tokens
|
|
442
|
+
avatar: ThemeAvatar
|
|
309
443
|
button: {
|
|
310
444
|
border: {
|
|
311
|
-
width: number
|
|
312
|
-
}
|
|
313
|
-
focusRing: FocusRing
|
|
314
|
-
textWeight: FontWeight
|
|
315
|
-
}
|
|
445
|
+
width: number
|
|
446
|
+
}
|
|
447
|
+
focusRing: FocusRing
|
|
448
|
+
textWeight: FontWeight
|
|
449
|
+
}
|
|
316
450
|
card: {
|
|
317
451
|
border: {
|
|
318
|
-
width: number
|
|
319
|
-
}
|
|
320
|
-
focusRing: FocusRing
|
|
452
|
+
width: number
|
|
453
|
+
}
|
|
454
|
+
focusRing: FocusRing
|
|
321
455
|
shadow: {
|
|
322
|
-
outline: number
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
color: Color
|
|
326
|
-
container: number[]
|
|
327
|
-
font: Fonts
|
|
328
|
-
input: Input
|
|
329
|
-
layer: Layer
|
|
330
|
-
media: number[]
|
|
331
|
-
palette: Palette
|
|
332
|
-
radius: Record<Radius, number
|
|
333
|
-
shadow: Record<Shadow, ShadowProperties | undefined
|
|
334
|
-
space: Record<Space, number
|
|
456
|
+
outline: number
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
color: Color
|
|
460
|
+
container: number[]
|
|
461
|
+
font: Fonts
|
|
462
|
+
input: Input
|
|
463
|
+
layer: Layer
|
|
464
|
+
media: number[]
|
|
465
|
+
palette: Palette
|
|
466
|
+
radius: Record<Radius, number>
|
|
467
|
+
shadow: Record<Shadow, ShadowProperties | undefined>
|
|
468
|
+
space: Record<Space, number>
|
|
335
469
|
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
interface ColorTintNode {
|
|
347
|
-
type: "tint";
|
|
348
|
-
hue: Hue;
|
|
349
|
-
tint: Tint;
|
|
350
|
-
/** Between 0 and 1 */
|
|
351
|
-
opacity: number;
|
|
352
|
-
/** Between 0 and 1 */
|
|
353
|
-
mix: number;
|
|
470
|
+
|
|
471
|
+
/** @public */
|
|
472
|
+
export declare interface ThemeAvatar {
|
|
473
|
+
sizes: {
|
|
474
|
+
/** Spacing between avatars in an <AvatarStack> component (px) */
|
|
475
|
+
distance: number
|
|
476
|
+
/** Diameter of the avatar (px) */
|
|
477
|
+
size: number
|
|
478
|
+
}[]
|
|
479
|
+
focusRing: FocusRing
|
|
354
480
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
481
|
+
|
|
482
|
+
/** @public */
|
|
483
|
+
export declare interface ThemeOptions {
|
|
484
|
+
tokens?: PartialTokens<Tokens>
|
|
358
485
|
}
|
|
359
|
-
|
|
360
|
-
type TokenizeColorResult = ColorNode | ColorTintNode | ColorInheritNode;
|
|
361
|
-
/** @internal */
|
|
362
|
-
declare function _parseColorToken(str: ColorToken, options: {
|
|
363
|
-
defaultHue: Hue;
|
|
364
|
-
}): TokenizeColorResult;
|
|
486
|
+
|
|
365
487
|
/** @public */
|
|
366
|
-
declare
|
|
488
|
+
export declare type Tint = (typeof TINTS)[number]
|
|
489
|
+
|
|
490
|
+
/** @public */
|
|
491
|
+
export declare const TINTS: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]
|
|
492
|
+
|
|
367
493
|
/** @internal */
|
|
368
|
-
declare
|
|
369
|
-
|
|
494
|
+
export declare type TokenizeColorResult = ColorNode | ColorTintNode | ColorInheritNode
|
|
495
|
+
|
|
496
|
+
/** @public */
|
|
497
|
+
export declare interface Tokens {
|
|
498
|
+
color: ColorTokens
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export {}
|