zuii 1.1.0 → 1.2.1

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.
Files changed (30) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/index.js +7 -0
  3. package/dist/_virtual/index2.js +4 -0
  4. package/dist/components/Button/react/index.d.ts +36 -3
  5. package/dist/components/Button/react/index.js +27 -12
  6. package/dist/components/Button/style/button.css +1 -1
  7. package/dist/components/Icon/react/index.d.ts +26 -0
  8. package/dist/components/Icon/react/index.js +13 -0
  9. package/dist/components/Icon/style/icon.css +1 -0
  10. package/dist/core/styles/_tokens.scss +106 -0
  11. package/dist/core/styles/main.css +1 -1
  12. package/dist/core/styles/tokens.css +156 -0
  13. package/dist/core/styles/tokens.d.ts +83 -0
  14. package/dist/core/styles/tokens.ts +89 -0
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.js +4 -2
  17. package/dist/node_modules/.pnpm/@restart_ui@1.9.4_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@restart/ui/esm/Button.js +78 -0
  18. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js +37 -0
  19. package/dist/node_modules/.pnpm/react-bootstrap@2.10.10_@types_react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-bootstrap/esm/Button.js +34 -0
  20. package/dist/node_modules/.pnpm/react-bootstrap@2.10.10_@types_react@19.2.10_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-bootstrap/esm/ThemeProvider.js +23 -0
  21. package/package.json +18 -5
  22. package/style-dictionary/README.md +95 -0
  23. package/style-dictionary/build.js +75 -0
  24. package/style-dictionary/config.js +32 -0
  25. package/style-dictionary/hooks/formats.js +86 -0
  26. package/style-dictionary/hooks/transforms.js +49 -0
  27. package/style-dictionary/platforms.js +50 -0
  28. package/style-dictionary/utils/color.js +20 -0
  29. package/dist/components/Button/js/Button.d.ts +0 -6
  30. package/dist/components/Button/js/Button.js +0 -7
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Auto-generated
3
+ */
4
+
5
+ :root {
6
+ --primary: #296782;
7
+ --primary-rgb: 41, 103, 130;
8
+ --primary-dark: #1D4A5D;
9
+ --primary-dark-rgb: 29, 74, 93;
10
+ --primary-light: #73B6D3;
11
+ --primary-light-rgb: 115, 182, 211;
12
+ --primary-text-emphasis: var(--primary-dark);
13
+ --primary-bg-subtle: var(--primary-light);
14
+ --primary-border-subtle: color-mix(in srgb, var(--primary), var(--white) 60%);
15
+ --secondary: #49B4E8;
16
+ --secondary-rgb: 73, 180, 232;
17
+ --secondary-dark: #116188;
18
+ --secondary-dark-rgb: 17, 97, 136;
19
+ --secondary-light: #D2ECF9;
20
+ --secondary-light-rgb: 210, 236, 249;
21
+ --secondary-text-emphasis: var(--secondary-dark);
22
+ --secondary-bg-subtle: var(--secondary-light);
23
+ --secondary-border-subtle: color-mix(in srgb, var(--secondary), var(--white) 20%);
24
+ --accent: #49B4E8;
25
+ --accent-rgb: 73, 180, 232;
26
+ --accent-dark: #116188;
27
+ --accent-dark-rgb: 17, 97, 136;
28
+ --accent-light: #D2ECF9;
29
+ --accent-light-rgb: 210, 236, 249;
30
+ --accent-text-emphasis: var(--accent-dark);
31
+ --accent-bg-subtle: var(--accent-light);
32
+ --accent-border-subtle: color-mix(in srgb, var(--accent), var(--white) 20%);
33
+ --tertiary: #f5524d;
34
+ --tertiary-rgb: 245, 82, 77;
35
+ --tertiary-dark: color-mix(in srgb, var(--tertiary), var(--black) 70%);
36
+ --tertiary-light: color-mix(in srgb, var(--tertiary), var(--white) 80%);
37
+ --tertiary-text-emphasis: var(--tertiary-dark);
38
+ --tertiary-bg-subtle: var(--tertiary-light);
39
+ --tertiary-border-subtle: color-mix(in srgb, var(--tertiary), var(--white) 60%);
40
+ --success: #73D3B6;
41
+ --success-rgb: 115, 211, 182;
42
+ --success-dark: color-mix(in srgb, var(--success), var(--black) 20%);
43
+ --success-light: color-mix(in srgb, var(--success), var(--white) 50%);
44
+ --success-text-emphasis: var(--success-dark);
45
+ --success-bg-subtle: var(--success-light);
46
+ --success-border-subtle: color-mix(in srgb, var(--success), var(--white) 60%);
47
+ --danger: #EA5F5F;
48
+ --danger-rgb: 234, 95, 95;
49
+ --danger-dark: #AF1818;
50
+ --danger-dark-rgb: 175, 24, 24;
51
+ --danger-light: #F8D0A6;
52
+ --danger-light-rgb: 248, 208, 166;
53
+ --danger-text-emphasis: var(--danger-dark);
54
+ --danger-bg-subtle: var(--danger-light);
55
+ --danger-border-subtle: color-mix(in srgb, var(--danger), var(--white) 60%);
56
+ --warning: #F5D762;
57
+ --warning-rgb: 245, 215, 98;
58
+ --warning-dark: color-mix(in srgb, var(--warning), var(--black) 20%);
59
+ --warning-light: color-mix(in srgb, var(--warning), var(--white) 50%);
60
+ --warning-text-emphasis: var(--warning-dark);
61
+ --warning-bg-subtle: var(--warning-light);
62
+ --warning-border-subtle: color-mix(in srgb, var(--warning), var(--white) 60%);
63
+ --info: #73B6D3;
64
+ --info-rgb: 115, 182, 211;
65
+ --info-dark: color-mix(in srgb, var(--info), var(--black) 20%);
66
+ --info-light: color-mix(in srgb, var(--info), var(--white) 50%);
67
+ --info-text-emphasis: var(--info-dark);
68
+ --info-bg-subtle: var(--info-light);
69
+ --info-border-subtle: color-mix(in srgb, var(--info), var(--white) 60%);
70
+ --light: #FFFFFF;
71
+ --light-rgb: 255, 255, 255;
72
+ --light-dark: color-mix(in srgb, var(--light), var(--black) 70%);
73
+ --light-light: color-mix(in srgb, var(--light), var(--white) 80%);
74
+ --light-text-emphasis: var(--light-dark);
75
+ --light-bg-subtle: var(--light-light);
76
+ --light-border-subtle: color-mix(in srgb, var(--light), var(--white) 60%);
77
+ --dark: #000000;
78
+ --dark-rgb: 0, 0, 0;
79
+ --dark-dark: color-mix(in srgb, var(--dark), var(--black) 70%);
80
+ --dark-light: color-mix(in srgb, var(--dark), var(--white) 80%);
81
+ --dark-text-emphasis: var(--dark-dark);
82
+ --dark-bg-subtle: var(--dark-light);
83
+ --dark-border-subtle: color-mix(in srgb, var(--dark), var(--white) 60%);
84
+ --white: #ffffff;
85
+ --white-rgb: 255, 255, 255;
86
+ --black: #000000;
87
+ --black-rgb: 0, 0, 0;
88
+ --gray-100: #f8f9fa;
89
+ --gray-200: #e9ecef;
90
+ --gray-300: #dee2e6;
91
+ --gray-400: #ced4da;
92
+ --gray-500: #adb5bd;
93
+ --gray-600: #6c757d;
94
+ --gray-700: #495057;
95
+ --gray-800: #343a40;
96
+ --gray-900: #212529;
97
+ --gray: #6c757d;
98
+ --gray-dark: #343a40;
99
+ --font-primary: Mulish, sans-serif;
100
+ --font-monospace: var(--font-primary);
101
+ --font-sans-serif: var(--font-primary);
102
+ --border-radius-base: var(--size-1);
103
+ --border-radius-sm: var(--size-2);
104
+ --border-radius-lg: var(--size-4);
105
+ --border-radius-xl: var(--size-8);
106
+ --border-radius-xxl: var(--size-16);
107
+ --border-radius-2xl: var(--size-32);
108
+ --border-radius-pill: 999rem;
109
+ --box-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
110
+ --box-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
111
+ --box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
112
+ --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
113
+ --box-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
114
+ --box-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
115
+ --box-shadow-outline: 0 0 0 3px var(--primary), 0 0 0 4px var(--primary);
116
+ --box-shadow-inset: inset 0 0 6px 0 rgba(0, 0, 0, 0.2);
117
+ --box-shadow-none: 0 0 0 0 rgba(0, 0, 0, 0);
118
+ --size-0: 0;
119
+ --size-1: 0.25rem;
120
+ --size-2: 0.5rem;
121
+ --size-3: 0.75rem;
122
+ --size-4: 1rem;
123
+ --size-5: 1.25rem;
124
+ --size-6: 1.5rem;
125
+ --size-7: 1.75rem;
126
+ --size-8: 2rem;
127
+ --size-9: 2.25rem;
128
+ --size-10: 2.5rem;
129
+ --size-12: 3rem;
130
+ --size-14: 3.5rem;
131
+ --size-16: 4rem;
132
+ --size-20: 5rem;
133
+ --size-24: 6rem;
134
+ --size-28: 7rem;
135
+ --size-32: 8rem;
136
+ --size-36: 9rem;
137
+ --size-40: 10rem;
138
+ --size-44: 11rem;
139
+ --size-48: 12rem;
140
+ --size-52: 13rem;
141
+ --size-56: 14rem;
142
+ --size-60: 15rem;
143
+ --size-64: 16rem;
144
+ --size-72: 18rem;
145
+ --size-80: 20rem;
146
+ --size-96: 24rem;
147
+ --spacing-none: var(--size-0);
148
+ --spacing-xs: var(--size-1);
149
+ --spacing-sm: var(--size-2);
150
+ --spacing-md: var(--size-4);
151
+ --spacing-lg: var(--size-8);
152
+ --spacing-xl: var(--size-16);
153
+ --spacing-2xl: var(--size-32);
154
+ --spacing-3xl: var(--size-64);
155
+ --spacing-4xl: var(--size-80);
156
+ }
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+ export declare const BRANDS_PRIMARY = "#296782";
5
+ export declare const BRANDS_SECONDARY = "#49B4E8";
6
+ export declare const BRANDS_ACCENT = "#49B4E8";
7
+ export declare const BRANDS_TERTIARY = "#f5524d";
8
+ export declare const BRANDS_SUCCESS = "#73D3B6";
9
+ export declare const BRANDS_DANGER = "#EA5F5F";
10
+ export declare const BRANDS_WARNING = "#F5D762";
11
+ export declare const BRANDS_INFO = "#73B6D3";
12
+ export declare const BRANDS_LIGHT = "#FFFFFF";
13
+ export declare const BRANDS_DARK = "#000000";
14
+ export declare const COLOR_WHITE = "#ffffff";
15
+ export declare const COLOR_BLACK = "#000000";
16
+ export declare const COLOR_GRAY_100 = "#f8f9fa";
17
+ export declare const COLOR_GRAY_200 = "#e9ecef";
18
+ export declare const COLOR_GRAY_300 = "#dee2e6";
19
+ export declare const COLOR_GRAY_400 = "#ced4da";
20
+ export declare const COLOR_GRAY_500 = "#adb5bd";
21
+ export declare const COLOR_GRAY_600 = "#6c757d";
22
+ export declare const COLOR_GRAY_700 = "#495057";
23
+ export declare const COLOR_GRAY_800 = "#343a40";
24
+ export declare const COLOR_GRAY_900 = "#212529";
25
+ export declare const COLOR_GRAY_ALIAS = "#6c757d";
26
+ export declare const COLOR_GRAY_DARK_ALIAS = "#343a40";
27
+ export declare const FONT_PRIMARY = "Mulish, sans-serif";
28
+ export declare const FONT_MONOSPACE = "var(--font-primary)";
29
+ export declare const FONT_SANS_SERIF = "var(--font-primary)";
30
+ export declare const BORDER_RADIUS_BASE = "var(--size-1)";
31
+ export declare const BORDER_RADIUS_SM = "var(--size-2)";
32
+ export declare const BORDER_RADIUS_LG = "var(--size-4)";
33
+ export declare const BORDER_RADIUS_XL = "var(--size-8)";
34
+ export declare const BORDER_RADIUS_XXL = "var(--size-16)";
35
+ export declare const BORDER_RADIUS_2XL = "var(--size-32)";
36
+ export declare const BORDER_RADIUS_PILL = "999rem";
37
+ export declare const BOX_SHADOW_XS = "0 1px 2px 0 rgba(0, 0, 0, 0.05)";
38
+ export declare const BOX_SHADOW_SM = "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)";
39
+ export declare const BOX_SHADOW_MD = "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.1)";
40
+ export declare const BOX_SHADOW_LG = "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.2)";
41
+ export declare const BOX_SHADOW_XL = "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.2)";
42
+ export declare const BOX_SHADOW_2XL = "0 25px 50px -12px rgba(0, 0, 0, 0.25)";
43
+ export declare const BOX_SHADOW_OUTLINE = "0 0 0 3px var(--primary), 0 0 0 4px var(--primary)";
44
+ export declare const BOX_SHADOW_INSET = "inset 0 0 6px 0 rgba(0, 0, 0, 0.2)";
45
+ export declare const BOX_SHADOW_NONE = "0 0 0 0 rgba(0, 0, 0, 0)";
46
+ export declare const SIZE_0 = "0";
47
+ export declare const SIZE_1 = "0.25rem";
48
+ export declare const SIZE_2 = "0.5rem";
49
+ export declare const SIZE_3 = "0.75rem";
50
+ export declare const SIZE_4 = "1rem";
51
+ export declare const SIZE_5 = "1.25rem";
52
+ export declare const SIZE_6 = "1.5rem";
53
+ export declare const SIZE_7 = "1.75rem";
54
+ export declare const SIZE_8 = "2rem";
55
+ export declare const SIZE_9 = "2.25rem";
56
+ export declare const SIZE_10 = "2.5rem";
57
+ export declare const SIZE_12 = "3rem";
58
+ export declare const SIZE_14 = "3.5rem";
59
+ export declare const SIZE_16 = "4rem";
60
+ export declare const SIZE_20 = "5rem";
61
+ export declare const SIZE_24 = "6rem";
62
+ export declare const SIZE_28 = "7rem";
63
+ export declare const SIZE_32 = "8rem";
64
+ export declare const SIZE_36 = "9rem";
65
+ export declare const SIZE_40 = "10rem";
66
+ export declare const SIZE_44 = "11rem";
67
+ export declare const SIZE_48 = "12rem";
68
+ export declare const SIZE_52 = "13rem";
69
+ export declare const SIZE_56 = "14rem";
70
+ export declare const SIZE_60 = "15rem";
71
+ export declare const SIZE_64 = "16rem";
72
+ export declare const SIZE_72 = "18rem";
73
+ export declare const SIZE_80 = "20rem";
74
+ export declare const SIZE_96 = "24rem";
75
+ export declare const SPACING_NONE = "var(--size-0)";
76
+ export declare const SPACING_XS = "var(--size-1)";
77
+ export declare const SPACING_SM = "var(--size-2)";
78
+ export declare const SPACING_MD = "var(--size-4)";
79
+ export declare const SPACING_LG = "var(--size-8)";
80
+ export declare const SPACING_XL = "var(--size-16)";
81
+ export declare const SPACING_2XL = "var(--size-32)";
82
+ export declare const SPACING_3XL = "var(--size-64)";
83
+ export declare const SPACING_4XL = "var(--size-80)";
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+
5
+ export const BRANDS_PRIMARY = "#296782";
6
+ export const BRANDS_SECONDARY = "#49B4E8";
7
+ export const BRANDS_ACCENT = "#49B4E8";
8
+ export const BRANDS_TERTIARY = "#f5524d";
9
+ export const BRANDS_SUCCESS = "#73D3B6";
10
+ export const BRANDS_DANGER = "#EA5F5F";
11
+ export const BRANDS_WARNING = "#F5D762";
12
+ export const BRANDS_INFO = "#73B6D3";
13
+ export const BRANDS_LIGHT = "#FFFFFF";
14
+ export const BRANDS_DARK = "#000000";
15
+ export const COLOR_WHITE = "#ffffff";
16
+ export const COLOR_BLACK = "#000000";
17
+ export const COLOR_GRAY_100 = "#f8f9fa";
18
+ export const COLOR_GRAY_200 = "#e9ecef";
19
+ export const COLOR_GRAY_300 = "#dee2e6";
20
+ export const COLOR_GRAY_400 = "#ced4da";
21
+ export const COLOR_GRAY_500 = "#adb5bd";
22
+ export const COLOR_GRAY_600 = "#6c757d";
23
+ export const COLOR_GRAY_700 = "#495057";
24
+ export const COLOR_GRAY_800 = "#343a40";
25
+ export const COLOR_GRAY_900 = "#212529";
26
+ export const COLOR_GRAY_ALIAS = "#6c757d";
27
+ export const COLOR_GRAY_DARK_ALIAS = "#343a40";
28
+ export const FONT_PRIMARY = "Mulish, sans-serif";
29
+ export const FONT_MONOSPACE = "var(--font-primary)";
30
+ export const FONT_SANS_SERIF = "var(--font-primary)";
31
+ export const BORDER_RADIUS_BASE = "var(--size-1)";
32
+ export const BORDER_RADIUS_SM = "var(--size-2)";
33
+ export const BORDER_RADIUS_LG = "var(--size-4)";
34
+ export const BORDER_RADIUS_XL = "var(--size-8)";
35
+ export const BORDER_RADIUS_XXL = "var(--size-16)";
36
+ export const BORDER_RADIUS_2XL = "var(--size-32)";
37
+ export const BORDER_RADIUS_PILL = "999rem";
38
+ export const BOX_SHADOW_XS = "0 1px 2px 0 rgba(0, 0, 0, 0.05)";
39
+ export const BOX_SHADOW_SM =
40
+ "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)";
41
+ export const BOX_SHADOW_MD =
42
+ "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.1)";
43
+ export const BOX_SHADOW_LG =
44
+ "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.2)";
45
+ export const BOX_SHADOW_XL =
46
+ "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.2)";
47
+ export const BOX_SHADOW_2XL = "0 25px 50px -12px rgba(0, 0, 0, 0.25)";
48
+ export const BOX_SHADOW_OUTLINE =
49
+ "0 0 0 3px var(--primary), 0 0 0 4px var(--primary)";
50
+ export const BOX_SHADOW_INSET = "inset 0 0 6px 0 rgba(0, 0, 0, 0.2)";
51
+ export const BOX_SHADOW_NONE = "0 0 0 0 rgba(0, 0, 0, 0)";
52
+ export const SIZE_0 = "0";
53
+ export const SIZE_1 = "0.25rem";
54
+ export const SIZE_2 = "0.5rem";
55
+ export const SIZE_3 = "0.75rem";
56
+ export const SIZE_4 = "1rem";
57
+ export const SIZE_5 = "1.25rem";
58
+ export const SIZE_6 = "1.5rem";
59
+ export const SIZE_7 = "1.75rem";
60
+ export const SIZE_8 = "2rem";
61
+ export const SIZE_9 = "2.25rem";
62
+ export const SIZE_10 = "2.5rem";
63
+ export const SIZE_12 = "3rem";
64
+ export const SIZE_14 = "3.5rem";
65
+ export const SIZE_16 = "4rem";
66
+ export const SIZE_20 = "5rem";
67
+ export const SIZE_24 = "6rem";
68
+ export const SIZE_28 = "7rem";
69
+ export const SIZE_32 = "8rem";
70
+ export const SIZE_36 = "9rem";
71
+ export const SIZE_40 = "10rem";
72
+ export const SIZE_44 = "11rem";
73
+ export const SIZE_48 = "12rem";
74
+ export const SIZE_52 = "13rem";
75
+ export const SIZE_56 = "14rem";
76
+ export const SIZE_60 = "15rem";
77
+ export const SIZE_64 = "16rem";
78
+ export const SIZE_72 = "18rem";
79
+ export const SIZE_80 = "20rem";
80
+ export const SIZE_96 = "24rem";
81
+ export const SPACING_NONE = "var(--size-0)";
82
+ export const SPACING_XS = "var(--size-1)";
83
+ export const SPACING_SM = "var(--size-2)";
84
+ export const SPACING_MD = "var(--size-4)";
85
+ export const SPACING_LG = "var(--size-8)";
86
+ export const SPACING_XL = "var(--size-16)";
87
+ export const SPACING_2XL = "var(--size-32)";
88
+ export const SPACING_3XL = "var(--size-64)";
89
+ export const SPACING_4XL = "var(--size-80)";
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './components/Button/react';
2
+ export * from './components/Icon/react';
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import './core/styles/main.css';/* empty css */
2
- import { ZButton as m } from "./components/Button/react/index.js";
2
+ import { Button as m } from "./components/Button/react/index.js";
3
+ import { Icon as e } from "./components/Icon/react/index.js";
3
4
  export {
4
- m as ZButton
5
+ m as Button,
6
+ e as Icon
5
7
  };
