@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,496 +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
- createComponentStates,
15
- createConfigurableProperty,
16
- createLayerConfig,
17
- createVariantConfigWithComponentStates,
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
- export const InputConfig = defineComponentConfig({
28
- label: 'input',
29
- description:
30
- 'An input field is a box where users can type or select information. It can also open a dropdown menu to show options or help collect data.',
31
- variants: {
32
- size: createVariantConfigWithProperties({
33
- label: 'size',
34
- isConfigurable: true,
35
- options: ['md', 'lg'],
36
- default: 'md',
37
- description: '',
38
- layers: {
39
- root: createLayerConfig({
40
- label: 'root',
41
- properties: {},
42
- }),
43
- inputWrapper: createLayerConfig({
44
- label: 'inputWrapper',
45
- properties: {
46
- spacingHorizontal: createConfigurableProperty({
47
- name: 'spacingHorizontal',
48
- label: 'Spacing horizontal',
49
- typeOfFixture: ['spacingAliases'],
50
- values: [spacingAliases],
51
- defaults: {
52
- md: '3.5',
53
- lg: '4',
54
- },
55
- }),
56
- spacingVertical: createConfigurableProperty({
57
- name: 'spacingVertical',
58
- label: 'Spacing vertical',
59
- typeOfFixture: ['spacingAliases'],
60
- values: [spacingAliases],
61
- defaults: {
62
- md: '2',
63
- lg: '3.5',
64
- },
65
- }),
66
- gap: createConfigurableProperty({
67
- name: 'gap',
68
- label: 'Gap',
69
- typeOfFixture: ['spacingAliases'],
70
- values: [spacingAliases],
71
- defaults: {
72
- md: '3',
73
- lg: '3',
74
- },
75
- }),
76
- borderWidth: createConfigurableProperty({
77
- name: 'borderWidth',
78
- label: 'Border width',
79
- typeOfFixture: ['borderWidths'],
80
- values: [borderWidths],
81
- // TODO: add for invalid clicked
82
- pseudoStates: ['pressed', 'invalid'],
83
- defaults: {
84
- md: 'thin',
85
- lg: 'thin',
86
- },
87
- }),
88
- borderRadius: createConfigurableProperty({
89
- name: 'borderRadius',
90
- label: 'Border radius',
91
- typeOfFixture: ['borderRadii'],
92
- values: [borderRadii],
93
- defaults: {
94
- md: 'md',
95
- lg: 'md',
96
- },
97
- }),
98
- textVariant: createConfigurableProperty({
99
- name: 'textVariant',
100
- label: 'Input text style',
101
- typeOfFixture: ['textVariants'],
102
- pseudoStates: ['hover'],
103
- values: [textVariants],
104
- defaults: {
105
- md: 'label2',
106
- lg: 'label2',
107
- },
108
- }),
109
- },
110
- }),
111
- input: createLayerConfig({
112
- label: 'input',
113
- properties: {
114
- height: createConfigurableProperty({
115
- name: 'height',
116
- label: 'Input element height',
117
- typeOfFixture: ['spacingAliases'],
118
- values: [spacingAliases],
119
- defaults: {
120
- md: '6',
121
- lg: '6',
122
- },
123
- }),
124
- },
125
- }),
126
- startIcon: createLayerConfig({
127
- label: 'startIcon',
128
- properties: {
129
- size: createConfigurableProperty({
130
- name: 'iconSize',
131
- label: 'Start icon size',
132
- typeOfFixture: ['iconSizes'],
133
- values: [iconSizes],
134
- defaults: {
135
- md: 'md',
136
- lg: 'md',
137
- },
138
- }),
139
- },
140
- }),
141
- endIcon: createLayerConfig({
142
- label: 'endIcon',
143
- properties: {
144
- size: createConfigurableProperty({
145
- name: 'iconSize',
146
- label: 'End icon size',
147
- typeOfFixture: ['iconSizes'],
148
- values: [iconSizes],
149
- defaults: {
150
- md: 'md',
151
- lg: 'md',
152
- },
153
- }),
154
- },
155
- }),
156
- label: createLayerConfig({
157
- label: 'label',
158
- properties: {
159
- textVariant: createConfigurableProperty({
160
- name: 'textVariant',
161
- label: 'Label text style',
162
- typeOfFixture: ['textVariants'],
163
- values: [textVariants],
164
- defaults: {
165
- md: 'label4',
166
- lg: 'label4',
167
- },
168
- }),
169
- },
170
- }),
171
- helperIcon: createLayerConfig({
172
- label: 'helperIcon',
173
- properties: {
174
- size: createConfigurableProperty({
175
- name: 'iconSize',
176
- label: 'Helper text icon size',
177
- typeOfFixture: ['iconSizes'],
178
- values: [iconSizes],
179
- defaults: {
180
- md: 'sm',
181
- lg: 'sm',
182
- },
183
- }),
184
- },
185
- }),
186
- helperText: createLayerConfig({
187
- label: 'helperText',
188
- properties: {
189
- textVariant: createConfigurableProperty({
190
- name: 'textVariant',
191
- label: 'Label text style',
192
- typeOfFixture: ['textVariants'],
193
- values: [textVariants],
194
- defaults: {
195
- md: 'label4',
196
- lg: 'label4',
197
- },
198
- }),
199
- },
200
- }),
201
- },
202
- }),
203
- variant: createVariantConfigWithComponentStates({
204
- label: 'variant',
205
- description: '',
206
- isConfigurable: true,
207
- options: ['default'],
208
- default: 'default',
209
- componentStates: {
210
- value: createComponentStates({
211
- label: 'value',
212
- options: ['filled', 'empty'],
213
- layers: {
214
- root: createLayerConfig({
215
- label: 'root',
216
- properties: {},
217
- }),
218
- inputWrapper: createLayerConfig({
219
- label: 'input',
220
- properties: {
221
- borderColor: createConfigurableProperty({
222
- name: 'borderColor',
223
- label: 'Border color',
224
- typeOfFixture: ['spectrumColors', 'linePaletteColors', 'alwaysPaletteAliases'],
225
- values: [spectrumColors, linePaletteColors, alwaysPaletteAliases],
226
- pseudoStates: [
227
- 'hover',
228
- 'pressed',
229
- 'focus-within',
230
- 'invalid',
231
- 'invalid&hover',
232
- 'invalid&pressed',
233
- 'readonly',
234
- 'disabled',
235
- ],
236
- defaults: {
237
- default: 'tertiary',
238
- },
239
- }),
240
- backgroundColor: createConfigurableProperty({
241
- name: 'backgroundColor',
242
- label: 'Background color',
243
- typeOfFixture: [
244
- 'spectrumColors',
245
- 'backgroundPaletteColors',
246
- 'alwaysPaletteAliases',
247
- ],
248
- values: [spectrumColors, backgroundPaletteColors, alwaysPaletteAliases],
249
- pseudoStates: [
250
- 'hover',
251
- 'pressed',
252
- 'focus-within',
253
- 'invalid',
254
- 'invalid&hover',
255
- 'invalid&pressed',
256
- 'readonly',
257
- 'disabled',
258
- ],
259
- defaults: {
260
- default: 'primary',
261
- },
262
- }),
263
- },
264
- }),
265
- input: createLayerConfig({
266
- label: 'input',
267
- properties: {
268
- // TODO: add placeholder configurable property
269
- color: createConfigurableProperty({
270
- name: 'color',
271
- label: 'Input text color',
272
- typeOfFixture: [
273
- 'spectrumColors',
274
- 'foregroundPaletteColors',
275
- 'alwaysPaletteAliases',
276
- ],
277
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
278
- pseudoStates: [
279
- 'hover',
280
- 'pressed',
281
- 'focus-within',
282
- 'invalid',
283
- 'invalid&hover',
284
- 'invalid&pressed',
285
- 'readonly',
286
- 'disabled',
287
- ],
288
- defaults: {
289
- default: 'muted',
290
- },
291
- }),
292
- },
293
- }),
294
- inputPlaceholder: createLayerConfig({
295
- label: 'inputPlaceholder',
296
- pseudoSelector: '::placeholder',
297
- properties: {
298
- color: createConfigurableProperty({
299
- name: 'color',
300
- label: 'Input text color',
301
- typeOfFixture: [
302
- 'spectrumColors',
303
- 'foregroundPaletteColors',
304
- 'alwaysPaletteAliases',
305
- ],
306
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
307
- pseudoStates: [
308
- 'hover',
309
- 'pressed',
310
- 'focus-within',
311
- 'invalid',
312
- 'invalid&hover',
313
- 'invalid&pressed',
314
- 'readonly',
315
- 'disabled',
316
- ],
317
- defaults: {
318
- default: 'muted',
319
- },
320
- }),
321
- },
322
- }),
323
- startIcon: createLayerConfig({
324
- label: 'startIcon',
325
- properties: {
326
- color: createConfigurableProperty({
327
- name: 'color',
328
- label: 'Start icon color',
329
- typeOfFixture: [
330
- 'spectrumColors',
331
- 'foregroundPaletteColors',
332
- 'alwaysPaletteAliases',
333
- ],
334
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
335
- pseudoStates: [
336
- 'hover',
337
- 'pressed',
338
- 'focus-within',
339
- 'invalid',
340
- 'invalid&hover',
341
- 'invalid&pressed',
342
- 'readonly',
343
- 'disabled',
344
- ],
345
- defaults: {
346
- default: 'muted',
347
- },
348
- }),
349
- },
350
- }),
351
- endIcon: createLayerConfig({
352
- label: 'endIcon',
353
- properties: {
354
- color: createConfigurableProperty({
355
- name: 'color',
356
- label: 'End icon color',
357
- typeOfFixture: [
358
- 'spectrumColors',
359
- 'foregroundPaletteColors',
360
- 'alwaysPaletteAliases',
361
- ],
362
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
363
- pseudoStates: [
364
- 'hover',
365
- 'pressed',
366
- 'focus-within',
367
- 'invalid',
368
- 'invalid&hover',
369
- 'invalid&pressed',
370
- 'readonly',
371
- 'disabled',
372
- ],
373
- defaults: {
374
- default: 'muted',
375
- },
376
- }),
377
- },
378
- }),
379
- label: createLayerConfig({
380
- label: 'label',
381
- properties: {
382
- color: createConfigurableProperty({
383
- name: 'color',
384
- label: 'Label color',
385
- typeOfFixture: [
386
- 'spectrumColors',
387
- 'foregroundPaletteColors',
388
- 'alwaysPaletteAliases',
389
- ],
390
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
391
- pseudoStates: [
392
- 'hover',
393
- 'pressed',
394
- 'focus-within',
395
- 'invalid',
396
- 'invalid&hover',
397
- 'invalid&pressed',
398
- 'readonly',
399
- 'disabled',
400
- ],
401
- defaults: {
402
- default: 'muted',
403
- },
404
- }),
405
- },
406
- }),
407
- labelRequired: createLayerConfig({
408
- label: 'labelRequired',
409
- properties: {
410
- color: createConfigurableProperty({
411
- name: 'color',
412
- label: 'Required color',
413
- typeOfFixture: [
414
- 'spectrumColors',
415
- 'foregroundPaletteColors',
416
- 'alwaysPaletteAliases',
417
- ],
418
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
419
- pseudoStates: [
420
- 'hover',
421
- 'pressed',
422
- 'focus-within',
423
- 'invalid',
424
- 'invalid&hover',
425
- 'invalid&pressed',
426
- 'readonly',
427
- 'disabled',
428
- ],
429
- defaults: {
430
- default: 'muted',
431
- },
432
- }),
433
- },
434
- }),
435
- helperIcon: createLayerConfig({
436
- label: 'helperIcon',
437
- properties: {
438
- color: createConfigurableProperty({
439
- name: 'color',
440
- label: 'Helper icon color',
441
- typeOfFixture: [
442
- 'spectrumColors',
443
- 'foregroundPaletteColors',
444
- 'alwaysPaletteAliases',
445
- ],
446
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
447
- pseudoStates: [
448
- 'hover',
449
- 'pressed',
450
- 'focus-within',
451
- 'invalid',
452
- 'invalid&hover',
453
- 'invalid&pressed',
454
- 'readonly',
455
- 'disabled',
456
- ],
457
- defaults: {
458
- default: 'muted',
459
- },
460
- }),
461
- },
462
- }),
463
- helperText: createLayerConfig({
464
- label: 'helpText',
465
- properties: {
466
- color: createConfigurableProperty({
467
- name: 'color',
468
- label: 'Helper text color',
469
- typeOfFixture: [
470
- 'spectrumColors',
471
- 'foregroundPaletteColors',
472
- 'alwaysPaletteAliases',
473
- ],
474
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
475
- pseudoStates: [
476
- 'hover',
477
- 'pressed',
478
- 'focus-within',
479
- 'invalid',
480
- 'invalid&hover',
481
- 'invalid&pressed',
482
- 'readonly',
483
- 'disabled',
484
- ],
485
- defaults: {
486
- default: 'brand',
487
- },
488
- }),
489
- },
490
- }),
491
- },
492
- }),
493
- },
494
- }),
495
- },
496
- });
@@ -1,183 +0,0 @@
1
- import {
2
- alwaysPaletteAliases,
3
- foregroundPaletteColors,
4
- iconSizes,
5
- spacingAliases,
6
- spectrumColors,
7
- textDecorationLines,
8
- textVariantsWithoutEmphasized,
9
- } from '@yahoo/uds/fixtures';
10
- import {
11
- createConfigurableProperty,
12
- createLayerConfig,
13
- createVariantConfigWithProperties,
14
- } from '@yahoo/uds/tokens';
15
-
16
- import type { ComponentConfig } from '../types';
17
-
18
- function defineComponentConfig<T extends ComponentConfig>(config: T): T {
19
- return config;
20
- }
21
-
22
- export const LinkConfig = defineComponentConfig({
23
- label: 'Link',
24
- description:
25
- 'Customizing your own buttons involves adjusting text styles, icon sizes, and spacing values to create a personalized button.',
26
- variants: {
27
- textStyle: createVariantConfigWithProperties({
28
- label: 'Text Style',
29
- description: '',
30
- isConfigurable: true,
31
- default: 'title1',
32
- options: textVariantsWithoutEmphasized,
33
- layers: {
34
- root: createLayerConfig({
35
- label: 'root',
36
- properties: {
37
- gap: createConfigurableProperty({
38
- name: 'gap',
39
- label: 'Gap',
40
- typeOfFixture: ['spacingAliases'],
41
- values: [spacingAliases],
42
- defaults: {
43
- display1: '2',
44
- display2: '2',
45
- display3: '2',
46
- title1: '2',
47
- title2: '2',
48
- title3: '2',
49
- title4: '2',
50
- headline1: '2',
51
- body1: '2',
52
- label1: '2',
53
- label2: '2',
54
- label3: '2',
55
- label4: '2',
56
- caption1: '2',
57
- caption2: '2',
58
- legal1: '2',
59
- ui1: '2',
60
- ui2: '2',
61
- ui3: '2',
62
- ui4: '2',
63
- ui5: '2',
64
- ui6: '2',
65
- },
66
- }),
67
- },
68
- }),
69
- icon: createLayerConfig({
70
- label: 'icon',
71
- properties: {
72
- size: createConfigurableProperty({
73
- name: 'iconSize',
74
- label: 'Icon size',
75
- typeOfFixture: ['iconSizes'],
76
- values: [iconSizes],
77
- defaults: {
78
- display1: 'lg',
79
- display2: 'lg',
80
- display3: 'lg',
81
- title1: 'md',
82
- title2: 'md',
83
- title3: 'md',
84
- title4: 'md',
85
- headline1: 'md',
86
- body1: 'md',
87
- label1: 'md',
88
- label2: 'md',
89
- label3: 'md',
90
- label4: 'sm',
91
- caption1: 'md',
92
- caption2: 'sm',
93
- legal1: 'md',
94
- ui1: 'md',
95
- ui2: 'md',
96
- ui3: 'md',
97
- ui4: 'md',
98
- ui5: 'md',
99
- ui6: 'md',
100
- },
101
- }),
102
- },
103
- }),
104
- },
105
- }),
106
- variant: createVariantConfigWithProperties({
107
- label: 'Variants',
108
- description: 'Variants',
109
- isConfigurable: true,
110
- default: 'primary',
111
- options: ['primary', 'secondary', 'tertiary', 'on-color'],
112
- layers: {
113
- root: createLayerConfig({
114
- label: 'root',
115
- properties: {
116
- color: createConfigurableProperty({
117
- name: 'color',
118
- label: 'Text color',
119
- typeOfFixture: ['spectrumColors', 'foregroundPaletteColors', 'alwaysPaletteAliases'],
120
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
121
- pseudoStates: ['hover', 'pressed'],
122
- defaults: {
123
- primary: 'primary',
124
- secondary: 'secondary',
125
- tertiary: 'tertiary',
126
- 'on-color': 'on-color',
127
- },
128
- }),
129
- textDecorationLine: createConfigurableProperty({
130
- name: 'textDecorationLine',
131
- label: 'Underline',
132
- typeOfFixture: ['textDecorationLines'],
133
- values: [textDecorationLines],
134
- pseudoStates: ['hover', 'pressed'],
135
- defaults: {
136
- primary: 'none',
137
- secondary: 'none',
138
- tertiary: 'none',
139
- 'on-color': 'none',
140
- },
141
- }),
142
- },
143
- }),
144
- iconStart: createLayerConfig({
145
- label: 'iconStart',
146
- properties: {
147
- color: createConfigurableProperty({
148
- name: 'color',
149
- label: 'Icon start color',
150
- typeOfFixture: ['spectrumColors', 'foregroundPaletteColors', 'alwaysPaletteAliases'],
151
- pseudoStates: ['hover', 'pressed'],
152
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
153
- defaults: {
154
- primary: 'primary',
155
- secondary: 'secondary',
156
- tertiary: 'tertiary',
157
- 'on-color': 'on-color',
158
- },
159
- }),
160
- },
161
- }),
162
- iconEnd: createLayerConfig({
163
- label: 'iconEnd',
164
- properties: {
165
- color: createConfigurableProperty({
166
- name: 'color',
167
- label: 'Icon end color',
168
- typeOfFixture: ['spectrumColors', 'foregroundPaletteColors', 'alwaysPaletteAliases'],
169
- pseudoStates: ['hover', 'pressed'],
170
- values: [spectrumColors, foregroundPaletteColors, alwaysPaletteAliases],
171
- defaults: {
172
- primary: 'primary',
173
- secondary: 'secondary',
174
- tertiary: 'tertiary',
175
- 'on-color': 'on-color',
176
- },
177
- }),
178
- },
179
- }),
180
- },
181
- }),
182
- },
183
- });