@sanity/ui 3.0.0-static.14 → 3.0.0-static.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/dist/_chunks-cjs/_visual-editing.js +132 -145
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-cjs/refractor.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +133 -146
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_chunks-es/refractor.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +5 -15
- package/dist/_visual-editing.d.ts +5 -15
- package/dist/_visual-editing.js +0 -1
- package/dist/_visual-editing.js.map +1 -1
- package/dist/_visual-editing.mjs +1 -2
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/css.d.mts +12 -1
- package/dist/css.d.ts +12 -1
- package/dist/css.js +325 -430
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +325 -430
- package/dist/css.mjs.map +1 -1
- package/dist/index.d.mts +10 -20
- package/dist/index.d.ts +10 -20
- package/dist/index.js +7 -41
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -44
- package/dist/index.mjs.map +1 -1
- package/dist/system.css +856 -84
- package/dist/system.min.css +1 -1
- package/exports/_visual-editing.ts +27 -27
- package/exports/index.ts +1 -1
- package/package.json +5 -5
- package/src/cli/index.ts +1 -13
- package/src/{ui → core}/_compat/index.ts +0 -1
- package/src/{ui → core}/_compat/theme/themeProvider.tsx +3 -3
- package/src/{ui → core}/components/tab/tabList.tsx +19 -4
- package/src/{ui → core}/index.ts +0 -1
- package/src/{ui → core}/primitives/box/box.tsx +3 -0
- package/src/{ui → core}/primitives/card/card.tsx +15 -21
- package/src/core/primitives/card/cardProvider.tsx +27 -0
- package/src/{ui → core}/primitives/card/types.ts +5 -4
- package/src/{ui → core}/primitives/popover/popover.tsx +1 -1
- package/src/{ui → core}/primitives/popover/popoverLayer.tsx +9 -20
- package/src/{ui → core}/primitives/tooltip/tooltip.tsx +2 -1
- package/src/{ui → core}/primitives/tooltip/tooltipLayer.tsx +11 -21
- package/src/{ui/utils/portal/portal.ts → core/utils/portal/portal.tsx} +8 -10
- package/src/css/_mergeStyles.ts +0 -7
- package/src/css/_system.style.ts +2 -0
- package/src/css/aspects/font/font.style.ts +0 -21
- package/src/css/aspects/font/font.ts +1 -6
- package/src/css/aspects/font/types.ts +0 -4
- package/src/css/aspects/index.ts +1 -0
- package/src/css/aspects/margin/margin.style.ts +0 -3
- package/src/css/aspects/textAlign/index.ts +2 -0
- package/src/css/aspects/textAlign/textAlign.style.ts +26 -0
- package/src/css/aspects/textAlign/textAlign.ts +8 -0
- package/src/css/aspects/textAlign/types.ts +7 -0
- package/src/css/primitives/_input/_input.style.ts +9 -11
- package/src/css/primitives/box/box.style.ts +5 -1
- package/src/css/primitives/box/box.ts +2 -0
- package/src/css/primitives/box/types.ts +2 -0
- package/src/css/primitives/heading/heading.ts +2 -1
- package/src/css/primitives/heading/types.ts +2 -1
- package/src/css/primitives/label/label.ts +2 -1
- package/src/css/primitives/label/types.ts +2 -1
- package/src/css/primitives/text/text.style.ts +0 -5
- package/src/css/primitives/text/text.ts +2 -1
- package/src/css/primitives/text/types.ts +2 -1
- package/src/css/primitives/textInput/textInput.style.ts +1 -120
- package/src/css/aspects/height/rules.ts +0 -7
- package/src/css/aspects/width/rules.ts +0 -8
- package/src/css/components/menu/rules.ts +0 -15
- package/src/css/primitives/avatar/rules.ts +0 -176
- package/src/css/primitives/button/rules.ts +0 -302
- package/src/css/primitives/checkbox/rules.ts +0 -152
- package/src/css/primitives/code/rules.ts +0 -96
- package/src/css/primitives/container/rules.ts +0 -8
- package/src/css/primitives/heading/rules.ts +0 -155
- package/src/css/primitives/kbd/rules.ts +0 -20
- package/src/css/primitives/label/rules.ts +0 -137
- package/src/css/primitives/radio/rules.ts +0 -121
- package/src/css/primitives/select/rules.ts +0 -22
- package/src/css/primitives/switch/rules.ts +0 -340
- package/src/css/primitives/text/rules.ts +0 -164
- package/src/css/primitives/textArea/rules.ts +0 -7
- package/src/css/primitives/textInput/rules.ts +0 -224
- package/src/css/primitives/tooltip/rules.ts +0 -19
- package/src/ui/RootClassNames.tsx +0 -44
- package/src/ui/_compat/studioTheme.ts +0 -7
- package/src/ui/primitives/card/cardProvider.tsx +0 -21
- /package/src/{ui → core}/StyleTags.tsx +0 -0
- /package/src/{ui → core}/_compat/helpers.ts +0 -0
- /package/src/{ui → core}/_compat/styles/_responsive.ts +0 -0
- /package/src/{ui → core}/_compat/styles/index.ts +0 -0
- /package/src/{ui → core}/_compat/theme/index.ts +0 -0
- /package/src/{ui → core}/_compat/theme/theme.test.tsx +0 -0
- /package/src/{ui → core}/_compat/theme/themeColorProvider.tsx +0 -0
- /package/src/{ui → core}/_compat/theme/themeContext.ts +0 -0
- /package/src/{ui → core}/_compat/theme/types.ts +0 -0
- /package/src/{ui → core}/_compat/theme/useRootTheme.ts +0 -0
- /package/src/{ui → core}/_compat/theme/useTheme.ts +0 -0
- /package/src/{ui → core}/_compat/types.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/__mocks__/apiStore.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/__mocks__/countries.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/async.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/custom.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/fullscreen.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/types.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/autocomplete.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/autocompleteOption.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/autocompleteReducer.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/constants.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/index.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/types.ts +0 -0
- /package/src/{ui → core}/components/breadcrumbs/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/components/breadcrumbs/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/breadcrumbs/breadcrumbs.tsx +0 -0
- /package/src/{ui → core}/components/breadcrumbs/index.ts +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/activate.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/autoFocus.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/layering.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/nested.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/onScroll.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/panes.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/position.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/provider.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/wrapped.tsx +0 -0
- /package/src/{ui → core}/components/dialog/dialog.tsx +0 -0
- /package/src/{ui → core}/components/dialog/dialogCard.tsx +0 -0
- /package/src/{ui → core}/components/dialog/dialogContext.ts +0 -0
- /package/src/{ui → core}/components/dialog/dialogProvider.tsx +0 -0
- /package/src/{ui → core}/components/dialog/index.ts +0 -0
- /package/src/{ui → core}/components/dialog/isTargetWithinScope.ts +0 -0
- /package/src/{ui → core}/components/dialog/useDialog.ts +0 -0
- /package/src/{ui → core}/components/hotkeys/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/hotkeys/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/components/hotkeys/hotkeys.tsx +0 -0
- /package/src/{ui → core}/components/hotkeys/index.ts +0 -0
- /package/src/{ui → core}/components/index.ts +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/asComponent.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/avatarMenu.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/closableMenuButton.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/constrainedInBoundary.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/customMenuItem.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/customSelectedState.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/disableFocusOnClose.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/groups.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/menuButton.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/menuGroupRight.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/nestedMenu.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/onCloseMenuButton.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/selectedItem.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/shouldFocus.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/tones.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/withoutArrow.tsx +0 -0
- /package/src/{ui → core}/components/menu/helpers.ts +0 -0
- /package/src/{ui → core}/components/menu/index.ts +0 -0
- /package/src/{ui → core}/components/menu/menu.test.tsx +0 -0
- /package/src/{ui → core}/components/menu/menu.tsx +0 -0
- /package/src/{ui → core}/components/menu/menuButton.tsx +0 -0
- /package/src/{ui → core}/components/menu/menuContext.ts +0 -0
- /package/src/{ui → core}/components/menu/menuDivider.tsx +0 -0
- /package/src/{ui → core}/components/menu/menuGroup.tsx +0 -0
- /package/src/{ui → core}/components/menu/menuItem.tsx +0 -0
- /package/src/{ui → core}/components/menu/useMenu.ts +0 -0
- /package/src/{ui → core}/components/menu/useMenuController.ts +0 -0
- /package/src/{ui → core}/components/skeleton/__workshop__/delay.tsx +0 -0
- /package/src/{ui → core}/components/skeleton/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/skeleton/__workshop__/skeleton.tsx +0 -0
- /package/src/{ui → core}/components/skeleton/codeSkeleton.tsx +0 -0
- /package/src/{ui → core}/components/skeleton/headingSkeleton.tsx +0 -0
- /package/src/{ui → core}/components/skeleton/index.ts +0 -0
- /package/src/{ui → core}/components/skeleton/labelSkeleton.tsx +0 -0
- /package/src/{ui → core}/components/skeleton/skeleton.tsx +0 -0
- /package/src/{ui → core}/components/skeleton/textSkeleton.tsx +0 -0
- /package/src/{ui → core}/components/tab/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/components/tab/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/tab/index.ts +0 -0
- /package/src/{ui → core}/components/tab/tab.tsx +0 -0
- /package/src/{ui → core}/components/tab/tabPanel.tsx +0 -0
- /package/src/{ui → core}/components/toast/__workshop__/hook.tsx +0 -0
- /package/src/{ui → core}/components/toast/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/toast/__workshop__/toast.tsx +0 -0
- /package/src/{ui → core}/components/toast/index.ts +0 -0
- /package/src/{ui → core}/components/toast/toast.test.tsx +0 -0
- /package/src/{ui → core}/components/toast/toast.tsx +0 -0
- /package/src/{ui → core}/components/toast/toastContext.ts +0 -0
- /package/src/{ui → core}/components/toast/toastLayer.tsx +0 -0
- /package/src/{ui → core}/components/toast/toastProvider.tsx +0 -0
- /package/src/{ui → core}/components/toast/toastState.ts +0 -0
- /package/src/{ui → core}/components/toast/types.ts +0 -0
- /package/src/{ui → core}/components/toast/useToast.ts +0 -0
- /package/src/{ui → core}/components/tree/__workshop__/basic.perf.ts +0 -0
- /package/src/{ui → core}/components/tree/__workshop__/basic.tsx +0 -0
- /package/src/{ui → core}/components/tree/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/tree/__workshop__/tabFromElement.tsx +0 -0
- /package/src/{ui → core}/components/tree/helpers.ts +0 -0
- /package/src/{ui → core}/components/tree/index.ts +0 -0
- /package/src/{ui → core}/components/tree/tree.tsx +0 -0
- /package/src/{ui → core}/components/tree/treeContext.ts +0 -0
- /package/src/{ui → core}/components/tree/treeGroup.tsx +0 -0
- /package/src/{ui → core}/components/tree/treeItem.tsx +0 -0
- /package/src/{ui → core}/components/tree/types.ts +0 -0
- /package/src/{ui → core}/components/tree/useTree.ts +0 -0
- /package/src/{ui → core}/constants.ts +0 -0
- /package/src/{ui → core}/global.ts +0 -0
- /package/src/{ui → core}/helpers/animation.ts +0 -0
- /package/src/{ui → core}/helpers/element.ts +0 -0
- /package/src/{ui → core}/helpers/focus.ts +0 -0
- /package/src/{ui → core}/helpers/index.ts +0 -0
- /package/src/{ui → core}/helpers/props.ts +0 -0
- /package/src/{ui → core}/helpers/scroll.ts +0 -0
- /package/src/{ui → core}/hooks/index.ts +0 -0
- /package/src/{ui → core}/hooks/useArrayProp.ts +0 -0
- /package/src/{ui → core}/hooks/useClickOutside.test.tsx +0 -0
- /package/src/{ui → core}/hooks/useClickOutside.ts +0 -0
- /package/src/{ui → core}/hooks/useClickOutsideEvent.test.tsx +0 -0
- /package/src/{ui → core}/hooks/useClickOutsideEvent.ts +0 -0
- /package/src/{ui → core}/hooks/useCustomValidity.ts +0 -0
- /package/src/{ui → core}/hooks/useDelayed.test.ts +0 -0
- /package/src/{ui → core}/hooks/useDelayedState.ts +0 -0
- /package/src/{ui → core}/hooks/useElementRect/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/hooks/useElementRect/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/hooks/useElementRect/index.ts +0 -0
- /package/src/{ui → core}/hooks/useElementRect/useElementRect.ts +0 -0
- /package/src/{ui → core}/hooks/useElementSize.ts +0 -0
- /package/src/{ui → core}/hooks/useForwardedRef.ts +0 -0
- /package/src/{ui → core}/hooks/useGlobalKeyDown.ts +0 -0
- /package/src/{ui → core}/hooks/useIsomorphicEffect.ts +0 -0
- /package/src/{ui → core}/hooks/useMatchMedia.ts +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/__workshop__/test.tsx +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/index.ts +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/useMediaIndex.ts +0 -0
- /package/src/{ui → core}/hooks/useMounted.ts +0 -0
- /package/src/{ui → core}/hooks/usePrefersDark.hydration.test.tsx +0 -0
- /package/src/{ui → core}/hooks/usePrefersDark.test.tsx +0 -0
- /package/src/{ui → core}/hooks/usePrefersDark.ts +0 -0
- /package/src/{ui → core}/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -0
- /package/src/{ui → core}/hooks/usePrefersReducedMotion.test.tsx +0 -0
- /package/src/{ui → core}/hooks/usePrefersReducedMotion.ts +0 -0
- /package/src/{ui → core}/lib/createGlobalScopedContext.ts +0 -0
- /package/src/{ui → core}/lib/globalScope.ts +0 -0
- /package/src/{ui → core}/lib/isRecord.ts +0 -0
- /package/src/{ui → core}/middleware/origin.ts +0 -0
- /package/src/{ui → core}/observers/elementSizeObserver.ts +0 -0
- /package/src/{ui → core}/observers/index.ts +0 -0
- /package/src/{ui → core}/observers/resizeObserver.ts +0 -0
- /package/src/{ui → core}/primitives/_selectable/index.ts +0 -0
- /package/src/{ui → core}/primitives/_selectable/selectable.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/__workshop__/asButton.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/avatar/__workshop__/stack.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/__workshop__/withinButton.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/avatar.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/avatarCounter.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/avatarStack.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/index.ts +0 -0
- /package/src/{ui → core}/primitives/avatar/types.ts +0 -0
- /package/src/{ui → core}/primitives/badge/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/badge/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/badge/__workshop__/tones.tsx +0 -0
- /package/src/{ui → core}/primitives/badge/badge.test.tsx +0 -0
- /package/src/{ui → core}/primitives/badge/badge.tsx +0 -0
- /package/src/{ui → core}/primitives/badge/index.ts +0 -0
- /package/src/{ui → core}/primitives/badge/types.ts +0 -0
- /package/src/{ui → core}/primitives/box/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/box/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/box/__workshop__/responsive.tsx +0 -0
- /package/src/{ui → core}/primitives/box/index.ts +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/custom.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/customIcons.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/disabled.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/mixedChildren.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/sanityUploadButton.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/stacked.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/styled1.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/styled2.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/uploadButton.tsx +0 -0
- /package/src/{ui → core}/primitives/button/button.test.tsx +0 -0
- /package/src/{ui → core}/primitives/button/button.tsx +0 -0
- /package/src/{ui → core}/primitives/button/index.ts +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/allTones.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/asButton.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/asComponent.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/checkered.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/interactive.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/listNavigation.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/selected.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/styled.tsx +0 -0
- /package/src/{ui → core}/primitives/card/cardContext.ts +0 -0
- /package/src/{ui → core}/primitives/card/index.ts +0 -0
- /package/src/{ui → core}/primitives/card/useCard.ts +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/readOnly.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/tones.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/checkbox.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/index.ts +0 -0
- /package/src/{ui → core}/primitives/code/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/code/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{ui → core}/primitives/code/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/code/code.tsx +0 -0
- /package/src/{ui → core}/primitives/code/index.ts +0 -0
- /package/src/{ui → core}/primitives/code/refractor.tsx +0 -0
- /package/src/{ui → core}/primitives/container/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/container/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/container/container.tsx +0 -0
- /package/src/{ui → core}/primitives/container/index.ts +0 -0
- /package/src/{ui → core}/primitives/container/types.ts +0 -0
- /package/src/{ui → core}/primitives/flex/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/flex/__workshop__/gap.tsx +0 -0
- /package/src/{ui → core}/primitives/flex/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/flex/flex.tsx +0 -0
- /package/src/{ui → core}/primitives/flex/index.ts +0 -0
- /package/src/{ui → core}/primitives/grid/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/grid/__workshop__/responsive.tsx +0 -0
- /package/src/{ui → core}/primitives/grid/grid.tsx +0 -0
- /package/src/{ui → core}/primitives/grid/index.ts +0 -0
- /package/src/{ui → core}/primitives/heading/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/heading/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{ui → core}/primitives/heading/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/heading/heading.tsx +0 -0
- /package/src/{ui → core}/primitives/heading/index.ts +0 -0
- /package/src/{ui → core}/primitives/index.ts +0 -0
- /package/src/{ui → core}/primitives/inline/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/inline/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/inline/index.ts +0 -0
- /package/src/{ui → core}/primitives/inline/inline.tsx +0 -0
- /package/src/{ui → core}/primitives/inline/types.ts +0 -0
- /package/src/{ui → core}/primitives/kbd/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/kbd/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/kbd/index.ts +0 -0
- /package/src/{ui → core}/primitives/kbd/kbd.tsx +0 -0
- /package/src/{ui → core}/primitives/label/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/label/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{ui → core}/primitives/label/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/label/index.ts +0 -0
- /package/src/{ui → core}/primitives/label/label.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/AlignedStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/MarginsStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/PlainStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/RecursiveStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/SidePanelStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/TestStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/popover/constants.ts +0 -0
- /package/src/{ui → core}/primitives/popover/floating-ui/size.ts +0 -0
- /package/src/{ui → core}/primitives/popover/helpers.ts +0 -0
- /package/src/{ui → core}/primitives/popover/index.ts +0 -0
- /package/src/{ui → core}/primitives/popover/types.ts +0 -0
- /package/src/{ui → core}/primitives/radio/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/radio/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/radio/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/radio/index.ts +0 -0
- /package/src/{ui → core}/primitives/radio/radio.tsx +0 -0
- /package/src/{ui → core}/primitives/select/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/select/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/select/__workshop__/readOnly.tsx +0 -0
- /package/src/{ui → core}/primitives/select/index.ts +0 -0
- /package/src/{ui → core}/primitives/select/select.tsx +0 -0
- /package/src/{ui → core}/primitives/spinner/__workshop__/Props.tsx +0 -0
- /package/src/{ui → core}/primitives/spinner/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/spinner/animatedSpinnerIcon.tsx +0 -0
- /package/src/{ui → core}/primitives/spinner/index.ts +0 -0
- /package/src/{ui → core}/primitives/spinner/spinner.tsx +0 -0
- /package/src/{ui → core}/primitives/stack/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/stack/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/stack/index.ts +0 -0
- /package/src/{ui → core}/primitives/stack/stack.tsx +0 -0
- /package/src/{ui → core}/primitives/switch/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/switch/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/switch/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/switch/index.ts +0 -0
- /package/src/{ui → core}/primitives/switch/switch.tsx +0 -0
- /package/src/{ui → core}/primitives/text/__workshop__/colored.tsx +0 -0
- /package/src/{ui → core}/primitives/text/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/text/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/text/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{ui → core}/primitives/text/index.ts +0 -0
- /package/src/{ui → core}/primitives/text/text.tsx +0 -0
- /package/src/{ui → core}/primitives/textArea/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/textArea/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/textArea/index.ts +0 -0
- /package/src/{ui → core}/primitives/textArea/textArea.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/clearButton.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/customValidity.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/readOnly.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/states.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/tones.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/typed.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/index.ts +0 -0
- /package/src/{ui → core}/primitives/textInput/textInput.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/__workshop__/customPortal.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/constants.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/index.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltip.test.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/index.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/types.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -0
- /package/src/{ui → core}/primitives/types.ts +0 -0
- /package/src/{ui → core}/types/avatar.ts +0 -0
- /package/src/{ui → core}/types/badge.ts +0 -0
- /package/src/{ui → core}/types/box.ts +0 -0
- /package/src/{ui → core}/types/button.ts +0 -0
- /package/src/{ui → core}/types/card.ts +0 -0
- /package/src/{ui → core}/types/dialog.ts +0 -0
- /package/src/{ui → core}/types/flex.ts +0 -0
- /package/src/{ui → core}/types/grid.ts +0 -0
- /package/src/{ui → core}/types/gridItem.ts +0 -0
- /package/src/{ui → core}/types/index.ts +0 -0
- /package/src/{ui → core}/types/placement.ts +0 -0
- /package/src/{ui → core}/types/popover.ts +0 -0
- /package/src/{ui → core}/types/props.ts +0 -0
- /package/src/{ui → core}/types/radius.ts +0 -0
- /package/src/{ui → core}/types/selectable.ts +0 -0
- /package/src/{ui → core}/types/text.ts +0 -0
- /package/src/{ui → core}/utils/arrow/arrow.tsx +0 -0
- /package/src/{ui → core}/utils/arrow/cmds.ts +0 -0
- /package/src/{ui → core}/utils/arrow/index.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/utils/boundaryElement/boundaryElement.test.tsx +0 -0
- /package/src/{ui → core}/utils/boundaryElement/boundaryElementContext.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/boundaryElementProvider.tsx +0 -0
- /package/src/{ui → core}/utils/boundaryElement/index.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/types.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/useBoundaryElement.ts +0 -0
- /package/src/{ui → core}/utils/elementQuery/__workshop__/customMedia.tsx +0 -0
- /package/src/{ui → core}/utils/elementQuery/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/elementQuery/elementQuery.tsx +0 -0
- /package/src/{ui → core}/utils/elementQuery/helpers.ts +0 -0
- /package/src/{ui → core}/utils/elementQuery/index.ts +0 -0
- /package/src/{ui → core}/utils/errorBoundary.tsx +0 -0
- /package/src/{ui → core}/utils/getElementRef.ts +0 -0
- /package/src/{ui → core}/utils/index.ts +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/_debug.tsx +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/multipleRoots.tsx +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/nested.tsx +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/responsiveZOffset.tsx +0 -0
- /package/src/{ui → core}/utils/layer/getLayerContext.test.ts +0 -0
- /package/src/{ui → core}/utils/layer/getLayerContext.ts +0 -0
- /package/src/{ui → core}/utils/layer/index.ts +0 -0
- /package/src/{ui → core}/utils/layer/layer.test.tsx +0 -0
- /package/src/{ui → core}/utils/layer/layer.tsx +0 -0
- /package/src/{ui → core}/utils/layer/layerCard.tsx +0 -0
- /package/src/{ui → core}/utils/layer/layerContext.ts +0 -0
- /package/src/{ui → core}/utils/layer/layerProvider.tsx +0 -0
- /package/src/{ui → core}/utils/layer/types.ts +0 -0
- /package/src/{ui → core}/utils/layer/useLayer.ts +0 -0
- /package/src/{ui → core}/utils/portal/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/portal/__workshop__/named.tsx +0 -0
- /package/src/{ui → core}/utils/portal/index.ts +0 -0
- /package/src/{ui → core}/utils/portal/portal.test.tsx +0 -0
- /package/src/{ui → core}/utils/portal/portalContext.ts +0 -0
- /package/src/{ui → core}/utils/portal/portalProvider.tsx +0 -0
- /package/src/{ui → core}/utils/portal/types.ts +0 -0
- /package/src/{ui → core}/utils/portal/usePortal.ts +0 -0
- /package/src/{ui → core}/utils/spanWithTextOverflow.tsx +0 -0
- /package/src/{ui → core}/utils/srOnly/index.ts +0 -0
- /package/src/{ui → core}/utils/srOnly/srOnly.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/changingProps.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/elementScroll.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/infiniteList.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/windowScrolll.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/index.ts +0 -0
- /package/src/{ui → core}/utils/virtualList/virtualList.tsx +0 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ The Sanity UI components.
|
|
|
6
6
|
npm install @sanity/ui
|
|
7
7
|
|
|
8
8
|
# Install peer dependencies
|
|
9
|
-
npm install react react-dom styled-components
|
|
9
|
+
npm install react react-dom react-is styled-components
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
[](https://www.npmjs.com/package/@sanity/ui)
|
|
@@ -14,17 +14,19 @@ npm install react react-dom styled-components
|
|
|
14
14
|
## Usage
|
|
15
15
|
|
|
16
16
|
```jsx
|
|
17
|
-
import
|
|
18
|
-
import
|
|
17
|
+
import '@sanity/ui/sanity-palette.css'
|
|
18
|
+
import '@sanity/ui/sanity-theme.css'
|
|
19
|
+
import '@sanity/ui/system.css'
|
|
20
|
+
|
|
21
|
+
import {Button, Card} from '@sanity/ui'
|
|
19
22
|
import {createRoot} from 'react-dom/client'
|
|
20
23
|
|
|
21
24
|
const root = createRoot(document.getElementById('root'))
|
|
22
|
-
const theme = buildTheme()
|
|
23
25
|
|
|
24
26
|
root.render(
|
|
25
|
-
<
|
|
27
|
+
<Card>
|
|
26
28
|
<Button text="Hello, world" />
|
|
27
|
-
</
|
|
29
|
+
</Card>,
|
|
28
30
|
)
|
|
29
31
|
```
|
|
30
32
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
const studioTheme = theme.buildTheme();
|
|
2
|
+
var jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), theme = require("@sanity/ui/theme"), react = require("react"), styledComponents = require("styled-components"), css = require("@sanity/ui/css"), reactIs = require("react-is"), icons = require("@sanity/icons"), reactDom$1 = require("@floating-ui/react-dom"), framerMotion = require("framer-motion"), resizeObserver = require("@juggle/resize-observer"), useEffectEvent = require("use-effect-event"), reactDom = require("react-dom");
|
|
4
3
|
function getGlobalScope() {
|
|
5
4
|
if (typeof globalThis < "u") return globalThis;
|
|
6
5
|
if (typeof window < "u") return window;
|
|
@@ -17,19 +16,18 @@ const CardContext = createGlobalScopedContext("@sanity/ui/context/card", null);
|
|
|
17
16
|
function CardProvider(props) {
|
|
18
17
|
const $ = reactCompilerRuntime.c(7), {
|
|
19
18
|
children,
|
|
20
|
-
rendered: t0,
|
|
21
19
|
tone,
|
|
22
|
-
scheme
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
scheme,
|
|
21
|
+
unstable_CompatProvider
|
|
22
|
+
} = props;
|
|
23
|
+
let t0, t1;
|
|
24
|
+
$[0] !== scheme || $[1] !== tone || $[2] !== unstable_CompatProvider ? (t1 = {
|
|
27
25
|
tone,
|
|
28
|
-
scheme
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
let
|
|
32
|
-
return $[4] !== children || $[5] !==
|
|
26
|
+
scheme,
|
|
27
|
+
unstable_CompatProvider
|
|
28
|
+
}, $[0] = scheme, $[1] = tone, $[2] = unstable_CompatProvider, $[3] = t1) : t1 = $[3], t0 = t1;
|
|
29
|
+
let t2;
|
|
30
|
+
return $[4] !== children || $[5] !== t0 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(CardContext.Provider, { value: t0, children }), $[4] = children, $[5] = t0, $[6] = t2) : t2 = $[6], t2;
|
|
33
31
|
}
|
|
34
32
|
CardProvider.displayName = "CardProvider";
|
|
35
33
|
const ThemeContext = createGlobalScopedContext("@sanity/ui/context/theme", null);
|
|
@@ -71,7 +69,7 @@ function ThemeProvider(props) {
|
|
|
71
69
|
let t3;
|
|
72
70
|
$[12] !== t2 || $[13] !== themeContext ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: themeContext, children: t2 }), $[12] = t2, $[13] = themeContext, $[14] = t3) : t3 = $[14];
|
|
73
71
|
let t4;
|
|
74
|
-
return $[15] !== scheme || $[16] !== t3 || $[17] !== tone ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(CardProvider, {
|
|
72
|
+
return $[15] !== scheme || $[16] !== t3 || $[17] !== tone ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { scheme, tone, unstable_CompatProvider: ThemeColorProvider, children: t3 }), $[15] = scheme, $[16] = t3, $[17] = tone, $[18] = t4) : t4 = $[18], t4;
|
|
75
73
|
}
|
|
76
74
|
ThemeProvider.displayName = "ThemeProvider";
|
|
77
75
|
function useRootTheme() {
|
|
@@ -354,8 +352,8 @@ function _temp$5() {
|
|
|
354
352
|
}
|
|
355
353
|
const DEFAULT_BOX_ELEMENT = "div";
|
|
356
354
|
function Box(props) {
|
|
357
|
-
const $ = reactCompilerRuntime.c(
|
|
358
|
-
let align, autoCols, autoFlow, autoRows, borderBottom, borderLeft, borderRight, borderTop, children, className, column, columnEnd, columnStart, columns, direction, flex, gap, gapX, gapY, height, inset, insetBottom, insetLeft, insetRight, insetTop, justify, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, maxWidth, muted, outline, overflow, overflowX, overflowY, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pointerEvents, position, radius, rest, row, rowEnd, rowStart, rows, t1, t2, t3, t4, t5, t6, t7, width, wrap;
|
|
355
|
+
const $ = reactCompilerRuntime.c(128), t0 = props;
|
|
356
|
+
let align, autoCols, autoFlow, autoRows, borderBottom, borderLeft, borderRight, borderTop, children, className, column, columnEnd, columnStart, columns, direction, flex, gap, gapX, gapY, height, inset, insetBottom, insetLeft, insetRight, insetTop, justify, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, maxWidth, muted, outline, overflow, overflowX, overflowY, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pointerEvents, position, radius, rest, row, rowEnd, rowStart, rows, t1, t2, t3, t4, t5, t6, t7, textAlign, width, wrap;
|
|
359
357
|
$[0] !== t0 ? ({
|
|
360
358
|
align,
|
|
361
359
|
as: t1,
|
|
@@ -415,13 +413,14 @@ function Box(props) {
|
|
|
415
413
|
rowStart,
|
|
416
414
|
rowEnd,
|
|
417
415
|
sizing: t7,
|
|
416
|
+
textAlign,
|
|
418
417
|
width,
|
|
419
418
|
wrap,
|
|
420
419
|
...rest
|
|
421
|
-
} = t0, $[0] = t0, $[1] = align, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = borderBottom, $[6] = borderLeft, $[7] = borderRight, $[8] = borderTop, $[9] = children, $[10] = className, $[11] = column, $[12] = columnEnd, $[13] = columnStart, $[14] = columns, $[15] = direction, $[16] = flex, $[17] = gap, $[18] = gapX, $[19] = gapY, $[20] = height, $[21] = inset, $[22] = insetBottom, $[23] = insetLeft, $[24] = insetRight, $[25] = insetTop, $[26] = justify, $[27] = marginBottom, $[28] = marginLeft, $[29] = marginRight, $[30] = marginTop, $[31] = marginX, $[32] = marginY, $[33] = maxWidth, $[34] = muted, $[35] = outline, $[36] = overflow, $[37] = overflowX, $[38] = overflowY, $[39] = paddingBottom, $[40] = paddingLeft, $[41] = paddingRight, $[42] = paddingTop, $[43] = paddingX, $[44] = paddingY, $[45] = pointerEvents, $[46] = position, $[47] = radius, $[48] = rest, $[49] = row, $[50] = rowEnd, $[51] = rowStart, $[52] = rows, $[53] = t1, $[54] = t2, $[55] = t3, $[56] = t4, $[57] = t5, $[58] = t6, $[59] = t7, $[60] =
|
|
420
|
+
} = t0, $[0] = t0, $[1] = align, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = borderBottom, $[6] = borderLeft, $[7] = borderRight, $[8] = borderTop, $[9] = children, $[10] = className, $[11] = column, $[12] = columnEnd, $[13] = columnStart, $[14] = columns, $[15] = direction, $[16] = flex, $[17] = gap, $[18] = gapX, $[19] = gapY, $[20] = height, $[21] = inset, $[22] = insetBottom, $[23] = insetLeft, $[24] = insetRight, $[25] = insetTop, $[26] = justify, $[27] = marginBottom, $[28] = marginLeft, $[29] = marginRight, $[30] = marginTop, $[31] = marginX, $[32] = marginY, $[33] = maxWidth, $[34] = muted, $[35] = outline, $[36] = overflow, $[37] = overflowX, $[38] = overflowY, $[39] = paddingBottom, $[40] = paddingLeft, $[41] = paddingRight, $[42] = paddingTop, $[43] = paddingX, $[44] = paddingY, $[45] = pointerEvents, $[46] = position, $[47] = radius, $[48] = rest, $[49] = row, $[50] = rowEnd, $[51] = rowStart, $[52] = rows, $[53] = t1, $[54] = t2, $[55] = t3, $[56] = t4, $[57] = t5, $[58] = t6, $[59] = t7, $[60] = textAlign, $[61] = width, $[62] = wrap) : (align = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], borderBottom = $[5], borderLeft = $[6], borderRight = $[7], borderTop = $[8], children = $[9], className = $[10], column = $[11], columnEnd = $[12], columnStart = $[13], columns = $[14], direction = $[15], flex = $[16], gap = $[17], gapX = $[18], gapY = $[19], height = $[20], inset = $[21], insetBottom = $[22], insetLeft = $[23], insetRight = $[24], insetTop = $[25], justify = $[26], marginBottom = $[27], marginLeft = $[28], marginRight = $[29], marginTop = $[30], marginX = $[31], marginY = $[32], maxWidth = $[33], muted = $[34], outline = $[35], overflow = $[36], overflowX = $[37], overflowY = $[38], paddingBottom = $[39], paddingLeft = $[40], paddingRight = $[41], paddingTop = $[42], paddingX = $[43], paddingY = $[44], pointerEvents = $[45], position = $[46], radius = $[47], rest = $[48], row = $[49], rowEnd = $[50], rowStart = $[51], rows = $[52], t1 = $[53], t2 = $[54], t3 = $[55], t4 = $[56], t5 = $[57], t6 = $[58], t7 = $[59], textAlign = $[60], width = $[61], wrap = $[62]);
|
|
422
421
|
const Element2 = t1 === void 0 ? DEFAULT_BOX_ELEMENT : t1, border = t2 === void 0 ? !1 : t2, display = t3 === void 0 ? "block" : t3, margin = t4 === void 0 ? 0 : t4, minWidth = t5 === void 0 ? 0 : t5, padding = t6 === void 0 ? 0 : t6, sizing = t7 === void 0 ? "border" : t7;
|
|
423
422
|
let t8;
|
|
424
|
-
$[
|
|
423
|
+
$[63] !== align || $[64] !== autoCols || $[65] !== autoFlow || $[66] !== autoRows || $[67] !== border || $[68] !== borderBottom || $[69] !== borderLeft || $[70] !== borderRight || $[71] !== borderTop || $[72] !== className || $[73] !== column || $[74] !== columnEnd || $[75] !== columnStart || $[76] !== columns || $[77] !== direction || $[78] !== display || $[79] !== flex || $[80] !== gap || $[81] !== gapX || $[82] !== gapY || $[83] !== height || $[84] !== inset || $[85] !== insetBottom || $[86] !== insetLeft || $[87] !== insetRight || $[88] !== insetTop || $[89] !== justify || $[90] !== margin || $[91] !== marginBottom || $[92] !== marginLeft || $[93] !== marginRight || $[94] !== marginTop || $[95] !== marginX || $[96] !== marginY || $[97] !== maxWidth || $[98] !== minWidth || $[99] !== muted || $[100] !== outline || $[101] !== overflow || $[102] !== overflowX || $[103] !== overflowY || $[104] !== padding || $[105] !== paddingBottom || $[106] !== paddingLeft || $[107] !== paddingRight || $[108] !== paddingTop || $[109] !== paddingX || $[110] !== paddingY || $[111] !== pointerEvents || $[112] !== position || $[113] !== radius || $[114] !== row || $[115] !== rowEnd || $[116] !== rowStart || $[117] !== rows || $[118] !== sizing || $[119] !== textAlign || $[120] !== width || $[121] !== wrap ? (t8 = css.composeClassNames(className, css.box({
|
|
425
424
|
align,
|
|
426
425
|
autoCols,
|
|
427
426
|
autoFlow,
|
|
@@ -477,11 +476,12 @@ function Box(props) {
|
|
|
477
476
|
rowStart,
|
|
478
477
|
rowEnd,
|
|
479
478
|
sizing,
|
|
479
|
+
textAlign,
|
|
480
480
|
width,
|
|
481
481
|
wrap
|
|
482
|
-
})), $[
|
|
482
|
+
})), $[63] = align, $[64] = autoCols, $[65] = autoFlow, $[66] = autoRows, $[67] = border, $[68] = borderBottom, $[69] = borderLeft, $[70] = borderRight, $[71] = borderTop, $[72] = className, $[73] = column, $[74] = columnEnd, $[75] = columnStart, $[76] = columns, $[77] = direction, $[78] = display, $[79] = flex, $[80] = gap, $[81] = gapX, $[82] = gapY, $[83] = height, $[84] = inset, $[85] = insetBottom, $[86] = insetLeft, $[87] = insetRight, $[88] = insetTop, $[89] = justify, $[90] = margin, $[91] = marginBottom, $[92] = marginLeft, $[93] = marginRight, $[94] = marginTop, $[95] = marginX, $[96] = marginY, $[97] = maxWidth, $[98] = minWidth, $[99] = muted, $[100] = outline, $[101] = overflow, $[102] = overflowX, $[103] = overflowY, $[104] = padding, $[105] = paddingBottom, $[106] = paddingLeft, $[107] = paddingRight, $[108] = paddingTop, $[109] = paddingX, $[110] = paddingY, $[111] = pointerEvents, $[112] = position, $[113] = radius, $[114] = row, $[115] = rowEnd, $[116] = rowStart, $[117] = rows, $[118] = sizing, $[119] = textAlign, $[120] = width, $[121] = wrap, $[122] = t8) : t8 = $[122];
|
|
483
483
|
let t9;
|
|
484
|
-
return $[
|
|
484
|
+
return $[123] !== Element2 || $[124] !== children || $[125] !== rest || $[126] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Element2, { "data-ui": "Box", ...rest, className: t8, children }), $[123] = Element2, $[124] = children, $[125] = rest, $[126] = t8, $[127] = t9) : t9 = $[127], t9;
|
|
485
485
|
}
|
|
486
486
|
Box.displayName = "Box";
|
|
487
487
|
const DEFAULT_LABEL_ELEMENT = "div";
|
|
@@ -821,7 +821,7 @@ function useCard() {
|
|
|
821
821
|
}
|
|
822
822
|
const DEFAULT_CARD_ELEMENT = "div";
|
|
823
823
|
function Card(props) {
|
|
824
|
-
const $ = reactCompilerRuntime.c(
|
|
824
|
+
const $ = reactCompilerRuntime.c(40), t0 = props;
|
|
825
825
|
let className, disabled, pressed, rest, schemeProp, selected, shadow, style, t1, t2, t3, t4, t5;
|
|
826
826
|
$[0] !== t0 ? ({
|
|
827
827
|
__unstable_checkered: t1,
|
|
@@ -838,35 +838,25 @@ function Card(props) {
|
|
|
838
838
|
tone: t5,
|
|
839
839
|
...rest
|
|
840
840
|
} = t0, $[0] = t0, $[1] = className, $[2] = disabled, $[3] = pressed, $[4] = rest, $[5] = schemeProp, $[6] = selected, $[7] = shadow, $[8] = style, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = t4, $[13] = t5) : (className = $[1], disabled = $[2], pressed = $[3], rest = $[4], schemeProp = $[5], selected = $[6], shadow = $[7], style = $[8], t1 = $[9], t2 = $[10], t3 = $[11], t4 = $[12], t5 = $[13]);
|
|
841
|
-
const checkered = t1 === void 0 ? !1 : t1, focusRing = t2 === void 0 ? !1 : t2, as = t3 === void 0 ? DEFAULT_CARD_ELEMENT : t3, radius = t4 === void 0 ? 0 : t4, toneProp = t5 === void 0 ? "default" : t5, parent = useCard(),
|
|
842
|
-
let
|
|
843
|
-
$[14] !==
|
|
844
|
-
|
|
845
|
-
scheme: t7
|
|
846
|
-
}, $[14] = t6, $[15] = t7, $[16] = t8) : t8 = $[16];
|
|
847
|
-
const context = t8, tone = toneProp === "inherit" ? context.tone : toneProp, scheme = schemeProp === void 0 ? context.scheme : schemeProp, t9 = scheme === context.scheme ? void 0 : scheme;
|
|
848
|
-
let t10;
|
|
849
|
-
$[17] !== className || $[18] !== shadow || $[19] !== t9 || $[20] !== tone ? (t10 = css.composeClassNames(className, css.card({
|
|
850
|
-
scheme: t9,
|
|
841
|
+
const checkered = t1 === void 0 ? !1 : t1, focusRing = t2 === void 0 ? !1 : t2, as = t3 === void 0 ? DEFAULT_CARD_ELEMENT : t3, radius = t4 === void 0 ? 0 : t4, toneProp = t5 === void 0 ? "default" : t5, parent = useCard(), tone = toneProp === "inherit" ? parent?.tone : toneProp, scheme = schemeProp === void 0 ? parent?.scheme : schemeProp, t6 = scheme === parent?.scheme ? void 0 : scheme;
|
|
842
|
+
let t7;
|
|
843
|
+
$[14] !== className || $[15] !== shadow || $[16] !== t6 || $[17] !== tone ? (t7 = css.composeClassNames(className, css.card({
|
|
844
|
+
scheme: t6,
|
|
851
845
|
shadow,
|
|
852
846
|
tone
|
|
853
|
-
})), $[
|
|
854
|
-
const
|
|
855
|
-
let
|
|
856
|
-
$[
|
|
857
|
-
let node =
|
|
858
|
-
if (scheme ===
|
|
847
|
+
})), $[14] = className, $[15] = shadow, $[16] = t6, $[17] = tone, $[18] = t7) : t7 = $[18];
|
|
848
|
+
const t8 = checkered ? "" : void 0, t9 = disabled ? "" : void 0, t10 = focusRing ? "" : void 0, t11 = pressed ? "" : void 0, t12 = selected ? "" : void 0;
|
|
849
|
+
let t13;
|
|
850
|
+
$[19] !== as || $[20] !== radius || $[21] !== rest || $[22] !== style || $[23] !== t10 || $[24] !== t11 || $[25] !== t12 || $[26] !== t7 || $[27] !== t8 || $[28] !== t9 ? (t13 = /* @__PURE__ */ jsxRuntime.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 }), $[19] = as, $[20] = radius, $[21] = rest, $[22] = style, $[23] = t10, $[24] = t11, $[25] = t12, $[26] = t7, $[27] = t8, $[28] = t9, $[29] = t13) : t13 = $[29];
|
|
851
|
+
let node = t13;
|
|
852
|
+
if (scheme === parent?.scheme && tone === parent?.tone)
|
|
859
853
|
return node;
|
|
860
|
-
const
|
|
861
|
-
let
|
|
862
|
-
if ($[
|
|
863
|
-
const
|
|
864
|
-
let
|
|
865
|
-
return $[
|
|
866
|
-
children: node,
|
|
867
|
-
scheme,
|
|
868
|
-
tone: t20
|
|
869
|
-
}), $[38] = node, $[39] = parent.compat_provider, $[40] = scheme, $[41] = t20, $[42] = t21) : t21 = $[42], t21;
|
|
854
|
+
const t14 = scheme ?? "light", t15 = tone ?? "default", t16 = parent?.unstable_CompatProvider;
|
|
855
|
+
let t17;
|
|
856
|
+
if ($[30] !== node || $[31] !== t14 || $[32] !== t15 || $[33] !== t16 ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { scheme: t14, tone: t15, unstable_CompatProvider: t16, children: node }), $[30] = node, $[31] = t14, $[32] = t15, $[33] = t16, $[34] = t17) : t17 = $[34], node = t17, parent?.unstable_CompatProvider) {
|
|
857
|
+
const CompatProvider = parent.unstable_CompatProvider, t18 = scheme ?? "light", t19 = tone ?? parent?.tone ?? "default";
|
|
858
|
+
let t20;
|
|
859
|
+
return $[35] !== CompatProvider || $[36] !== node || $[37] !== t18 || $[38] !== t19 ? (t20 = /* @__PURE__ */ jsxRuntime.jsx(CompatProvider, { scheme: t18, tone: t19, children: node }), $[35] = CompatProvider, $[36] = node, $[37] = t18, $[38] = t19, $[39] = t20) : t20 = $[39], t20;
|
|
870
860
|
}
|
|
871
861
|
return node;
|
|
872
862
|
}
|
|
@@ -1431,7 +1421,7 @@ function usePortal() {
|
|
|
1431
1421
|
return value;
|
|
1432
1422
|
}
|
|
1433
1423
|
function Portal(props) {
|
|
1434
|
-
const $ = reactCompilerRuntime.c(
|
|
1424
|
+
const $ = reactCompilerRuntime.c(6), {
|
|
1435
1425
|
children,
|
|
1436
1426
|
__unstable_name: name
|
|
1437
1427
|
} = props, card = useCard(), portal = usePortal(), portalElement = (name ? portal.elements && portal.elements[name] : portal.element) || portal.elements?.default;
|
|
@@ -1439,11 +1429,9 @@ function Portal(props) {
|
|
|
1439
1429
|
return null;
|
|
1440
1430
|
const t0 = card?.scheme || "light";
|
|
1441
1431
|
let t1;
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
scheme: t0
|
|
1446
|
-
}, children), portalElement), $[0] = children, $[1] = portalElement, $[2] = t0, $[3] = t1) : t1 = $[3], t1;
|
|
1432
|
+
$[0] !== children || $[1] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { tone: "transparent", scheme: t0, children }), $[0] = children, $[1] = t0, $[2] = t1) : t1 = $[2];
|
|
1433
|
+
let t2;
|
|
1434
|
+
return $[3] !== portalElement || $[4] !== t1 ? (t2 = reactDom.createPortal(t1, portalElement), $[3] = portalElement, $[4] = t1, $[5] = t2) : t2 = $[5], t2;
|
|
1447
1435
|
}
|
|
1448
1436
|
Portal.displayName = "Portal";
|
|
1449
1437
|
function PortalProvider(props) {
|
|
@@ -1679,18 +1667,16 @@ function size(options) {
|
|
|
1679
1667
|
}
|
|
1680
1668
|
};
|
|
1681
1669
|
}
|
|
1682
|
-
const DEFAULT_POPOVER_LAYER_ELEMENT = "div", MotionLayer$1 = framerMotion.motion.create(Layer);
|
|
1683
1670
|
function PopoverLayer(props) {
|
|
1684
|
-
const $ = reactCompilerRuntime.c(
|
|
1685
|
-
let animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, maxWidth, originX, originY, overflow, padding, placement, radius, referenceWidth, rest, shadow, strategy, style,
|
|
1686
|
-
$[0] !==
|
|
1671
|
+
const $ = reactCompilerRuntime.c(65);
|
|
1672
|
+
let animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, maxWidth, originX, originY, overflow, padding, placement, radius, referenceWidth, rest, shadow, strategy, style, t0, xProp, yProp;
|
|
1673
|
+
$[0] !== props ? ({
|
|
1687
1674
|
__unstable_margins: marginsProp,
|
|
1688
1675
|
animate,
|
|
1689
1676
|
arrow,
|
|
1690
1677
|
arrowRef,
|
|
1691
1678
|
arrowX,
|
|
1692
1679
|
arrowY,
|
|
1693
|
-
as: t1,
|
|
1694
1680
|
children,
|
|
1695
1681
|
maxWidth,
|
|
1696
1682
|
padding,
|
|
@@ -1703,57 +1689,57 @@ function PopoverLayer(props) {
|
|
|
1703
1689
|
shadow,
|
|
1704
1690
|
strategy,
|
|
1705
1691
|
style,
|
|
1706
|
-
tone:
|
|
1692
|
+
tone: t0,
|
|
1707
1693
|
x: xProp,
|
|
1708
1694
|
y: yProp,
|
|
1709
1695
|
...rest
|
|
1710
|
-
} =
|
|
1711
|
-
const
|
|
1712
|
-
let
|
|
1713
|
-
|
|
1714
|
-
const margins =
|
|
1696
|
+
} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[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], arrow = $[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]);
|
|
1697
|
+
const tone = t0 === void 0 ? "inherit" : t0;
|
|
1698
|
+
let t1;
|
|
1699
|
+
t1 = marginsProp || DEFAULT_POPOVER_MARGINS;
|
|
1700
|
+
const margins = t1, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0];
|
|
1701
|
+
let t2;
|
|
1702
|
+
const t3 = animate ? "transform" : void 0;
|
|
1715
1703
|
let t4;
|
|
1716
|
-
|
|
1717
|
-
let t6;
|
|
1718
|
-
$[24] !== originX || $[25] !== originY || $[26] !== referenceWidth || $[27] !== style || $[28] !== t5 || $[29] !== x || $[30] !== y ? (t6 = {
|
|
1704
|
+
$[23] !== originX || $[24] !== originY || $[25] !== referenceWidth || $[26] !== style || $[27] !== t3 || $[28] !== x || $[29] !== y ? (t4 = {
|
|
1719
1705
|
left: x,
|
|
1720
1706
|
originX,
|
|
1721
1707
|
originY,
|
|
1722
1708
|
top: y,
|
|
1723
1709
|
width: referenceWidth,
|
|
1724
|
-
willChange:
|
|
1710
|
+
willChange: t3,
|
|
1725
1711
|
...style
|
|
1726
|
-
}, $[
|
|
1727
|
-
const rootStyle =
|
|
1728
|
-
let
|
|
1729
|
-
const
|
|
1730
|
-
let
|
|
1731
|
-
$[
|
|
1732
|
-
left:
|
|
1733
|
-
top:
|
|
1712
|
+
}, $[23] = originX, $[24] = originY, $[25] = referenceWidth, $[26] = style, $[27] = t3, $[28] = x, $[29] = y, $[30] = t4) : t4 = $[30], t2 = t4;
|
|
1713
|
+
const rootStyle = t2;
|
|
1714
|
+
let t5;
|
|
1715
|
+
const t6 = arrowX !== null ? arrowX : void 0, t7 = arrowY !== null ? arrowY : void 0;
|
|
1716
|
+
let t8;
|
|
1717
|
+
$[31] !== t6 || $[32] !== t7 ? (t8 = {
|
|
1718
|
+
left: t6,
|
|
1719
|
+
top: t7,
|
|
1734
1720
|
right: void 0,
|
|
1735
1721
|
bottom: void 0
|
|
1736
|
-
}, $[
|
|
1737
|
-
const arrowStyle =
|
|
1722
|
+
}, $[31] = t6, $[32] = t7, $[33] = t8) : t8 = $[33], t5 = t8;
|
|
1723
|
+
const arrowStyle = t5;
|
|
1724
|
+
let t9;
|
|
1725
|
+
$[34] === Symbol.for("react.memo_cache_sentinel") ? (t9 = css.popoverCard(), $[34] = t9) : t9 = $[34];
|
|
1726
|
+
let t10;
|
|
1727
|
+
$[35] !== animate ? (t10 = animate ? ["hidden", "initial"] : void 0, $[35] = animate, $[36] = t10) : t10 = $[36];
|
|
1738
1728
|
let t11;
|
|
1739
|
-
$[
|
|
1729
|
+
$[37] !== animate ? (t11 = animate ? ["visible", "scaleIn"] : void 0, $[37] = animate, $[38] = t11) : t11 = $[38];
|
|
1740
1730
|
let t12;
|
|
1741
|
-
$[
|
|
1731
|
+
$[39] !== animate ? (t12 = animate ? ["hidden", "scaleOut"] : void 0, $[39] = animate, $[40] = t12) : t12 = $[40];
|
|
1742
1732
|
let t13;
|
|
1743
|
-
$[
|
|
1733
|
+
$[41] !== children || $[42] !== padding ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", flex: 1, padding, children }), $[41] = children, $[42] = padding, $[43] = t13) : t13 = $[43];
|
|
1744
1734
|
let t14;
|
|
1745
|
-
$[
|
|
1735
|
+
$[44] !== maxWidth || $[45] !== overflow || $[46] !== t13 ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, maxWidth, overflow, children: t13 }), $[44] = maxWidth, $[45] = overflow, $[46] = t13, $[47] = t14) : t14 = $[47];
|
|
1746
1736
|
let t15;
|
|
1747
|
-
$[
|
|
1737
|
+
$[48] !== arrow || $[49] !== arrowRef || $[50] !== arrowStyle ? (t15 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[48] = arrow, $[49] = arrowRef, $[50] = arrowStyle, $[51] = t15) : t15 = $[51];
|
|
1748
1738
|
let t16;
|
|
1749
|
-
$[
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
return $[53] !== as || $[54] !== placement || $[55] !== radius || $[56] !== rest || $[57] !== rootStyle || $[58] !== shadow || $[59] !== strategy || $[60] !== t12 || $[61] !== t13 || $[62] !== t14 || $[63] !== t16 || $[64] !== t17 || $[65] !== tone ? (t18 = /* @__PURE__ */ jsxRuntime.jsxs(MotionLayer$1, { className: t11, "data-ui": "Popover", ...rest, as, "data-context-tone": tone, "data-placement": placement, direction: "column", display: "flex", position: strategy, radius, shadow, sizing: "border", style: rootStyle, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t12, animate: t13, exit: t14, children: [
|
|
1754
|
-
t16,
|
|
1755
|
-
t17
|
|
1756
|
-
] }), $[53] = as, $[54] = placement, $[55] = radius, $[56] = rest, $[57] = rootStyle, $[58] = shadow, $[59] = strategy, $[60] = t12, $[61] = t13, $[62] = t14, $[63] = t16, $[64] = t17, $[65] = tone, $[66] = t18) : t18 = $[66], t18;
|
|
1739
|
+
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__ */ jsxRuntime.jsxs(Layer, { className: t9, "data-ui": "Popover", ...rest, as: framerMotion.motion.div, "data-context-tone": tone, "data-placement": placement, direction: "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: [
|
|
1740
|
+
t14,
|
|
1741
|
+
t15
|
|
1742
|
+
] }), $[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;
|
|
1757
1743
|
}
|
|
1758
1744
|
PopoverLayer.displayName = "PopoverCard";
|
|
1759
1745
|
const DEFAULT_POPOVER_ELEMENT = "div";
|
|
@@ -1773,7 +1759,7 @@ function ViewportOverlay() {
|
|
|
1773
1759
|
function Popover(props) {
|
|
1774
1760
|
const boundaryElementContext = useBoundaryElement(), {
|
|
1775
1761
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
1776
|
-
animate: _animate = !
|
|
1762
|
+
animate: _animate = !0,
|
|
1777
1763
|
arrow: arrowProp = !1,
|
|
1778
1764
|
as = DEFAULT_POPOVER_ELEMENT,
|
|
1779
1765
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -2255,17 +2241,15 @@ TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
|
|
|
2255
2241
|
function useTooltipDelayGroup() {
|
|
2256
2242
|
return react.useContext(TooltipDelayGroupContext);
|
|
2257
2243
|
}
|
|
2258
|
-
const DEFAULT_TOOLTIP_LAYER_ELEMENT = "div", MotionLayer = framerMotion.motion.create(Layer);
|
|
2259
2244
|
function TooltipLayer(props) {
|
|
2260
|
-
const $ = reactCompilerRuntime.c(
|
|
2261
|
-
let animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, rest, scheme, shadow, style,
|
|
2262
|
-
$[0] !==
|
|
2245
|
+
const $ = reactCompilerRuntime.c(51);
|
|
2246
|
+
let animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, rest, scheme, shadow, style, t0;
|
|
2247
|
+
$[0] !== props ? ({
|
|
2263
2248
|
animate,
|
|
2264
2249
|
arrow,
|
|
2265
2250
|
arrowRef,
|
|
2266
2251
|
arrowX,
|
|
2267
2252
|
arrowY,
|
|
2268
|
-
as: t1,
|
|
2269
2253
|
children,
|
|
2270
2254
|
originX,
|
|
2271
2255
|
originY,
|
|
@@ -2275,52 +2259,52 @@ function TooltipLayer(props) {
|
|
|
2275
2259
|
scheme,
|
|
2276
2260
|
shadow,
|
|
2277
2261
|
style,
|
|
2278
|
-
tone:
|
|
2262
|
+
tone: t0,
|
|
2279
2263
|
...rest
|
|
2280
|
-
} =
|
|
2281
|
-
const
|
|
2264
|
+
} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[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], arrow = $[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]);
|
|
2265
|
+
const tone = t0 === void 0 ? "inherit" : t0;
|
|
2266
|
+
let t1;
|
|
2267
|
+
const t2 = animate ? "transform" : void 0;
|
|
2282
2268
|
let t3;
|
|
2283
|
-
|
|
2284
|
-
let t5;
|
|
2285
|
-
$[18] !== originX || $[19] !== originY || $[20] !== style || $[21] !== t4 ? (t5 = {
|
|
2269
|
+
$[17] !== originX || $[18] !== originY || $[19] !== style || $[20] !== t2 ? (t3 = {
|
|
2286
2270
|
originX,
|
|
2287
2271
|
originY,
|
|
2288
|
-
willChange:
|
|
2272
|
+
willChange: t2,
|
|
2289
2273
|
...style
|
|
2290
|
-
}, $[
|
|
2291
|
-
const rootStyle =
|
|
2292
|
-
let
|
|
2293
|
-
const
|
|
2294
|
-
let
|
|
2295
|
-
$[
|
|
2296
|
-
left:
|
|
2297
|
-
top:
|
|
2274
|
+
}, $[17] = originX, $[18] = originY, $[19] = style, $[20] = t2, $[21] = t3) : t3 = $[21], t1 = t3;
|
|
2275
|
+
const rootStyle = t1;
|
|
2276
|
+
let t4;
|
|
2277
|
+
const t5 = arrowX !== null ? arrowX : void 0, t6 = arrowY !== null ? arrowY : void 0;
|
|
2278
|
+
let t7;
|
|
2279
|
+
$[22] !== t5 || $[23] !== t6 ? (t7 = {
|
|
2280
|
+
left: t5,
|
|
2281
|
+
top: t6,
|
|
2298
2282
|
right: void 0,
|
|
2299
2283
|
bottom: void 0
|
|
2300
|
-
}, $[
|
|
2301
|
-
const arrowStyle =
|
|
2284
|
+
}, $[22] = t5, $[23] = t6, $[24] = t7) : t7 = $[24], t4 = t7;
|
|
2285
|
+
const arrowStyle = t4;
|
|
2286
|
+
let t8;
|
|
2287
|
+
$[25] === Symbol.for("react.memo_cache_sentinel") ? (t8 = css.tooltipCard(), $[25] = t8) : t8 = $[25];
|
|
2288
|
+
const t9 = animate ? "" : void 0;
|
|
2302
2289
|
let t10;
|
|
2303
|
-
$[26]
|
|
2304
|
-
|
|
2290
|
+
$[26] !== animate ? (t10 = animate ? ["hidden", "initial"] : void 0, $[26] = animate, $[27] = t10) : t10 = $[27];
|
|
2291
|
+
let t11;
|
|
2292
|
+
$[28] !== animate ? (t11 = animate ? ["visible", "scaleIn"] : void 0, $[28] = animate, $[29] = t11) : t11 = $[29];
|
|
2305
2293
|
let t12;
|
|
2306
|
-
$[
|
|
2294
|
+
$[30] !== animate ? (t12 = animate ? ["hidden", "scaleOut"] : void 0, $[30] = animate, $[31] = t12) : t12 = $[31];
|
|
2307
2295
|
let t13;
|
|
2308
|
-
$[
|
|
2296
|
+
$[32] !== arrow || $[33] !== arrowRef || $[34] !== arrowStyle ? (t13 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[32] = arrow, $[33] = arrowRef, $[34] = arrowStyle, $[35] = t13) : t13 = $[35];
|
|
2309
2297
|
let t14;
|
|
2310
|
-
$[
|
|
2311
|
-
let t15;
|
|
2312
|
-
$[33] !== arrow || $[34] !== arrowRef || $[35] !== arrowStyle ? (t15 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[33] = arrow, $[34] = arrowRef, $[35] = arrowStyle, $[36] = t15) : t15 = $[36];
|
|
2313
|
-
let t16;
|
|
2314
|
-
return $[37] !== as || $[38] !== children || $[39] !== padding || $[40] !== placement || $[41] !== radius || $[42] !== rest || $[43] !== rootStyle || $[44] !== scheme || $[45] !== shadow || $[46] !== t11 || $[47] !== t12 || $[48] !== t13 || $[49] !== t14 || $[50] !== t15 || $[51] !== tone ? (t16 = /* @__PURE__ */ jsxRuntime.jsxs(MotionLayer, { "data-ui": "Tooltip__card", ...rest, as, className: t10, "data-animate": t11, "data-placement": placement, padding, radius, scheme, shadow, style: rootStyle, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t12, animate: t13, exit: t14, tone, children: [
|
|
2298
|
+
return $[36] !== children || $[37] !== padding || $[38] !== placement || $[39] !== radius || $[40] !== rest || $[41] !== rootStyle || $[42] !== scheme || $[43] !== shadow || $[44] !== t10 || $[45] !== t11 || $[46] !== t12 || $[47] !== t13 || $[48] !== t9 || $[49] !== tone ? (t14 = /* @__PURE__ */ jsxRuntime.jsxs(Layer, { "data-ui": "Tooltip__card", ...rest, as: framerMotion.motion.div, className: t8, "data-animate": t9, "data-placement": placement, padding, radius, scheme, shadow, style: rootStyle, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t10, animate: t11, exit: t12, tone, children: [
|
|
2315
2299
|
children,
|
|
2316
|
-
|
|
2317
|
-
] }), $[
|
|
2300
|
+
t13
|
|
2301
|
+
] }), $[36] = children, $[37] = padding, $[38] = placement, $[39] = radius, $[40] = rest, $[41] = rootStyle, $[42] = scheme, $[43] = shadow, $[44] = t10, $[45] = t11, $[46] = t12, $[47] = t13, $[48] = t9, $[49] = tone, $[50] = t14) : t14 = $[50], t14;
|
|
2318
2302
|
}
|
|
2319
2303
|
TooltipLayer.displayName = "TooltipLayer";
|
|
2320
2304
|
const DEFAULT_TOOLTIP_ELEMENT = "div";
|
|
2321
2305
|
function Tooltip(props) {
|
|
2322
2306
|
const boundaryElementContext = useBoundaryElement(), {
|
|
2323
|
-
animate: _animate = !
|
|
2307
|
+
animate: _animate = !0,
|
|
2324
2308
|
arrow: arrowProp = !1,
|
|
2325
2309
|
as = DEFAULT_TOOLTIP_ELEMENT,
|
|
2326
2310
|
boundaryElement = boundaryElementContext?.element,
|
|
@@ -2371,7 +2355,8 @@ function Tooltip(props) {
|
|
|
2371
2355
|
whileElementsMounted: reactDom$1.autoUpdate,
|
|
2372
2356
|
elements: {
|
|
2373
2357
|
reference: referenceElement
|
|
2374
|
-
}
|
|
2358
|
+
},
|
|
2359
|
+
transform: !1
|
|
2375
2360
|
}), arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, tooltipId = react.useId(), [isOpen, setIsOpen] = useDelayedState(!1), delayGroupContext = useTooltipDelayGroup(), {
|
|
2376
2361
|
setIsGroupActive,
|
|
2377
2362
|
setOpenTooltipId
|
|
@@ -3010,33 +2995,36 @@ function Tab(props) {
|
|
|
3010
2995
|
Tab.displayName = "Tab";
|
|
3011
2996
|
const DEFAULT_TAB_LIST_ELEMENT = "div";
|
|
3012
2997
|
function TabList(props) {
|
|
3013
|
-
const $ = reactCompilerRuntime.c(
|
|
3014
|
-
let childrenProp, rest, t1;
|
|
2998
|
+
const $ = reactCompilerRuntime.c(21), t0 = props;
|
|
2999
|
+
let childrenProp, rest, t1, t2, t3, t4;
|
|
3015
3000
|
$[0] !== t0 ? ({
|
|
3016
3001
|
as: t1,
|
|
3017
3002
|
children: childrenProp,
|
|
3003
|
+
gap: t2,
|
|
3004
|
+
space: t3,
|
|
3005
|
+
wrap: t4,
|
|
3018
3006
|
...rest
|
|
3019
|
-
} = t0, $[0] = t0, $[1] = childrenProp, $[2] = rest, $[3] = t1) : (childrenProp = $[1], rest = $[2], t1 = $[3]);
|
|
3020
|
-
const as = t1 === void 0 ? DEFAULT_TAB_LIST_ELEMENT : t1, [focusedIndex, setFocusedIndex] = react.useState(-1);
|
|
3021
|
-
let
|
|
3022
|
-
if ($[
|
|
3007
|
+
} = t0, $[0] = t0, $[1] = childrenProp, $[2] = rest, $[3] = t1, $[4] = t2, $[5] = t3, $[6] = t4) : (childrenProp = $[1], rest = $[2], t1 = $[3], t2 = $[4], t3 = $[5], t4 = $[6]);
|
|
3008
|
+
const as = t1 === void 0 ? DEFAULT_TAB_LIST_ELEMENT : t1, gap = t2 === void 0 ? 1 : t2, space = t3 === void 0 ? 1 : t3, wrap = t4 === void 0 ? "nowrap" : t4, [focusedIndex, setFocusedIndex] = react.useState(-1);
|
|
3009
|
+
let t5;
|
|
3010
|
+
if ($[7] !== childrenProp || $[8] !== focusedIndex) {
|
|
3023
3011
|
const children = react.Children.toArray(childrenProp).filter(_isReactElement);
|
|
3024
|
-
let
|
|
3025
|
-
$[
|
|
3012
|
+
let t62;
|
|
3013
|
+
$[10] !== focusedIndex ? (t62 = (child, childIndex) => react.cloneElement(child, {
|
|
3026
3014
|
focused: focusedIndex === childIndex,
|
|
3027
3015
|
key: childIndex,
|
|
3028
3016
|
onFocus: () => setFocusedIndex(childIndex)
|
|
3029
|
-
}), $[
|
|
3017
|
+
}), $[10] = focusedIndex, $[11] = t62) : t62 = $[11], t5 = children.map(t62), $[7] = childrenProp, $[8] = focusedIndex, $[9] = t5;
|
|
3030
3018
|
} else
|
|
3031
|
-
|
|
3032
|
-
const tabs =
|
|
3033
|
-
let
|
|
3034
|
-
$[
|
|
3019
|
+
t5 = $[9];
|
|
3020
|
+
const tabs = t5, numTabs = tabs.length;
|
|
3021
|
+
let t6;
|
|
3022
|
+
$[12] !== numTabs ? (t6 = (event) => {
|
|
3035
3023
|
event.key === "ArrowLeft" && setFocusedIndex((prevIndex) => (prevIndex + numTabs - 1) % numTabs), event.key === "ArrowRight" && setFocusedIndex((prevIndex_0) => (prevIndex_0 + 1) % numTabs);
|
|
3036
|
-
}, $[
|
|
3037
|
-
const handleKeyDown =
|
|
3038
|
-
let
|
|
3039
|
-
return $[
|
|
3024
|
+
}, $[12] = numTabs, $[13] = t6) : t6 = $[13];
|
|
3025
|
+
const handleKeyDown = t6, t7 = gap ?? space;
|
|
3026
|
+
let t8;
|
|
3027
|
+
return $[14] !== as || $[15] !== handleKeyDown || $[16] !== rest || $[17] !== t7 || $[18] !== tabs || $[19] !== wrap ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { "data-ui": "TabList", ...rest, as, gap: t7, onKeyDown: handleKeyDown, role: "tablist", wrap, children: tabs }), $[14] = as, $[15] = handleKeyDown, $[16] = rest, $[17] = t7, $[18] = tabs, $[19] = wrap, $[20] = t8) : t8 = $[20], t8;
|
|
3040
3028
|
}
|
|
3041
3029
|
TabList.displayName = "TabList";
|
|
3042
3030
|
function _isReactElement(node) {
|
|
@@ -3146,7 +3134,6 @@ exports.isHTMLInputElement = isHTMLInputElement;
|
|
|
3146
3134
|
exports.isHTMLSelectElement = isHTMLSelectElement;
|
|
3147
3135
|
exports.isHTMLTextAreaElement = isHTMLTextAreaElement;
|
|
3148
3136
|
exports.isRecord = isRecord;
|
|
3149
|
-
exports.studioTheme = studioTheme;
|
|
3150
3137
|
exports.useArrayProp = useArrayProp;
|
|
3151
3138
|
exports.useBoundaryElement = useBoundaryElement;
|
|
3152
3139
|
exports.useCard = useCard;
|