@yahoo/uds 0.5.11 → 1.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 (217) hide show
  1. package/cli/README.md +17 -11
  2. package/cli/bin/uds-darwin-arm64-baseline +0 -0
  3. package/cli/bin/uds-darwin-x64 +0 -0
  4. package/cli/bin/uds-linux-arm64 +0 -0
  5. package/cli/bin/uds-linux-x64-baseline +0 -0
  6. package/cli/bin/uds-windows-x64-baseline.exe +0 -0
  7. package/cli/cli.ts +1 -0
  8. package/cli/consts.ts +1 -7
  9. package/cli/preload.ts +1 -1
  10. package/cli/uds-cli +1 -7
  11. package/cli/utils/configWorker.ts +58 -31
  12. package/cli/utils/purgeCSS.ts +1 -4
  13. package/cli/utils/setupConfigWorker.ts +13 -12
  14. package/dist/{Image.native-BxsXWBqp.d.ts → Image.native-BTcdQraV.d.ts} +2 -2
  15. package/dist/{Image.native-DBoB1LOc.d.cts → Image.native-D6qA03vT.d.ts} +2 -2
  16. package/dist/Image.native-D96MZTYD.d.cts +39 -0
  17. package/dist/Image.native-DX2YWGZD.d.ts +39 -0
  18. package/dist/Image.native-M8D2Y2sv.d.cts +39 -0
  19. package/dist/Image.native-QRZjcXm7.d.ts +39 -0
  20. package/dist/Image.native-f8x4GPuV.d.cts +39 -0
  21. package/dist/Image.native-mHTDIRbL.d.cts +39 -0
  22. package/dist/chunk-2C7RDVXS.js +3 -0
  23. package/dist/chunk-2JQBQOM6.cjs +4 -0
  24. package/dist/chunk-47ZDV5TW.js +3 -0
  25. package/dist/chunk-4EJ6WK3H.cjs +2 -0
  26. package/dist/chunk-55JFYGC7.js +3 -0
  27. package/dist/chunk-5DFU4PSC.cjs +2 -0
  28. package/dist/chunk-5LDKFAU4.cjs +2 -0
  29. package/dist/chunk-5MYSY56L.js +2 -0
  30. package/dist/chunk-5UHMAJB4.js +2 -0
  31. package/dist/chunk-5YEIGJJN.js +3 -0
  32. package/dist/chunk-6G2JWFC3.js +4 -0
  33. package/dist/chunk-6QLTGUJB.cjs +2 -0
  34. package/dist/chunk-77JE2H36.js +2 -0
  35. package/dist/chunk-7A7DDMD7.cjs +2 -0
  36. package/dist/chunk-7BKASJ4D.cjs +3 -0
  37. package/dist/chunk-7ICJCQTV.cjs +4 -0
  38. package/dist/chunk-7OODVPL6.cjs +2 -0
  39. package/dist/chunk-7SJRCGTP.js +3 -0
  40. package/dist/chunk-AKOUDLRN.cjs +2 -0
  41. package/dist/chunk-AV442FHA.js +3 -0
  42. package/dist/chunk-AY4XUL7M.cjs +3 -0
  43. package/dist/chunk-B7X77UTF.cjs +3 -0
  44. package/dist/chunk-BIYOCTWR.js +3 -0
  45. package/dist/chunk-BNBFA73B.js +4 -0
  46. package/dist/chunk-BQB5NUKC.cjs +3 -0
  47. package/dist/chunk-CBSKS4K5.cjs +2 -0
  48. package/dist/chunk-CE5ROFEK.cjs +3 -0
  49. package/dist/chunk-CNSDQ4UJ.cjs +4 -0
  50. package/dist/chunk-CNY6ADXP.js +3 -0
  51. package/dist/chunk-D24YMS3F.cjs +2 -0
  52. package/dist/chunk-D3NVRUYG.cjs +4 -0
  53. package/dist/chunk-D5GE4WP4.cjs +2 -0
  54. package/dist/chunk-DIOVB5EV.js +3 -0
  55. package/dist/chunk-E53NU2VM.js +2 -0
  56. package/dist/chunk-E5X2STIU.js +2 -0
  57. package/dist/chunk-E6BTI63P.cjs +2 -0
  58. package/dist/chunk-E7QYUBHG.js +3 -0
  59. package/dist/chunk-EFYCREMN.js +3 -0
  60. package/dist/chunk-EMPQR5VI.js +3 -0
  61. package/dist/chunk-ET6WP7R7.js +2 -0
  62. package/dist/chunk-EXHCIY4P.cjs +2 -0
  63. package/dist/chunk-F56AWN2Z.js +3 -0
  64. package/dist/chunk-FMWP4OJR.js +2 -0
  65. package/dist/chunk-G7GQQIM5.js +3 -0
  66. package/dist/chunk-GVBZYWK6.js +4 -0
  67. package/dist/chunk-H2RSKIJ4.cjs +2 -0
  68. package/dist/chunk-HF5DHYIT.cjs +2 -0
  69. package/dist/chunk-HFHRMJKN.cjs +2 -0
  70. package/dist/chunk-HR7JPJLN.cjs +2 -0
  71. package/dist/chunk-HTDED6CG.js +3 -0
  72. package/dist/chunk-HUYXQPM5.cjs +3 -0
  73. package/dist/chunk-HY56NZEJ.js +3 -0
  74. package/dist/chunk-I2ENXXSN.js +2 -0
  75. package/dist/chunk-ITYNB2GX.js +3 -0
  76. package/dist/chunk-IVJD6N6G.cjs +2 -0
  77. package/dist/chunk-JVQ7PW3M.js +3 -0
  78. package/dist/chunk-KH3WJY4K.js +4 -0
  79. package/dist/chunk-KIDADDGN.js +4 -0
  80. package/dist/chunk-KTATHDMS.js +3 -0
  81. package/dist/chunk-L7K4GFJK.cjs +3 -0
  82. package/dist/chunk-L7X6ZDMI.js +3 -0
  83. package/dist/chunk-LF6V2NFN.cjs +3 -0
  84. package/dist/chunk-LRJNSHQA.cjs +2 -0
  85. package/dist/chunk-MIEZCJHO.cjs +2 -0
  86. package/dist/chunk-MPK4ZX4R.js +3 -0
  87. package/dist/chunk-MPP74SLP.js +2 -0
  88. package/dist/chunk-N3LPKXTZ.cjs +3 -0
  89. package/dist/chunk-ND64MB7X.js +2 -0
  90. package/dist/chunk-NSPDKMNR.cjs +2 -0
  91. package/dist/chunk-O6FFTCHY.js +3 -0
  92. package/dist/chunk-OAYQHFZC.cjs +3 -0
  93. package/dist/chunk-OG5MIFO6.js +3 -0
  94. package/dist/chunk-OH7FOQCA.js +3 -0
  95. package/dist/chunk-OHOQVW2M.js +3 -0
  96. package/dist/chunk-OXDRC7K7.cjs +3 -0
  97. package/dist/chunk-PKL3JLWF.js +2 -0
  98. package/dist/chunk-PSZZ5NTF.cjs +2 -0
  99. package/dist/chunk-QAVZFB5J.cjs +3 -0
  100. package/dist/chunk-QENB6W4I.cjs +4 -0
  101. package/dist/chunk-QFPKRD7L.js +3 -0
  102. package/dist/chunk-QGADB35M.js +4 -0
  103. package/dist/chunk-RFY7RXSM.js +3 -0
  104. package/dist/chunk-RL274CM3.cjs +2 -0
  105. package/dist/chunk-RT46SXH4.cjs +2 -0
  106. package/dist/chunk-S37OVJTV.js +2 -0
  107. package/dist/chunk-SGN6JN5F.cjs +2 -0
  108. package/dist/chunk-TKOGPWM4.cjs +2 -0
  109. package/dist/chunk-TM36S4YW.cjs +2 -0
  110. package/dist/chunk-TO7LE2BM.js +3 -0
  111. package/dist/chunk-UI4NLXDH.cjs +2 -0
  112. package/dist/chunk-UWZYIALE.js +3 -0
  113. package/dist/chunk-VCELYR7Q.cjs +3 -0
  114. package/dist/chunk-VEIAMHP4.js +2 -0
  115. package/dist/chunk-VF7WOINA.cjs +2 -0
  116. package/dist/chunk-VG5VAHYR.cjs +3 -0
  117. package/dist/chunk-VHK4FEXK.cjs +4 -0
  118. package/dist/chunk-WEJOZLMZ.js +2 -0
  119. package/dist/chunk-WJBYPKLH.cjs +3 -0
  120. package/dist/chunk-WKHVRU4K.js +3 -0
  121. package/dist/chunk-WR7BWGMO.cjs +2 -0
  122. package/dist/chunk-WRJEEPKK.cjs +2 -0
  123. package/dist/chunk-X5VBG5D7.js +3 -0
  124. package/dist/chunk-XELIMPNH.cjs +4 -0
  125. package/dist/chunk-YACR35TD.js +4 -0
  126. package/dist/chunk-YUYEO5DZ.cjs +2 -0
  127. package/dist/chunk-ZDKN5LRE.js +3 -0
  128. package/dist/chunk-ZFYJXGZM.cjs +2 -0
  129. package/dist/chunk-ZMPSBRKW.js +2 -0
  130. package/dist/client/index.cjs +4 -0
  131. package/dist/client/index.d.cts +96 -0
  132. package/dist/client/index.d.ts +96 -0
  133. package/dist/client/index.js +6 -0
  134. package/dist/experimental/index.cjs +3 -3
  135. package/dist/experimental/index.d.cts +296 -100
  136. package/dist/experimental/index.d.ts +296 -100
  137. package/dist/experimental/index.js +3 -3
  138. package/dist/experimental/index.native.cjs +3 -1
  139. package/dist/experimental/index.native.d.cts +6 -5
  140. package/dist/experimental/index.native.d.ts +6 -5
  141. package/dist/experimental/index.native.js +3 -1
  142. package/dist/fixtures.cjs +252 -35
  143. package/dist/fixtures.d.ts +31 -14
  144. package/dist/fixtures.js +230 -31
  145. package/dist/index.cjs +1 -2
  146. package/dist/index.d.cts +201 -27
  147. package/dist/index.d.ts +201 -27
  148. package/dist/index.js +2 -3
  149. package/dist/index.native.cjs +3 -1
  150. package/dist/index.native.d.cts +52 -147
  151. package/dist/index.native.d.ts +52 -147
  152. package/dist/index.native.js +2 -1
  153. package/dist/metafile-cjs.json +1 -1
  154. package/dist/metafile-esm.json +1 -1
  155. package/dist/motionFeatures-AEY3XSQX.js +1 -0
  156. package/dist/motionFeatures-GFOZDTZE.js +1 -0
  157. package/dist/motionFeatures-H5RRG7RP.js +1 -0
  158. package/dist/motionFeatures-NR4MMJ3L.cjs +1 -0
  159. package/dist/motionFeatures-WFC6MN64.cjs +1 -0
  160. package/dist/motionFeatures-WUDKXXR7.js +1 -0
  161. package/dist/motionFeatures-XXMSSBUB.cjs +1 -0
  162. package/dist/motionFeatures-ZAB6OWON.cjs +1 -0
  163. package/dist/styles/toast.css +3 -1
  164. package/dist/styles/toast.d.cts +2 -0
  165. package/dist/styles/toast.d.ts +2 -0
  166. package/dist/tailwind/plugin.cjs +3 -1
  167. package/dist/tailwind/plugin.d.cts +28 -5
  168. package/dist/tailwind/plugin.d.ts +28 -5
  169. package/dist/tailwind/plugin.js +3 -3
  170. package/dist/tailwind/purger.cjs +2 -2
  171. package/dist/tailwind/purger.js +3 -3
  172. package/dist/tailwind/tsMorph.cjs +3 -1
  173. package/dist/tailwind/tsMorph.d.cts +1 -4
  174. package/dist/tailwind/tsMorph.d.ts +1 -4
  175. package/dist/tailwind/tsMorph.js +2 -3
  176. package/dist/tailwind/utils.cjs +1 -0
  177. package/dist/tailwind/utils.d.cts +98 -0
  178. package/dist/tailwind/utils.d.ts +98 -0
  179. package/dist/tailwind/utils.js +1 -0
  180. package/dist/tokens/index.cjs +1 -2
  181. package/dist/tokens/index.d.cts +41 -362
  182. package/dist/tokens/index.d.ts +41 -362
  183. package/dist/tokens/index.js +1 -2
  184. package/dist/tokens/index.native.cjs +3 -1
  185. package/dist/tokens/index.native.d.cts +24 -2
  186. package/dist/tokens/index.native.d.ts +24 -2
  187. package/dist/tokens/index.native.js +3 -1
  188. package/dist/tokens/parseTokens.cjs +1 -2
  189. package/dist/tokens/parseTokens.d.cts +7 -20
  190. package/dist/tokens/parseTokens.d.ts +7 -20
  191. package/dist/tokens/parseTokens.js +1 -2
  192. package/dist/types-BVfWAIpr.d.cts +909 -0
  193. package/dist/types-BVfWAIpr.d.ts +909 -0
  194. package/dist/types-Bi1Q20iy.d.cts +951 -0
  195. package/dist/types-Bi1Q20iy.d.ts +951 -0
  196. package/dist/types-BkcFcA6N.d.cts +909 -0
  197. package/dist/types-BkcFcA6N.d.ts +909 -0
  198. package/dist/types-C4OR1S9X.d.cts +951 -0
  199. package/dist/types-C4OR1S9X.d.ts +951 -0
  200. package/dist/types-C7KJV1b1.d.cts +943 -0
  201. package/dist/types-C7KJV1b1.d.ts +943 -0
  202. package/dist/types-DVTR9ROz.d.cts +942 -0
  203. package/dist/types-DVTR9ROz.d.ts +942 -0
  204. package/dist/types-JTm5E7im.d.cts +943 -0
  205. package/dist/types-JTm5E7im.d.ts +943 -0
  206. package/dist/types-uSRlDJAd.d.cts +942 -0
  207. package/dist/types-uSRlDJAd.d.ts +942 -0
  208. package/package.json +13 -1
  209. package/dist/VStack-BFIFJUVx.d.cts +0 -177
  210. package/dist/VStack-zgq0Zq3N.d.ts +0 -177
  211. package/dist/index.native-Gbm66c6M.d.ts +0 -317
  212. package/dist/index.native-OW5d35eT.d.cts +0 -317
  213. package/dist/styles/globals.css +0 -1
  214. package/dist/types-BofdnBTe.d.cts +0 -436
  215. package/dist/types-BofdnBTe.d.ts +0 -436
  216. package/dist/types-CLPge83Y.d.cts +0 -436
  217. package/dist/types-CLPge83Y.d.ts +0 -436
