@sanity/ui 3.0.0-static.18 → 3.0.0-static.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks-cjs/_visual-editing.cjs +137 -136
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
- package/dist/_chunks-cjs/buildCommand.cjs +21 -22
- package/dist/_chunks-cjs/buildCommand.cjs.map +1 -1
- package/dist/_chunks-es/_visual-editing.js +138 -137
- package/dist/_chunks-es/_visual-editing.js.map +1 -1
- package/dist/_visual-editing.d.cts +12 -22
- package/dist/_visual-editing.d.ts +12 -22
- package/dist/cli.cjs +1 -1
- package/dist/css.cjs +1589 -2017
- package/dist/css.cjs.map +1 -1
- package/dist/css.d.cts +9423 -874
- package/dist/css.d.ts +9423 -874
- package/dist/css.js +1591 -2019
- package/dist/css.js.map +1 -1
- package/dist/index.cjs +28 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -21
- package/dist/index.d.ts +23 -21
- package/dist/index.js +30 -42
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs +2749 -2756
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.d.cts +242 -161
- package/dist/theme.d.ts +242 -161
- package/dist/theme.js +2750 -2757
- package/dist/theme.js.map +1 -1
- package/dist/ui-system.css +15719 -16097
- package/dist/ui-system.min.css +1 -1
- package/dist/ui-theme.css +850 -4568
- package/dist/ui-theme.min.css +1 -1
- package/dist/ui.css +16569 -20772
- package/dist/ui.min.css +1 -1
- package/package.json +10 -15
- package/src/cli/buildCommand.ts +13 -30
- package/src/core/StyleTags.tsx +4 -12
- package/src/core/_compat/styles/_responsive.ts +1 -1
- package/src/core/_compat/theme/theme.test.tsx +4 -5
- package/src/core/_compat/theme/themeColorProvider.tsx +2 -2
- package/src/core/_compat/theme/themeContext.ts +2 -2
- package/src/core/_compat/theme/themeProvider.tsx +2 -2
- package/src/core/_compat/theme/types.ts +1 -1
- package/src/core/_compat/theme/useRootTheme.ts +1 -1
- package/src/core/_compat/theme/useTheme.ts +1 -1
- package/src/core/components/autocomplete/__workshop__/async.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/custom.tsx +11 -11
- package/src/core/components/autocomplete/__workshop__/example.tsx +6 -7
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +1 -1
- package/src/core/components/autocomplete/autocomplete.tsx +5 -5
- package/src/core/components/autocomplete/autocompleteOption.tsx +1 -1
- package/src/core/components/autocomplete/autocompleteReducer.ts +1 -1
- package/src/core/components/autocomplete/constants.ts +1 -1
- package/src/core/components/autocomplete/types.ts +1 -1
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +1 -1
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +7 -7
- package/src/core/components/dialog/__workshop__/activate.tsx +4 -4
- package/src/core/components/dialog/__workshop__/position.tsx +1 -1
- package/src/core/components/dialog/__workshop__/props.tsx +1 -1
- package/src/core/components/dialog/__workshop__/wrapped.tsx +2 -2
- package/src/core/components/dialog/dialog.tsx +15 -8
- package/src/core/components/dialog/dialogCard.tsx +18 -3
- package/src/core/components/dialog/dialogContext.ts +1 -1
- package/src/core/components/dialog/dialogProvider.tsx +3 -3
- package/src/core/components/dialog/useDialog.ts +1 -1
- package/src/core/components/hotkeys/hotkeys.tsx +4 -4
- package/src/core/components/menu/__workshop__/closableMenuButton.tsx +5 -4
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +2 -2
- package/src/core/components/menu/__workshop__/customMenuItem.tsx +3 -3
- package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +1 -1
- package/src/core/components/menu/__workshop__/groups.tsx +2 -2
- package/src/core/components/menu/__workshop__/menuButton.tsx +1 -1
- package/src/core/components/menu/__workshop__/menuGroupRight.tsx +1 -1
- package/src/core/components/menu/__workshop__/nestedMenu.tsx +1 -1
- package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +13 -4
- package/src/core/components/menu/__workshop__/selectedItem.tsx +2 -2
- package/src/core/components/menu/__workshop__/withoutArrow.tsx +1 -1
- package/src/core/components/menu/menu.test.tsx +6 -7
- package/src/core/components/menu/menu.tsx +2 -2
- package/src/core/components/menu/menuButton.tsx +9 -9
- package/src/core/components/menu/menuContext.ts +1 -1
- package/src/core/components/menu/menuDivider.tsx +3 -3
- package/src/core/components/menu/menuGroup.tsx +9 -9
- package/src/core/components/menu/menuItem.tsx +9 -6
- package/src/core/components/menu/useMenu.ts +1 -1
- package/src/core/components/menu/useMenuController.ts +4 -4
- package/src/core/components/skeleton/__workshop__/delay.tsx +1 -1
- package/src/core/components/skeleton/__workshop__/skeleton.tsx +2 -2
- package/src/core/components/skeleton/codeSkeleton.tsx +5 -5
- package/src/core/components/skeleton/headingSkeleton.tsx +5 -5
- package/src/core/components/skeleton/labelSkeleton.tsx +5 -5
- package/src/core/components/skeleton/skeleton.tsx +4 -4
- package/src/core/components/skeleton/textSkeleton.tsx +5 -5
- package/src/core/components/tab/__workshop__/example.tsx +1 -1
- package/src/core/components/tab/tab.tsx +7 -7
- package/src/core/components/tab/tabList.tsx +14 -7
- package/src/core/components/tab/tabPanel.tsx +10 -7
- package/src/core/components/toast/__workshop__/hook.tsx +1 -1
- package/src/core/components/toast/toast.test.tsx +5 -5
- package/src/core/components/toast/toast.tsx +6 -7
- package/src/core/components/toast/toastContext.ts +1 -1
- package/src/core/components/toast/toastLayer.tsx +2 -2
- package/src/core/components/toast/toastProvider.tsx +1 -1
- package/src/core/components/toast/types.ts +1 -1
- package/src/core/components/toast/useToast.ts +1 -1
- package/src/core/components/tree/__workshop__/basic.perf.ts +1 -1
- package/src/core/components/tree/__workshop__/basic.tsx +1 -1
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +1 -1
- package/src/core/components/tree/helpers.ts +1 -1
- package/src/core/components/tree/tree.tsx +6 -6
- package/src/core/components/tree/treeContext.ts +1 -1
- package/src/core/components/tree/treeGroup.tsx +2 -2
- package/src/core/components/tree/treeItem.tsx +15 -15
- package/src/core/components/tree/types.ts +2 -2
- package/src/core/components/tree/useTree.ts +1 -1
- package/src/core/hooks/useClickOutside.test.tsx +15 -16
- package/src/core/hooks/useClickOutsideEvent.test.tsx +4 -5
- package/src/core/hooks/useDelayed.test.ts +6 -7
- package/src/core/hooks/useDelayedState.ts +1 -1
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +1 -1
- package/src/core/hooks/useElementSize.ts +1 -1
- package/src/core/hooks/useForwardedRef.ts +1 -1
- package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +1 -1
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +1 -0
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +2 -2
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +4 -4
- package/src/core/hooks/usePrefersDark.test.tsx +1 -0
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +4 -4
- package/src/core/hooks/usePrefersReducedMotion.test.tsx +1 -0
- package/src/core/middleware/origin.ts +1 -1
- package/src/core/primitives/_selectable/selectable.tsx +3 -3
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +1 -1
- package/src/core/primitives/avatar/avatar.tsx +6 -6
- package/src/core/primitives/avatar/avatarCounter.tsx +3 -3
- package/src/core/primitives/avatar/avatarStack.tsx +7 -7
- package/src/core/primitives/avatar/types.ts +1 -3
- package/src/core/primitives/badge/badge.test.tsx +2 -3
- package/src/core/primitives/badge/badge.tsx +3 -3
- package/src/core/primitives/box/__workshop__/responsive.tsx +2 -1
- package/src/core/primitives/box/box.tsx +4 -2
- package/src/core/primitives/button/__workshop__/custom.tsx +2 -2
- package/src/core/primitives/button/__workshop__/customIcons.tsx +3 -3
- package/src/core/primitives/button/__workshop__/disabled.tsx +9 -9
- package/src/core/primitives/button/__workshop__/props.tsx +3 -4
- package/src/core/primitives/button/__workshop__/stacked.tsx +4 -5
- package/src/core/primitives/button/button.test.tsx +2 -3
- package/src/core/primitives/button/button.tsx +11 -6
- package/src/core/primitives/card/__workshop__/asButton.tsx +16 -7
- package/src/core/primitives/card/__workshop__/checkered.tsx +1 -1
- package/src/core/primitives/card/__workshop__/index.ts +1 -1
- package/src/core/primitives/card/__workshop__/interactive.tsx +1 -1
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +3 -3
- package/src/core/primitives/card/__workshop__/props.tsx +3 -3
- package/src/core/primitives/card/__workshop__/selected.tsx +2 -2
- package/src/core/primitives/card/__workshop__/{allTones.tsx → tones.tsx} +3 -3
- package/src/core/primitives/card/card.tsx +4 -4
- package/src/core/primitives/card/cardContext.ts +2 -2
- package/src/core/primitives/card/cardProvider.tsx +3 -3
- package/src/core/primitives/card/types.ts +2 -2
- package/src/core/primitives/card/useCard.ts +2 -1
- package/src/core/primitives/checkbox/__workshop__/props.tsx +2 -0
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +11 -20
- package/src/core/primitives/checkbox/checkbox.tsx +5 -7
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/code/code.tsx +3 -3
- package/src/core/primitives/container/container.tsx +4 -4
- package/src/core/primitives/flex/flex.tsx +2 -2
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/heading/heading.tsx +2 -2
- package/src/core/primitives/inline/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/inline/inline.tsx +2 -2
- package/src/core/primitives/inline/types.ts +1 -0
- package/src/core/primitives/kbd/kbd.tsx +5 -5
- package/src/core/primitives/label/label.tsx +5 -5
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +2 -2
- package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +3 -4
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +4 -4
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +2 -3
- package/src/core/primitives/popover/constants.ts +1 -1
- package/src/core/primitives/popover/floating-ui/size.ts +2 -2
- package/src/core/primitives/popover/helpers.ts +1 -1
- package/src/core/primitives/popover/popover.tsx +1 -1
- package/src/core/primitives/popover/popoverLayer.tsx +4 -4
- package/src/core/primitives/popover/types.ts +3 -2
- package/src/core/primitives/radio/__workshop__/example.tsx +1 -1
- package/src/core/primitives/radio/radio.tsx +5 -5
- package/src/core/primitives/select/__workshop__/plain.tsx +15 -3
- package/src/core/primitives/select/__workshop__/readOnly.tsx +1 -1
- package/src/core/primitives/select/select.tsx +4 -10
- package/src/core/primitives/spinner/__workshop__/Props.tsx +1 -2
- package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +3 -3
- package/src/core/primitives/spinner/spinner.tsx +3 -3
- package/src/core/primitives/stack/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/stack/stack.tsx +5 -5
- package/src/core/primitives/switch/switch.tsx +3 -3
- package/src/core/primitives/text/__workshop__/colored.tsx +5 -5
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/text/text.tsx +6 -6
- package/src/core/primitives/textArea/__workshop__/plain.tsx +35 -23
- package/src/core/primitives/textArea/textArea.tsx +14 -5
- package/src/core/primitives/textInput/__workshop__/customValidity.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/plain.tsx +9 -15
- package/src/core/primitives/textInput/__workshop__/states.tsx +4 -4
- package/src/core/primitives/textInput/__workshop__/tones.tsx +2 -2
- package/src/core/primitives/textInput/textInput.tsx +13 -11
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +2 -2
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +1 -1
- package/src/core/primitives/tooltip/__workshop__/props.tsx +5 -4
- package/src/core/primitives/tooltip/constants.ts +1 -1
- package/src/core/primitives/tooltip/tooltip.test.tsx +61 -60
- package/src/core/primitives/tooltip/tooltip.tsx +11 -6
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +1 -1
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +3 -3
- package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +1 -1
- package/src/core/primitives/tooltip/tooltipLayer.tsx +4 -4
- package/src/core/primitives/types.ts +15 -24
- package/src/core/types/badge.ts +1 -1
- package/src/core/types/button.ts +1 -1
- package/src/core/types/card.ts +1 -1
- package/src/core/types/selectable.ts +1 -1
- package/src/core/utils/arrow/arrow.tsx +5 -14
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +5 -5
- package/src/core/utils/boundaryElement/boundaryElementContext.ts +1 -1
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +2 -2
- package/src/core/utils/boundaryElement/useBoundaryElement.ts +1 -1
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +15 -8
- package/src/core/utils/elementQuery/elementQuery.tsx +1 -1
- package/src/core/utils/errorBoundary.tsx +4 -4
- package/src/core/utils/layer/__workshop__/multipleRoots.tsx +5 -5
- package/src/core/utils/layer/__workshop__/nested.tsx +3 -3
- package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +9 -5
- package/src/core/utils/layer/getLayerContext.test.ts +3 -1
- package/src/core/utils/layer/getLayerContext.ts +1 -1
- package/src/core/utils/layer/layer.test.tsx +5 -5
- package/src/core/utils/layer/layer.tsx +2 -2
- package/src/core/utils/layer/layerCard.tsx +3 -3
- package/src/core/utils/layer/layerContext.ts +1 -1
- package/src/core/utils/layer/layerProvider.tsx +10 -2
- package/src/core/utils/layer/useLayer.ts +1 -1
- package/src/core/utils/portal/__workshop__/named.tsx +3 -3
- package/src/core/utils/portal/portal.test.tsx +5 -5
- package/src/core/utils/portal/portal.tsx +3 -2
- package/src/core/utils/portal/portalContext.ts +1 -1
- package/src/core/utils/portal/portalProvider.tsx +2 -2
- package/src/core/utils/portal/usePortal.ts +1 -1
- package/src/core/utils/srOnly/srOnly.tsx +3 -3
- package/src/core/utils/virtualList/__workshop__/infiniteList.tsx +1 -1
- package/src/core/utils/virtualList/virtualList.tsx +3 -3
- package/src/css/_assign.ts +3 -0
- package/src/css/_compileStyle.ts +12 -4
- package/src/css/_compileTheme.ts +10 -13
- package/src/css/_composeClassNames.ts +12 -0
- package/src/css/_fromEntries.ts +3 -0
- package/src/css/_getClassNames.ts +9 -0
- package/src/css/_hash.ts +9 -0
- package/src/css/_mergeStyles.ts +1 -1
- package/src/css/_resp.ts +6 -12
- package/src/css/_scopeClassName.ts +9 -0
- package/src/css/_scopeClassNames.ts +12 -0
- package/src/css/_system.style.ts +2 -0
- package/src/css/aspects/border/border.style.ts +2 -2
- package/src/css/aspects/border/border.ts +3 -3
- package/src/css/aspects/border/types.ts +1 -1
- package/src/css/aspects/boxSizing/boxSizing.style.ts +10 -0
- package/src/css/aspects/boxSizing/boxSizing.ts +8 -0
- package/src/css/aspects/boxSizing/index.ts +2 -0
- package/src/css/aspects/boxSizing/types.ts +9 -0
- package/src/css/aspects/display/display.style.ts +8 -8
- package/src/css/aspects/display/display.ts +3 -3
- package/src/css/aspects/display/types.ts +1 -1
- package/src/css/aspects/flex/flex.ts +3 -3
- package/src/css/aspects/flex/types.ts +1 -1
- package/src/css/aspects/flexItem/flex.style.ts +1 -1
- package/src/css/aspects/flexItem/flexItem.ts +3 -3
- package/src/css/aspects/flexItem/types.ts +1 -1
- package/src/css/aspects/font/font.style.ts +33 -22
- package/src/css/aspects/font/font.ts +3 -3
- package/src/css/aspects/font/types.ts +1 -1
- package/src/css/aspects/gap/gap.style.ts +2 -2
- package/src/css/aspects/gap/gap.ts +3 -3
- package/src/css/aspects/gap/types.ts +2 -2
- package/src/css/aspects/grid/grid.ts +3 -3
- package/src/css/aspects/grid/types.ts +1 -1
- package/src/css/aspects/gridItem/gridItem.ts +3 -3
- package/src/css/aspects/gridItem/types.ts +1 -1
- package/src/css/aspects/height/height.ts +3 -3
- package/src/css/aspects/index.ts +1 -0
- package/src/css/aspects/inset/inset.ts +3 -3
- package/src/css/aspects/inset/types.ts +1 -1
- package/src/css/aspects/margin/margin.style.ts +10 -10
- package/src/css/aspects/margin/margin.ts +3 -3
- package/src/css/aspects/margin/types.ts +1 -1
- package/src/css/aspects/maxWidth/maxWidth.style.ts +1 -1
- package/src/css/aspects/maxWidth/maxWidth.ts +4 -3
- package/src/css/aspects/maxWidth/types.ts +2 -2
- package/src/css/aspects/minWidth/minWidth.ts +4 -3
- package/src/css/aspects/minWidth/types.ts +1 -1
- package/src/css/aspects/overflow/overflow.ts +3 -3
- package/src/css/aspects/overflow/types.ts +1 -1
- package/src/css/aspects/padding/padding.style.ts +2 -5
- package/src/css/aspects/padding/padding.ts +3 -3
- package/src/css/aspects/padding/types.ts +2 -2
- package/src/css/aspects/pointerEvents/pointerEvents.ts +3 -3
- package/src/css/aspects/position/position.ts +3 -3
- package/src/css/aspects/position/types.ts +1 -1
- package/src/css/aspects/radius/radius.style.ts +1 -1
- package/src/css/aspects/radius/radius.ts +3 -3
- package/src/css/aspects/radius/types.ts +2 -2
- package/src/css/aspects/shadow/shadow.style.ts +7 -7
- package/src/css/aspects/shadow/shadow.ts +3 -3
- package/src/css/aspects/shadow/types.ts +2 -2
- package/src/css/aspects/textAlign/textAlign.style.ts +1 -1
- package/src/css/aspects/textAlign/textAlign.ts +3 -3
- package/src/css/aspects/textOverflow/textOverflow.ts +3 -3
- package/src/css/aspects/width/types.ts +2 -2
- package/src/css/aspects/width/width.style.ts +1 -1
- package/src/css/aspects/width/width.ts +4 -3
- package/src/css/components/breadcrumbs/breadcrumbs.style.ts +1 -1
- package/src/css/components/breadcrumbs/breadcrumbs.ts +2 -2
- package/src/css/components/dialog/dialog.style.ts +14 -16
- package/src/css/components/dialog/dialog.ts +9 -8
- package/src/css/components/menu/menu.style.ts +2 -2
- package/src/css/components/menu/menu.ts +3 -3
- package/src/css/components/skeleton/skeleton.style.ts +24 -17
- package/src/css/components/skeleton/skeleton.ts +8 -7
- package/src/css/components/skeleton/types.ts +4 -6
- package/src/css/components/toast/toast.style.ts +1 -1
- package/src/css/components/toast/toast.ts +6 -6
- package/src/css/components/tree/tree.style.ts +7 -23
- package/src/css/components/tree/tree.ts +2 -2
- package/src/css/constants.ts +0 -3
- package/src/css/index.ts +3 -5
- package/src/css/prefix/constants.ts +6 -0
- package/src/css/prefix/types.ts +1 -0
- package/src/css/primitives/_arrow/_arrow.style.ts +11 -13
- package/src/css/primitives/_arrow/_arrow.ts +5 -5
- package/src/css/primitives/_input/_input.style.ts +171 -75
- package/src/css/primitives/_input/input.ts +13 -10
- package/src/css/primitives/_input/types.ts +3 -3
- package/src/css/primitives/_selectable/_selectable.style.ts +5 -6
- package/src/css/primitives/_selectable/selectable.ts +4 -3
- package/src/css/primitives/_selectable/types.ts +2 -2
- package/src/css/primitives/avatar/avatar.style.ts +38 -39
- package/src/css/primitives/avatar/avatar.ts +8 -8
- package/src/css/primitives/avatar/types.ts +3 -3
- package/src/css/primitives/badge/badge.style.ts +2 -3
- package/src/css/primitives/badge/badge.ts +7 -3
- package/src/css/primitives/badge/types.ts +2 -2
- package/src/css/primitives/box/box.style.ts +5 -15
- package/src/css/primitives/box/box.ts +7 -9
- package/src/css/primitives/box/types.ts +3 -6
- package/src/css/primitives/button/button.style.ts +189 -162
- package/src/css/primitives/button/button.ts +11 -4
- package/src/css/primitives/button/types.ts +1 -1
- package/src/css/primitives/card/card.style.ts +102 -68
- package/src/css/primitives/card/card.ts +5 -7
- package/src/css/primitives/card/types.ts +2 -2
- package/src/css/primitives/checkbox/checkbox.style.ts +125 -101
- package/src/css/primitives/checkbox/checkbox.ts +3 -3
- package/src/css/primitives/code/code.style.ts +24 -26
- package/src/css/primitives/code/code.ts +7 -3
- package/src/css/primitives/code/types.ts +2 -2
- package/src/css/primitives/container/container.style.ts +1 -1
- package/src/css/primitives/container/container.ts +4 -3
- package/src/css/primitives/container/types.ts +2 -2
- package/src/css/primitives/heading/heading.style.ts +31 -23
- package/src/css/primitives/heading/heading.ts +10 -8
- package/src/css/primitives/heading/types.ts +3 -2
- package/src/css/primitives/kbd/kbd.style.ts +7 -7
- package/src/css/primitives/kbd/kbd.ts +4 -3
- package/src/css/primitives/kbd/types.ts +1 -1
- package/src/css/primitives/label/label.style.ts +27 -24
- package/src/css/primitives/label/label.ts +5 -8
- package/src/css/primitives/label/types.ts +4 -3
- package/src/css/primitives/popover/popover.style.ts +6 -2
- package/src/css/primitives/popover/popover.ts +3 -3
- package/src/css/primitives/radio/radio.style.ts +37 -76
- package/src/css/primitives/radio/radio.ts +2 -2
- package/src/css/primitives/select/select.style.ts +3 -3
- package/src/css/primitives/select/select.ts +5 -5
- package/src/css/primitives/select/types.ts +1 -1
- package/src/css/primitives/spinner/spinner.style.ts +1 -1
- package/src/css/primitives/spinner/spinner.ts +3 -3
- package/src/css/primitives/stack/stack.style.ts +6 -2
- package/src/css/primitives/stack/stack.ts +2 -2
- package/src/css/primitives/switch/switch.style.ts +47 -39
- package/src/css/primitives/switch/switch.ts +6 -6
- package/src/css/primitives/text/text.style.ts +28 -23
- package/src/css/primitives/text/text.ts +5 -8
- package/src/css/primitives/text/types.ts +2 -2
- package/src/css/primitives/textArea/textArea.style.ts +6 -2
- package/src/css/primitives/textArea/textArea.ts +4 -4
- package/src/css/primitives/textArea/types.ts +1 -1
- package/src/css/primitives/textInput/textInput.style.ts +23 -17
- package/src/css/primitives/textInput/textInput.ts +4 -4
- package/src/css/primitives/textInput/types.ts +2 -8
- package/src/css/primitives/token/token.style.ts +4 -4
- package/src/css/primitives/tooltip/tooltip.style.ts +5 -4
- package/src/css/primitives/tooltip/tooltip.ts +3 -3
- package/src/css/renderColor.ts +31 -0
- package/src/css/theme/index.ts +14 -0
- package/src/css/theme/lib/contract/buildVarContract.ts +76 -0
- package/src/css/theme/lib/contract/index.ts +2 -0
- package/src/css/theme/lib/contract/types.ts +15 -0
- package/src/css/theme/resolveTheme.ts +852 -0
- package/src/css/types.ts +25 -914
- package/src/css/utils/srOnly/srOnly.style.ts +1 -1
- package/src/css/utils/srOnly/srOnly.ts +3 -3
- package/src/theme/getScopedTheme.ts +4 -4
- package/src/theme/index.ts +0 -5
- package/src/theme/types.ts +4 -4
- package/src/theme/v0/color/_generic.ts +1 -1
- package/src/theme/v0/color/button.ts +1 -1
- package/src/theme/v0/color/card.ts +1 -1
- package/src/theme/v0/color/color.ts +11 -11
- package/src/theme/v0/color/input.ts +1 -1
- package/src/theme/v0/color/muted.ts +1 -1
- package/src/theme/v0/color/selectable.ts +1 -1
- package/src/theme/v0/color/solid.ts +1 -1
- package/src/theme/v0/color/spot.ts +1 -1
- package/src/theme/v0/styles.ts +1 -1
- package/src/theme/v0/theme.ts +7 -7
- package/src/theme/v2/avatar.ts +1 -1
- package/src/theme/{build → v2/build}/_deprecated/color/_selectable/createSelectableTones.ts +3 -3
- package/src/theme/{build → v2/build}/_deprecated/color/_solid/createSolidTones.ts +2 -2
- package/src/theme/{build → v2/build}/_deprecated/color/button/createButtonModes.ts +7 -2
- package/src/theme/{build → v2/build}/_deprecated/color/button/createButtonTones.ts +4 -4
- package/src/theme/{build → v2/build}/_deprecated/color/card/createCardStates.ts +3 -3
- package/src/theme/{build → v2/build}/_deprecated/color/color.test.ts +1 -1
- package/src/theme/{build → v2/build}/_deprecated/color/defaults.ts +1 -1
- package/src/theme/{build → v2/build}/_deprecated/color/factory.ts +3 -3
- package/src/theme/{build → v2/build}/_deprecated/color/input/createInputModes.ts +7 -2
- package/src/theme/{build → v2/build}/_deprecated/color/muted/createMuted.ts +2 -2
- package/src/theme/{build → v2/build}/_deprecated/color/spot/createSpot.ts +2 -2
- package/src/theme/{build → v2/build}/buildColorTheme.test.ts +3 -1
- package/src/theme/{build → v2/build}/buildColorTheme.ts +24 -24
- package/src/theme/{build → v2/build}/buildTheme.test.ts +10 -8
- package/src/theme/{build → v2/build}/buildTheme.ts +4 -4
- package/src/theme/{build → v2/build}/colorToken/colorToken.ts +2 -2
- package/src/theme/{build → v2/build}/colorToken/compileColorToken.ts +1 -1
- package/src/theme/{build → v2/build}/colorToken/types.ts +2 -2
- package/src/theme/{build → v2/build}/lib/color-fns/blend/mix.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/blend/multiply.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/blend/screen.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/color-fns.test.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/contrastRatio.ts +5 -2
- package/src/theme/{build → v2/build}/lib/color-fns/convert.ts +1 -1
- package/src/theme/{build → v2/build}/lib/color-fns/parse.ts +1 -1
- package/src/theme/{build → v2/build}/mixThemeColor.test.ts +2 -0
- package/src/theme/{build → v2/build}/mixThemeColor.ts +1 -1
- package/src/theme/{build → v2/build}/renderColorTheme.ts +27 -27
- package/src/theme/{build → v2/build}/renderColorValue.ts +3 -3
- package/src/theme/{build → v2/build}/resolveColorTokens.ts +13 -13
- package/src/theme/v2/color/_helpers.ts +2 -2
- package/src/theme/v2/color/_system.ts +1 -1
- package/src/theme/v2/color/avatar.ts +1 -1
- package/src/theme/v2/color/badge.ts +1 -1
- package/src/theme/v2/color/button.ts +2 -2
- package/src/theme/v2/color/color.ts +7 -7
- package/src/theme/v2/color/input.ts +5 -1
- package/src/theme/v2/color/selectable.ts +2 -2
- package/src/theme/v2/color/state.ts +4 -4
- package/src/theme/{config → v2/config}/helpers.ts +6 -13
- package/src/theme/{config → v2/config}/system.ts +11 -12
- package/src/theme/{config → v2/config}/tokens/color/types.ts +14 -10
- package/src/theme/{config → v2/config}/tokens/index.ts +0 -1
- package/src/theme/{config → v2/config}/tokens/parseTokenValue.test.ts +2 -0
- package/src/theme/{config → v2/config}/tokens/parseTokenValue.ts +2 -2
- package/src/theme/{config → v2/config}/tokens/types.ts +3 -3
- package/src/theme/{config → v2/config}/types.ts +8 -6
- package/src/theme/{defaults → v2/defaults}/colorPalette.ts +1 -1
- package/src/theme/{defaults → v2/defaults}/colorTokens.ts +1 -1
- package/src/theme/{defaults → v2/defaults}/config.ts +1 -1
- package/src/theme/{defaults → v2/defaults}/fonts.ts +1 -1
- package/src/theme/v2/index.ts +2 -0
- package/src/theme/v2/input.ts +1 -1
- package/src/theme/v2/theme.ts +8 -8
- package/src/theme/{_constants.ts → v3/_constants.ts} +6 -3
- package/src/theme/v3/_parseColorToken.ts +185 -0
- package/src/theme/v3/buildTheme_v3.ts +11 -7
- package/src/theme/v3/color/_constants.ts +15 -0
- package/src/theme/v3/color/avatar.ts +14 -0
- package/src/theme/v3/color/card.ts +53 -53
- package/src/theme/v3/color/color.ts +66 -68
- package/src/theme/v3/color/element.ts +8 -8
- package/src/theme/v3/color/index.ts +2 -2
- package/src/theme/v3/color/token.ts +18 -4
- package/src/theme/v3/color/tokens.ts +2 -2
- package/src/theme/v3/defaultTokens.ts +73 -85
- package/src/theme/v3/index.ts +3 -0
- package/src/theme/v3/palette/index.ts +2 -0
- package/src/theme/v3/resolveTokens.ts +65 -65
- package/src/theme/v3/tokens.ts +2 -2
- package/src/theme/v3/types.ts +61 -7
- package/src/theme/versioning/getTheme_v2.ts +3 -3
- package/src/theme/versioning/is_v0.ts +2 -2
- package/src/theme/versioning/is_v2.ts +2 -2
- package/src/theme/versioning/themeColor_v0_v2.ts +2 -2
- package/src/theme/versioning/themeColor_v2_v2_9.ts +1 -1
- package/src/theme/versioning/themeColor_v3_v2.ts +229 -52
- package/src/theme/versioning/v0_v2.ts +3 -3
- package/src/theme/versioning/v2_v0.ts +4 -4
- package/src/theme/versioning/v3_v2.ts +38 -38
- package/dist/ui-palette.css +0 -105
- package/dist/ui-palette.min.css +0 -1
- package/src/css/_comp.test.ts +0 -7
- package/src/css/_comp.ts +0 -11
- package/src/css/_compilePalette.ts +0 -32
- package/src/css/_compileTheme_v3.ts +0 -440
- package/src/css/aspects/flex/flex.style.ts +0 -30
- package/src/css/composeClassNames.ts +0 -19
- package/src/css/primitives/_selectable/__style.ts +0 -117
- package/src/css/primitives/checkbox/__styles.ts +0 -129
- package/src/css/scopeClassName.ts +0 -7
- package/src/css/varNames.ts +0 -607
- package/src/css/vars.ts +0 -520
- package/src/theme/_types.ts +0 -41
- package/src/theme/build/theme.test.ts +0 -27
- package/src/theme/config/tokens/parseTokenKey.test.ts +0 -64
- package/src/theme/config/tokens/parseTokenKey.ts +0 -67
- package/src/theme/v3/buildTheme_v3.test.ts +0 -40
- package/src/theme/v3/color/buildColor_v3.ts +0 -226
- package/src/theme/v3/color/parseColor.test.ts +0 -79
- package/src/theme/v3/color/parseColor.ts +0 -167
- package/src/theme/v3/color/renderColor.test.ts +0 -20
- package/src/theme/v3/color/renderColor.ts +0 -43
- /package/src/{theme/palette → css/prefix}/index.ts +0 -0
- /package/src/theme/{build → v2/build}/_deprecated/color/index.ts +0 -0
- /package/src/theme/{build → v2/build}/colorToken/index.ts +0 -0
- /package/src/theme/{build → v2/build}/index.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/color-fns/blend/index.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/color-fns/index.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/color-fns/rgba.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/color-fns/types.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/isRecord.ts +0 -0
- /package/src/theme/{build → v2/build}/lib/utils.ts +0 -0
- /package/src/theme/{build → v2/build}/merge.ts +0 -0
- /package/src/theme/{config → v2/config}/index.ts +0 -0
- /package/src/theme/{config → v2/config}/tokens/color/index.ts +0 -0
- /package/src/theme/{palette → v3/palette}/constants.ts +0 -0
- /package/src/theme/{palette → v3/palette}/types.ts +0 -0
package/src/css/types.ts
CHANGED
|
@@ -1,442 +1,53 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
AvatarSize,
|
|
4
|
-
ContainerWidth,
|
|
5
|
-
FontCodeSize,
|
|
6
|
-
FontHeadingSize,
|
|
7
|
-
FontLabelSize,
|
|
8
|
-
FontTextSize,
|
|
9
|
-
FontWeight,
|
|
10
|
-
Hue,
|
|
11
|
-
Radius,
|
|
12
|
-
Shadow,
|
|
13
|
-
Space,
|
|
14
|
-
ThemeColorAvatarColorKey as AvatarColor,
|
|
15
|
-
ThemeColorCardToneKey as CardTone,
|
|
16
|
-
ThemeColorSchemeKey as Scheme,
|
|
17
|
-
ThemeColorStateToneKey as ElementTone,
|
|
18
|
-
Tint,
|
|
19
|
-
} from '@sanity/ui/theme'
|
|
20
|
-
import CSS from 'csstype'
|
|
1
|
+
import type CSS from 'csstype'
|
|
21
2
|
|
|
22
3
|
import type {BREAKPOINTS} from './constants'
|
|
4
|
+
import {varNames} from './theme'
|
|
23
5
|
|
|
24
6
|
/** @public */
|
|
25
|
-
export type
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/** @public */
|
|
31
|
-
export type PaletteVarName = `--black` | `--white` | `--${Hue}-${Tint}`
|
|
32
|
-
|
|
33
|
-
/** @public */
|
|
34
|
-
export type ElementColorVariant = 'solid' | 'tinted'
|
|
35
|
-
|
|
36
|
-
/** @public */
|
|
37
|
-
export type ElementColorVariantKey =
|
|
38
|
-
| 'bg-0'
|
|
39
|
-
| 'bg-1'
|
|
40
|
-
| 'bg-2'
|
|
41
|
-
| 'bg-3'
|
|
42
|
-
| 'bg-4'
|
|
43
|
-
| 'border-0'
|
|
44
|
-
| 'border-1'
|
|
45
|
-
| 'border-2'
|
|
46
|
-
| 'border-3'
|
|
47
|
-
| 'border-4'
|
|
48
|
-
| 'fg-0'
|
|
49
|
-
| 'fg-1'
|
|
50
|
-
| 'fg-2'
|
|
51
|
-
| 'fg-3'
|
|
52
|
-
| 'fg-4'
|
|
53
|
-
|
|
54
|
-
/** @public */
|
|
55
|
-
export type ThemeVarName =
|
|
56
|
-
| `--avatar-focus-ring-offset`
|
|
57
|
-
| `--avatar-focus-ring-width`
|
|
58
|
-
| `--avatar-${AvatarSize}-distance`
|
|
59
|
-
| `--avatar-${AvatarSize}-size`
|
|
60
|
-
| `--button-border-width`
|
|
61
|
-
| `--button-focus-ring-offset`
|
|
62
|
-
| `--button-focus-ring-width`
|
|
63
|
-
| `--button-text-weight`
|
|
64
|
-
| `--card-border-width`
|
|
65
|
-
| `--card-focus-ring-offset`
|
|
66
|
-
| `--card-focus-ring-width`
|
|
67
|
-
| `--card-shadow-outline`
|
|
68
|
-
| `--container-${ContainerWidth}`
|
|
69
|
-
| `--font-code-family`
|
|
70
|
-
| `--font-code-feature-settings`
|
|
71
|
-
| `--font-code-weight-${FontWeight}`
|
|
72
|
-
| `--font-code-${FontCodeSize}-ascender-height`
|
|
73
|
-
| `--font-code-${FontCodeSize}-descender-height`
|
|
74
|
-
// | `--font-code-${FontCodeSize}-cap-height`
|
|
75
|
-
| `--font-code-${FontCodeSize}-size`
|
|
76
|
-
| `--font-code-${FontCodeSize}-line-height`
|
|
77
|
-
| `--font-code-${FontCodeSize}-letter-spacing`
|
|
78
|
-
| `--font-code-${FontCodeSize}-icon-size`
|
|
79
|
-
| `--font-heading-family`
|
|
80
|
-
| `--font-heading-feature-settings`
|
|
81
|
-
| `--font-heading-weight-${FontWeight}`
|
|
82
|
-
| `--font-heading-${FontHeadingSize}-ascender-height`
|
|
83
|
-
| `--font-heading-${FontHeadingSize}-descender-height`
|
|
84
|
-
// | `--font-heading-${FontHeadingSize}-cap-height`
|
|
85
|
-
| `--font-heading-${FontHeadingSize}-size`
|
|
86
|
-
| `--font-heading-${FontHeadingSize}-line-height`
|
|
87
|
-
| `--font-heading-${FontHeadingSize}-letter-spacing`
|
|
88
|
-
| `--font-heading-${FontHeadingSize}-icon-size`
|
|
89
|
-
| `--font-label-family`
|
|
90
|
-
| `--font-label-feature-settings`
|
|
91
|
-
| `--font-label-weight-${FontWeight}`
|
|
92
|
-
| `--font-label-${FontLabelSize}-ascender-height`
|
|
93
|
-
| `--font-label-${FontLabelSize}-descender-height`
|
|
94
|
-
// | `--font-label-${FontLabelSize}-cap-height`
|
|
95
|
-
| `--font-label-${FontLabelSize}-size`
|
|
96
|
-
| `--font-label-${FontLabelSize}-line-height`
|
|
97
|
-
| `--font-label-${FontLabelSize}-letter-spacing`
|
|
98
|
-
| `--font-label-${FontLabelSize}-icon-size`
|
|
99
|
-
| `--font-text-family`
|
|
100
|
-
| `--font-text-feature-settings`
|
|
101
|
-
| `--font-text-weight-${FontWeight}`
|
|
102
|
-
| `--font-text-${FontTextSize}-ascender-height`
|
|
103
|
-
| `--font-text-${FontTextSize}-descender-height`
|
|
104
|
-
// | `--font-text-${FontTextSize}-cap-height`
|
|
105
|
-
| `--font-text-${FontTextSize}-size`
|
|
106
|
-
| `--font-text-${FontTextSize}-line-height`
|
|
107
|
-
| `--font-text-${FontTextSize}-letter-spacing`
|
|
108
|
-
| `--font-text-${FontTextSize}-icon-size`
|
|
109
|
-
| `--input-border-width`
|
|
110
|
-
| `--input-box-shadow`
|
|
111
|
-
| `--input-checkbox-focus-ring-offset`
|
|
112
|
-
| `--input-checkbox-focus-ring-width`
|
|
113
|
-
| `--input-checkbox-size`
|
|
114
|
-
| `--input-radio-focus-ring-offset`
|
|
115
|
-
| `--input-radio-focus-ring-width`
|
|
116
|
-
| `--input-radio-mark-size`
|
|
117
|
-
| `--input-radio-size`
|
|
118
|
-
| `--input-select-focus-ring-offset`
|
|
119
|
-
| `--input-select-focus-ring-width`
|
|
120
|
-
| `--input-switch-focus-ring-offset`
|
|
121
|
-
| `--input-switch-focus-ring-width`
|
|
122
|
-
| '--input-switch-width'
|
|
123
|
-
| '--input-switch-height'
|
|
124
|
-
| '--input-switch-padding'
|
|
125
|
-
| '--input-switch-transition-duration-ms'
|
|
126
|
-
| '--input-switch-transition-timing-function'
|
|
127
|
-
| '--input-text-focus-ring-offset'
|
|
128
|
-
| '--input-text-focus-ring-width'
|
|
129
|
-
| '--layer-dialog-z-offset'
|
|
130
|
-
| `--radius-${Radius}`
|
|
131
|
-
| `--space-${Exclude<Space, 0.5> | '0_5'}`
|
|
132
|
-
| `--shadow-${Shadow}-umbra`
|
|
133
|
-
| `--shadow-${Shadow}-penumbra`
|
|
134
|
-
| `--shadow-${Shadow}-ambient`
|
|
135
|
-
|
|
136
|
-
/** @public */
|
|
137
|
-
export type ColorCardVarName =
|
|
138
|
-
| `--color-${Scheme}-${CardTone}-avatar-${AvatarColor}-bg`
|
|
139
|
-
| `--color-${Scheme}-${CardTone}-avatar-${AvatarColor}-fg`
|
|
140
|
-
| `--color-${Scheme}-${CardTone}-backdrop`
|
|
141
|
-
| `--color-${Scheme}-${CardTone}-code-bg`
|
|
142
|
-
| `--color-${Scheme}-${CardTone}-code-fg`
|
|
143
|
-
| `--color-${Scheme}-${CardTone}-code-token-atrule`
|
|
144
|
-
| `--color-${Scheme}-${CardTone}-code-token-attr-name`
|
|
145
|
-
| `--color-${Scheme}-${CardTone}-code-token-attr-value`
|
|
146
|
-
| `--color-${Scheme}-${CardTone}-code-token-attribute`
|
|
147
|
-
| `--color-${Scheme}-${CardTone}-code-token-boolean`
|
|
148
|
-
| `--color-${Scheme}-${CardTone}-code-token-builtin`
|
|
149
|
-
| `--color-${Scheme}-${CardTone}-code-token-cdata`
|
|
150
|
-
| `--color-${Scheme}-${CardTone}-code-token-char`
|
|
151
|
-
| `--color-${Scheme}-${CardTone}-code-token-class`
|
|
152
|
-
| `--color-${Scheme}-${CardTone}-code-token-class-name`
|
|
153
|
-
| `--color-${Scheme}-${CardTone}-code-token-comment`
|
|
154
|
-
| `--color-${Scheme}-${CardTone}-code-token-constant`
|
|
155
|
-
| `--color-${Scheme}-${CardTone}-code-token-deleted`
|
|
156
|
-
| `--color-${Scheme}-${CardTone}-code-token-doctype`
|
|
157
|
-
| `--color-${Scheme}-${CardTone}-code-token-entity`
|
|
158
|
-
| `--color-${Scheme}-${CardTone}-code-token-function`
|
|
159
|
-
| `--color-${Scheme}-${CardTone}-code-token-hexcode`
|
|
160
|
-
| `--color-${Scheme}-${CardTone}-code-token-id`
|
|
161
|
-
| `--color-${Scheme}-${CardTone}-code-token-important`
|
|
162
|
-
| `--color-${Scheme}-${CardTone}-code-token-inserted`
|
|
163
|
-
| `--color-${Scheme}-${CardTone}-code-token-keyword`
|
|
164
|
-
| `--color-${Scheme}-${CardTone}-code-token-number`
|
|
165
|
-
| `--color-${Scheme}-${CardTone}-code-token-operator`
|
|
166
|
-
| `--color-${Scheme}-${CardTone}-code-token-prolog`
|
|
167
|
-
| `--color-${Scheme}-${CardTone}-code-token-property`
|
|
168
|
-
| `--color-${Scheme}-${CardTone}-code-token-pseudo-class`
|
|
169
|
-
| `--color-${Scheme}-${CardTone}-code-token-pseudo-element`
|
|
170
|
-
| `--color-${Scheme}-${CardTone}-code-token-punctuation`
|
|
171
|
-
| `--color-${Scheme}-${CardTone}-code-token-regex`
|
|
172
|
-
| `--color-${Scheme}-${CardTone}-code-token-selector`
|
|
173
|
-
| `--color-${Scheme}-${CardTone}-code-token-string`
|
|
174
|
-
| `--color-${Scheme}-${CardTone}-code-token-symbol`
|
|
175
|
-
| `--color-${Scheme}-${CardTone}-code-token-tag`
|
|
176
|
-
| `--color-${Scheme}-${CardTone}-code-token-unit`
|
|
177
|
-
| `--color-${Scheme}-${CardTone}-code-token-url`
|
|
178
|
-
| `--color-${Scheme}-${CardTone}-code-token-variable`
|
|
179
|
-
| `--color-${Scheme}-${CardTone}-focus-ring`
|
|
180
|
-
| `--color-${Scheme}-${CardTone}-link-fg`
|
|
181
|
-
| `--color-${Scheme}-${CardTone}-muted-bg`
|
|
182
|
-
| `--color-${Scheme}-${CardTone}-muted-fg`
|
|
183
|
-
| `--color-${Scheme}-${CardTone}-${ElementColorVariant}-${ElementTone}-${ElementColorVariantKey}`
|
|
184
|
-
| `--color-${Scheme}-${CardTone}-shadow-outline`
|
|
185
|
-
| `--color-${Scheme}-${CardTone}-shadow-umbra`
|
|
186
|
-
| `--color-${Scheme}-${CardTone}-shadow-penumbra`
|
|
187
|
-
| `--color-${Scheme}-${CardTone}-shadow-ambient`
|
|
188
|
-
| `--color-${Scheme}-${CardTone}-skeleton-from`
|
|
189
|
-
| `--color-${Scheme}-${CardTone}-skeleton-to`
|
|
7
|
+
export type ExtractStringValues<T> = T extends string
|
|
8
|
+
? T
|
|
9
|
+
: T extends object
|
|
10
|
+
? ExtractStringValues<T[keyof T]>
|
|
11
|
+
: never
|
|
190
12
|
|
|
191
13
|
/** @public */
|
|
192
|
-
export type
|
|
193
|
-
| `--color-${CardTone}-avatar-${AvatarColor}-bg`
|
|
194
|
-
| `--color-${CardTone}-avatar-${AvatarColor}-fg`
|
|
195
|
-
| `--color-${CardTone}-backdrop`
|
|
196
|
-
| `--color-${CardTone}-code-bg`
|
|
197
|
-
| `--color-${CardTone}-code-fg`
|
|
198
|
-
| `--color-${CardTone}-code-token-atrule`
|
|
199
|
-
| `--color-${CardTone}-code-token-attr-name`
|
|
200
|
-
| `--color-${CardTone}-code-token-attr-value`
|
|
201
|
-
| `--color-${CardTone}-code-token-attribute`
|
|
202
|
-
| `--color-${CardTone}-code-token-boolean`
|
|
203
|
-
| `--color-${CardTone}-code-token-builtin`
|
|
204
|
-
| `--color-${CardTone}-code-token-cdata`
|
|
205
|
-
| `--color-${CardTone}-code-token-char`
|
|
206
|
-
| `--color-${CardTone}-code-token-class`
|
|
207
|
-
| `--color-${CardTone}-code-token-class-name`
|
|
208
|
-
| `--color-${CardTone}-code-token-comment`
|
|
209
|
-
| `--color-${CardTone}-code-token-constant`
|
|
210
|
-
| `--color-${CardTone}-code-token-deleted`
|
|
211
|
-
| `--color-${CardTone}-code-token-doctype`
|
|
212
|
-
| `--color-${CardTone}-code-token-entity`
|
|
213
|
-
| `--color-${CardTone}-code-token-function`
|
|
214
|
-
| `--color-${CardTone}-code-token-hexcode`
|
|
215
|
-
| `--color-${CardTone}-code-token-id`
|
|
216
|
-
| `--color-${CardTone}-code-token-important`
|
|
217
|
-
| `--color-${CardTone}-code-token-inserted`
|
|
218
|
-
| `--color-${CardTone}-code-token-keyword`
|
|
219
|
-
| `--color-${CardTone}-code-token-number`
|
|
220
|
-
| `--color-${CardTone}-code-token-operator`
|
|
221
|
-
| `--color-${CardTone}-code-token-prolog`
|
|
222
|
-
| `--color-${CardTone}-code-token-property`
|
|
223
|
-
| `--color-${CardTone}-code-token-pseudo-class`
|
|
224
|
-
| `--color-${CardTone}-code-token-pseudo-element`
|
|
225
|
-
| `--color-${CardTone}-code-token-punctuation`
|
|
226
|
-
| `--color-${CardTone}-code-token-regex`
|
|
227
|
-
| `--color-${CardTone}-code-token-selector`
|
|
228
|
-
| `--color-${CardTone}-code-token-string`
|
|
229
|
-
| `--color-${CardTone}-code-token-symbol`
|
|
230
|
-
| `--color-${CardTone}-code-token-tag`
|
|
231
|
-
| `--color-${CardTone}-code-token-unit`
|
|
232
|
-
| `--color-${CardTone}-code-token-url`
|
|
233
|
-
| `--color-${CardTone}-code-token-variable`
|
|
234
|
-
| `--color-${CardTone}-focus-ring`
|
|
235
|
-
| `--color-${CardTone}-link-fg`
|
|
236
|
-
| `--color-${CardTone}-muted-bg`
|
|
237
|
-
| `--color-${CardTone}-muted-fg`
|
|
238
|
-
| `--color-${CardTone}-${ElementColorVariant}-${ElementTone}-${ElementColorVariantKey}`
|
|
239
|
-
| `--color-${CardTone}-shadow-outline`
|
|
240
|
-
| `--color-${CardTone}-shadow-umbra`
|
|
241
|
-
| `--color-${CardTone}-shadow-penumbra`
|
|
242
|
-
| `--color-${CardTone}-shadow-ambient`
|
|
243
|
-
| `--color-${CardTone}-skeleton-from`
|
|
244
|
-
| `--color-${CardTone}-skeleton-to`
|
|
14
|
+
export type VarNames = typeof varNames
|
|
245
15
|
|
|
246
16
|
/** @public */
|
|
247
|
-
export type
|
|
248
|
-
| `--color-avatar-bg`
|
|
249
|
-
| `--color-avatar-fg`
|
|
250
|
-
| `--color-avatar-${AvatarColor}-bg`
|
|
251
|
-
| `--color-avatar-${AvatarColor}-fg`
|
|
252
|
-
| `--color-backdrop`
|
|
253
|
-
| `--color-${ElementColorVariant}-${ElementTone}-${ElementColorVariantKey}`
|
|
254
|
-
| `--color-bg`
|
|
255
|
-
| `--color-border`
|
|
256
|
-
| `--color-code-bg`
|
|
257
|
-
| `--color-code-fg`
|
|
258
|
-
| `--color-code-token-atrule`
|
|
259
|
-
| `--color-code-token-attr-name`
|
|
260
|
-
| `--color-code-token-attr-value`
|
|
261
|
-
| `--color-code-token-attribute`
|
|
262
|
-
| `--color-code-token-boolean`
|
|
263
|
-
| `--color-code-token-builtin`
|
|
264
|
-
| `--color-code-token-cdata`
|
|
265
|
-
| `--color-code-token-char`
|
|
266
|
-
| `--color-code-token-class`
|
|
267
|
-
| `--color-code-token-class-name`
|
|
268
|
-
| `--color-code-token-comment`
|
|
269
|
-
| `--color-code-token-constant`
|
|
270
|
-
| `--color-code-token-deleted`
|
|
271
|
-
| `--color-code-token-doctype`
|
|
272
|
-
| `--color-code-token-entity`
|
|
273
|
-
| `--color-code-token-function`
|
|
274
|
-
| `--color-code-token-hexcode`
|
|
275
|
-
| `--color-code-token-id`
|
|
276
|
-
| `--color-code-token-important`
|
|
277
|
-
| `--color-code-token-inserted`
|
|
278
|
-
| `--color-code-token-keyword`
|
|
279
|
-
| `--color-code-token-number`
|
|
280
|
-
| `--color-code-token-operator`
|
|
281
|
-
| `--color-code-token-prolog`
|
|
282
|
-
| `--color-code-token-property`
|
|
283
|
-
| `--color-code-token-pseudo-class`
|
|
284
|
-
| `--color-code-token-pseudo-element`
|
|
285
|
-
| `--color-code-token-punctuation`
|
|
286
|
-
| `--color-code-token-regex`
|
|
287
|
-
| `--color-code-token-selector`
|
|
288
|
-
| `--color-code-token-string`
|
|
289
|
-
| `--color-code-token-symbol`
|
|
290
|
-
| `--color-code-token-tag`
|
|
291
|
-
| `--color-code-token-unit`
|
|
292
|
-
| `--color-code-token-url`
|
|
293
|
-
| `--color-code-token-variable`
|
|
294
|
-
| `--color-fg`
|
|
295
|
-
| `--color-focus-ring`
|
|
296
|
-
| `--color-link-fg`
|
|
297
|
-
| `--color-muted-bg`
|
|
298
|
-
| `--color-muted-fg`
|
|
299
|
-
| `--color-shadow-outline`
|
|
300
|
-
| `--color-shadow-umbra`
|
|
301
|
-
| `--color-shadow-penumbra`
|
|
302
|
-
| `--color-shadow-ambient`
|
|
303
|
-
| `--color-skeleton-from`
|
|
304
|
-
| `--color-skeleton-to`
|
|
305
|
-
// todo
|
|
306
|
-
| `--color-checkbox-bg`
|
|
307
|
-
| `--color-checkbox-fg`
|
|
308
|
-
| `--color-checkbox-border`
|
|
309
|
-
| `--font-ascender-height`
|
|
310
|
-
// | `--font-cap-height`
|
|
311
|
-
| `--font-descender-height`
|
|
312
|
-
| `--font-family`
|
|
313
|
-
| `--font-feature-settings`
|
|
314
|
-
| `--font-icon-offset`
|
|
315
|
-
| `--font-icon-size`
|
|
316
|
-
| `--font-letter-spacing`
|
|
317
|
-
| `--font-line-height`
|
|
318
|
-
| `--font-size`
|
|
319
|
-
| `--font-skeleton-line-height`
|
|
320
|
-
| `--font-skeleton-ascender-height`
|
|
321
|
-
| `--font-skeleton-descender-height`
|
|
322
|
-
| `--font-weight-regular`
|
|
323
|
-
| `--font-weight-medium`
|
|
324
|
-
| `--font-weight-semibold`
|
|
325
|
-
| `--font-weight-bold`
|
|
326
|
-
| `--font-weight`
|
|
327
|
-
| `--fg-color`
|
|
328
|
-
| `--padding-top`
|
|
329
|
-
| `--padding-right`
|
|
330
|
-
| `--padding-bottom`
|
|
331
|
-
| `--padding-left`
|
|
17
|
+
export type VarName = ExtractStringValues<VarNames>
|
|
332
18
|
|
|
333
19
|
/** @public */
|
|
334
|
-
export type
|
|
335
|
-
| `--avatar-bg-color`
|
|
336
|
-
| `--avatar-fg-color`
|
|
337
|
-
| `--avatar-distance`
|
|
338
|
-
| `--avatar-size`
|
|
339
|
-
|
|
340
|
-
/** @public */
|
|
341
|
-
export type LegacyCardScopedVarName =
|
|
342
|
-
// legacy
|
|
343
|
-
| `--card-accent-fg-color`
|
|
344
|
-
| `--card-avatar-${AvatarColor}-bg-color`
|
|
345
|
-
| `--card-avatar-${AvatarColor}-fg-color`
|
|
346
|
-
| `--card-backdrop-color`
|
|
347
|
-
| `--card-badge-${ElementTone}-bg-color`
|
|
348
|
-
| `--card-badge-${ElementTone}-dot-color`
|
|
349
|
-
| `--card-badge-${ElementTone}-fg-color`
|
|
350
|
-
| `--card-badge-${ElementTone}-icon-color`
|
|
351
|
-
| `--card-bg-color`
|
|
352
|
-
| `--card-bg-image`
|
|
353
|
-
| `--card-bg2-color`
|
|
354
|
-
| `--card-border-color`
|
|
355
|
-
| `--card-code-bg-color`
|
|
356
|
-
| `--card-code-fg-color`
|
|
357
|
-
| `--card-fg-color`
|
|
358
|
-
| `--card-focus-ring-color`
|
|
359
|
-
| `--card-hairline-soft-color`
|
|
360
|
-
| `--card-hairline-hard-color`
|
|
361
|
-
| `--card-icon-color`
|
|
362
|
-
| `--card-kbd-bg-color`
|
|
363
|
-
| `--card-kbd-border-color`
|
|
364
|
-
| `--card-kbd-fg-color`
|
|
365
|
-
| `--card-link-color`
|
|
366
|
-
| `--card-link-fg-color`
|
|
367
|
-
| `--card-muted-bg-color`
|
|
368
|
-
| `--card-muted-fg-color`
|
|
369
|
-
| `--card-shadow-outline-color`
|
|
370
|
-
| `--card-shadow-umbra-color`
|
|
371
|
-
| `--card-shadow-penumbra-color`
|
|
372
|
-
| `--card-shadow-ambient-color`
|
|
373
|
-
| `--card-skeleton-from-color`
|
|
374
|
-
| `--card-skeleton-to-color`
|
|
375
|
-
|
|
376
|
-
/** @public */
|
|
377
|
-
export type ElementColorVariantScopedVarName =
|
|
378
|
-
`--color-${ElementColorVariant}-${ElementColorVariantKey}`
|
|
379
|
-
|
|
380
|
-
/** @public */
|
|
381
|
-
export type ButtonScopedVarName = '--button-box-shadow'
|
|
20
|
+
export type Breakpoint = keyof typeof BREAKPOINTS
|
|
382
21
|
|
|
383
22
|
/** @public */
|
|
384
|
-
export type
|
|
385
|
-
| `--color-input-bg`
|
|
386
|
-
| `--color-input-border`
|
|
387
|
-
| `--color-input-fg`
|
|
388
|
-
| `--color-input-placeholder`
|
|
389
|
-
| `--input-ascender-height`
|
|
390
|
-
| `--input-descender-height`
|
|
391
|
-
// | `--input-cap-height`
|
|
392
|
-
| `--input-font-size`
|
|
393
|
-
| `--input-gap`
|
|
394
|
-
| `--input-letter-spacing`
|
|
395
|
-
| `--input-line-height`
|
|
396
|
-
| `--input-padding`
|
|
23
|
+
export type ResponsiveProp<T> = T | Array<T | null | undefined>
|
|
397
24
|
|
|
398
25
|
/** @public */
|
|
399
|
-
export
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
| '--switch-thumb-offset'
|
|
403
|
-
| '--switch-thumb-size'
|
|
26
|
+
export interface Rules {
|
|
27
|
+
[className: string]: Properties
|
|
28
|
+
}
|
|
404
29
|
|
|
405
30
|
/** @public */
|
|
406
|
-
export
|
|
407
|
-
|
|
|
408
|
-
|
|
409
|
-
| PaletteVarName
|
|
410
|
-
| ThemeVarName
|
|
411
|
-
| ColorCardVarName
|
|
412
|
-
// scoped var names
|
|
413
|
-
| ButtonScopedVarName
|
|
414
|
-
| ColorCardToneScopedVarName
|
|
415
|
-
| CardScopedVarName
|
|
416
|
-
| ElementColorVariantScopedVarName
|
|
417
|
-
| InputScopedVarName
|
|
418
|
-
| SwitchScopedVarName
|
|
31
|
+
export interface CustomCSSProperties {
|
|
32
|
+
[key: VarName]: string | number
|
|
33
|
+
}
|
|
419
34
|
|
|
420
35
|
/** @public */
|
|
421
|
-
export
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
36
|
+
export interface BaseProperties extends CSS.Properties {
|
|
37
|
+
_prefix?: boolean
|
|
38
|
+
vars?: Partial<CustomCSSProperties>
|
|
39
|
+
}
|
|
425
40
|
|
|
426
41
|
/** @public */
|
|
427
|
-
export
|
|
428
|
-
|
|
42
|
+
export interface PropertiesWithVarsAndNested extends BaseProperties {
|
|
43
|
+
nest?: Record<string, BaseProperties>
|
|
429
44
|
}
|
|
430
45
|
|
|
431
46
|
/** @public */
|
|
432
|
-
export
|
|
47
|
+
export interface Properties extends PropertiesWithVarsAndNested {
|
|
433
48
|
'@media'?: Record<string, PropertiesWithVarsAndNested>
|
|
434
49
|
}
|
|
435
50
|
|
|
436
|
-
/** @public */
|
|
437
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
438
|
-
export interface CustomCSSProperties extends Record<VarName, string> {}
|
|
439
|
-
|
|
440
51
|
/** @public */
|
|
441
52
|
export type StyleSelector = `.${string}` | `#${string}` | `:root`
|
|
442
53
|
|
|
@@ -450,508 +61,8 @@ export type StyleKeyframes = Record<string, Record<string, Properties>>
|
|
|
450
61
|
export type StyleLayers = Record<string, StyleRules>
|
|
451
62
|
|
|
452
63
|
/** @public */
|
|
453
|
-
export
|
|
454
|
-
// todo
|
|
455
|
-
// containers?: StyleContainers
|
|
64
|
+
export interface Style {
|
|
456
65
|
keyframes?: StyleKeyframes
|
|
457
66
|
layers?: StyleLayers
|
|
458
67
|
rules?: StyleRules
|
|
459
68
|
}
|
|
460
|
-
|
|
461
|
-
// /** @public */
|
|
462
|
-
// export interface Properties extends CSS.PropertiesFallback, Partial<CustomCSSProperties> {
|
|
463
|
-
// '@keyframes'?: Record<string, Record<string, Properties>>
|
|
464
|
-
// '@media'?: Record<string, Properties>
|
|
465
|
-
// '@nest'?: Record<string, Properties>
|
|
466
|
-
// }
|
|
467
|
-
|
|
468
|
-
/** @public */
|
|
469
|
-
export interface Rules {
|
|
470
|
-
[className: string]: Properties
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/** @public */
|
|
474
|
-
export type CSSVar = `var(${VarName})`
|
|
475
|
-
|
|
476
|
-
/** @public */
|
|
477
|
-
export interface ColorAvatarColorVarNames {
|
|
478
|
-
bg: VarName
|
|
479
|
-
fg: VarName
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
/** @public */
|
|
483
|
-
export interface ColorElementVarNames {
|
|
484
|
-
bg: {
|
|
485
|
-
0: VarName
|
|
486
|
-
1: VarName
|
|
487
|
-
2: VarName
|
|
488
|
-
3: VarName
|
|
489
|
-
4: VarName
|
|
490
|
-
}
|
|
491
|
-
border: {
|
|
492
|
-
0: VarName
|
|
493
|
-
1: VarName
|
|
494
|
-
2: VarName
|
|
495
|
-
3: VarName
|
|
496
|
-
4: VarName
|
|
497
|
-
}
|
|
498
|
-
fg: {
|
|
499
|
-
0: VarName
|
|
500
|
-
1: VarName
|
|
501
|
-
2: VarName
|
|
502
|
-
3: VarName
|
|
503
|
-
4: VarName
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
/** @public */
|
|
508
|
-
export interface ColorVariantVarNames
|
|
509
|
-
extends ColorElementVarNames,
|
|
510
|
-
Record<ElementTone, ColorElementVarNames> {}
|
|
511
|
-
|
|
512
|
-
/** @public */
|
|
513
|
-
export interface ColorCardVarNames {
|
|
514
|
-
avatar: Record<AvatarColor, ColorAvatarColorVarNames>
|
|
515
|
-
backdrop: VarName
|
|
516
|
-
code: {
|
|
517
|
-
bg: VarName
|
|
518
|
-
fg: VarName
|
|
519
|
-
|
|
520
|
-
token: {
|
|
521
|
-
atrule: VarName
|
|
522
|
-
attrName: VarName
|
|
523
|
-
attrValue: VarName
|
|
524
|
-
attribute: VarName
|
|
525
|
-
boolean: VarName
|
|
526
|
-
builtin: VarName
|
|
527
|
-
cdata: VarName
|
|
528
|
-
char: VarName
|
|
529
|
-
class: VarName
|
|
530
|
-
className: VarName
|
|
531
|
-
comment: VarName
|
|
532
|
-
constant: VarName
|
|
533
|
-
deleted: VarName
|
|
534
|
-
doctype: VarName
|
|
535
|
-
entity: VarName
|
|
536
|
-
function: VarName
|
|
537
|
-
hexcode: VarName
|
|
538
|
-
id: VarName
|
|
539
|
-
important: VarName
|
|
540
|
-
inserted: VarName
|
|
541
|
-
keyword: VarName
|
|
542
|
-
number: VarName
|
|
543
|
-
operator: VarName
|
|
544
|
-
prolog: VarName
|
|
545
|
-
property: VarName
|
|
546
|
-
pseudoClass: VarName
|
|
547
|
-
pseudoElement: VarName
|
|
548
|
-
punctuation: VarName
|
|
549
|
-
regex: VarName
|
|
550
|
-
selector: VarName
|
|
551
|
-
string: VarName
|
|
552
|
-
symbol: VarName
|
|
553
|
-
tag: VarName
|
|
554
|
-
unit: VarName
|
|
555
|
-
url: VarName
|
|
556
|
-
variable: VarName
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
focusRing: VarName
|
|
560
|
-
link: {
|
|
561
|
-
fg: VarName
|
|
562
|
-
}
|
|
563
|
-
muted: {
|
|
564
|
-
bg: VarName
|
|
565
|
-
fg: VarName
|
|
566
|
-
}
|
|
567
|
-
shadow: {
|
|
568
|
-
outline: VarName
|
|
569
|
-
umbra: VarName
|
|
570
|
-
penumbra: VarName
|
|
571
|
-
ambient: VarName
|
|
572
|
-
}
|
|
573
|
-
skeleton: {
|
|
574
|
-
from: VarName
|
|
575
|
-
to: VarName
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
solid: ColorVariantVarNames
|
|
579
|
-
tinted: ColorVariantVarNames
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
/** @public */
|
|
583
|
-
export type ColorSchemeVarNames = Record<CardTone, ColorCardVarNames>
|
|
584
|
-
|
|
585
|
-
/** @public */
|
|
586
|
-
export interface ScopedColorVarNames extends Omit<ColorCardVarNames, 'avatar'> {
|
|
587
|
-
avatar: Record<AvatarColor, ColorAvatarColorVarNames> & ColorAvatarColorVarNames
|
|
588
|
-
bg: VarName
|
|
589
|
-
border: VarName
|
|
590
|
-
fg: VarName
|
|
591
|
-
input: {
|
|
592
|
-
bg: VarName
|
|
593
|
-
border: VarName
|
|
594
|
-
fg: VarName
|
|
595
|
-
placeholder: VarName
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
/** @public */
|
|
600
|
-
export interface FontSizeVarNames {
|
|
601
|
-
ascenderHeight: VarName
|
|
602
|
-
descenderHeight: VarName
|
|
603
|
-
fontSize: VarName
|
|
604
|
-
lineHeight: VarName
|
|
605
|
-
letterSpacing: VarName
|
|
606
|
-
iconSize: VarName
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
/** @public */
|
|
610
|
-
export interface FontVarNames<Size extends number> {
|
|
611
|
-
family: VarName
|
|
612
|
-
featureSettings: VarName
|
|
613
|
-
sizes: Record<Size, FontSizeVarNames>
|
|
614
|
-
weights: Record<FontWeight, VarName>
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
/** @public */
|
|
618
|
-
export interface VarNames {
|
|
619
|
-
avatar: {
|
|
620
|
-
distance: VarName
|
|
621
|
-
focusRing: {
|
|
622
|
-
offset: VarName
|
|
623
|
-
width: VarName
|
|
624
|
-
}
|
|
625
|
-
size: VarName
|
|
626
|
-
sizes: Record<AvatarSize, {distance: VarName; size: VarName}>
|
|
627
|
-
}
|
|
628
|
-
button: {
|
|
629
|
-
border: {
|
|
630
|
-
width: VarName
|
|
631
|
-
}
|
|
632
|
-
focusRing: {
|
|
633
|
-
offset: VarName
|
|
634
|
-
width: VarName
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
card: {
|
|
638
|
-
shadow: {
|
|
639
|
-
outline: VarName
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
color: Record<Scheme, ColorSchemeVarNames> &
|
|
643
|
-
ScopedColorVarNames &
|
|
644
|
-
Record<CardTone, ColorCardVarNames>
|
|
645
|
-
container: Record<Exclude<ContainerWidth, 'auto'>, VarName>
|
|
646
|
-
font: {
|
|
647
|
-
code: FontVarNames<FontCodeSize>
|
|
648
|
-
heading: FontVarNames<FontHeadingSize>
|
|
649
|
-
label: FontVarNames<FontLabelSize>
|
|
650
|
-
text: FontVarNames<FontTextSize>
|
|
651
|
-
}
|
|
652
|
-
input: {
|
|
653
|
-
border: {
|
|
654
|
-
width: VarName
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
checkbox: {
|
|
658
|
-
focusRing: {
|
|
659
|
-
offset: VarName
|
|
660
|
-
width: VarName
|
|
661
|
-
}
|
|
662
|
-
size: VarName
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
radio: {
|
|
666
|
-
focusRing: {
|
|
667
|
-
offset: VarName
|
|
668
|
-
width: VarName
|
|
669
|
-
}
|
|
670
|
-
markSize: VarName
|
|
671
|
-
size: VarName
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
select: {
|
|
675
|
-
focusRing: {
|
|
676
|
-
offset: VarName
|
|
677
|
-
width: VarName
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
switch: {
|
|
682
|
-
focusRing: {
|
|
683
|
-
offset: VarName
|
|
684
|
-
width: VarName
|
|
685
|
-
}
|
|
686
|
-
height: VarName
|
|
687
|
-
padding: VarName
|
|
688
|
-
|
|
689
|
-
transitionDurationMs: VarName
|
|
690
|
-
transitionTimingFunction: VarName
|
|
691
|
-
width: VarName
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
text: {
|
|
695
|
-
focusRing: {
|
|
696
|
-
offset: VarName
|
|
697
|
-
width: VarName
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
fontSize: VarName
|
|
702
|
-
lineHeight: VarName
|
|
703
|
-
letterSpacing: VarName
|
|
704
|
-
ascenderHeight: VarName
|
|
705
|
-
descenderHeight: VarName
|
|
706
|
-
gap: VarName
|
|
707
|
-
padding: VarName
|
|
708
|
-
}
|
|
709
|
-
radius: Record<Radius, VarName>
|
|
710
|
-
shadow: Record<
|
|
711
|
-
Shadow,
|
|
712
|
-
{
|
|
713
|
-
umbra: VarName
|
|
714
|
-
penumbra: VarName
|
|
715
|
-
ambient: VarName
|
|
716
|
-
}
|
|
717
|
-
>
|
|
718
|
-
space: Record<Space, VarName>
|
|
719
|
-
|
|
720
|
-
// color
|
|
721
|
-
black: VarName
|
|
722
|
-
white: VarName
|
|
723
|
-
gray: Record<ColorTintKey, VarName>
|
|
724
|
-
blue: Record<ColorTintKey, VarName>
|
|
725
|
-
purple: Record<ColorTintKey, VarName>
|
|
726
|
-
magenta: Record<ColorTintKey, VarName>
|
|
727
|
-
red: Record<ColorTintKey, VarName>
|
|
728
|
-
orange: Record<ColorTintKey, VarName>
|
|
729
|
-
yellow: Record<ColorTintKey, VarName>
|
|
730
|
-
green: Record<ColorTintKey, VarName>
|
|
731
|
-
cyan: Record<ColorTintKey, VarName>
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
/** @public */
|
|
735
|
-
export interface ColorInputStateVars {
|
|
736
|
-
bg: CSSVar
|
|
737
|
-
border: CSSVar
|
|
738
|
-
fg: CSSVar
|
|
739
|
-
muted: {
|
|
740
|
-
bg: CSSVar
|
|
741
|
-
}
|
|
742
|
-
placeholder: CSSVar
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
/** @public */
|
|
746
|
-
export interface ColorElementVars {
|
|
747
|
-
bg: {
|
|
748
|
-
0: CSSVar
|
|
749
|
-
1: CSSVar
|
|
750
|
-
2: CSSVar
|
|
751
|
-
3: CSSVar
|
|
752
|
-
4: CSSVar
|
|
753
|
-
}
|
|
754
|
-
border: {
|
|
755
|
-
0: CSSVar
|
|
756
|
-
1: CSSVar
|
|
757
|
-
2: CSSVar
|
|
758
|
-
3: CSSVar
|
|
759
|
-
4: CSSVar
|
|
760
|
-
}
|
|
761
|
-
fg: {
|
|
762
|
-
0: CSSVar
|
|
763
|
-
1: CSSVar
|
|
764
|
-
2: CSSVar
|
|
765
|
-
3: CSSVar
|
|
766
|
-
4: CSSVar
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
/** @public */
|
|
771
|
-
export interface ColorVariantVars extends Record<ElementTone, ColorElementVars>, ColorElementVars {}
|
|
772
|
-
|
|
773
|
-
/** @public */
|
|
774
|
-
export interface ColorCardVars {
|
|
775
|
-
avatar: ColorAvatarVars
|
|
776
|
-
backdrop: CSSVar
|
|
777
|
-
code: {
|
|
778
|
-
bg: CSSVar
|
|
779
|
-
fg: CSSVar
|
|
780
|
-
|
|
781
|
-
token: {
|
|
782
|
-
atrule: CSSVar
|
|
783
|
-
attrName: CSSVar
|
|
784
|
-
attrValue: CSSVar
|
|
785
|
-
attribute: CSSVar
|
|
786
|
-
boolean: CSSVar
|
|
787
|
-
builtin: CSSVar
|
|
788
|
-
cdata: CSSVar
|
|
789
|
-
char: CSSVar
|
|
790
|
-
class: CSSVar
|
|
791
|
-
className: CSSVar
|
|
792
|
-
comment: CSSVar
|
|
793
|
-
constant: CSSVar
|
|
794
|
-
deleted: CSSVar
|
|
795
|
-
doctype: CSSVar
|
|
796
|
-
entity: CSSVar
|
|
797
|
-
function: CSSVar
|
|
798
|
-
hexcode: CSSVar
|
|
799
|
-
id: CSSVar
|
|
800
|
-
important: CSSVar
|
|
801
|
-
inserted: CSSVar
|
|
802
|
-
keyword: CSSVar
|
|
803
|
-
number: CSSVar
|
|
804
|
-
operator: CSSVar
|
|
805
|
-
prolog: CSSVar
|
|
806
|
-
property: CSSVar
|
|
807
|
-
pseudoClass: CSSVar
|
|
808
|
-
pseudoElement: CSSVar
|
|
809
|
-
punctuation: CSSVar
|
|
810
|
-
regex: CSSVar
|
|
811
|
-
selector: CSSVar
|
|
812
|
-
string: CSSVar
|
|
813
|
-
symbol: CSSVar
|
|
814
|
-
tag: CSSVar
|
|
815
|
-
unit: CSSVar
|
|
816
|
-
url: CSSVar
|
|
817
|
-
variable: CSSVar
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
focusRing: CSSVar
|
|
821
|
-
link: {
|
|
822
|
-
fg: CSSVar
|
|
823
|
-
}
|
|
824
|
-
muted: {
|
|
825
|
-
bg: CSSVar
|
|
826
|
-
fg: CSSVar
|
|
827
|
-
}
|
|
828
|
-
shadow: {
|
|
829
|
-
outline: CSSVar
|
|
830
|
-
umbra: CSSVar
|
|
831
|
-
penumbra: CSSVar
|
|
832
|
-
ambient: CSSVar
|
|
833
|
-
}
|
|
834
|
-
skeleton: {
|
|
835
|
-
from: CSSVar
|
|
836
|
-
to: CSSVar
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
solid: ColorVariantVars
|
|
840
|
-
tinted: ColorVariantVars
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
/** @public */
|
|
844
|
-
export interface ColorBadgeToneVars {
|
|
845
|
-
bg: CSSVar
|
|
846
|
-
dot: CSSVar
|
|
847
|
-
fg: CSSVar
|
|
848
|
-
icon: CSSVar
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
/** @public */
|
|
852
|
-
export type ColorBadgeVars = Record<ElementTone, ColorBadgeToneVars>
|
|
853
|
-
|
|
854
|
-
/** @public */
|
|
855
|
-
export type ColorAvatarVars = Record<AvatarColor, ColorAvatarColorVars>
|
|
856
|
-
|
|
857
|
-
/** @public */
|
|
858
|
-
export interface ColorAvatarColorVars {
|
|
859
|
-
bg: CSSVar
|
|
860
|
-
fg: CSSVar
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
/** @public */
|
|
864
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
865
|
-
export interface ColorSchemeVars extends Record<CardTone, ColorCardVars> {}
|
|
866
|
-
|
|
867
|
-
/** @public */
|
|
868
|
-
export interface ScopedColorVars extends Omit<ColorCardVars, 'avatar'> {
|
|
869
|
-
avatar: ColorAvatarVars & ColorAvatarColorVars
|
|
870
|
-
bg: CSSVar
|
|
871
|
-
border: CSSVar
|
|
872
|
-
fg: CSSVar
|
|
873
|
-
input: {
|
|
874
|
-
bg: CSSVar
|
|
875
|
-
border: CSSVar
|
|
876
|
-
fg: CSSVar
|
|
877
|
-
placeholder: CSSVar
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
/** @public */
|
|
882
|
-
export interface FontSizeVars {
|
|
883
|
-
ascenderHeight: CSSVar
|
|
884
|
-
descenderHeight: CSSVar
|
|
885
|
-
fontSize: CSSVar
|
|
886
|
-
lineHeight: CSSVar
|
|
887
|
-
letterSpacing: CSSVar
|
|
888
|
-
iconSize: CSSVar
|
|
889
|
-
// capHeight: CSSVar
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
/** @public */
|
|
893
|
-
export interface FontVars<Size extends number> {
|
|
894
|
-
family: CSSVar
|
|
895
|
-
sizes: Record<Size, FontSizeVars>
|
|
896
|
-
weight: Record<FontWeight, CSSVar>
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
/** @public */
|
|
900
|
-
export interface Vars {
|
|
901
|
-
avatar: {
|
|
902
|
-
distance: CSSVar
|
|
903
|
-
size: CSSVar
|
|
904
|
-
sizes: Record<AvatarSize, {distance: CSSVar; size: CSSVar}>
|
|
905
|
-
}
|
|
906
|
-
card: {
|
|
907
|
-
shadow: {
|
|
908
|
-
outline: CSSVar
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
color: {
|
|
912
|
-
dark: ColorSchemeVars
|
|
913
|
-
light: ColorSchemeVars
|
|
914
|
-
} & ScopedColorVars &
|
|
915
|
-
Record<CardTone, ColorCardVars>
|
|
916
|
-
container: Record<Exclude<ContainerWidth, 'auto'>, CSSVar>
|
|
917
|
-
font: {
|
|
918
|
-
code: FontVars<FontCodeSize>
|
|
919
|
-
heading: FontVars<FontHeadingSize>
|
|
920
|
-
label: FontVars<FontLabelSize>
|
|
921
|
-
text: FontVars<FontTextSize>
|
|
922
|
-
}
|
|
923
|
-
input: {
|
|
924
|
-
fontSize: CSSVar
|
|
925
|
-
lineHeight: CSSVar
|
|
926
|
-
letterSpacing: CSSVar
|
|
927
|
-
ascenderHeight: CSSVar
|
|
928
|
-
descenderHeight: CSSVar
|
|
929
|
-
// capHeight: CSSVar
|
|
930
|
-
|
|
931
|
-
gap: CSSVar
|
|
932
|
-
padding: CSSVar
|
|
933
|
-
|
|
934
|
-
text: {
|
|
935
|
-
focusRing: {
|
|
936
|
-
offset: CSSVar
|
|
937
|
-
width: CSSVar
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
radius: Record<Radius, CSSVar>
|
|
942
|
-
shadow: Record<Shadow, {umbra: CSSVar; penumbra: CSSVar; ambient: CSSVar}>
|
|
943
|
-
space: Record<Space, CSSVar>
|
|
944
|
-
|
|
945
|
-
// color
|
|
946
|
-
black: CSSVar
|
|
947
|
-
white: CSSVar
|
|
948
|
-
gray: Record<ColorTintKey, CSSVar>
|
|
949
|
-
blue: Record<ColorTintKey, CSSVar>
|
|
950
|
-
purple: Record<ColorTintKey, CSSVar>
|
|
951
|
-
magenta: Record<ColorTintKey, CSSVar>
|
|
952
|
-
red: Record<ColorTintKey, CSSVar>
|
|
953
|
-
orange: Record<ColorTintKey, CSSVar>
|
|
954
|
-
yellow: Record<ColorTintKey, CSSVar>
|
|
955
|
-
green: Record<ColorTintKey, CSSVar>
|
|
956
|
-
cyan: Record<ColorTintKey, CSSVar>
|
|
957
|
-
}
|