@yahoo/uds-v5-wip 1.50.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.
@@ -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
  /**
@@ -1,6 +1,6 @@
1
+ import { applySlotOverrides, assertTransformedConfig, buildSlotProps, buildUntransformedSlotProps, inferComponentNameFromRenderFn, mergeMotionConfig, mergeRootClassName, mergeSlotMotionProps, partitionMergedProps } from "./createComponent.boundaries.js";
1
2
  import { processStyleProps } from "./getStyles.js";
2
3
  import { createComponentStyler } from "./getComponentStyles.js";
3
- import { applySlotOverrides, assertTransformedConfig, buildSlotProps, buildUntransformedSlotProps, inferComponentNameFromRenderFn, mergeMotionConfig, mergeRootClassName, mergeSlotMotionProps, partitionMergedProps } from "./createComponent.boundaries.js";
4
4
  import { createElement } from "react";
5
5
  //#region ../core/dist/createComponent.js
6
6
  function createPrimitiveRenderFn(tag) {
@@ -3,8 +3,8 @@ import "../../utils/dist/index.js";
3
3
  import { expandCompositeStyles, getCompositeStylesConfig } from "./compositeStyles.js";
4
4
  import { propMappings } from "./style-prop-data.js";
5
5
  import { stylePropsTwMap } from "./generated/stylePropsTwMap.js";
6
- import { modifierMappings } from "./modifier-mappings.js";
7
6
  import { colorPropToOpacityProp } from "./color-opacity-map.js";
7
+ import { modifierMappings } from "./modifier-mappings.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.
@@ -2,8 +2,8 @@ import "../../../../../utils/dist/index.js";
2
2
  import "./compositeStyles.js";
3
3
  import { propMappings } from "./style-prop-data.js";
4
4
  import { stylePropsTwMap } from "./generated/stylePropsTwMap.js";
5
- import { modifierMappings } from "./modifier-mappings.js";
6
5
  import { colorPropToOpacityProp } from "./color-opacity-map.js";
6
+ import { modifierMappings } from "./modifier-mappings.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. */