elseware-ui 2.30.1 → 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 +122 -60
- package/dist/index.d.ts +122 -60
- package/dist/index.js +735 -377
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +732 -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 })
|
|
@@ -1626,19 +1670,27 @@ function Info({
|
|
|
1626
1670
|
children,
|
|
1627
1671
|
variant = "default",
|
|
1628
1672
|
appearance = "lite",
|
|
1629
|
-
shape
|
|
1673
|
+
shape,
|
|
1630
1674
|
className,
|
|
1631
1675
|
...rest
|
|
1632
1676
|
}) {
|
|
1633
|
-
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
|
+
});
|
|
1634
1686
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1635
1687
|
"div",
|
|
1636
1688
|
{
|
|
1637
1689
|
...rest,
|
|
1638
1690
|
className: cn(
|
|
1639
|
-
"w-full p-5 text-sm transition-
|
|
1691
|
+
"w-full p-5 text-sm transition-all duration-300",
|
|
1640
1692
|
variantStyles,
|
|
1641
|
-
shapes[
|
|
1693
|
+
shapes[resolvedShape],
|
|
1642
1694
|
className
|
|
1643
1695
|
),
|
|
1644
1696
|
children
|
|
@@ -1984,7 +2036,7 @@ var ListItem = ({
|
|
|
1984
2036
|
align = "start",
|
|
1985
2037
|
className
|
|
1986
2038
|
}) => {
|
|
1987
|
-
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: [
|
|
1988
2040
|
index + 1,
|
|
1989
2041
|
"."
|
|
1990
2042
|
] }) : bulletTypes[bulletType]);
|
|
@@ -1993,7 +2045,7 @@ var ListItem = ({
|
|
|
1993
2045
|
{
|
|
1994
2046
|
className: cn(
|
|
1995
2047
|
"flex gap-3",
|
|
1996
|
-
align === "center"
|
|
2048
|
+
align === "center" ? "items-center" : "items-baseline",
|
|
1997
2049
|
className
|
|
1998
2050
|
),
|
|
1999
2051
|
children: [
|
|
@@ -2001,18 +2053,23 @@ var ListItem = ({
|
|
|
2001
2053
|
"div",
|
|
2002
2054
|
{
|
|
2003
2055
|
className: cn(
|
|
2004
|
-
"
|
|
2005
|
-
|
|
2006
|
-
bulletType
|
|
2056
|
+
"shrink-0 text-gray-400 dark:text-gray-500",
|
|
2057
|
+
"w-[14px] flex justify-center",
|
|
2058
|
+
bulletType !== "number" && "mt-[0.35em]"
|
|
2007
2059
|
),
|
|
2008
2060
|
children: bullet
|
|
2009
2061
|
}
|
|
2010
2062
|
),
|
|
2011
|
-
TypographyComponent ? React4__default.default.cloneElement(
|
|
2063
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: TypographyComponent ? React4__default.default.cloneElement(
|
|
2012
2064
|
TypographyComponent,
|
|
2013
|
-
{
|
|
2065
|
+
{
|
|
2066
|
+
className: cn(
|
|
2067
|
+
"leading-relaxed",
|
|
2068
|
+
TypographyComponent?.props?.className
|
|
2069
|
+
)
|
|
2070
|
+
},
|
|
2014
2071
|
content
|
|
2015
|
-
) : content
|
|
2072
|
+
) : content })
|
|
2016
2073
|
]
|
|
2017
2074
|
}
|
|
2018
2075
|
);
|
|
@@ -2032,10 +2089,16 @@ var gridCols = {
|
|
|
2032
2089
|
};
|
|
2033
2090
|
function normalizeItem(item, defaultBulletType) {
|
|
2034
2091
|
if (typeof item === "string") {
|
|
2035
|
-
return {
|
|
2092
|
+
return {
|
|
2093
|
+
content: item,
|
|
2094
|
+
bulletType: defaultBulletType
|
|
2095
|
+
};
|
|
2036
2096
|
}
|
|
2037
2097
|
if (React4__default.default.isValidElement(item)) {
|
|
2038
|
-
return {
|
|
2098
|
+
return {
|
|
2099
|
+
content: item,
|
|
2100
|
+
bulletType: defaultBulletType
|
|
2101
|
+
};
|
|
2039
2102
|
}
|
|
2040
2103
|
return {
|
|
2041
2104
|
bulletType: defaultBulletType,
|
|
@@ -2056,8 +2119,8 @@ function List({
|
|
|
2056
2119
|
}) {
|
|
2057
2120
|
const isGrid = !!columns;
|
|
2058
2121
|
const isOrdered = bulletType === "number";
|
|
2059
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, className: cn("py-
|
|
2060
|
-
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 }),
|
|
2061
2124
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2062
2125
|
"div",
|
|
2063
2126
|
{
|
|
@@ -2078,7 +2141,8 @@ function List({
|
|
|
2078
2141
|
bulletType: normalized.bulletType,
|
|
2079
2142
|
renderBullet: normalized.renderBullet,
|
|
2080
2143
|
TypographyComponent: normalized.TypographyComponent,
|
|
2081
|
-
className: normalized.className
|
|
2144
|
+
className: normalized.className,
|
|
2145
|
+
align
|
|
2082
2146
|
},
|
|
2083
2147
|
i
|
|
2084
2148
|
);
|
|
@@ -2088,230 +2152,404 @@ function List({
|
|
|
2088
2152
|
] });
|
|
2089
2153
|
}
|
|
2090
2154
|
var List_default = List;
|
|
2091
|
-
var
|
|
2092
|
-
|
|
2155
|
+
var calculateDiscountedPrice = (price, discount) => {
|
|
2156
|
+
if (!discount) return price;
|
|
2157
|
+
return price - price * discount / 100;
|
|
2093
2158
|
};
|
|
2159
|
+
var formatPrice = (value, decimals) => value.toFixed(decimals);
|
|
2094
2160
|
function PriceTag({
|
|
2095
|
-
discount,
|
|
2096
2161
|
price,
|
|
2162
|
+
discount,
|
|
2097
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,
|
|
2098
2172
|
className,
|
|
2099
2173
|
...rest
|
|
2100
2174
|
}) {
|
|
2101
|
-
|
|
2102
|
-
|
|
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(
|
|
2103
2188
|
"div",
|
|
2104
2189
|
{
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
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"
|
|
2108
2199
|
}
|
|
2109
|
-
);
|
|
2200
|
+
) });
|
|
2110
2201
|
}
|
|
2111
|
-
|
|
2112
|
-
|
|
2202
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, className: cn("inline-flex items-center gap-3", className), children: [
|
|
2203
|
+
!!discount && discount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2113
2204
|
"div",
|
|
2114
2205
|
{
|
|
2115
|
-
|
|
2116
|
-
|
|
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
|
+
),
|
|
2117
2214
|
children: [
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
"%"
|
|
2122
|
-
] }),
|
|
2123
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex gap-1 items-center", children: [
|
|
2124
|
-
discount ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex gap-[3px] font-semibold", children: [
|
|
2125
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "eui-text-sm line-through", children: [
|
|
2126
|
-
getCurrencySymbol(code),
|
|
2127
|
-
price
|
|
2128
|
-
] }),
|
|
2129
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "eui-text-md", children: [
|
|
2130
|
-
getCurrencySymbol(code),
|
|
2131
|
-
applyDiscount(discount, price)
|
|
2132
|
-
] })
|
|
2133
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-gray-50 font-semibold", children: [
|
|
2134
|
-
getCurrencySymbol(code),
|
|
2135
|
-
price
|
|
2136
|
-
] }),
|
|
2137
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-yellow-500 font-thin", children: code })
|
|
2138
|
-
] })
|
|
2215
|
+
"-",
|
|
2216
|
+
discount,
|
|
2217
|
+
"%"
|
|
2139
2218
|
]
|
|
2140
2219
|
}
|
|
2141
|
-
)
|
|
2142
|
-
|
|
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
|
+
] });
|
|
2143
2252
|
}
|
|
2144
|
-
var
|
|
2145
|
-
xs:
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
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
|
+
}
|
|
2150
2274
|
};
|
|
2151
|
-
|
|
2275
|
+
function ProgressBar({
|
|
2152
2276
|
value,
|
|
2277
|
+
min = 0,
|
|
2278
|
+
max = 100,
|
|
2153
2279
|
variant = "success",
|
|
2154
|
-
|
|
2280
|
+
appearance = "solid",
|
|
2281
|
+
size = "md",
|
|
2282
|
+
shape,
|
|
2283
|
+
striped = false,
|
|
2284
|
+
animated = true,
|
|
2155
2285
|
showLabel = true,
|
|
2156
|
-
label,
|
|
2286
|
+
label = "Progress",
|
|
2157
2287
|
labelPlacement = "top",
|
|
2288
|
+
showPercentage = true,
|
|
2289
|
+
startContent,
|
|
2290
|
+
endContent,
|
|
2291
|
+
trackClassName,
|
|
2292
|
+
barClassName,
|
|
2158
2293
|
className,
|
|
2159
2294
|
...rest
|
|
2160
|
-
})
|
|
2161
|
-
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
|
+
);
|
|
2162
2333
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...rest, className: cn("w-full", className), children: [
|
|
2163
|
-
|
|
2164
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: label ?? "Progress" }),
|
|
2165
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
2166
|
-
clampedValue,
|
|
2167
|
-
"%"
|
|
2168
|
-
] })
|
|
2169
|
-
] }),
|
|
2334
|
+
hasTopLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-2", children: labelNode }),
|
|
2170
2335
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2171
2336
|
"div",
|
|
2172
2337
|
{
|
|
2173
2338
|
className: cn(
|
|
2174
|
-
"relative
|
|
2175
|
-
|
|
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
|
|
2176
2346
|
),
|
|
2347
|
+
role: "progressbar",
|
|
2348
|
+
"aria-valuemin": min,
|
|
2349
|
+
"aria-valuemax": max,
|
|
2350
|
+
"aria-valuenow": clampedValue,
|
|
2177
2351
|
children: [
|
|
2178
2352
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2179
2353
|
"div",
|
|
2180
2354
|
{
|
|
2181
2355
|
className: cn(
|
|
2182
|
-
"h-full
|
|
2183
|
-
|
|
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
|
|
2184
2368
|
),
|
|
2185
|
-
style: {
|
|
2369
|
+
style: {
|
|
2370
|
+
width: `${percentage}%`
|
|
2371
|
+
}
|
|
2186
2372
|
}
|
|
2187
2373
|
),
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
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
|
+
)
|
|
2194
2394
|
]
|
|
2195
2395
|
}
|
|
2196
|
-
)
|
|
2396
|
+
),
|
|
2397
|
+
hasBottomLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: labelNode })
|
|
2197
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"
|
|
2198
2406
|
};
|
|
2199
2407
|
function StarRating({
|
|
2200
2408
|
rating,
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2409
|
+
max = 5,
|
|
2410
|
+
size = "md",
|
|
2411
|
+
showValue = false,
|
|
2412
|
+
valuePosition = "start",
|
|
2413
|
+
iconClassName,
|
|
2204
2414
|
className,
|
|
2205
2415
|
...rest
|
|
2206
2416
|
}) {
|
|
2207
|
-
const
|
|
2208
|
-
const
|
|
2209
|
-
const
|
|
2210
|
-
const
|
|
2211
|
-
const
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
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,
|
|
2215
2424
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2216
2425
|
"div",
|
|
2217
2426
|
{
|
|
2218
2427
|
className: cn(
|
|
2219
|
-
"flex
|
|
2220
|
-
|
|
2428
|
+
"inline-flex items-center gap-[2px]",
|
|
2429
|
+
"text-yellow-500 dark:text-yellow-400",
|
|
2430
|
+
sizes[size],
|
|
2431
|
+
iconClassName
|
|
2221
2432
|
),
|
|
2222
2433
|
children: [
|
|
2223
|
-
[...Array(fullStars)].map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2224
|
-
|
|
2225
|
-
[...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))
|
|
2226
2437
|
]
|
|
2227
2438
|
}
|
|
2228
2439
|
),
|
|
2229
|
-
|
|
2230
|
-
"(",
|
|
2231
|
-
reviewAmount,
|
|
2232
|
-
")"
|
|
2233
|
-
] })
|
|
2440
|
+
showValue && valuePosition === "end" && ratingValue
|
|
2234
2441
|
] });
|
|
2235
2442
|
}
|
|
2236
2443
|
var StarRating_default = StarRating;
|
|
2237
|
-
var
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
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
|
+
}
|
|
2246
2465
|
};
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
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,
|
|
2252
2534
|
{
|
|
2253
|
-
|
|
2254
|
-
|
|
2535
|
+
value: percentage,
|
|
2536
|
+
variant,
|
|
2537
|
+
appearance,
|
|
2538
|
+
shape,
|
|
2539
|
+
size,
|
|
2540
|
+
animated,
|
|
2541
|
+
striped,
|
|
2542
|
+
showLabel: false,
|
|
2543
|
+
showPercentage: false
|
|
2255
2544
|
}
|
|
2256
2545
|
) }),
|
|
2257
|
-
/* @__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: [
|
|
2258
2547
|
percentage.toFixed(1),
|
|
2259
2548
|
"%"
|
|
2260
2549
|
] })
|
|
2261
2550
|
] });
|
|
2262
|
-
};
|
|
2263
|
-
var ProgressBarsRating = ({
|
|
2264
|
-
ratingDistribution
|
|
2265
|
-
}) => {
|
|
2266
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 w-full max-w-md", children: ratingDistribution.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2267
|
-
ProgressBarRating,
|
|
2268
|
-
{
|
|
2269
|
-
star: item.star,
|
|
2270
|
-
percentage: item.percentage
|
|
2271
|
-
},
|
|
2272
|
-
item.star
|
|
2273
|
-
)) });
|
|
2274
|
-
};
|
|
2275
|
-
function StarRatingDistribution({
|
|
2276
|
-
numericRating = true,
|
|
2277
|
-
progressBarsRating = true,
|
|
2278
|
-
ratingDistribution = [
|
|
2279
|
-
{ star: 5, count: 0 },
|
|
2280
|
-
{ star: 4, count: 0 },
|
|
2281
|
-
{ star: 3, count: 0 },
|
|
2282
|
-
{ star: 2, count: 0 },
|
|
2283
|
-
{ star: 1, count: 0 }
|
|
2284
|
-
]
|
|
2285
|
-
}) {
|
|
2286
|
-
const totalReviews = ratingDistribution.reduce(
|
|
2287
|
-
(acc, item) => acc + item.count,
|
|
2288
|
-
0
|
|
2289
|
-
);
|
|
2290
|
-
const averageRating = totalReviews > 0 ? ratingDistribution.reduce(
|
|
2291
|
-
(acc, item) => acc + item.star * item.count,
|
|
2292
|
-
0
|
|
2293
|
-
) / totalReviews : 0;
|
|
2294
|
-
const ratingDistributionWithPercentage = ratingDistribution.map((item) => ({
|
|
2295
|
-
star: item.star,
|
|
2296
|
-
percentage: totalReviews > 0 ? item.count / totalReviews * 100 : 0
|
|
2297
|
-
}));
|
|
2298
|
-
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: [
|
|
2299
|
-
numericRating && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2300
|
-
NumericRating,
|
|
2301
|
-
{
|
|
2302
|
-
averageRating,
|
|
2303
|
-
totalReviews
|
|
2304
|
-
}
|
|
2305
|
-
),
|
|
2306
|
-
progressBarsRating && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2307
|
-
ProgressBarsRating,
|
|
2308
|
-
{
|
|
2309
|
-
ratingDistribution: ratingDistributionWithPercentage
|
|
2310
|
-
}
|
|
2311
|
-
)
|
|
2312
|
-
] });
|
|
2313
2551
|
}
|
|
2314
|
-
var
|
|
2552
|
+
var ProgressBarRating_default = ProgressBarRating;
|
|
2315
2553
|
function Table({
|
|
2316
2554
|
title,
|
|
2317
2555
|
columns,
|
|
@@ -2619,7 +2857,7 @@ var Form = ({
|
|
|
2619
2857
|
/* @__PURE__ */ jsxRuntime.jsx(UnsavedChangesGuard_default, { formik: formik$1, enabled: warnOnUnsavedChanges }),
|
|
2620
2858
|
/* @__PURE__ */ jsxRuntime.jsx(DirtyObserver_default, { formik: formik$1, onDirtyChange }),
|
|
2621
2859
|
/* @__PURE__ */ jsxRuntime.jsx(FormObserver_default, { formik: formik$1, onChange }),
|
|
2622
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
2860
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames16__default.default(styles), children })
|
|
2623
2861
|
] })
|
|
2624
2862
|
}
|
|
2625
2863
|
);
|
|
@@ -2628,7 +2866,7 @@ var Backdrop = ({ children, styles }) => {
|
|
|
2628
2866
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2629
2867
|
"div",
|
|
2630
2868
|
{
|
|
2631
|
-
className:
|
|
2869
|
+
className: classNames16__default.default({
|
|
2632
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,
|
|
2633
2871
|
[`${styles}`]: styles
|
|
2634
2872
|
}),
|
|
@@ -2722,7 +2960,7 @@ var Transition4 = {
|
|
|
2722
2960
|
TransitionDropdown: TransitionDropdown_default,
|
|
2723
2961
|
TransitionFadeIn: TransitionFadeIn_default
|
|
2724
2962
|
};
|
|
2725
|
-
var
|
|
2963
|
+
var sizes3 = {
|
|
2726
2964
|
xs: "px-2 py-1 text-xs",
|
|
2727
2965
|
sm: "px-3 py-2 text-sm",
|
|
2728
2966
|
md: "px-4 py-2 text-base",
|
|
@@ -2739,11 +2977,11 @@ function FormResponse({
|
|
|
2739
2977
|
return /* @__PURE__ */ jsxRuntime.jsx(Transition4.TransitionDropdown, { visibility: text ? true : false, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2740
2978
|
"div",
|
|
2741
2979
|
{
|
|
2742
|
-
className:
|
|
2980
|
+
className: classNames16__default.default({
|
|
2743
2981
|
"font-poppins font-light text-sm": true,
|
|
2744
2982
|
[`${variantsLite[variant]}`]: variant,
|
|
2745
2983
|
[`${shapes[shape]}`]: shape,
|
|
2746
|
-
[`${
|
|
2984
|
+
[`${sizes3[size]}`]: size,
|
|
2747
2985
|
[`${styles}`]: styles
|
|
2748
2986
|
}),
|
|
2749
2987
|
children: text
|
|
@@ -2856,7 +3094,7 @@ var ThemeSwitch = () => {
|
|
|
2856
3094
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2857
3095
|
"div",
|
|
2858
3096
|
{
|
|
2859
|
-
className:
|
|
3097
|
+
className: classNames16__default.default(
|
|
2860
3098
|
"w-6 h-6 bg-white dark:bg-gray-600 rounded-full shadow-md transition-transform duration-300",
|
|
2861
3099
|
theme === "dark" ? "translate-x-8" : "translate-x-0"
|
|
2862
3100
|
)
|
|
@@ -14318,31 +14556,39 @@ function WorldMap({
|
|
|
14318
14556
|
/* @__PURE__ */ jsxRuntime.jsx(Tooltip4, { show: showTooltip, children: tooltipContent })
|
|
14319
14557
|
] });
|
|
14320
14558
|
}
|
|
14321
|
-
var
|
|
14559
|
+
var sizes4 = {
|
|
14322
14560
|
xs: "px-2 py-1 text-xs",
|
|
14323
14561
|
sm: "px-3 py-1.5 text-sm",
|
|
14324
14562
|
md: "px-4 py-2 text-base",
|
|
14325
14563
|
lg: "px-5 py-3 text-lg",
|
|
14326
14564
|
xl: "px-6 py-4 text-xl"
|
|
14327
14565
|
};
|
|
14328
|
-
|
|
14566
|
+
function Button({
|
|
14329
14567
|
type = "button",
|
|
14330
14568
|
icon,
|
|
14331
14569
|
text,
|
|
14332
14570
|
children,
|
|
14333
|
-
loading,
|
|
14334
|
-
disabled,
|
|
14335
|
-
|
|
14336
|
-
block,
|
|
14571
|
+
loading = false,
|
|
14572
|
+
disabled = false,
|
|
14573
|
+
block = false,
|
|
14337
14574
|
variant = "success",
|
|
14575
|
+
appearance = "solid",
|
|
14338
14576
|
shape,
|
|
14339
14577
|
size = "md",
|
|
14340
|
-
|
|
14341
|
-
|
|
14342
|
-
|
|
14578
|
+
className,
|
|
14579
|
+
onMouseMove,
|
|
14580
|
+
...rest
|
|
14581
|
+
}) {
|
|
14343
14582
|
const eui = useEUIConfig();
|
|
14344
14583
|
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "square";
|
|
14345
14584
|
const btnRef = React4.useRef(null);
|
|
14585
|
+
const variantStyles = resolveAppearanceStyles({
|
|
14586
|
+
appearance,
|
|
14587
|
+
variant,
|
|
14588
|
+
solid: variantsSolid,
|
|
14589
|
+
lite: variantsLite,
|
|
14590
|
+
ghost: variantsGhost
|
|
14591
|
+
});
|
|
14346
14592
|
const handleMouseMove = (e) => {
|
|
14347
14593
|
const btn = btnRef.current;
|
|
14348
14594
|
if (!btn) return;
|
|
@@ -14351,38 +14597,36 @@ var Button = ({
|
|
|
14351
14597
|
const y = e.clientY - rect.top;
|
|
14352
14598
|
btn.style.setProperty("--glow-x", `${x}px`);
|
|
14353
14599
|
btn.style.setProperty("--glow-y", `${y}px`);
|
|
14600
|
+
onMouseMove?.(e);
|
|
14354
14601
|
};
|
|
14355
14602
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14356
14603
|
"button",
|
|
14357
14604
|
{
|
|
14605
|
+
...rest,
|
|
14358
14606
|
ref: btnRef,
|
|
14359
14607
|
type,
|
|
14360
|
-
onClick,
|
|
14361
|
-
onMouseMove: handleMouseMove,
|
|
14362
14608
|
disabled: disabled || loading,
|
|
14363
|
-
|
|
14364
|
-
|
|
14365
|
-
"
|
|
14366
|
-
|
|
14367
|
-
[
|
|
14368
|
-
[
|
|
14369
|
-
|
|
14370
|
-
"
|
|
14371
|
-
|
|
14372
|
-
|
|
14373
|
-
|
|
14374
|
-
[`${styles}`]: styles
|
|
14375
|
-
}),
|
|
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
|
+
),
|
|
14376
14620
|
children: [
|
|
14377
14621
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14378
14622
|
"span",
|
|
14379
14623
|
{
|
|
14380
|
-
className: "
|
|
14624
|
+
className: "pointer-events-none absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",
|
|
14381
14625
|
style: {
|
|
14382
14626
|
background: `
|
|
14383
14627
|
radial-gradient(
|
|
14384
14628
|
200px circle at var(--glow-x) var(--glow-y),
|
|
14385
|
-
rgba(
|
|
14629
|
+
rgba(255,255,255,0.18),
|
|
14386
14630
|
transparent 50%
|
|
14387
14631
|
)
|
|
14388
14632
|
`
|
|
@@ -14390,13 +14634,14 @@ var Button = ({
|
|
|
14390
14634
|
}
|
|
14391
14635
|
),
|
|
14392
14636
|
loading && /* @__PURE__ */ jsxRuntime.jsx(ai.AiOutlineLoading, { className: "animate-spin z-10" }),
|
|
14393
|
-
icon && /* @__PURE__ */ jsxRuntime.jsx("
|
|
14394
|
-
text && /* @__PURE__ */ jsxRuntime.jsx("
|
|
14395
|
-
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 })
|
|
14396
14640
|
]
|
|
14397
14641
|
}
|
|
14398
14642
|
);
|
|
14399
|
-
}
|
|
14643
|
+
}
|
|
14644
|
+
var Button_default = Button;
|
|
14400
14645
|
function InputResponse({
|
|
14401
14646
|
name,
|
|
14402
14647
|
visibility,
|
|
@@ -14406,7 +14651,7 @@ function InputResponse({
|
|
|
14406
14651
|
return /* @__PURE__ */ jsxRuntime.jsx(Transition4.TransitionDropdown, { visibility, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14407
14652
|
"div",
|
|
14408
14653
|
{
|
|
14409
|
-
className:
|
|
14654
|
+
className: classNames16__default.default({
|
|
14410
14655
|
"font-medium text-sm py-1 px-2": true,
|
|
14411
14656
|
[`${textVariants[variant]}`]: variant,
|
|
14412
14657
|
"transition-all ease-in-out": true,
|
|
@@ -14421,7 +14666,7 @@ function InputLabel({ text, children, styles }) {
|
|
|
14421
14666
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14422
14667
|
"label",
|
|
14423
14668
|
{
|
|
14424
|
-
className:
|
|
14669
|
+
className: classNames16__default.default({
|
|
14425
14670
|
"px-0 eui-text-sm text-[13.5px] pointer-events-none select-none": true,
|
|
14426
14671
|
"transition-all ease-in-out": true,
|
|
14427
14672
|
[`${styles}`]: styles
|
|
@@ -14473,7 +14718,7 @@ var Input = ({
|
|
|
14473
14718
|
...field,
|
|
14474
14719
|
...props,
|
|
14475
14720
|
placeholder,
|
|
14476
|
-
className:
|
|
14721
|
+
className: classNames16__default.default({
|
|
14477
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,
|
|
14478
14723
|
"border-eui-primary-400 focus:border-eui-secondary-500": !(meta.touched && meta.error),
|
|
14479
14724
|
"border-eui-danger-500": meta.touched && meta.error,
|
|
@@ -14518,7 +14763,7 @@ var InputFile = ({
|
|
|
14518
14763
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14519
14764
|
"div",
|
|
14520
14765
|
{
|
|
14521
|
-
className:
|
|
14766
|
+
className: classNames16__default.default(
|
|
14522
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",
|
|
14523
14768
|
{
|
|
14524
14769
|
"border-eui-primary-400 focus:border-eui-secondary-500": !(meta.touched && meta.error),
|
|
@@ -14544,7 +14789,7 @@ var InputFile = ({
|
|
|
14544
14789
|
InputLabel_default,
|
|
14545
14790
|
{
|
|
14546
14791
|
text: placeholder,
|
|
14547
|
-
styles:
|
|
14792
|
+
styles: classNames16__default.default({
|
|
14548
14793
|
"absolute left-2 eui-text-sm peer-placeholder-shown:text-base peer-placeholder-shown:top-3 pointer-events-none": true,
|
|
14549
14794
|
"top-[0.7px]": showFloatingLabel,
|
|
14550
14795
|
"top-[13px] text-base": !showFloatingLabel
|
|
@@ -14570,7 +14815,7 @@ var InputList = ({ name, placeholder, shape }) => {
|
|
|
14570
14815
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsxRuntime.jsx(formik.FieldArray, { name, children: ({ push, remove, move }) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14571
14816
|
"div",
|
|
14572
14817
|
{
|
|
14573
|
-
className:
|
|
14818
|
+
className: classNames16__default.default({
|
|
14574
14819
|
"flex flex-col space-y-2 w-full bg-eui-primary-300/10": true,
|
|
14575
14820
|
[`${shapes[resolvedShape]}`]: true
|
|
14576
14821
|
}),
|
|
@@ -14601,7 +14846,7 @@ var InputList = ({ name, placeholder, shape }) => {
|
|
|
14601
14846
|
{
|
|
14602
14847
|
name: `${name}[${index}]`,
|
|
14603
14848
|
placeholder: `Item ${index + 1}`,
|
|
14604
|
-
className:
|
|
14849
|
+
className: classNames16__default.default(
|
|
14605
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]",
|
|
14606
14851
|
[`${shapes[resolvedShape]}`],
|
|
14607
14852
|
errors[name]?.[index] ? "border-eui-danger-500" : "border-eui-primary-400 focus:border-eui-secondary-500"
|
|
@@ -14669,7 +14914,7 @@ var InputListGroup = ({
|
|
|
14669
14914
|
values[name]?.map((group, groupIndex) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14670
14915
|
"div",
|
|
14671
14916
|
{
|
|
14672
|
-
className:
|
|
14917
|
+
className: classNames16__default.default({
|
|
14673
14918
|
"flex flex-col gap-2 bg-eui-primary-300/10 p-3": true,
|
|
14674
14919
|
[`${shapes[resolvedShape]}`]: true
|
|
14675
14920
|
}),
|
|
@@ -14681,7 +14926,7 @@ var InputListGroup = ({
|
|
|
14681
14926
|
{
|
|
14682
14927
|
name: `${name}[${groupIndex}].name`,
|
|
14683
14928
|
placeholder: `Group ${groupIndex + 1}`,
|
|
14684
|
-
className:
|
|
14929
|
+
className: classNames16__default.default(
|
|
14685
14930
|
"border w-full bg-eui-primary-300/10 px-3 py-2 text-md focus:outline-none h-[40px]",
|
|
14686
14931
|
[`${shapes[resolvedShape]}`],
|
|
14687
14932
|
"border-eui-primary-400 focus:border-eui-secondary-500"
|
|
@@ -14723,7 +14968,7 @@ var InputListGroup = ({
|
|
|
14723
14968
|
{
|
|
14724
14969
|
ref: provided.innerRef,
|
|
14725
14970
|
...provided.droppableProps,
|
|
14726
|
-
className:
|
|
14971
|
+
className: classNames16__default.default({
|
|
14727
14972
|
"space-y-2 bg-eui-primary-300/10 p-2": true,
|
|
14728
14973
|
[`${shapes[resolvedShape]}`]: true
|
|
14729
14974
|
}),
|
|
@@ -14738,7 +14983,7 @@ var InputListGroup = ({
|
|
|
14738
14983
|
{
|
|
14739
14984
|
ref: provided2.innerRef,
|
|
14740
14985
|
...provided2.draggableProps,
|
|
14741
|
-
className:
|
|
14986
|
+
className: classNames16__default.default({
|
|
14742
14987
|
"flex items-center gap-2 bg-eui-primary-300/10 p-2": true,
|
|
14743
14988
|
[`${shapes[resolvedShape]}`]: true
|
|
14744
14989
|
}),
|
|
@@ -14749,7 +14994,7 @@ var InputListGroup = ({
|
|
|
14749
14994
|
{
|
|
14750
14995
|
name: `${name}[${groupIndex}].items[${itemIndex}]`,
|
|
14751
14996
|
placeholder: `Item ${itemIndex + 1}`,
|
|
14752
|
-
className:
|
|
14997
|
+
className: classNames16__default.default(
|
|
14753
14998
|
"border w-full bg-eui-primary-300/10 px-3 py-2 text-md focus:outline-none h-[40px]",
|
|
14754
14999
|
[`${shapes[resolvedShape]}`],
|
|
14755
15000
|
"border-eui-primary-400 focus:border-eui-secondary-500"
|
|
@@ -14822,43 +15067,76 @@ var InputListGroup = ({
|
|
|
14822
15067
|
function isMultiCheckbox(props) {
|
|
14823
15068
|
return Array.isArray(props.options);
|
|
14824
15069
|
}
|
|
14825
|
-
|
|
14826
|
-
|
|
15070
|
+
function Checkbox({
|
|
15071
|
+
placeholder,
|
|
15072
|
+
variant = "primary",
|
|
15073
|
+
shape = "roundedSquare",
|
|
15074
|
+
className,
|
|
15075
|
+
...props
|
|
15076
|
+
}) {
|
|
14827
15077
|
const isMulti = isMultiCheckbox(props);
|
|
14828
|
-
const [
|
|
14829
|
-
|
|
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
|
|
14830
15088
|
"appearance-none cursor-pointer transition-all duration-300",
|
|
14831
15089
|
"w-5 h-5 min-w-[1.25rem] min-h-[1.25rem]",
|
|
14832
|
-
"flex-shrink-0",
|
|
14833
|
-
|
|
14834
|
-
"
|
|
14835
|
-
"
|
|
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",
|
|
14836
15106
|
"checked:before:flex checked:before:items-center checked:before:justify-center",
|
|
14837
|
-
"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
|
|
14838
15113
|
);
|
|
14839
15114
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
14840
15115
|
!isMulti && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-3 items-start", children: [
|
|
14841
15116
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14842
15117
|
"input",
|
|
14843
15118
|
{
|
|
14844
|
-
id:
|
|
15119
|
+
id: singleField.name,
|
|
14845
15120
|
type: "checkbox",
|
|
14846
|
-
checked: Boolean(
|
|
14847
|
-
onChange: (e) =>
|
|
15121
|
+
checked: Boolean(singleField.value),
|
|
15122
|
+
onChange: (e) => singleHelpers.setValue(e.target.checked),
|
|
14848
15123
|
className: checkboxClass
|
|
14849
15124
|
}
|
|
14850
15125
|
),
|
|
14851
15126
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14852
15127
|
"label",
|
|
14853
15128
|
{
|
|
14854
|
-
htmlFor:
|
|
14855
|
-
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
|
+
),
|
|
14856
15134
|
children: placeholder
|
|
14857
15135
|
}
|
|
14858
15136
|
)
|
|
14859
15137
|
] }),
|
|
14860
15138
|
isMulti && props.options.map((option) => {
|
|
14861
|
-
const values =
|
|
15139
|
+
const values = multiField.value ?? [];
|
|
14862
15140
|
const checked = values.includes(option.value);
|
|
14863
15141
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14864
15142
|
"div",
|
|
@@ -14872,7 +15150,7 @@ var Checkbox = (props) => {
|
|
|
14872
15150
|
type: "checkbox",
|
|
14873
15151
|
checked,
|
|
14874
15152
|
onChange: () => {
|
|
14875
|
-
|
|
15153
|
+
multiHelpers.setValue(
|
|
14876
15154
|
checked ? values.filter((v) => v !== option.value) : [...values, option.value]
|
|
14877
15155
|
);
|
|
14878
15156
|
},
|
|
@@ -14883,7 +15161,10 @@ var Checkbox = (props) => {
|
|
|
14883
15161
|
"label",
|
|
14884
15162
|
{
|
|
14885
15163
|
htmlFor: option.value,
|
|
14886
|
-
className:
|
|
15164
|
+
className: cn(
|
|
15165
|
+
"text-sm leading-relaxed cursor-pointer select-none",
|
|
15166
|
+
"text-gray-800 dark:text-gray-200"
|
|
15167
|
+
),
|
|
14887
15168
|
children: option.label
|
|
14888
15169
|
}
|
|
14889
15170
|
)
|
|
@@ -14901,7 +15182,7 @@ var Checkbox = (props) => {
|
|
|
14901
15182
|
}
|
|
14902
15183
|
)
|
|
14903
15184
|
] });
|
|
14904
|
-
}
|
|
15185
|
+
}
|
|
14905
15186
|
var Checkbox_default = Checkbox;
|
|
14906
15187
|
var DateSelector = ({
|
|
14907
15188
|
placeholder,
|
|
@@ -14927,7 +15208,7 @@ var DateSelector = ({
|
|
|
14927
15208
|
...field,
|
|
14928
15209
|
...props,
|
|
14929
15210
|
placeholder,
|
|
14930
|
-
className:
|
|
15211
|
+
className: classNames16__default.default({
|
|
14931
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,
|
|
14932
15213
|
"border-eui-danger-500": meta.touched && meta.error,
|
|
14933
15214
|
"transition-all ease-in-out": true,
|
|
@@ -15036,7 +15317,7 @@ var ImageInput = React4.forwardRef(
|
|
|
15036
15317
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15037
15318
|
"label",
|
|
15038
15319
|
{
|
|
15039
|
-
className:
|
|
15320
|
+
className: classNames16__default.default({
|
|
15040
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,
|
|
15041
15322
|
"hover:cursor-pointer hover:border-solid hover:border-gray-600 hover:bg-gray-900/80": true,
|
|
15042
15323
|
"transition-all ease-in-out duration-150": true
|
|
@@ -15153,7 +15434,7 @@ function Radio({
|
|
|
15153
15434
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15154
15435
|
"div",
|
|
15155
15436
|
{
|
|
15156
|
-
className:
|
|
15437
|
+
className: classNames16__default.default({
|
|
15157
15438
|
"flex flex-row gap-2 items-center mx-1 my-2": true
|
|
15158
15439
|
}),
|
|
15159
15440
|
children: [
|
|
@@ -15166,7 +15447,7 @@ function Radio({
|
|
|
15166
15447
|
...props,
|
|
15167
15448
|
value: option.value,
|
|
15168
15449
|
checked: field2.value === option.value,
|
|
15169
|
-
className:
|
|
15450
|
+
className: classNames16__default.default({
|
|
15170
15451
|
"appearance-none w-4 h-4 border-2 border-eui-primary-400 rounded-full cursor-pointer transition-all duration-300": true,
|
|
15171
15452
|
// base radio button styles
|
|
15172
15453
|
"checked:bg-eui-secondary-700 checked:border-eui-primary-400": field2.value === option.value
|
|
@@ -15178,7 +15459,7 @@ function Radio({
|
|
|
15178
15459
|
"label",
|
|
15179
15460
|
{
|
|
15180
15461
|
htmlFor: option.value,
|
|
15181
|
-
className:
|
|
15462
|
+
className: classNames16__default.default({
|
|
15182
15463
|
"eui-text-md text-sm": true
|
|
15183
15464
|
}),
|
|
15184
15465
|
children: option.label
|
|
@@ -15221,7 +15502,7 @@ function StarRatingInput({
|
|
|
15221
15502
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15222
15503
|
"div",
|
|
15223
15504
|
{
|
|
15224
|
-
className:
|
|
15505
|
+
className: classNames16__default.default({
|
|
15225
15506
|
"inline-flex gap-[4px] text-[20px]": true,
|
|
15226
15507
|
[`${styles}`]: styles
|
|
15227
15508
|
}),
|
|
@@ -15234,7 +15515,7 @@ function StarRatingInput({
|
|
|
15234
15515
|
onClick: () => handleOnClick(index),
|
|
15235
15516
|
onMouseEnter: () => setHover(index),
|
|
15236
15517
|
onMouseLeave: () => setHover(null),
|
|
15237
|
-
className:
|
|
15518
|
+
className: classNames16__default.default({
|
|
15238
15519
|
"text-yellow-600": index <= (hover ?? rating - 1),
|
|
15239
15520
|
"text-gray-400": index > (hover ?? rating - 1)
|
|
15240
15521
|
}),
|
|
@@ -15278,7 +15559,7 @@ function Select({
|
|
|
15278
15559
|
{
|
|
15279
15560
|
as: "select",
|
|
15280
15561
|
...props,
|
|
15281
|
-
className:
|
|
15562
|
+
className: classNames16__default.default({
|
|
15282
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,
|
|
15283
15564
|
"border-eui-primary-400": !(meta.touched && meta.error),
|
|
15284
15565
|
"border-red-500": meta.touched && meta.error,
|
|
@@ -15330,7 +15611,7 @@ function Switch({
|
|
|
15330
15611
|
"div",
|
|
15331
15612
|
{
|
|
15332
15613
|
onClick: () => helpers.setValue(!field.value),
|
|
15333
|
-
className:
|
|
15614
|
+
className: classNames16__default.default(
|
|
15334
15615
|
"w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer dark:bg-eui-dark-100",
|
|
15335
15616
|
"peer-checked:after:translate-x-full peer-checked:after:border-white",
|
|
15336
15617
|
"after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white",
|
|
@@ -15387,7 +15668,7 @@ function Tags({
|
|
|
15387
15668
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15388
15669
|
"div",
|
|
15389
15670
|
{
|
|
15390
|
-
className:
|
|
15671
|
+
className: classNames16__default.default(
|
|
15391
15672
|
"border rounded-sm flex flex-wrap items-center gap-2 px-2 pt-2 pb-6 min-h-[3rem]",
|
|
15392
15673
|
{
|
|
15393
15674
|
"bg-eui-primary-300/10 eui-text-md": true,
|
|
@@ -15435,7 +15716,7 @@ function Tags({
|
|
|
15435
15716
|
InputLabel_default,
|
|
15436
15717
|
{
|
|
15437
15718
|
text: placeholder,
|
|
15438
|
-
styles:
|
|
15719
|
+
styles: classNames16__default.default(
|
|
15439
15720
|
"absolute left-2 transition-all pointer-events-none text-eui-dark-200",
|
|
15440
15721
|
input.length > 0 || field.value.length > 0 ? "top-[2px] text-[13.5px]" : "top-3 text-base"
|
|
15441
15722
|
)
|
|
@@ -15476,7 +15757,7 @@ function TextArea({
|
|
|
15476
15757
|
as: "textarea",
|
|
15477
15758
|
...field,
|
|
15478
15759
|
...props,
|
|
15479
|
-
className:
|
|
15760
|
+
className: classNames16__default.default({
|
|
15480
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,
|
|
15481
15762
|
"transition-all ease-in-out": true,
|
|
15482
15763
|
"border-eui-primary-400 focus:border-eui-secondary-500": !(meta.touched && meta.error),
|
|
@@ -15490,7 +15771,7 @@ function TextArea({
|
|
|
15490
15771
|
InputLabel_default,
|
|
15491
15772
|
{
|
|
15492
15773
|
text: placeholder,
|
|
15493
|
-
styles:
|
|
15774
|
+
styles: classNames16__default.default(
|
|
15494
15775
|
"absolute left-2 transition-all pointer-events-none text-eui-dark-200",
|
|
15495
15776
|
field.value ? "top-[2px] text-[13.5px]" : "top-3 text-base"
|
|
15496
15777
|
)
|
|
@@ -15521,7 +15802,7 @@ function ContentArea({
|
|
|
15521
15802
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15522
15803
|
"div",
|
|
15523
15804
|
{
|
|
15524
|
-
className:
|
|
15805
|
+
className: classNames16__default.default({
|
|
15525
15806
|
"min-h-screen h-full w-full py-3 px-5": true,
|
|
15526
15807
|
"py-3 px-5": !enablePadding,
|
|
15527
15808
|
"py-3 px-5 lg:px-[150px]": enablePadding,
|
|
@@ -15537,7 +15818,7 @@ function FlexCol({ children, gap = 3, styles }) {
|
|
|
15537
15818
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15538
15819
|
"div",
|
|
15539
15820
|
{
|
|
15540
|
-
className:
|
|
15821
|
+
className: classNames16__default.default({
|
|
15541
15822
|
[`flex flex-col gap-${gap}`]: true,
|
|
15542
15823
|
[`${styles}`]: styles
|
|
15543
15824
|
}),
|
|
@@ -15550,7 +15831,7 @@ function FlexRow({ children, gap = 3, styles }) {
|
|
|
15550
15831
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15551
15832
|
"div",
|
|
15552
15833
|
{
|
|
15553
|
-
className:
|
|
15834
|
+
className: classNames16__default.default({
|
|
15554
15835
|
[`flex flex-row gap-${gap}`]: true,
|
|
15555
15836
|
[`${styles}`]: styles
|
|
15556
15837
|
}),
|
|
@@ -15569,7 +15850,7 @@ function Grid({ children, styles }) {
|
|
|
15569
15850
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15570
15851
|
"div",
|
|
15571
15852
|
{
|
|
15572
|
-
className:
|
|
15853
|
+
className: classNames16__default.default({
|
|
15573
15854
|
[`grid`]: true,
|
|
15574
15855
|
[`${styles}`]: styles
|
|
15575
15856
|
}),
|
|
@@ -15586,7 +15867,7 @@ var Layout = ({
|
|
|
15586
15867
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15587
15868
|
"div",
|
|
15588
15869
|
{
|
|
15589
|
-
className:
|
|
15870
|
+
className: classNames16__default.default({
|
|
15590
15871
|
// "flex h-full w-screen bg-gray-100 overflow-auto": true,
|
|
15591
15872
|
"flex bg-eui-light-600": true,
|
|
15592
15873
|
"flex-col": flexDirection === "vertical",
|
|
@@ -15605,7 +15886,7 @@ var Header = ({
|
|
|
15605
15886
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15606
15887
|
"div",
|
|
15607
15888
|
{
|
|
15608
|
-
className:
|
|
15889
|
+
className: classNames16__default.default({
|
|
15609
15890
|
static: position === "static",
|
|
15610
15891
|
fixed: position === "fixed",
|
|
15611
15892
|
sticky: position === "sticky",
|
|
@@ -15645,7 +15926,7 @@ var Content = ({
|
|
|
15645
15926
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15646
15927
|
"div",
|
|
15647
15928
|
{
|
|
15648
|
-
className:
|
|
15929
|
+
className: classNames16__default.default({
|
|
15649
15930
|
"w-full min-h-screen transition-all duration-200 eui-bg-sm": true,
|
|
15650
15931
|
"md:pl-[300px]": !overlayedSidebar && sidebarVisible && !isMobile,
|
|
15651
15932
|
// Shift when sidebar is open (desktop)
|
|
@@ -15661,7 +15942,7 @@ var Footer = ({ children, styles }) => {
|
|
|
15661
15942
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15662
15943
|
"div",
|
|
15663
15944
|
{
|
|
15664
|
-
className:
|
|
15945
|
+
className: classNames16__default.default({
|
|
15665
15946
|
"bottom-0 w-full h-fit": true,
|
|
15666
15947
|
"border-t border-eui-dark-500/40 dark:border-eui-secondary-800 eui-bg-md": !styles,
|
|
15667
15948
|
[`${styles}`]: styles
|
|
@@ -15749,7 +16030,7 @@ function MarkdownEditor({
|
|
|
15749
16030
|
const [field, meta, helpers] = formik.useField(props);
|
|
15750
16031
|
const { theme } = useTheme_default();
|
|
15751
16032
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
15752
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
16033
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames16__default.default(theme === "dark" ? "dark" : "", styles), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
15753
16034
|
editor.MDXEditor,
|
|
15754
16035
|
{
|
|
15755
16036
|
markdown: field.value,
|
|
@@ -15852,7 +16133,7 @@ function MarkdownTOC({ title = "Table of Contents" }) {
|
|
|
15852
16133
|
"button",
|
|
15853
16134
|
{
|
|
15854
16135
|
onClick: () => scrollToHeading(heading.id),
|
|
15855
|
-
className:
|
|
16136
|
+
className: classNames16__default.default(
|
|
15856
16137
|
"block w-full text-left text-sm transition-all ease-in-out duration-150",
|
|
15857
16138
|
"hover:text-primary",
|
|
15858
16139
|
activeHeading === heading.id ? "text-primary font-semibold underline" : "text-gray-500 dark:text-gray-400"
|
|
@@ -16008,7 +16289,7 @@ function BreadcrumbItem({
|
|
|
16008
16289
|
{
|
|
16009
16290
|
href,
|
|
16010
16291
|
onClick,
|
|
16011
|
-
className:
|
|
16292
|
+
className: classNames16__default.default({
|
|
16012
16293
|
"text-lg font-semibold": true,
|
|
16013
16294
|
"text-gray-400 hover:text-gray-600 cursor-pointer": !active,
|
|
16014
16295
|
"text-eui-light-800": active,
|
|
@@ -16085,7 +16366,7 @@ var Breadcrumb = ({
|
|
|
16085
16366
|
index < resolvedData.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16086
16367
|
"span",
|
|
16087
16368
|
{
|
|
16088
|
-
className:
|
|
16369
|
+
className: classNames16__default.default({
|
|
16089
16370
|
"text-lg font-semibold text-gray-500": true,
|
|
16090
16371
|
[`px-${gap}`]: gap
|
|
16091
16372
|
}),
|
|
@@ -16099,7 +16380,7 @@ var Breadcrumb = ({
|
|
|
16099
16380
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16100
16381
|
"div",
|
|
16101
16382
|
{
|
|
16102
|
-
className:
|
|
16383
|
+
className: classNames16__default.default({
|
|
16103
16384
|
"inline-flex": true,
|
|
16104
16385
|
[`${styles}`]: styles
|
|
16105
16386
|
}),
|
|
@@ -16129,7 +16410,7 @@ var Drawer = ({
|
|
|
16129
16410
|
{
|
|
16130
16411
|
show: visibility,
|
|
16131
16412
|
enter: "transform transition duration-200 ease-out",
|
|
16132
|
-
enterFrom:
|
|
16413
|
+
enterFrom: classNames16__default.default({
|
|
16133
16414
|
"-translate-x-full": side === "left",
|
|
16134
16415
|
"translate-x-full": side === "right",
|
|
16135
16416
|
"-translate-y-full": side === "top",
|
|
@@ -16138,7 +16419,7 @@ var Drawer = ({
|
|
|
16138
16419
|
enterTo: "translate-x-0 translate-y-0",
|
|
16139
16420
|
leave: "transform transition duration-200 ease-in",
|
|
16140
16421
|
leaveFrom: "translate-x-0 translate-y-0",
|
|
16141
|
-
leaveTo:
|
|
16422
|
+
leaveTo: classNames16__default.default({
|
|
16142
16423
|
"-translate-x-full": side === "left",
|
|
16143
16424
|
"translate-x-full": side === "right",
|
|
16144
16425
|
"-translate-y-full": side === "top",
|
|
@@ -16147,7 +16428,7 @@ var Drawer = ({
|
|
|
16147
16428
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16148
16429
|
"div",
|
|
16149
16430
|
{
|
|
16150
|
-
className:
|
|
16431
|
+
className: classNames16__default.default(
|
|
16151
16432
|
"fixed shadow-lg z-50",
|
|
16152
16433
|
{
|
|
16153
16434
|
"h-full w-[300px]": isHorizontal,
|
|
@@ -16179,7 +16460,7 @@ function DrawerToggler({
|
|
|
16179
16460
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16180
16461
|
"div",
|
|
16181
16462
|
{
|
|
16182
|
-
className:
|
|
16463
|
+
className: classNames16__default.default({
|
|
16183
16464
|
"text-xl p-3 cursor-pointer": true,
|
|
16184
16465
|
"transition-all ease-in-out": true,
|
|
16185
16466
|
"text-eui-dark-500 dark:text-eui-secondary-600": !styles,
|
|
@@ -16227,7 +16508,7 @@ function FooterNav({ data = [], styles }) {
|
|
|
16227
16508
|
childrenContent = /* @__PURE__ */ jsxRuntime.jsx(
|
|
16228
16509
|
"div",
|
|
16229
16510
|
{
|
|
16230
|
-
className:
|
|
16511
|
+
className: classNames16__default.default({
|
|
16231
16512
|
"grid w-full": true,
|
|
16232
16513
|
"grid-cols-1": isMobile,
|
|
16233
16514
|
"grid-cols-3": !isMobile,
|
|
@@ -16240,7 +16521,7 @@ function FooterNav({ data = [], styles }) {
|
|
|
16240
16521
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16241
16522
|
"div",
|
|
16242
16523
|
{
|
|
16243
|
-
className:
|
|
16524
|
+
className: classNames16__default.default({
|
|
16244
16525
|
[`${styles}`]: styles
|
|
16245
16526
|
}),
|
|
16246
16527
|
children: childrenContent
|
|
@@ -16281,7 +16562,7 @@ var FooterNavGroup = ({
|
|
|
16281
16562
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16282
16563
|
"div",
|
|
16283
16564
|
{
|
|
16284
|
-
className:
|
|
16565
|
+
className: classNames16__default.default({
|
|
16285
16566
|
"": true,
|
|
16286
16567
|
"py-2 font-semibold eui-text-lg": !styles,
|
|
16287
16568
|
[`${styles}`]: styles
|
|
@@ -16326,7 +16607,7 @@ var FooterNavItem = ({
|
|
|
16326
16607
|
"div",
|
|
16327
16608
|
{
|
|
16328
16609
|
onClick: handleNavigation,
|
|
16329
|
-
className:
|
|
16610
|
+
className: classNames16__default.default({
|
|
16330
16611
|
"flex flex-row items-center gap-3 cursor-pointer p-1 w-full": true,
|
|
16331
16612
|
"transition-all duration-200 ease-in-out": true,
|
|
16332
16613
|
"text-sm eui-text-sm": !styles,
|
|
@@ -16355,7 +16636,7 @@ var FooterNavItemTitle = ({
|
|
|
16355
16636
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16356
16637
|
"div",
|
|
16357
16638
|
{
|
|
16358
|
-
className:
|
|
16639
|
+
className: classNames16__default.default({
|
|
16359
16640
|
"": true,
|
|
16360
16641
|
"py-2 font-thin eui-text-md": !styles,
|
|
16361
16642
|
[`${styles}`]: styles
|
|
@@ -16408,7 +16689,7 @@ function HeaderNav({ data = [], styles }) {
|
|
|
16408
16689
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16409
16690
|
"div",
|
|
16410
16691
|
{
|
|
16411
|
-
className:
|
|
16692
|
+
className: classNames16__default.default({
|
|
16412
16693
|
[`${styles}`]: styles
|
|
16413
16694
|
}),
|
|
16414
16695
|
children: childrenContent
|
|
@@ -16470,7 +16751,7 @@ var HeaderNavGroup = ({
|
|
|
16470
16751
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16471
16752
|
"div",
|
|
16472
16753
|
{
|
|
16473
|
-
className:
|
|
16754
|
+
className: classNames16__default.default({
|
|
16474
16755
|
"flex flex-row gap-2 items-center justify-between cursor-pointer p-3 w-full": true,
|
|
16475
16756
|
"transition-all duration-300 ease-in-out": true,
|
|
16476
16757
|
"eui-text-md bg-gradient-to-t from-eui-dark-500/10 dark:from-green-700/10": !styles,
|
|
@@ -16498,7 +16779,7 @@ var HeaderNavGroup = ({
|
|
|
16498
16779
|
children && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16499
16780
|
bs.BsChevronDown,
|
|
16500
16781
|
{
|
|
16501
|
-
className:
|
|
16782
|
+
className: classNames16__default.default({
|
|
16502
16783
|
"text-md": true,
|
|
16503
16784
|
"transition-all ease-in-out duration-300": true,
|
|
16504
16785
|
"rotate-180": !collapsed
|
|
@@ -16511,7 +16792,7 @@ var HeaderNavGroup = ({
|
|
|
16511
16792
|
!collapsed && children && /* @__PURE__ */ jsxRuntime.jsx(
|
|
16512
16793
|
"div",
|
|
16513
16794
|
{
|
|
16514
|
-
className:
|
|
16795
|
+
className: classNames16__default.default({
|
|
16515
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,
|
|
16516
16797
|
"transition-all duration-300 ease-in-out": true
|
|
16517
16798
|
}),
|
|
@@ -16541,7 +16822,7 @@ var HeaderNavItem = ({
|
|
|
16541
16822
|
"div",
|
|
16542
16823
|
{
|
|
16543
16824
|
onClick: handleNavigation,
|
|
16544
|
-
className:
|
|
16825
|
+
className: classNames16__default.default({
|
|
16545
16826
|
"flex flex-row items-center gap-3 cursor-pointer p-3 w-full": true,
|
|
16546
16827
|
"transition-all duration-200 ease-in-out": true,
|
|
16547
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,
|
|
@@ -16570,7 +16851,7 @@ var HeaderNavItemTitle = ({
|
|
|
16570
16851
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
16571
16852
|
"div",
|
|
16572
16853
|
{
|
|
16573
|
-
className:
|
|
16854
|
+
className: classNames16__default.default({
|
|
16574
16855
|
"p-3 font-thin": true,
|
|
16575
16856
|
"eui-text-md": !styles,
|
|
16576
16857
|
[`${styles}`]: styles
|
|
@@ -16610,7 +16891,7 @@ var Link = ({
|
|
|
16610
16891
|
href: href || "#",
|
|
16611
16892
|
target: targets[target],
|
|
16612
16893
|
onClick: handleClick,
|
|
16613
|
-
className:
|
|
16894
|
+
className: classNames16__default.default({
|
|
16614
16895
|
[`${textVariants[variant]}`]: variant,
|
|
16615
16896
|
[`${decorations[decoration]}`]: decoration,
|
|
16616
16897
|
"font-bold": bold,
|
|
@@ -17075,7 +17356,7 @@ function Modal({
|
|
|
17075
17356
|
"div",
|
|
17076
17357
|
{
|
|
17077
17358
|
ref: modalRef,
|
|
17078
|
-
className:
|
|
17359
|
+
className: classNames16__default.default({
|
|
17079
17360
|
"eui-bg-md eui-shadow-lg border border-gray-700/80 w-fit h-fit": true,
|
|
17080
17361
|
[`${shapes[resolvedShape]}`]: true,
|
|
17081
17362
|
[`${styles}`]: styles
|
|
@@ -17086,7 +17367,7 @@ function Modal({
|
|
|
17086
17367
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17087
17368
|
"div",
|
|
17088
17369
|
{
|
|
17089
|
-
className:
|
|
17370
|
+
className: classNames16__default.default({
|
|
17090
17371
|
"w-[60px] h-[60px] flex items-center justify-center transition-standard-fast": true,
|
|
17091
17372
|
"hover:cursor-pointer hover:bg-eui-dark-500": true
|
|
17092
17373
|
}),
|
|
@@ -17192,7 +17473,7 @@ function ShowMore({ text, limit }) {
|
|
|
17192
17473
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17193
17474
|
"div",
|
|
17194
17475
|
{
|
|
17195
|
-
className:
|
|
17476
|
+
className: classNames16__default.default({
|
|
17196
17477
|
"text-blue-300 px-1 pb-1 mt-1": true,
|
|
17197
17478
|
"bg-slate-900/70": !showMore,
|
|
17198
17479
|
"bg-gradient-to-t from-slate-900/50 to-transparent": showMore
|
|
@@ -17347,6 +17628,80 @@ function Slider({ isLoading, isSuccess, coverArt, screenshots }) {
|
|
|
17347
17628
|
] }) });
|
|
17348
17629
|
}
|
|
17349
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;
|
|
17350
17705
|
function WorldMapCountryTable({
|
|
17351
17706
|
title = "Country Breakdown",
|
|
17352
17707
|
data
|
|
@@ -17443,7 +17798,7 @@ function BoxNavItem({ icon, name, to, selected, onClick }) {
|
|
|
17443
17798
|
type: "button",
|
|
17444
17799
|
onClick: handleClick,
|
|
17445
17800
|
"aria-current": selected ? "page" : void 0,
|
|
17446
|
-
className:
|
|
17801
|
+
className: classNames16__default.default(
|
|
17447
17802
|
"w-full min-w-[80px] flex flex-col items-center justify-center py-3 text-center",
|
|
17448
17803
|
"hover:text-secondary-700 hover:bg-gray-300/10 hover:cursor-pointer",
|
|
17449
17804
|
selected ? "text-eui-secondary-700 bg-gray-300/10" : "text-gray-400",
|
|
@@ -17833,7 +18188,7 @@ function GenericLayout({
|
|
|
17833
18188
|
return /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { defaultTheme, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17834
18189
|
"div",
|
|
17835
18190
|
{
|
|
17836
|
-
className:
|
|
18191
|
+
className: classNames16__default.default({
|
|
17837
18192
|
[`${styles}`]: styles
|
|
17838
18193
|
}),
|
|
17839
18194
|
children
|
|
@@ -17882,7 +18237,7 @@ function SidemenuLayout({ data, children }) {
|
|
|
17882
18237
|
return /* @__PURE__ */ jsxRuntime.jsx(DefaultLayout_default, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17883
18238
|
"div",
|
|
17884
18239
|
{
|
|
17885
|
-
className:
|
|
18240
|
+
className: classNames16__default.default({
|
|
17886
18241
|
grid: true,
|
|
17887
18242
|
"grid-cols-7 gap-10": !isMobile,
|
|
17888
18243
|
"grid-cols-1 gap-": isMobile
|
|
@@ -17954,7 +18309,7 @@ exports.BoxNavItem = BoxNavItem_default;
|
|
|
17954
18309
|
exports.Brand = Brand_default;
|
|
17955
18310
|
exports.Breadcrumb = Breadcrumb;
|
|
17956
18311
|
exports.BreadcrumbItem = BreadcrumbItem_default;
|
|
17957
|
-
exports.Button =
|
|
18312
|
+
exports.Button = Button_default;
|
|
17958
18313
|
exports.Caption = Caption;
|
|
17959
18314
|
exports.Card = Card_default;
|
|
17960
18315
|
exports.CardContent = CardContent_default;
|
|
@@ -18032,11 +18387,13 @@ exports.MenuItemTitle = MenuItemTitle;
|
|
|
18032
18387
|
exports.Modal = Modal_default;
|
|
18033
18388
|
exports.MotionSurface = MotionSurface_default;
|
|
18034
18389
|
exports.MultiImageInput = MultiImageInput_default;
|
|
18390
|
+
exports.NumericRating = NumericRating_default;
|
|
18035
18391
|
exports.Overline = Overline;
|
|
18036
18392
|
exports.Paragraph = Paragraph;
|
|
18037
18393
|
exports.PieChart = PieChart_default;
|
|
18038
18394
|
exports.PriceTag = PriceTag;
|
|
18039
18395
|
exports.ProgressBar = ProgressBar;
|
|
18396
|
+
exports.ProgressBarRating = ProgressBarRating_default;
|
|
18040
18397
|
exports.Quote = Quote;
|
|
18041
18398
|
exports.Radio = Radio_default;
|
|
18042
18399
|
exports.RouteTab = RouteTab_default;
|
|
@@ -18090,6 +18447,7 @@ exports.isMatch = isMatch;
|
|
|
18090
18447
|
exports.isRenderFn = isRenderFn;
|
|
18091
18448
|
exports.normalize = normalize;
|
|
18092
18449
|
exports.registerLayout = registerLayout;
|
|
18450
|
+
exports.resolveAppearanceStyles = resolveAppearanceStyles;
|
|
18093
18451
|
exports.resolveWithGlobal = resolveWithGlobal;
|
|
18094
18452
|
exports.sendToast = sendToast;
|
|
18095
18453
|
exports.useClickOutside = useClickOutside;
|