@yahoo/uds-v5-wip 1.23.0 → 1.24.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/core/dist/createComponent.d.ts +1 -2
- package/dist/core/dist/createComponentExample.d.ts +1 -2
- package/dist/core/dist/createProvider.d.ts +1 -2
- package/dist/core/dist/generated/stylePropsTwMap.d.ts +1 -2
- package/dist/core/dist/getComponentStyles.d.ts +1 -2
- package/dist/core/dist/getStyles.d.ts +1 -2
- package/dist/core/dist/macros.d.ts +1 -2
- package/dist/core/dist/propMappings.d.ts +1 -2
- package/dist/core/dist/resolveMotionState.d.ts +1 -2
- package/dist/core/dist/transformPreset.d.ts +1 -2
- package/dist/core/dist/withDefaultStyleProps.d.ts +1 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,6 @@
|
|
|
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
|
|
5
4
|
type PrimitiveTag = keyof React.JSX.IntrinsicElements;
|
|
6
5
|
type SpecConfig<TSpec> = TSpec extends {
|
|
7
6
|
config: infer TConfig extends CreateComponentTypeInput;
|
|
@@ -52,6 +51,6 @@ declare function createComponent<TSpecOrProps = {}>(tag: PrimitiveTag): React.FC
|
|
|
52
51
|
props: infer TOwnProps;
|
|
53
52
|
} ? CreateComponentProps<TConfig, TOwnProps, PrimitiveTag> : PrimitiveOwnProps<TSpecOrProps>>;
|
|
54
53
|
declare function createComponent<TSpec>(renderFn: CreateComponentRenderFn<SpecConfig<TSpec>, SpecOwnProps<TSpec>, SpecSlotConfig<TSpec>>): React.FC<CreateComponentProps<SpecConfig<TSpec>, SpecOwnProps<TSpec>, SpecSlotConfig<TSpec>>>;
|
|
55
|
-
declare function createComponent(config: CreateComponentConfig<string>, renderFn: CreateComponentRenderFn<any, any, any>): React.FC<any>;
|
|
54
|
+
declare function createComponent(config: CreateComponentConfig<string>, renderFn: CreateComponentRenderFn<any, any, any>): React.FC<any>;
|
|
56
55
|
//#endregion
|
|
57
56
|
export { createComponent };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ComponentProps, ComponentType } from "react";
|
|
2
2
|
|
|
3
3
|
//#region ../core/dist/createComponentExample.d.ts
|
|
4
|
-
//#region src/createComponentExample.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Extracts variant fixtures from a Component's props type.
|
|
7
6
|
* If Button has `variant?: 'brand' | 'outline'` and `size?: 'sm' | 'md'`,
|
|
@@ -37,6 +36,6 @@ type ExamplesResult<TComponent extends ComponentType<any>> = {
|
|
|
37
36
|
* }));
|
|
38
37
|
* ```
|
|
39
38
|
*/
|
|
40
|
-
declare function createComponentExample<TComponent extends ComponentType<any>, T extends Record<string, ExampleFn<TComponent>>>(Component: TComponent, examplesFn: (fixtures: VariantFixtures<TComponent>) => ExamplesResult<TComponent>): ComponentExample<T>;
|
|
39
|
+
declare function createComponentExample<TComponent extends ComponentType<any>, T extends Record<string, ExampleFn<TComponent>>>(Component: TComponent, examplesFn: (fixtures: VariantFixtures<TComponent>) => ExamplesResult<TComponent>): ComponentExample<T>;
|
|
41
40
|
//#endregion
|
|
42
41
|
export { ComponentExample, createComponentExample };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region ../core/dist/createProvider.d.ts
|
|
2
|
-
//#region src/createProvider.d.ts
|
|
3
2
|
type ProviderRenderFn<TContext, TProps = Record<never, never>> = (props: {
|
|
4
3
|
children: React.ReactNode;
|
|
5
4
|
} & TProps) => {
|
|
@@ -8,6 +7,6 @@ type ProviderRenderFn<TContext, TProps = Record<never, never>> = (props: {
|
|
|
8
7
|
};
|
|
9
8
|
declare function createProvider<TContext, TProps = Record<never, never>>(name: string, renderFn: ProviderRenderFn<TContext, TProps>): [React.FC<{
|
|
10
9
|
children: React.ReactNode;
|
|
11
|
-
} & TProps>, () => TContext];
|
|
10
|
+
} & TProps>, () => TContext];
|
|
12
11
|
//#endregion
|
|
13
12
|
export { createProvider };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region ../core/dist/generated/stylePropsTwMap.d.ts
|
|
2
|
-
//#region src/generated/stylePropsTwMap.d.ts
|
|
3
2
|
declare const stylePropsTwMap: {
|
|
4
3
|
readonly "border-boolean": {
|
|
5
4
|
readonly border: "boolean";
|
|
@@ -1696,6 +1695,6 @@ declare const stylePropsTwMap: {
|
|
|
1696
1695
|
readonly "hyphens-manual": {
|
|
1697
1696
|
readonly hyphens: "manual";
|
|
1698
1697
|
};
|
|
1699
|
-
};
|
|
1698
|
+
};
|
|
1700
1699
|
//#endregion
|
|
1701
1700
|
export { stylePropsTwMap };
|
|
@@ -1,7 +1,6 @@
|
|
|
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
|
|
5
4
|
type ResolveSlots<Name extends string> = Name extends keyof ComponentRegistry ? ComponentSlotsOf<Name> : string;
|
|
6
5
|
type ResolveVariants<Name extends string> = Name extends keyof ComponentRegistry ? ComponentVariantsOf<Name> : Record<string, string>;
|
|
7
6
|
interface UdsRuntimeMeta {
|
|
@@ -45,6 +44,6 @@ interface ComponentStyler<Name extends string> {
|
|
|
45
44
|
* @param slots - Array of slot names
|
|
46
45
|
* @param element - Optional HTML element tag for element-specific prop forwarding
|
|
47
46
|
*/
|
|
48
|
-
declare function createComponentStyler<Name extends string>(componentName: Name, slots: readonly string[], element?: string, variants?: readonly string[]): ComponentStyler<Name>;
|
|
47
|
+
declare function createComponentStyler<Name extends string>(componentName: Name, slots: readonly string[], element?: string, variants?: readonly string[]): ComponentStyler<Name>;
|
|
49
48
|
//#endregion
|
|
50
49
|
export { createComponentStyler };
|
|
@@ -2,7 +2,6 @@ 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
|
|
6
5
|
/** Convert kebab-case CSS property to camelCase for React inline styles.
|
|
7
6
|
* CSS custom properties (--*) are kept as-is since React supports them verbatim. */
|
|
8
7
|
declare function toCamelCase(str: string): string;
|
|
@@ -38,6 +37,6 @@ interface GetStylesParams extends StyleProps, ModifierProps {
|
|
|
38
37
|
* so they can be included in the CSS safelist.
|
|
39
38
|
*/
|
|
40
39
|
declare function getStyles(props: GetStylesParams): string;
|
|
41
|
-
declare function getVariantClassName(componentName: string, variant: string | undefined): string;
|
|
40
|
+
declare function getVariantClassName(componentName: string, variant: string | undefined): string;
|
|
42
41
|
//#endregion
|
|
43
42
|
export { createVariants, cx, getStyles, getVariantClassName, processStyleProps, toCamelCase };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MacroConfig } from "@uds/types";
|
|
2
2
|
|
|
3
3
|
//#region ../core/dist/macros.d.ts
|
|
4
|
-
//#region src/macros.d.ts
|
|
5
4
|
/** Set the macro config (called by loader at build time) */
|
|
6
5
|
declare function setMacroConfig(config: MacroConfig): void;
|
|
7
6
|
/** Get the current macro config */
|
|
@@ -17,6 +16,6 @@ declare function getMacroConfig(): MacroConfig;
|
|
|
17
16
|
declare function expandMacros(props: Record<string, unknown>, config?: MacroConfig): {
|
|
18
17
|
expanded: Record<string, unknown>;
|
|
19
18
|
markerClasses: string[];
|
|
20
|
-
};
|
|
19
|
+
};
|
|
21
20
|
//#endregion
|
|
22
21
|
export { expandMacros, getMacroConfig, setMacroConfig };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ConfigurableProp, ModifierProp, StyleProp } from "@uds/types";
|
|
2
2
|
|
|
3
3
|
//#region ../core/dist/propMappings.d.ts
|
|
4
|
-
//#region src/propMappings.d.ts
|
|
5
4
|
interface PropMapping {
|
|
6
5
|
/** Class name prefix for runtime class generation. 'no-prefix' means value IS the class. */
|
|
7
6
|
classPrefix: string;
|
|
@@ -72,6 +71,6 @@ interface ModifierEntry {
|
|
|
72
71
|
*
|
|
73
72
|
* e.g. `bg="primary"` + `bgOpacity="75"` → class `bg-primary_75`
|
|
74
73
|
*/
|
|
75
|
-
declare const colorPropToOpacityProp: Record<string, string>;
|
|
74
|
+
declare const colorPropToOpacityProp: Record<string, string>;
|
|
76
75
|
//#endregion
|
|
77
76
|
export { ConfigurablePropertyEntry, CssVariablePrefixEntry, ModifierEntry, PropMapping, colorPropToOpacityProp, getConfigurablePropMapping, getConfigurableProperties, getCssVariablePrefixes, modifierMappings, propMappings };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
//#region ../core/dist/resolveMotionState.d.ts
|
|
2
|
-
|
|
3
|
-
declare function resolveMotionState(stateKeyframe: Record<string, unknown>, index: number): Record<string, number>; //#endregion
|
|
2
|
+
declare function resolveMotionState(stateKeyframe: Record<string, unknown>, index: number): Record<string, number>;
|
|
4
3
|
//#endregion
|
|
5
4
|
export { resolveMotionState };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MotionPreset } from "@uds/types";
|
|
2
2
|
|
|
3
3
|
//#region ../core/dist/transformPreset.d.ts
|
|
4
|
-
//#region src/transformPreset.d.ts
|
|
5
4
|
interface TransformedMotionProps {
|
|
6
5
|
initial?: Record<string, unknown>;
|
|
7
6
|
animate?: Record<string, unknown>;
|
|
@@ -13,6 +12,6 @@ interface TransformedMotionProps {
|
|
|
13
12
|
/**
|
|
14
13
|
* Convert a JS-runtime MotionPreset to a motion/react-compatible props object.
|
|
15
14
|
*/
|
|
16
|
-
declare function transformPreset(preset: MotionPreset): TransformedMotionProps;
|
|
15
|
+
declare function transformPreset(preset: MotionPreset): TransformedMotionProps;
|
|
17
16
|
//#endregion
|
|
18
17
|
export { TransformedMotionProps, transformPreset };
|
|
@@ -1,7 +1,6 @@
|
|
|
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
|
|
5
4
|
interface StackDefaultsInput extends StyleAndModifierProps {
|
|
6
5
|
gap?: StyleAndModifierProps['gap'];
|
|
7
6
|
}
|
|
@@ -39,6 +38,6 @@ declare const withDefaultStyleProps: {
|
|
|
39
38
|
shape?: BorderRadius;
|
|
40
39
|
}) => StyleAndModifierProps;
|
|
41
40
|
Svg: (props: SvgDefaultsInput) => StyleAndModifierProps;
|
|
42
|
-
};
|
|
41
|
+
};
|
|
43
42
|
//#endregion
|
|
44
43
|
export { withDefaultStyleProps };
|