@joza/joza-ui-kit 0.1.8 → 0.1.9
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/joza-ui-kit.cjs +364 -11
- package/dist/joza-ui-kit.cjs.map +1 -1
- package/dist/joza-ui-kit.es.js +327 -7
- package/dist/joza-ui-kit.es.js.map +1 -1
- package/dist/joza-ui-kit.umd.js +366 -14
- package/dist/joza-ui-kit.umd.js.map +1 -1
- package/dist/style.css +964 -73
- package/dist/types/index.d.ts +32 -1
- package/package.json +1 -1
package/dist/joza-ui-kit.cjs
CHANGED
|
@@ -1,14 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var o = require('react');
|
|
5
|
+
var vt = require('react-dom');
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
var n = Object.create(null);
|
|
9
|
+
if (e) {
|
|
10
|
+
Object.keys(e).forEach(function (k) {
|
|
11
|
+
if (k !== 'default') {
|
|
12
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return e[k]; }
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var o__namespace = /*#__PURE__*/_interopNamespaceDefault(o);
|
|
25
|
+
|
|
26
|
+
var styles$d = {"animatedStat":"animated-stat-module_animatedStat__Hyy77","animatedStat__number":"animated-stat-module_animatedStat__number__xa33x","animatedStat__unit":"animated-stat-module_animatedStat__unit__N6MDD","animatedStat__label":"animated-stat-module_animatedStat__label__VpNaZ"};
|
|
7
27
|
|
|
8
28
|
const AnimatedStat = ({ label, unit, value }) => {
|
|
9
29
|
const useCountUp = (end, duration = 2000, startCounting = false) => {
|
|
10
|
-
const [count, setCount] =
|
|
11
|
-
|
|
30
|
+
const [count, setCount] = o.useState(0);
|
|
31
|
+
o.useEffect(() => {
|
|
12
32
|
if (!startCounting)
|
|
13
33
|
return;
|
|
14
34
|
let startTime;
|
|
@@ -29,7 +49,7 @@ const AnimatedStat = ({ label, unit, value }) => {
|
|
|
29
49
|
}, [end, duration, startCounting]);
|
|
30
50
|
return count;
|
|
31
51
|
};
|
|
32
|
-
|
|
52
|
+
o.useEffect(() => {
|
|
33
53
|
const observer = new IntersectionObserver(([entry]) => {
|
|
34
54
|
if (entry.isIntersecting) {
|
|
35
55
|
setIsVisible(true);
|
|
@@ -40,21 +60,354 @@ const AnimatedStat = ({ label, unit, value }) => {
|
|
|
40
60
|
}
|
|
41
61
|
return () => observer.disconnect();
|
|
42
62
|
}, []);
|
|
43
|
-
const [isVisible, setIsVisible] =
|
|
63
|
+
const [isVisible, setIsVisible] = o.useState(false);
|
|
44
64
|
const stat = useCountUp(value, 2000, isVisible);
|
|
45
|
-
const divRef =
|
|
46
|
-
return (jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("div", { className: styles$
|
|
65
|
+
const divRef = o.useRef(null);
|
|
66
|
+
return (jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("div", { className: styles$d.animatedStat, ref: divRef, children: [jsxRuntime.jsxs("div", { className: styles$d.animatedStat, children: [jsxRuntime.jsx("span", { className: styles$d.animatedStat__number, children: stat }), jsxRuntime.jsx("span", { className: styles$d.animatedStat__unit, children: unit })] }), jsxRuntime.jsx("p", { className: styles$d.animatedStat__label, children: label })] }) }));
|
|
47
67
|
};
|
|
48
68
|
|
|
49
|
-
var styles = {"button2":"button2-module_button2__TJ0uA","button2__primary":"button2-module_button2__primary__b8-p4","button2__lg":"button2-module_button2__lg__KYxhn","button2__icon":"button2-module_button2__icon__k7LVe","button2__icon__picture":"button2-module_button2__icon__picture__MCRsw","button2__ghost":"button2-module_button2__ghost__yfm4E","button2__full":"button2-module_button2__full__S71L2"};
|
|
69
|
+
var styles$c = {"button2":"button2-module_button2__TJ0uA","button2__primary":"button2-module_button2__primary__b8-p4","button2__lg":"button2-module_button2__lg__KYxhn","button2__icon":"button2-module_button2__icon__k7LVe","button2__icon__picture":"button2-module_button2__icon__picture__MCRsw","button2__ghost":"button2-module_button2__ghost__yfm4E","button2__full":"button2-module_button2__full__S71L2"};
|
|
50
70
|
|
|
51
71
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
52
72
|
|
|
53
73
|
const Button2 = ({ label, size = "", style = "", disabled = false, icon: Icon, children = null, onClick = () => { } }) => {
|
|
54
|
-
return (jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("button", { disabled: disabled, onClick: onClick, className: clsx(styles.button2, size === "lg" && styles.button2__lg, size === "full" && styles.button2__full, style === "" && styles.button2__primary, style === "ghost" && styles.button2__ghost), children: [!children &&
|
|
55
|
-
jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [label, Icon && jsxRuntime.jsx(Icon, { className: clsx(styles.button2__icon, styles.button2__icon__picture) })] }), children && jsxRuntime.jsx(jsxRuntime.Fragment, { children: children })] }) }));
|
|
74
|
+
return (jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("button", { disabled: disabled, onClick: onClick, className: clsx(styles$c.button2, size === "lg" && styles$c.button2__lg, size === "full" && styles$c.button2__full, style === "" && styles$c.button2__primary, style === "ghost" && styles$c.button2__ghost), children: [!children &&
|
|
75
|
+
jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [label, Icon && jsxRuntime.jsx(Icon, { className: clsx(styles$c.button2__icon, styles$c.button2__icon__picture) })] }), children && jsxRuntime.jsx(jsxRuntime.Fragment, { children: children })] }) }));
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
var styles$b = {"carousel":"carousel-module_carousel__wqzvf","carousel__track":"carousel-module_carousel__track__tYeyk","carousel__logo":"carousel-module_carousel__logo__Rm8zv"};
|
|
79
|
+
|
|
80
|
+
const Carousel = ({ imgs }) => {
|
|
81
|
+
return (jsxRuntime.jsx("div", { className: styles$b.carousel, children: jsxRuntime.jsx("div", { className: styles$b.carousel__track, children: imgs.map((item, index) => (jsxRuntime.jsx("div", { className: styles$b.carousel__logo, children: jsxRuntime.jsx("img", { src: item.src, alt: item.alt }) }, `first-${index}`))) }) }));
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @license lucide-react v0.562.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
92
|
+
const toCamelCase = (string) => string.replace(
|
|
93
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
94
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
95
|
+
);
|
|
96
|
+
const toPascalCase = (string) => {
|
|
97
|
+
const camelCase = toCamelCase(string);
|
|
98
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
99
|
+
};
|
|
100
|
+
const mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
101
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
102
|
+
}).join(" ").trim();
|
|
103
|
+
const hasA11yProp = (props) => {
|
|
104
|
+
for (const prop in props) {
|
|
105
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @license lucide-react v0.562.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
var defaultAttributes = {
|
|
119
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
120
|
+
width: 24,
|
|
121
|
+
height: 24,
|
|
122
|
+
viewBox: "0 0 24 24",
|
|
123
|
+
fill: "none",
|
|
124
|
+
stroke: "currentColor",
|
|
125
|
+
strokeWidth: 2,
|
|
126
|
+
strokeLinecap: "round",
|
|
127
|
+
strokeLinejoin: "round"
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @license lucide-react v0.562.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
const Icon = o.forwardRef(
|
|
139
|
+
({
|
|
140
|
+
color = "currentColor",
|
|
141
|
+
size = 24,
|
|
142
|
+
strokeWidth = 2,
|
|
143
|
+
absoluteStrokeWidth,
|
|
144
|
+
className = "",
|
|
145
|
+
children,
|
|
146
|
+
iconNode,
|
|
147
|
+
...rest
|
|
148
|
+
}, ref) => o.createElement(
|
|
149
|
+
"svg",
|
|
150
|
+
{
|
|
151
|
+
ref,
|
|
152
|
+
...defaultAttributes,
|
|
153
|
+
width: size,
|
|
154
|
+
height: size,
|
|
155
|
+
stroke: color,
|
|
156
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
157
|
+
className: mergeClasses("lucide", className),
|
|
158
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
159
|
+
...rest
|
|
160
|
+
},
|
|
161
|
+
[
|
|
162
|
+
...iconNode.map(([tag, attrs]) => o.createElement(tag, attrs)),
|
|
163
|
+
...Array.isArray(children) ? children : [children]
|
|
164
|
+
]
|
|
165
|
+
)
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @license lucide-react v0.562.0 - ISC
|
|
170
|
+
*
|
|
171
|
+
* This source code is licensed under the ISC license.
|
|
172
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
const createLucideIcon = (iconName, iconNode) => {
|
|
177
|
+
const Component = o.forwardRef(
|
|
178
|
+
({ className, ...props }, ref) => o.createElement(Icon, {
|
|
179
|
+
ref,
|
|
180
|
+
iconNode,
|
|
181
|
+
className: mergeClasses(
|
|
182
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
183
|
+
`lucide-${iconName}`,
|
|
184
|
+
className
|
|
185
|
+
),
|
|
186
|
+
...props
|
|
187
|
+
})
|
|
188
|
+
);
|
|
189
|
+
Component.displayName = toPascalCase(iconName);
|
|
190
|
+
return Component;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @license lucide-react v0.562.0 - ISC
|
|
195
|
+
*
|
|
196
|
+
* This source code is licensed under the ISC license.
|
|
197
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
const __iconNode$5 = [
|
|
202
|
+
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
203
|
+
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
204
|
+
];
|
|
205
|
+
const ArrowRight = createLucideIcon("arrow-right", __iconNode$5);
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @license lucide-react v0.562.0 - ISC
|
|
209
|
+
*
|
|
210
|
+
* This source code is licensed under the ISC license.
|
|
211
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
+
*/
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
const __iconNode$4 = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
216
|
+
const Check = createLucideIcon("check", __iconNode$4);
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* @license lucide-react v0.562.0 - ISC
|
|
220
|
+
*
|
|
221
|
+
* This source code is licensed under the ISC license.
|
|
222
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
const __iconNode$3 = [
|
|
227
|
+
["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
|
|
228
|
+
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
229
|
+
];
|
|
230
|
+
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$3);
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* @license lucide-react v0.562.0 - ISC
|
|
234
|
+
*
|
|
235
|
+
* This source code is licensed under the ISC license.
|
|
236
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
+
*/
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
const __iconNode$2 = [
|
|
241
|
+
["path", { d: "M4 5h16", key: "1tepv9" }],
|
|
242
|
+
["path", { d: "M4 12h16", key: "1lakjw" }],
|
|
243
|
+
["path", { d: "M4 19h16", key: "1djgab" }]
|
|
244
|
+
];
|
|
245
|
+
const Menu = createLucideIcon("menu", __iconNode$2);
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* @license lucide-react v0.562.0 - ISC
|
|
249
|
+
*
|
|
250
|
+
* This source code is licensed under the ISC license.
|
|
251
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
+
*/
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
const __iconNode$1 = [
|
|
256
|
+
[
|
|
257
|
+
"path",
|
|
258
|
+
{
|
|
259
|
+
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
|
|
260
|
+
key: "1ffxy3"
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
264
|
+
];
|
|
265
|
+
const Send = createLucideIcon("send", __iconNode$1);
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @license lucide-react v0.562.0 - ISC
|
|
269
|
+
*
|
|
270
|
+
* This source code is licensed under the ISC license.
|
|
271
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
+
*/
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
const __iconNode = [
|
|
276
|
+
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
277
|
+
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
278
|
+
];
|
|
279
|
+
const X = createLucideIcon("x", __iconNode);
|
|
280
|
+
|
|
281
|
+
var styles$a = {"form":"form-module_form__QYrV-","form__title":"form-module_form__title__pkchh","form__row":"form-module_form__row__ZXAuR","form__group":"form-module_form__group__SjiFB","form__label":"form-module_form__label__-y8pi","form__input":"form-module_form__input__YAsBo","form__textarea":"form-module_form__textarea__xeNDP","form__note":"form-module_form__note__5XSbq"};
|
|
282
|
+
|
|
283
|
+
var jt=n=>{switch(n){case "success":return ee;case "info":return ae;case "warning":return oe;case "error":return se;default:return null}},te=Array(12).fill(0),Yt=({visible:n,className:e})=>o.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":n},o.createElement("div",{className:"sonner-spinner"},te.map((t,a)=>o.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),ee=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),oe=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ae=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),se=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},o.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Ot=o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},o.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}));var Ft=()=>{let[n,e]=o.useState(document.hidden);return o.useEffect(()=>{let t=()=>{e(document.hidden);};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),n};var bt=1,yt=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1);});this.publish=e=>{this.subscribers.forEach(t=>t(e));};this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e];};this.create=e=>{var S;let{message:t,...a}=e,u=typeof(e==null?void 0:e.id)=="number"||((S=e.id)==null?void 0:S.length)>0?e.id:bt++,f=this.toasts.find(g=>g.id===u),w=e.dismissible===void 0?true:e.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),f?this.toasts=this.toasts.map(g=>g.id===u?(this.publish({...g,...e,id:u,title:t}),{...g,...e,id:u,dismissible:w,title:t}):g):this.addToast({title:t,...a,dismissible:w,id:u}),u};this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(a=>a({id:t.id,dismiss:true}));}),this.subscribers.forEach(t=>t({id:e,dismiss:true})),e);this.message=(e,t)=>this.create({...t,message:e});this.error=(e,t)=>this.create({...t,message:e,type:"error"});this.success=(e,t)=>this.create({...t,type:"success",message:e});this.info=(e,t)=>this.create({...t,type:"info",message:e});this.warning=(e,t)=>this.create({...t,type:"warning",message:e});this.loading=(e,t)=>this.create({...t,type:"loading",message:e});this.promise=(e,t)=>{if(!t)return;let a;t.loading!==void 0&&(a=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let u=e instanceof Promise?e:e(),f=a!==void 0,w,S=u.then(async i=>{if(w=["resolve",i],o.isValidElement(i))f=false,this.create({id:a,type:"default",message:i});else if(ie(i)&&!i.ok){f=false;let T=typeof t.error=="function"?await t.error(`HTTP error! status: ${i.status}`):t.error,F=typeof t.description=="function"?await t.description(`HTTP error! status: ${i.status}`):t.description;this.create({id:a,type:"error",message:T,description:F});}else if(t.success!==void 0){f=false;let T=typeof t.success=="function"?await t.success(i):t.success,F=typeof t.description=="function"?await t.description(i):t.description;this.create({id:a,type:"success",message:T,description:F});}}).catch(async i=>{if(w=["reject",i],t.error!==void 0){f=false;let D=typeof t.error=="function"?await t.error(i):t.error,T=typeof t.description=="function"?await t.description(i):t.description;this.create({id:a,type:"error",message:D,description:T});}}).finally(()=>{var i;f&&(this.dismiss(a),a=void 0),(i=t.finally)==null||i.call(t);}),g=()=>new Promise((i,D)=>S.then(()=>w[0]==="reject"?D(w[1]):i(w[1])).catch(D));return typeof a!="string"&&typeof a!="number"?{unwrap:g}:Object.assign(a,{unwrap:g})};this.custom=(e,t)=>{let a=(t==null?void 0:t.id)||bt++;return this.create({jsx:e(a),id:a,...t}),a};this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set;}},v=new yt,ne=(n,e)=>{let t=(e==null?void 0:e.id)||bt++;return v.addToast({title:n,...e,id:t}),t},ie=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",le=ne,ce=()=>v.toasts,de=()=>v.getActiveToasts();Object.assign(le,{success:v.success,info:v.info,warning:v.warning,error:v.error,custom:v.custom,message:v.message,promise:v.promise,dismiss:v.dismiss,loading:v.loading},{getHistory:ce,getToasts:de});function wt(n,{insertAt:e}={}){if(typeof document=="undefined")return;let t=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",e==="top"&&t.firstChild?t.insertBefore(a,t.firstChild):t.appendChild(a),a.styleSheet?a.styleSheet.cssText=n:a.appendChild(document.createTextNode(n));}wt(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
284
|
+
`);function tt(n){return n.label!==void 0}var pe=3,me="32px",ge="16px",Wt=4e3,he=356,be=14,ye=20,we=200;function M(...n){return n.filter(Boolean).join(" ")}function xe(n){let[e,t]=n.split("-"),a=[];return e&&a.push(e),t&&a.push(t),a}var ve=n=>{var Dt,Pt,Nt,Bt,Ct,kt,It,Mt,Ht,At,Lt;let{invert:e,toast:t,unstyled:a,interacting:u,setHeights:f,visibleToasts:w,heights:S,index:g,toasts:i,expanded:D,removeToast:T,defaultRichColors:F,closeButton:et,style:ut,cancelButtonStyle:ft,actionButtonStyle:l,className:ot="",descriptionClassName:at="",duration:X,position:st,gap:pt,loadingIcon:rt,expandByDefault:B,classNames:s,icons:P,closeButtonAriaLabel:nt="Close toast",pauseWhenPageIsHidden:it}=n,[Y,C]=o.useState(null),[lt,J]=o.useState(null),[W,H]=o.useState(false),[A,mt]=o.useState(false),[L,z]=o.useState(false),[ct,d]=o.useState(false),[h,y]=o.useState(false),[R,j]=o.useState(0),[p,_]=o.useState(0),O=o.useRef(t.duration||X||Wt),G=o.useRef(null),k=o.useRef(null),Vt=g===0,Ut=g+1<=w,N=t.type,V=t.dismissible!==false,Kt=t.className||"",Xt=t.descriptionClassName||"",dt=o.useMemo(()=>S.findIndex(r=>r.toastId===t.id)||0,[S,t.id]),Jt=o.useMemo(()=>{var r;return (r=t.closeButton)!=null?r:et},[t.closeButton,et]),Tt=o.useMemo(()=>t.duration||X||Wt,[t.duration,X]),gt=o.useRef(0),U=o.useRef(0),St=o.useRef(0),K=o.useRef(null),[Gt,Qt]=st.split("-"),Rt=o.useMemo(()=>S.reduce((r,m,c)=>c>=dt?r:r+m.height,0),[S,dt]),Et=Ft(),qt=t.invert||e,ht=N==="loading";U.current=o.useMemo(()=>dt*pt+Rt,[dt,Rt]),o.useEffect(()=>{O.current=Tt;},[Tt]),o.useEffect(()=>{H(true);},[]),o.useEffect(()=>{let r=k.current;if(r){let m=r.getBoundingClientRect().height;return _(m),f(c=>[{toastId:t.id,height:m,position:t.position},...c]),()=>f(c=>c.filter(b=>b.toastId!==t.id))}},[f,t.id]),o.useLayoutEffect(()=>{if(!W)return;let r=k.current,m=r.style.height;r.style.height="auto";let c=r.getBoundingClientRect().height;r.style.height=m,_(c),f(b=>b.find(x=>x.toastId===t.id)?b.map(x=>x.toastId===t.id?{...x,height:c}:x):[{toastId:t.id,height:c,position:t.position},...b]);},[W,t.title,t.description,f,t.id]);let $=o.useCallback(()=>{mt(true),j(U.current),f(r=>r.filter(m=>m.toastId!==t.id)),setTimeout(()=>{T(t);},we);},[t,T,f,U]);o.useEffect(()=>{if(t.promise&&N==="loading"||t.duration===1/0||t.type==="loading")return;let r;return D||u||it&&Et?(()=>{if(St.current<gt.current){let b=new Date().getTime()-gt.current;O.current=O.current-b;}St.current=new Date().getTime();})():(()=>{O.current!==1/0&&(gt.current=new Date().getTime(),r=setTimeout(()=>{var b;(b=t.onAutoClose)==null||b.call(t,t),$();},O.current));})(),()=>clearTimeout(r)},[D,u,t,N,it,Et,$]),o.useEffect(()=>{t.delete&&$();},[$,t.delete]);function Zt(){var r,m,c;return P!=null&&P.loading?o.createElement("div",{className:M(s==null?void 0:s.loader,(r=t==null?void 0:t.classNames)==null?void 0:r.loader,"sonner-loader"),"data-visible":N==="loading"},P.loading):rt?o.createElement("div",{className:M(s==null?void 0:s.loader,(m=t==null?void 0:t.classNames)==null?void 0:m.loader,"sonner-loader"),"data-visible":N==="loading"},rt):o.createElement(Yt,{className:M(s==null?void 0:s.loader,(c=t==null?void 0:t.classNames)==null?void 0:c.loader),visible:N==="loading"})}return o.createElement("li",{tabIndex:0,ref:k,className:M(ot,Kt,s==null?void 0:s.toast,(Dt=t==null?void 0:t.classNames)==null?void 0:Dt.toast,s==null?void 0:s.default,s==null?void 0:s[N],(Pt=t==null?void 0:t.classNames)==null?void 0:Pt[N]),"data-sonner-toast":"","data-rich-colors":(Nt=t.richColors)!=null?Nt:F,"data-styled":!(t.jsx||t.unstyled||a),"data-mounted":W,"data-promise":!!t.promise,"data-swiped":h,"data-removed":A,"data-visible":Ut,"data-y-position":Gt,"data-x-position":Qt,"data-index":g,"data-front":Vt,"data-swiping":L,"data-dismissible":V,"data-type":N,"data-invert":qt,"data-swipe-out":ct,"data-swipe-direction":lt,"data-expanded":!!(D||B&&W),style:{"--index":g,"--toasts-before":g,"--z-index":i.length-g,"--offset":`${A?R:U.current}px`,"--initial-height":B?"auto":`${p}px`,...ut,...t.style},onDragEnd:()=>{z(false),C(null),K.current=null;},onPointerDown:r=>{ht||!V||(G.current=new Date,j(U.current),r.target.setPointerCapture(r.pointerId),r.target.tagName!=="BUTTON"&&(z(true),K.current={x:r.clientX,y:r.clientY}));},onPointerUp:()=>{var x,Q,q,Z;if(ct||!V)return;K.current=null;let r=Number(((x=k.current)==null?void 0:x.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),m=Number(((Q=k.current)==null?void 0:Q.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),c=new Date().getTime()-((q=G.current)==null?void 0:q.getTime()),b=Y==="x"?r:m,I=Math.abs(b)/c;if(Math.abs(b)>=ye||I>.11){j(U.current),(Z=t.onDismiss)==null||Z.call(t,t),J(Y==="x"?r>0?"right":"left":m>0?"down":"up"),$(),d(true),y(false);return}z(false),C(null);},onPointerMove:r=>{var Q,q,Z,zt;if(!K.current||!V||((Q=window.getSelection())==null?void 0:Q.toString().length)>0)return;let c=r.clientY-K.current.y,b=r.clientX-K.current.x,I=(q=n.swipeDirections)!=null?q:xe(st);!Y&&(Math.abs(b)>1||Math.abs(c)>1)&&C(Math.abs(b)>Math.abs(c)?"x":"y");let x={x:0,y:0};Y==="y"?(I.includes("top")||I.includes("bottom"))&&(I.includes("top")&&c<0||I.includes("bottom")&&c>0)&&(x.y=c):Y==="x"&&(I.includes("left")||I.includes("right"))&&(I.includes("left")&&b<0||I.includes("right")&&b>0)&&(x.x=b),(Math.abs(x.x)>0||Math.abs(x.y)>0)&&y(true),(Z=k.current)==null||Z.style.setProperty("--swipe-amount-x",`${x.x}px`),(zt=k.current)==null||zt.style.setProperty("--swipe-amount-y",`${x.y}px`);}},Jt&&!t.jsx?o.createElement("button",{"aria-label":nt,"data-disabled":ht,"data-close-button":true,onClick:ht||!V?()=>{}:()=>{var r;$(),(r=t.onDismiss)==null||r.call(t,t);},className:M(s==null?void 0:s.closeButton,(Bt=t==null?void 0:t.classNames)==null?void 0:Bt.closeButton)},(Ct=P==null?void 0:P.close)!=null?Ct:Ot):null,t.jsx||o.isValidElement(t.title)?t.jsx?t.jsx:typeof t.title=="function"?t.title():t.title:o.createElement(o.Fragment,null,N||t.icon||t.promise?o.createElement("div",{"data-icon":"",className:M(s==null?void 0:s.icon,(kt=t==null?void 0:t.classNames)==null?void 0:kt.icon)},t.promise||t.type==="loading"&&!t.icon?t.icon||Zt():null,t.type!=="loading"?t.icon||(P==null?void 0:P[N])||jt(N):null):null,o.createElement("div",{"data-content":"",className:M(s==null?void 0:s.content,(It=t==null?void 0:t.classNames)==null?void 0:It.content)},o.createElement("div",{"data-title":"",className:M(s==null?void 0:s.title,(Mt=t==null?void 0:t.classNames)==null?void 0:Mt.title)},typeof t.title=="function"?t.title():t.title),t.description?o.createElement("div",{"data-description":"",className:M(at,Xt,s==null?void 0:s.description,(Ht=t==null?void 0:t.classNames)==null?void 0:Ht.description)},typeof t.description=="function"?t.description():t.description):null),o.isValidElement(t.cancel)?t.cancel:t.cancel&&tt(t.cancel)?o.createElement("button",{"data-button":true,"data-cancel":true,style:t.cancelButtonStyle||ft,onClick:r=>{var m,c;tt(t.cancel)&&V&&((c=(m=t.cancel).onClick)==null||c.call(m,r),$());},className:M(s==null?void 0:s.cancelButton,(At=t==null?void 0:t.classNames)==null?void 0:At.cancelButton)},t.cancel.label):null,o.isValidElement(t.action)?t.action:t.action&&tt(t.action)?o.createElement("button",{"data-button":true,"data-action":true,style:t.actionButtonStyle||l,onClick:r=>{var m,c;tt(t.action)&&((c=(m=t.action).onClick)==null||c.call(m,r),!r.defaultPrevented&&$());},className:M(s==null?void 0:s.actionButton,(Lt=t==null?void 0:t.classNames)==null?void 0:Lt.actionButton)},t.action.label):null))};function _t(){if(typeof window=="undefined"||typeof document=="undefined")return "ltr";let n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function Te(n,e){let t={};return [n,e].forEach((a,u)=>{let f=u===1,w=f?"--mobile-offset":"--offset",S=f?ge:me;function g(i){["top","right","bottom","left"].forEach(D=>{t[`${w}-${D}`]=typeof i=="number"?`${i}px`:i;});}typeof a=="number"||typeof a=="string"?g(a):typeof a=="object"?["top","right","bottom","left"].forEach(i=>{a[i]===void 0?t[`${w}-${i}`]=S:t[`${w}-${i}`]=typeof a[i]=="number"?`${a[i]}px`:a[i];}):g(S);}),t}var $e=o.forwardRef(function(e,t){let{invert:a,position:u="bottom-right",hotkey:f=["altKey","KeyT"],expand:w,closeButton:S,className:g,offset:i,mobileOffset:D,theme:T="light",richColors:F,duration:et,style:ut,visibleToasts:ft=pe,toastOptions:l,dir:ot=_t(),gap:at=be,loadingIcon:X,icons:st,containerAriaLabel:pt="Notifications",pauseWhenPageIsHidden:rt}=e,[B,s]=o.useState([]),P=o.useMemo(()=>Array.from(new Set([u].concat(B.filter(d=>d.position).map(d=>d.position)))),[B,u]),[nt,it]=o.useState([]),[Y,C]=o.useState(false),[lt,J]=o.useState(false),[W,H]=o.useState(T!=="system"?T:typeof window!="undefined"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),A=o.useRef(null),mt=f.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=o.useRef(null),z=o.useRef(false),ct=o.useCallback(d=>{s(h=>{var y;return (y=h.find(R=>R.id===d.id))!=null&&y.delete||v.dismiss(d.id),h.filter(({id:R})=>R!==d.id)});},[]);return o.useEffect(()=>v.subscribe(d=>{if(d.dismiss){s(h=>h.map(y=>y.id===d.id?{...y,delete:true}:y));return}setTimeout(()=>{vt.flushSync(()=>{s(h=>{let y=h.findIndex(R=>R.id===d.id);return y!==-1?[...h.slice(0,y),{...h[y],...d},...h.slice(y+1)]:[d,...h]});});});}),[]),o.useEffect(()=>{if(T!=="system"){H(T);return}if(T==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window=="undefined")return;let d=window.matchMedia("(prefers-color-scheme: dark)");try{d.addEventListener("change",({matches:h})=>{H(h?"dark":"light");});}catch(h){d.addListener(({matches:y})=>{try{H(y?"dark":"light");}catch(R){console.error(R);}});}},[T]),o.useEffect(()=>{B.length<=1&&C(false);},[B]),o.useEffect(()=>{let d=h=>{var R,j;f.every(p=>h[p]||h.code===p)&&(C(true),(R=A.current)==null||R.focus()),h.code==="Escape"&&(document.activeElement===A.current||(j=A.current)!=null&&j.contains(document.activeElement))&&C(false);};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[f]),o.useEffect(()=>{if(A.current)return ()=>{L.current&&(L.current.focus({preventScroll:true}),L.current=null,z.current=false);}},[A.current]),o.createElement("section",{ref:t,"aria-label":`${pt} ${mt}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:true},P.map((d,h)=>{var j;let[y,R]=d.split("-");return B.length?o.createElement("ol",{key:d,dir:ot==="auto"?_t():ot,tabIndex:-1,ref:A,className:g,"data-sonner-toaster":true,"data-theme":W,"data-y-position":y,"data-lifted":Y&&B.length>1&&!w,"data-x-position":R,style:{"--front-toast-height":`${((j=nt[0])==null?void 0:j.height)||0}px`,"--width":`${he}px`,"--gap":`${at}px`,...ut,...Te(i,D)},onBlur:p=>{z.current&&!p.currentTarget.contains(p.relatedTarget)&&(z.current=false,L.current&&(L.current.focus({preventScroll:true}),L.current=null));},onFocus:p=>{p.target instanceof HTMLElement&&p.target.dataset.dismissible==="false"||z.current||(z.current=true,L.current=p.relatedTarget);},onMouseEnter:()=>C(true),onMouseMove:()=>C(true),onMouseLeave:()=>{lt||C(false);},onDragEnd:()=>C(false),onPointerDown:p=>{p.target instanceof HTMLElement&&p.target.dataset.dismissible==="false"||J(true);},onPointerUp:()=>J(false)},B.filter(p=>!p.position&&h===0||p.position===d).map((p,_)=>{var O,G;return o.createElement(ve,{key:p.id,icons:st,index:_,toast:p,defaultRichColors:F,duration:(O=l==null?void 0:l.duration)!=null?O:et,className:l==null?void 0:l.className,descriptionClassName:l==null?void 0:l.descriptionClassName,invert:a,visibleToasts:ft,closeButton:(G=l==null?void 0:l.closeButton)!=null?G:S,interacting:lt,position:d,style:l==null?void 0:l.style,unstyled:l==null?void 0:l.unstyled,classNames:l==null?void 0:l.classNames,cancelButtonStyle:l==null?void 0:l.cancelButtonStyle,actionButtonStyle:l==null?void 0:l.actionButtonStyle,removeToast:ct,toasts:B.filter(k=>k.position==p.position),heights:nt.filter(k=>k.position==p.position),setHeights:it,expandByDefault:w,gap:at,loadingIcon:X,expanded:Y,pauseWhenPageIsHidden:rt,swipeDirections:e.swipeDirections})})):null}))});
|
|
285
|
+
|
|
286
|
+
const Form = ({ title, buttonLabel, formNote, handleSubmit, children, isSubmitting }) => {
|
|
287
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx($e, { richColors: true }), jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: styles$a.form, children: [jsxRuntime.jsx("h3", { className: styles$a.form__title, children: title }), children, isSubmitting ?
|
|
288
|
+
jsxRuntime.jsx(Button2, { label: "Envoi en cours...", size: 'full' })
|
|
289
|
+
:
|
|
290
|
+
jsxRuntime.jsx(Button2, { icon: Send, label: buttonLabel, size: 'full' }), jsxRuntime.jsx("p", { className: styles$a.form__note, children: formNote })] })] }));
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
const FormInput = ({ name, label = "", type, rows = 1, value, required = false, placeholder, handleChange }) => {
|
|
294
|
+
label = label === "" ? name : label;
|
|
295
|
+
const tag = type === "textarea" ?
|
|
296
|
+
jsxRuntime.jsx("textarea", { id: name, name: name, required: true, rows: rows, value: value, onChange: handleChange, placeholder: placeholder, className: styles$a.form__textarea })
|
|
297
|
+
:
|
|
298
|
+
jsxRuntime.jsx("input", { id: name, name: name, type: type, required: required, value: value, onChange: handleChange, placeholder: placeholder, className: styles$a.form__input });
|
|
299
|
+
return (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("label", { htmlFor: name, className: styles$a.form__label, children: [label, " ", required && "*"] }), tag] }));
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
const FormRow = ({ children }) => {
|
|
303
|
+
const nbChildren = o.Children.count(children);
|
|
304
|
+
const classNameForRow = nbChildren == 1 ? styles$a.form__group : styles$a.form__row;
|
|
305
|
+
return (jsxRuntime.jsx("div", { className: classNameForRow, children: children }));
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
var styles$9 = {"horizontalMenu":"horizontal-menu-module_horizontalMenu__x03o-","horizontalMenu__container":"horizontal-menu-module_horizontalMenu__container__521HT","horizontalMenu__inner":"horizontal-menu-module_horizontalMenu__inner__aSi7U","horizontalMenu__logo":"horizontal-menu-module_horizontalMenu__logo__M-cdQ","horizontalMenu__menu":"horizontal-menu-module_horizontalMenu__menu__Ukh9l","horizontalMenu__list":"horizontal-menu-module_horizontalMenu__list__Ruv5a","horizontalMenu__link":"horizontal-menu-module_horizontalMenu__link__i4oo0","horizontalMenu__cta":"horizontal-menu-module_horizontalMenu__cta__wUg9c","horizontalMenu__mobile_toggle":"horizontal-menu-module_horizontalMenu__mobile_toggle__7yXTb","horizontalMenu__mobile_menu":"horizontal-menu-module_horizontalMenu__mobile_menu__4yPqs","horizontalMenu__mobile_content":"horizontal-menu-module_horizontalMenu__mobile_content__ZX1rh","horizontalMenu__mobile_link":"horizontal-menu-module_horizontalMenu__mobile_link__Y1eSt","horizontalMenu__mobile_cta":"horizontal-menu-module_horizontalMenu__mobile_cta__CWYI4"};
|
|
309
|
+
|
|
310
|
+
const HorizontalMenu = ({ logo, items, cta }) => {
|
|
311
|
+
const [isMenuOpen, setIsMenuOpen] = o.useState(false);
|
|
312
|
+
return (jsxRuntime.jsx("nav", { className: styles$9.horizontalMenu, children: jsxRuntime.jsxs("div", { className: styles$9.horizontalMenu__container, children: [jsxRuntime.jsxs("div", { className: styles$9.horizontalMenu__inner, children: [logo &&
|
|
313
|
+
jsxRuntime.jsx("a", { href: "#", className: styles$9.horizontalMenu__logo, children: jsxRuntime.jsx("img", { src: logo.src, alt: logo.alt }) }), jsxRuntime.jsx("div", { className: styles$9.horizontalMenu__menu, children: jsxRuntime.jsx("div", { className: styles$9.horizontalMenu__list, children: items.map((item) => (jsxRuntime.jsx("a", { href: item.href, className: styles$9.horizontalMenu__link, children: item.label }, item.label))) }) }), jsxRuntime.jsx("div", { className: styles$9.horizontalMenu__cta, children: jsxRuntime.jsx(Button2, { label: cta.label, onClick: cta.action }) }), jsxRuntime.jsx("div", { className: styles$9.horizontalMenu__mobile_toggle, children: jsxRuntime.jsx(Button2, { style: "ghost", onClick: () => setIsMenuOpen(!isMenuOpen), children: isMenuOpen ? jsxRuntime.jsx(X, { style: { width: '1.5rem', height: '1.5rem' } }) : jsxRuntime.jsx(Menu, { style: { width: '1.5rem', height: '1.5rem' } }) }) })] }), isMenuOpen && (jsxRuntime.jsx("div", { className: styles$9.horizontalMenu__mobile_menu, children: jsxRuntime.jsxs("div", { className: styles$9.horizontalMenu__mobile_content, children: [items.map((item) => (jsxRuntime.jsx("a", { href: item.href, className: styles$9.horizontalMenu__mobile_link, onClick: () => setIsMenuOpen(false), children: item.label }, item.label))), jsxRuntime.jsx("div", { className: styles$9.horizontalMenu__mobile_cta, children: jsxRuntime.jsx(Button2, { label: cta.label, onClick: () => {
|
|
314
|
+
cta.action();
|
|
315
|
+
setIsMenuOpen(false);
|
|
316
|
+
}, size: "full" }) })] }) }))] }) }));
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
var styles$8 = {"horizontalPoints__container":"horizontal-points-module_horizontalPoints__container__mRGx9","horizontalPoints__item":"horizontal-points-module_horizontalPoints__item__xnRLO"};
|
|
320
|
+
|
|
321
|
+
const HorizontalPoints = ({ items }) => {
|
|
322
|
+
return (jsxRuntime.jsx("div", { className: styles$8.horizontalPoints__container, children: items.map((e, key) => (jsxRuntime.jsxs("div", { className: styles$8.horizontalPoints__item, children: [jsxRuntime.jsx(CircleCheckBig, {}), jsxRuntime.jsx("span", { children: e })] }, key))) }));
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
var styles$7 = {"sectionHeader__accent":"section-header-module_sectionHeader__accent__J5jS2","sectionHeader__header":"section-header-module_sectionHeader__header__-C-iq","sectionHeader__label":"section-header-module_sectionHeader__label__BTcOk","sectionHeader__title":"section-header-module_sectionHeader__title__yIGuX","sectionHeader__title_dark":"section-header-module_sectionHeader__title_dark__MnI6m","sectionHeader__subtitle":"section-header-module_sectionHeader__subtitle__5Gk0W","sectionHeader__subtitle_dark":"section-header-module_sectionHeader__subtitle_dark__L3Rmq"};
|
|
326
|
+
|
|
327
|
+
const SectionHeader = ({ label, title, titleAccent, subtitle, dark = false }) => {
|
|
328
|
+
const title_class = dark ? styles$7.sectionHeader__title_dark : styles$7.sectionHeader__title;
|
|
329
|
+
const subtitle_class = dark ? styles$7.sectionHeader__subtitle_dark : styles$7.sectionHeader__subtitle;
|
|
330
|
+
return (jsxRuntime.jsxs("div", { className: styles$7.sectionHeader__header, children: [label && jsxRuntime.jsx("span", { className: styles$7.sectionHeader__label, children: label }), jsxRuntime.jsxs("h2", { className: title_class, children: [title, titleAccent && jsxRuntime.jsxs("span", { className: styles$7.sectionHeader__accent, children: [' ', titleAccent] })] }), subtitle && jsxRuntime.jsx("p", { className: subtitle_class, children: subtitle })] }));
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
var styles$6 = {"VerticalPoints__list":"vertical-points-module_VerticalPoints__list__XyG8H","VerticalPoints__item":"vertical-points-module_VerticalPoints__item__wqR9S","VerticalPoints__item__icon":"vertical-points-module_VerticalPoints__item__icon__5TeEx","VerticalPoints__item__text":"vertical-points-module_VerticalPoints__item__text__JtmBY"};
|
|
334
|
+
|
|
335
|
+
const VerticalPoints = ({ items }) => {
|
|
336
|
+
return (jsxRuntime.jsx("div", { className: styles$6.VerticalPoints__list, children: items.map((method, index) => (jsxRuntime.jsxs("div", { className: styles$6.VerticalPoints__item, children: [jsxRuntime.jsx("div", { className: styles$6.VerticalPoints__item__iconWrapper, children: jsxRuntime.jsx(Check, { className: styles$6.VerticalPoints__item__icon }) }), jsxRuntime.jsx("span", { className: styles$6.VerticalPoints__item__text, children: method })] }, index))) }));
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
var styles$5 = {"Footer":"footer-module_Footer__XR7K6","Footer__container":"footer-module_Footer__container__Qb6Dz","Footer__inner":"footer-module_Footer__inner__C-LiY","Footer__copyright":"footer-module_Footer__copyright__sxcuX","Footer__links":"footer-module_Footer__links__woqmE","Footer__link":"footer-module_Footer__link__6nO-8"};
|
|
340
|
+
|
|
341
|
+
const Footer = ({ items }) => {
|
|
342
|
+
return (jsxRuntime.jsx("footer", { className: styles$5.Footer, children: jsxRuntime.jsx("div", { className: styles$5.Footer__container, children: jsxRuntime.jsxs("div", { className: styles$5.Footer__inner, children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("p", { className: styles$5.Footer__copyright, children: ["\u00A9 ", new Date().getFullYear(), " JOZA IT Consulting. Tous droits r\u00E9serv\u00E9s."] }) }), jsxRuntime.jsx("div", { className: styles$5.Footer__links, children: items.map((link, index) => (jsxRuntime.jsx("a", { href: link.href, className: styles$5.Footer__link, children: link.label }, index))) })] }) }) }));
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
var styles$4 = {"glowingBack":"glowing-back-module_glowingBack__AuWzo","glowingBack__visualGlow":"glowing-back-module_glowingBack__visualGlow__c31iq"};
|
|
346
|
+
|
|
347
|
+
const GlowingBack = ({ children }) => {
|
|
348
|
+
return (jsxRuntime.jsxs("div", { className: styles$4.glowingBack, children: [jsxRuntime.jsx("div", { className: styles$4.glowingBack__visualGlow }), jsxRuntime.jsx(jsxRuntime.Fragment, { children: children })] }));
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
var styles$3 = {"infoCard__inner":"info-card-module_infoCard__inner__CWbnI","infoCard__inner__dark":"info-card-module_infoCard__inner__dark__bc1ew","infoCard__inner__light":"info-card-module_infoCard__inner__light__q6ezf","infoCard__inner__center":"info-card-module_infoCard__inner__center__Mkbzn","infoCard__inner__left":"info-card-module_infoCard__inner__left__2BO3V","infoCard__inner__hovered":"info-card-module_infoCard__inner__hovered__3V04D","infoCard__content":"info-card-module_infoCard__content__7HgEC","infoCard__iconWrapper":"info-card-module_infoCard__iconWrapper__KfDaN","infoCard__iconWrapper__center":"info-card-module_infoCard__iconWrapper__center__orgqz","infoCard__iconWrapper__left":"info-card-module_infoCard__iconWrapper__left__RUL50","infoCard__iconWrapper__active":"info-card-module_infoCard__iconWrapper__active__ZYMOs","infoCard__icon":"info-card-module_infoCard__icon__v3033","infoCard__icon__active":"info-card-module_infoCard__icon__active__XrQMq","infoCard__title":"info-card-module_infoCard__title__3mh0a","infoCard__title__dark":"info-card-module_infoCard__title__dark__SZo7R","infoCard__title__light":"info-card-module_infoCard__title__light__CrIC-","infoCard__description":"info-card-module_infoCard__description__NKKf6","infoCard__description__dark":"info-card-module_infoCard__description__dark__Z2lZS","infoCard__description__light":"info-card-module_infoCard__description__light__Y6m8f","infoCard__features":"info-card-module_infoCard__features__GsVGo","infoCard__features__visible":"info-card-module_infoCard__features__visible__OCot1","infoCard__feature":"info-card-module_infoCard__feature__VWyue","infoCard__feature__dot":"info-card-module_infoCard__feature__dot__WUY-8","infoCard__cta":"info-card-module_infoCard__cta__kztwR"};
|
|
352
|
+
|
|
353
|
+
const InfoCard = ({ dark = false, align = "left", title, description, active = false, features = [], icon: Icon, link = "", onMouveEnter, onMouseLeave }) => {
|
|
354
|
+
return (jsxRuntime.jsx("div", { className: styles$3.infoCard, onMouseEnter: onMouveEnter, onMouseLeave: onMouseLeave, children: jsxRuntime.jsx("div", { className: clsx(styles$3.infoCard__inner, align === "center" && styles$3.infoCard__inner__center, align === "left" && styles$3.infoCard__inner__left, dark ? styles$3.infoCard__inner__dark : styles$3.infoCard__inner__light, active && styles$3.infoCard__inner__hovered), children: jsxRuntime.jsxs("div", { className: styles$3.infoCard__content, children: [Icon &&
|
|
355
|
+
jsxRuntime.jsx("div", { className: clsx(styles$3.infoCard__iconWrapper, align === "center" && styles$3.infoCard__iconWrapper__center, align === "left" && styles$3.infoCard__iconWrapper__left, active && styles$3.infoCard__iconWrapper__active), children: jsxRuntime.jsx(Icon, { className: clsx(styles$3.infoCard__icon, active && styles$3.infoCard__icon__active) }) }), jsxRuntime.jsx("h3", { className: clsx(styles$3.infoCard__title, dark ? styles$3.infoCard__title__dark : styles$3.infoCard__title__light), children: title }), jsxRuntime.jsx("p", { className: clsx(styles$3.infoCard__description, dark ? styles$3.infoCard__description__dark : styles$3.infoCard__description__light), children: description }), jsxRuntime.jsx("div", { className: clsx(styles$3.infoCard__features, active && styles$3.infoCard__features__visible), children: features.map((feature, idx) => (jsxRuntime.jsxs("div", { className: styles$3.infoCard__feature, children: [jsxRuntime.jsx("div", { className: styles$3.infoCard__feature__dot }), jsxRuntime.jsx("span", { children: feature })] }, idx))) }), link && (jsxRuntime.jsxs("div", { className: styles$3.infoCard__cta, children: [jsxRuntime.jsx("span", { children: "D\u00E9couvrir" }), jsxRuntime.jsx(ArrowRight, { style: { width: '1rem', height: '1rem' } })] }))] }) }) }, title));
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
const InfoCardGroup = ({ children }) => {
|
|
359
|
+
const items = o__namespace.Children.toArray(children).filter(o__namespace.isValidElement);
|
|
360
|
+
const [hoveredIndex, setHoveredIndex] = o.useState(null);
|
|
361
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: items.map((infoCard, index) => o__namespace.cloneElement(infoCard, {
|
|
362
|
+
active: hoveredIndex === index,
|
|
363
|
+
onMouseLeave: () => setHoveredIndex(null),
|
|
364
|
+
onMouveEnter: () => setHoveredIndex(index)
|
|
365
|
+
})) }));
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
var styles$2 = {"responsiveGrid":"responsive-grid-module_responsiveGrid__Eob9k"};
|
|
369
|
+
|
|
370
|
+
const ResponsiveGrid = ({ repeatMd = 2, repeatLg = 4, children }) => {
|
|
371
|
+
return (jsxRuntime.jsx("div", { className: styles$2.responsiveGrid, style: {
|
|
372
|
+
["--rMd"]: `${repeatMd}`,
|
|
373
|
+
["--rLg"]: `${repeatLg}`,
|
|
374
|
+
}, children: children }));
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
var styles$1 = {"Section":"section-module_Section__IXlZS","Section__container":"section-module_Section__container__vUsMf","Section__dark":"section-module_Section__dark__hqW7M","Section__background_img":"section-module_Section__background_img__xw460","Section__on_background":"section-module_Section__on_background__eNN7K","Section__on_background__content":"section-module_Section__on_background__content__SOUjH","Section__overlay":"section-module_Section__overlay__saPtp"};
|
|
378
|
+
|
|
379
|
+
const Section = ({ id, dark = false, backgroundImg, children }) => {
|
|
380
|
+
const darkCss = dark ? `${styles$1.Section__dark}` : "";
|
|
381
|
+
const onBackgroundCss = backgroundImg ? `${styles$1.Section__on_background}` : "";
|
|
382
|
+
const onBackgroundContentCss = backgroundImg ? `${styles$1.Section__on_background__content}` : "";
|
|
383
|
+
return (jsxRuntime.jsxs("section", { id: id, className: `${darkCss} ${styles$1.Section} ${onBackgroundCss}`, children: [backgroundImg &&
|
|
384
|
+
(jsxRuntime.jsxs("div", { className: styles$1.Section__background_img, children: [jsxRuntime.jsx("img", { src: backgroundImg }), jsxRuntime.jsx("div", { className: styles$1.Section__overlay }), jsxRuntime.jsx("div", { className: styles$1.Section__accentGlow })] })), jsxRuntime.jsx("div", { className: styles$1.Section__container + " " + onBackgroundContentCss, children: children })] }));
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
var styles = {"TwoColumns__grid":"two-columns-module_TwoColumns__grid__qsens"};
|
|
388
|
+
|
|
389
|
+
const TwoColumns = ({ leftColumn, rightColumn, leftSize = 1, rightSize = 1 }) => {
|
|
390
|
+
return (jsxRuntime.jsxs("div", { className: styles.TwoColumns__grid, style: {
|
|
391
|
+
["--left"]: `${leftSize}fr`,
|
|
392
|
+
["--right"]: `${rightSize}fr`,
|
|
393
|
+
}, children: [jsxRuntime.jsx("div", { children: leftColumn }), jsxRuntime.jsx("div", { children: rightColumn })] }));
|
|
56
394
|
};
|
|
57
395
|
|
|
58
396
|
exports.AnimatedStat = AnimatedStat;
|
|
59
397
|
exports.Button2 = Button2;
|
|
398
|
+
exports.Carousel = Carousel;
|
|
399
|
+
exports.Footer = Footer;
|
|
400
|
+
exports.Form = Form;
|
|
401
|
+
exports.FormInput = FormInput;
|
|
402
|
+
exports.FormRow = FormRow;
|
|
403
|
+
exports.GlowingBack = GlowingBack;
|
|
404
|
+
exports.HorizontalMenu = HorizontalMenu;
|
|
405
|
+
exports.HorizontalPoints = HorizontalPoints;
|
|
406
|
+
exports.InfoCard = InfoCard;
|
|
407
|
+
exports.InfoCardGroup = InfoCardGroup;
|
|
408
|
+
exports.ResponsiveGrip = ResponsiveGrid;
|
|
409
|
+
exports.Section = Section;
|
|
410
|
+
exports.SectionHeader = SectionHeader;
|
|
411
|
+
exports.TwoColumns = TwoColumns;
|
|
412
|
+
exports.VerticalPoints = VerticalPoints;
|
|
60
413
|
//# sourceMappingURL=joza-ui-kit.cjs.map
|