@sanity/ui 3.0.0-static.8 → 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.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
3
|
-
var _visualEditing = require("./_chunks-cjs/_visual-editing.js"),
|
|
4
|
-
function _responsive(media, values, callback) {
|
|
5
|
-
return (values?.map(callback) || []).map((statement, mediaIndex) => mediaIndex === 0 ? statement : {
|
|
6
|
-
[`@media screen and (min-width: ${media[mediaIndex - 1]}px)`]: statement
|
|
7
|
-
});
|
|
8
|
-
}
|
|
3
|
+
var _visualEditing = require("./_chunks-cjs/_visual-editing.js"), jsxRuntime = require("react/jsx-runtime"), icons = require("@sanity/icons"), react = require("react"), styledComponents = require("styled-components"), reactCompilerRuntime = require("react-compiler-runtime"), theme = require("@sanity/ui/theme"), framerMotion = require("framer-motion");
|
|
9
4
|
function _raf(fn) {
|
|
10
5
|
const frameId = requestAnimationFrame(fn);
|
|
11
6
|
return () => {
|
|
@@ -133,6 +128,24 @@ class ErrorBoundary extends react.Component {
|
|
|
133
128
|
return this.props.children;
|
|
134
129
|
}
|
|
135
130
|
}
|
|
131
|
+
const StyledAutocomplete = styledComponents.styled.div.withConfig({
|
|
132
|
+
displayName: "StyledAutocomplete",
|
|
133
|
+
componentId: "sc-1igauft-0"
|
|
134
|
+
})`line-height:0;`, ListBox = styledComponents.styled(_visualEditing.Box).withConfig({
|
|
135
|
+
displayName: "ListBox",
|
|
136
|
+
componentId: "sc-1igauft-1"
|
|
137
|
+
})`& > ul{list-style:none;padding:0;margin:0;}`, rotate = styledComponents.keyframes`
|
|
138
|
+
from {
|
|
139
|
+
transform: rotate(0deg);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
to {
|
|
143
|
+
transform: rotate(360deg);
|
|
144
|
+
}
|
|
145
|
+
`, AnimatedSpinnerIcon = styledComponents.styled(icons.SpinnerIcon).withConfig({
|
|
146
|
+
displayName: "AnimatedSpinnerIcon",
|
|
147
|
+
componentId: "sc-1igauft-2"
|
|
148
|
+
})`animation:${rotate} 500ms linear infinite;`;
|
|
136
149
|
function AutocompleteOption(props) {
|
|
137
150
|
const $ = reactCompilerRuntime.c(11), {
|
|
138
151
|
children,
|
|
@@ -240,7 +253,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
240
253
|
value
|
|
241
254
|
} = state, defaultRenderOption = react.useCallback(({
|
|
242
255
|
value: value_0
|
|
243
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Card, { as: "button", padding: paddingProp, radius: 2, tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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 = react.useRef(null), resultsPopoverElementRef = react.useRef(null), inputElementRef = react.useRef(null), listBoxElementRef = react.useRef(null), listFocusedRef = react.useRef(!1), valueRef = react.useRef(value), valuePropRef = react.useRef(valueProp), popoverMouseWithinRef = react.useRef(!1);
|
|
256
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Card, { "data-as": "button", padding: paddingProp, radius: 2, tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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 = react.useRef(null), resultsPopoverElementRef = react.useRef(null), inputElementRef = react.useRef(null), listBoxElementRef = react.useRef(null), listFocusedRef = react.useRef(!1), valueRef = react.useRef(value), valuePropRef = react.useRef(valueProp), popoverMouseWithinRef = react.useRef(!1);
|
|
244
257
|
react.useImperativeHandle(forwardedRef, () => inputElementRef.current);
|
|
245
258
|
const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : _visualEditing.EMPTY_ARRAY, padding = _visualEditing.useArrayProp(paddingProp), currentOption = react.useMemo(() => value !== null ? options.find((o) => o.value === value) : void 0, [options, value]), filteredOptions = react.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 = react.useCallback((event) => {
|
|
246
259
|
setTimeout(() => {
|
|
@@ -368,9 +381,9 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
368
381
|
};
|
|
369
382
|
}, [disabled, handleClearButtonFocus, loading, value]), openButtonBoxPadding = react.useMemo(() => padding.map((v_0) => v_0 === 0 ? 0 : v_0 === 1 || v_0 === 2 ? 1 : v_0 - 2), [padding]), openButtonPadding = react.useMemo(() => padding.map((v_1) => Math.max(v_1 - 1, 0)), [padding]), openButtonProps = react.useMemo(() => typeof openButton == "object" ? openButton : _visualEditing.EMPTY_RECORD, [openButton]), handleOpenClick = react.useCallback((event_4) => {
|
|
370
383
|
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
|
|
371
|
-
}, [openButtonProps, dispatchOpen]), openButtonNode = react.useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Button, { "aria-label": "Open", disabled: expanded,
|
|
384
|
+
}, [openButtonProps, dispatchOpen]), openButtonNode = react.useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Button, { "aria-label": "Open", disabled: expanded, fontSize, icon: icons.ChevronDownIcon, mode: "bleed", padding: openButtonPadding, ...openButtonProps, onClick: handleOpenClick }) }) : void 0, [disabled, expanded, fontSize, handleOpenClick, openButton, openButtonBoxPadding, openButtonPadding, openButtonProps, readOnly]), inputValue = react.useMemo(() => query === null ? value !== null ? renderValue(value, currentOption) : "" : query, [currentOption, query, renderValue, value]), input = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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 = react.useCallback((event_5) => {
|
|
372
385
|
event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
|
|
373
|
-
}, [listFocused]), content2 = react.useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
386
|
+
}, [listFocused]), content2 = react.useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ListBox, { "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1, ...listBox, tabIndex: -1, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", id: listBoxId, ref: listBoxElementRef, role: "listbox", space: 1, children: filteredOptions.map((option_0) => {
|
|
374
387
|
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
375
388
|
return /* @__PURE__ */ jsxRuntime.jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: react.cloneElement(renderOption(option_0), {
|
|
376
389
|
disabled: loading,
|
|
@@ -383,46 +396,100 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
383
396
|
inputElement: inputElementRef.current,
|
|
384
397
|
onMouseEnter: handlePopoverMouseEnter,
|
|
385
398
|
onMouseLeave: handlePopoverMouseLeave
|
|
386
|
-
}, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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
|
|
387
|
-
return (
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
results
|
|
392
|
-
] })
|
|
393
|
-
);
|
|
399
|
+
}, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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]);
|
|
400
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(StyledAutocomplete, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
|
|
401
|
+
input,
|
|
402
|
+
results
|
|
403
|
+
] });
|
|
394
404
|
});
|
|
395
405
|
InnerAutocomplete.displayName = "ForwardRef(Autocomplete)";
|
|
396
|
-
const Autocomplete = InnerAutocomplete,
|
|
406
|
+
const Autocomplete = InnerAutocomplete, StyledBreadcrumbs = styledComponents.styled.ol.withConfig({
|
|
407
|
+
displayName: "StyledBreadcrumbs",
|
|
408
|
+
componentId: "sc-1es8h8q-0"
|
|
409
|
+
})`margin:0;padding:0;display:flex;list-style:none;align-items:center;white-space:nowrap;line-height:0;`, ExpandButton = styledComponents.styled(_visualEditing.Button).withConfig({
|
|
410
|
+
displayName: "ExpandButton",
|
|
411
|
+
componentId: "sc-1es8h8q-1"
|
|
412
|
+
})`appearance:none;margin:-4px;`, Breadcrumbs = react.forwardRef(function(props, ref) {
|
|
397
413
|
const {
|
|
398
414
|
children,
|
|
399
|
-
className,
|
|
400
|
-
expandButton: expandButtonProps,
|
|
401
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
402
|
-
gap: _gapProp,
|
|
403
|
-
gapX = props.gap ?? props.space ?? 2,
|
|
404
|
-
gapY = props.gap ?? props.space ?? 2,
|
|
405
415
|
maxLength,
|
|
406
416
|
separator,
|
|
407
|
-
|
|
408
|
-
space: _spaceProp,
|
|
417
|
+
space: spaceRaw = 2,
|
|
409
418
|
...restProps
|
|
410
|
-
} = props, [open, setOpen] = react.useState(!1), expandElementRef = react.useRef(null), popoverElementRef = react.useRef(null), collapse = react.useCallback(() => setOpen(!1), []), expand = react.useCallback(() => setOpen(!0), []);
|
|
419
|
+
} = props, space = _visualEditing.useArrayProp(spaceRaw), [open, setOpen] = react.useState(!1), expandElementRef = react.useRef(null), popoverElementRef = react.useRef(null), collapse = react.useCallback(() => setOpen(!1), []), expand = react.useCallback(() => setOpen(!0), []);
|
|
411
420
|
_visualEditing.useClickOutsideEvent(collapse, () => [expandElementRef.current, popoverElementRef.current]);
|
|
412
421
|
const rawItems = react.useMemo(() => react.Children.toArray(children).filter(react.isValidElement), [children]), items = react.useMemo(() => {
|
|
413
422
|
const len = rawItems.length;
|
|
414
423
|
if (maxLength && len > maxLength) {
|
|
415
424
|
const beforeLength = Math.ceil(maxLength / 2), afterLength = Math.floor(maxLength / 2);
|
|
416
|
-
return [...rawItems.slice(0, beforeLength - 1), /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Popover, { constrainSize: !0, content: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Stack, { as: "ol", overflow: "auto",
|
|
425
|
+
return [...rawItems.slice(0, beforeLength - 1), /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Popover, { constrainSize: !0, content: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Stack, { as: "ol", overflow: "auto", padding: space, space, children: rawItems.slice(beforeLength - 1, len - afterLength) }), open, placement: "top", portal: !0, ref: popoverElementRef, children: /* @__PURE__ */ jsxRuntime.jsx(ExpandButton, { fontSize: 1, mode: "bleed", onClick: open ? collapse : expand, padding: 1, ref: expandElementRef, selected: open, text: "\u2026" }) }, "button"), ...rawItems.slice(len - afterLength)];
|
|
417
426
|
}
|
|
418
427
|
return rawItems;
|
|
419
|
-
}, [collapse, expand,
|
|
420
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
421
|
-
itemIndex > 0 && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { "aria-hidden": !0, as: "li", children: separator || /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted: !0, children: "/" }) }),
|
|
428
|
+
}, [collapse, expand, maxLength, open, rawItems, space]);
|
|
429
|
+
return /* @__PURE__ */ jsxRuntime.jsx(StyledBreadcrumbs, { "data-ui": "Breadcrumbs", ...restProps, ref, children: items.map((item, itemIndex) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
|
|
430
|
+
itemIndex > 0 && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { "aria-hidden": !0, as: "li", paddingX: space, children: separator || /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted: !0, children: "/" }) }),
|
|
422
431
|
/* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { as: "li", children: item })
|
|
423
432
|
] }, itemIndex)) });
|
|
424
433
|
});
|
|
425
434
|
Breadcrumbs.displayName = "ForwardRef(Breadcrumbs)";
|
|
435
|
+
function dialogStyle({
|
|
436
|
+
theme: theme$1
|
|
437
|
+
}) {
|
|
438
|
+
const {
|
|
439
|
+
color
|
|
440
|
+
} = theme.getTheme_v2(theme$1);
|
|
441
|
+
return {
|
|
442
|
+
"&:not([hidden])": {
|
|
443
|
+
display: "flex"
|
|
444
|
+
},
|
|
445
|
+
top: 0,
|
|
446
|
+
left: 0,
|
|
447
|
+
right: 0,
|
|
448
|
+
bottom: 0,
|
|
449
|
+
alignItems: "center",
|
|
450
|
+
justifyContent: "center",
|
|
451
|
+
outline: "none",
|
|
452
|
+
background: color.backdrop
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
function responsiveDialogPositionStyle(props) {
|
|
456
|
+
const {
|
|
457
|
+
media
|
|
458
|
+
} = theme.getTheme_v2(props.theme);
|
|
459
|
+
return _visualEditing._responsive(media, props.$position, (position) => ({
|
|
460
|
+
"&&": {
|
|
461
|
+
position
|
|
462
|
+
}
|
|
463
|
+
}));
|
|
464
|
+
}
|
|
465
|
+
function animationDialogStyle(props) {
|
|
466
|
+
return props.$animate ? styledComponents.css`
|
|
467
|
+
@keyframes zoomIn {
|
|
468
|
+
from {
|
|
469
|
+
opacity: 0;
|
|
470
|
+
transform: scale(0.95);
|
|
471
|
+
}
|
|
472
|
+
to {
|
|
473
|
+
opacity: 1;
|
|
474
|
+
transform: scale(1);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
@keyframes fadeIn {
|
|
478
|
+
from {
|
|
479
|
+
opacity: 0;
|
|
480
|
+
}
|
|
481
|
+
to {
|
|
482
|
+
opacity: 1;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
animation: fadeIn 200ms ease-out;
|
|
487
|
+
// Animates the dialog card.
|
|
488
|
+
& > [data-ui='DialogCard'] {
|
|
489
|
+
animation: zoomIn 200ms ease-out;
|
|
490
|
+
}
|
|
491
|
+
` : styledComponents.css``;
|
|
492
|
+
}
|
|
426
493
|
const DialogContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context/dialog", {
|
|
427
494
|
version: 0
|
|
428
495
|
});
|
|
@@ -432,8 +499,29 @@ function useDialog() {
|
|
|
432
499
|
function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
433
500
|
return !boundaryElement || !portalElement ? !0 : _visualEditing.containsOrEqualsElement(boundaryElement, target) || _visualEditing.containsOrEqualsElement(portalElement, target);
|
|
434
501
|
}
|
|
435
|
-
const
|
|
436
|
-
|
|
502
|
+
const StyledDialog = /* @__PURE__ */ styledComponents.styled(_visualEditing.Layer).withConfig({
|
|
503
|
+
displayName: "StyledDialog",
|
|
504
|
+
componentId: "sc-4n4xb3-0"
|
|
505
|
+
})(_visualEditing.responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle, animationDialogStyle), DialogContainer = styledComponents.styled(_visualEditing.Container).withConfig({
|
|
506
|
+
displayName: "DialogContainer",
|
|
507
|
+
componentId: "sc-4n4xb3-1"
|
|
508
|
+
})`&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;`, DialogCardRoot = styledComponents.styled(_visualEditing.Card).withConfig({
|
|
509
|
+
displayName: "DialogCardRoot",
|
|
510
|
+
componentId: "sc-4n4xb3-2"
|
|
511
|
+
})`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`, DialogLayout = styledComponents.styled(_visualEditing.Flex).withConfig({
|
|
512
|
+
displayName: "DialogLayout",
|
|
513
|
+
componentId: "sc-4n4xb3-3"
|
|
514
|
+
})`flex:1;min-height:0;width:100%;`, DialogHeader = styledComponents.styled(_visualEditing.Box).withConfig({
|
|
515
|
+
displayName: "DialogHeader",
|
|
516
|
+
componentId: "sc-4n4xb3-4"
|
|
517
|
+
})`position:relative;z-index:2;`, DialogContent = styledComponents.styled(_visualEditing.Box).withConfig({
|
|
518
|
+
displayName: "DialogContent",
|
|
519
|
+
componentId: "sc-4n4xb3-5"
|
|
520
|
+
})`position:relative;z-index:1;overflow:auto;outline:none;`, DialogFooter = styledComponents.styled(_visualEditing.Box).withConfig({
|
|
521
|
+
displayName: "DialogFooter",
|
|
522
|
+
componentId: "sc-4n4xb3-6"
|
|
523
|
+
})`position:relative;z-index:3;`, DialogCard = react.forwardRef(function(props, forwardedRef) {
|
|
524
|
+
const $ = reactCompilerRuntime.c(38), {
|
|
437
525
|
__unstable_autoFocus: autoFocus,
|
|
438
526
|
__unstable_hideCloseButton: hideCloseButton,
|
|
439
527
|
children,
|
|
@@ -446,73 +534,65 @@ const DialogCard = react.forwardRef(function(props, forwardedRef) {
|
|
|
446
534
|
portal: portalProp,
|
|
447
535
|
radius: radiusProp,
|
|
448
536
|
scheme,
|
|
449
|
-
shadow:
|
|
450
|
-
tone,
|
|
537
|
+
shadow: shadowProp,
|
|
451
538
|
width: widthProp
|
|
452
|
-
} = props,
|
|
539
|
+
} = props, portal = _visualEditing.usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = _visualEditing.useBoundaryElement().element, radius = _visualEditing.useArrayProp(radiusProp), shadow = _visualEditing.useArrayProp(shadowProp), width = _visualEditing.useArrayProp(widthProp), ref = react.useRef(null), contentRef = react.useRef(null), layer = _visualEditing.useLayer(), {
|
|
453
540
|
isTopLayer
|
|
454
541
|
} = layer, labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton;
|
|
542
|
+
let t0;
|
|
543
|
+
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[0] = t0) : t0 = $[0], react.useImperativeHandle(forwardedRef, t0);
|
|
455
544
|
let t1;
|
|
456
|
-
$[
|
|
457
|
-
let t2;
|
|
458
|
-
$[
|
|
459
|
-
let t3, t4;
|
|
460
|
-
$[2] !== autoFocus ? (t3 = () => {
|
|
545
|
+
$[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => contentRef.current, $[1] = t1) : t1 = $[1], react.useImperativeHandle(forwardedContentRef, t1);
|
|
546
|
+
let t2, t3;
|
|
547
|
+
$[2] !== autoFocus ? (t2 = () => {
|
|
461
548
|
autoFocus && ref.current && focusFirstDescendant(ref.current);
|
|
462
|
-
},
|
|
463
|
-
let
|
|
464
|
-
$[5] !== boundaryElement || $[6] !== isTopLayer || $[7] !== onClose || $[8] !== portalElement ? (
|
|
549
|
+
}, t3 = [autoFocus, ref], $[2] = autoFocus, $[3] = t2, $[4] = t3) : (t2 = $[3], t3 = $[4]), react.useEffect(t2, t3);
|
|
550
|
+
let t4;
|
|
551
|
+
$[5] !== boundaryElement || $[6] !== isTopLayer || $[7] !== onClose || $[8] !== portalElement ? (t4 = (event) => {
|
|
465
552
|
if (!isTopLayer || !onClose)
|
|
466
553
|
return;
|
|
467
554
|
const target = document.activeElement;
|
|
468
555
|
target && !isTargetWithinScope(boundaryElement, portalElement, target) || event.key === "Escape" && (event.preventDefault(), event.stopPropagation(), onClose());
|
|
469
|
-
}, $[5] = boundaryElement, $[6] = isTopLayer, $[7] = onClose, $[8] = portalElement, $[9] =
|
|
470
|
-
let
|
|
471
|
-
$[10] !== boundaryElement || $[11] !== isTopLayer || $[12] !== onClickOutside || $[13] !== portalElement ? (
|
|
556
|
+
}, $[5] = boundaryElement, $[6] = isTopLayer, $[7] = onClose, $[8] = portalElement, $[9] = t4) : t4 = $[9], _visualEditing.useGlobalKeyDown(t4);
|
|
557
|
+
let t5;
|
|
558
|
+
$[10] !== boundaryElement || $[11] !== isTopLayer || $[12] !== onClickOutside || $[13] !== portalElement ? (t5 = isTopLayer && onClickOutside && ((event_0) => {
|
|
472
559
|
const target_0 = event_0.target;
|
|
473
560
|
target_0 && !isTargetWithinScope(boundaryElement, portalElement, target_0) || onClickOutside();
|
|
474
|
-
}), $[10] = boundaryElement, $[11] = isTopLayer, $[12] = onClickOutside, $[13] = portalElement, $[14] =
|
|
561
|
+
}), $[10] = boundaryElement, $[11] = isTopLayer, $[12] = onClickOutside, $[13] = portalElement, $[14] = t5) : t5 = $[14];
|
|
562
|
+
let t6;
|
|
563
|
+
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => [ref.current], $[15] = t6) : t6 = $[15], _visualEditing.useClickOutsideEvent(t5, t6);
|
|
475
564
|
let t7;
|
|
476
|
-
$[
|
|
565
|
+
$[16] !== header || $[17] !== labelId || $[18] !== onClose || $[19] !== showCloseButton || $[20] !== showHeader ? (t7 = showHeader && /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, { align: "flex-start", padding: 3, children: [
|
|
566
|
+
/* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: 1, padding: 2, children: header && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { id: labelId, size: 1, weight: "semibold", children: header }) }),
|
|
567
|
+
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Button, { "aria-label": "Close dialog", disabled: !onClose, icon: icons.CloseIcon, mode: "bleed", onClick: onClose, padding: 2 }) })
|
|
568
|
+
] }) }), $[16] = header, $[17] = labelId, $[18] = onClose, $[19] = showCloseButton, $[20] = showHeader, $[21] = t7) : t7 = $[21];
|
|
477
569
|
let t8;
|
|
478
|
-
$[
|
|
570
|
+
$[22] !== children ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { flex: 1, ref: contentRef, tabIndex: -1, children }), $[22] = children, $[23] = t8) : t8 = $[23];
|
|
479
571
|
let t9;
|
|
480
|
-
$[
|
|
572
|
+
$[24] !== footer ? (t9 = footer && /* @__PURE__ */ jsxRuntime.jsx(DialogFooter, { children: footer }), $[24] = footer, $[25] = t9) : t9 = $[25];
|
|
481
573
|
let t10;
|
|
482
|
-
$[
|
|
574
|
+
$[26] !== t7 || $[27] !== t8 || $[28] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsxs(DialogLayout, { direction: "column", children: [
|
|
575
|
+
t7,
|
|
576
|
+
t8,
|
|
577
|
+
t9
|
|
578
|
+
] }), $[26] = t7, $[27] = t8, $[28] = t9, $[29] = t10) : t10 = $[29];
|
|
483
579
|
let t11;
|
|
484
|
-
$[
|
|
485
|
-
/* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: 1, padding: 2, children: header && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { id: labelId, size: 1, weight: "semibold", children: header }) }),
|
|
486
|
-
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Button, { "aria-label": "Close dialog", disabled: !onClose, icon: icons.CloseIcon, mode: "bleed", onClick: onClose, padding: 2 }) })
|
|
487
|
-
] }) }), $[19] = header, $[20] = labelId, $[21] = onClose, $[22] = showCloseButton, $[23] = showHeader, $[24] = t11) : t11 = $[24];
|
|
580
|
+
$[30] !== radius || $[31] !== scheme || $[32] !== shadow || $[33] !== t10 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(DialogCardRoot, { radius, ref, scheme, shadow, children: t10 }), $[30] = radius, $[31] = scheme, $[32] = shadow, $[33] = t10, $[34] = t11) : t11 = $[34];
|
|
488
581
|
let t12;
|
|
489
|
-
$[
|
|
490
|
-
let t13;
|
|
491
|
-
$[26] !== children ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { className: t12, flex: 1, overflow: "auto", position: "relative", ref: contentRef, tabIndex: -1, children }), $[26] = children, $[27] = t13) : t13 = $[27];
|
|
492
|
-
let t14;
|
|
493
|
-
$[28] !== footer ? (t14 = footer && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { className: css.dialogFooter(), position: "relative", children: footer }), $[28] = footer, $[29] = t14) : t14 = $[29];
|
|
494
|
-
let t15;
|
|
495
|
-
$[30] !== t11 || $[31] !== t13 || $[32] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, { className: t10, direction: "column", flex: 1, children: [
|
|
496
|
-
t11,
|
|
497
|
-
t13,
|
|
498
|
-
t14
|
|
499
|
-
] }), $[30] = t11, $[31] = t13, $[32] = t14, $[33] = t15) : t15 = $[33];
|
|
500
|
-
let t16;
|
|
501
|
-
$[34] !== radius || $[35] !== scheme || $[36] !== shadow || $[37] !== t15 || $[38] !== tone ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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];
|
|
502
|
-
let t17;
|
|
503
|
-
return $[40] !== t16 || $[41] !== width ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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;
|
|
582
|
+
return $[35] !== t11 || $[36] !== width ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(DialogContainer, { "data-ui": "DialogCard", width, children: t11 }), $[35] = t11, $[36] = width, $[37] = t12) : t12 = $[37], t12;
|
|
504
583
|
});
|
|
505
584
|
DialogCard.displayName = "ForwardRef(DialogCard)";
|
|
506
585
|
const Dialog = react.forwardRef(function(props, ref) {
|
|
507
|
-
const $ = reactCompilerRuntime.c(
|
|
508
|
-
|
|
586
|
+
const $ = reactCompilerRuntime.c(60), dialog = useDialog(), {
|
|
587
|
+
layer
|
|
588
|
+
} = _visualEditing.useTheme_v2();
|
|
589
|
+
let _positionProp, _zOffsetProp, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, t6;
|
|
509
590
|
$[0] !== props ? ({
|
|
510
591
|
__unstable_autoFocus: t0,
|
|
511
592
|
__unstable_hideCloseButton: t1,
|
|
512
|
-
|
|
513
|
-
|
|
593
|
+
cardRadius: t2,
|
|
594
|
+
cardShadow: t3,
|
|
514
595
|
children,
|
|
515
|
-
className,
|
|
516
596
|
contentRef,
|
|
517
597
|
footer,
|
|
518
598
|
header,
|
|
@@ -525,15 +605,14 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
525
605
|
portal: portalProp,
|
|
526
606
|
position: _positionProp,
|
|
527
607
|
scheme,
|
|
528
|
-
shadow: cardShadow,
|
|
529
608
|
width: t5,
|
|
530
609
|
zOffset: _zOffsetProp,
|
|
531
|
-
|
|
610
|
+
animate: t6,
|
|
532
611
|
...restProps
|
|
533
|
-
} = props, $[0] = props, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] =
|
|
534
|
-
const autoFocus = t0 === void 0 ? !0 : t0, hideCloseButton = t1 === void 0 ? !1 : t1,
|
|
535
|
-
let
|
|
536
|
-
$[
|
|
612
|
+
} = 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]);
|
|
613
|
+
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 = _visualEditing.usePrefersReducedMotion() ? !1 : _animate, portal = _visualEditing.usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = _visualEditing.useBoundaryElement().element, cardRadius = _visualEditing.useArrayProp(cardRadiusProp), padding = _visualEditing.useArrayProp(paddingProp), position = _visualEditing.useArrayProp(positionProp), width = _visualEditing.useArrayProp(widthProp), zOffset = _visualEditing.useArrayProp(zOffsetProp), preDivRef = react.useRef(null), postDivRef = react.useRef(null), cardRef = react.useRef(null), focusedElementRef = react.useRef(null);
|
|
614
|
+
let t7;
|
|
615
|
+
$[22] !== onFocus ? (t7 = (event) => {
|
|
537
616
|
onFocus?.(event);
|
|
538
617
|
const target = event.target, cardElement = cardRef.current;
|
|
539
618
|
if (cardElement && target === preDivRef.current) {
|
|
@@ -545,10 +624,10 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
545
624
|
return;
|
|
546
625
|
}
|
|
547
626
|
_visualEditing.isHTMLElement(event.target) && (focusedElementRef.current = event.target);
|
|
548
|
-
}, $[
|
|
549
|
-
const handleFocus =
|
|
550
|
-
let
|
|
551
|
-
$[
|
|
627
|
+
}, $[22] = onFocus, $[23] = t7) : t7 = $[23];
|
|
628
|
+
const handleFocus = t7, labelId = `${id}_label`, rootClickTimeoutRef = react.useRef(void 0);
|
|
629
|
+
let t8;
|
|
630
|
+
$[24] !== boundaryElement || $[25] !== portalElement ? (t8 = () => {
|
|
552
631
|
rootClickTimeoutRef.current && clearTimeout(rootClickTimeoutRef.current), rootClickTimeoutRef.current = setTimeout(() => {
|
|
553
632
|
const activeElement = document.activeElement;
|
|
554
633
|
if (activeElement && !isTargetWithinScope(boundaryElement, portalElement, activeElement)) {
|
|
@@ -561,25 +640,22 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
561
640
|
target_0.focus();
|
|
562
641
|
}
|
|
563
642
|
}, 0);
|
|
564
|
-
}, $[
|
|
565
|
-
const handleRootClick =
|
|
566
|
-
let
|
|
567
|
-
$[
|
|
568
|
-
const t9 = animate ? "" : void 0;
|
|
643
|
+
}, $[24] = boundaryElement, $[25] = portalElement, $[26] = t8) : t8 = $[26];
|
|
644
|
+
const handleRootClick = t8;
|
|
645
|
+
let t9;
|
|
646
|
+
$[27] === Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: preDivRef, tabIndex: 0 }), $[27] = t9) : t9 = $[27];
|
|
569
647
|
let t10;
|
|
570
|
-
$[31]
|
|
648
|
+
$[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__ */ jsxRuntime.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];
|
|
571
649
|
let t11;
|
|
572
|
-
$[
|
|
650
|
+
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t11 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: postDivRef, tabIndex: 0 }), $[43] = t11) : t11 = $[43];
|
|
573
651
|
let t12;
|
|
574
|
-
$[48]
|
|
575
|
-
|
|
576
|
-
$[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__ */ jsxRuntime.jsxs(_visualEditing.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: [
|
|
652
|
+
$[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__ */ jsxRuntime.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: [
|
|
653
|
+
t9,
|
|
577
654
|
t10,
|
|
578
|
-
t11
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
return $[63] !== portalProp || $[64] !== t13 ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Portal, { __unstable_name: portalProp, children: t13 }), $[63] = portalProp, $[64] = t13, $[65] = t14) : t14 = $[65], t14;
|
|
655
|
+
t11
|
|
656
|
+
] }), $[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];
|
|
657
|
+
let t13;
|
|
658
|
+
return $[57] !== portalProp || $[58] !== t12 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Portal, { __unstable_name: portalProp, children: t12 }), $[57] = portalProp, $[58] = t12, $[59] = t13) : t13 = $[59], t13;
|
|
583
659
|
});
|
|
584
660
|
Dialog.displayName = "ForwardRef(Dialog)";
|
|
585
661
|
function DialogProvider(props) {
|
|
@@ -600,7 +676,7 @@ function DialogProvider(props) {
|
|
|
600
676
|
}
|
|
601
677
|
DialogProvider.displayName = "DialogProvider";
|
|
602
678
|
const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
603
|
-
const $ = reactCompilerRuntime.c(
|
|
679
|
+
const $ = reactCompilerRuntime.c(62), {
|
|
604
680
|
__unstable_disableRestoreFocusOnClose: t0,
|
|
605
681
|
boundaryElement: deprecated_boundaryElement,
|
|
606
682
|
button: buttonProp,
|
|
@@ -699,33 +775,25 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
699
775
|
shouldFocus
|
|
700
776
|
}), $[28] = buttonElement, $[29] = handleBlur, $[30] = handleItemClick, $[31] = handleMenuClickOutside, $[32] = handleMenuEscape, $[33] = id, $[34] = menuProp, $[35] = shouldFocus, $[36] = t17) : t17 = $[36];
|
|
701
777
|
const menu = t17;
|
|
702
|
-
let t18;
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
onKeyDown: handleButtonKeyDown,
|
|
715
|
-
onMouseDown: handleMouseDown,
|
|
716
|
-
"aria-haspopup": !0,
|
|
717
|
-
"aria-expanded": open,
|
|
718
|
-
ref: setButtonElement,
|
|
719
|
-
selected: t192
|
|
720
|
-
}), $[37] = buttonProp, $[38] = handleMouseDown, $[39] = id, $[40] = open, $[41] = t192, $[42] = t202) : t202 = $[42], t18 = t202;
|
|
721
|
-
}
|
|
778
|
+
let t18, t19;
|
|
779
|
+
$[37] !== buttonProp || $[38] !== handleMouseDown || $[39] !== id || $[40] !== open ? (t19 = buttonProp && react.cloneElement(buttonProp, {
|
|
780
|
+
"data-ui": "MenuButton",
|
|
781
|
+
id,
|
|
782
|
+
onClick: handleButtonClick,
|
|
783
|
+
onKeyDown: handleButtonKeyDown,
|
|
784
|
+
onMouseDown: handleMouseDown,
|
|
785
|
+
"aria-haspopup": !0,
|
|
786
|
+
"aria-expanded": open,
|
|
787
|
+
ref: setButtonElement,
|
|
788
|
+
selected: buttonProp.props.selected ?? open
|
|
789
|
+
}), $[37] = buttonProp, $[38] = handleMouseDown, $[39] = id, $[40] = open, $[41] = t19) : t19 = $[41], t18 = t19;
|
|
722
790
|
const button = t18;
|
|
723
|
-
let
|
|
724
|
-
$[
|
|
725
|
-
let
|
|
726
|
-
$[
|
|
727
|
-
let
|
|
728
|
-
$[
|
|
791
|
+
let t20, t21;
|
|
792
|
+
$[42] !== buttonElement ? (t20 = () => buttonElement, t21 = [buttonElement], $[42] = buttonElement, $[43] = t20, $[44] = t21) : (t20 = $[43], t21 = $[44]), react.useImperativeHandle(forwardedRef, t20, t21);
|
|
793
|
+
let t22, t23;
|
|
794
|
+
$[45] !== popover ? (t23 = popover || {}, $[45] = popover, $[46] = t23) : t23 = $[46];
|
|
795
|
+
let t24;
|
|
796
|
+
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_popoverRadius || $[50] !== deprecated_popoverScheme || $[51] !== deprecated_portal || $[52] !== deprecated_preventOverflow || $[53] !== t23 ? (t24 = {
|
|
729
797
|
boundaryElement: deprecated_boundaryElement,
|
|
730
798
|
overflow: "auto",
|
|
731
799
|
placement: deprecated_placement,
|
|
@@ -733,31 +801,73 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
733
801
|
preventOverflow: deprecated_preventOverflow,
|
|
734
802
|
radius: deprecated_popoverRadius,
|
|
735
803
|
scheme: deprecated_popoverScheme,
|
|
736
|
-
...
|
|
737
|
-
}, $[
|
|
738
|
-
const popoverProps =
|
|
739
|
-
let t24;
|
|
740
|
-
$[56] !== button ? (t24 = button || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[56] = button, $[57] = t24) : t24 = $[57];
|
|
804
|
+
...t23
|
|
805
|
+
}, $[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;
|
|
806
|
+
const popoverProps = t22;
|
|
741
807
|
let t25;
|
|
742
|
-
|
|
808
|
+
$[55] !== button ? (t25 = button || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[55] = button, $[56] = t25) : t25 = $[56];
|
|
809
|
+
let t26;
|
|
810
|
+
return $[57] !== menu || $[58] !== open || $[59] !== popoverProps || $[60] !== t25 ? (t26 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu, open, children: t25 }), $[57] = menu, $[58] = open, $[59] = popoverProps, $[60] = t25, $[61] = t26) : t26 = $[61], t26;
|
|
743
811
|
});
|
|
744
812
|
MenuButton.displayName = "ForwardRef(MenuButton)";
|
|
745
813
|
function _temp$2(v) {
|
|
746
814
|
return !v;
|
|
747
815
|
}
|
|
748
|
-
const
|
|
749
|
-
|
|
750
|
-
|
|
816
|
+
const keyframe = styledComponents.keyframes`
|
|
817
|
+
0% {
|
|
818
|
+
background-position: 100%;
|
|
819
|
+
}
|
|
820
|
+
100% {
|
|
821
|
+
background-position: -100%;
|
|
822
|
+
}
|
|
823
|
+
`, animation = styledComponents.css`
|
|
824
|
+
background-image: linear-gradient(
|
|
825
|
+
to right,
|
|
826
|
+
var(--card-skeleton-color-from),
|
|
827
|
+
var(--card-skeleton-color-to),
|
|
828
|
+
var(--card-skeleton-color-from),
|
|
829
|
+
var(--card-skeleton-color-from),
|
|
830
|
+
var(--card-skeleton-color-from)
|
|
831
|
+
);
|
|
832
|
+
background-position: 100%;
|
|
833
|
+
background-size: 200% 100%;
|
|
834
|
+
background-attachment: fixed;
|
|
835
|
+
animation-name: ${keyframe};
|
|
836
|
+
animation-timing-function: ease-in-out;
|
|
837
|
+
animation-iteration-count: infinite;
|
|
838
|
+
animation-duration: 2000ms;
|
|
839
|
+
`, skeletonStyle = styledComponents.css`
|
|
840
|
+
opacity: ${({
|
|
841
|
+
$visible
|
|
842
|
+
}) => $visible ? 1 : 0};
|
|
843
|
+
transition: opacity 200ms ease-in;
|
|
844
|
+
|
|
845
|
+
@media screen and (prefers-reduced-motion: no-preference) {
|
|
846
|
+
${({
|
|
847
|
+
$animated
|
|
848
|
+
}) => $animated ? animation : styledComponents.css`
|
|
849
|
+
background-color: var(--card-skeleton-color-from);
|
|
850
|
+
`}
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
@media screen and (prefers-reduced-motion: reduce) {
|
|
854
|
+
background-color: var(--card-skeleton-color-from);
|
|
855
|
+
}
|
|
856
|
+
`, StyledSkeleton$1 = /* @__PURE__ */ styledComponents.styled(_visualEditing.Box).withConfig({
|
|
857
|
+
displayName: "StyledSkeleton",
|
|
858
|
+
componentId: "sc-ebtpni-0"
|
|
859
|
+
})(_visualEditing.responsiveRadiusStyle, skeletonStyle), Skeleton = react.forwardRef(function(props, ref) {
|
|
860
|
+
const $ = reactCompilerRuntime.c(14);
|
|
861
|
+
let delay, radius, restProps, t0;
|
|
751
862
|
$[0] !== props ? ({
|
|
752
863
|
animated: t0,
|
|
753
|
-
className,
|
|
754
864
|
delay,
|
|
755
865
|
radius,
|
|
756
866
|
...restProps
|
|
757
|
-
} = props, $[0] = props, $[1] =
|
|
867
|
+
} = props, $[0] = props, $[1] = delay, $[2] = radius, $[3] = restProps, $[4] = t0) : (delay = $[1], radius = $[2], restProps = $[3], t0 = $[4]);
|
|
758
868
|
const animated = t0 === void 0 ? !1 : t0, [visible, setVisible] = react.useState(!delay);
|
|
759
869
|
let t1, t2;
|
|
760
|
-
$[
|
|
870
|
+
$[5] !== delay ? (t1 = () => {
|
|
761
871
|
if (!delay)
|
|
762
872
|
return setVisible(!0);
|
|
763
873
|
const timeout = setTimeout(() => {
|
|
@@ -766,82 +876,75 @@ const Skeleton = react.forwardRef(function(props, ref) {
|
|
|
766
876
|
return () => {
|
|
767
877
|
clearTimeout(timeout);
|
|
768
878
|
};
|
|
769
|
-
}, t2 = [delay], $[
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
})), $[9] = className, $[10] = radius, $[11] = t3) : t3 = $[11];
|
|
774
|
-
const t4 = animated ? "" : void 0, t5 = visible ? "" : void 0;
|
|
775
|
-
let t6;
|
|
776
|
-
return $[12] !== ref || $[13] !== restProps || $[14] !== t3 || $[15] !== t4 || $[16] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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;
|
|
879
|
+
}, t2 = [delay], $[5] = delay, $[6] = t1, $[7] = t2) : (t1 = $[6], t2 = $[7]), react.useEffect(t1, t2);
|
|
880
|
+
const t3 = _visualEditing.useArrayProp(radius);
|
|
881
|
+
let t4;
|
|
882
|
+
return $[8] !== animated || $[9] !== ref || $[10] !== restProps || $[11] !== t3 || $[12] !== visible ? (t4 = /* @__PURE__ */ jsxRuntime.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;
|
|
777
883
|
});
|
|
778
884
|
Skeleton.displayName = "ForwardRef(Skeleton)";
|
|
779
|
-
const
|
|
780
|
-
|
|
781
|
-
|
|
885
|
+
const StyledSkeleton = /* @__PURE__ */ styledComponents.styled(Skeleton).withConfig({
|
|
886
|
+
displayName: "StyledSkeleton",
|
|
887
|
+
componentId: "sc-2p7a1v-0"
|
|
888
|
+
})((props) => {
|
|
889
|
+
const {
|
|
890
|
+
$size,
|
|
891
|
+
$style
|
|
892
|
+
} = props, {
|
|
893
|
+
font,
|
|
894
|
+
media
|
|
895
|
+
} = theme.getTheme_v2(props.theme), fontStyle = font[$style];
|
|
896
|
+
return _visualEditing._responsive(media, $size, (sizeIndex) => {
|
|
897
|
+
const fontSize = fontStyle.sizes[sizeIndex];
|
|
898
|
+
return {
|
|
899
|
+
height: fontSize.lineHeight - fontSize.ascenderHeight - fontSize.descenderHeight
|
|
900
|
+
};
|
|
901
|
+
});
|
|
902
|
+
}), TextSkeleton = react.forwardRef(function(props, ref) {
|
|
903
|
+
const $ = reactCompilerRuntime.c(7);
|
|
904
|
+
let restProps, t0;
|
|
782
905
|
$[0] !== props ? ({
|
|
783
|
-
className,
|
|
784
906
|
size: t0,
|
|
785
907
|
...restProps
|
|
786
|
-
} = props, $[0] = props, $[1] =
|
|
787
|
-
const size = t0 === void 0 ? 2 : t0;
|
|
908
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
909
|
+
const $size = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0);
|
|
788
910
|
let t1;
|
|
789
|
-
$[4] !==
|
|
790
|
-
size
|
|
791
|
-
})), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
|
|
792
|
-
let t2;
|
|
793
|
-
return $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { "data-ui": "TextSkeleton", ...restProps, className: t1, ref }), $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
|
|
911
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "text" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
794
912
|
});
|
|
795
913
|
TextSkeleton.displayName = "ForwardRef(TextSkeleton)";
|
|
796
914
|
const LabelSkeleton = react.forwardRef(function(props, ref) {
|
|
797
|
-
const $ = reactCompilerRuntime.c(
|
|
798
|
-
let
|
|
915
|
+
const $ = reactCompilerRuntime.c(7);
|
|
916
|
+
let restProps, t0;
|
|
799
917
|
$[0] !== props ? ({
|
|
800
|
-
className,
|
|
801
918
|
size: t0,
|
|
802
919
|
...restProps
|
|
803
|
-
} = props, $[0] = props, $[1] =
|
|
804
|
-
const size = t0 === void 0 ? 2 : t0;
|
|
920
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
921
|
+
const $size = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0);
|
|
805
922
|
let t1;
|
|
806
|
-
$[4] !==
|
|
807
|
-
size
|
|
808
|
-
})), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
|
|
809
|
-
let t2;
|
|
810
|
-
return $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { "data-ui": "LabelSkeleton", ...restProps, className: t1, ref }), $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
|
|
923
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "label" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
811
924
|
});
|
|
812
925
|
LabelSkeleton.displayName = "ForwardRef(LabelSkeleton)";
|
|
813
926
|
const HeadingSkeleton = react.forwardRef(function(props, ref) {
|
|
814
|
-
const $ = reactCompilerRuntime.c(
|
|
815
|
-
let
|
|
927
|
+
const $ = reactCompilerRuntime.c(7);
|
|
928
|
+
let restProps, t0;
|
|
816
929
|
$[0] !== props ? ({
|
|
817
|
-
className,
|
|
818
930
|
size: t0,
|
|
819
931
|
...restProps
|
|
820
|
-
} = props, $[0] = props, $[1] =
|
|
821
|
-
const size = t0 === void 0 ? 2 : t0;
|
|
932
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
933
|
+
const $size = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0);
|
|
822
934
|
let t1;
|
|
823
|
-
$[4] !==
|
|
824
|
-
size
|
|
825
|
-
})), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
|
|
826
|
-
let t2;
|
|
827
|
-
return $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { ...restProps, className: t1, ref }), $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
|
|
935
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "heading" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
828
936
|
});
|
|
829
937
|
HeadingSkeleton.displayName = "ForwardRef(HeadingSkeleton)";
|
|
830
938
|
const CodeSkeleton = react.forwardRef(function(props, ref) {
|
|
831
|
-
const $ = reactCompilerRuntime.c(
|
|
832
|
-
let
|
|
939
|
+
const $ = reactCompilerRuntime.c(7);
|
|
940
|
+
let restProps, t0;
|
|
833
941
|
$[0] !== props ? ({
|
|
834
|
-
className,
|
|
835
942
|
size: t0,
|
|
836
943
|
...restProps
|
|
837
|
-
} = props, $[0] = props, $[1] =
|
|
838
|
-
const size = t0 === void 0 ? 2 : t0;
|
|
944
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
945
|
+
const $size = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0);
|
|
839
946
|
let t1;
|
|
840
|
-
$[4] !==
|
|
841
|
-
size
|
|
842
|
-
})), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
|
|
843
|
-
let t2;
|
|
844
|
-
return $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { ...restProps, className: t1, ref }), $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
|
|
947
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "code" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
845
948
|
});
|
|
846
949
|
CodeSkeleton.displayName = "ForwardRef(CodeSkeleton)";
|
|
847
950
|
const TabPanel = react.forwardRef(function(props, ref) {
|
|
@@ -856,12 +959,7 @@ const TabPanel = react.forwardRef(function(props, ref) {
|
|
|
856
959
|
return $[3] !== flex || $[4] !== props.children || $[5] !== ref || $[6] !== restProps || $[7] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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;
|
|
857
960
|
});
|
|
858
961
|
TabPanel.displayName = "ForwardRef(TabPanel)";
|
|
859
|
-
const
|
|
860
|
-
error: "alert",
|
|
861
|
-
warning: "alert",
|
|
862
|
-
success: "alert",
|
|
863
|
-
info: "alert"
|
|
864
|
-
}, STATUS_CARD_TONE = {
|
|
962
|
+
const LOADING_BAR_HEIGHT = 2, STATUS_CARD_TONE = {
|
|
865
963
|
error: "critical",
|
|
866
964
|
warning: "caution",
|
|
867
965
|
success: "positive",
|
|
@@ -871,9 +969,34 @@ const ROLES = {
|
|
|
871
969
|
warning: "caution",
|
|
872
970
|
success: "positive",
|
|
873
971
|
info: "neutral"
|
|
972
|
+
}, TextBox = styledComponents.styled(_visualEditing.Flex).withConfig({
|
|
973
|
+
displayName: "TextBox",
|
|
974
|
+
componentId: "sc-1rr7rxo-0"
|
|
975
|
+
})`overflow-x:auto;`, StyledToast = styledComponents.styled(_visualEditing.Card).withConfig({
|
|
976
|
+
displayName: "StyledToast",
|
|
977
|
+
componentId: "sc-1rr7rxo-1"
|
|
978
|
+
})`pointer-events:all;width:100%;position:relative;overflow:hidden;overflow:clip;&[data-has-duration]{padding-bottom:calc(${LOADING_BAR_HEIGHT}px / 2);}`, LoadingBar = styledComponents.styled.div.withConfig({
|
|
979
|
+
displayName: "LoadingBar",
|
|
980
|
+
componentId: "sc-1rr7rxo-2"
|
|
981
|
+
})`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 = styledComponents.styled(_visualEditing.Card).withConfig({
|
|
982
|
+
displayName: "LoadingBarMask",
|
|
983
|
+
componentId: "sc-1rr7rxo-3"
|
|
984
|
+
})`position:absolute;top:0;left:-${LOADING_BAR_HEIGHT}px;right:-${LOADING_BAR_HEIGHT}px;bottom:${LOADING_BAR_HEIGHT}px;z-index:1;`, LoadingBarProgress = styledComponents.styled(_visualEditing.Card).withConfig({
|
|
985
|
+
displayName: "LoadingBarProgress",
|
|
986
|
+
componentId: "sc-1rr7rxo-4"
|
|
987
|
+
})`display:block;height:100%;width:100%;transform-origin:0% 50%;background-color:${(props) => {
|
|
988
|
+
const {
|
|
989
|
+
color
|
|
990
|
+
} = theme.getTheme_v2(props.theme);
|
|
991
|
+
return color.button.default[props.tone].enabled.bg;
|
|
992
|
+
}};`, ROLES = {
|
|
993
|
+
error: "alert",
|
|
994
|
+
warning: "alert",
|
|
995
|
+
success: "alert",
|
|
996
|
+
info: "alert"
|
|
874
997
|
}, LONG_ENOUGH_BUT_NOT_TOO_LONG = 1e3 * 60 * 60 * 24 * 24;
|
|
875
998
|
function Toast(props) {
|
|
876
|
-
const $ = reactCompilerRuntime.c(
|
|
999
|
+
const $ = reactCompilerRuntime.c(50);
|
|
877
1000
|
let closable, description, duration, onClose, restProps, status, t0, title, updatedAt;
|
|
878
1001
|
$[0] !== props ? ({
|
|
879
1002
|
closable,
|
|
@@ -904,32 +1027,29 @@ function Toast(props) {
|
|
|
904
1027
|
const animate = t3;
|
|
905
1028
|
let t4;
|
|
906
1029
|
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t4 = ["hidden", "slideOut"], $[14] = t4) : t4 = $[14];
|
|
907
|
-
const exit = t4;
|
|
908
|
-
let
|
|
909
|
-
$[15]
|
|
910
|
-
const t6 = hasDuration ? "" : void 0;
|
|
1030
|
+
const exit = t4, t5 = hasDuration ? "" : void 0;
|
|
1031
|
+
let t6;
|
|
1032
|
+
$[15] !== title ? (t6 = title && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { size: 1, weight: "medium", children: title }), $[15] = title, $[16] = t6) : t6 = $[16];
|
|
911
1033
|
let t7;
|
|
912
|
-
$[
|
|
1034
|
+
$[17] !== description || $[18] !== transition ? (t7 = description && /* @__PURE__ */ jsxRuntime.jsx(MotionText, { muted: !0, size: 1, variants: content, transition, children: description }), $[17] = description, $[18] = transition, $[19] = t7) : t7 = $[19];
|
|
913
1035
|
let t8;
|
|
914
|
-
$[
|
|
1036
|
+
$[20] !== t6 || $[21] !== t7 ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(TextBox, { flex: 1, padding: 3, children: /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Stack, { space: 3, children: [
|
|
1037
|
+
t6,
|
|
1038
|
+
t7
|
|
1039
|
+
] }) }), $[20] = t6, $[21] = t7, $[22] = t8) : t8 = $[22];
|
|
915
1040
|
let t9;
|
|
916
|
-
$[
|
|
917
|
-
t7,
|
|
918
|
-
t8
|
|
919
|
-
] }) }), $[21] = t7, $[22] = t8, $[23] = t9) : t9 = $[23];
|
|
920
|
-
let t10;
|
|
921
|
-
$[24] !== buttonTone || $[25] !== closable || $[26] !== onClose ? (t10 = closable && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { padding: 1, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Button, { as: "button", icon: icons.CloseIcon, mode: "bleed", padding: 2, tone: buttonTone, onClick: onClose, style: {
|
|
1041
|
+
$[23] !== buttonTone || $[24] !== closable || $[25] !== onClose ? (t9 = closable && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { padding: 1, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Button, { as: "button", icon: icons.CloseIcon, mode: "bleed", padding: 2, tone: buttonTone, onClick: onClose, style: {
|
|
922
1042
|
verticalAlign: "top"
|
|
923
|
-
} }) }), $[
|
|
1043
|
+
} }) }), $[23] = buttonTone, $[24] = closable, $[25] = onClose, $[26] = t9) : t9 = $[26];
|
|
1044
|
+
let t10;
|
|
1045
|
+
$[27] !== t8 || $[28] !== t9 || $[29] !== transition ? (t10 = /* @__PURE__ */ jsxRuntime.jsxs(MotionFlex, { align: "flex-start", variants: content, transition, children: [
|
|
1046
|
+
t8,
|
|
1047
|
+
t9
|
|
1048
|
+
] }), $[27] = t8, $[28] = t9, $[29] = transition, $[30] = t10) : t10 = $[30];
|
|
924
1049
|
let t11;
|
|
925
|
-
$[
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
] }), $[28] = t10, $[29] = t9, $[30] = transition, $[31] = t11) : t11 = $[31];
|
|
929
|
-
let t12;
|
|
930
|
-
$[32] !== cardTone || $[33] !== duration || $[34] !== hasDuration || $[35] !== onClose || $[36] !== radius || $[37] !== transition || $[38] !== updatedAt || $[39] !== visualDuration ? (t12 = hasDuration && /* @__PURE__ */ jsxRuntime.jsxs(MotionBox, { className: css.toastLoadingBar(), variants: content, transition, children: [
|
|
931
|
-
/* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Card, { className: css.toastLoadingBarMask(), tone: cardTone, radius }),
|
|
932
|
-
/* @__PURE__ */ jsxRuntime.jsx(MotionCard, { className: css.toastLoadingBarProgress(), tone: cardTone, initial: {
|
|
1050
|
+
$[31] !== cardTone || $[32] !== duration || $[33] !== hasDuration || $[34] !== onClose || $[35] !== radius || $[36] !== transition || $[37] !== updatedAt || $[38] !== visualDuration ? (t11 = hasDuration && /* @__PURE__ */ jsxRuntime.jsxs(MotionLoadingBar, { variants: content, transition, children: [
|
|
1051
|
+
/* @__PURE__ */ jsxRuntime.jsx(LoadingBarMask, { tone: cardTone, radius }),
|
|
1052
|
+
/* @__PURE__ */ jsxRuntime.jsx(MotionLoadingBarProgress, { tone: cardTone, initial: {
|
|
933
1053
|
scaleX: 0
|
|
934
1054
|
}, animate: {
|
|
935
1055
|
scaleX: 1
|
|
@@ -938,12 +1058,12 @@ function Toast(props) {
|
|
|
938
1058
|
duration: duration / 1e3,
|
|
939
1059
|
ease: "linear"
|
|
940
1060
|
}, onAnimationComplete: onClose }, `progress-${updatedAt}`)
|
|
941
|
-
] }), $[
|
|
942
|
-
let
|
|
943
|
-
return $[
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
] }), $[
|
|
1061
|
+
] }), $[31] = cardTone, $[32] = duration, $[33] = hasDuration, $[34] = onClose, $[35] = radius, $[36] = transition, $[37] = updatedAt, $[38] = visualDuration, $[39] = t11) : t11 = $[39];
|
|
1062
|
+
let t12;
|
|
1063
|
+
return $[40] !== cardTone || $[41] !== radius || $[42] !== restProps || $[43] !== role || $[44] !== t10 || $[45] !== t11 || $[46] !== t5 || $[47] !== transition || $[48] !== visualDuration ? (t12 = /* @__PURE__ */ jsxRuntime.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: [
|
|
1064
|
+
t10,
|
|
1065
|
+
t11
|
|
1066
|
+
] }), $[40] = cardTone, $[41] = radius, $[42] = restProps, $[43] = role, $[44] = t10, $[45] = t11, $[46] = t5, $[47] = transition, $[48] = visualDuration, $[49] = t12) : t12 = $[49], t12;
|
|
947
1067
|
}
|
|
948
1068
|
Toast.displayName = "Toast";
|
|
949
1069
|
const container = {
|
|
@@ -983,7 +1103,7 @@ const container = {
|
|
|
983
1103
|
visible: {
|
|
984
1104
|
opacity: 1
|
|
985
1105
|
}
|
|
986
|
-
},
|
|
1106
|
+
}, MotionToast = framerMotion.motion.create(StyledToast), MotionFlex = framerMotion.motion.create(_visualEditing.Flex), MotionText = framerMotion.motion.create(_visualEditing.Text), MotionLoadingBar = framerMotion.motion.create(LoadingBar), MotionLoadingBarProgress = framerMotion.motion.create(LoadingBarProgress);
|
|
987
1107
|
function useMounted() {
|
|
988
1108
|
return react.useSyncExternalStore(subscribe, _temp$1, _temp2);
|
|
989
1109
|
}
|
|
@@ -996,7 +1116,7 @@ function _temp$1() {
|
|
|
996
1116
|
const subscribe = () => () => {
|
|
997
1117
|
}, ToastContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context/toast", null);
|
|
998
1118
|
function ToastLayer(props) {
|
|
999
|
-
const $ = reactCompilerRuntime.c(
|
|
1119
|
+
const $ = reactCompilerRuntime.c(9), {
|
|
1000
1120
|
children,
|
|
1001
1121
|
padding: t0,
|
|
1002
1122
|
paddingX,
|
|
@@ -1006,15 +1126,17 @@ function ToastLayer(props) {
|
|
|
1006
1126
|
zIndex
|
|
1007
1127
|
} = _visualEditing.useLayer();
|
|
1008
1128
|
let t2;
|
|
1009
|
-
$[0]
|
|
1010
|
-
let t3;
|
|
1011
|
-
$[1] !== zIndex ? (t3 = {
|
|
1129
|
+
$[0] !== zIndex ? (t2 = {
|
|
1012
1130
|
zIndex
|
|
1013
|
-
}, $[
|
|
1014
|
-
let
|
|
1015
|
-
return $[
|
|
1131
|
+
}, $[0] = zIndex, $[1] = t2) : t2 = $[1];
|
|
1132
|
+
let t3;
|
|
1133
|
+
return $[2] !== children || $[3] !== gap || $[4] !== padding || $[5] !== paddingX || $[6] !== paddingY || $[7] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.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;
|
|
1016
1134
|
}
|
|
1017
1135
|
ToastLayer.displayName = "ToastLayer";
|
|
1136
|
+
const StyledLayer = styledComponents.styled(_visualEditing.Grid).withConfig({
|
|
1137
|
+
displayName: "StyledLayer",
|
|
1138
|
+
componentId: "sc-1tbwn58-0"
|
|
1139
|
+
})`box-sizing:border-box;position:fixed;right:0;bottom:0;list-style:none;pointer-events:none;max-width:420px;width:100%;`;
|
|
1018
1140
|
let toastId = 0;
|
|
1019
1141
|
function generateToastId() {
|
|
1020
1142
|
return String(toastId++);
|
|
@@ -1136,37 +1258,36 @@ function _focusItemElement(el) {
|
|
|
1136
1258
|
}
|
|
1137
1259
|
}
|
|
1138
1260
|
const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context/tree", null), Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
1139
|
-
const $ = reactCompilerRuntime.c(
|
|
1140
|
-
let children,
|
|
1261
|
+
const $ = reactCompilerRuntime.c(37);
|
|
1262
|
+
let children, onFocus, restProps, t0;
|
|
1141
1263
|
$[0] !== props ? ({
|
|
1142
1264
|
children,
|
|
1143
|
-
gap,
|
|
1144
1265
|
space: t0,
|
|
1145
1266
|
onFocus,
|
|
1146
1267
|
...restProps
|
|
1147
|
-
} = props, $[0] = props, $[1] = children, $[2] =
|
|
1268
|
+
} = props, $[0] = props, $[1] = children, $[2] = onFocus, $[3] = restProps, $[4] = t0) : (children = $[1], onFocus = $[2], restProps = $[3], t0 = $[4]);
|
|
1148
1269
|
const space = t0 === void 0 ? 1 : t0, ref = react.useRef(null), [focusedElement, setFocusedElement] = react.useState(null), focusedElementRef = react.useRef(focusedElement);
|
|
1149
1270
|
let t1, t2;
|
|
1150
|
-
$[
|
|
1271
|
+
$[5] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[5] = t2) : t2 = $[5], t1 = t2;
|
|
1151
1272
|
const path = t1;
|
|
1152
1273
|
let t3;
|
|
1153
|
-
$[
|
|
1274
|
+
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t3 = [], $[6] = t3) : t3 = $[6];
|
|
1154
1275
|
const [itemElements, setItemElements] = react.useState(t3);
|
|
1155
1276
|
let t4;
|
|
1156
|
-
$[
|
|
1277
|
+
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = {}, $[7] = t4) : t4 = $[7];
|
|
1157
1278
|
const [state, setState] = react.useState(t4), stateRef = react.useRef(state);
|
|
1158
1279
|
let t5;
|
|
1159
|
-
$[
|
|
1280
|
+
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[8] = t5) : t5 = $[8], react.useImperativeHandle(forwardedRef, t5);
|
|
1160
1281
|
let t6, t7;
|
|
1161
|
-
$[
|
|
1282
|
+
$[9] !== focusedElement ? (t6 = () => {
|
|
1162
1283
|
focusedElementRef.current = focusedElement;
|
|
1163
|
-
}, t7 = [focusedElement], $[
|
|
1284
|
+
}, t7 = [focusedElement], $[9] = focusedElement, $[10] = t6, $[11] = t7) : (t6 = $[10], t7 = $[11]), react.useEffect(t6, t7);
|
|
1164
1285
|
let t8, t9;
|
|
1165
|
-
$[
|
|
1286
|
+
$[12] !== state ? (t8 = () => {
|
|
1166
1287
|
stateRef.current = state;
|
|
1167
|
-
}, t9 = [state], $[
|
|
1288
|
+
}, t9 = [state], $[12] = state, $[13] = t8, $[14] = t9) : (t8 = $[13], t9 = $[14]), react.useEffect(t8, t9);
|
|
1168
1289
|
let t10;
|
|
1169
|
-
$[
|
|
1290
|
+
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (element, path_0, expanded, selected) => (setState((s) => ({
|
|
1170
1291
|
...s,
|
|
1171
1292
|
[path_0]: {
|
|
1172
1293
|
element,
|
|
@@ -1179,10 +1300,10 @@ const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context
|
|
|
1179
1300
|
};
|
|
1180
1301
|
return delete newState[path_0], newState;
|
|
1181
1302
|
});
|
|
1182
|
-
}), $[
|
|
1303
|
+
}), $[15] = t10) : t10 = $[15];
|
|
1183
1304
|
const registerItem = t10;
|
|
1184
1305
|
let t11;
|
|
1185
|
-
$[
|
|
1306
|
+
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t11 = (path_1, expanded_0) => {
|
|
1186
1307
|
setState((s_1) => {
|
|
1187
1308
|
const itemState = s_1[path_1];
|
|
1188
1309
|
return itemState ? {
|
|
@@ -1193,12 +1314,12 @@ const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context
|
|
|
1193
1314
|
}
|
|
1194
1315
|
} : s_1;
|
|
1195
1316
|
});
|
|
1196
|
-
}, $[
|
|
1317
|
+
}, $[16] = t11) : t11 = $[16];
|
|
1197
1318
|
const setExpanded = t11;
|
|
1198
1319
|
let t12;
|
|
1199
1320
|
const t13 = focusedElement || itemElements[0] || null;
|
|
1200
1321
|
let t14;
|
|
1201
|
-
$[
|
|
1322
|
+
$[17] !== space || $[18] !== state || $[19] !== t13 ? (t14 = {
|
|
1202
1323
|
version: 0,
|
|
1203
1324
|
focusedElement: t13,
|
|
1204
1325
|
level: 0,
|
|
@@ -1208,10 +1329,10 @@ const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context
|
|
|
1208
1329
|
setFocusedElement,
|
|
1209
1330
|
space,
|
|
1210
1331
|
state
|
|
1211
|
-
}, $[
|
|
1332
|
+
}, $[17] = space, $[18] = state, $[19] = t13, $[20] = t14) : t14 = $[20], t12 = t14;
|
|
1212
1333
|
const contextValue = t12;
|
|
1213
1334
|
let t15;
|
|
1214
|
-
$[
|
|
1335
|
+
$[21] !== itemElements ? (t15 = (event) => {
|
|
1215
1336
|
if (focusedElementRef.current) {
|
|
1216
1337
|
if (event.key === "ArrowDown") {
|
|
1217
1338
|
event.preventDefault();
|
|
@@ -1270,29 +1391,120 @@ const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context
|
|
|
1270
1391
|
return;
|
|
1271
1392
|
}
|
|
1272
1393
|
}
|
|
1273
|
-
}, $[
|
|
1394
|
+
}, $[21] = itemElements, $[22] = t15) : t15 = $[22];
|
|
1274
1395
|
const handleKeyDown = t15;
|
|
1275
1396
|
let t16;
|
|
1276
|
-
$[
|
|
1397
|
+
$[23] !== onFocus ? (t16 = (event_0) => {
|
|
1277
1398
|
setFocusedElement(event_0.target), onFocus?.(event_0);
|
|
1278
|
-
}, $[
|
|
1399
|
+
}, $[23] = onFocus, $[24] = t16) : t16 = $[24];
|
|
1279
1400
|
const handleFocus = t16;
|
|
1280
1401
|
let t17;
|
|
1281
|
-
$[
|
|
1402
|
+
$[25] === Symbol.for("react.memo_cache_sentinel") ? (t17 = () => {
|
|
1282
1403
|
if (!ref.current)
|
|
1283
1404
|
return;
|
|
1284
1405
|
const _itemElements = Array.from(ref.current.querySelectorAll('[data-ui="TreeItem"]'));
|
|
1285
1406
|
setItemElements(_itemElements);
|
|
1286
|
-
}, $[
|
|
1407
|
+
}, $[25] = t17) : t17 = $[25];
|
|
1287
1408
|
let t18;
|
|
1288
|
-
$[
|
|
1289
|
-
|
|
1409
|
+
$[26] !== children ? (t18 = [children], $[26] = children, $[27] = t18) : t18 = $[27], react.useEffect(t17, t18);
|
|
1410
|
+
let t19;
|
|
1411
|
+
$[28] !== children || $[29] !== handleFocus || $[30] !== handleKeyDown || $[31] !== restProps || $[32] !== space ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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];
|
|
1290
1412
|
let t20;
|
|
1291
|
-
|
|
1292
|
-
let t21;
|
|
1293
|
-
return $[35] !== contextValue || $[36] !== t20 ? (t21 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t20 }), $[35] = contextValue, $[36] = t20, $[37] = t21) : t21 = $[37], t21;
|
|
1413
|
+
return $[34] !== contextValue || $[35] !== t19 ? (t20 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t19 }), $[34] = contextValue, $[35] = t19, $[36] = t20) : t20 = $[36], t20;
|
|
1294
1414
|
}));
|
|
1295
1415
|
Tree.displayName = "Memo(ForwardRef(Tree))";
|
|
1416
|
+
function treeItemRootStyle() {
|
|
1417
|
+
return styledComponents.css`
|
|
1418
|
+
&[role='none'] > [role='treeitem'] {
|
|
1419
|
+
outline: none;
|
|
1420
|
+
cursor: default;
|
|
1421
|
+
border-radius: 3px;
|
|
1422
|
+
|
|
1423
|
+
background-color: var(--card-bg-color);
|
|
1424
|
+
color: var(--treeitem-fg-color);
|
|
1425
|
+
|
|
1426
|
+
&:focus {
|
|
1427
|
+
position: relative;
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
&[role='treeitem'] {
|
|
1432
|
+
outline: none;
|
|
1433
|
+
|
|
1434
|
+
& > div {
|
|
1435
|
+
cursor: default;
|
|
1436
|
+
border-radius: 3px;
|
|
1437
|
+
|
|
1438
|
+
background-color: var(--card-bg-color);
|
|
1439
|
+
color: var(--treeitem-fg-color);
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
&:focus > div {
|
|
1443
|
+
position: relative;
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
`;
|
|
1447
|
+
}
|
|
1448
|
+
function treeItemRootColorStyle(props) {
|
|
1449
|
+
const $tone = "default", {
|
|
1450
|
+
color
|
|
1451
|
+
} = theme.getTheme_v2(props.theme), tone = color.selectable[$tone];
|
|
1452
|
+
return styledComponents.css`
|
|
1453
|
+
&[role='none'] {
|
|
1454
|
+
& > [role='treeitem'] {
|
|
1455
|
+
${_visualEditing._cardColorStyle(color, tone.enabled)}
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
&[data-selected] > [role='treeitem'] {
|
|
1459
|
+
${_visualEditing._cardColorStyle(color, tone.pressed)}
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
@media (hover: hover) {
|
|
1463
|
+
&:not([data-selected]) > [role='treeitem']:not(:focus):hover {
|
|
1464
|
+
${_visualEditing._cardColorStyle(color, tone.hovered)}
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
& > [role='treeitem']:focus {
|
|
1468
|
+
${_visualEditing._cardColorStyle(color, tone.selected)}
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
&[role='treeitem'] {
|
|
1474
|
+
& > [data-ui='TreeItem__box'] {
|
|
1475
|
+
${_visualEditing._cardColorStyle(color, tone.enabled)}
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
&[data-selected] > [data-ui='TreeItem__box'] {
|
|
1479
|
+
${_visualEditing._cardColorStyle(color, tone.pressed)}
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
@media (hover: hover) {
|
|
1483
|
+
&:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover {
|
|
1484
|
+
${_visualEditing._cardColorStyle(color, tone.hovered)}
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
&:focus > [data-ui='TreeItem__box'] {
|
|
1488
|
+
${_visualEditing._cardColorStyle(color, tone.selected)}
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
`;
|
|
1493
|
+
}
|
|
1494
|
+
function treeItemBoxStyle(props) {
|
|
1495
|
+
const {
|
|
1496
|
+
$level
|
|
1497
|
+
} = props, {
|
|
1498
|
+
space
|
|
1499
|
+
} = theme.getTheme_v2(props.theme);
|
|
1500
|
+
return styledComponents.css`
|
|
1501
|
+
padding-left: ${_visualEditing.rem(space[2] * $level)};
|
|
1502
|
+
|
|
1503
|
+
&[data-as='a'] {
|
|
1504
|
+
text-decoration: none;
|
|
1505
|
+
}
|
|
1506
|
+
`;
|
|
1507
|
+
}
|
|
1296
1508
|
function useTree() {
|
|
1297
1509
|
const tree = react.useContext(TreeContext);
|
|
1298
1510
|
if (!tree)
|
|
@@ -1310,20 +1522,29 @@ const TreeGroup = react.memo(function(props) {
|
|
|
1310
1522
|
const expanded = t0 === void 0 ? !1 : t0, tree = useTree(), t1 = !expanded;
|
|
1311
1523
|
let t2;
|
|
1312
1524
|
return $[4] !== children || $[5] !== restProps || $[6] !== t1 || $[7] !== tree.space ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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;
|
|
1313
|
-
}),
|
|
1525
|
+
}), StyledTreeItem = react.memo(styledComponents.styled.li.withConfig({
|
|
1526
|
+
displayName: "StyledTreeItem",
|
|
1527
|
+
componentId: "sc-iiskig-0"
|
|
1528
|
+
})(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = /* @__PURE__ */ styledComponents.styled(_visualEditing.Box).attrs({
|
|
1529
|
+
forwardedAs: "a"
|
|
1530
|
+
}).withConfig({
|
|
1531
|
+
displayName: "TreeItemBox",
|
|
1532
|
+
componentId: "sc-iiskig-1"
|
|
1533
|
+
})(treeItemBoxStyle), ToggleArrowText = styledComponents.styled(_visualEditing.Text).withConfig({
|
|
1534
|
+
displayName: "ToggleArrowText",
|
|
1535
|
+
componentId: "sc-iiskig-2"
|
|
1536
|
+
})`& > svg{transition:transform 100ms;}`, TreeItem = react.memo(function(props) {
|
|
1314
1537
|
const {
|
|
1315
1538
|
children,
|
|
1316
|
-
className,
|
|
1317
1539
|
expanded: expandedProp = !1,
|
|
1318
1540
|
fontSize = 1,
|
|
1319
1541
|
href,
|
|
1320
1542
|
icon: IconComponent,
|
|
1321
1543
|
id: idProp,
|
|
1322
|
-
linkAs
|
|
1544
|
+
linkAs,
|
|
1323
1545
|
muted,
|
|
1324
1546
|
onClick,
|
|
1325
1547
|
padding = 2,
|
|
1326
|
-
radius = 2,
|
|
1327
1548
|
selected = !1,
|
|
1328
1549
|
space = 2,
|
|
1329
1550
|
text,
|
|
@@ -1349,55 +1570,27 @@ const TreeGroup = react.memo(function(props) {
|
|
|
1349
1570
|
if (rootRef.current)
|
|
1350
1571
|
return registerItem(rootRef.current, itemPath.join("/"), expanded, selected);
|
|
1351
1572
|
}, [expanded, itemPath, registerItem, selected]);
|
|
1352
|
-
const content2 = /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, {
|
|
1353
|
-
/* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Box, { style: {
|
|
1573
|
+
const content2 = /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, { padding, children: [
|
|
1574
|
+
/* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Box, { marginRight: space, style: {
|
|
1354
1575
|
visibility: IconComponent || children ? "visible" : "hidden",
|
|
1355
1576
|
pointerEvents: "none"
|
|
1356
1577
|
}, children: [
|
|
1357
1578
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {}) }),
|
|
1358
|
-
!IconComponent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1579
|
+
!IconComponent && /* @__PURE__ */ jsxRuntime.jsx(ToggleArrowText, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsxRuntime.jsx(icons.ToggleArrowRightIcon, { style: {
|
|
1359
1580
|
transform: expanded ? "rotate(90deg)" : void 0
|
|
1360
1581
|
} }) })
|
|
1361
1582
|
] }),
|
|
1362
1583
|
/* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted, size: fontSize, textOverflow: "ellipsis", weight, children: text }) })
|
|
1363
1584
|
] });
|
|
1364
|
-
return href ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1365
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1366
|
-
paddingLeft: `calc(var(--space-2) * ${tree.level})`
|
|
1367
|
-
}, children: content2 }),
|
|
1585
|
+
return href ? /* @__PURE__ */ jsxRuntime.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: [
|
|
1586
|
+
/* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, "aria-expanded": expanded, as: linkAs, "data-ui": "TreeItem__box", href, ref: treeitemRef, role: "treeitem", tabIndex, children: content2 }),
|
|
1368
1587
|
/* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { hidden: !expanded, children }) })
|
|
1369
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1370
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1371
|
-
paddingLeft: `calc(var(--space-2) * ${tree.level})`
|
|
1372
|
-
}, children: content2 }),
|
|
1588
|
+
] }) : /* @__PURE__ */ jsxRuntime.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: [
|
|
1589
|
+
/* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, as: "div", "data-ui": "TreeItem__box", children: content2 }),
|
|
1373
1590
|
/* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { expanded, children }) })
|
|
1374
1591
|
] });
|
|
1375
1592
|
});
|
|
1376
1593
|
TreeItem.displayName = "Memo(TreeItem)";
|
|
1377
|
-
function StyleTags(props) {
|
|
1378
|
-
const $ = reactCompilerRuntime.c(10), {
|
|
1379
|
-
theme: themeProp
|
|
1380
|
-
} = props;
|
|
1381
|
-
let t0;
|
|
1382
|
-
$[0] !== themeProp ? (t0 = themeProp ?? theme.buildTheme_v3(), $[0] = themeProp, $[1] = t0) : t0 = $[1];
|
|
1383
|
-
const theme$1 = t0;
|
|
1384
|
-
let t1;
|
|
1385
|
-
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t1 = /* @__PURE__ */ jsxRuntime.jsx("style", { href: "sanity-palette", precedence: "palette", children: css.compilePalette() }), $[2] = t1) : t1 = $[2];
|
|
1386
|
-
let t2;
|
|
1387
|
-
$[3] !== theme$1 ? (t2 = css.compileTheme({
|
|
1388
|
-
v3: theme$1
|
|
1389
|
-
}), $[3] = theme$1, $[4] = t2) : t2 = $[4];
|
|
1390
|
-
let t3;
|
|
1391
|
-
$[5] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx("style", { href: "sanity-theme", precedence: "theme", children: t2 }), $[5] = t2, $[6] = t3) : t3 = $[6];
|
|
1392
|
-
let t4;
|
|
1393
|
-
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = /* @__PURE__ */ jsxRuntime.jsx("style", { href: "sanity-system", precedence: "system", children: css.compileSystem() }), $[7] = t4) : t4 = $[7];
|
|
1394
|
-
let t5;
|
|
1395
|
-
return $[8] !== t3 ? (t5 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1396
|
-
t1,
|
|
1397
|
-
t3,
|
|
1398
|
-
t4
|
|
1399
|
-
] }), $[8] = t3, $[9] = t5) : t5 = $[9], t5;
|
|
1400
|
-
}
|
|
1401
1594
|
exports.Arrow = _visualEditing.Arrow;
|
|
1402
1595
|
exports.Avatar = _visualEditing.Avatar;
|
|
1403
1596
|
exports.AvatarCounter = _visualEditing.AvatarCounter;
|
|
@@ -1407,7 +1600,6 @@ exports.BoundaryElementProvider = _visualEditing.BoundaryElementProvider;
|
|
|
1407
1600
|
exports.Box = _visualEditing.Box;
|
|
1408
1601
|
exports.Button = _visualEditing.Button;
|
|
1409
1602
|
exports.Card = _visualEditing.Card;
|
|
1410
|
-
exports.CardProvider = _visualEditing.CardProvider;
|
|
1411
1603
|
exports.Checkbox = _visualEditing.Checkbox;
|
|
1412
1604
|
exports.Code = _visualEditing.Code;
|
|
1413
1605
|
exports.ConditionalWrapper = _visualEditing.ConditionalWrapper;
|
|
@@ -1448,9 +1640,12 @@ exports.TooltipDelayGroupProvider = _visualEditing.TooltipDelayGroupProvider;
|
|
|
1448
1640
|
exports.VirtualList = _visualEditing.VirtualList;
|
|
1449
1641
|
exports._ResizeObserver = _visualEditing._ResizeObserver;
|
|
1450
1642
|
exports._elementSizeObserver = _visualEditing._elementSizeObserver;
|
|
1643
|
+
exports._fillCSSObject = _visualEditing._fillCSSObject;
|
|
1451
1644
|
exports._getArrayProp = _visualEditing._getArrayProp;
|
|
1645
|
+
exports._getResponsiveSpace = _visualEditing._getResponsiveSpace;
|
|
1452
1646
|
exports._isEnterToClickElement = _visualEditing._isEnterToClickElement;
|
|
1453
1647
|
exports._isScrollable = _visualEditing._isScrollable;
|
|
1648
|
+
exports._responsive = _visualEditing._responsive;
|
|
1454
1649
|
exports.containsOrEqualsElement = _visualEditing.containsOrEqualsElement;
|
|
1455
1650
|
exports.createColorTheme = _visualEditing.createColorTheme;
|
|
1456
1651
|
exports.hexToRgb = _visualEditing.hexToRgb;
|
|
@@ -1463,6 +1658,12 @@ exports.isHTMLSelectElement = _visualEditing.isHTMLSelectElement;
|
|
|
1463
1658
|
exports.isHTMLTextAreaElement = _visualEditing.isHTMLTextAreaElement;
|
|
1464
1659
|
exports.multiply = _visualEditing.multiply;
|
|
1465
1660
|
exports.parseColor = _visualEditing.parseColor;
|
|
1661
|
+
exports.rem = _visualEditing.rem;
|
|
1662
|
+
exports.responsiveCodeFontStyle = _visualEditing.responsiveCodeFontStyle;
|
|
1663
|
+
exports.responsiveHeadingFont = _visualEditing.responsiveHeadingFont;
|
|
1664
|
+
exports.responsiveLabelFont = _visualEditing.responsiveLabelFont;
|
|
1665
|
+
exports.responsiveTextAlignStyle = _visualEditing.responsiveTextAlignStyle;
|
|
1666
|
+
exports.responsiveTextFont = _visualEditing.responsiveTextFont;
|
|
1466
1667
|
exports.rgbToHex = _visualEditing.rgbToHex;
|
|
1467
1668
|
exports.rgbToHsl = _visualEditing.rgbToHsl;
|
|
1468
1669
|
exports.rgba = _visualEditing.rgba;
|
|
@@ -1470,7 +1671,6 @@ exports.screen = _visualEditing.screen;
|
|
|
1470
1671
|
exports.studioTheme = _visualEditing.studioTheme;
|
|
1471
1672
|
exports.useArrayProp = _visualEditing.useArrayProp;
|
|
1472
1673
|
exports.useBoundaryElement = _visualEditing.useBoundaryElement;
|
|
1473
|
-
exports.useCard = _visualEditing.useCard;
|
|
1474
1674
|
exports.useClickOutsideEvent = _visualEditing.useClickOutsideEvent;
|
|
1475
1675
|
exports.useCustomValidity = _visualEditing.useCustomValidity;
|
|
1476
1676
|
exports.useElementSize = _visualEditing.useElementSize;
|
|
@@ -1485,18 +1685,6 @@ exports.useRootTheme = _visualEditing.useRootTheme;
|
|
|
1485
1685
|
exports.useTheme = _visualEditing.useTheme;
|
|
1486
1686
|
exports.useTheme_v2 = _visualEditing.useTheme_v2;
|
|
1487
1687
|
exports.useTooltipDelayGroup = _visualEditing.useTooltipDelayGroup;
|
|
1488
|
-
Object.defineProperty(exports, "px", {
|
|
1489
|
-
enumerable: !0,
|
|
1490
|
-
get: function() {
|
|
1491
|
-
return css.px;
|
|
1492
|
-
}
|
|
1493
|
-
});
|
|
1494
|
-
Object.defineProperty(exports, "rem", {
|
|
1495
|
-
enumerable: !0,
|
|
1496
|
-
get: function() {
|
|
1497
|
-
return css.rem;
|
|
1498
|
-
}
|
|
1499
|
-
});
|
|
1500
1688
|
exports.Autocomplete = Autocomplete;
|
|
1501
1689
|
exports.Breadcrumbs = Breadcrumbs;
|
|
1502
1690
|
exports.CodeSkeleton = CodeSkeleton;
|
|
@@ -1508,7 +1696,6 @@ exports.HeadingSkeleton = HeadingSkeleton;
|
|
|
1508
1696
|
exports.LabelSkeleton = LabelSkeleton;
|
|
1509
1697
|
exports.MenuButton = MenuButton;
|
|
1510
1698
|
exports.Skeleton = Skeleton;
|
|
1511
|
-
exports.StyleTags = StyleTags;
|
|
1512
1699
|
exports.TabPanel = TabPanel;
|
|
1513
1700
|
exports.TextSkeleton = TextSkeleton;
|
|
1514
1701
|
exports.Toast = Toast;
|
|
@@ -1518,7 +1705,6 @@ exports.TreeItem = TreeItem;
|
|
|
1518
1705
|
exports._hasFocus = _hasFocus;
|
|
1519
1706
|
exports._raf = _raf;
|
|
1520
1707
|
exports._raf2 = _raf2;
|
|
1521
|
-
exports._responsive = _responsive;
|
|
1522
1708
|
exports.attemptFocus = attemptFocus;
|
|
1523
1709
|
exports.focusFirstDescendant = focusFirstDescendant;
|
|
1524
1710
|
exports.focusLastDescendant = focusLastDescendant;
|