@yahoo/uds 2.11.0 → 3.0.0

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 (115) hide show
  1. package/cli/ButtonFile2.mock.tsx +11 -0
  2. package/cli/bin/uds-darwin-arm64-baseline +0 -0
  3. package/cli/bin/uds-linux-arm64 +0 -0
  4. package/cli/bin/uds-linux-x64-baseline +0 -0
  5. package/cli/cli.ts +1 -1
  6. package/cli/codemods/addCommentAboveComponents.ts +9 -3
  7. package/cli/codemods/flattenButtonVariant.ts +143 -0
  8. package/cli/codemods/utils/index.ts +1 -1
  9. package/cli/commands/codemod/flattenButtonVariant.ts +16 -0
  10. package/cli/commands/expo/_setup.ts +1 -0
  11. package/cli/commands/sync.ts +3 -0
  12. package/cli/preload.ts +1 -0
  13. package/cli/tailwindcss.d.ts +2 -0
  14. package/cli/tsconfig.json +30 -8
  15. package/cli/utils/auth.ts +1 -0
  16. package/cli/utils/configWorker.ts +11 -3
  17. package/cli/utils/purgeCSS.ts +21 -9
  18. package/cli/utils/setupConfigWorker.ts +2 -2
  19. package/cli/utils/sortKeys.ts +5 -0
  20. package/cli/utils/types.ts +3 -1
  21. package/dist/{Text-UCDorZDD.d.cts → Text-yeQcITg9.d.cts} +30 -69
  22. package/dist/{Text-UCDorZDD.d.ts → Text-yeQcITg9.d.ts} +30 -69
  23. package/dist/VStack-CJs5afN8.d.ts +145 -0
  24. package/dist/VStack-GpQHE4xQ.d.cts +145 -0
  25. package/dist/chunk-4G4TBHHL.js +2 -0
  26. package/dist/chunk-6CVEYTLQ.js +2 -0
  27. package/dist/chunk-6XNKVFUM.cjs +2 -0
  28. package/dist/chunk-AFPPCX7S.js +2 -0
  29. package/dist/chunk-BNLUH23E.cjs +1 -0
  30. package/dist/chunk-EWJ3J526.js +2 -0
  31. package/dist/chunk-FOX6Q5GR.cjs +1 -0
  32. package/dist/chunk-HTL6WRXY.cjs +1 -0
  33. package/dist/chunk-J7PUOUXC.cjs +1 -0
  34. package/dist/chunk-N3FKHXEJ.js +2 -0
  35. package/dist/chunk-NUEZVMWZ.cjs +1 -0
  36. package/dist/chunk-O26JIFUR.cjs +3 -0
  37. package/dist/chunk-S5UKKXRV.js +2 -0
  38. package/dist/chunk-WCB4EHGZ.js +3 -0
  39. package/dist/client/index.cjs +2 -2
  40. package/dist/client/index.d.cts +913 -21
  41. package/dist/client/index.d.ts +913 -21
  42. package/dist/client/index.js +3 -3
  43. package/dist/experimental/client/index.cjs +2 -2
  44. package/dist/experimental/client/index.d.cts +14 -49
  45. package/dist/experimental/client/index.d.ts +14 -49
  46. package/dist/experimental/client/index.js +2 -2
  47. package/dist/experimental/index.cjs +2 -2
  48. package/dist/experimental/index.d.cts +4 -55
  49. package/dist/experimental/index.d.ts +4 -55
  50. package/dist/experimental/index.js +1 -1
  51. package/dist/fixtures.cjs +1546 -55
  52. package/dist/fixtures.d.cts +33 -14
  53. package/dist/fixtures.d.ts +33 -14
  54. package/dist/fixtures.js +1519 -49
  55. package/dist/index-CU_UPAew.d.ts +202 -0
  56. package/dist/index-DUFUMc1S.d.cts +202 -0
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.d.cts +245 -128
  59. package/dist/index.d.ts +245 -128
  60. package/dist/index.js +1 -1
  61. package/dist/metafile-cjs.json +1 -1
  62. package/dist/metafile-esm.json +1 -1
  63. package/dist/tailwind/plugin.cjs +1 -2
  64. package/dist/tailwind/plugin.d.cts +19 -5
  65. package/dist/tailwind/plugin.d.ts +19 -5
  66. package/dist/tailwind/plugin.js +2 -2
  67. package/dist/tailwind/purger.cjs +1 -1
  68. package/dist/tailwind/purger.js +2 -2
  69. package/dist/tailwind/tsMorph.cjs +1 -1
  70. package/dist/tailwind/tsMorph.js +1 -1
  71. package/dist/tailwind/utils.cjs +1 -1
  72. package/dist/tailwind/utils.d.cts +80 -28
  73. package/dist/tailwind/utils.d.ts +80 -28
  74. package/dist/tailwind/utils.js +1 -1
  75. package/dist/tokens/automation/configs.cjs +1 -0
  76. package/dist/tokens/automation/configs.d.cts +110 -0
  77. package/dist/tokens/automation/configs.d.ts +110 -0
  78. package/dist/tokens/automation/configs.js +1 -0
  79. package/dist/tokens/automation/properties.cjs +1 -0
  80. package/dist/tokens/automation/properties.d.cts +7 -0
  81. package/dist/tokens/automation/properties.d.ts +7 -0
  82. package/dist/tokens/automation/properties.js +1 -0
  83. package/dist/tokens/index.cjs +1 -1
  84. package/dist/tokens/index.d.cts +9355 -15
  85. package/dist/tokens/index.d.ts +9355 -15
  86. package/dist/tokens/index.js +1 -1
  87. package/dist/tokens/parseTokens.cjs +1 -1
  88. package/dist/tokens/parseTokens.d.cts +7 -23
  89. package/dist/tokens/parseTokens.d.ts +7 -23
  90. package/dist/tokens/parseTokens.js +1 -1
  91. package/dist/types-d2CfR7zp.d.cts +10245 -0
  92. package/dist/types-d2CfR7zp.d.ts +10245 -0
  93. package/package.json +15 -2
  94. package/dist/chunk-3G7IRLGN.js +0 -2
  95. package/dist/chunk-5WBROFT5.cjs +0 -1
  96. package/dist/chunk-6453EQCC.cjs +0 -1
  97. package/dist/chunk-7QHJ6LHA.js +0 -1
  98. package/dist/chunk-EYFQOFYW.cjs +0 -1
  99. package/dist/chunk-FWF2C6TL.cjs +0 -1
  100. package/dist/chunk-FYVGDNGL.js +0 -2
  101. package/dist/chunk-GIJ2FHY5.cjs +0 -1
  102. package/dist/chunk-GL5JI7EX.cjs +0 -2
  103. package/dist/chunk-MOUM7BAW.js +0 -2
  104. package/dist/chunk-PE2P7J44.js +0 -2
  105. package/dist/chunk-RXSJCGB3.cjs +0 -1
  106. package/dist/chunk-SUASN3GG.js +0 -2
  107. package/dist/chunk-U2K4DT7E.js +0 -3
  108. package/dist/chunk-VPR62GYQ.js +0 -2
  109. package/dist/chunk-WJ55DEUW.cjs +0 -2
  110. package/dist/chunk-X6F5UEQ5.js +0 -2
  111. package/dist/chunk-XZCEFUNX.cjs +0 -2
  112. package/dist/types-DPT0rst4.d.cts +0 -991
  113. package/dist/types-DPT0rst4.d.ts +0 -991
  114. /package/dist/{motionFeatures-HQUM526D.cjs → motionFeatures-6LIGGXPL.cjs} +0 -0
  115. /package/dist/{motionFeatures-PRT45UQH.js → motionFeatures-SJISLQ4M.js} +0 -0
