@yahoo/uds-v5-wip 1.49.0 → 1.51.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 (86) hide show
  1. package/dist/components/dist/presets/index.js +1 -1
  2. package/dist/components/presets/index.js +1 -1
  3. package/dist/config/dist/createConfig.d.ts +11 -0
  4. package/dist/config/dist/createConfig.js +1 -1
  5. package/dist/config/dist/types.d.ts +8 -1
  6. package/dist/foundational-presets/dist/index.d.ts +1 -19
  7. package/dist/foundational-presets/dist/index.js +0 -18
  8. package/dist/presets/dist/defaultPreset.js +1 -1
  9. package/dist/presets/dist/index.d.ts +1 -19
  10. package/dist/presets/dist/index.js +0 -18
  11. package/dist/presets.d.ts +1 -19
  12. package/dist/presets.js +1 -19
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/package.json +3 -3
  15. package/dist/foundational-presets/dist/boldVibrant.d.ts +0 -2153
  16. package/dist/foundational-presets/dist/boldVibrant.js +0 -230
  17. package/dist/foundational-presets/dist/brutalist.d.ts +0 -2153
  18. package/dist/foundational-presets/dist/brutalist.js +0 -230
  19. package/dist/foundational-presets/dist/candy.d.ts +0 -2153
  20. package/dist/foundational-presets/dist/candy.js +0 -230
  21. package/dist/foundational-presets/dist/cleanMinimalist.d.ts +0 -2153
  22. package/dist/foundational-presets/dist/cleanMinimalist.js +0 -230
  23. package/dist/foundational-presets/dist/corporate.d.ts +0 -2153
  24. package/dist/foundational-presets/dist/corporate.js +0 -230
  25. package/dist/foundational-presets/dist/darkMoody.d.ts +0 -2153
  26. package/dist/foundational-presets/dist/darkMoody.js +0 -230
  27. package/dist/foundational-presets/dist/forest.d.ts +0 -2153
  28. package/dist/foundational-presets/dist/forest.js +0 -230
  29. package/dist/foundational-presets/dist/highContrast.d.ts +0 -2153
  30. package/dist/foundational-presets/dist/highContrast.js +0 -230
  31. package/dist/foundational-presets/dist/lavender.d.ts +0 -2153
  32. package/dist/foundational-presets/dist/lavender.js +0 -230
  33. package/dist/foundational-presets/dist/luxury.d.ts +0 -2153
  34. package/dist/foundational-presets/dist/luxury.js +0 -230
  35. package/dist/foundational-presets/dist/monochrome.d.ts +0 -2153
  36. package/dist/foundational-presets/dist/monochrome.js +0 -230
  37. package/dist/foundational-presets/dist/neonCyber.d.ts +0 -2153
  38. package/dist/foundational-presets/dist/neonCyber.js +0 -230
  39. package/dist/foundational-presets/dist/newspaper.d.ts +0 -2153
  40. package/dist/foundational-presets/dist/newspaper.js +0 -230
  41. package/dist/foundational-presets/dist/ocean.d.ts +0 -2153
  42. package/dist/foundational-presets/dist/ocean.js +0 -230
  43. package/dist/foundational-presets/dist/slate.d.ts +0 -2153
  44. package/dist/foundational-presets/dist/slate.js +0 -230
  45. package/dist/foundational-presets/dist/sunset.d.ts +0 -2153
  46. package/dist/foundational-presets/dist/sunset.js +0 -230
  47. package/dist/foundational-presets/dist/terminal.d.ts +0 -2153
  48. package/dist/foundational-presets/dist/terminal.js +0 -230
  49. package/dist/foundational-presets/dist/warmOrganic.d.ts +0 -2153
  50. package/dist/foundational-presets/dist/warmOrganic.js +0 -230
  51. package/dist/presets/dist/boldVibrant.d.ts +0 -6
  52. package/dist/presets/dist/boldVibrant.js +0 -7
  53. package/dist/presets/dist/brutalist.d.ts +0 -6
  54. package/dist/presets/dist/brutalist.js +0 -7
  55. package/dist/presets/dist/candy.d.ts +0 -6
  56. package/dist/presets/dist/candy.js +0 -7
  57. package/dist/presets/dist/cleanMinimalist.d.ts +0 -6
  58. package/dist/presets/dist/cleanMinimalist.js +0 -7
  59. package/dist/presets/dist/corporate.d.ts +0 -6
  60. package/dist/presets/dist/corporate.js +0 -7
  61. package/dist/presets/dist/darkMoody.d.ts +0 -6
  62. package/dist/presets/dist/darkMoody.js +0 -7
  63. package/dist/presets/dist/forest.d.ts +0 -6
  64. package/dist/presets/dist/forest.js +0 -7
  65. package/dist/presets/dist/highContrast.d.ts +0 -6
  66. package/dist/presets/dist/highContrast.js +0 -7
  67. package/dist/presets/dist/lavender.d.ts +0 -6
  68. package/dist/presets/dist/lavender.js +0 -7
  69. package/dist/presets/dist/luxury.d.ts +0 -6
  70. package/dist/presets/dist/luxury.js +0 -7
  71. package/dist/presets/dist/monochrome.d.ts +0 -6
  72. package/dist/presets/dist/monochrome.js +0 -7
  73. package/dist/presets/dist/neonCyber.d.ts +0 -6
  74. package/dist/presets/dist/neonCyber.js +0 -7
  75. package/dist/presets/dist/newspaper.d.ts +0 -6
  76. package/dist/presets/dist/newspaper.js +0 -7
  77. package/dist/presets/dist/ocean.d.ts +0 -6
  78. package/dist/presets/dist/ocean.js +0 -7
  79. package/dist/presets/dist/slate.d.ts +0 -6
  80. package/dist/presets/dist/slate.js +0 -7
  81. package/dist/presets/dist/sunset.d.ts +0 -6
  82. package/dist/presets/dist/sunset.js +0 -7
  83. package/dist/presets/dist/terminal.d.ts +0 -6
  84. package/dist/presets/dist/terminal.js +0 -7
  85. package/dist/presets/dist/warmOrganic.d.ts +0 -6
  86. package/dist/presets/dist/warmOrganic.js +0 -7
