@yahoo/uds-v5-wip 1.48.0 → 1.50.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 (98) 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.js +19 -1
  4. package/dist/config/dist/defineStyleProp.d.ts +18 -0
  5. package/dist/config/dist/defineStyleProp.js +19 -7
  6. package/dist/config/dist/resolveStyleProp.d.ts +14 -0
  7. package/dist/config/dist/resolveStyleProp.js +11 -5
  8. package/dist/config/dist/types.d.ts +8 -1
  9. package/dist/core/dist/getStyles.js +1 -1
  10. package/dist/core/dist/index.d.ts +0 -1
  11. package/dist/core/dist/index.js +0 -1
  12. package/dist/core.d.ts +1 -2
  13. package/dist/core.js +1 -2
  14. package/dist/foundational-presets/dist/index.d.ts +1 -19
  15. package/dist/foundational-presets/dist/index.js +0 -18
  16. package/dist/foundational-presets/dist/style-props.js +60 -0
  17. package/dist/loader/dist/loader/style-transform.js +3 -4
  18. package/dist/loader/dist/packages/core/dist/getStyles.js +1 -1
  19. package/dist/presets/dist/defaultPreset.js +1 -1
  20. package/dist/presets/dist/index.d.ts +1 -19
  21. package/dist/presets/dist/index.js +0 -18
  22. package/dist/presets.d.ts +1 -19
  23. package/dist/presets.js +1 -19
  24. package/dist/tsconfig.tsbuildinfo +1 -1
  25. package/package.json +3 -3
  26. package/dist/core/dist/color-opacity-map.d.ts +0 -13
  27. package/dist/foundational-presets/dist/boldVibrant.d.ts +0 -2153
  28. package/dist/foundational-presets/dist/boldVibrant.js +0 -230
  29. package/dist/foundational-presets/dist/brutalist.d.ts +0 -2153
  30. package/dist/foundational-presets/dist/brutalist.js +0 -230
  31. package/dist/foundational-presets/dist/candy.d.ts +0 -2153
  32. package/dist/foundational-presets/dist/candy.js +0 -230
  33. package/dist/foundational-presets/dist/cleanMinimalist.d.ts +0 -2153
  34. package/dist/foundational-presets/dist/cleanMinimalist.js +0 -230
  35. package/dist/foundational-presets/dist/corporate.d.ts +0 -2153
  36. package/dist/foundational-presets/dist/corporate.js +0 -230
  37. package/dist/foundational-presets/dist/darkMoody.d.ts +0 -2153
  38. package/dist/foundational-presets/dist/darkMoody.js +0 -230
  39. package/dist/foundational-presets/dist/forest.d.ts +0 -2153
  40. package/dist/foundational-presets/dist/forest.js +0 -230
  41. package/dist/foundational-presets/dist/highContrast.d.ts +0 -2153
  42. package/dist/foundational-presets/dist/highContrast.js +0 -230
  43. package/dist/foundational-presets/dist/lavender.d.ts +0 -2153
  44. package/dist/foundational-presets/dist/lavender.js +0 -230
  45. package/dist/foundational-presets/dist/luxury.d.ts +0 -2153
  46. package/dist/foundational-presets/dist/luxury.js +0 -230
  47. package/dist/foundational-presets/dist/monochrome.d.ts +0 -2153
  48. package/dist/foundational-presets/dist/monochrome.js +0 -230
  49. package/dist/foundational-presets/dist/neonCyber.d.ts +0 -2153
  50. package/dist/foundational-presets/dist/neonCyber.js +0 -230
  51. package/dist/foundational-presets/dist/newspaper.d.ts +0 -2153
  52. package/dist/foundational-presets/dist/newspaper.js +0 -230
  53. package/dist/foundational-presets/dist/ocean.d.ts +0 -2153
  54. package/dist/foundational-presets/dist/ocean.js +0 -230
  55. package/dist/foundational-presets/dist/slate.d.ts +0 -2153
  56. package/dist/foundational-presets/dist/slate.js +0 -230
  57. package/dist/foundational-presets/dist/sunset.d.ts +0 -2153
  58. package/dist/foundational-presets/dist/sunset.js +0 -230
  59. package/dist/foundational-presets/dist/terminal.d.ts +0 -2153
  60. package/dist/foundational-presets/dist/terminal.js +0 -230
  61. package/dist/foundational-presets/dist/warmOrganic.d.ts +0 -2153
  62. package/dist/foundational-presets/dist/warmOrganic.js +0 -230
  63. package/dist/presets/dist/boldVibrant.d.ts +0 -6
  64. package/dist/presets/dist/boldVibrant.js +0 -7
  65. package/dist/presets/dist/brutalist.d.ts +0 -6
  66. package/dist/presets/dist/brutalist.js +0 -7
  67. package/dist/presets/dist/candy.d.ts +0 -6
  68. package/dist/presets/dist/candy.js +0 -7
  69. package/dist/presets/dist/cleanMinimalist.d.ts +0 -6
  70. package/dist/presets/dist/cleanMinimalist.js +0 -7
  71. package/dist/presets/dist/corporate.d.ts +0 -6
  72. package/dist/presets/dist/corporate.js +0 -7
  73. package/dist/presets/dist/darkMoody.d.ts +0 -6
  74. package/dist/presets/dist/darkMoody.js +0 -7
  75. package/dist/presets/dist/forest.d.ts +0 -6
  76. package/dist/presets/dist/forest.js +0 -7
  77. package/dist/presets/dist/highContrast.d.ts +0 -6
  78. package/dist/presets/dist/highContrast.js +0 -7
  79. package/dist/presets/dist/lavender.d.ts +0 -6
  80. package/dist/presets/dist/lavender.js +0 -7
  81. package/dist/presets/dist/luxury.d.ts +0 -6
  82. package/dist/presets/dist/luxury.js +0 -7
  83. package/dist/presets/dist/monochrome.d.ts +0 -6
  84. package/dist/presets/dist/monochrome.js +0 -7
  85. package/dist/presets/dist/neonCyber.d.ts +0 -6
  86. package/dist/presets/dist/neonCyber.js +0 -7
  87. package/dist/presets/dist/newspaper.d.ts +0 -6
  88. package/dist/presets/dist/newspaper.js +0 -7
  89. package/dist/presets/dist/ocean.d.ts +0 -6
  90. package/dist/presets/dist/ocean.js +0 -7
  91. package/dist/presets/dist/slate.d.ts +0 -6
  92. package/dist/presets/dist/slate.js +0 -7
  93. package/dist/presets/dist/sunset.d.ts +0 -6
  94. package/dist/presets/dist/sunset.js +0 -7
  95. package/dist/presets/dist/terminal.d.ts +0 -6
  96. package/dist/presets/dist/terminal.js +0 -7
  97. package/dist/presets/dist/warmOrganic.d.ts +0 -6
  98. 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";
