@sanity/ui 2.0.0-alpha.26 → 2.0.0-alpha.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.mjs +37 -38
- package/dist/index.d.ts +302 -1001
- package/dist/index.esm.js +570 -3598
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +897 -3746
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs.mjs +48 -0
- package/dist/theme.d.ts +1205 -0
- package/dist/theme.esm.js +4113 -0
- package/dist/theme.esm.js.map +1 -0
- package/dist/theme.js +4162 -0
- package/dist/theme.js.map +1 -0
- package/exports/index.ts +1 -0
- package/exports/theme.ts +1 -0
- package/package.json +38 -15
- package/src/{__workshop__ → core/__workshop__}/constants.ts +1 -3
- package/src/core/_compat.ts +115 -0
- package/src/{components → core/components}/autocomplete/__workshop__/async.tsx +4 -5
- package/src/{components → core/components}/autocomplete/__workshop__/constrainedHeight.tsx +27 -22
- package/src/{components → core/components}/autocomplete/__workshop__/custom.tsx +36 -31
- package/src/{components → core/components}/autocomplete/__workshop__/example.tsx +2 -2
- package/src/{components → core/components}/autocomplete/__workshop__/focusAndBlur.tsx +5 -3
- package/src/{components → core/components}/dialog/__workshop__/activate.tsx +0 -1
- package/src/{components → core/components}/dialog/__workshop__/layering.tsx +5 -1
- package/src/{components → core/components}/dialog/__workshop__/panes.tsx +2 -7
- package/src/{components → core/components}/dialog/dialog.tsx +7 -5
- package/src/{components → core/components}/dialog/styles.ts +1 -1
- package/src/{components → core/components}/menu/__workshop__/asComponent.tsx +4 -4
- package/src/{components → core/components}/menu/__workshop__/customMenuItem.tsx +9 -3
- package/src/{components → core/components}/menu/__workshop__/menuButton.tsx +1 -1
- package/src/{components → core/components}/menu/menu.test.tsx +1 -1
- package/src/{components → core/components}/menu/menuButton.tsx +1 -1
- package/src/{components → core/components}/skeleton/textSkeleton.tsx +1 -1
- package/src/{components → core/components}/toast/toast.test.tsx +1 -1
- package/src/{components → core/components}/toast/toast.tsx +1 -1
- package/src/{components → core/components}/tree/__workshop__/tabFromElement.tsx +1 -1
- package/src/{components → core/components}/tree/style.ts +6 -6
- package/src/{components → core/components}/tree/treeItem.tsx +3 -3
- package/src/{constants.ts → core/constants.ts} +1 -0
- package/src/{hooks → core/hooks}/useElementRect/__workshop__/example.tsx +3 -1
- package/src/{hooks → core/hooks}/useMediaIndex/__workshop__/test.tsx +1 -1
- package/src/{hooks → core/hooks}/useMediaIndex/useMediaIndex.test.tsx +2 -1
- package/src/{index.ts → core/index.ts} +2 -0
- package/src/{lib → core/lib}/isRecord.ts +1 -1
- package/src/{primitives → core/primitives}/avatar/avatar.tsx +16 -11
- package/src/{primitives → core/primitives}/avatar/styles.ts +8 -7
- package/src/{primitives → core/primitives}/avatar/types.ts +2 -1
- package/src/{primitives → core/primitives}/badge/badge.test.tsx +1 -1
- package/src/{primitives → core/primitives}/badge/badge.tsx +3 -2
- package/src/core/primitives/badge/styles.ts +20 -0
- package/src/{primitives → core/primitives}/badge/types.ts +1 -2
- package/src/{primitives → core/primitives}/button/__workshop__/stacked.tsx +1 -1
- package/src/{primitives → core/primitives}/button/button.test.tsx +1 -1
- package/src/{primitives → core/primitives}/button/button.tsx +1 -1
- package/src/{primitives → core/primitives}/button/styles.ts +19 -9
- package/src/{primitives → core/primitives}/card/__workshop__/asButton.tsx +6 -6
- package/src/{primitives → core/primitives}/card/__workshop__/asComponent.tsx +1 -1
- package/src/{primitives → core/primitives}/card/__workshop__/selected.tsx +2 -12
- package/src/{primitives → core/primitives}/card/card.tsx +2 -1
- package/src/{primitives → core/primitives}/card/types.ts +1 -1
- package/src/{primitives → core/primitives}/checkbox/__workshop__/example.tsx +1 -1
- package/src/{primitives → core/primitives}/checkbox/__workshop__/props.tsx +1 -1
- package/src/{primitives → core/primitives}/checkbox/__workshop__/readOnly.tsx +1 -1
- package/src/{primitives → core/primitives}/checkbox/styles.ts +4 -3
- package/src/{primitives → core/primitives}/container/styles.ts +1 -1
- package/src/{primitives → core/primitives}/heading/heading.tsx +1 -1
- package/src/{primitives → core/primitives}/inline/styles.ts +1 -1
- package/src/{primitives → core/primitives}/label/label.tsx +1 -1
- package/src/{primitives → core/primitives}/popover/__workshop__/RecursiveStory.tsx +2 -9
- package/src/{primitives → core/primitives}/popover/__workshop__/TestStory.tsx +6 -3
- package/src/{primitives → core/primitives}/popover/constants.ts +3 -2
- package/src/{primitives → core/primitives}/popover/helpers.ts +1 -1
- package/src/{primitives → core/primitives}/popover/popover.tsx +6 -7
- package/src/{primitives → core/primitives}/popover/popoverCard.tsx +22 -16
- package/src/{primitives → core/primitives}/radio/styles.ts +1 -1
- package/src/{primitives → core/primitives}/select/styles.ts +2 -2
- package/src/{primitives → core/primitives}/stack/styles.ts +1 -1
- package/src/{primitives → core/primitives}/switch/__workshop__/example.tsx +1 -1
- package/src/{primitives → core/primitives}/switch/styles.ts +2 -2
- package/src/{primitives → core/primitives}/text/__workshop__/colored.tsx +2 -1
- package/src/{primitives → core/primitives}/text/text.tsx +1 -1
- package/src/{primitives → core/primitives}/textArea/__workshop__/plain.tsx +1 -1
- package/src/{primitives → core/primitives}/textArea/textArea.tsx +2 -1
- package/src/{primitives → core/primitives}/textInput/__workshop__/plain.tsx +1 -1
- package/src/{primitives → core/primitives}/textInput/__workshop__/states.tsx +3 -3
- package/src/{primitives → core/primitives}/textInput/textInput.tsx +2 -1
- package/src/{primitives → core/primitives}/tooltip/constants.ts +5 -0
- package/src/{primitives → core/primitives}/tooltip/tooltip.test.tsx +3 -3
- package/src/{primitives → core/primitives}/tooltip/tooltip.tsx +25 -18
- package/src/{styles → core/styles}/border/borderStyle.ts +16 -13
- package/src/{styles → core/styles}/box/boxStyle.ts +1 -1
- package/src/{styles → core/styles}/colorVars/colorVarsStyle.ts +3 -3
- package/src/{styles → core/styles}/flex/flexItemStyle.ts +1 -1
- package/src/{styles → core/styles}/flex/flexStyle.ts +1 -1
- package/src/{styles → core/styles}/focusRing/index.ts +2 -2
- package/src/{styles → core/styles}/font/codeFontStyle.ts +1 -1
- package/src/{styles → core/styles}/font/headingFontStyle.ts +1 -1
- package/src/{styles → core/styles}/font/labelFontStyle.ts +1 -1
- package/src/{styles → core/styles}/font/responsiveFont.ts +2 -2
- package/src/{styles → core/styles}/font/textAlignStyle.ts +1 -1
- package/src/{styles → core/styles}/font/textFontStyle.ts +1 -1
- package/src/{styles → core/styles}/font/types.ts +1 -1
- package/src/{styles → core/styles}/grid/gridItemStyle.ts +1 -1
- package/src/{styles → core/styles}/grid/gridStyle.ts +1 -1
- package/src/{styles → core/styles}/helpers.ts +2 -2
- package/src/{styles → core/styles}/input/responsiveInputPaddingStyle.ts +1 -1
- package/src/{styles → core/styles}/input/textInputStyle.ts +2 -2
- package/src/{styles → core/styles}/margin/marginStyle.ts +1 -1
- package/src/{styles → core/styles}/margin/marginsStyle.test.ts +1 -1
- package/src/{styles → core/styles}/padding/paddingStyle.test.ts +1 -1
- package/src/{styles → core/styles}/padding/paddingStyle.ts +1 -1
- package/src/{styles → core/styles}/radius/radiusStyle.ts +1 -1
- package/src/{styles → core/styles}/shadow/shadowStyle.ts +9 -7
- package/src/{styles → core/styles}/types.ts +1 -1
- package/src/core/theme/__workshop__/build/Root.tsx +346 -0
- package/src/core/theme/__workshop__/build/helpers.ts +46 -0
- package/src/core/theme/__workshop__/build/story.tsx +457 -0
- package/src/{theme → core/theme}/__workshop__/canvas.tsx +87 -113
- package/src/{theme → core/theme}/__workshop__/color.tsx +3 -6
- package/src/{theme → core/theme}/__workshop__/index.ts +5 -0
- package/src/{theme → core/theme}/defaults.ts +1 -1
- package/src/core/theme/index.ts +5 -0
- package/src/{theme → core/theme}/theme.test.tsx +2 -2
- package/src/{theme → core/theme}/themeColorProvider.tsx +2 -2
- package/src/{theme → core/theme}/themeProvider.tsx +3 -3
- package/src/core/theme/types.ts +11 -0
- package/src/{theme → core/theme}/useRootTheme.ts +1 -2
- package/src/{theme → core/theme}/useTheme.ts +1 -2
- package/src/core/types/badge.ts +12 -0
- package/src/core/types/button.ts +22 -0
- package/src/core/types/card.ts +6 -0
- package/src/{types → core/types}/index.ts +0 -1
- package/src/core/types/selectable.ts +6 -0
- package/src/core/utils/arrow/arrow.tsx +121 -0
- package/src/core/utils/arrow/cmds.ts +91 -0
- package/src/core/utils/arrow/index.ts +1 -0
- package/src/{utils → core/utils}/boundaryElement/__workshop__/plain.tsx +2 -6
- package/src/{utils → core/utils}/boundaryElement/boundaryElement.test.tsx +1 -1
- package/src/{utils → core/utils}/index.ts +1 -0
- package/src/{utils → core/utils}/layer/__workshop__/_debug.tsx +1 -1
- package/src/{utils → core/utils}/layer/layer.test.tsx +1 -1
- package/src/{utils → core/utils}/portal/__workshop__/named.tsx +3 -3
- package/src/{utils → core/utils}/portal/portal.test.tsx +1 -1
- package/src/theme/{lib/theme/color/selectable → build/_deprecated/color/_selectable}/createSelectableTones.ts +7 -4
- package/src/theme/{lib/theme/color/solid → build/_deprecated/color/_solid}/createSolidTones.ts +1 -3
- package/src/theme/{lib/theme → build/_deprecated}/color/button/createButtonModes.ts +6 -4
- package/src/theme/{lib/theme → build/_deprecated}/color/button/createButtonTones.ts +7 -4
- package/src/theme/{lib/theme → build/_deprecated}/color/card/createCardStates.ts +7 -5
- package/src/theme/{lib/theme → build/_deprecated}/color/color.test.ts +1 -1
- package/src/theme/{lib/theme → build/_deprecated}/color/defaults.ts +7 -7
- package/src/theme/{lib/theme → build/_deprecated}/color/factory.ts +25 -21
- package/src/theme/build/_deprecated/color/index.ts +1 -0
- package/src/theme/{lib/theme → build/_deprecated}/color/input/createInputModes.ts +1 -4
- package/src/theme/{lib/theme → build/_deprecated}/color/muted/createMuted.ts +2 -4
- package/src/theme/{lib/theme → build/_deprecated}/color/spot/createSpot.ts +1 -2
- package/src/theme/{_internal/build/colorTheme → build}/buildColorTheme.test.ts +52 -53
- package/src/theme/build/buildColorTheme.ts +537 -0
- package/src/theme/{_internal/build → build}/buildTheme.test.ts +19 -12
- package/src/theme/build/buildTheme.ts +28 -0
- package/src/theme/build/colorToken.ts +37 -0
- package/src/theme/build/defaults/colorPalette.ts +5 -0
- package/src/theme/build/defaults/colorTokens.ts +499 -0
- package/src/theme/build/defaults/config.ts +81 -0
- package/src/theme/build/defaults/fonts.ts +219 -0
- package/src/theme/build/index.ts +3 -0
- package/src/theme/{lib → build/lib}/color-fns/blend/index.ts +1 -0
- package/src/theme/build/lib/color-fns/blend/mix.ts +21 -0
- package/src/theme/{lib → build/lib}/color-fns/blend/multiply.ts +3 -7
- package/src/theme/{lib → build/lib}/color-fns/blend/screen.ts +3 -7
- package/src/theme/{lib → build/lib}/color-fns/color-fns.test.ts +10 -7
- package/src/theme/build/lib/color-fns/contrastRatio.ts +30 -0
- package/src/theme/{lib → build/lib}/color-fns/convert.ts +10 -1
- package/src/theme/{lib → build/lib}/color-fns/index.ts +2 -1
- package/src/theme/{lib/color-fns/helpers → build/lib/color-fns}/rgba.ts +1 -1
- package/src/theme/build/lib/utils.ts +19 -0
- package/src/theme/build/merge.ts +23 -0
- package/src/theme/build/mixThemeColor.test.ts +21 -0
- package/src/theme/build/mixThemeColor.ts +53 -0
- package/src/theme/build/renderColorTheme.ts +544 -0
- package/src/theme/build/renderColorValue.ts +70 -0
- package/src/theme/build/resolveColorTokens.ts +352 -0
- package/src/theme/{_internal/config → config}/helpers.ts +2 -2
- package/src/theme/{_internal/config → config}/index.ts +2 -1
- package/src/theme/config/system.ts +83 -0
- package/src/theme/config/tokens/color/types.ts +112 -0
- package/src/theme/{_internal/config/token → config/tokens}/index.ts +2 -0
- package/src/theme/{_internal/config/token → config/tokens}/parseTokenKey.test.ts +0 -8
- package/src/theme/{_internal/config/token → config/tokens}/parseTokenKey.ts +2 -24
- package/src/theme/{_internal/config/token → config/tokens}/parseTokenValue.ts +5 -26
- package/src/theme/config/tokens/types.ts +44 -0
- package/src/theme/config/types.ts +51 -0
- package/src/theme/index.ts +4 -9
- package/src/theme/system/_system.ts +95 -0
- package/src/theme/system/avatar.ts +14 -0
- package/src/theme/system/color/_constants.ts +38 -0
- package/src/theme/{lib/theme/color/muted/types.ts → system/color/_deprecated/muted.ts} +3 -1
- package/src/theme/{lib/theme/color/solid/types.ts → system/color/_deprecated/solid.ts} +3 -1
- package/src/theme/system/color/_deprecated/spot.ts +13 -0
- package/src/theme/{lib/theme/color/_generic/types.ts → system/color/_generic.ts} +5 -1
- package/src/theme/system/color/_helpers.ts +23 -0
- package/src/theme/system/color/_system.ts +100 -0
- package/src/theme/system/color/avatar.ts +13 -0
- package/src/theme/system/color/badge.ts +9 -0
- package/src/theme/{lib/theme/color/button/types.ts → system/color/button.ts} +6 -11
- package/src/theme/system/color/card.ts +18 -0
- package/src/theme/system/color/index.ts +20 -0
- package/src/theme/{lib/theme/color/input/types.ts → system/color/input.ts} +3 -0
- package/src/theme/system/color/kbd.ts +8 -0
- package/src/theme/{lib/theme/color/selectable/types.ts → system/color/selectable.ts} +1 -1
- package/src/theme/{lib/theme → system}/index.ts +2 -1
- package/src/theme/{lib/theme → system}/input.ts +6 -6
- package/src/theme/system/shadow.ts +24 -0
- package/src/theme/{studioTheme/theme.ts → themes/studio/config.ts} +12 -25
- package/src/theme/{studioTheme → themes/studio}/fonts.ts +50 -50
- package/src/theme/themes/studio/index.ts +1 -0
- package/src/theme/themes/studio/studioTheme.test.ts +27 -0
- package/src/theme/themes/studio/studioTheme.ts +8 -0
- package/src/primitives/badge/styles.ts +0 -22
- package/src/primitives/popover/popoverArrow.tsx +0 -76
- package/src/primitives/tooltip/tooltipArrow.tsx +0 -89
- package/src/theme/_internal/__workshop__/build/story.tsx +0 -288
- package/src/theme/_internal/__workshop__/build/theme.ts +0 -3
- package/src/theme/_internal/__workshop__/index.ts +0 -14
- package/src/theme/_internal/build/buildTheme.ts +0 -16
- package/src/theme/_internal/build/colorTheme/buildColorTheme.ts +0 -164
- package/src/theme/_internal/build/colorTheme/renderColorTheme.ts +0 -242
- package/src/theme/_internal/build/colorTheme/resolveColorTokens.ts +0 -121
- package/src/theme/_internal/build/defaults/colorPalette.ts +0 -8
- package/src/theme/_internal/build/defaults/colorTokens.ts +0 -147
- package/src/theme/_internal/build/helpers.ts +0 -65
- package/src/theme/_internal/build/index.ts +0 -1
- package/src/theme/_internal/config/types.ts +0 -137
- package/src/theme/_internal/constants.ts +0 -48
- package/src/theme/_internal/helpers.ts +0 -19
- package/src/theme/_internal/index.ts +0 -5
- package/src/theme/_internal/types.ts +0 -91
- package/src/theme/lib/color-fns/helpers/index.ts +0 -1
- package/src/theme/lib/theme/avatar.ts +0 -14
- package/src/theme/lib/theme/color/_legacy/createColorTheme.ts +0 -7
- package/src/theme/lib/theme/color/_legacy/index.ts +0 -1
- package/src/theme/lib/theme/color/_legacy/legacyColor.ts +0 -3997
- package/src/theme/lib/theme/color/base/index.ts +0 -1
- package/src/theme/lib/theme/color/button/index.ts +0 -1
- package/src/theme/lib/theme/color/card/index.ts +0 -1
- package/src/theme/lib/theme/color/card/types.ts +0 -18
- package/src/theme/lib/theme/color/index.ts +0 -14
- package/src/theme/lib/theme/color/input/index.ts +0 -1
- package/src/theme/lib/theme/color/muted/index.ts +0 -1
- package/src/theme/lib/theme/color/selectable/index.ts +0 -1
- package/src/theme/lib/theme/color/solid/index.ts +0 -1
- package/src/theme/lib/theme/color/spot/index.ts +0 -1
- package/src/theme/lib/theme/color/spot/types.ts +0 -28
- package/src/theme/lib/theme/color/syntax/index.ts +0 -1
- package/src/theme/lib/theme/color/types.ts +0 -72
- package/src/theme/lib/theme/shadow.ts +0 -20
- package/src/theme/lib/theme/theme.ts +0 -43
- package/src/theme/studioTheme/color.ts +0 -666
- package/src/theme/studioTheme/helpers.ts +0 -31
- package/src/theme/studioTheme/index.ts +0 -1
- package/src/theme/studioTheme/tints.ts +0 -312
- package/src/theme/types.ts +0 -47
- package/src/types/badge.ts +0 -9
- package/src/types/button.ts +0 -19
- package/src/types/card.ts +0 -6
- package/src/types/selectable.ts +0 -4
- package/src/types/styled.ts +0 -9
- /package/src/{components → core/components}/autocomplete/__fixtures__/countries.ts +0 -0
- /package/src/{components → core/components}/autocomplete/__mocks__/apiStore.ts +0 -0
- /package/src/{components → core/components}/autocomplete/__workshop__/.eslintrc +0 -0
- /package/src/{components → core/components}/autocomplete/__workshop__/fullscreen.tsx +0 -0
- /package/src/{components → core/components}/autocomplete/__workshop__/index.ts +0 -0
- /package/src/{components → core/components}/autocomplete/__workshop__/types.ts +0 -0
- /package/src/{components → core/components}/autocomplete/autocomplete.styles.tsx +0 -0
- /package/src/{components → core/components}/autocomplete/autocomplete.tsx +0 -0
- /package/src/{components → core/components}/autocomplete/autocompleteOption.tsx +0 -0
- /package/src/{components → core/components}/autocomplete/autocompleteReducer.ts +0 -0
- /package/src/{components → core/components}/autocomplete/constants.ts +0 -0
- /package/src/{components → core/components}/autocomplete/index.ts +0 -0
- /package/src/{components → core/components}/autocomplete/types.ts +0 -0
- /package/src/{components → core/components}/breadcrumbs/__workshop__/.eslintrc +0 -0
- /package/src/{components → core/components}/breadcrumbs/__workshop__/example.tsx +0 -0
- /package/src/{components → core/components}/breadcrumbs/__workshop__/index.ts +0 -0
- /package/src/{components → core/components}/breadcrumbs/breadcrumbs.styles.ts +0 -0
- /package/src/{components → core/components}/breadcrumbs/breadcrumbs.tsx +0 -0
- /package/src/{components → core/components}/breadcrumbs/index.ts +0 -0
- /package/src/{components → core/components}/dialog/__workshop__/.eslintrc +0 -0
- /package/src/{components → core/components}/dialog/__workshop__/autoFocus.tsx +0 -0
- /package/src/{components → core/components}/dialog/__workshop__/index.ts +0 -0
- /package/src/{components → core/components}/dialog/__workshop__/nested.tsx +0 -0
- /package/src/{components → core/components}/dialog/__workshop__/onScroll.tsx +0 -0
- /package/src/{components → core/components}/dialog/__workshop__/position.tsx +0 -0
- /package/src/{components → core/components}/dialog/__workshop__/props.tsx +0 -0
- /package/src/{components → core/components}/dialog/__workshop__/provider.tsx +0 -0
- /package/src/{components → core/components}/dialog/__workshop__/wrapped.tsx +0 -0
- /package/src/{components → core/components}/dialog/constants.ts +0 -0
- /package/src/{components → core/components}/dialog/dialogContext.ts +0 -0
- /package/src/{components → core/components}/dialog/dialogProvider.tsx +0 -0
- /package/src/{components → core/components}/dialog/index.ts +0 -0
- /package/src/{components → core/components}/dialog/useDialog.ts +0 -0
- /package/src/{components → core/components}/hotkeys/__workshop__/.eslintrc +0 -0
- /package/src/{components → core/components}/hotkeys/__workshop__/index.ts +0 -0
- /package/src/{components → core/components}/hotkeys/__workshop__/plain.tsx +0 -0
- /package/src/{components → core/components}/hotkeys/hotkeys.tsx +0 -0
- /package/src/{components → core/components}/hotkeys/index.ts +0 -0
- /package/src/{components → core/components}/index.ts +0 -0
- /package/src/{components → core/components}/menu/__workshop__/.eslintrc +0 -0
- /package/src/{components → core/components}/menu/__workshop__/closableMenuButton.tsx +0 -0
- /package/src/{components → core/components}/menu/__workshop__/constrainedInBoundary.tsx +0 -0
- /package/src/{components → core/components}/menu/__workshop__/disableFocusOnClose.tsx +0 -0
- /package/src/{components → core/components}/menu/__workshop__/groups.tsx +0 -0
- /package/src/{components → core/components}/menu/__workshop__/index.ts +0 -0
- /package/src/{components → core/components}/menu/__workshop__/menuGroupRight.tsx +0 -0
- /package/src/{components → core/components}/menu/__workshop__/nestedMenu.tsx +0 -0
- /package/src/{components → core/components}/menu/__workshop__/onCloseMenuButton.tsx +0 -0
- /package/src/{components → core/components}/menu/__workshop__/selectedItem.tsx +0 -0
- /package/src/{components → core/components}/menu/__workshop__/shouldFocus.tsx +0 -0
- /package/src/{components → core/components}/menu/__workshop__/tones.tsx +0 -0
- /package/src/{components → core/components}/menu/__workshop__/withoutArrow.tsx +0 -0
- /package/src/{components → core/components}/menu/helpers.ts +0 -0
- /package/src/{components → core/components}/menu/index.ts +0 -0
- /package/src/{components → core/components}/menu/menu.tsx +0 -0
- /package/src/{components → core/components}/menu/menuContext.ts +0 -0
- /package/src/{components → core/components}/menu/menuDivider.ts +0 -0
- /package/src/{components → core/components}/menu/menuGroup.tsx +0 -0
- /package/src/{components → core/components}/menu/menuItem.tsx +0 -0
- /package/src/{components → core/components}/menu/useMenu.ts +0 -0
- /package/src/{components → core/components}/menu/useMenuController.ts +0 -0
- /package/src/{components → core/components}/skeleton/__workshop__/.eslintrc +0 -0
- /package/src/{components → core/components}/skeleton/__workshop__/delay.tsx +0 -0
- /package/src/{components → core/components}/skeleton/__workshop__/index.ts +0 -0
- /package/src/{components → core/components}/skeleton/__workshop__/skeleton.tsx +0 -0
- /package/src/{components → core/components}/skeleton/index.ts +0 -0
- /package/src/{components → core/components}/skeleton/skeleton.tsx +0 -0
- /package/src/{components → core/components}/skeleton/styles.ts +0 -0
- /package/src/{components → core/components}/tab/__workshop__/.eslintrc +0 -0
- /package/src/{components → core/components}/tab/__workshop__/example.tsx +0 -0
- /package/src/{components → core/components}/tab/__workshop__/index.ts +0 -0
- /package/src/{components → core/components}/tab/index.ts +0 -0
- /package/src/{components → core/components}/tab/tab.tsx +0 -0
- /package/src/{components → core/components}/tab/tabList.tsx +0 -0
- /package/src/{components → core/components}/tab/tabPanel.tsx +0 -0
- /package/src/{components → core/components}/toast/__workshop__/.eslintrc +0 -0
- /package/src/{components → core/components}/toast/__workshop__/hook.tsx +0 -0
- /package/src/{components → core/components}/toast/__workshop__/index.ts +0 -0
- /package/src/{components → core/components}/toast/__workshop__/toast.tsx +0 -0
- /package/src/{components → core/components}/toast/index.ts +0 -0
- /package/src/{components → core/components}/toast/toastContext.ts +0 -0
- /package/src/{components → core/components}/toast/toastProvider.tsx +0 -0
- /package/src/{components → core/components}/toast/types.ts +0 -0
- /package/src/{components → core/components}/toast/useToast.ts +0 -0
- /package/src/{components → core/components}/tree/__workshop__/.eslintrc +0 -0
- /package/src/{components → core/components}/tree/__workshop__/basic.perf.ts +0 -0
- /package/src/{components → core/components}/tree/__workshop__/basic.tsx +0 -0
- /package/src/{components → core/components}/tree/__workshop__/index.ts +0 -0
- /package/src/{components → core/components}/tree/helpers.ts +0 -0
- /package/src/{components → core/components}/tree/index.ts +0 -0
- /package/src/{components → core/components}/tree/tree.tsx +0 -0
- /package/src/{components → core/components}/tree/treeContext.ts +0 -0
- /package/src/{components → core/components}/tree/treeGroup.tsx +0 -0
- /package/src/{components → core/components}/tree/types.ts +0 -0
- /package/src/{components → core/components}/tree/useTree.ts +0 -0
- /package/src/{global.ts → core/global.ts} +0 -0
- /package/src/{helpers → core/helpers}/animation.ts +0 -0
- /package/src/{helpers → core/helpers}/element.ts +0 -0
- /package/src/{helpers → core/helpers}/focus.ts +0 -0
- /package/src/{helpers → core/helpers}/index.ts +0 -0
- /package/src/{helpers → core/helpers}/scroll.ts +0 -0
- /package/src/{hooks → core/hooks}/_internal/index.ts +0 -0
- /package/src/{hooks → core/hooks}/_internal/useUnique.ts +0 -0
- /package/src/{hooks → core/hooks}/index.ts +0 -0
- /package/src/{hooks → core/hooks}/useArrayProp.ts +0 -0
- /package/src/{hooks → core/hooks}/useClickOutside.ts +0 -0
- /package/src/{hooks → core/hooks}/useCustomValidity.ts +0 -0
- /package/src/{hooks → core/hooks}/useDelayed.test.ts +0 -0
- /package/src/{hooks → core/hooks}/useDelayedState.ts +0 -0
- /package/src/{hooks → core/hooks}/useElementRect/__workshop__/.eslintrc +0 -0
- /package/src/{hooks → core/hooks}/useElementRect/__workshop__/index.ts +0 -0
- /package/src/{hooks → core/hooks}/useElementRect/index.ts +0 -0
- /package/src/{hooks → core/hooks}/useElementRect/useElementRect.ts +0 -0
- /package/src/{hooks → core/hooks}/useElementSize.ts +0 -0
- /package/src/{hooks → core/hooks}/useForwardedRef.ts +0 -0
- /package/src/{hooks → core/hooks}/useGlobalKeyDown.ts +0 -0
- /package/src/{hooks → core/hooks}/useIsomorphicEffect.ts +0 -0
- /package/src/{hooks → core/hooks}/useMediaIndex/__workshop__/.eslintrc +0 -0
- /package/src/{hooks → core/hooks}/useMediaIndex/__workshop__/index.ts +0 -0
- /package/src/{hooks → core/hooks}/useMediaIndex/index.ts +0 -0
- /package/src/{hooks → core/hooks}/useMediaIndex/useMediaIndex.ts +0 -0
- /package/src/{hooks → core/hooks}/useMounted.ts +0 -0
- /package/src/{hooks → core/hooks}/usePrefersDark.hydration.test.tsx +0 -0
- /package/src/{hooks → core/hooks}/usePrefersDark.test.tsx +0 -0
- /package/src/{hooks → core/hooks}/usePrefersDark.ts +0 -0
- /package/src/{hooks → core/hooks}/usePrefersReducedMotion.hydration.test.tsx +0 -0
- /package/src/{hooks → core/hooks}/usePrefersReducedMotion.test.tsx +0 -0
- /package/src/{hooks → core/hooks}/usePrefersReducedMotion.ts +0 -0
- /package/src/{lib → core/lib}/globalScope.ts +0 -0
- /package/src/{observers → core/observers}/elementSizeObserver.ts +0 -0
- /package/src/{observers → core/observers}/index.ts +0 -0
- /package/src/{observers → core/observers}/resizeObserver.ts +0 -0
- /package/src/{primitives → core/primitives}/_selectable/index.ts +0 -0
- /package/src/{primitives → core/primitives}/_selectable/selectable.tsx +0 -0
- /package/src/{primitives → core/primitives}/_selectable/style.ts +0 -0
- /package/src/{primitives → core/primitives}/avatar/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/avatar/__workshop__/asButton.tsx +0 -0
- /package/src/{primitives → core/primitives}/avatar/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/avatar/__workshop__/stack.tsx +0 -0
- /package/src/{primitives → core/primitives}/avatar/avatarCounter.tsx +0 -0
- /package/src/{primitives → core/primitives}/avatar/avatarStack.tsx +0 -0
- /package/src/{primitives → core/primitives}/avatar/index.ts +0 -0
- /package/src/{primitives → core/primitives}/badge/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/badge/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/badge/__workshop__/props.tsx +0 -0
- /package/src/{primitives → core/primitives}/badge/__workshop__/tones.tsx +0 -0
- /package/src/{primitives → core/primitives}/badge/index.ts +0 -0
- /package/src/{primitives → core/primitives}/box/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/box/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/box/__workshop__/props.tsx +0 -0
- /package/src/{primitives → core/primitives}/box/__workshop__/responsive.tsx +0 -0
- /package/src/{primitives → core/primitives}/box/box.tsx +0 -0
- /package/src/{primitives → core/primitives}/box/index.ts +0 -0
- /package/src/{primitives → core/primitives}/button/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/button/__workshop__/custom.tsx +0 -0
- /package/src/{primitives → core/primitives}/button/__workshop__/customIcons.tsx +0 -0
- /package/src/{primitives → core/primitives}/button/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/button/__workshop__/mixedChildren.tsx +0 -0
- /package/src/{primitives → core/primitives}/button/__workshop__/props.tsx +0 -0
- /package/src/{primitives → core/primitives}/button/__workshop__/sanityUploadButton.tsx +0 -0
- /package/src/{primitives → core/primitives}/button/__workshop__/styled1.tsx +0 -0
- /package/src/{primitives → core/primitives}/button/__workshop__/styled2.tsx +0 -0
- /package/src/{primitives → core/primitives}/button/__workshop__/uploadButton.tsx +0 -0
- /package/src/{primitives → core/primitives}/button/index.ts +0 -0
- /package/src/{primitives → core/primitives}/card/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/card/__workshop__/allTones.tsx +0 -0
- /package/src/{primitives → core/primitives}/card/__workshop__/checkered.tsx +0 -0
- /package/src/{primitives → core/primitives}/card/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/card/__workshop__/interactive.tsx +0 -0
- /package/src/{primitives → core/primitives}/card/__workshop__/listNavigation.tsx +0 -0
- /package/src/{primitives → core/primitives}/card/__workshop__/props.tsx +0 -0
- /package/src/{primitives → core/primitives}/card/__workshop__/styled.tsx +0 -0
- /package/src/{primitives → core/primitives}/card/index.ts +0 -0
- /package/src/{primitives → core/primitives}/card/styles.ts +0 -0
- /package/src/{primitives → core/primitives}/checkbox/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/checkbox/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/checkbox/__workshop__/tones.tsx +0 -0
- /package/src/{primitives → core/primitives}/checkbox/checkbox.tsx +0 -0
- /package/src/{primitives → core/primitives}/checkbox/index.ts +0 -0
- /package/src/{primitives → core/primitives}/code/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/code/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/code/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{primitives → core/primitives}/code/__workshop__/props.tsx +0 -0
- /package/src/{primitives → core/primitives}/code/code.tsx +0 -0
- /package/src/{primitives → core/primitives}/code/index.ts +0 -0
- /package/src/{primitives → core/primitives}/code/styles.ts +0 -0
- /package/src/{primitives → core/primitives}/container/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/container/__workshop__/example.tsx +0 -0
- /package/src/{primitives → core/primitives}/container/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/container/container.tsx +0 -0
- /package/src/{primitives → core/primitives}/container/index.ts +0 -0
- /package/src/{primitives → core/primitives}/container/types.ts +0 -0
- /package/src/{primitives → core/primitives}/flex/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/flex/__workshop__/example.tsx +0 -0
- /package/src/{primitives → core/primitives}/flex/__workshop__/gap.tsx +0 -0
- /package/src/{primitives → core/primitives}/flex/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/flex/flex.tsx +0 -0
- /package/src/{primitives → core/primitives}/flex/index.ts +0 -0
- /package/src/{primitives → core/primitives}/grid/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/grid/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/grid/__workshop__/responsive.tsx +0 -0
- /package/src/{primitives → core/primitives}/grid/grid.tsx +0 -0
- /package/src/{primitives → core/primitives}/grid/index.ts +0 -0
- /package/src/{primitives → core/primitives}/heading/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/heading/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/heading/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{primitives → core/primitives}/heading/__workshop__/plain.tsx +0 -0
- /package/src/{primitives → core/primitives}/heading/index.ts +0 -0
- /package/src/{primitives → core/primitives}/heading/styles.ts +0 -0
- /package/src/{primitives → core/primitives}/heading/types.ts +0 -0
- /package/src/{primitives → core/primitives}/helpers.ts +0 -0
- /package/src/{primitives → core/primitives}/index.ts +0 -0
- /package/src/{primitives → core/primitives}/inline/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/inline/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/inline/__workshop__/plain.tsx +0 -0
- /package/src/{primitives → core/primitives}/inline/index.ts +0 -0
- /package/src/{primitives → core/primitives}/inline/inline.tsx +0 -0
- /package/src/{primitives → core/primitives}/inline/types.ts +0 -0
- /package/src/{primitives → core/primitives}/kbd/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/kbd/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/kbd/__workshop__/plain.tsx +0 -0
- /package/src/{primitives → core/primitives}/kbd/index.tsx +0 -0
- /package/src/{primitives → core/primitives}/kbd/kbd.tsx +0 -0
- /package/src/{primitives → core/primitives}/label/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/label/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/label/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{primitives → core/primitives}/label/__workshop__/plain.tsx +0 -0
- /package/src/{primitives → core/primitives}/label/index.ts +0 -0
- /package/src/{primitives → core/primitives}/label/styles.ts +0 -0
- /package/src/{primitives → core/primitives}/popover/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/popover/__workshop__/AlignedStory.tsx +0 -0
- /package/src/{primitives → core/primitives}/popover/__workshop__/MarginsStory.tsx +0 -0
- /package/src/{primitives → core/primitives}/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -0
- /package/src/{primitives → core/primitives}/popover/__workshop__/OpenOnMountStory.tsx +0 -0
- /package/src/{primitives → core/primitives}/popover/__workshop__/PlainStory.tsx +0 -0
- /package/src/{primitives → core/primitives}/popover/__workshop__/SidePanelStory.tsx +0 -0
- /package/src/{primitives → core/primitives}/popover/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/popover/floating-ui/size.ts +0 -0
- /package/src/{primitives → core/primitives}/popover/index.ts +0 -0
- /package/src/{primitives → core/primitives}/popover/types.ts +0 -0
- /package/src/{primitives → core/primitives}/radio/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/radio/__workshop__/example.tsx +0 -0
- /package/src/{primitives → core/primitives}/radio/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/radio/__workshop__/plain.tsx +0 -0
- /package/src/{primitives → core/primitives}/radio/index.ts +0 -0
- /package/src/{primitives → core/primitives}/radio/radio.tsx +0 -0
- /package/src/{primitives → core/primitives}/select/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/select/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/select/__workshop__/plain.tsx +0 -0
- /package/src/{primitives → core/primitives}/select/__workshop__/readOnly.tsx +0 -0
- /package/src/{primitives → core/primitives}/select/index.ts +0 -0
- /package/src/{primitives → core/primitives}/select/select.tsx +0 -0
- /package/src/{primitives → core/primitives}/spinner/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/spinner/__workshop__/Props.tsx +0 -0
- /package/src/{primitives → core/primitives}/spinner/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/spinner/index.ts +0 -0
- /package/src/{primitives → core/primitives}/spinner/spinner.tsx +0 -0
- /package/src/{primitives → core/primitives}/stack/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/stack/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/stack/__workshop__/plain.tsx +0 -0
- /package/src/{primitives → core/primitives}/stack/index.ts +0 -0
- /package/src/{primitives → core/primitives}/stack/stack.tsx +0 -0
- /package/src/{primitives → core/primitives}/switch/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/switch/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/switch/__workshop__/props.tsx +0 -0
- /package/src/{primitives → core/primitives}/switch/index.ts +0 -0
- /package/src/{primitives → core/primitives}/switch/switch.tsx +0 -0
- /package/src/{primitives → core/primitives}/text/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/text/__workshop__/example.tsx +0 -0
- /package/src/{primitives → core/primitives}/text/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/text/__workshop__/opticalAlignment.tsx +0 -0
- /package/src/{primitives → core/primitives}/text/index.ts +0 -0
- /package/src/{primitives → core/primitives}/text/styles.ts +0 -0
- /package/src/{primitives → core/primitives}/textArea/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/textArea/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/textArea/index.ts +0 -0
- /package/src/{primitives → core/primitives}/textInput/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/textInput/__workshop__/clearButton.tsx +0 -0
- /package/src/{primitives → core/primitives}/textInput/__workshop__/customValidity.tsx +0 -0
- /package/src/{primitives → core/primitives}/textInput/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/textInput/__workshop__/multipleTones.tsx +0 -0
- /package/src/{primitives → core/primitives}/textInput/__workshop__/readOnly.tsx +0 -0
- /package/src/{primitives → core/primitives}/textInput/__workshop__/tones.tsx +0 -0
- /package/src/{primitives → core/primitives}/textInput/__workshop__/typed.tsx +0 -0
- /package/src/{primitives → core/primitives}/textInput/index.ts +0 -0
- /package/src/{primitives → core/primitives}/tooltip/__workshop__/.eslintrc +0 -0
- /package/src/{primitives → core/primitives}/tooltip/__workshop__/customPortal.tsx +0 -0
- /package/src/{primitives → core/primitives}/tooltip/__workshop__/index.ts +0 -0
- /package/src/{primitives → core/primitives}/tooltip/__workshop__/overflowingBoundary.tsx +0 -0
- /package/src/{primitives → core/primitives}/tooltip/__workshop__/props.tsx +0 -0
- /package/src/{primitives → core/primitives}/tooltip/__workshop__/resizableBoundary.tsx +0 -0
- /package/src/{primitives → core/primitives}/tooltip/conditionalWrapper.tsx +0 -0
- /package/src/{primitives → core/primitives}/tooltip/index.ts +0 -0
- /package/src/{primitives → core/primitives}/tooltip/tooltipDelayGroup/index.ts +0 -0
- /package/src/{primitives → core/primitives}/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -0
- /package/src/{primitives → core/primitives}/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -0
- /package/src/{primitives → core/primitives}/tooltip/tooltipDelayGroup/types.ts +0 -0
- /package/src/{primitives → core/primitives}/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -0
- /package/src/{primitives → core/primitives}/types.ts +0 -0
- /package/src/{styles → core/styles}/border/index.ts +0 -0
- /package/src/{styles → core/styles}/border/types.ts +0 -0
- /package/src/{styles → core/styles}/box/index.ts +0 -0
- /package/src/{styles → core/styles}/box/types.ts +0 -0
- /package/src/{styles → core/styles}/colorVars/index.ts +0 -0
- /package/src/{styles → core/styles}/flex/index.ts +0 -0
- /package/src/{styles → core/styles}/flex/types.ts +0 -0
- /package/src/{styles → core/styles}/font/index.ts +0 -0
- /package/src/{styles → core/styles}/grid/index.ts +0 -0
- /package/src/{styles → core/styles}/grid/types.ts +0 -0
- /package/src/{styles → core/styles}/index.ts +0 -0
- /package/src/{styles → core/styles}/input/index.ts +0 -0
- /package/src/{styles → core/styles}/internal.ts +0 -0
- /package/src/{styles → core/styles}/margin/index.ts +0 -0
- /package/src/{styles → core/styles}/margin/types.ts +0 -0
- /package/src/{styles → core/styles}/padding/index.ts +0 -0
- /package/src/{styles → core/styles}/padding/types.ts +0 -0
- /package/src/{styles → core/styles}/radius/index.ts +0 -0
- /package/src/{styles → core/styles}/radius/types.ts +0 -0
- /package/src/{styles → core/styles}/shadow/index.ts +0 -0
- /package/src/{styles → core/styles}/shadow/types.ts +0 -0
- /package/src/{theme → core/theme}/__workshop__/.eslintrc +0 -0
- /package/src/{theme → core/theme}/__workshop__/layer.tsx +0 -0
- /package/src/{theme → core/theme}/__workshop__/nestedProvider.tsx +0 -0
- /package/src/{theme → core/theme}/themeContext.ts +0 -0
- /package/src/{types → core/types}/avatar.ts +0 -0
- /package/src/{types → core/types}/box.ts +0 -0
- /package/src/{types → core/types}/dialog.ts +0 -0
- /package/src/{types → core/types}/flex.ts +0 -0
- /package/src/{types → core/types}/grid.ts +0 -0
- /package/src/{types → core/types}/gridItem.ts +0 -0
- /package/src/{types → core/types}/placement.ts +0 -0
- /package/src/{types → core/types}/popover.ts +0 -0
- /package/src/{types → core/types}/radius.ts +0 -0
- /package/src/{types → core/types}/text.ts +0 -0
- /package/src/{utils → core/utils}/boundaryElement/__workshop__/.eslintrc +0 -0
- /package/src/{utils → core/utils}/boundaryElement/__workshop__/index.ts +0 -0
- /package/src/{utils → core/utils}/boundaryElement/boundaryElementContext.ts +0 -0
- /package/src/{utils → core/utils}/boundaryElement/boundaryElementProvider.tsx +0 -0
- /package/src/{utils → core/utils}/boundaryElement/index.ts +0 -0
- /package/src/{utils → core/utils}/boundaryElement/types.ts +0 -0
- /package/src/{utils → core/utils}/boundaryElement/useBoundaryElement.ts +0 -0
- /package/src/{utils → core/utils}/elementQuery/__workshop__/.eslintrc +0 -0
- /package/src/{utils → core/utils}/elementQuery/__workshop__/customMedia.tsx +0 -0
- /package/src/{utils → core/utils}/elementQuery/__workshop__/index.ts +0 -0
- /package/src/{utils → core/utils}/elementQuery/elementQuery.tsx +0 -0
- /package/src/{utils → core/utils}/elementQuery/helpers.ts +0 -0
- /package/src/{utils → core/utils}/elementQuery/index.ts +0 -0
- /package/src/{utils → core/utils}/errorBoundary.tsx +0 -0
- /package/src/{utils → core/utils}/layer/__workshop__/.eslintrc +0 -0
- /package/src/{utils → core/utils}/layer/__workshop__/index.ts +0 -0
- /package/src/{utils → core/utils}/layer/__workshop__/multipleRoots.tsx +0 -0
- /package/src/{utils → core/utils}/layer/__workshop__/nested.tsx +0 -0
- /package/src/{utils → core/utils}/layer/__workshop__/responsiveZOffset.tsx +0 -0
- /package/src/{utils → core/utils}/layer/getLayerContext.test.ts +0 -0
- /package/src/{utils → core/utils}/layer/getLayerContext.ts +0 -0
- /package/src/{utils → core/utils}/layer/index.ts +0 -0
- /package/src/{utils → core/utils}/layer/layer.tsx +0 -0
- /package/src/{utils → core/utils}/layer/layerContext.ts +0 -0
- /package/src/{utils → core/utils}/layer/layerProvider.tsx +0 -0
- /package/src/{utils → core/utils}/layer/types.ts +0 -0
- /package/src/{utils → core/utils}/layer/useLayer.ts +0 -0
- /package/src/{utils → core/utils}/portal/__workshop__/.eslintrc +0 -0
- /package/src/{utils → core/utils}/portal/__workshop__/index.ts +0 -0
- /package/src/{utils → core/utils}/portal/index.ts +0 -0
- /package/src/{utils → core/utils}/portal/portal.ts +0 -0
- /package/src/{utils → core/utils}/portal/portalContext.ts +0 -0
- /package/src/{utils → core/utils}/portal/portalProvider.tsx +0 -0
- /package/src/{utils → core/utils}/portal/types.ts +0 -0
- /package/src/{utils → core/utils}/portal/usePortal.ts +0 -0
- /package/src/{utils → core/utils}/srOnly/index.ts +0 -0
- /package/src/{utils → core/utils}/srOnly/srOnly.tsx +0 -0
- /package/src/{utils → core/utils}/virtualList/__workshop__/.eslintrc +0 -0
- /package/src/{utils → core/utils}/virtualList/__workshop__/changingProps.tsx +0 -0
- /package/src/{utils → core/utils}/virtualList/__workshop__/elementScroll.tsx +0 -0
- /package/src/{utils → core/utils}/virtualList/__workshop__/index.ts +0 -0
- /package/src/{utils → core/utils}/virtualList/__workshop__/infiniteList.tsx +0 -0
- /package/src/{utils → core/utils}/virtualList/__workshop__/windowScrolll.tsx +0 -0
- /package/src/{utils → core/utils}/virtualList/index.ts +0 -0
- /package/src/{utils → core/utils}/virtualList/virtualList.tsx +0 -0
- /package/src/theme/{lib → build/lib}/color-fns/parse.ts +0 -0
- /package/src/theme/{lib → build/lib}/color-fns/types.ts +0 -0
- /package/src/theme/{lib/theme/color/_generic → config/tokens/color}/index.ts +0 -0
- /package/src/theme/{_internal/config/token → config/tokens}/parseTokenValue.test.ts +0 -0
- /package/src/theme/{lib/theme/color/base/types.ts → system/color/base.ts} +0 -0
- /package/src/theme/{lib/theme/color/syntax/types.ts → system/color/syntax.ts} +0 -0
- /package/src/theme/{lib/theme → system}/fonts.ts +0 -0
- /package/src/theme/{lib/theme → system}/layer.ts +0 -0
|
@@ -1,666 +0,0 @@
|
|
|
1
|
-
import {black, ColorTints, hues, white} from '@sanity/color'
|
|
2
|
-
import {rgba} from '../lib/color-fns'
|
|
3
|
-
import {createColorTheme} from '../lib/theme'
|
|
4
|
-
import {multiply, screen} from './helpers'
|
|
5
|
-
|
|
6
|
-
export const tones: {[key: string]: ColorTints} = {
|
|
7
|
-
default: hues.gray,
|
|
8
|
-
transparent: hues.gray,
|
|
9
|
-
primary: hues.blue,
|
|
10
|
-
positive: hues.green,
|
|
11
|
-
caution: hues.yellow,
|
|
12
|
-
critical: hues.red,
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const NEUTRAL_TONES = ['default', 'transparent']
|
|
16
|
-
|
|
17
|
-
export const color = createColorTheme({
|
|
18
|
-
base: ({dark, name}) => {
|
|
19
|
-
if (name === 'default') {
|
|
20
|
-
const tints = hues.gray
|
|
21
|
-
const skeletonFrom = dark ? tints[900].hex : tints[100].hex
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
fg: dark ? white.hex : black.hex,
|
|
25
|
-
bg: dark ? black.hex : white.hex,
|
|
26
|
-
border: tints[dark ? 800 : 200].hex,
|
|
27
|
-
focusRing: hues.blue[dark ? 500 : 500].hex,
|
|
28
|
-
shadow: {
|
|
29
|
-
outline: rgba(tints[500].hex, 0.4),
|
|
30
|
-
umbra: dark ? rgba(tints[950].hex, 0.4) : rgba(tints[500].hex, 0.2),
|
|
31
|
-
penumbra: dark ? rgba(tints[950].hex, 0.28) : rgba(tints[500].hex, 0.14),
|
|
32
|
-
ambient: dark ? rgba(tints[950].hex, 0.24) : rgba(tints[500].hex, 0.12),
|
|
33
|
-
},
|
|
34
|
-
skeleton: {
|
|
35
|
-
from: skeletonFrom,
|
|
36
|
-
to: rgba(skeletonFrom, 0.5),
|
|
37
|
-
},
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (name === 'transparent') {
|
|
42
|
-
const tints = tones.default
|
|
43
|
-
const skeletonFrom = tints[dark ? 800 : 200].hex
|
|
44
|
-
|
|
45
|
-
return {
|
|
46
|
-
fg: tints[dark ? 100 : 900].hex,
|
|
47
|
-
bg: tints[dark ? 950 : 50].hex,
|
|
48
|
-
border: tints[dark ? 800 : 300].hex,
|
|
49
|
-
focusRing: hues.blue[500].hex,
|
|
50
|
-
shadow: {
|
|
51
|
-
outline: rgba(tints[500].hex, 0.4),
|
|
52
|
-
umbra: dark ? rgba(tints[900].hex, 0.4) : rgba(tints[500].hex, 0.2),
|
|
53
|
-
penumbra: dark ? rgba(tints[900].hex, 0.28) : rgba(tints[500].hex, 0.14),
|
|
54
|
-
ambient: dark ? rgba(tints[900].hex, 0.24) : rgba(tints[500].hex, 0.12),
|
|
55
|
-
},
|
|
56
|
-
skeleton: {
|
|
57
|
-
from: skeletonFrom,
|
|
58
|
-
to: rgba(skeletonFrom, 0.5),
|
|
59
|
-
},
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const tints = tones[name] || tones.default
|
|
64
|
-
const skeletonFrom = tints[dark ? 800 : 200].hex
|
|
65
|
-
|
|
66
|
-
return {
|
|
67
|
-
fg: tints[dark ? 100 : 900].hex,
|
|
68
|
-
bg: tints[dark ? 950 : 50].hex,
|
|
69
|
-
border: tints[dark ? 800 : 200].hex,
|
|
70
|
-
focusRing: tints[500].hex,
|
|
71
|
-
shadow: {
|
|
72
|
-
outline: rgba(tints[500].hex, 0.4),
|
|
73
|
-
umbra: dark ? rgba(tints[900].hex, 0.4) : rgba(tints[500].hex, 0.2),
|
|
74
|
-
penumbra: dark ? rgba(tints[900].hex, 0.28) : rgba(tints[500].hex, 0.14),
|
|
75
|
-
ambient: dark ? rgba(tints[900].hex, 0.24) : rgba(tints[500].hex, 0.12),
|
|
76
|
-
},
|
|
77
|
-
skeleton: {
|
|
78
|
-
from: skeletonFrom,
|
|
79
|
-
to: rgba(skeletonFrom, 0.5),
|
|
80
|
-
},
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
solid: ({base, dark, name, state, tone}) => {
|
|
85
|
-
const mix = dark ? screen : multiply
|
|
86
|
-
const mix2 = dark ? multiply : screen
|
|
87
|
-
const defaultTints = tones[name] || tones.default
|
|
88
|
-
const isNeutral = NEUTRAL_TONES.includes(name) && NEUTRAL_TONES.includes(tone)
|
|
89
|
-
|
|
90
|
-
let tints = tones[tone === 'default' ? name : tone] || defaultTints
|
|
91
|
-
|
|
92
|
-
if (state === 'disabled') {
|
|
93
|
-
tints = defaultTints
|
|
94
|
-
|
|
95
|
-
const bg = mix(base.bg, tints[dark ? 800 : 200].hex)
|
|
96
|
-
const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)
|
|
97
|
-
|
|
98
|
-
return {
|
|
99
|
-
bg,
|
|
100
|
-
bg2: mix2(bg, tints[dark ? 50 : 950].hex),
|
|
101
|
-
border: mix(base.bg, tints[dark ? 800 : 200].hex),
|
|
102
|
-
iconColor: '', // Add color
|
|
103
|
-
|
|
104
|
-
fg: mix(base.bg, dark ? black.hex : white.hex),
|
|
105
|
-
muted: {
|
|
106
|
-
fg: mix(base.bg, tints[dark ? 950 : 50].hex),
|
|
107
|
-
},
|
|
108
|
-
accent: {
|
|
109
|
-
fg: mix(base.bg, tints[dark ? 950 : 50].hex),
|
|
110
|
-
},
|
|
111
|
-
link: {
|
|
112
|
-
fg: mix(base.bg, tints[dark ? 950 : 50].hex),
|
|
113
|
-
},
|
|
114
|
-
code: {
|
|
115
|
-
bg,
|
|
116
|
-
fg: mix(base.bg, tints[dark ? 950 : 50].hex),
|
|
117
|
-
},
|
|
118
|
-
skeleton: {
|
|
119
|
-
from: skeletonFrom,
|
|
120
|
-
to: rgba(skeletonFrom, 0.5),
|
|
121
|
-
},
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (state === 'hovered') {
|
|
126
|
-
const bg = mix(base.bg, tints[dark ? 300 : 600].hex)
|
|
127
|
-
const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)
|
|
128
|
-
|
|
129
|
-
return {
|
|
130
|
-
bg,
|
|
131
|
-
bg2: mix2(bg, tints[dark ? 50 : 950].hex),
|
|
132
|
-
border: mix(base.bg, tints[dark ? 300 : 600].hex),
|
|
133
|
-
fg: mix(base.bg, dark ? black.hex : white.hex),
|
|
134
|
-
iconColor: '', // Add color
|
|
135
|
-
|
|
136
|
-
muted: {
|
|
137
|
-
fg: mix(base.bg, tints[dark ? 800 : 200].hex),
|
|
138
|
-
},
|
|
139
|
-
accent: {
|
|
140
|
-
fg: mix2(bg, hues.red[dark ? 800 : 200].hex),
|
|
141
|
-
},
|
|
142
|
-
link: {
|
|
143
|
-
fg: mix2(bg, hues.blue[dark ? 800 : 200].hex),
|
|
144
|
-
},
|
|
145
|
-
code: {
|
|
146
|
-
bg: mix(bg, tints[dark ? 950 : 50].hex),
|
|
147
|
-
fg: mix(base.bg, tints[dark ? 800 : 200].hex),
|
|
148
|
-
},
|
|
149
|
-
skeleton: {
|
|
150
|
-
from: skeletonFrom,
|
|
151
|
-
to: rgba(skeletonFrom, 0.5),
|
|
152
|
-
},
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
if (state === 'pressed') {
|
|
157
|
-
const bg = mix(base.bg, tints[dark ? 200 : 800].hex)
|
|
158
|
-
const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)
|
|
159
|
-
|
|
160
|
-
return {
|
|
161
|
-
bg: mix(base.bg, tints[dark ? 200 : 800].hex),
|
|
162
|
-
bg2: mix2(bg, tints[dark ? 50 : 950].hex),
|
|
163
|
-
iconColor: '', // Add color
|
|
164
|
-
|
|
165
|
-
border: mix(base.bg, tints[dark ? 200 : 800].hex),
|
|
166
|
-
fg: mix(base.bg, dark ? black.hex : white.hex),
|
|
167
|
-
muted: {
|
|
168
|
-
fg: mix(base.bg, tints[dark ? 800 : 200].hex),
|
|
169
|
-
},
|
|
170
|
-
accent: {
|
|
171
|
-
fg: mix2(bg, hues.red[dark ? 800 : 200].hex),
|
|
172
|
-
},
|
|
173
|
-
link: {
|
|
174
|
-
fg: mix2(bg, hues.blue[dark ? 800 : 200].hex),
|
|
175
|
-
},
|
|
176
|
-
code: {
|
|
177
|
-
bg: mix(bg, tints[dark ? 950 : 50].hex),
|
|
178
|
-
fg: mix(base.bg, tints[dark ? 800 : 200].hex),
|
|
179
|
-
},
|
|
180
|
-
skeleton: {
|
|
181
|
-
from: skeletonFrom,
|
|
182
|
-
to: rgba(skeletonFrom, 0.5),
|
|
183
|
-
},
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if (state === 'selected') {
|
|
188
|
-
if (isNeutral) {
|
|
189
|
-
tints = tones.primary
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
const bg = mix(base.bg, tints[dark ? 200 : 800].hex)
|
|
193
|
-
const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)
|
|
194
|
-
|
|
195
|
-
return {
|
|
196
|
-
bg,
|
|
197
|
-
bg2: mix2(bg, tints[dark ? 50 : 950].hex),
|
|
198
|
-
border: mix(base.bg, tints[dark ? 200 : 800].hex),
|
|
199
|
-
fg: mix(base.bg, dark ? black.hex : white.hex),
|
|
200
|
-
iconColor: '', // Add color
|
|
201
|
-
|
|
202
|
-
muted: {
|
|
203
|
-
fg: mix(base.bg, tints[dark ? 800 : 200].hex),
|
|
204
|
-
},
|
|
205
|
-
accent: {
|
|
206
|
-
fg: mix2(bg, hues.red[dark ? 800 : 200].hex),
|
|
207
|
-
},
|
|
208
|
-
link: {
|
|
209
|
-
fg: mix2(bg, hues.blue[dark ? 800 : 200].hex),
|
|
210
|
-
},
|
|
211
|
-
code: {
|
|
212
|
-
bg: mix(bg, tints[dark ? 950 : 50].hex),
|
|
213
|
-
fg: mix(base.bg, tints[dark ? 800 : 200].hex),
|
|
214
|
-
},
|
|
215
|
-
skeleton: {
|
|
216
|
-
from: skeletonFrom,
|
|
217
|
-
to: rgba(skeletonFrom, 0.5),
|
|
218
|
-
},
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// state: "enabled" | unknown
|
|
223
|
-
const bg = mix(base.bg, tints[dark ? 400 : 500].hex)
|
|
224
|
-
const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex)
|
|
225
|
-
|
|
226
|
-
return {
|
|
227
|
-
bg,
|
|
228
|
-
bg2: mix2(bg, tints[dark ? 50 : 950].hex),
|
|
229
|
-
border: mix(base.bg, tints[dark ? 400 : 500].hex),
|
|
230
|
-
iconColor: '', // Add color
|
|
231
|
-
|
|
232
|
-
fg: mix(base.bg, dark ? black.hex : white.hex),
|
|
233
|
-
muted: {
|
|
234
|
-
fg: mix(base.bg, tints[dark ? 900 : 100].hex),
|
|
235
|
-
},
|
|
236
|
-
accent: {
|
|
237
|
-
fg: mix2(bg, hues.red[dark ? 900 : 100].hex),
|
|
238
|
-
},
|
|
239
|
-
link: {
|
|
240
|
-
fg: mix2(bg, hues.blue[dark ? 900 : 100].hex),
|
|
241
|
-
},
|
|
242
|
-
code: {
|
|
243
|
-
bg: mix(bg, tints[dark ? 950 : 50].hex),
|
|
244
|
-
fg: mix(base.bg, tints[dark ? 900 : 100].hex),
|
|
245
|
-
},
|
|
246
|
-
skeleton: {
|
|
247
|
-
from: skeletonFrom,
|
|
248
|
-
to: rgba(skeletonFrom, 0.5),
|
|
249
|
-
},
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
|
|
253
|
-
muted: ({base, dark, name, state, tone}) => {
|
|
254
|
-
const mix = dark ? screen : multiply
|
|
255
|
-
const defaultTints = tones[name] || tones.default
|
|
256
|
-
const isNeutral = NEUTRAL_TONES.includes(name) && NEUTRAL_TONES.includes(tone)
|
|
257
|
-
|
|
258
|
-
let tints = tones[tone === 'default' ? name : tone] || defaultTints
|
|
259
|
-
|
|
260
|
-
if (state === 'disabled') {
|
|
261
|
-
tints = defaultTints
|
|
262
|
-
|
|
263
|
-
const bg = base.bg
|
|
264
|
-
const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)
|
|
265
|
-
|
|
266
|
-
return {
|
|
267
|
-
bg,
|
|
268
|
-
bg2: mix(bg, tints[dark ? 950 : 50].hex),
|
|
269
|
-
border: mix(bg, tints[dark ? 950 : 50].hex),
|
|
270
|
-
iconColor: '', // Add color
|
|
271
|
-
fg: mix(bg, tints[dark ? 800 : 200].hex),
|
|
272
|
-
muted: {
|
|
273
|
-
fg: mix(bg, tints[dark ? 900 : 100].hex),
|
|
274
|
-
},
|
|
275
|
-
accent: {
|
|
276
|
-
fg: mix(bg, tints[dark ? 900 : 100].hex),
|
|
277
|
-
},
|
|
278
|
-
link: {
|
|
279
|
-
fg: mix(bg, tints[dark ? 900 : 100].hex),
|
|
280
|
-
},
|
|
281
|
-
code: {
|
|
282
|
-
bg,
|
|
283
|
-
fg: mix(bg, tints[dark ? 900 : 100].hex),
|
|
284
|
-
},
|
|
285
|
-
skeleton: {
|
|
286
|
-
from: rgba(skeletonFrom, 0.5),
|
|
287
|
-
to: rgba(skeletonFrom, 0.25),
|
|
288
|
-
},
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
if (state === 'hovered') {
|
|
293
|
-
// if (isNeutral) {
|
|
294
|
-
// tints = tones.primary
|
|
295
|
-
// }
|
|
296
|
-
|
|
297
|
-
const bg = mix(base.bg, tints[dark ? 950 : 50].hex)
|
|
298
|
-
const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)
|
|
299
|
-
|
|
300
|
-
return {
|
|
301
|
-
bg,
|
|
302
|
-
bg2: mix(bg, tints[dark ? 950 : 50].hex),
|
|
303
|
-
border: mix(bg, tints[dark ? 900 : 100].hex),
|
|
304
|
-
fg: mix(base.bg, tints[dark ? 200 : 800].hex),
|
|
305
|
-
iconColor: '', // Add color
|
|
306
|
-
|
|
307
|
-
muted: {
|
|
308
|
-
fg: mix(base.bg, tints[dark ? 400 : 600].hex),
|
|
309
|
-
},
|
|
310
|
-
accent: {
|
|
311
|
-
fg: mix(base.bg, hues.red[dark ? 400 : 500].hex),
|
|
312
|
-
},
|
|
313
|
-
link: {
|
|
314
|
-
fg: mix(base.bg, hues.blue[dark ? 400 : 600].hex),
|
|
315
|
-
},
|
|
316
|
-
code: {
|
|
317
|
-
bg: mix(bg, tints[dark ? 950 : 50].hex),
|
|
318
|
-
fg: mix(base.bg, tints[dark ? 400 : 600].hex),
|
|
319
|
-
},
|
|
320
|
-
skeleton: {
|
|
321
|
-
from: skeletonFrom,
|
|
322
|
-
to: rgba(skeletonFrom, 0.5),
|
|
323
|
-
},
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
if (state === 'pressed') {
|
|
328
|
-
if (isNeutral) {
|
|
329
|
-
tints = tones.primary
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
const bg = mix(base.bg, tints[dark ? 900 : 100].hex)
|
|
333
|
-
const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)
|
|
334
|
-
|
|
335
|
-
return {
|
|
336
|
-
bg,
|
|
337
|
-
bg2: mix(bg, tints[dark ? 950 : 50].hex),
|
|
338
|
-
border: mix(bg, tints[dark ? 900 : 100].hex),
|
|
339
|
-
iconColor: '', // Add color
|
|
340
|
-
|
|
341
|
-
fg: mix(base.bg, tints[dark ? 200 : 800].hex),
|
|
342
|
-
muted: {
|
|
343
|
-
fg: mix(base.bg, tints[dark ? 400 : 600].hex),
|
|
344
|
-
},
|
|
345
|
-
accent: {
|
|
346
|
-
fg: mix(bg, hues.red[dark ? 400 : 500].hex),
|
|
347
|
-
},
|
|
348
|
-
link: {
|
|
349
|
-
fg: mix(bg, hues.blue[dark ? 400 : 600].hex),
|
|
350
|
-
},
|
|
351
|
-
code: {
|
|
352
|
-
bg: mix(bg, tints[dark ? 950 : 50].hex),
|
|
353
|
-
fg: mix(base.bg, tints[dark ? 400 : 600].hex),
|
|
354
|
-
},
|
|
355
|
-
skeleton: {
|
|
356
|
-
from: skeletonFrom,
|
|
357
|
-
to: rgba(skeletonFrom, 0.5),
|
|
358
|
-
},
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
if (state === 'selected') {
|
|
363
|
-
if (isNeutral) {
|
|
364
|
-
tints = tones.primary
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
const bg = mix(base.bg, tints[dark ? 900 : 100].hex)
|
|
368
|
-
const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)
|
|
369
|
-
|
|
370
|
-
return {
|
|
371
|
-
bg,
|
|
372
|
-
bg2: mix(bg, tints[dark ? 950 : 50].hex),
|
|
373
|
-
border: mix(bg, tints[dark ? 900 : 100].hex),
|
|
374
|
-
fg: mix(base.bg, tints[dark ? 200 : 800].hex),
|
|
375
|
-
iconColor: '', // Add color
|
|
376
|
-
|
|
377
|
-
muted: {
|
|
378
|
-
fg: mix(base.bg, tints[dark ? 400 : 600].hex),
|
|
379
|
-
},
|
|
380
|
-
accent: {
|
|
381
|
-
fg: mix(bg, hues.red[dark ? 400 : 500].hex),
|
|
382
|
-
},
|
|
383
|
-
link: {
|
|
384
|
-
fg: mix(bg, hues.blue[dark ? 400 : 600].hex),
|
|
385
|
-
},
|
|
386
|
-
code: {
|
|
387
|
-
bg: mix(bg, tints[dark ? 950 : 50].hex),
|
|
388
|
-
fg: mix(base.bg, tints[dark ? 400 : 600].hex),
|
|
389
|
-
},
|
|
390
|
-
skeleton: {
|
|
391
|
-
from: skeletonFrom,
|
|
392
|
-
to: rgba(skeletonFrom, 0.5),
|
|
393
|
-
},
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
const bg = base.bg
|
|
398
|
-
const skeletonFrom = mix(bg, tints[dark ? 900 : 100].hex)
|
|
399
|
-
|
|
400
|
-
return {
|
|
401
|
-
bg,
|
|
402
|
-
bg2: mix(bg, tints[dark ? 950 : 50].hex),
|
|
403
|
-
border: mix(bg, tints[dark ? 900 : 100].hex),
|
|
404
|
-
fg: mix(base.bg, tints[dark ? 300 : 700].hex),
|
|
405
|
-
iconColor: '', // Add color
|
|
406
|
-
|
|
407
|
-
muted: {
|
|
408
|
-
fg: mix(base.bg, tints[dark ? 400 : 600].hex),
|
|
409
|
-
},
|
|
410
|
-
accent: {
|
|
411
|
-
fg: mix(base.bg, hues.red[dark ? 400 : 500].hex),
|
|
412
|
-
},
|
|
413
|
-
link: {
|
|
414
|
-
fg: mix(base.bg, hues.blue[dark ? 400 : 600].hex),
|
|
415
|
-
},
|
|
416
|
-
code: {
|
|
417
|
-
bg: mix(base.bg, tints[dark ? 950 : 50].hex),
|
|
418
|
-
fg: mix(base.bg, tints[dark ? 400 : 600].hex),
|
|
419
|
-
},
|
|
420
|
-
skeleton: {
|
|
421
|
-
from: skeletonFrom,
|
|
422
|
-
to: rgba(skeletonFrom, 0.5),
|
|
423
|
-
},
|
|
424
|
-
}
|
|
425
|
-
},
|
|
426
|
-
|
|
427
|
-
button: ({base, mode, muted, solid}) => {
|
|
428
|
-
if (mode === 'bleed') {
|
|
429
|
-
return {
|
|
430
|
-
enabled: {
|
|
431
|
-
...muted.enabled,
|
|
432
|
-
border: muted.enabled.bg,
|
|
433
|
-
},
|
|
434
|
-
hovered: {
|
|
435
|
-
...muted.hovered,
|
|
436
|
-
border: muted.hovered.bg,
|
|
437
|
-
},
|
|
438
|
-
pressed: {
|
|
439
|
-
...muted.pressed,
|
|
440
|
-
border: muted.pressed.bg,
|
|
441
|
-
},
|
|
442
|
-
selected: {
|
|
443
|
-
...muted.selected,
|
|
444
|
-
border: muted.selected.bg,
|
|
445
|
-
},
|
|
446
|
-
disabled: {
|
|
447
|
-
...muted.disabled,
|
|
448
|
-
border: muted.disabled.bg,
|
|
449
|
-
},
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
if (mode === 'ghost') {
|
|
454
|
-
return {
|
|
455
|
-
...solid,
|
|
456
|
-
enabled: {
|
|
457
|
-
...muted.enabled,
|
|
458
|
-
border: base.border,
|
|
459
|
-
},
|
|
460
|
-
disabled: muted.disabled,
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
return solid
|
|
465
|
-
},
|
|
466
|
-
|
|
467
|
-
card: ({base, dark, muted, name, solid, state}) => {
|
|
468
|
-
if (state === 'hovered') {
|
|
469
|
-
return muted[name].hovered
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
if (state === 'disabled') {
|
|
473
|
-
return muted[name].disabled
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
const isNeutral = NEUTRAL_TONES.includes(name)
|
|
477
|
-
const tints = tones[name] || tones.default
|
|
478
|
-
const mix = dark ? screen : multiply
|
|
479
|
-
|
|
480
|
-
if (state === 'pressed') {
|
|
481
|
-
if (isNeutral) {
|
|
482
|
-
return muted.primary.pressed
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
return muted[name].pressed
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
if (state === 'selected') {
|
|
489
|
-
if (isNeutral) {
|
|
490
|
-
return solid.primary.enabled
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
return solid[name].enabled
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
const bg = base.bg
|
|
497
|
-
const skeletonFrom = mix(base.bg, tints[dark ? 900 : 100].hex)
|
|
498
|
-
|
|
499
|
-
return {
|
|
500
|
-
bg,
|
|
501
|
-
bg2: mix(bg, tints[dark ? 950 : 50].hex),
|
|
502
|
-
fg: base.fg,
|
|
503
|
-
border: base.border,
|
|
504
|
-
iconColor: '', // Add color
|
|
505
|
-
muted: {
|
|
506
|
-
fg: mix(base.bg, tints[dark ? 400 : 600].hex),
|
|
507
|
-
},
|
|
508
|
-
accent: {
|
|
509
|
-
fg: mix(base.bg, hues.red[dark ? 400 : 500].hex),
|
|
510
|
-
},
|
|
511
|
-
link: {
|
|
512
|
-
fg: mix(base.bg, hues.blue[dark ? 400 : 600].hex),
|
|
513
|
-
},
|
|
514
|
-
code: {
|
|
515
|
-
bg: mix(base.bg, tints[dark ? 950 : 50].hex),
|
|
516
|
-
fg: tints[dark ? 400 : 600].hex,
|
|
517
|
-
},
|
|
518
|
-
skeleton: {
|
|
519
|
-
from: skeletonFrom,
|
|
520
|
-
to: rgba(skeletonFrom, 0.5),
|
|
521
|
-
},
|
|
522
|
-
}
|
|
523
|
-
},
|
|
524
|
-
|
|
525
|
-
input: ({base, dark, mode, state}) => {
|
|
526
|
-
const mix = dark ? screen : multiply
|
|
527
|
-
|
|
528
|
-
if (mode === 'invalid') {
|
|
529
|
-
const tints = tones.critical
|
|
530
|
-
|
|
531
|
-
return {
|
|
532
|
-
bg: mix(base.bg, tints[dark ? 950 : 50].hex),
|
|
533
|
-
bg2: '', // Add color
|
|
534
|
-
fg: mix(base.bg, tints[dark ? 400 : 600].hex),
|
|
535
|
-
border: mix(base.bg, tints[dark ? 800 : 200].hex),
|
|
536
|
-
placeholder: mix(base.bg, tints[dark ? 600 : 400].hex),
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
if (state === 'hovered') {
|
|
541
|
-
return {
|
|
542
|
-
bg: base.bg,
|
|
543
|
-
bg2: '', // Add color
|
|
544
|
-
|
|
545
|
-
fg: base.fg,
|
|
546
|
-
border: mix(base.bg, hues.gray[dark ? 700 : 300].hex),
|
|
547
|
-
placeholder: mix(base.bg, hues.gray[dark ? 600 : 400].hex),
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
if (state === 'disabled') {
|
|
552
|
-
return {
|
|
553
|
-
bg: mix(base.bg, hues.gray[dark ? 950 : 50].hex),
|
|
554
|
-
bg2: '', // Add color
|
|
555
|
-
|
|
556
|
-
fg: mix(base.bg, hues.gray[dark ? 700 : 300].hex),
|
|
557
|
-
border: mix(base.bg, hues.gray[dark ? 900 : 100].hex),
|
|
558
|
-
placeholder: mix(base.bg, hues.gray[dark ? 800 : 200].hex),
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
if (state === 'readOnly') {
|
|
563
|
-
return {
|
|
564
|
-
bg: mix(base.bg, hues.gray[dark ? 950 : 50].hex),
|
|
565
|
-
bg2: '', // Add color
|
|
566
|
-
|
|
567
|
-
fg: mix(base.bg, hues.gray[dark ? 200 : 800].hex),
|
|
568
|
-
border: mix(base.bg, hues.gray[dark ? 800 : 200].hex),
|
|
569
|
-
placeholder: mix(base.bg, hues.gray[dark ? 600 : 400].hex),
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
return {
|
|
574
|
-
bg: base.bg,
|
|
575
|
-
bg2: '', // Add color
|
|
576
|
-
fg: base.fg,
|
|
577
|
-
border: base.border,
|
|
578
|
-
placeholder: mix(base.bg, hues.gray[dark ? 600 : 400].hex),
|
|
579
|
-
}
|
|
580
|
-
},
|
|
581
|
-
|
|
582
|
-
selectable: ({base, muted, tone, solid, state}) => {
|
|
583
|
-
if (state === 'enabled') {
|
|
584
|
-
return {
|
|
585
|
-
...muted[tone].enabled,
|
|
586
|
-
bg: base.bg,
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
if (state === 'pressed') {
|
|
591
|
-
if (tone === 'default') {
|
|
592
|
-
return muted.primary.pressed
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
return muted[tone].pressed
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
if (state === 'selected') {
|
|
599
|
-
if (tone === 'default') {
|
|
600
|
-
return solid.primary.enabled
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
return solid[tone].enabled
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
if (state === 'disabled') {
|
|
607
|
-
return {
|
|
608
|
-
...muted[tone].disabled,
|
|
609
|
-
bg: base.bg,
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
return muted[tone][state]
|
|
614
|
-
},
|
|
615
|
-
|
|
616
|
-
spot: ({base, dark, key}) => {
|
|
617
|
-
const mix = dark ? screen : multiply
|
|
618
|
-
|
|
619
|
-
return mix(base.bg, hues[key][dark ? 400 : 500].hex)
|
|
620
|
-
},
|
|
621
|
-
|
|
622
|
-
syntax: ({base, dark}) => {
|
|
623
|
-
const mix = dark ? screen : multiply
|
|
624
|
-
const mainShade = dark ? 400 : 600
|
|
625
|
-
const secondaryShade = dark ? 600 : 400
|
|
626
|
-
|
|
627
|
-
return {
|
|
628
|
-
atrule: mix(base.bg, hues.purple[mainShade].hex),
|
|
629
|
-
attrName: mix(base.bg, hues.green[mainShade].hex),
|
|
630
|
-
attrValue: mix(base.bg, hues.yellow[mainShade].hex),
|
|
631
|
-
attribute: mix(base.bg, hues.yellow[mainShade].hex),
|
|
632
|
-
boolean: mix(base.bg, hues.purple[mainShade].hex),
|
|
633
|
-
builtin: mix(base.bg, hues.purple[mainShade].hex),
|
|
634
|
-
cdata: mix(base.bg, hues.yellow[mainShade].hex),
|
|
635
|
-
char: mix(base.bg, hues.yellow[mainShade].hex),
|
|
636
|
-
class: mix(base.bg, hues.orange[mainShade].hex),
|
|
637
|
-
className: mix(base.bg, hues.cyan[mainShade].hex),
|
|
638
|
-
comment: mix(base.bg, hues.gray[secondaryShade].hex),
|
|
639
|
-
constant: mix(base.bg, hues.purple[mainShade].hex),
|
|
640
|
-
deleted: mix(base.bg, hues.red[mainShade].hex),
|
|
641
|
-
doctype: mix(base.bg, hues.gray[secondaryShade].hex),
|
|
642
|
-
entity: mix(base.bg, hues.red[mainShade].hex),
|
|
643
|
-
function: mix(base.bg, hues.green[mainShade].hex),
|
|
644
|
-
hexcode: mix(base.bg, hues.blue[mainShade].hex),
|
|
645
|
-
id: mix(base.bg, hues.purple[mainShade].hex),
|
|
646
|
-
important: mix(base.bg, hues.purple[mainShade].hex),
|
|
647
|
-
inserted: mix(base.bg, hues.yellow[mainShade].hex),
|
|
648
|
-
keyword: mix(base.bg, hues.magenta[mainShade].hex),
|
|
649
|
-
number: mix(base.bg, hues.purple[mainShade].hex),
|
|
650
|
-
operator: mix(base.bg, hues.magenta[mainShade].hex),
|
|
651
|
-
prolog: mix(base.bg, hues.gray[secondaryShade].hex),
|
|
652
|
-
property: mix(base.bg, hues.blue[mainShade].hex),
|
|
653
|
-
pseudoClass: mix(base.bg, hues.yellow[mainShade].hex),
|
|
654
|
-
pseudoElement: mix(base.bg, hues.yellow[mainShade].hex),
|
|
655
|
-
punctuation: mix(base.bg, hues.gray[mainShade].hex),
|
|
656
|
-
regex: mix(base.bg, hues.blue[mainShade].hex),
|
|
657
|
-
selector: mix(base.bg, hues.red[mainShade].hex),
|
|
658
|
-
string: mix(base.bg, hues.yellow[mainShade].hex),
|
|
659
|
-
symbol: mix(base.bg, hues.purple[mainShade].hex),
|
|
660
|
-
tag: mix(base.bg, hues.red[mainShade].hex),
|
|
661
|
-
unit: mix(base.bg, hues.orange[mainShade].hex),
|
|
662
|
-
url: mix(base.bg, hues.red[mainShade].hex),
|
|
663
|
-
variable: mix(base.bg, hues.red[mainShade].hex),
|
|
664
|
-
}
|
|
665
|
-
},
|
|
666
|
-
})
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseColor,
|
|
3
|
-
rgbToHex,
|
|
4
|
-
screen as _screen,
|
|
5
|
-
multiply as _multiply,
|
|
6
|
-
rgba,
|
|
7
|
-
} from '../lib/color-fns'
|
|
8
|
-
|
|
9
|
-
export function multiply(bg: string, fg: string): string {
|
|
10
|
-
const b = parseColor(bg)
|
|
11
|
-
const s = parseColor(fg)
|
|
12
|
-
const hex = rgbToHex(_multiply(b, s))
|
|
13
|
-
|
|
14
|
-
if (s.a) {
|
|
15
|
-
return rgba(hex, s.a)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return hex
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function screen(bg: string, fg: string): string {
|
|
22
|
-
const b = parseColor(bg)
|
|
23
|
-
const s = parseColor(fg)
|
|
24
|
-
const hex = rgbToHex(_screen(b, s))
|
|
25
|
-
|
|
26
|
-
if (s.a) {
|
|
27
|
-
return rgba(hex, s.a)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return hex
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './theme'
|