@sanity/ui 3.0.0-static.0 → 3.0.0-static.10
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/LICENSE +1 -1
- package/bin/ui.js +0 -1
- package/dist/_chunks-cjs/_visual-editing.js +3138 -0
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -0
- package/dist/_chunks-cjs/buildCommand.js +17 -2821
- package/dist/_chunks-cjs/buildCommand.js.map +1 -1
- package/dist/_chunks-cjs/refractor.js +27 -0
- package/dist/_chunks-cjs/refractor.js.map +1 -0
- package/dist/_chunks-es/_visual-editing.mjs +3145 -0
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -0
- package/dist/_chunks-es/refractor.mjs +26 -0
- package/dist/_chunks-es/refractor.mjs.map +1 -0
- package/dist/_visual-editing.d.mts +811 -0
- package/dist/_visual-editing.d.ts +811 -0
- package/dist/_visual-editing.js +31 -0
- package/dist/_visual-editing.js.map +1 -0
- package/dist/_visual-editing.mjs +31 -0
- package/dist/_visual-editing.mjs.map +1 -0
- package/dist/cli.js +340 -6
- package/dist/cli.js.map +1 -1
- package/dist/css.d.mts +970 -440
- package/dist/css.d.ts +970 -440
- package/dist/css.js +4257 -2514
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +4259 -2515
- package/dist/css.mjs.map +1 -1
- package/dist/index.d.mts +499 -561
- package/dist/index.d.ts +499 -561
- package/dist/index.js +1160 -5463
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1089 -5401
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-palette.css +1 -0
- package/dist/sanity-theme.css +1 -25
- package/dist/system.css +23226 -2941
- package/dist/theme.d.mts +399 -112
- package/dist/theme.d.ts +399 -112
- package/dist/theme.js +2174 -2060
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +2207 -2095
- package/dist/theme.mjs.map +1 -1
- package/exports/_visual-editing.ts +31 -0
- package/exports/index.ts +1 -1
- package/package.json +96 -85
- package/src/cli/buildCommand.ts +48 -0
- package/src/cli/index.ts +38 -0
- package/src/css/_comp.test.ts +7 -0
- package/src/css/_comp.ts +11 -0
- package/src/css/_mergeStyles.ts +31 -0
- package/src/css/_resp.ts +16 -6
- package/src/css/_responsiveRule.ts +38 -0
- package/src/css/aspects/border/border.style.ts +13 -0
- package/src/css/aspects/border/border.ts +14 -0
- package/src/css/aspects/display/display.style.ts +34 -0
- package/src/css/aspects/display/display.ts +7 -0
- package/src/css/aspects/display/index.ts +2 -0
- package/src/css/aspects/display/types.ts +17 -0
- package/src/css/aspects/flex/flex.style.ts +30 -0
- package/src/css/aspects/flex/flex.ts +13 -0
- package/src/css/aspects/flex/flexAlign.style.ts +12 -0
- package/src/css/aspects/flex/flexDirection.style.ts +11 -0
- package/src/css/aspects/flex/flexJustify.style.ts +13 -0
- package/src/css/aspects/flex/flexWrap.style.ts +10 -0
- package/src/css/aspects/flexItem/flex.style.ts +22 -0
- package/src/css/aspects/flexItem/flexItem.ts +8 -0
- package/src/css/aspects/flexItem/types.ts +27 -0
- package/src/css/aspects/font/font.style.ts +151 -0
- package/src/css/aspects/font/font.ts +12 -0
- package/src/css/aspects/font/types.ts +12 -0
- package/src/css/aspects/gap/gap.style.ts +21 -0
- package/src/css/aspects/gap/gap.ts +8 -0
- package/src/css/aspects/gap/types.ts +10 -0
- package/src/css/aspects/grid/grid.ts +13 -0
- package/src/css/aspects/grid/gridAutoColumns.style.ts +11 -0
- package/src/css/aspects/grid/gridAutoFlow.style.ts +11 -0
- package/src/css/aspects/grid/gridAutoRows.style.ts +11 -0
- package/src/css/aspects/grid/gridColumns.style.ts +18 -0
- package/src/css/aspects/grid/gridRows.style.ts +18 -0
- package/src/css/aspects/grid/index.ts +2 -0
- package/src/css/aspects/grid/types.ts +29 -0
- package/src/css/aspects/gridItem/gridColumn.style.ts +20 -0
- package/src/css/aspects/gridItem/gridColumnEnd.style.ts +20 -0
- package/src/css/aspects/gridItem/gridColumnStart.style.ts +20 -0
- package/src/css/aspects/gridItem/gridItem.ts +15 -0
- package/src/css/aspects/gridItem/gridRow.style.ts +20 -0
- package/src/css/aspects/gridItem/gridRowEnd.style.ts +20 -0
- package/src/css/aspects/gridItem/gridRowStart.style.ts +20 -0
- package/src/css/aspects/height/height.style.ts +9 -0
- package/src/css/aspects/height/height.ts +17 -0
- package/src/css/aspects/height/index.ts +1 -0
- package/src/css/aspects/index.ts +21 -0
- package/src/css/aspects/inset/index.ts +2 -0
- package/src/css/aspects/inset/inset.style.ts +12 -0
- package/src/css/aspects/inset/inset.ts +13 -0
- package/src/css/aspects/inset/types.ts +13 -0
- package/src/css/aspects/margin/margin.style.ts +46 -0
- package/src/css/aspects/margin/margin.ts +15 -0
- package/src/css/aspects/maxWidth/maxWidth.style.ts +16 -0
- package/src/css/aspects/maxWidth/types.ts +7 -0
- package/src/css/aspects/minWidth/index.ts +2 -0
- package/src/css/aspects/minWidth/minWidth.style.ts +13 -0
- package/src/css/aspects/minWidth/minWidth.ts +6 -0
- package/src/css/aspects/minWidth/types.ts +7 -0
- package/src/css/aspects/outline/outline.style.ts +9 -0
- package/src/css/aspects/overflow/index.ts +2 -0
- package/src/css/aspects/overflow/overflow.style.ts +11 -0
- package/src/css/aspects/overflow/overflow.ts +11 -0
- package/src/css/aspects/overflow/types.ts +11 -0
- package/src/css/aspects/padding/padding.style.ts +46 -0
- package/src/css/aspects/padding/padding.ts +15 -0
- package/src/css/aspects/padding/types.ts +14 -0
- package/src/css/aspects/pointerEvents/pointerEvents.style.ts +13 -0
- package/src/css/aspects/pointerEvents/pointerEvents.ts +6 -0
- package/src/css/aspects/position/position.style.ts +12 -0
- package/src/css/aspects/position/position.ts +7 -0
- package/src/css/aspects/position/types.ts +9 -0
- package/src/css/aspects/radius/radius.style.ts +16 -0
- package/src/css/aspects/radius/radius.ts +8 -0
- package/src/css/aspects/radius/types.ts +8 -0
- package/src/css/aspects/shadow/index.ts +2 -0
- package/src/css/aspects/shadow/shadow.style.ts +49 -0
- package/src/css/aspects/shadow/shadow.ts +7 -0
- package/src/css/aspects/shadow/types.ts +8 -0
- package/src/css/aspects/textOverflow/index.ts +2 -0
- package/src/css/aspects/textOverflow/textOverflow.style.ts +21 -0
- package/src/css/aspects/textOverflow/textOverflow.ts +6 -0
- package/src/css/aspects/textOverflow/types.ts +8 -0
- package/src/css/aspects/width/index.ts +2 -0
- package/src/css/aspects/width/rules.ts +8 -0
- package/src/css/aspects/width/types.ts +9 -0
- package/src/css/aspects/width/width.style.ts +11 -0
- package/src/css/compile/compilePalette.ts +27 -0
- package/src/css/compile/compileRule.ts +50 -11
- package/src/css/compile/compileRules.test.ts +36 -0
- package/src/css/compile/compileRules.ts +43 -0
- package/src/css/compile/compileStyle.ts +148 -0
- package/src/css/compile/compileSystem.ts +6 -3
- package/src/css/compile/compileTheme.ts +8 -502
- package/src/css/compile/compileTheme_v3.ts +401 -0
- package/src/css/compile/types.ts +6 -0
- package/src/css/components/breadcrumbs/breadcrumbs.style.ts +9 -0
- package/src/css/components/breadcrumbs/breadcrumbs.ts +3 -3
- package/src/css/components/breadcrumbs/rules.ts +18 -0
- package/src/css/components/dialog/dialog.style.ts +79 -0
- package/src/css/components/dialog/dialog.ts +30 -0
- package/src/css/components/dialog/index.ts +1 -1
- package/src/css/components/dialog/rules.ts +4 -1
- package/src/css/components/menu/index.ts +1 -0
- package/src/css/components/menu/menu.style.ts +17 -0
- package/src/css/components/menu/menu.ts +9 -0
- package/src/css/components/menu/rules.ts +15 -0
- package/src/css/components/skeleton/index.ts +2 -0
- package/src/css/components/skeleton/rules.ts +113 -0
- package/src/css/components/skeleton/skeleton.style.ts +96 -0
- package/src/css/components/skeleton/skeleton.ts +31 -0
- package/src/css/components/skeleton/types.ts +26 -0
- package/src/css/components/toast/index.ts +1 -0
- package/src/css/components/toast/rules.ts +18 -0
- package/src/css/components/toast/toast.style.ts +20 -0
- package/src/css/components/toast/toast.ts +21 -0
- package/src/css/components/tree/rules.ts +118 -2
- package/src/css/components/tree/tree.style.ts +55 -0
- package/src/css/components/tree/tree.ts +3 -3
- package/src/css/composeClassNames.ts +16 -2
- package/src/css/constants.ts +1 -0
- package/src/css/index.ts +15 -21
- package/src/css/primitives/_arrow/_arrow.style.ts +73 -0
- package/src/css/primitives/_arrow/_arrow.ts +14 -0
- package/src/css/primitives/_arrow/index.ts +1 -0
- package/src/css/primitives/_input/__workshop__/customInput.tsx +16 -0
- package/src/css/primitives/_input/__workshop__/index.ts +14 -0
- package/src/css/primitives/_input/_input.style.ts +162 -0
- package/src/css/primitives/_input/index.ts +2 -0
- package/src/css/primitives/_input/input.ts +25 -0
- package/src/css/primitives/_input/types.ts +12 -0
- package/src/css/primitives/_selectable/__style.ts +117 -0
- package/src/css/primitives/_selectable/_contants.ts +11 -0
- package/src/css/primitives/_selectable/_selectable.style.ts +132 -0
- package/src/css/primitives/_selectable/selectable.ts +9 -0
- package/src/css/primitives/_selectable/types.ts +8 -0
- package/src/css/primitives/avatar/avatar.style.ts +175 -0
- package/src/css/primitives/avatar/avatar.ts +13 -18
- package/src/css/primitives/avatar/rules.ts +85 -99
- package/src/css/primitives/avatar/types.ts +1 -2
- package/src/css/primitives/badge/badge.style.ts +22 -0
- package/src/css/primitives/badge/badge.ts +4 -4
- package/src/css/primitives/badge/types.ts +2 -2
- package/src/css/primitives/box/box.style.ts +31 -0
- package/src/css/primitives/box/box.ts +34 -16
- package/src/css/primitives/box/types.ts +31 -29
- package/src/css/primitives/button/_constants.ts +17 -0
- package/src/css/primitives/button/button.style.ts +201 -0
- package/src/css/primitives/button/button.ts +29 -14
- package/src/css/primitives/button/rules.ts +284 -40
- package/src/css/primitives/card/_constants.ts +13 -0
- package/src/css/primitives/card/card.style.ts +270 -0
- package/src/css/primitives/card/card.ts +9 -16
- package/src/css/primitives/card/index.ts +1 -0
- package/src/css/primitives/card/types.ts +10 -0
- package/src/css/primitives/checkbox/__styles.ts +115 -113
- package/src/css/primitives/checkbox/checkbox.style.ts +154 -0
- package/src/css/primitives/checkbox/checkbox.ts +5 -5
- package/src/css/primitives/checkbox/rules.ts +31 -15
- package/src/css/primitives/code/code.style.ts +62 -0
- package/src/css/primitives/code/code.ts +4 -4
- package/src/css/primitives/code/rules.ts +27 -2
- package/src/css/primitives/code/types.ts +1 -1
- package/src/css/primitives/container/container.style.ts +10 -0
- package/src/css/primitives/container/container.ts +4 -4
- package/src/css/primitives/container/types.ts +1 -0
- package/src/css/primitives/heading/heading.style.ts +47 -0
- package/src/css/primitives/heading/heading.ts +6 -5
- package/src/css/primitives/heading/rules.ts +77 -6
- package/src/css/primitives/heading/types.ts +2 -2
- package/src/css/primitives/kbd/kbd.style.ts +22 -0
- package/src/css/primitives/kbd/kbd.ts +4 -4
- package/src/css/primitives/kbd/rules.ts +5 -5
- package/src/css/primitives/kbd/types.ts +3 -1
- package/src/css/primitives/label/label.style.ts +48 -0
- package/src/css/primitives/label/label.ts +4 -4
- package/src/css/primitives/label/rules.ts +54 -2
- package/src/css/primitives/label/types.ts +1 -1
- package/src/css/primitives/popover/popover.style.ts +5 -0
- package/src/css/primitives/popover/popover.ts +7 -3
- package/src/css/primitives/radio/radio.style.ts +123 -0
- package/src/css/primitives/radio/radio.ts +3 -3
- package/src/css/primitives/radio/rules.ts +117 -1
- package/src/css/primitives/select/index.ts +1 -0
- package/src/css/primitives/select/rules.ts +18 -1
- package/src/css/primitives/select/select.style.ts +24 -0
- package/src/css/primitives/select/select.ts +9 -2
- package/src/css/primitives/select/types.ts +5 -0
- package/src/css/primitives/spinner/rules.ts +6 -7
- package/src/css/primitives/spinner/spinner.style.ts +22 -0
- package/src/css/primitives/spinner/spinner.ts +7 -3
- package/src/css/primitives/stack/stack.style.ts +9 -0
- package/src/css/primitives/stack/stack.ts +6 -0
- package/src/css/primitives/switch/rules.ts +264 -56
- package/src/css/primitives/switch/switch.style.ts +94 -0
- package/src/css/primitives/switch/switch.ts +19 -3
- package/src/css/primitives/text/rules.ts +93 -4
- package/src/css/primitives/text/text.style.ts +64 -0
- package/src/css/primitives/text/text.ts +5 -4
- package/src/css/primitives/text/types.ts +2 -2
- package/src/css/primitives/textArea/index.ts +1 -0
- package/src/css/primitives/textArea/rules.ts +3 -1
- package/src/css/primitives/textArea/textArea.style.ts +9 -0
- package/src/css/primitives/textArea/textArea.ts +5 -2
- package/src/css/primitives/textArea/types.ts +5 -0
- package/src/css/primitives/textInput/index.ts +1 -0
- package/src/css/primitives/textInput/rules.ts +94 -96
- package/src/css/primitives/textInput/textInput.style.ts +167 -0
- package/src/css/primitives/textInput/textInput.ts +5 -4
- package/src/css/primitives/textInput/types.ts +11 -0
- package/src/css/primitives/token/rules.ts +37 -37
- package/src/css/primitives/token/token.style.ts +49 -0
- package/src/css/primitives/tooltip/rules.ts +2 -0
- package/src/css/primitives/tooltip/tooltip.style.ts +21 -0
- package/src/css/primitives/tooltip/tooltip.ts +5 -5
- package/src/css/scopeClassName.ts +6 -0
- package/src/css/system.style.ts +158 -0
- package/src/css/types.ts +630 -369
- package/src/css/util.ts +27 -0
- package/src/css/utils/srOnly/srOnly.style.ts +14 -0
- package/src/css/utils/srOnly/srOnly.ts +5 -0
- package/src/css/varNames.ts +395 -256
- package/src/css/vars.ts +422 -246
- package/src/theme/_constants.ts +26 -0
- package/src/theme/_types.ts +41 -0
- package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +1 -1
- package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +1 -1
- package/src/theme/build/_deprecated/color/button/createButtonModes.ts +1 -6
- package/src/theme/build/_deprecated/color/button/createButtonTones.ts +2 -2
- package/src/theme/build/_deprecated/color/card/createCardStates.ts +2 -2
- package/src/theme/build/_deprecated/color/factory.ts +8 -9
- package/src/theme/build/_deprecated/color/input/createInputModes.ts +1 -1
- package/src/theme/build/_deprecated/color/muted/createMuted.ts +2 -2
- package/src/theme/build/_deprecated/color/spot/createSpot.ts +1 -1
- package/src/theme/build/buildColorTheme.ts +62 -52
- package/src/theme/build/buildTheme.ts +8 -32
- package/src/theme/build/colorToken/colorToken.ts +1 -1
- package/src/theme/build/lib/color-fns/rgba.ts +4 -0
- package/src/theme/build/merge.ts +0 -2
- package/src/theme/build/mixThemeColor.ts +1 -1
- package/src/theme/build/renderColorTheme.ts +34 -37
- package/src/theme/build/renderColorValue.ts +4 -3
- package/src/theme/build/resolveColorTokens.ts +57 -120
- package/src/theme/config/helpers.ts +2 -2
- package/src/theme/config/system.ts +3 -2
- package/src/theme/config/tokens/color/types.ts +5 -18
- package/src/theme/config/tokens/parseTokenKey.ts +1 -1
- package/src/theme/config/tokens/parseTokenValue.ts +1 -1
- package/src/theme/config/tokens/types.ts +3 -2
- package/src/theme/config/types.ts +4 -4
- package/src/theme/defaults/colorTokens.ts +8 -6
- package/src/theme/defaults/config.ts +2 -2
- package/src/theme/defaults/fonts.ts +17 -16
- package/src/theme/getScopedTheme.ts +10 -4
- package/src/theme/index.ts +7 -1
- package/src/theme/palette/constants.ts +13 -0
- package/src/theme/palette/index.ts +2 -0
- package/src/theme/palette/types.ts +4 -0
- package/src/theme/types.ts +32 -0
- package/src/theme/v0/color/_generic.ts +35 -0
- package/src/theme/v0/color/_system.ts +17 -0
- package/src/theme/v0/color/color.ts +40 -0
- package/src/theme/v0/color/index.ts +11 -0
- package/src/theme/v0/color/input.ts +34 -0
- package/src/theme/v0/color/spot.ts +13 -0
- package/src/theme/v0/css.ts +8 -0
- package/src/theme/v0/font.ts +53 -0
- package/src/theme/v0/index.ts +10 -0
- package/src/theme/v0/theme.ts +72 -0
- package/src/theme/v2/avatar.ts +14 -0
- package/src/theme/v2/color/_constants.ts +45 -0
- package/src/theme/v2/color/_helpers.ts +24 -0
- package/src/theme/v2/color/_system.ts +40 -0
- package/src/theme/v2/color/badge.ts +16 -0
- package/src/theme/v2/color/color.ts +34 -0
- package/src/theme/v2/index.ts +4 -0
- package/src/theme/v2/input.ts +33 -0
- package/src/theme/v2/theme.ts +49 -0
- package/src/theme/v3/buildTheme_v3.test.ts +40 -0
- package/src/theme/v3/buildTheme_v3.ts +29 -0
- package/src/theme/v3/color/buildColor_v3.ts +198 -0
- package/src/theme/v3/color/card.ts +121 -0
- package/src/theme/v3/color/color.ts +98 -0
- package/src/theme/v3/color/element.ts +19 -0
- package/src/theme/v3/color/index.ts +7 -0
- package/src/theme/v3/color/parseColor.test.ts +79 -0
- package/src/theme/v3/color/parseColor.ts +167 -0
- package/src/theme/v3/color/renderColor.test.ts +19 -0
- package/src/theme/v3/color/renderColor.ts +33 -0
- package/src/theme/v3/color/token.ts +17 -0
- package/src/theme/v3/color/tokens.ts +5 -0
- package/src/theme/v3/defaults.ts +202 -0
- package/src/theme/v3/index.ts +6 -0
- package/src/theme/v3/merge.ts +22 -0
- package/src/theme/v3/resolveTokens.ts +204 -0
- package/src/theme/v3/tokens.ts +16 -0
- package/src/theme/v3/types.ts +45 -0
- package/src/theme/versioning/getTheme_v2.ts +2 -1
- package/src/theme/versioning/index.ts +0 -4
- package/src/theme/versioning/is_v0.ts +2 -1
- package/src/theme/versioning/is_v2.ts +2 -1
- package/src/theme/versioning/themeColor_v0_v2.ts +33 -5
- package/src/theme/versioning/themeColor_v2_v2_9.ts +49 -0
- package/src/theme/versioning/themeColor_v3_v2.ts +206 -0
- package/src/theme/versioning/v0_v2.ts +6 -1
- package/src/theme/versioning/v2_v0.ts +6 -6
- package/src/theme/versioning/v3_v2.ts +108 -0
- package/src/ui/StyleTags.tsx +24 -0
- package/src/ui/_compat/index.ts +9 -0
- package/src/ui/_compat/styles/_responsive.ts +19 -0
- package/src/ui/_compat/styles/index.ts +1 -0
- package/src/ui/_compat/theme/index.ts +5 -0
- package/src/ui/_compat/theme/theme.test.tsx +73 -0
- package/src/ui/_compat/theme/themeColorProvider.tsx +30 -0
- package/src/ui/_compat/theme/themeContext.ts +10 -0
- package/src/ui/_compat/theme/themeProvider.tsx +74 -0
- package/src/ui/_compat/theme/useRootTheme.ts +17 -0
- package/src/ui/_compat/theme/useTheme.ts +16 -0
- package/src/ui/_compat/types.ts +274 -0
- package/src/ui/components/autocomplete/__mocks__/apiStore.ts +49 -0
- package/src/ui/components/autocomplete/__workshop__/async.tsx +156 -0
- package/src/ui/components/autocomplete/__workshop__/constrainedHeight.tsx +131 -0
- package/src/ui/components/autocomplete/__workshop__/custom.tsx +90 -0
- package/src/ui/components/autocomplete/__workshop__/example.tsx +80 -0
- package/src/ui/components/autocomplete/__workshop__/fullscreen.tsx +293 -0
- package/src/ui/components/autocomplete/autocomplete.tsx +722 -0
- package/src/ui/components/autocomplete/autocompleteOption.tsx +45 -0
- package/src/ui/components/autocomplete/types.ts +108 -0
- package/src/ui/components/breadcrumbs/__workshop__/example.tsx +62 -0
- package/src/ui/components/breadcrumbs/breadcrumbs.tsx +127 -0
- package/src/ui/components/dialog/__workshop__/activate.tsx +134 -0
- package/src/ui/components/dialog/__workshop__/nested.tsx +72 -0
- package/src/ui/components/dialog/__workshop__/onScroll.tsx +39 -0
- package/src/ui/components/dialog/__workshop__/panes.tsx +82 -0
- package/src/ui/components/dialog/__workshop__/position.tsx +30 -0
- package/src/ui/components/dialog/__workshop__/props.tsx +77 -0
- package/src/ui/components/dialog/__workshop__/wrapped.tsx +76 -0
- package/src/ui/components/dialog/dialog.tsx +432 -0
- package/src/ui/components/dialog/dialogProvider.tsx +35 -0
- package/src/ui/components/dialog/useDialog.ts +11 -0
- package/src/ui/components/hotkeys/hotkeys.tsx +54 -0
- package/src/ui/components/menu/__workshop__/asComponent.tsx +45 -0
- package/src/ui/components/menu/__workshop__/avatarMenu.tsx +51 -0
- package/src/ui/components/menu/__workshop__/constrainedInBoundary.tsx +134 -0
- package/src/ui/components/menu/__workshop__/customSelectedState.tsx +39 -0
- package/src/ui/components/menu/__workshop__/menuButton.tsx +80 -0
- package/src/ui/components/menu/__workshop__/shouldFocus.tsx +47 -0
- package/src/ui/components/menu/__workshop__/tones.tsx +25 -0
- package/src/ui/components/menu/menu.test.tsx +128 -0
- package/src/ui/components/menu/menu.tsx +200 -0
- package/src/ui/components/menu/menuButton.tsx +275 -0
- package/src/ui/components/menu/menuContext.ts +31 -0
- package/src/ui/components/menu/menuDivider.tsx +22 -0
- package/src/ui/components/menu/menuGroup.tsx +228 -0
- package/src/ui/components/menu/menuItem.tsx +180 -0
- package/src/ui/components/menu/useMenu.ts +21 -0
- package/src/ui/components/menu/useMenuController.ts +241 -0
- package/src/ui/components/skeleton/__workshop__/delay.tsx +70 -0
- package/src/ui/components/skeleton/__workshop__/skeleton.tsx +64 -0
- package/src/ui/components/skeleton/skeleton.tsx +53 -0
- package/src/ui/components/skeleton/textSkeleton.tsx +132 -0
- package/src/ui/components/tab/tab.tsx +105 -0
- package/src/ui/components/tab/tabList.tsx +74 -0
- package/src/ui/components/tab/tabPanel.tsx +40 -0
- package/src/ui/components/toast/__workshop__/hook.tsx +71 -0
- package/src/ui/components/toast/__workshop__/toast.tsx +26 -0
- package/src/ui/components/toast/toast.test.tsx +101 -0
- package/src/ui/components/toast/toast.tsx +211 -0
- package/src/ui/components/toast/toastLayer.tsx +38 -0
- package/src/ui/components/toast/toastProvider.tsx +113 -0
- package/src/ui/components/toast/toastState.ts +6 -0
- package/src/ui/components/toast/types.ts +28 -0
- package/src/ui/components/toast/useToast.ts +25 -0
- package/src/ui/components/tree/__workshop__/basic.tsx +105 -0
- package/src/ui/components/tree/__workshop__/tabFromElement.tsx +84 -0
- package/src/ui/components/tree/tree.tsx +244 -0
- package/src/ui/components/tree/treeGroup.tsx +30 -0
- package/src/ui/components/tree/treeItem.tsx +220 -0
- package/src/ui/components/tree/useTree.ts +17 -0
- package/src/ui/constants.ts +85 -0
- package/src/ui/helpers/focus.ts +100 -0
- package/src/ui/helpers/index.ts +5 -0
- package/src/ui/helpers/props.ts +10 -0
- package/src/ui/hooks/useArrayProp.ts +29 -0
- package/src/ui/hooks/useClickOutside.test.tsx +482 -0
- package/src/ui/hooks/useClickOutside.ts +117 -0
- package/src/ui/hooks/useClickOutsideEvent.test.tsx +115 -0
- package/src/ui/hooks/useClickOutsideEvent.ts +73 -0
- package/src/ui/hooks/useDelayed.test.ts +68 -0
- package/src/ui/hooks/useDelayedState.ts +28 -0
- package/src/ui/hooks/useElementRect/__workshop__/example.tsx +32 -0
- package/src/ui/hooks/useElementSize.ts +19 -0
- package/src/ui/hooks/useForwardedRef.ts +19 -0
- package/src/ui/hooks/useGlobalKeyDown.ts +17 -0
- package/src/ui/hooks/useMatchMedia.ts +28 -0
- package/src/ui/hooks/useMediaIndex/useMediaIndex.test.tsx +36 -0
- package/src/ui/hooks/useMediaIndex/useMediaIndex.ts +102 -0
- package/src/ui/hooks/usePrefersDark.hydration.test.tsx +56 -0
- package/src/ui/hooks/usePrefersDark.test.tsx +19 -0
- package/src/ui/hooks/usePrefersDark.ts +16 -0
- package/src/ui/hooks/usePrefersReducedMotion.hydration.test.tsx +56 -0
- package/src/ui/hooks/usePrefersReducedMotion.test.tsx +19 -0
- package/src/ui/hooks/usePrefersReducedMotion.ts +16 -0
- package/src/ui/index.ts +9 -0
- package/src/ui/lib/createGlobalScopedContext.ts +34 -0
- package/src/ui/lib/globalScope.ts +19 -0
- package/src/ui/primitives/_selectable/selectable.tsx +31 -0
- package/src/ui/primitives/avatar/__workshop__/asButton.tsx +14 -0
- package/src/ui/primitives/avatar/__workshop__/stack.tsx +25 -0
- package/src/ui/primitives/avatar/__workshop__/withinButton.tsx +63 -0
- package/src/ui/primitives/avatar/__workshop__/withinMenuItem.tsx +72 -0
- package/src/ui/primitives/avatar/avatar.tsx +158 -0
- package/src/ui/primitives/avatar/avatarCounter.tsx +62 -0
- package/src/ui/primitives/avatar/avatarStack.tsx +82 -0
- package/src/ui/primitives/avatar/types.ts +17 -0
- package/src/ui/primitives/badge/__workshop__/props.tsx +30 -0
- package/src/ui/primitives/badge/__workshop__/tones.tsx +21 -0
- package/src/ui/primitives/badge/badge.test.tsx +16 -0
- package/src/ui/primitives/badge/badge.tsx +64 -0
- package/src/ui/primitives/box/__workshop__/props.tsx +20 -0
- package/src/ui/primitives/box/box.tsx +162 -0
- package/src/ui/primitives/button/__workshop__/custom.tsx +50 -0
- package/src/ui/primitives/button/__workshop__/disabled.tsx +74 -0
- package/src/ui/primitives/button/__workshop__/props.tsx +58 -0
- package/src/ui/primitives/button/__workshop__/sanityUploadButton.tsx +36 -0
- package/src/ui/primitives/button/__workshop__/stacked.tsx +59 -0
- package/src/ui/primitives/button/__workshop__/styled1.tsx +17 -0
- package/src/ui/primitives/button/__workshop__/styled2.tsx +19 -0
- package/src/ui/primitives/button/button.test.tsx +44 -0
- package/src/ui/primitives/button/button.tsx +207 -0
- package/src/ui/primitives/card/__workshop__/allTones.tsx +27 -0
- package/src/ui/primitives/card/__workshop__/asButton.tsx +107 -0
- package/src/ui/primitives/card/__workshop__/asComponent.tsx +27 -0
- package/src/ui/primitives/card/__workshop__/checkered.tsx +26 -0
- package/src/ui/primitives/card/__workshop__/interactive.tsx +30 -0
- package/src/ui/primitives/card/__workshop__/listNavigation.tsx +80 -0
- package/src/ui/primitives/card/__workshop__/props.tsx +55 -0
- package/src/ui/primitives/card/__workshop__/selected.tsx +93 -0
- package/src/ui/primitives/card/__workshop__/styled.tsx +14 -0
- package/src/ui/primitives/card/card.tsx +118 -0
- package/src/ui/primitives/card/cardContext.ts +10 -0
- package/src/ui/primitives/card/cardProvider.tsx +19 -0
- package/src/ui/primitives/card/index.ts +4 -0
- package/src/ui/primitives/card/types.ts +27 -0
- package/src/ui/primitives/card/useCard.ts +7 -0
- package/src/ui/primitives/checkbox/__workshop__/tones.tsx +28 -0
- package/src/ui/primitives/checkbox/checkbox.tsx +74 -0
- package/src/ui/primitives/code/__workshop__/props.tsx +21 -0
- package/src/ui/primitives/code/code.tsx +49 -0
- package/src/ui/primitives/code/refractor.tsx +20 -0
- package/src/ui/primitives/container/__workshop__/example.tsx +20 -0
- package/src/ui/primitives/container/container.tsx +35 -0
- package/src/ui/primitives/flex/__workshop__/example.tsx +34 -0
- package/src/ui/primitives/flex/__workshop__/gap.tsx +25 -0
- package/src/ui/primitives/flex/flex.tsx +29 -0
- package/src/ui/primitives/grid/__workshop__/responsive.tsx +54 -0
- package/src/ui/primitives/grid/grid.tsx +30 -0
- package/src/ui/primitives/heading/__workshop__/opticalAlignment.tsx +54 -0
- package/src/ui/primitives/heading/__workshop__/plain.tsx +32 -0
- package/src/ui/primitives/heading/heading.tsx +62 -0
- package/src/ui/primitives/inline/__workshop__/plain.tsx +27 -0
- package/src/ui/primitives/inline/inline.tsx +50 -0
- package/src/ui/primitives/kbd/kbd.tsx +55 -0
- package/src/ui/primitives/label/__workshop__/opticalAlignment.tsx +54 -0
- package/src/ui/primitives/label/__workshop__/plain.tsx +37 -0
- package/src/ui/primitives/label/label.tsx +67 -0
- package/src/ui/primitives/popover/__workshop__/AlignedStory.tsx +77 -0
- package/src/ui/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +32 -0
- package/src/ui/primitives/popover/__workshop__/OpenOnMountStory.tsx +11 -0
- package/src/ui/primitives/popover/__workshop__/PlainStory.tsx +71 -0
- package/src/ui/primitives/popover/__workshop__/SidePanelStory.tsx +93 -0
- package/src/ui/primitives/popover/__workshop__/TestStory.tsx +98 -0
- package/src/ui/primitives/popover/floating-ui/size.ts +83 -0
- package/src/ui/primitives/popover/helpers.ts +32 -0
- package/src/ui/primitives/popover/popover.tsx +422 -0
- package/src/ui/primitives/popover/popoverCard.tsx +161 -0
- package/src/ui/primitives/radio/__workshop__/plain.tsx +28 -0
- package/src/ui/primitives/radio/radio.tsx +49 -0
- package/src/ui/primitives/select/__workshop__/plain.tsx +30 -0
- package/src/ui/primitives/select/__workshop__/readOnly.tsx +23 -0
- package/src/ui/primitives/select/select.tsx +85 -0
- package/src/ui/primitives/spinner/__workshop__/Props.tsx +16 -0
- package/src/ui/primitives/spinner/animatedSpinnerIcon.tsx +16 -0
- package/src/ui/primitives/spinner/spinner.tsx +33 -0
- package/src/ui/primitives/stack/__workshop__/plain.tsx +32 -0
- package/src/ui/primitives/stack/index.ts +1 -0
- package/src/ui/primitives/stack/stack.tsx +45 -0
- package/src/ui/primitives/switch/switch.tsx +75 -0
- package/src/ui/primitives/text/__workshop__/colored.tsx +23 -0
- package/src/ui/primitives/text/__workshop__/example.tsx +39 -0
- package/src/ui/primitives/text/__workshop__/opticalAlignment.tsx +48 -0
- package/src/ui/primitives/text/text.tsx +64 -0
- package/src/ui/primitives/textArea/__workshop__/plain.tsx +50 -0
- package/src/ui/primitives/textArea/textArea.tsx +71 -0
- package/src/ui/primitives/textInput/__workshop__/index.ts +44 -0
- package/src/ui/primitives/textInput/__workshop__/plain.tsx +104 -0
- package/src/ui/primitives/textInput/__workshop__/readOnly.tsx +9 -0
- package/src/ui/primitives/textInput/__workshop__/tones.tsx +277 -0
- package/src/ui/primitives/textInput/__workshop__/typed.tsx +23 -0
- package/src/ui/primitives/textInput/textInput.tsx +286 -0
- package/src/ui/primitives/tooltip/__workshop__/customPortal.tsx +102 -0
- package/src/ui/primitives/tooltip/__workshop__/overflowingBoundary.tsx +74 -0
- package/src/ui/primitives/tooltip/__workshop__/props.tsx +111 -0
- package/src/ui/primitives/tooltip/__workshop__/resizableBoundary.tsx +86 -0
- package/src/ui/primitives/tooltip/tooltip.test.tsx +453 -0
- package/src/ui/primitives/tooltip/tooltip.tsx +466 -0
- package/src/ui/primitives/tooltip/tooltipCard.tsx +115 -0
- package/src/ui/primitives/tooltip/tooltipDelayGroup/index.ts +4 -0
- package/src/ui/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +55 -0
- package/src/ui/primitives/tooltip/tooltipDelayGroup/types.ts +10 -0
- package/src/ui/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +13 -0
- package/src/ui/primitives/types.ts +166 -0
- package/src/ui/types/box.ts +22 -0
- package/src/ui/types/button.ts +24 -0
- package/src/ui/types/flex.ts +27 -0
- package/src/ui/types/grid.ts +17 -0
- package/src/ui/types/gridItem.ts +32 -0
- package/src/ui/types/index.ts +15 -0
- package/src/ui/types/props.ts +18 -0
- package/src/ui/types/selectable.ts +7 -0
- package/src/ui/types/text.ts +7 -0
- package/src/ui/utils/arrow/arrow.tsx +59 -0
- package/src/ui/utils/boundaryElement/boundaryElement.test.tsx +100 -0
- package/src/ui/utils/boundaryElement/boundaryElementProvider.tsx +24 -0
- package/src/ui/utils/boundaryElement/index.ts +3 -0
- package/src/ui/utils/boundaryElement/useBoundaryElement.ts +26 -0
- package/src/ui/utils/conditionalWrapper/conditionalWrapper.tsx +23 -0
- package/src/ui/utils/elementQuery/__workshop__/customMedia.tsx +30 -0
- package/src/ui/utils/elementQuery/elementQuery.tsx +53 -0
- package/src/ui/utils/errorBoundary.tsx +48 -0
- package/src/ui/utils/getElementRef.ts +26 -0
- package/src/ui/utils/layer/__workshop__/multipleRoots.tsx +49 -0
- package/src/ui/utils/layer/__workshop__/nested.tsx +98 -0
- package/src/ui/utils/layer/__workshop__/responsiveZOffset.tsx +13 -0
- package/src/ui/utils/layer/index.ts +4 -0
- package/src/ui/utils/layer/layer.test.tsx +108 -0
- package/src/ui/utils/layer/layer.tsx +112 -0
- package/src/ui/utils/layer/layerProvider.tsx +110 -0
- package/src/ui/utils/layer/useLayer.ts +26 -0
- package/src/ui/utils/portal/portal.test.tsx +103 -0
- package/src/ui/utils/portal/portal.ts +46 -0
- package/src/ui/utils/portal/portalProvider.tsx +79 -0
- package/src/ui/utils/portal/usePortal.ts +25 -0
- package/src/ui/utils/spanWithTextOverflow.tsx +10 -0
- package/src/ui/utils/srOnly/index.ts +1 -0
- package/src/ui/utils/srOnly/srOnly.tsx +35 -0
- package/src/ui/utils/virtualList/virtualList.tsx +189 -0
- package/dist/_chunks-cjs/getTheme_v2.js +0 -316
- package/dist/_chunks-cjs/getTheme_v2.js.map +0 -1
- package/dist/_chunks-es/getTheme_v2.mjs +0 -317
- package/dist/_chunks-es/getTheme_v2.mjs.map +0 -1
- package/dist/_legacy/getTheme_v2.esm.js +0 -317
- package/dist/_legacy/getTheme_v2.esm.js.map +0 -1
- package/dist/css.esm.js +0 -3135
- package/dist/css.esm.js.map +0 -1
- package/dist/index.esm.js +0 -5843
- package/dist/index.esm.js.map +0 -1
- package/dist/theme.esm.js +0 -3088
- package/dist/theme.esm.js.map +0 -1
- package/src/core/__workshop__/constants.ts +0 -296
- package/src/core/__workshop__/fontsPlugin.tsx +0 -76
- package/src/core/_compat.ts +0 -264
- package/src/core/components/autocomplete/__mocks__/apiStore.ts +0 -49
- package/src/core/components/autocomplete/__workshop__/.eslintrc +0 -5
- package/src/core/components/autocomplete/__workshop__/async.tsx +0 -155
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -136
- package/src/core/components/autocomplete/__workshop__/custom.tsx +0 -88
- package/src/core/components/autocomplete/__workshop__/example.tsx +0 -78
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +0 -293
- package/src/core/components/autocomplete/autocomplete.styles.tsx +0 -38
- package/src/core/components/autocomplete/autocomplete.tsx +0 -735
- package/src/core/components/autocomplete/autocompleteOption.tsx +0 -44
- package/src/core/components/autocomplete/types.ts +0 -108
- package/src/core/components/breadcrumbs/__workshop__/.eslintrc +0 -5
- package/src/core/components/breadcrumbs/__workshop__/example.tsx +0 -55
- package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +0 -17
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +0 -111
- package/src/core/components/dialog/__workshop__/.eslintrc +0 -5
- package/src/core/components/dialog/__workshop__/activate.tsx +0 -133
- package/src/core/components/dialog/__workshop__/nested.tsx +0 -72
- package/src/core/components/dialog/__workshop__/onScroll.tsx +0 -39
- package/src/core/components/dialog/__workshop__/panes.tsx +0 -81
- package/src/core/components/dialog/__workshop__/position.tsx +0 -29
- package/src/core/components/dialog/__workshop__/props.tsx +0 -74
- package/src/core/components/dialog/__workshop__/wrapped.tsx +0 -78
- package/src/core/components/dialog/dialog.tsx +0 -414
- package/src/core/components/dialog/dialogProvider.tsx +0 -34
- package/src/core/components/dialog/useDialog.ts +0 -10
- package/src/core/components/hotkeys/__workshop__/.eslintrc +0 -5
- package/src/core/components/hotkeys/hotkeys.tsx +0 -50
- package/src/core/components/menu/__workshop__/.eslintrc +0 -5
- package/src/core/components/menu/__workshop__/asComponent.tsx +0 -44
- package/src/core/components/menu/__workshop__/avatarMenu.tsx +0 -50
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +0 -133
- package/src/core/components/menu/__workshop__/customSelectedState.tsx +0 -38
- package/src/core/components/menu/__workshop__/menuButton.tsx +0 -79
- package/src/core/components/menu/__workshop__/shouldFocus.tsx +0 -46
- package/src/core/components/menu/__workshop__/tones.tsx +0 -25
- package/src/core/components/menu/menu.test.tsx +0 -129
- package/src/core/components/menu/menu.tsx +0 -175
- package/src/core/components/menu/menuButton.tsx +0 -289
- package/src/core/components/menu/menuContext.ts +0 -29
- package/src/core/components/menu/menuDivider.ts +0 -13
- package/src/core/components/menu/menuGroup.tsx +0 -210
- package/src/core/components/menu/menuItem.tsx +0 -187
- package/src/core/components/menu/useMenu.ts +0 -20
- package/src/core/components/menu/useMenuController.ts +0 -230
- package/src/core/components/skeleton/__workshop__/.eslintrc +0 -5
- package/src/core/components/skeleton/__workshop__/delay.tsx +0 -69
- package/src/core/components/skeleton/__workshop__/skeleton.tsx +0 -63
- package/src/core/components/skeleton/skeleton.tsx +0 -58
- package/src/core/components/skeleton/styles.ts +0 -50
- package/src/core/components/skeleton/textSkeleton.tsx +0 -122
- package/src/core/components/tab/__workshop__/.eslintrc +0 -5
- package/src/core/components/tab/tab.tsx +0 -99
- package/src/core/components/tab/tabList.tsx +0 -78
- package/src/core/components/tab/tabPanel.tsx +0 -38
- package/src/core/components/toast/__workshop__/.eslintrc +0 -5
- package/src/core/components/toast/__workshop__/hook.tsx +0 -71
- package/src/core/components/toast/__workshop__/toast.tsx +0 -25
- package/src/core/components/toast/styles.ts +0 -61
- package/src/core/components/toast/toast.test.tsx +0 -102
- package/src/core/components/toast/toast.tsx +0 -109
- package/src/core/components/toast/toastProvider.tsx +0 -202
- package/src/core/components/toast/types.ts +0 -20
- package/src/core/components/toast/useToast.ts +0 -24
- package/src/core/components/tree/__workshop__/.eslintrc +0 -5
- package/src/core/components/tree/__workshop__/basic.tsx +0 -104
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +0 -83
- package/src/core/components/tree/style.ts +0 -104
- package/src/core/components/tree/tree.tsx +0 -242
- package/src/core/components/tree/treeGroup.tsx +0 -29
- package/src/core/components/tree/treeItem.tsx +0 -217
- package/src/core/components/tree/useTree.ts +0 -16
- package/src/core/constants.ts +0 -57
- package/src/core/helpers/focus.ts +0 -100
- package/src/core/helpers/index.ts +0 -4
- package/src/core/hooks/useArrayProp.ts +0 -25
- package/src/core/hooks/useClickOutside.test.tsx +0 -483
- package/src/core/hooks/useClickOutside.ts +0 -116
- package/src/core/hooks/useClickOutsideEvent.test.tsx +0 -116
- package/src/core/hooks/useClickOutsideEvent.ts +0 -72
- package/src/core/hooks/useDelayed.test.ts +0 -67
- package/src/core/hooks/useDelayedState.ts +0 -29
- package/src/core/hooks/useElementRect/__workshop__/.eslintrc +0 -5
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +0 -31
- package/src/core/hooks/useElementSize.ts +0 -18
- package/src/core/hooks/useForwardedRef.ts +0 -19
- package/src/core/hooks/useGlobalKeyDown.ts +0 -12
- package/src/core/hooks/useMatchMedia.ts +0 -46
- package/src/core/hooks/useMediaIndex/__workshop__/.eslintrc +0 -5
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -35
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +0 -101
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +0 -57
- package/src/core/hooks/usePrefersDark.test.tsx +0 -18
- package/src/core/hooks/usePrefersDark.ts +0 -16
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -57
- package/src/core/hooks/usePrefersReducedMotion.test.tsx +0 -18
- package/src/core/hooks/usePrefersReducedMotion.ts +0 -16
- package/src/core/index.ts +0 -11
- package/src/core/lib/createGlobalScopedContext.ts +0 -33
- package/src/core/lib/globalScope.ts +0 -20
- package/src/core/lib/styled/elements.ts +0 -135
- package/src/core/lib/styled/index.ts +0 -2
- package/src/core/lib/styled/members.ts +0 -15
- package/src/core/lib/styled/styled.ts +0 -79
- package/src/core/primitives/_selectable/selectable.tsx +0 -27
- package/src/core/primitives/avatar/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +0 -13
- package/src/core/primitives/avatar/__workshop__/stack.tsx +0 -24
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +0 -62
- package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -69
- package/src/core/primitives/avatar/avatar.tsx +0 -217
- package/src/core/primitives/avatar/avatarCounter.tsx +0 -93
- package/src/core/primitives/avatar/avatarStack.tsx +0 -100
- package/src/core/primitives/avatar/styles.ts +0 -166
- package/src/core/primitives/avatar/types.ts +0 -16
- package/src/core/primitives/badge/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/badge/__workshop__/props.tsx +0 -29
- package/src/core/primitives/badge/__workshop__/tones.tsx +0 -20
- package/src/core/primitives/badge/badge.test.tsx +0 -15
- package/src/core/primitives/badge/badge.tsx +0 -59
- package/src/core/primitives/badge/styles.ts +0 -19
- package/src/core/primitives/box/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/box/__workshop__/props.tsx +0 -19
- package/src/core/primitives/box/box.tsx +0 -118
- package/src/core/primitives/button/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/button/__workshop__/custom.tsx +0 -47
- package/src/core/primitives/button/__workshop__/disabled.tsx +0 -73
- package/src/core/primitives/button/__workshop__/props.tsx +0 -52
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +0 -36
- package/src/core/primitives/button/__workshop__/stacked.tsx +0 -57
- package/src/core/primitives/button/__workshop__/styled1.tsx +0 -17
- package/src/core/primitives/button/__workshop__/styled2.tsx +0 -19
- package/src/core/primitives/button/button.test.tsx +0 -43
- package/src/core/primitives/button/button.tsx +0 -181
- package/src/core/primitives/button/styles.ts +0 -116
- package/src/core/primitives/card/RootCardContext.ts +0 -3
- package/src/core/primitives/card/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/card/__workshop__/allTones.tsx +0 -27
- package/src/core/primitives/card/__workshop__/asButton.tsx +0 -88
- package/src/core/primitives/card/__workshop__/asComponent.tsx +0 -27
- package/src/core/primitives/card/__workshop__/checkered.tsx +0 -16
- package/src/core/primitives/card/__workshop__/interactive.tsx +0 -23
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +0 -77
- package/src/core/primitives/card/__workshop__/props.tsx +0 -49
- package/src/core/primitives/card/__workshop__/selected.tsx +0 -91
- package/src/core/primitives/card/__workshop__/styled.tsx +0 -14
- package/src/core/primitives/card/card.tsx +0 -113
- package/src/core/primitives/card/index.ts +0 -2
- package/src/core/primitives/card/styles.ts +0 -146
- package/src/core/primitives/card/types.ts +0 -11
- package/src/core/primitives/checkbox/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +0 -22
- package/src/core/primitives/checkbox/checkbox.tsx +0 -70
- package/src/core/primitives/code/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/code/__workshop__/props.tsx +0 -20
- package/src/core/primitives/code/code.tsx +0 -51
- package/src/core/primitives/code/styles.ts +0 -77
- package/src/core/primitives/container/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/container/__workshop__/example.tsx +0 -19
- package/src/core/primitives/container/container.tsx +0 -32
- package/src/core/primitives/container/styles.ts +0 -22
- package/src/core/primitives/flex/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/flex/__workshop__/example.tsx +0 -33
- package/src/core/primitives/flex/__workshop__/gap.tsx +0 -25
- package/src/core/primitives/flex/flex.tsx +0 -44
- package/src/core/primitives/grid/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/grid/__workshop__/responsive.tsx +0 -54
- package/src/core/primitives/grid/grid.tsx +0 -48
- package/src/core/primitives/heading/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +0 -66
- package/src/core/primitives/heading/__workshop__/plain.tsx +0 -31
- package/src/core/primitives/heading/heading.tsx +0 -99
- package/src/core/primitives/heading/styles.ts +0 -63
- package/src/core/primitives/heading/types.ts +0 -7
- package/src/core/primitives/inline/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/inline/__workshop__/plain.tsx +0 -26
- package/src/core/primitives/inline/inline.tsx +0 -56
- package/src/core/primitives/inline/styles.ts +0 -31
- package/src/core/primitives/kbd/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/kbd/kbd.tsx +0 -53
- package/src/core/primitives/label/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +0 -48
- package/src/core/primitives/label/__workshop__/plain.tsx +0 -23
- package/src/core/primitives/label/label.tsx +0 -96
- package/src/core/primitives/label/styles.ts +0 -44
- package/src/core/primitives/popover/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +0 -76
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -31
- package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +0 -70
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +0 -86
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +0 -96
- package/src/core/primitives/popover/floating-ui/size.ts +0 -82
- package/src/core/primitives/popover/helpers.ts +0 -31
- package/src/core/primitives/popover/popover.tsx +0 -476
- package/src/core/primitives/popover/popoverCard.tsx +0 -153
- package/src/core/primitives/radio/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/radio/__workshop__/plain.tsx +0 -28
- package/src/core/primitives/radio/radio.tsx +0 -50
- package/src/core/primitives/radio/styles.ts +0 -116
- package/src/core/primitives/select/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/select/__workshop__/plain.tsx +0 -27
- package/src/core/primitives/select/__workshop__/readOnly.tsx +0 -23
- package/src/core/primitives/select/select.tsx +0 -86
- package/src/core/primitives/select/styles.ts +0 -166
- package/src/core/primitives/spinner/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/spinner/__workshop__/Props.tsx +0 -14
- package/src/core/primitives/spinner/spinner.tsx +0 -31
- package/src/core/primitives/stack/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/stack/__workshop__/plain.tsx +0 -31
- package/src/core/primitives/stack/stack.tsx +0 -41
- package/src/core/primitives/stack/styles.ts +0 -31
- package/src/core/primitives/switch/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/switch/styles.ts +0 -172
- package/src/core/primitives/switch/switch.tsx +0 -66
- package/src/core/primitives/text/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/text/__workshop__/colored.tsx +0 -29
- package/src/core/primitives/text/__workshop__/example.tsx +0 -38
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +0 -58
- package/src/core/primitives/text/styles.ts +0 -73
- package/src/core/primitives/text/text.tsx +0 -85
- package/src/core/primitives/textArea/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/textArea/__workshop__/plain.tsx +0 -49
- package/src/core/primitives/textArea/textArea.tsx +0 -118
- package/src/core/primitives/textInput/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/textInput/__workshop__/index.ts +0 -49
- package/src/core/primitives/textInput/__workshop__/multipleTones.tsx +0 -20
- package/src/core/primitives/textInput/__workshop__/plain.tsx +0 -98
- package/src/core/primitives/textInput/__workshop__/readOnly.tsx +0 -5
- package/src/core/primitives/textInput/__workshop__/tones.tsx +0 -239
- package/src/core/primitives/textInput/__workshop__/typed.tsx +0 -22
- package/src/core/primitives/textInput/textInput.tsx +0 -440
- package/src/core/primitives/tooltip/__workshop__/.eslintrc +0 -5
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +0 -101
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -73
- package/src/core/primitives/tooltip/__workshop__/props.tsx +0 -106
- package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -85
- package/src/core/primitives/tooltip/tooltip.test.tsx +0 -451
- package/src/core/primitives/tooltip/tooltip.tsx +0 -464
- package/src/core/primitives/tooltip/tooltipCard.tsx +0 -110
- package/src/core/primitives/tooltip/tooltipDelayGroup/index.ts +0 -4
- package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -57
- package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +0 -11
- package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -12
- package/src/core/primitives/types.ts +0 -165
- package/src/core/styles/border/borderStyle.ts +0 -61
- package/src/core/styles/border/index.ts +0 -2
- package/src/core/styles/border/types.ts +0 -11
- package/src/core/styles/box/boxStyle.ts +0 -74
- package/src/core/styles/box/index.ts +0 -2
- package/src/core/styles/box/types.ts +0 -11
- package/src/core/styles/card/_cardColorStyle.ts +0 -101
- package/src/core/styles/card/index.ts +0 -1
- package/src/core/styles/flex/flexItemStyle.ts +0 -26
- package/src/core/styles/flex/flexStyle.ts +0 -69
- package/src/core/styles/flex/index.ts +0 -3
- package/src/core/styles/flex/types.ts +0 -24
- package/src/core/styles/focusRing/index.ts +0 -25
- package/src/core/styles/font/codeFontStyle.ts +0 -12
- package/src/core/styles/font/headingFontStyle.ts +0 -12
- package/src/core/styles/font/index.ts +0 -6
- package/src/core/styles/font/labelFontStyle.ts +0 -12
- package/src/core/styles/font/responsiveFont.ts +0 -101
- package/src/core/styles/font/textAlignStyle.ts +0 -18
- package/src/core/styles/font/textFontStyle.ts +0 -12
- package/src/core/styles/font/types.ts +0 -34
- package/src/core/styles/grid/gridItemStyle.ts +0 -81
- package/src/core/styles/grid/gridStyle.ts +0 -97
- package/src/core/styles/grid/index.ts +0 -3
- package/src/core/styles/grid/types.ts +0 -37
- package/src/core/styles/helpers.ts +0 -81
- package/src/core/styles/index.ts +0 -5
- package/src/core/styles/input/index.ts +0 -2
- package/src/core/styles/input/responsiveInputPaddingStyle.ts +0 -77
- package/src/core/styles/input/textInputStyle.ts +0 -263
- package/src/core/styles/internal.ts +0 -12
- package/src/core/styles/margin/index.ts +0 -2
- package/src/core/styles/margin/marginStyle.ts +0 -20
- package/src/core/styles/margin/marginsStyle.test.ts +0 -32
- package/src/core/styles/margin/types.ts +0 -9
- package/src/core/styles/padding/index.ts +0 -2
- package/src/core/styles/padding/paddingStyle.test.ts +0 -32
- package/src/core/styles/padding/paddingStyle.ts +0 -20
- package/src/core/styles/padding/types.ts +0 -12
- package/src/core/styles/radius/index.ts +0 -2
- package/src/core/styles/radius/radiusStyle.ts +0 -22
- package/src/core/styles/radius/types.ts +0 -8
- package/src/core/styles/shadow/index.ts +0 -2
- package/src/core/styles/shadow/shadowStyle.ts +0 -29
- package/src/core/styles/shadow/types.ts +0 -6
- package/src/core/styles/types.ts +0 -8
- package/src/core/theme/__workshop__/.eslintrc +0 -5
- package/src/core/theme/__workshop__/build/Root.tsx +0 -367
- package/src/core/theme/__workshop__/build/helpers.ts +0 -46
- package/src/core/theme/__workshop__/build/story.tsx +0 -459
- package/src/core/theme/__workshop__/canvas.tsx +0 -350
- package/src/core/theme/__workshop__/color.tsx +0 -62
- package/src/core/theme/__workshop__/debug/story.tsx +0 -401
- package/src/core/theme/__workshop__/index.ts +0 -39
- package/src/core/theme/__workshop__/layer.tsx +0 -78
- package/src/core/theme/__workshop__/nestedProvider.tsx +0 -15
- package/src/core/theme/index.ts +0 -5
- package/src/core/theme/theme.test.tsx +0 -73
- package/src/core/theme/themeColorProvider.tsx +0 -28
- package/src/core/theme/themeContext.ts +0 -10
- package/src/core/theme/themeProvider.tsx +0 -63
- package/src/core/theme/useRootTheme.ts +0 -16
- package/src/core/theme/useTheme.ts +0 -16
- package/src/core/types/box.ts +0 -19
- package/src/core/types/button.ts +0 -22
- package/src/core/types/flex.ts +0 -31
- package/src/core/types/grid.ts +0 -14
- package/src/core/types/gridItem.ts +0 -37
- package/src/core/types/index.ts +0 -14
- package/src/core/types/selectable.ts +0 -6
- package/src/core/types/text.ts +0 -4
- package/src/core/utils/arrow/arrow.tsx +0 -122
- package/src/core/utils/boundaryElement/__workshop__/.eslintrc +0 -5
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +0 -101
- package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +0 -23
- package/src/core/utils/boundaryElement/index.ts +0 -3
- package/src/core/utils/boundaryElement/useBoundaryElement.ts +0 -25
- package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +0 -21
- package/src/core/utils/elementQuery/__workshop__/.eslintrc +0 -5
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +0 -30
- package/src/core/utils/elementQuery/elementQuery.tsx +0 -53
- package/src/core/utils/errorBoundary.tsx +0 -47
- package/src/core/utils/layer/__workshop__/.eslintrc +0 -5
- package/src/core/utils/layer/__workshop__/multipleRoots.tsx +0 -48
- package/src/core/utils/layer/__workshop__/nested.tsx +0 -97
- package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +0 -12
- package/src/core/utils/layer/index.ts +0 -4
- package/src/core/utils/layer/layer.test.tsx +0 -109
- package/src/core/utils/layer/layer.tsx +0 -108
- package/src/core/utils/layer/layerProvider.tsx +0 -109
- package/src/core/utils/layer/useLayer.ts +0 -25
- package/src/core/utils/portal/__workshop__/.eslintrc +0 -5
- package/src/core/utils/portal/portal.test.tsx +0 -104
- package/src/core/utils/portal/portal.ts +0 -31
- package/src/core/utils/portal/portalProvider.tsx +0 -78
- package/src/core/utils/portal/usePortal.ts +0 -24
- package/src/core/utils/srOnly/srOnly.tsx +0 -36
- package/src/core/utils/virtualList/__workshop__/.eslintrc +0 -5
- package/src/core/utils/virtualList/virtualList.tsx +0 -170
- package/src/css/cli/buildCommand.ts +0 -36
- package/src/css/cli/index.ts +0 -38
- package/src/css/compile/comileRules.ts +0 -59
- package/src/css/components/dialog/classes.ts +0 -29
- package/src/css/primitives/badge/rules.ts +0 -25
- package/src/css/primitives/box/rules.ts +0 -25
- package/src/css/primitives/card/rules.ts +0 -93
- package/src/css/primitives/selectable/__style.ts +0 -115
- package/src/css/primitives/selectable/rules.ts +0 -27
- package/src/css/primitives/selectable/selectable.ts +0 -9
- package/src/css/primitives/selectable/types.ts +0 -6
- package/src/css/rules.ts +0 -121
- package/src/css/styles/border/border.ts +0 -22
- package/src/css/styles/border/rules.ts +0 -24
- package/src/css/styles/display/rules.ts +0 -62
- package/src/css/styles/flex/flex.ts +0 -20
- package/src/css/styles/flex/rules.ts +0 -28
- package/src/css/styles/flexItem/flexItem.ts +0 -8
- package/src/css/styles/flexItem/rules.ts +0 -11
- package/src/css/styles/flexItem/types.ts +0 -11
- package/src/css/styles/font/font.ts +0 -12
- package/src/css/styles/font/rules.ts +0 -125
- package/src/css/styles/font/types.ts +0 -6
- package/src/css/styles/gap/gap.ts +0 -8
- package/src/css/styles/gap/rules.ts +0 -33
- package/src/css/styles/gap/types.ts +0 -9
- package/src/css/styles/grid/rules.ts +0 -35
- package/src/css/styles/gridItem/gridItem.ts +0 -15
- package/src/css/styles/gridItem/rules.ts +0 -96
- package/src/css/styles/margin/margin.ts +0 -15
- package/src/css/styles/margin/rules.ts +0 -59
- package/src/css/styles/maxWidth/rules.ts +0 -36
- package/src/css/styles/maxWidth/types.ts +0 -6
- package/src/css/styles/overflow/rules.ts +0 -9
- package/src/css/styles/padding/padding.ts +0 -15
- package/src/css/styles/padding/rules.ts +0 -59
- package/src/css/styles/padding/types.ts +0 -12
- package/src/css/styles/pointerEvents/pointerEvents.ts +0 -6
- package/src/css/styles/pointerEvents/rules.ts +0 -11
- package/src/css/styles/position/position.ts +0 -7
- package/src/css/styles/position/rules.ts +0 -31
- package/src/css/styles/position/types.ts +0 -13
- package/src/css/styles/radius/radius.ts +0 -8
- package/src/css/styles/radius/rules.ts +0 -13
- package/src/css/styles/radius/types.ts +0 -7
- package/src/css/styles/shadow/rules.ts +0 -53
- package/src/css/styles/width/index.ts +0 -2
- package/src/css/styles/width/rules.ts +0 -7
- package/src/css/styles/width/types.ts +0 -8
- package/src/theme/system/_constants.ts +0 -25
- package/src/theme/system/_types.ts +0 -41
- package/src/theme/system/avatar.ts +0 -14
- package/src/theme/system/color/_constants.ts +0 -41
- package/src/theme/system/color/_helpers.ts +0 -23
- package/src/theme/system/color/_system.ts +0 -40
- package/src/theme/system/color/badge.ts +0 -20
- package/src/theme/system/color/color.ts +0 -34
- package/src/theme/system/css.ts +0 -9
- package/src/theme/system/font.ts +0 -52
- package/src/theme/system/index.ts +0 -14
- package/src/theme/system/input.ts +0 -33
- package/src/theme/system/theme.ts +0 -138
- package/src/theme/system/v0/color/_generic.ts +0 -35
- package/src/theme/system/v0/color/_system.ts +0 -13
- package/src/theme/system/v0/color/color.ts +0 -39
- package/src/theme/system/v0/color/index.ts +0 -11
- package/src/theme/system/v0/color/input.ts +0 -34
- package/src/theme/system/v0/color/spot.ts +0 -13
- package/src/theme/system/v0/index.ts +0 -3
- package/theme.js +0 -2
- /package/src/css/{styles → aspects}/border/index.ts +0 -0
- /package/src/css/{styles → aspects}/border/types.ts +0 -0
- /package/src/css/{styles → aspects}/flex/index.ts +0 -0
- /package/src/css/{styles → aspects}/flex/types.ts +0 -0
- /package/src/css/{styles → aspects}/flexItem/index.ts +0 -0
- /package/src/css/{styles → aspects}/font/index.ts +0 -0
- /package/src/css/{styles → aspects}/gap/index.ts +0 -0
- /package/src/css/{styles → aspects}/gridItem/index.ts +0 -0
- /package/src/css/{styles → aspects}/gridItem/types.ts +0 -0
- /package/src/css/{styles → aspects}/height/rules.ts +0 -0
- /package/src/css/{styles → aspects}/margin/index.ts +0 -0
- /package/src/css/{styles → aspects}/margin/types.ts +0 -0
- /package/src/css/{styles → aspects}/maxWidth/index.ts +0 -0
- /package/src/css/{styles → aspects}/maxWidth/maxWidth.ts +0 -0
- /package/src/css/{styles → aspects}/padding/index.ts +0 -0
- /package/src/css/{styles → aspects}/pointerEvents/index.ts +0 -0
- /package/src/css/{styles → aspects}/pointerEvents/types.ts +0 -0
- /package/src/css/{styles → aspects}/position/index.ts +0 -0
- /package/src/css/{styles → aspects}/radius/index.ts +0 -0
- /package/src/css/{styles → aspects}/width/width.ts +0 -0
- /package/src/css/primitives/{selectable → _selectable}/index.ts +0 -0
- /package/src/{core → css}/primitives/stack/index.ts +0 -0
- /package/src/{core → css}/utils/srOnly/index.ts +0 -0
- /package/src/theme/{system/v0 → v0}/avatar.ts +0 -0
- /package/src/theme/{system/v0 → v0}/color/base.ts +0 -0
- /package/src/theme/{system/v0 → v0}/color/button.ts +0 -0
- /package/src/theme/{system/v0 → v0}/color/card.ts +0 -0
- /package/src/theme/{system/v0 → v0}/color/muted.ts +0 -0
- /package/src/theme/{system/v0 → v0}/color/selectable.ts +0 -0
- /package/src/theme/{system/v0 → v0}/color/solid.ts +0 -0
- /package/src/theme/{system → v0}/focusRing.ts +0 -0
- /package/src/theme/{system/v0 → v0}/input.ts +0 -0
- /package/src/theme/{system → v0}/layer.ts +0 -0
- /package/src/theme/{system → v0}/shadow.ts +0 -0
- /package/src/theme/{system → v0}/styles.ts +0 -0
- /package/src/theme/{system → v2}/color/avatar.ts +0 -0
- /package/src/theme/{system → v2}/color/button.ts +0 -0
- /package/src/theme/{system → v2}/color/index.ts +0 -0
- /package/src/theme/{system → v2}/color/input.ts +0 -0
- /package/src/theme/{system → v2}/color/kbd.ts +0 -0
- /package/src/theme/{system → v2}/color/selectable.ts +0 -0
- /package/src/theme/{system → v2}/color/shadow.ts +0 -0
- /package/src/theme/{system → v2}/color/state.ts +0 -0
- /package/src/theme/{system → v2}/color/syntax.ts +0 -0
- /package/src/{core → ui/_compat}/theme/types.ts +0 -0
- /package/src/{core/components/autocomplete/__fixtures__ → ui/components/autocomplete/__mocks__}/countries.ts +0 -0
- /package/src/{core → ui}/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -0
- /package/src/{core → ui}/components/autocomplete/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/components/autocomplete/__workshop__/types.ts +0 -0
- /package/src/{core → ui}/components/autocomplete/autocompleteReducer.ts +0 -0
- /package/src/{core → ui}/components/autocomplete/constants.ts +0 -0
- /package/src/{core → ui}/components/autocomplete/index.ts +0 -0
- /package/src/{core → ui}/components/breadcrumbs/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/components/breadcrumbs/index.ts +0 -0
- /package/src/{core → ui}/components/dialog/__workshop__/autoFocus.tsx +0 -0
- /package/src/{core → ui}/components/dialog/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/components/dialog/__workshop__/layering.tsx +0 -0
- /package/src/{core → ui}/components/dialog/__workshop__/provider.tsx +0 -0
- /package/src/{core → ui}/components/dialog/dialogContext.ts +0 -0
- /package/src/{core → ui}/components/dialog/index.ts +0 -0
- /package/src/{core → ui}/components/hotkeys/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/components/hotkeys/__workshop__/plain.tsx +0 -0
- /package/src/{core → ui}/components/hotkeys/index.ts +0 -0
- /package/src/{core → ui}/components/index.ts +0 -0
- /package/src/{core → ui}/components/menu/__workshop__/closableMenuButton.tsx +0 -0
- /package/src/{core → ui}/components/menu/__workshop__/customMenuItem.tsx +0 -0
- /package/src/{core → ui}/components/menu/__workshop__/disableFocusOnClose.tsx +0 -0
- /package/src/{core → ui}/components/menu/__workshop__/groups.tsx +0 -0
- /package/src/{core → ui}/components/menu/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/components/menu/__workshop__/menuGroupRight.tsx +0 -0
- /package/src/{core → ui}/components/menu/__workshop__/nestedMenu.tsx +0 -0
- /package/src/{core → ui}/components/menu/__workshop__/onCloseMenuButton.tsx +0 -0
- /package/src/{core → ui}/components/menu/__workshop__/selectedItem.tsx +0 -0
- /package/src/{core → ui}/components/menu/__workshop__/withoutArrow.tsx +0 -0
- /package/src/{core → ui}/components/menu/helpers.ts +0 -0
- /package/src/{core → ui}/components/menu/index.ts +0 -0
- /package/src/{core → ui}/components/skeleton/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/components/skeleton/index.ts +0 -0
- /package/src/{core → ui}/components/tab/__workshop__/example.tsx +0 -0
- /package/src/{core → ui}/components/tab/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/components/tab/index.ts +0 -0
- /package/src/{core → ui}/components/toast/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/components/toast/index.ts +0 -0
- /package/src/{core → ui}/components/toast/toastContext.ts +0 -0
- /package/src/{core → ui}/components/tree/__workshop__/basic.perf.ts +0 -0
- /package/src/{core → ui}/components/tree/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/components/tree/helpers.ts +0 -0
- /package/src/{core → ui}/components/tree/index.ts +0 -0
- /package/src/{core → ui}/components/tree/treeContext.ts +0 -0
- /package/src/{core → ui}/components/tree/types.ts +0 -0
- /package/src/{core → ui}/global.ts +0 -0
- /package/src/{core → ui}/helpers/animation.ts +0 -0
- /package/src/{core → ui}/helpers/element.ts +0 -0
- /package/src/{core → ui}/helpers/scroll.ts +0 -0
- /package/src/{core → ui}/hooks/index.ts +0 -0
- /package/src/{core → ui}/hooks/useCustomValidity.ts +0 -0
- /package/src/{core → ui}/hooks/useElementRect/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/hooks/useElementRect/index.ts +0 -0
- /package/src/{core → ui}/hooks/useElementRect/useElementRect.ts +0 -0
- /package/src/{core → ui}/hooks/useIsomorphicEffect.ts +0 -0
- /package/src/{core → ui}/hooks/useMediaIndex/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/hooks/useMediaIndex/__workshop__/test.tsx +0 -0
- /package/src/{core → ui}/hooks/useMediaIndex/index.ts +0 -0
- /package/src/{core → ui}/hooks/useMounted.ts +0 -0
- /package/src/{core → ui}/lib/isRecord.ts +0 -0
- /package/src/{core → ui}/middleware/origin.ts +0 -0
- /package/src/{core → ui}/observers/elementSizeObserver.ts +0 -0
- /package/src/{core → ui}/observers/index.ts +0 -0
- /package/src/{core → ui}/observers/resizeObserver.ts +0 -0
- /package/src/{core → ui}/primitives/_selectable/index.ts +0 -0
- /package/src/{core → ui}/primitives/avatar/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/avatar/index.ts +0 -0
- /package/src/{core → ui}/primitives/badge/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/badge/index.ts +0 -0
- /package/src/{core → ui}/primitives/badge/types.ts +0 -0
- /package/src/{core → ui}/primitives/box/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/box/__workshop__/responsive.tsx +0 -0
- /package/src/{core → ui}/primitives/box/index.ts +0 -0
- /package/src/{core → ui}/primitives/button/__workshop__/customIcons.tsx +0 -0
- /package/src/{core → ui}/primitives/button/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/button/__workshop__/mixedChildren.tsx +0 -0
- /package/src/{core → ui}/primitives/button/__workshop__/uploadButton.tsx +0 -0
- /package/src/{core → ui}/primitives/button/index.ts +0 -0
- /package/src/{core → ui}/primitives/card/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/checkbox/__workshop__/example.tsx +0 -0
- /package/src/{core → ui}/primitives/checkbox/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/checkbox/__workshop__/props.tsx +0 -0
- /package/src/{core → ui}/primitives/checkbox/__workshop__/readOnly.tsx +0 -0
- /package/src/{core → ui}/primitives/checkbox/index.ts +0 -0
- /package/src/{core → ui}/primitives/code/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/code/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{core → ui}/primitives/code/index.ts +0 -0
- /package/src/{core → ui}/primitives/container/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/container/index.ts +0 -0
- /package/src/{core → ui}/primitives/container/types.ts +0 -0
- /package/src/{core → ui}/primitives/flex/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/flex/index.ts +0 -0
- /package/src/{core → ui}/primitives/grid/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/grid/index.ts +0 -0
- /package/src/{core → ui}/primitives/heading/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/heading/index.ts +0 -0
- /package/src/{core → ui}/primitives/index.ts +0 -0
- /package/src/{core → ui}/primitives/inline/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/inline/index.ts +0 -0
- /package/src/{core → ui}/primitives/inline/types.ts +0 -0
- /package/src/{core → ui}/primitives/kbd/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/kbd/__workshop__/plain.tsx +0 -0
- /package/src/{core/primitives/kbd/index.tsx → ui/primitives/kbd/index.ts} +0 -0
- /package/src/{core → ui}/primitives/label/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/label/index.ts +0 -0
- /package/src/{core → ui}/primitives/popover/__workshop__/MarginsStory.tsx +0 -0
- /package/src/{core → ui}/primitives/popover/__workshop__/RecursiveStory.tsx +0 -0
- /package/src/{core → ui}/primitives/popover/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/popover/constants.ts +0 -0
- /package/src/{core → ui}/primitives/popover/index.ts +0 -0
- /package/src/{core → ui}/primitives/popover/types.ts +0 -0
- /package/src/{core → ui}/primitives/radio/__workshop__/example.tsx +0 -0
- /package/src/{core → ui}/primitives/radio/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/radio/index.ts +0 -0
- /package/src/{core → ui}/primitives/select/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/select/index.ts +0 -0
- /package/src/{core → ui}/primitives/spinner/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/spinner/index.ts +0 -0
- /package/src/{core → ui}/primitives/stack/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/switch/__workshop__/example.tsx +0 -0
- /package/src/{core → ui}/primitives/switch/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/switch/__workshop__/props.tsx +0 -0
- /package/src/{core → ui}/primitives/switch/index.ts +0 -0
- /package/src/{core → ui}/primitives/text/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/text/index.ts +0 -0
- /package/src/{core → ui}/primitives/textArea/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/textArea/index.ts +0 -0
- /package/src/{core → ui}/primitives/textInput/__workshop__/clearButton.tsx +0 -0
- /package/src/{core → ui}/primitives/textInput/__workshop__/customValidity.tsx +0 -0
- /package/src/{core → ui}/primitives/textInput/__workshop__/states.tsx +0 -0
- /package/src/{core → ui}/primitives/textInput/index.ts +0 -0
- /package/src/{core → ui}/primitives/tooltip/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/primitives/tooltip/constants.ts +0 -0
- /package/src/{core → ui}/primitives/tooltip/index.ts +0 -0
- /package/src/{core → ui}/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -0
- /package/src/{core → ui}/types/avatar.ts +0 -0
- /package/src/{core → ui}/types/badge.ts +0 -0
- /package/src/{core → ui}/types/card.ts +0 -0
- /package/src/{core → ui}/types/dialog.ts +0 -0
- /package/src/{core → ui}/types/placement.ts +0 -0
- /package/src/{core → ui}/types/popover.ts +0 -0
- /package/src/{core → ui}/types/radius.ts +0 -0
- /package/src/{core → ui}/utils/arrow/cmds.ts +0 -0
- /package/src/{core → ui}/utils/arrow/index.ts +0 -0
- /package/src/{core → ui}/utils/boundaryElement/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/utils/boundaryElement/__workshop__/plain.tsx +0 -0
- /package/src/{core → ui}/utils/boundaryElement/boundaryElementContext.ts +0 -0
- /package/src/{core → ui}/utils/boundaryElement/types.ts +0 -0
- /package/src/{core → ui}/utils/conditionalWrapper/index.ts +0 -0
- /package/src/{core → ui}/utils/elementQuery/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/utils/elementQuery/helpers.ts +0 -0
- /package/src/{core → ui}/utils/elementQuery/index.ts +0 -0
- /package/src/{core → ui}/utils/index.ts +0 -0
- /package/src/{core → ui}/utils/layer/__workshop__/_debug.tsx +0 -0
- /package/src/{core → ui}/utils/layer/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/utils/layer/getLayerContext.test.ts +0 -0
- /package/src/{core → ui}/utils/layer/getLayerContext.ts +0 -0
- /package/src/{core → ui}/utils/layer/layerContext.ts +0 -0
- /package/src/{core → ui}/utils/layer/types.ts +0 -0
- /package/src/{core → ui}/utils/portal/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/utils/portal/__workshop__/named.tsx +0 -0
- /package/src/{core → ui}/utils/portal/index.ts +0 -0
- /package/src/{core → ui}/utils/portal/portalContext.ts +0 -0
- /package/src/{core → ui}/utils/portal/types.ts +0 -0
- /package/src/{core → ui}/utils/virtualList/__workshop__/changingProps.tsx +0 -0
- /package/src/{core → ui}/utils/virtualList/__workshop__/elementScroll.tsx +0 -0
- /package/src/{core → ui}/utils/virtualList/__workshop__/index.ts +0 -0
- /package/src/{core → ui}/utils/virtualList/__workshop__/infiniteList.tsx +0 -0
- /package/src/{core → ui}/utils/virtualList/__workshop__/windowScrolll.tsx +0 -0
- /package/src/{core → ui}/utils/virtualList/index.ts +0 -0
|
@@ -1,2836 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var css = require("@sanity/ui/css"), theme = require("@sanity/ui/theme"), fs = require("fs/promises"), path = require("path");
|
|
3
3
|
function _interopDefaultCompat(e) {
|
|
4
4
|
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
5
5
|
}
|
|
6
6
|
var fs__default = /* @__PURE__ */ _interopDefaultCompat(fs), path__default = /* @__PURE__ */ _interopDefaultCompat(path);
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
dialog: {
|
|
13
|
-
top: 0,
|
|
14
|
-
left: 0,
|
|
15
|
-
right: 0,
|
|
16
|
-
bottom: 0,
|
|
17
|
-
alignItems: "center",
|
|
18
|
-
justifyContent: "center",
|
|
19
|
-
outline: "none",
|
|
20
|
-
background: "var(--color-backdrop)",
|
|
21
|
-
"@keyframes": {
|
|
22
|
-
"dialog-zoom-in": {
|
|
23
|
-
from: {
|
|
24
|
-
opacity: 0,
|
|
25
|
-
transform: "scale(0.95)"
|
|
26
|
-
},
|
|
27
|
-
to: {
|
|
28
|
-
opacity: 1,
|
|
29
|
-
transform: "scale(1)"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"dialog-fade-in": {
|
|
33
|
-
from: {
|
|
34
|
-
opacity: 0
|
|
35
|
-
},
|
|
36
|
-
to: {
|
|
37
|
-
opacity: 1
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"@nest": {
|
|
42
|
-
"&[data-animate]": {
|
|
43
|
-
animation: "dialog-fade-in 200ms ease-out"
|
|
44
|
-
},
|
|
45
|
-
// Animates the dialog card.
|
|
46
|
-
'&[data-animate] > [data-ui="DialogCard"]': {
|
|
47
|
-
animation: "dialog-zoom-in 200ms ease-out"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"dialog-container": {
|
|
52
|
-
width: "100%",
|
|
53
|
-
height: "100%"
|
|
54
|
-
},
|
|
55
|
-
"dialog-card-root": {
|
|
56
|
-
width: "100%",
|
|
57
|
-
maxHeight: "100%",
|
|
58
|
-
overflow: ["hidden", "clip"]
|
|
59
|
-
},
|
|
60
|
-
"dialog-layout": {
|
|
61
|
-
width: "100%"
|
|
62
|
-
},
|
|
63
|
-
"dialog-header": {
|
|
64
|
-
zIndex: 2
|
|
65
|
-
},
|
|
66
|
-
"dialog-content": {
|
|
67
|
-
zIndex: 1,
|
|
68
|
-
outline: "none"
|
|
69
|
-
},
|
|
70
|
-
"dialog-footer": {
|
|
71
|
-
zIndex: 3
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
function responsiveRules(className, props) {
|
|
75
|
-
return {
|
|
76
|
-
[className]: props,
|
|
77
|
-
[`_1:${className}`]: {
|
|
78
|
-
"@media": { "screen and (min-width: 360px)": props }
|
|
79
|
-
},
|
|
80
|
-
[`_2:${className}`]: {
|
|
81
|
-
"@media": { "screen and (min-width: 600px)": props }
|
|
82
|
-
},
|
|
83
|
-
[`_3:${className}`]: {
|
|
84
|
-
"@media": { "screen and (min-width: 900px)": props }
|
|
85
|
-
},
|
|
86
|
-
[`_4:${className}`]: {
|
|
87
|
-
"@media": { "screen and (min-width: 1200px)": props }
|
|
88
|
-
},
|
|
89
|
-
[`_5:${className}`]: {
|
|
90
|
-
"@media": { "screen and (min-width: 1800px)": props }
|
|
91
|
-
},
|
|
92
|
-
[`_6:${className}`]: {
|
|
93
|
-
"@media": { "screen and (min-width: 2400px)": props }
|
|
94
|
-
}
|
|
95
|
-
};
|
|
7
|
+
async function buildPalette(outDir) {
|
|
8
|
+
const css$1 = css.compilePalette();
|
|
9
|
+
await fs__default.default.mkdir(outDir, {
|
|
10
|
+
recursive: !0
|
|
11
|
+
}), await fs__default.default.writeFile(path__default.default.resolve(outDir, "sanity-palette.css"), css$1, "utf-8"), console.log("- sanity-palette.css");
|
|
96
12
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
position: "relative",
|
|
101
|
-
boxSizing: "border-box",
|
|
102
|
-
userSelect: "none",
|
|
103
|
-
boxShadow: "0 0 0 1px var(--card-bg-color)",
|
|
104
|
-
"@nest": {
|
|
105
|
-
'&[data-status="inactive"]': {
|
|
106
|
-
opacity: 0.5
|
|
107
|
-
},
|
|
108
|
-
"& > svg:not([hidden])": {
|
|
109
|
-
display: "block"
|
|
110
|
-
},
|
|
111
|
-
/* &:is(button) */
|
|
112
|
-
'&[data-as="button"]': {
|
|
113
|
-
WebkitFontSmoothing: "inherit",
|
|
114
|
-
appearance: "none",
|
|
115
|
-
margin: 0,
|
|
116
|
-
padding: 0,
|
|
117
|
-
border: 0,
|
|
118
|
-
font: "inherit",
|
|
119
|
-
color: "inherit",
|
|
120
|
-
outline: "none"
|
|
121
|
-
},
|
|
122
|
-
'&[data-as="button"]:focus': {
|
|
123
|
-
// boxShadow: focusRingStyle({focusRing: avatar.focusRing}),
|
|
124
|
-
},
|
|
125
|
-
'&[data-as="button"]:focus:not(:focus-visible)': {
|
|
126
|
-
boxShadow: "none"
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
...theme.THEME_COLOR_AVATAR_COLORS.reduce((acc, color) => ({
|
|
131
|
-
...acc,
|
|
132
|
-
[`avatar-${color}`]: {
|
|
133
|
-
"--avatar-bg-color": `var(--card-avatar-${color}-bg-color)`,
|
|
134
|
-
"--avatar-fg-color": `var(--card-avatar-${color}-fg-color)`
|
|
135
|
-
}
|
|
136
|
-
}), {}),
|
|
137
|
-
"avatar-arrow": {
|
|
138
|
-
position: "absolute",
|
|
139
|
-
boxSizing: "border-box",
|
|
140
|
-
zIndex: 0,
|
|
141
|
-
opacity: 0,
|
|
142
|
-
transition: "all 0.2s linear",
|
|
143
|
-
transform: "rotate(-90deg) translate3d(0, 6px, 0)",
|
|
144
|
-
left: 0,
|
|
145
|
-
right: 0,
|
|
146
|
-
top: 0,
|
|
147
|
-
bottom: 0,
|
|
148
|
-
"@nest": {
|
|
149
|
-
"& > svg": {
|
|
150
|
-
width: "11px",
|
|
151
|
-
height: "7px",
|
|
152
|
-
position: "absolute",
|
|
153
|
-
top: "-5px",
|
|
154
|
-
left: "50%",
|
|
155
|
-
transform: "translateX(-6px)"
|
|
156
|
-
},
|
|
157
|
-
"& > svg:not([hidden])": {
|
|
158
|
-
display: "block"
|
|
159
|
-
},
|
|
160
|
-
".arrow-position-inside > &": {
|
|
161
|
-
transform: "rotate(-90deg) translate3d(0, 6px, 0)",
|
|
162
|
-
opacity: 0
|
|
163
|
-
},
|
|
164
|
-
".arrow-position-top > &": {
|
|
165
|
-
opacity: 1,
|
|
166
|
-
transform: "rotate(0deg)"
|
|
167
|
-
},
|
|
168
|
-
".arrow-position-bottom > &": {
|
|
169
|
-
opacity: 1,
|
|
170
|
-
transform: "rotate(-180deg)"
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
...responsiveRules("avatar-0", {
|
|
175
|
-
width: "var(--avatar-0-size)",
|
|
176
|
-
height: "var(--avatar-0-size)",
|
|
177
|
-
borderRadius: "var(--avatar-0-size)",
|
|
178
|
-
"@nest": {
|
|
179
|
-
"& > svg": {
|
|
180
|
-
width: "var(--avatar-0-size)",
|
|
181
|
-
height: "var(--avatar-0-size)",
|
|
182
|
-
borderRadius: "var(--avatar-0-size)"
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}),
|
|
186
|
-
...responsiveRules("avatar-1", {
|
|
187
|
-
width: "var(--avatar-1-size)",
|
|
188
|
-
height: "var(--avatar-1-size)",
|
|
189
|
-
borderRadius: "var(--avatar-1-size)",
|
|
190
|
-
"@nest": {
|
|
191
|
-
"& > svg": {
|
|
192
|
-
width: "var(--avatar-1-size)",
|
|
193
|
-
height: "var(--avatar-1-size)",
|
|
194
|
-
borderRadius: "var(--avatar-1-size)"
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}),
|
|
198
|
-
...responsiveRules("avatar-2", {
|
|
199
|
-
width: "var(--avatar-2-size)",
|
|
200
|
-
height: "var(--avatar-2-size)",
|
|
201
|
-
borderRadius: "var(--avatar-2-size)",
|
|
202
|
-
"@nest": {
|
|
203
|
-
"& > svg": {
|
|
204
|
-
width: "var(--avatar-2-size)",
|
|
205
|
-
height: "var(--avatar-2-size)",
|
|
206
|
-
borderRadius: "var(--avatar-2-size)"
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}),
|
|
210
|
-
...responsiveRules("avatar-3", {
|
|
211
|
-
width: "var(--avatar-3-size)",
|
|
212
|
-
height: "var(--avatar-3-size)",
|
|
213
|
-
borderRadius: "var(--avatar-3-size)",
|
|
214
|
-
"@nest": {
|
|
215
|
-
"& > svg": {
|
|
216
|
-
width: "var(--avatar-3-size)",
|
|
217
|
-
height: "var(--avatar-3-size)",
|
|
218
|
-
borderRadius: "var(--avatar-3-size)"
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}),
|
|
222
|
-
"avatar-initials": {
|
|
223
|
-
width: "100%",
|
|
224
|
-
height: "100%",
|
|
225
|
-
color: "var(--avatar-fg-color)",
|
|
226
|
-
alignItems: "center",
|
|
227
|
-
justifyContent: "center",
|
|
228
|
-
textTransform: "uppercase",
|
|
229
|
-
textAlign: "center",
|
|
230
|
-
borderRadius: "50%",
|
|
231
|
-
"@nest": {
|
|
232
|
-
"&:not([hidden])": {
|
|
233
|
-
display: "flex"
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
"avatar-bg-stroke": {
|
|
238
|
-
strokeWidth: "4px",
|
|
239
|
-
stroke: "var(--card-bg-color)"
|
|
240
|
-
},
|
|
241
|
-
"avatar-stroke": {
|
|
242
|
-
strokeWidth: "2px",
|
|
243
|
-
stroke: "var(--avatar-bg-color)",
|
|
244
|
-
"@nest": {
|
|
245
|
-
'[data-status="editing"] &': {
|
|
246
|
-
strokeDasharray: "2 4",
|
|
247
|
-
strokeLinecap: "round"
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
"avatar-image": {
|
|
252
|
-
position: "relative"
|
|
253
|
-
}
|
|
254
|
-
}, varNames = {
|
|
255
|
-
color: {
|
|
256
|
-
dark: {
|
|
257
|
-
transparent: buildColorCardVarNames({ scheme: "dark", tone: "transparent" }),
|
|
258
|
-
default: buildColorCardVarNames({ scheme: "dark", tone: "default" }),
|
|
259
|
-
primary: buildColorCardVarNames({ scheme: "dark", tone: "primary" }),
|
|
260
|
-
positive: buildColorCardVarNames({ scheme: "dark", tone: "positive" }),
|
|
261
|
-
caution: buildColorCardVarNames({ scheme: "dark", tone: "caution" }),
|
|
262
|
-
critical: buildColorCardVarNames({ scheme: "dark", tone: "critical" })
|
|
263
|
-
},
|
|
264
|
-
light: {
|
|
265
|
-
transparent: buildColorCardVarNames({ scheme: "light", tone: "transparent" }),
|
|
266
|
-
default: buildColorCardVarNames({ scheme: "light", tone: "default" }),
|
|
267
|
-
primary: buildColorCardVarNames({ scheme: "light", tone: "primary" }),
|
|
268
|
-
positive: buildColorCardVarNames({ scheme: "light", tone: "positive" }),
|
|
269
|
-
caution: buildColorCardVarNames({ scheme: "light", tone: "caution" }),
|
|
270
|
-
critical: buildColorCardVarNames({ scheme: "light", tone: "critical" })
|
|
271
|
-
},
|
|
272
|
-
//
|
|
273
|
-
accent: {
|
|
274
|
-
fg: "--color-accent-fg"
|
|
275
|
-
},
|
|
276
|
-
avatar: {
|
|
277
|
-
gray: {
|
|
278
|
-
bg: "--color-avatar-gray-bg",
|
|
279
|
-
fg: "--color-avatar-gray-fg"
|
|
280
|
-
},
|
|
281
|
-
blue: {
|
|
282
|
-
bg: "--color-avatar-blue-bg",
|
|
283
|
-
fg: "--color-avatar-blue-fg"
|
|
284
|
-
},
|
|
285
|
-
purple: {
|
|
286
|
-
bg: "--color-avatar-purple-bg",
|
|
287
|
-
fg: "--color-avatar-purple-fg"
|
|
288
|
-
},
|
|
289
|
-
magenta: {
|
|
290
|
-
bg: "--color-avatar-magenta-bg",
|
|
291
|
-
fg: "--color-avatar-magenta-fg"
|
|
292
|
-
},
|
|
293
|
-
red: {
|
|
294
|
-
bg: "--color-avatar-red-bg",
|
|
295
|
-
fg: "--color-avatar-red-fg"
|
|
296
|
-
},
|
|
297
|
-
orange: {
|
|
298
|
-
bg: "--color-avatar-orange-bg",
|
|
299
|
-
fg: "--color-avatar-orange-fg"
|
|
300
|
-
},
|
|
301
|
-
yellow: {
|
|
302
|
-
bg: "--color-avatar-yellow-bg",
|
|
303
|
-
fg: "--color-avatar-yellow-fg"
|
|
304
|
-
},
|
|
305
|
-
green: {
|
|
306
|
-
bg: "--color-avatar-green-bg",
|
|
307
|
-
fg: "--color-avatar-green-fg"
|
|
308
|
-
},
|
|
309
|
-
cyan: {
|
|
310
|
-
bg: "--color-avatar-cyan-bg",
|
|
311
|
-
fg: "--color-avatar-cyan-fg"
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
badge: {
|
|
315
|
-
bg: "--color-badge-bg",
|
|
316
|
-
dot: "--color-badge-dot",
|
|
317
|
-
fg: "--color-badge-fg",
|
|
318
|
-
icon: "--color-badge-icon",
|
|
319
|
-
default: {
|
|
320
|
-
bg: "--color-badge-default-bg",
|
|
321
|
-
dot: "--color-badge-default-dot",
|
|
322
|
-
fg: "--color-badge-default-fg",
|
|
323
|
-
icon: "--color-badge-default-icon"
|
|
324
|
-
},
|
|
325
|
-
primary: {
|
|
326
|
-
bg: "--color-badge-primary-bg",
|
|
327
|
-
dot: "--color-badge-primary-dot",
|
|
328
|
-
fg: "--color-badge-primary-fg",
|
|
329
|
-
icon: "--color-badge-primary-icon"
|
|
330
|
-
},
|
|
331
|
-
positive: {
|
|
332
|
-
bg: "--color-badge-positive-bg",
|
|
333
|
-
dot: "--color-badge-positive-dot",
|
|
334
|
-
fg: "--color-badge-positive-fg",
|
|
335
|
-
icon: "--color-badge-positive-icon"
|
|
336
|
-
},
|
|
337
|
-
caution: {
|
|
338
|
-
bg: "--color-badge-caution-bg",
|
|
339
|
-
dot: "--color-badge-caution-dot",
|
|
340
|
-
fg: "--color-badge-caution-fg",
|
|
341
|
-
icon: "--color-badge-caution-icon"
|
|
342
|
-
},
|
|
343
|
-
critical: {
|
|
344
|
-
bg: "--color-badge-critical-bg",
|
|
345
|
-
dot: "--color-badge-critical-dot",
|
|
346
|
-
fg: "--color-badge-critical-fg",
|
|
347
|
-
icon: "--color-badge-critical-icon"
|
|
348
|
-
}
|
|
349
|
-
},
|
|
350
|
-
bg: "--color-bg",
|
|
351
|
-
border: "--color-border",
|
|
352
|
-
code: {
|
|
353
|
-
bg: "--color-code-bg",
|
|
354
|
-
fg: "--color-code-fg"
|
|
355
|
-
},
|
|
356
|
-
fg: "--color-fg",
|
|
357
|
-
icon: "--color-icon",
|
|
358
|
-
kbd: {
|
|
359
|
-
bg: "--color-kbd-bg",
|
|
360
|
-
border: "--color-kbd-border",
|
|
361
|
-
fg: "--color-kbd-fg"
|
|
362
|
-
},
|
|
363
|
-
link: {
|
|
364
|
-
fg: "--color-link-fg"
|
|
365
|
-
},
|
|
366
|
-
muted: {
|
|
367
|
-
bg: "--color-muted-bg",
|
|
368
|
-
fg: "--color-muted-fg"
|
|
369
|
-
},
|
|
370
|
-
shadow: {
|
|
371
|
-
outline: "--color-shadow-outline",
|
|
372
|
-
umbra: "--color-shadow-umbra",
|
|
373
|
-
penumbra: "--color-shadow-penumbra",
|
|
374
|
-
ambient: "--color-shadow-ambient"
|
|
375
|
-
},
|
|
376
|
-
skeleton: {
|
|
377
|
-
from: "--color-skeleton-from",
|
|
378
|
-
to: "--color-skeleton-to"
|
|
379
|
-
},
|
|
380
|
-
syntax: {
|
|
381
|
-
atrule: "--color-syntax-atrule",
|
|
382
|
-
attrName: "--color-syntax-attrName",
|
|
383
|
-
attrValue: "--color-syntax-attrValue",
|
|
384
|
-
attribute: "--color-syntax-attribute",
|
|
385
|
-
boolean: "--color-syntax-boolean",
|
|
386
|
-
builtin: "--color-syntax-builtin",
|
|
387
|
-
cdata: "--color-syntax-cdata",
|
|
388
|
-
char: "--color-syntax-char",
|
|
389
|
-
class: "--color-syntax-class",
|
|
390
|
-
className: "--color-syntax-className",
|
|
391
|
-
comment: "--color-syntax-comment",
|
|
392
|
-
constant: "--color-syntax-constant",
|
|
393
|
-
deleted: "--color-syntax-deleted",
|
|
394
|
-
doctype: "--color-syntax-doctype",
|
|
395
|
-
entity: "--color-syntax-entity",
|
|
396
|
-
function: "--color-syntax-function",
|
|
397
|
-
hexcode: "--color-syntax-hexcode",
|
|
398
|
-
id: "--color-syntax-id",
|
|
399
|
-
important: "--color-syntax-important",
|
|
400
|
-
inserted: "--color-syntax-inserted",
|
|
401
|
-
keyword: "--color-syntax-keyword",
|
|
402
|
-
number: "--color-syntax-number",
|
|
403
|
-
operator: "--color-syntax-operator",
|
|
404
|
-
prolog: "--color-syntax-prolog",
|
|
405
|
-
property: "--color-syntax-property",
|
|
406
|
-
pseudoClass: "--color-syntax-pseudoClass",
|
|
407
|
-
pseudoElement: "--color-syntax-pseudoElement",
|
|
408
|
-
punctuation: "--color-syntax-punctuation",
|
|
409
|
-
regex: "--color-syntax-regex",
|
|
410
|
-
selector: "--color-syntax-selector",
|
|
411
|
-
string: "--color-syntax-string",
|
|
412
|
-
symbol: "--color-syntax-symbol",
|
|
413
|
-
tag: "--color-syntax-tag",
|
|
414
|
-
unit: "--color-syntax-unit",
|
|
415
|
-
url: "--color-syntax-url",
|
|
416
|
-
variable: "--color-syntax-variable"
|
|
417
|
-
}
|
|
418
|
-
},
|
|
419
|
-
avatar: {
|
|
420
|
-
focusRing: {
|
|
421
|
-
offset: "--avatar-focus-ring-offset",
|
|
422
|
-
width: "--avatar-focus-ring-width"
|
|
423
|
-
}
|
|
424
|
-
},
|
|
425
|
-
space: Object.fromEntries(
|
|
426
|
-
theme.SPACE.map((space) => [space, `--space-${space}`])
|
|
427
|
-
)
|
|
428
|
-
};
|
|
429
|
-
function buildColorCardVarNames(props) {
|
|
430
|
-
const { scheme, tone } = props, prefix = `--color-${scheme}-${tone}`;
|
|
431
|
-
return {
|
|
432
|
-
accent: {
|
|
433
|
-
fg: `${prefix}-accent-fg`
|
|
434
|
-
},
|
|
435
|
-
avatar: {
|
|
436
|
-
gray: {
|
|
437
|
-
bg: `${prefix}-avatar-gray-bg`,
|
|
438
|
-
fg: `${prefix}-avatar-gray-fg`
|
|
439
|
-
},
|
|
440
|
-
blue: {
|
|
441
|
-
bg: `${prefix}-avatar-blue-bg`,
|
|
442
|
-
fg: `${prefix}-avatar-blue-fg`
|
|
443
|
-
},
|
|
444
|
-
purple: {
|
|
445
|
-
bg: `${prefix}-avatar-purple-bg`,
|
|
446
|
-
fg: `${prefix}-avatar-purple-fg`
|
|
447
|
-
},
|
|
448
|
-
magenta: {
|
|
449
|
-
bg: `${prefix}-avatar-magenta-bg`,
|
|
450
|
-
fg: `${prefix}-avatar-magenta-fg`
|
|
451
|
-
},
|
|
452
|
-
red: {
|
|
453
|
-
bg: `${prefix}-avatar-red-bg`,
|
|
454
|
-
fg: `${prefix}-avatar-red-fg`
|
|
455
|
-
},
|
|
456
|
-
orange: {
|
|
457
|
-
bg: `${prefix}-avatar-orange-bg`,
|
|
458
|
-
fg: `${prefix}-avatar-gray-fg`
|
|
459
|
-
},
|
|
460
|
-
yellow: {
|
|
461
|
-
bg: `${prefix}-avatar-yellow-bg`,
|
|
462
|
-
fg: `${prefix}-avatar-yellow-fg`
|
|
463
|
-
},
|
|
464
|
-
green: {
|
|
465
|
-
bg: `${prefix}-avatar-green-bg`,
|
|
466
|
-
fg: `${prefix}-avatar-green-fg`
|
|
467
|
-
},
|
|
468
|
-
cyan: {
|
|
469
|
-
bg: `${prefix}-avatar-cyan-bg`,
|
|
470
|
-
fg: `${prefix}-avatar-yellow-fg`
|
|
471
|
-
}
|
|
472
|
-
},
|
|
473
|
-
backdrop: `${prefix}-backdrop`,
|
|
474
|
-
badge: {
|
|
475
|
-
default: {
|
|
476
|
-
bg: `${prefix}-badge-default-bg`,
|
|
477
|
-
dot: `${prefix}-badge-default-dot`,
|
|
478
|
-
fg: `${prefix}-badge-default-fg`,
|
|
479
|
-
icon: `${prefix}-badge-default-icon`
|
|
480
|
-
},
|
|
481
|
-
primary: {
|
|
482
|
-
bg: `${prefix}-badge-primary-bg`,
|
|
483
|
-
dot: `${prefix}-badge-primary-dot`,
|
|
484
|
-
fg: `${prefix}-badge-primary-fg`,
|
|
485
|
-
icon: `${prefix}-badge-primary-icon`
|
|
486
|
-
},
|
|
487
|
-
positive: {
|
|
488
|
-
bg: `${prefix}-badge-positive-bg`,
|
|
489
|
-
dot: `${prefix}-badge-positive-dot`,
|
|
490
|
-
fg: `${prefix}-badge-positive-fg`,
|
|
491
|
-
icon: `${prefix}-badge-positive-icon`
|
|
492
|
-
},
|
|
493
|
-
caution: {
|
|
494
|
-
bg: `${prefix}-badge-caution-bg`,
|
|
495
|
-
dot: `${prefix}-badge-caution-dot`,
|
|
496
|
-
fg: `${prefix}-badge-caution-fg`,
|
|
497
|
-
icon: `${prefix}-badge-caution-icon`
|
|
498
|
-
},
|
|
499
|
-
critical: {
|
|
500
|
-
bg: `${prefix}-badge-critical-bg`,
|
|
501
|
-
dot: `${prefix}-badge-critical-dot`,
|
|
502
|
-
fg: `${prefix}-badge-critical-fg`,
|
|
503
|
-
icon: `${prefix}-badge-critical-icon`
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
|
-
bg: `${prefix}-bg`,
|
|
507
|
-
border: `${prefix}-border`,
|
|
508
|
-
code: {
|
|
509
|
-
bg: `${prefix}-code-bg`,
|
|
510
|
-
fg: `${prefix}-code-fg`
|
|
511
|
-
},
|
|
512
|
-
fg: `${prefix}-fg`,
|
|
513
|
-
focusRing: `${prefix}-focus-ring`,
|
|
514
|
-
icon: `${prefix}-icon`,
|
|
515
|
-
input: {
|
|
516
|
-
default: {
|
|
517
|
-
enabled: buildColorInputStateVarNames({ mode: "default", scheme, state: "enabled", tone }),
|
|
518
|
-
hovered: buildColorInputStateVarNames({ mode: "default", scheme, state: "hovered", tone }),
|
|
519
|
-
readOnly: buildColorInputStateVarNames({ mode: "default", scheme, state: "readOnly", tone }),
|
|
520
|
-
disabled: buildColorInputStateVarNames({ mode: "default", scheme, state: "disabled", tone })
|
|
521
|
-
},
|
|
522
|
-
invalid: {
|
|
523
|
-
enabled: buildColorInputStateVarNames({ mode: "invalid", scheme, state: "enabled", tone }),
|
|
524
|
-
hovered: buildColorInputStateVarNames({ mode: "invalid", scheme, state: "hovered", tone }),
|
|
525
|
-
readOnly: buildColorInputStateVarNames({ mode: "invalid", scheme, state: "readOnly", tone }),
|
|
526
|
-
disabled: buildColorInputStateVarNames({ mode: "invalid", scheme, state: "disabled", tone })
|
|
527
|
-
}
|
|
528
|
-
},
|
|
529
|
-
kbd: {
|
|
530
|
-
bg: `${prefix}-kbd-bg`,
|
|
531
|
-
border: `${prefix}-kbd-border`,
|
|
532
|
-
fg: `${prefix}-kbd-fg`
|
|
533
|
-
},
|
|
534
|
-
link: {
|
|
535
|
-
fg: `${prefix}-link-fg`
|
|
536
|
-
},
|
|
537
|
-
muted: {
|
|
538
|
-
bg: `${prefix}-muted-bg`,
|
|
539
|
-
fg: `${prefix}-muted-fg`
|
|
540
|
-
},
|
|
541
|
-
skeleton: {
|
|
542
|
-
from: `${prefix}-skeleton-from`,
|
|
543
|
-
to: `${prefix}-skeleton-to`
|
|
544
|
-
},
|
|
545
|
-
shadow: {
|
|
546
|
-
outline: `${prefix}-shadow-outline`,
|
|
547
|
-
umbra: `${prefix}-shadow-umbra`,
|
|
548
|
-
penumbra: `${prefix}-shadow-penumbra`,
|
|
549
|
-
ambient: `${prefix}-shadow-ambient`
|
|
550
|
-
},
|
|
551
|
-
syntax: {
|
|
552
|
-
atrule: `${prefix}-syntax-atrule`,
|
|
553
|
-
attrName: `${prefix}-syntax-attrName`,
|
|
554
|
-
attrValue: `${prefix}-syntax-attrValue`,
|
|
555
|
-
attribute: `${prefix}-syntax-attribute`,
|
|
556
|
-
boolean: `${prefix}-syntax-boolean`,
|
|
557
|
-
builtin: `${prefix}-syntax-builtin`,
|
|
558
|
-
cdata: `${prefix}-syntax-cdata`,
|
|
559
|
-
char: `${prefix}-syntax-char`,
|
|
560
|
-
class: `${prefix}-syntax-class`,
|
|
561
|
-
className: `${prefix}-syntax-className`,
|
|
562
|
-
comment: `${prefix}-syntax-comment`,
|
|
563
|
-
constant: `${prefix}-syntax-constant`,
|
|
564
|
-
deleted: `${prefix}-syntax-deleted`,
|
|
565
|
-
doctype: `${prefix}-syntax-doctype`,
|
|
566
|
-
entity: `${prefix}-syntax-entity`,
|
|
567
|
-
function: `${prefix}-syntax-function`,
|
|
568
|
-
hexcode: `${prefix}-syntax-hexcode`,
|
|
569
|
-
id: `${prefix}-syntax-id`,
|
|
570
|
-
important: `${prefix}-syntax-important`,
|
|
571
|
-
inserted: `${prefix}-syntax-inserted`,
|
|
572
|
-
keyword: `${prefix}-syntax-keyword`,
|
|
573
|
-
number: `${prefix}-syntax-number`,
|
|
574
|
-
operator: `${prefix}-syntax-operator`,
|
|
575
|
-
prolog: `${prefix}-syntax-prolog`,
|
|
576
|
-
property: `${prefix}-syntax-property`,
|
|
577
|
-
pseudoClass: `${prefix}-syntax-pseudoClass`,
|
|
578
|
-
pseudoElement: `${prefix}-syntax-pseudoElement`,
|
|
579
|
-
punctuation: `${prefix}-syntax-punctuation`,
|
|
580
|
-
regex: `${prefix}-syntax-regex`,
|
|
581
|
-
selector: `${prefix}-syntax-selector`,
|
|
582
|
-
string: `${prefix}-syntax-string`,
|
|
583
|
-
symbol: `${prefix}-syntax-symbol`,
|
|
584
|
-
tag: `${prefix}-syntax-tag`,
|
|
585
|
-
unit: `${prefix}-syntax-unit`,
|
|
586
|
-
url: `${prefix}-syntax-url`,
|
|
587
|
-
variable: `${prefix}-syntax-variable`
|
|
588
|
-
}
|
|
589
|
-
};
|
|
590
|
-
}
|
|
591
|
-
function buildColorInputStateVarNames(props) {
|
|
592
|
-
const { mode, scheme, state, tone } = props, prefix = `--color-${scheme}-${tone}-input-${mode}-${state}`;
|
|
593
|
-
return {
|
|
594
|
-
bg: `${prefix}-bg`,
|
|
595
|
-
border: `${prefix}-border`,
|
|
596
|
-
fg: `${prefix}-fg`,
|
|
597
|
-
muted: {
|
|
598
|
-
bg: `${prefix}-muted-bg`
|
|
599
|
-
},
|
|
600
|
-
placeholder: `${prefix}-placeholder`
|
|
601
|
-
};
|
|
602
|
-
}
|
|
603
|
-
const vars = {
|
|
604
|
-
color: {
|
|
605
|
-
dark: theme.THEME_COLOR_CARD_TONES.reduce((acc, tone) => ({
|
|
606
|
-
...acc,
|
|
607
|
-
[tone]: buildColorCardVars({ scheme: "dark", tone })
|
|
608
|
-
}), {}),
|
|
609
|
-
light: theme.THEME_COLOR_CARD_TONES.reduce((acc, tone) => ({
|
|
610
|
-
...acc,
|
|
611
|
-
[tone]: buildColorCardVars({ scheme: "light", tone })
|
|
612
|
-
}), {}),
|
|
613
|
-
accent: {
|
|
614
|
-
fg: "var(--color-accent-fg)"
|
|
615
|
-
},
|
|
616
|
-
avatar: {
|
|
617
|
-
...theme.THEME_COLOR_AVATAR_COLORS.reduce((acc, color) => ({
|
|
618
|
-
...acc,
|
|
619
|
-
[color]: {
|
|
620
|
-
bg: `var(--color-avatar-${color}-bg)`,
|
|
621
|
-
fg: `var(--color-avatar-${color}-fg)`
|
|
622
|
-
}
|
|
623
|
-
}), {})
|
|
624
|
-
},
|
|
625
|
-
badge: {
|
|
626
|
-
bg: "var(--color-badge-bg)",
|
|
627
|
-
dot: "var(--color-badge-dot)",
|
|
628
|
-
fg: "var(--color-badge-fg)",
|
|
629
|
-
icon: "var(--color-badge-icon)",
|
|
630
|
-
...theme.THEME_COLOR_STATE_TONES.reduce((acc, tone) => ({
|
|
631
|
-
...acc,
|
|
632
|
-
[tone]: {
|
|
633
|
-
bg: `var(--color-badge-${tone}-bg)`,
|
|
634
|
-
dot: `var(--color-badge-${tone}-dot)`,
|
|
635
|
-
fg: `var(--color-badge-${tone}-fg)`,
|
|
636
|
-
icon: `var(--color-badge-${tone}-icon)`
|
|
637
|
-
}
|
|
638
|
-
}), {})
|
|
639
|
-
},
|
|
640
|
-
bg: "var(--color-bg)",
|
|
641
|
-
border: "var(--color-border)",
|
|
642
|
-
code: {
|
|
643
|
-
bg: "var(--color-code-bg)",
|
|
644
|
-
fg: "var(--color-code-fg)"
|
|
645
|
-
},
|
|
646
|
-
fg: "var(--color-fg)",
|
|
647
|
-
icon: "var(--color-icon)",
|
|
648
|
-
input: {
|
|
649
|
-
...theme.THEME_COLOR_INPUT_MODES.reduce((acc, mode) => ({
|
|
650
|
-
...acc,
|
|
651
|
-
[mode]: {
|
|
652
|
-
...theme.THEME_COLOR_INPUT_STATES.reduce((acc2, state) => ({
|
|
653
|
-
...acc2,
|
|
654
|
-
[state]: {
|
|
655
|
-
bg: "var(--color-bg)",
|
|
656
|
-
border: "var(--color-border)",
|
|
657
|
-
fg: "var(--color-fg)",
|
|
658
|
-
muted: {
|
|
659
|
-
fg: "var(--color-muted-fg)"
|
|
660
|
-
},
|
|
661
|
-
placeholder: "var(--color-placeholder)"
|
|
662
|
-
}
|
|
663
|
-
}), {})
|
|
664
|
-
}
|
|
665
|
-
}), {})
|
|
666
|
-
},
|
|
667
|
-
kbd: {
|
|
668
|
-
bg: "var(--color-kbd-bg)",
|
|
669
|
-
border: "var(--color-kbd-border)",
|
|
670
|
-
fg: "var(--color-kbd-fg)"
|
|
671
|
-
},
|
|
672
|
-
link: {
|
|
673
|
-
fg: "var(--color-link-fg)"
|
|
674
|
-
},
|
|
675
|
-
muted: {
|
|
676
|
-
bg: "var(--color-muted-bg)",
|
|
677
|
-
fg: "var(--color-muted-fg)"
|
|
678
|
-
},
|
|
679
|
-
shadow: {
|
|
680
|
-
outline: "var(--color-shadow-outline)",
|
|
681
|
-
umbra: "var(--color-shadow-umbra)",
|
|
682
|
-
penumbra: "var(--color-shadow-penumbra)",
|
|
683
|
-
ambient: "var(--color-shadow-ambient)"
|
|
684
|
-
},
|
|
685
|
-
skeleton: {
|
|
686
|
-
from: "var(--color-skeleton-from)",
|
|
687
|
-
to: "var(--color-skeleton-to)"
|
|
688
|
-
},
|
|
689
|
-
syntax: {
|
|
690
|
-
atrule: "var(--color-syntax-atrule)",
|
|
691
|
-
attrName: "var(--color-syntax-attrName)",
|
|
692
|
-
attrValue: "var(--color-syntax-attrValue)",
|
|
693
|
-
attribute: "var(--color-syntax-attribute)",
|
|
694
|
-
boolean: "var(--color-syntax-boolean)",
|
|
695
|
-
builtin: "var(--color-syntax-builtin)",
|
|
696
|
-
cdata: "var(--color-syntax-cdata)",
|
|
697
|
-
char: "var(--color-syntax-char)",
|
|
698
|
-
class: "var(--color-syntax-class)",
|
|
699
|
-
className: "var(--color-syntax-className)",
|
|
700
|
-
comment: "var(--color-syntax-comment)",
|
|
701
|
-
constant: "var(--color-syntax-constant)",
|
|
702
|
-
deleted: "var(--color-syntax-deleted)",
|
|
703
|
-
doctype: "var(--color-syntax-doctype)",
|
|
704
|
-
entity: "var(--color-syntax-entity)",
|
|
705
|
-
function: "var(--color-syntax-function)",
|
|
706
|
-
hexcode: "var(--color-syntax-hexcode)",
|
|
707
|
-
id: "var(--color-syntax-id)",
|
|
708
|
-
important: "var(--color-syntax-important)",
|
|
709
|
-
inserted: "var(--color-syntax-inserted)",
|
|
710
|
-
keyword: "var(--color-syntax-keyword)",
|
|
711
|
-
number: "var(--color-syntax-number)",
|
|
712
|
-
operator: "var(--color-syntax-operator)",
|
|
713
|
-
prolog: "var(--color-syntax-prolog)",
|
|
714
|
-
property: "var(--color-syntax-property)",
|
|
715
|
-
pseudoClass: "var(--color-syntax-pseudoClass)",
|
|
716
|
-
pseudoElement: "var(--color-syntax-pseudoElement)",
|
|
717
|
-
punctuation: "var(--color-syntax-punctuation)",
|
|
718
|
-
regex: "var(--color-syntax-regex)",
|
|
719
|
-
selector: "var(--color-syntax-selector)",
|
|
720
|
-
string: "var(--color-syntax-string)",
|
|
721
|
-
symbol: "var(--color-syntax-symbol)",
|
|
722
|
-
tag: "var(--color-syntax-tag)",
|
|
723
|
-
unit: "var(--color-syntax-unit)",
|
|
724
|
-
url: "var(--color-syntax-url)",
|
|
725
|
-
variable: "var(--color-syntax-variable)"
|
|
726
|
-
}
|
|
727
|
-
},
|
|
728
|
-
space: Object.fromEntries(
|
|
729
|
-
theme.SPACE.map((space) => [space, `var(${varNames.space[space]})`])
|
|
730
|
-
)
|
|
731
|
-
};
|
|
732
|
-
function buildColorCardVars(props) {
|
|
733
|
-
const { scheme, tone } = props, prefix = `--color-${scheme}-${tone}`;
|
|
734
|
-
return {
|
|
735
|
-
accent: {
|
|
736
|
-
fg: `var(${prefix}-accent-fg)`
|
|
737
|
-
},
|
|
738
|
-
avatar: {
|
|
739
|
-
...theme.THEME_COLOR_AVATAR_COLORS.reduce((acc, color) => ({
|
|
740
|
-
...acc,
|
|
741
|
-
[color]: {
|
|
742
|
-
bg: `var(${prefix}-avatar-${color}-bg)`,
|
|
743
|
-
fg: `var(${prefix}-avatar-${color}-fg)`
|
|
744
|
-
}
|
|
745
|
-
}), {})
|
|
746
|
-
},
|
|
747
|
-
backdrop: `var(${prefix}-backdrop)`,
|
|
748
|
-
badge: {
|
|
749
|
-
...theme.THEME_COLOR_STATE_TONES.reduce((acc, tone2) => ({
|
|
750
|
-
...acc,
|
|
751
|
-
[tone2]: {
|
|
752
|
-
bg: `var(${prefix}-badge-${tone2}-bg)`,
|
|
753
|
-
dot: `var(${prefix}-badge-${tone2}-dot)`,
|
|
754
|
-
fg: `var(${prefix}-badge-${tone2}-fg)`,
|
|
755
|
-
icon: `var(${prefix}-badge-${tone2}-icon)`
|
|
756
|
-
}
|
|
757
|
-
}), {})
|
|
758
|
-
},
|
|
759
|
-
bg: `var(${prefix}-bg)`,
|
|
760
|
-
border: `var(${prefix}-border)`,
|
|
761
|
-
code: {
|
|
762
|
-
bg: `var(${prefix}-code-bg)`,
|
|
763
|
-
fg: `var(${prefix}-code-fg)`
|
|
764
|
-
},
|
|
765
|
-
fg: `var(${prefix}-fg)`,
|
|
766
|
-
focusRing: `var(${prefix}-focus-ring)`,
|
|
767
|
-
icon: `var(${prefix}-icon)`,
|
|
768
|
-
input: {
|
|
769
|
-
...theme.THEME_COLOR_INPUT_MODES.reduce((acc, mode) => ({
|
|
770
|
-
...acc,
|
|
771
|
-
[mode]: {
|
|
772
|
-
...theme.THEME_COLOR_INPUT_STATES.reduce((acc2, state) => ({
|
|
773
|
-
...acc2,
|
|
774
|
-
[state]: buildColorInputStateVars({ mode, scheme, state, tone })
|
|
775
|
-
}), {})
|
|
776
|
-
}
|
|
777
|
-
}), {})
|
|
778
|
-
},
|
|
779
|
-
kbd: {
|
|
780
|
-
bg: `var(${prefix}-kbd-bg)`,
|
|
781
|
-
border: `var(${prefix}-kbd-border)`,
|
|
782
|
-
fg: `var(${prefix}-kbd-fg)`
|
|
783
|
-
},
|
|
784
|
-
link: {
|
|
785
|
-
fg: `var(${prefix}-link-fg)`
|
|
786
|
-
},
|
|
787
|
-
muted: {
|
|
788
|
-
bg: `var(${prefix}-muted-bg)`,
|
|
789
|
-
fg: `var(${prefix}-muted-fg)`
|
|
790
|
-
},
|
|
791
|
-
skeleton: {
|
|
792
|
-
from: `var(${prefix}-skeleton-from)`,
|
|
793
|
-
to: `var(${prefix}-skeleton-to)`
|
|
794
|
-
},
|
|
795
|
-
shadow: {
|
|
796
|
-
outline: `var(${prefix}-shadow-outline)`,
|
|
797
|
-
umbra: `var(${prefix}-shadow-umbra)`,
|
|
798
|
-
penumbra: `var(${prefix}-shadow-penumbra)`,
|
|
799
|
-
ambient: `var(${prefix}-shadow-ambient)`
|
|
800
|
-
},
|
|
801
|
-
syntax: {
|
|
802
|
-
atrule: `var(${prefix}-syntax-atrule)`,
|
|
803
|
-
attrName: `var(${prefix}-syntax-attrName)`,
|
|
804
|
-
attrValue: `var(${prefix}-syntax-attrValue)`,
|
|
805
|
-
attribute: `var(${prefix}-syntax-attribute)`,
|
|
806
|
-
boolean: `var(${prefix}-syntax-boolean)`,
|
|
807
|
-
builtin: `var(${prefix}-syntax-builtin)`,
|
|
808
|
-
cdata: `var(${prefix}-syntax-cdata)`,
|
|
809
|
-
char: `var(${prefix}-syntax-char)`,
|
|
810
|
-
class: `var(${prefix}-syntax-class)`,
|
|
811
|
-
className: `var(${prefix}-syntax-className)`,
|
|
812
|
-
comment: `var(${prefix}-syntax-comment)`,
|
|
813
|
-
constant: `var(${prefix}-syntax-constant)`,
|
|
814
|
-
deleted: `var(${prefix}-syntax-deleted)`,
|
|
815
|
-
doctype: `var(${prefix}-syntax-doctype)`,
|
|
816
|
-
entity: `var(${prefix}-syntax-entity)`,
|
|
817
|
-
function: `var(${prefix}-syntax-function)`,
|
|
818
|
-
hexcode: `var(${prefix}-syntax-hexcode)`,
|
|
819
|
-
id: `var(${prefix}-syntax-id)`,
|
|
820
|
-
important: `var(${prefix}-syntax-important)`,
|
|
821
|
-
inserted: `var(${prefix}-syntax-inserted)`,
|
|
822
|
-
keyword: `var(${prefix}-syntax-keyword)`,
|
|
823
|
-
number: `var(${prefix}-syntax-number)`,
|
|
824
|
-
operator: `var(${prefix}-syntax-operator)`,
|
|
825
|
-
prolog: `var(${prefix}-syntax-prolog)`,
|
|
826
|
-
property: `var(${prefix}-syntax-property)`,
|
|
827
|
-
pseudoClass: `var(${prefix}-syntax-pseudoClass)`,
|
|
828
|
-
pseudoElement: `var(${prefix}-syntax-pseudoElement)`,
|
|
829
|
-
punctuation: `var(${prefix}-syntax-punctuation)`,
|
|
830
|
-
regex: `var(${prefix}-syntax-regex)`,
|
|
831
|
-
selector: `var(${prefix}-syntax-selector)`,
|
|
832
|
-
string: `var(${prefix}-syntax-string)`,
|
|
833
|
-
symbol: `var(${prefix}-syntax-symbol)`,
|
|
834
|
-
tag: `var(${prefix}-syntax-tag)`,
|
|
835
|
-
unit: `var(${prefix}-syntax-unit)`,
|
|
836
|
-
url: `var(${prefix}-syntax-url)`,
|
|
837
|
-
variable: `var(${prefix}-syntax-variable)`
|
|
838
|
-
}
|
|
839
|
-
};
|
|
840
|
-
}
|
|
841
|
-
function buildColorInputStateVars(props) {
|
|
842
|
-
const { mode, scheme, state, tone } = props, prefix = `--color-${scheme}-${tone}-input-${mode}-${state}`;
|
|
843
|
-
return {
|
|
844
|
-
bg: `var(${prefix}-bg)`,
|
|
845
|
-
border: `var(${prefix}-border)`,
|
|
846
|
-
fg: `var(${prefix}-fg)`,
|
|
847
|
-
muted: {
|
|
848
|
-
bg: `var(${prefix}-muted-bg)`
|
|
849
|
-
},
|
|
850
|
-
placeholder: `var(${prefix}-placeholder)`
|
|
851
|
-
};
|
|
852
|
-
}
|
|
853
|
-
const badgeRules = {
|
|
854
|
-
badge: {
|
|
855
|
-
backgroundColor: vars.color.badge.bg,
|
|
856
|
-
color: vars.color.badge.fg,
|
|
857
|
-
verticalAlign: "top"
|
|
858
|
-
},
|
|
859
|
-
...theme.THEME_COLOR_STATE_TONES.reduce(
|
|
860
|
-
(acc, tone) => ({
|
|
861
|
-
...acc,
|
|
862
|
-
[`badge-${tone}`]: {
|
|
863
|
-
[varNames.color.badge.bg]: vars.color.badge[tone].bg,
|
|
864
|
-
[varNames.color.badge.dot]: vars.color.badge[tone].dot,
|
|
865
|
-
[varNames.color.badge.fg]: vars.color.badge[tone].fg,
|
|
866
|
-
[varNames.color.badge.icon]: vars.color.badge[tone].icon
|
|
867
|
-
}
|
|
868
|
-
}),
|
|
869
|
-
{}
|
|
870
|
-
)
|
|
871
|
-
}, boxRules = {
|
|
872
|
-
box: {
|
|
873
|
-
minWidth: 0,
|
|
874
|
-
minHeight: 0,
|
|
875
|
-
"@nest": {
|
|
876
|
-
// 'ul.&, ol.&': {
|
|
877
|
-
'&[data-as="ul"], &[data-as="ol"]': {
|
|
878
|
-
listStyle: "none"
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
},
|
|
882
|
-
// sizing
|
|
883
|
-
"box-content": {
|
|
884
|
-
boxSizing: "content-box"
|
|
885
|
-
},
|
|
886
|
-
"box-border": {
|
|
887
|
-
boxSizing: "border-box"
|
|
888
|
-
}
|
|
889
|
-
}, buttonRules = {
|
|
890
|
-
button: {
|
|
891
|
-
WebkitFontSmoothing: "inherit",
|
|
892
|
-
appearance: "none",
|
|
893
|
-
display: "inline-flex",
|
|
894
|
-
alignItems: "center",
|
|
895
|
-
font: "inherit",
|
|
896
|
-
outline: "none",
|
|
897
|
-
userSelect: "none",
|
|
898
|
-
textDecoration: "none",
|
|
899
|
-
border: 0,
|
|
900
|
-
boxSizing: "border-box",
|
|
901
|
-
padding: 0,
|
|
902
|
-
overflow: "hidden",
|
|
903
|
-
margin: 0,
|
|
904
|
-
textAlign: "left",
|
|
905
|
-
position: "relative",
|
|
906
|
-
verticalAlign: "top",
|
|
907
|
-
backgroundColor: "var(--card-bg-color)",
|
|
908
|
-
color: "var(--card-fg-color)"
|
|
909
|
-
},
|
|
910
|
-
// variants
|
|
911
|
-
...theme.THEME_COLOR_BUTTON_MODES.reduce((acc, mode) => ({
|
|
912
|
-
...acc,
|
|
913
|
-
[`button-mode-${mode}`]: {
|
|
914
|
-
"@nest": theme.THEME_COLOR_STATE_TONES.reduce((acc2, tone) => ({
|
|
915
|
-
...acc2,
|
|
916
|
-
[`&.button-tone-${tone}`]: {
|
|
917
|
-
"--card-bg-color": `var(--card-button-${mode}-${tone}-enabled-bg-color, rgba(127, 127, 127, 0.1))`,
|
|
918
|
-
"--card-fg-color": `var(--card-button-${mode}-${tone}-enabled-fg-color, currentColor)`
|
|
919
|
-
}
|
|
920
|
-
}), {})
|
|
921
|
-
}
|
|
922
|
-
}), {}),
|
|
923
|
-
"button-loading-box": {
|
|
924
|
-
position: "absolute",
|
|
925
|
-
top: 0,
|
|
926
|
-
left: 0,
|
|
927
|
-
right: 0,
|
|
928
|
-
bottom: 0,
|
|
929
|
-
// display: 'flex',
|
|
930
|
-
// alignItems: 'center',
|
|
931
|
-
// justifyContent: 'center',
|
|
932
|
-
backgroundColor: "var(--card-bg-color)",
|
|
933
|
-
borderRadius: "inherit",
|
|
934
|
-
zIndex: 1
|
|
935
|
-
// boxShadow: 'inherit',
|
|
936
|
-
}
|
|
937
|
-
}, cardRules = {
|
|
938
|
-
card: {
|
|
939
|
-
backgroundColor: "var(--card-bg-color)",
|
|
940
|
-
color: "var(--card-fg-color)",
|
|
941
|
-
/* deprecated variables (kept for legacy) */
|
|
942
|
-
"--card-accent-fg-color": "var(--color-accent-fg)",
|
|
943
|
-
...theme.THEME_COLOR_AVATAR_COLORS.reduce((acc, color) => ({
|
|
944
|
-
...acc,
|
|
945
|
-
[`--card-avatar-${color}-bg-color`]: `var(--color-avatar-${color}-bg)`,
|
|
946
|
-
[`--card-avatar-${color}-fg-color`]: `var(--color-avatar-${color}-fg)`
|
|
947
|
-
}), {}),
|
|
948
|
-
"--card-backdrop-color": "var(--color-backdrop)",
|
|
949
|
-
...theme.THEME_COLOR_STATE_TONES.reduce((acc, tone) => ({
|
|
950
|
-
...acc,
|
|
951
|
-
[`--card-badge-${tone}-bg-color`]: `var(--color-badge-${tone}-bg)`,
|
|
952
|
-
[`--card-badge-${tone}-dot-color`]: `var(--color-badge-${tone}-dot)`,
|
|
953
|
-
[`--card-badge-${tone}-fg-color`]: `var(--color-badge-${tone}-fg)`,
|
|
954
|
-
[`--card-badge-${tone}-icon-color`]: `var(--color-badge-${tone}-icon)`
|
|
955
|
-
}), {}),
|
|
956
|
-
"--card-bg-color": "var(--color-bg)",
|
|
957
|
-
"--card-border-color": "var(--color-border)",
|
|
958
|
-
"--card-code-bg-color": "var(--color-code-bg)",
|
|
959
|
-
"--card-code-fg-color": "var(--color-code-fg)",
|
|
960
|
-
"--card-fg-color": "var(--color-fg)",
|
|
961
|
-
"--card-focus-ring-color": "var(--color-focus-ring)",
|
|
962
|
-
"--card-icon-color": "var(--color-icon)",
|
|
963
|
-
"--card-kbd-bg-color": "var(--color-kbd-bg)",
|
|
964
|
-
"--card-kbd-border-color": "var(--color-kbd-border)",
|
|
965
|
-
"--card-kbd-fg-color": "var(--color-kbd-fg)",
|
|
966
|
-
"--card-link-fg-color": "var(--color-link-fg)",
|
|
967
|
-
"--card-muted-bg-color": "var(--color-muted-bg)",
|
|
968
|
-
"--card-muted-fg-color": "var(--color-muted-fg)",
|
|
969
|
-
"--card-shadow-outline-color": "var(--color-shadow-outline)",
|
|
970
|
-
"--card-shadow-umbra-color": "var(--color-shadow-umbra)",
|
|
971
|
-
"--card-shadow-penumbra-color": "var(--color-shadow-penumbra)",
|
|
972
|
-
"--card-shadow-ambient-color": "var(--color-shadow-ambient)",
|
|
973
|
-
"--card-skeleton-from-color": "var(--color-skeleton-from)",
|
|
974
|
-
"--card-skeleton-to-color": "var(--color-skeleton-to)",
|
|
975
|
-
/*
|
|
976
|
-
'--card-bg-image': checkered
|
|
977
|
-
? `repeating-conic-gradient(${color.bg} 0% 25%, ${color.muted.bg} 0% 50%)`
|
|
978
|
-
: undefined,
|
|
979
|
-
|
|
980
|
-
'--card-bg-image': checkered
|
|
981
|
-
? `repeating-conic-gradient(${color.bg} 0% 25%, ${color.muted.bg} 0% 50%)`
|
|
982
|
-
: undefined,
|
|
983
|
-
|
|
984
|
-
'--card-bg2-color': color.muted.bg,
|
|
985
|
-
'--card-link-color': color.link.fg,
|
|
986
|
-
'--card-hairline-soft-color': color.border,
|
|
987
|
-
'--card-hairline-hard-color': color.border, */
|
|
988
|
-
"@nest": {
|
|
989
|
-
'&[data-as="button"]': {
|
|
990
|
-
WebkitFontSmoothing: "inherit",
|
|
991
|
-
appearance: "none",
|
|
992
|
-
outline: "none",
|
|
993
|
-
font: "inherit",
|
|
994
|
-
textAlign: "inherit",
|
|
995
|
-
border: 0,
|
|
996
|
-
width: ["-moz-available", "-webkit-fill-available", "stretch"]
|
|
997
|
-
},
|
|
998
|
-
'&[data-as="a"]': {
|
|
999
|
-
outline: "none",
|
|
1000
|
-
textDecoration: "none"
|
|
1001
|
-
},
|
|
1002
|
-
'&[data-as="pre"]': {
|
|
1003
|
-
font: "inherit"
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
}, checkboxRules = {
|
|
1008
|
-
checkbox: {
|
|
1009
|
-
position: "relative",
|
|
1010
|
-
display: "inline-block"
|
|
1011
|
-
},
|
|
1012
|
-
"checkbox-input": {
|
|
1013
|
-
position: "absolute",
|
|
1014
|
-
top: 0,
|
|
1015
|
-
left: 0,
|
|
1016
|
-
width: "100%",
|
|
1017
|
-
height: "100%",
|
|
1018
|
-
outline: "none",
|
|
1019
|
-
opacity: 0,
|
|
1020
|
-
zIndex: 1,
|
|
1021
|
-
padding: 0,
|
|
1022
|
-
margin: 0,
|
|
1023
|
-
"@nest": {
|
|
1024
|
-
"& + span": {
|
|
1025
|
-
position: "relative",
|
|
1026
|
-
display: "block",
|
|
1027
|
-
width: "var(--input-checkbox-size)",
|
|
1028
|
-
height: "var(--input-checkbox-size)",
|
|
1029
|
-
boxSizing: "border-box",
|
|
1030
|
-
borderRadius: "var(--radius-2)",
|
|
1031
|
-
lineHeight: 1,
|
|
1032
|
-
backgroundColor: "var(--color-checkbox-bg)",
|
|
1033
|
-
boxShadow: "inset 0 0 0 1px var(--color-checkbox-border)",
|
|
1034
|
-
color: "var(--color-checkbox-fg)",
|
|
1035
|
-
"--color-checkbox-bg": "var(--color-input-default-enabled-bg)",
|
|
1036
|
-
"--color-checkbox-border": "var(--color-input-default-enabled-border)",
|
|
1037
|
-
"--color-checkbox-fg": "var(--color-input-default-enabled-fg)"
|
|
1038
|
-
// box-shadow: ${focusRingBorderStyle({
|
|
1039
|
-
// color: color.input.default.enabled.border,
|
|
1040
|
-
// width: input.border.width,
|
|
1041
|
-
// })},
|
|
1042
|
-
},
|
|
1043
|
-
"& + span > svg": {
|
|
1044
|
-
display: "block",
|
|
1045
|
-
position: "absolute",
|
|
1046
|
-
opacity: 0,
|
|
1047
|
-
height: "100%",
|
|
1048
|
-
width: "100%"
|
|
1049
|
-
},
|
|
1050
|
-
"& + span > svg > path": {
|
|
1051
|
-
vectorEffect: "non-scaling-stroke",
|
|
1052
|
-
strokeWidth: "1.5px !important"
|
|
1053
|
-
},
|
|
1054
|
-
"&:checked + span": {
|
|
1055
|
-
"--color-checkbox-bg": "var(--color-input-default-enabled-fg)",
|
|
1056
|
-
"--color-checkbox-border": "var(--color-input-default-enabled-fg)",
|
|
1057
|
-
"--color-checkbox-fg": "var(--color-input-default-enabled-bg)"
|
|
1058
|
-
// box-shadow: ${focusRingBorderStyle({
|
|
1059
|
-
// color: color.input.default.enabled.fg,
|
|
1060
|
-
// width: input.border.width,
|
|
1061
|
-
// })},
|
|
1062
|
-
},
|
|
1063
|
-
"&:checked + span > svg:first-child": {
|
|
1064
|
-
opacity: 1
|
|
1065
|
-
},
|
|
1066
|
-
// focus
|
|
1067
|
-
"&:not(:disabled):focus:focus-visible + span": {
|
|
1068
|
-
// box-shadow: ${focusRingStyle({focusRing})},
|
|
1069
|
-
},
|
|
1070
|
-
// focus when checked - uses a different offset
|
|
1071
|
-
"&:not(:disabled):focus:focus-visible&:checked + span": {
|
|
1072
|
-
// box-shadow: ${focusRingStyle({focusRing: {width: 1, offset: 1}})},
|
|
1073
|
-
},
|
|
1074
|
-
"&[data-error] + span": {
|
|
1075
|
-
"--color-checkbox-bg": "var(--color-input-invalid-enabled-border)",
|
|
1076
|
-
"--color-checkbox-border": "var(--color-input-invalid-enabled-bg)",
|
|
1077
|
-
"--color-checkbox-fg": "var(--color-input-invalid-enabled-fg)"
|
|
1078
|
-
// box-shadow: ${focusRingBorderStyle({
|
|
1079
|
-
// width: input.border.width,
|
|
1080
|
-
// color: color.input.invalid.enabled.muted.bg,
|
|
1081
|
-
// })},
|
|
1082
|
-
},
|
|
1083
|
-
"&[data-error]:checked + span": {
|
|
1084
|
-
"--color-checkbox-bg": "var(--color-input-invalid-enabled-muted-bg)",
|
|
1085
|
-
"--color-checkbox-fg": "var(--color-input-invalid-enabled-bg)"
|
|
1086
|
-
},
|
|
1087
|
-
"&[data-error]:checked:not(:disabled):focus:focus-visible + span": {
|
|
1088
|
-
"--color-checkbox-border": "var(--color-input-invalid-readOnly-muted-bg)"
|
|
1089
|
-
// box-shadow: ${focusRingStyle({
|
|
1090
|
-
// border: {width: input.border.width, color: color.input.invalid.readOnly.muted.bg},
|
|
1091
|
-
// focusRing: {width: 1, offset: 1},
|
|
1092
|
-
// })},
|
|
1093
|
-
},
|
|
1094
|
-
"&:disabled + span": {
|
|
1095
|
-
"--color-checkbox-bg": "var(--color-input-default-disabled-bg)",
|
|
1096
|
-
"--color-checkbox-border": "var(--color-input-default-disabled-border)",
|
|
1097
|
-
"--color-checkbox-fg": "var(--color-input-default-disabled-fg)"
|
|
1098
|
-
// box-shadow: ${focusRingBorderStyle({
|
|
1099
|
-
// width: input.border.width,
|
|
1100
|
-
// color: color.input.default.disabled.border,
|
|
1101
|
-
// })},
|
|
1102
|
-
},
|
|
1103
|
-
"&:disabled:checked + span": {
|
|
1104
|
-
"--color-checkbox-bg": "var(--color-input-default-disabled-muted-bg)"
|
|
1105
|
-
},
|
|
1106
|
-
"&[data-read-only] + span": {
|
|
1107
|
-
"--color-checkbox-bg": "var(--color-input-default-readOnly-bg)",
|
|
1108
|
-
"--color-checkbox-border": "var(--color-input-default-readOnly-border)",
|
|
1109
|
-
"--color-checkbox-fg": "var(--color-input-default-readOnly-fg)"
|
|
1110
|
-
// box-shadow: ${focusRingBorderStyle({
|
|
1111
|
-
// width: input.border.width,
|
|
1112
|
-
// color: color.input.default.readOnly.border,
|
|
1113
|
-
// })},
|
|
1114
|
-
},
|
|
1115
|
-
"&[data-read-only]:checked + span": {
|
|
1116
|
-
"--color-checkbox-bg": "var(--color-input-default-readOnly-muted-bg)"
|
|
1117
|
-
},
|
|
1118
|
-
"&:indeterminate + span > svg:last-child": {
|
|
1119
|
-
opacity: 1
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
}, codeRules = {
|
|
1124
|
-
code: {
|
|
1125
|
-
"--font-weight-regular": "var(--font-code-weight-regular)",
|
|
1126
|
-
"--font-weight-medium": "var(--font-code-weight-medium)",
|
|
1127
|
-
"--font-weight-semibold": "var(--font-code-weight-semibold)",
|
|
1128
|
-
"--font-weight-bold": "var(--font-code-weight-bold)",
|
|
1129
|
-
"--font-family": "var(--font-code-family)",
|
|
1130
|
-
color: "var(--color-fg)",
|
|
1131
|
-
"@nest": {
|
|
1132
|
-
"& > code": {
|
|
1133
|
-
font: "inherit"
|
|
1134
|
-
},
|
|
1135
|
-
"& a": {
|
|
1136
|
-
color: "var(--color-link-fg)",
|
|
1137
|
-
textDecoration: "none"
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
},
|
|
1141
|
-
...responsiveRules("code-0", {
|
|
1142
|
-
"--font-size": "var(--font-code-0-size)",
|
|
1143
|
-
"--font-line-height": "var(--font-code-0-line-height)",
|
|
1144
|
-
"--font-letter-spacing": "var(--font-code-0-letter-spacing)",
|
|
1145
|
-
"--font-icon-size": "var(--font-code-0-icon-size)",
|
|
1146
|
-
"--font-ascender-height": "var(--font-code-0-ascender-height)",
|
|
1147
|
-
"--font-descender-height": "var(--font-code-0-descender-height)"
|
|
1148
|
-
}),
|
|
1149
|
-
...responsiveRules("code-1", {
|
|
1150
|
-
"--font-size": "var(--font-code-1-size)",
|
|
1151
|
-
"--font-line-height": "var(--font-code-1-line-height)",
|
|
1152
|
-
"--font-letter-spacing": "var(--font-code-1-letter-spacing)",
|
|
1153
|
-
"--font-icon-size": "var(--font-code-1-icon-size)",
|
|
1154
|
-
"--font-ascender-height": "var(--font-code-1-ascender-height)",
|
|
1155
|
-
"--font-descender-height": "var(--font-code-1-descender-height)"
|
|
1156
|
-
}),
|
|
1157
|
-
...responsiveRules("code-2", {
|
|
1158
|
-
"--font-size": "var(--font-code-2-size)",
|
|
1159
|
-
"--font-line-height": "var(--font-code-2-line-height)",
|
|
1160
|
-
"--font-letter-spacing": "var(--font-code-2-letter-spacing)",
|
|
1161
|
-
"--font-icon-size": "var(--font-code-2-icon-size)",
|
|
1162
|
-
"--font-ascender-height": "var(--font-code-2-ascender-height)",
|
|
1163
|
-
"--font-descender-height": "var(--font-code-2-descender-height)"
|
|
1164
|
-
}),
|
|
1165
|
-
...responsiveRules("code-3", {
|
|
1166
|
-
"--font-size": "var(--font-code-3-size)",
|
|
1167
|
-
"--font-line-height": "var(--font-code-3-line-height)",
|
|
1168
|
-
"--font-letter-spacing": "var(--font-code-3-letter-spacing)",
|
|
1169
|
-
"--font-icon-size": "var(--font-code-3-icon-size)",
|
|
1170
|
-
"--font-ascender-height": "var(--font-code-3-ascender-height)",
|
|
1171
|
-
"--font-descender-height": "var(--font-code-3-descender-height)"
|
|
1172
|
-
}),
|
|
1173
|
-
...responsiveRules("code-4", {
|
|
1174
|
-
"--font-size": "var(--font-code-4-size)",
|
|
1175
|
-
"--font-line-height": "var(--font-code-4-line-height)",
|
|
1176
|
-
"--font-letter-spacing": "var(--font-code-4-letter-spacing)",
|
|
1177
|
-
"--font-icon-size": "var(--font-code-4-icon-size)",
|
|
1178
|
-
"--font-ascender-height": "var(--font-code-4-ascender-height)",
|
|
1179
|
-
"--font-descender-height": "var(--font-code-4-descender-height)"
|
|
1180
|
-
})
|
|
1181
|
-
}, containerRules = {
|
|
1182
|
-
container: {
|
|
1183
|
-
margin: "0 auto",
|
|
1184
|
-
width: "100%"
|
|
1185
|
-
}
|
|
1186
|
-
}, headingRules = {
|
|
1187
|
-
heading: {
|
|
1188
|
-
"--font-weight-regular": "var(--font-heading-weight-regular)",
|
|
1189
|
-
"--font-weight-medium": "var(--font-heading-weight-medium)",
|
|
1190
|
-
"--font-weight-semibold": "var(--font-heading-weight-semibold)",
|
|
1191
|
-
"--font-weight-bold": "var(--font-heading-weight-bold)",
|
|
1192
|
-
"--font-family": "var(--font-heading-family)",
|
|
1193
|
-
color: "var(--color-fg)",
|
|
1194
|
-
"@nest": {
|
|
1195
|
-
"& a": {
|
|
1196
|
-
color: "var(--color-link-fg)",
|
|
1197
|
-
textDecoration: "none"
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
},
|
|
1201
|
-
"heading-accent": {
|
|
1202
|
-
"--fg-color": "var(--color-accent-fg)"
|
|
1203
|
-
},
|
|
1204
|
-
"heading-muted": {
|
|
1205
|
-
"--fg-color": "var(--color-muted-fg)"
|
|
1206
|
-
},
|
|
1207
|
-
...responsiveRules("heading-0", {
|
|
1208
|
-
"--font-size": "var(--font-heading-0-size)",
|
|
1209
|
-
"--font-line-height": "var(--font-heading-0-line-height)",
|
|
1210
|
-
"--font-letter-spacing": "var(--font-heading-0-letter-spacing)",
|
|
1211
|
-
"--font-icon-size": "var(--font-heading-0-icon-size)",
|
|
1212
|
-
"--font-ascender-height": "var(--font-heading-0-ascender-height)",
|
|
1213
|
-
"--font-descender-height": "var(--font-heading-0-descender-height)"
|
|
1214
|
-
}),
|
|
1215
|
-
...responsiveRules("heading-1", {
|
|
1216
|
-
"--font-size": "var(--font-heading-1-size)",
|
|
1217
|
-
"--font-line-height": "var(--font-heading-1-line-height)",
|
|
1218
|
-
"--font-letter-spacing": "var(--font-heading-1-letter-spacing)",
|
|
1219
|
-
"--font-icon-size": "var(--font-heading-1-icon-size)",
|
|
1220
|
-
"--font-ascender-height": "var(--font-heading-1-ascender-height)",
|
|
1221
|
-
"--font-descender-height": "var(--font-heading-1-descender-height)"
|
|
1222
|
-
}),
|
|
1223
|
-
...responsiveRules("heading-2", {
|
|
1224
|
-
"--font-size": "var(--font-heading-2-size)",
|
|
1225
|
-
"--font-line-height": "var(--font-heading-2-line-height)",
|
|
1226
|
-
"--font-letter-spacing": "var(--font-heading-2-letter-spacing)",
|
|
1227
|
-
"--font-icon-size": "var(--font-heading-2-icon-size)",
|
|
1228
|
-
"--font-ascender-height": "var(--font-heading-2-ascender-height)",
|
|
1229
|
-
"--font-descender-height": "var(--font-heading-2-descender-height)"
|
|
1230
|
-
}),
|
|
1231
|
-
...responsiveRules("heading-3", {
|
|
1232
|
-
"--font-size": "var(--font-heading-3-size)",
|
|
1233
|
-
"--font-line-height": "var(--font-heading-3-line-height)",
|
|
1234
|
-
"--font-letter-spacing": "var(--font-heading-3-letter-spacing)",
|
|
1235
|
-
"--font-icon-size": "var(--font-heading-3-icon-size)",
|
|
1236
|
-
"--font-ascender-height": "var(--font-label-3-ascender-height)",
|
|
1237
|
-
"--font-descender-height": "var(--font-label-3-descender-height)"
|
|
1238
|
-
}),
|
|
1239
|
-
...responsiveRules("heading-4", {
|
|
1240
|
-
"--font-size": "var(--font-heading-4-size)",
|
|
1241
|
-
"--font-line-height": "var(--font-heading-4-line-height)",
|
|
1242
|
-
"--font-letter-spacing": "var(--font-heading-4-letter-spacing)",
|
|
1243
|
-
"--font-icon-size": "var(--font-heading-4-icon-size)",
|
|
1244
|
-
"--font-ascender-height": "var(--font-heading-4-ascender-height)",
|
|
1245
|
-
"--font-descender-height": "var(--font-heading-4-descender-height)"
|
|
1246
|
-
}),
|
|
1247
|
-
...responsiveRules("heading-5", {
|
|
1248
|
-
"--font-size": "var(--font-heading-5-size)",
|
|
1249
|
-
"--font-line-height": "var(--font-heading-5-line-height)",
|
|
1250
|
-
"--font-letter-spacing": "var(--font-heading-5-letter-spacing)",
|
|
1251
|
-
"--font-icon-size": "var(--font-heading-5-icon-size)",
|
|
1252
|
-
"--font-ascender-height": "var(--font-heading-5-ascender-height)",
|
|
1253
|
-
"--font-descender-height": "var(--font-heading-5-descender-height)"
|
|
1254
|
-
})
|
|
1255
|
-
}, kbdRules = {
|
|
1256
|
-
kbd: {
|
|
1257
|
-
"--card-bg-color": "var(--card-kbd-bg-color)",
|
|
1258
|
-
"--card-border-color": "var(--card-kbd-border-color)",
|
|
1259
|
-
"--card-fg-color": "var(--card-kbd-fg-color)",
|
|
1260
|
-
boxShadow: "inset 0 0 0 1px var(--card-border-color)",
|
|
1261
|
-
background: "var(--card-bg-color)",
|
|
1262
|
-
font: "inherit",
|
|
1263
|
-
verticalAlign: "top",
|
|
1264
|
-
"@nest": {
|
|
1265
|
-
"&:not([hidden])": {
|
|
1266
|
-
display: "inline-block"
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
}, labelRules = {
|
|
1271
|
-
label: {
|
|
1272
|
-
"--font-weight-regular": "var(--font-label-weight-regular)",
|
|
1273
|
-
"--font-weight-medium": "var(--font-label-weight-medium)",
|
|
1274
|
-
"--font-weight-semibold": "var(--font-label-weight-semibold)",
|
|
1275
|
-
"--font-weight-bold": "var(--font-label-weight-bold)",
|
|
1276
|
-
"--font-family": "var(--font-label-family)",
|
|
1277
|
-
color: "var(--color-fg)",
|
|
1278
|
-
textTransform: "uppercase",
|
|
1279
|
-
"@nest": {
|
|
1280
|
-
"& a": {
|
|
1281
|
-
color: "var(--color-link-fg)",
|
|
1282
|
-
textDecoration: "none"
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
},
|
|
1286
|
-
"label-accent": {
|
|
1287
|
-
"--fg-color": "var(--color-accent-fg)"
|
|
1288
|
-
},
|
|
1289
|
-
"label-muted": {
|
|
1290
|
-
"--fg-color": "var(--color-muted-fg)"
|
|
1291
|
-
},
|
|
1292
|
-
...responsiveRules("label-0", {
|
|
1293
|
-
"--font-size": "var(--font-label-0-size)",
|
|
1294
|
-
"--font-line-height": "var(--font-label-0-line-height)",
|
|
1295
|
-
"--font-letter-spacing": "var(--font-label-0-letter-spacing)",
|
|
1296
|
-
"--font-icon-size": "var(--font-label-0-icon-size)",
|
|
1297
|
-
"--font-ascender-height": "var(--font-label-0-ascender-height)",
|
|
1298
|
-
"--font-descender-height": "var(--font-label-0-descender-height)"
|
|
1299
|
-
}),
|
|
1300
|
-
...responsiveRules("label-1", {
|
|
1301
|
-
"--font-size": "var(--font-label-1-size)",
|
|
1302
|
-
"--font-line-height": "var(--font-label-1-line-height)",
|
|
1303
|
-
"--font-letter-spacing": "var(--font-label-1-letter-spacing)",
|
|
1304
|
-
"--font-icon-size": "var(--font-label-1-icon-size)",
|
|
1305
|
-
"--font-ascender-height": "var(--font-label-1-ascender-height)",
|
|
1306
|
-
"--font-descender-height": "var(--font-label-1-descender-height)"
|
|
1307
|
-
}),
|
|
1308
|
-
...responsiveRules("label-2", {
|
|
1309
|
-
"--font-size": "var(--font-label-2-size)",
|
|
1310
|
-
"--font-line-height": "var(--font-label-2-line-height)",
|
|
1311
|
-
"--font-letter-spacing": "var(--font-label-2-letter-spacing)",
|
|
1312
|
-
"--font-icon-size": "var(--font-label-2-icon-size)",
|
|
1313
|
-
"--font-ascender-height": "var(--font-label-2-ascender-height)",
|
|
1314
|
-
"--font-descender-height": "var(--font-label-2-descender-height)"
|
|
1315
|
-
}),
|
|
1316
|
-
...responsiveRules("label-3", {
|
|
1317
|
-
"--font-size": "var(--font-label-3-size)",
|
|
1318
|
-
"--font-line-height": "var(--font-label-3-line-height)",
|
|
1319
|
-
"--font-letter-spacing": "var(--font-label-3-letter-spacing)",
|
|
1320
|
-
"--font-icon-size": "var(--font-label-3-icon-size)",
|
|
1321
|
-
"--font-ascender-height": "var(--font-label-3-ascender-height)",
|
|
1322
|
-
"--font-descender-height": "var(--font-label-3-descender-height)"
|
|
1323
|
-
}),
|
|
1324
|
-
...responsiveRules("label-4", {
|
|
1325
|
-
"--font-size": "var(--font-label-4-size)",
|
|
1326
|
-
"--font-line-height": "var(--font-label-4-line-height)",
|
|
1327
|
-
"--font-letter-spacing": "var(--font-label-4-letter-spacing)",
|
|
1328
|
-
"--font-icon-size": "var(--font-label-4-icon-size)",
|
|
1329
|
-
"--font-ascender-height": "var(--font-label-4-ascender-height)",
|
|
1330
|
-
"--font-descender-height": "var(--font-label-4-descender-height)"
|
|
1331
|
-
}),
|
|
1332
|
-
...responsiveRules("label-5", {
|
|
1333
|
-
"--font-size": "var(--font-label-5-size)",
|
|
1334
|
-
"--font-line-height": "var(--font-label-5-line-height)",
|
|
1335
|
-
"--font-letter-spacing": "var(--font-label-5-letter-spacing)",
|
|
1336
|
-
"--font-icon-size": "var(--font-label-5-icon-size)",
|
|
1337
|
-
"--font-ascender-height": "var(--font-label-5-ascender-height)",
|
|
1338
|
-
"--font-descender-height": "var(--font-label-5-descender-height)"
|
|
1339
|
-
})
|
|
1340
|
-
}, popoverRules = {
|
|
1341
|
-
//
|
|
1342
|
-
}, radioRules = {
|
|
1343
|
-
//
|
|
1344
|
-
}, selectRules = {
|
|
1345
|
-
//
|
|
1346
|
-
}, selectableRules = {
|
|
1347
|
-
selectable: {
|
|
1348
|
-
backgroundColor: "inherit",
|
|
1349
|
-
color: "inherit",
|
|
1350
|
-
"@nest": {
|
|
1351
|
-
'&[data-as="button"]': {
|
|
1352
|
-
WebkitFontSmoothing: "inherit",
|
|
1353
|
-
appearance: "none",
|
|
1354
|
-
outline: "none",
|
|
1355
|
-
font: "inherit",
|
|
1356
|
-
textAlign: "inherit",
|
|
1357
|
-
border: 0,
|
|
1358
|
-
// width: '-moz-available',
|
|
1359
|
-
// width: '-webkit-fill-available',
|
|
1360
|
-
width: "stretch"
|
|
1361
|
-
},
|
|
1362
|
-
/* &:is(a) */
|
|
1363
|
-
'&[data-as="a"]': {
|
|
1364
|
-
textDecoration: "none"
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
}, spinnerRules = {
|
|
1369
|
-
spinner: {
|
|
1370
|
-
"@keyframes": {
|
|
1371
|
-
"spinner-rotate": {
|
|
1372
|
-
from: {
|
|
1373
|
-
transform: "rotate(0deg)"
|
|
1374
|
-
},
|
|
1375
|
-
to: {
|
|
1376
|
-
transform: "rotate(360deg)"
|
|
1377
|
-
}
|
|
1378
|
-
}
|
|
1379
|
-
},
|
|
1380
|
-
"@nest": {
|
|
1381
|
-
"& > span > svg": {
|
|
1382
|
-
animation: "spinner-rotate 500ms linear infinite"
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
}
|
|
1386
|
-
}, switchRules = {
|
|
1387
|
-
switch: {},
|
|
1388
|
-
"switch-input": {
|
|
1389
|
-
position: "absolute",
|
|
1390
|
-
top: 0,
|
|
1391
|
-
right: 0,
|
|
1392
|
-
bottom: 0,
|
|
1393
|
-
left: 0,
|
|
1394
|
-
opacity: 0,
|
|
1395
|
-
height: "100%",
|
|
1396
|
-
width: "100%",
|
|
1397
|
-
outline: "none",
|
|
1398
|
-
padding: 0,
|
|
1399
|
-
margin: 0,
|
|
1400
|
-
/* Place the input element above the representation element */
|
|
1401
|
-
zIndex: 1
|
|
1402
|
-
},
|
|
1403
|
-
"switch-presentation": {
|
|
1404
|
-
// --switch-bg-color: ${color.input.default.enabled.border};
|
|
1405
|
-
// --switch-fg-color: ${color.input.default.enabled.bg};
|
|
1406
|
-
// --switch-box-shadow: none;
|
|
1407
|
-
// &:not([hidden]) {
|
|
1408
|
-
// display: block;
|
|
1409
|
-
// }
|
|
1410
|
-
// position: relative;
|
|
1411
|
-
// width: ${rem(input.switch.width)};
|
|
1412
|
-
// height: ${rem(input.switch.height)};
|
|
1413
|
-
// border-radius: ${rem(input.switch.height / 2)};
|
|
1414
|
-
// /* Make sure it’s not possible to interact with the wrapper element */
|
|
1415
|
-
// pointer-events: none;
|
|
1416
|
-
// &:after {
|
|
1417
|
-
// content: '';
|
|
1418
|
-
// display: block;
|
|
1419
|
-
// position: absolute;
|
|
1420
|
-
// top: 0;
|
|
1421
|
-
// left: 0;
|
|
1422
|
-
// right: 0;
|
|
1423
|
-
// bottom: 0;
|
|
1424
|
-
// z-index: 1;
|
|
1425
|
-
// box-shadow: var(--switch-box-shadow);
|
|
1426
|
-
// border-radius: inherit;
|
|
1427
|
-
// }
|
|
1428
|
-
// /* Focus styles */
|
|
1429
|
-
// input:focus + && {
|
|
1430
|
-
// --switch-box-shadow: ${focusRingStyle({focusRing: input.switch.focusRing})};
|
|
1431
|
-
// }
|
|
1432
|
-
// input:focus:not(:focus-visible) + && {
|
|
1433
|
-
// --switch-box-shadow: none;
|
|
1434
|
-
// }
|
|
1435
|
-
// input:checked + && {
|
|
1436
|
-
// --switch-bg-color: ${color.input.default.enabled.fg};
|
|
1437
|
-
// --switch-fg-color: ${color.input.default.enabled.bg};
|
|
1438
|
-
// }
|
|
1439
|
-
// @media (hover: hover) {
|
|
1440
|
-
// input:not(:disabled):hover + && {
|
|
1441
|
-
// --switch-bg-color: ${color.input.default.hovered.border};
|
|
1442
|
-
// --switch-fg-color: ${color.input.default.hovered.bg};
|
|
1443
|
-
// }
|
|
1444
|
-
// input:not(:disabled):checked:hover + && {
|
|
1445
|
-
// --switch-bg-color: ${color.input.default.enabled.fg};
|
|
1446
|
-
// --switch-fg-color: ${color.input.default.enabled.bg};
|
|
1447
|
-
// }
|
|
1448
|
-
// }
|
|
1449
|
-
// input:not([data-read-only]):disabled + && {
|
|
1450
|
-
// --switch-bg-color: ${color.input.default.disabled.border};
|
|
1451
|
-
// --switch-fg-color: ${color.input.default.disabled.bg};
|
|
1452
|
-
// }
|
|
1453
|
-
// input[data-read-only]:disabled + && {
|
|
1454
|
-
// --switch-bg-color: ${color.input.default.readOnly.border};
|
|
1455
|
-
// --switch-fg-color: ${color.input.default.readOnly.bg};
|
|
1456
|
-
// }
|
|
1457
|
-
// input:checked[data-read-only]:disabled + && {
|
|
1458
|
-
// --switch-bg-color: ${color.input.default.readOnly.fg};
|
|
1459
|
-
// --switch-fg-color: ${color.input.default.readOnly.bg};
|
|
1460
|
-
// }
|
|
1461
|
-
},
|
|
1462
|
-
"switch-track": {
|
|
1463
|
-
// &:not([hidden]) {
|
|
1464
|
-
// display: block;
|
|
1465
|
-
// }
|
|
1466
|
-
// background-color: var(--switch-bg-color);
|
|
1467
|
-
// position: absolute;
|
|
1468
|
-
// left: 0;
|
|
1469
|
-
// top: 0;
|
|
1470
|
-
// width: ${rem(input.switch.width)};
|
|
1471
|
-
// height: ${rem(input.switch.height)};
|
|
1472
|
-
// border-radius: ${rem(input.switch.height / 2)};
|
|
1473
|
-
},
|
|
1474
|
-
"switch-thumb": {
|
|
1475
|
-
// const {$indeterminate} = props
|
|
1476
|
-
// const {input} = getTheme_v2(props.theme)
|
|
1477
|
-
// const trackWidth = input.switch.width
|
|
1478
|
-
// const trackHeight = input.switch.height
|
|
1479
|
-
// const trackPadding = input.switch.padding
|
|
1480
|
-
// const size = trackHeight - input.switch.padding * 2
|
|
1481
|
-
// const checkedOffset = trackWidth - trackPadding * 2 - size
|
|
1482
|
-
// const indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding
|
|
1483
|
-
// const checked = $indeterminate !== true && props.$checked === true
|
|
1484
|
-
// return css`
|
|
1485
|
-
// &:not([hidden]) {
|
|
1486
|
-
// display: block;
|
|
1487
|
-
// }
|
|
1488
|
-
// position: absolute;
|
|
1489
|
-
// left: ${rem(trackPadding)};
|
|
1490
|
-
// top: ${rem(trackPadding)};
|
|
1491
|
-
// height: ${rem(size)};
|
|
1492
|
-
// width: ${rem(size)};
|
|
1493
|
-
// border-radius: ${rem(size / 2)};
|
|
1494
|
-
// transition-property: transform;
|
|
1495
|
-
// transition-duration: ${input.switch.transitionDurationMs}ms;
|
|
1496
|
-
// transition-timing-function: ${input.switch.transitionTimingFunction};
|
|
1497
|
-
// background: var(--switch-fg-color);
|
|
1498
|
-
// transform: translate3d(0, 0, 0);
|
|
1499
|
-
// box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05);
|
|
1500
|
-
// ${checked &&
|
|
1501
|
-
// css`
|
|
1502
|
-
// transform: translate3d(${checkedOffset}px, 0, 0);
|
|
1503
|
-
// `}
|
|
1504
|
-
// ${$indeterminate &&
|
|
1505
|
-
// css`
|
|
1506
|
-
// transform: translate3d(${indeterminateOffset}px, 0, 0);
|
|
1507
|
-
// `}
|
|
1508
|
-
// `
|
|
1509
|
-
}
|
|
1510
|
-
}, textRules = {
|
|
1511
|
-
text: {
|
|
1512
|
-
"--font-weight-regular": "var(--font-text-weight-regular)",
|
|
1513
|
-
"--font-weight-medium": "var(--font-text-weight-medium)",
|
|
1514
|
-
"--font-weight-semibold": "var(--font-text-weight-semibold)",
|
|
1515
|
-
"--font-weight-bold": "var(--font-text-weight-bold)",
|
|
1516
|
-
"--font-family": "var(--font-text-family)",
|
|
1517
|
-
color: "var(--color-fg)",
|
|
1518
|
-
"@nest": {
|
|
1519
|
-
"& a": {
|
|
1520
|
-
color: "var(--color-link-fg)",
|
|
1521
|
-
textDecoration: "none"
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
},
|
|
1525
|
-
"text-accent": {
|
|
1526
|
-
"--fg-color": "var(--color-accent-fg)"
|
|
1527
|
-
},
|
|
1528
|
-
"text-muted": {
|
|
1529
|
-
"--fg-color": "var(--color-muted-fg)"
|
|
1530
|
-
},
|
|
1531
|
-
...responsiveRules("text-0", {
|
|
1532
|
-
"--font-size": "var(--font-text-0-size)",
|
|
1533
|
-
"--font-line-height": "var(--font-text-0-line-height)",
|
|
1534
|
-
"--font-letter-spacing": "var(--font-text-0-letter-spacing)",
|
|
1535
|
-
"--font-icon-size": "var(--font-text-0-icon-size)",
|
|
1536
|
-
"--font-ascender-height": "var(--font-text-0-ascender-height)",
|
|
1537
|
-
"--font-descender-height": "var(--font-text-0-descender-height)"
|
|
1538
|
-
}),
|
|
1539
|
-
...responsiveRules("text-1", {
|
|
1540
|
-
"--font-size": "var(--font-text-1-size)",
|
|
1541
|
-
"--font-line-height": "var(--font-text-1-line-height)",
|
|
1542
|
-
"--font-letter-spacing": "var(--font-text-1-letter-spacing)",
|
|
1543
|
-
"--font-icon-size": "var(--font-text-1-icon-size)",
|
|
1544
|
-
"--font-ascender-height": "var(--font-text-1-ascender-height)",
|
|
1545
|
-
"--font-descender-height": "var(--font-text-1-descender-height)"
|
|
1546
|
-
}),
|
|
1547
|
-
...responsiveRules("text-2", {
|
|
1548
|
-
"--font-size": "var(--font-text-2-size)",
|
|
1549
|
-
"--font-line-height": "var(--font-text-2-line-height)",
|
|
1550
|
-
"--font-letter-spacing": "var(--font-text-2-letter-spacing)",
|
|
1551
|
-
"--font-icon-size": "var(--font-text-2-icon-size)",
|
|
1552
|
-
"--font-ascender-height": "var(--font-text-2-ascender-height)",
|
|
1553
|
-
"--font-descender-height": "var(--font-text-2-descender-height)"
|
|
1554
|
-
}),
|
|
1555
|
-
...responsiveRules("text-3", {
|
|
1556
|
-
"--font-size": "var(--font-text-3-size)",
|
|
1557
|
-
"--font-line-height": "var(--font-text-3-line-height)",
|
|
1558
|
-
"--font-letter-spacing": "var(--font-text-3-letter-spacing)",
|
|
1559
|
-
"--font-icon-size": "var(--font-text-3-icon-size)",
|
|
1560
|
-
"--font-ascender-height": "var(--font-text-3-ascender-height)",
|
|
1561
|
-
"--font-descender-height": "var(--font-text-3-descender-height)"
|
|
1562
|
-
}),
|
|
1563
|
-
...responsiveRules("text-4", {
|
|
1564
|
-
"--font-size": "var(--font-text-4-size)",
|
|
1565
|
-
"--font-line-height": "var(--font-text-4-line-height)",
|
|
1566
|
-
"--font-letter-spacing": "var(--font-text-4-letter-spacing)",
|
|
1567
|
-
"--font-icon-size": "var(--font-text-4-icon-size)",
|
|
1568
|
-
"--font-ascender-height": "var(--font-text-4-ascender-height)",
|
|
1569
|
-
"--font-descender-height": "var(--font-text-4-descender-height)"
|
|
1570
|
-
})
|
|
1571
|
-
}, textAreaRules = {
|
|
1572
|
-
//
|
|
1573
|
-
}, textInputRules = {
|
|
1574
|
-
"text-input": {
|
|
1575
|
-
//
|
|
1576
|
-
},
|
|
1577
|
-
"text-input-wrapper": {
|
|
1578
|
-
"@nest": {
|
|
1579
|
-
"& > input": {
|
|
1580
|
-
appearance: "none",
|
|
1581
|
-
background: "none",
|
|
1582
|
-
border: 0,
|
|
1583
|
-
borderRadius: 0,
|
|
1584
|
-
outline: "none",
|
|
1585
|
-
width: "100%",
|
|
1586
|
-
boxSizing: "border-box",
|
|
1587
|
-
fontFamily: "var(--font-family)",
|
|
1588
|
-
fontSize: "var(--font-size)",
|
|
1589
|
-
/* font-family: ${font.text.family}, */
|
|
1590
|
-
/* font-weight: ${($weight && font.text.weights[$weight]) || font.text.weights.regular}, */
|
|
1591
|
-
margin: 0,
|
|
1592
|
-
position: "relative",
|
|
1593
|
-
zIndex: 1,
|
|
1594
|
-
display: "block",
|
|
1595
|
-
color: "var(--input-fg-color)",
|
|
1596
|
-
"@nest": {
|
|
1597
|
-
// NOTE: This is a hack to disable Chrome’s autofill styles
|
|
1598
|
-
"&:-webkit-autofill, &:-webkit-autofill:hover, &:-webkit-autofill:focus, &:-webkit-autofill:active": {
|
|
1599
|
-
WebkitTextFillColor: "var(--input-fg-color) !important",
|
|
1600
|
-
transition: "background-color 5000s",
|
|
1601
|
-
transitionDelay: "86400s"
|
|
1602
|
-
// 24h
|
|
1603
|
-
}
|
|
1604
|
-
// /* &:is(textarea) */
|
|
1605
|
-
// &[data-as='textarea'] {
|
|
1606
|
-
// resize: none;
|
|
1607
|
-
// }
|
|
1608
|
-
// &::placeholder {
|
|
1609
|
-
// color: var(--input-placeholder-color);
|
|
1610
|
-
// }
|
|
1611
|
-
// &[data-scheme='${$scheme}'][data-tone='${$tone}'] {
|
|
1612
|
-
// /* --input-fg-color: ${color.input.default.enabled.fg}; */
|
|
1613
|
-
// /* --input-placeholder-color: ${color.input.default.enabled.placeholder}; */
|
|
1614
|
-
// /* enabled */
|
|
1615
|
-
// &:not(:invalid):not(:disabled):not(:read-only) {
|
|
1616
|
-
// /* --input-fg-color: ${color.input.default.enabled.fg}; */
|
|
1617
|
-
// /* --input-placeholder-color: ${color.input.default.enabled.placeholder}; */
|
|
1618
|
-
// }
|
|
1619
|
-
// /* disabled */
|
|
1620
|
-
// &:not(:invalid):disabled {
|
|
1621
|
-
// /* --input-fg-color: ${color.input.default.disabled.fg}; */
|
|
1622
|
-
// /* --input-placeholder-color: ${color.input.default.disabled.placeholder}; */
|
|
1623
|
-
// }
|
|
1624
|
-
// /* invalid */
|
|
1625
|
-
// &:invalid {
|
|
1626
|
-
// /* --input-fg-color: ${color.input.invalid.enabled.fg}; */
|
|
1627
|
-
// /* --input-placeholder-color: ${color.input.invalid.enabled.placeholder}; */
|
|
1628
|
-
// }
|
|
1629
|
-
// /* readOnly */
|
|
1630
|
-
// &:read-only {
|
|
1631
|
-
// /* --input-fg-color: ${color.input.default.readOnly.fg}; */
|
|
1632
|
-
// /* --input-placeholder-color: ${color.input.default.readOnly.placeholder}; */
|
|
1633
|
-
// }
|
|
1634
|
-
// }
|
|
1635
|
-
}
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
},
|
|
1639
|
-
"text-input-prefix": {
|
|
1640
|
-
borderTopRightRadius: 0,
|
|
1641
|
-
borderBottomRightRadius: 0,
|
|
1642
|
-
"@nest": {
|
|
1643
|
-
"& > span": {
|
|
1644
|
-
display: "block",
|
|
1645
|
-
margin: "-1px"
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
},
|
|
1649
|
-
"text-input-suffix": {
|
|
1650
|
-
borderTopRightRadius: 0,
|
|
1651
|
-
borderBottomRightRadius: 0,
|
|
1652
|
-
"@nest": {
|
|
1653
|
-
"& > span": {
|
|
1654
|
-
display: "block",
|
|
1655
|
-
margin: "-1px"
|
|
1656
|
-
}
|
|
1657
|
-
}
|
|
1658
|
-
},
|
|
1659
|
-
"text-input-presentation": {
|
|
1660
|
-
"--input-box-shadow": "none",
|
|
1661
|
-
position: "absolute",
|
|
1662
|
-
top: 0,
|
|
1663
|
-
left: 0,
|
|
1664
|
-
right: 0,
|
|
1665
|
-
bottom: 0,
|
|
1666
|
-
display: "block",
|
|
1667
|
-
pointerEvents: "none",
|
|
1668
|
-
zIndex: 0,
|
|
1669
|
-
backgroundColor: "var(--card-bg-color)",
|
|
1670
|
-
boxShadow: "var(--input-box-shadow)"
|
|
1671
|
-
// border-top-left-radius: ${$hasPrefix ? 0 : undefined};
|
|
1672
|
-
// border-bottom-left-radius: ${$hasPrefix ? 0 : undefined};
|
|
1673
|
-
// border-top-right-radius: ${$hasSuffix ? 0 : undefined};
|
|
1674
|
-
// border-bottom-right-radius: ${$hasSuffix ? 0 : undefined};
|
|
1675
|
-
// &[data-scheme='${$scheme}'][data-tone='${$tone}'] {
|
|
1676
|
-
// --card-bg-color: ${color.input.default.enabled.bg};
|
|
1677
|
-
// --card-fg-color: ${color.input.default.enabled.fg};
|
|
1678
|
-
// /* enabled */
|
|
1679
|
-
// *:not(:disabled) + &[data-border] {
|
|
1680
|
-
// --input-box-shadow: ${focusRingBorderStyle({
|
|
1681
|
-
// color: color.input.default.enabled.border,
|
|
1682
|
-
// width: input.border.width,
|
|
1683
|
-
// })};
|
|
1684
|
-
// }
|
|
1685
|
-
// /* invalid */
|
|
1686
|
-
// *:not(:disabled):invalid + & {
|
|
1687
|
-
// --card-bg-color: ${color.input.invalid.enabled.bg};
|
|
1688
|
-
// --card-fg-color: ${color.input.invalid.enabled.fg};
|
|
1689
|
-
// &[data-border] {
|
|
1690
|
-
// --input-box-shadow: ${focusRingBorderStyle({
|
|
1691
|
-
// color: color.input.invalid.enabled.border,
|
|
1692
|
-
// width: input.border.width,
|
|
1693
|
-
// })};
|
|
1694
|
-
// }
|
|
1695
|
-
// }
|
|
1696
|
-
// /* focused */
|
|
1697
|
-
// *:not(:disabled):focus + & {
|
|
1698
|
-
// &[data-border] {
|
|
1699
|
-
// --input-box-shadow: ${$unstableDisableFocusRing
|
|
1700
|
-
// ? undefined
|
|
1701
|
-
// : focusRingStyle({
|
|
1702
|
-
// border: {color: color.input.default.enabled.border, width: input.border.width},
|
|
1703
|
-
// focusRing: input.text.focusRing,
|
|
1704
|
-
// })};
|
|
1705
|
-
// }
|
|
1706
|
-
// &:not([data-border]) {
|
|
1707
|
-
// --input-box-shadow: ${$unstableDisableFocusRing
|
|
1708
|
-
// ? undefined
|
|
1709
|
-
// : focusRingStyle({focusRing: input.text.focusRing})};
|
|
1710
|
-
// }
|
|
1711
|
-
// }
|
|
1712
|
-
// /* disabled */
|
|
1713
|
-
// *:not(:invalid):disabled + & {
|
|
1714
|
-
// --card-bg-color: ${color.input.default.disabled.bg} !important;
|
|
1715
|
-
// --card-fg-color: ${color.input.default.disabled.fg} !important;
|
|
1716
|
-
// --card-icon-color: ${color.input.default.disabled.fg} !important;
|
|
1717
|
-
// &[data-border] {
|
|
1718
|
-
// --input-box-shadow: ${focusRingBorderStyle({
|
|
1719
|
-
// color: color.input.default.disabled.border,
|
|
1720
|
-
// width: input.border.width,
|
|
1721
|
-
// })};
|
|
1722
|
-
// }
|
|
1723
|
-
// }
|
|
1724
|
-
// *:invalid:disabled + & {
|
|
1725
|
-
// --card-bg-color: ${color.input.invalid.disabled.bg} !important;
|
|
1726
|
-
// --card-fg-color: ${color.input.invalid.disabled.fg} !important;
|
|
1727
|
-
// --card-icon-color: ${color.input.invalid.disabled.fg} !important;
|
|
1728
|
-
// &[data-border] {
|
|
1729
|
-
// --input-box-shadow: ${focusRingBorderStyle({
|
|
1730
|
-
// color: color.input.invalid.disabled.border,
|
|
1731
|
-
// width: input.border.width,
|
|
1732
|
-
// })};
|
|
1733
|
-
// }
|
|
1734
|
-
// }
|
|
1735
|
-
// /* readOnly */
|
|
1736
|
-
// *:not(:invalid):read-only + & {
|
|
1737
|
-
// --card-bg-color: ${color.input.default.readOnly.bg} !important;
|
|
1738
|
-
// --card-fg-color: ${color.input.default.readOnly.fg} !important;
|
|
1739
|
-
// }
|
|
1740
|
-
// *:invalid:read-only + & {
|
|
1741
|
-
// --card-bg-color: ${color.input.invalid.readOnly.bg} !important;
|
|
1742
|
-
// --card-fg-color: ${color.input.invalid.readOnly.fg} !important;
|
|
1743
|
-
// }
|
|
1744
|
-
// /* hovered */
|
|
1745
|
-
// @media (hover: hover) {
|
|
1746
|
-
// *:not(:disabled):not(:read-only):not(:invalid):hover + & {
|
|
1747
|
-
// --card-bg-color: ${color.input.default.hovered.bg};
|
|
1748
|
-
// --card-fg-color: ${color.input.default.hovered.fg};
|
|
1749
|
-
// }
|
|
1750
|
-
// *:invalid:not(:disabled):not(:read-only):hover + & {
|
|
1751
|
-
// --card-bg-color: ${color.input.invalid.hovered.bg};
|
|
1752
|
-
// --card-fg-color: ${color.input.invalid.hovered.fg};
|
|
1753
|
-
// }
|
|
1754
|
-
// *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {
|
|
1755
|
-
// --input-box-shadow: ${focusRingBorderStyle({
|
|
1756
|
-
// color: color.input.default.hovered.border,
|
|
1757
|
-
// width: input.border.width,
|
|
1758
|
-
// })};
|
|
1759
|
-
// }
|
|
1760
|
-
// *:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border] {
|
|
1761
|
-
// --input-box-shadow: ${focusRingBorderStyle({
|
|
1762
|
-
// color: color.input.invalid.hovered.border,
|
|
1763
|
-
// width: input.border.width,
|
|
1764
|
-
// })};
|
|
1765
|
-
// }
|
|
1766
|
-
// }
|
|
1767
|
-
// }
|
|
1768
|
-
}
|
|
1769
|
-
}, tokenRules = {
|
|
1770
|
-
token: {
|
|
1771
|
-
"@nest": {
|
|
1772
|
-
"&.atrule": { color: vars.color.syntax.atrule },
|
|
1773
|
-
"&.attr-name": { color: vars.color.syntax.attrName },
|
|
1774
|
-
"&.attr-value": { color: vars.color.syntax.attrValue },
|
|
1775
|
-
"&.attribute": { color: vars.color.syntax.attribute },
|
|
1776
|
-
"&.boolean": { color: vars.color.syntax.boolean },
|
|
1777
|
-
"&.builtin": { color: vars.color.syntax.builtin },
|
|
1778
|
-
"&.cdata": { color: vars.color.syntax.cdata },
|
|
1779
|
-
"&.char": { color: vars.color.syntax.char },
|
|
1780
|
-
"&.class": { color: vars.color.syntax.class },
|
|
1781
|
-
"&.class-name": { color: vars.color.syntax.className },
|
|
1782
|
-
"&.comment": { color: vars.color.syntax.comment },
|
|
1783
|
-
"&.constant": { color: vars.color.syntax.constant },
|
|
1784
|
-
"&.deleted": { color: vars.color.syntax.deleted },
|
|
1785
|
-
"&.doctype": { color: vars.color.syntax.doctype },
|
|
1786
|
-
"&.entity": { color: vars.color.syntax.entity },
|
|
1787
|
-
"&.function": { color: vars.color.syntax.function },
|
|
1788
|
-
"&.hexcode": { color: vars.color.syntax.hexcode },
|
|
1789
|
-
"&.id": { color: vars.color.syntax.id },
|
|
1790
|
-
"&.important": { color: vars.color.syntax.important },
|
|
1791
|
-
"&.inserted": { color: vars.color.syntax.inserted },
|
|
1792
|
-
"&.keyword": { color: vars.color.syntax.keyword },
|
|
1793
|
-
"&.number": { color: vars.color.syntax.number },
|
|
1794
|
-
"&.operator": { color: vars.color.syntax.operator },
|
|
1795
|
-
"&.prolog": { color: vars.color.syntax.prolog },
|
|
1796
|
-
"&.property": { color: vars.color.syntax.property },
|
|
1797
|
-
"&.pseudo-class": { color: vars.color.syntax.pseudoClass },
|
|
1798
|
-
"&.pseudo-element": { color: vars.color.syntax.pseudoElement },
|
|
1799
|
-
"&.punctuation": { color: vars.color.syntax.punctuation },
|
|
1800
|
-
"&.regex": { color: vars.color.syntax.regex },
|
|
1801
|
-
"&.selector": { color: vars.color.syntax.selector },
|
|
1802
|
-
"&.string": { color: vars.color.syntax.string },
|
|
1803
|
-
"&.symbol": { color: vars.color.syntax.symbol },
|
|
1804
|
-
"&.tag": { color: vars.color.syntax.tag },
|
|
1805
|
-
"&.unit": { color: vars.color.syntax.unit },
|
|
1806
|
-
"&.url": { color: vars.color.syntax.url },
|
|
1807
|
-
"&.variable": { color: vars.color.syntax.variable }
|
|
1808
|
-
}
|
|
1809
|
-
}
|
|
1810
|
-
}, tooltipRules = {
|
|
1811
|
-
tooltip: {
|
|
1812
|
-
pointerEvents: "none"
|
|
1813
|
-
},
|
|
1814
|
-
"tooltip-card": {
|
|
1815
|
-
"@nest": {
|
|
1816
|
-
"&[data-animate] > *": {
|
|
1817
|
-
// opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
|
|
1818
|
-
opacity: "var(--motion-content-opacity, 1)",
|
|
1819
|
-
willChange: "opacity"
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
}
|
|
1823
|
-
}, borderRules = {
|
|
1824
|
-
...responsiveRules("border", {
|
|
1825
|
-
border: "1px solid var(--card-border-color)"
|
|
1826
|
-
}),
|
|
1827
|
-
...responsiveRules("border-t", {
|
|
1828
|
-
borderTop: "1px solid var(--card-border-color)"
|
|
1829
|
-
}),
|
|
1830
|
-
...responsiveRules("border-r", {
|
|
1831
|
-
borderRight: "1px solid var(--card-border-color)"
|
|
1832
|
-
}),
|
|
1833
|
-
...responsiveRules("border-b", {
|
|
1834
|
-
borderBottom: "1px solid var(--card-border-color)"
|
|
1835
|
-
}),
|
|
1836
|
-
...responsiveRules("border-l", {
|
|
1837
|
-
borderLeft: "1px solid var(--card-border-color)"
|
|
1838
|
-
})
|
|
1839
|
-
}, displayRules = {
|
|
1840
|
-
...responsiveRules("block", {
|
|
1841
|
-
"@nest": {
|
|
1842
|
-
"&:not([hidden])": {
|
|
1843
|
-
display: "block"
|
|
1844
|
-
}
|
|
1845
|
-
}
|
|
1846
|
-
}),
|
|
1847
|
-
...responsiveRules("inline-block", {
|
|
1848
|
-
"@nest": {
|
|
1849
|
-
"&:not([hidden])": {
|
|
1850
|
-
display: "inline-block"
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
}),
|
|
1854
|
-
...responsiveRules("flex", {
|
|
1855
|
-
"@nest": {
|
|
1856
|
-
"&:not([hidden])": {
|
|
1857
|
-
display: "flex"
|
|
1858
|
-
}
|
|
1859
|
-
}
|
|
1860
|
-
}),
|
|
1861
|
-
...responsiveRules("inline-flex", {
|
|
1862
|
-
"@nest": {
|
|
1863
|
-
"&:not([hidden])": {
|
|
1864
|
-
display: "inline-flex"
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
}),
|
|
1868
|
-
...responsiveRules("grid", {
|
|
1869
|
-
gridTemplateRows: "auto",
|
|
1870
|
-
"@nest": {
|
|
1871
|
-
"&:not([hidden])": {
|
|
1872
|
-
display: "grid"
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
}),
|
|
1876
|
-
...responsiveRules("grid-flex", {
|
|
1877
|
-
gridTemplateRows: "auto",
|
|
1878
|
-
"@nest": {
|
|
1879
|
-
"&:not([hidden])": {
|
|
1880
|
-
display: "grid-flex"
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
}),
|
|
1884
|
-
...responsiveRules("none", {
|
|
1885
|
-
"@nest": {
|
|
1886
|
-
"&:not([hidden])": {
|
|
1887
|
-
display: "none"
|
|
1888
|
-
}
|
|
1889
|
-
}
|
|
1890
|
-
})
|
|
1891
|
-
}, flexRules = {
|
|
1892
|
-
// direction
|
|
1893
|
-
...responsiveRules("row", { flexDirection: "row" }),
|
|
1894
|
-
...responsiveRules("column", { flexDirection: "column" }),
|
|
1895
|
-
// align
|
|
1896
|
-
...responsiveRules("align-flex-start", { alignItems: "flex-start" }),
|
|
1897
|
-
...responsiveRules("align-flex-end", { alignItems: "end" }),
|
|
1898
|
-
...responsiveRules("align-center", { alignItems: "center" }),
|
|
1899
|
-
...responsiveRules("align-stretch", { alignItems: "stretch" }),
|
|
1900
|
-
...responsiveRules("align-baseline", { alignItems: "baseline" }),
|
|
1901
|
-
// justify
|
|
1902
|
-
...responsiveRules("justify-flex-start", { justifyContent: "flex-start" }),
|
|
1903
|
-
...responsiveRules("justify-flex-end", { justifyContent: "flex-end" }),
|
|
1904
|
-
...responsiveRules("justify-center", { justifyContent: "center" }),
|
|
1905
|
-
...responsiveRules("justify-between", { justifyContent: "space-between" }),
|
|
1906
|
-
...responsiveRules("justify-around", { justifyContent: "space-around" }),
|
|
1907
|
-
...responsiveRules("justify-evenly", { justifyContent: "space-evenly" }),
|
|
1908
|
-
// wrap
|
|
1909
|
-
...responsiveRules("wrap-nowrap", { flexWrap: "nowrap" }),
|
|
1910
|
-
...responsiveRules("wrap-wrap", { flexWrap: "wrap" }),
|
|
1911
|
-
...responsiveRules("wrap-reverse", { flexWrap: "wrap-reverse" })
|
|
1912
|
-
}, flexItemRules = {
|
|
1913
|
-
...responsiveRules("flex-none", { flex: "none" }),
|
|
1914
|
-
...responsiveRules("flex-1", { flex: 1 }),
|
|
1915
|
-
...responsiveRules("flex-2", { flex: 2 }),
|
|
1916
|
-
...responsiveRules("flex-3", { flex: 3 }),
|
|
1917
|
-
...responsiveRules("flex-4", { flex: 4 }),
|
|
1918
|
-
...responsiveRules("flex-5", { flex: 5 })
|
|
1919
|
-
}, fontRules = {
|
|
1920
|
-
font: {
|
|
1921
|
-
position: "relative",
|
|
1922
|
-
fontFamily: "var(--font-family)",
|
|
1923
|
-
fontSize: "var(--font-size)",
|
|
1924
|
-
lineHeight: "var(--font-line-height)",
|
|
1925
|
-
letterSpacing: "var(--font-letter-spacing)",
|
|
1926
|
-
fontWeight: "var(--font-weight)",
|
|
1927
|
-
transform: "translateY(var(--font-descender-height))",
|
|
1928
|
-
padding: "1px 0",
|
|
1929
|
-
margin: "0",
|
|
1930
|
-
"--font-cap-height": "calc(var(--font-line-height) - var(--font-ascender-height) - var(--font-descender-height))",
|
|
1931
|
-
"--font-icon-offset": "calc((var(--font-cap-height) - var(--font-icon-size)) / 2)",
|
|
1932
|
-
"--font-weight": "var(--font-weight-regular)",
|
|
1933
|
-
"@nest": {
|
|
1934
|
-
"&:before": {
|
|
1935
|
-
content: '""',
|
|
1936
|
-
display: "block",
|
|
1937
|
-
height: 0,
|
|
1938
|
-
marginTop: "calc((0px - var(--font-ascender-height) - var(--font-descender-height)) - 1px)"
|
|
1939
|
-
},
|
|
1940
|
-
"&:after": {
|
|
1941
|
-
content: '""',
|
|
1942
|
-
display: "block",
|
|
1943
|
-
height: 0,
|
|
1944
|
-
marginBottom: "-1px"
|
|
1945
|
-
},
|
|
1946
|
-
"& svg": {
|
|
1947
|
-
// Certain popular CSS libraries changes the defaults for SVG display
|
|
1948
|
-
// Make sure SVGs are rendered as inline elements
|
|
1949
|
-
display: "inline"
|
|
1950
|
-
},
|
|
1951
|
-
// todo
|
|
1952
|
-
// '& svg:not([data-sanity-icon])': {
|
|
1953
|
-
// fontSize: 'calc(var(--custom-icon-size) / 16 * 1rem)',
|
|
1954
|
-
// margin: 'var(--custom-icon-offset)',
|
|
1955
|
-
// },
|
|
1956
|
-
"& [data-sanity-icon]": {
|
|
1957
|
-
fontSize: "var(--font-icon-size)",
|
|
1958
|
-
margin: "var(--font-icon-offset)",
|
|
1959
|
-
vectorEffect: "non-scaling-stroke"
|
|
1960
|
-
}
|
|
1961
|
-
}
|
|
1962
|
-
},
|
|
1963
|
-
"font-regular": {
|
|
1964
|
-
"--font-weight": "var(--font-weight-regular)"
|
|
1965
|
-
},
|
|
1966
|
-
"font-medium": {
|
|
1967
|
-
"--font-weight": "var(--font-weight-medium)"
|
|
1968
|
-
},
|
|
1969
|
-
"font-semibold": {
|
|
1970
|
-
"--font-weight": "var(--font-weight-semibold)"
|
|
1971
|
-
},
|
|
1972
|
-
"font-bold": {
|
|
1973
|
-
"--font-weight": "var(--font-weight-bold)"
|
|
1974
|
-
}
|
|
1975
|
-
}, gapRules = {
|
|
1976
|
-
...theme.SPACE.reduce((acc, space) => ({
|
|
1977
|
-
...acc,
|
|
1978
|
-
...responsiveRules(`g-${space}`, {
|
|
1979
|
-
gap: space === 0.5 ? "calc(var(--space-1) / 2)" : vars.space[space]
|
|
1980
|
-
})
|
|
1981
|
-
}), {}),
|
|
1982
|
-
...theme.SPACE.reduce((acc, space) => ({
|
|
1983
|
-
...acc,
|
|
1984
|
-
...responsiveRules(`gx-${space}`, {
|
|
1985
|
-
columnGap: space === 0.5 ? "calc(var(--space-1) / 2)" : vars.space[space]
|
|
1986
|
-
})
|
|
1987
|
-
}), {}),
|
|
1988
|
-
...theme.SPACE.reduce((acc, space) => ({
|
|
1989
|
-
...acc,
|
|
1990
|
-
...responsiveRules(`gy-${space}`, {
|
|
1991
|
-
rowGap: space === 0.5 ? "calc(var(--space-1) / 2)" : vars.space[space]
|
|
1992
|
-
})
|
|
1993
|
-
}), {})
|
|
1994
|
-
}, gridRules = {
|
|
1995
|
-
// autoCols
|
|
1996
|
-
...responsiveRules("auto-cols-auto", { gridAutoColumns: "auto" }),
|
|
1997
|
-
...responsiveRules("auto-cols-min", { gridAutoColumns: "min" }),
|
|
1998
|
-
...responsiveRules("auto-cols-max", { gridAutoColumns: "max" }),
|
|
1999
|
-
...responsiveRules("auto-cols-fr", { gridAutoColumns: "fr" }),
|
|
2000
|
-
// autoFlow
|
|
2001
|
-
...responsiveRules("auto-flow-row", { gridAutoFlow: "row" }),
|
|
2002
|
-
...responsiveRules("auto-flow-column", { gridAutoFlow: "column" }),
|
|
2003
|
-
...responsiveRules("auto-flow-row-dense", { gridAutoFlow: "row dense" }),
|
|
2004
|
-
...responsiveRules("auto-flow-column-dense", { gridAutoFlow: "column dense" }),
|
|
2005
|
-
// autoRows
|
|
2006
|
-
...responsiveRules("auto-rows-auto", { gridAutoRows: "auto" }),
|
|
2007
|
-
...responsiveRules("auto-rows-min", { gridAutoRows: "min-content" }),
|
|
2008
|
-
...responsiveRules("auto-rows-max", { gridAutoRows: "max-content" }),
|
|
2009
|
-
// ...responsiveRules('auto-rows-fr', {gridAutoRows: 'fr'}),
|
|
2010
|
-
// columns
|
|
2011
|
-
...responsiveRules("columns-1", { gridTemplateColumns: "repeat(1, 1fr)" }),
|
|
2012
|
-
...responsiveRules("columns-2", { gridTemplateColumns: "repeat(2, 1fr)" }),
|
|
2013
|
-
...responsiveRules("columns-3", { gridTemplateColumns: "repeat(3, 1fr)" }),
|
|
2014
|
-
...responsiveRules("columns-4", { gridTemplateColumns: "repeat(4, 1fr)" }),
|
|
2015
|
-
...responsiveRules("columns-5", { gridTemplateColumns: "repeat(5, 1fr)" }),
|
|
2016
|
-
...responsiveRules("columns-6", { gridTemplateColumns: "repeat(6, 1fr)" }),
|
|
2017
|
-
...responsiveRules("columns-7", { gridTemplateColumns: "repeat(7, 1fr)" }),
|
|
2018
|
-
...responsiveRules("columns-8", { gridTemplateColumns: "repeat(8, 1fr)" }),
|
|
2019
|
-
...responsiveRules("columns-9", { gridTemplateColumns: "repeat(9, 1fr)" }),
|
|
2020
|
-
...responsiveRules("columns-10", { gridTemplateColumns: "repeat(10, 1fr)" }),
|
|
2021
|
-
...responsiveRules("columns-12", { gridTemplateColumns: "repeat(12, 1fr)" })
|
|
2022
|
-
}, gridItemRules = {
|
|
2023
|
-
// column
|
|
2024
|
-
...responsiveRules("col-auto", { gridColumn: "span 1 / span 1" }),
|
|
2025
|
-
...responsiveRules("col-full", { gridColumn: "1 / -1" }),
|
|
2026
|
-
...responsiveRules("col-1", { gridColumn: "span 1 / span 1" }),
|
|
2027
|
-
...responsiveRules("col-2", { gridColumn: "span 2 / span 2" }),
|
|
2028
|
-
...responsiveRules("col-3", { gridColumn: "span 3 / span 3" }),
|
|
2029
|
-
...responsiveRules("col-4", { gridColumn: "span 4 / span 4" }),
|
|
2030
|
-
...responsiveRules("col-5", { gridColumn: "span 5 / span 5" }),
|
|
2031
|
-
...responsiveRules("col-6", { gridColumn: "span 6 / span 6" }),
|
|
2032
|
-
...responsiveRules("col-7", { gridColumn: "span 7 / span 7" }),
|
|
2033
|
-
...responsiveRules("col-8", { gridColumn: "span 8 / span 8" }),
|
|
2034
|
-
...responsiveRules("col-9", { gridColumn: "span 9 / span 9" }),
|
|
2035
|
-
...responsiveRules("col-10", { gridColumn: "span 10 / span 10" }),
|
|
2036
|
-
...responsiveRules("col-11", { gridColumn: "span 11 / span 11" }),
|
|
2037
|
-
...responsiveRules("col-12", { gridColumn: "span 12 / span 12" }),
|
|
2038
|
-
// columnStart
|
|
2039
|
-
...responsiveRules("col-start-auto", { gridColumnStart: "auto" }),
|
|
2040
|
-
...responsiveRules("col-start-1", { gridColumnStart: "1" }),
|
|
2041
|
-
...responsiveRules("col-start-2", { gridColumnStart: "2" }),
|
|
2042
|
-
...responsiveRules("col-start-3", { gridColumnStart: "3" }),
|
|
2043
|
-
...responsiveRules("col-start-4", { gridColumnStart: "4" }),
|
|
2044
|
-
...responsiveRules("col-start-5", { gridColumnStart: "5" }),
|
|
2045
|
-
...responsiveRules("col-start-6", { gridColumnStart: "6" }),
|
|
2046
|
-
...responsiveRules("col-start-7", { gridColumnStart: "7" }),
|
|
2047
|
-
...responsiveRules("col-start-8", { gridColumnStart: "8" }),
|
|
2048
|
-
...responsiveRules("col-start-9", { gridColumnStart: "9" }),
|
|
2049
|
-
...responsiveRules("col-start-10", { gridColumnStart: "10" }),
|
|
2050
|
-
...responsiveRules("col-start-11", { gridColumnStart: "11" }),
|
|
2051
|
-
...responsiveRules("col-start-12", { gridColumnStart: "12" }),
|
|
2052
|
-
// columnEnd
|
|
2053
|
-
...responsiveRules("col-end-auto", { gridColumnEnd: "auto" }),
|
|
2054
|
-
...responsiveRules("col-end-1", { gridColumnEnd: "1" }),
|
|
2055
|
-
...responsiveRules("col-end-2", { gridColumnEnd: "2" }),
|
|
2056
|
-
...responsiveRules("col-end-3", { gridColumnEnd: "3" }),
|
|
2057
|
-
...responsiveRules("col-end-4", { gridColumnEnd: "4" }),
|
|
2058
|
-
...responsiveRules("col-end-5", { gridColumnEnd: "5" }),
|
|
2059
|
-
...responsiveRules("col-end-6", { gridColumnEnd: "6" }),
|
|
2060
|
-
...responsiveRules("col-end-7", { gridColumnEnd: "7" }),
|
|
2061
|
-
...responsiveRules("col-end-8", { gridColumnEnd: "8" }),
|
|
2062
|
-
...responsiveRules("col-end-9", { gridColumnEnd: "9" }),
|
|
2063
|
-
...responsiveRules("col-end-10", { gridColumnEnd: "10" }),
|
|
2064
|
-
...responsiveRules("col-end-11", { gridColumnEnd: "11" }),
|
|
2065
|
-
...responsiveRules("col-end-12", { gridColumnEnd: "12" }),
|
|
2066
|
-
// row
|
|
2067
|
-
...responsiveRules("row-auto", { gridRow: "span 1 / span 1" }),
|
|
2068
|
-
...responsiveRules("row-full", { gridRow: "1 / -1" }),
|
|
2069
|
-
...responsiveRules("row-1", { gridRow: "span 1 / span 1" }),
|
|
2070
|
-
...responsiveRules("row-2", { gridRow: "span 2 / span 2" }),
|
|
2071
|
-
...responsiveRules("row-3", { gridRow: "span 3 / span 3" }),
|
|
2072
|
-
...responsiveRules("row-4", { gridRow: "span 4 / span 4" }),
|
|
2073
|
-
...responsiveRules("row-5", { gridRow: "span 5 / span 5" }),
|
|
2074
|
-
...responsiveRules("row-6", { gridRow: "span 6 / span 6" }),
|
|
2075
|
-
...responsiveRules("row-7", { gridRow: "span 7 / span 7" }),
|
|
2076
|
-
...responsiveRules("row-8", { gridRow: "span 8 / span 8" }),
|
|
2077
|
-
...responsiveRules("row-9", { gridRow: "span 9 / span 9" }),
|
|
2078
|
-
...responsiveRules("row-10", { gridRow: "span 10 / span 10" }),
|
|
2079
|
-
...responsiveRules("row-11", { gridRow: "span 11 / span 11" }),
|
|
2080
|
-
...responsiveRules("row-12", { gridRow: "span 12 / span 12" }),
|
|
2081
|
-
// rowStart
|
|
2082
|
-
...responsiveRules("row-start-auto", { gridRowStart: "auto" }),
|
|
2083
|
-
...responsiveRules("row-start-1", { gridRowStart: "1" }),
|
|
2084
|
-
...responsiveRules("row-start-2", { gridRowStart: "2" }),
|
|
2085
|
-
...responsiveRules("row-start-3", { gridRowStart: "3" }),
|
|
2086
|
-
...responsiveRules("row-start-4", { gridRowStart: "4" }),
|
|
2087
|
-
...responsiveRules("row-start-5", { gridRowStart: "5" }),
|
|
2088
|
-
...responsiveRules("row-start-6", { gridRowStart: "6" }),
|
|
2089
|
-
...responsiveRules("row-start-7", { gridRowStart: "7" }),
|
|
2090
|
-
...responsiveRules("row-start-8", { gridRowStart: "8" }),
|
|
2091
|
-
...responsiveRules("row-start-9", { gridRowStart: "9" }),
|
|
2092
|
-
...responsiveRules("row-start-10", { gridRowStart: "10" }),
|
|
2093
|
-
...responsiveRules("row-start-11", { gridRowStart: "11" }),
|
|
2094
|
-
...responsiveRules("row-start-12", { gridRowStart: "12" }),
|
|
2095
|
-
// rowEnd
|
|
2096
|
-
...responsiveRules("row-end-auto", { gridRowEnd: "auto" }),
|
|
2097
|
-
...responsiveRules("row-end-1", { gridRowEnd: "1" }),
|
|
2098
|
-
...responsiveRules("row-end-2", { gridRowEnd: "2" }),
|
|
2099
|
-
...responsiveRules("row-end-3", { gridRowEnd: "3" }),
|
|
2100
|
-
...responsiveRules("row-end-4", { gridRowEnd: "4" }),
|
|
2101
|
-
...responsiveRules("row-end-5", { gridRowEnd: "5" }),
|
|
2102
|
-
...responsiveRules("row-end-6", { gridRowEnd: "6" }),
|
|
2103
|
-
...responsiveRules("row-end-7", { gridRowEnd: "7" }),
|
|
2104
|
-
...responsiveRules("row-end-8", { gridRowEnd: "8" }),
|
|
2105
|
-
...responsiveRules("row-end-9", { gridRowEnd: "9" }),
|
|
2106
|
-
...responsiveRules("row-end-10", { gridRowEnd: "10" }),
|
|
2107
|
-
...responsiveRules("row-end-11", { gridRowEnd: "11" }),
|
|
2108
|
-
...responsiveRules("row-end-12", { gridRowEnd: "12" })
|
|
2109
|
-
}, heightRules = {
|
|
2110
|
-
...responsiveRules("h-fill", { height: "100%" }),
|
|
2111
|
-
...responsiveRules("h-stretch", { height: "stretch" })
|
|
2112
|
-
}, marginRules = theme.SPACE.reduce((acc, space) => ({
|
|
2113
|
-
...acc,
|
|
2114
|
-
...responsiveRules(`m-${space}`, { margin: vars.space[space] })
|
|
2115
|
-
}), {}), marginXRules = theme.SPACE.reduce((acc, space) => ({
|
|
2116
|
-
...acc,
|
|
2117
|
-
...responsiveRules(`mx-${space}`, {
|
|
2118
|
-
marginLeft: vars.space[space],
|
|
2119
|
-
marginRight: vars.space[space]
|
|
2120
|
-
})
|
|
2121
|
-
}), {}), marginYRules = theme.SPACE.reduce((acc, space) => ({
|
|
2122
|
-
...acc,
|
|
2123
|
-
...responsiveRules(`my-${space}`, {
|
|
2124
|
-
marginTop: vars.space[space],
|
|
2125
|
-
marginBottom: vars.space[space]
|
|
2126
|
-
})
|
|
2127
|
-
}), {}), marginTopRules = theme.SPACE.reduce((acc, space) => ({
|
|
2128
|
-
...acc,
|
|
2129
|
-
...responsiveRules(`mt-${space}`, { marginTop: vars.space[space] })
|
|
2130
|
-
}), {}), marginRightRules = theme.SPACE.reduce((acc, space) => ({
|
|
2131
|
-
...acc,
|
|
2132
|
-
...responsiveRules(`mr-${space}`, { marginRight: vars.space[space] })
|
|
2133
|
-
}), {}), marginBottomRules = theme.SPACE.reduce((acc, space) => ({
|
|
2134
|
-
...acc,
|
|
2135
|
-
...responsiveRules(`mb-${space}`, { marginBottom: vars.space[space] })
|
|
2136
|
-
}), {}), marginLeftRules = theme.SPACE.reduce((acc, space) => ({
|
|
2137
|
-
...acc,
|
|
2138
|
-
...responsiveRules(`ml-${space}`, { marginLeft: vars.space[space] })
|
|
2139
|
-
}), {}), maxWidthRules = {
|
|
2140
|
-
...responsiveRules("max-w-0", {
|
|
2141
|
-
maxWidth: "var(--container-0)"
|
|
2142
|
-
}),
|
|
2143
|
-
...responsiveRules("max-w-1", {
|
|
2144
|
-
maxWidth: "var(--container-1)"
|
|
2145
|
-
}),
|
|
2146
|
-
...responsiveRules("max-w-2", {
|
|
2147
|
-
maxWidth: "var(--container-2)"
|
|
2148
|
-
}),
|
|
2149
|
-
...responsiveRules("max-w-3", {
|
|
2150
|
-
maxWidth: "var(--container-3)"
|
|
2151
|
-
}),
|
|
2152
|
-
...responsiveRules("max-w-4", {
|
|
2153
|
-
maxWidth: "var(--container-4)"
|
|
2154
|
-
}),
|
|
2155
|
-
...responsiveRules("max-w-5", {
|
|
2156
|
-
maxWidth: "var(--container-5)"
|
|
2157
|
-
}),
|
|
2158
|
-
...responsiveRules("max-w-auto", {
|
|
2159
|
-
maxWidth: "none"
|
|
2160
|
-
}),
|
|
2161
|
-
...responsiveRules("max-w-fill", {
|
|
2162
|
-
maxWidth: "100%"
|
|
2163
|
-
})
|
|
2164
|
-
}, overflowRules = {
|
|
2165
|
-
...responsiveRules("overflow-visible", { overflow: "visible" }),
|
|
2166
|
-
...responsiveRules("overflow-hidden", { overflow: "hidden" }),
|
|
2167
|
-
...responsiveRules("overflow-scroll", { overflow: "scroll" }),
|
|
2168
|
-
...responsiveRules("overflow-auto", { overflow: "auto" })
|
|
2169
|
-
}, paddingRules = theme.SPACE.reduce((acc, space) => ({
|
|
2170
|
-
...acc,
|
|
2171
|
-
...responsiveRules(`p-${space}`, { padding: vars.space[space] })
|
|
2172
|
-
}), {}), paddingXRules = theme.SPACE.reduce((acc, space) => ({
|
|
2173
|
-
...acc,
|
|
2174
|
-
...responsiveRules(`px-${space}`, {
|
|
2175
|
-
paddingLeft: vars.space[space],
|
|
2176
|
-
paddingRight: vars.space[space]
|
|
2177
|
-
})
|
|
2178
|
-
}), {}), paddingYRules = theme.SPACE.reduce((acc, space) => ({
|
|
2179
|
-
...acc,
|
|
2180
|
-
...responsiveRules(`py-${space}`, {
|
|
2181
|
-
paddingTop: vars.space[space],
|
|
2182
|
-
paddingBottom: vars.space[space]
|
|
2183
|
-
})
|
|
2184
|
-
}), {}), paddingTopRules = theme.SPACE.reduce((acc, space) => ({
|
|
2185
|
-
...acc,
|
|
2186
|
-
...responsiveRules(`pt-${space}`, { paddingTop: vars.space[space] })
|
|
2187
|
-
}), {}), paddingRightRules = theme.SPACE.reduce((acc, space) => ({
|
|
2188
|
-
...acc,
|
|
2189
|
-
...responsiveRules(`pr-${space}`, { paddingRight: vars.space[space] })
|
|
2190
|
-
}), {}), paddingBottomRules = theme.SPACE.reduce((acc, space) => ({
|
|
2191
|
-
...acc,
|
|
2192
|
-
...responsiveRules(`pb-${space}`, { paddingBottom: vars.space[space] })
|
|
2193
|
-
}), {}), paddingLeftRules = theme.SPACE.reduce((acc, space) => ({
|
|
2194
|
-
...acc,
|
|
2195
|
-
...responsiveRules(`pl-${space}`, { paddingLeft: vars.space[space] })
|
|
2196
|
-
}), {}), pointerEventsRules = {
|
|
2197
|
-
"pointer-events-none": {
|
|
2198
|
-
pointerEvents: "none"
|
|
2199
|
-
},
|
|
2200
|
-
"pointer-events-auto": {
|
|
2201
|
-
pointerEvents: "auto"
|
|
2202
|
-
}
|
|
2203
|
-
}, positionRules = {
|
|
2204
|
-
...responsiveRules("pos-absolute", {
|
|
2205
|
-
position: "absolute"
|
|
2206
|
-
}),
|
|
2207
|
-
...responsiveRules("pos-fixed", {
|
|
2208
|
-
position: "fixed"
|
|
2209
|
-
}),
|
|
2210
|
-
...responsiveRules("pos-relative", {
|
|
2211
|
-
position: "relative"
|
|
2212
|
-
}),
|
|
2213
|
-
...responsiveRules("pos-static", {
|
|
2214
|
-
position: "static"
|
|
2215
|
-
}),
|
|
2216
|
-
...responsiveRules("pos-sticky", {
|
|
2217
|
-
position: "sticky"
|
|
2218
|
-
}),
|
|
2219
|
-
...responsiveRules("inset-0", {
|
|
2220
|
-
top: 0,
|
|
2221
|
-
left: 0,
|
|
2222
|
-
right: 0,
|
|
2223
|
-
bottom: 0
|
|
2224
|
-
})
|
|
2225
|
-
}, radiusRules = {
|
|
2226
|
-
...responsiveRules("r-0", { borderRadius: "var(--radius-0)" }),
|
|
2227
|
-
...responsiveRules("r-1", { borderRadius: "var(--radius-1)" }),
|
|
2228
|
-
...responsiveRules("r-2", { borderRadius: "var(--radius-2)" }),
|
|
2229
|
-
...responsiveRules("r-3", { borderRadius: "var(--radius-3)" }),
|
|
2230
|
-
...responsiveRules("r-4", { borderRadius: "var(--radius-4)" }),
|
|
2231
|
-
...responsiveRules("r-5", { borderRadius: "var(--radius-5)" }),
|
|
2232
|
-
...responsiveRules("r-6", { borderRadius: "var(--radius-6)" }),
|
|
2233
|
-
...responsiveRules("r-round", { borderRadius: "9999px" })
|
|
2234
|
-
}, shadowRules = {
|
|
2235
|
-
...responsiveRules("shadow-0", {
|
|
2236
|
-
boxShadow: "none"
|
|
2237
|
-
}),
|
|
2238
|
-
...responsiveRules("shadow-1", {
|
|
2239
|
-
boxShadow: [
|
|
2240
|
-
"var(--card-shadow-outline) var(--color-shadow-outline)",
|
|
2241
|
-
"var(--shadow-1-umbra) var(--color-shadow-umbra)",
|
|
2242
|
-
"var(--shadow-1-penumbra) var(--color-shadow-penumbra)",
|
|
2243
|
-
"var(--shadow-1-ambient) var(--color-shadow-ambient)"
|
|
2244
|
-
].join(", ")
|
|
2245
|
-
}),
|
|
2246
|
-
...responsiveRules("shadow-2", {
|
|
2247
|
-
boxShadow: [
|
|
2248
|
-
"var(--card-shadow-outline) var(--color-shadow-outline)",
|
|
2249
|
-
"var(--shadow-2-umbra) var(--color-shadow-umbra)",
|
|
2250
|
-
"var(--shadow-2-penumbra) var(--color-shadow-penumbra)",
|
|
2251
|
-
"var(--shadow-2-ambient) var(--color-shadow-ambient)"
|
|
2252
|
-
].join(", ")
|
|
2253
|
-
}),
|
|
2254
|
-
...responsiveRules("shadow-3", {
|
|
2255
|
-
boxShadow: [
|
|
2256
|
-
"var(--card-shadow-outline) var(--color-shadow-outline)",
|
|
2257
|
-
"var(--shadow-3-umbra) var(--color-shadow-umbra)",
|
|
2258
|
-
"var(--shadow-3-penumbra) var(--color-shadow-penumbra)",
|
|
2259
|
-
"var(--shadow-3-ambient) var(--color-shadow-ambient)"
|
|
2260
|
-
].join(", ")
|
|
2261
|
-
}),
|
|
2262
|
-
...responsiveRules("shadow-4", {
|
|
2263
|
-
boxShadow: [
|
|
2264
|
-
"var(--card-shadow-outline) var(--color-shadow-outline)",
|
|
2265
|
-
"var(--shadow-4-umbra) var(--color-shadow-umbra)",
|
|
2266
|
-
"var(--shadow-4-penumbra) var(--color-shadow-penumbra)",
|
|
2267
|
-
"var(--shadow-4-ambient) var(--color-shadow-ambient)"
|
|
2268
|
-
].join(", ")
|
|
2269
|
-
}),
|
|
2270
|
-
...responsiveRules("shadow-5", {
|
|
2271
|
-
boxShadow: [
|
|
2272
|
-
"var(--card-shadow-outline) var(--color-shadow-outline)",
|
|
2273
|
-
"var(--shadow-5-umbra) var(--color-shadow-umbra)",
|
|
2274
|
-
"var(--shadow-5-penumbra) var(--color-shadow-penumbra)",
|
|
2275
|
-
"var(--shadow-5-ambient) var(--color-shadow-ambient)"
|
|
2276
|
-
].join(", ")
|
|
2277
|
-
})
|
|
2278
|
-
}, widthRules = {
|
|
2279
|
-
"w-fill": {
|
|
2280
|
-
width: ["-moz-available", "-webkit-fill-available", "stretch"]
|
|
2281
|
-
}
|
|
2282
|
-
}, rules = {
|
|
2283
|
-
// styless
|
|
2284
|
-
...displayRules,
|
|
2285
|
-
...flexRules,
|
|
2286
|
-
...flexItemRules,
|
|
2287
|
-
...gridItemRules,
|
|
2288
|
-
...borderRules,
|
|
2289
|
-
...paddingRules,
|
|
2290
|
-
...paddingXRules,
|
|
2291
|
-
...paddingYRules,
|
|
2292
|
-
...paddingTopRules,
|
|
2293
|
-
...paddingRightRules,
|
|
2294
|
-
...paddingBottomRules,
|
|
2295
|
-
...paddingLeftRules,
|
|
2296
|
-
...pointerEventsRules,
|
|
2297
|
-
...marginRules,
|
|
2298
|
-
...marginXRules,
|
|
2299
|
-
...marginYRules,
|
|
2300
|
-
...marginTopRules,
|
|
2301
|
-
...marginRightRules,
|
|
2302
|
-
...marginBottomRules,
|
|
2303
|
-
...marginLeftRules,
|
|
2304
|
-
...fontRules,
|
|
2305
|
-
...gapRules,
|
|
2306
|
-
...gridRules,
|
|
2307
|
-
...heightRules,
|
|
2308
|
-
...overflowRules,
|
|
2309
|
-
...positionRules,
|
|
2310
|
-
...radiusRules,
|
|
2311
|
-
...shadowRules,
|
|
2312
|
-
...widthRules,
|
|
2313
|
-
// primitives
|
|
2314
|
-
...avatarRules,
|
|
2315
|
-
...badgeRules,
|
|
2316
|
-
...boxRules,
|
|
2317
|
-
...buttonRules,
|
|
2318
|
-
...cardRules,
|
|
2319
|
-
...checkboxRules,
|
|
2320
|
-
...codeRules,
|
|
2321
|
-
...containerRules,
|
|
2322
|
-
...headingRules,
|
|
2323
|
-
...kbdRules,
|
|
2324
|
-
...labelRules,
|
|
2325
|
-
...maxWidthRules,
|
|
2326
|
-
...popoverRules,
|
|
2327
|
-
...radioRules,
|
|
2328
|
-
...selectRules,
|
|
2329
|
-
...selectableRules,
|
|
2330
|
-
...spinnerRules,
|
|
2331
|
-
...switchRules,
|
|
2332
|
-
...textRules,
|
|
2333
|
-
...textAreaRules,
|
|
2334
|
-
...textInputRules,
|
|
2335
|
-
...tokenRules,
|
|
2336
|
-
...tooltipRules,
|
|
2337
|
-
// components
|
|
2338
|
-
...breadcrumbsRules,
|
|
2339
|
-
...dialogRules
|
|
2340
|
-
};
|
|
2341
|
-
function compileRule(selector, props) {
|
|
2342
|
-
return compileProperties(selector, props) + compileNestedRules(selector, props["@nest"]);
|
|
2343
|
-
}
|
|
2344
|
-
function compileProperties(selector, props) {
|
|
2345
|
-
let css = "{";
|
|
2346
|
-
for (const key in props) {
|
|
2347
|
-
if (key === "@keyframes" || key === "@media" || key === "@nest") continue;
|
|
2348
|
-
const value = props[key], valueArr = Array.isArray(value) ? value : [value];
|
|
2349
|
-
for (const v of valueArr)
|
|
2350
|
-
css += toSnakeCase(key) + ":" + v + ";";
|
|
2351
|
-
}
|
|
2352
|
-
return css.length === 1 ? "" : selector + css + "}";
|
|
2353
|
-
}
|
|
2354
|
-
function compileNestedRules(selector, props) {
|
|
2355
|
-
if (!props) return "";
|
|
2356
|
-
let css = "";
|
|
2357
|
-
for (const key in props) {
|
|
2358
|
-
const value = props[key];
|
|
2359
|
-
css += `
|
|
2360
|
-
` + key.replace(/&/g, selector) + compileProperties(selector, value).substring(selector.length);
|
|
2361
|
-
}
|
|
2362
|
-
return css;
|
|
2363
|
-
}
|
|
2364
|
-
function compileMediaQueryRule(query, rules2) {
|
|
2365
|
-
let css = `@media ${query}{`;
|
|
2366
|
-
for (const key in rules2)
|
|
2367
|
-
css += `
|
|
2368
|
-
` + compileRule(`.${key}`.replace(/:/g, "\\:"), rules2[key]);
|
|
2369
|
-
return css + `
|
|
2370
|
-
}`;
|
|
2371
|
-
}
|
|
2372
|
-
function toSnakeCase(value) {
|
|
2373
|
-
return value.replace(/[A-Z]/g, (match) => "-" + match.toLowerCase());
|
|
2374
|
-
}
|
|
2375
|
-
function compileRules(rules2) {
|
|
2376
|
-
let css = "";
|
|
2377
|
-
const keyframes = {}, mediaQueries = {};
|
|
2378
|
-
for (const [className, props] of Object.entries(rules2)) {
|
|
2379
|
-
const selectorCss = compileRule(`.${className}`.replace(/:/g, "\\:"), props);
|
|
2380
|
-
if (css += selectorCss ? `${selectorCss}
|
|
2381
|
-
` : "", props["@keyframes"])
|
|
2382
|
-
for (const name in props["@keyframes"])
|
|
2383
|
-
keyframes[name] = props["@keyframes"][name];
|
|
2384
|
-
if (props["@media"])
|
|
2385
|
-
for (const key in props["@media"])
|
|
2386
|
-
mediaQueries[key] || (mediaQueries[key] = {}), mediaQueries[key][className] = props["@media"][key];
|
|
2387
|
-
}
|
|
2388
|
-
for (const [name, value] of Object.entries(keyframes)) {
|
|
2389
|
-
let keyframesCss = `@keyframes ${name} {
|
|
2390
|
-
`;
|
|
2391
|
-
for (const [key, props] of Object.entries(value))
|
|
2392
|
-
keyframesCss += ` ${key} {
|
|
2393
|
-
`, keyframesCss += compileRule("", props).replace(/\n/g, `
|
|
2394
|
-
`) + `
|
|
2395
|
-
`, keyframesCss += ` }
|
|
2396
|
-
`;
|
|
2397
|
-
keyframesCss += `}
|
|
2398
|
-
`, css += keyframesCss;
|
|
2399
|
-
}
|
|
2400
|
-
for (const [query, queryRules] of Object.entries(mediaQueries))
|
|
2401
|
-
css += compileMediaQueryRule(query, queryRules) + `
|
|
2402
|
-
`;
|
|
2403
|
-
return css.replace(/\n{2,}/g, `
|
|
2404
|
-
`).trimStart();
|
|
2405
|
-
}
|
|
2406
|
-
function compileSystem() {
|
|
2407
|
-
return compileRules(rules);
|
|
2408
|
-
}
|
|
2409
|
-
function rem(value) {
|
|
2410
|
-
return value === 0 ? "0" : `${value / 16}rem`;
|
|
2411
|
-
}
|
|
2412
|
-
function px(value) {
|
|
2413
|
-
return value === 0 ? "0" : `${value}px`;
|
|
2414
|
-
}
|
|
2415
|
-
function toBoxShadow(value) {
|
|
2416
|
-
return value ? value.map((n) => px(n)).join(" ") : "none";
|
|
2417
|
-
}
|
|
2418
|
-
function countThemeEntries(obj) {
|
|
2419
|
-
let count = 0;
|
|
2420
|
-
if (isArray(obj))
|
|
2421
|
-
for (let i = 0; i < obj.length; i++) {
|
|
2422
|
-
const value = obj[i];
|
|
2423
|
-
isRecord(value) || isArray(value) ? count += countThemeEntries(value) : count++;
|
|
2424
|
-
}
|
|
2425
|
-
else
|
|
2426
|
-
for (const [key, value] of Object.entries(obj))
|
|
2427
|
-
key.startsWith("_") || (isRecord(value) || isArray(value) ? count += countThemeEntries(value) : count++);
|
|
2428
|
-
return count;
|
|
2429
|
-
}
|
|
2430
|
-
function compileTheme(theme2) {
|
|
2431
|
-
for (const [key, val] of Object.entries(theme2.color.light.default))
|
|
2432
|
-
(isRecord(val) || isArray(val)) && console.log(key, countThemeEntries(val));
|
|
2433
|
-
return [
|
|
2434
|
-
compileRule(".root", {
|
|
2435
|
-
[varNames.avatar.focusRing.offset]: px(theme2.avatar.focusRing.offset),
|
|
2436
|
-
[varNames.avatar.focusRing.width]: px(theme2.avatar.focusRing.width),
|
|
2437
|
-
// [varNames.avatar.size[0].distance]: px(theme.avatar.size[0].distance),
|
|
2438
|
-
// [varNames.avatar.size[0].size]: px(theme.avatar.size[0].size),
|
|
2439
|
-
"--avatar-0-distance": px(theme2.avatar.sizes[0].distance),
|
|
2440
|
-
"--avatar-0-size": px(theme2.avatar.sizes[0].size),
|
|
2441
|
-
"--avatar-1-distance": px(theme2.avatar.sizes[1].distance),
|
|
2442
|
-
"--avatar-1-size": px(theme2.avatar.sizes[1].size),
|
|
2443
|
-
"--avatar-2-distance": px(theme2.avatar.sizes[2].distance),
|
|
2444
|
-
"--avatar-2-size": px(theme2.avatar.sizes[2].size),
|
|
2445
|
-
"--avatar-3-distance": px(theme2.avatar.sizes[3].distance),
|
|
2446
|
-
"--avatar-3-size": px(theme2.avatar.sizes[3].size),
|
|
2447
|
-
"--button-border-width": px(theme2.button.border.width),
|
|
2448
|
-
"--button-focus-ring-offset": px(theme2.button.focusRing.offset),
|
|
2449
|
-
"--button-focus-ring-width": px(theme2.button.focusRing.width),
|
|
2450
|
-
"--button-text-weight": `${theme2.button.textWeight}`,
|
|
2451
|
-
"--card-border-width": px(theme2.card.border.width),
|
|
2452
|
-
"--card-focus-ring-offset": px(theme2.card.focusRing.offset),
|
|
2453
|
-
"--card-focus-ring-width": px(theme2.card.focusRing.width),
|
|
2454
|
-
"--card-shadow-outline": `0 0 0 ${px(theme2.card.shadow.outline)}`,
|
|
2455
|
-
"--font-code-family": theme2.font.code.family,
|
|
2456
|
-
"--font-code-weight-regular": `${theme2.font.code.weights.regular}`,
|
|
2457
|
-
"--font-code-weight-medium": `${theme2.font.code.weights.medium}`,
|
|
2458
|
-
"--font-code-weight-semibold": `${theme2.font.code.weights.semibold}`,
|
|
2459
|
-
"--font-code-weight-bold": `${theme2.font.code.weights.bold}`,
|
|
2460
|
-
"--font-code-0-size": rem(theme2.font.code.sizes[0].fontSize),
|
|
2461
|
-
"--font-code-0-line-height": rem(theme2.font.code.sizes[0].lineHeight),
|
|
2462
|
-
"--font-code-0-ascender-height": px(theme2.font.code.sizes[0].ascenderHeight),
|
|
2463
|
-
"--font-code-0-descender-height": px(theme2.font.code.sizes[0].descenderHeight),
|
|
2464
|
-
"--font-code-0-letter-spacing": px(theme2.font.code.sizes[0].letterSpacing),
|
|
2465
|
-
"--font-code-0-icon-size": px(theme2.font.code.sizes[0].iconSize),
|
|
2466
|
-
"--font-code-1-size": rem(theme2.font.code.sizes[1].fontSize),
|
|
2467
|
-
"--font-code-1-line-height": px(theme2.font.code.sizes[1].lineHeight),
|
|
2468
|
-
"--font-code-1-ascender-height": px(theme2.font.code.sizes[1].ascenderHeight),
|
|
2469
|
-
"--font-code-1-descender-height": px(theme2.font.code.sizes[1].descenderHeight),
|
|
2470
|
-
"--font-code-1-letter-spacing": px(theme2.font.code.sizes[1].letterSpacing),
|
|
2471
|
-
"--font-code-1-icon-size": px(theme2.font.code.sizes[1].iconSize),
|
|
2472
|
-
"--font-code-2-size": rem(theme2.font.code.sizes[2].fontSize),
|
|
2473
|
-
"--font-code-2-line-height": rem(theme2.font.code.sizes[2].lineHeight),
|
|
2474
|
-
"--font-code-2-ascender-height": px(theme2.font.code.sizes[2].ascenderHeight),
|
|
2475
|
-
"--font-code-2-descender-height": px(theme2.font.code.sizes[2].descenderHeight),
|
|
2476
|
-
"--font-code-2-letter-spacing": px(theme2.font.code.sizes[2].letterSpacing),
|
|
2477
|
-
"--font-code-2-icon-size": px(theme2.font.code.sizes[2].iconSize),
|
|
2478
|
-
"--font-code-3-size": rem(theme2.font.code.sizes[3].fontSize),
|
|
2479
|
-
"--font-code-3-line-height": rem(theme2.font.code.sizes[3].lineHeight),
|
|
2480
|
-
"--font-code-3-ascender-height": px(theme2.font.code.sizes[3].ascenderHeight),
|
|
2481
|
-
"--font-code-3-descender-height": px(theme2.font.code.sizes[3].descenderHeight),
|
|
2482
|
-
"--font-code-3-letter-spacing": px(theme2.font.code.sizes[3].letterSpacing),
|
|
2483
|
-
"--font-code-3-icon-size": px(theme2.font.code.sizes[3].iconSize),
|
|
2484
|
-
"--font-code-4-size": rem(theme2.font.code.sizes[4].fontSize),
|
|
2485
|
-
"--font-code-4-line-height": rem(theme2.font.code.sizes[4].lineHeight),
|
|
2486
|
-
"--font-code-4-ascender-height": px(theme2.font.code.sizes[4].ascenderHeight),
|
|
2487
|
-
"--font-code-4-descender-height": px(theme2.font.code.sizes[4].descenderHeight),
|
|
2488
|
-
"--font-code-4-letter-spacing": px(theme2.font.code.sizes[4].letterSpacing),
|
|
2489
|
-
"--font-code-4-icon-size": px(theme2.font.code.sizes[4].iconSize),
|
|
2490
|
-
"--font-heading-family": theme2.font.heading.family,
|
|
2491
|
-
"--font-heading-weight-regular": `${theme2.font.heading.weights.regular}`,
|
|
2492
|
-
"--font-heading-weight-medium": `${theme2.font.heading.weights.medium}`,
|
|
2493
|
-
"--font-heading-weight-semibold": `${theme2.font.heading.weights.semibold}`,
|
|
2494
|
-
"--font-heading-weight-bold": `${theme2.font.heading.weights.bold}`,
|
|
2495
|
-
"--font-heading-0-size": rem(theme2.font.heading.sizes[0].fontSize),
|
|
2496
|
-
"--font-heading-0-line-height": rem(theme2.font.heading.sizes[0].lineHeight),
|
|
2497
|
-
"--font-heading-0-ascender-height": px(theme2.font.heading.sizes[0].ascenderHeight),
|
|
2498
|
-
"--font-heading-0-descender-height": px(theme2.font.heading.sizes[0].descenderHeight),
|
|
2499
|
-
"--font-heading-0-letter-spacing": px(theme2.font.heading.sizes[0].letterSpacing),
|
|
2500
|
-
"--font-heading-0-icon-size": px(theme2.font.heading.sizes[0].iconSize),
|
|
2501
|
-
"--font-heading-1-size": rem(theme2.font.heading.sizes[1].fontSize),
|
|
2502
|
-
"--font-heading-1-line-height": rem(theme2.font.heading.sizes[1].lineHeight),
|
|
2503
|
-
"--font-heading-1-ascender-height": px(theme2.font.heading.sizes[1].ascenderHeight),
|
|
2504
|
-
"--font-heading-1-descender-height": px(theme2.font.heading.sizes[1].descenderHeight),
|
|
2505
|
-
"--font-heading-1-letter-spacing": px(theme2.font.heading.sizes[1].letterSpacing),
|
|
2506
|
-
"--font-heading-1-icon-size": px(theme2.font.heading.sizes[1].iconSize),
|
|
2507
|
-
"--font-heading-2-size": rem(theme2.font.heading.sizes[2].fontSize),
|
|
2508
|
-
"--font-heading-2-line-height": rem(theme2.font.heading.sizes[2].lineHeight),
|
|
2509
|
-
"--font-heading-2-ascender-height": px(theme2.font.heading.sizes[2].ascenderHeight),
|
|
2510
|
-
"--font-heading-2-descender-height": px(theme2.font.heading.sizes[2].descenderHeight),
|
|
2511
|
-
"--font-heading-2-letter-spacing": px(theme2.font.heading.sizes[2].letterSpacing),
|
|
2512
|
-
"--font-heading-2-icon-size": px(theme2.font.heading.sizes[2].iconSize),
|
|
2513
|
-
"--font-heading-3-size": rem(theme2.font.heading.sizes[3].fontSize),
|
|
2514
|
-
"--font-heading-3-line-height": rem(theme2.font.heading.sizes[3].lineHeight),
|
|
2515
|
-
"--font-heading-3-ascender-height": px(theme2.font.heading.sizes[3].ascenderHeight),
|
|
2516
|
-
"--font-heading-3-descender-height": px(theme2.font.heading.sizes[3].descenderHeight),
|
|
2517
|
-
"--font-heading-3-letter-spacing": px(theme2.font.heading.sizes[3].letterSpacing),
|
|
2518
|
-
"--font-heading-3-icon-size": px(theme2.font.heading.sizes[3].iconSize),
|
|
2519
|
-
"--font-heading-4-size": rem(theme2.font.heading.sizes[4].fontSize),
|
|
2520
|
-
"--font-heading-4-line-height": rem(theme2.font.heading.sizes[4].lineHeight),
|
|
2521
|
-
"--font-heading-4-ascender-height": px(theme2.font.heading.sizes[4].ascenderHeight),
|
|
2522
|
-
"--font-heading-4-descender-height": px(theme2.font.heading.sizes[4].descenderHeight),
|
|
2523
|
-
"--font-heading-4-letter-spacing": px(theme2.font.heading.sizes[4].letterSpacing),
|
|
2524
|
-
"--font-heading-4-icon-size": px(theme2.font.heading.sizes[4].iconSize),
|
|
2525
|
-
"--font-heading-5-size": rem(theme2.font.heading.sizes[5].fontSize),
|
|
2526
|
-
"--font-heading-5-line-height": rem(theme2.font.heading.sizes[5].lineHeight),
|
|
2527
|
-
"--font-heading-5-ascender-height": px(theme2.font.heading.sizes[5].ascenderHeight),
|
|
2528
|
-
"--font-heading-5-descender-height": px(theme2.font.heading.sizes[5].descenderHeight),
|
|
2529
|
-
"--font-heading-5-letter-spacing": px(theme2.font.heading.sizes[5].letterSpacing),
|
|
2530
|
-
"--font-heading-5-icon-size": px(theme2.font.heading.sizes[5].iconSize),
|
|
2531
|
-
"--font-label-family": theme2.font.label.family,
|
|
2532
|
-
"--font-label-weight-regular": `${theme2.font.label.weights.regular}`,
|
|
2533
|
-
"--font-label-weight-medium": `${theme2.font.label.weights.medium}`,
|
|
2534
|
-
"--font-label-weight-semibold": `${theme2.font.label.weights.semibold}`,
|
|
2535
|
-
"--font-label-weight-bold": `${theme2.font.label.weights.bold}`,
|
|
2536
|
-
"--font-label-0-size": rem(theme2.font.label.sizes[0].fontSize),
|
|
2537
|
-
"--font-label-0-line-height": rem(theme2.font.label.sizes[0].lineHeight),
|
|
2538
|
-
"--font-label-0-ascender-height": px(theme2.font.label.sizes[0].ascenderHeight),
|
|
2539
|
-
"--font-label-0-descender-height": px(theme2.font.label.sizes[0].descenderHeight),
|
|
2540
|
-
"--font-label-0-letter-spacing": px(theme2.font.label.sizes[0].letterSpacing),
|
|
2541
|
-
"--font-label-0-icon-size": px(theme2.font.label.sizes[0].iconSize),
|
|
2542
|
-
"--font-label-1-size": rem(theme2.font.label.sizes[1].fontSize),
|
|
2543
|
-
"--font-label-1-line-height": rem(theme2.font.label.sizes[1].lineHeight),
|
|
2544
|
-
"--font-label-1-ascender-height": px(theme2.font.label.sizes[1].ascenderHeight),
|
|
2545
|
-
"--font-label-1-descender-height": px(theme2.font.label.sizes[1].descenderHeight),
|
|
2546
|
-
"--font-label-1-letter-spacing": px(theme2.font.label.sizes[1].letterSpacing),
|
|
2547
|
-
"--font-label-1-icon-size": px(theme2.font.label.sizes[1].iconSize),
|
|
2548
|
-
"--font-label-2-size": rem(theme2.font.label.sizes[2].fontSize),
|
|
2549
|
-
"--font-label-2-line-height": rem(theme2.font.label.sizes[2].lineHeight),
|
|
2550
|
-
"--font-label-2-ascender-height": px(theme2.font.label.sizes[2].ascenderHeight),
|
|
2551
|
-
"--font-label-2-descender-height": px(theme2.font.label.sizes[2].descenderHeight),
|
|
2552
|
-
"--font-label-2-letter-spacing": px(theme2.font.label.sizes[2].letterSpacing),
|
|
2553
|
-
"--font-label-2-icon-size": px(theme2.font.label.sizes[2].iconSize),
|
|
2554
|
-
"--font-label-3-size": rem(theme2.font.label.sizes[3].fontSize),
|
|
2555
|
-
"--font-label-3-line-height": rem(theme2.font.label.sizes[3].lineHeight),
|
|
2556
|
-
"--font-label-3-ascender-height": px(theme2.font.label.sizes[3].ascenderHeight),
|
|
2557
|
-
"--font-label-3-descender-height": px(theme2.font.label.sizes[3].descenderHeight),
|
|
2558
|
-
"--font-label-3-letter-spacing": px(theme2.font.label.sizes[3].letterSpacing),
|
|
2559
|
-
"--font-label-3-icon-size": px(theme2.font.label.sizes[3].iconSize),
|
|
2560
|
-
"--font-label-4-size": rem(theme2.font.label.sizes[4].fontSize),
|
|
2561
|
-
"--font-label-4-line-height": rem(theme2.font.label.sizes[4].lineHeight),
|
|
2562
|
-
"--font-label-4-ascender-height": px(theme2.font.label.sizes[4].ascenderHeight),
|
|
2563
|
-
"--font-label-4-descender-height": px(theme2.font.label.sizes[4].descenderHeight),
|
|
2564
|
-
"--font-label-4-letter-spacing": px(theme2.font.label.sizes[4].letterSpacing),
|
|
2565
|
-
"--font-label-4-icon-size": px(theme2.font.label.sizes[4].iconSize),
|
|
2566
|
-
"--font-label-5-size": rem(theme2.font.label.sizes[5].fontSize),
|
|
2567
|
-
"--font-label-5-line-height": rem(theme2.font.label.sizes[5].lineHeight),
|
|
2568
|
-
"--font-label-5-ascender-height": px(theme2.font.label.sizes[5].ascenderHeight),
|
|
2569
|
-
"--font-label-5-descender-height": px(theme2.font.label.sizes[5].descenderHeight),
|
|
2570
|
-
"--font-label-5-letter-spacing": px(theme2.font.label.sizes[5].letterSpacing),
|
|
2571
|
-
"--font-label-5-icon-size": px(theme2.font.label.sizes[5].iconSize),
|
|
2572
|
-
"--font-text-family": theme2.font.text.family,
|
|
2573
|
-
"--font-text-weight-regular": `${theme2.font.text.weights.regular}`,
|
|
2574
|
-
"--font-text-weight-medium": `${theme2.font.text.weights.medium}`,
|
|
2575
|
-
"--font-text-weight-semibold": `${theme2.font.text.weights.semibold}`,
|
|
2576
|
-
"--font-text-weight-bold": `${theme2.font.text.weights.bold}`,
|
|
2577
|
-
"--font-text-0-size": rem(theme2.font.text.sizes[0].fontSize),
|
|
2578
|
-
"--font-text-0-line-height": rem(theme2.font.text.sizes[0].lineHeight),
|
|
2579
|
-
"--font-text-0-ascender-height": px(theme2.font.text.sizes[0].ascenderHeight),
|
|
2580
|
-
"--font-text-0-descender-height": px(theme2.font.text.sizes[0].descenderHeight),
|
|
2581
|
-
"--font-text-0-letter-spacing": px(theme2.font.text.sizes[0].letterSpacing),
|
|
2582
|
-
"--font-text-0-icon-size": px(theme2.font.text.sizes[0].iconSize),
|
|
2583
|
-
"--font-text-1-size": rem(theme2.font.text.sizes[1].fontSize),
|
|
2584
|
-
"--font-text-1-line-height": rem(theme2.font.text.sizes[1].lineHeight),
|
|
2585
|
-
"--font-text-1-ascender-height": px(theme2.font.text.sizes[1].ascenderHeight),
|
|
2586
|
-
"--font-text-1-descender-height": px(theme2.font.text.sizes[1].descenderHeight),
|
|
2587
|
-
"--font-text-1-letter-spacing": px(theme2.font.text.sizes[1].letterSpacing),
|
|
2588
|
-
"--font-text-1-icon-size": px(theme2.font.text.sizes[1].iconSize),
|
|
2589
|
-
"--font-text-2-size": rem(theme2.font.text.sizes[2].fontSize),
|
|
2590
|
-
"--font-text-2-line-height": rem(theme2.font.text.sizes[2].lineHeight),
|
|
2591
|
-
"--font-text-2-ascender-height": px(theme2.font.text.sizes[2].ascenderHeight),
|
|
2592
|
-
"--font-text-2-descender-height": px(theme2.font.text.sizes[2].descenderHeight),
|
|
2593
|
-
"--font-text-2-letter-spacing": px(theme2.font.text.sizes[2].letterSpacing),
|
|
2594
|
-
"--font-text-2-icon-size": px(theme2.font.text.sizes[2].iconSize),
|
|
2595
|
-
"--font-text-3-size": rem(theme2.font.text.sizes[3].fontSize),
|
|
2596
|
-
"--font-text-3-line-height": rem(theme2.font.text.sizes[3].lineHeight),
|
|
2597
|
-
"--font-text-3-ascender-height": px(theme2.font.text.sizes[3].ascenderHeight),
|
|
2598
|
-
"--font-text-3-descender-height": px(theme2.font.text.sizes[3].descenderHeight),
|
|
2599
|
-
"--font-text-3-letter-spacing": px(theme2.font.text.sizes[3].letterSpacing),
|
|
2600
|
-
"--font-text-3-icon-size": px(theme2.font.text.sizes[3].iconSize),
|
|
2601
|
-
"--font-text-4-size": rem(theme2.font.text.sizes[4].fontSize),
|
|
2602
|
-
"--font-text-4-line-height": rem(theme2.font.text.sizes[4].lineHeight),
|
|
2603
|
-
"--font-text-4-ascender-height": px(theme2.font.text.sizes[4].ascenderHeight),
|
|
2604
|
-
"--font-text-4-descender-height": px(theme2.font.text.sizes[4].descenderHeight),
|
|
2605
|
-
"--font-text-4-letter-spacing": px(theme2.font.text.sizes[4].letterSpacing),
|
|
2606
|
-
"--font-text-4-icon-size": px(theme2.font.text.sizes[4].iconSize),
|
|
2607
|
-
"--input-border-width": px(theme2.input.border.width),
|
|
2608
|
-
"--input-checkbox-focus-ring-offset": px(theme2.input.checkbox.focusRing.offset),
|
|
2609
|
-
"--input-checkbox-focus-ring-width": px(theme2.input.checkbox.focusRing.width),
|
|
2610
|
-
"--input-checkbox-size": px(theme2.input.checkbox.size),
|
|
2611
|
-
"--input-radio-focus-ring-offset": px(theme2.input.radio.focusRing.offset),
|
|
2612
|
-
"--input-radio-focus-ring-width": px(theme2.input.radio.focusRing.width),
|
|
2613
|
-
"--input-radio-mark-size": px(theme2.input.radio.markSize),
|
|
2614
|
-
"--input-radio-size": px(theme2.input.radio.size),
|
|
2615
|
-
"--input-select-focus-ring-offset": px(theme2.input.select.focusRing.offset),
|
|
2616
|
-
"--input-select-focus-ring-width": px(theme2.input.select.focusRing.width),
|
|
2617
|
-
"--input-switch-focus-ring-offset": px(theme2.input.switch.focusRing.offset),
|
|
2618
|
-
"--input-switch-focus-ring-width": px(theme2.input.switch.focusRing.width),
|
|
2619
|
-
"--input-switch-width": px(theme2.input.switch.width),
|
|
2620
|
-
"--input-switch-height": px(theme2.input.switch.height),
|
|
2621
|
-
"--input-switch-padding": px(theme2.input.switch.padding),
|
|
2622
|
-
"--input-switch-transition-duration-ms": px(theme2.input.switch.transitionDurationMs),
|
|
2623
|
-
"--input-switch-transition-timing-function": theme2.input.switch.transitionTimingFunction,
|
|
2624
|
-
"--input-text-focus-ring-offset": px(theme2.input.text.focusRing.offset),
|
|
2625
|
-
"--input-text-focus-ring-width": px(theme2.input.text.focusRing.width),
|
|
2626
|
-
"--container-0": px(theme2.container[0]),
|
|
2627
|
-
"--container-1": px(theme2.container[1]),
|
|
2628
|
-
"--container-2": px(theme2.container[2]),
|
|
2629
|
-
"--container-3": px(theme2.container[3]),
|
|
2630
|
-
"--container-4": px(theme2.container[4]),
|
|
2631
|
-
"--container-5": px(theme2.container[5]),
|
|
2632
|
-
"--radius-0": px(theme2.radius[0]),
|
|
2633
|
-
"--radius-1": px(theme2.radius[1]),
|
|
2634
|
-
"--radius-2": px(theme2.radius[2]),
|
|
2635
|
-
"--radius-3": px(theme2.radius[3]),
|
|
2636
|
-
"--radius-4": px(theme2.radius[4]),
|
|
2637
|
-
"--radius-5": px(theme2.radius[5]),
|
|
2638
|
-
"--radius-6": px(theme2.radius[6]),
|
|
2639
|
-
[varNames.space[0]]: rem(theme2.space[0]),
|
|
2640
|
-
[varNames.space[1]]: rem(theme2.space[1]),
|
|
2641
|
-
[varNames.space[2]]: rem(theme2.space[2]),
|
|
2642
|
-
[varNames.space[3]]: rem(theme2.space[3]),
|
|
2643
|
-
[varNames.space[4]]: rem(theme2.space[4]),
|
|
2644
|
-
[varNames.space[5]]: rem(theme2.space[5]),
|
|
2645
|
-
[varNames.space[6]]: rem(theme2.space[6]),
|
|
2646
|
-
[varNames.space[7]]: rem(theme2.space[7]),
|
|
2647
|
-
[varNames.space[8]]: rem(theme2.space[8]),
|
|
2648
|
-
[varNames.space[9]]: rem(theme2.space[9]),
|
|
2649
|
-
"--shadow-0-umbra": toBoxShadow(theme2.shadow[0]?.umbra),
|
|
2650
|
-
//`${theme.shadow[0]?.umbra || 'none'}`,
|
|
2651
|
-
"--shadow-0-penumbra": toBoxShadow(theme2.shadow[0]?.penumbra),
|
|
2652
|
-
"--shadow-0-ambient": toBoxShadow(theme2.shadow[0]?.ambient),
|
|
2653
|
-
"--shadow-1-umbra": toBoxShadow(theme2.shadow[1]?.umbra),
|
|
2654
|
-
"--shadow-1-penumbra": toBoxShadow(theme2.shadow[1]?.penumbra),
|
|
2655
|
-
"--shadow-1-ambient": toBoxShadow(theme2.shadow[1]?.ambient),
|
|
2656
|
-
"--shadow-2-umbra": toBoxShadow(theme2.shadow[2]?.umbra),
|
|
2657
|
-
"--shadow-2-penumbra": toBoxShadow(theme2.shadow[2]?.penumbra),
|
|
2658
|
-
"--shadow-2-ambient": toBoxShadow(theme2.shadow[2]?.ambient),
|
|
2659
|
-
"--shadow-3-umbra": toBoxShadow(theme2.shadow[3]?.umbra),
|
|
2660
|
-
"--shadow-3-penumbra": toBoxShadow(theme2.shadow[3]?.penumbra),
|
|
2661
|
-
"--shadow-3-ambient": toBoxShadow(theme2.shadow[3]?.ambient),
|
|
2662
|
-
"--shadow-4-umbra": toBoxShadow(theme2.shadow[4]?.umbra),
|
|
2663
|
-
"--shadow-4-penumbra": toBoxShadow(theme2.shadow[4]?.penumbra),
|
|
2664
|
-
"--shadow-4-ambient": toBoxShadow(theme2.shadow[4]?.ambient),
|
|
2665
|
-
"--shadow-5-umbra": toBoxShadow(theme2.shadow[5]?.umbra),
|
|
2666
|
-
"--shadow-5-penumbra": toBoxShadow(theme2.shadow[5]?.penumbra),
|
|
2667
|
-
"--shadow-5-ambient": toBoxShadow(theme2.shadow[5]?.ambient),
|
|
2668
|
-
...Object.fromEntries(
|
|
2669
|
-
getThemeEntries(theme2.color, ["color"])
|
|
2670
|
-
)
|
|
2671
|
-
}),
|
|
2672
|
-
compileCardCss({ scheme: "dark", tone: "transparent" }),
|
|
2673
|
-
compileCardCss({ scheme: "dark", tone: "default" }),
|
|
2674
|
-
compileCardCss({ scheme: "dark", tone: "primary" }),
|
|
2675
|
-
compileCardCss({ scheme: "dark", tone: "positive" }),
|
|
2676
|
-
compileCardCss({ scheme: "dark", tone: "caution" }),
|
|
2677
|
-
compileCardCss({ scheme: "dark", tone: "critical" }),
|
|
2678
|
-
compileCardCss({ scheme: "light", tone: "transparent" }),
|
|
2679
|
-
compileCardCss({ scheme: "light", tone: "default" }),
|
|
2680
|
-
compileCardCss({ scheme: "light", tone: "primary" }),
|
|
2681
|
-
compileCardCss({ scheme: "light", tone: "positive" }),
|
|
2682
|
-
compileCardCss({ scheme: "light", tone: "caution" }),
|
|
2683
|
-
compileCardCss({ scheme: "light", tone: "critical" })
|
|
2684
|
-
].join(`
|
|
2685
|
-
|
|
2686
|
-
`);
|
|
2687
|
-
}
|
|
2688
|
-
function compileCardCss(props) {
|
|
2689
|
-
const { scheme, tone } = props, cardVars = vars.color[scheme][tone];
|
|
2690
|
-
return compileRule(`.card[data-scheme="${scheme}"][data-tone="${tone}"]`, {
|
|
2691
|
-
"--color-accent-fg": cardVars.accent.fg,
|
|
2692
|
-
...theme.THEME_COLOR_AVATAR_COLORS.reduce((acc, color) => ({
|
|
2693
|
-
...acc,
|
|
2694
|
-
[`--color-avatar-${color}-bg`]: cardVars.avatar[color].bg,
|
|
2695
|
-
[`--color-avatar-${color}-fg`]: cardVars.avatar[color].fg
|
|
2696
|
-
}), {}),
|
|
2697
|
-
"--color-backdrop": cardVars.backdrop,
|
|
2698
|
-
...theme.THEME_COLOR_STATE_TONES.reduce((acc, tone2) => ({
|
|
2699
|
-
...acc,
|
|
2700
|
-
[`--color-badge-${tone2}-bg`]: cardVars.badge[tone2].bg,
|
|
2701
|
-
[`--color-badge-${tone2}-dot`]: cardVars.badge[tone2].dot,
|
|
2702
|
-
[`--color-badge-${tone2}-fg`]: cardVars.badge[tone2].fg,
|
|
2703
|
-
[`--color-badge-${tone2}-icon`]: cardVars.badge[tone2].icon
|
|
2704
|
-
}), {}),
|
|
2705
|
-
"--color-bg": cardVars.bg,
|
|
2706
|
-
"--color-border": cardVars.border,
|
|
2707
|
-
// todo: button
|
|
2708
|
-
"--color-code-bg": cardVars.code.bg,
|
|
2709
|
-
"--color-code-fg": cardVars.code.fg,
|
|
2710
|
-
"--color-fg": cardVars.fg,
|
|
2711
|
-
"--color-focus-ring": cardVars.focusRing,
|
|
2712
|
-
"--color-icon": cardVars.icon,
|
|
2713
|
-
"--color-input-default-enabled-bg": cardVars.input.default.enabled.bg,
|
|
2714
|
-
"--color-input-default-enabled-border": cardVars.input.default.enabled.border,
|
|
2715
|
-
"--color-input-default-enabled-fg": cardVars.input.default.enabled.fg,
|
|
2716
|
-
"--color-input-default-enabled-muted-bg": cardVars.input.default.enabled.muted.bg,
|
|
2717
|
-
"--color-input-default-enabled-placeholder": cardVars.input.default.enabled.placeholder,
|
|
2718
|
-
"--color-input-default-hovered-bg": cardVars.input.default.hovered.bg,
|
|
2719
|
-
"--color-input-default-hovered-border": cardVars.input.default.hovered.border,
|
|
2720
|
-
"--color-input-default-hovered-fg": cardVars.input.default.hovered.fg,
|
|
2721
|
-
"--color-input-default-hovered-muted-bg": cardVars.input.default.hovered.muted.bg,
|
|
2722
|
-
"--color-input-default-hovered-placeholder": cardVars.input.default.hovered.placeholder,
|
|
2723
|
-
"--color-input-default-readOnly-bg": cardVars.input.default.readOnly.bg,
|
|
2724
|
-
"--color-input-default-readOnly-border": cardVars.input.default.readOnly.border,
|
|
2725
|
-
"--color-input-default-readOnly-fg": cardVars.input.default.readOnly.fg,
|
|
2726
|
-
"--color-input-default-readOnly-muted-bg": cardVars.input.default.readOnly.muted.bg,
|
|
2727
|
-
"--color-input-default-readOnly-placeholder": cardVars.input.default.readOnly.placeholder,
|
|
2728
|
-
"--color-input-default-disabled-bg": cardVars.input.default.disabled.bg,
|
|
2729
|
-
"--color-input-default-disabled-border": cardVars.input.default.disabled.border,
|
|
2730
|
-
"--color-input-default-disabled-fg": cardVars.input.default.disabled.fg,
|
|
2731
|
-
"--color-input-default-disabled-muted-bg": cardVars.input.default.disabled.muted.bg,
|
|
2732
|
-
"--color-input-default-disabled-placeholder": cardVars.input.default.disabled.placeholder,
|
|
2733
|
-
"--color-input-invalid-enabled-bg": cardVars.input.invalid.enabled.bg,
|
|
2734
|
-
"--color-input-invalid-enabled-border": cardVars.input.invalid.enabled.border,
|
|
2735
|
-
"--color-input-invalid-enabled-fg": cardVars.input.invalid.enabled.fg,
|
|
2736
|
-
"--color-input-invalid-enabled-muted-bg": cardVars.input.invalid.enabled.muted.bg,
|
|
2737
|
-
"--color-input-invalid-enabled-placeholder": cardVars.input.invalid.enabled.placeholder,
|
|
2738
|
-
"--color-input-invalid-hovered-bg": cardVars.input.invalid.hovered.bg,
|
|
2739
|
-
"--color-input-invalid-hovered-border": cardVars.input.invalid.hovered.border,
|
|
2740
|
-
"--color-input-invalid-hovered-fg": cardVars.input.invalid.hovered.fg,
|
|
2741
|
-
"--color-input-invalid-hovered-muted-bg": cardVars.input.invalid.hovered.muted.bg,
|
|
2742
|
-
"--color-input-invalid-hovered-placeholder": cardVars.input.invalid.hovered.placeholder,
|
|
2743
|
-
"--color-input-invalid-readOnly-bg": cardVars.input.invalid.readOnly.bg,
|
|
2744
|
-
"--color-input-invalid-readOnly-border": cardVars.input.invalid.readOnly.border,
|
|
2745
|
-
"--color-input-invalid-readOnly-fg": cardVars.input.invalid.readOnly.fg,
|
|
2746
|
-
"--color-input-invalid-readOnly-muted-bg": cardVars.input.invalid.readOnly.muted.bg,
|
|
2747
|
-
"--color-input-invalid-readOnly-placeholder": cardVars.input.invalid.readOnly.placeholder,
|
|
2748
|
-
"--color-input-invalid-disabled-bg": cardVars.input.invalid.disabled.bg,
|
|
2749
|
-
"--color-input-invalid-disabled-border": cardVars.input.invalid.disabled.border,
|
|
2750
|
-
"--color-input-invalid-disabled-fg": cardVars.input.invalid.disabled.fg,
|
|
2751
|
-
"--color-input-invalid-disabled-muted-bg": cardVars.input.invalid.disabled.muted.bg,
|
|
2752
|
-
"--color-input-invalid-disabled-placeholder": cardVars.input.invalid.disabled.placeholder,
|
|
2753
|
-
"--color-kbd-bg": cardVars.kbd.bg,
|
|
2754
|
-
"--color-kbd-border": cardVars.kbd.border,
|
|
2755
|
-
"--color-kbd-fg": cardVars.kbd.fg,
|
|
2756
|
-
"--color-link-fg": cardVars.link.fg,
|
|
2757
|
-
"--color-muted-bg": cardVars.muted.bg,
|
|
2758
|
-
"--color-muted-fg": cardVars.muted.fg,
|
|
2759
|
-
// todo: selectable
|
|
2760
|
-
"--color-shadow-outline": cardVars.shadow.outline,
|
|
2761
|
-
"--color-shadow-umbra": cardVars.shadow.umbra,
|
|
2762
|
-
"--color-shadow-penumbra": cardVars.shadow.penumbra,
|
|
2763
|
-
"--color-shadow-ambient": cardVars.shadow.outline,
|
|
2764
|
-
"--color-skeleton-from": cardVars.skeleton.from,
|
|
2765
|
-
"--color-skeleton-to": cardVars.skeleton.to,
|
|
2766
|
-
// todo: syntax
|
|
2767
|
-
"--color-syntax-atrule": cardVars.syntax.atrule,
|
|
2768
|
-
"--color-syntax-attrName": cardVars.syntax.attrName,
|
|
2769
|
-
"--color-syntax-attrValue": cardVars.syntax.attrValue,
|
|
2770
|
-
"--color-syntax-attribute": cardVars.syntax.attribute,
|
|
2771
|
-
"--color-syntax-boolean": cardVars.syntax.boolean,
|
|
2772
|
-
"--color-syntax-builtin": cardVars.syntax.builtin,
|
|
2773
|
-
"--color-syntax-cdata": cardVars.syntax.cdata,
|
|
2774
|
-
"--color-syntax-char": cardVars.syntax.char,
|
|
2775
|
-
"--color-syntax-class": cardVars.syntax.class,
|
|
2776
|
-
"--color-syntax-className": cardVars.syntax.className,
|
|
2777
|
-
"--color-syntax-comment": cardVars.syntax.comment,
|
|
2778
|
-
"--color-syntax-constant": cardVars.syntax.constant,
|
|
2779
|
-
"--color-syntax-deleted": cardVars.syntax.deleted,
|
|
2780
|
-
"--color-syntax-doctype": cardVars.syntax.doctype,
|
|
2781
|
-
"--color-syntax-entity": cardVars.syntax.entity,
|
|
2782
|
-
"--color-syntax-function": cardVars.syntax.function,
|
|
2783
|
-
"--color-syntax-hexcode": cardVars.syntax.hexcode,
|
|
2784
|
-
"--color-syntax-id": cardVars.syntax.id,
|
|
2785
|
-
"--color-syntax-important": cardVars.syntax.important,
|
|
2786
|
-
"--color-syntax-inserted": cardVars.syntax.inserted,
|
|
2787
|
-
"--color-syntax-keyword": cardVars.syntax.keyword,
|
|
2788
|
-
"--color-syntax-number": cardVars.syntax.number,
|
|
2789
|
-
"--color-syntax-operator": cardVars.syntax.operator,
|
|
2790
|
-
"--color-syntax-prolog": cardVars.syntax.prolog,
|
|
2791
|
-
"--color-syntax-property": cardVars.syntax.property,
|
|
2792
|
-
"--color-syntax-pseudoClass": cardVars.syntax.pseudoClass,
|
|
2793
|
-
"--color-syntax-pseudoElement": cardVars.syntax.pseudoElement,
|
|
2794
|
-
"--color-syntax-punctuation": cardVars.syntax.punctuation,
|
|
2795
|
-
"--color-syntax-regex": cardVars.syntax.regex,
|
|
2796
|
-
"--color-syntax-selector": cardVars.syntax.selector,
|
|
2797
|
-
"--color-syntax-string": cardVars.syntax.string,
|
|
2798
|
-
"--color-syntax-symbol": cardVars.syntax.symbol,
|
|
2799
|
-
"--color-syntax-tag": cardVars.syntax.tag,
|
|
2800
|
-
"--color-syntax-unit": cardVars.syntax.unit,
|
|
2801
|
-
"--color-syntax-url": cardVars.syntax.url,
|
|
2802
|
-
"--color-syntax-variable": cardVars.syntax.variable
|
|
13
|
+
async function buildTheme(outDir) {
|
|
14
|
+
const css$1 = css.compileTheme({
|
|
15
|
+
v3: theme.buildTheme_v3()
|
|
2803
16
|
});
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
if (isArray(obj))
|
|
2808
|
-
for (let i = 0; i < obj.length; i++) {
|
|
2809
|
-
const key = String(i), value = obj[i];
|
|
2810
|
-
isRecord(value) || isArray(value) ? entries.push(...getThemeEntries(value, [...path2, key])) : entries.push([`--${path2.concat(key).join("-")}`, value]);
|
|
2811
|
-
}
|
|
2812
|
-
else
|
|
2813
|
-
for (const [key, value] of Object.entries(obj))
|
|
2814
|
-
key.startsWith("_") || key !== "button" && key !== "selectable" && (isRecord(value) || isArray(value) ? entries.push(...getThemeEntries(value, [...path2, key])) : entries.push([`--${path2.concat(key).join("-")}`, value]));
|
|
2815
|
-
return entries;
|
|
2816
|
-
}
|
|
2817
|
-
function isRecord(value) {
|
|
2818
|
-
return value !== null && typeof value == "object" && !Array.isArray(value);
|
|
2819
|
-
}
|
|
2820
|
-
function isArray(value) {
|
|
2821
|
-
return Array.isArray(value);
|
|
17
|
+
await fs__default.default.mkdir(outDir, {
|
|
18
|
+
recursive: !0
|
|
19
|
+
}), await fs__default.default.writeFile(path__default.default.resolve(outDir, "sanity-theme.css"), css$1, "utf-8"), console.log("- sanity-theme.css");
|
|
2822
20
|
}
|
|
2823
21
|
async function buildSystem(outDir) {
|
|
2824
|
-
const css = compileSystem();
|
|
2825
|
-
await fs__default.default.mkdir(outDir, {
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
const css = compileTheme(theme.buildTheme().v2);
|
|
2829
|
-
await fs__default.default.mkdir(outDir, { recursive: !0 }), await fs__default.default.writeFile(path__default.default.resolve(outDir, "sanity-theme.css"), css, "utf-8"), console.log("- sanity-theme.css");
|
|
22
|
+
const css$1 = css.compileSystem();
|
|
23
|
+
await fs__default.default.mkdir(outDir, {
|
|
24
|
+
recursive: !0
|
|
25
|
+
}), await fs__default.default.writeFile(path__default.default.resolve(outDir, "system.css"), css$1, "utf-8"), console.log("- system.css");
|
|
2830
26
|
}
|
|
2831
27
|
async function buildCommand(options) {
|
|
2832
28
|
const cwd = options.cwd ?? process.cwd(), outDir = options.outDir ?? path__default.default.resolve(cwd, "dist");
|
|
2833
|
-
await
|
|
29
|
+
await buildPalette(outDir), await buildTheme(outDir), await buildSystem(outDir);
|
|
2834
30
|
}
|
|
2835
31
|
exports.buildCommand = buildCommand;
|
|
2836
32
|
//# sourceMappingURL=buildCommand.js.map
|