@yahoo/uds 3.59.0-beta.1 → 3.59.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/cli/bin/uds-darwin-arm64-baseline +0 -0
  2. package/cli/bin/uds-darwin-x64 +0 -0
  3. package/cli/bin/uds-linux-arm64 +0 -0
  4. package/cli/bin/uds-linux-x64-baseline +0 -0
  5. package/dist/components/Box.d.ts +2 -2
  6. package/dist/components/Box.d.ts.map +1 -1
  7. package/dist/components/Divider/Divider.d.cts +2 -2
  8. package/dist/components/Divider/Divider.d.ts +2 -2
  9. package/dist/components/Divider/DividerCore.d.cts +2 -2
  10. package/dist/components/Divider/DividerCore.d.ts +2 -2
  11. package/dist/components/Divider/DividerInternal.d.cts +2 -2
  12. package/dist/components/Divider/DividerInternal.d.ts +2 -2
  13. package/dist/components/FormLabel.d.ts +2 -2
  14. package/dist/components/HStack.d.ts +2 -2
  15. package/dist/components/Icon.d.ts +2 -2
  16. package/dist/components/Link.d.ts +2 -2
  17. package/dist/components/Text.d.cts +5 -5
  18. package/dist/components/Text.d.cts.map +1 -1
  19. package/dist/components/Text.d.ts +8 -8
  20. package/dist/components/Text.d.ts.map +1 -1
  21. package/dist/components/VStack.d.ts +2 -2
  22. package/dist/components/VStack.d.ts.map +1 -1
  23. package/dist/components/client/AnimateHeightChange.d.cts +2 -2
  24. package/dist/components/client/AnimateHeightChange.d.ts +2 -2
  25. package/dist/components/client/Avatar/Avatar.d.cts +2 -2
  26. package/dist/components/client/Avatar/Avatar.d.cts.map +1 -1
  27. package/dist/components/client/Avatar/Avatar.d.ts +2 -2
  28. package/dist/components/client/Avatar/AvatarIcon.d.cts +2 -2
  29. package/dist/components/client/Avatar/AvatarIcon.d.cts.map +1 -1
  30. package/dist/components/client/Avatar/AvatarIcon.d.ts +2 -2
  31. package/dist/components/client/Avatar/AvatarImage.d.cts +2 -2
  32. package/dist/components/client/Avatar/AvatarImage.d.ts +2 -2
  33. package/dist/components/client/Avatar/AvatarText.d.cts +2 -2
  34. package/dist/components/client/Avatar/AvatarText.d.ts +2 -2
  35. package/dist/components/client/IconButton.d.cts +2 -2
  36. package/dist/components/client/IconButton.d.ts +2 -2
  37. package/dist/components/client/IconButton.d.ts.map +1 -1
  38. package/dist/components/client/Input/Input.d.cts +2 -2
  39. package/dist/components/client/Input/Input.d.ts +2 -2
  40. package/dist/components/client/Input/InputHelpText.d.cts +2 -2
  41. package/dist/components/client/Input/InputHelpText.d.cts.map +1 -1
  42. package/dist/components/client/Input/InputHelpText.d.ts +2 -2
  43. package/dist/components/client/Input/InputHelpTextInternal.d.cts +4 -4
  44. package/dist/components/client/Input/InputHelpTextInternal.d.cts.map +1 -1
  45. package/dist/components/client/Input/InputHelpTextInternal.d.ts +4 -4
  46. package/dist/components/client/Menu/Menu.Content.d.cts +2 -2
  47. package/dist/components/client/Menu/Menu.Content.d.ts +2 -2
  48. package/dist/components/client/Menu/Menu.Divider.d.cts +2 -2
  49. package/dist/components/client/Menu/Menu.Divider.d.ts +2 -2
  50. package/dist/components/client/Menu/Menu.Item.d.cts +2 -2
  51. package/dist/components/client/Menu/Menu.ItemBase.d.cts +2 -2
  52. package/dist/components/client/Menu/Menu.ItemBase.d.ts +2 -2
  53. package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +2 -2
  54. package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +2 -2
  55. package/dist/components/client/Menu/Menu.Provider.d.cts +2 -2
  56. package/dist/components/client/Menu/Menu.Provider.d.ts +2 -2
  57. package/dist/components/client/Menu/Menu.Trigger.d.cts +2 -2
  58. package/dist/components/client/Menu/Menu.Trigger.d.ts +2 -2
  59. package/dist/components/client/Pressable.d.cts +2 -2
  60. package/dist/components/client/Pressable.d.ts +2 -2
  61. package/dist/components/client/Pressable.d.ts.map +1 -1
  62. package/dist/components/client/Radio/RadioGroupStore.d.ts +2 -2
  63. package/dist/components/client/SpringMotionConfig.d.cts +3 -3
  64. package/dist/components/client/SpringMotionConfig.d.ts +3 -3
  65. package/dist/components/client/SpringMotionConfig.d.ts.map +1 -1
  66. package/dist/components/experimental/Spinner.d.cts +2 -2
  67. package/dist/components/experimental/Spinner.d.cts.map +1 -1
  68. package/dist/components/experimental/Spinner.d.ts +2 -2
  69. package/dist/components/experimental/Table.d.cts +2 -2
  70. package/dist/components/experimental/Table.d.ts +2 -2
  71. package/dist/components/experimental/client/Accordion.d.cts +2 -2
  72. package/dist/components/experimental/client/Accordion.d.cts.map +1 -1
  73. package/dist/components/experimental/client/Accordion.d.ts +2 -2
  74. package/dist/components/experimental/client/AvoidMotionLibraryProvider.d.cts +2 -2
  75. package/dist/components/experimental/client/AvoidMotionLibraryProvider.d.ts +2 -2
  76. package/dist/components/experimental/client/Modal.d.cts +3 -3
  77. package/dist/components/experimental/client/Modal.d.cts.map +1 -1
  78. package/dist/components/experimental/client/Modal.d.ts +3 -3
  79. package/dist/components/experimental/client/Popover.d.cts +3 -3
  80. package/dist/components/experimental/client/Popover.d.cts.map +1 -1
  81. package/dist/components/experimental/client/Popover.d.ts +3 -3
  82. package/dist/components/experimental/client/Tabs.d.cts +3 -3
  83. package/dist/components/experimental/client/Tabs.d.ts +6 -6
  84. package/dist/components/experimental/client/Toast.d.cts +2 -2
  85. package/dist/components/experimental/client/Toast.d.ts +2 -2
  86. package/dist/providers/ColorModeProvider.d.cts +4 -4
  87. package/dist/providers/ColorModeProvider.d.cts.map +1 -1
  88. package/dist/providers/ColorModeProvider.d.ts +4 -4
  89. package/dist/providers/ColorModeProvider.d.ts.map +1 -1
  90. package/dist/providers/ScaleModeProvider.d.cts +4 -4
  91. package/dist/providers/ScaleModeProvider.d.cts.map +1 -1
  92. package/dist/providers/ScaleModeProvider.d.ts +4 -4
  93. package/dist/providers/ScaleModeProvider.d.ts.map +1 -1
  94. package/dist/providers/ThemeProvider.d.cts +2 -2
  95. package/dist/providers/ThemeProvider.d.cts.map +1 -1
  96. package/dist/providers/ThemeProvider.d.ts +2 -2
  97. package/dist/styles/styler.d.cts +33 -33
  98. package/dist/styles/styler.d.ts +33 -33
  99. package/dist/styles/stylerTypes.d.ts.map +1 -1
  100. package/dist/tailwind/tailwind.config.d.ts +3 -3
  101. package/dist/tailwind/tailwindPlugin.d.ts +3 -3
  102. package/dist/tailwind/utils/getMotionStyles.d.cts +1 -1
  103. package/dist/tailwind/utils/getMotionStyles.d.ts +1 -1
  104. package/dist/tokens/automation/utils/getConfigVariantProperties.d.cts +2 -2
  105. package/dist/tokens/automation/utils/getConfigVariantProperties.d.cts.map +1 -1
  106. package/dist/tokens/automation/utils/getConfigVariantProperties.d.ts +2 -2
  107. package/dist/tokens/automation/utils/getConfigVariantProperties.d.ts.map +1 -1
  108. package/dist/tokens/types.d.cts.map +1 -1
  109. package/dist/tokens/types.d.ts.map +1 -1
  110. package/dist/utils/intersperse.d.cts +2 -2
  111. package/dist/utils/intersperse.d.ts +2 -2
  112. package/package.json +1 -3
  113. package/cli/FlattenButtonVariant.mock.tsx +0 -17
  114. package/src/components/Box.tsx +0 -181
  115. package/src/components/Divider/Divider.tsx +0 -44
  116. package/src/components/Divider/DividerCore.tsx +0 -101
  117. package/src/components/Divider/DividerInternal.tsx +0 -56
  118. package/src/components/Divider/index.ts +0 -1
  119. package/src/components/FormLabel.tsx +0 -66
  120. package/src/components/HStack.tsx +0 -53
  121. package/src/components/Icon.tsx +0 -82
  122. package/src/components/IconSlot.tsx +0 -82
  123. package/src/components/Image.tsx +0 -162
  124. package/src/components/Link.tsx +0 -134
  125. package/src/components/Text.tsx +0 -272
  126. package/src/components/VStack.tsx +0 -53
  127. package/src/components/client/AnimateHeightChange.tsx +0 -50
  128. package/src/components/client/Avatar/Avatar.tsx +0 -31
  129. package/src/components/client/Avatar/AvatarIcon.tsx +0 -103
  130. package/src/components/client/Avatar/AvatarImage.tsx +0 -147
  131. package/src/components/client/Avatar/AvatarText.tsx +0 -88
  132. package/src/components/client/Avatar/index.ts +0 -4
  133. package/src/components/client/Avatar/utils.ts +0 -105
  134. package/src/components/client/Badge.tsx +0 -133
  135. package/src/components/client/Button.tsx +0 -312
  136. package/src/components/client/Checkbox.tsx +0 -377
  137. package/src/components/client/Chip/Chip.tsx +0 -81
  138. package/src/components/client/Chip/ChipBase.tsx +0 -151
  139. package/src/components/client/Chip/ChipButton.tsx +0 -54
  140. package/src/components/client/Chip/ChipDismissible.tsx +0 -90
  141. package/src/components/client/Chip/ChipLink.tsx +0 -60
  142. package/src/components/client/Chip/ChipToggle.tsx +0 -79
  143. package/src/components/client/Chip/index.ts +0 -5
  144. package/src/components/client/IconButton.tsx +0 -198
  145. package/src/components/client/Input/Input.tsx +0 -323
  146. package/src/components/client/Input/InputHelpText.tsx +0 -52
  147. package/src/components/client/Input/InputHelpTextInternal.tsx +0 -81
  148. package/src/components/client/Input/index.ts +0 -2
  149. package/src/components/client/Menu/Menu.Content.tsx +0 -391
  150. package/src/components/client/Menu/Menu.Divider.tsx +0 -102
  151. package/src/components/client/Menu/Menu.Item.tsx +0 -114
  152. package/src/components/client/Menu/Menu.ItemBase.tsx +0 -265
  153. package/src/components/client/Menu/Menu.ItemCheckbox.tsx +0 -197
  154. package/src/components/client/Menu/Menu.Provider.tsx +0 -154
  155. package/src/components/client/Menu/Menu.Trigger.tsx +0 -119
  156. package/src/components/client/Menu/Menu.index.tsx +0 -9
  157. package/src/components/client/Menu/Menu.tsx +0 -2
  158. package/src/components/client/Menu/index.ts +0 -7
  159. package/src/components/client/Menu/utils/transformAriakitPlacement.ts +0 -66
  160. package/src/components/client/Pressable.tsx +0 -194
  161. package/src/components/client/Radio/Radio.tsx +0 -351
  162. package/src/components/client/Radio/RadioGroupProvider.tsx +0 -122
  163. package/src/components/client/Radio/RadioGroupStore.tsx +0 -56
  164. package/src/components/client/Radio/index.ts +0 -2
  165. package/src/components/client/Radio/useRadioGroup.ts +0 -149
  166. package/src/components/client/SpringMotionConfig.tsx +0 -151
  167. package/src/components/client/Switch.tsx +0 -377
  168. package/src/components/client/index.ts +0 -30
  169. package/src/components/client/motionFeatures/domAnimation.ts +0 -2
  170. package/src/components/client/motionFeatures/domMax.ts +0 -2
  171. package/src/components/experimental/Spinner.tsx +0 -30
  172. package/src/components/experimental/Table.mocks.tsx +0 -38
  173. package/src/components/experimental/Table.tsx +0 -239
  174. package/src/components/experimental/client/Accordion.tsx +0 -77
  175. package/src/components/experimental/client/AvoidMotionLibraryProvider.tsx +0 -10
  176. package/src/components/experimental/client/Modal.tsx +0 -68
  177. package/src/components/experimental/client/Popover.tsx +0 -63
  178. package/src/components/experimental/client/SwitchV2.tsx +0 -343
  179. package/src/components/experimental/client/Tabs.tsx +0 -106
  180. package/src/components/experimental/client/Toast.tsx +0 -186
  181. package/src/components/experimental/client/index.ts +0 -15
  182. package/src/components/experimental/index.ts +0 -48
  183. package/src/components/index.ts +0 -41
  184. package/src/defaultTokensConfig.ts +0 -31
  185. package/src/fixtures/index.ts +0 -638
  186. package/src/fixtures/macros/typesToConstants.ts +0 -42
  187. package/src/fixtures/utils/getScaleModeRamp.ts +0 -48
  188. package/src/fixtures/utils/getTailwindAsUdsColors.ts +0 -115
  189. package/src/flags.ts +0 -45
  190. package/src/hooks/useForkRef.ts +0 -34
  191. package/src/hooks/useNestedBorderRadius.ts +0 -138
  192. package/src/hooks/useRtl.ts +0 -64
  193. package/src/index.ts +0 -4
  194. package/src/providers/ColorModeProvider.tsx +0 -21
  195. package/src/providers/ScaleModeProvider.tsx +0 -29
  196. package/src/providers/ThemeProvider.tsx +0 -26
  197. package/src/styles/styler.ts +0 -194
  198. package/src/styles/stylerTypes.ts +0 -81
  199. package/src/styles/toast.css +0 -0
  200. package/src/styles/variants.ts +0 -1351
  201. package/src/tailwind/base/addColorModeVars.ts +0 -23
  202. package/src/tailwind/base/addColorModeVarsV2.ts +0 -57
  203. package/src/tailwind/base/addFontFaceDeclarations.ts +0 -13
  204. package/src/tailwind/base/addFontVars.ts +0 -9
  205. package/src/tailwind/base/addMotionVars.ts +0 -9
  206. package/src/tailwind/base/addScaleModeVars.ts +0 -33
  207. package/src/tailwind/base/types.ts +0 -8
  208. package/src/tailwind/components/getButtonStyles.ts +0 -240
  209. package/src/tailwind/components/getFocusRingStyles.ts +0 -32
  210. package/src/tailwind/components/getGroupedTextStyles.ts +0 -29
  211. package/src/tailwind/components/getHitTargetStyles.ts +0 -23
  212. package/src/tailwind/components/getIconButtonStyles.ts +0 -49
  213. package/src/tailwind/components/getIconStyles.ts +0 -13
  214. package/src/tailwind/components/getInputStyles.ts +0 -20
  215. package/src/tailwind/components/getResponsiveTextStyles.ts +0 -161
  216. package/src/tailwind/components/types.ts +0 -14
  217. package/src/tailwind/components/utils.ts +0 -73
  218. package/src/tailwind/defaultTailwindThemeAsUdsConfig.ts +0 -78
  219. package/src/tailwind/postcss.config.ts +0 -6
  220. package/src/tailwind/purger/index.ts +0 -1
  221. package/src/tailwind/tailwind.config.ts +0 -50
  222. package/src/tailwind/tailwind.d.ts +0 -5
  223. package/src/tailwind/tailwindPlugin.ts +0 -724
  224. package/src/tailwind/theme/getFontFamilyTheme.ts +0 -28
  225. package/src/tailwind/tsMorph.ts +0 -1
  226. package/src/tailwind/uds.css +0 -3
  227. package/src/tailwind/utils/addFontsPlugin.ts +0 -17
  228. package/src/tailwind/utils/getColorModeStyles.ts +0 -21
  229. package/src/tailwind/utils/getFontFaceDeclarations.ts +0 -12
  230. package/src/tailwind/utils/getFontStyles.ts +0 -38
  231. package/src/tailwind/utils/getMotionStyles.ts +0 -35
  232. package/src/tailwind/utils/getScaleModeStyles.ts +0 -23
  233. package/src/tailwind/utils/getShadowPresetValues.ts +0 -133
  234. package/src/tailwind/utils/getShadowStyles.ts +0 -26
  235. package/src/tailwind/utils/getShadowVars.ts +0 -40
  236. package/src/tailwind/utils/index.ts +0 -9
  237. package/src/tokens/automation/configs/avatar.ts +0 -297
  238. package/src/tokens/automation/configs/badge.ts +0 -306
  239. package/src/tokens/automation/configs/checkbox.ts +0 -226
  240. package/src/tokens/automation/configs/chip.ts +0 -521
  241. package/src/tokens/automation/configs/divider.ts +0 -112
  242. package/src/tokens/automation/configs/index.ts +0 -10
  243. package/src/tokens/automation/configs/input.ts +0 -496
  244. package/src/tokens/automation/configs/link.ts +0 -183
  245. package/src/tokens/automation/configs/menu.ts +0 -344
  246. package/src/tokens/automation/configs/radio.ts +0 -225
  247. package/src/tokens/automation/configs/switch.ts +0 -323
  248. package/src/tokens/automation/index.ts +0 -5
  249. package/src/tokens/automation/mapTextVariantFixtureToValue.ts +0 -8
  250. package/src/tokens/automation/properties.ts +0 -433
  251. package/src/tokens/automation/types/ComponentConfig.ts +0 -116
  252. package/src/tokens/automation/types/ComponentDB.ts +0 -1
  253. package/src/tokens/automation/types/ComponentStyles.ts +0 -47
  254. package/src/tokens/automation/types/index.ts +0 -2
  255. package/src/tokens/automation/utils/cartesianProduct.ts +0 -13
  256. package/src/tokens/automation/utils/coalesceConfigVariant.ts +0 -49
  257. package/src/tokens/automation/utils/defaults.ts +0 -29
  258. package/src/tokens/automation/utils/generateKeyFromFlatConfigPath.ts +0 -15
  259. package/src/tokens/automation/utils/generateSchemaKey.ts +0 -29
  260. package/src/tokens/automation/utils/getConfigComponentVariant.ts +0 -28
  261. package/src/tokens/automation/utils/getConfigVariantComponentStatesMatrix.ts +0 -40
  262. package/src/tokens/automation/utils/getConfigVariantProperties.ts +0 -32
  263. package/src/tokens/automation/utils/getConfigVariantPseudoStates.ts +0 -70
  264. package/src/tokens/automation/utils/getConfigVariants.ts +0 -73
  265. package/src/tokens/automation/utils/index.ts +0 -939
  266. package/src/tokens/automation/utils/mapColorFixtureToValue.ts +0 -34
  267. package/src/tokens/automation/utils/subcomponents.ts +0 -13
  268. package/src/tokens/automation/utils/variableData.ts +0 -79
  269. package/src/tokens/automation/utils/variantConfigGuards.ts +0 -17
  270. package/src/tokens/configs/borderRadius.ts +0 -23
  271. package/src/tokens/configs/borderWidth.ts +0 -17
  272. package/src/tokens/configs/button.ts +0 -888
  273. package/src/tokens/configs/colorMode.ts +0 -14
  274. package/src/tokens/configs/font.ts +0 -9
  275. package/src/tokens/configs/iconButton.ts +0 -28
  276. package/src/tokens/configs/motion.ts +0 -135
  277. package/src/tokens/configs/palette.ts +0 -124
  278. package/src/tokens/configs/scaleMode.ts +0 -28
  279. package/src/tokens/configs/shadow.ts +0 -286
  280. package/src/tokens/configs/sizes.ts +0 -23
  281. package/src/tokens/configs/spectrum.ts +0 -729
  282. package/src/tokens/configs/typography.ts +0 -417
  283. package/src/tokens/configs/yosConfig.ts +0 -7651
  284. package/src/tokens/consts/buttonMotionTokens.ts +0 -99
  285. package/src/tokens/consts/cssTokens.ts +0 -110
  286. package/src/tokens/consts/defaultModes.ts +0 -15
  287. package/src/tokens/consts/fontDeclarationsMap.ts +0 -509
  288. package/src/tokens/index.ts +0 -15
  289. package/src/tokens/parseButtonVariants.ts +0 -59
  290. package/src/tokens/parseTokens.ts +0 -122
  291. package/src/tokens/types.ts +0 -1882
  292. package/src/tokens/utils/entries.ts +0 -14
  293. package/src/tokens/utils/fromEntries.ts +0 -11
  294. package/src/tokens/utils/mapValues.ts +0 -15
  295. package/src/types.ts +0 -2
  296. package/src/utils/assertUnreachable.ts +0 -6
  297. package/src/utils/composeRefs.ts +0 -23
  298. package/src/utils/createSlot.tsx +0 -131
  299. package/src/utils/entries.ts +0 -6
  300. package/src/utils/falsyToString.ts +0 -3
  301. package/src/utils/getMotionVar.ts +0 -18
  302. package/src/utils/intersperse.ts +0 -45
  303. package/src/utils/mapValues.ts +0 -15
  304. package/src/utils/mergeSlotProps.ts +0 -70
