@yahoo/uds 3.66.0 → 3.67.0-beta.1
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 +14 -24
- 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-DwoY1xsp.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-XywV25nD.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 +30 -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 +51 -46
- package/cli/FlattenButtonVariant.mock.tsx +0 -17
- package/dist/Text-D9E-Ivs4.d.cts +0 -324
- package/dist/Text-D9E-Ivs4.d.ts +0 -324
- package/dist/Text-DRla3SiI.d.ts +0 -88
- package/dist/Text-PCg-YzOz.d.cts +0 -88
- package/dist/VStack-BH_tBQAO.d.cts +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-6PEIP4LR.cjs +0 -1
- package/dist/chunk-6V7QEDMR.js +0 -2
- package/dist/chunk-B2TS37PH.cjs +0 -1
- 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-IOYNZUNZ.js +0 -2
- package/dist/chunk-IPJKEKXB.cjs +0 -2
- package/dist/chunk-LYHJT3E5.js +0 -2
- package/dist/chunk-NJH5V24C.cjs +0 -1
- package/dist/chunk-O4OSO3V4.cjs +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-QLXJH36U.cjs +0 -1
- package/dist/chunk-R7SUOHEQ.js +0 -1
- package/dist/chunk-VX5NJRUI.js +0 -2
- package/dist/chunk-WR3CRR6L.js +0 -2
- 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 -2
- 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-BrIj1pmg.d.ts +0 -251
- package/dist/index-DUswrIxa.d.cts +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
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
|
3
|
+
import { BUTTON_GAP_VAR, BUTTON_SCALE_EFFECT_HOVER, BUTTON_SCALE_EFFECT_PRESSED, BUTTON_SCALE_EFFECT_REST } from "../../tokens/consts/cssTokens.js";
|
|
4
|
+
import { cx, getStyles } from "../../styles/styler.js";
|
|
5
|
+
import { createSlot } from "../../utils/createSlot.js";
|
|
6
|
+
import { Icon } from "../Icon.js";
|
|
7
|
+
import { IconSlot } from "../IconSlot.js";
|
|
8
|
+
import { generateDefaultClassName } from "../../tokens/automation/utils/index.js";
|
|
9
|
+
import { SpringMotionConfig } from "./SpringMotionConfig.js";
|
|
10
|
+
import React, { cloneElement, forwardRef, isValidElement, useImperativeHandle, useMemo, useRef } from "react";
|
|
11
|
+
import { buttonIconSvgSize } from "@yahoo/uds/fixtures";
|
|
12
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Progress } from "@yahoo/uds-icons";
|
|
14
|
+
import { AnimatePresence, m, useReducedMotion } from "motion/react";
|
|
15
|
+
|
|
16
|
+
//#region src/components/client/Button.tsx
|
|
17
|
+
const iconContainerMotionVariants = {
|
|
18
|
+
hide: {
|
|
19
|
+
display: "none",
|
|
20
|
+
width: "0px",
|
|
21
|
+
opacity: 0
|
|
22
|
+
},
|
|
23
|
+
loading: {
|
|
24
|
+
display: "flex",
|
|
25
|
+
width: "auto",
|
|
26
|
+
opacity: 1
|
|
27
|
+
},
|
|
28
|
+
icon: {
|
|
29
|
+
display: "flex",
|
|
30
|
+
width: "auto",
|
|
31
|
+
opacity: 1
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const SCALE_DOWN = .7;
|
|
35
|
+
const hiddenState = {
|
|
36
|
+
scale: SCALE_DOWN,
|
|
37
|
+
opacity: 0
|
|
38
|
+
};
|
|
39
|
+
const visibleState = {
|
|
40
|
+
scale: [
|
|
41
|
+
SCALE_DOWN,
|
|
42
|
+
SCALE_DOWN,
|
|
43
|
+
1
|
|
44
|
+
],
|
|
45
|
+
opacity: [
|
|
46
|
+
0,
|
|
47
|
+
0,
|
|
48
|
+
1
|
|
49
|
+
],
|
|
50
|
+
transition: { times: [
|
|
51
|
+
0,
|
|
52
|
+
.5,
|
|
53
|
+
1
|
|
54
|
+
] }
|
|
55
|
+
};
|
|
56
|
+
const iconMotionVariants = {
|
|
57
|
+
hide: hiddenState,
|
|
58
|
+
icon: visibleState,
|
|
59
|
+
loading: hiddenState
|
|
60
|
+
};
|
|
61
|
+
const loadingMotionVariants = {
|
|
62
|
+
hide: hiddenState,
|
|
63
|
+
icon: hiddenState,
|
|
64
|
+
loading: visibleState
|
|
65
|
+
};
|
|
66
|
+
function getGapVariant({ startIcon, endIcon, loading }) {
|
|
67
|
+
if (loading || startIcon || endIcon) return "withIcon";
|
|
68
|
+
return "withoutIcon";
|
|
69
|
+
}
|
|
70
|
+
function getStartVariant({ loading, startIcon }) {
|
|
71
|
+
if (loading) return "loading";
|
|
72
|
+
if (startIcon) return "icon";
|
|
73
|
+
return "hide";
|
|
74
|
+
}
|
|
75
|
+
const defaultVariantRootClass = generateDefaultClassName("button", "variant", "root");
|
|
76
|
+
const defaultVariantIconClass = generateDefaultClassName("button", "variant", "icon");
|
|
77
|
+
const defaultSizeRootClass = generateDefaultClassName("button", "size", "root");
|
|
78
|
+
const defaultSizeIconClass = generateDefaultClassName("button", "size", "icon");
|
|
79
|
+
/**
|
|
80
|
+
* **🖲️ A button element that can be used to trigger an action**
|
|
81
|
+
*
|
|
82
|
+
* @componentType Client component
|
|
83
|
+
*
|
|
84
|
+
* @description A button is a fundamental component used to trigger an action or event. Buttons are interactive elements that users can click, tap, or otherwise engage with to submit forms, open dialogues, or perform any other interaction within an application or website. Consider an IconButton for buttons that only contain an icon.
|
|
85
|
+
*
|
|
86
|
+
* @see The {@link https://uds.build/docs/components/button Button Docs} for more info
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```tsx
|
|
90
|
+
* 'use client';
|
|
91
|
+
* import { Button, HStack } from "@yahoo/uds";
|
|
92
|
+
*
|
|
93
|
+
* export function Demo() {
|
|
94
|
+
* return (
|
|
95
|
+
* <HStack gap="2">
|
|
96
|
+
* <Button onClick={console.log}>Save</Button>
|
|
97
|
+
* <Button variant="secondary" onClick={console.log}>Cancel</Button>
|
|
98
|
+
* </HStack>
|
|
99
|
+
* )
|
|
100
|
+
* }
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* @usage
|
|
104
|
+
* Buttons should be used to clearly indicate and initiate actions that users can take.
|
|
105
|
+
*
|
|
106
|
+
* @related [Icon](https://uds.build/docs/components/icon), [IconButton](https://uds.build/docs/components/icon-button), [Pressable](https://uds.build/docs/components/pressable)
|
|
107
|
+
**/
|
|
108
|
+
const Button = forwardRef(function Button$1({ size, variant, startIcon, endIcon, iconVariant, loading, disableEffects, children, asChild = false, type = "button", className, width, ...rest }, forwardedRef) {
|
|
109
|
+
const ref = useRef(null);
|
|
110
|
+
useImperativeHandle(forwardedRef, () => ref.current);
|
|
111
|
+
const prefersReducedMotion = useReducedMotion();
|
|
112
|
+
const disableMotion = !!disableEffects || !!rest?.disabled;
|
|
113
|
+
const layoutVariant = prefersReducedMotion ? "smooth" : "subtle";
|
|
114
|
+
const endVariant = endIcon ? "icon" : "hide";
|
|
115
|
+
const gapVariant = getGapVariant({
|
|
116
|
+
startIcon,
|
|
117
|
+
endIcon,
|
|
118
|
+
loading
|
|
119
|
+
});
|
|
120
|
+
const startVariant = getStartVariant({
|
|
121
|
+
loading,
|
|
122
|
+
startIcon
|
|
123
|
+
});
|
|
124
|
+
const Slot = useMemo(() => createSlot(), []);
|
|
125
|
+
const MotionSlot = useMemo(() => m.create(Slot), [Slot]);
|
|
126
|
+
const buttonVariants = useMemo(() => ({
|
|
127
|
+
rest: { scale: disableMotion ? 1 : `var(${BUTTON_SCALE_EFFECT_REST})` },
|
|
128
|
+
hover: { scale: disableMotion ? 1 : `var(${BUTTON_SCALE_EFFECT_HOVER})` },
|
|
129
|
+
pressed: { scale: disableMotion ? 1 : `var(${BUTTON_SCALE_EFFECT_PRESSED})` },
|
|
130
|
+
withIcon: { columnGap: `var(${BUTTON_GAP_VAR})` },
|
|
131
|
+
withoutIcon: { columnGap: "0px" }
|
|
132
|
+
}), [disableMotion]);
|
|
133
|
+
const rootSizeClass = useMemo(() => size ? getStyles({ buttonSizeRoot: size }) : defaultSizeRootClass, [size]);
|
|
134
|
+
const rootVariantClass = useMemo(() => variant ? getStyles({ buttonVariantRoot: variant }) : defaultVariantRootClass, [variant]);
|
|
135
|
+
const iconSizeClass = useMemo(() => size ? getStyles({ buttonSizeIcon: size }) : defaultSizeIconClass, [size]);
|
|
136
|
+
const iconVariantClass = useMemo(() => variant ? getStyles({ buttonVariantIcon: variant }) : defaultVariantIconClass, [variant]);
|
|
137
|
+
const styles = useMemo(() => ({
|
|
138
|
+
root: getStyles({
|
|
139
|
+
width,
|
|
140
|
+
className: cx([
|
|
141
|
+
"uds-ring",
|
|
142
|
+
"uds-hit-target",
|
|
143
|
+
"inline-flex overflow-hidden justify-center items-center whitespace-nowrap select-none",
|
|
144
|
+
"[transform-origin:center]",
|
|
145
|
+
"[backface-visibility:hidden]",
|
|
146
|
+
"[transition-property:color,background-color,border-color,box-shadow,text-decoration-color,fill,stroke]",
|
|
147
|
+
"[transition-timing-function:cubic-bezier(0,0,0.2,1)]",
|
|
148
|
+
"[transition-duration:220ms]",
|
|
149
|
+
rootSizeClass,
|
|
150
|
+
rootVariantClass,
|
|
151
|
+
rest?.disabled && "cursor-not-allowed",
|
|
152
|
+
loading && "uds-button-loading",
|
|
153
|
+
disableEffects && "uds-button-without-effects",
|
|
154
|
+
gapVariant === "withIcon" && "uds-button-with-gap",
|
|
155
|
+
className
|
|
156
|
+
])
|
|
157
|
+
}),
|
|
158
|
+
iconContainer: "flex overflow-clip uds-button-icon-container",
|
|
159
|
+
icon: getStyles({ className: cx([iconSizeClass, iconVariantClass]) }),
|
|
160
|
+
loadingIcon: getStyles({ className: cx([
|
|
161
|
+
"animate-spin",
|
|
162
|
+
iconSizeClass,
|
|
163
|
+
iconVariantClass
|
|
164
|
+
]) }),
|
|
165
|
+
content: cx(["truncate"])
|
|
166
|
+
}), [
|
|
167
|
+
className,
|
|
168
|
+
disableEffects,
|
|
169
|
+
gapVariant,
|
|
170
|
+
iconSizeClass,
|
|
171
|
+
iconVariantClass,
|
|
172
|
+
loading,
|
|
173
|
+
rest?.disabled,
|
|
174
|
+
rootSizeClass,
|
|
175
|
+
rootVariantClass,
|
|
176
|
+
width
|
|
177
|
+
]);
|
|
178
|
+
const startContent = useMemo(() => /* @__PURE__ */ jsx(m.span, {
|
|
179
|
+
className: styles.iconContainer,
|
|
180
|
+
initial: false,
|
|
181
|
+
variants: iconContainerMotionVariants,
|
|
182
|
+
animate: startVariant,
|
|
183
|
+
children: /* @__PURE__ */ jsxs(AnimatePresence, {
|
|
184
|
+
initial: false,
|
|
185
|
+
mode: "popLayout",
|
|
186
|
+
children: [loading && /* @__PURE__ */ jsx(m.span, {
|
|
187
|
+
variants: loadingMotionVariants,
|
|
188
|
+
initial: "hide",
|
|
189
|
+
animate: "loading",
|
|
190
|
+
exit: "hide",
|
|
191
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
192
|
+
className: styles.loadingIcon,
|
|
193
|
+
size: buttonIconSvgSize,
|
|
194
|
+
name: Progress,
|
|
195
|
+
variant: iconVariant,
|
|
196
|
+
color: "current"
|
|
197
|
+
})
|
|
198
|
+
}, "loading"), startIcon && !loading && /* @__PURE__ */ jsx(m.span, {
|
|
199
|
+
variants: iconMotionVariants,
|
|
200
|
+
initial: "hide",
|
|
201
|
+
animate: "icon",
|
|
202
|
+
exit: "hide",
|
|
203
|
+
children: /* @__PURE__ */ jsx(IconSlot, {
|
|
204
|
+
className: styles.icon,
|
|
205
|
+
icon: startIcon,
|
|
206
|
+
iconProps: {
|
|
207
|
+
size: buttonIconSvgSize,
|
|
208
|
+
variant: iconVariant,
|
|
209
|
+
color: "current"
|
|
210
|
+
}
|
|
211
|
+
})
|
|
212
|
+
})]
|
|
213
|
+
})
|
|
214
|
+
}), [
|
|
215
|
+
styles,
|
|
216
|
+
iconVariant,
|
|
217
|
+
loading,
|
|
218
|
+
startIcon,
|
|
219
|
+
startVariant
|
|
220
|
+
]);
|
|
221
|
+
const endContent = useMemo(() => /* @__PURE__ */ jsx(m.span, {
|
|
222
|
+
className: styles.iconContainer,
|
|
223
|
+
initial: false,
|
|
224
|
+
variants: iconContainerMotionVariants,
|
|
225
|
+
animate: endVariant,
|
|
226
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, {
|
|
227
|
+
initial: false,
|
|
228
|
+
mode: "popLayout",
|
|
229
|
+
children: endIcon && /* @__PURE__ */ jsx(m.span, {
|
|
230
|
+
variants: iconMotionVariants,
|
|
231
|
+
initial: "hide",
|
|
232
|
+
animate: "icon",
|
|
233
|
+
exit: "hide",
|
|
234
|
+
children: /* @__PURE__ */ jsx(IconSlot, {
|
|
235
|
+
className: styles.icon,
|
|
236
|
+
icon: endIcon,
|
|
237
|
+
iconProps: {
|
|
238
|
+
size: buttonIconSvgSize,
|
|
239
|
+
variant: iconVariant,
|
|
240
|
+
color: "current"
|
|
241
|
+
}
|
|
242
|
+
})
|
|
243
|
+
})
|
|
244
|
+
})
|
|
245
|
+
}), [
|
|
246
|
+
endIcon,
|
|
247
|
+
styles,
|
|
248
|
+
iconVariant,
|
|
249
|
+
endVariant
|
|
250
|
+
]);
|
|
251
|
+
if (asChild && isValidElement(children)) return /* @__PURE__ */ jsx(SpringMotionConfig, {
|
|
252
|
+
layoutSpeed: "3",
|
|
253
|
+
layoutVariant,
|
|
254
|
+
children: /* @__PURE__ */ jsx(MotionSlot, {
|
|
255
|
+
type,
|
|
256
|
+
className: styles.root,
|
|
257
|
+
initial: ["rest", gapVariant],
|
|
258
|
+
animate: [
|
|
259
|
+
"hide",
|
|
260
|
+
"rest",
|
|
261
|
+
gapVariant
|
|
262
|
+
],
|
|
263
|
+
variants: buttonVariants,
|
|
264
|
+
whileHover: "hover",
|
|
265
|
+
whileTap: "pressed",
|
|
266
|
+
...rest,
|
|
267
|
+
children: cloneElement(children, children.props, /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
268
|
+
startContent,
|
|
269
|
+
/* @__PURE__ */ jsx("span", {
|
|
270
|
+
className: styles.content,
|
|
271
|
+
children: children.props.children
|
|
272
|
+
}),
|
|
273
|
+
endContent
|
|
274
|
+
] }))
|
|
275
|
+
})
|
|
276
|
+
});
|
|
277
|
+
return /* @__PURE__ */ jsx(SpringMotionConfig, {
|
|
278
|
+
layoutSpeed: "3",
|
|
279
|
+
layoutVariant,
|
|
280
|
+
children: /* @__PURE__ */ jsxs(m.button, {
|
|
281
|
+
ref,
|
|
282
|
+
type,
|
|
283
|
+
className: styles.root,
|
|
284
|
+
initial: ["rest", gapVariant],
|
|
285
|
+
animate: [
|
|
286
|
+
"hide",
|
|
287
|
+
"rest",
|
|
288
|
+
gapVariant
|
|
289
|
+
],
|
|
290
|
+
variants: buttonVariants,
|
|
291
|
+
whileHover: "hover",
|
|
292
|
+
whileTap: "pressed",
|
|
293
|
+
...rest,
|
|
294
|
+
children: [
|
|
295
|
+
startContent,
|
|
296
|
+
/* @__PURE__ */ jsx("span", {
|
|
297
|
+
className: styles.content,
|
|
298
|
+
children
|
|
299
|
+
}),
|
|
300
|
+
endContent
|
|
301
|
+
]
|
|
302
|
+
})
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
Button.displayName = "Button";
|
|
306
|
+
|
|
307
|
+
//#endregion
|
|
308
|
+
export { Button, iconMotionVariants, loadingMotionVariants };
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
|
3
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
4
|
+
const require_styles_styler = require('../../styles/styler.cjs');
|
|
5
|
+
const require_components_Box = require('../Box.cjs');
|
|
6
|
+
const require_components_FormLabel = require('../FormLabel.cjs');
|
|
7
|
+
const require_components_Icon = require('../Icon.cjs');
|
|
8
|
+
const require_components_client_SpringMotionConfig = require('./SpringMotionConfig.cjs');
|
|
9
|
+
let react = require("react");
|
|
10
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
11
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
12
|
+
let __yahoo_uds_icons = require("@yahoo/uds-icons");
|
|
13
|
+
let motion_react = require("motion/react");
|
|
14
|
+
|
|
15
|
+
//#region src/components/client/Checkbox.tsx
|
|
16
|
+
const VARIANTS = ["primary", "secondary"];
|
|
17
|
+
const SIZES = ["sm", "md"];
|
|
18
|
+
const VARIANT_ERROR_MAP = {
|
|
19
|
+
primary: "alert",
|
|
20
|
+
secondary: "alert-secondary"
|
|
21
|
+
};
|
|
22
|
+
const isIndeterminate = (checked) => checked === "indeterminate";
|
|
23
|
+
const getIcon = (checked) => {
|
|
24
|
+
if (isIndeterminate(checked)) return __yahoo_uds_icons.Minus;
|
|
25
|
+
return __yahoo_uds_icons.Check;
|
|
26
|
+
};
|
|
27
|
+
const MotionBox = motion_react.m.create(require_components_Box.Box);
|
|
28
|
+
const hoverTransition = {
|
|
29
|
+
layoutVariant: "smooth",
|
|
30
|
+
layoutSpeed: "3"
|
|
31
|
+
};
|
|
32
|
+
const pressTransition = {
|
|
33
|
+
layoutVariant: "veryBouncy",
|
|
34
|
+
layoutSpeed: "4"
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* **⚙️️ An checkbox.
|
|
38
|
+
*
|
|
39
|
+
* @componentType Client component
|
|
40
|
+
*
|
|
41
|
+
* @description
|
|
42
|
+
* A checkbox component allows users to select one or multiple options from a set. It represents a binary state, typically as checked or unchecked, and optionally includes a third "indeterminate" state to indicate partial selection.
|
|
43
|
+
*
|
|
44
|
+
* @see
|
|
45
|
+
* Check out the {@link https://uds.build/docs/components/checkbox Checkbox Docs} for more info
|
|
46
|
+
*
|
|
47
|
+
* @usage
|
|
48
|
+
* - Forms: checkbox
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```tsx
|
|
52
|
+
* 'use client';
|
|
53
|
+
* import { Checkbox } from "@yahoo/uds";
|
|
54
|
+
*
|
|
55
|
+
* <Checkbox label="Name" required />
|
|
56
|
+
*```
|
|
57
|
+
*
|
|
58
|
+
* @related [Radio](https://uds.build/docs/components/radio), [Switch](https://uds.build/docs/components/switch), [Input](https://uds.build/docs/components/input).
|
|
59
|
+
**/
|
|
60
|
+
const Checkbox = (0, react.forwardRef)(function Checkbox$1({ id, checked: checkedProp, defaultChecked, onChange, label, labelPosition = "start", variant: variantProp = "primary", size = "md", reduceMotion: forceReduceMotion, disabled, required, hasError, className, layerClassNames, ...checkboxProps }, parentRef) {
|
|
61
|
+
const generatedId = (0, react.useId)();
|
|
62
|
+
const uid = id ?? `uds-input-${generatedId}`;
|
|
63
|
+
const innerRef = (0, react.useRef)(null);
|
|
64
|
+
/**
|
|
65
|
+
* State
|
|
66
|
+
*/
|
|
67
|
+
const isControlled = checkedProp !== void 0;
|
|
68
|
+
const [checked, setChecked] = (0, react.useState)(isControlled ? checkedProp : defaultChecked);
|
|
69
|
+
const [isHovered, setIsHovered] = (0, react.useState)(false);
|
|
70
|
+
const [isPressed, setIsPressed] = (0, react.useState)(false);
|
|
71
|
+
/**
|
|
72
|
+
* Derived values
|
|
73
|
+
*/
|
|
74
|
+
const variant = (0, react.useMemo)(() => hasError ? VARIANT_ERROR_MAP[variantProp] : variantProp, [hasError, variantProp]);
|
|
75
|
+
const showHoverEffect = !disabled && isHovered;
|
|
76
|
+
const showPressedEffect = !disabled && isPressed;
|
|
77
|
+
const scale = (0, react.useMemo)(() => {
|
|
78
|
+
if (showPressedEffect) return .9;
|
|
79
|
+
if (showHoverEffect) return 1.1;
|
|
80
|
+
return 1;
|
|
81
|
+
}, [showPressedEffect, showHoverEffect]);
|
|
82
|
+
const checkOpacity = (0, react.useMemo)(() => {
|
|
83
|
+
if (!checked) return "opacity-0";
|
|
84
|
+
if (showPressedEffect) return "opacity-55";
|
|
85
|
+
return "opacity-100";
|
|
86
|
+
}, [checked, showPressedEffect]);
|
|
87
|
+
const motionAnimate = (0, react.useMemo)(() => ({ scale }), [scale]);
|
|
88
|
+
const motionTransition = (0, react.useMemo)(() => isPressed ? pressTransition : hoverTransition, [isPressed]);
|
|
89
|
+
/**
|
|
90
|
+
* Handlers
|
|
91
|
+
*/
|
|
92
|
+
const handleChange = (0, react.useCallback)((e) => {
|
|
93
|
+
onChange?.(e);
|
|
94
|
+
if (!isControlled) setChecked(e.target.checked);
|
|
95
|
+
}, [isControlled, onChange]);
|
|
96
|
+
const handleHoverStart = (0, react.useCallback)(() => {
|
|
97
|
+
setIsHovered(true);
|
|
98
|
+
}, []);
|
|
99
|
+
const handleHoverEnd = (0, react.useCallback)(() => {
|
|
100
|
+
setIsHovered(false);
|
|
101
|
+
}, []);
|
|
102
|
+
const handleTapStart = (0, react.useCallback)(() => {
|
|
103
|
+
setIsPressed(true);
|
|
104
|
+
}, []);
|
|
105
|
+
const handleTapEnd = (0, react.useCallback)(() => {
|
|
106
|
+
setIsPressed(false);
|
|
107
|
+
}, []);
|
|
108
|
+
/**
|
|
109
|
+
* Helpers
|
|
110
|
+
*/
|
|
111
|
+
const setDOMIndeterminate = (checked_) => {
|
|
112
|
+
if (!innerRef.current) return;
|
|
113
|
+
innerRef.current.indeterminate = isIndeterminate(checked_);
|
|
114
|
+
};
|
|
115
|
+
const prefersReducedMotion = (0, motion_react.useReducedMotion)();
|
|
116
|
+
const reduceMotion = forceReduceMotion ? "always" : "user";
|
|
117
|
+
const cssAnimationDuration = prefersReducedMotion || forceReduceMotion ? "duration-0" : "duration-120";
|
|
118
|
+
/**
|
|
119
|
+
* Effects
|
|
120
|
+
*/
|
|
121
|
+
(0, react.useEffect)(() => {
|
|
122
|
+
if (isControlled) setChecked(checkedProp);
|
|
123
|
+
}, [checkedProp, isControlled]);
|
|
124
|
+
(0, react.useEffect)(() => {
|
|
125
|
+
setDOMIndeterminate(checked);
|
|
126
|
+
}, [checked]);
|
|
127
|
+
const valueState = isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
128
|
+
const classNames = {
|
|
129
|
+
root: require_styles_styler.getStyles({
|
|
130
|
+
checkboxSizeRoot: size,
|
|
131
|
+
checkboxVariantRoot: variant,
|
|
132
|
+
checkboxVariantValueRoot: valueState,
|
|
133
|
+
display: "flex",
|
|
134
|
+
flexDirection: labelPosition === "start" ? "row" : "row-reverse",
|
|
135
|
+
alignItems: "center",
|
|
136
|
+
className: require_styles_styler.cx({
|
|
137
|
+
"cursor-pointer": !disabled,
|
|
138
|
+
"cursor-default": disabled,
|
|
139
|
+
"opacity-50": disabled
|
|
140
|
+
}, className, layerClassNames?.root)
|
|
141
|
+
}),
|
|
142
|
+
checkbox: require_styles_styler.getStyles({
|
|
143
|
+
checkboxSizeCheckbox: size,
|
|
144
|
+
checkboxVariantCheckbox: variant,
|
|
145
|
+
checkboxVariantValueCheckbox: valueState,
|
|
146
|
+
className: require_styles_styler.cx("border", "rounded-[4px]", "uds-ring", "uds-ring-within", cssAnimationDuration, "transition-[background-color,border-color,box-shadow]", layerClassNames?.checkbox)
|
|
147
|
+
}),
|
|
148
|
+
check: require_styles_styler.getStyles({
|
|
149
|
+
checkboxVariantCheckboxIcon: variant,
|
|
150
|
+
checkboxVariantValueCheckboxIcon: valueState,
|
|
151
|
+
className: require_styles_styler.cx("pointer-events-none", checkOpacity, cssAnimationDuration, "transition-opacity")
|
|
152
|
+
}),
|
|
153
|
+
htmlCheckbox: require_styles_styler.cx("cursor-[inherit]", "absolute", "opacity-0", "top-1/2", "left-1/2", "w-[calc(100%+2px)]", "h-[calc(100%+2px)]", "transform", "translate-x-[-50%]", "translate-y-[-50%]"),
|
|
154
|
+
label: require_styles_styler.cx(labelPosition === "start" ? "text-start" : "text-end", layerClassNames?.label)
|
|
155
|
+
};
|
|
156
|
+
const RootElement = label ? motion_react.m.label : motion_react.m.div;
|
|
157
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_SpringMotionConfig.SpringMotionConfig, {
|
|
158
|
+
reducedMotion: reduceMotion,
|
|
159
|
+
...motionTransition,
|
|
160
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(RootElement, {
|
|
161
|
+
className: classNames.root,
|
|
162
|
+
"data-testid": "container",
|
|
163
|
+
onHoverStart: handleHoverStart,
|
|
164
|
+
onHoverEnd: handleHoverEnd,
|
|
165
|
+
onTapStart: handleTapStart,
|
|
166
|
+
onTap: handleTapEnd,
|
|
167
|
+
onTapCancel: handleTapEnd,
|
|
168
|
+
tabIndex: -1,
|
|
169
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(MotionBox, {
|
|
170
|
+
position: "relative",
|
|
171
|
+
className: classNames.checkbox,
|
|
172
|
+
alignItems: "center",
|
|
173
|
+
justifyContent: "center",
|
|
174
|
+
flex: "none",
|
|
175
|
+
animate: motionAnimate,
|
|
176
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
177
|
+
type: "checkbox",
|
|
178
|
+
tabIndex: 0,
|
|
179
|
+
...checkboxProps,
|
|
180
|
+
ref: (ref) => {
|
|
181
|
+
innerRef.current = ref;
|
|
182
|
+
setDOMIndeterminate(checked);
|
|
183
|
+
if (typeof parentRef === "function") parentRef(ref);
|
|
184
|
+
else if (parentRef !== null) parentRef.current = ref;
|
|
185
|
+
},
|
|
186
|
+
id: uid,
|
|
187
|
+
disabled,
|
|
188
|
+
required,
|
|
189
|
+
"aria-invalid": hasError,
|
|
190
|
+
checked: isControlled ? isIndeterminate(checked) ? false : checked : void 0,
|
|
191
|
+
defaultChecked: isControlled ? void 0 : defaultChecked,
|
|
192
|
+
onChange: handleChange,
|
|
193
|
+
className: classNames.htmlCheckbox
|
|
194
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
|
|
195
|
+
name: getIcon(checked),
|
|
196
|
+
size: "sm",
|
|
197
|
+
className: classNames.check
|
|
198
|
+
})]
|
|
199
|
+
}), label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_FormLabel.FormLabel, {
|
|
200
|
+
as: "div",
|
|
201
|
+
variant: "inherit",
|
|
202
|
+
color: "inherit",
|
|
203
|
+
required,
|
|
204
|
+
label,
|
|
205
|
+
className: classNames.label
|
|
206
|
+
})]
|
|
207
|
+
})
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
Checkbox.displayName = "Checkbox";
|
|
211
|
+
|
|
212
|
+
//#endregion
|
|
213
|
+
exports.Checkbox = Checkbox;
|
|
214
|
+
exports.SIZES = SIZES;
|
|
215
|
+
exports.VARIANTS = VARIANTS;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { UniversalCheckboxProps } from "../../tokens/types.cjs";
|
|
2
|
+
import "../../tokens/index.cjs";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Checkbox.d.ts
|
|
6
|
+
type NativeInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'size' | 'height' | 'width' | 'color'>;
|
|
7
|
+
interface CheckboxProps extends NativeInputProps, UniversalCheckboxProps {
|
|
8
|
+
layerClassNames?: {
|
|
9
|
+
root?: string;
|
|
10
|
+
checkbox?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare const VARIANTS: ("primary" | "secondary")[];
|
|
15
|
+
declare const SIZES: ("sm" | "md")[];
|
|
16
|
+
/**
|
|
17
|
+
* **⚙️️ An checkbox.
|
|
18
|
+
*
|
|
19
|
+
* @componentType Client component
|
|
20
|
+
*
|
|
21
|
+
* @description
|
|
22
|
+
* A checkbox component allows users to select one or multiple options from a set. It represents a binary state, typically as checked or unchecked, and optionally includes a third "indeterminate" state to indicate partial selection.
|
|
23
|
+
*
|
|
24
|
+
* @see
|
|
25
|
+
* Check out the {@link https://uds.build/docs/components/checkbox Checkbox Docs} for more info
|
|
26
|
+
*
|
|
27
|
+
* @usage
|
|
28
|
+
* - Forms: checkbox
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* 'use client';
|
|
33
|
+
* import { Checkbox } from "@yahoo/uds";
|
|
34
|
+
*
|
|
35
|
+
* <Checkbox label="Name" required />
|
|
36
|
+
*```
|
|
37
|
+
*
|
|
38
|
+
* @related [Radio](https://uds.build/docs/components/radio), [Switch](https://uds.build/docs/components/switch), [Input](https://uds.build/docs/components/input).
|
|
39
|
+
**/
|
|
40
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Checkbox, type CheckboxProps, SIZES, VARIANTS };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { UniversalCheckboxProps } from "../../tokens/types.js";
|
|
2
|
+
import "../../tokens/index.js";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Checkbox.d.ts
|
|
6
|
+
type NativeInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'size' | 'height' | 'width' | 'color'>;
|
|
7
|
+
interface CheckboxProps extends NativeInputProps, UniversalCheckboxProps {
|
|
8
|
+
layerClassNames?: {
|
|
9
|
+
root?: string;
|
|
10
|
+
checkbox?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare const VARIANTS: ("primary" | "secondary")[];
|
|
15
|
+
declare const SIZES: ("sm" | "md")[];
|
|
16
|
+
/**
|
|
17
|
+
* **⚙️️ An checkbox.
|
|
18
|
+
*
|
|
19
|
+
* @componentType Client component
|
|
20
|
+
*
|
|
21
|
+
* @description
|
|
22
|
+
* A checkbox component allows users to select one or multiple options from a set. It represents a binary state, typically as checked or unchecked, and optionally includes a third "indeterminate" state to indicate partial selection.
|
|
23
|
+
*
|
|
24
|
+
* @see
|
|
25
|
+
* Check out the {@link https://uds.build/docs/components/checkbox Checkbox Docs} for more info
|
|
26
|
+
*
|
|
27
|
+
* @usage
|
|
28
|
+
* - Forms: checkbox
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* 'use client';
|
|
33
|
+
* import { Checkbox } from "@yahoo/uds";
|
|
34
|
+
*
|
|
35
|
+
* <Checkbox label="Name" required />
|
|
36
|
+
*```
|
|
37
|
+
*
|
|
38
|
+
* @related [Radio](https://uds.build/docs/components/radio), [Switch](https://uds.build/docs/components/switch), [Input](https://uds.build/docs/components/input).
|
|
39
|
+
**/
|
|
40
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Checkbox, type CheckboxProps, SIZES, VARIANTS };
|