@yahoo/uds-v5-wip 1.41.0 → 1.43.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.
- package/dist/config/dist/defineStyleProp.d.ts +14 -3
- package/dist/config/dist/defineStyleProp.js +11 -2
- package/dist/config/dist/resolveStyleProp.d.ts +6 -1
- package/dist/config/dist/resolveStyleProp.js +24 -11
- package/dist/config.d.ts +2 -2
- package/dist/core/dist/color-opacity-map.d.ts +2 -1
- package/dist/core/dist/compositeStyles.d.ts +2 -1
- package/dist/core/dist/configurable-prop-helpers.d.ts +2 -1
- package/dist/core/dist/createComponent.d.ts +2 -1
- package/dist/core/dist/createComponentExample.d.ts +2 -1
- package/dist/core/dist/createProvider.d.ts +2 -1
- package/dist/core/dist/generated/stylePropsTwMap.d.ts +2 -1
- package/dist/core/dist/getComponentStyles.d.ts +2 -1
- package/dist/core/dist/getStyles.d.ts +2 -1
- package/dist/core/dist/modifier-mappings.d.ts +2 -1
- package/dist/core/dist/resolveMotionState.d.ts +2 -1
- package/dist/core/dist/style-prop-data.d.ts +2 -1
- package/dist/core/dist/transformPreset.d.ts +2 -1
- package/dist/core/dist/withDefaultStyleProps.d.ts +2 -1
- package/dist/foundational-presets/dist/boldVibrant.d.ts +4 -4
- package/dist/foundational-presets/dist/brutalist.d.ts +4 -4
- package/dist/foundational-presets/dist/candy.d.ts +4 -4
- package/dist/foundational-presets/dist/cleanMinimalist.d.ts +4 -4
- package/dist/foundational-presets/dist/corporate.d.ts +4 -4
- package/dist/foundational-presets/dist/darkMoody.d.ts +4 -4
- package/dist/foundational-presets/dist/defaultPreset.d.ts +2 -2
- package/dist/foundational-presets/dist/forest.d.ts +4 -4
- package/dist/foundational-presets/dist/highContrast.d.ts +4 -4
- package/dist/foundational-presets/dist/lavender.d.ts +4 -4
- package/dist/foundational-presets/dist/luxury.d.ts +4 -4
- package/dist/foundational-presets/dist/monochrome.d.ts +4 -4
- package/dist/foundational-presets/dist/neonCyber.d.ts +4 -4
- package/dist/foundational-presets/dist/newspaper.d.ts +4 -4
- package/dist/foundational-presets/dist/ocean.d.ts +4 -4
- package/dist/foundational-presets/dist/slate.d.ts +4 -4
- package/dist/foundational-presets/dist/style-props.js +4 -4
- package/dist/foundational-presets/dist/sunset.d.ts +4 -4
- package/dist/foundational-presets/dist/terminal.d.ts +4 -4
- package/dist/foundational-presets/dist/warmOrganic.d.ts +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -33,8 +33,19 @@ type StylePropMetadata = {
|
|
|
33
33
|
description?: string;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
|
-
* A finalized style prop. Returned by `defineStyleProp(spec)
|
|
37
|
-
* Consumers wrap these in
|
|
36
|
+
* A finalized style prop. Returned by `defineStyleProp(spec)` (or the
|
|
37
|
+
* `.metadata({...})` chain). Consumers wrap these in
|
|
38
|
+
* `uds.registerStyleProps({ <propName>: ... })`.
|
|
39
|
+
*
|
|
40
|
+
* `cssProperty` is passed through verbatim from the authored input:
|
|
41
|
+
* - **string** — a direct prop writing one CSS property.
|
|
42
|
+
* - **`readonly string[]`** — a fan-out prop writing every CSS
|
|
43
|
+
* property in the list (e.g. `borderRadiusStart` covering both
|
|
44
|
+
* start-side corners).
|
|
45
|
+
*
|
|
46
|
+
* Readers that need iteration normalize at the call site
|
|
47
|
+
* (`Array.isArray(p) ? p : [p]`); readers that only need the primary
|
|
48
|
+
* use the string directly or `Array.isArray(p) ? p[0] : p`.
|
|
38
49
|
*/
|
|
39
50
|
/**
|
|
40
51
|
* Structurally-loose form of {@link StyleProp}. Any concrete `StyleProp<P>`
|
|
@@ -44,7 +55,7 @@ type StylePropMetadata = {
|
|
|
44
55
|
*/
|
|
45
56
|
interface AnyStyleProp {
|
|
46
57
|
readonly kind: 'styleProp';
|
|
47
|
-
readonly cssProperty: string;
|
|
58
|
+
readonly cssProperty: string | readonly string[];
|
|
48
59
|
readonly classPrefix: string;
|
|
49
60
|
readonly values: readonly unknown[];
|
|
50
61
|
readonly arbitrary?: ArbitrarySpec;
|
|
@@ -14,8 +14,17 @@ const CUSTOM_PROPERTY_PREFIX = "--";
|
|
|
14
14
|
* registration.
|
|
15
15
|
*/
|
|
16
16
|
function defineStyleProp(spec) {
|
|
17
|
-
const { cssProperty, classPrefix, values, arbitrary, cssType } = spec;
|
|
18
|
-
|
|
17
|
+
const { cssProperty: cssPropertyInput, classPrefix, values, arbitrary, cssType } = spec;
|
|
18
|
+
let cssProperty;
|
|
19
|
+
if (Array.isArray(cssPropertyInput)) {
|
|
20
|
+
const deduped = Array.from(new Set(cssPropertyInput));
|
|
21
|
+
if (deduped.length === 0) throw new Error("defineStyleProp: `cssProperty` array must contain at least one CSS property.");
|
|
22
|
+
cssProperty = deduped;
|
|
23
|
+
} else cssProperty = cssPropertyInput;
|
|
24
|
+
const allProperties = Array.isArray(cssProperty) ? cssProperty : [cssProperty];
|
|
25
|
+
const hasCustom = allProperties.some((p) => p.startsWith(CUSTOM_PROPERTY_PREFIX));
|
|
26
|
+
if (allProperties.length > 1 && hasCustom) throw new Error(`defineStyleProp: \`cssProperty\` arrays must be standard CSS properties only; custom (\`--*\`) properties must use the single-string form. Got ${JSON.stringify(cssProperty)}.`);
|
|
27
|
+
const isCustomProperty = hasCustom;
|
|
19
28
|
if (isCustomProperty && cssType === void 0) throw new Error(`defineStyleProp: cssType is required for custom CSS properties (got cssProperty=${JSON.stringify(cssProperty)}).`);
|
|
20
29
|
if (!isCustomProperty && cssType !== void 0) throw new Error(`defineStyleProp: cssType is only allowed for custom CSS properties (--*). Got cssProperty=${JSON.stringify(cssProperty)} with cssType=${JSON.stringify(cssType)}.`);
|
|
21
30
|
const baseFields = {
|
|
@@ -45,7 +45,12 @@ interface ResolvedToken {
|
|
|
45
45
|
interface ResolvedStyleProp {
|
|
46
46
|
/** The JSX prop name — the map key from `registerStyleProps({...})`. */
|
|
47
47
|
readonly propName: string;
|
|
48
|
-
|
|
48
|
+
/** The CSS property (or properties) this prop writes — passed through
|
|
49
|
+
* verbatim from the source `defineStyleProp` input. Single string for
|
|
50
|
+
* direct props, array for fan-out props (e.g. `borderRadiusStart` →
|
|
51
|
+
* both start-side corners). Readers normalize at the call site
|
|
52
|
+
* (`Array.isArray(p) ? p : [p]`) when iteration matters. */
|
|
53
|
+
readonly cssProperty: string | readonly string[];
|
|
49
54
|
readonly classPrefix: string;
|
|
50
55
|
readonly tokens: readonly ResolvedToken[];
|
|
51
56
|
readonly literals: readonly (string | number | boolean)[];
|
|
@@ -54,21 +54,33 @@ function looksLikeShadow(value) {
|
|
|
54
54
|
/**
|
|
55
55
|
* Detect a token's CSS value type. Resolution order:
|
|
56
56
|
* 1. Per-token `type` override.
|
|
57
|
-
* 2.
|
|
58
|
-
* 3.
|
|
57
|
+
* 2. Value sniff via {@link sniffTokenTypeFromValue}.
|
|
58
|
+
* 3. Group-level `type`.
|
|
59
59
|
*
|
|
60
60
|
* When the resolved type is `'length-percentage'` and the raw value ends in
|
|
61
61
|
* `%`, narrow to `'percentage'`; otherwise narrow to `'length'`. When the
|
|
62
|
-
* resolved type is `'string'
|
|
63
|
-
*
|
|
62
|
+
* resolved type is `'string'`, narrow shadow-like values to `'shadow'` and
|
|
63
|
+
* ratio-shaped values to `'ratio'`.
|
|
64
|
+
*
|
|
65
|
+
* Exported so Studio (and any other runtime consumer) can resolve a cell's
|
|
66
|
+
* effective `CssValueTypeName` with the same sniff-before-group policy used
|
|
67
|
+
* for `RegisteredTokenGroupMeta`. UDS-1600 tracks removing the remaining
|
|
68
|
+
* mirrored codegen resolver once the token type API settles.
|
|
69
|
+
*
|
|
70
|
+
* The input shapes ({@link DetectTokenValueTypeInput} /
|
|
71
|
+
* {@link DetectTokenValueTypeGroup}) are intentionally minimal: the resolver
|
|
72
|
+
* reads only `token.value`, `token.type`, and `group.type` — never walks
|
|
73
|
+
* `group.tokens`, never checks that `token` is inside `group`. Typing them
|
|
74
|
+
* as full `AtomicToken` would force trimmed-shape consumers (Studio's
|
|
75
|
+
* `TokenEntry`) to either round-trip back to the source group or `as`-assert
|
|
76
|
+
* past the type system.
|
|
64
77
|
*/
|
|
65
78
|
function detectTokenValueType(token, group) {
|
|
66
|
-
const explicit = token.type ?? group.type;
|
|
67
79
|
let resolved;
|
|
68
|
-
if (
|
|
80
|
+
if (token.type) resolved = tokenTypeToValueType(token.type);
|
|
69
81
|
else {
|
|
70
82
|
const sniffed = sniffTokenTypeFromValue(token.value);
|
|
71
|
-
resolved = sniffed ? tokenTypeToValueType(sniffed) : void 0;
|
|
83
|
+
resolved = sniffed ? tokenTypeToValueType(sniffed) : group.type ? tokenTypeToValueType(group.type) : void 0;
|
|
72
84
|
}
|
|
73
85
|
if (resolved === "length-percentage") {
|
|
74
86
|
const trimmed = token.value.trim();
|
|
@@ -144,6 +156,7 @@ function resolveGroupTokens(group, cssProperty, configPrefix, namespace) {
|
|
|
144
156
|
*/
|
|
145
157
|
function resolveStyleProp(propName, styleProp, config) {
|
|
146
158
|
const { cssProperty, classPrefix, values, arbitrary, metadata } = styleProp;
|
|
159
|
+
const primaryCssProperty = Array.isArray(cssProperty) ? cssProperty[0] : cssProperty;
|
|
147
160
|
const configPrefix = config.prefix;
|
|
148
161
|
const tokens = [];
|
|
149
162
|
const literals = [];
|
|
@@ -166,7 +179,7 @@ function resolveStyleProp(propName, styleProp, config) {
|
|
|
166
179
|
const token = group.tokens.find((t) => t.name === parsed.key);
|
|
167
180
|
if (!token) continue;
|
|
168
181
|
const valueType = detectTokenValueType(token, group);
|
|
169
|
-
if (!isTokenAcceptedByProperty(
|
|
182
|
+
if (!isTokenAcceptedByProperty(primaryCssProperty, valueType, token.value)) continue;
|
|
170
183
|
const safeName = safeTokenName(token.name);
|
|
171
184
|
const varPrefix = group.cssPrefix ?? group.namespace ?? parsed.group;
|
|
172
185
|
tokens.push({
|
|
@@ -179,7 +192,7 @@ function resolveStyleProp(propName, styleProp, config) {
|
|
|
179
192
|
cssVar: buildCssVar(configPrefix, varPrefix, safeName),
|
|
180
193
|
modifiers: token.modifiers
|
|
181
194
|
});
|
|
182
|
-
} else tokens.push(...resolveGroupTokens(group,
|
|
195
|
+
} else tokens.push(...resolveGroupTokens(group, primaryCssProperty, configPrefix));
|
|
183
196
|
continue;
|
|
184
197
|
}
|
|
185
198
|
if (isNamespacedRef(entry)) {
|
|
@@ -187,7 +200,7 @@ function resolveStyleProp(propName, styleProp, config) {
|
|
|
187
200
|
if (!parsed || parsed.key !== void 0) continue;
|
|
188
201
|
const group = findGroup(config.atomic, parsed.group);
|
|
189
202
|
if (!group) continue;
|
|
190
|
-
tokens.push(...resolveGroupTokens(group,
|
|
203
|
+
tokens.push(...resolveGroupTokens(group, primaryCssProperty, configPrefix, entry.namespace));
|
|
191
204
|
continue;
|
|
192
205
|
}
|
|
193
206
|
if (typeof entry === "object" && entry !== null && "alias" in entry && "value" in entry) {
|
|
@@ -213,4 +226,4 @@ function resolveStyleProp(propName, styleProp, config) {
|
|
|
213
226
|
};
|
|
214
227
|
}
|
|
215
228
|
//#endregion
|
|
216
|
-
export { resolveStyleProp };
|
|
229
|
+
export { detectTokenValueType, resolveStyleProp };
|
package/dist/config.d.ts
CHANGED
|
@@ -223,8 +223,8 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | GetModifierF
|
|
|
223
223
|
0: string;
|
|
224
224
|
4: string;
|
|
225
225
|
1: string;
|
|
226
|
-
px: string;
|
|
227
226
|
2: string;
|
|
227
|
+
px: string;
|
|
228
228
|
8: string;
|
|
229
229
|
0.5: string;
|
|
230
230
|
1.5: string;
|
|
@@ -359,12 +359,12 @@ declare const defaultPreset: UdsConfig<_$_uds_types0.ModifierProp | GetModifierF
|
|
|
359
359
|
4: string;
|
|
360
360
|
full: string;
|
|
361
361
|
1: string;
|
|
362
|
+
2: string;
|
|
362
363
|
"1/2": string;
|
|
363
364
|
"1/3": string;
|
|
364
365
|
"2/3": string;
|
|
365
366
|
"1/4": string;
|
|
366
367
|
"3/4": string;
|
|
367
|
-
2: string;
|
|
368
368
|
8: string;
|
|
369
369
|
0.5: string;
|
|
370
370
|
1.5: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region ../core/dist/color-opacity-map.d.ts
|
|
2
|
+
//#region src/color-opacity-map.d.ts
|
|
2
3
|
/**
|
|
3
4
|
* Maps each color prop name to its corresponding opacity prop name.
|
|
4
5
|
* Used by the runtime (`getStyles`) and loader (`style-transform`) to merge
|
|
@@ -7,6 +8,6 @@
|
|
|
7
8
|
* @example
|
|
8
9
|
* `bg="primary"` + `bgOpacity="75"` → class `bg-primary_75`
|
|
9
10
|
*/
|
|
10
|
-
declare const colorPropToOpacityProp: Record<string, string>;
|
|
11
|
+
declare const colorPropToOpacityProp: Record<string, string>; //#endregion
|
|
11
12
|
//#endregion
|
|
12
13
|
export { colorPropToOpacityProp };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CompositeStylesConfig } from "@uds/types";
|
|
2
2
|
|
|
3
3
|
//#region ../core/dist/compositeStyles.d.ts
|
|
4
|
+
//#region src/compositeStyles.d.ts
|
|
4
5
|
/** Set the composite-styles config (called by loader at build time) */
|
|
5
6
|
declare function setCompositeStylesConfig(config: CompositeStylesConfig): void;
|
|
6
7
|
/** Get the current composite-styles config */
|
|
@@ -16,6 +17,6 @@ declare function getCompositeStylesConfig(): CompositeStylesConfig;
|
|
|
16
17
|
declare function expandCompositeStyles(props: Record<string, unknown>, config?: CompositeStylesConfig): {
|
|
17
18
|
expanded: Record<string, unknown>;
|
|
18
19
|
markerClasses: string[];
|
|
19
|
-
};
|
|
20
|
+
}; //#endregion
|
|
20
21
|
//#endregion
|
|
21
22
|
export { expandCompositeStyles, getCompositeStylesConfig, setCompositeStylesConfig };
|
|
@@ -2,6 +2,7 @@ import { PropMapping } from "./style-prop-data.js";
|
|
|
2
2
|
import { ConfigurableProp } from "@uds/types";
|
|
3
3
|
|
|
4
4
|
//#region ../core/dist/configurable-prop-helpers.d.ts
|
|
5
|
+
//#region src/configurable-prop-helpers.d.ts
|
|
5
6
|
/** Look up a {@link PropMapping} by ConfigurableProp name. */
|
|
6
7
|
declare function getConfigurablePropMapping(prop: ConfigurableProp): PropMapping | undefined;
|
|
7
8
|
interface ConfigurablePropertyEntry {
|
|
@@ -26,6 +27,6 @@ interface CssVariablePrefixEntry {
|
|
|
26
27
|
* Only includes props that have both `cssProperty` and `defaultVarPrefix`.
|
|
27
28
|
* Deduplicates by `defaultVarPrefix` so each namespace appears once.
|
|
28
29
|
*/
|
|
29
|
-
declare function getCssVariablePrefixes(): CssVariablePrefixEntry[];
|
|
30
|
+
declare function getCssVariablePrefixes(): CssVariablePrefixEntry[]; //#endregion
|
|
30
31
|
//#endregion
|
|
31
32
|
export { ConfigurablePropertyEntry, CssVariablePrefixEntry, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CreateComponentConfig, CreateComponentProps, CreateComponentRenderFn, CreateComponentSlotTagConfig, CreateComponentTypeInput } from "@uds/types";
|
|
2
2
|
|
|
3
3
|
//#region ../core/dist/createComponent.d.ts
|
|
4
|
+
//#region src/createComponent.d.ts
|
|
4
5
|
type PrimitiveTag = keyof React.JSX.IntrinsicElements;
|
|
5
6
|
type SpecConfig<TSpec> = TSpec extends {
|
|
6
7
|
config: infer TConfig extends CreateComponentTypeInput;
|
|
@@ -51,6 +52,6 @@ declare function createComponent<TSpecOrProps = {}>(tag: PrimitiveTag): React.FC
|
|
|
51
52
|
props: infer TOwnProps;
|
|
52
53
|
} ? CreateComponentProps<TConfig, TOwnProps, PrimitiveTag> : PrimitiveOwnProps<TSpecOrProps>>;
|
|
53
54
|
declare function createComponent<TSpec>(renderFn: CreateComponentRenderFn<SpecConfig<TSpec>, SpecOwnProps<TSpec>, SpecSlotConfig<TSpec>>): React.FC<CreateComponentProps<SpecConfig<TSpec>, SpecOwnProps<TSpec>, SpecSlotConfig<TSpec>>>;
|
|
54
|
-
declare function createComponent(config: CreateComponentConfig<string>, renderFn: CreateComponentRenderFn<any, any, any>): React.FC<any>;
|
|
55
|
+
declare function createComponent(config: CreateComponentConfig<string>, renderFn: CreateComponentRenderFn<any, any, any>): React.FC<any>; //#endregion
|
|
55
56
|
//#endregion
|
|
56
57
|
export { createComponent };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentProps, ComponentType } from "react";
|
|
2
2
|
|
|
3
3
|
//#region ../core/dist/createComponentExample.d.ts
|
|
4
|
+
//#region src/createComponentExample.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* Extracts variant fixtures from a Component's props type.
|
|
6
7
|
* If Button has `variant?: 'brand' | 'outline'` and `size?: 'sm' | 'md'`,
|
|
@@ -36,6 +37,6 @@ type ExamplesResult<TComponent extends ComponentType<any>> = {
|
|
|
36
37
|
* }));
|
|
37
38
|
* ```
|
|
38
39
|
*/
|
|
39
|
-
declare function createComponentExample<TComponent extends ComponentType<any>, T extends Record<string, ExampleFn<TComponent>>>(Component: TComponent, examplesFn: (fixtures: VariantFixtures<TComponent>) => ExamplesResult<TComponent>): ComponentExample<T>;
|
|
40
|
+
declare function createComponentExample<TComponent extends ComponentType<any>, T extends Record<string, ExampleFn<TComponent>>>(Component: TComponent, examplesFn: (fixtures: VariantFixtures<TComponent>) => ExamplesResult<TComponent>): ComponentExample<T>; //#endregion
|
|
40
41
|
//#endregion
|
|
41
42
|
export { ComponentExample, createComponentExample };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region ../core/dist/createProvider.d.ts
|
|
2
|
+
//#region src/createProvider.d.ts
|
|
2
3
|
type ProviderRenderFn<TContext, TProps = Record<never, never>> = (props: {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
} & TProps) => {
|
|
@@ -7,6 +8,6 @@ type ProviderRenderFn<TContext, TProps = Record<never, never>> = (props: {
|
|
|
7
8
|
};
|
|
8
9
|
declare function createProvider<TContext, TProps = Record<never, never>>(name: string, renderFn: ProviderRenderFn<TContext, TProps>): [React.FC<{
|
|
9
10
|
children: React.ReactNode;
|
|
10
|
-
} & TProps>, () => TContext];
|
|
11
|
+
} & TProps>, () => TContext]; //#endregion
|
|
11
12
|
//#endregion
|
|
12
13
|
export { createProvider };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region ../core/dist/generated/stylePropsTwMap.d.ts
|
|
2
|
+
//#region src/generated/stylePropsTwMap.d.ts
|
|
2
3
|
declare const stylePropsTwMap: {
|
|
3
4
|
readonly "border-boolean": {
|
|
4
5
|
readonly border: "boolean";
|
|
@@ -1695,6 +1696,6 @@ declare const stylePropsTwMap: {
|
|
|
1695
1696
|
readonly "hyphens-manual": {
|
|
1696
1697
|
readonly hyphens: "manual";
|
|
1697
1698
|
};
|
|
1698
|
-
};
|
|
1699
|
+
}; //#endregion
|
|
1699
1700
|
//#endregion
|
|
1700
1701
|
export { stylePropsTwMap };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentRegistry, ComponentSlotsOf, ComponentVariantsOf } from "@uds/types";
|
|
2
2
|
|
|
3
3
|
//#region ../core/dist/getComponentStyles.d.ts
|
|
4
|
+
//#region src/getComponentStyles.d.ts
|
|
4
5
|
type ResolveSlots<Name extends string> = Name extends keyof ComponentRegistry ? ComponentSlotsOf<Name> : string;
|
|
5
6
|
type ResolveVariants<Name extends string> = Name extends keyof ComponentRegistry ? ComponentVariantsOf<Name> : Record<string, string>;
|
|
6
7
|
interface UdsRuntimeMeta {
|
|
@@ -44,6 +45,6 @@ interface ComponentStyler<Name extends string> {
|
|
|
44
45
|
* @param slots - Array of slot names
|
|
45
46
|
* @param element - Optional HTML element tag for element-specific prop forwarding
|
|
46
47
|
*/
|
|
47
|
-
declare function createComponentStyler<Name extends string>(componentName: Name, slots: readonly string[], element?: string, variants?: readonly string[]): ComponentStyler<Name>;
|
|
48
|
+
declare function createComponentStyler<Name extends string>(componentName: Name, slots: readonly string[], element?: string, variants?: readonly string[]): ComponentStyler<Name>; //#endregion
|
|
48
49
|
//#endregion
|
|
49
50
|
export { createComponentStyler };
|
|
@@ -2,6 +2,7 @@ import { ClassValue } from "clsx";
|
|
|
2
2
|
import { ModifierProp, ModifierProps, StyleAndModifierProps, StyleProps } from "@uds/types";
|
|
3
3
|
|
|
4
4
|
//#region ../core/dist/getStyles.d.ts
|
|
5
|
+
//#region src/getStyles.d.ts
|
|
5
6
|
/** Convert kebab-case CSS property to camelCase for React inline styles.
|
|
6
7
|
* CSS custom properties (--*) are kept as-is since React supports them verbatim. */
|
|
7
8
|
declare function toCamelCase(str: string): string;
|
|
@@ -37,6 +38,6 @@ interface GetStylesParams extends StyleProps, ModifierProps {
|
|
|
37
38
|
* so they can be included in the CSS safelist.
|
|
38
39
|
*/
|
|
39
40
|
declare function getStyles(props: GetStylesParams): string;
|
|
40
|
-
declare function getVariantClassName(componentName: string, variant: string | undefined): string;
|
|
41
|
+
declare function getVariantClassName(componentName: string, variant: string | undefined): string; //#endregion
|
|
41
42
|
//#endregion
|
|
42
43
|
export { createVariants, cx, getStyles, getVariantClassName, processStyleProps, toCamelCase };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ModifierProp } from "@uds/types";
|
|
2
2
|
|
|
3
3
|
//#region ../core/dist/modifier-mappings.d.ts
|
|
4
|
+
//#region src/modifier-mappings.d.ts
|
|
4
5
|
declare const modifierMappings: Record<ModifierProp, string>;
|
|
5
6
|
interface ModifierEntry {
|
|
6
7
|
prop: string;
|
|
7
8
|
cssSelector: string;
|
|
8
9
|
category: string;
|
|
9
10
|
description: string;
|
|
10
|
-
}
|
|
11
|
+
} //#endregion
|
|
11
12
|
//#endregion
|
|
12
13
|
export { ModifierEntry, modifierMappings };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
//#region ../core/dist/resolveMotionState.d.ts
|
|
2
|
-
|
|
2
|
+
//#region src/resolveMotionState.d.ts
|
|
3
|
+
declare function resolveMotionState(stateKeyframe: Record<string, unknown>, index: number): Record<string, number>; //#endregion
|
|
3
4
|
//#endregion
|
|
4
5
|
export { resolveMotionState };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StyleProp } from "@uds/types";
|
|
2
2
|
|
|
3
3
|
//#region ../core/dist/style-prop-data.d.ts
|
|
4
|
+
//#region src/style-prop-data.d.ts
|
|
4
5
|
interface PropMapping {
|
|
5
6
|
/** Class name prefix for runtime class generation. 'no-prefix' means value IS the class. */
|
|
6
7
|
classPrefix: string;
|
|
@@ -27,6 +28,6 @@ interface PropMapping {
|
|
|
27
28
|
}
|
|
28
29
|
/** Exclude className — it's passed through, not mapped to a utility class */
|
|
29
30
|
type MappedStyleProp = Exclude<StyleProp, 'className'>;
|
|
30
|
-
declare const propMappings: Record<MappedStyleProp, PropMapping>;
|
|
31
|
+
declare const propMappings: Record<MappedStyleProp, PropMapping>; //#endregion
|
|
31
32
|
//#endregion
|
|
32
33
|
export { PropMapping, propMappings };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MotionPreset } from "@uds/types";
|
|
2
2
|
|
|
3
3
|
//#region ../core/dist/transformPreset.d.ts
|
|
4
|
+
//#region src/transformPreset.d.ts
|
|
4
5
|
interface TransformedMotionProps {
|
|
5
6
|
initial?: Record<string, unknown>;
|
|
6
7
|
animate?: Record<string, unknown>;
|
|
@@ -12,6 +13,6 @@ interface TransformedMotionProps {
|
|
|
12
13
|
/**
|
|
13
14
|
* Convert a JS-runtime MotionPreset to a motion/react-compatible props object.
|
|
14
15
|
*/
|
|
15
|
-
declare function transformPreset(preset: MotionPreset): TransformedMotionProps;
|
|
16
|
+
declare function transformPreset(preset: MotionPreset): TransformedMotionProps; //#endregion
|
|
16
17
|
//#endregion
|
|
17
18
|
export { TransformedMotionProps, transformPreset };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BorderRadius, GridSpan, GridStartEnd, GridTemplate, StyleAndModifierProps } from "@uds/types";
|
|
2
2
|
|
|
3
3
|
//#region ../core/dist/withDefaultStyleProps.d.ts
|
|
4
|
+
//#region src/withDefaultStyleProps.d.ts
|
|
4
5
|
interface StackDefaultsInput extends StyleAndModifierProps {
|
|
5
6
|
gap?: StyleAndModifierProps['gap'];
|
|
6
7
|
}
|
|
@@ -38,6 +39,6 @@ declare const withDefaultStyleProps: {
|
|
|
38
39
|
shape?: BorderRadius;
|
|
39
40
|
}) => StyleAndModifierProps;
|
|
40
41
|
Svg: (props: SvgDefaultsInput) => StyleAndModifierProps;
|
|
41
|
-
};
|
|
42
|
+
}; //#endregion
|
|
42
43
|
//#endregion
|
|
43
44
|
export { withDefaultStyleProps };
|
|
@@ -387,8 +387,8 @@ declare const boldVibrantFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp
|
|
|
387
387
|
0: string;
|
|
388
388
|
4: string;
|
|
389
389
|
1: string;
|
|
390
|
-
px: string;
|
|
391
390
|
2: string;
|
|
391
|
+
px: string;
|
|
392
392
|
8: string;
|
|
393
393
|
0.5: string;
|
|
394
394
|
1.5: string;
|
|
@@ -423,8 +423,8 @@ declare const boldVibrantFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp
|
|
|
423
423
|
0: string;
|
|
424
424
|
4: string;
|
|
425
425
|
1: string;
|
|
426
|
-
px: string;
|
|
427
426
|
2: string;
|
|
427
|
+
px: string;
|
|
428
428
|
8: string;
|
|
429
429
|
0.5: string;
|
|
430
430
|
1.5: string;
|
|
@@ -644,12 +644,12 @@ declare const boldVibrantFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp
|
|
|
644
644
|
4: string;
|
|
645
645
|
full: string;
|
|
646
646
|
1: string;
|
|
647
|
+
2: string;
|
|
647
648
|
"1/2": string;
|
|
648
649
|
"1/3": string;
|
|
649
650
|
"2/3": string;
|
|
650
651
|
"1/4": string;
|
|
651
652
|
"3/4": string;
|
|
652
|
-
2: string;
|
|
653
653
|
8: string;
|
|
654
654
|
0.5: string;
|
|
655
655
|
1.5: string;
|
|
@@ -685,12 +685,12 @@ declare const boldVibrantFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp
|
|
|
685
685
|
4: string;
|
|
686
686
|
full: string;
|
|
687
687
|
1: string;
|
|
688
|
+
2: string;
|
|
688
689
|
"1/2": string;
|
|
689
690
|
"1/3": string;
|
|
690
691
|
"2/3": string;
|
|
691
692
|
"1/4": string;
|
|
692
693
|
"3/4": string;
|
|
693
|
-
2: string;
|
|
694
694
|
8: string;
|
|
695
695
|
0.5: string;
|
|
696
696
|
1.5: string;
|
|
@@ -387,8 +387,8 @@ declare const brutalistFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp |
|
|
|
387
387
|
0: string;
|
|
388
388
|
4: string;
|
|
389
389
|
1: string;
|
|
390
|
-
px: string;
|
|
391
390
|
2: string;
|
|
391
|
+
px: string;
|
|
392
392
|
8: string;
|
|
393
393
|
0.5: string;
|
|
394
394
|
1.5: string;
|
|
@@ -423,8 +423,8 @@ declare const brutalistFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp |
|
|
|
423
423
|
0: string;
|
|
424
424
|
4: string;
|
|
425
425
|
1: string;
|
|
426
|
-
px: string;
|
|
427
426
|
2: string;
|
|
427
|
+
px: string;
|
|
428
428
|
8: string;
|
|
429
429
|
0.5: string;
|
|
430
430
|
1.5: string;
|
|
@@ -644,12 +644,12 @@ declare const brutalistFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp |
|
|
|
644
644
|
4: string;
|
|
645
645
|
full: string;
|
|
646
646
|
1: string;
|
|
647
|
+
2: string;
|
|
647
648
|
"1/2": string;
|
|
648
649
|
"1/3": string;
|
|
649
650
|
"2/3": string;
|
|
650
651
|
"1/4": string;
|
|
651
652
|
"3/4": string;
|
|
652
|
-
2: string;
|
|
653
653
|
8: string;
|
|
654
654
|
0.5: string;
|
|
655
655
|
1.5: string;
|
|
@@ -685,12 +685,12 @@ declare const brutalistFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp |
|
|
|
685
685
|
4: string;
|
|
686
686
|
full: string;
|
|
687
687
|
1: string;
|
|
688
|
+
2: string;
|
|
688
689
|
"1/2": string;
|
|
689
690
|
"1/3": string;
|
|
690
691
|
"2/3": string;
|
|
691
692
|
"1/4": string;
|
|
692
693
|
"3/4": string;
|
|
693
|
-
2: string;
|
|
694
694
|
8: string;
|
|
695
695
|
0.5: string;
|
|
696
696
|
1.5: string;
|
|
@@ -387,8 +387,8 @@ declare const candyFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp | GetM
|
|
|
387
387
|
0: string;
|
|
388
388
|
4: string;
|
|
389
389
|
1: string;
|
|
390
|
-
px: string;
|
|
391
390
|
2: string;
|
|
391
|
+
px: string;
|
|
392
392
|
8: string;
|
|
393
393
|
0.5: string;
|
|
394
394
|
1.5: string;
|
|
@@ -423,8 +423,8 @@ declare const candyFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp | GetM
|
|
|
423
423
|
0: string;
|
|
424
424
|
4: string;
|
|
425
425
|
1: string;
|
|
426
|
-
px: string;
|
|
427
426
|
2: string;
|
|
427
|
+
px: string;
|
|
428
428
|
8: string;
|
|
429
429
|
0.5: string;
|
|
430
430
|
1.5: string;
|
|
@@ -644,12 +644,12 @@ declare const candyFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp | GetM
|
|
|
644
644
|
4: string;
|
|
645
645
|
full: string;
|
|
646
646
|
1: string;
|
|
647
|
+
2: string;
|
|
647
648
|
"1/2": string;
|
|
648
649
|
"1/3": string;
|
|
649
650
|
"2/3": string;
|
|
650
651
|
"1/4": string;
|
|
651
652
|
"3/4": string;
|
|
652
|
-
2: string;
|
|
653
653
|
8: string;
|
|
654
654
|
0.5: string;
|
|
655
655
|
1.5: string;
|
|
@@ -685,12 +685,12 @@ declare const candyFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp | GetM
|
|
|
685
685
|
4: string;
|
|
686
686
|
full: string;
|
|
687
687
|
1: string;
|
|
688
|
+
2: string;
|
|
688
689
|
"1/2": string;
|
|
689
690
|
"1/3": string;
|
|
690
691
|
"2/3": string;
|
|
691
692
|
"1/4": string;
|
|
692
693
|
"3/4": string;
|
|
693
|
-
2: string;
|
|
694
694
|
8: string;
|
|
695
695
|
0.5: string;
|
|
696
696
|
1.5: string;
|
|
@@ -387,8 +387,8 @@ declare const cleanMinimalistFoundationPreset: UdsConfig<_$_uds_types0.ModifierP
|
|
|
387
387
|
0: string;
|
|
388
388
|
4: string;
|
|
389
389
|
1: string;
|
|
390
|
-
px: string;
|
|
391
390
|
2: string;
|
|
391
|
+
px: string;
|
|
392
392
|
8: string;
|
|
393
393
|
0.5: string;
|
|
394
394
|
1.5: string;
|
|
@@ -423,8 +423,8 @@ declare const cleanMinimalistFoundationPreset: UdsConfig<_$_uds_types0.ModifierP
|
|
|
423
423
|
0: string;
|
|
424
424
|
4: string;
|
|
425
425
|
1: string;
|
|
426
|
-
px: string;
|
|
427
426
|
2: string;
|
|
427
|
+
px: string;
|
|
428
428
|
8: string;
|
|
429
429
|
0.5: string;
|
|
430
430
|
1.5: string;
|
|
@@ -644,12 +644,12 @@ declare const cleanMinimalistFoundationPreset: UdsConfig<_$_uds_types0.ModifierP
|
|
|
644
644
|
4: string;
|
|
645
645
|
full: string;
|
|
646
646
|
1: string;
|
|
647
|
+
2: string;
|
|
647
648
|
"1/2": string;
|
|
648
649
|
"1/3": string;
|
|
649
650
|
"2/3": string;
|
|
650
651
|
"1/4": string;
|
|
651
652
|
"3/4": string;
|
|
652
|
-
2: string;
|
|
653
653
|
8: string;
|
|
654
654
|
0.5: string;
|
|
655
655
|
1.5: string;
|
|
@@ -685,12 +685,12 @@ declare const cleanMinimalistFoundationPreset: UdsConfig<_$_uds_types0.ModifierP
|
|
|
685
685
|
4: string;
|
|
686
686
|
full: string;
|
|
687
687
|
1: string;
|
|
688
|
+
2: string;
|
|
688
689
|
"1/2": string;
|
|
689
690
|
"1/3": string;
|
|
690
691
|
"2/3": string;
|
|
691
692
|
"1/4": string;
|
|
692
693
|
"3/4": string;
|
|
693
|
-
2: string;
|
|
694
694
|
8: string;
|
|
695
695
|
0.5: string;
|
|
696
696
|
1.5: string;
|
|
@@ -387,8 +387,8 @@ declare const corporateFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp |
|
|
|
387
387
|
0: string;
|
|
388
388
|
4: string;
|
|
389
389
|
1: string;
|
|
390
|
-
px: string;
|
|
391
390
|
2: string;
|
|
391
|
+
px: string;
|
|
392
392
|
8: string;
|
|
393
393
|
0.5: string;
|
|
394
394
|
1.5: string;
|
|
@@ -423,8 +423,8 @@ declare const corporateFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp |
|
|
|
423
423
|
0: string;
|
|
424
424
|
4: string;
|
|
425
425
|
1: string;
|
|
426
|
-
px: string;
|
|
427
426
|
2: string;
|
|
427
|
+
px: string;
|
|
428
428
|
8: string;
|
|
429
429
|
0.5: string;
|
|
430
430
|
1.5: string;
|
|
@@ -644,12 +644,12 @@ declare const corporateFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp |
|
|
|
644
644
|
4: string;
|
|
645
645
|
full: string;
|
|
646
646
|
1: string;
|
|
647
|
+
2: string;
|
|
647
648
|
"1/2": string;
|
|
648
649
|
"1/3": string;
|
|
649
650
|
"2/3": string;
|
|
650
651
|
"1/4": string;
|
|
651
652
|
"3/4": string;
|
|
652
|
-
2: string;
|
|
653
653
|
8: string;
|
|
654
654
|
0.5: string;
|
|
655
655
|
1.5: string;
|
|
@@ -685,12 +685,12 @@ declare const corporateFoundationPreset: UdsConfig<_$_uds_types0.ModifierProp |
|
|
|
685
685
|
4: string;
|
|
686
686
|
full: string;
|
|
687
687
|
1: string;
|
|
688
|
+
2: string;
|
|
688
689
|
"1/2": string;
|
|
689
690
|
"1/3": string;
|
|
690
691
|
"2/3": string;
|
|
691
692
|
"1/4": string;
|
|
692
693
|
"3/4": string;
|
|
693
|
-
2: string;
|
|
694
694
|
8: string;
|
|
695
695
|
0.5: string;
|
|
696
696
|
1.5: string;
|