@sanity/ui 4.0.0-static.9 → 4.0.0
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/LICENSE +1 -1
- package/README.md +25 -7
- package/dist/_system-CTe2lb5l.d.ts +40 -0
- package/dist/_system-CTe2lb5l.d.ts.map +1 -0
- package/dist/arrow-CHE8-_G7.js +161 -0
- package/dist/arrow-CHE8-_G7.js.map +1 -0
- package/dist/autocomplete.d.ts +140 -0
- package/dist/autocomplete.d.ts.map +1 -0
- package/dist/autocomplete.js +475 -0
- package/dist/autocomplete.js.map +1 -0
- package/dist/breadcrumbs.d.ts +18 -0
- package/dist/breadcrumbs.d.ts.map +1 -0
- package/dist/breadcrumbs.js +116 -0
- package/dist/breadcrumbs.js.map +1 -0
- package/dist/button-dnqMFkWg.d.ts +76 -0
- package/dist/button-dnqMFkWg.d.ts.map +1 -0
- package/dist/button-mxfSqr0n.js +179 -0
- package/dist/button-mxfSqr0n.js.map +1 -0
- package/dist/card-C0a0wQTc.d.ts +7 -0
- package/dist/card-C0a0wQTc.d.ts.map +1 -0
- package/dist/code.d.ts +20 -0
- package/dist/code.d.ts.map +1 -0
- package/dist/code.js +90 -0
- package/dist/code.js.map +1 -0
- package/dist/codeFontStyle-DYUujk7K.js +11 -0
- package/dist/codeFontStyle-DYUujk7K.js.map +1 -0
- package/dist/component-DVlwaWB-.d.ts +25 -0
- package/dist/component-DVlwaWB-.d.ts.map +1 -0
- package/dist/element-BYgCE_iK.js +51 -0
- package/dist/element-BYgCE_iK.js.map +1 -0
- package/dist/factory-BA3gEfyI.js +3056 -0
- package/dist/factory-BA3gEfyI.js.map +1 -0
- package/dist/flex-C-5JHi1C.js +76 -0
- package/dist/flex-C-5JHi1C.js.map +1 -0
- package/dist/font-EtfxKPUz.d.ts +49 -0
- package/dist/font-EtfxKPUz.d.ts.map +1 -0
- package/dist/getElementRef-5HZQ-Owu.js +91 -0
- package/dist/getElementRef-5HZQ-Owu.js.map +1 -0
- package/dist/getScopedTheme-C-sZsyAz.js +267 -0
- package/dist/getScopedTheme-C-sZsyAz.js.map +1 -0
- package/dist/getTheme_v2-y09KqtEb.js +487 -0
- package/dist/getTheme_v2-y09KqtEb.js.map +1 -0
- package/dist/grid-BXHFJhf_.js +115 -0
- package/dist/grid-BXHFJhf_.js.map +1 -0
- package/dist/helpers-bwfx1e-Y.js +67 -0
- package/dist/helpers-bwfx1e-Y.js.map +1 -0
- package/dist/hotkeys-CmmTQZpn.js +165 -0
- package/dist/hotkeys-CmmTQZpn.js.map +1 -0
- package/dist/index.d.ts +1192 -2168
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2069 -4483
- package/dist/index.js.map +1 -1
- package/dist/layer-B98ynOf2.js +61 -0
- package/dist/layer-B98ynOf2.js.map +1 -0
- package/dist/layer-ChlP9Ik6.d.ts +242 -0
- package/dist/layer-ChlP9Ik6.d.ts.map +1 -0
- package/dist/menu.d.ts +146 -0
- package/dist/menu.d.ts.map +1 -0
- package/dist/menu.js +614 -0
- package/dist/menu.js.map +1 -0
- package/dist/popover-CMlQeKn0.d.ts +96 -0
- package/dist/popover-CMlQeKn0.d.ts.map +1 -0
- package/dist/popover-PorX5Jv9.js +419 -0
- package/dist/popover-PorX5Jv9.js.map +1 -0
- package/dist/popover.d.ts +2 -0
- package/dist/popover.js +3 -0
- package/dist/refractor-CC48DwHi.js +20 -0
- package/dist/refractor-CC48DwHi.js.map +1 -0
- package/dist/responsiveFont-hN1mZFjm.js +55 -0
- package/dist/responsiveFont-hN1mZFjm.js.map +1 -0
- package/dist/rgba-BSYaEUW6.d.ts +846 -0
- package/dist/rgba-BSYaEUW6.d.ts.map +1 -0
- package/dist/selectable-B0GUIL74.d.ts +7 -0
- package/dist/selectable-B0GUIL74.d.ts.map +1 -0
- package/dist/stack-iW9HuGLg.js +112 -0
- package/dist/stack-iW9HuGLg.js.map +1 -0
- package/dist/styles-css.d.ts +2 -0
- package/dist/styles-css.js +4 -0
- package/dist/styles.css +28 -0
- package/dist/textInput-udxyGbm1.js +321 -0
- package/dist/textInput-udxyGbm1.js.map +1 -0
- package/dist/theme.d.ts +240 -459
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +55 -870
- package/dist/theme.js.map +1 -1
- package/dist/toast.d.ts +73 -0
- package/dist/toast.d.ts.map +1 -0
- package/dist/toast.js +297 -0
- package/dist/toast.js.map +1 -0
- package/dist/tooltip.d.ts +88 -0
- package/dist/tooltip.d.ts.map +1 -0
- package/dist/tooltip.js +447 -0
- package/dist/tooltip.js.map +1 -0
- package/dist/useClickOutsideEvent-lEVhDFCQ.js +36 -0
- package/dist/useClickOutsideEvent-lEVhDFCQ.js.map +1 -0
- package/dist/useElementSize-BJvbGHq8.js +51 -0
- package/dist/useElementSize-BJvbGHq8.js.map +1 -0
- package/dist/useLayer-BAVfmbNN.js +712 -0
- package/dist/useLayer-BAVfmbNN.js.map +1 -0
- package/package.json +73 -208
- package/dist/_chunks-cjs/refractor.cjs +0 -22
- package/dist/_chunks-cjs/refractor.cjs.map +0 -1
- package/dist/_chunks-es/refractor.js +0 -25
- package/dist/_chunks-es/refractor.js.map +0 -1
- package/dist/css/index.cjs +0 -966
- package/dist/css/index.cjs.map +0 -1
- package/dist/css/index.css +0 -23387
- package/dist/css/index.css.map +0 -1
- package/dist/css/index.d.cts +0 -1394
- package/dist/css/index.d.ts +0 -1394
- package/dist/css/index.js +0 -967
- package/dist/css/index.js.map +0 -1
- package/dist/index.cjs +0 -4515
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -2521
- package/dist/theme.cjs +0 -870
- package/dist/theme.cjs.map +0 -1
- package/dist/theme.d.cts +0 -499
- package/exports/css.ts +0 -1
- package/exports/index.ts +0 -1
- package/exports/theme.ts +0 -1
- package/src/core/Root.tsx +0 -88
- package/src/core/RootProvider.tsx +0 -40
- package/src/core/__workshop__/boundary.tsx +0 -28
- package/src/core/__workshop__/index.ts +0 -16
- package/src/core/components/autocomplete/__workshop__/async.tsx +0 -156
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -131
- package/src/core/components/autocomplete/__workshop__/custom.tsx +0 -91
- package/src/core/components/autocomplete/__workshop__/example.tsx +0 -80
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -36
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +0 -292
- package/src/core/components/autocomplete/__workshop__/index.ts +0 -41
- package/src/core/components/autocomplete/__workshop__/mock/apiStore.ts +0 -49
- package/src/core/components/autocomplete/__workshop__/mock/countries.ts +0 -245
- package/src/core/components/autocomplete/__workshop__/types.ts +0 -4
- package/src/core/components/autocomplete/autocomplete.tsx +0 -690
- package/src/core/components/autocomplete/autocompleteOption.tsx +0 -45
- package/src/core/components/autocomplete/autocompleteReducer.ts +0 -47
- package/src/core/components/autocomplete/constants.ts +0 -28
- package/src/core/components/autocomplete/types.ts +0 -103
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +0 -61
- package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -16
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +0 -131
- package/src/core/components/dialog/__workshop__/activate.tsx +0 -141
- package/src/core/components/dialog/__workshop__/autoFocus.tsx +0 -29
- package/src/core/components/dialog/__workshop__/index.ts +0 -21
- package/src/core/components/dialog/__workshop__/layering.tsx +0 -41
- package/src/core/components/dialog/__workshop__/nested.tsx +0 -71
- package/src/core/components/dialog/__workshop__/onScroll.tsx +0 -51
- package/src/core/components/dialog/__workshop__/panes.tsx +0 -89
- package/src/core/components/dialog/__workshop__/position.tsx +0 -30
- package/src/core/components/dialog/__workshop__/props.tsx +0 -77
- package/src/core/components/dialog/__workshop__/provider.tsx +0 -11
- package/src/core/components/dialog/__workshop__/wrapped.tsx +0 -76
- package/src/core/components/dialog/dialog.tsx +0 -232
- package/src/core/components/dialog/dialogCard.tsx +0 -233
- package/src/core/components/dialog/dialogContext.ts +0 -21
- package/src/core/components/dialog/dialogProvider.tsx +0 -34
- package/src/core/components/dialog/isTargetWithinScope.ts +0 -14
- package/src/core/components/dialog/types.ts +0 -2
- package/src/core/components/dialog/useDialog.ts +0 -11
- package/src/core/components/hotkeys/__workshop__/index.ts +0 -16
- package/src/core/components/hotkeys/__workshop__/plain.tsx +0 -9
- package/src/core/components/hotkeys/hotkeys.tsx +0 -60
- package/src/core/components/menu/__workshop__/asComponent.tsx +0 -45
- package/src/core/components/menu/__workshop__/avatarMenu.tsx +0 -57
- package/src/core/components/menu/__workshop__/closableMenuButton.tsx +0 -47
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +0 -133
- package/src/core/components/menu/__workshop__/customMenuItem.tsx +0 -45
- package/src/core/components/menu/__workshop__/customSelectedState.tsx +0 -35
- 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 -91
- 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 -50
- package/src/core/components/menu/__workshop__/selectedItem.tsx +0 -69
- package/src/core/components/menu/__workshop__/shouldFocus.tsx +0 -42
- package/src/core/components/menu/__workshop__/tones.tsx +0 -25
- package/src/core/components/menu/__workshop__/withoutArrow.tsx +0 -32
- package/src/core/components/menu/helpers.ts +0 -82
- package/src/core/components/menu/menu.test.tsx +0 -129
- package/src/core/components/menu/menu.tsx +0 -179
- package/src/core/components/menu/menuButton.tsx +0 -225
- package/src/core/components/menu/menuContext.ts +0 -19
- package/src/core/components/menu/menuDivider.tsx +0 -32
- package/src/core/components/menu/menuGroup.tsx +0 -233
- package/src/core/components/menu/menuItem.tsx +0 -184
- package/src/core/components/menu/useMenu.ts +0 -21
- package/src/core/components/menu/useMenuController.ts +0 -241
- package/src/core/components/tab/__workshop__/example.tsx +0 -79
- package/src/core/components/tab/__workshop__/index.ts +0 -16
- package/src/core/components/tab/tab.tsx +0 -109
- package/src/core/components/tab/tabList.tsx +0 -90
- package/src/core/components/tab/tabPanel.tsx +0 -47
- package/src/core/components/toast/__workshop__/hook.tsx +0 -71
- package/src/core/components/toast/__workshop__/index.ts +0 -21
- package/src/core/components/toast/__workshop__/toast.tsx +0 -26
- package/src/core/components/toast/toast.test.tsx +0 -103
- package/src/core/components/toast/toast.tsx +0 -191
- package/src/core/components/toast/toastContext.ts +0 -7
- package/src/core/components/toast/toastLayer.tsx +0 -54
- package/src/core/components/toast/toastProvider.tsx +0 -112
- package/src/core/components/toast/toastState.ts +0 -6
- package/src/core/components/toast/types.ts +0 -24
- package/src/core/components/toast/useToast.ts +0 -23
- 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 -23
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +0 -84
- package/src/core/components/tree/helpers.ts +0 -105
- package/src/core/components/tree/tree.tsx +0 -248
- package/src/core/components/tree/treeContext.ts +0 -10
- package/src/core/components/tree/treeGroup.tsx +0 -46
- package/src/core/components/tree/treeItem.tsx +0 -237
- package/src/core/components/tree/types.ts +0 -24
- package/src/core/components/tree/useTree.ts +0 -17
- package/src/core/components/virtualList/__workshop__/changingProps.tsx +0 -36
- package/src/core/components/virtualList/__workshop__/elementScroll.tsx +0 -24
- package/src/core/components/virtualList/__workshop__/index.ts +0 -31
- package/src/core/components/virtualList/__workshop__/infiniteList.tsx +0 -48
- package/src/core/components/virtualList/__workshop__/windowScrolll.tsx +0 -22
- package/src/core/components/virtualList/virtualList.tsx +0 -209
- package/src/core/constants.ts +0 -67
- package/src/core/helpers/animation.ts +0 -27
- package/src/core/helpers/element.ts +0 -55
- package/src/core/helpers/focus.ts +0 -92
- package/src/core/helpers/props.ts +0 -28
- package/src/core/helpers/scroll.ts +0 -15
- package/src/core/hooks/useClickOutsideEvent.test.tsx +0 -114
- package/src/core/hooks/useClickOutsideEvent.ts +0 -67
- package/src/core/hooks/useCustomValidity.ts +0 -13
- package/src/core/hooks/useDelayed.test.ts +0 -67
- package/src/core/hooks/useDelayedState.ts +0 -28
- package/src/core/hooks/useElementSize.ts +0 -19
- package/src/core/hooks/useGlobalKeyDown.ts +0 -17
- package/src/core/hooks/useMatchMedia.ts +0 -28
- package/src/core/hooks/useMediaIndex/__workshop__/index.ts +0 -16
- package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +0 -14
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -21
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +0 -107
- package/src/core/hooks/useMounted.ts +0 -15
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +0 -56
- package/src/core/hooks/usePrefersDark.test.tsx +0 -20
- package/src/core/hooks/usePrefersDark.ts +0 -16
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -56
- package/src/core/hooks/usePrefersReducedMotion.test.tsx +0 -20
- package/src/core/hooks/usePrefersReducedMotion.ts +0 -16
- package/src/core/hooks/useResponsiveProp.ts +0 -28
- package/src/core/index.ts +0 -115
- package/src/core/lib/createGlobalScopedContext.ts +0 -37
- package/src/core/lib/globalScope.ts +0 -19
- package/src/core/lib/isArray.ts +0 -3
- package/src/core/lib/isRecord.ts +0 -3
- package/src/core/middleware/origin.ts +0 -47
- package/src/core/observers/elementSize.ts +0 -116
- package/src/core/observers/resize.ts +0 -9
- package/src/core/primitives/arrow/arrow.tsx +0 -74
- package/src/core/primitives/arrow/cmds.ts +0 -91
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +0 -14
- package/src/core/primitives/avatar/__workshop__/index.ts +0 -31
- package/src/core/primitives/avatar/__workshop__/stack.tsx +0 -25
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +0 -55
- package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -72
- package/src/core/primitives/avatar/avatar.tsx +0 -147
- package/src/core/primitives/avatar/avatarCounter.tsx +0 -69
- package/src/core/primitives/avatar/avatarStack.tsx +0 -79
- package/src/core/primitives/avatar/types.ts +0 -2
- package/src/core/primitives/badge/__workshop__/index.ts +0 -21
- package/src/core/primitives/badge/__workshop__/props.tsx +0 -19
- package/src/core/primitives/badge/__workshop__/tones.tsx +0 -16
- package/src/core/primitives/badge/badge.test.tsx +0 -16
- package/src/core/primitives/badge/badge.tsx +0 -61
- package/src/core/primitives/box/__workshop__/index.ts +0 -21
- package/src/core/primitives/box/__workshop__/props.tsx +0 -20
- package/src/core/primitives/box/__workshop__/responsive.tsx +0 -20
- package/src/core/primitives/box/box.tsx +0 -222
- package/src/core/primitives/button/__workshop__/custom.tsx +0 -27
- package/src/core/primitives/button/__workshop__/customIcons.tsx +0 -30
- package/src/core/primitives/button/__workshop__/disabled.tsx +0 -54
- package/src/core/primitives/button/__workshop__/index.ts +0 -66
- 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__/textOverflow.tsx +0 -13
- package/src/core/primitives/button/__workshop__/uploadButton.tsx +0 -29
- package/src/core/primitives/button/button.test.tsx +0 -30
- package/src/core/primitives/button/button.tsx +0 -193
- package/src/core/primitives/button/types.ts +0 -2
- 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 -20
- package/src/core/primitives/card/__workshop__/interactive.tsx +0 -29
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +0 -78
- package/src/core/primitives/card/__workshop__/props.tsx +0 -52
- package/src/core/primitives/card/__workshop__/selected.tsx +0 -62
- package/src/core/primitives/card/__workshop__/styled.tsx +0 -14
- package/src/core/primitives/card/__workshop__/tones.tsx +0 -27
- package/src/core/primitives/card/card.tsx +0 -109
- package/src/core/primitives/card/cardContext.ts +0 -10
- package/src/core/primitives/card/cardProvider.tsx +0 -27
- package/src/core/primitives/card/types.ts +0 -17
- package/src/core/primitives/card/useCard.ts +0 -15
- package/src/core/primitives/checkbox/__workshop__/example.tsx +0 -25
- package/src/core/primitives/checkbox/__workshop__/index.ts +0 -15
- package/src/core/primitives/checkbox/__workshop__/props.tsx +0 -35
- package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +0 -16
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +0 -27
- package/src/core/primitives/checkbox/checkbox.tsx +0 -80
- package/src/core/primitives/code/__workshop__/index.ts +0 -21
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +0 -23
- package/src/core/primitives/code/__workshop__/props.tsx +0 -18
- package/src/core/primitives/code/code.tsx +0 -48
- package/src/core/primitives/code/refractor.tsx +0 -18
- package/src/core/primitives/container/__workshop__/example.tsx +0 -20
- package/src/core/primitives/container/__workshop__/index.ts +0 -10
- package/src/core/primitives/container/container.tsx +0 -37
- package/src/core/primitives/container/types.ts +0 -6
- 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 -13
- package/src/core/primitives/flex/flex.tsx +0 -58
- package/src/core/primitives/grid/__workshop__/index.ts +0 -12
- package/src/core/primitives/grid/__workshop__/responsive.tsx +0 -54
- package/src/core/primitives/grid/grid.tsx +0 -35
- package/src/core/primitives/heading/__workshop__/index.ts +0 -21
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +0 -54
- package/src/core/primitives/heading/__workshop__/plain.tsx +0 -29
- package/src/core/primitives/heading/heading.tsx +0 -78
- package/src/core/primitives/inline/__workshop__/index.ts +0 -10
- package/src/core/primitives/inline/__workshop__/plain.tsx +0 -24
- package/src/core/primitives/inline/inline.tsx +0 -62
- package/src/core/primitives/kbd/__workshop__/index.ts +0 -10
- package/src/core/primitives/kbd/__workshop__/plain.tsx +0 -9
- package/src/core/primitives/kbd/kbd.tsx +0 -57
- package/src/core/primitives/label/__workshop__/index.ts +0 -21
- package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +0 -54
- package/src/core/primitives/label/__workshop__/plain.tsx +0 -28
- package/src/core/primitives/label/label.tsx +0 -75
- package/src/core/primitives/layer/__workshop__/_debug.tsx +0 -17
- package/src/core/primitives/layer/__workshop__/index.ts +0 -26
- package/src/core/primitives/layer/__workshop__/multipleRoots.tsx +0 -49
- package/src/core/primitives/layer/__workshop__/nested.tsx +0 -98
- package/src/core/primitives/layer/__workshop__/responsiveZOffset.tsx +0 -17
- package/src/core/primitives/layer/getLayerContext.test.ts +0 -32
- package/src/core/primitives/layer/getLayerContext.ts +0 -21
- package/src/core/primitives/layer/layer.test.tsx +0 -110
- package/src/core/primitives/layer/layer.tsx +0 -42
- package/src/core/primitives/layer/layerCard.tsx +0 -90
- package/src/core/primitives/layer/layerContext.ts +0 -7
- package/src/core/primitives/layer/layerProvider.tsx +0 -106
- package/src/core/primitives/layer/types.ts +0 -9
- package/src/core/primitives/layer/useLayer.ts +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 -69
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +0 -96
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +0 -100
- package/src/core/primitives/popover/__workshop__/index.ts +0 -51
- package/src/core/primitives/popover/constants.ts +0 -22
- package/src/core/primitives/popover/floating-ui/size.ts +0 -83
- package/src/core/primitives/popover/helpers.ts +0 -32
- package/src/core/primitives/popover/popover.tsx +0 -443
- package/src/core/primitives/popover/popoverLayer.tsx +0 -149
- package/src/core/primitives/popover/types.ts +0 -12
- package/src/core/primitives/radio/__workshop__/example.tsx +0 -63
- package/src/core/primitives/radio/__workshop__/index.ts +0 -13
- package/src/core/primitives/radio/__workshop__/plain.tsx +0 -28
- package/src/core/primitives/radio/radio.tsx +0 -64
- package/src/core/primitives/select/__workshop__/index.ts +0 -13
- package/src/core/primitives/select/__workshop__/plain.tsx +0 -39
- package/src/core/primitives/select/__workshop__/readOnly.tsx +0 -23
- package/src/core/primitives/select/select.tsx +0 -75
- package/src/core/primitives/selectable/selectable.tsx +0 -50
- package/src/core/primitives/skeleton/__workshop__/delay.tsx +0 -70
- package/src/core/primitives/skeleton/__workshop__/index.ts +0 -13
- package/src/core/primitives/skeleton/__workshop__/skeleton.tsx +0 -64
- package/src/core/primitives/skeleton/codeSkeleton.tsx +0 -49
- package/src/core/primitives/skeleton/headingSkeleton.tsx +0 -48
- package/src/core/primitives/skeleton/labelSkeleton.tsx +0 -47
- package/src/core/primitives/skeleton/skeleton.tsx +0 -70
- package/src/core/primitives/skeleton/textSkeleton.tsx +0 -49
- package/src/core/primitives/spinner/__workshop__/Props.tsx +0 -15
- package/src/core/primitives/spinner/__workshop__/index.ts +0 -16
- package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +0 -14
- package/src/core/primitives/spinner/spinner.tsx +0 -45
- package/src/core/primitives/srOnly/srOnly.tsx +0 -33
- package/src/core/primitives/stack/__workshop__/index.ts +0 -16
- package/src/core/primitives/stack/__workshop__/plain.tsx +0 -32
- package/src/core/primitives/stack/stack.tsx +0 -60
- package/src/core/primitives/switch/__workshop__/example.tsx +0 -23
- package/src/core/primitives/switch/__workshop__/index.ts +0 -13
- package/src/core/primitives/switch/__workshop__/props.tsx +0 -21
- package/src/core/primitives/switch/switch.tsx +0 -84
- package/src/core/primitives/text/__workshop__/colored.tsx +0 -23
- package/src/core/primitives/text/__workshop__/example.tsx +0 -28
- package/src/core/primitives/text/__workshop__/index.ts +0 -26
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +0 -23
- package/src/core/primitives/text/text.tsx +0 -76
- package/src/core/primitives/textArea/__workshop__/index.ts +0 -16
- package/src/core/primitives/textArea/__workshop__/plain.tsx +0 -61
- package/src/core/primitives/textArea/textArea.tsx +0 -84
- 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 -46
- package/src/core/primitives/textInput/__workshop__/plain.tsx +0 -110
- 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/textInput/textInput.tsx +0 -258
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
- package/src/core/primitives/tooltip/__workshop__/index.ts +0 -31
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
- package/src/core/primitives/tooltip/__workshop__/props.tsx +0 -112
- package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
- package/src/core/primitives/tooltip/constants.ts +0 -23
- package/src/core/primitives/tooltip/tooltip.test.tsx +0 -452
- package/src/core/primitives/tooltip/tooltip.tsx +0 -482
- package/src/core/primitives/tooltip/tooltipDelayGroup/index.ts +0 -4
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -13
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -55
- package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +0 -10
- package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -13
- package/src/core/primitives/tooltip/tooltipLayer.tsx +0 -106
- package/src/core/types.ts +0 -56
- package/src/core/utils/boundaryElement/__workshop__/index.ts +0 -16
- package/src/core/utils/boundaryElement/__workshop__/plain.tsx +0 -19
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +0 -102
- package/src/core/utils/boundaryElement/boundaryElementContext.ts +0 -10
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +0 -18
- package/src/core/utils/boundaryElement/types.ts +0 -5
- package/src/core/utils/boundaryElement/useBoundaryElement.ts +0 -24
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +0 -41
- package/src/core/utils/elementQuery/__workshop__/index.ts +0 -16
- package/src/core/utils/elementQuery/elementQuery.tsx +0 -75
- package/src/core/utils/elementQuery/helpers.ts +0 -27
- package/src/core/utils/errorBoundary.tsx +0 -50
- package/src/core/utils/getElementRef.ts +0 -29
- package/src/core/utils/portal/__workshop__/index.ts +0 -16
- package/src/core/utils/portal/__workshop__/named.tsx +0 -63
- package/src/core/utils/portal/portal.test.tsx +0 -105
- package/src/core/utils/portal/portal.tsx +0 -36
- package/src/core/utils/portal/portalContext.ts +0 -37
- package/src/core/utils/portal/portalProvider.tsx +0 -70
- package/src/core/utils/portal/types.ts +0 -7
- package/src/core/utils/portal/usePortal.ts +0 -23
- package/src/css/_assign.ts +0 -3
- package/src/css/_composeClassNames.ts +0 -12
- package/src/css/_fromEntries.ts +0 -3
- package/src/css/_getClassNames.ts +0 -9
- package/src/css/_responsiveClassName.ts +0 -45
- package/src/css/_responsiveStyle.css.ts +0 -34
- package/src/css/_style.css.ts +0 -9
- package/src/css/components/breadcrumbs/breadcrumbs.css.ts +0 -6
- package/src/css/components/breadcrumbs/breadcrumbs.ts +0 -7
- package/src/css/components/dialog/dialog.css.ts +0 -98
- package/src/css/components/dialog/dialog.ts +0 -58
- package/src/css/components/menu/menu.css.ts +0 -14
- package/src/css/components/menu/menu.ts +0 -12
- package/src/css/components/skeleton/skeleton.css.ts +0 -128
- package/src/css/components/skeleton/skeleton.ts +0 -38
- package/src/css/components/skeleton/types.ts +0 -36
- package/src/css/components/toast/toast.css.ts +0 -17
- package/src/css/components/toast/toast.ts +0 -11
- package/src/css/components/tree/tree.css.ts +0 -65
- package/src/css/components/tree/tree.ts +0 -7
- package/src/css/constants.ts +0 -10
- package/src/css/getVarName.ts +0 -27
- package/src/css/index.ts +0 -146
- package/src/css/layers.css.ts +0 -12
- package/src/css/primitives/_arrow/_arrow.css.ts +0 -68
- package/src/css/primitives/_arrow/_arrow.ts +0 -26
- package/src/css/primitives/_input/_input.css.ts +0 -261
- package/src/css/primitives/_input/input.ts +0 -29
- package/src/css/primitives/_input/types.ts +0 -13
- package/src/css/primitives/avatar/avatar.css.ts +0 -201
- package/src/css/primitives/avatar/avatar.ts +0 -68
- package/src/css/primitives/avatar/types.ts +0 -10
- package/src/css/primitives/badge/badge.css.ts +0 -27
- package/src/css/primitives/badge/badge.ts +0 -8
- package/src/css/primitives/badge/types.ts +0 -13
- package/src/css/primitives/box/box.css.ts +0 -19
- package/src/css/primitives/box/box.ts +0 -82
- package/src/css/primitives/box/types.ts +0 -75
- package/src/css/primitives/button/button.css.ts +0 -287
- package/src/css/primitives/button/button.ts +0 -26
- package/src/css/primitives/button/types.ts +0 -12
- package/src/css/primitives/card/__workshop__/color.tsx +0 -75
- package/src/css/primitives/card/__workshop__/index.ts +0 -16
- package/src/css/primitives/card/card.css.ts +0 -387
- package/src/css/primitives/card/card.ts +0 -13
- package/src/css/primitives/card/types.ts +0 -9
- package/src/css/primitives/checkbox/checkbox.css.ts +0 -193
- package/src/css/primitives/checkbox/checkbox.ts +0 -17
- package/src/css/primitives/code/code.css.ts +0 -272
- package/src/css/primitives/code/code.ts +0 -19
- package/src/css/primitives/code/types.ts +0 -11
- package/src/css/primitives/container/container.css.ts +0 -4
- package/src/css/primitives/container/container.ts +0 -17
- package/src/css/primitives/container/types.ts +0 -9
- package/src/css/primitives/heading/heading.css.ts +0 -86
- package/src/css/primitives/heading/heading.ts +0 -22
- package/src/css/primitives/heading/types.ts +0 -14
- package/src/css/primitives/kbd/kbd.css.ts +0 -16
- package/src/css/primitives/kbd/kbd.ts +0 -9
- package/src/css/primitives/kbd/types.ts +0 -6
- package/src/css/primitives/label/label.css.ts +0 -87
- package/src/css/primitives/label/label.ts +0 -22
- package/src/css/primitives/label/types.ts +0 -14
- package/src/css/primitives/popover/popover.css.ts +0 -6
- package/src/css/primitives/popover/popover.ts +0 -12
- package/src/css/primitives/radio/radio.css.ts +0 -78
- package/src/css/primitives/radio/radio.ts +0 -17
- package/src/css/primitives/root/root.css.ts +0 -19
- package/src/css/primitives/root/root.ts +0 -17
- package/src/css/primitives/root/types.ts +0 -10
- package/src/css/primitives/select/select.css.ts +0 -24
- package/src/css/primitives/select/select.ts +0 -14
- package/src/css/primitives/select/types.ts +0 -5
- package/src/css/primitives/selectable/selectable.css.ts +0 -131
- package/src/css/primitives/selectable/selectable.ts +0 -9
- package/src/css/primitives/selectable/types.ts +0 -9
- package/src/css/primitives/spinner/spinner.css.ts +0 -19
- package/src/css/primitives/spinner/spinner.ts +0 -13
- package/src/css/primitives/spinner/types.ts +0 -4
- package/src/css/primitives/srOnly/srOnly.css.ts +0 -10
- package/src/css/primitives/srOnly/srOnly.ts +0 -7
- package/src/css/primitives/stack/stack.css.ts +0 -6
- package/src/css/primitives/stack/stack.ts +0 -7
- package/src/css/primitives/switch/switch.css.ts +0 -98
- package/src/css/primitives/switch/switch.ts +0 -27
- package/src/css/primitives/text/text.css.ts +0 -86
- package/src/css/primitives/text/text.ts +0 -24
- package/src/css/primitives/text/types.ts +0 -18
- package/src/css/primitives/textArea/textArea.css.ts +0 -4
- package/src/css/primitives/textArea/textArea.ts +0 -9
- package/src/css/primitives/textArea/types.ts +0 -7
- package/src/css/primitives/textInput/textInput.css.ts +0 -43
- package/src/css/primitives/textInput/textInput.ts +0 -24
- package/src/css/primitives/textInput/types.ts +0 -7
- package/src/css/primitives/tooltip/tooltip.css.ts +0 -4
- package/src/css/primitives/tooltip/tooltip.ts +0 -8
- package/src/css/primitives/tooltip/types.ts +0 -4
- package/src/css/props/alignItems/alignItems.css.ts +0 -22
- package/src/css/props/alignItems/alignItems.ts +0 -8
- package/src/css/props/alignItems/types.ts +0 -9
- package/src/css/props/border/border.css.ts +0 -65
- package/src/css/props/border/border.ts +0 -21
- package/src/css/props/border/types.ts +0 -13
- package/src/css/props/boxSizing/boxSizing.css.ts +0 -12
- package/src/css/props/boxSizing/boxSizing.ts +0 -7
- package/src/css/props/boxSizing/types.ts +0 -7
- package/src/css/props/display/display.css.ts +0 -56
- package/src/css/props/display/display.ts +0 -8
- package/src/css/props/display/types.ts +0 -16
- package/src/css/props/flex/flex.css.ts +0 -52
- package/src/css/props/flex/flex.ts +0 -8
- package/src/css/props/flex/types.ts +0 -9
- package/src/css/props/flexDirection/flexDirection.css.ts +0 -19
- package/src/css/props/flexDirection/flexDirection.ts +0 -8
- package/src/css/props/flexDirection/types.ts +0 -9
- package/src/css/props/flexWrap/flexWrap.css.ts +0 -16
- package/src/css/props/flexWrap/flexWrap.ts +0 -8
- package/src/css/props/flexWrap/types.ts +0 -9
- package/src/css/props/font/font.css.ts +0 -94
- package/src/css/props/font/font.ts +0 -8
- package/src/css/props/font/types.ts +0 -6
- package/src/css/props/gap/gap.css.ts +0 -40
- package/src/css/props/gap/gap.ts +0 -13
- package/src/css/props/gap/types.ts +0 -10
- package/src/css/props/gridAutoColumns/gridAutoColumns.css.ts +0 -19
- package/src/css/props/gridAutoColumns/gridAutoColumns.ts +0 -8
- package/src/css/props/gridAutoColumns/types.ts +0 -9
- package/src/css/props/gridAutoFlow/gridAutoFlow.css.ts +0 -19
- package/src/css/props/gridAutoFlow/gridAutoFlow.ts +0 -8
- package/src/css/props/gridAutoFlow/types.ts +0 -9
- package/src/css/props/gridAutoRows/gridAutoRows.css.ts +0 -19
- package/src/css/props/gridAutoRows/gridAutoRows.ts +0 -8
- package/src/css/props/gridAutoRows/types.ts +0 -9
- package/src/css/props/gridColumn/gridColumn.css.ts +0 -49
- package/src/css/props/gridColumn/gridColumn.ts +0 -8
- package/src/css/props/gridColumn/types.ts +0 -9
- package/src/css/props/gridColumnEnd/gridColumnEnd.css.ts +0 -46
- package/src/css/props/gridColumnEnd/gridColumnEnd.ts +0 -8
- package/src/css/props/gridColumnEnd/types.ts +0 -9
- package/src/css/props/gridColumnStart/gridColumnStart.css.ts +0 -46
- package/src/css/props/gridColumnStart/gridColumnStart.ts +0 -8
- package/src/css/props/gridColumnStart/types.ts +0 -9
- package/src/css/props/gridRow/gridRow.css.ts +0 -49
- package/src/css/props/gridRow/gridRow.ts +0 -8
- package/src/css/props/gridRow/types.ts +0 -9
- package/src/css/props/gridRowEnd/gridRowEnd.css.ts +0 -46
- package/src/css/props/gridRowEnd/gridRowEnd.ts +0 -8
- package/src/css/props/gridRowEnd/types.ts +0 -9
- package/src/css/props/gridRowStart/gridRowStart.css.ts +0 -46
- package/src/css/props/gridRowStart/gridRowStart.ts +0 -8
- package/src/css/props/gridRowStart/types.ts +0 -9
- package/src/css/props/gridTemplateColumns/gridTemplateColumns.css.ts +0 -43
- package/src/css/props/gridTemplateColumns/gridTemplateColumns.ts +0 -8
- package/src/css/props/gridTemplateColumns/types.ts +0 -9
- package/src/css/props/gridTemplateRows/gridTemplateRows.css.ts +0 -43
- package/src/css/props/gridTemplateRows/gridTemplateRows.ts +0 -8
- package/src/css/props/gridTemplateRows/types.ts +0 -9
- package/src/css/props/height/height.css.ts +0 -25
- package/src/css/props/height/height.ts +0 -8
- package/src/css/props/height/types.ts +0 -9
- package/src/css/props/inset/inset.css.ts +0 -37
- package/src/css/props/inset/inset.ts +0 -21
- package/src/css/props/inset/types.ts +0 -13
- package/src/css/props/justifyContent/justifyContent.css.ts +0 -25
- package/src/css/props/justifyContent/justifyContent.ts +0 -8
- package/src/css/props/justifyContent/types.ts +0 -15
- package/src/css/props/margin/margin.css.ts +0 -117
- package/src/css/props/margin/margin.ts +0 -25
- package/src/css/props/margin/types.ts +0 -17
- package/src/css/props/maxWidth/maxWidth.css.ts +0 -32
- package/src/css/props/maxWidth/maxWidth.ts +0 -8
- package/src/css/props/maxWidth/types.ts +0 -11
- package/src/css/props/minHeight/minHeight.css.ts +0 -13
- package/src/css/props/minHeight/minHeight.ts +0 -8
- package/src/css/props/minHeight/types.ts +0 -9
- package/src/css/props/minWidth/minWidth.css.ts +0 -25
- package/src/css/props/minWidth/minWidth.ts +0 -8
- package/src/css/props/minWidth/types.ts +0 -9
- package/src/css/props/outline/outline.css.ts +0 -10
- package/src/css/props/outline/outline.ts +0 -8
- package/src/css/props/outline/types.ts +0 -7
- package/src/css/props/overflow/overflow.css.ts +0 -16
- package/src/css/props/overflow/overflow.ts +0 -8
- package/src/css/props/overflow/types.ts +0 -11
- package/src/css/props/padding/padding.css.ts +0 -87
- package/src/css/props/padding/padding.ts +0 -25
- package/src/css/props/padding/types.ts +0 -17
- package/src/css/props/pointerEvents/pointerEvents.css.ts +0 -13
- package/src/css/props/pointerEvents/pointerEvents.ts +0 -8
- package/src/css/props/pointerEvents/types.ts +0 -7
- package/src/css/props/position/position.css.ts +0 -22
- package/src/css/props/position/position.ts +0 -8
- package/src/css/props/position/types.ts +0 -9
- package/src/css/props/radius/radius.css.ts +0 -21
- package/src/css/props/radius/radius.ts +0 -8
- package/src/css/props/radius/types.ts +0 -8
- package/src/css/props/shadow/shadow.css.ts +0 -23
- package/src/css/props/shadow/shadow.ts +0 -8
- package/src/css/props/shadow/types.ts +0 -8
- package/src/css/props/textAlign/textAlign.css.ts +0 -22
- package/src/css/props/textAlign/textAlign.ts +0 -8
- package/src/css/props/textAlign/types.ts +0 -7
- package/src/css/props/textOverflow/textOverflow.css.ts +0 -19
- package/src/css/props/textOverflow/textOverflow.ts +0 -8
- package/src/css/props/textOverflow/types.ts +0 -12
- package/src/css/props/width/types.ts +0 -11
- package/src/css/props/width/width.css.ts +0 -31
- package/src/css/props/width/width.ts +0 -8
- package/src/css/theme/buildCSSTheme.ts +0 -488
- package/src/css/theme/defaultTheme.css.ts +0 -64
- package/src/css/types.ts +0 -427
- package/src/css/vars.css.ts +0 -676
- package/src/theme/_parseColorToken.ts +0 -180
- package/src/theme/buildTheme.ts +0 -32
- package/src/theme/constants.ts +0 -90
- package/src/theme/defaults/color.ts +0 -197
- package/src/theme/defaults/common.ts +0 -71
- package/src/theme/defaults/fonts.ts +0 -250
- package/src/theme/index.ts +0 -5
- package/src/theme/merge.ts +0 -24
- package/src/theme/resolveTokens.ts +0 -204
- package/src/theme/types.ts +0 -366
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { a as rem, i as _responsive, n as _getArrayProp } from "./helpers-bwfx1e-Y.js";
|
|
2
|
+
import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
|
|
3
|
+
import { x as flexItemStyle, y as Box } from "./useLayer-BAVfmbNN.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { styled } from "styled-components";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
const BASE_STYLE = { "&&:not([hidden])": { display: "flex" } };
|
|
8
|
+
function responsiveFlexStyle() {
|
|
9
|
+
return [
|
|
10
|
+
BASE_STYLE,
|
|
11
|
+
responsiveFlexAlignStyle,
|
|
12
|
+
responsiveFlexGapStyle,
|
|
13
|
+
responsiveFlexWrapStyle,
|
|
14
|
+
responsiveFlexJustifyStyle,
|
|
15
|
+
responsiveFlexDirectionStyle
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
function responsiveFlexAlignStyle(props) {
|
|
19
|
+
let { media } = getTheme_v2(props.theme);
|
|
20
|
+
return _responsive(media, props.$align, (align) => ({ alignItems: align }));
|
|
21
|
+
}
|
|
22
|
+
function responsiveFlexGapStyle(props) {
|
|
23
|
+
let { media, space } = getTheme_v2(props.theme);
|
|
24
|
+
return _responsive(media, props.$gap, (gap) => ({ gap: gap ? rem(space[gap]) : void 0 }));
|
|
25
|
+
}
|
|
26
|
+
function responsiveFlexWrapStyle(props) {
|
|
27
|
+
let { media } = getTheme_v2(props.theme);
|
|
28
|
+
return _responsive(media, props.$wrap, (wrap) => ({ flexWrap: wrap }));
|
|
29
|
+
}
|
|
30
|
+
function responsiveFlexJustifyStyle(props) {
|
|
31
|
+
let { media } = getTheme_v2(props.theme);
|
|
32
|
+
return _responsive(media, props.$justify, (justify) => ({ justifyContent: justify }));
|
|
33
|
+
}
|
|
34
|
+
function responsiveFlexDirectionStyle(props) {
|
|
35
|
+
let { media } = getTheme_v2(props.theme);
|
|
36
|
+
return _responsive(media, props.$direction, (direction) => ({ flexDirection: direction }));
|
|
37
|
+
}
|
|
38
|
+
const StyledFlex = /* @__PURE__ */ styled(Box).withConfig({
|
|
39
|
+
displayName: "StyledFlex",
|
|
40
|
+
componentId: "sc-amdlvw-0"
|
|
41
|
+
})(flexItemStyle, responsiveFlexStyle);
|
|
42
|
+
function FlexComponent(props) {
|
|
43
|
+
let $ = c(28), align, as, gap, justify, ref, restProps, t0, wrap;
|
|
44
|
+
$[0] === props ? (align = $[1], as = $[2], gap = $[3], justify = $[4], ref = $[5], restProps = $[6], t0 = $[7], wrap = $[8]) : ({align, as, direction: t0, gap, justify, ref, wrap, ...restProps} = props, $[0] = props, $[1] = align, $[2] = as, $[3] = gap, $[4] = justify, $[5] = ref, $[6] = restProps, $[7] = t0, $[8] = wrap);
|
|
45
|
+
let direction = t0 === void 0 ? "row" : t0, t1;
|
|
46
|
+
$[9] === align ? t1 = $[10] : (t1 = _getArrayProp(align), $[9] = align, $[10] = t1);
|
|
47
|
+
let t2;
|
|
48
|
+
$[11] === direction ? t2 = $[12] : (t2 = _getArrayProp(direction), $[11] = direction, $[12] = t2);
|
|
49
|
+
let t3;
|
|
50
|
+
$[13] === gap ? t3 = $[14] : (t3 = _getArrayProp(gap), $[13] = gap, $[14] = t3);
|
|
51
|
+
let t4;
|
|
52
|
+
$[15] === justify ? t4 = $[16] : (t4 = _getArrayProp(justify), $[15] = justify, $[16] = t4);
|
|
53
|
+
let t5;
|
|
54
|
+
$[17] === wrap ? t5 = $[18] : (t5 = _getArrayProp(wrap), $[17] = wrap, $[18] = t5);
|
|
55
|
+
let t6;
|
|
56
|
+
return $[19] !== as || $[20] !== ref || $[21] !== restProps || $[22] !== t1 || $[23] !== t2 || $[24] !== t3 || $[25] !== t4 || $[26] !== t5 ? (t6 = /* @__PURE__ */ jsx(StyledFlex, {
|
|
57
|
+
"data-ui": "Flex",
|
|
58
|
+
...restProps,
|
|
59
|
+
$align: t1,
|
|
60
|
+
$direction: t2,
|
|
61
|
+
$gap: t3,
|
|
62
|
+
$justify: t4,
|
|
63
|
+
$wrap: t5,
|
|
64
|
+
forwardedAs: as,
|
|
65
|
+
ref
|
|
66
|
+
}), $[19] = as, $[20] = ref, $[21] = restProps, $[22] = t1, $[23] = t2, $[24] = t3, $[25] = t4, $[26] = t5, $[27] = t6) : t6 = $[27], t6;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
|
|
70
|
+
*
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
const Flex = FlexComponent;
|
|
74
|
+
export { Flex as t };
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=flex-C-5JHi1C.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flex-C-5JHi1C.js","names":["CSSObject","getTheme_v2","_responsive","rem","ThemeProps","ResponsiveFlexStyleProps","BASE_STYLE","display","responsiveFlexStyle","Array","props","responsiveFlexAlignStyle","responsiveFlexGapStyle","responsiveFlexWrapStyle","responsiveFlexJustifyStyle","responsiveFlexDirectionStyle","media","theme","$align","align","alignItems","space","$gap","gap","undefined","$wrap","wrap","flexWrap","$justify","justify","justifyContent","$direction","direction","flexDirection","styled","flexItemStyle","responsiveFlexStyle","FlexItemStyleProps","ResponsiveFlexStyleProps","_getArrayProp","ElementType","Props","Box","BoxOwnProps","ResponsiveFlexItemProps","ResponsiveFlexProps","FlexOwnProps","Omit","gap","FlexProps","E","StyledFlex","FlexComponent","props","$","_c","align","as","justify","ref","restProps","t0","wrap","direction","undefined","t1","t2","t3","t4","t5","t6","Flex","React","JSX","Element"],"sources":["../src/core/styles/flex/flexStyle.ts","../src/core/primitives/flex/flex.tsx"],"sourcesContent":["import {CSSObject} from '../../../theme/system/css'\nimport {getTheme_v2} from '../../../theme/versioning/getTheme_v2'\nimport {_responsive, rem} from '../helpers'\nimport {ThemeProps} from '../types'\nimport {ResponsiveFlexStyleProps} from './types'\n\nconst BASE_STYLE: CSSObject = {\n '&&:not([hidden])': {\n display: 'flex',\n },\n}\n\nexport function responsiveFlexStyle(): Array<\n CSSObject | ((props: ResponsiveFlexStyleProps & ThemeProps) => CSSObject[])\n> {\n return [\n BASE_STYLE,\n responsiveFlexAlignStyle,\n responsiveFlexGapStyle,\n responsiveFlexWrapStyle,\n responsiveFlexJustifyStyle,\n responsiveFlexDirectionStyle,\n ]\n}\n\nfunction responsiveFlexAlignStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$align, (align) => {\n return {alignItems: align}\n })\n}\n\nfunction responsiveFlexGapStyle(props: ResponsiveFlexStyleProps & ThemeProps) {\n const {media, space} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$gap, (gap) => ({\n gap: gap ? rem(space[gap]) : undefined,\n }))\n}\n\nfunction responsiveFlexWrapStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$wrap, (wrap) => {\n return {flexWrap: wrap}\n })\n}\n\nfunction responsiveFlexJustifyStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$justify, (justify) => {\n return {justifyContent: justify}\n })\n}\n\nfunction responsiveFlexDirectionStyle(props: ResponsiveFlexStyleProps & ThemeProps): CSSObject[] {\n const {media} = getTheme_v2(props.theme)\n\n return _responsive(media, props.$direction, (direction) => {\n return {flexDirection: direction}\n })\n}\n","import {styled} from 'styled-components'\n\nimport {flexItemStyle} from '../../styles/flex/flexItemStyle'\nimport {responsiveFlexStyle} from '../../styles/flex/flexStyle'\nimport {FlexItemStyleProps, ResponsiveFlexStyleProps} from '../../styles/flex/types'\nimport {_getArrayProp} from '../../styles/helpers'\nimport {ElementType, Props} from '../../types/component'\nimport {Box, BoxOwnProps} from '../box/box'\nimport {ResponsiveFlexItemProps, ResponsiveFlexProps} from '../types'\n\n/**\n * @public\n */\nexport interface FlexOwnProps\n extends Omit<BoxOwnProps, 'display'>, ResponsiveFlexProps, ResponsiveFlexItemProps {\n gap?: number | number[]\n}\n\n/**\n * @public\n */\nexport type FlexProps<E extends ElementType = 'div'> = Props<FlexOwnProps, E>\n\nconst StyledFlex = styled(Box)<FlexItemStyleProps & ResponsiveFlexStyleProps>(\n flexItemStyle,\n responsiveFlexStyle,\n)\n\nfunction FlexComponent(\n props: FlexOwnProps & {as?: ElementType} & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'wrap'>,\n) {\n const {align, as, direction = 'row', gap, justify, ref, wrap, ...restProps} = props\n\n return (\n <StyledFlex\n data-ui=\"Flex\"\n {...restProps}\n $align={_getArrayProp(align)}\n $direction={_getArrayProp(direction)}\n $gap={_getArrayProp(gap)}\n $justify={_getArrayProp(justify)}\n $wrap={_getArrayProp(wrap)}\n forwardedAs={as}\n ref={ref}\n />\n )\n}\n\n/**\n * The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).\n *\n * @public\n */\n// oxlint-disable-next-line no-unsafe-type-assertion\nexport const Flex = FlexComponent as unknown as <E extends ElementType = 'div'>(\n props: FlexProps<E>,\n) => React.JSX.Element\n"],"mappings":";;;;;;AAMA,MAAMM,aAAw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AZ,EAAA,QAAAa,MAAAb,EAAA,QAAAc,MAAAd,EAAA,QAAAe,MAP5BC,KAAA,oBAAC,YAAD;EACU,WAAA;EAAM,GACVV;EACI,QAAAK;EACI,YAAAC;EACN,MAAAC;EACI,UAAAC;EACH,OAAAC;EACMZ,aAAAA;EACRE;CAAG,CAAA,GACRL,EAAA,MAAAG,IAAAH,EAAA,MAAAK,KAAAL,EAAA,MAAAM,WAAAN,EAAA,MAAAW,IAAAX,EAAA,MAAAY,IAAAZ,EAAA,MAAAa,IAAAb,EAAA,MAAAc,IAAAd,EAAA,MAAAe,IAAAf,EAAA,MAAAgB,MAAAA,KAAAhB,EAAA,KAVFgB;AAUE;;;;;;AAUN,MAAaC,OAAOnB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @public
|
|
3
|
+
*/
|
|
4
|
+
type ThemeFontKey = 'code' | 'heading' | 'label' | 'text';
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
type ThemeFontWeightKey = 'regular' | 'medium' | 'semibold' | 'bold';
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
interface ThemeFontSize {
|
|
13
|
+
ascenderHeight: number;
|
|
14
|
+
descenderHeight: number;
|
|
15
|
+
fontSize: number;
|
|
16
|
+
iconSize: number;
|
|
17
|
+
letterSpacing: number;
|
|
18
|
+
lineHeight: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
interface ThemeFontWeight {
|
|
24
|
+
regular: number;
|
|
25
|
+
medium: number;
|
|
26
|
+
semibold: number;
|
|
27
|
+
bold: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
interface ThemeFont {
|
|
33
|
+
family: string;
|
|
34
|
+
weights: ThemeFontWeight;
|
|
35
|
+
sizes: ThemeFontSize[];
|
|
36
|
+
/** @deprecated No longer supported. */
|
|
37
|
+
horizontalOffset?: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
interface ThemeFonts {
|
|
43
|
+
code: ThemeFont;
|
|
44
|
+
heading: ThemeFont;
|
|
45
|
+
label: ThemeFont;
|
|
46
|
+
text: ThemeFont;
|
|
47
|
+
}
|
|
48
|
+
export { ThemeFontWeightKey as a, ThemeFontWeight as i, ThemeFontKey as n, ThemeFonts as o, ThemeFontSize as r, ThemeFont as t };
|
|
49
|
+
//# sourceMappingURL=font-EtfxKPUz.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-EtfxKPUz.d.ts","names":[],"sources":["../src/theme/system/font.ts"],"mappings":"AAGA;;;KAAY;;;;KAKA;;;;UAKK;EACf;EACA;EACA;EACA;EACA;EACA;;;;;UAMe;EACf;EACA;EACA;EACA;;;;;UAMe;EACf;EACA,SAAS;EACT,OAAO;;EAEP;;;;;UAMe;EACf,MAAM;EACN,SAAS;EACT,OAAO;EACP,MAAM"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { Activity, useState } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { PresenceChild, invariant } from "motion/react";
|
|
5
|
+
/**
|
|
6
|
+
* Custom floating-ui middleware which calculates transform-origin X + Y offsets
|
|
7
|
+
* based on the current floating rect's dimensions and shift offset.
|
|
8
|
+
*
|
|
9
|
+
* Scaling popovers with these transform-origin offsets will give the effect of
|
|
10
|
+
* popvers slightly 'growing' from the origin/reference element.
|
|
11
|
+
*
|
|
12
|
+
* This middleware must be applied after both `@sanity/ui/size` and `shift` middlewares.
|
|
13
|
+
*/
|
|
14
|
+
const origin = {
|
|
15
|
+
name: "@sanity/ui/origin",
|
|
16
|
+
fn({ middlewareData, placement, rects }) {
|
|
17
|
+
let [side] = placement.split("-"), floatingWidth = rects.floating.width, floatingHeight = rects.floating.height, shiftX = middlewareData.shift?.x || 0, shiftY = middlewareData.shift?.y || 0;
|
|
18
|
+
if (floatingWidth <= 0 || floatingHeight <= 0) return {};
|
|
19
|
+
let { originX, originY } = ["bottom", "top"].includes(side) ? {
|
|
20
|
+
originX: clamp(.5 - shiftX / floatingWidth, 0, 1),
|
|
21
|
+
originY: side === "bottom" ? 0 : 1
|
|
22
|
+
} : {
|
|
23
|
+
originX: +(side === "left"),
|
|
24
|
+
originY: clamp(.5 - shiftY / floatingHeight, 0, 1)
|
|
25
|
+
};
|
|
26
|
+
return { data: {
|
|
27
|
+
originX,
|
|
28
|
+
originY
|
|
29
|
+
} };
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
function clamp(num, min, max) {
|
|
33
|
+
return Math.min(Math.max(num, min), max);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* MIT License
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) 2024 Motion One
|
|
39
|
+
*
|
|
40
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
41
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
42
|
+
* in the Software without restriction, including without limitation the rights
|
|
43
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
44
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
45
|
+
* furnished to do so, subject to the following conditions:
|
|
46
|
+
*
|
|
47
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
48
|
+
* copies or substantial portions of the Software.
|
|
49
|
+
*
|
|
50
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
51
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
52
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
53
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
54
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
55
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
56
|
+
* SOFTWARE.
|
|
57
|
+
*/
|
|
58
|
+
/**
|
|
59
|
+
* Animated version of React's `Activity` that defers `mode="hidden"` until
|
|
60
|
+
* child exit animations have finished.
|
|
61
|
+
*
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
function AnimateActivity(t0) {
|
|
65
|
+
let $ = c(9), { mode: modeFromProps, layoutMode, children } = t0, [mode, setMode] = useState(modeFromProps), isPresent = modeFromProps === "visible";
|
|
66
|
+
if (isPresent && mode !== "visible") return setMode("visible"), null;
|
|
67
|
+
let t1;
|
|
68
|
+
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => setMode("hidden"), $[0] = t1) : t1 = $[0];
|
|
69
|
+
let onExitComplete = t1;
|
|
70
|
+
invariant(!!Activity, "Activity component not found - upgrade to React 19.2.0 or higher");
|
|
71
|
+
let t2 = isPresent ? void 0 : onExitComplete, t3 = layoutMode === "pop" ? "popLayout" : "sync", t4 = children, t5;
|
|
72
|
+
$[1] !== isPresent || $[2] !== t2 || $[3] !== t3 || $[4] !== t4 ? (t5 = /* @__PURE__ */ jsx(PresenceChild, {
|
|
73
|
+
isPresent,
|
|
74
|
+
onExitComplete: t2,
|
|
75
|
+
presenceAffectsLayout: !1,
|
|
76
|
+
mode: t3,
|
|
77
|
+
children: t4
|
|
78
|
+
}), $[1] = isPresent, $[2] = t2, $[3] = t3, $[4] = t4, $[5] = t5) : t5 = $[5];
|
|
79
|
+
let t6;
|
|
80
|
+
return $[6] !== mode || $[7] !== t5 ? (t6 = /* @__PURE__ */ jsx(Activity, {
|
|
81
|
+
mode,
|
|
82
|
+
children: t5
|
|
83
|
+
}), $[6] = mode, $[7] = t5, $[8] = t6) : t6 = $[8], t6;
|
|
84
|
+
}
|
|
85
|
+
function getElementRef(element) {
|
|
86
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
87
|
+
return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
|
|
88
|
+
}
|
|
89
|
+
export { AnimateActivity as n, origin as r, getElementRef as t };
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=getElementRef-5HZQ-Owu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getElementRef-5HZQ-Owu.js","names":["Middleware","origin","name","fn","middlewareData","placement","rects","side","split","floatingWidth","floating","width","floatingHeight","height","shiftX","shift","x","shiftY","y","isVerticalPlacement","includes","originX","originY","clamp","data","num","min","max","Math","invariant","PresenceChild","Activity","useState","AnimateActivityProps","mode","layoutMode","children","React","ReactNode","AnimateActivity","t0","$","_c","modeFromProps","setMode","isPresent","t1","Symbol","for","onExitComplete","Boolean","t2","undefined","t3","t4","t5","t6","getElementRef","element","React","ReactElement","getter","Object","getOwnPropertyDescriptor","props","get","mayWarn","isReactWarning","ref","Ref"],"sources":["../src/core/middleware/origin.ts","../src/core/utils/animateActivity.tsx","../src/core/utils/getElementRef.ts"],"sourcesContent":["import {Middleware} from '@floating-ui/react-dom'\n\n/**\n * Custom floating-ui middleware which calculates transform-origin X + Y offsets\n * based on the current floating rect's dimensions and shift offset.\n *\n * Scaling popovers with these transform-origin offsets will give the effect of\n * popvers slightly 'growing' from the origin/reference element.\n *\n * This middleware must be applied after both `@sanity/ui/size` and `shift` middlewares.\n */\nexport const origin: Middleware = {\n name: '@sanity/ui/origin',\n fn({middlewareData, placement, rects}) {\n const [side] = placement.split('-')\n\n const floatingWidth = rects.floating.width\n const floatingHeight = rects.floating.height\n\n const shiftX = middlewareData.shift?.x || 0\n const shiftY = middlewareData.shift?.y || 0\n\n if (floatingWidth <= 0 || floatingHeight <= 0) {\n return {}\n }\n\n const isVerticalPlacement = ['bottom', 'top'].includes(side)\n\n const {originX, originY}: {originX: number; originY: number} = isVerticalPlacement\n ? {\n originX: clamp(0.5 - shiftX / floatingWidth, 0, 1),\n originY: side === 'bottom' ? 0 : 1,\n }\n : {\n originX: side === 'left' ? 1 : 0,\n originY: clamp(0.5 - shiftY / floatingHeight, 0, 1),\n }\n\n return {\n data: {originX, originY},\n }\n },\n}\n\nfunction clamp(num: number, min: number, max: number) {\n return Math.min(Math.max(num, min), max)\n}\n","/**\n * MIT License\n *\n * Copyright (c) 2024 Motion One\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport {invariant, PresenceChild} from 'motion/react'\nimport {Activity, useState} from 'react'\n\ninterface AnimateActivityProps {\n mode: 'visible' | 'hidden'\n layoutMode: 'default' | 'pop'\n children: React.ReactNode\n}\n\n/**\n * Animated version of React's `Activity` that defers `mode=\"hidden\"` until\n * child exit animations have finished.\n *\n * @internal\n */\nexport function AnimateActivity({mode: modeFromProps, layoutMode, children}: AnimateActivityProps) {\n /**\n * This is the mode that we'll render.\n */\n const [mode, setMode] = useState(modeFromProps)\n\n /**\n * This is the goal state as defined by props.\n */\n const isPresent = modeFromProps === 'visible'\n\n /**\n * Immediately switch to mode=\"visible\" when the user\n * changes the mode prop.\n */\n if (isPresent && mode !== 'visible') {\n setMode('visible')\n return null\n }\n\n /**\n * Set mode to \"hidden\" only when the exit animation is complete.\n */\n const onExitComplete = () => setMode('hidden')\n\n invariant(Boolean(Activity), 'Activity component not found - upgrade to React 19.2.0 or higher')\n\n return (\n <Activity mode={mode}>\n <PresenceChild\n isPresent={isPresent}\n onExitComplete={!isPresent ? onExitComplete : undefined}\n presenceAffectsLayout={false}\n mode={layoutMode === 'pop' ? 'popLayout' : 'sync'}\n >\n {/* oxlint-disable-next-line no-unsafe-type-assertion -- PresenceChild expects a single ReactElement */}\n {children as any}\n </PresenceChild>\n </Activity>\n )\n}\n","// Based on https://github.com/radix-ui/primitives/blob/0bade6a704e5821b90a6da0f3d8cfa8a7711127d/packages/react/slot/src/Slot.tsx#L128-L150\n// Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`\n// After React 19 accessing `element.ref` does the opposite.\n// https://github.com/facebook/react/pull/28348\n//\n// Access the ref using the method that doesn't yield a warning.\nexport function getElementRef(element: React.ReactElement) {\n // React <=18 in DEV\n // oxlint-disable-next-line unbound-method\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning\n\n if (mayWarn) {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return (element as any).ref\n }\n\n // React 19 in DEV\n // oxlint-disable-next-line unbound-method\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning\n\n if (mayWarn) {\n // oxlint-disable-next-line no-unsafe-type-assertion\n return (element.props as {ref?: React.Ref<unknown>}).ref\n }\n\n // Not DEV\n // oxlint-disable-next-line no-unsafe-type-assertion\n return (element.props as {ref?: React.Ref<unknown>}).ref || (element as any).ref\n}\n"],"mappings":";;;;;;;;;;;;;AAWA,MAAaC,SAAqB;CAChCC,MAAM;CACNC,GAAG,EAACC,gBAAgBC,WAAWC,SAAQ;EACrC,IAAM,CAACC,QAAQF,UAAUG,MAAM,GAAG,GAE5BC,gBAAgBH,MAAMI,SAASC,OAC/BC,iBAAiBN,MAAMI,SAASG,QAEhCC,SAASV,eAAeW,OAAOC,KAAK,GACpCC,SAASb,eAAeW,OAAOG,KAAK;EAE1C,IAAIT,iBAAiB,KAAKG,kBAAkB,GAC1C,OAAO,CAAC;EAKV,IAAM,EAACS,SAASC,YAFY,CAAC,UAAU,KAAK,CAAC,CAACF,SAASb,IAEQY,IAC3D;GACEE,SAASE,MAAM,KAAMT,SAASL,eAAe,GAAG,CAAC;GACjDa,SAASf,SAAS,WAAW,IAAI;EACnC,IACA;GACEc,SAASd,WAAS;GAClBe,SAASC,MAAM,KAAMN,SAASL,gBAAgB,GAAG,CAAC;EACpD;EAEJ,OAAO,EACLY,MAAM;GAACH;GAASC;EAAO,EACzB;CACF;AACF;AAEA,SAASC,MAAME,KAAaC,KAAaC,KAAa;CACpD,OAAOC,KAAKF,IAAIE,KAAKD,IAAIF,KAAKC,GAAG,GAAGC,GAAG;AACzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPA,SAAOY,gBAAAC,IAAA;CAAA,IAAAC,IAAAC,EAAA,CAAA,GAAyB,EAAAR,MAAAS,eAAAR,YAAAC,aAAAI,IAI9B,CAAAN,MAAAU,WAAwBZ,SAASW,aAAa,GAK9CE,YAAkBF,kBAAkB;CAMpC,IAAIE,aAAaX,SAAS,WACN,OAAlBU,QAAQ,SAAS,GACV;CACR,IAAAE;CAAA,AAAAL,EAAA,OAAAM,OAAAC,IAAA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|
2
|
+
/**
|
|
3
|
+
* Defines a lazy, self-replacing property on `obj`.
|
|
4
|
+
*
|
|
5
|
+
* On first access the `factory` is called and the getter is replaced with the
|
|
6
|
+
* computed plain value — subsequent reads have zero overhead.
|
|
7
|
+
*
|
|
8
|
+
* The property is enumerable (visible in `Object.keys` / spread) in both states.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
function defineLazyProperty(obj, key, factory) {
|
|
13
|
+
Object.defineProperty(obj, key, {
|
|
14
|
+
get() {
|
|
15
|
+
let value = factory();
|
|
16
|
+
return Object.defineProperty(obj, key, {
|
|
17
|
+
value,
|
|
18
|
+
enumerable: !0,
|
|
19
|
+
writable: !1,
|
|
20
|
+
configurable: !1
|
|
21
|
+
}), value;
|
|
22
|
+
},
|
|
23
|
+
enumerable: !0,
|
|
24
|
+
configurable: !0
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/** @internal */
|
|
28
|
+
function is_v2(themeProp) {
|
|
29
|
+
return themeProp._version === 2;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Apply `neutral` and `suggest` if they're not already part of the color object,
|
|
33
|
+
* as this was introduced in v2.9, but is not compatible with v2.0.
|
|
34
|
+
*
|
|
35
|
+
* @param color - The color object to upgrade
|
|
36
|
+
* @returns The upgraded color object. Returns as-is if already upgraded.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
function themeColor_v0_v2_9(color) {
|
|
40
|
+
if ("neutral" in color.badge) return color;
|
|
41
|
+
let colors = color;
|
|
42
|
+
return {
|
|
43
|
+
...colors,
|
|
44
|
+
badge: {
|
|
45
|
+
...colors.badge,
|
|
46
|
+
neutral: colors.badge.default,
|
|
47
|
+
suggest: colors.badge.primary
|
|
48
|
+
},
|
|
49
|
+
button: {
|
|
50
|
+
bleed: {
|
|
51
|
+
...colors.button.bleed,
|
|
52
|
+
neutral: colors.button.bleed.default,
|
|
53
|
+
suggest: colors.button.bleed.primary
|
|
54
|
+
},
|
|
55
|
+
default: {
|
|
56
|
+
...colors.button.default,
|
|
57
|
+
neutral: colors.button.default.default,
|
|
58
|
+
suggest: colors.button.default.primary
|
|
59
|
+
},
|
|
60
|
+
ghost: {
|
|
61
|
+
...colors.button.ghost,
|
|
62
|
+
neutral: colors.button.ghost.default,
|
|
63
|
+
suggest: colors.button.ghost.primary
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
selectable: {
|
|
67
|
+
...colors.selectable,
|
|
68
|
+
neutral: colors.selectable.default,
|
|
69
|
+
suggest: colors.selectable.primary
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const cache$2 = /* @__PURE__ */ new WeakMap();
|
|
74
|
+
/** @internal */
|
|
75
|
+
function v0_v2(v0) {
|
|
76
|
+
if (v0.v2) return v0.v2;
|
|
77
|
+
let cached_v2 = cache$2.get(v0);
|
|
78
|
+
if (cached_v2) return cached_v2;
|
|
79
|
+
let { avatar, button, color, container, focusRing: _unused_focusRing, fonts: font, input, layer, media, radius, shadows: shadow, space, styles: style } = v0, v2 = {
|
|
80
|
+
_version: 2,
|
|
81
|
+
avatar: {
|
|
82
|
+
...defaultThemeConfig.avatar,
|
|
83
|
+
...avatar
|
|
84
|
+
},
|
|
85
|
+
button: {
|
|
86
|
+
...defaultThemeConfig.button,
|
|
87
|
+
...button
|
|
88
|
+
},
|
|
89
|
+
card: defaultThemeConfig.card,
|
|
90
|
+
color: {
|
|
91
|
+
light: {
|
|
92
|
+
transparent: themeColor_v0_v2(color.light.transparent),
|
|
93
|
+
default: themeColor_v0_v2(color.light.default),
|
|
94
|
+
neutral: themeColor_v0_v2(color.light.transparent),
|
|
95
|
+
primary: themeColor_v0_v2(color.light.primary),
|
|
96
|
+
suggest: themeColor_v0_v2(color.light.primary),
|
|
97
|
+
positive: themeColor_v0_v2(color.light.positive),
|
|
98
|
+
caution: themeColor_v0_v2(color.light.caution),
|
|
99
|
+
critical: themeColor_v0_v2(color.light.critical)
|
|
100
|
+
},
|
|
101
|
+
dark: {
|
|
102
|
+
transparent: themeColor_v0_v2(color.dark.transparent),
|
|
103
|
+
default: themeColor_v0_v2(color.dark.default),
|
|
104
|
+
neutral: themeColor_v0_v2(color.dark.transparent),
|
|
105
|
+
primary: themeColor_v0_v2(color.dark.primary),
|
|
106
|
+
suggest: themeColor_v0_v2(color.dark.primary),
|
|
107
|
+
positive: themeColor_v0_v2(color.dark.positive),
|
|
108
|
+
caution: themeColor_v0_v2(color.dark.caution),
|
|
109
|
+
critical: themeColor_v0_v2(color.dark.critical)
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
container,
|
|
113
|
+
font,
|
|
114
|
+
input: {
|
|
115
|
+
...defaultThemeConfig.input,
|
|
116
|
+
...input,
|
|
117
|
+
checkbox: {
|
|
118
|
+
...defaultThemeConfig.input.checkbox,
|
|
119
|
+
...input.checkbox
|
|
120
|
+
},
|
|
121
|
+
radio: {
|
|
122
|
+
...defaultThemeConfig.input.radio,
|
|
123
|
+
...input.radio
|
|
124
|
+
},
|
|
125
|
+
switch: {
|
|
126
|
+
...defaultThemeConfig.input.switch,
|
|
127
|
+
...input.switch
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
layer: layer ?? defaultThemeConfig.layer,
|
|
131
|
+
media,
|
|
132
|
+
radius,
|
|
133
|
+
shadow,
|
|
134
|
+
space,
|
|
135
|
+
style
|
|
136
|
+
};
|
|
137
|
+
return cache$2.set(v0, v2), v2;
|
|
138
|
+
}
|
|
139
|
+
const cache$1 = /* @__PURE__ */ new WeakMap(), V0_TONES = [
|
|
140
|
+
"transparent",
|
|
141
|
+
"default",
|
|
142
|
+
"primary",
|
|
143
|
+
"positive",
|
|
144
|
+
"caution",
|
|
145
|
+
"critical"
|
|
146
|
+
];
|
|
147
|
+
function lazyV0Scheme(schemeKey, color) {
|
|
148
|
+
let scheme = {};
|
|
149
|
+
for (let tone of V0_TONES) defineLazyProperty(scheme, tone, () => themeColor_v2_v0(color[schemeKey][tone]));
|
|
150
|
+
return scheme;
|
|
151
|
+
}
|
|
152
|
+
/** @internal */
|
|
153
|
+
function v2_v0(v2) {
|
|
154
|
+
let cachedTheme = cache$1.get(v2);
|
|
155
|
+
if (cachedTheme) return cachedTheme;
|
|
156
|
+
let { avatar, button, color, container, font: fonts, input, media, radius, shadow: shadows, space, style: styles } = v2, v0Color = {};
|
|
157
|
+
defineLazyProperty(v0Color, "light", () => lazyV0Scheme("light", color)), defineLazyProperty(v0Color, "dark", () => lazyV0Scheme("dark", color));
|
|
158
|
+
let theme = {
|
|
159
|
+
_version: 0,
|
|
160
|
+
avatar,
|
|
161
|
+
button,
|
|
162
|
+
container,
|
|
163
|
+
color: v0Color,
|
|
164
|
+
focusRing: input.text.focusRing,
|
|
165
|
+
fonts,
|
|
166
|
+
input,
|
|
167
|
+
media,
|
|
168
|
+
radius,
|
|
169
|
+
shadows,
|
|
170
|
+
space,
|
|
171
|
+
styles,
|
|
172
|
+
v2
|
|
173
|
+
};
|
|
174
|
+
return cache$1.set(v2, theme), theme;
|
|
175
|
+
}
|
|
176
|
+
function themeColor_v2_v0(color_v2) {
|
|
177
|
+
return {
|
|
178
|
+
base: {
|
|
179
|
+
bg: color_v2.bg,
|
|
180
|
+
fg: color_v2.fg,
|
|
181
|
+
border: color_v2.border,
|
|
182
|
+
focusRing: color_v2.focusRing,
|
|
183
|
+
shadow: color_v2.shadow
|
|
184
|
+
},
|
|
185
|
+
button: color_v2.button,
|
|
186
|
+
card: color_v2.selectable.default,
|
|
187
|
+
dark: color_v2._dark,
|
|
188
|
+
input: {
|
|
189
|
+
default: inputStatesThemeColor_v2_v0(color_v2.input.default),
|
|
190
|
+
invalid: inputStatesThemeColor_v2_v0(color_v2.input.invalid)
|
|
191
|
+
},
|
|
192
|
+
muted: {
|
|
193
|
+
...color_v2.button.ghost,
|
|
194
|
+
transparent: color_v2.button.ghost.default
|
|
195
|
+
},
|
|
196
|
+
solid: {
|
|
197
|
+
...color_v2.button.default,
|
|
198
|
+
transparent: color_v2.button.default.default
|
|
199
|
+
},
|
|
200
|
+
selectable: color_v2.selectable,
|
|
201
|
+
spot: {
|
|
202
|
+
gray: color_v2.avatar.gray.bg,
|
|
203
|
+
blue: color_v2.avatar.blue.bg,
|
|
204
|
+
purple: color_v2.avatar.purple.bg,
|
|
205
|
+
magenta: color_v2.avatar.magenta.bg,
|
|
206
|
+
red: color_v2.avatar.red.bg,
|
|
207
|
+
orange: color_v2.avatar.orange.bg,
|
|
208
|
+
yellow: color_v2.avatar.yellow.bg,
|
|
209
|
+
green: color_v2.avatar.green.bg,
|
|
210
|
+
cyan: color_v2.avatar.cyan.bg
|
|
211
|
+
},
|
|
212
|
+
syntax: color_v2.syntax
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
function inputStatesThemeColor_v2_v0(t) {
|
|
216
|
+
return {
|
|
217
|
+
enabled: inputStateThemeColor_v2_v0(t.enabled),
|
|
218
|
+
disabled: inputStateThemeColor_v2_v0(t.disabled),
|
|
219
|
+
readOnly: inputStateThemeColor_v2_v0(t.readOnly),
|
|
220
|
+
hovered: inputStateThemeColor_v2_v0(t.hovered)
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
function inputStateThemeColor_v2_v0(t) {
|
|
224
|
+
return {
|
|
225
|
+
bg: t.bg,
|
|
226
|
+
bg2: t.muted.bg,
|
|
227
|
+
border: t.border,
|
|
228
|
+
fg: t.fg,
|
|
229
|
+
placeholder: t.placeholder
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
const cache = /* @__PURE__ */ new Map();
|
|
233
|
+
/** @internal */
|
|
234
|
+
function getScopedTheme(themeProp, scheme, tone) {
|
|
235
|
+
let cachedTheme = _getCachedTheme(themeProp, scheme, tone);
|
|
236
|
+
if (cachedTheme) return cachedTheme;
|
|
237
|
+
let v0 = is_v2(themeProp) ? v2_v0(themeProp) : themeProp, v2 = is_v2(themeProp) ? themeProp : v0_v2(themeProp), layer_v0 = v0.layer || defaultThemeConfig.layer, colorScheme_v2 = v2.color[scheme] || v2.color.light, color_v2_9 = themeColor_v0_v2_9(colorScheme_v2[tone] || colorScheme_v2.default), layer_v2 = v2.layer || defaultThemeConfig.layer, { color: _v0Color, ...v0Rest } = v0, sanity = {
|
|
238
|
+
...v0Rest,
|
|
239
|
+
layer: layer_v0,
|
|
240
|
+
v2: {
|
|
241
|
+
...v2,
|
|
242
|
+
_resolved: !0,
|
|
243
|
+
color: color_v2_9,
|
|
244
|
+
layer: layer_v2
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
defineLazyProperty(sanity, "color", () => {
|
|
248
|
+
let colorScheme_v0 = v0.color[scheme] || v0.color.light;
|
|
249
|
+
return colorScheme_v0[tone] || colorScheme_v0.default;
|
|
250
|
+
});
|
|
251
|
+
let theme = { sanity };
|
|
252
|
+
return _setCachedTheme(themeProp, scheme, tone, theme), theme;
|
|
253
|
+
}
|
|
254
|
+
function _getCachedTheme(rootTheme, scheme, tone) {
|
|
255
|
+
let schemeCache = cache.get(scheme);
|
|
256
|
+
if (!schemeCache) return;
|
|
257
|
+
let toneCache = schemeCache.get(tone);
|
|
258
|
+
if (toneCache) return toneCache.get(rootTheme);
|
|
259
|
+
}
|
|
260
|
+
function _setCachedTheme(rootTheme, scheme, tone, theme) {
|
|
261
|
+
cache.has(scheme) || cache.set(scheme, /* @__PURE__ */ new Map());
|
|
262
|
+
let schemeCache = cache.get(scheme);
|
|
263
|
+
schemeCache.has(tone) || schemeCache.set(tone, /* @__PURE__ */ new WeakMap()), schemeCache.get(tone).set(rootTheme, theme);
|
|
264
|
+
}
|
|
265
|
+
export { defineLazyProperty as a, is_v2 as i, v2_v0 as n, v0_v2 as r, getScopedTheme as t };
|
|
266
|
+
|
|
267
|
+
//# sourceMappingURL=getScopedTheme-C-sZsyAz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getScopedTheme-C-sZsyAz.js","names":["defineLazyProperty","T","obj","key","K","factory","Object","defineProperty","get","value","enumerable","writable","configurable","RootTheme","RootTheme_v2","is_v2","themeProp","_version","ThemeColorCard_v2","themeColor_v0_v2_9","color","badge","colors","neutral","default","suggest","primary","button","bleed","ghost","selectable","defaultThemeConfig","RootTheme","RootTheme_v2","themeColor_v0_v2","cache","WeakMap","v0_v2","v0","v2","cached_v2","get","avatar","button","color","container","focusRing","_unused_focusRing","fonts","font","input","layer","media","radius","shadows","shadow","space","styles","style","_version","card","light","transparent","default","neutral","primary","suggest","positive","caution","critical","dark","checkbox","radio","switch","set","defineLazyProperty","ThemeColorCard_v2","ThemeColorInputMode_v2","ThemeColorInputState_v2","RootTheme","RootTheme_v2","ThemeColor","ThemeColorScheme","ThemeColorInputState","ThemeColorInputStates","cache","WeakMap","V0_TONES","const","lazyV0Scheme","schemeKey","color","scheme","tone","themeColor_v2_v0","v2_v0","v2","cachedTheme","get","avatar","button","container","font","fonts","input","media","radius","shadow","shadows","space","style","styles","v0Color","theme","_version","focusRing","text","set","color_v2","base","bg","fg","border","card","selectable","default","dark","_dark","inputStatesThemeColor_v2_v0","invalid","muted","ghost","transparent","solid","spot","gray","blue","purple","magenta","red","orange","yellow","green","cyan","syntax","t","enabled","inputStateThemeColor_v2_v0","disabled","readOnly","hovered","bg2","placeholder","defineLazyProperty","defaultThemeConfig","ThemeColorCardToneKey","ThemeColorSchemeKey","RootTheme","RootTheme_v2","Theme","ThemeColor","is_v2","themeColor_v0_v2_9","v0_v2","v2_v0","cache","Map","WeakMap","getScopedTheme","themeProp","scheme","tone","cachedTheme","_getCachedTheme","v0","v2","layer_v0","layer","colorScheme_v2","color","light","color_v2","default","color_v2_9","layer_v2","_v0Color","v0Rest","sanity","_resolved","colorScheme_v0","Record","theme","_setCachedTheme","rootTheme","schemeCache","get","undefined","toneCache","has","set"],"sources":["../src/theme/build/lib/lazy.ts","../src/theme/versioning/is_v2.ts","../src/theme/versioning/themeColor_v2_v2_9.ts","../src/theme/versioning/v0_v2.ts","../src/theme/versioning/v2_v0.ts","../src/theme/getScopedTheme.ts"],"sourcesContent":["/**\n * Defines a lazy, self-replacing property on `obj`.\n *\n * On first access the `factory` is called and the getter is replaced with the\n * computed plain value — subsequent reads have zero overhead.\n *\n * The property is enumerable (visible in `Object.keys` / spread) in both states.\n *\n * @internal\n */\nexport function defineLazyProperty<T extends object, K extends keyof T>(\n obj: T,\n key: K,\n factory: () => T[K],\n): void {\n Object.defineProperty(obj, key, {\n get() {\n const value = factory()\n Object.defineProperty(obj, key, {\n value,\n enumerable: true,\n writable: false,\n configurable: false,\n })\n return value\n },\n enumerable: true,\n configurable: true,\n })\n}\n","import {RootTheme, RootTheme_v2} from '../system/theme'\n\n/** @internal */\nexport function is_v2(themeProp: RootTheme | RootTheme_v2): themeProp is RootTheme_v2 {\n return themeProp._version === 2\n}\n","import type {ThemeColorCard_v2} from '../system/color/color'\n\n/**\n * Apply `neutral` and `suggest` if they're not already part of the color object,\n * as this was introduced in v2.9, but is not compatible with v2.0.\n *\n * @param color - The color object to upgrade\n * @returns The upgraded color object. Returns as-is if already upgraded.\n * @internal\n */\nexport function themeColor_v0_v2_9(color: ThemeColorCard_v2): ThemeColorCard_v2 {\n if ('neutral' in color.badge) {\n return color // Already at >= v2.9\n }\n\n // TypeScript narrows to `never` because the above should always be true\n // oxlint-disable-next-line no-unnecessary-type-assertion\n const colors = color as ThemeColorCard_v2\n\n return {\n ...colors,\n badge: {\n ...colors.badge,\n neutral: colors.badge.default,\n suggest: colors.badge.primary,\n },\n button: {\n bleed: {\n ...colors.button.bleed,\n neutral: colors.button.bleed.default,\n suggest: colors.button.bleed.primary,\n },\n default: {\n ...colors.button.default,\n neutral: colors.button.default.default,\n suggest: colors.button.default.primary,\n },\n ghost: {\n ...colors.button.ghost,\n neutral: colors.button.ghost.default,\n suggest: colors.button.ghost.primary,\n },\n },\n selectable: {\n ...colors.selectable,\n neutral: colors.selectable.default,\n suggest: colors.selectable.primary,\n },\n }\n}\n","import {defaultThemeConfig} from '../defaults/config'\nimport {RootTheme, RootTheme_v2} from '../system/theme'\nimport {themeColor_v0_v2} from './themeColor_v0_v2'\n\nconst cache = new WeakMap<RootTheme, RootTheme_v2>()\n\n/** @internal */\nexport function v0_v2(v0: RootTheme): RootTheme_v2 {\n if (v0.v2) return v0.v2\n\n const cached_v2 = cache.get(v0)\n\n if (cached_v2) return cached_v2\n\n const {\n // oxlint-disable-next-line no-deprecated\n avatar,\n // oxlint-disable-next-line no-deprecated\n button,\n // oxlint-disable-next-line no-deprecated\n color,\n // oxlint-disable-next-line no-deprecated\n container,\n // oxlint-disable-next-line no-deprecated\n focusRing: _unused_focusRing,\n // oxlint-disable-next-line no-deprecated\n fonts: font,\n // oxlint-disable-next-line no-deprecated\n input,\n // oxlint-disable-next-line no-deprecated\n layer,\n // oxlint-disable-next-line no-deprecated\n media,\n // oxlint-disable-next-line no-deprecated\n radius,\n // oxlint-disable-next-line no-deprecated\n shadows: shadow,\n // oxlint-disable-next-line no-deprecated\n space,\n // oxlint-disable-next-line no-deprecated\n styles: style,\n } = v0\n\n const v2: RootTheme_v2 = {\n _version: 2,\n avatar: {\n ...defaultThemeConfig.avatar,\n ...avatar,\n },\n button: {\n ...defaultThemeConfig.button,\n ...button,\n },\n card: defaultThemeConfig.card,\n color: {\n light: {\n transparent: themeColor_v0_v2(color.light.transparent),\n default: themeColor_v0_v2(color.light.default),\n neutral: themeColor_v0_v2(color.light.transparent),\n primary: themeColor_v0_v2(color.light.primary),\n suggest: themeColor_v0_v2(color.light.primary),\n positive: themeColor_v0_v2(color.light.positive),\n caution: themeColor_v0_v2(color.light.caution),\n critical: themeColor_v0_v2(color.light.critical),\n },\n dark: {\n transparent: themeColor_v0_v2(color.dark.transparent),\n default: themeColor_v0_v2(color.dark.default),\n neutral: themeColor_v0_v2(color.dark.transparent),\n primary: themeColor_v0_v2(color.dark.primary),\n suggest: themeColor_v0_v2(color.dark.primary),\n positive: themeColor_v0_v2(color.dark.positive),\n caution: themeColor_v0_v2(color.dark.caution),\n critical: themeColor_v0_v2(color.dark.critical),\n },\n },\n container,\n font,\n input: {\n ...defaultThemeConfig.input,\n ...input,\n checkbox: {\n ...defaultThemeConfig.input.checkbox,\n ...input.checkbox,\n },\n radio: {\n ...defaultThemeConfig.input.radio,\n ...input.radio,\n },\n switch: {\n ...defaultThemeConfig.input.switch,\n ...input.switch,\n },\n },\n layer: layer ?? defaultThemeConfig.layer,\n media,\n radius,\n shadow,\n space,\n style,\n }\n\n cache.set(v0, v2)\n\n return v2\n}\n","import {defineLazyProperty} from '../build/lib/lazy'\nimport {ThemeColorCard_v2} from '../system/color/color'\nimport {ThemeColorInputMode_v2, ThemeColorInputState_v2} from '../system/color/input'\nimport {RootTheme, RootTheme_v2} from '../system/theme'\nimport {ThemeColor, ThemeColorScheme} from '../system/v0/color/color'\nimport {ThemeColorInputState, ThemeColorInputStates} from '../system/v0/color/input'\n\nconst cache = new WeakMap<RootTheme_v2, RootTheme>()\n\nconst V0_TONES = ['transparent', 'default', 'primary', 'positive', 'caution', 'critical'] as const\n\n// oxlint-disable-next-line no-deprecated\nfunction lazyV0Scheme(schemeKey: 'light' | 'dark', color: RootTheme_v2['color']): ThemeColorScheme {\n // oxlint-disable-next-line no-deprecated, no-unsafe-type-assertion\n const scheme = {} as ThemeColorScheme\n\n for (const tone of V0_TONES) {\n defineLazyProperty(scheme, tone, () => themeColor_v2_v0(color[schemeKey][tone]))\n }\n\n return scheme\n}\n\n/** @internal */\nexport function v2_v0(v2: RootTheme_v2): RootTheme {\n const cachedTheme = cache.get(v2)\n\n if (cachedTheme) return cachedTheme\n\n const {\n avatar,\n button,\n color,\n container,\n font: fonts,\n input,\n media,\n radius,\n shadow: shadows,\n space,\n style: styles,\n } = v2\n\n // Lazy v0 color — two-level lazy structure so we don't force-evaluate\n // the v2 lazy getters until a v0 tone is actually accessed.\n // oxlint-disable-next-line no-unsafe-type-assertion\n const v0Color = {} as RootTheme['color']\n\n defineLazyProperty(v0Color, 'light', () => lazyV0Scheme('light', color))\n defineLazyProperty(v0Color, 'dark', () => lazyV0Scheme('dark', color))\n\n const theme: RootTheme = {\n _version: 0,\n // oxlint-disable-next-line no-deprecated\n avatar,\n // oxlint-disable-next-line no-deprecated\n button,\n // oxlint-disable-next-line no-deprecated\n container,\n // oxlint-disable-next-line no-deprecated\n color: v0Color,\n // oxlint-disable-next-line no-deprecated\n focusRing: input.text.focusRing,\n // oxlint-disable-next-line no-deprecated\n fonts,\n // oxlint-disable-next-line no-deprecated\n input,\n // oxlint-disable-next-line no-deprecated\n media,\n // oxlint-disable-next-line no-deprecated\n radius,\n // oxlint-disable-next-line no-deprecated\n shadows,\n // oxlint-disable-next-line no-deprecated\n space,\n // oxlint-disable-next-line no-deprecated\n styles,\n\n v2,\n }\n\n cache.set(v2, theme)\n\n return theme\n}\n\n// oxlint-disable-next-line no-deprecated\nfunction themeColor_v2_v0(color_v2: ThemeColorCard_v2): ThemeColor {\n return {\n base: {\n bg: color_v2.bg,\n fg: color_v2.fg,\n border: color_v2.border,\n focusRing: color_v2.focusRing,\n shadow: color_v2.shadow,\n },\n button: color_v2.button,\n card: color_v2.selectable.default,\n dark: color_v2._dark,\n input: {\n default: inputStatesThemeColor_v2_v0(color_v2.input.default),\n invalid: inputStatesThemeColor_v2_v0(color_v2.input.invalid),\n },\n muted: {\n ...color_v2.button.ghost,\n transparent: color_v2.button.ghost.default,\n },\n solid: {\n ...color_v2.button.default,\n transparent: color_v2.button.default.default,\n },\n selectable: color_v2.selectable,\n spot: {\n gray: color_v2.avatar.gray.bg,\n blue: color_v2.avatar.blue.bg,\n purple: color_v2.avatar.purple.bg,\n magenta: color_v2.avatar.magenta.bg,\n red: color_v2.avatar.red.bg,\n orange: color_v2.avatar.orange.bg,\n yellow: color_v2.avatar.yellow.bg,\n green: color_v2.avatar.green.bg,\n cyan: color_v2.avatar.cyan.bg,\n },\n syntax: color_v2.syntax,\n }\n}\n\n// oxlint-disable-next-line no-deprecated\nfunction inputStatesThemeColor_v2_v0(t: ThemeColorInputMode_v2): ThemeColorInputStates {\n return {\n enabled: inputStateThemeColor_v2_v0(t.enabled),\n disabled: inputStateThemeColor_v2_v0(t.disabled),\n readOnly: inputStateThemeColor_v2_v0(t.readOnly),\n hovered: inputStateThemeColor_v2_v0(t.hovered),\n }\n}\n\n// oxlint-disable-next-line no-deprecated\nfunction inputStateThemeColor_v2_v0(t: ThemeColorInputState_v2): ThemeColorInputState {\n return {\n bg: t.bg,\n bg2: t.muted.bg,\n border: t.border,\n fg: t.fg,\n placeholder: t.placeholder,\n }\n}\n","import {defineLazyProperty} from './build/lib/lazy'\nimport {defaultThemeConfig} from './defaults/config'\nimport {ThemeColorCardToneKey, ThemeColorSchemeKey} from './system/color/_system'\nimport {RootTheme, RootTheme_v2, Theme} from './system/theme'\nimport {ThemeColor} from './system/v0/color/color'\nimport {is_v2} from './versioning/is_v2'\nimport {themeColor_v0_v2_9} from './versioning/themeColor_v2_v2_9'\nimport {v0_v2} from './versioning/v0_v2'\nimport {v2_v0} from './versioning/v2_v0'\n\n// cache[scheme][tone][rootTheme] = theme\nconst cache = new Map<\n ThemeColorSchemeKey,\n Map<ThemeColorCardToneKey, WeakMap<RootTheme | RootTheme_v2, Theme>>\n>()\n\n/** @internal */\nexport function getScopedTheme(\n themeProp: RootTheme | RootTheme_v2,\n scheme: ThemeColorSchemeKey,\n tone: ThemeColorCardToneKey,\n): Theme {\n const cachedTheme = _getCachedTheme(themeProp, scheme, tone)\n\n if (cachedTheme) return cachedTheme\n\n const v0 = is_v2(themeProp) ? v2_v0(themeProp) : themeProp\n const v2 = is_v2(themeProp) ? themeProp : v0_v2(themeProp)\n\n // oxlint-disable-next-line no-deprecated\n const layer_v0 = v0.layer || defaultThemeConfig.layer\n\n const colorScheme_v2 = v2.color[scheme] || v2.color.light\n const color_v2 = colorScheme_v2[tone] || colorScheme_v2.default\n const color_v2_9 = themeColor_v0_v2_9(color_v2)\n const layer_v2 = v2.layer || defaultThemeConfig.layer\n\n // oxlint-disable-next-line no-deprecated\n const {color: _v0Color, ...v0Rest} = v0\n\n // oxlint-disable-next-line no-unsafe-type-assertion\n const sanity = {\n ...v0Rest,\n // oxlint-disable-next-line no-deprecated\n layer: layer_v0,\n v2: {\n ...v2,\n _resolved: true,\n color: color_v2_9,\n layer: layer_v2,\n },\n } as Theme['sanity']\n\n // Defer v0 color computation — only resolved if legacy code reads theme.sanity.color\n defineLazyProperty(sanity, 'color', () => {\n // oxlint-disable-next-line no-deprecated\n const colorScheme_v0 = v0.color[scheme] || v0.color.light\n // oxlint-disable-next-line no-deprecated\n return (colorScheme_v0 as Record<string, ThemeColor>)[tone] || colorScheme_v0.default\n })\n\n const theme: Theme = {sanity}\n\n _setCachedTheme(themeProp, scheme, tone, theme)\n\n return theme\n}\n\nfunction _getCachedTheme(\n rootTheme: RootTheme | RootTheme_v2,\n scheme: ThemeColorSchemeKey,\n tone: ThemeColorCardToneKey,\n) {\n const schemeCache = cache.get(scheme)\n\n if (!schemeCache) return undefined\n\n const toneCache = schemeCache.get(tone)\n\n if (!toneCache) return undefined\n\n return toneCache.get(rootTheme)\n}\n\nfunction _setCachedTheme(\n rootTheme: RootTheme | RootTheme_v2,\n scheme: ThemeColorSchemeKey,\n tone: ThemeColorCardToneKey,\n theme: Theme,\n) {\n if (!cache.has(scheme)) cache.set(scheme, new Map())\n\n const schemeCache = cache.get(scheme)!\n\n if (!schemeCache.has(tone)) schemeCache.set(tone, new WeakMap())\n\n const toneCache = schemeCache.get(tone)!\n\n toneCache.set(rootTheme, theme)\n}\n"],"mappings":";;;;;;;;;;;AAUA,SAAgBA,mBACdE,KACAC,KACAE,SACM;CACNC,OAAOC,eAAeL,KAAKC,KAAK;EAC9BK,MAAM;GACJ,IAAMC,QAAQJ,QAAQ;GAOtB,OANAC,OAAOC,eAAeL,KAAKC,KAAK;IAC9BM;IACAC,YAAY;IACZC,UAAU;IACVC,cAAc;GAChB,CAAC,GACMH;EACT;EACAC,YAAY;EACZE,cAAc;CAChB,CAAC;AACH;;A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