@sanity/ui 3.0.0-static.34 → 3.0.0-static.35

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/theme.d.ts CHANGED
@@ -1,369 +1,501 @@
1
- import { ColorHues, ColorTint } from "@sanity/color";
2
- /** @public */
3
- declare const HUES: readonly ["gray", "blue", "purple", "magenta", "red", "orange", "yellow", "green", "cyan"];
4
- /** @public */
5
- declare const TINTS: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
6
- /** @public */
7
- declare const AVATAR_SIZE: readonly [0, 1, 2, 3];
8
- /** @public */
9
- declare const CONTAINER_SCALE: readonly [0, 1, 2, 3, 4, 5];
10
- /** @public */
11
- declare const CONTAINER: [...typeof CONTAINER_SCALE, "auto"];
12
- /** @public */
13
- declare const RADIUS: readonly [0, 1, 2, 3, 4, 5, 6];
14
- /** @public */
15
- declare const SPACE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
16
- /** @public */
17
- declare const FONT_CODE_SIZE: readonly [0, 1, 2, 3, 4];
18
- /** @public */
19
- declare const FONT_HEADING_SIZE: readonly [0, 1, 2, 3, 4, 5];
20
- /** @public */
21
- declare const FONT_LABEL_SIZE: readonly [0, 1, 2, 3, 4, 5];
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?: Options): 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 const FONT_TEXT_SIZE: readonly [0, 1, 2, 3, 4];
125
+ export declare type CardTone = (typeof CARD_TONES)[number]
126
+
24
127
  /** @public */
25
- declare const SHADOW: readonly [0, 1, 2, 3, 4, 5];
128
+ export declare type Color = Record<CardTone, CardColorTokens>
129
+
26
130
  /** @public */
27
- declare const COLOR_SCHEMES: readonly ["light", "dark"];
131
+ export declare const COLOR_SCHEMES: readonly ['light', 'dark']
132
+
28
133
  /** @public */
29
- declare const COLOR_VARIANTS: readonly ["tinted", "solid"];
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 const AVATAR_COLORS: readonly ["gray", "blue", "purple", "magenta", "red", "orange", "yellow", "green", "cyan"];
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 const CARD_TONES: readonly ["transparent", "default", "neutral", "primary", "suggest", "positive", "caution", "critical"];
236
+ export declare type ElementsColorTokens = Record<'*' | ElementTone, ElementColorTokens>
237
+
34
238
  /** @public */
35
- declare const ELEMENT_TONES: readonly ["default", "neutral", "primary", "suggest", "positive", "caution", "critical"];
239
+ export declare type ElementTone = (typeof ELEMENT_TONES)[number]
240
+
36
241
  /** @public */
37
- declare const BUTTON_MODES: readonly ["default", "ghost", "bleed"];
242
+ export declare interface FocusRing {
243
+ offset: number
244
+ width: number
245
+ }
246
+
38
247
  /** @public */
39
- type Hue = (typeof HUES)[number];
248
+ export declare interface Font {
249
+ family: string
250
+ featureSettings?: string
251
+ weight: FontWeights
252
+ scale: FontSize[]
253
+ }
254
+
40
255
  /** @public */
41
- type Tint = (typeof TINTS)[number];
256
+ export declare const FONT_CODE_SIZE: readonly [0, 1, 2, 3, 4]
257
+
42
258
  /** @public */
43
- type AvatarColor = (typeof AVATAR_COLORS)[number];
259
+ export declare const FONT_HEADING_SIZE: readonly [0, 1, 2, 3, 4, 5]
260
+
44
261
  /** @public */
45
- type ColorTokenOpacityValue = `0` | `0.${number}` | `1`;
262
+ export declare const FONT_LABEL_SIZE: readonly [0, 1, 2, 3, 4, 5]
263
+
46
264
  /** @public */
47
- type ColorToken = `inherit` | `black` | `black/${ColorTokenOpacityValue}` | `white` | `white/${ColorTokenOpacityValue}` | `${Hue}-${Tint}` | `${Hue}-${Tint}/${ColorTokenOpacityValue}` | `${Hue}-${Tint} ${number}%` | `${Tint}` | `${Tint}/${ColorTokenOpacityValue}` | `${Tint} ${number}%`;
265
+ export declare const FONT_TEXT_SIZE: readonly [0, 1, 2, 3, 4]
266
+
48
267
  /** @public */
