@sanity/ui 3.0.0-static.17 → 3.0.0-static.19
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.cjs +138 -137
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
- package/dist/_chunks-cjs/buildCommand.cjs +21 -22
- package/dist/_chunks-cjs/buildCommand.cjs.map +1 -1
- package/dist/_chunks-es/_visual-editing.js +139 -138
- package/dist/_chunks-es/_visual-editing.js.map +1 -1
- package/dist/_visual-editing.d.cts +12 -22
- package/dist/_visual-editing.d.ts +12 -22
- package/dist/cli.cjs +1 -1
- package/dist/css.cjs +1589 -2016
- package/dist/css.cjs.map +1 -1
- package/dist/css.d.cts +9427 -874
- package/dist/css.d.ts +9427 -874
- package/dist/css.js +1591 -2018
- package/dist/css.js.map +1 -1
- package/dist/index.cjs +28 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -23
- package/dist/index.d.ts +26 -23
- package/dist/index.js +30 -42
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs +2749 -2756
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.d.cts +242 -161
- package/dist/theme.d.ts +242 -161
- package/dist/theme.js +2750 -2757
- package/dist/theme.js.map +1 -1
- package/dist/ui-system.css +15719 -16097
- package/dist/ui-system.min.css +1 -1
- package/dist/ui-theme.css +850 -4568
- package/dist/ui-theme.min.css +1 -1
- package/dist/ui.css +16569 -20772
- package/dist/ui.min.css +1 -1
- package/package.json +10 -15
- package/src/cli/buildCommand.ts +13 -30
- package/src/core/StyleTags.tsx +4 -12
- package/src/core/_compat/styles/_responsive.ts +1 -1
- package/src/core/_compat/theme/theme.test.tsx +4 -5
- package/src/core/_compat/theme/themeColorProvider.tsx +2 -2
- package/src/core/_compat/theme/themeContext.ts +2 -2
- package/src/core/_compat/theme/themeProvider.tsx +2 -2
- package/src/core/_compat/theme/types.ts +1 -1
- package/src/core/_compat/theme/useRootTheme.ts +1 -1
- package/src/core/_compat/theme/useTheme.ts +1 -1
- package/src/core/components/autocomplete/__workshop__/async.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/custom.tsx +11 -11
- package/src/core/components/autocomplete/__workshop__/example.tsx +6 -7
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +1 -1
- package/src/core/components/autocomplete/autocomplete.tsx +5 -5
- package/src/core/components/autocomplete/autocompleteOption.tsx +1 -1
- package/src/core/components/autocomplete/autocompleteReducer.ts +1 -1
- package/src/core/components/autocomplete/constants.ts +1 -1
- package/src/core/components/autocomplete/types.ts +1 -1
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +1 -1
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +7 -7
- package/src/core/components/dialog/__workshop__/activate.tsx +4 -4
- package/src/core/components/dialog/__workshop__/position.tsx +1 -1
- package/src/core/components/dialog/__workshop__/props.tsx +1 -1
- package/src/core/components/dialog/__workshop__/wrapped.tsx +2 -2
- package/src/core/components/dialog/dialog.tsx +15 -8
- package/src/core/components/dialog/dialogCard.tsx +18 -3
- package/src/core/components/dialog/dialogContext.ts +1 -1
- package/src/core/components/dialog/dialogProvider.tsx +3 -3
- package/src/core/components/dialog/useDialog.ts +1 -1
- package/src/core/components/hotkeys/hotkeys.tsx +4 -4
- package/src/core/components/menu/__workshop__/closableMenuButton.tsx +5 -4
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +2 -2
- package/src/core/components/menu/__workshop__/customMenuItem.tsx +3 -3
- package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +1 -1
- package/src/core/components/menu/__workshop__/groups.tsx +2 -2
- package/src/core/components/menu/__workshop__/menuButton.tsx +1 -1
- package/src/core/components/menu/__workshop__/menuGroupRight.tsx +1 -1
- package/src/core/components/menu/__workshop__/nestedMenu.tsx +1 -1
- package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +13 -4
- package/src/core/components/menu/__workshop__/selectedItem.tsx +2 -2
- package/src/core/components/menu/__workshop__/withoutArrow.tsx +1 -1
- package/src/core/components/menu/menu.test.tsx +6 -7
- package/src/core/components/menu/menu.tsx +2 -2
- package/src/core/components/menu/menuButton.tsx +9 -9
- package/src/core/components/menu/menuContext.ts +1 -1
- package/src/core/components/menu/menuDivider.tsx +3 -3
- package/src/core/components/menu/menuGroup.tsx +9 -9
- package/src/core/components/menu/menuItem.tsx +9 -6
- package/src/core/components/menu/useMenu.ts +1 -1
- package/src/core/components/menu/useMenuController.ts +4 -4
- package/src/core/components/skeleton/__workshop__/delay.tsx +1 -1
- package/src/core/components/skeleton/__workshop__/skeleton.tsx +2 -2
- package/src/core/components/skeleton/codeSkeleton.tsx +5 -5
- package/src/core/components/skeleton/headingSkeleton.tsx +5 -5
- package/src/core/components/skeleton/labelSkeleton.tsx +5 -5
- package/src/core/components/skeleton/skeleton.tsx +4 -4
- package/src/core/components/skeleton/textSkeleton.tsx +5 -5
- package/src/core/components/tab/__workshop__/example.tsx +1 -1
- package/src/core/components/tab/tab.tsx +7 -7
- package/src/core/components/tab/tabList.tsx +14 -7
- package/src/core/components/tab/tabPanel.tsx +10 -7
- package/src/core/components/toast/__workshop__/hook.tsx +1 -1
- package/src/core/components/toast/toast.test.tsx +5 -5
- package/src/core/components/toast/toast.tsx +6 -7
- package/src/core/components/toast/toastContext.ts +1 -1
- package/src/core/components/toast/toastLayer.tsx +2 -2
- package/src/core/components/toast/toastProvider.tsx +1 -1
- package/src/core/components/toast/types.ts +1 -1
- package/src/core/components/toast/useToast.ts +1 -1
- package/src/core/components/tree/__workshop__/basic.perf.ts +1 -1
- package/src/core/components/tree/__workshop__/basic.tsx +1 -1
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +1 -1
- package/src/core/components/tree/helpers.ts +1 -1
- package/src/core/components/tree/tree.tsx +6 -6
- package/src/core/components/tree/treeContext.ts +1 -1
- package/src/core/components/tree/treeGroup.tsx +2 -2
- package/src/core/components/tree/treeItem.tsx +15 -15
- package/src/core/components/tree/types.ts +2 -2
- package/src/core/components/tree/useTree.ts +1 -1
- package/src/core/hooks/useClickOutside.test.tsx +15 -16
- package/src/core/hooks/useClickOutsideEvent.test.tsx +4 -5
- package/src/core/hooks/useDelayed.test.ts +6 -7
- package/src/core/hooks/useDelayedState.ts +1 -1
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +1 -1
- package/src/core/hooks/useElementSize.ts +1 -1
- package/src/core/hooks/useForwardedRef.ts +1 -1
- package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +1 -1
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +3 -18
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +10 -10
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +4 -4
- package/src/core/hooks/usePrefersDark.test.tsx +1 -0
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +4 -4
- package/src/core/hooks/usePrefersReducedMotion.test.tsx +1 -0
- package/src/core/middleware/origin.ts +1 -1
- package/src/core/primitives/_selectable/selectable.tsx +3 -3
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +1 -1
- package/src/core/primitives/avatar/avatar.tsx +6 -6
- package/src/core/primitives/avatar/avatarCounter.tsx +3 -3
- package/src/core/primitives/avatar/avatarStack.tsx +7 -7
- package/src/core/primitives/avatar/types.ts +1 -3
- package/src/core/primitives/badge/badge.test.tsx +2 -3
- package/src/core/primitives/badge/badge.tsx +3 -3
- package/src/core/primitives/box/__workshop__/responsive.tsx +2 -1
- package/src/core/primitives/box/box.tsx +4 -2
- package/src/core/primitives/button/__workshop__/custom.tsx +2 -2
- package/src/core/primitives/button/__workshop__/customIcons.tsx +3 -3
- package/src/core/primitives/button/__workshop__/disabled.tsx +9 -9
- package/src/core/primitives/button/__workshop__/props.tsx +3 -4
- package/src/core/primitives/button/__workshop__/stacked.tsx +4 -5
- package/src/core/primitives/button/button.test.tsx +2 -3
- package/src/core/primitives/button/button.tsx +11 -6
- package/src/core/primitives/card/__workshop__/asButton.tsx +16 -7
- package/src/core/primitives/card/__workshop__/checkered.tsx +1 -1
- package/src/core/primitives/card/__workshop__/index.ts +1 -1
- package/src/core/primitives/card/__workshop__/interactive.tsx +1 -1
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +3 -3
- package/src/core/primitives/card/__workshop__/props.tsx +3 -3
- package/src/core/primitives/card/__workshop__/selected.tsx +2 -2
- package/src/core/primitives/card/__workshop__/{allTones.tsx → tones.tsx} +3 -3
- package/src/core/primitives/card/card.tsx +4 -4
- package/src/core/primitives/card/cardContext.ts +2 -2
- package/src/core/primitives/card/cardProvider.tsx +3 -3
- package/src/core/primitives/card/types.ts +2 -2
- package/src/core/primitives/card/useCard.ts +2 -1
- package/src/core/primitives/checkbox/__workshop__/props.tsx +2 -0
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +11 -20
- package/src/core/primitives/checkbox/checkbox.tsx +5 -7
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/code/code.tsx +3 -3
- package/src/core/primitives/container/container.tsx +4 -4
- package/src/core/primitives/flex/flex.tsx +2 -2
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/heading/heading.tsx +2 -2
- package/src/core/primitives/inline/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/inline/inline.tsx +2 -2
- package/src/core/primitives/inline/types.ts +1 -0
- package/src/core/primitives/kbd/kbd.tsx +5 -5
- package/src/core/primitives/label/label.tsx +5 -5
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +2 -2
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +3 -4
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +4 -4
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +2 -3
- package/src/core/primitives/popover/constants.ts +1 -1
- package/src/core/primitives/popover/floating-ui/size.ts +2 -2
- package/src/core/primitives/popover/helpers.ts +1 -1
- package/src/core/primitives/popover/popover.tsx +1 -1
- package/src/core/primitives/popover/popoverLayer.tsx +4 -4
- package/src/core/primitives/popover/types.ts +3 -2
- package/src/core/primitives/radio/__workshop__/example.tsx +1 -1
- package/src/core/primitives/radio/radio.tsx +5 -5
- package/src/core/primitives/select/__workshop__/plain.tsx +15 -3
- package/src/core/primitives/select/__workshop__/readOnly.tsx +1 -1
- package/src/core/primitives/select/select.tsx +4 -10
- package/src/core/primitives/spinner/__workshop__/Props.tsx +1 -2
- package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +3 -3
- package/src/core/primitives/spinner/spinner.tsx +3 -3
- package/src/core/primitives/stack/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/stack/stack.tsx +5 -5
- package/src/core/primitives/switch/switch.tsx +3 -3
- package/src/core/primitives/text/__workshop__/colored.tsx +5 -5
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/text/text.tsx +6 -6
- package/src/core/primitives/textArea/__workshop__/plain.tsx +35 -23
- package/src/core/primitives/textArea/textArea.tsx +14 -5
- package/src/core/primitives/textInput/__workshop__/customValidity.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/plain.tsx +9 -15
- package/src/core/primitives/textInput/__workshop__/states.tsx +4 -4
- package/src/core/primitives/textInput/__workshop__/tones.tsx +2 -2
- package/src/core/primitives/textInput/textInput.tsx +13 -11
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +2 -2
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +1 -1
- package/src/core/primitives/tooltip/__workshop__/props.tsx +5 -4
- package/src/core/primitives/tooltip/constants.ts +1 -1
- package/src/core/primitives/tooltip/tooltip.test.tsx +61 -60
- package/src/core/primitives/tooltip/tooltip.tsx +11 -6
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +1 -1
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +3 -3
- package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +1 -1
- package/src/core/primitives/tooltip/tooltipLayer.tsx +4 -4
- package/src/core/primitives/types.ts +15 -24
- package/src/core/types/badge.ts +1 -1
- package/src/core/types/button.ts +1 -1
- package/src/core/types/card.ts +1 -1
- package/src/core/types/selectable.ts +1 -1
- package/src/core/utils/arrow/arrow.tsx +5 -14
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +5 -5
- package/src/core/utils/boundaryElement/boundaryElementContext.ts +1 -1
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +2 -2
- package/src/core/utils/boundaryElement/useBoundaryElement.ts +1 -1
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +15 -8
- package/src/core/utils/elementQuery/elementQuery.tsx +1 -1
- package/src/core/utils/errorBoundary.tsx +4 -4
- package/src/core/utils/layer/__workshop__/multipleRoots.tsx +5 -5
- package/src/core/utils/layer/__workshop__/nested.tsx +3 -3
- package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +9 -5
- package/src/core/utils/layer/getLayerContext.test.ts +3 -1
- package/src/core/utils/layer/getLayerContext.ts +1 -1
- package/src/core/utils/layer/layer.test.tsx +5 -5
- package/src/core/utils/layer/layer.tsx +2 -2
- package/src/core/utils/layer/layerCard.tsx +3 -3
- package/src/core/utils/layer/layerContext.ts +1 -1
- package/src/core/utils/layer/layerProvider.tsx +10 -2
- package/src/core/utils/layer/useLayer.ts +1 -1
- package/src/core/utils/portal/__workshop__/named.tsx +3 -3
- package/src/core/utils/portal/portal.test.tsx +5 -5
- package/src/core/utils/portal/portal.tsx +3 -2
- package/src/core/utils/portal/portalContext.ts +1 -1
- package/src/core/utils/portal/portalProvider.tsx +2 -2
- package/src/core/utils/portal/usePortal.ts +1 -1
- package/src/core/utils/srOnly/srOnly.tsx +3 -3
- package/src/core/utils/virtualList/__workshop__/infiniteList.tsx +1 -1
- package/src/core/utils/virtualList/virtualList.tsx +3 -3
- package/src/css/_assign.ts +3 -0
- package/src/css/_compileStyle.ts +12 -4
- package/src/css/_compileTheme.ts +10 -13
- package/src/css/_composeClassNames.ts +12 -0
- package/src/css/_fromEntries.ts +3 -0
- package/src/css/_getClassNames.ts +9 -0
- package/src/css/_hash.ts +9 -0
- package/src/css/_mergeStyles.ts +1 -1
- package/src/css/_resp.ts +6 -12
- package/src/css/_scopeClassName.ts +9 -0
- package/src/css/_scopeClassNames.ts +12 -0
- package/src/css/_system.style.ts +2 -0
- package/src/css/aspects/border/border.style.ts +2 -2
- package/src/css/aspects/border/border.ts +3 -3
- package/src/css/aspects/border/types.ts +1 -1
- package/src/css/aspects/boxSizing/boxSizing.style.ts +10 -0
- package/src/css/aspects/boxSizing/boxSizing.ts +8 -0
- package/src/css/aspects/boxSizing/index.ts +2 -0
- package/src/css/aspects/boxSizing/types.ts +9 -0
- package/src/css/aspects/display/display.style.ts +8 -8
- package/src/css/aspects/display/display.ts +3 -3
- package/src/css/aspects/display/types.ts +1 -1
- package/src/css/aspects/flex/flex.ts +3 -3
- package/src/css/aspects/flex/types.ts +1 -1
- package/src/css/aspects/flexItem/flex.style.ts +1 -1
- package/src/css/aspects/flexItem/flexItem.ts +3 -3
- package/src/css/aspects/flexItem/types.ts +1 -1
- package/src/css/aspects/font/font.style.ts +33 -22
- package/src/css/aspects/font/font.ts +3 -3
- package/src/css/aspects/font/types.ts +1 -1
- package/src/css/aspects/gap/gap.style.ts +2 -2
- package/src/css/aspects/gap/gap.ts +3 -3
- package/src/css/aspects/gap/types.ts +2 -2
- package/src/css/aspects/grid/grid.ts +3 -3
- package/src/css/aspects/grid/types.ts +1 -1
- package/src/css/aspects/gridItem/gridItem.ts +3 -3
- package/src/css/aspects/gridItem/types.ts +1 -1
- package/src/css/aspects/height/height.ts +3 -3
- package/src/css/aspects/index.ts +1 -0
- package/src/css/aspects/inset/inset.ts +3 -3
- package/src/css/aspects/inset/types.ts +1 -1
- package/src/css/aspects/margin/margin.style.ts +10 -10
- package/src/css/aspects/margin/margin.ts +3 -3
- package/src/css/aspects/margin/types.ts +1 -1
- package/src/css/aspects/maxWidth/maxWidth.style.ts +1 -1
- package/src/css/aspects/maxWidth/maxWidth.ts +4 -3
- package/src/css/aspects/maxWidth/types.ts +2 -2
- package/src/css/aspects/minWidth/minWidth.ts +4 -3
- package/src/css/aspects/minWidth/types.ts +1 -1
- package/src/css/aspects/overflow/overflow.ts +3 -3
- package/src/css/aspects/overflow/types.ts +1 -1
- package/src/css/aspects/padding/padding.style.ts +2 -5
- package/src/css/aspects/padding/padding.ts +3 -3
- package/src/css/aspects/padding/types.ts +2 -2
- package/src/css/aspects/pointerEvents/pointerEvents.ts +3 -3
- package/src/css/aspects/position/position.ts +3 -3
- package/src/css/aspects/position/types.ts +1 -1
- package/src/css/aspects/radius/radius.style.ts +1 -1
- package/src/css/aspects/radius/radius.ts +3 -3
- package/src/css/aspects/radius/types.ts +2 -2
- package/src/css/aspects/shadow/shadow.style.ts +7 -7
- package/src/css/aspects/shadow/shadow.ts +3 -3
- package/src/css/aspects/shadow/types.ts +2 -2
- package/src/css/aspects/textAlign/textAlign.style.ts +1 -1
- package/src/css/aspects/textAlign/textAlign.ts +3 -3
- package/src/css/aspects/textOverflow/textOverflow.ts +3 -3
- package/src/css/aspects/width/types.ts +2 -2
- package/src/css/aspects/width/width.style.ts +1 -1
- package/src/css/aspects/width/width.ts +4 -3
- package/src/css/components/breadcrumbs/breadcrumbs.style.ts +1 -1
- package/src/css/components/breadcrumbs/breadcrumbs.ts +2 -2
- package/src/css/components/dialog/dialog.style.ts +14 -16
- package/src/css/components/dialog/dialog.ts +9 -8
- package/src/css/components/menu/menu.style.ts +2 -2
- package/src/css/components/menu/menu.ts +3 -3
- package/src/css/components/skeleton/skeleton.style.ts +24 -17
- package/src/css/components/skeleton/skeleton.ts +8 -7
- package/src/css/components/skeleton/types.ts +4 -6
- package/src/css/components/toast/toast.style.ts +1 -1
- package/src/css/components/toast/toast.ts +6 -6
- package/src/css/components/tree/tree.style.ts +7 -23
- package/src/css/components/tree/tree.ts +2 -2
- package/src/css/constants.ts +1 -3
- package/src/css/index.ts +3 -5
- package/src/css/prefix/constants.ts +6 -0
- package/src/css/prefix/types.ts +1 -0
- package/src/css/primitives/_arrow/_arrow.style.ts +11 -13
- package/src/css/primitives/_arrow/_arrow.ts +5 -5
- package/src/css/primitives/_input/_input.style.ts +171 -75
- package/src/css/primitives/_input/input.ts +13 -10
- package/src/css/primitives/_input/types.ts +3 -3
- package/src/css/primitives/_selectable/_selectable.style.ts +5 -6
- package/src/css/primitives/_selectable/selectable.ts +4 -3
- package/src/css/primitives/_selectable/types.ts +2 -2
- package/src/css/primitives/avatar/avatar.style.ts +38 -39
- package/src/css/primitives/avatar/avatar.ts +8 -8
- package/src/css/primitives/avatar/types.ts +3 -3
- package/src/css/primitives/badge/badge.style.ts +2 -3
- package/src/css/primitives/badge/badge.ts +7 -3
- package/src/css/primitives/badge/types.ts +2 -2
- package/src/css/primitives/box/box.style.ts +5 -15
- package/src/css/primitives/box/box.ts +7 -9
- package/src/css/primitives/box/types.ts +3 -6
- package/src/css/primitives/button/button.style.ts +189 -162
- package/src/css/primitives/button/button.ts +11 -4
- package/src/css/primitives/button/types.ts +1 -1
- package/src/css/primitives/card/card.style.ts +102 -68
- package/src/css/primitives/card/card.ts +5 -7
- package/src/css/primitives/card/types.ts +2 -2
- package/src/css/primitives/checkbox/checkbox.style.ts +125 -101
- package/src/css/primitives/checkbox/checkbox.ts +3 -3
- package/src/css/primitives/code/code.style.ts +24 -26
- package/src/css/primitives/code/code.ts +7 -3
- package/src/css/primitives/code/types.ts +2 -2
- package/src/css/primitives/container/container.style.ts +1 -1
- package/src/css/primitives/container/container.ts +4 -3
- package/src/css/primitives/container/types.ts +2 -2
- package/src/css/primitives/heading/heading.style.ts +31 -23
- package/src/css/primitives/heading/heading.ts +10 -8
- package/src/css/primitives/heading/types.ts +3 -2
- package/src/css/primitives/kbd/kbd.style.ts +7 -7
- package/src/css/primitives/kbd/kbd.ts +4 -3
- package/src/css/primitives/kbd/types.ts +1 -1
- package/src/css/primitives/label/label.style.ts +27 -24
- package/src/css/primitives/label/label.ts +5 -8
- package/src/css/primitives/label/types.ts +4 -3
- package/src/css/primitives/popover/popover.style.ts +6 -2
- package/src/css/primitives/popover/popover.ts +3 -3
- package/src/css/primitives/radio/radio.style.ts +37 -76
- package/src/css/primitives/radio/radio.ts +2 -2
- package/src/css/primitives/select/select.style.ts +3 -3
- package/src/css/primitives/select/select.ts +5 -5
- package/src/css/primitives/select/types.ts +1 -1
- package/src/css/primitives/spinner/spinner.style.ts +1 -1
- package/src/css/primitives/spinner/spinner.ts +3 -3
- package/src/css/primitives/stack/stack.style.ts +6 -2
- package/src/css/primitives/stack/stack.ts +2 -2
- package/src/css/primitives/switch/switch.style.ts +47 -39
- package/src/css/primitives/switch/switch.ts +6 -6
- package/src/css/primitives/text/text.style.ts +28 -23
- package/src/css/primitives/text/text.ts +5 -8
- package/src/css/primitives/text/types.ts +2 -2
- package/src/css/primitives/textArea/textArea.style.ts +6 -2
- package/src/css/primitives/textArea/textArea.ts +4 -4
- package/src/css/primitives/textArea/types.ts +1 -1
- package/src/css/primitives/textInput/textInput.style.ts +23 -17
- package/src/css/primitives/textInput/textInput.ts +4 -4
- package/src/css/primitives/textInput/types.ts +2 -8
- package/src/css/primitives/token/token.style.ts +4 -4
- package/src/css/primitives/tooltip/tooltip.style.ts +5 -4
- package/src/css/primitives/tooltip/tooltip.ts +3 -3
- package/src/css/renderColor.ts +31 -0
- package/src/css/theme/index.ts +14 -0
- package/src/css/theme/lib/contract/buildVarContract.ts +76 -0
- package/src/css/theme/lib/contract/index.ts +2 -0
- package/src/css/theme/lib/contract/types.ts +15 -0
- package/src/css/theme/resolveTheme.ts +852 -0
- package/src/css/types.ts +26 -910
- package/src/css/utils/srOnly/srOnly.style.ts +1 -1
- package/src/css/utils/srOnly/srOnly.ts +3 -3
- package/src/theme/getScopedTheme.ts +4 -4
- package/src/theme/index.ts +0 -5
- package/src/theme/types.ts +4 -4
- package/src/theme/v0/color/_generic.ts +1 -1
- package/src/theme/v0/color/button.ts +1 -1
- package/src/theme/v0/color/card.ts +1 -1
- package/src/theme/v0/color/color.ts +11 -11
- package/src/theme/v0/color/input.ts +1 -1
- package/src/theme/v0/color/muted.ts +1 -1
- package/src/theme/v0/color/selectable.ts +1 -1
- package/src/theme/v0/color/solid.ts +1 -1
- package/src/theme/v0/color/spot.ts +1 -1
- package/src/theme/v0/styles.ts +1 -1
- package/src/theme/v0/theme.ts +7 -7
- package/src/theme/v2/avatar.ts +1 -1
- package/src/theme/{build → v2/build}/_deprecated/color/_selectable/createSelectableTones.ts +3 -3
- package/src/theme/{build → v2/build}/_deprecated/color/_solid/createSolidTones.ts +2 -2
- package/src/theme/{build → v2/build}/_deprecated/color/button/createButtonModes.ts +7 -2
- package/src/theme/{build → v2/build}/_deprecated/color/button/createButtonTones.ts +4 -4
- package/src/theme/{build → v2/build}/_deprecated/color/card/createCardStates.ts +3 -3
- package/src/theme/{build → v2/build}/_deprecated/color/color.test.ts +1 -1
- package/src/theme/{build → v2/build}/_deprecated/color/defaults.ts +1 -1
- package/src/theme/{build → v2/build}/_deprecated/color/factory.ts +3 -3
- package/src/theme/{build → v2/build}/_deprecated/color/input/createInputModes.ts +7 -2
- package/src/theme/{build → v2/build}/_deprecated/color/muted/createMuted.ts +2 -2
- package/src/theme/{build → v2/build}/_deprecated/color/spot/createSpot.ts +2 -2
- package/src/theme/{build → v2/build}/buildColorTheme.test.ts +3 -1
- package/src/theme/{build → v2/build}/buildColorTheme.ts +24 -24
- package/src/theme/{build → v2/build}/buildTheme.test.ts +10 -8
- package/src/theme/{build → v2/build}/buildTheme.ts +4 -4
- package/src/theme/{build → v2/build}/colorToken/colorToken.ts +2 -2
- package/src/theme/{build → v2/build}/colorToken/compileColorToken.ts +1 -1
- package/src/theme/{build → v2/build}/colorToken/types.ts +2 -2
- package/src/theme/{build → v2/build}/lib/color-fns/blend/mix.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/blend/multiply.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/blend/screen.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/color-fns.test.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/contrastRatio.ts +5 -2
- package/src/theme/{build → v2/build}/lib/color-fns/convert.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/parse.ts +1 -1
- package/src/theme/{build → v2/build}/mixThemeColor.test.ts +2 -0
- package/src/theme/{build → v2/build}/mixThemeColor.ts +1 -1
- package/src/theme/{build → v2/build}/renderColorTheme.ts +27 -27
- package/src/theme/{build → v2/build}/renderColorValue.ts +3 -3
- package/src/theme/{build → v2/build}/resolveColorTokens.ts +13 -13
- package/src/theme/v2/color/_helpers.ts +2 -2
- package/src/theme/v2/color/_system.ts +1 -1
- package/src/theme/v2/color/avatar.ts +1 -1
- package/src/theme/v2/color/badge.ts +1 -1
- package/src/theme/v2/color/button.ts +2 -2
- package/src/theme/v2/color/color.ts +7 -7
- package/src/theme/v2/color/input.ts +5 -1
- package/src/theme/v2/color/selectable.ts +2 -2
- package/src/theme/v2/color/state.ts +4 -4
- package/src/theme/{config → v2/config}/helpers.ts +6 -13
- package/src/theme/{config → v2/config}/system.ts +11 -12
- package/src/theme/{config → v2/config}/tokens/color/types.ts +14 -10
- package/src/theme/{config → v2/config}/tokens/index.ts +0 -1
- package/src/theme/{config → v2/config}/tokens/parseTokenValue.test.ts +2 -0
- package/src/theme/{config → v2/config}/tokens/parseTokenValue.ts +2 -2
- package/src/theme/{config → v2/config}/tokens/types.ts +3 -3
- package/src/theme/{config → v2/config}/types.ts +8 -6
- package/src/theme/{defaults → v2/defaults}/colorPalette.ts +1 -1
- package/src/theme/{defaults → v2/defaults}/colorTokens.ts +1 -1
- package/src/theme/{defaults → v2/defaults}/config.ts +1 -1
- package/src/theme/{defaults → v2/defaults}/fonts.ts +1 -1
- package/src/theme/v2/index.ts +2 -0
- package/src/theme/v2/input.ts +1 -1
- package/src/theme/v2/theme.ts +8 -8
- package/src/theme/{_constants.ts → v3/_constants.ts} +6 -3
- package/src/theme/v3/_parseColorToken.ts +185 -0
- package/src/theme/v3/buildTheme_v3.ts +11 -7
- package/src/theme/v3/color/_constants.ts +15 -0
- package/src/theme/v3/color/avatar.ts +14 -0
- package/src/theme/v3/color/card.ts +53 -53
- package/src/theme/v3/color/color.ts +66 -68
- package/src/theme/v3/color/element.ts +8 -8
- package/src/theme/v3/color/index.ts +2 -2
- package/src/theme/v3/color/token.ts +18 -4
- package/src/theme/v3/color/tokens.ts +2 -2
- package/src/theme/v3/defaultTokens.ts +73 -85
- package/src/theme/v3/index.ts +3 -0
- package/src/theme/v3/palette/index.ts +2 -0
- package/src/theme/v3/resolveTokens.ts +65 -65
- package/src/theme/v3/tokens.ts +2 -2
- package/src/theme/v3/types.ts +61 -7
- package/src/theme/versioning/getTheme_v2.ts +3 -3
- package/src/theme/versioning/is_v0.ts +2 -2
- package/src/theme/versioning/is_v2.ts +2 -2
- package/src/theme/versioning/themeColor_v0_v2.ts +2 -2
- package/src/theme/versioning/themeColor_v2_v2_9.ts +1 -1
- package/src/theme/versioning/themeColor_v3_v2.ts +229 -52
- package/src/theme/versioning/v0_v2.ts +3 -3
- package/src/theme/versioning/v2_v0.ts +4 -4
- package/src/theme/versioning/v3_v2.ts +38 -38
- package/dist/ui-palette.css +0 -105
- package/dist/ui-palette.min.css +0 -1
- package/src/css/_comp.test.ts +0 -7
- package/src/css/_comp.ts +0 -11
- package/src/css/_compilePalette.ts +0 -32
- package/src/css/_compileTheme_v3.ts +0 -440
- package/src/css/aspects/flex/flex.style.ts +0 -30
- package/src/css/composeClassNames.ts +0 -19
- package/src/css/primitives/_selectable/__style.ts +0 -117
- package/src/css/primitives/checkbox/__styles.ts +0 -129
- package/src/css/scopeClassName.ts +0 -7
- package/src/css/varNames.ts +0 -607
- package/src/css/vars.ts +0 -520
- package/src/theme/_types.ts +0 -41
- package/src/theme/build/theme.test.ts +0 -27
- package/src/theme/config/tokens/parseTokenKey.test.ts +0 -64
- package/src/theme/config/tokens/parseTokenKey.ts +0 -67
- package/src/theme/v3/buildTheme_v3.test.ts +0 -40
- package/src/theme/v3/color/buildColor_v3.ts +0 -226
- package/src/theme/v3/color/parseColor.test.ts +0 -79
- package/src/theme/v3/color/parseColor.ts +0 -167
- package/src/theme/v3/color/renderColor.test.ts +0 -20
- package/src/theme/v3/color/renderColor.ts +0 -43
- /package/src/{theme/palette → css/prefix}/index.ts +0 -0
- /package/src/theme/{build → v2/build}/_deprecated/color/index.ts +0 -0
- /package/src/theme/{build → v2/build}/colorToken/index.ts +0 -0
- /package/src/theme/{build → v2/build}/index.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/color-fns/blend/index.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/color-fns/index.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/color-fns/rgba.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/color-fns/types.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/isRecord.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/utils.ts +0 -0
- /package/src/theme/{build → v2/build}/merge.ts +0 -0
- /package/src/theme/{config → v2/config}/index.ts +0 -0
- /package/src/theme/{config → v2/config}/tokens/color/index.ts +0 -0
- /package/src/theme/{palette → v3/palette}/constants.ts +0 -0
- /package/src/theme/{palette → v3/palette}/types.ts +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type {AvatarColor} from '@sanity/ui/theme'
|
|
1
2
|
import {AvatarSize} from '@sanity/ui/theme'
|
|
2
3
|
import {BaseTheme as BaseTheme_2} from '@sanity/ui/theme'
|
|
3
4
|
import {Display as BoxDisplay} from '@sanity/ui/css'
|
|
@@ -5,17 +6,18 @@ import {BoxHeight} from '@sanity/ui/css'
|
|
|
5
6
|
import {BoxOverflow} from '@sanity/ui/css'
|
|
6
7
|
import {BoxSizing} from '@sanity/ui/css'
|
|
7
8
|
import type {BoxStyleProps} from '@sanity/ui/css'
|
|
9
|
+
import {Breakpoint} from '@sanity/ui/css'
|
|
8
10
|
import type {ButtonStyleProps} from '@sanity/ui/css'
|
|
9
|
-
import {CardContextValue as CardContextValue_2} from './types'
|
|
10
11
|
import {CardStyleProps as CardStyleProps_2} from '@sanity/ui/css'
|
|
11
12
|
import {Component} from 'react'
|
|
12
13
|
import type {ComponentClass} from 'react'
|
|
13
14
|
import type {ComponentProps} from 'react'
|
|
14
|
-
import {ComponentType as ComponentType_2} from 'react'
|
|
15
|
+
import type {ComponentType as ComponentType_2} from 'react'
|
|
15
16
|
import {ContainerStyleProps} from '@sanity/ui/css'
|
|
17
|
+
import type {ContainerWidth} from '@sanity/ui/theme'
|
|
16
18
|
import {Context} from 'react'
|
|
17
19
|
import {createColorTheme as createColorTheme_2} from '@sanity/ui/theme'
|
|
18
|
-
import {CSSObject} from '@sanity/ui/theme'
|
|
20
|
+
import type {CSSObject} from '@sanity/ui/theme'
|
|
19
21
|
import type {DisplayStyleProps} from '@sanity/ui/css'
|
|
20
22
|
import {ElementType as ElementType_2} from 'react'
|
|
21
23
|
import {ErrorInfo} from 'react'
|
|
@@ -23,14 +25,14 @@ import type {ExoticComponent} from 'react'
|
|
|
23
25
|
import {FlexAlign} from '@sanity/ui/css'
|
|
24
26
|
import {FlexDirection} from '@sanity/ui/css'
|
|
25
27
|
import {FlexJustify} from '@sanity/ui/css'
|
|
26
|
-
import {FlexStyleProps} from '@sanity/ui/css'
|
|
28
|
+
import type {FlexStyleProps} from '@sanity/ui/css'
|
|
27
29
|
import {FlexValue} from '@sanity/ui/css'
|
|
28
30
|
import {FlexWrap} from '@sanity/ui/css'
|
|
29
|
-
import {FontCodeSize} from '@sanity/ui/theme'
|
|
30
|
-
import {FontHeadingSize} from '@sanity/ui/theme'
|
|
31
|
-
import {FontLabelSize} from '@sanity/ui/theme'
|
|
31
|
+
import type {FontCodeSize} from '@sanity/ui/theme'
|
|
32
|
+
import type {FontHeadingSize} from '@sanity/ui/theme'
|
|
33
|
+
import type {FontLabelSize} from '@sanity/ui/theme'
|
|
32
34
|
import {FontStyleProps} from '@sanity/ui/css'
|
|
33
|
-
import {FontTextSize} from '@sanity/ui/theme'
|
|
35
|
+
import type {FontTextSize} from '@sanity/ui/theme'
|
|
34
36
|
import {ForwardedRef} from 'react'
|
|
35
37
|
import type {FunctionComponent} from 'react'
|
|
36
38
|
import {GapStyleProps} from '@sanity/ui/css'
|
|
@@ -43,7 +45,7 @@ import {GridItemColumnStart} from '@sanity/ui/css'
|
|
|
43
45
|
import {GridItemRow} from '@sanity/ui/css'
|
|
44
46
|
import {GridItemRowEnd} from '@sanity/ui/css'
|
|
45
47
|
import {GridItemRowStart} from '@sanity/ui/css'
|
|
46
|
-
import {GridStyleProps} from '@sanity/ui/css'
|
|
48
|
+
import type {GridStyleProps} from '@sanity/ui/css'
|
|
47
49
|
import {HeadingStyleProps} from '@sanity/ui/css'
|
|
48
50
|
import {hexToRgb as hexToRgb_2} from '@sanity/ui/theme'
|
|
49
51
|
import {HSL as HSL_2} from '@sanity/ui/theme'
|
|
@@ -66,7 +68,7 @@ import {Radius} from '@sanity/ui/theme'
|
|
|
66
68
|
import {RadiusStyleProps} from '@sanity/ui/css'
|
|
67
69
|
import {ReactElement} from 'react'
|
|
68
70
|
import {ReactNode} from 'react'
|
|
69
|
-
import {ReactPortal} from 'react'
|
|
71
|
+
import type {ReactPortal} from 'react'
|
|
70
72
|
import {Ref} from 'react'
|
|
71
73
|
import {RefAttributes} from 'react'
|
|
72
74
|
import {rem} from '@sanity/ui/css'
|
|
@@ -80,18 +82,17 @@ import {screen as screen_3} from '@sanity/ui/theme'
|
|
|
80
82
|
import {SelectStyleProps} from '@sanity/ui/css'
|
|
81
83
|
import {ShadowStyleProps} from '@sanity/ui/css'
|
|
82
84
|
import {SkeletonStyleProps} from '@sanity/ui/css'
|
|
83
|
-
import {Space} from '@sanity/ui/theme'
|
|
85
|
+
import type {Space} from '@sanity/ui/theme'
|
|
84
86
|
import {TextAlign} from '@sanity/ui/css'
|
|
85
87
|
import {TextAreaStyleProps} from '@sanity/ui/css'
|
|
86
88
|
import {TextOverflowStyleProps} from '@sanity/ui/css'
|
|
87
89
|
import {TextStyleProps} from '@sanity/ui/css'
|
|
88
90
|
import {Theme as Theme_2} from '@sanity/ui/theme'
|
|
89
91
|
import {Theme_v2} from '@sanity/ui/theme'
|
|
90
|
-
import {Theme_v3} from '@sanity/ui/theme'
|
|
91
92
|
import {ThemeAvatar} from '@sanity/ui/theme'
|
|
92
93
|
import {ThemeBoxShadow} from '@sanity/ui/theme'
|
|
93
94
|
import {ThemeColor} from '@sanity/ui/theme'
|
|
94
|
-
import {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
|
|
95
|
+
import type {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
|
|
95
96
|
import {ThemeColorBase} from '@sanity/ui/theme'
|
|
96
97
|
import {ThemeColorBuilderOpts} from '@sanity/ui/theme'
|
|
97
98
|
import {ThemeColorButton} from '@sanity/ui/theme'
|
|
@@ -119,7 +120,7 @@ import {ThemeColorSolid} from '@sanity/ui/theme'
|
|
|
119
120
|
import {ThemeColorSolidTone} from '@sanity/ui/theme'
|
|
120
121
|
import {ThemeColorSpot} from '@sanity/ui/theme'
|
|
121
122
|
import {ThemeColorSpotKey} from '@sanity/ui/theme'
|
|
122
|
-
import {ThemeColorStateToneKey} from '@sanity/ui/theme'
|
|
123
|
+
import type {ThemeColorStateToneKey} from '@sanity/ui/theme'
|
|
123
124
|
import {ThemeColorSyntax as ThemeColorSyntax_2} from '@sanity/ui/theme'
|
|
124
125
|
import {ThemeColorToneKey} from '@sanity/ui/theme'
|
|
125
126
|
import {ThemeFont as ThemeFont_2} from '@sanity/ui/theme'
|
|
@@ -381,7 +382,7 @@ export declare interface AvatarOwnProps {
|
|
|
381
382
|
__unstable_hideInnerStroke?: boolean
|
|
382
383
|
animateArrowFrom?: AvatarPosition
|
|
383
384
|
arrowPosition?: AvatarPosition
|
|
384
|
-
color?:
|
|
385
|
+
color?: AvatarColor
|
|
385
386
|
initials?: string
|
|
386
387
|
onImageLoadError?: (event: Error) => void
|
|
387
388
|
size?: ResponsiveProp<AvatarSize>
|
|
@@ -538,6 +539,7 @@ export declare type BoxElementType =
|
|
|
538
539
|
| 'article'
|
|
539
540
|
| 'aside'
|
|
540
541
|
| 'blockquote'
|
|
542
|
+
| 'body'
|
|
541
543
|
| 'button'
|
|
542
544
|
| 'details'
|
|
543
545
|
| 'div'
|
|
@@ -547,6 +549,7 @@ export declare type BoxElementType =
|
|
|
547
549
|
| 'figcaption'
|
|
548
550
|
| 'footer'
|
|
549
551
|
| 'form'
|
|
552
|
+
| 'html'
|
|
550
553
|
| 'iframe'
|
|
551
554
|
| 'kbd'
|
|
552
555
|
| 'label'
|
|
@@ -635,7 +638,7 @@ export declare type ButtonOwnProps = ButtonStyleProps &
|
|
|
635
638
|
'data-ui'?: string
|
|
636
639
|
'disabled'?: boolean
|
|
637
640
|
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
638
|
-
'mode'?:
|
|
641
|
+
'mode'?: ThemeColorButtonModeKey_2
|
|
639
642
|
'icon'?: ElementType_2 | ReactNode
|
|
640
643
|
'iconRight'?: ElementType_2 | ReactNode
|
|
641
644
|
'justify'?: FlexStyleProps['justify']
|
|
@@ -650,7 +653,7 @@ export declare type ButtonOwnProps = ButtonStyleProps &
|
|
|
650
653
|
'text'?: ReactNode
|
|
651
654
|
'textOverflow'?: TextOwnProps['textOverflow']
|
|
652
655
|
'textWeight'?: TextOwnProps['weight']
|
|
653
|
-
'tone'?:
|
|
656
|
+
'tone'?: ThemeColorStateToneKey
|
|
654
657
|
'width'?: ResponsiveProp<Width>
|
|
655
658
|
}
|
|
656
659
|
|
|
@@ -1666,7 +1669,7 @@ export declare interface LayerProviderProps {
|
|
|
1666
1669
|
*/
|
|
1667
1670
|
export declare interface _MediaStore {
|
|
1668
1671
|
subscribe: (onStoreChange: () => void) => () => void
|
|
1669
|
-
getSnapshot: () =>
|
|
1672
|
+
getSnapshot: () => Breakpoint
|
|
1670
1673
|
}
|
|
1671
1674
|
|
|
1672
1675
|
/**
|
|
@@ -1987,7 +1990,7 @@ export declare type PopoverProps<E extends PopoverElementType = PopoverElementTy
|
|
|
1987
1990
|
export declare type PopoverUpdateCallback = () => void
|
|
1988
1991
|
|
|
1989
1992
|
/** @public */
|
|
1990
|
-
export declare type PopoverWidth =
|
|
1993
|
+
export declare type PopoverWidth = Exclude<ContainerWidth, 'auto'>
|
|
1991
1994
|
|
|
1992
1995
|
/** @public */
|
|
1993
1996
|
export declare function Portal(props: PortalProps): ReactPortal | null
|
|
@@ -2432,7 +2435,7 @@ export declare type StackProps<E extends StackElementType = StackElementType> =
|
|
|
2432
2435
|
export declare type Styles = ThemeStyles
|
|
2433
2436
|
|
|
2434
2437
|
/** @beta */
|
|
2435
|
-
export declare function StyleTags(
|
|
2438
|
+
export declare function StyleTags(): ReactNode
|
|
2436
2439
|
|
|
2437
2440
|
export declare namespace StyleTags {
|
|
2438
2441
|
var displayName: string
|
|
@@ -2524,7 +2527,7 @@ export declare type TabOwnProps = {
|
|
|
2524
2527
|
'label'?: ReactNode
|
|
2525
2528
|
'padding'?: ResponsiveProp<Space>
|
|
2526
2529
|
'selected'?: boolean
|
|
2527
|
-
'tone'?:
|
|
2530
|
+
'tone'?: ThemeColorStateToneKey
|
|
2528
2531
|
}
|
|
2529
2532
|
|
|
2530
2533
|
/** @public */
|
|
@@ -3166,7 +3169,7 @@ export declare function useArrayProp<T>(val: T | T[] | undefined, defaultVal?: T
|
|
|
3166
3169
|
/** @public */
|
|
3167
3170
|
export declare function useBoundaryElement(): BoundaryElementContextValue
|
|
3168
3171
|
|
|
3169
|
-
export declare function useCard():
|
|
3172
|
+
export declare function useCard(): CardContextValue | null
|
|
3170
3173
|
|
|
3171
3174
|
/**
|
|
3172
3175
|
* @public
|
|
@@ -3264,7 +3267,7 @@ export declare function useMatchMedia(
|
|
|
3264
3267
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
3265
3268
|
* @beta
|
|
3266
3269
|
*/
|
|
3267
|
-
export declare function useMediaIndex():
|
|
3270
|
+
export declare function useMediaIndex(): Breakpoint
|
|
3268
3271
|
|
|
3269
3272
|
/** @public */
|
|
3270
3273
|
export declare function usePortal(): PortalContextValue
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type {AvatarColor} from '@sanity/ui/theme'
|
|
1
2
|
import {AvatarSize} from '@sanity/ui/theme'
|
|
2
3
|
import {BaseTheme as BaseTheme_2} from '@sanity/ui/theme'
|
|
3
4
|
import {Display as BoxDisplay} from '@sanity/ui/css'
|
|
@@ -5,17 +6,18 @@ import {BoxHeight} from '@sanity/ui/css'
|
|
|
5
6
|
import {BoxOverflow} from '@sanity/ui/css'
|
|
6
7
|
import {BoxSizing} from '@sanity/ui/css'
|
|
7
8
|
import type {BoxStyleProps} from '@sanity/ui/css'
|
|
9
|
+
import {Breakpoint} from '@sanity/ui/css'
|
|
8
10
|
import type {ButtonStyleProps} from '@sanity/ui/css'
|
|
9
|
-
import {CardContextValue as CardContextValue_2} from './types'
|
|
10
11
|
import {CardStyleProps as CardStyleProps_2} from '@sanity/ui/css'
|
|
11
12
|
import {Component} from 'react'
|
|
12
13
|
import type {ComponentClass} from 'react'
|
|
13
14
|
import type {ComponentProps} from 'react'
|
|
14
|
-
import {ComponentType as ComponentType_2} from 'react'
|
|
15
|
+
import type {ComponentType as ComponentType_2} from 'react'
|
|
15
16
|
import {ContainerStyleProps} from '@sanity/ui/css'
|
|
17
|
+
import type {ContainerWidth} from '@sanity/ui/theme'
|
|
16
18
|
import {Context} from 'react'
|
|
17
19
|
import {createColorTheme as createColorTheme_2} from '@sanity/ui/theme'
|
|
18
|
-
import {CSSObject} from '@sanity/ui/theme'
|
|
20
|
+
import type {CSSObject} from '@sanity/ui/theme'
|
|
19
21
|
import type {DisplayStyleProps} from '@sanity/ui/css'
|
|
20
22
|
import {ElementType as ElementType_2} from 'react'
|
|
21
23
|
import {ErrorInfo} from 'react'
|
|
@@ -23,14 +25,14 @@ import type {ExoticComponent} from 'react'
|
|
|
23
25
|
import {FlexAlign} from '@sanity/ui/css'
|
|
24
26
|
import {FlexDirection} from '@sanity/ui/css'
|
|
25
27
|
import {FlexJustify} from '@sanity/ui/css'
|
|
26
|
-
import {FlexStyleProps} from '@sanity/ui/css'
|
|
28
|
+
import type {FlexStyleProps} from '@sanity/ui/css'
|
|
27
29
|
import {FlexValue} from '@sanity/ui/css'
|
|
28
30
|
import {FlexWrap} from '@sanity/ui/css'
|
|
29
|
-
import {FontCodeSize} from '@sanity/ui/theme'
|
|
30
|
-
import {FontHeadingSize} from '@sanity/ui/theme'
|
|
31
|
-
import {FontLabelSize} from '@sanity/ui/theme'
|
|
31
|
+
import type {FontCodeSize} from '@sanity/ui/theme'
|
|
32
|
+
import type {FontHeadingSize} from '@sanity/ui/theme'
|
|
33
|
+
import type {FontLabelSize} from '@sanity/ui/theme'
|
|
32
34
|
import {FontStyleProps} from '@sanity/ui/css'
|
|
33
|
-
import {FontTextSize} from '@sanity/ui/theme'
|
|
35
|
+
import type {FontTextSize} from '@sanity/ui/theme'
|
|
34
36
|
import {ForwardedRef} from 'react'
|
|
35
37
|
import type {FunctionComponent} from 'react'
|
|
36
38
|
import {GapStyleProps} from '@sanity/ui/css'
|
|
@@ -43,7 +45,7 @@ import {GridItemColumnStart} from '@sanity/ui/css'
|
|
|
43
45
|
import {GridItemRow} from '@sanity/ui/css'
|
|
44
46
|
import {GridItemRowEnd} from '@sanity/ui/css'
|
|
45
47
|
import {GridItemRowStart} from '@sanity/ui/css'
|
|
46
|
-
import {GridStyleProps} from '@sanity/ui/css'
|
|
48
|
+
import type {GridStyleProps} from '@sanity/ui/css'
|
|
47
49
|
import {HeadingStyleProps} from '@sanity/ui/css'
|
|
48
50
|
import {hexToRgb as hexToRgb_2} from '@sanity/ui/theme'
|
|
49
51
|
import {HSL as HSL_2} from '@sanity/ui/theme'
|
|
@@ -66,7 +68,7 @@ import {Radius} from '@sanity/ui/theme'
|
|
|
66
68
|
import {RadiusStyleProps} from '@sanity/ui/css'
|
|
67
69
|
import {ReactElement} from 'react'
|
|
68
70
|
import {ReactNode} from 'react'
|
|
69
|
-
import {ReactPortal} from 'react'
|
|
71
|
+
import type {ReactPortal} from 'react'
|
|
70
72
|
import {Ref} from 'react'
|
|
71
73
|
import {RefAttributes} from 'react'
|
|
72
74
|
import {rem} from '@sanity/ui/css'
|
|
@@ -80,18 +82,17 @@ import {screen as screen_3} from '@sanity/ui/theme'
|
|
|
80
82
|
import {SelectStyleProps} from '@sanity/ui/css'
|
|
81
83
|
import {ShadowStyleProps} from '@sanity/ui/css'
|
|
82
84
|
import {SkeletonStyleProps} from '@sanity/ui/css'
|
|
83
|
-
import {Space} from '@sanity/ui/theme'
|
|
85
|
+
import type {Space} from '@sanity/ui/theme'
|
|
84
86
|
import {TextAlign} from '@sanity/ui/css'
|
|
85
87
|
import {TextAreaStyleProps} from '@sanity/ui/css'
|
|
86
88
|
import {TextOverflowStyleProps} from '@sanity/ui/css'
|
|
87
89
|
import {TextStyleProps} from '@sanity/ui/css'
|
|
88
90
|
import {Theme as Theme_2} from '@sanity/ui/theme'
|
|
89
91
|
import {Theme_v2} from '@sanity/ui/theme'
|
|
90
|
-
import {Theme_v3} from '@sanity/ui/theme'
|
|
91
92
|
import {ThemeAvatar} from '@sanity/ui/theme'
|
|
92
93
|
import {ThemeBoxShadow} from '@sanity/ui/theme'
|
|
93
94
|
import {ThemeColor} from '@sanity/ui/theme'
|
|
94
|
-
import {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
|
|
95
|
+
import type {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
|
|
95
96
|
import {ThemeColorBase} from '@sanity/ui/theme'
|
|
96
97
|
import {ThemeColorBuilderOpts} from '@sanity/ui/theme'
|
|
97
98
|
import {ThemeColorButton} from '@sanity/ui/theme'
|
|
@@ -119,7 +120,7 @@ import {ThemeColorSolid} from '@sanity/ui/theme'
|
|
|
119
120
|
import {ThemeColorSolidTone} from '@sanity/ui/theme'
|
|
120
121
|
import {ThemeColorSpot} from '@sanity/ui/theme'
|
|
121
122
|
import {ThemeColorSpotKey} from '@sanity/ui/theme'
|
|
122
|
-
import {ThemeColorStateToneKey} from '@sanity/ui/theme'
|
|
123
|
+
import type {ThemeColorStateToneKey} from '@sanity/ui/theme'
|
|
123
124
|
import {ThemeColorSyntax as ThemeColorSyntax_2} from '@sanity/ui/theme'
|
|
124
125
|
import {ThemeColorToneKey} from '@sanity/ui/theme'
|
|
125
126
|
import {ThemeFont as ThemeFont_2} from '@sanity/ui/theme'
|
|
@@ -381,7 +382,7 @@ export declare interface AvatarOwnProps {
|
|
|
381
382
|
__unstable_hideInnerStroke?: boolean
|
|
382
383
|
animateArrowFrom?: AvatarPosition
|
|
383
384
|
arrowPosition?: AvatarPosition
|
|
384
|
-
color?:
|
|
385
|
+
color?: AvatarColor
|
|
385
386
|
initials?: string
|
|
386
387
|
onImageLoadError?: (event: Error) => void
|
|
387
388
|
size?: ResponsiveProp<AvatarSize>
|
|
@@ -538,6 +539,7 @@ export declare type BoxElementType =
|
|
|
538
539
|
| 'article'
|
|
539
540
|
| 'aside'
|
|
540
541
|
| 'blockquote'
|
|
542
|
+
| 'body'
|
|
541
543
|
| 'button'
|
|
542
544
|
| 'details'
|
|
543
545
|
| 'div'
|
|
@@ -547,6 +549,7 @@ export declare type BoxElementType =
|
|
|
547
549
|
| 'figcaption'
|
|
548
550
|
| 'footer'
|
|
549
551
|
| 'form'
|
|
552
|
+
| 'html'
|
|
550
553
|
| 'iframe'
|
|
551
554
|
| 'kbd'
|
|
552
555
|
| 'label'
|
|
@@ -635,7 +638,7 @@ export declare type ButtonOwnProps = ButtonStyleProps &
|
|
|
635
638
|
'data-ui'?: string
|
|
636
639
|
'disabled'?: boolean
|
|
637
640
|
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
638
|
-
'mode'?:
|
|
641
|
+
'mode'?: ThemeColorButtonModeKey_2
|
|
639
642
|
'icon'?: ElementType_2 | ReactNode
|
|
640
643
|
'iconRight'?: ElementType_2 | ReactNode
|
|
641
644
|
'justify'?: FlexStyleProps['justify']
|
|
@@ -650,7 +653,7 @@ export declare type ButtonOwnProps = ButtonStyleProps &
|
|
|
650
653
|
'text'?: ReactNode
|
|
651
654
|
'textOverflow'?: TextOwnProps['textOverflow']
|
|
652
655
|
'textWeight'?: TextOwnProps['weight']
|
|
653
|
-
'tone'?:
|
|
656
|
+
'tone'?: ThemeColorStateToneKey
|
|
654
657
|
'width'?: ResponsiveProp<Width>
|
|
655
658
|
}
|
|
656
659
|
|
|
@@ -1666,7 +1669,7 @@ export declare interface LayerProviderProps {
|
|
|
1666
1669
|
*/
|
|
1667
1670
|
export declare interface _MediaStore {
|
|
1668
1671
|
subscribe: (onStoreChange: () => void) => () => void
|
|
1669
|
-
getSnapshot: () =>
|
|
1672
|
+
getSnapshot: () => Breakpoint
|
|
1670
1673
|
}
|
|
1671
1674
|
|
|
1672
1675
|
/**
|
|
@@ -1987,7 +1990,7 @@ export declare type PopoverProps<E extends PopoverElementType = PopoverElementTy
|
|
|
1987
1990
|
export declare type PopoverUpdateCallback = () => void
|
|
1988
1991
|
|
|
1989
1992
|
/** @public */
|
|
1990
|
-
export declare type PopoverWidth =
|
|
1993
|
+
export declare type PopoverWidth = Exclude<ContainerWidth, 'auto'>
|
|
1991
1994
|
|
|
1992
1995
|
/** @public */
|
|
1993
1996
|
export declare function Portal(props: PortalProps): ReactPortal | null
|
|
@@ -2432,7 +2435,7 @@ export declare type StackProps<E extends StackElementType = StackElementType> =
|
|
|
2432
2435
|
export declare type Styles = ThemeStyles
|
|
2433
2436
|
|
|
2434
2437
|
/** @beta */
|
|
2435
|
-
export declare function StyleTags(
|
|
2438
|
+
export declare function StyleTags(): ReactNode
|
|
2436
2439
|
|
|
2437
2440
|
export declare namespace StyleTags {
|
|
2438
2441
|
var displayName: string
|
|
@@ -2524,7 +2527,7 @@ export declare type TabOwnProps = {
|
|
|
2524
2527
|
'label'?: ReactNode
|
|
2525
2528
|
'padding'?: ResponsiveProp<Space>
|
|
2526
2529
|
'selected'?: boolean
|
|
2527
|
-
'tone'?:
|
|
2530
|
+
'tone'?: ThemeColorStateToneKey
|
|
2528
2531
|
}
|
|
2529
2532
|
|
|
2530
2533
|
/** @public */
|
|
@@ -3166,7 +3169,7 @@ export declare function useArrayProp<T>(val: T | T[] | undefined, defaultVal?: T
|
|
|
3166
3169
|
/** @public */
|
|
3167
3170
|
export declare function useBoundaryElement(): BoundaryElementContextValue
|
|
3168
3171
|
|
|
3169
|
-
export declare function useCard():
|
|
3172
|
+
export declare function useCard(): CardContextValue | null
|
|
3170
3173
|
|
|
3171
3174
|
/**
|
|
3172
3175
|
* @public
|
|
@@ -3264,7 +3267,7 @@ export declare function useMatchMedia(
|
|
|
3264
3267
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
3265
3268
|
* @beta
|
|
3266
3269
|
*/
|
|
3267
|
-
export declare function useMediaIndex():
|
|
3270
|
+
export declare function useMediaIndex(): Breakpoint
|
|
3268
3271
|
|
|
3269
3272
|
/** @public */
|
|
3270
3273
|
export declare function usePortal(): PortalContextValue
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1
|
|
1
|
+
import { createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1 } from "@sanity/ui/theme";
|
|
2
2
|
import { isHTMLAnchorElement, isHTMLInputElement, isHTMLButtonElement, isHTMLSelectElement, isHTMLTextAreaElement, isHTMLElement, EMPTY_ARRAY, useElementSize, Code, _isEnterToClickElement, Card, Text, useArrayProp, EMPTY_RECORD, Box, Button, Stack, Popover, TextInput, AnimatedSpinnerIcon, useClickOutsideEvent, Flex, containsOrEqualsElement, usePortal, useBoundaryElement, useLayer, useGlobalKeyDown, createGlobalScopedContext, usePrefersReducedMotion, Portal, Z_OFFSETS, Container, Layer, Grid, LayerProvider, isRecord, Selectable } from "./_chunks-es/_visual-editing.js";
|
|
3
3
|
import { Arrow, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, CardProvider, Checkbox, DEFAULT_ARROW_ELEMENT, DEFAULT_AVATAR_COUNTER_ELEMENT, DEFAULT_AVATAR_ELEMENT, DEFAULT_AVATAR_STACK_ELEMENT, DEFAULT_BADGE_ELEMENT, DEFAULT_BOX_ELEMENT, DEFAULT_BUTTON_ELEMENT, DEFAULT_CARD_ELEMENT, DEFAULT_CHECKBOX_ELEMENT, DEFAULT_CODE_ELEMENT, DEFAULT_CONTAINER_ELEMENT, DEFAULT_ELEMENT_QUERY_ELEMENT, DEFAULT_FLEX_ELEMENT, DEFAULT_GRID_ELEMENT, DEFAULT_HEADING_ELEMENT, DEFAULT_HOTKEYS_ELEMENT, DEFAULT_INLINE_ELEMENT, DEFAULT_KBD_ELEMENT, DEFAULT_LABEL_ELEMENT, DEFAULT_LAYER_ELEMENT, DEFAULT_MENU_DIVIDER_ELEMENT, DEFAULT_MENU_ELEMENT, DEFAULT_MENU_GROUP_ELEMENT, DEFAULT_MENU_ITEM_ELEMENT, DEFAULT_POPOVER_ELEMENT, DEFAULT_RADIO_ELEMENT, DEFAULT_SELECT_ELEMENT, DEFAULT_SPINNER_ELEMENT, DEFAULT_SR_ONLY_ELEMENT, DEFAULT_STACK_ELEMENT, DEFAULT_SWITCH_ELEMENT, DEFAULT_TAB_ELEMENT, DEFAULT_TAB_LIST_ELEMENT, DEFAULT_TEXT_AREA_ELEMENT, DEFAULT_TEXT_ELEMENT, DEFAULT_TEXT_INPUT_ELEMENT, DEFAULT_TOOLTIP_ELEMENT, DEFAULT_VIRTUAL_LIST_ELEMENT, ElementQuery, Heading, Hotkeys, Inline, KBD, Label, Menu, MenuDivider, MenuGroup, MenuItem, PortalProvider, Radio, Select, Spinner, SrOnly, Switch, Tab, TabList, TextArea, ThemeColorProvider, ThemeProvider, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupProvider, VirtualList, _ResizeObserver, _elementSizeObserver, _getArrayProp, _isScrollable, useCard, useCustomValidity, useMatchMedia, useMediaIndex, usePrefersDark, useRootTheme, useTheme, useTheme_v2, useTooltipDelayGroup } from "./_chunks-es/_visual-editing.js";
|
|
4
4
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
5
5
|
import { ChevronDownIcon, CloseIcon, ToggleArrowRightIcon } from "@sanity/icons";
|
|
6
6
|
import { useState, useRef, useEffect, useImperativeHandle, Component, useReducer, useCallback, useMemo, cloneElement, Children, isValidElement, Fragment, useContext, useSyncExternalStore, startTransition, memo, useId } from "react";
|
|
7
7
|
import { c } from "react-compiler-runtime";
|
|
8
|
-
import {
|
|
8
|
+
import { _composeClassNames, breadcrumbs, dialogCardRoot, dialogLayout, dialogHeader, dialogContent, dialogFooter, dialog, dialogContainer, skeleton, codeSkeleton, headingSkeleton, labelSkeleton, textSkeleton, toast, toastLoadingBar, toastLoadingBarMask, toastLoadingBarProgress, toastLayer, vars, treeItem, _compileTheme, _compileSystem } from "@sanity/ui/css";
|
|
9
9
|
import { px, rem } from "@sanity/ui/css";
|
|
10
10
|
import { motion, AnimatePresence } from "framer-motion";
|
|
11
11
|
const createColorTheme = createColorTheme$1, hexToRgb = hexToRgb$1, hslToRgb = hslToRgb$1, multiply = multiply$1, parseColor = parseColor$1, rgbToHex = rgbToHex$1, rgbToHsl = rgbToHsl$1, rgba = rgba$1, screen = screen$1;
|
|
@@ -383,7 +383,7 @@ function Autocomplete(props) {
|
|
|
383
383
|
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
|
|
384
384
|
}, [openButtonProps, dispatchOpen]), openButtonNode = useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsx(Button, { "aria-label": "Open", disabled: expanded, display: "block", fontSize, icon: ChevronDownIcon, mode: "bleed", padding: openButtonPadding, ...openButtonProps, onClick: handleOpenClick }) }) : void 0, [disabled, expanded, fontSize, handleOpenClick, openButton, openButtonBoxPadding, openButtonPadding, openButtonProps, readOnly]), inputValue = useMemo(() => query === null ? value !== null ? renderValue(value, currentOption) : "" : query, [currentOption, query, renderValue, value]), input = /* @__PURE__ */ jsx(TextInput, { ...rest, "aria-activedescendant": activeItemId, "aria-autocomplete": "list", "aria-expanded": expanded, "aria-owns": listBoxId, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", as, border, clearButton, customValidity, disabled, fontSize, icon, iconRight: loading && AnimatedSpinnerIcon, id, inputMode: "search", onChange: handleInputChange, onClear: handleClearButtonClick, onFocus: handleInputFocus, padding, prefix, radius, readOnly, ref: inputElementRef, role: "combobox", spellCheck: !1, suffix: suffix || openButtonNode, value: inputValue }), handleListBoxKeyDown = useCallback((event_5) => {
|
|
385
385
|
event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
|
|
386
|
-
}, [listFocused]), content2 = useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsx(Box, { "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1, ...listBox, tabIndex: -1, children: /* @__PURE__ */ jsx(Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", id: listBoxId, ref: listBoxElementRef, role: "listbox",
|
|
386
|
+
}, [listFocused]), content2 = useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsx(Box, { "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1, ...listBox, tabIndex: -1, children: /* @__PURE__ */ jsx(Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", gap: 1, id: listBoxId, ref: listBoxElementRef, role: "listbox", children: filteredOptions.map((option_0) => {
|
|
387
387
|
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
388
388
|
return /* @__PURE__ */ jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: cloneElement(renderOption(option_0), {
|
|
389
389
|
disabled: loading,
|
|
@@ -428,11 +428,11 @@ function Breadcrumbs(props) {
|
|
|
428
428
|
const len = rawItems.length;
|
|
429
429
|
if (maxLength && len > maxLength) {
|
|
430
430
|
const beforeLength = Math.ceil(maxLength / 2), afterLength = Math.floor(maxLength / 2);
|
|
431
|
-
return [...rawItems.slice(0, beforeLength - 1), /* @__PURE__ */ jsx(Popover, { constrainSize: !0, content: /* @__PURE__ */ jsx(Stack, { as: "ol", overflow: "auto",
|
|
431
|
+
return [...rawItems.slice(0, beforeLength - 1), /* @__PURE__ */ jsx(Popover, { constrainSize: !0, content: /* @__PURE__ */ jsx(Stack, { as: "ol", gap: gapY, overflow: "auto", children: rawItems.slice(beforeLength - 1, len - afterLength) }), open, padding: 2, placement: "top", portal: !0, ref: popoverElementRef, children: /* @__PURE__ */ jsx(Button, { mode: "bleed", padding: 0, text: "\u2026", ...expandButtonProps, onClick: open ? collapse : expand, ref: expandElementRef, selected: open }) }, "button"), ...rawItems.slice(len - afterLength)];
|
|
432
432
|
}
|
|
433
433
|
return rawItems;
|
|
434
434
|
}, [collapse, expand, expandButtonProps, gapY, maxLength, open, rawItems]);
|
|
435
|
-
return /* @__PURE__ */ jsx(Flex, { as, "data-ui": "Breadcrumbs", ...rest, className:
|
|
435
|
+
return /* @__PURE__ */ jsx(Flex, { as, "data-ui": "Breadcrumbs", ...rest, className: _composeClassNames(className, breadcrumbs()), gapX, gapY, children: items.map((item, itemIndex) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
436
436
|
itemIndex > 0 && /* @__PURE__ */ jsx(Box, { "aria-hidden": !0, as: "li", children: separator || /* @__PURE__ */ jsx(Text, { muted: !0, children: "/" }) }),
|
|
437
437
|
/* @__PURE__ */ jsx(Box, { as: "li", children: item })
|
|
438
438
|
] }, itemIndex)) });
|
|
@@ -578,7 +578,7 @@ function Dialog(props) {
|
|
|
578
578
|
}, $[26] = boundaryElement, $[27] = portalElement, $[28] = t9) : t9 = $[28];
|
|
579
579
|
const handleRootClick = t9;
|
|
580
580
|
let t10;
|
|
581
|
-
$[29] !== className ? (t10 =
|
|
581
|
+
$[29] !== className ? (t10 = _composeClassNames(className, dialog()), $[29] = className, $[30] = t10) : t10 = $[30];
|
|
582
582
|
const t11 = animate ? "" : void 0;
|
|
583
583
|
let t12;
|
|
584
584
|
$[31] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsx("div", { ref: preDivRef, tabIndex: 0 }), $[31] = t12) : t12 = $[31];
|
|
@@ -788,7 +788,7 @@ function Skeleton(props) {
|
|
|
788
788
|
};
|
|
789
789
|
}, t3 = [delay], $[6] = delay, $[7] = t2, $[8] = t3) : (t2 = $[7], t3 = $[8]), useEffect(t2, t3);
|
|
790
790
|
let t4;
|
|
791
|
-
$[9] !== className || $[10] !== radius ? (t4 =
|
|
791
|
+
$[9] !== className || $[10] !== radius ? (t4 = _composeClassNames(className, skeleton({
|
|
792
792
|
radius
|
|
793
793
|
})), $[9] = className, $[10] = radius, $[11] = t4) : t4 = $[11];
|
|
794
794
|
const t5 = animated ? "" : void 0, t6 = visible ? "" : void 0;
|
|
@@ -807,7 +807,7 @@ function CodeSkeleton(props) {
|
|
|
807
807
|
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
|
|
808
808
|
const size = t1 === void 0 ? 2 : t1;
|
|
809
809
|
let t2;
|
|
810
|
-
$[4] !== className || $[5] !== size ? (t2 =
|
|
810
|
+
$[4] !== className || $[5] !== size ? (t2 = _composeClassNames(className, codeSkeleton({
|
|
811
811
|
size
|
|
812
812
|
})), $[4] = className, $[5] = size, $[6] = t2) : t2 = $[6];
|
|
813
813
|
let t3;
|
|
@@ -825,7 +825,7 @@ function HeadingSkeleton(props) {
|
|
|
825
825
|
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
|
|
826
826
|
const size = t1 === void 0 ? 2 : t1;
|
|
827
827
|
let t2;
|
|
828
|
-
$[4] !== className || $[5] !== size ? (t2 =
|
|
828
|
+
$[4] !== className || $[5] !== size ? (t2 = _composeClassNames(className, headingSkeleton({
|
|
829
829
|
size
|
|
830
830
|
})), $[4] = className, $[5] = size, $[6] = t2) : t2 = $[6];
|
|
831
831
|
let t3;
|
|
@@ -843,7 +843,7 @@ function LabelSkeleton(props) {
|
|
|
843
843
|
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
|
|
844
844
|
const size = t1 === void 0 ? 2 : t1;
|
|
845
845
|
let t2;
|
|
846
|
-
$[4] !== className || $[5] !== size ? (t2 =
|
|
846
|
+
$[4] !== className || $[5] !== size ? (t2 = _composeClassNames(className, labelSkeleton({
|
|
847
847
|
size
|
|
848
848
|
})), $[4] = className, $[5] = size, $[6] = t2) : t2 = $[6];
|
|
849
849
|
let t3;
|
|
@@ -861,7 +861,7 @@ function TextSkeleton(props) {
|
|
|
861
861
|
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
|
|
862
862
|
const size = t1 === void 0 ? 2 : t1;
|
|
863
863
|
let t2;
|
|
864
|
-
$[4] !== className || $[5] !== size ? (t2 =
|
|
864
|
+
$[4] !== className || $[5] !== size ? (t2 = _composeClassNames(className, textSkeleton({
|
|
865
865
|
size
|
|
866
866
|
})), $[4] = className, $[5] = size, $[6] = t2) : t2 = $[6];
|
|
867
867
|
let t3;
|
|
@@ -870,15 +870,17 @@ function TextSkeleton(props) {
|
|
|
870
870
|
TextSkeleton.displayName = "TextSkeleton";
|
|
871
871
|
const DEFAULT_TAB_PANEL_ELEMENT = "div";
|
|
872
872
|
function TabPanel(props) {
|
|
873
|
-
const $ = c(
|
|
874
|
-
let rest, t1;
|
|
873
|
+
const $ = c(10), t0 = props;
|
|
874
|
+
let children, rest, t1, tabIndex;
|
|
875
875
|
$[0] !== t0 ? ({
|
|
876
876
|
as: t1,
|
|
877
|
+
children,
|
|
878
|
+
tabIndex,
|
|
877
879
|
...rest
|
|
878
|
-
} = t0, $[0] = t0, $[1] =
|
|
879
|
-
const as = t1 === void 0 ? DEFAULT_TAB_PANEL_ELEMENT : t1, t2 =
|
|
880
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = rest, $[3] = t1, $[4] = tabIndex) : (children = $[1], rest = $[2], t1 = $[3], tabIndex = $[4]);
|
|
881
|
+
const as = t1 === void 0 ? DEFAULT_TAB_PANEL_ELEMENT : t1, t2 = tabIndex === void 0 ? 0 : tabIndex;
|
|
880
882
|
let t3;
|
|
881
|
-
return $[
|
|
883
|
+
return $[5] !== as || $[6] !== children || $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Box, { "data-ui": "TabPanel", ...rest, as, role: "tabpanel", tabIndex: t2, children }), $[5] = as, $[6] = children, $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
|
|
882
884
|
}
|
|
883
885
|
TabPanel.displayName = "TabPanel";
|
|
884
886
|
const DEFAULT_TOAST_ELEMENT = "li", ROLES = {
|
|
@@ -939,7 +941,7 @@ function Toast(props) {
|
|
|
939
941
|
let t10;
|
|
940
942
|
$[19] !== description || $[20] !== transition ? (t10 = description && /* @__PURE__ */ jsx(MotionText, { muted: !0, size: 1, variants: content, transition, children: description }), $[19] = description, $[20] = transition, $[21] = t10) : t10 = $[21];
|
|
941
943
|
let t11;
|
|
942
|
-
$[22] !== t10 || $[23] !== t9 ? (t11 = /* @__PURE__ */ jsx(Flex, { flex: 1, overflowX: "auto", padding: 3, children: /* @__PURE__ */ jsxs(Stack, {
|
|
944
|
+
$[22] !== t10 || $[23] !== t9 ? (t11 = /* @__PURE__ */ jsx(Flex, { flex: 1, overflowX: "auto", padding: 3, children: /* @__PURE__ */ jsxs(Stack, { gap: 3, children: [
|
|
943
945
|
t9,
|
|
944
946
|
t10
|
|
945
947
|
] }) }), $[22] = t10, $[23] = t9, $[24] = t11) : t11 = $[24];
|
|
@@ -1393,42 +1395,28 @@ function TreeItem(props) {
|
|
|
1393
1395
|
] }),
|
|
1394
1396
|
/* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(Text, { muted, size: fontSize, textOverflow: "ellipsis", weight, children: text }) })
|
|
1395
1397
|
] });
|
|
1396
|
-
return href ? /* @__PURE__ */ jsxs(Box, { "data-selected": selected ? "" : void 0, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...rest, as: "li", className:
|
|
1398
|
+
return href ? /* @__PURE__ */ jsxs(Box, { "data-selected": selected ? "" : void 0, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...rest, as: "li", className: _composeClassNames(className, treeItem()), onClick: handleClick, ref: rootRef, role: "none", children: [
|
|
1397
1399
|
/* @__PURE__ */ jsx(Selectable, { "aria-expanded": expanded, as: linkAs, "data-pressed": selected ? "" : void 0, "data-ui": "TreeItem__box", href, radius, ref: treeitemRef, role: "treeitem", tabIndex, style: {
|
|
1398
|
-
paddingLeft: `calc(
|
|
1400
|
+
paddingLeft: `calc(${vars.space[2]} * ${tree.level})`
|
|
1399
1401
|
}, children: content2 }),
|
|
1400
1402
|
/* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsx(TreeGroup, { hidden: !expanded, children }) })
|
|
1401
|
-
] }) : /* @__PURE__ */ jsxs(Box, { "data-selected": selected ? "" : void 0, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...rest, "aria-expanded": expanded, className:
|
|
1403
|
+
] }) : /* @__PURE__ */ jsxs(Box, { "data-selected": selected ? "" : void 0, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...rest, "aria-expanded": expanded, className: _composeClassNames(className, treeItem()), onClick: handleClick, onKeyDown: handleKeyDown, ref: rootRef, role: "treeitem", tabIndex, children: [
|
|
1402
1404
|
/* @__PURE__ */ jsx(Selectable, { as: "button", "data-pressed": selected ? "" : void 0, "data-ui": "TreeItem__box", radius, style: {
|
|
1403
|
-
paddingLeft: `calc(
|
|
1405
|
+
paddingLeft: `calc(${vars.space[2]} * ${tree.level})`
|
|
1404
1406
|
}, children: content2 }),
|
|
1405
1407
|
/* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsx(TreeGroup, { expanded, children }) })
|
|
1406
1408
|
] });
|
|
1407
1409
|
}
|
|
1408
1410
|
TreeItem.displayName = "TreeItem";
|
|
1409
|
-
function StyleTags(
|
|
1410
|
-
const $ = c(
|
|
1411
|
-
theme: themeProp
|
|
1412
|
-
} = props;
|
|
1411
|
+
function StyleTags() {
|
|
1412
|
+
const $ = c(2);
|
|
1413
1413
|
let t0;
|
|
1414
|
-
$[0]
|
|
1415
|
-
const theme = t0;
|
|
1414
|
+
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsx("style", { href: "sanity-theme", precedence: "theme", children: _compileTheme() }), $[0] = t0) : t0 = $[0];
|
|
1416
1415
|
let t1;
|
|
1417
|
-
$[
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
}), $[3] = theme, $[4] = t2) : t2 = $[4];
|
|
1422
|
-
let t3;
|
|
1423
|
-
$[5] !== t2 ? (t3 = /* @__PURE__ */ jsx("style", { href: "sanity-theme", precedence: "theme", children: t2 }), $[5] = t2, $[6] = t3) : t3 = $[6];
|
|
1424
|
-
let t4;
|
|
1425
|
-
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = /* @__PURE__ */ jsx("style", { href: "sanity-system", precedence: "system", children: _compileSystem() }), $[7] = t4) : t4 = $[7];
|
|
1426
|
-
let t5;
|
|
1427
|
-
return $[8] !== t3 ? (t5 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1428
|
-
t1,
|
|
1429
|
-
t3,
|
|
1430
|
-
t4
|
|
1431
|
-
] }), $[8] = t3, $[9] = t5) : t5 = $[9], t5;
|
|
1416
|
+
return $[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1417
|
+
t0,
|
|
1418
|
+
/* @__PURE__ */ jsx("style", { href: "sanity-system", precedence: "system", children: _compileSystem() })
|
|
1419
|
+
] }), $[1] = t1) : t1 = $[1], t1;
|
|
1432
1420
|
}
|
|
1433
1421
|
StyleTags.displayName = "StyleTags";
|
|
1434
1422
|
export {
|