package/cli/README.md CHANGED
@@ -1,12 +1,14 @@
1
- import { Box } from '@yahoo/uds';
1
+ import { DocTabs } from '~/components/DocTabs';
2
+ import { Box, VStack } from '@yahoo/uds';
2
3
  import { RequiredChip } from '~/components/RequiredChip';
3
4
  import { DocImage } from '~/components/DocImage';
5
+ import { PACKAGE_MANAGERS, CommandSnippet } from '~/components/CommandSnippet';
4
6
 
5
7
  # Universal CLI
6
8
 
7
- > **Early preview notice**: The CLI tool currently requires Bun. This requirement may change in the future but you will need to install and use Bun locally to use the `uds` command.
9
+ > **Update**: The CLI tool no longer requires Bun. You can use any node package manager to run the CLI (e.g. `npx uds sync`).
8
10
 
9
- The Universal CLI is available as command, `uds`. The tool was created with [Bluebun](https://github.com/jamonholmgren/bluebun/) (inspired by [Gluegun](https://github.com/infinitered/gluegun)), but is specifically designed to be used with [Bun](https://bun.sh). Bluebun relies on Bun APIs and is designed to be extremely fast, with no-dependencies.
11
+ The Universal CLI is available as command, `uds`. The tool was created with [Bluebun](https://github.com/jamonholmgren/bluebun/) (inspired by [Gluegun](https://github.com/infinitered/gluegun)). The UDS CLI is a standalone binary that doesn't require having Bun installed locally in order to use it.
10
12
 
11
13
  <Box justifyContent="center">
12
14
  <DocImage light={{ src: '/images/cli-screenshot.png', width: 500, height: 356 }} />
@@ -14,17 +16,20 @@ The Universal CLI is available as command, `uds`. The tool was created with [Blu
14
16
 
15
17
  ## Requirements
16
18
 
17
- 1. To use the CLI, first [install](/docs/getting-started/quick-start#installation) the `@yahoo/uds` package as a dependency in your package.json. This makes the tool available in your repo.
18
-
19
- - Install Bun if you don't already have it:
20
-
21
- ```bash
22
- curl -fsSL https://bun.sh/install | bash
23
- ```
19
+ 1. To use the CLI, first [install](/docs/getting-started/quick-start#installation) the `@yahoo/uds` package as a dependency in your package.json, which has the UDS CLI as a binary.
24
20
 
25
21
  ## Commands
26
22
 
27
- > **Note**: If you are _not_ running the CLI from a package.json script you will need to add `bun` before the binary in order to run it directly. i.e. `bun uds purge`
23
+ > **Note**: If you are _not_ running the CLI from a package.json script you will need to call your package manager execute command before the binary in order to run it directly. i.e. `npx uds purge`
24
+
25
+ <VStack spacingBottom="2">
26
+ <DocTabs
27
+ items={PACKAGE_MANAGERS.map((packageManager) => ({
28
+ label: packageManager,
29
+ content: <CommandSnippet name={packageManager} command="bunx uds purge" />,
30
+ }))}
31
+ />
32
+ </VStack>
28
33
 
29
34
  The following command are available after installing `@yahoo/uds`:
30
35
 
@@ -44,6 +49,7 @@ The `uds sync` command fetches the latest design config from the [Configurator](
44
49
  ```shell
45
50
  uds sync --id [id] --outFile [path]
46
51
  uds sync --id [id]
52
+ uds sync --id [id] --outFile=uds.config.js # pass a file with a JS extension if you are using Javascript
47
53
  ```
48
54
 
49
55
  #### Environment variables
Binary file
Binary file
Binary file
Binary file
package/cli/cli.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /* eslint-disable n/no-unsupported-features/node-builtins */
1
2
  // Start bluebun to run the correct CLI command
2
3
  import { parseArgs } from 'node:util';
3
4
 
package/cli/consts.ts CHANGED
@@ -1,9 +1,3 @@
1
1
  // Supported target platforms by Bun
2
2
  // https://bun.sh/docs/bundler/executables#cross-compile-to-other-platforms
3
- export const SUPPORTED_BUN_PLATFORMS = [
4
- 'linux-x64-baseline',
5
- 'linux-arm64',
6
- 'darwin-x64',
7
- 'darwin-arm64-baseline',
8
- 'windows-x64-baseline',
9
- ];
3
+ export const SUPPORTED_BUN_PLATFORMS = ['linux-x64-baseline', 'darwin-arm64-baseline'];
package/cli/preload.ts CHANGED
@@ -31,7 +31,7 @@ mock.module('@yahoo/uds/tailwind/purger', () => ({
31
31
  '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',
32
32
  fontSize: 'font-size-display1 font-size-title1 ',
33
33
  fontFamily:
34
- 'font-icons font-sans font-sans-beta font-sans-condensed font-serif-text font-serif-display font-display1 font-title1 font-title2 font-title3 font-title4 font-headline1 font-body1 font-label1 font-label2 font-caption1 font-caption2 font-legal1',
34
+ 'font-icons font-sans font-sans-alt font-serif font-serif-alt font-mono font-display1 font-title1 font-title2 font-title3 font-title4 font-headline1 font-body1 font-label1 font-label2 font-caption1 font-caption2 font-legal1',
35
35
  },
36
36
  componentToTwClasses: {
37
37
  Box: 'flex',
package/cli/uds-cli CHANGED
@@ -7,13 +7,7 @@ import path from "path";
7
7
  import {fileURLToPath} from "url";
8
8
 
9
9
  // cli/consts.ts
10
- var SUPPORTED_BUN_PLATFORMS = [
11
- "linux-x64-baseline",
12
- "linux-arm64",
13
- "darwin-x64",
14
- "darwin-arm64-baseline",
15
- "windows-x64-baseline"
16
- ];
10
+ var SUPPORTED_BUN_PLATFORMS = ["linux-x64-baseline", "darwin-arm64-baseline"];
17
11
 
18
12
  // cli/exec.ts
19
13
  var detectPlatform = () => {
@@ -1,52 +1,79 @@
1
+ /* eslint-disable n/no-unsupported-features/node-builtins -- We're using Bun's fetch here because we're in a worker. */
1
2
  // prevents TS errors
2
3
  declare var self: Worker;
3
4
 
4
5
  import { UniversalTokensConfig } from '@yahoo/uds/tokens';
6
+ import { gte } from 'semver';
5
7
 
6
8
  import { ConfigWorkerThreadMessage } from './types';
7
9
 
8
- const CLOUD_FUNCTION = 'https://syncconfig-j57v6zmjrq-uc.a.run.app';
10
+ const PRODUCTION_PREFIX = 'https://config.uds.build';
11
+ const STAGING_PREFIX = 'https://staging.uds.build';
12
+ const LOCAL_PORT = process.env.PORT || 4001;
13
+ const LOCAL_PREFIX = `http://localhost:${LOCAL_PORT}`;
14
+
15
+ let CONFIG_ENDPOINT = `${PRODUCTION_PREFIX}/api/config`;
16
+
17
+ // Setup auth bypass for Vercel preview deployments (staging)
18
+ const PROTECTION_BYPASS = process.env.VERCEL_PROTECTION_BYPASS ?? '';
19
+ const FETCH_REQUEST_INIT: FetchRequestInit = {
20
+ headers: {
21
+ 'x-vercel-protection-bypass': PROTECTION_BYPASS,
22
+ },
23
+ };
24
+
25
+ if (process.env.DATABASE === 'staging') {
26
+ CONFIG_ENDPOINT = `${STAGING_PREFIX}/api/config`;
27
+ }
28
+
29
+ if (process.env.DATABASE === 'local') {
30
+ CONFIG_ENDPOINT = `${LOCAL_PREFIX}/api/config`;
31
+ }
9
32
 
10
33
  self.onmessage = async ({ data }: ConfigWorkerThreadMessage) => {
11
34
  const { id } = data.resp;
12
-
35
+ const FETCH_URL = `${CONFIG_ENDPOINT}?id=${id}`;
13
36
  if (data.type === 'init') {
14
37
  try {
15
- // The firebase packaage available if we're in the UDS monorepo. Listen for updates.
16
- const firebase = await import('database/firebase');
17
-
18
- // Bail if the branch doesn't exist in configurator.
19
- const branchExists = await firebase.branchExists(id);
20
- if (!branchExists) {
21
- throw new Error(`Config id '${id}' does not exist in the Configurator.`);
22
- }
38
+ console.log('Fetching from configurator...');
23
39
 
24
- console.log('Fetching using local database package...');
40
+ const resp = await fetch(FETCH_URL, FETCH_REQUEST_INIT);
25
41
 
26
- firebase.onBranchSnapshot(id, ({ config, status }) => {
27
- postMessage({ type: 'update', resp: { config, status } });
28
- });
29
- } catch (err) {
30
- try {
31
- console.log('Fetching from configurator...');
32
-
33
- // We're using Bun's fetch here because we're in a worker.
34
- // eslint-disable-next-line n/no-unsupported-features/node-builtins
35
- const resp = await fetch(`${CLOUD_FUNCTION}?id=${id}`);
36
- if (!resp.ok) {
37
- throw new Error(`Error fetching config id '${id}'. Does it exist in the Configurator?`);
42
+ if (!resp.ok) {
43
+ // Unauthorized
44
+ if (resp.status === 401) {
45
+ throw new Error(`
46
+ ${resp.status} error: ${resp.statusText}\n
47
+ You're not authorized to fetch from ${FETCH_URL}\n
48
+ Make sure you have a valid VERCEL_PROTECTION_BYPASS token in your root .env.local, which is
49
+ available at https://vercel.com/yahoo-design/configurator/settings/deployment-protection
50
+ `);
38
51
  }
39
52
 
40
- const { config } = ((await resp.json()) as { config: UniversalTokensConfig }) ?? {};
41
- if (!config) {
42
- throw new Error('Config JSON could not be parsed.');
43
- }
53
+ throw new Error(`Error fetching config id '${id}'. Does it exist in the Configurator?`);
54
+ }
44
55
 
45
- postMessage({ type: 'update', resp: { config, status: 'error' } });
46
- } catch (err) {
47
- console.error(`\n${(err as Error).message}\n`);
48
- throw err;
56
+ const { config, udsVersion } =
57
+ ((await resp.json()) as { config: UniversalTokensConfig; udsVersion: string }) ?? {};
58
+ if (!config) {
59
+ throw new Error('Config JSON could not be parsed.');
49
60
  }
61
+
62
+ // check if the locally installed version of UDS is compatible with the config version
63
+ // it needs to be equal or greater than the config version
64
+ const installedUdsVersion = (await import('@yahoo/uds/package.json')).default.version;
65
+ if (!gte(installedUdsVersion, udsVersion)) {
66
+ throw new Error(`
67
+ Installed version of UDS is not compatible with the config version. \n
68
+ Required: ${udsVersion}. Installed: ${installedUdsVersion} \n
69
+ Please update your @yahoo/uds version to ${udsVersion} or higher.
70
+ `);
71
+ }
72
+
73
+ postMessage({ type: 'update', resp: { config, status: 'error' } });
74
+ } catch (err) {
75
+ console.error(`\n${(err as Error).message}\n`);
76
+ throw err;
50
77
  }
51
78
  }
52
79
  };
@@ -6,10 +6,7 @@ import {
6
6
  componentToVariants,
7
7
  variantsList,
8
8
  } from '@yahoo/uds/tailwind/purger';
9
- import {
10
- findReferencesAsJsxElements,
11
- getUsedPropsInReference,
12
- } from '@yahoo/uds/tailwind/tsMorph';
9
+ import { findReferencesAsJsxElements, getUsedPropsInReference } from '@yahoo/uds/tailwind/tsMorph';
13
10
  import {
14
11
  ColorModeConfig,
15
12
  DARK_COLOR_MODE_CLASSNAME,
@@ -11,6 +11,13 @@ export async function setupConfigWorker({ id, outFile, onUpdate }: ConfigWorkerO
11
11
  const workerURL = Bun.pathToFileURL(workerPath).href;
12
12
  const outFilePath = `${Bun.env.PWD}/${outFile}`;
13
13
 
14
+ const outFileExtension = outFile.split('.').pop()?.toLowerCase();
15
+
16
+ if (outFileExtension !== 'ts' && outFileExtension !== 'js') {
17
+ console.error('❌ Output file must be a TypeScript or JavaScript file.');
18
+ process.exit(1);
19
+ }
20
+
14
21
  const worker = new Worker(workerURL);
15
22
 
16
23
  worker.addEventListener('open', () => {
@@ -23,25 +30,19 @@ export async function setupConfigWorker({ id, outFile, onUpdate }: ConfigWorkerO
23
30
  // this can give us a false diff when writing to existing file
24
31
  const sortedConfig = sortKeys(data.resp.config);
25
32
 
26
- let configContent = `
33
+ const configContentTs = `
27
34
  import { type UniversalTokensConfig } from '@yahoo/uds';
28
35
 
29
36
  export const config: UniversalTokensConfig = ${JSON.stringify(sortedConfig, null, 2)};
30
37
  `.trimStart();
31
38
 
32
- console.log(`✅ Synced UDS config ${id} to ${outFilePath}`);
33
-
34
- // TODO: Remove this once the migration work is complete
35
- configContent = configContent
36
- .replace(/"l"/g, '"lg"')
37
- .replace(/"m"/g, '"md"')
38
- .replace(/"s"/g, '"sm"');
39
+ const configContentJs = `
40
+ export const config = ${JSON.stringify(sortedConfig, null, 2)};
41
+ `.trimStart();
39
42
 
40
- console.log(
41
- `🚨 Migrated UDS config ${id} to new AvatarSizes types - this is temporary and will be removed in the future`,
42
- );
43
+ console.log(`✅ Synced UDS config ${id} to ${outFilePath}`);
43
44
 
44
- await Bun.write(outFilePath, configContent);
45
+ await Bun.write(outFilePath, outFileExtension === 'js' ? configContentJs : configContentTs);
45
46
  onUpdate?.({ worker });
46
47
  }
47
48
  });
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { b as UniversalPressableProps, c as UniversalIconButtonProps, d as UniversalImageProps } from './types-CLPge83Y.js';
2
+ import { b as UniversalPressableProps, c as UniversalIconButtonProps, d as UniversalImageProps } from './types-BVfWAIpr.js';
3
3
  import { View, PressableProps as PressableProps$1, StyleProp, ViewStyle } from 'react-native';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { ImageProps as ImageProps$1 } from 'expo-image';
@@ -24,7 +24,7 @@ interface IconButtonProps extends PressableProps, UniversalIconButtonProps {
24
24
  * import { IconButton } from "@yahoo/uds";
25
25
  * import { AddFolder } from "@yahoo/uds-icons";
26
26
  *
27
- * <IconButton name={AddFolder} color="primary" variant="accent" iconVariant="outline" />
27
+ * <IconButton name={AddFolder} variant="accent" iconVariant="outline" />
28
28
  * ```
29
29
  */
30
30
  declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<View>>;
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { b as UniversalPressableProps, c as UniversalIconButtonProps, d as UniversalImageProps } from './types-CLPge83Y.cjs';
2
+ import { b as UniversalPressableProps, c as UniversalIconButtonProps, d as UniversalImageProps } from './types-C7KJV1b1.js';
3
3
  import { View, PressableProps as PressableProps$1, StyleProp, ViewStyle } from 'react-native';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { ImageProps as ImageProps$1 } from 'expo-image';
@@ -24,7 +24,7 @@ interface IconButtonProps extends PressableProps, UniversalIconButtonProps {
24
24
  * import { IconButton } from "@yahoo/uds";
25
25
  * import { AddFolder } from "@yahoo/uds-icons";
26
26
  *
27
- * <IconButton name={AddFolder} color="primary" variant="accent" iconVariant="outline" />
27
+ * <IconButton name={AddFolder} variant="accent" iconVariant="outline" />
28
28
  * ```
29
29
  */
30
30
  declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<View>>;
@@ -0,0 +1,39 @@
1
+ import * as react from 'react';
2
+ import { b as UniversalPressableProps, c as UniversalIconButtonProps, d as UniversalImageProps } from './types-BVfWAIpr.cjs';
3
+ import { View, PressableProps as PressableProps$1, StyleProp, ViewStyle } from 'react-native';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { ImageProps as ImageProps$1 } from 'expo-image';
6
+
7
+ type NativePressableProps = Omit<PressableProps$1, 'children' | 'style' | 'onPress'> & {
8
+ style?: StyleProp<ViewStyle>;
9
+ };
10
+ interface PressableProps extends UniversalPressableProps, NativePressableProps {
11
+ }
12
+ declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<View>>;
13
+
14
+ interface IconButtonProps extends PressableProps, UniversalIconButtonProps {
15
+ }
16
+ /**
17
+ * An icon button is essentially an interactive icon. They should be used to
18
+ * display an icon which, when clicked, allows the user to trigger an action.
19
+ * Icon buttons provide additional features such hover states, focus states, and
20
+ * pressable functionality.
21
+ *
22
+ * **Basic usage**
23
+ * ```tsx
24
+ * import { IconButton } from "@yahoo/uds";
25
+ * import { AddFolder } from "@yahoo/uds-icons";
26
+ *
27
+ * <IconButton name={AddFolder} variant="accent" iconVariant="outline" />
28
+ * ```
29
+ */
30
+ declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<View>>;
31
+
32
+ interface ImageProps extends Omit<ImageProps$1, 'alt' | 'source'>, UniversalImageProps {
33
+ }
34
+ /**
35
+ * An image element
36
+ */
37
+ declare function Image({ width: imageWidth, height: imageHeight, src, alt, contentFit, backgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, flexBasis, display, overflow, overflowX, overflowY, position, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, ...props }: ImageProps): react_jsx_runtime.JSX.Element;
38
+
39
+ export { type ImageProps as I, type PressableProps as P, IconButton as a, type IconButtonProps as b, Image as c, Pressable as d };
@@ -0,0 +1,39 @@
1
+ import * as react from 'react';
2
+ import { b as UniversalPressableProps, c as UniversalIconButtonProps, d as UniversalImageProps } from './types-DVTR9ROz.js';
3
+ import { View, PressableProps as PressableProps$1, StyleProp, ViewStyle } from 'react-native';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { ImageProps as ImageProps$1 } from 'expo-image';
6
+
7
+ type NativePressableProps = Omit<PressableProps$1, 'children' | 'style' | 'onPress'> & {
8
+ style?: StyleProp<ViewStyle>;
9
+ };
10
+ interface PressableProps extends UniversalPressableProps, NativePressableProps {
11
+ }
12
+ declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<View>>;
13
+
14
+ interface IconButtonProps extends PressableProps, UniversalIconButtonProps {
15
+ }
16
+ /**
17
+ * An icon button is essentially an interactive icon. They should be used to
18
+ * display an icon which, when clicked, allows the user to trigger an action.
19
+ * Icon buttons provide additional features such hover states, focus states, and
20
+ * pressable functionality.
21
+ *
22
+ * **Basic usage**
23
+ * ```tsx
24
+ * import { IconButton } from "@yahoo/uds";
25
+ * import { AddFolder } from "@yahoo/uds-icons";
26
+ *
27
+ * <IconButton name={AddFolder} variant="accent" iconVariant="outline" />
28
+ * ```
29
+ */
30
+ declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<View>>;
31
+
32
+ interface ImageProps extends Omit<ImageProps$1, 'alt' | 'source'>, UniversalImageProps {
33
+ }
34
+ /**
35
+ * An image element
36
+ */
37
+ declare function Image({ width: imageWidth, height: imageHeight, src, alt, contentFit, backgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, flexBasis, display, overflow, overflowX, overflowY, position, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, ...props }: ImageProps): react_jsx_runtime.JSX.Element;
38
+
39
+ export { type ImageProps as I, type PressableProps as P, IconButton as a, type IconButtonProps as b, Image as c, Pressable as d };
@@ -0,0 +1,39 @@
1
+ import * as react from 'react';
2
+ import { b as UniversalPressableProps, c as UniversalIconButtonProps, d as UniversalImageProps } from './types-C4OR1S9X.cjs';
3
+ import { View, PressableProps as PressableProps$1, StyleProp, ViewStyle } from 'react-native';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { ImageProps as ImageProps$1 } from 'expo-image';
6
+
7
+ type NativePressableProps = Omit<PressableProps$1, 'children' | 'style' | 'onPress'> & {
8
+ style?: StyleProp<ViewStyle>;
9
+ };
10
+ interface PressableProps extends UniversalPressableProps, NativePressableProps {
11
+ }
12
+ declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<View>>;
13
+
14
+ interface IconButtonProps extends PressableProps, UniversalIconButtonProps {
15
+ }
16
+ /**
17
+ * An icon button is essentially an interactive icon. They should be used to
18
+ * display an icon which, when clicked, allows the user to trigger an action.
19
+ * Icon buttons provide additional features such hover states, focus states, and
20
+ * pressable functionality.
21
+ *
22
+ * **Basic usage**
23
+ * ```tsx
24
+ * import { IconButton } from "@yahoo/uds";
25
+ * import { AddFolder } from "@yahoo/uds-icons";
26
+ *
27
+ * <IconButton name={AddFolder} variant="accent" iconVariant="outline" />
28
+ * ```
29
+ */
30
+ declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<View>>;
31
+
32
+ interface ImageProps extends Omit<ImageProps$1, 'alt' | 'source'>, UniversalImageProps {
33
+ }
34
+ /**
35
+ * An image element
36
+ */
37
+ declare function Image({ width: imageWidth, height: imageHeight, src, alt, contentFit, backgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, flexBasis, display, overflow, overflowX, overflowY, position, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, ...props }: ImageProps): react_jsx_runtime.JSX.Element;
38
+
39
+ export { type ImageProps as I, type PressableProps as P, IconButton as a, type IconButtonProps as b, Image as c, Pressable as d };
@@ -0,0 +1,39 @@
1
+ import * as react from 'react';
2
+ import { b as UniversalPressableProps, c as UniversalIconButtonProps, d as UniversalImageProps } from './types-C4OR1S9X.js';
3
+ import { View, PressableProps as PressableProps$1, StyleProp, ViewStyle } from 'react-native';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { ImageProps as ImageProps$1 } from 'expo-image';
6
+
7
+ type NativePressableProps = Omit<PressableProps$1, 'children' | 'style' | 'onPress'> & {
8
+ style?: StyleProp<ViewStyle>;
9
+ };
10
+ interface PressableProps extends UniversalPressableProps, NativePressableProps {
11
+ }
12
+ declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<View>>;
13
+
14
+ interface IconButtonProps extends PressableProps, UniversalIconButtonProps {
15
+ }
16
+ /**
17
+ * An icon button is essentially an interactive icon. They should be used to
18
+ * display an icon which, when clicked, allows the user to trigger an action.
19
+ * Icon buttons provide additional features such hover states, focus states, and
20
+ * pressable functionality.
21
+ *
22
+ * **Basic usage**
23
+ * ```tsx
24
+ * import { IconButton } from "@yahoo/uds";
25
+ * import { AddFolder } from "@yahoo/uds-icons";
26
+ *
27
+ * <IconButton name={AddFolder} variant="accent" iconVariant="outline" />
28
+ * ```
29
+ */
30
+ declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<View>>;
31
+
32
+ interface ImageProps extends Omit<ImageProps$1, 'alt' | 'source'>, UniversalImageProps {
33
+ }
34
+ /**
35
+ * An image element
36
+ */
37
+ declare function Image({ width: imageWidth, height: imageHeight, src, alt, contentFit, backgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, flexBasis, display, overflow, overflowX, overflowY, position, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, ...props }: ImageProps): react_jsx_runtime.JSX.Element;
38
+
39
+ export { type ImageProps as I, type PressableProps as P, IconButton as a, type IconButtonProps as b, Image as c, Pressable as d };
@@ -0,0 +1,39 @@
1
+ import * as react from 'react';
2
+ import { b as UniversalPressableProps, c as UniversalIconButtonProps, d as UniversalImageProps } from './types-C7KJV1b1.cjs';
3
+ import { View, PressableProps as PressableProps$1, StyleProp, ViewStyle } from 'react-native';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { ImageProps as ImageProps$1 } from 'expo-image';
6
+
7
+ type NativePressableProps = Omit<PressableProps$1, 'children' | 'style' | 'onPress'> & {
8
+ style?: StyleProp<ViewStyle>;
9
+ };
10
+ interface PressableProps extends UniversalPressableProps, NativePressableProps {
11
+ }
12
+ declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<View>>;
13
+
14
+ interface IconButtonProps extends PressableProps, UniversalIconButtonProps {
15
+ }
16
+ /**
17
+ * An icon button is essentially an interactive icon. They should be used to
18
+ * display an icon which, when clicked, allows the user to trigger an action.
19
+ * Icon buttons provide additional features such hover states, focus states, and
20
+ * pressable functionality.
21
+ *
22
+ * **Basic usage**
23
+ * ```tsx
24
+ * import { IconButton } from "@yahoo/uds";
25
+ * import { AddFolder } from "@yahoo/uds-icons";
26
+ *
27
+ * <IconButton name={AddFolder} variant="accent" iconVariant="outline" />
28
+ * ```
29
+ */
30
+ declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<View>>;
31
+
32
+ interface ImageProps extends Omit<ImageProps$1, 'alt' | 'source'>, UniversalImageProps {
33
+ }
34
+ /**
35
+ * An image element
36
+ */
37
+ declare function Image({ width: imageWidth, height: imageHeight, src, alt, contentFit, backgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, flexBasis, display, overflow, overflowX, overflowY, position, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, ...props }: ImageProps): react_jsx_runtime.JSX.Element;
38
+
39
+ export { type ImageProps as I, type PressableProps as P, IconButton as a, type IconButtonProps as b, Image as c, Pressable as d };
@@ -0,0 +1,39 @@
1
+ import * as react from 'react';
2
+ import { b as UniversalPressableProps, c as UniversalIconButtonProps, d as UniversalImageProps } from './types-DVTR9ROz.cjs';
3
+ import { View, PressableProps as PressableProps$1, StyleProp, ViewStyle } from 'react-native';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { ImageProps as ImageProps$1 } from 'expo-image';
6
+
7
+ type NativePressableProps = Omit<PressableProps$1, 'children' | 'style' | 'onPress'> & {
8
+ style?: StyleProp<ViewStyle>;
9
+ };
10
+ interface PressableProps extends UniversalPressableProps, NativePressableProps {
11
+ }
12
+ declare const Pressable: react.ForwardRefExoticComponent<PressableProps & react.RefAttributes<View>>;
13
+
14
+ interface IconButtonProps extends PressableProps, UniversalIconButtonProps {
15
+ }
16
+ /**
17
+ * An icon button is essentially an interactive icon. They should be used to
18
+ * display an icon which, when clicked, allows the user to trigger an action.
19
+ * Icon buttons provide additional features such hover states, focus states, and
20
+ * pressable functionality.
21
+ *
22
+ * **Basic usage**
23
+ * ```tsx
24
+ * import { IconButton } from "@yahoo/uds";
25
+ * import { AddFolder } from "@yahoo/uds-icons";
26
+ *
27
+ * <IconButton name={AddFolder} variant="accent" iconVariant="outline" />
28
+ * ```
29
+ */
30
+ declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<View>>;
31
+
32
+ interface ImageProps extends Omit<ImageProps$1, 'alt' | 'source'>, UniversalImageProps {
33
+ }
34
+ /**
35
+ * An image element
36
+ */
37
+ declare function Image({ width: imageWidth, height: imageHeight, src, alt, contentFit, backgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, flexBasis, display, overflow, overflowX, overflowY, position, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, ...props }: ImageProps): react_jsx_runtime.JSX.Element;
38
+
39
+ export { type ImageProps as I, type PressableProps as P, IconButton as a, type IconButtonProps as b, Image as c, Pressable as d };
@@ -0,0 +1,3 @@
1
+ import{DARK_COLOR_MODE_CLASSNAME as e,LIGHT_COLOR_MODE_CLASSNAME as t,XSMALL_SCALE_MODE_CLASSNAME as r,SMALL_SCALE_MODE_CLASSNAME as o,MEDIUM_SCALE_MODE_CLASSNAME as a,LARGE_SCALE_MODE_CLASSNAME as n,XLARGE_SCALE_MODE_CLASSNAME as p,XXXLARGE_SCALE_MODE_CLASSNAME as l,XXLARGE_SCALE_MODE_CLASSNAME as i}from"./chunk-I2ENXXSN.js";
2
+ /*! © 2024 Yahoo, Inc. UDS v0.5.11 */
3
+ var d={color:{accent:"text-accent",alert:"text-alert",black:"text-black",brand:"text-brand",positive:"text-positive",warning:"text-warning",white:"text-white",transparent:"text-transparent",muted:"text-muted","on-color":"text-on-color",primary:"text-primary",secondary:"text-secondary",tertiary:"text-tertiary",current:"text-current"},placeholderColor:{accent:"placeholder:text-accent",alert:"placeholder:text-alert",black:"placeholder:text-black",brand:"placeholder:text-brand",positive:"placeholder:text-positive",warning:"placeholder:text-warning",white:"placeholder:text-white",transparent:"placeholder:text-transparent",muted:"placeholder:text-muted","on-color":"placeholder:text-on-color",primary:"placeholder:text-primary",secondary:"placeholder:text-secondary",tertiary:"placeholder:text-tertiary",current:"placeholder:text-current"},fontFamily:{sans:"font-sans","sans-alt":"font-sans-alt",serif:"font-serif","serif-alt":"font-serif-alt",mono:"font-mono",display1:"font-display1",display2:"font-display2",display3:"font-display3",title1:"font-title1",title2:"font-title2",title3:"font-title3",title4:"font-title4",headline1:"font-headline1",body1:"font-body1",label1:"font-label1",label2:"font-label2",caption1:"font-caption1",caption2:"font-caption2",legal1:"font-legal1"},fontSize:{display1:"font-size-display1",display2:"font-size-display2",display3:"font-size-display3",title1:"font-size-title1",title2:"font-size-title2",title3:"font-size-title3",title4:"font-size-title4",headline1:"font-size-headline1",body1:"font-size-body1",label1:"font-size-label1",label2:"font-size-label2",caption1:"font-size-caption1",caption2:"font-size-caption2",legal1:"font-size-legal1"},fontWeight:{thin:"font-weight-thin",extralight:"font-weight-extralight",light:"font-weight-light",regular:"font-weight-regular",medium:"font-weight-medium",semibold:"font-weight-semibold",bold:"font-weight-bold",extrabold:"font-weight-extrabold",black:"font-weight-black",display1:"font-weight-display1",display2:"font-weight-display2",display3:"font-weight-display3",title1:"font-weight-title1",title2:"font-weight-title2",title3:"font-weight-title3",title4:"font-weight-title4",headline1:"font-weight-headline1",body1:"font-weight-body1",label1:"font-weight-label1",label2:"font-weight-label2",caption1:"font-weight-caption1",caption2:"font-weight-caption2",legal1:"font-weight-legal1"},lineHeight:{display1:"leading-display1",display2:"leading-display2",display3:"leading-display3",title1:"leading-title1",title2:"leading-title2",title3:"leading-title3",title4:"leading-title4",headline1:"leading-headline1",body1:"leading-body1",label1:"leading-label1",label2:"leading-label2",caption1:"leading-caption1",caption2:"leading-caption2",legal1:"leading-legal1"},textAlign:{center:"text-center",justify:"text-justify",start:"text-start",end:"text-end"},textTransform:{display1:"case-display1",display2:"case-display2",display3:"case-display3",title1:"case-title1",title2:"case-title2",title3:"case-title3",title4:"case-title4",headline1:"case-headline1",body1:"case-body1",label1:"case-label1",label2:"case-label2",caption1:"case-caption1",caption2:"case-caption2",legal1:"case-legal1",none:"normal-case",uppercase:"uppercase",lowercase:"lowercase",capitalize:"capitalize"},spacing:{0:"p-0",px:"p-px",.5:"p-0.5",1:"p-1",1.5:"p-1.5",2:"p-2",2.5:"p-2.5",3:"p-3",3.5:"p-3.5",4:"p-4",5:"p-5",6:"p-6",7:"p-7",8:"p-8",9:"p-9",10:"p-10",11:"p-11",12:"p-12",14:"p-14",16:"p-16",20:"p-20",24:"p-24",28:"p-28",32:"p-32",36:"p-36",40:"p-40",44:"p-44",48:"p-48",52:"p-52",56:"p-56",60:"p-60",64:"p-64",72:"p-72",80:"p-80",96:"p-96"},spacingHorizontal:{0:"px-0",px:"px-px",.5:"px-0.5",1:"px-1",1.5:"px-1.5",2:"px-2",2.5:"px-2.5",3:"px-3",3.5:"px-3.5",4:"px-4",5:"px-5",6:"px-6",7:"px-7",8:"px-8",9:"px-9",10:"px-10",11:"px-11",12:"px-12",14:"px-14",16:"px-16",20:"px-20",24:"px-24",28:"px-28",32:"px-32",36:"px-36",40:"px-40",44:"px-44",48:"px-48",52:"px-52",56:"px-56",60:"px-60",64:"px-64",72:"px-72",80:"px-80",96:"px-96"},spacingVertical:{0:"py-0",px:"py-px",.5:"py-0.5",1:"py-1",1.5:"py-1.5",2:"py-2",2.5:"py-2.5",3:"py-3",3.5:"py-3.5",4:"py-4",5:"py-5",6:"py-6",7:"py-7",8:"py-8",9:"py-9",10:"py-10",11:"py-11",12:"py-12",14:"py-14",16:"py-16",20:"py-20",24:"py-24",28:"py-28",32:"py-32",36:"py-36",40:"py-40",44:"py-44",48:"py-48",52:"py-52",56:"py-56",60:"py-60",64:"py-64",72:"py-72",80:"py-80",96:"py-96"},spacingBottom:{0:"pb-0",px:"pb-px",.5:"pb-0.5",1:"pb-1",1.5:"pb-1.5",2:"pb-2",2.5:"pb-2.5",3:"pb-3",3.5:"pb-3.5",4:"pb-4",5:"pb-5",6:"pb-6",7:"pb-7",8:"pb-8",9:"pb-9",10:"pb-10",11:"pb-11",12:"pb-12",14:"pb-14",16:"pb-16",20:"pb-20",24:"pb-24",28:"pb-28",32:"pb-32",36:"pb-36",40:"pb-40",44:"pb-44",48:"pb-48",52:"pb-52",56:"pb-56",60:"pb-60",64:"pb-64",72:"pb-72",80:"pb-80",96:"pb-96"},spacingEnd:{0:"pe-0",px:"pe-px",.5:"pe-0.5",1:"pe-1",1.5:"pe-1.5",2:"pe-2",2.5:"pe-2.5",3:"pe-3",3.5:"pe-3.5",4:"pe-4",5:"pe-5",6:"pe-6",7:"pe-7",8:"pe-8",9:"pe-9",10:"pe-10",11:"pe-11",12:"pe-12",14:"pe-14",16:"pe-16",20:"pe-20",24:"pe-24",28:"pe-28",32:"pe-32",36:"pe-36",40:"pe-40",44:"pe-44",48:"pe-48",52:"pe-52",56:"pe-56",60:"pe-60",64:"pe-64",72:"pe-72",80:"pe-80",96:"pe-96"},spacingStart:{0:"ps-0",px:"ps-px",.5:"ps-0.5",1:"ps-1",1.5:"ps-1.5",2:"ps-2",2.5:"ps-2.5",3:"ps-3",3.5:"ps-3.5",4:"ps-4",5:"ps-5",6:"ps-6",7:"ps-7",8:"ps-8",9:"ps-9",10:"ps-10",11:"ps-11",12:"ps-12",14:"ps-14",16:"ps-16",20:"ps-20",24:"ps-24",28:"ps-28",32:"ps-32",36:"ps-36",40:"ps-40",44:"ps-44",48:"ps-48",52:"ps-52",56:"ps-56",60:"ps-60",64:"ps-64",72:"ps-72",80:"ps-80",96:"ps-96"},spacingTop:{0:"pt-0",px:"pt-px",.5:"pt-0.5",1:"pt-1",1.5:"pt-1.5",2:"pt-2",2.5:"pt-2.5",3:"pt-3",3.5:"pt-3.5",4:"pt-4",5:"pt-5",6:"pt-6",7:"pt-7",8:"pt-8",9:"pt-9",10:"pt-10",11:"pt-11",12:"pt-12",14:"pt-14",16:"pt-16",20:"pt-20",24:"pt-24",28:"pt-28",32:"pt-32",36:"pt-36",40:"pt-40",44:"pt-44",48:"pt-48",52:"pt-52",56:"pt-56",60:"pt-60",64:"pt-64",72:"pt-72",80:"pt-80",96:"pt-96"},offset:{0:"-m-0",px:"-m-px",.5:"-m-0.5",1:"-m-1",1.5:"-m-1.5",2:"-m-2",2.5:"-m-2.5",3:"-m-3",3.5:"-m-3.5",4:"-m-4",5:"-m-5",6:"-m-6",7:"-m-7",8:"-m-8",9:"-m-9",10:"-m-10",11:"-m-11",12:"-m-12",14:"-m-14",16:"-m-16",20:"-m-20",24:"-m-24",28:"-m-28",32:"-m-32",36:"-m-36",40:"-m-40",44:"-m-44",48:"-m-48",52:"-m-52",56:"-m-56",60:"-m-60",64:"-m-64",72:"-m-72",80:"-m-80",96:"-m-96"},offsetVertical:{0:"-my-0",px:"-my-px",.5:"-my-0.5",1:"-my-1",1.5:"-my-1.5",2:"-my-2",2.5:"-my-2.5",3:"-my-3",3.5:"-my-3.5",4:"-my-4",5:"-my-5",6:"-my-6",7:"-my-7",8:"-my-8",9:"-my-9",10:"-my-10",11:"-my-11",12:"-my-12",14:"-my-14",16:"-my-16",20:"-my-20",24:"-my-24",28:"-my-28",32:"-my-32",36:"-my-36",40:"-my-40",44:"-my-44",48:"-my-48",52:"-my-52",56:"-my-56",60:"-my-60",64:"-my-64",72:"-my-72",80:"-my-80",96:"-my-96"},offsetHorizontal:{0:"-mx-0",px:"-mx-px",.5:"-mx-0.5",1:"-mx-1",1.5:"-mx-1.5",2:"-mx-2",2.5:"-mx-2.5",3:"-mx-3",3.5:"-mx-3.5",4:"-mx-4",5:"-mx-5",6:"-mx-6",7:"-mx-7",8:"-mx-8",9:"-mx-9",10:"-mx-10",11:"-mx-11",12:"-mx-12",14:"-mx-14",16:"-mx-16",20:"-mx-20",24:"-mx-24",28:"-mx-28",32:"-mx-32",36:"-mx-36",40:"-mx-40",44:"-mx-44",48:"-mx-48",52:"-mx-52",56:"-mx-56",60:"-mx-60",64:"-mx-64",72:"-mx-72",80:"-mx-80",96:"-mx-96"},offsetBottom:{0:"-mb-0",px:"-mb-px",.5:"-mb-0.5",1:"-mb-1",1.5:"-mb-1.5",2:"-mb-2",2.5:"-mb-2.5",3:"-mb-3",3.5:"-mb-3.5",4:"-mb-4",5:"-mb-5",6:"-mb-6",7:"-mb-7",8:"-mb-8",9:"-mb-9",10:"-mb-10",11:"-mb-11",12:"-mb-12",14:"-mb-14",16:"-mb-16",20:"-mb-20",24:"-mb-24",28:"-mb-28",32:"-mb-32",36:"-mb-36",40:"-mb-40",44:"-mb-44",48:"-mb-48",52:"-mb-52",56:"-mb-56",60:"-mb-60",64:"-mb-64",72:"-mb-72",80:"-mb-80",96:"-mb-96"},offsetEnd:{0:"-me-0",px:"-me-px",.5:"-me-0.5",1:"-me-1",1.5:"-me-1.5",2:"-me-2",2.5:"-me-2.5",3:"-me-3",3.5:"-me-3.5",4:"-me-4",5:"-me-5",6:"-me-6",7:"-me-7",8:"-me-8",9:"-me-9",10:"-me-10",11:"-me-11",12:"-me-12",14:"-me-14",16:"-me-16",20:"-me-20",24:"-me-24",28:"-me-28",32:"-me-32",36:"-me-36",40:"-me-40",44:"-me-44",48:"-me-48",52:"-me-52",56:"-me-56",60:"-me-60",64:"-me-64",72:"-me-72",80:"-me-80",96:"-me-96"},offsetStart:{0:"-ms-0",px:"-ms-px",.5:"-ms-0.5",1:"-ms-1",1.5:"-ms-1.5",2:"-ms-2",2.5:"-ms-2.5",3:"-ms-3",3.5:"-ms-3.5",4:"-ms-4",5:"-ms-5",6:"-ms-6",7:"-ms-7",8:"-ms-8",9:"-ms-9",10:"-ms-10",11:"-ms-11",12:"-ms-12",14:"-ms-14",16:"-ms-16",20:"-ms-20",24:"-ms-24",28:"-ms-28",32:"-ms-32",36:"-ms-36",40:"-ms-40",44:"-ms-44",48:"-ms-48",52:"-ms-52",56:"-ms-56",60:"-ms-60",64:"-ms-64",72:"-ms-72",80:"-ms-80",96:"-ms-96"},offsetTop:{0:"-mt-0",px:"-mt-px",.5:"-mt-0.5",1:"-mt-1",1.5:"-mt-1.5",2:"-mt-2",2.5:"-mt-2.5",3:"-mt-3",3.5:"-mt-3.5",4:"-mt-4",5:"-mt-5",6:"-mt-6",7:"-mt-7",8:"-mt-8",9:"-mt-9",10:"-mt-10",11:"-mt-11",12:"-mt-12",14:"-mt-14",16:"-mt-16",20:"-mt-20",24:"-mt-24",28:"-mt-28",32:"-mt-32",36:"-mt-36",40:"-mt-40",44:"-mt-44",48:"-mt-48",52:"-mt-52",56:"-mt-56",60:"-mt-60",64:"-mt-64",72:"-mt-72",80:"-mt-80",96:"-mt-96"},columnGap:{0:"gap-x-0",px:"gap-x-px",.5:"gap-x-0.5",1:"gap-x-1",1.5:"gap-x-1.5",2:"gap-x-2",2.5:"gap-x-2.5",3:"gap-x-3",3.5:"gap-x-3.5",4:"gap-x-4",5:"gap-x-5",6:"gap-x-6",7:"gap-x-7",8:"gap-x-8",9:"gap-x-9",10:"gap-x-10",11:"gap-x-11",12:"gap-x-12",14:"gap-x-14",16:"gap-x-16",20:"gap-x-20",24:"gap-x-24",28:"gap-x-28",32:"gap-x-32",36:"gap-x-36",40:"gap-x-40",44:"gap-x-44",48:"gap-x-48",52:"gap-x-52",56:"gap-x-56",60:"gap-x-60",64:"gap-x-64",72:"gap-x-72",80:"gap-x-80",96:"gap-x-96"},rowGap:{0:"gap-y-0",px:"gap-y-px",.5:"gap-y-0.5",1:"gap-y-1",1.5:"gap-y-1.5",2:"gap-y-2",2.5:"gap-y-2.5",3:"gap-y-3",3.5:"gap-y-3.5",4:"gap-y-4",5:"gap-y-5",6:"gap-y-6",7:"gap-y-7",8:"gap-y-8",9:"gap-y-9",10:"gap-y-10",11:"gap-y-11",12:"gap-y-12",14:"gap-y-14",16:"gap-y-16",20:"gap-y-20",24:"gap-y-24",28:"gap-y-28",32:"gap-y-32",36:"gap-y-36",40:"gap-y-40",44:"gap-y-44",48:"gap-y-48",52:"gap-y-52",56:"gap-y-56",60:"gap-y-60",64:"gap-y-64",72:"gap-y-72",80:"gap-y-80",96:"gap-y-96"},backgroundColor:{accent:"bg-accent",alert:"bg-alert",black:"bg-black",brand:"bg-brand",positive:"bg-positive",warning:"bg-warning",white:"bg-white",primary:"bg-primary",secondary:"bg-secondary",transparent:"bg-transparent",current:"bg-current"},borderColor:{accent:"border-accent",alert:"border-alert",black:"border-black",brand:"border-brand",positive:"border-positive",warning:"border-warning",white:"border-white",transparent:"border-transparent",muted:"border-muted",primary:"border-primary",secondary:"border-secondary",tertiary:"border-tertiary",current:"border-current"},borderStartColor:{accent:"border-s-accent",alert:"border-s-alert",black:"border-s-black",brand:"border-s-brand",positive:"border-s-positive",warning:"border-s-warning",white:"border-s-white",transparent:"border-s-transparent",muted:"border-s-muted",primary:"border-s-primary",secondary:"border-s-secondary",tertiary:"border-s-tertiary",current:"border-s-current"},borderEndColor:{accent:"border-e-accent",alert:"border-e-alert",black:"border-e-black",brand:"border-e-brand",positive:"border-e-positive",warning:"border-e-warning",white:"border-e-white",transparent:"border-e-transparent",muted:"border-e-muted",primary:"border-e-primary",secondary:"border-e-secondary",tertiary:"border-e-tertiary",current:"border-e-current"},borderBottomColor:{accent:"border-b-accent",alert:"border-b-alert",black:"border-b-black",brand:"border-b-brand",positive:"border-b-positive",warning:"border-b-warning",white:"border-b-white",transparent:"border-b-transparent",muted:"border-b-muted",primary:"border-b-primary",secondary:"border-b-secondary",tertiary:"border-b-tertiary",current:"border-b-current"},borderTopColor:{accent:"border-t-accent",alert:"border-t-alert",black:"border-t-black",brand:"border-t-brand",positive:"border-t-positive",warning:"border-t-warning",white:"border-t-white",transparent:"border-t-transparent",muted:"border-t-muted",primary:"border-t-primary",secondary:"border-t-secondary",tertiary:"border-t-tertiary",current:"border-t-current"},borderRadius:{none:"rounded-none",xs:"rounded-xs",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"},borderTopStartRadius:{none:"rounded-ss-none",xs:"rounded-ss-xs",sm:"rounded-ss-sm",md:"rounded-ss-md",lg:"rounded-ss-lg",xl:"rounded-ss-xl",full:"rounded-ss-full"},borderTopEndRadius:{none:"rounded-se-none",xs:"rounded-se-xs",sm:"rounded-se-sm",md:"rounded-se-md",lg:"rounded-se-lg",xl:"rounded-se-xl",full:"rounded-se-full"},borderBottomStartRadius:{none:"rounded-es-none",xs:"rounded-es-xs",sm:"rounded-es-sm",md:"rounded-es-md",lg:"rounded-es-lg",xl:"rounded-es-xl",full:"rounded-es-full"},borderBottomEndRadius:{none:"rounded-ee-none",xs:"rounded-ee-xs",sm:"rounded-ee-sm",md:"rounded-ee-md",lg:"rounded-ee-lg",xl:"rounded-ee-xl",full:"rounded-ee-full"},borderWidth:{none:"border-none",thin:"border-thin",medium:"border-medium",thick:"border-thick"},borderVerticalWidth:{none:"border-y-none",thin:"border-y-thin",medium:"border-y-medium",thick:"border-y-thick"},borderHorizontalWidth:{none:"border-x-none",thin:"border-x-thin",medium:"border-x-medium",thick:"border-x-thick"},borderStartWidth:{none:"border-s-none",thin:"border-s-thin",medium:"border-s-medium",thick:"border-s-thick"},borderEndWidth:{none:"border-e-none",thin:"border-e-thin",medium:"border-e-medium",thick:"border-e-thick"},borderTopWidth:{none:"border-t-none",thin:"border-t-thin",medium:"border-t-medium",thick:"border-t-thick"},borderBottomWidth:{none:"border-b-none",thin:"border-b-thin",medium:"border-b-medium",thick:"border-b-thick"},avatarSize:{sm:"avatarSize-sm",md:"avatarSize-md",lg:"avatarSize-lg"},iconSize:{sm:"iconSize-sm leading-none",md:"iconSize-md leading-none",lg:"iconSize-lg leading-none"},alignContent:{"flex-start":"content-start","flex-end":"content-end",center:"content-center",stretch:"content-stretch","space-between":"content-between","space-around":"content-around"},alignItems:{"flex-start":"items-start","flex-end":"items-end",center:"items-center",stretch:"items-stretch",baseline:"items-baseline"},alignSelf:{auto:"self-auto","flex-start":"self-start","flex-end":"self-end",center:"self-center",stretch:"self-stretch",baseline:"self-baseline"},flex:{1:"flex-1",auto:"flex-auto",initial:"flex-initial",none:"flex-none"},flexDirection:{row:"flex-row",column:"flex-col","row-reverse":"flex-row-reverse","column-reverse":"flex-col-reverse"},flexGrow:{0:"grow-0",1:"grow",2:"grow-[2]",3:"grow-[3]"},flexShrink:{0:"shrink-0",1:"shrink"},flexWrap:{wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},justifyContent:{"flex-start":"justify-start","flex-end":"justify-end",center:"justify-center","space-between":"justify-between","space-around":"justify-around","space-evenly":"justify-evenly"},flexBasis:{"min-content":"basis-[min-content]"},display:{block:"block","inline-block":"inline-block",inline:"inline",flex:"flex","inline-flex":"inline-flex",table:"table","inline-table":"inline-table","table-caption":"table-caption","table-cell":"table-cell","table-column":"table-column","table-column-group":"table-column-group","table-footer-group":"table-footer-group","table-header-group":"table-header-group","table-row-group":"table-row-group","table-row":"table-row","flow-root":"flow-root",grid:"grid",contents:"contents"},overflow:{auto:"overflow-auto",hidden:"overflow-hidden",clip:"overflow-clip",visible:"overflow-visible",scroll:"overflow-scroll"},overflowX:{auto:"overflow-x-auto",hidden:"overflow-x-hidden",clip:"overflow-x-clip",visible:"overflow-x-visible",scroll:"overflow-x-scroll"},overflowY:{auto:"overflow-y-auto",hidden:"overflow-y-hidden",clip:"overflow-y-clip",visible:"overflow-y-visible",scroll:"overflow-y-scroll"},position:{static:"static",fixed:"fixed",absolute:"absolute",relative:"relative",sticky:"sticky"},contentFit:{contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},colorMode:{dark:e,light:t},scaleMode:{xSmall:r,small:o,medium:a,large:n,xLarge:p,xxxLarge:l,xxLarge:i},buttonPalette:{accent:"uds-button-accent",brand:"uds-button-brand",alert:"uds-button-alert",positive:"uds-button-positive",warning:"uds-button-warning"},buttonVariant:{primary:"uds-button-primary",secondary:"uds-button-secondary",tertiary:"uds-button-tertiary"},buttonSize:{sm:"uds-button-sm",md:"uds-button-md",lg:"uds-button-lg"},iconButtonSize:{xs:"uds-icon-button-xs",sm:"uds-icon-button-sm",md:"uds-icon-button-md",lg:"uds-icon-button-lg",xl:"uds-icon-button-xl"}};export{d as variants};