@flipova/foundation 1.12.1 → 1.14.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 +9 -4
- 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-MLFQD3PV.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-ETR75HWU.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-KOKOIY5E.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 +602 -0
- 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 +161 -0
- 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/createTheme-DQeX3s0I.d.mts +78 -0
- package/dist/createTheme-Y4jfz4-u.d.ts +78 -0
- 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 +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +258 -254
- 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 +4 -88
- package/dist/theme/index.d.ts +4 -88
- 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 +241 -83
- package/dist/ui/index.d.ts +241 -83
- package/dist/ui/index.js +182 -182
- package/dist/ui/index.mjs +2 -2
- package/dist/web/index.d.mts +316 -0
- package/dist/web/index.d.ts +316 -0
- package/dist/web/index.js +1331 -31004
- package/dist/web/index.js.map +1 -1
- package/dist/web/index.mjs +1245 -30791
- package/dist/web/index.mjs.map +1 -1
- package/package.json +41 -21
- package/dist/chunk-4KNPSB67.js.map +0 -1
- package/dist/chunk-4NPMHFKO.mjs.map +0 -1
- package/dist/chunk-DJP3T7OD.mjs.map +0 -1
- package/dist/chunk-ETR75HWU.mjs.map +0 -1
- package/dist/chunk-KGMGD6GU.js +0 -7024
- package/dist/chunk-KGMGD6GU.js.map +0 -1
- package/dist/chunk-KOKOIY5E.js.map +0 -1
- package/dist/chunk-MLFQD3PV.mjs.map +0 -1
- package/dist/chunk-O7UP2OZR.js.map +0 -1
- package/dist/chunk-RMLLGNWR.js +0 -428
- package/dist/chunk-RMLLGNWR.js.map +0 -1
- package/dist/chunk-XTYE5PNQ.mjs +0 -6900
- package/dist/chunk-XTYE5PNQ.mjs.map +0 -1
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,84 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export { T as ThemeProvider, c as createTheme, u as useTheme } from '../createTheme-Y4jfz4-u.js';
|
|
2
|
+
export { C as ColorScheme, a as CustomThemeMode, T as ThemeGradients, b as ThemeMode, c as ThemeName, d as ThemeRegistry, t as themes } from '../index-CuaJA3gM.js';
|
|
3
|
+
import 'react';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Defines the shape of the theme context value.
|
|
7
|
-
* Provides access to the current theme, mode, theme setter, and available themes.
|
|
8
|
-
*/
|
|
9
|
-
interface ThemeContextType {
|
|
10
|
-
/** The current active color scheme object */
|
|
11
|
-
theme: ColorScheme;
|
|
12
|
-
/** The current theme mode (built-in or custom) */
|
|
13
|
-
mode: ThemeMode | CustomThemeMode;
|
|
14
|
-
/** Function to change the current theme */
|
|
15
|
-
setTheme: (theme: ThemeMode | CustomThemeMode) => void;
|
|
16
|
-
/** Registry of all available themes */
|
|
17
|
-
availableThemes: ThemeRegistry;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Hook pour accéder au contexte du thème.
|
|
21
|
-
*
|
|
22
|
-
* @param customTheme - (Optionnel) Mode de thème personnalisé à utiliser au lieu du thème du contexte actuel.
|
|
23
|
-
* @returns La valeur du contexte du thème avec le thème actuel, le mode, la fonction pour le modifier et les thèmes disponibles.
|
|
24
|
-
* @throws Erreur s'il est utilisé en dehors d'un ThemeProvider.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```tsx
|
|
28
|
-
* // Utilisation de base
|
|
29
|
-
* const { theme, mode, setTheme } = useTheme();
|
|
30
|
-
*
|
|
31
|
-
* // Avec un thème personnalisé
|
|
32
|
-
* const { theme } = useTheme('neon');
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
declare const useTheme: (customTheme?: ThemeMode | CustomThemeMode) => ThemeContextType;
|
|
36
|
-
/**
|
|
37
|
-
* Propriétés (props) pour le composant ThemeProvider.
|
|
38
|
-
*/
|
|
39
|
-
interface ThemeProviderProps {
|
|
40
|
-
/** Composants enfants qui auront accès au contexte du thème */
|
|
41
|
-
children: React.ReactNode;
|
|
42
|
-
/** Thème par défaut à utiliser lorsqu'aucun thème n'est stocké dans l'état */
|
|
43
|
-
defaultTheme?: ThemeMode | CustomThemeMode;
|
|
44
|
-
/** Thèmes personnalisés supplémentaires à fusionner avec les thèmes intégrés */
|
|
45
|
-
customThemes?: Partial<ThemeRegistry>;
|
|
46
|
-
}
|
|
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
|
-
* Provides the theme context to child components.
|
|
53
|
-
*
|
|
54
|
-
* Manages the current theme state and provides access to theme changing functionality.
|
|
55
|
-
* Supports built-in themes (light, dark, neon) and custom themes.
|
|
56
|
-
*
|
|
57
|
-
* @param props - The theme provider properties.
|
|
58
|
-
* @returns A context provider component.
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```tsx
|
|
62
|
-
* // Basic usage
|
|
63
|
-
* <ThemeProvider>
|
|
64
|
-
* <App />
|
|
65
|
-
* </ThemeProvider>
|
|
66
|
-
*
|
|
67
|
-
* // With default theme and custom themes
|
|
68
|
-
* <ThemeProvider defaultTheme="dark" customThemes={{ myTheme: customThemeConfig }}>
|
|
69
|
-
* <App />
|
|
70
|
-
* </ThemeProvider>
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
|
-
declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
74
|
-
|
|
75
|
-
/**
|
|
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
6
|
* Hook to manage the theme color scheme in the application.
|
|
83
7
|
*
|
|
84
8
|
* This hook provides a unified way to manage theme selection:
|
|
@@ -108,12 +32,4 @@ declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
|
108
32
|
*/
|
|
109
33
|
declare function useColorScheme(theme?: 'light' | 'dark'): 'light' | 'dark';
|
|
110
34
|
|
|
111
|
-
|
|
112
|
-
* Crée un schéma de couleurs de thème en fusionnant les valeurs par défaut avec les surcharges (overrides).
|
|
113
|
-
*
|
|
114
|
-
* @param overrides - (Optionnel) Objet contenant les valeurs de couleurs à surcharger.
|
|
115
|
-
* @returns Le schéma de couleurs complet du thème généré.
|
|
116
|
-
*/
|
|
117
|
-
declare const createTheme: (overrides?: Partial<ColorScheme>) => ColorScheme;
|
|
118
|
-
|
|
119
|
-
export { ColorScheme, CustomThemeMode, ThemeMode, ThemeProvider, ThemeRegistry, createTheme, useColorScheme, useTheme };
|
|
35
|
+
export { useColorScheme };
|
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];
|