49
- interface ResolvedColorToken {
50
- color: {
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 ColorTokens = Record<"*" | CardTone, CardColorTokens>;
271
+ export declare type FontHeadingSize = (typeof FONT_HEADING_SIZE)[number]
272
+
64
273
  /** @public */
65
- interface Tokens {
66
- color: ColorTokens;
67
- }
274
+ export declare type FontLabelSize = (typeof FONT_LABEL_SIZE)[number]
275
+
68
276
  /** @public */
69
- type PartialTokens<T> = T extends [ColorToken, ColorToken] ? T : T extends {} ? { [P in keyof T]?: PartialTokens<T[P]> } : T;
70
- /**
71
- * Theme color values are tuples of [light, dark] color tokens.
72
- *
73
- * @public
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
- /** @public */
83
- type AvatarsColor = Record<AvatarColor, AvatarColorProperties>;
84
- /** @public */
85
- interface ElementColorTokens {
86
- _hue: Hue;
87
- bg: {
88
- 0: ColorValue;
89
- 4: ColorValue;
90
- };
91
- border: {
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 ElementsColorTokens = Record<"*" | ElementTone, ElementColorTokens>;
296
+ export declare type FontTextSize = (typeof FONT_TEXT_SIZE)[number]
297
+
102
298
  /** @public */
103
- type ColorVariant = (typeof COLOR_VARIANTS)[number];
299
+ export declare type FontWeight = 'regular' | 'medium' | 'semibold' | 'bold'
300
+
104
301
  /** @public */
105
- interface CardColorTokens {
106
- _hue: Hue;
107
- avatar: AvatarsColor;
108
- backdrop: ColorValue;
109
- code: {
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
- /** @public */
168
- type Color = Record<CardTone, CardColorTokens>;
169
- /** @public */
170
- interface Input {
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
- type ColorScheme = (typeof COLOR_SCHEMES)[number];
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 FontWeights {
238
- regular: number;
239
- medium: number;
240
- semibold: number;
241
- bold: number;
369
+ export declare interface Options {
370
+ tokens?: PartialTokens<Tokens>
242
371
  }
372
+
243
373
  /** @public */
244
- interface FocusRing {
245
- offset: number;
246
- width: number;
374
+ export declare interface Palette {
375
+ black: ColorTint
376
+ white: ColorTint
377
+ hues: ColorHues
247
378
  }
248
- /** @public */
249
- type AvatarSize = (typeof AVATAR_SIZE)[number];
250
- /** @public */
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>;
379
+
380
+ /** @internal */
381
+ export declare function _parseColorToken(
382
+ str: ColorToken,
383
+ options: {
384
+ defaultHue: Hue
385
+ },
386
+ ): TokenizeColorResult
387
+
388
+ /** @public */
389
+ export declare type PartialTokens<T> = T extends [ColorToken, ColorToken]
390
+ ? T
391
+ : T extends {}
392
+ ? {
393
+ [P in keyof T]?: PartialTokens<T[P]>
394
+ }
395
+ : T
396
+
397
+ /** @public */
398
+ export declare const RADIUS: readonly [0, 1, 2, 3, 4, 5, 6]
399
+
400
+ /** @public */
401
+ export declare type Radius = (typeof RADIUS)[number]
402
+
403
+ /** @public */
404
+ export declare interface ResolvedColorToken {
405
+ color:
406
+ | {
407
+ type: 'inherit'
408
+ }
409
+ | {
410
+ type: 'black' | 'white'
411
+ }
412
+ | {
413
+ type: 'hue'
414
+ hue: Hue
415
+ tint: Tint
416
+ }
417
+ opacity: number
418
+ mix: number
273
419
  }
420
+
421
+ /** @internal */
422
+ export declare function resolveTokens(tokens?: PartialTokens<Tokens>): Tokens
423
+
274
424
  /** @public */
275
- interface Palette {
276
- black: ColorTint;
277
- white: ColorTint;
278
- hues: ColorHues;
279
- }
425
+ export declare const SHADOW: readonly [0, 1, 2, 3, 4, 5]
426
+
280
427
  /** @public */
281
- interface FontSize {
282
- ascenderHeight: number;
283
- descenderHeight: number;
284
- fontSize: number;
285
- iconSize: number;
286
- letterSpacing: number;
287
- lineHeight: number;
288
- customIconSize: number;
289
- }
428
+ export declare type Shadow = (typeof SHADOW)[number]
429
+
290
430
  /** @public */
291
- interface Font {
292
- family: string;
293
- featureSettings?: string;
294
- weight: FontWeights;
295
- scale: FontSize[];
431
+ export declare interface ShadowProperties {
432
+ umbra: BoxShadow
433
+ penumbra: BoxShadow
434
+ ambient: BoxShadow
296
435
  }
436
+
297
437
  /** @public */
298
- interface Fonts {
299
- code: Font;
300
- heading: Font;
301
- label: Font;
302
- text: Font;
303
- }
438
+ export declare const SPACE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
439
+
440
+ /** @public */
441
+ export declare type Space = (typeof SPACE)[number]
442
+
304
443
  /** @public */
305
- interface Theme {
306
- _version: 3;
307
- _tokens: Tokens;
308
- avatar: ThemeAvatar;
444
+ export declare interface Theme {
445
+ _version: 3
446
+ _tokens: Tokens
447
+ avatar: ThemeAvatar
309
448
  button: {
310
449
  border: {
311
- width: number;
312
- };
313
- focusRing: FocusRing;
314
- textWeight: FontWeight;
315
- };
450
+ width: number
451
+ }
452
+ focusRing: FocusRing
453
+ textWeight: FontWeight
454
+ }
316
455
  card: {
317
456
  border: {
318
- width: number;
319
- };
320
- focusRing: FocusRing;
457
+ width: number
458
+ }
459
+ focusRing: FocusRing
321
460
  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>;
335
- }
336
- /** @internal */
337
- interface ColorNode {
338
- type: "color";
339
- name: "black" | "white";
340
- /** Between 0 and 1 */
341
- opacity: number;
342
- /** Between 0 and 1 */
343
- mix: number;
344
- }
345
- /** @internal */
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;
461
+ outline: number
462
+ }
463
+ }
464
+ color: Color
465
+ container: number[]
466
+ font: Fonts
467
+ input: Input
468
+ layer: Layer
469
+ media: number[]
470
+ palette: Palette
471
+ radius: Record<Radius, number>
472
+ shadow: Record<Shadow, ShadowProperties | undefined>
473
+ space: Record<Space, number>
354
474
  }
355
- /** @internal */
356
- interface ColorInheritNode {
357
- type: "inherit";
475
+
476
+ /** @public */
477
+ export declare interface ThemeAvatar {
478
+ sizes: {
479
+ /** Spacing between avatars in an <AvatarStack> component (px) */
480
+ distance: number
481
+ /** Diameter of the avatar (px) */
482
+ size: number
483
+ }[]
484
+ focusRing: FocusRing
358
485
  }
359
- /** @internal */
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 function buildTheme(options?: Options): Theme;
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 function resolveTokens(tokens?: PartialTokens<Tokens>): Tokens;
369
- export { AVATAR_COLORS, AVATAR_SIZE, AvatarColor, AvatarColorProperties, AvatarSize, AvatarsColor, BUTTON_MODES, BoxShadow, ButtonMode, CARD_TONES, COLOR_SCHEMES, COLOR_VARIANTS, CONTAINER, CONTAINER_SCALE, CardColorTokens, CardTone, Color, ColorInheritNode, ColorNode, ColorScheme, ColorTintNode, ColorToken, ColorTokenOpacityValue, ColorTokens, ColorValue, ColorVariant, ContainerScale, ContainerWidth, ELEMENT_TONES, ElementColorTokens, ElementTone, ElementsColorTokens, FONT_CODE_SIZE, FONT_HEADING_SIZE, FONT_LABEL_SIZE, FONT_TEXT_SIZE, FocusRing, Font, FontCodeSize, FontHeadingSize, FontLabelSize, FontSize, FontTextSize, FontWeight, FontWeights, Fonts, HUES, Hue, Input, Layer, Options, Palette, PartialTokens, RADIUS, Radius, ResolvedColorToken, SHADOW, SPACE, Shadow, ShadowProperties, Space, TINTS, Theme, ThemeAvatar, Tint, TokenizeColorResult, Tokens, _parseColorToken, buildTheme, resolveTokens };
494
+ export declare type TokenizeColorResult = ColorNode | ColorTintNode | ColorInheritNode
495
+
496
+ /** @public */
497
+ export declare interface Tokens {
498
+ color: ColorTokens
499
+ }
500
+
501
+ export {}