@sanity/ui 2.16.21 → 2.16.23
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 +121 -1046
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-cjs/refractor.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +116 -1041
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_chunks-es/refractor.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +411 -351
- package/dist/_visual-editing.d.ts +411 -351
- package/dist/index.d.mts +1107 -930
- package/dist/index.d.ts +1107 -930
- package/dist/index.js +67 -158
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +65 -156
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.mts +769 -681
- package/dist/theme.d.ts +769 -681
- package/dist/theme.js +47 -0
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +47 -0
- package/dist/theme.mjs.map +1 -1
- package/exports/_visual-editing.ts +1 -0
- package/package.json +50 -163
- package/src/core/_compat.ts +30 -0
- package/src/core/components/autocomplete/autocomplete.tsx +11 -4
- package/src/core/components/autocomplete/autocompleteOption.tsx +1 -0
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +1 -0
- package/src/core/components/dialog/dialog.tsx +3 -0
- package/src/core/components/hotkeys/hotkeys.tsx +1 -0
- package/src/core/components/menu/menu.test.tsx +6 -4
- package/src/core/components/menu/menu.tsx +3 -2
- package/src/core/components/menu/menuButton.tsx +8 -0
- package/src/core/components/menu/menuGroup.tsx +5 -2
- package/src/core/components/menu/menuItem.tsx +4 -0
- package/src/core/components/menu/useMenuController.ts +6 -4
- package/src/core/components/skeleton/skeleton.tsx +2 -1
- package/src/core/components/tab/tab.tsx +1 -0
- package/src/core/components/tab/tabList.tsx +1 -0
- package/src/core/components/toast/toast.test.tsx +9 -4
- package/src/core/components/toast/toast.tsx +1 -1
- package/src/core/components/toast/toastProvider.tsx +1 -1
- package/src/core/components/tree/tree.tsx +1 -0
- package/src/core/components/tree/treeGroup.tsx +1 -0
- package/src/core/components/tree/treeItem.tsx +2 -2
- package/src/core/constants.ts +2 -2
- package/src/core/hooks/useClickOutside.test.tsx +43 -15
- package/src/core/hooks/useClickOutside.ts +1 -1
- package/src/core/hooks/useClickOutsideEvent.test.tsx +8 -4
- package/src/core/hooks/useDelayed.test.ts +7 -6
- package/src/core/hooks/useElementRect/useElementRect.ts +1 -0
- package/src/core/hooks/useForwardedRef.ts +1 -0
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +2 -1
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +7 -5
- package/src/core/hooks/usePrefersDark.test.tsx +3 -1
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +7 -5
- package/src/core/hooks/usePrefersReducedMotion.test.tsx +3 -1
- package/src/core/lib/createGlobalScopedContext.ts +1 -0
- package/src/core/lib/globalScope.ts +1 -0
- package/src/core/observers/elementSizeObserver.ts +1 -0
- package/src/core/primitives/avatar/avatar.tsx +1 -2
- package/src/core/primitives/avatar/avatarStack.tsx +1 -0
- package/src/core/primitives/badge/badge.test.tsx +3 -2
- package/src/core/primitives/badge/badge.tsx +2 -1
- package/src/core/primitives/box/box.tsx +2 -1
- package/src/core/primitives/button/button.test.tsx +3 -2
- package/src/core/primitives/button/button.tsx +2 -0
- package/src/core/primitives/button/styles.ts +1 -0
- package/src/core/primitives/card/card.tsx +1 -5
- package/src/core/primitives/card/types.ts +1 -0
- package/src/core/primitives/code/refractor.tsx +2 -0
- package/src/core/primitives/flex/flex.tsx +1 -3
- package/src/core/primitives/inline/inline.tsx +1 -0
- package/src/core/primitives/popover/popover.tsx +13 -4
- package/src/core/primitives/popover/popoverCard.tsx +2 -1
- package/src/core/primitives/popover/types.ts +0 -1
- package/src/core/primitives/stack/styles.ts +1 -0
- package/src/core/primitives/textInput/textInput.tsx +2 -0
- package/src/core/primitives/tooltip/tooltip.test.tsx +82 -49
- package/src/core/primitives/tooltip/tooltip.tsx +6 -1
- package/src/core/primitives/tooltip/tooltipCard.tsx +2 -1
- package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +2 -0
- package/src/core/styles/flex/types.ts +0 -1
- package/src/core/styles/font/responsiveFont.ts +0 -3
- package/src/core/styles/font/types.ts +1 -3
- package/src/core/styles/grid/gridStyle.ts +1 -0
- package/src/core/styles/margin/marginStyle.ts +1 -0
- package/src/core/styles/margin/marginsStyle.test.ts +2 -1
- package/src/core/styles/padding/paddingStyle.test.ts +2 -1
- package/src/core/styles/padding/paddingStyle.ts +1 -0
- package/src/core/theme/theme.test.tsx +7 -3
- package/src/core/theme/useRootTheme.ts +1 -0
- package/src/core/theme/useTheme.ts +2 -0
- package/src/core/utils/arrow/arrow.tsx +1 -0
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +9 -4
- package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +1 -0
- package/src/core/utils/getElementRef.ts +5 -0
- package/src/core/utils/layer/getLayerContext.test.ts +2 -0
- package/src/core/utils/layer/layer.test.tsx +9 -4
- package/src/core/utils/layer/layer.tsx +1 -0
- package/src/core/utils/layer/useLayer.ts +2 -0
- package/src/core/utils/portal/portal.test.tsx +9 -4
- package/src/core/utils/portal/portalProvider.tsx +4 -3
- package/src/core/utils/virtualList/virtualList.tsx +2 -1
- package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +10 -0
- package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +4 -0
- package/src/theme/build/_deprecated/color/button/createButtonModes.ts +5 -0
- package/src/theme/build/_deprecated/color/button/createButtonTones.ts +5 -0
- package/src/theme/build/_deprecated/color/card/createCardStates.ts +6 -0
- package/src/theme/build/_deprecated/color/color.test.ts +5 -1
- package/src/theme/build/_deprecated/color/defaults.ts +1 -0
- package/src/theme/build/_deprecated/color/factory.ts +36 -0
- package/src/theme/build/_deprecated/color/input/createInputModes.ts +5 -0
- package/src/theme/build/_deprecated/color/muted/createMuted.ts +4 -0
- package/src/theme/build/_deprecated/color/spot/createSpot.ts +3 -0
- package/src/theme/build/buildColorTheme.test.ts +2 -0
- package/src/theme/build/buildColorTheme.ts +7 -0
- package/src/theme/build/buildTheme.test.ts +2 -0
- package/src/theme/build/lib/color-fns/color-fns.test.ts +3 -1
- package/src/theme/build/merge.ts +5 -0
- package/src/theme/build/mixThemeColor.test.ts +2 -0
- package/src/theme/build/renderColorTheme.ts +6 -0
- package/src/theme/build/renderColorValue.ts +0 -2
- package/src/theme/build/resolveColorTokens.ts +6 -0
- package/src/theme/build/theme.test.ts +2 -0
- package/src/theme/config/helpers.ts +5 -0
- package/src/theme/config/system.ts +2 -0
- package/src/theme/config/tokens/color/types.ts +6 -4
- package/src/theme/config/tokens/parseTokenKey.test.ts +2 -0
- package/src/theme/config/tokens/parseTokenValue.test.ts +2 -0
- package/src/theme/config/tokens/parseTokenValue.ts +1 -0
- package/src/theme/getScopedTheme.ts +5 -0
- package/src/theme/system/color/_helpers.ts +4 -0
- package/src/theme/system/theme.ts +4 -0
- package/src/theme/system/v0/color/_system.ts +1 -0
- package/src/theme/system/v0/color/button.ts +14 -0
- package/src/theme/system/v0/color/card.ts +6 -0
- package/src/theme/system/v0/color/color.ts +11 -0
- package/src/theme/system/v0/color/input.ts +6 -0
- package/src/theme/system/v0/color/muted.ts +11 -0
- package/src/theme/system/v0/color/selectable.ts +11 -0
- package/src/theme/system/v0/color/solid.ts +11 -0
- package/src/theme/system/v0/color/spot.ts +1 -0
- package/src/theme/versioning/getTheme_v2.ts +15 -0
- package/src/theme/versioning/themeColor_v0_v2.ts +7 -0
- package/src/theme/versioning/themeColor_v2_v2_9.ts +1 -0
- package/src/theme/versioning/v0_v2.ts +13 -1
- package/src/theme/versioning/v2_v0.ts +15 -0
- package/src/core/__workshop__/constants.ts +0 -293
- package/src/core/components/autocomplete/__mocks__/apiStore.ts +0 -49
- package/src/core/components/autocomplete/__mocks__/countries.ts +0 -245
- package/src/core/components/autocomplete/__workshop__/async.tsx +0 -156
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -137
- package/src/core/components/autocomplete/__workshop__/custom.tsx +0 -89
- package/src/core/components/autocomplete/__workshop__/example.tsx +0 -79
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -36
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +0 -294
- package/src/core/components/autocomplete/__workshop__/index.ts +0 -39
- package/src/core/components/autocomplete/__workshop__/types.ts +0 -4
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +0 -62
- package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -14
- package/src/core/components/dialog/__workshop__/activate.tsx +0 -134
- package/src/core/components/dialog/__workshop__/autoFocus.tsx +0 -29
- package/src/core/components/dialog/__workshop__/index.ts +0 -19
- package/src/core/components/dialog/__workshop__/layering.tsx +0 -41
- package/src/core/components/dialog/__workshop__/nested.tsx +0 -72
- package/src/core/components/dialog/__workshop__/onScroll.tsx +0 -39
- package/src/core/components/dialog/__workshop__/panes.tsx +0 -82
- package/src/core/components/dialog/__workshop__/position.tsx +0 -30
- package/src/core/components/dialog/__workshop__/props.tsx +0 -75
- package/src/core/components/dialog/__workshop__/provider.tsx +0 -11
- package/src/core/components/dialog/__workshop__/wrapped.tsx +0 -76
- package/src/core/components/hotkeys/__workshop__/index.ts +0 -14
- package/src/core/components/hotkeys/__workshop__/plain.tsx +0 -9
- package/src/core/components/menu/__workshop__/asComponent.tsx +0 -45
- package/src/core/components/menu/__workshop__/avatarMenu.tsx +0 -51
- package/src/core/components/menu/__workshop__/closableMenuButton.tsx +0 -46
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +0 -134
- package/src/core/components/menu/__workshop__/customMenuItem.tsx +0 -45
- package/src/core/components/menu/__workshop__/customSelectedState.tsx +0 -39
- package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +0 -40
- package/src/core/components/menu/__workshop__/groups.tsx +0 -156
- package/src/core/components/menu/__workshop__/index.ts +0 -89
- package/src/core/components/menu/__workshop__/menuButton.tsx +0 -80
- package/src/core/components/menu/__workshop__/menuGroupRight.tsx +0 -65
- package/src/core/components/menu/__workshop__/nestedMenu.tsx +0 -22
- package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +0 -41
- package/src/core/components/menu/__workshop__/selectedItem.tsx +0 -69
- package/src/core/components/menu/__workshop__/shouldFocus.tsx +0 -47
- package/src/core/components/menu/__workshop__/tones.tsx +0 -25
- package/src/core/components/menu/__workshop__/withoutArrow.tsx +0 -32
- package/src/core/components/skeleton/__workshop__/delay.tsx +0 -70
- package/src/core/components/skeleton/__workshop__/index.ts +0 -11
- package/src/core/components/skeleton/__workshop__/skeleton.tsx +0 -64
- package/src/core/components/tab/__workshop__/example.tsx +0 -79
- package/src/core/components/tab/__workshop__/index.ts +0 -14
- package/src/core/components/toast/__workshop__/hook.tsx +0 -71
- package/src/core/components/toast/__workshop__/index.ts +0 -19
- package/src/core/components/toast/__workshop__/toast.tsx +0 -26
- package/src/core/components/tree/__workshop__/basic.perf.ts +0 -19
- package/src/core/components/tree/__workshop__/basic.tsx +0 -105
- package/src/core/components/tree/__workshop__/index.ts +0 -21
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +0 -84
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +0 -32
- package/src/core/hooks/useElementRect/__workshop__/index.ts +0 -14
- package/src/core/hooks/useMediaIndex/__workshop__/index.ts +0 -14
- package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +0 -14
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +0 -14
- package/src/core/primitives/avatar/__workshop__/index.ts +0 -29
- package/src/core/primitives/avatar/__workshop__/stack.tsx +0 -25
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +0 -63
- package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -70
- package/src/core/primitives/badge/__workshop__/index.ts +0 -19
- package/src/core/primitives/badge/__workshop__/props.tsx +0 -30
- package/src/core/primitives/badge/__workshop__/tones.tsx +0 -21
- package/src/core/primitives/box/__workshop__/index.ts +0 -19
- package/src/core/primitives/box/__workshop__/props.tsx +0 -20
- package/src/core/primitives/box/__workshop__/responsive.tsx +0 -20
- package/src/core/primitives/button/__workshop__/custom.tsx +0 -51
- package/src/core/primitives/button/__workshop__/customIcons.tsx +0 -30
- package/src/core/primitives/button/__workshop__/disabled.tsx +0 -74
- package/src/core/primitives/button/__workshop__/index.ts +0 -59
- package/src/core/primitives/button/__workshop__/mixedChildren.tsx +0 -12
- package/src/core/primitives/button/__workshop__/props.tsx +0 -55
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +0 -36
- package/src/core/primitives/button/__workshop__/stacked.tsx +0 -58
- package/src/core/primitives/button/__workshop__/styled1.tsx +0 -17
- package/src/core/primitives/button/__workshop__/styled2.tsx +0 -19
- package/src/core/primitives/button/__workshop__/uploadButton.tsx +0 -28
- package/src/core/primitives/card/__workshop__/allTones.tsx +0 -25
- package/src/core/primitives/card/__workshop__/asButton.tsx +0 -107
- package/src/core/primitives/card/__workshop__/asComponent.tsx +0 -27
- package/src/core/primitives/card/__workshop__/checkered.tsx +0 -26
- package/src/core/primitives/card/__workshop__/index.ts +0 -18
- package/src/core/primitives/card/__workshop__/interactive.tsx +0 -30
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +0 -80
- package/src/core/primitives/card/__workshop__/props.tsx +0 -53
- package/src/core/primitives/card/__workshop__/selected.tsx +0 -94
- package/src/core/primitives/card/__workshop__/styled.tsx +0 -14
- package/src/core/primitives/checkbox/__workshop__/example.tsx +0 -25
- package/src/core/primitives/checkbox/__workshop__/index.ts +0 -13
- package/src/core/primitives/checkbox/__workshop__/props.tsx +0 -33
- package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +0 -16
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +0 -28
- package/src/core/primitives/code/__workshop__/index.ts +0 -19
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +0 -48
- package/src/core/primitives/code/__workshop__/props.tsx +0 -21
- package/src/core/primitives/container/__workshop__/example.tsx +0 -20
- package/src/core/primitives/container/__workshop__/index.ts +0 -8
- package/src/core/primitives/flex/__workshop__/example.tsx +0 -34
- package/src/core/primitives/flex/__workshop__/gap.tsx +0 -25
- package/src/core/primitives/flex/__workshop__/index.ts +0 -11
- package/src/core/primitives/grid/__workshop__/index.ts +0 -10
- package/src/core/primitives/grid/__workshop__/responsive.tsx +0 -54
- package/src/core/primitives/heading/__workshop__/index.ts +0 -19
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +0 -54
- package/src/core/primitives/heading/__workshop__/plain.tsx +0 -32
- package/src/core/primitives/inline/__workshop__/index.ts +0 -8
- package/src/core/primitives/inline/__workshop__/plain.tsx +0 -27
- package/src/core/primitives/kbd/__workshop__/index.ts +0 -8
- package/src/core/primitives/kbd/__workshop__/plain.tsx +0 -9
- package/src/core/primitives/label/__workshop__/index.ts +0 -19
- package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +0 -48
- package/src/core/primitives/label/__workshop__/plain.tsx +0 -24
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
- package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +0 -31
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
- package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +0 -71
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +0 -71
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +0 -89
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +0 -97
- package/src/core/primitives/popover/__workshop__/index.ts +0 -49
- package/src/core/primitives/radio/__workshop__/example.tsx +0 -63
- package/src/core/primitives/radio/__workshop__/index.ts +0 -11
- package/src/core/primitives/radio/__workshop__/plain.tsx +0 -28
- package/src/core/primitives/select/__workshop__/index.ts +0 -11
- package/src/core/primitives/select/__workshop__/plain.tsx +0 -27
- package/src/core/primitives/select/__workshop__/readOnly.tsx +0 -23
- package/src/core/primitives/spinner/__workshop__/Props.tsx +0 -15
- package/src/core/primitives/spinner/__workshop__/index.ts +0 -14
- package/src/core/primitives/stack/__workshop__/index.ts +0 -14
- package/src/core/primitives/stack/__workshop__/plain.tsx +0 -32
- package/src/core/primitives/switch/__workshop__/example.tsx +0 -23
- package/src/core/primitives/switch/__workshop__/index.ts +0 -11
- package/src/core/primitives/switch/__workshop__/props.tsx +0 -21
- package/src/core/primitives/text/__workshop__/colored.tsx +0 -30
- package/src/core/primitives/text/__workshop__/example.tsx +0 -39
- package/src/core/primitives/text/__workshop__/index.ts +0 -24
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +0 -48
- package/src/core/primitives/textArea/__workshop__/index.ts +0 -14
- package/src/core/primitives/textArea/__workshop__/plain.tsx +0 -50
- package/src/core/primitives/textInput/__workshop__/clearButton.tsx +0 -30
- package/src/core/primitives/textInput/__workshop__/customValidity.tsx +0 -17
- package/src/core/primitives/textInput/__workshop__/index.ts +0 -44
- package/src/core/primitives/textInput/__workshop__/plain.tsx +0 -98
- package/src/core/primitives/textInput/__workshop__/readOnly.tsx +0 -9
- package/src/core/primitives/textInput/__workshop__/states.tsx +0 -53
- package/src/core/primitives/textInput/__workshop__/tones.tsx +0 -277
- package/src/core/primitives/textInput/__workshop__/typed.tsx +0 -23
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
- package/src/core/primitives/tooltip/__workshop__/index.ts +0 -29
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
- package/src/core/primitives/tooltip/__workshop__/props.tsx +0 -107
- package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
- package/src/core/theme/__workshop__/build/Root.tsx +0 -367
- package/src/core/theme/__workshop__/build/helpers.ts +0 -46
- package/src/core/theme/__workshop__/build/story.tsx +0 -465
- package/src/core/theme/__workshop__/canvas.tsx +0 -352
- package/src/core/theme/__workshop__/color.tsx +0 -62
- package/src/core/theme/__workshop__/debug/story.tsx +0 -408
- package/src/core/theme/__workshop__/index.ts +0 -39
- package/src/core/theme/__workshop__/layer.tsx +0 -78
- package/src/core/theme/__workshop__/nestedProvider.tsx +0 -15
- package/src/core/utils/boundaryElement/__workshop__/index.ts +0 -14
- package/src/core/utils/boundaryElement/__workshop__/plain.tsx +0 -19
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +0 -30
- package/src/core/utils/elementQuery/__workshop__/index.ts +0 -14
- package/src/core/utils/layer/__workshop__/_debug.tsx +0 -17
- package/src/core/utils/layer/__workshop__/index.ts +0 -24
- package/src/core/utils/layer/__workshop__/multipleRoots.tsx +0 -49
- package/src/core/utils/layer/__workshop__/nested.tsx +0 -98
- package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +0 -13
- package/src/core/utils/portal/__workshop__/index.ts +0 -14
- package/src/core/utils/portal/__workshop__/named.tsx +0 -63
- package/src/core/utils/virtualList/__workshop__/changingProps.tsx +0 -36
- package/src/core/utils/virtualList/__workshop__/elementScroll.tsx +0 -24
- package/src/core/utils/virtualList/__workshop__/index.ts +0 -29
- package/src/core/utils/virtualList/__workshop__/infiniteList.tsx +0 -48
- package/src/core/utils/virtualList/__workshop__/windowScrolll.tsx +0 -22
package/dist/theme.d.mts
CHANGED
|
@@ -1,209 +1,227 @@
|
|
|
1
|
-
import {ColorHueKey} from
|
|
2
|
-
import {ColorTint} from
|
|
3
|
-
import {ColorTintKey} from
|
|
4
|
-
import type {StyledObject} from
|
|
1
|
+
import { ColorHueKey } from "@sanity/color";
|
|
2
|
+
import { ColorTint } from "@sanity/color";
|
|
3
|
+
import { ColorTintKey } from "@sanity/color";
|
|
4
|
+
import type { StyledObject } from "styled-components";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
9
|
export declare interface BaseTheme {
|
|
10
|
-
_version?: 0
|
|
10
|
+
_version?: 0;
|
|
11
11
|
/**
|
|
12
12
|
* @deprecated Use `v2.avatar` instead
|
|
13
13
|
*/
|
|
14
|
-
avatar: ThemeAvatar
|
|
14
|
+
avatar: ThemeAvatar;
|
|
15
15
|
/**
|
|
16
16
|
* @deprecated Use `v2.button` instead
|
|
17
17
|
*/
|
|
18
18
|
button: {
|
|
19
|
-
textWeight: ThemeFontWeightKey
|
|
20
|
-
}
|
|
19
|
+
textWeight: ThemeFontWeightKey;
|
|
20
|
+
};
|
|
21
21
|
/**
|
|
22
22
|
* @deprecated Use `v2.color` instead
|
|
23
23
|
*/
|
|
24
|
-
color: ThemeColorSchemes
|
|
24
|
+
color: ThemeColorSchemes;
|
|
25
25
|
/**
|
|
26
26
|
* @deprecated Use `v2.container` instead
|
|
27
27
|
*/
|
|
28
|
-
container: number[]
|
|
28
|
+
container: number[];
|
|
29
29
|
/**
|
|
30
30
|
* @deprecated Use component-specific `v2.{button | card | input}.focusRing` values instead
|
|
31
31
|
*/
|
|
32
32
|
focusRing: {
|
|
33
|
-
offset: number
|
|
34
|
-
width: number
|
|
35
|
-
}
|
|
33
|
+
offset: number;
|
|
34
|
+
width: number;
|
|
35
|
+
};
|
|
36
36
|
/**
|
|
37
37
|
* @deprecated Use `v2.font` instead
|
|
38
38
|
*/
|
|
39
|
-
fonts: ThemeFonts
|
|
39
|
+
fonts: ThemeFonts;
|
|
40
40
|
/**
|
|
41
41
|
* @deprecated Use `v2.input` instead
|
|
42
42
|
*/
|
|
43
|
-
input: ThemeInput
|
|
43
|
+
input: ThemeInput;
|
|
44
44
|
/**
|
|
45
45
|
* THIS API MAY BE UNSTABLE. DO NOT USE IN PRODUCTION.
|
|
46
46
|
* @beta
|
|
47
47
|
* @deprecated Use `v2.layer` instead
|
|
48
48
|
*/
|
|
49
|
-
layer?: ThemeLayer
|
|
49
|
+
layer?: ThemeLayer;
|
|
50
50
|
/**
|
|
51
51
|
* @deprecated Use `v2.media` instead
|
|
52
52
|
*/
|
|
53
|
-
media: number[]
|
|
53
|
+
media: number[];
|
|
54
54
|
/**
|
|
55
55
|
* @deprecated Use `v2.radius` instead
|
|
56
56
|
*/
|
|
57
|
-
radius: number[]
|
|
57
|
+
radius: number[];
|
|
58
58
|
/**
|
|
59
59
|
* @deprecated Use `v2.shadow` instead
|
|
60
60
|
*/
|
|
61
|
-
shadows: Array<ThemeShadow | null
|
|
61
|
+
shadows: Array<ThemeShadow | null>;
|
|
62
62
|
/**
|
|
63
63
|
* @deprecated Use `v2.space` instead
|
|
64
64
|
*/
|
|
65
|
-
space: number[]
|
|
65
|
+
space: number[];
|
|
66
66
|
/**
|
|
67
67
|
* @internal
|
|
68
68
|
* @deprecated Use `v2.style` instead
|
|
69
69
|
*/
|
|
70
|
-
styles?: ThemeStyles
|
|
71
|
-
v2?: RootTheme_v2
|
|
70
|
+
styles?: ThemeStyles;
|
|
71
|
+
v2?: RootTheme_v2;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/** @internal */
|
|
75
|
-
export declare function buildTheme(config?: ThemeConfig): RootTheme
|
|
75
|
+
export declare function buildTheme(config?: ThemeConfig): RootTheme;
|
|
76
76
|
|
|
77
77
|
/** @public */
|
|
78
|
-
export declare const COLOR_CONFIG_AVATAR_COLORS: readonly [
|
|
78
|
+
export declare const COLOR_CONFIG_AVATAR_COLORS: readonly [
|
|
79
|
+
"*",
|
|
80
|
+
...ColorHueKey[],
|
|
81
|
+
];
|
|
79
82
|
|
|
80
83
|
/** @public */
|
|
81
|
-
export declare const COLOR_CONFIG_BLEND_KEYS: readonly [
|
|
84
|
+
export declare const COLOR_CONFIG_BLEND_KEYS: readonly ["_blend"];
|
|
82
85
|
|
|
83
86
|
/** @public */
|
|
84
87
|
export declare const COLOR_CONFIG_CARD_KEYS: readonly [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
]
|
|
88
|
+
"_hue",
|
|
89
|
+
"bg",
|
|
90
|
+
"fg",
|
|
91
|
+
"border",
|
|
92
|
+
"focusRing",
|
|
93
|
+
"muted/fg",
|
|
94
|
+
"accent/fg",
|
|
95
|
+
"link/fg",
|
|
96
|
+
"code/bg",
|
|
97
|
+
"code/fg",
|
|
98
|
+
"skeleton/from",
|
|
99
|
+
"skeleton/to",
|
|
100
|
+
"status/dot",
|
|
101
|
+
"status/icon",
|
|
102
|
+
"_hue",
|
|
103
|
+
"bg",
|
|
104
|
+
"fg",
|
|
105
|
+
"border",
|
|
106
|
+
"focusRing",
|
|
107
|
+
"shadow/outline",
|
|
108
|
+
"shadow/umbra",
|
|
109
|
+
"shadow/penumbra",
|
|
110
|
+
"shadow/ambient",
|
|
111
|
+
];
|
|
109
112
|
|
|
110
113
|
/** @public */
|
|
111
114
|
export declare const COLOR_CONFIG_CARD_TONES: readonly [
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
]
|
|
115
|
+
"*",
|
|
116
|
+
"transparent",
|
|
117
|
+
"default",
|
|
118
|
+
"neutral",
|
|
119
|
+
"primary",
|
|
120
|
+
"suggest",
|
|
121
|
+
"positive",
|
|
122
|
+
"caution",
|
|
123
|
+
"critical",
|
|
124
|
+
];
|
|
122
125
|
|
|
123
126
|
/** @public */
|
|
124
|
-
export declare const COLOR_CONFIG_INPUT_MODES: readonly [
|
|
127
|
+
export declare const COLOR_CONFIG_INPUT_MODES: readonly [
|
|
128
|
+
"*",
|
|
129
|
+
"default",
|
|
130
|
+
"invalid",
|
|
131
|
+
];
|
|
125
132
|
|
|
126
133
|
/** @public */
|
|
127
134
|
export declare const COLOR_CONFIG_INPUT_STATES: readonly [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
]
|
|
135
|
+
"*",
|
|
136
|
+
"enabled",
|
|
137
|
+
"hovered",
|
|
138
|
+
"readOnly",
|
|
139
|
+
"disabled",
|
|
140
|
+
];
|
|
134
141
|
|
|
135
142
|
/** @public */
|
|
136
143
|
export declare const COLOR_CONFIG_STATE_KEYS: readonly [
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
]
|
|
144
|
+
"_hue",
|
|
145
|
+
"bg",
|
|
146
|
+
"fg",
|
|
147
|
+
"border",
|
|
148
|
+
"focusRing",
|
|
149
|
+
"muted/fg",
|
|
150
|
+
"accent/fg",
|
|
151
|
+
"link/fg",
|
|
152
|
+
"code/bg",
|
|
153
|
+
"code/fg",
|
|
154
|
+
"skeleton/from",
|
|
155
|
+
"skeleton/to",
|
|
156
|
+
"status/dot",
|
|
157
|
+
"status/icon",
|
|
158
|
+
];
|
|
152
159
|
|
|
153
160
|
/** @public */
|
|
154
161
|
export declare const COLOR_CONFIG_STATE_TONES: readonly [
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
]
|
|
162
|
+
"*",
|
|
163
|
+
"default",
|
|
164
|
+
"neutral",
|
|
165
|
+
"primary",
|
|
166
|
+
"suggest",
|
|
167
|
+
"positive",
|
|
168
|
+
"caution",
|
|
169
|
+
"critical",
|
|
170
|
+
];
|
|
164
171
|
|
|
165
172
|
/** @public */
|
|
166
173
|
export declare const COLOR_CONFIG_STATES: readonly [
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
]
|
|
174
|
+
"*",
|
|
175
|
+
"enabled",
|
|
176
|
+
"hovered",
|
|
177
|
+
"pressed",
|
|
178
|
+
"selected",
|
|
179
|
+
"disabled",
|
|
180
|
+
];
|
|
174
181
|
|
|
175
182
|
/** @public */
|
|
176
|
-
export declare type ColorBlendModeTokenValue = [
|
|
183
|
+
export declare type ColorBlendModeTokenValue = [
|
|
184
|
+
ThemeColorBlendModeKey,
|
|
185
|
+
ThemeColorBlendModeKey,
|
|
186
|
+
];
|
|
177
187
|
|
|
178
188
|
/** @public */
|
|
179
|
-
export declare type ColorConfigAvatarColor =
|
|
189
|
+
export declare type ColorConfigAvatarColor =
|
|
190
|
+
(typeof COLOR_CONFIG_AVATAR_COLORS)[number];
|
|
180
191
|
|
|
181
192
|
/** @public */
|
|
182
|
-
export declare type ColorConfigBlendKey =
|
|
193
|
+
export declare type ColorConfigBlendKey =
|
|
194
|
+
(typeof COLOR_CONFIG_BLEND_KEYS)[number];
|
|
183
195
|
|
|
184
196
|
/** @public */
|
|
185
|
-
export declare type ColorConfigCardKey =
|
|
197
|
+
export declare type ColorConfigCardKey =
|
|
198
|
+
(typeof COLOR_CONFIG_CARD_KEYS)[number];
|
|
186
199
|
|
|
187
200
|
/** @public */
|
|
188
|
-
export declare type ColorConfigCardTone =
|
|
201
|
+
export declare type ColorConfigCardTone =
|
|
202
|
+
(typeof COLOR_CONFIG_CARD_TONES)[number];
|
|
189
203
|
|
|
190
204
|
/** @public */
|
|
191
|
-
export declare type ColorConfigInputMode =
|
|
205
|
+
export declare type ColorConfigInputMode =
|
|
206
|
+
(typeof COLOR_CONFIG_INPUT_MODES)[number];
|
|
192
207
|
|
|
193
208
|
/** @public */
|
|
194
|
-
export declare type ColorConfigInputState =
|
|
209
|
+
export declare type ColorConfigInputState =
|
|
210
|
+
(typeof COLOR_CONFIG_INPUT_STATES)[number];
|
|
195
211
|
|
|
196
212
|
/** @public */
|
|
197
|
-
export declare type ColorConfigOpacityValue = `0` | `0.${number}` | `1
|
|
213
|
+
export declare type ColorConfigOpacityValue = `0` | `0.${number}` | `1`;
|
|
198
214
|
|
|
199
215
|
/** @public */
|
|
200
|
-
export declare type ColorConfigState = (typeof COLOR_CONFIG_STATES)[number]
|
|
216
|
+
export declare type ColorConfigState = (typeof COLOR_CONFIG_STATES)[number];
|
|
201
217
|
|
|
202
218
|
/** @public */
|
|
203
|
-
export declare type ColorConfigStateKey =
|
|
219
|
+
export declare type ColorConfigStateKey =
|
|
220
|
+
(typeof COLOR_CONFIG_STATE_KEYS)[number];
|
|
204
221
|
|
|
205
222
|
/** @public */
|
|
206
|
-
export declare type ColorConfigStateTone =
|
|
223
|
+
export declare type ColorConfigStateTone =
|
|
224
|
+
(typeof COLOR_CONFIG_STATE_TONES)[number];
|
|
207
225
|
|
|
208
226
|
/** @public */
|
|
209
227
|
export declare type ColorConfigValue =
|
|
@@ -218,7 +236,7 @@ export declare type ColorConfigValue =
|
|
|
218
236
|
| `${ColorHueKey}/${ColorTintKey}/${ColorConfigOpacityValue}`
|
|
219
237
|
| `${ColorTintKey}`
|
|
220
238
|
| `${ColorTintKey} ${number}%`
|
|
221
|
-
| `${ColorTintKey}/${ColorConfigOpacityValue}
|
|
239
|
+
| `${ColorTintKey}/${ColorConfigOpacityValue}`;
|
|
222
240
|
|
|
223
241
|
/**
|
|
224
242
|
* @public
|
|
@@ -226,198 +244,221 @@ export declare type ColorConfigValue =
|
|
|
226
244
|
*/
|
|
227
245
|
export declare function createColorTheme(
|
|
228
246
|
partialOpts?: PartialThemeColorBuilderOpts,
|
|
229
|
-
): ThemeColorSchemes
|
|
247
|
+
): ThemeColorSchemes;
|
|
230
248
|
|
|
231
249
|
/**
|
|
232
250
|
* Work around types that are missing in `styled-components@6`
|
|
233
251
|
* https://github.com/styled-components/styled-components/issues/4062
|
|
234
252
|
* @internal
|
|
235
253
|
*/
|
|
236
|
-
export declare type CSSObject = StyledObject<any
|
|
254
|
+
export declare type CSSObject = StyledObject<any>;
|
|
237
255
|
|
|
238
256
|
/** @internal */
|
|
239
|
-
export declare function getContrastRatio(bg: string, fg: string): number
|
|
257
|
+
export declare function getContrastRatio(bg: string, fg: string): number;
|
|
240
258
|
|
|
241
259
|
/** @internal */
|
|
242
260
|
export declare function getScopedTheme(
|
|
243
261
|
themeProp: RootTheme | RootTheme_v2,
|
|
244
262
|
scheme: ThemeColorSchemeKey,
|
|
245
263
|
tone: ThemeColorCardToneKey,
|
|
246
|
-
): Theme
|
|
264
|
+
): Theme;
|
|
247
265
|
|
|
248
266
|
/** @public */
|
|
249
|
-
export declare function getTheme_v2(theme: Theme): Theme_v2
|
|
267
|
+
export declare function getTheme_v2(theme: Theme): Theme_v2;
|
|
250
268
|
|
|
251
269
|
/**
|
|
252
270
|
* @internal
|
|
253
271
|
*/
|
|
254
|
-
export declare function hexToRgb(hex: string): RGB
|
|
272
|
+
export declare function hexToRgb(hex: string): RGB;
|
|
255
273
|
|
|
256
274
|
/**
|
|
257
275
|
* @internal
|
|
258
276
|
*/
|
|
259
277
|
export declare interface HSL {
|
|
260
|
-
h: number
|
|
261
|
-
s: number
|
|
262
|
-
l: number
|
|
278
|
+
h: number;
|
|
279
|
+
s: number;
|
|
280
|
+
l: number;
|
|
263
281
|
}
|
|
264
282
|
|
|
265
283
|
/**
|
|
266
284
|
* @internal
|
|
267
285
|
*/
|
|
268
|
-
export declare function hslToRgb(hsl: HSL): RGB
|
|
286
|
+
export declare function hslToRgb(hsl: HSL): RGB;
|
|
269
287
|
|
|
270
288
|
/** @internal */
|
|
271
|
-
export declare function is_v0(
|
|
289
|
+
export declare function is_v0(
|
|
290
|
+
themeProp: RootTheme | RootTheme_v2,
|
|
291
|
+
): themeProp is RootTheme;
|
|
272
292
|
|
|
273
293
|
/** @internal */
|
|
274
|
-
export declare function is_v2(
|
|
294
|
+
export declare function is_v2(
|
|
295
|
+
themeProp: RootTheme | RootTheme_v2,
|
|
296
|
+
): themeProp is RootTheme_v2;
|
|
275
297
|
|
|
276
298
|
/** @internal */
|
|
277
|
-
export declare function isColorBlendModeValue(
|
|
299
|
+
export declare function isColorBlendModeValue(
|
|
300
|
+
str: string,
|
|
301
|
+
): str is ThemeColorBlendModeKey;
|
|
278
302
|
|
|
279
303
|
/** @internal */
|
|
280
|
-
export declare function isColorButtonMode(
|
|
304
|
+
export declare function isColorButtonMode(
|
|
305
|
+
str: string,
|
|
306
|
+
): str is ThemeColorButtonModeKey;
|
|
281
307
|
|
|
282
308
|
/** @internal */
|
|
283
|
-
export declare function isColorConfigBaseKey(
|
|
309
|
+
export declare function isColorConfigBaseKey(
|
|
310
|
+
str: string,
|
|
311
|
+
): str is ColorConfigCardKey;
|
|
284
312
|
|
|
285
313
|
/** @internal */
|
|
286
|
-
export declare function isColorConfigBaseTone(
|
|
314
|
+
export declare function isColorConfigBaseTone(
|
|
315
|
+
str: string,
|
|
316
|
+
): str is ColorConfigCardTone;
|
|
287
317
|
|
|
288
318
|
/** @internal */
|
|
289
|
-
export declare function isColorConfigBlendKey(
|
|
319
|
+
export declare function isColorConfigBlendKey(
|
|
320
|
+
str: string,
|
|
321
|
+
): str is ColorConfigBlendKey;
|
|
290
322
|
|
|
291
323
|
/** @internal */
|
|
292
|
-
export declare function isColorConfigStateKey(
|
|
324
|
+
export declare function isColorConfigStateKey(
|
|
325
|
+
str: string,
|
|
326
|
+
): str is ColorConfigStateKey;
|
|
293
327
|
|
|
294
328
|
/** @internal */
|
|
295
|
-
export declare function isColorConfigStateTone(
|
|
329
|
+
export declare function isColorConfigStateTone(
|
|
330
|
+
str: string,
|
|
331
|
+
): str is ColorConfigStateTone;
|
|
296
332
|
|
|
297
333
|
/** @internal */
|
|
298
|
-
export declare function isColorHueKey(str: string): str is ColorHueKey
|
|
334
|
+
export declare function isColorHueKey(str: string): str is ColorHueKey;
|
|
299
335
|
|
|
300
336
|
/** @internal */
|
|
301
|
-
export declare function isColorOpacityValue(
|
|
337
|
+
export declare function isColorOpacityValue(
|
|
338
|
+
str: string,
|
|
339
|
+
): str is ColorConfigOpacityValue;
|
|
302
340
|
|
|
303
341
|
/** @internal */
|
|
304
|
-
export declare function isColorTintKey(str: string): str is ColorTintKey
|
|
342
|
+
export declare function isColorTintKey(str: string): str is ColorTintKey;
|
|
305
343
|
|
|
306
344
|
/** @internal */
|
|
307
|
-
export declare function isColorTokenValue(str: string): str is ColorConfigValue
|
|
345
|
+
export declare function isColorTokenValue(str: string): str is ColorConfigValue;
|
|
308
346
|
|
|
309
347
|
/** @internal */
|
|
310
|
-
export declare function isColorValue(str: string): str is
|
|
348
|
+
export declare function isColorValue(str: string): str is "black" | "white";
|
|
311
349
|
|
|
312
350
|
/**
|
|
313
351
|
* Apply the \`mix\` blend mode
|
|
314
352
|
* @internal
|
|
315
353
|
*/
|
|
316
|
-
export declare function mix(b: RGB | RGBA, s: RGB | RGBA, weight: number): RGB
|
|
354
|
+
export declare function mix(b: RGB | RGBA, s: RGB | RGBA, weight: number): RGB;
|
|
317
355
|
|
|
318
356
|
/**
|
|
319
357
|
* Apply the \`multiply\` blend mode
|
|
320
358
|
* Source: https://www.w3.org/TR/compositing-1/#blendingmultiply
|
|
321
359
|
* @internal
|
|
322
360
|
*/
|
|
323
|
-
export declare function multiply(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
361
|
+
export declare function multiply(b: RGB | RGBA, s: RGB | RGBA): RGB;
|
|
324
362
|
|
|
325
363
|
/**
|
|
326
364
|
* @internal
|
|
327
365
|
*/
|
|
328
|
-
export declare function parseColor(color: unknown): RGB | RGBA
|
|
366
|
+
export declare function parseColor(color: unknown): RGB | RGBA;
|
|
329
367
|
|
|
330
368
|
/** @internal */
|
|
331
|
-
export declare function parseTokenKey(str: string): TokenKeyNode | undefined
|
|
369
|
+
export declare function parseTokenKey(str: string): TokenKeyNode | undefined;
|
|
332
370
|
|
|
333
371
|
/** @internal */
|
|
334
|
-
export declare function parseTokenValue(
|
|
372
|
+
export declare function parseTokenValue(
|
|
373
|
+
str: string,
|
|
374
|
+
): TokenValueNode | undefined;
|
|
335
375
|
|
|
336
376
|
/**
|
|
337
377
|
* @public
|
|
338
378
|
* @deprecated Use `ThemeConfig` instead.
|
|
339
379
|
*/
|
|
340
|
-
export declare type PartialThemeColorBuilderOpts =
|
|
380
|
+
export declare type PartialThemeColorBuilderOpts =
|
|
381
|
+
Partial<ThemeColorBuilderOpts>;
|
|
341
382
|
|
|
342
383
|
/**
|
|
343
384
|
* @internal
|
|
344
385
|
*/
|
|
345
386
|
export declare interface RGB {
|
|
346
|
-
r: number
|
|
347
|
-
g: number
|
|
348
|
-
b: number
|
|
349
|
-
a?: undefined
|
|
387
|
+
r: number;
|
|
388
|
+
g: number;
|
|
389
|
+
b: number;
|
|
390
|
+
a?: undefined;
|
|
350
391
|
}
|
|
351
392
|
|
|
352
393
|
/**
|
|
353
394
|
* @internal
|
|
354
395
|
*/
|
|
355
396
|
export declare interface RGBA {
|
|
356
|
-
r: number
|
|
357
|
-
g: number
|
|
358
|
-
b: number
|
|
359
|
-
a: number
|
|
397
|
+
r: number;
|
|
398
|
+
g: number;
|
|
399
|
+
b: number;
|
|
400
|
+
a: number;
|
|
360
401
|
}
|
|
361
402
|
|
|
362
403
|
/**
|
|
363
404
|
* @internal
|
|
364
405
|
*/
|
|
365
|
-
export declare function rgba(color: unknown, a: number): string
|
|
406
|
+
export declare function rgba(color: unknown, a: number): string;
|
|
366
407
|
|
|
367
408
|
/**
|
|
368
409
|
* @internal
|
|
369
410
|
*/
|
|
370
|
-
export declare function rgbaToRGBA(rgba: string): RGBA
|
|
411
|
+
export declare function rgbaToRGBA(rgba: string): RGBA;
|
|
371
412
|
|
|
372
413
|
/**
|
|
373
414
|
* @internal
|
|
374
415
|
*/
|
|
375
|
-
export declare function rgbToHex(color: RGB | RGBA): string
|
|
416
|
+
export declare function rgbToHex(color: RGB | RGBA): string;
|
|
376
417
|
|
|
377
418
|
/**
|
|
378
419
|
* @internal
|
|
379
420
|
* @see https://css-tricks.com/converting-color-spaces-in-javascript/
|
|
380
421
|
*/
|
|
381
|
-
export declare function rgbToHsl({r, g, b}: RGB): HSL
|
|
422
|
+
export declare function rgbToHsl({ r, g, b }: RGB): HSL;
|
|
382
423
|
|
|
383
424
|
/**
|
|
384
425
|
* @public
|
|
385
426
|
*/
|
|
386
|
-
export declare type RootTheme = BaseTheme
|
|
427
|
+
export declare type RootTheme = BaseTheme;
|
|
387
428
|
|
|
388
429
|
/**
|
|
389
430
|
* @public
|
|
390
431
|
*/
|
|
391
432
|
export declare interface RootTheme_v2 {
|
|
392
|
-
_version: 2
|
|
393
|
-
avatar: ThemeAvatar_v2
|
|
433
|
+
_version: 2;
|
|
434
|
+
avatar: ThemeAvatar_v2;
|
|
394
435
|
button: {
|
|
395
436
|
border: {
|
|
396
|
-
width: number
|
|
397
|
-
}
|
|
398
|
-
focusRing: ThemeFocusRing
|
|
399
|
-
textWeight: ThemeFontWeightKey
|
|
400
|
-
}
|
|
437
|
+
width: number;
|
|
438
|
+
};
|
|
439
|
+
focusRing: ThemeFocusRing;
|
|
440
|
+
textWeight: ThemeFontWeightKey;
|
|
441
|
+
};
|
|
401
442
|
card: {
|
|
402
443
|
border: {
|
|
403
|
-
width: number
|
|
404
|
-
}
|
|
405
|
-
focusRing: ThemeFocusRing
|
|
444
|
+
width: number;
|
|
445
|
+
};
|
|
446
|
+
focusRing: ThemeFocusRing;
|
|
406
447
|
shadow: {
|
|
407
|
-
outline: number
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
color: ThemeColorSchemes_v2
|
|
411
|
-
container: number[]
|
|
412
|
-
font: ThemeFonts
|
|
413
|
-
input: ThemeInput_v2
|
|
414
|
-
layer: ThemeLayer
|
|
415
|
-
media: number[]
|
|
416
|
-
radius: number[]
|
|
417
|
-
shadow: Array<ThemeShadow | null
|
|
418
|
-
space: number[]
|
|
448
|
+
outline: number;
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
color: ThemeColorSchemes_v2;
|
|
452
|
+
container: number[];
|
|
453
|
+
font: ThemeFonts;
|
|
454
|
+
input: ThemeInput_v2;
|
|
455
|
+
layer: ThemeLayer;
|
|
456
|
+
media: number[];
|
|
457
|
+
radius: number[];
|
|
458
|
+
shadow: Array<ThemeShadow | null>;
|
|
459
|
+
space: number[];
|
|
419
460
|
/** @internal */
|
|
420
|
-
style?: ThemeStyles
|
|
461
|
+
style?: ThemeStyles;
|
|
421
462
|
}
|
|
422
463
|
|
|
423
464
|
/**
|
|
@@ -425,89 +466,93 @@ export declare interface RootTheme_v2 {
|
|
|
425
466
|
* Source: https://www.w3.org/TR/compositing-1/#blendingscreen
|
|
426
467
|
* @internal
|
|
427
468
|
*/
|
|
428
|
-
declare function screen_2(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
429
|
-
export {screen_2 as screen}
|
|
469
|
+
declare function screen_2(b: RGB | RGBA, s: RGB | RGBA): RGB;
|
|
470
|
+
export { screen_2 as screen };
|
|
430
471
|
|
|
431
472
|
/**
|
|
432
473
|
* @public
|
|
433
474
|
*/
|
|
434
475
|
export declare interface Theme {
|
|
435
|
-
sanity: Omit<RootTheme,
|
|
476
|
+
sanity: Omit<RootTheme, "color" | "v2"> & {
|
|
436
477
|
/**
|
|
437
478
|
* @deprecated Use `v2.color` instead
|
|
438
479
|
*/
|
|
439
|
-
color: ThemeColor
|
|
440
|
-
v2?: Theme_v2
|
|
441
|
-
}
|
|
480
|
+
color: ThemeColor;
|
|
481
|
+
v2?: Theme_v2;
|
|
482
|
+
};
|
|
442
483
|
}
|
|
443
484
|
|
|
444
485
|
/** @public */
|
|
445
|
-
export declare const THEME_COLOR_AVATAR_COLORS: ColorHueKey[]
|
|
486
|
+
export declare const THEME_COLOR_AVATAR_COLORS: ColorHueKey[];
|
|
446
487
|
|
|
447
488
|
/** @public */
|
|
448
|
-
export declare const THEME_COLOR_BLEND_MODES: readonly [
|
|
489
|
+
export declare const THEME_COLOR_BLEND_MODES: readonly ["multiply", "screen"];
|
|
449
490
|
|
|
450
491
|
/** @public */
|
|
451
|
-
export declare const THEME_COLOR_BUTTON_MODES: readonly [
|
|
492
|
+
export declare const THEME_COLOR_BUTTON_MODES: readonly [
|
|
493
|
+
"default",
|
|
494
|
+
"ghost",
|
|
495
|
+
"bleed",
|
|
496
|
+
];
|
|
452
497
|
|
|
453
498
|
/** @public */
|
|
454
499
|
export declare const THEME_COLOR_CARD_TONES: readonly [
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
]
|
|
500
|
+
"transparent",
|
|
501
|
+
"default",
|
|
502
|
+
"neutral",
|
|
503
|
+
"primary",
|
|
504
|
+
"suggest",
|
|
505
|
+
"positive",
|
|
506
|
+
"caution",
|
|
507
|
+
"critical",
|
|
508
|
+
];
|
|
464
509
|
|
|
465
510
|
/** @public */
|
|
466
|
-
export declare const THEME_COLOR_INPUT_MODES: readonly [
|
|
511
|
+
export declare const THEME_COLOR_INPUT_MODES: readonly ["default", "invalid"];
|
|
467
512
|
|
|
468
513
|
/** @public */
|
|
469
514
|
export declare const THEME_COLOR_INPUT_STATES: readonly [
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
]
|
|
515
|
+
"enabled",
|
|
516
|
+
"hovered",
|
|
517
|
+
"readOnly",
|
|
518
|
+
"disabled",
|
|
519
|
+
];
|
|
475
520
|
|
|
476
521
|
/** @public */
|
|
477
|
-
export declare const THEME_COLOR_SCHEMES: readonly [
|
|
522
|
+
export declare const THEME_COLOR_SCHEMES: readonly ["light", "dark"];
|
|
478
523
|
|
|
479
524
|
/** @public */
|
|
480
525
|
export declare const THEME_COLOR_STATE_TONES: readonly [
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
]
|
|
526
|
+
"default",
|
|
527
|
+
"neutral",
|
|
528
|
+
"primary",
|
|
529
|
+
"suggest",
|
|
530
|
+
"positive",
|
|
531
|
+
"caution",
|
|
532
|
+
"critical",
|
|
533
|
+
];
|
|
489
534
|
|
|
490
535
|
/** @public */
|
|
491
536
|
export declare const THEME_COLOR_STATES: readonly [
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
]
|
|
537
|
+
"enabled",
|
|
538
|
+
"hovered",
|
|
539
|
+
"pressed",
|
|
540
|
+
"selected",
|
|
541
|
+
"disabled",
|
|
542
|
+
];
|
|
498
543
|
|
|
499
544
|
/**
|
|
500
545
|
* @public
|
|
501
546
|
*/
|
|
502
|
-
export declare type Theme_v2 = Omit<RootTheme_v2,
|
|
503
|
-
color: ThemeColorCard_v2
|
|
547
|
+
export declare type Theme_v2 = Omit<RootTheme_v2, "color"> & {
|
|
548
|
+
color: ThemeColorCard_v2;
|
|
504
549
|
/**
|
|
505
550
|
* Indicates whether the theme is resolved or raw, it's necessary to avoid issues
|
|
506
551
|
* with sanity V2 components accessing a v1 <ThemeProvider>.
|
|
507
552
|
* See https://github.com/sanity-io/ui/pull/1203 for more info.
|
|
508
553
|
*/
|
|
509
|
-
_resolved: boolean
|
|
510
|
-
}
|
|
554
|
+
_resolved: boolean;
|
|
555
|
+
};
|
|
511
556
|
|
|
512
557
|
/**
|
|
513
558
|
* @public
|
|
@@ -515,9 +560,9 @@ export declare type Theme_v2 = Omit<RootTheme_v2, 'color'> & {
|
|
|
515
560
|
*/
|
|
516
561
|
export declare interface ThemeAvatar {
|
|
517
562
|
sizes: {
|
|
518
|
-
distance: number
|
|
519
|
-
size: number
|
|
520
|
-
}[]
|
|
563
|
+
distance: number;
|
|
564
|
+
size: number;
|
|
565
|
+
}[];
|
|
521
566
|
}
|
|
522
567
|
|
|
523
568
|
/**
|
|
@@ -526,102 +571,110 @@ export declare interface ThemeAvatar {
|
|
|
526
571
|
export declare interface ThemeAvatar_v2 {
|
|
527
572
|
sizes: {
|
|
528
573
|
/** Spacing between avatars in an <AvatarStack> component (px) */
|
|
529
|
-
distance: number
|
|
574
|
+
distance: number;
|
|
530
575
|
/** Diameter of the avatar (px) */
|
|
531
|
-
size: number
|
|
532
|
-
}[]
|
|
533
|
-
focusRing: ThemeFocusRing
|
|
576
|
+
size: number;
|
|
577
|
+
}[];
|
|
578
|
+
focusRing: ThemeFocusRing;
|
|
534
579
|
}
|
|
535
580
|
|
|
536
581
|
/**
|
|
537
582
|
* @public
|
|
538
583
|
*/
|
|
539
|
-
export declare type ThemeBoxShadow = [number, number, number, number]
|
|
584
|
+
export declare type ThemeBoxShadow = [number, number, number, number];
|
|
540
585
|
|
|
541
586
|
/**
|
|
542
587
|
* @public
|
|
543
588
|
* @deprecated Use `ThemeColor_v2` instead.
|
|
544
589
|
*/
|
|
545
|
-
export declare interface ThemeColor
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
590
|
+
export declare interface ThemeColor
|
|
591
|
+
extends Partial<Omit<ThemeColorGenericState, "muted">> {
|
|
592
|
+
base: ThemeColorBase;
|
|
593
|
+
button: ThemeColorButton;
|
|
594
|
+
card: ThemeColorCard;
|
|
595
|
+
dark: boolean;
|
|
596
|
+
input: ThemeColorInput;
|
|
597
|
+
muted: ThemeColorMuted;
|
|
598
|
+
selectable?: ThemeColorSelectable;
|
|
599
|
+
solid: ThemeColorSolid;
|
|
600
|
+
spot: ThemeColorSpot;
|
|
601
|
+
syntax: ThemeColorSyntax;
|
|
556
602
|
}
|
|
557
603
|
|
|
558
604
|
/**
|
|
559
605
|
* @public
|
|
560
606
|
*/
|
|
561
|
-
export declare type ThemeColorAvatar_v2 = Record<
|
|
607
|
+
export declare type ThemeColorAvatar_v2 = Record<
|
|
608
|
+
ThemeColorAvatarColorKey,
|
|
609
|
+
ThemeColorAvatarHue_v2
|
|
610
|
+
>;
|
|
562
611
|
|
|
563
612
|
/** @public */
|
|
564
|
-
export declare type ThemeColorAvatarColorKey =
|
|
613
|
+
export declare type ThemeColorAvatarColorKey =
|
|
614
|
+
(typeof THEME_COLOR_AVATAR_COLORS)[number];
|
|
565
615
|
|
|
566
616
|
/**
|
|
567
617
|
* @public
|
|
568
618
|
*/
|
|
569
619
|
export declare interface ThemeColorAvatarHue_v2 {
|
|
570
|
-
_blend?: ThemeColorBlendModeKey
|
|
571
|
-
bg: string
|
|
572
|
-
fg: string
|
|
620
|
+
_blend?: ThemeColorBlendModeKey;
|
|
621
|
+
bg: string;
|
|
622
|
+
fg: string;
|
|
573
623
|
}
|
|
574
624
|
|
|
575
625
|
/** @public */
|
|
576
626
|
export declare interface ThemeColorAvatarHueTokens {
|
|
577
|
-
_blend?: ColorBlendModeTokenValue
|
|
578
|
-
_hue?: ColorHueKey
|
|
579
|
-
bg?: ThemeColorTokenValue
|
|
580
|
-
fg?: ThemeColorTokenValue
|
|
627
|
+
_blend?: ColorBlendModeTokenValue;
|
|
628
|
+
_hue?: ColorHueKey;
|
|
629
|
+
bg?: ThemeColorTokenValue;
|
|
630
|
+
fg?: ThemeColorTokenValue;
|
|
581
631
|
}
|
|
582
632
|
|
|
583
633
|
/** @public */
|
|
584
634
|
export declare interface ThemeColorAvatarTokens {
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
635
|
+
"*"?: ThemeColorAvatarHueTokens;
|
|
636
|
+
gray?: ThemeColorAvatarHueTokens;
|
|
637
|
+
blue?: ThemeColorAvatarHueTokens;
|
|
638
|
+
purple?: ThemeColorAvatarHueTokens;
|
|
639
|
+
magenta?: ThemeColorAvatarHueTokens;
|
|
640
|
+
red?: ThemeColorAvatarHueTokens;
|
|
641
|
+
orange?: ThemeColorAvatarHueTokens;
|
|
642
|
+
yellow?: ThemeColorAvatarHueTokens;
|
|
643
|
+
green?: ThemeColorAvatarHueTokens;
|
|
644
|
+
cyan?: ThemeColorAvatarHueTokens;
|
|
595
645
|
}
|
|
596
646
|
|
|
597
647
|
/**
|
|
598
648
|
* @public
|
|
599
649
|
*/
|
|
600
|
-
export declare type ThemeColorBadge_v2 = Record<
|
|
650
|
+
export declare type ThemeColorBadge_v2 = Record<
|
|
651
|
+
ThemeColorStateToneKey,
|
|
652
|
+
ThemeColorBadgeTone_v2
|
|
653
|
+
>;
|
|
601
654
|
|
|
602
655
|
/** @public */
|
|
603
656
|
export declare type ThemeColorBadgeTokens = Partial<
|
|
604
|
-
Record<
|
|
605
|
-
|
|
657
|
+
Record<"*" | ThemeColorStateToneKey, ThemeColorBadgeToneTokens>
|
|
658
|
+
>;
|
|
606
659
|
|
|
607
660
|
/**
|
|
608
661
|
* @public
|
|
609
662
|
*/
|
|
610
663
|
export declare interface ThemeColorBadgeTone_v2 {
|
|
611
|
-
bg: string
|
|
612
|
-
fg: string
|
|
613
|
-
dot: string
|
|
614
|
-
icon: string
|
|
664
|
+
bg: string;
|
|
665
|
+
fg: string;
|
|
666
|
+
dot: string;
|
|
667
|
+
icon: string;
|
|
615
668
|
}
|
|
616
669
|
|
|
617
670
|
/** @public */
|
|
618
671
|
export declare interface ThemeColorBadgeToneTokens {
|
|
619
|
-
_blend?: ColorBlendModeTokenValue
|
|
620
|
-
_hue?: ColorHueKey
|
|
621
|
-
bg?: ThemeColorTokenValue
|
|
622
|
-
dot?: ThemeColorTokenValue
|
|
623
|
-
fg?: ThemeColorTokenValue
|
|
624
|
-
icon?: ThemeColorTokenValue
|
|
672
|
+
_blend?: ColorBlendModeTokenValue;
|
|
673
|
+
_hue?: ColorHueKey;
|
|
674
|
+
bg?: ThemeColorTokenValue;
|
|
675
|
+
dot?: ThemeColorTokenValue;
|
|
676
|
+
fg?: ThemeColorTokenValue;
|
|
677
|
+
icon?: ThemeColorTokenValue;
|
|
625
678
|
}
|
|
626
679
|
|
|
627
680
|
/**
|
|
@@ -629,91 +682,96 @@ export declare interface ThemeColorBadgeToneTokens {
|
|
|
629
682
|
* @deprecated Use `ThemeColorCard_v2` instead.
|
|
630
683
|
*/
|
|
631
684
|
export declare interface ThemeColorBase {
|
|
632
|
-
bg: string
|
|
633
|
-
fg: string
|
|
634
|
-
border: string
|
|
635
|
-
focusRing: string
|
|
636
|
-
backdrop?: string
|
|
685
|
+
bg: string;
|
|
686
|
+
fg: string;
|
|
687
|
+
border: string;
|
|
688
|
+
focusRing: string;
|
|
689
|
+
backdrop?: string;
|
|
637
690
|
shadow: {
|
|
638
|
-
outline: string
|
|
639
|
-
umbra: string
|
|
640
|
-
penumbra: string
|
|
641
|
-
ambient: string
|
|
642
|
-
}
|
|
691
|
+
outline: string;
|
|
692
|
+
umbra: string;
|
|
693
|
+
penumbra: string;
|
|
694
|
+
ambient: string;
|
|
695
|
+
};
|
|
643
696
|
skeleton?: {
|
|
644
|
-
from: string
|
|
645
|
-
to: string
|
|
646
|
-
}
|
|
697
|
+
from: string;
|
|
698
|
+
to: string;
|
|
699
|
+
};
|
|
647
700
|
}
|
|
648
701
|
|
|
649
702
|
/** @public */
|
|
650
703
|
export declare interface ThemeColorBaseTokens extends ThemeColorStateTokens {
|
|
651
|
-
focusRing?: ThemeColorTokenValue
|
|
652
|
-
backdrop?: ThemeColorTokenValue
|
|
704
|
+
focusRing?: ThemeColorTokenValue;
|
|
705
|
+
backdrop?: ThemeColorTokenValue;
|
|
653
706
|
shadow?: {
|
|
654
|
-
outline?: ThemeColorTokenValue
|
|
655
|
-
umbra?: ThemeColorTokenValue
|
|
656
|
-
penumbra?: ThemeColorTokenValue
|
|
657
|
-
ambient?: ThemeColorTokenValue
|
|
658
|
-
}
|
|
707
|
+
outline?: ThemeColorTokenValue;
|
|
708
|
+
umbra?: ThemeColorTokenValue;
|
|
709
|
+
penumbra?: ThemeColorTokenValue;
|
|
710
|
+
ambient?: ThemeColorTokenValue;
|
|
711
|
+
};
|
|
659
712
|
}
|
|
660
713
|
|
|
661
714
|
/** @public */
|
|
662
|
-
export declare type ThemeColorBlendModeKey =
|
|
715
|
+
export declare type ThemeColorBlendModeKey =
|
|
716
|
+
(typeof THEME_COLOR_BLEND_MODES)[number];
|
|
663
717
|
|
|
664
718
|
/**
|
|
665
719
|
* @public
|
|
666
720
|
* @deprecated Use `buildColorTheme` instead.
|
|
667
721
|
*/
|
|
668
722
|
export declare interface ThemeColorBuilderOpts {
|
|
669
|
-
base: (opts: {dark: boolean; name: ThemeColorName}) => ThemeColorBase
|
|
723
|
+
base: (opts: { dark: boolean; name: ThemeColorName }) => ThemeColorBase;
|
|
670
724
|
solid: (opts: {
|
|
671
|
-
base: ThemeColorBase
|
|
672
|
-
dark: boolean
|
|
673
|
-
tone: ThemeColorName
|
|
674
|
-
name: ThemeColorName
|
|
675
|
-
state:
|
|
676
|
-
}) => ThemeColorGenericState
|
|
725
|
+
base: ThemeColorBase;
|
|
726
|
+
dark: boolean;
|
|
727
|
+
tone: ThemeColorName;
|
|
728
|
+
name: ThemeColorName;
|
|
729
|
+
state: "enabled" | "disabled" | "hovered" | "pressed" | "selected";
|
|
730
|
+
}) => ThemeColorGenericState;
|
|
677
731
|
muted: (opts: {
|
|
678
|
-
base: ThemeColorBase
|
|
679
|
-
dark: boolean
|
|
680
|
-
tone: ThemeColorToneKey
|
|
681
|
-
name: ThemeColorName
|
|
682
|
-
state:
|
|
683
|
-
}) => ThemeColorGenericState
|
|
732
|
+
base: ThemeColorBase;
|
|
733
|
+
dark: boolean;
|
|
734
|
+
tone: ThemeColorToneKey;
|
|
735
|
+
name: ThemeColorName;
|
|
736
|
+
state: "enabled" | "disabled" | "hovered" | "pressed" | "selected";
|
|
737
|
+
}) => ThemeColorGenericState;
|
|
684
738
|
card: (opts: {
|
|
685
|
-
base: ThemeColorBase
|
|
686
|
-
dark: boolean
|
|
687
|
-
muted: ThemeColorMuted
|
|
688
|
-
name: ThemeColorName
|
|
689
|
-
solid: ThemeColorSolid
|
|
690
|
-
state:
|
|
691
|
-
}) => ThemeColorGenericState
|
|
739
|
+
base: ThemeColorBase;
|
|
740
|
+
dark: boolean;
|
|
741
|
+
muted: ThemeColorMuted;
|
|
742
|
+
name: ThemeColorName;
|
|
743
|
+
solid: ThemeColorSolid;
|
|
744
|
+
state: "enabled" | "disabled" | "hovered" | "pressed" | "selected";
|
|
745
|
+
}) => ThemeColorGenericState;
|
|
692
746
|
button: (opts: {
|
|
693
|
-
dark: boolean
|
|
694
|
-
mode: ThemeColorButtonModeKey
|
|
695
|
-
base: ThemeColorBase
|
|
696
|
-
solid: ThemeColorSolidTone
|
|
697
|
-
muted: ThemeColorMutedTone
|
|
698
|
-
}) => ThemeColorButtonStates
|
|
747
|
+
dark: boolean;
|
|
748
|
+
mode: ThemeColorButtonModeKey;
|
|
749
|
+
base: ThemeColorBase;
|
|
750
|
+
solid: ThemeColorSolidTone;
|
|
751
|
+
muted: ThemeColorMutedTone;
|
|
752
|
+
}) => ThemeColorButtonStates;
|
|
699
753
|
input: (opts: {
|
|
700
|
-
base: ThemeColorBase
|
|
701
|
-
solid: ThemeColorSolidTone
|
|
702
|
-
muted: ThemeColorMutedTone
|
|
703
|
-
dark: boolean
|
|
704
|
-
mode:
|
|
705
|
-
state:
|
|
706
|
-
}) => ThemeColorInputState
|
|
754
|
+
base: ThemeColorBase;
|
|
755
|
+
solid: ThemeColorSolidTone;
|
|
756
|
+
muted: ThemeColorMutedTone;
|
|
757
|
+
dark: boolean;
|
|
758
|
+
mode: "default" | "invalid";
|
|
759
|
+
state: "enabled" | "disabled" | "hovered" | "readOnly";
|
|
760
|
+
}) => ThemeColorInputState;
|
|
707
761
|
selectable: (opts: {
|
|
708
|
-
dark: boolean
|
|
709
|
-
base: ThemeColorBase
|
|
710
|
-
solid: ThemeColorSolid
|
|
711
|
-
muted: ThemeColorMuted
|
|
712
|
-
state:
|
|
713
|
-
tone:
|
|
714
|
-
}) => ThemeColorGenericState
|
|
715
|
-
syntax: (opts: {base: ThemeColorBase; dark: boolean}) => ThemeColorSyntax
|
|
716
|
-
spot: (opts: {
|
|
762
|
+
dark: boolean;
|
|
763
|
+
base: ThemeColorBase;
|
|
764
|
+
solid: ThemeColorSolid;
|
|
765
|
+
muted: ThemeColorMuted;
|
|
766
|
+
state: "enabled" | "disabled" | "hovered" | "pressed" | "selected";
|
|
767
|
+
tone: "default" | "primary" | "positive" | "caution" | "critical";
|
|
768
|
+
}) => ThemeColorGenericState;
|
|
769
|
+
syntax: (opts: { base: ThemeColorBase; dark: boolean }) => ThemeColorSyntax;
|
|
770
|
+
spot: (opts: {
|
|
771
|
+
base: ThemeColorBase;
|
|
772
|
+
dark: boolean;
|
|
773
|
+
key: ThemeColorSpotKey;
|
|
774
|
+
}) => string;
|
|
717
775
|
}
|
|
718
776
|
|
|
719
777
|
/**
|
|
@@ -721,15 +779,18 @@ export declare interface ThemeColorBuilderOpts {
|
|
|
721
779
|
* @deprecated Use `ThemeColorButton_v2` instead.
|
|
722
780
|
*/
|
|
723
781
|
export declare interface ThemeColorButton {
|
|
724
|
-
default: ThemeColorButtonTones
|
|
725
|
-
ghost: ThemeColorButtonTones
|
|
726
|
-
bleed: ThemeColorButtonTones
|
|
782
|
+
default: ThemeColorButtonTones;
|
|
783
|
+
ghost: ThemeColorButtonTones;
|
|
784
|
+
bleed: ThemeColorButtonTones;
|
|
727
785
|
}
|
|
728
786
|
|
|
729
787
|
/**
|
|
730
788
|
* @public
|
|
731
789
|
*/
|
|
732
|
-
export declare type ThemeColorButton_v2 = Record<
|
|
790
|
+
export declare type ThemeColorButton_v2 = Record<
|
|
791
|
+
ThemeColorButtonModeKey,
|
|
792
|
+
ThemeColorButtonMode_v2
|
|
793
|
+
>;
|
|
733
794
|
|
|
734
795
|
/**
|
|
735
796
|
* @public
|
|
@@ -737,39 +798,43 @@ export declare type ThemeColorButton_v2 = Record<ThemeColorButtonModeKey, ThemeC
|
|
|
737
798
|
export declare type ThemeColorButtonMode_v2 = Record<
|
|
738
799
|
ThemeColorStateToneKey,
|
|
739
800
|
ThemeColorButtonTone_v2
|
|
740
|
-
|
|
801
|
+
>;
|
|
741
802
|
|
|
742
803
|
/** @public */
|
|
743
|
-
export declare type ThemeColorButtonModeKey =
|
|
804
|
+
export declare type ThemeColorButtonModeKey =
|
|
805
|
+
(typeof THEME_COLOR_BUTTON_MODES)[number];
|
|
744
806
|
|
|
745
807
|
/**
|
|
746
808
|
* @public
|
|
747
809
|
* @deprecated Use `ThemeColorState_v2` instead.
|
|
748
810
|
*/
|
|
749
|
-
export declare type ThemeColorButtonState = ThemeColorGenericState
|
|
811
|
+
export declare type ThemeColorButtonState = ThemeColorGenericState;
|
|
750
812
|
|
|
751
813
|
/**
|
|
752
814
|
* @public
|
|
753
815
|
* @deprecated Use `ThemeColorButtonStates_v2` instead.
|
|
754
816
|
*/
|
|
755
817
|
export declare interface ThemeColorButtonStates {
|
|
756
|
-
enabled: ThemeColorGenericState
|
|
757
|
-
hovered: ThemeColorGenericState
|
|
758
|
-
pressed: ThemeColorGenericState
|
|
759
|
-
selected: ThemeColorGenericState
|
|
760
|
-
disabled: ThemeColorGenericState
|
|
818
|
+
enabled: ThemeColorGenericState;
|
|
819
|
+
hovered: ThemeColorGenericState;
|
|
820
|
+
pressed: ThemeColorGenericState;
|
|
821
|
+
selected: ThemeColorGenericState;
|
|
822
|
+
disabled: ThemeColorGenericState;
|
|
761
823
|
}
|
|
762
824
|
|
|
763
825
|
/** @public */
|
|
764
826
|
export declare interface ThemeColorButtonTokens
|
|
765
827
|
extends Partial<Record<ColorConfigStateTone, ThemeColorStatesTokens>> {
|
|
766
|
-
_hue?: ColorHueKey
|
|
828
|
+
_hue?: ColorHueKey;
|
|
767
829
|
}
|
|
768
830
|
|
|
769
831
|
/**
|
|
770
832
|
* @public
|
|
771
833
|
*/
|
|
772
|
-
export declare type ThemeColorButtonTone_v2 = Record<
|
|
834
|
+
export declare type ThemeColorButtonTone_v2 = Record<
|
|
835
|
+
ThemeColorStateKey,
|
|
836
|
+
ThemeColorState_v2
|
|
837
|
+
>;
|
|
773
838
|
|
|
774
839
|
/**
|
|
775
840
|
* TODO: Rename to `ThemeColorButtonMode`.
|
|
@@ -777,11 +842,11 @@ export declare type ThemeColorButtonTone_v2 = Record<ThemeColorStateKey, ThemeCo
|
|
|
777
842
|
* @deprecated Use `ThemeColorButtonTones_v2` instead.
|
|
778
843
|
*/
|
|
779
844
|
export declare interface ThemeColorButtonTones {
|
|
780
|
-
default: ThemeColorButtonStates
|
|
781
|
-
primary: ThemeColorButtonStates
|
|
782
|
-
positive: ThemeColorButtonStates
|
|
783
|
-
caution: ThemeColorButtonStates
|
|
784
|
-
critical: ThemeColorButtonStates
|
|
845
|
+
default: ThemeColorButtonStates;
|
|
846
|
+
primary: ThemeColorButtonStates;
|
|
847
|
+
positive: ThemeColorButtonStates;
|
|
848
|
+
caution: ThemeColorButtonStates;
|
|
849
|
+
critical: ThemeColorButtonStates;
|
|
785
850
|
}
|
|
786
851
|
|
|
787
852
|
/**
|
|
@@ -789,11 +854,11 @@ export declare interface ThemeColorButtonTones {
|
|
|
789
854
|
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
790
855
|
*/
|
|
791
856
|
export declare interface ThemeColorCard {
|
|
792
|
-
enabled: ThemeColorGenericState
|
|
793
|
-
hovered: ThemeColorGenericState
|
|
794
|
-
pressed: ThemeColorGenericState
|
|
795
|
-
selected: ThemeColorGenericState
|
|
796
|
-
disabled: ThemeColorGenericState
|
|
857
|
+
enabled: ThemeColorGenericState;
|
|
858
|
+
hovered: ThemeColorGenericState;
|
|
859
|
+
pressed: ThemeColorGenericState;
|
|
860
|
+
selected: ThemeColorGenericState;
|
|
861
|
+
disabled: ThemeColorGenericState;
|
|
797
862
|
}
|
|
798
863
|
|
|
799
864
|
/**
|
|
@@ -801,25 +866,26 @@ export declare interface ThemeColorCard {
|
|
|
801
866
|
*/
|
|
802
867
|
export declare interface ThemeColorCard_v2 extends ThemeColorState_v2 {
|
|
803
868
|
/** @internal */
|
|
804
|
-
_blend: ThemeColorBlendModeKey
|
|
805
|
-
_dark: boolean
|
|
806
|
-
backdrop: string
|
|
807
|
-
button: ThemeColorButton_v2
|
|
808
|
-
focusRing: string
|
|
809
|
-
input: ThemeColorInput_v2
|
|
810
|
-
selectable: ThemeColorSelectable_v2
|
|
811
|
-
shadow: ThemeColorShadow
|
|
812
|
-
syntax: ThemeColorSyntax
|
|
869
|
+
_blend: ThemeColorBlendModeKey;
|
|
870
|
+
_dark: boolean;
|
|
871
|
+
backdrop: string;
|
|
872
|
+
button: ThemeColorButton_v2;
|
|
873
|
+
focusRing: string;
|
|
874
|
+
input: ThemeColorInput_v2;
|
|
875
|
+
selectable: ThemeColorSelectable_v2;
|
|
876
|
+
shadow: ThemeColorShadow;
|
|
877
|
+
syntax: ThemeColorSyntax;
|
|
813
878
|
}
|
|
814
879
|
|
|
815
880
|
/**
|
|
816
881
|
* @public
|
|
817
882
|
* @deprecated Use `ThemeColorState_v2` instead.
|
|
818
883
|
*/
|
|
819
|
-
export declare type ThemeColorCardState = ThemeColorGenericState
|
|
884
|
+
export declare type ThemeColorCardState = ThemeColorGenericState;
|
|
820
885
|
|
|
821
886
|
/** @public */
|
|
822
|
-
export declare type ThemeColorCardToneKey =
|
|
887
|
+
export declare type ThemeColorCardToneKey =
|
|
888
|
+
(typeof THEME_COLOR_CARD_TONES)[number];
|
|
823
889
|
|
|
824
890
|
/**
|
|
825
891
|
* @public
|
|
@@ -827,32 +893,32 @@ export declare type ThemeColorCardToneKey = (typeof THEME_COLOR_CARD_TONES)[numb
|
|
|
827
893
|
*/
|
|
828
894
|
export declare interface ThemeColorGenericState {
|
|
829
895
|
/** @internal */
|
|
830
|
-
_blend?: ThemeColorBlendModeKey
|
|
831
|
-
bg: string
|
|
896
|
+
_blend?: ThemeColorBlendModeKey;
|
|
897
|
+
bg: string;
|
|
832
898
|
/**
|
|
833
899
|
* @beta
|
|
834
900
|
*/
|
|
835
|
-
bg2?: string
|
|
836
|
-
border: string
|
|
837
|
-
fg: string
|
|
838
|
-
icon: string
|
|
901
|
+
bg2?: string;
|
|
902
|
+
border: string;
|
|
903
|
+
fg: string;
|
|
904
|
+
icon: string;
|
|
839
905
|
muted: {
|
|
840
|
-
fg: string
|
|
841
|
-
}
|
|
906
|
+
fg: string;
|
|
907
|
+
};
|
|
842
908
|
accent: {
|
|
843
|
-
fg: string
|
|
844
|
-
}
|
|
909
|
+
fg: string;
|
|
910
|
+
};
|
|
845
911
|
link: {
|
|
846
|
-
fg: string
|
|
847
|
-
}
|
|
912
|
+
fg: string;
|
|
913
|
+
};
|
|
848
914
|
code: {
|
|
849
|
-
bg: string
|
|
850
|
-
fg: string
|
|
851
|
-
}
|
|
915
|
+
bg: string;
|
|
916
|
+
fg: string;
|
|
917
|
+
};
|
|
852
918
|
skeleton?: {
|
|
853
|
-
from: string
|
|
854
|
-
to: string
|
|
855
|
-
}
|
|
919
|
+
from: string;
|
|
920
|
+
to: string;
|
|
921
|
+
};
|
|
856
922
|
}
|
|
857
923
|
|
|
858
924
|
/**
|
|
@@ -860,14 +926,17 @@ export declare interface ThemeColorGenericState {
|
|
|
860
926
|
* @deprecated Use `ThemeColorInput_v2` instead.
|
|
861
927
|
*/
|
|
862
928
|
export declare interface ThemeColorInput {
|
|
863
|
-
default: ThemeColorInputStates
|
|
864
|
-
invalid: ThemeColorInputStates
|
|
929
|
+
default: ThemeColorInputStates;
|
|
930
|
+
invalid: ThemeColorInputStates;
|
|
865
931
|
}
|
|
866
932
|
|
|
867
933
|
/**
|
|
868
934
|
* @public
|
|
869
935
|
*/
|
|
870
|
-
export declare type ThemeColorInput_v2 = Record<
|
|
936
|
+
export declare type ThemeColorInput_v2 = Record<
|
|
937
|
+
ThemeColorInputModeKey,
|
|
938
|
+
ThemeColorInputMode_v2
|
|
939
|
+
>;
|
|
871
940
|
|
|
872
941
|
/**
|
|
873
942
|
* @public
|
|
@@ -875,78 +944,80 @@ export declare type ThemeColorInput_v2 = Record<ThemeColorInputModeKey, ThemeCol
|
|
|
875
944
|
export declare type ThemeColorInputMode_v2 = Record<
|
|
876
945
|
ThemeColorInputStateKey,
|
|
877
946
|
ThemeColorInputState_v2
|
|
878
|
-
|
|
947
|
+
>;
|
|
879
948
|
|
|
880
949
|
/** @public */
|
|
881
|
-
export declare type ThemeColorInputModeKey =
|
|
950
|
+
export declare type ThemeColorInputModeKey =
|
|
951
|
+
(typeof THEME_COLOR_INPUT_MODES)[number];
|
|
882
952
|
|
|
883
953
|
/**
|
|
884
954
|
* @public
|
|
885
955
|
* @deprecated Use `ThemeColorInputState_v2` instead.
|
|
886
956
|
*/
|
|
887
957
|
export declare interface ThemeColorInputState {
|
|
888
|
-
_blend?: ThemeColorBlendModeKey
|
|
889
|
-
bg: string
|
|
890
|
-
bg2: string
|
|
891
|
-
border: string
|
|
892
|
-
fg: string
|
|
893
|
-
placeholder: string
|
|
958
|
+
_blend?: ThemeColorBlendModeKey;
|
|
959
|
+
bg: string;
|
|
960
|
+
bg2: string;
|
|
961
|
+
border: string;
|
|
962
|
+
fg: string;
|
|
963
|
+
placeholder: string;
|
|
894
964
|
}
|
|
895
965
|
|
|
896
966
|
/**
|
|
897
967
|
* @public
|
|
898
968
|
*/
|
|
899
969
|
export declare interface ThemeColorInputState_v2 {
|
|
900
|
-
_blend?: ThemeColorBlendModeKey
|
|
901
|
-
bg: string
|
|
902
|
-
border: string
|
|
903
|
-
fg: string
|
|
970
|
+
_blend?: ThemeColorBlendModeKey;
|
|
971
|
+
bg: string;
|
|
972
|
+
border: string;
|
|
973
|
+
fg: string;
|
|
904
974
|
muted: {
|
|
905
|
-
bg: string
|
|
906
|
-
}
|
|
907
|
-
placeholder: string
|
|
975
|
+
bg: string;
|
|
976
|
+
};
|
|
977
|
+
placeholder: string;
|
|
908
978
|
}
|
|
909
979
|
|
|
910
980
|
/** @public */
|
|
911
|
-
export declare type ThemeColorInputStateKey =
|
|
981
|
+
export declare type ThemeColorInputStateKey =
|
|
982
|
+
(typeof THEME_COLOR_INPUT_STATES)[number];
|
|
912
983
|
|
|
913
984
|
/**
|
|
914
985
|
* @public
|
|
915
986
|
* @deprecated Use `ThemeColorInputMode_v2` instead.
|
|
916
987
|
*/
|
|
917
988
|
export declare interface ThemeColorInputStates {
|
|
918
|
-
enabled: ThemeColorInputState
|
|
919
|
-
disabled: ThemeColorInputState
|
|
920
|
-
hovered: ThemeColorInputState
|
|
921
|
-
readOnly: ThemeColorInputState
|
|
989
|
+
enabled: ThemeColorInputState;
|
|
990
|
+
disabled: ThemeColorInputState;
|
|
991
|
+
hovered: ThemeColorInputState;
|
|
992
|
+
readOnly: ThemeColorInputState;
|
|
922
993
|
}
|
|
923
994
|
|
|
924
995
|
/** @public */
|
|
925
996
|
export declare interface ThemeColorInputStateTokens {
|
|
926
|
-
_blend?: ColorBlendModeTokenValue
|
|
927
|
-
_hue?: ColorHueKey
|
|
928
|
-
bg?: ThemeColorTokenValue
|
|
929
|
-
border?: ThemeColorTokenValue
|
|
930
|
-
fg?: ThemeColorTokenValue
|
|
997
|
+
_blend?: ColorBlendModeTokenValue;
|
|
998
|
+
_hue?: ColorHueKey;
|
|
999
|
+
bg?: ThemeColorTokenValue;
|
|
1000
|
+
border?: ThemeColorTokenValue;
|
|
1001
|
+
fg?: ThemeColorTokenValue;
|
|
931
1002
|
muted?: {
|
|
932
|
-
bg?: ThemeColorTokenValue
|
|
933
|
-
}
|
|
934
|
-
placeholder?: ThemeColorTokenValue
|
|
1003
|
+
bg?: ThemeColorTokenValue;
|
|
1004
|
+
};
|
|
1005
|
+
placeholder?: ThemeColorTokenValue;
|
|
935
1006
|
}
|
|
936
1007
|
|
|
937
1008
|
/** @public */
|
|
938
1009
|
export declare interface ThemeColorInputTokens
|
|
939
1010
|
extends Partial<Record<ColorConfigInputState, ThemeColorInputStateTokens>> {
|
|
940
|
-
_hue?: ColorHueKey
|
|
1011
|
+
_hue?: ColorHueKey;
|
|
941
1012
|
}
|
|
942
1013
|
|
|
943
1014
|
/**
|
|
944
1015
|
* @public
|
|
945
1016
|
*/
|
|
946
1017
|
export declare interface ThemeColorKBD {
|
|
947
|
-
bg: string
|
|
948
|
-
fg: string
|
|
949
|
-
border: string
|
|
1018
|
+
bg: string;
|
|
1019
|
+
fg: string;
|
|
1020
|
+
border: string;
|
|
950
1021
|
}
|
|
951
1022
|
|
|
952
1023
|
/**
|
|
@@ -954,12 +1025,12 @@ export declare interface ThemeColorKBD {
|
|
|
954
1025
|
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
955
1026
|
*/
|
|
956
1027
|
export declare interface ThemeColorMuted {
|
|
957
|
-
default: ThemeColorMutedTone
|
|
958
|
-
transparent: ThemeColorMutedTone
|
|
959
|
-
primary: ThemeColorMutedTone
|
|
960
|
-
positive: ThemeColorMutedTone
|
|
961
|
-
caution: ThemeColorMutedTone
|
|
962
|
-
critical: ThemeColorMutedTone
|
|
1028
|
+
default: ThemeColorMutedTone;
|
|
1029
|
+
transparent: ThemeColorMutedTone;
|
|
1030
|
+
primary: ThemeColorMutedTone;
|
|
1031
|
+
positive: ThemeColorMutedTone;
|
|
1032
|
+
caution: ThemeColorMutedTone;
|
|
1033
|
+
critical: ThemeColorMutedTone;
|
|
963
1034
|
}
|
|
964
1035
|
|
|
965
1036
|
/**
|
|
@@ -967,11 +1038,11 @@ export declare interface ThemeColorMuted {
|
|
|
967
1038
|
* @deprecated Use `ThemeColorSelectableTone_v2` instead.
|
|
968
1039
|
*/
|
|
969
1040
|
export declare interface ThemeColorMutedTone {
|
|
970
|
-
enabled: ThemeColorGenericState
|
|
971
|
-
disabled: ThemeColorGenericState
|
|
972
|
-
hovered: ThemeColorGenericState
|
|
973
|
-
pressed: ThemeColorGenericState
|
|
974
|
-
selected: ThemeColorGenericState
|
|
1041
|
+
enabled: ThemeColorGenericState;
|
|
1042
|
+
disabled: ThemeColorGenericState;
|
|
1043
|
+
hovered: ThemeColorGenericState;
|
|
1044
|
+
pressed: ThemeColorGenericState;
|
|
1045
|
+
selected: ThemeColorGenericState;
|
|
975
1046
|
}
|
|
976
1047
|
|
|
977
1048
|
/**
|
|
@@ -979,56 +1050,65 @@ export declare interface ThemeColorMutedTone {
|
|
|
979
1050
|
* @deprecated Use `ThemeColorCardToneKey` instead.
|
|
980
1051
|
*/
|
|
981
1052
|
export declare type ThemeColorName =
|
|
982
|
-
|
|
|
983
|
-
|
|
|
984
|
-
|
|
|
985
|
-
|
|
|
986
|
-
|
|
|
987
|
-
|
|
|
1053
|
+
| "transparent"
|
|
1054
|
+
| "default"
|
|
1055
|
+
| "primary"
|
|
1056
|
+
| "positive"
|
|
1057
|
+
| "caution"
|
|
1058
|
+
| "critical";
|
|
988
1059
|
|
|
989
1060
|
/** @public */
|
|
990
1061
|
export declare type ThemeColorPalette = {
|
|
991
|
-
black: string | ColorTint
|
|
992
|
-
white: string | ColorTint
|
|
993
|
-
} & Record<ColorHueKey, Record<ColorTintKey, string | ColorTint
|
|
1062
|
+
black: string | ColorTint;
|
|
1063
|
+
white: string | ColorTint;
|
|
1064
|
+
} & Record<ColorHueKey, Record<ColorTintKey, string | ColorTint>>;
|
|
994
1065
|
|
|
995
1066
|
/**
|
|
996
1067
|
* @public
|
|
997
1068
|
* @deprecated Use `ThemeColorScheme_v2` instead.
|
|
998
1069
|
*/
|
|
999
|
-
export declare type ThemeColorScheme = Record<ThemeColorName, ThemeColor
|
|
1070
|
+
export declare type ThemeColorScheme = Record<ThemeColorName, ThemeColor>;
|
|
1000
1071
|
|
|
1001
1072
|
/**
|
|
1002
1073
|
* @public
|
|
1003
1074
|
*/
|
|
1004
|
-
export declare type ThemeColorScheme_v2 = Record<
|
|
1075
|
+
export declare type ThemeColorScheme_v2 = Record<
|
|
1076
|
+
ThemeColorCardToneKey,
|
|
1077
|
+
ThemeColorCard_v2
|
|
1078
|
+
>;
|
|
1005
1079
|
|
|
1006
1080
|
/**
|
|
1007
1081
|
* @public
|
|
1008
1082
|
*/
|
|
1009
|
-
export declare type ThemeColorSchemeKey = (typeof THEME_COLOR_SCHEMES)[number]
|
|
1083
|
+
export declare type ThemeColorSchemeKey = (typeof THEME_COLOR_SCHEMES)[number];
|
|
1010
1084
|
|
|
1011
1085
|
/**
|
|
1012
1086
|
* @public
|
|
1013
1087
|
* @deprecated Use `ThemeColorSchemes_v2` instead.
|
|
1014
1088
|
*/
|
|
1015
|
-
export declare type ThemeColorSchemes = Record<
|
|
1089
|
+
export declare type ThemeColorSchemes = Record<
|
|
1090
|
+
ThemeColorSchemeKey,
|
|
1091
|
+
ThemeColorScheme
|
|
1092
|
+
>;
|
|
1016
1093
|
|
|
1017
1094
|
/**
|
|
1018
1095
|
* @public
|
|
1019
1096
|
*/
|
|
1020
|
-
export declare type ThemeColorSchemes_v2 = Record<
|
|
1097
|
+
export declare type ThemeColorSchemes_v2 = Record<
|
|
1098
|
+
ThemeColorSchemeKey,
|
|
1099
|
+
ThemeColorScheme_v2
|
|
1100
|
+
>;
|
|
1021
1101
|
|
|
1022
1102
|
/**
|
|
1023
1103
|
* @public
|
|
1024
1104
|
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
1025
1105
|
*/
|
|
1026
1106
|
export declare interface ThemeColorSelectable {
|
|
1027
|
-
default: ThemeColorSelectableStates
|
|
1028
|
-
primary: ThemeColorSelectableStates
|
|
1029
|
-
positive: ThemeColorSelectableStates
|
|
1030
|
-
caution: ThemeColorSelectableStates
|
|
1031
|
-
critical: ThemeColorSelectableStates
|
|
1107
|
+
default: ThemeColorSelectableStates;
|
|
1108
|
+
primary: ThemeColorSelectableStates;
|
|
1109
|
+
positive: ThemeColorSelectableStates;
|
|
1110
|
+
caution: ThemeColorSelectableStates;
|
|
1111
|
+
critical: ThemeColorSelectableStates;
|
|
1032
1112
|
}
|
|
1033
1113
|
|
|
1034
1114
|
/**
|
|
@@ -1037,37 +1117,40 @@ export declare interface ThemeColorSelectable {
|
|
|
1037
1117
|
export declare type ThemeColorSelectable_v2 = Record<
|
|
1038
1118
|
ThemeColorStateToneKey,
|
|
1039
1119
|
ThemeColorSelectableTone_v2
|
|
1040
|
-
|
|
1120
|
+
>;
|
|
1041
1121
|
|
|
1042
1122
|
/**
|
|
1043
1123
|
* @public
|
|
1044
1124
|
* @deprecated Use `ThemeColorState_v2` instead.
|
|
1045
1125
|
*/
|
|
1046
|
-
export declare type ThemeColorSelectableState = ThemeColorGenericState
|
|
1126
|
+
export declare type ThemeColorSelectableState = ThemeColorGenericState;
|
|
1047
1127
|
|
|
1048
1128
|
/**
|
|
1049
1129
|
* @public
|
|
1050
1130
|
* @deprecated Use `ThemeColorSelectableStates_v2` instead.
|
|
1051
1131
|
*/
|
|
1052
1132
|
export declare interface ThemeColorSelectableStates {
|
|
1053
|
-
enabled: ThemeColorSelectableState
|
|
1054
|
-
hovered: ThemeColorSelectableState
|
|
1055
|
-
pressed: ThemeColorSelectableState
|
|
1056
|
-
selected: ThemeColorSelectableState
|
|
1057
|
-
disabled: ThemeColorSelectableState
|
|
1133
|
+
enabled: ThemeColorSelectableState;
|
|
1134
|
+
hovered: ThemeColorSelectableState;
|
|
1135
|
+
pressed: ThemeColorSelectableState;
|
|
1136
|
+
selected: ThemeColorSelectableState;
|
|
1137
|
+
disabled: ThemeColorSelectableState;
|
|
1058
1138
|
}
|
|
1059
1139
|
|
|
1060
1140
|
/**
|
|
1061
1141
|
* @public
|
|
1062
1142
|
*/
|
|
1063
|
-
export declare type ThemeColorSelectableTone_v2 = Record<
|
|
1143
|
+
export declare type ThemeColorSelectableTone_v2 = Record<
|
|
1144
|
+
ThemeColorStateKey,
|
|
1145
|
+
ThemeColorState_v2
|
|
1146
|
+
>;
|
|
1064
1147
|
|
|
1065
1148
|
/** @public */
|
|
1066
1149
|
export declare interface ThemeColorShadow {
|
|
1067
|
-
outline: string
|
|
1068
|
-
umbra: string
|
|
1069
|
-
penumbra: string
|
|
1070
|
-
ambient: string
|
|
1150
|
+
outline: string;
|
|
1151
|
+
umbra: string;
|
|
1152
|
+
penumbra: string;
|
|
1153
|
+
ambient: string;
|
|
1071
1154
|
}
|
|
1072
1155
|
|
|
1073
1156
|
/**
|
|
@@ -1075,12 +1158,12 @@ export declare interface ThemeColorShadow {
|
|
|
1075
1158
|
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
1076
1159
|
*/
|
|
1077
1160
|
export declare interface ThemeColorSolid {
|
|
1078
|
-
default: ThemeColorSolidTone
|
|
1079
|
-
transparent: ThemeColorSolidTone
|
|
1080
|
-
primary: ThemeColorSolidTone
|
|
1081
|
-
positive: ThemeColorSolidTone
|
|
1082
|
-
caution: ThemeColorSolidTone
|
|
1083
|
-
critical: ThemeColorSolidTone
|
|
1161
|
+
default: ThemeColorSolidTone;
|
|
1162
|
+
transparent: ThemeColorSolidTone;
|
|
1163
|
+
primary: ThemeColorSolidTone;
|
|
1164
|
+
positive: ThemeColorSolidTone;
|
|
1165
|
+
caution: ThemeColorSolidTone;
|
|
1166
|
+
critical: ThemeColorSolidTone;
|
|
1084
1167
|
}
|
|
1085
1168
|
|
|
1086
1169
|
/**
|
|
@@ -1088,270 +1171,275 @@ export declare interface ThemeColorSolid {
|
|
|
1088
1171
|
* @deprecated Use `ThemeColorSelectableTone_v2` instead.
|
|
1089
1172
|
*/
|
|
1090
1173
|
export declare interface ThemeColorSolidTone {
|
|
1091
|
-
enabled: ThemeColorGenericState
|
|
1092
|
-
disabled: ThemeColorGenericState
|
|
1093
|
-
hovered: ThemeColorGenericState
|
|
1094
|
-
pressed: ThemeColorGenericState
|
|
1095
|
-
selected: ThemeColorGenericState
|
|
1174
|
+
enabled: ThemeColorGenericState;
|
|
1175
|
+
disabled: ThemeColorGenericState;
|
|
1176
|
+
hovered: ThemeColorGenericState;
|
|
1177
|
+
pressed: ThemeColorGenericState;
|
|
1178
|
+
selected: ThemeColorGenericState;
|
|
1096
1179
|
}
|
|
1097
1180
|
|
|
1098
1181
|
/**
|
|
1099
1182
|
* @public
|
|
1100
1183
|
* @deprecated Use `ThemeColorAvatar_v2` instead
|
|
1101
1184
|
*/
|
|
1102
|
-
export declare type ThemeColorSpot = Record<ThemeColorSpotKey, string
|
|
1185
|
+
export declare type ThemeColorSpot = Record<ThemeColorSpotKey, string>;
|
|
1103
1186
|
|
|
1104
1187
|
/**
|
|
1105
1188
|
* @public
|
|
1106
1189
|
* @deprecated Use `ThemeColorAvatarColorKey` instead
|
|
1107
1190
|
*/
|
|
1108
|
-
export declare type ThemeColorSpotKey = ThemeColorAvatarColorKey
|
|
1191
|
+
export declare type ThemeColorSpotKey = ThemeColorAvatarColorKey;
|
|
1109
1192
|
|
|
1110
1193
|
/**
|
|
1111
1194
|
* @public
|
|
1112
1195
|
*/
|
|
1113
1196
|
export declare interface ThemeColorState_v2 {
|
|
1114
1197
|
/** @internal */
|
|
1115
|
-
_blend?: ThemeColorBlendModeKey
|
|
1198
|
+
_blend?: ThemeColorBlendModeKey;
|
|
1116
1199
|
accent: {
|
|
1117
|
-
fg: string
|
|
1118
|
-
}
|
|
1200
|
+
fg: string;
|
|
1201
|
+
};
|
|
1119
1202
|
/**
|
|
1120
1203
|
* @internal This may be removed in a future release
|
|
1121
1204
|
* */
|
|
1122
|
-
avatar: ThemeColorAvatar_v2
|
|
1205
|
+
avatar: ThemeColorAvatar_v2;
|
|
1123
1206
|
/**
|
|
1124
1207
|
* @internal This may be removed in a future release
|
|
1125
1208
|
* */
|
|
1126
|
-
badge: ThemeColorBadge_v2
|
|
1127
|
-
bg: string
|
|
1128
|
-
border: string
|
|
1209
|
+
badge: ThemeColorBadge_v2;
|
|
1210
|
+
bg: string;
|
|
1211
|
+
border: string;
|
|
1129
1212
|
code: {
|
|
1130
|
-
bg: string
|
|
1131
|
-
fg: string
|
|
1132
|
-
}
|
|
1133
|
-
fg: string
|
|
1134
|
-
icon: string
|
|
1135
|
-
kbd: ThemeColorKBD
|
|
1213
|
+
bg: string;
|
|
1214
|
+
fg: string;
|
|
1215
|
+
};
|
|
1216
|
+
fg: string;
|
|
1217
|
+
icon: string;
|
|
1218
|
+
kbd: ThemeColorKBD;
|
|
1136
1219
|
link: {
|
|
1137
|
-
fg: string
|
|
1138
|
-
}
|
|
1220
|
+
fg: string;
|
|
1221
|
+
};
|
|
1139
1222
|
muted: {
|
|
1140
|
-
bg: string
|
|
1141
|
-
fg: string
|
|
1142
|
-
}
|
|
1223
|
+
bg: string;
|
|
1224
|
+
fg: string;
|
|
1225
|
+
};
|
|
1143
1226
|
skeleton: {
|
|
1144
|
-
from: string
|
|
1145
|
-
to: string
|
|
1146
|
-
}
|
|
1227
|
+
from: string;
|
|
1228
|
+
to: string;
|
|
1229
|
+
};
|
|
1147
1230
|
}
|
|
1148
1231
|
|
|
1149
1232
|
/** @public */
|
|
1150
|
-
export declare type ThemeColorStateKey = (typeof THEME_COLOR_STATES)[number]
|
|
1233
|
+
export declare type ThemeColorStateKey = (typeof THEME_COLOR_STATES)[number];
|
|
1151
1234
|
|
|
1152
1235
|
/** @public */
|
|
1153
1236
|
export declare type ThemeColorStatesTokens = Partial<
|
|
1154
1237
|
Record<ColorConfigState, ThemeColorStateTokens>
|
|
1155
|
-
|
|
1238
|
+
>;
|
|
1156
1239
|
|
|
1157
1240
|
/** @public */
|
|
1158
1241
|
export declare interface ThemeColorStateTokens {
|
|
1159
|
-
_blend?: ColorBlendModeTokenValue
|
|
1160
|
-
_hue?: ColorHueKey
|
|
1242
|
+
_blend?: ColorBlendModeTokenValue;
|
|
1243
|
+
_hue?: ColorHueKey;
|
|
1161
1244
|
accent?: {
|
|
1162
|
-
fg?: ThemeColorTokenValue
|
|
1163
|
-
}
|
|
1164
|
-
avatar?: ThemeColorAvatarTokens
|
|
1165
|
-
badge?: ThemeColorBadgeTokens
|
|
1166
|
-
bg?: ThemeColorTokenValue
|
|
1167
|
-
border?: ThemeColorTokenValue
|
|
1245
|
+
fg?: ThemeColorTokenValue;
|
|
1246
|
+
};
|
|
1247
|
+
avatar?: ThemeColorAvatarTokens;
|
|
1248
|
+
badge?: ThemeColorBadgeTokens;
|
|
1249
|
+
bg?: ThemeColorTokenValue;
|
|
1250
|
+
border?: ThemeColorTokenValue;
|
|
1168
1251
|
code?: {
|
|
1169
|
-
bg?: ThemeColorTokenValue
|
|
1170
|
-
fg?: ThemeColorTokenValue
|
|
1171
|
-
}
|
|
1172
|
-
fg?: ThemeColorTokenValue
|
|
1173
|
-
icon?: ThemeColorTokenValue
|
|
1252
|
+
bg?: ThemeColorTokenValue;
|
|
1253
|
+
fg?: ThemeColorTokenValue;
|
|
1254
|
+
};
|
|
1255
|
+
fg?: ThemeColorTokenValue;
|
|
1256
|
+
icon?: ThemeColorTokenValue;
|
|
1174
1257
|
kbd?: {
|
|
1175
|
-
bg?: ThemeColorTokenValue
|
|
1176
|
-
fg?: ThemeColorTokenValue
|
|
1177
|
-
border?: ThemeColorTokenValue
|
|
1178
|
-
}
|
|
1258
|
+
bg?: ThemeColorTokenValue;
|
|
1259
|
+
fg?: ThemeColorTokenValue;
|
|
1260
|
+
border?: ThemeColorTokenValue;
|
|
1261
|
+
};
|
|
1179
1262
|
link?: {
|
|
1180
|
-
fg?: ThemeColorTokenValue
|
|
1181
|
-
}
|
|
1263
|
+
fg?: ThemeColorTokenValue;
|
|
1264
|
+
};
|
|
1182
1265
|
muted?: {
|
|
1183
|
-
bg?: ThemeColorTokenValue
|
|
1184
|
-
fg?: ThemeColorTokenValue
|
|
1185
|
-
}
|
|
1266
|
+
bg?: ThemeColorTokenValue;
|
|
1267
|
+
fg?: ThemeColorTokenValue;
|
|
1268
|
+
};
|
|
1186
1269
|
skeleton?: {
|
|
1187
|
-
from?: ThemeColorTokenValue
|
|
1188
|
-
to?: ThemeColorTokenValue
|
|
1189
|
-
}
|
|
1270
|
+
from?: ThemeColorTokenValue;
|
|
1271
|
+
to?: ThemeColorTokenValue;
|
|
1272
|
+
};
|
|
1190
1273
|
}
|
|
1191
1274
|
|
|
1192
1275
|
/** @public */
|
|
1193
|
-
export declare type ThemeColorStateToneKey =
|
|
1276
|
+
export declare type ThemeColorStateToneKey =
|
|
1277
|
+
(typeof THEME_COLOR_STATE_TONES)[number];
|
|
1194
1278
|
|
|
1195
1279
|
/**
|
|
1196
1280
|
* @public
|
|
1197
1281
|
*/
|
|
1198
1282
|
export declare interface ThemeColorSyntax {
|
|
1199
|
-
atrule: string
|
|
1200
|
-
attrName: string
|
|
1201
|
-
attrValue: string
|
|
1202
|
-
attribute: string
|
|
1203
|
-
boolean: string
|
|
1204
|
-
builtin: string
|
|
1205
|
-
cdata: string
|
|
1206
|
-
char: string
|
|
1207
|
-
class: string
|
|
1208
|
-
className: string
|
|
1209
|
-
comment: string
|
|
1210
|
-
constant: string
|
|
1211
|
-
deleted: string
|
|
1212
|
-
doctype: string
|
|
1213
|
-
entity: string
|
|
1214
|
-
function: string
|
|
1215
|
-
hexcode: string
|
|
1216
|
-
id: string
|
|
1217
|
-
important: string
|
|
1218
|
-
inserted: string
|
|
1219
|
-
keyword: string
|
|
1220
|
-
number: string
|
|
1221
|
-
operator: string
|
|
1222
|
-
prolog: string
|
|
1223
|
-
property: string
|
|
1224
|
-
pseudoClass: string
|
|
1225
|
-
pseudoElement: string
|
|
1226
|
-
punctuation: string
|
|
1227
|
-
regex: string
|
|
1228
|
-
selector: string
|
|
1229
|
-
string: string
|
|
1230
|
-
symbol: string
|
|
1231
|
-
tag: string
|
|
1232
|
-
unit: string
|
|
1233
|
-
url: string
|
|
1234
|
-
variable: string
|
|
1283
|
+
atrule: string;
|
|
1284
|
+
attrName: string;
|
|
1285
|
+
attrValue: string;
|
|
1286
|
+
attribute: string;
|
|
1287
|
+
boolean: string;
|
|
1288
|
+
builtin: string;
|
|
1289
|
+
cdata: string;
|
|
1290
|
+
char: string;
|
|
1291
|
+
class: string;
|
|
1292
|
+
className: string;
|
|
1293
|
+
comment: string;
|
|
1294
|
+
constant: string;
|
|
1295
|
+
deleted: string;
|
|
1296
|
+
doctype: string;
|
|
1297
|
+
entity: string;
|
|
1298
|
+
function: string;
|
|
1299
|
+
hexcode: string;
|
|
1300
|
+
id: string;
|
|
1301
|
+
important: string;
|
|
1302
|
+
inserted: string;
|
|
1303
|
+
keyword: string;
|
|
1304
|
+
number: string;
|
|
1305
|
+
operator: string;
|
|
1306
|
+
prolog: string;
|
|
1307
|
+
property: string;
|
|
1308
|
+
pseudoClass: string;
|
|
1309
|
+
pseudoElement: string;
|
|
1310
|
+
punctuation: string;
|
|
1311
|
+
regex: string;
|
|
1312
|
+
selector: string;
|
|
1313
|
+
string: string;
|
|
1314
|
+
symbol: string;
|
|
1315
|
+
tag: string;
|
|
1316
|
+
unit: string;
|
|
1317
|
+
url: string;
|
|
1318
|
+
variable: string;
|
|
1235
1319
|
}
|
|
1236
1320
|
|
|
1237
1321
|
/** @public */
|
|
1238
1322
|
export declare interface ThemeColorTokens {
|
|
1239
|
-
base?: Partial<Record<ColorConfigCardTone, ThemeColorBaseTokens
|
|
1240
|
-
button?: Partial<Record<ThemeColorButtonModeKey, ThemeColorButtonTokens
|
|
1241
|
-
input?: Partial<Record<ColorConfigInputMode, ThemeColorInputTokens
|
|
1323
|
+
base?: Partial<Record<ColorConfigCardTone, ThemeColorBaseTokens>>;
|
|
1324
|
+
button?: Partial<Record<ThemeColorButtonModeKey, ThemeColorButtonTokens>>;
|
|
1325
|
+
input?: Partial<Record<ColorConfigInputMode, ThemeColorInputTokens>>;
|
|
1242
1326
|
selectable?: Partial<
|
|
1243
1327
|
Record<
|
|
1244
1328
|
ColorConfigStateTone,
|
|
1245
1329
|
{
|
|
1246
|
-
_hue?: ColorHueKey
|
|
1330
|
+
_hue?: ColorHueKey;
|
|
1247
1331
|
} & ThemeColorStatesTokens
|
|
1248
1332
|
>
|
|
1249
|
-
|
|
1250
|
-
syntax?: Partial<Record<keyof ThemeColorSyntax, ThemeColorTokenValue
|
|
1333
|
+
>;
|
|
1334
|
+
syntax?: Partial<Record<keyof ThemeColorSyntax, ThemeColorTokenValue>>;
|
|
1251
1335
|
}
|
|
1252
1336
|
|
|
1253
1337
|
/** @public */
|
|
1254
|
-
export declare type ThemeColorTokenValue = [ColorConfigValue, ColorConfigValue]
|
|
1338
|
+
export declare type ThemeColorTokenValue = [ColorConfigValue, ColorConfigValue];
|
|
1255
1339
|
|
|
1256
1340
|
/**
|
|
1257
1341
|
* @public
|
|
1258
1342
|
* @deprecated Use `ThemeColorCardToneKey` instead.
|
|
1259
1343
|
*/
|
|
1260
|
-
export declare type ThemeColorToneKey = ThemeColorName
|
|
1344
|
+
export declare type ThemeColorToneKey = ThemeColorName;
|
|
1261
1345
|
|
|
1262
1346
|
/** @public */
|
|
1263
1347
|
export declare interface ThemeConfig {
|
|
1264
|
-
avatar?: ThemeAvatar_v2
|
|
1348
|
+
avatar?: ThemeAvatar_v2;
|
|
1265
1349
|
button?: {
|
|
1266
1350
|
border: {
|
|
1267
|
-
width: number
|
|
1268
|
-
}
|
|
1269
|
-
focusRing: ThemeFocusRing
|
|
1270
|
-
textWeight: ThemeFontWeightKey
|
|
1271
|
-
}
|
|
1351
|
+
width: number;
|
|
1352
|
+
};
|
|
1353
|
+
focusRing: ThemeFocusRing;
|
|
1354
|
+
textWeight: ThemeFontWeightKey;
|
|
1355
|
+
};
|
|
1272
1356
|
card?: {
|
|
1273
1357
|
border: {
|
|
1274
|
-
width: number
|
|
1275
|
-
}
|
|
1276
|
-
focusRing: ThemeFocusRing
|
|
1358
|
+
width: number;
|
|
1359
|
+
};
|
|
1360
|
+
focusRing: ThemeFocusRing;
|
|
1277
1361
|
shadow: {
|
|
1278
|
-
outline: number
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
color?: ThemeColorTokens
|
|
1282
|
-
container?: number[]
|
|
1283
|
-
font?: ThemeFonts
|
|
1284
|
-
input?: ThemeInput_v2
|
|
1285
|
-
layer?: ThemeLayer
|
|
1286
|
-
media?: number[]
|
|
1287
|
-
palette?: ThemeColorPalette
|
|
1288
|
-
radius?: number[]
|
|
1289
|
-
shadow?: Array<ThemeShadow | null
|
|
1290
|
-
space?: number[]
|
|
1362
|
+
outline: number;
|
|
1363
|
+
};
|
|
1364
|
+
};
|
|
1365
|
+
color?: ThemeColorTokens;
|
|
1366
|
+
container?: number[];
|
|
1367
|
+
font?: ThemeFonts;
|
|
1368
|
+
input?: ThemeInput_v2;
|
|
1369
|
+
layer?: ThemeLayer;
|
|
1370
|
+
media?: number[];
|
|
1371
|
+
palette?: ThemeColorPalette;
|
|
1372
|
+
radius?: number[];
|
|
1373
|
+
shadow?: Array<ThemeShadow | null>;
|
|
1374
|
+
space?: number[];
|
|
1291
1375
|
/** @internal */
|
|
1292
|
-
style?: ThemeStyles
|
|
1376
|
+
style?: ThemeStyles;
|
|
1293
1377
|
}
|
|
1294
1378
|
|
|
1295
1379
|
/**
|
|
1296
1380
|
* @public
|
|
1297
1381
|
*/
|
|
1298
1382
|
export declare interface ThemeFocusRing {
|
|
1299
|
-
offset: number
|
|
1300
|
-
width: number
|
|
1383
|
+
offset: number;
|
|
1384
|
+
width: number;
|
|
1301
1385
|
}
|
|
1302
1386
|
|
|
1303
1387
|
/**
|
|
1304
1388
|
* @public
|
|
1305
1389
|
*/
|
|
1306
1390
|
export declare interface ThemeFont {
|
|
1307
|
-
family: string
|
|
1308
|
-
weights: ThemeFontWeight
|
|
1309
|
-
sizes: ThemeFontSize[]
|
|
1391
|
+
family: string;
|
|
1392
|
+
weights: ThemeFontWeight;
|
|
1393
|
+
sizes: ThemeFontSize[];
|
|
1310
1394
|
/** @deprecated No longer supported. */
|
|
1311
|
-
horizontalOffset?: number
|
|
1395
|
+
horizontalOffset?: number;
|
|
1312
1396
|
}
|
|
1313
1397
|
|
|
1314
1398
|
/**
|
|
1315
1399
|
* @public
|
|
1316
1400
|
*/
|
|
1317
|
-
export declare type ThemeFontKey =
|
|
1401
|
+
export declare type ThemeFontKey = "code" | "heading" | "label" | "text";
|
|
1318
1402
|
|
|
1319
1403
|
/**
|
|
1320
1404
|
* @public
|
|
1321
1405
|
*/
|
|
1322
1406
|
export declare interface ThemeFonts {
|
|
1323
|
-
code: ThemeFont
|
|
1324
|
-
heading: ThemeFont
|
|
1325
|
-
label: ThemeFont
|
|
1326
|
-
text: ThemeFont
|
|
1407
|
+
code: ThemeFont;
|
|
1408
|
+
heading: ThemeFont;
|
|
1409
|
+
label: ThemeFont;
|
|
1410
|
+
text: ThemeFont;
|
|
1327
1411
|
}
|
|
1328
1412
|
|
|
1329
1413
|
/**
|
|
1330
1414
|
* @public
|
|
1331
1415
|
*/
|
|
1332
1416
|
export declare interface ThemeFontSize {
|
|
1333
|
-
ascenderHeight: number
|
|
1334
|
-
descenderHeight: number
|
|
1335
|
-
fontSize: number
|
|
1336
|
-
iconSize: number
|
|
1337
|
-
letterSpacing: number
|
|
1338
|
-
lineHeight: number
|
|
1417
|
+
ascenderHeight: number;
|
|
1418
|
+
descenderHeight: number;
|
|
1419
|
+
fontSize: number;
|
|
1420
|
+
iconSize: number;
|
|
1421
|
+
letterSpacing: number;
|
|
1422
|
+
lineHeight: number;
|
|
1339
1423
|
}
|
|
1340
1424
|
|
|
1341
1425
|
/**
|
|
1342
1426
|
* @public
|
|
1343
1427
|
*/
|
|
1344
1428
|
export declare interface ThemeFontWeight {
|
|
1345
|
-
regular: number
|
|
1346
|
-
medium: number
|
|
1347
|
-
semibold: number
|
|
1348
|
-
bold: number
|
|
1429
|
+
regular: number;
|
|
1430
|
+
medium: number;
|
|
1431
|
+
semibold: number;
|
|
1432
|
+
bold: number;
|
|
1349
1433
|
}
|
|
1350
1434
|
|
|
1351
1435
|
/**
|
|
1352
1436
|
* @public
|
|
1353
1437
|
*/
|
|
1354
|
-
export declare type ThemeFontWeightKey =
|
|
1438
|
+
export declare type ThemeFontWeightKey =
|
|
1439
|
+
| "regular"
|
|
1440
|
+
| "medium"
|
|
1441
|
+
| "semibold"
|
|
1442
|
+
| "bold";
|
|
1355
1443
|
|
|
1356
1444
|
/**
|
|
1357
1445
|
* @public
|
|
@@ -1359,22 +1447,22 @@ export declare type ThemeFontWeightKey = 'regular' | 'medium' | 'semibold' | 'bo
|
|
|
1359
1447
|
*/
|
|
1360
1448
|
export declare interface ThemeInput {
|
|
1361
1449
|
checkbox: {
|
|
1362
|
-
size: number
|
|
1363
|
-
}
|
|
1450
|
+
size: number;
|
|
1451
|
+
};
|
|
1364
1452
|
radio: {
|
|
1365
|
-
size: number
|
|
1366
|
-
markSize: number
|
|
1367
|
-
}
|
|
1453
|
+
size: number;
|
|
1454
|
+
markSize: number;
|
|
1455
|
+
};
|
|
1368
1456
|
switch: {
|
|
1369
|
-
width: number
|
|
1370
|
-
height: number
|
|
1371
|
-
padding: number
|
|
1372
|
-
transitionDurationMs: number
|
|
1373
|
-
transitionTimingFunction: string
|
|
1374
|
-
}
|
|
1457
|
+
width: number;
|
|
1458
|
+
height: number;
|
|
1459
|
+
padding: number;
|
|
1460
|
+
transitionDurationMs: number;
|
|
1461
|
+
transitionTimingFunction: string;
|
|
1462
|
+
};
|
|
1375
1463
|
border: {
|
|
1376
|
-
width: number
|
|
1377
|
-
}
|
|
1464
|
+
width: number;
|
|
1465
|
+
};
|
|
1378
1466
|
}
|
|
1379
1467
|
|
|
1380
1468
|
/**
|
|
@@ -1382,31 +1470,31 @@ export declare interface ThemeInput {
|
|
|
1382
1470
|
*/
|
|
1383
1471
|
export declare interface ThemeInput_v2 {
|
|
1384
1472
|
checkbox: {
|
|
1385
|
-
size: number
|
|
1386
|
-
focusRing: ThemeFocusRing
|
|
1387
|
-
}
|
|
1473
|
+
size: number;
|
|
1474
|
+
focusRing: ThemeFocusRing;
|
|
1475
|
+
};
|
|
1388
1476
|
radio: {
|
|
1389
|
-
size: number
|
|
1390
|
-
markSize: number
|
|
1391
|
-
focusRing: ThemeFocusRing
|
|
1392
|
-
}
|
|
1477
|
+
size: number;
|
|
1478
|
+
markSize: number;
|
|
1479
|
+
focusRing: ThemeFocusRing;
|
|
1480
|
+
};
|
|
1393
1481
|
switch: {
|
|
1394
|
-
width: number
|
|
1395
|
-
height: number
|
|
1396
|
-
padding: number
|
|
1397
|
-
transitionDurationMs: number
|
|
1398
|
-
transitionTimingFunction: string
|
|
1399
|
-
focusRing: ThemeFocusRing
|
|
1400
|
-
}
|
|
1482
|
+
width: number;
|
|
1483
|
+
height: number;
|
|
1484
|
+
padding: number;
|
|
1485
|
+
transitionDurationMs: number;
|
|
1486
|
+
transitionTimingFunction: string;
|
|
1487
|
+
focusRing: ThemeFocusRing;
|
|
1488
|
+
};
|
|
1401
1489
|
border: {
|
|
1402
|
-
width: number
|
|
1403
|
-
}
|
|
1490
|
+
width: number;
|
|
1491
|
+
};
|
|
1404
1492
|
select: {
|
|
1405
|
-
focusRing: ThemeFocusRing
|
|
1406
|
-
}
|
|
1493
|
+
focusRing: ThemeFocusRing;
|
|
1494
|
+
};
|
|
1407
1495
|
text: {
|
|
1408
|
-
focusRing: ThemeFocusRing
|
|
1409
|
-
}
|
|
1496
|
+
focusRing: ThemeFocusRing;
|
|
1497
|
+
};
|
|
1410
1498
|
}
|
|
1411
1499
|
|
|
1412
1500
|
/**
|
|
@@ -1414,23 +1502,23 @@ export declare interface ThemeInput_v2 {
|
|
|
1414
1502
|
*/
|
|
1415
1503
|
export declare interface ThemeLayer {
|
|
1416
1504
|
dialog: {
|
|
1417
|
-
zOffset: number
|
|
1418
|
-
}
|
|
1505
|
+
zOffset: number;
|
|
1506
|
+
};
|
|
1419
1507
|
popover: {
|
|
1420
|
-
zOffset: number
|
|
1421
|
-
}
|
|
1508
|
+
zOffset: number;
|
|
1509
|
+
};
|
|
1422
1510
|
tooltip: {
|
|
1423
|
-
zOffset: number
|
|
1424
|
-
}
|
|
1511
|
+
zOffset: number;
|
|
1512
|
+
};
|
|
1425
1513
|
}
|
|
1426
1514
|
|
|
1427
1515
|
/**
|
|
1428
1516
|
* @public
|
|
1429
1517
|
*/
|
|
1430
1518
|
export declare interface ThemeShadow {
|
|
1431
|
-
umbra: ThemeBoxShadow
|
|
1432
|
-
penumbra: ThemeBoxShadow
|
|
1433
|
-
ambient: ThemeBoxShadow
|
|
1519
|
+
umbra: ThemeBoxShadow;
|
|
1520
|
+
penumbra: ThemeBoxShadow;
|
|
1521
|
+
ambient: ThemeBoxShadow;
|
|
1434
1522
|
}
|
|
1435
1523
|
|
|
1436
1524
|
/**
|
|
@@ -1438,63 +1526,63 @@ export declare interface ThemeShadow {
|
|
|
1438
1526
|
*/
|
|
1439
1527
|
export declare interface ThemeStyles {
|
|
1440
1528
|
button?: {
|
|
1441
|
-
root?: CSSObject
|
|
1442
|
-
}
|
|
1529
|
+
root?: CSSObject;
|
|
1530
|
+
};
|
|
1443
1531
|
card?: {
|
|
1444
|
-
root?: CSSObject
|
|
1445
|
-
}
|
|
1532
|
+
root?: CSSObject;
|
|
1533
|
+
};
|
|
1446
1534
|
}
|
|
1447
1535
|
|
|
1448
1536
|
/** @internal */
|
|
1449
1537
|
export declare interface TokenBaseKeyNode {
|
|
1450
|
-
type:
|
|
1451
|
-
tone: ColorConfigCardTone
|
|
1452
|
-
key: ColorConfigCardKey | ColorConfigBlendKey
|
|
1538
|
+
type: "base";
|
|
1539
|
+
tone: ColorConfigCardTone;
|
|
1540
|
+
key: ColorConfigCardKey | ColorConfigBlendKey;
|
|
1453
1541
|
}
|
|
1454
1542
|
|
|
1455
1543
|
/** @internal */
|
|
1456
1544
|
export declare interface TokenBlendModeValueNode {
|
|
1457
|
-
type:
|
|
1458
|
-
value?: ThemeColorBlendModeKey
|
|
1545
|
+
type: "blendMode";
|
|
1546
|
+
value?: ThemeColorBlendModeKey;
|
|
1459
1547
|
}
|
|
1460
1548
|
|
|
1461
1549
|
/** @internal */
|
|
1462
1550
|
export declare interface TokenButtonKeyNode {
|
|
1463
|
-
type:
|
|
1464
|
-
tone: ColorConfigStateTone
|
|
1465
|
-
mode: ThemeColorButtonModeKey
|
|
1466
|
-
key: ColorConfigStateKey | ColorConfigBlendKey
|
|
1551
|
+
type: "button";
|
|
1552
|
+
tone: ColorConfigStateTone;
|
|
1553
|
+
mode: ThemeColorButtonModeKey;
|
|
1554
|
+
key: ColorConfigStateKey | ColorConfigBlendKey;
|
|
1467
1555
|
}
|
|
1468
1556
|
|
|
1469
1557
|
/** @internal */
|
|
1470
1558
|
export declare interface TokenColorValueNode {
|
|
1471
|
-
type:
|
|
1472
|
-
key?:
|
|
1473
|
-
hue?: ColorHueKey
|
|
1474
|
-
mix?: number
|
|
1475
|
-
opacity?: number
|
|
1476
|
-
tint?: ColorTintKey
|
|
1559
|
+
type: "color";
|
|
1560
|
+
key?: "black" | "white";
|
|
1561
|
+
hue?: ColorHueKey;
|
|
1562
|
+
mix?: number;
|
|
1563
|
+
opacity?: number;
|
|
1564
|
+
tint?: ColorTintKey;
|
|
1477
1565
|
}
|
|
1478
1566
|
|
|
1479
1567
|
/** @internal */
|
|
1480
1568
|
export declare interface TokenHueValueNode {
|
|
1481
|
-
type:
|
|
1482
|
-
value?: ColorHueKey
|
|
1569
|
+
type: "hue";
|
|
1570
|
+
value?: ColorHueKey;
|
|
1483
1571
|
}
|
|
1484
1572
|
|
|
1485
1573
|
/** @internal */
|
|
1486
|
-
export declare type TokenKeyNode = TokenBaseKeyNode | TokenButtonKeyNode
|
|
1574
|
+
export declare type TokenKeyNode = TokenBaseKeyNode | TokenButtonKeyNode;
|
|
1487
1575
|
|
|
1488
1576
|
/** @internal */
|
|
1489
1577
|
export declare type TokenValueNode =
|
|
1490
1578
|
| TokenColorValueNode
|
|
1491
1579
|
| TokenHueValueNode
|
|
1492
|
-
| TokenBlendModeValueNode
|
|
1580
|
+
| TokenBlendModeValueNode;
|
|
1493
1581
|
|
|
1494
1582
|
/** @internal */
|
|
1495
|
-
export declare function v0_v2(v0: RootTheme): RootTheme_v2
|
|
1583
|
+
export declare function v0_v2(v0: RootTheme): RootTheme_v2;
|
|
1496
1584
|
|
|
1497
1585
|
/** @internal */
|
|
1498
|
-
export declare function v2_v0(v2: RootTheme_v2): RootTheme
|
|
1586
|
+
export declare function v2_v0(v2: RootTheme_v2): RootTheme;
|
|
1499
1587
|
|
|
1500
|
-
export {}
|
|
1588
|
+
export {};
|