@yahoo/uds 1.0.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (201) hide show
  1. package/cli/bin/uds-darwin-arm64-baseline +0 -0
  2. package/cli/bin/uds-linux-x64-baseline +0 -0
  3. package/cli/commands/expo/build.ts +1 -1
  4. package/cli/commands/sync.ts +1 -1
  5. package/cli/utils/configWorker.ts +2 -2
  6. package/cli/utils/purgeCSS.ts +2 -2
  7. package/cli/utils/setupConfigWorker.ts +2 -2
  8. package/cli/utils/types.ts +5 -2
  9. package/dist/{Image.native-D96MZTYD.d.cts → Image.native-BnaKznW1.d.cts} +1 -1
  10. package/dist/{Image.native-D6qA03vT.d.ts → Image.native-BySeDVdT.d.ts} +1 -1
  11. package/dist/{chunk-VG5VAHYR.cjs → chunk-5AGBM4YW.cjs} +2 -2
  12. package/dist/{chunk-BNBFA73B.js → chunk-BJZSTZKO.js} +4 -4
  13. package/dist/{chunk-B7X77UTF.cjs → chunk-BQENUWKR.cjs} +2 -2
  14. package/dist/{chunk-D5GE4WP4.cjs → chunk-FXA7CXCG.cjs} +2 -2
  15. package/dist/{chunk-HY56NZEJ.js → chunk-G56DRBBO.js} +2 -2
  16. package/dist/{chunk-FMWP4OJR.js → chunk-HDTC4SXA.js} +1 -1
  17. package/dist/{chunk-MIEZCJHO.cjs → chunk-QDDUQMIL.cjs} +1 -1
  18. package/dist/{chunk-55JFYGC7.js → chunk-RTLUKBLZ.js} +2 -2
  19. package/dist/{chunk-WRJEEPKK.cjs → chunk-UEKY6CPD.cjs} +1 -1
  20. package/dist/{chunk-HR7JPJLN.cjs → chunk-UNYRPTSW.cjs} +2 -2
  21. package/dist/{chunk-5MYSY56L.js → chunk-V4IAOCQT.js} +1 -1
  22. package/dist/{chunk-HF5DHYIT.cjs → chunk-V4KQO6WZ.cjs} +1 -1
  23. package/dist/{chunk-TO7LE2BM.js → chunk-VYFYXMA5.js} +2 -2
  24. package/dist/{chunk-5UHMAJB4.js → chunk-WTM3H6RK.js} +1 -1
  25. package/dist/{chunk-CNSDQ4UJ.cjs → chunk-XHR7XP5T.cjs} +3 -3
  26. package/dist/{chunk-L7X6ZDMI.js → chunk-XVDIMP4I.js} +2 -2
  27. package/dist/client/index.cjs +3 -3
  28. package/dist/client/index.d.cts +2 -1
  29. package/dist/client/index.d.ts +2 -1
  30. package/dist/client/index.js +4 -4
  31. package/dist/experimental/index.cjs +2 -2
  32. package/dist/experimental/index.d.cts +9 -17
  33. package/dist/experimental/index.d.ts +9 -17
  34. package/dist/experimental/index.js +2 -2
  35. package/dist/experimental/index.native.cjs +2 -2
  36. package/dist/experimental/index.native.d.cts +4 -3
  37. package/dist/experimental/index.native.d.ts +4 -3
  38. package/dist/experimental/index.native.js +2 -2
  39. package/dist/fixtures.cjs +1 -1
  40. package/dist/fixtures.d.ts +2 -2
  41. package/dist/fixtures.js +1 -1
  42. package/dist/index.cjs +1 -1
  43. package/dist/index.d.cts +3 -2
  44. package/dist/index.d.ts +3 -2
  45. package/dist/index.js +2 -2
  46. package/dist/index.native.cjs +2 -2
  47. package/dist/index.native.d.cts +5 -5
  48. package/dist/index.native.d.ts +5 -5
  49. package/dist/index.native.js +2 -2
  50. package/dist/metafile-cjs.json +1 -1
  51. package/dist/metafile-esm.json +1 -1
  52. package/dist/tailwind/plugin.cjs +2 -2
  53. package/dist/tailwind/plugin.d.cts +2 -1
  54. package/dist/tailwind/plugin.d.ts +2 -1
  55. package/dist/tailwind/plugin.js +3 -3
  56. package/dist/tailwind/purger.cjs +1 -1
  57. package/dist/tailwind/purger.js +1 -1
  58. package/dist/tailwind/tsMorph.cjs +2 -2
  59. package/dist/tailwind/tsMorph.js +2 -2
  60. package/dist/tailwind/utils.cjs +1 -1
  61. package/dist/tailwind/utils.d.cts +2 -1
  62. package/dist/tailwind/utils.d.ts +2 -1
  63. package/dist/tailwind/utils.js +1 -1
  64. package/dist/tokens/index.cjs +1 -1
  65. package/dist/tokens/index.d.cts +3 -2
  66. package/dist/tokens/index.d.ts +3 -2
  67. package/dist/tokens/index.js +1 -1
  68. package/dist/tokens/index.native.cjs +1 -1
  69. package/dist/tokens/index.native.d.cts +3 -2
  70. package/dist/tokens/index.native.d.ts +3 -2
  71. package/dist/tokens/index.native.js +1 -1
  72. package/dist/tokens/parseTokens.cjs +1 -1
  73. package/dist/tokens/parseTokens.d.cts +2 -1
  74. package/dist/tokens/parseTokens.d.ts +2 -1
  75. package/dist/tokens/parseTokens.js +1 -1
  76. package/dist/{types-C4OR1S9X.d.cts → types-B_LqmFC1.d.cts} +2 -4
  77. package/dist/{types-C4OR1S9X.d.ts → types-B_LqmFC1.d.ts} +2 -4
  78. package/dist/{types-Bi1Q20iy.d.ts → types-CDWK8Kiq.d.cts} +2 -4
  79. package/dist/{types-Bi1Q20iy.d.cts → types-CDWK8Kiq.d.ts} +2 -4
  80. package/package.json +207 -207
  81. package/cli/bin/uds-darwin-x64 +0 -0
  82. package/cli/bin/uds-linux-arm64 +0 -0
  83. package/cli/bin/uds-windows-x64-baseline.exe +0 -0
  84. package/dist/Image.native-BTcdQraV.d.ts +0 -39
  85. package/dist/Image.native-DX2YWGZD.d.ts +0 -39
  86. package/dist/Image.native-M8D2Y2sv.d.cts +0 -39
  87. package/dist/Image.native-QRZjcXm7.d.ts +0 -39
  88. package/dist/Image.native-f8x4GPuV.d.cts +0 -39
  89. package/dist/Image.native-mHTDIRbL.d.cts +0 -39
  90. package/dist/chunk-2C7RDVXS.js +0 -3
  91. package/dist/chunk-2JQBQOM6.cjs +0 -4
  92. package/dist/chunk-47ZDV5TW.js +0 -3
  93. package/dist/chunk-4EJ6WK3H.cjs +0 -2
  94. package/dist/chunk-5DFU4PSC.cjs +0 -2
  95. package/dist/chunk-5LDKFAU4.cjs +0 -2
  96. package/dist/chunk-5YEIGJJN.js +0 -3
  97. package/dist/chunk-6G2JWFC3.js +0 -4
  98. package/dist/chunk-6QLTGUJB.cjs +0 -2
  99. package/dist/chunk-77JE2H36.js +0 -2
  100. package/dist/chunk-7A7DDMD7.cjs +0 -2
  101. package/dist/chunk-7BKASJ4D.cjs +0 -3
  102. package/dist/chunk-7ICJCQTV.cjs +0 -4
  103. package/dist/chunk-7OODVPL6.cjs +0 -2
  104. package/dist/chunk-7SJRCGTP.js +0 -3
  105. package/dist/chunk-AKOUDLRN.cjs +0 -2
  106. package/dist/chunk-AV442FHA.js +0 -3
  107. package/dist/chunk-AY4XUL7M.cjs +0 -3
  108. package/dist/chunk-BIYOCTWR.js +0 -3
  109. package/dist/chunk-BQB5NUKC.cjs +0 -3
  110. package/dist/chunk-CBSKS4K5.cjs +0 -2
  111. package/dist/chunk-CE5ROFEK.cjs +0 -3
  112. package/dist/chunk-CNY6ADXP.js +0 -3
  113. package/dist/chunk-D24YMS3F.cjs +0 -2
  114. package/dist/chunk-D3NVRUYG.cjs +0 -4
  115. package/dist/chunk-DIOVB5EV.js +0 -3
  116. package/dist/chunk-E53NU2VM.js +0 -2
  117. package/dist/chunk-E5X2STIU.js +0 -2
  118. package/dist/chunk-E6BTI63P.cjs +0 -2
  119. package/dist/chunk-E7QYUBHG.js +0 -3
  120. package/dist/chunk-EFYCREMN.js +0 -3
  121. package/dist/chunk-EMPQR5VI.js +0 -3
  122. package/dist/chunk-ET6WP7R7.js +0 -2
  123. package/dist/chunk-EXHCIY4P.cjs +0 -2
  124. package/dist/chunk-F56AWN2Z.js +0 -3
  125. package/dist/chunk-G7GQQIM5.js +0 -3
  126. package/dist/chunk-GVBZYWK6.js +0 -4
  127. package/dist/chunk-H2RSKIJ4.cjs +0 -2
  128. package/dist/chunk-HFHRMJKN.cjs +0 -2
  129. package/dist/chunk-HTDED6CG.js +0 -3
  130. package/dist/chunk-HUYXQPM5.cjs +0 -3
  131. package/dist/chunk-I2ENXXSN.js +0 -2
  132. package/dist/chunk-ITYNB2GX.js +0 -3
  133. package/dist/chunk-IVJD6N6G.cjs +0 -2
  134. package/dist/chunk-JVQ7PW3M.js +0 -3
  135. package/dist/chunk-KH3WJY4K.js +0 -4
  136. package/dist/chunk-KIDADDGN.js +0 -4
  137. package/dist/chunk-KTATHDMS.js +0 -3
  138. package/dist/chunk-L7K4GFJK.cjs +0 -3
  139. package/dist/chunk-LF6V2NFN.cjs +0 -3
  140. package/dist/chunk-LRJNSHQA.cjs +0 -2
  141. package/dist/chunk-MPK4ZX4R.js +0 -3
  142. package/dist/chunk-MPP74SLP.js +0 -2
  143. package/dist/chunk-N3LPKXTZ.cjs +0 -3
  144. package/dist/chunk-ND64MB7X.js +0 -2
  145. package/dist/chunk-NSPDKMNR.cjs +0 -2
  146. package/dist/chunk-O6FFTCHY.js +0 -3
  147. package/dist/chunk-OAYQHFZC.cjs +0 -3
  148. package/dist/chunk-OG5MIFO6.js +0 -3
  149. package/dist/chunk-OH7FOQCA.js +0 -3
  150. package/dist/chunk-OHOQVW2M.js +0 -3
  151. package/dist/chunk-OXDRC7K7.cjs +0 -3
  152. package/dist/chunk-PKL3JLWF.js +0 -2
  153. package/dist/chunk-PSZZ5NTF.cjs +0 -2
  154. package/dist/chunk-QAVZFB5J.cjs +0 -3
  155. package/dist/chunk-QENB6W4I.cjs +0 -4
  156. package/dist/chunk-QFPKRD7L.js +0 -3
  157. package/dist/chunk-QGADB35M.js +0 -4
  158. package/dist/chunk-RFY7RXSM.js +0 -3
  159. package/dist/chunk-RL274CM3.cjs +0 -2
  160. package/dist/chunk-RT46SXH4.cjs +0 -2
  161. package/dist/chunk-S37OVJTV.js +0 -2
  162. package/dist/chunk-SGN6JN5F.cjs +0 -2
  163. package/dist/chunk-TKOGPWM4.cjs +0 -2
  164. package/dist/chunk-TM36S4YW.cjs +0 -2
  165. package/dist/chunk-UI4NLXDH.cjs +0 -2
  166. package/dist/chunk-UWZYIALE.js +0 -3
  167. package/dist/chunk-VCELYR7Q.cjs +0 -3
  168. package/dist/chunk-VEIAMHP4.js +0 -2
  169. package/dist/chunk-VF7WOINA.cjs +0 -2
  170. package/dist/chunk-VHK4FEXK.cjs +0 -4
  171. package/dist/chunk-WEJOZLMZ.js +0 -2
  172. package/dist/chunk-WJBYPKLH.cjs +0 -3
  173. package/dist/chunk-WKHVRU4K.js +0 -3
  174. package/dist/chunk-WR7BWGMO.cjs +0 -2
  175. package/dist/chunk-X5VBG5D7.js +0 -3
  176. package/dist/chunk-XELIMPNH.cjs +0 -4
  177. package/dist/chunk-YACR35TD.js +0 -4
  178. package/dist/chunk-YUYEO5DZ.cjs +0 -2
  179. package/dist/chunk-ZDKN5LRE.js +0 -3
  180. package/dist/chunk-ZFYJXGZM.cjs +0 -2
  181. package/dist/chunk-ZMPSBRKW.js +0 -2
  182. package/dist/motionFeatures-GFOZDTZE.js +0 -1
  183. package/dist/motionFeatures-H5RRG7RP.js +0 -1
  184. package/dist/motionFeatures-WFC6MN64.cjs +0 -1
  185. package/dist/motionFeatures-WUDKXXR7.js +0 -1
  186. package/dist/motionFeatures-XXMSSBUB.cjs +0 -1
  187. package/dist/motionFeatures-ZAB6OWON.cjs +0 -1
  188. package/dist/types-BVfWAIpr.d.cts +0 -909
  189. package/dist/types-BVfWAIpr.d.ts +0 -909
  190. package/dist/types-BkcFcA6N.d.cts +0 -909
  191. package/dist/types-BkcFcA6N.d.ts +0 -909
  192. package/dist/types-C7KJV1b1.d.cts +0 -943
  193. package/dist/types-C7KJV1b1.d.ts +0 -943
  194. package/dist/types-DVTR9ROz.d.cts +0 -942
  195. package/dist/types-DVTR9ROz.d.ts +0 -942
  196. package/dist/types-JTm5E7im.d.cts +0 -943
  197. package/dist/types-JTm5E7im.d.ts +0 -943
  198. package/dist/types-uSRlDJAd.d.cts +0 -942
  199. package/dist/types-uSRlDJAd.d.ts +0 -942
  200. /package/dist/{motionFeatures-NR4MMJ3L.cjs → motionFeatures-X2TTGYMV.cjs} +0 -0
  201. /package/dist/{motionFeatures-AEY3XSQX.js → motionFeatures-Y7AWRH5K.js} +0 -0
