@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
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
* These are internal exports for usage in `@sanity/visual-editing` and `@sanity/insert-menu`,
|
|
3
3
|
* which are used in environments where the regular `@sanity/ui` export is far too heavy due to imports from refractor and more.
|
|
4
4
|
*/
|
|
5
|
-
export {studioTheme} from '../src/
|
|
6
|
-
export {ThemeProvider, type ThemeProviderProps} from '../src/
|
|
7
|
-
export {useTheme_v2} from '../src/
|
|
8
|
-
export {Hotkeys, type HotkeysProps} from '../src/
|
|
9
|
-
export {Menu, type MenuProps} from '../src/
|
|
10
|
-
export {MenuDivider} from '../src/
|
|
11
|
-
export {MenuGroup, type MenuGroupProps} from '../src/
|
|
12
|
-
export {MenuItem, type MenuItemProps} from '../src/
|
|
13
|
-
export {Tab, type TabProps} from '../src/
|
|
14
|
-
export {TabList, type TabListProps} from '../src/
|
|
15
|
-
export {isHTMLAnchorElement, isHTMLElement} from '../src/
|
|
16
|
-
export {usePrefersDark} from '../src/
|
|
17
|
-
export {Box, type BoxProps} from '../src/
|
|
18
|
-
export {Button, type ButtonProps} from '../src/
|
|
19
|
-
export {Card, type CardProps} from '../src/
|
|
20
|
-
export {Flex, type FlexProps} from '../src/
|
|
21
|
-
export {Grid, type GridProps} from '../src/
|
|
22
|
-
export {Popover, type PopoverProps} from '../src/
|
|
23
|
-
export {Spinner, type SpinnerProps} from '../src/
|
|
24
|
-
export {Stack, type StackProps} from '../src/
|
|
25
|
-
export {Text, type TextProps} from '../src/
|
|
26
|
-
export {TextInput, type TextInputProps} from '../src/
|
|
27
|
-
export {Tooltip, type TooltipProps} from '../src/
|
|
28
|
-
export type {PopoverMargins} from '../src/
|
|
29
|
-
export {LayerProvider} from '../src/
|
|
30
|
-
export {Portal, type PortalProps} from '../src/
|
|
31
|
-
export {PortalProvider, type PortalProviderProps} from '../src/
|
|
5
|
+
// export {studioTheme} from '../src/core/_compat'
|
|
6
|
+
export {ThemeProvider, type ThemeProviderProps} from '../src/core/_compat/theme/themeProvider'
|
|
7
|
+
export {useTheme_v2} from '../src/core/_compat/theme/useTheme'
|
|
8
|
+
export {Hotkeys, type HotkeysProps} from '../src/core/components/hotkeys/hotkeys'
|
|
9
|
+
export {Menu, type MenuProps} from '../src/core/components/menu/menu'
|
|
10
|
+
export {MenuDivider} from '../src/core/components/menu/menuDivider'
|
|
11
|
+
export {MenuGroup, type MenuGroupProps} from '../src/core/components/menu/menuGroup'
|
|
12
|
+
export {MenuItem, type MenuItemProps} from '../src/core/components/menu/menuItem'
|
|
13
|
+
export {Tab, type TabProps} from '../src/core/components/tab/tab'
|
|
14
|
+
export {TabList, type TabListProps} from '../src/core/components/tab/tabList'
|
|
15
|
+
export {isHTMLAnchorElement, isHTMLElement} from '../src/core/helpers/element'
|
|
16
|
+
export {usePrefersDark} from '../src/core/hooks/usePrefersDark'
|
|
17
|
+
export {Box, type BoxProps} from '../src/core/primitives/box/box'
|
|
18
|
+
export {Button, type ButtonProps} from '../src/core/primitives/button/button'
|
|
19
|
+
export {Card, type CardProps} from '../src/core/primitives/card/card'
|
|
20
|
+
export {Flex, type FlexProps} from '../src/core/primitives/flex/flex'
|
|
21
|
+
export {Grid, type GridProps} from '../src/core/primitives/grid/grid'
|
|
22
|
+
export {Popover, type PopoverProps} from '../src/core/primitives/popover/popover'
|
|
23
|
+
export {Spinner, type SpinnerProps} from '../src/core/primitives/spinner/spinner'
|
|
24
|
+
export {Stack, type StackProps} from '../src/core/primitives/stack/stack'
|
|
25
|
+
export {Text, type TextProps} from '../src/core/primitives/text/text'
|
|
26
|
+
export {TextInput, type TextInputProps} from '../src/core/primitives/textInput/textInput'
|
|
27
|
+
export {Tooltip, type TooltipProps} from '../src/core/primitives/tooltip/tooltip'
|
|
28
|
+
export type {PopoverMargins} from '../src/core/types/popover'
|
|
29
|
+
export {LayerProvider} from '../src/core/utils/layer/layerProvider'
|
|
30
|
+
export {Portal, type PortalProps} from '../src/core/utils/portal/portal'
|
|
31
|
+
export {PortalProvider, type PortalProviderProps} from '../src/core/utils/portal/portalProvider'
|
package/exports/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../src/
|
|
1
|
+
export * from '../src/core'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/ui",
|
|
3
|
-
"version": "3.0.0-static.
|
|
3
|
+
"version": "3.0.0-static.16",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"react",
|
|
6
6
|
"ui",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"postcss": "^8.5.3",
|
|
117
117
|
"prettier": "^3.5.3",
|
|
118
118
|
"pretty-bytes": "^7.0.0",
|
|
119
|
-
"react-compiler-runtime": "19.1.0-rc.
|
|
119
|
+
"react-compiler-runtime": "19.1.0-rc.2",
|
|
120
120
|
"react-refractor": "^2.2.0",
|
|
121
121
|
"use-effect-event": "^1.0.2"
|
|
122
122
|
},
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"@rollup/plugin-replace": "^6.0.2",
|
|
132
132
|
"@sanity/pkg-utils": "^7.2.2",
|
|
133
133
|
"@sanity/prettier-config": "^1.0.3",
|
|
134
|
-
"@sanity/ui-workshop": "^2.1.
|
|
134
|
+
"@sanity/ui-workshop": "^2.1.2",
|
|
135
135
|
"@storybook/addon-a11y": "^8.6.12",
|
|
136
136
|
"@storybook/addon-docs": "^8.6.12",
|
|
137
137
|
"@storybook/addon-essentials": "^8.6.12",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"@types/react-is": "^19.0.0",
|
|
159
159
|
"@types/refractor": "^3.4.1",
|
|
160
160
|
"@vitejs/plugin-react": "^4.4.1",
|
|
161
|
-
"babel-plugin-react-compiler": "19.1.0-rc.
|
|
161
|
+
"babel-plugin-react-compiler": "19.1.0-rc.2",
|
|
162
162
|
"cac": "^6.7.14",
|
|
163
163
|
"commitizen": "^4.3.1",
|
|
164
164
|
"cypress": "^13.17.0",
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
"eslint-plugin-import": "^2.31.0",
|
|
174
174
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
175
175
|
"eslint-plugin-react": "^7.37.5",
|
|
176
|
-
"eslint-plugin-react-hooks": "0.0.0-experimental-
|
|
176
|
+
"eslint-plugin-react-hooks": "0.0.0-experimental-4448b187-20250515",
|
|
177
177
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
178
178
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
179
179
|
"eslint-plugin-storybook": "^0.12.0",
|
package/src/cli/index.ts
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import cac from 'cac'
|
|
1
|
+
import {cac} from 'cac'
|
|
2
2
|
|
|
3
3
|
import {version} from '../../package.json'
|
|
4
4
|
|
|
5
5
|
const cli = cac('ui')
|
|
6
6
|
|
|
7
|
-
// cli
|
|
8
|
-
// .command('dev')
|
|
9
|
-
// .option('--cwd [cwd]', 'Output directory')
|
|
10
|
-
// .action(async (options) => {
|
|
11
|
-
// const {devCommand} = await import('./devCommand')
|
|
12
|
-
|
|
13
|
-
// await devCommand({
|
|
14
|
-
// ...options,
|
|
15
|
-
// cwd: options.cwd || process.cwd(),
|
|
16
|
-
// })
|
|
17
|
-
// })
|
|
18
|
-
|
|
19
7
|
cli
|
|
20
8
|
.command('build')
|
|
21
9
|
.option('--cwd [cwd]', 'Working directory')
|
|
@@ -52,13 +52,13 @@ export function ThemeProvider(props: ThemeProviderProps): ReactElement {
|
|
|
52
52
|
|
|
53
53
|
return (
|
|
54
54
|
<CardProvider
|
|
55
|
-
|
|
55
|
+
scheme={scheme}
|
|
56
|
+
tone={tone}
|
|
57
|
+
unstable_CompatProvider={
|
|
56
58
|
// Render a theme provider around the card if the scheme or tone differs from the root theme.
|
|
57
59
|
// This is needed for backwards compatibility with the legacy theme API.
|
|
58
60
|
ThemeColorProvider
|
|
59
61
|
}
|
|
60
|
-
scheme={scheme}
|
|
61
|
-
tone={tone}
|
|
62
62
|
>
|
|
63
63
|
<ThemeContext.Provider value={themeContext}>
|
|
64
64
|
<StyledThemeProvider theme={theme}>{children}</StyledThemeProvider>
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import {ResponsiveProp} from '@sanity/ui/css'
|
|
2
|
+
import {Space} from '@sanity/ui/theme'
|
|
1
3
|
import {Children, cloneElement, KeyboardEvent, ReactElement, useCallback, useState} from 'react'
|
|
2
4
|
|
|
3
|
-
import {
|
|
5
|
+
import {Flex, FlexOwnProps} from '../../primitives'
|
|
4
6
|
import {ComponentType, Props} from '../../types'
|
|
5
7
|
import {TabProps} from './tab'
|
|
6
8
|
|
|
@@ -11,8 +13,10 @@ export const DEFAULT_TAB_LIST_ELEMENT = 'div'
|
|
|
11
13
|
export type TabListChild = ReactElement<Props<TabProps, 'button'>> | null | undefined | false
|
|
12
14
|
|
|
13
15
|
/** @public */
|
|
14
|
-
export type TabListOwnProps = Omit<
|
|
16
|
+
export type TabListOwnProps = Omit<FlexOwnProps, 'as' | 'height'> & {
|
|
15
17
|
children: TabListChild[]
|
|
18
|
+
/** @deprecated Use `gap` instead */
|
|
19
|
+
space?: ResponsiveProp<Space>
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
/** @public */
|
|
@@ -31,6 +35,9 @@ export function TabList<E extends TabListElementType = typeof DEFAULT_TAB_LIST_E
|
|
|
31
35
|
const {
|
|
32
36
|
as = DEFAULT_TAB_LIST_ELEMENT,
|
|
33
37
|
children: childrenProp,
|
|
38
|
+
gap = 1,
|
|
39
|
+
space = 1,
|
|
40
|
+
wrap = 'nowrap',
|
|
34
41
|
...rest
|
|
35
42
|
} = props as TabListProps<typeof DEFAULT_TAB_LIST_ELEMENT>
|
|
36
43
|
|
|
@@ -62,9 +69,17 @@ export function TabList<E extends TabListElementType = typeof DEFAULT_TAB_LIST_E
|
|
|
62
69
|
)
|
|
63
70
|
|
|
64
71
|
return (
|
|
65
|
-
<
|
|
72
|
+
<Flex
|
|
73
|
+
data-ui="TabList"
|
|
74
|
+
{...rest}
|
|
75
|
+
as={as}
|
|
76
|
+
gap={gap ?? space}
|
|
77
|
+
onKeyDown={handleKeyDown}
|
|
78
|
+
role="tablist"
|
|
79
|
+
wrap={wrap}
|
|
80
|
+
>
|
|
66
81
|
{tabs}
|
|
67
|
-
</
|
|
82
|
+
</Flex>
|
|
68
83
|
)
|
|
69
84
|
}
|
|
70
85
|
|
package/src/{ui → core}/index.ts
RENAMED
|
@@ -29,6 +29,7 @@ export type BoxElementType =
|
|
|
29
29
|
| 'figcaption'
|
|
30
30
|
| 'footer'
|
|
31
31
|
| 'form'
|
|
32
|
+
| 'iframe'
|
|
32
33
|
| 'kbd'
|
|
33
34
|
| 'label'
|
|
34
35
|
| 'legend'
|
|
@@ -112,6 +113,7 @@ export function Box<E extends BoxElementType = typeof DEFAULT_BOX_ELEMENT>(props
|
|
|
112
113
|
rowStart,
|
|
113
114
|
rowEnd,
|
|
114
115
|
sizing = 'border',
|
|
116
|
+
textAlign,
|
|
115
117
|
width,
|
|
116
118
|
wrap,
|
|
117
119
|
...rest
|
|
@@ -179,6 +181,7 @@ export function Box<E extends BoxElementType = typeof DEFAULT_BOX_ELEMENT>(props
|
|
|
179
181
|
rowStart,
|
|
180
182
|
rowEnd,
|
|
181
183
|
sizing,
|
|
184
|
+
textAlign,
|
|
182
185
|
width,
|
|
183
186
|
wrap,
|
|
184
187
|
}),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {card, CardStyleProps, composeClassNames} from '@sanity/ui/css'
|
|
2
|
-
import {createElement} from 'react'
|
|
3
2
|
|
|
4
3
|
import {Props} from '../../types'
|
|
5
4
|
import {Box, BoxElementType, BoxOwnProps} from '../box'
|
|
@@ -57,14 +56,8 @@ export function Card<E extends CardElementType = typeof DEFAULT_CARD_ELEMENT>(pr
|
|
|
57
56
|
} = props as CardProps<typeof DEFAULT_CARD_ELEMENT>
|
|
58
57
|
|
|
59
58
|
const parent = useCard()
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
tone: parent?.tone ?? 'default',
|
|
63
|
-
scheme: parent?.scheme ?? 'light',
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const tone = toneProp === 'inherit' ? context.tone : toneProp
|
|
67
|
-
const scheme = schemeProp === undefined ? context.scheme : schemeProp
|
|
59
|
+
const tone = toneProp === 'inherit' ? parent?.tone : toneProp
|
|
60
|
+
const scheme = schemeProp === undefined ? parent?.scheme : schemeProp
|
|
68
61
|
|
|
69
62
|
let node = (
|
|
70
63
|
<Box
|
|
@@ -74,7 +67,7 @@ export function Card<E extends CardElementType = typeof DEFAULT_CARD_ELEMENT>(pr
|
|
|
74
67
|
className={composeClassNames(
|
|
75
68
|
className,
|
|
76
69
|
card({
|
|
77
|
-
scheme: scheme ===
|
|
70
|
+
scheme: scheme === parent?.scheme ? undefined : scheme,
|
|
78
71
|
shadow,
|
|
79
72
|
tone,
|
|
80
73
|
}),
|
|
@@ -89,27 +82,28 @@ export function Card<E extends CardElementType = typeof DEFAULT_CARD_ELEMENT>(pr
|
|
|
89
82
|
/>
|
|
90
83
|
)
|
|
91
84
|
|
|
92
|
-
if (scheme ===
|
|
85
|
+
if (scheme === parent?.scheme && tone === parent?.tone) {
|
|
93
86
|
return node
|
|
94
87
|
}
|
|
95
88
|
|
|
96
89
|
node = (
|
|
97
90
|
<CardProvider
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
tone={tone ?? context.tone}
|
|
91
|
+
scheme={scheme ?? 'light'}
|
|
92
|
+
tone={tone ?? 'default'}
|
|
93
|
+
unstable_CompatProvider={parent?.unstable_CompatProvider}
|
|
102
94
|
>
|
|
103
95
|
{node}
|
|
104
96
|
</CardProvider>
|
|
105
97
|
)
|
|
106
98
|
|
|
107
|
-
if (parent?.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
tone
|
|
112
|
-
|
|
99
|
+
if (parent?.unstable_CompatProvider) {
|
|
100
|
+
const CompatProvider = parent.unstable_CompatProvider
|
|
101
|
+
|
|
102
|
+
return (
|
|
103
|
+
<CompatProvider scheme={scheme ?? 'light'} tone={tone ?? parent?.tone ?? 'default'}>
|
|
104
|
+
{node}
|
|
105
|
+
</CompatProvider>
|
|
106
|
+
)
|
|
113
107
|
}
|
|
114
108
|
|
|
115
109
|
return node
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {ThemeColorCardToneKey, ThemeColorSchemeKey} from '@sanity/ui/theme'
|
|
2
|
+
import {ReactNode, useMemo} from 'react'
|
|
3
|
+
|
|
4
|
+
import {CardContext} from './cardContext'
|
|
5
|
+
import {_CardCompatProviderComponent} from './types'
|
|
6
|
+
|
|
7
|
+
export function CardProvider(props: {
|
|
8
|
+
children?: ReactNode
|
|
9
|
+
tone: ThemeColorCardToneKey
|
|
10
|
+
scheme: ThemeColorSchemeKey
|
|
11
|
+
unstable_CompatProvider?: _CardCompatProviderComponent
|
|
12
|
+
}) {
|
|
13
|
+
const {children, tone, scheme, unstable_CompatProvider} = props
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<CardContext.Provider
|
|
17
|
+
value={useMemo(
|
|
18
|
+
() => ({tone, scheme, unstable_CompatProvider}),
|
|
19
|
+
[tone, scheme, unstable_CompatProvider],
|
|
20
|
+
)}
|
|
21
|
+
>
|
|
22
|
+
{children}
|
|
23
|
+
</CardContext.Provider>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
CardProvider.displayName = 'CardProvider'
|
|
@@ -12,16 +12,17 @@ export interface CardStyleProps {
|
|
|
12
12
|
$tone: ThemeColorCardToneKey
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type _CardCompatProviderComponent = ComponentType<{
|
|
16
17
|
children?: ReactNode
|
|
17
18
|
tone: ThemeColorCardToneKey
|
|
18
19
|
scheme: ThemeColorSchemeKey
|
|
19
20
|
}>
|
|
20
21
|
|
|
21
|
-
/** @
|
|
22
|
+
/** @public */
|
|
22
23
|
export interface CardContextValue {
|
|
23
|
-
compat_provider?: CardCompatProviderComponent
|
|
24
|
-
rendered: boolean
|
|
25
24
|
tone: ThemeColorCardToneKey
|
|
26
25
|
scheme: ThemeColorSchemeKey
|
|
26
|
+
/** @internal */
|
|
27
|
+
unstable_CompatProvider?: _CardCompatProviderComponent
|
|
27
28
|
}
|
|
@@ -141,7 +141,7 @@ export function Popover<E extends PopoverElementType = typeof DEFAULT_POPOVER_EL
|
|
|
141
141
|
|
|
142
142
|
const {
|
|
143
143
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
144
|
-
animate: _animate =
|
|
144
|
+
animate: _animate = true,
|
|
145
145
|
arrow: arrowProp = false,
|
|
146
146
|
as: as = DEFAULT_POPOVER_ELEMENT,
|
|
147
147
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -4,9 +4,8 @@ import {motion} from 'framer-motion'
|
|
|
4
4
|
import {CSSProperties, ForwardedRef, useMemo} from 'react'
|
|
5
5
|
|
|
6
6
|
import {POPOVER_MOTION_PROPS} from '../../constants'
|
|
7
|
-
import {Placement, PopoverMargins
|
|
8
|
-
import {Arrow, Layer, LayerOwnProps} from '../../utils'
|
|
9
|
-
import {CardElementType} from '../card'
|
|
7
|
+
import {Placement, PopoverMargins} from '../../types'
|
|
8
|
+
import {Arrow, Layer, LayerOwnProps, LayerProps} from '../../utils'
|
|
10
9
|
import {Flex} from '../flex'
|
|
11
10
|
import {
|
|
12
11
|
DEFAULT_POPOVER_ARROW_HEIGHT,
|
|
@@ -37,20 +36,10 @@ export type PopoverLayerOwnProps = LayerOwnProps & {
|
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
/** @internal */
|
|
40
|
-
export type
|
|
39
|
+
export type PopoverLayerProps = PopoverLayerOwnProps & LayerProps<'div'>
|
|
41
40
|
|
|
42
41
|
/** @internal */
|
|
43
|
-
export
|
|
44
|
-
PopoverLayerOwnProps,
|
|
45
|
-
E
|
|
46
|
-
>
|
|
47
|
-
|
|
48
|
-
const MotionLayer = motion.create(Layer)
|
|
49
|
-
|
|
50
|
-
/** @internal */
|
|
51
|
-
export function PopoverLayer<
|
|
52
|
-
E extends PopoverLayerElementType = typeof DEFAULT_POPOVER_LAYER_ELEMENT,
|
|
53
|
-
>(props: PopoverLayerProps<E>) {
|
|
42
|
+
export function PopoverLayer(props: PopoverLayerProps) {
|
|
54
43
|
const {
|
|
55
44
|
__unstable_margins: marginsProp,
|
|
56
45
|
animate,
|
|
@@ -58,7 +47,6 @@ export function PopoverLayer<
|
|
|
58
47
|
arrowRef,
|
|
59
48
|
arrowX,
|
|
60
49
|
arrowY,
|
|
61
|
-
as = DEFAULT_POPOVER_LAYER_ELEMENT,
|
|
62
50
|
children,
|
|
63
51
|
maxWidth,
|
|
64
52
|
padding,
|
|
@@ -75,7 +63,7 @@ export function PopoverLayer<
|
|
|
75
63
|
x: xProp,
|
|
76
64
|
y: yProp,
|
|
77
65
|
...rest
|
|
78
|
-
} = props
|
|
66
|
+
} = props
|
|
79
67
|
|
|
80
68
|
// Get margins: [top, right, bottom, left]
|
|
81
69
|
const margins: PopoverMargins = useMemo(
|
|
@@ -111,11 +99,12 @@ export function PopoverLayer<
|
|
|
111
99
|
)
|
|
112
100
|
|
|
113
101
|
return (
|
|
114
|
-
|
|
102
|
+
// @ts-expect-error - TODO: fix this
|
|
103
|
+
<Layer
|
|
115
104
|
className={popoverCard()}
|
|
116
105
|
data-ui="Popover"
|
|
117
106
|
{...rest}
|
|
118
|
-
as={
|
|
107
|
+
as={motion.div}
|
|
119
108
|
data-context-tone={tone}
|
|
120
109
|
data-placement={placement}
|
|
121
110
|
direction="column"
|
|
@@ -153,7 +142,7 @@ export function PopoverLayer<
|
|
|
153
142
|
radius={DEFAULT_POPOVER_ARROW_RADIUS}
|
|
154
143
|
/>
|
|
155
144
|
)}
|
|
156
|
-
</
|
|
145
|
+
</Layer>
|
|
157
146
|
)
|
|
158
147
|
}
|
|
159
148
|
|
|
@@ -107,7 +107,7 @@ export function Tooltip<E extends TooltipElementType = typeof DEFAULT_TOOLTIP_EL
|
|
|
107
107
|
const boundaryElementContext = useBoundaryElement()
|
|
108
108
|
|
|
109
109
|
const {
|
|
110
|
-
animate: _animate =
|
|
110
|
+
animate: _animate = true,
|
|
111
111
|
arrow: arrowProp = false,
|
|
112
112
|
as = DEFAULT_TOOLTIP_ELEMENT,
|
|
113
113
|
boundaryElement = boundaryElementContext?.element,
|
|
@@ -190,6 +190,7 @@ export function Tooltip<E extends TooltipElementType = typeof DEFAULT_TOOLTIP_EL
|
|
|
190
190
|
placement: placementProp,
|
|
191
191
|
whileElementsMounted: autoUpdate,
|
|
192
192
|
elements: {reference: referenceElement},
|
|
193
|
+
transform: false,
|
|
193
194
|
})
|
|
194
195
|
|
|
195
196
|
const arrowX = middlewareData.arrow?.x
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {tooltipCard} from '@sanity/ui/css'
|
|
2
|
-
import {motion} from 'framer-motion'
|
|
2
|
+
import {motion, MotionStyle} from 'framer-motion'
|
|
3
3
|
import {type CSSProperties, ForwardedRef, useMemo} from 'react'
|
|
4
4
|
|
|
5
5
|
import {POPOVER_MOTION_PROPS} from '../../constants'
|
|
6
|
-
import {Placement
|
|
7
|
-
import {Arrow, Layer, LayerOwnProps} from '../../utils'
|
|
6
|
+
import {Placement} from '../../types'
|
|
7
|
+
import {Arrow, Layer, LayerOwnProps, LayerProps} from '../../utils'
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_TOOLTIP_ARROW_HEIGHT,
|
|
10
10
|
DEFAULT_TOOLTIP_ARROW_RADIUS,
|
|
@@ -27,27 +27,16 @@ export interface TooltipLayerOwnProps extends LayerOwnProps {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/** @internal */
|
|
30
|
-
export type
|
|
30
|
+
export type TooltipLayerProps = TooltipLayerOwnProps & LayerProps<'div'>
|
|
31
31
|
|
|
32
32
|
/** @internal */
|
|
33
|
-
export
|
|
34
|
-
TooltipLayerOwnProps,
|
|
35
|
-
E
|
|
36
|
-
>
|
|
37
|
-
|
|
38
|
-
const MotionLayer = motion.create(Layer)
|
|
39
|
-
|
|
40
|
-
/** @internal */
|
|
41
|
-
export function TooltipLayer<
|
|
42
|
-
E extends TooltipLayerElementType = typeof DEFAULT_TOOLTIP_LAYER_ELEMENT,
|
|
43
|
-
>(props: TooltipLayerProps<E>) {
|
|
33
|
+
export function TooltipLayer(props: TooltipLayerProps) {
|
|
44
34
|
const {
|
|
45
35
|
animate,
|
|
46
36
|
arrow,
|
|
47
37
|
arrowRef,
|
|
48
38
|
arrowX,
|
|
49
39
|
arrowY,
|
|
50
|
-
as = DEFAULT_TOOLTIP_LAYER_ELEMENT,
|
|
51
40
|
children,
|
|
52
41
|
originX,
|
|
53
42
|
originY,
|
|
@@ -59,9 +48,9 @@ export function TooltipLayer<
|
|
|
59
48
|
style,
|
|
60
49
|
tone = 'inherit',
|
|
61
50
|
...rest
|
|
62
|
-
} = props
|
|
51
|
+
} = props
|
|
63
52
|
|
|
64
|
-
const rootStyle:
|
|
53
|
+
const rootStyle: MotionStyle = useMemo(
|
|
65
54
|
() => ({
|
|
66
55
|
originX,
|
|
67
56
|
originY,
|
|
@@ -82,10 +71,11 @@ export function TooltipLayer<
|
|
|
82
71
|
)
|
|
83
72
|
|
|
84
73
|
return (
|
|
85
|
-
|
|
74
|
+
// @ts-expect-error - TODO: fix this
|
|
75
|
+
<Layer
|
|
86
76
|
data-ui="Tooltip__card"
|
|
87
77
|
{...rest}
|
|
88
|
-
as={
|
|
78
|
+
as={motion.div}
|
|
89
79
|
className={tooltipCard()}
|
|
90
80
|
data-animate={animate ? '' : undefined}
|
|
91
81
|
data-placement={placement}
|
|
@@ -112,7 +102,7 @@ export function TooltipLayer<
|
|
|
112
102
|
radius={DEFAULT_TOOLTIP_ARROW_RADIUS}
|
|
113
103
|
/>
|
|
114
104
|
)}
|
|
115
|
-
</
|
|
105
|
+
</Layer>
|
|
116
106
|
)
|
|
117
107
|
}
|
|
118
108
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {ReactNode, ReactPortal} from 'react'
|
|
2
2
|
import {createPortal} from 'react-dom'
|
|
3
3
|
|
|
4
4
|
import {CardProvider, useCard} from '../../primitives'
|
|
@@ -26,15 +26,13 @@ export function Portal(props: PortalProps): ReactPortal | null {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
return createPortal(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
children,
|
|
37
|
-
),
|
|
29
|
+
<CardProvider
|
|
30
|
+
// rendered={true}
|
|
31
|
+
tone="transparent" // card?.tone || 'default',
|
|
32
|
+
scheme={card?.scheme || 'light'}
|
|
33
|
+
>
|
|
34
|
+
{children}
|
|
35
|
+
</CardProvider>,
|
|
38
36
|
portalElement,
|
|
39
37
|
)
|
|
40
38
|
}
|
package/src/css/_mergeStyles.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// import type {Style, StyleKeyframes, StyleLayers, StyleRules} from '@sanity/css'
|
|
2
|
-
|
|
3
1
|
import {Style, StyleKeyframes, StyleLayers, StyleRules} from './types'
|
|
4
2
|
|
|
5
3
|
/** @internal */
|
|
@@ -9,11 +7,6 @@ export function _mergeStyles(styles: Style[]): Style {
|
|
|
9
7
|
const rules: StyleRules = {}
|
|
10
8
|
|
|
11
9
|
for (const s of styles) {
|
|
12
|
-
if (!s) {
|
|
13
|
-
// TODO: should not happen
|
|
14
|
-
continue
|
|
15
|
-
}
|
|
16
|
-
|
|
17
10
|
Object.assign(keyframes, s.keyframes)
|
|
18
11
|
|
|
19
12
|
for (const layerName in s.layers) {
|
package/src/css/_system.style.ts
CHANGED
|
@@ -31,6 +31,7 @@ import {pointerEventsStyle} from './aspects/pointerEvents/pointerEvents.style'
|
|
|
31
31
|
import {positionStyle} from './aspects/position/position.style'
|
|
32
32
|
import {radiusStyle} from './aspects/radius/radius.style'
|
|
33
33
|
import {shadowStyle} from './aspects/shadow/shadow.style'
|
|
34
|
+
import {textAlignStyle} from './aspects/textAlign/textAlign.style'
|
|
34
35
|
import {textOverflowStyle} from './aspects/textOverflow/textOverflow.style'
|
|
35
36
|
import {widthStyle} from './aspects/width/width.style'
|
|
36
37
|
import {breadcrumbsStyle} from './components/breadcrumbs/breadcrumbs.style'
|
|
@@ -114,6 +115,7 @@ export const _systemStyle: Style = _mergeStyles([
|
|
|
114
115
|
positionStyle,
|
|
115
116
|
radiusStyle,
|
|
116
117
|
shadowStyle,
|
|
118
|
+
textAlignStyle,
|
|
117
119
|
textOverflowStyle,
|
|
118
120
|
widthStyle,
|
|
119
121
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import {_responsiveRule} from '../../_responsiveRule'
|
|
2
1
|
import {Style, StyleRules} from '../../types'
|
|
3
2
|
|
|
4
3
|
export const primitive: StyleRules = {
|
|
@@ -69,24 +68,4 @@ export const primitive: StyleRules = {
|
|
|
69
68
|
},
|
|
70
69
|
}
|
|
71
70
|
|
|
72
|
-
_responsiveRule(primitive, `text-align-initial`, {
|
|
73
|
-
textAlign: 'initial',
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
_responsiveRule(primitive, `text-align-left`, {
|
|
77
|
-
textAlign: 'left',
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
_responsiveRule(primitive, `text-align-center`, {
|
|
81
|
-
textAlign: 'center',
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
_responsiveRule(primitive, `text-align-right`, {
|
|
85
|
-
textAlign: 'right',
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
_responsiveRule(primitive, `text-align-justify`, {
|
|
89
|
-
textAlign: 'justify',
|
|
90
|
-
})
|
|
91
|
-
|
|
92
71
|
export const fontStyle: Style = {layers: {primitive}}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import {_resp} from '../../_resp'
|
|
2
1
|
import {composeClassNames} from '../../composeClassNames'
|
|
3
2
|
import {FontStyleProps} from './types'
|
|
4
3
|
|
|
5
4
|
/** @public */
|
|
6
5
|
export function font(props: FontStyleProps): string | undefined {
|
|
7
|
-
return composeClassNames(
|
|
8
|
-
'font',
|
|
9
|
-
props.weight && `font-${props.weight}`,
|
|
10
|
-
_resp('text-align', props.align),
|
|
11
|
-
)
|
|
6
|
+
return composeClassNames('font', props.weight && `font-${props.weight}`)
|
|
12
7
|
}
|