@@ -0,0 +1,78 @@
1
+ import * as a from "react";
2
+ import { jsx as b } from "react/jsx-runtime";
3
+ const y = ["as", "disabled"];
4
+ function P(n, t) {
5
+ if (n == null) return {};
6
+ var o = {};
7
+ for (var i in n) if ({}.hasOwnProperty.call(n, i)) {
8
+ if (t.indexOf(i) >= 0) continue;
9
+ o[i] = n[i];
10
+ }
11
+ return o;
12
+ }
13
+ function x(n) {
14
+ return !n || n.trim() === "#";
15
+ }
16
+ function j({
17
+ tagName: n,
18
+ disabled: t,
19
+ href: o,
20
+ target: i,
21
+ rel: e,
22
+ role: r,
23
+ onClick: s,
24
+ tabIndex: c = 0,
25
+ type: d
26
+ }) {
27
+ n || (o != null || i != null || e != null ? n = "a" : n = "button");
28
+ const f = {
29
+ tagName: n
30
+ };
31
+ if (n === "button")
32
+ return [{
33
+ type: d || "button",
34
+ disabled: t
35
+ }, f];
36
+ const l = (u) => {
37
+ if ((t || n === "a" && x(o)) && u.preventDefault(), t) {
38
+ u.stopPropagation();
39
+ return;
40
+ }
41
+ s?.(u);
42
+ }, p = (u) => {
43
+ u.key === " " && (u.preventDefault(), l(u));
44
+ };
45
+ return n === "a" && (o || (o = "#"), t && (o = void 0)), [{
46
+ role: r ?? "button",
47
+ // explicitly undefined so that it overrides the props disabled in a spread
48
+ // e.g. <Tag {...props} {...hookProps} />
49
+ disabled: void 0,
50
+ tabIndex: t ? void 0 : c,
51
+ href: o,
52
+ target: n === "a" ? i : void 0,
53
+ "aria-disabled": t || void 0,
54
+ rel: n === "a" ? e : void 0,
55
+ onClick: l,
56
+ onKeyDown: p
57
+ }, f];
58
+ }
59
+ const w = /* @__PURE__ */ a.forwardRef((n, t) => {
60
+ let {
61
+ as: o,
62
+ disabled: i
63
+ } = n, e = P(n, y);
64
+ const [r, {
65
+ tagName: s
66
+ }] = j(Object.assign({
67
+ tagName: o,
68
+ disabled: i
69
+ }, e));
70
+ return /* @__PURE__ */ b(s, Object.assign({}, e, r, {
71
+ ref: t
72
+ }));
73
+ });
74
+ w.displayName = "Button";
75
+ export {
76
+ x as isTrivialHref,
77
+ j as useButtonProps
78
+ };
@@ -0,0 +1,37 @@
1
+ import { __module as s } from "../../../../../_virtual/index2.js";
2
+ var u;
3
+ function c() {
4
+ return u ? s.exports : (u = 1, (function(i) {
5
+ (function() {
6
+ var f = {}.hasOwnProperty;
7
+ function n() {
8
+ for (var r = "", t = 0; t < arguments.length; t++) {
9
+ var e = arguments[t];
10
+ e && (r = o(r, a(e)));
11
+ }
12
+ return r;
13
+ }
14
+ function a(r) {
15
+ if (typeof r == "string" || typeof r == "number")
16
+ return r;
17
+ if (typeof r != "object")
18
+ return "";
19
+ if (Array.isArray(r))
20
+ return n.apply(null, r);
21
+ if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
22
+ return r.toString();
23
+ var t = "";
24
+ for (var e in r)
25
+ f.call(r, e) && r[e] && (t = o(t, e));
26
+ return t;
27
+ }
28
+ function o(r, t) {
29
+ return t ? r ? r + " " + t : r + t : r;
30
+ }
31
+ i.exports ? (n.default = n, i.exports = n) : window.classNames = n;
32
+ })();
33
+ })(s), s.exports);
34
+ }
35
+ export {
36
+ c as __require
37
+ };
@@ -0,0 +1,34 @@
1
+ import u from "../../../../../../_virtual/index.js";
2
+ import * as l from "react";
3
+ import { useButtonProps as N } from "../../../../@restart_ui@1.9.4_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@restart/ui/esm/Button.js";
4
+ import { useBootstrapPrefix as x } from "./ThemeProvider.js";
5
+ import { jsx as B } from "react/jsx-runtime";
6
+ const $ = /* @__PURE__ */ l.forwardRef(({
7
+ as: m,
8
+ bsPrefix: s,
9
+ variant: e = "primary",
10
+ size: a,
11
+ active: f = !1,
12
+ disabled: t = !1,
13
+ className: n,
14
+ ...o
15
+ }, p) => {
16
+ const r = x(s, "btn"), [c, {
17
+ tagName: i
18
+ }] = N({
19
+ tagName: m,
20
+ disabled: t,
21
+ ...o
22
+ });
23
+ return /* @__PURE__ */ B(i, {
24
+ ...c,
25
+ ...o,
26
+ ref: p,
27
+ disabled: t,
28
+ className: u(n, r, f && "active", e && `${r}-${e}`, a && `${r}-${a}`, o.href && t && "disabled")
29
+ });
30
+ });
31
+ $.displayName = "Button";
32
+ export {
33
+ $ as default
34
+ };
@@ -0,0 +1,23 @@
1
+ import * as s from "react";
2
+ import { useContext as n } from "react";
3
+ import "react/jsx-runtime";
4
+ const m = ["xxl", "xl", "lg", "md", "sm", "xs"], x = "xs", o = /* @__PURE__ */ s.createContext({
5
+ prefixes: {},
6
+ breakpoints: m,
7
+ minBreakpoint: x
8
+ }), {
9
+ Consumer: c,
10
+ Provider: a
11
+ } = o;
12
+ function T(t, e) {
13
+ const {
14
+ prefixes: r
15
+ } = n(o);
16
+ return t || r[e] || e;
17
+ }
18
+ export {
19
+ m as DEFAULT_BREAKPOINTS,
20
+ x as DEFAULT_MIN_BREAKPOINT,
21
+ c as ThemeConsumer,
22
+ T as useBootstrapPrefix
23
+ };
package/package.json CHANGED
@@ -1,26 +1,34 @@
1
1
  {
2
2
  "name": "zuii",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "Bibliothèque de composants UI légère, intuitive et modulaire pour les interfaces web modernes.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
9
  "files": [
10
- "dist"
10
+ "dist",
11
+ "style-dictionary"
11
12
  ],
13
+ "bin": {
14
+ "zuii-tokens": "./style-dictionary/build.js"
15
+ },
12
16
  "scripts": {
13
17
  "dev": "vite",
18
+ "prebuild": "pnpm run tokens:build",
14
19
  "build": "vite build",
20
+ "postbuild": "mkdir -p dist/core/styles && cp src/core/styles/_tokens.scss src/core/styles/tokens.css src/core/styles/tokens.ts dist/core/styles/",
15
21
  "preview": "vite preview",
16
- "prepublishOnly": "npm run build"
22
+ "prepublishOnly": "pnpm run build",
23
+ "tokens:build": "node style-dictionary/build.js --output src/core/styles"
17
24
  },
18
25
  "keywords": [],
19
26
  "author": "Vincent Moreau",
20
27
  "license": "MIT",
21
28
  "peerDependencies": {
22
29
  "react": ">=16.8.0",
23
- "react-dom": ">=16.8.0"
30
+ "react-dom": ">=16.8.0",
31
+ "react-bootstrap": ">=2.10.10"
24
32
  },
25
33
  "devDependencies": {
26
34
  "@semantic-release/changelog": "^6.0.3",
@@ -32,12 +40,17 @@
32
40
  "@types/react-dom": "^19.2.3",
33
41
  "@vitejs/plugin-react": "^5.1.2",
34
42
  "react": "^19.2.4",
43
+ "react-bootstrap": "^2.10.10",
35
44
  "react-dom": "^19.2.4",
36
45
  "sass": "^1.97.3",
37
46
  "semantic-release": "^25.0.2",
38
47
  "typescript": "^5.9.3",
39
48
  "vite": "^7.3.1",
40
49
  "vite-plugin-dts": "^4.5.4",
41
- "vite-plugin-lib-inject-css": "^2.2.2"
50
+ "vite-plugin-lib-inject-css": "^2.2.2",
51
+ "bootstrap": "^5.3.8",
52
+ "lucide-static": "^0.563.0",
53
+ "style-dictionary": "^4.2.0",
54
+ "colord": "^2.9.3"
42
55
  }
43
56
  }
