@sanity/ui 4.0.0-static.3 → 4.0.0-static.30
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-es/{refractor.js → Refractor.js} +1 -1
- package/dist/_chunks-es/{refractor.js.map → Refractor.js.map} +1 -1
- package/dist/css/index.css +2 -1
- package/dist/css/index.css.map +1 -0
- package/dist/css/index.d.ts +51 -7
- package/dist/css/index.js +17979 -55
- package/dist/css/index.js.map +1 -1
- package/dist/index.d.ts +12 -17
- package/dist/index.js +596 -608
- package/dist/index.js.map +1 -1
- package/exports/css/index.css +1 -0
- package/package.json +36 -46
- package/src/core/Root.tsx +1 -1
- package/src/core/RootProvider.tsx +5 -5
- package/src/core/__workshop__/index.ts +1 -1
- package/src/core/components/autocomplete/{autocomplete.tsx → Autocomplete.tsx} +10 -10
- package/src/core/components/autocomplete/__workshop__/{custom.tsx → Custom.tsx} +14 -1
- package/src/core/components/autocomplete/__workshop__/{example.tsx → Example.tsx} +12 -1
- package/src/core/components/autocomplete/__workshop__/index.ts +6 -6
- package/src/core/components/autocomplete/types.ts +1 -1
- package/src/core/components/breadcrumbs/{breadcrumbs.tsx → Breadcrumbs.tsx} +6 -6
- package/src/core/components/breadcrumbs/__workshop__/index.ts +1 -1
- package/src/core/components/dialog/{dialog.tsx → Dialog.tsx} +4 -4
- package/src/core/components/dialog/{dialogCard.tsx → DialogCard.tsx} +5 -5
- package/src/core/components/dialog/{dialogProvider.tsx → DialogProvider.tsx} +1 -1
- package/src/core/components/dialog/__workshop__/{panes.tsx → Panes.tsx} +4 -0
- package/src/core/components/dialog/__workshop__/{position.tsx → Position.tsx} +9 -1
- package/src/core/components/dialog/__workshop__/{props.tsx → Props.tsx} +2 -0
- package/src/core/components/dialog/__workshop__/index.ts +10 -10
- package/src/core/components/dialog/useDialog.ts +3 -3
- package/src/core/components/hotkeys/{hotkeys.tsx → Hotkeys.tsx} +2 -2
- package/src/core/components/hotkeys/__workshop__/index.ts +1 -1
- package/src/core/components/menu/{menu.test.tsx → Menu.test.tsx} +1 -1
- package/src/core/components/menu/{menu.tsx → Menu.tsx} +4 -8
- package/src/core/components/menu/{menuButton.tsx → MenuButton.tsx} +14 -9
- package/src/core/components/menu/{menuContext.ts → MenuContext.ts} +1 -1
- package/src/core/components/menu/{menuGroup.tsx → MenuGroup.tsx} +14 -11
- package/src/core/components/menu/{menuItem.tsx → MenuItem.tsx} +7 -9
- package/src/core/components/menu/__workshop__/DataProps.tsx +27 -0
- package/src/core/components/menu/__workshop__/{menuButton.tsx → MenuButton.tsx} +6 -1
- package/src/core/components/menu/__workshop__/{tones.tsx → Tones.tsx} +7 -1
- package/src/core/components/menu/__workshop__/index.ts +22 -17
- package/src/core/components/menu/useMenu.ts +3 -3
- package/src/core/components/tab/{tab.tsx → Tab.tsx} +1 -1
- package/src/core/components/tab/{tabList.tsx → TabList.tsx} +2 -2
- package/src/core/components/tab/{tabPanel.tsx → TabPanel.tsx} +1 -1
- package/src/core/components/tab/__workshop__/index.ts +1 -1
- package/src/core/components/toast/{toast.test.tsx → Toast.test.tsx} +1 -1
- package/src/core/components/toast/{toast.tsx → Toast.tsx} +6 -6
- package/src/core/components/toast/{toastLayer.tsx → ToastLayer.tsx} +1 -1
- package/src/core/components/toast/{toastProvider.tsx → ToastProvider.tsx} +4 -4
- package/src/core/components/toast/__workshop__/{toast.tsx → Toast.tsx} +2 -0
- package/src/core/components/toast/__workshop__/index.ts +2 -2
- package/src/core/components/toast/useToast.ts +3 -3
- package/src/core/components/tree/{tree.tsx → Tree.tsx} +2 -2
- package/src/core/components/tree/{treeGroup.tsx → TreeGroup.tsx} +1 -1
- package/src/core/components/tree/{treeItem.tsx → TreeItem.tsx} +7 -7
- package/src/core/components/tree/__workshop__/index.ts +4 -4
- package/src/core/components/tree/useTree.ts +3 -3
- package/src/core/components/virtualList/{virtualList.tsx → VirtualList.tsx} +1 -1
- package/src/core/components/virtualList/__workshop__/index.ts +4 -4
- package/src/core/hooks/useMediaIndex/__workshop__/index.ts +1 -1
- package/src/core/index.ts +65 -62
- package/src/core/primitives/avatar/{avatar.tsx → Avatar.tsx} +4 -4
- package/src/core/primitives/avatar/{avatarCounter.tsx → AvatarCounter.tsx} +2 -2
- package/src/core/primitives/avatar/{avatarStack.tsx → AvatarStack.tsx} +3 -3
- package/src/core/primitives/avatar/__workshop__/{asButton.tsx → AsButton.tsx} +8 -1
- package/src/core/primitives/avatar/__workshop__/PropsStory.tsx +22 -0
- package/src/core/primitives/avatar/__workshop__/{stack.tsx → Stack.tsx} +5 -1
- package/src/core/primitives/avatar/__workshop__/index.ts +9 -4
- package/src/core/primitives/badge/{badge.test.tsx → Badge.test.tsx} +1 -1
- package/src/core/primitives/badge/{badge.tsx → Badge.tsx} +2 -2
- package/src/core/primitives/badge/__workshop__/{props.tsx → Props.tsx} +12 -1
- package/src/core/primitives/badge/__workshop__/index.ts +2 -2
- package/src/core/primitives/box/__workshop__/{props.tsx → Props.tsx} +6 -1
- package/src/core/primitives/box/__workshop__/index.ts +2 -2
- package/src/core/primitives/button/{button.test.tsx → Button.test.tsx} +1 -1
- package/src/core/primitives/button/{button.tsx → Button.tsx} +10 -10
- package/src/core/primitives/button/__workshop__/DataProps.tsx +22 -0
- package/src/core/primitives/button/__workshop__/{props.tsx → Props.tsx} +22 -0
- package/src/core/primitives/button/__workshop__/{stacked.tsx → Stacked.tsx} +16 -0
- package/src/core/primitives/button/__workshop__/index.ts +16 -11
- package/src/core/primitives/card/{card.tsx → Card.tsx} +10 -10
- package/src/core/primitives/card/{cardProvider.tsx → CardProvider.tsx} +1 -1
- package/src/core/primitives/card/__workshop__/DataProps.tsx +30 -0
- package/src/core/primitives/card/__workshop__/{props.tsx → Props.tsx} +10 -0
- package/src/core/primitives/card/__workshop__/{selected.tsx → Selected.tsx} +1 -1
- package/src/core/primitives/card/__workshop__/index.ts +10 -9
- package/src/core/primitives/card/useCard.ts +3 -3
- package/src/core/primitives/checkbox/__workshop__/index.ts +4 -4
- package/src/core/primitives/code/{code.tsx → Code.tsx} +26 -2
- package/src/core/primitives/code/__workshop__/{props.tsx → Props.tsx} +6 -1
- package/src/core/primitives/code/__workshop__/index.ts +2 -2
- package/src/core/primitives/container/{container.tsx → Container.tsx} +1 -1
- package/src/core/primitives/container/__workshop__/{example.tsx → Example.tsx} +6 -1
- package/src/core/primitives/container/__workshop__/index.ts +1 -1
- package/src/core/primitives/flex/{flex.tsx → Flex.tsx} +1 -1
- package/src/core/primitives/flex/__workshop__/{example.tsx → Example.tsx} +7 -1
- package/src/core/primitives/flex/__workshop__/index.ts +2 -2
- package/src/core/primitives/grid/{grid.tsx → Grid.tsx} +1 -1
- package/src/core/primitives/grid/__workshop__/index.ts +1 -1
- package/src/core/primitives/heading/{heading.tsx → Heading.tsx} +16 -0
- package/src/core/primitives/heading/__workshop__/{plain.tsx → Plain.tsx} +12 -1
- package/src/core/primitives/heading/__workshop__/index.ts +2 -2
- package/src/core/primitives/inline/{inline.tsx → Inline.tsx} +1 -1
- package/src/core/primitives/inline/__workshop__/{plain.tsx → Plain.tsx} +5 -1
- package/src/core/primitives/inline/__workshop__/index.ts +1 -1
- package/src/core/primitives/kbd/{kbd.tsx → Kbd.tsx} +2 -2
- package/src/core/primitives/kbd/__workshop__/index.ts +1 -1
- package/src/core/primitives/label/{label.tsx → Label.tsx} +16 -0
- package/src/core/primitives/label/__workshop__/{plain.tsx → Plain.tsx} +15 -1
- package/src/core/primitives/label/__workshop__/index.ts +2 -2
- package/src/core/primitives/layer/{layer.test.tsx → Layer.test.tsx} +1 -1
- package/src/core/primitives/layer/{layer.tsx → Layer.tsx} +3 -3
- package/src/core/primitives/layer/{layerCard.tsx → LayerCard.tsx} +2 -2
- package/src/core/primitives/layer/{layerProvider.tsx → LayerProvider.tsx} +3 -3
- package/src/core/primitives/layer/__workshop__/index.ts +3 -3
- package/src/core/primitives/layer/useLayer.ts +3 -3
- package/src/core/primitives/popover/{popover.tsx → Popover.tsx} +4 -5
- package/src/core/primitives/popover/{popoverLayer.tsx → PopoverLayer.tsx} +3 -3
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +13 -1
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +2 -0
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +8 -0
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +7 -1
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +6 -0
- package/src/core/primitives/radio/{radio.tsx → Radio.tsx} +2 -2
- package/src/core/primitives/radio/__workshop__/index.ts +2 -2
- package/src/core/primitives/select/{select.tsx → Select.tsx} +7 -5
- package/src/core/primitives/select/__workshop__/{plain.tsx → Plain.tsx} +4 -0
- package/src/core/primitives/select/__workshop__/index.ts +2 -2
- package/src/core/primitives/selectable/{selectable.tsx → Selectable.tsx} +2 -2
- package/src/core/primitives/selectable/__workshop__/DataProps.tsx +27 -0
- package/src/core/primitives/selectable/__workshop__/index.ts +14 -0
- package/src/core/primitives/skeleton/{codeSkeleton.tsx → CodeSkeleton.tsx} +1 -1
- package/src/core/primitives/skeleton/{headingSkeleton.tsx → HeadingSkeleton.tsx} +1 -1
- package/src/core/primitives/skeleton/{labelSkeleton.tsx → LabelSkeleton.tsx} +1 -1
- package/src/core/primitives/skeleton/{textSkeleton.tsx → TextSkeleton.tsx} +1 -1
- package/src/core/primitives/skeleton/__workshop__/{delay.tsx → Delay.tsx} +9 -1
- package/src/core/primitives/skeleton/__workshop__/{skeleton.tsx → Skeleton.tsx} +9 -1
- package/src/core/primitives/skeleton/__workshop__/index.ts +2 -2
- package/src/core/primitives/spinner/{spinner.tsx → Spinner.tsx} +2 -2
- package/src/core/primitives/spinner/__workshop__/Props.tsx +6 -1
- package/src/core/primitives/stack/{stack.tsx → Stack.tsx} +1 -1
- package/src/core/primitives/stack/__workshop__/{plain.tsx → Plain.tsx} +4 -1
- package/src/core/primitives/stack/__workshop__/index.ts +1 -1
- package/src/core/primitives/switch/{switch.tsx → Switch.tsx} +2 -10
- package/src/core/primitives/switch/__workshop__/index.ts +2 -2
- package/src/core/primitives/text/{text.tsx → Text.tsx} +14 -0
- package/src/core/primitives/text/__workshop__/{colored.tsx → Colored.tsx} +8 -1
- package/src/core/primitives/text/__workshop__/{example.tsx → Example.tsx} +15 -1
- package/src/core/primitives/text/__workshop__/index.ts +3 -3
- package/src/core/primitives/textArea/{textArea.tsx → TextArea.tsx} +7 -1
- package/src/core/primitives/textArea/__workshop__/{plain.tsx → Plain.tsx} +8 -0
- package/src/core/primitives/textArea/__workshop__/index.ts +1 -1
- package/src/core/primitives/textInput/{textInput.tsx → TextInput.tsx} +22 -21
- package/src/core/primitives/textInput/__workshop__/{plain.tsx → Plain.tsx} +34 -4
- package/src/core/primitives/textInput/__workshop__/{typed.tsx → Typed.tsx} +7 -1
- package/src/core/primitives/textInput/__workshop__/index.ts +7 -7
- package/src/core/primitives/tooltip/{tooltip.test.tsx → Tooltip.test.tsx} +4 -4
- package/src/core/primitives/tooltip/{tooltip.tsx → Tooltip.tsx} +6 -5
- package/src/core/primitives/tooltip/{tooltipLayer.tsx → TooltipLayer.tsx} +2 -2
- package/src/core/primitives/tooltip/__workshop__/{customPortal.tsx → CustomPortal.tsx} +2 -0
- package/src/core/primitives/tooltip/__workshop__/{overflowingBoundary.tsx → OverflowingBoundary.tsx} +2 -0
- package/src/core/primitives/tooltip/__workshop__/{props.tsx → Props.tsx} +12 -0
- package/src/core/primitives/tooltip/__workshop__/{resizableBoundary.tsx → ResizableBoundary.tsx} +5 -0
- package/src/core/primitives/tooltip/__workshop__/index.ts +4 -4
- package/src/core/primitives/tooltip/tooltipDelayGroup/{tooltipDelayGroupProvider.tsx → TooltipDelayGroupProvider.tsx} +1 -1
- package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +3 -3
- package/src/core/types.ts +6 -5
- package/src/core/utils/{errorBoundary.tsx → ErrorBoundary.tsx} +1 -1
- package/src/core/utils/boundaryElement/{boundaryElement.test.tsx → BoundaryElement.test.tsx} +1 -1
- package/src/core/utils/boundaryElement/{boundaryElementProvider.tsx → BoundaryElementProvider.tsx} +1 -1
- package/src/core/utils/boundaryElement/__workshop__/index.ts +1 -1
- package/src/core/utils/boundaryElement/useBoundaryElement.ts +3 -3
- package/src/core/utils/elementQuery/__workshop__/index.ts +1 -1
- package/src/core/utils/portal/{portal.test.tsx → Portal.test.tsx} +1 -1
- package/src/core/utils/portal/{portal.tsx → Portal.tsx} +1 -1
- package/src/core/utils/portal/{portalProvider.tsx → PortalProvider.tsx} +3 -3
- package/src/core/utils/portal/__workshop__/index.ts +1 -1
- package/src/core/utils/portal/usePortal.ts +3 -3
- package/src/css/_responsiveStyle.css.ts +2 -2
- package/src/css/primitives/_input/_input.css.ts +8 -8
- package/src/css/primitives/_input/input.ts +2 -0
- package/src/css/primitives/_input/types.ts +2 -1
- package/src/css/primitives/avatar/avatar.css.ts +17 -5
- package/src/css/primitives/box/box.css.ts +19 -1
- package/src/css/primitives/button/button.css.ts +252 -183
- package/src/css/primitives/card/__workshop__/{color.tsx → Color.tsx} +9 -1
- package/src/css/primitives/card/__workshop__/index.ts +1 -1
- package/src/css/primitives/card/card.css.ts +133 -130
- package/src/css/primitives/checkbox/checkbox.css.ts +1 -0
- package/src/css/primitives/code/code.ts +4 -0
- package/src/css/primitives/code/types.ts +7 -1
- package/src/css/primitives/heading/heading.ts +4 -0
- package/src/css/primitives/heading/types.ts +7 -1
- package/src/css/primitives/label/label.ts +4 -0
- package/src/css/primitives/label/types.ts +7 -1
- package/src/css/primitives/radio/radio.css.ts +1 -1
- package/src/css/primitives/root/root.css.ts +1 -1
- package/src/css/primitives/select/select.css.ts +7 -1
- package/src/css/primitives/selectable/selectable.css.ts +79 -70
- package/src/css/primitives/switch/switch.css.ts +10 -1
- package/src/css/primitives/text/text.ts +2 -0
- package/src/css/primitives/text/types.ts +6 -1
- package/src/css/primitives/textInput/textInput.css.ts +15 -3
- package/src/css/props/width/types.ts +1 -1
- package/src/css/props/width/width.css.ts +5 -2
- package/src/css/theme/buildCSSTheme.ts +4 -0
- package/src/css/types.ts +4 -0
- package/src/css/vars.css.ts +4 -0
- package/dist/_chunks-cjs/refractor.cjs +0 -22
- package/dist/_chunks-cjs/refractor.cjs.map +0 -1
- package/dist/css/index.cjs +0 -966
- package/dist/css/index.cjs.map +0 -1
- package/dist/css/index.d.cts +0 -1370
- package/dist/index.cjs +0 -4515
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -2521
- package/dist/theme.cjs +0 -870
- package/dist/theme.cjs.map +0 -1
- package/dist/theme.d.cts +0 -499
- package/src/core/primitives/popover/helpers.ts +0 -32
- package/src/core/primitives/tooltip/tooltipDelayGroup/index.ts +0 -4
- /package/src/core/__workshop__/{boundary.tsx → Boundary.tsx} +0 -0
- /package/src/core/components/autocomplete/{autocompleteOption.tsx → AutocompleteOption.tsx} +0 -0
- /package/src/core/components/autocomplete/__workshop__/{async.tsx → Async.tsx} +0 -0
- /package/src/core/components/autocomplete/__workshop__/{constrainedHeight.tsx → ConstrainedHeight.tsx} +0 -0
- /package/src/core/components/autocomplete/__workshop__/{focusAndBlur.tsx → FocusAndBlur.tsx} +0 -0
- /package/src/core/components/autocomplete/__workshop__/{fullscreen.tsx → Fullscreen.tsx} +0 -0
- /package/src/core/components/breadcrumbs/__workshop__/{example.tsx → Example.tsx} +0 -0
- /package/src/core/components/dialog/{dialogContext.ts → DialogContext.ts} +0 -0
- /package/src/core/components/dialog/__workshop__/{activate.tsx → Activate.tsx} +0 -0
- /package/src/core/components/dialog/__workshop__/{autoFocus.tsx → AutoFocus.tsx} +0 -0
- /package/src/core/components/dialog/__workshop__/{layering.tsx → Layering.tsx} +0 -0
- /package/src/core/components/dialog/__workshop__/{nested.tsx → Nested.tsx} +0 -0
- /package/src/core/components/dialog/__workshop__/{onScroll.tsx → OnScroll.tsx} +0 -0
- /package/src/core/components/dialog/__workshop__/{provider.tsx → Provider.tsx} +0 -0
- /package/src/core/components/dialog/__workshop__/{wrapped.tsx → Wrapped.tsx} +0 -0
- /package/src/core/components/hotkeys/__workshop__/{plain.tsx → Plain.tsx} +0 -0
- /package/src/core/components/menu/{menuDivider.tsx → MenuDivider.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{asComponent.tsx → AsComponent.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{avatarMenu.tsx → AvatarMenu.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{closableMenuButton.tsx → ClosableMenuButton.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{constrainedInBoundary.tsx → ConstrainedInBoundary.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{customMenuItem.tsx → CustomMenuItem.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{customSelectedState.tsx → CustomSelectedState.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{disableFocusOnClose.tsx → DisableFocusOnClose.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{groups.tsx → Groups.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{menuGroupRight.tsx → MenuGroupRight.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{nestedMenu.tsx → NestedMenu.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{onCloseMenuButton.tsx → OnCloseMenuButton.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{selectedItem.tsx → SelectedItem.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{shouldFocus.tsx → ShouldFocus.tsx} +0 -0
- /package/src/core/components/menu/__workshop__/{withoutArrow.tsx → WithoutArrow.tsx} +0 -0
- /package/src/core/components/tab/__workshop__/{example.tsx → Example.tsx} +0 -0
- /package/src/core/components/toast/{toastContext.ts → ToastContext.ts} +0 -0
- /package/src/core/components/toast/__workshop__/{hook.tsx → Hook.tsx} +0 -0
- /package/src/core/components/tree/{treeContext.ts → TreeContext.ts} +0 -0
- /package/src/core/components/tree/__workshop__/{basic.tsx → Basic.tsx} +0 -0
- /package/src/core/components/tree/__workshop__/{tabFromElement.tsx → TabFromElement.tsx} +0 -0
- /package/src/core/components/virtualList/__workshop__/{changingProps.tsx → ChangingProps.tsx} +0 -0
- /package/src/core/components/virtualList/__workshop__/{elementScroll.tsx → ElementScroll.tsx} +0 -0
- /package/src/core/components/virtualList/__workshop__/{infiniteList.tsx → InfiniteList.tsx} +0 -0
- /package/src/core/components/virtualList/__workshop__/{windowScrolll.tsx → WindowScrolll.tsx} +0 -0
- /package/src/core/hooks/useMediaIndex/__workshop__/{test.tsx → Test.tsx} +0 -0
- /package/src/core/primitives/arrow/{arrow.tsx → Arrow.tsx} +0 -0
- /package/src/core/primitives/avatar/__workshop__/{withinButton.tsx → WithinButton.tsx} +0 -0
- /package/src/core/primitives/avatar/__workshop__/{withinMenuItem.tsx → WithinMenuItem.tsx} +0 -0
- /package/src/core/primitives/badge/__workshop__/{tones.tsx → Tones.tsx} +0 -0
- /package/src/core/primitives/box/{box.tsx → Box.tsx} +0 -0
- /package/src/core/primitives/box/__workshop__/{responsive.tsx → Responsive.tsx} +0 -0
- /package/src/core/primitives/button/__workshop__/{custom.tsx → Custom.tsx} +0 -0
- /package/src/core/primitives/button/__workshop__/{customIcons.tsx → CustomIcons.tsx} +0 -0
- /package/src/core/primitives/button/__workshop__/{disabled.tsx → Disabled.tsx} +0 -0
- /package/src/core/primitives/button/__workshop__/{mixedChildren.tsx → MixedChildren.tsx} +0 -0
- /package/src/core/primitives/button/__workshop__/{sanityUploadButton.tsx → SanityUploadButton.tsx} +0 -0
- /package/src/core/primitives/button/__workshop__/{styled1.tsx → Styled1.tsx} +0 -0
- /package/src/core/primitives/button/__workshop__/{styled2.tsx → Styled2.tsx} +0 -0
- /package/src/core/primitives/button/__workshop__/{textOverflow.tsx → TextOverflow.tsx} +0 -0
- /package/src/core/primitives/button/__workshop__/{uploadButton.tsx → UploadButton.tsx} +0 -0
- /package/src/core/primitives/card/{cardContext.ts → CardContext.ts} +0 -0
- /package/src/core/primitives/card/__workshop__/{asButton.tsx → AsButton.tsx} +0 -0
- /package/src/core/primitives/card/__workshop__/{asComponent.tsx → AsComponent.tsx} +0 -0
- /package/src/core/primitives/card/__workshop__/{checkered.tsx → Checkered.tsx} +0 -0
- /package/src/core/primitives/card/__workshop__/{interactive.tsx → Interactive.tsx} +0 -0
- /package/src/core/primitives/card/__workshop__/{listNavigation.tsx → ListNavigation.tsx} +0 -0
- /package/src/core/primitives/card/__workshop__/{styled.tsx → Styled.tsx} +0 -0
- /package/src/core/primitives/card/__workshop__/{tones.tsx → Tones.tsx} +0 -0
- /package/src/core/primitives/checkbox/{checkbox.tsx → Checkbox.tsx} +0 -0
- /package/src/core/primitives/checkbox/__workshop__/{example.tsx → Example.tsx} +0 -0
- /package/src/core/primitives/checkbox/__workshop__/{props.tsx → Props.tsx} +0 -0
- /package/src/core/primitives/checkbox/__workshop__/{readOnly.tsx → ReadOnly.tsx} +0 -0
- /package/src/core/primitives/checkbox/__workshop__/{tones.tsx → Tones.tsx} +0 -0
- /package/src/core/primitives/code/{refractor.tsx → Refractor.tsx} +0 -0
- /package/src/core/primitives/code/__workshop__/{opticalAlignment.tsx → OpticalAlignment.tsx} +0 -0
- /package/src/core/primitives/flex/__workshop__/{gap.tsx → Gap.tsx} +0 -0
- /package/src/core/primitives/grid/__workshop__/{responsive.tsx → Responsive.tsx} +0 -0
- /package/src/core/primitives/heading/__workshop__/{opticalAlignment.tsx → OpticalAlignment.tsx} +0 -0
- /package/src/core/primitives/kbd/__workshop__/{plain.tsx → Plain.tsx} +0 -0
- /package/src/core/primitives/label/__workshop__/{opticalAlignment.tsx → OpticalAlignment.tsx} +0 -0
- /package/src/core/primitives/layer/{layerContext.ts → LayerContext.ts} +0 -0
- /package/src/core/primitives/layer/__workshop__/{multipleRoots.tsx → MultipleRoots.tsx} +0 -0
- /package/src/core/primitives/layer/__workshop__/{nested.tsx → Nested.tsx} +0 -0
- /package/src/core/primitives/layer/__workshop__/{responsiveZOffset.tsx → ResponsiveZOffset.tsx} +0 -0
- /package/src/core/primitives/radio/__workshop__/{example.tsx → Example.tsx} +0 -0
- /package/src/core/primitives/radio/__workshop__/{plain.tsx → Plain.tsx} +0 -0
- /package/src/core/primitives/select/__workshop__/{readOnly.tsx → ReadOnly.tsx} +0 -0
- /package/src/core/primitives/skeleton/{skeleton.tsx → Skeleton.tsx} +0 -0
- /package/src/core/primitives/spinner/{animatedSpinnerIcon.tsx → AnimatedSpinnerIcon.tsx} +0 -0
- /package/src/core/primitives/srOnly/{srOnly.tsx → SrOnly.tsx} +0 -0
- /package/src/core/primitives/switch/__workshop__/{example.tsx → Example.tsx} +0 -0
- /package/src/core/primitives/switch/__workshop__/{props.tsx → Props.tsx} +0 -0
- /package/src/core/primitives/text/__workshop__/{opticalAlignment.tsx → OpticalAlignment.tsx} +0 -0
- /package/src/core/primitives/textInput/__workshop__/{clearButton.tsx → ClearButton.tsx} +0 -0
- /package/src/core/primitives/textInput/__workshop__/{customValidity.tsx → CustomValidity.tsx} +0 -0
- /package/src/core/primitives/textInput/__workshop__/{readOnly.tsx → ReadOnly.tsx} +0 -0
- /package/src/core/primitives/textInput/__workshop__/{states.tsx → States.tsx} +0 -0
- /package/src/core/primitives/textInput/__workshop__/{tones.tsx → Tones.tsx} +0 -0
- /package/src/core/primitives/tooltip/tooltipDelayGroup/{tooltipDelayGroupContext.tsx → TooltipDelayGroupContext.tsx} +0 -0
- /package/src/core/utils/boundaryElement/{boundaryElementContext.ts → BoundaryElementContext.ts} +0 -0
- /package/src/core/utils/boundaryElement/__workshop__/{plain.tsx → Plain.tsx} +0 -0
- /package/src/core/utils/elementQuery/{elementQuery.tsx → ElementQuery.tsx} +0 -0
- /package/src/core/utils/elementQuery/__workshop__/{customMedia.tsx → CustomMedia.tsx} +0 -0
- /package/src/core/utils/portal/{portalContext.ts → PortalContext.ts} +0 -0
- /package/src/core/utils/portal/__workshop__/{named.tsx → Named.tsx} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { SpinnerIcon, CloseIcon, ChevronDownIcon, ChevronRightIcon, ToggleArrowRightIcon, CheckmarkIcon, RemoveIcon } from "@sanity/icons";
|
|
3
|
-
import { useState, isValidElement, useDebugValue, useSyncExternalStore, createContext,
|
|
3
|
+
import { useState, isValidElement, useDebugValue, useSyncExternalStore, createContext, use, useRef, useImperativeHandle, useEffect, useMemo, useCallback, cloneElement, useReducer, Children, Fragment as Fragment$1, startTransition, useId, lazy, Suspense, useLayoutEffect, Component } from "react";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { box, text, textOverflow, animatedSpinnerIcon, spinner, button, buttonLoadingBox, _arrow, vars, _arrowSvg, _arrowStrokeMask, _arrowStroke, _arrowShape, card, BREAKPOINTS, popoverCard, popover, _selectable, stack, textInput, textInputPrefix, textInputElement, _inputElement, _inputPresentation, textInputSuffix, breadcrumbs, container as container$1, dialogCard, dialogHeader, dialogContent, dialogScrollerShadowTop, dialogScroller, dialogScrollerShadowBottom, dialogFooter, dialog, dialogContainer, kbd, menu, menuDivider, toast, toastLayer, treeItem, label, avatar, avatarArrow, avatarInitials, avatarImage, avatarImageOutline, avatarCounter, avatarStack, badge, checkbox, checkboxInput, checkboxPresentation, code, heading, radio, radioInput, radioPresentation, select, selectPresentation, skeleton, codeSkeleton, headingSkeleton, labelSkeleton, textSkeleton, srOnly, _switch, _switchElement, _switchPresentation, _switchTrack, _switchThumb, textArea, tooltip, root } from "@sanity/ui/css";
|
|
6
6
|
import { isValidElementType } from "react-is";
|
|
@@ -272,40 +272,54 @@ function Box(props) {
|
|
|
272
272
|
}
|
|
273
273
|
const DEFAULT_TEXT_ELEMENT = "div";
|
|
274
274
|
function Text(props) {
|
|
275
|
-
const $ = c(
|
|
276
|
-
let align, children, className, flex, muted, rest, t1, t2, t3, t4, textOverflowProp;
|
|
275
|
+
const $ = c(44), t0 = props;
|
|
276
|
+
let align, children, className, flex, margin, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, muted, rest, t1, t2, t3, t4, textOverflowProp;
|
|
277
277
|
$[0] !== t0 ? ({
|
|
278
278
|
align,
|
|
279
279
|
as: t1,
|
|
280
280
|
children,
|
|
281
281
|
className,
|
|
282
282
|
flex,
|
|
283
|
+
margin,
|
|
284
|
+
marginX,
|
|
285
|
+
marginY,
|
|
286
|
+
marginTop,
|
|
287
|
+
marginRight,
|
|
288
|
+
marginBottom,
|
|
289
|
+
marginLeft,
|
|
283
290
|
maxWidth: t2,
|
|
284
291
|
muted,
|
|
285
292
|
size: t3,
|
|
286
293
|
textOverflow: textOverflowProp,
|
|
287
294
|
weight: t4,
|
|
288
295
|
...rest
|
|
289
|
-
} = t0, $[0] = t0, $[1] = align, $[2] = children, $[3] = className, $[4] = flex, $[5] =
|
|
296
|
+
} = t0, $[0] = t0, $[1] = align, $[2] = children, $[3] = className, $[4] = flex, $[5] = margin, $[6] = marginBottom, $[7] = marginLeft, $[8] = marginRight, $[9] = marginTop, $[10] = marginX, $[11] = marginY, $[12] = muted, $[13] = rest, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4, $[18] = textOverflowProp) : (align = $[1], children = $[2], className = $[3], flex = $[4], margin = $[5], marginBottom = $[6], marginLeft = $[7], marginRight = $[8], marginTop = $[9], marginX = $[10], marginY = $[11], muted = $[12], rest = $[13], t1 = $[14], t2 = $[15], t3 = $[16], t4 = $[17], textOverflowProp = $[18]);
|
|
290
297
|
const Element2 = t1 === void 0 ? DEFAULT_TEXT_ELEMENT : t1, maxWidth = t2 === void 0 ? "fill" : t2, size2 = t3 === void 0 ? 2 : t3, weight = t4 === void 0 ? "regular" : t4;
|
|
291
298
|
let t5;
|
|
292
|
-
$[
|
|
299
|
+
$[19] !== align || $[20] !== className || $[21] !== flex || $[22] !== margin || $[23] !== marginBottom || $[24] !== marginLeft || $[25] !== marginRight || $[26] !== marginTop || $[27] !== marginX || $[28] !== marginY || $[29] !== maxWidth || $[30] !== muted || $[31] !== size2 || $[32] !== weight ? (t5 = text({
|
|
293
300
|
className,
|
|
294
301
|
align,
|
|
295
302
|
flex,
|
|
303
|
+
margin,
|
|
304
|
+
marginX,
|
|
305
|
+
marginY,
|
|
306
|
+
marginTop,
|
|
307
|
+
marginRight,
|
|
308
|
+
marginBottom,
|
|
309
|
+
marginLeft,
|
|
296
310
|
maxWidth,
|
|
297
311
|
muted,
|
|
298
312
|
size: size2,
|
|
299
313
|
weight
|
|
300
|
-
}), $[
|
|
314
|
+
}), $[19] = align, $[20] = className, $[21] = flex, $[22] = margin, $[23] = marginBottom, $[24] = marginLeft, $[25] = marginRight, $[26] = marginTop, $[27] = marginX, $[28] = marginY, $[29] = maxWidth, $[30] = muted, $[31] = size2, $[32] = weight, $[33] = t5) : t5 = $[33];
|
|
301
315
|
let t6;
|
|
302
|
-
$[
|
|
316
|
+
$[34] !== textOverflowProp ? (t6 = textOverflow({
|
|
303
317
|
textOverflow: textOverflowProp
|
|
304
|
-
}), $[
|
|
318
|
+
}), $[34] = textOverflowProp, $[35] = t6) : t6 = $[35];
|
|
305
319
|
let t7;
|
|
306
|
-
$[
|
|
320
|
+
$[36] !== children || $[37] !== t6 ? (t7 = /* @__PURE__ */ jsx("span", { className: t6, children }), $[36] = children, $[37] = t6, $[38] = t7) : t7 = $[38];
|
|
307
321
|
let t8;
|
|
308
|
-
return $[
|
|
322
|
+
return $[39] !== Element2 || $[40] !== rest || $[41] !== t5 || $[42] !== t7 ? (t8 = /* @__PURE__ */ jsx(Element2, { "data-ui": "Text", ...rest, className: t5, children: t7 }), $[39] = Element2, $[40] = rest, $[41] = t5, $[42] = t7, $[43] = t8) : t8 = $[43], t8;
|
|
309
323
|
}
|
|
310
324
|
function AnimatedSpinnerIcon(props) {
|
|
311
325
|
const $ = c(5);
|
|
@@ -355,6 +369,7 @@ function Button(props) {
|
|
|
355
369
|
justify = "center",
|
|
356
370
|
loading,
|
|
357
371
|
mode = "default",
|
|
372
|
+
muted = !1,
|
|
358
373
|
padding = 3,
|
|
359
374
|
paddingX,
|
|
360
375
|
paddingY,
|
|
@@ -370,7 +385,6 @@ function Button(props) {
|
|
|
370
385
|
textWeight = "medium",
|
|
371
386
|
tone = "default",
|
|
372
387
|
type = "button",
|
|
373
|
-
muted = !1,
|
|
374
388
|
width,
|
|
375
389
|
...rest
|
|
376
390
|
} = props;
|
|
@@ -388,8 +402,8 @@ function Button(props) {
|
|
|
388
402
|
tone,
|
|
389
403
|
width
|
|
390
404
|
}),
|
|
391
|
-
"data-disabled": loading || disabled ? "" :
|
|
392
|
-
"data-selected": selected ? "" :
|
|
405
|
+
"data-disabled": loading || disabled ? "" : props["data-disabled"],
|
|
406
|
+
"data-selected": selected ? "" : props["data-selected"],
|
|
393
407
|
disabled: !!(loading || disabled),
|
|
394
408
|
href: disabled ? void 0 : href,
|
|
395
409
|
type,
|
|
@@ -479,7 +493,7 @@ const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/v3/boundary
|
|
|
479
493
|
element: null
|
|
480
494
|
};
|
|
481
495
|
function useBoundaryElement() {
|
|
482
|
-
const value =
|
|
496
|
+
const value = use(BoundaryElementContext);
|
|
483
497
|
if (value && (!isRecord(value) || value.version !== 0))
|
|
484
498
|
throw new Error("useBoundaryElement(): the context value is not compatible");
|
|
485
499
|
return value || DEFAULT_VALUE;
|
|
@@ -496,17 +510,18 @@ function CardProvider(props) {
|
|
|
496
510
|
scheme,
|
|
497
511
|
unstable_CompatProvider
|
|
498
512
|
} = props;
|
|
499
|
-
let t0
|
|
500
|
-
$[0] !== scheme || $[1] !== tone || $[2] !== unstable_CompatProvider ? (
|
|
513
|
+
let t0;
|
|
514
|
+
$[0] !== scheme || $[1] !== tone || $[2] !== unstable_CompatProvider ? (t0 = {
|
|
501
515
|
tone,
|
|
502
516
|
scheme,
|
|
503
517
|
unstable_CompatProvider
|
|
504
|
-
}, $[0] = scheme, $[1] = tone, $[2] = unstable_CompatProvider, $[3] =
|
|
518
|
+
}, $[0] = scheme, $[1] = tone, $[2] = unstable_CompatProvider, $[3] = t0) : t0 = $[3];
|
|
519
|
+
const t1 = t0;
|
|
505
520
|
let t2;
|
|
506
|
-
return $[4] !== children || $[5] !==
|
|
521
|
+
return $[4] !== children || $[5] !== t1 ? (t2 = /* @__PURE__ */ jsx(CardContext.Provider, { value: t1, children }), $[4] = children, $[5] = t1, $[6] = t2) : t2 = $[6], t2;
|
|
507
522
|
}
|
|
508
523
|
function useCard() {
|
|
509
|
-
const card2 =
|
|
524
|
+
const card2 = use(CardContext);
|
|
510
525
|
if (!card2)
|
|
511
526
|
throw new Error("useCard(): missing context value");
|
|
512
527
|
return card2;
|
|
@@ -521,7 +536,7 @@ const defaultContextValue = {
|
|
|
521
536
|
}
|
|
522
537
|
}, PortalContext = createGlobalScopedContext(key, defaultContextValue);
|
|
523
538
|
function usePortal() {
|
|
524
|
-
const value =
|
|
539
|
+
const value = use(PortalContext);
|
|
525
540
|
if (!value)
|
|
526
541
|
throw new Error("usePortal(): missing context value");
|
|
527
542
|
if (!isRecord(value) || value.version !== 0)
|
|
@@ -551,14 +566,12 @@ function getLayerContext(contextValue) {
|
|
|
551
566
|
}
|
|
552
567
|
const LayerContext = createGlobalScopedContext("@sanity/ui/v3/layer", null);
|
|
553
568
|
function useLayer() {
|
|
554
|
-
const
|
|
569
|
+
const value = use(LayerContext);
|
|
555
570
|
if (!value)
|
|
556
571
|
throw new Error("useLayer(): missing context value");
|
|
557
572
|
try {
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
} catch (t0) {
|
|
561
|
-
const err = t0;
|
|
573
|
+
return getLayerContext(value);
|
|
574
|
+
} catch (err) {
|
|
562
575
|
throw err instanceof Error ? new Error(`useLayer(): ${err.message}`) : new Error(`useLayer(): ${err}`);
|
|
563
576
|
}
|
|
564
577
|
}
|
|
@@ -665,9 +678,7 @@ function Arrow(props) {
|
|
|
665
678
|
style,
|
|
666
679
|
...rest
|
|
667
680
|
} = t0, $[0] = t0, $[1] = h, $[2] = rest, $[3] = style, $[4] = t1, $[5] = t2, $[6] = w) : (h = $[1], rest = $[2], style = $[3], t1 = $[4], t2 = $[5], w = $[6]);
|
|
668
|
-
const Element2 = t1 === void 0 ? DEFAULT_ARROW_ELEMENT : t1, radius = t2 === void 0 ? 0 : t2, center = w / 2
|
|
669
|
-
let t3;
|
|
670
|
-
const points = [{
|
|
681
|
+
const Element2 = t1 === void 0 ? DEFAULT_ARROW_ELEMENT : t1, radius = t2 === void 0 ? 0 : t2, center = w / 2, points = [{
|
|
671
682
|
x: 0,
|
|
672
683
|
y: 0
|
|
673
684
|
}, {
|
|
@@ -685,44 +696,42 @@ function Arrow(props) {
|
|
|
685
696
|
}, {
|
|
686
697
|
x: w,
|
|
687
698
|
y: 0
|
|
688
|
-
}], cmds = getRoundedCommands(points)
|
|
689
|
-
t3
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
699
|
+
}], cmds = getRoundedCommands(points), path = compileCommands(cmds), strokePath = `${path}`, fillPath = `${path} M ${w} -1 M 0 -1 Z`;
|
|
700
|
+
let t3;
|
|
701
|
+
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t3 = _arrow(), $[7] = t3) : t3 = $[7];
|
|
702
|
+
const t4 = `${w}px`;
|
|
703
|
+
let t5;
|
|
704
|
+
$[8] !== t4 ? (t5 = assignInlineVars({
|
|
705
|
+
[vars.arrow.size]: t4
|
|
706
|
+
}), $[8] = t4, $[9] = t5) : t5 = $[9];
|
|
694
707
|
let t6;
|
|
695
|
-
$[
|
|
696
|
-
[vars.arrow.size]: t5
|
|
697
|
-
}), $[8] = t5, $[9] = t6) : t6 = $[9];
|
|
698
|
-
let t7;
|
|
699
|
-
$[10] !== style || $[11] !== t6 ? (t7 = {
|
|
708
|
+
$[10] !== style || $[11] !== t5 ? (t6 = {
|
|
700
709
|
...style,
|
|
701
|
-
...
|
|
702
|
-
}, $[10] = style, $[11] =
|
|
703
|
-
let
|
|
704
|
-
$[13] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
705
|
-
const
|
|
710
|
+
...t5
|
|
711
|
+
}, $[10] = style, $[11] = t5, $[12] = t6) : t6 = $[12];
|
|
712
|
+
let t7;
|
|
713
|
+
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t7 = _arrowSvg(), $[13] = t7) : t7 = $[13];
|
|
714
|
+
const t8 = `0 0 ${w} ${w}`;
|
|
715
|
+
let t9;
|
|
716
|
+
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t9 = _arrowStrokeMask(), $[14] = t9) : t9 = $[14];
|
|
706
717
|
let t10;
|
|
707
|
-
$[
|
|
718
|
+
$[15] !== w ? (t10 = /* @__PURE__ */ jsx("mask", { id: "stroke-mask", children: /* @__PURE__ */ jsx("rect", { className: t9, x: 0, width: w, height: w, fill: "white" }) }), $[15] = w, $[16] = t10) : t10 = $[16];
|
|
708
719
|
let t11;
|
|
709
|
-
$[
|
|
720
|
+
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t11 = _arrowStroke(), $[17] = t11) : t11 = $[17];
|
|
710
721
|
let t12;
|
|
711
|
-
$[
|
|
722
|
+
$[18] !== strokePath ? (t12 = /* @__PURE__ */ jsx("path", { className: t11, d: strokePath, mask: "url(#stroke-mask)" }), $[18] = strokePath, $[19] = t12) : t12 = $[19];
|
|
712
723
|
let t13;
|
|
713
|
-
$[
|
|
724
|
+
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t13 = _arrowShape(), $[20] = t13) : t13 = $[20];
|
|
714
725
|
let t14;
|
|
715
|
-
$[
|
|
726
|
+
$[21] !== fillPath ? (t14 = /* @__PURE__ */ jsx("path", { className: t13, d: fillPath }), $[21] = fillPath, $[22] = t14) : t14 = $[22];
|
|
716
727
|
let t15;
|
|
717
|
-
$[
|
|
728
|
+
$[23] !== t10 || $[24] !== t12 || $[25] !== t14 || $[26] !== t8 || $[27] !== w ? (t15 = /* @__PURE__ */ jsxs("svg", { className: t7, width: w, height: w, viewBox: t8, children: [
|
|
729
|
+
t10,
|
|
730
|
+
t12,
|
|
731
|
+
t14
|
|
732
|
+
] }), $[23] = t10, $[24] = t12, $[25] = t14, $[26] = t8, $[27] = w, $[28] = t15) : t15 = $[28];
|
|
718
733
|
let t16;
|
|
719
|
-
$[
|
|
720
|
-
t11,
|
|
721
|
-
t13,
|
|
722
|
-
t15
|
|
723
|
-
] }), $[23] = t11, $[24] = t13, $[25] = t15, $[26] = t9, $[27] = w, $[28] = t16) : t16 = $[28];
|
|
724
|
-
let t17;
|
|
725
|
-
return $[29] !== Element2 || $[30] !== rest || $[31] !== t16 || $[32] !== t7 ? (t17 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t4, style: t7, children: t16 }), $[29] = Element2, $[30] = rest, $[31] = t16, $[32] = t7, $[33] = t17) : t17 = $[33], t17;
|
|
734
|
+
return $[29] !== Element2 || $[30] !== rest || $[31] !== t15 || $[32] !== t6 ? (t16 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t3, style: t6, children: t15 }), $[29] = Element2, $[30] = rest, $[31] = t15, $[32] = t6, $[33] = t16) : t16 = $[33], t16;
|
|
726
735
|
}
|
|
727
736
|
const DEFAULT_FLEX_ELEMENT = "div";
|
|
728
737
|
function Flex(props) {
|
|
@@ -742,14 +751,13 @@ function Flex(props) {
|
|
|
742
751
|
}
|
|
743
752
|
const DEFAULT_CARD_ELEMENT = "div";
|
|
744
753
|
function Card(props) {
|
|
745
|
-
const $ = c(
|
|
746
|
-
let className,
|
|
754
|
+
const $ = c(37), t0 = props;
|
|
755
|
+
let className, pressed, rest, schemeProp, selected, style, t1, t2, t3, t4, t5;
|
|
747
756
|
$[0] !== t0 ? ({
|
|
748
757
|
__unstable_checkered: t1,
|
|
749
758
|
__unstable_focusRing: t2,
|
|
750
759
|
as: t3,
|
|
751
760
|
className,
|
|
752
|
-
disabled,
|
|
753
761
|
pressed,
|
|
754
762
|
radius: t4,
|
|
755
763
|
scheme: schemeProp,
|
|
@@ -757,26 +765,26 @@ function Card(props) {
|
|
|
757
765
|
style,
|
|
758
766
|
tone: t5,
|
|
759
767
|
...rest
|
|
760
|
-
} = t0, $[0] = t0, $[1] = className, $[2] =
|
|
761
|
-
const checkered = t1 === void 0 ? !1 : t1, focusRing = t2 === void 0 ? !1 : t2, as = t3 === void 0 ? DEFAULT_CARD_ELEMENT : t3, radius = t4 === void 0 ? 0 : t4, toneProp = t5 === void 0 ? "default" : t5, parent =
|
|
768
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = pressed, $[3] = rest, $[4] = schemeProp, $[5] = selected, $[6] = style, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = t4, $[11] = t5) : (className = $[1], pressed = $[2], rest = $[3], schemeProp = $[4], selected = $[5], style = $[6], t1 = $[7], t2 = $[8], t3 = $[9], t4 = $[10], t5 = $[11]);
|
|
769
|
+
const checkered = t1 === void 0 ? !1 : t1, focusRing = t2 === void 0 ? !1 : t2, as = t3 === void 0 ? DEFAULT_CARD_ELEMENT : t3, radius = t4 === void 0 ? 0 : t4, toneProp = t5 === void 0 ? "default" : t5, parent = use(CardContext), tone = toneProp === "inherit" ? parent?.tone : toneProp, scheme = schemeProp === void 0 ? parent?.scheme : schemeProp, t6 = scheme === parent?.scheme ? void 0 : scheme;
|
|
762
770
|
let t7;
|
|
763
|
-
$[
|
|
771
|
+
$[12] !== className || $[13] !== t6 || $[14] !== tone ? (t7 = card({
|
|
764
772
|
className,
|
|
765
773
|
scheme: t6,
|
|
766
774
|
tone
|
|
767
|
-
}), $[
|
|
768
|
-
const t8 = checkered ? "" : void 0, t9 = disabled ? "" :
|
|
775
|
+
}), $[12] = className, $[13] = t6, $[14] = tone, $[15] = t7) : t7 = $[15];
|
|
776
|
+
const t8 = checkered ? "" : void 0, t9 = props.disabled ? "" : props["data-disabled"], t10 = focusRing ? "" : props["data-focus-ring"], t11 = pressed ? "" : props["data-pressed"], t12 = selected ? "" : props["data-selected"];
|
|
769
777
|
let t13;
|
|
770
|
-
$[
|
|
778
|
+
$[16] !== as || $[17] !== radius || $[18] !== rest || $[19] !== style || $[20] !== t10 || $[21] !== t11 || $[22] !== t12 || $[23] !== t7 || $[24] !== t8 || $[25] !== t9 ? (t13 = /* @__PURE__ */ jsx(Box, { "data-ui": "Card", ...rest, as, className: t7, "data-checkered": t8, "data-disabled": t9, "data-focus-ring": t10, "data-pressed": t11, "data-selected": t12, radius, style }), $[16] = as, $[17] = radius, $[18] = rest, $[19] = style, $[20] = t10, $[21] = t11, $[22] = t12, $[23] = t7, $[24] = t8, $[25] = t9, $[26] = t13) : t13 = $[26];
|
|
771
779
|
let node = t13;
|
|
772
780
|
if (scheme === parent?.scheme && tone === parent?.tone)
|
|
773
781
|
return node;
|
|
774
782
|
const t14 = scheme ?? "light", t15 = tone ?? "default", t16 = parent?.unstable_CompatProvider;
|
|
775
783
|
let t17;
|
|
776
|
-
if ($[
|
|
784
|
+
if ($[27] !== node || $[28] !== t14 || $[29] !== t15 || $[30] !== t16 ? (t17 = /* @__PURE__ */ jsx(CardProvider, { scheme: t14, tone: t15, unstable_CompatProvider: t16, children: node }), $[27] = node, $[28] = t14, $[29] = t15, $[30] = t16, $[31] = t17) : t17 = $[31], node = t17, parent?.unstable_CompatProvider) {
|
|
777
785
|
const CompatProvider = parent.unstable_CompatProvider, t18 = scheme ?? "light", t19 = tone ?? parent.tone;
|
|
778
786
|
let t20;
|
|
779
|
-
return $[
|
|
787
|
+
return $[32] !== CompatProvider || $[33] !== node || $[34] !== t18 || $[35] !== t19 ? (t20 = /* @__PURE__ */ jsx(CompatProvider, { scheme: t18, tone: t19, children: node }), $[32] = CompatProvider, $[33] = node, $[34] = t18, $[35] = t19, $[36] = t20) : t20 = $[36], t20;
|
|
780
788
|
}
|
|
781
789
|
return node;
|
|
782
790
|
}
|
|
@@ -874,8 +882,8 @@ function getServerSnapshot() {
|
|
|
874
882
|
}
|
|
875
883
|
function useMediaIndex() {
|
|
876
884
|
const $ = c(1);
|
|
877
|
-
let t0
|
|
878
|
-
$[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
885
|
+
let t0;
|
|
886
|
+
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = _createMediaStore(), $[0] = t0) : t0 = $[0];
|
|
879
887
|
const store = t0;
|
|
880
888
|
return useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot);
|
|
881
889
|
}
|
|
@@ -883,7 +891,7 @@ function LayerProvider(props) {
|
|
|
883
891
|
const $ = c(19), {
|
|
884
892
|
children,
|
|
885
893
|
zOffset: t0
|
|
886
|
-
} = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue =
|
|
894
|
+
} = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue = use(LayerContext);
|
|
887
895
|
let t1;
|
|
888
896
|
$[0] !== parentContextValue ? (t1 = parentContextValue && getLayerContext(parentContextValue), $[0] = parentContextValue, $[1] = t1) : t1 = $[1];
|
|
889
897
|
const parent = t1, parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1, zOffset = useResponsiveProp(zOffsetProp), maxMediaIndex = Object.values(zOffset).length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + (zOffset[mediaIndex] ?? 0) : zOffset[mediaIndex] ?? 0;
|
|
@@ -911,18 +919,18 @@ function LayerProvider(props) {
|
|
|
911
919
|
const registerChild = t3;
|
|
912
920
|
let t4, t5;
|
|
913
921
|
$[6] !== level || $[7] !== parentRegisterChild ? (t4 = () => parentRegisterChild?.(level), t5 = [level, parentRegisterChild], $[6] = level, $[7] = parentRegisterChild, $[8] = t4, $[9] = t5) : (t4 = $[8], t5 = $[9]), useEffect(t4, t5);
|
|
914
|
-
let t6
|
|
915
|
-
$[10] !== isTopLayer || $[11] !== level || $[12] !== registerChild || $[13] !== size2 || $[14] !== zIndex ? (
|
|
922
|
+
let t6;
|
|
923
|
+
$[10] !== isTopLayer || $[11] !== level || $[12] !== registerChild || $[13] !== size2 || $[14] !== zIndex ? (t6 = {
|
|
916
924
|
version: 0,
|
|
917
925
|
isTopLayer,
|
|
918
926
|
level,
|
|
919
927
|
registerChild,
|
|
920
928
|
size: size2,
|
|
921
929
|
zIndex
|
|
922
|
-
}, $[10] = isTopLayer, $[11] = level, $[12] = registerChild, $[13] = size2, $[14] = zIndex, $[15] =
|
|
930
|
+
}, $[10] = isTopLayer, $[11] = level, $[12] = registerChild, $[13] = size2, $[14] = zIndex, $[15] = t6) : t6 = $[15];
|
|
923
931
|
const value = t6;
|
|
924
|
-
let
|
|
925
|
-
return $[16] !== children || $[17] !== value ? (
|
|
932
|
+
let t7;
|
|
933
|
+
return $[16] !== children || $[17] !== value ? (t7 = /* @__PURE__ */ jsx(LayerContext.Provider, { value, children }), $[16] = children, $[17] = value, $[18] = t7) : t7 = $[18], t7;
|
|
926
934
|
}
|
|
927
935
|
function _temp2$2(v_0) {
|
|
928
936
|
return v_0 - 1;
|
|
@@ -973,52 +981,45 @@ function PopoverLayer(props) {
|
|
|
973
981
|
y: yProp,
|
|
974
982
|
...rest
|
|
975
983
|
} = props, $[0] = props, $[1] = animate, $[2] = arrow2, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = maxWidth, $[9] = originX, $[10] = originY, $[11] = overflow, $[12] = padding, $[13] = placement, $[14] = radius, $[15] = referenceWidth, $[16] = rest, $[17] = shadow, $[18] = strategy, $[19] = style, $[20] = t0, $[21] = xProp, $[22] = yProp) : (animate = $[1], arrow2 = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], maxWidth = $[8], originX = $[9], originY = $[10], overflow = $[11], padding = $[12], placement = $[13], radius = $[14], referenceWidth = $[15], rest = $[16], shadow = $[17], strategy = $[18], style = $[19], t0 = $[20], xProp = $[21], yProp = $[22]);
|
|
976
|
-
const tone = t0 === void 0 ? "inherit" : t0;
|
|
977
|
-
let t1;
|
|
978
|
-
t1 = marginsProp || DEFAULT_POPOVER_MARGINS;
|
|
979
|
-
const margins = t1, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0];
|
|
984
|
+
const tone = t0 === void 0 ? "inherit" : t0, margins = marginsProp || DEFAULT_POPOVER_MARGINS, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0], t1 = animate ? "transform" : void 0;
|
|
980
985
|
let t2;
|
|
981
|
-
|
|
982
|
-
let t4;
|
|
983
|
-
$[23] !== originX || $[24] !== originY || $[25] !== referenceWidth || $[26] !== style || $[27] !== t3 || $[28] !== x || $[29] !== y ? (t4 = {
|
|
986
|
+
$[23] !== originX || $[24] !== originY || $[25] !== referenceWidth || $[26] !== style || $[27] !== t1 || $[28] !== x || $[29] !== y ? (t2 = {
|
|
984
987
|
left: x,
|
|
985
988
|
originX,
|
|
986
989
|
originY,
|
|
987
990
|
top: y,
|
|
988
991
|
width: referenceWidth,
|
|
989
|
-
willChange:
|
|
992
|
+
willChange: t1,
|
|
990
993
|
...style
|
|
991
|
-
}, $[23] = originX, $[24] = originY, $[25] = referenceWidth, $[26] = style, $[27] =
|
|
992
|
-
const rootStyle = t2;
|
|
994
|
+
}, $[23] = originX, $[24] = originY, $[25] = referenceWidth, $[26] = style, $[27] = t1, $[28] = x, $[29] = y, $[30] = t2) : t2 = $[30];
|
|
995
|
+
const rootStyle = t2, t3 = arrowX !== null ? arrowX : void 0, t4 = arrowY !== null ? arrowY : void 0;
|
|
993
996
|
let t5;
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
left: t6,
|
|
998
|
-
top: t7,
|
|
997
|
+
$[31] !== t3 || $[32] !== t4 ? (t5 = {
|
|
998
|
+
left: t3,
|
|
999
|
+
top: t4,
|
|
999
1000
|
right: void 0,
|
|
1000
1001
|
bottom: void 0
|
|
1001
|
-
}, $[31] =
|
|
1002
|
+
}, $[31] = t3, $[32] = t4, $[33] = t5) : t5 = $[33];
|
|
1002
1003
|
const arrowStyle = t5;
|
|
1004
|
+
let t6;
|
|
1005
|
+
$[34] === Symbol.for("react.memo_cache_sentinel") ? (t6 = popoverCard(), $[34] = t6) : t6 = $[34];
|
|
1006
|
+
let t7;
|
|
1007
|
+
$[35] !== animate ? (t7 = animate ? ["hidden", "initial"] : void 0, $[35] = animate, $[36] = t7) : t7 = $[36];
|
|
1008
|
+
let t8;
|
|
1009
|
+
$[37] !== animate ? (t8 = animate ? ["visible", "scaleIn"] : void 0, $[37] = animate, $[38] = t8) : t8 = $[38];
|
|
1003
1010
|
let t9;
|
|
1004
|
-
$[
|
|
1011
|
+
$[39] !== animate ? (t9 = animate ? ["hidden", "scaleOut"] : void 0, $[39] = animate, $[40] = t9) : t9 = $[40];
|
|
1005
1012
|
let t10;
|
|
1006
|
-
$[
|
|
1013
|
+
$[41] !== children || $[42] !== padding ? (t10 = /* @__PURE__ */ jsx(Flex, { direction: "column", flex: 1, padding, children }), $[41] = children, $[42] = padding, $[43] = t10) : t10 = $[43];
|
|
1007
1014
|
let t11;
|
|
1008
|
-
$[
|
|
1015
|
+
$[44] !== maxWidth || $[45] !== overflow || $[46] !== t10 ? (t11 = /* @__PURE__ */ jsx(Flex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, maxWidth, overflow, children: t10 }), $[44] = maxWidth, $[45] = overflow, $[46] = t10, $[47] = t11) : t11 = $[47];
|
|
1009
1016
|
let t12;
|
|
1010
|
-
$[
|
|
1017
|
+
$[48] !== arrow2 || $[49] !== arrowRef || $[50] !== arrowStyle ? (t12 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[48] = arrow2, $[49] = arrowRef, $[50] = arrowStyle, $[51] = t12) : t12 = $[51];
|
|
1011
1018
|
let t13;
|
|
1012
|
-
$[
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
$[48] !== arrow2 || $[49] !== arrowRef || $[50] !== arrowStyle ? (t15 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[48] = arrow2, $[49] = arrowRef, $[50] = arrowStyle, $[51] = t15) : t15 = $[51];
|
|
1017
|
-
let t16;
|
|
1018
|
-
return $[52] !== placement || $[53] !== radius || $[54] !== rest || $[55] !== rootStyle || $[56] !== shadow || $[57] !== strategy || $[58] !== t10 || $[59] !== t11 || $[60] !== t12 || $[61] !== t14 || $[62] !== t15 || $[63] !== tone ? (t16 = /* @__PURE__ */ jsxs(Layer, { className: t9, "data-ui": "Popover", ...rest, as: motion.div, "data-context-tone": tone, "data-placement": placement, flexDirection: "column", display: "flex", position: strategy, radius, shadow, sizing: "border", style: rootStyle, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t10, animate: t11, exit: t12, children: [
|
|
1019
|
-
t14,
|
|
1020
|
-
t15
|
|
1021
|
-
] }), $[52] = placement, $[53] = radius, $[54] = rest, $[55] = rootStyle, $[56] = shadow, $[57] = strategy, $[58] = t10, $[59] = t11, $[60] = t12, $[61] = t14, $[62] = t15, $[63] = tone, $[64] = t16) : t16 = $[64], t16;
|
|
1019
|
+
return $[52] !== placement || $[53] !== radius || $[54] !== rest || $[55] !== rootStyle || $[56] !== shadow || $[57] !== strategy || $[58] !== t11 || $[59] !== t12 || $[60] !== t7 || $[61] !== t8 || $[62] !== t9 || $[63] !== tone ? (t13 = /* @__PURE__ */ jsxs(Layer, { className: t6, "data-ui": "Popover", ...rest, as: motion.div, "data-context-tone": tone, "data-placement": placement, flexDirection: "column", display: "flex", position: strategy, radius, shadow, sizing: "border", style: rootStyle, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t7, animate: t8, exit: t9, children: [
|
|
1020
|
+
t11,
|
|
1021
|
+
t12
|
|
1022
|
+
] }), $[52] = placement, $[53] = radius, $[54] = rest, $[55] = rootStyle, $[56] = shadow, $[57] = strategy, $[58] = t11, $[59] = t12, $[60] = t7, $[61] = t8, $[62] = t9, $[63] = tone, $[64] = t13) : t13 = $[64], t13;
|
|
1022
1023
|
}
|
|
1023
1024
|
const DEFAULT_POPOVER_ELEMENT = "div";
|
|
1024
1025
|
function ViewportOverlay() {
|
|
@@ -1049,7 +1050,6 @@ function Popover(props) {
|
|
|
1049
1050
|
matchReferenceWidth,
|
|
1050
1051
|
floatingBoundary = boundaryElementContext.element,
|
|
1051
1052
|
modal,
|
|
1052
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1053
1053
|
onActivate,
|
|
1054
1054
|
open,
|
|
1055
1055
|
overflow = "hidden",
|
|
@@ -1166,7 +1166,7 @@ function Selectable(props) {
|
|
|
1166
1166
|
radius,
|
|
1167
1167
|
tone
|
|
1168
1168
|
}), $[7] = className, $[8] = radius, $[9] = tone, $[10] = t2) : t2 = $[10];
|
|
1169
|
-
const t3 = selected ? "" :
|
|
1169
|
+
const t3 = selected ? "" : props["data-selected"];
|
|
1170
1170
|
let t4;
|
|
1171
1171
|
return $[11] !== as || $[12] !== rest || $[13] !== t2 || $[14] !== t3 ? (t4 = /* @__PURE__ */ jsx(Box, { ...rest, as, className: t2, "data-selected": t3 }), $[11] = as, $[12] = rest, $[13] = t2, $[14] = t3, $[15] = t4) : t4 = $[15], t4;
|
|
1172
1172
|
}
|
|
@@ -1189,18 +1189,16 @@ function Stack(props) {
|
|
|
1189
1189
|
return $[7] !== as || $[8] !== gap || $[9] !== rest || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsx(Box, { "data-ui": "Stack", ...rest, as, gridAutoRows: "min", className: t2, display: "grid", gap }), $[7] = as, $[8] = gap, $[9] = rest, $[10] = t2, $[11] = t3) : t3 = $[11], t3;
|
|
1190
1190
|
}
|
|
1191
1191
|
function useCustomValidity(ref, customValidity) {
|
|
1192
|
-
const $ = c(
|
|
1193
|
-
let t0;
|
|
1194
|
-
$[0] !== customValidity || $[1] !== ref
|
|
1192
|
+
const $ = c(4);
|
|
1193
|
+
let t0, t1;
|
|
1194
|
+
$[0] !== customValidity || $[1] !== ref ? (t0 = () => {
|
|
1195
1195
|
ref.current?.setCustomValidity(customValidity || "");
|
|
1196
|
-
}, $[0] = customValidity, $[1] = ref
|
|
1197
|
-
let t1;
|
|
1198
|
-
$[3] !== customValidity || $[4] !== ref ? (t1 = [customValidity, ref], $[3] = customValidity, $[4] = ref, $[5] = t1) : t1 = $[5], useEffect(t0, t1);
|
|
1196
|
+
}, t1 = [customValidity, ref], $[0] = customValidity, $[1] = ref, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), useEffect(t0, t1);
|
|
1199
1197
|
}
|
|
1200
1198
|
const DEFAULT_TEXT_INPUT_ELEMENT = "input";
|
|
1201
1199
|
function TextInput(props) {
|
|
1202
|
-
const $ = c(
|
|
1203
|
-
let IconComponent, IconRightComponent, __unstable_disableFocusRing, className, clearButton, customValidity, forwardedRef, onClear, prefix, readOnly, rest, suffix, t1, t2, t3, t4, t5, t6, t7, t8, width;
|
|
1200
|
+
const $ = c(90), t0 = props;
|
|
1201
|
+
let IconComponent, IconRightComponent, __unstable_disableFocusRing, className, clearButton, customValidity, flex, forwardedRef, onClear, prefix, readOnly, rest, suffix, t1, t2, t3, t4, t5, t6, t7, t8, width;
|
|
1204
1202
|
if ($[0] !== t0) {
|
|
1205
1203
|
const {
|
|
1206
1204
|
__unstable_disableFocusRing: t92,
|
|
@@ -1209,99 +1207,98 @@ function TextInput(props) {
|
|
|
1209
1207
|
className: t122,
|
|
1210
1208
|
clearButton: t132,
|
|
1211
1209
|
disabled: t142,
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1210
|
+
flex: t152,
|
|
1211
|
+
fontSize: t162,
|
|
1212
|
+
gap: t172,
|
|
1213
|
+
icon: t182,
|
|
1214
|
+
iconRight: t192,
|
|
1215
|
+
onClear: t202,
|
|
1216
|
+
padding: t212,
|
|
1217
|
+
prefix: t222,
|
|
1218
|
+
radius: t232,
|
|
1219
|
+
readOnly: t242,
|
|
1220
|
+
ref: t252,
|
|
1221
|
+
suffix: t262,
|
|
1222
|
+
customValidity: t272,
|
|
1223
|
+
type: t282,
|
|
1225
1224
|
weight: _width,
|
|
1226
|
-
width:
|
|
1227
|
-
...
|
|
1225
|
+
width: t292,
|
|
1226
|
+
...t302
|
|
1228
1227
|
} = t0;
|
|
1229
|
-
__unstable_disableFocusRing = t92, t1 = t102, t2 = t112, className = t122, clearButton = t132, t3 = t142,
|
|
1228
|
+
__unstable_disableFocusRing = t92, t1 = t102, t2 = t112, className = t122, clearButton = t132, t3 = t142, flex = t152, t4 = t162, t5 = t172, IconComponent = t182, IconRightComponent = t192, onClear = t202, t6 = t212, prefix = t222, t7 = t232, readOnly = t242, forwardedRef = t252, suffix = t262, customValidity = t272, t8 = t282, width = t292, rest = t302, $[0] = t0, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = className, $[5] = clearButton, $[6] = customValidity, $[7] = flex, $[8] = forwardedRef, $[9] = onClear, $[10] = prefix, $[11] = readOnly, $[12] = rest, $[13] = suffix, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = t7, $[21] = t8, $[22] = width;
|
|
1230
1229
|
} else
|
|
1231
|
-
IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], className = $[4], clearButton = $[5], customValidity = $[6],
|
|
1230
|
+
IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], className = $[4], clearButton = $[5], customValidity = $[6], flex = $[7], forwardedRef = $[8], onClear = $[9], prefix = $[10], readOnly = $[11], rest = $[12], suffix = $[13], t1 = $[14], t2 = $[15], t3 = $[16], t4 = $[17], t5 = $[18], t6 = $[19], t7 = $[20], t8 = $[21], width = $[22];
|
|
1232
1231
|
const Element2 = t1 === void 0 ? DEFAULT_TEXT_INPUT_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, disabled = t3 === void 0 ? !1 : t3, fontSize = t4 === void 0 ? 2 : t4, gap = t5 === void 0 ? 3 : t5, padding = t6 === void 0 ? 3 : t6, radius = t7 === void 0 ? 2 : t7, type = t8 === void 0 ? "text" : t8, ref = useRef(null), responsivePadding = useResponsiveProp(padding), withClearButton = !!clearButton;
|
|
1233
1232
|
let t9;
|
|
1234
|
-
$[
|
|
1233
|
+
$[23] === Symbol.for("react.memo_cache_sentinel") ? (t9 = () => ref.current, $[23] = t9) : t9 = $[23], useImperativeHandle(forwardedRef, t9), useCustomValidity(ref, customValidity);
|
|
1235
1234
|
const handleClearMouseDown = _temp$8;
|
|
1236
1235
|
let t10;
|
|
1237
|
-
$[
|
|
1236
|
+
$[24] !== onClear ? (t10 = (event_0) => {
|
|
1238
1237
|
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
|
|
1239
|
-
}, $[
|
|
1238
|
+
}, $[24] = onClear, $[25] = t10) : t10 = $[25];
|
|
1240
1239
|
const handleClearClick = t10;
|
|
1241
|
-
let t11
|
|
1242
|
-
$[
|
|
1240
|
+
let t11;
|
|
1241
|
+
$[26] !== responsivePadding ? (t11 = Object.fromEntries(Object.entries(responsivePadding).map(_temp2$1)), $[26] = responsivePadding, $[27] = t11) : t11 = $[27];
|
|
1243
1242
|
const clearButtonBoxPadding = t11;
|
|
1244
|
-
let
|
|
1245
|
-
$[
|
|
1246
|
-
const clearButtonPadding =
|
|
1247
|
-
let
|
|
1248
|
-
|
|
1249
|
-
const clearButtonProps = t15;
|
|
1250
|
-
let t16;
|
|
1251
|
-
$[29] !== border || $[30] !== className || $[31] !== fontSize || $[32] !== gap || $[33] !== padding || $[34] !== radius || $[35] !== width ? (t16 = textInput({
|
|
1243
|
+
let t12;
|
|
1244
|
+
$[28] !== responsivePadding ? (t12 = Object.fromEntries(Object.entries(responsivePadding).map(_temp3)), $[28] = responsivePadding, $[29] = t12) : t12 = $[29];
|
|
1245
|
+
const clearButtonPadding = t12, clearButtonProps = isRecord(clearButton) ? clearButton : EMPTY_RECORD;
|
|
1246
|
+
let t13;
|
|
1247
|
+
$[30] !== border || $[31] !== className || $[32] !== flex || $[33] !== fontSize || $[34] !== gap || $[35] !== padding || $[36] !== radius || $[37] !== width ? (t13 = textInput({
|
|
1252
1248
|
className,
|
|
1253
1249
|
border,
|
|
1250
|
+
flex,
|
|
1254
1251
|
fontSize,
|
|
1255
1252
|
padding,
|
|
1256
1253
|
radius,
|
|
1257
1254
|
gap,
|
|
1258
1255
|
width
|
|
1259
|
-
}), $[
|
|
1260
|
-
const
|
|
1261
|
-
let
|
|
1262
|
-
$[
|
|
1256
|
+
}), $[30] = border, $[31] = className, $[32] = flex, $[33] = fontSize, $[34] = gap, $[35] = padding, $[36] = radius, $[37] = width, $[38] = t13) : t13 = $[38];
|
|
1257
|
+
const t14 = IconComponent ? "" : void 0, t15 = IconRightComponent ? "" : void 0, t16 = customValidity ? "" : void 0, t17 = prefix ? "" : void 0, t18 = !disabled && readOnly ? "" : void 0, t19 = suffix ? "" : void 0;
|
|
1258
|
+
let t20;
|
|
1259
|
+
$[39] !== prefix ? (t20 = prefix && /* @__PURE__ */ jsx("span", { className: textInputPrefix(), children: /* @__PURE__ */ jsx("span", { children: prefix }) }), $[39] = prefix, $[40] = t20) : t20 = $[40];
|
|
1260
|
+
let t21;
|
|
1261
|
+
$[41] === Symbol.for("react.memo_cache_sentinel") ? (t21 = textInputElement(), $[41] = t21) : t21 = $[41];
|
|
1262
|
+
let t22;
|
|
1263
|
+
$[42] === Symbol.for("react.memo_cache_sentinel") ? (t22 = _inputElement(), $[42] = t22) : t22 = $[42];
|
|
1264
|
+
const t23 = __unstable_disableFocusRing ? "" : void 0;
|
|
1263
1265
|
let t24;
|
|
1264
|
-
$[
|
|
1266
|
+
$[43] !== Element2 || $[44] !== disabled || $[45] !== readOnly || $[46] !== rest || $[47] !== t23 || $[48] !== type ? (t24 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t22, "data-no-focus-ring": t23, disabled, readOnly, ref, type }), $[43] = Element2, $[44] = disabled, $[45] = readOnly, $[46] = rest, $[47] = t23, $[48] = type, $[49] = t24) : t24 = $[49];
|
|
1265
1267
|
let t25;
|
|
1266
|
-
$[
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
$[41] !== Element2 || $[42] !== disabled || $[43] !== readOnly || $[44] !== rest || $[45] !== t26 || $[46] !== type ? (t27 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t25, "data-no-focus-ring": t26, disabled, readOnly, ref, type }), $[41] = Element2, $[42] = disabled, $[43] = readOnly, $[44] = rest, $[45] = t26, $[46] = type, $[47] = t27) : t27 = $[47];
|
|
1270
|
-
let t28;
|
|
1271
|
-
$[48] === Symbol.for("react.memo_cache_sentinel") ? (t28 = _inputPresentation(), $[48] = t28) : t28 = $[48];
|
|
1272
|
-
let t29;
|
|
1273
|
-
$[49] !== IconComponent || $[50] !== fontSize || $[51] !== padding ? (t29 = IconComponent && /* @__PURE__ */ jsx(Box, { padding, position: "absolute", insetTop: 0, insetLeft: 0, children: /* @__PURE__ */ jsxs(Text, { size: fontSize, children: [
|
|
1268
|
+
$[50] === Symbol.for("react.memo_cache_sentinel") ? (t25 = _inputPresentation(), $[50] = t25) : t25 = $[50];
|
|
1269
|
+
let t26;
|
|
1270
|
+
$[51] !== IconComponent || $[52] !== fontSize || $[53] !== padding ? (t26 = IconComponent && /* @__PURE__ */ jsx(Box, { as: "span", padding, position: "absolute", insetTop: 0, insetLeft: 0, children: /* @__PURE__ */ jsxs(Text, { as: "span", size: fontSize, children: [
|
|
1274
1271
|
isValidElement(IconComponent) && IconComponent,
|
|
1275
1272
|
isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
|
|
1276
|
-
] }) }), $[
|
|
1277
|
-
let
|
|
1278
|
-
$[
|
|
1273
|
+
] }) }), $[51] = IconComponent, $[52] = fontSize, $[53] = padding, $[54] = t26) : t26 = $[54];
|
|
1274
|
+
let t27;
|
|
1275
|
+
$[55] !== IconRightComponent || $[56] !== fontSize || $[57] !== padding || $[58] !== withClearButton ? (t27 = !withClearButton && IconRightComponent && /* @__PURE__ */ jsx(Box, { as: "span", padding, position: "absolute", insetTop: 0, insetRight: 0, children: /* @__PURE__ */ jsxs(Text, { as: "span", size: fontSize, children: [
|
|
1279
1276
|
isValidElement(IconRightComponent) && IconRightComponent,
|
|
1280
1277
|
isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
|
|
1281
|
-
] }) }), $[
|
|
1278
|
+
] }) }), $[55] = IconRightComponent, $[56] = fontSize, $[57] = padding, $[58] = withClearButton, $[59] = t27) : t27 = $[59];
|
|
1279
|
+
let t28;
|
|
1280
|
+
$[60] !== t26 || $[61] !== t27 ? (t28 = /* @__PURE__ */ jsxs("span", { className: t25, children: [
|
|
1281
|
+
t26,
|
|
1282
|
+
t27
|
|
1283
|
+
] }), $[60] = t26, $[61] = t27, $[62] = t28) : t28 = $[62];
|
|
1284
|
+
let t29;
|
|
1285
|
+
$[63] !== clearButton || $[64] !== clearButtonBoxPadding || $[65] !== clearButtonPadding || $[66] !== clearButtonProps || $[67] !== disabled || $[68] !== fontSize || $[69] !== handleClearClick || $[70] !== radius || $[71] !== readOnly ? (t29 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(Box, { as: "span", insetTop: 0, insetRight: 0, padding: clearButtonBoxPadding, position: "absolute", style: {
|
|
1286
|
+
zIndex: 2
|
|
1287
|
+
}, children: /* @__PURE__ */ jsx(Button, { "aria-label": "Clear", "data-qa": "clear-button", display: "block", fontSize, icon: CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[63] = clearButton, $[64] = clearButtonBoxPadding, $[65] = clearButtonPadding, $[66] = clearButtonProps, $[67] = disabled, $[68] = fontSize, $[69] = handleClearClick, $[70] = radius, $[71] = readOnly, $[72] = t29) : t29 = $[72];
|
|
1288
|
+
let t30;
|
|
1289
|
+
$[73] !== t24 || $[74] !== t28 || $[75] !== t29 ? (t30 = /* @__PURE__ */ jsxs("span", { className: t21, children: [
|
|
1290
|
+
t24,
|
|
1291
|
+
t28,
|
|
1292
|
+
t29
|
|
1293
|
+
] }), $[73] = t24, $[74] = t28, $[75] = t29, $[76] = t30) : t30 = $[76];
|
|
1282
1294
|
let t31;
|
|
1283
|
-
$[
|
|
1284
|
-
t29,
|
|
1285
|
-
t30
|
|
1286
|
-
] }), $[58] = t29, $[59] = t30, $[60] = t31) : t31 = $[60];
|
|
1295
|
+
$[77] !== suffix ? (t31 = suffix && /* @__PURE__ */ jsx("span", { className: textInputSuffix(), children: /* @__PURE__ */ jsx("span", { children: suffix }) }), $[77] = suffix, $[78] = t31) : t31 = $[78];
|
|
1287
1296
|
let t32;
|
|
1288
|
-
$[
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
$[
|
|
1293
|
-
t27,
|
|
1294
|
-
t31,
|
|
1295
|
-
t32
|
|
1296
|
-
] }), $[71] = t27, $[72] = t31, $[73] = t32, $[74] = t33) : t33 = $[74];
|
|
1297
|
-
let t34;
|
|
1298
|
-
$[75] !== suffix ? (t34 = suffix && /* @__PURE__ */ jsx(Box, { className: textInputSuffix(), sizing: "border", children: /* @__PURE__ */ jsx("span", { children: suffix }) }), $[75] = suffix, $[76] = t34) : t34 = $[76];
|
|
1299
|
-
let t35;
|
|
1300
|
-
return $[77] !== t16 || $[78] !== t17 || $[79] !== t18 || $[80] !== t19 || $[81] !== t20 || $[82] !== t21 || $[83] !== t22 || $[84] !== t23 || $[85] !== t33 || $[86] !== t34 ? (t35 = /* @__PURE__ */ jsxs(Box, { alignItems: "center", className: t16, "data-icon-left": t17, "data-icon-right": t18, "data-invalid": t19, "data-prefix": t20, "data-read-only": t21, "data-suffix": t22, "data-ui": "TextInput", display: "flex", children: [
|
|
1301
|
-
t23,
|
|
1302
|
-
t33,
|
|
1303
|
-
t34
|
|
1304
|
-
] }), $[77] = t16, $[78] = t17, $[79] = t18, $[80] = t19, $[81] = t20, $[82] = t21, $[83] = t22, $[84] = t23, $[85] = t33, $[86] = t34, $[87] = t35) : t35 = $[87], t35;
|
|
1297
|
+
return $[79] !== t13 || $[80] !== t14 || $[81] !== t15 || $[82] !== t16 || $[83] !== t17 || $[84] !== t18 || $[85] !== t19 || $[86] !== t20 || $[87] !== t30 || $[88] !== t31 ? (t32 = /* @__PURE__ */ jsxs("span", { className: t13, "data-icon-left": t14, "data-icon-right": t15, "data-invalid": t16, "data-prefix": t17, "data-read-only": t18, "data-suffix": t19, "data-ui": "TextInput", children: [
|
|
1298
|
+
t20,
|
|
1299
|
+
t30,
|
|
1300
|
+
t31
|
|
1301
|
+
] }), $[79] = t13, $[80] = t14, $[81] = t15, $[82] = t16, $[83] = t17, $[84] = t18, $[85] = t19, $[86] = t20, $[87] = t30, $[88] = t31, $[89] = t32) : t32 = $[89], t32;
|
|
1305
1302
|
}
|
|
1306
1303
|
function _temp3(t0) {
|
|
1307
1304
|
const [key_0, value_0] = t0;
|
|
@@ -1773,7 +1770,7 @@ const DialogContext = createGlobalScopedContext("@sanity/ui/v3/dialog", {
|
|
|
1773
1770
|
version: 0
|
|
1774
1771
|
});
|
|
1775
1772
|
function useDialog() {
|
|
1776
|
-
return
|
|
1773
|
+
return use(DialogContext);
|
|
1777
1774
|
}
|
|
1778
1775
|
const DEFAULT_DIALOG_ELEMENT = "div";
|
|
1779
1776
|
function Dialog(props) {
|
|
@@ -1866,15 +1863,15 @@ function DialogProvider(props) {
|
|
|
1866
1863
|
position,
|
|
1867
1864
|
zOffset
|
|
1868
1865
|
} = props;
|
|
1869
|
-
let t0
|
|
1870
|
-
$[0] !== position || $[1] !== zOffset ? (
|
|
1866
|
+
let t0;
|
|
1867
|
+
$[0] !== position || $[1] !== zOffset ? (t0 = {
|
|
1871
1868
|
version: 0,
|
|
1872
1869
|
position,
|
|
1873
1870
|
zOffset
|
|
1874
|
-
}, $[0] = position, $[1] = zOffset, $[2] =
|
|
1871
|
+
}, $[0] = position, $[1] = zOffset, $[2] = t0) : t0 = $[2];
|
|
1875
1872
|
const contextValue = t0;
|
|
1876
|
-
let
|
|
1877
|
-
return $[3] !== children || $[4] !== contextValue ? (
|
|
1873
|
+
let t1;
|
|
1874
|
+
return $[3] !== children || $[4] !== contextValue ? (t1 = /* @__PURE__ */ jsx(DialogContext.Provider, { value: contextValue, children }), $[3] = children, $[4] = contextValue, $[5] = t1) : t1 = $[5], t1;
|
|
1878
1875
|
}
|
|
1879
1876
|
const DEFAULT_KBD_ELEMENT = "kbd";
|
|
1880
1877
|
function KBD(props) {
|
|
@@ -2123,8 +2120,8 @@ function Menu(props) {
|
|
|
2123
2120
|
$[28] !== isTopLayer || $[29] !== onEscape ? (t10 = (event) => {
|
|
2124
2121
|
isTopLayer && event.key === "Escape" && (event.stopPropagation(), onEscape && onEscape());
|
|
2125
2122
|
}, $[28] = isTopLayer, $[29] = onEscape, $[30] = t10) : t10 = $[30], useGlobalKeyDown(t10);
|
|
2126
|
-
let t11
|
|
2127
|
-
$[31] !== activeElement || $[32] !== activeIndex || $[33] !== handleItemMouseEnter || $[34] !== handleItemMouseLeave || $[35] !== mount || $[36] !== onClickOutside || $[37] !== onEscape || $[38] !== onItemClick || $[39] !== registerElement ? (
|
|
2123
|
+
let t11;
|
|
2124
|
+
$[31] !== activeElement || $[32] !== activeIndex || $[33] !== handleItemMouseEnter || $[34] !== handleItemMouseLeave || $[35] !== mount || $[36] !== onClickOutside || $[37] !== onEscape || $[38] !== onItemClick || $[39] !== registerElement ? (t11 = {
|
|
2128
2125
|
version: 0,
|
|
2129
2126
|
activeElement,
|
|
2130
2127
|
activeIndex,
|
|
@@ -2134,21 +2131,19 @@ function Menu(props) {
|
|
|
2134
2131
|
onItemClick,
|
|
2135
2132
|
onItemMouseEnter: handleItemMouseEnter,
|
|
2136
2133
|
onItemMouseLeave: handleItemMouseLeave,
|
|
2137
|
-
registerElement
|
|
2138
|
-
|
|
2139
|
-
onMouseLeave: handleItemMouseLeave
|
|
2140
|
-
}, $[31] = activeElement, $[32] = activeIndex, $[33] = handleItemMouseEnter, $[34] = handleItemMouseLeave, $[35] = mount, $[36] = onClickOutside, $[37] = onEscape, $[38] = onItemClick, $[39] = registerElement, $[40] = t12) : t12 = $[40], t11 = t12;
|
|
2134
|
+
registerElement
|
|
2135
|
+
}, $[31] = activeElement, $[32] = activeIndex, $[33] = handleItemMouseEnter, $[34] = handleItemMouseLeave, $[35] = mount, $[36] = onClickOutside, $[37] = onEscape, $[38] = onItemClick, $[39] = registerElement, $[40] = t11) : t11 = $[40];
|
|
2141
2136
|
const value = t11;
|
|
2142
|
-
let
|
|
2143
|
-
$[41] !== className ? (
|
|
2137
|
+
let t12;
|
|
2138
|
+
$[41] !== className ? (t12 = menu({
|
|
2144
2139
|
className
|
|
2145
|
-
}), $[41] = className, $[42] =
|
|
2140
|
+
}), $[41] = className, $[42] = t12) : t12 = $[42];
|
|
2141
|
+
let t13;
|
|
2142
|
+
$[43] !== children || $[44] !== gap ? (t13 = /* @__PURE__ */ jsx(Stack, { gap, children }), $[43] = children, $[44] = gap, $[45] = t13) : t13 = $[45];
|
|
2146
2143
|
let t14;
|
|
2147
|
-
$[
|
|
2144
|
+
$[46] !== as || $[47] !== handleKeyDown || $[48] !== handleRefChange || $[49] !== padding || $[50] !== rest || $[51] !== t12 || $[52] !== t13 ? (t14 = /* @__PURE__ */ jsx(Box, { "data-ui": "Menu", ...rest, as, className: t12, onKeyDown: handleKeyDown, overflow: "auto", outline: "none", padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: t13 }), $[46] = as, $[47] = handleKeyDown, $[48] = handleRefChange, $[49] = padding, $[50] = rest, $[51] = t12, $[52] = t13, $[53] = t14) : t14 = $[53];
|
|
2148
2145
|
let t15;
|
|
2149
|
-
|
|
2150
|
-
let t16;
|
|
2151
|
-
return $[54] !== t15 || $[55] !== value ? (t16 = /* @__PURE__ */ jsx(MenuContext.Provider, { value, children: t15 }), $[54] = t15, $[55] = value, $[56] = t16) : t16 = $[56], t16;
|
|
2146
|
+
return $[54] !== t14 || $[55] !== value ? (t15 = /* @__PURE__ */ jsx(MenuContext.Provider, { value, children: t14 }), $[54] = t14, $[55] = value, $[56] = t15) : t15 = $[56], t15;
|
|
2152
2147
|
}
|
|
2153
2148
|
function MenuButton(props) {
|
|
2154
2149
|
const $ = c(57), {
|
|
@@ -2226,8 +2221,8 @@ function MenuButton(props) {
|
|
|
2226
2221
|
}, $[22] = menuElements, $[23] = t13) : t13 = $[23];
|
|
2227
2222
|
const handleBlur = t13;
|
|
2228
2223
|
let t14;
|
|
2229
|
-
$[24] !== buttonElement || $[25] !== disableRestoreFocusOnClose ? (t14 = () => {
|
|
2230
|
-
setOpen(!1), !disableRestoreFocusOnClose && buttonElement && buttonElement.focus();
|
|
2224
|
+
$[24] !== buttonElement || $[25] !== disableRestoreFocusOnClose ? (t14 = (e) => {
|
|
2225
|
+
e.defaultPrevented || (setOpen(!1), !disableRestoreFocusOnClose && buttonElement && buttonElement.focus());
|
|
2231
2226
|
}, $[24] = buttonElement, $[25] = disableRestoreFocusOnClose, $[26] = t14) : t14 = $[26];
|
|
2232
2227
|
const handleItemClick = t14;
|
|
2233
2228
|
let t15;
|
|
@@ -2268,18 +2263,18 @@ function MenuButton(props) {
|
|
|
2268
2263
|
const button2 = t17;
|
|
2269
2264
|
let t18, t19;
|
|
2270
2265
|
$[43] !== buttonElement ? (t18 = () => buttonElement, t19 = [buttonElement], $[43] = buttonElement, $[44] = t18, $[45] = t19) : (t18 = $[44], t19 = $[45]), useImperativeHandle(forwardedRef, t18, t19);
|
|
2271
|
-
let t20
|
|
2272
|
-
$[46] !== popover2 ? (
|
|
2273
|
-
let
|
|
2274
|
-
$[48] !==
|
|
2266
|
+
let t20;
|
|
2267
|
+
$[46] !== popover2 ? (t20 = popover2 || {}, $[46] = popover2, $[47] = t20) : t20 = $[47];
|
|
2268
|
+
let t21;
|
|
2269
|
+
$[48] !== t20 ? (t21 = {
|
|
2275
2270
|
overflow: "auto",
|
|
2276
|
-
...
|
|
2277
|
-
}, $[48] =
|
|
2278
|
-
const popoverProps =
|
|
2271
|
+
...t20
|
|
2272
|
+
}, $[48] = t20, $[49] = t21) : t21 = $[49];
|
|
2273
|
+
const popoverProps = t21;
|
|
2274
|
+
let t22;
|
|
2275
|
+
$[50] !== button2 ? (t22 = button2 || /* @__PURE__ */ jsx(Fragment, {}), $[50] = button2, $[51] = t22) : t22 = $[51];
|
|
2279
2276
|
let t23;
|
|
2280
|
-
$[
|
|
2281
|
-
let t24;
|
|
2282
|
-
return $[52] !== menu2 || $[53] !== open || $[54] !== popoverProps || $[55] !== t23 ? (t24 = /* @__PURE__ */ jsx(Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu2, open, children: t23 }), $[52] = menu2, $[53] = open, $[54] = popoverProps, $[55] = t23, $[56] = t24) : t24 = $[56], t24;
|
|
2277
|
+
return $[52] !== menu2 || $[53] !== open || $[54] !== popoverProps || $[55] !== t22 ? (t23 = /* @__PURE__ */ jsx(Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu2, open, children: t22 }), $[52] = menu2, $[53] = open, $[54] = popoverProps, $[55] = t22, $[56] = t23) : t23 = $[56], t23;
|
|
2283
2278
|
}
|
|
2284
2279
|
function _temp$6(v) {
|
|
2285
2280
|
return !v;
|
|
@@ -2302,7 +2297,7 @@ function MenuDivider(props) {
|
|
|
2302
2297
|
return $[6] !== Element2 || $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t2 }), $[6] = Element2, $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
|
|
2303
2298
|
}
|
|
2304
2299
|
function useMenu() {
|
|
2305
|
-
const value =
|
|
2300
|
+
const value = use(MenuContext);
|
|
2306
2301
|
if (!value)
|
|
2307
2302
|
throw new Error("useMenu(): missing context value");
|
|
2308
2303
|
if (!isRecord(value) || value.version !== 0)
|
|
@@ -2355,8 +2350,8 @@ function MenuGroup(props) {
|
|
|
2355
2350
|
}, $[18] = onClick, $[19] = t9) : t9 = $[19];
|
|
2356
2351
|
const handleClick = t9;
|
|
2357
2352
|
let t10;
|
|
2358
|
-
$[20] !== onItemClick ? (t10 = () => {
|
|
2359
|
-
setOpen(!1), onItemClick?.();
|
|
2353
|
+
$[20] !== onItemClick ? (t10 = (e) => {
|
|
2354
|
+
setOpen(!1), onItemClick?.(e);
|
|
2360
2355
|
}, $[20] = onItemClick, $[21] = t10) : t10 = $[21];
|
|
2361
2356
|
const handleChildItemClick = t10;
|
|
2362
2357
|
let t11;
|
|
@@ -2415,36 +2410,40 @@ function MenuGroup(props) {
|
|
|
2415
2410
|
}
|
|
2416
2411
|
const DEFAULT_MENU_ITEM_ELEMENT = "button";
|
|
2417
2412
|
function MenuItem(props) {
|
|
2418
|
-
const $ = c(
|
|
2419
|
-
let IconComponent, IconRightComponent, children, disabled, forwardedRef, gapX, gapY, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY,
|
|
2420
|
-
$[0] !== t0
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2413
|
+
const $ = c(72), t0 = props;
|
|
2414
|
+
let IconComponent, IconRightComponent, children, disabled, forwardedRef, gapX, gapY, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, rest, selectedProp, t1, t2, t3, t4, t5, t6, t7, text2;
|
|
2415
|
+
if ($[0] !== t0) {
|
|
2416
|
+
const {
|
|
2417
|
+
as: t82,
|
|
2418
|
+
children: t92,
|
|
2419
|
+
disabled: t102,
|
|
2420
|
+
fontSize: t112,
|
|
2421
|
+
gap: t122,
|
|
2422
|
+
gapX: t132,
|
|
2423
|
+
gapY: t142,
|
|
2424
|
+
hotkeys: t152,
|
|
2425
|
+
icon: t162,
|
|
2426
|
+
iconRight: t172,
|
|
2427
|
+
onClick: t18,
|
|
2428
|
+
padding: t19,
|
|
2429
|
+
paddingX: t20,
|
|
2430
|
+
paddingY: t21,
|
|
2431
|
+
paddingTop: t22,
|
|
2432
|
+
paddingRight: t23,
|
|
2433
|
+
paddingBottom: t24,
|
|
2434
|
+
paddingLeft: t25,
|
|
2435
|
+
pressed,
|
|
2436
|
+
radius: t26,
|
|
2437
|
+
ref: t27,
|
|
2438
|
+
role: t28,
|
|
2439
|
+
selected: t29,
|
|
2440
|
+
text: t30,
|
|
2441
|
+
tone: t31,
|
|
2442
|
+
...t32
|
|
2443
|
+
} = t0;
|
|
2444
|
+
t1 = t82, children = t92, disabled = t102, t2 = t112, t3 = t122, gapX = t132, gapY = t142, hotkeys = t152, IconComponent = t162, IconRightComponent = t172, onClick = t18, t4 = t19, paddingX = t20, paddingY = t21, paddingTop = t22, paddingRight = t23, paddingBottom = t24, paddingLeft = t25, t5 = t26, forwardedRef = t27, t6 = t28, selectedProp = t29, text2 = t30, t7 = t31, rest = t32, $[0] = t0, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = forwardedRef, $[6] = gapX, $[7] = gapY, $[8] = hotkeys, $[9] = onClick, $[10] = paddingBottom, $[11] = paddingLeft, $[12] = paddingRight, $[13] = paddingTop, $[14] = paddingX, $[15] = paddingY, $[16] = rest, $[17] = selectedProp, $[18] = t1, $[19] = t2, $[20] = t3, $[21] = t4, $[22] = t5, $[23] = t6, $[24] = t7, $[25] = text2;
|
|
2445
|
+
} else
|
|
2446
|
+
IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], forwardedRef = $[5], gapX = $[6], gapY = $[7], hotkeys = $[8], onClick = $[9], paddingBottom = $[10], paddingLeft = $[11], paddingRight = $[12], paddingTop = $[13], paddingX = $[14], paddingY = $[15], rest = $[16], selectedProp = $[17], t1 = $[18], t2 = $[19], t3 = $[20], t4 = $[21], t5 = $[22], t6 = $[23], t7 = $[24], text2 = $[25];
|
|
2448
2447
|
const as = t1 === void 0 ? DEFAULT_MENU_ITEM_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, gap = t3 === void 0 ? 3 : t3, padding = t4 === void 0 ? 3 : t4, radius = t5 === void 0 ? 2 : t5, role = t6 === void 0 ? "menuitem" : t6, tone = t7 === void 0 ? "default" : t7, menu2 = useMenu(), {
|
|
2449
2448
|
activeElement,
|
|
2450
2449
|
mount,
|
|
@@ -2453,16 +2452,16 @@ function MenuItem(props) {
|
|
|
2453
2452
|
onItemMouseLeave
|
|
2454
2453
|
} = menu2, [rootElement, setRootElement] = useState(null), active = !!activeElement && activeElement === rootElement, ref = useRef(null);
|
|
2455
2454
|
let t8;
|
|
2456
|
-
$[
|
|
2455
|
+
$[26] === Symbol.for("react.memo_cache_sentinel") ? (t8 = () => ref.current, $[26] = t8) : t8 = $[26], useImperativeHandle(forwardedRef, t8);
|
|
2457
2456
|
let t10, t9;
|
|
2458
|
-
$[
|
|
2457
|
+
$[27] !== mount || $[28] !== rootElement || $[29] !== selectedProp ? (t9 = () => mount(rootElement, selectedProp), t10 = [mount, rootElement, selectedProp], $[27] = mount, $[28] = rootElement, $[29] = selectedProp, $[30] = t10, $[31] = t9) : (t10 = $[30], t9 = $[31]), useEffect(t9, t10);
|
|
2459
2458
|
let t11;
|
|
2460
|
-
$[
|
|
2461
|
-
disabled || (onClick && onClick(event), onItemClick && onItemClick());
|
|
2462
|
-
}, $[
|
|
2459
|
+
$[32] !== disabled || $[33] !== onClick || $[34] !== onItemClick ? (t11 = (event) => {
|
|
2460
|
+
disabled || (onClick && onClick(event), onItemClick && onItemClick(event));
|
|
2461
|
+
}, $[32] = disabled, $[33] = onClick, $[34] = onItemClick, $[35] = t11) : t11 = $[35];
|
|
2463
2462
|
const handleClick = t11;
|
|
2464
|
-
let t12
|
|
2465
|
-
$[
|
|
2463
|
+
let t12;
|
|
2464
|
+
$[36] !== padding || $[37] !== paddingBottom || $[38] !== paddingLeft || $[39] !== paddingRight || $[40] !== paddingTop || $[41] !== paddingX || $[42] !== paddingY ? (t12 = {
|
|
2466
2465
|
padding,
|
|
2467
2466
|
paddingX,
|
|
2468
2467
|
paddingY,
|
|
@@ -2470,15 +2469,15 @@ function MenuItem(props) {
|
|
|
2470
2469
|
paddingRight,
|
|
2471
2470
|
paddingBottom,
|
|
2472
2471
|
paddingLeft
|
|
2473
|
-
}, $[
|
|
2472
|
+
}, $[36] = padding, $[37] = paddingBottom, $[38] = paddingLeft, $[39] = paddingRight, $[40] = paddingTop, $[41] = paddingX, $[42] = paddingY, $[43] = t12) : t12 = $[43];
|
|
2474
2473
|
const paddingProps = t12;
|
|
2475
|
-
let
|
|
2476
|
-
$[
|
|
2474
|
+
let t13;
|
|
2475
|
+
$[44] === Symbol.for("react.memo_cache_sentinel") ? (t13 = (el) => {
|
|
2477
2476
|
ref.current = el, setRootElement(el);
|
|
2478
|
-
}, $[
|
|
2479
|
-
const setRef =
|
|
2480
|
-
let
|
|
2481
|
-
$[
|
|
2477
|
+
}, $[44] = t13) : t13 = $[44];
|
|
2478
|
+
const setRef = t13, t14 = as === "button" ? "button" : void 0;
|
|
2479
|
+
let t15;
|
|
2480
|
+
$[45] !== IconComponent || $[46] !== IconRightComponent || $[47] !== fontSize || $[48] !== gap || $[49] !== gapX || $[50] !== gapY || $[51] !== hotkeys || $[52] !== paddingProps || $[53] !== text2 ? (t15 = (IconComponent || text2 || IconRightComponent) && /* @__PURE__ */ jsxs(Flex, { as: "span", gap, gapX, gapY, align: "center", ...paddingProps, children: [
|
|
2482
2481
|
IconComponent && /* @__PURE__ */ jsxs(Text, { muted: !0, size: fontSize, children: [
|
|
2483
2482
|
isValidElement(IconComponent) && IconComponent,
|
|
2484
2483
|
isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
|
|
@@ -2492,14 +2491,14 @@ function MenuItem(props) {
|
|
|
2492
2491
|
isValidElement(IconRightComponent) && IconRightComponent,
|
|
2493
2492
|
isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
|
|
2494
2493
|
] })
|
|
2495
|
-
] }), $[
|
|
2496
|
-
let
|
|
2497
|
-
$[
|
|
2498
|
-
let
|
|
2499
|
-
return $[59] !== as || $[60] !== disabled || $[61] !== handleClick || $[62] !== onItemMouseEnter || $[63] !== onItemMouseLeave || $[64] !== radius || $[65] !== rest || $[66] !== role || $[67] !==
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
] }), $[59] = as, $[60] = disabled, $[61] = handleClick, $[62] = onItemMouseEnter, $[63] = onItemMouseLeave, $[64] = radius, $[65] = rest, $[66] = role, $[67] =
|
|
2494
|
+
] }), $[45] = IconComponent, $[46] = IconRightComponent, $[47] = fontSize, $[48] = gap, $[49] = gapX, $[50] = gapY, $[51] = hotkeys, $[52] = paddingProps, $[53] = text2, $[54] = t15) : t15 = $[54];
|
|
2495
|
+
let t16;
|
|
2496
|
+
$[55] !== children || $[56] !== paddingProps ? (t16 = children && /* @__PURE__ */ jsx(Box, { as: "span", ...paddingProps, children }), $[55] = children, $[56] = paddingProps, $[57] = t16) : t16 = $[57];
|
|
2497
|
+
let t17;
|
|
2498
|
+
return $[58] !== active || $[59] !== as || $[60] !== disabled || $[61] !== handleClick || $[62] !== onItemMouseEnter || $[63] !== onItemMouseLeave || $[64] !== radius || $[65] !== rest || $[66] !== role || $[67] !== t14 || $[68] !== t15 || $[69] !== t16 || $[70] !== tone ? (t17 = /* @__PURE__ */ jsxs(Selectable, { "data-ui": "MenuItem", ...rest, as, radius, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, role, selected: active, tabIndex: -1, tone, type: t14, children: [
|
|
2499
|
+
t15,
|
|
2500
|
+
t16
|
|
2501
|
+
] }), $[58] = active, $[59] = as, $[60] = disabled, $[61] = handleClick, $[62] = onItemMouseEnter, $[63] = onItemMouseLeave, $[64] = radius, $[65] = rest, $[66] = role, $[67] = t14, $[68] = t15, $[69] = t16, $[70] = tone, $[71] = t17) : t17 = $[71], t17;
|
|
2503
2502
|
}
|
|
2504
2503
|
const DEFAULT_TAB_ELEMENT = "button";
|
|
2505
2504
|
function Tab(props) {
|
|
@@ -2760,8 +2759,8 @@ function ToastProvider(props) {
|
|
|
2760
2759
|
let t1;
|
|
2761
2760
|
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t1 = [], $[0] = t1) : t1 = $[0];
|
|
2762
2761
|
const [state, setState] = useState(t1), mounted = useMounted();
|
|
2763
|
-
let t2
|
|
2764
|
-
$[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2762
|
+
let t2;
|
|
2763
|
+
$[1] === Symbol.for("react.memo_cache_sentinel") ? (t2 = {
|
|
2765
2764
|
version: 0,
|
|
2766
2765
|
push: (params) => {
|
|
2767
2766
|
const id = params.id ?? generateToastId(), duration = params.duration ?? 5e3;
|
|
@@ -2785,15 +2784,15 @@ function ToastProvider(props) {
|
|
|
2785
2784
|
});
|
|
2786
2785
|
}), id;
|
|
2787
2786
|
}
|
|
2788
|
-
}, $[1] =
|
|
2787
|
+
}, $[1] = t2) : t2 = $[1];
|
|
2789
2788
|
const value = t2;
|
|
2789
|
+
let t3;
|
|
2790
|
+
$[2] !== gap || $[3] !== mounted || $[4] !== padding || $[5] !== paddingX || $[6] !== paddingY || $[7] !== state || $[8] !== zOffset ? (t3 = mounted && /* @__PURE__ */ jsx(LayerProvider, { zOffset, children: /* @__PURE__ */ jsx(ToastLayer, { padding, paddingX, paddingY, gap, children: /* @__PURE__ */ jsx(AnimatePresence, { initial: !1, mode: "popLayout", children: state.map(_temp$4) }) }) }), $[2] = gap, $[3] = mounted, $[4] = padding, $[5] = paddingX, $[6] = paddingY, $[7] = state, $[8] = zOffset, $[9] = t3) : t3 = $[9];
|
|
2790
2791
|
let t4;
|
|
2791
|
-
|
|
2792
|
-
let t5;
|
|
2793
|
-
return $[10] !== children || $[11] !== t4 ? (t5 = /* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
|
|
2792
|
+
return $[10] !== children || $[11] !== t3 ? (t4 = /* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
|
|
2794
2793
|
children,
|
|
2795
|
-
|
|
2796
|
-
] }), $[10] = children, $[11] =
|
|
2794
|
+
t3
|
|
2795
|
+
] }), $[10] = children, $[11] = t3, $[12] = t4) : t4 = $[12], t4;
|
|
2797
2796
|
}
|
|
2798
2797
|
function _temp$4(t0) {
|
|
2799
2798
|
const {
|
|
@@ -2804,7 +2803,7 @@ function _temp$4(t0) {
|
|
|
2804
2803
|
return /* @__PURE__ */ jsx(Toast, { closable: params_0.closable, description: params_0.description, onClose: dismiss_0, status: params_0.status, title: params_0.title, duration: params_0.duration }, id_0);
|
|
2805
2804
|
}
|
|
2806
2805
|
function useToast() {
|
|
2807
|
-
const value =
|
|
2806
|
+
const value = use(ToastContext);
|
|
2808
2807
|
if (!value)
|
|
2809
2808
|
throw new Error("useToast(): missing context value");
|
|
2810
2809
|
if (!isRecord(value) || value.version !== 0)
|
|
@@ -2877,27 +2876,27 @@ function Tree(props) {
|
|
|
2877
2876
|
...rest
|
|
2878
2877
|
} = t0, $[0] = t0, $[1] = children, $[2] = forwardedRef, $[3] = onFocus, $[4] = rest, $[5] = t1) : (children = $[1], forwardedRef = $[2], onFocus = $[3], rest = $[4], t1 = $[5]);
|
|
2879
2878
|
const gap = t1 === void 0 ? 1 : t1, ref = useRef(null), [focusedElement, setFocusedElement] = useState(null), focusedElementRef = useRef(focusedElement);
|
|
2880
|
-
let t2
|
|
2881
|
-
$[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2879
|
+
let t2;
|
|
2880
|
+
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[6] = t2) : t2 = $[6];
|
|
2882
2881
|
const path = t2;
|
|
2882
|
+
let t3;
|
|
2883
|
+
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t3 = [], $[7] = t3) : t3 = $[7];
|
|
2884
|
+
const [itemElements, setItemElements] = useState(t3);
|
|
2883
2885
|
let t4;
|
|
2884
|
-
$[
|
|
2885
|
-
const [
|
|
2886
|
+
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t4 = {}, $[8] = t4) : t4 = $[8];
|
|
2887
|
+
const [state, setState] = useState(t4), stateRef = useRef(state);
|
|
2886
2888
|
let t5;
|
|
2887
|
-
$[
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[9] = t6) : t6 = $[9], useImperativeHandle(forwardedRef, t6);
|
|
2891
|
-
let t7, t8;
|
|
2892
|
-
$[10] !== focusedElement ? (t7 = () => {
|
|
2889
|
+
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[9] = t5) : t5 = $[9], useImperativeHandle(forwardedRef, t5);
|
|
2890
|
+
let t6, t7;
|
|
2891
|
+
$[10] !== focusedElement ? (t6 = () => {
|
|
2893
2892
|
focusedElementRef.current = focusedElement;
|
|
2894
|
-
},
|
|
2895
|
-
let
|
|
2896
|
-
$[13] !== state ? (
|
|
2893
|
+
}, t7 = [focusedElement], $[10] = focusedElement, $[11] = t6, $[12] = t7) : (t6 = $[11], t7 = $[12]), useEffect(t6, t7);
|
|
2894
|
+
let t8, t9;
|
|
2895
|
+
$[13] !== state ? (t8 = () => {
|
|
2897
2896
|
stateRef.current = state;
|
|
2898
|
-
},
|
|
2899
|
-
let
|
|
2900
|
-
$[16] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2897
|
+
}, t9 = [state], $[13] = state, $[14] = t8, $[15] = t9) : (t8 = $[14], t9 = $[15]), useEffect(t8, t9);
|
|
2898
|
+
let t10;
|
|
2899
|
+
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (element, path_0, expanded, selected) => (setState((s) => ({
|
|
2901
2900
|
...s,
|
|
2902
2901
|
[path_0]: {
|
|
2903
2902
|
element,
|
|
@@ -2910,10 +2909,10 @@ function Tree(props) {
|
|
|
2910
2909
|
};
|
|
2911
2910
|
return delete newState[path_0], newState;
|
|
2912
2911
|
});
|
|
2913
|
-
}), $[16] =
|
|
2914
|
-
const registerItem =
|
|
2915
|
-
let
|
|
2916
|
-
$[17] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2912
|
+
}), $[16] = t10) : t10 = $[16];
|
|
2913
|
+
const registerItem = t10;
|
|
2914
|
+
let t11;
|
|
2915
|
+
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t11 = (path_1, expanded_0) => {
|
|
2917
2916
|
setState((s_1) => {
|
|
2918
2917
|
const itemState = s_1[path_1];
|
|
2919
2918
|
return itemState ? {
|
|
@@ -2924,14 +2923,12 @@ function Tree(props) {
|
|
|
2924
2923
|
}
|
|
2925
2924
|
} : s_1;
|
|
2926
2925
|
});
|
|
2927
|
-
}, $[17] =
|
|
2928
|
-
const setExpanded = t12;
|
|
2926
|
+
}, $[17] = t11) : t11 = $[17];
|
|
2927
|
+
const setExpanded = t11, t12 = focusedElement || itemElements[0] || null;
|
|
2929
2928
|
let t13;
|
|
2930
|
-
|
|
2931
|
-
let t15;
|
|
2932
|
-
$[18] !== gap || $[19] !== state || $[20] !== t14 ? (t15 = {
|
|
2929
|
+
$[18] !== gap || $[19] !== state || $[20] !== t12 ? (t13 = {
|
|
2933
2930
|
version: 0,
|
|
2934
|
-
focusedElement:
|
|
2931
|
+
focusedElement: t12,
|
|
2935
2932
|
gap,
|
|
2936
2933
|
level: 0,
|
|
2937
2934
|
path,
|
|
@@ -2939,10 +2936,10 @@ function Tree(props) {
|
|
|
2939
2936
|
setExpanded,
|
|
2940
2937
|
setFocusedElement,
|
|
2941
2938
|
state
|
|
2942
|
-
}, $[18] = gap, $[19] = state, $[20] =
|
|
2939
|
+
}, $[18] = gap, $[19] = state, $[20] = t12, $[21] = t13) : t13 = $[21];
|
|
2943
2940
|
const contextValue = t13;
|
|
2944
|
-
let
|
|
2945
|
-
$[22] !== itemElements ? (
|
|
2941
|
+
let t14;
|
|
2942
|
+
$[22] !== itemElements ? (t14 = (event) => {
|
|
2946
2943
|
if (focusedElementRef.current) {
|
|
2947
2944
|
if (event.key === "ArrowDown") {
|
|
2948
2945
|
event.preventDefault();
|
|
@@ -3001,29 +2998,29 @@ function Tree(props) {
|
|
|
3001
2998
|
return;
|
|
3002
2999
|
}
|
|
3003
3000
|
}
|
|
3004
|
-
}, $[22] = itemElements, $[23] =
|
|
3005
|
-
const handleKeyDown =
|
|
3006
|
-
let
|
|
3007
|
-
$[24] !== onFocus ? (
|
|
3001
|
+
}, $[22] = itemElements, $[23] = t14) : t14 = $[23];
|
|
3002
|
+
const handleKeyDown = t14;
|
|
3003
|
+
let t15;
|
|
3004
|
+
$[24] !== onFocus ? (t15 = (event_0) => {
|
|
3008
3005
|
setFocusedElement(event_0.target), onFocus?.(event_0);
|
|
3009
|
-
}, $[24] = onFocus, $[25] =
|
|
3010
|
-
const handleFocus =
|
|
3011
|
-
let
|
|
3012
|
-
$[26] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3006
|
+
}, $[24] = onFocus, $[25] = t15) : t15 = $[25];
|
|
3007
|
+
const handleFocus = t15;
|
|
3008
|
+
let t16;
|
|
3009
|
+
$[26] === Symbol.for("react.memo_cache_sentinel") ? (t16 = () => {
|
|
3013
3010
|
if (!ref.current)
|
|
3014
3011
|
return;
|
|
3015
3012
|
const _itemElements = Array.from(ref.current.querySelectorAll('[data-ui="TreeItem"]'));
|
|
3016
3013
|
setItemElements(_itemElements);
|
|
3017
|
-
}, $[26] =
|
|
3014
|
+
}, $[26] = t16) : t16 = $[26];
|
|
3015
|
+
let t17;
|
|
3016
|
+
$[27] !== children ? (t17 = [children], $[27] = children, $[28] = t17) : t17 = $[28], useEffect(t16, t17);
|
|
3017
|
+
let t18;
|
|
3018
|
+
$[29] !== children || $[30] !== gap || $[31] !== handleFocus || $[32] !== handleKeyDown || $[33] !== rest ? (t18 = /* @__PURE__ */ jsx(Stack, { as: "ul", "data-ui": "Tree", ...rest, gap, onFocus: handleFocus, onKeyDown: handleKeyDown, ref, role: "tree", children }), $[29] = children, $[30] = gap, $[31] = handleFocus, $[32] = handleKeyDown, $[33] = rest, $[34] = t18) : t18 = $[34];
|
|
3018
3019
|
let t19;
|
|
3019
|
-
$[
|
|
3020
|
-
let t20;
|
|
3021
|
-
$[29] !== children || $[30] !== gap || $[31] !== handleFocus || $[32] !== handleKeyDown || $[33] !== rest ? (t20 = /* @__PURE__ */ jsx(Stack, { as: "ul", "data-ui": "Tree", ...rest, gap, onFocus: handleFocus, onKeyDown: handleKeyDown, ref, role: "tree", children }), $[29] = children, $[30] = gap, $[31] = handleFocus, $[32] = handleKeyDown, $[33] = rest, $[34] = t20) : t20 = $[34];
|
|
3022
|
-
let t21;
|
|
3023
|
-
return $[35] !== contextValue || $[36] !== t20 ? (t21 = /* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: t20 }), $[35] = contextValue, $[36] = t20, $[37] = t21) : t21 = $[37], t21;
|
|
3020
|
+
return $[35] !== contextValue || $[36] !== t18 ? (t19 = /* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: t18 }), $[35] = contextValue, $[36] = t18, $[37] = t19) : t19 = $[37], t19;
|
|
3024
3021
|
}
|
|
3025
3022
|
function useTree() {
|
|
3026
|
-
const tree =
|
|
3023
|
+
const tree = use(TreeContext);
|
|
3027
3024
|
if (!tree)
|
|
3028
3025
|
throw new Error("Tree: missing context value");
|
|
3029
3026
|
return tree;
|
|
@@ -3140,32 +3137,21 @@ function _isScrollable(el) {
|
|
|
3140
3137
|
}
|
|
3141
3138
|
const _ResizeObserver = typeof document < "u" && typeof window < "u" && window.ResizeObserver ? window.ResizeObserver : ResizeObserver, DEFAULT_VIRTUAL_LIST_ELEMENT = "div";
|
|
3142
3139
|
function VirtualList(props) {
|
|
3143
|
-
const
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
as: t1,
|
|
3147
|
-
gap: t2,
|
|
3140
|
+
const {
|
|
3141
|
+
as = DEFAULT_VIRTUAL_LIST_ELEMENT,
|
|
3142
|
+
gap = 0,
|
|
3148
3143
|
getItemKey,
|
|
3149
|
-
items
|
|
3144
|
+
items = [],
|
|
3150
3145
|
onChange,
|
|
3151
3146
|
renderItem,
|
|
3152
3147
|
ref: forwardedRef,
|
|
3153
3148
|
...rest
|
|
3154
|
-
} =
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
$[9] !== t3 ? (t4 = t3 === void 0 ? [] : t3, $[9] = t3, $[10] = t4) : t4 = $[10];
|
|
3158
|
-
const items = t4, ref = useRef(null), wrapperRef = useRef(null), [scrollTop, setScrollTop] = useState(0), [scrollHeight, setScrollHeight] = useState(0), [itemHeight, setItemHeight] = useState(-1), [gapValue, setGapValue] = useState(0);
|
|
3159
|
-
let t5;
|
|
3160
|
-
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[11] = t5) : t5 = $[11], useImperativeHandle(forwardedRef, t5);
|
|
3161
|
-
let t6, t7;
|
|
3162
|
-
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => {
|
|
3163
|
-
if (!ref.current)
|
|
3164
|
-
return;
|
|
3149
|
+
} = props, ref = useRef(null), wrapperRef = useRef(null), [scrollTop, setScrollTop] = useState(0), [scrollHeight, setScrollHeight] = useState(0), [itemHeight, setItemHeight] = useState(-1), [gapValue, setGapValue] = useState(0);
|
|
3150
|
+
useImperativeHandle(forwardedRef, () => ref.current), useEffect(() => {
|
|
3151
|
+
if (!ref.current) return;
|
|
3165
3152
|
const scrollEl = findScrollable(ref.current.parentNode);
|
|
3166
3153
|
if (scrollEl) {
|
|
3167
|
-
if (!(scrollEl instanceof HTMLElement))
|
|
3168
|
-
return;
|
|
3154
|
+
if (!(scrollEl instanceof HTMLElement)) return;
|
|
3169
3155
|
const handleScroll = () => {
|
|
3170
3156
|
setScrollTop(scrollEl.scrollTop);
|
|
3171
3157
|
};
|
|
@@ -3189,10 +3175,9 @@ function VirtualList(props) {
|
|
|
3189
3175
|
}), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll_0(), () => {
|
|
3190
3176
|
window.removeEventListener("scroll", handleScroll_0), window.removeEventListener("resize", handleResize);
|
|
3191
3177
|
};
|
|
3192
|
-
},
|
|
3178
|
+
}, []);
|
|
3193
3179
|
const len = items.length, height = itemHeight ? len * (itemHeight + gapValue) - gapValue : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0;
|
|
3194
|
-
|
|
3195
|
-
$[14] !== fromIndex || $[15] !== gapValue || $[16] !== itemHeight || $[17] !== onChange || $[18] !== scrollHeight || $[19] !== scrollTop || $[20] !== toIndex ? (t8 = () => {
|
|
3180
|
+
useEffect(() => {
|
|
3196
3181
|
onChange?.({
|
|
3197
3182
|
fromIndex,
|
|
3198
3183
|
gap: gapValue,
|
|
@@ -3201,63 +3186,23 @@ function VirtualList(props) {
|
|
|
3201
3186
|
scrollTop,
|
|
3202
3187
|
toIndex
|
|
3203
3188
|
});
|
|
3204
|
-
},
|
|
3205
|
-
let t10;
|
|
3206
|
-
$[23] === Symbol.for("react.memo_cache_sentinel") ? (t10 = () => {
|
|
3189
|
+
}, [fromIndex, gapValue, itemHeight, onChange, scrollHeight, scrollTop, toIndex]), useEffect(() => {
|
|
3207
3190
|
setItemHeight(-1);
|
|
3208
|
-
},
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
let t142;
|
|
3221
|
-
$[27] !== items[0] || $[28] !== renderItem ? (t142 = renderItem(items[0]), $[27] = items[0], $[28] = renderItem, $[29] = t142) : t142 = $[29];
|
|
3222
|
-
let t152;
|
|
3223
|
-
$[30] !== t142 ? (t152 = /* @__PURE__ */ jsx(Box, { ref: t133, insetTop: 0, insetLeft: 0, insetRight: 0, position: "absolute", children: t142 }, 0), $[30] = t142, $[31] = t152) : t152 = $[31];
|
|
3224
|
-
let t162;
|
|
3225
|
-
$[32] === Symbol.for("react.memo_cache_sentinel") ? (t162 = (el_0) => el_0 ? setGapValue(el_0.offsetHeight) : void 0, $[32] = t162) : t162 = $[32];
|
|
3226
|
-
const t17 = vars.space[gap];
|
|
3227
|
-
let t18;
|
|
3228
|
-
$[33] !== t17 ? (t18 = /* @__PURE__ */ jsx("div", { ref: t162, style: {
|
|
3229
|
-
height: t17
|
|
3230
|
-
} }), $[33] = t17, $[34] = t18) : t18 = $[34];
|
|
3231
|
-
let t19;
|
|
3232
|
-
$[35] !== t152 || $[36] !== t18 ? (t19 = [/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3233
|
-
t152,
|
|
3234
|
-
t18
|
|
3235
|
-
] })], $[35] = t152, $[36] = t18, $[37] = t19) : t19 = $[37], t12 = t19;
|
|
3236
|
-
break bb0;
|
|
3237
|
-
}
|
|
3238
|
-
let t132;
|
|
3239
|
-
if ($[38] !== fromIndex || $[39] !== gapValue || $[40] !== getItemKey || $[41] !== itemHeight || $[42] !== items || $[43] !== renderItem || $[44] !== toIndex) {
|
|
3240
|
-
let t142;
|
|
3241
|
-
$[46] !== fromIndex || $[47] !== gapValue || $[48] !== getItemKey || $[49] !== itemHeight || $[50] !== renderItem ? (t142 = (item, _itemIndex) => {
|
|
3242
|
-
const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
|
|
3243
|
-
return /* @__PURE__ */ jsx(Box, { insetLeft: 0, insetRight: 0, position: "absolute", style: {
|
|
3244
|
-
top: itemIndex * (itemHeight + gapValue)
|
|
3245
|
-
}, children: node }, key2);
|
|
3246
|
-
}, $[46] = fromIndex, $[47] = gapValue, $[48] = getItemKey, $[49] = itemHeight, $[50] = renderItem, $[51] = t142) : t142 = $[51], t132 = items.slice(fromIndex, toIndex).map(t142), $[38] = fromIndex, $[39] = gapValue, $[40] = getItemKey, $[41] = itemHeight, $[42] = items, $[43] = renderItem, $[44] = toIndex, $[45] = t132;
|
|
3247
|
-
} else
|
|
3248
|
-
t132 = $[45];
|
|
3249
|
-
t12 = t132;
|
|
3250
|
-
}
|
|
3251
|
-
const children = t12;
|
|
3252
|
-
let t13, t14;
|
|
3253
|
-
$[52] !== height ? (t14 = {
|
|
3191
|
+
}, [renderItem]);
|
|
3192
|
+
const children = useMemo(() => !renderItem || items.length === 0 ? null : itemHeight === -1 ? [/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3193
|
+
/* @__PURE__ */ jsx(Box, { ref: (el) => el ? setItemHeight(el.offsetHeight) : void 0, insetTop: 0, insetLeft: 0, insetRight: 0, position: "absolute", children: renderItem(items[0]) }, 0),
|
|
3194
|
+
/* @__PURE__ */ jsx("div", { ref: (el_0) => el_0 ? setGapValue(el_0.offsetHeight) : void 0, style: {
|
|
3195
|
+
height: vars.space[gap]
|
|
3196
|
+
} })
|
|
3197
|
+
] })] : items.slice(fromIndex, toIndex).map((item, _itemIndex) => {
|
|
3198
|
+
const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
|
|
3199
|
+
return /* @__PURE__ */ jsx(Box, { insetLeft: 0, insetRight: 0, position: "absolute", style: {
|
|
3200
|
+
top: itemIndex * (itemHeight + gapValue)
|
|
3201
|
+
}, children: node }, key2);
|
|
3202
|
+
}), [fromIndex, gap, gapValue, getItemKey, itemHeight, items, renderItem, toIndex]), wrapperStyle = useMemo(() => ({
|
|
3254
3203
|
height
|
|
3255
|
-
},
|
|
3256
|
-
|
|
3257
|
-
let t15;
|
|
3258
|
-
$[54] !== children || $[55] !== wrapperStyle ? (t15 = /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[54] = children, $[55] = wrapperStyle, $[56] = t15) : t15 = $[56];
|
|
3259
|
-
let t16;
|
|
3260
|
-
return $[57] !== as || $[58] !== rest || $[59] !== t15 ? (t16 = /* @__PURE__ */ jsx(Box, { "data-ui": "VirtualList", ...rest, as, position: "relative", ref, children: t15 }), $[57] = as, $[58] = rest, $[59] = t15, $[60] = t16) : t16 = $[60], t16;
|
|
3204
|
+
}), [height]);
|
|
3205
|
+
return /* @__PURE__ */ jsx(Box, { "data-ui": "VirtualList", ...rest, as, position: "relative", ref, children: /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: wrapperStyle, children }) });
|
|
3261
3206
|
}
|
|
3262
3207
|
function findScrollable(parentNode) {
|
|
3263
3208
|
let _scrollEl = parentNode;
|
|
@@ -3320,43 +3265,59 @@ function _temp$3() {
|
|
|
3320
3265
|
}
|
|
3321
3266
|
const DEFAULT_LABEL_ELEMENT = "div";
|
|
3322
3267
|
function Label(props) {
|
|
3323
|
-
const $ = c(
|
|
3324
|
-
let align, children, className, rest, t0, t1, t2, t3, textOverflowProp;
|
|
3268
|
+
const $ = c(42);
|
|
3269
|
+
let align, children, className, margin, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, maxWidth, rest, t0, t1, t2, t3, textOverflowProp;
|
|
3325
3270
|
$[0] !== props ? ({
|
|
3326
3271
|
align,
|
|
3327
3272
|
as: t0,
|
|
3328
3273
|
children,
|
|
3329
3274
|
className,
|
|
3275
|
+
margin,
|
|
3276
|
+
marginX,
|
|
3277
|
+
marginY,
|
|
3278
|
+
marginTop,
|
|
3279
|
+
marginRight,
|
|
3280
|
+
marginBottom,
|
|
3281
|
+
marginLeft,
|
|
3282
|
+
maxWidth,
|
|
3330
3283
|
muted: t1,
|
|
3331
3284
|
size: t2,
|
|
3332
3285
|
textOverflow: textOverflowProp,
|
|
3333
3286
|
weight: t3,
|
|
3334
3287
|
...rest
|
|
3335
|
-
} = props, $[0] = props, $[1] = align, $[2] = children, $[3] = className, $[4] =
|
|
3288
|
+
} = props, $[0] = props, $[1] = align, $[2] = children, $[3] = className, $[4] = margin, $[5] = marginBottom, $[6] = marginLeft, $[7] = marginRight, $[8] = marginTop, $[9] = marginX, $[10] = marginY, $[11] = maxWidth, $[12] = rest, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = textOverflowProp) : (align = $[1], children = $[2], className = $[3], margin = $[4], marginBottom = $[5], marginLeft = $[6], marginRight = $[7], marginTop = $[8], marginX = $[9], marginY = $[10], maxWidth = $[11], rest = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16], textOverflowProp = $[17]);
|
|
3336
3289
|
const Element2 = t0 === void 0 ? DEFAULT_LABEL_ELEMENT : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 1 : t2, weight = t3 === void 0 ? "regular" : t3;
|
|
3337
3290
|
let t4;
|
|
3338
|
-
$[
|
|
3291
|
+
$[18] !== align || $[19] !== className || $[20] !== margin || $[21] !== marginBottom || $[22] !== marginLeft || $[23] !== marginRight || $[24] !== marginTop || $[25] !== marginX || $[26] !== marginY || $[27] !== maxWidth || $[28] !== muted || $[29] !== size2 || $[30] !== weight ? (t4 = label({
|
|
3339
3292
|
className,
|
|
3340
3293
|
align,
|
|
3294
|
+
margin,
|
|
3295
|
+
marginX,
|
|
3296
|
+
marginY,
|
|
3297
|
+
marginTop,
|
|
3298
|
+
marginRight,
|
|
3299
|
+
marginBottom,
|
|
3300
|
+
marginLeft,
|
|
3301
|
+
maxWidth,
|
|
3341
3302
|
muted,
|
|
3342
3303
|
size: size2,
|
|
3343
3304
|
weight
|
|
3344
|
-
}), $[
|
|
3305
|
+
}), $[18] = align, $[19] = className, $[20] = margin, $[21] = marginBottom, $[22] = marginLeft, $[23] = marginRight, $[24] = marginTop, $[25] = marginX, $[26] = marginY, $[27] = maxWidth, $[28] = muted, $[29] = size2, $[30] = weight, $[31] = t4) : t4 = $[31];
|
|
3345
3306
|
let t5;
|
|
3346
|
-
$[
|
|
3307
|
+
$[32] !== textOverflowProp ? (t5 = textOverflow({
|
|
3347
3308
|
textOverflow: textOverflowProp
|
|
3348
|
-
}), $[
|
|
3309
|
+
}), $[32] = textOverflowProp, $[33] = t5) : t5 = $[33];
|
|
3349
3310
|
let t6;
|
|
3350
|
-
$[
|
|
3311
|
+
$[34] !== children || $[35] !== t5 ? (t6 = /* @__PURE__ */ jsx("span", { className: t5, children }), $[34] = children, $[35] = t5, $[36] = t6) : t6 = $[36];
|
|
3351
3312
|
let t7;
|
|
3352
|
-
return $[
|
|
3313
|
+
return $[37] !== Element2 || $[38] !== rest || $[39] !== t4 || $[40] !== t6 ? (t7 = /* @__PURE__ */ jsx(Element2, { "data-ui": "Label", ...rest, className: t4, children: t6 }), $[37] = Element2, $[38] = rest, $[39] = t4, $[40] = t6, $[41] = t7) : t7 = $[41], t7;
|
|
3353
3314
|
}
|
|
3354
3315
|
const DEFAULT_AVATAR_ELEMENT = "span";
|
|
3355
3316
|
function Avatar(props) {
|
|
3356
3317
|
const $ = c(50), t0 = props;
|
|
3357
|
-
let
|
|
3318
|
+
let animateArrowFrom, arrowPositionProp, className, hideInnerStroke, initials, onImageLoadError, rest, src, t1, t2, t3, title;
|
|
3358
3319
|
$[0] !== t0 ? ({
|
|
3359
|
-
__unstable_hideInnerStroke,
|
|
3320
|
+
__unstable_hideInnerStroke: hideInnerStroke,
|
|
3360
3321
|
as: t1,
|
|
3361
3322
|
className,
|
|
3362
3323
|
color: t2,
|
|
@@ -3368,7 +3329,7 @@ function Avatar(props) {
|
|
|
3368
3329
|
animateArrowFrom,
|
|
3369
3330
|
size: t3,
|
|
3370
3331
|
...rest
|
|
3371
|
-
} = t0, $[0] = t0, $[1] =
|
|
3332
|
+
} = t0, $[0] = t0, $[1] = animateArrowFrom, $[2] = arrowPositionProp, $[3] = className, $[4] = hideInnerStroke, $[5] = initials, $[6] = onImageLoadError, $[7] = rest, $[8] = src, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = title) : (animateArrowFrom = $[1], arrowPositionProp = $[2], className = $[3], hideInnerStroke = $[4], initials = $[5], onImageLoadError = $[6], rest = $[7], src = $[8], t1 = $[9], t2 = $[10], t3 = $[11], title = $[12]);
|
|
3372
3333
|
const Element2 = t1 === void 0 ? DEFAULT_AVATAR_ELEMENT : t1, color = t2 === void 0 ? "magenta" : t2, sizeProp = t3 === void 0 ? 1 : t3, size2 = useResponsiveProp(sizeProp), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageError, setImageError] = useState(!1);
|
|
3373
3334
|
let t4, t5;
|
|
3374
3335
|
$[13] !== arrowPosition || $[14] !== arrowPositionProp ? (t4 = () => {
|
|
@@ -3386,35 +3347,35 @@ function Avatar(props) {
|
|
|
3386
3347
|
setImageError(!0), onImageLoadError && onImageLoadError(new Error("Avatar: the image failed to load"));
|
|
3387
3348
|
}, $[20] = onImageLoadError, $[21] = t8) : t8 = $[21];
|
|
3388
3349
|
const handleImageError = t8;
|
|
3389
|
-
let t9
|
|
3390
|
-
$[22] !== size2 ? (
|
|
3391
|
-
const initialsSize = t9,
|
|
3392
|
-
let
|
|
3393
|
-
$[24] !== className || $[25] !== color || $[26] !== sizeProp ? (
|
|
3350
|
+
let t9;
|
|
3351
|
+
$[22] !== size2 ? (t9 = Object.values(size2).map(_temp$2), $[22] = size2, $[23] = t9) : t9 = $[23];
|
|
3352
|
+
const initialsSize = t9, t10 = hideInnerStroke ? "" : void 0;
|
|
3353
|
+
let t11;
|
|
3354
|
+
$[24] !== className || $[25] !== color || $[26] !== sizeProp ? (t11 = avatar({
|
|
3394
3355
|
className,
|
|
3395
3356
|
color,
|
|
3396
3357
|
size: sizeProp
|
|
3397
|
-
}), $[24] = className, $[25] = color, $[26] = sizeProp, $[27] =
|
|
3398
|
-
const
|
|
3358
|
+
}), $[24] = className, $[25] = color, $[26] = sizeProp, $[27] = t11) : t11 = $[27];
|
|
3359
|
+
const t12 = imageError ? "" : void 0;
|
|
3360
|
+
let t13;
|
|
3361
|
+
$[28] === Symbol.for("react.memo_cache_sentinel") ? (t13 = avatarArrow(), $[28] = t13) : t13 = $[28];
|
|
3399
3362
|
let t14;
|
|
3400
|
-
$[
|
|
3363
|
+
$[29] !== color ? (t14 = /* @__PURE__ */ jsx("span", { className: t13, children: /* @__PURE__ */ jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }), $[29] = color, $[30] = t14) : t14 = $[30];
|
|
3401
3364
|
let t15;
|
|
3402
|
-
$[
|
|
3365
|
+
$[31] === Symbol.for("react.memo_cache_sentinel") ? (t15 = avatarInitials(), $[31] = t15) : t15 = $[31];
|
|
3403
3366
|
let t16;
|
|
3404
|
-
$[
|
|
3367
|
+
$[32] !== initials || $[33] !== initialsSize ? (t16 = /* @__PURE__ */ jsx(Box, { alignItems: "center", as: "span", className: t15, display: "flex", justifyContent: "center", position: "absolute", inset: 0, children: /* @__PURE__ */ jsx(Label, { align: "center", as: "span", size: initialsSize, weight: "medium", children: initials }) }), $[32] = initials, $[33] = initialsSize, $[34] = t16) : t16 = $[34];
|
|
3405
3368
|
let t17;
|
|
3406
|
-
$[
|
|
3407
|
-
let t18;
|
|
3408
|
-
$[35] !== handleImageError || $[36] !== initials || $[37] !== src ? (t18 = src && /* @__PURE__ */ jsxs(Box, { className: avatarImage(), inset: 0, position: "absolute", children: [
|
|
3369
|
+
$[35] !== handleImageError || $[36] !== initials || $[37] !== src ? (t17 = src && /* @__PURE__ */ jsxs(Box, { className: avatarImage(), inset: 0, position: "absolute", children: [
|
|
3409
3370
|
/* @__PURE__ */ jsx("img", { alt: initials, onError: handleImageError, src }),
|
|
3410
3371
|
/* @__PURE__ */ jsx("span", { className: avatarImageOutline() })
|
|
3411
|
-
] }), $[35] = handleImageError, $[36] = initials, $[37] = src, $[38] =
|
|
3412
|
-
let
|
|
3413
|
-
return $[39] !== Element2 || $[40] !== arrowPosition || $[41] !== rest || $[42] !==
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
] }), $[39] = Element2, $[40] = arrowPosition, $[41] = rest, $[42] =
|
|
3372
|
+
] }), $[35] = handleImageError, $[36] = initials, $[37] = src, $[38] = t17) : t17 = $[38];
|
|
3373
|
+
let t18;
|
|
3374
|
+
return $[39] !== Element2 || $[40] !== arrowPosition || $[41] !== rest || $[42] !== t10 || $[43] !== t11 || $[44] !== t12 || $[45] !== t14 || $[46] !== t16 || $[47] !== t17 || $[48] !== title ? (t18 = /* @__PURE__ */ jsxs(Element2, { "data-hide-inner-stroke": t10, "data-ui": "Avatar", ...rest, "aria-label": title, className: t11, "data-arrow-position": arrowPosition, "data-image-error": t12, title, children: [
|
|
3375
|
+
t14,
|
|
3376
|
+
t16,
|
|
3377
|
+
t17
|
|
3378
|
+
] }), $[39] = Element2, $[40] = arrowPosition, $[41] = rest, $[42] = t10, $[43] = t11, $[44] = t12, $[45] = t14, $[46] = t16, $[47] = t17, $[48] = title, $[49] = t18) : t18 = $[49], t18;
|
|
3418
3379
|
}
|
|
3419
3380
|
function _temp$2(s) {
|
|
3420
3381
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
@@ -3431,25 +3392,25 @@ function AvatarCounter(props) {
|
|
|
3431
3392
|
...rest
|
|
3432
3393
|
} = t0, $[0] = t0, $[1] = className, $[2] = count, $[3] = rest, $[4] = t1, $[5] = t2) : (className = $[1], count = $[2], rest = $[3], t1 = $[4], t2 = $[5]);
|
|
3433
3394
|
const as = t1 === void 0 ? DEFAULT_AVATAR_COUNTER_ELEMENT : t1, size2 = useResponsiveProp(t2 === void 0 ? 1 : t2);
|
|
3434
|
-
let t3
|
|
3435
|
-
$[6] !== size2 ? (
|
|
3395
|
+
let t3;
|
|
3396
|
+
$[6] !== size2 ? (t3 = Object.values(size2).map(_temp$1), $[6] = size2, $[7] = t3) : t3 = $[7];
|
|
3436
3397
|
const labelSize = t3;
|
|
3437
|
-
let
|
|
3438
|
-
$[8] !== className || $[9] !== size2 ? (
|
|
3398
|
+
let t4;
|
|
3399
|
+
$[8] !== className || $[9] !== size2 ? (t4 = avatarCounter({
|
|
3439
3400
|
className,
|
|
3440
3401
|
size: size2
|
|
3441
|
-
}), $[8] = className, $[9] = size2, $[10] =
|
|
3402
|
+
}), $[8] = className, $[9] = size2, $[10] = t4) : t4 = $[10];
|
|
3403
|
+
let t5;
|
|
3404
|
+
$[11] !== count || $[12] !== labelSize ? (t5 = /* @__PURE__ */ jsx(Label, { align: "center", as: "span", size: labelSize, weight: "medium", children: count }), $[11] = count, $[12] = labelSize, $[13] = t5) : t5 = $[13];
|
|
3442
3405
|
let t6;
|
|
3443
|
-
$[
|
|
3444
|
-
let t7;
|
|
3445
|
-
return $[14] !== as || $[15] !== rest || $[16] !== t5 || $[17] !== t6 ? (t7 = /* @__PURE__ */ jsx(Box, { "data-ui": "AvatarCounter", ...rest, alignItems: "center", as, className: t5, display: "flex", flex: "none", justifyContent: "center", paddingX: 2, sizing: "border", children: t6 }), $[14] = as, $[15] = rest, $[16] = t5, $[17] = t6, $[18] = t7) : t7 = $[18], t7;
|
|
3406
|
+
return $[14] !== as || $[15] !== rest || $[16] !== t4 || $[17] !== t5 ? (t6 = /* @__PURE__ */ jsx(Box, { "data-ui": "AvatarCounter", ...rest, alignItems: "center", as, className: t4, display: "flex", flex: "none", justifyContent: "center", paddingX: 2, sizing: "border", children: t5 }), $[14] = as, $[15] = rest, $[16] = t4, $[17] = t5, $[18] = t6) : t6 = $[18], t6;
|
|
3446
3407
|
}
|
|
3447
3408
|
function _temp$1(s) {
|
|
3448
3409
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
3449
3410
|
}
|
|
3450
3411
|
const DEFAULT_AVATAR_STACK_ELEMENT = "span";
|
|
3451
3412
|
function AvatarStack(props) {
|
|
3452
|
-
const $ = c(
|
|
3413
|
+
const $ = c(27), t0 = props;
|
|
3453
3414
|
let childrenProp, className, rest, t1, t2, t3;
|
|
3454
3415
|
$[0] !== t0 ? ({
|
|
3455
3416
|
as: t1,
|
|
@@ -3465,18 +3426,22 @@ function AvatarStack(props) {
|
|
|
3465
3426
|
className,
|
|
3466
3427
|
size: size2
|
|
3467
3428
|
}), $[7] = className, $[8] = size2, $[9] = t6) : t6 = $[9];
|
|
3468
|
-
const t7 = "flex", t8 = "flex-start"
|
|
3429
|
+
const t7 = "flex", t8 = "flex-start";
|
|
3430
|
+
let t9;
|
|
3431
|
+
$[10] !== len || $[11] !== size2 ? (t9 = len === 0 && /* @__PURE__ */ jsx(AvatarCounter, { count: len, size: size2 }), $[10] = len, $[11] = size2, $[12] = t9) : t9 = $[12];
|
|
3432
|
+
let t10;
|
|
3433
|
+
$[13] !== extraCount || $[14] !== len || $[15] !== size2 ? (t10 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx(AvatarCounter, { count: extraCount, size: size2 }), $[13] = extraCount, $[14] = len, $[15] = size2, $[16] = t10) : t10 = $[16];
|
|
3469
3434
|
let t11;
|
|
3470
|
-
$[
|
|
3435
|
+
$[17] !== size2 ? (t11 = (child, childIndex) => /* @__PURE__ */ jsx(Fragment$1, { children: cloneElement(child, {
|
|
3471
3436
|
size: size2
|
|
3472
|
-
}) }, String(childIndex)), $[
|
|
3437
|
+
}) }, String(childIndex)), $[17] = size2, $[18] = t11) : t11 = $[18];
|
|
3473
3438
|
const t12 = visibleChildren.map(t11);
|
|
3474
3439
|
let t13;
|
|
3475
|
-
return $[
|
|
3440
|
+
return $[19] !== T0 || $[20] !== as || $[21] !== rest || $[22] !== t10 || $[23] !== t12 || $[24] !== t6 || $[25] !== t9 ? (t13 = /* @__PURE__ */ jsxs(T0, { "data-ui": t4, ...rest, alignItems: t5, as, className: t6, display: t7, justifyContent: t8, children: [
|
|
3476
3441
|
t9,
|
|
3477
3442
|
t10,
|
|
3478
3443
|
t12
|
|
3479
|
-
] }), $[
|
|
3444
|
+
] }), $[19] = T0, $[20] = as, $[21] = rest, $[22] = t10, $[23] = t12, $[24] = t6, $[25] = t9, $[26] = t13) : t13 = $[26], t13;
|
|
3480
3445
|
}
|
|
3481
3446
|
const DEFAULT_BADGE_ELEMENT = "span";
|
|
3482
3447
|
function Badge(props) {
|
|
@@ -3546,69 +3511,101 @@ function Checkbox(props) {
|
|
|
3546
3511
|
t11
|
|
3547
3512
|
] }), $[25] = style, $[26] = t10, $[27] = t5, $[28] = t12) : t12 = $[28], t12;
|
|
3548
3513
|
}
|
|
3549
|
-
const LazyRefractor = lazy(() => import("./_chunks-es/
|
|
3514
|
+
const LazyRefractor = lazy(() => import("./_chunks-es/Refractor.js")), DEFAULT_CODE_ELEMENT = "pre";
|
|
3550
3515
|
function Code(props) {
|
|
3551
|
-
const $ = c(
|
|
3552
|
-
let children, className, languageProp, rest, t1, t2, t3;
|
|
3516
|
+
const $ = c(41), t0 = props;
|
|
3517
|
+
let children, className, languageProp, margin, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, maxWidth, rest, t1, t2, t3;
|
|
3553
3518
|
$[0] !== t0 ? ({
|
|
3554
3519
|
as: t1,
|
|
3555
3520
|
children,
|
|
3556
3521
|
className,
|
|
3557
3522
|
language: languageProp,
|
|
3523
|
+
margin,
|
|
3524
|
+
marginX,
|
|
3525
|
+
marginY,
|
|
3526
|
+
marginTop,
|
|
3527
|
+
marginRight,
|
|
3528
|
+
marginBottom,
|
|
3529
|
+
marginLeft,
|
|
3530
|
+
maxWidth,
|
|
3558
3531
|
size: t2,
|
|
3559
3532
|
weight: t3,
|
|
3560
3533
|
...rest
|
|
3561
|
-
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = languageProp, $[4] =
|
|
3534
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = languageProp, $[4] = margin, $[5] = marginBottom, $[6] = marginLeft, $[7] = marginRight, $[8] = marginTop, $[9] = marginX, $[10] = marginY, $[11] = maxWidth, $[12] = rest, $[13] = t1, $[14] = t2, $[15] = t3) : (children = $[1], className = $[2], languageProp = $[3], margin = $[4], marginBottom = $[5], marginLeft = $[6], marginRight = $[7], marginTop = $[8], marginX = $[9], marginY = $[10], maxWidth = $[11], rest = $[12], t1 = $[13], t2 = $[14], t3 = $[15]);
|
|
3562
3535
|
const Element2 = t1 === void 0 ? DEFAULT_CODE_ELEMENT : t1, size2 = t2 === void 0 ? 2 : t2, weight = t3 === void 0 ? "regular" : t3, language = typeof languageProp == "string" ? languageProp : void 0;
|
|
3563
3536
|
let t4;
|
|
3564
|
-
$[
|
|
3537
|
+
$[16] !== className || $[17] !== margin || $[18] !== marginBottom || $[19] !== marginLeft || $[20] !== marginRight || $[21] !== marginTop || $[22] !== marginX || $[23] !== marginY || $[24] !== maxWidth || $[25] !== size2 || $[26] !== weight ? (t4 = code({
|
|
3565
3538
|
className,
|
|
3539
|
+
margin,
|
|
3540
|
+
marginX,
|
|
3541
|
+
marginY,
|
|
3542
|
+
marginTop,
|
|
3543
|
+
marginRight,
|
|
3544
|
+
marginBottom,
|
|
3545
|
+
marginLeft,
|
|
3546
|
+
maxWidth,
|
|
3566
3547
|
size: size2,
|
|
3567
3548
|
weight
|
|
3568
|
-
}), $[
|
|
3549
|
+
}), $[16] = className, $[17] = margin, $[18] = marginBottom, $[19] = marginLeft, $[20] = marginRight, $[21] = marginTop, $[22] = marginX, $[23] = marginY, $[24] = maxWidth, $[25] = size2, $[26] = weight, $[27] = t4) : t4 = $[27];
|
|
3569
3550
|
let t5;
|
|
3570
|
-
$[
|
|
3551
|
+
$[28] !== children ? (t5 = /* @__PURE__ */ jsx("code", { children }), $[28] = children, $[29] = t5) : t5 = $[29];
|
|
3571
3552
|
let t6;
|
|
3572
|
-
$[
|
|
3553
|
+
$[30] !== children || $[31] !== language ? (t6 = /* @__PURE__ */ jsx(LazyRefractor, { language, value: children }), $[30] = children, $[31] = language, $[32] = t6) : t6 = $[32];
|
|
3573
3554
|
let t7;
|
|
3574
|
-
$[
|
|
3555
|
+
$[33] !== t5 || $[34] !== t6 ? (t7 = /* @__PURE__ */ jsx(Suspense, { fallback: t5, children: t6 }), $[33] = t5, $[34] = t6, $[35] = t7) : t7 = $[35];
|
|
3575
3556
|
let t8;
|
|
3576
|
-
return $[
|
|
3557
|
+
return $[36] !== Element2 || $[37] !== rest || $[38] !== t4 || $[39] !== t7 ? (t8 = /* @__PURE__ */ jsx(Element2, { "data-ui": "Code", ...rest, className: t4, children: t7 }), $[36] = Element2, $[37] = rest, $[38] = t4, $[39] = t7, $[40] = t8) : t8 = $[40], t8;
|
|
3577
3558
|
}
|
|
3578
3559
|
const DEFAULT_HEADING_ELEMENT = "div";
|
|
3579
3560
|
function Heading(props) {
|
|
3580
|
-
const $ = c(
|
|
3581
|
-
let align, children, className, flex, rest, t1, t2, t3, t4, textOverflowProp;
|
|
3561
|
+
const $ = c(44), t0 = props;
|
|
3562
|
+
let align, children, className, flex, margin, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, maxWidth, rest, t1, t2, t3, t4, textOverflowProp;
|
|
3582
3563
|
$[0] !== t0 ? ({
|
|
3583
3564
|
align,
|
|
3584
3565
|
as: t1,
|
|
3585
3566
|
children,
|
|
3586
3567
|
className,
|
|
3587
3568
|
flex,
|
|
3569
|
+
margin,
|
|
3570
|
+
marginX,
|
|
3571
|
+
marginY,
|
|
3572
|
+
marginTop,
|
|
3573
|
+
marginRight,
|
|
3574
|
+
marginBottom,
|
|
3575
|
+
marginLeft,
|
|
3576
|
+
maxWidth,
|
|
3588
3577
|
muted: t2,
|
|
3589
3578
|
size: t3,
|
|
3590
3579
|
textOverflow: textOverflowProp,
|
|
3591
3580
|
weight: t4,
|
|
3592
3581
|
...rest
|
|
3593
|
-
} = t0, $[0] = t0, $[1] = align, $[2] = children, $[3] = className, $[4] = flex, $[5] =
|
|
3582
|
+
} = t0, $[0] = t0, $[1] = align, $[2] = children, $[3] = className, $[4] = flex, $[5] = margin, $[6] = marginBottom, $[7] = marginLeft, $[8] = marginRight, $[9] = marginTop, $[10] = marginX, $[11] = marginY, $[12] = maxWidth, $[13] = rest, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4, $[18] = textOverflowProp) : (align = $[1], children = $[2], className = $[3], flex = $[4], margin = $[5], marginBottom = $[6], marginLeft = $[7], marginRight = $[8], marginTop = $[9], marginX = $[10], marginY = $[11], maxWidth = $[12], rest = $[13], t1 = $[14], t2 = $[15], t3 = $[16], t4 = $[17], textOverflowProp = $[18]);
|
|
3594
3583
|
const Element2 = t1 === void 0 ? DEFAULT_HEADING_ELEMENT : t1, muted = t2 === void 0 ? !1 : t2, size2 = t3 === void 0 ? 2 : t3, weight = t4 === void 0 ? "regular" : t4;
|
|
3595
3584
|
let t5;
|
|
3596
|
-
$[
|
|
3585
|
+
$[19] !== align || $[20] !== className || $[21] !== flex || $[22] !== margin || $[23] !== marginBottom || $[24] !== marginLeft || $[25] !== marginRight || $[26] !== marginTop || $[27] !== marginX || $[28] !== marginY || $[29] !== maxWidth || $[30] !== muted || $[31] !== size2 || $[32] !== weight ? (t5 = heading({
|
|
3597
3586
|
className,
|
|
3598
3587
|
align,
|
|
3599
3588
|
flex,
|
|
3589
|
+
margin,
|
|
3590
|
+
marginX,
|
|
3591
|
+
marginY,
|
|
3592
|
+
marginTop,
|
|
3593
|
+
marginRight,
|
|
3594
|
+
marginBottom,
|
|
3595
|
+
marginLeft,
|
|
3596
|
+
maxWidth,
|
|
3600
3597
|
muted,
|
|
3601
3598
|
size: size2,
|
|
3602
3599
|
weight
|
|
3603
|
-
}), $[
|
|
3600
|
+
}), $[19] = align, $[20] = className, $[21] = flex, $[22] = margin, $[23] = marginBottom, $[24] = marginLeft, $[25] = marginRight, $[26] = marginTop, $[27] = marginX, $[28] = marginY, $[29] = maxWidth, $[30] = muted, $[31] = size2, $[32] = weight, $[33] = t5) : t5 = $[33];
|
|
3604
3601
|
let t6;
|
|
3605
|
-
$[
|
|
3602
|
+
$[34] !== textOverflowProp ? (t6 = textOverflow({
|
|
3606
3603
|
textOverflow: textOverflowProp
|
|
3607
|
-
}), $[
|
|
3604
|
+
}), $[34] = textOverflowProp, $[35] = t6) : t6 = $[35];
|
|
3608
3605
|
let t7;
|
|
3609
|
-
$[
|
|
3606
|
+
$[36] !== children || $[37] !== t6 ? (t7 = /* @__PURE__ */ jsx("span", { className: t6, children }), $[36] = children, $[37] = t6, $[38] = t7) : t7 = $[38];
|
|
3610
3607
|
let t8;
|
|
3611
|
-
return $[
|
|
3608
|
+
return $[39] !== Element2 || $[40] !== rest || $[41] !== t5 || $[42] !== t7 ? (t8 = /* @__PURE__ */ jsx(Element2, { "data-ui": "Heading", ...rest, className: t5, children: t7 }), $[39] = Element2, $[40] = rest, $[41] = t5, $[42] = t7, $[43] = t8) : t8 = $[43], t8;
|
|
3612
3609
|
}
|
|
3613
3610
|
const DEFAULT_INLINE_ELEMENT = "div";
|
|
3614
3611
|
function Inline(props) {
|
|
@@ -3653,73 +3650,74 @@ function Radio(props) {
|
|
|
3653
3650
|
let t9;
|
|
3654
3651
|
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsx("span", { className: radioPresentation() }), $[20] = t9) : t9 = $[20];
|
|
3655
3652
|
let t10;
|
|
3656
|
-
return $[21] !== style || $[22] !== t3 || $[23] !== t8 ? (t10 = /* @__PURE__ */ jsxs("
|
|
3653
|
+
return $[21] !== style || $[22] !== t3 || $[23] !== t8 ? (t10 = /* @__PURE__ */ jsxs("span", { className: t3, "data-ui": "Radio", style, children: [
|
|
3657
3654
|
t8,
|
|
3658
3655
|
t9
|
|
3659
3656
|
] }), $[21] = style, $[22] = t3, $[23] = t8, $[24] = t10) : t10 = $[24], t10;
|
|
3660
3657
|
}
|
|
3661
3658
|
const DEFAULT_SELECT_ELEMENT = "select";
|
|
3662
3659
|
function Select(props) {
|
|
3663
|
-
const $ = c(
|
|
3664
|
-
let children, customValidity, disabled, forwardedRef, readOnly, rest, t1, t2, t3, t4, t5, t6;
|
|
3660
|
+
const $ = c(41), t0 = props;
|
|
3661
|
+
let children, customValidity, disabled, flex, forwardedRef, readOnly, rest, t1, t2, t3, t4, t5, t6, t7;
|
|
3665
3662
|
$[0] !== t0 ? ({
|
|
3666
3663
|
as: t1,
|
|
3667
3664
|
border: t2,
|
|
3668
3665
|
children,
|
|
3669
3666
|
customValidity,
|
|
3670
3667
|
disabled,
|
|
3668
|
+
flex,
|
|
3671
3669
|
fontSize: t3,
|
|
3672
3670
|
gap: t4,
|
|
3673
3671
|
padding: t5,
|
|
3674
3672
|
radius: t6,
|
|
3675
3673
|
readOnly,
|
|
3676
3674
|
ref: forwardedRef,
|
|
3675
|
+
width: t7,
|
|
3677
3676
|
...rest
|
|
3678
|
-
} = t0, $[0] = t0, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] =
|
|
3679
|
-
const Element2 = t1 === void 0 ? DEFAULT_SELECT_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, fontSize = t3 === void 0 ? 2 : t3, gap = t4 === void 0 ? 2 : t4, padding = t5 === void 0 ? 3 : t5, radius = t6 === void 0 ? 1 : t6, ref = useRef(null);
|
|
3680
|
-
let t7;
|
|
3681
|
-
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[13] = t7) : t7 = $[13], useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
|
|
3677
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = flex, $[5] = forwardedRef, $[6] = readOnly, $[7] = rest, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5, $[13] = t6, $[14] = t7) : (children = $[1], customValidity = $[2], disabled = $[3], flex = $[4], forwardedRef = $[5], readOnly = $[6], rest = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12], t6 = $[13], t7 = $[14]);
|
|
3678
|
+
const Element2 = t1 === void 0 ? DEFAULT_SELECT_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, fontSize = t3 === void 0 ? 2 : t3, gap = t4 === void 0 ? 2 : t4, padding = t5 === void 0 ? 3 : t5, radius = t6 === void 0 ? 1 : t6, width = t7 === void 0 ? "fill" : t7, ref = useRef(null);
|
|
3682
3679
|
let t8;
|
|
3683
|
-
$[
|
|
3680
|
+
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t8 = () => ref.current, $[15] = t8) : t8 = $[15], useImperativeHandle(forwardedRef, t8), useCustomValidity(ref, customValidity);
|
|
3681
|
+
let t9;
|
|
3682
|
+
$[16] !== border || $[17] !== flex || $[18] !== fontSize || $[19] !== gap || $[20] !== padding || $[21] !== radius || $[22] !== width ? (t9 = select({
|
|
3684
3683
|
border,
|
|
3685
3684
|
fontSize,
|
|
3685
|
+
flex,
|
|
3686
3686
|
gap,
|
|
3687
3687
|
padding,
|
|
3688
|
-
radius
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
$[21] !== Element2 || $[22] !== children || $[23] !== rest || $[24] !== t10 ? (t11 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t9, disabled: t10, ref, children }), $[21] = Element2, $[22] = children, $[23] = rest, $[24] = t10, $[25] = t11) : t11 = $[25];
|
|
3688
|
+
radius,
|
|
3689
|
+
width
|
|
3690
|
+
}), $[16] = border, $[17] = flex, $[18] = fontSize, $[19] = gap, $[20] = padding, $[21] = radius, $[22] = width, $[23] = t9) : t9 = $[23];
|
|
3691
|
+
let t10;
|
|
3692
|
+
$[24] === Symbol.for("react.memo_cache_sentinel") ? (t10 = _inputElement(), $[24] = t10) : t10 = $[24];
|
|
3693
|
+
const t11 = disabled || readOnly;
|
|
3695
3694
|
let t12;
|
|
3696
|
-
$[26]
|
|
3695
|
+
$[25] !== Element2 || $[26] !== children || $[27] !== rest || $[28] !== t11 ? (t12 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t10, disabled: t11, ref, children }), $[25] = Element2, $[26] = children, $[27] = rest, $[28] = t11, $[29] = t12) : t12 = $[29];
|
|
3697
3696
|
let t13;
|
|
3698
|
-
$[
|
|
3697
|
+
$[30] === Symbol.for("react.memo_cache_sentinel") ? (t13 = selectPresentation(), $[30] = t13) : t13 = $[30];
|
|
3699
3698
|
let t14;
|
|
3700
|
-
$[
|
|
3699
|
+
$[31] === Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsx(ChevronDownIcon, {}), $[31] = t14) : t14 = $[31];
|
|
3701
3700
|
let t15;
|
|
3702
|
-
$[
|
|
3701
|
+
$[32] !== fontSize ? (t15 = /* @__PURE__ */ jsx(Text, { size: fontSize, children: t14 }), $[32] = fontSize, $[33] = t15) : t15 = $[33];
|
|
3703
3702
|
let t16;
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3703
|
+
$[34] !== padding || $[35] !== t15 ? (t16 = /* @__PURE__ */ jsx("span", { className: t13, children: /* @__PURE__ */ jsx(Box, { as: "span", display: "inline-block", padding, children: t15 }) }), $[34] = padding, $[35] = t15, $[36] = t16) : t16 = $[36];
|
|
3704
|
+
let t17;
|
|
3705
|
+
return $[37] !== t12 || $[38] !== t16 || $[39] !== t9 ? (t17 = /* @__PURE__ */ jsxs("span", { "data-ui": "Select", className: t9, "data-icon-right": "", children: [
|
|
3706
|
+
t12,
|
|
3707
|
+
t16
|
|
3708
|
+
] }), $[37] = t12, $[38] = t16, $[39] = t9, $[40] = t17) : t17 = $[40], t17;
|
|
3708
3709
|
}
|
|
3709
3710
|
const DEFAULT_SKELETON_ELEMENT = "div";
|
|
3710
3711
|
function Skeleton(props) {
|
|
3711
|
-
const $ = c(
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
as: t1,
|
|
3715
|
-
animated: t2,
|
|
3712
|
+
const $ = c(9), {
|
|
3713
|
+
as: t0,
|
|
3714
|
+
animated: t1,
|
|
3716
3715
|
className,
|
|
3717
3716
|
delay,
|
|
3718
3717
|
...rest
|
|
3719
|
-
} =
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
$[6] !== delay ? (t3 = () => {
|
|
3718
|
+
} = props, As = t0 === void 0 ? DEFAULT_SKELETON_ELEMENT : t0, animated = t1 === void 0 ? !1 : t1, [visible, setVisible] = useState(!delay);
|
|
3719
|
+
let t2, t3;
|
|
3720
|
+
$[0] !== delay ? (t2 = () => {
|
|
3723
3721
|
if (!delay)
|
|
3724
3722
|
return setVisible(!0);
|
|
3725
3723
|
const timeout = setTimeout(() => {
|
|
@@ -3728,15 +3726,13 @@ function Skeleton(props) {
|
|
|
3728
3726
|
return () => {
|
|
3729
3727
|
clearTimeout(timeout);
|
|
3730
3728
|
};
|
|
3731
|
-
},
|
|
3732
|
-
|
|
3733
|
-
$[9] !== className || $[10] !== rest ? (t5 = skeleton({
|
|
3729
|
+
}, t3 = [delay], $[0] = delay, $[1] = t2, $[2] = t3) : (t2 = $[1], t3 = $[2]), useEffect(t2, t3);
|
|
3730
|
+
const t4 = "Skeleton", t5 = skeleton({
|
|
3734
3731
|
className,
|
|
3735
3732
|
...rest
|
|
3736
|
-
}),
|
|
3737
|
-
const t6 = animated ? "" : void 0, t7 = visible ? "" : void 0;
|
|
3733
|
+
}), t6 = animated ? "" : void 0, t7 = visible ? "" : void 0;
|
|
3738
3734
|
let t8;
|
|
3739
|
-
return $[
|
|
3735
|
+
return $[3] !== As || $[4] !== rest || $[5] !== t5 || $[6] !== t6 || $[7] !== t7 ? (t8 = /* @__PURE__ */ jsx(As, { "data-ui": t4, ...rest, className: t5, "data-animated": t6, "data-visible": t7 }), $[3] = As, $[4] = rest, $[5] = t5, $[6] = t6, $[7] = t7, $[8] = t8) : t8 = $[8], t8;
|
|
3740
3736
|
}
|
|
3741
3737
|
const DEFAULT_CODE_SKELETON_ELEMENT = "div";
|
|
3742
3738
|
function CodeSkeleton(props) {
|
|
@@ -3830,8 +3826,8 @@ function SrOnly(props) {
|
|
|
3830
3826
|
}
|
|
3831
3827
|
const DEFAULT_SWITCH_ELEMENT = "input";
|
|
3832
3828
|
function Switch(props) {
|
|
3833
|
-
const $ = c(
|
|
3834
|
-
let className, disabled, forwardedRef, indeterminate, readOnly, rest,
|
|
3829
|
+
const $ = c(24), t0 = props;
|
|
3830
|
+
let className, disabled, forwardedRef, indeterminate, readOnly, rest, t1;
|
|
3835
3831
|
$[0] !== t0 ? ({
|
|
3836
3832
|
as: t1,
|
|
3837
3833
|
className,
|
|
@@ -3839,78 +3835,83 @@ function Switch(props) {
|
|
|
3839
3835
|
indeterminate,
|
|
3840
3836
|
readOnly,
|
|
3841
3837
|
ref: forwardedRef,
|
|
3842
|
-
style,
|
|
3843
3838
|
...rest
|
|
3844
|
-
} = t0, $[0] = t0, $[1] = className, $[2] = disabled, $[3] = forwardedRef, $[4] = indeterminate, $[5] = readOnly, $[6] = rest, $[7] =
|
|
3839
|
+
} = t0, $[0] = t0, $[1] = className, $[2] = disabled, $[3] = forwardedRef, $[4] = indeterminate, $[5] = readOnly, $[6] = rest, $[7] = t1) : (className = $[1], disabled = $[2], forwardedRef = $[3], indeterminate = $[4], readOnly = $[5], rest = $[6], t1 = $[7]);
|
|
3845
3840
|
const Element2 = t1 === void 0 ? DEFAULT_SWITCH_ELEMENT : t1, ref = useRef(null);
|
|
3846
3841
|
let t2;
|
|
3847
|
-
$[
|
|
3842
|
+
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[8] = t2) : t2 = $[8], useImperativeHandle(forwardedRef, t2);
|
|
3848
3843
|
let t3, t4;
|
|
3849
|
-
$[
|
|
3844
|
+
$[9] !== indeterminate ? (t3 = () => {
|
|
3850
3845
|
ref.current && (ref.current.indeterminate = indeterminate || !1);
|
|
3851
|
-
}, t4 = [indeterminate], $[
|
|
3846
|
+
}, t4 = [indeterminate], $[9] = indeterminate, $[10] = t3, $[11] = t4) : (t3 = $[10], t4 = $[11]), useEffect(t3, t4);
|
|
3852
3847
|
let t5;
|
|
3853
|
-
$[
|
|
3848
|
+
$[12] !== className ? (t5 = _switch({
|
|
3854
3849
|
className
|
|
3855
|
-
}), $[
|
|
3850
|
+
}), $[12] = className, $[13] = t5) : t5 = $[13];
|
|
3856
3851
|
let t6;
|
|
3857
|
-
$[
|
|
3852
|
+
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t6 = _switchElement(), $[14] = t6) : t6 = $[14];
|
|
3858
3853
|
const t7 = !disabled && readOnly ? "" : void 0, t8 = disabled || readOnly;
|
|
3859
3854
|
let t9;
|
|
3860
|
-
$[
|
|
3855
|
+
$[15] !== Element2 || $[16] !== rest || $[17] !== t7 || $[18] !== t8 ? (t9 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t6, "data-read-only": t7, disabled: t8, type: "checkbox", ref }), $[15] = Element2, $[16] = rest, $[17] = t7, $[18] = t8, $[19] = t9) : t9 = $[19];
|
|
3861
3856
|
let t10;
|
|
3862
|
-
$[
|
|
3857
|
+
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t10 = /* @__PURE__ */ jsxs("span", { "aria-hidden": !0, className: _switchPresentation(), children: [
|
|
3863
3858
|
/* @__PURE__ */ jsx("span", { className: _switchTrack() }),
|
|
3864
3859
|
/* @__PURE__ */ jsx("span", { className: _switchThumb() })
|
|
3865
|
-
] }), $[
|
|
3860
|
+
] }), $[20] = t10) : t10 = $[20];
|
|
3866
3861
|
let t11;
|
|
3867
|
-
return $[
|
|
3862
|
+
return $[21] !== t5 || $[22] !== t9 ? (t11 = /* @__PURE__ */ jsxs("span", { className: t5, "data-ui": "Switch", children: [
|
|
3868
3863
|
t9,
|
|
3869
3864
|
t10
|
|
3870
|
-
] }), $[
|
|
3865
|
+
] }), $[21] = t5, $[22] = t9, $[23] = t11) : t11 = $[23], t11;
|
|
3871
3866
|
}
|
|
3872
3867
|
const DEFAULT_TEXT_AREA_ELEMENT = "textarea";
|
|
3873
3868
|
function TextArea(props) {
|
|
3874
|
-
const $ = c(
|
|
3875
|
-
let __unstable_disableFocusRing, customValidity, forwardedRef, readOnly, rest, t1, t2, t3, t4, t5, t6, t7;
|
|
3869
|
+
const $ = c(39), t0 = props;
|
|
3870
|
+
let __unstable_disableFocusRing, className, customValidity, flex, forwardedRef, readOnly, rest, t1, t2, t3, t4, t5, t6, t7, width;
|
|
3876
3871
|
$[0] !== t0 ? ({
|
|
3877
3872
|
__unstable_disableFocusRing,
|
|
3878
3873
|
as: t1,
|
|
3879
3874
|
border: t2,
|
|
3875
|
+
className,
|
|
3880
3876
|
customValidity,
|
|
3881
3877
|
disabled: t3,
|
|
3878
|
+
flex,
|
|
3882
3879
|
fontSize: t4,
|
|
3883
3880
|
gap: t5,
|
|
3884
3881
|
padding: t6,
|
|
3885
3882
|
radius: t7,
|
|
3886
3883
|
readOnly,
|
|
3887
3884
|
ref: forwardedRef,
|
|
3885
|
+
width,
|
|
3888
3886
|
...rest
|
|
3889
|
-
} = t0, $[0] = t0, $[1] = __unstable_disableFocusRing, $[2] =
|
|
3887
|
+
} = t0, $[0] = t0, $[1] = __unstable_disableFocusRing, $[2] = className, $[3] = customValidity, $[4] = flex, $[5] = forwardedRef, $[6] = readOnly, $[7] = rest, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5, $[13] = t6, $[14] = t7, $[15] = width) : (__unstable_disableFocusRing = $[1], className = $[2], customValidity = $[3], flex = $[4], forwardedRef = $[5], readOnly = $[6], rest = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12], t6 = $[13], t7 = $[14], width = $[15]);
|
|
3890
3888
|
const Element2 = t1 === void 0 ? DEFAULT_TEXT_AREA_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, disabled = t3 === void 0 ? !1 : t3, fontSize = t4 === void 0 ? 2 : t4, gap = t5 === void 0 ? 3 : t5, padding = t6 === void 0 ? 3 : t6, radius = t7 === void 0 ? 2 : t7, ref = useRef(null);
|
|
3891
3889
|
let t8;
|
|
3892
|
-
$[
|
|
3890
|
+
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t8 = () => ref.current, $[16] = t8) : t8 = $[16], useImperativeHandle(forwardedRef, t8), useCustomValidity(ref, customValidity);
|
|
3893
3891
|
let t9;
|
|
3894
|
-
$[
|
|
3892
|
+
$[17] !== border || $[18] !== className || $[19] !== flex || $[20] !== fontSize || $[21] !== gap || $[22] !== padding || $[23] !== radius || $[24] !== width ? (t9 = textArea({
|
|
3893
|
+
className,
|
|
3895
3894
|
border,
|
|
3895
|
+
flex,
|
|
3896
3896
|
fontSize,
|
|
3897
|
+
gap,
|
|
3897
3898
|
padding,
|
|
3898
3899
|
radius,
|
|
3899
|
-
|
|
3900
|
-
}), $[
|
|
3900
|
+
width
|
|
3901
|
+
}), $[17] = border, $[18] = className, $[19] = flex, $[20] = fontSize, $[21] = gap, $[22] = padding, $[23] = radius, $[24] = width, $[25] = t9) : t9 = $[25];
|
|
3901
3902
|
const t10 = customValidity ? "" : void 0, t11 = !disabled && readOnly ? "" : void 0;
|
|
3902
3903
|
let t12;
|
|
3903
|
-
$[
|
|
3904
|
+
$[26] === Symbol.for("react.memo_cache_sentinel") ? (t12 = _inputElement(), $[26] = t12) : t12 = $[26];
|
|
3904
3905
|
const t13 = __unstable_disableFocusRing ? "" : void 0;
|
|
3905
3906
|
let t14;
|
|
3906
|
-
$[
|
|
3907
|
+
$[27] !== Element2 || $[28] !== disabled || $[29] !== readOnly || $[30] !== rest || $[31] !== t13 ? (t14 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t12, "data-no-focus-ring": t13, disabled, readOnly, ref }), $[27] = Element2, $[28] = disabled, $[29] = readOnly, $[30] = rest, $[31] = t13, $[32] = t14) : t14 = $[32];
|
|
3907
3908
|
let t15;
|
|
3908
|
-
$[
|
|
3909
|
+
$[33] === Symbol.for("react.memo_cache_sentinel") ? (t15 = /* @__PURE__ */ jsx("span", { className: _inputPresentation() }), $[33] = t15) : t15 = $[33];
|
|
3909
3910
|
let t16;
|
|
3910
|
-
return $[
|
|
3911
|
+
return $[34] !== t10 || $[35] !== t11 || $[36] !== t14 || $[37] !== t9 ? (t16 = /* @__PURE__ */ jsxs("span", { className: t9, "data-invalid": t10, "data-read-only": t11, "data-ui": "TextArea", children: [
|
|
3911
3912
|
t14,
|
|
3912
3913
|
t15
|
|
3913
|
-
] }), $[
|
|
3914
|
+
] }), $[34] = t10, $[35] = t11, $[36] = t14, $[37] = t9, $[38] = t16) : t16 = $[38], t16;
|
|
3914
3915
|
}
|
|
3915
3916
|
function useDelayedState(initialState) {
|
|
3916
3917
|
const $ = c(3), [state, setState] = useState(initialState), delayedAction = useRef(void 0);
|
|
@@ -3941,27 +3942,8 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
3941
3942
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
3942
3943
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
3943
3944
|
}, TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/v3/tooltipDelayGroup", null);
|
|
3944
|
-
function TooltipDelayGroupProvider(props) {
|
|
3945
|
-
const $ = c(9), {
|
|
3946
|
-
children,
|
|
3947
|
-
delay
|
|
3948
|
-
} = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay : delay?.open || 0, closeDelay = typeof delay == "number" ? delay : delay?.close || 0;
|
|
3949
|
-
let t0;
|
|
3950
|
-
const t1 = isGroupActive ? 1 : openDelay;
|
|
3951
|
-
let t2;
|
|
3952
|
-
$[0] !== closeDelay || $[1] !== openTooltipId || $[2] !== setIsGroupActive || $[3] !== setOpenTooltipId || $[4] !== t1 ? (t2 = {
|
|
3953
|
-
setIsGroupActive,
|
|
3954
|
-
openTooltipId,
|
|
3955
|
-
setOpenTooltipId,
|
|
3956
|
-
openDelay: t1,
|
|
3957
|
-
closeDelay
|
|
3958
|
-
}, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] = t1, $[5] = t2) : t2 = $[5], t0 = t2;
|
|
3959
|
-
const value = t0;
|
|
3960
|
-
let t3;
|
|
3961
|
-
return $[6] !== children || $[7] !== value ? (t3 = /* @__PURE__ */ jsx(TooltipDelayGroupContext.Provider, { value, children }), $[6] = children, $[7] = value, $[8] = t3) : t3 = $[8], t3;
|
|
3962
|
-
}
|
|
3963
3945
|
function useTooltipDelayGroup() {
|
|
3964
|
-
return
|
|
3946
|
+
return use(TooltipDelayGroupContext);
|
|
3965
3947
|
}
|
|
3966
3948
|
function TooltipLayer(props) {
|
|
3967
3949
|
const $ = c(50);
|
|
@@ -3984,40 +3966,36 @@ function TooltipLayer(props) {
|
|
|
3984
3966
|
tone: t0,
|
|
3985
3967
|
...rest
|
|
3986
3968
|
} = props, $[0] = props, $[1] = animate, $[2] = arrow2, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = rest, $[13] = scheme, $[14] = shadow, $[15] = style, $[16] = t0) : (animate = $[1], arrow2 = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], rest = $[12], scheme = $[13], shadow = $[14], style = $[15], t0 = $[16]);
|
|
3987
|
-
const tone = t0 === void 0 ? "inherit" : t0;
|
|
3988
|
-
let
|
|
3989
|
-
|
|
3990
|
-
let t3;
|
|
3991
|
-
$[17] !== originX || $[18] !== originY || $[19] !== style || $[20] !== t2 ? (t3 = {
|
|
3969
|
+
const tone = t0 === void 0 ? "inherit" : t0, t1 = animate ? "transform" : void 0;
|
|
3970
|
+
let t2;
|
|
3971
|
+
$[17] !== originX || $[18] !== originY || $[19] !== style || $[20] !== t1 ? (t2 = {
|
|
3992
3972
|
originX,
|
|
3993
3973
|
originY,
|
|
3994
|
-
willChange:
|
|
3974
|
+
willChange: t1,
|
|
3995
3975
|
...style
|
|
3996
|
-
}, $[17] = originX, $[18] = originY, $[19] = style, $[20] =
|
|
3997
|
-
const rootStyle =
|
|
3998
|
-
let
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
left: t5,
|
|
4003
|
-
top: t6,
|
|
3976
|
+
}, $[17] = originX, $[18] = originY, $[19] = style, $[20] = t1, $[21] = t2) : t2 = $[21];
|
|
3977
|
+
const rootStyle = t2, t3 = arrowX !== null ? arrowX : void 0, t4 = arrowY !== null ? arrowY : void 0;
|
|
3978
|
+
let t5;
|
|
3979
|
+
$[22] !== t3 || $[23] !== t4 ? (t5 = {
|
|
3980
|
+
left: t3,
|
|
3981
|
+
top: t4,
|
|
4004
3982
|
right: void 0,
|
|
4005
3983
|
bottom: void 0
|
|
4006
|
-
}, $[22] =
|
|
4007
|
-
const arrowStyle =
|
|
3984
|
+
}, $[22] = t3, $[23] = t4, $[24] = t5) : t5 = $[24];
|
|
3985
|
+
const arrowStyle = t5, t6 = animate ? "" : void 0;
|
|
3986
|
+
let t7;
|
|
3987
|
+
$[25] !== animate ? (t7 = animate ? ["hidden", "initial"] : void 0, $[25] = animate, $[26] = t7) : t7 = $[26];
|
|
3988
|
+
let t8;
|
|
3989
|
+
$[27] !== animate ? (t8 = animate ? ["visible", "scaleIn"] : void 0, $[27] = animate, $[28] = t8) : t8 = $[28];
|
|
4008
3990
|
let t9;
|
|
4009
|
-
$[
|
|
3991
|
+
$[29] !== animate ? (t9 = animate ? ["hidden", "scaleOut"] : void 0, $[29] = animate, $[30] = t9) : t9 = $[30];
|
|
4010
3992
|
let t10;
|
|
4011
|
-
$[
|
|
3993
|
+
$[31] !== arrow2 || $[32] !== arrowRef || $[33] !== arrowStyle ? (t10 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[31] = arrow2, $[32] = arrowRef, $[33] = arrowStyle, $[34] = t10) : t10 = $[34];
|
|
4012
3994
|
let t11;
|
|
4013
|
-
$[
|
|
4014
|
-
let t12;
|
|
4015
|
-
$[31] !== arrow2 || $[32] !== arrowRef || $[33] !== arrowStyle ? (t12 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[31] = arrow2, $[32] = arrowRef, $[33] = arrowStyle, $[34] = t12) : t12 = $[34];
|
|
4016
|
-
let t13;
|
|
4017
|
-
return $[35] !== children || $[36] !== padding || $[37] !== placement || $[38] !== radius || $[39] !== rest || $[40] !== rootStyle || $[41] !== scheme || $[42] !== shadow || $[43] !== t10 || $[44] !== t11 || $[45] !== t12 || $[46] !== t8 || $[47] !== t9 || $[48] !== tone ? (t13 = /* @__PURE__ */ jsxs(Layer, { "data-ui": "Tooltip__layer", ...rest, as: motion.div, "data-animate": t8, "data-placement": placement, padding, radius, scheme, shadow, style: rootStyle, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t9, animate: t10, exit: t11, tone, children: [
|
|
3995
|
+
return $[35] !== children || $[36] !== padding || $[37] !== placement || $[38] !== radius || $[39] !== rest || $[40] !== rootStyle || $[41] !== scheme || $[42] !== shadow || $[43] !== t10 || $[44] !== t6 || $[45] !== t7 || $[46] !== t8 || $[47] !== t9 || $[48] !== tone ? (t11 = /* @__PURE__ */ jsxs(Layer, { "data-ui": "Tooltip__layer", ...rest, as: motion.div, "data-animate": t6, "data-placement": placement, padding, radius, scheme, shadow, style: rootStyle, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t7, animate: t8, exit: t9, tone, children: [
|
|
4018
3996
|
children,
|
|
4019
|
-
|
|
4020
|
-
] }), $[35] = children, $[36] = padding, $[37] = placement, $[38] = radius, $[39] = rest, $[40] = rootStyle, $[41] = scheme, $[42] = shadow, $[43] = t10, $[44] =
|
|
3997
|
+
t10
|
|
3998
|
+
] }), $[35] = children, $[36] = padding, $[37] = placement, $[38] = radius, $[39] = rest, $[40] = rootStyle, $[41] = scheme, $[42] = shadow, $[43] = t10, $[44] = t6, $[45] = t7, $[46] = t8, $[47] = t9, $[48] = tone, $[49] = t11) : t11 = $[49], t11;
|
|
4021
3999
|
}
|
|
4022
4000
|
const DEFAULT_TOOLTIP_ELEMENT = "div";
|
|
4023
4001
|
function Tooltip(props) {
|
|
@@ -4173,19 +4151,36 @@ function useCloseOnMouseLeave(t0) {
|
|
|
4173
4151
|
let t3;
|
|
4174
4152
|
$[7] !== isInsideGroup || $[8] !== showTooltip ? (t3 = [isInsideGroup, showTooltip], $[7] = isInsideGroup, $[8] = showTooltip, $[9] = t3) : t3 = $[9], useEffect(t2, t3);
|
|
4175
4153
|
}
|
|
4154
|
+
function TooltipDelayGroupProvider(props) {
|
|
4155
|
+
const $ = c(9), {
|
|
4156
|
+
children,
|
|
4157
|
+
delay
|
|
4158
|
+
} = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay : delay?.open || 0, closeDelay = typeof delay == "number" ? delay : delay?.close || 0, t0 = isGroupActive ? 1 : openDelay;
|
|
4159
|
+
let t1;
|
|
4160
|
+
$[0] !== closeDelay || $[1] !== openTooltipId || $[2] !== setIsGroupActive || $[3] !== setOpenTooltipId || $[4] !== t0 ? (t1 = {
|
|
4161
|
+
setIsGroupActive,
|
|
4162
|
+
openTooltipId,
|
|
4163
|
+
setOpenTooltipId,
|
|
4164
|
+
openDelay: t0,
|
|
4165
|
+
closeDelay
|
|
4166
|
+
}, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] = t0, $[5] = t1) : t1 = $[5];
|
|
4167
|
+
const value = t1;
|
|
4168
|
+
let t2;
|
|
4169
|
+
return $[6] !== children || $[7] !== value ? (t2 = /* @__PURE__ */ jsx(TooltipDelayGroupContext.Provider, { value, children }), $[6] = children, $[7] = value, $[8] = t2) : t2 = $[8], t2;
|
|
4170
|
+
}
|
|
4176
4171
|
function BoundaryElementProvider(props) {
|
|
4177
4172
|
const $ = c(5), {
|
|
4178
4173
|
children,
|
|
4179
4174
|
element
|
|
4180
4175
|
} = props;
|
|
4181
|
-
let t0
|
|
4182
|
-
$[0] !== element ? (
|
|
4176
|
+
let t0;
|
|
4177
|
+
$[0] !== element ? (t0 = {
|
|
4183
4178
|
version: 0,
|
|
4184
4179
|
element
|
|
4185
|
-
}, $[0] = element, $[1] =
|
|
4180
|
+
}, $[0] = element, $[1] = t0) : t0 = $[1];
|
|
4186
4181
|
const value = t0;
|
|
4187
|
-
let
|
|
4188
|
-
return $[2] !== children || $[3] !== value ? (
|
|
4182
|
+
let t1;
|
|
4183
|
+
return $[2] !== children || $[3] !== value ? (t1 = /* @__PURE__ */ jsx(BoundaryElementContext.Provider, { value, children }), $[2] = children, $[3] = value, $[4] = t1) : t1 = $[4], t1;
|
|
4189
4184
|
}
|
|
4190
4185
|
function findMaxBreakpoints(media2, width) {
|
|
4191
4186
|
const ret = [];
|
|
@@ -4210,30 +4205,25 @@ function ElementQuery(props) {
|
|
|
4210
4205
|
ref: forwardedRef,
|
|
4211
4206
|
...rest
|
|
4212
4207
|
} = t0, $[0] = t0, $[1] = children, $[2] = forwardedRef, $[3] = mediaProp, $[4] = rest, $[5] = t1) : (children = $[1], forwardedRef = $[2], mediaProp = $[3], rest = $[4], t1 = $[5]);
|
|
4213
|
-
const Element2 = t1 === void 0 ? DEFAULT_ELEMENT_QUERY_ELEMENT : t1, breakpoints = mediaProp ?? DEFAULT_BREAKPOINTS, [element, setElement] = useState(null),
|
|
4208
|
+
const Element2 = t1 === void 0 ? DEFAULT_ELEMENT_QUERY_ELEMENT : t1, breakpoints = mediaProp ?? DEFAULT_BREAKPOINTS, [element, setElement] = useState(null), width = useElementSize(element)?.border.width ?? window.innerWidth;
|
|
4214
4209
|
let t2;
|
|
4215
|
-
t2 = elementSize?.border.width ?? window.innerWidth;
|
|
4216
|
-
const width = t2;
|
|
4217
|
-
let t3, t4;
|
|
4218
4210
|
if ($[6] !== breakpoints || $[7] !== width) {
|
|
4219
4211
|
const eq = findMaxBreakpoints(breakpoints, width);
|
|
4220
|
-
|
|
4212
|
+
t2 = eq.length ? eq.join(" ") : void 0, $[6] = breakpoints, $[7] = width, $[8] = t2;
|
|
4221
4213
|
} else
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
let t5, t6;
|
|
4214
|
+
t2 = $[8];
|
|
4215
|
+
const max = t2;
|
|
4216
|
+
let t3;
|
|
4226
4217
|
if ($[9] !== breakpoints || $[10] !== width) {
|
|
4227
4218
|
const eq_0 = findMinBreakpoints(breakpoints, width);
|
|
4228
|
-
|
|
4219
|
+
t3 = eq_0.length ? eq_0.join(" ") : void 0, $[9] = breakpoints, $[10] = width, $[11] = t3;
|
|
4229
4220
|
} else
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
return $[15] !== Element2 || $[16] !== children || $[17] !== max || $[18] !== min || $[19] !== rest ? (t9 = /* @__PURE__ */ jsx(Element2, { "data-ui": "ElementQuery", ...rest, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[15] = Element2, $[16] = children, $[17] = max, $[18] = min, $[19] = rest, $[20] = t9) : t9 = $[20], t9;
|
|
4221
|
+
t3 = $[11];
|
|
4222
|
+
const min = t3;
|
|
4223
|
+
let t4, t5;
|
|
4224
|
+
$[12] !== element ? (t4 = () => element, t5 = [element], $[12] = element, $[13] = t4, $[14] = t5) : (t4 = $[13], t5 = $[14]), useImperativeHandle(forwardedRef, t4, t5);
|
|
4225
|
+
let t6;
|
|
4226
|
+
return $[15] !== Element2 || $[16] !== children || $[17] !== max || $[18] !== min || $[19] !== rest ? (t6 = /* @__PURE__ */ jsx(Element2, { "data-ui": "ElementQuery", ...rest, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[15] = Element2, $[16] = children, $[17] = max, $[18] = min, $[19] = rest, $[20] = t6) : t6 = $[20], t6;
|
|
4237
4227
|
}
|
|
4238
4228
|
class ErrorBoundary extends Component {
|
|
4239
4229
|
state = {
|
|
@@ -4267,22 +4257,20 @@ function PortalProvider(props) {
|
|
|
4267
4257
|
children,
|
|
4268
4258
|
element,
|
|
4269
4259
|
__unstable_elements: elementsProp
|
|
4270
|
-
} = props, elements = useUnique(elementsProp), parentPortal =
|
|
4260
|
+
} = props, elements = useUnique(elementsProp), parentPortal = use(PortalContext);
|
|
4271
4261
|
let t0;
|
|
4272
4262
|
$[0] !== elements || $[1] !== parentPortal ? (t0 = () => elements?.default ?? (parentPortal.element || document.body), $[0] = elements, $[1] = parentPortal, $[2] = t0) : t0 = $[2];
|
|
4273
|
-
const fallbackElement = useSyncExternalStore(emptySubscribe, t0, _temp);
|
|
4274
|
-
let
|
|
4275
|
-
|
|
4276
|
-
let t3;
|
|
4277
|
-
$[3] !== elements || $[4] !== t2 ? (t3 = {
|
|
4263
|
+
const fallbackElement = useSyncExternalStore(emptySubscribe, t0, _temp), t1 = element || fallbackElement;
|
|
4264
|
+
let t2;
|
|
4265
|
+
$[3] !== elements || $[4] !== t1 ? (t2 = {
|
|
4278
4266
|
version: 0,
|
|
4279
4267
|
boundaryElement: null,
|
|
4280
|
-
element:
|
|
4268
|
+
element: t1,
|
|
4281
4269
|
elements
|
|
4282
|
-
}, $[3] = elements, $[4] =
|
|
4283
|
-
const value =
|
|
4284
|
-
let
|
|
4285
|
-
return $[6] !== children || $[7] !== value ? (
|
|
4270
|
+
}, $[3] = elements, $[4] = t1, $[5] = t2) : t2 = $[5];
|
|
4271
|
+
const value = t2;
|
|
4272
|
+
let t3;
|
|
4273
|
+
return $[6] !== children || $[7] !== value ? (t3 = /* @__PURE__ */ jsx(PortalContext.Provider, { value, children }), $[6] = children, $[7] = value, $[8] = t3) : t3 = $[8], t3;
|
|
4286
4274
|
}
|
|
4287
4275
|
function _temp() {
|
|
4288
4276
|
return null;
|