@flipova/foundation 1.12.0 → 1.13.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/CHANGELOG.md +6 -0
- package/LICENSE +21 -21
- package/README.md +215 -197
- package/dist/chunk-2XORADW6.js +24552 -0
- package/dist/chunk-2XORADW6.js.map +1 -0
- package/dist/chunk-52BHHF5M.js +46 -0
- package/dist/chunk-52BHHF5M.js.map +1 -0
- package/dist/{chunk-NYZH4C27.mjs → chunk-5647JY7Z.mjs} +4 -4
- package/dist/chunk-5647JY7Z.mjs.map +1 -0
- package/dist/{chunk-O7UP2OZR.js → chunk-7QFZMGL6.js} +1971 -93
- package/dist/chunk-7QFZMGL6.js.map +1 -0
- package/dist/{chunk-4KNPSB67.js → chunk-ASZEP37D.js} +2 -2
- package/dist/chunk-ASZEP37D.js.map +1 -0
- package/dist/chunk-BH5SU2JQ.mjs +8282 -0
- package/dist/chunk-BH5SU2JQ.mjs.map +1 -0
- package/dist/{chunk-TZUCBWHN.mjs → chunk-BO65GO53.mjs} +3 -3
- package/dist/chunk-BO65GO53.mjs.map +1 -0
- package/dist/{chunk-DJP3T7OD.mjs → chunk-BSVXX52E.mjs} +2 -2
- package/dist/chunk-BSVXX52E.mjs.map +1 -0
- package/dist/chunk-EDTAMUO2.js +8310 -0
- package/dist/chunk-EDTAMUO2.js.map +1 -0
- package/dist/chunk-M3YLASM2.js +428 -0
- package/dist/chunk-M3YLASM2.js.map +1 -0
- package/dist/{chunk-4NPMHFKO.mjs → chunk-RQXQK3ZO.mjs} +1971 -94
- package/dist/chunk-RQXQK3ZO.mjs.map +1 -0
- package/dist/chunk-SR25V4EA.mjs +40 -0
- package/dist/chunk-SR25V4EA.mjs.map +1 -0
- package/dist/{chunk-JYGNIQUU.js → chunk-UB34WFEQ.js} +18 -18
- package/dist/chunk-UB34WFEQ.js.map +1 -0
- package/dist/chunk-ZBRWXKDF.mjs +24431 -0
- package/dist/chunk-ZBRWXKDF.mjs.map +1 -0
- package/dist/cli/ds.d.mts +1 -0
- package/dist/cli/ds.d.ts +1 -0
- package/dist/cli/ds.js +182 -7914
- package/dist/cli/ds.js.map +1 -0
- package/dist/cli/ds.mjs +579 -0
- package/dist/cli/ds.mjs.map +1 -0
- package/dist/cli/flipova.d.mts +1 -0
- package/dist/cli/flipova.d.ts +1 -0
- package/dist/cli/flipova.js +24 -4884
- package/dist/cli/flipova.js.map +1 -0
- package/dist/cli/flipova.mjs +154 -0
- package/dist/cli/flipova.mjs.map +1 -0
- package/dist/config/index.d.mts +12 -12
- package/dist/config/index.d.ts +12 -12
- package/dist/config/index.js +6 -6
- package/dist/config/index.mjs +1 -1
- package/dist/{index-CpBqkIpd.d.mts → index-CuaJA3gM.d.mts} +10 -10
- package/dist/{index-CpBqkIpd.d.ts → index-CuaJA3gM.d.ts} +10 -10
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +216 -212
- package/dist/index.mjs +5 -5
- package/dist/registry/index.d.mts +470 -3
- package/dist/registry/index.d.ts +470 -3
- package/dist/registry/index.js +100 -96
- package/dist/registry/index.mjs +1 -1
- package/dist/theme/index.d.mts +15 -25
- package/dist/theme/index.d.ts +15 -25
- package/dist/theme/index.js +6 -6
- package/dist/theme/index.mjs +1 -1
- package/dist/tokens/index.js +10 -10
- package/dist/tokens/index.mjs +1 -1
- package/dist/types/index.d.mts +23 -21
- package/dist/types/index.d.ts +23 -21
- package/dist/ui/index.d.mts +242 -84
- package/dist/ui/index.d.ts +242 -84
- package/dist/ui/index.js +182 -182
- package/dist/ui/index.mjs +2 -2
- package/package.json +29 -11
- package/dist/chunk-4KNPSB67.js.map +0 -1
- package/dist/chunk-4NPMHFKO.mjs.map +0 -1
- package/dist/chunk-5LRV4YZO.js +0 -7024
- package/dist/chunk-5LRV4YZO.js.map +0 -1
- package/dist/chunk-CKQBSIBR.mjs +0 -6900
- package/dist/chunk-CKQBSIBR.mjs.map +0 -1
- package/dist/chunk-DJP3T7OD.mjs.map +0 -1
- package/dist/chunk-JYGNIQUU.js.map +0 -1
- package/dist/chunk-NYZH4C27.mjs.map +0 -1
- package/dist/chunk-O7UP2OZR.js.map +0 -1
- package/dist/chunk-RPO7RKXJ.js +0 -428
- package/dist/chunk-RPO7RKXJ.js.map +0 -1
- package/dist/chunk-TZUCBWHN.mjs.map +0 -1
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { b as ThemeMode, a as CustomThemeMode, d as ThemeRegistry, C as ColorScheme } from '../index-
|
|
3
|
-
export { T as ThemeGradients, c as ThemeName, t as themes } from '../index-
|
|
2
|
+
import { b as ThemeMode, a as CustomThemeMode, d as ThemeRegistry, C as ColorScheme } from '../index-CuaJA3gM.js';
|
|
3
|
+
export { T as ThemeGradients, c as ThemeName, t as themes } from '../index-CuaJA3gM.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Defines the shape of the theme context value.
|
|
@@ -17,38 +17,34 @@ interface ThemeContextType {
|
|
|
17
17
|
availableThemes: ThemeRegistry;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Hook
|
|
20
|
+
* Hook to access the theme context.
|
|
21
21
|
*
|
|
22
|
-
* @param customTheme - (
|
|
23
|
-
* @returns
|
|
24
|
-
* @throws
|
|
22
|
+
* @param customTheme - (Optional) Custom theme mode to use instead of current context theme.
|
|
23
|
+
* @returns Theme context object with current theme, mode, theme setter, and available themes.
|
|
24
|
+
* @throws Error if used outside a ThemeProvider.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
27
|
* ```tsx
|
|
28
|
-
* //
|
|
28
|
+
* // Basic usage
|
|
29
29
|
* const { theme, mode, setTheme } = useTheme();
|
|
30
30
|
*
|
|
31
|
-
* //
|
|
31
|
+
* // With a specific custom theme
|
|
32
32
|
* const { theme } = useTheme('neon');
|
|
33
33
|
* ```
|
|
34
34
|
*/
|
|
35
35
|
declare const useTheme: (customTheme?: ThemeMode | CustomThemeMode) => ThemeContextType;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Props for the ThemeProvider component.
|
|
38
38
|
*/
|
|
39
39
|
interface ThemeProviderProps {
|
|
40
|
-
/**
|
|
40
|
+
/** Child components that will have access to theme context */
|
|
41
41
|
children: React.ReactNode;
|
|
42
|
-
/**
|
|
42
|
+
/** Default theme to use when no theme is stored in state */
|
|
43
43
|
defaultTheme?: ThemeMode | CustomThemeMode;
|
|
44
|
-
/**
|
|
44
|
+
/** Additional custom themes to merge with built-in themes */
|
|
45
45
|
customThemes?: Partial<ThemeRegistry>;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
* Fournit le contexte du thème aux composants enfants.
|
|
49
|
-
*
|
|
50
|
-
* Gère l'état du thème actuel et permet d'accéder à la fonctionnalité de changement de thème.
|
|
51
|
-
* Prend en charge les thèmes intégrés (clair, sombre, néon) et les thèmes personnalisés.
|
|
52
48
|
* Provides the theme context to child components.
|
|
53
49
|
*
|
|
54
50
|
* Manages the current theme state and provides access to theme changing functionality.
|
|
@@ -73,12 +69,6 @@ interface ThemeProviderProps {
|
|
|
73
69
|
declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
74
70
|
|
|
75
71
|
/**
|
|
76
|
-
* Hook pour gérer le schéma de couleurs du thème dans l'application.
|
|
77
|
-
*
|
|
78
|
-
* Ce hook fournit une manière unifiée de gérer la sélection du thème :
|
|
79
|
-
* - Utilisation du mode de thème fourni explicitement s'il est spécifié.
|
|
80
|
-
* - Utilisation du schéma de couleurs natif de l'appareil (clair/sombre) par défaut.
|
|
81
|
-
* - Utilisation du thème clair par défaut si le schéma natif n'est pas disponible.
|
|
82
72
|
* Hook to manage the theme color scheme in the application.
|
|
83
73
|
*
|
|
84
74
|
* This hook provides a unified way to manage theme selection:
|
|
@@ -109,10 +99,10 @@ declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
|
109
99
|
declare function useColorScheme(theme?: 'light' | 'dark'): 'light' | 'dark';
|
|
110
100
|
|
|
111
101
|
/**
|
|
112
|
-
*
|
|
102
|
+
* Creates a theme color scheme by merging default colors with optional overrides.
|
|
113
103
|
*
|
|
114
|
-
* @param overrides - (
|
|
115
|
-
* @returns
|
|
104
|
+
* @param overrides - (Optional) Object containing color values to override.
|
|
105
|
+
* @returns The complete generated theme color scheme.
|
|
116
106
|
*/
|
|
117
107
|
declare const createTheme: (overrides?: Partial<ColorScheme>) => ColorScheme;
|
|
118
108
|
|
package/dist/theme/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkM3YLASM2_js = require('../chunk-M3YLASM2.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "ThemeProvider", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkM3YLASM2_js.ThemeProvider; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "createTheme", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkM3YLASM2_js.createTheme; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "themes", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkM3YLASM2_js.themes; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "useColorScheme", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkM3YLASM2_js.useColorScheme; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "useTheme", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkM3YLASM2_js.useTheme; }
|
|
26
26
|
});
|
|
27
27
|
//# sourceMappingURL=index.js.map
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
package/dist/theme/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ThemeProvider, createTheme, themes, useColorScheme, useTheme } from '../chunk-
|
|
1
|
+
export { ThemeProvider, createTheme, themes, useColorScheme, useTheme } from '../chunk-BO65GO53.mjs';
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
package/dist/tokens/index.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkASZEP37D_js = require('../chunk-ASZEP37D.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "breakpoints", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkASZEP37D_js.breakpoints; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "colors", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkASZEP37D_js.colors; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "motion", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkASZEP37D_js.motion; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "opacity", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkASZEP37D_js.opacity; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "radii", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkASZEP37D_js.radii; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "shadows", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkASZEP37D_js.shadows; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "spacing", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkASZEP37D_js.spacing; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "typography", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkASZEP37D_js.typography; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "zIndex", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkASZEP37D_js.zIndex; }
|
|
42
42
|
});
|
|
43
43
|
//# sourceMappingURL=index.js.map
|
|
44
44
|
//# sourceMappingURL=index.js.map
|
package/dist/tokens/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { breakpoints, colors, motion, opacity, radii, shadows, spacing, typography, zIndex } from '../chunk-
|
|
1
|
+
export { breakpoints, colors, motion, opacity, radii, shadows, spacing, typography, zIndex } from '../chunk-BSVXX52E.mjs';
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as ColorScheme } from '../index-
|
|
1
|
+
import { C as ColorScheme } from '../index-CuaJA3gM.mjs';
|
|
2
2
|
import { SpacingToken } from '../tokens/index.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Defines padding spacing around a layout element.
|
|
6
6
|
*/
|
|
7
7
|
interface LayoutPadding {
|
|
8
8
|
top?: SpacingToken;
|
|
@@ -13,17 +13,17 @@ interface LayoutPadding {
|
|
|
13
13
|
vertical?: SpacingToken;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Background property type for layouts (solid color hex or gradient array).
|
|
17
17
|
*/
|
|
18
18
|
type LayoutBackground = string | [string, string, ...string[]];
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Color roles extracted from the active theme ColorScheme.
|
|
21
21
|
*/
|
|
22
22
|
type ThemeColorRole = Exclude<{
|
|
23
23
|
[K in keyof ColorScheme]: ColorScheme[K] extends string ? K : never;
|
|
24
24
|
}[keyof ColorScheme], undefined>;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Descriptor for a layout or component slot that accepts child elements.
|
|
27
27
|
*/
|
|
28
28
|
interface SlotDescriptor {
|
|
29
29
|
readonly name: string;
|
|
@@ -33,11 +33,11 @@ interface SlotDescriptor {
|
|
|
33
33
|
readonly array?: boolean;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Property types supported by the design system metadata.
|
|
37
37
|
*/
|
|
38
38
|
type PropType = "string" | "number" | "integer" | "url" | "icon" | "boolean" | "spacing" | "radius" | "shadow" | "color" | "background" | "padding" | "enum" | "ratio" | "json";
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Property descriptor for a component, layout, or block.
|
|
41
41
|
*/
|
|
42
42
|
interface PropDescriptor<T = unknown> {
|
|
43
43
|
readonly name: string;
|
|
@@ -55,19 +55,19 @@ interface PropDescriptor<T = unknown> {
|
|
|
55
55
|
readonly group?: "style" | "layout" | "behavior" | "content";
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
58
|
+
* Layout categories.
|
|
59
59
|
*/
|
|
60
60
|
type LayoutCategory = "page" | "content" | "navigation" | "card" | "scroll" | "special";
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Component categories.
|
|
63
63
|
*/
|
|
64
64
|
type ComponentCategory = "input" | "action" | "display" | "feedback" | "overlay" | "media" | "navigation";
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* Block categories.
|
|
67
67
|
*/
|
|
68
68
|
type BlockCategory = "auth" | "profile" | "navigation" | "content" | "data" | "feedback" | "form" | "overlay" | "social" | "ecommerce" | "finance" | "onboarding" | "messaging" | "calendar" | "files" | "location" | "media";
|
|
69
69
|
/**
|
|
70
|
-
* Configuration
|
|
70
|
+
* Configuration for spring animations.
|
|
71
71
|
*/
|
|
72
72
|
interface SpringConfig {
|
|
73
73
|
readonly damping: number;
|
|
@@ -76,7 +76,7 @@ interface SpringConfig {
|
|
|
76
76
|
readonly overshootClamping?: boolean;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* Constants specific to a layout animation or gesture threshold.
|
|
80
80
|
*/
|
|
81
81
|
interface LayoutConstants {
|
|
82
82
|
readonly springConfig?: SpringConfig;
|
|
@@ -94,7 +94,7 @@ interface LayoutConstants {
|
|
|
94
94
|
readonly exitRight?: number;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* Standardized size configuration for components.
|
|
98
98
|
*/
|
|
99
99
|
interface ComponentSizeConfig {
|
|
100
100
|
readonly height?: number;
|
|
@@ -107,7 +107,7 @@ interface ComponentSizeConfig {
|
|
|
107
107
|
readonly [key: string]: unknown;
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* Standardized color configuration for components.
|
|
111
111
|
*/
|
|
112
112
|
interface ComponentColorConfig {
|
|
113
113
|
readonly bg?: ThemeColorRole | "transparent" | string;
|
|
@@ -119,7 +119,7 @@ interface ComponentColorConfig {
|
|
|
119
119
|
readonly [key: string]: unknown;
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
122
|
+
* Descriptor for a component variant with override properties.
|
|
123
123
|
*/
|
|
124
124
|
interface VariantDescriptor<Props = Record<string, unknown>> {
|
|
125
125
|
readonly name: string;
|
|
@@ -136,9 +136,11 @@ interface BaseMeta {
|
|
|
136
136
|
readonly tags: readonly string[];
|
|
137
137
|
readonly customConfig?: Record<string, any>;
|
|
138
138
|
readonly enumMap?: Record<string, readonly string[]>;
|
|
139
|
+
readonly example?: string;
|
|
140
|
+
readonly examples?: readonly string[];
|
|
139
141
|
}
|
|
140
142
|
/**
|
|
141
|
-
*
|
|
143
|
+
* Layout-specific metadata interface.
|
|
142
144
|
*/
|
|
143
145
|
interface LayoutMeta extends BaseMeta {
|
|
144
146
|
readonly category: LayoutCategory;
|
|
@@ -155,7 +157,7 @@ interface LayoutMeta extends BaseMeta {
|
|
|
155
157
|
readonly dependencies?: readonly string[];
|
|
156
158
|
}
|
|
157
159
|
/**
|
|
158
|
-
*
|
|
160
|
+
* Component-specific metadata interface.
|
|
159
161
|
*/
|
|
160
162
|
interface ComponentMeta<Props = any> extends BaseMeta {
|
|
161
163
|
readonly category: ComponentCategory;
|
|
@@ -172,7 +174,7 @@ interface ComponentMeta<Props = any> extends BaseMeta {
|
|
|
172
174
|
};
|
|
173
175
|
}
|
|
174
176
|
/**
|
|
175
|
-
*
|
|
177
|
+
* Block-specific metadata interface.
|
|
176
178
|
*/
|
|
177
179
|
interface BlockMeta extends BaseMeta {
|
|
178
180
|
readonly category: BlockCategory;
|
|
@@ -180,18 +182,18 @@ interface BlockMeta extends BaseMeta {
|
|
|
180
182
|
readonly components: readonly string[];
|
|
181
183
|
}
|
|
182
184
|
/**
|
|
183
|
-
*
|
|
185
|
+
* Primitive-specific metadata interface.
|
|
184
186
|
*/
|
|
185
187
|
interface PrimitiveMeta extends BaseMeta {
|
|
186
188
|
readonly category: string;
|
|
187
189
|
readonly slots?: readonly SlotDescriptor[];
|
|
188
190
|
}
|
|
189
191
|
/**
|
|
190
|
-
*
|
|
192
|
+
* Union type representing any metadata item (layout, component, block, or primitive).
|
|
191
193
|
*/
|
|
192
194
|
type AnyMeta = LayoutMeta | ComponentMeta | BlockMeta | PrimitiveMeta;
|
|
193
195
|
/**
|
|
194
|
-
*
|
|
196
|
+
* Utility type to make all properties optional for default objects.
|
|
195
197
|
*/
|
|
196
198
|
type DefaultsOf<T extends Record<string, unknown>> = {
|
|
197
199
|
[K in keyof T]?: T[K];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as ColorScheme } from '../index-
|
|
1
|
+
import { C as ColorScheme } from '../index-CuaJA3gM.js';
|
|
2
2
|
import { SpacingToken } from '../tokens/index.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Defines padding spacing around a layout element.
|
|
6
6
|
*/
|
|
7
7
|
interface LayoutPadding {
|
|
8
8
|
top?: SpacingToken;
|
|
@@ -13,17 +13,17 @@ interface LayoutPadding {
|
|
|
13
13
|
vertical?: SpacingToken;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Background property type for layouts (solid color hex or gradient array).
|
|
17
17
|
*/
|
|
18
18
|
type LayoutBackground = string | [string, string, ...string[]];
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Color roles extracted from the active theme ColorScheme.
|
|
21
21
|
*/
|
|
22
22
|
type ThemeColorRole = Exclude<{
|
|
23
23
|
[K in keyof ColorScheme]: ColorScheme[K] extends string ? K : never;
|
|
24
24
|
}[keyof ColorScheme], undefined>;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Descriptor for a layout or component slot that accepts child elements.
|
|
27
27
|
*/
|
|
28
28
|
interface SlotDescriptor {
|
|
29
29
|
readonly name: string;
|
|
@@ -33,11 +33,11 @@ interface SlotDescriptor {
|
|
|
33
33
|
readonly array?: boolean;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Property types supported by the design system metadata.
|
|
37
37
|
*/
|
|
38
38
|
type PropType = "string" | "number" | "integer" | "url" | "icon" | "boolean" | "spacing" | "radius" | "shadow" | "color" | "background" | "padding" | "enum" | "ratio" | "json";
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Property descriptor for a component, layout, or block.
|
|
41
41
|
*/
|
|
42
42
|
interface PropDescriptor<T = unknown> {
|
|
43
43
|
readonly name: string;
|
|
@@ -55,19 +55,19 @@ interface PropDescriptor<T = unknown> {
|
|
|
55
55
|
readonly group?: "style" | "layout" | "behavior" | "content";
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
58
|
+
* Layout categories.
|
|
59
59
|
*/
|
|
60
60
|
type LayoutCategory = "page" | "content" | "navigation" | "card" | "scroll" | "special";
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Component categories.
|
|
63
63
|
*/
|
|
64
64
|
type ComponentCategory = "input" | "action" | "display" | "feedback" | "overlay" | "media" | "navigation";
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* Block categories.
|
|
67
67
|
*/
|
|
68
68
|
type BlockCategory = "auth" | "profile" | "navigation" | "content" | "data" | "feedback" | "form" | "overlay" | "social" | "ecommerce" | "finance" | "onboarding" | "messaging" | "calendar" | "files" | "location" | "media";
|
|
69
69
|
/**
|
|
70
|
-
* Configuration
|
|
70
|
+
* Configuration for spring animations.
|
|
71
71
|
*/
|
|
72
72
|
interface SpringConfig {
|
|
73
73
|
readonly damping: number;
|
|
@@ -76,7 +76,7 @@ interface SpringConfig {
|
|
|
76
76
|
readonly overshootClamping?: boolean;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* Constants specific to a layout animation or gesture threshold.
|
|
80
80
|
*/
|
|
81
81
|
interface LayoutConstants {
|
|
82
82
|
readonly springConfig?: SpringConfig;
|
|
@@ -94,7 +94,7 @@ interface LayoutConstants {
|
|
|
94
94
|
readonly exitRight?: number;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* Standardized size configuration for components.
|
|
98
98
|
*/
|
|
99
99
|
interface ComponentSizeConfig {
|
|
100
100
|
readonly height?: number;
|
|
@@ -107,7 +107,7 @@ interface ComponentSizeConfig {
|
|
|
107
107
|
readonly [key: string]: unknown;
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* Standardized color configuration for components.
|
|
111
111
|
*/
|
|
112
112
|
interface ComponentColorConfig {
|
|
113
113
|
readonly bg?: ThemeColorRole | "transparent" | string;
|
|
@@ -119,7 +119,7 @@ interface ComponentColorConfig {
|
|
|
119
119
|
readonly [key: string]: unknown;
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
122
|
+
* Descriptor for a component variant with override properties.
|
|
123
123
|
*/
|
|
124
124
|
interface VariantDescriptor<Props = Record<string, unknown>> {
|
|
125
125
|
readonly name: string;
|
|
@@ -136,9 +136,11 @@ interface BaseMeta {
|
|
|
136
136
|
readonly tags: readonly string[];
|
|
137
137
|
readonly customConfig?: Record<string, any>;
|
|
138
138
|
readonly enumMap?: Record<string, readonly string[]>;
|
|
139
|
+
readonly example?: string;
|
|
140
|
+
readonly examples?: readonly string[];
|
|
139
141
|
}
|
|
140
142
|
/**
|
|
141
|
-
*
|
|
143
|
+
* Layout-specific metadata interface.
|
|
142
144
|
*/
|
|
143
145
|
interface LayoutMeta extends BaseMeta {
|
|
144
146
|
readonly category: LayoutCategory;
|
|
@@ -155,7 +157,7 @@ interface LayoutMeta extends BaseMeta {
|
|
|
155
157
|
readonly dependencies?: readonly string[];
|
|
156
158
|
}
|
|
157
159
|
/**
|
|
158
|
-
*
|
|
160
|
+
* Component-specific metadata interface.
|
|
159
161
|
*/
|
|
160
162
|
interface ComponentMeta<Props = any> extends BaseMeta {
|
|
161
163
|
readonly category: ComponentCategory;
|
|
@@ -172,7 +174,7 @@ interface ComponentMeta<Props = any> extends BaseMeta {
|
|
|
172
174
|
};
|
|
173
175
|
}
|
|
174
176
|
/**
|
|
175
|
-
*
|
|
177
|
+
* Block-specific metadata interface.
|
|
176
178
|
*/
|
|
177
179
|
interface BlockMeta extends BaseMeta {
|
|
178
180
|
readonly category: BlockCategory;
|
|
@@ -180,18 +182,18 @@ interface BlockMeta extends BaseMeta {
|
|
|
180
182
|
readonly components: readonly string[];
|
|
181
183
|
}
|
|
182
184
|
/**
|
|
183
|
-
*
|
|
185
|
+
* Primitive-specific metadata interface.
|
|
184
186
|
*/
|
|
185
187
|
interface PrimitiveMeta extends BaseMeta {
|
|
186
188
|
readonly category: string;
|
|
187
189
|
readonly slots?: readonly SlotDescriptor[];
|
|
188
190
|
}
|
|
189
191
|
/**
|
|
190
|
-
*
|
|
192
|
+
* Union type representing any metadata item (layout, component, block, or primitive).
|
|
191
193
|
*/
|
|
192
194
|
type AnyMeta = LayoutMeta | ComponentMeta | BlockMeta | PrimitiveMeta;
|
|
193
195
|
/**
|
|
194
|
-
*
|
|
196
|
+
* Utility type to make all properties optional for default objects.
|
|
195
197
|
*/
|
|
196
198
|
type DefaultsOf<T extends Record<string, unknown>> = {
|
|
197
199
|
[K in keyof T]?: T[K];
|