@@ -1,297 +0,0 @@
1
- import {
2
- alwaysPaletteAliases,
3
- backgroundPaletteColors,
4
- borderRadii,
5
- borderWidths,
6
- foregroundPaletteColors,
7
- iconSizes,
8
- linePaletteColors,
9
- spacingAliases,
10
- spectrumColors,
11
- textVariants,
12
- } from '@yahoo/uds/fixtures';
13
- import {
14
- createConfigurableProperty,
15
- createLayerConfig,
16
- createSubComponentConfig,
17
- createVariantConfigWithProperties,
18
- } from '@yahoo/uds/tokens';
19
-
20
- import type { ComponentConfig } from '../types';
21
-
22
- function defineComponentConfig<T extends ComponentConfig>(config: T): T {
23
- return config;
24
- }
25
-
26
- export const AvatarConfig = defineComponentConfig({
27
- label: 'Avatar',
28
- description:
29
- "An avatar is a visual element that represents a user or entity, usually shown as a circle or square with an image, icon, or initials. It's commonly used in profiles, comments, or messages to help identify people.",
30
- variants: {
31
- size: createVariantConfigWithProperties({
32
- label: 'Size',
33
- description: 'These sizes will apply across all variants',
34
- isConfigurable: true,
35
- default: 'md',
36
- options: ['xs', 'sm', 'md', 'lg', 'xl'],
37
- layers: {
38
- root: createLayerConfig({
39
- label: 'root',
40
- properties: {
41
- height: createConfigurableProperty({
42
- name: 'height',
43
- label: 'Height',
44
- typeOfFixture: ['spacingAliases'],
45
- values: [spacingAliases],
46
- defaults: {
47
- xs: '6',
48
- sm: '7',
49
- md: '10',
50
- lg: '12',
51
- xl: '16',
52
- },
53
- }),
54
- width: createConfigurableProperty({
55
- name: 'width',
56
- label: 'Width',
57
- typeOfFixture: ['spacingAliases'],
58
- values: [spacingAliases],
59
- defaults: {
60
- xs: '6',
61
- sm: '7',
62
- md: '10',
63
- lg: '12',
64
- xl: '16',
65
- },
66
- }),
67
- borderWidth: createConfigurableProperty({
68
- name: 'borderWidth',
69
- label: 'Border width',
70
- typeOfFixture: ['borderWidths'],
71
- values: [borderWidths],
72
- defaults: {
73
- xs: 'thin',
74
- sm: 'thin',
75
- md: 'thin',
76
- lg: 'thin',
77
- xl: 'thin',
78
- },
79
- }),
80
- textVariant: createConfigurableProperty({
81
- name: 'textVariant',
82
- label: 'Text variant',
83
- typeOfFixture: ['textVariants'],
84
- values: [textVariants],
85
- defaults: {
86
- xs: 'caption1',
87
- sm: 'caption2',
88
- md: 'headline1',
89
- lg: 'title4',
90
- xl: 'title3',
91
- },
92
- }),
93
- },
94
- }),
95
- icon: createLayerConfig({
96
- label: 'icon',
97
- properties: {
98
- iconSize: createConfigurableProperty({
99
- name: 'iconSize',
100
- label: 'Icon size',
101
- typeOfFixture: ['iconSizes'],
102
- values: [iconSizes],
103
- defaults: {
104
- xs: 'sm',
105
- sm: 'sm',
106
- md: 'md',
107
- lg: 'lg',
108
- xl: 'lg',
109
- },
110
- }),
111
- },
112
- }),
113
- },
114
- }),
115
- },
116
- subComponents: {
117
- text: createSubComponentConfig({
118
- label: 'Text',
119
- description: '',
120
- variants: {
121
- variant: createVariantConfigWithProperties({
122
- label: 'Variant',
123
- description:
124
- 'Shapes and sizes defined here will be applied across the entire family of Avatar (Icon, Image, Text)',
125
- isConfigurable: true,
126
- options: ['primary', 'secondary'],
127
- default: 'primary',
128
- layers: {
129
- root: createLayerConfig({
130
- label: 'root',
131
- properties: {
132
- color: createConfigurableProperty({
133
- name: 'color',
134
- label: 'text color',
135
- typeOfFixture: [
136
- 'spectrumColors',
137
- 'foregroundPaletteColors',
138
- 'alwaysPaletteAliases',
139
- ],
140
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
141
- defaults: {
142
- primary: 'brand',
143
- secondary: 'secondary',
144
- },
145
- }),
146
- backgroundColor: createConfigurableProperty({
147
- name: 'backgroundColor',
148
- label: 'background color',
149
- typeOfFixture: [
150
- 'spectrumColors',
151
- 'backgroundPaletteColors',
152
- 'alwaysPaletteAliases',
153
- ],
154
- values: [spectrumColors, backgroundPaletteColors, alwaysPaletteAliases],
155
- defaults: {
156
- primary: 'primary',
157
- secondary: 'secondary',
158
- },
159
- }),
160
- borderColor: createConfigurableProperty({
161
- name: 'borderColor',
162
- label: 'border color',
163
- typeOfFixture: ['spectrumColors', 'linePaletteColors', 'alwaysPaletteAliases'],
164
- values: [spectrumColors, linePaletteColors, alwaysPaletteAliases],
165
- defaults: {
166
- primary: 'brand',
167
- secondary: 'secondary',
168
- },
169
- }),
170
- borderRadius: createConfigurableProperty({
171
- name: 'borderRadius',
172
- label: 'Border radius',
173
- typeOfFixture: ['borderRadii'],
174
- values: [borderRadii],
175
- defaults: {
176
- primary: 'full',
177
- secondary: 'sm',
178
- },
179
- }),
180
- },
181
- }),
182
- },
183
- }),
184
- },
185
- }),
186
- image: createSubComponentConfig({
187
- label: 'Image',
188
- description: '',
189
- variants: {
190
- variant: createVariantConfigWithProperties({
191
- label: 'Variant',
192
- description:
193
- 'Shapes and sizes defined here will be applied across the entire family of Avatar (Icon, Image, Text)',
194
- isConfigurable: true,
195
- options: ['primary', 'secondary'],
196
- default: 'primary',
197
- layers: {
198
- root: createLayerConfig({
199
- label: 'root',
200
- properties: {
201
- borderColor: createConfigurableProperty({
202
- name: 'borderColor',
203
- label: 'border color',
204
- typeOfFixture: ['spectrumColors', 'linePaletteColors', 'alwaysPaletteAliases'],
205
- values: [spectrumColors, linePaletteColors, alwaysPaletteAliases],
206
- defaults: {
207
- primary: 'muted',
208
- secondary: 'muted',
209
- },
210
- }),
211
- borderRadius: createConfigurableProperty({
212
- name: 'borderRadius',
213
- label: 'border radius',
214
- typeOfFixture: ['borderRadii'],
215
- values: [borderRadii],
216
- defaults: {
217
- primary: 'full',
218
- secondary: 'sm',
219
- },
220
- }),
221
- },
222
- }),
223
- },
224
- }),
225
- },
226
- }),
227
- icon: createSubComponentConfig({
228
- label: 'Icon',
229
- description: '',
230
- variants: {
231
- variant: createVariantConfigWithProperties({
232
- label: 'Variant',
233
- description:
234
- 'Shapes and sizes defined here will be applied across the entire family of Avatar (Icon, Image, Text)',
235
- isConfigurable: true,
236
- options: ['primary', 'secondary'],
237
- default: 'primary',
238
- layers: {
239
- root: createLayerConfig({
240
- label: 'root',
241
- properties: {
242
- color: createConfigurableProperty({
243
- name: 'color',
244
- label: 'icon color',
245
- typeOfFixture: [
246
- 'spectrumColors',
247
- 'foregroundPaletteColors',
248
- 'alwaysPaletteAliases',
249
- ],
250
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
251
- defaults: {
252
- primary: 'muted',
253
- secondary: 'muted',
254
- },
255
- }),
256
- backgroundColor: createConfigurableProperty({
257
- name: 'backgroundColor',
258
- label: 'background color',
259
- typeOfFixture: [
260
- 'spectrumColors',
261
- 'backgroundPaletteColors',
262
- 'alwaysPaletteAliases',
263
- ],
264
- values: [spectrumColors, backgroundPaletteColors, alwaysPaletteAliases],
265
- defaults: {
266
- primary: 'secondary',
267
- secondary: 'secondary',
268
- },
269
- }),
270
- borderColor: createConfigurableProperty({
271
- name: 'borderColor',
272
- label: 'border color',
273
- typeOfFixture: ['spectrumColors', 'linePaletteColors', 'alwaysPaletteAliases'],
274
- values: [spectrumColors, linePaletteColors, alwaysPaletteAliases],
275
- defaults: {
276
- primary: 'primary',
277
- secondary: 'primary',
278
- },
279
- }),
280
- borderRadius: createConfigurableProperty({
281
- name: 'borderRadius',
282
- label: 'border radius',
283
- typeOfFixture: ['borderRadii'],
284
- values: [borderRadii],
285
- defaults: {
286
- primary: 'full',
287
- secondary: 'sm',
288
- },
289
- }),
290
- },
291
- }),
292
- },
293
- }),
294
- },
295
- }),
296
- },
297
- });
@@ -1,306 +0,0 @@
1
- import {
2
- alwaysPaletteAliases,
3
- backgroundPaletteColors,
4
- borderRadii,
5
- borderWidths,
6
- foregroundPaletteColors,
7
- iconSizes,
8
- linePaletteColors,
9
- shadowVariants,
10
- shadowVariantsWithInvert,
11
- spacingAliases,
12
- spectrumColors,
13
- textVariants,
14
- } from '@yahoo/uds/fixtures';
15
- import {
16
- createConfigurableProperty,
17
- createLayerConfig,
18
- createVariantConfigWithProperties,
19
- } from '@yahoo/uds/tokens';
20
-
21
- import type { ComponentConfig } from '../types';
22
-
23
- function defineComponentConfig<T extends ComponentConfig>(config: T): T {
24
- return config;
25
- }
26
-
27
- // TODO: add negative margin to the icon as a property
28
- export const BadgeConfig = defineComponentConfig({
29
- label: 'Badge',
30
- description: 'Component for demo purposes and testing the automation',
31
- variants: {
32
- size: createVariantConfigWithProperties({
33
- label: 'Size',
34
- description: 'These sizes will apply across all variants',
35
- isConfigurable: true,
36
- default: 'md',
37
- options: ['xs', 'sm', 'md', 'lg'],
38
- layers: {
39
- root: createLayerConfig({
40
- label: 'root',
41
- properties: {
42
- spacingHorizontal: createConfigurableProperty({
43
- name: 'spacingHorizontal',
44
- label: 'Spacing horizontal',
45
- typeOfFixture: ['spacingAliases'],
46
- values: [spacingAliases],
47
- defaults: {
48
- xs: '2',
49
- sm: '4',
50
- md: '6',
51
- lg: '8',
52
- },
53
- }),
54
- spacingVertical: createConfigurableProperty({
55
- name: 'spacingVertical',
56
- label: 'Spacing vertical',
57
- typeOfFixture: ['spacingAliases'],
58
- values: [spacingAliases],
59
- defaults: {
60
- xs: '0.5',
61
- sm: '1',
62
- md: '1.5',
63
- lg: '2',
64
- },
65
- }),
66
- gap: createConfigurableProperty({
67
- name: 'gap',
68
- label: 'Gap',
69
- typeOfFixture: ['spacingAliases'],
70
- values: [spacingAliases],
71
- defaults: {
72
- xs: '2',
73
- sm: '4',
74
- md: '6',
75
- lg: '8',
76
- },
77
- }),
78
- textVariant: createConfigurableProperty({
79
- name: 'textVariant',
80
- label: 'Text variant',
81
- typeOfFixture: ['textVariants'],
82
- values: [textVariants],
83
- defaults: {
84
- xs: 'label4',
85
- sm: 'label3',
86
- md: 'label2',
87
- lg: 'label1',
88
- },
89
- }),
90
- },
91
- }),
92
- icon: createLayerConfig({
93
- label: 'icon',
94
- properties: {
95
- size: createConfigurableProperty({
96
- name: 'iconSize',
97
- label: 'Icon size',
98
- typeOfFixture: ['iconSizes'],
99
- values: [iconSizes],
100
- defaults: {
101
- xs: 'sm',
102
- sm: 'sm',
103
- md: 'md',
104
- lg: 'lg',
105
- },
106
- }),
107
- },
108
- }),
109
- },
110
- }),
111
- variant: createVariantConfigWithProperties({
112
- label: 'Variants',
113
- description: '',
114
- isConfigurable: true,
115
- default: 'primary',
116
- options: [
117
- 'primary',
118
- 'secondary',
119
- 'brand',
120
- 'brand-secondary',
121
- 'alert',
122
- 'alert-secondary',
123
- 'warning',
124
- 'warning-secondary',
125
- 'positive',
126
- 'positive-secondary',
127
- 'info',
128
- 'info-secondary',
129
- ],
130
- layers: {
131
- root: createLayerConfig({
132
- label: 'root',
133
- properties: {
134
- backgroundColor: createConfigurableProperty({
135
- name: 'backgroundColor',
136
- label: 'Background color',
137
- typeOfFixture: ['spectrumColors', 'backgroundPaletteColors', 'alwaysPaletteAliases'],
138
- values: [spectrumColors, backgroundPaletteColors, alwaysPaletteAliases],
139
- defaults: {
140
- primary: 'primary',
141
- secondary: 'secondary',
142
- brand: 'brand',
143
- 'brand-secondary': 'brand-secondary',
144
- alert: 'alert',
145
- 'alert-secondary': 'alert-secondary',
146
- warning: 'warning',
147
- 'warning-secondary': 'warning-secondary',
148
- positive: 'positive',
149
- 'positive-secondary': 'positive-secondary',
150
- info: 'info',
151
- 'info-secondary': 'info-secondary',
152
- },
153
- }),
154
- color: createConfigurableProperty({
155
- name: 'color',
156
- label: 'Text color',
157
- typeOfFixture: ['spectrumColors', 'foregroundPaletteColors', 'alwaysPaletteAliases'],
158
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
159
- defaults: {
160
- primary: 'primary',
161
- secondary: 'secondary',
162
- brand: 'brand',
163
- 'brand-secondary': 'brand-secondary',
164
- alert: 'alert',
165
- 'alert-secondary': 'alert-secondary',
166
- warning: 'warning',
167
- 'warning-secondary': 'warning-secondary',
168
- positive: 'positive',
169
- 'positive-secondary': 'positive-secondary',
170
- info: 'info',
171
- 'info-secondary': 'info-secondary',
172
- },
173
- }),
174
- borderWidth: createConfigurableProperty({
175
- name: 'borderWidth',
176
- label: 'Border width',
177
- typeOfFixture: ['borderWidths'],
178
- values: [borderWidths],
179
- defaults: {
180
- primary: 'thin',
181
- secondary: 'none',
182
- brand: 'none',
183
- 'brand-secondary': 'none',
184
- alert: 'none',
185
- 'alert-secondary': 'none',
186
- warning: 'none',
187
- 'warning-secondary': 'none',
188
- positive: 'none',
189
- 'positive-secondary': 'none',
190
- info: 'none',
191
- 'info-secondary': 'none',
192
- },
193
- }),
194
- borderColor: createConfigurableProperty({
195
- name: 'borderColor',
196
- label: 'border color',
197
- typeOfFixture: ['spectrumColors', 'linePaletteColors', 'alwaysPaletteAliases'],
198
- values: [spectrumColors, linePaletteColors, alwaysPaletteAliases],
199
- defaults: {
200
- primary: 'primary',
201
- secondary: 'secondary',
202
- brand: 'brand',
203
- 'brand-secondary': 'brand-secondary',
204
- alert: 'alert',
205
- 'alert-secondary': 'alert-secondary',
206
- warning: 'warning',
207
- 'warning-secondary': 'warning-secondary',
208
- positive: 'positive',
209
- 'positive-secondary': 'positive-secondary',
210
- info: 'info',
211
- 'info-secondary': 'info-secondary',
212
- },
213
- }),
214
- borderRadius: createConfigurableProperty({
215
- name: 'borderRadius',
216
- label: 'Border radius',
217
- typeOfFixture: ['borderRadii'],
218
- values: [borderRadii],
219
- defaults: {
220
- primary: 'sm',
221
- secondary: 'sm',
222
- brand: 'sm',
223
- 'brand-secondary': 'sm',
224
- alert: 'sm',
225
- 'alert-secondary': 'sm',
226
- warning: 'sm',
227
- 'warning-secondary': 'sm',
228
- positive: 'sm',
229
- 'positive-secondary': 'sm',
230
- info: 'sm',
231
- 'info-secondary': 'sm',
232
- },
233
- }),
234
- shadow: createConfigurableProperty({
235
- name: 'shadow',
236
- label: 'Drop shadow',
237
- typeOfFixture: ['shadowVariants'],
238
- supportsCustom: true,
239
- values: [shadowVariants],
240
- defaults: {
241
- primary: '2xl',
242
- secondary: 'xl',
243
- brand: 'md',
244
- 'brand-secondary': 'xl',
245
- alert: 'xl',
246
- 'alert-secondary': 'xl',
247
- warning: 'xl',
248
- 'warning-secondary': 'xl',
249
- positive: 'xl',
250
- 'positive-secondary': 'xl',
251
- info: 'xl',
252
- 'info-secondary': 'sm',
253
- },
254
- }),
255
- insetShadow: createConfigurableProperty({
256
- name: 'insetShadow',
257
- label: 'Inset shadow',
258
- typeOfFixture: ['shadowVariantsWithInvert'],
259
- supportsCustom: true,
260
- values: [shadowVariantsWithInvert],
261
- defaults: {
262
- primary: '2xl-invert',
263
- secondary: 'md-invert',
264
- brand: 'md',
265
- 'brand-secondary': 'xl',
266
- alert: 'xl',
267
- 'alert-secondary': 'xl-invert',
268
- warning: 'xl',
269
- 'warning-secondary': 'xl',
270
- positive: 'xl',
271
- 'positive-secondary': 'xl',
272
- info: 'xl',
273
- 'info-secondary': 'sm',
274
- },
275
- }),
276
- },
277
- }),
278
- icon: createLayerConfig({
279
- label: 'icon',
280
- properties: {
281
- color: createConfigurableProperty({
282
- name: 'color',
283
- label: 'Icon color',
284
- typeOfFixture: ['spectrumColors', 'foregroundPaletteColors', 'alwaysPaletteAliases'],
285
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
286
- defaults: {
287
- primary: 'primary',
288
- secondary: 'secondary',
289
- brand: 'brand',
290
- 'brand-secondary': 'brand-secondary',
291
- alert: 'alert',
292
- 'alert-secondary': 'alert-secondary',
293
- warning: 'warning',
294
- 'warning-secondary': 'warning-secondary',
295
- positive: 'positive',
296
- 'positive-secondary': 'positive-secondary',
297
- info: 'info',
298
- 'info-secondary': 'info-secondary',
299
- },
300
- }),
301
- },
302
- }),
303
- },
304
- }),
305
- },
306
- });