@yahoo/uds 3.59.0-beta.1 → 3.59.0-beta.2
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/cli/bin/uds-darwin-arm64-baseline +0 -0
- package/cli/bin/uds-darwin-x64 +0 -0
- package/cli/bin/uds-linux-arm64 +0 -0
- package/cli/bin/uds-linux-x64-baseline +0 -0
- package/dist/components/Box.d.ts +2 -2
- package/dist/components/Box.d.ts.map +1 -1
- package/dist/components/Divider/Divider.d.cts +2 -2
- package/dist/components/Divider/Divider.d.ts +2 -2
- package/dist/components/Divider/DividerCore.d.cts +2 -2
- package/dist/components/Divider/DividerCore.d.ts +2 -2
- package/dist/components/Divider/DividerInternal.d.cts +2 -2
- package/dist/components/Divider/DividerInternal.d.ts +2 -2
- package/dist/components/FormLabel.d.ts +2 -2
- package/dist/components/HStack.d.ts +2 -2
- package/dist/components/Icon.d.ts +2 -2
- package/dist/components/Link.d.ts +2 -2
- package/dist/components/Text.d.cts +5 -5
- package/dist/components/Text.d.cts.map +1 -1
- package/dist/components/Text.d.ts +8 -8
- package/dist/components/Text.d.ts.map +1 -1
- package/dist/components/VStack.d.ts +2 -2
- package/dist/components/VStack.d.ts.map +1 -1
- package/dist/components/client/AnimateHeightChange.d.cts +2 -2
- package/dist/components/client/AnimateHeightChange.d.ts +2 -2
- package/dist/components/client/Avatar/Avatar.d.cts +2 -2
- package/dist/components/client/Avatar/Avatar.d.cts.map +1 -1
- package/dist/components/client/Avatar/Avatar.d.ts +2 -2
- package/dist/components/client/Avatar/AvatarIcon.d.cts +2 -2
- package/dist/components/client/Avatar/AvatarIcon.d.cts.map +1 -1
- package/dist/components/client/Avatar/AvatarIcon.d.ts +2 -2
- package/dist/components/client/Avatar/AvatarImage.d.cts +2 -2
- package/dist/components/client/Avatar/AvatarImage.d.ts +2 -2
- package/dist/components/client/Avatar/AvatarText.d.cts +2 -2
- package/dist/components/client/Avatar/AvatarText.d.ts +2 -2
- package/dist/components/client/IconButton.d.cts +2 -2
- package/dist/components/client/IconButton.d.ts +2 -2
- package/dist/components/client/IconButton.d.ts.map +1 -1
- package/dist/components/client/Input/Input.d.cts +2 -2
- package/dist/components/client/Input/Input.d.ts +2 -2
- package/dist/components/client/Input/InputHelpText.d.cts +2 -2
- package/dist/components/client/Input/InputHelpText.d.cts.map +1 -1
- package/dist/components/client/Input/InputHelpText.d.ts +2 -2
- package/dist/components/client/Input/InputHelpTextInternal.d.cts +4 -4
- package/dist/components/client/Input/InputHelpTextInternal.d.cts.map +1 -1
- package/dist/components/client/Input/InputHelpTextInternal.d.ts +4 -4
- package/dist/components/client/Menu/Menu.Content.d.cts +2 -2
- package/dist/components/client/Menu/Menu.Content.d.ts +2 -2
- package/dist/components/client/Menu/Menu.Divider.d.cts +2 -2
- package/dist/components/client/Menu/Menu.Divider.d.ts +2 -2
- package/dist/components/client/Menu/Menu.Item.d.cts +2 -2
- package/dist/components/client/Menu/Menu.ItemBase.d.cts +2 -2
- package/dist/components/client/Menu/Menu.ItemBase.d.ts +2 -2
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +2 -2
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +2 -2
- package/dist/components/client/Menu/Menu.Provider.d.cts +2 -2
- package/dist/components/client/Menu/Menu.Provider.d.ts +2 -2
- package/dist/components/client/Menu/Menu.Trigger.d.cts +2 -2
- package/dist/components/client/Menu/Menu.Trigger.d.ts +2 -2
- package/dist/components/client/Pressable.d.cts +2 -2
- package/dist/components/client/Pressable.d.ts +2 -2
- package/dist/components/client/Pressable.d.ts.map +1 -1
- package/dist/components/client/Radio/RadioGroupStore.d.ts +2 -2
- package/dist/components/client/SpringMotionConfig.d.cts +3 -3
- package/dist/components/client/SpringMotionConfig.d.ts +3 -3
- package/dist/components/client/SpringMotionConfig.d.ts.map +1 -1
- package/dist/components/experimental/Spinner.d.cts +2 -2
- package/dist/components/experimental/Spinner.d.cts.map +1 -1
- package/dist/components/experimental/Spinner.d.ts +2 -2
- package/dist/components/experimental/Table.d.cts +2 -2
- package/dist/components/experimental/Table.d.ts +2 -2
- package/dist/components/experimental/client/Accordion.d.cts +2 -2
- package/dist/components/experimental/client/Accordion.d.cts.map +1 -1
- package/dist/components/experimental/client/Accordion.d.ts +2 -2
- package/dist/components/experimental/client/AvoidMotionLibraryProvider.d.cts +2 -2
- package/dist/components/experimental/client/AvoidMotionLibraryProvider.d.ts +2 -2
- package/dist/components/experimental/client/Modal.d.cts +3 -3
- package/dist/components/experimental/client/Modal.d.cts.map +1 -1
- package/dist/components/experimental/client/Modal.d.ts +3 -3
- package/dist/components/experimental/client/Popover.d.cts +3 -3
- package/dist/components/experimental/client/Popover.d.cts.map +1 -1
- package/dist/components/experimental/client/Popover.d.ts +3 -3
- package/dist/components/experimental/client/Tabs.d.cts +3 -3
- package/dist/components/experimental/client/Tabs.d.ts +6 -6
- package/dist/components/experimental/client/Toast.d.cts +2 -2
- package/dist/components/experimental/client/Toast.d.ts +2 -2
- package/dist/providers/ColorModeProvider.d.cts +4 -4
- package/dist/providers/ColorModeProvider.d.cts.map +1 -1
- package/dist/providers/ColorModeProvider.d.ts +4 -4
- package/dist/providers/ColorModeProvider.d.ts.map +1 -1
- package/dist/providers/ScaleModeProvider.d.cts +4 -4
- package/dist/providers/ScaleModeProvider.d.cts.map +1 -1
- package/dist/providers/ScaleModeProvider.d.ts +4 -4
- package/dist/providers/ScaleModeProvider.d.ts.map +1 -1
- package/dist/providers/ThemeProvider.d.cts +2 -2
- package/dist/providers/ThemeProvider.d.cts.map +1 -1
- package/dist/providers/ThemeProvider.d.ts +2 -2
- package/dist/styles/styler.d.cts +33 -33
- package/dist/styles/styler.d.ts +33 -33
- package/dist/styles/stylerTypes.d.ts.map +1 -1
- package/dist/tailwind/tailwind.config.d.ts +3 -3
- package/dist/tailwind/tailwindPlugin.d.ts +3 -3
- package/dist/tailwind/utils/getMotionStyles.d.cts +1 -1
- package/dist/tailwind/utils/getMotionStyles.d.ts +1 -1
- package/dist/tokens/automation/utils/getConfigVariantProperties.d.cts +2 -2
- package/dist/tokens/automation/utils/getConfigVariantProperties.d.cts.map +1 -1
- package/dist/tokens/automation/utils/getConfigVariantProperties.d.ts +2 -2
- package/dist/tokens/automation/utils/getConfigVariantProperties.d.ts.map +1 -1
- package/dist/tokens/types.d.cts.map +1 -1
- package/dist/tokens/types.d.ts.map +1 -1
- package/dist/utils/intersperse.d.cts +2 -2
- package/dist/utils/intersperse.d.ts +2 -2
- package/package.json +1 -3
- package/cli/FlattenButtonVariant.mock.tsx +0 -17
- package/src/components/Box.tsx +0 -181
- package/src/components/Divider/Divider.tsx +0 -44
- package/src/components/Divider/DividerCore.tsx +0 -101
- package/src/components/Divider/DividerInternal.tsx +0 -56
- package/src/components/Divider/index.ts +0 -1
- package/src/components/FormLabel.tsx +0 -66
- package/src/components/HStack.tsx +0 -53
- package/src/components/Icon.tsx +0 -82
- package/src/components/IconSlot.tsx +0 -82
- package/src/components/Image.tsx +0 -162
- package/src/components/Link.tsx +0 -134
- package/src/components/Text.tsx +0 -272
- package/src/components/VStack.tsx +0 -53
- package/src/components/client/AnimateHeightChange.tsx +0 -50
- package/src/components/client/Avatar/Avatar.tsx +0 -31
- package/src/components/client/Avatar/AvatarIcon.tsx +0 -103
- package/src/components/client/Avatar/AvatarImage.tsx +0 -147
- package/src/components/client/Avatar/AvatarText.tsx +0 -88
- package/src/components/client/Avatar/index.ts +0 -4
- package/src/components/client/Avatar/utils.ts +0 -105
- package/src/components/client/Badge.tsx +0 -133
- package/src/components/client/Button.tsx +0 -312
- package/src/components/client/Checkbox.tsx +0 -377
- package/src/components/client/Chip/Chip.tsx +0 -81
- package/src/components/client/Chip/ChipBase.tsx +0 -151
- package/src/components/client/Chip/ChipButton.tsx +0 -54
- package/src/components/client/Chip/ChipDismissible.tsx +0 -90
- package/src/components/client/Chip/ChipLink.tsx +0 -60
- package/src/components/client/Chip/ChipToggle.tsx +0 -79
- package/src/components/client/Chip/index.ts +0 -5
- package/src/components/client/IconButton.tsx +0 -198
- package/src/components/client/Input/Input.tsx +0 -323
- package/src/components/client/Input/InputHelpText.tsx +0 -52
- package/src/components/client/Input/InputHelpTextInternal.tsx +0 -81
- package/src/components/client/Input/index.ts +0 -2
- package/src/components/client/Menu/Menu.Content.tsx +0 -391
- package/src/components/client/Menu/Menu.Divider.tsx +0 -102
- package/src/components/client/Menu/Menu.Item.tsx +0 -114
- package/src/components/client/Menu/Menu.ItemBase.tsx +0 -265
- package/src/components/client/Menu/Menu.ItemCheckbox.tsx +0 -197
- package/src/components/client/Menu/Menu.Provider.tsx +0 -154
- package/src/components/client/Menu/Menu.Trigger.tsx +0 -119
- package/src/components/client/Menu/Menu.index.tsx +0 -9
- package/src/components/client/Menu/Menu.tsx +0 -2
- package/src/components/client/Menu/index.ts +0 -7
- package/src/components/client/Menu/utils/transformAriakitPlacement.ts +0 -66
- package/src/components/client/Pressable.tsx +0 -194
- package/src/components/client/Radio/Radio.tsx +0 -351
- package/src/components/client/Radio/RadioGroupProvider.tsx +0 -122
- package/src/components/client/Radio/RadioGroupStore.tsx +0 -56
- package/src/components/client/Radio/index.ts +0 -2
- package/src/components/client/Radio/useRadioGroup.ts +0 -149
- package/src/components/client/SpringMotionConfig.tsx +0 -151
- package/src/components/client/Switch.tsx +0 -377
- package/src/components/client/index.ts +0 -30
- package/src/components/client/motionFeatures/domAnimation.ts +0 -2
- package/src/components/client/motionFeatures/domMax.ts +0 -2
- package/src/components/experimental/Spinner.tsx +0 -30
- package/src/components/experimental/Table.mocks.tsx +0 -38
- package/src/components/experimental/Table.tsx +0 -239
- package/src/components/experimental/client/Accordion.tsx +0 -77
- package/src/components/experimental/client/AvoidMotionLibraryProvider.tsx +0 -10
- package/src/components/experimental/client/Modal.tsx +0 -68
- package/src/components/experimental/client/Popover.tsx +0 -63
- package/src/components/experimental/client/SwitchV2.tsx +0 -343
- package/src/components/experimental/client/Tabs.tsx +0 -106
- package/src/components/experimental/client/Toast.tsx +0 -186
- package/src/components/experimental/client/index.ts +0 -15
- package/src/components/experimental/index.ts +0 -48
- package/src/components/index.ts +0 -41
- package/src/defaultTokensConfig.ts +0 -31
- package/src/fixtures/index.ts +0 -638
- package/src/fixtures/macros/typesToConstants.ts +0 -42
- package/src/fixtures/utils/getScaleModeRamp.ts +0 -48
- package/src/fixtures/utils/getTailwindAsUdsColors.ts +0 -115
- package/src/flags.ts +0 -45
- package/src/hooks/useForkRef.ts +0 -34
- package/src/hooks/useNestedBorderRadius.ts +0 -138
- package/src/hooks/useRtl.ts +0 -64
- package/src/index.ts +0 -4
- package/src/providers/ColorModeProvider.tsx +0 -21
- package/src/providers/ScaleModeProvider.tsx +0 -29
- package/src/providers/ThemeProvider.tsx +0 -26
- package/src/styles/styler.ts +0 -194
- package/src/styles/stylerTypes.ts +0 -81
- package/src/styles/toast.css +0 -0
- package/src/styles/variants.ts +0 -1351
- package/src/tailwind/base/addColorModeVars.ts +0 -23
- package/src/tailwind/base/addColorModeVarsV2.ts +0 -57
- package/src/tailwind/base/addFontFaceDeclarations.ts +0 -13
- package/src/tailwind/base/addFontVars.ts +0 -9
- package/src/tailwind/base/addMotionVars.ts +0 -9
- package/src/tailwind/base/addScaleModeVars.ts +0 -33
- package/src/tailwind/base/types.ts +0 -8
- package/src/tailwind/components/getButtonStyles.ts +0 -240
- package/src/tailwind/components/getFocusRingStyles.ts +0 -32
- package/src/tailwind/components/getGroupedTextStyles.ts +0 -29
- package/src/tailwind/components/getHitTargetStyles.ts +0 -23
- package/src/tailwind/components/getIconButtonStyles.ts +0 -49
- package/src/tailwind/components/getIconStyles.ts +0 -13
- package/src/tailwind/components/getInputStyles.ts +0 -20
- package/src/tailwind/components/getResponsiveTextStyles.ts +0 -161
- package/src/tailwind/components/types.ts +0 -14
- package/src/tailwind/components/utils.ts +0 -73
- package/src/tailwind/defaultTailwindThemeAsUdsConfig.ts +0 -78
- package/src/tailwind/postcss.config.ts +0 -6
- package/src/tailwind/purger/index.ts +0 -1
- package/src/tailwind/tailwind.config.ts +0 -50
- package/src/tailwind/tailwind.d.ts +0 -5
- package/src/tailwind/tailwindPlugin.ts +0 -724
- package/src/tailwind/theme/getFontFamilyTheme.ts +0 -28
- package/src/tailwind/tsMorph.ts +0 -1
- package/src/tailwind/uds.css +0 -3
- package/src/tailwind/utils/addFontsPlugin.ts +0 -17
- package/src/tailwind/utils/getColorModeStyles.ts +0 -21
- package/src/tailwind/utils/getFontFaceDeclarations.ts +0 -12
- package/src/tailwind/utils/getFontStyles.ts +0 -38
- package/src/tailwind/utils/getMotionStyles.ts +0 -35
- package/src/tailwind/utils/getScaleModeStyles.ts +0 -23
- package/src/tailwind/utils/getShadowPresetValues.ts +0 -133
- package/src/tailwind/utils/getShadowStyles.ts +0 -26
- package/src/tailwind/utils/getShadowVars.ts +0 -40
- package/src/tailwind/utils/index.ts +0 -9
- package/src/tokens/automation/configs/avatar.ts +0 -297
- package/src/tokens/automation/configs/badge.ts +0 -306
- package/src/tokens/automation/configs/checkbox.ts +0 -226
- package/src/tokens/automation/configs/chip.ts +0 -521
- package/src/tokens/automation/configs/divider.ts +0 -112
- package/src/tokens/automation/configs/index.ts +0 -10
- package/src/tokens/automation/configs/input.ts +0 -496
- package/src/tokens/automation/configs/link.ts +0 -183
- package/src/tokens/automation/configs/menu.ts +0 -344
- package/src/tokens/automation/configs/radio.ts +0 -225
- package/src/tokens/automation/configs/switch.ts +0 -323
- package/src/tokens/automation/index.ts +0 -5
- package/src/tokens/automation/mapTextVariantFixtureToValue.ts +0 -8
- package/src/tokens/automation/properties.ts +0 -433
- package/src/tokens/automation/types/ComponentConfig.ts +0 -116
- package/src/tokens/automation/types/ComponentDB.ts +0 -1
- package/src/tokens/automation/types/ComponentStyles.ts +0 -47
- package/src/tokens/automation/types/index.ts +0 -2
- package/src/tokens/automation/utils/cartesianProduct.ts +0 -13
- package/src/tokens/automation/utils/coalesceConfigVariant.ts +0 -49
- package/src/tokens/automation/utils/defaults.ts +0 -29
- package/src/tokens/automation/utils/generateKeyFromFlatConfigPath.ts +0 -15
- package/src/tokens/automation/utils/generateSchemaKey.ts +0 -29
- package/src/tokens/automation/utils/getConfigComponentVariant.ts +0 -28
- package/src/tokens/automation/utils/getConfigVariantComponentStatesMatrix.ts +0 -40
- package/src/tokens/automation/utils/getConfigVariantProperties.ts +0 -32
- package/src/tokens/automation/utils/getConfigVariantPseudoStates.ts +0 -70
- package/src/tokens/automation/utils/getConfigVariants.ts +0 -73
- package/src/tokens/automation/utils/index.ts +0 -939
- package/src/tokens/automation/utils/mapColorFixtureToValue.ts +0 -34
- package/src/tokens/automation/utils/subcomponents.ts +0 -13
- package/src/tokens/automation/utils/variableData.ts +0 -79
- package/src/tokens/automation/utils/variantConfigGuards.ts +0 -17
- package/src/tokens/configs/borderRadius.ts +0 -23
- package/src/tokens/configs/borderWidth.ts +0 -17
- package/src/tokens/configs/button.ts +0 -888
- package/src/tokens/configs/colorMode.ts +0 -14
- package/src/tokens/configs/font.ts +0 -9
- package/src/tokens/configs/iconButton.ts +0 -28
- package/src/tokens/configs/motion.ts +0 -135
- package/src/tokens/configs/palette.ts +0 -124
- package/src/tokens/configs/scaleMode.ts +0 -28
- package/src/tokens/configs/shadow.ts +0 -286
- package/src/tokens/configs/sizes.ts +0 -23
- package/src/tokens/configs/spectrum.ts +0 -729
- package/src/tokens/configs/typography.ts +0 -417
- package/src/tokens/configs/yosConfig.ts +0 -7651
- package/src/tokens/consts/buttonMotionTokens.ts +0 -99
- package/src/tokens/consts/cssTokens.ts +0 -110
- package/src/tokens/consts/defaultModes.ts +0 -15
- package/src/tokens/consts/fontDeclarationsMap.ts +0 -509
- package/src/tokens/index.ts +0 -15
- package/src/tokens/parseButtonVariants.ts +0 -59
- package/src/tokens/parseTokens.ts +0 -122
- package/src/tokens/types.ts +0 -1882
- package/src/tokens/utils/entries.ts +0 -14
- package/src/tokens/utils/fromEntries.ts +0 -11
- package/src/tokens/utils/mapValues.ts +0 -15
- package/src/types.ts +0 -2
- package/src/utils/assertUnreachable.ts +0 -6
- package/src/utils/composeRefs.ts +0 -23
- package/src/utils/createSlot.tsx +0 -131
- package/src/utils/entries.ts +0 -6
- package/src/utils/falsyToString.ts +0 -3
- package/src/utils/getMotionVar.ts +0 -18
- package/src/utils/intersperse.ts +0 -45
- package/src/utils/mapValues.ts +0 -15
- package/src/utils/mergeSlotProps.ts +0 -70
package/src/components/index.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export { Box, type BoxProps } from './Box';
|
|
2
|
-
export { Divider, type DividerProps } from './Divider';
|
|
3
|
-
export { FormLabel, type FormLabelProps } from './FormLabel';
|
|
4
|
-
export { HStack, type HStackProps } from './HStack';
|
|
5
|
-
export { Icon, type IconProps } from './Icon';
|
|
6
|
-
export { Image, type ImageProps } from './Image';
|
|
7
|
-
export { Link, type LinkProps } from './Link';
|
|
8
|
-
export { Text, type TextProps } from './Text';
|
|
9
|
-
export { VStack, type VStackProps } from './VStack';
|
|
10
|
-
|
|
11
|
-
// Client Components
|
|
12
|
-
export { Button, type ButtonProps } from './client';
|
|
13
|
-
export { SpringMotionConfig, type SpringMotionConfigProps } from './client';
|
|
14
|
-
export { IconButton, type IconButtonProps } from './client';
|
|
15
|
-
export { Pressable, type PressableProps } from './client';
|
|
16
|
-
export { Avatar, type AvatarProps } from './client';
|
|
17
|
-
export { AvatarIcon, type AvatarIconProps } from './client';
|
|
18
|
-
export { AvatarImage, type AvatarImageProps } from './client';
|
|
19
|
-
export { AvatarText, type AvatarTextProps } from './client';
|
|
20
|
-
export { Checkbox, type CheckboxProps } from './client';
|
|
21
|
-
export { Switch, type SwitchProps } from './client';
|
|
22
|
-
export { Chip, type ChipProps } from './client';
|
|
23
|
-
export { ChipButton, type ChipButtonProps } from './client';
|
|
24
|
-
export { ChipDismissible, type ChipDismissibleProps } from './client';
|
|
25
|
-
export { ChipLink, type ChipLinkProps } from './client';
|
|
26
|
-
export { ChipToggle, type ChipToggleProps } from './client';
|
|
27
|
-
export { Input, type InputProps } from './client';
|
|
28
|
-
export { InputHelpText, type InputHelpTextProps } from './client';
|
|
29
|
-
export { Badge, type BadgeProps } from './client';
|
|
30
|
-
export { Radio, type RadioProps } from './client';
|
|
31
|
-
export { RadioGroupProvider, type RadioGroupProviderProps } from './client';
|
|
32
|
-
export { Menu } from './client'; // Need on single line to help docs parser
|
|
33
|
-
export {
|
|
34
|
-
type MenuContentProps,
|
|
35
|
-
type MenuDividerProps,
|
|
36
|
-
type MenuItemCheckboxProps,
|
|
37
|
-
type MenuItemProps,
|
|
38
|
-
type MenuPlacement,
|
|
39
|
-
type MenuProviderProps,
|
|
40
|
-
type MenuTriggerProps,
|
|
41
|
-
} from './client';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { yosConfig } from './tokens/configs/yosConfig';
|
|
2
|
-
import type {
|
|
3
|
-
BreakpointsConfig,
|
|
4
|
-
ButtonConfig,
|
|
5
|
-
ColorModeConfig,
|
|
6
|
-
FontConfig,
|
|
7
|
-
GlobalDefaultsConfig,
|
|
8
|
-
IconButtonConfig,
|
|
9
|
-
MotionConfig,
|
|
10
|
-
ScaleModeConfig,
|
|
11
|
-
ShadowConfig,
|
|
12
|
-
TypographyConfig,
|
|
13
|
-
UniversalTokensConfig,
|
|
14
|
-
} from './tokens/types';
|
|
15
|
-
|
|
16
|
-
export const defaultTokensConfig = {
|
|
17
|
-
...yosConfig,
|
|
18
|
-
colorMode: yosConfig.colorMode as ColorModeConfig,
|
|
19
|
-
scaleMode: yosConfig.scaleMode as ScaleModeConfig,
|
|
20
|
-
font: yosConfig.font as FontConfig,
|
|
21
|
-
button: yosConfig.button as ButtonConfig,
|
|
22
|
-
iconButton: yosConfig.iconButton as IconButtonConfig,
|
|
23
|
-
motion: yosConfig.motion as MotionConfig,
|
|
24
|
-
shadow: yosConfig.shadow as ShadowConfig,
|
|
25
|
-
typography: yosConfig.typography as TypographyConfig,
|
|
26
|
-
globalDefaults: yosConfig.globalDefaults as GlobalDefaultsConfig,
|
|
27
|
-
breakpoints: yosConfig.breakpoints as BreakpointsConfig,
|
|
28
|
-
version: 'v0.63.0', // NOTE: Match the latest migration version
|
|
29
|
-
} satisfies UniversalTokensConfig;
|
|
30
|
-
|
|
31
|
-
export { defaultUniversalTokensConfigAuto } from '../generated/universalTokensConfigAuto';
|
package/src/fixtures/index.ts
DELETED
|
@@ -1,638 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
AlwaysPaletteAlias,
|
|
3
|
-
AvatarShape,
|
|
4
|
-
AvatarSize,
|
|
5
|
-
BackgroundPaletteAlias,
|
|
6
|
-
BadgeSize,
|
|
7
|
-
BadgeVariant,
|
|
8
|
-
BorderRadius,
|
|
9
|
-
BorderWidth,
|
|
10
|
-
Breakpoint,
|
|
11
|
-
ButtonClassName,
|
|
12
|
-
ButtonColorProperty,
|
|
13
|
-
ButtonKind,
|
|
14
|
-
ButtonMotionEffect,
|
|
15
|
-
ButtonMotionProperty,
|
|
16
|
-
ButtonPalette,
|
|
17
|
-
ButtonSize,
|
|
18
|
-
ButtonSizeProperty,
|
|
19
|
-
ButtonState,
|
|
20
|
-
ButtonVariant,
|
|
21
|
-
ButtonVariantFlat,
|
|
22
|
-
CheckboxSize,
|
|
23
|
-
CheckboxVariant,
|
|
24
|
-
ChipSize,
|
|
25
|
-
ChipVariant,
|
|
26
|
-
ColorMode,
|
|
27
|
-
FontAlias,
|
|
28
|
-
FontFamilyCDNUrl,
|
|
29
|
-
FontID,
|
|
30
|
-
FontWeightDescriptive,
|
|
31
|
-
ForegroundPaletteAlias,
|
|
32
|
-
Hue,
|
|
33
|
-
HueStep,
|
|
34
|
-
IconButtonClassName,
|
|
35
|
-
IconButtonSize,
|
|
36
|
-
IconSize,
|
|
37
|
-
IconVariant,
|
|
38
|
-
InputSize,
|
|
39
|
-
LinePaletteAlias,
|
|
40
|
-
MotionSpringConfig,
|
|
41
|
-
MotionSpringConfigOptions,
|
|
42
|
-
MotionVariant,
|
|
43
|
-
MotionVariantSpeed,
|
|
44
|
-
PaletteValue,
|
|
45
|
-
RegionMode,
|
|
46
|
-
ScaleEffectMap,
|
|
47
|
-
ScaleMode,
|
|
48
|
-
ShadowColor,
|
|
49
|
-
ShadowOffset,
|
|
50
|
-
ShadowOpacity,
|
|
51
|
-
ShadowPaletteAlias,
|
|
52
|
-
ShadowSpreadRadius,
|
|
53
|
-
ShadowVariant,
|
|
54
|
-
ShadowVariantInvert,
|
|
55
|
-
SpacingAlias,
|
|
56
|
-
SpectrumColor,
|
|
57
|
-
SwitchSize,
|
|
58
|
-
TextDecorationLine,
|
|
59
|
-
TextProperty,
|
|
60
|
-
TextTransform,
|
|
61
|
-
TextVariant,
|
|
62
|
-
TextVariantTypography,
|
|
63
|
-
TextVariantUi,
|
|
64
|
-
TextVariantWithoutEmphasized,
|
|
65
|
-
TShirtSize,
|
|
66
|
-
TypographyStyleProperty,
|
|
67
|
-
} from '@yahoo/uds/tokens';
|
|
68
|
-
|
|
69
|
-
import { fromEntries } from '../tokens/utils/fromEntries';
|
|
70
|
-
import { typesToConstants } from './macros/typesToConstants' with { type: 'macro' };
|
|
71
|
-
import {
|
|
72
|
-
getBorderRadiusRamp,
|
|
73
|
-
getBorderWidthRamp,
|
|
74
|
-
} from './utils/getScaleModeRamp' with { type: 'macro' };
|
|
75
|
-
import { getTailwindAsUdsColors } from './utils/getTailwindAsUdsColors' with { type: 'macro' };
|
|
76
|
-
|
|
77
|
-
/* -------------------------------------------------------------------------- */
|
|
78
|
-
/* BREAKPOINTS */
|
|
79
|
-
/* -------------------------------------------------------------------------- */
|
|
80
|
-
|
|
81
|
-
const breakpoints = typesToConstants<Breakpoint>('Breakpoint');
|
|
82
|
-
|
|
83
|
-
/* -------------------------------------------------------------------------- */
|
|
84
|
-
/* MODES */
|
|
85
|
-
/* -------------------------------------------------------------------------- */
|
|
86
|
-
const colorModes = typesToConstants<ColorMode>('ColorMode');
|
|
87
|
-
const scaleModes = typesToConstants<ScaleMode>('ScaleMode');
|
|
88
|
-
const regionModes = typesToConstants<RegionMode>('RegionMode');
|
|
89
|
-
|
|
90
|
-
/* -------------------------------------------------------------------------- */
|
|
91
|
-
/* COLORS */
|
|
92
|
-
/* -------------------------------------------------------------------------- */
|
|
93
|
-
const hues = typesToConstants<Hue>('Hue');
|
|
94
|
-
const hueSteps = typesToConstants<HueStep>('HueStep');
|
|
95
|
-
const spectrumColors = typesToConstants<SpectrumColor>('SpectrumColor');
|
|
96
|
-
const backgroundPaletteColors = typesToConstants<BackgroundPaletteAlias>('BackgroundPaletteAlias');
|
|
97
|
-
const foregroundPaletteColors = typesToConstants<ForegroundPaletteAlias>('ForegroundPaletteAlias');
|
|
98
|
-
const linePaletteColors = typesToConstants<LinePaletteAlias>('LinePaletteAlias');
|
|
99
|
-
const alwaysPaletteAliases = typesToConstants<AlwaysPaletteAlias>('AlwaysPaletteAlias');
|
|
100
|
-
const shadowPaletteColors = typesToConstants<ShadowPaletteAlias>('ShadowPaletteAlias');
|
|
101
|
-
const shadowColors = typesToConstants<ShadowColor>('ShadowColor');
|
|
102
|
-
|
|
103
|
-
const backgroundColors = [...backgroundPaletteColors, ...alwaysPaletteAliases];
|
|
104
|
-
const foregroundColors = [...foregroundPaletteColors, ...alwaysPaletteAliases];
|
|
105
|
-
const lineColors = [...linePaletteColors, ...alwaysPaletteAliases];
|
|
106
|
-
const palette = {
|
|
107
|
-
background: backgroundPaletteColors,
|
|
108
|
-
foreground: foregroundPaletteColors,
|
|
109
|
-
line: linePaletteColors,
|
|
110
|
-
shadow: shadowPaletteColors,
|
|
111
|
-
};
|
|
112
|
-
const tailwindColorsAsUds = getTailwindAsUdsColors();
|
|
113
|
-
|
|
114
|
-
const idealColorSorting = [
|
|
115
|
-
'primary',
|
|
116
|
-
'secondary',
|
|
117
|
-
'tertiary',
|
|
118
|
-
'muted',
|
|
119
|
-
'on-color',
|
|
120
|
-
'accent',
|
|
121
|
-
'brand',
|
|
122
|
-
'brand-secondary',
|
|
123
|
-
'info',
|
|
124
|
-
'info-secondary',
|
|
125
|
-
'alert',
|
|
126
|
-
'alert-secondary',
|
|
127
|
-
'positive',
|
|
128
|
-
'positive-secondary',
|
|
129
|
-
'warning',
|
|
130
|
-
'warning-secondary',
|
|
131
|
-
];
|
|
132
|
-
|
|
133
|
-
function sortPalette<T extends Record<string, PaletteValue>>(
|
|
134
|
-
palette: T,
|
|
135
|
-
ordering: string[] = idealColorSorting,
|
|
136
|
-
): Array<[string, PaletteValue]> {
|
|
137
|
-
return Object.entries(palette).sort(
|
|
138
|
-
([prevPaletteAlias], [nextPaletteAlias]) =>
|
|
139
|
-
ordering.indexOf(prevPaletteAlias) - ordering.indexOf(nextPaletteAlias),
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/* -------------------------------------------------------------------------- */
|
|
144
|
-
/* TYPOGRAPHY */
|
|
145
|
-
/* -------------------------------------------------------------------------- */
|
|
146
|
-
const textVariantsTypography = typesToConstants<TextVariantTypography>('TextVariantTypography');
|
|
147
|
-
const textVariantsUi = typesToConstants<TextVariantUi>('TextVariantUi');
|
|
148
|
-
const textVariants = typesToConstants<TextVariant>('TextVariant');
|
|
149
|
-
const textVariantsWithoutEmphasized = typesToConstants<TextVariantWithoutEmphasized>(
|
|
150
|
-
'TextVariantWithoutEmphasized',
|
|
151
|
-
);
|
|
152
|
-
const textProperties = typesToConstants<TextProperty>('TextProperty');
|
|
153
|
-
const textDecorationLines = typesToConstants<TextDecorationLine>('TextDecorationLine');
|
|
154
|
-
const typographyStyleProperties =
|
|
155
|
-
typesToConstants<TypographyStyleProperty>('TypographyStyleProperty');
|
|
156
|
-
|
|
157
|
-
const fontAliases = typesToConstants<FontAlias>('FontAlias');
|
|
158
|
-
const fontIds = typesToConstants<FontID>('FontID');
|
|
159
|
-
const fontUrls = typesToConstants<FontFamilyCDNUrl>('FontFamilyCDNUrl');
|
|
160
|
-
const fontWeights = typesToConstants<FontWeightDescriptive>('FontWeightDescriptive');
|
|
161
|
-
const textTransforms = typesToConstants<TextTransform>('TextTransform');
|
|
162
|
-
|
|
163
|
-
/* -------------------------------------------------------------------------- */
|
|
164
|
-
/* OTHER TOKENS */
|
|
165
|
-
/* -------------------------------------------------------------------------- */
|
|
166
|
-
const avatarSizes = typesToConstants<AvatarSize>('AvatarSize');
|
|
167
|
-
const avatarShapes = typesToConstants<AvatarShape>('AvatarShape');
|
|
168
|
-
const borderRadii = typesToConstants<BorderRadius>('BorderRadius');
|
|
169
|
-
const borderRadiusRamp = {
|
|
170
|
-
xSmall: getBorderRadiusRamp('xSmall'),
|
|
171
|
-
small: getBorderRadiusRamp('small'),
|
|
172
|
-
medium: getBorderRadiusRamp('medium'),
|
|
173
|
-
large: getBorderRadiusRamp('large'),
|
|
174
|
-
xLarge: getBorderRadiusRamp('xLarge'),
|
|
175
|
-
xxLarge: getBorderRadiusRamp('xxLarge'),
|
|
176
|
-
xxxLarge: getBorderRadiusRamp('xxxLarge'),
|
|
177
|
-
};
|
|
178
|
-
const borderWidths = typesToConstants<BorderWidth>('BorderWidth');
|
|
179
|
-
const borderWidthRamp = {
|
|
180
|
-
xSmall: getBorderWidthRamp('xSmall'),
|
|
181
|
-
small: getBorderWidthRamp('small'),
|
|
182
|
-
medium: getBorderWidthRamp('medium'),
|
|
183
|
-
large: getBorderWidthRamp('large'),
|
|
184
|
-
xLarge: getBorderWidthRamp('xLarge'),
|
|
185
|
-
xxLarge: getBorderWidthRamp('xxLarge'),
|
|
186
|
-
xxxLarge: getBorderWidthRamp('xxxLarge'),
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
// typesafe sorting mechanism for icon sizes
|
|
190
|
-
const iconSizeSort: Record<IconSize, number> = {
|
|
191
|
-
xs: 0,
|
|
192
|
-
sm: 1,
|
|
193
|
-
md: 2,
|
|
194
|
-
lg: 3,
|
|
195
|
-
};
|
|
196
|
-
const iconSizes = typesToConstants<IconSize>('IconSize').sort((a, b) => {
|
|
197
|
-
return iconSizeSort[a] - iconSizeSort[b];
|
|
198
|
-
});
|
|
199
|
-
const iconVariants = typesToConstants<IconVariant>('IconVariant');
|
|
200
|
-
|
|
201
|
-
/** Preserve order we want to display */
|
|
202
|
-
const spacingAliases: SpacingAlias[] = [
|
|
203
|
-
'0',
|
|
204
|
-
'px',
|
|
205
|
-
'0.5',
|
|
206
|
-
'1',
|
|
207
|
-
'1.5',
|
|
208
|
-
'2',
|
|
209
|
-
'2.5',
|
|
210
|
-
'3',
|
|
211
|
-
'3.5',
|
|
212
|
-
'4',
|
|
213
|
-
'4.5',
|
|
214
|
-
'5',
|
|
215
|
-
'5.5',
|
|
216
|
-
'6',
|
|
217
|
-
'7',
|
|
218
|
-
'8',
|
|
219
|
-
'9',
|
|
220
|
-
'10',
|
|
221
|
-
'11',
|
|
222
|
-
'12',
|
|
223
|
-
'14',
|
|
224
|
-
'16',
|
|
225
|
-
'20',
|
|
226
|
-
'24',
|
|
227
|
-
'28',
|
|
228
|
-
'32',
|
|
229
|
-
'36',
|
|
230
|
-
'40',
|
|
231
|
-
'44',
|
|
232
|
-
'48',
|
|
233
|
-
'52',
|
|
234
|
-
'56',
|
|
235
|
-
'60',
|
|
236
|
-
'64',
|
|
237
|
-
'72',
|
|
238
|
-
'80',
|
|
239
|
-
'96',
|
|
240
|
-
];
|
|
241
|
-
|
|
242
|
-
const spacingMap: Record<SpacingAlias, number> = {
|
|
243
|
-
'0': 0,
|
|
244
|
-
px: 1,
|
|
245
|
-
'0.5': 2,
|
|
246
|
-
'1': 4,
|
|
247
|
-
'1.5': 6,
|
|
248
|
-
'2': 8,
|
|
249
|
-
'2.5': 10,
|
|
250
|
-
'3': 12,
|
|
251
|
-
'3.5': 14,
|
|
252
|
-
'4': 16,
|
|
253
|
-
'4.5': 18,
|
|
254
|
-
'5': 20,
|
|
255
|
-
'5.5': 22,
|
|
256
|
-
'6': 24,
|
|
257
|
-
'7': 28,
|
|
258
|
-
'8': 32,
|
|
259
|
-
'9': 36,
|
|
260
|
-
'10': 40,
|
|
261
|
-
'11': 44,
|
|
262
|
-
'12': 48,
|
|
263
|
-
'14': 56,
|
|
264
|
-
'16': 64,
|
|
265
|
-
'20': 80,
|
|
266
|
-
'24': 96,
|
|
267
|
-
'28': 112,
|
|
268
|
-
'32': 128,
|
|
269
|
-
'36': 144,
|
|
270
|
-
'40': 160,
|
|
271
|
-
'44': 176,
|
|
272
|
-
'48': 192,
|
|
273
|
-
'52': 208,
|
|
274
|
-
'56': 224,
|
|
275
|
-
'60': 240,
|
|
276
|
-
'64': 256,
|
|
277
|
-
'72': 288,
|
|
278
|
-
'80': 320,
|
|
279
|
-
'96': 384,
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
const shadowOffsets = typesToConstants<ShadowOffset>('ShadowOffset');
|
|
283
|
-
|
|
284
|
-
const shadowOffsetMap: Record<ShadowOffset, number> = {
|
|
285
|
-
'-96': -384,
|
|
286
|
-
'-80': -320,
|
|
287
|
-
'-72': -288,
|
|
288
|
-
'-64': -256,
|
|
289
|
-
'-60': -240,
|
|
290
|
-
'-56': -224,
|
|
291
|
-
'-52': -208,
|
|
292
|
-
'-48': -192,
|
|
293
|
-
'-44': -176,
|
|
294
|
-
'-40': -160,
|
|
295
|
-
'-36': -144,
|
|
296
|
-
'-32': -128,
|
|
297
|
-
'-28': -112,
|
|
298
|
-
'-24': -96,
|
|
299
|
-
'-20': -80,
|
|
300
|
-
'-16': -64,
|
|
301
|
-
'-14': -56,
|
|
302
|
-
'-12': -48,
|
|
303
|
-
'-11': -44,
|
|
304
|
-
'-10': -40,
|
|
305
|
-
'-9': -36,
|
|
306
|
-
'-8': -32,
|
|
307
|
-
'-7': -28,
|
|
308
|
-
'-6': -24,
|
|
309
|
-
'-5.5': -22,
|
|
310
|
-
'-5': -20,
|
|
311
|
-
'-4.5': -18,
|
|
312
|
-
'-4': -16,
|
|
313
|
-
'-3.5': -14,
|
|
314
|
-
'-3': -12,
|
|
315
|
-
'-2.5': -10,
|
|
316
|
-
'-2': -8,
|
|
317
|
-
'-1.5': -6,
|
|
318
|
-
'-1': -4,
|
|
319
|
-
'-0.5': -2,
|
|
320
|
-
'-px': -1,
|
|
321
|
-
'0': 0,
|
|
322
|
-
px: 1,
|
|
323
|
-
'0.5': 2,
|
|
324
|
-
'1': 4,
|
|
325
|
-
'1.5': 6,
|
|
326
|
-
'2': 8,
|
|
327
|
-
'2.5': 10,
|
|
328
|
-
'3': 12,
|
|
329
|
-
'3.5': 14,
|
|
330
|
-
'4': 16,
|
|
331
|
-
'4.5': 18,
|
|
332
|
-
'5': 20,
|
|
333
|
-
'5.5': 22,
|
|
334
|
-
'6': 24,
|
|
335
|
-
'7': 28,
|
|
336
|
-
'8': 32,
|
|
337
|
-
'9': 36,
|
|
338
|
-
'10': 40,
|
|
339
|
-
'11': 44,
|
|
340
|
-
'12': 48,
|
|
341
|
-
'14': 56,
|
|
342
|
-
'16': 64,
|
|
343
|
-
'20': 80,
|
|
344
|
-
'24': 96,
|
|
345
|
-
'28': 112,
|
|
346
|
-
'32': 128,
|
|
347
|
-
'36': 144,
|
|
348
|
-
'40': 160,
|
|
349
|
-
'44': 176,
|
|
350
|
-
'48': 192,
|
|
351
|
-
'52': 208,
|
|
352
|
-
'56': 224,
|
|
353
|
-
'60': 240,
|
|
354
|
-
'64': 256,
|
|
355
|
-
'72': 288,
|
|
356
|
-
'80': 320,
|
|
357
|
-
'96': 384,
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
const shadowSpreadRadii = typesToConstants<ShadowSpreadRadius>('ShadowSpreadRadius');
|
|
361
|
-
|
|
362
|
-
const shadowSpreadRadiusMap: Record<ShadowSpreadRadius, number> = {
|
|
363
|
-
'-96': -384,
|
|
364
|
-
'-80': -320,
|
|
365
|
-
'-72': -288,
|
|
366
|
-
'-64': -256,
|
|
367
|
-
'-60': -240,
|
|
368
|
-
'-56': -224,
|
|
369
|
-
'-52': -208,
|
|
370
|
-
'-48': -192,
|
|
371
|
-
'-44': -176,
|
|
372
|
-
'-40': -160,
|
|
373
|
-
'-36': -144,
|
|
374
|
-
'-32': -128,
|
|
375
|
-
'-28': -112,
|
|
376
|
-
'-24': -96,
|
|
377
|
-
'-20': -80,
|
|
378
|
-
'-16': -64,
|
|
379
|
-
'-14': -56,
|
|
380
|
-
'-12': -48,
|
|
381
|
-
'-11': -44,
|
|
382
|
-
'-10': -40,
|
|
383
|
-
'-9': -36,
|
|
384
|
-
'-8': -32,
|
|
385
|
-
'-7': -28,
|
|
386
|
-
'-6': -24,
|
|
387
|
-
'-5.5': -22,
|
|
388
|
-
'-5': -20,
|
|
389
|
-
'-4.5': -18,
|
|
390
|
-
'-4': -16,
|
|
391
|
-
'-3.5': -14,
|
|
392
|
-
'-3': -12,
|
|
393
|
-
'-2.5': -10,
|
|
394
|
-
'-2': -8,
|
|
395
|
-
'-1.5': -6,
|
|
396
|
-
'-1': -4,
|
|
397
|
-
'-0.5': -2,
|
|
398
|
-
'-px': -1,
|
|
399
|
-
'0': 0,
|
|
400
|
-
px: 1,
|
|
401
|
-
'0.5': 2,
|
|
402
|
-
'1': 4,
|
|
403
|
-
'1.5': 6,
|
|
404
|
-
'2': 8,
|
|
405
|
-
'2.5': 10,
|
|
406
|
-
'3': 12,
|
|
407
|
-
'3.5': 14,
|
|
408
|
-
'4': 16,
|
|
409
|
-
'4.5': 18,
|
|
410
|
-
'5': 20,
|
|
411
|
-
'5.5': 22,
|
|
412
|
-
'6': 24,
|
|
413
|
-
'7': 28,
|
|
414
|
-
'8': 32,
|
|
415
|
-
'9': 36,
|
|
416
|
-
'10': 40,
|
|
417
|
-
'11': 44,
|
|
418
|
-
'12': 48,
|
|
419
|
-
'14': 56,
|
|
420
|
-
'16': 64,
|
|
421
|
-
'20': 80,
|
|
422
|
-
'24': 96,
|
|
423
|
-
'28': 112,
|
|
424
|
-
'32': 128,
|
|
425
|
-
'36': 144,
|
|
426
|
-
'40': 160,
|
|
427
|
-
'44': 176,
|
|
428
|
-
'48': 192,
|
|
429
|
-
'52': 208,
|
|
430
|
-
'56': 224,
|
|
431
|
-
'60': 240,
|
|
432
|
-
'64': 256,
|
|
433
|
-
'72': 288,
|
|
434
|
-
'80': 320,
|
|
435
|
-
'96': 384,
|
|
436
|
-
};
|
|
437
|
-
|
|
438
|
-
const shadowOpacities = typesToConstants<ShadowOpacity>('ShadowOpacity');
|
|
439
|
-
|
|
440
|
-
const shadowOpacityMap = fromEntries(shadowOpacities.map((key) => [key, parseInt(key)]));
|
|
441
|
-
|
|
442
|
-
const tshirtSizes = typesToConstants<TShirtSize>('TShirtSize');
|
|
443
|
-
|
|
444
|
-
/* -------------------------------------------------------------------------- */
|
|
445
|
-
/* COMPONENTS */
|
|
446
|
-
/* -------------------------------------------------------------------------- */
|
|
447
|
-
|
|
448
|
-
const buttonVariants = typesToConstants<ButtonVariant>('ButtonVariant');
|
|
449
|
-
|
|
450
|
-
const buttonVariantPriority: { [key in ButtonVariantFlat]?: number } = {
|
|
451
|
-
primary: 0,
|
|
452
|
-
secondary: 1,
|
|
453
|
-
tertiary: 2,
|
|
454
|
-
};
|
|
455
|
-
// Sort the button variants by priority first, then alphabetically
|
|
456
|
-
const buttonVariantsFlat = typesToConstants<ButtonVariantFlat>('ButtonVariantFlat').sort((a, b) => {
|
|
457
|
-
const aPriority = buttonVariantPriority[a] ?? Number.MAX_SAFE_INTEGER;
|
|
458
|
-
const bPriority = buttonVariantPriority[b] ?? Number.MAX_SAFE_INTEGER;
|
|
459
|
-
|
|
460
|
-
if (aPriority !== bPriority) {
|
|
461
|
-
return aPriority - bPriority;
|
|
462
|
-
}
|
|
463
|
-
return a.localeCompare(b);
|
|
464
|
-
});
|
|
465
|
-
|
|
466
|
-
const buttonVariantsSecondary = buttonVariantsFlat.filter((variant) =>
|
|
467
|
-
variant.includes('secondary'),
|
|
468
|
-
);
|
|
469
|
-
const buttonVariantsTertiary = buttonVariantsFlat.filter((variant) => variant.includes('tertiary'));
|
|
470
|
-
const buttonVariantsPrimary = buttonVariantsFlat.filter(
|
|
471
|
-
(variant) =>
|
|
472
|
-
!buttonVariantsSecondary.includes(variant) && !buttonVariantsTertiary.includes(variant),
|
|
473
|
-
);
|
|
474
|
-
|
|
475
|
-
const buttonPalettes = typesToConstants<ButtonPalette>('ButtonPalette');
|
|
476
|
-
const buttonSizes = typesToConstants<ButtonSize>('ButtonSize');
|
|
477
|
-
const buttonStates = typesToConstants<ButtonState>('ButtonState');
|
|
478
|
-
const buttonKinds = typesToConstants<ButtonKind>('ButtonKind');
|
|
479
|
-
// TODO this should come from the configurator via the CLI of some other means in the future
|
|
480
|
-
const buttonIconSvgSize: ButtonSize = 'sm';
|
|
481
|
-
const buttonColorProperties = typesToConstants<ButtonColorProperty>('ButtonColorProperty');
|
|
482
|
-
const buttonSizeProperties = typesToConstants<ButtonSizeProperty>('ButtonSizeProperty');
|
|
483
|
-
const buttonMotionProperties = typesToConstants<ButtonMotionProperty>('ButtonMotionProperty');
|
|
484
|
-
const buttonMotionEffects = typesToConstants<ButtonMotionEffect>('ButtonMotionEffect');
|
|
485
|
-
const buttonClassNames = typesToConstants<ButtonClassName>('ButtonClassName');
|
|
486
|
-
const iconButtonSizes = typesToConstants<IconButtonSize>('IconButtonSize');
|
|
487
|
-
const iconButtonClassNames = typesToConstants<IconButtonClassName>('IconButtonClassName');
|
|
488
|
-
const inputSizes = typesToConstants<InputSize>('InputSize');
|
|
489
|
-
|
|
490
|
-
/* -------------------------------------------------------------------------- */
|
|
491
|
-
/* Motion */
|
|
492
|
-
/* -------------------------------------------------------------------------- */
|
|
493
|
-
const motionVariants = typesToConstants<MotionVariant>('MotionVariant');
|
|
494
|
-
const motionVariantSpeeds = typesToConstants<MotionVariantSpeed>('MotionVariantSpeed');
|
|
495
|
-
const motionSpringConfig = typesToConstants<MotionSpringConfig>('MotionSpringConfig');
|
|
496
|
-
const motionSpringConfigOptions = typesToConstants<MotionSpringConfigOptions>(
|
|
497
|
-
'MotionSpringConfigOptions',
|
|
498
|
-
);
|
|
499
|
-
|
|
500
|
-
/* ---------------------------------- Scale --------------------------------- */
|
|
501
|
-
const scaleEffectMap: ScaleEffectMap = {
|
|
502
|
-
// TODO create a helper like typesToConstants that creates this from the types
|
|
503
|
-
none: {
|
|
504
|
-
xs: '1',
|
|
505
|
-
sm: '1',
|
|
506
|
-
md: '1',
|
|
507
|
-
lg: '1',
|
|
508
|
-
xl: '1',
|
|
509
|
-
},
|
|
510
|
-
up: {
|
|
511
|
-
xs: '1.0125',
|
|
512
|
-
sm: '1.03',
|
|
513
|
-
md: '1.125',
|
|
514
|
-
lg: '1.25',
|
|
515
|
-
xl: '2',
|
|
516
|
-
},
|
|
517
|
-
down: {
|
|
518
|
-
xs: '0.9875',
|
|
519
|
-
sm: '0.97',
|
|
520
|
-
md: '0.875',
|
|
521
|
-
lg: '0.75',
|
|
522
|
-
xl: '0.5',
|
|
523
|
-
},
|
|
524
|
-
};
|
|
525
|
-
|
|
526
|
-
/* -------------------------------------------------------------------------- */
|
|
527
|
-
/* Elevation */
|
|
528
|
-
/* -------------------------------------------------------------------------- */
|
|
529
|
-
const shadowVariants = typesToConstants<ShadowVariant>('ShadowVariant');
|
|
530
|
-
const shadowVariantsInvert = typesToConstants<ShadowVariantInvert>('ShadowVariantInvert');
|
|
531
|
-
const shadowVariantsWithInvert = [...shadowVariants, ...shadowVariantsInvert];
|
|
532
|
-
|
|
533
|
-
/* -------------------------------------------------------------------------- */
|
|
534
|
-
/* Checkbox */
|
|
535
|
-
/* -------------------------------------------------------------------------- */
|
|
536
|
-
const checkboxVariants = typesToConstants<CheckboxVariant>('CheckboxVariant');
|
|
537
|
-
const checkboxSizes = typesToConstants<CheckboxSize>('CheckboxSize');
|
|
538
|
-
|
|
539
|
-
/* -------------------------------------------------------------------------- */
|
|
540
|
-
/* Switch */
|
|
541
|
-
/* -------------------------------------------------------------------------- */
|
|
542
|
-
const switchSizes = typesToConstants<SwitchSize>('SwitchSize');
|
|
543
|
-
|
|
544
|
-
/* -------------------------------------------------------------------------- */
|
|
545
|
-
/* Chip */
|
|
546
|
-
/* -------------------------------------------------------------------------- */
|
|
547
|
-
const chipVariants = typesToConstants<ChipVariant>('ChipVariant');
|
|
548
|
-
const chipSizes = typesToConstants<ChipSize>('ChipSize');
|
|
549
|
-
|
|
550
|
-
/* -------------------------------------------------------------------------- */
|
|
551
|
-
/* Badge */
|
|
552
|
-
/* -------------------------------------------------------------------------- */
|
|
553
|
-
const badgeVariants = typesToConstants<BadgeVariant>('BadgeVariant');
|
|
554
|
-
const badgeSizes = typesToConstants<BadgeSize>('BadgeSize');
|
|
555
|
-
|
|
556
|
-
export {
|
|
557
|
-
alwaysPaletteAliases,
|
|
558
|
-
avatarShapes,
|
|
559
|
-
avatarSizes,
|
|
560
|
-
backgroundColors,
|
|
561
|
-
backgroundPaletteColors,
|
|
562
|
-
badgeSizes,
|
|
563
|
-
badgeVariants,
|
|
564
|
-
borderRadii,
|
|
565
|
-
borderRadiusRamp,
|
|
566
|
-
borderWidthRamp,
|
|
567
|
-
borderWidths,
|
|
568
|
-
breakpoints,
|
|
569
|
-
buttonClassNames,
|
|
570
|
-
buttonColorProperties,
|
|
571
|
-
buttonIconSvgSize,
|
|
572
|
-
buttonKinds,
|
|
573
|
-
buttonMotionEffects,
|
|
574
|
-
buttonMotionProperties,
|
|
575
|
-
buttonPalettes,
|
|
576
|
-
buttonSizeProperties,
|
|
577
|
-
buttonSizes,
|
|
578
|
-
buttonStates,
|
|
579
|
-
buttonVariants,
|
|
580
|
-
buttonVariantsFlat,
|
|
581
|
-
buttonVariantsPrimary,
|
|
582
|
-
buttonVariantsSecondary,
|
|
583
|
-
buttonVariantsTertiary,
|
|
584
|
-
checkboxSizes,
|
|
585
|
-
checkboxVariants,
|
|
586
|
-
chipSizes,
|
|
587
|
-
chipVariants,
|
|
588
|
-
colorModes,
|
|
589
|
-
fontAliases,
|
|
590
|
-
fontIds,
|
|
591
|
-
fontUrls,
|
|
592
|
-
fontWeights,
|
|
593
|
-
foregroundColors,
|
|
594
|
-
foregroundPaletteColors,
|
|
595
|
-
hues,
|
|
596
|
-
hueSteps,
|
|
597
|
-
iconButtonClassNames,
|
|
598
|
-
iconButtonSizes,
|
|
599
|
-
iconSizes,
|
|
600
|
-
iconVariants,
|
|
601
|
-
inputSizes,
|
|
602
|
-
lineColors,
|
|
603
|
-
linePaletteColors,
|
|
604
|
-
motionSpringConfig,
|
|
605
|
-
motionSpringConfigOptions,
|
|
606
|
-
motionVariants,
|
|
607
|
-
motionVariantSpeeds,
|
|
608
|
-
palette,
|
|
609
|
-
regionModes,
|
|
610
|
-
scaleEffectMap,
|
|
611
|
-
scaleModes,
|
|
612
|
-
shadowColors,
|
|
613
|
-
shadowOffsetMap,
|
|
614
|
-
shadowOffsets,
|
|
615
|
-
shadowOpacities,
|
|
616
|
-
shadowOpacityMap,
|
|
617
|
-
shadowPaletteColors,
|
|
618
|
-
shadowSpreadRadii,
|
|
619
|
-
shadowSpreadRadiusMap,
|
|
620
|
-
shadowVariants,
|
|
621
|
-
shadowVariantsInvert,
|
|
622
|
-
shadowVariantsWithInvert,
|
|
623
|
-
sortPalette,
|
|
624
|
-
spacingAliases,
|
|
625
|
-
spacingMap,
|
|
626
|
-
spectrumColors,
|
|
627
|
-
switchSizes,
|
|
628
|
-
tailwindColorsAsUds,
|
|
629
|
-
textDecorationLines,
|
|
630
|
-
textProperties,
|
|
631
|
-
textTransforms,
|
|
632
|
-
textVariants,
|
|
633
|
-
textVariantsTypography,
|
|
634
|
-
textVariantsUi,
|
|
635
|
-
textVariantsWithoutEmphasized,
|
|
636
|
-
tshirtSizes,
|
|
637
|
-
typographyStyleProperties,
|
|
638
|
-
};
|