@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
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1 } from "@sanity/ui/theme";
|
|
2
|
-
import { isHTMLAnchorElement, isHTMLInputElement, isHTMLButtonElement, isHTMLSelectElement, isHTMLTextAreaElement, isHTMLElement, EMPTY_ARRAY, useElementSize, Code,
|
|
3
|
-
import { Arrow,
|
|
2
|
+
import { isHTMLAnchorElement, isHTMLInputElement, isHTMLButtonElement, isHTMLSelectElement, isHTMLTextAreaElement, isHTMLElement, _getArrayProp, EMPTY_ARRAY, useElementSize, useResponsiveProp, Box, Text, useCustomValidity, BoundaryElementContext, Code, _ResizeObserver, useDelayedState, TooltipDelayGroupContext, _isEnterToClickElement, Card, EMPTY_RECORD, Button, Stack, Popover, TextInput, AnimatedSpinnerIcon, useClickOutsideEvent, Flex, containsOrEqualsElement, usePortal, useBoundaryElement, useLayer, useGlobalKeyDown, createGlobalScopedContext, usePrefersReducedMotion, Portal, Z_OFFSETS, Layer, Grid, LayerProvider, isRecord, Selectable } from "./_chunks-es/_visual-editing.js";
|
|
3
|
+
import { Arrow, CardProvider, DEFAULT_ARROW_ELEMENT, DEFAULT_BOX_ELEMENT, DEFAULT_BUTTON_ELEMENT, DEFAULT_CARD_ELEMENT, DEFAULT_CODE_ELEMENT, DEFAULT_ELEMENT_QUERY_ELEMENT, DEFAULT_FLEX_ELEMENT, DEFAULT_GRID_ELEMENT, DEFAULT_HOTKEYS_ELEMENT, DEFAULT_KBD_ELEMENT, DEFAULT_LAYER_ELEMENT, DEFAULT_MENU_DIVIDER_ELEMENT, DEFAULT_MENU_ELEMENT, DEFAULT_MENU_GROUP_ELEMENT, DEFAULT_MENU_ITEM_ELEMENT, DEFAULT_POPOVER_ELEMENT, DEFAULT_SPINNER_ELEMENT, DEFAULT_STACK_ELEMENT, DEFAULT_TAB_ELEMENT, DEFAULT_TAB_LIST_ELEMENT, DEFAULT_TEXT_ELEMENT, DEFAULT_TEXT_INPUT_ELEMENT, DEFAULT_TOOLTIP_ELEMENT, ElementQuery, Hotkeys, KBD, Menu, MenuDivider, MenuGroup, MenuItem, PortalProvider, Spinner, Tab, TabList, ThemeColorProvider, ThemeProvider, Tooltip, _elementSizeObserver, _getResponsiveProp, useCard, useMatchMedia, useMediaIndex, usePrefersDark, useRootTheme, useTheme, useTheme_v2, useTooltipDelayGroup } from "./_chunks-es/_visual-editing.js";
|
|
4
4
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
5
|
-
import { ChevronDownIcon, CloseIcon, ToggleArrowRightIcon } from "@sanity/icons";
|
|
6
|
-
import { useState, useRef, useEffect, useImperativeHandle,
|
|
5
|
+
import { CheckmarkIcon, RemoveIcon, ChevronDownIcon, CloseIcon, ToggleArrowRightIcon } from "@sanity/icons";
|
|
6
|
+
import { useState, useRef, useEffect, useImperativeHandle, Children, isValidElement, Fragment, cloneElement, Component, useReducer, useCallback, useMemo, useContext, useSyncExternalStore, startTransition, memo, useId } from "react";
|
|
7
7
|
import { c } from "react-compiler-runtime";
|
|
8
|
-
import {
|
|
8
|
+
import { label, textOverflow, avatar, avatarArrow, avatarInitials, avatarImage, avatarImageOutline, avatarCounter, avatarStack, badge, checkbox, checkboxInput, checkboxPresentation, container as container$1, heading, srOnly, vars, radio, radioInput, radioPresentation, select, _inputElement, selectPresentation, _switch, _switchElement, _switchPresentation, _switchTrack, _switchThumb, textArea, _inputPresentation, breadcrumbs, dialogCard, dialogLayout, dialogHeader, dialogContent, dialogFooter, dialog, dialogContainer, skeleton, codeSkeleton, headingSkeleton, labelSkeleton, textSkeleton, toast, toastLayer, treeItem } from "@sanity/ui/css";
|
|
9
9
|
import { px, rem } from "@sanity/ui/css";
|
|
10
10
|
import { motion, AnimatePresence } from "framer-motion";
|
|
11
11
|
const createColorTheme = createColorTheme$1, hexToRgb = hexToRgb$1, hslToRgb = hslToRgb$1, multiply = multiply$1, parseColor = parseColor$1, rgbToHex = rgbToHex$1, rgbToHsl = rgbToHsl$1, rgba = rgba$1, screen = screen$1;
|
|
@@ -60,6 +60,18 @@ function focusLastDescendant(element) {
|
|
|
60
60
|
}
|
|
61
61
|
return !1;
|
|
62
62
|
}
|
|
63
|
+
function _isScrollable(el) {
|
|
64
|
+
if (!(el instanceof Element)) return !1;
|
|
65
|
+
const style = window.getComputedStyle(el);
|
|
66
|
+
return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
|
|
67
|
+
}
|
|
68
|
+
function useArrayProp(val, defaultVal) {
|
|
69
|
+
const $ = c(3);
|
|
70
|
+
let t0;
|
|
71
|
+
$[0] !== defaultVal || $[1] !== val ? (t0 = () => [_getArrayProp(val, defaultVal), JSON.stringify(val ?? defaultVal)], $[0] = defaultVal, $[1] = val, $[2] = t0) : t0 = $[2];
|
|
72
|
+
const [t1, setCache] = useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val ?? defaultVal);
|
|
73
|
+
return hash !== cachedHash && setCache([_getArrayProp(val, defaultVal), hash]), cachedVal;
|
|
74
|
+
}
|
|
63
75
|
function _getElements(element, elementsArg) {
|
|
64
76
|
const ret = [element];
|
|
65
77
|
for (const el of elementsArg)
|
|
@@ -115,6 +127,322 @@ function useForwardedRef(ref) {
|
|
|
115
127
|
let t0;
|
|
116
128
|
return $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => innerRef.current, $[0] = t0) : t0 = $[0], useImperativeHandle(ref, t0), innerRef;
|
|
117
129
|
}
|
|
130
|
+
const DEFAULT_LABEL_ELEMENT = "div";
|
|
131
|
+
function Label(props) {
|
|
132
|
+
const $ = c(28);
|
|
133
|
+
let accent, align, children, className, rest, t0, t1, t2, t3, textOverflowProp;
|
|
134
|
+
$[0] !== props ? ({
|
|
135
|
+
accent,
|
|
136
|
+
align,
|
|
137
|
+
as: t0,
|
|
138
|
+
children,
|
|
139
|
+
className,
|
|
140
|
+
muted: t1,
|
|
141
|
+
size: t2,
|
|
142
|
+
textOverflow: textOverflowProp,
|
|
143
|
+
weight: t3,
|
|
144
|
+
...rest
|
|
145
|
+
} = 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]);
|
|
146
|
+
const Element2 = t0 === void 0 ? DEFAULT_LABEL_ELEMENT : t0, muted = t1 === void 0 ? !1 : t1, size = t2 === void 0 ? 1 : t2, weight = t3 === void 0 ? "regular" : t3;
|
|
147
|
+
let t4;
|
|
148
|
+
$[11] !== accent || $[12] !== align || $[13] !== className || $[14] !== muted || $[15] !== size || $[16] !== weight ? (t4 = label({
|
|
149
|
+
className,
|
|
150
|
+
accent,
|
|
151
|
+
align,
|
|
152
|
+
muted,
|
|
153
|
+
size,
|
|
154
|
+
weight
|
|
155
|
+
}), $[11] = accent, $[12] = align, $[13] = className, $[14] = muted, $[15] = size, $[16] = weight, $[17] = t4) : t4 = $[17];
|
|
156
|
+
let t5;
|
|
157
|
+
$[18] !== textOverflowProp ? (t5 = textOverflow({
|
|
158
|
+
textOverflow: textOverflowProp
|
|
159
|
+
}), $[18] = textOverflowProp, $[19] = t5) : t5 = $[19];
|
|
160
|
+
let t6;
|
|
161
|
+
$[20] !== children || $[21] !== t5 ? (t6 = /* @__PURE__ */ jsx("span", { className: t5, children }), $[20] = children, $[21] = t5, $[22] = t6) : t6 = $[22];
|
|
162
|
+
let t7;
|
|
163
|
+
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;
|
|
164
|
+
}
|
|
165
|
+
const DEFAULT_AVATAR_ELEMENT = "span";
|
|
166
|
+
function Avatar(props) {
|
|
167
|
+
const $ = c(51), t0 = props;
|
|
168
|
+
let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, className, initials, onImageLoadError, rest, src, t1, t2, t3, t4, title;
|
|
169
|
+
$[0] !== t0 ? ({
|
|
170
|
+
__unstable_hideInnerStroke,
|
|
171
|
+
as: t1,
|
|
172
|
+
className,
|
|
173
|
+
color: t2,
|
|
174
|
+
src,
|
|
175
|
+
title,
|
|
176
|
+
initials,
|
|
177
|
+
onImageLoadError,
|
|
178
|
+
arrowPosition: arrowPositionProp,
|
|
179
|
+
animateArrowFrom,
|
|
180
|
+
status: t3,
|
|
181
|
+
size: t4,
|
|
182
|
+
...rest
|
|
183
|
+
} = 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]);
|
|
184
|
+
const Element2 = t1 === void 0 ? DEFAULT_AVATAR_ELEMENT : t1, color = t2 === void 0 ? "magenta" : t2, sizeProp = t4 === void 0 ? 1 : t4, size = useResponsiveProp(sizeProp), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageError, setImageError] = useState(!1);
|
|
185
|
+
let t5, t6;
|
|
186
|
+
$[14] !== arrowPosition || $[15] !== arrowPositionProp ? (t5 = () => {
|
|
187
|
+
if (arrowPosition === arrowPositionProp)
|
|
188
|
+
return;
|
|
189
|
+
const raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
|
|
190
|
+
return () => cancelAnimationFrame(raf);
|
|
191
|
+
}, t6 = [arrowPosition, arrowPositionProp], $[14] = arrowPosition, $[15] = arrowPositionProp, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), useEffect(t5, t6);
|
|
192
|
+
let t7, t8;
|
|
193
|
+
$[18] !== src ? (t7 = () => {
|
|
194
|
+
src && setImageError(!1);
|
|
195
|
+
}, t8 = [src], $[18] = src, $[19] = t7, $[20] = t8) : (t7 = $[19], t8 = $[20]), useEffect(t7, t8);
|
|
196
|
+
let t9;
|
|
197
|
+
$[21] !== onImageLoadError ? (t9 = () => {
|
|
198
|
+
setImageError(!0), onImageLoadError && onImageLoadError(new Error("Avatar: the image failed to load"));
|
|
199
|
+
}, $[21] = onImageLoadError, $[22] = t9) : t9 = $[22];
|
|
200
|
+
const handleImageError = t9;
|
|
201
|
+
let t10, t11;
|
|
202
|
+
$[23] !== size ? (t11 = Object.values(size).map(_temp$4), $[23] = size, $[24] = t11) : t11 = $[24], t10 = t11;
|
|
203
|
+
const initialsSize = t10, t12 = __unstable_hideInnerStroke ? "" : void 0;
|
|
204
|
+
let t13;
|
|
205
|
+
$[25] !== className || $[26] !== color || $[27] !== sizeProp ? (t13 = avatar({
|
|
206
|
+
className,
|
|
207
|
+
color,
|
|
208
|
+
size: sizeProp
|
|
209
|
+
}), $[25] = className, $[26] = color, $[27] = sizeProp, $[28] = t13) : t13 = $[28];
|
|
210
|
+
const t14 = imageError ? "" : void 0;
|
|
211
|
+
let t15;
|
|
212
|
+
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t15 = avatarArrow(), $[29] = t15) : t15 = $[29];
|
|
213
|
+
let t16;
|
|
214
|
+
$[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];
|
|
215
|
+
let t17;
|
|
216
|
+
$[32] === Symbol.for("react.memo_cache_sentinel") ? (t17 = avatarInitials(), $[32] = t17) : t17 = $[32];
|
|
217
|
+
let t18;
|
|
218
|
+
$[33] !== initials || $[34] !== initialsSize ? (t18 = /* @__PURE__ */ jsx(Box, { alignItems: "center", as: "span", className: t17, display: "flex", justifyContent: "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];
|
|
219
|
+
let t19;
|
|
220
|
+
$[36] !== handleImageError || $[37] !== initials || $[38] !== src ? (t19 = src && /* @__PURE__ */ jsxs(Box, { className: avatarImage(), inset: 0, position: "absolute", children: [
|
|
221
|
+
/* @__PURE__ */ jsx("img", { alt: initials, onError: handleImageError, src }),
|
|
222
|
+
/* @__PURE__ */ jsx("span", { className: avatarImageOutline() })
|
|
223
|
+
] }), $[36] = handleImageError, $[37] = initials, $[38] = src, $[39] = t19) : t19 = $[39];
|
|
224
|
+
let t20;
|
|
225
|
+
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: [
|
|
226
|
+
t16,
|
|
227
|
+
t18,
|
|
228
|
+
t19
|
|
229
|
+
] }), $[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;
|
|
230
|
+
}
|
|
231
|
+
function _temp$4(s) {
|
|
232
|
+
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
233
|
+
}
|
|
234
|
+
const DEFAULT_AVATAR_COUNTER_ELEMENT = "div";
|
|
235
|
+
function AvatarCounter(props) {
|
|
236
|
+
const $ = c(19), t0 = props;
|
|
237
|
+
let className, count, rest, t1, t2;
|
|
238
|
+
$[0] !== t0 ? ({
|
|
239
|
+
as: t1,
|
|
240
|
+
className,
|
|
241
|
+
count,
|
|
242
|
+
size: t2,
|
|
243
|
+
...rest
|
|
244
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = count, $[3] = rest, $[4] = t1, $[5] = t2) : (className = $[1], count = $[2], rest = $[3], t1 = $[4], t2 = $[5]);
|
|
245
|
+
const as = t1 === void 0 ? DEFAULT_AVATAR_COUNTER_ELEMENT : t1, size = useResponsiveProp(t2 === void 0 ? 1 : t2);
|
|
246
|
+
let t3, t4;
|
|
247
|
+
$[6] !== size ? (t4 = Object.values(size).map(_temp$3), $[6] = size, $[7] = t4) : t4 = $[7], t3 = t4;
|
|
248
|
+
const labelSize = t3;
|
|
249
|
+
let t5;
|
|
250
|
+
$[8] !== className || $[9] !== size ? (t5 = avatarCounter({
|
|
251
|
+
className,
|
|
252
|
+
size
|
|
253
|
+
}), $[8] = className, $[9] = size, $[10] = t5) : t5 = $[10];
|
|
254
|
+
let t6;
|
|
255
|
+
$[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];
|
|
256
|
+
let t7;
|
|
257
|
+
return $[14] !== as || $[15] !== rest || $[16] !== t5 || $[17] !== t6 ? (t7 = /* @__PURE__ */ jsx(Box, { "data-ui": "AvatarCounter", ...rest, alignItems: "center", as, className: t5, display: "flex", flex: "none", justifyContent: "center", paddingX: 2, sizing: "border", children: t6 }), $[14] = as, $[15] = rest, $[16] = t5, $[17] = t6, $[18] = t7) : t7 = $[18], t7;
|
|
258
|
+
}
|
|
259
|
+
function _temp$3(s) {
|
|
260
|
+
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
261
|
+
}
|
|
262
|
+
const DEFAULT_AVATAR_STACK_ELEMENT = "div";
|
|
263
|
+
function AvatarStack(props) {
|
|
264
|
+
const $ = c(20), t0 = props;
|
|
265
|
+
let childrenProp, className, rest, t1, t2, t3;
|
|
266
|
+
$[0] !== t0 ? ({
|
|
267
|
+
as: t1,
|
|
268
|
+
children: childrenProp,
|
|
269
|
+
className,
|
|
270
|
+
maxLength: t2,
|
|
271
|
+
size: t3,
|
|
272
|
+
...rest
|
|
273
|
+
} = 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]);
|
|
274
|
+
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), size = useResponsiveProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children, T0 = Box, t4 = "AvatarStack", t5 = "center";
|
|
275
|
+
let t6;
|
|
276
|
+
$[7] !== className || $[8] !== size ? (t6 = avatarStack({
|
|
277
|
+
className,
|
|
278
|
+
size
|
|
279
|
+
}), $[7] = className, $[8] = size, $[9] = t6) : t6 = $[9];
|
|
280
|
+
const t7 = "flex", t8 = "flex-start", t9 = len === 0 && /* @__PURE__ */ jsx(AvatarCounter, { count: len, size }), t10 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx(AvatarCounter, { count: extraCount, size });
|
|
281
|
+
let t11;
|
|
282
|
+
$[10] !== size ? (t11 = (child, childIndex) => /* @__PURE__ */ jsx(Fragment, { children: cloneElement(child, {
|
|
283
|
+
size
|
|
284
|
+
}) }, String(childIndex)), $[10] = size, $[11] = t11) : t11 = $[11];
|
|
285
|
+
const t12 = visibleChildren.map(t11);
|
|
286
|
+
let t13;
|
|
287
|
+
return $[12] !== T0 || $[13] !== as || $[14] !== rest || $[15] !== t10 || $[16] !== t12 || $[17] !== t6 || $[18] !== t9 ? (t13 = /* @__PURE__ */ jsxs(T0, { "data-ui": t4, ...rest, alignItems: t5, as, className: t6, display: t7, justifyContent: t8, children: [
|
|
288
|
+
t9,
|
|
289
|
+
t10,
|
|
290
|
+
t12
|
|
291
|
+
] }), $[12] = T0, $[13] = as, $[14] = rest, $[15] = t10, $[16] = t12, $[17] = t6, $[18] = t9, $[19] = t13) : t13 = $[19], t13;
|
|
292
|
+
}
|
|
293
|
+
const DEFAULT_BADGE_ELEMENT = "span";
|
|
294
|
+
function Badge(props) {
|
|
295
|
+
const $ = c(22), t0 = props;
|
|
296
|
+
let children, className, rest, t1, t2, t3, t4, t5;
|
|
297
|
+
$[0] !== t0 ? ({
|
|
298
|
+
as: t1,
|
|
299
|
+
children,
|
|
300
|
+
className,
|
|
301
|
+
fontSize: t2,
|
|
302
|
+
padding: t3,
|
|
303
|
+
radius: t4,
|
|
304
|
+
tone: t5,
|
|
305
|
+
...rest
|
|
306
|
+
} = 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]);
|
|
307
|
+
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;
|
|
308
|
+
let t6;
|
|
309
|
+
$[9] !== className || $[10] !== tone ? (t6 = badge({
|
|
310
|
+
className,
|
|
311
|
+
tone
|
|
312
|
+
}), $[9] = className, $[10] = tone, $[11] = t6) : t6 = $[11];
|
|
313
|
+
let t7;
|
|
314
|
+
$[12] !== children || $[13] !== fontSize ? (t7 = /* @__PURE__ */ jsx(Text, { size: fontSize, children }), $[12] = children, $[13] = fontSize, $[14] = t7) : t7 = $[14];
|
|
315
|
+
let t8;
|
|
316
|
+
return $[15] !== as || $[16] !== padding || $[17] !== radius || $[18] !== rest || $[19] !== t6 || $[20] !== t7 ? (t8 = /* @__PURE__ */ jsx(Box, { "data-ui": "Badge", ...rest, as, className: t6, display: "inline-flex", maxWidth: "fill", padding, radius, children: t7 }), $[15] = as, $[16] = padding, $[17] = radius, $[18] = rest, $[19] = t6, $[20] = t7, $[21] = t8) : t8 = $[21], t8;
|
|
317
|
+
}
|
|
318
|
+
const DEFAULT_CHECKBOX_ELEMENT = "input";
|
|
319
|
+
function Checkbox(props) {
|
|
320
|
+
const $ = c(30), t0 = props;
|
|
321
|
+
let checked, className, customValidity, disabled, forwardedRef, indeterminate, readOnly, rest, style, t1;
|
|
322
|
+
$[0] !== t0 ? ({
|
|
323
|
+
as: t1,
|
|
324
|
+
checked,
|
|
325
|
+
className,
|
|
326
|
+
disabled,
|
|
327
|
+
indeterminate,
|
|
328
|
+
customValidity,
|
|
329
|
+
readOnly,
|
|
330
|
+
ref: forwardedRef,
|
|
331
|
+
style,
|
|
332
|
+
...rest
|
|
333
|
+
} = 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]);
|
|
334
|
+
const Element2 = t1 === void 0 ? DEFAULT_CHECKBOX_ELEMENT : t1, ref = useRef(null);
|
|
335
|
+
let t2;
|
|
336
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], useImperativeHandle(forwardedRef, t2);
|
|
337
|
+
let t3, t4;
|
|
338
|
+
$[12] !== indeterminate ? (t3 = () => {
|
|
339
|
+
ref.current && (ref.current.indeterminate = indeterminate || !1);
|
|
340
|
+
}, t4 = [indeterminate], $[12] = indeterminate, $[13] = t3, $[14] = t4) : (t3 = $[13], t4 = $[14]), useEffect(t3, t4), useCustomValidity(ref, customValidity);
|
|
341
|
+
let t5;
|
|
342
|
+
$[15] !== className ? (t5 = checkbox({
|
|
343
|
+
className
|
|
344
|
+
}), $[15] = className, $[16] = t5) : t5 = $[16];
|
|
345
|
+
let t6;
|
|
346
|
+
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t6 = checkboxInput(), $[17] = t6) : t6 = $[17];
|
|
347
|
+
const t7 = customValidity ? "" : void 0, t8 = disabled || readOnly;
|
|
348
|
+
let t9;
|
|
349
|
+
$[18] !== Element2 || $[19] !== checked || $[20] !== readOnly || $[21] !== rest || $[22] !== t7 || $[23] !== t8 ? (t9 = /* @__PURE__ */ jsx(Element2, { ...rest, checked, className: t6, "data-invalid": t7, disabled: t8, type: "checkbox", readOnly, ref }), $[18] = Element2, $[19] = checked, $[20] = readOnly, $[21] = rest, $[22] = t7, $[23] = t8, $[24] = t9) : t9 = $[24];
|
|
350
|
+
let t10;
|
|
351
|
+
$[25] === Symbol.for("react.memo_cache_sentinel") ? (t10 = /* @__PURE__ */ jsxs("span", { className: checkboxPresentation(), children: [
|
|
352
|
+
/* @__PURE__ */ jsx(CheckmarkIcon, {}),
|
|
353
|
+
/* @__PURE__ */ jsx(RemoveIcon, {})
|
|
354
|
+
] }), $[25] = t10) : t10 = $[25];
|
|
355
|
+
let t11;
|
|
356
|
+
return $[26] !== style || $[27] !== t5 || $[28] !== t9 ? (t11 = /* @__PURE__ */ jsxs("span", { className: t5, "data-ui": "Checkbox", style, children: [
|
|
357
|
+
t9,
|
|
358
|
+
t10
|
|
359
|
+
] }), $[26] = style, $[27] = t5, $[28] = t9, $[29] = t11) : t11 = $[29], t11;
|
|
360
|
+
}
|
|
361
|
+
const DEFAULT_CONTAINER_ELEMENT = "div";
|
|
362
|
+
function Container(props) {
|
|
363
|
+
const $ = c(12), t0 = props;
|
|
364
|
+
let className, rest, t1, t2;
|
|
365
|
+
$[0] !== t0 ? ({
|
|
366
|
+
as: t1,
|
|
367
|
+
className,
|
|
368
|
+
width: t2,
|
|
369
|
+
...rest
|
|
370
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1, $[4] = t2) : (className = $[1], rest = $[2], t1 = $[3], t2 = $[4]);
|
|
371
|
+
const as = t1 === void 0 ? DEFAULT_CONTAINER_ELEMENT : t1, width = t2 === void 0 ? 2 : t2;
|
|
372
|
+
let t3;
|
|
373
|
+
$[5] !== className || $[6] !== width ? (t3 = container$1({
|
|
374
|
+
className,
|
|
375
|
+
width
|
|
376
|
+
}), $[5] = className, $[6] = width, $[7] = t3) : t3 = $[7];
|
|
377
|
+
let t4;
|
|
378
|
+
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;
|
|
379
|
+
}
|
|
380
|
+
const DEFAULT_HEADING_ELEMENT = "div";
|
|
381
|
+
function Heading(props) {
|
|
382
|
+
const $ = c(30), t0 = props;
|
|
383
|
+
let align, children, className, flex, rest, t1, t2, t3, t4, t5, textOverflowProp;
|
|
384
|
+
$[0] !== t0 ? ({
|
|
385
|
+
accent: t1,
|
|
386
|
+
align,
|
|
387
|
+
as: t2,
|
|
388
|
+
children,
|
|
389
|
+
className,
|
|
390
|
+
flex,
|
|
391
|
+
muted: t3,
|
|
392
|
+
size: t4,
|
|
393
|
+
textOverflow: textOverflowProp,
|
|
394
|
+
weight: t5,
|
|
395
|
+
...rest
|
|
396
|
+
} = 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]);
|
|
397
|
+
const accent = t1 === void 0 ? !1 : t1, Element2 = t2 === void 0 ? DEFAULT_HEADING_ELEMENT : t2, muted = t3 === void 0 ? !1 : t3, size = t4 === void 0 ? 2 : t4, weight = t5 === void 0 ? "regular" : t5;
|
|
398
|
+
let t6;
|
|
399
|
+
$[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size || $[18] !== weight ? (t6 = heading({
|
|
400
|
+
className,
|
|
401
|
+
accent,
|
|
402
|
+
align,
|
|
403
|
+
flex,
|
|
404
|
+
muted,
|
|
405
|
+
size,
|
|
406
|
+
weight
|
|
407
|
+
}), $[12] = accent, $[13] = align, $[14] = className, $[15] = flex, $[16] = muted, $[17] = size, $[18] = weight, $[19] = t6) : t6 = $[19];
|
|
408
|
+
let t7;
|
|
409
|
+
$[20] !== textOverflowProp ? (t7 = textOverflow({
|
|
410
|
+
textOverflow: textOverflowProp
|
|
411
|
+
}), $[20] = textOverflowProp, $[21] = t7) : t7 = $[21];
|
|
412
|
+
let t8;
|
|
413
|
+
$[22] !== children || $[23] !== t7 ? (t8 = /* @__PURE__ */ jsx("span", { className: t7, children }), $[22] = children, $[23] = t7, $[24] = t8) : t8 = $[24];
|
|
414
|
+
let t9;
|
|
415
|
+
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;
|
|
416
|
+
}
|
|
417
|
+
const DEFAULT_INLINE_ELEMENT = "div";
|
|
418
|
+
function Inline(props) {
|
|
419
|
+
const $ = c(11), t0 = props;
|
|
420
|
+
let children, gap, rest, space, t1;
|
|
421
|
+
$[0] !== t0 ? ({
|
|
422
|
+
as: t1,
|
|
423
|
+
children,
|
|
424
|
+
gap,
|
|
425
|
+
space,
|
|
426
|
+
...rest
|
|
427
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = gap, $[3] = rest, $[4] = space, $[5] = t1) : (children = $[1], gap = $[2], rest = $[3], space = $[4], t1 = $[5]);
|
|
428
|
+
const as = t1 === void 0 ? DEFAULT_INLINE_ELEMENT : t1, t2 = gap ?? space;
|
|
429
|
+
let t3;
|
|
430
|
+
return $[6] !== as || $[7] !== children || $[8] !== rest || $[9] !== t2 ? (t3 = /* @__PURE__ */ jsx(Box, { "data-ui": "Inline", ...rest, alignItems: "center", as, display: "flex", gap: t2, flexWrap: "wrap", children }), $[6] = as, $[7] = children, $[8] = rest, $[9] = t2, $[10] = t3) : t3 = $[10], t3;
|
|
431
|
+
}
|
|
432
|
+
function BoundaryElementProvider(props) {
|
|
433
|
+
const $ = c(5), {
|
|
434
|
+
children,
|
|
435
|
+
element
|
|
436
|
+
} = props;
|
|
437
|
+
let t0, t1;
|
|
438
|
+
$[0] !== element ? (t1 = {
|
|
439
|
+
version: 0,
|
|
440
|
+
element
|
|
441
|
+
}, $[0] = element, $[1] = t1) : t1 = $[1], t0 = t1;
|
|
442
|
+
const value = t0;
|
|
443
|
+
let t2;
|
|
444
|
+
return $[2] !== children || $[3] !== value ? (t2 = /* @__PURE__ */ jsx(BoundaryElementContext.Provider, { value, children }), $[2] = children, $[3] = value, $[4] = t2) : t2 = $[4], t2;
|
|
445
|
+
}
|
|
118
446
|
class ErrorBoundary extends Component {
|
|
119
447
|
state = {
|
|
120
448
|
error: null
|
|
@@ -142,6 +470,336 @@ class ErrorBoundary extends Component {
|
|
|
142
470
|
return this.props.children;
|
|
143
471
|
}
|
|
144
472
|
}
|
|
473
|
+
const DEFAULT_SR_ONLY_ELEMENT = "span";
|
|
474
|
+
function SrOnly(props) {
|
|
475
|
+
const $ = c(12), t0 = props;
|
|
476
|
+
let children, className, rest, t1;
|
|
477
|
+
$[0] !== t0 ? ({
|
|
478
|
+
as: t1,
|
|
479
|
+
children,
|
|
480
|
+
className,
|
|
481
|
+
...rest
|
|
482
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = rest, $[4] = t1) : (children = $[1], className = $[2], rest = $[3], t1 = $[4]);
|
|
483
|
+
const Element2 = t1 === void 0 ? DEFAULT_SR_ONLY_ELEMENT : t1;
|
|
484
|
+
let t2;
|
|
485
|
+
$[5] !== className ? (t2 = srOnly({
|
|
486
|
+
className
|
|
487
|
+
}), $[5] = className, $[6] = t2) : t2 = $[6];
|
|
488
|
+
let t3;
|
|
489
|
+
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;
|
|
490
|
+
}
|
|
491
|
+
const DEFAULT_VIRTUAL_LIST_ELEMENT = "div";
|
|
492
|
+
function VirtualList(props) {
|
|
493
|
+
const $ = c(58), t0 = props;
|
|
494
|
+
let forwardedRef, getItemKey, onChange, renderItem, rest, t1, t2, t3;
|
|
495
|
+
$[0] !== t0 ? ({
|
|
496
|
+
as: t1,
|
|
497
|
+
gap: t2,
|
|
498
|
+
getItemKey,
|
|
499
|
+
items: t3,
|
|
500
|
+
onChange,
|
|
501
|
+
renderItem,
|
|
502
|
+
ref: forwardedRef,
|
|
503
|
+
...rest
|
|
504
|
+
} = 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]);
|
|
505
|
+
const as = t1 === void 0 ? DEFAULT_VIRTUAL_LIST_ELEMENT : t1, gap = t2 === void 0 ? 0 : t2;
|
|
506
|
+
let t4;
|
|
507
|
+
$[9] !== t3 ? (t4 = t3 === void 0 ? [] : t3, $[9] = t3, $[10] = t4) : t4 = $[10];
|
|
508
|
+
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);
|
|
509
|
+
let t5;
|
|
510
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[11] = t5) : t5 = $[11], useImperativeHandle(forwardedRef, t5);
|
|
511
|
+
let t6, t7;
|
|
512
|
+
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => {
|
|
513
|
+
if (!ref.current)
|
|
514
|
+
return;
|
|
515
|
+
const scrollEl = findScrollable(ref.current.parentNode);
|
|
516
|
+
if (scrollEl) {
|
|
517
|
+
if (!(scrollEl instanceof HTMLElement))
|
|
518
|
+
return;
|
|
519
|
+
const handleScroll = () => {
|
|
520
|
+
setScrollTop(scrollEl.scrollTop);
|
|
521
|
+
};
|
|
522
|
+
scrollEl.addEventListener("scroll", handleScroll, {
|
|
523
|
+
passive: !0
|
|
524
|
+
});
|
|
525
|
+
const ro = new _ResizeObserver((entries) => {
|
|
526
|
+
setScrollHeight(entries[0].contentRect.height);
|
|
527
|
+
});
|
|
528
|
+
return ro.observe(scrollEl), handleScroll(), () => {
|
|
529
|
+
scrollEl.removeEventListener("scroll", handleScroll), ro.unobserve(scrollEl), ro.disconnect();
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
const handleScroll_0 = () => {
|
|
533
|
+
setScrollTop(window.scrollY);
|
|
534
|
+
}, handleResize = () => {
|
|
535
|
+
setScrollHeight(window.innerHeight);
|
|
536
|
+
};
|
|
537
|
+
return window.addEventListener("scroll", handleScroll_0, {
|
|
538
|
+
passive: !0
|
|
539
|
+
}), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll_0(), () => {
|
|
540
|
+
window.removeEventListener("scroll", handleScroll_0), window.removeEventListener("resize", handleResize);
|
|
541
|
+
};
|
|
542
|
+
}, t7 = [], $[12] = t6, $[13] = t7) : (t6 = $[12], t7 = $[13]), useEffect(t6, t7);
|
|
543
|
+
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;
|
|
544
|
+
let t8, t9;
|
|
545
|
+
$[14] !== fromIndex || $[15] !== gapValue || $[16] !== itemHeight || $[17] !== onChange || $[18] !== scrollHeight || $[19] !== scrollTop || $[20] !== toIndex ? (t8 = () => {
|
|
546
|
+
onChange?.({
|
|
547
|
+
fromIndex,
|
|
548
|
+
gap: gapValue,
|
|
549
|
+
itemHeight,
|
|
550
|
+
scrollHeight,
|
|
551
|
+
scrollTop,
|
|
552
|
+
toIndex
|
|
553
|
+
});
|
|
554
|
+
}, 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);
|
|
555
|
+
let t10;
|
|
556
|
+
bb0: {
|
|
557
|
+
if (!renderItem || items.length === 0) {
|
|
558
|
+
t10 = null;
|
|
559
|
+
break bb0;
|
|
560
|
+
}
|
|
561
|
+
if (itemHeight === -1) {
|
|
562
|
+
let t113;
|
|
563
|
+
$[23] === Symbol.for("react.memo_cache_sentinel") ? (t113 = (el) => el ? setItemHeight(el.offsetHeight) : void 0, $[23] = t113) : t113 = $[23];
|
|
564
|
+
let t122;
|
|
565
|
+
$[24] !== items[0] || $[25] !== renderItem ? (t122 = renderItem(items[0]), $[24] = items[0], $[25] = renderItem, $[26] = t122) : t122 = $[26];
|
|
566
|
+
let t132;
|
|
567
|
+
$[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];
|
|
568
|
+
let t142;
|
|
569
|
+
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t142 = (el_0) => el_0 ? setGapValue(el_0.offsetHeight) : void 0, $[29] = t142) : t142 = $[29];
|
|
570
|
+
const t15 = vars.space[gap];
|
|
571
|
+
let t16;
|
|
572
|
+
$[30] !== t15 ? (t16 = /* @__PURE__ */ jsx("div", { ref: t142, style: {
|
|
573
|
+
height: t15
|
|
574
|
+
} }), $[30] = t15, $[31] = t16) : t16 = $[31];
|
|
575
|
+
let t17;
|
|
576
|
+
$[32] !== t132 || $[33] !== t16 ? (t17 = [/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
577
|
+
t132,
|
|
578
|
+
t16
|
|
579
|
+
] })], $[32] = t132, $[33] = t16, $[34] = t17) : t17 = $[34], t10 = t17;
|
|
580
|
+
break bb0;
|
|
581
|
+
}
|
|
582
|
+
let t112;
|
|
583
|
+
if ($[35] !== fromIndex || $[36] !== gapValue || $[37] !== getItemKey || $[38] !== itemHeight || $[39] !== items || $[40] !== renderItem || $[41] !== toIndex) {
|
|
584
|
+
let t122;
|
|
585
|
+
$[43] !== fromIndex || $[44] !== gapValue || $[45] !== getItemKey || $[46] !== itemHeight || $[47] !== renderItem ? (t122 = (item, _itemIndex) => {
|
|
586
|
+
const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
|
|
587
|
+
return /* @__PURE__ */ jsx(Box, { insetLeft: 0, insetRight: 0, position: "absolute", style: {
|
|
588
|
+
top: itemIndex * (itemHeight + gapValue) - gapValue
|
|
589
|
+
}, children: node }, key);
|
|
590
|
+
}, $[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;
|
|
591
|
+
} else
|
|
592
|
+
t112 = $[42];
|
|
593
|
+
t10 = t112;
|
|
594
|
+
}
|
|
595
|
+
const children = t10;
|
|
596
|
+
let t11, t12;
|
|
597
|
+
$[49] !== height ? (t12 = {
|
|
598
|
+
height
|
|
599
|
+
}, $[49] = height, $[50] = t12) : t12 = $[50], t11 = t12;
|
|
600
|
+
const wrapperStyle = t11;
|
|
601
|
+
let t13;
|
|
602
|
+
$[51] !== children || $[52] !== wrapperStyle ? (t13 = /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[51] = children, $[52] = wrapperStyle, $[53] = t13) : t13 = $[53];
|
|
603
|
+
let t14;
|
|
604
|
+
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;
|
|
605
|
+
}
|
|
606
|
+
function findScrollable(parentNode) {
|
|
607
|
+
let _scrollEl = parentNode;
|
|
608
|
+
for (; _scrollEl && !_isScrollable(_scrollEl); )
|
|
609
|
+
_scrollEl = _scrollEl.parentNode;
|
|
610
|
+
return _scrollEl;
|
|
611
|
+
}
|
|
612
|
+
const DEFAULT_RADIO_ELEMENT = "input";
|
|
613
|
+
function Radio(props) {
|
|
614
|
+
const $ = c(25), t0 = props;
|
|
615
|
+
let className, customValidity, disabled, forwardedRef, readOnly, rest, style, t1;
|
|
616
|
+
$[0] !== t0 ? ({
|
|
617
|
+
as: t1,
|
|
618
|
+
className,
|
|
619
|
+
disabled,
|
|
620
|
+
style,
|
|
621
|
+
customValidity,
|
|
622
|
+
readOnly,
|
|
623
|
+
ref: forwardedRef,
|
|
624
|
+
...rest
|
|
625
|
+
} = 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]);
|
|
626
|
+
const Element2 = t1 === void 0 ? DEFAULT_RADIO_ELEMENT : t1, ref = useRef(null);
|
|
627
|
+
let t2;
|
|
628
|
+
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[9] = t2) : t2 = $[9], useImperativeHandle(forwardedRef, t2), useCustomValidity(ref, customValidity);
|
|
629
|
+
let t3;
|
|
630
|
+
$[10] !== className ? (t3 = radio({
|
|
631
|
+
className
|
|
632
|
+
}), $[10] = className, $[11] = t3) : t3 = $[11];
|
|
633
|
+
let t4;
|
|
634
|
+
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t4 = radioInput(), $[12] = t4) : t4 = $[12];
|
|
635
|
+
const t5 = customValidity ? "" : void 0, t6 = !disabled && readOnly ? "" : void 0, t7 = disabled || readOnly;
|
|
636
|
+
let t8;
|
|
637
|
+
$[13] !== Element2 || $[14] !== readOnly || $[15] !== rest || $[16] !== t5 || $[17] !== t6 || $[18] !== t7 ? (t8 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t4, "data-invalid": t5, "data-read-only": t6, disabled: t7, readOnly, ref, type: "radio" }), $[13] = Element2, $[14] = readOnly, $[15] = rest, $[16] = t5, $[17] = t6, $[18] = t7, $[19] = t8) : t8 = $[19];
|
|
638
|
+
let t9;
|
|
639
|
+
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsx("span", { className: radioPresentation() }), $[20] = t9) : t9 = $[20];
|
|
640
|
+
let t10;
|
|
641
|
+
return $[21] !== style || $[22] !== t3 || $[23] !== t8 ? (t10 = /* @__PURE__ */ jsxs("div", { className: t3, "data-ui": "Radio", style, children: [
|
|
642
|
+
t8,
|
|
643
|
+
t9
|
|
644
|
+
] }), $[21] = style, $[22] = t3, $[23] = t8, $[24] = t10) : t10 = $[24], t10;
|
|
645
|
+
}
|
|
646
|
+
const DEFAULT_SELECT_ELEMENT = "select";
|
|
647
|
+
function Select(props) {
|
|
648
|
+
const $ = c(38), t0 = props;
|
|
649
|
+
let children, customValidity, disabled, forwardedRef, gap, readOnly, rest, t1, t2, t3, t4, t5, t6;
|
|
650
|
+
$[0] !== t0 ? ({
|
|
651
|
+
as: t1,
|
|
652
|
+
border: t2,
|
|
653
|
+
children,
|
|
654
|
+
customValidity,
|
|
655
|
+
disabled,
|
|
656
|
+
fontSize: t3,
|
|
657
|
+
gap,
|
|
658
|
+
padding: t4,
|
|
659
|
+
radius: t5,
|
|
660
|
+
readOnly,
|
|
661
|
+
ref: forwardedRef,
|
|
662
|
+
space: t6,
|
|
663
|
+
...rest
|
|
664
|
+
} = 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]);
|
|
665
|
+
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);
|
|
666
|
+
let t7;
|
|
667
|
+
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[14] = t7) : t7 = $[14], useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
|
|
668
|
+
const t8 = gap ?? space;
|
|
669
|
+
let t9;
|
|
670
|
+
$[15] !== border || $[16] !== fontSize || $[17] !== padding || $[18] !== radius || $[19] !== t8 ? (t9 = select({
|
|
671
|
+
border,
|
|
672
|
+
fontSize,
|
|
673
|
+
padding,
|
|
674
|
+
radius,
|
|
675
|
+
gap: t8
|
|
676
|
+
}), $[15] = border, $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t8, $[20] = t9) : t9 = $[20];
|
|
677
|
+
let t10;
|
|
678
|
+
$[21] === Symbol.for("react.memo_cache_sentinel") ? (t10 = _inputElement(), $[21] = t10) : t10 = $[21];
|
|
679
|
+
const t11 = disabled || readOnly;
|
|
680
|
+
let t12;
|
|
681
|
+
$[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];
|
|
682
|
+
let t13;
|
|
683
|
+
$[27] === Symbol.for("react.memo_cache_sentinel") ? (t13 = selectPresentation(), $[27] = t13) : t13 = $[27];
|
|
684
|
+
let t14;
|
|
685
|
+
$[28] === Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsx(ChevronDownIcon, {}), $[28] = t14) : t14 = $[28];
|
|
686
|
+
let t15;
|
|
687
|
+
$[29] !== fontSize ? (t15 = /* @__PURE__ */ jsx(Text, { size: fontSize, children: t14 }), $[29] = fontSize, $[30] = t15) : t15 = $[30];
|
|
688
|
+
let t16;
|
|
689
|
+
$[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];
|
|
690
|
+
let t17;
|
|
691
|
+
return $[34] !== t12 || $[35] !== t16 || $[36] !== t9 ? (t17 = /* @__PURE__ */ jsxs("div", { "data-ui": "Select", className: t9, "data-icon-right": "", children: [
|
|
692
|
+
t12,
|
|
693
|
+
t16
|
|
694
|
+
] }), $[34] = t12, $[35] = t16, $[36] = t9, $[37] = t17) : t17 = $[37], t17;
|
|
695
|
+
}
|
|
696
|
+
const DEFAULT_SWITCH_ELEMENT = "input";
|
|
697
|
+
function Switch(props) {
|
|
698
|
+
const $ = c(31), t0 = props;
|
|
699
|
+
let checked, className, disabled, forwardedRef, indeterminate, readOnly, rest, style, t1;
|
|
700
|
+
$[0] !== t0 ? ({
|
|
701
|
+
as: t1,
|
|
702
|
+
checked,
|
|
703
|
+
className,
|
|
704
|
+
disabled,
|
|
705
|
+
indeterminate,
|
|
706
|
+
readOnly,
|
|
707
|
+
ref: forwardedRef,
|
|
708
|
+
style,
|
|
709
|
+
...rest
|
|
710
|
+
} = 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]);
|
|
711
|
+
const Element2 = t1 === void 0 ? DEFAULT_SWITCH_ELEMENT : t1, ref = useRef(null);
|
|
712
|
+
let t2;
|
|
713
|
+
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[10] = t2) : t2 = $[10], useImperativeHandle(forwardedRef, t2);
|
|
714
|
+
let t3, t4;
|
|
715
|
+
$[11] !== indeterminate ? (t3 = () => {
|
|
716
|
+
ref.current && (ref.current.indeterminate = indeterminate || !1);
|
|
717
|
+
}, t4 = [indeterminate], $[11] = indeterminate, $[12] = t3, $[13] = t4) : (t3 = $[12], t4 = $[13]), useEffect(t3, t4);
|
|
718
|
+
let t5;
|
|
719
|
+
$[14] !== className ? (t5 = _switch({
|
|
720
|
+
className
|
|
721
|
+
}), $[14] = className, $[15] = t5) : t5 = $[15];
|
|
722
|
+
const t6 = checked ? "" : void 0, t7 = indeterminate ? "" : void 0, t8 = indeterminate !== !0 && checked;
|
|
723
|
+
let t9;
|
|
724
|
+
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t9 = _switchElement(), $[16] = t9) : t9 = $[16];
|
|
725
|
+
const t10 = disabled ? "" : void 0, t11 = !disabled && readOnly ? "" : void 0, t12 = disabled || readOnly;
|
|
726
|
+
let t13;
|
|
727
|
+
$[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];
|
|
728
|
+
let t14;
|
|
729
|
+
$[24] === Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsxs("span", { "aria-hidden": !0, className: _switchPresentation(), children: [
|
|
730
|
+
/* @__PURE__ */ jsx("span", { className: _switchTrack() }),
|
|
731
|
+
/* @__PURE__ */ jsx("span", { className: _switchThumb() })
|
|
732
|
+
] }), $[24] = t14) : t14 = $[24];
|
|
733
|
+
let t15;
|
|
734
|
+
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: [
|
|
735
|
+
t13,
|
|
736
|
+
t14
|
|
737
|
+
] }), $[25] = style, $[26] = t13, $[27] = t5, $[28] = t6, $[29] = t7, $[30] = t15) : t15 = $[30], t15;
|
|
738
|
+
}
|
|
739
|
+
const DEFAULT_TEXT_AREA_ELEMENT = "textarea";
|
|
740
|
+
function TextArea(props) {
|
|
741
|
+
const $ = c(34), t0 = props;
|
|
742
|
+
let __unstable_disableFocusRing, customValidity, forwardedRef, gap, readOnly, rest, t1, t2, t3, t4, t5, t6, t7;
|
|
743
|
+
$[0] !== t0 ? ({
|
|
744
|
+
__unstable_disableFocusRing,
|
|
745
|
+
as: t1,
|
|
746
|
+
border: t2,
|
|
747
|
+
customValidity,
|
|
748
|
+
disabled: t3,
|
|
749
|
+
fontSize: t4,
|
|
750
|
+
gap,
|
|
751
|
+
padding: t5,
|
|
752
|
+
radius: t6,
|
|
753
|
+
readOnly,
|
|
754
|
+
ref: forwardedRef,
|
|
755
|
+
space: t7,
|
|
756
|
+
...rest
|
|
757
|
+
} = 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]);
|
|
758
|
+
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);
|
|
759
|
+
let t8;
|
|
760
|
+
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t8 = () => ref.current, $[14] = t8) : t8 = $[14], useImperativeHandle(forwardedRef, t8), useCustomValidity(ref, customValidity);
|
|
761
|
+
const t9 = gap ?? space;
|
|
762
|
+
let t10;
|
|
763
|
+
$[15] !== border || $[16] !== fontSize || $[17] !== padding || $[18] !== radius || $[19] !== t9 ? (t10 = textArea({
|
|
764
|
+
border,
|
|
765
|
+
fontSize,
|
|
766
|
+
padding,
|
|
767
|
+
radius,
|
|
768
|
+
gap: t9
|
|
769
|
+
}), $[15] = border, $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t9, $[20] = t10) : t10 = $[20];
|
|
770
|
+
const t11 = customValidity ? "" : void 0, t12 = !disabled && readOnly ? "" : void 0;
|
|
771
|
+
let t13;
|
|
772
|
+
$[21] === Symbol.for("react.memo_cache_sentinel") ? (t13 = _inputElement(), $[21] = t13) : t13 = $[21];
|
|
773
|
+
const t14 = __unstable_disableFocusRing ? "" : void 0;
|
|
774
|
+
let t15;
|
|
775
|
+
$[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];
|
|
776
|
+
let t16;
|
|
777
|
+
$[28] === Symbol.for("react.memo_cache_sentinel") ? (t16 = /* @__PURE__ */ jsx("span", { className: _inputPresentation() }), $[28] = t16) : t16 = $[28];
|
|
778
|
+
let t17;
|
|
779
|
+
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: [
|
|
780
|
+
t15,
|
|
781
|
+
t16
|
|
782
|
+
] }), $[29] = t10, $[30] = t11, $[31] = t12, $[32] = t15, $[33] = t17) : t17 = $[33], t17;
|
|
783
|
+
}
|
|
784
|
+
function TooltipDelayGroupProvider(props) {
|
|
785
|
+
const $ = c(9), {
|
|
786
|
+
children,
|
|
787
|
+
delay
|
|
788
|
+
} = 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;
|
|
789
|
+
let t0;
|
|
790
|
+
const t1 = isGroupActive ? 1 : openDelay;
|
|
791
|
+
let t2;
|
|
792
|
+
$[0] !== closeDelay || $[1] !== openTooltipId || $[2] !== setIsGroupActive || $[3] !== setOpenTooltipId || $[4] !== t1 ? (t2 = {
|
|
793
|
+
setIsGroupActive,
|
|
794
|
+
openTooltipId,
|
|
795
|
+
setOpenTooltipId,
|
|
796
|
+
openDelay: t1,
|
|
797
|
+
closeDelay
|
|
798
|
+
}, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] = t1, $[5] = t2) : t2 = $[5], t0 = t2;
|
|
799
|
+
const value = t0;
|
|
800
|
+
let t3;
|
|
801
|
+
return $[6] !== children || $[7] !== value ? (t3 = /* @__PURE__ */ jsx(TooltipDelayGroupContext.Provider, { value, children }), $[6] = children, $[7] = value, $[8] = t3) : t3 = $[8], t3;
|
|
802
|
+
}
|
|
145
803
|
function AutocompleteOption(props) {
|
|
146
804
|
const $ = c(11), {
|
|
147
805
|
children,
|
|
@@ -165,7 +823,6 @@ function AutocompleteOption(props) {
|
|
|
165
823
|
let t2;
|
|
166
824
|
return $[5] !== children || $[6] !== handleClick || $[7] !== handleKeyDown || $[8] !== id || $[9] !== selected ? (t2 = /* @__PURE__ */ jsx("li", { "aria-selected": selected, "data-ui": "AutocompleteOption", id, role: "option", onClick: handleClick, onKeyDown: handleKeyDown, children }), $[5] = children, $[6] = handleClick, $[7] = handleKeyDown, $[8] = id, $[9] = selected, $[10] = t2) : t2 = $[10], t2;
|
|
167
825
|
}
|
|
168
|
-
AutocompleteOption.displayName = "AutocompleteOption";
|
|
169
826
|
function autocompleteReducer(state, msg) {
|
|
170
827
|
return msg.type === "input/change" ? {
|
|
171
828
|
...state,
|
|
@@ -255,7 +912,7 @@ function Autocomplete(props) {
|
|
|
255
912
|
value: value_0
|
|
256
913
|
}) => /* @__PURE__ */ jsx(Card, { as: "button", padding: paddingProp, radius: 2, tone: "inherit", children: /* @__PURE__ */ jsx(Text, { size: fontSize, textOverflow: "ellipsis", children: value_0 }) }), [fontSize, paddingProp]), renderOption = typeof renderOptionProp == "function" ? renderOptionProp : defaultRenderOption, filterOption = typeof filterOptionProp == "function" ? filterOptionProp : DEFAULT_FILTER_OPTION, rootElementRef = useRef(null), resultsPopoverElementRef = useRef(null), inputElementRef = useRef(null), listBoxElementRef = useRef(null), listFocusedRef = useRef(!1), valueRef = useRef(value), valuePropRef = useRef(valueProp), popoverMouseWithinRef = useRef(!1);
|
|
257
914
|
useImperativeHandle(forwardedRef, () => inputElementRef.current);
|
|
258
|
-
const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding =
|
|
915
|
+
const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding = useResponsiveProp(paddingProp), currentOption = useMemo(() => value !== null ? options.find((o) => o.value === value) : void 0, [options, value]), filteredOptions = useMemo(() => options.filter((option) => query ? filterOption(query, option) : !0), [filterOption, options, query]), filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null, handleRootBlur = useCallback((event) => {
|
|
259
916
|
setTimeout(() => {
|
|
260
917
|
if (popoverMouseWithinRef.current)
|
|
261
918
|
return;
|
|
@@ -379,7 +1036,7 @@ function Autocomplete(props) {
|
|
|
379
1036
|
"aria-label": "Clear",
|
|
380
1037
|
onFocus: handleClearButtonFocus
|
|
381
1038
|
};
|
|
382
|
-
}, [disabled, handleClearButtonFocus, loading, value]), openButtonBoxPadding = useMemo(() => padding.map((
|
|
1039
|
+
}, [disabled, handleClearButtonFocus, loading, value]), openButtonBoxPadding = useMemo(() => Object.fromEntries(Object.entries(padding).map(([key, value_1]) => value_1 === 0 ? [key, 0] : value_1 === 1 ? [key, 1] : value_1 === 2 ? [key, 1] : [key, value_1 - 2])), [padding]), openButtonPadding = useMemo(() => Object.values(padding).map((v_0) => Math.max(v_0 - 1, 0)), [padding]), openButtonProps = useMemo(() => typeof openButton == "object" ? openButton : EMPTY_RECORD, [openButton]), handleOpenClick = useCallback((event_4) => {
|
|
383
1040
|
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
|
|
384
1041
|
}, [openButtonProps, dispatchOpen]), openButtonNode = useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsx(Button, { "aria-label": "Open", disabled: expanded, display: "block", fontSize, icon: ChevronDownIcon, mode: "bleed", padding: openButtonPadding, ...openButtonProps, onClick: handleOpenClick }) }) : void 0, [disabled, expanded, fontSize, handleOpenClick, openButton, openButtonBoxPadding, openButtonPadding, openButtonProps, readOnly]), inputValue = useMemo(() => query === null ? value !== null ? renderValue(value, currentOption) : "" : query, [currentOption, query, renderValue, value]), input = /* @__PURE__ */ jsx(TextInput, { ...rest, "aria-activedescendant": activeItemId, "aria-autocomplete": "list", "aria-expanded": expanded, "aria-owns": listBoxId, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", as, border, clearButton, customValidity, disabled, fontSize, icon, iconRight: loading && AnimatedSpinnerIcon, id, inputMode: "search", onChange: handleInputChange, onClear: handleClearButtonClick, onFocus: handleInputFocus, padding, prefix, radius, readOnly, ref: inputElementRef, role: "combobox", spellCheck: !1, suffix: suffix || openButtonNode, value: inputValue }), handleListBoxKeyDown = useCallback((event_5) => {
|
|
385
1042
|
event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
|
|
@@ -405,7 +1062,6 @@ function Autocomplete(props) {
|
|
|
405
1062
|
] })
|
|
406
1063
|
);
|
|
407
1064
|
}
|
|
408
|
-
Autocomplete.displayName = "Autocomplete";
|
|
409
1065
|
const DEFAULT_BREADCRUMBS_ELEMENT = "nav";
|
|
410
1066
|
function Breadcrumbs(props) {
|
|
411
1067
|
const {
|
|
@@ -432,12 +1088,13 @@ function Breadcrumbs(props) {
|
|
|
432
1088
|
}
|
|
433
1089
|
return rawItems;
|
|
434
1090
|
}, [collapse, expand, expandButtonProps, gapY, maxLength, open, rawItems]);
|
|
435
|
-
return /* @__PURE__ */ jsx(Flex, { as, "data-ui": "Breadcrumbs", ...rest, className:
|
|
1091
|
+
return /* @__PURE__ */ jsx(Flex, { as, "data-ui": "Breadcrumbs", ...rest, className: breadcrumbs({
|
|
1092
|
+
className
|
|
1093
|
+
}), gapX, gapY, children: items.map((item, itemIndex) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
436
1094
|
itemIndex > 0 && /* @__PURE__ */ jsx(Box, { "aria-hidden": !0, as: "li", children: separator || /* @__PURE__ */ jsx(Text, { muted: !0, children: "/" }) }),
|
|
437
1095
|
/* @__PURE__ */ jsx(Box, { as: "li", children: item })
|
|
438
1096
|
] }, itemIndex)) });
|
|
439
1097
|
}
|
|
440
|
-
Breadcrumbs.displayName = "Breadcrumbs";
|
|
441
1098
|
function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
442
1099
|
return !boundaryElement || !portalElement ? !0 : containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
|
|
443
1100
|
}
|
|
@@ -486,7 +1143,7 @@ function DialogCard(props) {
|
|
|
486
1143
|
let t8;
|
|
487
1144
|
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t8 = () => [ref.current], $[29] = t8) : t8 = $[29], useClickOutsideEvent(t7, t8);
|
|
488
1145
|
let t9;
|
|
489
|
-
$[30] === Symbol.for("react.memo_cache_sentinel") ? (t9 =
|
|
1146
|
+
$[30] === Symbol.for("react.memo_cache_sentinel") ? (t9 = dialogCard(), $[30] = t9) : t9 = $[30];
|
|
490
1147
|
let t10;
|
|
491
1148
|
$[31] === Symbol.for("react.memo_cache_sentinel") ? (t10 = dialogLayout(), $[31] = t10) : t10 = $[31];
|
|
492
1149
|
let t11;
|
|
@@ -509,7 +1166,6 @@ function DialogCard(props) {
|
|
|
509
1166
|
let t16;
|
|
510
1167
|
return $[47] !== as || $[48] !== rest || $[49] !== t15 ? (t16 = /* @__PURE__ */ jsx(Card, { ...rest, as, className: t9, display: "flex", ref, children: t15 }), $[47] = as, $[48] = rest, $[49] = t15, $[50] = t16) : t16 = $[50], t16;
|
|
511
1168
|
}
|
|
512
|
-
DialogCard.displayName = "DialogCard";
|
|
513
1169
|
const DialogContext = createGlobalScopedContext("@sanity/ui/context/dialog", {
|
|
514
1170
|
version: 0
|
|
515
1171
|
});
|
|
@@ -545,7 +1201,7 @@ function Dialog(props) {
|
|
|
545
1201
|
tone,
|
|
546
1202
|
...rest
|
|
547
1203
|
} = t0, $[0] = t0, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] = children, $[4] = className, $[5] = contentRef, $[6] = footer, $[7] = header, $[8] = id, $[9] = onActivate, $[10] = onClickOutside, $[11] = onClose, $[12] = onFocus, $[13] = portalProp, $[14] = rest, $[15] = scheme, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6, $[22] = t7, $[23] = tone) : (_positionProp = $[1], _zOffsetProp = $[2], children = $[3], className = $[4], contentRef = $[5], footer = $[6], header = $[7], id = $[8], onActivate = $[9], onClickOutside = $[10], onClose = $[11], onFocus = $[12], portalProp = $[13], rest = $[14], scheme = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21], t7 = $[22], tone = $[23]);
|
|
548
|
-
const autoFocus = t1 === void 0 ? !0 : t1, hideCloseButton = t2 === void 0 ? !1 : t2, _animate = t3 === void 0 ? !1 : t3, cardRadiusProp = t4 === void 0 ? 4 : t4, padding = t5 === void 0 ? 3 : t5, cardShadow = t6 === void 0 ? 4 : t6, width = t7 === void 0 ? 0 : t7, positionProp = _positionProp ?? context.position ?? "fixed", zOffsetProp = _zOffsetProp ?? context.zOffset ?? Z_OFFSETS.dialog, animate = usePrefersReducedMotion() ? !1 : _animate, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, cardRadius =
|
|
1204
|
+
const autoFocus = t1 === void 0 ? !0 : t1, hideCloseButton = t2 === void 0 ? !1 : t2, _animate = t3 === void 0 ? !1 : t3, cardRadiusProp = t4 === void 0 ? 4 : t4, padding = t5 === void 0 ? 3 : t5, cardShadow = t6 === void 0 ? 4 : t6, width = t7 === void 0 ? 0 : t7, positionProp = _positionProp ?? context.position ?? "fixed", zOffsetProp = _zOffsetProp ?? context.zOffset ?? Z_OFFSETS.dialog, animate = usePrefersReducedMotion() ? !1 : _animate, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, cardRadius = useResponsiveProp(cardRadiusProp), position = useResponsiveProp(positionProp), zOffset = useResponsiveProp(zOffsetProp), preDivRef = useRef(null), postDivRef = useRef(null), cardRef = useRef(null), focusedElementRef = useRef(null);
|
|
549
1205
|
let t8;
|
|
550
1206
|
$[24] !== onFocus ? (t8 = (event) => {
|
|
551
1207
|
onFocus?.(event);
|
|
@@ -578,7 +1234,9 @@ function Dialog(props) {
|
|
|
578
1234
|
}, $[26] = boundaryElement, $[27] = portalElement, $[28] = t9) : t9 = $[28];
|
|
579
1235
|
const handleRootClick = t9;
|
|
580
1236
|
let t10;
|
|
581
|
-
$[29] !== className ? (t10 =
|
|
1237
|
+
$[29] !== className ? (t10 = dialog({
|
|
1238
|
+
className
|
|
1239
|
+
}), $[29] = className, $[30] = t10) : t10 = $[30];
|
|
582
1240
|
const t11 = animate ? "" : void 0;
|
|
583
1241
|
let t12;
|
|
584
1242
|
$[31] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsx("div", { ref: preDivRef, tabIndex: 0 }), $[31] = t12) : t12 = $[31];
|
|
@@ -587,7 +1245,7 @@ function Dialog(props) {
|
|
|
587
1245
|
let t14;
|
|
588
1246
|
$[33] !== autoFocus || $[34] !== cardRadius || $[35] !== cardShadow || $[36] !== children || $[37] !== contentRef || $[38] !== footer || $[39] !== header || $[40] !== hideCloseButton || $[41] !== id || $[42] !== onClickOutside || $[43] !== onClose || $[44] !== portalProp || $[45] !== scheme || $[46] !== tone || $[47] !== width ? (t14 = /* @__PURE__ */ jsx(DialogCard, { __unstable_autoFocus: autoFocus, __unstable_hideCloseButton: hideCloseButton, contentRef, footer, header, id, onClickOutside, onClose, portal: portalProp, radius: cardRadius, ref: cardRef, scheme, shadow: cardShadow, tone, width, children }), $[33] = autoFocus, $[34] = cardRadius, $[35] = cardShadow, $[36] = children, $[37] = contentRef, $[38] = footer, $[39] = header, $[40] = hideCloseButton, $[41] = id, $[42] = onClickOutside, $[43] = onClose, $[44] = portalProp, $[45] = scheme, $[46] = tone, $[47] = width, $[48] = t14) : t14 = $[48];
|
|
589
1247
|
let t15;
|
|
590
|
-
$[49] !== t14 || $[50] !== width ? (t15 = /* @__PURE__ */ jsx(Container, {
|
|
1248
|
+
$[49] !== t14 || $[50] !== width ? (t15 = /* @__PURE__ */ jsx(Container, { alignItems: "center", className: t13, "data-ui": "DialogCard", flexDirection: "column", display: "flex", justifyContent: "center", width, children: t14 }), $[49] = t14, $[50] = width, $[51] = t15) : t15 = $[51];
|
|
591
1249
|
let t16;
|
|
592
1250
|
$[52] === Symbol.for("react.memo_cache_sentinel") ? (t16 = /* @__PURE__ */ jsx("div", { ref: postDivRef, tabIndex: 0 }), $[52] = t16) : t16 = $[52];
|
|
593
1251
|
let t17;
|
|
@@ -599,7 +1257,6 @@ function Dialog(props) {
|
|
|
599
1257
|
let t18;
|
|
600
1258
|
return $[66] !== portalProp || $[67] !== t17 ? (t18 = /* @__PURE__ */ jsx(Portal, { __unstable_name: portalProp, children: t17 }), $[66] = portalProp, $[67] = t17, $[68] = t18) : t18 = $[68], t18;
|
|
601
1259
|
}
|
|
602
|
-
Dialog.displayName = "Dialog";
|
|
603
1260
|
function DialogProvider(props) {
|
|
604
1261
|
const $ = c(6), {
|
|
605
1262
|
children,
|
|
@@ -616,7 +1273,6 @@ function DialogProvider(props) {
|
|
|
616
1273
|
let t2;
|
|
617
1274
|
return $[3] !== children || $[4] !== contextValue ? (t2 = /* @__PURE__ */ jsx(DialogContext.Provider, { value: contextValue, children }), $[3] = children, $[4] = contextValue, $[5] = t2) : t2 = $[5], t2;
|
|
618
1275
|
}
|
|
619
|
-
DialogProvider.displayName = "DialogProvider";
|
|
620
1276
|
function MenuButton(props) {
|
|
621
1277
|
const $ = c(63), {
|
|
622
1278
|
__unstable_disableRestoreFocusOnClose: t0,
|
|
@@ -763,7 +1419,6 @@ function MenuButton(props) {
|
|
|
763
1419
|
function _temp$2(v) {
|
|
764
1420
|
return !v;
|
|
765
1421
|
}
|
|
766
|
-
MenuButton.displayName = "MenuButton";
|
|
767
1422
|
const DEFAULT_SKELETON_ELEMENT = "div";
|
|
768
1423
|
function Skeleton(props) {
|
|
769
1424
|
const $ = c(17), t0 = props;
|
|
@@ -788,14 +1443,14 @@ function Skeleton(props) {
|
|
|
788
1443
|
};
|
|
789
1444
|
}, t3 = [delay], $[6] = delay, $[7] = t2, $[8] = t3) : (t2 = $[7], t3 = $[8]), useEffect(t2, t3);
|
|
790
1445
|
let t4;
|
|
791
|
-
$[9] !== className || $[10] !== radius ? (t4 =
|
|
1446
|
+
$[9] !== className || $[10] !== radius ? (t4 = skeleton({
|
|
1447
|
+
className,
|
|
792
1448
|
radius
|
|
793
|
-
})
|
|
1449
|
+
}), $[9] = className, $[10] = radius, $[11] = t4) : t4 = $[11];
|
|
794
1450
|
const t5 = animated ? "" : void 0, t6 = visible ? "" : void 0;
|
|
795
1451
|
let t7;
|
|
796
1452
|
return $[12] !== rest || $[13] !== t4 || $[14] !== t5 || $[15] !== t6 ? (t7 = /* @__PURE__ */ jsx(Box, { "data-ui": "Skeleton", ...rest, className: t4, "data-animated": t5, "data-visible": t6 }), $[12] = rest, $[13] = t4, $[14] = t5, $[15] = t6, $[16] = t7) : t7 = $[16], t7;
|
|
797
1453
|
}
|
|
798
|
-
Skeleton.displayName = "Skeleton";
|
|
799
1454
|
const DEFAULT_CODE_SKELETON_ELEMENT = "div";
|
|
800
1455
|
function CodeSkeleton(props) {
|
|
801
1456
|
const $ = c(10), t0 = props;
|
|
@@ -807,13 +1462,13 @@ function CodeSkeleton(props) {
|
|
|
807
1462
|
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
|
|
808
1463
|
const size = t1 === void 0 ? 2 : t1;
|
|
809
1464
|
let t2;
|
|
810
|
-
$[4] !== className || $[5] !== size ? (t2 =
|
|
1465
|
+
$[4] !== className || $[5] !== size ? (t2 = codeSkeleton({
|
|
1466
|
+
className,
|
|
811
1467
|
size
|
|
812
|
-
})
|
|
1468
|
+
}), $[4] = className, $[5] = size, $[6] = t2) : t2 = $[6];
|
|
813
1469
|
let t3;
|
|
814
1470
|
return $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Skeleton, { ...rest, className: t2 }), $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
|
|
815
1471
|
}
|
|
816
|
-
CodeSkeleton.displayName = "CodeSkeleton";
|
|
817
1472
|
const DEFAULT_HEADING_SKELETON_ELEMENT = "div";
|
|
818
1473
|
function HeadingSkeleton(props) {
|
|
819
1474
|
const $ = c(10), t0 = props;
|
|
@@ -825,13 +1480,13 @@ function HeadingSkeleton(props) {
|
|
|
825
1480
|
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
|
|
826
1481
|
const size = t1 === void 0 ? 2 : t1;
|
|
827
1482
|
let t2;
|
|
828
|
-
$[4] !== className || $[5] !== size ? (t2 =
|
|
1483
|
+
$[4] !== className || $[5] !== size ? (t2 = headingSkeleton({
|
|
1484
|
+
className,
|
|
829
1485
|
size
|
|
830
|
-
})
|
|
1486
|
+
}), $[4] = className, $[5] = size, $[6] = t2) : t2 = $[6];
|
|
831
1487
|
let t3;
|
|
832
1488
|
return $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Skeleton, { ...rest, className: t2 }), $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
|
|
833
1489
|
}
|
|
834
|
-
HeadingSkeleton.displayName = "HeadingSkeleton";
|
|
835
1490
|
const DEFAULT_LABEL_SKELETON_ELEMENT = "div";
|
|
836
1491
|
function LabelSkeleton(props) {
|
|
837
1492
|
const $ = c(10), t0 = props;
|
|
@@ -843,13 +1498,13 @@ function LabelSkeleton(props) {
|
|
|
843
1498
|
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
|
|
844
1499
|
const size = t1 === void 0 ? 2 : t1;
|
|
845
1500
|
let t2;
|
|
846
|
-
$[4] !== className || $[5] !== size ? (t2 =
|
|
1501
|
+
$[4] !== className || $[5] !== size ? (t2 = labelSkeleton({
|
|
1502
|
+
className,
|
|
847
1503
|
size
|
|
848
|
-
})
|
|
1504
|
+
}), $[4] = className, $[5] = size, $[6] = t2) : t2 = $[6];
|
|
849
1505
|
let t3;
|
|
850
1506
|
return $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Skeleton, { ...rest, className: t2 }), $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
|
|
851
1507
|
}
|
|
852
|
-
LabelSkeleton.displayName = "LabelSkeleton";
|
|
853
1508
|
const DEFAULT_TEXT_SKELETON_ELEMENT = "div";
|
|
854
1509
|
function TextSkeleton(props) {
|
|
855
1510
|
const $ = c(10), t0 = props;
|
|
@@ -861,13 +1516,13 @@ function TextSkeleton(props) {
|
|
|
861
1516
|
} = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
|
|
862
1517
|
const size = t1 === void 0 ? 2 : t1;
|
|
863
1518
|
let t2;
|
|
864
|
-
$[4] !== className || $[5] !== size ? (t2 =
|
|
1519
|
+
$[4] !== className || $[5] !== size ? (t2 = textSkeleton({
|
|
1520
|
+
className,
|
|
865
1521
|
size
|
|
866
|
-
})
|
|
1522
|
+
}), $[4] = className, $[5] = size, $[6] = t2) : t2 = $[6];
|
|
867
1523
|
let t3;
|
|
868
1524
|
return $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Skeleton, { ...rest, className: t2 }), $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
|
|
869
1525
|
}
|
|
870
|
-
TextSkeleton.displayName = "TextSkeleton";
|
|
871
1526
|
const DEFAULT_TAB_PANEL_ELEMENT = "div";
|
|
872
1527
|
function TabPanel(props) {
|
|
873
1528
|
const $ = c(10), t0 = props;
|
|
@@ -882,7 +1537,6 @@ function TabPanel(props) {
|
|
|
882
1537
|
let t3;
|
|
883
1538
|
return $[5] !== as || $[6] !== children || $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Box, { "data-ui": "TabPanel", ...rest, as, role: "tabpanel", tabIndex: t2, children }), $[5] = as, $[6] = children, $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
|
|
884
1539
|
}
|
|
885
|
-
TabPanel.displayName = "TabPanel";
|
|
886
1540
|
const DEFAULT_TOAST_ELEMENT = "li", ROLES = {
|
|
887
1541
|
error: "alert",
|
|
888
1542
|
warning: "alert",
|
|
@@ -898,82 +1552,68 @@ const DEFAULT_TOAST_ELEMENT = "li", ROLES = {
|
|
|
898
1552
|
warning: "caution",
|
|
899
1553
|
success: "positive",
|
|
900
1554
|
info: "neutral"
|
|
901
|
-
}
|
|
1555
|
+
};
|
|
902
1556
|
function Toast(props) {
|
|
903
|
-
const $ = c(
|
|
904
|
-
let closable, description,
|
|
905
|
-
$[0] !== t0
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
1557
|
+
const $ = c(40), t0 = props;
|
|
1558
|
+
let closable, description, onClose, rest, status, t1, t2, title;
|
|
1559
|
+
if ($[0] !== t0) {
|
|
1560
|
+
const {
|
|
1561
|
+
as: t32,
|
|
1562
|
+
closable: t42,
|
|
1563
|
+
description: t52,
|
|
1564
|
+
duration,
|
|
1565
|
+
onClose: t62,
|
|
1566
|
+
radius: t72,
|
|
1567
|
+
title: t82,
|
|
1568
|
+
status: t92,
|
|
1569
|
+
updatedAt,
|
|
1570
|
+
...t102
|
|
1571
|
+
} = t0;
|
|
1572
|
+
t1 = t32, closable = t42, description = t52, onClose = t62, t2 = t72, title = t82, status = t92, rest = t102, $[0] = t0, $[1] = closable, $[2] = description, $[3] = onClose, $[4] = rest, $[5] = status, $[6] = t1, $[7] = t2, $[8] = title;
|
|
1573
|
+
} else
|
|
1574
|
+
closable = $[1], description = $[2], onClose = $[3], rest = $[4], status = $[5], t1 = $[6], t2 = $[7], title = $[8];
|
|
917
1575
|
const as = t1 === void 0 ? DEFAULT_TOAST_ELEMENT : t1, radius = t2 === void 0 ? 3 : t2, cardTone = status ? STATUS_CARD_TONE[status] : "default", buttonTone = status ? BUTTON_TONE[status] : "default", role = status ? ROLES[status] : "status", visualDuration = usePrefersReducedMotion() ? 0 : 0.26;
|
|
918
1576
|
let t3;
|
|
919
|
-
$[
|
|
1577
|
+
$[9] !== visualDuration ? (t3 = visualDuration ? {
|
|
920
1578
|
type: "spring",
|
|
921
1579
|
visualDuration,
|
|
922
1580
|
bounce: 0.25
|
|
923
1581
|
} : {
|
|
924
1582
|
duration: 0
|
|
925
|
-
}, $[
|
|
926
|
-
const transition = t3
|
|
1583
|
+
}, $[9] = visualDuration, $[10] = t3) : t3 = $[10];
|
|
1584
|
+
const transition = t3;
|
|
927
1585
|
let t4;
|
|
928
|
-
$[
|
|
1586
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t4 = ["hidden", "initial"], $[11] = t4) : t4 = $[11];
|
|
929
1587
|
const initial = t4;
|
|
930
1588
|
let t5;
|
|
931
|
-
$[
|
|
1589
|
+
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t5 = ["visible", "slideIn"], $[12] = t5) : t5 = $[12];
|
|
932
1590
|
const animate = t5;
|
|
933
1591
|
let t6;
|
|
934
|
-
$[
|
|
1592
|
+
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t6 = ["hidden", "slideOut"], $[13] = t6) : t6 = $[13];
|
|
935
1593
|
const exit = t6;
|
|
936
1594
|
let t7;
|
|
937
|
-
$[
|
|
938
|
-
|
|
1595
|
+
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t7 = toast(), $[14] = t7) : t7 = $[14];
|
|
1596
|
+
let t8;
|
|
1597
|
+
$[15] !== title ? (t8 = title && /* @__PURE__ */ jsx(Text, { size: 1, weight: "medium", children: title }), $[15] = title, $[16] = t8) : t8 = $[16];
|
|
939
1598
|
let t9;
|
|
940
|
-
$[17] !==
|
|
1599
|
+
$[17] !== description || $[18] !== transition ? (t9 = description && /* @__PURE__ */ jsx(MotionText, { muted: !0, size: 1, variants: content, transition, children: description }), $[17] = description, $[18] = transition, $[19] = t9) : t9 = $[19];
|
|
941
1600
|
let t10;
|
|
942
|
-
$[
|
|
1601
|
+
$[20] !== t8 || $[21] !== t9 ? (t10 = /* @__PURE__ */ jsx(Flex, { flex: 1, overflowX: "auto", padding: 3, children: /* @__PURE__ */ jsxs(Stack, { gap: 3, children: [
|
|
1602
|
+
t8,
|
|
1603
|
+
t9
|
|
1604
|
+
] }) }), $[20] = t8, $[21] = t9, $[22] = t10) : t10 = $[22];
|
|
943
1605
|
let t11;
|
|
944
|
-
$[
|
|
945
|
-
t9,
|
|
946
|
-
t10
|
|
947
|
-
] }) }), $[22] = t10, $[23] = t9, $[24] = t11) : t11 = $[24];
|
|
948
|
-
let t12;
|
|
949
|
-
$[25] !== buttonTone || $[26] !== closable || $[27] !== onClose ? (t12 = closable && /* @__PURE__ */ jsx(Box, { padding: 1, children: /* @__PURE__ */ jsx(Button, { as: "button", icon: CloseIcon, mode: "bleed", padding: 2, tone: buttonTone, onClick: onClose, style: {
|
|
1606
|
+
$[23] !== buttonTone || $[24] !== closable || $[25] !== onClose ? (t11 = closable && /* @__PURE__ */ jsx(Box, { padding: 1, children: /* @__PURE__ */ jsx(Button, { as: "button", icon: CloseIcon, mode: "bleed", padding: 2, tone: buttonTone, onClick: onClose, style: {
|
|
950
1607
|
verticalAlign: "top"
|
|
951
|
-
} }) }), $[
|
|
1608
|
+
} }) }), $[23] = buttonTone, $[24] = closable, $[25] = onClose, $[26] = t11) : t11 = $[26];
|
|
1609
|
+
let t12;
|
|
1610
|
+
$[27] !== t10 || $[28] !== t11 || $[29] !== transition ? (t12 = /* @__PURE__ */ jsxs(MotionFlex, { align: "flex-start", variants: content, transition, children: [
|
|
1611
|
+
t10,
|
|
1612
|
+
t11
|
|
1613
|
+
] }), $[27] = t10, $[28] = t11, $[29] = transition, $[30] = t12) : t12 = $[30];
|
|
952
1614
|
let t13;
|
|
953
|
-
$[
|
|
954
|
-
t11,
|
|
955
|
-
t12
|
|
956
|
-
] }), $[29] = t11, $[30] = t12, $[31] = transition, $[32] = t13) : t13 = $[32];
|
|
957
|
-
let t14;
|
|
958
|
-
$[33] !== cardTone || $[34] !== duration || $[35] !== hasDuration || $[36] !== onClose || $[37] !== radius || $[38] !== transition || $[39] !== updatedAt || $[40] !== visualDuration ? (t14 = hasDuration && /* @__PURE__ */ jsxs(MotionBox, { className: toastLoadingBar(), variants: content, transition, children: [
|
|
959
|
-
/* @__PURE__ */ jsx(Card, { className: toastLoadingBarMask(), tone: cardTone, radius }),
|
|
960
|
-
/* @__PURE__ */ jsx(MotionCard, { className: toastLoadingBarProgress(), tone: cardTone, initial: {
|
|
961
|
-
scaleX: 0
|
|
962
|
-
}, animate: {
|
|
963
|
-
scaleX: 1
|
|
964
|
-
}, transition: {
|
|
965
|
-
delay: visualDuration,
|
|
966
|
-
duration: duration / 1e3,
|
|
967
|
-
ease: "linear"
|
|
968
|
-
}, onAnimationComplete: onClose }, `progress-${updatedAt}`)
|
|
969
|
-
] }), $[33] = cardTone, $[34] = duration, $[35] = hasDuration, $[36] = onClose, $[37] = radius, $[38] = transition, $[39] = updatedAt, $[40] = visualDuration, $[41] = t14) : t14 = $[41];
|
|
970
|
-
let t15;
|
|
971
|
-
return $[42] !== as || $[43] !== cardTone || $[44] !== radius || $[45] !== rest || $[46] !== role || $[47] !== t13 || $[48] !== t14 || $[49] !== t8 || $[50] !== transition || $[51] !== visualDuration ? (t15 = /* @__PURE__ */ jsxs(MotionCard, { as, className: t7, "data-ui": "Toast", role, ...rest, "data-has-duration": t8, custom: visualDuration, radius, shadow: 2, tone: cardTone, layout: "position", variants: container, initial, animate, exit, transition, position: "relative", children: [
|
|
972
|
-
t13,
|
|
973
|
-
t14
|
|
974
|
-
] }), $[42] = as, $[43] = cardTone, $[44] = radius, $[45] = rest, $[46] = role, $[47] = t13, $[48] = t14, $[49] = t8, $[50] = transition, $[51] = visualDuration, $[52] = t15) : t15 = $[52], t15;
|
|
1615
|
+
return $[31] !== as || $[32] !== cardTone || $[33] !== radius || $[34] !== rest || $[35] !== role || $[36] !== t12 || $[37] !== transition || $[38] !== visualDuration ? (t13 = /* @__PURE__ */ jsx(MotionCard, { as, className: t7, "data-ui": "Toast", role, ...rest, custom: visualDuration, radius, shadow: 2, tone: cardTone, layout: "position", variants: container, initial, animate, exit, transition, position: "relative", children: t12 }), $[31] = as, $[32] = cardTone, $[33] = radius, $[34] = rest, $[35] = role, $[36] = t12, $[37] = transition, $[38] = visualDuration, $[39] = t13) : t13 = $[39], t13;
|
|
975
1616
|
}
|
|
976
|
-
Toast.displayName = "Toast";
|
|
977
1617
|
const container = {
|
|
978
1618
|
initial: {
|
|
979
1619
|
y: 32,
|
|
@@ -1011,7 +1651,7 @@ const container = {
|
|
|
1011
1651
|
visible: {
|
|
1012
1652
|
opacity: 1
|
|
1013
1653
|
}
|
|
1014
|
-
}, MotionCard = motion.create(Card), MotionFlex = motion.create(Flex), MotionText = motion.create(Text)
|
|
1654
|
+
}, MotionCard = motion.create(Card), MotionFlex = motion.create(Flex), MotionText = motion.create(Text);
|
|
1015
1655
|
function useMounted() {
|
|
1016
1656
|
return useSyncExternalStore(subscribe, _temp$1, _temp2);
|
|
1017
1657
|
}
|
|
@@ -1043,7 +1683,6 @@ function ToastLayer(props) {
|
|
|
1043
1683
|
let t5;
|
|
1044
1684
|
return $[3] !== as || $[4] !== children || $[5] !== gap || $[6] !== padding || $[7] !== paddingX || $[8] !== paddingY || $[9] !== t4 ? (t5 = /* @__PURE__ */ jsx(Grid, { as, className: t3, "data-ui": "ToastProvider", padding, paddingX, paddingY, gap, columns: 1, style: t4, children }), $[3] = as, $[4] = children, $[5] = gap, $[6] = padding, $[7] = paddingX, $[8] = paddingY, $[9] = t4, $[10] = t5) : t5 = $[10], t5;
|
|
1045
1685
|
}
|
|
1046
|
-
ToastLayer.displayName = "ToastLayer";
|
|
1047
1686
|
let toastId = 0;
|
|
1048
1687
|
function generateToastId() {
|
|
1049
1688
|
return String(toastId++);
|
|
@@ -1101,7 +1740,6 @@ function _temp(t0) {
|
|
|
1101
1740
|
} = t0;
|
|
1102
1741
|
return /* @__PURE__ */ jsx(Toast, { closable: params_0.closable, description: params_0.description, onClose: dismiss_0, status: params_0.status, title: params_0.title, duration: params_0.duration, updatedAt }, id_0);
|
|
1103
1742
|
}
|
|
1104
|
-
ToastProvider.displayName = "ToastProvider";
|
|
1105
1743
|
function useToast() {
|
|
1106
1744
|
const value = useContext(ToastContext);
|
|
1107
1745
|
if (!value)
|
|
@@ -1323,7 +1961,6 @@ function Tree(props) {
|
|
|
1323
1961
|
let t22;
|
|
1324
1962
|
return $[36] !== contextValue || $[37] !== t21 ? (t22 = /* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: t21 }), $[36] = contextValue, $[37] = t21, $[38] = t22) : t22 = $[38], t22;
|
|
1325
1963
|
}
|
|
1326
|
-
Tree.displayName = "Tree";
|
|
1327
1964
|
function useTree() {
|
|
1328
1965
|
const tree = useContext(TreeContext);
|
|
1329
1966
|
if (!tree)
|
|
@@ -1341,9 +1978,7 @@ const TreeGroup = memo(function(props) {
|
|
|
1341
1978
|
const expanded = t1 === void 0 ? !1 : t1, tree = useTree(), t2 = !expanded;
|
|
1342
1979
|
let t3;
|
|
1343
1980
|
return $[4] !== children || $[5] !== rest || $[6] !== t2 || $[7] !== tree.space ? (t3 = /* @__PURE__ */ jsx(Stack, { as: "ul", "data-ui": "TreeGroup", ...rest, hidden: t2, marginTop: tree.space, role: "group", gap: tree.space, children }), $[4] = children, $[5] = rest, $[6] = t2, $[7] = tree.space, $[8] = t3) : t3 = $[8], t3;
|
|
1344
|
-
});
|
|
1345
|
-
TreeGroup.displayName = "TreeGroup";
|
|
1346
|
-
const DEFAULT_TREE_ITEM_ELEMENT = "a";
|
|
1981
|
+
}), DEFAULT_TREE_ITEM_ELEMENT = "a";
|
|
1347
1982
|
function TreeItem(props) {
|
|
1348
1983
|
const {
|
|
1349
1984
|
children,
|
|
@@ -1395,30 +2030,22 @@ function TreeItem(props) {
|
|
|
1395
2030
|
] }),
|
|
1396
2031
|
/* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(Text, { muted, size: fontSize, textOverflow: "ellipsis", weight, children: text }) })
|
|
1397
2032
|
] });
|
|
1398
|
-
return href ? /* @__PURE__ */ jsxs(Box, { "data-selected": selected ? "" : void 0, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...rest, as: "li", className:
|
|
2033
|
+
return href ? /* @__PURE__ */ jsxs(Box, { "data-selected": selected ? "" : void 0, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...rest, as: "li", className: treeItem({
|
|
2034
|
+
className
|
|
2035
|
+
}), onClick: handleClick, ref: rootRef, role: "none", children: [
|
|
1399
2036
|
/* @__PURE__ */ jsx(Selectable, { "aria-expanded": expanded, as: linkAs, "data-pressed": selected ? "" : void 0, "data-ui": "TreeItem__box", href, radius, ref: treeitemRef, role: "treeitem", tabIndex, style: {
|
|
1400
2037
|
paddingLeft: `calc(${vars.space[2]} * ${tree.level})`
|
|
1401
2038
|
}, children: content2 }),
|
|
1402
2039
|
/* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsx(TreeGroup, { hidden: !expanded, children }) })
|
|
1403
|
-
] }) : /* @__PURE__ */ jsxs(Box, { "data-selected": selected ? "" : void 0, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...rest, "aria-expanded": expanded, className:
|
|
2040
|
+
] }) : /* @__PURE__ */ jsxs(Box, { "data-selected": selected ? "" : void 0, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...rest, "aria-expanded": expanded, className: treeItem({
|
|
2041
|
+
className
|
|
2042
|
+
}), onClick: handleClick, onKeyDown: handleKeyDown, ref: rootRef, role: "treeitem", tabIndex, children: [
|
|
1404
2043
|
/* @__PURE__ */ jsx(Selectable, { as: "button", "data-pressed": selected ? "" : void 0, "data-ui": "TreeItem__box", radius, style: {
|
|
1405
2044
|
paddingLeft: `calc(${vars.space[2]} * ${tree.level})`
|
|
1406
2045
|
}, children: content2 }),
|
|
1407
2046
|
/* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsx(TreeGroup, { expanded, children }) })
|
|
1408
2047
|
] });
|
|
1409
2048
|
}
|
|
1410
|
-
TreeItem.displayName = "TreeItem";
|
|
1411
|
-
function StyleTags() {
|
|
1412
|
-
const $ = c(2);
|
|
1413
|
-
let t0;
|
|
1414
|
-
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsx("style", { href: "sanity-theme", precedence: "theme", children: _compileTheme() }), $[0] = t0) : t0 = $[0];
|
|
1415
|
-
let t1;
|
|
1416
|
-
return $[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1417
|
-
t0,
|
|
1418
|
-
/* @__PURE__ */ jsx("style", { href: "sanity-system", precedence: "system", children: _compileSystem() })
|
|
1419
|
-
] }), $[1] = t1) : t1 = $[1], t1;
|
|
1420
|
-
}
|
|
1421
|
-
StyleTags.displayName = "StyleTags";
|
|
1422
2049
|
export {
|
|
1423
2050
|
Arrow,
|
|
1424
2051
|
Autocomplete,
|
|
@@ -1516,7 +2143,6 @@ export {
|
|
|
1516
2143
|
Spinner,
|
|
1517
2144
|
SrOnly,
|
|
1518
2145
|
Stack,
|
|
1519
|
-
StyleTags,
|
|
1520
2146
|
Switch,
|
|
1521
2147
|
Tab,
|
|
1522
2148
|
TabList,
|
|
@@ -1538,6 +2164,7 @@ export {
|
|
|
1538
2164
|
_ResizeObserver,
|
|
1539
2165
|
_elementSizeObserver,
|
|
1540
2166
|
_getArrayProp,
|
|
2167
|
+
_getResponsiveProp,
|
|
1541
2168
|
_hasFocus,
|
|
1542
2169
|
_isEnterToClickElement,
|
|
1543
2170
|
_isScrollable,
|
|
@@ -1583,6 +2210,7 @@ export {
|
|
|
1583
2210
|
usePortal,
|
|
1584
2211
|
usePrefersDark,
|
|
1585
2212
|
usePrefersReducedMotion,
|
|
2213
|
+
useResponsiveProp,
|
|
1586
2214
|
useRootTheme,
|
|
1587
2215
|
useTheme,
|
|
1588
2216
|
useTheme_v2,
|