@@ -1,18 +1,27 @@
1
1
  import * as tailwindcss_types_config from 'tailwindcss/types/config';
2
- import { B as ButtonConfig, i as ButtonClassMap, I as IconButtonClassMap, U as UniversalTokensConfig, j as ButtonColorProperty, k as ButtonColorPropertyConfig } from '../types-DPT0rst4.cjs';
2
+ import { CSSRuleObject } from 'tailwindcss/types/config';
3
+ import { B as ButtonConfig, i as ButtonClassMap, I as IconButtonClassMap, U as UniversalTokensConfig, j as ButtonColorProperty, k as ButtonColorPropertyConfig } from '../types-d2CfR7zp.cjs';
3
4
  import defaultTailwindTheme from 'tailwindcss/defaultTheme';
4
5
  import '@yahoo/uds-icons/types';
5
6
  import 'motion/react';
6
7
  import 'react';
8
+ import 'type-fest';
7
9
 
8
10
  /** TODO: create typed theme function to ensure valid paths are being used */
9
11
  type ThemeFn = (path: string) => string;
12
+ type SimpleStyleObject = Record<string, string> | CSSRuleObject;
13
+ type CssStyleObject = Record<`.${string}`, SimpleStyleObject | Record<string, SimpleStyleObject>>;
10
14
 
