@sanity/ui 3.0.0-static.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks-cjs/_visual-editing.js +3550 -1279
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-cjs/refractor.js +3 -7
- package/dist/_chunks-cjs/refractor.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +3562 -1292
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_chunks-es/refractor.mjs +2 -2
- package/dist/_chunks-es/refractor.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +439 -239
- package/dist/_visual-editing.d.ts +439 -239
- package/dist/index.d.mts +638 -544
- package/dist/index.d.ts +638 -544
- package/dist/index.js +501 -315
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +504 -309
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.mts +76 -425
- package/dist/theme.d.ts +76 -425
- package/dist/theme.js +2237 -1325
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +2284 -1372
- package/dist/theme.mjs.map +1 -1
- package/exports/_visual-editing.ts +27 -27
- package/exports/index.ts +1 -1
- package/package.json +91 -97
- package/src/core/__workshop__/constants.ts +293 -0
- package/src/core/_compat.ts +264 -0
- package/src/core/components/autocomplete/__workshop__/async.tsx +156 -0
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +137 -0
- package/src/core/components/autocomplete/__workshop__/custom.tsx +89 -0
- package/src/core/components/autocomplete/__workshop__/example.tsx +79 -0
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +294 -0
- package/src/core/components/autocomplete/autocomplete.styles.tsx +39 -0
- package/src/core/components/autocomplete/autocomplete.tsx +729 -0
- package/src/core/components/autocomplete/autocompleteOption.tsx +45 -0
- package/src/core/components/autocomplete/types.ts +108 -0
- package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +18 -0
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +99 -0
- package/src/core/components/dialog/__workshop__/nested.tsx +72 -0
- package/src/core/components/dialog/__workshop__/onScroll.tsx +39 -0
- package/src/core/components/dialog/__workshop__/position.tsx +30 -0
- package/src/core/components/dialog/__workshop__/props.tsx +75 -0
- package/src/core/components/dialog/dialog.tsx +434 -0
- package/src/core/components/dialog/dialogProvider.tsx +35 -0
- package/src/core/components/dialog/styles.ts +77 -0
- package/src/core/components/hotkeys/hotkeys.tsx +62 -0
- package/src/core/components/menu/__workshop__/menuButton.tsx +80 -0
- package/src/core/components/menu/__workshop__/tones.tsx +25 -0
- package/src/core/components/menu/menu.test.tsx +128 -0
- package/src/core/components/menu/menu.tsx +177 -0
- package/src/core/components/menu/menuButton.tsx +268 -0
- package/src/core/components/menu/menuContext.ts +29 -0
- package/src/core/components/menu/menuDivider.ts +12 -0
- package/src/core/components/menu/menuGroup.tsx +217 -0
- package/src/core/components/menu/menuItem.tsx +180 -0
- package/src/core/components/menu/useMenuController.ts +231 -0
- package/src/core/components/skeleton/__workshop__/delay.tsx +70 -0
- package/src/core/components/skeleton/__workshop__/skeleton.tsx +64 -0
- package/src/core/components/skeleton/skeleton.tsx +57 -0
- package/src/core/components/skeleton/styles.ts +50 -0
- package/src/core/components/skeleton/textSkeleton.tsx +123 -0
- package/src/core/components/tab/tab.tsx +101 -0
- package/src/core/components/tab/tabList.tsx +70 -0
- package/src/core/components/tab/tabPanel.tsx +39 -0
- package/src/core/components/toast/__workshop__/toast.tsx +26 -0
- package/src/core/components/toast/styles.ts +77 -0
- package/src/core/components/toast/toast.tsx +198 -0
- package/src/core/components/toast/toastLayer.tsx +51 -0
- package/src/core/components/toast/types.ts +26 -0
- package/src/core/components/tree/style.ts +105 -0
- package/src/core/components/tree/tree.tsx +237 -0
- package/src/core/components/tree/treeGroup.tsx +30 -0
- package/src/core/components/tree/treeItem.tsx +205 -0
- package/src/core/components/tree/types.ts +21 -0
- package/src/core/constants.ts +79 -0
- package/src/core/helpers/index.ts +4 -0
- package/src/core/hooks/useArrayProp.ts +31 -0
- package/src/core/hooks/useClickOutside.test.tsx +482 -0
- package/src/core/hooks/useForwardedRef.ts +19 -0
- package/src/core/hooks/useMatchMedia.ts +28 -0
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +36 -0
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +102 -0
- package/src/core/hooks/usePrefersDark.ts +16 -0
- package/src/core/hooks/usePrefersReducedMotion.ts +16 -0
- package/src/core/index.ts +10 -0
- package/src/core/primitives/_selectable/selectable.tsx +15 -0
- package/src/core/primitives/_selectable/style.ts +115 -0
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +14 -0
- package/src/core/primitives/avatar/__workshop__/stack.tsx +25 -0
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +63 -0
- package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +70 -0
- package/src/core/primitives/avatar/avatar.tsx +192 -0
- package/src/core/primitives/avatar/avatarCounter.tsx +94 -0
- package/src/core/primitives/avatar/avatarStack.tsx +101 -0
- package/src/core/primitives/avatar/styles.ts +167 -0
- package/src/core/primitives/badge/__workshop__/props.tsx +30 -0
- package/src/core/primitives/badge/__workshop__/tones.tsx +21 -0
- package/src/core/primitives/badge/badge.tsx +62 -0
- package/src/core/primitives/badge/styles.ts +20 -0
- package/src/core/primitives/box/__workshop__/props.tsx +20 -0
- package/src/core/primitives/box/box.tsx +131 -0
- package/src/core/primitives/button/__workshop__/custom.tsx +51 -0
- package/src/core/primitives/button/__workshop__/props.tsx +55 -0
- package/src/core/primitives/button/__workshop__/stacked.tsx +58 -0
- package/src/core/primitives/button/button.tsx +187 -0
- package/src/core/primitives/button/styles.ts +117 -0
- package/src/core/primitives/card/__workshop__/allTones.tsx +25 -0
- package/src/core/primitives/card/__workshop__/asButton.tsx +107 -0
- package/src/core/primitives/card/__workshop__/props.tsx +53 -0
- package/src/core/primitives/card/__workshop__/selected.tsx +94 -0
- package/src/core/primitives/card/card.tsx +116 -0
- package/src/core/primitives/card/styles.ts +147 -0
- package/src/core/primitives/card/types.ts +11 -0
- package/src/core/primitives/checkbox/checkbox.tsx +73 -0
- package/src/core/primitives/checkbox/styles.ts +128 -0
- package/src/core/primitives/code/__workshop__/props.tsx +21 -0
- package/src/core/primitives/code/code.tsx +40 -0
- package/src/core/primitives/code/refractor.tsx +20 -0
- package/src/core/primitives/code/styles.ts +77 -0
- package/src/core/primitives/container/__workshop__/example.tsx +20 -0
- package/src/core/primitives/container/container.tsx +41 -0
- package/src/core/primitives/container/styles.ts +23 -0
- package/src/core/primitives/flex/__workshop__/example.tsx +34 -0
- package/src/core/primitives/flex/__workshop__/gap.tsx +25 -0
- package/src/core/primitives/flex/flex.tsx +54 -0
- package/src/core/primitives/grid/grid.tsx +48 -0
- package/src/core/primitives/heading/__workshop__/plain.tsx +32 -0
- package/src/core/primitives/heading/heading.tsx +80 -0
- package/src/core/primitives/heading/styles.ts +64 -0
- package/src/core/primitives/heading/types.ts +7 -0
- package/src/core/primitives/inline/__workshop__/plain.tsx +27 -0
- package/src/core/primitives/inline/inline.tsx +47 -0
- package/src/core/primitives/inline/styles.ts +32 -0
- package/src/core/primitives/kbd/kbd.tsx +61 -0
- package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +48 -0
- package/src/core/primitives/label/__workshop__/plain.tsx +24 -0
- package/src/core/primitives/label/label.tsx +79 -0
- package/src/core/primitives/label/styles.ts +45 -0
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +77 -0
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +32 -0
- package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +11 -0
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +71 -0
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +71 -0
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +89 -0
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +97 -0
- package/src/core/primitives/popover/helpers.ts +31 -0
- package/src/core/primitives/popover/popover.tsx +484 -0
- package/src/core/primitives/popover/popoverCard.tsx +168 -0
- package/src/core/primitives/radio/radio.tsx +51 -0
- package/src/core/primitives/radio/styles.ts +117 -0
- package/src/core/primitives/select/__workshop__/plain.tsx +27 -0
- package/src/core/primitives/select/select.tsx +87 -0
- package/src/core/primitives/select/styles.ts +166 -0
- package/src/core/primitives/spinner/__workshop__/Props.tsx +15 -0
- package/src/core/primitives/spinner/spinner.tsx +46 -0
- package/src/core/primitives/stack/__workshop__/plain.tsx +32 -0
- package/src/core/primitives/stack/stack.tsx +43 -0
- package/src/core/primitives/stack/styles.ts +32 -0
- package/src/core/primitives/switch/styles.ts +173 -0
- package/src/core/primitives/switch/switch.tsx +68 -0
- package/src/core/primitives/text/__workshop__/colored.tsx +30 -0
- package/src/core/primitives/text/__workshop__/example.tsx +39 -0
- package/src/core/primitives/text/styles.ts +74 -0
- package/src/core/primitives/text/text.tsx +81 -0
- package/src/core/primitives/textArea/__workshop__/plain.tsx +50 -0
- package/src/core/primitives/textArea/textArea.tsx +119 -0
- package/src/core/primitives/textInput/__workshop__/plain.tsx +98 -0
- package/src/core/primitives/textInput/__workshop__/typed.tsx +23 -0
- package/src/core/primitives/textInput/textInput.tsx +389 -0
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +102 -0
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +74 -0
- package/src/core/primitives/tooltip/__workshop__/props.tsx +107 -0
- package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +86 -0
- package/src/core/primitives/tooltip/tooltip.test.tsx +452 -0
- package/src/core/primitives/tooltip/tooltip.tsx +465 -0
- package/src/core/primitives/tooltip/tooltipCard.tsx +111 -0
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +57 -0
- package/src/core/primitives/types.ts +146 -0
- package/src/core/styles/border/borderStyle.ts +56 -0
- package/src/core/styles/border/index.ts +2 -0
- package/src/core/styles/border/types.ts +10 -0
- package/src/core/styles/box/boxStyle.ts +69 -0
- package/src/core/styles/box/index.ts +2 -0
- package/src/core/styles/box/types.ts +11 -0
- package/src/core/styles/card/_cardColorStyle.ts +108 -0
- package/src/core/styles/card/index.ts +1 -0
- package/src/core/styles/flex/flexItemStyle.ts +27 -0
- package/src/core/styles/flex/flexStyle.ts +70 -0
- package/src/core/styles/flex/index.ts +3 -0
- package/src/core/styles/flex/types.ts +25 -0
- package/src/core/styles/focusRing/index.ts +25 -0
- package/src/core/styles/font/codeFontStyle.ts +13 -0
- package/src/core/styles/font/headingFontStyle.ts +13 -0
- package/src/core/styles/font/index.ts +6 -0
- package/src/core/styles/font/labelFontStyle.ts +13 -0
- package/src/core/styles/font/responsiveFont.ts +101 -0
- package/src/core/styles/font/textAlignStyle.ts +19 -0
- package/src/core/styles/font/textFontStyle.ts +13 -0
- package/src/core/styles/font/types.ts +35 -0
- package/src/core/styles/grid/gridItemStyle.ts +82 -0
- package/src/core/styles/grid/gridStyle.ts +108 -0
- package/src/core/styles/grid/index.ts +3 -0
- package/src/core/styles/grid/types.ts +37 -0
- package/src/core/styles/helpers.ts +72 -0
- package/src/core/styles/index.ts +5 -0
- package/src/core/styles/input/index.ts +2 -0
- package/src/core/styles/input/responsiveInputPaddingStyle.ts +78 -0
- package/src/core/styles/input/textInputStyle.ts +263 -0
- package/src/core/styles/internal.ts +12 -0
- package/src/core/styles/margin/index.ts +2 -0
- package/src/core/styles/margin/marginStyle.ts +21 -0
- package/src/core/styles/margin/marginsStyle.test.ts +33 -0
- package/src/core/styles/margin/types.ts +9 -0
- package/src/core/styles/padding/index.ts +2 -0
- package/src/core/styles/padding/paddingStyle.test.ts +33 -0
- package/src/core/styles/padding/paddingStyle.ts +21 -0
- package/src/core/styles/padding/types.ts +12 -0
- package/src/core/styles/radius/index.ts +2 -0
- package/src/core/styles/radius/radiusStyle.ts +23 -0
- package/src/core/styles/radius/types.ts +8 -0
- package/src/core/styles/shadow/index.ts +2 -0
- package/src/core/styles/shadow/shadowStyle.ts +29 -0
- package/src/core/styles/shadow/types.ts +6 -0
- package/src/core/styles/types.ts +8 -0
- package/src/core/theme/__workshop__/build/Root.tsx +367 -0
- package/src/core/theme/__workshop__/build/helpers.ts +46 -0
- package/src/core/theme/__workshop__/build/story.tsx +465 -0
- package/src/core/theme/__workshop__/canvas.tsx +351 -0
- package/src/core/theme/__workshop__/color.tsx +62 -0
- package/src/core/theme/__workshop__/debug/story.tsx +408 -0
- package/src/core/theme/__workshop__/index.ts +39 -0
- package/src/core/theme/__workshop__/layer.tsx +78 -0
- package/src/core/theme/__workshop__/nestedProvider.tsx +15 -0
- package/src/core/theme/theme.test.tsx +73 -0
- package/src/core/theme/themeColorProvider.tsx +29 -0
- package/src/core/theme/themeContext.ts +10 -0
- package/src/core/theme/themeProvider.tsx +62 -0
- package/src/core/types/avatar.ts +14 -0
- package/src/core/types/box.ts +19 -0
- package/src/core/types/button.ts +21 -0
- package/src/core/types/flex.ts +30 -0
- package/src/core/types/grid.ts +14 -0
- package/src/core/types/gridItem.ts +29 -0
- package/src/core/types/index.ts +14 -0
- package/src/core/types/radius.ts +4 -0
- package/src/core/types/selectable.ts +6 -0
- package/src/core/types/text.ts +4 -0
- package/src/core/utils/arrow/arrow.tsx +123 -0
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +24 -0
- package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +21 -0
- package/src/core/utils/elementQuery/elementQuery.tsx +53 -0
- package/src/core/utils/errorBoundary.tsx +48 -0
- package/src/core/utils/layer/layer.tsx +98 -0
- package/src/core/utils/layer/layerProvider.tsx +110 -0
- package/src/core/utils/portal/portal.ts +32 -0
- package/src/core/utils/portal/portalProvider.tsx +79 -0
- package/src/core/utils/srOnly/srOnly.tsx +36 -0
- package/src/core/utils/virtualList/virtualList.tsx +174 -0
- package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +1 -1
- package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +1 -1
- package/src/theme/build/_deprecated/color/button/createButtonModes.ts +6 -1
- package/src/theme/build/_deprecated/color/button/createButtonTones.ts +2 -2
- package/src/theme/build/_deprecated/color/card/createCardStates.ts +1 -1
- package/src/theme/build/_deprecated/color/factory.ts +3 -2
- package/src/theme/build/_deprecated/color/input/createInputModes.ts +1 -1
- package/src/theme/build/_deprecated/color/muted/createMuted.ts +1 -1
- package/src/theme/build/_deprecated/color/spot/createSpot.ts +1 -1
- package/src/theme/build/buildColorTheme.ts +1 -1
- package/src/theme/build/buildTheme.ts +32 -8
- package/src/theme/build/lib/color-fns/rgba.ts +0 -4
- package/src/theme/build/renderColorTheme.ts +4 -4
- package/src/theme/build/renderColorValue.ts +1 -1
- package/src/theme/build/resolveColorTokens.ts +1 -1
- package/src/theme/config/system.ts +1 -1
- package/src/theme/config/tokens/color/types.ts +1 -1
- package/src/theme/config/tokens/parseTokenKey.ts +1 -1
- package/src/theme/config/tokens/parseTokenValue.ts +1 -1
- package/src/theme/config/tokens/types.ts +1 -1
- package/src/theme/config/types.ts +3 -2
- package/src/theme/defaults/config.ts +2 -2
- package/src/theme/defaults/fonts.ts +16 -17
- package/src/theme/getScopedTheme.ts +9 -6
- package/src/theme/index.ts +1 -7
- package/src/theme/system/avatar.ts +14 -0
- package/src/theme/system/font.ts +52 -0
- package/src/theme/system/index.ts +11 -0
- package/src/theme/system/input.ts +33 -0
- package/src/theme/system/theme.ts +138 -0
- package/src/theme/system/v0/color/_generic.ts +35 -0
- package/src/theme/system/v0/color/color.ts +40 -0
- package/src/theme/system/v0/color/input.ts +34 -0
- package/src/theme/system/v0/color/spot.ts +13 -0
- package/src/theme/system/v0/index.ts +3 -0
- package/src/theme/versioning/getTheme_v2.ts +1 -2
- package/src/theme/versioning/index.ts +4 -0
- package/src/theme/versioning/is_v0.ts +1 -2
- package/src/theme/versioning/is_v2.ts +1 -2
- package/src/theme/versioning/themeColor_v0_v2.ts +4 -6
- package/src/theme/versioning/themeColor_v2_v2_9.ts +1 -1
- package/src/theme/versioning/v0_v2.ts +1 -2
- package/src/theme/versioning/v2_v0.ts +6 -6
- package/bin/ui.js +0 -5
- package/dist/_chunks-cjs/buildCommand.js +0 -32
- package/dist/_chunks-cjs/buildCommand.js.map +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -357
- package/dist/cli.js.map +0 -1
- package/dist/css.d.mts +0 -1471
- package/dist/css.d.ts +0 -1471
- package/dist/css.js +0 -4830
- package/dist/css.js.map +0 -1
- package/dist/css.mjs +0 -4831
- package/dist/css.mjs.map +0 -1
- package/dist/sanity-palette.css +0 -1
- package/dist/sanity-theme.css +0 -1
- package/dist/system.css +0 -23238
- package/exports/css.ts +0 -1
- package/src/cli/buildCommand.ts +0 -48
- package/src/cli/index.ts +0 -38
- package/src/css/_comp.test.ts +0 -7
- package/src/css/_comp.ts +0 -11
- package/src/css/_mergeStyles.ts +0 -31
- package/src/css/_resp.ts +0 -38
- package/src/css/_responsiveRule.ts +0 -38
- package/src/css/aspects/border/border.style.ts +0 -13
- package/src/css/aspects/border/border.ts +0 -14
- package/src/css/aspects/border/index.ts +0 -2
- package/src/css/aspects/border/types.ts +0 -10
- package/src/css/aspects/display/display.style.ts +0 -34
- package/src/css/aspects/display/display.ts +0 -7
- package/src/css/aspects/display/index.ts +0 -2
- package/src/css/aspects/display/types.ts +0 -17
- package/src/css/aspects/flex/flex.style.ts +0 -30
- 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/index.ts +0 -2
- package/src/css/aspects/flex/types.ts +0 -35
- 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 -27
- package/src/css/aspects/font/font.style.ts +0 -151
- package/src/css/aspects/font/font.ts +0 -12
- package/src/css/aspects/font/index.ts +0 -2
- package/src/css/aspects/font/types.ts +0 -12
- package/src/css/aspects/gap/gap.style.ts +0 -21
- package/src/css/aspects/gap/gap.ts +0 -8
- package/src/css/aspects/gap/index.ts +0 -2
- package/src/css/aspects/gap/types.ts +0 -10
- package/src/css/aspects/grid/grid.ts +0 -13
- 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 -29
- 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 -41
- package/src/css/aspects/height/height.style.ts +0 -9
- package/src/css/aspects/height/height.ts +0 -17
- package/src/css/aspects/height/index.ts +0 -1
- package/src/css/aspects/height/rules.ts +0 -7
- package/src/css/aspects/index.ts +0 -21
- package/src/css/aspects/inset/index.ts +0 -2
- package/src/css/aspects/inset/inset.style.ts +0 -12
- package/src/css/aspects/inset/inset.ts +0 -13
- package/src/css/aspects/inset/types.ts +0 -13
- package/src/css/aspects/margin/index.ts +0 -2
- package/src/css/aspects/margin/margin.style.ts +0 -46
- package/src/css/aspects/margin/margin.ts +0 -15
- package/src/css/aspects/margin/types.ts +0 -11
- package/src/css/aspects/maxWidth/index.ts +0 -2
- package/src/css/aspects/maxWidth/maxWidth.style.ts +0 -16
- package/src/css/aspects/maxWidth/maxWidth.ts +0 -6
- package/src/css/aspects/maxWidth/types.ts +0 -7
- package/src/css/aspects/minWidth/index.ts +0 -2
- package/src/css/aspects/minWidth/minWidth.style.ts +0 -13
- package/src/css/aspects/minWidth/minWidth.ts +0 -6
- package/src/css/aspects/minWidth/types.ts +0 -7
- package/src/css/aspects/outline/outline.style.ts +0 -9
- package/src/css/aspects/overflow/index.ts +0 -2
- package/src/css/aspects/overflow/overflow.style.ts +0 -11
- package/src/css/aspects/overflow/overflow.ts +0 -11
- package/src/css/aspects/overflow/types.ts +0 -11
- package/src/css/aspects/padding/index.ts +0 -2
- package/src/css/aspects/padding/padding.style.ts +0 -46
- package/src/css/aspects/padding/padding.ts +0 -15
- package/src/css/aspects/padding/types.ts +0 -14
- package/src/css/aspects/pointerEvents/index.ts +0 -2
- package/src/css/aspects/pointerEvents/pointerEvents.style.ts +0 -13
- package/src/css/aspects/pointerEvents/pointerEvents.ts +0 -6
- package/src/css/aspects/pointerEvents/types.ts +0 -7
- package/src/css/aspects/position/index.ts +0 -2
- package/src/css/aspects/position/position.style.ts +0 -12
- package/src/css/aspects/position/position.ts +0 -7
- package/src/css/aspects/position/types.ts +0 -9
- package/src/css/aspects/radius/index.ts +0 -2
- package/src/css/aspects/radius/radius.style.ts +0 -16
- package/src/css/aspects/radius/radius.ts +0 -8
- package/src/css/aspects/radius/types.ts +0 -8
- package/src/css/aspects/shadow/index.ts +0 -2
- package/src/css/aspects/shadow/shadow.style.ts +0 -49
- package/src/css/aspects/shadow/shadow.ts +0 -7
- package/src/css/aspects/shadow/types.ts +0 -8
- package/src/css/aspects/textOverflow/index.ts +0 -2
- package/src/css/aspects/textOverflow/textOverflow.style.ts +0 -21
- package/src/css/aspects/textOverflow/textOverflow.ts +0 -6
- package/src/css/aspects/textOverflow/types.ts +0 -8
- package/src/css/aspects/width/index.ts +0 -2
- package/src/css/aspects/width/rules.ts +0 -8
- package/src/css/aspects/width/types.ts +0 -9
- package/src/css/aspects/width/width.style.ts +0 -11
- package/src/css/aspects/width/width.ts +0 -6
- package/src/css/compile/compilePalette.ts +0 -27
- package/src/css/compile/compileRule.ts +0 -97
- package/src/css/compile/compileRules.test.ts +0 -36
- package/src/css/compile/compileRules.ts +0 -43
- package/src/css/compile/compileStyle.ts +0 -148
- package/src/css/compile/compileSystem.ts +0 -10
- package/src/css/compile/compileTheme.ts +0 -15
- package/src/css/compile/compileTheme_v3.ts +0 -401
- package/src/css/compile/types.ts +0 -6
- package/src/css/components/breadcrumbs/breadcrumbs.style.ts +0 -9
- package/src/css/components/breadcrumbs/breadcrumbs.ts +0 -5
- package/src/css/components/breadcrumbs/rules.ts +0 -25
- package/src/css/components/dialog/dialog.style.ts +0 -79
- package/src/css/components/dialog/dialog.ts +0 -30
- package/src/css/components/dialog/index.ts +0 -1
- package/src/css/components/dialog/rules.ts +0 -78
- package/src/css/components/menu/index.ts +0 -1
- package/src/css/components/menu/menu.style.ts +0 -17
- package/src/css/components/menu/menu.ts +0 -9
- package/src/css/components/menu/rules.ts +0 -15
- package/src/css/components/skeleton/index.ts +0 -2
- package/src/css/components/skeleton/rules.ts +0 -113
- package/src/css/components/skeleton/skeleton.style.ts +0 -96
- package/src/css/components/skeleton/skeleton.ts +0 -31
- package/src/css/components/skeleton/types.ts +0 -26
- package/src/css/components/toast/index.ts +0 -1
- package/src/css/components/toast/rules.ts +0 -18
- package/src/css/components/toast/toast.style.ts +0 -20
- package/src/css/components/toast/toast.ts +0 -21
- package/src/css/components/tree/index.ts +0 -1
- package/src/css/components/tree/rules.ts +0 -168
- package/src/css/components/tree/tree.style.ts +0 -55
- package/src/css/components/tree/tree.ts +0 -5
- package/src/css/composeClassNames.ts +0 -17
- package/src/css/constants.ts +0 -1
- package/src/css/index.ts +0 -41
- package/src/css/primitives/_arrow/_arrow.style.ts +0 -73
- package/src/css/primitives/_arrow/_arrow.ts +0 -14
- package/src/css/primitives/_arrow/index.ts +0 -1
- package/src/css/primitives/_input/__workshop__/customInput.tsx +0 -16
- package/src/css/primitives/_input/__workshop__/index.ts +0 -14
- package/src/css/primitives/_input/_input.style.ts +0 -162
- package/src/css/primitives/_input/index.ts +0 -2
- package/src/css/primitives/_input/input.ts +0 -25
- package/src/css/primitives/_input/types.ts +0 -12
- package/src/css/primitives/_selectable/__style.ts +0 -117
- package/src/css/primitives/_selectable/_contants.ts +0 -11
- package/src/css/primitives/_selectable/_selectable.style.ts +0 -132
- package/src/css/primitives/_selectable/index.ts +0 -2
- package/src/css/primitives/_selectable/selectable.ts +0 -9
- package/src/css/primitives/_selectable/types.ts +0 -8
- package/src/css/primitives/avatar/avatar.style.ts +0 -175
- package/src/css/primitives/avatar/avatar.ts +0 -27
- package/src/css/primitives/avatar/index.ts +0 -2
- package/src/css/primitives/avatar/rules.ts +0 -176
- package/src/css/primitives/avatar/types.ts +0 -8
- package/src/css/primitives/badge/badge.style.ts +0 -22
- package/src/css/primitives/badge/badge.ts +0 -8
- package/src/css/primitives/badge/index.ts +0 -2
- package/src/css/primitives/badge/types.ts +0 -8
- package/src/css/primitives/box/box.style.ts +0 -31
- package/src/css/primitives/box/box.ts +0 -52
- package/src/css/primitives/box/index.ts +0 -2
- package/src/css/primitives/box/types.ts +0 -51
- package/src/css/primitives/button/_constants.ts +0 -17
- package/src/css/primitives/button/button.style.ts +0 -201
- package/src/css/primitives/button/button.ts +0 -41
- package/src/css/primitives/button/rules.ts +0 -302
- package/src/css/primitives/card/_constants.ts +0 -13
- package/src/css/primitives/card/card.style.ts +0 -270
- package/src/css/primitives/card/card.ts +0 -14
- package/src/css/primitives/card/types.ts +0 -10
- package/src/css/primitives/checkbox/__styles.ts +0 -129
- package/src/css/primitives/checkbox/checkbox.style.ts +0 -154
- package/src/css/primitives/checkbox/checkbox.ts +0 -9
- package/src/css/primitives/checkbox/rules.ts +0 -152
- package/src/css/primitives/code/code.style.ts +0 -62
- package/src/css/primitives/code/code.ts +0 -9
- package/src/css/primitives/code/index.ts +0 -2
- package/src/css/primitives/code/rules.ts +0 -96
- package/src/css/primitives/code/types.ts +0 -10
- package/src/css/primitives/container/container.style.ts +0 -10
- package/src/css/primitives/container/container.ts +0 -7
- package/src/css/primitives/container/rules.ts +0 -8
- package/src/css/primitives/container/types.ts +0 -7
- package/src/css/primitives/heading/heading.style.ts +0 -47
- package/src/css/primitives/heading/heading.ts +0 -17
- package/src/css/primitives/heading/index.ts +0 -2
- package/src/css/primitives/heading/rules.ts +0 -155
- package/src/css/primitives/heading/types.ts +0 -12
- package/src/css/primitives/kbd/index.ts +0 -2
- package/src/css/primitives/kbd/kbd.style.ts +0 -22
- package/src/css/primitives/kbd/kbd.ts +0 -7
- package/src/css/primitives/kbd/rules.ts +0 -20
- package/src/css/primitives/kbd/types.ts +0 -7
- package/src/css/primitives/label/index.ts +0 -2
- package/src/css/primitives/label/label.style.ts +0 -48
- package/src/css/primitives/label/label.ts +0 -16
- package/src/css/primitives/label/rules.ts +0 -137
- package/src/css/primitives/label/types.ts +0 -12
- package/src/css/primitives/popover/index.ts +0 -1
- package/src/css/primitives/popover/popover.style.ts +0 -5
- package/src/css/primitives/popover/popover.ts +0 -9
- package/src/css/primitives/popover/rules.ts +0 -5
- package/src/css/primitives/radio/radio.style.ts +0 -123
- package/src/css/primitives/radio/radio.ts +0 -5
- package/src/css/primitives/radio/rules.ts +0 -121
- package/src/css/primitives/select/index.ts +0 -2
- package/src/css/primitives/select/rules.ts +0 -22
- package/src/css/primitives/select/select.style.ts +0 -24
- package/src/css/primitives/select/select.ts +0 -12
- package/src/css/primitives/select/types.ts +0 -5
- package/src/css/primitives/spinner/rules.ts +0 -21
- package/src/css/primitives/spinner/spinner.style.ts +0 -22
- package/src/css/primitives/spinner/spinner.ts +0 -9
- package/src/css/primitives/stack/stack.style.ts +0 -9
- package/src/css/primitives/stack/stack.ts +0 -6
- package/src/css/primitives/switch/rules.ts +0 -340
- package/src/css/primitives/switch/switch.style.ts +0 -94
- package/src/css/primitives/switch/switch.ts +0 -21
- package/src/css/primitives/text/index.ts +0 -2
- package/src/css/primitives/text/rules.ts +0 -164
- package/src/css/primitives/text/text.style.ts +0 -64
- package/src/css/primitives/text/text.ts +0 -17
- package/src/css/primitives/text/types.ts +0 -11
- package/src/css/primitives/textArea/index.ts +0 -2
- package/src/css/primitives/textArea/rules.ts +0 -7
- package/src/css/primitives/textArea/textArea.style.ts +0 -9
- package/src/css/primitives/textArea/textArea.ts +0 -8
- package/src/css/primitives/textArea/types.ts +0 -5
- package/src/css/primitives/textInput/index.ts +0 -2
- package/src/css/primitives/textInput/rules.ts +0 -224
- package/src/css/primitives/textInput/textInput.style.ts +0 -167
- package/src/css/primitives/textInput/textInput.ts +0 -8
- package/src/css/primitives/textInput/types.ts +0 -11
- package/src/css/primitives/token/rules.ts +0 -45
- package/src/css/primitives/token/token.style.ts +0 -49
- package/src/css/primitives/tooltip/index.ts +0 -1
- package/src/css/primitives/tooltip/rules.ts +0 -19
- package/src/css/primitives/tooltip/tooltip.style.ts +0 -21
- package/src/css/primitives/tooltip/tooltip.ts +0 -9
- package/src/css/responsiveRules.ts +0 -25
- package/src/css/scopeClassName.ts +0 -6
- package/src/css/system.style.ts +0 -158
- package/src/css/types.ts +0 -850
- package/src/css/util.ts +0 -27
- package/src/css/utils/srOnly/srOnly.style.ts +0 -14
- package/src/css/utils/srOnly/srOnly.ts +0 -5
- package/src/css/varNames.ts +0 -496
- package/src/css/vars.ts +0 -465
- package/src/theme/_constants.ts +0 -26
- package/src/theme/_types.ts +0 -41
- package/src/theme/palette/constants.ts +0 -13
- package/src/theme/palette/index.ts +0 -2
- package/src/theme/palette/types.ts +0 -4
- package/src/theme/types.ts +0 -32
- package/src/theme/v0/color/_generic.ts +0 -35
- package/src/theme/v0/color/color.ts +0 -40
- package/src/theme/v0/color/input.ts +0 -34
- package/src/theme/v0/color/spot.ts +0 -13
- package/src/theme/v0/font.ts +0 -53
- package/src/theme/v0/index.ts +0 -10
- package/src/theme/v0/theme.ts +0 -72
- package/src/theme/v2/avatar.ts +0 -14
- package/src/theme/v2/index.ts +0 -4
- package/src/theme/v2/input.ts +0 -33
- package/src/theme/v2/theme.ts +0 -49
- package/src/theme/v3/buildTheme_v3.test.ts +0 -40
- package/src/theme/v3/buildTheme_v3.ts +0 -29
- package/src/theme/v3/color/buildColor_v3.ts +0 -198
- package/src/theme/v3/color/card.ts +0 -121
- package/src/theme/v3/color/color.ts +0 -98
- package/src/theme/v3/color/element.ts +0 -19
- package/src/theme/v3/color/index.ts +0 -7
- package/src/theme/v3/color/parseColor.test.ts +0 -79
- package/src/theme/v3/color/parseColor.ts +0 -167
- package/src/theme/v3/color/renderColor.test.ts +0 -19
- package/src/theme/v3/color/renderColor.ts +0 -33
- package/src/theme/v3/color/token.ts +0 -17
- package/src/theme/v3/color/tokens.ts +0 -5
- package/src/theme/v3/defaults.ts +0 -202
- package/src/theme/v3/index.ts +0 -6
- package/src/theme/v3/merge.ts +0 -22
- package/src/theme/v3/resolveTokens.ts +0 -204
- package/src/theme/v3/tokens.ts +0 -16
- package/src/theme/v3/types.ts +0 -45
- package/src/theme/versioning/themeColor_v3_v2.ts +0 -206
- package/src/theme/versioning/v3_v2.ts +0 -108
- package/src/ui/StyleTags.tsx +0 -24
- package/src/ui/_compat/index.ts +0 -9
- package/src/ui/_compat/styles/_responsive.ts +0 -19
- package/src/ui/_compat/styles/index.ts +0 -1
- package/src/ui/_compat/theme/theme.test.tsx +0 -73
- package/src/ui/_compat/theme/themeColorProvider.tsx +0 -30
- package/src/ui/_compat/theme/themeContext.ts +0 -10
- package/src/ui/_compat/theme/themeProvider.tsx +0 -74
- package/src/ui/_compat/types.ts +0 -274
- package/src/ui/components/autocomplete/__workshop__/async.tsx +0 -156
- package/src/ui/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -131
- package/src/ui/components/autocomplete/__workshop__/custom.tsx +0 -90
- package/src/ui/components/autocomplete/__workshop__/example.tsx +0 -80
- package/src/ui/components/autocomplete/__workshop__/fullscreen.tsx +0 -293
- package/src/ui/components/autocomplete/autocomplete.tsx +0 -722
- package/src/ui/components/autocomplete/autocompleteOption.tsx +0 -45
- package/src/ui/components/autocomplete/types.ts +0 -108
- package/src/ui/components/breadcrumbs/breadcrumbs.tsx +0 -127
- package/src/ui/components/breadcrumbs/index.ts +0 -1
- package/src/ui/components/dialog/__workshop__/nested.tsx +0 -72
- package/src/ui/components/dialog/__workshop__/onScroll.tsx +0 -39
- package/src/ui/components/dialog/__workshop__/position.tsx +0 -30
- package/src/ui/components/dialog/__workshop__/props.tsx +0 -77
- package/src/ui/components/dialog/dialog.tsx +0 -432
- package/src/ui/components/dialog/dialogProvider.tsx +0 -35
- package/src/ui/components/hotkeys/hotkeys.tsx +0 -54
- package/src/ui/components/menu/__workshop__/menuButton.tsx +0 -80
- package/src/ui/components/menu/__workshop__/tones.tsx +0 -25
- package/src/ui/components/menu/menu.test.tsx +0 -128
- package/src/ui/components/menu/menu.tsx +0 -200
- package/src/ui/components/menu/menuButton.tsx +0 -275
- package/src/ui/components/menu/menuContext.ts +0 -31
- package/src/ui/components/menu/menuDivider.tsx +0 -22
- package/src/ui/components/menu/menuGroup.tsx +0 -228
- package/src/ui/components/menu/menuItem.tsx +0 -180
- package/src/ui/components/menu/useMenuController.ts +0 -241
- package/src/ui/components/skeleton/__workshop__/delay.tsx +0 -70
- package/src/ui/components/skeleton/__workshop__/skeleton.tsx +0 -64
- package/src/ui/components/skeleton/skeleton.tsx +0 -53
- package/src/ui/components/skeleton/textSkeleton.tsx +0 -132
- package/src/ui/components/tab/tab.tsx +0 -105
- package/src/ui/components/tab/tabList.tsx +0 -74
- package/src/ui/components/tab/tabPanel.tsx +0 -40
- package/src/ui/components/toast/__workshop__/toast.tsx +0 -26
- package/src/ui/components/toast/toast.tsx +0 -211
- package/src/ui/components/toast/toastLayer.tsx +0 -38
- package/src/ui/components/toast/types.ts +0 -28
- package/src/ui/components/tree/tree.tsx +0 -244
- package/src/ui/components/tree/treeGroup.tsx +0 -30
- package/src/ui/components/tree/treeItem.tsx +0 -220
- package/src/ui/components/tree/types.ts +0 -25
- package/src/ui/constants.ts +0 -85
- package/src/ui/helpers/index.ts +0 -5
- package/src/ui/helpers/props.ts +0 -10
- package/src/ui/hooks/useArrayProp.ts +0 -29
- package/src/ui/hooks/useClickOutside.test.tsx +0 -482
- package/src/ui/hooks/useForwardedRef.ts +0 -19
- package/src/ui/hooks/useMatchMedia.ts +0 -28
- package/src/ui/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -36
- package/src/ui/hooks/useMediaIndex/useMediaIndex.ts +0 -102
- package/src/ui/hooks/usePrefersDark.ts +0 -16
- package/src/ui/hooks/usePrefersReducedMotion.ts +0 -16
- package/src/ui/index.ts +0 -9
- package/src/ui/primitives/_selectable/selectable.tsx +0 -31
- package/src/ui/primitives/avatar/__workshop__/asButton.tsx +0 -14
- package/src/ui/primitives/avatar/__workshop__/stack.tsx +0 -25
- package/src/ui/primitives/avatar/__workshop__/withinButton.tsx +0 -63
- package/src/ui/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -72
- package/src/ui/primitives/avatar/avatar.tsx +0 -158
- package/src/ui/primitives/avatar/avatarCounter.tsx +0 -62
- package/src/ui/primitives/avatar/avatarStack.tsx +0 -82
- package/src/ui/primitives/badge/__workshop__/props.tsx +0 -30
- package/src/ui/primitives/badge/__workshop__/tones.tsx +0 -21
- package/src/ui/primitives/badge/badge.tsx +0 -64
- package/src/ui/primitives/box/__workshop__/props.tsx +0 -20
- package/src/ui/primitives/box/box.tsx +0 -162
- package/src/ui/primitives/button/__workshop__/custom.tsx +0 -50
- package/src/ui/primitives/button/__workshop__/props.tsx +0 -58
- package/src/ui/primitives/button/__workshop__/stacked.tsx +0 -59
- package/src/ui/primitives/button/button.tsx +0 -207
- package/src/ui/primitives/button/index.ts +0 -1
- package/src/ui/primitives/card/__workshop__/allTones.tsx +0 -27
- package/src/ui/primitives/card/__workshop__/asButton.tsx +0 -107
- package/src/ui/primitives/card/__workshop__/props.tsx +0 -55
- package/src/ui/primitives/card/__workshop__/selected.tsx +0 -93
- package/src/ui/primitives/card/card.tsx +0 -118
- package/src/ui/primitives/card/cardContext.ts +0 -10
- package/src/ui/primitives/card/cardProvider.tsx +0 -19
- package/src/ui/primitives/card/index.ts +0 -4
- package/src/ui/primitives/card/types.ts +0 -27
- package/src/ui/primitives/card/useCard.ts +0 -7
- package/src/ui/primitives/checkbox/checkbox.tsx +0 -74
- package/src/ui/primitives/checkbox/index.ts +0 -1
- package/src/ui/primitives/code/__workshop__/props.tsx +0 -21
- package/src/ui/primitives/code/code.tsx +0 -49
- package/src/ui/primitives/code/refractor.tsx +0 -20
- package/src/ui/primitives/container/__workshop__/example.tsx +0 -20
- package/src/ui/primitives/container/container.tsx +0 -35
- package/src/ui/primitives/container/index.ts +0 -2
- package/src/ui/primitives/flex/__workshop__/example.tsx +0 -34
- package/src/ui/primitives/flex/__workshop__/gap.tsx +0 -25
- package/src/ui/primitives/flex/flex.tsx +0 -29
- package/src/ui/primitives/grid/grid.tsx +0 -30
- package/src/ui/primitives/heading/__workshop__/plain.tsx +0 -32
- package/src/ui/primitives/heading/heading.tsx +0 -62
- package/src/ui/primitives/inline/__workshop__/plain.tsx +0 -27
- package/src/ui/primitives/inline/inline.tsx +0 -50
- package/src/ui/primitives/kbd/kbd.tsx +0 -55
- package/src/ui/primitives/label/__workshop__/opticalAlignment.tsx +0 -54
- package/src/ui/primitives/label/__workshop__/plain.tsx +0 -37
- package/src/ui/primitives/label/label.tsx +0 -67
- package/src/ui/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
- package/src/ui/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
- package/src/ui/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
- package/src/ui/primitives/popover/__workshop__/PlainStory.tsx +0 -71
- package/src/ui/primitives/popover/__workshop__/RecursiveStory.tsx +0 -70
- package/src/ui/primitives/popover/__workshop__/SidePanelStory.tsx +0 -93
- package/src/ui/primitives/popover/__workshop__/TestStory.tsx +0 -98
- package/src/ui/primitives/popover/helpers.ts +0 -32
- package/src/ui/primitives/popover/popover.tsx +0 -422
- package/src/ui/primitives/popover/popoverCard.tsx +0 -161
- package/src/ui/primitives/radio/index.ts +0 -1
- package/src/ui/primitives/radio/radio.tsx +0 -49
- package/src/ui/primitives/select/__workshop__/plain.tsx +0 -30
- package/src/ui/primitives/select/select.tsx +0 -85
- package/src/ui/primitives/spinner/__workshop__/Props.tsx +0 -16
- package/src/ui/primitives/spinner/animatedSpinnerIcon.tsx +0 -16
- package/src/ui/primitives/spinner/index.ts +0 -1
- package/src/ui/primitives/spinner/spinner.tsx +0 -33
- package/src/ui/primitives/stack/__workshop__/plain.tsx +0 -32
- package/src/ui/primitives/stack/index.ts +0 -1
- package/src/ui/primitives/stack/stack.tsx +0 -45
- package/src/ui/primitives/switch/index.ts +0 -1
- package/src/ui/primitives/switch/switch.tsx +0 -75
- package/src/ui/primitives/text/__workshop__/colored.tsx +0 -23
- package/src/ui/primitives/text/__workshop__/example.tsx +0 -39
- package/src/ui/primitives/text/text.tsx +0 -64
- package/src/ui/primitives/textArea/__workshop__/plain.tsx +0 -50
- package/src/ui/primitives/textArea/textArea.tsx +0 -71
- package/src/ui/primitives/textInput/__workshop__/plain.tsx +0 -104
- package/src/ui/primitives/textInput/__workshop__/typed.tsx +0 -23
- package/src/ui/primitives/textInput/textInput.tsx +0 -286
- package/src/ui/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
- package/src/ui/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
- package/src/ui/primitives/tooltip/__workshop__/props.tsx +0 -111
- package/src/ui/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
- package/src/ui/primitives/tooltip/tooltip.test.tsx +0 -453
- package/src/ui/primitives/tooltip/tooltip.tsx +0 -466
- package/src/ui/primitives/tooltip/tooltipCard.tsx +0 -115
- package/src/ui/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -55
- package/src/ui/primitives/types.ts +0 -166
- package/src/ui/types/avatar.ts +0 -19
- package/src/ui/types/box.ts +0 -22
- package/src/ui/types/button.ts +0 -24
- package/src/ui/types/flex.ts +0 -27
- package/src/ui/types/grid.ts +0 -17
- package/src/ui/types/gridItem.ts +0 -32
- package/src/ui/types/index.ts +0 -15
- package/src/ui/types/props.ts +0 -18
- package/src/ui/types/radius.ts +0 -7
- package/src/ui/types/selectable.ts +0 -7
- package/src/ui/types/text.ts +0 -7
- package/src/ui/utils/arrow/arrow.tsx +0 -59
- package/src/ui/utils/boundaryElement/boundaryElementProvider.tsx +0 -24
- package/src/ui/utils/conditionalWrapper/conditionalWrapper.tsx +0 -23
- package/src/ui/utils/elementQuery/elementQuery.tsx +0 -53
- package/src/ui/utils/errorBoundary.tsx +0 -48
- package/src/ui/utils/layer/layer.tsx +0 -112
- package/src/ui/utils/layer/layerProvider.tsx +0 -110
- package/src/ui/utils/portal/portal.ts +0 -46
- package/src/ui/utils/portal/portalProvider.tsx +0 -79
- package/src/ui/utils/srOnly/index.ts +0 -1
- package/src/ui/utils/srOnly/srOnly.tsx +0 -35
- package/src/ui/utils/virtualList/virtualList.tsx +0 -189
- /package/src/{ui → core}/components/autocomplete/__mocks__/apiStore.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/__mocks__/countries.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/types.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/autocompleteReducer.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/constants.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/index.ts +0 -0
- /package/src/{ui → core}/components/breadcrumbs/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/components/breadcrumbs/__workshop__/index.ts +0 -0
- /package/src/{css → core}/components/breadcrumbs/index.ts +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/activate.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/autoFocus.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/layering.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/panes.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/provider.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/wrapped.tsx +0 -0
- /package/src/{ui → core}/components/dialog/dialogContext.ts +0 -0
- /package/src/{ui → core}/components/dialog/index.ts +0 -0
- /package/src/{ui → core}/components/dialog/useDialog.ts +0 -0
- /package/src/{ui → core}/components/hotkeys/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/hotkeys/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/components/hotkeys/index.ts +0 -0
- /package/src/{ui → core}/components/index.ts +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/asComponent.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/avatarMenu.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/closableMenuButton.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/constrainedInBoundary.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/customMenuItem.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/customSelectedState.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/disableFocusOnClose.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/groups.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/menuGroupRight.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/nestedMenu.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/onCloseMenuButton.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/selectedItem.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/shouldFocus.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/withoutArrow.tsx +0 -0
- /package/src/{ui → core}/components/menu/helpers.ts +0 -0
- /package/src/{ui → core}/components/menu/index.ts +0 -0
- /package/src/{ui → core}/components/menu/useMenu.ts +0 -0
- /package/src/{ui → core}/components/skeleton/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/skeleton/index.ts +0 -0
- /package/src/{ui → core}/components/tab/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/components/tab/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/tab/index.ts +0 -0
- /package/src/{ui → core}/components/toast/__workshop__/hook.tsx +0 -0
- /package/src/{ui → core}/components/toast/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/toast/index.ts +0 -0
- /package/src/{ui → core}/components/toast/toast.test.tsx +0 -0
- /package/src/{ui → core}/components/toast/toastContext.ts +0 -0
- /package/src/{ui → core}/components/toast/toastProvider.tsx +0 -0
- /package/src/{ui → core}/components/toast/toastState.ts +0 -0
- /package/src/{ui → core}/components/toast/useToast.ts +0 -0
- /package/src/{ui → core}/components/tree/__workshop__/basic.perf.ts +0 -0
- /package/src/{ui → core}/components/tree/__workshop__/basic.tsx +0 -0
- /package/src/{ui → core}/components/tree/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/tree/__workshop__/tabFromElement.tsx +0 -0
- /package/src/{ui → core}/components/tree/helpers.ts +0 -0
- /package/src/{ui → core}/components/tree/index.ts +0 -0
- /package/src/{ui → core}/components/tree/treeContext.ts +0 -0
- /package/src/{ui → core}/components/tree/useTree.ts +0 -0
- /package/src/{ui → core}/global.ts +0 -0
- /package/src/{ui → core}/helpers/animation.ts +0 -0
- /package/src/{ui → core}/helpers/element.ts +0 -0
- /package/src/{ui → core}/helpers/focus.ts +0 -0
- /package/src/{ui → core}/helpers/scroll.ts +0 -0
- /package/src/{ui → core}/hooks/index.ts +0 -0
- /package/src/{ui → core}/hooks/useClickOutside.ts +0 -0
- /package/src/{ui → core}/hooks/useClickOutsideEvent.test.tsx +0 -0
- /package/src/{ui → core}/hooks/useClickOutsideEvent.ts +0 -0
- /package/src/{ui → core}/hooks/useCustomValidity.ts +0 -0
- /package/src/{ui → core}/hooks/useDelayed.test.ts +0 -0
- /package/src/{ui → core}/hooks/useDelayedState.ts +0 -0
- /package/src/{ui → core}/hooks/useElementRect/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/hooks/useElementRect/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/hooks/useElementRect/index.ts +0 -0
- /package/src/{ui → core}/hooks/useElementRect/useElementRect.ts +0 -0
- /package/src/{ui → core}/hooks/useElementSize.ts +0 -0
- /package/src/{ui → core}/hooks/useGlobalKeyDown.ts +0 -0
- /package/src/{ui → core}/hooks/useIsomorphicEffect.ts +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/__workshop__/test.tsx +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/index.ts +0 -0
- /package/src/{ui → core}/hooks/useMounted.ts +0 -0
- /package/src/{ui → core}/hooks/usePrefersDark.hydration.test.tsx +0 -0
- /package/src/{ui → core}/hooks/usePrefersDark.test.tsx +0 -0
- /package/src/{ui → core}/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -0
- /package/src/{ui → core}/hooks/usePrefersReducedMotion.test.tsx +0 -0
- /package/src/{ui → core}/lib/createGlobalScopedContext.ts +0 -0
- /package/src/{ui → core}/lib/globalScope.ts +0 -0
- /package/src/{ui → core}/lib/isRecord.ts +0 -0
- /package/src/{ui → core}/middleware/origin.ts +0 -0
- /package/src/{ui → core}/observers/elementSizeObserver.ts +0 -0
- /package/src/{ui → core}/observers/index.ts +0 -0
- /package/src/{ui → core}/observers/resizeObserver.ts +0 -0
- /package/src/{ui → core}/primitives/_selectable/index.ts +0 -0
- /package/src/{ui → core}/primitives/avatar/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/avatar/index.ts +0 -0
- /package/src/{ui → core}/primitives/avatar/types.ts +0 -0
- /package/src/{ui → core}/primitives/badge/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/badge/badge.test.tsx +0 -0
- /package/src/{ui → core}/primitives/badge/index.ts +0 -0
- /package/src/{ui → core}/primitives/badge/types.ts +0 -0
- /package/src/{ui → core}/primitives/box/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/box/__workshop__/responsive.tsx +0 -0
- /package/src/{ui → core}/primitives/box/index.ts +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/customIcons.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/disabled.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/mixedChildren.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/sanityUploadButton.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/styled1.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/styled2.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/uploadButton.tsx +0 -0
- /package/src/{ui → core}/primitives/button/button.test.tsx +0 -0
- /package/src/{css → core}/primitives/button/index.ts +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/asComponent.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/checkered.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/interactive.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/listNavigation.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/styled.tsx +0 -0
- /package/src/{css → core}/primitives/card/index.ts +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/readOnly.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/tones.tsx +0 -0
- /package/src/{css → core}/primitives/checkbox/index.ts +0 -0
- /package/src/{ui → core}/primitives/code/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/code/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{ui → core}/primitives/code/index.ts +0 -0
- /package/src/{ui → core}/primitives/container/__workshop__/index.ts +0 -0
- /package/src/{css → core}/primitives/container/index.ts +0 -0
- /package/src/{ui → core}/primitives/container/types.ts +0 -0
- /package/src/{ui → core}/primitives/flex/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/flex/index.ts +0 -0
- /package/src/{ui → core}/primitives/grid/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/grid/__workshop__/responsive.tsx +0 -0
- /package/src/{ui → core}/primitives/grid/index.ts +0 -0
- /package/src/{ui → core}/primitives/heading/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/heading/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{ui → core}/primitives/heading/index.ts +0 -0
- /package/src/{ui → core}/primitives/index.ts +0 -0
- /package/src/{ui → core}/primitives/inline/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/inline/index.ts +0 -0
- /package/src/{ui → core}/primitives/inline/types.ts +0 -0
- /package/src/{ui → core}/primitives/kbd/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/kbd/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/kbd/index.ts +0 -0
- /package/src/{ui → core}/primitives/label/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/label/index.ts +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/MarginsStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/popover/constants.ts +0 -0
- /package/src/{ui → core}/primitives/popover/floating-ui/size.ts +0 -0
- /package/src/{ui → core}/primitives/popover/index.ts +0 -0
- /package/src/{ui → core}/primitives/popover/types.ts +0 -0
- /package/src/{ui → core}/primitives/radio/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/radio/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/radio/__workshop__/plain.tsx +0 -0
- /package/src/{css → core}/primitives/radio/index.ts +0 -0
- /package/src/{ui → core}/primitives/select/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/select/__workshop__/readOnly.tsx +0 -0
- /package/src/{ui → core}/primitives/select/index.ts +0 -0
- /package/src/{ui → core}/primitives/spinner/__workshop__/index.ts +0 -0
- /package/src/{css → core}/primitives/spinner/index.ts +0 -0
- /package/src/{ui → core}/primitives/stack/__workshop__/index.ts +0 -0
- /package/src/{css → core}/primitives/stack/index.ts +0 -0
- /package/src/{ui → core}/primitives/switch/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/switch/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/switch/__workshop__/props.tsx +0 -0
- /package/src/{css → core}/primitives/switch/index.ts +0 -0
- /package/src/{ui → core}/primitives/text/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/text/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{ui → core}/primitives/text/index.ts +0 -0
- /package/src/{ui → core}/primitives/textArea/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/textArea/index.ts +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/clearButton.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/customValidity.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/readOnly.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/states.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/tones.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/index.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/constants.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/index.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/index.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/types.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -0
- /package/src/{ui/_compat → core}/theme/index.ts +0 -0
- /package/src/{ui/_compat → core}/theme/types.ts +0 -0
- /package/src/{ui/_compat → core}/theme/useRootTheme.ts +0 -0
- /package/src/{ui/_compat → core}/theme/useTheme.ts +0 -0
- /package/src/{ui → core}/types/badge.ts +0 -0
- /package/src/{ui → core}/types/card.ts +0 -0
- /package/src/{ui → core}/types/dialog.ts +0 -0
- /package/src/{ui → core}/types/placement.ts +0 -0
- /package/src/{ui → core}/types/popover.ts +0 -0
- /package/src/{ui → core}/utils/arrow/cmds.ts +0 -0
- /package/src/{ui → core}/utils/arrow/index.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/utils/boundaryElement/boundaryElement.test.tsx +0 -0
- /package/src/{ui → core}/utils/boundaryElement/boundaryElementContext.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/index.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/types.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/useBoundaryElement.ts +0 -0
- /package/src/{ui → core}/utils/conditionalWrapper/index.ts +0 -0
- /package/src/{ui → core}/utils/elementQuery/__workshop__/customMedia.tsx +0 -0
- /package/src/{ui → core}/utils/elementQuery/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/elementQuery/helpers.ts +0 -0
- /package/src/{ui → core}/utils/elementQuery/index.ts +0 -0
- /package/src/{ui → core}/utils/getElementRef.ts +0 -0
- /package/src/{ui → core}/utils/index.ts +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/_debug.tsx +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/multipleRoots.tsx +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/nested.tsx +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/responsiveZOffset.tsx +0 -0
- /package/src/{ui → core}/utils/layer/getLayerContext.test.ts +0 -0
- /package/src/{ui → core}/utils/layer/getLayerContext.ts +0 -0
- /package/src/{ui → core}/utils/layer/index.ts +0 -0
- /package/src/{ui → core}/utils/layer/layer.test.tsx +0 -0
- /package/src/{ui → core}/utils/layer/layerContext.ts +0 -0
- /package/src/{ui → core}/utils/layer/types.ts +0 -0
- /package/src/{ui → core}/utils/layer/useLayer.ts +0 -0
- /package/src/{ui → core}/utils/portal/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/portal/__workshop__/named.tsx +0 -0
- /package/src/{ui → core}/utils/portal/index.ts +0 -0
- /package/src/{ui → core}/utils/portal/portal.test.tsx +0 -0
- /package/src/{ui → core}/utils/portal/portalContext.ts +0 -0
- /package/src/{ui → core}/utils/portal/types.ts +0 -0
- /package/src/{ui → core}/utils/portal/usePortal.ts +0 -0
- /package/src/{ui → core}/utils/spanWithTextOverflow.tsx +0 -0
- /package/src/{css → core}/utils/srOnly/index.ts +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/changingProps.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/elementScroll.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/infiniteList.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/windowScrolll.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/index.ts +0 -0
- /package/src/theme/{v2 → system}/color/_constants.ts +0 -0
- /package/src/theme/{v2 → system}/color/_helpers.ts +0 -0
- /package/src/theme/{v2 → system}/color/_system.ts +0 -0
- /package/src/theme/{v2 → system}/color/avatar.ts +0 -0
- /package/src/theme/{v2 → system}/color/badge.ts +0 -0
- /package/src/theme/{v2 → system}/color/button.ts +0 -0
- /package/src/theme/{v2 → system}/color/color.ts +0 -0
- /package/src/theme/{v2 → system}/color/index.ts +0 -0
- /package/src/theme/{v2 → system}/color/input.ts +0 -0
- /package/src/theme/{v2 → system}/color/kbd.ts +0 -0
- /package/src/theme/{v2 → system}/color/selectable.ts +0 -0
- /package/src/theme/{v2 → system}/color/shadow.ts +0 -0
- /package/src/theme/{v2 → system}/color/state.ts +0 -0
- /package/src/theme/{v2 → system}/color/syntax.ts +0 -0
- /package/src/theme/{v0 → system}/css.ts +0 -0
- /package/src/theme/{v0 → system}/focusRing.ts +0 -0
- /package/src/theme/{v0 → system}/layer.ts +0 -0
- /package/src/theme/{v0 → system}/shadow.ts +0 -0
- /package/src/theme/{v0 → system}/styles.ts +0 -0
- /package/src/theme/{v0 → system/v0}/avatar.ts +0 -0
- /package/src/theme/{v0 → system/v0}/color/_system.ts +0 -0
- /package/src/theme/{v0 → system/v0}/color/base.ts +0 -0
- /package/src/theme/{v0 → system/v0}/color/button.ts +0 -0
- /package/src/theme/{v0 → system/v0}/color/card.ts +0 -0
- /package/src/theme/{v0 → system/v0}/color/index.ts +0 -0
- /package/src/theme/{v0 → system/v0}/color/muted.ts +0 -0
- /package/src/theme/{v0 → system/v0}/color/selectable.ts +0 -0
- /package/src/theme/{v0 → system/v0}/color/solid.ts +0 -0
- /package/src/theme/{v0 → system/v0}/input.ts +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import { isHTMLElement, isHTMLAnchorElement, isHTMLInputElement, isHTMLButtonElement, isHTMLSelectElement, isHTMLTextAreaElement, EMPTY_ARRAY, useElementSize, Code, _isEnterToClickElement, Card, Text, useArrayProp, EMPTY_RECORD,
|
|
2
|
-
import { Arrow, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider,
|
|
3
|
-
import { composeClassNames, breadcrumbs, dialogContainer, dialogCardRoot, dialogLayout, dialogHeader, dialogContent, dialogFooter, dialog, skeleton, textSkeleton, labelSkeleton, headingSkeleton, codeSkeleton, toast, toastLoadingBar, toastLoadingBarMask, toastLoadingBarProgress, toastLayer, treeItem, compilePalette, compileTheme, compileSystem } from "@sanity/ui/css";
|
|
4
|
-
import { px, rem } from "@sanity/ui/css";
|
|
1
|
+
import { isHTMLElement, isHTMLAnchorElement, isHTMLInputElement, isHTMLButtonElement, isHTMLSelectElement, isHTMLTextAreaElement, EMPTY_ARRAY, useElementSize, Code, Box, _isEnterToClickElement, Card, Text, useArrayProp, EMPTY_RECORD, Button, Stack, Popover, TextInput, useClickOutsideEvent, _responsive, createGlobalScopedContext, Container, Flex, usePortal, useBoundaryElement, useLayer, useGlobalKeyDown, useTheme_v2, usePrefersReducedMotion, Portal, containsOrEqualsElement, Layer, responsivePaddingStyle, responsiveRadiusStyle, Grid, LayerProvider, isRecord, _cardColorStyle, rem } from "./_chunks-es/_visual-editing.mjs";
|
|
2
|
+
import { Arrow, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, Checkbox, ConditionalWrapper, ElementQuery, Heading, Hotkeys, Inline, KBD, Label, Menu, MenuDivider, MenuGroup, MenuItem, PortalProvider, Radio, Select, Spinner, SrOnly, Switch, Tab, TabList, TextArea, ThemeColorProvider, ThemeProvider, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupProvider, VirtualList, _ResizeObserver, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _isScrollable, createColorTheme, hexToRgb, hslToRgb, multiply, parseColor, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, rgbToHex, rgbToHsl, rgba, screen, studioTheme, useCustomValidity, useMatchMedia, useMediaIndex, usePrefersDark, useRootTheme, useTheme, useTooltipDelayGroup } from "./_chunks-es/_visual-editing.mjs";
|
|
5
3
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
6
|
-
import { ChevronDownIcon, CloseIcon, ToggleArrowRightIcon } from "@sanity/icons";
|
|
4
|
+
import { SpinnerIcon, ChevronDownIcon, CloseIcon, ToggleArrowRightIcon } from "@sanity/icons";
|
|
7
5
|
import { useState, useRef, useEffect, useImperativeHandle, Component, forwardRef, useReducer, useCallback, useMemo, cloneElement, Children, isValidElement, Fragment, useContext, useSyncExternalStore, startTransition, memo, useId } from "react";
|
|
6
|
+
import { styled, keyframes, css } from "styled-components";
|
|
8
7
|
import { c } from "react-compiler-runtime";
|
|
8
|
+
import { getTheme_v2 } from "@sanity/ui/theme";
|
|
9
9
|
import { motion, AnimatePresence } from "framer-motion";
|
|
10
|
-
import { buildTheme_v3 } from "@sanity/ui/theme";
|
|
11
|
-
function _responsive(media, values, callback) {
|
|
12
|
-
return (values?.map(callback) || []).map((statement, mediaIndex) => mediaIndex === 0 ? statement : {
|
|
13
|
-
[`@media screen and (min-width: ${media[mediaIndex - 1]}px)`]: statement
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
10
|
function _raf(fn) {
|
|
17
11
|
const frameId = requestAnimationFrame(fn);
|
|
18
12
|
return () => {
|
|
@@ -140,6 +134,24 @@ class ErrorBoundary extends Component {
|
|
|
140
134
|
return this.props.children;
|
|
141
135
|
}
|
|
142
136
|
}
|
|
137
|
+
const StyledAutocomplete = styled.div.withConfig({
|
|
138
|
+
displayName: "StyledAutocomplete",
|
|
139
|
+
componentId: "sc-1igauft-0"
|
|
140
|
+
})`line-height:0;`, ListBox = styled(Box).withConfig({
|
|
141
|
+
displayName: "ListBox",
|
|
142
|
+
componentId: "sc-1igauft-1"
|
|
143
|
+
})`& > ul{list-style:none;padding:0;margin:0;}`, rotate = keyframes`
|
|
144
|
+
from {
|
|
145
|
+
transform: rotate(0deg);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
to {
|
|
149
|
+
transform: rotate(360deg);
|
|
150
|
+
}
|
|
151
|
+
`, AnimatedSpinnerIcon = styled(SpinnerIcon).withConfig({
|
|
152
|
+
displayName: "AnimatedSpinnerIcon",
|
|
153
|
+
componentId: "sc-1igauft-2"
|
|
154
|
+
})`animation:${rotate} 500ms linear infinite;`;
|
|
143
155
|
function AutocompleteOption(props) {
|
|
144
156
|
const $ = c(11), {
|
|
145
157
|
children,
|
|
@@ -247,7 +259,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
247
259
|
value
|
|
248
260
|
} = state, defaultRenderOption = useCallback(({
|
|
249
261
|
value: value_0
|
|
250
|
-
}) => /* @__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);
|
|
262
|
+
}) => /* @__PURE__ */ jsx(Card, { "data-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);
|
|
251
263
|
useImperativeHandle(forwardedRef, () => inputElementRef.current);
|
|
252
264
|
const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding = useArrayProp(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) => {
|
|
253
265
|
setTimeout(() => {
|
|
@@ -375,9 +387,9 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
375
387
|
};
|
|
376
388
|
}, [disabled, handleClearButtonFocus, loading, value]), openButtonBoxPadding = useMemo(() => padding.map((v_0) => v_0 === 0 ? 0 : v_0 === 1 || v_0 === 2 ? 1 : v_0 - 2), [padding]), openButtonPadding = useMemo(() => padding.map((v_1) => Math.max(v_1 - 1, 0)), [padding]), openButtonProps = useMemo(() => typeof openButton == "object" ? openButton : EMPTY_RECORD, [openButton]), handleOpenClick = useCallback((event_4) => {
|
|
377
389
|
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
|
|
378
|
-
}, [openButtonProps, dispatchOpen]), openButtonNode = useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsx(Button, { "aria-label": "Open", disabled: expanded,
|
|
390
|
+
}, [openButtonProps, dispatchOpen]), openButtonNode = useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsx(Button, { "aria-label": "Open", disabled: expanded, 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, { ...restProps, "aria-activedescendant": activeItemId, "aria-autocomplete": "list", "aria-expanded": expanded, "aria-owns": listBoxId, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", 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) => {
|
|
379
391
|
event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
|
|
380
|
-
}, [listFocused]), content2 = useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsx(
|
|
392
|
+
}, [listFocused]), content2 = useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsx(ListBox, { "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1, ...listBox, tabIndex: -1, children: /* @__PURE__ */ jsx(Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", id: listBoxId, ref: listBoxElementRef, role: "listbox", space: 1, children: filteredOptions.map((option_0) => {
|
|
381
393
|
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
382
394
|
return /* @__PURE__ */ jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: cloneElement(renderOption(option_0), {
|
|
383
395
|
disabled: loading,
|
|
@@ -390,46 +402,100 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
390
402
|
inputElement: inputElementRef.current,
|
|
391
403
|
onMouseEnter: handlePopoverMouseEnter,
|
|
392
404
|
onMouseLeave: handlePopoverMouseLeave
|
|
393
|
-
}, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsx(Popover, { arrow: !1, constrainSize: !0, content: content2, fallbackPlacements: AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS, matchReferenceWidth: !0, onMouseEnter: handlePopoverMouseEnter, onMouseLeave: handlePopoverMouseLeave, open: expanded, overflow: "auto", placement: AUTOCOMPLETE_POPOVER_PLACEMENT, portal: !0, radius
|
|
394
|
-
return (
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
results
|
|
399
|
-
] })
|
|
400
|
-
);
|
|
405
|
+
}, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsx(Popover, { arrow: !1, constrainSize: !0, content: content2, fallbackPlacements: AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS, matchReferenceWidth: !0, onMouseEnter: handlePopoverMouseEnter, onMouseLeave: handlePopoverMouseLeave, open: expanded, overflow: "auto", placement: AUTOCOMPLETE_POPOVER_PLACEMENT, portal: !0, radius, ref: resultsPopoverElementRef, referenceElement: inputElementRef.current, ...popover }), [content2, expanded, filteredOptionsLen, handlePopoverMouseEnter, handlePopoverMouseLeave, popover, radius, renderPopover]);
|
|
406
|
+
return /* @__PURE__ */ jsxs(StyledAutocomplete, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
|
|
407
|
+
input,
|
|
408
|
+
results
|
|
409
|
+
] });
|
|
401
410
|
});
|
|
402
411
|
InnerAutocomplete.displayName = "ForwardRef(Autocomplete)";
|
|
403
|
-
const Autocomplete = InnerAutocomplete,
|
|
412
|
+
const Autocomplete = InnerAutocomplete, StyledBreadcrumbs = styled.ol.withConfig({
|
|
413
|
+
displayName: "StyledBreadcrumbs",
|
|
414
|
+
componentId: "sc-1es8h8q-0"
|
|
415
|
+
})`margin:0;padding:0;display:flex;list-style:none;align-items:center;white-space:nowrap;line-height:0;`, ExpandButton = styled(Button).withConfig({
|
|
416
|
+
displayName: "ExpandButton",
|
|
417
|
+
componentId: "sc-1es8h8q-1"
|
|
418
|
+
})`appearance:none;margin:-4px;`, Breadcrumbs = forwardRef(function(props, ref) {
|
|
404
419
|
const {
|
|
405
420
|
children,
|
|
406
|
-
className,
|
|
407
|
-
expandButton: expandButtonProps,
|
|
408
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
409
|
-
gap: _gapProp,
|
|
410
|
-
gapX = props.gap ?? props.space ?? 2,
|
|
411
|
-
gapY = props.gap ?? props.space ?? 2,
|
|
412
421
|
maxLength,
|
|
413
422
|
separator,
|
|
414
|
-
|
|
415
|
-
space: _spaceProp,
|
|
423
|
+
space: spaceRaw = 2,
|
|
416
424
|
...restProps
|
|
417
|
-
} = props, [open, setOpen] = useState(!1), expandElementRef = useRef(null), popoverElementRef = useRef(null), collapse = useCallback(() => setOpen(!1), []), expand = useCallback(() => setOpen(!0), []);
|
|
425
|
+
} = props, space = useArrayProp(spaceRaw), [open, setOpen] = useState(!1), expandElementRef = useRef(null), popoverElementRef = useRef(null), collapse = useCallback(() => setOpen(!1), []), expand = useCallback(() => setOpen(!0), []);
|
|
418
426
|
useClickOutsideEvent(collapse, () => [expandElementRef.current, popoverElementRef.current]);
|
|
419
427
|
const rawItems = useMemo(() => Children.toArray(children).filter(isValidElement), [children]), items = useMemo(() => {
|
|
420
428
|
const len = rawItems.length;
|
|
421
429
|
if (maxLength && len > maxLength) {
|
|
422
430
|
const beforeLength = Math.ceil(maxLength / 2), afterLength = Math.floor(maxLength / 2);
|
|
423
|
-
return [...rawItems.slice(0, beforeLength - 1), /* @__PURE__ */ jsx(Popover, { constrainSize: !0, content: /* @__PURE__ */ jsx(Stack, { as: "ol", overflow: "auto",
|
|
431
|
+
return [...rawItems.slice(0, beforeLength - 1), /* @__PURE__ */ jsx(Popover, { constrainSize: !0, content: /* @__PURE__ */ jsx(Stack, { as: "ol", overflow: "auto", padding: space, space, children: rawItems.slice(beforeLength - 1, len - afterLength) }), open, placement: "top", portal: !0, ref: popoverElementRef, children: /* @__PURE__ */ jsx(ExpandButton, { fontSize: 1, mode: "bleed", onClick: open ? collapse : expand, padding: 1, ref: expandElementRef, selected: open, text: "\u2026" }) }, "button"), ...rawItems.slice(len - afterLength)];
|
|
424
432
|
}
|
|
425
433
|
return rawItems;
|
|
426
|
-
}, [collapse, expand,
|
|
427
|
-
return /* @__PURE__ */ jsx(
|
|
428
|
-
itemIndex > 0 && /* @__PURE__ */ jsx(Box, { "aria-hidden": !0, as: "li", children: separator || /* @__PURE__ */ jsx(Text, { muted: !0, children: "/" }) }),
|
|
434
|
+
}, [collapse, expand, maxLength, open, rawItems, space]);
|
|
435
|
+
return /* @__PURE__ */ jsx(StyledBreadcrumbs, { "data-ui": "Breadcrumbs", ...restProps, ref, children: items.map((item, itemIndex) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
436
|
+
itemIndex > 0 && /* @__PURE__ */ jsx(Box, { "aria-hidden": !0, as: "li", paddingX: space, children: separator || /* @__PURE__ */ jsx(Text, { muted: !0, children: "/" }) }),
|
|
429
437
|
/* @__PURE__ */ jsx(Box, { as: "li", children: item })
|
|
430
438
|
] }, itemIndex)) });
|
|
431
439
|
});
|
|
432
440
|
Breadcrumbs.displayName = "ForwardRef(Breadcrumbs)";
|
|
441
|
+
function dialogStyle({
|
|
442
|
+
theme
|
|
443
|
+
}) {
|
|
444
|
+
const {
|
|
445
|
+
color
|
|
446
|
+
} = getTheme_v2(theme);
|
|
447
|
+
return {
|
|
448
|
+
"&:not([hidden])": {
|
|
449
|
+
display: "flex"
|
|
450
|
+
},
|
|
451
|
+
top: 0,
|
|
452
|
+
left: 0,
|
|
453
|
+
right: 0,
|
|
454
|
+
bottom: 0,
|
|
455
|
+
alignItems: "center",
|
|
456
|
+
justifyContent: "center",
|
|
457
|
+
outline: "none",
|
|
458
|
+
background: color.backdrop
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
function responsiveDialogPositionStyle(props) {
|
|
462
|
+
const {
|
|
463
|
+
media
|
|
464
|
+
} = getTheme_v2(props.theme);
|
|
465
|
+
return _responsive(media, props.$position, (position) => ({
|
|
466
|
+
"&&": {
|
|
467
|
+
position
|
|
468
|
+
}
|
|
469
|
+
}));
|
|
470
|
+
}
|
|
471
|
+
function animationDialogStyle(props) {
|
|
472
|
+
return props.$animate ? css`
|
|
473
|
+
@keyframes zoomIn {
|
|
474
|
+
from {
|
|
475
|
+
opacity: 0;
|
|
476
|
+
transform: scale(0.95);
|
|
477
|
+
}
|
|
478
|
+
to {
|
|
479
|
+
opacity: 1;
|
|
480
|
+
transform: scale(1);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
@keyframes fadeIn {
|
|
484
|
+
from {
|
|
485
|
+
opacity: 0;
|
|
486
|
+
}
|
|
487
|
+
to {
|
|
488
|
+
opacity: 1;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
animation: fadeIn 200ms ease-out;
|
|
493
|
+
// Animates the dialog card.
|
|
494
|
+
& > [data-ui='DialogCard'] {
|
|
495
|
+
animation: zoomIn 200ms ease-out;
|
|
496
|
+
}
|
|
497
|
+
` : css``;
|
|
498
|
+
}
|
|
433
499
|
const DialogContext = createGlobalScopedContext("@sanity/ui/context/dialog", {
|
|
434
500
|
version: 0
|
|
435
501
|
});
|
|
@@ -439,8 +505,29 @@ function useDialog() {
|
|
|
439
505
|
function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
440
506
|
return !boundaryElement || !portalElement ? !0 : containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
|
|
441
507
|
}
|
|
442
|
-
const
|
|
443
|
-
|
|
508
|
+
const StyledDialog = /* @__PURE__ */ styled(Layer).withConfig({
|
|
509
|
+
displayName: "StyledDialog",
|
|
510
|
+
componentId: "sc-4n4xb3-0"
|
|
511
|
+
})(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle, animationDialogStyle), DialogContainer = styled(Container).withConfig({
|
|
512
|
+
displayName: "DialogContainer",
|
|
513
|
+
componentId: "sc-4n4xb3-1"
|
|
514
|
+
})`&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;`, DialogCardRoot = styled(Card).withConfig({
|
|
515
|
+
displayName: "DialogCardRoot",
|
|
516
|
+
componentId: "sc-4n4xb3-2"
|
|
517
|
+
})`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`, DialogLayout = styled(Flex).withConfig({
|
|
518
|
+
displayName: "DialogLayout",
|
|
519
|
+
componentId: "sc-4n4xb3-3"
|
|
520
|
+
})`flex:1;min-height:0;width:100%;`, DialogHeader = styled(Box).withConfig({
|
|
521
|
+
displayName: "DialogHeader",
|
|
522
|
+
componentId: "sc-4n4xb3-4"
|
|
523
|
+
})`position:relative;z-index:2;`, DialogContent = styled(Box).withConfig({
|
|
524
|
+
displayName: "DialogContent",
|
|
525
|
+
componentId: "sc-4n4xb3-5"
|
|
526
|
+
})`position:relative;z-index:1;overflow:auto;outline:none;`, DialogFooter = styled(Box).withConfig({
|
|
527
|
+
displayName: "DialogFooter",
|
|
528
|
+
componentId: "sc-4n4xb3-6"
|
|
529
|
+
})`position:relative;z-index:3;`, DialogCard = forwardRef(function(props, forwardedRef) {
|
|
530
|
+
const $ = c(38), {
|
|
444
531
|
__unstable_autoFocus: autoFocus,
|
|
445
532
|
__unstable_hideCloseButton: hideCloseButton,
|
|
446
533
|
children,
|
|
@@ -453,73 +540,65 @@ const DialogCard = forwardRef(function(props, forwardedRef) {
|
|
|
453
540
|
portal: portalProp,
|
|
454
541
|
radius: radiusProp,
|
|
455
542
|
scheme,
|
|
456
|
-
shadow:
|
|
457
|
-
tone,
|
|
543
|
+
shadow: shadowProp,
|
|
458
544
|
width: widthProp
|
|
459
|
-
} = props,
|
|
545
|
+
} = props, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, radius = useArrayProp(radiusProp), shadow = useArrayProp(shadowProp), width = useArrayProp(widthProp), ref = useRef(null), contentRef = useRef(null), layer = useLayer(), {
|
|
460
546
|
isTopLayer
|
|
461
547
|
} = layer, labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton;
|
|
548
|
+
let t0;
|
|
549
|
+
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[0] = t0) : t0 = $[0], useImperativeHandle(forwardedRef, t0);
|
|
462
550
|
let t1;
|
|
463
|
-
$[
|
|
464
|
-
let t2;
|
|
465
|
-
$[
|
|
466
|
-
let t3, t4;
|
|
467
|
-
$[2] !== autoFocus ? (t3 = () => {
|
|
551
|
+
$[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => contentRef.current, $[1] = t1) : t1 = $[1], useImperativeHandle(forwardedContentRef, t1);
|
|
552
|
+
let t2, t3;
|
|
553
|
+
$[2] !== autoFocus ? (t2 = () => {
|
|
468
554
|
autoFocus && ref.current && focusFirstDescendant(ref.current);
|
|
469
|
-
},
|
|
470
|
-
let
|
|
471
|
-
$[5] !== boundaryElement || $[6] !== isTopLayer || $[7] !== onClose || $[8] !== portalElement ? (
|
|
555
|
+
}, t3 = [autoFocus, ref], $[2] = autoFocus, $[3] = t2, $[4] = t3) : (t2 = $[3], t3 = $[4]), useEffect(t2, t3);
|
|
556
|
+
let t4;
|
|
557
|
+
$[5] !== boundaryElement || $[6] !== isTopLayer || $[7] !== onClose || $[8] !== portalElement ? (t4 = (event) => {
|
|
472
558
|
if (!isTopLayer || !onClose)
|
|
473
559
|
return;
|
|
474
560
|
const target = document.activeElement;
|
|
475
561
|
target && !isTargetWithinScope(boundaryElement, portalElement, target) || event.key === "Escape" && (event.preventDefault(), event.stopPropagation(), onClose());
|
|
476
|
-
}, $[5] = boundaryElement, $[6] = isTopLayer, $[7] = onClose, $[8] = portalElement, $[9] =
|
|
477
|
-
let
|
|
478
|
-
$[10] !== boundaryElement || $[11] !== isTopLayer || $[12] !== onClickOutside || $[13] !== portalElement ? (
|
|
562
|
+
}, $[5] = boundaryElement, $[6] = isTopLayer, $[7] = onClose, $[8] = portalElement, $[9] = t4) : t4 = $[9], useGlobalKeyDown(t4);
|
|
563
|
+
let t5;
|
|
564
|
+
$[10] !== boundaryElement || $[11] !== isTopLayer || $[12] !== onClickOutside || $[13] !== portalElement ? (t5 = isTopLayer && onClickOutside && ((event_0) => {
|
|
479
565
|
const target_0 = event_0.target;
|
|
480
566
|
target_0 && !isTargetWithinScope(boundaryElement, portalElement, target_0) || onClickOutside();
|
|
481
|
-
}), $[10] = boundaryElement, $[11] = isTopLayer, $[12] = onClickOutside, $[13] = portalElement, $[14] =
|
|
567
|
+
}), $[10] = boundaryElement, $[11] = isTopLayer, $[12] = onClickOutside, $[13] = portalElement, $[14] = t5) : t5 = $[14];
|
|
568
|
+
let t6;
|
|
569
|
+
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => [ref.current], $[15] = t6) : t6 = $[15], useClickOutsideEvent(t5, t6);
|
|
482
570
|
let t7;
|
|
483
|
-
$[
|
|
571
|
+
$[16] !== header || $[17] !== labelId || $[18] !== onClose || $[19] !== showCloseButton || $[20] !== showHeader ? (t7 = showHeader && /* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsxs(Flex, { align: "flex-start", padding: 3, children: [
|
|
572
|
+
/* @__PURE__ */ jsx(Box, { flex: 1, padding: 2, children: header && /* @__PURE__ */ jsx(Text, { id: labelId, size: 1, weight: "semibold", children: header }) }),
|
|
573
|
+
showCloseButton && /* @__PURE__ */ jsx(Box, { flex: "none", children: /* @__PURE__ */ jsx(Button, { "aria-label": "Close dialog", disabled: !onClose, icon: CloseIcon, mode: "bleed", onClick: onClose, padding: 2 }) })
|
|
574
|
+
] }) }), $[16] = header, $[17] = labelId, $[18] = onClose, $[19] = showCloseButton, $[20] = showHeader, $[21] = t7) : t7 = $[21];
|
|
484
575
|
let t8;
|
|
485
|
-
$[
|
|
576
|
+
$[22] !== children ? (t8 = /* @__PURE__ */ jsx(DialogContent, { flex: 1, ref: contentRef, tabIndex: -1, children }), $[22] = children, $[23] = t8) : t8 = $[23];
|
|
486
577
|
let t9;
|
|
487
|
-
$[
|
|
578
|
+
$[24] !== footer ? (t9 = footer && /* @__PURE__ */ jsx(DialogFooter, { children: footer }), $[24] = footer, $[25] = t9) : t9 = $[25];
|
|
488
579
|
let t10;
|
|
489
|
-
$[
|
|
580
|
+
$[26] !== t7 || $[27] !== t8 || $[28] !== t9 ? (t10 = /* @__PURE__ */ jsxs(DialogLayout, { direction: "column", children: [
|
|
581
|
+
t7,
|
|
582
|
+
t8,
|
|
583
|
+
t9
|
|
584
|
+
] }), $[26] = t7, $[27] = t8, $[28] = t9, $[29] = t10) : t10 = $[29];
|
|
490
585
|
let t11;
|
|
491
|
-
$[
|
|
492
|
-
/* @__PURE__ */ jsx(Box, { flex: 1, padding: 2, children: header && /* @__PURE__ */ jsx(Text, { id: labelId, size: 1, weight: "semibold", children: header }) }),
|
|
493
|
-
showCloseButton && /* @__PURE__ */ jsx(Box, { flex: "none", children: /* @__PURE__ */ jsx(Button, { "aria-label": "Close dialog", disabled: !onClose, icon: CloseIcon, mode: "bleed", onClick: onClose, padding: 2 }) })
|
|
494
|
-
] }) }), $[19] = header, $[20] = labelId, $[21] = onClose, $[22] = showCloseButton, $[23] = showHeader, $[24] = t11) : t11 = $[24];
|
|
586
|
+
$[30] !== radius || $[31] !== scheme || $[32] !== shadow || $[33] !== t10 ? (t11 = /* @__PURE__ */ jsx(DialogCardRoot, { radius, ref, scheme, shadow, children: t10 }), $[30] = radius, $[31] = scheme, $[32] = shadow, $[33] = t10, $[34] = t11) : t11 = $[34];
|
|
495
587
|
let t12;
|
|
496
|
-
$[
|
|
497
|
-
let t13;
|
|
498
|
-
$[26] !== children ? (t13 = /* @__PURE__ */ jsx(Box, { className: t12, flex: 1, overflow: "auto", position: "relative", ref: contentRef, tabIndex: -1, children }), $[26] = children, $[27] = t13) : t13 = $[27];
|
|
499
|
-
let t14;
|
|
500
|
-
$[28] !== footer ? (t14 = footer && /* @__PURE__ */ jsx(Box, { className: dialogFooter(), position: "relative", children: footer }), $[28] = footer, $[29] = t14) : t14 = $[29];
|
|
501
|
-
let t15;
|
|
502
|
-
$[30] !== t11 || $[31] !== t13 || $[32] !== t14 ? (t15 = /* @__PURE__ */ jsxs(Flex, { className: t10, direction: "column", flex: 1, children: [
|
|
503
|
-
t11,
|
|
504
|
-
t13,
|
|
505
|
-
t14
|
|
506
|
-
] }), $[30] = t11, $[31] = t13, $[32] = t14, $[33] = t15) : t15 = $[33];
|
|
507
|
-
let t16;
|
|
508
|
-
$[34] !== radius || $[35] !== scheme || $[36] !== shadow || $[37] !== t15 || $[38] !== tone ? (t16 = /* @__PURE__ */ jsx(Card, { className: t9, display: "flex", radius, ref, scheme, shadow, tone, children: t15 }), $[34] = radius, $[35] = scheme, $[36] = shadow, $[37] = t15, $[38] = tone, $[39] = t16) : t16 = $[39];
|
|
509
|
-
let t17;
|
|
510
|
-
return $[40] !== t16 || $[41] !== width ? (t17 = /* @__PURE__ */ jsx(Container, { align: "center", className: t8, "data-ui": "DialogCard", direction: "column", display: "flex", justify: "center", width, children: t16 }), $[40] = t16, $[41] = width, $[42] = t17) : t17 = $[42], t17;
|
|
588
|
+
return $[35] !== t11 || $[36] !== width ? (t12 = /* @__PURE__ */ jsx(DialogContainer, { "data-ui": "DialogCard", width, children: t11 }), $[35] = t11, $[36] = width, $[37] = t12) : t12 = $[37], t12;
|
|
511
589
|
});
|
|
512
590
|
DialogCard.displayName = "ForwardRef(DialogCard)";
|
|
513
591
|
const Dialog = forwardRef(function(props, ref) {
|
|
514
|
-
const $ = c(
|
|
515
|
-
|
|
592
|
+
const $ = c(60), dialog = useDialog(), {
|
|
593
|
+
layer
|
|
594
|
+
} = useTheme_v2();
|
|
595
|
+
let _positionProp, _zOffsetProp, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, t6;
|
|
516
596
|
$[0] !== props ? ({
|
|
517
597
|
__unstable_autoFocus: t0,
|
|
518
598
|
__unstable_hideCloseButton: t1,
|
|
519
|
-
|
|
520
|
-
|
|
599
|
+
cardRadius: t2,
|
|
600
|
+
cardShadow: t3,
|
|
521
601
|
children,
|
|
522
|
-
className,
|
|
523
602
|
contentRef,
|
|
524
603
|
footer,
|
|
525
604
|
header,
|
|
@@ -532,15 +611,14 @@ const Dialog = forwardRef(function(props, ref) {
|
|
|
532
611
|
portal: portalProp,
|
|
533
612
|
position: _positionProp,
|
|
534
613
|
scheme,
|
|
535
|
-
shadow: cardShadow,
|
|
536
614
|
width: t5,
|
|
537
615
|
zOffset: _zOffsetProp,
|
|
538
|
-
|
|
616
|
+
animate: t6,
|
|
539
617
|
...restProps
|
|
540
|
-
} = props, $[0] = props, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] =
|
|
541
|
-
const autoFocus = t0 === void 0 ? !0 : t0, hideCloseButton = t1 === void 0 ? !1 : t1,
|
|
542
|
-
let
|
|
543
|
-
$[
|
|
618
|
+
} = props, $[0] = props, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] = children, $[4] = contentRef, $[5] = footer, $[6] = header, $[7] = id, $[8] = onActivate, $[9] = onClickOutside, $[10] = onClose, $[11] = onFocus, $[12] = portalProp, $[13] = restProps, $[14] = scheme, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6) : (_positionProp = $[1], _zOffsetProp = $[2], children = $[3], contentRef = $[4], footer = $[5], header = $[6], id = $[7], onActivate = $[8], onClickOutside = $[9], onClose = $[10], onFocus = $[11], portalProp = $[12], restProps = $[13], scheme = $[14], t0 = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21]);
|
|
619
|
+
const autoFocus = t0 === void 0 ? !0 : t0, hideCloseButton = t1 === void 0 ? !1 : t1, cardRadiusProp = t2 === void 0 ? 4 : t2, cardShadow = t3 === void 0 ? 3 : t3, paddingProp = t4 === void 0 ? 3 : t4, widthProp = t5 === void 0 ? 0 : t5, _animate = t6 === void 0 ? !1 : t6, positionProp = _positionProp ?? (dialog.position || "fixed"), zOffsetProp = _zOffsetProp ?? (dialog.zOffset || layer.dialog.zOffset), animate = usePrefersReducedMotion() ? !1 : _animate, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, cardRadius = useArrayProp(cardRadiusProp), padding = useArrayProp(paddingProp), position = useArrayProp(positionProp), width = useArrayProp(widthProp), zOffset = useArrayProp(zOffsetProp), preDivRef = useRef(null), postDivRef = useRef(null), cardRef = useRef(null), focusedElementRef = useRef(null);
|
|
620
|
+
let t7;
|
|
621
|
+
$[22] !== onFocus ? (t7 = (event) => {
|
|
544
622
|
onFocus?.(event);
|
|
545
623
|
const target = event.target, cardElement = cardRef.current;
|
|
546
624
|
if (cardElement && target === preDivRef.current) {
|
|
@@ -552,10 +630,10 @@ const Dialog = forwardRef(function(props, ref) {
|
|
|
552
630
|
return;
|
|
553
631
|
}
|
|
554
632
|
isHTMLElement(event.target) && (focusedElementRef.current = event.target);
|
|
555
|
-
}, $[
|
|
556
|
-
const handleFocus =
|
|
557
|
-
let
|
|
558
|
-
$[
|
|
633
|
+
}, $[22] = onFocus, $[23] = t7) : t7 = $[23];
|
|
634
|
+
const handleFocus = t7, labelId = `${id}_label`, rootClickTimeoutRef = useRef(void 0);
|
|
635
|
+
let t8;
|
|
636
|
+
$[24] !== boundaryElement || $[25] !== portalElement ? (t8 = () => {
|
|
559
637
|
rootClickTimeoutRef.current && clearTimeout(rootClickTimeoutRef.current), rootClickTimeoutRef.current = setTimeout(() => {
|
|
560
638
|
const activeElement = document.activeElement;
|
|
561
639
|
if (activeElement && !isTargetWithinScope(boundaryElement, portalElement, activeElement)) {
|
|
@@ -568,25 +646,22 @@ const Dialog = forwardRef(function(props, ref) {
|
|
|
568
646
|
target_0.focus();
|
|
569
647
|
}
|
|
570
648
|
}, 0);
|
|
571
|
-
}, $[
|
|
572
|
-
const handleRootClick =
|
|
573
|
-
let
|
|
574
|
-
$[
|
|
575
|
-
const t9 = animate ? "" : void 0;
|
|
649
|
+
}, $[24] = boundaryElement, $[25] = portalElement, $[26] = t8) : t8 = $[26];
|
|
650
|
+
const handleRootClick = t8;
|
|
651
|
+
let t9;
|
|
652
|
+
$[27] === Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsx("div", { ref: preDivRef, tabIndex: 0 }), $[27] = t9) : t9 = $[27];
|
|
576
653
|
let t10;
|
|
577
|
-
$[31]
|
|
654
|
+
$[28] !== autoFocus || $[29] !== cardRadius || $[30] !== cardShadow || $[31] !== children || $[32] !== contentRef || $[33] !== footer || $[34] !== header || $[35] !== hideCloseButton || $[36] !== id || $[37] !== onClickOutside || $[38] !== onClose || $[39] !== portalProp || $[40] !== scheme || $[41] !== width ? (t10 = /* @__PURE__ */ jsx(DialogCard, { __unstable_autoFocus: autoFocus, __unstable_hideCloseButton: hideCloseButton, contentRef, footer, header, id, onClickOutside, onClose, portal: portalProp, radius: cardRadius, ref: cardRef, scheme, shadow: cardShadow, width, children }), $[28] = autoFocus, $[29] = cardRadius, $[30] = cardShadow, $[31] = children, $[32] = contentRef, $[33] = footer, $[34] = header, $[35] = hideCloseButton, $[36] = id, $[37] = onClickOutside, $[38] = onClose, $[39] = portalProp, $[40] = scheme, $[41] = width, $[42] = t10) : t10 = $[42];
|
|
578
655
|
let t11;
|
|
579
|
-
$[
|
|
656
|
+
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t11 = /* @__PURE__ */ jsx("div", { ref: postDivRef, tabIndex: 0 }), $[43] = t11) : t11 = $[43];
|
|
580
657
|
let t12;
|
|
581
|
-
$[48]
|
|
582
|
-
|
|
583
|
-
$[49] !== handleFocus || $[50] !== handleRootClick || $[51] !== id || $[52] !== labelId || $[53] !== onActivate || $[54] !== padding || $[55] !== position || $[56] !== ref || $[57] !== restProps || $[58] !== t11 || $[59] !== t8 || $[60] !== t9 || $[61] !== zOffset ? (t13 = /* @__PURE__ */ jsxs(Layer, { ...restProps, "aria-labelledby": labelId, "aria-modal": !0, className: t8, "data-animate": t9, "data-ui": "Dialog", display: "flex", id, onActivate, onClick: handleRootClick, onFocus: handleFocus, padding, position, ref, role: "dialog", zOffset, children: [
|
|
658
|
+
$[44] !== animate || $[45] !== handleFocus || $[46] !== handleRootClick || $[47] !== id || $[48] !== labelId || $[49] !== onActivate || $[50] !== padding || $[51] !== position || $[52] !== ref || $[53] !== restProps || $[54] !== t10 || $[55] !== zOffset ? (t12 = /* @__PURE__ */ jsxs(StyledDialog, { ...restProps, $animate: animate, $padding: padding, $position: position, "aria-labelledby": labelId, "aria-modal": !0, "data-ui": "Dialog", id, onActivate, onClick: handleRootClick, onFocus: handleFocus, ref, role: "dialog", zOffset, children: [
|
|
659
|
+
t9,
|
|
584
660
|
t10,
|
|
585
|
-
t11
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
return $[63] !== portalProp || $[64] !== t13 ? (t14 = /* @__PURE__ */ jsx(Portal, { __unstable_name: portalProp, children: t13 }), $[63] = portalProp, $[64] = t13, $[65] = t14) : t14 = $[65], t14;
|
|
661
|
+
t11
|
|
662
|
+
] }), $[44] = animate, $[45] = handleFocus, $[46] = handleRootClick, $[47] = id, $[48] = labelId, $[49] = onActivate, $[50] = padding, $[51] = position, $[52] = ref, $[53] = restProps, $[54] = t10, $[55] = zOffset, $[56] = t12) : t12 = $[56];
|
|
663
|
+
let t13;
|
|
664
|
+
return $[57] !== portalProp || $[58] !== t12 ? (t13 = /* @__PURE__ */ jsx(Portal, { __unstable_name: portalProp, children: t12 }), $[57] = portalProp, $[58] = t12, $[59] = t13) : t13 = $[59], t13;
|
|
590
665
|
});
|
|
591
666
|
Dialog.displayName = "ForwardRef(Dialog)";
|
|
592
667
|
function DialogProvider(props) {
|
|
@@ -607,7 +682,7 @@ function DialogProvider(props) {
|
|
|
607
682
|
}
|
|
608
683
|
DialogProvider.displayName = "DialogProvider";
|
|
609
684
|
const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
610
|
-
const $ = c(
|
|
685
|
+
const $ = c(62), {
|
|
611
686
|
__unstable_disableRestoreFocusOnClose: t0,
|
|
612
687
|
boundaryElement: deprecated_boundaryElement,
|
|
613
688
|
button: buttonProp,
|
|
@@ -706,33 +781,25 @@ const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
|
706
781
|
shouldFocus
|
|
707
782
|
}), $[28] = buttonElement, $[29] = handleBlur, $[30] = handleItemClick, $[31] = handleMenuClickOutside, $[32] = handleMenuEscape, $[33] = id, $[34] = menuProp, $[35] = shouldFocus, $[36] = t17) : t17 = $[36];
|
|
708
783
|
const menu = t17;
|
|
709
|
-
let t18;
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
onKeyDown: handleButtonKeyDown,
|
|
722
|
-
onMouseDown: handleMouseDown,
|
|
723
|
-
"aria-haspopup": !0,
|
|
724
|
-
"aria-expanded": open,
|
|
725
|
-
ref: setButtonElement,
|
|
726
|
-
selected: t192
|
|
727
|
-
}), $[37] = buttonProp, $[38] = handleMouseDown, $[39] = id, $[40] = open, $[41] = t192, $[42] = t202) : t202 = $[42], t18 = t202;
|
|
728
|
-
}
|
|
784
|
+
let t18, t19;
|
|
785
|
+
$[37] !== buttonProp || $[38] !== handleMouseDown || $[39] !== id || $[40] !== open ? (t19 = buttonProp && cloneElement(buttonProp, {
|
|
786
|
+
"data-ui": "MenuButton",
|
|
787
|
+
id,
|
|
788
|
+
onClick: handleButtonClick,
|
|
789
|
+
onKeyDown: handleButtonKeyDown,
|
|
790
|
+
onMouseDown: handleMouseDown,
|
|
791
|
+
"aria-haspopup": !0,
|
|
792
|
+
"aria-expanded": open,
|
|
793
|
+
ref: setButtonElement,
|
|
794
|
+
selected: buttonProp.props.selected ?? open
|
|
795
|
+
}), $[37] = buttonProp, $[38] = handleMouseDown, $[39] = id, $[40] = open, $[41] = t19) : t19 = $[41], t18 = t19;
|
|
729
796
|
const button = t18;
|
|
730
|
-
let
|
|
731
|
-
$[
|
|
732
|
-
let
|
|
733
|
-
$[
|
|
734
|
-
let
|
|
735
|
-
$[
|
|
797
|
+
let t20, t21;
|
|
798
|
+
$[42] !== buttonElement ? (t20 = () => buttonElement, t21 = [buttonElement], $[42] = buttonElement, $[43] = t20, $[44] = t21) : (t20 = $[43], t21 = $[44]), useImperativeHandle(forwardedRef, t20, t21);
|
|
799
|
+
let t22, t23;
|
|
800
|
+
$[45] !== popover ? (t23 = popover || {}, $[45] = popover, $[46] = t23) : t23 = $[46];
|
|
801
|
+
let t24;
|
|
802
|
+
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_popoverRadius || $[50] !== deprecated_popoverScheme || $[51] !== deprecated_portal || $[52] !== deprecated_preventOverflow || $[53] !== t23 ? (t24 = {
|
|
736
803
|
boundaryElement: deprecated_boundaryElement,
|
|
737
804
|
overflow: "auto",
|
|
738
805
|
placement: deprecated_placement,
|
|
@@ -740,31 +807,73 @@ const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
|
740
807
|
preventOverflow: deprecated_preventOverflow,
|
|
741
808
|
radius: deprecated_popoverRadius,
|
|
742
809
|
scheme: deprecated_popoverScheme,
|
|
743
|
-
...
|
|
744
|
-
}, $[
|
|
745
|
-
const popoverProps =
|
|
746
|
-
let t24;
|
|
747
|
-
$[56] !== button ? (t24 = button || /* @__PURE__ */ jsx(Fragment$1, {}), $[56] = button, $[57] = t24) : t24 = $[57];
|
|
810
|
+
...t23
|
|
811
|
+
}, $[47] = deprecated_boundaryElement, $[48] = deprecated_placement, $[49] = deprecated_popoverRadius, $[50] = deprecated_popoverScheme, $[51] = deprecated_portal, $[52] = deprecated_preventOverflow, $[53] = t23, $[54] = t24) : t24 = $[54], t22 = t24;
|
|
812
|
+
const popoverProps = t22;
|
|
748
813
|
let t25;
|
|
749
|
-
|
|
814
|
+
$[55] !== button ? (t25 = button || /* @__PURE__ */ jsx(Fragment$1, {}), $[55] = button, $[56] = t25) : t25 = $[56];
|
|
815
|
+
let t26;
|
|
816
|
+
return $[57] !== menu || $[58] !== open || $[59] !== popoverProps || $[60] !== t25 ? (t26 = /* @__PURE__ */ jsx(Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu, open, children: t25 }), $[57] = menu, $[58] = open, $[59] = popoverProps, $[60] = t25, $[61] = t26) : t26 = $[61], t26;
|
|
750
817
|
});
|
|
751
818
|
MenuButton.displayName = "ForwardRef(MenuButton)";
|
|
752
819
|
function _temp$2(v) {
|
|
753
820
|
return !v;
|
|
754
821
|
}
|
|
755
|
-
const
|
|
756
|
-
|
|
757
|
-
|
|
822
|
+
const keyframe = keyframes`
|
|
823
|
+
0% {
|
|
824
|
+
background-position: 100%;
|
|
825
|
+
}
|
|
826
|
+
100% {
|
|
827
|
+
background-position: -100%;
|
|
828
|
+
}
|
|
829
|
+
`, animation = css`
|
|
830
|
+
background-image: linear-gradient(
|
|
831
|
+
to right,
|
|
832
|
+
var(--card-skeleton-color-from),
|
|
833
|
+
var(--card-skeleton-color-to),
|
|
834
|
+
var(--card-skeleton-color-from),
|
|
835
|
+
var(--card-skeleton-color-from),
|
|
836
|
+
var(--card-skeleton-color-from)
|
|
837
|
+
);
|
|
838
|
+
background-position: 100%;
|
|
839
|
+
background-size: 200% 100%;
|
|
840
|
+
background-attachment: fixed;
|
|
841
|
+
animation-name: ${keyframe};
|
|
842
|
+
animation-timing-function: ease-in-out;
|
|
843
|
+
animation-iteration-count: infinite;
|
|
844
|
+
animation-duration: 2000ms;
|
|
845
|
+
`, skeletonStyle = css`
|
|
846
|
+
opacity: ${({
|
|
847
|
+
$visible
|
|
848
|
+
}) => $visible ? 1 : 0};
|
|
849
|
+
transition: opacity 200ms ease-in;
|
|
850
|
+
|
|
851
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
852
|
+
${({
|
|
853
|
+
$animated
|
|
854
|
+
}) => $animated ? animation : css`
|
|
855
|
+
background-color: var(--card-skeleton-color-from);
|
|
856
|
+
`}
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
|
860
|
+
background-color: var(--card-skeleton-color-from);
|
|
861
|
+
}
|
|
862
|
+
`, StyledSkeleton$1 = /* @__PURE__ */ styled(Box).withConfig({
|
|
863
|
+
displayName: "StyledSkeleton",
|
|
864
|
+
componentId: "sc-ebtpni-0"
|
|
865
|
+
})(responsiveRadiusStyle, skeletonStyle), Skeleton = forwardRef(function(props, ref) {
|
|
866
|
+
const $ = c(14);
|
|
867
|
+
let delay, radius, restProps, t0;
|
|
758
868
|
$[0] !== props ? ({
|
|
759
869
|
animated: t0,
|
|
760
|
-
className,
|
|
761
870
|
delay,
|
|
762
871
|
radius,
|
|
763
872
|
...restProps
|
|
764
|
-
} = props, $[0] = props, $[1] =
|
|
873
|
+
} = props, $[0] = props, $[1] = delay, $[2] = radius, $[3] = restProps, $[4] = t0) : (delay = $[1], radius = $[2], restProps = $[3], t0 = $[4]);
|
|
765
874
|
const animated = t0 === void 0 ? !1 : t0, [visible, setVisible] = useState(!delay);
|
|
766
875
|
let t1, t2;
|
|
767
|
-
$[
|
|
876
|
+
$[5] !== delay ? (t1 = () => {
|
|
768
877
|
if (!delay)
|
|
769
878
|
return setVisible(!0);
|
|
770
879
|
const timeout = setTimeout(() => {
|
|
@@ -773,82 +882,75 @@ const Skeleton = forwardRef(function(props, ref) {
|
|
|
773
882
|
return () => {
|
|
774
883
|
clearTimeout(timeout);
|
|
775
884
|
};
|
|
776
|
-
}, t2 = [delay], $[
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
})), $[9] = className, $[10] = radius, $[11] = t3) : t3 = $[11];
|
|
781
|
-
const t4 = animated ? "" : void 0, t5 = visible ? "" : void 0;
|
|
782
|
-
let t6;
|
|
783
|
-
return $[12] !== ref || $[13] !== restProps || $[14] !== t3 || $[15] !== t4 || $[16] !== t5 ? (t6 = /* @__PURE__ */ jsx(Box, { "data-ui": "Skeleton", ...restProps, className: t3, "data-animated": t4, "data-visible": t5, ref }), $[12] = ref, $[13] = restProps, $[14] = t3, $[15] = t4, $[16] = t5, $[17] = t6) : t6 = $[17], t6;
|
|
885
|
+
}, t2 = [delay], $[5] = delay, $[6] = t1, $[7] = t2) : (t1 = $[6], t2 = $[7]), useEffect(t1, t2);
|
|
886
|
+
const t3 = useArrayProp(radius);
|
|
887
|
+
let t4;
|
|
888
|
+
return $[8] !== animated || $[9] !== ref || $[10] !== restProps || $[11] !== t3 || $[12] !== visible ? (t4 = /* @__PURE__ */ jsx(StyledSkeleton$1, { ...restProps, $animated: animated, $radius: t3, $visible: visible, ref }), $[8] = animated, $[9] = ref, $[10] = restProps, $[11] = t3, $[12] = visible, $[13] = t4) : t4 = $[13], t4;
|
|
784
889
|
});
|
|
785
890
|
Skeleton.displayName = "ForwardRef(Skeleton)";
|
|
786
|
-
const
|
|
787
|
-
|
|
788
|
-
|
|
891
|
+
const StyledSkeleton = /* @__PURE__ */ styled(Skeleton).withConfig({
|
|
892
|
+
displayName: "StyledSkeleton",
|
|
893
|
+
componentId: "sc-2p7a1v-0"
|
|
894
|
+
})((props) => {
|
|
895
|
+
const {
|
|
896
|
+
$size,
|
|
897
|
+
$style
|
|
898
|
+
} = props, {
|
|
899
|
+
font,
|
|
900
|
+
media
|
|
901
|
+
} = getTheme_v2(props.theme), fontStyle = font[$style];
|
|
902
|
+
return _responsive(media, $size, (sizeIndex) => {
|
|
903
|
+
const fontSize = fontStyle.sizes[sizeIndex];
|
|
904
|
+
return {
|
|
905
|
+
height: fontSize.lineHeight - fontSize.ascenderHeight - fontSize.descenderHeight
|
|
906
|
+
};
|
|
907
|
+
});
|
|
908
|
+
}), TextSkeleton = forwardRef(function(props, ref) {
|
|
909
|
+
const $ = c(7);
|
|
910
|
+
let restProps, t0;
|
|
789
911
|
$[0] !== props ? ({
|
|
790
|
-
className,
|
|
791
912
|
size: t0,
|
|
792
913
|
...restProps
|
|
793
|
-
} = props, $[0] = props, $[1] =
|
|
794
|
-
const size = t0 === void 0 ? 2 : t0;
|
|
914
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
915
|
+
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
795
916
|
let t1;
|
|
796
|
-
$[4] !==
|
|
797
|
-
size
|
|
798
|
-
})), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
|
|
799
|
-
let t2;
|
|
800
|
-
return $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsx(Skeleton, { "data-ui": "TextSkeleton", ...restProps, className: t1, ref }), $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
|
|
917
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "text" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
801
918
|
});
|
|
802
919
|
TextSkeleton.displayName = "ForwardRef(TextSkeleton)";
|
|
803
920
|
const LabelSkeleton = forwardRef(function(props, ref) {
|
|
804
|
-
const $ = c(
|
|
805
|
-
let
|
|
921
|
+
const $ = c(7);
|
|
922
|
+
let restProps, t0;
|
|
806
923
|
$[0] !== props ? ({
|
|
807
|
-
className,
|
|
808
924
|
size: t0,
|
|
809
925
|
...restProps
|
|
810
|
-
} = props, $[0] = props, $[1] =
|
|
811
|
-
const size = t0 === void 0 ? 2 : t0;
|
|
926
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
927
|
+
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
812
928
|
let t1;
|
|
813
|
-
$[4] !==
|
|
814
|
-
size
|
|
815
|
-
})), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
|
|
816
|
-
let t2;
|
|
817
|
-
return $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsx(Skeleton, { "data-ui": "LabelSkeleton", ...restProps, className: t1, ref }), $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
|
|
929
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "label" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
818
930
|
});
|
|
819
931
|
LabelSkeleton.displayName = "ForwardRef(LabelSkeleton)";
|
|
820
932
|
const HeadingSkeleton = forwardRef(function(props, ref) {
|
|
821
|
-
const $ = c(
|
|
822
|
-
let
|
|
933
|
+
const $ = c(7);
|
|
934
|
+
let restProps, t0;
|
|
823
935
|
$[0] !== props ? ({
|
|
824
|
-
className,
|
|
825
936
|
size: t0,
|
|
826
937
|
...restProps
|
|
827
|
-
} = props, $[0] = props, $[1] =
|
|
828
|
-
const size = t0 === void 0 ? 2 : t0;
|
|
938
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
939
|
+
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
829
940
|
let t1;
|
|
830
|
-
$[4] !==
|
|
831
|
-
size
|
|
832
|
-
})), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
|
|
833
|
-
let t2;
|
|
834
|
-
return $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsx(Skeleton, { ...restProps, className: t1, ref }), $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
|
|
941
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "heading" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
835
942
|
});
|
|
836
943
|
HeadingSkeleton.displayName = "ForwardRef(HeadingSkeleton)";
|
|
837
944
|
const CodeSkeleton = forwardRef(function(props, ref) {
|
|
838
|
-
const $ = c(
|
|
839
|
-
let
|
|
945
|
+
const $ = c(7);
|
|
946
|
+
let restProps, t0;
|
|
840
947
|
$[0] !== props ? ({
|
|
841
|
-
className,
|
|
842
948
|
size: t0,
|
|
843
949
|
...restProps
|
|
844
|
-
} = props, $[0] = props, $[1] =
|
|
845
|
-
const size = t0 === void 0 ? 2 : t0;
|
|
950
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
951
|
+
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
846
952
|
let t1;
|
|
847
|
-
$[4] !==
|
|
848
|
-
size
|
|
849
|
-
})), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
|
|
850
|
-
let t2;
|
|
851
|
-
return $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsx(Skeleton, { ...restProps, className: t1, ref }), $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
|
|
953
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "code" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
852
954
|
});
|
|
853
955
|
CodeSkeleton.displayName = "ForwardRef(CodeSkeleton)";
|
|
854
956
|
const TabPanel = forwardRef(function(props, ref) {
|
|
@@ -863,12 +965,7 @@ const TabPanel = forwardRef(function(props, ref) {
|
|
|
863
965
|
return $[3] !== flex || $[4] !== props.children || $[5] !== ref || $[6] !== restProps || $[7] !== t0 ? (t1 = /* @__PURE__ */ jsx(Box, { "data-ui": "TabPanel", ...restProps, flex, ref, role: "tabpanel", tabIndex: t0, children: props.children }), $[3] = flex, $[4] = props.children, $[5] = ref, $[6] = restProps, $[7] = t0, $[8] = t1) : t1 = $[8], t1;
|
|
864
966
|
});
|
|
865
967
|
TabPanel.displayName = "ForwardRef(TabPanel)";
|
|
866
|
-
const
|
|
867
|
-
error: "alert",
|
|
868
|
-
warning: "alert",
|
|
869
|
-
success: "alert",
|
|
870
|
-
info: "alert"
|
|
871
|
-
}, STATUS_CARD_TONE = {
|
|
968
|
+
const LOADING_BAR_HEIGHT = 2, STATUS_CARD_TONE = {
|
|
872
969
|
error: "critical",
|
|
873
970
|
warning: "caution",
|
|
874
971
|
success: "positive",
|
|
@@ -878,9 +975,34 @@ const ROLES = {
|
|
|
878
975
|
warning: "caution",
|
|
879
976
|
success: "positive",
|
|
880
977
|
info: "neutral"
|
|
978
|
+
}, TextBox = styled(Flex).withConfig({
|
|
979
|
+
displayName: "TextBox",
|
|
980
|
+
componentId: "sc-1rr7rxo-0"
|
|
981
|
+
})`overflow-x:auto;`, StyledToast = styled(Card).withConfig({
|
|
982
|
+
displayName: "StyledToast",
|
|
983
|
+
componentId: "sc-1rr7rxo-1"
|
|
984
|
+
})`pointer-events:all;width:100%;position:relative;overflow:hidden;overflow:clip;&[data-has-duration]{padding-bottom:calc(${LOADING_BAR_HEIGHT}px / 2);}`, LoadingBar = styled.div.withConfig({
|
|
985
|
+
displayName: "LoadingBar",
|
|
986
|
+
componentId: "sc-1rr7rxo-2"
|
|
987
|
+
})`display:flex;position:absolute;bottom:0px;top:0px;left:0px;right:0px;pointer-events:none;z-index:-1;overflow:hidden;overflow:clip;background:transparent;align-items:flex-end;will-change:opacity;`, LoadingBarMask = styled(Card).withConfig({
|
|
988
|
+
displayName: "LoadingBarMask",
|
|
989
|
+
componentId: "sc-1rr7rxo-3"
|
|
990
|
+
})`position:absolute;top:0;left:-${LOADING_BAR_HEIGHT}px;right:-${LOADING_BAR_HEIGHT}px;bottom:${LOADING_BAR_HEIGHT}px;z-index:1;`, LoadingBarProgress = styled(Card).withConfig({
|
|
991
|
+
displayName: "LoadingBarProgress",
|
|
992
|
+
componentId: "sc-1rr7rxo-4"
|
|
993
|
+
})`display:block;height:100%;width:100%;transform-origin:0% 50%;background-color:${(props) => {
|
|
994
|
+
const {
|
|
995
|
+
color
|
|
996
|
+
} = getTheme_v2(props.theme);
|
|
997
|
+
return color.button.default[props.tone].enabled.bg;
|
|
998
|
+
}};`, ROLES = {
|
|
999
|
+
error: "alert",
|
|
1000
|
+
warning: "alert",
|
|
1001
|
+
success: "alert",
|
|
1002
|
+
info: "alert"
|
|
881
1003
|
}, LONG_ENOUGH_BUT_NOT_TOO_LONG = 1e3 * 60 * 60 * 24 * 24;
|
|
882
1004
|
function Toast(props) {
|
|
883
|
-
const $ = c(
|
|
1005
|
+
const $ = c(50);
|
|
884
1006
|
let closable, description, duration, onClose, restProps, status, t0, title, updatedAt;
|
|
885
1007
|
$[0] !== props ? ({
|
|
886
1008
|
closable,
|
|
@@ -911,32 +1033,29 @@ function Toast(props) {
|
|
|
911
1033
|
const animate = t3;
|
|
912
1034
|
let t4;
|
|
913
1035
|
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t4 = ["hidden", "slideOut"], $[14] = t4) : t4 = $[14];
|
|
914
|
-
const exit = t4;
|
|
915
|
-
let
|
|
916
|
-
$[15]
|
|
917
|
-
const t6 = hasDuration ? "" : void 0;
|
|
1036
|
+
const exit = t4, t5 = hasDuration ? "" : void 0;
|
|
1037
|
+
let t6;
|
|
1038
|
+
$[15] !== title ? (t6 = title && /* @__PURE__ */ jsx(Text, { size: 1, weight: "medium", children: title }), $[15] = title, $[16] = t6) : t6 = $[16];
|
|
918
1039
|
let t7;
|
|
919
|
-
$[
|
|
1040
|
+
$[17] !== description || $[18] !== transition ? (t7 = description && /* @__PURE__ */ jsx(MotionText, { muted: !0, size: 1, variants: content, transition, children: description }), $[17] = description, $[18] = transition, $[19] = t7) : t7 = $[19];
|
|
920
1041
|
let t8;
|
|
921
|
-
$[
|
|
1042
|
+
$[20] !== t6 || $[21] !== t7 ? (t8 = /* @__PURE__ */ jsx(TextBox, { flex: 1, padding: 3, children: /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
|
|
1043
|
+
t6,
|
|
1044
|
+
t7
|
|
1045
|
+
] }) }), $[20] = t6, $[21] = t7, $[22] = t8) : t8 = $[22];
|
|
922
1046
|
let t9;
|
|
923
|
-
$[
|
|
924
|
-
t7,
|
|
925
|
-
t8
|
|
926
|
-
] }) }), $[21] = t7, $[22] = t8, $[23] = t9) : t9 = $[23];
|
|
927
|
-
let t10;
|
|
928
|
-
$[24] !== buttonTone || $[25] !== closable || $[26] !== onClose ? (t10 = closable && /* @__PURE__ */ jsx(Box, { padding: 1, children: /* @__PURE__ */ jsx(Button, { as: "button", icon: CloseIcon, mode: "bleed", padding: 2, tone: buttonTone, onClick: onClose, style: {
|
|
1047
|
+
$[23] !== buttonTone || $[24] !== closable || $[25] !== onClose ? (t9 = closable && /* @__PURE__ */ jsx(Box, { padding: 1, children: /* @__PURE__ */ jsx(Button, { as: "button", icon: CloseIcon, mode: "bleed", padding: 2, tone: buttonTone, onClick: onClose, style: {
|
|
929
1048
|
verticalAlign: "top"
|
|
930
|
-
} }) }), $[
|
|
1049
|
+
} }) }), $[23] = buttonTone, $[24] = closable, $[25] = onClose, $[26] = t9) : t9 = $[26];
|
|
1050
|
+
let t10;
|
|
1051
|
+
$[27] !== t8 || $[28] !== t9 || $[29] !== transition ? (t10 = /* @__PURE__ */ jsxs(MotionFlex, { align: "flex-start", variants: content, transition, children: [
|
|
1052
|
+
t8,
|
|
1053
|
+
t9
|
|
1054
|
+
] }), $[27] = t8, $[28] = t9, $[29] = transition, $[30] = t10) : t10 = $[30];
|
|
931
1055
|
let t11;
|
|
932
|
-
$[
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
] }), $[28] = t10, $[29] = t9, $[30] = transition, $[31] = t11) : t11 = $[31];
|
|
936
|
-
let t12;
|
|
937
|
-
$[32] !== cardTone || $[33] !== duration || $[34] !== hasDuration || $[35] !== onClose || $[36] !== radius || $[37] !== transition || $[38] !== updatedAt || $[39] !== visualDuration ? (t12 = hasDuration && /* @__PURE__ */ jsxs(MotionBox, { className: toastLoadingBar(), variants: content, transition, children: [
|
|
938
|
-
/* @__PURE__ */ jsx(Card, { className: toastLoadingBarMask(), tone: cardTone, radius }),
|
|
939
|
-
/* @__PURE__ */ jsx(MotionCard, { className: toastLoadingBarProgress(), tone: cardTone, initial: {
|
|
1056
|
+
$[31] !== cardTone || $[32] !== duration || $[33] !== hasDuration || $[34] !== onClose || $[35] !== radius || $[36] !== transition || $[37] !== updatedAt || $[38] !== visualDuration ? (t11 = hasDuration && /* @__PURE__ */ jsxs(MotionLoadingBar, { variants: content, transition, children: [
|
|
1057
|
+
/* @__PURE__ */ jsx(LoadingBarMask, { tone: cardTone, radius }),
|
|
1058
|
+
/* @__PURE__ */ jsx(MotionLoadingBarProgress, { tone: cardTone, initial: {
|
|
940
1059
|
scaleX: 0
|
|
941
1060
|
}, animate: {
|
|
942
1061
|
scaleX: 1
|
|
@@ -945,12 +1064,12 @@ function Toast(props) {
|
|
|
945
1064
|
duration: duration / 1e3,
|
|
946
1065
|
ease: "linear"
|
|
947
1066
|
}, onAnimationComplete: onClose }, `progress-${updatedAt}`)
|
|
948
|
-
] }), $[
|
|
949
|
-
let
|
|
950
|
-
return $[
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
] }), $[
|
|
1067
|
+
] }), $[31] = cardTone, $[32] = duration, $[33] = hasDuration, $[34] = onClose, $[35] = radius, $[36] = transition, $[37] = updatedAt, $[38] = visualDuration, $[39] = t11) : t11 = $[39];
|
|
1068
|
+
let t12;
|
|
1069
|
+
return $[40] !== cardTone || $[41] !== radius || $[42] !== restProps || $[43] !== role || $[44] !== t10 || $[45] !== t11 || $[46] !== t5 || $[47] !== transition || $[48] !== visualDuration ? (t12 = /* @__PURE__ */ jsxs(MotionToast, { "data-ui": "Toast", role, ...restProps, "data-has-duration": t5, custom: visualDuration, radius, shadow: 2, tone: cardTone, forwardedAs: "li", layout: "position", variants: container, initial, animate, exit, transition, children: [
|
|
1070
|
+
t10,
|
|
1071
|
+
t11
|
|
1072
|
+
] }), $[40] = cardTone, $[41] = radius, $[42] = restProps, $[43] = role, $[44] = t10, $[45] = t11, $[46] = t5, $[47] = transition, $[48] = visualDuration, $[49] = t12) : t12 = $[49], t12;
|
|
954
1073
|
}
|
|
955
1074
|
Toast.displayName = "Toast";
|
|
956
1075
|
const container = {
|
|
@@ -990,7 +1109,7 @@ const container = {
|
|
|
990
1109
|
visible: {
|
|
991
1110
|
opacity: 1
|
|
992
1111
|
}
|
|
993
|
-
},
|
|
1112
|
+
}, MotionToast = motion.create(StyledToast), MotionFlex = motion.create(Flex), MotionText = motion.create(Text), MotionLoadingBar = motion.create(LoadingBar), MotionLoadingBarProgress = motion.create(LoadingBarProgress);
|
|
994
1113
|
function useMounted() {
|
|
995
1114
|
return useSyncExternalStore(subscribe, _temp$1, _temp2);
|
|
996
1115
|
}
|
|
@@ -1003,7 +1122,7 @@ function _temp$1() {
|
|
|
1003
1122
|
const subscribe = () => () => {
|
|
1004
1123
|
}, ToastContext = createGlobalScopedContext("@sanity/ui/context/toast", null);
|
|
1005
1124
|
function ToastLayer(props) {
|
|
1006
|
-
const $ = c(
|
|
1125
|
+
const $ = c(9), {
|
|
1007
1126
|
children,
|
|
1008
1127
|
padding: t0,
|
|
1009
1128
|
paddingX,
|
|
@@ -1013,15 +1132,17 @@ function ToastLayer(props) {
|
|
|
1013
1132
|
zIndex
|
|
1014
1133
|
} = useLayer();
|
|
1015
1134
|
let t2;
|
|
1016
|
-
$[0]
|
|
1017
|
-
let t3;
|
|
1018
|
-
$[1] !== zIndex ? (t3 = {
|
|
1135
|
+
$[0] !== zIndex ? (t2 = {
|
|
1019
1136
|
zIndex
|
|
1020
|
-
}, $[
|
|
1021
|
-
let
|
|
1022
|
-
return $[
|
|
1137
|
+
}, $[0] = zIndex, $[1] = t2) : t2 = $[1];
|
|
1138
|
+
let t3;
|
|
1139
|
+
return $[2] !== children || $[3] !== gap || $[4] !== padding || $[5] !== paddingX || $[6] !== paddingY || $[7] !== t2 ? (t3 = /* @__PURE__ */ jsx(StyledLayer, { forwardedAs: "ul", "data-ui": "ToastProvider", padding, paddingX, paddingY, gap, columns: 1, style: t2, children }), $[2] = children, $[3] = gap, $[4] = padding, $[5] = paddingX, $[6] = paddingY, $[7] = t2, $[8] = t3) : t3 = $[8], t3;
|
|
1023
1140
|
}
|
|
1024
1141
|
ToastLayer.displayName = "ToastLayer";
|
|
1142
|
+
const StyledLayer = styled(Grid).withConfig({
|
|
1143
|
+
displayName: "StyledLayer",
|
|
1144
|
+
componentId: "sc-1tbwn58-0"
|
|
1145
|
+
})`box-sizing:border-box;position:fixed;right:0;bottom:0;list-style:none;pointer-events:none;max-width:420px;width:100%;`;
|
|
1025
1146
|
let toastId = 0;
|
|
1026
1147
|
function generateToastId() {
|
|
1027
1148
|
return String(toastId++);
|
|
@@ -1046,7 +1167,7 @@ function ToastProvider(props) {
|
|
|
1046
1167
|
return startTransition(() => {
|
|
1047
1168
|
setState((prevState) => {
|
|
1048
1169
|
if (duration === 0.01)
|
|
1049
|
-
return prevState.filter((
|
|
1170
|
+
return prevState.filter((toast) => toast.id !== id);
|
|
1050
1171
|
const dismiss = () => startTransition(() => setState((currentState) => currentState.filter((toast_0) => toast_0.id !== id)));
|
|
1051
1172
|
return [...prevState.filter((toast_1) => toast_1.id !== id), {
|
|
1052
1173
|
dismiss,
|
|
@@ -1143,37 +1264,36 @@ function _focusItemElement(el) {
|
|
|
1143
1264
|
}
|
|
1144
1265
|
}
|
|
1145
1266
|
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null), Tree = memo(forwardRef(function(props, forwardedRef) {
|
|
1146
|
-
const $ = c(
|
|
1147
|
-
let children,
|
|
1267
|
+
const $ = c(37);
|
|
1268
|
+
let children, onFocus, restProps, t0;
|
|
1148
1269
|
$[0] !== props ? ({
|
|
1149
1270
|
children,
|
|
1150
|
-
gap,
|
|
1151
1271
|
space: t0,
|
|
1152
1272
|
onFocus,
|
|
1153
1273
|
...restProps
|
|
1154
|
-
} = props, $[0] = props, $[1] = children, $[2] =
|
|
1274
|
+
} = props, $[0] = props, $[1] = children, $[2] = onFocus, $[3] = restProps, $[4] = t0) : (children = $[1], onFocus = $[2], restProps = $[3], t0 = $[4]);
|
|
1155
1275
|
const space = t0 === void 0 ? 1 : t0, ref = useRef(null), [focusedElement, setFocusedElement] = useState(null), focusedElementRef = useRef(focusedElement);
|
|
1156
1276
|
let t1, t2;
|
|
1157
|
-
$[
|
|
1277
|
+
$[5] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[5] = t2) : t2 = $[5], t1 = t2;
|
|
1158
1278
|
const path = t1;
|
|
1159
1279
|
let t3;
|
|
1160
|
-
$[
|
|
1280
|
+
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t3 = [], $[6] = t3) : t3 = $[6];
|
|
1161
1281
|
const [itemElements, setItemElements] = useState(t3);
|
|
1162
1282
|
let t4;
|
|
1163
|
-
$[
|
|
1283
|
+
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = {}, $[7] = t4) : t4 = $[7];
|
|
1164
1284
|
const [state, setState] = useState(t4), stateRef = useRef(state);
|
|
1165
1285
|
let t5;
|
|
1166
|
-
$[
|
|
1286
|
+
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[8] = t5) : t5 = $[8], useImperativeHandle(forwardedRef, t5);
|
|
1167
1287
|
let t6, t7;
|
|
1168
|
-
$[
|
|
1288
|
+
$[9] !== focusedElement ? (t6 = () => {
|
|
1169
1289
|
focusedElementRef.current = focusedElement;
|
|
1170
|
-
}, t7 = [focusedElement], $[
|
|
1290
|
+
}, t7 = [focusedElement], $[9] = focusedElement, $[10] = t6, $[11] = t7) : (t6 = $[10], t7 = $[11]), useEffect(t6, t7);
|
|
1171
1291
|
let t8, t9;
|
|
1172
|
-
$[
|
|
1292
|
+
$[12] !== state ? (t8 = () => {
|
|
1173
1293
|
stateRef.current = state;
|
|
1174
|
-
}, t9 = [state], $[
|
|
1294
|
+
}, t9 = [state], $[12] = state, $[13] = t8, $[14] = t9) : (t8 = $[13], t9 = $[14]), useEffect(t8, t9);
|
|
1175
1295
|
let t10;
|
|
1176
|
-
$[
|
|
1296
|
+
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (element, path_0, expanded, selected) => (setState((s) => ({
|
|
1177
1297
|
...s,
|
|
1178
1298
|
[path_0]: {
|
|
1179
1299
|
element,
|
|
@@ -1186,10 +1306,10 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
1186
1306
|
};
|
|
1187
1307
|
return delete newState[path_0], newState;
|
|
1188
1308
|
});
|
|
1189
|
-
}), $[
|
|
1309
|
+
}), $[15] = t10) : t10 = $[15];
|
|
1190
1310
|
const registerItem = t10;
|
|
1191
1311
|
let t11;
|
|
1192
|
-
$[
|
|
1312
|
+
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t11 = (path_1, expanded_0) => {
|
|
1193
1313
|
setState((s_1) => {
|
|
1194
1314
|
const itemState = s_1[path_1];
|
|
1195
1315
|
return itemState ? {
|
|
@@ -1200,12 +1320,12 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
1200
1320
|
}
|
|
1201
1321
|
} : s_1;
|
|
1202
1322
|
});
|
|
1203
|
-
}, $[
|
|
1323
|
+
}, $[16] = t11) : t11 = $[16];
|
|
1204
1324
|
const setExpanded = t11;
|
|
1205
1325
|
let t12;
|
|
1206
1326
|
const t13 = focusedElement || itemElements[0] || null;
|
|
1207
1327
|
let t14;
|
|
1208
|
-
$[
|
|
1328
|
+
$[17] !== space || $[18] !== state || $[19] !== t13 ? (t14 = {
|
|
1209
1329
|
version: 0,
|
|
1210
1330
|
focusedElement: t13,
|
|
1211
1331
|
level: 0,
|
|
@@ -1215,10 +1335,10 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
1215
1335
|
setFocusedElement,
|
|
1216
1336
|
space,
|
|
1217
1337
|
state
|
|
1218
|
-
}, $[
|
|
1338
|
+
}, $[17] = space, $[18] = state, $[19] = t13, $[20] = t14) : t14 = $[20], t12 = t14;
|
|
1219
1339
|
const contextValue = t12;
|
|
1220
1340
|
let t15;
|
|
1221
|
-
$[
|
|
1341
|
+
$[21] !== itemElements ? (t15 = (event) => {
|
|
1222
1342
|
if (focusedElementRef.current) {
|
|
1223
1343
|
if (event.key === "ArrowDown") {
|
|
1224
1344
|
event.preventDefault();
|
|
@@ -1277,29 +1397,120 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
1277
1397
|
return;
|
|
1278
1398
|
}
|
|
1279
1399
|
}
|
|
1280
|
-
}, $[
|
|
1400
|
+
}, $[21] = itemElements, $[22] = t15) : t15 = $[22];
|
|
1281
1401
|
const handleKeyDown = t15;
|
|
1282
1402
|
let t16;
|
|
1283
|
-
$[
|
|
1403
|
+
$[23] !== onFocus ? (t16 = (event_0) => {
|
|
1284
1404
|
setFocusedElement(event_0.target), onFocus?.(event_0);
|
|
1285
|
-
}, $[
|
|
1405
|
+
}, $[23] = onFocus, $[24] = t16) : t16 = $[24];
|
|
1286
1406
|
const handleFocus = t16;
|
|
1287
1407
|
let t17;
|
|
1288
|
-
$[
|
|
1408
|
+
$[25] === Symbol.for("react.memo_cache_sentinel") ? (t17 = () => {
|
|
1289
1409
|
if (!ref.current)
|
|
1290
1410
|
return;
|
|
1291
1411
|
const _itemElements = Array.from(ref.current.querySelectorAll('[data-ui="TreeItem"]'));
|
|
1292
1412
|
setItemElements(_itemElements);
|
|
1293
|
-
}, $[
|
|
1413
|
+
}, $[25] = t17) : t17 = $[25];
|
|
1294
1414
|
let t18;
|
|
1295
|
-
$[
|
|
1296
|
-
|
|
1415
|
+
$[26] !== children ? (t18 = [children], $[26] = children, $[27] = t18) : t18 = $[27], useEffect(t17, t18);
|
|
1416
|
+
let t19;
|
|
1417
|
+
$[28] !== children || $[29] !== handleFocus || $[30] !== handleKeyDown || $[31] !== restProps || $[32] !== space ? (t19 = /* @__PURE__ */ jsx(Stack, { as: "ul", "data-ui": "Tree", ...restProps, onFocus: handleFocus, onKeyDown: handleKeyDown, ref, role: "tree", space, children }), $[28] = children, $[29] = handleFocus, $[30] = handleKeyDown, $[31] = restProps, $[32] = space, $[33] = t19) : t19 = $[33];
|
|
1297
1418
|
let t20;
|
|
1298
|
-
|
|
1299
|
-
let t21;
|
|
1300
|
-
return $[35] !== contextValue || $[36] !== t20 ? (t21 = /* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: t20 }), $[35] = contextValue, $[36] = t20, $[37] = t21) : t21 = $[37], t21;
|
|
1419
|
+
return $[34] !== contextValue || $[35] !== t19 ? (t20 = /* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: t19 }), $[34] = contextValue, $[35] = t19, $[36] = t20) : t20 = $[36], t20;
|
|
1301
1420
|
}));
|
|
1302
1421
|
Tree.displayName = "Memo(ForwardRef(Tree))";
|
|
1422
|
+
function treeItemRootStyle() {
|
|
1423
|
+
return css`
|
|
1424
|
+
&[role='none'] > [role='treeitem'] {
|
|
1425
|
+
outline: none;
|
|
1426
|
+
cursor: default;
|
|
1427
|
+
border-radius: 3px;
|
|
1428
|
+
|
|
1429
|
+
background-color: var(--card-bg-color);
|
|
1430
|
+
color: var(--treeitem-fg-color);
|
|
1431
|
+
|
|
1432
|
+
&:focus {
|
|
1433
|
+
position: relative;
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
&[role='treeitem'] {
|
|
1438
|
+
outline: none;
|
|
1439
|
+
|
|
1440
|
+
& > div {
|
|
1441
|
+
cursor: default;
|
|
1442
|
+
border-radius: 3px;
|
|
1443
|
+
|
|
1444
|
+
background-color: var(--card-bg-color);
|
|
1445
|
+
color: var(--treeitem-fg-color);
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
&:focus > div {
|
|
1449
|
+
position: relative;
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
`;
|
|
1453
|
+
}
|
|
1454
|
+
function treeItemRootColorStyle(props) {
|
|
1455
|
+
const $tone = "default", {
|
|
1456
|
+
color
|
|
1457
|
+
} = getTheme_v2(props.theme), tone = color.selectable[$tone];
|
|
1458
|
+
return css`
|
|
1459
|
+
&[role='none'] {
|
|
1460
|
+
& > [role='treeitem'] {
|
|
1461
|
+
${_cardColorStyle(color, tone.enabled)}
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
&[data-selected] > [role='treeitem'] {
|
|
1465
|
+
${_cardColorStyle(color, tone.pressed)}
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
@media (hover: hover) {
|
|
1469
|
+
&:not([data-selected]) > [role='treeitem']:not(:focus):hover {
|
|
1470
|
+
${_cardColorStyle(color, tone.hovered)}
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
& > [role='treeitem']:focus {
|
|
1474
|
+
${_cardColorStyle(color, tone.selected)}
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
&[role='treeitem'] {
|
|
1480
|
+
& > [data-ui='TreeItem__box'] {
|
|
1481
|
+
${_cardColorStyle(color, tone.enabled)}
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
&[data-selected] > [data-ui='TreeItem__box'] {
|
|
1485
|
+
${_cardColorStyle(color, tone.pressed)}
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
@media (hover: hover) {
|
|
1489
|
+
&:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover {
|
|
1490
|
+
${_cardColorStyle(color, tone.hovered)}
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
&:focus > [data-ui='TreeItem__box'] {
|
|
1494
|
+
${_cardColorStyle(color, tone.selected)}
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
`;
|
|
1499
|
+
}
|
|
1500
|
+
function treeItemBoxStyle(props) {
|
|
1501
|
+
const {
|
|
1502
|
+
$level
|
|
1503
|
+
} = props, {
|
|
1504
|
+
space
|
|
1505
|
+
} = getTheme_v2(props.theme);
|
|
1506
|
+
return css`
|
|
1507
|
+
padding-left: ${rem(space[2] * $level)};
|
|
1508
|
+
|
|
1509
|
+
&[data-as='a'] {
|
|
1510
|
+
text-decoration: none;
|
|
1511
|
+
}
|
|
1512
|
+
`;
|
|
1513
|
+
}
|
|
1303
1514
|
function useTree() {
|
|
1304
1515
|
const tree = useContext(TreeContext);
|
|
1305
1516
|
if (!tree)
|
|
@@ -1317,20 +1528,29 @@ const TreeGroup = memo(function(props) {
|
|
|
1317
1528
|
const expanded = t0 === void 0 ? !1 : t0, tree = useTree(), t1 = !expanded;
|
|
1318
1529
|
let t2;
|
|
1319
1530
|
return $[4] !== children || $[5] !== restProps || $[6] !== t1 || $[7] !== tree.space ? (t2 = /* @__PURE__ */ jsx(Stack, { as: "ul", "data-ui": "TreeGroup", ...restProps, hidden: t1, marginTop: tree.space, role: "group", space: tree.space, children }), $[4] = children, $[5] = restProps, $[6] = t1, $[7] = tree.space, $[8] = t2) : t2 = $[8], t2;
|
|
1320
|
-
}),
|
|
1531
|
+
}), StyledTreeItem = memo(styled.li.withConfig({
|
|
1532
|
+
displayName: "StyledTreeItem",
|
|
1533
|
+
componentId: "sc-iiskig-0"
|
|
1534
|
+
})(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = /* @__PURE__ */ styled(Box).attrs({
|
|
1535
|
+
forwardedAs: "a"
|
|
1536
|
+
}).withConfig({
|
|
1537
|
+
displayName: "TreeItemBox",
|
|
1538
|
+
componentId: "sc-iiskig-1"
|
|
1539
|
+
})(treeItemBoxStyle), ToggleArrowText = styled(Text).withConfig({
|
|
1540
|
+
displayName: "ToggleArrowText",
|
|
1541
|
+
componentId: "sc-iiskig-2"
|
|
1542
|
+
})`& > svg{transition:transform 100ms;}`, TreeItem = memo(function(props) {
|
|
1321
1543
|
const {
|
|
1322
1544
|
children,
|
|
1323
|
-
className,
|
|
1324
1545
|
expanded: expandedProp = !1,
|
|
1325
1546
|
fontSize = 1,
|
|
1326
1547
|
href,
|
|
1327
1548
|
icon: IconComponent,
|
|
1328
1549
|
id: idProp,
|
|
1329
|
-
linkAs
|
|
1550
|
+
linkAs,
|
|
1330
1551
|
muted,
|
|
1331
1552
|
onClick,
|
|
1332
1553
|
padding = 2,
|
|
1333
|
-
radius = 2,
|
|
1334
1554
|
selected = !1,
|
|
1335
1555
|
space = 2,
|
|
1336
1556
|
text,
|
|
@@ -1356,55 +1576,27 @@ const TreeGroup = memo(function(props) {
|
|
|
1356
1576
|
if (rootRef.current)
|
|
1357
1577
|
return registerItem(rootRef.current, itemPath.join("/"), expanded, selected);
|
|
1358
1578
|
}, [expanded, itemPath, registerItem, selected]);
|
|
1359
|
-
const content2 = /* @__PURE__ */ jsxs(Flex, {
|
|
1360
|
-
/* @__PURE__ */ jsxs(Box, { style: {
|
|
1579
|
+
const content2 = /* @__PURE__ */ jsxs(Flex, { padding, children: [
|
|
1580
|
+
/* @__PURE__ */ jsxs(Box, { marginRight: space, style: {
|
|
1361
1581
|
visibility: IconComponent || children ? "visible" : "hidden",
|
|
1362
1582
|
pointerEvents: "none"
|
|
1363
1583
|
}, children: [
|
|
1364
1584
|
IconComponent && /* @__PURE__ */ jsx(Text, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsx(IconComponent, {}) }),
|
|
1365
|
-
!IconComponent && /* @__PURE__ */ jsx(
|
|
1585
|
+
!IconComponent && /* @__PURE__ */ jsx(ToggleArrowText, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsx(ToggleArrowRightIcon, { style: {
|
|
1366
1586
|
transform: expanded ? "rotate(90deg)" : void 0
|
|
1367
1587
|
} }) })
|
|
1368
1588
|
] }),
|
|
1369
1589
|
/* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(Text, { muted, size: fontSize, textOverflow: "ellipsis", weight, children: text }) })
|
|
1370
1590
|
] });
|
|
1371
|
-
return href ? /* @__PURE__ */ jsxs(
|
|
1372
|
-
/* @__PURE__ */ jsx(
|
|
1373
|
-
paddingLeft: `calc(var(--space-2) * ${tree.level})`
|
|
1374
|
-
}, children: content2 }),
|
|
1591
|
+
return href ? /* @__PURE__ */ jsxs(StyledTreeItem, { "data-selected": selected ? "" : void 0, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...restProps, onClick: handleClick, ref: rootRef, role: "none", children: [
|
|
1592
|
+
/* @__PURE__ */ jsx(TreeItemBox, { $level: tree.level, "aria-expanded": expanded, as: linkAs, "data-ui": "TreeItem__box", href, ref: treeitemRef, role: "treeitem", tabIndex, children: content2 }),
|
|
1375
1593
|
/* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsx(TreeGroup, { hidden: !expanded, children }) })
|
|
1376
|
-
] }) : /* @__PURE__ */ jsxs(
|
|
1377
|
-
/* @__PURE__ */ jsx(
|
|
1378
|
-
paddingLeft: `calc(var(--space-2) * ${tree.level})`
|
|
1379
|
-
}, children: content2 }),
|
|
1594
|
+
] }) : /* @__PURE__ */ jsxs(StyledTreeItem, { "data-selected": selected ? "" : void 0, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...restProps, "aria-expanded": expanded, onClick: handleClick, onKeyDown: handleKeyDown, ref: rootRef, role: "treeitem", tabIndex, children: [
|
|
1595
|
+
/* @__PURE__ */ jsx(TreeItemBox, { $level: tree.level, as: "div", "data-ui": "TreeItem__box", children: content2 }),
|
|
1380
1596
|
/* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsx(TreeGroup, { expanded, children }) })
|
|
1381
1597
|
] });
|
|
1382
1598
|
});
|
|
1383
1599
|
TreeItem.displayName = "Memo(TreeItem)";
|
|
1384
|
-
function StyleTags(props) {
|
|
1385
|
-
const $ = c(10), {
|
|
1386
|
-
theme: themeProp
|
|
1387
|
-
} = props;
|
|
1388
|
-
let t0;
|
|
1389
|
-
$[0] !== themeProp ? (t0 = themeProp ?? buildTheme_v3(), $[0] = themeProp, $[1] = t0) : t0 = $[1];
|
|
1390
|
-
const theme = t0;
|
|
1391
|
-
let t1;
|
|
1392
|
-
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t1 = /* @__PURE__ */ jsx("style", { href: "sanity-palette", precedence: "palette", children: compilePalette() }), $[2] = t1) : t1 = $[2];
|
|
1393
|
-
let t2;
|
|
1394
|
-
$[3] !== theme ? (t2 = compileTheme({
|
|
1395
|
-
v3: theme
|
|
1396
|
-
}), $[3] = theme, $[4] = t2) : t2 = $[4];
|
|
1397
|
-
let t3;
|
|
1398
|
-
$[5] !== t2 ? (t3 = /* @__PURE__ */ jsx("style", { href: "sanity-theme", precedence: "theme", children: t2 }), $[5] = t2, $[6] = t3) : t3 = $[6];
|
|
1399
|
-
let t4;
|
|
1400
|
-
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = /* @__PURE__ */ jsx("style", { href: "sanity-system", precedence: "system", children: compileSystem() }), $[7] = t4) : t4 = $[7];
|
|
1401
|
-
let t5;
|
|
1402
|
-
return $[8] !== t3 ? (t5 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
1403
|
-
t1,
|
|
1404
|
-
t3,
|
|
1405
|
-
t4
|
|
1406
|
-
] }), $[8] = t3, $[9] = t5) : t5 = $[9], t5;
|
|
1407
|
-
}
|
|
1408
1600
|
export {
|
|
1409
1601
|
Arrow,
|
|
1410
1602
|
Autocomplete,
|
|
@@ -1417,7 +1609,6 @@ export {
|
|
|
1417
1609
|
Breadcrumbs,
|
|
1418
1610
|
Button,
|
|
1419
1611
|
Card,
|
|
1420
|
-
CardProvider,
|
|
1421
1612
|
Checkbox,
|
|
1422
1613
|
Code,
|
|
1423
1614
|
CodeSkeleton,
|
|
@@ -1453,7 +1644,6 @@ export {
|
|
|
1453
1644
|
Spinner,
|
|
1454
1645
|
SrOnly,
|
|
1455
1646
|
Stack,
|
|
1456
|
-
StyleTags,
|
|
1457
1647
|
Switch,
|
|
1458
1648
|
Tab,
|
|
1459
1649
|
TabList,
|
|
@@ -1474,7 +1664,9 @@ export {
|
|
|
1474
1664
|
VirtualList,
|
|
1475
1665
|
_ResizeObserver,
|
|
1476
1666
|
_elementSizeObserver,
|
|
1667
|
+
_fillCSSObject,
|
|
1477
1668
|
_getArrayProp,
|
|
1669
|
+
_getResponsiveSpace,
|
|
1478
1670
|
_hasFocus,
|
|
1479
1671
|
_isEnterToClickElement,
|
|
1480
1672
|
_isScrollable,
|
|
@@ -1497,8 +1689,12 @@ export {
|
|
|
1497
1689
|
isHTMLTextAreaElement,
|
|
1498
1690
|
multiply,
|
|
1499
1691
|
parseColor,
|
|
1500
|
-
px,
|
|
1501
1692
|
rem,
|
|
1693
|
+
responsiveCodeFontStyle,
|
|
1694
|
+
responsiveHeadingFont,
|
|
1695
|
+
responsiveLabelFont,
|
|
1696
|
+
responsiveTextAlignStyle,
|
|
1697
|
+
responsiveTextFont,
|
|
1502
1698
|
rgbToHex,
|
|
1503
1699
|
rgbToHsl,
|
|
1504
1700
|
rgba,
|
|
@@ -1506,7 +1702,6 @@ export {
|
|
|
1506
1702
|
studioTheme,
|
|
1507
1703
|
useArrayProp,
|
|
1508
1704
|
useBoundaryElement,
|
|
1509
|
-
useCard,
|
|
1510
1705
|
useClickOutside,
|
|
1511
1706
|
useClickOutsideEvent,
|
|
1512
1707
|
useCustomValidity,
|