@sanity/ui 3.0.0-static.15 → 3.0.0-static.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/bin/{ui.js → sanity-ui.cjs} +1 -1
- package/dist/_chunks-cjs/{_visual-editing.js → _visual-editing.cjs} +67 -77
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -0
- package/dist/_chunks-cjs/{buildCommand.js → buildCommand.cjs} +26 -10
- package/dist/_chunks-cjs/buildCommand.cjs.map +1 -0
- package/dist/_chunks-cjs/{refractor.js → refractor.cjs} +1 -1
- package/dist/_chunks-cjs/refractor.cjs.map +1 -0
- package/dist/_chunks-es/{_visual-editing.mjs → _visual-editing.js} +68 -78
- package/dist/_chunks-es/_visual-editing.js.map +1 -0
- package/dist/_chunks-es/{refractor.mjs → refractor.js} +1 -1
- package/dist/_chunks-es/refractor.js.map +1 -0
- package/dist/_visual-editing.cjs +30 -0
- package/dist/_visual-editing.cjs.map +1 -0
- package/dist/{_visual-editing.d.mts → _visual-editing.d.cts} +5 -15
- package/dist/_visual-editing.d.ts +5 -15
- package/dist/_visual-editing.js +29 -30
- package/dist/_visual-editing.js.map +1 -1
- package/dist/{cli.js → cli.cjs} +4 -4
- package/dist/cli.cjs.map +1 -0
- package/dist/{css.mjs → css.cjs} +809 -923
- package/dist/css.cjs.map +1 -0
- package/dist/{css.d.mts → css.d.cts} +31 -24
- package/dist/css.d.ts +31 -24
- package/dist/css.js +809 -921
- package/dist/css.js.map +1 -1
- package/dist/{index.mjs → index.cjs} +373 -406
- package/dist/index.cjs.map +1 -0
- package/dist/{index.d.mts → index.d.cts} +10 -20
- package/dist/index.d.ts +10 -20
- package/dist/index.js +371 -406
- package/dist/index.js.map +1 -1
- package/dist/{theme.mjs → theme.cjs} +219 -196
- package/dist/theme.cjs.map +1 -0
- package/dist/{theme.d.mts → theme.d.cts} +2 -0
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +218 -195
- package/dist/theme.js.map +1 -1
- package/dist/{sanity-palette.css → ui-palette.css} +1 -1
- package/dist/ui-palette.min.css +1 -0
- package/dist/{system.css → ui-system.css} +1135 -245
- package/dist/ui-system.min.css +1 -0
- package/dist/{sanity-theme.css → ui-theme.css} +199 -199
- package/dist/ui-theme.min.css +1 -0
- package/dist/ui.css +29152 -0
- package/dist/ui.min.css +1 -0
- package/exports/_visual-editing.ts +27 -27
- package/exports/index.ts +1 -1
- package/package.json +24 -24
- package/src/cli/buildCommand.ts +55 -20
- package/src/cli/index.ts +2 -14
- package/src/{ui → core}/StyleTags.tsx +4 -4
- package/src/{ui → core}/_compat/index.ts +0 -1
- package/src/{ui → core}/_compat/theme/themeProvider.tsx +3 -3
- package/src/{ui → core}/components/autocomplete/__workshop__/async.tsx +2 -2
- package/src/{ui → core}/components/autocomplete/__workshop__/custom.tsx +2 -2
- package/src/{ui → core}/components/autocomplete/__workshop__/focusAndBlur.tsx +3 -3
- package/src/{ui → core}/components/tab/tabList.tsx +19 -4
- package/src/{ui → core}/index.ts +0 -1
- package/src/{ui → core}/primitives/box/box.tsx +3 -0
- package/src/core/primitives/button/__workshop__/custom.tsx +27 -0
- package/src/{ui → core}/primitives/button/button.tsx +3 -1
- package/src/{ui → core}/primitives/card/__workshop__/asButton.tsx +0 -9
- package/src/{ui → core}/primitives/card/__workshop__/interactive.tsx +0 -1
- package/src/{ui → core}/primitives/card/__workshop__/props.tsx +0 -3
- package/src/{ui → core}/primitives/card/__workshop__/selected.tsx +6 -37
- package/src/{ui → core}/primitives/card/card.tsx +15 -21
- package/src/core/primitives/card/cardProvider.tsx +27 -0
- package/src/{ui → core}/primitives/card/types.ts +5 -4
- package/src/{ui → core}/primitives/heading/__workshop__/opticalAlignment.tsx +1 -1
- package/src/{ui → core}/primitives/heading/__workshop__/plain.tsx +1 -8
- package/src/{ui → core}/primitives/label/__workshop__/plain.tsx +1 -9
- package/src/{ui → core}/primitives/popover/popover.tsx +1 -1
- package/src/{ui → core}/primitives/text/__workshop__/example.tsx +1 -9
- package/src/{ui → core}/primitives/tooltip/tooltip.tsx +1 -1
- package/src/{ui/utils/portal/portal.ts → core/utils/portal/portal.tsx} +8 -10
- package/src/css/{compilePalette.ts → _compilePalette.ts} +2 -2
- package/src/css/{compileSystem.ts → _compileSystem.ts} +1 -1
- package/src/css/{compileTheme.ts → _compileTheme.ts} +3 -3
- package/src/css/{compileTheme_v3.ts → _compileTheme_v3.ts} +7 -1
- package/src/css/_mergeStyles.ts +0 -7
- package/src/css/_system.style.ts +3 -0
- package/src/css/aspects/font/font.style.ts +0 -21
- package/src/css/aspects/font/font.ts +1 -6
- package/src/css/aspects/font/types.ts +0 -4
- package/src/css/aspects/index.ts +1 -0
- package/src/css/aspects/textAlign/index.ts +2 -0
- package/src/css/aspects/textAlign/textAlign.style.ts +26 -0
- package/src/css/aspects/textAlign/textAlign.ts +8 -0
- package/src/css/aspects/textAlign/types.ts +7 -0
- package/src/css/index.ts +3 -3
- package/src/css/primitives/_input/_input.style.ts +9 -11
- package/src/css/primitives/box/box.style.ts +5 -1
- package/src/css/primitives/box/box.ts +2 -0
- package/src/css/primitives/box/types.ts +2 -0
- package/src/css/primitives/button/button.style.ts +23 -9
- package/src/css/primitives/button/button.ts +1 -12
- package/src/css/primitives/button/types.ts +1 -6
- package/src/css/primitives/card/card.style.ts +12 -21
- package/src/css/primitives/heading/heading.ts +2 -1
- package/src/css/primitives/heading/types.ts +2 -1
- package/src/css/primitives/kbd/kbd.style.ts +3 -6
- package/src/css/primitives/label/label.ts +2 -1
- package/src/css/primitives/label/types.ts +2 -1
- package/src/css/primitives/text/text.style.ts +0 -5
- package/src/css/primitives/text/text.ts +2 -1
- package/src/css/primitives/text/types.ts +2 -1
- package/src/css/primitives/textInput/textInput.style.ts +1 -120
- package/src/css/types.ts +9 -9
- package/src/theme/v3/color/buildColor_v3.ts +53 -25
- package/src/theme/v3/color/card.ts +0 -42
- package/src/theme/v3/color/renderColor.test.ts +1 -0
- package/src/theme/v3/color/renderColor.ts +9 -2
- package/src/theme/v3/color/token.ts +1 -0
- package/src/theme/v3/defaultTokens.ts +7 -2
- package/dist/_chunks-cjs/_visual-editing.js.map +0 -1
- package/dist/_chunks-cjs/buildCommand.js.map +0 -1
- package/dist/_chunks-cjs/refractor.js.map +0 -1
- package/dist/_chunks-es/_visual-editing.mjs.map +0 -1
- package/dist/_chunks-es/refractor.mjs.map +0 -1
- package/dist/_visual-editing.mjs +0 -31
- package/dist/_visual-editing.mjs.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/css.mjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/sanity-palette.min.css +0 -1
- package/dist/sanity-theme.min.css +0 -1
- package/dist/system.min.css +0 -1
- package/dist/theme.mjs.map +0 -1
- package/src/css/primitives/button/_constants.ts +0 -17
- package/src/ui/RootClassNames.tsx +0 -44
- package/src/ui/_compat/studioTheme.ts +0 -7
- package/src/ui/primitives/button/__workshop__/custom.tsx +0 -50
- package/src/ui/primitives/card/cardProvider.tsx +0 -21
- /package/dist/{cli.d.ts → cli.d.cts} +0 -0
- /package/src/{ui → core}/_compat/helpers.ts +0 -0
- /package/src/{ui → core}/_compat/styles/_responsive.ts +0 -0
- /package/src/{ui → core}/_compat/styles/index.ts +0 -0
- /package/src/{ui → core}/_compat/theme/index.ts +0 -0
- /package/src/{ui → core}/_compat/theme/theme.test.tsx +0 -0
- /package/src/{ui → core}/_compat/theme/themeColorProvider.tsx +0 -0
- /package/src/{ui → core}/_compat/theme/themeContext.ts +0 -0
- /package/src/{ui → core}/_compat/theme/types.ts +0 -0
- /package/src/{ui → core}/_compat/theme/useRootTheme.ts +0 -0
- /package/src/{ui → core}/_compat/theme/useTheme.ts +0 -0
- /package/src/{ui → core}/_compat/types.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/__mocks__/apiStore.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/__mocks__/countries.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/fullscreen.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/__workshop__/types.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/autocomplete.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/autocompleteOption.tsx +0 -0
- /package/src/{ui → core}/components/autocomplete/autocompleteReducer.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/constants.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/index.ts +0 -0
- /package/src/{ui → core}/components/autocomplete/types.ts +0 -0
- /package/src/{ui → core}/components/breadcrumbs/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/components/breadcrumbs/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/breadcrumbs/breadcrumbs.tsx +0 -0
- /package/src/{ui → core}/components/breadcrumbs/index.ts +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/activate.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/autoFocus.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/layering.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/nested.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/onScroll.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/panes.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/position.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/provider.tsx +0 -0
- /package/src/{ui → core}/components/dialog/__workshop__/wrapped.tsx +0 -0
- /package/src/{ui → core}/components/dialog/dialog.tsx +0 -0
- /package/src/{ui → core}/components/dialog/dialogCard.tsx +0 -0
- /package/src/{ui → core}/components/dialog/dialogContext.ts +0 -0
- /package/src/{ui → core}/components/dialog/dialogProvider.tsx +0 -0
- /package/src/{ui → core}/components/dialog/index.ts +0 -0
- /package/src/{ui → core}/components/dialog/isTargetWithinScope.ts +0 -0
- /package/src/{ui → core}/components/dialog/useDialog.ts +0 -0
- /package/src/{ui → core}/components/hotkeys/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/hotkeys/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/components/hotkeys/hotkeys.tsx +0 -0
- /package/src/{ui → core}/components/hotkeys/index.ts +0 -0
- /package/src/{ui → core}/components/index.ts +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/asComponent.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/avatarMenu.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/closableMenuButton.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/constrainedInBoundary.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/customMenuItem.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/customSelectedState.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/disableFocusOnClose.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/groups.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/menuButton.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/menuGroupRight.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/nestedMenu.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/onCloseMenuButton.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/selectedItem.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/shouldFocus.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/tones.tsx +0 -0
- /package/src/{ui → core}/components/menu/__workshop__/withoutArrow.tsx +0 -0
- /package/src/{ui → core}/components/menu/helpers.ts +0 -0
- /package/src/{ui → core}/components/menu/index.ts +0 -0
- /package/src/{ui → core}/components/menu/menu.test.tsx +0 -0
- /package/src/{ui → core}/components/menu/menu.tsx +0 -0
- /package/src/{ui → core}/components/menu/menuButton.tsx +0 -0
- /package/src/{ui → core}/components/menu/menuContext.ts +0 -0
- /package/src/{ui → core}/components/menu/menuDivider.tsx +0 -0
- /package/src/{ui → core}/components/menu/menuGroup.tsx +0 -0
- /package/src/{ui → core}/components/menu/menuItem.tsx +0 -0
- /package/src/{ui → core}/components/menu/useMenu.ts +0 -0
- /package/src/{ui → core}/components/menu/useMenuController.ts +0 -0
- /package/src/{ui → core}/components/skeleton/__workshop__/delay.tsx +0 -0
- /package/src/{ui → core}/components/skeleton/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/skeleton/__workshop__/skeleton.tsx +0 -0
- /package/src/{ui → core}/components/skeleton/codeSkeleton.tsx +0 -0
- /package/src/{ui → core}/components/skeleton/headingSkeleton.tsx +0 -0
- /package/src/{ui → core}/components/skeleton/index.ts +0 -0
- /package/src/{ui → core}/components/skeleton/labelSkeleton.tsx +0 -0
- /package/src/{ui → core}/components/skeleton/skeleton.tsx +0 -0
- /package/src/{ui → core}/components/skeleton/textSkeleton.tsx +0 -0
- /package/src/{ui → core}/components/tab/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/components/tab/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/tab/index.ts +0 -0
- /package/src/{ui → core}/components/tab/tab.tsx +0 -0
- /package/src/{ui → core}/components/tab/tabPanel.tsx +0 -0
- /package/src/{ui → core}/components/toast/__workshop__/hook.tsx +0 -0
- /package/src/{ui → core}/components/toast/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/toast/__workshop__/toast.tsx +0 -0
- /package/src/{ui → core}/components/toast/index.ts +0 -0
- /package/src/{ui → core}/components/toast/toast.test.tsx +0 -0
- /package/src/{ui → core}/components/toast/toast.tsx +0 -0
- /package/src/{ui → core}/components/toast/toastContext.ts +0 -0
- /package/src/{ui → core}/components/toast/toastLayer.tsx +0 -0
- /package/src/{ui → core}/components/toast/toastProvider.tsx +0 -0
- /package/src/{ui → core}/components/toast/toastState.ts +0 -0
- /package/src/{ui → core}/components/toast/types.ts +0 -0
- /package/src/{ui → core}/components/toast/useToast.ts +0 -0
- /package/src/{ui → core}/components/tree/__workshop__/basic.perf.ts +0 -0
- /package/src/{ui → core}/components/tree/__workshop__/basic.tsx +0 -0
- /package/src/{ui → core}/components/tree/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/components/tree/__workshop__/tabFromElement.tsx +0 -0
- /package/src/{ui → core}/components/tree/helpers.ts +0 -0
- /package/src/{ui → core}/components/tree/index.ts +0 -0
- /package/src/{ui → core}/components/tree/tree.tsx +0 -0
- /package/src/{ui → core}/components/tree/treeContext.ts +0 -0
- /package/src/{ui → core}/components/tree/treeGroup.tsx +0 -0
- /package/src/{ui → core}/components/tree/treeItem.tsx +0 -0
- /package/src/{ui → core}/components/tree/types.ts +0 -0
- /package/src/{ui → core}/components/tree/useTree.ts +0 -0
- /package/src/{ui → core}/constants.ts +0 -0
- /package/src/{ui → core}/global.ts +0 -0
- /package/src/{ui → core}/helpers/animation.ts +0 -0
- /package/src/{ui → core}/helpers/element.ts +0 -0
- /package/src/{ui → core}/helpers/focus.ts +0 -0
- /package/src/{ui → core}/helpers/index.ts +0 -0
- /package/src/{ui → core}/helpers/props.ts +0 -0
- /package/src/{ui → core}/helpers/scroll.ts +0 -0
- /package/src/{ui → core}/hooks/index.ts +0 -0
- /package/src/{ui → core}/hooks/useArrayProp.ts +0 -0
- /package/src/{ui → core}/hooks/useClickOutside.test.tsx +0 -0
- /package/src/{ui → core}/hooks/useClickOutside.ts +0 -0
- /package/src/{ui → core}/hooks/useClickOutsideEvent.test.tsx +0 -0
- /package/src/{ui → core}/hooks/useClickOutsideEvent.ts +0 -0
- /package/src/{ui → core}/hooks/useCustomValidity.ts +0 -0
- /package/src/{ui → core}/hooks/useDelayed.test.ts +0 -0
- /package/src/{ui → core}/hooks/useDelayedState.ts +0 -0
- /package/src/{ui → core}/hooks/useElementRect/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/hooks/useElementRect/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/hooks/useElementRect/index.ts +0 -0
- /package/src/{ui → core}/hooks/useElementRect/useElementRect.ts +0 -0
- /package/src/{ui → core}/hooks/useElementSize.ts +0 -0
- /package/src/{ui → core}/hooks/useForwardedRef.ts +0 -0
- /package/src/{ui → core}/hooks/useGlobalKeyDown.ts +0 -0
- /package/src/{ui → core}/hooks/useIsomorphicEffect.ts +0 -0
- /package/src/{ui → core}/hooks/useMatchMedia.ts +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/__workshop__/test.tsx +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/index.ts +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -0
- /package/src/{ui → core}/hooks/useMediaIndex/useMediaIndex.ts +0 -0
- /package/src/{ui → core}/hooks/useMounted.ts +0 -0
- /package/src/{ui → core}/hooks/usePrefersDark.hydration.test.tsx +0 -0
- /package/src/{ui → core}/hooks/usePrefersDark.test.tsx +0 -0
- /package/src/{ui → core}/hooks/usePrefersDark.ts +0 -0
- /package/src/{ui → core}/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -0
- /package/src/{ui → core}/hooks/usePrefersReducedMotion.test.tsx +0 -0
- /package/src/{ui → core}/hooks/usePrefersReducedMotion.ts +0 -0
- /package/src/{ui → core}/lib/createGlobalScopedContext.ts +0 -0
- /package/src/{ui → core}/lib/globalScope.ts +0 -0
- /package/src/{ui → core}/lib/isRecord.ts +0 -0
- /package/src/{ui → core}/middleware/origin.ts +0 -0
- /package/src/{ui → core}/observers/elementSizeObserver.ts +0 -0
- /package/src/{ui → core}/observers/index.ts +0 -0
- /package/src/{ui → core}/observers/resizeObserver.ts +0 -0
- /package/src/{ui → core}/primitives/_selectable/index.ts +0 -0
- /package/src/{ui → core}/primitives/_selectable/selectable.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/__workshop__/asButton.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/avatar/__workshop__/stack.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/__workshop__/withinButton.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/avatar.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/avatarCounter.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/avatarStack.tsx +0 -0
- /package/src/{ui → core}/primitives/avatar/index.ts +0 -0
- /package/src/{ui → core}/primitives/avatar/types.ts +0 -0
- /package/src/{ui → core}/primitives/badge/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/badge/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/badge/__workshop__/tones.tsx +0 -0
- /package/src/{ui → core}/primitives/badge/badge.test.tsx +0 -0
- /package/src/{ui → core}/primitives/badge/badge.tsx +0 -0
- /package/src/{ui → core}/primitives/badge/index.ts +0 -0
- /package/src/{ui → core}/primitives/badge/types.ts +0 -0
- /package/src/{ui → core}/primitives/box/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/box/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/box/__workshop__/responsive.tsx +0 -0
- /package/src/{ui → core}/primitives/box/index.ts +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/customIcons.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/disabled.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/mixedChildren.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/sanityUploadButton.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/stacked.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/styled1.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/styled2.tsx +0 -0
- /package/src/{ui → core}/primitives/button/__workshop__/uploadButton.tsx +0 -0
- /package/src/{ui → core}/primitives/button/button.test.tsx +0 -0
- /package/src/{ui → core}/primitives/button/index.ts +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/allTones.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/asComponent.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/checkered.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/listNavigation.tsx +0 -0
- /package/src/{ui → core}/primitives/card/__workshop__/styled.tsx +0 -0
- /package/src/{ui → core}/primitives/card/cardContext.ts +0 -0
- /package/src/{ui → core}/primitives/card/index.ts +0 -0
- /package/src/{ui → core}/primitives/card/useCard.ts +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/readOnly.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/__workshop__/tones.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/checkbox.tsx +0 -0
- /package/src/{ui → core}/primitives/checkbox/index.ts +0 -0
- /package/src/{ui → core}/primitives/code/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/code/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{ui → core}/primitives/code/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/code/code.tsx +0 -0
- /package/src/{ui → core}/primitives/code/index.ts +0 -0
- /package/src/{ui → core}/primitives/code/refractor.tsx +0 -0
- /package/src/{ui → core}/primitives/container/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/container/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/container/container.tsx +0 -0
- /package/src/{ui → core}/primitives/container/index.ts +0 -0
- /package/src/{ui → core}/primitives/container/types.ts +0 -0
- /package/src/{ui → core}/primitives/flex/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/flex/__workshop__/gap.tsx +0 -0
- /package/src/{ui → core}/primitives/flex/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/flex/flex.tsx +0 -0
- /package/src/{ui → core}/primitives/flex/index.ts +0 -0
- /package/src/{ui → core}/primitives/grid/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/grid/__workshop__/responsive.tsx +0 -0
- /package/src/{ui → core}/primitives/grid/grid.tsx +0 -0
- /package/src/{ui → core}/primitives/grid/index.ts +0 -0
- /package/src/{ui → core}/primitives/heading/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/heading/heading.tsx +0 -0
- /package/src/{ui → core}/primitives/heading/index.ts +0 -0
- /package/src/{ui → core}/primitives/index.ts +0 -0
- /package/src/{ui → core}/primitives/inline/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/inline/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/inline/index.ts +0 -0
- /package/src/{ui → core}/primitives/inline/inline.tsx +0 -0
- /package/src/{ui → core}/primitives/inline/types.ts +0 -0
- /package/src/{ui → core}/primitives/kbd/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/kbd/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/kbd/index.ts +0 -0
- /package/src/{ui → core}/primitives/kbd/kbd.tsx +0 -0
- /package/src/{ui → core}/primitives/label/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/label/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{ui → core}/primitives/label/index.ts +0 -0
- /package/src/{ui → core}/primitives/label/label.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/AlignedStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/MarginsStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/PlainStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/RecursiveStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/SidePanelStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/TestStory.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/popover/constants.ts +0 -0
- /package/src/{ui → core}/primitives/popover/floating-ui/size.ts +0 -0
- /package/src/{ui → core}/primitives/popover/helpers.ts +0 -0
- /package/src/{ui → core}/primitives/popover/index.ts +0 -0
- /package/src/{ui → core}/primitives/popover/popoverLayer.tsx +0 -0
- /package/src/{ui → core}/primitives/popover/types.ts +0 -0
- /package/src/{ui → core}/primitives/radio/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/radio/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/radio/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/radio/index.ts +0 -0
- /package/src/{ui → core}/primitives/radio/radio.tsx +0 -0
- /package/src/{ui → core}/primitives/select/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/select/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/select/__workshop__/readOnly.tsx +0 -0
- /package/src/{ui → core}/primitives/select/index.ts +0 -0
- /package/src/{ui → core}/primitives/select/select.tsx +0 -0
- /package/src/{ui → core}/primitives/spinner/__workshop__/Props.tsx +0 -0
- /package/src/{ui → core}/primitives/spinner/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/spinner/animatedSpinnerIcon.tsx +0 -0
- /package/src/{ui → core}/primitives/spinner/index.ts +0 -0
- /package/src/{ui → core}/primitives/spinner/spinner.tsx +0 -0
- /package/src/{ui → core}/primitives/stack/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/stack/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/stack/index.ts +0 -0
- /package/src/{ui → core}/primitives/stack/stack.tsx +0 -0
- /package/src/{ui → core}/primitives/switch/__workshop__/example.tsx +0 -0
- /package/src/{ui → core}/primitives/switch/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/switch/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/switch/index.ts +0 -0
- /package/src/{ui → core}/primitives/switch/switch.tsx +0 -0
- /package/src/{ui → core}/primitives/text/__workshop__/colored.tsx +0 -0
- /package/src/{ui → core}/primitives/text/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/text/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{ui → core}/primitives/text/index.ts +0 -0
- /package/src/{ui → core}/primitives/text/text.tsx +0 -0
- /package/src/{ui → core}/primitives/textArea/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/textArea/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/textArea/index.ts +0 -0
- /package/src/{ui → core}/primitives/textArea/textArea.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/clearButton.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/customValidity.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/readOnly.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/states.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/tones.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/__workshop__/typed.tsx +0 -0
- /package/src/{ui → core}/primitives/textInput/index.ts +0 -0
- /package/src/{ui → core}/primitives/textInput/textInput.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/__workshop__/customPortal.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/__workshop__/props.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/constants.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/index.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltip.test.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/index.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/types.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -0
- /package/src/{ui → core}/primitives/tooltip/tooltipLayer.tsx +0 -0
- /package/src/{ui → core}/primitives/types.ts +0 -0
- /package/src/{ui → core}/types/avatar.ts +0 -0
- /package/src/{ui → core}/types/badge.ts +0 -0
- /package/src/{ui → core}/types/box.ts +0 -0
- /package/src/{ui → core}/types/button.ts +0 -0
- /package/src/{ui → core}/types/card.ts +0 -0
- /package/src/{ui → core}/types/dialog.ts +0 -0
- /package/src/{ui → core}/types/flex.ts +0 -0
- /package/src/{ui → core}/types/grid.ts +0 -0
- /package/src/{ui → core}/types/gridItem.ts +0 -0
- /package/src/{ui → core}/types/index.ts +0 -0
- /package/src/{ui → core}/types/placement.ts +0 -0
- /package/src/{ui → core}/types/popover.ts +0 -0
- /package/src/{ui → core}/types/props.ts +0 -0
- /package/src/{ui → core}/types/radius.ts +0 -0
- /package/src/{ui → core}/types/selectable.ts +0 -0
- /package/src/{ui → core}/types/text.ts +0 -0
- /package/src/{ui → core}/utils/arrow/arrow.tsx +0 -0
- /package/src/{ui → core}/utils/arrow/cmds.ts +0 -0
- /package/src/{ui → core}/utils/arrow/index.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/__workshop__/plain.tsx +0 -0
- /package/src/{ui → core}/utils/boundaryElement/boundaryElement.test.tsx +0 -0
- /package/src/{ui → core}/utils/boundaryElement/boundaryElementContext.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/boundaryElementProvider.tsx +0 -0
- /package/src/{ui → core}/utils/boundaryElement/index.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/types.ts +0 -0
- /package/src/{ui → core}/utils/boundaryElement/useBoundaryElement.ts +0 -0
- /package/src/{ui → core}/utils/elementQuery/__workshop__/customMedia.tsx +0 -0
- /package/src/{ui → core}/utils/elementQuery/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/elementQuery/elementQuery.tsx +0 -0
- /package/src/{ui → core}/utils/elementQuery/helpers.ts +0 -0
- /package/src/{ui → core}/utils/elementQuery/index.ts +0 -0
- /package/src/{ui → core}/utils/errorBoundary.tsx +0 -0
- /package/src/{ui → core}/utils/getElementRef.ts +0 -0
- /package/src/{ui → core}/utils/index.ts +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/_debug.tsx +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/multipleRoots.tsx +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/nested.tsx +0 -0
- /package/src/{ui → core}/utils/layer/__workshop__/responsiveZOffset.tsx +0 -0
- /package/src/{ui → core}/utils/layer/getLayerContext.test.ts +0 -0
- /package/src/{ui → core}/utils/layer/getLayerContext.ts +0 -0
- /package/src/{ui → core}/utils/layer/index.ts +0 -0
- /package/src/{ui → core}/utils/layer/layer.test.tsx +0 -0
- /package/src/{ui → core}/utils/layer/layer.tsx +0 -0
- /package/src/{ui → core}/utils/layer/layerCard.tsx +0 -0
- /package/src/{ui → core}/utils/layer/layerContext.ts +0 -0
- /package/src/{ui → core}/utils/layer/layerProvider.tsx +0 -0
- /package/src/{ui → core}/utils/layer/types.ts +0 -0
- /package/src/{ui → core}/utils/layer/useLayer.ts +0 -0
- /package/src/{ui → core}/utils/portal/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/portal/__workshop__/named.tsx +0 -0
- /package/src/{ui → core}/utils/portal/index.ts +0 -0
- /package/src/{ui → core}/utils/portal/portal.test.tsx +0 -0
- /package/src/{ui → core}/utils/portal/portalContext.ts +0 -0
- /package/src/{ui → core}/utils/portal/portalProvider.tsx +0 -0
- /package/src/{ui → core}/utils/portal/types.ts +0 -0
- /package/src/{ui → core}/utils/portal/usePortal.ts +0 -0
- /package/src/{ui → core}/utils/spanWithTextOverflow.tsx +0 -0
- /package/src/{ui → core}/utils/srOnly/index.ts +0 -0
- /package/src/{ui → core}/utils/srOnly/srOnly.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/changingProps.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/elementScroll.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/index.ts +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/infiniteList.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/__workshop__/windowScrolll.tsx +0 -0
- /package/src/{ui → core}/utils/virtualList/index.ts +0 -0
- /package/src/{ui → core}/utils/virtualList/virtualList.tsx +0 -0
package/dist/theme.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
3
|
-
var color = require("@sanity/color");
|
|
1
|
+
import { COLOR_HUES, COLOR_TINTS } from "@sanity/color";
|
|
4
2
|
const AVATAR_SIZE = [0, 1, 2, 3], CONTAINER = [0, 1, 2, 3, 4, 5, "auto"], RADIUS = [0, 1, 2, 3, 4, 5, 6, "full"], SPACE = [0, 0.5, 1, 2, 3, 4, 5, 6, 7, 8, 9], FONT_CODE_SIZE = [0, 1, 2, 3, 4], FONT_HEADING_SIZE = [0, 1, 2, 3, 4, 5], FONT_LABEL_SIZE = [0, 1, 2, 3, 4, 5], FONT_TEXT_SIZE = [0, 1, 2, 3, 4], SHADOW = [0, 1, 2, 3, 4, 5];
|
|
5
3
|
function createSelectableTones(opts, base, dark, solid, muted) {
|
|
6
4
|
return {
|
|
@@ -508,13 +506,13 @@ const black = "hsl(0, 0%, 0%)", white = "hsl(0, 0%, 100%)", colors = {
|
|
|
508
506
|
state,
|
|
509
507
|
tone
|
|
510
508
|
}) => {
|
|
511
|
-
const
|
|
509
|
+
const color = colors[tone];
|
|
512
510
|
return state === "hovered" ? {
|
|
513
|
-
bg: dark ?
|
|
514
|
-
bg2: dark ?
|
|
515
|
-
border: dark ?
|
|
516
|
-
fg: dark ?
|
|
517
|
-
icon: dark ?
|
|
511
|
+
bg: dark ? color.light : color.dark,
|
|
512
|
+
bg2: dark ? color.light : color.dark,
|
|
513
|
+
border: dark ? color.lighter : color.darker,
|
|
514
|
+
fg: dark ? color.darkest : color.lightest,
|
|
515
|
+
icon: dark ? color.darkest : color.lightest,
|
|
518
516
|
muted: {
|
|
519
517
|
fg: black
|
|
520
518
|
},
|
|
@@ -530,11 +528,11 @@ const black = "hsl(0, 0%, 0%)", white = "hsl(0, 0%, 100%)", colors = {
|
|
|
530
528
|
},
|
|
531
529
|
skeleton: base.skeleton
|
|
532
530
|
} : {
|
|
533
|
-
bg:
|
|
534
|
-
bg2:
|
|
535
|
-
border: dark ?
|
|
536
|
-
fg: dark ?
|
|
537
|
-
icon: dark ?
|
|
531
|
+
bg: color.base,
|
|
532
|
+
bg2: color.base,
|
|
533
|
+
border: dark ? color.light : color.dark,
|
|
534
|
+
fg: dark ? color.darkest : color.lightest,
|
|
535
|
+
icon: dark ? color.darkest : color.lightest,
|
|
538
536
|
muted: {
|
|
539
537
|
fg: black
|
|
540
538
|
},
|
|
@@ -557,13 +555,13 @@ const black = "hsl(0, 0%, 0%)", white = "hsl(0, 0%, 100%)", colors = {
|
|
|
557
555
|
state,
|
|
558
556
|
tone
|
|
559
557
|
}) => {
|
|
560
|
-
const
|
|
558
|
+
const color = colors[tone];
|
|
561
559
|
return state === "hovered" ? {
|
|
562
|
-
bg: dark ?
|
|
563
|
-
bg2: dark ?
|
|
564
|
-
border: dark ?
|
|
565
|
-
fg: dark ?
|
|
566
|
-
icon: dark ?
|
|
560
|
+
bg: dark ? color.darker : color.lighter,
|
|
561
|
+
bg2: dark ? color.darker : color.lighter,
|
|
562
|
+
border: dark ? color.lighter : color.darker,
|
|
563
|
+
fg: dark ? color.lightest : color.darkest,
|
|
564
|
+
icon: dark ? color.lightest : color.darkest,
|
|
567
565
|
muted: {
|
|
568
566
|
fg: black
|
|
569
567
|
},
|
|
@@ -579,11 +577,11 @@ const black = "hsl(0, 0%, 0%)", white = "hsl(0, 0%, 100%)", colors = {
|
|
|
579
577
|
},
|
|
580
578
|
skeleton: base.skeleton
|
|
581
579
|
} : {
|
|
582
|
-
bg: dark ?
|
|
583
|
-
bg2: dark ?
|
|
584
|
-
border: dark ?
|
|
585
|
-
fg: dark ?
|
|
586
|
-
icon: dark ?
|
|
580
|
+
bg: dark ? color.darkest : color.lightest,
|
|
581
|
+
bg2: dark ? color.darkest : color.lightest,
|
|
582
|
+
border: dark ? color.darker : color.lighter,
|
|
583
|
+
fg: dark ? color.lighter : color.darker,
|
|
584
|
+
icon: dark ? color.lighter : color.darker,
|
|
587
585
|
muted: {
|
|
588
586
|
fg: black
|
|
589
587
|
},
|
|
@@ -1454,15 +1452,15 @@ const defaultThemeConfig = {
|
|
|
1454
1452
|
"positive",
|
|
1455
1453
|
"caution",
|
|
1456
1454
|
"critical"
|
|
1457
|
-
], THEME_COLOR_STATES = ["enabled", "hovered", "pressed", "selected", "disabled"], THEME_COLOR_BUTTON_MODES = ["default", "ghost", "bleed"], THEME_COLOR_INPUT_MODES = ["default", "invalid"], THEME_COLOR_INPUT_STATES = ["enabled", "hovered", "readOnly", "disabled"], THEME_COLOR_AVATAR_COLORS =
|
|
1455
|
+
], THEME_COLOR_STATES = ["enabled", "hovered", "pressed", "selected", "disabled"], THEME_COLOR_BUTTON_MODES = ["default", "ghost", "bleed"], THEME_COLOR_INPUT_MODES = ["default", "invalid"], THEME_COLOR_INPUT_STATES = ["enabled", "hovered", "readOnly", "disabled"], THEME_COLOR_AVATAR_COLORS = COLOR_HUES;
|
|
1458
1456
|
function isColorBlendModeValue(str) {
|
|
1459
1457
|
return THEME_COLOR_BLEND_MODES.includes(str);
|
|
1460
1458
|
}
|
|
1461
1459
|
function isColorHueKey(str) {
|
|
1462
|
-
return
|
|
1460
|
+
return COLOR_HUES.includes(str);
|
|
1463
1461
|
}
|
|
1464
1462
|
function isColorTintKey(str) {
|
|
1465
|
-
return
|
|
1463
|
+
return COLOR_TINTS.includes(str);
|
|
1466
1464
|
}
|
|
1467
1465
|
function isColorButtonMode(str) {
|
|
1468
1466
|
return THEME_COLOR_BUTTON_MODES.includes(str);
|
|
@@ -1470,12 +1468,12 @@ function isColorButtonMode(str) {
|
|
|
1470
1468
|
const HUES = ["gray", "blue", "purple", "magenta", "red", "orange", "yellow", "green", "cyan"], TINTS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950], RE_PERCENTAGE = /^([0-9]+)%/, RE_OPACITY = /^(1|0\.[0-9]+)?/;
|
|
1471
1469
|
function parseColor$1(str) {
|
|
1472
1470
|
let cursor = 0;
|
|
1473
|
-
const
|
|
1474
|
-
if (!
|
|
1471
|
+
const color = getColor();
|
|
1472
|
+
if (!color)
|
|
1475
1473
|
throw new Error(`Invalid color: ${str}`);
|
|
1476
1474
|
const opacity = getOpacity(), mix2 = getMixPercentage();
|
|
1477
1475
|
return {
|
|
1478
|
-
color
|
|
1476
|
+
color,
|
|
1479
1477
|
mix: mix2,
|
|
1480
1478
|
opacity
|
|
1481
1479
|
};
|
|
@@ -1545,10 +1543,14 @@ function parseColor$1(str) {
|
|
|
1545
1543
|
}
|
|
1546
1544
|
function renderColor(token, context) {
|
|
1547
1545
|
const {
|
|
1546
|
+
bgValue,
|
|
1548
1547
|
bgVar,
|
|
1549
1548
|
hue,
|
|
1550
1549
|
scheme
|
|
1551
|
-
} = context,
|
|
1550
|
+
} = context, t = token[scheme === "dark" ? 0 : 1];
|
|
1551
|
+
if (t === "inherit")
|
|
1552
|
+
return bgValue;
|
|
1553
|
+
const result = parseColor$1(t), colorVar = result.color.type === "hue" ? `--${result.color.hue ?? hue}-${result.color.tint}` : `--${result.color.type}`;
|
|
1552
1554
|
return result.mix !== void 0 ? `color-mix(in srgb, var(${bgVar}), var(${colorVar}) ${result.mix}%)` : result.opacity !== void 0 ? `color-mix(in srgb, transparent, var(${colorVar}) ${result.opacity * 100}%)` : `var(${colorVar})`;
|
|
1553
1555
|
}
|
|
1554
1556
|
function buildColor_v3(tokens) {
|
|
@@ -1575,21 +1577,27 @@ function buildColorCard_v3(tokens, options) {
|
|
|
1575
1577
|
const {
|
|
1576
1578
|
scheme
|
|
1577
1579
|
} = options, context = {
|
|
1578
|
-
bgVar: "--color-bg
|
|
1580
|
+
bgVar: "--color-bg",
|
|
1581
|
+
bgValue: "transparent",
|
|
1579
1582
|
hue: tokens._hue,
|
|
1580
1583
|
scheme
|
|
1581
|
-
}
|
|
1584
|
+
}, tintedDefaultVariant = buildColorElement_v3(tokens.variant.tinted.default, {
|
|
1585
|
+
bgValue: "transparent",
|
|
1586
|
+
scheme
|
|
1587
|
+
}), bgValue = tintedDefaultVariant.bg[0];
|
|
1582
1588
|
return {
|
|
1583
1589
|
_hue: tokens._hue ?? "gray",
|
|
1584
1590
|
avatar: THEME_COLOR_AVATAR_COLORS.reduce((acc, hue) => {
|
|
1585
1591
|
const avatarTokens = tokens.avatar[hue];
|
|
1586
1592
|
return acc[hue] = {
|
|
1587
1593
|
bg: renderColor(avatarTokens.bg, {
|
|
1594
|
+
bgValue,
|
|
1588
1595
|
bgVar: "--color-bg-1",
|
|
1589
1596
|
hue: avatarTokens._hue,
|
|
1590
1597
|
scheme
|
|
1591
1598
|
}),
|
|
1592
1599
|
fg: renderColor(avatarTokens.fg, {
|
|
1600
|
+
bgValue,
|
|
1593
1601
|
bgVar: "--color-bg-1",
|
|
1594
1602
|
hue: avatarTokens._hue,
|
|
1595
1603
|
scheme
|
|
@@ -1652,29 +1660,27 @@ function buildColorCard_v3(tokens, options) {
|
|
|
1652
1660
|
},
|
|
1653
1661
|
variant: {
|
|
1654
1662
|
solid: {
|
|
1655
|
-
...THEME_COLOR_STATE_TONES.reduce((acc, tone) => ({
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
})
|
|
1660
|
-
}), {})
|
|
1663
|
+
...THEME_COLOR_STATE_TONES.reduce((acc, tone) => (acc[tone] = buildColorElement_v3(tokens.variant.solid[tone], {
|
|
1664
|
+
bgValue,
|
|
1665
|
+
scheme
|
|
1666
|
+
}), acc), {})
|
|
1661
1667
|
},
|
|
1662
1668
|
tinted: {
|
|
1663
|
-
...THEME_COLOR_STATE_TONES.reduce((acc, tone) => ({
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
})
|
|
1668
|
-
}), {})
|
|
1669
|
+
...THEME_COLOR_STATE_TONES.reduce((acc, tone) => (tone === "default" ? acc[tone] = tintedDefaultVariant : acc[tone] = buildColorElement_v3(tokens.variant.tinted[tone], {
|
|
1670
|
+
bgValue,
|
|
1671
|
+
scheme
|
|
1672
|
+
}), acc), {})
|
|
1669
1673
|
}
|
|
1670
1674
|
}
|
|
1671
1675
|
};
|
|
1672
1676
|
}
|
|
1673
1677
|
function buildColorElement_v3(tokens, options) {
|
|
1674
1678
|
const {
|
|
1679
|
+
bgValue,
|
|
1675
1680
|
scheme
|
|
1676
1681
|
} = options, context = {
|
|
1677
|
-
|
|
1682
|
+
bgValue,
|
|
1683
|
+
bgVar: "--color-bg",
|
|
1678
1684
|
hue: tokens._hue,
|
|
1679
1685
|
scheme
|
|
1680
1686
|
};
|
|
@@ -1766,19 +1772,34 @@ const defaultTokens = {
|
|
|
1766
1772
|
}
|
|
1767
1773
|
},
|
|
1768
1774
|
primary: {
|
|
1769
|
-
_hue: "blue"
|
|
1775
|
+
_hue: "blue",
|
|
1776
|
+
bg: {
|
|
1777
|
+
0: ["inherit", "inherit"]
|
|
1778
|
+
}
|
|
1770
1779
|
},
|
|
1771
1780
|
suggest: {
|
|
1772
|
-
_hue: "purple"
|
|
1781
|
+
_hue: "purple",
|
|
1782
|
+
bg: {
|
|
1783
|
+
0: ["inherit", "inherit"]
|
|
1784
|
+
}
|
|
1773
1785
|
},
|
|
1774
1786
|
positive: {
|
|
1775
|
-
_hue: "green"
|
|
1787
|
+
_hue: "green",
|
|
1788
|
+
bg: {
|
|
1789
|
+
0: ["inherit", "inherit"]
|
|
1790
|
+
}
|
|
1776
1791
|
},
|
|
1777
1792
|
caution: {
|
|
1778
|
-
_hue: "yellow"
|
|
1793
|
+
_hue: "yellow",
|
|
1794
|
+
bg: {
|
|
1795
|
+
0: ["inherit", "inherit"]
|
|
1796
|
+
}
|
|
1779
1797
|
},
|
|
1780
1798
|
critical: {
|
|
1781
|
-
_hue: "red"
|
|
1799
|
+
_hue: "red",
|
|
1800
|
+
bg: {
|
|
1801
|
+
0: ["inherit", "inherit"]
|
|
1802
|
+
}
|
|
1782
1803
|
}
|
|
1783
1804
|
},
|
|
1784
1805
|
solid: {
|
|
@@ -1793,7 +1814,7 @@ const defaultTokens = {
|
|
|
1793
1814
|
},
|
|
1794
1815
|
fg: {
|
|
1795
1816
|
0: ["black", "white"],
|
|
1796
|
-
4: ["
|
|
1817
|
+
4: ["700", "200"]
|
|
1797
1818
|
}
|
|
1798
1819
|
},
|
|
1799
1820
|
default: {
|
|
@@ -1854,7 +1875,7 @@ const defaultTokens = {
|
|
|
1854
1875
|
},
|
|
1855
1876
|
border: {
|
|
1856
1877
|
0: ["800", "100"],
|
|
1857
|
-
4: ["600", "
|
|
1878
|
+
4: ["600", "400"]
|
|
1858
1879
|
},
|
|
1859
1880
|
fg: {
|
|
1860
1881
|
0: ["white", "black"],
|
|
@@ -2095,7 +2116,7 @@ function v2_v0(v2, v3) {
|
|
|
2095
2116
|
const {
|
|
2096
2117
|
avatar,
|
|
2097
2118
|
button,
|
|
2098
|
-
color
|
|
2119
|
+
color,
|
|
2099
2120
|
container,
|
|
2100
2121
|
font: fonts,
|
|
2101
2122
|
input,
|
|
@@ -2112,20 +2133,20 @@ function v2_v0(v2, v3) {
|
|
|
2112
2133
|
container,
|
|
2113
2134
|
color: {
|
|
2114
2135
|
light: {
|
|
2115
|
-
transparent: themeColor_v2_v0(
|
|
2116
|
-
default: themeColor_v2_v0(
|
|
2117
|
-
primary: themeColor_v2_v0(
|
|
2118
|
-
positive: themeColor_v2_v0(
|
|
2119
|
-
caution: themeColor_v2_v0(
|
|
2120
|
-
critical: themeColor_v2_v0(
|
|
2136
|
+
transparent: themeColor_v2_v0(color.light.transparent),
|
|
2137
|
+
default: themeColor_v2_v0(color.light.default),
|
|
2138
|
+
primary: themeColor_v2_v0(color.light.primary),
|
|
2139
|
+
positive: themeColor_v2_v0(color.light.positive),
|
|
2140
|
+
caution: themeColor_v2_v0(color.light.caution),
|
|
2141
|
+
critical: themeColor_v2_v0(color.light.critical)
|
|
2121
2142
|
},
|
|
2122
2143
|
dark: {
|
|
2123
|
-
transparent: themeColor_v2_v0(
|
|
2124
|
-
default: themeColor_v2_v0(
|
|
2125
|
-
primary: themeColor_v2_v0(
|
|
2126
|
-
positive: themeColor_v2_v0(
|
|
2127
|
-
caution: themeColor_v2_v0(
|
|
2128
|
-
critical: themeColor_v2_v0(
|
|
2144
|
+
transparent: themeColor_v2_v0(color.dark.transparent),
|
|
2145
|
+
default: themeColor_v2_v0(color.dark.default),
|
|
2146
|
+
primary: themeColor_v2_v0(color.dark.primary),
|
|
2147
|
+
positive: themeColor_v2_v0(color.dark.positive),
|
|
2148
|
+
caution: themeColor_v2_v0(color.dark.caution),
|
|
2149
|
+
critical: themeColor_v2_v0(color.dark.critical)
|
|
2129
2150
|
}
|
|
2130
2151
|
},
|
|
2131
2152
|
focusRing: input.text.focusRing,
|
|
@@ -2198,36 +2219,36 @@ function inputStateThemeColor_v2_v0(t) {
|
|
|
2198
2219
|
}
|
|
2199
2220
|
function themeColor_v3_v2(options) {
|
|
2200
2221
|
const {
|
|
2201
|
-
color
|
|
2222
|
+
color,
|
|
2202
2223
|
dark
|
|
2203
2224
|
} = options;
|
|
2204
2225
|
return {
|
|
2205
2226
|
_blend: "screen",
|
|
2206
2227
|
_dark: dark,
|
|
2207
2228
|
...buildColorState({
|
|
2208
|
-
cardColor:
|
|
2229
|
+
cardColor: color,
|
|
2209
2230
|
state: "enabled",
|
|
2210
2231
|
tone: "default",
|
|
2211
2232
|
variant: "tinted"
|
|
2212
2233
|
}),
|
|
2213
|
-
backdrop:
|
|
2234
|
+
backdrop: color.backdrop,
|
|
2214
2235
|
button: THEME_COLOR_BUTTON_MODES.reduce((modes, mode) => (modes[mode] = THEME_COLOR_STATE_TONES.reduce((tones2, tone) => (tones2[tone] = THEME_COLOR_STATES.reduce((states, state) => (states[state] = buildColorState({
|
|
2215
|
-
cardColor:
|
|
2236
|
+
cardColor: color,
|
|
2216
2237
|
state,
|
|
2217
2238
|
tone,
|
|
2218
2239
|
variant: mode === "default" ? "solid" : "tinted"
|
|
2219
2240
|
}), mode === "bleed" && (states[state].border = "transparent"), states), {}), tones2), {}), modes), {}),
|
|
2220
|
-
focusRing:
|
|
2221
|
-
input: THEME_COLOR_INPUT_MODES.reduce((modes, mode) => (modes[mode] = THEME_COLOR_INPUT_STATES.reduce((states, state) => (states[state] = buildInputState(
|
|
2241
|
+
focusRing: color.focusRing,
|
|
2242
|
+
input: THEME_COLOR_INPUT_MODES.reduce((modes, mode) => (modes[mode] = THEME_COLOR_INPUT_STATES.reduce((states, state) => (states[state] = buildInputState(color.variant.tinted.default), states), {}), modes), {}),
|
|
2222
2243
|
selectable: THEME_COLOR_STATE_TONES.reduce((tones2, tone) => (tones2[tone] = THEME_COLOR_STATES.reduce((states, state) => (states[state] = buildColorState({
|
|
2223
|
-
cardColor:
|
|
2244
|
+
cardColor: color,
|
|
2224
2245
|
// cardVars: vars,
|
|
2225
2246
|
state,
|
|
2226
2247
|
tone,
|
|
2227
2248
|
variant: "tinted"
|
|
2228
2249
|
}), states), {}), tones2), {}),
|
|
2229
|
-
shadow:
|
|
2230
|
-
syntax:
|
|
2250
|
+
shadow: color.shadow,
|
|
2251
|
+
syntax: color.code.token
|
|
2231
2252
|
};
|
|
2232
2253
|
}
|
|
2233
2254
|
const stateShades = {
|
|
@@ -2266,37 +2287,37 @@ function buildColorState(options) {
|
|
|
2266
2287
|
state,
|
|
2267
2288
|
tone,
|
|
2268
2289
|
variant
|
|
2269
|
-
} = options,
|
|
2290
|
+
} = options, color = cardColor.variant[variant][tone], shades = stateShades[state];
|
|
2270
2291
|
return {
|
|
2271
2292
|
accent: {
|
|
2272
|
-
fg:
|
|
2293
|
+
fg: color.fg[4]
|
|
2273
2294
|
},
|
|
2274
2295
|
avatar: cardColor.avatar,
|
|
2275
2296
|
badge: THEME_COLOR_STATE_TONES.reduce((tones2, tone2) => (tones2[tone2] = {
|
|
2276
|
-
bg: mix$1(
|
|
2277
|
-
fg: mix$1(
|
|
2278
|
-
dot: mix$1(
|
|
2279
|
-
icon: mix$1(
|
|
2297
|
+
bg: mix$1(color.bg, 1),
|
|
2298
|
+
fg: mix$1(color.fg, 1),
|
|
2299
|
+
dot: mix$1(color.fg, 3),
|
|
2300
|
+
icon: mix$1(color.fg, 3)
|
|
2280
2301
|
}, tones2), {}),
|
|
2281
|
-
bg: mix$1(
|
|
2282
|
-
border: mix$1(
|
|
2283
|
-
fg: mix$1(
|
|
2302
|
+
bg: mix$1(color.bg, shades.bg[0]),
|
|
2303
|
+
border: mix$1(color.border, shades.border[0]),
|
|
2304
|
+
fg: mix$1(color.fg, shades.fg[0]),
|
|
2284
2305
|
code: {
|
|
2285
|
-
bg: mix$1(
|
|
2286
|
-
fg: mix$1(
|
|
2306
|
+
bg: mix$1(color.bg, shades.bg[1]),
|
|
2307
|
+
fg: mix$1(color.fg, shades.fg[2])
|
|
2287
2308
|
},
|
|
2288
|
-
icon: mix$1(
|
|
2309
|
+
icon: mix$1(color.fg, shades.fg[2]),
|
|
2289
2310
|
kbd: {
|
|
2290
|
-
bg: mix$1(
|
|
2291
|
-
fg: mix$1(
|
|
2292
|
-
border: mix$1(
|
|
2311
|
+
bg: mix$1(color.bg, 0),
|
|
2312
|
+
fg: mix$1(color.fg, 0),
|
|
2313
|
+
border: mix$1(color.bg, 0)
|
|
2293
2314
|
},
|
|
2294
2315
|
link: {
|
|
2295
|
-
fg: mix$1(
|
|
2316
|
+
fg: mix$1(color.fg, shades.fg[2])
|
|
2296
2317
|
},
|
|
2297
2318
|
muted: {
|
|
2298
|
-
bg: mix$1(
|
|
2299
|
-
fg: mix$1(
|
|
2319
|
+
bg: mix$1(color.bg, shades.bg[1]),
|
|
2320
|
+
fg: mix$1(color.fg, shades.fg[2])
|
|
2300
2321
|
},
|
|
2301
2322
|
skeleton: cardColor.skeleton
|
|
2302
2323
|
};
|
|
@@ -2481,9 +2502,9 @@ function rgbaToRGBA(rgba2) {
|
|
|
2481
2502
|
a: parseFloat(values[3])
|
|
2482
2503
|
};
|
|
2483
2504
|
}
|
|
2484
|
-
function rgbToHex(
|
|
2485
|
-
const r = round(clamp(Math.round(
|
|
2486
|
-
return "a" in
|
|
2505
|
+
function rgbToHex(color) {
|
|
2506
|
+
const r = round(clamp(Math.round(color.r), 0, 255)), g = round(clamp(Math.round(color.g), 0, 255)), b = round(clamp(Math.round(color.b), 0, 255));
|
|
2507
|
+
return "a" in color ? `rgba(${r},${g},${b},${color.a})` : "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
|
2487
2508
|
}
|
|
2488
2509
|
function rgbToHsl({
|
|
2489
2510
|
r,
|
|
@@ -2528,21 +2549,21 @@ function parseHsl(str) {
|
|
|
2528
2549
|
l: parseFloat(res[5])
|
|
2529
2550
|
};
|
|
2530
2551
|
}
|
|
2531
|
-
function parseColor(
|
|
2532
|
-
if (!
|
|
2552
|
+
function parseColor(color) {
|
|
2553
|
+
if (!color) return {
|
|
2533
2554
|
r: 0,
|
|
2534
2555
|
g: 0,
|
|
2535
2556
|
b: 0
|
|
2536
2557
|
};
|
|
2537
|
-
if (typeof
|
|
2558
|
+
if (typeof color != "string")
|
|
2538
2559
|
throw new Error("parseColor: expected a string");
|
|
2539
|
-
if (isHex(
|
|
2540
|
-
return hexToRgb(
|
|
2541
|
-
if (
|
|
2542
|
-
return hslToRgb(parseHsl(
|
|
2543
|
-
if (
|
|
2544
|
-
return rgbaToRGBA(
|
|
2545
|
-
throw new Error(`parseColor: unexpected color format: "${
|
|
2560
|
+
if (isHex(color))
|
|
2561
|
+
return hexToRgb(color);
|
|
2562
|
+
if (color.startsWith("hsl("))
|
|
2563
|
+
return hslToRgb(parseHsl(color));
|
|
2564
|
+
if (color.startsWith("rgba("))
|
|
2565
|
+
return rgbaToRGBA(color);
|
|
2566
|
+
throw new Error(`parseColor: unexpected color format: "${color}"`);
|
|
2546
2567
|
}
|
|
2547
2568
|
function getContrastRatio(bg, fg) {
|
|
2548
2569
|
const rgb1 = parseColor(bg), rgb2 = parseColor(fg), c1 = rgb_lrgb(rgb1), c2 = rgb_lrgb(rgb2), l1 = lrgb_luminance(c1), l2 = lrgb_luminance(c2);
|
|
@@ -2561,10 +2582,10 @@ function rgb_lrgb1(v) {
|
|
|
2561
2582
|
function lrgb_luminance([r, g, b]) {
|
|
2562
2583
|
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
2563
2584
|
}
|
|
2564
|
-
function rgba(
|
|
2565
|
-
if (typeof
|
|
2566
|
-
return `color-mix(in srgb, transparent, ${
|
|
2567
|
-
const rgb = parseColor(
|
|
2585
|
+
function rgba(color, a) {
|
|
2586
|
+
if (typeof color == "string" && color.startsWith("var("))
|
|
2587
|
+
return `color-mix(in srgb, transparent, ${color} ${a * 100}%)`;
|
|
2588
|
+
const rgb = parseColor(color);
|
|
2568
2589
|
return `rgba(${rgb.r},${rgb.g},${rgb.b},${a})`;
|
|
2569
2590
|
}
|
|
2570
2591
|
const COLOR_CONFIG_STATE_KEYS = ["_hue", "bg", "fg", "border", "focusRing", "muted/fg", "accent/fg", "link/fg", "code/bg", "code/fg", "skeleton/from", "skeleton/to", "status/dot", "status/icon"], COLOR_CONFIG_CARD_KEYS = [...COLOR_CONFIG_STATE_KEYS, "_hue", "bg", "fg", "border", "focusRing", "shadow/outline", "shadow/umbra", "shadow/penumbra", "shadow/ambient"], COLOR_CONFIG_BLEND_KEYS = ["_blend"], COLOR_CONFIG_AVATAR_COLORS = ["*", ...THEME_COLOR_AVATAR_COLORS], COLOR_CONFIG_CARD_TONES = ["*", ...THEME_COLOR_CARD_TONES], COLOR_CONFIG_STATE_TONES = ["*", ...THEME_COLOR_STATE_TONES], COLOR_CONFIG_STATES = ["*", ...THEME_COLOR_STATES], COLOR_CONFIG_INPUT_MODES = ["*", ...THEME_COLOR_INPUT_MODES], COLOR_CONFIG_INPUT_STATES = ["*", ...THEME_COLOR_INPUT_STATES];
|
|
@@ -2730,10 +2751,10 @@ function isColorOpacityValue(str) {
|
|
|
2730
2751
|
function is_v2(themeProp) {
|
|
2731
2752
|
return themeProp._version === 2;
|
|
2732
2753
|
}
|
|
2733
|
-
function themeColor_v0_v2_9(
|
|
2734
|
-
if ("neutral" in
|
|
2735
|
-
return
|
|
2736
|
-
const colors2 =
|
|
2754
|
+
function themeColor_v0_v2_9(color) {
|
|
2755
|
+
if ("neutral" in color.badge)
|
|
2756
|
+
return color;
|
|
2757
|
+
const colors2 = color;
|
|
2737
2758
|
return {
|
|
2738
2759
|
...colors2,
|
|
2739
2760
|
badge: {
|
|
@@ -2987,7 +3008,7 @@ function v0_v2(v0) {
|
|
|
2987
3008
|
const {
|
|
2988
3009
|
avatar,
|
|
2989
3010
|
button,
|
|
2990
|
-
color
|
|
3011
|
+
color,
|
|
2991
3012
|
container,
|
|
2992
3013
|
fonts: font,
|
|
2993
3014
|
input,
|
|
@@ -3010,24 +3031,24 @@ function v0_v2(v0) {
|
|
|
3010
3031
|
card: defaultThemeConfig.card,
|
|
3011
3032
|
color: {
|
|
3012
3033
|
light: {
|
|
3013
|
-
transparent: themeColor_v0_v2(
|
|
3014
|
-
default: themeColor_v0_v2(
|
|
3015
|
-
neutral: themeColor_v0_v2(
|
|
3016
|
-
primary: themeColor_v0_v2(
|
|
3017
|
-
suggest: themeColor_v0_v2(
|
|
3018
|
-
positive: themeColor_v0_v2(
|
|
3019
|
-
caution: themeColor_v0_v2(
|
|
3020
|
-
critical: themeColor_v0_v2(
|
|
3034
|
+
transparent: themeColor_v0_v2(color.light.transparent),
|
|
3035
|
+
default: themeColor_v0_v2(color.light.default),
|
|
3036
|
+
neutral: themeColor_v0_v2(color.light.transparent),
|
|
3037
|
+
primary: themeColor_v0_v2(color.light.primary),
|
|
3038
|
+
suggest: themeColor_v0_v2(color.light.primary),
|
|
3039
|
+
positive: themeColor_v0_v2(color.light.positive),
|
|
3040
|
+
caution: themeColor_v0_v2(color.light.caution),
|
|
3041
|
+
critical: themeColor_v0_v2(color.light.critical)
|
|
3021
3042
|
},
|
|
3022
3043
|
dark: {
|
|
3023
|
-
transparent: themeColor_v0_v2(
|
|
3024
|
-
default: themeColor_v0_v2(
|
|
3025
|
-
neutral: themeColor_v0_v2(
|
|
3026
|
-
primary: themeColor_v0_v2(
|
|
3027
|
-
suggest: themeColor_v0_v2(
|
|
3028
|
-
positive: themeColor_v0_v2(
|
|
3029
|
-
caution: themeColor_v0_v2(
|
|
3030
|
-
critical: themeColor_v0_v2(
|
|
3044
|
+
transparent: themeColor_v0_v2(color.dark.transparent),
|
|
3045
|
+
default: themeColor_v0_v2(color.dark.default),
|
|
3046
|
+
neutral: themeColor_v0_v2(color.dark.transparent),
|
|
3047
|
+
primary: themeColor_v0_v2(color.dark.primary),
|
|
3048
|
+
suggest: themeColor_v0_v2(color.dark.primary),
|
|
3049
|
+
positive: themeColor_v0_v2(color.dark.positive),
|
|
3050
|
+
caution: themeColor_v0_v2(color.dark.caution),
|
|
3051
|
+
critical: themeColor_v0_v2(color.dark.critical)
|
|
3031
3052
|
}
|
|
3032
3053
|
},
|
|
3033
3054
|
container,
|
|
@@ -3133,67 +3154,69 @@ function getTheme_v2(theme) {
|
|
|
3133
3154
|
};
|
|
3134
3155
|
return cache.set(theme, v2), v2;
|
|
3135
3156
|
}
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3157
|
+
export {
|
|
3158
|
+
AVATAR_SIZE,
|
|
3159
|
+
COLOR_CONFIG_AVATAR_COLORS,
|
|
3160
|
+
COLOR_CONFIG_BLEND_KEYS,
|
|
3161
|
+
COLOR_CONFIG_CARD_KEYS,
|
|
3162
|
+
COLOR_CONFIG_CARD_TONES,
|
|
3163
|
+
COLOR_CONFIG_INPUT_MODES,
|
|
3164
|
+
COLOR_CONFIG_INPUT_STATES,
|
|
3165
|
+
COLOR_CONFIG_STATES,
|
|
3166
|
+
COLOR_CONFIG_STATE_KEYS,
|
|
3167
|
+
COLOR_CONFIG_STATE_TONES,
|
|
3168
|
+
CONTAINER,
|
|
3169
|
+
FONT_CODE_SIZE,
|
|
3170
|
+
FONT_HEADING_SIZE,
|
|
3171
|
+
FONT_LABEL_SIZE,
|
|
3172
|
+
FONT_TEXT_SIZE,
|
|
3173
|
+
HUES,
|
|
3174
|
+
RADIUS,
|
|
3175
|
+
SHADOW,
|
|
3176
|
+
SPACE,
|
|
3177
|
+
THEME_COLOR_AVATAR_COLORS,
|
|
3178
|
+
THEME_COLOR_BLEND_MODES,
|
|
3179
|
+
THEME_COLOR_BUTTON_MODES,
|
|
3180
|
+
THEME_COLOR_CARD_TONES,
|
|
3181
|
+
THEME_COLOR_INPUT_MODES,
|
|
3182
|
+
THEME_COLOR_INPUT_STATES,
|
|
3183
|
+
THEME_COLOR_SCHEMES,
|
|
3184
|
+
THEME_COLOR_STATES,
|
|
3185
|
+
THEME_COLOR_STATE_TONES,
|
|
3186
|
+
TINTS,
|
|
3187
|
+
buildColor_v3,
|
|
3188
|
+
buildTheme,
|
|
3189
|
+
buildTheme_v3,
|
|
3190
|
+
createColorTheme,
|
|
3191
|
+
defaultTokens,
|
|
3192
|
+
getContrastRatio,
|
|
3193
|
+
getScopedTheme,
|
|
3194
|
+
getTheme_v2,
|
|
3195
|
+
hexToRgb,
|
|
3196
|
+
hslToRgb,
|
|
3197
|
+
isColorBlendModeValue,
|
|
3198
|
+
isColorButtonMode,
|
|
3199
|
+
isColorConfigBaseKey,
|
|
3200
|
+
isColorConfigBaseTone,
|
|
3201
|
+
isColorConfigBlendKey,
|
|
3202
|
+
isColorConfigStateKey,
|
|
3203
|
+
isColorConfigStateTone,
|
|
3204
|
+
isColorHueKey,
|
|
3205
|
+
isColorOpacityValue,
|
|
3206
|
+
isColorTintKey,
|
|
3207
|
+
isColorTokenValue,
|
|
3208
|
+
isColorValue,
|
|
3209
|
+
mix,
|
|
3210
|
+
multiply,
|
|
3211
|
+
parseColor,
|
|
3212
|
+
parseTokenKey,
|
|
3213
|
+
parseTokenValue,
|
|
3214
|
+
renderColor,
|
|
3215
|
+
resolveTokens,
|
|
3216
|
+
rgbToHex,
|
|
3217
|
+
rgbToHsl,
|
|
3218
|
+
rgba,
|
|
3219
|
+
rgbaToRGBA,
|
|
3220
|
+
screen
|
|
3221
|
+
};
|
|
3199
3222
|
//# sourceMappingURL=theme.js.map
|