11
15
  declare function getButtonStyles(button: ButtonConfig, theme: ThemeFn): ButtonClassMap;
12
16
 
13
17
  type IconButtonConfig = Exclude<UniversalTokensConfig['iconButton'], undefined>;
14
18
  declare function getIconButtonStyles(iconButton: IconButtonConfig, theme: ThemeFn): IconButtonClassMap;
15
19
 
20
+ /**
21
+ * Generates input styles
22
+ */
23
+ declare function getInputStyles(): CssStyleObject;
24
+
16
25
  type TwFontSizeToExclude = '7xl' | '8xl' | '9xl';
17
26
  type TwdFontSize = Exclude<keyof typeof defaultTailwindTheme.fontSize, TwFontSizeToExclude>;
18
27
  type TwBorderRadiusToExclude = 'none' | '2xl' | '3xl' | 'full';
@@ -20,9 +29,9 @@ type TwBorderRadius = Exclude<keyof typeof defaultTailwindTheme.borderRadius, Tw
20
29
  type TwBorderWidthToExclude = '0' | '8';
21
30
  type TwBorderWidth = Exclude<keyof typeof defaultTailwindTheme.borderWidth, TwBorderWidthToExclude>;
22
31
  declare const udsToTailwindMap: {
23
- fontSize: Record<"display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2", TwdFontSize>;
24
- lineHeight: Record<"display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2", TwdFontSize>;
25
- borderRadius: Record<"sm" | "md" | "lg" | "xl" | "xs", TwBorderRadius>;
32
+ fontSize: Record<"label3" | "label1" | "label4" | "label2" | "caption1" | "headline1" | "caption2" | "title4" | "title3" | "title1" | "display1" | "display2" | "display3" | "title2" | "body1", TwdFontSize>;
33
+ lineHeight: Record<"label3" | "label1" | "label4" | "label2" | "caption1" | "headline1" | "caption2" | "title4" | "title3" | "title1" | "display1" | "display2" | "display3" | "title2" | "body1", TwdFontSize>;
34
+ borderRadius: Record<"md" | "sm" | "lg" | "xl" | "xs", TwBorderRadius>;
26
35
  borderWidth: Record<"medium" | "thin" | "thick", TwBorderWidth>;
27
36
  };
28
37
  /**
@@ -41,6 +50,11 @@ interface TailwindPluginOptions {
41
50
  * @default false
42
51
  */
43
52
  disableFontFaceDeclarations?: boolean;
53
+ /**
54
+ * Generates CSS classes for visually forcing components into a pseudo state (hover, focus, etc)
55
+ * @default false
56
+ */
57
+ generatePseudoStateSuffixes?: boolean;
44
58
  }
