@sanity/ui 2.0.0-alpha.13 → 2.0.0-alpha.14
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/index.cjs.mjs +27 -0
- package/dist/index.d.ts +337 -7
- package/dist/index.esm.js +745 -58
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +772 -58
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/theme/_internal/__workshop__/build/story.tsx +178 -0
- package/src/theme/_internal/__workshop__/build/theme.ts +3 -0
- package/src/theme/_internal/__workshop__/index.ts +14 -0
- package/src/theme/_internal/build/buildTheme.test.ts +78 -0
- package/src/theme/_internal/build/buildTheme.ts +15 -0
- package/src/theme/_internal/build/colorTheme/buildColorTheme.test.ts +185 -0
- package/src/theme/_internal/build/colorTheme/buildColorTheme.ts +222 -0
- package/src/theme/_internal/build/colorTheme/renderColorTheme.ts +226 -0
- package/src/theme/_internal/build/defaults/colorPalette.ts +8 -0
- package/src/theme/_internal/build/defaults/colorTokens.ts +124 -0
- package/src/theme/_internal/build/helpers.ts +64 -0
- package/src/theme/_internal/build/index.ts +1 -0
- package/src/theme/_internal/config/helpers.ts +47 -0
- package/src/theme/_internal/config/index.ts +3 -0
- package/src/theme/_internal/config/token/index.ts +2 -0
- package/src/theme/_internal/config/token/parseTokenKey.test.ts +72 -0
- package/src/theme/_internal/config/token/parseTokenKey.ts +88 -0
- package/src/theme/_internal/config/token/parseTokenValue.test.ts +45 -0
- package/src/theme/_internal/config/token/parseTokenValue.ts +123 -0
- package/src/theme/_internal/config/types.ts +126 -0
- package/src/theme/_internal/constants.ts +48 -0
- package/src/theme/_internal/helpers.ts +19 -0
- package/src/theme/_internal/index.ts +5 -0
- package/src/theme/_internal/types.ts +72 -0
- package/src/theme/index.ts +1 -0
package/dist/index.cjs.mjs
CHANGED
|
@@ -9,6 +9,18 @@ export const BoundaryElementProvider = cjs.BoundaryElementProvider;
|
|
|
9
9
|
export const Box = cjs.Box;
|
|
10
10
|
export const Breadcrumbs = cjs.Breadcrumbs;
|
|
11
11
|
export const Button = cjs.Button;
|
|
12
|
+
export const COLOR_BASE_TONES = cjs.COLOR_BASE_TONES;
|
|
13
|
+
export const COLOR_BLEND_MODES = cjs.COLOR_BLEND_MODES;
|
|
14
|
+
export const COLOR_BUTTON_MODES = cjs.COLOR_BUTTON_MODES;
|
|
15
|
+
export const COLOR_CONFIG_BASE_KEYS = cjs.COLOR_CONFIG_BASE_KEYS;
|
|
16
|
+
export const COLOR_CONFIG_BASE_TONES = cjs.COLOR_CONFIG_BASE_TONES;
|
|
17
|
+
export const COLOR_CONFIG_BLEND_KEYS = cjs.COLOR_CONFIG_BLEND_KEYS;
|
|
18
|
+
export const COLOR_CONFIG_STATE_KEYS = cjs.COLOR_CONFIG_STATE_KEYS;
|
|
19
|
+
export const COLOR_CONFIG_STATE_TONES = cjs.COLOR_CONFIG_STATE_TONES;
|
|
20
|
+
export const COLOR_HUES = cjs.COLOR_HUES;
|
|
21
|
+
export const COLOR_STATES = cjs.COLOR_STATES;
|
|
22
|
+
export const COLOR_STATE_TONES = cjs.COLOR_STATE_TONES;
|
|
23
|
+
export const COLOR_TINTS = cjs.COLOR_TINTS;
|
|
12
24
|
export const Card = cjs.Card;
|
|
13
25
|
export const Checkbox = cjs.Checkbox;
|
|
14
26
|
export const Code = cjs.Code;
|
|
@@ -74,12 +86,25 @@ export const _raf = cjs._raf;
|
|
|
74
86
|
export const _raf2 = cjs._raf2;
|
|
75
87
|
export const _responsive = cjs._responsive;
|
|
76
88
|
export const attemptFocus = cjs.attemptFocus;
|
|
89
|
+
export const buildTheme = cjs.buildTheme;
|
|
77
90
|
export const containsOrEqualsElement = cjs.containsOrEqualsElement;
|
|
78
91
|
export const createColorTheme = cjs.createColorTheme;
|
|
79
92
|
export const focusFirstDescendant = cjs.focusFirstDescendant;
|
|
80
93
|
export const focusLastDescendant = cjs.focusLastDescendant;
|
|
81
94
|
export const hexToRgb = cjs.hexToRgb;
|
|
82
95
|
export const hslToRgb = cjs.hslToRgb;
|
|
96
|
+
export const isColorBlendModeValue = cjs.isColorBlendModeValue;
|
|
97
|
+
export const isColorButtonMode = cjs.isColorButtonMode;
|
|
98
|
+
export const isColorConfigBaseKey = cjs.isColorConfigBaseKey;
|
|
99
|
+
export const isColorConfigBaseTone = cjs.isColorConfigBaseTone;
|
|
100
|
+
export const isColorConfigBlendKey = cjs.isColorConfigBlendKey;
|
|
101
|
+
export const isColorConfigStateKey = cjs.isColorConfigStateKey;
|
|
102
|
+
export const isColorConfigStateTone = cjs.isColorConfigStateTone;
|
|
103
|
+
export const isColorHueValue = cjs.isColorHueValue;
|
|
104
|
+
export const isColorOpacityValue = cjs.isColorOpacityValue;
|
|
105
|
+
export const isColorTintValue = cjs.isColorTintValue;
|
|
106
|
+
export const isColorTokenValue = cjs.isColorTokenValue;
|
|
107
|
+
export const isColorValue = cjs.isColorValue;
|
|
83
108
|
export const isFocusable = cjs.isFocusable;
|
|
84
109
|
export const isHTMLAnchorElement = cjs.isHTMLAnchorElement;
|
|
85
110
|
export const isHTMLButtonElement = cjs.isHTMLButtonElement;
|
|
@@ -89,6 +114,8 @@ export const isHTMLSelectElement = cjs.isHTMLSelectElement;
|
|
|
89
114
|
export const isHTMLTextAreaElement = cjs.isHTMLTextAreaElement;
|
|
90
115
|
export const multiply = cjs.multiply;
|
|
91
116
|
export const parseColor = cjs.parseColor;
|
|
117
|
+
export const parseTokenKey = cjs.parseTokenKey;
|
|
118
|
+
export const parseTokenValue = cjs.parseTokenValue;
|
|
92
119
|
export const rem = cjs.rem;
|
|
93
120
|
export const responsiveCodeFontStyle = cjs.responsiveCodeFontStyle;
|
|
94
121
|
export const responsiveHeadingFont = cjs.responsiveHeadingFont;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import {AnimationEventHandler} from 'react'
|
|
4
4
|
import {AriaRole} from 'react'
|
|
5
5
|
import {ClipboardEventHandler} from 'react'
|
|
6
|
+
import {ColorTint} from '@sanity/color'
|
|
6
7
|
import {Component} from 'react'
|
|
7
8
|
import {CompositionEventHandler} from 'react'
|
|
8
9
|
import {CSSProperties} from 'react'
|
|
@@ -49,6 +50,7 @@ export declare const Autocomplete: <Option extends BaseAutocompleteOption>(
|
|
|
49
50
|
props: AutocompleteProps<Option> &
|
|
50
51
|
Omit<
|
|
51
52
|
HTMLProps<HTMLInputElement>,
|
|
53
|
+
| 'type'
|
|
52
54
|
| 'value'
|
|
53
55
|
| 'ref'
|
|
54
56
|
| 'id'
|
|
@@ -66,7 +68,6 @@ export declare const Autocomplete: <Option extends BaseAutocompleteOption>(
|
|
|
66
68
|
| 'onSelect'
|
|
67
69
|
| 'as'
|
|
68
70
|
| 'autoComplete'
|
|
69
|
-
| 'type'
|
|
70
71
|
> & {
|
|
71
72
|
ref?: Ref<HTMLInputElement> | undefined
|
|
72
73
|
},
|
|
@@ -335,6 +336,14 @@ export declare interface BaseAutocompleteOption {
|
|
|
335
336
|
value: string
|
|
336
337
|
}
|
|
337
338
|
|
|
339
|
+
export declare interface BaseColorTokens {
|
|
340
|
+
_blend?: ColorBlendModeTokenValue
|
|
341
|
+
_hue?: ColorHueValue
|
|
342
|
+
bg?: ColorTokenValue
|
|
343
|
+
fg?: ColorTokenValue
|
|
344
|
+
border?: ColorTokenValue
|
|
345
|
+
}
|
|
346
|
+
|
|
338
347
|
/**
|
|
339
348
|
* @public
|
|
340
349
|
*/
|
|
@@ -443,7 +452,7 @@ export declare type BoxSizing = 'content' | 'border'
|
|
|
443
452
|
*/
|
|
444
453
|
export declare const Breadcrumbs: ForwardRefExoticComponent<
|
|
445
454
|
BreadcrumbsProps &
|
|
446
|
-
Omit<HTMLProps<HTMLOListElement>, '
|
|
455
|
+
Omit<HTMLProps<HTMLOListElement>, 'type' | 'ref' | 'as'> &
|
|
447
456
|
RefAttributes<HTMLOListElement>
|
|
448
457
|
>
|
|
449
458
|
|
|
@@ -456,6 +465,9 @@ export declare interface BreadcrumbsProps {
|
|
|
456
465
|
space?: number | number[]
|
|
457
466
|
}
|
|
458
467
|
|
|
468
|
+
/** @internal */
|
|
469
|
+
export declare function buildTheme(config?: ThemeConfig): TMP_Theme
|
|
470
|
+
|
|
459
471
|
/**
|
|
460
472
|
* @public
|
|
461
473
|
*/
|
|
@@ -464,11 +476,18 @@ export declare const Button: ForwardRefExoticComponent<
|
|
|
464
476
|
RefAttributes<HTMLButtonElement>
|
|
465
477
|
>
|
|
466
478
|
|
|
479
|
+
export declare interface ButtonColorTokens
|
|
480
|
+
extends Partial<Record<ColorButtonMode, ButtonModeColorTokens>> {
|
|
481
|
+
_hue?: ColorHueValue
|
|
482
|
+
}
|
|
483
|
+
|
|
467
484
|
/**
|
|
468
485
|
* @public
|
|
469
486
|
*/
|
|
470
487
|
export declare type ButtonMode = 'default' | 'ghost' | 'bleed'
|
|
471
488
|
|
|
489
|
+
export declare type ButtonModeColorTokens = Partial<Record<'*' | ColorState, StateColorTokens>>
|
|
490
|
+
|
|
472
491
|
/**
|
|
473
492
|
* @public
|
|
474
493
|
*/
|
|
@@ -557,7 +576,7 @@ export declare type CardTone = ThemeColorToneKey | 'inherit'
|
|
|
557
576
|
* @public
|
|
558
577
|
*/
|
|
559
578
|
export declare const Checkbox: ForwardRefExoticComponent<
|
|
560
|
-
Omit<Omit<HTMLProps<HTMLInputElement>, '
|
|
579
|
+
Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & CheckboxProps, 'ref'> &
|
|
561
580
|
RefAttributes<HTMLInputElement>
|
|
562
581
|
>
|
|
563
582
|
|
|
@@ -611,6 +630,165 @@ export declare interface CodeSkeletonProps extends SkeletonProps {
|
|
|
611
630
|
size?: number | number[]
|
|
612
631
|
}
|
|
613
632
|
|
|
633
|
+
export declare const COLOR_BASE_TONES: readonly [
|
|
634
|
+
'transparent',
|
|
635
|
+
'default',
|
|
636
|
+
'primary',
|
|
637
|
+
'positive',
|
|
638
|
+
'caution',
|
|
639
|
+
'critical',
|
|
640
|
+
]
|
|
641
|
+
|
|
642
|
+
export declare const COLOR_BLEND_MODES: readonly ['multiply', 'screen']
|
|
643
|
+
|
|
644
|
+
export declare const COLOR_BUTTON_MODES: readonly ['default', 'ghost', 'bleed']
|
|
645
|
+
|
|
646
|
+
export declare const COLOR_CONFIG_BASE_KEYS: readonly [
|
|
647
|
+
'_hue',
|
|
648
|
+
'bg',
|
|
649
|
+
'fg',
|
|
650
|
+
'border',
|
|
651
|
+
'focusRing',
|
|
652
|
+
'muted/fg',
|
|
653
|
+
'link/fg',
|
|
654
|
+
'code/bg',
|
|
655
|
+
'code/fg',
|
|
656
|
+
'shadow/outline',
|
|
657
|
+
'shadow/umbra',
|
|
658
|
+
'shadow/penumbra',
|
|
659
|
+
'shadow/ambient',
|
|
660
|
+
'skeleton/from',
|
|
661
|
+
'skeleton/to',
|
|
662
|
+
]
|
|
663
|
+
|
|
664
|
+
export declare const COLOR_CONFIG_BASE_TONES: readonly [
|
|
665
|
+
'*',
|
|
666
|
+
'transparent',
|
|
667
|
+
'default',
|
|
668
|
+
'primary',
|
|
669
|
+
'positive',
|
|
670
|
+
'caution',
|
|
671
|
+
'critical',
|
|
672
|
+
]
|
|
673
|
+
|
|
674
|
+
export declare const COLOR_CONFIG_BLEND_KEYS: readonly ['_blend']
|
|
675
|
+
|
|
676
|
+
export declare const COLOR_CONFIG_STATE_KEYS: readonly [
|
|
677
|
+
'_hue',
|
|
678
|
+
'bg',
|
|
679
|
+
'fg',
|
|
680
|
+
'border',
|
|
681
|
+
'focusRing',
|
|
682
|
+
'muted/fg',
|
|
683
|
+
'link/fg',
|
|
684
|
+
'code/bg',
|
|
685
|
+
'code/fg',
|
|
686
|
+
'skeleton/from',
|
|
687
|
+
'skeleton/to',
|
|
688
|
+
]
|
|
689
|
+
|
|
690
|
+
export declare const COLOR_CONFIG_STATE_TONES: readonly [
|
|
691
|
+
'*',
|
|
692
|
+
'default',
|
|
693
|
+
'primary',
|
|
694
|
+
'positive',
|
|
695
|
+
'caution',
|
|
696
|
+
'critical',
|
|
697
|
+
]
|
|
698
|
+
|
|
699
|
+
export declare const COLOR_HUES: readonly [
|
|
700
|
+
'gray',
|
|
701
|
+
'cyan',
|
|
702
|
+
'blue',
|
|
703
|
+
'purple',
|
|
704
|
+
'magenta',
|
|
705
|
+
'red',
|
|
706
|
+
'orange',
|
|
707
|
+
'yellow',
|
|
708
|
+
'green',
|
|
709
|
+
]
|
|
710
|
+
|
|
711
|
+
export declare const COLOR_STATE_TONES: readonly [
|
|
712
|
+
'default',
|
|
713
|
+
'primary',
|
|
714
|
+
'positive',
|
|
715
|
+
'caution',
|
|
716
|
+
'critical',
|
|
717
|
+
]
|
|
718
|
+
|
|
719
|
+
export declare const COLOR_STATES: readonly [
|
|
720
|
+
'enabled',
|
|
721
|
+
'hovered',
|
|
722
|
+
'pressed',
|
|
723
|
+
'selected',
|
|
724
|
+
'disabled',
|
|
725
|
+
]
|
|
726
|
+
|
|
727
|
+
export declare const COLOR_TINTS: readonly [
|
|
728
|
+
'50',
|
|
729
|
+
'100',
|
|
730
|
+
'200',
|
|
731
|
+
'300',
|
|
732
|
+
'400',
|
|
733
|
+
'500',
|
|
734
|
+
'600',
|
|
735
|
+
'700',
|
|
736
|
+
'800',
|
|
737
|
+
'900',
|
|
738
|
+
'950',
|
|
739
|
+
]
|
|
740
|
+
|
|
741
|
+
export declare type ColorBaseTone = (typeof COLOR_BASE_TONES)[number]
|
|
742
|
+
|
|
743
|
+
export declare type ColorBlendModeTokenValue = [ColorBlendModeValue, ColorBlendModeValue]
|
|
744
|
+
|
|
745
|
+
export declare type ColorBlendModeValue = (typeof COLOR_BLEND_MODES)[number]
|
|
746
|
+
|
|
747
|
+
export declare type ColorButtonMode = (typeof COLOR_BUTTON_MODES)[number]
|
|
748
|
+
|
|
749
|
+
export declare type ColorConfigBaseKey = (typeof COLOR_CONFIG_BASE_KEYS)[number]
|
|
750
|
+
|
|
751
|
+
export declare type ColorConfigBaseTone = (typeof COLOR_CONFIG_BASE_TONES)[number]
|
|
752
|
+
|
|
753
|
+
export declare type ColorConfigBlendKey = (typeof COLOR_CONFIG_BLEND_KEYS)[number]
|
|
754
|
+
|
|
755
|
+
export declare type ColorConfigOpacityValue = `0` | `0.${number}` | `1`
|
|
756
|
+
|
|
757
|
+
export declare type ColorConfigStateKey = (typeof COLOR_CONFIG_STATE_KEYS)[number]
|
|
758
|
+
|
|
759
|
+
export declare type ColorConfigStateTone = (typeof COLOR_CONFIG_STATE_TONES)[number]
|
|
760
|
+
|
|
761
|
+
export declare type ColorConfigValue =
|
|
762
|
+
| `black`
|
|
763
|
+
| `white`
|
|
764
|
+
| `black/${ColorConfigOpacityValue}`
|
|
765
|
+
| `white/${ColorConfigOpacityValue}`
|
|
766
|
+
| `${ColorHueValue}`
|
|
767
|
+
| `${ColorHueValue}/${ColorTintValue}`
|
|
768
|
+
| `${ColorHueValue}/${ColorTintValue}/${ColorConfigOpacityValue}`
|
|
769
|
+
| `${ColorTintValue}`
|
|
770
|
+
| `${ColorTintValue}/${ColorConfigOpacityValue}`
|
|
771
|
+
| ColorBlendModeValue
|
|
772
|
+
|
|
773
|
+
export declare type ColorHueValue = (typeof COLOR_HUES)[number]
|
|
774
|
+
|
|
775
|
+
export declare type ColorState = (typeof COLOR_STATES)[number]
|
|
776
|
+
|
|
777
|
+
export declare type ColorStateTone = (typeof COLOR_STATE_TONES)[number]
|
|
778
|
+
|
|
779
|
+
export declare interface ColorThemeConfig {
|
|
780
|
+
palette?: TMP_ColorPalette
|
|
781
|
+
tokens?: ColorTokens
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
export declare type ColorTintValue = (typeof COLOR_TINTS)[number]
|
|
785
|
+
|
|
786
|
+
export declare interface ColorTokens extends Partial<Record<ColorConfigBaseTone, BaseColorTokens>> {
|
|
787
|
+
button?: Partial<Record<ColorConfigStateTone, ButtonColorTokens>>
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
export declare type ColorTokenValue = [ColorConfigValue, ColorConfigValue]
|
|
791
|
+
|
|
614
792
|
/**
|
|
615
793
|
* @public
|
|
616
794
|
*/
|
|
@@ -1055,6 +1233,30 @@ export declare interface InlineProps extends Omit<BoxProps, 'display'> {
|
|
|
1055
1233
|
space?: number | number[]
|
|
1056
1234
|
}
|
|
1057
1235
|
|
|
1236
|
+
export declare function isColorBlendModeValue(str: string): str is ColorBlendModeValue
|
|
1237
|
+
|
|
1238
|
+
export declare function isColorButtonMode(str: string): str is ColorButtonMode
|
|
1239
|
+
|
|
1240
|
+
export declare function isColorConfigBaseKey(str: string): str is ColorConfigBaseKey
|
|
1241
|
+
|
|
1242
|
+
export declare function isColorConfigBaseTone(str: string): str is ColorConfigBaseTone
|
|
1243
|
+
|
|
1244
|
+
export declare function isColorConfigBlendKey(str: string): str is ColorConfigBlendKey
|
|
1245
|
+
|
|
1246
|
+
export declare function isColorConfigStateKey(str: string): str is ColorConfigStateKey
|
|
1247
|
+
|
|
1248
|
+
export declare function isColorConfigStateTone(str: string): str is ColorConfigStateTone
|
|
1249
|
+
|
|
1250
|
+
export declare function isColorHueValue(str: string): str is ColorHueValue
|
|
1251
|
+
|
|
1252
|
+
export declare function isColorOpacityValue(str: string): str is ColorConfigOpacityValue
|
|
1253
|
+
|
|
1254
|
+
export declare function isColorTintValue(str: string): str is ColorTintValue
|
|
1255
|
+
|
|
1256
|
+
export declare function isColorTokenValue(str: string): str is ColorConfigValue
|
|
1257
|
+
|
|
1258
|
+
export declare function isColorValue(str: string): str is 'black' | 'white'
|
|
1259
|
+
|
|
1058
1260
|
/**
|
|
1059
1261
|
* @internal
|
|
1060
1262
|
*/
|
|
@@ -1677,6 +1879,10 @@ export declare function multiply(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
|
1677
1879
|
*/
|
|
1678
1880
|
export declare function parseColor(color: unknown): RGB | RGBA
|
|
1679
1881
|
|
|
1882
|
+
export declare function parseTokenKey(str: string): TokenKeyNode | undefined
|
|
1883
|
+
|
|
1884
|
+
export declare function parseTokenValue(str: string): TokenValueNode | undefined
|
|
1885
|
+
|
|
1680
1886
|
/**
|
|
1681
1887
|
* @public
|
|
1682
1888
|
*/
|
|
@@ -1808,7 +2014,7 @@ export declare interface PortalProviderProps {
|
|
|
1808
2014
|
* @public
|
|
1809
2015
|
*/
|
|
1810
2016
|
export declare const Radio: ForwardRefExoticComponent<
|
|
1811
|
-
Omit<Omit<HTMLProps<HTMLInputElement>, '
|
|
2017
|
+
Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & RadioProps, 'ref'> &
|
|
1812
2018
|
RefAttributes<HTMLInputElement>
|
|
1813
2019
|
>
|
|
1814
2020
|
|
|
@@ -2185,6 +2391,32 @@ export declare interface StackProps extends BoxProps {
|
|
|
2185
2391
|
space?: number | number[]
|
|
2186
2392
|
}
|
|
2187
2393
|
|
|
2394
|
+
export declare interface StateColorTokens {
|
|
2395
|
+
_blend?: ColorBlendModeTokenValue
|
|
2396
|
+
_hue?: ColorHueValue
|
|
2397
|
+
bg?: ColorTokenValue
|
|
2398
|
+
bg2?: ColorTokenValue
|
|
2399
|
+
fg?: ColorTokenValue
|
|
2400
|
+
border?: ColorTokenValue
|
|
2401
|
+
muted?: {
|
|
2402
|
+
fg?: ColorTokenValue
|
|
2403
|
+
}
|
|
2404
|
+
accent?: {
|
|
2405
|
+
fg?: ColorTokenValue
|
|
2406
|
+
}
|
|
2407
|
+
link?: {
|
|
2408
|
+
fg?: ColorTokenValue
|
|
2409
|
+
}
|
|
2410
|
+
code?: {
|
|
2411
|
+
bg?: ColorTokenValue
|
|
2412
|
+
fg?: ColorTokenValue
|
|
2413
|
+
}
|
|
2414
|
+
skeleton?: {
|
|
2415
|
+
from?: ColorTokenValue
|
|
2416
|
+
to?: ColorTokenValue
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2188
2420
|
/**
|
|
2189
2421
|
* @public
|
|
2190
2422
|
*/
|
|
@@ -2207,7 +2439,7 @@ export declare interface Styles {
|
|
|
2207
2439
|
* @public
|
|
2208
2440
|
*/
|
|
2209
2441
|
export declare const Switch: ForwardRefExoticComponent<
|
|
2210
|
-
Omit<Omit<HTMLProps<HTMLInputElement>, '
|
|
2442
|
+
Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & SwitchProps, 'ref'> &
|
|
2211
2443
|
RefAttributes<HTMLInputElement>
|
|
2212
2444
|
>
|
|
2213
2445
|
|
|
@@ -2226,7 +2458,7 @@ export declare const Tab: ForwardRefExoticComponent<
|
|
|
2226
2458
|
TabProps &
|
|
2227
2459
|
Omit<
|
|
2228
2460
|
HTMLProps<HTMLButtonElement>,
|
|
2229
|
-
'label' | 'width' | 'id' | 'aria-controls' | 'as'
|
|
2461
|
+
'type' | 'label' | 'width' | 'id' | 'aria-controls' | 'as'
|
|
2230
2462
|
>,
|
|
2231
2463
|
'ref'
|
|
2232
2464
|
> &
|
|
@@ -2325,7 +2557,7 @@ export declare interface TextAreaProps extends ResponsiveRadiusProps {
|
|
|
2325
2557
|
* @public
|
|
2326
2558
|
*/
|
|
2327
2559
|
export declare const TextInput: ForwardRefExoticComponent<
|
|
2328
|
-
Omit<TextInputProps & Omit<HTMLProps<HTMLInputElement>, '
|
|
2560
|
+
Omit<TextInputProps & Omit<HTMLProps<HTMLInputElement>, 'type' | 'prefix' | 'as'>, 'ref'> &
|
|
2329
2561
|
RefAttributes<HTMLInputElement>
|
|
2330
2562
|
>
|
|
2331
2563
|
|
|
@@ -2852,6 +3084,10 @@ export declare type ThemeColorToneKey =
|
|
|
2852
3084
|
| 'caution'
|
|
2853
3085
|
| 'critical'
|
|
2854
3086
|
|
|
3087
|
+
export declare interface ThemeConfig {
|
|
3088
|
+
color?: ColorThemeConfig
|
|
3089
|
+
}
|
|
3090
|
+
|
|
2855
3091
|
/**
|
|
2856
3092
|
* @public
|
|
2857
3093
|
*/
|
|
@@ -2994,6 +3230,62 @@ export declare interface ThemeShadow {
|
|
|
2994
3230
|
ambient: BoxShadow
|
|
2995
3231
|
}
|
|
2996
3232
|
|
|
3233
|
+
export declare interface TMP_BaseColorTheme {
|
|
3234
|
+
_blend: ColorBlendModeValue
|
|
3235
|
+
dark: boolean
|
|
3236
|
+
base: {
|
|
3237
|
+
bg: string
|
|
3238
|
+
fg: string
|
|
3239
|
+
border: string
|
|
3240
|
+
}
|
|
3241
|
+
button: TMP_ButtonColorTheme
|
|
3242
|
+
}
|
|
3243
|
+
|
|
3244
|
+
export declare type TMP_ButtonColorTheme = Record<ColorStateTone, TMP_ButtonModesColorTheme>
|
|
3245
|
+
|
|
3246
|
+
export declare type TMP_ButtonModesColorTheme = Record<ColorButtonMode, TMP_ButtonStatesColorTheme>
|
|
3247
|
+
|
|
3248
|
+
export declare type TMP_ButtonStatesColorTheme = Record<ColorState, TMP_StateColorTheme>
|
|
3249
|
+
|
|
3250
|
+
export declare type TMP_ColorPalette = {
|
|
3251
|
+
black: string | ColorTint
|
|
3252
|
+
white: string | ColorTint
|
|
3253
|
+
} & Record<ColorHueValue, Record<ColorTintValue, string | ColorTint>>
|
|
3254
|
+
|
|
3255
|
+
export declare type TMP_ColorTheme = Record<ColorBaseTone, TMP_BaseColorTheme>
|
|
3256
|
+
|
|
3257
|
+
export declare interface TMP_StateColorTheme {
|
|
3258
|
+
_blend: ColorBlendModeValue
|
|
3259
|
+
bg: string
|
|
3260
|
+
bg2?: string
|
|
3261
|
+
fg: string
|
|
3262
|
+
border: string
|
|
3263
|
+
muted: {
|
|
3264
|
+
fg: string
|
|
3265
|
+
}
|
|
3266
|
+
accent: {
|
|
3267
|
+
fg: string
|
|
3268
|
+
}
|
|
3269
|
+
link: {
|
|
3270
|
+
fg: string
|
|
3271
|
+
}
|
|
3272
|
+
code: {
|
|
3273
|
+
bg: string
|
|
3274
|
+
fg: string
|
|
3275
|
+
}
|
|
3276
|
+
skeleton?: {
|
|
3277
|
+
from: string
|
|
3278
|
+
to: string
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
export declare interface TMP_Theme {
|
|
3283
|
+
color: {
|
|
3284
|
+
light: TMP_ColorTheme
|
|
3285
|
+
dark: TMP_ColorTheme
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
|
|
2997
3289
|
/**
|
|
2998
3290
|
* @public
|
|
2999
3291
|
*/
|
|
@@ -3049,6 +3341,44 @@ export declare interface ToastProviderProps {
|
|
|
3049
3341
|
zOffset?: number | number[]
|
|
3050
3342
|
}
|
|
3051
3343
|
|
|
3344
|
+
export declare interface TokenBaseKeyNode {
|
|
3345
|
+
type: 'base'
|
|
3346
|
+
tone: ColorConfigBaseTone
|
|
3347
|
+
key: ColorConfigBaseKey | ColorConfigBlendKey
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3350
|
+
export declare interface TokenBlendModeValueNode {
|
|
3351
|
+
type: 'blendMode'
|
|
3352
|
+
value?: ColorBlendModeValue
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3355
|
+
export declare interface TokenButtonKeyNode {
|
|
3356
|
+
type: 'button'
|
|
3357
|
+
tone: ColorConfigStateTone
|
|
3358
|
+
mode: ColorButtonMode
|
|
3359
|
+
key: ColorConfigStateKey | ColorConfigBlendKey
|
|
3360
|
+
}
|
|
3361
|
+
|
|
3362
|
+
export declare interface TokenColorValueNode {
|
|
3363
|
+
type: 'color'
|
|
3364
|
+
key?: 'black' | 'white' | `${ColorHueValue}/${ColorTintValue}` | ColorTintValue
|
|
3365
|
+
hue?: ColorHueValue
|
|
3366
|
+
tint?: ColorTintValue
|
|
3367
|
+
opacity?: number
|
|
3368
|
+
}
|
|
3369
|
+
|
|
3370
|
+
export declare interface TokenHueValueNode {
|
|
3371
|
+
type: 'hue'
|
|
3372
|
+
value?: ColorHueValue
|
|
3373
|
+
}
|
|
3374
|
+
|
|
3375
|
+
export declare type TokenKeyNode = TokenBaseKeyNode | TokenButtonKeyNode
|
|
3376
|
+
|
|
3377
|
+
export declare type TokenValueNode =
|
|
3378
|
+
| TokenColorValueNode
|
|
3379
|
+
| TokenHueValueNode
|
|
3380
|
+
| TokenBlendModeValueNode
|
|
3381
|
+
|
|
3052
3382
|
/**
|
|
3053
3383
|
* @public
|
|
3054
3384
|
*/
|