@@ -1,909 +0,0 @@
1
- import { Spring } from 'framer-motion';
2
- import { PropsWithChildren } from 'react';
3
-
4
- declare const alwaysPalette: {
5
- white: string;
6
- black: string;
7
- transparent: string;
8
- current: string;
9
- };
10
-
11
- declare const UDS_PREFIX = "uds";
12
- declare const AVATAR_SIZE_PREFIX = "uds-avatar-size";
13
- declare const BORDER_RADIUS_PREFIX = "uds-border-radius";
14
- declare const BORDER_WIDTH_PREFIX = "uds-border-width";
15
- declare const FONT_FAMILY_PREFIX = "uds-font";
16
- declare const FONT_SIZE_PREFIX = "uds-font-size";
17
- declare const FONT_WEIGHT_PREFIX = "uds-font-weight";
18
- declare const ICON_SIZE_PREFIX = "uds-icon-size";
19
- declare const LINE_HEIGHT_PREFIX = "uds-line-height";
20
- declare const MOTION_PREFIX = "uds-motion";
21
- declare const SPECTRUM_COLOR_PREFIX = "uds-spectrum-color";
22
- declare const TEXT_TRANSFORM_PREFIX = "uds-text-transform";
23
- declare const DARK_COLOR_MODE_CLASSNAME = "uds-color-mode-dark";
24
- declare const LIGHT_COLOR_MODE_CLASSNAME = "uds-color-mode-light";
25
- declare const XSMALL_SCALE_MODE_CLASSNAME = "uds-scale-mode-xsmall";
26
- declare const SMALL_SCALE_MODE_CLASSNAME = "uds-scale-mode-small";
27
- declare const MEDIUM_SCALE_MODE_CLASSNAME = "uds-scale-mode-medium";
28
- declare const LARGE_SCALE_MODE_CLASSNAME = "uds-scale-mode-large";
29
- declare const XLARGE_SCALE_MODE_CLASSNAME = "uds-scale-mode-xlarge";
30
- declare const XXLARGE_SCALE_MODE_CLASSNAME = "uds-scale-mode-xxlarge";
31
- declare const XXXLARGE_SCALE_MODE_CLASSNAME = "uds-scale-mode-xxxlarge";
32
- declare const DEFAULT_COLOR_MODE_CLASSNAME = "uds-color-mode-light";
33
- declare const DEFAULT_SCALE_MODE_CLASSNAME = "uds-scale-mode-large";
34
- declare const BUTTON_CSS_VAR_MAP: {
35
- readonly borderRadius: "--uds-button-border-radius";
36
- readonly borderWidth: "--uds-button-border-width";
37
- readonly color: "--uds-button-color";
38
- readonly backgroundColor: "--uds-button-background-color";
39
- readonly borderColor: "--uds-button-border-color";
40
- readonly padding: "--uds-button-padding";
41
- readonly columnGap: "--uds-button-gap";
42
- readonly fontFamily: "--uds-button-font";
43
- readonly fontWeight: "--uds-button-font-weight";
44
- readonly fontSize: "--uds-button-font-size";
45
- readonly lineHeight: "--uds-button-line-height";
46
- readonly textTransform: "--uds-button-text-transform";
47
- readonly iconSize: "--uds-button-icon-size";
48
- readonly effects: {
49
- readonly scale: {
50
- readonly hover: "--uds-button-effects-scale--hover";
51
- readonly pressed: "--uds-button-effects-scale--pressed";
52
- };
53
- };
54
- };
55
- declare const ICON_BUTTON_CSS_VAR_MAP: {
56
- readonly padding: "--uds-icon-button-padding";
57
- readonly iconSize: "--uds-icon-button-icon-size";
58
- };
59
- declare const PSEUDO_STYLE_SELECTOR_MAP: {
60
- readonly hover: ":hover:not([disabled])";
61
- readonly pressed: ":active:not([disabled])";
62
- readonly disabled: ":disabled";
63
- readonly focused: ":focus-visible";
64
- };
65
-
66
- declare const UDS_FONTS_CDN_PREFIX = "https://s.yimg.com/bw/fonts";
67
- type FontDeclarationConfig = {
68
- fontFamily: string;
69
- fontDisplay: 'swap';
70
- fontStyle?: 'normal' | 'italic';
71
- fontWeight?: FontWeightNumeric;
72
- src: `url('${typeof UDS_FONTS_CDN_PREFIX}/${string}.woff2') format('woff2')`;
73
- };
74
- declare const FONT_DECLARATIONS_MAP: {
75
- readonly 'centra-no2': {
76
- readonly fallback: string[];
77
- readonly type: "sans";
78
- readonly isVariableFont: false;
79
- readonly declarations: [{
80
- readonly fontFamily: "Centra No2";
81
- readonly fontStyle: "normal";
82
- readonly fontDisplay: "swap";
83
- readonly fontWeight: "100";
84
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-hairline.woff2') format('woff2')";
85
- }, {
86
- readonly fontFamily: "Centra No2";
87
- readonly fontStyle: "italic";
88
- readonly fontDisplay: "swap";
89
- readonly fontWeight: "100";
90
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-hairline-italic.woff2') format('woff2')";
91
- }, {
92
- readonly fontFamily: "Centra No2";
93
- readonly fontStyle: "normal";
94
- readonly fontDisplay: "swap";
95
- readonly fontWeight: "200";
96
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-thin.woff2') format('woff2')";
97
- }, {
98
- readonly fontFamily: "Centra No2";
99
- readonly fontStyle: "italic";
100
- readonly fontDisplay: "swap";
101
- readonly fontWeight: "200";
102
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-thin-italic.woff2') format('woff2')";
103
- }, {
104
- readonly fontFamily: "Centra No2";
105
- readonly fontStyle: "normal";
106
- readonly fontDisplay: "swap";
107
- readonly fontWeight: "300";
108
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-light.woff2') format('woff2')";
109
- }, {
110
- readonly fontFamily: "Centra No2";
111
- readonly fontStyle: "italic";
112
- readonly fontDisplay: "swap";
113
- readonly fontWeight: "300";
114
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-light-italic.woff2') format('woff2')";
115
- }, {
116
- readonly fontFamily: "Centra No2";
117
- readonly fontStyle: "normal";
118
- readonly fontDisplay: "swap";
119
- readonly fontWeight: "400";
120
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-book.woff2') format('woff2')";
121
- }, {
122
- readonly fontFamily: "Centra No2";
123
- readonly fontStyle: "italic";
124
- readonly fontDisplay: "swap";
125
- readonly fontWeight: "400";
126
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-book-italic.woff2') format('woff2')";
127
- }, {
128
- readonly fontFamily: "Centra No2";
129
- readonly fontStyle: "normal";
130
- readonly fontDisplay: "swap";
131
- readonly fontWeight: "500";
132
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-medium.woff2') format('woff2')";
133
- }, {
134
- readonly fontFamily: "Centra No2";
135
- readonly fontStyle: "italic";
136
- readonly fontDisplay: "swap";
137
- readonly fontWeight: "500";
138
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-medium-italic.woff2') format('woff2')";
139
- }, {
140
- readonly fontFamily: "Centra No2";
141
- readonly fontStyle: "normal";
142
- readonly fontDisplay: "swap";
143
- readonly fontWeight: "700";
144
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-bold.woff2') format('woff2')";
145
- }, {
146
- readonly fontFamily: "Centra No2";
147
- readonly fontStyle: "italic";
148
- readonly fontDisplay: "swap";
149
- readonly fontWeight: "700";
150
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-bold-italic.woff2') format('woff2')";
151
- }, {
152
- readonly fontFamily: "Centra No2";
153
- readonly fontStyle: "normal";
154
- readonly fontDisplay: "swap";
155
- readonly fontWeight: "800";
156
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-extrabold.woff2') format('woff2')";
157
- }, {
158
- readonly fontFamily: "Centra No2";
159
- readonly fontStyle: "italic";
160
- readonly fontDisplay: "swap";
161
- readonly fontWeight: "800";
162
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-extrabold-italic.woff2') format('woff2')";
163
- }, {
164
- readonly fontFamily: "Centra No2";
165
- readonly fontStyle: "normal";
166
- readonly fontDisplay: "swap";
167
- readonly fontWeight: "900";
168
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-black.woff2') format('woff2')";
169
- }, {
170
- readonly fontFamily: "Centra No2";
171
- readonly fontStyle: "italic";
172
- readonly fontDisplay: "swap";
173
- readonly fontWeight: "900";
174
- readonly src: "url('https://s.yimg.com/bw/fonts/centra-no2-black-italic.woff2') format('woff2')";
175
- }];
176
- };
177
- readonly inter: {
178
- readonly fallback: string[];
179
- readonly type: "sans";
180
- readonly isVariableFont: true;
181
- readonly declarations: [{
182
- readonly fontFamily: "Inter";
183
- readonly fontDisplay: "swap";
184
- readonly src: "url('https://s.yimg.com/bw/fonts/inter-vf.woff2') format('woff2')";
185
- }];
186
- };
187
- readonly 'roboto-mono': {
188
- readonly fallback: string[];
189
- readonly type: "mono";
190
- readonly isVariableFont: false;
191
- readonly declarations: [{
192
- readonly fontFamily: "Roboto Mono";
193
- readonly fontStyle: "normal";
194
- readonly fontDisplay: "swap";
195
- readonly fontWeight: "100";
196
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-100.woff2') format('woff2')";
197
- }, {
198
- readonly fontFamily: "Roboto Mono";
199
- readonly fontStyle: "italic";
200
- readonly fontDisplay: "swap";
201
- readonly fontWeight: "100";
202
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-100-italic.woff2') format('woff2')";
203
- }, {
204
- readonly fontFamily: "Roboto Mono";
205
- readonly fontStyle: "normal";
206
- readonly fontDisplay: "swap";
207
- readonly fontWeight: "200";
208
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-200.woff2') format('woff2')";
209
- }, {
210
- readonly fontFamily: "Roboto Mono";
211
- readonly fontStyle: "italic";
212
- readonly fontDisplay: "swap";
213
- readonly fontWeight: "200";
214
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-200-italic.woff2') format('woff2')";
215
- }, {
216
- readonly fontFamily: "Roboto Mono";
217
- readonly fontStyle: "normal";
218
- readonly fontDisplay: "swap";
219
- readonly fontWeight: "300";
220
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-300.woff2') format('woff2')";
221
- }, {
222
- readonly fontFamily: "Roboto Mono";
223
- readonly fontStyle: "italic";
224
- readonly fontDisplay: "swap";
225
- readonly fontWeight: "300";
226
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-300-italic.woff2') format('woff2')";
227
- }, {
228
- readonly fontFamily: "Roboto Mono";
229
- readonly fontStyle: "normal";
230
- readonly fontDisplay: "swap";
231
- readonly fontWeight: "400";
232
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-400.woff2') format('woff2')";
233
- }, {
234
- readonly fontFamily: "Roboto Mono";
235
- readonly fontStyle: "italic";
236
- readonly fontDisplay: "swap";
237
- readonly fontWeight: "400";
238
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-400-italic.woff2') format('woff2')";
239
- }, {
240
- readonly fontFamily: "Roboto Mono";
241
- readonly fontStyle: "normal";
242
- readonly fontDisplay: "swap";
243
- readonly fontWeight: "500";
244
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-500.woff2') format('woff2')";
245
- }, {
246
- readonly fontFamily: "Roboto Mono";
247
- readonly fontStyle: "italic";
248
- readonly fontDisplay: "swap";
249
- readonly fontWeight: "500";
250
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-500-italic.woff2') format('woff2')";
251
- }, {
252
- readonly fontFamily: "Roboto Mono";
253
- readonly fontStyle: "normal";
254
- readonly fontDisplay: "swap";
255
- readonly fontWeight: "600";
256
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-600.woff2') format('woff2')";
257
- }, {
258
- readonly fontFamily: "Roboto Mono";
259
- readonly fontStyle: "italic";
260
- readonly fontDisplay: "swap";
261
- readonly fontWeight: "600";
262
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-600-italic.woff2') format('woff2')";
263
- }, {
264
- readonly fontFamily: "Roboto Mono";
265
- readonly fontStyle: "normal";
266
- readonly fontDisplay: "swap";
267
- readonly fontWeight: "700";
268
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-700.woff2') format('woff2')";
269
- }, {
270
- readonly fontFamily: "Roboto Mono";
271
- readonly fontStyle: "italic";
272
- readonly fontDisplay: "swap";
273
- readonly fontWeight: "700";
274
- readonly src: "url('https://s.yimg.com/bw/fonts/roboto-mono-700-italic.woff2') format('woff2')";
275
- }];
276
- };
277
- readonly 'yahoo-sans': {
278
- readonly fallback: string[];
279
- readonly type: "sans";
280
- readonly isVariableFont: true;
281
- readonly declarations: [{
282
- readonly fontFamily: "Yahoo Sans";
283
- readonly fontDisplay: "swap";
284
- readonly src: "url('https://s.yimg.com/bw/fonts/yahoo-sans-vf.woff2') format('woff2')";
285
- }];
286
- };
287
- readonly 'yahoo-sans-cr4': {
288
- readonly fallback: string[];
289
- readonly type: "sans";
290
- readonly isVariableFont: true;
291
- readonly declarations: [{
292
- readonly fontFamily: "Yahoo Sans CR4";
293
- readonly fontDisplay: "swap";
294
- readonly src: "url('https://s.yimg.com/bw/fonts/yahoo-sans-cr4-vf.woff2') format('woff2')";
295
- }];
296
- };
297
- readonly 'yahoo-sans-condensed': {
298
- readonly fallback: string[];
299
- readonly type: "sans";
300
- readonly isVariableFont: true;
301
- readonly declarations: [{
302
- readonly fontFamily: "Yahoo Sans Condensed";
303
- readonly fontDisplay: "swap";
304
- readonly src: "url('https://s.yimg.com/bw/fonts/yahoo-sans-condensed-vf.woff2') format('woff2')";
305
- }];
306
- };
307
- readonly 'yahoo-serif-display': {
308
- readonly fallback: string[];
309
- readonly type: "serif";
310
- readonly isVariableFont: false;
311
- readonly declarations: [{
312
- readonly fontFamily: "Yahoo Serif Display";
313
- readonly fontStyle: "normal";
314
- readonly fontDisplay: "swap";
315
- readonly fontWeight: "300";
316
- readonly src: "url('https://s.yimg.com/bw/fonts/yahoo-serif-display-light.woff2') format('woff2')";
317
- }, {
318
- readonly fontFamily: "Yahoo Serif Display";
319
- readonly fontStyle: "normal";
320
- readonly fontDisplay: "swap";
321
- readonly fontWeight: "400";
322
- readonly src: "url('https://s.yimg.com/bw/fonts/yahoo-serif-display-regular.woff2') format('woff2')";
323
- }, {
324
- readonly fontFamily: "Yahoo Serif Display";
325
- readonly fontStyle: "normal";
326
- readonly fontDisplay: "swap";
327
- readonly fontWeight: "700";
328
- readonly src: "url('https://s.yimg.com/bw/fonts/yahoo-serif-display-bold.woff2') format('woff2')";
329
- }, {
330
- readonly fontFamily: "Yahoo Serif Display";
331
- readonly fontStyle: "normal";
332
- readonly fontDisplay: "swap";
333
- readonly fontWeight: "800";
334
- readonly src: "url('https://s.yimg.com/bw/fonts/yahoo-serif-display-extrabold.woff2') format('woff2')";
335
- }, {
336
- readonly fontFamily: "Yahoo Serif Display";
337
- readonly fontStyle: "normal";
338
- readonly fontDisplay: "swap";
339
- readonly fontWeight: "900";
340
- readonly src: "url('https://s.yimg.com/bw/fonts/yahoo-serif-display-black.woff2') format('woff2')";
341
- }];
342
- };
343
- readonly 'yahoo-serif-text': {
344
- readonly fallback: string[];
345
- readonly type: "serif";
346
- readonly isVariableFont: false;
347
- readonly declarations: [{
348
- readonly fontFamily: "Yahoo Serif Text";
349
- readonly fontStyle: "normal";
350
- readonly fontDisplay: "swap";
351
- readonly fontWeight: "400";
352
- readonly src: "url('https://s.yimg.com/bw/fonts/yahoo-serif-text-regular.woff2') format('woff2')";
353
- }, {
354
- readonly fontFamily: "Yahoo Serif Text";
355
- readonly fontStyle: "italic";
356
- readonly fontDisplay: "swap";
357
- readonly fontWeight: "400";
358
- readonly src: "url('https://s.yimg.com/bw/fonts/yahoo-serif-text-italic.woff2') format('woff2')";
359
- }, {
360
- readonly fontFamily: "Yahoo Serif Text";
361
- readonly fontStyle: "normal";
362
- readonly fontDisplay: "swap";
363
- readonly fontWeight: "700";
364
- readonly src: "url('https://s.yimg.com/bw/fonts/yahoo-serif-text-bold.woff2') format('woff2')";
365
- }, {
366
- readonly fontFamily: "Yahoo Serif Text";
367
- readonly fontStyle: "italic";
368
- readonly fontDisplay: "swap";
369
- readonly fontWeight: "700";
370
- readonly src: "url('https://s.yimg.com/bw/fonts/yahoo-serif-text-bold-italic.woff2') format('woff2')";
371
- }];
372
- };
373
- };
374
-
375
- type ClassNameWithoutDot<T extends string> = T extends `.${infer U}` ? U : never;
376
- type ExtractUrlFromFontFaceRule<T extends string> = T extends `url('${infer U}') format('woff2')` ? U : never;
377
- type UnjoinClassNames<T extends string> = T extends `${infer U}.${infer V}` ? U | V : T;
378
- type PaletteType = keyof PaletteConfig;
379
- type PaletteValue = {
380
- hue: Hue;
381
- step: HueStep;
382
- opacity?: string;
383
- };
384
- type Palette = {
385
- [key in PaletteType]: keyof PaletteConfig[key];
386
- };
387
- type Hue = 'gray' | 'purple' | 'indigo' | 'blue' | 'cyan' | 'teal' | 'mint' | 'green' | 'lime' | 'citron' | 'yellow' | 'brown' | 'nude' | 'orange' | 'sunset' | 'red' | 'rose' | 'pink' | 'magenta' | 'carbon';
388
- type HueStep = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15';
389
- type SpectrumColor = `${Hue}-${HueStep}`;
390
- type CorePalette = Record<CorePaletteAlias, PaletteValue>;
391
- type CorePaletteAlias = 'brand' | 'accent' | 'alert' | 'positive' | 'warning';
392
- type BackgroundPaletteAlias = 'primary' | 'secondary';
393
- type BackgroundPalette = Record<BackgroundPaletteAlias, PaletteValue>;
394
- type ForegroundPalette = Record<ForegroundPaletteAlias, PaletteValue>;
395
- type ForegroundPaletteAlias = 'primary' | 'secondary' | 'tertiary' | 'muted' | 'on-color';
396
- type LinePalette = Record<LinePaletteAlias, PaletteValue>;
397
- type LinePaletteAlias = 'primary' | 'secondary' | 'tertiary' | 'muted';
398
- type AlwaysPalette = typeof alwaysPalette;
399
- type AlwaysPaletteAlias = keyof AlwaysPalette;
400
- type ForegroundColor = CorePaletteAlias | ForegroundPaletteAlias | AlwaysPaletteAlias;
401
- type LineColor = CorePaletteAlias | LinePaletteAlias | AlwaysPaletteAlias;
402
- type BackgroundColor = CorePaletteAlias | BackgroundPaletteAlias | AlwaysPaletteAlias;
403
- type PropertyToPaletteAliasMap = {
404
- backgroundColor: BackgroundColor;
405
- borderColor: LineColor;
406
- color: ForegroundColor;
407
- };
408
- type TextVariant = 'display1' | 'display2' | 'display3' | 'title1' | 'title2' | 'title3' | 'title4' | 'headline1' | 'body1' | 'label1' | 'label2' | 'caption1' | 'caption2' | 'legal1';
409
- type FontAlias = 'sans' | 'sans-alt' | 'serif' | 'serif-alt' | 'mono';
410
- type FontType = 'sans' | 'serif' | 'mono';
411
- type FontID = keyof typeof FONT_DECLARATIONS_MAP;
412
- type FontDeclaration = (typeof FONT_DECLARATIONS_MAP)[FontID]['declarations'][number];
413
- type FontFamilyCDNUrl = ExtractUrlFromFontFaceRule<FontDeclaration['src']>;
414
- type FontConfig = Record<FontAlias, FontID>;
415
- type FontCssVar = `--${typeof UDS_PREFIX}-font-${FontAlias}`;
416
- type FontWeightNumeric = '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
417
- type FontWeightDescriptive = 'thin' | 'extralight' | 'light' | 'regular' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black';
418
- type TextTransform = 'none' | 'uppercase' | 'lowercase' | 'capitalize';
419
- type LetterSpacing = 'tighter' | 'tight' | 'normal' | 'wide' | 'wider' | 'widest';
420
- type LineClampAlias = '1' | '2' | '3' | '4' | '5' | '6';
421
- type LineHeight = number;
422
- type FontSize = number;
423
- type TextTransformConfig = Record<TextVariant, TextTransform>;
424
- type FontSizeConfig = Record<TextVariant, FontSize>;
425
- type FontFamilyConfig = Record<TextVariant, FontAlias>;
426
- type FontWeightConfig = Record<TextVariant, FontWeightDescriptive | number>;
427
- type LineHeightConfig = Record<TextVariant, LineHeight>;
428
- type TextProperty = 'fontFamily' | 'fontSize' | 'fontWeight' | 'lineHeight' | 'textTransform';
429
- type TShirtSize = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
430
- type TShirtSizeCommon = Extract<TShirtSize, 'sm' | 'md' | 'lg'>;
431
- type AvatarSize = TShirtSizeCommon;
432
- type AvatarSizeConfig = Record<AvatarSize, number>;
433
- type AvatarShape = BorderRadius;
434
- type IconSize = TShirtSizeCommon;
435
- type IconSizeConfig = Record<IconSize, number>;
436
- type SpacingAlias = '0' | 'px' | '0.5' | '1' | '1.5' | '2' | '2.5' | '3' | '3.5' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '14' | '16' | '20' | '24' | '28' | '32' | '36' | '40' | '44' | '48' | '52' | '56' | '60' | '64' | '72' | '80' | '96';
437
- type SpacingConfig = Record<SpacingAlias, number>;
438
- type BorderRadius = TShirtSize;
439
- type BorderRadiusConfig = Record<BorderRadius, number>;
440
- type BorderWidth = 'none' | 'thin' | 'medium' | 'thick';
441
- type BorderWidthConfig = Record<BorderWidth, number>;
442
- type BoxShadowConfig = {
443
- color: string;
444
- offsetX: number;
445
- offsetY: number;
446
- blurRadius: number;
447
- spreadRadius: number;
448
- }[];
449
- type ColorModeConfig = Record<ColorMode, ColorsConfig>;
450
- type ColorsConfig = {
451
- palette: PaletteConfig;
452
- spectrum: SpectrumConfig;
453
- };
454
- type SpectrumValue = Record<HueStep, string>;
455
- type SpectrumConfig = Record<Hue, SpectrumValue>;
456
- type PaletteConfig = {
457
- core: CorePalette;
458
- background: BackgroundPalette;
459
- foreground: ForegroundPalette;
460
- line: LinePalette;
461
- };
462
- type ScaleConfig = {
463
- avatarSizes: AvatarSizeConfig;
464
- iconSizes: IconSizeConfig;
465
- borderRadius: BorderRadiusConfig;
466
- borderWidth: BorderWidthConfig;
467
- fontFamily: FontFamilyConfig;
468
- fontSize: FontSizeConfig;
469
- fontWeight: FontWeightConfig;
470
- lineHeight: LineHeightConfig;
471
- textTransform: TextTransformConfig;
472
- };
473
- type ScaleModeConfig = Record<ScaleMode, ScaleConfig>;
474
- type ButtonSize = TShirtSizeCommon;
475
- type ButtonPalette = CorePaletteAlias;
476
- type ButtonVariant = 'primary' | 'secondary' | 'tertiary';
477
- type ButtonState = 'hover' | 'pressed';
478
- type ButtonKind = 'fill' | 'outline' | 'ghost';
479
- type ButtonColorEffect = 'lighten' | 'darken' | 'none' | 'custom';
480
- type ButtonColorProperty = 'backgroundColor' | 'borderColor' | 'color';
481
- type ButtonSizeProperty = keyof ButtonSizeConfig;
482
- type ButtonColorEffectConfig = {
483
- options: ButtonColorEffect[];
484
- value: ButtonColorEffect;
485
- };
486
- type ButtonSpectrumColor = {
487
- type: 'spectrum';
488
- value: SpectrumColor;
489
- };
490
- type ButtonPaletteColor<T> = {
491
- type: 'palette';
492
- value: T;
493
- };
494
- type ButtonColorConfig<Property extends ButtonColorProperty> = ButtonPaletteColor<PropertyToPaletteAliasMap[Property]> | ButtonSpectrumColor;
495
- type ButtonColorPropertyConfig = {
496
- [key in ButtonColorProperty]: ButtonColorConfig<key>;
497
- };
498
- type ButtonBaseConfig = {
499
- borderWidth: BorderWidth;
500
- borderRadius: BorderRadius;
501
- } & ButtonColorPropertyConfig;
502
- type ButtonSizeConfig = {
503
- spacingHorizontal: SpacingAlias;
504
- spacingVertical: SpacingAlias;
505
- gap: SpacingAlias;
506
- iconSize: IconSize;
507
- textVariant: TextVariant;
508
- };
509
- type ButtonVariantConfig = {
510
- kind: ButtonKind;
511
- base: ButtonBaseConfig;
512
- effect: ButtonStateEffectConfig;
513
- state: ButtonStateConfig;
514
- };
515
- type ButtonPaletteConfig = {
516
- [variant in ButtonVariant]: ButtonVariantConfig;
517
- };
518
- type ButtonStateConfig = {
519
- [state in ButtonState]: ButtonColorPropertyConfig;
520
- };
521
- type ButtonStateEffectConfig = {
522
- [state in ButtonState]: {
523
- [property in ButtonColorProperty]: ButtonColorEffectConfig;
524
- };
525
- };
526
- type ButtonDefaultsConfig = {
527
- palette: ButtonPalette;
528
- variant: ButtonVariant;
529
- size: ButtonSize;
530
- };
531
- interface ButtonConfig {
532
- defaults: ButtonDefaultsConfig;
533
- size: {
534
- [size in ButtonSize]: ButtonSizeConfig;
535
- };
536
- palette: {
537
- [palette in ButtonPalette]: ButtonPaletteConfig;
538
- };
539
- }
540
- type ButtonCssVarMap = typeof BUTTON_CSS_VAR_MAP;
541
- type ButtonCssVar = ButtonCssVarMap[keyof ButtonCssVarMap];
542
- type ButtonStateCssProperty = keyof ButtonBaseConfig;
543
- type ButtonSizeCssProperty = keyof Pick<ButtonCssVarMap, 'padding' | 'columnGap' | 'fontWeight' | 'fontSize' | 'lineHeight' | 'textTransform' | 'iconSize'>;
544
- type ButtonStateCssVar = Pick<ButtonCssVarMap, ButtonStateCssProperty>[ButtonStateCssProperty];
545
- type ButtonSizeCssVar = Pick<ButtonCssVarMap, ButtonSizeCssProperty>[ButtonSizeCssProperty];
546
- type ButtonStateVarsMap = Record<ButtonStateCssVar, string>;
547
- type ButtonSizeVarsMap = Record<ButtonSizeCssVar, string>;
548
- type ButtonPseudoStyles<ClassName extends string> = {
549
- [key in `.${ButtonState}`]: Record<ClassName, ButtonStateVarsMap>;
550
- };
551
- type ButtonStateVarsWithPseudoStyles<T extends string> = Record<T, ButtonStateVarsMap> & ButtonPseudoStyles<T>;
552
- type ButtonClassMap = {
553
- '.uds-button': {
554
- /** Hardcoded in tailwind plugin */
555
- display: React.CSSProperties['display'];
556
- alignItems: React.CSSProperties['alignItems'];
557
- whiteSpace: React.CSSProperties['whiteSpace'];
558
- /** Driven by css variables */
559
- borderRadius: string;
560
- color: string;
561
- backgroundColor: string;
562
- boxShadow: string;
563
- padding: string;
564
- columnGap: string;
565
- fontFamily: string;
566
- fontWeight: string;
567
- fontSize: string;
568
- lineHeight: string;
569
- textTransform: string;
570
- };
571
- } & ButtonStateVarsWithPseudoStyles<`.uds-button-${ButtonPalette}` | `.uds-button-${ButtonVariant}` | `.uds-button-${ButtonPalette}.uds-button-${ButtonVariant}`> & Record<`.uds-button-${ButtonSize}`, ButtonSizeVarsMap> & ButtonPseudoStyles<'.uds-button'>;
572
- type ButtonClassName = UnjoinClassNames<ClassNameWithoutDot<Exclude<keyof ButtonClassMap, `.${ButtonState}`>>>;
573
- type IconButtonSize = Extract<TShirtSize, 'xs' | TShirtSizeCommon | 'xl'>;
574
- interface IconButtonSizeConfig {
575
- spacing: SpacingAlias;
576
- iconSize: IconSize;
577
- }
578
- interface IconButtonDefaultsConfig extends Omit<ButtonDefaultsConfig, 'size'> {
579
- size: IconButtonSize;
580
- }
581
- interface IconButtonConfig {
582
- defaults: IconButtonDefaultsConfig;
583
- size: {
584
- [size in IconButtonSize]: IconButtonSizeConfig;
585
- };
586
- }
587
- type IconButtonCssVarMap = typeof ICON_BUTTON_CSS_VAR_MAP;
588
- type IconButtonCssVar = IconButtonCssVarMap[keyof IconButtonCssVarMap];
589
- type IconButtonSizeCssVar = IconButtonCssVarMap[keyof IconButtonCssVarMap];
590
- type IconButtonSizeVarsMap = Record<IconButtonSizeCssVar, string>;
591
- type IconButtonClassMap = {
592
- '.uds-icon-button': {
593
- /** Hardcoded in tailwind plugin */
594
- display: React.CSSProperties['display'];
595
- alignItems: React.CSSProperties['alignItems'];
596
- padding: string;
597
- };
598
- } & Record<`.uds-icon-button-${IconButtonSize}`, IconButtonSizeVarsMap>;
599
- type IconButtonClassName = UnjoinClassNames<ClassNameWithoutDot<keyof IconButtonClassMap>>;
600
- type UniversalTokensConfig = {
601
- version: string;
602
- colorMode: ColorModeConfig;
603
- scaleMode: ScaleModeConfig;
604
- font: FontConfig;
605
- button: ButtonConfig;
606
- iconButton: IconButtonConfig;
607
- motion: MotionConfig;
608
- };
609
- type UdsCssVar = FontCssVar | ButtonCssVar | IconButtonCssVar;
610
- type PlatformMode = 'web' | 'ios' | 'android';
611
- type ColorMode = 'light' | 'dark';
612
- type ColorModeForApp = ColorMode | 'system';
613
- type ScaleMode = 'xSmall' | 'small' | 'medium' | 'large' | 'xLarge' | 'xxLarge' | 'xxxLarge';
614
- type ScaleModeForApp = ScaleMode | 'system';
615
- type HighContrastMode = boolean;
616
- type RegionMode = '🇺🇸 US' | '🇩🇪 DE' | '🇫🇷 FR' | '🇨🇳 CN';
617
- interface Modes {
618
- colorMode: ColorMode;
619
- scaleMode: ScaleMode;
620
- }
621
- type Animation = 'none' | 'spin' | 'ping' | 'pulse' | 'bounce' | 'accordion-down' | 'accordion-up';
622
- type TransitionDelay = '0' | '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000';
623
- type TransitionDuration = '0' | '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000';
624
- type TransitionTiming = 'linear' | 'in' | 'out' | 'in-out';
625
- type MotionVariant = 'damped' | 'smooth' | 'subtle' | 'bouncy' | 'veryBouncy';
626
- type MotionVariantSpeed = '1' | '2' | '3' | '4';
627
- type MotionSpringConfigOptions = 'damping' | 'stiffness';
628
- type MotionSpringConfig = Required<Pick<Spring, MotionSpringConfigOptions>>;
629
- type MotionCssVar = `--${typeof MOTION_PREFIX}-${MotionVariant}-${MotionVariantSpeed}-${keyof MotionSpringConfig}`;
630
- type MotionVariantValues = {
631
- [key in MotionVariantSpeed]: MotionSpringConfig;
632
- };
633
- type MotionConfig = Record<MotionVariant, MotionVariantValues>;
634
- type AriaAttribute = 'busy' | 'checked' | 'disabled' | 'expanded' | 'hidden' | 'pressed' | 'readonly' | 'required' | 'selected' | 'invalid';
635
- type DataAttribute = 'active' | 'active-item' | 'autofill' | 'backdrop' | 'enter' | 'leave' | 'focus-visible';
636
- type Flex = '1' | 'auto' | 'initial' | 'none';
637
- type FlexGrow = '0' | '1' | '2' | '3';
638
- type FlexShrink = '0' | '1';
639
- type FlexAlignContent = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'space-between' | 'space-around';
640
- type FlexAlignItems = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
641
- type FlexAlignSelf = 'auto' | 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
642
- type FlexDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';
643
- type FlexWrap = 'wrap' | 'nowrap' | 'wrap-reverse';
644
- type FlexJustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
645
- type FlexBasis = 'min-content';
646
- type Display = 'block' | 'inline-block' | 'inline' | 'flex' | 'inline-flex' | 'table' | 'inline-table' | 'table-caption' | 'table-cell' | 'table-column' | 'table-column-group' | 'table-footer-group' | 'table-header-group' | 'table-row-group' | 'table-row' | 'flow-root' | 'grid' | 'contents';
647
- type Overflow = 'auto' | 'hidden' | 'clip' | 'visible' | 'scroll';
648
- type Position = 'static' | 'fixed' | 'absolute' | 'relative' | 'sticky';
649
- type ImageStyleProps = {
650
- /**
651
- * Determines how the image should be resized to fit its container.
652
- */
653
- contentFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
654
- };
655
- interface BorderStyleProps {
656
- /** Add a border radius to all corners of the box. */
657
- borderRadius?: BorderRadius;
658
- /** Add a border radius to top left corner of the box. */
659
- borderTopStartRadius?: BorderRadius;
660
- /** Add a border radius to top right corner of the box. */
661
- borderTopEndRadius?: BorderRadius;
662
- /** Add a border radius to bottom left corner of the box. */
663
- borderBottomStartRadius?: BorderRadius;
664
- /** Add a border radius to bottom right corner of the box. */
665
- borderBottomEndRadius?: BorderRadius;
666
- /** Adds a custom border color from the palette */
667
- borderColor?: LineColor;
668
- /** Start border color */
669
- borderStartColor?: LineColor;
670
- /** End border color */
671
- borderEndColor?: LineColor;
672
- /** Top border color */
673
- borderTopColor?: LineColor;
674
- /** Bottom border color */
675
- borderBottomColor?: LineColor;
676
- /** Shorthand property to the width of an element's border. */
677
- borderWidth?: BorderWidth;
678
- /** Sets the width of the top and bottom border of an element. */
679
- borderVerticalWidth?: BorderWidth;
680
- /** Sets the width of the start (left) and end (right) border of an element. */
681
- borderHorizontalWidth?: BorderWidth;
682
- /** Sets the width of the start (left) border of an element. */
683
- borderStartWidth?: BorderWidth;
684
- /** Sets the width of the end (right) border of an element. */
685
- borderEndWidth?: BorderWidth;
686
- /** Sets the width of the top border of an element. */
687
- borderTopWidth?: BorderWidth;
688
- /** Sets the width of the bottom border of an element. */
689
- borderBottomWidth?: BorderWidth;
690
- }
691
- interface LayoutStyleProps {
692
- /** Sets whether an element is treated as a block or inline box and the layout used for its children, such as flow layout, grid or flex. */
693
- display?: Display;
694
- /** Shorthand property which sets the desired behavior when content does not fit in the parent element box (overflows) in the horizontal and/or vertical direction. */
695
- overflow?: Overflow;
696
- /** Sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. This property may also be set by using the overflow shorthand property. */
697
- overflowX?: Overflow;
698
- /** sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. This property may also be set by using the overflow shorthand property. */
699
- overflowY?: Overflow;
700
- /** Sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final location of positioned elements. */
701
- position?: Position;
702
- }
703
- interface SpacingStyleProps {
704
- /** Apply inner spacing on all sides. */
705
- spacing?: SpacingAlias;
706
- /** Apply inner spacing on the leading and trailing sides. */
707
- spacingHorizontal?: SpacingAlias;
708
- /** Apply inner spacing on the top and bottom sides. */
709
- spacingVertical?: SpacingAlias;
710
- /** Apply inner spacing on the bottom side. */
711
- spacingBottom?: SpacingAlias;
712
- /** Apply inner spacing on the trailing side. */
713
- spacingEnd?: SpacingAlias;
714
- /** Apply inner spacing on the leading side. */
715
- spacingStart?: SpacingAlias;
716
- /** Apply inner spacing on the top side. */
717
- spacingTop?: SpacingAlias;
718
- /** Apply negative outer spacing on all sides. */
719
- offset?: SpacingAlias;
720
- /** Apply negative outer spacing on the top and bottom sides. */
721
- offsetVertical?: SpacingAlias;
722
- /** Apply negative outer spacing on the leading and trailing sides. */
723
- offsetHorizontal?: SpacingAlias;
724
- /** Apply negative outer spacing on the bottom side. */
725
- offsetBottom?: SpacingAlias;
726
- /** Apply negative outer spacing on the trailing side. */
727
- offsetEnd?: SpacingAlias;
728
- /** Apply negative outer spacing on the leading side. */
729
- offsetStart?: SpacingAlias;
730
- /** Apply negative outer spacing on the top side. */
731
- offsetTop?: SpacingAlias;
732
- /** Control the horizontal gutters between grid and flexbox items. */
733
- columnGap?: SpacingAlias;
734
- /** Control the vertical gutters between grid and flexbox items. */
735
- rowGap?: SpacingAlias;
736
- }
737
- interface FlexStyleProps {
738
- /** Sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. */
739
- alignContent?: FlexAlignContent;
740
- /** Sets the align-self value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. */
741
- alignItems?: FlexAlignItems;
742
- /** Overrides a grid or flex item's align-items value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. */
743
- alignSelf?: FlexAlignSelf;
744
- /** Sets how a flex item will grow or shrink to fit the space available in its flex container. */
745
- flex?: Flex;
746
- /** Sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). */
747
- flexDirection?: FlexDirection;
748
- /** Sets the flex grow factor, which specifies how much of the flex container's remaining space should be assigned to the flex item's main size. */
749
- flexGrow?: FlexGrow;
750
- /** Sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to flex-shrink. */
751
- flexShrink?: FlexShrink;
752
- /** Sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. */
753
- flexWrap?: FlexWrap;
754
- /** Defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. */
755
- justifyContent?: FlexJustifyContent;
756
- /** Sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with box-sizing. https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis */
757
- flexBasis?: FlexBasis;
758
- }
759
- interface StateStyleProps {
760
- interactable?: boolean;
761
- focusable?: boolean;
762
- }
763
- interface TextStyleProps {
764
- /** Color of a Text or Icon element */
765
- color?: ForegroundColor;
766
- /** Color of placeholder text */
767
- placeholderColor?: ForegroundColor;
768
- /** Font family for the text */
769
- fontFamily?: TextVariant | FontAlias;
770
- /** Font size of the text */
771
- fontSize?: TextVariant;
772
- /** Font weight of the text */
773
- fontWeight?: TextVariant | FontWeightDescriptive;
774
- /** Line height of the text */
775
- lineHeight?: TextVariant;
776
- /** Text alignment of the text */
777
- textAlign?: 'center' | 'justify' | 'start' | 'end';
778
- /** Sets the text transform for the text */
779
- textTransform?: TextVariant | TextTransform;
780
- }
781
- interface BackgroundStyleProps {
782
- /** Sets the background color. */
783
- backgroundColor?: BackgroundColor;
784
- }
785
- type CustomSizingStyleProps = {
786
- iconSize?: IconSize;
787
- avatarSize?: AvatarSize;
788
- };
789
- type StyleProps = BackgroundStyleProps & BorderStyleProps & LayoutStyleProps & FlexStyleProps & SpacingStyleProps & TextStyleProps & ImageStyleProps & CustomSizingStyleProps;
790
- interface UniversalBoxProps extends PropsWithChildren, BackgroundStyleProps, BorderStyleProps, FlexStyleProps, LayoutStyleProps, SpacingStyleProps {
791
- /**
792
- * When asChild is set to true, the component's child will be cloned and passed
793
- * the props and behavior required to make it functional.
794
- */
795
- asChild?: boolean;
796
- }
797
- interface UniversalStackProps extends Omit<UniversalBoxProps, 'flexDirection'> {
798
- gap?: SpacingAlias;
799
- }
800
- interface UniversalTextProps extends PropsWithChildren, TextStyleProps, UniversalBoxProps {
801
- /** Style of text. */
802
- variant?: TextVariant;
803
- /** Color of the text. */
804
- color?: ForegroundColor;
805
- }
806
- type SvgIcon = (props: Partial<UniversalIconProps>) => JSX.Element;
807
- type IconVariant = 'fill' | 'outline';
808
- interface UniversalIconProps {
809
- /** Icon to render from the icons package. */
810
- name: SvgIcon;
811
- /** Size of the icon. */
812
- size?: IconSize;
813
- /** Variant for icon. Either fill or outline. */
814
- variant?: IconVariant;
815
- /** Color of the icon. */
816
- color?: ForegroundColor;
817
- }
818
- interface UniversalPressableProps extends UniversalBoxProps {
819
- onPress?: () => void;
820
- }
821
- interface UniversalIconButtonProps {
822
- /**
823
- * The variant of the button
824
- * @default is assigned in the configurator
825
- */
826
- variant?: ButtonVariant;
827
- /**
828
- * The color palette to use for the button
829
- * @default is assigned in the configurator
830
- */
831
- palette?: ButtonPalette;
832
- /** The size of the button. */
833
- size?: IconButtonSize;
834
- /** The icon variant
835
- * @default 'outline'
836
- */
837
- iconVariant?: IconVariant;
838
- /** Icon to render from the icons package. */
839
- name: SvgIcon;
840
- /** Render the button with a loading state. */
841
- loading?: boolean;
842
- /** Disable any motion effects configured in the configurator */
843
- disableEffects?: boolean;
844
- }
845
- interface UniversalButtonProps {
846
- /**
847
- * The variant of the button
848
- * @default is assigned in the configurator
849
- */
850
- variant?: ButtonVariant;
851
- /**
852
- * The color palette to use for the button
853
- * @default is assigned in the configurator
854
- */
855
- palette?: ButtonPalette;
856
- /**
857
- * The size of the button
858
- * @default is assigned in the configurator
859
- */
860
- size?: ButtonSize;
861
- /** The icon variant for start and end icons
862
- * @default 'outline'
863
- */
864
- iconVariant?: IconVariant;
865
- /** The name of the icon to be displayed at the start of the button. */
866
- startIcon?: SvgIcon;
867
- /** The name of the icon to be displayed at the end of the button. */
868
- endIcon?: SvgIcon;
869
- /** Render the button with a loading state. */
870
- loading?: boolean;
871
- /** Disable any motion effects configured in the configurator */
872
- disableEffects?: boolean;
873
- /**
874
- * When asChild is set to true, the component's child will be cloned and passed
875
- * the props and behavior required to make it functional.
876
- */
877
- asChild?: boolean;
878
- }
879
- interface UniversalImageProps extends Omit<UniversalBoxProps, 'width' | 'height'>, ImageStyleProps {
880
- /** The source URL of the image. */
881
- src: string;
882
- /** Provides fallback (alternate) text to display when the image specified by the Image element is not loaded. */
883
- alt?: string;
884
- /** Width of the image in px. */
885
- width?: number;
886
- /** Height of the image in pixel. */
887
- height?: number;
888
- }
889
- interface UniversalAvatarProps extends UniversalImageProps {
890
- /** The size of the Avatar. */
891
- size?: AvatarSize;
892
- /** The shape of the Avatar. */
893
- shape?: BorderRadius;
894
- }
895
- interface UniversalTextInputProps {
896
- disabled?: boolean;
897
- required?: boolean;
898
- backgroundColor?: BackgroundColor;
899
- borderColor?: LineColor;
900
- borderWidth?: BorderWidth;
901
- borderRadius?: BorderRadius;
902
- color?: ForegroundColor;
903
- fontSize?: TextVariant;
904
- placeholderColor?: ForegroundColor;
905
- spacingVertical?: SpacingAlias;
906
- spacingHorizontal?: SpacingAlias;
907
- }
908
-
909
- export { XXXLARGE_SCALE_MODE_CLASSNAME as $, type AvatarSizeConfig as A, type ButtonKind as B, type CorePaletteAlias as C, FONT_FAMILY_PREFIX as D, FONT_SIZE_PREFIX as E, type FontFamilyConfig as F, FONT_WEIGHT_PREFIX as G, ICON_SIZE_PREFIX as H, type IconButtonConfig as I, LINE_HEIGHT_PREFIX as J, MOTION_PREFIX as K, type LineHeightConfig as L, type Modes as M, SPECTRUM_COLOR_PREFIX as N, TEXT_TRANSFORM_PREFIX as O, type PaletteConfig as P, DARK_COLOR_MODE_CLASSNAME as Q, LIGHT_COLOR_MODE_CLASSNAME as R, type ScaleModeForApp as S, type TextTransformConfig as T, type UniversalAvatarProps as U, SMALL_SCALE_MODE_CLASSNAME as V, MEDIUM_SCALE_MODE_CLASSNAME as W, XSMALL_SCALE_MODE_CLASSNAME as X, LARGE_SCALE_MODE_CLASSNAME as Y, XLARGE_SCALE_MODE_CLASSNAME as Z, XXLARGE_SCALE_MODE_CLASSNAME as _, type UniversalButtonProps as a, type FontWeightDescriptive as a$, DEFAULT_COLOR_MODE_CLASSNAME as a0, DEFAULT_SCALE_MODE_CLASSNAME as a1, BUTTON_CSS_VAR_MAP as a2, ICON_BUTTON_CSS_VAR_MAP as a3, PSEUDO_STYLE_SELECTOR_MAP as a4, type FontDeclarationConfig as a5, FONT_DECLARATIONS_MAP as a6, type AlwaysPalette as a7, type AlwaysPaletteAlias as a8, type Animation as a9, type ButtonStateEffectConfig as aA, type ButtonVariant as aB, type ButtonVariantConfig as aC, type ColorModeConfig as aD, type ColorsConfig as aE, type CorePalette as aF, type CustomSizingStyleProps as aG, type DataAttribute as aH, type Display as aI, type Flex as aJ, type FlexAlignContent as aK, type FlexAlignItems as aL, type FlexAlignSelf as aM, type FlexBasis as aN, type FlexDirection as aO, type FlexGrow as aP, type FlexJustifyContent as aQ, type FlexShrink as aR, type FlexStyleProps as aS, type FlexWrap as aT, type FontAlias as aU, type FontConfig as aV, type FontCssVar as aW, type FontFamilyCDNUrl as aX, type FontID as aY, type FontSize as aZ, type FontType as a_, type AriaAttribute as aa, type AvatarShape as ab, type AvatarSize as ac, type BackgroundColor as ad, type BackgroundPalette as ae, type BackgroundPaletteAlias as af, type BackgroundStyleProps as ag, type BorderRadius as ah, type BorderStyleProps as ai, type BorderWidth as aj, type BoxShadowConfig as ak, type ButtonClassMap as al, type ButtonClassName as am, type ButtonColorConfig as an, type ButtonColorEffect as ao, type ButtonColorEffectConfig as ap, type ButtonColorProperty as aq, type ButtonColorPropertyConfig as ar, type ButtonPalette as as, type ButtonPaletteColor as at, type ButtonSize as au, type ButtonSizeConfig as av, type ButtonSizeProperty as aw, type ButtonSpectrumColor as ax, type ButtonState as ay, type ButtonStateConfig as az, type UniversalPressableProps as b, type FontWeightNumeric as b0, type ForegroundColor as b1, type ForegroundPalette as b2, type ForegroundPaletteAlias as b3, type HighContrastMode as b4, type Hue as b5, type HueStep as b6, type IconButtonClassMap as b7, type IconButtonClassName as b8, type IconButtonDefaultsConfig as b9, type ScaleModeConfig as bA, type SpacingAlias as bB, type SpacingConfig as bC, type SpacingStyleProps as bD, type SpectrumColor as bE, type SpectrumConfig as bF, type StateStyleProps as bG, type TextProperty as bH, type TextStyleProps as bI, type TextTransform as bJ, type TextVariant as bK, type TransitionDelay as bL, type TransitionDuration as bM, type TransitionTiming as bN, type TShirtSize as bO, type TShirtSizeCommon as bP, type UdsCssVar as bQ, type UniversalTextInputProps as bR, type IconButtonSize as ba, type IconSize as bb, type IconVariant as bc, type ImageStyleProps as bd, type LayoutStyleProps as be, type LetterSpacing as bf, type LineClampAlias as bg, type LineColor as bh, type LineHeight as bi, type LinePalette as bj, type LinePaletteAlias as bk, type MotionCssVar as bl, type MotionSpringConfig as bm, type MotionSpringConfigOptions as bn, type MotionVariant as bo, type MotionVariantSpeed as bp, type MotionVariantValues as bq, type Overflow as br, type Palette as bs, type PaletteType as bt, type PaletteValue as bu, type PlatformMode as bv, type Position as bw, type PropertyToPaletteAliasMap as bx, type RegionMode as by, type ScaleConfig as bz, type UniversalIconButtonProps as c, type UniversalImageProps as d, type ButtonBaseConfig as e, type ButtonConfig as f, type UniversalBoxProps as g, type UniversalStackProps as h, type UniversalTextProps as i, type UniversalIconProps as j, type ColorModeForApp as k, type ColorMode as l, type ScaleMode as m, type UniversalTokensConfig as n, type StyleProps as o, type IconSizeConfig as p, type BorderRadiusConfig as q, type BorderWidthConfig as r, type FontSizeConfig as s, type FontWeightConfig as t, type MotionConfig as u, alwaysPalette as v, UDS_PREFIX as w, AVATAR_SIZE_PREFIX as x, BORDER_RADIUS_PREFIX as y, BORDER_WIDTH_PREFIX as z };