45
59
  declare const tailwindPlugin: {
46
60
  (options: TailwindPluginOptions): {
@@ -57,4 +71,4 @@ declare const tailwindPlugin: {
57
71
  * */
58
72
  declare const getUDSContent: () => string[];
59
73
 
60
- export { defaultTailwindThemeAsUdsConfig, getButtonColorForProperty, getButtonStyles, getIconButtonStyles, getUDSContent, tailwindPlugin, udsToTailwindMap };
74
+ export { defaultTailwindThemeAsUdsConfig, getButtonColorForProperty, getButtonStyles, getIconButtonStyles, getInputStyles, getUDSContent, tailwindPlugin, udsToTailwindMap };
@@ -1,18 +1,27 @@
1
1
  import * as tailwindcss_types_config from 'tailwindcss/types/config';
2
- import { B as ButtonConfig, i as ButtonClassMap, I as IconButtonClassMap, U as UniversalTokensConfig, j as ButtonColorProperty, k as ButtonColorPropertyConfig } from '../types-DPT0rst4.js';
2
+ import { CSSRuleObject } from 'tailwindcss/types/config';
3
+ import { B as ButtonConfig, i as ButtonClassMap, I as IconButtonClassMap, U as UniversalTokensConfig, j as ButtonColorProperty, k as ButtonColorPropertyConfig } from '../types-d2CfR7zp.js';
3
4
  import defaultTailwindTheme from 'tailwindcss/defaultTheme';
4
5
  import '@yahoo/uds-icons/types';
5
6
  import 'motion/react';
6
7
  import 'react';
8
+ import 'type-fest';
7
9
 
8
10
  /** TODO: create typed theme function to ensure valid paths are being used */
9
11
  type ThemeFn = (path: string) => string;
12
+ type SimpleStyleObject = Record<string, string> | CSSRuleObject;
13
+ type CssStyleObject = Record<`.${string}`, SimpleStyleObject | Record<string, SimpleStyleObject>>;
10
14
 
11
15
  declare function getButtonStyles(button: ButtonConfig, theme: ThemeFn): ButtonClassMap;
12
16
 
13
17
  type IconButtonConfig = Exclude<UniversalTokensConfig['iconButton'], undefined>;
14
18
  declare function getIconButtonStyles(iconButton: IconButtonConfig, theme: ThemeFn): IconButtonClassMap;
15
19
 
20
+ /**
21
+ * Generates input styles
22
+ */
23
+ declare function getInputStyles(): CssStyleObject;
24
+
16
25
  type TwFontSizeToExclude = '7xl' | '8xl' | '9xl';
17
26
  type TwdFontSize = Exclude<keyof typeof defaultTailwindTheme.fontSize, TwFontSizeToExclude>;
18
27
  type TwBorderRadiusToExclude = 'none' | '2xl' | '3xl' | 'full';
@@ -20,9 +29,9 @@ type TwBorderRadius = Exclude<keyof typeof defaultTailwindTheme.borderRadius, Tw
20
29
  type TwBorderWidthToExclude = '0' | '8';
21
30
  type TwBorderWidth = Exclude<keyof typeof defaultTailwindTheme.borderWidth, TwBorderWidthToExclude>;
22
31
  declare const udsToTailwindMap: {
23
- fontSize: Record<"display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2", TwdFontSize>;
24
- lineHeight: Record<"display1" | "display2" | "display3" | "title1" | "title2" | "title3" | "title4" | "headline1" | "body1" | "label1" | "label2" | "caption1" | "caption2", TwdFontSize>;
25
- borderRadius: Record<"sm" | "md" | "lg" | "xl" | "xs", TwBorderRadius>;
32
+ fontSize: Record<"label3" | "label1" | "label4" | "label2" | "caption1" | "headline1" | "caption2" | "title4" | "title3" | "title1" | "display1" | "display2" | "display3" | "title2" | "body1", TwdFontSize>;
33
+ lineHeight: Record<"label3" | "label1" | "label4" | "label2" | "caption1" | "headline1" | "caption2" | "title4" | "title3" | "title1" | "display1" | "display2" | "display3" | "title2" | "body1", TwdFontSize>;
34
+ borderRadius: Record<"md" | "sm" | "lg" | "xl" | "xs", TwBorderRadius>;
26
35
  borderWidth: Record<"medium" | "thin" | "thick", TwBorderWidth>;
27
36
  };
28
37
  /**
@@ -41,6 +50,11 @@ interface TailwindPluginOptions {
41
50
  * @default false
42
51
  */
43
52
  disableFontFaceDeclarations?: boolean;
53
+ /**
54
+ * Generates CSS classes for visually forcing components into a pseudo state (hover, focus, etc)
55
+ * @default false
56
+ */
57
+ generatePseudoStateSuffixes?: boolean;
44
58
  }
45
59
  declare const tailwindPlugin: {
46
60
  (options: TailwindPluginOptions): {
@@ -57,4 +71,4 @@ declare const tailwindPlugin: {
57
71
  * */
58
72
  declare const getUDSContent: () => string[];
59
73
 
60
- export { defaultTailwindThemeAsUdsConfig, getButtonColorForProperty, getButtonStyles, getIconButtonStyles, getUDSContent, tailwindPlugin, udsToTailwindMap };
74
+ export { defaultTailwindThemeAsUdsConfig, getButtonColorForProperty, getButtonStyles, getIconButtonStyles, getInputStyles, getUDSContent, tailwindPlugin, udsToTailwindMap };