@@ -2,8 +2,8 @@ import { textConfig } from "../text.config.js";
2
2
  import { accordionConfig } from "../accordion.config.js";
3
3
  import { alertConfig } from "../alert.config.js";
4
4
  import { anchorConfig } from "../anchor.config.js";
5
- import { avatarGroupConfig } from "../avatar-group.config.js";
6
5
  import { avatarConfig } from "../avatar.config.js";
6
+ import { avatarGroupConfig } from "../avatar-group.config.js";
7
7
  import { badgeConfig } from "../badge.config.js";
8
8
  import { breadcrumbConfig } from "../breadcrumb.config.js";
9
9
  import { buttonConfig } from "../button.config.js";
@@ -2,8 +2,8 @@ import { textConfig } from "../dist/text.config.js";
2
2
  import { accordionConfig } from "../dist/accordion.config.js";
3
3
  import { alertConfig } from "../dist/alert.config.js";
4
4
  import { anchorConfig } from "../dist/anchor.config.js";
5
- import { avatarGroupConfig } from "../dist/avatar-group.config.js";
6
5
  import { avatarConfig } from "../dist/avatar.config.js";
6
+ import { avatarGroupConfig } from "../dist/avatar-group.config.js";
7
7
  import { badgeConfig } from "../dist/badge.config.js";
8
8
  import { breadcrumbConfig } from "../dist/breadcrumb.config.js";
9
9
  import { buttonConfig } from "../dist/button.config.js";
