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.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { twMerge } from 'tailwind-merge';
|
|
2
|
-
import {
|
|
3
|
-
import { FaSun, FaMoon, FaGripVertical, FaTrash, FaPlus, FaTimes, FaBars, FaCircle, FaEyeSlash, FaEye } from 'react-icons/fa';
|
|
2
|
+
import React4, { createContext, forwardRef, useState, useImperativeHandle, useEffect, useMemo, useContext, Fragment as Fragment$1, useRef, useCallback } from 'react';
|
|
4
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
+
import { BsStarFill, BsStarHalf, BsStar, BsChevronDown, BsFillDiamondFill } from 'react-icons/bs';
|
|
5
|
+
import { FaSun, FaMoon, FaGripVertical, FaTrash, FaPlus, FaTimes, FaBars, FaCircle, FaEyeSlash, FaEye } from 'react-icons/fa';
|
|
5
6
|
import { Bar, Line, Pie } from 'react-chartjs-2';
|
|
6
7
|
import { Chart, CategoryScale, LinearScale, BarElement, Title, Tooltip, Legend, LineElement, PointElement, ArcElement } from 'chart.js';
|
|
7
|
-
import React4, { createContext, forwardRef, useState, useImperativeHandle, useEffect, useMemo, useContext, Fragment as Fragment$1, useRef, useCallback } from 'react';
|
|
8
8
|
import { Transition } from '@headlessui/react';
|
|
9
|
-
import
|
|
9
|
+
import classNames16 from 'classnames';
|
|
10
10
|
import { FaCircleChevronDown } from 'react-icons/fa6';
|
|
11
11
|
import ReactWorldFlags from 'react-world-flags';
|
|
12
12
|
import emojiFlags from 'emoji-flags';
|
|
@@ -160,27 +160,80 @@ var isMatch = (itemPath, currentPath) => {
|
|
|
160
160
|
if (item !== "/" && current.startsWith(item + "/")) return true;
|
|
161
161
|
return false;
|
|
162
162
|
};
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
163
|
+
|
|
164
|
+
// src/utils/styles.ts
|
|
165
|
+
function resolveAppearanceStyles({
|
|
166
|
+
appearance = "solid",
|
|
167
|
+
variant = "default",
|
|
168
|
+
solid,
|
|
169
|
+
lite,
|
|
170
|
+
ghost
|
|
171
|
+
}) {
|
|
172
|
+
switch (appearance) {
|
|
173
|
+
case "ghost":
|
|
174
|
+
return ghost[variant];
|
|
175
|
+
case "lite":
|
|
176
|
+
return lite[variant];
|
|
177
|
+
default:
|
|
178
|
+
return solid[variant];
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
var EUIContext = createContext(null);
|
|
182
|
+
var EUIProvider = ({
|
|
183
|
+
config,
|
|
184
|
+
children
|
|
185
|
+
}) => {
|
|
186
|
+
const [state, setState] = useState(config);
|
|
187
|
+
return /* @__PURE__ */ jsx(EUIContext.Provider, { value: { config: state, setConfig: setState }, children });
|
|
188
|
+
};
|
|
189
|
+
var useEUIConfig = () => {
|
|
190
|
+
const ctx = useContext(EUIContext);
|
|
191
|
+
if (!ctx) {
|
|
192
|
+
throw new Error("useEUIConfig must be used inside EUIProvider");
|
|
193
|
+
}
|
|
194
|
+
return ctx;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
// src/components/eui/resolveGlobalConfigs.tsx
|
|
198
|
+
function resolveWithGlobal(config, props, defaults) {
|
|
199
|
+
return {
|
|
200
|
+
...defaults,
|
|
201
|
+
...config?.global ?? {},
|
|
202
|
+
...props
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
var variantsSolid = {
|
|
206
|
+
default: "bg-gray-300 text-gray-900 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-100 dark:hover:bg-gray-600",
|
|
207
|
+
primary: "bg-gradient-to-r from-eui-primary-500 to-eui-primary-600 text-white hover:brightness-110",
|
|
208
|
+
secondary: "bg-gradient-to-r from-eui-secondary-600 to-eui-secondary-500 text-white hover:brightness-110",
|
|
209
|
+
success: "bg-gradient-to-r from-eui-success-600 to-eui-success-500 text-white hover:brightness-110",
|
|
210
|
+
danger: "bg-gradient-to-r from-eui-danger-600 to-eui-danger-500 text-white hover:brightness-110",
|
|
211
|
+
warning: "bg-gradient-to-r from-eui-warning-500 to-eui-warning-400 text-black hover:brightness-105",
|
|
212
|
+
info: "bg-gradient-to-r from-eui-info-600 to-eui-info-500 text-white hover:brightness-110",
|
|
213
|
+
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",
|
|
214
|
+
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"
|
|
173
215
|
};
|
|
174
216
|
var variantsLite = {
|
|
175
|
-
default: "bg-gray-
|
|
176
|
-
primary: "bg-eui-primary-
|
|
177
|
-
secondary: "bg-eui-secondary-
|
|
178
|
-
success: "bg-eui-success-
|
|
179
|
-
danger: "bg-
|
|
180
|
-
warning: "bg-
|
|
181
|
-
info: "bg-eui-info-
|
|
182
|
-
light: "bg-
|
|
183
|
-
dark: "bg-eui-dark-
|
|
217
|
+
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",
|
|
218
|
+
primary: "bg-eui-primary-500/10 border border-eui-primary-500/30 text-eui-primary-400 dark:text-eui-primary-300",
|
|
219
|
+
secondary: "bg-eui-secondary-500/10 border border-eui-secondary-500/30 text-eui-secondary-500 dark:text-eui-secondary-400",
|
|
220
|
+
success: "bg-eui-success-500/10 border border-eui-success-500/30 text-eui-success-500 dark:text-eui-success-400",
|
|
221
|
+
danger: "bg-eui-danger-500/10 border border-eui-danger-500/30 text-eui-danger-500 dark:text-eui-danger-400",
|
|
222
|
+
warning: "bg-eui-warning-500/10 border border-eui-warning-500/30 text-eui-warning-600 dark:text-eui-warning-400",
|
|
223
|
+
info: "bg-eui-info-500/10 border border-eui-info-500/30 text-eui-info-500 dark:text-eui-info-400",
|
|
224
|
+
light: "bg-white/40 border border-white/30 text-gray-800 dark:bg-white/10 dark:border-white/10 dark:text-gray-100",
|
|
225
|
+
dark: "bg-eui-dark-500/10 border border-eui-dark-500/30 text-eui-dark-500 dark:text-eui-dark-300"
|
|
226
|
+
};
|
|
227
|
+
var variantsGhost = {
|
|
228
|
+
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",
|
|
229
|
+
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",
|
|
230
|
+
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",
|
|
231
|
+
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",
|
|
232
|
+
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",
|
|
233
|
+
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",
|
|
234
|
+
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",
|
|
235
|
+
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",
|
|
236
|
+
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"
|
|
184
237
|
};
|
|
185
238
|
var textVariants = {
|
|
186
239
|
default: "eui-text-md",
|
|
@@ -193,28 +246,6 @@ var textVariants = {
|
|
|
193
246
|
light: "text-gray-300",
|
|
194
247
|
dark: "text-gray-900"
|
|
195
248
|
};
|
|
196
|
-
var variantsGhost = {
|
|
197
|
-
default: "bg-transparent border border-gray-300 text-gray-800 hover:bg-gray-100",
|
|
198
|
-
primary: "bg-transparent border border-eui-primary-500 text-eui-primary-500",
|
|
199
|
-
secondary: "bg-transparent border border-eui-secondary-500 text-eui-secondary-500",
|
|
200
|
-
success: "bg-transparent border border-eui-success-500 text-eui-success-500",
|
|
201
|
-
danger: "bg-transparent border border-eui-danger-500 text-eui-danger-500",
|
|
202
|
-
warning: "bg-transparent border border-eui-warning-500 text-eui-warning-500",
|
|
203
|
-
info: "bg-transparent border border-eui-info-500 text-eui-info-500",
|
|
204
|
-
light: "bg-transparent border border-eui-light-500 text-eui-light-500",
|
|
205
|
-
dark: "bg-transparent border border-eui-dark-500 text-eui-dark-500"
|
|
206
|
-
};
|
|
207
|
-
var borderVariants = {
|
|
208
|
-
default: "border-gray-300",
|
|
209
|
-
primary: "border-eui-primary-500",
|
|
210
|
-
secondary: "border-eui-secondary-500",
|
|
211
|
-
success: "border-eui-success-500",
|
|
212
|
-
danger: "border-eui-danger-500",
|
|
213
|
-
warning: "border-eui-warning-500",
|
|
214
|
-
info: "border-eui-info-500",
|
|
215
|
-
light: "border-eui-light-500",
|
|
216
|
-
dark: "border-eui-dark-500"
|
|
217
|
-
};
|
|
218
249
|
var decorations = {
|
|
219
250
|
underline: "underline",
|
|
220
251
|
overline: "overline",
|
|
@@ -338,18 +369,38 @@ var bulletTypes = {
|
|
|
338
369
|
number: null,
|
|
339
370
|
none: null
|
|
340
371
|
};
|
|
372
|
+
var checkboxVariants = {
|
|
373
|
+
default: "checked:bg-gray-600 checked:border-gray-600 dark:checked:bg-gray-500 dark:checked:border-gray-500",
|
|
374
|
+
primary: "checked:bg-eui-primary-600 checked:border-eui-primary-600 dark:checked:bg-eui-primary-500 dark:checked:border-eui-primary-500",
|
|
375
|
+
secondary: "checked:bg-eui-secondary-600 checked:border-eui-secondary-600 dark:checked:bg-eui-secondary-500 dark:checked:border-eui-secondary-500",
|
|
376
|
+
success: "checked:bg-eui-success-600 checked:border-eui-success-600 dark:checked:bg-eui-success-500 dark:checked:border-eui-success-500",
|
|
377
|
+
danger: "checked:bg-eui-danger-600 checked:border-eui-danger-600 dark:checked:bg-eui-danger-500 dark:checked:border-eui-danger-500",
|
|
378
|
+
warning: "checked:bg-eui-warning-500 checked:border-eui-warning-500 dark:checked:bg-eui-warning-400 dark:checked:border-eui-warning-400",
|
|
379
|
+
info: "checked:bg-eui-info-600 checked:border-eui-info-600 dark:checked:bg-eui-info-500 dark:checked:border-eui-info-500",
|
|
380
|
+
light: "checked:bg-eui-light-400 checked:border-eui-light-400 dark:checked:bg-gray-200 dark:checked:border-gray-200",
|
|
381
|
+
dark: "checked:bg-eui-dark-500 checked:border-eui-dark-500 dark:checked:bg-eui-dark-300 dark:checked:border-eui-dark-300"
|
|
382
|
+
};
|
|
341
383
|
var Avatar = ({
|
|
342
384
|
alt,
|
|
343
385
|
icon,
|
|
344
386
|
children = "B",
|
|
345
387
|
variant = "success",
|
|
346
|
-
|
|
388
|
+
appearance = "solid",
|
|
389
|
+
shape,
|
|
347
390
|
size = "md",
|
|
348
391
|
src,
|
|
349
|
-
borderVariant = false,
|
|
350
392
|
className,
|
|
351
393
|
...rest
|
|
352
394
|
}) => {
|
|
395
|
+
const eui = useEUIConfig();
|
|
396
|
+
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "circle";
|
|
397
|
+
const variantStyles = resolveAppearanceStyles({
|
|
398
|
+
appearance,
|
|
399
|
+
variant,
|
|
400
|
+
solid: variantsSolid,
|
|
401
|
+
lite: variantsLite,
|
|
402
|
+
ghost: variantsGhost
|
|
403
|
+
});
|
|
353
404
|
const content = src ? /* @__PURE__ */ jsx(
|
|
354
405
|
"img",
|
|
355
406
|
{
|
|
@@ -363,10 +414,10 @@ var Avatar = ({
|
|
|
363
414
|
{
|
|
364
415
|
...rest,
|
|
365
416
|
className: cn(
|
|
366
|
-
"inline-flex items-center justify-center text-center overflow-hidden",
|
|
367
|
-
|
|
417
|
+
"inline-flex items-center justify-center text-center overflow-hidden transition-all duration-300 select-none",
|
|
418
|
+
variantStyles,
|
|
419
|
+
shapes[resolvedShape],
|
|
368
420
|
avatarSizes[size],
|
|
369
|
-
borderVariant ? ["border-2", borderVariants[variant]] : variants[variant],
|
|
370
421
|
className
|
|
371
422
|
),
|
|
372
423
|
children: content
|
|
@@ -379,6 +430,7 @@ var Badge = ({
|
|
|
379
430
|
dot,
|
|
380
431
|
count,
|
|
381
432
|
variant = "success",
|
|
433
|
+
appearance = "solid",
|
|
382
434
|
shape = "circle",
|
|
383
435
|
size = "md",
|
|
384
436
|
showZero = true,
|
|
@@ -395,14 +447,21 @@ var Badge = ({
|
|
|
395
447
|
if (position.includes("right")) offsetStyles.right = x;
|
|
396
448
|
}
|
|
397
449
|
const isVisible = dot || count !== void 0 && (count > 0 || showZero);
|
|
450
|
+
const variantStyles = resolveAppearanceStyles({
|
|
451
|
+
appearance,
|
|
452
|
+
variant,
|
|
453
|
+
solid: variantsSolid,
|
|
454
|
+
lite: variantsLite,
|
|
455
|
+
ghost: variantsGhost
|
|
456
|
+
});
|
|
398
457
|
return /* @__PURE__ */ jsxs("div", { ...rest, className: "relative w-fit h-fit", children: [
|
|
399
458
|
/* @__PURE__ */ jsx(
|
|
400
459
|
"div",
|
|
401
460
|
{
|
|
402
461
|
className: cn(
|
|
403
|
-
"absolute inline-flex items-center justify-center text-center
|
|
462
|
+
"absolute inline-flex items-center justify-center text-center z-10 border border-white dark:border-neutral-900 transition-all duration-300",
|
|
404
463
|
badgePositions[position],
|
|
405
|
-
|
|
464
|
+
variantStyles,
|
|
406
465
|
shapes[shape],
|
|
407
466
|
badgeSizes[size],
|
|
408
467
|
!isVisible && "hidden",
|
|
@@ -526,21 +585,30 @@ var PieChart_default = PieChart;
|
|
|
526
585
|
var Chip = ({
|
|
527
586
|
label,
|
|
528
587
|
variant = "success",
|
|
529
|
-
|
|
530
|
-
|
|
588
|
+
appearance = "ghost",
|
|
589
|
+
shape,
|
|
531
590
|
size = "md",
|
|
532
591
|
className,
|
|
533
592
|
...rest
|
|
534
593
|
}) => {
|
|
594
|
+
const eui = useEUIConfig();
|
|
595
|
+
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "circle";
|
|
596
|
+
const variantStyles = resolveAppearanceStyles({
|
|
597
|
+
appearance,
|
|
598
|
+
variant,
|
|
599
|
+
solid: variantsSolid,
|
|
600
|
+
lite: variantsLite,
|
|
601
|
+
ghost: variantsGhost
|
|
602
|
+
});
|
|
535
603
|
return /* @__PURE__ */ jsx("div", { className: "w-fit h-fit", children: /* @__PURE__ */ jsx(
|
|
536
604
|
"div",
|
|
537
605
|
{
|
|
538
606
|
...rest,
|
|
539
607
|
className: cn(
|
|
540
|
-
"inline-flex items-center justify-center text-center text-xs font-semibold
|
|
541
|
-
shapes[
|
|
608
|
+
"inline-flex items-center justify-center text-center text-xs font-semibold transition-all duration-300",
|
|
609
|
+
shapes[resolvedShape],
|
|
542
610
|
chipSizes[size],
|
|
543
|
-
|
|
611
|
+
variantStyles,
|
|
544
612
|
className
|
|
545
613
|
),
|
|
546
614
|
children: label
|
|
@@ -659,30 +727,6 @@ function DataViewFooter({ children }) {
|
|
|
659
727
|
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between mt-6 pt-4 border-t border-gray-700/60", children });
|
|
660
728
|
}
|
|
661
729
|
var DataViewFooter_default = DataViewFooter;
|
|
662
|
-
var EUIContext = createContext(null);
|
|
663
|
-
var EUIProvider = ({
|
|
664
|
-
config,
|
|
665
|
-
children
|
|
666
|
-
}) => {
|
|
667
|
-
const [state, setState] = useState(config);
|
|
668
|
-
return /* @__PURE__ */ jsx(EUIContext.Provider, { value: { config: state, setConfig: setState }, children });
|
|
669
|
-
};
|
|
670
|
-
var useEUIConfig = () => {
|
|
671
|
-
const ctx = useContext(EUIContext);
|
|
672
|
-
if (!ctx) {
|
|
673
|
-
throw new Error("useEUIConfig must be used inside EUIProvider");
|
|
674
|
-
}
|
|
675
|
-
return ctx;
|
|
676
|
-
};
|
|
677
|
-
|
|
678
|
-
// src/components/eui/resolveGlobalConfigs.tsx
|
|
679
|
-
function resolveWithGlobal(config, props, defaults) {
|
|
680
|
-
return {
|
|
681
|
-
...defaults,
|
|
682
|
-
...config?.global ?? {},
|
|
683
|
-
...props
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
730
|
function DataViewSearch({
|
|
687
731
|
placeholder = "Search...",
|
|
688
732
|
shape
|
|
@@ -739,7 +783,7 @@ function Accordion({
|
|
|
739
783
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
740
784
|
"div",
|
|
741
785
|
{
|
|
742
|
-
className:
|
|
786
|
+
className: classNames16({
|
|
743
787
|
"inline-flex gap-3 items-center px-3 py-2 w-full eui-gradient-to-r-general-xs": true,
|
|
744
788
|
"hover:cursor-pointer": toggleOnSummaryClick
|
|
745
789
|
}),
|
|
@@ -757,7 +801,7 @@ function Accordion({
|
|
|
757
801
|
children: /* @__PURE__ */ jsx(
|
|
758
802
|
FaCircleChevronDown,
|
|
759
803
|
{
|
|
760
|
-
className:
|
|
804
|
+
className: classNames16(
|
|
761
805
|
"text-xl transition-transform duration-300",
|
|
762
806
|
{ "rotate-180": collapse }
|
|
763
807
|
)
|
|
@@ -783,7 +827,7 @@ function Accordion({
|
|
|
783
827
|
children: /* @__PURE__ */ jsx(
|
|
784
828
|
"div",
|
|
785
829
|
{
|
|
786
|
-
className:
|
|
830
|
+
className: classNames16({
|
|
787
831
|
"border-t border-t-eui-dark-400/40 eui-text-sm": true,
|
|
788
832
|
"p-5": enableChildrenPadding
|
|
789
833
|
}),
|
|
@@ -863,7 +907,7 @@ function CardHeader({ icon, title, description, className }) {
|
|
|
863
907
|
return /* @__PURE__ */ jsxs(
|
|
864
908
|
"div",
|
|
865
909
|
{
|
|
866
|
-
className:
|
|
910
|
+
className: classNames16(
|
|
867
911
|
"flex items-start gap-4 p-6 border-b border-white/10",
|
|
868
912
|
className
|
|
869
913
|
),
|
|
@@ -879,14 +923,14 @@ function CardHeader({ icon, title, description, className }) {
|
|
|
879
923
|
}
|
|
880
924
|
var CardHeader_default = CardHeader;
|
|
881
925
|
function CardContent({ children, className }) {
|
|
882
|
-
return /* @__PURE__ */ jsx("div", { className:
|
|
926
|
+
return /* @__PURE__ */ jsx("div", { className: classNames16("p-6 text-gray-300 text-sm", className), children });
|
|
883
927
|
}
|
|
884
928
|
var CardContent_default = CardContent;
|
|
885
929
|
function CardFooter({ children, className }) {
|
|
886
930
|
return /* @__PURE__ */ jsx(
|
|
887
931
|
"div",
|
|
888
932
|
{
|
|
889
|
-
className:
|
|
933
|
+
className: classNames16(
|
|
890
934
|
"flex items-center gap-3 p-5 border-t border-white/10 text-sm text-gray-400",
|
|
891
935
|
className
|
|
892
936
|
),
|
|
@@ -928,7 +972,7 @@ function GradientAnimation({
|
|
|
928
972
|
return /* @__PURE__ */ jsx(
|
|
929
973
|
"div",
|
|
930
974
|
{
|
|
931
|
-
className:
|
|
975
|
+
className: classNames16("absolute inset-0"),
|
|
932
976
|
style: {
|
|
933
977
|
background: `linear-gradient(${cfg.angle}deg, ${cfg.colors?.join(",")})`,
|
|
934
978
|
backgroundSize: cfg.backgroundSize,
|
|
@@ -1074,7 +1118,7 @@ function MotionSurface({
|
|
|
1074
1118
|
}) {
|
|
1075
1119
|
const AnimationComponent = animationVariant === "custom" ? CustomAnimation : animationRegistry[animationVariant];
|
|
1076
1120
|
const OverlayComponent = overlay === "custom" ? CustomOverlay : overlayRegistry[overlay];
|
|
1077
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
1121
|
+
return /* @__PURE__ */ jsxs("div", { className: classNames16("relative overflow-hidden", className), children: [
|
|
1078
1122
|
AnimationComponent && /* @__PURE__ */ jsx(AnimationComponent, { config: animationConfig, animated }),
|
|
1079
1123
|
OverlayComponent && /* @__PURE__ */ jsx(OverlayComponent, { config: overlayConfig }),
|
|
1080
1124
|
/* @__PURE__ */ jsx("div", { className: "relative z-10", children })
|
|
@@ -1598,19 +1642,27 @@ function Info({
|
|
|
1598
1642
|
children,
|
|
1599
1643
|
variant = "default",
|
|
1600
1644
|
appearance = "lite",
|
|
1601
|
-
shape
|
|
1645
|
+
shape,
|
|
1602
1646
|
className,
|
|
1603
1647
|
...rest
|
|
1604
1648
|
}) {
|
|
1605
|
-
const
|
|
1649
|
+
const eui = useEUIConfig();
|
|
1650
|
+
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "roundedSquare";
|
|
1651
|
+
const variantStyles = resolveAppearanceStyles({
|
|
1652
|
+
appearance,
|
|
1653
|
+
variant,
|
|
1654
|
+
solid: infoVariantsSolid,
|
|
1655
|
+
lite: infoVariantsLite,
|
|
1656
|
+
ghost: infoVariantsGhost
|
|
1657
|
+
});
|
|
1606
1658
|
return /* @__PURE__ */ jsx(
|
|
1607
1659
|
"div",
|
|
1608
1660
|
{
|
|
1609
1661
|
...rest,
|
|
1610
1662
|
className: cn(
|
|
1611
|
-
"w-full p-5 text-sm transition-
|
|
1663
|
+
"w-full p-5 text-sm transition-all duration-300",
|
|
1612
1664
|
variantStyles,
|
|
1613
|
-
shapes[
|
|
1665
|
+
shapes[resolvedShape],
|
|
1614
1666
|
className
|
|
1615
1667
|
),
|
|
1616
1668
|
children
|
|
@@ -1956,7 +2008,7 @@ var ListItem = ({
|
|
|
1956
2008
|
align = "start",
|
|
1957
2009
|
className
|
|
1958
2010
|
}) => {
|
|
1959
|
-
const bullet = renderBullet?.(index) ?? (bulletType === "number" ? /* @__PURE__ */ jsxs("span", { className: "text-
|
|
2011
|
+
const bullet = renderBullet?.(index) ?? (bulletType === "number" ? /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium opacity-70", children: [
|
|
1960
2012
|
index + 1,
|
|
1961
2013
|
"."
|
|
1962
2014
|
] }) : bulletTypes[bulletType]);
|
|
@@ -1965,7 +2017,7 @@ var ListItem = ({
|
|
|
1965
2017
|
{
|
|
1966
2018
|
className: cn(
|
|
1967
2019
|
"flex gap-3",
|
|
1968
|
-
align === "center"
|
|
2020
|
+
align === "center" ? "items-center" : "items-baseline",
|
|
1969
2021
|
className
|
|
1970
2022
|
),
|
|
1971
2023
|
children: [
|
|
@@ -1973,18 +2025,23 @@ var ListItem = ({
|
|
|
1973
2025
|
"div",
|
|
1974
2026
|
{
|
|
1975
2027
|
className: cn(
|
|
1976
|
-
"
|
|
1977
|
-
|
|
1978
|
-
bulletType
|
|
2028
|
+
"shrink-0 text-gray-400 dark:text-gray-500",
|
|
2029
|
+
"w-[14px] flex justify-center",
|
|
2030
|
+
bulletType !== "number" && "mt-[0.35em]"
|
|
1979
2031
|
),
|
|
1980
2032
|
children: bullet
|
|
1981
2033
|
}
|
|
1982
2034
|
),
|
|
1983
|
-
TypographyComponent ? React4.cloneElement(
|
|
2035
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: TypographyComponent ? React4.cloneElement(
|
|
1984
2036
|
TypographyComponent,
|
|
1985
|
-
{
|
|
2037
|
+
{
|
|
2038
|
+
className: cn(
|
|
2039
|
+
"leading-relaxed",
|
|
2040
|
+
TypographyComponent?.props?.className
|
|
2041
|
+
)
|
|
2042
|
+
},
|
|
1986
2043
|
content
|
|
1987
|
-
) : content
|
|
2044
|
+
) : content })
|
|
1988
2045
|
]
|
|
1989
2046
|
}
|
|
1990
2047
|
);
|
|
@@ -2004,10 +2061,16 @@ var gridCols = {
|
|
|
2004
2061
|
};
|
|
2005
2062
|
function normalizeItem(item, defaultBulletType) {
|
|
2006
2063
|
if (typeof item === "string") {
|
|
2007
|
-
return {
|
|
2064
|
+
return {
|
|
2065
|
+
content: item,
|
|
2066
|
+
bulletType: defaultBulletType
|
|
2067
|
+
};
|
|
2008
2068
|
}
|
|
2009
2069
|
if (React4.isValidElement(item)) {
|
|
2010
|
-
return {
|
|
2070
|
+
return {
|
|
2071
|
+
content: item,
|
|
2072
|
+
bulletType: defaultBulletType
|
|
2073
|
+
};
|
|
2011
2074
|
}
|
|
2012
2075
|
return {
|
|
2013
2076
|
bulletType: defaultBulletType,
|
|
@@ -2028,8 +2091,8 @@ function List({
|
|
|
2028
2091
|
}) {
|
|
2029
2092
|
const isGrid = !!columns;
|
|
2030
2093
|
const isOrdered = bulletType === "number";
|
|
2031
|
-
return /* @__PURE__ */ jsxs("div", { ...rest, className: cn("py-
|
|
2032
|
-
title && /* @__PURE__ */ jsx("div", { className: "text-
|
|
2094
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, className: cn("py-2", className), children: [
|
|
2095
|
+
title && /* @__PURE__ */ jsx("div", { className: "text-sm font-semibold mb-3", children: title }),
|
|
2033
2096
|
/* @__PURE__ */ jsx(
|
|
2034
2097
|
"div",
|
|
2035
2098
|
{
|
|
@@ -2050,7 +2113,8 @@ function List({
|
|
|
2050
2113
|
bulletType: normalized.bulletType,
|
|
2051
2114
|
renderBullet: normalized.renderBullet,
|
|
2052
2115
|
TypographyComponent: normalized.TypographyComponent,
|
|
2053
|
-
className: normalized.className
|
|
2116
|
+
className: normalized.className,
|
|
2117
|
+
align
|
|
2054
2118
|
},
|
|
2055
2119
|
i
|
|
2056
2120
|
);
|
|
@@ -2060,230 +2124,404 @@ function List({
|
|
|
2060
2124
|
] });
|
|
2061
2125
|
}
|
|
2062
2126
|
var List_default = List;
|
|
2063
|
-
var
|
|
2064
|
-
|
|
2127
|
+
var calculateDiscountedPrice = (price, discount) => {
|
|
2128
|
+
if (!discount) return price;
|
|
2129
|
+
return price - price * discount / 100;
|
|
2065
2130
|
};
|
|
2131
|
+
var formatPrice = (value, decimals) => value.toFixed(decimals);
|
|
2066
2132
|
function PriceTag({
|
|
2067
|
-
discount,
|
|
2068
2133
|
price,
|
|
2134
|
+
discount,
|
|
2069
2135
|
code = "USD",
|
|
2136
|
+
variant = "success",
|
|
2137
|
+
appearance = "solid",
|
|
2138
|
+
shape,
|
|
2139
|
+
size = "md",
|
|
2140
|
+
decimals = 2,
|
|
2141
|
+
showCurrencyCode = true,
|
|
2142
|
+
currencyAsSubscript = true,
|
|
2143
|
+
showFreeLabel = true,
|
|
2070
2144
|
className,
|
|
2071
2145
|
...rest
|
|
2072
2146
|
}) {
|
|
2073
|
-
|
|
2074
|
-
|
|
2147
|
+
const eui = useEUIConfig();
|
|
2148
|
+
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "roundedSquare";
|
|
2149
|
+
const variantStyles = resolveAppearanceStyles({
|
|
2150
|
+
appearance,
|
|
2151
|
+
variant,
|
|
2152
|
+
solid: variantsSolid,
|
|
2153
|
+
lite: variantsLite,
|
|
2154
|
+
ghost: variantsGhost
|
|
2155
|
+
});
|
|
2156
|
+
const discountedPrice = calculateDiscountedPrice(price, discount);
|
|
2157
|
+
const currency = getCurrencySymbol(code);
|
|
2158
|
+
if (price <= 0 && showFreeLabel) {
|
|
2159
|
+
return /* @__PURE__ */ jsx("div", { ...rest, className: cn("inline-flex items-center", className), children: /* @__PURE__ */ jsx(
|
|
2075
2160
|
"div",
|
|
2076
2161
|
{
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2162
|
+
className: cn(
|
|
2163
|
+
"font-semibold",
|
|
2164
|
+
"px-3 py-1",
|
|
2165
|
+
"inline-flex items-center justify-center",
|
|
2166
|
+
variantStyles,
|
|
2167
|
+
shapes[resolvedShape],
|
|
2168
|
+
badgeSizes[size]
|
|
2169
|
+
),
|
|
2170
|
+
children: "FREE"
|
|
2080
2171
|
}
|
|
2081
|
-
);
|
|
2172
|
+
) });
|
|
2082
2173
|
}
|
|
2083
|
-
|
|
2084
|
-
|
|
2174
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, className: cn("inline-flex items-center gap-3", className), children: [
|
|
2175
|
+
!!discount && discount > 0 && /* @__PURE__ */ jsxs(
|
|
2085
2176
|
"div",
|
|
2086
2177
|
{
|
|
2087
|
-
|
|
2088
|
-
|
|
2178
|
+
className: cn(
|
|
2179
|
+
"inline-flex items-center justify-center",
|
|
2180
|
+
"font-semibold leading-none",
|
|
2181
|
+
"px-3 py-1",
|
|
2182
|
+
variantStyles,
|
|
2183
|
+
shapes[resolvedShape],
|
|
2184
|
+
badgeSizes[size]
|
|
2185
|
+
),
|
|
2089
2186
|
children: [
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
"%"
|
|
2094
|
-
] }),
|
|
2095
|
-
/* @__PURE__ */ jsxs("div", { className: "inline-flex gap-1 items-center", children: [
|
|
2096
|
-
discount ? /* @__PURE__ */ jsxs("div", { className: "inline-flex gap-[3px] font-semibold", children: [
|
|
2097
|
-
/* @__PURE__ */ jsxs("div", { className: "eui-text-sm line-through", children: [
|
|
2098
|
-
getCurrencySymbol(code),
|
|
2099
|
-
price
|
|
2100
|
-
] }),
|
|
2101
|
-
/* @__PURE__ */ jsxs("div", { className: "eui-text-md", children: [
|
|
2102
|
-
getCurrencySymbol(code),
|
|
2103
|
-
applyDiscount(discount, price)
|
|
2104
|
-
] })
|
|
2105
|
-
] }) : /* @__PURE__ */ jsxs("div", { className: "text-gray-50 font-semibold", children: [
|
|
2106
|
-
getCurrencySymbol(code),
|
|
2107
|
-
price
|
|
2108
|
-
] }),
|
|
2109
|
-
/* @__PURE__ */ jsx("div", { className: "text-yellow-500 font-thin", children: code })
|
|
2110
|
-
] })
|
|
2187
|
+
"-",
|
|
2188
|
+
discount,
|
|
2189
|
+
"%"
|
|
2111
2190
|
]
|
|
2112
2191
|
}
|
|
2113
|
-
)
|
|
2114
|
-
|
|
2192
|
+
),
|
|
2193
|
+
/* @__PURE__ */ jsxs("div", { className: "inline-flex items-baseline gap-3", children: [
|
|
2194
|
+
!!discount && discount > 0 && /* @__PURE__ */ jsxs(
|
|
2195
|
+
"span",
|
|
2196
|
+
{
|
|
2197
|
+
className: cn(
|
|
2198
|
+
"font-semibold leading-none",
|
|
2199
|
+
"opacity-50 line-through",
|
|
2200
|
+
"text-lg"
|
|
2201
|
+
),
|
|
2202
|
+
children: [
|
|
2203
|
+
currency,
|
|
2204
|
+
formatPrice(price, decimals)
|
|
2205
|
+
]
|
|
2206
|
+
}
|
|
2207
|
+
),
|
|
2208
|
+
/* @__PURE__ */ jsxs("span", { className: cn("font-semibold leading-none", "text-lg"), children: [
|
|
2209
|
+
currency,
|
|
2210
|
+
formatPrice(discountedPrice, decimals)
|
|
2211
|
+
] }),
|
|
2212
|
+
showCurrencyCode && /* @__PURE__ */ jsx(
|
|
2213
|
+
"span",
|
|
2214
|
+
{
|
|
2215
|
+
className: cn(
|
|
2216
|
+
"uppercase tracking-wide opacity-60",
|
|
2217
|
+
currencyAsSubscript ? "text-[10px] relative top-[0.35em]" : "text-xs"
|
|
2218
|
+
),
|
|
2219
|
+
children: code
|
|
2220
|
+
}
|
|
2221
|
+
)
|
|
2222
|
+
] })
|
|
2223
|
+
] });
|
|
2115
2224
|
}
|
|
2116
|
-
var
|
|
2117
|
-
xs:
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2225
|
+
var progressSizes = {
|
|
2226
|
+
xs: {
|
|
2227
|
+
track: "h-1",
|
|
2228
|
+
text: "text-[10px]"
|
|
2229
|
+
},
|
|
2230
|
+
sm: {
|
|
2231
|
+
track: "h-2",
|
|
2232
|
+
text: "text-xs"
|
|
2233
|
+
},
|
|
2234
|
+
md: {
|
|
2235
|
+
track: "h-3",
|
|
2236
|
+
text: "text-sm"
|
|
2237
|
+
},
|
|
2238
|
+
lg: {
|
|
2239
|
+
track: "h-4",
|
|
2240
|
+
text: "text-sm"
|
|
2241
|
+
},
|
|
2242
|
+
xl: {
|
|
2243
|
+
track: "h-5",
|
|
2244
|
+
text: "text-base"
|
|
2245
|
+
}
|
|
2122
2246
|
};
|
|
2123
|
-
|
|
2247
|
+
function ProgressBar({
|
|
2124
2248
|
value,
|
|
2249
|
+
min = 0,
|
|
2250
|
+
max = 100,
|
|
2125
2251
|
variant = "success",
|
|
2126
|
-
|
|
2252
|
+
appearance = "solid",
|
|
2253
|
+
size = "md",
|
|
2254
|
+
shape,
|
|
2255
|
+
striped = false,
|
|
2256
|
+
animated = true,
|
|
2127
2257
|
showLabel = true,
|
|
2128
|
-
label,
|
|
2258
|
+
label = "Progress",
|
|
2129
2259
|
labelPlacement = "top",
|
|
2260
|
+
showPercentage = true,
|
|
2261
|
+
startContent,
|
|
2262
|
+
endContent,
|
|
2263
|
+
trackClassName,
|
|
2264
|
+
barClassName,
|
|
2130
2265
|
className,
|
|
2131
2266
|
...rest
|
|
2132
|
-
})
|
|
2133
|
-
const
|
|
2267
|
+
}) {
|
|
2268
|
+
const eui = useEUIConfig();
|
|
2269
|
+
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "roundedSquare";
|
|
2270
|
+
const clampedValue = Math.min(max, Math.max(min, value));
|
|
2271
|
+
const percentage = (clampedValue - min) / (max - min) * 100;
|
|
2272
|
+
const variantStyles = resolveAppearanceStyles({
|
|
2273
|
+
appearance,
|
|
2274
|
+
variant,
|
|
2275
|
+
solid: variantsSolid,
|
|
2276
|
+
lite: variantsLite,
|
|
2277
|
+
ghost: variantsGhost
|
|
2278
|
+
});
|
|
2279
|
+
const sizeStyles = progressSizes[size];
|
|
2280
|
+
const hasTopLabel = showLabel && labelPlacement === "top";
|
|
2281
|
+
const hasBottomLabel = showLabel && labelPlacement === "bottom";
|
|
2282
|
+
const labelNode = /* @__PURE__ */ jsxs(
|
|
2283
|
+
"div",
|
|
2284
|
+
{
|
|
2285
|
+
className: cn(
|
|
2286
|
+
"flex items-center justify-between gap-3",
|
|
2287
|
+
sizeStyles.text,
|
|
2288
|
+
"text-gray-600 dark:text-gray-300"
|
|
2289
|
+
),
|
|
2290
|
+
children: [
|
|
2291
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2292
|
+
startContent,
|
|
2293
|
+
showLabel && /* @__PURE__ */ jsx("span", { className: "font-medium", children: label })
|
|
2294
|
+
] }),
|
|
2295
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2296
|
+
endContent,
|
|
2297
|
+
showPercentage && /* @__PURE__ */ jsxs("span", { className: "tabular-nums opacity-80", children: [
|
|
2298
|
+
Math.round(percentage),
|
|
2299
|
+
"%"
|
|
2300
|
+
] })
|
|
2301
|
+
] })
|
|
2302
|
+
]
|
|
2303
|
+
}
|
|
2304
|
+
);
|
|
2134
2305
|
return /* @__PURE__ */ jsxs("div", { ...rest, className: cn("w-full", className), children: [
|
|
2135
|
-
|
|
2136
|
-
/* @__PURE__ */ jsx("span", { children: label ?? "Progress" }),
|
|
2137
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
2138
|
-
clampedValue,
|
|
2139
|
-
"%"
|
|
2140
|
-
] })
|
|
2141
|
-
] }),
|
|
2306
|
+
hasTopLabel && /* @__PURE__ */ jsx("div", { className: "mb-2", children: labelNode }),
|
|
2142
2307
|
/* @__PURE__ */ jsxs(
|
|
2143
2308
|
"div",
|
|
2144
2309
|
{
|
|
2145
2310
|
className: cn(
|
|
2146
|
-
"relative
|
|
2147
|
-
|
|
2311
|
+
"relative overflow-hidden",
|
|
2312
|
+
"bg-gray-200 dark:bg-neutral-800",
|
|
2313
|
+
"border border-gray-300 dark:border-neutral-700",
|
|
2314
|
+
"shadow-inner",
|
|
2315
|
+
sizeStyles.track,
|
|
2316
|
+
shapes[resolvedShape],
|
|
2317
|
+
trackClassName
|
|
2148
2318
|
),
|
|
2319
|
+
role: "progressbar",
|
|
2320
|
+
"aria-valuemin": min,
|
|
2321
|
+
"aria-valuemax": max,
|
|
2322
|
+
"aria-valuenow": clampedValue,
|
|
2149
2323
|
children: [
|
|
2150
2324
|
/* @__PURE__ */ jsx(
|
|
2151
2325
|
"div",
|
|
2152
2326
|
{
|
|
2153
2327
|
className: cn(
|
|
2154
|
-
"h-full
|
|
2155
|
-
|
|
2328
|
+
"relative h-full",
|
|
2329
|
+
animated && "transition-all duration-500 ease-out",
|
|
2330
|
+
"before:absolute before:inset-0",
|
|
2331
|
+
"before:bg-white/10 dark:before:bg-white/5",
|
|
2332
|
+
"border-r border-white/10 dark:border-white/5",
|
|
2333
|
+
striped && [
|
|
2334
|
+
"bg-[length:40px_40px]",
|
|
2335
|
+
"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)]",
|
|
2336
|
+
animated && "animate-eui-progress-stripes"
|
|
2337
|
+
],
|
|
2338
|
+
variantStyles,
|
|
2339
|
+
barClassName
|
|
2156
2340
|
),
|
|
2157
|
-
style: {
|
|
2341
|
+
style: {
|
|
2342
|
+
width: `${percentage}%`
|
|
2343
|
+
}
|
|
2158
2344
|
}
|
|
2159
2345
|
),
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2346
|
+
labelPlacement === "overlay" && /* @__PURE__ */ jsx(
|
|
2347
|
+
"div",
|
|
2348
|
+
{
|
|
2349
|
+
className: cn(
|
|
2350
|
+
"absolute inset-0",
|
|
2351
|
+
"flex items-center justify-center",
|
|
2352
|
+
"font-medium",
|
|
2353
|
+
"text-white",
|
|
2354
|
+
sizeStyles.text,
|
|
2355
|
+
"pointer-events-none"
|
|
2356
|
+
),
|
|
2357
|
+
children: /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2", children: [
|
|
2358
|
+
showLabel && /* @__PURE__ */ jsx("span", { children: label }),
|
|
2359
|
+
showPercentage && /* @__PURE__ */ jsxs("span", { children: [
|
|
2360
|
+
Math.round(percentage),
|
|
2361
|
+
"%"
|
|
2362
|
+
] })
|
|
2363
|
+
] })
|
|
2364
|
+
}
|
|
2365
|
+
)
|
|
2166
2366
|
]
|
|
2167
2367
|
}
|
|
2168
|
-
)
|
|
2368
|
+
),
|
|
2369
|
+
hasBottomLabel && /* @__PURE__ */ jsx("div", { className: "mt-2", children: labelNode })
|
|
2169
2370
|
] });
|
|
2371
|
+
}
|
|
2372
|
+
var sizes = {
|
|
2373
|
+
xs: "text-[10px]",
|
|
2374
|
+
sm: "text-xs",
|
|
2375
|
+
md: "text-sm",
|
|
2376
|
+
lg: "text-base",
|
|
2377
|
+
xl: "text-lg"
|
|
2170
2378
|
};
|
|
2171
2379
|
function StarRating({
|
|
2172
2380
|
rating,
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2381
|
+
max = 5,
|
|
2382
|
+
size = "md",
|
|
2383
|
+
showValue = false,
|
|
2384
|
+
valuePosition = "start",
|
|
2385
|
+
iconClassName,
|
|
2176
2386
|
className,
|
|
2177
2387
|
...rest
|
|
2178
2388
|
}) {
|
|
2179
|
-
const
|
|
2180
|
-
const
|
|
2181
|
-
const
|
|
2182
|
-
const
|
|
2183
|
-
const
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
isNumericRatingEnabled && /* @__PURE__ */ jsx("div", { className: "text-yellow-700 font-semibold text-[14px]", children: rating.toFixed(1) }),
|
|
2389
|
+
const normalizedRating = Math.max(0, Math.min(max, rating));
|
|
2390
|
+
const fullStars = Math.floor(normalizedRating);
|
|
2391
|
+
const hasHalfStar = normalizedRating % 1 >= 0.5;
|
|
2392
|
+
const emptyStars = max - fullStars - (hasHalfStar ? 1 : 0);
|
|
2393
|
+
const ratingValue = /* @__PURE__ */ jsx("span", { className: "font-semibold text-yellow-600 dark:text-yellow-400", children: normalizedRating.toFixed(1) });
|
|
2394
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, className: cn("inline-flex items-center gap-2", className), children: [
|
|
2395
|
+
showValue && valuePosition === "start" && ratingValue,
|
|
2187
2396
|
/* @__PURE__ */ jsxs(
|
|
2188
2397
|
"div",
|
|
2189
2398
|
{
|
|
2190
2399
|
className: cn(
|
|
2191
|
-
"flex
|
|
2192
|
-
|
|
2400
|
+
"inline-flex items-center gap-[2px]",
|
|
2401
|
+
"text-yellow-500 dark:text-yellow-400",
|
|
2402
|
+
sizes[size],
|
|
2403
|
+
iconClassName
|
|
2193
2404
|
),
|
|
2194
2405
|
children: [
|
|
2195
|
-
[...Array(fullStars)].map((_, index) => /* @__PURE__ */ jsx(
|
|
2196
|
-
|
|
2197
|
-
[...Array(emptyStars)].map((_, index) => /* @__PURE__ */ jsx(
|
|
2406
|
+
[...Array(fullStars)].map((_, index) => /* @__PURE__ */ jsx(BsStarFill, {}, index)),
|
|
2407
|
+
hasHalfStar && /* @__PURE__ */ jsx(BsStarHalf, {}),
|
|
2408
|
+
[...Array(emptyStars)].map((_, index) => /* @__PURE__ */ jsx(BsStar, { className: "opacity-40" }, index + fullStars))
|
|
2198
2409
|
]
|
|
2199
2410
|
}
|
|
2200
2411
|
),
|
|
2201
|
-
|
|
2202
|
-
"(",
|
|
2203
|
-
reviewAmount,
|
|
2204
|
-
")"
|
|
2205
|
-
] })
|
|
2412
|
+
showValue && valuePosition === "end" && ratingValue
|
|
2206
2413
|
] });
|
|
2207
2414
|
}
|
|
2208
2415
|
var StarRating_default = StarRating;
|
|
2209
|
-
var
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2416
|
+
var sizes2 = {
|
|
2417
|
+
xs: {
|
|
2418
|
+
value: "text-2xl",
|
|
2419
|
+
review: "text-xs"
|
|
2420
|
+
},
|
|
2421
|
+
sm: {
|
|
2422
|
+
value: "text-3xl",
|
|
2423
|
+
review: "text-xs"
|
|
2424
|
+
},
|
|
2425
|
+
md: {
|
|
2426
|
+
value: "text-5xl",
|
|
2427
|
+
review: "text-sm"
|
|
2428
|
+
},
|
|
2429
|
+
lg: {
|
|
2430
|
+
value: "text-6xl",
|
|
2431
|
+
review: "text-base"
|
|
2432
|
+
},
|
|
2433
|
+
xl: {
|
|
2434
|
+
value: "text-7xl",
|
|
2435
|
+
review: "text-lg"
|
|
2436
|
+
}
|
|
2218
2437
|
};
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2438
|
+
function NumericRating({
|
|
2439
|
+
rating,
|
|
2440
|
+
totalReviews,
|
|
2441
|
+
size = "md",
|
|
2442
|
+
showStars = true,
|
|
2443
|
+
showReviewCount = true,
|
|
2444
|
+
reviewLabel = "reviews",
|
|
2445
|
+
className,
|
|
2446
|
+
...rest
|
|
2447
|
+
}) {
|
|
2448
|
+
const sizeStyles = sizes2[size];
|
|
2449
|
+
return /* @__PURE__ */ jsxs(
|
|
2450
|
+
"div",
|
|
2451
|
+
{
|
|
2452
|
+
...rest,
|
|
2453
|
+
className: cn(
|
|
2454
|
+
"flex flex-col items-center justify-center",
|
|
2455
|
+
"min-w-[120px]",
|
|
2456
|
+
className
|
|
2457
|
+
),
|
|
2458
|
+
children: [
|
|
2459
|
+
/* @__PURE__ */ jsx(
|
|
2460
|
+
"div",
|
|
2461
|
+
{
|
|
2462
|
+
className: cn(
|
|
2463
|
+
"font-bold leading-none",
|
|
2464
|
+
"text-gray-900 dark:text-gray-100",
|
|
2465
|
+
sizeStyles.value
|
|
2466
|
+
),
|
|
2467
|
+
children: rating.toFixed(1)
|
|
2468
|
+
}
|
|
2469
|
+
),
|
|
2470
|
+
showStars && /* @__PURE__ */ jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsx(StarRating_default, { rating, size }) }),
|
|
2471
|
+
showReviewCount && totalReviews !== void 0 && /* @__PURE__ */ jsxs(
|
|
2472
|
+
"div",
|
|
2473
|
+
{
|
|
2474
|
+
className: cn(
|
|
2475
|
+
"mt-1 text-gray-500 dark:text-gray-400",
|
|
2476
|
+
sizeStyles.review
|
|
2477
|
+
),
|
|
2478
|
+
children: [
|
|
2479
|
+
totalReviews,
|
|
2480
|
+
" ",
|
|
2481
|
+
reviewLabel
|
|
2482
|
+
]
|
|
2483
|
+
}
|
|
2484
|
+
)
|
|
2485
|
+
]
|
|
2486
|
+
}
|
|
2487
|
+
);
|
|
2488
|
+
}
|
|
2489
|
+
var NumericRating_default = NumericRating;
|
|
2490
|
+
function ProgressBarRating({
|
|
2491
|
+
star,
|
|
2492
|
+
percentage,
|
|
2493
|
+
variant = "warning",
|
|
2494
|
+
appearance = "solid",
|
|
2495
|
+
shape = "roundedSquare",
|
|
2496
|
+
size = "sm",
|
|
2497
|
+
animated = true,
|
|
2498
|
+
striped = false,
|
|
2499
|
+
className,
|
|
2500
|
+
...rest
|
|
2501
|
+
}) {
|
|
2502
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, className: cn("flex items-center gap-3 w-full", className), children: [
|
|
2503
|
+
/* @__PURE__ */ jsx("div", { className: "w-5 text-sm font-medium text-gray-700 dark:text-gray-300", children: star }),
|
|
2504
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
2505
|
+
ProgressBar,
|
|
2224
2506
|
{
|
|
2225
|
-
|
|
2226
|
-
|
|
2507
|
+
value: percentage,
|
|
2508
|
+
variant,
|
|
2509
|
+
appearance,
|
|
2510
|
+
shape,
|
|
2511
|
+
size,
|
|
2512
|
+
animated,
|
|
2513
|
+
striped,
|
|
2514
|
+
showLabel: false,
|
|
2515
|
+
showPercentage: false
|
|
2227
2516
|
}
|
|
2228
2517
|
) }),
|
|
2229
|
-
/* @__PURE__ */ jsxs("div", { className: "text-xs text-gray-500
|
|
2518
|
+
/* @__PURE__ */ jsxs("div", { className: "w-[52px] text-right text-xs tabular-nums text-gray-500 dark:text-gray-400", children: [
|
|
2230
2519
|
percentage.toFixed(1),
|
|
2231
2520
|
"%"
|
|
2232
2521
|
] })
|
|
2233
2522
|
] });
|
|
2234
|
-
};
|
|
2235
|
-
var ProgressBarsRating = ({
|
|
2236
|
-
ratingDistribution
|
|
2237
|
-
}) => {
|
|
2238
|
-
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 w-full max-w-md", children: ratingDistribution.map((item) => /* @__PURE__ */ jsx(
|
|
2239
|
-
ProgressBarRating,
|
|
2240
|
-
{
|
|
2241
|
-
star: item.star,
|
|
2242
|
-
percentage: item.percentage
|
|
2243
|
-
},
|
|
2244
|
-
item.star
|
|
2245
|
-
)) });
|
|
2246
|
-
};
|
|
2247
|
-
function StarRatingDistribution({
|
|
2248
|
-
numericRating = true,
|
|
2249
|
-
progressBarsRating = true,
|
|
2250
|
-
ratingDistribution = [
|
|
2251
|
-
{ star: 5, count: 0 },
|
|
2252
|
-
{ star: 4, count: 0 },
|
|
2253
|
-
{ star: 3, count: 0 },
|
|
2254
|
-
{ star: 2, count: 0 },
|
|
2255
|
-
{ star: 1, count: 0 }
|
|
2256
|
-
]
|
|
2257
|
-
}) {
|
|
2258
|
-
const totalReviews = ratingDistribution.reduce(
|
|
2259
|
-
(acc, item) => acc + item.count,
|
|
2260
|
-
0
|
|
2261
|
-
);
|
|
2262
|
-
const averageRating = totalReviews > 0 ? ratingDistribution.reduce(
|
|
2263
|
-
(acc, item) => acc + item.star * item.count,
|
|
2264
|
-
0
|
|
2265
|
-
) / totalReviews : 0;
|
|
2266
|
-
const ratingDistributionWithPercentage = ratingDistribution.map((item) => ({
|
|
2267
|
-
star: item.star,
|
|
2268
|
-
percentage: totalReviews > 0 ? item.count / totalReviews * 100 : 0
|
|
2269
|
-
}));
|
|
2270
|
-
return /* @__PURE__ */ 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: [
|
|
2271
|
-
numericRating && /* @__PURE__ */ jsx(
|
|
2272
|
-
NumericRating,
|
|
2273
|
-
{
|
|
2274
|
-
averageRating,
|
|
2275
|
-
totalReviews
|
|
2276
|
-
}
|
|
2277
|
-
),
|
|
2278
|
-
progressBarsRating && /* @__PURE__ */ jsx(
|
|
2279
|
-
ProgressBarsRating,
|
|
2280
|
-
{
|
|
2281
|
-
ratingDistribution: ratingDistributionWithPercentage
|
|
2282
|
-
}
|
|
2283
|
-
)
|
|
2284
|
-
] });
|
|
2285
2523
|
}
|
|
2286
|
-
var
|
|
2524
|
+
var ProgressBarRating_default = ProgressBarRating;
|
|
2287
2525
|
function Table({
|
|
2288
2526
|
title,
|
|
2289
2527
|
columns,
|
|
@@ -2591,7 +2829,7 @@ var Form = ({
|
|
|
2591
2829
|
/* @__PURE__ */ jsx(UnsavedChangesGuard_default, { formik, enabled: warnOnUnsavedChanges }),
|
|
2592
2830
|
/* @__PURE__ */ jsx(DirtyObserver_default, { formik, onDirtyChange }),
|
|
2593
2831
|
/* @__PURE__ */ jsx(FormObserver_default, { formik, onChange }),
|
|
2594
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
2832
|
+
/* @__PURE__ */ jsx("div", { className: classNames16(styles), children })
|
|
2595
2833
|
] })
|
|
2596
2834
|
}
|
|
2597
2835
|
);
|
|
@@ -2600,7 +2838,7 @@ var Backdrop = ({ children, styles }) => {
|
|
|
2600
2838
|
return /* @__PURE__ */ jsx(
|
|
2601
2839
|
"div",
|
|
2602
2840
|
{
|
|
2603
|
-
className:
|
|
2841
|
+
className: classNames16({
|
|
2604
2842
|
"bg-black/75 top-0 bottom-0 left-0 right-0 z-50 fixed inset-0 flex items-center justify-center overflow-hidden": true,
|
|
2605
2843
|
[`${styles}`]: styles
|
|
2606
2844
|
}),
|
|
@@ -2694,7 +2932,7 @@ var Transition4 = {
|
|
|
2694
2932
|
TransitionDropdown: TransitionDropdown_default,
|
|
2695
2933
|
TransitionFadeIn: TransitionFadeIn_default
|
|
2696
2934
|
};
|
|
2697
|
-
var
|
|
2935
|
+
var sizes3 = {
|
|
2698
2936
|
xs: "px-2 py-1 text-xs",
|
|
2699
2937
|
sm: "px-3 py-2 text-sm",
|
|
2700
2938
|
md: "px-4 py-2 text-base",
|
|
@@ -2711,11 +2949,11 @@ function FormResponse({
|
|
|
2711
2949
|
return /* @__PURE__ */ jsx(Transition4.TransitionDropdown, { visibility: text ? true : false, children: /* @__PURE__ */ jsx(
|
|
2712
2950
|
"div",
|
|
2713
2951
|
{
|
|
2714
|
-
className:
|
|
2952
|
+
className: classNames16({
|
|
2715
2953
|
"font-poppins font-light text-sm": true,
|
|
2716
2954
|
[`${variantsLite[variant]}`]: variant,
|
|
2717
2955
|
[`${shapes[shape]}`]: shape,
|
|
2718
|
-
[`${
|
|
2956
|
+
[`${sizes3[size]}`]: size,
|
|
2719
2957
|
[`${styles}`]: styles
|
|
2720
2958
|
}),
|
|
2721
2959
|
children: text
|
|
@@ -2828,7 +3066,7 @@ var ThemeSwitch = () => {
|
|
|
2828
3066
|
/* @__PURE__ */ jsx(
|
|
2829
3067
|
"div",
|
|
2830
3068
|
{
|
|
2831
|
-
className:
|
|
3069
|
+
className: classNames16(
|
|
2832
3070
|
"w-6 h-6 bg-white dark:bg-gray-600 rounded-full shadow-md transition-transform duration-300",
|
|
2833
3071
|
theme === "dark" ? "translate-x-8" : "translate-x-0"
|
|
2834
3072
|
)
|
|
@@ -14290,31 +14528,39 @@ function WorldMap({
|
|
|
14290
14528
|
/* @__PURE__ */ jsx(Tooltip4, { show: showTooltip, children: tooltipContent })
|
|
14291
14529
|
] });
|
|
14292
14530
|
}
|
|
14293
|
-
var
|
|
14531
|
+
var sizes4 = {
|
|
14294
14532
|
xs: "px-2 py-1 text-xs",
|
|
14295
14533
|
sm: "px-3 py-1.5 text-sm",
|
|
14296
14534
|
md: "px-4 py-2 text-base",
|
|
14297
14535
|
lg: "px-5 py-3 text-lg",
|
|
14298
14536
|
xl: "px-6 py-4 text-xl"
|
|
14299
14537
|
};
|
|
14300
|
-
|
|
14538
|
+
function Button({
|
|
14301
14539
|
type = "button",
|
|
14302
14540
|
icon,
|
|
14303
14541
|
text,
|
|
14304
14542
|
children,
|
|
14305
|
-
loading,
|
|
14306
|
-
disabled,
|
|
14307
|
-
|
|
14308
|
-
block,
|
|
14543
|
+
loading = false,
|
|
14544
|
+
disabled = false,
|
|
14545
|
+
block = false,
|
|
14309
14546
|
variant = "success",
|
|
14547
|
+
appearance = "solid",
|
|
14310
14548
|
shape,
|
|
14311
14549
|
size = "md",
|
|
14312
|
-
|
|
14313
|
-
|
|
14314
|
-
|
|
14550
|
+
className,
|
|
14551
|
+
onMouseMove,
|
|
14552
|
+
...rest
|
|
14553
|
+
}) {
|
|
14315
14554
|
const eui = useEUIConfig();
|
|
14316
14555
|
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "square";
|
|
14317
14556
|
const btnRef = useRef(null);
|
|
14557
|
+
const variantStyles = resolveAppearanceStyles({
|
|
14558
|
+
appearance,
|
|
14559
|
+
variant,
|
|
14560
|
+
solid: variantsSolid,
|
|
14561
|
+
lite: variantsLite,
|
|
14562
|
+
ghost: variantsGhost
|
|
14563
|
+
});
|
|
14318
14564
|
const handleMouseMove = (e) => {
|
|
14319
14565
|
const btn = btnRef.current;
|
|
14320
14566
|
if (!btn) return;
|
|
@@ -14323,38 +14569,36 @@ var Button = ({
|
|
|
14323
14569
|
const y = e.clientY - rect.top;
|
|
14324
14570
|
btn.style.setProperty("--glow-x", `${x}px`);
|
|
14325
14571
|
btn.style.setProperty("--glow-y", `${y}px`);
|
|
14572
|
+
onMouseMove?.(e);
|
|
14326
14573
|
};
|
|
14327
14574
|
return /* @__PURE__ */ jsxs(
|
|
14328
14575
|
"button",
|
|
14329
14576
|
{
|
|
14577
|
+
...rest,
|
|
14330
14578
|
ref: btnRef,
|
|
14331
14579
|
type,
|
|
14332
|
-
onClick,
|
|
14333
|
-
onMouseMove: handleMouseMove,
|
|
14334
14580
|
disabled: disabled || loading,
|
|
14335
|
-
|
|
14336
|
-
|
|
14337
|
-
"
|
|
14338
|
-
|
|
14339
|
-
[
|
|
14340
|
-
[
|
|
14341
|
-
|
|
14342
|
-
"
|
|
14343
|
-
|
|
14344
|
-
|
|
14345
|
-
|
|
14346
|
-
[`${styles}`]: styles
|
|
14347
|
-
}),
|
|
14581
|
+
onMouseMove: handleMouseMove,
|
|
14582
|
+
className: cn(
|
|
14583
|
+
"relative overflow-hidden group inline-flex items-center justify-center gap-2 transition-all duration-300",
|
|
14584
|
+
variantStyles,
|
|
14585
|
+
shapes[resolvedShape],
|
|
14586
|
+
sizes4[size],
|
|
14587
|
+
block && "w-full",
|
|
14588
|
+
(loading || disabled) && "brightness-75 grayscale cursor-not-allowed",
|
|
14589
|
+
!loading && !disabled && "hover:cursor-pointer",
|
|
14590
|
+
className
|
|
14591
|
+
),
|
|
14348
14592
|
children: [
|
|
14349
14593
|
/* @__PURE__ */ jsx(
|
|
14350
14594
|
"span",
|
|
14351
14595
|
{
|
|
14352
|
-
className: "
|
|
14596
|
+
className: "pointer-events-none absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300",
|
|
14353
14597
|
style: {
|
|
14354
14598
|
background: `
|
|
14355
14599
|
radial-gradient(
|
|
14356
14600
|
200px circle at var(--glow-x) var(--glow-y),
|
|
14357
|
-
rgba(
|
|
14601
|
+
rgba(255,255,255,0.18),
|
|
14358
14602
|
transparent 50%
|
|
14359
14603
|
)
|
|
14360
14604
|
`
|
|
@@ -14362,13 +14606,14 @@ var Button = ({
|
|
|
14362
14606
|
}
|
|
14363
14607
|
),
|
|
14364
14608
|
loading && /* @__PURE__ */ jsx(AiOutlineLoading, { className: "animate-spin z-10" }),
|
|
14365
|
-
icon && /* @__PURE__ */ jsx("
|
|
14366
|
-
text && /* @__PURE__ */ jsx("
|
|
14367
|
-
children && /* @__PURE__ */ jsx("
|
|
14609
|
+
icon && /* @__PURE__ */ jsx("span", { className: "z-10", children: icon }),
|
|
14610
|
+
text && /* @__PURE__ */ jsx("span", { className: "z-10", children: text }),
|
|
14611
|
+
children && /* @__PURE__ */ jsx("span", { className: "z-10", children })
|
|
14368
14612
|
]
|
|
14369
14613
|
}
|
|
14370
14614
|
);
|
|
14371
|
-
}
|
|
14615
|
+
}
|
|
14616
|
+
var Button_default = Button;
|
|
14372
14617
|
function InputResponse({
|
|
14373
14618
|
name,
|
|
14374
14619
|
visibility,
|
|
@@ -14378,7 +14623,7 @@ function InputResponse({
|
|
|
14378
14623
|
return /* @__PURE__ */ jsx(Transition4.TransitionDropdown, { visibility, children: /* @__PURE__ */ jsx(
|
|
14379
14624
|
"div",
|
|
14380
14625
|
{
|
|
14381
|
-
className:
|
|
14626
|
+
className: classNames16({
|
|
14382
14627
|
"font-medium text-sm py-1 px-2": true,
|
|
14383
14628
|
[`${textVariants[variant]}`]: variant,
|
|
14384
14629
|
"transition-all ease-in-out": true,
|
|
@@ -14393,7 +14638,7 @@ function InputLabel({ text, children, styles }) {
|
|
|
14393
14638
|
return /* @__PURE__ */ jsx(
|
|
14394
14639
|
"label",
|
|
14395
14640
|
{
|
|
14396
|
-
className:
|
|
14641
|
+
className: classNames16({
|
|
14397
14642
|
"px-0 eui-text-sm text-[13.5px] pointer-events-none select-none": true,
|
|
14398
14643
|
"transition-all ease-in-out": true,
|
|
14399
14644
|
[`${styles}`]: styles
|
|
@@ -14445,7 +14690,7 @@ var Input = ({
|
|
|
14445
14690
|
...field,
|
|
14446
14691
|
...props,
|
|
14447
14692
|
placeholder,
|
|
14448
|
-
className:
|
|
14693
|
+
className: classNames16({
|
|
14449
14694
|
"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,
|
|
14450
14695
|
"border-eui-primary-400 focus:border-eui-secondary-500": !(meta.touched && meta.error),
|
|
14451
14696
|
"border-eui-danger-500": meta.touched && meta.error,
|
|
@@ -14490,7 +14735,7 @@ var InputFile = ({
|
|
|
14490
14735
|
/* @__PURE__ */ jsx(
|
|
14491
14736
|
"div",
|
|
14492
14737
|
{
|
|
14493
|
-
className:
|
|
14738
|
+
className: classNames16(
|
|
14494
14739
|
"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",
|
|
14495
14740
|
{
|
|
14496
14741
|
"border-eui-primary-400 focus:border-eui-secondary-500": !(meta.touched && meta.error),
|
|
@@ -14516,7 +14761,7 @@ var InputFile = ({
|
|
|
14516
14761
|
InputLabel_default,
|
|
14517
14762
|
{
|
|
14518
14763
|
text: placeholder,
|
|
14519
|
-
styles:
|
|
14764
|
+
styles: classNames16({
|
|
14520
14765
|
"absolute left-2 eui-text-sm peer-placeholder-shown:text-base peer-placeholder-shown:top-3 pointer-events-none": true,
|
|
14521
14766
|
"top-[0.7px]": showFloatingLabel,
|
|
14522
14767
|
"top-[13px] text-base": !showFloatingLabel
|
|
@@ -14542,7 +14787,7 @@ var InputList = ({ name, placeholder, shape }) => {
|
|
|
14542
14787
|
/* @__PURE__ */ jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsx(FieldArray, { name, children: ({ push, remove, move }) => /* @__PURE__ */ jsxs(
|
|
14543
14788
|
"div",
|
|
14544
14789
|
{
|
|
14545
|
-
className:
|
|
14790
|
+
className: classNames16({
|
|
14546
14791
|
"flex flex-col space-y-2 w-full bg-eui-primary-300/10": true,
|
|
14547
14792
|
[`${shapes[resolvedShape]}`]: true
|
|
14548
14793
|
}),
|
|
@@ -14573,7 +14818,7 @@ var InputList = ({ name, placeholder, shape }) => {
|
|
|
14573
14818
|
{
|
|
14574
14819
|
name: `${name}[${index}]`,
|
|
14575
14820
|
placeholder: `Item ${index + 1}`,
|
|
14576
|
-
className:
|
|
14821
|
+
className: classNames16(
|
|
14577
14822
|
"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]",
|
|
14578
14823
|
[`${shapes[resolvedShape]}`],
|
|
14579
14824
|
errors[name]?.[index] ? "border-eui-danger-500" : "border-eui-primary-400 focus:border-eui-secondary-500"
|
|
@@ -14641,7 +14886,7 @@ var InputListGroup = ({
|
|
|
14641
14886
|
values[name]?.map((group, groupIndex) => /* @__PURE__ */ jsxs(
|
|
14642
14887
|
"div",
|
|
14643
14888
|
{
|
|
14644
|
-
className:
|
|
14889
|
+
className: classNames16({
|
|
14645
14890
|
"flex flex-col gap-2 bg-eui-primary-300/10 p-3": true,
|
|
14646
14891
|
[`${shapes[resolvedShape]}`]: true
|
|
14647
14892
|
}),
|
|
@@ -14653,7 +14898,7 @@ var InputListGroup = ({
|
|
|
14653
14898
|
{
|
|
14654
14899
|
name: `${name}[${groupIndex}].name`,
|
|
14655
14900
|
placeholder: `Group ${groupIndex + 1}`,
|
|
14656
|
-
className:
|
|
14901
|
+
className: classNames16(
|
|
14657
14902
|
"border w-full bg-eui-primary-300/10 px-3 py-2 text-md focus:outline-none h-[40px]",
|
|
14658
14903
|
[`${shapes[resolvedShape]}`],
|
|
14659
14904
|
"border-eui-primary-400 focus:border-eui-secondary-500"
|
|
@@ -14695,7 +14940,7 @@ var InputListGroup = ({
|
|
|
14695
14940
|
{
|
|
14696
14941
|
ref: provided.innerRef,
|
|
14697
14942
|
...provided.droppableProps,
|
|
14698
|
-
className:
|
|
14943
|
+
className: classNames16({
|
|
14699
14944
|
"space-y-2 bg-eui-primary-300/10 p-2": true,
|
|
14700
14945
|
[`${shapes[resolvedShape]}`]: true
|
|
14701
14946
|
}),
|
|
@@ -14710,7 +14955,7 @@ var InputListGroup = ({
|
|
|
14710
14955
|
{
|
|
14711
14956
|
ref: provided2.innerRef,
|
|
14712
14957
|
...provided2.draggableProps,
|
|
14713
|
-
className:
|
|
14958
|
+
className: classNames16({
|
|
14714
14959
|
"flex items-center gap-2 bg-eui-primary-300/10 p-2": true,
|
|
14715
14960
|
[`${shapes[resolvedShape]}`]: true
|
|
14716
14961
|
}),
|
|
@@ -14721,7 +14966,7 @@ var InputListGroup = ({
|
|
|
14721
14966
|
{
|
|
14722
14967
|
name: `${name}[${groupIndex}].items[${itemIndex}]`,
|
|
14723
14968
|
placeholder: `Item ${itemIndex + 1}`,
|
|
14724
|
-
className:
|
|
14969
|
+
className: classNames16(
|
|
14725
14970
|
"border w-full bg-eui-primary-300/10 px-3 py-2 text-md focus:outline-none h-[40px]",
|
|
14726
14971
|
[`${shapes[resolvedShape]}`],
|
|
14727
14972
|
"border-eui-primary-400 focus:border-eui-secondary-500"
|
|
@@ -14794,43 +15039,76 @@ var InputListGroup = ({
|
|
|
14794
15039
|
function isMultiCheckbox(props) {
|
|
14795
15040
|
return Array.isArray(props.options);
|
|
14796
15041
|
}
|
|
14797
|
-
|
|
14798
|
-
|
|
15042
|
+
function Checkbox({
|
|
15043
|
+
placeholder,
|
|
15044
|
+
variant = "primary",
|
|
15045
|
+
shape = "roundedSquare",
|
|
15046
|
+
className,
|
|
15047
|
+
...props
|
|
15048
|
+
}) {
|
|
14799
15049
|
const isMulti = isMultiCheckbox(props);
|
|
14800
|
-
const [
|
|
14801
|
-
|
|
15050
|
+
const [multiField, multiMeta, multiHelpers] = useField(
|
|
15051
|
+
props
|
|
15052
|
+
);
|
|
15053
|
+
const [singleField, singleMeta, singleHelpers] = useField(
|
|
15054
|
+
props
|
|
15055
|
+
);
|
|
15056
|
+
const field = isMulti ? multiField : singleField;
|
|
15057
|
+
const meta = isMulti ? multiMeta : singleMeta;
|
|
15058
|
+
const checkboxClass = cn(
|
|
15059
|
+
// Base
|
|
14802
15060
|
"appearance-none cursor-pointer transition-all duration-300",
|
|
14803
15061
|
"w-5 h-5 min-w-[1.25rem] min-h-[1.25rem]",
|
|
14804
|
-
"flex-shrink-0",
|
|
14805
|
-
|
|
14806
|
-
"
|
|
14807
|
-
"
|
|
15062
|
+
"flex-shrink-0 relative",
|
|
15063
|
+
// Unchecked state
|
|
15064
|
+
"bg-white border-2 border-gray-300",
|
|
15065
|
+
"hover:border-gray-400",
|
|
15066
|
+
// Dark mode
|
|
15067
|
+
"dark:bg-neutral-900",
|
|
15068
|
+
"dark:border-neutral-600",
|
|
15069
|
+
"dark:hover:border-neutral-500",
|
|
15070
|
+
// Focus state
|
|
15071
|
+
"focus:outline-none focus:ring-2",
|
|
15072
|
+
"focus:ring-eui-primary-500/30",
|
|
15073
|
+
// Checked variant styles
|
|
15074
|
+
checkboxVariants[variant],
|
|
15075
|
+
// Check icon
|
|
15076
|
+
"checked:before:content-['\u2713']",
|
|
15077
|
+
"checked:before:absolute checked:before:inset-0",
|
|
14808
15078
|
"checked:before:flex checked:before:items-center checked:before:justify-center",
|
|
14809
|
-
"checked:before:text-white checked:before:font-bold checked:before:text-sm"
|
|
15079
|
+
"checked:before:text-white checked:before:font-bold checked:before:text-sm",
|
|
15080
|
+
// Disabled state
|
|
15081
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
15082
|
+
// Shape
|
|
15083
|
+
shapes[shape],
|
|
15084
|
+
className
|
|
14810
15085
|
);
|
|
14811
15086
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
14812
15087
|
!isMulti && /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-3 items-start", children: [
|
|
14813
15088
|
/* @__PURE__ */ jsx(
|
|
14814
15089
|
"input",
|
|
14815
15090
|
{
|
|
14816
|
-
id:
|
|
15091
|
+
id: singleField.name,
|
|
14817
15092
|
type: "checkbox",
|
|
14818
|
-
checked: Boolean(
|
|
14819
|
-
onChange: (e) =>
|
|
15093
|
+
checked: Boolean(singleField.value),
|
|
15094
|
+
onChange: (e) => singleHelpers.setValue(e.target.checked),
|
|
14820
15095
|
className: checkboxClass
|
|
14821
15096
|
}
|
|
14822
15097
|
),
|
|
14823
15098
|
/* @__PURE__ */ jsx(
|
|
14824
15099
|
"label",
|
|
14825
15100
|
{
|
|
14826
|
-
htmlFor:
|
|
14827
|
-
className:
|
|
15101
|
+
htmlFor: singleField.name,
|
|
15102
|
+
className: cn(
|
|
15103
|
+
"text-sm leading-relaxed cursor-pointer select-none",
|
|
15104
|
+
"text-gray-800 dark:text-gray-200"
|
|
15105
|
+
),
|
|
14828
15106
|
children: placeholder
|
|
14829
15107
|
}
|
|
14830
15108
|
)
|
|
14831
15109
|
] }),
|
|
14832
15110
|
isMulti && props.options.map((option) => {
|
|
14833
|
-
const values =
|
|
15111
|
+
const values = multiField.value ?? [];
|
|
14834
15112
|
const checked = values.includes(option.value);
|
|
14835
15113
|
return /* @__PURE__ */ jsxs(
|
|
14836
15114
|
"div",
|
|
@@ -14844,7 +15122,7 @@ var Checkbox = (props) => {
|
|
|
14844
15122
|
type: "checkbox",
|
|
14845
15123
|
checked,
|
|
14846
15124
|
onChange: () => {
|
|
14847
|
-
|
|
15125
|
+
multiHelpers.setValue(
|
|
14848
15126
|
checked ? values.filter((v) => v !== option.value) : [...values, option.value]
|
|
14849
15127
|
);
|
|
14850
15128
|
},
|
|
@@ -14855,7 +15133,10 @@ var Checkbox = (props) => {
|
|
|
14855
15133
|
"label",
|
|
14856
15134
|
{
|
|
14857
15135
|
htmlFor: option.value,
|
|
14858
|
-
className:
|
|
15136
|
+
className: cn(
|
|
15137
|
+
"text-sm leading-relaxed cursor-pointer select-none",
|
|
15138
|
+
"text-gray-800 dark:text-gray-200"
|
|
15139
|
+
),
|
|
14859
15140
|
children: option.label
|
|
14860
15141
|
}
|
|
14861
15142
|
)
|
|
@@ -14873,7 +15154,7 @@ var Checkbox = (props) => {
|
|
|
14873
15154
|
}
|
|
14874
15155
|
)
|
|
14875
15156
|
] });
|
|
14876
|
-
}
|
|
15157
|
+
}
|
|
14877
15158
|
var Checkbox_default = Checkbox;
|
|
14878
15159
|
var DateSelector = ({
|
|
14879
15160
|
placeholder,
|
|
@@ -14899,7 +15180,7 @@ var DateSelector = ({
|
|
|
14899
15180
|
...field,
|
|
14900
15181
|
...props,
|
|
14901
15182
|
placeholder,
|
|
14902
|
-
className:
|
|
15183
|
+
className: classNames16({
|
|
14903
15184
|
"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,
|
|
14904
15185
|
"border-eui-danger-500": meta.touched && meta.error,
|
|
14905
15186
|
"transition-all ease-in-out": true,
|
|
@@ -15008,7 +15289,7 @@ var ImageInput = forwardRef(
|
|
|
15008
15289
|
/* @__PURE__ */ jsxs(
|
|
15009
15290
|
"label",
|
|
15010
15291
|
{
|
|
15011
|
-
className:
|
|
15292
|
+
className: classNames16({
|
|
15012
15293
|
"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,
|
|
15013
15294
|
"hover:cursor-pointer hover:border-solid hover:border-gray-600 hover:bg-gray-900/80": true,
|
|
15014
15295
|
"transition-all ease-in-out duration-150": true
|
|
@@ -15125,7 +15406,7 @@ function Radio({
|
|
|
15125
15406
|
return /* @__PURE__ */ jsxs(
|
|
15126
15407
|
"div",
|
|
15127
15408
|
{
|
|
15128
|
-
className:
|
|
15409
|
+
className: classNames16({
|
|
15129
15410
|
"flex flex-row gap-2 items-center mx-1 my-2": true
|
|
15130
15411
|
}),
|
|
15131
15412
|
children: [
|
|
@@ -15138,7 +15419,7 @@ function Radio({
|
|
|
15138
15419
|
...props,
|
|
15139
15420
|
value: option.value,
|
|
15140
15421
|
checked: field2.value === option.value,
|
|
15141
|
-
className:
|
|
15422
|
+
className: classNames16({
|
|
15142
15423
|
"appearance-none w-4 h-4 border-2 border-eui-primary-400 rounded-full cursor-pointer transition-all duration-300": true,
|
|
15143
15424
|
// base radio button styles
|
|
15144
15425
|
"checked:bg-eui-secondary-700 checked:border-eui-primary-400": field2.value === option.value
|
|
@@ -15150,7 +15431,7 @@ function Radio({
|
|
|
15150
15431
|
"label",
|
|
15151
15432
|
{
|
|
15152
15433
|
htmlFor: option.value,
|
|
15153
|
-
className:
|
|
15434
|
+
className: classNames16({
|
|
15154
15435
|
"eui-text-md text-sm": true
|
|
15155
15436
|
}),
|
|
15156
15437
|
children: option.label
|
|
@@ -15193,7 +15474,7 @@ function StarRatingInput({
|
|
|
15193
15474
|
return /* @__PURE__ */ jsxs(
|
|
15194
15475
|
"div",
|
|
15195
15476
|
{
|
|
15196
|
-
className:
|
|
15477
|
+
className: classNames16({
|
|
15197
15478
|
"inline-flex gap-[4px] text-[20px]": true,
|
|
15198
15479
|
[`${styles}`]: styles
|
|
15199
15480
|
}),
|
|
@@ -15206,7 +15487,7 @@ function StarRatingInput({
|
|
|
15206
15487
|
onClick: () => handleOnClick(index),
|
|
15207
15488
|
onMouseEnter: () => setHover(index),
|
|
15208
15489
|
onMouseLeave: () => setHover(null),
|
|
15209
|
-
className:
|
|
15490
|
+
className: classNames16({
|
|
15210
15491
|
"text-yellow-600": index <= (hover ?? rating - 1),
|
|
15211
15492
|
"text-gray-400": index > (hover ?? rating - 1)
|
|
15212
15493
|
}),
|
|
@@ -15250,7 +15531,7 @@ function Select({
|
|
|
15250
15531
|
{
|
|
15251
15532
|
as: "select",
|
|
15252
15533
|
...props,
|
|
15253
|
-
className:
|
|
15534
|
+
className: classNames16({
|
|
15254
15535
|
"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,
|
|
15255
15536
|
"border-eui-primary-400": !(meta.touched && meta.error),
|
|
15256
15537
|
"border-red-500": meta.touched && meta.error,
|
|
@@ -15302,7 +15583,7 @@ function Switch({
|
|
|
15302
15583
|
"div",
|
|
15303
15584
|
{
|
|
15304
15585
|
onClick: () => helpers.setValue(!field.value),
|
|
15305
|
-
className:
|
|
15586
|
+
className: classNames16(
|
|
15306
15587
|
"w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer dark:bg-eui-dark-100",
|
|
15307
15588
|
"peer-checked:after:translate-x-full peer-checked:after:border-white",
|
|
15308
15589
|
"after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white",
|
|
@@ -15359,7 +15640,7 @@ function Tags({
|
|
|
15359
15640
|
/* @__PURE__ */ jsxs(
|
|
15360
15641
|
"div",
|
|
15361
15642
|
{
|
|
15362
|
-
className:
|
|
15643
|
+
className: classNames16(
|
|
15363
15644
|
"border rounded-sm flex flex-wrap items-center gap-2 px-2 pt-2 pb-6 min-h-[3rem]",
|
|
15364
15645
|
{
|
|
15365
15646
|
"bg-eui-primary-300/10 eui-text-md": true,
|
|
@@ -15407,7 +15688,7 @@ function Tags({
|
|
|
15407
15688
|
InputLabel_default,
|
|
15408
15689
|
{
|
|
15409
15690
|
text: placeholder,
|
|
15410
|
-
styles:
|
|
15691
|
+
styles: classNames16(
|
|
15411
15692
|
"absolute left-2 transition-all pointer-events-none text-eui-dark-200",
|
|
15412
15693
|
input.length > 0 || field.value.length > 0 ? "top-[2px] text-[13.5px]" : "top-3 text-base"
|
|
15413
15694
|
)
|
|
@@ -15448,7 +15729,7 @@ function TextArea({
|
|
|
15448
15729
|
as: "textarea",
|
|
15449
15730
|
...field,
|
|
15450
15731
|
...props,
|
|
15451
|
-
className:
|
|
15732
|
+
className: classNames16({
|
|
15452
15733
|
"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,
|
|
15453
15734
|
"transition-all ease-in-out": true,
|
|
15454
15735
|
"border-eui-primary-400 focus:border-eui-secondary-500": !(meta.touched && meta.error),
|
|
@@ -15462,7 +15743,7 @@ function TextArea({
|
|
|
15462
15743
|
InputLabel_default,
|
|
15463
15744
|
{
|
|
15464
15745
|
text: placeholder,
|
|
15465
|
-
styles:
|
|
15746
|
+
styles: classNames16(
|
|
15466
15747
|
"absolute left-2 transition-all pointer-events-none text-eui-dark-200",
|
|
15467
15748
|
field.value ? "top-[2px] text-[13.5px]" : "top-3 text-base"
|
|
15468
15749
|
)
|
|
@@ -15493,7 +15774,7 @@ function ContentArea({
|
|
|
15493
15774
|
return /* @__PURE__ */ jsx(
|
|
15494
15775
|
"div",
|
|
15495
15776
|
{
|
|
15496
|
-
className:
|
|
15777
|
+
className: classNames16({
|
|
15497
15778
|
"min-h-screen h-full w-full py-3 px-5": true,
|
|
15498
15779
|
"py-3 px-5": !enablePadding,
|
|
15499
15780
|
"py-3 px-5 lg:px-[150px]": enablePadding,
|
|
@@ -15509,7 +15790,7 @@ function FlexCol({ children, gap = 3, styles }) {
|
|
|
15509
15790
|
return /* @__PURE__ */ jsx(
|
|
15510
15791
|
"div",
|
|
15511
15792
|
{
|
|
15512
|
-
className:
|
|
15793
|
+
className: classNames16({
|
|
15513
15794
|
[`flex flex-col gap-${gap}`]: true,
|
|
15514
15795
|
[`${styles}`]: styles
|
|
15515
15796
|
}),
|
|
@@ -15522,7 +15803,7 @@ function FlexRow({ children, gap = 3, styles }) {
|
|
|
15522
15803
|
return /* @__PURE__ */ jsx(
|
|
15523
15804
|
"div",
|
|
15524
15805
|
{
|
|
15525
|
-
className:
|
|
15806
|
+
className: classNames16({
|
|
15526
15807
|
[`flex flex-row gap-${gap}`]: true,
|
|
15527
15808
|
[`${styles}`]: styles
|
|
15528
15809
|
}),
|
|
@@ -15541,7 +15822,7 @@ function Grid({ children, styles }) {
|
|
|
15541
15822
|
return /* @__PURE__ */ jsx(
|
|
15542
15823
|
"div",
|
|
15543
15824
|
{
|
|
15544
|
-
className:
|
|
15825
|
+
className: classNames16({
|
|
15545
15826
|
[`grid`]: true,
|
|
15546
15827
|
[`${styles}`]: styles
|
|
15547
15828
|
}),
|
|
@@ -15558,7 +15839,7 @@ var Layout = ({
|
|
|
15558
15839
|
return /* @__PURE__ */ jsx(
|
|
15559
15840
|
"div",
|
|
15560
15841
|
{
|
|
15561
|
-
className:
|
|
15842
|
+
className: classNames16({
|
|
15562
15843
|
// "flex h-full w-screen bg-gray-100 overflow-auto": true,
|
|
15563
15844
|
"flex bg-eui-light-600": true,
|
|
15564
15845
|
"flex-col": flexDirection === "vertical",
|
|
@@ -15577,7 +15858,7 @@ var Header = ({
|
|
|
15577
15858
|
return /* @__PURE__ */ jsx(
|
|
15578
15859
|
"div",
|
|
15579
15860
|
{
|
|
15580
|
-
className:
|
|
15861
|
+
className: classNames16({
|
|
15581
15862
|
static: position === "static",
|
|
15582
15863
|
fixed: position === "fixed",
|
|
15583
15864
|
sticky: position === "sticky",
|
|
@@ -15617,7 +15898,7 @@ var Content = ({
|
|
|
15617
15898
|
return /* @__PURE__ */ jsx(
|
|
15618
15899
|
"div",
|
|
15619
15900
|
{
|
|
15620
|
-
className:
|
|
15901
|
+
className: classNames16({
|
|
15621
15902
|
"w-full min-h-screen transition-all duration-200 eui-bg-sm": true,
|
|
15622
15903
|
"md:pl-[300px]": !overlayedSidebar && sidebarVisible && !isMobile,
|
|
15623
15904
|
// Shift when sidebar is open (desktop)
|
|
@@ -15633,7 +15914,7 @@ var Footer = ({ children, styles }) => {
|
|
|
15633
15914
|
return /* @__PURE__ */ jsx(
|
|
15634
15915
|
"div",
|
|
15635
15916
|
{
|
|
15636
|
-
className:
|
|
15917
|
+
className: classNames16({
|
|
15637
15918
|
"bottom-0 w-full h-fit": true,
|
|
15638
15919
|
"border-t border-eui-dark-500/40 dark:border-eui-secondary-800 eui-bg-md": !styles,
|
|
15639
15920
|
[`${styles}`]: styles
|
|
@@ -15721,7 +16002,7 @@ function MarkdownEditor({
|
|
|
15721
16002
|
const [field, meta, helpers] = useField(props);
|
|
15722
16003
|
const { theme } = useTheme_default();
|
|
15723
16004
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
15724
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
16005
|
+
/* @__PURE__ */ jsx("div", { className: classNames16(theme === "dark" ? "dark" : "", styles), children: /* @__PURE__ */ jsx(
|
|
15725
16006
|
MDXEditor,
|
|
15726
16007
|
{
|
|
15727
16008
|
markdown: field.value,
|
|
@@ -15824,7 +16105,7 @@ function MarkdownTOC({ title = "Table of Contents" }) {
|
|
|
15824
16105
|
"button",
|
|
15825
16106
|
{
|
|
15826
16107
|
onClick: () => scrollToHeading(heading.id),
|
|
15827
|
-
className:
|
|
16108
|
+
className: classNames16(
|
|
15828
16109
|
"block w-full text-left text-sm transition-all ease-in-out duration-150",
|
|
15829
16110
|
"hover:text-primary",
|
|
15830
16111
|
activeHeading === heading.id ? "text-primary font-semibold underline" : "text-gray-500 dark:text-gray-400"
|
|
@@ -15980,7 +16261,7 @@ function BreadcrumbItem({
|
|
|
15980
16261
|
{
|
|
15981
16262
|
href,
|
|
15982
16263
|
onClick,
|
|
15983
|
-
className:
|
|
16264
|
+
className: classNames16({
|
|
15984
16265
|
"text-lg font-semibold": true,
|
|
15985
16266
|
"text-gray-400 hover:text-gray-600 cursor-pointer": !active,
|
|
15986
16267
|
"text-eui-light-800": active,
|
|
@@ -16057,7 +16338,7 @@ var Breadcrumb = ({
|
|
|
16057
16338
|
index < resolvedData.length - 1 && /* @__PURE__ */ jsx(
|
|
16058
16339
|
"span",
|
|
16059
16340
|
{
|
|
16060
|
-
className:
|
|
16341
|
+
className: classNames16({
|
|
16061
16342
|
"text-lg font-semibold text-gray-500": true,
|
|
16062
16343
|
[`px-${gap}`]: gap
|
|
16063
16344
|
}),
|
|
@@ -16071,7 +16352,7 @@ var Breadcrumb = ({
|
|
|
16071
16352
|
return /* @__PURE__ */ jsx(
|
|
16072
16353
|
"div",
|
|
16073
16354
|
{
|
|
16074
|
-
className:
|
|
16355
|
+
className: classNames16({
|
|
16075
16356
|
"inline-flex": true,
|
|
16076
16357
|
[`${styles}`]: styles
|
|
16077
16358
|
}),
|
|
@@ -16101,7 +16382,7 @@ var Drawer = ({
|
|
|
16101
16382
|
{
|
|
16102
16383
|
show: visibility,
|
|
16103
16384
|
enter: "transform transition duration-200 ease-out",
|
|
16104
|
-
enterFrom:
|
|
16385
|
+
enterFrom: classNames16({
|
|
16105
16386
|
"-translate-x-full": side === "left",
|
|
16106
16387
|
"translate-x-full": side === "right",
|
|
16107
16388
|
"-translate-y-full": side === "top",
|
|
@@ -16110,7 +16391,7 @@ var Drawer = ({
|
|
|
16110
16391
|
enterTo: "translate-x-0 translate-y-0",
|
|
16111
16392
|
leave: "transform transition duration-200 ease-in",
|
|
16112
16393
|
leaveFrom: "translate-x-0 translate-y-0",
|
|
16113
|
-
leaveTo:
|
|
16394
|
+
leaveTo: classNames16({
|
|
16114
16395
|
"-translate-x-full": side === "left",
|
|
16115
16396
|
"translate-x-full": side === "right",
|
|
16116
16397
|
"-translate-y-full": side === "top",
|
|
@@ -16119,7 +16400,7 @@ var Drawer = ({
|
|
|
16119
16400
|
children: /* @__PURE__ */ jsx(
|
|
16120
16401
|
"div",
|
|
16121
16402
|
{
|
|
16122
|
-
className:
|
|
16403
|
+
className: classNames16(
|
|
16123
16404
|
"fixed shadow-lg z-50",
|
|
16124
16405
|
{
|
|
16125
16406
|
"h-full w-[300px]": isHorizontal,
|
|
@@ -16151,7 +16432,7 @@ function DrawerToggler({
|
|
|
16151
16432
|
return /* @__PURE__ */ jsx(
|
|
16152
16433
|
"div",
|
|
16153
16434
|
{
|
|
16154
|
-
className:
|
|
16435
|
+
className: classNames16({
|
|
16155
16436
|
"text-xl p-3 cursor-pointer": true,
|
|
16156
16437
|
"transition-all ease-in-out": true,
|
|
16157
16438
|
"text-eui-dark-500 dark:text-eui-secondary-600": !styles,
|
|
@@ -16199,7 +16480,7 @@ function FooterNav({ data = [], styles }) {
|
|
|
16199
16480
|
childrenContent = /* @__PURE__ */ jsx(
|
|
16200
16481
|
"div",
|
|
16201
16482
|
{
|
|
16202
|
-
className:
|
|
16483
|
+
className: classNames16({
|
|
16203
16484
|
"grid w-full": true,
|
|
16204
16485
|
"grid-cols-1": isMobile,
|
|
16205
16486
|
"grid-cols-3": !isMobile,
|
|
@@ -16212,7 +16493,7 @@ function FooterNav({ data = [], styles }) {
|
|
|
16212
16493
|
return /* @__PURE__ */ jsx(
|
|
16213
16494
|
"div",
|
|
16214
16495
|
{
|
|
16215
|
-
className:
|
|
16496
|
+
className: classNames16({
|
|
16216
16497
|
[`${styles}`]: styles
|
|
16217
16498
|
}),
|
|
16218
16499
|
children: childrenContent
|
|
@@ -16253,7 +16534,7 @@ var FooterNavGroup = ({
|
|
|
16253
16534
|
/* @__PURE__ */ jsx(
|
|
16254
16535
|
"div",
|
|
16255
16536
|
{
|
|
16256
|
-
className:
|
|
16537
|
+
className: classNames16({
|
|
16257
16538
|
"": true,
|
|
16258
16539
|
"py-2 font-semibold eui-text-lg": !styles,
|
|
16259
16540
|
[`${styles}`]: styles
|
|
@@ -16298,7 +16579,7 @@ var FooterNavItem = ({
|
|
|
16298
16579
|
"div",
|
|
16299
16580
|
{
|
|
16300
16581
|
onClick: handleNavigation,
|
|
16301
|
-
className:
|
|
16582
|
+
className: classNames16({
|
|
16302
16583
|
"flex flex-row items-center gap-3 cursor-pointer p-1 w-full": true,
|
|
16303
16584
|
"transition-all duration-200 ease-in-out": true,
|
|
16304
16585
|
"text-sm eui-text-sm": !styles,
|
|
@@ -16327,7 +16608,7 @@ var FooterNavItemTitle = ({
|
|
|
16327
16608
|
return /* @__PURE__ */ jsx(
|
|
16328
16609
|
"div",
|
|
16329
16610
|
{
|
|
16330
|
-
className:
|
|
16611
|
+
className: classNames16({
|
|
16331
16612
|
"": true,
|
|
16332
16613
|
"py-2 font-thin eui-text-md": !styles,
|
|
16333
16614
|
[`${styles}`]: styles
|
|
@@ -16380,7 +16661,7 @@ function HeaderNav({ data = [], styles }) {
|
|
|
16380
16661
|
return /* @__PURE__ */ jsx(
|
|
16381
16662
|
"div",
|
|
16382
16663
|
{
|
|
16383
|
-
className:
|
|
16664
|
+
className: classNames16({
|
|
16384
16665
|
[`${styles}`]: styles
|
|
16385
16666
|
}),
|
|
16386
16667
|
children: childrenContent
|
|
@@ -16442,7 +16723,7 @@ var HeaderNavGroup = ({
|
|
|
16442
16723
|
/* @__PURE__ */ jsxs(
|
|
16443
16724
|
"div",
|
|
16444
16725
|
{
|
|
16445
|
-
className:
|
|
16726
|
+
className: classNames16({
|
|
16446
16727
|
"flex flex-row gap-2 items-center justify-between cursor-pointer p-3 w-full": true,
|
|
16447
16728
|
"transition-all duration-300 ease-in-out": true,
|
|
16448
16729
|
"eui-text-md bg-gradient-to-t from-eui-dark-500/10 dark:from-green-700/10": !styles,
|
|
@@ -16470,7 +16751,7 @@ var HeaderNavGroup = ({
|
|
|
16470
16751
|
children && /* @__PURE__ */ jsx(
|
|
16471
16752
|
BsChevronDown,
|
|
16472
16753
|
{
|
|
16473
|
-
className:
|
|
16754
|
+
className: classNames16({
|
|
16474
16755
|
"text-md": true,
|
|
16475
16756
|
"transition-all ease-in-out duration-300": true,
|
|
16476
16757
|
"rotate-180": !collapsed
|
|
@@ -16483,7 +16764,7 @@ var HeaderNavGroup = ({
|
|
|
16483
16764
|
!collapsed && children && /* @__PURE__ */ jsx(
|
|
16484
16765
|
"div",
|
|
16485
16766
|
{
|
|
16486
|
-
className:
|
|
16767
|
+
className: classNames16({
|
|
16487
16768
|
"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,
|
|
16488
16769
|
"transition-all duration-300 ease-in-out": true
|
|
16489
16770
|
}),
|
|
@@ -16513,7 +16794,7 @@ var HeaderNavItem = ({
|
|
|
16513
16794
|
"div",
|
|
16514
16795
|
{
|
|
16515
16796
|
onClick: handleNavigation,
|
|
16516
|
-
className:
|
|
16797
|
+
className: classNames16({
|
|
16517
16798
|
"flex flex-row items-center gap-3 cursor-pointer p-3 w-full": true,
|
|
16518
16799
|
"transition-all duration-200 ease-in-out": true,
|
|
16519
16800
|
"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,
|
|
@@ -16542,7 +16823,7 @@ var HeaderNavItemTitle = ({
|
|
|
16542
16823
|
return /* @__PURE__ */ jsx(
|
|
16543
16824
|
"div",
|
|
16544
16825
|
{
|
|
16545
|
-
className:
|
|
16826
|
+
className: classNames16({
|
|
16546
16827
|
"p-3 font-thin": true,
|
|
16547
16828
|
"eui-text-md": !styles,
|
|
16548
16829
|
[`${styles}`]: styles
|
|
@@ -16582,7 +16863,7 @@ var Link = ({
|
|
|
16582
16863
|
href: href || "#",
|
|
16583
16864
|
target: targets[target],
|
|
16584
16865
|
onClick: handleClick,
|
|
16585
|
-
className:
|
|
16866
|
+
className: classNames16({
|
|
16586
16867
|
[`${textVariants[variant]}`]: variant,
|
|
16587
16868
|
[`${decorations[decoration]}`]: decoration,
|
|
16588
16869
|
"font-bold": bold,
|
|
@@ -17047,7 +17328,7 @@ function Modal({
|
|
|
17047
17328
|
"div",
|
|
17048
17329
|
{
|
|
17049
17330
|
ref: modalRef,
|
|
17050
|
-
className:
|
|
17331
|
+
className: classNames16({
|
|
17051
17332
|
"eui-bg-md eui-shadow-lg border border-gray-700/80 w-fit h-fit": true,
|
|
17052
17333
|
[`${shapes[resolvedShape]}`]: true,
|
|
17053
17334
|
[`${styles}`]: styles
|
|
@@ -17058,7 +17339,7 @@ function Modal({
|
|
|
17058
17339
|
/* @__PURE__ */ jsx(
|
|
17059
17340
|
"div",
|
|
17060
17341
|
{
|
|
17061
|
-
className:
|
|
17342
|
+
className: classNames16({
|
|
17062
17343
|
"w-[60px] h-[60px] flex items-center justify-center transition-standard-fast": true,
|
|
17063
17344
|
"hover:cursor-pointer hover:bg-eui-dark-500": true
|
|
17064
17345
|
}),
|
|
@@ -17164,7 +17445,7 @@ function ShowMore({ text, limit }) {
|
|
|
17164
17445
|
/* @__PURE__ */ jsx(
|
|
17165
17446
|
"div",
|
|
17166
17447
|
{
|
|
17167
|
-
className:
|
|
17448
|
+
className: classNames16({
|
|
17168
17449
|
"text-blue-300 px-1 pb-1 mt-1": true,
|
|
17169
17450
|
"bg-slate-900/70": !showMore,
|
|
17170
17451
|
"bg-gradient-to-t from-slate-900/50 to-transparent": showMore
|
|
@@ -17319,6 +17600,80 @@ function Slider({ isLoading, isSuccess, coverArt, screenshots }) {
|
|
|
17319
17600
|
] }) });
|
|
17320
17601
|
}
|
|
17321
17602
|
var Slider_default = Slider;
|
|
17603
|
+
function StarRatingDistribution({
|
|
17604
|
+
numericRating = true,
|
|
17605
|
+
progressBarsRating = true,
|
|
17606
|
+
ratingDistribution = [
|
|
17607
|
+
{ star: 5, count: 0 },
|
|
17608
|
+
{ star: 4, count: 0 },
|
|
17609
|
+
{ star: 3, count: 0 },
|
|
17610
|
+
{ star: 2, count: 0 },
|
|
17611
|
+
{ star: 1, count: 0 }
|
|
17612
|
+
],
|
|
17613
|
+
variant = "warning",
|
|
17614
|
+
appearance = "solid",
|
|
17615
|
+
shape = "roundedSquare",
|
|
17616
|
+
size = "sm",
|
|
17617
|
+
animated = true,
|
|
17618
|
+
striped = false,
|
|
17619
|
+
showReviewCount = true,
|
|
17620
|
+
className,
|
|
17621
|
+
...rest
|
|
17622
|
+
}) {
|
|
17623
|
+
const totalReviews = ratingDistribution.reduce(
|
|
17624
|
+
(acc, item) => acc + item.count,
|
|
17625
|
+
0
|
|
17626
|
+
);
|
|
17627
|
+
const averageRating = totalReviews > 0 ? ratingDistribution.reduce(
|
|
17628
|
+
(acc, item) => acc + item.star * item.count,
|
|
17629
|
+
0
|
|
17630
|
+
) / totalReviews : 0;
|
|
17631
|
+
const ratingDistributionWithPercentage = ratingDistribution.map((item) => ({
|
|
17632
|
+
star: item.star,
|
|
17633
|
+
percentage: totalReviews > 0 ? item.count / totalReviews * 100 : 0
|
|
17634
|
+
}));
|
|
17635
|
+
return /* @__PURE__ */ jsxs(
|
|
17636
|
+
"div",
|
|
17637
|
+
{
|
|
17638
|
+
...rest,
|
|
17639
|
+
className: cn(
|
|
17640
|
+
"flex flex-col md:flex-row items-center gap-8",
|
|
17641
|
+
"p-6",
|
|
17642
|
+
"bg-white dark:bg-neutral-900",
|
|
17643
|
+
"border border-gray-200 dark:border-neutral-800",
|
|
17644
|
+
"rounded-2xl shadow-sm",
|
|
17645
|
+
className
|
|
17646
|
+
),
|
|
17647
|
+
children: [
|
|
17648
|
+
numericRating && /* @__PURE__ */ jsx(
|
|
17649
|
+
NumericRating_default,
|
|
17650
|
+
{
|
|
17651
|
+
rating: averageRating,
|
|
17652
|
+
totalReviews,
|
|
17653
|
+
size: "md",
|
|
17654
|
+
showStars: true,
|
|
17655
|
+
showReviewCount
|
|
17656
|
+
}
|
|
17657
|
+
),
|
|
17658
|
+
progressBarsRating && /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 w-full min-w-[260px]", children: ratingDistributionWithPercentage.map((item) => /* @__PURE__ */ jsx(
|
|
17659
|
+
ProgressBarRating_default,
|
|
17660
|
+
{
|
|
17661
|
+
star: item.star,
|
|
17662
|
+
percentage: item.percentage,
|
|
17663
|
+
variant,
|
|
17664
|
+
appearance,
|
|
17665
|
+
shape,
|
|
17666
|
+
size,
|
|
17667
|
+
animated,
|
|
17668
|
+
striped
|
|
17669
|
+
},
|
|
17670
|
+
item.star
|
|
17671
|
+
)) })
|
|
17672
|
+
]
|
|
17673
|
+
}
|
|
17674
|
+
);
|
|
17675
|
+
}
|
|
17676
|
+
var StarRatingDistribution_default = StarRatingDistribution;
|
|
17322
17677
|
function WorldMapCountryTable({
|
|
17323
17678
|
title = "Country Breakdown",
|
|
17324
17679
|
data
|
|
@@ -17415,7 +17770,7 @@ function BoxNavItem({ icon, name, to, selected, onClick }) {
|
|
|
17415
17770
|
type: "button",
|
|
17416
17771
|
onClick: handleClick,
|
|
17417
17772
|
"aria-current": selected ? "page" : void 0,
|
|
17418
|
-
className:
|
|
17773
|
+
className: classNames16(
|
|
17419
17774
|
"w-full min-w-[80px] flex flex-col items-center justify-center py-3 text-center",
|
|
17420
17775
|
"hover:text-secondary-700 hover:bg-gray-300/10 hover:cursor-pointer",
|
|
17421
17776
|
selected ? "text-eui-secondary-700 bg-gray-300/10" : "text-gray-400",
|
|
@@ -17805,7 +18160,7 @@ function GenericLayout({
|
|
|
17805
18160
|
return /* @__PURE__ */ jsx(ThemeProvider, { defaultTheme, children: /* @__PURE__ */ jsx(
|
|
17806
18161
|
"div",
|
|
17807
18162
|
{
|
|
17808
|
-
className:
|
|
18163
|
+
className: classNames16({
|
|
17809
18164
|
[`${styles}`]: styles
|
|
17810
18165
|
}),
|
|
17811
18166
|
children
|
|
@@ -17854,7 +18209,7 @@ function SidemenuLayout({ data, children }) {
|
|
|
17854
18209
|
return /* @__PURE__ */ jsx(DefaultLayout_default, { children: /* @__PURE__ */ jsxs(
|
|
17855
18210
|
"div",
|
|
17856
18211
|
{
|
|
17857
|
-
className:
|
|
18212
|
+
className: classNames16({
|
|
17858
18213
|
grid: true,
|
|
17859
18214
|
"grid-cols-7 gap-10": !isMobile,
|
|
17860
18215
|
"grid-cols-1 gap-": isMobile
|
|
@@ -17913,6 +18268,6 @@ function ScrollToTop({
|
|
|
17913
18268
|
}
|
|
17914
18269
|
var ScrollToTop_default = ScrollToTop;
|
|
17915
18270
|
|
|
17916
|
-
export { Accordion_default as Accordion, AsyncComponentWrapper_default as AsyncComponentWrapper, Avatar, Backdrop_default as Backdrop, Badge, BarChart_default as BarChart, Block_default as Block, BlockGroup_default as BlockGroup, BoxNav_default as BoxNav, BoxNavItem_default as BoxNavItem, Brand_default as Brand, Breadcrumb, BreadcrumbItem_default as BreadcrumbItem, Button, Caption, Card_default as Card, CardContent_default as CardContent, CardFooter_default as CardFooter, CardHeader_default as CardHeader, Chapter, Checkbox_default as Checkbox, Chip, CloudinaryImage_default as CloudinaryImage, CloudinaryProvider, CloudinaryVideo_default as CloudinaryVideo, Code, Content, ContentArea_default as ContentArea, DataView, DataViewTable_default as DataViewTable, DateSelector_default as DateSelector, DefaultLayout_default as DefaultLayout, Display, DocumentationPanel_default as DocumentationPanel, Drawer, DrawerToggler_default as DrawerToggler, EUIDevLayout_default as EUIDevLayout, EUIProvider, Flag, Flex, FlexCol_default as FlexCol, FlexRow_default as FlexRow, Footer, FooterNav_default as FooterNav, FooterNavGroup_default as FooterNavGroup, FooterNavItem, FooterNavItemContext, FooterNavItemTitle, Form, FormResponse_default as FormResponse, GenericLayout_default as GenericLayout, GlowWrapper_default as GlowWrapper, Graph, GraphEdge, GraphNode, GraphRenderer, Grid_default as Grid, Header, HeaderNav_default as HeaderNav, HeaderNavGroup_default as HeaderNavGroup, HeaderNavItem, HeaderNavItemContext, HeaderNavItemTitle, HomeLayout_default as HomeLayout, Image2 as Image, ImageInput_default as ImageInput, Info_default as Info, Input, InputFile, InputLabel_default as InputLabel, InputList, InputListGroup, InputResponse_default as InputResponse, Label, Layout, Lead, LineChart_default as LineChart, Link, List_default as List, ListItem_default as ListItem, MarkdownEditor_default as MarkdownEditor, MarkdownProvider_default as MarkdownProvider, MarkdownTOC_default as MarkdownTOC, MarkdownViewer_default as MarkdownViewer, Menu, MenuGroup, MenuItem, MenuItemTitle, Modal_default as Modal, MotionSurface_default as MotionSurface, MultiImageInput_default as MultiImageInput, Overline, Paragraph, PieChart_default as PieChart, PriceTag, ProgressBar, Quote, Radio_default as Radio, RouteTab_default as RouteTab, RouteTabs_default as RouteTabs, ScrollToTop_default as ScrollToTop, Section, Select_default as Select, ShapeSwitch, ShowMore_default as ShowMore, Sidebar_default as Sidebar, SidebarLayout_default as SidebarLayout, SidemenuLayout_default as SidemenuLayout, Skeleton, Slider_default as Slider, StarRating_default as StarRating, StarRatingDistribution_default as StarRatingDistribution, StarRatingInput_default as StarRatingInput, Switch_default as Switch, TNDropdown, TNDropdownItem, TNDropdownTitle, TNGroup, Table_default as Table, Tag_default as Tag, Tags_default as Tags, TextArea_default as TextArea, ThemeContext, ThemeProvider, ThemeSwitch, TitleBanner, Toast, Tooltip4 as Tooltip, TopNav, Transition4 as Transition, TransitionDropdown_default as TransitionDropdown, TransitionFadeIn_default as TransitionFadeIn, Typography, UnderConstructionBanner, ValueBadge_default as ValueBadge, WorldMap, WorldMapCountryTable, YoutubeVideo_default as YoutubeVideoPlayer, cn, createForceLayout, createGridLayout, createTreeLayout, enumValues, getCurrencySymbol, getLayout, isMatch, isRenderFn, normalize, registerLayout, resolveWithGlobal, sendToast, useClickOutside, useCloudinaryConfig, useCurrentTheme_default as useCurrentTheme, useDrawer_default as useDrawer, useEUIConfig, useIsMobile_default as useIsMobile, useModal_default as useModal, useTheme_default as useTheme };
|
|
18271
|
+
export { Accordion_default as Accordion, AsyncComponentWrapper_default as AsyncComponentWrapper, Avatar, Backdrop_default as Backdrop, Badge, BarChart_default as BarChart, Block_default as Block, BlockGroup_default as BlockGroup, BoxNav_default as BoxNav, BoxNavItem_default as BoxNavItem, Brand_default as Brand, Breadcrumb, BreadcrumbItem_default as BreadcrumbItem, Button_default as Button, Caption, Card_default as Card, CardContent_default as CardContent, CardFooter_default as CardFooter, CardHeader_default as CardHeader, Chapter, Checkbox_default as Checkbox, Chip, CloudinaryImage_default as CloudinaryImage, CloudinaryProvider, CloudinaryVideo_default as CloudinaryVideo, Code, Content, ContentArea_default as ContentArea, DataView, DataViewTable_default as DataViewTable, DateSelector_default as DateSelector, DefaultLayout_default as DefaultLayout, Display, DocumentationPanel_default as DocumentationPanel, Drawer, DrawerToggler_default as DrawerToggler, EUIDevLayout_default as EUIDevLayout, EUIProvider, Flag, Flex, FlexCol_default as FlexCol, FlexRow_default as FlexRow, Footer, FooterNav_default as FooterNav, FooterNavGroup_default as FooterNavGroup, FooterNavItem, FooterNavItemContext, FooterNavItemTitle, Form, FormResponse_default as FormResponse, GenericLayout_default as GenericLayout, GlowWrapper_default as GlowWrapper, Graph, GraphEdge, GraphNode, GraphRenderer, Grid_default as Grid, Header, HeaderNav_default as HeaderNav, HeaderNavGroup_default as HeaderNavGroup, HeaderNavItem, HeaderNavItemContext, HeaderNavItemTitle, HomeLayout_default as HomeLayout, Image2 as Image, ImageInput_default as ImageInput, Info_default as Info, Input, InputFile, InputLabel_default as InputLabel, InputList, InputListGroup, InputResponse_default as InputResponse, Label, Layout, Lead, LineChart_default as LineChart, Link, List_default as List, ListItem_default as ListItem, MarkdownEditor_default as MarkdownEditor, MarkdownProvider_default as MarkdownProvider, MarkdownTOC_default as MarkdownTOC, MarkdownViewer_default as MarkdownViewer, Menu, MenuGroup, MenuItem, MenuItemTitle, Modal_default as Modal, MotionSurface_default as MotionSurface, MultiImageInput_default as MultiImageInput, NumericRating_default as NumericRating, Overline, Paragraph, PieChart_default as PieChart, PriceTag, ProgressBar, ProgressBarRating_default as ProgressBarRating, Quote, Radio_default as Radio, RouteTab_default as RouteTab, RouteTabs_default as RouteTabs, ScrollToTop_default as ScrollToTop, Section, Select_default as Select, ShapeSwitch, ShowMore_default as ShowMore, Sidebar_default as Sidebar, SidebarLayout_default as SidebarLayout, SidemenuLayout_default as SidemenuLayout, Skeleton, Slider_default as Slider, StarRating_default as StarRating, StarRatingDistribution_default as StarRatingDistribution, StarRatingInput_default as StarRatingInput, Switch_default as Switch, TNDropdown, TNDropdownItem, TNDropdownTitle, TNGroup, Table_default as Table, Tag_default as Tag, Tags_default as Tags, TextArea_default as TextArea, ThemeContext, ThemeProvider, ThemeSwitch, TitleBanner, Toast, Tooltip4 as Tooltip, TopNav, Transition4 as Transition, TransitionDropdown_default as TransitionDropdown, TransitionFadeIn_default as TransitionFadeIn, Typography, UnderConstructionBanner, ValueBadge_default as ValueBadge, WorldMap, WorldMapCountryTable, YoutubeVideo_default as YoutubeVideoPlayer, cn, createForceLayout, createGridLayout, createTreeLayout, enumValues, getCurrencySymbol, getLayout, isMatch, isRenderFn, normalize, registerLayout, resolveAppearanceStyles, resolveWithGlobal, sendToast, useClickOutside, useCloudinaryConfig, useCurrentTheme_default as useCurrentTheme, useDrawer_default as useDrawer, useEUIConfig, useIsMobile_default as useIsMobile, useModal_default as useModal, useTheme_default as useTheme };
|
|
17917
18272
|
//# sourceMappingURL=index.mjs.map
|
|
17918
18273
|
//# sourceMappingURL=index.mjs.map
|