@yahoo/uds 3.66.1 → 3.67.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/cli/codemods/flattenButtonVariant.ts +2 -2
- package/cli/preload.ts +1 -1
- package/cli/tsconfig.json +1 -10
- package/cli/utils/purgeCSS.ts +12 -23
- package/dist/_virtual/rolldown_runtime.cjs +44 -0
- package/dist/_virtual/rolldown_runtime.js +24 -0
- package/dist/components/Box.cjs +105 -0
- package/dist/{Box-Dw6erJKC.d.cts → components/Box.d.cts} +8 -7
- package/dist/{Box-BkZ2BCj8.d.ts → components/Box.d.ts} +8 -7
- package/dist/components/Box.js +104 -0
- package/dist/components/Divider/Divider.cjs +47 -0
- package/dist/components/Divider/Divider.d.cts +38 -0
- package/dist/components/Divider/Divider.d.ts +38 -0
- package/dist/components/Divider/Divider.js +46 -0
- package/dist/components/Divider/DividerCore.cjs +76 -0
- package/dist/components/Divider/DividerCore.d.cts +15 -0
- package/dist/components/Divider/DividerCore.d.ts +15 -0
- package/dist/components/Divider/DividerCore.js +75 -0
- package/dist/components/Divider/DividerInternal.cjs +28 -0
- package/dist/components/Divider/DividerInternal.d.cts +12 -0
- package/dist/components/Divider/DividerInternal.d.ts +12 -0
- package/dist/components/Divider/DividerInternal.js +27 -0
- package/dist/components/Divider/index.cjs +4 -0
- package/dist/components/Divider/index.d.cts +2 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Divider/index.js +4 -0
- package/dist/components/FormLabel.cjs +33 -0
- package/dist/components/FormLabel.d.cts +26 -0
- package/dist/components/FormLabel.d.ts +26 -0
- package/dist/components/FormLabel.js +31 -0
- package/dist/components/HStack.cjs +51 -0
- package/dist/components/HStack.d.cts +39 -0
- package/dist/components/HStack.d.ts +39 -0
- package/dist/components/HStack.js +50 -0
- package/dist/components/Icon.cjs +67 -0
- package/dist/components/Icon.d.cts +38 -0
- package/dist/components/Icon.d.ts +38 -0
- package/dist/components/Icon.js +66 -0
- package/dist/components/IconSlot.cjs +57 -0
- package/dist/components/IconSlot.d.cts +31 -0
- package/dist/components/IconSlot.d.ts +31 -0
- package/dist/components/IconSlot.js +54 -0
- package/dist/components/Image.cjs +96 -0
- package/dist/components/Image.d.cts +91 -0
- package/dist/components/Image.d.ts +91 -0
- package/dist/components/Image.js +95 -0
- package/dist/components/Link.cjs +98 -0
- package/dist/components/Link.d.cts +45 -0
- package/dist/components/Link.d.ts +45 -0
- package/dist/components/Link.js +97 -0
- package/dist/components/Text.cjs +157 -0
- package/dist/components/Text.d.cts +90 -0
- package/dist/components/Text.d.ts +90 -0
- package/dist/components/Text.js +156 -0
- package/dist/components/VStack.cjs +51 -0
- package/dist/components/VStack.d.cts +39 -0
- package/dist/components/VStack.d.ts +39 -0
- package/dist/components/VStack.js +50 -0
- package/dist/components/client/AnimateHeightChange.cjs +48 -0
- package/dist/components/client/AnimateHeightChange.d.cts +20 -0
- package/dist/components/client/AnimateHeightChange.d.ts +20 -0
- package/dist/components/client/AnimateHeightChange.js +47 -0
- package/dist/components/client/Avatar/Avatar.cjs +33 -0
- package/dist/components/client/Avatar/Avatar.d.cts +30 -0
- package/dist/components/client/Avatar/Avatar.d.ts +30 -0
- package/dist/components/client/Avatar/Avatar.js +32 -0
- package/dist/components/client/Avatar/AvatarIcon.cjs +64 -0
- package/dist/components/client/Avatar/AvatarIcon.d.cts +36 -0
- package/dist/components/client/Avatar/AvatarIcon.d.ts +36 -0
- package/dist/components/client/Avatar/AvatarIcon.js +63 -0
- package/dist/components/client/Avatar/AvatarImage.cjs +88 -0
- package/dist/components/client/Avatar/AvatarImage.d.cts +44 -0
- package/dist/components/client/Avatar/AvatarImage.d.ts +44 -0
- package/dist/components/client/Avatar/AvatarImage.js +87 -0
- package/dist/components/client/Avatar/AvatarText.cjs +50 -0
- package/dist/components/client/Avatar/AvatarText.d.cts +39 -0
- package/dist/components/client/Avatar/AvatarText.d.ts +39 -0
- package/dist/components/client/Avatar/AvatarText.js +49 -0
- package/dist/components/client/Avatar/index.cjs +11 -0
- package/dist/components/client/Avatar/index.d.cts +5 -0
- package/dist/components/client/Avatar/index.d.ts +5 -0
- package/dist/components/client/Avatar/index.js +8 -0
- package/dist/components/client/Avatar/utils.cjs +66 -0
- package/dist/components/client/Avatar/utils.d.cts +43 -0
- package/dist/components/client/Avatar/utils.d.ts +43 -0
- package/dist/components/client/Avatar/utils.js +60 -0
- package/dist/components/client/Badge.cjs +106 -0
- package/dist/components/client/Badge.d.cts +34 -0
- package/dist/components/client/Badge.d.ts +34 -0
- package/dist/components/client/Badge.js +104 -0
- package/dist/components/client/Button.cjs +312 -0
- package/dist/components/client/Button.d.cts +74 -0
- package/dist/components/client/Button.d.ts +74 -0
- package/dist/components/client/Button.js +308 -0
- package/dist/components/client/Checkbox.cjs +215 -0
- package/dist/components/client/Checkbox.d.cts +42 -0
- package/dist/components/client/Checkbox.d.ts +42 -0
- package/dist/components/client/Checkbox.js +211 -0
- package/dist/components/client/Chip/Chip.cjs +67 -0
- package/dist/components/client/Chip/Chip.d.cts +36 -0
- package/dist/components/client/Chip/Chip.d.ts +36 -0
- package/dist/components/client/Chip/Chip.js +65 -0
- package/dist/components/client/Chip/ChipBase.cjs +88 -0
- package/dist/components/client/Chip/ChipBase.d.cts +22 -0
- package/dist/components/client/Chip/ChipBase.d.ts +22 -0
- package/dist/components/client/Chip/ChipBase.js +85 -0
- package/dist/components/client/Chip/ChipButton.cjs +36 -0
- package/dist/components/client/Chip/ChipButton.d.cts +13 -0
- package/dist/components/client/Chip/ChipButton.d.ts +13 -0
- package/dist/components/client/Chip/ChipButton.js +34 -0
- package/dist/components/client/Chip/ChipDismissible.cjs +57 -0
- package/dist/components/client/Chip/ChipDismissible.d.cts +13 -0
- package/dist/components/client/Chip/ChipDismissible.d.ts +13 -0
- package/dist/components/client/Chip/ChipDismissible.js +55 -0
- package/dist/components/client/Chip/ChipLink.cjs +38 -0
- package/dist/components/client/Chip/ChipLink.d.cts +13 -0
- package/dist/components/client/Chip/ChipLink.d.ts +13 -0
- package/dist/components/client/Chip/ChipLink.js +36 -0
- package/dist/components/client/Chip/ChipToggle.cjs +53 -0
- package/dist/components/client/Chip/ChipToggle.d.cts +13 -0
- package/dist/components/client/Chip/ChipToggle.d.ts +13 -0
- package/dist/components/client/Chip/ChipToggle.js +51 -0
- package/dist/components/client/Chip/index.cjs +13 -0
- package/dist/components/client/Chip/index.d.cts +6 -0
- package/dist/components/client/Chip/index.d.ts +6 -0
- package/dist/components/client/Chip/index.js +9 -0
- package/dist/components/client/IconButton.cjs +129 -0
- package/dist/components/client/IconButton.d.cts +37 -0
- package/dist/components/client/IconButton.d.ts +37 -0
- package/dist/components/client/IconButton.js +128 -0
- package/dist/components/client/Input/Input.cjs +209 -0
- package/dist/components/client/Input/Input.d.cts +56 -0
- package/dist/components/client/Input/Input.d.ts +56 -0
- package/dist/components/client/Input/Input.js +207 -0
- package/dist/components/client/Input/InputHelpText.cjs +55 -0
- package/dist/components/client/Input/InputHelpText.d.cts +41 -0
- package/dist/components/client/Input/InputHelpText.d.ts +41 -0
- package/dist/components/client/Input/InputHelpText.js +54 -0
- package/dist/components/client/Input/InputHelpTextInternal.cjs +57 -0
- package/dist/components/client/Input/InputHelpTextInternal.d.cts +37 -0
- package/dist/components/client/Input/InputHelpTextInternal.d.ts +37 -0
- package/dist/components/client/Input/InputHelpTextInternal.js +56 -0
- package/dist/components/client/Input/index.cjs +7 -0
- package/dist/components/client/Input/index.d.cts +3 -0
- package/dist/components/client/Input/index.d.ts +3 -0
- package/dist/components/client/Input/index.js +6 -0
- package/dist/components/client/Menu/Menu.Content.cjs +162 -0
- package/dist/components/client/Menu/Menu.Content.d.cts +214 -0
- package/dist/components/client/Menu/Menu.Content.d.ts +214 -0
- package/dist/components/client/Menu/Menu.Content.js +161 -0
- package/dist/components/client/Menu/Menu.Divider.cjs +74 -0
- package/dist/components/client/Menu/Menu.Divider.d.cts +53 -0
- package/dist/components/client/Menu/Menu.Divider.d.ts +53 -0
- package/dist/components/client/Menu/Menu.Divider.js +73 -0
- package/dist/components/client/Menu/Menu.Item.cjs +80 -0
- package/dist/components/client/Menu/Menu.Item.d.cts +78 -0
- package/dist/components/client/Menu/Menu.Item.d.ts +78 -0
- package/dist/components/client/Menu/Menu.Item.js +79 -0
- package/dist/components/client/Menu/Menu.ItemBase.cjs +163 -0
- package/dist/components/client/Menu/Menu.ItemBase.d.cts +31 -0
- package/dist/components/client/Menu/Menu.ItemBase.d.ts +31 -0
- package/dist/components/client/Menu/Menu.ItemBase.js +161 -0
- package/dist/components/client/Menu/Menu.ItemCheckbox.cjs +138 -0
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +92 -0
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +92 -0
- package/dist/components/client/Menu/Menu.ItemCheckbox.js +137 -0
- package/dist/components/client/Menu/Menu.Provider.cjs +63 -0
- package/dist/components/client/Menu/Menu.Provider.d.cts +137 -0
- package/dist/components/client/Menu/Menu.Provider.d.ts +137 -0
- package/dist/components/client/Menu/Menu.Provider.js +62 -0
- package/dist/components/client/Menu/Menu.Trigger.cjs +75 -0
- package/dist/components/client/Menu/Menu.Trigger.d.cts +78 -0
- package/dist/components/client/Menu/Menu.Trigger.d.ts +78 -0
- package/dist/components/client/Menu/Menu.Trigger.js +74 -0
- package/dist/components/client/Menu/Menu.cjs +10 -0
- package/dist/components/client/Menu/Menu.d.cts +2 -0
- package/dist/components/client/Menu/Menu.d.ts +2 -0
- package/dist/components/client/Menu/Menu.index.cjs +56 -0
- package/dist/components/client/Menu/Menu.index.d.cts +15 -0
- package/dist/components/client/Menu/Menu.index.d.ts +15 -0
- package/dist/components/client/Menu/Menu.index.js +27 -0
- package/dist/components/client/Menu/Menu.js +5 -0
- package/dist/components/client/Menu/index.cjs +10 -0
- package/dist/components/client/Menu/index.d.cts +9 -0
- package/dist/components/client/Menu/index.d.ts +9 -0
- package/dist/components/client/Menu/index.js +5 -0
- package/dist/components/client/Menu/utils/transformAriakitPlacement.cjs +39 -0
- package/dist/components/client/Menu/utils/transformAriakitPlacement.d.cts +31 -0
- package/dist/components/client/Menu/utils/transformAriakitPlacement.d.ts +31 -0
- package/dist/components/client/Menu/utils/transformAriakitPlacement.js +38 -0
- package/dist/components/client/Pressable.cjs +112 -0
- package/dist/{Pressable-DKUSyadp.d.cts → components/client/Pressable.d.cts} +8 -7
- package/dist/{Pressable-CTm_RY-u.d.ts → components/client/Pressable.d.ts} +8 -7
- package/dist/components/client/Pressable.js +111 -0
- package/dist/components/client/Radio/Radio.cjs +226 -0
- package/dist/components/client/Radio/Radio.d.cts +42 -0
- package/dist/components/client/Radio/Radio.d.ts +42 -0
- package/dist/components/client/Radio/Radio.js +222 -0
- package/dist/components/client/Radio/RadioGroupProvider.cjs +98 -0
- package/dist/components/client/Radio/RadioGroupProvider.d.cts +37 -0
- package/dist/components/client/Radio/RadioGroupProvider.d.ts +37 -0
- package/dist/components/client/Radio/RadioGroupProvider.js +96 -0
- package/dist/components/client/Radio/RadioGroupStore.cjs +41 -0
- package/dist/components/client/Radio/RadioGroupStore.d.cts +20 -0
- package/dist/components/client/Radio/RadioGroupStore.d.ts +20 -0
- package/dist/components/client/Radio/RadioGroupStore.js +39 -0
- package/dist/components/client/Radio/index.cjs +7 -0
- package/dist/components/client/Radio/index.d.cts +3 -0
- package/dist/components/client/Radio/index.d.ts +3 -0
- package/dist/components/client/Radio/index.js +6 -0
- package/dist/components/client/Radio/useRadioGroup.cjs +81 -0
- package/dist/components/client/Radio/useRadioGroup.d.cts +30 -0
- package/dist/components/client/Radio/useRadioGroup.d.ts +30 -0
- package/dist/components/client/Radio/useRadioGroup.js +79 -0
- package/dist/components/client/SpringMotionConfig.cjs +99 -0
- package/dist/components/client/SpringMotionConfig.d.cts +57 -0
- package/dist/components/client/SpringMotionConfig.d.ts +57 -0
- package/dist/components/client/SpringMotionConfig.js +98 -0
- package/dist/components/client/Switch.cjs +218 -0
- package/dist/components/client/Switch.d.cts +41 -0
- package/dist/components/client/Switch.d.ts +41 -0
- package/dist/components/client/Switch.js +216 -0
- package/dist/components/client/index.cjs +50 -0
- package/dist/components/client/index.d.cts +33 -0
- package/dist/components/client/index.d.ts +33 -0
- package/dist/components/client/index.js +25 -0
- package/dist/components/client/motionFeatures/domAnimation.cjs +11 -0
- package/dist/components/client/motionFeatures/domAnimation.d.cts +2 -0
- package/dist/components/client/motionFeatures/domAnimation.d.ts +2 -0
- package/dist/components/client/motionFeatures/domAnimation.js +5 -0
- package/dist/components/client/motionFeatures/domMax.cjs +11 -0
- package/dist/components/client/motionFeatures/domMax.d.cts +2 -0
- package/dist/components/client/motionFeatures/domMax.d.ts +2 -0
- package/dist/components/client/motionFeatures/domMax.js +5 -0
- package/dist/components/experimental/Spinner.cjs +30 -0
- package/dist/components/experimental/Spinner.d.cts +20 -0
- package/dist/components/experimental/Spinner.d.ts +20 -0
- package/dist/components/experimental/Spinner.js +29 -0
- package/dist/components/experimental/Table.cjs +110 -0
- package/dist/components/experimental/Table.d.cts +84 -0
- package/dist/components/experimental/Table.d.ts +84 -0
- package/dist/components/experimental/Table.js +108 -0
- package/dist/components/experimental/Table.mocks.cjs +58 -0
- package/dist/components/experimental/Table.mocks.d.cts +19 -0
- package/dist/components/experimental/Table.mocks.d.ts +19 -0
- package/dist/components/experimental/Table.mocks.js +55 -0
- package/dist/components/experimental/client/Accordion.cjs +79 -0
- package/dist/components/experimental/client/Accordion.d.cts +30 -0
- package/dist/components/experimental/client/Accordion.d.ts +30 -0
- package/dist/components/experimental/client/Accordion.js +78 -0
- package/dist/components/experimental/client/AvoidMotionLibraryProvider.cjs +15 -0
- package/dist/components/experimental/client/AvoidMotionLibraryProvider.d.cts +7 -0
- package/dist/components/experimental/client/AvoidMotionLibraryProvider.d.ts +7 -0
- package/dist/components/experimental/client/AvoidMotionLibraryProvider.js +13 -0
- package/dist/components/experimental/client/Modal.cjs +61 -0
- package/dist/components/experimental/client/Modal.d.cts +26 -0
- package/dist/components/experimental/client/Modal.d.ts +26 -0
- package/dist/components/experimental/client/Modal.js +57 -0
- package/dist/components/experimental/client/Popover.cjs +44 -0
- package/dist/components/experimental/client/Popover.d.cts +28 -0
- package/dist/components/experimental/client/Popover.d.ts +28 -0
- package/dist/components/experimental/client/Popover.js +33 -0
- package/dist/components/experimental/client/SwitchV2.cjs +183 -0
- package/dist/{experimental/client/SwitchV2.d.ts → components/experimental/client/SwitchV2.d.cts} +15 -16
- package/dist/{experimental/client/SwitchV2.d.cts → components/experimental/client/SwitchV2.d.ts} +15 -16
- package/dist/components/experimental/client/SwitchV2.js +179 -0
- package/dist/components/experimental/client/Tabs.cjs +75 -0
- package/dist/components/experimental/client/Tabs.d.cts +30 -0
- package/dist/components/experimental/client/Tabs.d.ts +30 -0
- package/dist/components/experimental/client/Tabs.js +71 -0
- package/dist/components/experimental/client/Toast.cjs +167 -0
- package/dist/components/experimental/client/Toast.d.cts +30 -0
- package/dist/components/experimental/client/Toast.d.ts +30 -0
- package/dist/components/experimental/client/Toast.js +163 -0
- package/dist/components/experimental/client/index.cjs +38 -0
- package/dist/components/experimental/client/index.d.cts +8 -0
- package/dist/components/experimental/client/index.d.ts +8 -0
- package/dist/components/experimental/client/index.js +11 -0
- package/dist/components/experimental/index.cjs +39 -0
- package/dist/components/experimental/index.d.cts +11 -0
- package/dist/components/experimental/index.d.ts +11 -0
- package/dist/components/experimental/index.js +12 -0
- package/dist/components/index.cjs +67 -0
- package/dist/components/index.d.cts +40 -0
- package/dist/components/index.d.ts +40 -0
- package/dist/components/index.js +33 -0
- package/dist/defaultTokensConfig.cjs +22 -1
- package/dist/defaultTokensConfig.d.cts +12691 -12694
- package/dist/defaultTokensConfig.d.ts +12691 -12694
- package/dist/defaultTokensConfig.js +20 -1
- package/dist/fixtures.cjs +1 -816
- package/dist/fixtures.js +1 -816
- package/dist/flags.cjs +26 -1
- package/dist/flags.d.cts +15 -14
- package/dist/flags.d.ts +15 -14
- package/dist/flags.js +23 -1
- package/dist/generated/autoVariants.cjs +512 -0
- package/dist/generated/autoVariants.d.cts +115 -0
- package/dist/generated/autoVariants.d.ts +115 -0
- package/dist/generated/autoVariants.js +511 -0
- package/dist/generated/generatedConfigs.cjs +27726 -0
- package/dist/generated/generatedConfigs.js +27714 -0
- package/dist/generated/tailwindPurge.cjs +3320 -0
- package/dist/{tailwind/purger.d.cts → generated/tailwindPurge.d.cts} +6 -5
- package/dist/{tailwind/purger.d.ts → generated/tailwindPurge.d.ts} +6 -5
- package/dist/generated/tailwindPurge.js +3316 -0
- package/dist/generated/universalTokensConfigAuto.cjs +11579 -0
- package/dist/generated/universalTokensConfigAuto.d.cts +12770 -0
- package/dist/generated/universalTokensConfigAuto.d.ts +12770 -0
- package/dist/generated/universalTokensConfigAuto.js +11578 -0
- package/dist/hooks/useForkRef.cjs +27 -0
- package/dist/hooks/useForkRef.d.cts +6 -0
- package/dist/hooks/useForkRef.d.ts +6 -0
- package/dist/hooks/useForkRef.js +26 -0
- package/dist/hooks/useRtl.cjs +48 -0
- package/dist/hooks/useRtl.d.cts +20 -0
- package/dist/hooks/useRtl.d.ts +20 -0
- package/dist/hooks/useRtl.js +45 -0
- package/dist/index.cjs +183 -1
- package/dist/index.d.cts +82 -383
- package/dist/index.d.ts +82 -383
- package/dist/index.js +59 -1
- package/dist/providers/ColorModeProvider.cjs +23 -0
- package/dist/providers/ColorModeProvider.d.cts +20 -0
- package/dist/providers/ColorModeProvider.d.ts +20 -0
- package/dist/providers/ColorModeProvider.js +20 -0
- package/dist/providers/ScaleModeProvider.cjs +26 -0
- package/dist/providers/ScaleModeProvider.d.cts +20 -0
- package/dist/providers/ScaleModeProvider.d.ts +20 -0
- package/dist/providers/ScaleModeProvider.js +23 -0
- package/dist/providers/ThemeProvider.cjs +21 -0
- package/dist/providers/ThemeProvider.d.cts +19 -0
- package/dist/providers/ThemeProvider.d.ts +19 -0
- package/dist/providers/ThemeProvider.js +20 -0
- package/dist/scripts/utils/tsMorph.cjs +140 -0
- package/dist/scripts/utils/tsMorph.d.cts +32 -0
- package/dist/scripts/utils/tsMorph.d.ts +32 -0
- package/dist/scripts/utils/tsMorph.js +129 -0
- package/dist/styles/styler.cjs +117 -0
- package/dist/styles/styler.d.cts +200 -0
- package/dist/styles/styler.d.ts +200 -0
- package/dist/styles/styler.js +112 -0
- package/dist/styles/stylerTypes.cjs +1 -0
- package/dist/styles/stylerTypes.d.cts +38 -0
- package/dist/styles/stylerTypes.d.ts +38 -0
- package/dist/styles/stylerTypes.js +1 -0
- package/dist/styles/variants.cjs +1513 -0
- package/dist/styles/variants.d.cts +2067 -0
- package/dist/styles/variants.d.ts +2067 -0
- package/dist/styles/variants.js +1513 -0
- package/dist/tailwind/base/addColorModeVars.cjs +21 -0
- package/dist/tailwind/base/addColorModeVars.d.cts +10 -0
- package/dist/tailwind/base/addColorModeVars.d.ts +10 -0
- package/dist/tailwind/base/addColorModeVars.js +19 -0
- package/dist/tailwind/base/addColorModeVarsV2.cjs +45 -0
- package/dist/tailwind/base/addColorModeVarsV2.d.cts +10 -0
- package/dist/tailwind/base/addColorModeVarsV2.d.ts +10 -0
- package/dist/tailwind/base/addColorModeVarsV2.js +43 -0
- package/dist/tailwind/base/addFontFaceDeclarations.cjs +11 -0
- package/dist/tailwind/base/addFontFaceDeclarations.d.cts +10 -0
- package/dist/tailwind/base/addFontFaceDeclarations.d.ts +10 -0
- package/dist/tailwind/base/addFontFaceDeclarations.js +11 -0
- package/dist/tailwind/base/addFontVars.cjs +10 -0
- package/dist/tailwind/base/addFontVars.d.cts +10 -0
- package/dist/tailwind/base/addFontVars.d.ts +10 -0
- package/dist/tailwind/base/addFontVars.js +10 -0
- package/dist/tailwind/base/addMotionVars.cjs +10 -0
- package/dist/tailwind/base/addMotionVars.d.cts +10 -0
- package/dist/tailwind/base/addMotionVars.d.ts +10 -0
- package/dist/tailwind/base/addMotionVars.js +10 -0
- package/dist/tailwind/base/addScaleModeVars.cjs +22 -0
- package/dist/tailwind/base/addScaleModeVars.d.cts +9 -0
- package/dist/tailwind/base/addScaleModeVars.d.ts +9 -0
- package/dist/tailwind/base/addScaleModeVars.js +22 -0
- package/dist/tailwind/components/getFocusRingStyles.cjs +29 -0
- package/dist/tailwind/components/getFocusRingStyles.d.cts +14 -0
- package/dist/tailwind/components/getFocusRingStyles.d.ts +14 -0
- package/dist/tailwind/components/getFocusRingStyles.js +29 -0
- package/dist/tailwind/components/getGroupedTextStyles.cjs +20 -0
- package/dist/tailwind/components/getGroupedTextStyles.d.cts +19 -0
- package/dist/tailwind/components/getGroupedTextStyles.d.ts +19 -0
- package/dist/tailwind/components/getGroupedTextStyles.js +19 -0
- package/dist/tailwind/components/getHitTargetStyles.cjs +22 -0
- package/dist/tailwind/components/getHitTargetStyles.d.cts +7 -0
- package/dist/tailwind/components/getHitTargetStyles.d.ts +7 -0
- package/dist/tailwind/components/getHitTargetStyles.js +20 -0
- package/dist/tailwind/components/getIconStyles.cjs +15 -0
- package/dist/tailwind/components/getIconStyles.d.cts +10 -0
- package/dist/tailwind/components/getIconStyles.d.ts +10 -0
- package/dist/tailwind/components/getIconStyles.js +14 -0
- package/dist/tailwind/components/getInputStyles.cjs +16 -0
- package/dist/tailwind/components/getInputStyles.d.cts +10 -0
- package/dist/tailwind/components/getInputStyles.d.ts +10 -0
- package/dist/tailwind/components/getInputStyles.js +15 -0
- package/dist/tailwind/components/getResponsiveTextStyles.cjs +73 -0
- package/dist/tailwind/components/getResponsiveTextStyles.d.cts +37 -0
- package/dist/tailwind/components/getResponsiveTextStyles.d.ts +37 -0
- package/dist/tailwind/components/getResponsiveTextStyles.js +67 -0
- package/dist/tailwind/components/types.cjs +1 -0
- package/dist/tailwind/components/types.d.cts +9 -0
- package/dist/tailwind/components/types.d.ts +9 -0
- package/dist/tailwind/components/types.js +1 -0
- package/dist/tailwind/defaultTailwindThemeAsUdsConfig.cjs +68 -0
- package/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.cts +19 -0
- package/dist/tailwind/defaultTailwindThemeAsUdsConfig.d.ts +19 -0
- package/dist/tailwind/defaultTailwindThemeAsUdsConfig.js +67 -0
- package/dist/tailwind/plugins/a11y.cjs +34 -0
- package/dist/tailwind/plugins/a11y.d.cts +13 -0
- package/dist/tailwind/plugins/a11y.d.ts +13 -0
- package/dist/tailwind/plugins/a11y.js +32 -0
- package/dist/tailwind/plugins/borders.cjs +54 -0
- package/dist/tailwind/plugins/borders.d.cts +13 -0
- package/dist/tailwind/plugins/borders.d.ts +13 -0
- package/dist/tailwind/plugins/borders.js +52 -0
- package/dist/tailwind/plugins/colors.cjs +69 -0
- package/dist/tailwind/plugins/colors.d.cts +13 -0
- package/dist/tailwind/plugins/colors.d.ts +13 -0
- package/dist/tailwind/plugins/colors.js +67 -0
- package/dist/tailwind/plugins/components.cjs +28 -0
- package/dist/tailwind/plugins/components.d.cts +13 -0
- package/dist/tailwind/plugins/components.d.ts +13 -0
- package/dist/tailwind/plugins/components.js +26 -0
- package/dist/tailwind/plugins/elevation.cjs +30 -0
- package/dist/tailwind/plugins/elevation.d.cts +13 -0
- package/dist/tailwind/plugins/elevation.d.ts +13 -0
- package/dist/tailwind/plugins/elevation.js +28 -0
- package/dist/tailwind/plugins/icons.cjs +13 -0
- package/dist/tailwind/plugins/icons.d.cts +13 -0
- package/dist/tailwind/plugins/icons.d.ts +13 -0
- package/dist/tailwind/plugins/icons.js +11 -0
- package/dist/tailwind/plugins/input.cjs +20 -0
- package/dist/tailwind/plugins/input.d.cts +16 -0
- package/dist/tailwind/plugins/input.d.ts +16 -0
- package/dist/tailwind/plugins/input.js +18 -0
- package/dist/tailwind/plugins/motion.cjs +14 -0
- package/dist/tailwind/plugins/motion.d.cts +13 -0
- package/dist/tailwind/plugins/motion.d.ts +13 -0
- package/dist/tailwind/plugins/motion.js +12 -0
- package/dist/tailwind/plugins/nestedBorderRadius.cjs +19 -0
- package/dist/tailwind/plugins/nestedBorderRadius.d.cts +13 -0
- package/dist/tailwind/plugins/nestedBorderRadius.d.ts +13 -0
- package/dist/tailwind/plugins/nestedBorderRadius.js +17 -0
- package/dist/tailwind/plugins/scaleMode.cjs +17 -0
- package/dist/tailwind/plugins/scaleMode.d.cts +16 -0
- package/dist/tailwind/plugins/scaleMode.d.ts +16 -0
- package/dist/tailwind/plugins/scaleMode.js +15 -0
- package/dist/tailwind/plugins/shadows.cjs +45 -0
- package/dist/tailwind/plugins/shadows.d.cts +13 -0
- package/dist/tailwind/plugins/shadows.d.ts +13 -0
- package/dist/tailwind/plugins/shadows.js +43 -0
- package/dist/tailwind/plugins/sizing.cjs +32 -0
- package/dist/tailwind/plugins/sizing.d.cts +16 -0
- package/dist/tailwind/plugins/sizing.d.ts +16 -0
- package/dist/tailwind/plugins/sizing.js +30 -0
- package/dist/tailwind/plugins/spacing.cjs +13 -0
- package/dist/tailwind/plugins/spacing.d.cts +13 -0
- package/dist/tailwind/plugins/spacing.d.ts +13 -0
- package/dist/tailwind/plugins/spacing.js +11 -0
- package/dist/tailwind/plugins/typography.cjs +77 -0
- package/dist/tailwind/plugins/typography.d.cts +13 -0
- package/dist/tailwind/plugins/typography.d.ts +13 -0
- package/dist/tailwind/plugins/typography.js +75 -0
- package/dist/tailwind/postcss.config.cjs +9 -0
- package/dist/tailwind/postcss.config.d.cts +1 -0
- package/dist/tailwind/postcss.config.d.ts +1 -0
- package/dist/tailwind/postcss.config.js +13 -0
- package/dist/tailwind/purger/index.cjs +7 -0
- package/dist/tailwind/purger/index.d.cts +2 -0
- package/dist/tailwind/purger/index.d.ts +2 -0
- package/dist/tailwind/purger/index.js +4 -0
- package/dist/tailwind/tailwind.config.cjs +31 -0
- package/dist/tailwind/tailwind.config.d.cts +18 -0
- package/dist/tailwind/tailwind.config.d.ts +19 -0
- package/dist/tailwind/tailwind.config.js +31 -0
- package/dist/tailwind/tailwind.d.cjs +1 -0
- package/dist/tailwind/tailwind.d.cts +6 -0
- package/dist/tailwind/tailwind.d.ts +6 -0
- package/dist/tailwind/tailwindPlugin.cjs +36 -0
- package/dist/tailwind/tailwindPlugin.d.cts +22 -0
- package/dist/tailwind/tailwindPlugin.d.ts +22 -0
- package/dist/tailwind/tailwindPlugin.js +34 -0
- package/dist/tailwind/theme/getFontFamilyTheme.cjs +24 -0
- package/dist/tailwind/theme/getFontFamilyTheme.d.cts +6 -0
- package/dist/tailwind/theme/getFontFamilyTheme.d.ts +6 -0
- package/dist/tailwind/theme/getFontFamilyTheme.js +23 -0
- package/dist/tailwind/tsMorph.cjs +11 -1
- package/dist/tailwind/tsMorph.d.cts +2 -31
- package/dist/tailwind/tsMorph.d.ts +2 -31
- package/dist/tailwind/tsMorph.js +4 -2
- package/dist/tailwind/utils/addFontsPlugin.cjs +15 -0
- package/dist/tailwind/utils/addFontsPlugin.d.cts +17 -0
- package/dist/tailwind/utils/addFontsPlugin.d.ts +17 -0
- package/dist/tailwind/utils/addFontsPlugin.js +13 -0
- package/dist/tailwind/utils/composeTailwindPlugins.cjs +72 -0
- package/dist/tailwind/utils/composeTailwindPlugins.d.cts +59 -0
- package/dist/tailwind/utils/composeTailwindPlugins.d.ts +59 -0
- package/dist/tailwind/utils/composeTailwindPlugins.js +63 -0
- package/dist/tailwind/utils/getColorModeStyles.cjs +22 -0
- package/dist/tailwind/utils/getColorModeStyles.d.cts +17 -0
- package/dist/tailwind/utils/getColorModeStyles.d.ts +17 -0
- package/dist/tailwind/utils/getColorModeStyles.js +21 -0
- package/dist/tailwind/utils/getElevationStyles.cjs +12 -0
- package/dist/tailwind/utils/getElevationStyles.d.cts +14 -0
- package/dist/tailwind/utils/getElevationStyles.d.ts +14 -0
- package/dist/tailwind/utils/getElevationStyles.js +12 -0
- package/dist/tailwind/utils/getFontFaceDeclarations.cjs +20 -0
- package/dist/tailwind/utils/getFontFaceDeclarations.d.cts +11 -0
- package/dist/tailwind/utils/getFontFaceDeclarations.d.ts +11 -0
- package/dist/tailwind/utils/getFontFaceDeclarations.js +20 -0
- package/dist/tailwind/utils/getFontStyles.cjs +41 -0
- package/dist/tailwind/utils/getFontStyles.d.cts +24 -0
- package/dist/tailwind/utils/getFontStyles.d.ts +24 -0
- package/dist/tailwind/utils/getFontStyles.js +41 -0
- package/dist/tailwind/utils/getMotionStyles.cjs +38 -0
- package/dist/tailwind/utils/getMotionStyles.d.cts +24 -0
- package/dist/tailwind/utils/getMotionStyles.d.ts +24 -0
- package/dist/tailwind/utils/getMotionStyles.js +37 -0
- package/dist/tailwind/utils/getNestedBorderRadiusUtilities.cjs +52 -0
- package/dist/tailwind/utils/getNestedBorderRadiusUtilities.d.cts +27 -0
- package/dist/tailwind/utils/getNestedBorderRadiusUtilities.d.ts +27 -0
- package/dist/tailwind/utils/getNestedBorderRadiusUtilities.js +51 -0
- package/dist/tailwind/utils/getScaleModeStyles.cjs +25 -0
- package/dist/tailwind/utils/getScaleModeStyles.d.cts +28 -0
- package/dist/tailwind/utils/getScaleModeStyles.d.ts +28 -0
- package/dist/tailwind/utils/getScaleModeStyles.js +24 -0
- package/dist/tailwind/utils/getShadowPresetValues.cjs +81 -0
- package/dist/tailwind/utils/getShadowPresetValues.d.cts +56 -0
- package/dist/tailwind/utils/getShadowPresetValues.d.ts +56 -0
- package/dist/tailwind/utils/getShadowPresetValues.js +79 -0
- package/dist/tailwind/utils/getShadowStyles.cjs +20 -0
- package/dist/tailwind/utils/getShadowStyles.d.cts +20 -0
- package/dist/tailwind/utils/getShadowStyles.d.ts +20 -0
- package/dist/tailwind/utils/getShadowStyles.js +19 -0
- package/dist/tailwind/utils/getShadowVars.cjs +26 -0
- package/dist/tailwind/utils/getShadowVars.d.cts +7 -0
- package/dist/tailwind/utils/getShadowVars.d.ts +7 -0
- package/dist/tailwind/utils/getShadowVars.js +26 -0
- package/dist/tailwind/utils/index.cjs +25 -0
- package/dist/tailwind/utils/index.d.cts +11 -0
- package/dist/tailwind/utils/index.d.ts +11 -0
- package/dist/tailwind/utils/index.js +13 -0
- package/dist/tokens/automation/configs/avatar.cjs +310 -0
- package/dist/tokens/automation/configs/avatar.d.cts +18 -0
- package/dist/tokens/automation/configs/avatar.d.ts +18 -0
- package/dist/tokens/automation/configs/avatar.js +309 -0
- package/dist/tokens/automation/configs/badge.cjs +324 -0
- package/dist/tokens/automation/configs/badge.d.cts +14 -0
- package/dist/tokens/automation/configs/badge.d.ts +14 -0
- package/dist/tokens/automation/configs/badge.js +323 -0
- package/dist/tokens/automation/configs/button.cjs +447 -0
- package/dist/tokens/automation/configs/button.d.cts +14 -0
- package/dist/tokens/automation/configs/button.d.ts +14 -0
- package/dist/tokens/automation/configs/button.js +446 -0
- package/dist/tokens/automation/configs/checkbox.cjs +256 -0
- package/dist/tokens/automation/configs/checkbox.d.cts +14 -0
- package/dist/tokens/automation/configs/checkbox.d.ts +14 -0
- package/dist/tokens/automation/configs/checkbox.js +255 -0
- package/dist/tokens/automation/configs/chip.cjs +552 -0
- package/dist/tokens/automation/configs/chip.d.cts +18 -0
- package/dist/tokens/automation/configs/chip.d.ts +18 -0
- package/dist/tokens/automation/configs/chip.js +551 -0
- package/dist/tokens/automation/configs/divider.cjs +119 -0
- package/dist/tokens/automation/configs/divider.d.cts +13 -0
- package/dist/tokens/automation/configs/divider.d.ts +13 -0
- package/dist/tokens/automation/configs/divider.js +118 -0
- package/dist/tokens/automation/configs/iconButton.cjs +72 -0
- package/dist/tokens/automation/configs/iconButton.d.cts +14 -0
- package/dist/tokens/automation/configs/iconButton.d.ts +14 -0
- package/dist/tokens/automation/configs/iconButton.js +71 -0
- package/dist/tokens/automation/configs/index.cjs +26 -0
- package/dist/tokens/automation/configs/index.d.cts +13 -0
- package/dist/tokens/automation/configs/index.d.ts +13 -0
- package/dist/tokens/automation/configs/index.js +15 -0
- package/dist/tokens/automation/configs/input.cjs +473 -0
- package/dist/tokens/automation/configs/input.d.cts +14 -0
- package/dist/tokens/automation/configs/input.d.ts +14 -0
- package/dist/tokens/automation/configs/input.js +472 -0
- package/dist/tokens/automation/configs/link.cjs +194 -0
- package/dist/tokens/automation/configs/link.d.cts +14 -0
- package/dist/tokens/automation/configs/link.d.ts +14 -0
- package/dist/tokens/automation/configs/link.js +193 -0
- package/dist/tokens/automation/configs/menu.cjs +309 -0
- package/dist/tokens/automation/configs/menu.d.cts +18 -0
- package/dist/tokens/automation/configs/menu.d.ts +18 -0
- package/dist/tokens/automation/configs/menu.js +308 -0
- package/dist/tokens/automation/configs/radio.cjs +228 -0
- package/dist/tokens/automation/configs/radio.d.cts +14 -0
- package/dist/tokens/automation/configs/radio.d.ts +14 -0
- package/dist/tokens/automation/configs/radio.js +227 -0
- package/dist/tokens/automation/configs/switch.cjs +296 -0
- package/dist/tokens/automation/configs/switch.d.cts +14 -0
- package/dist/tokens/automation/configs/switch.d.ts +14 -0
- package/dist/tokens/automation/configs/switch.js +295 -0
- package/dist/tokens/automation/index.cjs +46 -0
- package/dist/tokens/automation/index.d.cts +29 -0
- package/dist/tokens/automation/index.d.ts +29 -0
- package/dist/tokens/automation/index.js +16 -0
- package/dist/tokens/automation/mapTextVariantFixtureToValue.cjs +8 -0
- package/dist/tokens/automation/mapTextVariantFixtureToValue.d.cts +4 -0
- package/dist/tokens/automation/mapTextVariantFixtureToValue.d.ts +4 -0
- package/dist/tokens/automation/mapTextVariantFixtureToValue.js +8 -0
- package/dist/tokens/automation/properties.cjs +316 -1
- package/dist/tokens/automation/properties.d.cts +94 -7
- package/dist/tokens/automation/properties.d.ts +94 -7
- package/dist/tokens/automation/properties.js +316 -1
- package/dist/tokens/automation/types/ComponentConfig.cjs +1 -0
- package/dist/tokens/automation/types/ComponentConfig.d.cts +54 -0
- package/dist/tokens/automation/types/ComponentConfig.d.ts +54 -0
- package/dist/tokens/automation/types/ComponentConfig.js +1 -0
- package/dist/tokens/automation/types/ComponentDB.cjs +1 -0
- package/dist/tokens/automation/types/ComponentDB.d.cts +1 -0
- package/dist/tokens/automation/types/ComponentDB.d.ts +1 -0
- package/dist/tokens/automation/types/ComponentDB.js +1 -0
- package/dist/tokens/automation/types/ComponentStyles.cjs +1 -0
- package/dist/tokens/automation/types/ComponentStyles.d.cts +35 -0
- package/dist/tokens/automation/types/ComponentStyles.d.ts +35 -0
- package/dist/tokens/automation/types/ComponentStyles.js +1 -0
- package/dist/tokens/automation/types/index.cjs +1 -0
- package/dist/tokens/automation/types/index.d.cts +3 -0
- package/dist/tokens/automation/types/index.d.ts +3 -0
- package/dist/tokens/automation/types/index.js +1 -0
- package/dist/tokens/automation/utils/cartesianProduct.cjs +7 -0
- package/dist/tokens/automation/utils/cartesianProduct.d.cts +7 -0
- package/dist/tokens/automation/utils/cartesianProduct.d.ts +7 -0
- package/dist/tokens/automation/utils/cartesianProduct.js +6 -0
- package/dist/tokens/automation/utils/coalesceConfigVariant.cjs +21 -0
- package/dist/tokens/automation/utils/coalesceConfigVariant.d.cts +16 -0
- package/dist/tokens/automation/utils/coalesceConfigVariant.d.ts +16 -0
- package/dist/tokens/automation/utils/coalesceConfigVariant.js +21 -0
- package/dist/tokens/automation/utils/defaults.cjs +15 -0
- package/dist/tokens/automation/utils/defaults.d.cts +8 -0
- package/dist/tokens/automation/utils/defaults.d.ts +8 -0
- package/dist/tokens/automation/utils/defaults.js +13 -0
- package/dist/tokens/automation/utils/generateKeyFromFlatConfigPath.cjs +26 -0
- package/dist/tokens/automation/utils/generateKeyFromFlatConfigPath.d.cts +10 -0
- package/dist/tokens/automation/utils/generateKeyFromFlatConfigPath.d.ts +10 -0
- package/dist/tokens/automation/utils/generateKeyFromFlatConfigPath.js +25 -0
- package/dist/tokens/automation/utils/generateSchemaKey.cjs +14 -0
- package/dist/tokens/automation/utils/generateSchemaKey.d.cts +18 -0
- package/dist/tokens/automation/utils/generateSchemaKey.d.ts +18 -0
- package/dist/tokens/automation/utils/generateSchemaKey.js +13 -0
- package/dist/tokens/automation/utils/getConfigComponentVariant.cjs +17 -0
- package/dist/tokens/automation/utils/getConfigComponentVariant.d.cts +8 -0
- package/dist/tokens/automation/utils/getConfigComponentVariant.d.ts +8 -0
- package/dist/tokens/automation/utils/getConfigComponentVariant.js +17 -0
- package/dist/tokens/automation/utils/getConfigVariantComponentStatesMatrix.cjs +26 -0
- package/dist/tokens/automation/utils/getConfigVariantComponentStatesMatrix.d.cts +9 -0
- package/dist/tokens/automation/utils/getConfigVariantComponentStatesMatrix.d.ts +9 -0
- package/dist/tokens/automation/utils/getConfigVariantComponentStatesMatrix.js +23 -0
- package/dist/tokens/automation/utils/getConfigVariantProperties.cjs +24 -0
- package/dist/tokens/automation/utils/getConfigVariantProperties.d.cts +19 -0
- package/dist/tokens/automation/utils/getConfigVariantProperties.d.ts +19 -0
- package/dist/tokens/automation/utils/getConfigVariantProperties.js +24 -0
- package/dist/tokens/automation/utils/getConfigVariantPseudoStates.cjs +34 -0
- package/dist/tokens/automation/utils/getConfigVariantPseudoStates.d.cts +11 -0
- package/dist/tokens/automation/utils/getConfigVariantPseudoStates.d.ts +11 -0
- package/dist/tokens/automation/utils/getConfigVariantPseudoStates.js +34 -0
- package/dist/tokens/automation/utils/getConfigVariants.cjs +39 -0
- package/dist/tokens/automation/utils/getConfigVariants.d.cts +19 -0
- package/dist/tokens/automation/utils/getConfigVariants.d.ts +19 -0
- package/dist/tokens/automation/utils/getConfigVariants.js +37 -0
- package/dist/tokens/automation/utils/index.cjs +681 -0
- package/dist/tokens/automation/utils/index.d.cts +146 -0
- package/dist/tokens/automation/utils/index.d.ts +146 -0
- package/dist/tokens/automation/utils/index.js +646 -0
- package/dist/tokens/automation/utils/mapColorFixtureToValue.cjs +20 -0
- package/dist/tokens/automation/utils/mapColorFixtureToValue.d.cts +4 -0
- package/dist/tokens/automation/utils/mapColorFixtureToValue.d.ts +4 -0
- package/dist/tokens/automation/utils/mapColorFixtureToValue.js +20 -0
- package/dist/tokens/automation/utils/subcomponents.cjs +11 -0
- package/dist/tokens/automation/utils/subcomponents.d.cts +8 -0
- package/dist/tokens/automation/utils/subcomponents.d.ts +8 -0
- package/dist/tokens/automation/utils/subcomponents.js +10 -0
- package/dist/tokens/automation/utils/variableData.cjs +32 -0
- package/dist/tokens/automation/utils/variableData.d.cts +18 -0
- package/dist/tokens/automation/utils/variableData.d.ts +18 -0
- package/dist/tokens/automation/utils/variableData.js +28 -0
- package/dist/tokens/automation/utils/variantConfigGuards.cjs +9 -0
- package/dist/tokens/automation/utils/variantConfigGuards.d.cts +12 -0
- package/dist/tokens/automation/utils/variantConfigGuards.d.ts +12 -0
- package/dist/tokens/automation/utils/variantConfigGuards.js +7 -0
- package/dist/tokens/configs/borderRadius.cjs +25 -0
- package/dist/tokens/configs/borderRadius.d.cts +7 -0
- package/dist/tokens/configs/borderRadius.d.ts +7 -0
- package/dist/tokens/configs/borderRadius.js +23 -0
- package/dist/tokens/configs/borderWidth.cjs +19 -0
- package/dist/tokens/configs/borderWidth.d.cts +7 -0
- package/dist/tokens/configs/borderWidth.d.ts +7 -0
- package/dist/tokens/configs/borderWidth.js +17 -0
- package/dist/tokens/configs/colorMode.cjs +18 -0
- package/dist/tokens/configs/colorMode.d.cts +6 -0
- package/dist/tokens/configs/colorMode.d.ts +6 -0
- package/dist/tokens/configs/colorMode.js +18 -0
- package/dist/tokens/configs/font.cjs +13 -0
- package/dist/tokens/configs/font.d.cts +6 -0
- package/dist/tokens/configs/font.d.ts +6 -0
- package/dist/tokens/configs/font.js +12 -0
- package/dist/tokens/configs/motion.cjs +137 -0
- package/dist/tokens/configs/motion.d.cts +42 -0
- package/dist/tokens/configs/motion.d.ts +42 -0
- package/dist/tokens/configs/motion.js +132 -0
- package/dist/tokens/configs/palette.cjs +402 -0
- package/dist/tokens/configs/palette.d.cts +13 -0
- package/dist/tokens/configs/palette.d.ts +13 -0
- package/dist/tokens/configs/palette.js +399 -0
- package/dist/tokens/configs/scaleMode.cjs +30 -0
- package/dist/tokens/configs/scaleMode.d.cts +6 -0
- package/dist/tokens/configs/scaleMode.d.ts +6 -0
- package/dist/tokens/configs/scaleMode.js +30 -0
- package/dist/tokens/configs/shadow.cjs +332 -0
- package/dist/tokens/configs/shadow.d.cts +6 -0
- package/dist/tokens/configs/shadow.d.ts +6 -0
- package/dist/tokens/configs/shadow.js +331 -0
- package/dist/tokens/configs/sizes.cjs +26 -0
- package/dist/tokens/configs/sizes.d.cts +10 -0
- package/dist/tokens/configs/sizes.d.ts +10 -0
- package/dist/tokens/configs/sizes.js +21 -0
- package/dist/tokens/configs/spectrum.cjs +731 -0
- package/dist/tokens/configs/spectrum.d.cts +7 -0
- package/dist/tokens/configs/spectrum.d.ts +7 -0
- package/dist/tokens/configs/spectrum.js +729 -0
- package/dist/tokens/configs/typography.cjs +411 -0
- package/dist/tokens/configs/typography.d.cts +364 -0
- package/dist/tokens/configs/typography.d.ts +364 -0
- package/dist/tokens/configs/typography.js +398 -0
- package/dist/tokens/configs/yosConfig.cjs +22037 -0
- package/dist/tokens/configs/yosConfig.d.cts +23036 -0
- package/dist/tokens/configs/yosConfig.d.ts +23036 -0
- package/dist/tokens/configs/yosConfig.js +22036 -0
- package/dist/tokens/consts/cssTokens.cjs +98 -0
- package/dist/tokens/consts/cssTokens.d.cts +51 -0
- package/dist/tokens/consts/cssTokens.d.ts +51 -0
- package/dist/tokens/consts/cssTokens.js +59 -0
- package/dist/tokens/consts/defaultModes.cjs +17 -0
- package/dist/tokens/consts/defaultModes.d.cts +11 -0
- package/dist/tokens/consts/defaultModes.d.ts +11 -0
- package/dist/tokens/consts/defaultModes.js +11 -0
- package/dist/tokens/consts/fontDeclarationsMap.cjs +652 -0
- package/dist/tokens/consts/fontDeclarationsMap.d.cts +537 -0
- package/dist/tokens/consts/fontDeclarationsMap.d.ts +537 -0
- package/dist/tokens/consts/fontDeclarationsMap.js +651 -0
- package/dist/tokens/index.cjs +113 -1
- package/dist/tokens/index.d.cts +43 -2257
- package/dist/tokens/index.d.ts +43 -2257
- package/dist/tokens/index.js +28 -1
- package/dist/tokens/parseButtonVariants.cjs +11 -0
- package/dist/tokens/parseButtonVariants.d.cts +13 -0
- package/dist/tokens/parseButtonVariants.d.ts +13 -0
- package/dist/tokens/parseButtonVariants.js +10 -0
- package/dist/tokens/parseTokens.cjs +121 -1
- package/dist/tokens/parseTokens.d.cts +20 -23
- package/dist/tokens/parseTokens.d.ts +20 -23
- package/dist/tokens/parseTokens.js +121 -1
- package/dist/tokens/types.cjs +1 -0
- package/dist/tokens/types.d.cts +1005 -0
- package/dist/tokens/types.d.ts +1005 -0
- package/dist/tokens/types.js +1 -0
- package/dist/tokens/utils/entries.cjs +17 -0
- package/dist/tokens/utils/entries.d.cts +12 -0
- package/dist/tokens/utils/entries.d.ts +12 -0
- package/dist/tokens/utils/entries.js +16 -0
- package/dist/tokens/utils/fromEntries.cjs +17 -0
- package/dist/tokens/utils/fromEntries.d.cts +12 -0
- package/dist/tokens/utils/fromEntries.d.ts +12 -0
- package/dist/tokens/utils/fromEntries.js +16 -0
- package/dist/tokens/utils/mapValues.cjs +12 -0
- package/dist/tokens/utils/mapValues.d.cts +5 -0
- package/dist/tokens/utils/mapValues.d.ts +5 -0
- package/dist/tokens/utils/mapValues.js +11 -0
- package/dist/tokens/utils/opacity.cjs +27 -0
- package/dist/tokens/utils/opacity.d.cts +19 -0
- package/dist/tokens/utils/opacity.d.ts +19 -0
- package/dist/tokens/utils/opacity.js +25 -0
- package/dist/types.cjs +1 -0
- package/dist/types.d.cts +6 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.js +1 -0
- package/dist/utils/assertUnreachable.cjs +9 -0
- package/dist/utils/assertUnreachable.d.cts +4 -0
- package/dist/utils/assertUnreachable.d.ts +4 -0
- package/dist/utils/assertUnreachable.js +8 -0
- package/dist/utils/composeRefs.cjs +21 -0
- package/dist/utils/composeRefs.d.cts +9 -0
- package/dist/utils/composeRefs.d.ts +9 -0
- package/dist/utils/composeRefs.js +20 -0
- package/dist/utils/createSlot.cjs +78 -0
- package/dist/utils/createSlot.d.cts +6 -0
- package/dist/utils/createSlot.d.ts +6 -0
- package/dist/utils/createSlot.js +77 -0
- package/dist/utils/entries.cjs +9 -0
- package/dist/utils/entries.d.cts +4 -0
- package/dist/utils/entries.d.ts +4 -0
- package/dist/utils/entries.js +8 -0
- package/dist/utils/falsyToString.cjs +9 -0
- package/dist/utils/falsyToString.d.cts +4 -0
- package/dist/utils/falsyToString.d.ts +4 -0
- package/dist/utils/falsyToString.js +8 -0
- package/dist/utils/getMotionVar.cjs +15 -0
- package/dist/utils/getMotionVar.d.cts +16 -0
- package/dist/utils/getMotionVar.d.ts +16 -0
- package/dist/utils/getMotionVar.js +15 -0
- package/dist/utils/intersperse.cjs +48 -0
- package/dist/utils/intersperse.d.cts +33 -0
- package/dist/utils/intersperse.d.ts +33 -0
- package/dist/utils/intersperse.js +45 -0
- package/dist/utils/mapValues.cjs +12 -0
- package/dist/utils/mapValues.d.cts +5 -0
- package/dist/utils/mapValues.d.ts +5 -0
- package/dist/utils/mapValues.js +11 -0
- package/dist/utils/mergeSlotProps.cjs +29 -0
- package/dist/utils/mergeSlotProps.d.cts +5 -0
- package/dist/utils/mergeSlotProps.d.ts +5 -0
- package/dist/utils/mergeSlotProps.js +28 -0
- package/package.json +65 -60
- package/dist/Box-DwoY1xsp.d.cts +0 -34
- package/dist/Box-ncdx_6JJ.d.ts +0 -34
- package/dist/Pressable-XywV25nD.d.ts +0 -44
- package/dist/Pressable-vZoRdY_i.d.cts +0 -44
- package/dist/Text-B7LaBovi.d.cts +0 -88
- package/dist/Text-D9E-Ivs4.d.cts +0 -324
- package/dist/Text-D9E-Ivs4.d.ts +0 -324
- package/dist/Text-DP7Wj9fr.d.ts +0 -88
- package/dist/Text-DRla3SiI.d.ts +0 -88
- package/dist/Text-PCg-YzOz.d.cts +0 -88
- package/dist/VStack-B89J1tAJ.d.cts +0 -83
- package/dist/VStack-BH_tBQAO.d.cts +0 -83
- package/dist/VStack-CwNak3GT.d.ts +0 -83
- package/dist/VStack-YuhJZCys.d.ts +0 -83
- package/dist/chunk-27DQUYOD.cjs +0 -1
- package/dist/chunk-3KGHFL34.cjs +0 -1
- package/dist/chunk-4DI4U2ZJ.js +0 -2
- package/dist/chunk-4NLPM4LX.js +0 -1
- package/dist/chunk-566E2KOV.cjs +0 -1
- package/dist/chunk-5PTFNIFE.js +0 -2
- package/dist/chunk-6PEIP4LR.cjs +0 -1
- package/dist/chunk-6V7QEDMR.js +0 -2
- package/dist/chunk-AJIPOPZP.js +0 -1
- package/dist/chunk-B2TS37PH.cjs +0 -1
- package/dist/chunk-BRD7KJ5B.cjs +0 -2
- package/dist/chunk-C67TSNYO.cjs +0 -2
- package/dist/chunk-DDL45GZJ.js +0 -2
- package/dist/chunk-EPEWMEHA.js +0 -3
- package/dist/chunk-FK3YMO3H.cjs +0 -1
- package/dist/chunk-FKDU4FOZ.js +0 -2
- package/dist/chunk-FP7OSHKI.cjs +0 -1
- package/dist/chunk-GF4A6TFM.js +0 -2
- package/dist/chunk-HKI5AZ7O.js +0 -1
- package/dist/chunk-HTZHSZZP.cjs +0 -1
- package/dist/chunk-IMKUVCCQ.cjs +0 -2
- package/dist/chunk-IOYNZUNZ.js +0 -2
- package/dist/chunk-IPJKEKXB.cjs +0 -2
- package/dist/chunk-K3SGTZBD.js +0 -2
- package/dist/chunk-KOMSMI5O.cjs +0 -1
- package/dist/chunk-LBWNL2O7.cjs +0 -1
- package/dist/chunk-LK3ZQP3J.cjs +0 -1
- package/dist/chunk-LYHJT3E5.js +0 -2
- package/dist/chunk-NJH5V24C.cjs +0 -1
- package/dist/chunk-NNSZGTMQ.js +0 -2
- package/dist/chunk-O4OSO3V4.cjs +0 -2
- package/dist/chunk-OCCSRSJM.js +0 -2
- package/dist/chunk-OPJ5SIFC.js +0 -2
- package/dist/chunk-ORB5CU37.cjs +0 -1
- package/dist/chunk-P4XYWMJE.cjs +0 -2
- package/dist/chunk-Q5LASIAY.js +0 -3
- package/dist/chunk-QIGG4KRS.js +0 -2
- package/dist/chunk-QLXJH36U.cjs +0 -1
- package/dist/chunk-QUNKTR5G.cjs +0 -1
- package/dist/chunk-R7SUOHEQ.js +0 -1
- package/dist/chunk-S5ISY44L.cjs +0 -1
- package/dist/chunk-SPP3MH4Z.js +0 -2
- package/dist/chunk-VX5NJRUI.js +0 -2
- package/dist/chunk-W6B4I24P.js +0 -1
- package/dist/chunk-WR3CRR6L.js +0 -2
- package/dist/chunk-XK6V5SIG.cjs +0 -1
- package/dist/chunk-XN3JP4KW.cjs +0 -1
- package/dist/chunk-YZE72XPR.js +0 -2
- package/dist/client/Menu.cjs +0 -2
- package/dist/client/Menu.d.cts +0 -624
- package/dist/client/Menu.d.ts +0 -624
- package/dist/client/Menu.js +0 -3
- package/dist/client/index.cjs +0 -2
- package/dist/client/index.d.cts +0 -534
- package/dist/client/index.d.ts +0 -534
- package/dist/client/index.js +0 -2
- package/dist/domAnimation-26D6WPCP.cjs +0 -1
- package/dist/domAnimation-FQC75V5T.js +0 -1
- package/dist/domMax-7KVFVNKB.cjs +0 -1
- package/dist/domMax-XRPNJ6D3.js +0 -1
- package/dist/experimental/client/SwitchV2.cjs +0 -1
- package/dist/experimental/client/SwitchV2.js +0 -1
- package/dist/experimental/client/index.cjs +0 -3
- package/dist/experimental/client/index.d.cts +0 -135
- package/dist/experimental/client/index.d.ts +0 -135
- package/dist/experimental/client/index.js +0 -3
- package/dist/experimental/index.cjs +0 -2
- package/dist/experimental/index.d.cts +0 -86
- package/dist/experimental/index.d.ts +0 -86
- package/dist/experimental/index.js +0 -2
- package/dist/index-Ba60jeat.d.cts +0 -251
- package/dist/index-BrIj1pmg.d.ts +0 -251
- package/dist/index-DUswrIxa.d.cts +0 -251
- package/dist/index-DVUIyCVF.d.ts +0 -251
- package/dist/metafile-cjs.json +0 -1
- package/dist/metafile-esm.json +0 -1
- package/dist/styles/toast.css +0 -1
- package/dist/styles/toast.d.cts +0 -2
- package/dist/styles/toast.d.ts +0 -2
- package/dist/tailwind/plugin.cjs +0 -1
- package/dist/tailwind/plugin.d.cts +0 -84
- package/dist/tailwind/plugin.d.ts +0 -84
- package/dist/tailwind/plugin.js +0 -2
- package/dist/tailwind/purger.cjs +0 -5
- package/dist/tailwind/purger.js +0 -6
- package/dist/tailwind/utils.cjs +0 -1
- package/dist/tailwind/utils.d.cts +0 -164
- package/dist/tailwind/utils.d.ts +0 -164
- package/dist/tailwind/utils.js +0 -1
- package/dist/tokens/automation/configs.cjs +0 -1
- package/dist/tokens/automation/configs.d.cts +0 -128
- package/dist/tokens/automation/configs.d.ts +0 -128
- package/dist/tokens/automation/configs.js +0 -1
- package/dist/types-fpiurdUk.d.cts +0 -6
- package/dist/types-fpiurdUk.d.ts +0 -6
- package/dist/universalTokensConfigAuto-BHqbAL0M.d.cts +0 -14360
- package/dist/universalTokensConfigAuto-BHqbAL0M.d.ts +0 -14360
- package/dist/universalTokensConfigAuto-D1z2ow2N.d.cts +0 -14360
- package/dist/universalTokensConfigAuto-D1z2ow2N.d.ts +0 -14360
|
@@ -0,0 +1,681 @@
|
|
|
1
|
+
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
|
|
3
|
+
const require_tokens_consts_cssTokens = require('../../consts/cssTokens.cjs');
|
|
4
|
+
const require_tokens_automation_properties = require('../properties.cjs');
|
|
5
|
+
const require_tokens_automation_utils_generateSchemaKey = require('./generateSchemaKey.cjs');
|
|
6
|
+
const require_tokens_automation_utils_variantConfigGuards = require('./variantConfigGuards.cjs');
|
|
7
|
+
const require_tokens_automation_utils_cartesianProduct = require('./cartesianProduct.cjs');
|
|
8
|
+
const require_tokens_automation_utils_coalesceConfigVariant = require('./coalesceConfigVariant.cjs');
|
|
9
|
+
const require_tokens_automation_utils_defaults = require('./defaults.cjs');
|
|
10
|
+
const require_tokens_automation_utils_generateKeyFromFlatConfigPath = require('./generateKeyFromFlatConfigPath.cjs');
|
|
11
|
+
const require_tokens_automation_utils_getConfigVariantComponentStatesMatrix = require('./getConfigVariantComponentStatesMatrix.cjs');
|
|
12
|
+
const require_tokens_automation_utils_getConfigVariantProperties = require('./getConfigVariantProperties.cjs');
|
|
13
|
+
const require_tokens_automation_utils_getConfigVariantPseudoStates = require('./getConfigVariantPseudoStates.cjs');
|
|
14
|
+
const require_tokens_automation_utils_subcomponents = require('./subcomponents.cjs');
|
|
15
|
+
const require_tokens_automation_utils_getConfigVariants = require('./getConfigVariants.cjs');
|
|
16
|
+
const require_tokens_automation_utils_variableData = require('./variableData.cjs');
|
|
17
|
+
let lodash_isFunction_js = require("lodash/isFunction.js");
|
|
18
|
+
lodash_isFunction_js = require_rolldown_runtime.__toESM(lodash_isFunction_js);
|
|
19
|
+
let lodash_lowerCase_js = require("lodash/lowerCase.js");
|
|
20
|
+
lodash_lowerCase_js = require_rolldown_runtime.__toESM(lodash_lowerCase_js);
|
|
21
|
+
let lodash_mergeWith_js = require("lodash/mergeWith.js");
|
|
22
|
+
lodash_mergeWith_js = require_rolldown_runtime.__toESM(lodash_mergeWith_js);
|
|
23
|
+
|
|
24
|
+
//#region src/tokens/automation/utils/index.ts
|
|
25
|
+
const CSS_GAP = "gap";
|
|
26
|
+
const CSS_LINE_HEIGHT = "line-height";
|
|
27
|
+
const CSS_BORDER_WIDTH = "border-width";
|
|
28
|
+
const CSS_BORDER_COLOR = "border-color";
|
|
29
|
+
const CSS_BOX_SHADOW = "box-shadow";
|
|
30
|
+
/**
|
|
31
|
+
* Generates button line-height with icon size minimum.
|
|
32
|
+
* Ensures button line-height is at least as tall as the icon to prevent clipping.
|
|
33
|
+
* @returns Enhanced line-height CSS value with max(), or original value if icon size unavailable
|
|
34
|
+
*/
|
|
35
|
+
function getButtonLineHeightWithIconMinimum({ lineHeight, schema, iconLayerKey, state, theme }) {
|
|
36
|
+
const iconSizeValue = schema.variables?.[iconLayerKey]?.size?.[state]?.value;
|
|
37
|
+
if (!iconSizeValue) return lineHeight;
|
|
38
|
+
return `max(${lineHeight}, ${theme(`sizing.icon.${iconSizeValue}`)})`;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Forces button borders to use box-shadow instead of border properties.
|
|
42
|
+
* Converts border-width and border-color into an inset box-shadow layer.
|
|
43
|
+
*
|
|
44
|
+
* Why box-shadow for borders?
|
|
45
|
+
* - Respects border-radius (unlike outline which stays rectangular)
|
|
46
|
+
* - Allows layering multiple shadows in a single property
|
|
47
|
+
* - GPU-accelerated and performant
|
|
48
|
+
* - Works perfectly with rounded/circular buttons
|
|
49
|
+
*
|
|
50
|
+
* @param classStyles - The CSS declarations for a button class
|
|
51
|
+
* @returns Modified styles with box-shadow layers, or original if no border
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* Input: { border-width: '2px', border-color: 'red', box-shadow: '0 2px 4px rgba(0,0,0,0.1)' }
|
|
55
|
+
* Output: { box-shadow: 'inset 0 0 0 2px red, 0 2px 4px rgba(0,0,0,0.1)' }
|
|
56
|
+
*/
|
|
57
|
+
function applyBoxShadowBorder(classStyles) {
|
|
58
|
+
const borderWidth = classStyles[CSS_BORDER_WIDTH];
|
|
59
|
+
const borderColor = classStyles[CSS_BORDER_COLOR];
|
|
60
|
+
if (!borderWidth || !borderColor) return classStyles;
|
|
61
|
+
const stripImportant = (value) => value.replace(/\s*!important\s*$/, "");
|
|
62
|
+
const hasImportant = (value) => value?.includes("!important") ?? false;
|
|
63
|
+
const layers = [`inset 0 0 0 ${stripImportant(borderWidth)} ${stripImportant(borderColor)}`, classStyles[CSS_BOX_SHADOW] && stripImportant(classStyles[CSS_BOX_SHADOW])].filter(Boolean);
|
|
64
|
+
const needsImportant = hasImportant(borderWidth) || hasImportant(borderColor) || hasImportant(classStyles[CSS_BOX_SHADOW]);
|
|
65
|
+
const newStyles = { ...classStyles };
|
|
66
|
+
newStyles[CSS_BOX_SHADOW] = layers.join(", ") + (needsImportant ? " !important" : "");
|
|
67
|
+
delete newStyles[CSS_BORDER_WIDTH];
|
|
68
|
+
delete newStyles[CSS_BORDER_COLOR];
|
|
69
|
+
return newStyles;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Map our "states" to pseudo-classes (hover => :hover, pressed => :active, etc.).
|
|
73
|
+
* Adjust or extend as needed.
|
|
74
|
+
*/
|
|
75
|
+
const statePseudoMap = {
|
|
76
|
+
rest: "",
|
|
77
|
+
hover: ":hover:not(:active, :disabled, :has(:disabled))",
|
|
78
|
+
pressed: ":active:not(:disabled, :has(:disabled))",
|
|
79
|
+
focused: ":focus",
|
|
80
|
+
"focus-within": ":focus-within",
|
|
81
|
+
invalid: ":has(input[aria-invalid=\"true\"])",
|
|
82
|
+
"focused-keyboard": ":focus-visible",
|
|
83
|
+
visited: ":visited",
|
|
84
|
+
readonly: ":has(input:read-only)",
|
|
85
|
+
disabled: ":is(:disabled, :has(:disabled))",
|
|
86
|
+
"invalid&hover": ":has(input[aria-invalid=\"true\"]):hover:not(:active, :disabled, :has(:disabled))",
|
|
87
|
+
"invalid&pressed": ":has(input[aria-invalid=\"true\"]):active:not(:disabled, :has(:disabled))"
|
|
88
|
+
};
|
|
89
|
+
const statePseudoMapDocsMode = {
|
|
90
|
+
rest: "",
|
|
91
|
+
hover: "hover",
|
|
92
|
+
pressed: "active",
|
|
93
|
+
focused: "focus",
|
|
94
|
+
"focus-within": "focus-within",
|
|
95
|
+
invalid: "has-input-invalid",
|
|
96
|
+
"focused-keyboard": "focus-visible",
|
|
97
|
+
visited: "visited",
|
|
98
|
+
readonly: "input-readonly",
|
|
99
|
+
disabled: "has-disabled",
|
|
100
|
+
"invalid&hover": "has-input-invalid-and-hover",
|
|
101
|
+
"invalid&pressed": "has-input-invalid-and-active"
|
|
102
|
+
};
|
|
103
|
+
function findFixtureType(property, variantKey) {
|
|
104
|
+
const defaultValue = property.defaults[variantKey];
|
|
105
|
+
const typeOfFixture = property.typeOfFixture;
|
|
106
|
+
let index = 0;
|
|
107
|
+
property.values.forEach((arrayOfValues, i) => {
|
|
108
|
+
if (arrayOfValues.includes(defaultValue)) index = i;
|
|
109
|
+
});
|
|
110
|
+
return typeOfFixture[index];
|
|
111
|
+
}
|
|
112
|
+
function toMinimalDbConfigObject(config) {
|
|
113
|
+
const result = {};
|
|
114
|
+
const defaultsObj = {};
|
|
115
|
+
for (const variantKey in config.variants) defaultsObj[variantKey] = config.variants[variantKey].default;
|
|
116
|
+
result.defaults = defaultsObj;
|
|
117
|
+
result.variables = {};
|
|
118
|
+
for (const variantKey in config.variants) {
|
|
119
|
+
const variantConfig = config.variants[variantKey];
|
|
120
|
+
for (const variantOption of variantConfig.options) if (require_tokens_automation_utils_variantConfigGuards.isVariantConfigWithComponentStates(variantConfig)) {
|
|
121
|
+
const componentStates = variantConfig.componentStates;
|
|
122
|
+
for (const componentStateKey in componentStates) {
|
|
123
|
+
const componentState = componentStates[componentStateKey];
|
|
124
|
+
for (const componentStateOption of componentState.options) for (const layerKey in componentState.layers) {
|
|
125
|
+
const layer = componentState.layers[layerKey];
|
|
126
|
+
const schemaKey = require_tokens_automation_utils_generateSchemaKey.generateSchemaKey({
|
|
127
|
+
variantKey,
|
|
128
|
+
variantValue: variantOption,
|
|
129
|
+
stateKey: componentStateKey,
|
|
130
|
+
stateValue: componentStateOption,
|
|
131
|
+
layer: layerKey
|
|
132
|
+
});
|
|
133
|
+
result.variables[schemaKey] = {};
|
|
134
|
+
for (const propertyKey in layer.properties) {
|
|
135
|
+
const property = layer.properties[propertyKey];
|
|
136
|
+
const variableObject = { [propertyKey]: {} };
|
|
137
|
+
if (property?.skipRestState !== true) variableObject[propertyKey] = { rest: {
|
|
138
|
+
type: findFixtureType(property, variantOption),
|
|
139
|
+
valueType: "alias",
|
|
140
|
+
value: property.defaults[variantOption]
|
|
141
|
+
} };
|
|
142
|
+
if (property.pseudoStates) for (const pseudoState of property.pseudoStates) variableObject[propertyKey][pseudoState] = {
|
|
143
|
+
type: findFixtureType(property, variantOption),
|
|
144
|
+
valueType: "alias",
|
|
145
|
+
value: property.defaults[variantOption]
|
|
146
|
+
};
|
|
147
|
+
result.variables[schemaKey] = {
|
|
148
|
+
...result.variables[schemaKey],
|
|
149
|
+
...variableObject
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
} else if (require_tokens_automation_utils_variantConfigGuards.isVariantConfigWithProperties(variantConfig)) {
|
|
155
|
+
const layers = variantConfig.layers;
|
|
156
|
+
for (const layerKey in layers) {
|
|
157
|
+
const layer = layers[layerKey];
|
|
158
|
+
const schemaKey = require_tokens_automation_utils_generateSchemaKey.generateSchemaKey({
|
|
159
|
+
variantKey,
|
|
160
|
+
variantValue: variantOption,
|
|
161
|
+
layer: layerKey
|
|
162
|
+
});
|
|
163
|
+
result.variables[schemaKey] = {};
|
|
164
|
+
for (const propertyKey in layer.properties) {
|
|
165
|
+
const property = layer.properties[propertyKey];
|
|
166
|
+
const variableObject = { [propertyKey]: {} };
|
|
167
|
+
if (property?.skipRestState !== true) variableObject[propertyKey] = { rest: {
|
|
168
|
+
type: findFixtureType(property, variantOption),
|
|
169
|
+
valueType: "alias",
|
|
170
|
+
value: property.defaults[variantOption]
|
|
171
|
+
} };
|
|
172
|
+
if (property.pseudoStates) for (const pseudoState of property.pseudoStates) variableObject[propertyKey][pseudoState] = {
|
|
173
|
+
type: findFixtureType(property, variantOption),
|
|
174
|
+
valueType: "alias",
|
|
175
|
+
value: property.defaults[variantOption]
|
|
176
|
+
};
|
|
177
|
+
result.variables[schemaKey] = {
|
|
178
|
+
...result.variables[schemaKey],
|
|
179
|
+
...variableObject
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if (config.subComponents) {
|
|
186
|
+
const { subComponents } = config;
|
|
187
|
+
for (const subComponentKey in subComponents) for (const variantKey in subComponents[subComponentKey].variants) {
|
|
188
|
+
const variantConfig = subComponents[subComponentKey].variants[variantKey];
|
|
189
|
+
result.defaults[variantKey] = variantConfig.default;
|
|
190
|
+
for (const variantOption of variantConfig.options) if (require_tokens_automation_utils_variantConfigGuards.isVariantConfigWithComponentStates(variantConfig)) {
|
|
191
|
+
const componentStates = variantConfig.componentStates;
|
|
192
|
+
for (const componentStateKey in componentStates) {
|
|
193
|
+
const componentState = componentStates[componentStateKey];
|
|
194
|
+
for (const componentStateOption of componentState.options) for (const layerKey in componentState.layers) {
|
|
195
|
+
const layer = componentState.layers[layerKey];
|
|
196
|
+
const schemaKey = require_tokens_automation_utils_generateSchemaKey.generateSchemaKey({
|
|
197
|
+
variantKey,
|
|
198
|
+
variantValue: variantOption,
|
|
199
|
+
stateKey: componentStateKey,
|
|
200
|
+
stateValue: componentStateOption,
|
|
201
|
+
layer: layerKey,
|
|
202
|
+
subComponentName: subComponentKey
|
|
203
|
+
});
|
|
204
|
+
result.variables[schemaKey] = {};
|
|
205
|
+
for (const propertyKey in layer.properties) {
|
|
206
|
+
const property = layer.properties[propertyKey];
|
|
207
|
+
const variableObject = { [propertyKey]: {} };
|
|
208
|
+
if (property?.skipRestState !== true) variableObject[propertyKey] = { rest: {
|
|
209
|
+
type: findFixtureType(property, variantOption),
|
|
210
|
+
valueType: "alias",
|
|
211
|
+
value: property.defaults[variantOption]
|
|
212
|
+
} };
|
|
213
|
+
if (property.pseudoStates) for (const pseudoState of property.pseudoStates) variableObject[propertyKey][pseudoState] = {
|
|
214
|
+
type: findFixtureType(property, variantOption),
|
|
215
|
+
valueType: "alias",
|
|
216
|
+
value: property.defaults[variantOption]
|
|
217
|
+
};
|
|
218
|
+
result.variables[schemaKey] = {
|
|
219
|
+
...result.variables[schemaKey],
|
|
220
|
+
...variableObject
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
} else if (require_tokens_automation_utils_variantConfigGuards.isVariantConfigWithProperties(variantConfig)) {
|
|
226
|
+
const layers = variantConfig.layers;
|
|
227
|
+
for (const layerKey in layers) {
|
|
228
|
+
const layer = layers[layerKey];
|
|
229
|
+
const schemaKey = require_tokens_automation_utils_generateSchemaKey.generateSchemaKey({
|
|
230
|
+
variantKey,
|
|
231
|
+
variantValue: variantOption,
|
|
232
|
+
layer: layerKey,
|
|
233
|
+
subComponentName: subComponentKey
|
|
234
|
+
});
|
|
235
|
+
result.variables[schemaKey] = {};
|
|
236
|
+
for (const propertyKey in layer.properties) {
|
|
237
|
+
const property = layer.properties[propertyKey];
|
|
238
|
+
const variableObject = { [propertyKey]: {} };
|
|
239
|
+
if (property?.skipRestState !== true) variableObject[propertyKey] = { rest: {
|
|
240
|
+
type: findFixtureType(property, variantOption),
|
|
241
|
+
valueType: "alias",
|
|
242
|
+
value: property.defaults[variantOption]
|
|
243
|
+
} };
|
|
244
|
+
if (property.pseudoStates) for (const pseudoState of property.pseudoStates) variableObject[propertyKey][pseudoState] = {
|
|
245
|
+
type: findFixtureType(property, variantOption),
|
|
246
|
+
valueType: "alias",
|
|
247
|
+
value: property.defaults[variantOption]
|
|
248
|
+
};
|
|
249
|
+
result.variables[schemaKey] = {
|
|
250
|
+
...result.variables[schemaKey],
|
|
251
|
+
...variableObject
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return result;
|
|
259
|
+
}
|
|
260
|
+
function generateDefaultClassName(componentName, variantType, layerKey, subComponentName) {
|
|
261
|
+
return `uds-${componentName}${subComponentName ? `-${subComponentName.toLowerCase()}` : ""}-default-${variantType}-${layerKey}`;
|
|
262
|
+
}
|
|
263
|
+
function generateClassName({ componentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, subComponentName, stateKey, stateValue }) {
|
|
264
|
+
let className = "";
|
|
265
|
+
if (subComponentName) className = `uds-${(0, lodash_lowerCase_js.default)(componentName)}-${(0, lodash_lowerCase_js.default)(subComponentName)}-${(0, lodash_lowerCase_js.default)(variantKey)}`;
|
|
266
|
+
else className = `uds-${(0, lodash_lowerCase_js.default)(componentName)}-${(0, lodash_lowerCase_js.default)(variantKey)}`;
|
|
267
|
+
if (variantValue) className = `${className}-${(0, lodash_lowerCase_js.default)(variantValue)}`;
|
|
268
|
+
if (stateKey && stateValue) className = `${className}-${(0, lodash_lowerCase_js.default)(stateKey)}-${(0, lodash_lowerCase_js.default)(stateValue)}`;
|
|
269
|
+
className = `${className}-${(0, lodash_lowerCase_js.default)(layer)}`;
|
|
270
|
+
if (layerOptionalPseudoSelector) className = `${className}${layerOptionalPseudoSelector}`;
|
|
271
|
+
return className.replaceAll(/\s+/g, "-");
|
|
272
|
+
}
|
|
273
|
+
function generateDeclaration({ componentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, subComponentName, stateKey, stateValue, schema, propertyKey, originalPropertyDefinition, theme, currentStyles, previewOptions }) {
|
|
274
|
+
const schemaKey = require_tokens_automation_utils_generateSchemaKey.generateSchemaKey({
|
|
275
|
+
variantKey,
|
|
276
|
+
variantValue,
|
|
277
|
+
layer,
|
|
278
|
+
subComponentName,
|
|
279
|
+
stateKey,
|
|
280
|
+
stateValue
|
|
281
|
+
});
|
|
282
|
+
let className = generateClassName({
|
|
283
|
+
componentName,
|
|
284
|
+
variantKey,
|
|
285
|
+
variantValue,
|
|
286
|
+
layer,
|
|
287
|
+
subComponentName,
|
|
288
|
+
stateKey,
|
|
289
|
+
stateValue
|
|
290
|
+
});
|
|
291
|
+
const propertySelectedValueInSchema = schema.variables[schemaKey][propertyKey];
|
|
292
|
+
if (!propertySelectedValueInSchema) throw new Error(`Prop definition (${componentName} - ${schemaKey} - ${propertyKey}) not found, this is not expected, please report the bug to the UDS team`);
|
|
293
|
+
const styles = {};
|
|
294
|
+
for (const stateStr in propertySelectedValueInSchema) {
|
|
295
|
+
const state = stateStr;
|
|
296
|
+
const pseudo = statePseudoMap[state] ?? "";
|
|
297
|
+
const schemaValueForState = propertySelectedValueInSchema[state];
|
|
298
|
+
let fullClassName = ``;
|
|
299
|
+
if (layer === "root") if (stateKey && stateValue) {
|
|
300
|
+
const rootVariantClass = generateClassName({
|
|
301
|
+
componentName,
|
|
302
|
+
variantKey,
|
|
303
|
+
variantValue,
|
|
304
|
+
layer,
|
|
305
|
+
subComponentName
|
|
306
|
+
});
|
|
307
|
+
className = generateClassName({
|
|
308
|
+
componentName,
|
|
309
|
+
variantKey,
|
|
310
|
+
layer,
|
|
311
|
+
subComponentName,
|
|
312
|
+
stateKey,
|
|
313
|
+
stateValue
|
|
314
|
+
});
|
|
315
|
+
fullClassName = `.${rootVariantClass}${pseudo}.${className}`;
|
|
316
|
+
} else fullClassName = `.${className}${pseudo}`;
|
|
317
|
+
else {
|
|
318
|
+
const rootVariantClassName = generateClassName({
|
|
319
|
+
componentName,
|
|
320
|
+
variantKey,
|
|
321
|
+
variantValue,
|
|
322
|
+
layer: "root",
|
|
323
|
+
subComponentName
|
|
324
|
+
});
|
|
325
|
+
if (stateKey && stateValue) {
|
|
326
|
+
const rootVariantClassNameWithComponentState = generateClassName({
|
|
327
|
+
componentName,
|
|
328
|
+
variantKey,
|
|
329
|
+
layer: "root",
|
|
330
|
+
subComponentName,
|
|
331
|
+
stateKey,
|
|
332
|
+
stateValue
|
|
333
|
+
});
|
|
334
|
+
className = generateClassName({
|
|
335
|
+
componentName,
|
|
336
|
+
variantKey,
|
|
337
|
+
variantValue,
|
|
338
|
+
layer,
|
|
339
|
+
layerOptionalPseudoSelector,
|
|
340
|
+
subComponentName
|
|
341
|
+
});
|
|
342
|
+
fullClassName = `.${rootVariantClassName}${pseudo}.${rootVariantClassNameWithComponentState} .${className}`;
|
|
343
|
+
} else fullClassName = `.${rootVariantClassName}${pseudo} .${className}`;
|
|
344
|
+
}
|
|
345
|
+
const getTheCssPropertyValue = (schemaStateValue, propertyName, theme$1, existingValue) => {
|
|
346
|
+
const { value, type } = schemaStateValue;
|
|
347
|
+
const propertyConfig = require_tokens_automation_properties.configurableProperties[propertyName];
|
|
348
|
+
let newValue;
|
|
349
|
+
if (require_tokens_automation_properties.configurableProperties[propertyName].customValueRenderer) newValue = require_tokens_automation_properties.configurableProperties[propertyName].customValueRenderer(schemaStateValue, schema, theme$1);
|
|
350
|
+
else newValue = theme$1(require_tokens_automation_properties.configurableProperties[propertyName].twThemePath(type, String(value)));
|
|
351
|
+
if (propertyConfig.concatenate && existingValue) return `${existingValue}${propertyConfig.concatenationDelimiter || ", "}${newValue}`;
|
|
352
|
+
return newValue;
|
|
353
|
+
};
|
|
354
|
+
const { cssProperties, extendedProperties: extendedPropertiesGetter } = require_tokens_automation_properties.configurableProperties[originalPropertyDefinition.name];
|
|
355
|
+
const cssDeclarations = {};
|
|
356
|
+
const isExtendedPropertiesFunction = (0, lodash_isFunction_js.default)(extendedPropertiesGetter);
|
|
357
|
+
const extendedProperties = isExtendedPropertiesFunction ? extendedPropertiesGetter({
|
|
358
|
+
componentName,
|
|
359
|
+
subComponentName,
|
|
360
|
+
layer,
|
|
361
|
+
propertyKey
|
|
362
|
+
}) : extendedPropertiesGetter;
|
|
363
|
+
if (extendedProperties && extendedProperties.length) {
|
|
364
|
+
if (!isExtendedPropertiesFunction && (typeof cssProperties === "string" || Array.isArray(cssProperties) && cssProperties.length > 0)) throw new Error("Invalid configuration: cssProperties should not be configured when extendedProperties are defined. Please update your property configuration accordingly.");
|
|
365
|
+
for (const extendedProp of extendedProperties) {
|
|
366
|
+
const cssPropertiesRef = require_tokens_automation_properties.configurableProperties[extendedProp].cssProperties;
|
|
367
|
+
if (typeof cssPropertiesRef === "string") {
|
|
368
|
+
const existingValue = currentStyles?.[fullClassName]?.[cssPropertiesRef];
|
|
369
|
+
cssDeclarations[cssPropertiesRef] = getTheCssPropertyValue(schemaValueForState, extendedProp, theme, existingValue);
|
|
370
|
+
} else if (Array.isArray(cssPropertiesRef)) for (const cssProp of cssPropertiesRef) {
|
|
371
|
+
const existingValue = currentStyles?.[fullClassName]?.[cssProp];
|
|
372
|
+
cssDeclarations[cssProp] = getTheCssPropertyValue(schemaValueForState, extendedProp, theme, existingValue);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
} else if (typeof cssProperties === "string") {
|
|
376
|
+
const existingValue = currentStyles?.[fullClassName]?.[cssProperties];
|
|
377
|
+
cssDeclarations[cssProperties] = getTheCssPropertyValue(schemaValueForState, originalPropertyDefinition.name, theme, existingValue);
|
|
378
|
+
} else if (Array.isArray(cssProperties)) for (const cssProp of cssProperties) {
|
|
379
|
+
const existingValue = currentStyles?.[fullClassName]?.[cssProp];
|
|
380
|
+
cssDeclarations[cssProp] = getTheCssPropertyValue(schemaValueForState, originalPropertyDefinition.name, theme, existingValue);
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Button root layer workarounds & enhancements.
|
|
384
|
+
* These handle Motion animation bridges and visual fixes until better config-to-component solutions exist.
|
|
385
|
+
*/
|
|
386
|
+
if (componentName === "button" && layer === "root") {
|
|
387
|
+
if (propertyKey === CSS_GAP) cssDeclarations[require_tokens_consts_cssTokens.BUTTON_GAP_VAR] = cssDeclarations[CSS_GAP];
|
|
388
|
+
if (propertyKey === "scaleEffect" && !stateKey && state === "hover") {
|
|
389
|
+
const rootClassName = `.${className}`;
|
|
390
|
+
const renderValue = (schemaValue) => require_tokens_automation_properties.configurableProperties.scaleEffect.customValueRenderer?.(schemaValue, schema, () => "") ?? "1";
|
|
391
|
+
if (!styles[rootClassName]) styles[rootClassName] = {};
|
|
392
|
+
styles[rootClassName][require_tokens_consts_cssTokens.BUTTON_SCALE_EFFECT_REST] = "1";
|
|
393
|
+
if (propertySelectedValueInSchema.hover) styles[rootClassName][require_tokens_consts_cssTokens.BUTTON_SCALE_EFFECT_HOVER] = renderValue(propertySelectedValueInSchema.hover);
|
|
394
|
+
if (propertySelectedValueInSchema.pressed) styles[rootClassName][require_tokens_consts_cssTokens.BUTTON_SCALE_EFFECT_PRESSED] = renderValue(propertySelectedValueInSchema.pressed);
|
|
395
|
+
}
|
|
396
|
+
if (cssDeclarations[CSS_LINE_HEIGHT]) {
|
|
397
|
+
const iconLayerKey = require_tokens_automation_utils_generateSchemaKey.generateSchemaKey({
|
|
398
|
+
variantKey,
|
|
399
|
+
variantValue,
|
|
400
|
+
layer: "icon",
|
|
401
|
+
subComponentName
|
|
402
|
+
});
|
|
403
|
+
cssDeclarations[CSS_LINE_HEIGHT] = getButtonLineHeightWithIconMinimum({
|
|
404
|
+
lineHeight: cssDeclarations[CSS_LINE_HEIGHT],
|
|
405
|
+
schema,
|
|
406
|
+
iconLayerKey,
|
|
407
|
+
state,
|
|
408
|
+
theme
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
if (!styles[fullClassName]) styles[fullClassName] = {
|
|
413
|
+
...cssDeclarations,
|
|
414
|
+
...styles[fullClassName]
|
|
415
|
+
};
|
|
416
|
+
if (previewOptions?.generatePseudoStateClassModifier) {
|
|
417
|
+
const pseudoPrefixClass = statePseudoMapDocsMode[state] ?? "";
|
|
418
|
+
if (pseudoPrefixClass.length > 0 && stateStr !== "root") {
|
|
419
|
+
const importantCssDeclarations = Object.fromEntries(Object.entries(cssDeclarations).map(([prop, value]) => [prop, `${value} !important`]));
|
|
420
|
+
styles[`.${pseudoPrefixClass}${fullClassName}`.replace(pseudo, "")] = {
|
|
421
|
+
...importantCssDeclarations,
|
|
422
|
+
...styles[`.${pseudoPrefixClass}${fullClassName}`.replace(pseudo, "")]
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return styles;
|
|
428
|
+
}
|
|
429
|
+
function generateConfigStyles(config, schema, theme, previewOptions) {
|
|
430
|
+
function deepMerge(target, source) {
|
|
431
|
+
return (0, lodash_mergeWith_js.default)({}, target, source);
|
|
432
|
+
}
|
|
433
|
+
let componentName = config.label.toLowerCase();
|
|
434
|
+
if (config.overrideComponentName) componentName = config.overrideComponentName.toLowerCase();
|
|
435
|
+
let styles = {};
|
|
436
|
+
for (const variantKey in config.variants) {
|
|
437
|
+
const variantConfig = config.variants[variantKey];
|
|
438
|
+
for (const variantOption of variantConfig.options) if (require_tokens_automation_utils_variantConfigGuards.isVariantConfigWithComponentStates(variantConfig)) {
|
|
439
|
+
const componentStates = variantConfig.componentStates;
|
|
440
|
+
for (const componentStateKey in componentStates) {
|
|
441
|
+
const componentState = componentStates[componentStateKey];
|
|
442
|
+
for (const componentStateOption of componentState.options) for (const layerKey in componentState.layers) {
|
|
443
|
+
const layer = componentState.layers[layerKey];
|
|
444
|
+
for (const propertyKey in layer.properties) {
|
|
445
|
+
const originalPropertyDefinition = layer.properties[propertyKey];
|
|
446
|
+
const declarations = generateDeclaration({
|
|
447
|
+
componentName,
|
|
448
|
+
variantKey,
|
|
449
|
+
variantValue: variantOption,
|
|
450
|
+
stateKey: componentStateKey,
|
|
451
|
+
stateValue: componentStateOption,
|
|
452
|
+
layer: layerKey,
|
|
453
|
+
layerOptionalPseudoSelector: layer.pseudoSelector,
|
|
454
|
+
propertyKey,
|
|
455
|
+
originalPropertyDefinition,
|
|
456
|
+
theme,
|
|
457
|
+
schema,
|
|
458
|
+
currentStyles: styles,
|
|
459
|
+
previewOptions
|
|
460
|
+
});
|
|
461
|
+
styles = deepMerge(styles, declarations);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
} else if (require_tokens_automation_utils_variantConfigGuards.isVariantConfigWithProperties(variantConfig)) {
|
|
466
|
+
const layers = variantConfig.layers;
|
|
467
|
+
for (const layerKey in layers) {
|
|
468
|
+
const layer = layers[layerKey];
|
|
469
|
+
for (const propertyKey in layer.properties) {
|
|
470
|
+
const originalPropertyDefinition = layer.properties[propertyKey];
|
|
471
|
+
const declarations = generateDeclaration({
|
|
472
|
+
componentName,
|
|
473
|
+
variantKey,
|
|
474
|
+
variantValue: variantOption,
|
|
475
|
+
layer: layerKey,
|
|
476
|
+
layerOptionalPseudoSelector: layer.pseudoSelector,
|
|
477
|
+
propertyKey,
|
|
478
|
+
originalPropertyDefinition,
|
|
479
|
+
theme,
|
|
480
|
+
schema,
|
|
481
|
+
currentStyles: styles,
|
|
482
|
+
previewOptions
|
|
483
|
+
});
|
|
484
|
+
styles = deepMerge(styles, declarations);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
if (config.subComponents) {
|
|
490
|
+
const { subComponents } = config;
|
|
491
|
+
for (const subComponentKey in subComponents) for (const variantKey in subComponents[subComponentKey].variants) {
|
|
492
|
+
const variantConfig = subComponents[subComponentKey].variants[variantKey];
|
|
493
|
+
for (const variantOption of variantConfig.options) if (require_tokens_automation_utils_variantConfigGuards.isVariantConfigWithComponentStates(variantConfig)) {
|
|
494
|
+
const componentStates = variantConfig.componentStates;
|
|
495
|
+
for (const componentStateKey in componentStates) {
|
|
496
|
+
const componentState = componentStates[componentStateKey];
|
|
497
|
+
for (const componentStateOption of componentState.options) for (const layerKey in componentState.layers) {
|
|
498
|
+
const layer = componentState.layers[layerKey];
|
|
499
|
+
for (const propertyKey in layer.properties) {
|
|
500
|
+
const originalPropertyDefinition = layer.properties[propertyKey];
|
|
501
|
+
const declarations = generateDeclaration({
|
|
502
|
+
componentName,
|
|
503
|
+
variantKey,
|
|
504
|
+
variantValue: variantOption,
|
|
505
|
+
stateKey: componentStateKey,
|
|
506
|
+
stateValue: componentStateOption,
|
|
507
|
+
subComponentName: subComponentKey,
|
|
508
|
+
layer: layerKey,
|
|
509
|
+
layerOptionalPseudoSelector: layer.pseudoSelector,
|
|
510
|
+
propertyKey,
|
|
511
|
+
originalPropertyDefinition,
|
|
512
|
+
theme,
|
|
513
|
+
schema,
|
|
514
|
+
currentStyles: styles,
|
|
515
|
+
previewOptions
|
|
516
|
+
});
|
|
517
|
+
styles = deepMerge(styles, declarations);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
} else if (require_tokens_automation_utils_variantConfigGuards.isVariantConfigWithProperties(variantConfig)) {
|
|
522
|
+
const layers = variantConfig.layers;
|
|
523
|
+
for (const layerKey in layers) {
|
|
524
|
+
const layer = layers[layerKey];
|
|
525
|
+
for (const propertyKey in layer.properties) {
|
|
526
|
+
const originalPropertyDefinition = layer.properties[propertyKey];
|
|
527
|
+
const declarations = generateDeclaration({
|
|
528
|
+
componentName,
|
|
529
|
+
subComponentName: subComponentKey,
|
|
530
|
+
variantKey,
|
|
531
|
+
variantValue: variantOption,
|
|
532
|
+
layer: layerKey,
|
|
533
|
+
layerOptionalPseudoSelector: layer.pseudoSelector,
|
|
534
|
+
propertyKey,
|
|
535
|
+
originalPropertyDefinition,
|
|
536
|
+
theme,
|
|
537
|
+
schema,
|
|
538
|
+
currentStyles: styles,
|
|
539
|
+
previewOptions
|
|
540
|
+
});
|
|
541
|
+
styles = deepMerge(styles, declarations);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Post-process button/iconbutton styles to force box-shadow for borders.
|
|
549
|
+
* This runs AFTER all properties have been processed and merged.
|
|
550
|
+
*/
|
|
551
|
+
if (componentName === "button" || componentName === "iconbutton") {
|
|
552
|
+
for (const className in styles) if (className.includes("-root")) styles[className] = applyBoxShadowBorder(styles[className]);
|
|
553
|
+
}
|
|
554
|
+
return styles;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* @param config - Component configuration (Button, IconButton, etc.)
|
|
558
|
+
* @param schema - Production schema with defaults and variables
|
|
559
|
+
* @param theme - Tailwind theme function to resolve design tokens
|
|
560
|
+
* @param previewOptions - Options for generating preview mode class modifiers
|
|
561
|
+
* @returns CSS styles object with grouped selectors for default aliases
|
|
562
|
+
*/
|
|
563
|
+
const generateStyles = (config, schema, theme, previewOptions) => {
|
|
564
|
+
const styles = generateConfigStyles(config, schema, theme, previewOptions);
|
|
565
|
+
if (!config.variants && !config.subComponents) return styles;
|
|
566
|
+
const componentName = config.overrideComponentName?.toLowerCase() || config.label.toLowerCase();
|
|
567
|
+
if (componentName !== "button" && componentName !== "iconbutton") return styles;
|
|
568
|
+
const replacementMap = /* @__PURE__ */ new Map();
|
|
569
|
+
/**
|
|
570
|
+
* Helper: Extract all layer keys from a variant configuration
|
|
571
|
+
* Handles both simple variants (with direct layers) and variants with component states
|
|
572
|
+
*/
|
|
573
|
+
const getLayerKeys = (variantConfig) => {
|
|
574
|
+
if (require_tokens_automation_utils_variantConfigGuards.isVariantConfigWithProperties(variantConfig)) return Object.keys(variantConfig.layers);
|
|
575
|
+
else if (require_tokens_automation_utils_variantConfigGuards.isVariantConfigWithComponentStates(variantConfig)) {
|
|
576
|
+
const layerKeysSet = /* @__PURE__ */ new Set();
|
|
577
|
+
for (const componentStateConfig of Object.values(variantConfig.componentStates)) Object.keys(componentStateConfig.layers).forEach((key) => layerKeysSet.add(key));
|
|
578
|
+
return Array.from(layerKeysSet);
|
|
579
|
+
}
|
|
580
|
+
return [];
|
|
581
|
+
};
|
|
582
|
+
/**
|
|
583
|
+
* Helper: Build replacement map for default variant values
|
|
584
|
+
* For each default variant + layer combination, creates an entry like:
|
|
585
|
+
* "uds-button-size-sm-root" → ".uds-button-size-sm-root, .uds-button-default-size-root"
|
|
586
|
+
*/
|
|
587
|
+
const buildReplacements = (variants, subComponentName) => {
|
|
588
|
+
for (const [variantType, variantConfig] of Object.entries(variants)) {
|
|
589
|
+
if (!require_tokens_automation_utils_variantConfigGuards.isVariantConfigWithProperties(variantConfig) && !require_tokens_automation_utils_variantConfigGuards.isVariantConfigWithComponentStates(variantConfig)) continue;
|
|
590
|
+
const layerKeys = getLayerKeys(variantConfig);
|
|
591
|
+
if (layerKeys.length) {
|
|
592
|
+
const defaultValue = schema.defaults?.[variantType];
|
|
593
|
+
if (defaultValue) for (const layerKey of layerKeys) {
|
|
594
|
+
const baseClass = generateClassName({
|
|
595
|
+
componentName,
|
|
596
|
+
variantKey: variantType,
|
|
597
|
+
variantValue: defaultValue,
|
|
598
|
+
layer: layerKey,
|
|
599
|
+
subComponentName
|
|
600
|
+
});
|
|
601
|
+
const defaultClass = generateDefaultClassName(componentName, variantType, layerKey, subComponentName);
|
|
602
|
+
replacementMap.set(baseClass, `.${baseClass}, .${defaultClass}`);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
};
|
|
607
|
+
if (config.variants) buildReplacements(config.variants);
|
|
608
|
+
if (config.subComponents) for (const [subComponentName, subComponentConfig] of Object.entries(config.subComponents)) buildReplacements(subComponentConfig.variants, subComponentName);
|
|
609
|
+
const finalStyles = {};
|
|
610
|
+
for (const [selector, declarations] of Object.entries(styles)) {
|
|
611
|
+
let defaultsSelector = selector;
|
|
612
|
+
let hasMatch = false;
|
|
613
|
+
for (const [defaultVariantClass, replacement] of replacementMap.entries()) if (selector.includes(defaultVariantClass)) {
|
|
614
|
+
hasMatch = true;
|
|
615
|
+
const defaultMatch = replacement.match(/,\s*\.([a-z0-9-]+)/);
|
|
616
|
+
if (defaultMatch) {
|
|
617
|
+
const defaultClass = defaultMatch[1];
|
|
618
|
+
defaultsSelector = defaultsSelector.replaceAll(defaultVariantClass, defaultClass);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
if (!hasMatch) {
|
|
622
|
+
finalStyles[selector] = declarations;
|
|
623
|
+
continue;
|
|
624
|
+
}
|
|
625
|
+
finalStyles[`${selector}, ${defaultsSelector}`] = declarations;
|
|
626
|
+
}
|
|
627
|
+
return finalStyles;
|
|
628
|
+
};
|
|
629
|
+
function createConfigurableProperty(prop) {
|
|
630
|
+
return prop;
|
|
631
|
+
}
|
|
632
|
+
function createVariantConfig(config) {
|
|
633
|
+
return config;
|
|
634
|
+
}
|
|
635
|
+
function createVariantConfigWithProperties(config) {
|
|
636
|
+
return config;
|
|
637
|
+
}
|
|
638
|
+
function createVariantConfigWithComponentStates(config) {
|
|
639
|
+
return config;
|
|
640
|
+
}
|
|
641
|
+
function createComponentStates(config) {
|
|
642
|
+
return config;
|
|
643
|
+
}
|
|
644
|
+
function createLayerConfig(config) {
|
|
645
|
+
return config;
|
|
646
|
+
}
|
|
647
|
+
function createSubComponentConfig(config) {
|
|
648
|
+
return config;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
//#endregion
|
|
652
|
+
exports.cartesianProduct = require_tokens_automation_utils_cartesianProduct.cartesianProduct;
|
|
653
|
+
exports.coalesceConfigVariant = require_tokens_automation_utils_coalesceConfigVariant.coalesceConfigVariant;
|
|
654
|
+
exports.createComponentStates = createComponentStates;
|
|
655
|
+
exports.createConfigurableProperty = createConfigurableProperty;
|
|
656
|
+
exports.createLayerConfig = createLayerConfig;
|
|
657
|
+
exports.createSubComponentConfig = createSubComponentConfig;
|
|
658
|
+
exports.createVariantConfig = createVariantConfig;
|
|
659
|
+
exports.createVariantConfigWithComponentStates = createVariantConfigWithComponentStates;
|
|
660
|
+
exports.createVariantConfigWithProperties = createVariantConfigWithProperties;
|
|
661
|
+
exports.findFixtureType = findFixtureType;
|
|
662
|
+
exports.generateClassName = generateClassName;
|
|
663
|
+
exports.generateConfigStyles = generateConfigStyles;
|
|
664
|
+
exports.generateDeclaration = generateDeclaration;
|
|
665
|
+
exports.generateDefaultClassName = generateDefaultClassName;
|
|
666
|
+
exports.generateKeyFromFlatConfigPath = require_tokens_automation_utils_generateKeyFromFlatConfigPath.generateKeyFromFlatConfigPath;
|
|
667
|
+
exports.generateSchemaKey = require_tokens_automation_utils_generateSchemaKey.generateSchemaKey;
|
|
668
|
+
exports.generateStyles = generateStyles;
|
|
669
|
+
exports.getConfigDefaultValue = require_tokens_automation_utils_defaults.getConfigDefaultValue;
|
|
670
|
+
exports.getConfigPseudoStateVariables = require_tokens_automation_utils_variableData.getConfigPseudoStateVariables;
|
|
671
|
+
exports.getConfigPseudoStateVariablesWithSetter = require_tokens_automation_utils_variableData.getConfigPseudoStateVariablesWithSetter;
|
|
672
|
+
exports.getConfigSubcomponents = require_tokens_automation_utils_subcomponents.getConfigSubcomponents;
|
|
673
|
+
exports.getConfigVariantComponentStates = require_tokens_automation_utils_getConfigVariantComponentStatesMatrix.getConfigVariantComponentStates;
|
|
674
|
+
exports.getConfigVariantComponentStatesMatrix = require_tokens_automation_utils_getConfigVariantComponentStatesMatrix.getConfigVariantComponentStatesMatrix;
|
|
675
|
+
exports.getConfigVariantProperties = require_tokens_automation_utils_getConfigVariantProperties.getConfigVariantProperties;
|
|
676
|
+
exports.getConfigVariantPseudoStates = require_tokens_automation_utils_getConfigVariantPseudoStates.getConfigVariantPseudoStates;
|
|
677
|
+
exports.getConfigVariants = require_tokens_automation_utils_getConfigVariants.getConfigVariants;
|
|
678
|
+
exports.isConfigDefaultValue = require_tokens_automation_utils_defaults.isConfigDefaultValue;
|
|
679
|
+
exports.setConfigPseudoStateVariable = require_tokens_automation_utils_variableData.setConfigPseudoStateVariable;
|
|
680
|
+
exports.statePseudoMapDocsMode = statePseudoMapDocsMode;
|
|
681
|
+
exports.toMinimalDbConfigObject = toMinimalDbConfigObject;
|