@@ -181,6 +181,17 @@ type ExampleDef<TAxis extends string = string> = Record<string, ExampleEntryDef<
181
181
  interface BuildOptions {
182
182
  skipCssVariables?: boolean;
183
183
  preflight?: boolean;
184
+ /**
185
+ * Scope every emitted CSS selector under this class name. The emitter's
186
+ * `:root` block becomes `.<cssScope>`; mode/theme blocks (e.g. `.dark` or
187
+ * `[data-theme="slate"]`) keep their ancestor selector and append `.<cssScope>`
188
+ * so they still apply when the attribute is on `<html>`. Utility classes
189
+ * are nested under `.<cssScope>` so two UDS-powered packages on the same
190
+ * page do not collide.
191
+ *
192
+ * Wrap the embedded UI in `<div className="<cssScope>">` to activate.
193
+ */
194
+ cssScope?: string;
184
195
  }
185
196
  /** Internal data shape — accessible via resolveConfig() */
186
197
  interface UdsConfigData {
@@ -5,9 +5,9 @@ import { getConfigurablePropMapping } from "../../core/dist/configurable-prop-he
5
5
  import "../../core/dist/index.js";
6
6
  import { buildMotionReference, resolveComponentMotionAliases, validateComponentVariants } from "./component-resolution.js";
7
7
  import { setRegisteredStyleProps } from "./runtime-registry.js";
8
+ import { applyPresetToData, deepMerge, mergeAtomic } from "./preset-merge.js";
8
9
  import { resolveTokenType, sniffTokenTypeFromValue } from "./resolveTokenTypes.js";
9
10
  import { resolveStyleProp } from "./resolveStyleProp.js";
10
- import { applyPresetToData, deepMerge, mergeAtomic } from "./preset-merge.js";
11
11
  //#region ../config/dist/createConfig.js
12
12
  /** biome-ignore-all lint/suspicious/noExplicitAny: necessary for dynamic builder to work correctly */
13
13
  /**
@@ -15,6 +15,12 @@ type TokenType = 'color' | 'dimension' | 'number' | 'fontFamily' | 'fontWeight'
15
15
  * A single design token definition with a base value and optional modifier overrides.
16
16
  * Modifier keys use the `_` prefix convention (e.g., `_dark`, `_hover`).
17
17
  *
18
+ * Modifier values can be flat strings (`_dark: '#88bcfb'`) or nested token defs
19
+ * that introduce further modifiers — useful for stacking modes from different
20
+ * sets (e.g. `_slate: { value: '#1167f4', _dark: '#88bcfb' }` for the slate
21
+ * theme's dark variant). The emitter joins each level's selector to form a
22
+ * compound CSS selector (`[data-theme="slate"].dark`).
23
+ *
18
24
  * When `M` is narrowed (e.g., `'_dark' | '_light'`), only those modifier keys are
19
25
  * accepted — TypeScript will flag unknown modifiers like `_eggs` at compile time.
20
26
  *
@@ -24,11 +30,12 @@ type TokenType = 'color' | 'dimension' | 'number' | 'fontFamily' | 'fontWeight'
24
30
  * @example
25
31
  * { value: '#1167f4', _dark: '#88bcfb' }
26
32
  * { value: 'transparent', $type: 'string' }
33
+ * { value: '#1167f4', _slate: { value: '#1167f4', _dark: '#88bcfb' } }
27
34
  */
28
35
  type VarTokenDef<M extends `_${string}` = `_${string}`> = {
29
36
  value: string;
30
37
  $type?: TokenType;
31
- } & { [K in M]?: string };
38
+ } & { [K in M]?: string | VarTokenDef<M> };
32
39
  /**
33
40
  * A group of named tokens within a var namespace.
34
41
  *
@@ -1,19 +1 @@
1
- import { boldVibrantFoundationPreset } from "./boldVibrant.js";
2
- import { brutalistFoundationPreset } from "./brutalist.js";
3
- import { candyFoundationPreset } from "./candy.js";
4
- import { cleanMinimalistFoundationPreset } from "./cleanMinimalist.js";
5
- import { corporateFoundationPreset } from "./corporate.js";
6
- import { darkMoodyFoundationPreset } from "./darkMoody.js";
7
- import { defaultFoundationPreset } from "./defaultPreset.js";
8
- import { forestFoundationPreset } from "./forest.js";
9
- import { highContrastFoundationPreset } from "./highContrast.js";
10
- import { lavenderFoundationPreset } from "./lavender.js";
11
- import { luxuryFoundationPreset } from "./luxury.js";
12
- import { monochromeFoundationPreset } from "./monochrome.js";
13
- import { neonCyberFoundationPreset } from "./neonCyber.js";
14
- import { newspaperFoundationPreset } from "./newspaper.js";
15
- import { oceanFoundationPreset } from "./ocean.js";
16
- import { slateFoundationPreset } from "./slate.js";
17
- import { sunsetFoundationPreset } from "./sunset.js";
18
- import { terminalFoundationPreset } from "./terminal.js";
19
- import { warmOrganicFoundationPreset } from "./warmOrganic.js";
1
+ import { defaultFoundationPreset } from "./defaultPreset.js";
@@ -1,19 +1 @@
1
1
  import "./defaultPreset.js";
2
- import "./boldVibrant.js";
3
- import "./brutalist.js";
4
- import "./candy.js";
5
- import "./cleanMinimalist.js";
6
- import "./corporate.js";
7
- import "./darkMoody.js";
8
- import "./forest.js";
9
- import "./highContrast.js";
10
- import "./lavender.js";
11
- import "./luxury.js";
12
- import "./monochrome.js";
13
- import "./neonCyber.js";
14
- import "./newspaper.js";
15
- import "./ocean.js";
16
- import "./slate.js";
17
- import "./sunset.js";
18
- import "./terminal.js";
19
- import "./warmOrganic.js";
@@ -4,8 +4,8 @@ import { textConfig } from "../../components/dist/text.config.js";
4
4
  import { accordionConfig } from "../../components/dist/accordion.config.js";
5
5
  import { alertConfig } from "../../components/dist/alert.config.js";
6
6
  import { anchorConfig } from "../../components/dist/anchor.config.js";
7
- import { avatarGroupConfig } from "../../components/dist/avatar-group.config.js";
8
7
  import { avatarConfig } from "../../components/dist/avatar.config.js";
8
+ import { avatarGroupConfig } from "../../components/dist/avatar-group.config.js";
9
9
  import { badgeConfig } from "../../components/dist/badge.config.js";
10
10
  import { breadcrumbConfig } from "../../components/dist/breadcrumb.config.js";
11
11
  import { buttonConfig } from "../../components/dist/button.config.js";
@@ -1,19 +1 @@
1
- import { boldVibrantPreset } from "./boldVibrant.js";
2
- import { brutalistPreset } from "./brutalist.js";
3
- import { candyPreset } from "./candy.js";
4
- import { cleanMinimalistPreset } from "./cleanMinimalist.js";
5
- import { corporatePreset } from "./corporate.js";
6
- import { darkMoodyPreset } from "./darkMoody.js";
7
- import { defaultPreset } from "./defaultPreset.js";
8
- import { forestPreset } from "./forest.js";
9
- import { highContrastPreset } from "./highContrast.js";
10
- import { lavenderPreset } from "./lavender.js";
11
- import { luxuryPreset } from "./luxury.js";
12
- import { monochromePreset } from "./monochrome.js";
13
- import { neonCyberPreset } from "./neonCyber.js";
14
- import { newspaperPreset } from "./newspaper.js";
15
- import { oceanPreset } from "./ocean.js";
16
- import { slatePreset } from "./slate.js";
17
- import { sunsetPreset } from "./sunset.js";
18
- import { terminalPreset } from "./terminal.js";
19
- import { warmOrganicPreset } from "./warmOrganic.js";
1
+ import { defaultPreset } from "./defaultPreset.js";
@@ -1,19 +1 @@
1
- import "./boldVibrant.js";
2
- import "./brutalist.js";
3
- import "./candy.js";
4
- import "./cleanMinimalist.js";
5
- import "./corporate.js";
6
- import "./darkMoody.js";
7
1
  import "./defaultPreset.js";
8
- import "./forest.js";
9
- import "./highContrast.js";
10
- import "./lavender.js";
11
- import "./luxury.js";
12
- import "./monochrome.js";
13
- import "./neonCyber.js";
14
- import "./newspaper.js";
15
- import "./ocean.js";
16
- import "./slate.js";
17
- import "./sunset.js";
18
- import "./terminal.js";
19
- import "./warmOrganic.js";
package/dist/presets.d.ts CHANGED
@@ -1,20 +1,2 @@
1
- import { boldVibrantPreset } from "./presets/dist/boldVibrant.js";
2
- import { brutalistPreset } from "./presets/dist/brutalist.js";
3
- import { candyPreset } from "./presets/dist/candy.js";
4
- import { cleanMinimalistPreset } from "./presets/dist/cleanMinimalist.js";
5
- import { corporatePreset } from "./presets/dist/corporate.js";
6
- import { darkMoodyPreset } from "./presets/dist/darkMoody.js";
7
1
  import { defaultPreset } from "./presets/dist/defaultPreset.js";
8
- import { forestPreset } from "./presets/dist/forest.js";
9
- import { highContrastPreset } from "./presets/dist/highContrast.js";
10
- import { lavenderPreset } from "./presets/dist/lavender.js";
11
- import { luxuryPreset } from "./presets/dist/luxury.js";
12
- import { monochromePreset } from "./presets/dist/monochrome.js";
13
- import { neonCyberPreset } from "./presets/dist/neonCyber.js";
14
- import { newspaperPreset } from "./presets/dist/newspaper.js";
15
- import { oceanPreset } from "./presets/dist/ocean.js";
16
- import { slatePreset } from "./presets/dist/slate.js";
17
- import { sunsetPreset } from "./presets/dist/sunset.js";
18
- import { terminalPreset } from "./presets/dist/terminal.js";
19
- import { warmOrganicPreset } from "./presets/dist/warmOrganic.js";
20
- export { boldVibrantPreset, brutalistPreset, candyPreset, cleanMinimalistPreset, corporatePreset, darkMoodyPreset, defaultPreset, forestPreset, highContrastPreset, lavenderPreset, luxuryPreset, monochromePreset, neonCyberPreset, newspaperPreset, oceanPreset, slatePreset, sunsetPreset, terminalPreset, warmOrganicPreset };
2
+ export { defaultPreset };
package/dist/presets.js CHANGED
@@ -1,21 +1,3 @@
1
- import { boldVibrantPreset } from "./presets/dist/boldVibrant.js";
2
- import { brutalistPreset } from "./presets/dist/brutalist.js";
3
- import { candyPreset } from "./presets/dist/candy.js";
4
- import { cleanMinimalistPreset } from "./presets/dist/cleanMinimalist.js";
5
- import { corporatePreset } from "./presets/dist/corporate.js";
6
- import { darkMoodyPreset } from "./presets/dist/darkMoody.js";
7
1
  import { defaultPreset } from "./presets/dist/defaultPreset.js";
8
- import { forestPreset } from "./presets/dist/forest.js";
9
- import { highContrastPreset } from "./presets/dist/highContrast.js";
10
- import { lavenderPreset } from "./presets/dist/lavender.js";
11
- import { luxuryPreset } from "./presets/dist/luxury.js";
12
- import { monochromePreset } from "./presets/dist/monochrome.js";
13
- import { neonCyberPreset } from "./presets/dist/neonCyber.js";
14
- import { newspaperPreset } from "./presets/dist/newspaper.js";
15
- import { oceanPreset } from "./presets/dist/ocean.js";
16
- import { slatePreset } from "./presets/dist/slate.js";
17
- import { sunsetPreset } from "./presets/dist/sunset.js";
18
- import { terminalPreset } from "./presets/dist/terminal.js";
19
- import { warmOrganicPreset } from "./presets/dist/warmOrganic.js";
20
2
  import "./presets/dist/index.js";
21
- export { boldVibrantPreset, brutalistPreset, candyPreset, cleanMinimalistPreset, corporatePreset, darkMoodyPreset, defaultPreset, forestPreset, highContrastPreset, lavenderPreset, luxuryPreset, monochromePreset, neonCyberPreset, newspaperPreset, oceanPreset, slatePreset, sunsetPreset, terminalPreset, warmOrganicPreset };
3
+ export { defaultPreset };