@sanity/ui 3.0.0-static.11 → 3.0.0-static.13
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/_chunks-cjs/_visual-editing.js +1293 -1215
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-cjs/buildCommand.js +28 -10
- package/dist/_chunks-cjs/buildCommand.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +1284 -1202
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +528 -358
- package/dist/_visual-editing.d.ts +528 -358
- package/dist/cli.js +1 -1
- package/dist/css.d.mts +143 -73
- package/dist/css.d.ts +143 -73
- package/dist/css.js +329 -472
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +330 -473
- package/dist/css.mjs.map +1 -1
- package/dist/index.d.mts +1362 -869
- package/dist/index.d.ts +1362 -869
- package/dist/index.js +383 -308
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +387 -312
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-palette.css +105 -1
- package/dist/sanity-palette.min.css +1 -0
- package/dist/sanity-theme.css +4571 -1
- package/dist/sanity-theme.min.css +1 -0
- package/dist/system.css +22053 -21946
- package/dist/system.min.css +1 -0
- package/dist/theme.d.mts +51 -106
- package/dist/theme.d.ts +51 -106
- package/dist/theme.js +9 -9
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +9 -9
- package/dist/theme.mjs.map +1 -1
- package/package.json +10 -5
- package/src/cli/buildCommand.ts +46 -19
- package/src/css/_comp.ts +2 -2
- package/src/css/{compile/compileStyle.ts → _compileStyle.ts} +7 -7
- package/src/css/{system.style.ts → _system.style.ts} +3 -2
- package/src/css/aspects/display/display.ts +1 -0
- package/src/css/aspects/display/types.ts +2 -3
- package/src/css/aspects/flex/types.ts +4 -12
- package/src/css/aspects/flexItem/types.ts +1 -3
- package/src/css/aspects/font/types.ts +1 -3
- package/src/css/aspects/grid/grid.ts +1 -0
- package/src/css/aspects/grid/types.ts +5 -9
- package/src/css/aspects/gridItem/gridItem.ts +1 -1
- package/src/css/aspects/gridItem/types.ts +7 -18
- package/src/css/aspects/height/height.ts +3 -4
- package/src/css/aspects/inset/inset.ts +1 -0
- package/src/css/aspects/margin/margin.ts +1 -0
- package/src/css/aspects/margin/types.ts +1 -0
- package/src/css/aspects/maxWidth/maxWidth.ts +1 -0
- package/src/css/aspects/maxWidth/types.ts +1 -0
- package/src/css/aspects/minWidth/minWidth.ts +1 -0
- package/src/css/aspects/minWidth/types.ts +2 -0
- package/src/css/aspects/overflow/overflow.ts +1 -0
- package/src/css/aspects/padding/padding.ts +1 -0
- package/src/css/aspects/pointerEvents/pointerEvents.ts +1 -0
- package/src/css/aspects/position/position.ts +1 -0
- package/src/css/aspects/shadow/shadow.ts +1 -0
- package/src/css/aspects/textOverflow/textOverflow.ts +1 -0
- package/src/css/aspects/textOverflow/types.ts +1 -0
- package/src/css/aspects/width/types.ts +2 -0
- package/src/css/aspects/width/width.ts +1 -0
- package/src/css/{compile/compilePalette.ts → compilePalette.ts} +14 -10
- package/src/css/compileSystem.ts +7 -0
- package/src/css/{compile/compileTheme.ts → compileTheme.ts} +1 -0
- package/src/css/{compile/compileTheme_v3.ts → compileTheme_v3.ts} +123 -104
- package/src/css/components/breadcrumbs/breadcrumbs.ts +1 -0
- package/src/css/components/dialog/dialog.ts +7 -0
- package/src/css/components/menu/menu.ts +2 -0
- package/src/css/components/skeleton/skeleton.ts +4 -0
- package/src/css/components/skeleton/types.ts +4 -0
- package/src/css/components/toast/toast.ts +5 -0
- package/src/css/components/tree/tree.ts +1 -0
- package/src/css/composeClassNames.ts +4 -2
- package/src/css/constants.ts +2 -0
- package/src/css/index.ts +3 -3
- package/src/css/primitives/_arrow/_arrow.ts +3 -0
- package/src/css/primitives/_input/input.ts +2 -0
- package/src/css/primitives/_selectable/_selectable.style.ts +1 -2
- package/src/css/primitives/_selectable/selectable.ts +1 -2
- package/src/css/primitives/avatar/avatar.style.ts +5 -8
- package/src/css/primitives/avatar/avatar.ts +6 -0
- package/src/css/primitives/avatar/types.ts +1 -0
- package/src/css/primitives/box/types.ts +1 -3
- package/src/css/primitives/button/button.ts +4 -21
- package/src/css/primitives/button/index.ts +1 -0
- package/src/css/primitives/button/types.ts +18 -0
- package/src/css/primitives/card/card.style.ts +3 -6
- package/src/css/primitives/card/card.ts +2 -2
- package/src/css/primitives/card/types.ts +2 -2
- package/src/css/primitives/checkbox/checkbox.ts +2 -0
- package/src/css/primitives/container/container.ts +1 -0
- package/src/css/primitives/container/types.ts +1 -0
- package/src/css/primitives/kbd/kbd.ts +1 -0
- package/src/css/primitives/label/types.ts +7 -2
- package/src/css/primitives/popover/popover.ts +2 -0
- package/src/css/primitives/radio/radio.ts +1 -0
- package/src/css/primitives/select/select.ts +2 -0
- package/src/css/primitives/spinner/spinner.ts +2 -0
- package/src/css/primitives/switch/switch.ts +5 -0
- package/src/css/primitives/text/types.ts +4 -0
- package/src/css/primitives/textArea/textArea.ts +1 -0
- package/src/css/primitives/textInput/textInput.ts +1 -0
- package/src/css/primitives/tooltip/tooltip.ts +2 -0
- package/src/css/scopeClassName.ts +1 -0
- package/src/css/types.ts +9 -12
- package/src/css/util.ts +5 -0
- package/src/css/utils/srOnly/srOnly.ts +3 -1
- package/src/css/varNames.ts +131 -141
- package/src/css/vars.ts +1 -6
- package/src/theme/palette/constants.ts +2 -0
- package/src/theme/palette/types.ts +3 -0
- package/src/theme/types.ts +2 -6
- package/src/theme/v0/focusRing.ts +1 -3
- package/src/theme/v0/font.ts +6 -18
- package/src/theme/v0/layer.ts +1 -3
- package/src/theme/v0/shadow.ts +2 -6
- package/src/theme/v2/avatar.ts +1 -3
- package/src/theme/v2/color/_system.ts +1 -3
- package/src/theme/v2/color/avatar.ts +2 -6
- package/src/theme/v2/color/badge.ts +2 -6
- package/src/theme/v2/color/button.ts +3 -9
- package/src/theme/v2/color/color.ts +3 -9
- package/src/theme/v2/color/input.ts +3 -9
- package/src/theme/v2/color/kbd.ts +1 -3
- package/src/theme/v2/color/selectable.ts +2 -6
- package/src/theme/v2/color/state.ts +1 -3
- package/src/theme/v2/color/syntax.ts +1 -3
- package/src/theme/v2/input.ts +1 -3
- package/src/theme/v2/theme.ts +2 -6
- package/src/theme/v3/buildTheme_v3.ts +1 -0
- package/src/theme/v3/color/color.ts +6 -4
- package/src/theme/v3/color/renderColor.ts +4 -1
- package/src/theme/v3/defaultTokens.ts +1 -0
- package/src/theme/v3/resolveTokens.ts +9 -9
- package/src/ui/RootClassNames.tsx +3 -0
- package/src/ui/StyleTags.tsx +3 -1
- package/src/ui/_compat/theme/themeColorProvider.tsx +2 -6
- package/src/ui/_compat/theme/themeProvider.tsx +2 -6
- package/src/ui/_compat/theme/types.ts +1 -3
- package/src/ui/_compat/theme/useRootTheme.ts +1 -3
- package/src/ui/_compat/theme/useTheme.ts +2 -6
- package/src/ui/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
- package/src/ui/components/autocomplete/autocomplete.tsx +86 -114
- package/src/ui/components/autocomplete/autocompleteOption.tsx +2 -0
- package/src/ui/components/autocomplete/types.ts +3 -8
- package/src/ui/components/breadcrumbs/breadcrumbs.tsx +27 -21
- package/src/ui/components/dialog/dialog.tsx +89 -291
- package/src/ui/components/dialog/dialogCard.tsx +183 -0
- package/src/ui/components/dialog/isTargetWithinScope.ts +14 -0
- package/src/ui/components/hotkeys/hotkeys.tsx +33 -15
- package/src/ui/components/menu/__workshop__/asComponent.tsx +6 -6
- package/src/ui/components/menu/menu.tsx +27 -33
- package/src/ui/components/menu/menuButton.tsx +10 -14
- package/src/ui/components/menu/menuDivider.tsx +25 -13
- package/src/ui/components/menu/menuGroup.tsx +34 -26
- package/src/ui/components/menu/menuItem.tsx +51 -40
- package/src/ui/components/skeleton/codeSkeleton.tsx +53 -0
- package/src/ui/components/skeleton/headingSkeleton.tsx +52 -0
- package/src/ui/components/skeleton/index.ts +3 -0
- package/src/ui/components/skeleton/labelSkeleton.tsx +51 -0
- package/src/ui/components/skeleton/skeleton.tsx +39 -16
- package/src/ui/components/skeleton/textSkeleton.tsx +31 -110
- package/src/ui/components/tab/tab.tsx +23 -19
- package/src/ui/components/tab/tabList.tsx +34 -33
- package/src/ui/components/tab/tabPanel.tsx +25 -19
- package/src/ui/components/toast/toast.tsx +21 -16
- package/src/ui/components/toast/toastLayer.tsx +28 -10
- package/src/ui/components/toast/toastProvider.tsx +2 -6
- package/src/ui/components/toast/types.ts +2 -6
- package/src/ui/components/toast/useToast.ts +1 -3
- package/src/ui/components/tree/tree.tsx +194 -187
- package/src/ui/components/tree/treeGroup.tsx +25 -5
- package/src/ui/components/tree/treeItem.tsx +35 -23
- package/src/ui/hooks/useClickOutside.ts +2 -6
- package/src/ui/hooks/useClickOutsideEvent.ts +3 -9
- package/src/ui/primitives/_selectable/selectable.tsx +33 -20
- package/src/ui/primitives/avatar/avatar.tsx +28 -31
- package/src/ui/primitives/avatar/avatarCounter.tsx +33 -25
- package/src/ui/primitives/avatar/avatarStack.tsx +31 -24
- package/src/ui/primitives/avatar/types.ts +2 -0
- package/src/ui/primitives/badge/__workshop__/props.tsx +1 -9
- package/src/ui/primitives/badge/__workshop__/tones.tsx +1 -6
- package/src/ui/primitives/badge/badge.tsx +33 -32
- package/src/ui/primitives/badge/types.ts +2 -1
- package/src/ui/primitives/box/box.tsx +59 -29
- package/src/ui/primitives/button/__workshop__/sanityUploadButton.tsx +3 -3
- package/src/ui/primitives/button/__workshop__/uploadButton.tsx +2 -1
- package/src/ui/primitives/button/button.test.tsx +1 -15
- package/src/ui/primitives/button/button.tsx +64 -70
- package/src/ui/primitives/card/__workshop__/asComponent.tsx +3 -3
- package/src/ui/primitives/card/card.tsx +22 -22
- package/src/ui/primitives/card/cardProvider.tsx +2 -0
- package/src/ui/primitives/checkbox/checkbox.tsx +26 -15
- package/src/ui/primitives/code/code.tsx +24 -22
- package/src/ui/primitives/container/container.tsx +26 -15
- package/src/ui/primitives/flex/flex.tsx +21 -19
- package/src/ui/primitives/grid/grid.tsx +21 -16
- package/src/ui/primitives/heading/heading.tsx +42 -19
- package/src/ui/primitives/inline/inline.tsx +26 -23
- package/src/ui/primitives/kbd/kbd.tsx +25 -23
- package/src/ui/primitives/label/label.tsx +41 -26
- package/src/ui/primitives/popover/popover.tsx +281 -277
- package/src/ui/primitives/popover/popoverCard.tsx +119 -118
- package/src/ui/primitives/radio/radio.tsx +30 -14
- package/src/ui/primitives/select/select.tsx +24 -16
- package/src/ui/primitives/spinner/animatedSpinnerIcon.tsx +4 -2
- package/src/ui/primitives/spinner/spinner.tsx +24 -12
- package/src/ui/primitives/stack/stack.tsx +27 -18
- package/src/ui/primitives/switch/switch.tsx +31 -14
- package/src/ui/primitives/text/text.tsx +42 -24
- package/src/ui/primitives/textArea/textArea.tsx +33 -18
- package/src/ui/primitives/textInput/textInput.tsx +28 -40
- package/src/ui/primitives/tooltip/constants.ts +1 -1
- package/src/ui/primitives/tooltip/tooltip.tsx +76 -59
- package/src/ui/primitives/tooltip/tooltipCard.tsx +89 -82
- package/src/ui/primitives/types.ts +1 -3
- package/src/ui/types/avatar.ts +3 -6
- package/src/ui/types/badge.ts +1 -3
- package/src/ui/types/button.ts +1 -3
- package/src/ui/types/card.ts +1 -3
- package/src/ui/types/dialog.ts +1 -3
- package/src/ui/types/props.ts +20 -10
- package/src/ui/utils/arrow/arrow.tsx +40 -14
- package/src/ui/utils/boundaryElement/boundaryElementProvider.tsx +2 -6
- package/src/ui/utils/boundaryElement/types.ts +1 -3
- package/src/ui/utils/boundaryElement/useBoundaryElement.ts +1 -3
- package/src/ui/utils/elementQuery/elementQuery.tsx +36 -14
- package/src/ui/utils/errorBoundary.tsx +2 -0
- package/src/ui/utils/index.ts +0 -1
- package/src/ui/utils/layer/layer.tsx +23 -93
- package/src/ui/utils/layer/layerCard.tsx +92 -0
- package/src/ui/utils/layer/layerProvider.tsx +2 -6
- package/src/ui/utils/layer/useLayer.ts +1 -3
- package/src/ui/utils/portal/portal.ts +2 -6
- package/src/ui/utils/portal/portalProvider.tsx +2 -6
- package/src/ui/utils/portal/types.ts +1 -3
- package/src/ui/utils/portal/usePortal.ts +1 -3
- package/src/ui/utils/srOnly/srOnly.tsx +25 -20
- package/src/ui/utils/virtualList/virtualList.tsx +36 -24
- package/src/css/compile/compileRule.ts +0 -97
- package/src/css/compile/compileRules.test.ts +0 -36
- package/src/css/compile/compileRules.ts +0 -43
- package/src/css/compile/compileSystem.ts +0 -7
- package/src/css/compile/types.ts +0 -6
- package/src/css/primitives/_selectable/_contants.ts +0 -11
- package/src/css/primitives/card/_constants.ts +0 -13
- package/src/ui/utils/conditionalWrapper/conditionalWrapper.tsx +0 -23
- package/src/ui/utils/conditionalWrapper/index.ts +0 -1
package/dist/theme.d.ts
CHANGED
|
@@ -9,9 +9,7 @@ export declare const AVATAR_SIZE: readonly [0, 1, 2, 3]
|
|
|
9
9
|
/** @public */
|
|
10
10
|
export declare type AvatarSize = (typeof AVATAR_SIZE)[number]
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
12
|
+
/** @public */
|
|
15
13
|
export declare type BaseTheme = RootTheme
|
|
16
14
|
|
|
17
15
|
/** @internal */
|
|
@@ -20,6 +18,7 @@ export declare function buildColor_v3(tokens: ColorTokens): ThemeColor_v3
|
|
|
20
18
|
/** @internal */
|
|
21
19
|
export declare function buildTheme(_config?: ThemeConfig): RootTheme
|
|
22
20
|
|
|
21
|
+
/** @public */
|
|
23
22
|
export declare function buildTheme_v3(options?: ThemeOptions): Theme_v3
|
|
24
23
|
|
|
25
24
|
/** @public */
|
|
@@ -282,8 +281,10 @@ export declare function createColorTheme(
|
|
|
282
281
|
*/
|
|
283
282
|
export declare type CSSObject = StyledObject<any>
|
|
284
283
|
|
|
285
|
-
|
|
284
|
+
/** @public */
|
|
285
|
+
export declare type CSSVariableKey = `--${string}`
|
|
286
286
|
|
|
287
|
+
/** @internal */
|
|
287
288
|
export declare const defaultTokens: PartialTokens<Tokens>
|
|
288
289
|
|
|
289
290
|
/** @public */
|
|
@@ -362,8 +363,10 @@ export declare interface HSL {
|
|
|
362
363
|
*/
|
|
363
364
|
export declare function hslToRgb(hsl: HSL): RGB
|
|
364
365
|
|
|
366
|
+
/** @public */
|
|
365
367
|
export declare type Hue = (typeof HUES)[number]
|
|
366
368
|
|
|
369
|
+
/** @public */
|
|
367
370
|
export declare const HUES: readonly [
|
|
368
371
|
'gray',
|
|
369
372
|
'blue',
|
|
@@ -457,11 +460,13 @@ export declare const RADIUS: readonly [0, 1, 2, 3, 4, 5, 6, 'full']
|
|
|
457
460
|
/** @public */
|
|
458
461
|
export declare type Radius = (typeof RADIUS)[number]
|
|
459
462
|
|
|
463
|
+
/** @public */
|
|
460
464
|
export declare function renderColor(
|
|
461
465
|
token: [ColorToken, ColorToken],
|
|
462
466
|
context: RenderColorContext,
|
|
463
467
|
): string
|
|
464
468
|
|
|
469
|
+
/** @public */
|
|
465
470
|
export declare interface RenderColorContext {
|
|
466
471
|
bgVar: CSSVariableKey
|
|
467
472
|
hue: Hue
|
|
@@ -512,9 +517,7 @@ export declare function rgbToHex(color: RGB | RGBA): string
|
|
|
512
517
|
*/
|
|
513
518
|
export declare function rgbToHsl({r, g, b}: RGB): HSL
|
|
514
519
|
|
|
515
|
-
/**
|
|
516
|
-
* @public
|
|
517
|
-
*/
|
|
520
|
+
/** @public */
|
|
518
521
|
export declare interface RootTheme extends RootTheme_v0 {
|
|
519
522
|
v2?: RootTheme_v2
|
|
520
523
|
v3?: Theme_v3
|
|
@@ -585,9 +588,7 @@ export declare interface RootTheme_v0 {
|
|
|
585
588
|
styles?: ThemeStyles
|
|
586
589
|
}
|
|
587
590
|
|
|
588
|
-
/**
|
|
589
|
-
* @public
|
|
590
|
-
*/
|
|
591
|
+
/** @public */
|
|
591
592
|
export declare interface RootTheme_v2 {
|
|
592
593
|
_version: 2
|
|
593
594
|
avatar: ThemeAvatar_v2
|
|
@@ -710,9 +711,7 @@ export declare const THEME_COLOR_STATES: readonly [
|
|
|
710
711
|
'disabled',
|
|
711
712
|
]
|
|
712
713
|
|
|
713
|
-
/**
|
|
714
|
-
* @public
|
|
715
|
-
*/
|
|
714
|
+
/** @public */
|
|
716
715
|
export declare type Theme_v2 = Omit<RootTheme_v2, 'color'> & {
|
|
717
716
|
color: ThemeColorCard_v2
|
|
718
717
|
/**
|
|
@@ -770,9 +769,7 @@ export declare interface ThemeAvatar {
|
|
|
770
769
|
}[]
|
|
771
770
|
}
|
|
772
771
|
|
|
773
|
-
/**
|
|
774
|
-
* @public
|
|
775
|
-
*/
|
|
772
|
+
/** @public */
|
|
776
773
|
export declare interface ThemeAvatar_v2 {
|
|
777
774
|
sizes: {
|
|
778
775
|
/** Spacing between avatars in an <AvatarStack> component (px) */
|
|
@@ -783,9 +780,7 @@ export declare interface ThemeAvatar_v2 {
|
|
|
783
780
|
focusRing: ThemeFocusRing
|
|
784
781
|
}
|
|
785
782
|
|
|
786
|
-
/**
|
|
787
|
-
* @public
|
|
788
|
-
*/
|
|
783
|
+
/** @public */
|
|
789
784
|
export declare type ThemeBoxShadow = [number, number, number, number]
|
|
790
785
|
|
|
791
786
|
/**
|
|
@@ -805,19 +800,16 @@ export declare interface ThemeColor extends Partial<Omit<ThemeColorGenericState,
|
|
|
805
800
|
syntax: ThemeColorSyntax
|
|
806
801
|
}
|
|
807
802
|
|
|
803
|
+
/** @public */
|
|
808
804
|
export declare type ThemeColor_v3 = Record<ThemeColorSchemeKey, ThemeColorScheme_v3>
|
|
809
805
|
|
|
810
|
-
/**
|
|
811
|
-
* @public
|
|
812
|
-
*/
|
|
806
|
+
/** @public */
|
|
813
807
|
export declare type ThemeColorAvatar_v2 = Record<ThemeColorAvatarColorKey, ThemeColorAvatarHue_v2>
|
|
814
808
|
|
|
815
809
|
/** @public */
|
|
816
810
|
export declare type ThemeColorAvatarColorKey = (typeof THEME_COLOR_AVATAR_COLORS)[number]
|
|
817
811
|
|
|
818
|
-
/**
|
|
819
|
-
* @public
|
|
820
|
-
*/
|
|
812
|
+
/** @public */
|
|
821
813
|
export declare interface ThemeColorAvatarHue_v2 {
|
|
822
814
|
_blend?: ThemeColorBlendModeKey
|
|
823
815
|
bg: string
|
|
@@ -846,9 +838,7 @@ export declare interface ThemeColorAvatarTokens {
|
|
|
846
838
|
'cyan'?: ThemeColorAvatarHueTokens
|
|
847
839
|
}
|
|
848
840
|
|
|
849
|
-
/**
|
|
850
|
-
* @public
|
|
851
|
-
*/
|
|
841
|
+
/** @public */
|
|
852
842
|
export declare type ThemeColorBadge_v2 = Record<ThemeColorStateToneKey, ThemeColorBadgeTone_v2>
|
|
853
843
|
|
|
854
844
|
/** @public */
|
|
@@ -856,9 +846,7 @@ export declare type ThemeColorBadgeTokens = Partial<
|
|
|
856
846
|
Record<'*' | ThemeColorStateToneKey, ThemeColorBadgeToneTokens>
|
|
857
847
|
>
|
|
858
848
|
|
|
859
|
-
/**
|
|
860
|
-
* @public
|
|
861
|
-
*/
|
|
849
|
+
/** @public */
|
|
862
850
|
export declare interface ThemeColorBadgeTone_v2 {
|
|
863
851
|
bg: string
|
|
864
852
|
fg: string
|
|
@@ -978,14 +966,10 @@ export declare interface ThemeColorButton {
|
|
|
978
966
|
bleed: ThemeColorButtonTones
|
|
979
967
|
}
|
|
980
968
|
|
|
981
|
-
/**
|
|
982
|
-
* @public
|
|
983
|
-
*/
|
|
969
|
+
/** @public */
|
|
984
970
|
export declare type ThemeColorButton_v2 = Record<ThemeColorButtonModeKey, ThemeColorButtonMode_v2>
|
|
985
971
|
|
|
986
|
-
/**
|
|
987
|
-
* @public
|
|
988
|
-
*/
|
|
972
|
+
/** @public */
|
|
989
973
|
export declare type ThemeColorButtonMode_v2 = Record<
|
|
990
974
|
ThemeColorStateToneKey,
|
|
991
975
|
ThemeColorButtonTone_v2
|
|
@@ -1018,9 +1002,7 @@ export declare interface ThemeColorButtonTokens
|
|
|
1018
1002
|
_hue?: ColorHueKey
|
|
1019
1003
|
}
|
|
1020
1004
|
|
|
1021
|
-
/**
|
|
1022
|
-
* @public
|
|
1023
|
-
*/
|
|
1005
|
+
/** @public */
|
|
1024
1006
|
export declare type ThemeColorButtonTone_v2 = Record<ThemeColorStateKey, ThemeColorState_v2>
|
|
1025
1007
|
|
|
1026
1008
|
/**
|
|
@@ -1048,9 +1030,7 @@ export declare interface ThemeColorCard {
|
|
|
1048
1030
|
disabled: ThemeColorGenericState
|
|
1049
1031
|
}
|
|
1050
1032
|
|
|
1051
|
-
/**
|
|
1052
|
-
* @public
|
|
1053
|
-
*/
|
|
1033
|
+
/** @public */
|
|
1054
1034
|
export declare interface ThemeColorCard_v2 extends ThemeColorState_v2 {
|
|
1055
1035
|
/** @internal */
|
|
1056
1036
|
_blend: ThemeColorBlendModeKey
|
|
@@ -1064,6 +1044,7 @@ export declare interface ThemeColorCard_v2 extends ThemeColorState_v2 {
|
|
|
1064
1044
|
syntax: ThemeColorSyntax
|
|
1065
1045
|
}
|
|
1066
1046
|
|
|
1047
|
+
/** @public */
|
|
1067
1048
|
export declare interface ThemeColorCard_v3 {
|
|
1068
1049
|
_hue: Hue
|
|
1069
1050
|
avatar: ThemeColorAvatar_v2
|
|
@@ -1133,6 +1114,7 @@ export declare type ThemeColorCardState = ThemeColorGenericState
|
|
|
1133
1114
|
/** @public */
|
|
1134
1115
|
export declare type ThemeColorCardToneKey = (typeof THEME_COLOR_CARD_TONES)[number]
|
|
1135
1116
|
|
|
1117
|
+
/** @public */
|
|
1136
1118
|
export declare interface ThemeColorElement {
|
|
1137
1119
|
_hue: Hue
|
|
1138
1120
|
bg: {
|
|
@@ -1192,14 +1174,10 @@ export declare interface ThemeColorInput {
|
|
|
1192
1174
|
invalid: ThemeColorInputStates
|
|
1193
1175
|
}
|
|
1194
1176
|
|
|
1195
|
-
/**
|
|
1196
|
-
* @public
|
|
1197
|
-
*/
|
|
1177
|
+
/** @public */
|
|
1198
1178
|
export declare type ThemeColorInput_v2 = Record<ThemeColorInputModeKey, ThemeColorInputMode_v2>
|
|
1199
1179
|
|
|
1200
|
-
/**
|
|
1201
|
-
* @public
|
|
1202
|
-
*/
|
|
1180
|
+
/** @public */
|
|
1203
1181
|
export declare type ThemeColorInputMode_v2 = Record<
|
|
1204
1182
|
ThemeColorInputStateKey,
|
|
1205
1183
|
ThemeColorInputState_v2
|
|
@@ -1221,9 +1199,7 @@ export declare interface ThemeColorInputState {
|
|
|
1221
1199
|
placeholder: string
|
|
1222
1200
|
}
|
|
1223
1201
|
|
|
1224
|
-
/**
|
|
1225
|
-
* @public
|
|
1226
|
-
*/
|
|
1202
|
+
/** @public */
|
|
1227
1203
|
export declare interface ThemeColorInputState_v2 {
|
|
1228
1204
|
_blend?: ThemeColorBlendModeKey
|
|
1229
1205
|
bg: string
|
|
@@ -1268,9 +1244,7 @@ export declare interface ThemeColorInputTokens
|
|
|
1268
1244
|
_hue?: ColorHueKey
|
|
1269
1245
|
}
|
|
1270
1246
|
|
|
1271
|
-
/**
|
|
1272
|
-
* @public
|
|
1273
|
-
*/
|
|
1247
|
+
/** @public */
|
|
1274
1248
|
export declare interface ThemeColorKBD {
|
|
1275
1249
|
bg: string
|
|
1276
1250
|
fg: string
|
|
@@ -1326,18 +1300,15 @@ export declare type ThemeColorPalette = {
|
|
|
1326
1300
|
*/
|
|
1327
1301
|
export declare type ThemeColorScheme = Record<ThemeColorName, ThemeColor>
|
|
1328
1302
|
|
|
1329
|
-
/**
|
|
1330
|
-
* @public
|
|
1331
|
-
*/
|
|
1303
|
+
/** @public */
|
|
1332
1304
|
export declare type ThemeColorScheme_v2 = Record<ThemeColorCardToneKey, ThemeColorCard_v2>
|
|
1333
1305
|
|
|
1306
|
+
/** @public */
|
|
1334
1307
|
export declare interface ThemeColorScheme_v3 {
|
|
1335
1308
|
card: Record<ThemeColorCardToneKey, ThemeColorCard_v3>
|
|
1336
1309
|
}
|
|
1337
1310
|
|
|
1338
|
-
/**
|
|
1339
|
-
* @public
|
|
1340
|
-
*/
|
|
1311
|
+
/** @public */
|
|
1341
1312
|
export declare type ThemeColorSchemeKey = (typeof THEME_COLOR_SCHEMES)[number]
|
|
1342
1313
|
|
|
1343
1314
|
/**
|
|
@@ -1346,9 +1317,7 @@ export declare type ThemeColorSchemeKey = (typeof THEME_COLOR_SCHEMES)[number]
|
|
|
1346
1317
|
*/
|
|
1347
1318
|
export declare type ThemeColorSchemes = Record<ThemeColorSchemeKey, ThemeColorScheme>
|
|
1348
1319
|
|
|
1349
|
-
/**
|
|
1350
|
-
* @public
|
|
1351
|
-
*/
|
|
1320
|
+
/** @public */
|
|
1352
1321
|
export declare type ThemeColorSchemes_v2 = Record<ThemeColorSchemeKey, ThemeColorScheme_v2>
|
|
1353
1322
|
|
|
1354
1323
|
/**
|
|
@@ -1363,9 +1332,7 @@ export declare interface ThemeColorSelectable {
|
|
|
1363
1332
|
critical: ThemeColorSelectableStates
|
|
1364
1333
|
}
|
|
1365
1334
|
|
|
1366
|
-
/**
|
|
1367
|
-
* @public
|
|
1368
|
-
*/
|
|
1335
|
+
/** @public */
|
|
1369
1336
|
export declare type ThemeColorSelectable_v2 = Record<
|
|
1370
1337
|
ThemeColorStateToneKey,
|
|
1371
1338
|
ThemeColorSelectableTone_v2
|
|
@@ -1389,9 +1356,7 @@ export declare interface ThemeColorSelectableStates {
|
|
|
1389
1356
|
disabled: ThemeColorSelectableState
|
|
1390
1357
|
}
|
|
1391
1358
|
|
|
1392
|
-
/**
|
|
1393
|
-
* @public
|
|
1394
|
-
*/
|
|
1359
|
+
/** @public */
|
|
1395
1360
|
export declare type ThemeColorSelectableTone_v2 = Record<ThemeColorStateKey, ThemeColorState_v2>
|
|
1396
1361
|
|
|
1397
1362
|
/** @public */
|
|
@@ -1439,9 +1404,7 @@ export declare type ThemeColorSpot = Record<ThemeColorSpotKey, string>
|
|
|
1439
1404
|
*/
|
|
1440
1405
|
export declare type ThemeColorSpotKey = ThemeColorAvatarColorKey
|
|
1441
1406
|
|
|
1442
|
-
/**
|
|
1443
|
-
* @public
|
|
1444
|
-
*/
|
|
1407
|
+
/** @public */
|
|
1445
1408
|
export declare interface ThemeColorState_v2 {
|
|
1446
1409
|
/** @internal */
|
|
1447
1410
|
_blend?: ThemeColorBlendModeKey
|
|
@@ -1524,9 +1487,7 @@ export declare interface ThemeColorStateTokens {
|
|
|
1524
1487
|
/** @public */
|
|
1525
1488
|
export declare type ThemeColorStateToneKey = (typeof THEME_COLOR_STATE_TONES)[number]
|
|
1526
1489
|
|
|
1527
|
-
/**
|
|
1528
|
-
* @public
|
|
1529
|
-
*/
|
|
1490
|
+
/** @public */
|
|
1530
1491
|
export declare interface ThemeColorSyntax {
|
|
1531
1492
|
atrule: string
|
|
1532
1493
|
attrName: string
|
|
@@ -1591,8 +1552,10 @@ export declare type ThemeColorTokenValue = [ColorConfigValue, ColorConfigValue]
|
|
|
1591
1552
|
*/
|
|
1592
1553
|
export declare type ThemeColorToneKey = ThemeColorName
|
|
1593
1554
|
|
|
1555
|
+
/** @public */
|
|
1594
1556
|
export declare type ThemeColorVariant = Record<ThemeColorStateToneKey, ThemeColorElement>
|
|
1595
1557
|
|
|
1558
|
+
/** @public */
|
|
1596
1559
|
export declare type ThemeColorVariantKey = 'tinted' | 'solid'
|
|
1597
1560
|
|
|
1598
1561
|
/** @public */
|
|
@@ -1631,17 +1594,13 @@ export declare interface ThemeConfig {
|
|
|
1631
1594
|
/** @public */
|
|
1632
1595
|
export declare type ThemeEntry = [`--${string}`, string]
|
|
1633
1596
|
|
|
1634
|
-
/**
|
|
1635
|
-
* @public
|
|
1636
|
-
*/
|
|
1597
|
+
/** @public */
|
|
1637
1598
|
export declare interface ThemeFocusRing {
|
|
1638
1599
|
offset: number
|
|
1639
1600
|
width: number
|
|
1640
1601
|
}
|
|
1641
1602
|
|
|
1642
|
-
/**
|
|
1643
|
-
* @public
|
|
1644
|
-
*/
|
|
1603
|
+
/** @public */
|
|
1645
1604
|
export declare interface ThemeFont {
|
|
1646
1605
|
family: string
|
|
1647
1606
|
featureSettings?: string
|
|
@@ -1651,14 +1610,10 @@ export declare interface ThemeFont {
|
|
|
1651
1610
|
horizontalOffset?: number
|
|
1652
1611
|
}
|
|
1653
1612
|
|
|
1654
|
-
/**
|
|
1655
|
-
* @public
|
|
1656
|
-
*/
|
|
1613
|
+
/** @public */
|
|
1657
1614
|
export declare type ThemeFontKey = 'code' | 'heading' | 'label' | 'text'
|
|
1658
1615
|
|
|
1659
|
-
/**
|
|
1660
|
-
* @public
|
|
1661
|
-
*/
|
|
1616
|
+
/** @public */
|
|
1662
1617
|
export declare interface ThemeFonts {
|
|
1663
1618
|
code: ThemeFont
|
|
1664
1619
|
heading: ThemeFont
|
|
@@ -1666,9 +1621,7 @@ export declare interface ThemeFonts {
|
|
|
1666
1621
|
text: ThemeFont
|
|
1667
1622
|
}
|
|
1668
1623
|
|
|
1669
|
-
/**
|
|
1670
|
-
* @public
|
|
1671
|
-
*/
|
|
1624
|
+
/** @public */
|
|
1672
1625
|
export declare interface ThemeFontSize {
|
|
1673
1626
|
ascenderHeight: number
|
|
1674
1627
|
descenderHeight: number
|
|
@@ -1678,9 +1631,7 @@ export declare interface ThemeFontSize {
|
|
|
1678
1631
|
lineHeight: number
|
|
1679
1632
|
}
|
|
1680
1633
|
|
|
1681
|
-
/**
|
|
1682
|
-
* @public
|
|
1683
|
-
*/
|
|
1634
|
+
/** @public */
|
|
1684
1635
|
export declare interface ThemeFontWeight {
|
|
1685
1636
|
regular: number
|
|
1686
1637
|
medium: number
|
|
@@ -1688,9 +1639,7 @@ export declare interface ThemeFontWeight {
|
|
|
1688
1639
|
bold: number
|
|
1689
1640
|
}
|
|
1690
1641
|
|
|
1691
|
-
/**
|
|
1692
|
-
* @public
|
|
1693
|
-
*/
|
|
1642
|
+
/** @public */
|
|
1694
1643
|
export declare type ThemeFontWeightKey = 'regular' | 'medium' | 'semibold' | 'bold'
|
|
1695
1644
|
|
|
1696
1645
|
/**
|
|
@@ -1717,9 +1666,7 @@ export declare interface ThemeInput {
|
|
|
1717
1666
|
}
|
|
1718
1667
|
}
|
|
1719
1668
|
|
|
1720
|
-
/**
|
|
1721
|
-
* @public
|
|
1722
|
-
*/
|
|
1669
|
+
/** @public */
|
|
1723
1670
|
export declare interface ThemeInput_v2 {
|
|
1724
1671
|
checkbox: {
|
|
1725
1672
|
size: number
|
|
@@ -1749,9 +1696,7 @@ export declare interface ThemeInput_v2 {
|
|
|
1749
1696
|
}
|
|
1750
1697
|
}
|
|
1751
1698
|
|
|
1752
|
-
/**
|
|
1753
|
-
* @public
|
|
1754
|
-
*/
|
|
1699
|
+
/** @public */
|
|
1755
1700
|
export declare interface ThemeLayer {
|
|
1756
1701
|
dialog: {
|
|
1757
1702
|
zOffset: number
|
|
@@ -1770,9 +1715,7 @@ export declare interface ThemeOptions {
|
|
|
1770
1715
|
tokens?: PartialTokens<Tokens>
|
|
1771
1716
|
}
|
|
1772
1717
|
|
|
1773
|
-
/**
|
|
1774
|
-
* @public
|
|
1775
|
-
*/
|
|
1718
|
+
/** @public */
|
|
1776
1719
|
export declare interface ThemeShadow {
|
|
1777
1720
|
umbra: ThemeBoxShadow
|
|
1778
1721
|
penumbra: ThemeBoxShadow
|
|
@@ -1791,8 +1734,10 @@ export declare interface ThemeStyles {
|
|
|
1791
1734
|
}
|
|
1792
1735
|
}
|
|
1793
1736
|
|
|
1737
|
+
/** @public */
|
|
1794
1738
|
export declare type Tint = (typeof TINTS)[number]
|
|
1795
1739
|
|
|
1740
|
+
/** @public */
|
|
1796
1741
|
export declare const TINTS: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]
|
|
1797
1742
|
|
|
1798
1743
|
/** @internal */
|
package/dist/theme.js
CHANGED
|
@@ -1938,47 +1938,47 @@ function resolveCardColorTokens(tokens) {
|
|
|
1938
1938
|
gray: {
|
|
1939
1939
|
_hue: tokens?.avatar?.gray?._hue ?? "gray",
|
|
1940
1940
|
bg: tokens?.avatar?.gray?.bg ?? ["400", "500"],
|
|
1941
|
-
fg: tokens?.avatar?.gray?.fg ?? ["900", "
|
|
1941
|
+
fg: tokens?.avatar?.gray?.fg ?? ["900", "white"]
|
|
1942
1942
|
},
|
|
1943
1943
|
blue: {
|
|
1944
1944
|
_hue: tokens?.avatar?.blue?._hue ?? "blue",
|
|
1945
1945
|
bg: tokens?.avatar?.blue?.bg ?? ["400", "500"],
|
|
1946
|
-
fg: tokens?.avatar?.blue?.fg ?? ["900", "
|
|
1946
|
+
fg: tokens?.avatar?.blue?.fg ?? ["900", "white"]
|
|
1947
1947
|
},
|
|
1948
1948
|
purple: {
|
|
1949
1949
|
_hue: tokens?.avatar?.purple?._hue ?? "purple",
|
|
1950
1950
|
bg: tokens?.avatar?.purple?.bg ?? ["400", "500"],
|
|
1951
|
-
fg: tokens?.avatar?.purple?.fg ?? ["900", "
|
|
1951
|
+
fg: tokens?.avatar?.purple?.fg ?? ["900", "white"]
|
|
1952
1952
|
},
|
|
1953
1953
|
magenta: {
|
|
1954
1954
|
_hue: tokens?.avatar?.magenta?._hue ?? "magenta",
|
|
1955
1955
|
bg: tokens?.avatar?.magenta?.bg ?? ["400", "500"],
|
|
1956
|
-
fg: tokens?.avatar?.magenta?.fg ?? ["900", "
|
|
1956
|
+
fg: tokens?.avatar?.magenta?.fg ?? ["900", "white"]
|
|
1957
1957
|
},
|
|
1958
1958
|
red: {
|
|
1959
1959
|
_hue: tokens?.avatar?.red?._hue ?? "red",
|
|
1960
1960
|
bg: tokens?.avatar?.red?.bg ?? ["400", "500"],
|
|
1961
|
-
fg: tokens?.avatar?.red?.fg ?? ["900", "
|
|
1961
|
+
fg: tokens?.avatar?.red?.fg ?? ["900", "white"]
|
|
1962
1962
|
},
|
|
1963
1963
|
orange: {
|
|
1964
1964
|
_hue: tokens?.avatar?.orange?._hue ?? "orange",
|
|
1965
1965
|
bg: tokens?.avatar?.orange?.bg ?? ["400", "500"],
|
|
1966
|
-
fg: tokens?.avatar?.orange?.fg ?? ["900", "
|
|
1966
|
+
fg: tokens?.avatar?.orange?.fg ?? ["900", "white"]
|
|
1967
1967
|
},
|
|
1968
1968
|
yellow: {
|
|
1969
1969
|
_hue: tokens?.avatar?.yellow?._hue ?? "yellow",
|
|
1970
1970
|
bg: tokens?.avatar?.yellow?.bg ?? ["400", "500"],
|
|
1971
|
-
fg: tokens?.avatar?.yellow?.fg ?? ["900", "
|
|
1971
|
+
fg: tokens?.avatar?.yellow?.fg ?? ["900", "white"]
|
|
1972
1972
|
},
|
|
1973
1973
|
green: {
|
|
1974
1974
|
_hue: tokens?.avatar?.green?._hue ?? "green",
|
|
1975
1975
|
bg: tokens?.avatar?.green?.bg ?? ["400", "500"],
|
|
1976
|
-
fg: tokens?.avatar?.green?.fg ?? ["900", "
|
|
1976
|
+
fg: tokens?.avatar?.green?.fg ?? ["900", "white"]
|
|
1977
1977
|
},
|
|
1978
1978
|
cyan: {
|
|
1979
1979
|
_hue: tokens?.avatar?.cyan?._hue ?? "cyan",
|
|
1980
1980
|
bg: tokens?.avatar?.cyan?.bg ?? ["400", "500"],
|
|
1981
|
-
fg: tokens?.avatar?.cyan?.fg ?? ["900", "
|
|
1981
|
+
fg: tokens?.avatar?.cyan?.fg ?? ["900", "white"]
|
|
1982
1982
|
}
|
|
1983
1983
|
},
|
|
1984
1984
|
backdrop: tokens?.backdrop ?? ["900", "100"],
|