elseware-ui 2.30.0 → 2.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1688 -501
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +133 -60
- package/dist/index.d.ts +133 -60
- package/dist/index.js +741 -377
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +736 -377
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var tailwindMerge = require('tailwind-merge');
|
|
4
|
+
var React4 = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
6
|
var bs = require('react-icons/bs');
|
|
5
7
|
var fa = require('react-icons/fa');
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
8
|
var reactChartjs2 = require('react-chartjs-2');
|
|
8
9
|
var chart_js = require('chart.js');
|
|
9
|
-
var React4 = require('react');
|
|
10
10
|
var react = require('@headlessui/react');
|
|
11
|
-
var
|
|
11
|
+
var classNames16 = require('classnames');
|
|
12
12
|
var fa6 = require('react-icons/fa6');
|
|
13
13
|
var ReactWorldFlags = require('react-world-flags');
|
|
14
14
|
var emojiFlags = require('emoji-flags');
|
|
@@ -46,7 +46,7 @@ function _interopNamespace(e) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
var React4__default = /*#__PURE__*/_interopDefault(React4);
|
|
49
|
-
var
|
|
49
|
+
var classNames16__default = /*#__PURE__*/_interopDefault(classNames16);
|
|
50
50
|
var ReactWorldFlags__default = /*#__PURE__*/_interopDefault(ReactWorldFlags);
|
|
51
51
|
var emojiFlags__default = /*#__PURE__*/_interopDefault(emojiFlags);
|
|
52
52
|
var d3__namespace = /*#__PURE__*/_interopNamespace(d3);
|
|
@@ -188,27 +188,80 @@ var isMatch = (itemPath, currentPath) => {
|
|
|
188
188
|
if (item !== "/" && current.startsWith(item + "/")) return true;
|
|
189
189
|
return false;
|
|
190
190
|
};
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
191
|
+
|
|
192
|
+
// src/utils/styles.ts
|
|
193
|
+
function resolveAppearanceStyles({
|
|
194
|
+
appearance = "solid",
|
|
195
|
+
variant = "default",
|
|
196
|
+
solid,
|
|
197
|
+
lite,
|
|
198
|
+
ghost
|
|
199
|
+
}) {
|
|
200
|
+
switch (appearance) {
|
|
201
|
+
case "ghost":
|
|
202
|
+
return ghost[variant];
|
|
203
|
+
case "lite":
|
|
204
|
+
return lite[variant];
|
|
205
|
+
default:
|
|
206
|
+
return solid[variant];
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
var EUIContext = React4.createContext(null);
|
|
210
|
+
var EUIProvider = ({
|
|
211
|
+
config,
|
|
212
|
+
children
|
|
213
|
+
}) => {
|
|
214
|
+
const [state, setState] = React4.useState(config);
|
|
215
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EUIContext.Provider, { value: { config: state, setConfig: setState }, children });
|
|
216
|
+
};
|
|
217
|
+
var useEUIConfig = () => {
|
|
218
|
+
const ctx = React4.useContext(EUIContext);
|
|
219
|
+
if (!ctx) {
|
|
220
|
+
throw new Error("useEUIConfig must be used inside EUIProvider");
|
|
221
|
+
}
|
|
222
|
+
return ctx;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
// src/components/eui/resolveGlobalConfigs.tsx
|
|
226
|
+
function resolveWithGlobal(config, props, defaults) {
|
|
227
|
+
return {
|
|
228
|
+
...defaults,
|
|
229
|
+
...config?.global ?? {},
|
|
230
|
+
...props
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
var variantsSolid = {
|
|
234
|
+
default: "bg-gray-300 text-gray-900 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",
|
|
235
|
+
primary: "bg-gradient-to-r from-eui-primary-500 to-eui-primary-600 text-white hover:brightness-110",
|
|
236
|
+
secondary: "bg-gradient-to-r from-eui-secondary-600 to-eui-secondary-500 text-white hover:brightness-110",
|
|
237
|
+
success: "bg-gradient-to-r from-eui-success-600 to-eui-success-500 text-white hover:brightness-110",
|
|
238
|
+
danger: "bg-gradient-to-r from-eui-danger-600 to-eui-danger-500 text-white hover:brightness-110",
|
|
239
|
+
warning: "bg-gradient-to-r from-eui-warning-500 to-eui-warning-400 text-black hover:brightness-105",
|
|
240
|
+
info: "bg-gradient-to-r from-eui-info-600 to-eui-info-500 text-white hover:brightness-110",
|
|
241
|
+
light: "bg-gradient-to-r from-eui-light-400 to-eui-light-300 text-gray-900 hover:brightness-105 dark:from-gray-200 dark:to-gray-100 dark:text-gray-900",
|
|
242
|
+
dark: "bg-gradient-to-r from-eui-dark-400 to-eui-dark-500 text-white hover:brightness-110 dark:from-eui-dark-300 dark:to-eui-dark-400"
|
|
201
243
|
};
|
|
202
244
|
var variantsLite = {
|
|
203
|
-
default: "bg-gray-
|
|
204
|
-
primary: "bg-eui-primary-
|
|
205
|
-
secondary: "bg-eui-secondary-
|
|
206
|
-
success: "bg-eui-success-
|
|
207
|
-
danger: "bg-
|
|
208
|
-
warning: "bg-
|
|
209
|
-
info: "bg-eui-info-
|
|
210
|
-
light: "bg-
|
|
211
|
-
dark: "bg-eui-dark-
|
|
245
|
+
default: "bg-gray-500/10 border border-gray-300 text-gray-700 dark:bg-gray-400/10 dark:border-gray-700 dark:text-gray-200",
|
|
246
|
+
primary: "bg-eui-primary-500/10 border border-eui-primary-500/30 text-eui-primary-400 dark:text-eui-primary-300",
|
|
247
|
+
secondary: "bg-eui-secondary-500/10 border border-eui-secondary-500/30 text-eui-secondary-500 dark:text-eui-secondary-400",
|
|
248
|
+
success: "bg-eui-success-500/10 border border-eui-success-500/30 text-eui-success-500 dark:text-eui-success-400",
|
|
249
|
+
danger: "bg-eui-danger-500/10 border border-eui-danger-500/30 text-eui-danger-500 dark:text-eui-danger-400",
|
|
250
|
+
warning: "bg-eui-warning-500/10 border border-eui-warning-500/30 text-eui-warning-600 dark:text-eui-warning-400",
|
|
251
|
+
info: "bg-eui-info-500/10 border border-eui-info-500/30 text-eui-info-500 dark:text-eui-info-400",
|
|
252
|
+
light: "bg-white/40 border border-white/30 text-gray-800 dark:bg-white/10 dark:border-white/10 dark:text-gray-100",
|
|
253
|
+
dark: "bg-eui-dark-500/10 border border-eui-dark-500/30 text-eui-dark-500 dark:text-eui-dark-300"
|
|
254
|
+
};
|
|
255
|
+
var variantsGhost = {
|
|
256
|
+
default: "bg-transparent border border-gray-300 text-gray-700 hover:bg-gray-100 dark:border-gray-700 dark:text-gray-200 dark:hover:bg-gray-800",
|
|
257
|
+
primary: "bg-transparent border border-eui-primary-500 text-eui-primary-500 hover:bg-eui-primary-500/10 dark:text-eui-primary-300 dark:border-eui-primary-400",
|
|
258
|
+
secondary: "bg-transparent border border-eui-secondary-500 text-eui-secondary-500 hover:bg-eui-secondary-500/10 dark:text-eui-secondary-400 dark:border-eui-secondary-400",
|
|
259
|
+
success: "bg-transparent border border-eui-success-500 text-eui-success-500 hover:bg-eui-success-500/10 dark:text-eui-success-400 dark:border-eui-success-400",
|
|
260
|
+
danger: "bg-transparent border border-eui-danger-500 text-eui-danger-500 hover:bg-eui-danger-500/10 dark:text-eui-danger-400 dark:border-eui-danger-400",
|
|
261
|
+
warning: "bg-transparent border border-eui-warning-500 text-eui-warning-600 hover:bg-eui-warning-500/10 dark:text-eui-warning-400 dark:border-eui-warning-400",
|
|
262
|
+
info: "bg-transparent border border-eui-info-500 text-eui-info-500 hover:bg-eui-info-500/10 dark:text-eui-info-400 dark:border-eui-info-400",
|
|
263
|
+
light: "bg-transparent border border-gray-300 text-gray-700 hover:bg-white/10 dark:border-gray-500 dark:text-gray-100 dark:hover:bg-white/5",
|
|
264
|
+
dark: "bg-transparent border border-eui-dark-500 text-eui-dark-500 hover:bg-eui-dark-500/10 dark:text-eui-dark-300 dark:border-eui-dark-300"
|
|
212
265
|
};
|
|
213
266
|
var textVariants = {
|
|
214
267
|
default: "eui-text-md",
|
|
@@ -221,28 +274,6 @@ var textVariants = {
|
|
|
221
274
|
light: "text-gray-300",
|
|
222
275
|
dark: "text-gray-900"
|
|
223
276
|
};
|
|
224
|
-
var variantsGhost = {
|
|
225
|
-
default: "bg-transparent border border-gray-300 text-gray-800 hover:bg-gray-100",
|
|
226
|
-
primary: "bg-transparent border border-eui-primary-500 text-eui-primary-500",
|
|
227
|
-
secondary: "bg-transparent border border-eui-secondary-500 text-eui-secondary-500",
|
|
228
|
-
success: "bg-transparent border border-eui-success-500 text-eui-success-500",
|
|
229
|
-
danger: "bg-transparent border border-eui-danger-500 text-eui-danger-500",
|
|
230
|
-
warning: "bg-transparent border border-eui-warning-500 text-eui-warning-500",
|
|
231
|
-
info: "bg-transparent border border-eui-info-500 text-eui-info-500",
|
|
232
|
-
light: "bg-transparent border border-eui-light-500 text-eui-light-500",
|
|
233
|
-
dark: "bg-transparent border border-eui-dark-500 text-eui-dark-500"
|
|
234
|
-
};
|
|
235
|
-
var borderVariants = {
|
|
236
|
-
default: "border-gray-300",
|
|
237
|
-
primary: "border-eui-primary-500",
|
|
238
|
-
secondary: "border-eui-secondary-500",
|
|
239
|
-
success: "border-eui-success-500",
|
|
240
|
-
danger: "border-eui-danger-500",
|
|
241
|
-
warning: "border-eui-warning-500",
|
|
242
|
-
info: "border-eui-info-500",
|
|
243
|
-
light: "border-eui-light-500",
|
|
244
|
-
dark: "border-eui-dark-500"
|
|
245
|
-
};
|
|
246
277
|
var decorations = {
|
|
247
278
|
underline: "underline",
|
|
248
279
|
overline: "overline",
|
|
@@ -366,18 +397,38 @@ var bulletTypes = {
|
|
|
366
397
|
number: null,
|
|
367
398
|
none: null
|
|
368
399
|
};
|
|
400
|
+
var checkboxVariants = {
|
|
401
|
+
default: "checked:bg-gray-600 checked:border-gray-600 dark:checked:bg-gray-500 dark:checked:border-gray-500",
|
|
402
|
+
primary: "checked:bg-eui-primary-600 checked:border-eui-primary-600 dark:checked:bg-eui-primary-500 dark:checked:border-eui-primary-500",
|
|
403
|
+
secondary: "checked:bg-eui-secondary-600 checked:border-eui-secondary-600 dark:checked:bg-eui-secondary-500 dark:checked:border-eui-secondary-500",
|
|
404
|
+
success: "checked:bg-eui-success-600 checked:border-eui-success-600 dark:checked:bg-eui-success-500 dark:checked:border-eui-success-500",
|
|
405
|
+
danger: "checked:bg-eui-danger-600 checked:border-eui-danger-600 dark:checked:bg-eui-danger-500 dark:checked:border-eui-danger-500",
|
|
406
|
+
warning: "checked:bg-eui-warning-500 checked:border-eui-warning-500 dark:checked:bg-eui-warning-400 dark:checked:border-eui-warning-400",
|
|
407
|
+
info: "checked:bg-eui-info-600 checked:border-eui-info-600 dark:checked:bg-eui-info-500 dark:checked:border-eui-info-500",
|
|
408
|
+
light: "checked:bg-eui-light-400 checked:border-eui-light-400 dark:checked:bg-gray-200 dark:checked:border-gray-200",
|
|
409
|
+
dark: "checked:bg-eui-dark-500 checked:border-eui-dark-500 dark:checked:bg-eui-dark-300 dark:checked:border-eui-dark-300"
|
|
410
|
+
};
|
|
369
411
|
var Avatar = ({
|
|
370
412
|
alt,
|
|
371
413
|
icon,
|
|
372
414
|
children = "B",
|
|
373
415
|
variant = "success",
|
|
374
|
-
|
|
416
|
+
appearance = "solid",
|
|
417
|
+
shape,
|
|
375
418
|
size = "md",
|
|
376
419
|
src,
|
|
377
|
-
borderVariant = false,
|
|
378
420
|
className,
|
|
379
421
|
...rest
|
|
380
422
|
}) => {
|
|
423
|
+
const eui = useEUIConfig();
|
|
424
|
+
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "circle";
|
|
425
|
+
const variantStyles = resolveAppearanceStyles({
|
|
426
|
+
appearance,
|
|
427
|
+
variant,
|
|
428
|
+
solid: variantsSolid,
|
|
429
|
+
lite: variantsLite,
|
|
430
|
+
ghost: variantsGhost
|
|
431
|
+
});
|
|
381
432
|
const content = src ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
382
433
|
"img",
|
|
383
434
|
{
|
|
@@ -391,10 +442,10 @@ var Avatar = ({
|
|
|
391
442
|
{
|
|
392
443
|
...rest,
|
|
393
444
|
className: cn(
|
|
394
|
-
"inline-flex items-center justify-center text-center overflow-hidden",
|
|
395
|
-
|
|
445
|
+
"inline-flex items-center justify-center text-center overflow-hidden transition-all duration-300 select-none",
|
|
446
|
+
variantStyles,
|
|
447
|
+
shapes[resolvedShape],
|
|
396
448
|
avatarSizes[size],
|
|
397
|
-
borderVariant ? ["border-2", borderVariants[variant]] : variants[variant],
|
|
398
449
|
className
|
|
399
450
|
),
|
|
400
451
|
children: content
|
|
@@ -407,6 +458,7 @@ var Badge = ({
|
|
|
407
458
|
dot,
|
|
408
459
|
count,
|
|
409
460
|
variant = "success",
|
|
461
|
+
appearance = "solid",
|
|
410
462
|
shape = "circle",
|
|
411
463
|
size = "md",
|
|
412
464
|
showZero = true,
|
|
@@ -423,14 +475,21 @@ var Badge = ({
|
|
|
423
475
|
if (position.includes("right")) offsetStyles.right = x;
|
|
424
476
|
}
|
|
425
477
|
const isVisible = dot || count !== void 0 && (count > 0 || showZero);
|
|
478
|
+
const variantStyles = resolveAppearanceStyles({
|
|
479
|
+
appearance,
|
|
480
|
+
variant,
|
|
481
|
+
solid: variantsSolid,
|
|
482
|
+
lite: variantsLite,
|
|
483
|
+
ghost: variantsGhost
|
|
484
|
+
});
|
|
426
485
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, className: "relative w-fit h-fit", children: [
|
|
427
486
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
428
487
|
"div",
|
|
429
488
|
{
|
|
430
489
|
className: cn(
|
|
431
|
-
"absolute inline-flex items-center justify-center text-center
|
|
490
|
+
"absolute inline-flex items-center justify-center text-center z-10 border border-white dark:border-neutral-900 transition-all duration-300",
|
|
432
491
|
badgePositions[position],
|
|
433
|
-
|
|
492
|
+
variantStyles,
|
|
434
493
|
shapes[shape],
|
|
435
494
|
badgeSizes[size],
|
|
436
495
|
!isVisible && "hidden",
|
|
@@ -554,21 +613,30 @@ var PieChart_default = PieChart;
|
|
|
554
613
|
var Chip = ({
|
|
555
614
|
label,
|
|
556
615
|
variant = "success",
|
|
557
|
-
|
|
558
|
-
|
|
616
|
+
appearance = "ghost",
|
|
617
|
+
shape,
|
|
559
618
|
size = "md",
|
|
560
619
|
className,
|
|
561
620
|
...rest
|
|
562
621
|
}) => {
|
|
622
|
+
const eui = useEUIConfig();
|
|
623
|
+
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "circle";
|
|
624
|
+
const variantStyles = resolveAppearanceStyles({
|
|
625
|
+
appearance,
|
|
626
|
+
variant,
|
|
627
|
+
solid: variantsSolid,
|
|
628
|
+
lite: variantsLite,
|
|
629
|
+
ghost: variantsGhost
|
|
630
|
+
});
|
|
563
631
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-fit h-fit", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
564
632
|
"div",
|
|
565
633
|
{
|
|
566
634
|
...rest,
|
|
567
635
|
className: cn(
|
|
568
|
-
"inline-flex items-center justify-center text-center text-xs font-semibold
|
|
569
|
-
shapes[
|
|
636
|
+
"inline-flex items-center justify-center text-center text-xs font-semibold transition-all duration-300",
|
|
637
|
+
shapes[resolvedShape],
|
|
570
638
|
chipSizes[size],
|
|
571
|
-
|
|
639
|
+
variantStyles,
|
|
572
640
|
className
|
|
573
641
|
),
|
|
574
642
|
children: label
|
|
@@ -687,30 +755,6 @@ function DataViewFooter({ children }) {
|
|
|
687
755
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between mt-6 pt-4 border-t border-gray-700/60", children });
|
|
688
756
|
}
|
|
689
757
|
var DataViewFooter_default = DataViewFooter;
|
|
690
|
-
var EUIContext = React4.createContext(null);
|
|
691
|
-
var EUIProvider = ({
|
|
692
|
-
config,
|
|
693
|
-
children
|
|
694
|
-
}) => {
|
|
695
|
-
const [state, setState] = React4.useState(config);
|
|
696
|
-
return /* @__PURE__ */ jsxRuntime.jsx(EUIContext.Provider, { value: { config: state, setConfig: setState }, children });
|
|
697
|
-
};
|
|
698
|
-
var useEUIConfig = () => {
|
|
699
|
-
const ctx = React4.useContext(EUIContext);
|
|
700
|
-
if (!ctx) {
|
|
701
|
-
throw new Error("useEUIConfig must be used inside EUIProvider");
|
|
702
|
-
}
|
|
703
|
-
return ctx;
|
|
704
|
-
};
|
|
705
|
-
|
|
706
|
-
// src/components/eui/resolveGlobalConfigs.tsx
|
|
707
|
-
function resolveWithGlobal(config, props, defaults) {
|
|
708
|
-
return {
|
|
709
|
-
...defaults,
|
|
710
|
-
...config?.global ?? {},
|
|
711
|
-
...props
|
|
712
|
-
};
|
|
713
|
-
}
|
|
714
758
|
function DataViewSearch({
|
|
715
759
|
placeholder = "Search...",
|
|
716
760
|
shape
|
|
@@ -767,7 +811,7 @@ function Accordion({
|
|
|
767
811
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
768
812
|
"div",
|
|
769
813
|
{
|
|
770
|
-
className:
|
|
814
|
+
className: classNames16__default.default({
|
|
771
815
|
"inline-flex gap-3 items-center px-3 py-2 w-full eui-gradient-to-r-general-xs": true,
|
|
772
816
|
"hover:cursor-pointer": toggleOnSummaryClick
|
|
773
817
|
}),
|
|
@@ -785,7 +829,7 @@ function Accordion({
|
|
|
785
829
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
786
830
|
fa6.FaCircleChevronDown,
|
|
787
831
|
{
|
|
788
|
-
className:
|
|
832
|
+
className: classNames16__default.default(
|
|
789
833
|
"text-xl transition-transform duration-300",
|
|
790
834
|
{ "rotate-180": collapse }
|
|
791
835
|
)
|
|
@@ -811,7 +855,7 @@ function Accordion({
|
|
|
811
855
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
812
856
|
"div",
|
|
813
857
|
{
|
|
814
|
-
className:
|
|
858
|
+
className: classNames16__default.default({
|
|
815
859
|
"border-t border-t-eui-dark-400/40 eui-text-sm": true,
|
|
816
860
|
"p-5": enableChildrenPadding
|
|
817
861
|
}),
|
|
@@ -891,7 +935,7 @@ function CardHeader({ icon, title, description, className }) {
|
|
|
891
935
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
892
936
|
"div",
|
|
893
937
|
{
|
|
894
|
-
className:
|
|
938
|
+
className: classNames16__default.default(
|
|
895
939
|
"flex items-start gap-4 p-6 border-b border-white/10",
|
|
896
940
|
className
|
|
897
941
|
),
|
|
@@ -907,14 +951,14 @@ function CardHeader({ icon, title, description, className }) {
|
|
|
907
951
|
}
|
|
908
952
|
var CardHeader_default = CardHeader;
|
|
909
953
|
function CardContent({ children, className }) {
|
|
910
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
954
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames16__default.default("p-6 text-gray-300 text-sm", className), children });
|
|
911
955
|
}
|
|
912
956
|
var CardContent_default = CardContent;
|
|
913
957
|
function CardFooter({ children, className }) {
|
|
914
958
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
915
959
|
"div",
|
|
916
960
|
{
|
|
917
|
-
className:
|
|
961
|
+
className: classNames16__default.default(
|
|
918
962
|
"flex items-center gap-3 p-5 border-t border-white/10 text-sm text-gray-400",
|
|
919
963
|
className
|
|
920
964
|
),
|
|
@@ -956,7 +1000,7 @@ function GradientAnimation({
|
|
|
956
1000
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
957
1001
|
"div",
|
|
958
1002
|
{
|
|
959
|
-
className:
|
|
1003
|
+
className: classNames16__default.default("absolute inset-0"),
|
|
960
1004
|
style: {
|
|
961
1005
|
background: `linear-gradient(${cfg.angle}deg, ${cfg.colors?.join(",")})`,
|
|
962
1006
|
backgroundSize: cfg.backgroundSize,
|
|
@@ -1102,7 +1146,7 @@ function MotionSurface({
|
|
|
1102
1146
|
}) {
|
|
1103
1147
|
const AnimationComponent = animationVariant === "custom" ? CustomAnimation : animationRegistry[animationVariant];
|
|
1104
1148
|
const OverlayComponent = overlay === "custom" ? CustomOverlay : overlayRegistry[overlay];
|
|
1105
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1149
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames16__default.default("relative overflow-hidden", className), children: [
|
|
1106
1150
|
AnimationComponent && /* @__PURE__ */ jsxRuntime.jsx(AnimationComponent, { config: animationConfig, animated }),
|
|
1107
1151
|
OverlayComponent && /* @__PURE__ */ jsxRuntime.jsx(OverlayComponent, { config: overlayConfig }),
|
|
1108
1152
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative z-10", children })
|
|
@@ -1556,6 +1600,10 @@ var Graph = ({
|
|
|
1556
1600
|
);
|
|
1557
1601
|
};
|
|
1558
1602
|
var CloudinaryContext = React4.createContext(null);
|
|
1603
|
+
var CloudinaryProvider = ({
|
|
1604
|
+
cloudName,
|
|
1605
|
+
children
|
|
1606
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(CloudinaryContext.Provider, { value: { cloudName }, children });
|
|
1559
1607
|
var useCloudinaryConfig = () => {
|
|
1560
1608
|
const ctx = React4.useContext(CloudinaryContext);
|
|
1561
1609
|
if (!ctx) {
|
|
@@ -1622,19 +1670,27 @@ function Info({
|
|
|
1622
1670
|
children,
|
|
1623
1671
|
variant = "default",
|
|
1624
1672
|
appearance = "lite",
|
|
1625
|
-
shape
|
|
1673
|
+
shape,
|
|
1626
1674
|
className,
|
|
1627
1675
|
...rest
|
|
1628
1676
|
}) {
|
|
1629
|
-
const
|
|
1677
|
+
const eui = useEUIConfig();
|
|
1678
|
+
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "roundedSquare";
|
|
1679
|
+
const variantStyles = resolveAppearanceStyles({
|
|
1680
|
+
appearance,
|
|
1681
|
+
variant,
|
|
1682
|
+
solid: infoVariantsSolid,
|
|
1683
|
+
lite: infoVariantsLite,
|
|
1684
|
+
ghost: infoVariantsGhost
|
|
1685
|
+
});
|
|
1630
1686
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1631
1687
|
"div",
|
|
1632
1688
|
{
|
|
1633
1689
|
...rest,
|
|
1634
1690
|
className: cn(
|
|
1635
|
-
"w-full p-5 text-sm transition-
|
|
1691
|
+
"w-full p-5 text-sm transition-all duration-300",
|
|
1636
1692
|
variantStyles,
|
|
1637
|
-
shapes[
|
|
1693
|
+
shapes[resolvedShape],
|
|
1638
1694
|
className
|
|
1639
1695
|
),
|
|
1640
1696
|
children
|
|
@@ -1980,7 +2036,7 @@ var ListItem = ({
|
|
|
1980
2036
|
align = "start",
|
|
1981
2037
|
className
|
|
1982
2038
|
}) => {
|
|
1983
|
-
const bullet = renderBullet?.(index) ?? (bulletType === "number" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-
|
|
2039
|
+
const bullet = renderBullet?.(index) ?? (bulletType === "number" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium opacity-70", children: [
|
|
1984
2040
|
index + 1,
|
|
1985
2041
|
"."
|
|
1986
2042
|
] }) : bulletTypes[bulletType]);
|
|
@@ -1989,7 +2045,7 @@ var ListItem = ({
|
|
|
1989
2045
|
{
|
|
1990
2046
|
className: cn(
|
|
1991
2047
|
"flex gap-3",
|
|
1992
|
-
align === "center"
|
|
2048
|
+
align === "center" ? "items-center" : "items-baseline",
|
|
1993
2049
|
className
|
|
1994
2050
|
),
|
|
1995
2051
|
children: [
|
|
@@ -1997,18 +2053,23 @@ var ListItem = ({
|
|
|
1997
2053
|
"div",
|
|
1998
2054
|
{
|
|
1999
2055
|
className: cn(
|
|
2000
|
-
"
|
|
2001
|
-
|
|
2002
|
-
bulletType
|
|
2056
|
+
"shrink-0 text-gray-400 dark:text-gray-500",
|
|
2057
|
+
"w-[14px] flex justify-center",
|
|
2058
|
+
bulletType !== "number" && "mt-[0.35em]"
|
|
2003
2059
|
),
|
|
2004
2060
|
children: bullet
|
|
2005
2061
|
}
|
|
2006
2062
|
),
|
|
2007
|
-
TypographyComponent ? React4__default.default.cloneElement(
|
|
2063
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: TypographyComponent ? React4__default.default.cloneElement(
|
|
2008
2064
|
TypographyComponent,
|
|
2009
|
-
{
|
|
2065
|
+
{
|
|
2066
|
+
className: cn(
|
|
2067
|
+
"leading-relaxed",
|
|
2068
|
+
TypographyComponent?.props?.className
|
|
2069
|
+
)
|
|
2070
|
+
},
|
|
2010
2071
|
content
|
|
2011
|
-
) : content
|
|
2072
|
+
) : content })
|
|
2012
2073
|
]
|
|
2013
2074
|
}
|
|
2014
2075
|
);
|
|
@@ -2028,10 +2089,16 @@ var gridCols = {
|
|
|
2028
2089
|
};
|
|
2029
2090
|
function normalizeItem(item, defaultBulletType) {
|
|
2030
2091
|
if (typeof item === "string") {
|
|
2031
|
-
return {
|
|
2092
|
+
return {
|
|
2093
|
+
content: item,
|
|
2094
|
+
bulletType: defaultBulletType
|
|
2095
|
+
};
|
|
2032
2096
|
}
|
|
2033
2097
|
if (React4__default.default.isValidElement(item)) {
|
|
2034
|
-
return {
|
|
2098
|
+
return {
|
|
2099
|
+
content: item,
|
|
2100
|
+
bulletType: defaultBulletType
|
|
2101
|
+
};
|
|
2035
2102
|
}
|
|
2036
2103
|
return {
|
|
2037
2104
|
bulletType: defaultBulletType,
|
|
@@ -2052,8 +2119,8 @@ function List({
|
|
|
2052
2119
|
}) {
|
|
2053
2120
|
const isGrid = !!columns;
|
|
2054
2121
|
const isOrdered = bulletType === "number";
|
|
2055
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, className: cn("py-
|
|
2056
|
-
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-
|
|
2122
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, className: cn("py-2", className), children: [
|
|
2123
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-semibold mb-3", children: title }),
|
|
2057
2124
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2058
2125
|
"div",
|
|
2059
2126
|
{
|
|
@@ -2074,7 +2141,8 @@ function List({
|
|
|
2074
2141
|
bulletType: normalized.bulletType,
|
|
2075
2142
|
renderBullet: normalized.renderBullet,
|
|
2076
2143
|
TypographyComponent: normalized.TypographyComponent,
|
|
2077
|
-
className: normalized.className
|
|
2144
|
+
className: normalized.className,
|
|
2145
|
+
align
|
|
2078
2146
|
},
|
|
2079
2147
|
i
|
|
2080
2148
|
);
|
|
@@ -2084,230 +2152,404 @@ function List({
|
|
|
2084
2152
|
] });
|
|
2085
2153
|
}
|
|
2086
2154
|
var List_default = List;
|
|
2087
|
-
var
|
|
2088
|
-
|
|
2155
|
+
var calculateDiscountedPrice = (price, discount) => {
|
|
2156
|
+
if (!discount) return price;
|
|
2157
|
+
return price - price * discount / 100;
|
|
2089
2158
|
};
|
|
2159
|
+
var formatPrice = (value, decimals) => value.toFixed(decimals);
|
|
2090
2160
|
function PriceTag({
|
|
2091
|
-
discount,
|
|
2092
2161
|
price,
|
|
2162
|
+
discount,
|
|
2093
2163
|
code = "USD",
|
|
2164
|
+
variant = "success",
|
|
2165
|
+
appearance = "solid",
|
|
2166
|
+
shape,
|
|
2167
|
+
size = "md",
|
|
2168
|
+
decimals = 2,
|
|
2169
|
+
showCurrencyCode = true,
|
|
2170
|
+
currencyAsSubscript = true,
|
|
2171
|
+
showFreeLabel = true,
|
|
2094
2172
|
className,
|
|
2095
2173
|
...rest
|
|
2096
2174
|
}) {
|
|
2097
|
-
|
|
2098
|
-
|
|
2175
|
+
const eui = useEUIConfig();
|
|
2176
|
+
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "roundedSquare";
|
|
2177
|
+
const variantStyles = resolveAppearanceStyles({
|
|
2178
|
+
appearance,
|
|
2179
|
+
variant,
|
|
2180
|
+
solid: variantsSolid,
|
|
2181
|
+
lite: variantsLite,
|
|
2182
|
+
ghost: variantsGhost
|
|
2183
|
+
});
|
|
2184
|
+
const discountedPrice = calculateDiscountedPrice(price, discount);
|
|
2185
|
+
const currency = getCurrencySymbol(code);
|
|
2186
|
+
if (price <= 0 && showFreeLabel) {
|
|
2187
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...rest, className: cn("inline-flex items-center", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2099
2188
|
"div",
|
|
2100
2189
|
{
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2190
|
+
className: cn(
|
|
2191
|
+
"font-semibold",
|
|
2192
|
+
"px-3 py-1",
|
|
2193
|
+
"inline-flex items-center justify-center",
|
|
2194
|
+
variantStyles,
|
|
2195
|
+
shapes[resolvedShape],
|
|
2196
|
+
badgeSizes[size]
|
|
2197
|
+
),
|
|
2198
|
+
children: "FREE"
|
|
2104
2199
|
}
|
|
2105
|
-
);
|
|
2200
|
+
) });
|
|
2106
2201
|
}
|
|
2107
|
-
|
|
2108
|
-
|
|
2202
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, className: cn("inline-flex items-center gap-3", className), children: [
|
|
2203
|
+
!!discount && discount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2109
2204
|
"div",
|
|
2110
2205
|
{
|
|
2111
|
-
|
|
2112
|
-
|
|
2206
|
+
className: cn(
|
|
2207
|
+
"inline-flex items-center justify-center",
|
|
2208
|
+
"font-semibold leading-none",
|
|
2209
|
+
"px-3 py-1",
|
|
2210
|
+
variantStyles,
|
|
2211
|
+
shapes[resolvedShape],
|
|
2212
|
+
badgeSizes[size]
|
|
2213
|
+
),
|
|
2113
2214
|
children: [
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
"%"
|
|
2118
|
-
] }),
|
|
2119
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex gap-1 items-center", children: [
|
|
2120
|
-
discount ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex gap-[3px] font-semibold", children: [
|
|
2121
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "eui-text-sm line-through", children: [
|
|
2122
|
-
getCurrencySymbol(code),
|
|
2123
|
-
price
|
|
2124
|
-
] }),
|
|
2125
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "eui-text-md", children: [
|
|
2126
|
-
getCurrencySymbol(code),
|
|
2127
|
-
applyDiscount(discount, price)
|
|
2128
|
-
] })
|
|
2129
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-gray-50 font-semibold", children: [
|
|
2130
|
-
getCurrencySymbol(code),
|
|
2131
|
-
price
|
|
2132
|
-
] }),
|
|
2133
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-yellow-500 font-thin", children: code })
|
|
2134
|
-
] })
|
|
2215
|
+
"-",
|
|
2216
|
+
discount,
|
|
2217
|
+
"%"
|
|
2135
2218
|
]
|
|
2136
2219
|
}
|
|
2137
|
-
)
|
|
2138
|
-
|
|
2220
|
+
),
|
|
2221
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-baseline gap-3", children: [
|
|
2222
|
+
!!discount && discount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2223
|
+
"span",
|
|
2224
|
+
{
|
|
2225
|
+
className: cn(
|
|
2226
|
+
"font-semibold leading-none",
|
|
2227
|
+
"opacity-50 line-through",
|
|
2228
|
+
"text-lg"
|
|
2229
|
+
),
|
|
2230
|
+
children: [
|
|
2231
|
+
currency,
|
|
2232
|
+
formatPrice(price, decimals)
|
|
2233
|
+
]
|
|
2234
|
+
}
|
|
2235
|
+
),
|
|
2236
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("font-semibold leading-none", "text-lg"), children: [
|
|
2237
|
+
currency,
|
|
2238
|
+
formatPrice(discountedPrice, decimals)
|
|
2239
|
+
] }),
|
|
2240
|
+
showCurrencyCode && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2241
|
+
"span",
|
|
2242
|
+
{
|
|
2243
|
+
className: cn(
|
|
2244
|
+
"uppercase tracking-wide opacity-60",
|
|
2245
|
+
currencyAsSubscript ? "text-[10px] relative top-[0.35em]" : "text-xs"
|
|
2246
|
+
),
|
|
2247
|
+
children: code
|
|
2248
|
+
}
|
|
2249
|
+
)
|
|
2250
|
+
] })
|
|
2251
|
+
] });
|
|
2139
2252
|
}
|
|
2140
|
-
var
|
|
2141
|
-
xs:
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2253
|
+
var progressSizes = {
|
|
2254
|
+
xs: {
|
|
2255
|
+
track: "h-1",
|
|
2256
|
+
text: "text-[10px]"
|
|
2257
|
+
},
|
|
2258
|
+
sm: {
|
|
2259
|
+
track: "h-2",
|
|
2260
|
+
text: "text-xs"
|
|
2261
|
+
},
|
|
2262
|
+
md: {
|
|
2263
|
+
track: "h-3",
|
|
2264
|
+
text: "text-sm"
|
|
2265
|
+
},
|
|
2266
|
+
lg: {
|
|
2267
|
+
track: "h-4",
|
|
2268
|
+
text: "text-sm"
|
|
2269
|
+
},
|
|
2270
|
+
xl: {
|
|
2271
|
+
track: "h-5",
|
|
2272
|
+
text: "text-base"
|
|
2273
|
+
}
|
|
2146
2274
|
};
|
|
2147
|
-
|
|
2275
|
+
function ProgressBar({
|
|
2148
2276
|
value,
|
|
2277
|
+
min = 0,
|
|
2278
|
+
max = 100,
|
|
2149
2279
|
variant = "success",
|
|
2150
|
-
|
|
2280
|
+
appearance = "solid",
|
|
2281
|
+
size = "md",
|
|
2282
|
+
shape,
|
|
2283
|
+
striped = false,
|
|
2284
|
+
animated = true,
|
|
2151
2285
|
showLabel = true,
|
|
2152
|
-
label,
|
|
2286
|
+
label = "Progress",
|
|
2153
2287
|
labelPlacement = "top",
|
|
2288
|
+
showPercentage = true,
|
|
2289
|
+
startContent,
|
|
2290
|
+
endContent,
|
|
2291
|
+
trackClassName,
|
|
2292
|
+
barClassName,
|
|
2154
2293
|
className,
|
|
2155
2294
|
...rest
|
|
2156
|
-
})
|
|
2157
|
-
const
|
|
2295
|
+
}) {
|
|
2296
|
+
const eui = useEUIConfig();
|
|
2297
|
+
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "roundedSquare";
|
|
2298
|
+
const clampedValue = Math.min(max, Math.max(min, value));
|
|
2299
|
+
const percentage = (clampedValue - min) / (max - min) * 100;
|
|
2300
|
+
const variantStyles = resolveAppearanceStyles({
|
|
2301
|
+
appearance,
|
|
2302
|
+
variant,
|
|
2303
|
+
solid: variantsSolid,
|
|
2304
|
+
lite: variantsLite,
|
|
2305
|
+
ghost: variantsGhost
|
|
2306
|
+
});
|
|
2307
|
+
const sizeStyles = progressSizes[size];
|
|
2308
|
+
const hasTopLabel = showLabel && labelPlacement === "top";
|
|
2309
|
+
const hasBottomLabel = showLabel && labelPlacement === "bottom";
|
|
2310
|
+
const labelNode = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2311
|
+
"div",
|
|
2312
|
+
{
|
|
2313
|
+
className: cn(
|
|
2314
|
+
"flex items-center justify-between gap-3",
|
|
2315
|
+
sizeStyles.text,
|
|
2316
|
+
"text-gray-600 dark:text-gray-300"
|
|
2317
|
+
),
|
|
2318
|
+
children: [
|
|
2319
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2320
|
+
startContent,
|
|
2321
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: label })
|
|
2322
|
+
] }),
|
|
2323
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2324
|
+
endContent,
|
|
2325
|
+
showPercentage && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "tabular-nums opacity-80", children: [
|
|
2326
|
+
Math.round(percentage),
|
|
2327
|
+
"%"
|
|
2328
|
+
] })
|
|
2329
|
+
] })
|
|
2330
|
+
]
|
|
2331
|
+
}
|
|
2332
|
+
);
|
|
2158
2333
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, className: cn("w-full", className), children: [
|
|
2159
|
-
|
|
2160
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label ?? "Progress" }),
|
|
2161
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
2162
|
-
clampedValue,
|
|
2163
|
-
"%"
|
|
2164
|
-
] })
|
|
2165
|
-
] }),
|
|
2334
|
+
hasTopLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2", children: labelNode }),
|
|
2166
2335
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2167
2336
|
"div",
|
|
2168
2337
|
{
|
|
2169
2338
|
className: cn(
|
|
2170
|
-
"relative
|
|
2171
|
-
|
|
2339
|
+
"relative overflow-hidden",
|
|
2340
|
+
"bg-gray-200 dark:bg-neutral-800",
|
|
2341
|
+
"border border-gray-300 dark:border-neutral-700",
|
|
2342
|
+
"shadow-inner",
|
|
2343
|
+
sizeStyles.track,
|
|
2344
|
+
shapes[resolvedShape],
|
|
2345
|
+
trackClassName
|
|
2172
2346
|
),
|
|
2347
|
+
role: "progressbar",
|
|
2348
|
+
"aria-valuemin": min,
|
|
2349
|
+
"aria-valuemax": max,
|
|
2350
|
+
"aria-valuenow": clampedValue,
|
|
2173
2351
|
children: [
|
|
2174
2352
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2175
2353
|
"div",
|
|
2176
2354
|
{
|
|
2177
2355
|
className: cn(
|
|
2178
|
-
"h-full
|
|
2179
|
-
|
|
2356
|
+
"relative h-full",
|
|
2357
|
+
animated && "transition-all duration-500 ease-out",
|
|
2358
|
+
"before:absolute before:inset-0",
|
|
2359
|
+
"before:bg-white/10 dark:before:bg-white/5",
|
|
2360
|
+
"border-r border-white/10 dark:border-white/5",
|
|
2361
|
+
striped && [
|
|
2362
|
+
"bg-[length:40px_40px]",
|
|
2363
|
+
"bg-[linear-gradient(135deg,rgba(255,255,255,0.15)_25%,transparent_25%,transparent_50%,rgba(255,255,255,0.15)_50%,rgba(255,255,255,0.15)_75%,transparent_75%,transparent)]",
|
|
2364
|
+
animated && "animate-eui-progress-stripes"
|
|
2365
|
+
],
|
|
2366
|
+
variantStyles,
|
|
2367
|
+
barClassName
|
|
2180
2368
|
),
|
|
2181
|
-
style: {
|
|
2369
|
+
style: {
|
|
2370
|
+
width: `${percentage}%`
|
|
2371
|
+
}
|
|
2182
2372
|
}
|
|
2183
2373
|
),
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2374
|
+
labelPlacement === "overlay" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2375
|
+
"div",
|
|
2376
|
+
{
|
|
2377
|
+
className: cn(
|
|
2378
|
+
"absolute inset-0",
|
|
2379
|
+
"flex items-center justify-center",
|
|
2380
|
+
"font-medium",
|
|
2381
|
+
"text-white",
|
|
2382
|
+
sizeStyles.text,
|
|
2383
|
+
"pointer-events-none"
|
|
2384
|
+
),
|
|
2385
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-2", children: [
|
|
2386
|
+
showLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
|
|
2387
|
+
showPercentage && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
2388
|
+
Math.round(percentage),
|
|
2389
|
+
"%"
|
|
2390
|
+
] })
|
|
2391
|
+
] })
|
|
2392
|
+
}
|
|
2393
|
+
)
|
|
2190
2394
|
]
|
|
2191
2395
|
}
|
|
2192
|
-
)
|
|
2396
|
+
),
|
|
2397
|
+
hasBottomLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: labelNode })
|
|
2193
2398
|
] });
|
|
2399
|
+
}
|
|
2400
|
+
var sizes = {
|
|
2401
|
+
xs: "text-[10px]",
|
|
2402
|
+
sm: "text-xs",
|
|
2403
|
+
md: "text-sm",
|
|
2404
|
+
lg: "text-base",
|
|
2405
|
+
xl: "text-lg"
|
|
2194
2406
|
};
|
|
2195
2407
|
function StarRating({
|
|
2196
2408
|
rating,
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2409
|
+
max = 5,
|
|
2410
|
+
size = "md",
|
|
2411
|
+
showValue = false,
|
|
2412
|
+
valuePosition = "start",
|
|
2413
|
+
iconClassName,
|
|
2200
2414
|
className,
|
|
2201
2415
|
...rest
|
|
2202
2416
|
}) {
|
|
2203
|
-
const
|
|
2204
|
-
const
|
|
2205
|
-
const
|
|
2206
|
-
const
|
|
2207
|
-
const
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
isNumericRatingEnabled && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-yellow-700 font-semibold text-[14px]", children: rating.toFixed(1) }),
|
|
2417
|
+
const normalizedRating = Math.max(0, Math.min(max, rating));
|
|
2418
|
+
const fullStars = Math.floor(normalizedRating);
|
|
2419
|
+
const hasHalfStar = normalizedRating % 1 >= 0.5;
|
|
2420
|
+
const emptyStars = max - fullStars - (hasHalfStar ? 1 : 0);
|
|
2421
|
+
const ratingValue = /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-yellow-600 dark:text-yellow-400", children: normalizedRating.toFixed(1) });
|
|
2422
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, className: cn("inline-flex items-center gap-2", className), children: [
|
|
2423
|
+
showValue && valuePosition === "start" && ratingValue,
|
|
2211
2424
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2212
2425
|
"div",
|
|
2213
2426
|
{
|
|
2214
2427
|
className: cn(
|
|
2215
|
-
"flex
|
|
2216
|
-
|
|
2428
|
+
"inline-flex items-center gap-[2px]",
|
|
2429
|
+
"text-yellow-500 dark:text-yellow-400",
|
|
2430
|
+
sizes[size],
|
|
2431
|
+
iconClassName
|
|
2217
2432
|
),
|
|
2218
2433
|
children: [
|
|
2219
|
-
[...Array(fullStars)].map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2220
|
-
|
|
2221
|
-
[...Array(emptyStars)].map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2434
|
+
[...Array(fullStars)].map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(bs.BsStarFill, {}, index)),
|
|
2435
|
+
hasHalfStar && /* @__PURE__ */ jsxRuntime.jsx(bs.BsStarHalf, {}),
|
|
2436
|
+
[...Array(emptyStars)].map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(bs.BsStar, { className: "opacity-40" }, index + fullStars))
|
|
2222
2437
|
]
|
|
2223
2438
|
}
|
|
2224
2439
|
),
|
|
2225
|
-
|
|
2226
|
-
"(",
|
|
2227
|
-
reviewAmount,
|
|
2228
|
-
")"
|
|
2229
|
-
] })
|
|
2440
|
+
showValue && valuePosition === "end" && ratingValue
|
|
2230
2441
|
] });
|
|
2231
2442
|
}
|
|
2232
2443
|
var StarRating_default = StarRating;
|
|
2233
|
-
var
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2444
|
+
var sizes2 = {
|
|
2445
|
+
xs: {
|
|
2446
|
+
value: "text-2xl",
|
|
2447
|
+
review: "text-xs"
|
|
2448
|
+
},
|
|
2449
|
+
sm: {
|
|
2450
|
+
value: "text-3xl",
|
|
2451
|
+
review: "text-xs"
|
|
2452
|
+
},
|
|
2453
|
+
md: {
|
|
2454
|
+
value: "text-5xl",
|
|
2455
|
+
review: "text-sm"
|
|
2456
|
+
},
|
|
2457
|
+
lg: {
|
|
2458
|
+
value: "text-6xl",
|
|
2459
|
+
review: "text-base"
|
|
2460
|
+
},
|
|
2461
|
+
xl: {
|
|
2462
|
+
value: "text-7xl",
|
|
2463
|
+
review: "text-lg"
|
|
2464
|
+
}
|
|
2242
2465
|
};
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2466
|
+
function NumericRating({
|
|
2467
|
+
rating,
|
|
2468
|
+
totalReviews,
|
|
2469
|
+
size = "md",
|
|
2470
|
+
showStars = true,
|
|
2471
|
+
showReviewCount = true,
|
|
2472
|
+
reviewLabel = "reviews",
|
|
2473
|
+
className,
|
|
2474
|
+
...rest
|
|
2475
|
+
}) {
|
|
2476
|
+
const sizeStyles = sizes2[size];
|
|
2477
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2478
|
+
"div",
|
|
2479
|
+
{
|
|
2480
|
+
...rest,
|
|
2481
|
+
className: cn(
|
|
2482
|
+
"flex flex-col items-center justify-center",
|
|
2483
|
+
"min-w-[120px]",
|
|
2484
|
+
className
|
|
2485
|
+
),
|
|
2486
|
+
children: [
|
|
2487
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2488
|
+
"div",
|
|
2489
|
+
{
|
|
2490
|
+
className: cn(
|
|
2491
|
+
"font-bold leading-none",
|
|
2492
|
+
"text-gray-900 dark:text-gray-100",
|
|
2493
|
+
sizeStyles.value
|
|
2494
|
+
),
|
|
2495
|
+
children: rating.toFixed(1)
|
|
2496
|
+
}
|
|
2497
|
+
),
|
|
2498
|
+
showStars && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(StarRating_default, { rating, size }) }),
|
|
2499
|
+
showReviewCount && totalReviews !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2500
|
+
"div",
|
|
2501
|
+
{
|
|
2502
|
+
className: cn(
|
|
2503
|
+
"mt-1 text-gray-500 dark:text-gray-400",
|
|
2504
|
+
sizeStyles.review
|
|
2505
|
+
),
|
|
2506
|
+
children: [
|
|
2507
|
+
totalReviews,
|
|
2508
|
+
" ",
|
|
2509
|
+
reviewLabel
|
|
2510
|
+
]
|
|
2511
|
+
}
|
|
2512
|
+
)
|
|
2513
|
+
]
|
|
2514
|
+
}
|
|
2515
|
+
);
|
|
2516
|
+
}
|
|
2517
|
+
var NumericRating_default = NumericRating;
|
|
2518
|
+
function ProgressBarRating({
|
|
2519
|
+
star,
|
|
2520
|
+
percentage,
|
|
2521
|
+
variant = "warning",
|
|
2522
|
+
appearance = "solid",
|
|
2523
|
+
shape = "roundedSquare",
|
|
2524
|
+
size = "sm",
|
|
2525
|
+
animated = true,
|
|
2526
|
+
striped = false,
|
|
2527
|
+
className,
|
|
2528
|
+
...rest
|
|
2529
|
+
}) {
|
|
2530
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, className: cn("flex items-center gap-3 w-full", className), children: [
|
|
2531
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-5 text-sm font-medium text-gray-700 dark:text-gray-300", children: star }),
|
|
2532
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2533
|
+
ProgressBar,
|
|
2248
2534
|
{
|
|
2249
|
-
|
|
2250
|
-
|
|
2535
|
+
value: percentage,
|
|
2536
|
+
variant,
|
|
2537
|
+
appearance,
|
|
2538
|
+
shape,
|
|
2539
|
+
size,
|
|
2540
|
+
animated,
|
|
2541
|
+
striped,
|
|
2542
|
+
showLabel: false,
|
|
2543
|
+
showPercentage: false
|
|
2251
2544
|
}
|
|
2252
2545
|
) }),
|
|
2253
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-gray-500
|
|
2546
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-[52px] text-right text-xs tabular-nums text-gray-500 dark:text-gray-400", children: [
|
|
2254
2547
|
percentage.toFixed(1),
|
|
2255
2548
|
"%"
|
|
2256
2549
|
] })
|
|
2257
2550
|
] });
|
|
2258
|
-
};
|
|
2259
|
-
var ProgressBarsRating = ({
|
|
2260
|
-
ratingDistribution
|
|
2261
|
-
}) => {
|
|
2262
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 w-full max-w-md", children: ratingDistribution.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2263
|
-
ProgressBarRating,
|
|
2264
|
-
{
|
|
2265
|
-
star: item.star,
|
|
2266
|
-
percentage: item.percentage
|
|
2267
|
-
},
|
|
2268
|
-
item.star
|
|
2269
|
-
)) });
|
|
2270
|
-
};
|
|
2271
|
-
function StarRatingDistribution({
|
|
2272
|
-
numericRating = true,
|
|
2273
|
-
progressBarsRating = true,
|
|
2274
|
-
ratingDistribution = [
|
|
2275
|
-
{ star: 5, count: 0 },
|
|
2276
|
-
{ star: 4, count: 0 },
|
|
2277
|
-
{ star: 3, count: 0 },
|
|
2278
|
-
{ star: 2, count: 0 },
|
|
2279
|
-
{ star: 1, count: 0 }
|
|
2280
|
-
]
|
|
2281
|
-
}) {
|
|
2282
|
-
const totalReviews = ratingDistribution.reduce(
|
|
2283
|
-
(acc, item) => acc + item.count,
|
|
2284
|
-
0
|
|
2285
|
-
);
|
|
2286
|
-
const averageRating = totalReviews > 0 ? ratingDistribution.reduce(
|
|
2287
|
-
(acc, item) => acc + item.star * item.count,
|
|
2288
|
-
0
|
|
2289
|
-
) / totalReviews : 0;
|
|
2290
|
-
const ratingDistributionWithPercentage = ratingDistribution.map((item) => ({
|
|
2291
|
-
star: item.star,
|
|
2292
|
-
percentage: totalReviews > 0 ? item.count / totalReviews * 100 : 0
|
|
2293
|
-
}));
|
|
2294
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-center gap-10 p-5 bg-gray-800 bg-opacity-50 border border-gray-800 rounded-md shadow-sm", children: [
|
|
2295
|
-
numericRating && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2296
|
-
NumericRating,
|
|
2297
|
-
{
|
|
2298
|
-
averageRating,
|
|
2299
|
-
totalReviews
|
|
2300
|
-
}
|
|
2301
|
-
),
|
|
2302
|
-
progressBarsRating && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2303
|
-
ProgressBarsRating,
|
|
2304
|
-
{
|
|
2305
|
-
ratingDistribution: ratingDistributionWithPercentage
|
|
2306
|
-
}
|
|
2307
|
-
)
|
|
2308
|
-
] });
|
|
2309
2551
|
}
|
|
2310
|
-
var
|
|
2552
|
+
var ProgressBarRating_default = ProgressBarRating;
|
|
2311
2553
|
function Table({
|
|
2312
2554
|
title,
|
|
2313
2555
|
columns,
|
|
@@ -2615,7 +2857,7 @@ var Form = ({
|
|
|
2615
2857
|
/* @__PURE__ */ jsxRuntime.jsx(UnsavedChangesGuard_default, { formik: formik$1, enabled: warnOnUnsavedChanges }),
|
|
2616
2858
|
/* @__PURE__ */ jsxRuntime.jsx(DirtyObserver_default, { formik: formik$1, onDirtyChange }),
|
|
2617
2859
|
/* @__PURE__ */ jsxRuntime.jsx(FormObserver_default, { formik: formik$1, onChange }),
|
|
2618
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2860
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames16__default.default(styles), children })
|
|
2619
2861
|
] })
|
|
2620
2862
|
}
|
|
2621
2863
|
);
|
|
@@ -2624,7 +2866,7 @@ var Backdrop = ({ children, styles }) => {
|
|
|
2624
2866
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2625
2867
|
"div",
|
|
2626
2868
|
{
|
|
2627
|
-
className:
|
|
2869
|
+
className: classNames16__default.default({
|
|
2628
2870
|
"bg-black/75 top-0 bottom-0 left-0 right-0 z-50 fixed inset-0 flex items-center justify-center overflow-hidden": true,
|
|
2629
2871
|
[`${styles}`]: styles
|
|
2630
2872
|
}),
|
|
@@ -2718,7 +2960,7 @@ var Transition4 = {
|
|
|
2718
2960
|
TransitionDropdown: TransitionDropdown_default,
|
|
2719
2961
|
TransitionFadeIn: TransitionFadeIn_default
|
|
2720
2962
|
};
|
|
2721
|
-
var
|
|
2963
|
+
var sizes3 = {
|
|
2722
2964
|
xs: "px-2 py-1 text-xs",
|
|
2723
2965
|
sm: "px-3 py-2 text-sm",
|
|
2724
2966
|
md: "px-4 py-2 text-base",
|
|
@@ -2735,11 +2977,11 @@ function FormResponse({
|
|
|
2735
2977
|
return /* @__PURE__ */ jsxRuntime.jsx(Transition4.TransitionDropdown, { visibility: text ? true : false, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2736
2978
|
"div",
|
|
2737
2979
|
{
|
|
2738
|
-
className:
|
|
2980
|
+
className: classNames16__default.default({
|
|
2739
2981
|
"font-poppins font-light text-sm": true,
|
|
2740
2982
|
[`${variantsLite[variant]}`]: variant,
|
|
2741
2983
|
[`${shapes[shape]}`]: shape,
|
|
2742
|
-
[`${
|
|
2984
|
+
[`${sizes3[size]}`]: size,
|
|
2743
2985
|
[`${styles}`]: styles
|
|
2744
2986
|
}),
|
|
2745
2987
|
children: text
|
|
@@ -2852,7 +3094,7 @@ var ThemeSwitch = () => {
|
|
|
2852
3094
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2853
3095
|
"div",
|
|
2854
3096
|
{
|
|
2855
|
-
className:
|
|
3097
|
+
className: classNames16__default.default(
|
|
2856
3098
|
"w-6 h-6 bg-white dark:bg-gray-600 rounded-full shadow-md transition-transform duration-300",
|
|
2857
3099
|
theme === "dark" ? "translate-x-8" : "translate-x-0"
|
|
2858
3100
|
)
|
|
@@ -14314,31 +14556,39 @@ function WorldMap({
|
|
|
14314
14556
|
/* @__PURE__ */ jsxRuntime.jsx(Tooltip4, { show: showTooltip, children: tooltipContent })
|
|
14315
14557
|
] });
|
|
14316
14558
|
}
|
|
14317
|
-
var
|
|
14559
|
+
var sizes4 = {
|
|
14318
14560
|
xs: "px-2 py-1 text-xs",
|
|
14319
14561
|
sm: "px-3 py-1.5 text-sm",
|
|
14320
14562
|
md: "px-4 py-2 text-base",
|
|
14321
14563
|
lg: "px-5 py-3 text-lg",
|
|
14322
14564
|
xl: "px-6 py-4 text-xl"
|
|
14323
14565
|
};
|
|
14324
|
-
|
|
14566
|
+
function Button({
|
|
14325
14567
|
type = "button",
|
|
14326
14568
|
icon,
|
|
14327
14569
|
text,
|
|
14328
14570
|
children,
|
|
14329
|
-
loading,
|
|
14330
|
-
disabled,
|
|
14331
|
-
|
|
14332
|
-
block,
|
|
14571
|
+
loading = false,
|
|
14572
|
+
disabled = false,
|
|
14573
|
+
block = false,
|
|
14333
14574
|
variant = "success",
|
|
14575
|
+
appearance = "solid",
|
|
14334
14576
|
shape,
|
|
14335
14577
|
size = "md",
|
|
14336
|
-
|
|
14337
|
-
|
|
14338
|
-
|
|
14578
|
+
className,
|
|
14579
|
+
onMouseMove,
|
|
14580
|
+
...rest
|
|
14581
|
+
}) {
|
|
14339
14582
|
const eui = useEUIConfig();
|
|
14340
14583
|
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "square";
|
|
14341
14584
|
const btnRef = React4.useRef(null);
|
|
14585
|
+
const variantStyles = resolveAppearanceStyles({
|
|
14586
|
+
appearance,
|
|
14587
|
+
variant,
|
|
14588
|
+
solid: variantsSolid,
|
|
14589
|
+
lite: variantsLite,
|
|
14590
|
+
ghost: variantsGhost
|
|
14591
|
+
});
|
|
14342
14592
|
const handleMouseMove = (e) => {
|
|
14343
14593
|
const btn = btnRef.current;
|
|
14344
14594
|
if (!btn) return;
|
|
@@ -14347,38 +14597,36 @@ var Button = ({
|
|
|
14347
14597
|
const y = e.clientY - rect.top;
|
|
14348
14598
|
btn.style.setProperty("--glow-x", `${x}px`);
|
|
14349
14599
|
btn.style.setProperty("--glow-y", `${y}px`);
|
|
14600
|
+
onMouseMove?.(e);
|
|
14350
14601
|
};
|
|
14351
14602
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14352
14603
|
"button",
|
|
14353
14604
|
{
|
|
14605
|
+
...rest,
|
|
14354
14606
|
ref: btnRef,
|
|
14355
14607
|
type,
|
|
14356
|
-
onClick,
|
|
14357
|
-
onMouseMove: handleMouseMove,
|
|
14358
14608
|
disabled: disabled || loading,
|
|
14359
|
-
|
|
14360
|
-
|
|
14361
|
-
"
|
|
14362
|
-
|
|
14363
|
-
[
|
|
14364
|
-
[
|
|
14365
|
-
|
|
14366
|
-
"
|
|
14367
|
-
|
|
14368
|
-
|
|
14369
|
-
|
|
14370
|
-
[`${styles}`]: styles
|
|
14371
|
-
}),
|
|
14609
|
+
onMouseMove: handleMouseMove,
|
|
14610
|
+
className: cn(
|
|
14611
|
+
"relative overflow-hidden group inline-flex items-center justify-center gap-2 transition-all duration-300",
|
|
14612
|
+
variantStyles,
|
|
14613
|
+
shapes[resolvedShape],
|
|
14614
|
+
sizes4[size],
|
|
14615
|
+
block && "w-full",
|
|
14616
|
+
(loading || disabled) && "brightness-75 grayscale cursor-not-allowed",
|
|
14617
|
+
!loading && !disabled && "hover:cursor-pointer",
|
|
14618
|
+
className
|
|
14619
|
+
),
|
|
14372
14620
|
children: [
|
|
14373
14621
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14374
14622
|
"span",
|
|
14375
14623
|
{
|
|
14376
|
-
className: "
|
|
14624
|
+
className: "pointer-events-none absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",
|
|
14377
14625
|
style: {
|
|
14378
14626
|
background: `
|
|
14379
14627
|
radial-gradient(
|
|
14380
14628
|
200px circle at var(--glow-x) var(--glow-y),
|
|
14381
|
-
rgba(
|
|
14629
|
+
rgba(255,255,255,0.18),
|
|
14382
14630
|
transparent 50%
|
|
14383
14631
|
)
|
|
14384
14632
|
`
|
|
@@ -14386,13 +14634,14 @@ var Button = ({
|
|
|
14386
14634
|
}
|
|
14387
14635
|
),
|
|
14388
14636
|
loading && /* @__PURE__ */ jsxRuntime.jsx(ai.AiOutlineLoading, { className: "animate-spin z-10" }),
|
|
14389
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("
|
|
14390
|
-
text && /* @__PURE__ */ jsxRuntime.jsx("
|
|
14391
|
-
children && /* @__PURE__ */ jsxRuntime.jsx("
|
|
14637
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "z-10", children: icon }),
|
|
14638
|
+
text && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "z-10", children: text }),
|
|
14639
|
+
children && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "z-10", children })
|
|
14392
14640
|
]
|
|
14393
14641
|
}
|
|
14394
14642
|
);
|
|
14395
|
-
}
|
|
14643
|
+
}
|
|
14644
|
+
var Button_default = Button;
|
|
14396
14645
|
function InputResponse({
|
|
14397
14646
|
name,
|
|
14398
14647
|
visibility,
|
|
@@ -14402,7 +14651,7 @@ function InputResponse({
|
|
|
14402
14651
|
return /* @__PURE__ */ jsxRuntime.jsx(Transition4.TransitionDropdown, { visibility, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14403
14652
|
"div",
|
|
14404
14653
|
{
|
|
14405
|
-
className:
|
|
14654
|
+
className: classNames16__default.default({
|
|
14406
14655
|
"font-medium text-sm py-1 px-2": true,
|
|
14407
14656
|
[`${textVariants[variant]}`]: variant,
|
|
14408
14657
|
"transition-all ease-in-out": true,
|
|
@@ -14417,7 +14666,7 @@ function InputLabel({ text, children, styles }) {
|
|
|
14417
14666
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14418
14667
|
"label",
|
|
14419
14668
|
{
|
|
14420
|
-
className:
|
|
14669
|
+
className: classNames16__default.default({
|
|
14421
14670
|
"px-0 eui-text-sm text-[13.5px] pointer-events-none select-none": true,
|
|
14422
14671
|
"transition-all ease-in-out": true,
|
|
14423
14672
|
[`${styles}`]: styles
|
|
@@ -14469,7 +14718,7 @@ var Input = ({
|
|
|
14469
14718
|
...field,
|
|
14470
14719
|
...props,
|
|
14471
14720
|
placeholder,
|
|
14472
|
-
className:
|
|
14721
|
+
className: classNames16__default.default({
|
|
14473
14722
|
"border peer w-full bg-eui-primary-300/10 pt-5 px-3 pb-2 text-md eui-text-md placeholder-transparent placeholder-shown:p-3 focus:outline-none h-[50px]": true,
|
|
14474
14723
|
"border-eui-primary-400 focus:border-eui-secondary-500": !(meta.touched && meta.error),
|
|
14475
14724
|
"border-eui-danger-500": meta.touched && meta.error,
|
|
@@ -14514,7 +14763,7 @@ var InputFile = ({
|
|
|
14514
14763
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14515
14764
|
"div",
|
|
14516
14765
|
{
|
|
14517
|
-
className:
|
|
14766
|
+
className: classNames16__default.default(
|
|
14518
14767
|
"border rounded-sm bg-eui-primary-300/10 px-3 pt-3 text-md text-eui-dark-100 cursor-pointer h-[50px] flex items-center",
|
|
14519
14768
|
{
|
|
14520
14769
|
"border-eui-primary-400 focus:border-eui-secondary-500": !(meta.touched && meta.error),
|
|
@@ -14540,7 +14789,7 @@ var InputFile = ({
|
|
|
14540
14789
|
InputLabel_default,
|
|
14541
14790
|
{
|
|
14542
14791
|
text: placeholder,
|
|
14543
|
-
styles:
|
|
14792
|
+
styles: classNames16__default.default({
|
|
14544
14793
|
"absolute left-2 eui-text-sm peer-placeholder-shown:text-base peer-placeholder-shown:top-3 pointer-events-none": true,
|
|
14545
14794
|
"top-[0.7px]": showFloatingLabel,
|
|
14546
14795
|
"top-[13px] text-base": !showFloatingLabel
|
|
@@ -14566,7 +14815,7 @@ var InputList = ({ name, placeholder, shape }) => {
|
|
|
14566
14815
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(formik.FieldArray, { name, children: ({ push, remove, move }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14567
14816
|
"div",
|
|
14568
14817
|
{
|
|
14569
|
-
className:
|
|
14818
|
+
className: classNames16__default.default({
|
|
14570
14819
|
"flex flex-col space-y-2 w-full bg-eui-primary-300/10": true,
|
|
14571
14820
|
[`${shapes[resolvedShape]}`]: true
|
|
14572
14821
|
}),
|
|
@@ -14597,7 +14846,7 @@ var InputList = ({ name, placeholder, shape }) => {
|
|
|
14597
14846
|
{
|
|
14598
14847
|
name: `${name}[${index}]`,
|
|
14599
14848
|
placeholder: `Item ${index + 1}`,
|
|
14600
|
-
className:
|
|
14849
|
+
className: classNames16__default.default(
|
|
14601
14850
|
"border peer w-full bg-eui-primary-300/10 pt-5 px-3 pb-2 text-md eui-text-md placeholder-transparent placeholder-shown:p-3 focus:outline-none h-[50px]",
|
|
14602
14851
|
[`${shapes[resolvedShape]}`],
|
|
14603
14852
|
errors[name]?.[index] ? "border-eui-danger-500" : "border-eui-primary-400 focus:border-eui-secondary-500"
|
|
@@ -14665,7 +14914,7 @@ var InputListGroup = ({
|
|
|
14665
14914
|
values[name]?.map((group, groupIndex) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14666
14915
|
"div",
|
|
14667
14916
|
{
|
|
14668
|
-
className:
|
|
14917
|
+
className: classNames16__default.default({
|
|
14669
14918
|
"flex flex-col gap-2 bg-eui-primary-300/10 p-3": true,
|
|
14670
14919
|
[`${shapes[resolvedShape]}`]: true
|
|
14671
14920
|
}),
|
|
@@ -14677,7 +14926,7 @@ var InputListGroup = ({
|
|
|
14677
14926
|
{
|
|
14678
14927
|
name: `${name}[${groupIndex}].name`,
|
|
14679
14928
|
placeholder: `Group ${groupIndex + 1}`,
|
|
14680
|
-
className:
|
|
14929
|
+
className: classNames16__default.default(
|
|
14681
14930
|
"border w-full bg-eui-primary-300/10 px-3 py-2 text-md focus:outline-none h-[40px]",
|
|
14682
14931
|
[`${shapes[resolvedShape]}`],
|
|
14683
14932
|
"border-eui-primary-400 focus:border-eui-secondary-500"
|
|
@@ -14719,7 +14968,7 @@ var InputListGroup = ({
|
|
|
14719
14968
|
{
|
|
14720
14969
|
ref: provided.innerRef,
|
|
14721
14970
|
...provided.droppableProps,
|
|
14722
|
-
className:
|
|
14971
|
+
className: classNames16__default.default({
|
|
14723
14972
|
"space-y-2 bg-eui-primary-300/10 p-2": true,
|
|
14724
14973
|
[`${shapes[resolvedShape]}`]: true
|
|
14725
14974
|
}),
|
|
@@ -14734,7 +14983,7 @@ var InputListGroup = ({
|
|
|
14734
14983
|
{
|
|
14735
14984
|
ref: provided2.innerRef,
|
|
14736
14985
|
...provided2.draggableProps,
|
|
14737
|
-
className:
|
|
14986
|
+
className: classNames16__default.default({
|
|
14738
14987
|
"flex items-center gap-2 bg-eui-primary-300/10 p-2": true,
|
|
14739
14988
|
[`${shapes[resolvedShape]}`]: true
|
|
14740
14989
|
}),
|
|
@@ -14745,7 +14994,7 @@ var InputListGroup = ({
|
|
|
14745
14994
|
{
|
|
14746
14995
|
name: `${name}[${groupIndex}].items[${itemIndex}]`,
|
|
14747
14996
|
placeholder: `Item ${itemIndex + 1}`,
|
|
14748
|
-
className:
|
|
14997
|
+
className: classNames16__default.default(
|
|
14749
14998
|
"border w-full bg-eui-primary-300/10 px-3 py-2 text-md focus:outline-none h-[40px]",
|
|
14750
14999
|
[`${shapes[resolvedShape]}`],
|
|
14751
15000
|
"border-eui-primary-400 focus:border-eui-secondary-500"
|
|
@@ -14818,43 +15067,76 @@ var InputListGroup = ({
|
|
|
14818
15067
|
function isMultiCheckbox(props) {
|
|
14819
15068
|
return Array.isArray(props.options);
|
|
14820
15069
|
}
|
|
14821
|
-
|
|
14822
|
-
|
|
15070
|
+
function Checkbox({
|
|
15071
|
+
placeholder,
|
|
15072
|
+
variant = "primary",
|
|
15073
|
+
shape = "roundedSquare",
|
|
15074
|
+
className,
|
|
15075
|
+
...props
|
|
15076
|
+
}) {
|
|
14823
15077
|
const isMulti = isMultiCheckbox(props);
|
|
14824
|
-
const [
|
|
14825
|
-
|
|
15078
|
+
const [multiField, multiMeta, multiHelpers] = formik.useField(
|
|
15079
|
+
props
|
|
15080
|
+
);
|
|
15081
|
+
const [singleField, singleMeta, singleHelpers] = formik.useField(
|
|
15082
|
+
props
|
|
15083
|
+
);
|
|
15084
|
+
const field = isMulti ? multiField : singleField;
|
|
15085
|
+
const meta = isMulti ? multiMeta : singleMeta;
|
|
15086
|
+
const checkboxClass = cn(
|
|
15087
|
+
// Base
|
|
14826
15088
|
"appearance-none cursor-pointer transition-all duration-300",
|
|
14827
15089
|
"w-5 h-5 min-w-[1.25rem] min-h-[1.25rem]",
|
|
14828
|
-
"flex-shrink-0",
|
|
14829
|
-
|
|
14830
|
-
"
|
|
14831
|
-
"
|
|
15090
|
+
"flex-shrink-0 relative",
|
|
15091
|
+
// Unchecked state
|
|
15092
|
+
"bg-white border-2 border-gray-300",
|
|
15093
|
+
"hover:border-gray-400",
|
|
15094
|
+
// Dark mode
|
|
15095
|
+
"dark:bg-neutral-900",
|
|
15096
|
+
"dark:border-neutral-600",
|
|
15097
|
+
"dark:hover:border-neutral-500",
|
|
15098
|
+
// Focus state
|
|
15099
|
+
"focus:outline-none focus:ring-2",
|
|
15100
|
+
"focus:ring-eui-primary-500/30",
|
|
15101
|
+
// Checked variant styles
|
|
15102
|
+
checkboxVariants[variant],
|
|
15103
|
+
// Check icon
|
|
15104
|
+
"checked:before:content-['\u2713']",
|
|
15105
|
+
"checked:before:absolute checked:before:inset-0",
|
|
14832
15106
|
"checked:before:flex checked:before:items-center checked:before:justify-center",
|
|
14833
|
-
"checked:before:text-white checked:before:font-bold checked:before:text-sm"
|
|
15107
|
+
"checked:before:text-white checked:before:font-bold checked:before:text-sm",
|
|
15108
|
+
// Disabled state
|
|
15109
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
15110
|
+
// Shape
|
|
15111
|
+
shapes[shape],
|
|
15112
|
+
className
|
|
14834
15113
|
);
|
|
14835
15114
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
14836
15115
|
!isMulti && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-3 items-start", children: [
|
|
14837
15116
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14838
15117
|
"input",
|
|
14839
15118
|
{
|
|
14840
|
-
id:
|
|
15119
|
+
id: singleField.name,
|
|
14841
15120
|
type: "checkbox",
|
|
14842
|
-
checked: Boolean(
|
|
14843
|
-
onChange: (e) =>
|
|
15121
|
+
checked: Boolean(singleField.value),
|
|
15122
|
+
onChange: (e) => singleHelpers.setValue(e.target.checked),
|
|
14844
15123
|
className: checkboxClass
|
|
14845
15124
|
}
|
|
14846
15125
|
),
|
|
14847
15126
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14848
15127
|
"label",
|
|
14849
15128
|
{
|
|
14850
|
-
htmlFor:
|
|
14851
|
-
className:
|
|
15129
|
+
htmlFor: singleField.name,
|
|
15130
|
+
className: cn(
|
|
15131
|
+
"text-sm leading-relaxed cursor-pointer select-none",
|
|
15132
|
+
"text-gray-800 dark:text-gray-200"
|
|
15133
|
+
),
|
|
14852
15134
|
children: placeholder
|
|
14853
15135
|
}
|
|
14854
15136
|
)
|
|
14855
15137
|
] }),
|
|
14856
15138
|
isMulti && props.options.map((option) => {
|
|
14857
|
-
const values =
|
|
15139
|
+
const values = multiField.value ?? [];
|
|
14858
15140
|
const checked = values.includes(option.value);
|
|
14859
15141
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14860
15142
|
"div",
|
|
@@ -14868,7 +15150,7 @@ var Checkbox = (props) => {
|
|
|
14868
15150
|
type: "checkbox",
|
|
14869
15151
|
checked,
|
|
14870
15152
|
onChange: () => {
|
|
14871
|
-
|
|
15153
|
+
multiHelpers.setValue(
|
|
14872
15154
|
checked ? values.filter((v) => v !== option.value) : [...values, option.value]
|
|
14873
15155
|
);
|
|
14874
15156
|
},
|
|
@@ -14879,7 +15161,10 @@ var Checkbox = (props) => {
|
|
|
14879
15161
|
"label",
|
|
14880
15162
|
{
|
|
14881
15163
|
htmlFor: option.value,
|
|
14882
|
-
className:
|
|
15164
|
+
className: cn(
|
|
15165
|
+
"text-sm leading-relaxed cursor-pointer select-none",
|
|
15166
|
+
"text-gray-800 dark:text-gray-200"
|
|
15167
|
+
),
|
|
14883
15168
|
children: option.label
|
|
14884
15169
|
}
|
|
14885
15170
|
)
|
|
@@ -14897,7 +15182,7 @@ var Checkbox = (props) => {
|
|
|
14897
15182
|
}
|
|
14898
15183
|
)
|
|
14899
15184
|
] });
|
|
14900
|
-
}
|
|
15185
|
+
}
|
|
14901
15186
|
var Checkbox_default = Checkbox;
|
|
14902
15187
|
var DateSelector = ({
|
|
14903
15188
|
placeholder,
|
|
@@ -14923,7 +15208,7 @@ var DateSelector = ({
|
|
|
14923
15208
|
...field,
|
|
14924
15209
|
...props,
|
|
14925
15210
|
placeholder,
|
|
14926
|
-
className:
|
|
15211
|
+
className: classNames16__default.default({
|
|
14927
15212
|
"border border-eui-primary-400 peer w-full bg-eui-primary-300/10 pt-5 px-3 pb-2 text-md eui-text-md placeholder-transparent placeholder-shown:p-3 focus:border-eui-secondary-500 focus:outline-none h-[50px]": true,
|
|
14928
15213
|
"border-eui-danger-500": meta.touched && meta.error,
|
|
14929
15214
|
"transition-all ease-in-out": true,
|
|
@@ -15032,7 +15317,7 @@ var ImageInput = React4.forwardRef(
|
|
|
15032
15317
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15033
15318
|
"label",
|
|
15034
15319
|
{
|
|
15035
|
-
className:
|
|
15320
|
+
className: classNames16__default.default({
|
|
15036
15321
|
"border-2 border-dashed border-gray-700 bg-gray-900 h-[200px] w-[300px] flex flex-col gap-2 items-center justify-center group": true,
|
|
15037
15322
|
"hover:cursor-pointer hover:border-solid hover:border-gray-600 hover:bg-gray-900/80": true,
|
|
15038
15323
|
"transition-all ease-in-out duration-150": true
|
|
@@ -15149,7 +15434,7 @@ function Radio({
|
|
|
15149
15434
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15150
15435
|
"div",
|
|
15151
15436
|
{
|
|
15152
|
-
className:
|
|
15437
|
+
className: classNames16__default.default({
|
|
15153
15438
|
"flex flex-row gap-2 items-center mx-1 my-2": true
|
|
15154
15439
|
}),
|
|
15155
15440
|
children: [
|
|
@@ -15162,7 +15447,7 @@ function Radio({
|
|
|
15162
15447
|
...props,
|
|
15163
15448
|
value: option.value,
|
|
15164
15449
|
checked: field2.value === option.value,
|
|
15165
|
-
className:
|
|
15450
|
+
className: classNames16__default.default({
|
|
15166
15451
|
"appearance-none w-4 h-4 border-2 border-eui-primary-400 rounded-full cursor-pointer transition-all duration-300": true,
|
|
15167
15452
|
// base radio button styles
|
|
15168
15453
|
"checked:bg-eui-secondary-700 checked:border-eui-primary-400": field2.value === option.value
|
|
@@ -15174,7 +15459,7 @@ function Radio({
|
|
|
15174
15459
|
"label",
|
|
15175
15460
|
{
|
|
15176
15461
|
htmlFor: option.value,
|
|
15177
|
-
className:
|
|
15462
|
+
className: classNames16__default.default({
|
|
15178
15463
|
"eui-text-md text-sm": true
|
|
15179
15464
|
}),
|
|
15180
15465
|
children: option.label
|
|
@@ -15217,7 +15502,7 @@ function StarRatingInput({
|
|
|
15217
15502
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15218
15503
|
"div",
|
|
15219
15504
|
{
|
|
15220
|
-
className:
|
|
15505
|
+
className: classNames16__default.default({
|
|
15221
15506
|
"inline-flex gap-[4px] text-[20px]": true,
|
|
15222
15507
|
[`${styles}`]: styles
|
|
15223
15508
|
}),
|
|
@@ -15230,7 +15515,7 @@ function StarRatingInput({
|
|
|
15230
15515
|
onClick: () => handleOnClick(index),
|
|
15231
15516
|
onMouseEnter: () => setHover(index),
|
|
15232
15517
|
onMouseLeave: () => setHover(null),
|
|
15233
|
-
className:
|
|
15518
|
+
className: classNames16__default.default({
|
|
15234
15519
|
"text-yellow-600": index <= (hover ?? rating - 1),
|
|
15235
15520
|
"text-gray-400": index > (hover ?? rating - 1)
|
|
15236
15521
|
}),
|
|
@@ -15274,7 +15559,7 @@ function Select({
|
|
|
15274
15559
|
{
|
|
15275
15560
|
as: "select",
|
|
15276
15561
|
...props,
|
|
15277
|
-
className:
|
|
15562
|
+
className: classNames16__default.default({
|
|
15278
15563
|
"border peer w-full bg-eui-primary-300/10 pt-5 px-3 pb-2 text-md eui-text-md placeholder-transparent placeholder-shown:p-3 focus:border-eui-secondary-500 focus:outline-none h-[50px]": true,
|
|
15279
15564
|
"border-eui-primary-400": !(meta.touched && meta.error),
|
|
15280
15565
|
"border-red-500": meta.touched && meta.error,
|
|
@@ -15326,7 +15611,7 @@ function Switch({
|
|
|
15326
15611
|
"div",
|
|
15327
15612
|
{
|
|
15328
15613
|
onClick: () => helpers.setValue(!field.value),
|
|
15329
|
-
className:
|
|
15614
|
+
className: classNames16__default.default(
|
|
15330
15615
|
"w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer dark:bg-eui-dark-100",
|
|
15331
15616
|
"peer-checked:after:translate-x-full peer-checked:after:border-white",
|
|
15332
15617
|
"after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white",
|
|
@@ -15383,7 +15668,7 @@ function Tags({
|
|
|
15383
15668
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15384
15669
|
"div",
|
|
15385
15670
|
{
|
|
15386
|
-
className:
|
|
15671
|
+
className: classNames16__default.default(
|
|
15387
15672
|
"border rounded-sm flex flex-wrap items-center gap-2 px-2 pt-2 pb-6 min-h-[3rem]",
|
|
15388
15673
|
{
|
|
15389
15674
|
"bg-eui-primary-300/10 eui-text-md": true,
|
|
@@ -15431,7 +15716,7 @@ function Tags({
|
|
|
15431
15716
|
InputLabel_default,
|
|
15432
15717
|
{
|
|
15433
15718
|
text: placeholder,
|
|
15434
|
-
styles:
|
|
15719
|
+
styles: classNames16__default.default(
|
|
15435
15720
|
"absolute left-2 transition-all pointer-events-none text-eui-dark-200",
|
|
15436
15721
|
input.length > 0 || field.value.length > 0 ? "top-[2px] text-[13.5px]" : "top-3 text-base"
|
|
15437
15722
|
)
|
|
@@ -15472,7 +15757,7 @@ function TextArea({
|
|
|
15472
15757
|
as: "textarea",
|
|
15473
15758
|
...field,
|
|
15474
15759
|
...props,
|
|
15475
|
-
className:
|
|
15760
|
+
className: classNames16__default.default({
|
|
15476
15761
|
"border peer w-full bg-eui-primary-300/10 eui-text-md outline-none px-3 py-5 resize-none focus:resize-none focus:outline-none": true,
|
|
15477
15762
|
"transition-all ease-in-out": true,
|
|
15478
15763
|
"border-eui-primary-400 focus:border-eui-secondary-500": !(meta.touched && meta.error),
|
|
@@ -15486,7 +15771,7 @@ function TextArea({
|
|
|
15486
15771
|
InputLabel_default,
|
|
15487
15772
|
{
|
|
15488
15773
|
text: placeholder,
|
|
15489
|
-
styles:
|
|
15774
|
+
styles: classNames16__default.default(
|
|
15490
15775
|
"absolute left-2 transition-all pointer-events-none text-eui-dark-200",
|
|
15491
15776
|
field.value ? "top-[2px] text-[13.5px]" : "top-3 text-base"
|
|
15492
15777
|
)
|
|
@@ -15517,7 +15802,7 @@ function ContentArea({
|
|
|
15517
15802
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15518
15803
|
"div",
|
|
15519
15804
|
{
|
|
15520
|
-
className:
|
|
15805
|
+
className: classNames16__default.default({
|
|
15521
15806
|
"min-h-screen h-full w-full py-3 px-5": true,
|
|
15522
15807
|
"py-3 px-5": !enablePadding,
|
|
15523
15808
|
"py-3 px-5 lg:px-[150px]": enablePadding,
|
|
@@ -15533,7 +15818,7 @@ function FlexCol({ children, gap = 3, styles }) {
|
|
|
15533
15818
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15534
15819
|
"div",
|
|
15535
15820
|
{
|
|
15536
|
-
className:
|
|
15821
|
+
className: classNames16__default.default({
|
|
15537
15822
|
[`flex flex-col gap-${gap}`]: true,
|
|
15538
15823
|
[`${styles}`]: styles
|
|
15539
15824
|
}),
|
|
@@ -15546,7 +15831,7 @@ function FlexRow({ children, gap = 3, styles }) {
|
|
|
15546
15831
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15547
15832
|
"div",
|
|
15548
15833
|
{
|
|
15549
|
-
className:
|
|
15834
|
+
className: classNames16__default.default({
|
|
15550
15835
|
[`flex flex-row gap-${gap}`]: true,
|
|
15551
15836
|
[`${styles}`]: styles
|
|
15552
15837
|
}),
|
|
@@ -15565,7 +15850,7 @@ function Grid({ children, styles }) {
|
|
|
15565
15850
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15566
15851
|
"div",
|
|
15567
15852
|
{
|
|
15568
|
-
className:
|
|
15853
|
+
className: classNames16__default.default({
|
|
15569
15854
|
[`grid`]: true,
|
|
15570
15855
|
[`${styles}`]: styles
|
|
15571
15856
|
}),
|
|
@@ -15582,7 +15867,7 @@ var Layout = ({
|
|
|
15582
15867
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15583
15868
|
"div",
|
|
15584
15869
|
{
|
|
15585
|
-
className:
|
|
15870
|
+
className: classNames16__default.default({
|
|
15586
15871
|
// "flex h-full w-screen bg-gray-100 overflow-auto": true,
|
|
15587
15872
|
"flex bg-eui-light-600": true,
|
|
15588
15873
|
"flex-col": flexDirection === "vertical",
|
|
@@ -15601,7 +15886,7 @@ var Header = ({
|
|
|
15601
15886
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15602
15887
|
"div",
|
|
15603
15888
|
{
|
|
15604
|
-
className:
|
|
15889
|
+
className: classNames16__default.default({
|
|
15605
15890
|
static: position === "static",
|
|
15606
15891
|
fixed: position === "fixed",
|
|
15607
15892
|
sticky: position === "sticky",
|
|
@@ -15641,7 +15926,7 @@ var Content = ({
|
|
|
15641
15926
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15642
15927
|
"div",
|
|
15643
15928
|
{
|
|
15644
|
-
className:
|
|
15929
|
+
className: classNames16__default.default({
|
|
15645
15930
|
"w-full min-h-screen transition-all duration-200 eui-bg-sm": true,
|
|
15646
15931
|
"md:pl-[300px]": !overlayedSidebar && sidebarVisible && !isMobile,
|
|
15647
15932
|
// Shift when sidebar is open (desktop)
|
|
@@ -15657,7 +15942,7 @@ var Footer = ({ children, styles }) => {
|
|
|
15657
15942
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15658
15943
|
"div",
|
|
15659
15944
|
{
|
|
15660
|
-
className:
|
|
15945
|
+
className: classNames16__default.default({
|
|
15661
15946
|
"bottom-0 w-full h-fit": true,
|
|
15662
15947
|
"border-t border-eui-dark-500/40 dark:border-eui-secondary-800 eui-bg-md": !styles,
|
|
15663
15948
|
[`${styles}`]: styles
|
|
@@ -15745,7 +16030,7 @@ function MarkdownEditor({
|
|
|
15745
16030
|
const [field, meta, helpers] = formik.useField(props);
|
|
15746
16031
|
const { theme } = useTheme_default();
|
|
15747
16032
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
15748
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
16033
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames16__default.default(theme === "dark" ? "dark" : "", styles), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15749
16034
|
editor.MDXEditor,
|
|
15750
16035
|
{
|
|
15751
16036
|
markdown: field.value,
|
|
@@ -15848,7 +16133,7 @@ function MarkdownTOC({ title = "Table of Contents" }) {
|
|
|
15848
16133
|
"button",
|
|
15849
16134
|
{
|
|
15850
16135
|
onClick: () => scrollToHeading(heading.id),
|
|
15851
|
-
className:
|
|
16136
|
+
className: classNames16__default.default(
|
|
15852
16137
|
"block w-full text-left text-sm transition-all ease-in-out duration-150",
|
|
15853
16138
|
"hover:text-primary",
|
|
15854
16139
|
activeHeading === heading.id ? "text-primary font-semibold underline" : "text-gray-500 dark:text-gray-400"
|
|
@@ -16004,7 +16289,7 @@ function BreadcrumbItem({
|
|
|
16004
16289
|
{
|
|
16005
16290
|
href,
|
|
16006
16291
|
onClick,
|
|
16007
|
-
className:
|
|
16292
|
+
className: classNames16__default.default({
|
|
16008
16293
|
"text-lg font-semibold": true,
|
|
16009
16294
|
"text-gray-400 hover:text-gray-600 cursor-pointer": !active,
|
|
16010
16295
|
"text-eui-light-800": active,
|
|
@@ -16081,7 +16366,7 @@ var Breadcrumb = ({
|
|
|
16081
16366
|
index < resolvedData.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16082
16367
|
"span",
|
|
16083
16368
|
{
|
|
16084
|
-
className:
|
|
16369
|
+
className: classNames16__default.default({
|
|
16085
16370
|
"text-lg font-semibold text-gray-500": true,
|
|
16086
16371
|
[`px-${gap}`]: gap
|
|
16087
16372
|
}),
|
|
@@ -16095,7 +16380,7 @@ var Breadcrumb = ({
|
|
|
16095
16380
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16096
16381
|
"div",
|
|
16097
16382
|
{
|
|
16098
|
-
className:
|
|
16383
|
+
className: classNames16__default.default({
|
|
16099
16384
|
"inline-flex": true,
|
|
16100
16385
|
[`${styles}`]: styles
|
|
16101
16386
|
}),
|
|
@@ -16125,7 +16410,7 @@ var Drawer = ({
|
|
|
16125
16410
|
{
|
|
16126
16411
|
show: visibility,
|
|
16127
16412
|
enter: "transform transition duration-200 ease-out",
|
|
16128
|
-
enterFrom:
|
|
16413
|
+
enterFrom: classNames16__default.default({
|
|
16129
16414
|
"-translate-x-full": side === "left",
|
|
16130
16415
|
"translate-x-full": side === "right",
|
|
16131
16416
|
"-translate-y-full": side === "top",
|
|
@@ -16134,7 +16419,7 @@ var Drawer = ({
|
|
|
16134
16419
|
enterTo: "translate-x-0 translate-y-0",
|
|
16135
16420
|
leave: "transform transition duration-200 ease-in",
|
|
16136
16421
|
leaveFrom: "translate-x-0 translate-y-0",
|
|
16137
|
-
leaveTo:
|
|
16422
|
+
leaveTo: classNames16__default.default({
|
|
16138
16423
|
"-translate-x-full": side === "left",
|
|
16139
16424
|
"translate-x-full": side === "right",
|
|
16140
16425
|
"-translate-y-full": side === "top",
|
|
@@ -16143,7 +16428,7 @@ var Drawer = ({
|
|
|
16143
16428
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16144
16429
|
"div",
|
|
16145
16430
|
{
|
|
16146
|
-
className:
|
|
16431
|
+
className: classNames16__default.default(
|
|
16147
16432
|
"fixed shadow-lg z-50",
|
|
16148
16433
|
{
|
|
16149
16434
|
"h-full w-[300px]": isHorizontal,
|
|
@@ -16175,7 +16460,7 @@ function DrawerToggler({
|
|
|
16175
16460
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16176
16461
|
"div",
|
|
16177
16462
|
{
|
|
16178
|
-
className:
|
|
16463
|
+
className: classNames16__default.default({
|
|
16179
16464
|
"text-xl p-3 cursor-pointer": true,
|
|
16180
16465
|
"transition-all ease-in-out": true,
|
|
16181
16466
|
"text-eui-dark-500 dark:text-eui-secondary-600": !styles,
|
|
@@ -16223,7 +16508,7 @@ function FooterNav({ data = [], styles }) {
|
|
|
16223
16508
|
childrenContent = /* @__PURE__ */ jsxRuntime.jsx(
|
|
16224
16509
|
"div",
|
|
16225
16510
|
{
|
|
16226
|
-
className:
|
|
16511
|
+
className: classNames16__default.default({
|
|
16227
16512
|
"grid w-full": true,
|
|
16228
16513
|
"grid-cols-1": isMobile,
|
|
16229
16514
|
"grid-cols-3": !isMobile,
|
|
@@ -16236,7 +16521,7 @@ function FooterNav({ data = [], styles }) {
|
|
|
16236
16521
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16237
16522
|
"div",
|
|
16238
16523
|
{
|
|
16239
|
-
className:
|
|
16524
|
+
className: classNames16__default.default({
|
|
16240
16525
|
[`${styles}`]: styles
|
|
16241
16526
|
}),
|
|
16242
16527
|
children: childrenContent
|
|
@@ -16277,7 +16562,7 @@ var FooterNavGroup = ({
|
|
|
16277
16562
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16278
16563
|
"div",
|
|
16279
16564
|
{
|
|
16280
|
-
className:
|
|
16565
|
+
className: classNames16__default.default({
|
|
16281
16566
|
"": true,
|
|
16282
16567
|
"py-2 font-semibold eui-text-lg": !styles,
|
|
16283
16568
|
[`${styles}`]: styles
|
|
@@ -16322,7 +16607,7 @@ var FooterNavItem = ({
|
|
|
16322
16607
|
"div",
|
|
16323
16608
|
{
|
|
16324
16609
|
onClick: handleNavigation,
|
|
16325
|
-
className:
|
|
16610
|
+
className: classNames16__default.default({
|
|
16326
16611
|
"flex flex-row items-center gap-3 cursor-pointer p-1 w-full": true,
|
|
16327
16612
|
"transition-all duration-200 ease-in-out": true,
|
|
16328
16613
|
"text-sm eui-text-sm": !styles,
|
|
@@ -16351,7 +16636,7 @@ var FooterNavItemTitle = ({
|
|
|
16351
16636
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16352
16637
|
"div",
|
|
16353
16638
|
{
|
|
16354
|
-
className:
|
|
16639
|
+
className: classNames16__default.default({
|
|
16355
16640
|
"": true,
|
|
16356
16641
|
"py-2 font-thin eui-text-md": !styles,
|
|
16357
16642
|
[`${styles}`]: styles
|
|
@@ -16404,7 +16689,7 @@ function HeaderNav({ data = [], styles }) {
|
|
|
16404
16689
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16405
16690
|
"div",
|
|
16406
16691
|
{
|
|
16407
|
-
className:
|
|
16692
|
+
className: classNames16__default.default({
|
|
16408
16693
|
[`${styles}`]: styles
|
|
16409
16694
|
}),
|
|
16410
16695
|
children: childrenContent
|
|
@@ -16466,7 +16751,7 @@ var HeaderNavGroup = ({
|
|
|
16466
16751
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16467
16752
|
"div",
|
|
16468
16753
|
{
|
|
16469
|
-
className:
|
|
16754
|
+
className: classNames16__default.default({
|
|
16470
16755
|
"flex flex-row gap-2 items-center justify-between cursor-pointer p-3 w-full": true,
|
|
16471
16756
|
"transition-all duration-300 ease-in-out": true,
|
|
16472
16757
|
"eui-text-md bg-gradient-to-t from-eui-dark-500/10 dark:from-green-700/10": !styles,
|
|
@@ -16494,7 +16779,7 @@ var HeaderNavGroup = ({
|
|
|
16494
16779
|
children && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16495
16780
|
bs.BsChevronDown,
|
|
16496
16781
|
{
|
|
16497
|
-
className:
|
|
16782
|
+
className: classNames16__default.default({
|
|
16498
16783
|
"text-md": true,
|
|
16499
16784
|
"transition-all ease-in-out duration-300": true,
|
|
16500
16785
|
"rotate-180": !collapsed
|
|
@@ -16507,7 +16792,7 @@ var HeaderNavGroup = ({
|
|
|
16507
16792
|
!collapsed && children && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16508
16793
|
"div",
|
|
16509
16794
|
{
|
|
16510
|
-
className:
|
|
16795
|
+
className: classNames16__default.default({
|
|
16511
16796
|
"absolute min-w-80 left-0 top-full mt-1 border border-eui-dark-300/10 dark:border-eui-dark-300/50 shadow-lg eui-shadow-lg z-50 w-full eui-bg-md": true,
|
|
16512
16797
|
"transition-all duration-300 ease-in-out": true
|
|
16513
16798
|
}),
|
|
@@ -16537,7 +16822,7 @@ var HeaderNavItem = ({
|
|
|
16537
16822
|
"div",
|
|
16538
16823
|
{
|
|
16539
16824
|
onClick: handleNavigation,
|
|
16540
|
-
className:
|
|
16825
|
+
className: classNames16__default.default({
|
|
16541
16826
|
"flex flex-row items-center gap-3 cursor-pointer p-3 w-full": true,
|
|
16542
16827
|
"transition-all duration-200 ease-in-out": true,
|
|
16543
16828
|
"eui-text-md border-b border-eui-dark-500/20 dark:border-eui-secondary-900/20 bg-gradient-to-r from-eui-dark-500/10 dark:from-eui-secondary-900/10": !styles,
|
|
@@ -16566,7 +16851,7 @@ var HeaderNavItemTitle = ({
|
|
|
16566
16851
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16567
16852
|
"div",
|
|
16568
16853
|
{
|
|
16569
|
-
className:
|
|
16854
|
+
className: classNames16__default.default({
|
|
16570
16855
|
"p-3 font-thin": true,
|
|
16571
16856
|
"eui-text-md": !styles,
|
|
16572
16857
|
[`${styles}`]: styles
|
|
@@ -16606,7 +16891,7 @@ var Link = ({
|
|
|
16606
16891
|
href: href || "#",
|
|
16607
16892
|
target: targets[target],
|
|
16608
16893
|
onClick: handleClick,
|
|
16609
|
-
className:
|
|
16894
|
+
className: classNames16__default.default({
|
|
16610
16895
|
[`${textVariants[variant]}`]: variant,
|
|
16611
16896
|
[`${decorations[decoration]}`]: decoration,
|
|
16612
16897
|
"font-bold": bold,
|
|
@@ -17071,7 +17356,7 @@ function Modal({
|
|
|
17071
17356
|
"div",
|
|
17072
17357
|
{
|
|
17073
17358
|
ref: modalRef,
|
|
17074
|
-
className:
|
|
17359
|
+
className: classNames16__default.default({
|
|
17075
17360
|
"eui-bg-md eui-shadow-lg border border-gray-700/80 w-fit h-fit": true,
|
|
17076
17361
|
[`${shapes[resolvedShape]}`]: true,
|
|
17077
17362
|
[`${styles}`]: styles
|
|
@@ -17082,7 +17367,7 @@ function Modal({
|
|
|
17082
17367
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17083
17368
|
"div",
|
|
17084
17369
|
{
|
|
17085
|
-
className:
|
|
17370
|
+
className: classNames16__default.default({
|
|
17086
17371
|
"w-[60px] h-[60px] flex items-center justify-center transition-standard-fast": true,
|
|
17087
17372
|
"hover:cursor-pointer hover:bg-eui-dark-500": true
|
|
17088
17373
|
}),
|
|
@@ -17188,7 +17473,7 @@ function ShowMore({ text, limit }) {
|
|
|
17188
17473
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17189
17474
|
"div",
|
|
17190
17475
|
{
|
|
17191
|
-
className:
|
|
17476
|
+
className: classNames16__default.default({
|
|
17192
17477
|
"text-blue-300 px-1 pb-1 mt-1": true,
|
|
17193
17478
|
"bg-slate-900/70": !showMore,
|
|
17194
17479
|
"bg-gradient-to-t from-slate-900/50 to-transparent": showMore
|
|
@@ -17343,6 +17628,80 @@ function Slider({ isLoading, isSuccess, coverArt, screenshots }) {
|
|
|
17343
17628
|
] }) });
|
|
17344
17629
|
}
|
|
17345
17630
|
var Slider_default = Slider;
|
|
17631
|
+
function StarRatingDistribution({
|
|
17632
|
+
numericRating = true,
|
|
17633
|
+
progressBarsRating = true,
|
|
17634
|
+
ratingDistribution = [
|
|
17635
|
+
{ star: 5, count: 0 },
|
|
17636
|
+
{ star: 4, count: 0 },
|
|
17637
|
+
{ star: 3, count: 0 },
|
|
17638
|
+
{ star: 2, count: 0 },
|
|
17639
|
+
{ star: 1, count: 0 }
|
|
17640
|
+
],
|
|
17641
|
+
variant = "warning",
|
|
17642
|
+
appearance = "solid",
|
|
17643
|
+
shape = "roundedSquare",
|
|
17644
|
+
size = "sm",
|
|
17645
|
+
animated = true,
|
|
17646
|
+
striped = false,
|
|
17647
|
+
showReviewCount = true,
|
|
17648
|
+
className,
|
|
17649
|
+
...rest
|
|
17650
|
+
}) {
|
|
17651
|
+
const totalReviews = ratingDistribution.reduce(
|
|
17652
|
+
(acc, item) => acc + item.count,
|
|
17653
|
+
0
|
|
17654
|
+
);
|
|
17655
|
+
const averageRating = totalReviews > 0 ? ratingDistribution.reduce(
|
|
17656
|
+
(acc, item) => acc + item.star * item.count,
|
|
17657
|
+
0
|
|
17658
|
+
) / totalReviews : 0;
|
|
17659
|
+
const ratingDistributionWithPercentage = ratingDistribution.map((item) => ({
|
|
17660
|
+
star: item.star,
|
|
17661
|
+
percentage: totalReviews > 0 ? item.count / totalReviews * 100 : 0
|
|
17662
|
+
}));
|
|
17663
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17664
|
+
"div",
|
|
17665
|
+
{
|
|
17666
|
+
...rest,
|
|
17667
|
+
className: cn(
|
|
17668
|
+
"flex flex-col md:flex-row items-center gap-8",
|
|
17669
|
+
"p-6",
|
|
17670
|
+
"bg-white dark:bg-neutral-900",
|
|
17671
|
+
"border border-gray-200 dark:border-neutral-800",
|
|
17672
|
+
"rounded-2xl shadow-sm",
|
|
17673
|
+
className
|
|
17674
|
+
),
|
|
17675
|
+
children: [
|
|
17676
|
+
numericRating && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17677
|
+
NumericRating_default,
|
|
17678
|
+
{
|
|
17679
|
+
rating: averageRating,
|
|
17680
|
+
totalReviews,
|
|
17681
|
+
size: "md",
|
|
17682
|
+
showStars: true,
|
|
17683
|
+
showReviewCount
|
|
17684
|
+
}
|
|
17685
|
+
),
|
|
17686
|
+
progressBarsRating && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-3 w-full min-w-[260px]", children: ratingDistributionWithPercentage.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17687
|
+
ProgressBarRating_default,
|
|
17688
|
+
{
|
|
17689
|
+
star: item.star,
|
|
17690
|
+
percentage: item.percentage,
|
|
17691
|
+
variant,
|
|
17692
|
+
appearance,
|
|
17693
|
+
shape,
|
|
17694
|
+
size,
|
|
17695
|
+
animated,
|
|
17696
|
+
striped
|
|
17697
|
+
},
|
|
17698
|
+
item.star
|
|
17699
|
+
)) })
|
|
17700
|
+
]
|
|
17701
|
+
}
|
|
17702
|
+
);
|
|
17703
|
+
}
|
|
17704
|
+
var StarRatingDistribution_default = StarRatingDistribution;
|
|
17346
17705
|
function WorldMapCountryTable({
|
|
17347
17706
|
title = "Country Breakdown",
|
|
17348
17707
|
data
|
|
@@ -17439,7 +17798,7 @@ function BoxNavItem({ icon, name, to, selected, onClick }) {
|
|
|
17439
17798
|
type: "button",
|
|
17440
17799
|
onClick: handleClick,
|
|
17441
17800
|
"aria-current": selected ? "page" : void 0,
|
|
17442
|
-
className:
|
|
17801
|
+
className: classNames16__default.default(
|
|
17443
17802
|
"w-full min-w-[80px] flex flex-col items-center justify-center py-3 text-center",
|
|
17444
17803
|
"hover:text-secondary-700 hover:bg-gray-300/10 hover:cursor-pointer",
|
|
17445
17804
|
selected ? "text-eui-secondary-700 bg-gray-300/10" : "text-gray-400",
|
|
@@ -17829,7 +18188,7 @@ function GenericLayout({
|
|
|
17829
18188
|
return /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { defaultTheme, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17830
18189
|
"div",
|
|
17831
18190
|
{
|
|
17832
|
-
className:
|
|
18191
|
+
className: classNames16__default.default({
|
|
17833
18192
|
[`${styles}`]: styles
|
|
17834
18193
|
}),
|
|
17835
18194
|
children
|
|
@@ -17878,7 +18237,7 @@ function SidemenuLayout({ data, children }) {
|
|
|
17878
18237
|
return /* @__PURE__ */ jsxRuntime.jsx(DefaultLayout_default, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17879
18238
|
"div",
|
|
17880
18239
|
{
|
|
17881
|
-
className:
|
|
18240
|
+
className: classNames16__default.default({
|
|
17882
18241
|
grid: true,
|
|
17883
18242
|
"grid-cols-7 gap-10": !isMobile,
|
|
17884
18243
|
"grid-cols-1 gap-": isMobile
|
|
@@ -17950,7 +18309,7 @@ exports.BoxNavItem = BoxNavItem_default;
|
|
|
17950
18309
|
exports.Brand = Brand_default;
|
|
17951
18310
|
exports.Breadcrumb = Breadcrumb;
|
|
17952
18311
|
exports.BreadcrumbItem = BreadcrumbItem_default;
|
|
17953
|
-
exports.Button =
|
|
18312
|
+
exports.Button = Button_default;
|
|
17954
18313
|
exports.Caption = Caption;
|
|
17955
18314
|
exports.Card = Card_default;
|
|
17956
18315
|
exports.CardContent = CardContent_default;
|
|
@@ -17960,6 +18319,7 @@ exports.Chapter = Chapter;
|
|
|
17960
18319
|
exports.Checkbox = Checkbox_default;
|
|
17961
18320
|
exports.Chip = Chip;
|
|
17962
18321
|
exports.CloudinaryImage = CloudinaryImage_default;
|
|
18322
|
+
exports.CloudinaryProvider = CloudinaryProvider;
|
|
17963
18323
|
exports.CloudinaryVideo = CloudinaryVideo_default;
|
|
17964
18324
|
exports.Code = Code;
|
|
17965
18325
|
exports.Content = Content;
|
|
@@ -18027,11 +18387,13 @@ exports.MenuItemTitle = MenuItemTitle;
|
|
|
18027
18387
|
exports.Modal = Modal_default;
|
|
18028
18388
|
exports.MotionSurface = MotionSurface_default;
|
|
18029
18389
|
exports.MultiImageInput = MultiImageInput_default;
|
|
18390
|
+
exports.NumericRating = NumericRating_default;
|
|
18030
18391
|
exports.Overline = Overline;
|
|
18031
18392
|
exports.Paragraph = Paragraph;
|
|
18032
18393
|
exports.PieChart = PieChart_default;
|
|
18033
18394
|
exports.PriceTag = PriceTag;
|
|
18034
18395
|
exports.ProgressBar = ProgressBar;
|
|
18396
|
+
exports.ProgressBarRating = ProgressBarRating_default;
|
|
18035
18397
|
exports.Quote = Quote;
|
|
18036
18398
|
exports.Radio = Radio_default;
|
|
18037
18399
|
exports.RouteTab = RouteTab_default;
|
|
@@ -18085,9 +18447,11 @@ exports.isMatch = isMatch;
|
|
|
18085
18447
|
exports.isRenderFn = isRenderFn;
|
|
18086
18448
|
exports.normalize = normalize;
|
|
18087
18449
|
exports.registerLayout = registerLayout;
|
|
18450
|
+
exports.resolveAppearanceStyles = resolveAppearanceStyles;
|
|
18088
18451
|
exports.resolveWithGlobal = resolveWithGlobal;
|
|
18089
18452
|
exports.sendToast = sendToast;
|
|
18090
18453
|
exports.useClickOutside = useClickOutside;
|
|
18454
|
+
exports.useCloudinaryConfig = useCloudinaryConfig;
|
|
18091
18455
|
exports.useCurrentTheme = useCurrentTheme_default;
|
|
18092
18456
|
exports.useDrawer = useDrawer_default;
|
|
18093
18457
|
exports.useEUIConfig = useEUIConfig;
|