@sanity/ui 3.0.0-static.20 → 3.0.0-static.21
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/README.md +2 -1
- package/dist/_chunks-cjs/_visual-editing.cjs +198 -862
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
- package/dist/_chunks-cjs/refractor.cjs +0 -1
- package/dist/_chunks-cjs/refractor.cjs.map +1 -1
- package/dist/_chunks-es/_visual-editing.js +211 -874
- package/dist/_chunks-es/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/refractor.js +0 -1
- package/dist/_chunks-es/refractor.js.map +1 -1
- package/dist/_visual-editing.d.cts +34 -100
- package/dist/_visual-editing.d.ts +34 -100
- package/dist/css.cjs +368 -4123
- package/dist/css.cjs.map +1 -1
- package/dist/css.d.cts +13095 -8462
- package/dist/css.d.ts +13095 -8462
- package/dist/css.js +368 -4124
- package/dist/css.js.map +1 -1
- package/dist/index.cjs +769 -141
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +93 -287
- package/dist/index.d.ts +93 -287
- package/dist/index.js +740 -112
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs +31 -10
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.d.cts +2 -2
- package/dist/theme.d.ts +2 -2
- package/dist/theme.js +31 -10
- package/dist/theme.js.map +1 -1
- package/dist/ui.css +21459 -24610
- package/package.json +17 -12
- package/src/cli/buildCommand.ts +1 -91
- package/src/core/_compat/theme/themeColorProvider.tsx +0 -2
- package/src/core/_compat/theme/themeProvider.tsx +0 -2
- package/src/core/components/autocomplete/autocomplete.tsx +15 -15
- package/src/core/components/autocomplete/autocompleteOption.tsx +0 -2
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +2 -4
- package/src/core/components/dialog/dialog.tsx +9 -13
- package/src/core/components/dialog/dialogCard.tsx +2 -10
- package/src/core/components/dialog/dialogContext.ts +4 -2
- package/src/core/components/dialog/dialogProvider.tsx +3 -4
- package/src/core/components/hotkeys/hotkeys.tsx +0 -2
- package/src/core/components/menu/menu.tsx +2 -4
- package/src/core/components/menu/menuButton.tsx +0 -2
- package/src/core/components/menu/menuDivider.tsx +2 -4
- package/src/core/components/menu/menuGroup.tsx +0 -2
- package/src/core/components/menu/menuItem.tsx +2 -4
- package/src/core/components/skeleton/codeSkeleton.tsx +6 -10
- package/src/core/components/skeleton/headingSkeleton.tsx +6 -10
- package/src/core/components/skeleton/labelSkeleton.tsx +6 -10
- package/src/core/components/skeleton/skeleton.tsx +4 -8
- package/src/core/components/skeleton/textSkeleton.tsx +6 -10
- package/src/core/components/tab/tab.tsx +0 -2
- package/src/core/components/tab/tabList.tsx +0 -2
- package/src/core/components/tab/tabPanel.tsx +0 -2
- package/src/core/components/toast/toast.tsx +6 -36
- package/src/core/components/toast/toastLayer.tsx +0 -2
- package/src/core/components/toast/toastProvider.tsx +2 -3
- package/src/core/components/tree/tree.tsx +0 -2
- package/src/core/components/tree/treeGroup.tsx +0 -2
- package/src/core/components/tree/treeItem.tsx +3 -5
- package/src/core/helpers/props.ts +18 -0
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/useArrayProp.ts +1 -4
- package/src/core/hooks/useResponsiveProp.ts +28 -0
- package/src/core/index.ts +0 -1
- package/src/core/lib/isArray.ts +3 -0
- package/src/core/primitives/_selectable/selectable.tsx +2 -6
- package/src/core/primitives/avatar/avatar.tsx +15 -17
- package/src/core/primitives/avatar/avatarCounter.tsx +14 -15
- package/src/core/primitives/avatar/avatarStack.tsx +14 -22
- package/src/core/primitives/badge/badge.tsx +3 -10
- package/src/core/primitives/box/box.tsx +90 -70
- package/src/core/primitives/button/button.tsx +10 -21
- package/src/core/primitives/card/card.tsx +5 -11
- package/src/core/primitives/card/cardProvider.tsx +2 -2
- package/src/core/primitives/card/useCard.ts +1 -0
- package/src/core/primitives/checkbox/checkbox.tsx +4 -6
- package/src/core/primitives/code/code.tsx +5 -10
- package/src/core/primitives/code/refractor.tsx +0 -2
- package/src/core/primitives/container/container.tsx +2 -11
- package/src/core/primitives/flex/flex.tsx +29 -4
- package/src/core/primitives/grid/grid.tsx +0 -2
- package/src/core/primitives/heading/heading.tsx +8 -13
- package/src/core/primitives/inline/inline.tsx +22 -6
- package/src/core/primitives/kbd/kbd.tsx +2 -4
- package/src/core/primitives/label/label.tsx +7 -12
- package/src/core/primitives/popover/popover.tsx +11 -9
- package/src/core/primitives/popover/popoverLayer.tsx +1 -3
- package/src/core/primitives/radio/radio.tsx +4 -5
- package/src/core/primitives/select/select.tsx +0 -2
- package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +6 -10
- package/src/core/primitives/spinner/spinner.tsx +6 -6
- package/src/core/primitives/stack/stack.tsx +16 -6
- package/src/core/primitives/switch/switch.tsx +1 -4
- package/src/core/primitives/text/text.tsx +9 -19
- package/src/core/primitives/textArea/textArea.tsx +0 -2
- package/src/core/primitives/textInput/textInput.tsx +40 -47
- package/src/core/primitives/tooltip/tooltip.tsx +4 -12
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -2
- package/src/core/primitives/tooltip/tooltipLayer.tsx +0 -2
- package/src/core/primitives/types.ts +6 -6
- package/src/core/types/flex.ts +3 -3
- package/src/core/utils/arrow/arrow.tsx +11 -5
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +0 -2
- package/src/core/utils/elementQuery/elementQuery.tsx +0 -2
- package/src/core/utils/layer/layer.tsx +3 -3
- package/src/core/utils/layer/layerCard.tsx +0 -2
- package/src/core/utils/layer/layerProvider.tsx +6 -7
- package/src/core/utils/portal/portal.tsx +0 -2
- package/src/core/utils/portal/portalProvider.tsx +0 -2
- package/src/core/utils/srOnly/srOnly.tsx +2 -9
- package/src/core/utils/virtualList/virtualList.tsx +0 -2
- package/src/css/__theme/index.ts +16 -0
- package/src/css/__theme/lib/contract/buildVarContract.ts +78 -0
- package/src/css/__theme/lib/contract/index.ts +4 -0
- package/src/css/__theme/lib/contract/types.ts +17 -0
- package/src/css/__theme/resolveTheme.ts +865 -0
- package/src/css/_responsiveClassName.ts +45 -0
- package/src/css/_responsiveStyle.css.ts +34 -0
- package/src/css/_style.css.ts +9 -0
- package/src/css/components/breadcrumbs/breadcrumbs.css.ts +6 -0
- package/src/css/components/breadcrumbs/breadcrumbs.ts +4 -3
- package/src/css/components/dialog/dialog.css.ts +81 -0
- package/src/css/components/dialog/dialog.ts +12 -12
- package/src/css/components/index.ts +6 -0
- package/src/css/components/menu/menu.css.ts +14 -0
- package/src/css/components/menu/menu.ts +6 -5
- package/src/css/components/skeleton/skeleton.css.ts +132 -0
- package/src/css/components/skeleton/skeleton.ts +8 -8
- package/src/css/components/skeleton/types.ts +9 -3
- package/src/css/components/toast/toast.css.ts +16 -0
- package/src/css/components/toast/toast.ts +3 -18
- package/src/css/components/tree/tree.css.ts +65 -0
- package/src/css/components/tree/tree.ts +4 -3
- package/src/css/defaultTheme.css.ts +468 -0
- package/src/css/index.ts +11 -37
- package/src/css/layers.css.ts +9 -0
- package/src/css/primitives/_arrow/_arrow.css.ts +68 -0
- package/src/css/primitives/_arrow/_arrow.ts +10 -5
- package/src/css/primitives/_input/_input.css.ts +258 -0
- package/src/css/primitives/_input/input.ts +10 -12
- package/src/css/primitives/_input/types.ts +1 -1
- package/src/css/primitives/_selectable/_selectable.css.ts +121 -0
- package/src/css/primitives/_selectable/selectable.ts +3 -3
- package/src/css/primitives/_selectable/types.ts +2 -1
- package/src/css/primitives/avatar/avatar.css.ts +175 -0
- package/src/css/primitives/avatar/avatar.ts +45 -10
- package/src/css/primitives/avatar/types.ts +1 -0
- package/src/css/primitives/badge/badge.css.ts +26 -0
- package/src/css/primitives/badge/badge.ts +2 -6
- package/src/css/primitives/badge/types.ts +4 -3
- package/src/css/primitives/box/box.css.ts +19 -0
- package/src/css/primitives/box/box.ts +39 -9
- package/src/css/primitives/box/types.ts +35 -8
- package/src/css/primitives/button/button.css.ts +285 -0
- package/src/css/primitives/button/button.ts +10 -7
- package/src/css/primitives/button/types.ts +10 -4
- package/src/css/primitives/card/card.css.ts +365 -0
- package/src/css/primitives/card/card.ts +5 -4
- package/src/css/primitives/card/types.ts +2 -3
- package/src/css/primitives/checkbox/checkbox.css.ts +193 -0
- package/src/css/primitives/checkbox/checkbox.ts +11 -5
- package/src/css/primitives/code/code.css.ts +271 -0
- package/src/css/primitives/code/code.ts +8 -4
- package/src/css/primitives/code/types.ts +3 -2
- package/src/css/primitives/container/container.css.ts +4 -0
- package/src/css/primitives/container/container.ts +9 -3
- package/src/css/primitives/container/types.ts +1 -0
- package/src/css/primitives/heading/heading.css.ts +85 -0
- package/src/css/primitives/heading/heading.ts +9 -10
- package/src/css/primitives/heading/types.ts +3 -2
- package/src/css/primitives/index.ts +24 -0
- package/src/css/primitives/kbd/kbd.css.ts +16 -0
- package/src/css/primitives/kbd/kbd.ts +3 -3
- package/src/css/primitives/kbd/types.ts +2 -3
- package/src/css/primitives/label/label.css.ts +85 -0
- package/src/css/primitives/label/label.ts +9 -4
- package/src/css/primitives/label/types.ts +3 -2
- package/src/css/primitives/popover/popover.css.ts +6 -0
- package/src/css/primitives/popover/popover.ts +6 -5
- package/src/css/primitives/radio/radio.css.ts +78 -0
- package/src/css/primitives/radio/radio.ts +14 -3
- package/src/css/primitives/select/select.css.ts +24 -0
- package/src/css/primitives/select/select.ts +3 -3
- package/src/css/primitives/spinner/index.ts +1 -0
- package/src/css/primitives/spinner/spinner.css.ts +23 -0
- package/src/css/primitives/spinner/spinner.ts +7 -5
- package/src/css/primitives/spinner/types.ts +4 -0
- package/src/css/primitives/stack/stack.css.ts +6 -0
- package/src/css/primitives/stack/stack.ts +4 -3
- package/src/css/primitives/switch/switch.css.ts +98 -0
- package/src/css/primitives/switch/switch.ts +8 -7
- package/src/css/primitives/text/text.css.ts +85 -0
- package/src/css/primitives/text/text.ts +9 -5
- package/src/css/primitives/text/types.ts +3 -2
- package/src/css/primitives/textArea/textArea.css.ts +4 -0
- package/src/css/primitives/textArea/textArea.ts +2 -2
- package/src/css/primitives/textArea/types.ts +4 -2
- package/src/css/primitives/textInput/textInput.css.ts +41 -0
- package/src/css/primitives/textInput/textInput.ts +5 -5
- package/src/css/primitives/textInput/types.ts +4 -2
- package/src/css/primitives/tooltip/index.ts +1 -0
- package/src/css/primitives/tooltip/tooltip.css.ts +6 -0
- package/src/css/primitives/tooltip/tooltip.ts +7 -3
- package/src/css/primitives/tooltip/types.ts +4 -0
- package/src/css/props/alignItems/alignItems.css.ts +22 -0
- package/src/css/props/alignItems/alignItems.ts +8 -0
- package/src/css/props/alignItems/index.ts +2 -0
- package/src/css/props/alignItems/types.ts +9 -0
- package/src/css/props/border/border.css.ts +65 -0
- package/src/css/props/border/border.ts +36 -0
- package/src/css/props/border/types.ts +13 -0
- package/src/css/props/boxSizing/boxSizing.css.ts +11 -0
- package/src/css/props/boxSizing/boxSizing.ts +10 -0
- package/src/css/{aspects → props}/boxSizing/types.ts +1 -3
- package/src/css/props/display/display.css.ts +56 -0
- package/src/css/props/display/display.ts +17 -0
- package/src/css/props/flex/flex.css.ts +52 -0
- package/src/css/props/flex/flex.ts +8 -0
- package/src/css/props/flex/types.ts +9 -0
- package/src/css/props/flexDirection/flexDirection.css.ts +19 -0
- package/src/css/props/flexDirection/flexDirection.ts +8 -0
- package/src/css/props/flexDirection/index.ts +2 -0
- package/src/css/props/flexDirection/types.ts +9 -0
- package/src/css/props/flexWrap/flexWrap.css.ts +16 -0
- package/src/css/props/flexWrap/flexWrap.ts +8 -0
- package/src/css/props/flexWrap/index.ts +2 -0
- package/src/css/props/flexWrap/types.ts +9 -0
- package/src/css/props/font/font.css.ts +93 -0
- package/src/css/props/font/font.ts +8 -0
- package/src/css/props/gap/gap.css.ts +40 -0
- package/src/css/props/gap/gap.ts +13 -0
- package/src/css/props/gridAutoColumns/gridAutoColumns.css.ts +19 -0
- package/src/css/props/gridAutoColumns/gridAutoColumns.ts +8 -0
- package/src/css/props/gridAutoColumns/index.ts +2 -0
- package/src/css/props/gridAutoColumns/types.ts +19 -0
- package/src/css/props/gridAutoFlow/gridAutoFlow.css.ts +19 -0
- package/src/css/props/gridAutoFlow/gridAutoFlow.ts +8 -0
- package/src/css/props/gridAutoFlow/index.ts +2 -0
- package/src/css/props/gridAutoFlow/types.ts +13 -0
- package/src/css/props/gridAutoRows/gridAutoRows.css.ts +19 -0
- package/src/css/props/gridAutoRows/gridAutoRows.ts +8 -0
- package/src/css/props/gridAutoRows/index.ts +2 -0
- package/src/css/props/gridAutoRows/types.ts +13 -0
- package/src/css/props/gridColumn/gridColumn.css.ts +49 -0
- package/src/css/props/gridColumn/gridColumn.ts +8 -0
- package/src/css/props/gridColumn/index.ts +2 -0
- package/src/css/props/gridColumn/types.ts +19 -0
- package/src/css/props/gridColumnEnd/gridColumnEnd.css.ts +46 -0
- package/src/css/props/gridColumnEnd/gridColumnEnd.ts +8 -0
- package/src/css/props/gridColumnEnd/index.ts +2 -0
- package/src/css/props/gridColumnEnd/types.ts +19 -0
- package/src/css/props/gridColumnStart/gridColumnStart.css.ts +46 -0
- package/src/css/props/gridColumnStart/gridColumnStart.ts +11 -0
- package/src/css/props/gridColumnStart/index.ts +2 -0
- package/src/css/props/gridColumnStart/types.ts +19 -0
- package/src/css/props/gridRow/gridRow.css.ts +49 -0
- package/src/css/props/gridRow/gridRow.ts +8 -0
- package/src/css/props/gridRow/index.ts +2 -0
- package/src/css/props/gridRow/types.ts +19 -0
- package/src/css/props/gridRowEnd/gridRowEnd.css.ts +46 -0
- package/src/css/props/gridRowEnd/gridRowEnd.ts +8 -0
- package/src/css/props/gridRowEnd/index.ts +2 -0
- package/src/css/props/gridRowEnd/types.ts +19 -0
- package/src/css/props/gridRowStart/gridRowStart.css.ts +46 -0
- package/src/css/props/gridRowStart/gridRowStart.ts +8 -0
- package/src/css/props/gridRowStart/index.ts +2 -0
- package/src/css/props/gridRowStart/types.ts +19 -0
- package/src/css/props/gridTemplateColumns/gridTemplateColumns.css.ts +43 -0
- package/src/css/props/gridTemplateColumns/gridTemplateColumns.ts +8 -0
- package/src/css/props/gridTemplateColumns/index.ts +2 -0
- package/src/css/props/gridTemplateColumns/types.ts +19 -0
- package/src/css/props/gridTemplateRows/gridTemplateRows.css.ts +43 -0
- package/src/css/props/gridTemplateRows/gridTemplateRows.ts +8 -0
- package/src/css/props/gridTemplateRows/index.ts +2 -0
- package/src/css/props/gridTemplateRows/types.ts +19 -0
- package/src/css/props/height/height.css.ts +25 -0
- package/src/css/props/height/height.ts +8 -0
- package/src/css/{aspects → props}/height/index.ts +1 -0
- package/src/css/props/height/types.ts +15 -0
- package/src/css/{aspects → props}/index.ts +16 -3
- package/src/css/props/inset/inset.css.ts +37 -0
- package/src/css/props/inset/inset.ts +21 -0
- package/src/css/props/justifyContent/index.ts +2 -0
- package/src/css/props/justifyContent/justifyContent.css.ts +25 -0
- package/src/css/props/justifyContent/justifyContent.ts +8 -0
- package/src/css/props/justifyContent/types.ts +15 -0
- package/src/css/props/margin/margin.css.ts +117 -0
- package/src/css/props/margin/margin.ts +25 -0
- package/src/css/props/maxWidth/maxWidth.css.ts +32 -0
- package/src/css/props/maxWidth/maxWidth.ts +8 -0
- package/src/css/{aspects → props}/maxWidth/types.ts +4 -1
- package/src/css/props/minHeight/minHeight.css.ts +13 -0
- package/src/css/props/minHeight/minHeight.ts +8 -0
- package/src/css/props/minWidth/minWidth.css.ts +25 -0
- package/src/css/props/minWidth/minWidth.ts +8 -0
- package/src/css/props/outline/index.ts +2 -0
- package/src/css/props/outline/outline.css.ts +10 -0
- package/src/css/props/outline/outline.ts +8 -0
- package/src/css/props/outline/types.ts +7 -0
- package/src/css/props/overflow/overflow.css.ts +16 -0
- package/src/css/props/overflow/overflow.ts +8 -0
- package/src/css/props/overflow/types.ts +17 -0
- package/src/css/props/padding/padding.css.ts +87 -0
- package/src/css/props/padding/padding.ts +25 -0
- package/src/css/props/padding/types.ts +17 -0
- package/src/css/props/pointerEvents/pointerEvents.css.ts +13 -0
- package/src/css/props/pointerEvents/pointerEvents.ts +8 -0
- package/src/css/props/position/position.css.ts +22 -0
- package/src/css/props/position/position.ts +8 -0
- package/src/css/props/radius/radius.css.ts +21 -0
- package/src/css/props/radius/radius.ts +8 -0
- package/src/css/props/shadow/shadow.css.ts +23 -0
- package/src/css/props/shadow/shadow.ts +8 -0
- package/src/css/props/textAlign/textAlign.css.ts +22 -0
- package/src/css/props/textAlign/textAlign.ts +8 -0
- package/src/css/props/textOverflow/textOverflow.css.ts +13 -0
- package/src/css/props/textOverflow/textOverflow.ts +8 -0
- package/src/css/{aspects → props}/textOverflow/types.ts +5 -2
- package/src/css/{aspects → props}/width/types.ts +1 -1
- package/src/css/props/width/width.css.ts +28 -0
- package/src/css/props/width/width.ts +8 -0
- package/src/css/types.ts +223 -42
- package/src/css/util.ts +0 -10
- package/src/css/utils/index.ts +1 -0
- package/src/css/utils/srOnly/srOnly.css.ts +10 -0
- package/src/css/utils/srOnly/srOnly.ts +3 -3
- package/src/css/vars.css.ts +676 -0
- package/src/theme/v3/buildTheme_v3.ts +7 -2
- package/src/theme/v3/defaultFonts.ts +4 -4
- package/src/theme/v3/defaultTokens.ts +3 -3
- package/src/theme/v3/types.ts +3 -2
- package/src/theme/versioning/v3_v2.ts +24 -3
- package/dist/_chunks-cjs/buildCommand.cjs +0 -71
- package/dist/_chunks-cjs/buildCommand.cjs.map +0 -1
- package/dist/cli.cjs +0 -357
- package/dist/cli.cjs.map +0 -1
- package/dist/cli.d.cts +0 -1
- package/dist/ui-system.css +0 -24528
- package/dist/ui-system.min.css +0 -1
- package/dist/ui-theme.css +0 -1184
- package/dist/ui-theme.min.css +0 -1
- package/dist/ui.min.css +0 -1
- package/src/core/StyleTags.tsx +0 -18
- package/src/css/_compileStyle.ts +0 -156
- package/src/css/_compileSystem.ts +0 -7
- package/src/css/_compileTheme.ts +0 -13
- package/src/css/_hash.ts +0 -9
- package/src/css/_mergeStyles.ts +0 -24
- package/src/css/_resp.ts +0 -31
- package/src/css/_responsiveRule.ts +0 -38
- package/src/css/_scopeClassName.ts +0 -9
- package/src/css/_scopeClassNames.ts +0 -12
- package/src/css/_system.style.ts +0 -166
- package/src/css/aspects/border/border.style.ts +0 -13
- package/src/css/aspects/border/border.ts +0 -14
- package/src/css/aspects/border/types.ts +0 -10
- package/src/css/aspects/boxSizing/boxSizing.style.ts +0 -10
- package/src/css/aspects/boxSizing/boxSizing.ts +0 -8
- package/src/css/aspects/display/display.style.ts +0 -34
- package/src/css/aspects/display/display.ts +0 -8
- package/src/css/aspects/flex/flex.ts +0 -13
- package/src/css/aspects/flex/flexAlign.style.ts +0 -12
- package/src/css/aspects/flex/flexDirection.style.ts +0 -11
- package/src/css/aspects/flex/flexJustify.style.ts +0 -13
- package/src/css/aspects/flex/flexWrap.style.ts +0 -10
- package/src/css/aspects/flex/types.ts +0 -27
- package/src/css/aspects/flexItem/flex.style.ts +0 -22
- package/src/css/aspects/flexItem/flexItem.ts +0 -8
- package/src/css/aspects/flexItem/index.ts +0 -2
- package/src/css/aspects/flexItem/types.ts +0 -25
- package/src/css/aspects/font/font.style.ts +0 -83
- package/src/css/aspects/font/font.ts +0 -7
- package/src/css/aspects/gap/gap.style.ts +0 -21
- package/src/css/aspects/gap/gap.ts +0 -8
- package/src/css/aspects/grid/grid.ts +0 -14
- package/src/css/aspects/grid/gridAutoColumns.style.ts +0 -11
- package/src/css/aspects/grid/gridAutoFlow.style.ts +0 -11
- package/src/css/aspects/grid/gridAutoRows.style.ts +0 -11
- package/src/css/aspects/grid/gridColumns.style.ts +0 -18
- package/src/css/aspects/grid/gridRows.style.ts +0 -18
- package/src/css/aspects/grid/index.ts +0 -2
- package/src/css/aspects/grid/types.ts +0 -25
- package/src/css/aspects/gridItem/gridColumn.style.ts +0 -20
- package/src/css/aspects/gridItem/gridColumnEnd.style.ts +0 -20
- package/src/css/aspects/gridItem/gridColumnStart.style.ts +0 -20
- package/src/css/aspects/gridItem/gridItem.ts +0 -15
- package/src/css/aspects/gridItem/gridRow.style.ts +0 -20
- package/src/css/aspects/gridItem/gridRowEnd.style.ts +0 -20
- package/src/css/aspects/gridItem/gridRowStart.style.ts +0 -20
- package/src/css/aspects/gridItem/index.ts +0 -2
- package/src/css/aspects/gridItem/types.ts +0 -30
- package/src/css/aspects/height/height.style.ts +0 -9
- package/src/css/aspects/height/height.ts +0 -16
- package/src/css/aspects/inset/inset.style.ts +0 -12
- package/src/css/aspects/inset/inset.ts +0 -14
- package/src/css/aspects/margin/margin.style.ts +0 -56
- package/src/css/aspects/margin/margin.ts +0 -16
- package/src/css/aspects/maxWidth/maxWidth.style.ts +0 -16
- package/src/css/aspects/maxWidth/maxWidth.ts +0 -8
- package/src/css/aspects/minHeight/minHeight.style.ts +0 -9
- package/src/css/aspects/minHeight/minHeight.ts +0 -8
- package/src/css/aspects/minWidth/minWidth.style.ts +0 -13
- package/src/css/aspects/minWidth/minWidth.ts +0 -8
- package/src/css/aspects/outline/outline.style.ts +0 -9
- package/src/css/aspects/overflow/overflow.style.ts +0 -11
- package/src/css/aspects/overflow/overflow.ts +0 -12
- package/src/css/aspects/overflow/types.ts +0 -11
- package/src/css/aspects/padding/padding.style.ts +0 -43
- package/src/css/aspects/padding/padding.ts +0 -16
- package/src/css/aspects/padding/types.ts +0 -14
- package/src/css/aspects/pointerEvents/pointerEvents.style.ts +0 -13
- package/src/css/aspects/pointerEvents/pointerEvents.ts +0 -7
- package/src/css/aspects/position/position.style.ts +0 -12
- package/src/css/aspects/position/position.ts +0 -8
- package/src/css/aspects/radius/radius.style.ts +0 -16
- package/src/css/aspects/radius/radius.ts +0 -8
- package/src/css/aspects/shadow/shadow.style.ts +0 -24
- package/src/css/aspects/shadow/shadow.ts +0 -8
- package/src/css/aspects/textAlign/textAlign.style.ts +0 -26
- package/src/css/aspects/textAlign/textAlign.ts +0 -8
- package/src/css/aspects/textOverflow/textOverflow.style.ts +0 -21
- package/src/css/aspects/textOverflow/textOverflow.ts +0 -7
- package/src/css/aspects/width/width.style.ts +0 -11
- package/src/css/aspects/width/width.ts +0 -8
- package/src/css/components/breadcrumbs/breadcrumbs.style.ts +0 -9
- package/src/css/components/dialog/dialog.style.ts +0 -77
- package/src/css/components/menu/menu.style.ts +0 -17
- package/src/css/components/skeleton/skeleton.style.ts +0 -104
- package/src/css/components/toast/toast.style.ts +0 -20
- package/src/css/components/tree/tree.style.ts +0 -39
- package/src/css/prefix/constants.ts +0 -6
- package/src/css/prefix/index.ts +0 -2
- package/src/css/prefix/types.ts +0 -1
- package/src/css/primitives/_arrow/_arrow.style.ts +0 -69
- package/src/css/primitives/_input/_input.style.ts +0 -235
- package/src/css/primitives/_selectable/_selectable.style.ts +0 -129
- package/src/css/primitives/avatar/avatar.style.ts +0 -171
- package/src/css/primitives/badge/badge.style.ts +0 -21
- package/src/css/primitives/box/box.style.ts +0 -22
- package/src/css/primitives/button/button.style.ts +0 -275
- package/src/css/primitives/card/card.style.ts +0 -295
- package/src/css/primitives/checkbox/checkbox.style.ts +0 -178
- package/src/css/primitives/code/code.style.ts +0 -61
- package/src/css/primitives/container/container.style.ts +0 -10
- package/src/css/primitives/heading/heading.style.ts +0 -56
- package/src/css/primitives/kbd/kbd.style.ts +0 -19
- package/src/css/primitives/label/label.style.ts +0 -52
- package/src/css/primitives/popover/popover.style.ts +0 -9
- package/src/css/primitives/radio/radio.style.ts +0 -84
- package/src/css/primitives/select/select.style.ts +0 -24
- package/src/css/primitives/spinner/spinner.style.ts +0 -22
- package/src/css/primitives/stack/stack.style.ts +0 -13
- package/src/css/primitives/switch/switch.style.ts +0 -102
- package/src/css/primitives/text/text.style.ts +0 -65
- package/src/css/primitives/textArea/textArea.style.ts +0 -11
- package/src/css/primitives/textInput/textInput.style.ts +0 -46
- package/src/css/primitives/token/token.style.ts +0 -50
- package/src/css/primitives/tooltip/tooltip.style.ts +0 -9
- package/src/css/renderColor.ts +0 -31
- package/src/css/responsiveRules.ts +0 -18
- package/src/css/theme/index.ts +0 -14
- package/src/css/theme/lib/contract/buildVarContract.ts +0 -76
- package/src/css/theme/lib/contract/index.ts +0 -2
- package/src/css/theme/lib/contract/types.ts +0 -15
- package/src/css/theme/resolveTheme.ts +0 -863
- package/src/css/utils/srOnly/srOnly.style.ts +0 -14
- package/src/css/{aspects → props}/border/index.ts +0 -0
- package/src/css/{aspects → props}/boxSizing/index.ts +0 -0
- package/src/css/{aspects → props}/display/index.ts +0 -0
- package/src/css/{aspects → props}/display/types.ts +0 -0
- package/src/css/{aspects → props}/flex/index.ts +0 -0
- package/src/css/{aspects → props}/font/index.ts +0 -0
- package/src/css/{aspects → props}/font/types.ts +0 -0
- package/src/css/{aspects → props}/gap/index.ts +0 -0
- package/src/css/{aspects → props}/gap/types.ts +0 -0
- package/src/css/{aspects → props}/inset/index.ts +0 -0
- package/src/css/{aspects → props}/inset/types.ts +0 -0
- package/src/css/{aspects → props}/margin/index.ts +0 -0
- package/src/css/{aspects → props}/margin/types.ts +2 -2
- /package/src/css/{aspects → props}/maxWidth/index.ts +0 -0
- /package/src/css/{aspects → props}/minHeight/index.ts +0 -0
- /package/src/css/{aspects → props}/minHeight/types.ts +0 -0
- /package/src/css/{aspects → props}/minWidth/index.ts +0 -0
- /package/src/css/{aspects → props}/minWidth/types.ts +0 -0
- /package/src/css/{aspects → props}/overflow/index.ts +0 -0
- /package/src/css/{aspects → props}/padding/index.ts +0 -0
- /package/src/css/{aspects → props}/pointerEvents/index.ts +0 -0
- /package/src/css/{aspects → props}/pointerEvents/types.ts +0 -0
- /package/src/css/{aspects → props}/position/index.ts +0 -0
- /package/src/css/{aspects → props}/position/types.ts +0 -0
- /package/src/css/{aspects → props}/radius/index.ts +0 -0
- /package/src/css/{aspects → props}/radius/types.ts +0 -0
- /package/src/css/{aspects → props}/shadow/index.ts +0 -0
- /package/src/css/{aspects → props}/shadow/types.ts +0 -0
- /package/src/css/{aspects → props}/textAlign/index.ts +0 -0
- /package/src/css/{aspects → props}/textAlign/types.ts +0 -0
- /package/src/css/{aspects → props}/textOverflow/index.ts +0 -0
- /package/src/css/{aspects → props}/width/index.ts +0 -0
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import { getScopedTheme, getTheme_v2 } from "@sanity/ui/theme";
|
|
4
|
-
import { createContext, useContext,
|
|
4
|
+
import { createContext, useContext, useEffect, useDebugValue, useState, useSyncExternalStore, isValidElement, lazy, Suspense, useImperativeHandle, useRef, useMemo, useCallback, cloneElement, useId, useLayoutEffect, Children } from "react";
|
|
5
5
|
import { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1 } from "styled-components";
|
|
6
|
-
import { BREAKPOINTS,
|
|
6
|
+
import { BREAKPOINTS, box, text, textOverflow, animatedSpinnerIcon, spinner, button, buttonLoadingBox, card, code, kbd, _arrow, vars, _arrowSvg, _arrowStrokeMask, _arrowStroke, _arrowShape, popoverCard, popover, stack, textInput, textInputPrefix, textInputElement, _inputElement, _inputPresentation, textInputSuffix, tooltip, menu, menuDivider, _selectable } from "@sanity/ui/css";
|
|
7
|
+
import { ResizeObserver } from "@juggle/resize-observer";
|
|
8
|
+
import { useEffectEvent } from "use-effect-event";
|
|
9
|
+
import { SpinnerIcon, CloseIcon, ChevronRightIcon } from "@sanity/icons";
|
|
7
10
|
import { isValidElementType } from "react-is";
|
|
8
|
-
import { SpinnerIcon, CheckmarkIcon, RemoveIcon, ChevronDownIcon, CloseIcon, ChevronRightIcon } from "@sanity/icons";
|
|
9
11
|
import { detectOverflow, flip, offset, shift, arrow, hide, useFloating, autoUpdate } from "@floating-ui/react-dom";
|
|
10
12
|
import { motion, AnimatePresence } from "framer-motion";
|
|
11
|
-
import {
|
|
12
|
-
import { useEffectEvent } from "use-effect-event";
|
|
13
|
+
import { assignInlineVars } from "@vanilla-extract/dynamic";
|
|
13
14
|
import { createPortal } from "react-dom";
|
|
14
15
|
function getGlobalScope() {
|
|
15
16
|
if (typeof globalThis < "u") return globalThis;
|
|
@@ -40,7 +41,6 @@ function CardProvider(props) {
|
|
|
40
41
|
let t2;
|
|
41
42
|
return $[4] !== children || $[5] !== t0 ? (t2 = /* @__PURE__ */ jsx(CardContext.Provider, { value: t0, children }), $[4] = children, $[5] = t0, $[6] = t2) : t2 = $[6], t2;
|
|
42
43
|
}
|
|
43
|
-
CardProvider.displayName = "CardProvider";
|
|
44
44
|
const ThemeContext = createGlobalScopedContext("@sanity/ui/context/theme", null);
|
|
45
45
|
function ThemeProvider(props) {
|
|
46
46
|
const $ = c(19), parentTheme = useContext(ThemeContext), {
|
|
@@ -82,7 +82,6 @@ function ThemeProvider(props) {
|
|
|
82
82
|
let t4;
|
|
83
83
|
return $[15] !== scheme || $[16] !== t3 || $[17] !== tone ? (t4 = /* @__PURE__ */ jsx(CardProvider, { scheme, tone, unstable_CompatProvider: ThemeColorProvider, children: t3 }), $[15] = scheme, $[16] = t3, $[17] = tone, $[18] = t4) : t4 = $[18], t4;
|
|
84
84
|
}
|
|
85
|
-
ThemeProvider.displayName = "ThemeProvider";
|
|
86
85
|
function useRootTheme() {
|
|
87
86
|
const value = useContext(ThemeContext);
|
|
88
87
|
if (!value)
|
|
@@ -98,7 +97,6 @@ function ThemeColorProvider(props) {
|
|
|
98
97
|
let t1;
|
|
99
98
|
return $[0] !== children || $[1] !== root.theme || $[2] !== t0 || $[3] !== tone ? (t1 = /* @__PURE__ */ jsx(ThemeProvider, { scheme: t0, theme: root.theme, tone, children }), $[0] = children, $[1] = root.theme, $[2] = t0, $[3] = tone, $[4] = t1) : t1 = $[4], t1;
|
|
100
99
|
}
|
|
101
|
-
ThemeColorProvider.displayName = "ThemeColorProvider";
|
|
102
100
|
function useTheme() {
|
|
103
101
|
return useTheme$1();
|
|
104
102
|
}
|
|
@@ -164,23 +162,20 @@ function isHTMLTextAreaElement(element) {
|
|
|
164
162
|
function containsOrEqualsElement(element, node) {
|
|
165
163
|
return element.contains(node) || element === node;
|
|
166
164
|
}
|
|
165
|
+
function isArray(val) {
|
|
166
|
+
return Array.isArray(val);
|
|
167
|
+
}
|
|
168
|
+
function isRecord(value) {
|
|
169
|
+
return !!(value && typeof value == "object" && !Array.isArray(value));
|
|
170
|
+
}
|
|
167
171
|
function _getArrayProp(val, defaultVal) {
|
|
168
172
|
return val === void 0 ? defaultVal || EMPTY_ARRAY : Array.isArray(val) ? val : [val];
|
|
169
173
|
}
|
|
170
|
-
function
|
|
171
|
-
|
|
172
|
-
const style = window.getComputedStyle(el);
|
|
173
|
-
return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
|
|
174
|
-
}
|
|
175
|
-
function useArrayProp(val, defaultVal) {
|
|
176
|
-
const $ = c(3);
|
|
177
|
-
let t0;
|
|
178
|
-
$[0] !== defaultVal || $[1] !== val ? (t0 = () => [_getArrayProp(val, defaultVal), JSON.stringify(val ?? defaultVal)], $[0] = defaultVal, $[1] = val, $[2] = t0) : t0 = $[2];
|
|
179
|
-
const [t1, setCache] = useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val ?? defaultVal);
|
|
180
|
-
return hash !== cachedHash && setCache([_getArrayProp(val, defaultVal), hash]), cachedVal;
|
|
174
|
+
function _getResponsiveProp(val, defaultVal) {
|
|
175
|
+
return val === void 0 ? defaultVal || EMPTY_ARRAY : isArray(val) || isRecord(val) ? val : [val];
|
|
181
176
|
}
|
|
182
177
|
function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
183
|
-
const $ = c(9), elementsArg = t0 === void 0 ? _temp$
|
|
178
|
+
const $ = c(9), elementsArg = t0 === void 0 ? _temp$5 : t0;
|
|
184
179
|
let t1;
|
|
185
180
|
$[0] !== boundaryElement || $[1] !== elementsArg || $[2] !== listener ? (t1 = (evt) => {
|
|
186
181
|
if (!listener)
|
|
@@ -210,7 +205,7 @@ function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
|
210
205
|
let t3;
|
|
211
206
|
$[7] !== hasListener ? (t3 = [hasListener], $[7] = hasListener, $[8] = t3) : t3 = $[8], useEffect(t2, t3), useDebugValue(listener ? "MouseDown On" : "MouseDown Off");
|
|
212
207
|
}
|
|
213
|
-
function _temp$
|
|
208
|
+
function _temp$5() {
|
|
214
209
|
return EMPTY_ARRAY;
|
|
215
210
|
}
|
|
216
211
|
function useCustomValidity(ref, customValidity) {
|
|
@@ -350,23 +345,30 @@ function useMediaIndex() {
|
|
|
350
345
|
return useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot);
|
|
351
346
|
}
|
|
352
347
|
function usePrefersDark(t0) {
|
|
353
|
-
return useMatchMedia("(prefers-color-scheme: dark)", t0 === void 0 ? _temp$
|
|
348
|
+
return useMatchMedia("(prefers-color-scheme: dark)", t0 === void 0 ? _temp$4 : t0);
|
|
354
349
|
}
|
|
355
|
-
function _temp$
|
|
350
|
+
function _temp$4() {
|
|
356
351
|
return !1;
|
|
357
352
|
}
|
|
358
353
|
function usePrefersReducedMotion(t0) {
|
|
359
|
-
return useMatchMedia("(prefers-reduced-motion: reduce)", t0 === void 0 ? _temp$
|
|
354
|
+
return useMatchMedia("(prefers-reduced-motion: reduce)", t0 === void 0 ? _temp$3 : t0);
|
|
360
355
|
}
|
|
361
|
-
function _temp$
|
|
356
|
+
function _temp$3() {
|
|
362
357
|
return !1;
|
|
363
358
|
}
|
|
359
|
+
function useResponsiveProp(val, defaultVal) {
|
|
360
|
+
const $ = c(3);
|
|
361
|
+
let t0;
|
|
362
|
+
$[0] !== defaultVal || $[1] !== val ? (t0 = () => [_getResponsiveProp(val, defaultVal), JSON.stringify(val ?? defaultVal)], $[0] = defaultVal, $[1] = val, $[2] = t0) : t0 = $[2];
|
|
363
|
+
const [t1, setCache] = useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val ?? defaultVal);
|
|
364
|
+
return hash !== cachedHash && setCache([_getResponsiveProp(val, defaultVal), hash]), cachedVal;
|
|
365
|
+
}
|
|
364
366
|
const DEFAULT_BOX_ELEMENT = "div";
|
|
365
367
|
function Box(props) {
|
|
366
|
-
const $ = c(
|
|
367
|
-
let
|
|
368
|
+
const $ = c(154), t0 = props;
|
|
369
|
+
let alignItems, autoCols, autoFlow, autoRows, borderBottom, borderLeft, borderRight, borderTop, children, className, column, columnEnd, columnStart, columns, flex, flexDirection, flexWrap, gap, gapX, gapY, gridAutoColumns, gridAutoFlow, gridAutoRows, gridColumn, gridColumnEnd, gridColumnStart, gridRow, gridRowEnd, gridRowStart, gridTemplateColumns, gridTemplateRows, height, inset, insetBottom, insetLeft, insetRight, insetTop, justifyContent, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, maxWidth, muted, outline, overflow, overflowX, overflowY, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pointerEvents, position, radius, rest, row, rowEnd, rowStart, rows, shadow, t1, t2, t3, t4, t5, t6, t7, t8, textAlign, width;
|
|
368
370
|
$[0] !== t0 ? ({
|
|
369
|
-
|
|
371
|
+
alignItems,
|
|
370
372
|
as: t1,
|
|
371
373
|
autoCols,
|
|
372
374
|
autoFlow,
|
|
@@ -382,19 +384,31 @@ function Box(props) {
|
|
|
382
384
|
columnStart,
|
|
383
385
|
columnEnd,
|
|
384
386
|
columns,
|
|
385
|
-
direction,
|
|
386
387
|
display: t3,
|
|
387
388
|
flex,
|
|
389
|
+
flexDirection,
|
|
390
|
+
flexWrap,
|
|
388
391
|
gap,
|
|
389
392
|
gapX,
|
|
390
393
|
gapY,
|
|
394
|
+
gridAutoColumns,
|
|
395
|
+
gridAutoFlow,
|
|
396
|
+
gridAutoRows,
|
|
397
|
+
gridColumn,
|
|
398
|
+
gridColumnEnd,
|
|
399
|
+
gridColumnStart,
|
|
400
|
+
gridRow,
|
|
401
|
+
gridRowEnd,
|
|
402
|
+
gridRowStart,
|
|
403
|
+
gridTemplateColumns,
|
|
404
|
+
gridTemplateRows,
|
|
391
405
|
height,
|
|
392
406
|
inset,
|
|
393
407
|
insetBottom,
|
|
394
408
|
insetLeft,
|
|
395
409
|
insetRight,
|
|
396
410
|
insetTop,
|
|
397
|
-
|
|
411
|
+
justifyContent,
|
|
398
412
|
margin: t4,
|
|
399
413
|
marginX,
|
|
400
414
|
marginY,
|
|
@@ -424,16 +438,17 @@ function Box(props) {
|
|
|
424
438
|
rows,
|
|
425
439
|
rowStart,
|
|
426
440
|
rowEnd,
|
|
441
|
+
shadow,
|
|
427
442
|
sizing: t8,
|
|
428
443
|
textAlign,
|
|
429
444
|
width,
|
|
430
|
-
wrap,
|
|
431
445
|
...rest
|
|
432
|
-
} = t0, $[0] = t0, $[1] =
|
|
433
|
-
const
|
|
446
|
+
} = t0, $[0] = t0, $[1] = alignItems, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = borderBottom, $[6] = borderLeft, $[7] = borderRight, $[8] = borderTop, $[9] = children, $[10] = className, $[11] = column, $[12] = columnEnd, $[13] = columnStart, $[14] = columns, $[15] = flex, $[16] = flexDirection, $[17] = flexWrap, $[18] = gap, $[19] = gapX, $[20] = gapY, $[21] = gridAutoColumns, $[22] = gridAutoFlow, $[23] = gridAutoRows, $[24] = gridColumn, $[25] = gridColumnEnd, $[26] = gridColumnStart, $[27] = gridRow, $[28] = gridRowEnd, $[29] = gridRowStart, $[30] = gridTemplateColumns, $[31] = gridTemplateRows, $[32] = height, $[33] = inset, $[34] = insetBottom, $[35] = insetLeft, $[36] = insetRight, $[37] = insetTop, $[38] = justifyContent, $[39] = marginBottom, $[40] = marginLeft, $[41] = marginRight, $[42] = marginTop, $[43] = marginX, $[44] = marginY, $[45] = maxWidth, $[46] = muted, $[47] = outline, $[48] = overflow, $[49] = overflowX, $[50] = overflowY, $[51] = paddingBottom, $[52] = paddingLeft, $[53] = paddingRight, $[54] = paddingTop, $[55] = paddingX, $[56] = paddingY, $[57] = pointerEvents, $[58] = position, $[59] = radius, $[60] = rest, $[61] = row, $[62] = rowEnd, $[63] = rowStart, $[64] = rows, $[65] = shadow, $[66] = t1, $[67] = t2, $[68] = t3, $[69] = t4, $[70] = t5, $[71] = t6, $[72] = t7, $[73] = t8, $[74] = textAlign, $[75] = width) : (alignItems = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], borderBottom = $[5], borderLeft = $[6], borderRight = $[7], borderTop = $[8], children = $[9], className = $[10], column = $[11], columnEnd = $[12], columnStart = $[13], columns = $[14], flex = $[15], flexDirection = $[16], flexWrap = $[17], gap = $[18], gapX = $[19], gapY = $[20], gridAutoColumns = $[21], gridAutoFlow = $[22], gridAutoRows = $[23], gridColumn = $[24], gridColumnEnd = $[25], gridColumnStart = $[26], gridRow = $[27], gridRowEnd = $[28], gridRowStart = $[29], gridTemplateColumns = $[30], gridTemplateRows = $[31], height = $[32], inset = $[33], insetBottom = $[34], insetLeft = $[35], insetRight = $[36], insetTop = $[37], justifyContent = $[38], marginBottom = $[39], marginLeft = $[40], marginRight = $[41], marginTop = $[42], marginX = $[43], marginY = $[44], maxWidth = $[45], muted = $[46], outline = $[47], overflow = $[48], overflowX = $[49], overflowY = $[50], paddingBottom = $[51], paddingLeft = $[52], paddingRight = $[53], paddingTop = $[54], paddingX = $[55], paddingY = $[56], pointerEvents = $[57], position = $[58], radius = $[59], rest = $[60], row = $[61], rowEnd = $[62], rowStart = $[63], rows = $[64], shadow = $[65], t1 = $[66], t2 = $[67], t3 = $[68], t4 = $[69], t5 = $[70], t6 = $[71], t7 = $[72], t8 = $[73], textAlign = $[74], width = $[75]);
|
|
447
|
+
const Element = t1 === void 0 ? DEFAULT_BOX_ELEMENT : t1, border = t2 === void 0 ? !1 : t2, display = t3 === void 0 ? "block" : t3, margin = t4 === void 0 ? 0 : t4, minHeight = t5 === void 0 ? 0 : t5, minWidth = t6 === void 0 ? 0 : t6, padding = t7 === void 0 ? 0 : t7, sizing = t8 === void 0 ? "border" : t8;
|
|
434
448
|
let t9;
|
|
435
|
-
$[
|
|
436
|
-
|
|
449
|
+
$[76] !== alignItems || $[77] !== autoCols || $[78] !== autoFlow || $[79] !== autoRows || $[80] !== border || $[81] !== borderBottom || $[82] !== borderLeft || $[83] !== borderRight || $[84] !== borderTop || $[85] !== className || $[86] !== column || $[87] !== columnEnd || $[88] !== columnStart || $[89] !== columns || $[90] !== display || $[91] !== flex || $[92] !== flexDirection || $[93] !== flexWrap || $[94] !== gap || $[95] !== gapX || $[96] !== gapY || $[97] !== gridAutoColumns || $[98] !== gridAutoFlow || $[99] !== gridAutoRows || $[100] !== gridColumn || $[101] !== gridColumnEnd || $[102] !== gridColumnStart || $[103] !== gridRow || $[104] !== gridRowEnd || $[105] !== gridRowStart || $[106] !== gridTemplateColumns || $[107] !== gridTemplateRows || $[108] !== height || $[109] !== inset || $[110] !== insetBottom || $[111] !== insetLeft || $[112] !== insetRight || $[113] !== insetTop || $[114] !== justifyContent || $[115] !== margin || $[116] !== marginBottom || $[117] !== marginLeft || $[118] !== marginRight || $[119] !== marginTop || $[120] !== marginX || $[121] !== marginY || $[122] !== maxWidth || $[123] !== minHeight || $[124] !== minWidth || $[125] !== muted || $[126] !== outline || $[127] !== overflow || $[128] !== overflowX || $[129] !== overflowY || $[130] !== padding || $[131] !== paddingBottom || $[132] !== paddingLeft || $[133] !== paddingRight || $[134] !== paddingTop || $[135] !== paddingX || $[136] !== paddingY || $[137] !== pointerEvents || $[138] !== position || $[139] !== radius || $[140] !== row || $[141] !== rowEnd || $[142] !== rowStart || $[143] !== rows || $[144] !== shadow || $[145] !== sizing || $[146] !== textAlign || $[147] !== width ? (t9 = box({
|
|
450
|
+
className,
|
|
451
|
+
alignItems,
|
|
437
452
|
autoCols,
|
|
438
453
|
autoFlow,
|
|
439
454
|
autoRows,
|
|
@@ -446,19 +461,31 @@ function Box(props) {
|
|
|
446
461
|
columnStart,
|
|
447
462
|
columnEnd,
|
|
448
463
|
columns,
|
|
449
|
-
direction,
|
|
450
464
|
display,
|
|
451
465
|
flex,
|
|
466
|
+
flexDirection,
|
|
467
|
+
flexWrap,
|
|
452
468
|
gap,
|
|
453
469
|
gapX,
|
|
454
470
|
gapY,
|
|
471
|
+
gridAutoColumns,
|
|
472
|
+
gridAutoFlow,
|
|
473
|
+
gridAutoRows,
|
|
474
|
+
gridColumn,
|
|
475
|
+
gridColumnEnd,
|
|
476
|
+
gridColumnStart,
|
|
477
|
+
gridRow,
|
|
478
|
+
gridRowEnd,
|
|
479
|
+
gridRowStart,
|
|
480
|
+
gridTemplateColumns,
|
|
481
|
+
gridTemplateRows,
|
|
455
482
|
height,
|
|
456
483
|
inset,
|
|
457
484
|
insetBottom,
|
|
458
485
|
insetLeft,
|
|
459
486
|
insetRight,
|
|
460
487
|
insetTop,
|
|
461
|
-
|
|
488
|
+
justifyContent,
|
|
462
489
|
margin,
|
|
463
490
|
marginX,
|
|
464
491
|
marginY,
|
|
@@ -488,178 +515,14 @@ function Box(props) {
|
|
|
488
515
|
rows,
|
|
489
516
|
rowStart,
|
|
490
517
|
rowEnd,
|
|
518
|
+
shadow,
|
|
491
519
|
sizing,
|
|
492
520
|
textAlign,
|
|
493
|
-
width
|
|
494
|
-
|
|
495
|
-
})), $[64] = align, $[65] = autoCols, $[66] = autoFlow, $[67] = autoRows, $[68] = border, $[69] = borderBottom, $[70] = borderLeft, $[71] = borderRight, $[72] = borderTop, $[73] = className, $[74] = column, $[75] = columnEnd, $[76] = columnStart, $[77] = columns, $[78] = direction, $[79] = display, $[80] = flex, $[81] = gap, $[82] = gapX, $[83] = gapY, $[84] = height, $[85] = inset, $[86] = insetBottom, $[87] = insetLeft, $[88] = insetRight, $[89] = insetTop, $[90] = justify, $[91] = margin, $[92] = marginBottom, $[93] = marginLeft, $[94] = marginRight, $[95] = marginTop, $[96] = marginX, $[97] = marginY, $[98] = maxWidth, $[99] = minHeight, $[100] = minWidth, $[101] = muted, $[102] = outline, $[103] = overflow, $[104] = overflowX, $[105] = overflowY, $[106] = padding, $[107] = paddingBottom, $[108] = paddingLeft, $[109] = paddingRight, $[110] = paddingTop, $[111] = paddingX, $[112] = paddingY, $[113] = pointerEvents, $[114] = position, $[115] = radius, $[116] = row, $[117] = rowEnd, $[118] = rowStart, $[119] = rows, $[120] = sizing, $[121] = textAlign, $[122] = width, $[123] = wrap, $[124] = t9) : t9 = $[124];
|
|
496
|
-
let t10;
|
|
497
|
-
return $[125] !== Element2 || $[126] !== children || $[127] !== rest || $[128] !== t9 ? (t10 = /* @__PURE__ */ jsx(Element2, { "data-ui": "Box", ...rest, className: t9, children }), $[125] = Element2, $[126] = children, $[127] = rest, $[128] = t9, $[129] = t10) : t10 = $[129], t10;
|
|
498
|
-
}
|
|
499
|
-
Box.displayName = "Box";
|
|
500
|
-
const DEFAULT_LABEL_ELEMENT = "div";
|
|
501
|
-
function Label(props) {
|
|
502
|
-
const $ = c(28);
|
|
503
|
-
let accent, align, children, className, rest, t0, t1, t2, t3, textOverflowProp;
|
|
504
|
-
$[0] !== props ? ({
|
|
505
|
-
accent,
|
|
506
|
-
align,
|
|
507
|
-
as: t0,
|
|
508
|
-
children,
|
|
509
|
-
className,
|
|
510
|
-
muted: t1,
|
|
511
|
-
size: t2,
|
|
512
|
-
textOverflow: textOverflowProp,
|
|
513
|
-
weight: t3,
|
|
514
|
-
...rest
|
|
515
|
-
} = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = children, $[4] = className, $[5] = rest, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = textOverflowProp) : (accent = $[1], align = $[2], children = $[3], className = $[4], rest = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9], textOverflowProp = $[10]);
|
|
516
|
-
const Element2 = t0 === void 0 ? DEFAULT_LABEL_ELEMENT : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 1 : t2, weight = t3 === void 0 ? "regular" : t3;
|
|
517
|
-
let t4;
|
|
518
|
-
$[11] !== accent || $[12] !== align || $[13] !== className || $[14] !== muted || $[15] !== size2 || $[16] !== weight ? (t4 = _composeClassNames(className, label({
|
|
519
|
-
accent,
|
|
520
|
-
align,
|
|
521
|
-
muted,
|
|
522
|
-
size: size2,
|
|
523
|
-
weight
|
|
524
|
-
})), $[11] = accent, $[12] = align, $[13] = className, $[14] = muted, $[15] = size2, $[16] = weight, $[17] = t4) : t4 = $[17];
|
|
525
|
-
let t5;
|
|
526
|
-
$[18] !== textOverflowProp ? (t5 = textOverflow({
|
|
527
|
-
textOverflow: textOverflowProp
|
|
528
|
-
}), $[18] = textOverflowProp, $[19] = t5) : t5 = $[19];
|
|
529
|
-
let t6;
|
|
530
|
-
$[20] !== children || $[21] !== t5 ? (t6 = /* @__PURE__ */ jsx("span", { className: t5, children }), $[20] = children, $[21] = t5, $[22] = t6) : t6 = $[22];
|
|
531
|
-
let t7;
|
|
532
|
-
return $[23] !== Element2 || $[24] !== rest || $[25] !== t4 || $[26] !== t6 ? (t7 = /* @__PURE__ */ jsx(Element2, { "data-ui": "Label", ...rest, className: t4, children: t6 }), $[23] = Element2, $[24] = rest, $[25] = t4, $[26] = t6, $[27] = t7) : t7 = $[27], t7;
|
|
533
|
-
}
|
|
534
|
-
Label.displayName = "Label";
|
|
535
|
-
const DEFAULT_AVATAR_ELEMENT = "div";
|
|
536
|
-
function Avatar(props) {
|
|
537
|
-
const $ = c(51), t0 = props;
|
|
538
|
-
let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, className, initials, onImageLoadError, rest, src, t1, t2, t3, t4, title;
|
|
539
|
-
$[0] !== t0 ? ({
|
|
540
|
-
__unstable_hideInnerStroke,
|
|
541
|
-
as: t1,
|
|
542
|
-
className,
|
|
543
|
-
color: t2,
|
|
544
|
-
src,
|
|
545
|
-
title,
|
|
546
|
-
initials,
|
|
547
|
-
onImageLoadError,
|
|
548
|
-
arrowPosition: arrowPositionProp,
|
|
549
|
-
animateArrowFrom,
|
|
550
|
-
status: t3,
|
|
551
|
-
size: t4,
|
|
552
|
-
...rest
|
|
553
|
-
} = t0, $[0] = t0, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = className, $[5] = initials, $[6] = onImageLoadError, $[7] = rest, $[8] = src, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = t4, $[13] = title) : (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], className = $[4], initials = $[5], onImageLoadError = $[6], rest = $[7], src = $[8], t1 = $[9], t2 = $[10], t3 = $[11], t4 = $[12], title = $[13]);
|
|
554
|
-
const Element2 = t1 === void 0 ? DEFAULT_AVATAR_ELEMENT : t1, color = t2 === void 0 ? "magenta" : t2, sizeProp = t4 === void 0 ? 1 : t4, size2 = useArrayProp(sizeProp), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageError, setImageError] = useState(!1);
|
|
555
|
-
let t5, t6;
|
|
556
|
-
$[14] !== arrowPosition || $[15] !== arrowPositionProp ? (t5 = () => {
|
|
557
|
-
if (arrowPosition === arrowPositionProp)
|
|
558
|
-
return;
|
|
559
|
-
const raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
|
|
560
|
-
return () => cancelAnimationFrame(raf);
|
|
561
|
-
}, t6 = [arrowPosition, arrowPositionProp], $[14] = arrowPosition, $[15] = arrowPositionProp, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), useEffect(t5, t6);
|
|
562
|
-
let t7, t8;
|
|
563
|
-
$[18] !== src ? (t7 = () => {
|
|
564
|
-
src && setImageError(!1);
|
|
565
|
-
}, t8 = [src], $[18] = src, $[19] = t7, $[20] = t8) : (t7 = $[19], t8 = $[20]), useEffect(t7, t8);
|
|
566
|
-
let t9;
|
|
567
|
-
$[21] !== onImageLoadError ? (t9 = () => {
|
|
568
|
-
setImageError(!0), onImageLoadError && onImageLoadError(new Error("Avatar: the image failed to load"));
|
|
569
|
-
}, $[21] = onImageLoadError, $[22] = t9) : t9 = $[22];
|
|
570
|
-
const handleImageError = t9;
|
|
571
|
-
let t10, t11;
|
|
572
|
-
$[23] !== size2 ? (t11 = size2.map(_temp$4), $[23] = size2, $[24] = t11) : t11 = $[24], t10 = t11;
|
|
573
|
-
const initialsSize = t10, t12 = __unstable_hideInnerStroke ? "" : void 0;
|
|
574
|
-
let t13;
|
|
575
|
-
$[25] !== className || $[26] !== color || $[27] !== sizeProp ? (t13 = _composeClassNames(className, avatar({
|
|
576
|
-
color,
|
|
577
|
-
size: sizeProp
|
|
578
|
-
})), $[25] = className, $[26] = color, $[27] = sizeProp, $[28] = t13) : t13 = $[28];
|
|
579
|
-
const t14 = imageError ? "" : void 0;
|
|
580
|
-
let t15;
|
|
581
|
-
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t15 = avatarArrow(), $[29] = t15) : t15 = $[29];
|
|
582
|
-
let t16;
|
|
583
|
-
$[30] !== color ? (t16 = /* @__PURE__ */ jsx("span", { className: t15, children: /* @__PURE__ */ jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }), $[30] = color, $[31] = t16) : t16 = $[31];
|
|
584
|
-
let t17;
|
|
585
|
-
$[32] === Symbol.for("react.memo_cache_sentinel") ? (t17 = avatarInitials(), $[32] = t17) : t17 = $[32];
|
|
586
|
-
let t18;
|
|
587
|
-
$[33] !== initials || $[34] !== initialsSize ? (t18 = /* @__PURE__ */ jsx(Box, { align: "center", as: "span", className: t17, display: "flex", justify: "center", position: "absolute", inset: 0, children: /* @__PURE__ */ jsx(Label, { align: "center", as: "span", size: initialsSize, weight: "medium", children: initials }) }), $[33] = initials, $[34] = initialsSize, $[35] = t18) : t18 = $[35];
|
|
588
|
-
let t19;
|
|
589
|
-
$[36] !== handleImageError || $[37] !== initials || $[38] !== src ? (t19 = src && /* @__PURE__ */ jsxs(Box, { className: avatarImage(), inset: 0, position: "absolute", children: [
|
|
590
|
-
/* @__PURE__ */ jsx("img", { alt: initials, onError: handleImageError, src }),
|
|
591
|
-
/* @__PURE__ */ jsx("span", {})
|
|
592
|
-
] }), $[36] = handleImageError, $[37] = initials, $[38] = src, $[39] = t19) : t19 = $[39];
|
|
593
|
-
let t20;
|
|
594
|
-
return $[40] !== Element2 || $[41] !== arrowPosition || $[42] !== rest || $[43] !== t12 || $[44] !== t13 || $[45] !== t14 || $[46] !== t16 || $[47] !== t18 || $[48] !== t19 || $[49] !== title ? (t20 = /* @__PURE__ */ jsxs(Element2, { "data-hide-inner-stroke": t12, "data-ui": "Avatar", ...rest, "aria-label": title, className: t13, "data-arrow-position": arrowPosition, "data-image-error": t14, title, children: [
|
|
595
|
-
t16,
|
|
596
|
-
t18,
|
|
597
|
-
t19
|
|
598
|
-
] }), $[40] = Element2, $[41] = arrowPosition, $[42] = rest, $[43] = t12, $[44] = t13, $[45] = t14, $[46] = t16, $[47] = t18, $[48] = t19, $[49] = title, $[50] = t20) : t20 = $[50], t20;
|
|
599
|
-
}
|
|
600
|
-
function _temp$4(s) {
|
|
601
|
-
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
602
|
-
}
|
|
603
|
-
Avatar.displayName = "Avatar";
|
|
604
|
-
const DEFAULT_AVATAR_COUNTER_ELEMENT = "div";
|
|
605
|
-
function AvatarCounter(props) {
|
|
606
|
-
const $ = c(19), t0 = props;
|
|
607
|
-
let className, count, rest, t1, t2;
|
|
608
|
-
$[0] !== t0 ? ({
|
|
609
|
-
as: t1,
|
|
610
|
-
className,
|
|
611
|
-
count,
|
|
612
|
-
size: t2,
|
|
613
|
-
...rest
|
|
614
|
-
} = t0, $[0] = t0, $[1] = className, $[2] = count, $[3] = rest, $[4] = t1, $[5] = t2) : (className = $[1], count = $[2], rest = $[3], t1 = $[4], t2 = $[5]);
|
|
615
|
-
const as = t1 === void 0 ? DEFAULT_AVATAR_COUNTER_ELEMENT : t1, size2 = useArrayProp(t2 === void 0 ? 1 : t2);
|
|
616
|
-
let t3, t4;
|
|
617
|
-
$[6] !== size2 ? (t4 = size2.map(_temp$3), $[6] = size2, $[7] = t4) : t4 = $[7], t3 = t4;
|
|
618
|
-
const labelSize = t3;
|
|
619
|
-
let t5;
|
|
620
|
-
$[8] !== className || $[9] !== size2 ? (t5 = _composeClassNames(className, avatarCounter({
|
|
621
|
-
size: size2
|
|
622
|
-
})), $[8] = className, $[9] = size2, $[10] = t5) : t5 = $[10];
|
|
623
|
-
let t6;
|
|
624
|
-
$[11] !== count || $[12] !== labelSize ? (t6 = /* @__PURE__ */ jsx(Label, { align: "center", as: "span", size: labelSize, weight: "medium", children: count }), $[11] = count, $[12] = labelSize, $[13] = t6) : t6 = $[13];
|
|
625
|
-
let t7;
|
|
626
|
-
return $[14] !== as || $[15] !== rest || $[16] !== t5 || $[17] !== t6 ? (t7 = /* @__PURE__ */ jsx(Box, { "data-ui": "AvatarCounter", ...rest, align: "center", as, className: t5, display: "flex", justify: "center", paddingX: 2, sizing: "border", children: t6 }), $[14] = as, $[15] = rest, $[16] = t5, $[17] = t6, $[18] = t7) : t7 = $[18], t7;
|
|
627
|
-
}
|
|
628
|
-
function _temp$3(s) {
|
|
629
|
-
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
630
|
-
}
|
|
631
|
-
AvatarCounter.displayName = "AvatarCounter";
|
|
632
|
-
const DEFAULT_AVATAR_STACK_ELEMENT = "div";
|
|
633
|
-
function AvatarStack(props) {
|
|
634
|
-
const $ = c(20), t0 = props;
|
|
635
|
-
let childrenProp, className, rest, t1, t2, t3;
|
|
636
|
-
$[0] !== t0 ? ({
|
|
637
|
-
as: t1,
|
|
638
|
-
children: childrenProp,
|
|
639
|
-
className,
|
|
640
|
-
maxLength: t2,
|
|
641
|
-
size: t3,
|
|
642
|
-
...rest
|
|
643
|
-
} = t0, $[0] = t0, $[1] = childrenProp, $[2] = className, $[3] = rest, $[4] = t1, $[5] = t2, $[6] = t3) : (childrenProp = $[1], className = $[2], rest = $[3], t1 = $[4], t2 = $[5], t3 = $[6]);
|
|
644
|
-
const as = t1 === void 0 ? DEFAULT_AVATAR_STACK_ELEMENT : t1, maxLengthProp = t2 === void 0 ? 4 : t2, sizeProp = t3 === void 0 ? 1 : t3, children = Children.toArray(childrenProp).filter(isValidElement), maxLength = Math.max(maxLengthProp, 0), size2 = useArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children, T0 = Box, t4 = "AvatarStack", t5 = "center";
|
|
645
|
-
let t6;
|
|
646
|
-
$[7] !== className || $[8] !== size2 ? (t6 = _composeClassNames(className, avatarStack({
|
|
647
|
-
size: size2
|
|
648
|
-
})), $[7] = className, $[8] = size2, $[9] = t6) : t6 = $[9];
|
|
649
|
-
const t7 = "flex", t8 = len === 0 && /* @__PURE__ */ jsx(Box, { flex: "none", children: /* @__PURE__ */ jsx(AvatarCounter, { count: len, size: size2 }) }), t9 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx(Box, { flex: "none", children: /* @__PURE__ */ jsx(AvatarCounter, { count: extraCount, size: size2 }) });
|
|
521
|
+
width
|
|
522
|
+
}), $[76] = alignItems, $[77] = autoCols, $[78] = autoFlow, $[79] = autoRows, $[80] = border, $[81] = borderBottom, $[82] = borderLeft, $[83] = borderRight, $[84] = borderTop, $[85] = className, $[86] = column, $[87] = columnEnd, $[88] = columnStart, $[89] = columns, $[90] = display, $[91] = flex, $[92] = flexDirection, $[93] = flexWrap, $[94] = gap, $[95] = gapX, $[96] = gapY, $[97] = gridAutoColumns, $[98] = gridAutoFlow, $[99] = gridAutoRows, $[100] = gridColumn, $[101] = gridColumnEnd, $[102] = gridColumnStart, $[103] = gridRow, $[104] = gridRowEnd, $[105] = gridRowStart, $[106] = gridTemplateColumns, $[107] = gridTemplateRows, $[108] = height, $[109] = inset, $[110] = insetBottom, $[111] = insetLeft, $[112] = insetRight, $[113] = insetTop, $[114] = justifyContent, $[115] = margin, $[116] = marginBottom, $[117] = marginLeft, $[118] = marginRight, $[119] = marginTop, $[120] = marginX, $[121] = marginY, $[122] = maxWidth, $[123] = minHeight, $[124] = minWidth, $[125] = muted, $[126] = outline, $[127] = overflow, $[128] = overflowX, $[129] = overflowY, $[130] = padding, $[131] = paddingBottom, $[132] = paddingLeft, $[133] = paddingRight, $[134] = paddingTop, $[135] = paddingX, $[136] = paddingY, $[137] = pointerEvents, $[138] = position, $[139] = radius, $[140] = row, $[141] = rowEnd, $[142] = rowStart, $[143] = rows, $[144] = shadow, $[145] = sizing, $[146] = textAlign, $[147] = width, $[148] = t9) : t9 = $[148];
|
|
650
523
|
let t10;
|
|
651
|
-
$[
|
|
652
|
-
size: size2
|
|
653
|
-
}) }, String(childIndex)), $[10] = size2, $[11] = t10) : t10 = $[11];
|
|
654
|
-
const t11 = visibleChildren.map(t10);
|
|
655
|
-
let t12;
|
|
656
|
-
return $[12] !== T0 || $[13] !== as || $[14] !== rest || $[15] !== t11 || $[16] !== t6 || $[17] !== t8 || $[18] !== t9 ? (t12 = /* @__PURE__ */ jsxs(T0, { "data-ui": t4, ...rest, align: t5, as, className: t6, display: t7, children: [
|
|
657
|
-
t8,
|
|
658
|
-
t9,
|
|
659
|
-
t11
|
|
660
|
-
] }), $[12] = T0, $[13] = as, $[14] = rest, $[15] = t11, $[16] = t6, $[17] = t8, $[18] = t9, $[19] = t12) : t12 = $[19], t12;
|
|
524
|
+
return $[149] !== Element || $[150] !== children || $[151] !== rest || $[152] !== t9 ? (t10 = /* @__PURE__ */ jsx(Element, { "data-ui": "Box", ...rest, className: t9, children }), $[149] = Element, $[150] = children, $[151] = rest, $[152] = t9, $[153] = t10) : t10 = $[153], t10;
|
|
661
525
|
}
|
|
662
|
-
AvatarStack.displayName = "AvatarStack";
|
|
663
526
|
const DEFAULT_TEXT_ELEMENT = "div";
|
|
664
527
|
function Text(props) {
|
|
665
528
|
const $ = c(30), t0 = props;
|
|
@@ -677,16 +540,17 @@ function Text(props) {
|
|
|
677
540
|
weight: t3,
|
|
678
541
|
...rest
|
|
679
542
|
} = t0, $[0] = t0, $[1] = accent, $[2] = align, $[3] = children, $[4] = className, $[5] = flex, $[6] = muted, $[7] = rest, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = textOverflowProp) : (accent = $[1], align = $[2], children = $[3], className = $[4], flex = $[5], muted = $[6], rest = $[7], t1 = $[8], t2 = $[9], t3 = $[10], textOverflowProp = $[11]);
|
|
680
|
-
const
|
|
543
|
+
const Element = t1 === void 0 ? DEFAULT_TEXT_ELEMENT : t1, size2 = t2 === void 0 ? 2 : t2, weight = t3 === void 0 ? "regular" : t3;
|
|
681
544
|
let t4;
|
|
682
|
-
$[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size2 || $[18] !== weight ? (t4 =
|
|
545
|
+
$[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size2 || $[18] !== weight ? (t4 = text({
|
|
546
|
+
className,
|
|
683
547
|
accent,
|
|
684
548
|
align,
|
|
685
549
|
flex,
|
|
686
550
|
muted,
|
|
687
551
|
size: size2,
|
|
688
552
|
weight
|
|
689
|
-
})
|
|
553
|
+
}), $[12] = accent, $[13] = align, $[14] = className, $[15] = flex, $[16] = muted, $[17] = size2, $[18] = weight, $[19] = t4) : t4 = $[19];
|
|
690
554
|
let t5;
|
|
691
555
|
$[20] !== textOverflowProp ? (t5 = textOverflow({
|
|
692
556
|
textOverflow: textOverflowProp
|
|
@@ -694,68 +558,43 @@ function Text(props) {
|
|
|
694
558
|
let t6;
|
|
695
559
|
$[22] !== children || $[23] !== t5 ? (t6 = /* @__PURE__ */ jsx("span", { className: t5, children }), $[22] = children, $[23] = t5, $[24] = t6) : t6 = $[24];
|
|
696
560
|
let t7;
|
|
697
|
-
return $[25] !==
|
|
561
|
+
return $[25] !== Element || $[26] !== rest || $[27] !== t4 || $[28] !== t6 ? (t7 = /* @__PURE__ */ jsx(Element, { "data-ui": "Text", ...rest, className: t4, children: t6 }), $[25] = Element, $[26] = rest, $[27] = t4, $[28] = t6, $[29] = t7) : t7 = $[29], t7;
|
|
698
562
|
}
|
|
699
|
-
Text.displayName = "Text";
|
|
700
|
-
const DEFAULT_BADGE_ELEMENT = "span";
|
|
701
|
-
function Badge(props) {
|
|
702
|
-
const $ = c(22), t0 = props;
|
|
703
|
-
let children, className, rest, t1, t2, t3, t4, t5;
|
|
704
|
-
$[0] !== t0 ? ({
|
|
705
|
-
as: t1,
|
|
706
|
-
children,
|
|
707
|
-
className,
|
|
708
|
-
fontSize: t2,
|
|
709
|
-
padding: t3,
|
|
710
|
-
radius: t4,
|
|
711
|
-
tone: t5,
|
|
712
|
-
...rest
|
|
713
|
-
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = rest, $[4] = t1, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5) : (children = $[1], className = $[2], rest = $[3], t1 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8]);
|
|
714
|
-
const as = t1 === void 0 ? DEFAULT_BADGE_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 1 : t3, radius = t4 === void 0 ? 2 : t4, tone = t5 === void 0 ? "default" : t5;
|
|
715
|
-
let t6;
|
|
716
|
-
$[9] !== className || $[10] !== radius || $[11] !== tone ? (t6 = _composeClassNames(className, badge({
|
|
717
|
-
radius,
|
|
718
|
-
tone
|
|
719
|
-
})), $[9] = className, $[10] = radius, $[11] = tone, $[12] = t6) : t6 = $[12];
|
|
720
|
-
let t7;
|
|
721
|
-
$[13] !== children || $[14] !== fontSize ? (t7 = /* @__PURE__ */ jsx(Text, { size: fontSize, children }), $[13] = children, $[14] = fontSize, $[15] = t7) : t7 = $[15];
|
|
722
|
-
let t8;
|
|
723
|
-
return $[16] !== as || $[17] !== padding || $[18] !== rest || $[19] !== t6 || $[20] !== t7 ? (t8 = /* @__PURE__ */ jsx(Box, { "data-ui": "Badge", ...rest, as, className: t6, display: "inline-flex", maxWidth: "fill", padding, children: t7 }), $[16] = as, $[17] = padding, $[18] = rest, $[19] = t6, $[20] = t7, $[21] = t8) : t8 = $[21], t8;
|
|
724
|
-
}
|
|
725
|
-
Badge.displayName = "Badge";
|
|
726
563
|
function AnimatedSpinnerIcon(props) {
|
|
727
|
-
const $ = c(
|
|
728
|
-
let
|
|
564
|
+
const $ = c(5);
|
|
565
|
+
let rest;
|
|
729
566
|
$[0] !== props ? ({
|
|
730
|
-
className,
|
|
731
567
|
...rest
|
|
732
|
-
} = props, $[0] = props, $[1] =
|
|
568
|
+
} = props, $[0] = props, $[1] = rest) : rest = $[1];
|
|
733
569
|
let t0;
|
|
734
|
-
$[
|
|
570
|
+
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t0 = animatedSpinnerIcon(), $[2] = t0) : t0 = $[2];
|
|
735
571
|
let t1;
|
|
736
|
-
return $[
|
|
572
|
+
return $[3] !== rest ? (t1 = /* @__PURE__ */ jsx(SpinnerIcon, { "data-sanity-icon": "animated-spinner", ...rest, className: t0 }), $[3] = rest, $[4] = t1) : t1 = $[4], t1;
|
|
737
573
|
}
|
|
738
|
-
AnimatedSpinnerIcon.displayName = "AnimatedSpinnerIcon";
|
|
739
574
|
const DEFAULT_SPINNER_ELEMENT = "div";
|
|
740
575
|
function Spinner(props) {
|
|
741
|
-
const $ = c(
|
|
742
|
-
let rest, t1;
|
|
576
|
+
const $ = c(11), t0 = props;
|
|
577
|
+
let className, rest, t1;
|
|
743
578
|
$[0] !== t0 ? ({
|
|
744
579
|
as: t1,
|
|
580
|
+
className,
|
|
745
581
|
...rest
|
|
746
|
-
} = t0, $[0] = t0, $[1] =
|
|
582
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
|
|
747
583
|
const as = t1 === void 0 ? DEFAULT_SPINNER_ELEMENT : t1;
|
|
748
|
-
let t2
|
|
749
|
-
$[
|
|
584
|
+
let t2;
|
|
585
|
+
$[4] !== className ? (t2 = spinner({
|
|
586
|
+
className
|
|
587
|
+
}), $[4] = className, $[5] = t2) : t2 = $[5];
|
|
588
|
+
let t3;
|
|
589
|
+
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t3 = /* @__PURE__ */ jsx(AnimatedSpinnerIcon, {}), $[6] = t3) : t3 = $[6];
|
|
750
590
|
let t4;
|
|
751
|
-
return $[
|
|
591
|
+
return $[7] !== as || $[8] !== rest || $[9] !== t2 ? (t4 = /* @__PURE__ */ jsx(Text, { as, "data-ui": "Spinner", ...rest, className: t2, children: t3 }), $[7] = as, $[8] = rest, $[9] = t2, $[10] = t4) : t4 = $[10], t4;
|
|
752
592
|
}
|
|
753
|
-
Spinner.displayName = "Spinner";
|
|
754
593
|
const DEFAULT_BUTTON_ELEMENT = "button";
|
|
755
594
|
function Button(props) {
|
|
756
595
|
const {
|
|
757
596
|
align = "center",
|
|
758
|
-
as:
|
|
597
|
+
as: Element = DEFAULT_BUTTON_ELEMENT,
|
|
759
598
|
children,
|
|
760
599
|
className,
|
|
761
600
|
disabled,
|
|
@@ -793,26 +632,27 @@ function Button(props) {
|
|
|
793
632
|
} = props;
|
|
794
633
|
let href;
|
|
795
634
|
return "href" in rest && (href = typeof rest.href == "string" ? rest.href : href, delete rest.href), /* @__PURE__ */ jsxs(
|
|
796
|
-
|
|
635
|
+
Element,
|
|
797
636
|
{
|
|
798
637
|
"data-ui": "Button",
|
|
799
638
|
...rest,
|
|
800
|
-
className:
|
|
639
|
+
className: button({
|
|
640
|
+
className,
|
|
801
641
|
display,
|
|
802
642
|
flex,
|
|
643
|
+
mode,
|
|
803
644
|
radius,
|
|
645
|
+
tone,
|
|
804
646
|
width
|
|
805
|
-
})
|
|
647
|
+
}),
|
|
806
648
|
"data-disabled": loading || disabled ? "" : void 0,
|
|
807
|
-
"data-mode": mode,
|
|
808
|
-
"data-tone": tone,
|
|
809
649
|
"data-selected": selected ? "" : void 0,
|
|
810
650
|
disabled: !!(loading || disabled),
|
|
811
651
|
href: disabled ? void 0 : href,
|
|
812
652
|
type,
|
|
813
653
|
children: [
|
|
814
|
-
!!loading && /* @__PURE__ */ jsx(Box, {
|
|
815
|
-
(IconComponent || text2 || IconRightComponent) && /* @__PURE__ */ jsxs(Box, { align, as: "span", display: "flex", flex: 1, gap, gapX, gapY, justify, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, children: [
|
|
654
|
+
!!loading && /* @__PURE__ */ jsx(Box, { alignItems: "center", as: "span", className: buttonLoadingBox(), display: "flex", flex: 1, justifyContent: "center", width: "fill", children: /* @__PURE__ */ jsx(Spinner, { size: fontSize }) }),
|
|
655
|
+
(IconComponent || text2 || IconRightComponent) && /* @__PURE__ */ jsxs(Box, { alignItems: align, as: "span", display: "flex", flex: 1, gap, gapX, gapY, justifyContent: justify, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, children: [
|
|
816
656
|
IconComponent && /* @__PURE__ */ jsxs(Text, { as: "span", flex: "none", muted: !0, size: fontSize, children: [
|
|
817
657
|
isValidElement(IconComponent) && IconComponent,
|
|
818
658
|
isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
|
|
@@ -828,14 +668,13 @@ function Button(props) {
|
|
|
828
668
|
}
|
|
829
669
|
);
|
|
830
670
|
}
|
|
831
|
-
Button.displayName = "Button";
|
|
832
671
|
function useCard() {
|
|
833
672
|
return useContext(CardContext);
|
|
834
673
|
}
|
|
835
674
|
const DEFAULT_CARD_ELEMENT = "div";
|
|
836
675
|
function Card(props) {
|
|
837
|
-
const $ = c(
|
|
838
|
-
let className, disabled, pressed, rest, schemeProp, selected,
|
|
676
|
+
const $ = c(38), t0 = props;
|
|
677
|
+
let className, disabled, pressed, rest, schemeProp, selected, style, t1, t2, t3, t4, t5;
|
|
839
678
|
$[0] !== t0 ? ({
|
|
840
679
|
__unstable_checkered: t1,
|
|
841
680
|
__unstable_focusRing: t2,
|
|
@@ -846,76 +685,32 @@ function Card(props) {
|
|
|
846
685
|
radius: t4,
|
|
847
686
|
scheme: schemeProp,
|
|
848
687
|
selected,
|
|
849
|
-
shadow,
|
|
850
688
|
style,
|
|
851
689
|
tone: t5,
|
|
852
690
|
...rest
|
|
853
|
-
} = t0, $[0] = t0, $[1] = className, $[2] = disabled, $[3] = pressed, $[4] = rest, $[5] = schemeProp, $[6] = selected, $[7] =
|
|
691
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = disabled, $[3] = pressed, $[4] = rest, $[5] = schemeProp, $[6] = selected, $[7] = style, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5) : (className = $[1], disabled = $[2], pressed = $[3], rest = $[4], schemeProp = $[5], selected = $[6], style = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12]);
|
|
854
692
|
const checkered = t1 === void 0 ? !1 : t1, focusRing = t2 === void 0 ? !1 : t2, as = t3 === void 0 ? DEFAULT_CARD_ELEMENT : t3, radius = t4 === void 0 ? 0 : t4, toneProp = t5 === void 0 ? "default" : t5, parent = useCard(), tone = toneProp === "inherit" ? parent?.tone : toneProp, scheme = schemeProp === void 0 ? parent?.scheme : schemeProp, t6 = scheme === parent?.scheme ? void 0 : scheme;
|
|
855
693
|
let t7;
|
|
856
|
-
$[
|
|
694
|
+
$[13] !== className || $[14] !== t6 || $[15] !== tone ? (t7 = card({
|
|
695
|
+
className,
|
|
857
696
|
scheme: t6,
|
|
858
|
-
shadow,
|
|
859
697
|
tone
|
|
860
|
-
})
|
|
698
|
+
}), $[13] = className, $[14] = t6, $[15] = tone, $[16] = t7) : t7 = $[16];
|
|
861
699
|
const t8 = checkered ? "" : void 0, t9 = disabled ? "" : void 0, t10 = focusRing ? "" : void 0, t11 = pressed ? "" : void 0, t12 = selected ? "" : void 0;
|
|
862
700
|
let t13;
|
|
863
|
-
$[
|
|
701
|
+
$[17] !== as || $[18] !== radius || $[19] !== rest || $[20] !== style || $[21] !== t10 || $[22] !== t11 || $[23] !== t12 || $[24] !== t7 || $[25] !== t8 || $[26] !== t9 ? (t13 = /* @__PURE__ */ jsx(Box, { "data-ui": "Card", ...rest, as, className: t7, "data-checkered": t8, "data-disabled": t9, "data-focus-ring": t10, "data-pressed": t11, "data-selected": t12, radius, style }), $[17] = as, $[18] = radius, $[19] = rest, $[20] = style, $[21] = t10, $[22] = t11, $[23] = t12, $[24] = t7, $[25] = t8, $[26] = t9, $[27] = t13) : t13 = $[27];
|
|
864
702
|
let node = t13;
|
|
865
703
|
if (scheme === parent?.scheme && tone === parent?.tone)
|
|
866
704
|
return node;
|
|
867
705
|
const t14 = scheme ?? "light", t15 = tone ?? "default", t16 = parent?.unstable_CompatProvider;
|
|
868
706
|
let t17;
|
|
869
|
-
if ($[
|
|
707
|
+
if ($[28] !== node || $[29] !== t14 || $[30] !== t15 || $[31] !== t16 ? (t17 = /* @__PURE__ */ jsx(CardProvider, { scheme: t14, tone: t15, unstable_CompatProvider: t16, children: node }), $[28] = node, $[29] = t14, $[30] = t15, $[31] = t16, $[32] = t17) : t17 = $[32], node = t17, parent?.unstable_CompatProvider) {
|
|
870
708
|
const CompatProvider = parent.unstable_CompatProvider, t18 = scheme ?? "light", t19 = tone ?? parent?.tone ?? "default";
|
|
871
709
|
let t20;
|
|
872
|
-
return $[
|
|
710
|
+
return $[33] !== CompatProvider || $[34] !== node || $[35] !== t18 || $[36] !== t19 ? (t20 = /* @__PURE__ */ jsx(CompatProvider, { scheme: t18, tone: t19, children: node }), $[33] = CompatProvider, $[34] = node, $[35] = t18, $[36] = t19, $[37] = t20) : t20 = $[37], t20;
|
|
873
711
|
}
|
|
874
712
|
return node;
|
|
875
713
|
}
|
|
876
|
-
Card.displayName = "Card";
|
|
877
|
-
const DEFAULT_CHECKBOX_ELEMENT = "input";
|
|
878
|
-
function Checkbox(props) {
|
|
879
|
-
const $ = c(32), t0 = props;
|
|
880
|
-
let checked, className, customValidity, disabled, forwardedRef, indeterminate, readOnly, rest, style, t1;
|
|
881
|
-
$[0] !== t0 ? ({
|
|
882
|
-
as: t1,
|
|
883
|
-
checked,
|
|
884
|
-
className,
|
|
885
|
-
disabled,
|
|
886
|
-
indeterminate,
|
|
887
|
-
customValidity,
|
|
888
|
-
readOnly,
|
|
889
|
-
ref: forwardedRef,
|
|
890
|
-
style,
|
|
891
|
-
...rest
|
|
892
|
-
} = t0, $[0] = t0, $[1] = checked, $[2] = className, $[3] = customValidity, $[4] = disabled, $[5] = forwardedRef, $[6] = indeterminate, $[7] = readOnly, $[8] = rest, $[9] = style, $[10] = t1) : (checked = $[1], className = $[2], customValidity = $[3], disabled = $[4], forwardedRef = $[5], indeterminate = $[6], readOnly = $[7], rest = $[8], style = $[9], t1 = $[10]);
|
|
893
|
-
const Element2 = t1 === void 0 ? DEFAULT_CHECKBOX_ELEMENT : t1, ref = useRef(null);
|
|
894
|
-
let t2;
|
|
895
|
-
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], useImperativeHandle(forwardedRef, t2);
|
|
896
|
-
let t3, t4;
|
|
897
|
-
$[12] !== indeterminate ? (t3 = () => {
|
|
898
|
-
ref.current && (ref.current.indeterminate = indeterminate || !1);
|
|
899
|
-
}, t4 = [indeterminate], $[12] = indeterminate, $[13] = t3, $[14] = t4) : (t3 = $[13], t4 = $[14]), useEffect(t3, t4), useCustomValidity(ref, customValidity);
|
|
900
|
-
let t5;
|
|
901
|
-
$[15] !== className ? (t5 = _composeClassNames(className, checkbox()), $[15] = className, $[16] = t5) : t5 = $[16];
|
|
902
|
-
let t6;
|
|
903
|
-
$[17] !== className ? (t6 = _composeClassNames(className, checkboxInput()), $[17] = className, $[18] = t6) : t6 = $[18];
|
|
904
|
-
const t7 = customValidity ? "" : void 0, t8 = disabled || readOnly;
|
|
905
|
-
let t9;
|
|
906
|
-
$[19] !== Element2 || $[20] !== checked || $[21] !== readOnly || $[22] !== rest || $[23] !== t6 || $[24] !== t7 || $[25] !== t8 ? (t9 = /* @__PURE__ */ jsx(Element2, { ...rest, checked, className: t6, "data-invalid": t7, disabled: t8, type: "checkbox", readOnly, ref }), $[19] = Element2, $[20] = checked, $[21] = readOnly, $[22] = rest, $[23] = t6, $[24] = t7, $[25] = t8, $[26] = t9) : t9 = $[26];
|
|
907
|
-
let t10;
|
|
908
|
-
$[27] === Symbol.for("react.memo_cache_sentinel") ? (t10 = /* @__PURE__ */ jsxs("span", { children: [
|
|
909
|
-
/* @__PURE__ */ jsx(CheckmarkIcon, {}),
|
|
910
|
-
/* @__PURE__ */ jsx(RemoveIcon, {})
|
|
911
|
-
] }), $[27] = t10) : t10 = $[27];
|
|
912
|
-
let t11;
|
|
913
|
-
return $[28] !== style || $[29] !== t5 || $[30] !== t9 ? (t11 = /* @__PURE__ */ jsxs("span", { className: t5, "data-ui": "Checkbox", style, children: [
|
|
914
|
-
t9,
|
|
915
|
-
t10
|
|
916
|
-
] }), $[28] = style, $[29] = t5, $[30] = t9, $[31] = t11) : t11 = $[31], t11;
|
|
917
|
-
}
|
|
918
|
-
Checkbox.displayName = "Checkbox";
|
|
919
714
|
const LazyRefractor = lazy(() => import("./refractor.js")), DEFAULT_CODE_ELEMENT = "pre";
|
|
920
715
|
function Code(props) {
|
|
921
716
|
const $ = c(25), t0 = props;
|
|
@@ -929,12 +724,13 @@ function Code(props) {
|
|
|
929
724
|
weight: t3,
|
|
930
725
|
...rest
|
|
931
726
|
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = languageProp, $[4] = rest, $[5] = t1, $[6] = t2, $[7] = t3) : (children = $[1], className = $[2], languageProp = $[3], rest = $[4], t1 = $[5], t2 = $[6], t3 = $[7]);
|
|
932
|
-
const
|
|
727
|
+
const Element = t1 === void 0 ? DEFAULT_CODE_ELEMENT : t1, size2 = t2 === void 0 ? 2 : t2, weight = t3 === void 0 ? "regular" : t3, language = typeof languageProp == "string" ? languageProp : void 0;
|
|
933
728
|
let t4;
|
|
934
|
-
$[8] !== className || $[9] !== size2 || $[10] !== weight ? (t4 =
|
|
729
|
+
$[8] !== className || $[9] !== size2 || $[10] !== weight ? (t4 = code({
|
|
730
|
+
className,
|
|
935
731
|
size: size2,
|
|
936
732
|
weight
|
|
937
|
-
})
|
|
733
|
+
}), $[8] = className, $[9] = size2, $[10] = weight, $[11] = t4) : t4 = $[11];
|
|
938
734
|
let t5;
|
|
939
735
|
$[12] !== children ? (t5 = /* @__PURE__ */ jsx("code", { children }), $[12] = children, $[13] = t5) : t5 = $[13];
|
|
940
736
|
let t6;
|
|
@@ -942,42 +738,24 @@ function Code(props) {
|
|
|
942
738
|
let t7;
|
|
943
739
|
$[17] !== t5 || $[18] !== t6 ? (t7 = /* @__PURE__ */ jsx(Suspense, { fallback: t5, children: t6 }), $[17] = t5, $[18] = t6, $[19] = t7) : t7 = $[19];
|
|
944
740
|
let t8;
|
|
945
|
-
return $[20] !==
|
|
946
|
-
}
|
|
947
|
-
Code.displayName = "Code";
|
|
948
|
-
const DEFAULT_CONTAINER_ELEMENT = "div";
|
|
949
|
-
function Container(props) {
|
|
950
|
-
const $ = c(12), t0 = props;
|
|
951
|
-
let className, rest, t1, t2;
|
|
952
|
-
$[0] !== t0 ? ({
|
|
953
|
-
as: t1,
|
|
954
|
-
className,
|
|
955
|
-
width: t2,
|
|
956
|
-
...rest
|
|
957
|
-
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1, $[4] = t2) : (className = $[1], rest = $[2], t1 = $[3], t2 = $[4]);
|
|
958
|
-
const as = t1 === void 0 ? DEFAULT_CONTAINER_ELEMENT : t1, width = t2 === void 0 ? 2 : t2;
|
|
959
|
-
let t3;
|
|
960
|
-
$[5] !== className || $[6] !== width ? (t3 = _composeClassNames(className, container({
|
|
961
|
-
width
|
|
962
|
-
})), $[5] = className, $[6] = width, $[7] = t3) : t3 = $[7];
|
|
963
|
-
let t4;
|
|
964
|
-
return $[8] !== as || $[9] !== rest || $[10] !== t3 ? (t4 = /* @__PURE__ */ jsx(Box, { "data-ui": "Container", ...rest, as, className: t3 }), $[8] = as, $[9] = rest, $[10] = t3, $[11] = t4) : t4 = $[11], t4;
|
|
741
|
+
return $[20] !== Element || $[21] !== rest || $[22] !== t4 || $[23] !== t7 ? (t8 = /* @__PURE__ */ jsx(Element, { "data-ui": "Code", ...rest, className: t4, children: t7 }), $[20] = Element, $[21] = rest, $[22] = t4, $[23] = t7, $[24] = t8) : t8 = $[24], t8;
|
|
965
742
|
}
|
|
966
|
-
Container.displayName = "Container";
|
|
967
743
|
const DEFAULT_FLEX_ELEMENT = "div";
|
|
968
744
|
function Flex(props) {
|
|
969
|
-
const $ = c(
|
|
970
|
-
let rest, t1, t2;
|
|
745
|
+
const $ = c(14), t0 = props;
|
|
746
|
+
let align, justify, rest, t1, t2, wrap;
|
|
971
747
|
$[0] !== t0 ? ({
|
|
748
|
+
align,
|
|
972
749
|
as: t1,
|
|
973
750
|
direction: t2,
|
|
751
|
+
justify,
|
|
752
|
+
wrap,
|
|
974
753
|
...rest
|
|
975
|
-
} = t0, $[0] = t0, $[1] =
|
|
754
|
+
} = t0, $[0] = t0, $[1] = align, $[2] = justify, $[3] = rest, $[4] = t1, $[5] = t2, $[6] = wrap) : (align = $[1], justify = $[2], rest = $[3], t1 = $[4], t2 = $[5], wrap = $[6]);
|
|
976
755
|
const as = t1 === void 0 ? DEFAULT_FLEX_ELEMENT : t1, direction = t2 === void 0 ? "row" : t2;
|
|
977
756
|
let t3;
|
|
978
|
-
return $[
|
|
757
|
+
return $[7] !== align || $[8] !== as || $[9] !== direction || $[10] !== justify || $[11] !== rest || $[12] !== wrap ? (t3 = /* @__PURE__ */ jsx(Box, { "data-ui": "Flex", ...rest, alignItems: align, as, display: "flex", flexDirection: direction, flexWrap: wrap, justifyContent: justify }), $[7] = align, $[8] = as, $[9] = direction, $[10] = justify, $[11] = rest, $[12] = wrap, $[13] = t3) : t3 = $[13], t3;
|
|
979
758
|
}
|
|
980
|
-
Flex.displayName = "Flex";
|
|
981
759
|
const DEFAULT_GRID_ELEMENT = "div";
|
|
982
760
|
function Grid(props) {
|
|
983
761
|
const $ = c(8), t0 = props;
|
|
@@ -991,60 +769,6 @@ function Grid(props) {
|
|
|
991
769
|
let t2;
|
|
992
770
|
return $[4] !== as || $[5] !== children || $[6] !== rest ? (t2 = /* @__PURE__ */ jsx(Box, { "data-ui": "Grid", ...rest, as, display: "grid", children }), $[4] = as, $[5] = children, $[6] = rest, $[7] = t2) : t2 = $[7], t2;
|
|
993
771
|
}
|
|
994
|
-
Grid.displayName = "Grid";
|
|
995
|
-
const DEFAULT_HEADING_ELEMENT = "div";
|
|
996
|
-
function Heading(props) {
|
|
997
|
-
const $ = c(30), t0 = props;
|
|
998
|
-
let align, children, className, flex, rest, t1, t2, t3, t4, t5, textOverflowProp;
|
|
999
|
-
$[0] !== t0 ? ({
|
|
1000
|
-
accent: t1,
|
|
1001
|
-
align,
|
|
1002
|
-
as: t2,
|
|
1003
|
-
children,
|
|
1004
|
-
className,
|
|
1005
|
-
flex,
|
|
1006
|
-
muted: t3,
|
|
1007
|
-
size: t4,
|
|
1008
|
-
textOverflow: textOverflowProp,
|
|
1009
|
-
weight: t5,
|
|
1010
|
-
...rest
|
|
1011
|
-
} = t0, $[0] = t0, $[1] = align, $[2] = children, $[3] = className, $[4] = flex, $[5] = rest, $[6] = t1, $[7] = t2, $[8] = t3, $[9] = t4, $[10] = t5, $[11] = textOverflowProp) : (align = $[1], children = $[2], className = $[3], flex = $[4], rest = $[5], t1 = $[6], t2 = $[7], t3 = $[8], t4 = $[9], t5 = $[10], textOverflowProp = $[11]);
|
|
1012
|
-
const accent = t1 === void 0 ? !1 : t1, Element2 = t2 === void 0 ? DEFAULT_HEADING_ELEMENT : t2, muted = t3 === void 0 ? !1 : t3, size2 = t4 === void 0 ? 2 : t4, weight = t5 === void 0 ? "regular" : t5;
|
|
1013
|
-
let t6;
|
|
1014
|
-
$[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size2 || $[18] !== weight ? (t6 = _composeClassNames(className, heading({
|
|
1015
|
-
accent,
|
|
1016
|
-
align,
|
|
1017
|
-
flex,
|
|
1018
|
-
muted,
|
|
1019
|
-
size: size2,
|
|
1020
|
-
weight
|
|
1021
|
-
})), $[12] = accent, $[13] = align, $[14] = className, $[15] = flex, $[16] = muted, $[17] = size2, $[18] = weight, $[19] = t6) : t6 = $[19];
|
|
1022
|
-
let t7;
|
|
1023
|
-
$[20] !== textOverflowProp ? (t7 = textOverflow({
|
|
1024
|
-
textOverflow: textOverflowProp
|
|
1025
|
-
}), $[20] = textOverflowProp, $[21] = t7) : t7 = $[21];
|
|
1026
|
-
let t8;
|
|
1027
|
-
$[22] !== children || $[23] !== t7 ? (t8 = /* @__PURE__ */ jsx("span", { className: t7, children }), $[22] = children, $[23] = t7, $[24] = t8) : t8 = $[24];
|
|
1028
|
-
let t9;
|
|
1029
|
-
return $[25] !== Element2 || $[26] !== rest || $[27] !== t6 || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsx(Element2, { "data-ui": "Heading", ...rest, className: t6, children: t8 }), $[25] = Element2, $[26] = rest, $[27] = t6, $[28] = t8, $[29] = t9) : t9 = $[29], t9;
|
|
1030
|
-
}
|
|
1031
|
-
Heading.displayName = "Heading";
|
|
1032
|
-
const DEFAULT_INLINE_ELEMENT = "div";
|
|
1033
|
-
function Inline(props) {
|
|
1034
|
-
const $ = c(11), t0 = props;
|
|
1035
|
-
let children, gap, rest, space, t1;
|
|
1036
|
-
$[0] !== t0 ? ({
|
|
1037
|
-
as: t1,
|
|
1038
|
-
children,
|
|
1039
|
-
gap,
|
|
1040
|
-
space,
|
|
1041
|
-
...rest
|
|
1042
|
-
} = t0, $[0] = t0, $[1] = children, $[2] = gap, $[3] = rest, $[4] = space, $[5] = t1) : (children = $[1], gap = $[2], rest = $[3], space = $[4], t1 = $[5]);
|
|
1043
|
-
const as = t1 === void 0 ? DEFAULT_INLINE_ELEMENT : t1, t2 = gap ?? space;
|
|
1044
|
-
let t3;
|
|
1045
|
-
return $[6] !== as || $[7] !== children || $[8] !== rest || $[9] !== t2 ? (t3 = /* @__PURE__ */ jsx(Box, { "data-ui": "Inline", ...rest, align: "center", as, display: "flex", gap: t2, wrap: "wrap", children }), $[6] = as, $[7] = children, $[8] = rest, $[9] = t2, $[10] = t3) : t3 = $[10], t3;
|
|
1046
|
-
}
|
|
1047
|
-
Inline.displayName = "Inline";
|
|
1048
772
|
const DEFAULT_KBD_ELEMENT = "kbd";
|
|
1049
773
|
function KBD(props) {
|
|
1050
774
|
const $ = c(22), t0 = props;
|
|
@@ -1061,15 +785,15 @@ function KBD(props) {
|
|
|
1061
785
|
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = rest, $[4] = t1, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5) : (children = $[1], className = $[2], rest = $[3], t1 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8]);
|
|
1062
786
|
const as = t1 === void 0 ? DEFAULT_KBD_ELEMENT : t1, display = t2 === void 0 ? "inline-block" : t2, fontSize = t3 === void 0 ? 0 : t3, padding = t4 === void 0 ? 1 : t4, radius = t5 === void 0 ? 2 : t5, t6 = as;
|
|
1063
787
|
let t7;
|
|
1064
|
-
$[9] !== className || $[10] !== radius ? (t7 =
|
|
788
|
+
$[9] !== className || $[10] !== radius ? (t7 = kbd({
|
|
789
|
+
className,
|
|
1065
790
|
radius
|
|
1066
|
-
})
|
|
791
|
+
}), $[9] = className, $[10] = radius, $[11] = t7) : t7 = $[11];
|
|
1067
792
|
let t8;
|
|
1068
793
|
$[12] !== children || $[13] !== fontSize ? (t8 = /* @__PURE__ */ jsx(Text, { as: "span", muted: !0, size: fontSize, weight: "semibold", children }), $[12] = children, $[13] = fontSize, $[14] = t8) : t8 = $[14];
|
|
1069
794
|
let t9;
|
|
1070
795
|
return $[15] !== display || $[16] !== padding || $[17] !== rest || $[18] !== t6 || $[19] !== t7 || $[20] !== t8 ? (t9 = /* @__PURE__ */ jsx(Box, { "data-ui": "KBD", ...rest, as: t6, className: t7, display, muted: !0, padding, children: t8 }), $[15] = display, $[16] = padding, $[17] = rest, $[18] = t6, $[19] = t7, $[20] = t8, $[21] = t9) : t9 = $[21], t9;
|
|
1071
796
|
}
|
|
1072
|
-
KBD.displayName = "KBD";
|
|
1073
797
|
const origin = {
|
|
1074
798
|
name: "@sanity/ui/origin",
|
|
1075
799
|
fn({
|
|
@@ -1139,7 +863,7 @@ function compileCommands(cmds) {
|
|
|
1139
863
|
}
|
|
1140
864
|
const DEFAULT_ARROW_ELEMENT = "div";
|
|
1141
865
|
function Arrow(props) {
|
|
1142
|
-
const $ = c(
|
|
866
|
+
const $ = c(34), t0 = props;
|
|
1143
867
|
let h, rest, style, t1, t2, w;
|
|
1144
868
|
$[0] !== t0 ? ({
|
|
1145
869
|
as: t1,
|
|
@@ -1149,7 +873,7 @@ function Arrow(props) {
|
|
|
1149
873
|
style,
|
|
1150
874
|
...rest
|
|
1151
875
|
} = t0, $[0] = t0, $[1] = h, $[2] = rest, $[3] = style, $[4] = t1, $[5] = t2, $[6] = w) : (h = $[1], rest = $[2], style = $[3], t1 = $[4], t2 = $[5], w = $[6]);
|
|
1152
|
-
const
|
|
876
|
+
const Element = t1 === void 0 ? DEFAULT_ARROW_ELEMENT : t1, radius = t2 === void 0 ? 0 : t2, center = w / 2;
|
|
1153
877
|
let t3;
|
|
1154
878
|
const points = [{
|
|
1155
879
|
x: 0,
|
|
@@ -1176,53 +900,39 @@ function Arrow(props) {
|
|
|
1176
900
|
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = _arrow(), $[7] = t4) : t4 = $[7];
|
|
1177
901
|
const t5 = `${w}px`;
|
|
1178
902
|
let t6;
|
|
1179
|
-
$[8] !==
|
|
903
|
+
$[8] !== t5 ? (t6 = assignInlineVars({
|
|
904
|
+
[vars.arrow.size]: t5
|
|
905
|
+
}), $[8] = t5, $[9] = t6) : t6 = $[9];
|
|
906
|
+
let t7;
|
|
907
|
+
$[10] !== style || $[11] !== t6 ? (t7 = {
|
|
1180
908
|
...style,
|
|
1181
|
-
|
|
1182
|
-
}, $[
|
|
1183
|
-
const t7 = `0 0 ${w} ${w}`;
|
|
909
|
+
...t6
|
|
910
|
+
}, $[10] = style, $[11] = t6, $[12] = t7) : t7 = $[12];
|
|
1184
911
|
let t8;
|
|
1185
|
-
$[
|
|
1186
|
-
|
|
1187
|
-
$[12] !== w ? (t9 = /* @__PURE__ */ jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsx("rect", { className: t8, x: 0, width: w, height: w, fill: "white" }) }), $[12] = w, $[13] = t9) : t9 = $[13];
|
|
912
|
+
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t8 = _arrowSvg(), $[13] = t8) : t8 = $[13];
|
|
913
|
+
const t9 = `0 0 ${w} ${w}`;
|
|
1188
914
|
let t10;
|
|
1189
|
-
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t10 =
|
|
915
|
+
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t10 = _arrowStrokeMask(), $[14] = t10) : t10 = $[14];
|
|
1190
916
|
let t11;
|
|
1191
|
-
$[15] !==
|
|
917
|
+
$[15] !== w ? (t11 = /* @__PURE__ */ jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsx("rect", { className: t10, x: 0, width: w, height: w, fill: "white" }) }), $[15] = w, $[16] = t11) : t11 = $[16];
|
|
1192
918
|
let t12;
|
|
1193
|
-
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t12 =
|
|
919
|
+
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t12 = _arrowStroke(), $[17] = t12) : t12 = $[17];
|
|
1194
920
|
let t13;
|
|
1195
|
-
$[18] !==
|
|
921
|
+
$[18] !== strokePath ? (t13 = /* @__PURE__ */ jsx("path", { className: t12, d: strokePath, mask: "url(#stroke-mask)" }), $[18] = strokePath, $[19] = t13) : t13 = $[19];
|
|
1196
922
|
let t14;
|
|
1197
|
-
$[20]
|
|
1198
|
-
t9,
|
|
1199
|
-
t11,
|
|
1200
|
-
t13
|
|
1201
|
-
] }), $[20] = t11, $[21] = t13, $[22] = t7, $[23] = t9, $[24] = w, $[25] = t14) : t14 = $[25];
|
|
923
|
+
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t14 = _arrowShape(), $[20] = t14) : t14 = $[20];
|
|
1202
924
|
let t15;
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
} =
|
|
1212
|
-
let t0, t1;
|
|
1213
|
-
$[0] !== element ? (t1 = {
|
|
1214
|
-
version: 0,
|
|
1215
|
-
element
|
|
1216
|
-
}, $[0] = element, $[1] = t1) : t1 = $[1], t0 = t1;
|
|
1217
|
-
const value = t0;
|
|
1218
|
-
let t2;
|
|
1219
|
-
return $[2] !== children || $[3] !== value ? (t2 = /* @__PURE__ */ jsx(BoundaryElementContext.Provider, { value, children }), $[2] = children, $[3] = value, $[4] = t2) : t2 = $[4], t2;
|
|
1220
|
-
}
|
|
1221
|
-
BoundaryElementProvider.displayName = "BoundaryElementProvider";
|
|
1222
|
-
function isRecord(value) {
|
|
1223
|
-
return !!(value && typeof value == "object" && !Array.isArray(value));
|
|
925
|
+
$[21] !== fillPath ? (t15 = /* @__PURE__ */ jsx("path", { className: t14, d: fillPath }), $[21] = fillPath, $[22] = t15) : t15 = $[22];
|
|
926
|
+
let t16;
|
|
927
|
+
$[23] !== t11 || $[24] !== t13 || $[25] !== t15 || $[26] !== t9 || $[27] !== w ? (t16 = /* @__PURE__ */ jsxs("svg", { className: t8, width: w, height: w, viewBox: t9, children: [
|
|
928
|
+
t11,
|
|
929
|
+
t13,
|
|
930
|
+
t15
|
|
931
|
+
] }), $[23] = t11, $[24] = t13, $[25] = t15, $[26] = t9, $[27] = w, $[28] = t16) : t16 = $[28];
|
|
932
|
+
let t17;
|
|
933
|
+
return $[29] !== Element || $[30] !== rest || $[31] !== t16 || $[32] !== t7 ? (t17 = /* @__PURE__ */ jsx(Element, { ...rest, className: t4, style: t7, children: t16 }), $[29] = Element, $[30] = rest, $[31] = t16, $[32] = t7, $[33] = t17) : t17 = $[33], t17;
|
|
1224
934
|
}
|
|
1225
|
-
const DEFAULT_VALUE = {
|
|
935
|
+
const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null), DEFAULT_VALUE = {
|
|
1226
936
|
version: 0,
|
|
1227
937
|
element: null
|
|
1228
938
|
};
|
|
@@ -1255,7 +965,7 @@ function ElementQuery(props) {
|
|
|
1255
965
|
ref: forwardedRef,
|
|
1256
966
|
...rest
|
|
1257
967
|
} = t0, $[0] = t0, $[1] = children, $[2] = forwardedRef, $[3] = mediaProp, $[4] = rest, $[5] = t1) : (children = $[1], forwardedRef = $[2], mediaProp = $[3], rest = $[4], t1 = $[5]);
|
|
1258
|
-
const
|
|
968
|
+
const Element = t1 === void 0 ? DEFAULT_ELEMENT_QUERY_ELEMENT : t1, breakpoints = mediaProp ?? DEFAULT_BREAKPOINTS, [element, setElement] = useState(null), elementSize = useElementSize(element);
|
|
1259
969
|
let t2;
|
|
1260
970
|
t2 = elementSize?.border.width ?? window.innerWidth;
|
|
1261
971
|
const width = t2;
|
|
@@ -1278,9 +988,8 @@ function ElementQuery(props) {
|
|
|
1278
988
|
let t7, t8;
|
|
1279
989
|
$[12] !== element ? (t7 = () => element, t8 = [element], $[12] = element, $[13] = t7, $[14] = t8) : (t7 = $[13], t8 = $[14]), useImperativeHandle(forwardedRef, t7, t8);
|
|
1280
990
|
let t9;
|
|
1281
|
-
return $[15] !==
|
|
991
|
+
return $[15] !== Element || $[16] !== children || $[17] !== max || $[18] !== min || $[19] !== rest ? (t9 = /* @__PURE__ */ jsx(Element, { "data-ui": "ElementQuery", ...rest, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[15] = Element, $[16] = children, $[17] = max, $[18] = min, $[19] = rest, $[20] = t9) : t9 = $[20], t9;
|
|
1282
992
|
}
|
|
1283
|
-
ElementQuery.displayName = "ElementQuery";
|
|
1284
993
|
function getLayerContext(contextValue) {
|
|
1285
994
|
if (!isRecord(contextValue) || contextValue.version !== 0)
|
|
1286
995
|
throw new Error("the context value is not compatible");
|
|
@@ -1344,7 +1053,6 @@ function LayerCard(props) {
|
|
|
1344
1053
|
let t10;
|
|
1345
1054
|
return $[20] !== children || $[21] !== handleFocus || $[22] !== position || $[23] !== rest || $[24] !== t8 || $[25] !== t9 ? (t10 = /* @__PURE__ */ jsx(Card, { "data-ui": "Layer", ...rest, as: t8, onFocus: handleFocus, position, ref, style: t9, children }), $[20] = children, $[21] = handleFocus, $[22] = position, $[23] = rest, $[24] = t8, $[25] = t9, $[26] = t10) : t10 = $[26], t10;
|
|
1346
1055
|
}
|
|
1347
|
-
LayerCard.displayName = "LayerCard";
|
|
1348
1056
|
function LayerProvider(props) {
|
|
1349
1057
|
const $ = c(19), {
|
|
1350
1058
|
children,
|
|
@@ -1352,7 +1060,7 @@ function LayerProvider(props) {
|
|
|
1352
1060
|
} = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue = useContext(LayerContext);
|
|
1353
1061
|
let t1;
|
|
1354
1062
|
$[0] !== parentContextValue ? (t1 = parentContextValue && getLayerContext(parentContextValue), $[0] = parentContextValue, $[1] = t1) : t1 = $[1];
|
|
1355
|
-
const parent = t1, parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1, zOffset =
|
|
1063
|
+
const parent = t1, parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1, zOffset = useResponsiveProp(zOffsetProp), maxMediaIndex = Object.values(zOffset).length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + (zOffset[mediaIndex] ?? 0) : zOffset[mediaIndex] ?? 0;
|
|
1356
1064
|
let t2;
|
|
1357
1065
|
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t2 = {}, $[2] = t2) : t2 = $[2];
|
|
1358
1066
|
const [, setChildLayers] = useState(t2), [size2, setSize] = useState(0), isTopLayer = size2 === 0;
|
|
@@ -1396,7 +1104,6 @@ function _temp2$2(v_0) {
|
|
|
1396
1104
|
function _temp$2(v) {
|
|
1397
1105
|
return v + 1;
|
|
1398
1106
|
}
|
|
1399
|
-
LayerProvider.displayName = "LayerProvider";
|
|
1400
1107
|
const DEFAULT_LAYER_ELEMENT = "div";
|
|
1401
1108
|
function Layer(props) {
|
|
1402
1109
|
const $ = c(12), t0 = props;
|
|
@@ -1413,7 +1120,6 @@ function Layer(props) {
|
|
|
1413
1120
|
let t4;
|
|
1414
1121
|
return $[9] !== t3 || $[10] !== zOffset ? (t4 = /* @__PURE__ */ jsx(LayerProvider, { zOffset, children: t3 }), $[9] = t3, $[10] = zOffset, $[11] = t4) : t4 = $[11], t4;
|
|
1415
1122
|
}
|
|
1416
|
-
Layer.displayName = "Layer";
|
|
1417
1123
|
const key = "@sanity/ui/context/portal", elementKey = Symbol.for(`${key}/element`);
|
|
1418
1124
|
globalScope[elementKey] = null;
|
|
1419
1125
|
const defaultContextValue = {
|
|
@@ -1444,7 +1150,6 @@ function Portal(props) {
|
|
|
1444
1150
|
let t2;
|
|
1445
1151
|
return $[3] !== portalElement || $[4] !== t1 ? (t2 = createPortal(t1, portalElement), $[3] = portalElement, $[4] = t1, $[5] = t2) : t2 = $[5], t2;
|
|
1446
1152
|
}
|
|
1447
|
-
Portal.displayName = "Portal";
|
|
1448
1153
|
function PortalProvider(props) {
|
|
1449
1154
|
const $ = c(7), {
|
|
1450
1155
|
boundaryElement,
|
|
@@ -1471,7 +1176,6 @@ function _temp2$1() {
|
|
|
1471
1176
|
function _temp$1() {
|
|
1472
1177
|
return document.body;
|
|
1473
1178
|
}
|
|
1474
|
-
PortalProvider.displayName = "PortalProvider";
|
|
1475
1179
|
const emptySubscribe = () => () => {
|
|
1476
1180
|
};
|
|
1477
1181
|
function useUnique(value) {
|
|
@@ -1484,145 +1188,6 @@ function _isEqual(objA, objB) {
|
|
|
1484
1188
|
const keysA = Object.keys(objA), keysB = Object.keys(objB);
|
|
1485
1189
|
return keysA.length !== keysB.length ? !1 : keysA.every((key2) => objA[key2] === objB[key2]);
|
|
1486
1190
|
}
|
|
1487
|
-
const DEFAULT_SR_ONLY_ELEMENT = "span";
|
|
1488
|
-
function SrOnly(props) {
|
|
1489
|
-
const $ = c(12), t0 = props;
|
|
1490
|
-
let children, className, rest, t1;
|
|
1491
|
-
$[0] !== t0 ? ({
|
|
1492
|
-
as: t1,
|
|
1493
|
-
children,
|
|
1494
|
-
className,
|
|
1495
|
-
...rest
|
|
1496
|
-
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = rest, $[4] = t1) : (children = $[1], className = $[2], rest = $[3], t1 = $[4]);
|
|
1497
|
-
const Element2 = t1 === void 0 ? DEFAULT_SR_ONLY_ELEMENT : t1;
|
|
1498
|
-
let t2;
|
|
1499
|
-
$[5] !== className ? (t2 = _composeClassNames(className, srOnly()), $[5] = className, $[6] = t2) : t2 = $[6];
|
|
1500
|
-
let t3;
|
|
1501
|
-
return $[7] !== Element2 || $[8] !== children || $[9] !== rest || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsx(Element2, { "data-ui": "SrOnly", ...rest, "aria-hidden": !0, className: t2, children }), $[7] = Element2, $[8] = children, $[9] = rest, $[10] = t2, $[11] = t3) : t3 = $[11], t3;
|
|
1502
|
-
}
|
|
1503
|
-
SrOnly.displayName = "SrOnly";
|
|
1504
|
-
const DEFAULT_VIRTUAL_LIST_ELEMENT = "div";
|
|
1505
|
-
function VirtualList(props) {
|
|
1506
|
-
const $ = c(58), t0 = props;
|
|
1507
|
-
let forwardedRef, getItemKey, onChange, renderItem, rest, t1, t2, t3;
|
|
1508
|
-
$[0] !== t0 ? ({
|
|
1509
|
-
as: t1,
|
|
1510
|
-
gap: t2,
|
|
1511
|
-
getItemKey,
|
|
1512
|
-
items: t3,
|
|
1513
|
-
onChange,
|
|
1514
|
-
renderItem,
|
|
1515
|
-
ref: forwardedRef,
|
|
1516
|
-
...rest
|
|
1517
|
-
} = t0, $[0] = t0, $[1] = forwardedRef, $[2] = getItemKey, $[3] = onChange, $[4] = renderItem, $[5] = rest, $[6] = t1, $[7] = t2, $[8] = t3) : (forwardedRef = $[1], getItemKey = $[2], onChange = $[3], renderItem = $[4], rest = $[5], t1 = $[6], t2 = $[7], t3 = $[8]);
|
|
1518
|
-
const as = t1 === void 0 ? DEFAULT_VIRTUAL_LIST_ELEMENT : t1, gap = t2 === void 0 ? 0 : t2;
|
|
1519
|
-
let t4;
|
|
1520
|
-
$[9] !== t3 ? (t4 = t3 === void 0 ? [] : t3, $[9] = t3, $[10] = t4) : t4 = $[10];
|
|
1521
|
-
const items = t4, ref = useRef(null), wrapperRef = useRef(null), [scrollTop, setScrollTop] = useState(0), [scrollHeight, setScrollHeight] = useState(0), [itemHeight, setItemHeight] = useState(-1), [gapValue, setGapValue] = useState(0);
|
|
1522
|
-
let t5;
|
|
1523
|
-
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[11] = t5) : t5 = $[11], useImperativeHandle(forwardedRef, t5);
|
|
1524
|
-
let t6, t7;
|
|
1525
|
-
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => {
|
|
1526
|
-
if (!ref.current)
|
|
1527
|
-
return;
|
|
1528
|
-
const scrollEl = findScrollable(ref.current.parentNode);
|
|
1529
|
-
if (scrollEl) {
|
|
1530
|
-
if (!(scrollEl instanceof HTMLElement))
|
|
1531
|
-
return;
|
|
1532
|
-
const handleScroll = () => {
|
|
1533
|
-
setScrollTop(scrollEl.scrollTop);
|
|
1534
|
-
};
|
|
1535
|
-
scrollEl.addEventListener("scroll", handleScroll, {
|
|
1536
|
-
passive: !0
|
|
1537
|
-
});
|
|
1538
|
-
const ro = new _ResizeObserver((entries) => {
|
|
1539
|
-
setScrollHeight(entries[0].contentRect.height);
|
|
1540
|
-
});
|
|
1541
|
-
return ro.observe(scrollEl), handleScroll(), () => {
|
|
1542
|
-
scrollEl.removeEventListener("scroll", handleScroll), ro.unobserve(scrollEl), ro.disconnect();
|
|
1543
|
-
};
|
|
1544
|
-
}
|
|
1545
|
-
const handleScroll_0 = () => {
|
|
1546
|
-
setScrollTop(window.scrollY);
|
|
1547
|
-
}, handleResize = () => {
|
|
1548
|
-
setScrollHeight(window.innerHeight);
|
|
1549
|
-
};
|
|
1550
|
-
return window.addEventListener("scroll", handleScroll_0, {
|
|
1551
|
-
passive: !0
|
|
1552
|
-
}), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll_0(), () => {
|
|
1553
|
-
window.removeEventListener("scroll", handleScroll_0), window.removeEventListener("resize", handleResize);
|
|
1554
|
-
};
|
|
1555
|
-
}, t7 = [], $[12] = t6, $[13] = t7) : (t6 = $[12], t7 = $[13]), useEffect(t6, t7);
|
|
1556
|
-
const len = items.length, height = itemHeight ? len * (itemHeight + gapValue) - gapValue : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0;
|
|
1557
|
-
let t8, t9;
|
|
1558
|
-
$[14] !== fromIndex || $[15] !== gapValue || $[16] !== itemHeight || $[17] !== onChange || $[18] !== scrollHeight || $[19] !== scrollTop || $[20] !== toIndex ? (t8 = () => {
|
|
1559
|
-
onChange?.({
|
|
1560
|
-
fromIndex,
|
|
1561
|
-
gap: gapValue,
|
|
1562
|
-
itemHeight,
|
|
1563
|
-
scrollHeight,
|
|
1564
|
-
scrollTop,
|
|
1565
|
-
toIndex
|
|
1566
|
-
});
|
|
1567
|
-
}, t9 = [fromIndex, gapValue, itemHeight, onChange, scrollHeight, scrollTop, toIndex], $[14] = fromIndex, $[15] = gapValue, $[16] = itemHeight, $[17] = onChange, $[18] = scrollHeight, $[19] = scrollTop, $[20] = toIndex, $[21] = t8, $[22] = t9) : (t8 = $[21], t9 = $[22]), useEffect(t8, t9);
|
|
1568
|
-
let t10;
|
|
1569
|
-
bb0: {
|
|
1570
|
-
if (!renderItem || items.length === 0) {
|
|
1571
|
-
t10 = null;
|
|
1572
|
-
break bb0;
|
|
1573
|
-
}
|
|
1574
|
-
if (itemHeight === -1) {
|
|
1575
|
-
let t113;
|
|
1576
|
-
$[23] === Symbol.for("react.memo_cache_sentinel") ? (t113 = (el) => el ? setItemHeight(el.offsetHeight) : void 0, $[23] = t113) : t113 = $[23];
|
|
1577
|
-
let t122;
|
|
1578
|
-
$[24] !== items[0] || $[25] !== renderItem ? (t122 = renderItem(items[0]), $[24] = items[0], $[25] = renderItem, $[26] = t122) : t122 = $[26];
|
|
1579
|
-
let t132;
|
|
1580
|
-
$[27] !== t122 ? (t132 = /* @__PURE__ */ jsx(Box, { ref: t113, insetTop: 0, insetLeft: 0, insetRight: 0, position: "absolute", children: t122 }, 0), $[27] = t122, $[28] = t132) : t132 = $[28];
|
|
1581
|
-
let t142;
|
|
1582
|
-
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t142 = (el_0) => el_0 ? setGapValue(el_0.offsetHeight) : void 0, $[29] = t142) : t142 = $[29];
|
|
1583
|
-
const t15 = vars.space[gap];
|
|
1584
|
-
let t16;
|
|
1585
|
-
$[30] !== t15 ? (t16 = /* @__PURE__ */ jsx("div", { ref: t142, style: {
|
|
1586
|
-
height: t15
|
|
1587
|
-
} }), $[30] = t15, $[31] = t16) : t16 = $[31];
|
|
1588
|
-
let t17;
|
|
1589
|
-
$[32] !== t132 || $[33] !== t16 ? (t17 = [/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1590
|
-
t132,
|
|
1591
|
-
t16
|
|
1592
|
-
] })], $[32] = t132, $[33] = t16, $[34] = t17) : t17 = $[34], t10 = t17;
|
|
1593
|
-
break bb0;
|
|
1594
|
-
}
|
|
1595
|
-
let t112;
|
|
1596
|
-
if ($[35] !== fromIndex || $[36] !== gapValue || $[37] !== getItemKey || $[38] !== itemHeight || $[39] !== items || $[40] !== renderItem || $[41] !== toIndex) {
|
|
1597
|
-
let t122;
|
|
1598
|
-
$[43] !== fromIndex || $[44] !== gapValue || $[45] !== getItemKey || $[46] !== itemHeight || $[47] !== renderItem ? (t122 = (item, _itemIndex) => {
|
|
1599
|
-
const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
|
|
1600
|
-
return /* @__PURE__ */ jsx(Box, { insetLeft: 0, insetRight: 0, position: "absolute", style: {
|
|
1601
|
-
top: itemIndex * (itemHeight + gapValue) - gapValue
|
|
1602
|
-
}, children: node }, key2);
|
|
1603
|
-
}, $[43] = fromIndex, $[44] = gapValue, $[45] = getItemKey, $[46] = itemHeight, $[47] = renderItem, $[48] = t122) : t122 = $[48], t112 = items.slice(fromIndex, toIndex).map(t122), $[35] = fromIndex, $[36] = gapValue, $[37] = getItemKey, $[38] = itemHeight, $[39] = items, $[40] = renderItem, $[41] = toIndex, $[42] = t112;
|
|
1604
|
-
} else
|
|
1605
|
-
t112 = $[42];
|
|
1606
|
-
t10 = t112;
|
|
1607
|
-
}
|
|
1608
|
-
const children = t10;
|
|
1609
|
-
let t11, t12;
|
|
1610
|
-
$[49] !== height ? (t12 = {
|
|
1611
|
-
height
|
|
1612
|
-
}, $[49] = height, $[50] = t12) : t12 = $[50], t11 = t12;
|
|
1613
|
-
const wrapperStyle = t11;
|
|
1614
|
-
let t13;
|
|
1615
|
-
$[51] !== children || $[52] !== wrapperStyle ? (t13 = /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[51] = children, $[52] = wrapperStyle, $[53] = t13) : t13 = $[53];
|
|
1616
|
-
let t14;
|
|
1617
|
-
return $[54] !== as || $[55] !== rest || $[56] !== t13 ? (t14 = /* @__PURE__ */ jsx(Box, { "data-ui": "VirtualList", ...rest, as, position: "relative", ref, children: t13 }), $[54] = as, $[55] = rest, $[56] = t13, $[57] = t14) : t14 = $[57], t14;
|
|
1618
|
-
}
|
|
1619
|
-
VirtualList.displayName = "VirtualList";
|
|
1620
|
-
function findScrollable(parentNode) {
|
|
1621
|
-
let _scrollEl = parentNode;
|
|
1622
|
-
for (; _scrollEl && !_isScrollable(_scrollEl); )
|
|
1623
|
-
_scrollEl = _scrollEl.parentNode;
|
|
1624
|
-
return _scrollEl;
|
|
1625
|
-
}
|
|
1626
1191
|
const DEFAULT_POPOVER_DISTANCE = 4, DEFAULT_POPOVER_PADDING = 4, DEFAULT_POPOVER_ARROW_WIDTH = 19, DEFAULT_POPOVER_ARROW_HEIGHT = 8, DEFAULT_POPOVER_ARROW_RADIUS = 2, DEFAULT_POPOVER_MARGINS = [0, 0, 0, 0], DEFAULT_FALLBACK_PLACEMENTS$1 = {
|
|
1627
1192
|
top: ["bottom", "left", "right"],
|
|
1628
1193
|
"top-start": ["bottom-start", "left-start", "right-start"],
|
|
@@ -1747,12 +1312,11 @@ function PopoverLayer(props) {
|
|
|
1747
1312
|
let t15;
|
|
1748
1313
|
$[48] !== arrow2 || $[49] !== arrowRef || $[50] !== arrowStyle ? (t15 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[48] = arrow2, $[49] = arrowRef, $[50] = arrowStyle, $[51] = t15) : t15 = $[51];
|
|
1749
1314
|
let t16;
|
|
1750
|
-
return $[52] !== placement || $[53] !== radius || $[54] !== rest || $[55] !== rootStyle || $[56] !== shadow || $[57] !== strategy || $[58] !== t10 || $[59] !== t11 || $[60] !== t12 || $[61] !== t14 || $[62] !== t15 || $[63] !== tone ? (t16 = /* @__PURE__ */ jsxs(Layer, { className: t9, "data-ui": "Popover", ...rest, as: motion.div, "data-context-tone": tone, "data-placement": placement,
|
|
1315
|
+
return $[52] !== placement || $[53] !== radius || $[54] !== rest || $[55] !== rootStyle || $[56] !== shadow || $[57] !== strategy || $[58] !== t10 || $[59] !== t11 || $[60] !== t12 || $[61] !== t14 || $[62] !== t15 || $[63] !== tone ? (t16 = /* @__PURE__ */ jsxs(Layer, { className: t9, "data-ui": "Popover", ...rest, as: motion.div, "data-context-tone": tone, "data-placement": placement, flexDirection: "column", display: "flex", position: strategy, radius, shadow, sizing: "border", style: rootStyle, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t10, animate: t11, exit: t12, children: [
|
|
1751
1316
|
t14,
|
|
1752
1317
|
t15
|
|
1753
1318
|
] }), $[52] = placement, $[53] = radius, $[54] = rest, $[55] = rootStyle, $[56] = shadow, $[57] = strategy, $[58] = t10, $[59] = t11, $[60] = t12, $[61] = t14, $[62] = t15, $[63] = tone, $[64] = t16) : t16 = $[64], t16;
|
|
1754
1319
|
}
|
|
1755
|
-
PopoverLayer.displayName = "PopoverCard";
|
|
1756
1320
|
const DEFAULT_POPOVER_ELEMENT = "div";
|
|
1757
1321
|
function ViewportOverlay() {
|
|
1758
1322
|
const $ = c(2), {
|
|
@@ -1776,6 +1340,7 @@ function Popover(props) {
|
|
|
1776
1340
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1777
1341
|
boundaryElement = boundaryElementContext.element,
|
|
1778
1342
|
children: childProp,
|
|
1343
|
+
className,
|
|
1779
1344
|
constrainSize = !1,
|
|
1780
1345
|
content,
|
|
1781
1346
|
disabled,
|
|
@@ -1802,7 +1367,7 @@ function Popover(props) {
|
|
|
1802
1367
|
zOffset: zOffsetProp = Z_OFFSETS.popover,
|
|
1803
1368
|
updateRef,
|
|
1804
1369
|
...rest
|
|
1805
|
-
} = props, card2 = useCard(), animate = usePrefersReducedMotion() ? !1 : _animate, zOffset =
|
|
1370
|
+
} = props, card2 = useCard(), animate = usePrefersReducedMotion() ? !1 : _animate, zOffset = useResponsiveProp(zOffsetProp), ref = useRef(null), arrowRef = useRef(null), rootBoundary = "viewport";
|
|
1806
1371
|
useImperativeHandle(forwardedRef, () => ref.current);
|
|
1807
1372
|
const referenceWidthRef = useRef(void 0), middleware = useMemo(() => {
|
|
1808
1373
|
const ret = [];
|
|
@@ -1867,102 +1432,21 @@ function Popover(props) {
|
|
|
1867
1432
|
updateRef && (typeof updateRef == "function" ? updateRef(update) : updateRef && (updateRef.current = update));
|
|
1868
1433
|
}, [update, updateRef]), disabled)
|
|
1869
1434
|
return childProp || /* @__PURE__ */ jsx(Fragment, {});
|
|
1870
|
-
const
|
|
1435
|
+
const node_1 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1871
1436
|
modal && /* @__PURE__ */ jsx(ViewportOverlay, {}),
|
|
1872
|
-
/* @__PURE__ */ jsx(PopoverLayer, { ...rest, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as,
|
|
1873
|
-
|
|
1437
|
+
/* @__PURE__ */ jsx(PopoverLayer, { ...rest, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, className: popover({
|
|
1438
|
+
className
|
|
1439
|
+
}), hidden: referenceHidden, maxWidth: widthProp, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, x, y, zOffset, children: content })
|
|
1440
|
+
] }), children = open && (portal ? /* @__PURE__ */ jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: /* @__PURE__ */ jsx(CardProvider, { tone: tone === "inherit" ? card2?.tone ?? "default" : tone, scheme: scheme ?? "light", children: node_1 }) }) : node_1);
|
|
1874
1441
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1875
1442
|
animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children,
|
|
1876
1443
|
child
|
|
1877
1444
|
] });
|
|
1878
1445
|
}
|
|
1879
|
-
Popover.displayName = "Popover";
|
|
1880
1446
|
function getElementRef$1(element) {
|
|
1881
1447
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
1882
1448
|
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);
|
|
1883
1449
|
}
|
|
1884
|
-
const DEFAULT_RADIO_ELEMENT = "input";
|
|
1885
|
-
function Radio(props) {
|
|
1886
|
-
const $ = c(24), t0 = props;
|
|
1887
|
-
let className, customValidity, disabled, forwardedRef, readOnly, rest, style, t1;
|
|
1888
|
-
$[0] !== t0 ? ({
|
|
1889
|
-
as: t1,
|
|
1890
|
-
className,
|
|
1891
|
-
disabled,
|
|
1892
|
-
style,
|
|
1893
|
-
customValidity,
|
|
1894
|
-
readOnly,
|
|
1895
|
-
ref: forwardedRef,
|
|
1896
|
-
...rest
|
|
1897
|
-
} = t0, $[0] = t0, $[1] = className, $[2] = customValidity, $[3] = disabled, $[4] = forwardedRef, $[5] = readOnly, $[6] = rest, $[7] = style, $[8] = t1) : (className = $[1], customValidity = $[2], disabled = $[3], forwardedRef = $[4], readOnly = $[5], rest = $[6], style = $[7], t1 = $[8]);
|
|
1898
|
-
const Element2 = t1 === void 0 ? DEFAULT_RADIO_ELEMENT : t1, ref = useRef(null);
|
|
1899
|
-
let t2;
|
|
1900
|
-
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[9] = t2) : t2 = $[9], useImperativeHandle(forwardedRef, t2), useCustomValidity(ref, customValidity);
|
|
1901
|
-
let t3;
|
|
1902
|
-
$[10] !== className ? (t3 = _composeClassNames(className, radio()), $[10] = className, $[11] = t3) : t3 = $[11];
|
|
1903
|
-
const t4 = customValidity ? "" : void 0, t5 = !disabled && readOnly ? "" : void 0, t6 = disabled || readOnly;
|
|
1904
|
-
let t7;
|
|
1905
|
-
$[12] !== Element2 || $[13] !== readOnly || $[14] !== rest || $[15] !== t4 || $[16] !== t5 || $[17] !== t6 ? (t7 = /* @__PURE__ */ jsx(Element2, { ...rest, "data-invalid": t4, "data-read-only": t5, disabled: t6, readOnly, ref, type: "radio" }), $[12] = Element2, $[13] = readOnly, $[14] = rest, $[15] = t4, $[16] = t5, $[17] = t6, $[18] = t7) : t7 = $[18];
|
|
1906
|
-
let t8;
|
|
1907
|
-
$[19] === Symbol.for("react.memo_cache_sentinel") ? (t8 = /* @__PURE__ */ jsx("span", {}), $[19] = t8) : t8 = $[19];
|
|
1908
|
-
let t9;
|
|
1909
|
-
return $[20] !== style || $[21] !== t3 || $[22] !== t7 ? (t9 = /* @__PURE__ */ jsxs("div", { className: t3, "data-ui": "Radio", style, children: [
|
|
1910
|
-
t7,
|
|
1911
|
-
t8
|
|
1912
|
-
] }), $[20] = style, $[21] = t3, $[22] = t7, $[23] = t9) : t9 = $[23], t9;
|
|
1913
|
-
}
|
|
1914
|
-
Radio.displayName = "Radio";
|
|
1915
|
-
const DEFAULT_SELECT_ELEMENT = "select";
|
|
1916
|
-
function Select(props) {
|
|
1917
|
-
const $ = c(38), t0 = props;
|
|
1918
|
-
let children, customValidity, disabled, forwardedRef, gap, readOnly, rest, t1, t2, t3, t4, t5, t6;
|
|
1919
|
-
$[0] !== t0 ? ({
|
|
1920
|
-
as: t1,
|
|
1921
|
-
border: t2,
|
|
1922
|
-
children,
|
|
1923
|
-
customValidity,
|
|
1924
|
-
disabled,
|
|
1925
|
-
fontSize: t3,
|
|
1926
|
-
gap,
|
|
1927
|
-
padding: t4,
|
|
1928
|
-
radius: t5,
|
|
1929
|
-
readOnly,
|
|
1930
|
-
ref: forwardedRef,
|
|
1931
|
-
space: t6,
|
|
1932
|
-
...rest
|
|
1933
|
-
} = t0, $[0] = t0, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = forwardedRef, $[5] = gap, $[6] = readOnly, $[7] = rest, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5, $[13] = t6) : (children = $[1], customValidity = $[2], disabled = $[3], forwardedRef = $[4], gap = $[5], readOnly = $[6], rest = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12], t6 = $[13]);
|
|
1934
|
-
const Element2 = t1 === void 0 ? DEFAULT_SELECT_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, fontSize = t3 === void 0 ? 2 : t3, padding = t4 === void 0 ? 3 : t4, radius = t5 === void 0 ? 1 : t5, space = t6 === void 0 ? 2 : t6, ref = useRef(null);
|
|
1935
|
-
let t7;
|
|
1936
|
-
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[14] = t7) : t7 = $[14], useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
|
|
1937
|
-
const t8 = gap ?? space;
|
|
1938
|
-
let t9;
|
|
1939
|
-
$[15] !== border || $[16] !== fontSize || $[17] !== padding || $[18] !== radius || $[19] !== t8 ? (t9 = select({
|
|
1940
|
-
border,
|
|
1941
|
-
fontSize,
|
|
1942
|
-
padding,
|
|
1943
|
-
radius,
|
|
1944
|
-
gap: t8
|
|
1945
|
-
}), $[15] = border, $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t8, $[20] = t9) : t9 = $[20];
|
|
1946
|
-
let t10;
|
|
1947
|
-
$[21] === Symbol.for("react.memo_cache_sentinel") ? (t10 = _inputElement(), $[21] = t10) : t10 = $[21];
|
|
1948
|
-
const t11 = disabled || readOnly;
|
|
1949
|
-
let t12;
|
|
1950
|
-
$[22] !== Element2 || $[23] !== children || $[24] !== rest || $[25] !== t11 ? (t12 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t10, disabled: t11, ref, children }), $[22] = Element2, $[23] = children, $[24] = rest, $[25] = t11, $[26] = t12) : t12 = $[26];
|
|
1951
|
-
let t13;
|
|
1952
|
-
$[27] === Symbol.for("react.memo_cache_sentinel") ? (t13 = selectPresentation(), $[27] = t13) : t13 = $[27];
|
|
1953
|
-
let t14;
|
|
1954
|
-
$[28] === Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsx(ChevronDownIcon, {}), $[28] = t14) : t14 = $[28];
|
|
1955
|
-
let t15;
|
|
1956
|
-
$[29] !== fontSize ? (t15 = /* @__PURE__ */ jsx(Text, { size: fontSize, children: t14 }), $[29] = fontSize, $[30] = t15) : t15 = $[30];
|
|
1957
|
-
let t16;
|
|
1958
|
-
$[31] !== padding || $[32] !== t15 ? (t16 = /* @__PURE__ */ jsx("span", { className: t13, children: /* @__PURE__ */ jsx(Box, { as: "span", display: "inline-block", padding, children: t15 }) }), $[31] = padding, $[32] = t15, $[33] = t16) : t16 = $[33];
|
|
1959
|
-
let t17;
|
|
1960
|
-
return $[34] !== t12 || $[35] !== t16 || $[36] !== t9 ? (t17 = /* @__PURE__ */ jsxs("div", { "data-ui": "Select", className: t9, "data-icon-right": "", children: [
|
|
1961
|
-
t12,
|
|
1962
|
-
t16
|
|
1963
|
-
] }), $[34] = t12, $[35] = t16, $[36] = t9, $[37] = t17) : t17 = $[37], t17;
|
|
1964
|
-
}
|
|
1965
|
-
Select.displayName = "Select";
|
|
1966
1450
|
const DEFAULT_STACK_ELEMENT = "div";
|
|
1967
1451
|
function Stack(props) {
|
|
1968
1452
|
const $ = c(13), t0 = props;
|
|
@@ -1976,106 +1460,14 @@ function Stack(props) {
|
|
|
1976
1460
|
} = t0, $[0] = t0, $[1] = className, $[2] = gap, $[3] = rest, $[4] = space, $[5] = t1) : (className = $[1], gap = $[2], rest = $[3], space = $[4], t1 = $[5]);
|
|
1977
1461
|
const as = t1 === void 0 ? DEFAULT_STACK_ELEMENT : t1;
|
|
1978
1462
|
let t2;
|
|
1979
|
-
$[6] !== className ? (t2 =
|
|
1463
|
+
$[6] !== className ? (t2 = stack({
|
|
1464
|
+
className
|
|
1465
|
+
}), $[6] = className, $[7] = t2) : t2 = $[7];
|
|
1980
1466
|
const t3 = gap ?? space;
|
|
1981
1467
|
let t4;
|
|
1982
|
-
return $[8] !== as || $[9] !== rest || $[10] !== t2 || $[11] !== t3 ? (t4 = /* @__PURE__ */ jsx(Box, { "data-ui": "Stack", ...rest, as,
|
|
1983
|
-
}
|
|
1984
|
-
Stack.displayName = "Stack";
|
|
1985
|
-
const DEFAULT_SWITCH_ELEMENT = "input";
|
|
1986
|
-
function Switch(props) {
|
|
1987
|
-
const $ = c(31), t0 = props;
|
|
1988
|
-
let checked, className, disabled, forwardedRef, indeterminate, readOnly, rest, style, t1;
|
|
1989
|
-
$[0] !== t0 ? ({
|
|
1990
|
-
as: t1,
|
|
1991
|
-
checked,
|
|
1992
|
-
className,
|
|
1993
|
-
disabled,
|
|
1994
|
-
indeterminate,
|
|
1995
|
-
readOnly,
|
|
1996
|
-
ref: forwardedRef,
|
|
1997
|
-
style,
|
|
1998
|
-
...rest
|
|
1999
|
-
} = t0, $[0] = t0, $[1] = checked, $[2] = className, $[3] = disabled, $[4] = forwardedRef, $[5] = indeterminate, $[6] = readOnly, $[7] = rest, $[8] = style, $[9] = t1) : (checked = $[1], className = $[2], disabled = $[3], forwardedRef = $[4], indeterminate = $[5], readOnly = $[6], rest = $[7], style = $[8], t1 = $[9]);
|
|
2000
|
-
const Element2 = t1 === void 0 ? DEFAULT_SWITCH_ELEMENT : t1, ref = useRef(null);
|
|
2001
|
-
let t2;
|
|
2002
|
-
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[10] = t2) : t2 = $[10], useImperativeHandle(forwardedRef, t2);
|
|
2003
|
-
let t3, t4;
|
|
2004
|
-
$[11] !== indeterminate ? (t3 = () => {
|
|
2005
|
-
ref.current && (ref.current.indeterminate = indeterminate || !1);
|
|
2006
|
-
}, t4 = [indeterminate], $[11] = indeterminate, $[12] = t3, $[13] = t4) : (t3 = $[12], t4 = $[13]), useEffect(t3, t4);
|
|
2007
|
-
let t5;
|
|
2008
|
-
$[14] !== className ? (t5 = _composeClassNames(className, _switch()), $[14] = className, $[15] = t5) : t5 = $[15];
|
|
2009
|
-
const t6 = checked ? "" : void 0, t7 = indeterminate ? "" : void 0, t8 = indeterminate !== !0 && checked;
|
|
2010
|
-
let t9;
|
|
2011
|
-
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t9 = _switchElement(), $[16] = t9) : t9 = $[16];
|
|
2012
|
-
const t10 = disabled ? "" : void 0, t11 = !disabled && readOnly ? "" : void 0, t12 = disabled || readOnly;
|
|
2013
|
-
let t13;
|
|
2014
|
-
$[17] !== Element2 || $[18] !== rest || $[19] !== t10 || $[20] !== t11 || $[21] !== t12 || $[22] !== t8 ? (t13 = /* @__PURE__ */ jsx(Element2, { ...rest, checked: t8, className: t9, "data-disabled": t10, "data-read-only": t11, disabled: t12, type: "checkbox", ref }), $[17] = Element2, $[18] = rest, $[19] = t10, $[20] = t11, $[21] = t12, $[22] = t8, $[23] = t13) : t13 = $[23];
|
|
2015
|
-
let t14;
|
|
2016
|
-
$[24] === Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsxs("span", { "aria-hidden": !0, className: _switchPresentation(), children: [
|
|
2017
|
-
/* @__PURE__ */ jsx("span", { className: _switchTrack() }),
|
|
2018
|
-
/* @__PURE__ */ jsx("span", { className: _switchThumb() })
|
|
2019
|
-
] }), $[24] = t14) : t14 = $[24];
|
|
2020
|
-
let t15;
|
|
2021
|
-
return $[25] !== style || $[26] !== t13 || $[27] !== t5 || $[28] !== t6 || $[29] !== t7 ? (t15 = /* @__PURE__ */ jsxs(Box, { className: t5, "data-checked": t6, "data-indeterminate": t7, "data-ui": "Switch", display: "inline-block", position: "relative", style, children: [
|
|
2022
|
-
t13,
|
|
2023
|
-
t14
|
|
2024
|
-
] }), $[25] = style, $[26] = t13, $[27] = t5, $[28] = t6, $[29] = t7, $[30] = t15) : t15 = $[30], t15;
|
|
1468
|
+
return $[8] !== as || $[9] !== rest || $[10] !== t2 || $[11] !== t3 ? (t4 = /* @__PURE__ */ jsx(Box, { "data-ui": "Stack", ...rest, as, gridAutoRows: "min", className: t2, display: "grid", gap: t3 }), $[8] = as, $[9] = rest, $[10] = t2, $[11] = t3, $[12] = t4) : t4 = $[12], t4;
|
|
2025
1469
|
}
|
|
2026
|
-
|
|
2027
|
-
const DEFAULT_TEXT_AREA_ELEMENT = "textarea";
|
|
2028
|
-
function TextArea(props) {
|
|
2029
|
-
const $ = c(34), t0 = props;
|
|
2030
|
-
let __unstable_disableFocusRing, customValidity, forwardedRef, gap, readOnly, rest, t1, t2, t3, t4, t5, t6, t7;
|
|
2031
|
-
$[0] !== t0 ? ({
|
|
2032
|
-
__unstable_disableFocusRing,
|
|
2033
|
-
as: t1,
|
|
2034
|
-
border: t2,
|
|
2035
|
-
customValidity,
|
|
2036
|
-
disabled: t3,
|
|
2037
|
-
fontSize: t4,
|
|
2038
|
-
gap,
|
|
2039
|
-
padding: t5,
|
|
2040
|
-
radius: t6,
|
|
2041
|
-
readOnly,
|
|
2042
|
-
ref: forwardedRef,
|
|
2043
|
-
space: t7,
|
|
2044
|
-
...rest
|
|
2045
|
-
} = t0, $[0] = t0, $[1] = __unstable_disableFocusRing, $[2] = customValidity, $[3] = forwardedRef, $[4] = gap, $[5] = readOnly, $[6] = rest, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = t4, $[11] = t5, $[12] = t6, $[13] = t7) : (__unstable_disableFocusRing = $[1], customValidity = $[2], forwardedRef = $[3], gap = $[4], readOnly = $[5], rest = $[6], t1 = $[7], t2 = $[8], t3 = $[9], t4 = $[10], t5 = $[11], t6 = $[12], t7 = $[13]);
|
|
2046
|
-
const Element2 = t1 === void 0 ? DEFAULT_TEXT_AREA_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, disabled = t3 === void 0 ? !1 : t3, fontSize = t4 === void 0 ? 2 : t4, padding = t5 === void 0 ? 3 : t5, radius = t6 === void 0 ? 2 : t6, space = t7 === void 0 ? 3 : t7, ref = useRef(null);
|
|
2047
|
-
let t8;
|
|
2048
|
-
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t8 = () => ref.current, $[14] = t8) : t8 = $[14], useImperativeHandle(forwardedRef, t8), useCustomValidity(ref, customValidity);
|
|
2049
|
-
const t9 = gap ?? space;
|
|
2050
|
-
let t10;
|
|
2051
|
-
$[15] !== border || $[16] !== fontSize || $[17] !== padding || $[18] !== radius || $[19] !== t9 ? (t10 = textArea({
|
|
2052
|
-
border,
|
|
2053
|
-
fontSize,
|
|
2054
|
-
padding,
|
|
2055
|
-
radius,
|
|
2056
|
-
gap: t9
|
|
2057
|
-
}), $[15] = border, $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t9, $[20] = t10) : t10 = $[20];
|
|
2058
|
-
const t11 = customValidity ? "" : void 0, t12 = !disabled && readOnly ? "" : void 0;
|
|
2059
|
-
let t13;
|
|
2060
|
-
$[21] === Symbol.for("react.memo_cache_sentinel") ? (t13 = _inputElement(), $[21] = t13) : t13 = $[21];
|
|
2061
|
-
const t14 = __unstable_disableFocusRing ? "" : void 0;
|
|
2062
|
-
let t15;
|
|
2063
|
-
$[22] !== Element2 || $[23] !== disabled || $[24] !== readOnly || $[25] !== rest || $[26] !== t14 ? (t15 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t13, "data-no-focus-ring": t14, disabled, readOnly, ref }), $[22] = Element2, $[23] = disabled, $[24] = readOnly, $[25] = rest, $[26] = t14, $[27] = t15) : t15 = $[27];
|
|
2064
|
-
let t16;
|
|
2065
|
-
$[28] === Symbol.for("react.memo_cache_sentinel") ? (t16 = /* @__PURE__ */ jsx("span", { className: _inputPresentation() }), $[28] = t16) : t16 = $[28];
|
|
2066
|
-
let t17;
|
|
2067
|
-
return $[29] !== t10 || $[30] !== t11 || $[31] !== t12 || $[32] !== t15 ? (t17 = /* @__PURE__ */ jsxs("span", { className: t10, "data-invalid": t11, "data-read-only": t12, "data-ui": "TextArea", children: [
|
|
2068
|
-
t15,
|
|
2069
|
-
t16
|
|
2070
|
-
] }), $[29] = t10, $[30] = t11, $[31] = t12, $[32] = t15, $[33] = t17) : t17 = $[33], t17;
|
|
2071
|
-
}
|
|
2072
|
-
TextArea.displayName = "TextArea";
|
|
2073
|
-
const DEFAULT_TEXT_INPUT_ELEMENT = "input", CLEAR_BUTTON_BOX_STYLE = {
|
|
2074
|
-
backgroundColor: "transparent",
|
|
2075
|
-
top: 0,
|
|
2076
|
-
right: 0,
|
|
2077
|
-
zIndex: 2
|
|
2078
|
-
};
|
|
1470
|
+
const DEFAULT_TEXT_INPUT_ELEMENT = "input";
|
|
2079
1471
|
function TextInput(props) {
|
|
2080
1472
|
const $ = c(89), t0 = props;
|
|
2081
1473
|
let IconComponent, IconRightComponent, __unstable_disableFocusRing, className, clearButton, customValidity, forwardedRef, gap, onClear, prefix, readOnly, rest, suffix, t1, t2, t3, t4, t5, t6, t7, t8, width;
|
|
@@ -2108,7 +1500,7 @@ function TextInput(props) {
|
|
|
2108
1500
|
__unstable_disableFocusRing = t92, t1 = t102, t2 = t112, className = t122, clearButton = t132, t3 = t142, t4 = t152, gap = t162, IconComponent = t172, IconRightComponent = t182, onClear = t192, t5 = t202, prefix = t212, t6 = t222, readOnly = t232, forwardedRef = t242, t7 = t252, suffix = t262, customValidity = t272, t8 = t282, width = t292, rest = t302, $[0] = t0, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = className, $[5] = clearButton, $[6] = customValidity, $[7] = forwardedRef, $[8] = gap, $[9] = onClear, $[10] = prefix, $[11] = readOnly, $[12] = rest, $[13] = suffix, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = t7, $[21] = t8, $[22] = width;
|
|
2109
1501
|
} else
|
|
2110
1502
|
IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], className = $[4], clearButton = $[5], customValidity = $[6], forwardedRef = $[7], gap = $[8], onClear = $[9], prefix = $[10], readOnly = $[11], rest = $[12], suffix = $[13], t1 = $[14], t2 = $[15], t3 = $[16], t4 = $[17], t5 = $[18], t6 = $[19], t7 = $[20], t8 = $[21], width = $[22];
|
|
2111
|
-
const
|
|
1503
|
+
const Element = t1 === void 0 ? DEFAULT_TEXT_INPUT_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, disabled = t3 === void 0 ? !1 : t3, fontSize = t4 === void 0 ? 2 : t4, padding = t5 === void 0 ? 3 : t5, radius = t6 === void 0 ? 2 : t6, space = t7 === void 0 ? 3 : t7, type = t8 === void 0 ? "text" : t8, ref = useRef(null), responsivePadding = useResponsiveProp(padding), withClearButton = !!clearButton;
|
|
2112
1504
|
let t9;
|
|
2113
1505
|
$[23] === Symbol.for("react.memo_cache_sentinel") ? (t9 = () => ref.current, $[23] = t9) : t9 = $[23], useImperativeHandle(forwardedRef, t9), useCustomValidity(ref, customValidity);
|
|
2114
1506
|
const handleClearMouseDown = _temp;
|
|
@@ -2118,23 +1510,24 @@ function TextInput(props) {
|
|
|
2118
1510
|
}, $[24] = onClear, $[25] = t10) : t10 = $[25];
|
|
2119
1511
|
const handleClearClick = t10;
|
|
2120
1512
|
let t11, t12;
|
|
2121
|
-
$[26] !==
|
|
1513
|
+
$[26] !== responsivePadding ? (t12 = Object.fromEntries(Object.entries(responsivePadding).map(_temp2)), $[26] = responsivePadding, $[27] = t12) : t12 = $[27], t11 = t12;
|
|
2122
1514
|
const clearButtonBoxPadding = t11;
|
|
2123
1515
|
let t13, t14;
|
|
2124
|
-
$[28] !==
|
|
1516
|
+
$[28] !== responsivePadding ? (t14 = Object.fromEntries(Object.entries(responsivePadding).map(_temp3)), $[28] = responsivePadding, $[29] = t14) : t14 = $[29], t13 = t14;
|
|
2125
1517
|
const clearButtonPadding = t13;
|
|
2126
1518
|
let t15;
|
|
2127
1519
|
t15 = isRecord(clearButton) ? clearButton : EMPTY_RECORD;
|
|
2128
1520
|
const clearButtonProps = t15, t16 = gap ?? space;
|
|
2129
1521
|
let t17;
|
|
2130
|
-
$[30] !== border || $[31] !== className || $[32] !== fontSize || $[33] !== padding || $[34] !== radius || $[35] !== t16 || $[36] !== width ? (t17 =
|
|
1522
|
+
$[30] !== border || $[31] !== className || $[32] !== fontSize || $[33] !== padding || $[34] !== radius || $[35] !== t16 || $[36] !== width ? (t17 = textInput({
|
|
1523
|
+
className,
|
|
2131
1524
|
border,
|
|
2132
1525
|
fontSize,
|
|
2133
1526
|
padding,
|
|
2134
1527
|
radius,
|
|
2135
1528
|
gap: t16,
|
|
2136
1529
|
width
|
|
2137
|
-
})
|
|
1530
|
+
}), $[30] = border, $[31] = className, $[32] = fontSize, $[33] = padding, $[34] = radius, $[35] = t16, $[36] = width, $[37] = t17) : t17 = $[37];
|
|
2138
1531
|
const t18 = IconComponent ? "" : void 0, t19 = IconRightComponent ? "" : void 0, t20 = customValidity ? "" : void 0, t21 = prefix ? "" : void 0, t22 = !disabled && readOnly ? "" : void 0, t23 = suffix ? "" : void 0;
|
|
2139
1532
|
let t24;
|
|
2140
1533
|
$[38] !== prefix ? (t24 = prefix && /* @__PURE__ */ jsx(Box, { className: textInputPrefix(), sizing: "border", children: /* @__PURE__ */ jsx("span", { children: prefix }) }), $[38] = prefix, $[39] = t24) : t24 = $[39];
|
|
@@ -2144,22 +1537,16 @@ function TextInput(props) {
|
|
|
2144
1537
|
$[41] === Symbol.for("react.memo_cache_sentinel") ? (t26 = _inputElement(), $[41] = t26) : t26 = $[41];
|
|
2145
1538
|
const t27 = __unstable_disableFocusRing ? "" : void 0;
|
|
2146
1539
|
let t28;
|
|
2147
|
-
$[42] !==
|
|
1540
|
+
$[42] !== Element || $[43] !== disabled || $[44] !== readOnly || $[45] !== rest || $[46] !== t27 || $[47] !== type ? (t28 = /* @__PURE__ */ jsx(Element, { ...rest, className: t26, "data-no-focus-ring": t27, disabled, readOnly, ref, type }), $[42] = Element, $[43] = disabled, $[44] = readOnly, $[45] = rest, $[46] = t27, $[47] = type, $[48] = t28) : t28 = $[48];
|
|
2148
1541
|
let t29;
|
|
2149
1542
|
$[49] === Symbol.for("react.memo_cache_sentinel") ? (t29 = _inputPresentation(), $[49] = t29) : t29 = $[49];
|
|
2150
1543
|
let t30;
|
|
2151
|
-
$[50] !== IconComponent || $[51] !== fontSize || $[52] !== padding ? (t30 = IconComponent && /* @__PURE__ */ jsx(Box, { padding, position: "absolute",
|
|
2152
|
-
top: 0,
|
|
2153
|
-
left: 0
|
|
2154
|
-
}, children: /* @__PURE__ */ jsxs(Text, { size: fontSize, children: [
|
|
1544
|
+
$[50] !== IconComponent || $[51] !== fontSize || $[52] !== padding ? (t30 = IconComponent && /* @__PURE__ */ jsx(Box, { padding, position: "absolute", insetTop: 0, insetLeft: 0, children: /* @__PURE__ */ jsxs(Text, { size: fontSize, children: [
|
|
2155
1545
|
isValidElement(IconComponent) && IconComponent,
|
|
2156
1546
|
isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
|
|
2157
1547
|
] }) }), $[50] = IconComponent, $[51] = fontSize, $[52] = padding, $[53] = t30) : t30 = $[53];
|
|
2158
1548
|
let t31;
|
|
2159
|
-
$[54] !== IconRightComponent || $[55] !== fontSize || $[56] !== padding || $[57] !== withClearButton ? (t31 = !withClearButton && IconRightComponent && /* @__PURE__ */ jsx(Box, { padding, position: "absolute",
|
|
2160
|
-
top: 0,
|
|
2161
|
-
right: 0
|
|
2162
|
-
}, children: /* @__PURE__ */ jsxs(Text, { size: fontSize, children: [
|
|
1549
|
+
$[54] !== IconRightComponent || $[55] !== fontSize || $[56] !== padding || $[57] !== withClearButton ? (t31 = !withClearButton && IconRightComponent && /* @__PURE__ */ jsx(Box, { padding, position: "absolute", insetTop: 0, insetRight: 0, children: /* @__PURE__ */ jsxs(Text, { size: fontSize, children: [
|
|
2163
1550
|
isValidElement(IconRightComponent) && IconRightComponent,
|
|
2164
1551
|
isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
|
|
2165
1552
|
] }) }), $[54] = IconRightComponent, $[55] = fontSize, $[56] = padding, $[57] = withClearButton, $[58] = t31) : t31 = $[58];
|
|
@@ -2169,7 +1556,9 @@ function TextInput(props) {
|
|
|
2169
1556
|
t31
|
|
2170
1557
|
] }), $[59] = t30, $[60] = t31, $[61] = t32) : t32 = $[61];
|
|
2171
1558
|
let t33;
|
|
2172
|
-
$[62] !== clearButton || $[63] !== clearButtonBoxPadding || $[64] !== clearButtonPadding || $[65] !== clearButtonProps || $[66] !== disabled || $[67] !== fontSize || $[68] !== handleClearClick || $[69] !== radius || $[70] !== readOnly ? (t33 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(Box, {
|
|
1559
|
+
$[62] !== clearButton || $[63] !== clearButtonBoxPadding || $[64] !== clearButtonPadding || $[65] !== clearButtonProps || $[66] !== disabled || $[67] !== fontSize || $[68] !== handleClearClick || $[69] !== radius || $[70] !== readOnly ? (t33 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(Box, { insetTop: 0, insetRight: 0, padding: clearButtonBoxPadding, position: "absolute", style: {
|
|
1560
|
+
zIndex: 2
|
|
1561
|
+
}, children: /* @__PURE__ */ jsx(Button, { "aria-label": "Clear", "data-qa": "clear-button", display: "block", fontSize, icon: CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[62] = clearButton, $[63] = clearButtonBoxPadding, $[64] = clearButtonPadding, $[65] = clearButtonProps, $[66] = disabled, $[67] = fontSize, $[68] = handleClearClick, $[69] = radius, $[70] = readOnly, $[71] = t33) : t33 = $[71];
|
|
2173
1562
|
let t34;
|
|
2174
1563
|
$[72] !== t28 || $[73] !== t32 || $[74] !== t33 ? (t34 = /* @__PURE__ */ jsxs(Box, { className: t25, flex: 1, position: "relative", children: [
|
|
2175
1564
|
t28,
|
|
@@ -2179,22 +1568,23 @@ function TextInput(props) {
|
|
|
2179
1568
|
let t35;
|
|
2180
1569
|
$[76] !== suffix ? (t35 = suffix && /* @__PURE__ */ jsx(Box, { className: textInputSuffix(), sizing: "border", children: /* @__PURE__ */ jsx("span", { children: suffix }) }), $[76] = suffix, $[77] = t35) : t35 = $[77];
|
|
2181
1570
|
let t36;
|
|
2182
|
-
return $[78] !== t17 || $[79] !== t18 || $[80] !== t19 || $[81] !== t20 || $[82] !== t21 || $[83] !== t22 || $[84] !== t23 || $[85] !== t24 || $[86] !== t34 || $[87] !== t35 ? (t36 = /* @__PURE__ */ jsxs(Box, {
|
|
1571
|
+
return $[78] !== t17 || $[79] !== t18 || $[80] !== t19 || $[81] !== t20 || $[82] !== t21 || $[83] !== t22 || $[84] !== t23 || $[85] !== t24 || $[86] !== t34 || $[87] !== t35 ? (t36 = /* @__PURE__ */ jsxs(Box, { alignItems: "center", className: t17, "data-icon-left": t18, "data-icon-right": t19, "data-invalid": t20, "data-prefix": t21, "data-read-only": t22, "data-suffix": t23, "data-ui": "TextInput", display: "flex", children: [
|
|
2183
1572
|
t24,
|
|
2184
1573
|
t34,
|
|
2185
1574
|
t35
|
|
2186
1575
|
] }), $[78] = t17, $[79] = t18, $[80] = t19, $[81] = t20, $[82] = t21, $[83] = t22, $[84] = t23, $[85] = t24, $[86] = t34, $[87] = t35, $[88] = t36) : t36 = $[88], t36;
|
|
2187
1576
|
}
|
|
2188
|
-
function _temp3(
|
|
2189
|
-
|
|
1577
|
+
function _temp3(t0) {
|
|
1578
|
+
const [key_0, value_0] = t0;
|
|
1579
|
+
return value_0 === 0 ? [key_0, 0] : value_0 === 1 ? [key_0, 0] : value_0 === 2 ? [key_0, 1] : [key_0, typeof value_0 == "number" ? value_0 - 1 : 0];
|
|
2190
1580
|
}
|
|
2191
|
-
function _temp2(
|
|
2192
|
-
|
|
1581
|
+
function _temp2(t0) {
|
|
1582
|
+
const [key2, value] = t0;
|
|
1583
|
+
return value === 0 ? [key2, 0] : value === 1 ? [key2, 1] : value === 2 ? [key2, 1] : [key2, typeof value == "number" ? value - 2 : 0];
|
|
2193
1584
|
}
|
|
2194
1585
|
function _temp(event) {
|
|
2195
1586
|
event.preventDefault(), event.stopPropagation();
|
|
2196
1587
|
}
|
|
2197
|
-
TextInput.displayName = "TextInput";
|
|
2198
1588
|
function useDelayedState(initialState) {
|
|
2199
1589
|
const $ = c(3), [state, setState] = useState(initialState), delayedAction = useRef(void 0);
|
|
2200
1590
|
let t0;
|
|
@@ -2228,26 +1618,6 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
2228
1618
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
2229
1619
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
2230
1620
|
}, TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
|
|
2231
|
-
function TooltipDelayGroupProvider(props) {
|
|
2232
|
-
const $ = c(9), {
|
|
2233
|
-
children,
|
|
2234
|
-
delay
|
|
2235
|
-
} = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay : delay?.open || 0, closeDelay = typeof delay == "number" ? delay : delay?.close || 0;
|
|
2236
|
-
let t0;
|
|
2237
|
-
const t1 = isGroupActive ? 1 : openDelay;
|
|
2238
|
-
let t2;
|
|
2239
|
-
$[0] !== closeDelay || $[1] !== openTooltipId || $[2] !== setIsGroupActive || $[3] !== setOpenTooltipId || $[4] !== t1 ? (t2 = {
|
|
2240
|
-
setIsGroupActive,
|
|
2241
|
-
openTooltipId,
|
|
2242
|
-
setOpenTooltipId,
|
|
2243
|
-
openDelay: t1,
|
|
2244
|
-
closeDelay
|
|
2245
|
-
}, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] = t1, $[5] = t2) : t2 = $[5], t0 = t2;
|
|
2246
|
-
const value = t0;
|
|
2247
|
-
let t3;
|
|
2248
|
-
return $[6] !== children || $[7] !== value ? (t3 = /* @__PURE__ */ jsx(TooltipDelayGroupContext.Provider, { value, children }), $[6] = children, $[7] = value, $[8] = t3) : t3 = $[8], t3;
|
|
2249
|
-
}
|
|
2250
|
-
TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
|
|
2251
1621
|
function useTooltipDelayGroup() {
|
|
2252
1622
|
return useContext(TooltipDelayGroupContext);
|
|
2253
1623
|
}
|
|
@@ -2307,7 +1677,6 @@ function TooltipLayer(props) {
|
|
|
2307
1677
|
t12
|
|
2308
1678
|
] }), $[35] = children, $[36] = padding, $[37] = placement, $[38] = radius, $[39] = rest, $[40] = rootStyle, $[41] = scheme, $[42] = shadow, $[43] = t10, $[44] = t11, $[45] = t12, $[46] = t8, $[47] = t9, $[48] = tone, $[49] = t13) : t13 = $[49], t13;
|
|
2309
1679
|
}
|
|
2310
|
-
TooltipLayer.displayName = "TooltipLayer";
|
|
2311
1680
|
const DEFAULT_TOOLTIP_ELEMENT = "div";
|
|
2312
1681
|
function Tooltip(props) {
|
|
2313
1682
|
const boundaryElementContext = useBoundaryElement(), {
|
|
@@ -2320,7 +1689,7 @@ function Tooltip(props) {
|
|
|
2320
1689
|
content,
|
|
2321
1690
|
delay,
|
|
2322
1691
|
disabled,
|
|
2323
|
-
fallbackPlacements
|
|
1692
|
+
fallbackPlacements = props.fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? "bottom"],
|
|
2324
1693
|
padding = 2,
|
|
2325
1694
|
placement: placementProp = "bottom",
|
|
2326
1695
|
portal: portalProp,
|
|
@@ -2331,7 +1700,7 @@ function Tooltip(props) {
|
|
|
2331
1700
|
zOffset = Z_OFFSETS.tooltip,
|
|
2332
1701
|
tone = "inherit",
|
|
2333
1702
|
...rest
|
|
2334
|
-
} = props, card2 = useCard(), animate = usePrefersReducedMotion() ? !1 : _animate,
|
|
1703
|
+
} = props, card2 = useCard(), animate = usePrefersReducedMotion() ? !1 : _animate, ref = useRef(null), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = useState(0);
|
|
2335
1704
|
useImperativeHandle(forwardedRef, () => ref.current);
|
|
2336
1705
|
const portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements?.[portalProp] || null : portal.element, middleware = useMemo(() => {
|
|
2337
1706
|
const ret = [];
|
|
@@ -2427,7 +1796,9 @@ function Tooltip(props) {
|
|
|
2427
1796
|
}) : null, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave]);
|
|
2428
1797
|
if (useImperativeHandle(childProp ? getElementRef(childProp) : null, () => referenceElement, [referenceElement]), !child) return /* @__PURE__ */ jsx(Fragment, {});
|
|
2429
1798
|
if (disabled) return child;
|
|
2430
|
-
const node_0 = /* @__PURE__ */ jsx(TooltipLayer, { "data-ui": "Tooltip", ...rest, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, className:
|
|
1799
|
+
const node_0 = /* @__PURE__ */ jsx(TooltipLayer, { "data-ui": "Tooltip", ...rest, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, className: tooltip({
|
|
1800
|
+
className
|
|
1801
|
+
}), originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, style: {
|
|
2431
1802
|
...floatingStyles,
|
|
2432
1803
|
maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
|
|
2433
1804
|
}, tone, zOffset, children: content }), children = showTooltip && (portalProp ? /* @__PURE__ */ jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: /* @__PURE__ */ jsx(CardProvider, { tone: tone === "inherit" ? card2?.tone ?? "default" : tone, scheme: scheme ?? "light", children: node_0 }) }) : node_0);
|
|
@@ -2460,7 +1831,6 @@ function useCloseOnMouseLeave(t0) {
|
|
|
2460
1831
|
let t3;
|
|
2461
1832
|
$[7] !== isInsideGroup || $[8] !== showTooltip ? (t3 = [isInsideGroup, showTooltip], $[7] = isInsideGroup, $[8] = showTooltip, $[9] = t3) : t3 = $[9], useEffect(t2, t3);
|
|
2462
1833
|
}
|
|
2463
|
-
Tooltip.displayName = "Tooltip";
|
|
2464
1834
|
const DEFAULT_HOTKEYS_ELEMENT = "kbd";
|
|
2465
1835
|
function Hotkeys(props) {
|
|
2466
1836
|
const $ = c(27), t0 = props;
|
|
@@ -2490,7 +1860,6 @@ function Hotkeys(props) {
|
|
|
2490
1860
|
let t5;
|
|
2491
1861
|
return $[20] !== as || $[21] !== gapX || $[22] !== gapY || $[23] !== rest || $[24] !== t3 || $[25] !== t4 ? (t5 = /* @__PURE__ */ jsx(Box, { as, "data-ui": "Hotkeys", ...rest, display: "flex", gap: t3, gapX, gapY, children: t4 }), $[20] = as, $[21] = gapX, $[22] = gapY, $[23] = rest, $[24] = t3, $[25] = t4, $[26] = t5) : t5 = $[26], t5;
|
|
2492
1862
|
}
|
|
2493
|
-
Hotkeys.displayName = "Hotkeys";
|
|
2494
1863
|
const MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
|
|
2495
1864
|
function _isFocusable(element) {
|
|
2496
1865
|
return isHTMLAnchorElement(element) && element.getAttribute("data-disabled") !== "true" || isHTMLButtonElement(element) && !element.disabled;
|
|
@@ -2710,7 +2079,9 @@ function Menu(props) {
|
|
|
2710
2079
|
}, $[32] = activeElement, $[33] = activeIndex, $[34] = handleItemMouseEnter, $[35] = handleItemMouseLeave, $[36] = mount, $[37] = onClickOutside, $[38] = onEscape, $[39] = onItemClick, $[40] = registerElement, $[41] = t12) : t12 = $[41], t11 = t12;
|
|
2711
2080
|
const value = t11;
|
|
2712
2081
|
let t13;
|
|
2713
|
-
$[42] !== className ? (t13 =
|
|
2082
|
+
$[42] !== className ? (t13 = menu({
|
|
2083
|
+
className
|
|
2084
|
+
}), $[42] = className, $[43] = t13) : t13 = $[43];
|
|
2714
2085
|
const t14 = gap ?? space;
|
|
2715
2086
|
let t15;
|
|
2716
2087
|
$[44] !== children || $[45] !== t14 ? (t15 = /* @__PURE__ */ jsx(Stack, { gap: t14, children }), $[44] = children, $[45] = t14, $[46] = t15) : t15 = $[46];
|
|
@@ -2719,7 +2090,6 @@ function Menu(props) {
|
|
|
2719
2090
|
let t17;
|
|
2720
2091
|
return $[55] !== t16 || $[56] !== value ? (t17 = /* @__PURE__ */ jsx(MenuContext.Provider, { value, children: t16 }), $[55] = t16, $[56] = value, $[57] = t17) : t17 = $[57], t17;
|
|
2721
2092
|
}
|
|
2722
|
-
Menu.displayName = "Menu";
|
|
2723
2093
|
const DEFAULT_MENU_DIVIDER_ELEMENT = "hr";
|
|
2724
2094
|
function MenuDivider(props) {
|
|
2725
2095
|
const $ = c(10), t0 = props;
|
|
@@ -2729,13 +2099,14 @@ function MenuDivider(props) {
|
|
|
2729
2099
|
className,
|
|
2730
2100
|
...rest
|
|
2731
2101
|
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
|
|
2732
|
-
const
|
|
2102
|
+
const Element = t1 === void 0 ? DEFAULT_MENU_DIVIDER_ELEMENT : t1;
|
|
2733
2103
|
let t2;
|
|
2734
|
-
$[4] !== className ? (t2 =
|
|
2104
|
+
$[4] !== className ? (t2 = menuDivider({
|
|
2105
|
+
className
|
|
2106
|
+
}), $[4] = className, $[5] = t2) : t2 = $[5];
|
|
2735
2107
|
let t3;
|
|
2736
|
-
return $[6] !==
|
|
2108
|
+
return $[6] !== Element || $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Element, { ...rest, className: t2 }), $[6] = Element, $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
|
|
2737
2109
|
}
|
|
2738
|
-
MenuDivider.displayName = "MenuDivider";
|
|
2739
2110
|
const DEFAULT_SELECTABLE_ELEMENT = "button";
|
|
2740
2111
|
function Selectable(props) {
|
|
2741
2112
|
const $ = c(14), t0 = props;
|
|
@@ -2749,14 +2120,14 @@ function Selectable(props) {
|
|
|
2749
2120
|
} = t0, $[0] = t0, $[1] = className, $[2] = radius, $[3] = rest, $[4] = t1, $[5] = tone) : (className = $[1], radius = $[2], rest = $[3], t1 = $[4], tone = $[5]);
|
|
2750
2121
|
const as = t1 === void 0 ? DEFAULT_SELECTABLE_ELEMENT : t1;
|
|
2751
2122
|
let t2;
|
|
2752
|
-
$[6] !== className || $[7] !== radius || $[8] !== tone ? (t2 =
|
|
2123
|
+
$[6] !== className || $[7] !== radius || $[8] !== tone ? (t2 = _selectable({
|
|
2124
|
+
className,
|
|
2753
2125
|
radius,
|
|
2754
2126
|
tone
|
|
2755
|
-
})
|
|
2127
|
+
}), $[6] = className, $[7] = radius, $[8] = tone, $[9] = t2) : t2 = $[9];
|
|
2756
2128
|
let t3;
|
|
2757
2129
|
return $[10] !== as || $[11] !== rest || $[12] !== t2 ? (t3 = /* @__PURE__ */ jsx(Box, { ...rest, as, className: t2 }), $[10] = as, $[11] = rest, $[12] = t2, $[13] = t3) : t3 = $[13], t3;
|
|
2758
2130
|
}
|
|
2759
|
-
Selectable.displayName = "Selectable";
|
|
2760
2131
|
function useMenu() {
|
|
2761
2132
|
const value = useContext(MenuContext);
|
|
2762
2133
|
if (!value)
|
|
@@ -2768,7 +2139,7 @@ function useMenu() {
|
|
|
2768
2139
|
const DEFAULT_MENU_GROUP_ELEMENT = "button";
|
|
2769
2140
|
function MenuGroup(props) {
|
|
2770
2141
|
const $ = c(79), t0 = props;
|
|
2771
|
-
let IconComponent, children, gap, menuProps, onClick,
|
|
2142
|
+
let IconComponent, children, gap, menuProps, onClick, popover2, rest, t1, t2, t3, t4, t5, t6, text2;
|
|
2772
2143
|
$[0] !== t0 ? ({
|
|
2773
2144
|
as: t1,
|
|
2774
2145
|
children,
|
|
@@ -2778,13 +2149,13 @@ function MenuGroup(props) {
|
|
|
2778
2149
|
menu: menuProps,
|
|
2779
2150
|
onClick,
|
|
2780
2151
|
padding: t3,
|
|
2781
|
-
popover,
|
|
2152
|
+
popover: popover2,
|
|
2782
2153
|
radius: t4,
|
|
2783
2154
|
space: t5,
|
|
2784
2155
|
text: text2,
|
|
2785
2156
|
tone: t6,
|
|
2786
2157
|
...rest
|
|
2787
|
-
} = t0, $[0] = t0, $[1] = IconComponent, $[2] = children, $[3] = gap, $[4] = menuProps, $[5] = onClick, $[6] =
|
|
2158
|
+
} = t0, $[0] = t0, $[1] = IconComponent, $[2] = children, $[3] = gap, $[4] = menuProps, $[5] = onClick, $[6] = popover2, $[7] = rest, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5, $[13] = t6, $[14] = text2) : (IconComponent = $[1], children = $[2], gap = $[3], menuProps = $[4], onClick = $[5], popover2 = $[6], rest = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12], t6 = $[13], text2 = $[14]);
|
|
2788
2159
|
const as = t1 === void 0 ? DEFAULT_MENU_GROUP_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, space = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, menu2 = useMenu(), {
|
|
2789
2160
|
activeElement,
|
|
2790
2161
|
mount,
|
|
@@ -2868,9 +2239,8 @@ function MenuGroup(props) {
|
|
|
2868
2239
|
let t32;
|
|
2869
2240
|
$[62] !== as || $[63] !== handleClick || $[64] !== handleMouseEnter || $[65] !== radius || $[66] !== rest || $[67] !== t22 || $[68] !== t23 || $[69] !== t24 || $[70] !== t25 || $[71] !== t31 || $[72] !== tone ? (t32 = /* @__PURE__ */ jsx(Selectable, { "data-ui": "MenuGroup", ...rest, "aria-pressed": t22, as, "data-pressed": t23, "data-selected": t24, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, radius, ref: setRootElement, tabIndex: -1, tone, type: t25, children: t31 }), $[62] = as, $[63] = handleClick, $[64] = handleMouseEnter, $[65] = radius, $[66] = rest, $[67] = t22, $[68] = t23, $[69] = t24, $[70] = t25, $[71] = t31, $[72] = tone, $[73] = t32) : t32 = $[73];
|
|
2870
2241
|
let t33;
|
|
2871
|
-
return $[74] !== childMenu || $[75] !== open || $[76] !==
|
|
2242
|
+
return $[74] !== childMenu || $[75] !== open || $[76] !== popover2 || $[77] !== t32 ? (t33 = /* @__PURE__ */ jsx(Popover, { ...popover2, content: childMenu, "data-ui": "MenuGroup__popover", open, children: t32 }), $[74] = childMenu, $[75] = open, $[76] = popover2, $[77] = t32, $[78] = t33) : t33 = $[78], t33;
|
|
2872
2243
|
}
|
|
2873
|
-
MenuGroup.displayName = "MenuGroup";
|
|
2874
2244
|
const DEFAULT_MENU_ITEM_ELEMENT = "button";
|
|
2875
2245
|
function MenuItem(props) {
|
|
2876
2246
|
const $ = c(75), t0 = props;
|
|
@@ -2959,25 +2329,24 @@ function MenuItem(props) {
|
|
|
2959
2329
|
t19
|
|
2960
2330
|
] }), $[60] = as, $[61] = disabled, $[62] = handleClick, $[63] = onItemMouseEnter, $[64] = onItemMouseLeave, $[65] = radius, $[66] = rest, $[67] = t14, $[68] = t15, $[69] = t16, $[70] = t17, $[71] = t18, $[72] = t19, $[73] = tone, $[74] = t20) : t20 = $[74], t20;
|
|
2961
2331
|
}
|
|
2962
|
-
MenuItem.displayName = "MenuItem";
|
|
2963
2332
|
const DEFAULT_TAB_ELEMENT = "button";
|
|
2964
2333
|
function Tab(props) {
|
|
2965
2334
|
const $ = c(33), t0 = props;
|
|
2966
|
-
let focused, forwardedRef, icon, id,
|
|
2335
|
+
let focused, forwardedRef, icon, id, label, onClick, onFocus, rest, selected, t1, t2, t3;
|
|
2967
2336
|
$[0] !== t0 ? ({
|
|
2968
2337
|
as: t1,
|
|
2969
2338
|
icon,
|
|
2970
2339
|
id,
|
|
2971
2340
|
focused,
|
|
2972
2341
|
fontSize: t2,
|
|
2973
|
-
label
|
|
2342
|
+
label,
|
|
2974
2343
|
onClick,
|
|
2975
2344
|
onFocus,
|
|
2976
2345
|
padding: t3,
|
|
2977
2346
|
ref: forwardedRef,
|
|
2978
2347
|
selected,
|
|
2979
2348
|
...rest
|
|
2980
|
-
} = t0, $[0] = t0, $[1] = focused, $[2] = forwardedRef, $[3] = icon, $[4] = id, $[5] =
|
|
2349
|
+
} = t0, $[0] = t0, $[1] = focused, $[2] = forwardedRef, $[3] = icon, $[4] = id, $[5] = label, $[6] = onClick, $[7] = onFocus, $[8] = rest, $[9] = selected, $[10] = t1, $[11] = t2, $[12] = t3) : (focused = $[1], forwardedRef = $[2], icon = $[3], id = $[4], label = $[5], onClick = $[6], onFocus = $[7], rest = $[8], selected = $[9], t1 = $[10], t2 = $[11], t3 = $[12]);
|
|
2981
2350
|
const as = t1 === void 0 ? DEFAULT_TAB_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 2 : t3, ref = useRef(null), focusedRef = useRef(!1);
|
|
2982
2351
|
let t4;
|
|
2983
2352
|
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[13] = t4) : t4 = $[13], useImperativeHandle(forwardedRef, t4);
|
|
@@ -2997,9 +2366,8 @@ function Tab(props) {
|
|
|
2997
2366
|
}, t8 = [focused], $[17] = focused, $[18] = t7, $[19] = t8) : (t7 = $[18], t8 = $[19]), useEffect(t7, t8);
|
|
2998
2367
|
const t9 = selected ? "true" : "false", t10 = selected ? 0 : -1;
|
|
2999
2368
|
let t11;
|
|
3000
|
-
return $[20] !== as || $[21] !== fontSize || $[22] !== handleFocus || $[23] !== icon || $[24] !== id || $[25] !==
|
|
2369
|
+
return $[20] !== as || $[21] !== fontSize || $[22] !== handleFocus || $[23] !== icon || $[24] !== id || $[25] !== label || $[26] !== onClick || $[27] !== padding || $[28] !== rest || $[29] !== selected || $[30] !== t10 || $[31] !== t9 ? (t11 = /* @__PURE__ */ jsx(Button, { "data-ui": "Tab", ...rest, "aria-selected": t9, as, fontSize, icon, id, mode: "bleed", onClick, onBlur: handleBlur, onFocus: handleFocus, padding, ref, role: "tab", selected, tabIndex: t10, text: label, type: "button" }), $[20] = as, $[21] = fontSize, $[22] = handleFocus, $[23] = icon, $[24] = id, $[25] = label, $[26] = onClick, $[27] = padding, $[28] = rest, $[29] = selected, $[30] = t10, $[31] = t9, $[32] = t11) : t11 = $[32], t11;
|
|
3001
2370
|
}
|
|
3002
|
-
Tab.displayName = "Tab";
|
|
3003
2371
|
const DEFAULT_TAB_LIST_ELEMENT = "div";
|
|
3004
2372
|
function TabList(props) {
|
|
3005
2373
|
const $ = c(21), t0 = props;
|
|
@@ -3033,73 +2401,48 @@ function TabList(props) {
|
|
|
3033
2401
|
let t8;
|
|
3034
2402
|
return $[14] !== as || $[15] !== handleKeyDown || $[16] !== rest || $[17] !== t7 || $[18] !== tabs || $[19] !== wrap ? (t8 = /* @__PURE__ */ jsx(Flex, { "data-ui": "TabList", ...rest, as, gap: t7, onKeyDown: handleKeyDown, role: "tablist", wrap, children: tabs }), $[14] = as, $[15] = handleKeyDown, $[16] = rest, $[17] = t7, $[18] = tabs, $[19] = wrap, $[20] = t8) : t8 = $[20], t8;
|
|
3035
2403
|
}
|
|
3036
|
-
TabList.displayName = "TabList";
|
|
3037
2404
|
function _isReactElement(node) {
|
|
3038
2405
|
return !!node;
|
|
3039
2406
|
}
|
|
3040
2407
|
export {
|
|
3041
2408
|
AnimatedSpinnerIcon,
|
|
3042
2409
|
Arrow,
|
|
3043
|
-
|
|
3044
|
-
AvatarCounter,
|
|
3045
|
-
AvatarStack,
|
|
3046
|
-
Badge,
|
|
3047
|
-
BoundaryElementProvider,
|
|
2410
|
+
BoundaryElementContext,
|
|
3048
2411
|
Box,
|
|
3049
2412
|
Button,
|
|
3050
2413
|
Card,
|
|
3051
2414
|
CardProvider,
|
|
3052
|
-
Checkbox,
|
|
3053
2415
|
Code,
|
|
3054
|
-
Container,
|
|
3055
2416
|
DEFAULT_ARROW_ELEMENT,
|
|
3056
|
-
DEFAULT_AVATAR_COUNTER_ELEMENT,
|
|
3057
|
-
DEFAULT_AVATAR_ELEMENT,
|
|
3058
|
-
DEFAULT_AVATAR_STACK_ELEMENT,
|
|
3059
|
-
DEFAULT_BADGE_ELEMENT,
|
|
3060
2417
|
DEFAULT_BOX_ELEMENT,
|
|
3061
2418
|
DEFAULT_BUTTON_ELEMENT,
|
|
3062
2419
|
DEFAULT_CARD_ELEMENT,
|
|
3063
|
-
DEFAULT_CHECKBOX_ELEMENT,
|
|
3064
2420
|
DEFAULT_CODE_ELEMENT,
|
|
3065
|
-
DEFAULT_CONTAINER_ELEMENT,
|
|
3066
2421
|
DEFAULT_ELEMENT_QUERY_ELEMENT,
|
|
3067
2422
|
DEFAULT_FLEX_ELEMENT,
|
|
3068
2423
|
DEFAULT_GRID_ELEMENT,
|
|
3069
|
-
DEFAULT_HEADING_ELEMENT,
|
|
3070
2424
|
DEFAULT_HOTKEYS_ELEMENT,
|
|
3071
|
-
DEFAULT_INLINE_ELEMENT,
|
|
3072
2425
|
DEFAULT_KBD_ELEMENT,
|
|
3073
|
-
DEFAULT_LABEL_ELEMENT,
|
|
3074
2426
|
DEFAULT_LAYER_ELEMENT,
|
|
3075
2427
|
DEFAULT_MENU_DIVIDER_ELEMENT,
|
|
3076
2428
|
DEFAULT_MENU_ELEMENT,
|
|
3077
2429
|
DEFAULT_MENU_GROUP_ELEMENT,
|
|
3078
2430
|
DEFAULT_MENU_ITEM_ELEMENT,
|
|
3079
2431
|
DEFAULT_POPOVER_ELEMENT,
|
|
3080
|
-
DEFAULT_RADIO_ELEMENT,
|
|
3081
|
-
DEFAULT_SELECT_ELEMENT,
|
|
3082
2432
|
DEFAULT_SPINNER_ELEMENT,
|
|
3083
|
-
DEFAULT_SR_ONLY_ELEMENT,
|
|
3084
2433
|
DEFAULT_STACK_ELEMENT,
|
|
3085
|
-
DEFAULT_SWITCH_ELEMENT,
|
|
3086
2434
|
DEFAULT_TAB_ELEMENT,
|
|
3087
2435
|
DEFAULT_TAB_LIST_ELEMENT,
|
|
3088
|
-
DEFAULT_TEXT_AREA_ELEMENT,
|
|
3089
2436
|
DEFAULT_TEXT_ELEMENT,
|
|
3090
2437
|
DEFAULT_TEXT_INPUT_ELEMENT,
|
|
3091
2438
|
DEFAULT_TOOLTIP_ELEMENT,
|
|
3092
|
-
DEFAULT_VIRTUAL_LIST_ELEMENT,
|
|
3093
2439
|
EMPTY_ARRAY,
|
|
3094
2440
|
EMPTY_RECORD,
|
|
3095
2441
|
ElementQuery,
|
|
3096
2442
|
Flex,
|
|
3097
2443
|
Grid,
|
|
3098
|
-
Heading,
|
|
3099
2444
|
Hotkeys,
|
|
3100
|
-
Inline,
|
|
3101
2445
|
KBD,
|
|
3102
|
-
Label,
|
|
3103
2446
|
Layer,
|
|
3104
2447
|
LayerProvider,
|
|
3105
2448
|
Menu,
|
|
@@ -3109,30 +2452,23 @@ export {
|
|
|
3109
2452
|
Popover,
|
|
3110
2453
|
Portal,
|
|
3111
2454
|
PortalProvider,
|
|
3112
|
-
Radio,
|
|
3113
|
-
Select,
|
|
3114
2455
|
Selectable,
|
|
3115
2456
|
Spinner,
|
|
3116
|
-
SrOnly,
|
|
3117
2457
|
Stack,
|
|
3118
|
-
Switch,
|
|
3119
2458
|
Tab,
|
|
3120
2459
|
TabList,
|
|
3121
2460
|
Text,
|
|
3122
|
-
TextArea,
|
|
3123
2461
|
TextInput,
|
|
3124
2462
|
ThemeColorProvider,
|
|
3125
2463
|
ThemeProvider,
|
|
3126
2464
|
Tooltip,
|
|
3127
2465
|
TooltipDelayGroupContext,
|
|
3128
|
-
TooltipDelayGroupProvider,
|
|
3129
|
-
VirtualList,
|
|
3130
2466
|
Z_OFFSETS,
|
|
3131
2467
|
_ResizeObserver,
|
|
3132
2468
|
_elementSizeObserver,
|
|
3133
2469
|
_getArrayProp,
|
|
2470
|
+
_getResponsiveProp,
|
|
3134
2471
|
_isEnterToClickElement,
|
|
3135
|
-
_isScrollable,
|
|
3136
2472
|
containsOrEqualsElement,
|
|
3137
2473
|
createGlobalScopedContext,
|
|
3138
2474
|
isHTMLAnchorElement,
|
|
@@ -3142,11 +2478,11 @@ export {
|
|
|
3142
2478
|
isHTMLSelectElement,
|
|
3143
2479
|
isHTMLTextAreaElement,
|
|
3144
2480
|
isRecord,
|
|
3145
|
-
useArrayProp,
|
|
3146
2481
|
useBoundaryElement,
|
|
3147
2482
|
useCard,
|
|
3148
2483
|
useClickOutsideEvent,
|
|
3149
2484
|
useCustomValidity,
|
|
2485
|
+
useDelayedState,
|
|
3150
2486
|
useElementSize,
|
|
3151
2487
|
useGlobalKeyDown,
|
|
3152
2488
|
useLayer,
|
|
@@ -3155,6 +2491,7 @@ export {
|
|
|
3155
2491
|
usePortal,
|
|
3156
2492
|
usePrefersDark,
|
|
3157
2493
|
usePrefersReducedMotion,
|
|
2494
|
+
useResponsiveProp,
|
|
3158
2495
|
useRootTheme,
|
|
3159
2496
|
useTheme,
|
|
3160
2497
|
useTheme_v2,
|