@sanity/ui 3.0.0-static.17 → 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 +138 -137
- 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 +139 -138
- 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 -2016
- package/dist/css.cjs.map +1 -1
- package/dist/css.d.cts +9427 -874
- package/dist/css.d.ts +9427 -874
- package/dist/css.js +1591 -2018
- 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 +26 -23
- package/dist/index.d.ts +26 -23
- 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 +3 -18
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +10 -10
- 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 +1 -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 +26 -910
- 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/dist/css.cjs
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, PREFIX = "s-";
|
|
3
|
+
var theme = require("@sanity/ui/theme"), version = "3.0.0-static.19";
|
|
4
|
+
function _hash(value) {
|
|
5
|
+
let h = 5381;
|
|
6
|
+
for (let index = 0, len = value.length; index < len; index++)
|
|
7
|
+
h = (h << 5) + h + value.charCodeAt(index) >>> 0;
|
|
8
|
+
return h.toString(36);
|
|
9
|
+
}
|
|
10
|
+
const PREFIX = `s${_hash(version).slice(0, 5)}-`;
|
|
12
11
|
function isRecord(value) {
|
|
13
12
|
return value !== null && typeof value == "object" && !Array.isArray(value);
|
|
14
13
|
}
|
|
15
14
|
function isArray(value) {
|
|
16
15
|
return Array.isArray(value);
|
|
17
16
|
}
|
|
18
|
-
function rem(value) {
|
|
17
|
+
function rem$1(value) {
|
|
19
18
|
return value === 0 ? "0" : `${value / 16}rem`;
|
|
20
19
|
}
|
|
21
|
-
function px(value) {
|
|
20
|
+
function px$1(value) {
|
|
22
21
|
return value === 0 ? "0" : `${value}px`;
|
|
23
22
|
}
|
|
24
|
-
function toBoxShadow(value) {
|
|
25
|
-
return value ? value.map((n) => px(n)).join(" ") : "none";
|
|
23
|
+
function toBoxShadow$1(value) {
|
|
24
|
+
return value ? value.map((n) => px$1(n)).join(" ") : "none";
|
|
26
25
|
}
|
|
27
26
|
function _compileStyle(style) {
|
|
28
27
|
let css = "";
|
|
@@ -41,7 +40,7 @@ function _compileStyle(style) {
|
|
|
41
40
|
}
|
|
42
41
|
if (style.layers && Object.keys(style.layers).length > 0)
|
|
43
42
|
for (const [layerName, layerRules] of Object.entries(style.layers))
|
|
44
|
-
Object.keys(layerRules).length > 0 && (css += `@layer ${
|
|
43
|
+
Object.keys(layerRules).length > 0 && (css += `@layer ${layerName} {
|
|
45
44
|
`, css += compileStyleRules(layerRules), css += `}
|
|
46
45
|
|
|
47
46
|
`);
|
|
@@ -50,17 +49,17 @@ function _compileStyle(style) {
|
|
|
50
49
|
function compileStyleRules(rules2) {
|
|
51
50
|
let css = "";
|
|
52
51
|
const mediaMap = /* @__PURE__ */ new Map();
|
|
53
|
-
for (const [selector,
|
|
54
|
-
if (
|
|
55
|
-
if (
|
|
56
|
-
for (const [mediaQuery, mediaProps] of Object.entries(
|
|
52
|
+
for (const [selector, properties2] of Object.entries(rules2))
|
|
53
|
+
if (properties2) {
|
|
54
|
+
if (properties2["@media"])
|
|
55
|
+
for (const [mediaQuery, mediaProps] of Object.entries(properties2["@media"])) {
|
|
57
56
|
const arr = mediaMap.get(mediaQuery) ?? [];
|
|
58
57
|
arr.push({
|
|
59
58
|
selector,
|
|
60
59
|
props: mediaProps
|
|
61
60
|
}), mediaMap.set(mediaQuery, arr);
|
|
62
61
|
}
|
|
63
|
-
css += compileStyleRule(selector,
|
|
62
|
+
css += compileStyleRule(selector, properties2);
|
|
64
63
|
}
|
|
65
64
|
for (const [mediaQuery, mediaRules] of mediaMap) {
|
|
66
65
|
css += `@media ${mediaQuery} {
|
|
@@ -73,15 +72,15 @@ function compileStyleRules(rules2) {
|
|
|
73
72
|
}
|
|
74
73
|
return css;
|
|
75
74
|
}
|
|
76
|
-
function compileStyleRule(_selector,
|
|
75
|
+
function compileStyleRule(_selector, properties2) {
|
|
77
76
|
let css = "";
|
|
78
77
|
const {
|
|
79
78
|
_prefix = !0,
|
|
80
79
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
81
80
|
"@media": _mediaProps,
|
|
82
|
-
|
|
81
|
+
nest: nestedProps,
|
|
83
82
|
...restProperties
|
|
84
|
-
} =
|
|
83
|
+
} = properties2, selector = _prefix ? `${_selector.replace(/\./g, `.${PREFIX}`)}` : _selector;
|
|
85
84
|
if (Object.entries(restProperties).length && (css += `${selector} {
|
|
86
85
|
`, css += compileProperties(restProperties), css += `}
|
|
87
86
|
|
|
@@ -98,7 +97,13 @@ function compileStyleRule(_selector, properties) {
|
|
|
98
97
|
function compileProperties(props) {
|
|
99
98
|
let css = "";
|
|
100
99
|
const propEntries = Object.entries(props);
|
|
101
|
-
for (const [key, value] of propEntries)
|
|
100
|
+
for (const [key, value] of propEntries) {
|
|
101
|
+
if (key === "vars") {
|
|
102
|
+
for (const [k, v] of Object.entries(value))
|
|
103
|
+
css += ` ${k}: ${v};
|
|
104
|
+
`;
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
102
107
|
if (!key.startsWith("@"))
|
|
103
108
|
if (isArray(value))
|
|
104
109
|
for (const item of value)
|
|
@@ -107,526 +112,12 @@ function compileProperties(props) {
|
|
|
107
112
|
else
|
|
108
113
|
css += ` ${toSnakeCase(key)}: ${value};
|
|
109
114
|
`;
|
|
115
|
+
}
|
|
110
116
|
return css;
|
|
111
117
|
}
|
|
112
118
|
function toSnakeCase(str) {
|
|
113
119
|
return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
114
120
|
}
|
|
115
|
-
const varNames = {
|
|
116
|
-
avatar: {
|
|
117
|
-
distance: "--avatar-distance",
|
|
118
|
-
focusRing: {
|
|
119
|
-
offset: "--avatar-focus-ring-offset",
|
|
120
|
-
width: "--avatar-focus-ring-width"
|
|
121
|
-
},
|
|
122
|
-
size: "--avatar-size",
|
|
123
|
-
sizes: theme.AVATAR_SIZE.reduce((acc, size) => ({
|
|
124
|
-
...acc,
|
|
125
|
-
[size]: {
|
|
126
|
-
distance: `--avatar-${size}-distance`,
|
|
127
|
-
size: `--avatar-${size}-size`
|
|
128
|
-
}
|
|
129
|
-
}), {})
|
|
130
|
-
},
|
|
131
|
-
button: {
|
|
132
|
-
border: {
|
|
133
|
-
width: "--button-border-width"
|
|
134
|
-
},
|
|
135
|
-
focusRing: {
|
|
136
|
-
offset: "--button-focus-ring-offset",
|
|
137
|
-
width: "--button-focus-ring-width"
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
card: {
|
|
141
|
-
shadow: {
|
|
142
|
-
outline: "--card-shadow-outline"
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
color: {
|
|
146
|
-
// card scope
|
|
147
|
-
avatar: {
|
|
148
|
-
bg: "--color-avatar-bg",
|
|
149
|
-
fg: "--color-avatar-fg",
|
|
150
|
-
gray: {
|
|
151
|
-
bg: "--color-avatar-gray-bg",
|
|
152
|
-
fg: "--color-avatar-gray-fg"
|
|
153
|
-
},
|
|
154
|
-
blue: {
|
|
155
|
-
bg: "--color-avatar-blue-bg",
|
|
156
|
-
fg: "--color-avatar-blue-fg"
|
|
157
|
-
},
|
|
158
|
-
purple: {
|
|
159
|
-
bg: "--color-avatar-purple-bg",
|
|
160
|
-
fg: "--color-avatar-purple-fg"
|
|
161
|
-
},
|
|
162
|
-
magenta: {
|
|
163
|
-
bg: "--color-avatar-magenta-bg",
|
|
164
|
-
fg: "--color-avatar-magenta-fg"
|
|
165
|
-
},
|
|
166
|
-
red: {
|
|
167
|
-
bg: "--color-avatar-red-bg",
|
|
168
|
-
fg: "--color-avatar-red-fg"
|
|
169
|
-
},
|
|
170
|
-
orange: {
|
|
171
|
-
bg: "--color-avatar-orange-bg",
|
|
172
|
-
fg: "--color-avatar-gray-fg"
|
|
173
|
-
},
|
|
174
|
-
yellow: {
|
|
175
|
-
bg: "--color-avatar-yellow-bg",
|
|
176
|
-
fg: "--color-avatar-yellow-fg"
|
|
177
|
-
},
|
|
178
|
-
green: {
|
|
179
|
-
bg: "--color-avatar-green-bg",
|
|
180
|
-
fg: "--color-avatar-green-fg"
|
|
181
|
-
},
|
|
182
|
-
cyan: {
|
|
183
|
-
bg: "--color-avatar-cyan-bg",
|
|
184
|
-
fg: "--color-avatar-yellow-fg"
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
backdrop: "--color-backdrop",
|
|
188
|
-
bg: "--color-bg",
|
|
189
|
-
border: "--color-border",
|
|
190
|
-
code: {
|
|
191
|
-
bg: "--color-code-bg",
|
|
192
|
-
fg: "--color-code-fg",
|
|
193
|
-
token: {
|
|
194
|
-
atrule: "--color-code-token-atrule",
|
|
195
|
-
attrName: "--color-code-token-attr-name",
|
|
196
|
-
attrValue: "--color-code-token-attr-value",
|
|
197
|
-
attribute: "--color-code-token-attribute",
|
|
198
|
-
boolean: "--color-code-token-boolean",
|
|
199
|
-
builtin: "--color-code-token-builtin",
|
|
200
|
-
cdata: "--color-code-token-cdata",
|
|
201
|
-
char: "--color-code-token-char",
|
|
202
|
-
class: "--color-code-token-class",
|
|
203
|
-
className: "--color-code-token-class-name",
|
|
204
|
-
comment: "--color-code-token-comment",
|
|
205
|
-
constant: "--color-code-token-constant",
|
|
206
|
-
deleted: "--color-code-token-deleted",
|
|
207
|
-
doctype: "--color-code-token-doctype",
|
|
208
|
-
entity: "--color-code-token-entity",
|
|
209
|
-
function: "--color-code-token-function",
|
|
210
|
-
hexcode: "--color-code-token-hexcode",
|
|
211
|
-
id: "--color-code-token-id",
|
|
212
|
-
important: "--color-code-token-important",
|
|
213
|
-
inserted: "--color-code-token-inserted",
|
|
214
|
-
keyword: "--color-code-token-keyword",
|
|
215
|
-
number: "--color-code-token-number",
|
|
216
|
-
operator: "--color-code-token-operator",
|
|
217
|
-
prolog: "--color-code-token-prolog",
|
|
218
|
-
property: "--color-code-token-property",
|
|
219
|
-
pseudoClass: "--color-code-token-pseudo-class",
|
|
220
|
-
pseudoElement: "--color-code-token-pseudo-element",
|
|
221
|
-
punctuation: "--color-code-token-punctuation",
|
|
222
|
-
regex: "--color-code-token-regex",
|
|
223
|
-
selector: "--color-code-token-selector",
|
|
224
|
-
string: "--color-code-token-string",
|
|
225
|
-
symbol: "--color-code-token-symbol",
|
|
226
|
-
tag: "--color-code-token-tag",
|
|
227
|
-
unit: "--color-code-token-unit",
|
|
228
|
-
url: "--color-code-token-url",
|
|
229
|
-
variable: "--color-code-token-variable"
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
fg: "--color-fg",
|
|
233
|
-
focusRing: "--color-focus-ring",
|
|
234
|
-
input: {
|
|
235
|
-
bg: "--color-input-bg",
|
|
236
|
-
border: "--color-input-border",
|
|
237
|
-
fg: "--color-input-fg",
|
|
238
|
-
placeholder: "--color-input-placeholder"
|
|
239
|
-
},
|
|
240
|
-
link: {
|
|
241
|
-
fg: "--color-link-fg"
|
|
242
|
-
},
|
|
243
|
-
muted: {
|
|
244
|
-
bg: "--color-muted-bg",
|
|
245
|
-
fg: "--color-muted-fg"
|
|
246
|
-
},
|
|
247
|
-
shadow: {
|
|
248
|
-
outline: "--color-shadow-outline",
|
|
249
|
-
umbra: "--color-shadow-umbra",
|
|
250
|
-
penumbra: "--color-shadow-penumbra",
|
|
251
|
-
ambient: "--color-shadow-ambient"
|
|
252
|
-
},
|
|
253
|
-
skeleton: {
|
|
254
|
-
from: "--color-skeleton-from",
|
|
255
|
-
to: "--color-skeleton-to"
|
|
256
|
-
},
|
|
257
|
-
solid: buildColorVariantVarNames({
|
|
258
|
-
variant: "solid"
|
|
259
|
-
}),
|
|
260
|
-
tinted: buildColorVariantVarNames({
|
|
261
|
-
variant: "tinted"
|
|
262
|
-
}),
|
|
263
|
-
// tone scopes
|
|
264
|
-
...theme.THEME_COLOR_CARD_TONES.reduce((acc, tone) => (acc[tone] = buildColorCardVarNames({
|
|
265
|
-
tone
|
|
266
|
-
}), acc), {}),
|
|
267
|
-
// scheme scopes
|
|
268
|
-
dark: theme.THEME_COLOR_CARD_TONES.reduce((acc, tone) => (acc[tone] = buildColorCardVarNames({
|
|
269
|
-
scheme: "dark",
|
|
270
|
-
tone
|
|
271
|
-
}), acc), {}),
|
|
272
|
-
light: theme.THEME_COLOR_CARD_TONES.reduce((acc, tone) => (acc[tone] = buildColorCardVarNames({
|
|
273
|
-
scheme: "light",
|
|
274
|
-
tone
|
|
275
|
-
}), acc), {})
|
|
276
|
-
},
|
|
277
|
-
container: {
|
|
278
|
-
0: "--container-0",
|
|
279
|
-
1: "--container-1",
|
|
280
|
-
2: "--container-2",
|
|
281
|
-
3: "--container-3",
|
|
282
|
-
4: "--container-4",
|
|
283
|
-
5: "--container-5"
|
|
284
|
-
},
|
|
285
|
-
font: {
|
|
286
|
-
code: {
|
|
287
|
-
family: "--font-code-family",
|
|
288
|
-
featureSettings: "--font-code-feature-settings",
|
|
289
|
-
sizes: theme.FONT_CODE_SIZE.reduce((acc, size) => ({
|
|
290
|
-
...acc,
|
|
291
|
-
[size]: {
|
|
292
|
-
fontSize: `--font-code-${size}-size`,
|
|
293
|
-
ascenderHeight: `--font-code-${size}-ascender-height`,
|
|
294
|
-
descenderHeight: `--font-code-${size}-descender-height`,
|
|
295
|
-
lineHeight: `--font-code-${size}-line-height`,
|
|
296
|
-
letterSpacing: `--font-code-${size}-letter-spacing`,
|
|
297
|
-
iconSize: `--font-code-${size}-icon-size`
|
|
298
|
-
}
|
|
299
|
-
}), {}),
|
|
300
|
-
weights: {
|
|
301
|
-
regular: "--font-code-weight-regular",
|
|
302
|
-
medium: "--font-code-weight-medium",
|
|
303
|
-
semibold: "--font-code-weight-semibold",
|
|
304
|
-
bold: "--font-code-weight-bold"
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
heading: {
|
|
308
|
-
family: "--font-heading-family",
|
|
309
|
-
featureSettings: "--font-heading-feature-settings",
|
|
310
|
-
sizes: theme.FONT_HEADING_SIZE.reduce((acc, size) => ({
|
|
311
|
-
...acc,
|
|
312
|
-
[size]: {
|
|
313
|
-
fontSize: `--font-heading-${size}-size`,
|
|
314
|
-
ascenderHeight: `--font-heading-${size}-ascender-height`,
|
|
315
|
-
descenderHeight: `--font-heading-${size}-descender-height`,
|
|
316
|
-
lineHeight: `--font-heading-${size}-line-height`,
|
|
317
|
-
letterSpacing: `--font-heading-${size}-letter-spacing`,
|
|
318
|
-
iconSize: `--font-heading-${size}-icon-size`
|
|
319
|
-
}
|
|
320
|
-
}), {}),
|
|
321
|
-
weights: {
|
|
322
|
-
regular: "--font-heading-weight-regular",
|
|
323
|
-
medium: "--font-heading-weight-medium",
|
|
324
|
-
semibold: "--font-heading-weight-semibold",
|
|
325
|
-
bold: "--font-heading-weight-bold"
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
|
-
label: {
|
|
329
|
-
family: "--font-label-family",
|
|
330
|
-
featureSettings: "--font-label-feature-settings",
|
|
331
|
-
sizes: theme.FONT_LABEL_SIZE.reduce((acc, size) => ({
|
|
332
|
-
...acc,
|
|
333
|
-
[size]: {
|
|
334
|
-
fontSize: `--font-label-${size}-size`,
|
|
335
|
-
ascenderHeight: `--font-label-${size}-ascender-height`,
|
|
336
|
-
descenderHeight: `--font-label-${size}-descender-height`,
|
|
337
|
-
lineHeight: `--font-label-${size}-line-height`,
|
|
338
|
-
letterSpacing: `--font-label-${size}-letter-spacing`,
|
|
339
|
-
iconSize: `--font-label-${size}-icon-size`
|
|
340
|
-
}
|
|
341
|
-
}), {}),
|
|
342
|
-
weights: {
|
|
343
|
-
regular: "--font-label-weight-regular",
|
|
344
|
-
medium: "--font-label-weight-medium",
|
|
345
|
-
semibold: "--font-label-weight-semibold",
|
|
346
|
-
bold: "--font-label-weight-bold"
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
|
-
text: {
|
|
350
|
-
family: "--font-text-family",
|
|
351
|
-
featureSettings: "--font-text-feature-settings",
|
|
352
|
-
sizes: theme.FONT_TEXT_SIZE.reduce((acc, size) => ({
|
|
353
|
-
...acc,
|
|
354
|
-
[size]: {
|
|
355
|
-
fontSize: `--font-text-${size}-size`,
|
|
356
|
-
ascenderHeight: `--font-text-${size}-ascender-height`,
|
|
357
|
-
descenderHeight: `--font-text-${size}-descender-height`,
|
|
358
|
-
lineHeight: `--font-text-${size}-line-height`,
|
|
359
|
-
letterSpacing: `--font-text-${size}-letter-spacing`,
|
|
360
|
-
iconSize: `--font-text-${size}-icon-size`
|
|
361
|
-
}
|
|
362
|
-
}), {}),
|
|
363
|
-
weights: {
|
|
364
|
-
regular: "--font-text-weight-regular",
|
|
365
|
-
medium: "--font-text-weight-medium",
|
|
366
|
-
semibold: "--font-text-weight-semibold",
|
|
367
|
-
bold: "--font-text-weight-bold"
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
},
|
|
371
|
-
input: {
|
|
372
|
-
border: {
|
|
373
|
-
width: "--input-border-width"
|
|
374
|
-
},
|
|
375
|
-
checkbox: {
|
|
376
|
-
focusRing: {
|
|
377
|
-
offset: "--input-checkbox-focus-ring-offset",
|
|
378
|
-
width: "--input-checkbox-focus-ring-width"
|
|
379
|
-
},
|
|
380
|
-
size: "--input-checkbox-size"
|
|
381
|
-
},
|
|
382
|
-
radio: {
|
|
383
|
-
focusRing: {
|
|
384
|
-
offset: "--input-radio-focus-ring-offset",
|
|
385
|
-
width: "--input-radio-focus-ring-width"
|
|
386
|
-
},
|
|
387
|
-
markSize: "--input-radio-mark-size",
|
|
388
|
-
size: "--input-radio-size"
|
|
389
|
-
},
|
|
390
|
-
select: {
|
|
391
|
-
focusRing: {
|
|
392
|
-
offset: "--input-select-focus-ring-offset",
|
|
393
|
-
width: "--input-select-focus-ring-width"
|
|
394
|
-
}
|
|
395
|
-
},
|
|
396
|
-
switch: {
|
|
397
|
-
focusRing: {
|
|
398
|
-
offset: "--input-switch-focus-ring-offset",
|
|
399
|
-
width: "--input-switch-focus-ring-width"
|
|
400
|
-
},
|
|
401
|
-
height: "--input-switch-height",
|
|
402
|
-
padding: "--input-switch-padding",
|
|
403
|
-
transitionDurationMs: "--input-switch-transition-duration-ms",
|
|
404
|
-
transitionTimingFunction: "--input-switch-transition-timing-function",
|
|
405
|
-
width: "--input-switch-width"
|
|
406
|
-
},
|
|
407
|
-
text: {
|
|
408
|
-
focusRing: {
|
|
409
|
-
offset: "--input-text-focus-ring-offset",
|
|
410
|
-
width: "--input-text-focus-ring-width"
|
|
411
|
-
}
|
|
412
|
-
},
|
|
413
|
-
fontSize: "--input-font-size",
|
|
414
|
-
lineHeight: "--input-line-height",
|
|
415
|
-
letterSpacing: "--input-letter-spacing",
|
|
416
|
-
ascenderHeight: "--input-ascender-height",
|
|
417
|
-
descenderHeight: "--input-descender-height",
|
|
418
|
-
gap: "--input-gap",
|
|
419
|
-
padding: "--input-padding"
|
|
420
|
-
},
|
|
421
|
-
radius: Object.fromEntries(theme.RADIUS.map((radius2) => [radius2, `--radius-${radius2}`])),
|
|
422
|
-
shadow: Object.fromEntries(theme.SHADOW.map((shadow2) => [shadow2, {
|
|
423
|
-
umbra: `--shadow-${shadow2}-umbra`,
|
|
424
|
-
penumbra: `--shadow-${shadow2}-penumbra`,
|
|
425
|
-
ambient: `--shadow-${shadow2}-ambient`
|
|
426
|
-
}])),
|
|
427
|
-
space: Object.fromEntries(theme.SPACE.map((space) => [space, `--space-${String(space).replace(".", "_")}`])),
|
|
428
|
-
// color
|
|
429
|
-
black: "--black",
|
|
430
|
-
white: "--white",
|
|
431
|
-
...color.COLOR_HUES.reduce((acc, hue) => {
|
|
432
|
-
const tints = {};
|
|
433
|
-
for (const tint of color.COLOR_TINTS)
|
|
434
|
-
tints[tint] = `--${hue}-${tint}`;
|
|
435
|
-
return acc[hue] = tints, acc;
|
|
436
|
-
}, {})
|
|
437
|
-
};
|
|
438
|
-
function buildColorCardVarNames(props) {
|
|
439
|
-
const {
|
|
440
|
-
scheme,
|
|
441
|
-
tone
|
|
442
|
-
} = props, prefix = scheme ? `--color-${scheme}-${tone}` : `--color-${tone}`;
|
|
443
|
-
return {
|
|
444
|
-
avatar: {
|
|
445
|
-
gray: {
|
|
446
|
-
bg: `${prefix}-avatar-gray-bg`,
|
|
447
|
-
fg: `${prefix}-avatar-gray-fg`
|
|
448
|
-
},
|
|
449
|
-
blue: {
|
|
450
|
-
bg: `${prefix}-avatar-blue-bg`,
|
|
451
|
-
fg: `${prefix}-avatar-blue-fg`
|
|
452
|
-
},
|
|
453
|
-
purple: {
|
|
454
|
-
bg: `${prefix}-avatar-purple-bg`,
|
|
455
|
-
fg: `${prefix}-avatar-purple-fg`
|
|
456
|
-
},
|
|
457
|
-
magenta: {
|
|
458
|
-
bg: `${prefix}-avatar-magenta-bg`,
|
|
459
|
-
fg: `${prefix}-avatar-magenta-fg`
|
|
460
|
-
},
|
|
461
|
-
red: {
|
|
462
|
-
bg: `${prefix}-avatar-red-bg`,
|
|
463
|
-
fg: `${prefix}-avatar-red-fg`
|
|
464
|
-
},
|
|
465
|
-
orange: {
|
|
466
|
-
bg: `${prefix}-avatar-orange-bg`,
|
|
467
|
-
fg: `${prefix}-avatar-gray-fg`
|
|
468
|
-
},
|
|
469
|
-
yellow: {
|
|
470
|
-
bg: `${prefix}-avatar-yellow-bg`,
|
|
471
|
-
fg: `${prefix}-avatar-yellow-fg`
|
|
472
|
-
},
|
|
473
|
-
green: {
|
|
474
|
-
bg: `${prefix}-avatar-green-bg`,
|
|
475
|
-
fg: `${prefix}-avatar-green-fg`
|
|
476
|
-
},
|
|
477
|
-
cyan: {
|
|
478
|
-
bg: `${prefix}-avatar-cyan-bg`,
|
|
479
|
-
fg: `${prefix}-avatar-yellow-fg`
|
|
480
|
-
}
|
|
481
|
-
},
|
|
482
|
-
backdrop: `${prefix}-backdrop`,
|
|
483
|
-
code: {
|
|
484
|
-
bg: `${prefix}-code-bg`,
|
|
485
|
-
fg: `${prefix}-code-fg`,
|
|
486
|
-
token: {
|
|
487
|
-
atrule: `${prefix}-code-token-atrule`,
|
|
488
|
-
attrName: `${prefix}-code-token-attr-name`,
|
|
489
|
-
attrValue: `${prefix}-code-token-attr-value`,
|
|
490
|
-
attribute: `${prefix}-code-token-attribute`,
|
|
491
|
-
boolean: `${prefix}-code-token-boolean`,
|
|
492
|
-
builtin: `${prefix}-code-token-builtin`,
|
|
493
|
-
cdata: `${prefix}-code-token-cdata`,
|
|
494
|
-
char: `${prefix}-code-token-char`,
|
|
495
|
-
class: `${prefix}-code-token-class`,
|
|
496
|
-
className: `${prefix}-code-token-class-name`,
|
|
497
|
-
comment: `${prefix}-code-token-comment`,
|
|
498
|
-
constant: `${prefix}-code-token-constant`,
|
|
499
|
-
deleted: `${prefix}-code-token-deleted`,
|
|
500
|
-
doctype: `${prefix}-code-token-doctype`,
|
|
501
|
-
entity: `${prefix}-code-token-entity`,
|
|
502
|
-
function: `${prefix}-code-token-function`,
|
|
503
|
-
hexcode: `${prefix}-code-token-hexcode`,
|
|
504
|
-
id: `${prefix}-code-token-id`,
|
|
505
|
-
important: `${prefix}-code-token-important`,
|
|
506
|
-
inserted: `${prefix}-code-token-inserted`,
|
|
507
|
-
keyword: `${prefix}-code-token-keyword`,
|
|
508
|
-
number: `${prefix}-code-token-number`,
|
|
509
|
-
operator: `${prefix}-code-token-operator`,
|
|
510
|
-
prolog: `${prefix}-code-token-prolog`,
|
|
511
|
-
property: `${prefix}-code-token-property`,
|
|
512
|
-
pseudoClass: `${prefix}-code-token-pseudo-class`,
|
|
513
|
-
pseudoElement: `${prefix}-code-token-pseudo-element`,
|
|
514
|
-
punctuation: `${prefix}-code-token-punctuation`,
|
|
515
|
-
regex: `${prefix}-code-token-regex`,
|
|
516
|
-
selector: `${prefix}-code-token-selector`,
|
|
517
|
-
string: `${prefix}-code-token-string`,
|
|
518
|
-
symbol: `${prefix}-code-token-symbol`,
|
|
519
|
-
tag: `${prefix}-code-token-tag`,
|
|
520
|
-
unit: `${prefix}-code-token-unit`,
|
|
521
|
-
url: `${prefix}-code-token-url`,
|
|
522
|
-
variable: `${prefix}-code-token-variable`
|
|
523
|
-
}
|
|
524
|
-
},
|
|
525
|
-
focusRing: `${prefix}-focus-ring`,
|
|
526
|
-
link: {
|
|
527
|
-
fg: `${prefix}-link-fg`
|
|
528
|
-
},
|
|
529
|
-
muted: {
|
|
530
|
-
bg: `${prefix}-muted-bg`,
|
|
531
|
-
fg: `${prefix}-muted-fg`
|
|
532
|
-
},
|
|
533
|
-
shadow: {
|
|
534
|
-
outline: `${prefix}-shadow-outline`,
|
|
535
|
-
umbra: `${prefix}-shadow-umbra`,
|
|
536
|
-
penumbra: `${prefix}-shadow-penumbra`,
|
|
537
|
-
ambient: `${prefix}-shadow-ambient`
|
|
538
|
-
},
|
|
539
|
-
skeleton: {
|
|
540
|
-
from: `${prefix}-skeleton-from`,
|
|
541
|
-
to: `${prefix}-skeleton-to`
|
|
542
|
-
},
|
|
543
|
-
solid: buildColorVariantVarNames({
|
|
544
|
-
scheme,
|
|
545
|
-
tone,
|
|
546
|
-
variant: "solid"
|
|
547
|
-
}),
|
|
548
|
-
tinted: buildColorVariantVarNames({
|
|
549
|
-
scheme,
|
|
550
|
-
tone,
|
|
551
|
-
variant: "tinted"
|
|
552
|
-
})
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
function buildColorVariantVarNames(options) {
|
|
556
|
-
const {
|
|
557
|
-
scheme,
|
|
558
|
-
tone,
|
|
559
|
-
variant
|
|
560
|
-
} = options, prefix = scheme && tone ? `--color-${scheme}-${tone}-${variant}` : tone ? `--color-${tone}-${variant}` : `--color-${variant}`, vars2 = {
|
|
561
|
-
bg: {
|
|
562
|
-
0: `${prefix}-bg-0`,
|
|
563
|
-
1: `${prefix}-bg-1`,
|
|
564
|
-
2: `${prefix}-bg-2`,
|
|
565
|
-
3: `${prefix}-bg-3`,
|
|
566
|
-
4: `${prefix}-bg-4`
|
|
567
|
-
},
|
|
568
|
-
border: {
|
|
569
|
-
0: `${prefix}-border-0`,
|
|
570
|
-
1: `${prefix}-border-1`,
|
|
571
|
-
2: `${prefix}-border-2`,
|
|
572
|
-
3: `${prefix}-border-3`,
|
|
573
|
-
4: `${prefix}-border-4`
|
|
574
|
-
},
|
|
575
|
-
fg: {
|
|
576
|
-
0: `${prefix}-fg-0`,
|
|
577
|
-
1: `${prefix}-fg-1`,
|
|
578
|
-
2: `${prefix}-fg-2`,
|
|
579
|
-
3: `${prefix}-fg-3`,
|
|
580
|
-
4: `${prefix}-fg-4`
|
|
581
|
-
}
|
|
582
|
-
};
|
|
583
|
-
for (const elementTone of theme.THEME_COLOR_STATE_TONES) {
|
|
584
|
-
const _prefix = scheme && tone ? `--color-${scheme}-${tone}-${variant}-${elementTone}` : tone ? `--color-${tone}-${variant}-${elementTone}` : `--color-${variant}-${elementTone}`;
|
|
585
|
-
vars2[elementTone] = {
|
|
586
|
-
bg: {
|
|
587
|
-
0: `${_prefix}-bg-0`,
|
|
588
|
-
1: `${_prefix}-bg-1`,
|
|
589
|
-
2: `${_prefix}-bg-2`,
|
|
590
|
-
3: `${_prefix}-bg-3`,
|
|
591
|
-
4: `${_prefix}-bg-4`
|
|
592
|
-
},
|
|
593
|
-
border: {
|
|
594
|
-
0: `${_prefix}-border-0`,
|
|
595
|
-
1: `${_prefix}-border-1`,
|
|
596
|
-
2: `${_prefix}-border-2`,
|
|
597
|
-
3: `${_prefix}-border-3`,
|
|
598
|
-
4: `${_prefix}-border-4`
|
|
599
|
-
},
|
|
600
|
-
fg: {
|
|
601
|
-
0: `${_prefix}-fg-0`,
|
|
602
|
-
1: `${_prefix}-fg-1`,
|
|
603
|
-
2: `${_prefix}-fg-2`,
|
|
604
|
-
3: `${_prefix}-fg-3`,
|
|
605
|
-
4: `${_prefix}-fg-4`
|
|
606
|
-
}
|
|
607
|
-
};
|
|
608
|
-
}
|
|
609
|
-
return vars2;
|
|
610
|
-
}
|
|
611
|
-
function _compilePalette() {
|
|
612
|
-
return _compileStyle({
|
|
613
|
-
layers: {
|
|
614
|
-
palette: {
|
|
615
|
-
":root": compilePaletteProperties()
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
function compilePaletteProperties() {
|
|
621
|
-
const rules2 = {
|
|
622
|
-
[varNames.black]: color.color.black.hex,
|
|
623
|
-
[varNames.white]: color.color.white.hex
|
|
624
|
-
};
|
|
625
|
-
for (const hue of theme.HUES)
|
|
626
|
-
for (const tint of theme.TINTS)
|
|
627
|
-
rules2[varNames[hue][tint]] = color.color[hue][tint].hex;
|
|
628
|
-
return rules2;
|
|
629
|
-
}
|
|
630
121
|
function _mergeStyles(styles) {
|
|
631
122
|
const keyframes2 = {}, layers = {}, rules2 = {};
|
|
632
123
|
for (const s of styles) {
|
|
@@ -641,521 +132,781 @@ function _mergeStyles(styles) {
|
|
|
641
132
|
rules: rules2
|
|
642
133
|
};
|
|
643
134
|
}
|
|
644
|
-
function _responsiveRule(rules2, _name,
|
|
135
|
+
function _responsiveRule(rules2, _name, properties2) {
|
|
645
136
|
const name = _name.replace(/\./g, "_");
|
|
646
|
-
rules2[`.${name}`] =
|
|
137
|
+
rules2[`.${name}`] = properties2, rules2[`.1\\:${name}`] = {
|
|
647
138
|
"@media": {
|
|
648
|
-
"screen and (min-width: 360px)":
|
|
139
|
+
"screen and (min-width: 360px)": properties2
|
|
649
140
|
}
|
|
650
141
|
}, rules2[`.2\\:${name}`] = {
|
|
651
142
|
"@media": {
|
|
652
|
-
"screen and (min-width: 600px)":
|
|
143
|
+
"screen and (min-width: 600px)": properties2
|
|
653
144
|
}
|
|
654
145
|
}, rules2[`.3\\:${name}`] = {
|
|
655
146
|
"@media": {
|
|
656
|
-
"screen and (min-width: 900px)":
|
|
147
|
+
"screen and (min-width: 900px)": properties2
|
|
657
148
|
}
|
|
658
149
|
}, rules2[`.4\\:${name}`] = {
|
|
659
150
|
"@media": {
|
|
660
|
-
"screen and (min-width: 1200px)":
|
|
151
|
+
"screen and (min-width: 1200px)": properties2
|
|
661
152
|
}
|
|
662
153
|
}, rules2[`.5\\:${name}`] = {
|
|
663
154
|
"@media": {
|
|
664
|
-
"screen and (min-width: 1800px)":
|
|
155
|
+
"screen and (min-width: 1800px)": properties2
|
|
665
156
|
}
|
|
666
157
|
}, rules2[`.6\\:${name}`] = {
|
|
667
158
|
"@media": {
|
|
668
|
-
"screen and (min-width: 2400px)":
|
|
159
|
+
"screen and (min-width: 2400px)": properties2
|
|
669
160
|
}
|
|
670
161
|
};
|
|
671
162
|
}
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
},
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
163
|
+
function _fromEntries(entries) {
|
|
164
|
+
return Object.fromEntries(entries);
|
|
165
|
+
}
|
|
166
|
+
function buildVarContract(contract, options) {
|
|
167
|
+
return {
|
|
168
|
+
vars: buildVars(contract, options),
|
|
169
|
+
varNames: buildVarNames(contract, options),
|
|
170
|
+
properties: buildProperties(contract, options)
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function buildProperties(contract, options) {
|
|
174
|
+
const _properties = {};
|
|
175
|
+
function walk(c) {
|
|
176
|
+
for (const key in c)
|
|
177
|
+
typeof c[key] == "string" ? _properties[`--${options.prefix}${_hash(`${options.layer}.${c[key]}`)}`] = c[key] : c[key] === null || walk(c[key]);
|
|
178
|
+
}
|
|
179
|
+
return walk(contract), Object.freeze(_properties);
|
|
180
|
+
}
|
|
181
|
+
function buildVars(contract, options, path = "") {
|
|
182
|
+
const _vars = {};
|
|
183
|
+
for (const key in contract)
|
|
184
|
+
typeof contract[key] == "string" ? _vars[key] = `var(--${options.prefix}${_hash(`${options.layer}.${contract[key]}`)})` : contract[key] === null ? _vars[key] = `var(--${options.prefix}${_hash(`${options.layer}.${path}.${key}`)})` : _vars[key] = buildVars(contract[key], options, [path, key].join("."));
|
|
185
|
+
return Object.freeze(_vars);
|
|
186
|
+
}
|
|
187
|
+
function buildVarNames(contract, options, path = "") {
|
|
188
|
+
const _varNames = {};
|
|
189
|
+
for (const key in contract)
|
|
190
|
+
typeof contract[key] == "string" ? _varNames[key] = `--${options.prefix}${_hash(`${options.layer}.${contract[key]}`)}` : contract[key] === null ? _varNames[key] = `--${options.prefix}${_hash(`${options.layer}.${path}.${key}`)}` : _varNames[key] = buildVarNames(contract[key], options, [path, key].join("."));
|
|
191
|
+
return Object.freeze(_varNames);
|
|
192
|
+
}
|
|
193
|
+
function resolveTheme(options) {
|
|
194
|
+
const {
|
|
195
|
+
theme: theme$1
|
|
196
|
+
} = options, paletteResult = buildVarContract({
|
|
197
|
+
palette: {
|
|
198
|
+
black: theme$1.palette.black.hex,
|
|
199
|
+
white: theme$1.palette.white.hex,
|
|
200
|
+
..._fromEntries(theme.HUES.map((hue) => [hue, _fromEntries(theme.TINTS.map((tint) => [tint, theme$1.palette.hues[hue][tint].hex]))]))
|
|
201
|
+
}
|
|
202
|
+
}, {
|
|
203
|
+
layer: "palette",
|
|
204
|
+
prefix: "s"
|
|
205
|
+
}), themeResult = buildVarContract({
|
|
206
|
+
arrow: {
|
|
207
|
+
size: null
|
|
715
208
|
},
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
209
|
+
avatar: {
|
|
210
|
+
distance: null,
|
|
211
|
+
size: null,
|
|
212
|
+
focusRing: {
|
|
213
|
+
offset: px(theme$1.avatar.focusRing.offset),
|
|
214
|
+
width: px(theme$1.avatar.focusRing.width)
|
|
215
|
+
},
|
|
216
|
+
sizes: _fromEntries(theme.AVATAR_SIZE.map((s) => [s, {
|
|
217
|
+
distance: rem(theme$1.avatar.sizes[s].distance),
|
|
218
|
+
size: rem(theme$1.avatar.sizes[s].size)
|
|
219
|
+
}]))
|
|
719
220
|
},
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
code: {
|
|
729
|
-
bg: `var(${varNames.color.code.bg})`,
|
|
730
|
-
fg: `var(${varNames.color.code.fg})`,
|
|
731
|
-
token: {
|
|
732
|
-
atrule: `var(${varNames.color.code.token.atrule})`,
|
|
733
|
-
attrName: `var(${varNames.color.code.token.attrName})`,
|
|
734
|
-
attrValue: `var(${varNames.color.code.token.attrValue})`,
|
|
735
|
-
attribute: `var(${varNames.color.code.token.attribute})`,
|
|
736
|
-
boolean: `var(${varNames.color.code.token.boolean})`,
|
|
737
|
-
builtin: `var(${varNames.color.code.token.builtin})`,
|
|
738
|
-
cdata: `var(${varNames.color.code.token.cdata})`,
|
|
739
|
-
char: `var(${varNames.color.code.token.char})`,
|
|
740
|
-
class: `var(${varNames.color.code.token.class})`,
|
|
741
|
-
className: `var(${varNames.color.code.token.className})`,
|
|
742
|
-
comment: `var(${varNames.color.code.token.comment})`,
|
|
743
|
-
constant: `var(${varNames.color.code.token.constant})`,
|
|
744
|
-
deleted: `var(${varNames.color.code.token.deleted})`,
|
|
745
|
-
doctype: `var(${varNames.color.code.token.doctype})`,
|
|
746
|
-
entity: `var(${varNames.color.code.token.entity})`,
|
|
747
|
-
function: `var(${varNames.color.code.token.function})`,
|
|
748
|
-
hexcode: `var(${varNames.color.code.token.hexcode})`,
|
|
749
|
-
id: `var(${varNames.color.code.token.id})`,
|
|
750
|
-
important: `var(${varNames.color.code.token.important})`,
|
|
751
|
-
inserted: `var(${varNames.color.code.token.inserted})`,
|
|
752
|
-
keyword: `var(${varNames.color.code.token.keyword})`,
|
|
753
|
-
number: `var(${varNames.color.code.token.number})`,
|
|
754
|
-
operator: `var(${varNames.color.code.token.operator})`,
|
|
755
|
-
prolog: `var(${varNames.color.code.token.prolog})`,
|
|
756
|
-
property: `var(${varNames.color.code.token.property})`,
|
|
757
|
-
pseudoClass: `var(${varNames.color.code.token.pseudoClass})`,
|
|
758
|
-
pseudoElement: `var(${varNames.color.code.token.pseudoElement})`,
|
|
759
|
-
punctuation: `var(${varNames.color.code.token.punctuation})`,
|
|
760
|
-
regex: `var(${varNames.color.code.token.regex})`,
|
|
761
|
-
selector: `var(${varNames.color.code.token.selector})`,
|
|
762
|
-
string: `var(${varNames.color.code.token.string})`,
|
|
763
|
-
symbol: `var(${varNames.color.code.token.symbol})`,
|
|
764
|
-
tag: `var(${varNames.color.code.token.tag})`,
|
|
765
|
-
unit: `var(${varNames.color.code.token.unit})`,
|
|
766
|
-
url: `var(${varNames.color.code.token.url})`,
|
|
767
|
-
variable: `var(${varNames.color.code.token.variable})`
|
|
768
|
-
}
|
|
769
|
-
},
|
|
770
|
-
fg: `var(${varNames.color.fg})`,
|
|
771
|
-
focusRing: `var(${varNames.color.focusRing})`,
|
|
772
|
-
input: {
|
|
773
|
-
bg: `var(${varNames.color.input.bg})`,
|
|
774
|
-
border: `var(${varNames.color.input.border})`,
|
|
775
|
-
fg: `var(${varNames.color.input.fg})`,
|
|
776
|
-
placeholder: `var(${varNames.color.input.placeholder})`
|
|
777
|
-
},
|
|
778
|
-
link: {
|
|
779
|
-
fg: `var(${varNames.color.link.fg})`
|
|
780
|
-
},
|
|
781
|
-
muted: {
|
|
782
|
-
bg: `var(${varNames.color.muted.bg})`,
|
|
783
|
-
fg: `var(${varNames.color.muted.fg})`
|
|
784
|
-
},
|
|
785
|
-
shadow: {
|
|
786
|
-
outline: `var(${varNames.color.shadow.outline})`,
|
|
787
|
-
umbra: `var(${varNames.color.shadow.umbra})`,
|
|
788
|
-
penumbra: `var(${varNames.color.shadow.penumbra})`,
|
|
789
|
-
ambient: `var(${varNames.color.shadow.ambient})`
|
|
790
|
-
},
|
|
791
|
-
skeleton: {
|
|
792
|
-
from: `var(${varNames.color.skeleton.from})`,
|
|
793
|
-
to: `var(${varNames.color.skeleton.to})`
|
|
794
|
-
},
|
|
795
|
-
solid: buildColorVariantVars({
|
|
796
|
-
variant: "solid"
|
|
797
|
-
}),
|
|
798
|
-
tinted: buildColorVariantVars({
|
|
799
|
-
variant: "tinted"
|
|
800
|
-
}),
|
|
801
|
-
...theme.THEME_COLOR_CARD_TONES.reduce((acc, tone) => ({
|
|
802
|
-
...acc,
|
|
803
|
-
[tone]: buildColorCardVars({
|
|
804
|
-
tone
|
|
805
|
-
})
|
|
806
|
-
}), {}),
|
|
807
|
-
dark: darkColorVars,
|
|
808
|
-
light: lightColorVars
|
|
809
|
-
}, vars = {
|
|
810
|
-
avatar: {
|
|
811
|
-
distance: `var(${varNames.avatar.distance})`,
|
|
812
|
-
size: `var(${varNames.avatar.size})`,
|
|
813
|
-
sizes: theme.AVATAR_SIZE.reduce((acc, size) => ({
|
|
814
|
-
...acc,
|
|
815
|
-
[size]: {
|
|
816
|
-
size: `var(${varNames.avatar.sizes[size].size})`,
|
|
817
|
-
distance: `var(${varNames.avatar.sizes[size].distance})`
|
|
818
|
-
}
|
|
819
|
-
}), {})
|
|
820
|
-
},
|
|
821
|
-
card: {
|
|
822
|
-
shadow: {
|
|
823
|
-
outline: `var(${varNames.card.shadow.outline})`
|
|
824
|
-
}
|
|
825
|
-
},
|
|
826
|
-
color: colorVars,
|
|
827
|
-
container: {
|
|
828
|
-
0: `var(${varNames.container[0]})`,
|
|
829
|
-
1: `var(${varNames.container[1]})`,
|
|
830
|
-
2: `var(${varNames.container[2]})`,
|
|
831
|
-
3: `var(${varNames.container[3]})`,
|
|
832
|
-
4: `var(${varNames.container[4]})`,
|
|
833
|
-
5: `var(${varNames.container[5]})`
|
|
834
|
-
},
|
|
835
|
-
font: {
|
|
836
|
-
code: {
|
|
837
|
-
family: `var(${varNames.font.code.family})`,
|
|
838
|
-
sizes: theme.FONT_CODE_SIZE.reduce((acc, size) => ({
|
|
839
|
-
...acc,
|
|
840
|
-
[size]: {
|
|
841
|
-
fontSize: `var(${varNames.font.code.sizes[size].fontSize})`,
|
|
842
|
-
ascenderHeight: `var(${varNames.font.code.sizes[size].ascenderHeight})`,
|
|
843
|
-
descenderHeight: `var(${varNames.font.code.sizes[size].descenderHeight})`,
|
|
844
|
-
lineHeight: `var(${varNames.font.code.sizes[size].lineHeight})`,
|
|
845
|
-
letterSpacing: `var(${varNames.font.code.sizes[size].letterSpacing})`,
|
|
846
|
-
iconSize: `var(${varNames.font.code.sizes[size].iconSize})`
|
|
847
|
-
}
|
|
848
|
-
}), {}),
|
|
849
|
-
weight: {
|
|
850
|
-
regular: `var(${varNames.font.code.weights.regular})`,
|
|
851
|
-
medium: `var(${varNames.font.code.weights.medium})`,
|
|
852
|
-
semibold: `var(${varNames.font.code.weights.semibold})`,
|
|
853
|
-
bold: `var(${varNames.font.code.weights.bold})`
|
|
221
|
+
button: {
|
|
222
|
+
boxShadow: null,
|
|
223
|
+
focusRing: {
|
|
224
|
+
offset: px(theme$1.button.focusRing.offset),
|
|
225
|
+
width: px(theme$1.button.focusRing.width)
|
|
226
|
+
},
|
|
227
|
+
border: {
|
|
228
|
+
width: px(theme$1.button.border.width)
|
|
854
229
|
}
|
|
855
230
|
},
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
...acc,
|
|
860
|
-
[size]: {
|
|
861
|
-
fontSize: `var(${varNames.font.heading.sizes[size].fontSize})`,
|
|
862
|
-
ascenderHeight: `var(${varNames.font.heading.sizes[size].ascenderHeight})`,
|
|
863
|
-
descenderHeight: `var(${varNames.font.heading.sizes[size].descenderHeight})`,
|
|
864
|
-
lineHeight: `var(${varNames.font.heading.sizes[size].lineHeight})`,
|
|
865
|
-
letterSpacing: `var(${varNames.font.heading.sizes[size].letterSpacing})`,
|
|
866
|
-
iconSize: `var(${varNames.font.heading.sizes[size].iconSize})`
|
|
867
|
-
}
|
|
868
|
-
}), {}),
|
|
869
|
-
weight: {
|
|
870
|
-
regular: `var(${varNames.font.heading.weights.regular})`,
|
|
871
|
-
medium: `var(${varNames.font.heading.weights.medium})`,
|
|
872
|
-
semibold: `var(${varNames.font.heading.weights.semibold})`,
|
|
873
|
-
bold: `var(${varNames.font.heading.weights.bold})`
|
|
231
|
+
card: {
|
|
232
|
+
shadow: {
|
|
233
|
+
outline: px(theme$1.card.shadow.outline)
|
|
874
234
|
}
|
|
875
235
|
},
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
236
|
+
color: {
|
|
237
|
+
backdrop: null,
|
|
238
|
+
bg: null,
|
|
239
|
+
border: null,
|
|
240
|
+
code: {
|
|
241
|
+
bg: null,
|
|
242
|
+
fg: null,
|
|
243
|
+
token: {
|
|
244
|
+
atrule: null,
|
|
245
|
+
attrName: null,
|
|
246
|
+
attrValue: null,
|
|
247
|
+
attribute: null,
|
|
248
|
+
boolean: null,
|
|
249
|
+
builtin: null,
|
|
250
|
+
cdata: null,
|
|
251
|
+
char: null,
|
|
252
|
+
class: null,
|
|
253
|
+
className: null,
|
|
254
|
+
comment: null,
|
|
255
|
+
constant: null,
|
|
256
|
+
deleted: null,
|
|
257
|
+
doctype: null,
|
|
258
|
+
entity: null,
|
|
259
|
+
function: null,
|
|
260
|
+
hexcode: null,
|
|
261
|
+
id: null,
|
|
262
|
+
important: null,
|
|
263
|
+
inserted: null,
|
|
264
|
+
keyword: null,
|
|
265
|
+
number: null,
|
|
266
|
+
operator: null,
|
|
267
|
+
prolog: null,
|
|
268
|
+
property: null,
|
|
269
|
+
pseudoClass: null,
|
|
270
|
+
pseudoElement: null,
|
|
271
|
+
punctuation: null,
|
|
272
|
+
regex: null,
|
|
273
|
+
selector: null,
|
|
274
|
+
string: null,
|
|
275
|
+
symbol: null,
|
|
276
|
+
tag: null,
|
|
277
|
+
unit: null,
|
|
278
|
+
url: null,
|
|
279
|
+
variable: null
|
|
887
280
|
}
|
|
888
|
-
}
|
|
281
|
+
},
|
|
282
|
+
fg: null,
|
|
283
|
+
focusRing: null,
|
|
284
|
+
link: {
|
|
285
|
+
fg: null
|
|
286
|
+
},
|
|
287
|
+
avatar: {
|
|
288
|
+
bg: null,
|
|
289
|
+
fg: null,
|
|
290
|
+
..._fromEntries(theme.AVATAR_COLORS.map((c) => [c, {
|
|
291
|
+
bg: null,
|
|
292
|
+
fg: null
|
|
293
|
+
}]))
|
|
294
|
+
},
|
|
295
|
+
button: {},
|
|
296
|
+
input: {
|
|
297
|
+
checkbox: {
|
|
298
|
+
bg: null,
|
|
299
|
+
border: null,
|
|
300
|
+
fg: null
|
|
301
|
+
},
|
|
302
|
+
radio: {
|
|
303
|
+
bg: null,
|
|
304
|
+
border: null,
|
|
305
|
+
fg: null
|
|
306
|
+
},
|
|
307
|
+
text: {
|
|
308
|
+
bg: null,
|
|
309
|
+
fg: null,
|
|
310
|
+
border: null,
|
|
311
|
+
placeholder: null,
|
|
312
|
+
invalid: {
|
|
313
|
+
bg: null,
|
|
314
|
+
border: null,
|
|
315
|
+
fg: null
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
switch: {
|
|
319
|
+
bg: null,
|
|
320
|
+
fg: null
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
muted: {
|
|
324
|
+
bg: null,
|
|
325
|
+
fg: null
|
|
326
|
+
},
|
|
327
|
+
shadow: {
|
|
328
|
+
outline: null,
|
|
329
|
+
umbra: null,
|
|
330
|
+
penumbra: null,
|
|
331
|
+
ambient: null
|
|
332
|
+
},
|
|
333
|
+
skeleton: {
|
|
334
|
+
from: null,
|
|
335
|
+
to: null
|
|
336
|
+
},
|
|
337
|
+
light: _fromEntries(theme.THEME_COLOR_CARD_TONES.map((t) => [t, buildCardContract({
|
|
338
|
+
theme: theme$1,
|
|
339
|
+
scheme: "light",
|
|
340
|
+
tone: t
|
|
341
|
+
})])),
|
|
342
|
+
dark: _fromEntries(theme.THEME_COLOR_CARD_TONES.map((t) => [t, buildCardContract({
|
|
343
|
+
theme: theme$1,
|
|
344
|
+
scheme: "dark",
|
|
345
|
+
tone: t
|
|
346
|
+
})])),
|
|
347
|
+
// tones
|
|
348
|
+
..._fromEntries(theme.THEME_COLOR_CARD_TONES.map((t) => [t, {
|
|
349
|
+
avatar: {
|
|
350
|
+
..._fromEntries(theme.AVATAR_COLORS.map((c) => [c, {
|
|
351
|
+
bg: null,
|
|
352
|
+
fg: null
|
|
353
|
+
}]))
|
|
354
|
+
},
|
|
355
|
+
backdrop: null,
|
|
356
|
+
code: {
|
|
357
|
+
bg: null,
|
|
358
|
+
fg: null,
|
|
359
|
+
token: {
|
|
360
|
+
atrule: null,
|
|
361
|
+
attrName: null,
|
|
362
|
+
attrValue: null,
|
|
363
|
+
attribute: null,
|
|
364
|
+
boolean: null,
|
|
365
|
+
builtin: null,
|
|
366
|
+
cdata: null,
|
|
367
|
+
char: null,
|
|
368
|
+
class: null,
|
|
369
|
+
className: null,
|
|
370
|
+
comment: null,
|
|
371
|
+
constant: null,
|
|
372
|
+
deleted: null,
|
|
373
|
+
doctype: null,
|
|
374
|
+
entity: null,
|
|
375
|
+
function: null,
|
|
376
|
+
hexcode: null,
|
|
377
|
+
id: null,
|
|
378
|
+
important: null,
|
|
379
|
+
inserted: null,
|
|
380
|
+
keyword: null,
|
|
381
|
+
number: null,
|
|
382
|
+
operator: null,
|
|
383
|
+
prolog: null,
|
|
384
|
+
property: null,
|
|
385
|
+
pseudoClass: null,
|
|
386
|
+
pseudoElement: null,
|
|
387
|
+
punctuation: null,
|
|
388
|
+
regex: null,
|
|
389
|
+
selector: null,
|
|
390
|
+
string: null,
|
|
391
|
+
symbol: null,
|
|
392
|
+
tag: null,
|
|
393
|
+
unit: null,
|
|
394
|
+
url: null,
|
|
395
|
+
variable: null
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
focusRing: null,
|
|
399
|
+
link: {
|
|
400
|
+
fg: null
|
|
401
|
+
},
|
|
402
|
+
shadow: {
|
|
403
|
+
outline: null,
|
|
404
|
+
umbra: null,
|
|
405
|
+
penumbra: null,
|
|
406
|
+
ambient: null
|
|
407
|
+
},
|
|
408
|
+
skeleton: {
|
|
409
|
+
from: null,
|
|
410
|
+
to: null
|
|
411
|
+
},
|
|
412
|
+
..._fromEntries(theme.COLOR_VARIANTS.map((v) => [v, {
|
|
413
|
+
bg: {
|
|
414
|
+
0: null,
|
|
415
|
+
1: null,
|
|
416
|
+
2: null,
|
|
417
|
+
3: null,
|
|
418
|
+
4: null
|
|
419
|
+
},
|
|
420
|
+
fg: {
|
|
421
|
+
0: null,
|
|
422
|
+
1: null,
|
|
423
|
+
2: null,
|
|
424
|
+
3: null,
|
|
425
|
+
4: null
|
|
426
|
+
},
|
|
427
|
+
border: {
|
|
428
|
+
0: null,
|
|
429
|
+
1: null,
|
|
430
|
+
2: null,
|
|
431
|
+
3: null,
|
|
432
|
+
4: null
|
|
433
|
+
},
|
|
434
|
+
..._fromEntries(theme.THEME_COLOR_STATE_TONES.map((t2) => [t2, {
|
|
435
|
+
bg: {
|
|
436
|
+
0: null,
|
|
437
|
+
1: null,
|
|
438
|
+
2: null,
|
|
439
|
+
3: null,
|
|
440
|
+
4: null
|
|
441
|
+
},
|
|
442
|
+
fg: {
|
|
443
|
+
0: null,
|
|
444
|
+
1: null,
|
|
445
|
+
2: null,
|
|
446
|
+
3: null,
|
|
447
|
+
4: null
|
|
448
|
+
},
|
|
449
|
+
border: {
|
|
450
|
+
0: null,
|
|
451
|
+
1: null,
|
|
452
|
+
2: null,
|
|
453
|
+
3: null,
|
|
454
|
+
4: null
|
|
455
|
+
}
|
|
456
|
+
}]))
|
|
457
|
+
}]))
|
|
458
|
+
}])),
|
|
459
|
+
..._fromEntries(theme.COLOR_VARIANTS.map((v) => [v, {
|
|
460
|
+
bg: {
|
|
461
|
+
0: null,
|
|
462
|
+
1: null,
|
|
463
|
+
2: null,
|
|
464
|
+
3: null,
|
|
465
|
+
4: null
|
|
466
|
+
},
|
|
467
|
+
fg: {
|
|
468
|
+
0: null,
|
|
469
|
+
1: null,
|
|
470
|
+
2: null,
|
|
471
|
+
3: null,
|
|
472
|
+
4: null
|
|
473
|
+
},
|
|
474
|
+
border: {
|
|
475
|
+
0: null,
|
|
476
|
+
1: null,
|
|
477
|
+
2: null,
|
|
478
|
+
3: null,
|
|
479
|
+
4: null
|
|
480
|
+
},
|
|
481
|
+
..._fromEntries(theme.THEME_COLOR_STATE_TONES.map((t) => [t, {
|
|
482
|
+
bg: {
|
|
483
|
+
0: null,
|
|
484
|
+
1: null,
|
|
485
|
+
2: null,
|
|
486
|
+
3: null,
|
|
487
|
+
4: null
|
|
488
|
+
},
|
|
489
|
+
fg: {
|
|
490
|
+
0: null,
|
|
491
|
+
1: null,
|
|
492
|
+
2: null,
|
|
493
|
+
3: null,
|
|
494
|
+
4: null
|
|
495
|
+
},
|
|
496
|
+
border: {
|
|
497
|
+
0: null,
|
|
498
|
+
1: null,
|
|
499
|
+
2: null,
|
|
500
|
+
3: null,
|
|
501
|
+
4: null
|
|
502
|
+
}
|
|
503
|
+
}]))
|
|
504
|
+
}]))
|
|
505
|
+
},
|
|
506
|
+
container: _fromEntries(theme.CONTAINER_SCALE.map((c) => [c, px(theme$1.container[c])])),
|
|
507
|
+
font: {
|
|
508
|
+
family: null,
|
|
509
|
+
fontSize: null,
|
|
510
|
+
letterSpacing: null,
|
|
511
|
+
lineHeight: null,
|
|
512
|
+
ascenderHeight: null,
|
|
513
|
+
descenderHeight: null,
|
|
514
|
+
iconSize: null,
|
|
515
|
+
featureSettings: null,
|
|
516
|
+
fontWeight: null,
|
|
517
|
+
iconOffset: null,
|
|
518
|
+
code: {
|
|
519
|
+
family: theme$1.font.code.family,
|
|
520
|
+
featureSettings: theme$1.font.code.featureSettings ?? "normal",
|
|
521
|
+
weight: {
|
|
522
|
+
regular: String(theme$1.font.code.weights.regular),
|
|
523
|
+
medium: String(theme$1.font.code.weights.medium),
|
|
524
|
+
semibold: String(theme$1.font.code.weights.semibold),
|
|
525
|
+
bold: String(theme$1.font.code.weights.bold)
|
|
526
|
+
},
|
|
527
|
+
sizes: _fromEntries(theme.FONT_CODE_SIZE.map((s) => [s, {
|
|
528
|
+
fontSize: rem(theme$1.font.code.sizes[s].fontSize),
|
|
529
|
+
lineHeight: rem(theme$1.font.code.sizes[s].lineHeight),
|
|
530
|
+
letterSpacing: rem(theme$1.font.code.sizes[s].letterSpacing),
|
|
531
|
+
ascenderHeight: rem(theme$1.font.code.sizes[s].ascenderHeight),
|
|
532
|
+
descenderHeight: rem(theme$1.font.code.sizes[s].descenderHeight),
|
|
533
|
+
iconSize: rem(theme$1.font.code.sizes[s].iconSize)
|
|
534
|
+
}]))
|
|
535
|
+
},
|
|
536
|
+
heading: {
|
|
537
|
+
family: theme$1.font.heading.family,
|
|
538
|
+
featureSettings: theme$1.font.heading.featureSettings ?? "normal",
|
|
539
|
+
weight: {
|
|
540
|
+
regular: String(theme$1.font.heading.weights.regular),
|
|
541
|
+
medium: String(theme$1.font.heading.weights.medium),
|
|
542
|
+
semibold: String(theme$1.font.heading.weights.semibold),
|
|
543
|
+
bold: String(theme$1.font.heading.weights.bold)
|
|
544
|
+
},
|
|
545
|
+
sizes: _fromEntries(theme.FONT_HEADING_SIZE.map((s) => [s, {
|
|
546
|
+
fontSize: rem(theme$1.font.heading.sizes[s].fontSize),
|
|
547
|
+
lineHeight: rem(theme$1.font.heading.sizes[s].lineHeight),
|
|
548
|
+
letterSpacing: rem(theme$1.font.heading.sizes[s].letterSpacing),
|
|
549
|
+
ascenderHeight: rem(theme$1.font.heading.sizes[s].ascenderHeight),
|
|
550
|
+
descenderHeight: rem(theme$1.font.heading.sizes[s].descenderHeight),
|
|
551
|
+
iconSize: rem(theme$1.font.heading.sizes[s].iconSize)
|
|
552
|
+
}]))
|
|
553
|
+
},
|
|
554
|
+
label: {
|
|
555
|
+
family: theme$1.font.label.family,
|
|
556
|
+
featureSettings: theme$1.font.label.featureSettings ?? "normal",
|
|
557
|
+
weight: {
|
|
558
|
+
regular: String(theme$1.font.label.weights.regular),
|
|
559
|
+
medium: String(theme$1.font.label.weights.medium),
|
|
560
|
+
semibold: String(theme$1.font.label.weights.semibold),
|
|
561
|
+
bold: String(theme$1.font.label.weights.bold)
|
|
562
|
+
},
|
|
563
|
+
sizes: _fromEntries(theme.FONT_LABEL_SIZE.map((s) => [s, {
|
|
564
|
+
fontSize: rem(theme$1.font.label.sizes[s].fontSize),
|
|
565
|
+
lineHeight: rem(theme$1.font.label.sizes[s].lineHeight),
|
|
566
|
+
letterSpacing: rem(theme$1.font.label.sizes[s].letterSpacing),
|
|
567
|
+
ascenderHeight: rem(theme$1.font.label.sizes[s].ascenderHeight),
|
|
568
|
+
descenderHeight: rem(theme$1.font.label.sizes[s].descenderHeight),
|
|
569
|
+
iconSize: rem(theme$1.font.label.sizes[s].iconSize)
|
|
570
|
+
}]))
|
|
571
|
+
},
|
|
572
|
+
text: {
|
|
573
|
+
family: theme$1.font.text.family,
|
|
574
|
+
featureSettings: theme$1.font.text.featureSettings ?? "normal",
|
|
575
|
+
weight: {
|
|
576
|
+
regular: String(theme$1.font.text.weights.regular),
|
|
577
|
+
medium: String(theme$1.font.text.weights.medium),
|
|
578
|
+
semibold: String(theme$1.font.text.weights.semibold),
|
|
579
|
+
bold: String(theme$1.font.text.weights.bold)
|
|
580
|
+
},
|
|
581
|
+
sizes: _fromEntries(theme.FONT_TEXT_SIZE.map((s) => [s, {
|
|
582
|
+
fontSize: rem(theme$1.font.text.sizes[s].fontSize),
|
|
583
|
+
lineHeight: rem(theme$1.font.text.sizes[s].lineHeight),
|
|
584
|
+
letterSpacing: rem(theme$1.font.text.sizes[s].letterSpacing),
|
|
585
|
+
ascenderHeight: rem(theme$1.font.text.sizes[s].ascenderHeight),
|
|
586
|
+
descenderHeight: rem(theme$1.font.text.sizes[s].descenderHeight),
|
|
587
|
+
iconSize: rem(theme$1.font.text.sizes[s].iconSize)
|
|
588
|
+
}]))
|
|
589
|
+
},
|
|
590
|
+
skeleton: {
|
|
591
|
+
lineHeight: null,
|
|
592
|
+
ascenderHeight: null,
|
|
593
|
+
descenderHeight: null
|
|
594
|
+
},
|
|
889
595
|
weight: {
|
|
890
|
-
regular:
|
|
891
|
-
medium:
|
|
892
|
-
semibold:
|
|
893
|
-
bold:
|
|
596
|
+
regular: null,
|
|
597
|
+
medium: null,
|
|
598
|
+
semibold: null,
|
|
599
|
+
bold: null
|
|
894
600
|
}
|
|
895
601
|
},
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
602
|
+
input: {
|
|
603
|
+
gap: null,
|
|
604
|
+
descenderHeight: null,
|
|
605
|
+
ascenderHeight: null,
|
|
606
|
+
fontSize: null,
|
|
607
|
+
lineHeight: null,
|
|
608
|
+
letterSpacing: null,
|
|
609
|
+
padding: null,
|
|
610
|
+
border: {
|
|
611
|
+
width: px(theme$1.input.border.width)
|
|
612
|
+
},
|
|
613
|
+
checkbox: {
|
|
614
|
+
size: px(theme$1.input.checkbox.size),
|
|
615
|
+
focusRing: {
|
|
616
|
+
offset: px(theme$1.input.checkbox.focusRing.offset),
|
|
617
|
+
width: px(theme$1.input.checkbox.focusRing.width)
|
|
907
618
|
}
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
ascenderHeight: "var(--input-ascender-height)",
|
|
922
|
-
descenderHeight: "var(--input-descender-height)",
|
|
923
|
-
// capHeight: `var(--input-cap-height)`,
|
|
924
|
-
gap: "var(--input-gap)",
|
|
925
|
-
padding: "var(--input-padding)",
|
|
926
|
-
text: {
|
|
927
|
-
focusRing: {
|
|
928
|
-
width: "var(--input-text-focus-ring-width)",
|
|
929
|
-
offset: "var(--input-text-focus-ring-offset)"
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
},
|
|
933
|
-
radius: Object.fromEntries(theme.RADIUS.map((radius2) => [radius2, `var(${varNames.radius[radius2]})`])),
|
|
934
|
-
shadow: Object.fromEntries(theme.SHADOW.map((shadow2) => [shadow2, {
|
|
935
|
-
umbra: `var(${varNames.shadow[shadow2].umbra})`,
|
|
936
|
-
penumbra: `var(${varNames.shadow[shadow2].penumbra})`,
|
|
937
|
-
ambient: `var(${varNames.shadow[shadow2].ambient})`
|
|
938
|
-
}])),
|
|
939
|
-
space: Object.fromEntries(theme.SPACE.map((space) => [space, `var(${varNames.space[space]})`])),
|
|
940
|
-
// color
|
|
941
|
-
black: `var(${varNames.black})`,
|
|
942
|
-
white: `var(${varNames.white})`,
|
|
943
|
-
...color.COLOR_HUES.reduce((acc, hue) => {
|
|
944
|
-
const tints = {};
|
|
945
|
-
for (const tint of color.COLOR_TINTS)
|
|
946
|
-
tints[tint] = `var(--${hue}-${tint})`;
|
|
947
|
-
return acc[hue] = tints, acc;
|
|
948
|
-
}, {})
|
|
949
|
-
};
|
|
950
|
-
function buildColorCardVars(props) {
|
|
951
|
-
const {
|
|
952
|
-
scheme,
|
|
953
|
-
tone
|
|
954
|
-
} = props, prefix = scheme ? varNames.color[scheme][tone] : varNames.color[tone];
|
|
955
|
-
return {
|
|
956
|
-
avatar: {
|
|
957
|
-
...theme.THEME_COLOR_AVATAR_COLORS.reduce((acc, color2) => ({
|
|
958
|
-
...acc,
|
|
959
|
-
[color2]: {
|
|
960
|
-
bg: `var(${prefix.avatar[color2].bg})`,
|
|
961
|
-
fg: `var(${prefix.avatar[color2].fg})`
|
|
619
|
+
},
|
|
620
|
+
radio: {
|
|
621
|
+
focusRing: {
|
|
622
|
+
offset: px(theme$1.input.radio.focusRing.offset),
|
|
623
|
+
width: px(theme$1.input.radio.focusRing.width)
|
|
624
|
+
},
|
|
625
|
+
markSize: px(theme$1.input.radio.markSize),
|
|
626
|
+
size: px(theme$1.input.radio.size)
|
|
627
|
+
},
|
|
628
|
+
select: {
|
|
629
|
+
focusRing: {
|
|
630
|
+
offset: px(theme$1.input.select.focusRing.offset),
|
|
631
|
+
width: px(theme$1.input.select.focusRing.width)
|
|
962
632
|
}
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
entity: `var(${prefix.code.token.entity})`,
|
|
985
|
-
function: `var(${prefix.code.token.function})`,
|
|
986
|
-
hexcode: `var(${prefix.code.token.hexcode})`,
|
|
987
|
-
id: `var(${prefix.code.token.id})`,
|
|
988
|
-
important: `var(${prefix.code.token.important})`,
|
|
989
|
-
inserted: `var(${prefix.code.token.inserted})`,
|
|
990
|
-
keyword: `var(${prefix.code.token.keyword})`,
|
|
991
|
-
number: `var(${prefix.code.token.number})`,
|
|
992
|
-
operator: `var(${prefix.code.token.operator})`,
|
|
993
|
-
prolog: `var(${prefix.code.token.prolog})`,
|
|
994
|
-
property: `var(${prefix.code.token.property})`,
|
|
995
|
-
pseudoClass: `var(${prefix.code.token.pseudoClass})`,
|
|
996
|
-
pseudoElement: `var(${prefix.code.token.pseudoElement})`,
|
|
997
|
-
punctuation: `var(${prefix.code.token.punctuation})`,
|
|
998
|
-
regex: `var(${prefix.code.token.regex})`,
|
|
999
|
-
selector: `var(${prefix.code.token.selector})`,
|
|
1000
|
-
string: `var(${prefix.code.token.string})`,
|
|
1001
|
-
symbol: `var(${prefix.code.token.symbol})`,
|
|
1002
|
-
tag: `var(${prefix.code.token.tag})`,
|
|
1003
|
-
unit: `var(${prefix.code.token.unit})`,
|
|
1004
|
-
url: `var(${prefix.code.token.url})`,
|
|
1005
|
-
variable: `var(${prefix.code.token.variable})`
|
|
633
|
+
},
|
|
634
|
+
text: {
|
|
635
|
+
focusRing: {
|
|
636
|
+
offset: px(theme$1.input.text.focusRing.offset),
|
|
637
|
+
width: px(theme$1.input.text.focusRing.width)
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
switch: {
|
|
641
|
+
width: px(theme$1.input.switch.width),
|
|
642
|
+
height: px(theme$1.input.switch.height),
|
|
643
|
+
focusRing: {
|
|
644
|
+
offset: px(theme$1.input.switch.focusRing.offset),
|
|
645
|
+
width: px(theme$1.input.switch.focusRing.width)
|
|
646
|
+
},
|
|
647
|
+
padding: px(theme$1.input.switch.padding),
|
|
648
|
+
thumb: {
|
|
649
|
+
offset: null,
|
|
650
|
+
size: null
|
|
651
|
+
},
|
|
652
|
+
transitionDurationMs: `${theme$1.input.switch.transitionDurationMs}ms`,
|
|
653
|
+
transitionTimingFunction: theme$1.input.switch.transitionTimingFunction
|
|
1006
654
|
}
|
|
1007
655
|
},
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
from: `var(${prefix.skeleton.from})`,
|
|
1024
|
-
to: `var(${prefix.skeleton.to})`
|
|
1025
|
-
},
|
|
1026
|
-
solid: buildColorVariantVars({
|
|
1027
|
-
scheme,
|
|
1028
|
-
tone,
|
|
1029
|
-
variant: "solid"
|
|
656
|
+
radius: _fromEntries(theme.RADIUS.map((r) => [r, px(theme$1.radius[r])])),
|
|
657
|
+
shadow: _fromEntries(theme.SHADOW.map((s) => [s, {
|
|
658
|
+
umbra: toBoxShadow(theme$1.shadow[s]?.umbra),
|
|
659
|
+
penumbra: toBoxShadow(theme$1.shadow[s]?.penumbra),
|
|
660
|
+
ambient: toBoxShadow(theme$1.shadow[s]?.ambient)
|
|
661
|
+
}])),
|
|
662
|
+
space: _fromEntries(theme.SPACE.map((s) => [s, px(theme$1.space[s])]))
|
|
663
|
+
}, {
|
|
664
|
+
layer: "theme",
|
|
665
|
+
prefix: "s"
|
|
666
|
+
});
|
|
667
|
+
return {
|
|
668
|
+
vars: Object.freeze({
|
|
669
|
+
...paletteResult.vars,
|
|
670
|
+
...themeResult.vars
|
|
1030
671
|
}),
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
672
|
+
varNames: Object.freeze({
|
|
673
|
+
...paletteResult.varNames,
|
|
674
|
+
...themeResult.varNames
|
|
675
|
+
}),
|
|
676
|
+
properties: Object.freeze({
|
|
677
|
+
...paletteResult.properties,
|
|
678
|
+
...themeResult.properties
|
|
1035
679
|
})
|
|
1036
680
|
};
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
681
|
+
function renderColor(t, options2) {
|
|
682
|
+
const {
|
|
683
|
+
bgValue = "transparent"
|
|
684
|
+
} = options2, color = theme._parseColorToken(t, options2);
|
|
685
|
+
if (color.type === "inherit")
|
|
686
|
+
return bgValue;
|
|
687
|
+
let value = "#000";
|
|
688
|
+
return color.type === "color" && (value = paletteResult.vars.palette[color.name]), color.type === "tint" && (value = paletteResult.vars.palette[color.hue][color.tint]), color.opacity < 1 && (value = `color-mix(in srgb, transparent, ${value} ${color.opacity * 100}%)`), color.mix < 1 && (value = `color-mix(in srgb, ${bgValue}, ${value} ${color.mix * 100}%)`), value;
|
|
689
|
+
}
|
|
690
|
+
function buildCardContract(options2) {
|
|
691
|
+
const {
|
|
692
|
+
theme: theme2,
|
|
693
|
+
scheme,
|
|
694
|
+
tone
|
|
695
|
+
} = options2, card2 = theme2.color[tone], cardOptions = {
|
|
696
|
+
defaultHue: card2._hue
|
|
697
|
+
}, i = scheme === "dark" ? 1 : 0, defaultElement = buildElementContract({
|
|
698
|
+
card: card2,
|
|
699
|
+
variant: "tinted",
|
|
700
|
+
tone: "default",
|
|
701
|
+
scheme
|
|
702
|
+
});
|
|
703
|
+
return {
|
|
704
|
+
avatar: _fromEntries(theme.AVATAR_COLORS.map((c) => [c, {
|
|
705
|
+
bg: renderColor(card2.avatar[c].bg[i], {
|
|
706
|
+
defaultHue: c
|
|
707
|
+
}),
|
|
708
|
+
fg: renderColor(card2.avatar[c].fg[i], {
|
|
709
|
+
defaultHue: c
|
|
710
|
+
})
|
|
711
|
+
}])),
|
|
712
|
+
backdrop: renderColor(card2.backdrop[i], cardOptions),
|
|
713
|
+
code: {
|
|
714
|
+
bg: renderColor(card2.code.bg[i], cardOptions),
|
|
715
|
+
fg: renderColor(card2.code.fg[i], cardOptions),
|
|
716
|
+
token: {
|
|
717
|
+
atrule: renderColor(card2.code.token.atrule[i], cardOptions),
|
|
718
|
+
attrName: renderColor(card2.code.token.attrName[i], cardOptions),
|
|
719
|
+
attrValue: renderColor(card2.code.token.attrValue[i], cardOptions),
|
|
720
|
+
attribute: renderColor(card2.code.token.attribute[i], cardOptions),
|
|
721
|
+
boolean: renderColor(card2.code.token.boolean[i], cardOptions),
|
|
722
|
+
builtin: renderColor(card2.code.token.builtin[i], cardOptions),
|
|
723
|
+
cdata: renderColor(card2.code.token.cdata[i], cardOptions),
|
|
724
|
+
char: renderColor(card2.code.token.char[i], cardOptions),
|
|
725
|
+
class: renderColor(card2.code.token.class[i], cardOptions),
|
|
726
|
+
className: renderColor(card2.code.token.className[i], cardOptions),
|
|
727
|
+
comment: renderColor(card2.code.token.comment[i], cardOptions),
|
|
728
|
+
constant: renderColor(card2.code.token.constant[i], cardOptions),
|
|
729
|
+
deleted: renderColor(card2.code.token.deleted[i], cardOptions),
|
|
730
|
+
doctype: renderColor(card2.code.token.doctype[i], cardOptions),
|
|
731
|
+
entity: renderColor(card2.code.token.entity[i], cardOptions),
|
|
732
|
+
function: renderColor(card2.code.token.function[i], cardOptions),
|
|
733
|
+
hexcode: renderColor(card2.code.token.hexcode[i], cardOptions),
|
|
734
|
+
id: renderColor(card2.code.token.id[i], cardOptions),
|
|
735
|
+
important: renderColor(card2.code.token.important[i], cardOptions),
|
|
736
|
+
inserted: renderColor(card2.code.token.inserted[i], cardOptions),
|
|
737
|
+
keyword: renderColor(card2.code.token.keyword[i], cardOptions),
|
|
738
|
+
number: renderColor(card2.code.token.number[i], cardOptions),
|
|
739
|
+
operator: renderColor(card2.code.token.operator[i], cardOptions),
|
|
740
|
+
prolog: renderColor(card2.code.token.prolog[i], cardOptions),
|
|
741
|
+
property: renderColor(card2.code.token.property[i], cardOptions),
|
|
742
|
+
pseudoClass: renderColor(card2.code.token.pseudoClass[i], cardOptions),
|
|
743
|
+
pseudoElement: renderColor(card2.code.token.pseudoElement[i], cardOptions),
|
|
744
|
+
punctuation: renderColor(card2.code.token.punctuation[i], cardOptions),
|
|
745
|
+
regex: renderColor(card2.code.token.regex[i], cardOptions),
|
|
746
|
+
selector: renderColor(card2.code.token.selector[i], cardOptions),
|
|
747
|
+
string: renderColor(card2.code.token.string[i], cardOptions),
|
|
748
|
+
symbol: renderColor(card2.code.token.symbol[i], cardOptions),
|
|
749
|
+
tag: renderColor(card2.code.token.tag[i], cardOptions),
|
|
750
|
+
unit: renderColor(card2.code.token.unit[i], cardOptions),
|
|
751
|
+
url: renderColor(card2.code.token.url[i], cardOptions),
|
|
752
|
+
variable: renderColor(card2.code.token.variable[i], cardOptions)
|
|
753
|
+
}
|
|
754
|
+
},
|
|
755
|
+
focusRing: renderColor(card2.focusRing[i], cardOptions),
|
|
756
|
+
link: {
|
|
757
|
+
fg: renderColor(card2.link.fg[i], cardOptions)
|
|
758
|
+
},
|
|
759
|
+
shadow: {
|
|
760
|
+
outline: renderColor(card2.shadow.outline[i], cardOptions),
|
|
761
|
+
umbra: renderColor(card2.shadow.umbra[i], cardOptions),
|
|
762
|
+
penumbra: renderColor(card2.shadow.penumbra[i], cardOptions),
|
|
763
|
+
ambient: renderColor(card2.shadow.ambient[i], cardOptions)
|
|
764
|
+
},
|
|
765
|
+
skeleton: {
|
|
766
|
+
from: renderColor(card2.skeleton.from[i], cardOptions),
|
|
767
|
+
to: renderColor(card2.skeleton.to[i], cardOptions)
|
|
768
|
+
},
|
|
769
|
+
..._fromEntries(theme.COLOR_VARIANTS.map((v) => [v, _fromEntries(theme.THEME_COLOR_STATE_TONES.map((e) => [e, v === "tinted" && e === "default" ? defaultElement : buildElementContract({
|
|
770
|
+
card: card2,
|
|
771
|
+
variant: v,
|
|
772
|
+
tone: e,
|
|
773
|
+
scheme,
|
|
774
|
+
bgValue: defaultElement.bg[0]
|
|
775
|
+
})]))]))
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
function buildElementContract(options2) {
|
|
779
|
+
const {
|
|
780
|
+
bgValue,
|
|
781
|
+
card: card2,
|
|
782
|
+
variant: v,
|
|
783
|
+
tone: e,
|
|
784
|
+
scheme
|
|
785
|
+
} = options2, element = card2.variant[v][e], elementOptions = {
|
|
786
|
+
bgValue,
|
|
787
|
+
defaultHue: element._hue
|
|
788
|
+
}, i = scheme === "dark" ? 1 : 0, bg = {
|
|
789
|
+
0: renderColor(element.bg[0][i], elementOptions),
|
|
790
|
+
4: renderColor(element.bg[4][i], elementOptions)
|
|
791
|
+
}, border2 = {
|
|
792
|
+
0: renderColor(element.border[0][i], elementOptions),
|
|
793
|
+
4: renderColor(element.border[4][i], elementOptions)
|
|
794
|
+
}, fg = {
|
|
795
|
+
0: renderColor(element.fg[0][i], elementOptions),
|
|
796
|
+
4: renderColor(element.fg[4][i], elementOptions)
|
|
797
|
+
};
|
|
798
|
+
return {
|
|
1069
799
|
bg: {
|
|
1070
|
-
0:
|
|
1071
|
-
1: `
|
|
1072
|
-
2: `
|
|
1073
|
-
3: `
|
|
1074
|
-
4:
|
|
800
|
+
0: bg[0],
|
|
801
|
+
1: `color-mix(in srgb, ${bg[0]}, ${bg[4]} 25%)`,
|
|
802
|
+
2: `color-mix(in srgb, ${bg[0]}, ${bg[4]} 50%)`,
|
|
803
|
+
3: `color-mix(in srgb, ${bg[0]}, ${bg[4]} 75%)`,
|
|
804
|
+
4: bg[4]
|
|
1075
805
|
},
|
|
1076
806
|
border: {
|
|
1077
|
-
0:
|
|
1078
|
-
1: `
|
|
1079
|
-
2: `
|
|
1080
|
-
3: `
|
|
1081
|
-
4:
|
|
807
|
+
0: border2[0],
|
|
808
|
+
1: `color-mix(in srgb, ${border2[0]}, ${border2[4]} 25%)`,
|
|
809
|
+
2: `color-mix(in srgb, ${border2[0]}, ${border2[4]} 50%)`,
|
|
810
|
+
3: `color-mix(in srgb, ${border2[0]}, ${border2[4]} 75%)`,
|
|
811
|
+
4: border2[4]
|
|
1082
812
|
},
|
|
1083
813
|
fg: {
|
|
1084
|
-
0:
|
|
1085
|
-
1: `
|
|
1086
|
-
2: `
|
|
1087
|
-
3: `
|
|
1088
|
-
4:
|
|
814
|
+
0: fg[0],
|
|
815
|
+
1: `color-mix(in srgb, ${fg[0]}, ${fg[4]} 25%)`,
|
|
816
|
+
2: `color-mix(in srgb, ${fg[0]}, ${fg[4]} 50%)`,
|
|
817
|
+
3: `color-mix(in srgb, ${fg[0]}, ${fg[4]} 75%)`,
|
|
818
|
+
4: fg[4]
|
|
1089
819
|
}
|
|
1090
820
|
};
|
|
1091
821
|
}
|
|
1092
|
-
return vars2;
|
|
1093
822
|
}
|
|
1094
|
-
|
|
1095
|
-
|
|
823
|
+
function px(value) {
|
|
824
|
+
return `${value}px`;
|
|
825
|
+
}
|
|
826
|
+
function rem(value) {
|
|
827
|
+
return `${value / 16}rem`;
|
|
828
|
+
}
|
|
829
|
+
function toBoxShadow(value) {
|
|
830
|
+
return value ? value.map((n) => px(n)).join(" ") : "none";
|
|
831
|
+
}
|
|
832
|
+
const result = resolveTheme({
|
|
833
|
+
theme: theme.buildTheme_v3()
|
|
834
|
+
}), vars = result.vars, varNames = result.varNames, properties = result.properties, util$v = {};
|
|
835
|
+
_responsiveRule(util$v, "border", {
|
|
1096
836
|
border: `1px solid ${vars.color.border}`
|
|
1097
837
|
});
|
|
1098
|
-
_responsiveRule(util$
|
|
838
|
+
_responsiveRule(util$v, "border-t", {
|
|
1099
839
|
borderTop: `1px solid ${vars.color.border}`
|
|
1100
840
|
});
|
|
1101
|
-
_responsiveRule(util$
|
|
841
|
+
_responsiveRule(util$v, "border-r", {
|
|
1102
842
|
borderRight: `1px solid ${vars.color.border}`
|
|
1103
843
|
});
|
|
1104
|
-
_responsiveRule(util$
|
|
844
|
+
_responsiveRule(util$v, "border-b", {
|
|
1105
845
|
borderBottom: `1px solid ${vars.color.border}`
|
|
1106
846
|
});
|
|
1107
|
-
_responsiveRule(util$
|
|
847
|
+
_responsiveRule(util$v, "border-l", {
|
|
1108
848
|
borderLeft: `1px solid ${vars.color.border}`
|
|
1109
849
|
});
|
|
1110
850
|
const borderStyle = {
|
|
851
|
+
layers: {
|
|
852
|
+
util: util$v
|
|
853
|
+
}
|
|
854
|
+
}, util$u = {};
|
|
855
|
+
_responsiveRule(util$u, "box-border", {
|
|
856
|
+
boxSizing: "border-box"
|
|
857
|
+
});
|
|
858
|
+
_responsiveRule(util$u, "box-content", {
|
|
859
|
+
boxSizing: "content-box"
|
|
860
|
+
});
|
|
861
|
+
const boxSizingStyle = {
|
|
1111
862
|
layers: {
|
|
1112
863
|
util: util$u
|
|
1113
864
|
}
|
|
1114
865
|
}, util$t = {};
|
|
1115
866
|
_responsiveRule(util$t, "block", {
|
|
1116
|
-
|
|
867
|
+
nest: {
|
|
1117
868
|
"&:not([hidden])": {
|
|
1118
869
|
display: "block"
|
|
1119
870
|
}
|
|
1120
871
|
}
|
|
1121
872
|
});
|
|
1122
873
|
_responsiveRule(util$t, "flex", {
|
|
1123
|
-
|
|
874
|
+
nest: {
|
|
1124
875
|
"&:not([hidden])": {
|
|
1125
876
|
display: "flex"
|
|
1126
877
|
}
|
|
1127
878
|
}
|
|
1128
879
|
});
|
|
1129
880
|
_responsiveRule(util$t, "grid", {
|
|
1130
|
-
|
|
881
|
+
nest: {
|
|
1131
882
|
"&:not([hidden])": {
|
|
1132
883
|
display: "grid"
|
|
1133
884
|
}
|
|
1134
885
|
}
|
|
1135
886
|
});
|
|
1136
887
|
_responsiveRule(util$t, "inline-block", {
|
|
1137
|
-
|
|
888
|
+
nest: {
|
|
1138
889
|
"&:not([hidden])": {
|
|
1139
890
|
display: "inline-block"
|
|
1140
891
|
}
|
|
1141
892
|
}
|
|
1142
893
|
});
|
|
1143
894
|
_responsiveRule(util$t, "inline-flex", {
|
|
1144
|
-
|
|
895
|
+
nest: {
|
|
1145
896
|
"&:not([hidden])": {
|
|
1146
897
|
display: "inline-flex"
|
|
1147
898
|
}
|
|
1148
899
|
}
|
|
1149
900
|
});
|
|
1150
901
|
_responsiveRule(util$t, "inline-grid", {
|
|
1151
|
-
|
|
902
|
+
nest: {
|
|
1152
903
|
"&:not([hidden])": {
|
|
1153
904
|
display: "inline-grid"
|
|
1154
905
|
}
|
|
1155
906
|
}
|
|
1156
907
|
});
|
|
1157
908
|
_responsiveRule(util$t, "none", {
|
|
1158
|
-
|
|
909
|
+
nest: {
|
|
1159
910
|
"&:not([hidden])": {
|
|
1160
911
|
display: "none"
|
|
1161
912
|
}
|
|
@@ -1285,23 +1036,25 @@ const flexStyle = {
|
|
|
1285
1036
|
}
|
|
1286
1037
|
}, primitive$q = {
|
|
1287
1038
|
".font": {
|
|
1288
|
-
fontFamily:
|
|
1289
|
-
fontFeatureSettings:
|
|
1290
|
-
fontSize:
|
|
1291
|
-
lineHeight:
|
|
1292
|
-
letterSpacing:
|
|
1293
|
-
fontWeight:
|
|
1294
|
-
transform:
|
|
1039
|
+
fontFamily: vars.font.family,
|
|
1040
|
+
fontFeatureSettings: vars.font.featureSettings,
|
|
1041
|
+
fontSize: vars.font.fontSize,
|
|
1042
|
+
lineHeight: vars.font.lineHeight,
|
|
1043
|
+
letterSpacing: vars.font.letterSpacing,
|
|
1044
|
+
fontWeight: vars.font.fontWeight,
|
|
1045
|
+
transform: `translateY(${vars.font.descenderHeight})`,
|
|
1295
1046
|
padding: "1px 0",
|
|
1296
1047
|
margin: "0",
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1048
|
+
vars: {
|
|
1049
|
+
[varNames.font.iconOffset]: `calc(((${vars.font.lineHeight} - ${vars.font.ascenderHeight} - ${vars.font.descenderHeight}) - ${vars.font.iconSize}) / 2)`,
|
|
1050
|
+
[varNames.font.fontWeight]: vars.font.weight.regular
|
|
1051
|
+
},
|
|
1052
|
+
nest: {
|
|
1300
1053
|
"&:before": {
|
|
1301
1054
|
content: '""',
|
|
1302
1055
|
display: "block",
|
|
1303
1056
|
height: 0,
|
|
1304
|
-
marginTop:
|
|
1057
|
+
marginTop: `calc((0px - ${vars.font.ascenderHeight} - ${vars.font.descenderHeight}) - 1px)`
|
|
1305
1058
|
},
|
|
1306
1059
|
"&:after": {
|
|
1307
1060
|
content: '""',
|
|
@@ -1314,29 +1067,37 @@ const flexStyle = {
|
|
|
1314
1067
|
// Make sure SVGs are rendered as inline elements
|
|
1315
1068
|
display: "inline"
|
|
1316
1069
|
},
|
|
1317
|
-
//
|
|
1070
|
+
// TODO
|
|
1318
1071
|
// '& svg:not([data-sanity-icon])': {
|
|
1319
1072
|
// fontSize: 'calc(var(--custom-icon-size) / 16 * 1rem)',
|
|
1320
1073
|
// margin: 'var(--custom-icon-offset)',
|
|
1321
1074
|
// },
|
|
1322
1075
|
"& [data-sanity-icon]": {
|
|
1323
|
-
fontSize:
|
|
1324
|
-
margin:
|
|
1076
|
+
fontSize: vars.font.iconSize,
|
|
1077
|
+
margin: vars.font.iconOffset,
|
|
1325
1078
|
vectorEffect: "non-scaling-stroke"
|
|
1326
1079
|
}
|
|
1327
1080
|
}
|
|
1328
1081
|
},
|
|
1329
1082
|
".font-regular": {
|
|
1330
|
-
|
|
1083
|
+
vars: {
|
|
1084
|
+
[varNames.font.fontWeight]: vars.font.weight.regular
|
|
1085
|
+
}
|
|
1331
1086
|
},
|
|
1332
1087
|
".font-medium": {
|
|
1333
|
-
|
|
1088
|
+
vars: {
|
|
1089
|
+
[varNames.font.fontWeight]: vars.font.weight.medium
|
|
1090
|
+
}
|
|
1334
1091
|
},
|
|
1335
1092
|
".font-semibold": {
|
|
1336
|
-
|
|
1093
|
+
vars: {
|
|
1094
|
+
[varNames.font.fontWeight]: vars.font.weight.semibold
|
|
1095
|
+
}
|
|
1337
1096
|
},
|
|
1338
1097
|
".font-bold": {
|
|
1339
|
-
|
|
1098
|
+
vars: {
|
|
1099
|
+
[varNames.font.fontWeight]: vars.font.weight.bold
|
|
1100
|
+
}
|
|
1340
1101
|
}
|
|
1341
1102
|
}, fontStyle = {
|
|
1342
1103
|
layers: {
|
|
@@ -1799,21 +1560,21 @@ for (const space of theme.SPACE)
|
|
|
1799
1560
|
marginTop: vars.space[space],
|
|
1800
1561
|
marginBottom: vars.space[space]
|
|
1801
1562
|
});
|
|
1802
|
-
for (const
|
|
1803
|
-
_responsiveRule(util$9, `mt-${
|
|
1804
|
-
marginTop: vars.space[
|
|
1563
|
+
for (const i of theme.SPACE)
|
|
1564
|
+
_responsiveRule(util$9, `mt-${i}`, {
|
|
1565
|
+
marginTop: vars.space[i]
|
|
1805
1566
|
});
|
|
1806
|
-
for (const
|
|
1807
|
-
_responsiveRule(util$9, `mr-${
|
|
1808
|
-
marginRight: vars.space[
|
|
1567
|
+
for (const i of theme.SPACE)
|
|
1568
|
+
_responsiveRule(util$9, `mr-${i}`, {
|
|
1569
|
+
marginRight: vars.space[i]
|
|
1809
1570
|
});
|
|
1810
|
-
for (const
|
|
1811
|
-
_responsiveRule(util$9, `mb-${
|
|
1812
|
-
marginBottom: vars.space[
|
|
1571
|
+
for (const i of theme.SPACE)
|
|
1572
|
+
_responsiveRule(util$9, `mb-${i}`, {
|
|
1573
|
+
marginBottom: vars.space[i]
|
|
1813
1574
|
});
|
|
1814
|
-
for (const
|
|
1815
|
-
_responsiveRule(util$9, `ml-${
|
|
1816
|
-
marginLeft: vars.space[
|
|
1575
|
+
for (const i of theme.SPACE)
|
|
1576
|
+
_responsiveRule(util$9, `ml-${i}`, {
|
|
1577
|
+
marginLeft: vars.space[i]
|
|
1817
1578
|
});
|
|
1818
1579
|
const marginStyle = {
|
|
1819
1580
|
layers: {
|
|
@@ -1992,11 +1753,11 @@ const radiusStyle = {
|
|
|
1992
1753
|
util: util$3
|
|
1993
1754
|
}
|
|
1994
1755
|
}, util$2 = {};
|
|
1995
|
-
for (const
|
|
1996
|
-
|
|
1756
|
+
for (const index of theme.SHADOW)
|
|
1757
|
+
index === 0 ? _responsiveRule(util$2, "shadow-0", {
|
|
1997
1758
|
boxShadow: "none"
|
|
1998
|
-
}) : _responsiveRule(util$2, `shadow-${
|
|
1999
|
-
boxShadow: [`0 0 0 ${vars.card.shadow.outline} ${vars.color.shadow.outline}`, `${vars.shadow[
|
|
1759
|
+
}) : _responsiveRule(util$2, `shadow-${index}`, {
|
|
1760
|
+
boxShadow: [`0 0 0 ${vars.card.shadow.outline} ${vars.color.shadow.outline}`, `${vars.shadow[index].umbra} ${vars.color.shadow.umbra}`, `${vars.shadow[index].penumbra} ${vars.color.shadow.penumbra}`, `${vars.shadow[index].ambient} ${vars.color.shadow.ambient}`].join(", ")
|
|
2000
1761
|
});
|
|
2001
1762
|
const shadowStyle = {
|
|
2002
1763
|
layers: {
|
|
@@ -2058,8 +1819,8 @@ const widthStyle = {
|
|
|
2058
1819
|
layers: {
|
|
2059
1820
|
component: component$5
|
|
2060
1821
|
}
|
|
2061
|
-
}, keyframes$2 = {
|
|
2062
|
-
|
|
1822
|
+
}, KEYFRAMES_DIALOG_ZOOM_IN = "dialog-zoom-in", KEYFRAMES_DIALOG_FADE_IN = "dialog-fade-in", keyframes$2 = {
|
|
1823
|
+
[KEYFRAMES_DIALOG_ZOOM_IN]: {
|
|
2063
1824
|
from: {
|
|
2064
1825
|
opacity: 0,
|
|
2065
1826
|
transform: "scale(0.95)"
|
|
@@ -2069,7 +1830,7 @@ const widthStyle = {
|
|
|
2069
1830
|
transform: "scale(1)"
|
|
2070
1831
|
}
|
|
2071
1832
|
},
|
|
2072
|
-
|
|
1833
|
+
[KEYFRAMES_DIALOG_FADE_IN]: {
|
|
2073
1834
|
from: {
|
|
2074
1835
|
opacity: 0
|
|
2075
1836
|
},
|
|
@@ -2079,21 +1840,16 @@ const widthStyle = {
|
|
|
2079
1840
|
}
|
|
2080
1841
|
}, component$4 = {
|
|
2081
1842
|
".dialog": {
|
|
2082
|
-
// 'top': 0,
|
|
2083
|
-
// 'left': 0,
|
|
2084
|
-
// 'right': 0,
|
|
2085
|
-
// 'bottom': 0,
|
|
2086
1843
|
alignItems: "center",
|
|
2087
1844
|
justifyContent: "center",
|
|
2088
1845
|
outline: "none",
|
|
2089
1846
|
background: vars.color.backdrop,
|
|
2090
|
-
|
|
1847
|
+
nest: {
|
|
2091
1848
|
"&[data-animate]": {
|
|
2092
|
-
animation:
|
|
1849
|
+
animation: `${KEYFRAMES_DIALOG_FADE_IN} 200ms ease-out`
|
|
2093
1850
|
},
|
|
2094
|
-
// Animates the dialog card.
|
|
2095
1851
|
'&[data-animate] > [data-ui="DialogCard"]': {
|
|
2096
|
-
animation:
|
|
1852
|
+
animation: `${KEYFRAMES_DIALOG_ZOOM_IN} 200ms ease-out`
|
|
2097
1853
|
}
|
|
2098
1854
|
}
|
|
2099
1855
|
},
|
|
@@ -2158,7 +1914,7 @@ const widthStyle = {
|
|
|
2158
1914
|
backgroundAttachment: "fixed",
|
|
2159
1915
|
opacity: 0,
|
|
2160
1916
|
transition: "opacity 200ms ease-in",
|
|
2161
|
-
|
|
1917
|
+
nest: {
|
|
2162
1918
|
"&[data-animated]": {
|
|
2163
1919
|
backgroundImage: ["linear-gradient(to right", vars.color.skeleton.from, vars.color.skeleton.to, vars.color.skeleton.from, vars.color.skeleton.from, vars.color.skeleton.from, ")"].join(", "),
|
|
2164
1920
|
animationName: KEYFRAMES_PULSE,
|
|
@@ -2177,32 +1933,40 @@ const widthStyle = {
|
|
|
2177
1933
|
}
|
|
2178
1934
|
},
|
|
2179
1935
|
".font-skeleton": {
|
|
2180
|
-
height:
|
|
1936
|
+
height: `calc(${vars.font.skeleton.lineHeight} - ${vars.font.skeleton.ascenderHeight} - ${vars.font.skeleton.descenderHeight})`
|
|
2181
1937
|
}
|
|
2182
1938
|
};
|
|
2183
1939
|
for (const size of theme.FONT_CODE_SIZE)
|
|
2184
1940
|
_responsiveRule(component$2, `code-skeleton-${size}`, {
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
1941
|
+
vars: {
|
|
1942
|
+
[varNames.font.skeleton.lineHeight]: vars.font.code.sizes[size].lineHeight,
|
|
1943
|
+
[varNames.font.skeleton.ascenderHeight]: vars.font.code.sizes[size].ascenderHeight,
|
|
1944
|
+
[varNames.font.skeleton.descenderHeight]: vars.font.code.sizes[size].descenderHeight
|
|
1945
|
+
}
|
|
2188
1946
|
});
|
|
2189
1947
|
for (const size of theme.FONT_HEADING_SIZE)
|
|
2190
1948
|
_responsiveRule(component$2, `heading-skeleton-${size}`, {
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
1949
|
+
vars: {
|
|
1950
|
+
[varNames.font.skeleton.lineHeight]: vars.font.heading.sizes[size].lineHeight,
|
|
1951
|
+
[varNames.font.skeleton.ascenderHeight]: vars.font.heading.sizes[size].ascenderHeight,
|
|
1952
|
+
[varNames.font.skeleton.descenderHeight]: vars.font.heading.sizes[size].descenderHeight
|
|
1953
|
+
}
|
|
2194
1954
|
});
|
|
2195
1955
|
for (const size of theme.FONT_LABEL_SIZE)
|
|
2196
1956
|
_responsiveRule(component$2, `label-skeleton-${size}`, {
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
1957
|
+
vars: {
|
|
1958
|
+
[varNames.font.skeleton.lineHeight]: vars.font.label.sizes[size].lineHeight,
|
|
1959
|
+
[varNames.font.skeleton.ascenderHeight]: vars.font.label.sizes[size].ascenderHeight,
|
|
1960
|
+
[varNames.font.skeleton.descenderHeight]: vars.font.label.sizes[size].descenderHeight
|
|
1961
|
+
}
|
|
2200
1962
|
});
|
|
2201
1963
|
for (const size of theme.FONT_TEXT_SIZE)
|
|
2202
1964
|
_responsiveRule(component$2, `text-skeleton-${size}`, {
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
1965
|
+
vars: {
|
|
1966
|
+
[varNames.font.skeleton.lineHeight]: vars.font.text.sizes[size].lineHeight,
|
|
1967
|
+
[varNames.font.skeleton.ascenderHeight]: vars.font.text.sizes[size].ascenderHeight,
|
|
1968
|
+
[varNames.font.skeleton.descenderHeight]: vars.font.text.sizes[size].descenderHeight
|
|
1969
|
+
}
|
|
2206
1970
|
});
|
|
2207
1971
|
const skeletonStyle = {
|
|
2208
1972
|
keyframes: keyframes$1,
|
|
@@ -2229,14 +1993,13 @@ const skeletonStyle = {
|
|
|
2229
1993
|
}
|
|
2230
1994
|
}, component = {
|
|
2231
1995
|
".tree-item": {
|
|
2232
|
-
|
|
1996
|
+
nest: {
|
|
2233
1997
|
'&[role="none"] > [role="treeitem"]': {
|
|
2234
1998
|
outline: "none",
|
|
2235
1999
|
cursor: "default",
|
|
2236
2000
|
borderRadius: "3px",
|
|
2237
2001
|
backgroundColor: vars.color.bg,
|
|
2238
|
-
|
|
2239
|
-
color: "var(--treeitem-fg-color)"
|
|
2002
|
+
color: vars.color.fg
|
|
2240
2003
|
},
|
|
2241
2004
|
'&[role="none"] > [role="treeitem"]:focus': {
|
|
2242
2005
|
position: "relative"
|
|
@@ -2248,24 +2011,11 @@ const skeletonStyle = {
|
|
|
2248
2011
|
cursor: "default",
|
|
2249
2012
|
borderRadius: "3px",
|
|
2250
2013
|
backgroundColor: vars.color.bg,
|
|
2251
|
-
|
|
2252
|
-
color: "var(--treeitem-fg-color)"
|
|
2014
|
+
color: vars.color.fg
|
|
2253
2015
|
},
|
|
2254
2016
|
'&[role="treeitem"]:focus > div': {
|
|
2255
2017
|
position: "relative"
|
|
2256
2018
|
}
|
|
2257
|
-
// &[role='treeitem'] {
|
|
2258
|
-
// outline: none;
|
|
2259
|
-
// & > div {
|
|
2260
|
-
// cursor: default;
|
|
2261
|
-
// border-radius: 3px;
|
|
2262
|
-
// background-color: var(--card-bg-color);
|
|
2263
|
-
// color: var(--treeitem-fg-color);
|
|
2264
|
-
// }
|
|
2265
|
-
// &:focus > div {
|
|
2266
|
-
// position: relative;
|
|
2267
|
-
// }
|
|
2268
|
-
// }
|
|
2269
2019
|
}
|
|
2270
2020
|
}
|
|
2271
2021
|
}, treeStyle = {
|
|
@@ -2275,41 +2025,40 @@ const skeletonStyle = {
|
|
|
2275
2025
|
}, primitive$p = {
|
|
2276
2026
|
".arrow": {
|
|
2277
2027
|
position: "absolute",
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
"@nest": {
|
|
2028
|
+
width: vars.arrow.size,
|
|
2029
|
+
height: vars.arrow.size,
|
|
2030
|
+
nest: {
|
|
2282
2031
|
":empty + &": {
|
|
2283
2032
|
display: "none"
|
|
2284
2033
|
},
|
|
2285
2034
|
"& > svg": {
|
|
2286
2035
|
display: "block",
|
|
2287
|
-
transformOrigin:
|
|
2036
|
+
transformOrigin: `calc(${vars.arrow.size} / 2) calc(${vars.arrow.size} / 2)`
|
|
2288
2037
|
},
|
|
2289
2038
|
// top
|
|
2290
2039
|
'[data-placement^="top"] > &': {
|
|
2291
|
-
bottom:
|
|
2040
|
+
bottom: `calc(0px - ${vars.arrow.size})`
|
|
2292
2041
|
},
|
|
2293
2042
|
'[data-placement^="top"] > & svg': {
|
|
2294
2043
|
transform: "rotate(0deg)"
|
|
2295
2044
|
},
|
|
2296
2045
|
// right
|
|
2297
2046
|
'[data-placement^="right"] > &': {
|
|
2298
|
-
left:
|
|
2047
|
+
left: `calc(0px - ${vars.arrow.size})`
|
|
2299
2048
|
},
|
|
2300
2049
|
'[data-placement^="right"] > & svg': {
|
|
2301
2050
|
transform: "rotate(90deg)"
|
|
2302
2051
|
},
|
|
2303
2052
|
// left
|
|
2304
2053
|
'[data-placement^="left"] > &': {
|
|
2305
|
-
right:
|
|
2054
|
+
right: `calc(0px - ${vars.arrow.size})`
|
|
2306
2055
|
},
|
|
2307
2056
|
'[data-placement^="left"] > & svg': {
|
|
2308
2057
|
transform: "rotate(-90deg)"
|
|
2309
2058
|
},
|
|
2310
2059
|
// bottom
|
|
2311
2060
|
'[data-placement^="bottom"] > &': {
|
|
2312
|
-
top:
|
|
2061
|
+
top: `calc(0px - ${vars.arrow.size})`
|
|
2313
2062
|
},
|
|
2314
2063
|
'[data-placement^="bottom"] > & svg': {
|
|
2315
2064
|
transform: "rotate(180deg)"
|
|
@@ -2336,15 +2085,13 @@ const skeletonStyle = {
|
|
|
2336
2085
|
position: "relative"
|
|
2337
2086
|
},
|
|
2338
2087
|
".input-b": {
|
|
2339
|
-
|
|
2088
|
+
nest: {
|
|
2340
2089
|
"& .input-presentation": {
|
|
2341
|
-
boxShadow: `inset 0 0 0 1px ${vars.color.input.border}`
|
|
2090
|
+
boxShadow: `inset 0 0 0 1px ${vars.color.input.text.border}`
|
|
2342
2091
|
}
|
|
2343
2092
|
}
|
|
2344
2093
|
},
|
|
2345
2094
|
".input-element": {
|
|
2346
|
-
"--color-input-fg": vars.color.tinted.default.fg[2],
|
|
2347
|
-
"--color-input-placeholder": vars.color.tinted.default.border[4],
|
|
2348
2095
|
WebkitFontSmoothing: "inherit",
|
|
2349
2096
|
appearance: "none",
|
|
2350
2097
|
border: 0,
|
|
@@ -2355,8 +2102,8 @@ const skeletonStyle = {
|
|
|
2355
2102
|
lineHeight: vars.input.lineHeight,
|
|
2356
2103
|
letterSpacing: vars.input.letterSpacing,
|
|
2357
2104
|
backgroundColor: "transparent",
|
|
2358
|
-
color: vars.color.input.fg,
|
|
2359
|
-
padding: [
|
|
2105
|
+
color: vars.color.input.text.fg,
|
|
2106
|
+
padding: [`calc(${vars.input.padding} - ${vars.input.ascenderHeight})`, vars.input.padding, `calc(${vars.input.padding} - ${vars.input.descenderHeight})`, vars.input.padding].join(" "),
|
|
2360
2107
|
borderRadius: "inherit",
|
|
2361
2108
|
position: "relative",
|
|
2362
2109
|
zIndex: 1,
|
|
@@ -2365,31 +2112,56 @@ const skeletonStyle = {
|
|
|
2365
2112
|
resize: "none",
|
|
2366
2113
|
// @ts-expect-error - TODO: fix this
|
|
2367
2114
|
width: ["-moz-available", "-webkit-fill-available", "stretch"],
|
|
2368
|
-
|
|
2115
|
+
nest: {
|
|
2369
2116
|
".input[data-icon-left] &": {
|
|
2370
|
-
paddingLeft:
|
|
2117
|
+
paddingLeft: `calc(${vars.input.padding} + calc(${vars.input.lineHeight} - ${vars.input.ascenderHeight} - ${vars.input.descenderHeight}) + ${vars.input.gap})`
|
|
2371
2118
|
},
|
|
2372
2119
|
".input[data-icon-right] &": {
|
|
2373
|
-
paddingRight:
|
|
2120
|
+
paddingRight: `calc(${vars.input.padding} + calc(${vars.input.lineHeight} - ${vars.input.ascenderHeight} - ${vars.input.descenderHeight}) + ${vars.input.gap})`
|
|
2121
|
+
},
|
|
2122
|
+
".input:not([data-invalid]) &": {
|
|
2123
|
+
vars: {
|
|
2124
|
+
[varNames.color.input.text.fg]: vars.color.tinted.default.fg[2],
|
|
2125
|
+
[varNames.color.input.text.placeholder]: vars.color.tinted.default.border[4]
|
|
2126
|
+
}
|
|
2374
2127
|
},
|
|
2375
|
-
"&::placeholder": {
|
|
2376
|
-
color: vars.color.input.placeholder
|
|
2128
|
+
".input:not([data-invalid]) &::placeholder": {
|
|
2129
|
+
color: vars.color.input.text.placeholder
|
|
2377
2130
|
},
|
|
2378
|
-
"&:hover": {
|
|
2379
|
-
[varNames.color.input.fg]: vars.color.tinted.default.fg[0]
|
|
2131
|
+
".input:not([data-invalid]) &:hover": {
|
|
2132
|
+
[varNames.color.input.text.fg]: vars.color.tinted.default.fg[0]
|
|
2380
2133
|
},
|
|
2381
|
-
"&:focus": {
|
|
2382
|
-
[varNames.color.input.fg]: vars.color.tinted.default.fg[0]
|
|
2134
|
+
".input:not([data-invalid]) &:focus": {
|
|
2135
|
+
[varNames.color.input.text.fg]: vars.color.tinted.default.fg[0]
|
|
2136
|
+
},
|
|
2137
|
+
".input:not([data-invalid]) &:disabled": {
|
|
2138
|
+
vars: {
|
|
2139
|
+
[varNames.color.input.text.fg]: vars.color.tinted.default.border[4],
|
|
2140
|
+
[varNames.color.input.text.placeholder]: vars.color.tinted.default.border[1]
|
|
2141
|
+
}
|
|
2142
|
+
},
|
|
2143
|
+
".input[data-invalid] &": {
|
|
2144
|
+
vars: {
|
|
2145
|
+
[varNames.color.input.text.fg]: vars.color.tinted.critical.fg[2],
|
|
2146
|
+
[varNames.color.input.text.placeholder]: vars.color.tinted.critical.border[4]
|
|
2147
|
+
}
|
|
2383
2148
|
},
|
|
2384
|
-
"
|
|
2385
|
-
|
|
2149
|
+
".input[data-invalid] &::placeholder": {
|
|
2150
|
+
color: vars.color.input.text.placeholder
|
|
2151
|
+
},
|
|
2152
|
+
".input[data-invalid] &:hover": {
|
|
2153
|
+
[varNames.color.input.text.fg]: vars.color.tinted.critical.fg[1]
|
|
2154
|
+
},
|
|
2155
|
+
".input[data-invalid] &:focus": {
|
|
2156
|
+
[varNames.color.input.text.fg]: vars.color.tinted.critical.fg[1]
|
|
2157
|
+
},
|
|
2158
|
+
".input[data-invalid] &:disabled": {
|
|
2159
|
+
[varNames.color.input.text.fg]: vars.color.tinted.critical.border[3]
|
|
2386
2160
|
}
|
|
2387
2161
|
}
|
|
2388
2162
|
},
|
|
2389
2163
|
".input-presentation": {
|
|
2390
|
-
|
|
2391
|
-
[varNames.color.input.bg]: vars.color.tinted.default.bg[0],
|
|
2392
|
-
[varNames.color.input.border]: vars.color.tinted.default.border[1],
|
|
2164
|
+
backgroundColor: vars.color.input.text.bg,
|
|
2393
2165
|
borderRadius: "inherit",
|
|
2394
2166
|
position: "absolute",
|
|
2395
2167
|
top: 0,
|
|
@@ -2399,7 +2171,7 @@ const skeletonStyle = {
|
|
|
2399
2171
|
display: "block",
|
|
2400
2172
|
pointerEvents: "none",
|
|
2401
2173
|
zIndex: 0,
|
|
2402
|
-
|
|
2174
|
+
nest: {
|
|
2403
2175
|
".input[data-prefix] &": {
|
|
2404
2176
|
borderTopLeftRadius: 0,
|
|
2405
2177
|
borderBottomLeftRadius: 0
|
|
@@ -2408,27 +2180,87 @@ const skeletonStyle = {
|
|
|
2408
2180
|
borderTopRightRadius: 0,
|
|
2409
2181
|
borderBottomRightRadius: 0
|
|
2410
2182
|
},
|
|
2411
|
-
".input-element:placeholder-shown + &": {
|
|
2412
|
-
[varNames.color.input.fg]: vars.color.tinted.default.border[4]
|
|
2413
|
-
},
|
|
2414
|
-
".input-element:hover + &": {
|
|
2415
|
-
[varNames.color.input.border]: vars.color.tinted.default.border[2],
|
|
2416
|
-
[varNames.color.input.fg]: vars.color.tinted.default.fg[1],
|
|
2417
|
-
boxShadow: `inset 0 0 0 1px ${vars.color.input.border}`
|
|
2418
|
-
},
|
|
2419
2183
|
".input-element:focus + &": {
|
|
2420
|
-
|
|
2421
|
-
[varNames.color.input.fg]: vars.color.tinted.default.fg[1],
|
|
2422
|
-
boxShadow: `inset 0 0 0 1px ${vars.color.input.border}`,
|
|
2184
|
+
boxShadow: `inset 0 0 0 1px ${vars.color.input.text.border}`,
|
|
2423
2185
|
outlineWidth: vars.input.text.focusRing.width,
|
|
2424
2186
|
outlineStyle: "solid",
|
|
2425
2187
|
outlineColor: vars.color.focusRing,
|
|
2426
2188
|
outlineOffset: vars.input.text.focusRing.offset
|
|
2427
2189
|
},
|
|
2428
2190
|
".input-element:disabled + &": {
|
|
2429
|
-
[varNames.color.input.bg]: vars.color.tinted.default.bg[1],
|
|
2430
|
-
[varNames.color.input.border]: vars.color.tinted.default.border[0],
|
|
2431
2191
|
opacity: 1
|
|
2192
|
+
},
|
|
2193
|
+
// valid
|
|
2194
|
+
".input:not([data-invalid]) &": {
|
|
2195
|
+
vars: {
|
|
2196
|
+
[varNames.color.input.text.fg]: vars.color.tinted.default.fg[4],
|
|
2197
|
+
[varNames.color.input.text.bg]: vars.color.tinted.default.bg[0],
|
|
2198
|
+
[varNames.color.input.text.border]: vars.color.tinted.default.border[1]
|
|
2199
|
+
}
|
|
2200
|
+
},
|
|
2201
|
+
".input:not([data-invalid])[data-read-only] .input-element + &": {
|
|
2202
|
+
vars: {
|
|
2203
|
+
[varNames.color.input.text.bg]: vars.color.tinted.default.bg[1]
|
|
2204
|
+
}
|
|
2205
|
+
},
|
|
2206
|
+
".input:not([data-invalid]) .input-element:placeholder-shown + &": {
|
|
2207
|
+
vars: {
|
|
2208
|
+
[varNames.color.input.text.fg]: vars.color.tinted.default.border[4]
|
|
2209
|
+
}
|
|
2210
|
+
},
|
|
2211
|
+
".input:not([data-invalid]):not([data-read-only]) .input-element:not(:disabled):hover + &": {
|
|
2212
|
+
vars: {
|
|
2213
|
+
[varNames.color.input.text.border]: vars.color.tinted.default.border[2],
|
|
2214
|
+
[varNames.color.input.text.fg]: vars.color.tinted.default.fg[1]
|
|
2215
|
+
},
|
|
2216
|
+
boxShadow: `inset 0 0 0 1px ${vars.color.input.text.border}`
|
|
2217
|
+
},
|
|
2218
|
+
".input:not([data-invalid]) .input-element:focus + &": {
|
|
2219
|
+
vars: {
|
|
2220
|
+
[varNames.color.input.text.border]: vars.color.tinted.default.border[2],
|
|
2221
|
+
[varNames.color.input.text.fg]: vars.color.tinted.default.fg[1]
|
|
2222
|
+
},
|
|
2223
|
+
boxShadow: `inset 0 0 0 1px ${vars.color.input.text.border}`
|
|
2224
|
+
},
|
|
2225
|
+
".input:not([data-invalid]) .input-element:disabled + &": {
|
|
2226
|
+
vars: {
|
|
2227
|
+
[varNames.color.input.text.bg]: vars.color.tinted.default.bg[1],
|
|
2228
|
+
[varNames.color.input.text.border]: vars.color.tinted.default.border[0],
|
|
2229
|
+
// icon
|
|
2230
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.border[4]
|
|
2231
|
+
}
|
|
2232
|
+
},
|
|
2233
|
+
// invalid
|
|
2234
|
+
".input[data-invalid] &": {
|
|
2235
|
+
vars: {
|
|
2236
|
+
[varNames.color.input.text.fg]: vars.color.tinted.critical.fg[4],
|
|
2237
|
+
[varNames.color.input.text.bg]: vars.color.tinted.critical.bg[1],
|
|
2238
|
+
[varNames.color.input.text.border]: vars.color.tinted.critical.border[1],
|
|
2239
|
+
[varNames.color.focusRing]: vars.color.solid.critical.bg[0]
|
|
2240
|
+
}
|
|
2241
|
+
},
|
|
2242
|
+
".input[data-invalid] .input-element:placeholder-shown + &": {
|
|
2243
|
+
vars: {
|
|
2244
|
+
[varNames.color.input.text.fg]: vars.color.tinted.critical.border[4]
|
|
2245
|
+
}
|
|
2246
|
+
},
|
|
2247
|
+
".input[data-invalid] .input-element:not(:disabled):hover + &": {
|
|
2248
|
+
vars: {
|
|
2249
|
+
[varNames.color.input.text.border]: vars.color.tinted.critical.border[2],
|
|
2250
|
+
[varNames.color.input.text.fg]: vars.color.tinted.critical.fg[1]
|
|
2251
|
+
}
|
|
2252
|
+
},
|
|
2253
|
+
".input[data-invalid] .input-element:focus + &": {
|
|
2254
|
+
vars: {
|
|
2255
|
+
[varNames.color.input.text.border]: vars.color.tinted.critical.border[2],
|
|
2256
|
+
[varNames.color.input.text.fg]: vars.color.tinted.critical.fg[1]
|
|
2257
|
+
}
|
|
2258
|
+
},
|
|
2259
|
+
".input[data-invalid] .input-element:disabled + &": {
|
|
2260
|
+
vars: {
|
|
2261
|
+
[varNames.color.input.text.bg]: vars.color.tinted.critical.bg[1],
|
|
2262
|
+
[varNames.color.input.text.border]: vars.color.tinted.critical.border[0]
|
|
2263
|
+
}
|
|
2432
2264
|
}
|
|
2433
2265
|
}
|
|
2434
2266
|
}
|
|
@@ -2462,7 +2294,7 @@ const _inputStyle = {
|
|
|
2462
2294
|
[varNames.color.bg]: vars.color.tinted.bg[0],
|
|
2463
2295
|
[varNames.color.border]: vars.color.tinted.border[2],
|
|
2464
2296
|
[varNames.color.fg]: vars.color.tinted.fg[2],
|
|
2465
|
-
|
|
2297
|
+
nest: {
|
|
2466
2298
|
"&:is(button)": {
|
|
2467
2299
|
WebkitFontSmoothing: "inherit",
|
|
2468
2300
|
appearance: "none",
|
|
@@ -2482,9 +2314,9 @@ const _inputStyle = {
|
|
|
2482
2314
|
},
|
|
2483
2315
|
"@media": {
|
|
2484
2316
|
"(hover: hover)": {
|
|
2485
|
-
|
|
2317
|
+
nest: {
|
|
2486
2318
|
"&:not([data-disabled])": {
|
|
2487
|
-
|
|
2319
|
+
cursor: "pointer"
|
|
2488
2320
|
},
|
|
2489
2321
|
"&:not([data-disabled]):hover": {
|
|
2490
2322
|
[varNames.color.bg]: vars.color.tinted.bg[1],
|
|
@@ -2574,7 +2406,7 @@ const primitive$m = {
|
|
|
2574
2406
|
width: vars.avatar.size,
|
|
2575
2407
|
height: vars.avatar.size,
|
|
2576
2408
|
borderRadius: vars.avatar.size,
|
|
2577
|
-
|
|
2409
|
+
nest: {
|
|
2578
2410
|
"button&": {
|
|
2579
2411
|
WebkitFontSmoothing: "inherit",
|
|
2580
2412
|
appearance: "none",
|
|
@@ -2586,8 +2418,8 @@ const primitive$m = {
|
|
|
2586
2418
|
outline: "none"
|
|
2587
2419
|
},
|
|
2588
2420
|
"button&:focus": {
|
|
2589
|
-
outline:
|
|
2590
|
-
outlineOffset:
|
|
2421
|
+
outline: `${vars.avatar.focusRing.width} solid ${vars.color.focusRing}`,
|
|
2422
|
+
outlineOffset: vars.avatar.focusRing.offset
|
|
2591
2423
|
},
|
|
2592
2424
|
"button&:focus:not(:focus-visible)": {
|
|
2593
2425
|
boxShadow: "none"
|
|
@@ -2596,11 +2428,11 @@ const primitive$m = {
|
|
|
2596
2428
|
[varNames.color.avatar.bg]: vars.color.border,
|
|
2597
2429
|
[varNames.color.avatar.fg]: vars.color.bg
|
|
2598
2430
|
},
|
|
2599
|
-
...theme.
|
|
2431
|
+
...theme.AVATAR_COLORS.reduce((acc, color) => ({
|
|
2600
2432
|
...acc,
|
|
2601
|
-
[`&.${
|
|
2602
|
-
[varNames.color.avatar.bg]: vars.color.avatar[
|
|
2603
|
-
[varNames.color.avatar.fg]: vars.color.avatar[
|
|
2433
|
+
[`&.${color}`]: {
|
|
2434
|
+
[varNames.color.avatar.bg]: vars.color.avatar[color].bg,
|
|
2435
|
+
[varNames.color.avatar.fg]: vars.color.avatar[color].fg
|
|
2604
2436
|
}
|
|
2605
2437
|
}), {})
|
|
2606
2438
|
}
|
|
@@ -2616,7 +2448,7 @@ const primitive$m = {
|
|
|
2616
2448
|
right: 0,
|
|
2617
2449
|
top: 0,
|
|
2618
2450
|
bottom: 0,
|
|
2619
|
-
|
|
2451
|
+
nest: {
|
|
2620
2452
|
"& > svg": {
|
|
2621
2453
|
display: "block",
|
|
2622
2454
|
width: "11px",
|
|
@@ -2641,7 +2473,7 @@ const primitive$m = {
|
|
|
2641
2473
|
}
|
|
2642
2474
|
},
|
|
2643
2475
|
".avatar-image": {
|
|
2644
|
-
|
|
2476
|
+
nest: {
|
|
2645
2477
|
"& > img": {
|
|
2646
2478
|
display: "block",
|
|
2647
2479
|
position: "absolute",
|
|
@@ -2673,7 +2505,7 @@ const primitive$m = {
|
|
|
2673
2505
|
userSelect: "none",
|
|
2674
2506
|
borderRadius: vars.avatar.size,
|
|
2675
2507
|
height: vars.avatar.size,
|
|
2676
|
-
|
|
2508
|
+
nest: {
|
|
2677
2509
|
"&&": {
|
|
2678
2510
|
minWidth: vars.avatar.size
|
|
2679
2511
|
},
|
|
@@ -2683,7 +2515,7 @@ const primitive$m = {
|
|
|
2683
2515
|
}
|
|
2684
2516
|
},
|
|
2685
2517
|
".avatar-stack": {
|
|
2686
|
-
|
|
2518
|
+
nest: {
|
|
2687
2519
|
"& > div + div": {
|
|
2688
2520
|
marginLeft: vars.avatar.distance
|
|
2689
2521
|
}
|
|
@@ -2717,9 +2549,9 @@ const badgeStyle = {
|
|
|
2717
2549
|
}
|
|
2718
2550
|
}, primitive$k = {
|
|
2719
2551
|
".box": {
|
|
2720
|
-
//
|
|
2552
|
+
// TODO: move to aspects
|
|
2721
2553
|
minHeight: 0,
|
|
2722
|
-
|
|
2554
|
+
nest: {
|
|
2723
2555
|
"iframe&": {
|
|
2724
2556
|
border: "none"
|
|
2725
2557
|
},
|
|
@@ -2730,13 +2562,6 @@ const badgeStyle = {
|
|
|
2730
2562
|
backgroundColor: vars.color.muted.bg
|
|
2731
2563
|
}
|
|
2732
2564
|
}
|
|
2733
|
-
},
|
|
2734
|
-
// sizing
|
|
2735
|
-
".box-content": {
|
|
2736
|
-
boxSizing: "content-box"
|
|
2737
|
-
},
|
|
2738
|
-
".box-border": {
|
|
2739
|
-
boxSizing: "border-box"
|
|
2740
2565
|
}
|
|
2741
2566
|
}, boxStyle = {
|
|
2742
2567
|
layers: {
|
|
@@ -2760,17 +2585,16 @@ const badgeStyle = {
|
|
|
2760
2585
|
verticalAlign: "top",
|
|
2761
2586
|
backgroundColor: vars.color.bg,
|
|
2762
2587
|
color: vars.color.fg,
|
|
2763
|
-
boxShadow:
|
|
2588
|
+
boxShadow: vars.button.boxShadow,
|
|
2764
2589
|
alignItems: "center",
|
|
2765
|
-
|
|
2766
|
-
"@nest": {
|
|
2590
|
+
nest: {
|
|
2767
2591
|
"&::-moz-focus-inner": {
|
|
2768
2592
|
border: 0,
|
|
2769
2593
|
padding: 0
|
|
2770
2594
|
},
|
|
2771
2595
|
"&:focus": {
|
|
2772
|
-
outline:
|
|
2773
|
-
outlineOffset:
|
|
2596
|
+
outline: `${vars.button.focusRing.width} solid ${vars.color.focusRing}`,
|
|
2597
|
+
outlineOffset: vars.button.focusRing.offset
|
|
2774
2598
|
},
|
|
2775
2599
|
"&:focus:not(:focus-visible)": {
|
|
2776
2600
|
outline: "none"
|
|
@@ -2792,166 +2616,193 @@ const badgeStyle = {
|
|
|
2792
2616
|
for (const tone of theme.THEME_COLOR_STATE_TONES) {
|
|
2793
2617
|
const solid = vars.color.solid[tone], tinted = vars.color.tinted[tone];
|
|
2794
2618
|
primitive$j[`.button[data-mode="default"][data-tone="${tone}"]`] = {
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2619
|
+
vars: {
|
|
2620
|
+
[varNames.color.bg]: solid.bg[0],
|
|
2621
|
+
[varNames.color.border]: solid.border[1],
|
|
2622
|
+
[varNames.color.code.bg]: solid.bg[1],
|
|
2623
|
+
[varNames.color.code.fg]: solid.fg[4],
|
|
2624
|
+
[varNames.color.fg]: solid.fg[0],
|
|
2625
|
+
[varNames.color.muted.bg]: solid.bg[1],
|
|
2626
|
+
[varNames.color.muted.fg]: solid.fg[4],
|
|
2627
|
+
[varNames.button.boxShadow]: "none"
|
|
2628
|
+
},
|
|
2629
|
+
nest: {
|
|
2804
2630
|
"&:not([data-disabled]):hover": {
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2631
|
+
vars: {
|
|
2632
|
+
[varNames.color.bg]: solid.bg[1],
|
|
2633
|
+
[varNames.color.border]: solid.border[2],
|
|
2634
|
+
[varNames.color.code.bg]: solid.bg[2],
|
|
2635
|
+
[varNames.color.code.fg]: solid.fg[4],
|
|
2636
|
+
[varNames.color.fg]: solid.fg[0],
|
|
2637
|
+
[varNames.color.muted.bg]: solid.bg[2],
|
|
2638
|
+
[varNames.color.muted.fg]: solid.fg[4]
|
|
2639
|
+
}
|
|
2812
2640
|
},
|
|
2813
2641
|
"&:not([data-disabled]):active": {
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2642
|
+
vars: {
|
|
2643
|
+
[varNames.color.bg]: solid.bg[2],
|
|
2644
|
+
[varNames.color.border]: solid.border[3],
|
|
2645
|
+
[varNames.color.code.bg]: solid.bg[3],
|
|
2646
|
+
[varNames.color.code.fg]: solid.fg[4],
|
|
2647
|
+
[varNames.color.fg]: solid.fg[0],
|
|
2648
|
+
[varNames.color.muted.bg]: solid.bg[3],
|
|
2649
|
+
[varNames.color.muted.fg]: solid.fg[4]
|
|
2650
|
+
}
|
|
2821
2651
|
},
|
|
2822
2652
|
"&:not([data-disabled])[data-selected]": {
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2653
|
+
vars: {
|
|
2654
|
+
[varNames.color.bg]: solid.bg[2],
|
|
2655
|
+
[varNames.color.border]: solid.border[3],
|
|
2656
|
+
[varNames.color.code.bg]: solid.bg[3],
|
|
2657
|
+
[varNames.color.code.fg]: solid.fg[4],
|
|
2658
|
+
[varNames.color.fg]: solid.fg[0],
|
|
2659
|
+
[varNames.color.muted.bg]: solid.bg[3],
|
|
2660
|
+
[varNames.color.muted.fg]: solid.fg[4]
|
|
2661
|
+
}
|
|
2830
2662
|
},
|
|
2831
2663
|
"&[data-disabled]": {
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2664
|
+
vars: {
|
|
2665
|
+
[varNames.color.avatar.blue.bg]: vars.color.tinted.default.bg[3],
|
|
2666
|
+
[varNames.color.avatar.purple.bg]: vars.color.tinted.default.bg[3],
|
|
2667
|
+
[varNames.color.avatar.magenta.bg]: vars.color.tinted.default.bg[3],
|
|
2668
|
+
[varNames.color.avatar.red.bg]: vars.color.tinted.default.bg[3],
|
|
2669
|
+
[varNames.color.avatar.orange.bg]: vars.color.tinted.default.bg[3],
|
|
2670
|
+
[varNames.color.avatar.yellow.bg]: vars.color.tinted.default.bg[3],
|
|
2671
|
+
[varNames.color.avatar.green.bg]: vars.color.tinted.default.bg[3],
|
|
2672
|
+
[varNames.color.avatar.cyan.bg]: vars.color.tinted.default.bg[3],
|
|
2673
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[1],
|
|
2674
|
+
[varNames.color.border]: vars.color.tinted.default.border[1],
|
|
2675
|
+
[varNames.color.code.bg]: vars.color.tinted.default.bg[2],
|
|
2676
|
+
[varNames.color.code.fg]: vars.color.tinted.default.border[4],
|
|
2677
|
+
[varNames.color.fg]: vars.color.tinted.default.border[4],
|
|
2678
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[2],
|
|
2679
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.border[4]
|
|
2680
|
+
}
|
|
2848
2681
|
}
|
|
2849
2682
|
}
|
|
2850
2683
|
}, primitive$j[`.button[data-mode="ghost"][data-tone="${tone}"]`] = {
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2684
|
+
vars: {
|
|
2685
|
+
[varNames.color.bg]: tinted.bg[1],
|
|
2686
|
+
[varNames.color.border]: tinted.border[1],
|
|
2687
|
+
[varNames.color.fg]: tinted.fg[2],
|
|
2688
|
+
[varNames.color.code.bg]: tinted.bg[2],
|
|
2689
|
+
[varNames.color.code.fg]: tinted.fg[4],
|
|
2690
|
+
[varNames.color.muted.bg]: tinted.bg[2],
|
|
2691
|
+
[varNames.color.muted.fg]: tinted.fg[4],
|
|
2692
|
+
[varNames.button.boxShadow]: `inset 0 0 0 ${vars.button.border.width} ${vars.color.border}`
|
|
2693
|
+
},
|
|
2694
|
+
nest: {
|
|
2860
2695
|
"&:not([data-disabled]):hover": {
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2696
|
+
vars: {
|
|
2697
|
+
[varNames.color.bg]: tinted.bg[2],
|
|
2698
|
+
[varNames.color.border]: tinted.border[2],
|
|
2699
|
+
[varNames.color.code.bg]: tinted.bg[3],
|
|
2700
|
+
[varNames.color.code.fg]: tinted.fg[3],
|
|
2701
|
+
[varNames.color.fg]: tinted.fg[1],
|
|
2702
|
+
[varNames.color.muted.bg]: tinted.bg[3],
|
|
2703
|
+
[varNames.color.muted.fg]: tinted.fg[3]
|
|
2704
|
+
}
|
|
2868
2705
|
},
|
|
2869
2706
|
"&:not([data-disabled]):active": {
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2707
|
+
vars: {
|
|
2708
|
+
[varNames.color.bg]: tinted.bg[3],
|
|
2709
|
+
[varNames.color.border]: tinted.border[3],
|
|
2710
|
+
[varNames.color.code.bg]: tinted.bg[4],
|
|
2711
|
+
[varNames.color.code.fg]: tinted.fg[3],
|
|
2712
|
+
[varNames.color.fg]: tinted.fg[1],
|
|
2713
|
+
[varNames.color.muted.bg]: tinted.bg[4],
|
|
2714
|
+
[varNames.color.muted.fg]: tinted.fg[3],
|
|
2715
|
+
[varNames.button.boxShadow]: `inset 0 0 0 ${vars.button.border.width} ${vars.color.border}`
|
|
2716
|
+
}
|
|
2878
2717
|
},
|
|
2879
2718
|
"&:not([data-disabled])[data-selected]": {
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2719
|
+
vars: {
|
|
2720
|
+
[varNames.color.bg]: tinted.bg[3],
|
|
2721
|
+
[varNames.color.border]: tinted.border[3],
|
|
2722
|
+
[varNames.color.code.bg]: tinted.bg[4],
|
|
2723
|
+
[varNames.color.code.fg]: tinted.fg[3],
|
|
2724
|
+
[varNames.color.fg]: tinted.fg[1],
|
|
2725
|
+
[varNames.color.muted.bg]: tinted.bg[4],
|
|
2726
|
+
[varNames.color.muted.fg]: tinted.fg[3],
|
|
2727
|
+
[varNames.button.boxShadow]: `inset 0 0 0 ${vars.button.border.width} ${vars.color.border}`
|
|
2728
|
+
}
|
|
2888
2729
|
},
|
|
2889
2730
|
"&[data-disabled]": {
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2731
|
+
vars: {
|
|
2732
|
+
[varNames.color.avatar.blue.bg]: vars.color.tinted.default.bg[2],
|
|
2733
|
+
[varNames.color.avatar.purple.bg]: vars.color.tinted.default.bg[2],
|
|
2734
|
+
[varNames.color.avatar.magenta.bg]: vars.color.tinted.default.bg[2],
|
|
2735
|
+
[varNames.color.avatar.red.bg]: vars.color.tinted.default.bg[2],
|
|
2736
|
+
[varNames.color.avatar.orange.bg]: vars.color.tinted.default.bg[2],
|
|
2737
|
+
[varNames.color.avatar.yellow.bg]: vars.color.tinted.default.bg[2],
|
|
2738
|
+
[varNames.color.avatar.green.bg]: vars.color.tinted.default.bg[2],
|
|
2739
|
+
[varNames.color.avatar.cyan.bg]: vars.color.tinted.default.bg[2],
|
|
2740
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[0],
|
|
2741
|
+
[varNames.color.border]: vars.color.tinted.default.border[0],
|
|
2742
|
+
[varNames.color.code.bg]: vars.color.tinted.default.bg[1],
|
|
2743
|
+
[varNames.color.code.fg]: vars.color.tinted.default.border[3],
|
|
2744
|
+
[varNames.color.fg]: vars.color.tinted.default.border[4],
|
|
2745
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[1],
|
|
2746
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.border[3]
|
|
2747
|
+
}
|
|
2906
2748
|
}
|
|
2907
2749
|
}
|
|
2908
2750
|
}, primitive$j[`.button[data-mode="bleed"][data-tone="${tone}"]`] = {
|
|
2909
2751
|
boxShadow: "none",
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2752
|
+
vars: {
|
|
2753
|
+
[varNames.color.bg]: tinted.bg[0],
|
|
2754
|
+
[varNames.color.border]: tinted.border[1],
|
|
2755
|
+
[varNames.color.fg]: tinted.fg[2],
|
|
2756
|
+
[varNames.color.muted.bg]: tinted.bg[1],
|
|
2757
|
+
[varNames.color.muted.fg]: tinted.fg[4],
|
|
2758
|
+
[varNames.button.boxShadow]: "none"
|
|
2759
|
+
},
|
|
2760
|
+
nest: {
|
|
2917
2761
|
"&:not([data-disabled]):hover": {
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2762
|
+
vars: {
|
|
2763
|
+
[varNames.color.bg]: tinted.bg[1],
|
|
2764
|
+
[varNames.color.border]: tinted.border[2],
|
|
2765
|
+
[varNames.color.fg]: tinted.fg[1],
|
|
2766
|
+
[varNames.color.muted.bg]: tinted.bg[2],
|
|
2767
|
+
[varNames.color.muted.fg]: tinted.fg[3]
|
|
2768
|
+
}
|
|
2923
2769
|
},
|
|
2924
2770
|
"&:not([data-disabled]):active": {
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2771
|
+
vars: {
|
|
2772
|
+
[varNames.color.bg]: tinted.bg[2],
|
|
2773
|
+
[varNames.color.border]: tinted.border[3],
|
|
2774
|
+
[varNames.color.fg]: tinted.fg[1],
|
|
2775
|
+
[varNames.color.muted.bg]: tinted.bg[3],
|
|
2776
|
+
[varNames.color.muted.fg]: tinted.fg[3]
|
|
2777
|
+
}
|
|
2930
2778
|
},
|
|
2931
2779
|
"&:not([data-disabled])[data-selected]": {
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2780
|
+
vars: {
|
|
2781
|
+
[varNames.color.bg]: tinted.bg[2],
|
|
2782
|
+
[varNames.color.border]: tinted.border[3],
|
|
2783
|
+
[varNames.color.fg]: tinted.fg[1],
|
|
2784
|
+
[varNames.color.muted.bg]: tinted.bg[3],
|
|
2785
|
+
[varNames.color.muted.fg]: tinted.fg[3]
|
|
2786
|
+
}
|
|
2937
2787
|
},
|
|
2938
2788
|
"&[data-disabled]": {
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2789
|
+
vars: {
|
|
2790
|
+
[varNames.color.avatar.blue.bg]: vars.color.tinted.default.bg[2],
|
|
2791
|
+
[varNames.color.avatar.purple.bg]: vars.color.tinted.default.bg[2],
|
|
2792
|
+
[varNames.color.avatar.magenta.bg]: vars.color.tinted.default.bg[2],
|
|
2793
|
+
[varNames.color.avatar.red.bg]: vars.color.tinted.default.bg[2],
|
|
2794
|
+
[varNames.color.avatar.orange.bg]: vars.color.tinted.default.bg[2],
|
|
2795
|
+
[varNames.color.avatar.yellow.bg]: vars.color.tinted.default.bg[2],
|
|
2796
|
+
[varNames.color.avatar.green.bg]: vars.color.tinted.default.bg[2],
|
|
2797
|
+
[varNames.color.avatar.cyan.bg]: vars.color.tinted.default.bg[2],
|
|
2798
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[0],
|
|
2799
|
+
[varNames.color.border]: vars.color.tinted.default.border[0],
|
|
2800
|
+
[varNames.color.code.bg]: vars.color.tinted.default.bg[1],
|
|
2801
|
+
[varNames.color.code.fg]: vars.color.tinted.default.border[3],
|
|
2802
|
+
[varNames.color.fg]: vars.color.tinted.default.border[4],
|
|
2803
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[1],
|
|
2804
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.border[3]
|
|
2805
|
+
}
|
|
2955
2806
|
}
|
|
2956
2807
|
}
|
|
2957
2808
|
};
|
|
@@ -2960,18 +2811,22 @@ const buttonStyle = {
|
|
|
2960
2811
|
layers: {
|
|
2961
2812
|
primitive: primitive$j
|
|
2962
2813
|
}
|
|
2963
|
-
}
|
|
2814
|
+
};
|
|
2815
|
+
function _assign(target, source) {
|
|
2816
|
+
return Object.assign(target, source);
|
|
2817
|
+
}
|
|
2818
|
+
const primitive$i = {
|
|
2964
2819
|
".card": {
|
|
2965
2820
|
backgroundColor: vars.color.bg,
|
|
2966
2821
|
color: vars.color.fg,
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2822
|
+
vars: {
|
|
2823
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[0],
|
|
2824
|
+
[varNames.color.border]: vars.color.tinted.default.border[1],
|
|
2825
|
+
[varNames.color.fg]: vars.color.tinted.default.fg[0],
|
|
2826
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[1],
|
|
2827
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.fg[4]
|
|
2828
|
+
},
|
|
2829
|
+
nest: {
|
|
2975
2830
|
"button&": {
|
|
2976
2831
|
WebkitFontSmoothing: "inherit",
|
|
2977
2832
|
appearance: "none",
|
|
@@ -2997,64 +2852,91 @@ const buttonStyle = {
|
|
|
2997
2852
|
backgroundImage: `repeating-conic-gradient(${vars.color.bg} 0% 25%, ${vars.color.muted.bg} 0% 50%)`
|
|
2998
2853
|
},
|
|
2999
2854
|
"a&:not([data-disabled]):hover, button&:not([data-disabled]):hover": {
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
2855
|
+
vars: {
|
|
2856
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[1],
|
|
2857
|
+
[varNames.color.border]: vars.color.tinted.default.border[3],
|
|
2858
|
+
[varNames.color.fg]: vars.color.tinted.default.fg[1],
|
|
2859
|
+
[varNames.color.code.bg]: vars.color.tinted.default.bg[2],
|
|
2860
|
+
[varNames.color.code.fg]: vars.color.tinted.default.fg[4],
|
|
2861
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[2],
|
|
2862
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.fg[4]
|
|
2863
|
+
}
|
|
3005
2864
|
},
|
|
3006
2865
|
"a&:not([data-disabled]):active, button&:not([data-disabled]):active": {
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
2866
|
+
vars: {
|
|
2867
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[2],
|
|
2868
|
+
[varNames.color.border]: vars.color.tinted.default.border[4],
|
|
2869
|
+
[varNames.color.fg]: vars.color.tinted.default.fg[0],
|
|
2870
|
+
[varNames.color.code.bg]: vars.color.tinted.default.bg[3],
|
|
2871
|
+
[varNames.color.code.fg]: vars.color.tinted.default.fg[4],
|
|
2872
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[3],
|
|
2873
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.fg[4]
|
|
2874
|
+
}
|
|
3012
2875
|
},
|
|
3013
2876
|
// toggle button
|
|
3014
2877
|
'a&:not([data-disabled])[aria-pressed="true"], button&:not([data-disabled])[aria-pressed="true"]': {
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
2878
|
+
vars: {
|
|
2879
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[2],
|
|
2880
|
+
[varNames.color.border]: vars.color.tinted.default.border[4],
|
|
2881
|
+
[varNames.color.fg]: vars.color.tinted.default.fg[0],
|
|
2882
|
+
[varNames.color.code.bg]: vars.color.tinted.default.bg[3],
|
|
2883
|
+
[varNames.color.code.fg]: vars.color.tinted.default.fg[4],
|
|
2884
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[3],
|
|
2885
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.fg[4]
|
|
2886
|
+
}
|
|
3020
2887
|
},
|
|
3021
2888
|
"a&:not([data-disabled])[data-pressed], button&:not([data-disabled])[data-pressed]": {
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
2889
|
+
vars: {
|
|
2890
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[2],
|
|
2891
|
+
[varNames.color.border]: vars.color.tinted.default.border[4],
|
|
2892
|
+
[varNames.color.fg]: vars.color.tinted.default.fg[0],
|
|
2893
|
+
[varNames.color.code.bg]: vars.color.tinted.default.bg[3],
|
|
2894
|
+
[varNames.color.code.fg]: vars.color.tinted.default.fg[4],
|
|
2895
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[3],
|
|
2896
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.fg[4]
|
|
2897
|
+
}
|
|
3027
2898
|
},
|
|
3028
2899
|
"a&:not([data-disabled])[data-selected], button&:not([data-disabled])[data-selected]": {
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
2900
|
+
vars: {
|
|
2901
|
+
[varNames.color.bg]: vars.color.solid.primary.bg[0],
|
|
2902
|
+
[varNames.color.border]: vars.color.solid.primary.border[1],
|
|
2903
|
+
[varNames.color.fg]: vars.color.solid.primary.fg[0],
|
|
2904
|
+
[varNames.color.code.bg]: vars.color.solid.primary.bg[1],
|
|
2905
|
+
[varNames.color.code.fg]: vars.color.solid.primary.fg[3],
|
|
2906
|
+
[varNames.color.muted.bg]: vars.color.solid.primary.bg[1],
|
|
2907
|
+
[varNames.color.muted.fg]: vars.color.solid.primary.fg[3]
|
|
2908
|
+
}
|
|
3034
2909
|
},
|
|
3035
2910
|
"a&[data-disabled], button&[data-disabled]": {
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
2911
|
+
vars: {
|
|
2912
|
+
[varNames.color.bg]: vars.color.tinted.default.bg[0],
|
|
2913
|
+
[varNames.color.border]: vars.color.tinted.default.border[1],
|
|
2914
|
+
[varNames.color.fg]: vars.color.tinted.default.border[3],
|
|
2915
|
+
[varNames.color.code.bg]: vars.color.tinted.default.bg[0],
|
|
2916
|
+
[varNames.color.code.fg]: vars.color.tinted.default.border[2],
|
|
2917
|
+
[varNames.color.muted.bg]: vars.color.tinted.default.bg[1],
|
|
2918
|
+
[varNames.color.muted.fg]: vars.color.tinted.default.border[2]
|
|
2919
|
+
}
|
|
3041
2920
|
}
|
|
3042
2921
|
}
|
|
3043
2922
|
}
|
|
3044
2923
|
};
|
|
3045
2924
|
for (const scheme of theme.THEME_COLOR_SCHEMES) {
|
|
3046
|
-
const
|
|
3047
|
-
colorScheme: scheme
|
|
2925
|
+
const customProps = {}, props = {
|
|
2926
|
+
colorScheme: scheme,
|
|
2927
|
+
vars: customProps
|
|
3048
2928
|
};
|
|
3049
2929
|
for (const tone of theme.THEME_COLOR_CARD_TONES) {
|
|
3050
2930
|
const _varNames = varNames.color[tone], _vars = vars.color[scheme][tone];
|
|
3051
|
-
_assignToneProps(
|
|
2931
|
+
_assignToneProps(customProps, _varNames, _vars);
|
|
3052
2932
|
}
|
|
3053
|
-
primitive$i[`.card.${scheme}`] =
|
|
2933
|
+
primitive$i[`.card.${scheme}`] = props;
|
|
3054
2934
|
}
|
|
3055
2935
|
for (const tone of theme.THEME_COLOR_CARD_TONES) {
|
|
3056
|
-
const _varNames = varNames.color, _vars = vars.color[tone],
|
|
3057
|
-
|
|
2936
|
+
const _varNames = varNames.color, _vars = vars.color[tone], customProps = {}, props = {
|
|
2937
|
+
vars: customProps
|
|
2938
|
+
};
|
|
2939
|
+
_assignToneProps(customProps, _varNames, _vars), _assign(customProps, {
|
|
3058
2940
|
"--card-bg-color": vars.color.bg,
|
|
3059
2941
|
"--card-bg2-color": vars.color.muted.bg,
|
|
3060
2942
|
"--card-border-color": vars.color.border,
|
|
@@ -3075,21 +2957,20 @@ for (const tone of theme.THEME_COLOR_CARD_TONES) {
|
|
|
3075
2957
|
"--card-shadow-outline-color": vars.color.shadow.outline,
|
|
3076
2958
|
"--card-shadow-umbra-color": vars.color.shadow.umbra,
|
|
3077
2959
|
"--card-shadow-penumbra-color": vars.color.shadow.penumbra,
|
|
3078
|
-
"--card-shadow-ambient-color": vars.color.shadow.ambient
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
}), primitive$i[`.card.${tone}`] = toneProps;
|
|
2960
|
+
"--card-shadow-ambient-color": vars.color.shadow.ambient,
|
|
2961
|
+
"--card-skeleton-from-color": vars.color.skeleton.from,
|
|
2962
|
+
"--card-skeleton-to-color": vars.color.skeleton.to
|
|
2963
|
+
}), primitive$i[`.card.${tone}`] = props;
|
|
3083
2964
|
}
|
|
3084
2965
|
const cardStyle = {
|
|
3085
2966
|
layers: {
|
|
3086
2967
|
primitive: primitive$i
|
|
3087
2968
|
}
|
|
3088
2969
|
};
|
|
3089
|
-
function _assignToneProps(
|
|
3090
|
-
for (const hue of theme.
|
|
3091
|
-
|
|
3092
|
-
|
|
2970
|
+
function _assignToneProps(props, _varNames, _vars) {
|
|
2971
|
+
for (const hue of theme.AVATAR_COLORS)
|
|
2972
|
+
props[_varNames.avatar[hue].bg] = _vars.avatar[hue].bg, props[_varNames.avatar[hue].fg] = _vars.avatar[hue].fg;
|
|
2973
|
+
_assign(props, {
|
|
3093
2974
|
[_varNames.backdrop]: _vars.backdrop,
|
|
3094
2975
|
[_varNames.code.fg]: _vars.code.fg,
|
|
3095
2976
|
[_varNames.code.bg]: _vars.code.bg,
|
|
@@ -3136,10 +3017,10 @@ function _assignToneProps(toneProps, _varNames, _vars) {
|
|
|
3136
3017
|
[_varNames.shadow.penumbra]: _vars.shadow.penumbra,
|
|
3137
3018
|
[_varNames.shadow.ambient]: _vars.shadow.ambient
|
|
3138
3019
|
});
|
|
3139
|
-
for (const variant of
|
|
3020
|
+
for (const variant of theme.COLOR_VARIANTS)
|
|
3140
3021
|
for (const elementTone of theme.THEME_COLOR_STATE_TONES) {
|
|
3141
3022
|
const __varNames = _varNames[variant][elementTone], __vars = _vars[variant][elementTone];
|
|
3142
|
-
|
|
3023
|
+
_assign(props, {
|
|
3143
3024
|
[__varNames.bg[0]]: __vars.bg[0],
|
|
3144
3025
|
[__varNames.bg[1]]: __vars.bg[1],
|
|
3145
3026
|
[__varNames.bg[2]]: __vars.bg[2],
|
|
@@ -3161,7 +3042,11 @@ function _assignToneProps(toneProps, _varNames, _vars) {
|
|
|
3161
3042
|
const primitive$h = {
|
|
3162
3043
|
".checkbox": {
|
|
3163
3044
|
position: "relative",
|
|
3164
|
-
|
|
3045
|
+
nest: {
|
|
3046
|
+
"&:not([hidden])": {
|
|
3047
|
+
display: "block"
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3165
3050
|
},
|
|
3166
3051
|
".checkbox-input": {
|
|
3167
3052
|
position: "absolute",
|
|
@@ -3174,28 +3059,23 @@ const primitive$h = {
|
|
|
3174
3059
|
zIndex: 1,
|
|
3175
3060
|
padding: 0,
|
|
3176
3061
|
margin: 0,
|
|
3177
|
-
|
|
3062
|
+
nest: {
|
|
3178
3063
|
"& + span": {
|
|
3179
3064
|
position: "relative",
|
|
3180
3065
|
display: "block",
|
|
3181
|
-
width:
|
|
3182
|
-
height:
|
|
3066
|
+
width: vars.input.checkbox.size,
|
|
3067
|
+
height: vars.input.checkbox.size,
|
|
3183
3068
|
boxSizing: "border-box",
|
|
3184
|
-
borderRadius:
|
|
3069
|
+
borderRadius: vars.radius[2],
|
|
3185
3070
|
lineHeight: 1,
|
|
3186
|
-
backgroundColor:
|
|
3187
|
-
boxShadow:
|
|
3188
|
-
color:
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
"--color-checkbox-fg": "var(--color-tinted-default-fg-0)"
|
|
3195
|
-
// box-shadow: ${focusRingBorderStyle({
|
|
3196
|
-
// color: color.input.default.enabled.border,
|
|
3197
|
-
// width: input.border.width,
|
|
3198
|
-
// })},
|
|
3071
|
+
backgroundColor: vars.color.input.checkbox.bg,
|
|
3072
|
+
boxShadow: `inset 0 0 0 1px ${vars.color.input.checkbox.border}`,
|
|
3073
|
+
color: vars.color.input.checkbox.fg,
|
|
3074
|
+
vars: {
|
|
3075
|
+
[varNames.color.input.checkbox.bg]: vars.color.tinted.default.bg[0],
|
|
3076
|
+
[varNames.color.input.checkbox.border]: vars.color.tinted.default.border[2],
|
|
3077
|
+
[varNames.color.input.checkbox.fg]: vars.color.tinted.default.fg[0]
|
|
3078
|
+
}
|
|
3199
3079
|
},
|
|
3200
3080
|
"& + span > svg": {
|
|
3201
3081
|
display: "block",
|
|
@@ -3208,81 +3088,106 @@ const primitive$h = {
|
|
|
3208
3088
|
vectorEffect: "non-scaling-stroke",
|
|
3209
3089
|
strokeWidth: "1.5px !important"
|
|
3210
3090
|
},
|
|
3211
|
-
|
|
3212
|
-
"--color-checkbox-bg": "var(--color-tinted-default-bg-1)",
|
|
3213
|
-
"--color-checkbox-border": "var(--color-tinted-default-border-2)",
|
|
3214
|
-
"--color-checkbox-fg": "var(--color-tinted-default-fg-0)"
|
|
3215
|
-
},
|
|
3216
|
-
"&:checked + span": {
|
|
3217
|
-
"--color-checkbox-bg": "var(--color-solid-default-bg-0)",
|
|
3218
|
-
"--color-checkbox-border": "var(--color-solid-default-bg-0)",
|
|
3219
|
-
"--color-checkbox-fg": "var(--color-solid-default-fg-0)"
|
|
3220
|
-
// '--color-checkbox-bg': 'var(--color-input-default-enabled-fg)',
|
|
3221
|
-
// '--color-checkbox-border': 'var(--color-input-default-enabled-fg)',
|
|
3222
|
-
// '--color-checkbox-fg': 'var(--color-input-default-enabled-bg)',
|
|
3223
|
-
// box-shadow: ${focusRingBorderStyle({
|
|
3224
|
-
// color: color.input.default.enabled.fg,
|
|
3225
|
-
// width: input.border.width,
|
|
3226
|
-
// })},
|
|
3227
|
-
},
|
|
3091
|
+
// show checkmark when checked
|
|
3228
3092
|
"&:checked + span > svg:first-child": {
|
|
3229
3093
|
opacity: 1
|
|
3230
3094
|
},
|
|
3231
|
-
//
|
|
3232
|
-
"&:
|
|
3233
|
-
|
|
3234
|
-
},
|
|
3235
|
-
// focus when checked - uses a different offset
|
|
3236
|
-
"&:not(:disabled):focus:focus-visible&:checked + span": {
|
|
3237
|
-
// box-shadow: ${focusRingStyle({focusRing: {width: 1, offset: 1}})},
|
|
3238
|
-
},
|
|
3239
|
-
"&[data-error] + span": {
|
|
3240
|
-
"--color-checkbox-bg": "var(--color-input-invalid-enabled-border)",
|
|
3241
|
-
"--color-checkbox-border": "var(--color-input-invalid-enabled-bg)",
|
|
3242
|
-
"--color-checkbox-fg": "var(--color-input-invalid-enabled-fg)"
|
|
3243
|
-
// box-shadow: ${focusRingBorderStyle({
|
|
3244
|
-
// width: input.border.width,
|
|
3245
|
-
// color: color.input.invalid.enabled.muted.bg,
|
|
3246
|
-
// })},
|
|
3247
|
-
},
|
|
3248
|
-
"&[data-error]:checked + span": {
|
|
3249
|
-
"--color-checkbox-bg": "var(--color-input-invalid-enabled-muted-bg)",
|
|
3250
|
-
"--color-checkbox-fg": "var(--color-input-invalid-enabled-bg)"
|
|
3251
|
-
},
|
|
3252
|
-
"&[data-error]:checked:not(:disabled):focus:focus-visible + span": {
|
|
3253
|
-
"--color-checkbox-border": "var(--color-input-invalid-readOnly-muted-bg)"
|
|
3254
|
-
// box-shadow: ${focusRingStyle({
|
|
3255
|
-
// border: {width: input.border.width, color: color.input.invalid.readOnly.muted.bg},
|
|
3256
|
-
// focusRing: {width: 1, offset: 1},
|
|
3257
|
-
// })},
|
|
3258
|
-
},
|
|
3259
|
-
"&:disabled + span": {
|
|
3260
|
-
"--color-checkbox-bg": "var(--color-tinted-default-bg-1)",
|
|
3261
|
-
"--color-checkbox-border": "var(--color-tinted-default-border-0)",
|
|
3262
|
-
"--color-checkbox-fg": "var(--color-tinted-default-border-2)"
|
|
3095
|
+
// show minus when indeterminate
|
|
3096
|
+
"&:indeterminate + span > svg:last-child": {
|
|
3097
|
+
opacity: 1
|
|
3263
3098
|
},
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3099
|
+
// checked, not disabled, not invalid
|
|
3100
|
+
"&:checked:not(:disabled):not([data-invalid]) + span": {
|
|
3101
|
+
vars: {
|
|
3102
|
+
[varNames.color.input.checkbox.bg]: vars.color.solid.default.bg[0],
|
|
3103
|
+
[varNames.color.input.checkbox.border]: vars.color.solid.default.bg[0],
|
|
3104
|
+
[varNames.color.input.checkbox.fg]: vars.color.solid.default.fg[0]
|
|
3105
|
+
}
|
|
3268
3106
|
},
|
|
3269
|
-
//
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
// box-shadow: ${focusRingBorderStyle({
|
|
3277
|
-
// width: input.border.width,
|
|
3278
|
-
// color: color.input.default.readOnly.border,
|
|
3279
|
-
// })},
|
|
3280
|
-
},
|
|
3281
|
-
"&[data-read-only]:checked + span": {
|
|
3282
|
-
"--color-checkbox-bg": "var(--color-input-default-readOnly-muted-bg)"
|
|
3107
|
+
// not checked, not invalid, hovered
|
|
3108
|
+
"&:not(:checked):not([data-invalid]):hover + span": {
|
|
3109
|
+
vars: {
|
|
3110
|
+
[varNames.color.input.checkbox.bg]: vars.color.tinted.default.bg[1],
|
|
3111
|
+
[varNames.color.input.checkbox.border]: vars.color.tinted.default.border[4],
|
|
3112
|
+
[varNames.color.input.checkbox.fg]: vars.color.tinted.default.fg[0]
|
|
3113
|
+
}
|
|
3283
3114
|
},
|
|
3284
|
-
|
|
3285
|
-
|
|
3115
|
+
// not checked, not disabled, invalid
|
|
3116
|
+
"&:not(:checked):not(:disabled)[data-invalid] + span": {
|
|
3117
|
+
vars: {
|
|
3118
|
+
[varNames.color.input.checkbox.bg]: vars.color.tinted.critical.bg[1],
|
|
3119
|
+
[varNames.color.input.checkbox.border]: vars.color.tinted.critical.border[3],
|
|
3120
|
+
[varNames.color.input.checkbox.fg]: vars.color.tinted.critical.fg[4]
|
|
3121
|
+
}
|
|
3122
|
+
},
|
|
3123
|
+
// not checked, invalid, hovered
|
|
3124
|
+
"&:not(:checked)[data-invalid]:hover + span": {
|
|
3125
|
+
vars: {
|
|
3126
|
+
[varNames.color.input.checkbox.bg]: vars.color.tinted.critical.bg[2],
|
|
3127
|
+
[varNames.color.input.checkbox.border]: vars.color.tinted.critical.border[4],
|
|
3128
|
+
[varNames.color.input.checkbox.fg]: vars.color.tinted.critical.fg[1]
|
|
3129
|
+
// [varNames.color.input.checkbox.border]: vars.color.focusRing,
|
|
3130
|
+
}
|
|
3131
|
+
},
|
|
3132
|
+
// checked, not disabled, invalid
|
|
3133
|
+
"&:checked:not(:disabled)[data-invalid] + span": {
|
|
3134
|
+
vars: {
|
|
3135
|
+
[varNames.color.input.checkbox.bg]: vars.color.solid.critical.bg[0],
|
|
3136
|
+
[varNames.color.input.checkbox.border]: vars.color.solid.critical.bg[0],
|
|
3137
|
+
[varNames.color.input.checkbox.fg]: vars.color.solid.critical.fg[0]
|
|
3138
|
+
}
|
|
3139
|
+
},
|
|
3140
|
+
// not checked, not indeterminate, read only
|
|
3141
|
+
"&:not(:checked):not(:indeterminate)[data-read-only] + span": {
|
|
3142
|
+
vars: {
|
|
3143
|
+
[varNames.color.input.checkbox.bg]: vars.color.tinted.default.bg[0],
|
|
3144
|
+
[varNames.color.input.checkbox.border]: vars.color.tinted.default.border[2],
|
|
3145
|
+
[varNames.color.input.checkbox.fg]: vars.color.tinted.default.fg[0]
|
|
3146
|
+
}
|
|
3147
|
+
},
|
|
3148
|
+
// checked, read only
|
|
3149
|
+
"&:checked[data-read-only] + span": {
|
|
3150
|
+
vars: {
|
|
3151
|
+
[varNames.color.input.checkbox.bg]: vars.color.tinted.default.bg[1]
|
|
3152
|
+
}
|
|
3153
|
+
},
|
|
3154
|
+
// not checked, focused
|
|
3155
|
+
"&:not(:checked):focus:focus-visible + span": {
|
|
3156
|
+
vars: {
|
|
3157
|
+
[varNames.color.input.checkbox.border]: vars.color.focusRing
|
|
3158
|
+
}
|
|
3159
|
+
},
|
|
3160
|
+
// checked, focused
|
|
3161
|
+
"&:checked:focus:focus-visible + span": {
|
|
3162
|
+
vars: {
|
|
3163
|
+
[varNames.color.input.checkbox.border]: vars.color.focusRing,
|
|
3164
|
+
[varNames.color.input.checkbox.bg]: vars.color.focusRing,
|
|
3165
|
+
[varNames.color.input.checkbox.fg]: vars.color.solid.default.fg[0]
|
|
3166
|
+
}
|
|
3167
|
+
},
|
|
3168
|
+
// not checked, disabled
|
|
3169
|
+
"&:not(:checked):disabled + span": {
|
|
3170
|
+
vars: {
|
|
3171
|
+
[varNames.color.input.checkbox.bg]: vars.color.tinted.default.bg[1],
|
|
3172
|
+
[varNames.color.input.checkbox.border]: vars.color.tinted.default.border[0],
|
|
3173
|
+
[varNames.color.input.checkbox.fg]: vars.color.tinted.default.border[2]
|
|
3174
|
+
}
|
|
3175
|
+
},
|
|
3176
|
+
// checked, disabled
|
|
3177
|
+
"&:checked:disabled + span": {
|
|
3178
|
+
vars: {
|
|
3179
|
+
[varNames.color.input.checkbox.bg]: vars.color.tinted.default.border[2],
|
|
3180
|
+
[varNames.color.input.checkbox.border]: vars.color.tinted.default.border[2],
|
|
3181
|
+
[varNames.color.input.checkbox.fg]: vars.color.tinted.default.bg[0]
|
|
3182
|
+
}
|
|
3183
|
+
},
|
|
3184
|
+
// indeterminate, disabled
|
|
3185
|
+
"&:indeterminate:disabled + span": {
|
|
3186
|
+
vars: {
|
|
3187
|
+
[varNames.color.input.checkbox.bg]: vars.color.tinted.default.bg[1],
|
|
3188
|
+
[varNames.color.input.checkbox.border]: vars.color.tinted.default.border[0],
|
|
3189
|
+
[varNames.color.input.checkbox.fg]: vars.color.tinted.default.border[2]
|
|
3190
|
+
}
|
|
3286
3191
|
}
|
|
3287
3192
|
}
|
|
3288
3193
|
}
|
|
@@ -3292,25 +3197,21 @@ const primitive$h = {
|
|
|
3292
3197
|
}
|
|
3293
3198
|
}, primitive$g = {
|
|
3294
3199
|
".code": {
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3200
|
+
vars: {
|
|
3201
|
+
[varNames.font.weight.regular]: vars.font.code.weight.regular,
|
|
3202
|
+
[varNames.font.weight.medium]: vars.font.code.weight.medium,
|
|
3203
|
+
[varNames.font.weight.semibold]: vars.font.code.weight.semibold,
|
|
3204
|
+
[varNames.font.weight.bold]: vars.font.code.weight.bold,
|
|
3205
|
+
[varNames.font.family]: vars.font.code.family,
|
|
3206
|
+
[varNames.font.featureSettings]: vars.font.code.featureSettings
|
|
3207
|
+
},
|
|
3208
|
+
color: vars.color.code.fg,
|
|
3209
|
+
nest: {
|
|
3303
3210
|
"& > code": {
|
|
3304
3211
|
fontFamily: "inherit"
|
|
3305
3212
|
},
|
|
3306
|
-
// & code {
|
|
3307
|
-
// font-family: inherit;
|
|
3308
|
-
// &.refractor .token {
|
|
3309
|
-
// ${codeSyntaxHighlightingStyle}
|
|
3310
|
-
// }
|
|
3311
|
-
// }
|
|
3312
3213
|
"& a": {
|
|
3313
|
-
color:
|
|
3214
|
+
color: vars.color.link.fg,
|
|
3314
3215
|
textDecoration: "none",
|
|
3315
3216
|
borderRadius: "1px"
|
|
3316
3217
|
},
|
|
@@ -3325,16 +3226,19 @@ const primitive$h = {
|
|
|
3325
3226
|
}
|
|
3326
3227
|
}
|
|
3327
3228
|
};
|
|
3328
|
-
for (const size of theme.FONT_CODE_SIZE)
|
|
3229
|
+
for (const size of theme.FONT_CODE_SIZE) {
|
|
3230
|
+
const v = vars.font.code.sizes[size];
|
|
3329
3231
|
_responsiveRule(primitive$g, `code-${size}`, {
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3232
|
+
vars: {
|
|
3233
|
+
[varNames.font.fontSize]: v.fontSize,
|
|
3234
|
+
[varNames.font.lineHeight]: v.lineHeight,
|
|
3235
|
+
[varNames.font.letterSpacing]: v.letterSpacing,
|
|
3236
|
+
[varNames.font.iconSize]: v.iconSize,
|
|
3237
|
+
[varNames.font.ascenderHeight]: v.ascenderHeight,
|
|
3238
|
+
[varNames.font.descenderHeight]: v.descenderHeight
|
|
3239
|
+
}
|
|
3337
3240
|
});
|
|
3241
|
+
}
|
|
3338
3242
|
const codeStyle = {
|
|
3339
3243
|
layers: {
|
|
3340
3244
|
primitive: primitive$g
|
|
@@ -3350,37 +3254,44 @@ const codeStyle = {
|
|
|
3350
3254
|
}
|
|
3351
3255
|
}, primitive$e = {
|
|
3352
3256
|
".heading": {
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3257
|
+
vars: {
|
|
3258
|
+
[varNames.font.weight.regular]: vars.font.heading.weight.regular,
|
|
3259
|
+
[varNames.font.weight.medium]: vars.font.heading.weight.medium,
|
|
3260
|
+
[varNames.font.weight.semibold]: vars.font.heading.weight.semibold,
|
|
3261
|
+
[varNames.font.weight.bold]: vars.font.heading.weight.bold,
|
|
3262
|
+
[varNames.font.family]: vars.font.heading.family,
|
|
3263
|
+
[varNames.font.featureSettings]: vars.font.heading.featureSettings
|
|
3264
|
+
},
|
|
3265
|
+
color: vars.color.fg,
|
|
3266
|
+
nest: {
|
|
3361
3267
|
"& a": {
|
|
3362
|
-
color:
|
|
3268
|
+
color: vars.color.link.fg,
|
|
3363
3269
|
textDecoration: "none"
|
|
3270
|
+
},
|
|
3271
|
+
"& a:hover": {
|
|
3272
|
+
color: "inherit"
|
|
3364
3273
|
}
|
|
3365
3274
|
}
|
|
3366
3275
|
},
|
|
3367
|
-
// '.heading-accent': {
|
|
3368
|
-
// '--color-fg': 'var(--color-accent-fg)',
|
|
3369
|
-
// },
|
|
3370
3276
|
".heading-muted": {
|
|
3371
|
-
|
|
3277
|
+
vars: {
|
|
3278
|
+
[varNames.color.fg]: vars.color.muted.fg
|
|
3279
|
+
}
|
|
3372
3280
|
}
|
|
3373
3281
|
};
|
|
3374
|
-
for (const size of theme.FONT_HEADING_SIZE)
|
|
3282
|
+
for (const size of theme.FONT_HEADING_SIZE) {
|
|
3283
|
+
const v = vars.font.heading.sizes[size];
|
|
3375
3284
|
_responsiveRule(primitive$e, `heading-${size}`, {
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3285
|
+
vars: {
|
|
3286
|
+
[varNames.font.fontSize]: v.fontSize,
|
|
3287
|
+
[varNames.font.lineHeight]: v.lineHeight,
|
|
3288
|
+
[varNames.font.letterSpacing]: v.letterSpacing,
|
|
3289
|
+
[varNames.font.iconSize]: v.iconSize,
|
|
3290
|
+
[varNames.font.ascenderHeight]: v.ascenderHeight,
|
|
3291
|
+
[varNames.font.descenderHeight]: v.descenderHeight
|
|
3292
|
+
}
|
|
3383
3293
|
});
|
|
3294
|
+
}
|
|
3384
3295
|
const headingStyle = {
|
|
3385
3296
|
layers: {
|
|
3386
3297
|
primitive: primitive$e
|
|
@@ -3391,7 +3302,7 @@ const headingStyle = {
|
|
|
3391
3302
|
backgroundColor: vars.color.muted.bg,
|
|
3392
3303
|
font: "inherit",
|
|
3393
3304
|
verticalAlign: "top",
|
|
3394
|
-
|
|
3305
|
+
nest: {
|
|
3395
3306
|
"&:not([hidden])": {
|
|
3396
3307
|
display: "inline-block"
|
|
3397
3308
|
}
|
|
@@ -3403,38 +3314,40 @@ const headingStyle = {
|
|
|
3403
3314
|
}
|
|
3404
3315
|
}, primitive$c = {
|
|
3405
3316
|
".label": {
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3317
|
+
vars: {
|
|
3318
|
+
[varNames.font.weight.regular]: vars.font.label.weight.regular,
|
|
3319
|
+
[varNames.font.weight.medium]: vars.font.label.weight.medium,
|
|
3320
|
+
[varNames.font.weight.semibold]: vars.font.label.weight.semibold,
|
|
3321
|
+
[varNames.font.weight.bold]: vars.font.label.weight.bold,
|
|
3322
|
+
[varNames.font.family]: vars.font.label.family,
|
|
3323
|
+
[varNames.font.featureSettings]: vars.font.label.featureSettings
|
|
3324
|
+
},
|
|
3325
|
+
color: vars.color.fg,
|
|
3413
3326
|
textTransform: "uppercase",
|
|
3414
|
-
|
|
3327
|
+
nest: {
|
|
3415
3328
|
"& a": {
|
|
3416
|
-
color:
|
|
3329
|
+
color: vars.color.link.fg,
|
|
3417
3330
|
textDecoration: "none"
|
|
3418
3331
|
}
|
|
3419
3332
|
}
|
|
3420
3333
|
},
|
|
3421
|
-
".label-accent": {
|
|
3422
|
-
"--color-fg": "var(--color-accent-fg)"
|
|
3423
|
-
},
|
|
3424
3334
|
".label-muted": {
|
|
3425
|
-
|
|
3335
|
+
[varNames.color.fg]: vars.color.muted.fg
|
|
3426
3336
|
}
|
|
3427
3337
|
};
|
|
3428
|
-
for (const size of theme.FONT_LABEL_SIZE)
|
|
3338
|
+
for (const size of theme.FONT_LABEL_SIZE) {
|
|
3339
|
+
const k = varNames.font, v = vars.font.label.sizes[size];
|
|
3429
3340
|
_responsiveRule(primitive$c, `label-${size}`, {
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3341
|
+
vars: {
|
|
3342
|
+
[k.fontSize]: v.fontSize,
|
|
3343
|
+
[k.lineHeight]: v.lineHeight,
|
|
3344
|
+
[k.letterSpacing]: v.letterSpacing,
|
|
3345
|
+
[k.iconSize]: v.iconSize,
|
|
3346
|
+
[k.ascenderHeight]: v.ascenderHeight,
|
|
3347
|
+
[k.descenderHeight]: v.descenderHeight
|
|
3348
|
+
}
|
|
3437
3349
|
});
|
|
3350
|
+
}
|
|
3438
3351
|
const labelStyle = {
|
|
3439
3352
|
layers: {
|
|
3440
3353
|
primitive: primitive$c
|
|
@@ -3446,7 +3359,7 @@ const labelStyle = {
|
|
|
3446
3359
|
}, primitive$a = {
|
|
3447
3360
|
".radio": {
|
|
3448
3361
|
position: "relative",
|
|
3449
|
-
|
|
3362
|
+
nest: {
|
|
3450
3363
|
"&:not([hidden])": {
|
|
3451
3364
|
display: "inline-block"
|
|
3452
3365
|
},
|
|
@@ -3465,86 +3378,48 @@ const labelStyle = {
|
|
|
3465
3378
|
borderRadius: "9999px",
|
|
3466
3379
|
border: "none"
|
|
3467
3380
|
},
|
|
3468
|
-
|
|
3381
|
+
// enabled
|
|
3469
3382
|
"& > input + span": {
|
|
3470
3383
|
display: "block",
|
|
3471
3384
|
position: "relative",
|
|
3472
|
-
width:
|
|
3473
|
-
height:
|
|
3385
|
+
width: vars.input.radio.size,
|
|
3386
|
+
height: vars.input.radio.size,
|
|
3474
3387
|
borderRadius: "9999px",
|
|
3475
|
-
backgroundColor:
|
|
3476
|
-
boxShadow:
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
// })};
|
|
3483
|
-
"--color-input-fg": "var(--color-tinted-default-fg-0)",
|
|
3484
|
-
"--color-input-bg": "var(--color-tinted-default-bg-0)",
|
|
3485
|
-
"--color-input-border": "var(--color-tinted-default-border-1)"
|
|
3388
|
+
backgroundColor: vars.color.input.radio.bg,
|
|
3389
|
+
boxShadow: `inset 0 0 0 1px ${vars.color.input.radio.border}`,
|
|
3390
|
+
vars: {
|
|
3391
|
+
[varNames.color.input.radio.fg]: vars.color.tinted.default.fg[0],
|
|
3392
|
+
[varNames.color.input.radio.bg]: vars.color.tinted.default.bg[0],
|
|
3393
|
+
[varNames.color.input.radio.border]: vars.color.tinted.default.border[1]
|
|
3394
|
+
}
|
|
3486
3395
|
},
|
|
3487
3396
|
"& > input + span::after": {
|
|
3488
3397
|
content: '""',
|
|
3489
3398
|
position: "absolute",
|
|
3490
|
-
top:
|
|
3491
|
-
left:
|
|
3492
|
-
width:
|
|
3493
|
-
height:
|
|
3494
|
-
backgroundColor:
|
|
3399
|
+
top: `calc((${vars.input.radio.size} - ${vars.input.radio.markSize}) / 2)`,
|
|
3400
|
+
left: `calc((${vars.input.radio.size} - ${vars.input.radio.markSize}) / 2)`,
|
|
3401
|
+
width: vars.input.radio.markSize,
|
|
3402
|
+
height: vars.input.radio.markSize,
|
|
3403
|
+
backgroundColor: vars.color.input.radio.fg,
|
|
3495
3404
|
borderRadius: "9999px",
|
|
3496
3405
|
opacity: 0
|
|
3497
3406
|
},
|
|
3498
|
-
|
|
3407
|
+
// hovered
|
|
3499
3408
|
"& > input:not(:disabled):hover + span": {
|
|
3500
|
-
|
|
3501
|
-
|
|
3409
|
+
vars: {
|
|
3410
|
+
[varNames.color.input.radio.bg]: vars.color.tinted.default.bg[1],
|
|
3411
|
+
[varNames.color.input.radio.border]: vars.color.tinted.default.border[2]
|
|
3412
|
+
}
|
|
3502
3413
|
},
|
|
3503
|
-
|
|
3414
|
+
// focused
|
|
3504
3415
|
"& > input:not(:disabled):focus + span": {
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
// focusRing: input.radio.focusRing,
|
|
3509
|
-
// })};
|
|
3510
|
-
},
|
|
3511
|
-
"& > input:not(:disabled):focus:not(:focus-visible) + span": {
|
|
3512
|
-
// box-shadow: ${focusRingBorderStyle({
|
|
3513
|
-
// color: color.input.default.enabled.border,
|
|
3514
|
-
// width: input.border.width,
|
|
3515
|
-
// })};
|
|
3416
|
+
vars: {
|
|
3417
|
+
[varNames.color.input.radio.border]: vars.color.tinted.default.border[2]
|
|
3418
|
+
}
|
|
3516
3419
|
},
|
|
3517
3420
|
"& > input:checked + span::after": {
|
|
3518
3421
|
opacity: 1
|
|
3519
3422
|
}
|
|
3520
|
-
// /* customValidity */
|
|
3521
|
-
// &[data-error] + span {
|
|
3522
|
-
// background-color: ${color.input.invalid.enabled.border};
|
|
3523
|
-
// box-shadow: ${focusRingBorderStyle({
|
|
3524
|
-
// width: input.border.width,
|
|
3525
|
-
// color: color.input.invalid.enabled.muted.bg,
|
|
3526
|
-
// })};
|
|
3527
|
-
// &::after {
|
|
3528
|
-
// background: ${color.input.invalid.enabled.muted.bg};
|
|
3529
|
-
// }
|
|
3530
|
-
// }
|
|
3531
|
-
// /* read only */
|
|
3532
|
-
// &[data-read-only] + span {
|
|
3533
|
-
// box-shadow: 0 0 0 1px ${color.input.default.readOnly.border};
|
|
3534
|
-
// background: ${color.input.default.readOnly.bg};
|
|
3535
|
-
// &::after {
|
|
3536
|
-
// background: ${color.input.default.readOnly.border};
|
|
3537
|
-
// }
|
|
3538
|
-
// }
|
|
3539
|
-
// /* disabled */
|
|
3540
|
-
// &:not([data-read-only]):disabled + span {
|
|
3541
|
-
// box-shadow: 0 0 0 1px ${color.input.default.disabled.border};
|
|
3542
|
-
// background: ${color.input.default.disabled.bg};
|
|
3543
|
-
// &::after {
|
|
3544
|
-
// background: ${color.input.default.disabled.border};
|
|
3545
|
-
// }
|
|
3546
|
-
// }
|
|
3547
|
-
// `
|
|
3548
3423
|
}
|
|
3549
3424
|
}
|
|
3550
3425
|
}, radioStyle = {
|
|
@@ -3553,14 +3428,14 @@ const labelStyle = {
|
|
|
3553
3428
|
}
|
|
3554
3429
|
}, primitive$9 = {
|
|
3555
3430
|
".select": {
|
|
3556
|
-
|
|
3431
|
+
nest: {
|
|
3557
3432
|
"& > select:disabled": {
|
|
3558
3433
|
opacity: 1
|
|
3559
3434
|
}
|
|
3560
3435
|
}
|
|
3561
3436
|
},
|
|
3562
3437
|
".select-presentation": {
|
|
3563
|
-
|
|
3438
|
+
nest: {
|
|
3564
3439
|
"& > span": {
|
|
3565
3440
|
// place icon to the right
|
|
3566
3441
|
position: "absolute",
|
|
@@ -3618,60 +3493,69 @@ const labelStyle = {
|
|
|
3618
3493
|
zIndex: 1
|
|
3619
3494
|
},
|
|
3620
3495
|
".switch-presentation": {
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3496
|
+
vars: {
|
|
3497
|
+
[varNames.color.input.switch.bg]: vars.color.tinted.default.border[2],
|
|
3498
|
+
[varNames.color.input.switch.fg]: vars.color.tinted.default.bg[0],
|
|
3499
|
+
[varNames.input.switch.thumb.offset]: "0",
|
|
3500
|
+
[varNames.input.switch.thumb.size]: `calc(${vars.input.switch.height} - ${vars.input.switch.padding} * 2)`
|
|
3501
|
+
},
|
|
3625
3502
|
display: "block",
|
|
3626
3503
|
position: "relative",
|
|
3627
|
-
width:
|
|
3628
|
-
height:
|
|
3629
|
-
borderRadius:
|
|
3630
|
-
outlineOffset:
|
|
3504
|
+
width: vars.input.switch.width,
|
|
3505
|
+
height: vars.input.switch.height,
|
|
3506
|
+
borderRadius: `calc(${vars.input.switch.height} / 2)`,
|
|
3507
|
+
outlineOffset: vars.input.switch.focusRing.offset,
|
|
3631
3508
|
// Make sure it’s not possible to interact with the presentation element
|
|
3632
3509
|
pointerEvents: "none",
|
|
3633
|
-
|
|
3634
|
-
"
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
outline: "none"
|
|
3510
|
+
nest: {
|
|
3511
|
+
"input:not(:checked):hover + &": {
|
|
3512
|
+
vars: {
|
|
3513
|
+
[varNames.color.input.switch.bg]: vars.color.tinted.default.border[4]
|
|
3514
|
+
}
|
|
3639
3515
|
},
|
|
3640
3516
|
"input:checked + &": {
|
|
3641
|
-
|
|
3642
|
-
|
|
3517
|
+
vars: {
|
|
3518
|
+
[varNames.color.input.switch.bg]: vars.color.solid.default.bg[0],
|
|
3519
|
+
[varNames.color.input.switch.fg]: vars.color.solid.default.fg[0],
|
|
3520
|
+
[varNames.input.switch.thumb.offset]: `calc(${vars.input.switch.width} - (${vars.input.switch.padding} * 2) - ${vars.input.switch.thumb.size})`
|
|
3521
|
+
}
|
|
3522
|
+
},
|
|
3523
|
+
"[data-indeterminate] > input + &": {
|
|
3524
|
+
vars: {
|
|
3525
|
+
[varNames.input.switch.thumb.offset]: `calc(${vars.input.switch.width} / 2 - ${vars.input.switch.thumb.size} / 2 - ${vars.input.switch.padding})`
|
|
3526
|
+
}
|
|
3643
3527
|
},
|
|
3644
|
-
"
|
|
3645
|
-
|
|
3528
|
+
"input:focus + &": {
|
|
3529
|
+
outline: `${vars.input.switch.focusRing.width} solid ${vars.color.focusRing}`
|
|
3646
3530
|
},
|
|
3647
|
-
"
|
|
3648
|
-
|
|
3531
|
+
"input:focus:not(:focus-visible) + &": {
|
|
3532
|
+
outline: "none"
|
|
3649
3533
|
}
|
|
3650
3534
|
}
|
|
3651
3535
|
},
|
|
3652
3536
|
".switch-track": {
|
|
3653
3537
|
display: "block",
|
|
3654
|
-
backgroundColor:
|
|
3538
|
+
backgroundColor: vars.color.input.switch.bg,
|
|
3655
3539
|
position: "absolute",
|
|
3656
3540
|
left: 0,
|
|
3657
3541
|
top: 0,
|
|
3658
3542
|
right: 0,
|
|
3659
3543
|
bottom: 0,
|
|
3660
3544
|
borderRadius: "inherit",
|
|
3661
|
-
transition:
|
|
3545
|
+
transition: `box-shadow, background-color ${vars.input.switch.transitionDurationMs} ${vars.input.switch.transitionTimingFunction}`
|
|
3662
3546
|
},
|
|
3663
3547
|
".switch-thumb": {
|
|
3664
3548
|
display: "block",
|
|
3665
3549
|
position: "absolute",
|
|
3666
|
-
left:
|
|
3667
|
-
top:
|
|
3668
|
-
width:
|
|
3669
|
-
height:
|
|
3670
|
-
backgroundColor:
|
|
3550
|
+
left: vars.input.switch.padding,
|
|
3551
|
+
top: vars.input.switch.padding,
|
|
3552
|
+
width: vars.input.switch.thumb.size,
|
|
3553
|
+
height: vars.input.switch.thumb.size,
|
|
3554
|
+
backgroundColor: vars.color.input.switch.fg,
|
|
3671
3555
|
borderRadius: "9999px",
|
|
3672
|
-
boxShadow:
|
|
3673
|
-
transform:
|
|
3674
|
-
transition:
|
|
3556
|
+
boxShadow: `0 0 0 0.5px ${vars.color.shadow.umbra}, 0 0.5px 2px 0.5px ${vars.color.shadow.umbra}`,
|
|
3557
|
+
transform: `translate3d(${vars.input.switch.thumb.offset}, 0, 0)`,
|
|
3558
|
+
transition: `transform ${vars.input.switch.transitionDurationMs} ${vars.input.switch.transitionTimingFunction}`
|
|
3675
3559
|
}
|
|
3676
3560
|
}, switchStyle = {
|
|
3677
3561
|
layers: {
|
|
@@ -3679,46 +3563,51 @@ const labelStyle = {
|
|
|
3679
3563
|
}
|
|
3680
3564
|
}, primitive$5 = {
|
|
3681
3565
|
".text": {
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3566
|
+
vars: {
|
|
3567
|
+
[varNames.font.family]: vars.font.text.family,
|
|
3568
|
+
[varNames.font.featureSettings]: vars.font.text.featureSettings,
|
|
3569
|
+
[varNames.font.weight.regular]: vars.font.text.weight.regular,
|
|
3570
|
+
[varNames.font.weight.medium]: vars.font.text.weight.medium,
|
|
3571
|
+
[varNames.font.weight.semibold]: vars.font.text.weight.semibold,
|
|
3572
|
+
[varNames.font.weight.bold]: vars.font.text.weight.bold
|
|
3573
|
+
},
|
|
3574
|
+
color: vars.color.fg,
|
|
3575
|
+
nest: {
|
|
3690
3576
|
"& a": {
|
|
3691
|
-
color:
|
|
3577
|
+
color: vars.color.link.fg,
|
|
3692
3578
|
textDecoration: "none"
|
|
3693
3579
|
},
|
|
3694
3580
|
"& a:hover": {
|
|
3695
|
-
color:
|
|
3581
|
+
color: vars.color.fg
|
|
3696
3582
|
},
|
|
3697
3583
|
"& code": {
|
|
3698
3584
|
fontFamily: vars.font.code.family,
|
|
3699
|
-
color:
|
|
3700
|
-
backgroundColor:
|
|
3585
|
+
color: vars.color.code.fg,
|
|
3586
|
+
backgroundColor: vars.color.code.bg,
|
|
3701
3587
|
borderRadius: vars.radius[2]
|
|
3702
3588
|
},
|
|
3703
3589
|
"& svg": {
|
|
3704
|
-
color:
|
|
3590
|
+
color: vars.color.muted.fg
|
|
3705
3591
|
}
|
|
3706
3592
|
}
|
|
3707
3593
|
},
|
|
3708
3594
|
".text-muted": {
|
|
3709
|
-
color:
|
|
3595
|
+
color: vars.color.muted.fg
|
|
3710
3596
|
}
|
|
3711
3597
|
};
|
|
3712
|
-
for (const size of theme.FONT_TEXT_SIZE)
|
|
3598
|
+
for (const size of theme.FONT_TEXT_SIZE) {
|
|
3599
|
+
const v = vars.font.text.sizes[size];
|
|
3713
3600
|
_responsiveRule(primitive$5, `text-${size}`, {
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3601
|
+
vars: {
|
|
3602
|
+
[varNames.font.fontSize]: v.fontSize,
|
|
3603
|
+
[varNames.font.lineHeight]: v.lineHeight,
|
|
3604
|
+
[varNames.font.letterSpacing]: v.letterSpacing,
|
|
3605
|
+
[varNames.font.iconSize]: v.iconSize,
|
|
3606
|
+
[varNames.font.ascenderHeight]: v.ascenderHeight,
|
|
3607
|
+
[varNames.font.descenderHeight]: v.descenderHeight
|
|
3608
|
+
}
|
|
3721
3609
|
});
|
|
3610
|
+
}
|
|
3722
3611
|
const textStyle = {
|
|
3723
3612
|
layers: {
|
|
3724
3613
|
primitive: primitive$5
|
|
@@ -3733,20 +3622,22 @@ const textStyle = {
|
|
|
3733
3622
|
}
|
|
3734
3623
|
}, primitive$3 = {
|
|
3735
3624
|
".text-input": {
|
|
3736
|
-
|
|
3737
|
-
|
|
3625
|
+
vars: {
|
|
3626
|
+
[varNames.font.family]: vars.font.text.family
|
|
3627
|
+
},
|
|
3628
|
+
nest: {
|
|
3738
3629
|
"& > span": {
|
|
3739
3630
|
borderRadius: "inherit"
|
|
3740
3631
|
}
|
|
3741
3632
|
}
|
|
3742
3633
|
},
|
|
3743
3634
|
".text-input-prefix": {
|
|
3744
|
-
borderTop:
|
|
3745
|
-
borderLeft:
|
|
3746
|
-
borderBottom:
|
|
3635
|
+
borderTop: `1px solid ${vars.color.border}`,
|
|
3636
|
+
borderLeft: `1px solid ${vars.color.border}`,
|
|
3637
|
+
borderBottom: `1px solid ${vars.color.border}`,
|
|
3747
3638
|
borderTopRightRadius: "0 !important",
|
|
3748
3639
|
borderBottomRightRadius: "0 !important",
|
|
3749
|
-
|
|
3640
|
+
nest: {
|
|
3750
3641
|
"& > span": {
|
|
3751
3642
|
display: "block",
|
|
3752
3643
|
margin: "-1px"
|
|
@@ -3754,12 +3645,12 @@ const textStyle = {
|
|
|
3754
3645
|
}
|
|
3755
3646
|
},
|
|
3756
3647
|
".text-input-suffix": {
|
|
3757
|
-
borderTop:
|
|
3758
|
-
borderRight:
|
|
3759
|
-
borderBottom:
|
|
3648
|
+
borderTop: `1px solid ${vars.color.border}`,
|
|
3649
|
+
borderRight: `1px solid ${vars.color.border}`,
|
|
3650
|
+
borderBottom: `1px solid ${vars.color.border}`,
|
|
3760
3651
|
borderTopLeftRadius: "0 !important",
|
|
3761
3652
|
borderBottomLeftRadius: "0 !important",
|
|
3762
|
-
|
|
3653
|
+
nest: {
|
|
3763
3654
|
"& > span": {
|
|
3764
3655
|
display: "block",
|
|
3765
3656
|
margin: "-1px"
|
|
@@ -3774,7 +3665,7 @@ const textStyle = {
|
|
|
3774
3665
|
}, primitive$2 = {
|
|
3775
3666
|
".token": {
|
|
3776
3667
|
_prefix: !1,
|
|
3777
|
-
|
|
3668
|
+
nest: {
|
|
3778
3669
|
"&.atrule": {
|
|
3779
3670
|
color: vars.color.code.token.atrule
|
|
3780
3671
|
},
|
|
@@ -3898,10 +3789,11 @@ const textStyle = {
|
|
|
3898
3789
|
},
|
|
3899
3790
|
".tooltip-card": {
|
|
3900
3791
|
willChange: "transform",
|
|
3901
|
-
|
|
3792
|
+
nest: {
|
|
3902
3793
|
"&[data-animate] > *": {
|
|
3794
|
+
// TODO
|
|
3903
3795
|
// opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
|
|
3904
|
-
opacity:
|
|
3796
|
+
// opacity: `var(--motion-content-opacity, 1)`,
|
|
3905
3797
|
willChange: "opacity"
|
|
3906
3798
|
}
|
|
3907
3799
|
}
|
|
@@ -3937,6 +3829,7 @@ const textStyle = {
|
|
|
3937
3829
|
},
|
|
3938
3830
|
// aspects
|
|
3939
3831
|
borderStyle,
|
|
3832
|
+
boxSizingStyle,
|
|
3940
3833
|
displayStyle,
|
|
3941
3834
|
flexStyle,
|
|
3942
3835
|
flexAlignStyle,
|
|
@@ -4012,323 +3905,28 @@ const textStyle = {
|
|
|
4012
3905
|
function _compileSystem() {
|
|
4013
3906
|
return _compileStyle(_systemStyle);
|
|
4014
3907
|
}
|
|
4015
|
-
|
|
4016
|
-
function _compileTheme_v3(theme2) {
|
|
3908
|
+
function _compileTheme() {
|
|
4017
3909
|
return _compileStyle({
|
|
4018
3910
|
layers: {
|
|
4019
3911
|
theme: {
|
|
4020
|
-
":root":
|
|
3912
|
+
":root": properties
|
|
4021
3913
|
}
|
|
4022
3914
|
}
|
|
4023
3915
|
});
|
|
4024
3916
|
}
|
|
4025
|
-
function
|
|
4026
|
-
return
|
|
4027
|
-
...buildAvatarThemeProperties(theme2),
|
|
4028
|
-
...buildButtonThemeProperties(theme2),
|
|
4029
|
-
// card
|
|
4030
|
-
[varNames.card.shadow.outline]: px(theme2.card.shadow.outline),
|
|
4031
|
-
...buildColorThemeProperties(theme2),
|
|
4032
|
-
...buildContainerThemeProperties(theme2),
|
|
4033
|
-
...buildFontCodeThemeProperties(theme2),
|
|
4034
|
-
...buildFontHeadingThemeProperties(theme2),
|
|
4035
|
-
...buildFontLabelThemeProperties(theme2),
|
|
4036
|
-
...buildFontTextThemeProperties(theme2),
|
|
4037
|
-
...buildInputThemeProperties(theme2),
|
|
4038
|
-
...buildRadiusThemeProperties(theme2),
|
|
4039
|
-
...buildShadowThemeProperties(theme2),
|
|
4040
|
-
...buildSpaceThemeProperties(theme2)
|
|
4041
|
-
};
|
|
4042
|
-
}
|
|
4043
|
-
function buildAvatarThemeProperties(theme2) {
|
|
4044
|
-
return {
|
|
4045
|
-
[varNames.avatar.focusRing.offset]: px(theme2.avatar.focusRing.offset),
|
|
4046
|
-
[varNames.avatar.focusRing.width]: px(theme2.avatar.focusRing.width),
|
|
4047
|
-
[varNames.avatar.sizes[0].distance]: rem(theme2.avatar.sizes[0].distance),
|
|
4048
|
-
[varNames.avatar.sizes[0].size]: rem(theme2.avatar.sizes[0].size),
|
|
4049
|
-
[varNames.avatar.sizes[1].distance]: rem(theme2.avatar.sizes[1].distance),
|
|
4050
|
-
[varNames.avatar.sizes[1].size]: rem(theme2.avatar.sizes[1].size),
|
|
4051
|
-
[varNames.avatar.sizes[2].distance]: rem(theme2.avatar.sizes[2].distance),
|
|
4052
|
-
[varNames.avatar.sizes[2].size]: rem(theme2.avatar.sizes[2].size),
|
|
4053
|
-
[varNames.avatar.sizes[3].distance]: rem(theme2.avatar.sizes[3].distance),
|
|
4054
|
-
[varNames.avatar.sizes[3].size]: rem(theme2.avatar.sizes[3].size)
|
|
4055
|
-
};
|
|
4056
|
-
}
|
|
4057
|
-
function buildButtonThemeProperties(theme2) {
|
|
4058
|
-
return {
|
|
4059
|
-
[varNames.button.border.width]: px(theme2.button.border.width),
|
|
4060
|
-
[varNames.button.focusRing.offset]: px(theme2.button.focusRing.offset),
|
|
4061
|
-
[varNames.button.focusRing.width]: px(theme2.button.focusRing.width)
|
|
4062
|
-
};
|
|
4063
|
-
}
|
|
4064
|
-
function buildContainerThemeProperties(theme2) {
|
|
4065
|
-
return {
|
|
4066
|
-
[varNames.container[0]]: rem(theme2.container[0]),
|
|
4067
|
-
[varNames.container[1]]: rem(theme2.container[1]),
|
|
4068
|
-
[varNames.container[2]]: rem(theme2.container[2]),
|
|
4069
|
-
[varNames.container[3]]: rem(theme2.container[3]),
|
|
4070
|
-
[varNames.container[4]]: rem(theme2.container[4]),
|
|
4071
|
-
[varNames.container[5]]: rem(theme2.container[5])
|
|
4072
|
-
};
|
|
4073
|
-
}
|
|
4074
|
-
function buildFontCodeThemeProperties(theme$1) {
|
|
4075
|
-
const v = varNames.font.code, t = theme$1.font.code, props = {
|
|
4076
|
-
[v.family]: t.family,
|
|
4077
|
-
[v.featureSettings]: t.featureSettings || "normal",
|
|
4078
|
-
[v.weights.regular]: t.weights.regular,
|
|
4079
|
-
[v.weights.medium]: t.weights.medium,
|
|
4080
|
-
[v.weights.semibold]: t.weights.semibold,
|
|
4081
|
-
[v.weights.bold]: t.weights.bold
|
|
4082
|
-
};
|
|
4083
|
-
for (const size of theme.FONT_CODE_SIZE) {
|
|
4084
|
-
const _v = varNames.font.code.sizes[size], _t = theme$1.font.code.sizes[size];
|
|
4085
|
-
props[_v.fontSize] = rem(_t.fontSize), props[_v.lineHeight] = rem(_t.lineHeight), props[_v.ascenderHeight] = rem(_t.ascenderHeight), props[_v.descenderHeight] = rem(_t.descenderHeight), props[_v.letterSpacing] = rem(_t.letterSpacing), props[_v.iconSize] = rem(_t.iconSize);
|
|
4086
|
-
}
|
|
4087
|
-
return props;
|
|
4088
|
-
}
|
|
4089
|
-
function buildFontHeadingThemeProperties(theme$1) {
|
|
4090
|
-
const v = varNames.font.heading, t = theme$1.font.heading, props = {
|
|
4091
|
-
[v.family]: t.family,
|
|
4092
|
-
[v.featureSettings]: t.featureSettings,
|
|
4093
|
-
[v.weights.regular]: t.weights.regular,
|
|
4094
|
-
[v.weights.medium]: t.weights.medium,
|
|
4095
|
-
[v.weights.semibold]: t.weights.semibold,
|
|
4096
|
-
[v.weights.bold]: t.weights.bold
|
|
4097
|
-
};
|
|
4098
|
-
for (const size of theme.FONT_HEADING_SIZE) {
|
|
4099
|
-
const _v = v.sizes[size], _t = t.sizes[size];
|
|
4100
|
-
props[_v.fontSize] = rem(_t.fontSize), props[_v.lineHeight] = rem(_t.lineHeight), props[_v.ascenderHeight] = rem(_t.ascenderHeight), props[_v.descenderHeight] = rem(_t.descenderHeight), props[_v.letterSpacing] = rem(_t.letterSpacing), props[_v.iconSize] = rem(_t.iconSize);
|
|
4101
|
-
}
|
|
4102
|
-
return props;
|
|
4103
|
-
}
|
|
4104
|
-
function buildFontLabelThemeProperties(theme$1) {
|
|
4105
|
-
const v = varNames.font.label, t = theme$1.font.label, props = {
|
|
4106
|
-
[v.family]: t.family,
|
|
4107
|
-
[v.featureSettings]: t.featureSettings,
|
|
4108
|
-
[v.weights.regular]: t.weights.regular,
|
|
4109
|
-
[v.weights.medium]: t.weights.medium,
|
|
4110
|
-
[v.weights.semibold]: t.weights.semibold,
|
|
4111
|
-
[v.weights.bold]: t.weights.bold
|
|
4112
|
-
};
|
|
4113
|
-
for (const size of theme.FONT_LABEL_SIZE) {
|
|
4114
|
-
const _v = v.sizes[size], _t = t.sizes[size];
|
|
4115
|
-
props[_v.fontSize] = rem(_t.fontSize), props[_v.lineHeight] = rem(_t.lineHeight), props[_v.ascenderHeight] = rem(_t.ascenderHeight), props[_v.descenderHeight] = rem(_t.descenderHeight), props[_v.letterSpacing] = rem(_t.letterSpacing), props[_v.iconSize] = rem(_t.iconSize);
|
|
4116
|
-
}
|
|
4117
|
-
return props;
|
|
4118
|
-
}
|
|
4119
|
-
function buildFontTextThemeProperties(theme$1) {
|
|
4120
|
-
const v = varNames.font.text, t = theme$1.font.text, props = {
|
|
4121
|
-
[v.family]: t.family,
|
|
4122
|
-
[v.featureSettings]: t.featureSettings,
|
|
4123
|
-
[v.weights.regular]: t.weights.regular,
|
|
4124
|
-
[v.weights.medium]: t.weights.medium,
|
|
4125
|
-
[v.weights.semibold]: t.weights.semibold,
|
|
4126
|
-
[v.weights.bold]: t.weights.bold
|
|
4127
|
-
};
|
|
4128
|
-
for (const size of theme.FONT_TEXT_SIZE) {
|
|
4129
|
-
const _v = v.sizes[size], _t = t.sizes[size];
|
|
4130
|
-
props[_v.fontSize] = rem(_t.fontSize), props[_v.lineHeight] = rem(_t.lineHeight), props[_v.ascenderHeight] = rem(_t.ascenderHeight), props[_v.descenderHeight] = rem(_t.descenderHeight), props[_v.letterSpacing] = rem(_t.letterSpacing), props[_v.iconSize] = rem(_t.iconSize);
|
|
4131
|
-
}
|
|
4132
|
-
return props;
|
|
4133
|
-
}
|
|
4134
|
-
function buildInputThemeProperties(theme2) {
|
|
4135
|
-
return {
|
|
4136
|
-
[varNames.input.border.width]: px(theme2.input.border.width),
|
|
4137
|
-
[varNames.input.checkbox.focusRing.offset]: px(theme2.input.checkbox.focusRing.offset),
|
|
4138
|
-
[varNames.input.checkbox.focusRing.width]: px(theme2.input.checkbox.focusRing.width),
|
|
4139
|
-
[varNames.input.checkbox.size]: rem(theme2.input.checkbox.size),
|
|
4140
|
-
[varNames.input.radio.focusRing.offset]: px(theme2.input.radio.focusRing.offset),
|
|
4141
|
-
[varNames.input.radio.focusRing.width]: px(theme2.input.radio.focusRing.width),
|
|
4142
|
-
[varNames.input.radio.markSize]: rem(theme2.input.radio.markSize),
|
|
4143
|
-
[varNames.input.radio.size]: rem(theme2.input.radio.size),
|
|
4144
|
-
[varNames.input.select.focusRing.offset]: px(theme2.input.select.focusRing.offset),
|
|
4145
|
-
[varNames.input.select.focusRing.width]: px(theme2.input.select.focusRing.width),
|
|
4146
|
-
[varNames.input.switch.focusRing.offset]: px(theme2.input.switch.focusRing.offset),
|
|
4147
|
-
[varNames.input.switch.focusRing.width]: px(theme2.input.switch.focusRing.width),
|
|
4148
|
-
[varNames.input.switch.height]: rem(theme2.input.switch.height),
|
|
4149
|
-
[varNames.input.switch.padding]: rem(theme2.input.switch.padding),
|
|
4150
|
-
[varNames.input.switch.transitionDurationMs]: `${theme2.input.switch.transitionDurationMs}ms`,
|
|
4151
|
-
[varNames.input.switch.transitionTimingFunction]: theme2.input.switch.transitionTimingFunction,
|
|
4152
|
-
[varNames.input.switch.width]: rem(theme2.input.switch.width),
|
|
4153
|
-
[varNames.input.text.focusRing.offset]: px(theme2.input.text.focusRing.offset),
|
|
4154
|
-
[varNames.input.text.focusRing.width]: px(theme2.input.text.focusRing.width)
|
|
4155
|
-
};
|
|
4156
|
-
}
|
|
4157
|
-
function buildRadiusThemeProperties(theme2) {
|
|
4158
|
-
return {
|
|
4159
|
-
[varNames.radius[0]]: px(theme2.radius[0]),
|
|
4160
|
-
[varNames.radius[1]]: px(theme2.radius[1]),
|
|
4161
|
-
[varNames.radius[2]]: px(theme2.radius[2]),
|
|
4162
|
-
[varNames.radius[3]]: px(theme2.radius[3]),
|
|
4163
|
-
[varNames.radius[4]]: px(theme2.radius[4]),
|
|
4164
|
-
[varNames.radius[5]]: px(theme2.radius[5]),
|
|
4165
|
-
[varNames.radius[6]]: px(theme2.radius[6])
|
|
4166
|
-
};
|
|
4167
|
-
}
|
|
4168
|
-
function buildShadowThemeProperties(theme2) {
|
|
4169
|
-
return {
|
|
4170
|
-
[varNames.shadow[0].umbra]: toBoxShadow(theme2.shadow[0]?.umbra),
|
|
4171
|
-
[varNames.shadow[0].penumbra]: toBoxShadow(theme2.shadow[0]?.penumbra),
|
|
4172
|
-
[varNames.shadow[0].ambient]: toBoxShadow(theme2.shadow[0]?.ambient),
|
|
4173
|
-
[varNames.shadow[1].umbra]: toBoxShadow(theme2.shadow[1]?.umbra),
|
|
4174
|
-
[varNames.shadow[1].penumbra]: toBoxShadow(theme2.shadow[1]?.penumbra),
|
|
4175
|
-
[varNames.shadow[1].ambient]: toBoxShadow(theme2.shadow[1]?.ambient),
|
|
4176
|
-
[varNames.shadow[2].umbra]: toBoxShadow(theme2.shadow[2]?.umbra),
|
|
4177
|
-
[varNames.shadow[2].penumbra]: toBoxShadow(theme2.shadow[2]?.penumbra),
|
|
4178
|
-
[varNames.shadow[2].ambient]: toBoxShadow(theme2.shadow[2]?.ambient),
|
|
4179
|
-
[varNames.shadow[3].umbra]: toBoxShadow(theme2.shadow[3]?.umbra),
|
|
4180
|
-
[varNames.shadow[3].penumbra]: toBoxShadow(theme2.shadow[3]?.penumbra),
|
|
4181
|
-
[varNames.shadow[3].ambient]: toBoxShadow(theme2.shadow[3]?.ambient),
|
|
4182
|
-
[varNames.shadow[4].umbra]: toBoxShadow(theme2.shadow[4]?.umbra),
|
|
4183
|
-
[varNames.shadow[4].penumbra]: toBoxShadow(theme2.shadow[4]?.penumbra),
|
|
4184
|
-
[varNames.shadow[4].ambient]: toBoxShadow(theme2.shadow[4]?.ambient),
|
|
4185
|
-
[varNames.shadow[5].umbra]: toBoxShadow(theme2.shadow[5]?.umbra),
|
|
4186
|
-
[varNames.shadow[5].penumbra]: toBoxShadow(theme2.shadow[5]?.penumbra),
|
|
4187
|
-
[varNames.shadow[5].ambient]: toBoxShadow(theme2.shadow[5]?.ambient)
|
|
4188
|
-
};
|
|
4189
|
-
}
|
|
4190
|
-
function buildSpaceThemeProperties(theme2) {
|
|
4191
|
-
return {
|
|
4192
|
-
[varNames.space[0]]: px(theme2.space[0]),
|
|
4193
|
-
[varNames.space[0.5]]: px(theme2.space[1] / 2),
|
|
4194
|
-
[varNames.space[1]]: px(theme2.space[1]),
|
|
4195
|
-
[varNames.space[2]]: px(theme2.space[2]),
|
|
4196
|
-
[varNames.space[3]]: px(theme2.space[3]),
|
|
4197
|
-
[varNames.space[4]]: px(theme2.space[4]),
|
|
4198
|
-
[varNames.space[5]]: px(theme2.space[5]),
|
|
4199
|
-
[varNames.space[6]]: px(theme2.space[6]),
|
|
4200
|
-
[varNames.space[7]]: px(theme2.space[7]),
|
|
4201
|
-
[varNames.space[8]]: px(theme2.space[8]),
|
|
4202
|
-
[varNames.space[9]]: px(theme2.space[9])
|
|
4203
|
-
};
|
|
4204
|
-
}
|
|
4205
|
-
function buildColorThemeProperties(theme$1) {
|
|
4206
|
-
const props = {};
|
|
4207
|
-
for (const scheme of THEME_COLOR_SCHEMES)
|
|
4208
|
-
for (const cardTone of theme.THEME_COLOR_CARD_TONES) {
|
|
4209
|
-
Object.assign(props, buildColorAvatarThemeProperties(theme$1, {
|
|
4210
|
-
scheme,
|
|
4211
|
-
cardTone
|
|
4212
|
-
})), Object.assign(props, buildColorCardThemeProperties(theme$1, {
|
|
4213
|
-
scheme,
|
|
4214
|
-
cardTone
|
|
4215
|
-
}));
|
|
4216
|
-
for (const colorVariant of THEME_COLOR_VARIANTS)
|
|
4217
|
-
for (const elementTone of theme.THEME_COLOR_STATE_TONES) {
|
|
4218
|
-
const v = varNames.color[scheme][cardTone][colorVariant][elementTone], t = theme$1._tokens.color[cardTone].variant[colorVariant][elementTone], context = {
|
|
4219
|
-
bgValue: "transparent",
|
|
4220
|
-
bgVar: v.bg[0],
|
|
4221
|
-
hue: t._hue,
|
|
4222
|
-
scheme
|
|
4223
|
-
};
|
|
4224
|
-
Object.assign(props, {
|
|
4225
|
-
[v.bg[0]]: theme.renderColor(t.bg[0], context),
|
|
4226
|
-
[v.bg[1]]: `color-mix(in srgb, var(${v.bg[0]}), var(${v.bg[4]}) 25%)`,
|
|
4227
|
-
[v.bg[2]]: `color-mix(in srgb, var(${v.bg[0]}), var(${v.bg[4]}) 50%)`,
|
|
4228
|
-
[v.bg[3]]: `color-mix(in srgb, var(${v.bg[0]}), var(${v.bg[4]}) 75%)`,
|
|
4229
|
-
[v.bg[4]]: theme.renderColor(t.bg[4], context),
|
|
4230
|
-
[v.border[0]]: theme.renderColor(t.border[0], context),
|
|
4231
|
-
[v.border[1]]: `color-mix(in srgb, var(${v.border[0]}), var(${v.border[4]}) 25%)`,
|
|
4232
|
-
[v.border[2]]: `color-mix(in srgb, var(${v.border[0]}), var(${v.border[4]}) 50%)`,
|
|
4233
|
-
[v.border[3]]: `color-mix(in srgb, var(${v.border[0]}), var(${v.border[4]}) 75%)`,
|
|
4234
|
-
[v.border[4]]: theme.renderColor(t.border[4], context),
|
|
4235
|
-
[v.fg[0]]: theme.renderColor(t.fg[0], context),
|
|
4236
|
-
[v.fg[1]]: `color-mix(in srgb, var(${v.fg[0]}), var(${v.fg[4]}) 25%)`,
|
|
4237
|
-
[v.fg[2]]: `color-mix(in srgb, var(${v.fg[0]}), var(${v.fg[4]}) 50%)`,
|
|
4238
|
-
[v.fg[3]]: `color-mix(in srgb, var(${v.fg[0]}), var(${v.fg[4]}) 75%)`,
|
|
4239
|
-
[v.fg[4]]: theme.renderColor(t.fg[4], context)
|
|
4240
|
-
});
|
|
4241
|
-
}
|
|
4242
|
-
}
|
|
4243
|
-
return props;
|
|
3917
|
+
function _getClassNames(...classNames) {
|
|
3918
|
+
return classNames.map((n) => typeof n == "string" && n.trim()).filter(Boolean).join(" ").split(" ").filter(Boolean);
|
|
4244
3919
|
}
|
|
4245
|
-
function
|
|
4246
|
-
|
|
4247
|
-
scheme,
|
|
4248
|
-
cardTone
|
|
4249
|
-
} = options, v = varNames.color[scheme][cardTone], t = theme$1._tokens.color[cardTone], props = {};
|
|
4250
|
-
for (const hue of theme.HUES) {
|
|
4251
|
-
const context = {
|
|
4252
|
-
bgValue: "transparent",
|
|
4253
|
-
bgVar: varNames.color.bg,
|
|
4254
|
-
hue: t.avatar[hue]._hue ?? hue,
|
|
4255
|
-
scheme
|
|
4256
|
-
};
|
|
4257
|
-
Object.assign(props, {
|
|
4258
|
-
[v.avatar[hue].bg]: theme.renderColor(t.avatar[hue].bg, context),
|
|
4259
|
-
[v.avatar[hue].fg]: theme.renderColor(t.avatar[hue].fg, context)
|
|
4260
|
-
});
|
|
4261
|
-
}
|
|
4262
|
-
return props;
|
|
3920
|
+
function _composeClassNames(...classNames) {
|
|
3921
|
+
return unique(_getClassNames(...classNames)).join(" ") || void 0;
|
|
4263
3922
|
}
|
|
4264
|
-
function
|
|
4265
|
-
|
|
4266
|
-
scheme,
|
|
4267
|
-
cardTone
|
|
4268
|
-
} = options, v = varNames.color[scheme][cardTone], t = theme$1._tokens.color[cardTone], context = {
|
|
4269
|
-
bgValue: "transparent",
|
|
4270
|
-
bgVar: varNames.color.bg,
|
|
4271
|
-
hue: t._hue,
|
|
4272
|
-
scheme
|
|
4273
|
-
};
|
|
4274
|
-
return {
|
|
4275
|
-
// backdrop
|
|
4276
|
-
[v.backdrop]: theme.renderColor(t.backdrop, context),
|
|
4277
|
-
// code
|
|
4278
|
-
[v.code.bg]: theme.renderColor(t.code.bg, context),
|
|
4279
|
-
[v.code.fg]: theme.renderColor(t.code.fg, context),
|
|
4280
|
-
// code / token
|
|
4281
|
-
[v.code.token.atrule]: theme.renderColor(t.code.token.atrule, context),
|
|
4282
|
-
[v.code.token.attrName]: theme.renderColor(t.code.token.attrName, context),
|
|
4283
|
-
[v.code.token.attrValue]: theme.renderColor(t.code.token.attrValue, context),
|
|
4284
|
-
[v.code.token.attribute]: theme.renderColor(t.code.token.attribute, context),
|
|
4285
|
-
[v.code.token.boolean]: theme.renderColor(t.code.token.boolean, context),
|
|
4286
|
-
[v.code.token.builtin]: theme.renderColor(t.code.token.builtin, context),
|
|
4287
|
-
[v.code.token.cdata]: theme.renderColor(t.code.token.cdata, context),
|
|
4288
|
-
[v.code.token.char]: theme.renderColor(t.code.token.char, context),
|
|
4289
|
-
[v.code.token.className]: theme.renderColor(t.code.token.className, context),
|
|
4290
|
-
[v.code.token.class]: theme.renderColor(t.code.token.class, context),
|
|
4291
|
-
[v.code.token.comment]: theme.renderColor(t.code.token.comment, context),
|
|
4292
|
-
[v.code.token.constant]: theme.renderColor(t.code.token.constant, context),
|
|
4293
|
-
[v.code.token.deleted]: theme.renderColor(t.code.token.deleted, context),
|
|
4294
|
-
[v.code.token.doctype]: theme.renderColor(t.code.token.doctype, context),
|
|
4295
|
-
[v.code.token.entity]: theme.renderColor(t.code.token.entity, context),
|
|
4296
|
-
[v.code.token.function]: theme.renderColor(t.code.token.function, context),
|
|
4297
|
-
[v.code.token.hexcode]: theme.renderColor(t.code.token.hexcode, context),
|
|
4298
|
-
[v.code.token.id]: theme.renderColor(t.code.token.id, context),
|
|
4299
|
-
[v.code.token.important]: theme.renderColor(t.code.token.important, context),
|
|
4300
|
-
[v.code.token.inserted]: theme.renderColor(t.code.token.inserted, context),
|
|
4301
|
-
[v.code.token.keyword]: theme.renderColor(t.code.token.keyword, context),
|
|
4302
|
-
[v.code.token.number]: theme.renderColor(t.code.token.number, context),
|
|
4303
|
-
[v.code.token.operator]: theme.renderColor(t.code.token.operator, context),
|
|
4304
|
-
[v.code.token.prolog]: theme.renderColor(t.code.token.prolog, context),
|
|
4305
|
-
[v.code.token.property]: theme.renderColor(t.code.token.property, context),
|
|
4306
|
-
[v.code.token.pseudoClass]: theme.renderColor(t.code.token.pseudoClass, context),
|
|
4307
|
-
[v.code.token.pseudoElement]: theme.renderColor(t.code.token.pseudoElement, context),
|
|
4308
|
-
[v.code.token.punctuation]: theme.renderColor(t.code.token.punctuation, context),
|
|
4309
|
-
[v.code.token.regex]: theme.renderColor(t.code.token.regex, context),
|
|
4310
|
-
[v.code.token.selector]: theme.renderColor(t.code.token.selector, context),
|
|
4311
|
-
[v.code.token.string]: theme.renderColor(t.code.token.string, context),
|
|
4312
|
-
[v.code.token.symbol]: theme.renderColor(t.code.token.symbol, context),
|
|
4313
|
-
[v.code.token.tag]: theme.renderColor(t.code.token.tag, context),
|
|
4314
|
-
[v.code.token.unit]: theme.renderColor(t.code.token.unit, context),
|
|
4315
|
-
[v.code.token.url]: theme.renderColor(t.code.token.url, context),
|
|
4316
|
-
[v.code.token.variable]: theme.renderColor(t.code.token.variable, context),
|
|
4317
|
-
// focus ring
|
|
4318
|
-
[v.focusRing]: theme.renderColor(t.focusRing, context),
|
|
4319
|
-
// link
|
|
4320
|
-
[v.link.fg]: theme.renderColor(t.link.fg, context),
|
|
4321
|
-
// shadow
|
|
4322
|
-
[v.shadow.outline]: theme.renderColor(t.shadow.outline, context),
|
|
4323
|
-
[v.shadow.umbra]: theme.renderColor(t.shadow.umbra, context),
|
|
4324
|
-
[v.shadow.penumbra]: theme.renderColor(t.shadow.penumbra, context),
|
|
4325
|
-
[v.shadow.ambient]: theme.renderColor(t.shadow.ambient, context)
|
|
4326
|
-
};
|
|
3923
|
+
function unique(array) {
|
|
3924
|
+
return Array.from(new Set(array));
|
|
4327
3925
|
}
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
`;
|
|
3926
|
+
const p = PREFIX === "__PREFIX__" ? "s-" : PREFIX;
|
|
3927
|
+
function _scopeClassName(className) {
|
|
3928
|
+
if (className !== void 0)
|
|
3929
|
+
return `${p}${className.trim()}`;
|
|
4332
3930
|
}
|
|
4333
3931
|
function _resp(prefix, prop) {
|
|
4334
3932
|
if (!(prop === void 0 || prop === !1))
|
|
@@ -4338,334 +3936,309 @@ function _resp(prefix, prop) {
|
|
|
4338
3936
|
return index === 0 ? className : `${index}:${className}`;
|
|
4339
3937
|
}).filter(Boolean).join(" ") : (typeof prop == "boolean" ? [prefix] : [prefix, prop]).filter((s) => s === 0 || !!s).join("-").replace(/\./g, "_");
|
|
4340
3938
|
}
|
|
4341
|
-
function
|
|
4342
|
-
return classNames.map(
|
|
4343
|
-
}
|
|
4344
|
-
function composeClassNames(...classNames) {
|
|
4345
|
-
return unique(_getClassNames(...classNames)).join(" ") || void 0;
|
|
4346
|
-
}
|
|
4347
|
-
function unique(array) {
|
|
4348
|
-
return Array.from(new Set(array));
|
|
3939
|
+
function _scopeClassNames(...classNames) {
|
|
3940
|
+
return _getClassNames(...classNames).map(_scopeClassName).join(" ") || void 0;
|
|
4349
3941
|
}
|
|
4350
3942
|
function border(props) {
|
|
4351
|
-
return
|
|
3943
|
+
return _scopeClassNames(_resp("border", props.border), _resp("border-t", props.borderTop), _resp("border-r", props.borderRight), _resp("border-b", props.borderBottom), _resp("border-l", props.borderLeft));
|
|
3944
|
+
}
|
|
3945
|
+
function boxSizing(props) {
|
|
3946
|
+
return _scopeClassNames(_resp("box", props.boxSizing));
|
|
4352
3947
|
}
|
|
4353
3948
|
function display(props) {
|
|
4354
|
-
return
|
|
3949
|
+
return _scopeClassNames(_resp(void 0, props.display));
|
|
4355
3950
|
}
|
|
4356
3951
|
function flex(props) {
|
|
4357
|
-
return
|
|
3952
|
+
return _scopeClassNames(_resp("flex-align", props.align), _resp("f", props.direction), _resp("flex-justify", props.justify), _resp("flex", props.wrap));
|
|
4358
3953
|
}
|
|
4359
3954
|
function flexItem(props) {
|
|
4360
|
-
return
|
|
3955
|
+
return _scopeClassNames(_resp("f", props.flex));
|
|
4361
3956
|
}
|
|
4362
3957
|
function font(props) {
|
|
4363
|
-
return
|
|
3958
|
+
return _scopeClassNames("font", props.weight && `font-${props.weight}`);
|
|
4364
3959
|
}
|
|
4365
3960
|
function gap(props) {
|
|
4366
|
-
return
|
|
3961
|
+
return _scopeClassNames(_resp("g", props.gap), _resp("gx", props.gapX), _resp("gy", props.gapY));
|
|
4367
3962
|
}
|
|
4368
3963
|
function grid(props) {
|
|
4369
|
-
return
|
|
3964
|
+
return _scopeClassNames(_resp("auto-cols", props.autoCols), _resp("auto-flow", props.autoFlow), _resp("auto-rows", props.autoRows), _resp("cols", props.columns), _resp("rows", props.rows));
|
|
4370
3965
|
}
|
|
4371
3966
|
function gridItem(props) {
|
|
4372
|
-
return
|
|
3967
|
+
return _scopeClassNames(_resp("col", props.column), _resp("col-start", props.columnStart), _resp("col-end", props.columnEnd), _resp("row", props.row), _resp("row-start", props.rowStart), _resp("row-end", props.rowEnd));
|
|
4373
3968
|
}
|
|
4374
3969
|
function height(props) {
|
|
4375
|
-
return
|
|
3970
|
+
return _scopeClassNames(_resp("h", props.height));
|
|
4376
3971
|
}
|
|
4377
3972
|
function inset(props) {
|
|
4378
|
-
return
|
|
3973
|
+
return _scopeClassNames(_resp("inset", props.inset), _resp("top", props.insetTop), _resp("right", props.insetRight), _resp("bottom", props.insetBottom), _resp("left", props.insetLeft));
|
|
4379
3974
|
}
|
|
4380
3975
|
function margin(props) {
|
|
4381
|
-
return
|
|
3976
|
+
return _scopeClassNames(_resp("m", props.margin), _resp("mx", props.marginX), _resp("my", props.marginY), _resp("mt", props.marginTop), _resp("mr", props.marginRight), _resp("mb", props.marginBottom), _resp("ml", props.marginLeft));
|
|
4382
3977
|
}
|
|
4383
3978
|
function maxWidth(props) {
|
|
4384
|
-
return _resp("max-w", props.maxWidth) ?? "";
|
|
3979
|
+
return _scopeClassNames(_resp("max-w", props.maxWidth) ?? "");
|
|
4385
3980
|
}
|
|
4386
3981
|
function minWidth(props) {
|
|
4387
|
-
return _resp("min-w", props.minWidth) ?? "";
|
|
3982
|
+
return _scopeClassNames(_resp("min-w", props.minWidth) ?? "");
|
|
4388
3983
|
}
|
|
4389
3984
|
function overflow(props) {
|
|
4390
|
-
return
|
|
3985
|
+
return _scopeClassNames(_resp("overflow", props.overflow), _resp("overflow-x", props.overflowX), _resp("overflow-y", props.overflowY));
|
|
4391
3986
|
}
|
|
4392
3987
|
function padding(props) {
|
|
4393
|
-
return
|
|
3988
|
+
return _scopeClassNames(_resp("p", props.padding), _resp("px", props.paddingX), _resp("py", props.paddingY), _resp("pt", props.paddingTop), _resp("pr", props.paddingRight), _resp("pb", props.paddingBottom), _resp("pl", props.paddingLeft));
|
|
4394
3989
|
}
|
|
4395
3990
|
function pointerEvents(props) {
|
|
4396
|
-
return
|
|
3991
|
+
return _scopeClassNames(props.pointerEvents && `pointer-events-${props.pointerEvents}`);
|
|
4397
3992
|
}
|
|
4398
3993
|
function position(props) {
|
|
4399
|
-
return
|
|
3994
|
+
return _scopeClassNames(_resp("position", props.position));
|
|
4400
3995
|
}
|
|
4401
3996
|
function radius(props) {
|
|
4402
|
-
return
|
|
3997
|
+
return _scopeClassNames(_resp("r", props.radius));
|
|
4403
3998
|
}
|
|
4404
3999
|
function shadow(props) {
|
|
4405
|
-
return
|
|
4000
|
+
return _scopeClassNames(_resp("shadow", props.shadow));
|
|
4406
4001
|
}
|
|
4407
4002
|
function textAlign(props) {
|
|
4408
|
-
return
|
|
4409
|
-
}
|
|
4410
|
-
function scopeClassName(className) {
|
|
4411
|
-
if (className !== void 0)
|
|
4412
|
-
return `${PREFIX}${className.trim()}`;
|
|
4413
|
-
}
|
|
4414
|
-
function _comp(...classNames) {
|
|
4415
|
-
return _getClassNames(...classNames).filter(Boolean).map(scopeClassName).join(" ") || void 0;
|
|
4003
|
+
return _scopeClassNames(_resp("text-align", props.textAlign));
|
|
4416
4004
|
}
|
|
4417
4005
|
function textOverflow(props) {
|
|
4418
|
-
return
|
|
4006
|
+
return _scopeClassNames(props.textOverflow && `text-overflow-${props.textOverflow}`);
|
|
4419
4007
|
}
|
|
4420
4008
|
function width(props) {
|
|
4421
|
-
return _resp("w", props.width) ?? "";
|
|
4009
|
+
return _scopeClassNames(_resp("w", props.width) ?? "");
|
|
4422
4010
|
}
|
|
4423
4011
|
function breadcrumbs() {
|
|
4424
|
-
return
|
|
4012
|
+
return _scopeClassNames("breadcrumbs");
|
|
4425
4013
|
}
|
|
4426
4014
|
function dialog() {
|
|
4427
|
-
return
|
|
4015
|
+
return _composeClassNames(_scopeClassNames("dialog"), inset({
|
|
4428
4016
|
inset: 0
|
|
4429
4017
|
}));
|
|
4430
4018
|
}
|
|
4431
4019
|
function dialogContainer() {
|
|
4432
|
-
return
|
|
4020
|
+
return _scopeClassNames("dialog-container");
|
|
4433
4021
|
}
|
|
4434
4022
|
function dialogCardRoot() {
|
|
4435
|
-
return
|
|
4023
|
+
return _scopeClassNames("dialog-card-root");
|
|
4436
4024
|
}
|
|
4437
4025
|
function dialogLayout() {
|
|
4438
|
-
return
|
|
4026
|
+
return _scopeClassNames("dialog-layout");
|
|
4439
4027
|
}
|
|
4440
4028
|
function dialogHeader() {
|
|
4441
|
-
return
|
|
4029
|
+
return _scopeClassNames("dialog-header");
|
|
4442
4030
|
}
|
|
4443
4031
|
function dialogContent() {
|
|
4444
|
-
return
|
|
4032
|
+
return _scopeClassNames("dialog-content");
|
|
4445
4033
|
}
|
|
4446
4034
|
function dialogFooter() {
|
|
4447
|
-
return
|
|
4035
|
+
return _scopeClassNames("dialog-footer");
|
|
4448
4036
|
}
|
|
4449
4037
|
function menu() {
|
|
4450
|
-
return
|
|
4038
|
+
return _scopeClassNames("menu");
|
|
4451
4039
|
}
|
|
4452
4040
|
function menuDivider() {
|
|
4453
|
-
return
|
|
4041
|
+
return _scopeClassNames("menu-divider");
|
|
4454
4042
|
}
|
|
4455
4043
|
function skeleton(props) {
|
|
4456
|
-
return
|
|
4044
|
+
return _composeClassNames(_scopeClassNames("skeleton"), radius(props));
|
|
4457
4045
|
}
|
|
4458
4046
|
function codeSkeleton(props) {
|
|
4459
|
-
return
|
|
4047
|
+
return _scopeClassNames("font-skeleton", _resp("code-skeleton", props.size));
|
|
4460
4048
|
}
|
|
4461
4049
|
function headingSkeleton(props) {
|
|
4462
|
-
return
|
|
4050
|
+
return _scopeClassNames("font-skeleton", _resp("heading-skeleton", props.size));
|
|
4463
4051
|
}
|
|
4464
4052
|
function labelSkeleton(props) {
|
|
4465
|
-
return
|
|
4053
|
+
return _scopeClassNames("font-skeleton", _resp("label-skeleton", props.size));
|
|
4466
4054
|
}
|
|
4467
4055
|
function textSkeleton(props) {
|
|
4468
|
-
return
|
|
4056
|
+
return _scopeClassNames("font-skeleton", _resp("text-skeleton", props.size));
|
|
4469
4057
|
}
|
|
4470
4058
|
function toastLayer() {
|
|
4471
|
-
return
|
|
4059
|
+
return _scopeClassNames("toast-layer");
|
|
4472
4060
|
}
|
|
4473
4061
|
function toast() {
|
|
4474
|
-
return
|
|
4062
|
+
return _scopeClassNames("toast");
|
|
4475
4063
|
}
|
|
4476
4064
|
function toastLoadingBar() {
|
|
4477
|
-
return
|
|
4065
|
+
return _scopeClassNames("toast-loading-bar");
|
|
4478
4066
|
}
|
|
4479
4067
|
function toastLoadingBarProgress() {
|
|
4480
|
-
return
|
|
4068
|
+
return _scopeClassNames("toast-loading-bar-progress");
|
|
4481
4069
|
}
|
|
4482
4070
|
function toastLoadingBarMask() {
|
|
4483
|
-
return
|
|
4071
|
+
return _scopeClassNames("toast-loading-bar-mask");
|
|
4484
4072
|
}
|
|
4485
4073
|
function treeItem() {
|
|
4486
|
-
return
|
|
4074
|
+
return _scopeClassNames("tree-item");
|
|
4487
4075
|
}
|
|
4076
|
+
const BREAKPOINTS = {
|
|
4077
|
+
0: 0,
|
|
4078
|
+
1: 360,
|
|
4079
|
+
2: 600,
|
|
4080
|
+
3: 900,
|
|
4081
|
+
4: 1200,
|
|
4082
|
+
5: 1800,
|
|
4083
|
+
6: 2400
|
|
4084
|
+
};
|
|
4488
4085
|
function _arrow() {
|
|
4489
|
-
return
|
|
4086
|
+
return _scopeClassNames("arrow");
|
|
4490
4087
|
}
|
|
4491
4088
|
function _arrowStroke() {
|
|
4492
|
-
return
|
|
4089
|
+
return _scopeClassNames("arrow-stroke");
|
|
4493
4090
|
}
|
|
4494
4091
|
function _arrowStrokeMask() {
|
|
4495
|
-
return
|
|
4092
|
+
return _scopeClassNames("arrow-stroke-mask");
|
|
4496
4093
|
}
|
|
4497
4094
|
function _arrowShape() {
|
|
4498
|
-
return
|
|
4095
|
+
return _scopeClassNames("arrow-shape");
|
|
4499
4096
|
}
|
|
4500
4097
|
function _input(props) {
|
|
4501
|
-
return
|
|
4098
|
+
return _composeClassNames(_scopeClassNames("input", props.border ? "input-b" : void 0, _resp("input", props.fontSize), _resp("input-p", props.padding), _resp("input-g", props.gap)), radius(props), width(props));
|
|
4502
4099
|
}
|
|
4503
4100
|
function _inputElement() {
|
|
4504
|
-
return
|
|
4101
|
+
return _scopeClassNames("input-element");
|
|
4505
4102
|
}
|
|
4506
4103
|
function _inputPresentation() {
|
|
4507
|
-
return
|
|
4104
|
+
return _scopeClassNames("input-presentation");
|
|
4508
4105
|
}
|
|
4509
4106
|
function _selectable(props) {
|
|
4510
|
-
return
|
|
4107
|
+
return _composeClassNames(_scopeClassNames("selectable", props.tone ?? "default"), radius(props));
|
|
4511
4108
|
}
|
|
4512
4109
|
function avatar(props) {
|
|
4513
|
-
return
|
|
4110
|
+
return _scopeClassNames("avatar", props.color || "gray", _resp("avatar", props.size));
|
|
4514
4111
|
}
|
|
4515
4112
|
function avatarArrow() {
|
|
4516
|
-
return
|
|
4113
|
+
return _scopeClassNames("avatar-arrow");
|
|
4517
4114
|
}
|
|
4518
4115
|
function avatarInitials() {
|
|
4519
|
-
return
|
|
4116
|
+
return _scopeClassNames("avatar-initials");
|
|
4520
4117
|
}
|
|
4521
4118
|
function avatarImage() {
|
|
4522
|
-
return
|
|
4119
|
+
return _scopeClassNames("avatar-image");
|
|
4523
4120
|
}
|
|
4524
4121
|
function avatarCounter(props) {
|
|
4525
|
-
return
|
|
4122
|
+
return _scopeClassNames("avatar-counter", _resp("avatar", props.size));
|
|
4526
4123
|
}
|
|
4527
4124
|
function avatarStack(props) {
|
|
4528
|
-
return
|
|
4125
|
+
return _scopeClassNames("avatar-stack", _resp("avatar", props.size));
|
|
4529
4126
|
}
|
|
4530
4127
|
function badge(props) {
|
|
4531
|
-
return
|
|
4128
|
+
return _composeClassNames(_scopeClassNames("badge", props.tone && `badge-${props.tone}`), radius(props));
|
|
4532
4129
|
}
|
|
4533
4130
|
function box(props) {
|
|
4534
|
-
return
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
// todo: consider this naming
|
|
4538
|
-
_resp("box", props.sizing),
|
|
4539
|
-
border(props),
|
|
4540
|
-
display(props),
|
|
4541
|
-
height(props),
|
|
4542
|
-
flex(props),
|
|
4543
|
-
flexItem(props),
|
|
4544
|
-
grid(props),
|
|
4545
|
-
gridItem(props),
|
|
4546
|
-
gap(props),
|
|
4547
|
-
inset(props),
|
|
4548
|
-
margin(props),
|
|
4549
|
-
maxWidth(props),
|
|
4550
|
-
minWidth(props),
|
|
4551
|
-
props.outline && `outline-${props.outline}`,
|
|
4552
|
-
overflow(props),
|
|
4553
|
-
padding(props),
|
|
4554
|
-
pointerEvents(props),
|
|
4555
|
-
position(props),
|
|
4556
|
-
radius(props),
|
|
4557
|
-
textAlign(props),
|
|
4558
|
-
width(props)
|
|
4559
|
-
);
|
|
4131
|
+
return _composeClassNames(_scopeClassNames("box", props.muted && "muted", props.outline && `outline-${props.outline}`), border(props), boxSizing({
|
|
4132
|
+
boxSizing: props.sizing
|
|
4133
|
+
}), display(props), height(props), flex(props), flexItem(props), grid(props), gridItem(props), gap(props), inset(props), margin(props), maxWidth(props), minWidth(props), overflow(props), padding(props), pointerEvents(props), position(props), radius(props), textAlign(props), width(props));
|
|
4560
4134
|
}
|
|
4561
4135
|
function button(props) {
|
|
4562
|
-
return
|
|
4136
|
+
return _composeClassNames(_scopeClassNames("button"), display(props), flexItem(props), radius(props), width(props));
|
|
4563
4137
|
}
|
|
4564
4138
|
function buttonLoadingBox() {
|
|
4565
|
-
return "button-loading-box";
|
|
4139
|
+
return _scopeClassNames("button-loading-box");
|
|
4566
4140
|
}
|
|
4567
4141
|
function card(props) {
|
|
4568
|
-
return
|
|
4142
|
+
return _composeClassNames(_scopeClassNames(props.scheme, props.tone, "card", props.checkered && "card-checkered"), shadow(props));
|
|
4569
4143
|
}
|
|
4570
4144
|
function checkbox() {
|
|
4571
|
-
return
|
|
4145
|
+
return _scopeClassNames("checkbox");
|
|
4572
4146
|
}
|
|
4573
4147
|
function checkboxInput() {
|
|
4574
|
-
return
|
|
4148
|
+
return _scopeClassNames("checkbox-input");
|
|
4575
4149
|
}
|
|
4576
4150
|
function code(props) {
|
|
4577
|
-
return
|
|
4151
|
+
return _composeClassNames(_scopeClassNames("code", "block", _resp("code", props.size)), font(props));
|
|
4578
4152
|
}
|
|
4579
4153
|
function container(props) {
|
|
4580
|
-
return
|
|
4154
|
+
return _composeClassNames(_scopeClassNames("container"), maxWidth({
|
|
4581
4155
|
maxWidth: props.width
|
|
4582
4156
|
}));
|
|
4583
4157
|
}
|
|
4584
4158
|
function heading(props) {
|
|
4585
|
-
return
|
|
4159
|
+
return _composeClassNames(_scopeClassNames("block", "heading", props.muted && "heading-muted", _resp("heading", props.size)), font(props), flexItem(props), textAlign({
|
|
4586
4160
|
textAlign: props.align
|
|
4587
4161
|
}));
|
|
4588
4162
|
}
|
|
4589
4163
|
function kbd(props) {
|
|
4590
|
-
return
|
|
4164
|
+
return _composeClassNames(_scopeClassNames("kbd"), radius(props));
|
|
4591
4165
|
}
|
|
4592
4166
|
function label(props) {
|
|
4593
|
-
return
|
|
4167
|
+
return _composeClassNames(_scopeClassNames("label", "block", props.muted && "label-muted", _resp("label", props.size)), font(props), textAlign({
|
|
4594
4168
|
textAlign: props.align
|
|
4595
4169
|
}));
|
|
4596
4170
|
}
|
|
4597
4171
|
function popover() {
|
|
4598
|
-
return
|
|
4172
|
+
return _scopeClassNames("popover");
|
|
4599
4173
|
}
|
|
4600
4174
|
function popoverCard() {
|
|
4601
|
-
return
|
|
4175
|
+
return _scopeClassNames("popover-card");
|
|
4602
4176
|
}
|
|
4603
4177
|
function radio() {
|
|
4604
|
-
return
|
|
4178
|
+
return _scopeClassNames("radio");
|
|
4605
4179
|
}
|
|
4606
4180
|
function select(props) {
|
|
4607
|
-
return
|
|
4181
|
+
return _composeClassNames(_scopeClassNames("select"), _input(props));
|
|
4608
4182
|
}
|
|
4609
4183
|
function selectPresentation() {
|
|
4610
|
-
return
|
|
4184
|
+
return _composeClassNames(_scopeClassNames("select-presentation"), _inputPresentation());
|
|
4611
4185
|
}
|
|
4612
4186
|
function spinner() {
|
|
4613
|
-
return
|
|
4187
|
+
return _scopeClassNames("spinner");
|
|
4614
4188
|
}
|
|
4615
4189
|
function animatedSpinnerIcon() {
|
|
4616
|
-
return
|
|
4190
|
+
return _scopeClassNames("animated-spinner-icon");
|
|
4617
4191
|
}
|
|
4618
4192
|
function stack() {
|
|
4619
|
-
return
|
|
4193
|
+
return _scopeClassNames("stack");
|
|
4620
4194
|
}
|
|
4621
4195
|
function _switch() {
|
|
4622
|
-
return
|
|
4196
|
+
return _scopeClassNames("switch");
|
|
4623
4197
|
}
|
|
4624
4198
|
function _switchElement() {
|
|
4625
|
-
return
|
|
4199
|
+
return _scopeClassNames("switch-element");
|
|
4626
4200
|
}
|
|
4627
4201
|
function _switchPresentation() {
|
|
4628
|
-
return
|
|
4202
|
+
return _scopeClassNames("switch-presentation");
|
|
4629
4203
|
}
|
|
4630
4204
|
function _switchThumb() {
|
|
4631
|
-
return
|
|
4205
|
+
return _scopeClassNames("switch-thumb");
|
|
4632
4206
|
}
|
|
4633
4207
|
function _switchTrack() {
|
|
4634
|
-
return
|
|
4208
|
+
return _scopeClassNames("switch-track");
|
|
4635
4209
|
}
|
|
4636
4210
|
function text(props) {
|
|
4637
|
-
return
|
|
4211
|
+
return _composeClassNames(_scopeClassNames("text", "block", props.muted && "text-muted", _resp("text", props.size)), flexItem(props), font(props), textAlign({
|
|
4638
4212
|
textAlign: props.align
|
|
4639
4213
|
}));
|
|
4640
4214
|
}
|
|
4641
4215
|
function textArea(props) {
|
|
4642
|
-
return
|
|
4216
|
+
return _composeClassNames(_scopeClassNames("text-area"), _input(props));
|
|
4643
4217
|
}
|
|
4644
4218
|
function textInput(props) {
|
|
4645
|
-
return
|
|
4219
|
+
return _composeClassNames(_scopeClassNames("text-input"), _input(props));
|
|
4646
4220
|
}
|
|
4647
4221
|
function tooltip() {
|
|
4648
|
-
return
|
|
4222
|
+
return _scopeClassNames("tooltip");
|
|
4649
4223
|
}
|
|
4650
4224
|
function tooltipCard() {
|
|
4651
|
-
return
|
|
4225
|
+
return _scopeClassNames("tooltip-card");
|
|
4652
4226
|
}
|
|
4653
4227
|
function srOnly() {
|
|
4654
|
-
return
|
|
4228
|
+
return _scopeClassNames(_composeClassNames("sr-only"));
|
|
4655
4229
|
}
|
|
4656
4230
|
exports.BREAKPOINTS = BREAKPOINTS;
|
|
4657
|
-
exports.PREFIX = PREFIX;
|
|
4658
4231
|
exports._arrow = _arrow;
|
|
4659
4232
|
exports._arrowShape = _arrowShape;
|
|
4660
4233
|
exports._arrowStroke = _arrowStroke;
|
|
4661
4234
|
exports._arrowStrokeMask = _arrowStrokeMask;
|
|
4662
|
-
exports._compilePalette = _compilePalette;
|
|
4663
4235
|
exports._compileSystem = _compileSystem;
|
|
4664
4236
|
exports._compileTheme = _compileTheme;
|
|
4665
|
-
exports.
|
|
4237
|
+
exports._composeClassNames = _composeClassNames;
|
|
4666
4238
|
exports._input = _input;
|
|
4667
4239
|
exports._inputElement = _inputElement;
|
|
4668
4240
|
exports._inputPresentation = _inputPresentation;
|
|
4241
|
+
exports._scopeClassName = _scopeClassName;
|
|
4669
4242
|
exports._selectable = _selectable;
|
|
4670
4243
|
exports._switch = _switch;
|
|
4671
4244
|
exports._switchElement = _switchElement;
|
|
@@ -4682,6 +4255,7 @@ exports.avatarStack = avatarStack;
|
|
|
4682
4255
|
exports.badge = badge;
|
|
4683
4256
|
exports.border = border;
|
|
4684
4257
|
exports.box = box;
|
|
4258
|
+
exports.boxSizing = boxSizing;
|
|
4685
4259
|
exports.breadcrumbs = breadcrumbs;
|
|
4686
4260
|
exports.button = button;
|
|
4687
4261
|
exports.buttonLoadingBox = buttonLoadingBox;
|
|
@@ -4690,7 +4264,6 @@ exports.checkbox = checkbox;
|
|
|
4690
4264
|
exports.checkboxInput = checkboxInput;
|
|
4691
4265
|
exports.code = code;
|
|
4692
4266
|
exports.codeSkeleton = codeSkeleton;
|
|
4693
|
-
exports.composeClassNames = composeClassNames;
|
|
4694
4267
|
exports.container = container;
|
|
4695
4268
|
exports.dialog = dialog;
|
|
4696
4269
|
exports.dialogCardRoot = dialogCardRoot;
|
|
@@ -4726,11 +4299,11 @@ exports.pointerEvents = pointerEvents;
|
|
|
4726
4299
|
exports.popover = popover;
|
|
4727
4300
|
exports.popoverCard = popoverCard;
|
|
4728
4301
|
exports.position = position;
|
|
4729
|
-
exports.
|
|
4302
|
+
exports.properties = properties;
|
|
4303
|
+
exports.px = px$1;
|
|
4730
4304
|
exports.radio = radio;
|
|
4731
4305
|
exports.radius = radius;
|
|
4732
|
-
exports.rem = rem;
|
|
4733
|
-
exports.scopeClassName = scopeClassName;
|
|
4306
|
+
exports.rem = rem$1;
|
|
4734
4307
|
exports.select = select;
|
|
4735
4308
|
exports.selectPresentation = selectPresentation;
|
|
4736
4309
|
exports.shadow = shadow;
|
|
@@ -4744,7 +4317,7 @@ exports.textArea = textArea;
|
|
|
4744
4317
|
exports.textInput = textInput;
|
|
4745
4318
|
exports.textOverflow = textOverflow;
|
|
4746
4319
|
exports.textSkeleton = textSkeleton;
|
|
4747
|
-
exports.toBoxShadow = toBoxShadow;
|
|
4320
|
+
exports.toBoxShadow = toBoxShadow$1;
|
|
4748
4321
|
exports.toast = toast;
|
|
4749
4322
|
exports.toastLayer = toastLayer;
|
|
4750
4323
|
exports.toastLoadingBar = toastLoadingBar;
|