@sanity/ui 2.16.22 → 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 +115 -1040
- 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 +115 -1040
- 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 +64 -155
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -155
- 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 +49 -162
- 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/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/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 +12 -3
- package/src/core/primitives/popover/popoverCard.tsx +1 -0
- 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 +5 -0
- package/src/core/primitives/tooltip/tooltipCard.tsx +1 -0
- 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.mjs
CHANGED
|
@@ -1667,37 +1667,52 @@ function getTheme_v2(theme) {
|
|
|
1667
1667
|
_resolved: !0,
|
|
1668
1668
|
avatar: {
|
|
1669
1669
|
...defaultThemeConfig.avatar,
|
|
1670
|
+
// oxlint-disable-next-line no-deprecated
|
|
1670
1671
|
...theme.sanity.avatar
|
|
1671
1672
|
},
|
|
1672
1673
|
button: {
|
|
1673
1674
|
...defaultThemeConfig.button,
|
|
1675
|
+
// oxlint-disable-next-line no-deprecated
|
|
1674
1676
|
...theme.sanity.button
|
|
1675
1677
|
},
|
|
1676
1678
|
card: defaultThemeConfig.card,
|
|
1679
|
+
// oxlint-disable-next-line no-deprecated
|
|
1677
1680
|
color: themeColor_v0_v2(theme.sanity.color),
|
|
1681
|
+
// oxlint-disable-next-line no-deprecated
|
|
1678
1682
|
container: theme.sanity.container,
|
|
1683
|
+
// oxlint-disable-next-line no-deprecated
|
|
1679
1684
|
font: theme.sanity.fonts,
|
|
1680
1685
|
input: {
|
|
1681
1686
|
...defaultThemeConfig.input,
|
|
1687
|
+
// oxlint-disable-next-line no-deprecated
|
|
1682
1688
|
...theme.sanity.input,
|
|
1683
1689
|
checkbox: {
|
|
1684
1690
|
...defaultThemeConfig.input.checkbox,
|
|
1691
|
+
// oxlint-disable-next-line no-deprecated
|
|
1685
1692
|
...theme.sanity.input.checkbox
|
|
1686
1693
|
},
|
|
1687
1694
|
radio: {
|
|
1688
1695
|
...defaultThemeConfig.input.radio,
|
|
1696
|
+
// oxlint-disable-next-line no-deprecated
|
|
1689
1697
|
...theme.sanity.input.radio
|
|
1690
1698
|
},
|
|
1691
1699
|
switch: {
|
|
1692
1700
|
...defaultThemeConfig.input.switch,
|
|
1701
|
+
// oxlint-disable-next-line no-deprecated
|
|
1693
1702
|
...theme.sanity.input.switch
|
|
1694
1703
|
}
|
|
1695
1704
|
},
|
|
1705
|
+
// oxlint-disable-next-line no-deprecated
|
|
1696
1706
|
layer: theme.sanity.layer ?? defaultThemeConfig.layer,
|
|
1707
|
+
// oxlint-disable-next-line no-deprecated
|
|
1697
1708
|
media: theme.sanity.media,
|
|
1709
|
+
// oxlint-disable-next-line no-deprecated
|
|
1698
1710
|
radius: theme.sanity.radius,
|
|
1711
|
+
// oxlint-disable-next-line no-deprecated
|
|
1699
1712
|
shadow: theme.sanity.shadows,
|
|
1713
|
+
// oxlint-disable-next-line no-deprecated
|
|
1700
1714
|
space: theme.sanity.space,
|
|
1715
|
+
// oxlint-disable-next-line no-deprecated
|
|
1701
1716
|
style: theme.sanity.styles
|
|
1702
1717
|
};
|
|
1703
1718
|
return cache$3.set(theme, v2), v2;
|
|
@@ -1714,17 +1729,29 @@ function v0_v2(v0) {
|
|
|
1714
1729
|
const cached_v2 = cache$2.get(v0);
|
|
1715
1730
|
if (cached_v2) return cached_v2;
|
|
1716
1731
|
const {
|
|
1732
|
+
// oxlint-disable-next-line no-deprecated
|
|
1717
1733
|
avatar,
|
|
1734
|
+
// oxlint-disable-next-line no-deprecated
|
|
1718
1735
|
button,
|
|
1736
|
+
// oxlint-disable-next-line no-deprecated
|
|
1719
1737
|
color: color2,
|
|
1738
|
+
// oxlint-disable-next-line no-deprecated
|
|
1720
1739
|
container,
|
|
1740
|
+
// oxlint-disable-next-line no-deprecated
|
|
1721
1741
|
fonts: font,
|
|
1742
|
+
// oxlint-disable-next-line no-deprecated
|
|
1722
1743
|
input,
|
|
1744
|
+
// oxlint-disable-next-line no-deprecated
|
|
1723
1745
|
layer,
|
|
1746
|
+
// oxlint-disable-next-line no-deprecated
|
|
1724
1747
|
media,
|
|
1748
|
+
// oxlint-disable-next-line no-deprecated
|
|
1725
1749
|
radius,
|
|
1750
|
+
// oxlint-disable-next-line no-deprecated
|
|
1726
1751
|
shadows: shadow,
|
|
1752
|
+
// oxlint-disable-next-line no-deprecated
|
|
1727
1753
|
space,
|
|
1754
|
+
// oxlint-disable-next-line no-deprecated
|
|
1728
1755
|
styles: style
|
|
1729
1756
|
} = v0, v2 = {
|
|
1730
1757
|
_version: 2,
|
|
@@ -1805,9 +1832,13 @@ function v2_v0(v2) {
|
|
|
1805
1832
|
} = v2;
|
|
1806
1833
|
return {
|
|
1807
1834
|
_version: 0,
|
|
1835
|
+
// oxlint-disable-next-line no-deprecated
|
|
1808
1836
|
avatar,
|
|
1837
|
+
// oxlint-disable-next-line no-deprecated
|
|
1809
1838
|
button,
|
|
1839
|
+
// oxlint-disable-next-line no-deprecated
|
|
1810
1840
|
container,
|
|
1841
|
+
// oxlint-disable-next-line no-deprecated
|
|
1811
1842
|
color: {
|
|
1812
1843
|
light: {
|
|
1813
1844
|
transparent: themeColor_v2_v0(color2.light.transparent),
|
|
@@ -1826,13 +1857,21 @@ function v2_v0(v2) {
|
|
|
1826
1857
|
critical: themeColor_v2_v0(color2.dark.critical)
|
|
1827
1858
|
}
|
|
1828
1859
|
},
|
|
1860
|
+
// oxlint-disable-next-line no-deprecated
|
|
1829
1861
|
focusRing: input.text.focusRing,
|
|
1862
|
+
// oxlint-disable-next-line no-deprecated
|
|
1830
1863
|
fonts,
|
|
1864
|
+
// oxlint-disable-next-line no-deprecated
|
|
1831
1865
|
input,
|
|
1866
|
+
// oxlint-disable-next-line no-deprecated
|
|
1832
1867
|
media,
|
|
1868
|
+
// oxlint-disable-next-line no-deprecated
|
|
1833
1869
|
radius,
|
|
1870
|
+
// oxlint-disable-next-line no-deprecated
|
|
1834
1871
|
shadows,
|
|
1872
|
+
// oxlint-disable-next-line no-deprecated
|
|
1835
1873
|
space,
|
|
1874
|
+
// oxlint-disable-next-line no-deprecated
|
|
1836
1875
|
styles,
|
|
1837
1876
|
v2
|
|
1838
1877
|
};
|
|
@@ -2794,12 +2833,14 @@ function resolveBaseColorTones(inputTokens, tone) {
|
|
|
2794
2833
|
...spec,
|
|
2795
2834
|
_hue: hue,
|
|
2796
2835
|
avatar: COLOR_HUES.reduce((acc, hue2) => ({
|
|
2836
|
+
// oxlint-disable-next-line no-accumulating-spread
|
|
2797
2837
|
...acc,
|
|
2798
2838
|
[hue2]: merge({
|
|
2799
2839
|
_hue: hue2
|
|
2800
2840
|
}, spec.avatar?.["*"], spec.avatar?.[hue2])
|
|
2801
2841
|
}), {}),
|
|
2802
2842
|
badge: THEME_COLOR_STATE_TONES.reduce((acc, tone2) => ({
|
|
2843
|
+
// oxlint-disable-next-line no-accumulating-spread
|
|
2803
2844
|
...acc,
|
|
2804
2845
|
[tone2]: {
|
|
2805
2846
|
_hue: inputTokens?.base?.[tone2]?._hue || hue,
|
|
@@ -2833,12 +2874,14 @@ function resolveButtonStateColorTokens(inputTokens, tone, mode, state) {
|
|
|
2833
2874
|
...spec,
|
|
2834
2875
|
_hue: hue,
|
|
2835
2876
|
avatar: COLOR_HUES.reduce((acc, hue2) => ({
|
|
2877
|
+
// oxlint-disable-next-line no-accumulating-spread
|
|
2836
2878
|
...acc,
|
|
2837
2879
|
[hue2]: merge({
|
|
2838
2880
|
_hue: hue2
|
|
2839
2881
|
}, spec.avatar?.["*"], spec.avatar?.[hue2])
|
|
2840
2882
|
}), {}),
|
|
2841
2883
|
badge: THEME_COLOR_STATE_TONES.reduce((acc, tone2) => ({
|
|
2884
|
+
// oxlint-disable-next-line no-accumulating-spread
|
|
2842
2885
|
...acc,
|
|
2843
2886
|
[tone2]: {
|
|
2844
2887
|
_hue: inputTokens?.base?.[tone2]?._hue || hue,
|
|
@@ -2887,12 +2930,14 @@ function resolveSelectableStateColorTokens(inputTokens, tone, state) {
|
|
|
2887
2930
|
...spec,
|
|
2888
2931
|
_hue: hue,
|
|
2889
2932
|
avatar: COLOR_HUES.reduce((acc, hue2) => ({
|
|
2933
|
+
// oxlint-disable-next-line no-accumulating-spread
|
|
2890
2934
|
...acc,
|
|
2891
2935
|
[hue2]: merge({
|
|
2892
2936
|
_hue: hue2
|
|
2893
2937
|
}, spec.avatar?.["*"], spec.avatar?.[hue2])
|
|
2894
2938
|
}), {}),
|
|
2895
2939
|
badge: THEME_COLOR_STATE_TONES.reduce((acc, tone2) => ({
|
|
2940
|
+
// oxlint-disable-next-line no-accumulating-spread
|
|
2896
2941
|
...acc,
|
|
2897
2942
|
[tone2]: {
|
|
2898
2943
|
_hue: inputTokens?.base?.[tone2]?._hue || hue,
|
|
@@ -4032,7 +4077,9 @@ function getScopedTheme(themeProp, scheme, tone) {
|
|
|
4032
4077
|
const v0 = is_v2(themeProp) ? v2_v0(themeProp) : themeProp, v2 = is_v2(themeProp) ? themeProp : v0_v2(themeProp), colorScheme_v0 = v0.color[scheme] || v0.color.light, color_v0 = colorScheme_v0[tone] || colorScheme_v0.default, layer_v0 = v0.layer || defaultThemeConfig.layer, colorScheme_v2 = v2.color[scheme] || v2.color.light, color_v2 = colorScheme_v2[tone] || colorScheme_v2.default, color_v2_9 = themeColor_v0_v2_9(color_v2), layer_v2 = v2.layer || defaultThemeConfig.layer, theme = {
|
|
4033
4078
|
sanity: {
|
|
4034
4079
|
...v0,
|
|
4080
|
+
// oxlint-disable-next-line no-deprecated
|
|
4035
4081
|
color: color_v0,
|
|
4082
|
+
// oxlint-disable-next-line no-deprecated
|
|
4036
4083
|
layer: layer_v0,
|
|
4037
4084
|
v2: {
|
|
4038
4085
|
...v2,
|