@@ -0,0 +1,95 @@
1
+ # Style Dictionary - Zuii
2
+
3
+ Ce dossier contient la configuration Style Dictionary pour générer les tokens de design de Zuii.
4
+
5
+ ## Utilisation dans votre projet
6
+
7
+ Après avoir installé `zuii` dans votre projet, vous pouvez générer les tokens de design en utilisant la commande `zuii-tokens`.
8
+
9
+ ### Commande de base
10
+
11
+ ```bash
12
+ npx zuii-tokens
13
+ ```
14
+
15
+ Par défaut, cette commande :
16
+ - Cherche les tokens dans le dossier `tokens/` de votre projet
17
+ - Génère les fichiers dans le répertoire courant de votre projet
18
+
19
+ ### Options
20
+
21
+ #### Spécifier le chemin de sortie
22
+
23
+ Vous pouvez spécifier où générer les fichiers avec l'option `--output` ou `-o` :
24
+
25
+ ```bash
26
+ npx zuii-tokens --output src/styles
27
+ ```
28
+
29
+ Cela générera les fichiers dans `src/styles/` :
30
+ - `src/styles/_tokens.scss` - Variables SCSS avec maps
31
+ - `src/styles/tokens.css` - Variables CSS custom properties
32
+ - `src/styles/tokens.ts` - Constantes TypeScript
33
+
34
+ #### Spécifier le chemin des tokens source
35
+
36
+ Vous pouvez spécifier un ou plusieurs chemins vers vos fichiers de tokens :
37
+
38
+ ```bash
39
+ npx zuii-tokens design-tokens
40
+ ```
41
+
42
+ ### Exemple d'utilisation
43
+
44
+ Dans votre `package.json`, vous pouvez ajouter un script :
45
+
46
+ ```json
47
+ {
48
+ "scripts": {
49
+ "tokens": "zuii-tokens --output src/styles"
50
+ }
51
+ }
52
+ ```
53
+
54
+ ## Développement local (dans le package zuii)
55
+
56
+ Si vous travaillez sur le package zuii lui-même, la génération est automatisée lors du build :
57
+
58
+ ```bash
59
+ pnpm run build
60
+ ```
61
+
62
+ Ce processus effectue les étapes suivantes :
63
+ 1. **Génération (src)** : Les tokens sont générés dans `src/core/styles/` pour être utilisés par la compilation Sass (ces fichiers sont ignorés par Git).
64
+ 2. **Copie (dist)** : Après le build Vite, les tokens sont copiés dans `dist/core/styles/` pour être distribués aux utilisateurs.
65
+
66
+ Pour générer les tokens manuellement pendant le développement (sans faire un build complet) :
67
+
68
+ ```bash
69
+ pnpm run tokens:build
70
+ ```
71
+
72
+ Cela générera les fichiers dans `src/core/styles/`.
73
+
74
+ ## Structure des tokens
75
+
76
+ Les tokens doivent être organisés en fichiers JSON dans le format Style Dictionary :
77
+
78
+ ```json
79
+ {
80
+ "color": {
81
+ "primary": { "value": "#296782" }
82
+ }
83
+ }
84
+ ```
85
+
86
+ ## Fichiers générés
87
+
88
+ ### `_tokens.scss`
89
+ Variables SCSS organisées en maps pour une utilisation facile dans vos styles SCSS.
90
+
91
+ ### `tokens.css`
92
+ Variables CSS custom properties (CSS variables) pour une utilisation directe dans vos styles CSS.
93
+
94
+ ### `tokens.ts`
95
+ Constantes TypeScript pour une utilisation dans votre code JavaScript/TypeScript.