@@ -421,9 +421,27 @@ function createConfigBuilder(data, extensions) {
421
421
  }, extensions);
422
422
  },
423
423
  registerStyleProps(props) {
424
+ const expanded = {};
425
+ for (const [propName, prop] of Object.entries(props)) {
426
+ expanded[propName] = prop;
427
+ if (prop.opacityPair) {
428
+ const sibling = {
429
+ kind: "styleProp",
430
+ cssProperty: prop.cssProperty,
431
+ classPrefix: "",
432
+ values: prop.opacityPair.values,
433
+ arbitrary: void 0,
434
+ cssType: prop.cssType,
435
+ metadata: { label: prop.metadata?.label ? `${prop.metadata.label} opacity` : void 0 },
436
+ _pairedWith: propName,
437
+ _separator: prop.opacityPair.separator
438
+ };
439
+ expanded[prop.opacityPair.as] = sibling;
440
+ }
441
+ }
424
442
  const mergedStyleProps = {
425
443
  ...data.styleProps ?? {},
426
- ...props
444
+ ...expanded
427
445
  };
428
446
  const updates = { styleProps: mergedStyleProps };
429
447
  if (data.vars) updates.atomic = mergeAtomic([], synthesizeAtomicFromVarsAndStyleProps(data.vars, mergedStyleProps, data.modes ?? []), "override");
@@ -47,6 +47,23 @@ type StylePropMetadata = {
47
47
  * (`Array.isArray(p) ? p : [p]`); readers that only need the primary
48
48
  * use the string directly or `Array.isArray(p) ? p[0] : p`.
49
49
  */
50
+ /**
51
+ * Internal shape attached to a {@link StyleProp} by `.withOpacity()`.
52
+ * The resolver inspects this at `resolveConfig` time to synthesize a
53
+ * second {@link ResolvedStyleProp} for the opacity sibling.
54
+ */
55
+ interface OpacityPairSpec {
56
+ /** JSX-prop name for the opacity sibling, e.g. `'bgOpacity'`. */
57
+ readonly as: string;
58
+ /** Token-group refs the opacity sibling accepts as values. */
59
+ readonly values: readonly unknown[];
60
+ /**
61
+ * Separator between the parent's value-token suffix and the opacity
62
+ * value in the emitted class name (`bg-primary_75` vs.
63
+ * `bg-primary/75`). Defaults to `_`.
64
+ */
65
+ readonly separator: string;
66
+ }
50
67
  /**
51
68
  * Structurally-loose form of {@link StyleProp}. Any concrete `StyleProp<P>`
52
69
  * is assignable to this. Used at registration / resolution boundaries where
@@ -61,6 +78,7 @@ interface AnyStyleProp {
61
78
  readonly arbitrary?: ArbitrarySpec;
62
79
  readonly cssType?: CssValueTypeName;
63
80
  readonly metadata: StylePropMetadata;
81
+ readonly opacityPair?: OpacityPairSpec;
64
82
  }
65
83
  /**
66
84
  * Return shape of {@link defineStyleProp}. The `metadata` field doubles as
@@ -35,14 +35,26 @@ function defineStyleProp(spec) {
35
35
  arbitrary,
36
36
  cssType
37
37
  };
38
- const metadata = (meta = {}) => ({
39
- ...baseFields,
40
- metadata: meta
41
- });
42
- return {
43
- ...baseFields,
44
- metadata
38
+ const buildChainable = (fields) => {
39
+ const metadata = (meta = {}) => ({
40
+ ...fields,
41
+ metadata: meta
42
+ });
43
+ const withOpacity = (spec) => buildChainable({
44
+ ...fields,
45
+ opacityPair: {
46
+ as: spec.as,
47
+ values: spec.values,
48
+ separator: spec.separator ?? "_"
49
+ }
50
+ });
51
+ return {
52
+ ...fields,
53
+ metadata,
54
+ withOpacity
55
+ };
45
56
  };
57
+ return buildChainable(baseFields);
46
58
  }
47
59
  //#endregion
48
60
  export { defineStyleProp };
@@ -52,6 +52,20 @@ interface ResolvedStyleProp {
52
52
  * (`Array.isArray(p) ? p : [p]`) when iteration matters. */
53
53
  readonly cssProperty: string | readonly string[];
54
54
  readonly classPrefix: string;
55
+ /**
56
+ * Set on opacity-sibling entries to the JSX-prop name of the parent
57
+ * color prop they compose with (`bg` for `bgOpacity`). Authored via
58
+ * `.withOpacity({ as })` on the parent's `defineStyleProp`. Consumers
59
+ * use this to merge `bg="primary"` + `bgOpacity="75"` into a single
60
+ * `bg-primary_75` class.
61
+ */
62
+ readonly pairedWith?: string;
63
+ /**
64
+ * Class-name separator between the parent's token suffix and the
65
+ * opacity value (`bg-primary_75` vs. `bg-primary/75`). Only set when
66
+ * `pairedWith` is set. Defaults to `'_'` at the authoring layer.
67
+ */
68
+ readonly separator?: string;
55
69
  readonly tokens: readonly ResolvedToken[];
56
70
  readonly literals: readonly (string | number | boolean)[];
57
71
  /** Alias → CSS-value map for `{ alias, value }` entries in `values`.
@@ -124,13 +124,13 @@ function isNamespacedRef(entry) {
124
124
  function buildCssVar(configPrefix, varPrefix, safeName) {
125
125
  return configPrefix ? `--${configPrefix}-${varPrefix}-${safeName}` : `--${varPrefix}-${safeName}`;
126
126
  }
127
- function resolveGroupTokens(group, cssProperty, configPrefix, namespace) {
127
+ function resolveGroupTokens(group, cssProperty, configPrefix, namespace, skipPropertyFilter = false) {
128
128
  const groupName = group.namespace ?? group.cssPrefix ?? "";
129
129
  const varPrefix = group.cssPrefix ?? group.namespace ?? "";
130
130
  const out = [];
131
131
  for (const token of group.tokens) {
132
132
  const valueType = detectTokenValueType(token, group);
133
- if (!isTokenAcceptedByProperty(cssProperty, valueType, token.value)) continue;
133
+ if (!skipPropertyFilter && !isTokenAcceptedByProperty(cssProperty, valueType, token.value)) continue;
134
134
  const safeName = safeTokenName(token.name);
135
135
  out.push({
136
136
  name: token.name,
@@ -156,6 +156,8 @@ function resolveGroupTokens(group, cssProperty, configPrefix, namespace) {
156
156
  */
157
157
  function resolveStyleProp(propName, styleProp, config) {
158
158
  const { cssProperty, classPrefix, values, arbitrary, metadata } = styleProp;
159
+ const pairedWith = styleProp._pairedWith;
160
+ const separator = styleProp._separator;
159
161
  const primaryCssProperty = Array.isArray(cssProperty) ? cssProperty[0] : cssProperty;
160
162
  const configPrefix = config.prefix;
161
163
  const tokens = [];
@@ -179,7 +181,7 @@ function resolveStyleProp(propName, styleProp, config) {
179
181
  const token = group.tokens.find((t) => t.name === parsed.key);
180
182
  if (!token) continue;
181
183
  const valueType = detectTokenValueType(token, group);
182
- if (!isTokenAcceptedByProperty(primaryCssProperty, valueType, token.value)) continue;
184
+ if (!pairedWith && !isTokenAcceptedByProperty(primaryCssProperty, valueType, token.value)) continue;
183
185
  const safeName = safeTokenName(token.name);
184
186
  const varPrefix = group.cssPrefix ?? group.namespace ?? parsed.group;
185
187
  tokens.push({
@@ -192,7 +194,7 @@ function resolveStyleProp(propName, styleProp, config) {
192
194
  cssVar: buildCssVar(configPrefix, varPrefix, safeName),
193
195
  modifiers: token.modifiers
194
196
  });
195
- } else tokens.push(...resolveGroupTokens(group, primaryCssProperty, configPrefix));
197
+ } else tokens.push(...resolveGroupTokens(group, primaryCssProperty, configPrefix, void 0, pairedWith !== void 0));
196
198
  continue;
197
199
  }
198
200
  if (isNamespacedRef(entry)) {
@@ -200,7 +202,7 @@ function resolveStyleProp(propName, styleProp, config) {
200
202
  if (!parsed || parsed.key !== void 0) continue;
201
203
  const group = findGroup(config.atomic, parsed.group);
202
204
  if (!group) continue;
203
- tokens.push(...resolveGroupTokens(group, primaryCssProperty, configPrefix, entry.namespace));
205
+ tokens.push(...resolveGroupTokens(group, primaryCssProperty, configPrefix, entry.namespace, pairedWith !== void 0));
204
206
  continue;
205
207
  }
206
208
  if (typeof entry === "object" && entry !== null && "alias" in entry && "value" in entry) {
@@ -218,6 +220,10 @@ function resolveStyleProp(propName, styleProp, config) {
218
220
  propName,
219
221
  cssProperty,
220
222
  classPrefix,
223
+ ...pairedWith !== void 0 ? {
224
+ pairedWith,
225
+ separator
226
+ } : {},
221
227
  tokens,
222
228
  literals,
223
229
  ...Object.keys(literalAliases).length > 0 ? { literalAliases } : {},
@@ -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,10 +1,10 @@
1
- import { colorPropToOpacityProp } from "./color-opacity-map.js";
2
1
  import { componentSlotClass } from "../../utils/dist/string-utils/componentClassName.js";
3
2
  import "../../utils/dist/index.js";
4
3
  import { expandCompositeStyles, getCompositeStylesConfig } from "./compositeStyles.js";
5
4
  import { propMappings } from "./style-prop-data.js";
6
5
  import { stylePropsTwMap } from "./generated/stylePropsTwMap.js";
7
6
  import { modifierMappings } from "./modifier-mappings.js";
7
+ import { colorPropToOpacityProp } from "./color-opacity-map.js";
8
8
  import { clsx } from "clsx";
9
9
  //#region ../core/dist/getStyles.js
10
10
  /** Convert kebab-case CSS property to camelCase for React inline styles.
@@ -1,4 +1,3 @@
1
- import { colorPropToOpacityProp } from "./color-opacity-map.js";
2
1
  import { expandCompositeStyles, getCompositeStylesConfig, setCompositeStylesConfig } from "./compositeStyles.js";
3
2
  import { PropMapping, propMappings } from "./style-prop-data.js";
4
3
  import { ConfigurablePropertyEntry, CssVariablePrefixEntry, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes } from "./configurable-prop-helpers.js";
@@ -1,4 +1,3 @@
1
- import "./color-opacity-map.js";
2
1
  import "./compositeStyles.js";
3
2
  import "./style-prop-data.js";
4
3
  import "./configurable-prop-helpers.js";
package/dist/core.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { colorPropToOpacityProp } from "./core/dist/color-opacity-map.js";
2
1
  import { expandCompositeStyles, getCompositeStylesConfig, setCompositeStylesConfig } from "./core/dist/compositeStyles.js";
3
2
  import { PropMapping, propMappings } from "./core/dist/style-prop-data.js";
4
3
  import { ConfigurablePropertyEntry, CssVariablePrefixEntry, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes } from "./core/dist/configurable-prop-helpers.js";
@@ -12,4 +11,4 @@ import { ModifierEntry, modifierMappings } from "./core/dist/modifier-mappings.j
12
11
  import { resolveMotionState } from "./core/dist/resolveMotionState.js";
13
12
  import { TransformedMotionProps, transformPreset } from "./core/dist/transformPreset.js";
14
13
  import { withDefaultStyleProps } from "./core/dist/withDefaultStyleProps.js";
15
- export { ComponentExample, ConfigurablePropertyEntry, CssVariablePrefixEntry, ModifierEntry, PropMapping, TransformedMotionProps, colorPropToOpacityProp, createComponent, createComponentExample, createComponentStyler, createProvider, createVariants, cx, expandCompositeStyles, getCompositeStylesConfig, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes, getStyles, getVariantClassName, modifierMappings, processStyleProps, propMappings, resolveMotionState, setCompositeStylesConfig, stylePropsTwMap, toCamelCase, transformPreset, withDefaultStyleProps };
14
+ export { ComponentExample, ConfigurablePropertyEntry, CssVariablePrefixEntry, ModifierEntry, PropMapping, TransformedMotionProps, createComponent, createComponentExample, createComponentStyler, createProvider, createVariants, cx, expandCompositeStyles, getCompositeStylesConfig, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes, getStyles, getVariantClassName, modifierMappings, processStyleProps, propMappings, resolveMotionState, setCompositeStylesConfig, stylePropsTwMap, toCamelCase, transformPreset, withDefaultStyleProps };
package/dist/core.js CHANGED
@@ -1,4 +1,3 @@
1
- import { colorPropToOpacityProp } from "./core/dist/color-opacity-map.js";
2
1
  import { expandCompositeStyles, getCompositeStylesConfig, setCompositeStylesConfig } from "./core/dist/compositeStyles.js";
3
2
  import { propMappings } from "./core/dist/style-prop-data.js";
4
3
  import { getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes } from "./core/dist/configurable-prop-helpers.js";
@@ -13,4 +12,4 @@ import { resolveMotionState } from "./core/dist/resolveMotionState.js";
13
12
  import { transformPreset } from "./core/dist/transformPreset.js";
14
13
  import { withDefaultStyleProps } from "./core/dist/withDefaultStyleProps.js";
15
14
  import "./core/dist/index.js";
16
- export { colorPropToOpacityProp, createComponent, createComponentExample, createComponentStyler, createProvider, createVariants, cx, expandCompositeStyles, getCompositeStylesConfig, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes, getStyles, getVariantClassName, modifierMappings, processStyleProps, propMappings, resolveMotionState, setCompositeStylesConfig, stylePropsTwMap, toCamelCase, transformPreset, withDefaultStyleProps };
15
+ export { createComponent, createComponentExample, createComponentStyler, createProvider, createVariants, cx, expandCompositeStyles, getCompositeStylesConfig, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes, getStyles, getVariantClassName, modifierMappings, processStyleProps, propMappings, resolveMotionState, setCompositeStylesConfig, stylePropsTwMap, toCamelCase, transformPreset, withDefaultStyleProps };
@@ -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";
@@ -239,6 +239,9 @@ const bg = defineStyleProp({
239
239
  classPrefix: "bg",
240
240
  values: ["{color}", "{bg}"],
241
241
  arbitrary: "color"
242
+ }).withOpacity({
243
+ as: "bgOpacity",
244
+ values: ["{opacity}"]
242
245
  }).metadata({ label: "Background" });
243
246
  const borderRadius = defineStyleProp({
244
247
  cssProperty: "border-radius",
@@ -299,54 +302,81 @@ const borderColor = defineStyleProp({
299
302
  classPrefix: "border-color",
300
303
  values: ["{color}", "{borderColor}"],
301
304
  arbitrary: "color"
305
+ }).withOpacity({
306
+ as: "borderColorOpacity",
307
+ values: ["{opacity}"]
302
308
  }).metadata({ label: "Border color" });
303
309
  const borderYColor = defineStyleProp({
304
310
  cssProperty: "border-block-color",
305
311
  classPrefix: "border-y-color",
306
312
  values: ["{color}", "{borderColor}"],
307
313
  arbitrary: "color"
314
+ }).withOpacity({
315
+ as: "borderYColorOpacity",
316
+ values: ["{opacity}"]
308
317
  }).metadata({ label: "Border Y color" });
309
318
  const borderXColor = defineStyleProp({
310
319
  cssProperty: "border-inline-color",
311
320
  classPrefix: "border-x-color",
312
321
  values: ["{color}", "{borderColor}"],
313
322
  arbitrary: "color"
323
+ }).withOpacity({
324
+ as: "borderXColorOpacity",
325
+ values: ["{opacity}"]
314
326
  }).metadata({ label: "Border X color" });
315
327
  const borderStartColor = defineStyleProp({
316
328
  cssProperty: "border-inline-start-color",
317
329
  classPrefix: "border-s-color",
318
330
  values: ["{color}", "{borderColor}"],
319
331
  arbitrary: "color"
332
+ }).withOpacity({
333
+ as: "borderStartColorOpacity",
334
+ values: ["{opacity}"]
320
335
  }).metadata({ label: "Border start color" });
321
336
  const borderLeftColor = defineStyleProp({
322
337
  cssProperty: "border-left-color",
323
338
  classPrefix: "border-l-color",
324
339
  values: ["{color}", "{borderColor}"],
325
340
  arbitrary: "color"
341
+ }).withOpacity({
342
+ as: "borderLeftColorOpacity",
343
+ values: ["{opacity}"]
326
344
  }).metadata({ label: "Border left color" });
327
345
  const borderEndColor = defineStyleProp({
328
346
  cssProperty: "border-inline-end-color",
329
347
  classPrefix: "border-e-color",
330
348
  values: ["{color}", "{borderColor}"],
331
349
  arbitrary: "color"
350
+ }).withOpacity({
351
+ as: "borderEndColorOpacity",
352
+ values: ["{opacity}"]
332
353
  }).metadata({ label: "Border end color" });
333
354
  const borderRightColor = defineStyleProp({
334
355
  cssProperty: "border-right-color",
335
356
  classPrefix: "border-r-color",
336
357
  values: ["{color}", "{borderColor}"],
337
358
  arbitrary: "color"
359
+ }).withOpacity({
360
+ as: "borderRightColorOpacity",
361
+ values: ["{opacity}"]
338
362
  }).metadata({ label: "Border right color" });
339
363
  const borderTopColor = defineStyleProp({
340
364
  cssProperty: "border-top-color",
341
365
  classPrefix: "border-t-color",
342
366
  values: ["{color}", "{borderColor}"],
343
367
  arbitrary: "color"
368
+ }).withOpacity({
369
+ as: "borderTopColorOpacity",
370
+ values: ["{opacity}"]
344
371
  }).metadata({ label: "Border top color" });
345
372
  const borderBottomColor = defineStyleProp({
346
373
  cssProperty: "border-bottom-color",
347
374
  classPrefix: "border-b-color",
348
375
  values: ["{color}", "{borderColor}"],
349
376
  arbitrary: "color"
377
+ }).withOpacity({
378
+ as: "borderBottomColorOpacity",
379
+ values: ["{opacity}"]
350
380
  }).metadata({ label: "Border bottom color" });
351
381
  const border = defineStyleProp({
352
382
  cssProperty: "border-width",
@@ -435,6 +465,9 @@ const color = defineStyleProp({
435
465
  classPrefix: "color",
436
466
  values: ["{color}"],
437
467
  arbitrary: "color"
468
+ }).withOpacity({
469
+ as: "colorOpacity",
470
+ values: ["{opacity}"]
438
471
  }).metadata({ label: "Color" });
439
472
  const divideWidth = defineStyleProp({
440
473
  cssProperty: "border-width",
@@ -446,6 +479,9 @@ const divideColor = defineStyleProp({
446
479
  classPrefix: "divide-color",
447
480
  values: ["{color}", "{borderColor}"],
448
481
  arbitrary: "color"
482
+ }).withOpacity({
483
+ as: "divideColorOpacity",
484
+ values: ["{opacity}"]
449
485
  }).metadata({ label: "Divide color" });
450
486
  const divideStyle = defineStyleProp({
451
487
  cssProperty: "border-style",
@@ -578,6 +614,9 @@ const caretColor = defineStyleProp({
578
614
  classPrefix: "caret-color",
579
615
  values: ["{color}"],
580
616
  arbitrary: "color"
617
+ }).withOpacity({
618
+ as: "caretColorOpacity",
619
+ values: ["{opacity}"]
581
620
  }).metadata({ label: "Caret color" });
582
621
  const pointerEvents = defineStyleProp({
583
622
  cssProperty: "pointer-events",
@@ -832,6 +871,9 @@ const outlineColor = defineStyleProp({
832
871
  classPrefix: "outline-color",
833
872
  values: ["{color}"],
834
873
  arbitrary: "color"
874
+ }).withOpacity({
875
+ as: "outlineColorOpacity",
876
+ values: ["{opacity}"]
835
877
  }).metadata({ label: "Outline color" });
836
878
  const outlineStyle = defineStyleProp({
837
879
  cssProperty: "outline-style",
@@ -854,6 +896,9 @@ const ringColor = defineStyleProp({
854
896
  classPrefix: "ring-color",
855
897
  values: ["{color}"],
856
898
  arbitrary: "color"
899
+ }).withOpacity({
900
+ as: "ringColorOpacity",
901
+ values: ["{opacity}"]
857
902
  }).metadata({ label: "Ring color" });
858
903
  const ringOffsetWidth = defineStyleProp({
859
904
  cssProperty: "--tw-ring-offset-width",
@@ -867,6 +912,9 @@ const ringOffsetColor = defineStyleProp({
867
912
  classPrefix: "ring-offset-color",
868
913
  values: ["{color}"],
869
914
  arbitrary: "color"
915
+ }).withOpacity({
916
+ as: "ringOffsetColorOpacity",
917
+ values: ["{opacity}"]
870
918
  }).metadata({ label: "Ring offset color" });
871
919
  const ringInset = defineStyleProp({
872
920
  cssProperty: "--tw-ring-inset",
@@ -885,6 +933,9 @@ const shadowColor = defineStyleProp({
885
933
  classPrefix: "shadow-color",
886
934
  values: ["{color}"],
887
935
  arbitrary: "color"
936
+ }).withOpacity({
937
+ as: "shadowColorOpacity",
938
+ values: ["{opacity}"]
888
939
  }).metadata({ label: "Shadow color" });
889
940
  const height = defineStyleProp({
890
941
  cssProperty: "height",
@@ -1131,12 +1182,18 @@ const fillColor = defineStyleProp({
1131
1182
  classPrefix: "fill",
1132
1183
  values: ["{color}"],
1133
1184
  arbitrary: "color"
1185
+ }).withOpacity({
1186
+ as: "fillColorOpacity",
1187
+ values: ["{opacity}"]
1134
1188
  }).metadata({ label: "Fill color" });
1135
1189
  const strokeColor = defineStyleProp({
1136
1190
  cssProperty: "stroke",
1137
1191
  classPrefix: "stroke-color",
1138
1192
  values: ["{color}"],
1139
1193
  arbitrary: "color"
1194
+ }).withOpacity({
1195
+ as: "strokeColorOpacity",
1196
+ values: ["{opacity}"]
1140
1197
  }).metadata({ label: "Stroke color" });
1141
1198
  const strokeWidth = defineStyleProp({
1142
1199
  cssProperty: "stroke-width",
@@ -1321,6 +1378,9 @@ const textDecorationColor = defineStyleProp({
1321
1378
  classPrefix: "decoration-color",
1322
1379
  values: ["{color}"],
1323
1380
  arbitrary: "color"
1381
+ }).withOpacity({
1382
+ as: "textDecorationColorOpacity",
1383
+ values: ["{opacity}"]
1324
1384
  }).metadata({ label: "Text decoration color" });
1325
1385
  const textDecorationStyle = defineStyleProp({
1326
1386
  cssProperty: "text-decoration-style",
@@ -2,7 +2,6 @@ import { applyComponentStyleDefaults } from "../../../utils/dist/component-style
2
2
  import { kebabCase } from "../../../utils/dist/string-utils/kebabCase.js";
3
3
  import { componentVariantClass } from "../../../utils/dist/string-utils/componentClassName.js";
4
4
  import "../../../utils/dist/index.js";
5
- import { colorPropToOpacityProp } from "../packages/core/dist/color-opacity-map.js";
6
5
  import { expandCompositeStyles } from "../packages/core/dist/compositeStyles.js";
7
6
  import { propMappings } from "../packages/core/dist/style-prop-data.js";
8
7
  import { toCamelCase } from "../packages/core/dist/getStyles.js";
@@ -163,9 +162,9 @@ function createStyleTransformRuntime(transformData, manifest) {
163
162
  effectiveProps = expanded;
164
163
  if (markerClasses.length > 0) effectiveProps.__compositeStyleMarkers = markerClasses;
165
164
  }
166
- for (const [colorProp, opacityPropName] of Object.entries(colorPropToOpacityProp)) if (effectiveProps[opacityPropName] !== void 0 && effectiveProps[colorProp] !== void 0) {
167
- effectiveProps[colorProp] = `${effectiveProps[colorProp]}_${effectiveProps[opacityPropName]}`;
168
- delete effectiveProps[opacityPropName];
165
+ for (const { colorProp, opacityProp, separator } of transformData?.colorOpacityPairs ?? []) if (effectiveProps[opacityProp] !== void 0 && effectiveProps[colorProp] !== void 0) {
166
+ effectiveProps[colorProp] = `${effectiveProps[colorProp]}${separator}${effectiveProps[opacityProp]}`;
167
+ delete effectiveProps[opacityProp];
169
168
  }
170
169
  const classParts = [];
171
170
  if (Array.isArray(effectiveProps.__compositeStyleMarkers)) {
@@ -1,9 +1,9 @@
1
1
  import "../../../../../utils/dist/index.js";
2
- import { colorPropToOpacityProp } from "./color-opacity-map.js";
3
2
  import "./compositeStyles.js";
4
3
  import { propMappings } from "./style-prop-data.js";
5
4
  import { stylePropsTwMap } from "./generated/stylePropsTwMap.js";
6
5
  import { modifierMappings } from "./modifier-mappings.js";
6
+ import { colorPropToOpacityProp } from "./color-opacity-map.js";
7
7
  //#region ../loader/dist/packages/core/dist/getStyles.js
8
8
  /** Convert kebab-case CSS property to camelCase for React inline styles.
9
9
  * CSS custom properties (--*) are kept as-is since React supports them verbatim. */
@@ -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 };