@underverse-ui/underverse 0.2.13 → 0.2.14
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.cjs +1017 -1084
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +780 -847
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2532,90 +2532,216 @@ import { createPortal as createPortal3 } from "react-dom";
|
|
|
2532
2532
|
|
|
2533
2533
|
// ../../lib/utils/shadcn-animations.ts
|
|
2534
2534
|
var shadcnAnimationStyles = `
|
|
2535
|
+
/* ============================================
|
|
2536
|
+
* DROPDOWN / POPOVER ANIMATIONS
|
|
2537
|
+
* Uses spring-like cubic-bezier for natural feel
|
|
2538
|
+
* ============================================ */
|
|
2539
|
+
|
|
2540
|
+
[data-state="open"][data-combobox-dropdown] {
|
|
2541
|
+
animation: comboboxOpen 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
2542
|
+
transform-origin: top center;
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
[data-state="closed"][data-combobox-dropdown] {
|
|
2546
|
+
animation: comboboxClose 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
2547
|
+
transform-origin: top center;
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
@keyframes comboboxOpen {
|
|
2551
|
+
0% {
|
|
2552
|
+
opacity: 0;
|
|
2553
|
+
transform: translateY(-8px) scale(0.96);
|
|
2554
|
+
}
|
|
2555
|
+
50% {
|
|
2556
|
+
opacity: 0.8;
|
|
2557
|
+
transform: translateY(2px) scale(1.01);
|
|
2558
|
+
}
|
|
2559
|
+
100% {
|
|
2560
|
+
opacity: 1;
|
|
2561
|
+
transform: translateY(0) scale(1);
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
@keyframes comboboxClose {
|
|
2566
|
+
0% {
|
|
2567
|
+
opacity: 1;
|
|
2568
|
+
transform: translateY(0) scale(1);
|
|
2569
|
+
}
|
|
2570
|
+
100% {
|
|
2571
|
+
opacity: 0;
|
|
2572
|
+
transform: translateY(-6px) scale(0.97);
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
/* Generic dropdown open/close */
|
|
2535
2577
|
[data-state="open"] {
|
|
2536
|
-
animation: slideDownAndFade
|
|
2578
|
+
animation: slideDownAndFade 220ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
2537
2579
|
}
|
|
2538
2580
|
|
|
2539
2581
|
[data-state="closed"] {
|
|
2540
|
-
animation: slideUpAndFade
|
|
2582
|
+
animation: slideUpAndFade 180ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
2541
2583
|
}
|
|
2542
2584
|
|
|
2543
2585
|
@keyframes slideDownAndFade {
|
|
2544
2586
|
from {
|
|
2545
2587
|
opacity: 0;
|
|
2546
|
-
transform: translateY(-
|
|
2588
|
+
transform: translateY(-4px) scale(0.98);
|
|
2547
2589
|
}
|
|
2548
2590
|
to {
|
|
2549
2591
|
opacity: 1;
|
|
2550
|
-
transform: translateY(0);
|
|
2592
|
+
transform: translateY(0) scale(1);
|
|
2551
2593
|
}
|
|
2552
2594
|
}
|
|
2553
2595
|
|
|
2554
2596
|
@keyframes slideUpAndFade {
|
|
2555
2597
|
from {
|
|
2556
2598
|
opacity: 1;
|
|
2557
|
-
transform: translateY(0);
|
|
2599
|
+
transform: translateY(0) scale(1);
|
|
2558
2600
|
}
|
|
2559
2601
|
to {
|
|
2560
2602
|
opacity: 0;
|
|
2561
|
-
transform: translateY(-
|
|
2603
|
+
transform: translateY(-4px) scale(0.98);
|
|
2562
2604
|
}
|
|
2563
2605
|
}
|
|
2564
2606
|
|
|
2607
|
+
/* ============================================
|
|
2608
|
+
* DROPDOWN ITEMS - Staggered cascade effect
|
|
2609
|
+
* ============================================ */
|
|
2610
|
+
|
|
2565
2611
|
.dropdown-item {
|
|
2566
2612
|
opacity: 0;
|
|
2567
|
-
animation:
|
|
2613
|
+
animation: itemSlideIn 200ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
|
|
2614
|
+
will-change: opacity, transform;
|
|
2568
2615
|
}
|
|
2569
2616
|
|
|
2570
|
-
@keyframes
|
|
2571
|
-
|
|
2617
|
+
@keyframes itemSlideIn {
|
|
2618
|
+
0% {
|
|
2572
2619
|
opacity: 0;
|
|
2573
|
-
transform:
|
|
2620
|
+
transform: translateX(-8px);
|
|
2574
2621
|
}
|
|
2575
|
-
|
|
2622
|
+
60% {
|
|
2623
|
+
opacity: 0.9;
|
|
2624
|
+
transform: translateX(2px);
|
|
2625
|
+
}
|
|
2626
|
+
100% {
|
|
2576
2627
|
opacity: 1;
|
|
2577
|
-
transform:
|
|
2628
|
+
transform: translateX(0);
|
|
2578
2629
|
}
|
|
2579
2630
|
}
|
|
2580
2631
|
|
|
2581
|
-
/*
|
|
2632
|
+
/* Hover effect for items */
|
|
2633
|
+
.dropdown-item {
|
|
2634
|
+
transition: background-color 150ms ease, transform 100ms ease;
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
.dropdown-item:hover {
|
|
2638
|
+
transform: translateX(2px);
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2641
|
+
.dropdown-item:active {
|
|
2642
|
+
transform: scale(0.98);
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2645
|
+
/* ============================================
|
|
2646
|
+
* TOOLTIP / SIDE ANIMATIONS
|
|
2647
|
+
* ============================================ */
|
|
2648
|
+
|
|
2582
2649
|
[data-side="top"] {
|
|
2583
|
-
animation:
|
|
2650
|
+
animation: slideFromBottom 200ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
2584
2651
|
}
|
|
2585
2652
|
|
|
2586
2653
|
[data-side="bottom"] {
|
|
2587
|
-
animation:
|
|
2654
|
+
animation: slideFromTop 200ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
2588
2655
|
}
|
|
2589
2656
|
|
|
2590
2657
|
[data-side="left"] {
|
|
2591
|
-
animation:
|
|
2658
|
+
animation: slideFromRight 200ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
2592
2659
|
}
|
|
2593
2660
|
|
|
2594
2661
|
[data-side="right"] {
|
|
2595
|
-
animation:
|
|
2662
|
+
animation: slideFromLeft 200ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
2596
2663
|
}
|
|
2597
2664
|
|
|
2598
|
-
@keyframes
|
|
2665
|
+
@keyframes slideFromTop {
|
|
2599
2666
|
from {
|
|
2600
2667
|
opacity: 0;
|
|
2601
|
-
transform:
|
|
2668
|
+
transform: translateY(-6px) scale(0.96);
|
|
2602
2669
|
}
|
|
2603
2670
|
to {
|
|
2604
2671
|
opacity: 1;
|
|
2605
|
-
transform:
|
|
2672
|
+
transform: translateY(0) scale(1);
|
|
2606
2673
|
}
|
|
2607
2674
|
}
|
|
2608
2675
|
|
|
2609
|
-
@keyframes
|
|
2676
|
+
@keyframes slideFromBottom {
|
|
2610
2677
|
from {
|
|
2611
2678
|
opacity: 0;
|
|
2612
|
-
transform:
|
|
2679
|
+
transform: translateY(6px) scale(0.96);
|
|
2613
2680
|
}
|
|
2614
2681
|
to {
|
|
2615
2682
|
opacity: 1;
|
|
2616
|
-
transform:
|
|
2683
|
+
transform: translateY(0) scale(1);
|
|
2684
|
+
}
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
@keyframes slideFromLeft {
|
|
2688
|
+
from {
|
|
2689
|
+
opacity: 0;
|
|
2690
|
+
transform: translateX(-6px) scale(0.96);
|
|
2691
|
+
}
|
|
2692
|
+
to {
|
|
2693
|
+
opacity: 1;
|
|
2694
|
+
transform: translateX(0) scale(1);
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
|
|
2698
|
+
@keyframes slideFromRight {
|
|
2699
|
+
from {
|
|
2700
|
+
opacity: 0;
|
|
2701
|
+
transform: translateX(6px) scale(0.96);
|
|
2702
|
+
}
|
|
2703
|
+
to {
|
|
2704
|
+
opacity: 1;
|
|
2705
|
+
transform: translateX(0) scale(1);
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
/* ============================================
|
|
2710
|
+
* UTILITY ANIMATIONS
|
|
2711
|
+
* ============================================ */
|
|
2712
|
+
|
|
2713
|
+
.animate-bounce-subtle {
|
|
2714
|
+
animation: bounceSubtle 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
@keyframes bounceSubtle {
|
|
2718
|
+
0%, 100% {
|
|
2719
|
+
transform: translateY(0);
|
|
2720
|
+
}
|
|
2721
|
+
50% {
|
|
2722
|
+
transform: translateY(-4px);
|
|
2723
|
+
}
|
|
2724
|
+
}
|
|
2725
|
+
|
|
2726
|
+
.animate-scale-in {
|
|
2727
|
+
animation: scaleIn 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
@keyframes scaleIn {
|
|
2731
|
+
from {
|
|
2732
|
+
opacity: 0;
|
|
2733
|
+
transform: scale(0.9);
|
|
2734
|
+
}
|
|
2735
|
+
to {
|
|
2736
|
+
opacity: 1;
|
|
2737
|
+
transform: scale(1);
|
|
2617
2738
|
}
|
|
2618
2739
|
}
|
|
2740
|
+
|
|
2741
|
+
/* Smooth backdrop blur transition */
|
|
2742
|
+
.backdrop-animate {
|
|
2743
|
+
transition: backdrop-filter 200ms ease, background-color 200ms ease;
|
|
2744
|
+
}
|
|
2619
2745
|
`;
|
|
2620
2746
|
var useShadCNAnimations = () => {
|
|
2621
2747
|
if (typeof document !== "undefined") {
|
|
@@ -3011,25 +3137,7 @@ var SidebarSheet = ({ navigation, children, ...props }) => {
|
|
|
3011
3137
|
|
|
3012
3138
|
// ../../components/ui/Alert.tsx
|
|
3013
3139
|
import { useState as useState12 } from "react";
|
|
3014
|
-
|
|
3015
|
-
// ../../components/icons/AlertIcons.tsx
|
|
3016
|
-
import { Info as Info2, AlertTriangle as AlertTriangle3, CheckCircle2 as CheckCircle22, OctagonX } from "lucide-react";
|
|
3017
|
-
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
3018
|
-
function InfoIcon(props) {
|
|
3019
|
-
return /* @__PURE__ */ jsx18(Info2, { "aria-hidden": true, className: props.className });
|
|
3020
|
-
}
|
|
3021
|
-
function WarningIcon(props) {
|
|
3022
|
-
return /* @__PURE__ */ jsx18(AlertTriangle3, { "aria-hidden": true, className: props.className });
|
|
3023
|
-
}
|
|
3024
|
-
function CheckCircleIcon(props) {
|
|
3025
|
-
return /* @__PURE__ */ jsx18(CheckCircle22, { "aria-hidden": true, className: props.className });
|
|
3026
|
-
}
|
|
3027
|
-
function ErrorIcon(props) {
|
|
3028
|
-
return /* @__PURE__ */ jsx18(OctagonX, { "aria-hidden": true, className: props.className });
|
|
3029
|
-
}
|
|
3030
|
-
|
|
3031
|
-
// ../../components/ui/Alert.tsx
|
|
3032
|
-
import { X as X6 } from "lucide-react";
|
|
3140
|
+
import { Info as Info2, AlertTriangle as AlertTriangle3, CheckCircle as CheckCircle3, XCircle, X as X6 } from "lucide-react";
|
|
3033
3141
|
import { useTranslations as useTranslations2 } from "next-intl";
|
|
3034
3142
|
|
|
3035
3143
|
// ../../lib/constants/constants-ui/alert.ts
|
|
@@ -3043,13 +3151,13 @@ var VARIANT_STYLES_ALERT = {
|
|
|
3043
3151
|
};
|
|
3044
3152
|
|
|
3045
3153
|
// ../../components/ui/Alert.tsx
|
|
3046
|
-
import { jsx as
|
|
3154
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3047
3155
|
var variantIcons = {
|
|
3048
|
-
default: /* @__PURE__ */
|
|
3049
|
-
info: /* @__PURE__ */
|
|
3050
|
-
success: /* @__PURE__ */
|
|
3051
|
-
warning: /* @__PURE__ */
|
|
3052
|
-
error: /* @__PURE__ */
|
|
3156
|
+
default: /* @__PURE__ */ jsx18(Info2, { className: "h-4 w-4 text-muted-foreground" }),
|
|
3157
|
+
info: /* @__PURE__ */ jsx18(Info2, { className: "h-4 w-4 text-info" }),
|
|
3158
|
+
success: /* @__PURE__ */ jsx18(CheckCircle3, { className: "h-4 w-4 text-success" }),
|
|
3159
|
+
warning: /* @__PURE__ */ jsx18(AlertTriangle3, { className: "h-4 w-4 text-warning" }),
|
|
3160
|
+
error: /* @__PURE__ */ jsx18(XCircle, { className: "h-4 w-4 text-destructive" })
|
|
3053
3161
|
};
|
|
3054
3162
|
var Alert = ({ title, description, variant = "default", className, icon, dismissible = false, onClose, actions, closeAriaLabel }) => {
|
|
3055
3163
|
const [open, setOpen] = useState12(true);
|
|
@@ -3066,19 +3174,19 @@ var Alert = ({ title, description, variant = "default", className, icon, dismiss
|
|
|
3066
3174
|
role: "alert",
|
|
3067
3175
|
"aria-live": variant === "error" ? "assertive" : "polite",
|
|
3068
3176
|
children: [
|
|
3069
|
-
/* @__PURE__ */
|
|
3177
|
+
/* @__PURE__ */ jsx18("div", { className: "pt-1", children: icon ?? variantIcons[variant] }),
|
|
3070
3178
|
/* @__PURE__ */ jsxs16("div", { className: "flex-1 min-w-0", children: [
|
|
3071
|
-
title && /* @__PURE__ */
|
|
3072
|
-
description && (typeof description === "string" ? /* @__PURE__ */
|
|
3073
|
-
actions && /* @__PURE__ */
|
|
3179
|
+
title && /* @__PURE__ */ jsx18("p", { className: "font-semibold text-sm leading-none mb-1 text-foreground", children: title }),
|
|
3180
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsx18("p", { className: "text-sm text-muted-foreground leading-relaxed break-words", children: description }) : /* @__PURE__ */ jsx18("div", { className: "text-sm text-muted-foreground leading-relaxed break-words", children: description })),
|
|
3181
|
+
actions && /* @__PURE__ */ jsx18("div", { className: "mt-2 flex flex-wrap gap-2", children: actions })
|
|
3074
3182
|
] }),
|
|
3075
|
-
dismissible && /* @__PURE__ */
|
|
3183
|
+
dismissible && /* @__PURE__ */ jsx18(
|
|
3076
3184
|
"button",
|
|
3077
3185
|
{
|
|
3078
3186
|
onClick: handleClose,
|
|
3079
3187
|
className: "rounded-md p-1 hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
3080
3188
|
"aria-label": closeAriaLabel || t("closeAlert"),
|
|
3081
|
-
children: /* @__PURE__ */
|
|
3189
|
+
children: /* @__PURE__ */ jsx18(X6, { className: "h-4 w-4" })
|
|
3082
3190
|
}
|
|
3083
3191
|
)
|
|
3084
3192
|
]
|
|
@@ -3134,7 +3242,7 @@ var loading = new LoadingManager();
|
|
|
3134
3242
|
|
|
3135
3243
|
// ../../components/ui/GlobalLoading.tsx
|
|
3136
3244
|
import { useTranslations as useTranslations3 } from "next-intl";
|
|
3137
|
-
import { jsx as
|
|
3245
|
+
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3138
3246
|
var GlobalLoading = ({
|
|
3139
3247
|
className,
|
|
3140
3248
|
backdrop = true,
|
|
@@ -3147,7 +3255,7 @@ var GlobalLoading = ({
|
|
|
3147
3255
|
return unsubscribe;
|
|
3148
3256
|
}, []);
|
|
3149
3257
|
if (!state.isVisible) return null;
|
|
3150
|
-
return /* @__PURE__ */
|
|
3258
|
+
return /* @__PURE__ */ jsx19(
|
|
3151
3259
|
"div",
|
|
3152
3260
|
{
|
|
3153
3261
|
className: cn(
|
|
@@ -3160,8 +3268,8 @@ var GlobalLoading = ({
|
|
|
3160
3268
|
"aria-modal": true,
|
|
3161
3269
|
"aria-label": "Loading",
|
|
3162
3270
|
children: /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-center space-x-3 backdrop-blur-sm rounded-lg px-6 py-4 shadow-lg", role: "status", "aria-live": "assertive", "aria-busy": true, children: [
|
|
3163
|
-
/* @__PURE__ */
|
|
3164
|
-
state.text && /* @__PURE__ */
|
|
3271
|
+
/* @__PURE__ */ jsx19(Activity2, { className: "w-6 h-6 animate-spin text-primary-background", "aria-hidden": true }),
|
|
3272
|
+
state.text && /* @__PURE__ */ jsx19("span", { className: "text-base font-medium text-foreground", children: state.text })
|
|
3165
3273
|
] })
|
|
3166
3274
|
}
|
|
3167
3275
|
);
|
|
@@ -3172,14 +3280,14 @@ var PageLoading = ({
|
|
|
3172
3280
|
}) => {
|
|
3173
3281
|
const t = useTranslations3("Loading");
|
|
3174
3282
|
const defaultMessage = message || t("loadingPage");
|
|
3175
|
-
return /* @__PURE__ */
|
|
3283
|
+
return /* @__PURE__ */ jsx19("div", { className: cn(
|
|
3176
3284
|
"min-h-screen flex items-center justify-center bg-background",
|
|
3177
3285
|
className
|
|
3178
3286
|
), children: /* @__PURE__ */ jsxs17("div", { className: "text-center space-y-4", children: [
|
|
3179
|
-
/* @__PURE__ */
|
|
3287
|
+
/* @__PURE__ */ jsx19(Activity2, { className: "w-8 h-8 animate-spin text-primary mx-auto" }),
|
|
3180
3288
|
/* @__PURE__ */ jsxs17("div", { children: [
|
|
3181
|
-
/* @__PURE__ */
|
|
3182
|
-
/* @__PURE__ */
|
|
3289
|
+
/* @__PURE__ */ jsx19("p", { className: "text-lg font-medium text-foreground", children: defaultMessage }),
|
|
3290
|
+
/* @__PURE__ */ jsx19("p", { className: "text-sm text-muted-foreground mt-2", children: t("pleaseWait") })
|
|
3183
3291
|
] })
|
|
3184
3292
|
] }) });
|
|
3185
3293
|
};
|
|
@@ -3196,8 +3304,8 @@ var InlineLoading = ({
|
|
|
3196
3304
|
lg: "w-8 h-8"
|
|
3197
3305
|
};
|
|
3198
3306
|
return /* @__PURE__ */ jsxs17("div", { className: cn("flex items-center justify-center space-x-2", className), children: [
|
|
3199
|
-
/* @__PURE__ */
|
|
3200
|
-
text && /* @__PURE__ */
|
|
3307
|
+
/* @__PURE__ */ jsx19(Activity2, { className: cn("animate-spin text-primary", sizeClasses2[size]) }),
|
|
3308
|
+
text && /* @__PURE__ */ jsx19("span", { className: "text-sm text-muted-foreground animate-pulse", children: text })
|
|
3201
3309
|
] });
|
|
3202
3310
|
};
|
|
3203
3311
|
var ButtonLoading = ({
|
|
@@ -3221,10 +3329,10 @@ var ButtonLoading = ({
|
|
|
3221
3329
|
),
|
|
3222
3330
|
children: [
|
|
3223
3331
|
isLoading && /* @__PURE__ */ jsxs17("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: [
|
|
3224
|
-
/* @__PURE__ */
|
|
3225
|
-
loadingText && /* @__PURE__ */
|
|
3332
|
+
/* @__PURE__ */ jsx19(Activity2, { className: "w-4 h-4 animate-spin text-primary-foreground" }),
|
|
3333
|
+
loadingText && /* @__PURE__ */ jsx19("span", { className: "ml-2 text-sm", children: loadingText })
|
|
3226
3334
|
] }),
|
|
3227
|
-
/* @__PURE__ */
|
|
3335
|
+
/* @__PURE__ */ jsx19("div", { className: cn(isLoading && "opacity-50 pointer-events-none"), children: child })
|
|
3228
3336
|
]
|
|
3229
3337
|
}
|
|
3230
3338
|
);
|
|
@@ -3234,7 +3342,7 @@ var ButtonLoading = ({
|
|
|
3234
3342
|
import * as React15 from "react";
|
|
3235
3343
|
import Link from "next/link";
|
|
3236
3344
|
import { ChevronRight, Home, MoreHorizontal } from "lucide-react";
|
|
3237
|
-
import { jsx as
|
|
3345
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3238
3346
|
var sizeStyles5 = {
|
|
3239
3347
|
sm: {
|
|
3240
3348
|
text: "text-xs",
|
|
@@ -3281,16 +3389,16 @@ var Breadcrumb = ({
|
|
|
3281
3389
|
}, [items.length, maxItems, collapsible]);
|
|
3282
3390
|
const getSeparator = () => {
|
|
3283
3391
|
if (typeof separator === "string") {
|
|
3284
|
-
return /* @__PURE__ */
|
|
3392
|
+
return /* @__PURE__ */ jsx20("span", { className: "text-muted-foreground", children: separator });
|
|
3285
3393
|
}
|
|
3286
3394
|
if (variant === "slash") {
|
|
3287
|
-
return /* @__PURE__ */
|
|
3395
|
+
return /* @__PURE__ */ jsx20("span", { className: "text-muted-foreground", children: "/" });
|
|
3288
3396
|
}
|
|
3289
3397
|
if (variant === "arrow") {
|
|
3290
|
-
return /* @__PURE__ */
|
|
3398
|
+
return /* @__PURE__ */ jsx20("span", { className: "text-muted-foreground", children: "\u2192" });
|
|
3291
3399
|
}
|
|
3292
3400
|
const SeparatorComponent = separator;
|
|
3293
|
-
return /* @__PURE__ */
|
|
3401
|
+
return /* @__PURE__ */ jsx20(SeparatorComponent, { className: cn("text-muted-foreground", sizeStyles5[size].icon) });
|
|
3294
3402
|
};
|
|
3295
3403
|
const processedItems = React15.useMemo(() => {
|
|
3296
3404
|
let finalItems = [...items];
|
|
@@ -3311,17 +3419,17 @@ var Breadcrumb = ({
|
|
|
3311
3419
|
const handleCollapseToggle = () => {
|
|
3312
3420
|
setIsCollapsed(!isCollapsed);
|
|
3313
3421
|
};
|
|
3314
|
-
return /* @__PURE__ */
|
|
3422
|
+
return /* @__PURE__ */ jsx20(
|
|
3315
3423
|
"nav",
|
|
3316
3424
|
{
|
|
3317
3425
|
className: cn("flex w-full items-center", sizeStyles5[size].text, className),
|
|
3318
3426
|
"aria-label": "Breadcrumb navigation",
|
|
3319
|
-
children: /* @__PURE__ */
|
|
3427
|
+
children: /* @__PURE__ */ jsx20("ol", { className: cn("flex items-center", sizeStyles5[size].spacing), children: processedItems.map((item, index) => {
|
|
3320
3428
|
const isLast = index === processedItems.length - 1;
|
|
3321
3429
|
const isCollapsedIndicator = item.label === "...";
|
|
3322
3430
|
const Icon = item.icon;
|
|
3323
3431
|
return /* @__PURE__ */ jsxs18("li", { className: "flex items-center", children: [
|
|
3324
|
-
isCollapsedIndicator ? /* @__PURE__ */
|
|
3432
|
+
isCollapsedIndicator ? /* @__PURE__ */ jsx20(
|
|
3325
3433
|
"button",
|
|
3326
3434
|
{
|
|
3327
3435
|
onClick: handleCollapseToggle,
|
|
@@ -3332,7 +3440,7 @@ var Breadcrumb = ({
|
|
|
3332
3440
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1"
|
|
3333
3441
|
),
|
|
3334
3442
|
"aria-label": "Show all breadcrumb items",
|
|
3335
|
-
children: /* @__PURE__ */
|
|
3443
|
+
children: /* @__PURE__ */ jsx20(MoreHorizontal, { className: sizeStyles5[size].icon })
|
|
3336
3444
|
}
|
|
3337
3445
|
) : item.href && !isLast && !item.disabled ? /* @__PURE__ */ jsxs18(
|
|
3338
3446
|
Link,
|
|
@@ -3345,8 +3453,8 @@ var Breadcrumb = ({
|
|
|
3345
3453
|
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1 rounded-sm"
|
|
3346
3454
|
),
|
|
3347
3455
|
children: [
|
|
3348
|
-
Icon && /* @__PURE__ */
|
|
3349
|
-
/* @__PURE__ */
|
|
3456
|
+
Icon && /* @__PURE__ */ jsx20(Icon, { className: sizeStyles5[size].icon }),
|
|
3457
|
+
/* @__PURE__ */ jsx20("span", { children: item.label })
|
|
3350
3458
|
]
|
|
3351
3459
|
}
|
|
3352
3460
|
) : /* @__PURE__ */ jsxs18(
|
|
@@ -3359,12 +3467,12 @@ var Breadcrumb = ({
|
|
|
3359
3467
|
),
|
|
3360
3468
|
"aria-current": isLast ? "page" : void 0,
|
|
3361
3469
|
children: [
|
|
3362
|
-
Icon && /* @__PURE__ */
|
|
3363
|
-
/* @__PURE__ */
|
|
3470
|
+
Icon && /* @__PURE__ */ jsx20(Icon, { className: sizeStyles5[size].icon }),
|
|
3471
|
+
/* @__PURE__ */ jsx20("span", { children: item.label })
|
|
3364
3472
|
]
|
|
3365
3473
|
}
|
|
3366
3474
|
),
|
|
3367
|
-
!isLast && /* @__PURE__ */
|
|
3475
|
+
!isLast && /* @__PURE__ */ jsx20(
|
|
3368
3476
|
"span",
|
|
3369
3477
|
{
|
|
3370
3478
|
className: cn("mx-1", sizeStyles5[size].spacing),
|
|
@@ -3382,7 +3490,7 @@ var Breadcrumb_default = Breadcrumb;
|
|
|
3382
3490
|
|
|
3383
3491
|
// ../../components/ui/Tab.tsx
|
|
3384
3492
|
import * as React16 from "react";
|
|
3385
|
-
import { jsx as
|
|
3493
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3386
3494
|
var sizeStyles6 = {
|
|
3387
3495
|
sm: {
|
|
3388
3496
|
tab: "py-1.5 px-3 text-xs",
|
|
@@ -3529,14 +3637,14 @@ var Tabs = ({
|
|
|
3529
3637
|
}
|
|
3530
3638
|
},
|
|
3531
3639
|
children: [
|
|
3532
|
-
Icon && /* @__PURE__ */
|
|
3640
|
+
Icon && /* @__PURE__ */ jsx21(Icon, { className: "h-4 w-4" }),
|
|
3533
3641
|
tab.label
|
|
3534
3642
|
]
|
|
3535
3643
|
},
|
|
3536
3644
|
tab.value
|
|
3537
3645
|
);
|
|
3538
3646
|
}),
|
|
3539
|
-
variant === "underline" && orientation === "horizontal" && /* @__PURE__ */
|
|
3647
|
+
variant === "underline" && orientation === "horizontal" && /* @__PURE__ */ jsx21(
|
|
3540
3648
|
"div",
|
|
3541
3649
|
{
|
|
3542
3650
|
className: "absolute bottom-0 h-0.5 bg-primary transition-all duration-300 ease-out",
|
|
@@ -3544,7 +3652,7 @@ var Tabs = ({
|
|
|
3544
3652
|
}
|
|
3545
3653
|
)
|
|
3546
3654
|
] }),
|
|
3547
|
-
/* @__PURE__ */
|
|
3655
|
+
/* @__PURE__ */ jsx21(
|
|
3548
3656
|
"div",
|
|
3549
3657
|
{
|
|
3550
3658
|
role: "tabpanel",
|
|
@@ -3562,7 +3670,7 @@ var Tabs = ({
|
|
|
3562
3670
|
] });
|
|
3563
3671
|
};
|
|
3564
3672
|
var SimpleTabs = ({ tabs, defaultValue, className }) => {
|
|
3565
|
-
return /* @__PURE__ */
|
|
3673
|
+
return /* @__PURE__ */ jsx21(
|
|
3566
3674
|
Tabs,
|
|
3567
3675
|
{
|
|
3568
3676
|
tabs,
|
|
@@ -3574,7 +3682,7 @@ var SimpleTabs = ({ tabs, defaultValue, className }) => {
|
|
|
3574
3682
|
);
|
|
3575
3683
|
};
|
|
3576
3684
|
var PillTabs = ({ contained = true, ...props }) => {
|
|
3577
|
-
return /* @__PURE__ */
|
|
3685
|
+
return /* @__PURE__ */ jsx21(
|
|
3578
3686
|
Tabs,
|
|
3579
3687
|
{
|
|
3580
3688
|
...props,
|
|
@@ -3588,7 +3696,7 @@ var VerticalTabs = ({
|
|
|
3588
3696
|
className,
|
|
3589
3697
|
...props
|
|
3590
3698
|
}) => {
|
|
3591
|
-
return /* @__PURE__ */
|
|
3699
|
+
return /* @__PURE__ */ jsx21("div", { className: cn("flex gap-6", className), children: /* @__PURE__ */ jsx21("div", { className: cn(sidebarWidth, "flex-shrink-0"), children: /* @__PURE__ */ jsx21(
|
|
3592
3700
|
Tabs,
|
|
3593
3701
|
{
|
|
3594
3702
|
...props,
|
|
@@ -3602,7 +3710,7 @@ var VerticalTabs = ({
|
|
|
3602
3710
|
// ../../components/ui/DropdownMenu.tsx
|
|
3603
3711
|
import React17, { useState as useState16 } from "react";
|
|
3604
3712
|
import { createPortal as createPortal5 } from "react-dom";
|
|
3605
|
-
import { Fragment as Fragment5, jsx as
|
|
3713
|
+
import { Fragment as Fragment5, jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3606
3714
|
var DropdownMenu = ({
|
|
3607
3715
|
trigger,
|
|
3608
3716
|
children,
|
|
@@ -3724,28 +3832,24 @@ var DropdownMenu = ({
|
|
|
3724
3832
|
setOpen(false);
|
|
3725
3833
|
}
|
|
3726
3834
|
};
|
|
3727
|
-
const dropdownContent = open ? /* @__PURE__ */
|
|
3835
|
+
const dropdownContent = open ? /* @__PURE__ */ jsx22(
|
|
3728
3836
|
"div",
|
|
3729
3837
|
{
|
|
3730
3838
|
"data-dropdown-menu": true,
|
|
3839
|
+
"data-combobox-dropdown": true,
|
|
3731
3840
|
ref: contentRef,
|
|
3732
3841
|
style: {
|
|
3733
3842
|
position: "absolute",
|
|
3734
3843
|
top: position?.top ?? -9999,
|
|
3735
3844
|
left: position?.left ?? -9999,
|
|
3736
3845
|
zIndex: 9999,
|
|
3737
|
-
visibility: position ? "visible" : "hidden"
|
|
3846
|
+
visibility: position ? "visible" : "hidden",
|
|
3847
|
+
transformOrigin: "top center"
|
|
3738
3848
|
},
|
|
3739
3849
|
"data-state": open ? "open" : "closed",
|
|
3740
3850
|
role: "menu",
|
|
3741
|
-
className: cn(
|
|
3742
|
-
|
|
3743
|
-
// shadcn-like enter/exit animations
|
|
3744
|
-
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
3745
|
-
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
3746
|
-
className
|
|
3747
|
-
),
|
|
3748
|
-
children: /* @__PURE__ */ jsx23(
|
|
3851
|
+
className: cn("z-9999 min-w-40", className),
|
|
3852
|
+
children: /* @__PURE__ */ jsx22(
|
|
3749
3853
|
"div",
|
|
3750
3854
|
{
|
|
3751
3855
|
className: cn(
|
|
@@ -3766,7 +3870,7 @@ var DropdownMenu = ({
|
|
|
3766
3870
|
role: "menuitem",
|
|
3767
3871
|
tabIndex: -1,
|
|
3768
3872
|
style: {
|
|
3769
|
-
animationDelay: open ? `${index *
|
|
3873
|
+
animationDelay: open ? `${Math.min(index * 20, 200)}ms` : "0ms"
|
|
3770
3874
|
},
|
|
3771
3875
|
className: cn(
|
|
3772
3876
|
"dropdown-item flex w-full items-center gap-2 px-2.5 py-1.5 text-sm rounded-sm",
|
|
@@ -3777,7 +3881,7 @@ var DropdownMenu = ({
|
|
|
3777
3881
|
item.destructive && "text-destructive hover:bg-destructive/10 focus:bg-destructive/10"
|
|
3778
3882
|
),
|
|
3779
3883
|
children: [
|
|
3780
|
-
IconComponent && /* @__PURE__ */
|
|
3884
|
+
IconComponent && /* @__PURE__ */ jsx22(IconComponent, { className: "h-4 w-4" }),
|
|
3781
3885
|
item.label
|
|
3782
3886
|
]
|
|
3783
3887
|
},
|
|
@@ -3804,7 +3908,7 @@ var DropdownMenu = ({
|
|
|
3804
3908
|
dropdownContent && typeof window !== "undefined" && createPortal5(dropdownContent, document.body)
|
|
3805
3909
|
] });
|
|
3806
3910
|
};
|
|
3807
|
-
var DropdownMenuItem = ({ children, onClick, disabled, destructive, className }) => /* @__PURE__ */
|
|
3911
|
+
var DropdownMenuItem = ({ children, onClick, disabled, destructive, className }) => /* @__PURE__ */ jsx22(
|
|
3808
3912
|
"button",
|
|
3809
3913
|
{
|
|
3810
3914
|
onClick,
|
|
@@ -3820,8 +3924,8 @@ var DropdownMenuItem = ({ children, onClick, disabled, destructive, className })
|
|
|
3820
3924
|
children
|
|
3821
3925
|
}
|
|
3822
3926
|
);
|
|
3823
|
-
var DropdownMenuSeparator = ({ className }) => /* @__PURE__ */
|
|
3824
|
-
var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className }) => /* @__PURE__ */
|
|
3927
|
+
var DropdownMenuSeparator = ({ className }) => /* @__PURE__ */ jsx22("div", { className: cn("h-px bg-border my-1", className) });
|
|
3928
|
+
var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className }) => /* @__PURE__ */ jsx22(
|
|
3825
3929
|
DropdownMenu,
|
|
3826
3930
|
{
|
|
3827
3931
|
trigger: /* @__PURE__ */ jsxs20(
|
|
@@ -3834,8 +3938,8 @@ var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", cla
|
|
|
3834
3938
|
className
|
|
3835
3939
|
),
|
|
3836
3940
|
children: [
|
|
3837
|
-
/* @__PURE__ */
|
|
3838
|
-
/* @__PURE__ */
|
|
3941
|
+
/* @__PURE__ */ jsx22("span", { className: "truncate max-w-64 text-foreground/90", children: value || placeholder }),
|
|
3942
|
+
/* @__PURE__ */ jsx22("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", className: "opacity-70", children: /* @__PURE__ */ jsx22("path", { d: "M6 8l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
3839
3943
|
]
|
|
3840
3944
|
}
|
|
3841
3945
|
),
|
|
@@ -3856,7 +3960,7 @@ import * as React18 from "react";
|
|
|
3856
3960
|
import { useId as useId2 } from "react";
|
|
3857
3961
|
import { createPortal as createPortal6 } from "react-dom";
|
|
3858
3962
|
import { ChevronDown, Search as Search2, SearchX, Check as Check3, X as X7, Loader2 as Loader22 } from "lucide-react";
|
|
3859
|
-
import { jsx as
|
|
3963
|
+
import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3860
3964
|
var getOptionLabel = (option) => {
|
|
3861
3965
|
return typeof option === "string" ? option : option.label;
|
|
3862
3966
|
};
|
|
@@ -3973,7 +4077,7 @@ var Combobox = ({
|
|
|
3973
4077
|
}, [open, enableSearch]);
|
|
3974
4078
|
const selectedOption = findOptionByValue(options, value);
|
|
3975
4079
|
const displayValue = selectedOption ? getOptionLabel(selectedOption) : "";
|
|
3976
|
-
const dropdownContent = /* @__PURE__ */
|
|
4080
|
+
const dropdownContent = /* @__PURE__ */ jsx23(
|
|
3977
4081
|
"div",
|
|
3978
4082
|
{
|
|
3979
4083
|
"data-combobox-dropdown": true,
|
|
@@ -3983,20 +4087,17 @@ var Combobox = ({
|
|
|
3983
4087
|
top: dropdownPosition?.top || 0,
|
|
3984
4088
|
left: dropdownPosition?.left || 0,
|
|
3985
4089
|
width: dropdownPosition?.width || 200,
|
|
3986
|
-
zIndex: 9999
|
|
4090
|
+
zIndex: 9999,
|
|
4091
|
+
transformOrigin: "top center"
|
|
3987
4092
|
},
|
|
3988
4093
|
"data-state": open ? "open" : "closed",
|
|
3989
4094
|
role: "listbox",
|
|
3990
4095
|
id: `${resolvedId}-listbox`,
|
|
3991
|
-
className:
|
|
3992
|
-
"z-[9999]",
|
|
3993
|
-
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
3994
|
-
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
|
|
3995
|
-
),
|
|
4096
|
+
className: "z-9999",
|
|
3996
4097
|
children: /* @__PURE__ */ jsxs21("div", { className: cn("rounded-md border bg-popover text-popover-foreground shadow-md", "backdrop-blur-sm bg-popover/95 border-border/60"), children: [
|
|
3997
4098
|
enableSearch && /* @__PURE__ */ jsxs21("div", { className: "relative p-3 border-b border-border/50 bg-muted/20", children: [
|
|
3998
|
-
/* @__PURE__ */
|
|
3999
|
-
/* @__PURE__ */
|
|
4099
|
+
/* @__PURE__ */ jsx23(Search2, { className: "absolute left-6 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground transition-colors" }),
|
|
4100
|
+
/* @__PURE__ */ jsx23(
|
|
4000
4101
|
"input",
|
|
4001
4102
|
{
|
|
4002
4103
|
ref: inputRef,
|
|
@@ -4035,9 +4136,9 @@ var Combobox = ({
|
|
|
4035
4136
|
}
|
|
4036
4137
|
)
|
|
4037
4138
|
] }),
|
|
4038
|
-
/* @__PURE__ */
|
|
4039
|
-
/* @__PURE__ */
|
|
4040
|
-
/* @__PURE__ */
|
|
4139
|
+
/* @__PURE__ */ jsx23("div", { className: "max-h-64 overflow-y-auto overscroll-contain", children: /* @__PURE__ */ jsx23("ul", { className: "p-1 space-y-1", children: loading2 ? /* @__PURE__ */ jsx23("li", { className: "px-3 py-8 text-center", children: /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center gap-2 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
4140
|
+
/* @__PURE__ */ jsx23(Loader22, { className: "h-6 w-6 animate-spin text-primary" }),
|
|
4141
|
+
/* @__PURE__ */ jsx23("span", { className: "text-sm text-muted-foreground", children: loadingText || "Loading..." })
|
|
4041
4142
|
] }) }) : filteredOptions.length > 0 ? filteredOptions.map((item, index) => {
|
|
4042
4143
|
const itemValue = getOptionValue(item);
|
|
4043
4144
|
const itemLabel = getOptionLabel(item);
|
|
@@ -4054,7 +4155,7 @@ var Combobox = ({
|
|
|
4054
4155
|
"aria-selected": isSelected,
|
|
4055
4156
|
onClick: () => handleSelect(item),
|
|
4056
4157
|
style: {
|
|
4057
|
-
animationDelay: open ? `${index *
|
|
4158
|
+
animationDelay: open ? `${Math.min(index * 20, 200)}ms` : "0ms"
|
|
4058
4159
|
},
|
|
4059
4160
|
className: cn(
|
|
4060
4161
|
"dropdown-item group flex cursor-pointer items-center justify-between rounded-sm px-2.5 py-1.5 text-sm",
|
|
@@ -4066,24 +4167,16 @@ var Combobox = ({
|
|
|
4066
4167
|
isSelected && "bg-accent text-accent-foreground"
|
|
4067
4168
|
),
|
|
4068
4169
|
children: [
|
|
4069
|
-
/* @__PURE__ */
|
|
4070
|
-
isSelected && /* @__PURE__ */
|
|
4170
|
+
/* @__PURE__ */ jsx23("span", { className: "truncate", children: itemLabel }),
|
|
4171
|
+
isSelected && /* @__PURE__ */ jsx23(Check3, { className: "h-4 w-4 text-primary" })
|
|
4071
4172
|
]
|
|
4072
4173
|
},
|
|
4073
4174
|
`${itemValue}-${index}`
|
|
4074
4175
|
);
|
|
4075
|
-
}) : /* @__PURE__ */
|
|
4076
|
-
/* @__PURE__ */
|
|
4077
|
-
/* @__PURE__ */
|
|
4078
|
-
query && /* @__PURE__ */
|
|
4079
|
-
"button",
|
|
4080
|
-
{
|
|
4081
|
-
type: "button",
|
|
4082
|
-
onClick: () => setQuery(""),
|
|
4083
|
-
className: "text-xs text-primary hover:underline",
|
|
4084
|
-
children: "Clear search"
|
|
4085
|
-
}
|
|
4086
|
-
)
|
|
4176
|
+
}) : /* @__PURE__ */ jsx23("li", { className: "px-3 py-8 text-center text-muted-foreground text-sm", children: /* @__PURE__ */ jsxs21("div", { className: "flex flex-col items-center gap-2 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
4177
|
+
/* @__PURE__ */ jsx23(SearchX, { className: "h-8 w-8 opacity-40 text-muted-foreground" }),
|
|
4178
|
+
/* @__PURE__ */ jsx23("span", { className: "text-sm", children: emptyText }),
|
|
4179
|
+
query && /* @__PURE__ */ jsx23("button", { type: "button", onClick: () => setQuery(""), className: "text-xs text-primary hover:underline", children: "Clear search" })
|
|
4087
4180
|
] }) }) }) })
|
|
4088
4181
|
] })
|
|
4089
4182
|
}
|
|
@@ -4098,7 +4191,7 @@ var Combobox = ({
|
|
|
4098
4191
|
const radiusClass = size === "sm" ? "rounded-md" : "rounded-lg";
|
|
4099
4192
|
const verticalGap = size === "sm" ? "space-y-1.5" : "space-y-2";
|
|
4100
4193
|
return /* @__PURE__ */ jsxs21("div", { className: cn("w-full group", verticalGap), children: [
|
|
4101
|
-
label && /* @__PURE__ */
|
|
4194
|
+
label && /* @__PURE__ */ jsx23("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxs21(
|
|
4102
4195
|
"label",
|
|
4103
4196
|
{
|
|
4104
4197
|
id: labelId,
|
|
@@ -4110,7 +4203,7 @@ var Combobox = ({
|
|
|
4110
4203
|
),
|
|
4111
4204
|
children: [
|
|
4112
4205
|
label,
|
|
4113
|
-
required && /* @__PURE__ */
|
|
4206
|
+
required && /* @__PURE__ */ jsx23("span", { className: "text-destructive ml-1", children: "*" })
|
|
4114
4207
|
]
|
|
4115
4208
|
}
|
|
4116
4209
|
) }),
|
|
@@ -4144,10 +4237,10 @@ var Combobox = ({
|
|
|
4144
4237
|
className
|
|
4145
4238
|
),
|
|
4146
4239
|
children: [
|
|
4147
|
-
/* @__PURE__ */
|
|
4240
|
+
/* @__PURE__ */ jsx23("span", { className: cn("truncate", !displayValue && "text-muted-foreground", fontBold && "font-bold"), children: displayValue || placeholder }),
|
|
4148
4241
|
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-1 ml-2", children: [
|
|
4149
4242
|
allowClear && value && !disabled && // FIX: Use a div instead of a nested button
|
|
4150
|
-
/* @__PURE__ */
|
|
4243
|
+
/* @__PURE__ */ jsx23(
|
|
4151
4244
|
"div",
|
|
4152
4245
|
{
|
|
4153
4246
|
role: "button",
|
|
@@ -4156,18 +4249,10 @@ var Combobox = ({
|
|
|
4156
4249
|
onClick: handleClear,
|
|
4157
4250
|
onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && handleClear(e),
|
|
4158
4251
|
className: "opacity-0 group-hover:opacity-100 transition-opacity p-0.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive",
|
|
4159
|
-
children: /* @__PURE__ */
|
|
4252
|
+
children: /* @__PURE__ */ jsx23(X7, { className: "h-3 w-3" })
|
|
4160
4253
|
}
|
|
4161
4254
|
),
|
|
4162
|
-
/* @__PURE__ */
|
|
4163
|
-
ChevronDown,
|
|
4164
|
-
{
|
|
4165
|
-
className: cn(
|
|
4166
|
-
"h-4 w-4 text-muted-foreground transition-all duration-200",
|
|
4167
|
-
open && "rotate-180 scale-110 text-primary"
|
|
4168
|
-
)
|
|
4169
|
-
}
|
|
4170
|
-
)
|
|
4255
|
+
/* @__PURE__ */ jsx23(ChevronDown, { className: cn("h-4 w-4 text-muted-foreground transition-all duration-200", open && "rotate-180 scale-110 text-primary") })
|
|
4171
4256
|
] })
|
|
4172
4257
|
]
|
|
4173
4258
|
}
|
|
@@ -4178,7 +4263,7 @@ var Combobox = ({
|
|
|
4178
4263
|
|
|
4179
4264
|
// ../../components/ui/Pagination.tsx
|
|
4180
4265
|
import { useTranslations as useTranslations4 } from "next-intl";
|
|
4181
|
-
import { jsx as
|
|
4266
|
+
import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4182
4267
|
var Pagination = ({
|
|
4183
4268
|
page,
|
|
4184
4269
|
totalPages,
|
|
@@ -4262,12 +4347,12 @@ var Pagination = ({
|
|
|
4262
4347
|
};
|
|
4263
4348
|
if (totalPages <= 1) return null;
|
|
4264
4349
|
return /* @__PURE__ */ jsxs22("nav", { className: cn("flex flex-col gap-4", className), "aria-label": labels?.navigationLabel || t("navigationLabel"), children: [
|
|
4265
|
-
showInfo && totalItems && /* @__PURE__ */
|
|
4350
|
+
showInfo && totalItems && /* @__PURE__ */ jsx24("div", { className: cn("text-sm text-muted-foreground", textAlignmentClass), children: labels?.showingResults ? labels.showingResults({ startItem: startItem || 0, endItem: endItem || 0, totalItems }) : t("showingResults", { startItem: startItem || 0, endItem: endItem || 0, totalItems }) }),
|
|
4266
4351
|
/* @__PURE__ */ jsxs22("div", { className: cn("flex items-center justify-between", {
|
|
4267
4352
|
"flex-row-reverse": alignment === "right" || alignment === "center"
|
|
4268
4353
|
}), children: [
|
|
4269
4354
|
/* @__PURE__ */ jsxs22("div", { className: cn("flex items-center gap-1"), children: [
|
|
4270
|
-
showFirstLast && /* @__PURE__ */
|
|
4355
|
+
showFirstLast && /* @__PURE__ */ jsx24(
|
|
4271
4356
|
Button_default,
|
|
4272
4357
|
{
|
|
4273
4358
|
variant: getButtonVariant(false),
|
|
@@ -4281,7 +4366,7 @@ var Pagination = ({
|
|
|
4281
4366
|
"aria-disabled": disabled || page === 1
|
|
4282
4367
|
}
|
|
4283
4368
|
),
|
|
4284
|
-
showPrevNext && /* @__PURE__ */
|
|
4369
|
+
showPrevNext && /* @__PURE__ */ jsx24(
|
|
4285
4370
|
Button_default,
|
|
4286
4371
|
{
|
|
4287
4372
|
variant: getButtonVariant(false),
|
|
@@ -4292,16 +4377,16 @@ var Pagination = ({
|
|
|
4292
4377
|
title: labels?.previousPage || t("previousPage"),
|
|
4293
4378
|
"aria-label": labels?.previousPage || t("previousPage"),
|
|
4294
4379
|
"aria-disabled": disabled || page === 1,
|
|
4295
|
-
children: /* @__PURE__ */
|
|
4380
|
+
children: /* @__PURE__ */ jsx24("span", { className: "hidden sm:inline", children: labels?.previous || t("previous") })
|
|
4296
4381
|
}
|
|
4297
4382
|
),
|
|
4298
4383
|
showPageNumbers && createPageArray().map((p, i) => {
|
|
4299
4384
|
if (p === "...") {
|
|
4300
|
-
return /* @__PURE__ */
|
|
4385
|
+
return /* @__PURE__ */ jsx24(Button_default, { variant: "ghost", size, disabled: true, icon: MoreHorizontal2, className: "cursor-default" }, i);
|
|
4301
4386
|
}
|
|
4302
4387
|
const pageNumber = p;
|
|
4303
4388
|
const isActive = page === pageNumber;
|
|
4304
|
-
return /* @__PURE__ */
|
|
4389
|
+
return /* @__PURE__ */ jsx24(
|
|
4305
4390
|
Button_default,
|
|
4306
4391
|
{
|
|
4307
4392
|
variant: getButtonVariant(isActive),
|
|
@@ -4316,7 +4401,7 @@ var Pagination = ({
|
|
|
4316
4401
|
i
|
|
4317
4402
|
);
|
|
4318
4403
|
}),
|
|
4319
|
-
showPrevNext && /* @__PURE__ */
|
|
4404
|
+
showPrevNext && /* @__PURE__ */ jsx24(
|
|
4320
4405
|
Button_default,
|
|
4321
4406
|
{
|
|
4322
4407
|
variant: getButtonVariant(false),
|
|
@@ -4327,10 +4412,10 @@ var Pagination = ({
|
|
|
4327
4412
|
title: labels?.nextPage || t("nextPage"),
|
|
4328
4413
|
"aria-label": labels?.nextPage || t("nextPage"),
|
|
4329
4414
|
"aria-disabled": disabled || page === totalPages,
|
|
4330
|
-
children: /* @__PURE__ */
|
|
4415
|
+
children: /* @__PURE__ */ jsx24("span", { className: "hidden sm:inline", children: labels?.next || t("next") })
|
|
4331
4416
|
}
|
|
4332
4417
|
),
|
|
4333
|
-
showFirstLast && /* @__PURE__ */
|
|
4418
|
+
showFirstLast && /* @__PURE__ */ jsx24(
|
|
4334
4419
|
Button_default,
|
|
4335
4420
|
{
|
|
4336
4421
|
variant: getButtonVariant(false),
|
|
@@ -4350,7 +4435,7 @@ var Pagination = ({
|
|
|
4350
4435
|
labels?.itemsPerPage || t("itemsPerPage"),
|
|
4351
4436
|
":"
|
|
4352
4437
|
] }),
|
|
4353
|
-
/* @__PURE__ */
|
|
4438
|
+
/* @__PURE__ */ jsx24("div", { className: "w-20", children: /* @__PURE__ */ jsx24(
|
|
4354
4439
|
Combobox,
|
|
4355
4440
|
{
|
|
4356
4441
|
options: pageSizeOptionsStrings,
|
|
@@ -4390,14 +4475,14 @@ var SimplePagination = ({
|
|
|
4390
4475
|
" total items)"
|
|
4391
4476
|
] }),
|
|
4392
4477
|
/* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between", children: [
|
|
4393
|
-
/* @__PURE__ */
|
|
4478
|
+
/* @__PURE__ */ jsx24(Button_default, { variant, size, icon: ChevronLeft, onClick: () => onChange(Math.max(1, page - 1)), disabled: disabled || page === 1, children: "Previous" }),
|
|
4394
4479
|
/* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
4395
|
-
/* @__PURE__ */
|
|
4396
|
-
/* @__PURE__ */
|
|
4397
|
-
/* @__PURE__ */
|
|
4398
|
-
/* @__PURE__ */
|
|
4480
|
+
/* @__PURE__ */ jsx24("span", { children: "Page" }),
|
|
4481
|
+
/* @__PURE__ */ jsx24("span", { className: "font-medium text-foreground", children: page }),
|
|
4482
|
+
/* @__PURE__ */ jsx24("span", { children: "of" }),
|
|
4483
|
+
/* @__PURE__ */ jsx24("span", { className: "font-medium text-foreground", children: totalPages })
|
|
4399
4484
|
] }),
|
|
4400
|
-
/* @__PURE__ */
|
|
4485
|
+
/* @__PURE__ */ jsx24(
|
|
4401
4486
|
Button_default,
|
|
4402
4487
|
{
|
|
4403
4488
|
variant,
|
|
@@ -4421,7 +4506,7 @@ var CompactPagination = ({
|
|
|
4421
4506
|
}) => {
|
|
4422
4507
|
if (totalPages <= 1) return null;
|
|
4423
4508
|
return /* @__PURE__ */ jsxs22("nav", { className: cn("flex items-center gap-1", className), "aria-label": "Compact Pagination", children: [
|
|
4424
|
-
/* @__PURE__ */
|
|
4509
|
+
/* @__PURE__ */ jsx24(
|
|
4425
4510
|
Button_default,
|
|
4426
4511
|
{
|
|
4427
4512
|
variant,
|
|
@@ -4433,7 +4518,7 @@ var CompactPagination = ({
|
|
|
4433
4518
|
"aria-label": "First page"
|
|
4434
4519
|
}
|
|
4435
4520
|
),
|
|
4436
|
-
/* @__PURE__ */
|
|
4521
|
+
/* @__PURE__ */ jsx24(
|
|
4437
4522
|
Button_default,
|
|
4438
4523
|
{
|
|
4439
4524
|
variant,
|
|
@@ -4449,7 +4534,7 @@ var CompactPagination = ({
|
|
|
4449
4534
|
" / ",
|
|
4450
4535
|
totalPages
|
|
4451
4536
|
] }),
|
|
4452
|
-
/* @__PURE__ */
|
|
4537
|
+
/* @__PURE__ */ jsx24(
|
|
4453
4538
|
Button_default,
|
|
4454
4539
|
{
|
|
4455
4540
|
variant,
|
|
@@ -4460,7 +4545,7 @@ var CompactPagination = ({
|
|
|
4460
4545
|
title: "Next page"
|
|
4461
4546
|
}
|
|
4462
4547
|
),
|
|
4463
|
-
/* @__PURE__ */
|
|
4548
|
+
/* @__PURE__ */ jsx24(
|
|
4464
4549
|
Button_default,
|
|
4465
4550
|
{
|
|
4466
4551
|
variant,
|
|
@@ -4476,7 +4561,7 @@ var CompactPagination = ({
|
|
|
4476
4561
|
|
|
4477
4562
|
// ../../components/ui/Section.tsx
|
|
4478
4563
|
import React20 from "react";
|
|
4479
|
-
import { jsx as
|
|
4564
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
4480
4565
|
var Section = React20.forwardRef(
|
|
4481
4566
|
({
|
|
4482
4567
|
children,
|
|
@@ -4499,7 +4584,7 @@ var Section = React20.forwardRef(
|
|
|
4499
4584
|
lg: "py-12",
|
|
4500
4585
|
xl: "py-16"
|
|
4501
4586
|
};
|
|
4502
|
-
return /* @__PURE__ */
|
|
4587
|
+
return /* @__PURE__ */ jsx25(
|
|
4503
4588
|
"section",
|
|
4504
4589
|
{
|
|
4505
4590
|
ref,
|
|
@@ -4521,9 +4606,9 @@ var Section_default = Section;
|
|
|
4521
4606
|
|
|
4522
4607
|
// ../../components/ui/ScrollArea.tsx
|
|
4523
4608
|
import { forwardRef as forwardRef6 } from "react";
|
|
4524
|
-
import { jsx as
|
|
4609
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
4525
4610
|
var ScrollArea = forwardRef6(({ className, children, ...props }, ref) => {
|
|
4526
|
-
return /* @__PURE__ */
|
|
4611
|
+
return /* @__PURE__ */ jsx26("div", { ref, className: cn("relative overflow-hidden bg-background", className), ...props, children: /* @__PURE__ */ jsx26("div", { className: cn("h-full w-full overflow-y-auto scroll-area-viewport"), children }) });
|
|
4527
4612
|
});
|
|
4528
4613
|
ScrollArea.displayName = "ScrollArea";
|
|
4529
4614
|
|
|
@@ -4714,7 +4799,7 @@ function formatDateWithDay(date) {
|
|
|
4714
4799
|
}
|
|
4715
4800
|
|
|
4716
4801
|
// ../../components/ui/DatePicker.tsx
|
|
4717
|
-
import { Fragment as Fragment6, jsx as
|
|
4802
|
+
import { Fragment as Fragment6, jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4718
4803
|
var DatePicker = ({
|
|
4719
4804
|
id,
|
|
4720
4805
|
value,
|
|
@@ -4825,7 +4910,7 @@ var DatePicker = ({
|
|
|
4825
4910
|
const firstDayOfMonth = getFirstDayOfMonth(viewDate);
|
|
4826
4911
|
const days = [];
|
|
4827
4912
|
for (let i = 0; i < firstDayOfMonth; i++) {
|
|
4828
|
-
days.push(/* @__PURE__ */
|
|
4913
|
+
days.push(/* @__PURE__ */ jsx27("div", { className: "w-8 h-8" }, `empty-${i}`));
|
|
4829
4914
|
}
|
|
4830
4915
|
for (let day = 1; day <= daysInMonth; day++) {
|
|
4831
4916
|
const date = new Date(viewDate.getFullYear(), viewDate.getMonth(), day);
|
|
@@ -4834,7 +4919,7 @@ var DatePicker = ({
|
|
|
4834
4919
|
const totalDaysFromStart = firstDayOfMonth + day - 1;
|
|
4835
4920
|
const rowIndex = Math.floor(totalDaysFromStart / 7);
|
|
4836
4921
|
days.push(
|
|
4837
|
-
/* @__PURE__ */
|
|
4922
|
+
/* @__PURE__ */ jsx27(
|
|
4838
4923
|
"button",
|
|
4839
4924
|
{
|
|
4840
4925
|
onClick: () => handleDateSelect(date),
|
|
@@ -4856,7 +4941,7 @@ var DatePicker = ({
|
|
|
4856
4941
|
}
|
|
4857
4942
|
return days;
|
|
4858
4943
|
};
|
|
4859
|
-
const datePickerContent = isOpen && dropdownPosition ? /* @__PURE__ */
|
|
4944
|
+
const datePickerContent = isOpen && dropdownPosition ? /* @__PURE__ */ jsx27(
|
|
4860
4945
|
"div",
|
|
4861
4946
|
{
|
|
4862
4947
|
"data-datepicker": true,
|
|
@@ -4886,13 +4971,13 @@ var DatePicker = ({
|
|
|
4886
4971
|
style: { pointerEvents: "auto" },
|
|
4887
4972
|
children: [
|
|
4888
4973
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between mb-4", children: [
|
|
4889
|
-
/* @__PURE__ */
|
|
4890
|
-
/* @__PURE__ */
|
|
4891
|
-
/* @__PURE__ */
|
|
4974
|
+
/* @__PURE__ */ jsx27(Button_default, { variant: "ghost", size: "sm", onClick: () => navigateMonth("prev"), className: "p-1 h-auto", children: /* @__PURE__ */ jsx27(ChevronLeft2, { className: "h-4 w-4" }) }),
|
|
4975
|
+
/* @__PURE__ */ jsx27("div", { className: "text-sm font-semibold", children: viewDate.toLocaleDateString("en-US", { month: "long", year: "numeric" }) }),
|
|
4976
|
+
/* @__PURE__ */ jsx27(Button_default, { variant: "ghost", size: "sm", onClick: () => navigateMonth("next"), className: "p-1 h-auto", children: /* @__PURE__ */ jsx27(ChevronRight3, { className: "h-4 w-4" }) })
|
|
4892
4977
|
] }),
|
|
4893
|
-
/* @__PURE__ */
|
|
4894
|
-
/* @__PURE__ */
|
|
4895
|
-
/* @__PURE__ */
|
|
4978
|
+
/* @__PURE__ */ jsx27("div", { className: cn("grid grid-cols-7 gap-1", size === "sm" ? "mb-1" : "mb-2"), children: (weekdayLabels || ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]).map((day) => /* @__PURE__ */ jsx27("div", { className: cn("text-muted-foreground text-center font-medium", size === "sm" ? "text-[10px] py-0.5" : "text-xs py-1"), children: day }, day)) }),
|
|
4979
|
+
/* @__PURE__ */ jsx27("div", { className: "grid grid-cols-7 gap-1", children: renderCalendar() }),
|
|
4980
|
+
/* @__PURE__ */ jsx27("div", { className: "flex items-center justify-end mt-2", children: /* @__PURE__ */ jsx27(
|
|
4896
4981
|
Button_default,
|
|
4897
4982
|
{
|
|
4898
4983
|
variant: "outline",
|
|
@@ -4917,7 +5002,7 @@ var DatePicker = ({
|
|
|
4917
5002
|
const radiusClass = size === "sm" ? "rounded-md" : "rounded-lg";
|
|
4918
5003
|
const verticalGap = size === "sm" ? "space-y-1.5" : "space-y-2";
|
|
4919
5004
|
return /* @__PURE__ */ jsxs23("div", { className: cn("w-full group", verticalGap), children: [
|
|
4920
|
-
label && /* @__PURE__ */
|
|
5005
|
+
label && /* @__PURE__ */ jsx27("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxs23(
|
|
4921
5006
|
"label",
|
|
4922
5007
|
{
|
|
4923
5008
|
id: labelId,
|
|
@@ -4929,7 +5014,7 @@ var DatePicker = ({
|
|
|
4929
5014
|
),
|
|
4930
5015
|
children: [
|
|
4931
5016
|
label,
|
|
4932
|
-
required && /* @__PURE__ */
|
|
5017
|
+
required && /* @__PURE__ */ jsx27("span", { className: "text-destructive ml-1", children: "*" })
|
|
4933
5018
|
]
|
|
4934
5019
|
}
|
|
4935
5020
|
) }),
|
|
@@ -4961,8 +5046,8 @@ var DatePicker = ({
|
|
|
4961
5046
|
className
|
|
4962
5047
|
),
|
|
4963
5048
|
children: [
|
|
4964
|
-
/* @__PURE__ */
|
|
4965
|
-
value && /* @__PURE__ */
|
|
5049
|
+
/* @__PURE__ */ jsx27("span", { className: cn("truncate", !value && "text-muted-foreground"), children: value ? formatDateDisplay(value) : placeholder || t("placeholder") }),
|
|
5050
|
+
value && /* @__PURE__ */ jsx27(
|
|
4966
5051
|
"span",
|
|
4967
5052
|
{
|
|
4968
5053
|
role: "button",
|
|
@@ -4984,10 +5069,10 @@ var DatePicker = ({
|
|
|
4984
5069
|
},
|
|
4985
5070
|
className: "absolute right-8 inline-flex items-center justify-center rounded-sm text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",
|
|
4986
5071
|
style: { width: 20, height: 20 },
|
|
4987
|
-
children: /* @__PURE__ */
|
|
5072
|
+
children: /* @__PURE__ */ jsx27(XIcon, { className: "h-3.5 w-3.5" })
|
|
4988
5073
|
}
|
|
4989
5074
|
),
|
|
4990
|
-
/* @__PURE__ */
|
|
5075
|
+
/* @__PURE__ */ jsx27(Calendar, { className: "h-4 w-4 text-muted-foreground ml-2" })
|
|
4991
5076
|
]
|
|
4992
5077
|
}
|
|
4993
5078
|
),
|
|
@@ -5072,7 +5157,7 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
|
|
|
5072
5157
|
const nodes = [];
|
|
5073
5158
|
const daysInMonth = getDaysInMonth(viewDate);
|
|
5074
5159
|
const firstDay = getFirstDayOfMonth(viewDate);
|
|
5075
|
-
for (let i = 0; i < firstDay; i++) nodes.push(/* @__PURE__ */
|
|
5160
|
+
for (let i = 0; i < firstDay; i++) nodes.push(/* @__PURE__ */ jsx27("div", { className: "w-8 h-8" }, `e-${i}`));
|
|
5076
5161
|
for (let d = 1; d <= daysInMonth; d++) {
|
|
5077
5162
|
const date = new Date(viewDate.getFullYear(), viewDate.getMonth(), d);
|
|
5078
5163
|
const isSelectedStart = isSameDay2(date, tempStart);
|
|
@@ -5097,7 +5182,7 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
|
|
|
5097
5182
|
}
|
|
5098
5183
|
}
|
|
5099
5184
|
nodes.push(
|
|
5100
|
-
/* @__PURE__ */
|
|
5185
|
+
/* @__PURE__ */ jsx27(
|
|
5101
5186
|
"button",
|
|
5102
5187
|
{
|
|
5103
5188
|
onClick: () => handleSelect(date),
|
|
@@ -5127,7 +5212,7 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
|
|
|
5127
5212
|
}
|
|
5128
5213
|
return nodes;
|
|
5129
5214
|
};
|
|
5130
|
-
const panel = isOpen && dropdownPosition ? /* @__PURE__ */
|
|
5215
|
+
const panel = isOpen && dropdownPosition ? /* @__PURE__ */ jsx27(
|
|
5131
5216
|
"div",
|
|
5132
5217
|
{
|
|
5133
5218
|
style: { position: "absolute", top: dropdownPosition.top, left: dropdownPosition.left, width: dropdownPosition.width || 256, zIndex: 9999 },
|
|
@@ -5144,30 +5229,30 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
|
|
|
5144
5229
|
className: cn("rounded-md border bg-popover text-popover-foreground shadow-md", "backdrop-blur-sm bg-popover/95 border-border/60 p-4 w-64"),
|
|
5145
5230
|
children: [
|
|
5146
5231
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between mb-3", children: [
|
|
5147
|
-
/* @__PURE__ */
|
|
5232
|
+
/* @__PURE__ */ jsx27(
|
|
5148
5233
|
Button_default,
|
|
5149
5234
|
{
|
|
5150
5235
|
variant: "ghost",
|
|
5151
5236
|
size: "sm",
|
|
5152
5237
|
onClick: () => setViewDate(new Date(viewDate.getFullYear(), viewDate.getMonth() - 1, 1)),
|
|
5153
5238
|
className: "p-1 h-auto",
|
|
5154
|
-
children: /* @__PURE__ */
|
|
5239
|
+
children: /* @__PURE__ */ jsx27(ChevronLeft2, { className: "h-4 w-4" })
|
|
5155
5240
|
}
|
|
5156
5241
|
),
|
|
5157
|
-
/* @__PURE__ */
|
|
5158
|
-
/* @__PURE__ */
|
|
5242
|
+
/* @__PURE__ */ jsx27("div", { className: "text-sm font-semibold", children: viewDate.toLocaleDateString("en-US", { month: "long", year: "numeric" }) }),
|
|
5243
|
+
/* @__PURE__ */ jsx27(
|
|
5159
5244
|
Button_default,
|
|
5160
5245
|
{
|
|
5161
5246
|
variant: "ghost",
|
|
5162
5247
|
size: "sm",
|
|
5163
5248
|
onClick: () => setViewDate(new Date(viewDate.getFullYear(), viewDate.getMonth() + 1, 1)),
|
|
5164
5249
|
className: "p-1 h-auto",
|
|
5165
|
-
children: /* @__PURE__ */
|
|
5250
|
+
children: /* @__PURE__ */ jsx27(ChevronRight3, { className: "h-4 w-4" })
|
|
5166
5251
|
}
|
|
5167
5252
|
)
|
|
5168
5253
|
] }),
|
|
5169
|
-
/* @__PURE__ */
|
|
5170
|
-
/* @__PURE__ */
|
|
5254
|
+
/* @__PURE__ */ jsx27("div", { className: "grid grid-cols-7 gap-1 mb-2", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((d) => /* @__PURE__ */ jsx27("div", { className: "text-xs text-muted-foreground text-center py-1 font-medium", children: d }, d)) }),
|
|
5255
|
+
/* @__PURE__ */ jsx27("div", { className: "grid grid-cols-7", children: renderGrid() })
|
|
5171
5256
|
]
|
|
5172
5257
|
}
|
|
5173
5258
|
)
|
|
@@ -5195,8 +5280,8 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
|
|
|
5195
5280
|
className
|
|
5196
5281
|
),
|
|
5197
5282
|
children: [
|
|
5198
|
-
/* @__PURE__ */
|
|
5199
|
-
/* @__PURE__ */
|
|
5283
|
+
/* @__PURE__ */ jsx27("span", { className: cn("truncate", !tempStart && !tempEnd && "text-muted-foreground"), children: label }),
|
|
5284
|
+
/* @__PURE__ */ jsx27(Calendar, { className: "h-4 w-4 text-muted-foreground ml-2" })
|
|
5200
5285
|
]
|
|
5201
5286
|
}
|
|
5202
5287
|
),
|
|
@@ -5207,7 +5292,7 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
|
|
|
5207
5292
|
// ../../components/ui/TimePicker.tsx
|
|
5208
5293
|
import * as React22 from "react";
|
|
5209
5294
|
import { Clock as Clock2, X as X8, Check as Check4 } from "lucide-react";
|
|
5210
|
-
import { Fragment as Fragment7, jsx as
|
|
5295
|
+
import { Fragment as Fragment7, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5211
5296
|
var pad = (n) => n.toString().padStart(2, "0");
|
|
5212
5297
|
function parseTime(input, fmt = "24", includeSeconds) {
|
|
5213
5298
|
if (!input) return null;
|
|
@@ -5475,16 +5560,16 @@ function TimePicker({
|
|
|
5475
5560
|
),
|
|
5476
5561
|
children: [
|
|
5477
5562
|
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2", children: [
|
|
5478
|
-
/* @__PURE__ */
|
|
5479
|
-
/* @__PURE__ */
|
|
5563
|
+
/* @__PURE__ */ jsx28(Clock2, { className: cn(sz.icon, error ? "text-destructive" : success ? "text-green-500" : "text-muted-foreground") }),
|
|
5564
|
+
/* @__PURE__ */ jsx28("span", { className: cn("truncate", !value && !defaultValue && "text-muted-foreground"), children: value || defaultValue ? display : placeholder })
|
|
5480
5565
|
] }),
|
|
5481
|
-
/* @__PURE__ */
|
|
5566
|
+
/* @__PURE__ */ jsx28("span", { className: cn("ml-2 transition-transform duration-200", open && "rotate-180"), children: /* @__PURE__ */ jsx28("svg", { className: sz.icon, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx28("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) })
|
|
5482
5567
|
]
|
|
5483
5568
|
}
|
|
5484
5569
|
);
|
|
5485
5570
|
const contentWidth = variant === "compact" ? 240 : variant === "inline" ? 320 : includeSeconds ? 340 : 300;
|
|
5486
5571
|
const timePickerContent = /* @__PURE__ */ jsxs24("div", { className: "space-y-3", children: [
|
|
5487
|
-
allowManualInput && /* @__PURE__ */
|
|
5572
|
+
allowManualInput && /* @__PURE__ */ jsx28("div", { children: /* @__PURE__ */ jsx28(
|
|
5488
5573
|
Input_default,
|
|
5489
5574
|
{
|
|
5490
5575
|
placeholder: format === "12" ? "02:30 PM" : "14:30",
|
|
@@ -5494,7 +5579,7 @@ function TimePicker({
|
|
|
5494
5579
|
variant: "outlined"
|
|
5495
5580
|
}
|
|
5496
5581
|
) }),
|
|
5497
|
-
showPresets && /* @__PURE__ */
|
|
5582
|
+
showPresets && /* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-2", children: Object.keys(PRESETS).map((preset) => /* @__PURE__ */ jsx28(
|
|
5498
5583
|
"button",
|
|
5499
5584
|
{
|
|
5500
5585
|
type: "button",
|
|
@@ -5508,7 +5593,7 @@ function TimePicker({
|
|
|
5508
5593
|
},
|
|
5509
5594
|
preset
|
|
5510
5595
|
)) }),
|
|
5511
|
-
customPresets && customPresets.length > 0 && /* @__PURE__ */
|
|
5596
|
+
customPresets && customPresets.length > 0 && /* @__PURE__ */ jsx28("div", { className: "grid grid-cols-2 gap-2", children: customPresets.map((preset, idx) => /* @__PURE__ */ jsx28(
|
|
5512
5597
|
"button",
|
|
5513
5598
|
{
|
|
5514
5599
|
type: "button",
|
|
@@ -5524,8 +5609,8 @@ function TimePicker({
|
|
|
5524
5609
|
)) }),
|
|
5525
5610
|
/* @__PURE__ */ jsxs24("div", { className: "flex gap-3", children: [
|
|
5526
5611
|
/* @__PURE__ */ jsxs24("div", { className: "flex-1 min-w-[70px]", children: [
|
|
5527
|
-
/* @__PURE__ */
|
|
5528
|
-
/* @__PURE__ */
|
|
5612
|
+
/* @__PURE__ */ jsx28("div", { className: "text-xs font-semibold text-muted-foreground mb-2 text-center", children: "Hour" }),
|
|
5613
|
+
/* @__PURE__ */ jsx28(
|
|
5529
5614
|
"div",
|
|
5530
5615
|
{
|
|
5531
5616
|
ref: hourScrollRef,
|
|
@@ -5537,7 +5622,7 @@ function TimePicker({
|
|
|
5537
5622
|
onFocus: () => setFocusedColumn("hour"),
|
|
5538
5623
|
children: hours.map((h) => {
|
|
5539
5624
|
const isSelected = format === "24" && parts.h === h || format === "12" && (parts.h % 12 || 12) === (h % 12 || 12);
|
|
5540
|
-
return /* @__PURE__ */
|
|
5625
|
+
return /* @__PURE__ */ jsx28(
|
|
5541
5626
|
"button",
|
|
5542
5627
|
{
|
|
5543
5628
|
type: "button",
|
|
@@ -5564,10 +5649,10 @@ function TimePicker({
|
|
|
5564
5649
|
}
|
|
5565
5650
|
)
|
|
5566
5651
|
] }),
|
|
5567
|
-
/* @__PURE__ */
|
|
5652
|
+
/* @__PURE__ */ jsx28("div", { className: "w-px bg-border/50 self-stretch my-8" }),
|
|
5568
5653
|
/* @__PURE__ */ jsxs24("div", { className: "flex-1 min-w-[70px]", children: [
|
|
5569
|
-
/* @__PURE__ */
|
|
5570
|
-
/* @__PURE__ */
|
|
5654
|
+
/* @__PURE__ */ jsx28("div", { className: "text-xs font-semibold text-muted-foreground mb-2 text-center", children: "Min" }),
|
|
5655
|
+
/* @__PURE__ */ jsx28(
|
|
5571
5656
|
"div",
|
|
5572
5657
|
{
|
|
5573
5658
|
ref: minuteScrollRef,
|
|
@@ -5579,7 +5664,7 @@ function TimePicker({
|
|
|
5579
5664
|
onFocus: () => setFocusedColumn("minute"),
|
|
5580
5665
|
children: minutes.map((m) => {
|
|
5581
5666
|
const isSelected = parts.m === m;
|
|
5582
|
-
return /* @__PURE__ */
|
|
5667
|
+
return /* @__PURE__ */ jsx28(
|
|
5583
5668
|
"button",
|
|
5584
5669
|
{
|
|
5585
5670
|
type: "button",
|
|
@@ -5605,11 +5690,11 @@ function TimePicker({
|
|
|
5605
5690
|
}
|
|
5606
5691
|
)
|
|
5607
5692
|
] }),
|
|
5608
|
-
/* @__PURE__ */
|
|
5693
|
+
/* @__PURE__ */ jsx28("div", { className: "w-px bg-border/50 self-stretch my-8" }),
|
|
5609
5694
|
includeSeconds && /* @__PURE__ */ jsxs24(Fragment7, { children: [
|
|
5610
5695
|
/* @__PURE__ */ jsxs24("div", { className: "flex-1 min-w-[70px]", children: [
|
|
5611
|
-
/* @__PURE__ */
|
|
5612
|
-
/* @__PURE__ */
|
|
5696
|
+
/* @__PURE__ */ jsx28("div", { className: "text-xs font-semibold text-muted-foreground mb-2 text-center", children: "Sec" }),
|
|
5697
|
+
/* @__PURE__ */ jsx28(
|
|
5613
5698
|
"div",
|
|
5614
5699
|
{
|
|
5615
5700
|
ref: secondScrollRef,
|
|
@@ -5621,7 +5706,7 @@ function TimePicker({
|
|
|
5621
5706
|
onFocus: () => setFocusedColumn("second"),
|
|
5622
5707
|
children: seconds.map((s) => {
|
|
5623
5708
|
const isSelected = parts.s === s;
|
|
5624
|
-
return /* @__PURE__ */
|
|
5709
|
+
return /* @__PURE__ */ jsx28(
|
|
5625
5710
|
"button",
|
|
5626
5711
|
{
|
|
5627
5712
|
type: "button",
|
|
@@ -5647,11 +5732,11 @@ function TimePicker({
|
|
|
5647
5732
|
}
|
|
5648
5733
|
)
|
|
5649
5734
|
] }),
|
|
5650
|
-
/* @__PURE__ */
|
|
5735
|
+
/* @__PURE__ */ jsx28("div", { className: "w-px bg-border/50 self-stretch my-8" })
|
|
5651
5736
|
] }),
|
|
5652
5737
|
format === "12" && /* @__PURE__ */ jsxs24("div", { className: "w-20", children: [
|
|
5653
|
-
/* @__PURE__ */
|
|
5654
|
-
/* @__PURE__ */
|
|
5738
|
+
/* @__PURE__ */ jsx28("div", { className: "text-xs font-semibold text-muted-foreground mb-2 text-center", children: "Period" }),
|
|
5739
|
+
/* @__PURE__ */ jsx28(
|
|
5655
5740
|
"div",
|
|
5656
5741
|
{
|
|
5657
5742
|
className: "flex flex-col gap-2",
|
|
@@ -5662,7 +5747,7 @@ function TimePicker({
|
|
|
5662
5747
|
onFocus: () => setFocusedColumn("period"),
|
|
5663
5748
|
children: ["AM", "PM"].map((p) => {
|
|
5664
5749
|
const isSelected = parts.p === p;
|
|
5665
|
-
return /* @__PURE__ */
|
|
5750
|
+
return /* @__PURE__ */ jsx28(
|
|
5666
5751
|
"button",
|
|
5667
5752
|
{
|
|
5668
5753
|
type: "button",
|
|
@@ -5708,12 +5793,12 @@ function TimePicker({
|
|
|
5708
5793
|
},
|
|
5709
5794
|
"aria-label": "Set current time",
|
|
5710
5795
|
children: [
|
|
5711
|
-
/* @__PURE__ */
|
|
5796
|
+
/* @__PURE__ */ jsx28(Clock2, { className: "w-3.5 h-3.5" }),
|
|
5712
5797
|
"Now"
|
|
5713
5798
|
]
|
|
5714
5799
|
}
|
|
5715
5800
|
),
|
|
5716
|
-
/* @__PURE__ */
|
|
5801
|
+
/* @__PURE__ */ jsx28("div", { className: "flex-1" }),
|
|
5717
5802
|
clearable && /* @__PURE__ */ jsxs24(
|
|
5718
5803
|
"button",
|
|
5719
5804
|
{
|
|
@@ -5729,7 +5814,7 @@ function TimePicker({
|
|
|
5729
5814
|
},
|
|
5730
5815
|
"aria-label": "Clear selected time",
|
|
5731
5816
|
children: [
|
|
5732
|
-
/* @__PURE__ */
|
|
5817
|
+
/* @__PURE__ */ jsx28(X8, { className: "w-3.5 h-3.5" }),
|
|
5733
5818
|
"Clear"
|
|
5734
5819
|
]
|
|
5735
5820
|
}
|
|
@@ -5738,26 +5823,26 @@ function TimePicker({
|
|
|
5738
5823
|
] });
|
|
5739
5824
|
if (variant === "inline") {
|
|
5740
5825
|
return /* @__PURE__ */ jsxs24("div", { className: "w-full", ...rest, children: [
|
|
5741
|
-
label && /* @__PURE__ */
|
|
5826
|
+
label && /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-between mb-2", children: /* @__PURE__ */ jsxs24("label", { className: cn(sz.label, "font-medium", disabled ? "text-muted-foreground" : "text-foreground"), children: [
|
|
5742
5827
|
label,
|
|
5743
|
-
required && /* @__PURE__ */
|
|
5828
|
+
required && /* @__PURE__ */ jsx28("span", { className: "text-destructive ml-1", children: "*" })
|
|
5744
5829
|
] }) }),
|
|
5745
|
-
/* @__PURE__ */
|
|
5830
|
+
/* @__PURE__ */ jsx28("div", { className: cn("p-3 rounded-lg border border-border bg-card shadow-sm", className), children: timePickerContent })
|
|
5746
5831
|
] });
|
|
5747
5832
|
}
|
|
5748
5833
|
return /* @__PURE__ */ jsxs24("div", { className: "w-full", ...rest, children: [
|
|
5749
|
-
label && /* @__PURE__ */
|
|
5834
|
+
label && /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-between mb-1.5", children: /* @__PURE__ */ jsxs24(
|
|
5750
5835
|
"label",
|
|
5751
5836
|
{
|
|
5752
5837
|
className: cn(sz.label, "font-medium", disabled ? "text-muted-foreground" : "text-foreground", "cursor-pointer"),
|
|
5753
5838
|
onClick: () => !disabled && handleOpenChange(true),
|
|
5754
5839
|
children: [
|
|
5755
5840
|
label,
|
|
5756
|
-
required && /* @__PURE__ */
|
|
5841
|
+
required && /* @__PURE__ */ jsx28("span", { className: "text-destructive ml-1", children: "*" })
|
|
5757
5842
|
]
|
|
5758
5843
|
}
|
|
5759
5844
|
) }),
|
|
5760
|
-
/* @__PURE__ */
|
|
5845
|
+
/* @__PURE__ */ jsx28(
|
|
5761
5846
|
Popover,
|
|
5762
5847
|
{
|
|
5763
5848
|
trigger,
|
|
@@ -5778,14 +5863,14 @@ function TimePicker({
|
|
|
5778
5863
|
),
|
|
5779
5864
|
(error || success || helperText) && /* @__PURE__ */ jsxs24("div", { className: cn("mt-1.5 flex items-start gap-1.5", sz.label), children: [
|
|
5780
5865
|
error && /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-1.5 text-destructive", children: [
|
|
5781
|
-
/* @__PURE__ */
|
|
5782
|
-
/* @__PURE__ */
|
|
5866
|
+
/* @__PURE__ */ jsx28(X8, { className: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
5867
|
+
/* @__PURE__ */ jsx28("span", { children: error })
|
|
5783
5868
|
] }),
|
|
5784
5869
|
success && !error && /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-1.5 text-green-600", children: [
|
|
5785
|
-
/* @__PURE__ */
|
|
5786
|
-
/* @__PURE__ */
|
|
5870
|
+
/* @__PURE__ */ jsx28(Check4, { className: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
5871
|
+
/* @__PURE__ */ jsx28("span", { children: "Valid time selected" })
|
|
5787
5872
|
] }),
|
|
5788
|
-
helperText && !error && !success && /* @__PURE__ */
|
|
5873
|
+
helperText && !error && !success && /* @__PURE__ */ jsx28("span", { className: "text-muted-foreground", children: helperText })
|
|
5789
5874
|
] })
|
|
5790
5875
|
] });
|
|
5791
5876
|
}
|
|
@@ -5793,7 +5878,7 @@ function TimePicker({
|
|
|
5793
5878
|
// ../../components/ui/Calendar.tsx
|
|
5794
5879
|
import * as React23 from "react";
|
|
5795
5880
|
import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight4 } from "lucide-react";
|
|
5796
|
-
import { Fragment as Fragment9, jsx as
|
|
5881
|
+
import { Fragment as Fragment9, jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5797
5882
|
function startOfMonth(d) {
|
|
5798
5883
|
return new Date(d.getFullYear(), d.getMonth(), 1);
|
|
5799
5884
|
}
|
|
@@ -5975,9 +6060,9 @@ function Calendar2({
|
|
|
5975
6060
|
const monthDays = getMonthGrid(monthDate, weekStartsOn);
|
|
5976
6061
|
const monthLabel = labels?.month ? labels.month(monthDate) : monthDate.toLocaleDateString("en-US", { month: "long", year: "numeric" });
|
|
5977
6062
|
return /* @__PURE__ */ jsxs25("div", { children: [
|
|
5978
|
-
months > 1 && /* @__PURE__ */
|
|
5979
|
-
showWeekdays && /* @__PURE__ */
|
|
5980
|
-
/* @__PURE__ */
|
|
6063
|
+
months > 1 && /* @__PURE__ */ jsx29("div", { className: "flex items-center justify-center mb-2 text-sm font-semibold", children: monthLabel }),
|
|
6064
|
+
showWeekdays && /* @__PURE__ */ jsx29("div", { className: cn("grid grid-cols-7", sz.grid, "mb-1 text-center text-muted-foreground font-medium"), children: weekdays.map((w) => /* @__PURE__ */ jsx29("div", { className: cn(sz.head), children: w }, `${monthLabel}-${w}`)) }),
|
|
6065
|
+
/* @__PURE__ */ jsx29("div", { className: cn("grid grid-cols-7", sz.grid), children: monthDays.map((d, idx) => {
|
|
5981
6066
|
const inMonth = d.getMonth() === monthDate.getMonth();
|
|
5982
6067
|
const isToday2 = isSameDay(d, today);
|
|
5983
6068
|
const selectedDay = isSelected(d);
|
|
@@ -6001,7 +6086,7 @@ function Calendar2({
|
|
|
6001
6086
|
title: d.toDateString(),
|
|
6002
6087
|
children: [
|
|
6003
6088
|
d.getDate(),
|
|
6004
|
-
dayEvents.length > 0 && /* @__PURE__ */
|
|
6089
|
+
dayEvents.length > 0 && /* @__PURE__ */ jsx29("span", { className: "absolute -bottom-1 inline-flex gap-0.5", children: dayEvents.slice(0, 3).map((e, i) => /* @__PURE__ */ jsx29("span", { className: "h-1.5 w-1.5 rounded-full", style: { backgroundColor: e.color || "hsl(var(--primary))" } }, i)) })
|
|
6005
6090
|
]
|
|
6006
6091
|
},
|
|
6007
6092
|
`${monthLabel}-${idx}`
|
|
@@ -6033,13 +6118,13 @@ function Calendar2({
|
|
|
6033
6118
|
}, [display, view, weekStartsOn, maxBound]);
|
|
6034
6119
|
return /* @__PURE__ */ jsxs25("div", { className: cn("w-full", className), ...rest, children: [
|
|
6035
6120
|
showHeader && /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between mb-2", children: [
|
|
6036
|
-
/* @__PURE__ */
|
|
6037
|
-
/* @__PURE__ */
|
|
6038
|
-
/* @__PURE__ */
|
|
6121
|
+
/* @__PURE__ */ jsx29("button", { onClick: () => goByView(-1), disabled: prevDisabled, className: cn("p-1 rounded-md hover:bg-accent", prevDisabled && "opacity-40 cursor-not-allowed hover:bg-transparent"), "aria-label": labels?.prev || (display === "week" ? "Previous week" : "Previous month"), children: /* @__PURE__ */ jsx29(ChevronLeft3, { className: "h-4 w-4" }) }),
|
|
6122
|
+
/* @__PURE__ */ jsx29("div", { className: "text-sm font-semibold", children: display === "week" ? `${labels?.month ? labels.month(weekDays[0]) : weekDays[0].toLocaleDateString("en-US", { month: "short" })} ${weekDays[0].getDate()} \u2013 ${labels?.month ? labels.month(weekDays[6]) : weekDays[6].toLocaleDateString("en-US", { month: "short" })} ${weekDays[6].getDate()}` : labels?.month ? labels.month(view) : view.toLocaleDateString("en-US", { month: "long", year: "numeric" }) }),
|
|
6123
|
+
/* @__PURE__ */ jsx29("button", { onClick: () => goByView(1), disabled: nextDisabled, className: cn("p-1 rounded-md hover:bg-accent", nextDisabled && "opacity-40 cursor-not-allowed hover:bg-transparent"), "aria-label": labels?.next || (display === "week" ? "Next week" : "Next month"), children: /* @__PURE__ */ jsx29(ChevronRight4, { className: "h-4 w-4" }) })
|
|
6039
6124
|
] }),
|
|
6040
6125
|
display === "week" ? /* @__PURE__ */ jsxs25(Fragment9, { children: [
|
|
6041
|
-
showWeekdays && /* @__PURE__ */
|
|
6042
|
-
/* @__PURE__ */
|
|
6126
|
+
showWeekdays && /* @__PURE__ */ jsx29("div", { className: cn("grid grid-cols-7", sz.grid, "mb-1 text-center text-muted-foreground font-medium"), children: weekdays.map((w) => /* @__PURE__ */ jsx29("div", { className: cn(sz.head), children: w }, `w-${w}`)) }),
|
|
6127
|
+
/* @__PURE__ */ jsx29("div", { className: cn("grid grid-cols-7", sz.grid), children: weekDays.map((d, idx) => {
|
|
6043
6128
|
const inMonth = true;
|
|
6044
6129
|
const isToday2 = isSameDay(d, today);
|
|
6045
6130
|
const selectedDay = isSelected(d);
|
|
@@ -6062,13 +6147,13 @@ function Calendar2({
|
|
|
6062
6147
|
title: d.toDateString(),
|
|
6063
6148
|
children: [
|
|
6064
6149
|
d.getDate(),
|
|
6065
|
-
dayEvents.length > 0 && /* @__PURE__ */
|
|
6150
|
+
dayEvents.length > 0 && /* @__PURE__ */ jsx29("span", { className: "absolute -bottom-1 inline-flex gap-0.5", children: dayEvents.slice(0, 3).map((e, i) => /* @__PURE__ */ jsx29("span", { className: "h-1.5 w-1.5 rounded-full", style: { backgroundColor: e.color || "hsl(var(--primary))" } }, i)) })
|
|
6066
6151
|
]
|
|
6067
6152
|
},
|
|
6068
6153
|
`wd-${idx}`
|
|
6069
6154
|
);
|
|
6070
6155
|
}) })
|
|
6071
|
-
] }) : /* @__PURE__ */
|
|
6156
|
+
] }) : /* @__PURE__ */ jsx29("div", { className: cn(months > 1 ? "grid md:grid-cols-2 lg:grid-cols-3 gap-4" : ""), children: Array.from({ length: Math.max(1, months) }, (_, i) => /* @__PURE__ */ jsx29(React23.Fragment, { children: renderMonth(addMonths(view, i)) }, `cal-month-${view.getFullYear()}-${view.getMonth()}-${i}`)) })
|
|
6072
6157
|
] });
|
|
6073
6158
|
}
|
|
6074
6159
|
|
|
@@ -6077,7 +6162,7 @@ import * as React24 from "react";
|
|
|
6077
6162
|
import { useId as useId4 } from "react";
|
|
6078
6163
|
import { createPortal as createPortal8 } from "react-dom";
|
|
6079
6164
|
import { ChevronDown as ChevronDown2, Search as Search3, Check as Check5, SearchX as SearchX2, Loader2 as Loader23 } from "lucide-react";
|
|
6080
|
-
import { jsx as
|
|
6165
|
+
import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6081
6166
|
var MultiCombobox = ({
|
|
6082
6167
|
id,
|
|
6083
6168
|
options,
|
|
@@ -6223,7 +6308,7 @@ var MultiCombobox = ({
|
|
|
6223
6308
|
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
6224
6309
|
const labelSize = size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm";
|
|
6225
6310
|
return /* @__PURE__ */ jsxs26("div", { className: cn("w-full space-y-2 group", className), children: [
|
|
6226
|
-
title && /* @__PURE__ */
|
|
6311
|
+
title && /* @__PURE__ */ jsx30("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxs26(
|
|
6227
6312
|
"label",
|
|
6228
6313
|
{
|
|
6229
6314
|
className: cn(
|
|
@@ -6233,7 +6318,7 @@ var MultiCombobox = ({
|
|
|
6233
6318
|
),
|
|
6234
6319
|
children: [
|
|
6235
6320
|
title,
|
|
6236
|
-
required && /* @__PURE__ */
|
|
6321
|
+
required && /* @__PURE__ */ jsx30("span", { className: "text-destructive ml-1", children: "*" })
|
|
6237
6322
|
]
|
|
6238
6323
|
}
|
|
6239
6324
|
) }),
|
|
@@ -6249,11 +6334,11 @@ var MultiCombobox = ({
|
|
|
6249
6334
|
),
|
|
6250
6335
|
children: [
|
|
6251
6336
|
label,
|
|
6252
|
-
required && /* @__PURE__ */
|
|
6337
|
+
required && /* @__PURE__ */ jsx30("span", { className: "text-destructive ml-1", children: "*" })
|
|
6253
6338
|
]
|
|
6254
6339
|
}
|
|
6255
6340
|
),
|
|
6256
|
-
/* @__PURE__ */
|
|
6341
|
+
/* @__PURE__ */ jsx30("div", { className: "relative w-full" }),
|
|
6257
6342
|
/* @__PURE__ */ jsxs26(
|
|
6258
6343
|
"button",
|
|
6259
6344
|
{
|
|
@@ -6277,11 +6362,11 @@ var MultiCombobox = ({
|
|
|
6277
6362
|
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
6278
6363
|
),
|
|
6279
6364
|
children: [
|
|
6280
|
-
/* @__PURE__ */
|
|
6365
|
+
/* @__PURE__ */ jsx30("div", { className: "flex items-center gap-1 flex-wrap min-h-[1.5rem] flex-1", children: value.length > 0 ? showTags ? value.map((itemValue) => {
|
|
6281
6366
|
const option = normalizedOptions.find((o) => o.value === itemValue);
|
|
6282
6367
|
return /* @__PURE__ */ jsxs26("span", { className: "inline-flex items-center gap-1 bg-accent text-accent-foreground rounded px-2 py-1 text-xs", children: [
|
|
6283
|
-
/* @__PURE__ */
|
|
6284
|
-
/* @__PURE__ */
|
|
6368
|
+
/* @__PURE__ */ jsx30("span", { className: "truncate max-w-[120px]", children: option ? displayFormat(option) : itemValue }),
|
|
6369
|
+
/* @__PURE__ */ jsx30(
|
|
6285
6370
|
"span",
|
|
6286
6371
|
{
|
|
6287
6372
|
role: "button",
|
|
@@ -6307,8 +6392,8 @@ var MultiCombobox = ({
|
|
|
6307
6392
|
}) : /* @__PURE__ */ jsxs26("span", { className: "truncate text-sm", children: [
|
|
6308
6393
|
value.length,
|
|
6309
6394
|
" selected"
|
|
6310
|
-
] }) : /* @__PURE__ */
|
|
6311
|
-
/* @__PURE__ */
|
|
6395
|
+
] }) : /* @__PURE__ */ jsx30("span", { className: "text-muted-foreground", children: placeholder || "Select..." }) }),
|
|
6396
|
+
/* @__PURE__ */ jsx30(
|
|
6312
6397
|
ChevronDown2,
|
|
6313
6398
|
{
|
|
6314
6399
|
className: cn("opacity-50 transition-all duration-200", sizeStyles8[size].icon, open && "rotate-180 scale-110 text-primary opacity-100")
|
|
@@ -6318,30 +6403,27 @@ var MultiCombobox = ({
|
|
|
6318
6403
|
}
|
|
6319
6404
|
),
|
|
6320
6405
|
open && dropdownPosition && typeof window !== "undefined" ? createPortal8(
|
|
6321
|
-
/* @__PURE__ */
|
|
6406
|
+
/* @__PURE__ */ jsx30(
|
|
6322
6407
|
"div",
|
|
6323
6408
|
{
|
|
6324
6409
|
ref: dropdownRef,
|
|
6325
|
-
"data-dropdown":
|
|
6410
|
+
"data-combobox-dropdown": true,
|
|
6326
6411
|
style: {
|
|
6327
6412
|
position: "absolute",
|
|
6328
6413
|
top: dropdownPosition?.top || 0,
|
|
6329
6414
|
left: dropdownPosition?.left || 0,
|
|
6330
6415
|
width: dropdownPosition?.width || 200,
|
|
6331
|
-
zIndex: 9999
|
|
6416
|
+
zIndex: 9999,
|
|
6417
|
+
transformOrigin: "top center"
|
|
6332
6418
|
},
|
|
6333
6419
|
"data-state": open ? "open" : "closed",
|
|
6334
|
-
className:
|
|
6335
|
-
"z-[9999]",
|
|
6336
|
-
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
6337
|
-
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"
|
|
6338
|
-
),
|
|
6420
|
+
className: "z-9999",
|
|
6339
6421
|
children: /* @__PURE__ */ jsxs26(
|
|
6340
6422
|
"div",
|
|
6341
6423
|
{
|
|
6342
6424
|
className: cn("rounded-md border bg-popover text-popover-foreground shadow-md", "backdrop-blur-sm bg-popover/95 border-border/60"),
|
|
6343
6425
|
children: [
|
|
6344
|
-
showClear && value.length > 0 && /* @__PURE__ */
|
|
6426
|
+
showClear && value.length > 0 && /* @__PURE__ */ jsx30("div", { className: "px-3 py-2 border-b border-border/60 flex justify-end", children: /* @__PURE__ */ jsx30(
|
|
6345
6427
|
"button",
|
|
6346
6428
|
{
|
|
6347
6429
|
type: "button",
|
|
@@ -6355,8 +6437,8 @@ var MultiCombobox = ({
|
|
|
6355
6437
|
}
|
|
6356
6438
|
) }),
|
|
6357
6439
|
enableSearch && /* @__PURE__ */ jsxs26("div", { className: "relative border-b border-border/60", children: [
|
|
6358
|
-
/* @__PURE__ */
|
|
6359
|
-
/* @__PURE__ */
|
|
6440
|
+
/* @__PURE__ */ jsx30(Search3, { className: cn("absolute left-2 top-2.5 text-muted-foreground", sizeStyles8[size].icon) }),
|
|
6441
|
+
/* @__PURE__ */ jsx30(
|
|
6360
6442
|
"input",
|
|
6361
6443
|
{
|
|
6362
6444
|
ref: inputRef,
|
|
@@ -6371,9 +6453,9 @@ var MultiCombobox = ({
|
|
|
6371
6453
|
}
|
|
6372
6454
|
)
|
|
6373
6455
|
] }),
|
|
6374
|
-
/* @__PURE__ */
|
|
6375
|
-
/* @__PURE__ */
|
|
6376
|
-
/* @__PURE__ */
|
|
6456
|
+
/* @__PURE__ */ jsx30("ul", { className: cn("max-h-60 overflow-y-auto p-1", size === "lg" ? "text-base" : size === "sm" ? "text-xs" : "text-sm"), children: loading2 ? /* @__PURE__ */ jsx30("li", { className: "px-3 py-8 text-center", children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
6457
|
+
/* @__PURE__ */ jsx30(Loader23, { className: "h-6 w-6 animate-spin text-primary" }),
|
|
6458
|
+
/* @__PURE__ */ jsx30("span", { className: "text-muted-foreground", children: loadingText })
|
|
6377
6459
|
] }) }) : filtered.length ? filtered.map((item, index) => {
|
|
6378
6460
|
const isSelected = value.includes(item.value);
|
|
6379
6461
|
const isDisabled = disabledOptions.includes(item.value);
|
|
@@ -6390,7 +6472,7 @@ var MultiCombobox = ({
|
|
|
6390
6472
|
inputRef.current?.focus();
|
|
6391
6473
|
},
|
|
6392
6474
|
style: {
|
|
6393
|
-
animationDelay: open ? `${index *
|
|
6475
|
+
animationDelay: open ? `${Math.min(index * 20, 200)}ms` : "0ms"
|
|
6394
6476
|
},
|
|
6395
6477
|
className: cn(
|
|
6396
6478
|
"dropdown-item flex cursor-pointer items-center justify-between rounded-sm transition-colors",
|
|
@@ -6401,12 +6483,12 @@ var MultiCombobox = ({
|
|
|
6401
6483
|
),
|
|
6402
6484
|
children: [
|
|
6403
6485
|
item.label,
|
|
6404
|
-
isSelected && /* @__PURE__ */
|
|
6486
|
+
isSelected && /* @__PURE__ */ jsx30(Check5, { className: sizeStyles8[size].icon })
|
|
6405
6487
|
]
|
|
6406
6488
|
},
|
|
6407
6489
|
item.value
|
|
6408
6490
|
);
|
|
6409
|
-
}) : /* @__PURE__ */
|
|
6491
|
+
}) : /* @__PURE__ */ jsx30(
|
|
6410
6492
|
"li",
|
|
6411
6493
|
{
|
|
6412
6494
|
className: cn(
|
|
@@ -6414,9 +6496,9 @@ var MultiCombobox = ({
|
|
|
6414
6496
|
size === "lg" ? "text-base" : size === "sm" ? "text-xs" : "text-sm"
|
|
6415
6497
|
),
|
|
6416
6498
|
children: /* @__PURE__ */ jsxs26("div", { className: "flex flex-col items-center gap-2 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
6417
|
-
/* @__PURE__ */
|
|
6418
|
-
/* @__PURE__ */
|
|
6419
|
-
query && /* @__PURE__ */
|
|
6499
|
+
/* @__PURE__ */ jsx30(SearchX2, { className: "h-8 w-8 opacity-40 text-muted-foreground" }),
|
|
6500
|
+
/* @__PURE__ */ jsx30("span", { children: emptyText }),
|
|
6501
|
+
query && /* @__PURE__ */ jsx30("button", { type: "button", onClick: () => setQuery(""), className: "text-xs text-primary hover:underline", children: "Clear search" })
|
|
6420
6502
|
] })
|
|
6421
6503
|
}
|
|
6422
6504
|
) })
|
|
@@ -6432,7 +6514,7 @@ var MultiCombobox = ({
|
|
|
6432
6514
|
|
|
6433
6515
|
// ../../components/ui/RadioGroup.tsx
|
|
6434
6516
|
import * as React25 from "react";
|
|
6435
|
-
import { jsx as
|
|
6517
|
+
import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6436
6518
|
var RadioGroupContext = React25.createContext(void 0);
|
|
6437
6519
|
var useRadioGroup = () => {
|
|
6438
6520
|
const context = React25.useContext(RadioGroupContext);
|
|
@@ -6470,7 +6552,7 @@ var RadioGroup = React25.forwardRef(
|
|
|
6470
6552
|
};
|
|
6471
6553
|
const uniqueId = React25.useId();
|
|
6472
6554
|
const radioName = name || `radio-group-${uniqueId}`;
|
|
6473
|
-
return /* @__PURE__ */
|
|
6555
|
+
return /* @__PURE__ */ jsx31(
|
|
6474
6556
|
RadioGroupContext.Provider,
|
|
6475
6557
|
{
|
|
6476
6558
|
value: {
|
|
@@ -6482,7 +6564,7 @@ var RadioGroup = React25.forwardRef(
|
|
|
6482
6564
|
variant
|
|
6483
6565
|
},
|
|
6484
6566
|
children: /* @__PURE__ */ jsxs27("div", { className: "space-y-2", children: [
|
|
6485
|
-
/* @__PURE__ */
|
|
6567
|
+
/* @__PURE__ */ jsx31(
|
|
6486
6568
|
"div",
|
|
6487
6569
|
{
|
|
6488
6570
|
ref,
|
|
@@ -6499,7 +6581,7 @@ var RadioGroup = React25.forwardRef(
|
|
|
6499
6581
|
children
|
|
6500
6582
|
}
|
|
6501
6583
|
),
|
|
6502
|
-
error && errorMessage && /* @__PURE__ */
|
|
6584
|
+
error && errorMessage && /* @__PURE__ */ jsx31("p", { className: "text-sm text-destructive mt-1", children: errorMessage })
|
|
6503
6585
|
] })
|
|
6504
6586
|
}
|
|
6505
6587
|
);
|
|
@@ -6554,7 +6636,7 @@ var RadioGroupItem = React25.forwardRef(
|
|
|
6554
6636
|
),
|
|
6555
6637
|
children: [
|
|
6556
6638
|
/* @__PURE__ */ jsxs27("div", { className: "flex items-start gap-3", children: [
|
|
6557
|
-
/* @__PURE__ */
|
|
6639
|
+
/* @__PURE__ */ jsx31(
|
|
6558
6640
|
"button",
|
|
6559
6641
|
{
|
|
6560
6642
|
ref,
|
|
@@ -6573,22 +6655,22 @@ var RadioGroupItem = React25.forwardRef(
|
|
|
6573
6655
|
sizeStyles7[size].radio
|
|
6574
6656
|
),
|
|
6575
6657
|
onClick: () => onValueChange?.(value),
|
|
6576
|
-
children: /* @__PURE__ */
|
|
6658
|
+
children: /* @__PURE__ */ jsx31(
|
|
6577
6659
|
"span",
|
|
6578
6660
|
{
|
|
6579
6661
|
className: cn(
|
|
6580
6662
|
"flex items-center justify-center w-full h-full rounded-full transition-all duration-200",
|
|
6581
6663
|
isSelected && "bg-primary"
|
|
6582
6664
|
),
|
|
6583
|
-
children: isSelected && /* @__PURE__ */
|
|
6665
|
+
children: isSelected && /* @__PURE__ */ jsx31("span", { className: cn("bg-primary-foreground rounded-full", sizeStyles7[size].dot) })
|
|
6584
6666
|
}
|
|
6585
6667
|
)
|
|
6586
6668
|
}
|
|
6587
6669
|
),
|
|
6588
6670
|
/* @__PURE__ */ jsxs27("div", { className: "flex-1 min-w-0", children: [
|
|
6589
6671
|
/* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2", children: [
|
|
6590
|
-
Icon && /* @__PURE__ */
|
|
6591
|
-
/* @__PURE__ */
|
|
6672
|
+
Icon && /* @__PURE__ */ jsx31(Icon, { className: "h-4 w-4 text-foreground" }),
|
|
6673
|
+
/* @__PURE__ */ jsx31(
|
|
6592
6674
|
"label",
|
|
6593
6675
|
{
|
|
6594
6676
|
htmlFor: radioId,
|
|
@@ -6600,10 +6682,10 @@ var RadioGroupItem = React25.forwardRef(
|
|
|
6600
6682
|
}
|
|
6601
6683
|
)
|
|
6602
6684
|
] }),
|
|
6603
|
-
description && /* @__PURE__ */
|
|
6685
|
+
description && /* @__PURE__ */ jsx31("p", { className: "text-muted-foreground mt-1 text-xs", children: description })
|
|
6604
6686
|
] })
|
|
6605
6687
|
] }),
|
|
6606
|
-
/* @__PURE__ */
|
|
6688
|
+
/* @__PURE__ */ jsx31(
|
|
6607
6689
|
"input",
|
|
6608
6690
|
{
|
|
6609
6691
|
type: "radio",
|
|
@@ -6643,9 +6725,9 @@ var RadioGroupItem = React25.forwardRef(
|
|
|
6643
6725
|
),
|
|
6644
6726
|
onClick: () => onValueChange?.(value),
|
|
6645
6727
|
children: [
|
|
6646
|
-
Icon && /* @__PURE__ */
|
|
6728
|
+
Icon && /* @__PURE__ */ jsx31(Icon, { className: "h-4 w-4" }),
|
|
6647
6729
|
label || children,
|
|
6648
|
-
/* @__PURE__ */
|
|
6730
|
+
/* @__PURE__ */ jsx31(
|
|
6649
6731
|
"input",
|
|
6650
6732
|
{
|
|
6651
6733
|
type: "radio",
|
|
@@ -6663,7 +6745,7 @@ var RadioGroupItem = React25.forwardRef(
|
|
|
6663
6745
|
);
|
|
6664
6746
|
}
|
|
6665
6747
|
return /* @__PURE__ */ jsxs27("div", { className: cn("flex items-center gap-2", className), children: [
|
|
6666
|
-
/* @__PURE__ */
|
|
6748
|
+
/* @__PURE__ */ jsx31(
|
|
6667
6749
|
"button",
|
|
6668
6750
|
{
|
|
6669
6751
|
ref,
|
|
@@ -6682,14 +6764,14 @@ var RadioGroupItem = React25.forwardRef(
|
|
|
6682
6764
|
sizeStyles7[size].radio
|
|
6683
6765
|
),
|
|
6684
6766
|
onClick: () => onValueChange?.(value),
|
|
6685
|
-
children: /* @__PURE__ */
|
|
6767
|
+
children: /* @__PURE__ */ jsx31(
|
|
6686
6768
|
"span",
|
|
6687
6769
|
{
|
|
6688
6770
|
className: cn(
|
|
6689
6771
|
"flex items-center justify-center w-full h-full rounded-full transition-all duration-200",
|
|
6690
6772
|
isSelected && "bg-primary"
|
|
6691
6773
|
),
|
|
6692
|
-
children: isSelected && /* @__PURE__ */
|
|
6774
|
+
children: isSelected && /* @__PURE__ */ jsx31("span", { className: cn("bg-primary-foreground rounded-full", sizeStyles7[size].dot) })
|
|
6693
6775
|
}
|
|
6694
6776
|
)
|
|
6695
6777
|
}
|
|
@@ -6706,14 +6788,14 @@ var RadioGroupItem = React25.forwardRef(
|
|
|
6706
6788
|
),
|
|
6707
6789
|
children: [
|
|
6708
6790
|
/* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2", children: [
|
|
6709
|
-
Icon && /* @__PURE__ */
|
|
6710
|
-
/* @__PURE__ */
|
|
6791
|
+
Icon && /* @__PURE__ */ jsx31(Icon, { className: "h-4 w-4" }),
|
|
6792
|
+
/* @__PURE__ */ jsx31("span", { children: label || children })
|
|
6711
6793
|
] }),
|
|
6712
|
-
description && /* @__PURE__ */
|
|
6794
|
+
description && /* @__PURE__ */ jsx31("p", { className: "text-muted-foreground mt-0.5 text-xs", children: description })
|
|
6713
6795
|
]
|
|
6714
6796
|
}
|
|
6715
6797
|
),
|
|
6716
|
-
/* @__PURE__ */
|
|
6798
|
+
/* @__PURE__ */ jsx31(
|
|
6717
6799
|
"input",
|
|
6718
6800
|
{
|
|
6719
6801
|
type: "radio",
|
|
@@ -6733,7 +6815,7 @@ RadioGroupItem.displayName = "RadioGroupItem";
|
|
|
6733
6815
|
|
|
6734
6816
|
// ../../components/ui/Slider.tsx
|
|
6735
6817
|
import * as React26 from "react";
|
|
6736
|
-
import { jsx as
|
|
6818
|
+
import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6737
6819
|
var SIZE_STYLES = {
|
|
6738
6820
|
sm: {
|
|
6739
6821
|
track: "h-1",
|
|
@@ -6795,18 +6877,18 @@ var Slider = React26.forwardRef(
|
|
|
6795
6877
|
}
|
|
6796
6878
|
return /* @__PURE__ */ jsxs28("div", { className: cn("w-full space-y-2", containerClassName), children: [
|
|
6797
6879
|
(label || showValue) && /* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
|
|
6798
|
-
label && /* @__PURE__ */
|
|
6799
|
-
showValue && /* @__PURE__ */
|
|
6880
|
+
label && /* @__PURE__ */ jsx32("label", { className: cn("text-sm font-medium text-foreground", labelClassName), children: label }),
|
|
6881
|
+
showValue && /* @__PURE__ */ jsx32("span", { className: cn("text-xs font-mono text-muted-foreground min-w-[2rem] text-right", valueClassName), children: displayValue })
|
|
6800
6882
|
] }),
|
|
6801
6883
|
/* @__PURE__ */ jsxs28("div", { className: cn("relative flex items-center", sizeStyles8.container), children: [
|
|
6802
|
-
/* @__PURE__ */
|
|
6884
|
+
/* @__PURE__ */ jsx32("div", { className: cn("w-full rounded-full bg-secondary relative overflow-hidden", sizeStyles8.track, trackClassName), children: /* @__PURE__ */ jsx32(
|
|
6803
6885
|
"div",
|
|
6804
6886
|
{
|
|
6805
6887
|
className: "absolute left-0 top-0 h-full bg-primary rounded-full transition-all duration-150 ease-out",
|
|
6806
6888
|
style: { width: `${percentage}%` }
|
|
6807
6889
|
}
|
|
6808
6890
|
) }),
|
|
6809
|
-
/* @__PURE__ */
|
|
6891
|
+
/* @__PURE__ */ jsx32(
|
|
6810
6892
|
"input",
|
|
6811
6893
|
{
|
|
6812
6894
|
ref,
|
|
@@ -6872,7 +6954,7 @@ Slider.displayName = "Slider";
|
|
|
6872
6954
|
// ../../components/ui/OverlayControls.tsx
|
|
6873
6955
|
import { Dot, Maximize2, Pause, Play, RotateCcw, RotateCw, Volume2, VolumeX } from "lucide-react";
|
|
6874
6956
|
import React27 from "react";
|
|
6875
|
-
import { Fragment as Fragment10, jsx as
|
|
6957
|
+
import { Fragment as Fragment10, jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6876
6958
|
function OverlayControls({
|
|
6877
6959
|
mode,
|
|
6878
6960
|
value,
|
|
@@ -7096,7 +7178,7 @@ function OverlayControls({
|
|
|
7096
7178
|
setPreviewData(null);
|
|
7097
7179
|
};
|
|
7098
7180
|
return /* @__PURE__ */ jsxs29(Fragment10, { children: [
|
|
7099
|
-
keyboardFeedback && /* @__PURE__ */
|
|
7181
|
+
keyboardFeedback && /* @__PURE__ */ jsx33(
|
|
7100
7182
|
"div",
|
|
7101
7183
|
{
|
|
7102
7184
|
className: cn(
|
|
@@ -7104,10 +7186,10 @@ function OverlayControls({
|
|
|
7104
7186
|
keyboardFeedback.type === "seek" && (keyboardFeedback.value ?? 0) > 0 ? "justify-end pr-32" : keyboardFeedback.type === "seek" && (keyboardFeedback.value ?? 0) < 0 ? "justify-start pl-32" : "justify-center"
|
|
7105
7187
|
),
|
|
7106
7188
|
children: /* @__PURE__ */ jsxs29("div", { className: "bg-black/50 backdrop-blur-sm rounded-xl px-6 py-4 shadow-xl border border-white/10 animate-in fade-in zoom-in duration-200", children: [
|
|
7107
|
-
keyboardFeedback.type === "play" && /* @__PURE__ */
|
|
7108
|
-
keyboardFeedback.type === "pause" && /* @__PURE__ */
|
|
7189
|
+
keyboardFeedback.type === "play" && /* @__PURE__ */ jsx33(Play, { className: "w-16 h-16 text-white", fill: "white" }),
|
|
7190
|
+
keyboardFeedback.type === "pause" && /* @__PURE__ */ jsx33(Pause, { className: "w-16 h-16 text-white", fill: "white" }),
|
|
7109
7191
|
keyboardFeedback.type === "seek" && /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-3", children: [
|
|
7110
|
-
(keyboardFeedback.value ?? 0) > 0 ? /* @__PURE__ */
|
|
7192
|
+
(keyboardFeedback.value ?? 0) > 0 ? /* @__PURE__ */ jsx33(RotateCw, { className: "w-12 h-12 text-white" }) : /* @__PURE__ */ jsx33(RotateCcw, { className: "w-12 h-12 text-white" }),
|
|
7111
7193
|
/* @__PURE__ */ jsxs29("span", { className: "text-3xl font-bold text-white", children: [
|
|
7112
7194
|
keyboardFeedback.value && keyboardFeedback.value > 0 ? "+" : "",
|
|
7113
7195
|
keyboardFeedback.value,
|
|
@@ -7115,21 +7197,21 @@ function OverlayControls({
|
|
|
7115
7197
|
] })
|
|
7116
7198
|
] }),
|
|
7117
7199
|
keyboardFeedback.type === "volume" && /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-3", children: [
|
|
7118
|
-
/* @__PURE__ */
|
|
7200
|
+
/* @__PURE__ */ jsx33(Volume2, { className: "w-12 h-12 text-white" }),
|
|
7119
7201
|
/* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-1.5", children: [
|
|
7120
7202
|
/* @__PURE__ */ jsxs29("span", { className: "text-2xl font-bold text-white", children: [
|
|
7121
7203
|
keyboardFeedback.value,
|
|
7122
7204
|
"%"
|
|
7123
7205
|
] }),
|
|
7124
|
-
/* @__PURE__ */
|
|
7206
|
+
/* @__PURE__ */ jsx33("div", { className: "w-32 h-1.5 bg-white/30 rounded-full overflow-hidden", children: /* @__PURE__ */ jsx33("div", { className: "h-full bg-white rounded-full transition-all", style: { width: `${keyboardFeedback.value}%` } }) })
|
|
7125
7207
|
] })
|
|
7126
7208
|
] }),
|
|
7127
|
-
keyboardFeedback.type === "mute" && /* @__PURE__ */
|
|
7128
|
-
keyboardFeedback.type === "unmute" && /* @__PURE__ */
|
|
7209
|
+
keyboardFeedback.type === "mute" && /* @__PURE__ */ jsx33(VolumeX, { className: "w-16 h-16 text-white" }),
|
|
7210
|
+
keyboardFeedback.type === "unmute" && /* @__PURE__ */ jsx33(Volume2, { className: "w-16 h-16 text-white" })
|
|
7129
7211
|
] })
|
|
7130
7212
|
}
|
|
7131
7213
|
),
|
|
7132
|
-
/* @__PURE__ */
|
|
7214
|
+
/* @__PURE__ */ jsx33(
|
|
7133
7215
|
"div",
|
|
7134
7216
|
{
|
|
7135
7217
|
className: cn(
|
|
@@ -7140,7 +7222,7 @@ function OverlayControls({
|
|
|
7140
7222
|
),
|
|
7141
7223
|
children: /* @__PURE__ */ jsxs29("div", { className: "px-4", children: [
|
|
7142
7224
|
/* @__PURE__ */ jsxs29("div", { ref: sliderRef, onMouseMove: handleSliderMouseMove, onMouseLeave: handleSliderMouseLeave, className: "relative", children: [
|
|
7143
|
-
/* @__PURE__ */
|
|
7225
|
+
/* @__PURE__ */ jsx33(
|
|
7144
7226
|
Slider,
|
|
7145
7227
|
{
|
|
7146
7228
|
min: 0,
|
|
@@ -7165,14 +7247,14 @@ function OverlayControls({
|
|
|
7165
7247
|
noFocus: true
|
|
7166
7248
|
}
|
|
7167
7249
|
),
|
|
7168
|
-
previewData && /* @__PURE__ */
|
|
7169
|
-
/* @__PURE__ */
|
|
7170
|
-
/* @__PURE__ */
|
|
7171
|
-
] }) : /* @__PURE__ */
|
|
7250
|
+
previewData && /* @__PURE__ */ jsx33("div", { className: "absolute bottom-full mb-2 transform -translate-x-1/2 pointer-events-none z-30", style: { left: `${previewData.x}px` }, children: previewData.url ? /* @__PURE__ */ jsxs29("div", { className: "bg-background/95 backdrop-blur rounded-md border border-border shadow-lg overflow-hidden", children: [
|
|
7251
|
+
/* @__PURE__ */ jsx33("img", { src: previewData.url, alt: "Preview", className: "w-40 h-24 object-cover" }),
|
|
7252
|
+
/* @__PURE__ */ jsx33("div", { className: "px-2 py-1 text-xs font-mono text-center bg-background/80", children: formatTime3(previewData.time) })
|
|
7253
|
+
] }) : /* @__PURE__ */ jsx33("div", { className: "px-3 py-1.5 rounded-md bg-background/90 backdrop-blur border border-border shadow-lg", children: /* @__PURE__ */ jsx33("div", { className: "text-xs font-mono text-center", children: formatTime3(previewData.time) }) }) })
|
|
7172
7254
|
] }),
|
|
7173
7255
|
showControlsBar && /* @__PURE__ */ jsxs29("div", { className: "mt-2 flex items-center justify-between gap-2", children: [
|
|
7174
7256
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
|
|
7175
|
-
/* @__PURE__ */
|
|
7257
|
+
/* @__PURE__ */ jsx33(
|
|
7176
7258
|
Button_default,
|
|
7177
7259
|
{
|
|
7178
7260
|
variant: "ghost",
|
|
@@ -7180,10 +7262,10 @@ function OverlayControls({
|
|
|
7180
7262
|
onClick: onTogglePlay,
|
|
7181
7263
|
title: playing ? "T\u1EA1m d\u1EEBng" : "Ph\xE1t",
|
|
7182
7264
|
className: "bg-background/60 hover:bg-background/80 border-transparent shadow-sm outline-none focus:outline-none focus:ring-0",
|
|
7183
|
-
children: playing ? /* @__PURE__ */
|
|
7265
|
+
children: playing ? /* @__PURE__ */ jsx33(Pause, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx33(Play, { className: "w-4 h-4" })
|
|
7184
7266
|
}
|
|
7185
7267
|
),
|
|
7186
|
-
onSkip && /* @__PURE__ */
|
|
7268
|
+
onSkip && /* @__PURE__ */ jsx33(
|
|
7187
7269
|
Button_default,
|
|
7188
7270
|
{
|
|
7189
7271
|
variant: "ghost",
|
|
@@ -7191,10 +7273,10 @@ function OverlayControls({
|
|
|
7191
7273
|
onClick: () => onSkip(-skipSeconds),
|
|
7192
7274
|
title: `L\xF9i ${skipSeconds}s`,
|
|
7193
7275
|
className: "bg-background/60 hover:bg-background/80 border-transparent shadow-sm outline-none focus:outline-none focus:ring-0",
|
|
7194
|
-
children: /* @__PURE__ */
|
|
7276
|
+
children: /* @__PURE__ */ jsx33(RotateCcw, { className: "w-4 h-4" })
|
|
7195
7277
|
}
|
|
7196
7278
|
),
|
|
7197
|
-
onSkip && /* @__PURE__ */
|
|
7279
|
+
onSkip && /* @__PURE__ */ jsx33(
|
|
7198
7280
|
Button_default,
|
|
7199
7281
|
{
|
|
7200
7282
|
variant: "ghost",
|
|
@@ -7202,7 +7284,7 @@ function OverlayControls({
|
|
|
7202
7284
|
onClick: () => onSkip(skipSeconds),
|
|
7203
7285
|
title: `Tua ${skipSeconds}s`,
|
|
7204
7286
|
className: "bg-background/60 hover:bg-background/80 border-transparent shadow-sm outline-none focus:outline-none focus:ring-0",
|
|
7205
|
-
children: /* @__PURE__ */
|
|
7287
|
+
children: /* @__PURE__ */ jsx33(RotateCw, { className: "w-4 h-4" })
|
|
7206
7288
|
}
|
|
7207
7289
|
),
|
|
7208
7290
|
(showTime ?? true) && /* @__PURE__ */ jsxs29("span", { className: "px-3 py-1 rounded-full text-xs font-mono bg-background/60 text-foreground shadow-sm border border-border whitespace-nowrap", children: [
|
|
@@ -7211,7 +7293,7 @@ function OverlayControls({
|
|
|
7211
7293
|
formatTime3(max)
|
|
7212
7294
|
] }),
|
|
7213
7295
|
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
|
|
7214
|
-
/* @__PURE__ */
|
|
7296
|
+
/* @__PURE__ */ jsx33(
|
|
7215
7297
|
Button_default,
|
|
7216
7298
|
{
|
|
7217
7299
|
variant: "ghost",
|
|
@@ -7219,10 +7301,10 @@ function OverlayControls({
|
|
|
7219
7301
|
onClick: onToggleMute,
|
|
7220
7302
|
title: muted ? "B\u1EADt ti\u1EBFng" : "T\u1EAFt ti\u1EBFng",
|
|
7221
7303
|
className: "bg-background/60 hover:bg-background/80 border-transparent shadow-sm outline-none focus:outline-none focus:ring-0",
|
|
7222
|
-
children: muted || (volume ?? 1) === 0 ? /* @__PURE__ */
|
|
7304
|
+
children: muted || (volume ?? 1) === 0 ? /* @__PURE__ */ jsx33(VolumeX, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx33(Volume2, { className: "w-4 h-4" })
|
|
7223
7305
|
}
|
|
7224
7306
|
),
|
|
7225
|
-
/* @__PURE__ */
|
|
7307
|
+
/* @__PURE__ */ jsx33("div", { className: "w-24", children: /* @__PURE__ */ jsx33(
|
|
7226
7308
|
Slider,
|
|
7227
7309
|
{
|
|
7228
7310
|
min: 0,
|
|
@@ -7247,7 +7329,7 @@ function OverlayControls({
|
|
|
7247
7329
|
title: "Tr\u1EF1c ti\u1EBFp (v\u1EC1 Live)",
|
|
7248
7330
|
className: "bg-background/60 hover:bg-background/80 border-transparent shadow-sm outline-none focus:outline-none focus:ring-0",
|
|
7249
7331
|
children: [
|
|
7250
|
-
/* @__PURE__ */
|
|
7332
|
+
/* @__PURE__ */ jsx33(Dot, { className: "w-10 h-10 text-destructive" }),
|
|
7251
7333
|
"Tr\u1EF1c ti\u1EBFp"
|
|
7252
7334
|
]
|
|
7253
7335
|
}
|
|
@@ -7267,7 +7349,7 @@ function OverlayControls({
|
|
|
7267
7349
|
]
|
|
7268
7350
|
}
|
|
7269
7351
|
),
|
|
7270
|
-
rateOpen && /* @__PURE__ */
|
|
7352
|
+
rateOpen && /* @__PURE__ */ jsx33("div", { className: "absolute bottom-9 right-0 bg-background/90 backdrop-blur rounded-md border border-border shadow-lg p-1 z-30", children: [0.5, 0.75, 1, 1.25, 1.5].map((r) => /* @__PURE__ */ jsxs29(
|
|
7271
7353
|
"button",
|
|
7272
7354
|
{
|
|
7273
7355
|
onClick: () => {
|
|
@@ -7283,7 +7365,7 @@ function OverlayControls({
|
|
|
7283
7365
|
r
|
|
7284
7366
|
)) })
|
|
7285
7367
|
] }),
|
|
7286
|
-
onToggleFullscreen && /* @__PURE__ */
|
|
7368
|
+
onToggleFullscreen && /* @__PURE__ */ jsx33(
|
|
7287
7369
|
Button_default,
|
|
7288
7370
|
{
|
|
7289
7371
|
variant: "ghost",
|
|
@@ -7291,7 +7373,7 @@ function OverlayControls({
|
|
|
7291
7373
|
onClick: onToggleFullscreen,
|
|
7292
7374
|
title: "To\xE0n m\xE0n h\xECnh",
|
|
7293
7375
|
className: "px-3 bg-background/60 hover:bg-background/80 border-transparent shadow-sm outline-none focus:outline-none focus:ring-0",
|
|
7294
|
-
children: /* @__PURE__ */
|
|
7376
|
+
children: /* @__PURE__ */ jsx33(Maximize2, { className: "w-4 h-4" })
|
|
7295
7377
|
}
|
|
7296
7378
|
)
|
|
7297
7379
|
] })
|
|
@@ -7305,7 +7387,7 @@ function OverlayControls({
|
|
|
7305
7387
|
// ../../components/ui/CategoryTreeSelect.tsx
|
|
7306
7388
|
import { useState as useState24 } from "react";
|
|
7307
7389
|
import { ChevronRight as ChevronRight5, ChevronDown as ChevronDown3, Check as Check6 } from "lucide-react";
|
|
7308
|
-
import { Fragment as Fragment11, jsx as
|
|
7390
|
+
import { Fragment as Fragment11, jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7309
7391
|
function CategoryTreeSelect({ categories, value, onChange, placeholder = "Ch\u1ECDn danh m\u1EE5c", disabled }) {
|
|
7310
7392
|
const [isOpen, setIsOpen] = useState24(false);
|
|
7311
7393
|
const [expandedNodes, setExpandedNodes] = useState24(/* @__PURE__ */ new Set());
|
|
@@ -7359,14 +7441,14 @@ function CategoryTreeSelect({ categories, value, onChange, placeholder = "Ch\u1E
|
|
|
7359
7441
|
),
|
|
7360
7442
|
style: { paddingLeft: `${level * 1.5 + 0.75}rem` },
|
|
7361
7443
|
children: [
|
|
7362
|
-
isSelected && /* @__PURE__ */
|
|
7444
|
+
isSelected && /* @__PURE__ */ jsx34(
|
|
7363
7445
|
"span",
|
|
7364
7446
|
{
|
|
7365
7447
|
"aria-hidden": true,
|
|
7366
7448
|
className: "absolute left-0 top-0 bottom-0 w-1 bg-primary"
|
|
7367
7449
|
}
|
|
7368
7450
|
),
|
|
7369
|
-
hasChildren ? /* @__PURE__ */
|
|
7451
|
+
hasChildren ? /* @__PURE__ */ jsx34(
|
|
7370
7452
|
"button",
|
|
7371
7453
|
{
|
|
7372
7454
|
type: "button",
|
|
@@ -7375,33 +7457,33 @@ function CategoryTreeSelect({ categories, value, onChange, placeholder = "Ch\u1E
|
|
|
7375
7457
|
toggleExpand(category.id);
|
|
7376
7458
|
},
|
|
7377
7459
|
className: "p-0.5 hover:bg-accent rounded",
|
|
7378
|
-
children: isExpanded ? /* @__PURE__ */
|
|
7460
|
+
children: isExpanded ? /* @__PURE__ */ jsx34(ChevronDown3, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx34(ChevronRight5, { className: "w-4 h-4" })
|
|
7379
7461
|
}
|
|
7380
|
-
) : /* @__PURE__ */
|
|
7462
|
+
) : /* @__PURE__ */ jsx34("span", { className: "w-5" }),
|
|
7381
7463
|
/* @__PURE__ */ jsxs30(
|
|
7382
7464
|
"div",
|
|
7383
7465
|
{
|
|
7384
7466
|
onClick: () => handleSelect(category.id, category),
|
|
7385
7467
|
className: "flex items-center gap-2 flex-1",
|
|
7386
7468
|
children: [
|
|
7387
|
-
/* @__PURE__ */
|
|
7469
|
+
/* @__PURE__ */ jsx34(
|
|
7388
7470
|
"div",
|
|
7389
7471
|
{
|
|
7390
7472
|
className: cn(
|
|
7391
7473
|
"w-4 h-4 border-2 rounded flex items-center justify-center transition-colors",
|
|
7392
7474
|
isSelected ? "bg-primary border-primary" : "border-muted-foreground/30"
|
|
7393
7475
|
),
|
|
7394
|
-
children: isSelected && /* @__PURE__ */
|
|
7476
|
+
children: isSelected && /* @__PURE__ */ jsx34(Check6, { className: "w-3 h-3 text-primary-foreground" })
|
|
7395
7477
|
}
|
|
7396
7478
|
),
|
|
7397
|
-
/* @__PURE__ */
|
|
7479
|
+
/* @__PURE__ */ jsx34("span", { className: cn("text-sm", isSelected && "font-medium text-primary"), children: category.name })
|
|
7398
7480
|
]
|
|
7399
7481
|
}
|
|
7400
7482
|
)
|
|
7401
7483
|
]
|
|
7402
7484
|
}
|
|
7403
7485
|
),
|
|
7404
|
-
hasChildren && isExpanded && /* @__PURE__ */
|
|
7486
|
+
hasChildren && isExpanded && /* @__PURE__ */ jsx34("div", { children: children.map((child) => renderCategory(child, level + 1)) })
|
|
7405
7487
|
] }, category.id);
|
|
7406
7488
|
};
|
|
7407
7489
|
const selectedCount = value.length;
|
|
@@ -7423,14 +7505,14 @@ function CategoryTreeSelect({ categories, value, onChange, placeholder = "Ch\u1E
|
|
|
7423
7505
|
isOpen && "border-primary"
|
|
7424
7506
|
),
|
|
7425
7507
|
children: [
|
|
7426
|
-
/* @__PURE__ */
|
|
7427
|
-
/* @__PURE__ */
|
|
7508
|
+
/* @__PURE__ */ jsx34("span", { className: cn("text-sm", selectedCount === 0 && "text-muted-foreground"), children: displayText }),
|
|
7509
|
+
/* @__PURE__ */ jsx34(ChevronDown3, { className: cn("w-4 h-4 transition-transform", isOpen && "transform rotate-180") })
|
|
7428
7510
|
]
|
|
7429
7511
|
}
|
|
7430
7512
|
),
|
|
7431
7513
|
isOpen && !disabled && /* @__PURE__ */ jsxs30(Fragment11, { children: [
|
|
7432
|
-
/* @__PURE__ */
|
|
7433
|
-
/* @__PURE__ */
|
|
7514
|
+
/* @__PURE__ */ jsx34("div", { className: "fixed inset-0 z-10", onClick: () => setIsOpen(false) }),
|
|
7515
|
+
/* @__PURE__ */ jsx34(
|
|
7434
7516
|
"div",
|
|
7435
7517
|
{
|
|
7436
7518
|
className: cn(
|
|
@@ -7438,7 +7520,7 @@ function CategoryTreeSelect({ categories, value, onChange, placeholder = "Ch\u1E
|
|
|
7438
7520
|
"rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
7439
7521
|
"backdrop-blur-sm bg-popover/95 border-border/60"
|
|
7440
7522
|
),
|
|
7441
|
-
children: /* @__PURE__ */
|
|
7523
|
+
children: /* @__PURE__ */ jsx34("div", { className: "p-1", children: parentCategories.length === 0 ? /* @__PURE__ */ jsx34("div", { className: "px-3 py-2 text-sm text-muted-foreground", children: "Kh\xF4ng c\xF3 danh m\u1EE5c n\xE0o" }) : parentCategories.map((cat) => renderCategory(cat)) })
|
|
7442
7524
|
}
|
|
7443
7525
|
)
|
|
7444
7526
|
] })
|
|
@@ -7449,7 +7531,7 @@ function CategoryTreeSelect({ categories, value, onChange, placeholder = "Ch\u1E
|
|
|
7449
7531
|
import { useState as useState25, useRef as useRef10, useCallback as useCallback9 } from "react";
|
|
7450
7532
|
import { Upload, X as X9, Image as ImageIcon, Loader2 as Loader24, Check as Check7 } from "lucide-react";
|
|
7451
7533
|
import { useTranslations as useTranslations6 } from "next-intl";
|
|
7452
|
-
import { jsx as
|
|
7534
|
+
import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7453
7535
|
function ImageUpload({
|
|
7454
7536
|
onUpload,
|
|
7455
7537
|
onRemove,
|
|
@@ -7476,94 +7558,106 @@ function ImageUpload({
|
|
|
7476
7558
|
md: "w-24 h-24",
|
|
7477
7559
|
lg: "w-32 h-32"
|
|
7478
7560
|
};
|
|
7479
|
-
const handleDragOver = useCallback9(
|
|
7480
|
-
e
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7561
|
+
const handleDragOver = useCallback9(
|
|
7562
|
+
(e) => {
|
|
7563
|
+
e.preventDefault();
|
|
7564
|
+
if (!disabled) {
|
|
7565
|
+
setIsDragging(true);
|
|
7566
|
+
}
|
|
7567
|
+
},
|
|
7568
|
+
[disabled]
|
|
7569
|
+
);
|
|
7485
7570
|
const handleDragLeave = useCallback9((e) => {
|
|
7486
7571
|
e.preventDefault();
|
|
7487
7572
|
setIsDragging(false);
|
|
7488
7573
|
}, []);
|
|
7489
|
-
const handleFiles = useCallback9(
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7574
|
+
const handleFiles = useCallback9(
|
|
7575
|
+
async (files) => {
|
|
7576
|
+
if (files.length === 0) return;
|
|
7577
|
+
const validFiles = files.filter((file) => {
|
|
7578
|
+
if (file.size > maxSize * 1024 * 1024) {
|
|
7579
|
+
addToast({
|
|
7580
|
+
type: "error",
|
|
7581
|
+
message: `File "${file.name}" is too large. Max size: ${maxSize}MB`
|
|
7582
|
+
});
|
|
7583
|
+
return false;
|
|
7584
|
+
}
|
|
7585
|
+
if (!file.type.startsWith("image/")) {
|
|
7586
|
+
addToast({
|
|
7587
|
+
type: "error",
|
|
7588
|
+
message: `File "${file.name}" is not a valid image`
|
|
7589
|
+
});
|
|
7590
|
+
return false;
|
|
7591
|
+
}
|
|
7592
|
+
return true;
|
|
7593
|
+
});
|
|
7594
|
+
if (validFiles.length === 0) return;
|
|
7595
|
+
setUploading(true);
|
|
7596
|
+
try {
|
|
7597
|
+
for (const file of validFiles) {
|
|
7598
|
+
const formData = new FormData();
|
|
7599
|
+
formData.append("file", file);
|
|
7600
|
+
const response = {
|
|
7601
|
+
id: Date.now(),
|
|
7602
|
+
path: "",
|
|
7603
|
+
url: URL.createObjectURL(file),
|
|
7604
|
+
originalName: file.name,
|
|
7605
|
+
size: file.size,
|
|
7606
|
+
mimeType: file.type,
|
|
7607
|
+
width: 0,
|
|
7608
|
+
height: 0,
|
|
7609
|
+
formattedSize: `${(file.size / 1024).toFixed(1)} KB`
|
|
7610
|
+
};
|
|
7611
|
+
const newImage = {
|
|
7612
|
+
id: response.id,
|
|
7613
|
+
path: response.path,
|
|
7614
|
+
url: response.url,
|
|
7615
|
+
originalName: response.originalName,
|
|
7616
|
+
size: response.size,
|
|
7617
|
+
mimeType: response.mimeType,
|
|
7618
|
+
width: response.width,
|
|
7619
|
+
height: response.height,
|
|
7620
|
+
formattedSize: response.formattedSize
|
|
7621
|
+
};
|
|
7622
|
+
setUploadedImages((prev) => [...prev, newImage]);
|
|
7623
|
+
onUpload?.(newImage);
|
|
7624
|
+
addToast({
|
|
7625
|
+
type: "success",
|
|
7626
|
+
message: `"${file.name}" uploaded successfully`
|
|
7627
|
+
});
|
|
7628
|
+
}
|
|
7629
|
+
} catch (error) {
|
|
7630
|
+
console.error("Upload error:", error);
|
|
7500
7631
|
addToast({
|
|
7501
7632
|
type: "error",
|
|
7502
|
-
message:
|
|
7633
|
+
message: error.message || "Upload failed"
|
|
7503
7634
|
});
|
|
7504
|
-
|
|
7635
|
+
} finally {
|
|
7636
|
+
setUploading(false);
|
|
7505
7637
|
}
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
const newImage = {
|
|
7526
|
-
id: response.id,
|
|
7527
|
-
path: response.path,
|
|
7528
|
-
url: response.url,
|
|
7529
|
-
originalName: response.originalName,
|
|
7530
|
-
size: response.size,
|
|
7531
|
-
mimeType: response.mimeType,
|
|
7532
|
-
width: response.width,
|
|
7533
|
-
height: response.height,
|
|
7534
|
-
formattedSize: response.formattedSize
|
|
7535
|
-
};
|
|
7536
|
-
setUploadedImages((prev) => [...prev, newImage]);
|
|
7537
|
-
onUpload?.(newImage);
|
|
7538
|
-
addToast({
|
|
7539
|
-
type: "success",
|
|
7540
|
-
message: `"${file.name}" uploaded successfully`
|
|
7541
|
-
});
|
|
7638
|
+
},
|
|
7639
|
+
[maxSize, addToast, onUpload]
|
|
7640
|
+
);
|
|
7641
|
+
const handleDrop = useCallback9(
|
|
7642
|
+
(e) => {
|
|
7643
|
+
e.preventDefault();
|
|
7644
|
+
setIsDragging(false);
|
|
7645
|
+
if (disabled) return;
|
|
7646
|
+
const files = Array.from(e.dataTransfer.files);
|
|
7647
|
+
handleFiles(files);
|
|
7648
|
+
},
|
|
7649
|
+
[disabled, handleFiles]
|
|
7650
|
+
);
|
|
7651
|
+
const handleFileSelect = useCallback9(
|
|
7652
|
+
(e) => {
|
|
7653
|
+
const files = Array.from(e.target.files || []);
|
|
7654
|
+
handleFiles(files);
|
|
7655
|
+
if (fileInputRef.current) {
|
|
7656
|
+
fileInputRef.current.value = "";
|
|
7542
7657
|
}
|
|
7543
|
-
}
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
type: "error",
|
|
7547
|
-
message: error.message || "Upload failed"
|
|
7548
|
-
});
|
|
7549
|
-
} finally {
|
|
7550
|
-
setUploading(false);
|
|
7551
|
-
}
|
|
7552
|
-
}, [maxSize, addToast, onUpload]);
|
|
7553
|
-
const handleDrop = useCallback9((e) => {
|
|
7554
|
-
e.preventDefault();
|
|
7555
|
-
setIsDragging(false);
|
|
7556
|
-
if (disabled) return;
|
|
7557
|
-
const files = Array.from(e.dataTransfer.files);
|
|
7558
|
-
handleFiles(files);
|
|
7559
|
-
}, [disabled, handleFiles]);
|
|
7560
|
-
const handleFileSelect = useCallback9((e) => {
|
|
7561
|
-
const files = Array.from(e.target.files || []);
|
|
7562
|
-
handleFiles(files);
|
|
7563
|
-
if (fileInputRef.current) {
|
|
7564
|
-
fileInputRef.current.value = "";
|
|
7565
|
-
}
|
|
7566
|
-
}, [handleFiles]);
|
|
7658
|
+
},
|
|
7659
|
+
[handleFiles]
|
|
7660
|
+
);
|
|
7567
7661
|
const handleRemoveImage = (imageId) => {
|
|
7568
7662
|
setUploadedImages((prev) => prev.filter((img) => img.id !== Number(imageId)));
|
|
7569
7663
|
onRemove?.(String(imageId));
|
|
@@ -7585,29 +7679,19 @@ function ImageUpload({
|
|
|
7585
7679
|
onDragLeave: handleDragLeave,
|
|
7586
7680
|
onDrop: handleDrop,
|
|
7587
7681
|
children: [
|
|
7588
|
-
uploading && /* @__PURE__ */
|
|
7589
|
-
/* @__PURE__ */
|
|
7590
|
-
/* @__PURE__ */
|
|
7682
|
+
uploading && /* @__PURE__ */ jsx35("div", { className: "absolute inset-0 bg-background/80 flex items-center justify-center rounded-lg", children: /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-3", children: [
|
|
7683
|
+
/* @__PURE__ */ jsx35(Loader24, { className: "w-6 h-6 animate-spin text-primary" }),
|
|
7684
|
+
/* @__PURE__ */ jsx35("span", { className: "text-sm font-medium", children: "Uploading..." })
|
|
7591
7685
|
] }) }),
|
|
7592
7686
|
/* @__PURE__ */ jsxs31("div", { className: "space-y-4", children: [
|
|
7593
|
-
/* @__PURE__ */
|
|
7687
|
+
/* @__PURE__ */ jsx35("div", { className: "mx-auto w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx35(Upload, { className: "w-6 h-6 text-primary" }) }),
|
|
7594
7688
|
/* @__PURE__ */ jsxs31("div", { className: "space-y-2", children: [
|
|
7595
|
-
/* @__PURE__ */
|
|
7596
|
-
/* @__PURE__ */
|
|
7597
|
-
Button_default,
|
|
7598
|
-
{
|
|
7599
|
-
type: "button",
|
|
7600
|
-
variant: "outline",
|
|
7601
|
-
size: "sm",
|
|
7602
|
-
onClick: handleBrowseClick,
|
|
7603
|
-
disabled: disabled || uploading,
|
|
7604
|
-
children: browseText || t("browseFiles")
|
|
7605
|
-
}
|
|
7606
|
-
)
|
|
7689
|
+
/* @__PURE__ */ jsx35("p", { className: "text-muted-foreground", children: dragDropText || t("dragDropText") }),
|
|
7690
|
+
/* @__PURE__ */ jsx35(Button_default, { type: "button", variant: "outline", size: "sm", onClick: handleBrowseClick, disabled: disabled || uploading, children: browseText || t("browseFiles") })
|
|
7607
7691
|
] }),
|
|
7608
|
-
/* @__PURE__ */
|
|
7692
|
+
/* @__PURE__ */ jsx35("p", { className: "text-xs text-muted-foreground", children: supportedFormatsText || t("supportedFormats") })
|
|
7609
7693
|
] }),
|
|
7610
|
-
/* @__PURE__ */
|
|
7694
|
+
/* @__PURE__ */ jsx35(
|
|
7611
7695
|
"input",
|
|
7612
7696
|
{
|
|
7613
7697
|
ref: fileInputRef,
|
|
@@ -7623,52 +7707,45 @@ function ImageUpload({
|
|
|
7623
7707
|
}
|
|
7624
7708
|
),
|
|
7625
7709
|
showPreview && uploadedImages.length > 0 && /* @__PURE__ */ jsxs31("div", { className: "space-y-3", children: [
|
|
7626
|
-
/* @__PURE__ */
|
|
7627
|
-
/* @__PURE__ */
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7710
|
+
/* @__PURE__ */ jsx35("h4", { className: "text-sm font-medium", children: "Uploaded Images" }),
|
|
7711
|
+
/* @__PURE__ */ jsx35("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4", children: uploadedImages.map((image) => /* @__PURE__ */ jsxs31("div", { className: "relative group bg-card border border-border rounded-lg p-3", children: [
|
|
7712
|
+
/* @__PURE__ */ jsx35(
|
|
7713
|
+
Button_default,
|
|
7714
|
+
{
|
|
7715
|
+
variant: "danger",
|
|
7716
|
+
size: "icon",
|
|
7717
|
+
className: "absolute -top-2 -right-2 w-6 h-6 opacity-0 group-hover:opacity-100 transition-opacity z-10",
|
|
7718
|
+
onClick: () => handleRemoveImage(image.id),
|
|
7719
|
+
children: /* @__PURE__ */ jsx35(X9, { className: "w-3 h-3" })
|
|
7720
|
+
}
|
|
7721
|
+
),
|
|
7722
|
+
/* @__PURE__ */ jsxs31("div", { className: cn("mx-auto mb-2 overflow-hidden rounded-md", previewSizes[previewSize]), children: [
|
|
7723
|
+
/* @__PURE__ */ jsx35(
|
|
7724
|
+
"img",
|
|
7725
|
+
{
|
|
7726
|
+
src: image.url,
|
|
7727
|
+
alt: image.originalName,
|
|
7728
|
+
className: "w-full h-full object-cover",
|
|
7729
|
+
onError: (e) => {
|
|
7730
|
+
const target = e.target;
|
|
7731
|
+
target.style.display = "none";
|
|
7732
|
+
target.nextElementSibling?.classList.remove("hidden");
|
|
7640
7733
|
}
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
/* @__PURE__ */ jsx36("div", { className: "hidden w-full h-full bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsx36(ImageIcon, { className: "w-8 h-8 text-muted-foreground" }) })
|
|
7657
|
-
] }),
|
|
7658
|
-
/* @__PURE__ */ jsxs31("div", { className: "space-y-1", children: [
|
|
7659
|
-
/* @__PURE__ */ jsx36("p", { className: "text-xs font-medium truncate", title: image.originalName, children: image.originalName }),
|
|
7660
|
-
/* @__PURE__ */ jsx36("p", { className: "text-xs text-muted-foreground", children: image.formattedSize }),
|
|
7661
|
-
image.width && image.height && /* @__PURE__ */ jsxs31("p", { className: "text-xs text-muted-foreground", children: [
|
|
7662
|
-
image.width,
|
|
7663
|
-
" \xD7 ",
|
|
7664
|
-
image.height
|
|
7665
|
-
] })
|
|
7666
|
-
] }),
|
|
7667
|
-
/* @__PURE__ */ jsx36("div", { className: "absolute top-1 left-1 w-5 h-5 bg-success rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx36(Check7, { className: "w-3 h-3 text-success-foreground" }) })
|
|
7668
|
-
]
|
|
7669
|
-
},
|
|
7670
|
-
image.id
|
|
7671
|
-
)) })
|
|
7734
|
+
}
|
|
7735
|
+
),
|
|
7736
|
+
/* @__PURE__ */ jsx35("div", { className: "hidden w-full h-full bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsx35(ImageIcon, { className: "w-8 h-8 text-muted-foreground" }) })
|
|
7737
|
+
] }),
|
|
7738
|
+
/* @__PURE__ */ jsxs31("div", { className: "space-y-1", children: [
|
|
7739
|
+
/* @__PURE__ */ jsx35("p", { className: "text-xs font-medium truncate", title: image.originalName, children: image.originalName }),
|
|
7740
|
+
/* @__PURE__ */ jsx35("p", { className: "text-xs text-muted-foreground", children: image.formattedSize }),
|
|
7741
|
+
image.width && image.height && /* @__PURE__ */ jsxs31("p", { className: "text-xs text-muted-foreground", children: [
|
|
7742
|
+
image.width,
|
|
7743
|
+
" \xD7 ",
|
|
7744
|
+
image.height
|
|
7745
|
+
] })
|
|
7746
|
+
] }),
|
|
7747
|
+
/* @__PURE__ */ jsx35("div", { className: "absolute top-1 left-1 w-5 h-5 bg-success rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx35(Check7, { className: "w-3 h-3 text-success-foreground" }) })
|
|
7748
|
+
] }, image.id)) })
|
|
7672
7749
|
] })
|
|
7673
7750
|
] });
|
|
7674
7751
|
}
|
|
@@ -7676,7 +7753,7 @@ function ImageUpload({
|
|
|
7676
7753
|
// ../../components/ui/Carousel.tsx
|
|
7677
7754
|
import * as React29 from "react";
|
|
7678
7755
|
import { ChevronLeft as ChevronLeft4, ChevronRight as ChevronRight6 } from "lucide-react";
|
|
7679
|
-
import { Fragment as Fragment12, jsx as
|
|
7756
|
+
import { Fragment as Fragment12, jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7680
7757
|
function Carousel({
|
|
7681
7758
|
children,
|
|
7682
7759
|
autoScroll = true,
|
|
@@ -7846,8 +7923,8 @@ function Carousel({
|
|
|
7846
7923
|
"aria-roledescription": "carousel",
|
|
7847
7924
|
tabIndex: 0,
|
|
7848
7925
|
children: [
|
|
7849
|
-
showProgress && autoScroll && /* @__PURE__ */
|
|
7850
|
-
/* @__PURE__ */
|
|
7926
|
+
showProgress && autoScroll && /* @__PURE__ */ jsx36("div", { className: "absolute top-0 left-0 right-0 h-1 bg-muted z-20", children: /* @__PURE__ */ jsx36("div", { ref: progressElRef, className: "h-full bg-primary", style: { width: "0%" } }) }),
|
|
7927
|
+
/* @__PURE__ */ jsx36(
|
|
7851
7928
|
"div",
|
|
7852
7929
|
{
|
|
7853
7930
|
className: cn("flex", isHorizontal ? "flex-row" : "flex-col", containerClassName),
|
|
@@ -7862,7 +7939,7 @@ function Carousel({
|
|
|
7862
7939
|
role: "group",
|
|
7863
7940
|
"aria-atomic": "false",
|
|
7864
7941
|
"aria-live": autoScroll ? "off" : "polite",
|
|
7865
|
-
children: React29.Children.map(children, (child, idx) => /* @__PURE__ */
|
|
7942
|
+
children: React29.Children.map(children, (child, idx) => /* @__PURE__ */ jsx36(
|
|
7866
7943
|
"div",
|
|
7867
7944
|
{
|
|
7868
7945
|
className: cn(
|
|
@@ -7886,7 +7963,7 @@ function Carousel({
|
|
|
7886
7963
|
}
|
|
7887
7964
|
),
|
|
7888
7965
|
showArrows && totalSlides > slidesToShow && /* @__PURE__ */ jsxs32(Fragment12, { children: [
|
|
7889
|
-
/* @__PURE__ */
|
|
7966
|
+
/* @__PURE__ */ jsx36(
|
|
7890
7967
|
Button_default,
|
|
7891
7968
|
{
|
|
7892
7969
|
onClick: scrollPrev,
|
|
@@ -7902,7 +7979,7 @@ function Carousel({
|
|
|
7902
7979
|
"aria-label": "Previous slide"
|
|
7903
7980
|
}
|
|
7904
7981
|
),
|
|
7905
|
-
/* @__PURE__ */
|
|
7982
|
+
/* @__PURE__ */ jsx36(
|
|
7906
7983
|
Button_default,
|
|
7907
7984
|
{
|
|
7908
7985
|
onClick: scrollNext,
|
|
@@ -7919,7 +7996,7 @@ function Carousel({
|
|
|
7919
7996
|
}
|
|
7920
7997
|
)
|
|
7921
7998
|
] }),
|
|
7922
|
-
showDots && totalSlides > slidesToShow && /* @__PURE__ */
|
|
7999
|
+
showDots && totalSlides > slidesToShow && /* @__PURE__ */ jsx36(
|
|
7923
8000
|
"div",
|
|
7924
8001
|
{
|
|
7925
8002
|
className: cn(
|
|
@@ -7928,7 +8005,7 @@ function Carousel({
|
|
|
7928
8005
|
),
|
|
7929
8006
|
role: "tablist",
|
|
7930
8007
|
"aria-label": "Carousel pagination",
|
|
7931
|
-
children: Array.from({ length: maxIndex + 1 }, (_, idx) => /* @__PURE__ */
|
|
8008
|
+
children: Array.from({ length: maxIndex + 1 }, (_, idx) => /* @__PURE__ */ jsx36(
|
|
7932
8009
|
"button",
|
|
7933
8010
|
{
|
|
7934
8011
|
onClick: () => scrollTo(idx),
|
|
@@ -7945,14 +8022,14 @@ function Carousel({
|
|
|
7945
8022
|
))
|
|
7946
8023
|
}
|
|
7947
8024
|
),
|
|
7948
|
-
showThumbnails && totalSlides > slidesToShow && /* @__PURE__ */
|
|
8025
|
+
showThumbnails && totalSlides > slidesToShow && /* @__PURE__ */ jsx36(
|
|
7949
8026
|
"div",
|
|
7950
8027
|
{
|
|
7951
8028
|
className: cn(
|
|
7952
8029
|
"absolute bottom-0 left-0 right-0 flex gap-2 p-4 bg-gradient-to-t from-black/50 to-transparent overflow-x-auto",
|
|
7953
8030
|
isHorizontal ? "flex-row" : "flex-col"
|
|
7954
8031
|
),
|
|
7955
|
-
children: React29.Children.map(children, (child, idx) => /* @__PURE__ */
|
|
8032
|
+
children: React29.Children.map(children, (child, idx) => /* @__PURE__ */ jsx36(
|
|
7956
8033
|
"button",
|
|
7957
8034
|
{
|
|
7958
8035
|
onClick: () => scrollTo(idx),
|
|
@@ -7974,7 +8051,7 @@ function Carousel({
|
|
|
7974
8051
|
|
|
7975
8052
|
// ../../components/ui/FallingIcons.tsx
|
|
7976
8053
|
import React30 from "react";
|
|
7977
|
-
import { jsx as
|
|
8054
|
+
import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7978
8055
|
var DEFAULT_COUNT = 24;
|
|
7979
8056
|
var DEFAULT_SPEED_RANGE = [6, 14];
|
|
7980
8057
|
var DEFAULT_SIZE_RANGE = [14, 28];
|
|
@@ -8069,8 +8146,8 @@ function FallingIcons({
|
|
|
8069
8146
|
filter: `drop-shadow(0 0 ${4 * intensity}px ${glowColor}) drop-shadow(0 0 ${8 * intensity}px ${glowColor})`
|
|
8070
8147
|
};
|
|
8071
8148
|
}, [glow, glowColor, glowIntensity]);
|
|
8072
|
-
const FallbackIcon = React30.useMemo(() => (props) => /* @__PURE__ */
|
|
8073
|
-
const TheIcon = imageUrl ? ({ className: imgClassName }) => /* @__PURE__ */
|
|
8149
|
+
const FallbackIcon = React30.useMemo(() => (props) => /* @__PURE__ */ jsx37("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...props, children: /* @__PURE__ */ jsx37("circle", { cx: "12", cy: "12", r: "10" }) }), []);
|
|
8150
|
+
const TheIcon = imageUrl ? ({ className: imgClassName }) => /* @__PURE__ */ jsx37(
|
|
8074
8151
|
"img",
|
|
8075
8152
|
{
|
|
8076
8153
|
src: imageUrl,
|
|
@@ -8089,7 +8166,7 @@ function FallingIcons({
|
|
|
8089
8166
|
),
|
|
8090
8167
|
style: { zIndex },
|
|
8091
8168
|
children: [
|
|
8092
|
-
/* @__PURE__ */
|
|
8169
|
+
/* @__PURE__ */ jsx37("style", { children: `
|
|
8093
8170
|
@keyframes ${FallName} {
|
|
8094
8171
|
0% { transform: translate3d(0, -10vh, 0); opacity: 0; }
|
|
8095
8172
|
10% { opacity: 1; }
|
|
@@ -8122,7 +8199,7 @@ function FallingIcons({
|
|
|
8122
8199
|
}
|
|
8123
8200
|
}
|
|
8124
8201
|
` }),
|
|
8125
|
-
/* @__PURE__ */
|
|
8202
|
+
/* @__PURE__ */ jsx37(
|
|
8126
8203
|
"div",
|
|
8127
8204
|
{
|
|
8128
8205
|
className: cn(
|
|
@@ -8148,7 +8225,7 @@ function FallingIcons({
|
|
|
8148
8225
|
const trailDelay = p.delay - (trailIndex + 1) * 0.15;
|
|
8149
8226
|
const trailOpacity = 1 - (trailIndex + 1) * (1 / (trailParticles.length + 1));
|
|
8150
8227
|
const trailScale = 1 - (trailIndex + 1) * 0.15;
|
|
8151
|
-
return /* @__PURE__ */
|
|
8228
|
+
return /* @__PURE__ */ jsx37(
|
|
8152
8229
|
"span",
|
|
8153
8230
|
{
|
|
8154
8231
|
className: cn("absolute top-0 will-change-transform pointer-events-none uv-falling-particle", colorClassName),
|
|
@@ -8162,7 +8239,7 @@ function FallingIcons({
|
|
|
8162
8239
|
opacity: trailOpacity * 0.4,
|
|
8163
8240
|
["--fall"]: `${fallDist ?? (typeof window !== "undefined" ? window.innerHeight + 200 : 1200)}px`
|
|
8164
8241
|
},
|
|
8165
|
-
children: /* @__PURE__ */
|
|
8242
|
+
children: /* @__PURE__ */ jsx37(
|
|
8166
8243
|
"span",
|
|
8167
8244
|
{
|
|
8168
8245
|
className: "inline-block uv-sway",
|
|
@@ -8174,7 +8251,7 @@ function FallingIcons({
|
|
|
8174
8251
|
animationIterationCount: "infinite",
|
|
8175
8252
|
["--amp"]: `${Math.round(p.driftAmp)}px`
|
|
8176
8253
|
},
|
|
8177
|
-
children: /* @__PURE__ */
|
|
8254
|
+
children: /* @__PURE__ */ jsx37(
|
|
8178
8255
|
"span",
|
|
8179
8256
|
{
|
|
8180
8257
|
className: "block",
|
|
@@ -8183,7 +8260,7 @@ function FallingIcons({
|
|
|
8183
8260
|
height: p.size,
|
|
8184
8261
|
...glowStyles
|
|
8185
8262
|
},
|
|
8186
|
-
children: /* @__PURE__ */
|
|
8263
|
+
children: /* @__PURE__ */ jsx37(TheIcon, { className: cn("w-full h-full text-primary/70", colorClassName) })
|
|
8187
8264
|
}
|
|
8188
8265
|
)
|
|
8189
8266
|
}
|
|
@@ -8192,7 +8269,7 @@ function FallingIcons({
|
|
|
8192
8269
|
`${p.key}-trail-${trailIndex}`
|
|
8193
8270
|
);
|
|
8194
8271
|
}),
|
|
8195
|
-
/* @__PURE__ */
|
|
8272
|
+
/* @__PURE__ */ jsx37(
|
|
8196
8273
|
"span",
|
|
8197
8274
|
{
|
|
8198
8275
|
className: cn("absolute top-0 will-change-transform pointer-events-auto uv-falling-particle", colorClassName),
|
|
@@ -8218,7 +8295,7 @@ function FallingIcons({
|
|
|
8218
8295
|
return next;
|
|
8219
8296
|
});
|
|
8220
8297
|
},
|
|
8221
|
-
children: /* @__PURE__ */
|
|
8298
|
+
children: /* @__PURE__ */ jsx37(
|
|
8222
8299
|
"span",
|
|
8223
8300
|
{
|
|
8224
8301
|
className: "inline-block uv-sway",
|
|
@@ -8230,7 +8307,7 @@ function FallingIcons({
|
|
|
8230
8307
|
animationIterationCount: "infinite",
|
|
8231
8308
|
["--amp"]: `${Math.round(p.driftAmp)}px`
|
|
8232
8309
|
},
|
|
8233
|
-
children: /* @__PURE__ */
|
|
8310
|
+
children: /* @__PURE__ */ jsx37(
|
|
8234
8311
|
"span",
|
|
8235
8312
|
{
|
|
8236
8313
|
className: cn(
|
|
@@ -8246,7 +8323,7 @@ function FallingIcons({
|
|
|
8246
8323
|
["--popName"]: PopName,
|
|
8247
8324
|
...glowStyles
|
|
8248
8325
|
},
|
|
8249
|
-
children: /* @__PURE__ */
|
|
8326
|
+
children: /* @__PURE__ */ jsx37(TheIcon, { className: cn("w-full h-full text-primary/70", colorClassName) })
|
|
8250
8327
|
}
|
|
8251
8328
|
)
|
|
8252
8329
|
}
|
|
@@ -8265,7 +8342,7 @@ function FallingIcons({
|
|
|
8265
8342
|
// ../../components/ui/List.tsx
|
|
8266
8343
|
import * as React31 from "react";
|
|
8267
8344
|
import { ChevronRight as ChevronRight7 } from "lucide-react";
|
|
8268
|
-
import { Fragment as Fragment13, jsx as
|
|
8345
|
+
import { Fragment as Fragment13, jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
8269
8346
|
var SIZE_STYLES2 = {
|
|
8270
8347
|
xs: { itemPad: "px-2 py-1.5", densePad: "px-2 py-1", label: "text-xs", desc: "text-[11px]", icon: "h-3.5 w-3.5", avatar: "h-6 w-6" },
|
|
8271
8348
|
sm: { itemPad: "px-3 py-2", densePad: "px-3 py-1.5", label: "text-[13px]", desc: "text-[12px]", icon: "h-4 w-4", avatar: "h-8 w-8" },
|
|
@@ -8282,10 +8359,10 @@ var BADGE_VARIANTS = {
|
|
|
8282
8359
|
var ListItemSkeleton = ({ size }) => {
|
|
8283
8360
|
const sz = SIZE_STYLES2[size];
|
|
8284
8361
|
return /* @__PURE__ */ jsxs34("div", { className: cn("flex items-center gap-3 animate-pulse", sz.itemPad), children: [
|
|
8285
|
-
/* @__PURE__ */
|
|
8362
|
+
/* @__PURE__ */ jsx38("div", { className: cn("rounded-full bg-muted shrink-0", sz.avatar) }),
|
|
8286
8363
|
/* @__PURE__ */ jsxs34("div", { className: "flex-1 space-y-2", children: [
|
|
8287
|
-
/* @__PURE__ */
|
|
8288
|
-
/* @__PURE__ */
|
|
8364
|
+
/* @__PURE__ */ jsx38("div", { className: "h-4 bg-muted rounded w-3/4" }),
|
|
8365
|
+
/* @__PURE__ */ jsx38("div", { className: "h-3 bg-muted rounded w-1/2" })
|
|
8289
8366
|
] })
|
|
8290
8367
|
] });
|
|
8291
8368
|
};
|
|
@@ -8319,12 +8396,12 @@ var ListRoot = React31.forwardRef(
|
|
|
8319
8396
|
striped: "rounded-lg border border-border overflow-hidden"
|
|
8320
8397
|
};
|
|
8321
8398
|
if (loading2) {
|
|
8322
|
-
return /* @__PURE__ */
|
|
8399
|
+
return /* @__PURE__ */ jsx38(Comp, { ref, className: cn("group/list", variantClasses[variant], inset && "p-1.5 md:p-2", divided && "divide-y divide-border/60", className), ...rest, children: Array.from({ length: loadingCount }).map((_, i) => /* @__PURE__ */ jsx38(ListItemSkeleton, { size }, i)) });
|
|
8323
8400
|
}
|
|
8324
8401
|
if (!hasChildren && emptyText) {
|
|
8325
|
-
return /* @__PURE__ */
|
|
8402
|
+
return /* @__PURE__ */ jsx38(Comp, { ref, className: cn("group/list", variantClasses[variant], inset && "p-1.5 md:p-2", className), ...rest, children: /* @__PURE__ */ jsx38("div", { className: "text-center py-8 text-muted-foreground text-sm", children: emptyText }) });
|
|
8326
8403
|
}
|
|
8327
|
-
return /* @__PURE__ */
|
|
8404
|
+
return /* @__PURE__ */ jsx38(
|
|
8328
8405
|
Comp,
|
|
8329
8406
|
{
|
|
8330
8407
|
ref,
|
|
@@ -8414,18 +8491,18 @@ var ListItem = React31.forwardRef(
|
|
|
8414
8491
|
className: cn("flex items-center gap-3", padding, "group/item relative"),
|
|
8415
8492
|
...headerProps,
|
|
8416
8493
|
children: [
|
|
8417
|
-
avatar && /* @__PURE__ */
|
|
8418
|
-
Left && !avatar && /* @__PURE__ */
|
|
8494
|
+
avatar && /* @__PURE__ */ jsx38("div", { className: cn("shrink-0", sz.avatar), children: typeof avatar === "string" ? /* @__PURE__ */ jsx38("img", { src: avatar, alt: "", className: cn("rounded-full object-cover", sz.avatar) }) : avatar }),
|
|
8495
|
+
Left && !avatar && /* @__PURE__ */ jsx38("span", { className: cn("text-muted-foreground shrink-0", sz.icon), children: /* @__PURE__ */ jsx38(Left, { className: cn(sz.icon) }) }),
|
|
8419
8496
|
/* @__PURE__ */ jsxs34("div", { className: "min-w-0 flex-1", children: [
|
|
8420
8497
|
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", children: [
|
|
8421
|
-
label && /* @__PURE__ */
|
|
8422
|
-
badge && /* @__PURE__ */
|
|
8498
|
+
label && /* @__PURE__ */ jsx38("div", { className: cn(sz.label, "text-foreground font-medium truncate"), children: label }),
|
|
8499
|
+
badge && /* @__PURE__ */ jsx38("span", { className: cn("px-2 py-0.5 rounded-full text-[11px] font-medium shrink-0", BADGE_VARIANTS[badgeVariant]), children: badge })
|
|
8423
8500
|
] }),
|
|
8424
|
-
description && /* @__PURE__ */
|
|
8425
|
-
children && /* @__PURE__ */
|
|
8501
|
+
description && /* @__PURE__ */ jsx38("div", { className: cn(sz.desc, "text-muted-foreground truncate mt-0.5"), children: description }),
|
|
8502
|
+
children && /* @__PURE__ */ jsx38("div", { className: "mt-1", children })
|
|
8426
8503
|
] }),
|
|
8427
|
-
action && /* @__PURE__ */
|
|
8428
|
-
collapsible ? /* @__PURE__ */
|
|
8504
|
+
action && /* @__PURE__ */ jsx38("div", { className: "opacity-0 group-hover/item:opacity-100 transition-opacity shrink-0", children: action }),
|
|
8505
|
+
collapsible ? /* @__PURE__ */ jsx38(
|
|
8429
8506
|
"span",
|
|
8430
8507
|
{
|
|
8431
8508
|
className: cn(
|
|
@@ -8433,13 +8510,13 @@ var ListItem = React31.forwardRef(
|
|
|
8433
8510
|
sz.icon,
|
|
8434
8511
|
isExpanded && "rotate-90"
|
|
8435
8512
|
),
|
|
8436
|
-
children: /* @__PURE__ */
|
|
8513
|
+
children: /* @__PURE__ */ jsx38(ChevronRight7, { className: cn(sz.icon) })
|
|
8437
8514
|
}
|
|
8438
|
-
) : Right && /* @__PURE__ */
|
|
8515
|
+
) : Right && /* @__PURE__ */ jsx38("span", { className: cn("text-muted-foreground shrink-0", sz.icon), children: /* @__PURE__ */ jsx38(Right, { className: cn(sz.icon) }) })
|
|
8439
8516
|
]
|
|
8440
8517
|
}
|
|
8441
8518
|
),
|
|
8442
|
-
collapsible && isExpanded && expandContent && /* @__PURE__ */
|
|
8519
|
+
collapsible && isExpanded && expandContent && /* @__PURE__ */ jsx38("div", { className: cn("border-t border-border/50 bg-muted/20", padding, "pt-3"), children: expandContent })
|
|
8443
8520
|
] });
|
|
8444
8521
|
const baseCls = cn(
|
|
8445
8522
|
"relative w-full",
|
|
@@ -8449,10 +8526,10 @@ var ListItem = React31.forwardRef(
|
|
|
8449
8526
|
);
|
|
8450
8527
|
if (href) {
|
|
8451
8528
|
const A = as === "a" ? "a" : "a";
|
|
8452
|
-
return /* @__PURE__ */
|
|
8529
|
+
return /* @__PURE__ */ jsx38(A, { ref, href, className: cn(baseCls, "block"), ...rest, children: inner });
|
|
8453
8530
|
}
|
|
8454
8531
|
if (as === "button" && !collapsible) {
|
|
8455
|
-
return /* @__PURE__ */
|
|
8532
|
+
return /* @__PURE__ */ jsx38(
|
|
8456
8533
|
"button",
|
|
8457
8534
|
{
|
|
8458
8535
|
ref,
|
|
@@ -8464,7 +8541,7 @@ var ListItem = React31.forwardRef(
|
|
|
8464
8541
|
);
|
|
8465
8542
|
}
|
|
8466
8543
|
if (collapsible) {
|
|
8467
|
-
return /* @__PURE__ */
|
|
8544
|
+
return /* @__PURE__ */ jsx38(
|
|
8468
8545
|
"div",
|
|
8469
8546
|
{
|
|
8470
8547
|
ref,
|
|
@@ -8475,7 +8552,7 @@ var ListItem = React31.forwardRef(
|
|
|
8475
8552
|
);
|
|
8476
8553
|
}
|
|
8477
8554
|
const Comp = as;
|
|
8478
|
-
return /* @__PURE__ */
|
|
8555
|
+
return /* @__PURE__ */ jsx38(Comp, { ref, className: baseCls, ...rest, children: inner });
|
|
8479
8556
|
}
|
|
8480
8557
|
);
|
|
8481
8558
|
ListItem.displayName = "List.Item";
|
|
@@ -8485,7 +8562,7 @@ var List_default = List;
|
|
|
8485
8562
|
// ../../components/ui/Watermark.tsx
|
|
8486
8563
|
import * as React32 from "react";
|
|
8487
8564
|
import { createPortal as createPortal9 } from "react-dom";
|
|
8488
|
-
import { Fragment as Fragment14, jsx as
|
|
8565
|
+
import { Fragment as Fragment14, jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
8489
8566
|
var PRESETS2 = {
|
|
8490
8567
|
confidential: { text: "CONFIDENTIAL", color: "rgba(220, 38, 38, 0.15)", rotate: -22, fontSize: 16, fontWeight: "bold" },
|
|
8491
8568
|
draft: { text: "DRAFT", color: "rgba(59, 130, 246, 0.15)", rotate: -22, fontSize: 18, fontWeight: "bold" },
|
|
@@ -8740,7 +8817,7 @@ var Watermark = ({
|
|
|
8740
8817
|
if (dataURL) overlayStyle.backgroundImage = `url(${dataURL})`;
|
|
8741
8818
|
const animationClass = animate ? getAnimationClass(animationVariant, visible) : "";
|
|
8742
8819
|
const blurClass = blur ? `backdrop-blur-[${blurAmount}px]` : "";
|
|
8743
|
-
const overlay = /* @__PURE__ */
|
|
8820
|
+
const overlay = /* @__PURE__ */ jsx39(
|
|
8744
8821
|
"div",
|
|
8745
8822
|
{
|
|
8746
8823
|
role: interactive ? "button" : void 0,
|
|
@@ -8779,7 +8856,7 @@ var Watermark_default = Watermark;
|
|
|
8779
8856
|
// ../../components/ui/Timeline.tsx
|
|
8780
8857
|
import * as React33 from "react";
|
|
8781
8858
|
import { ChevronDown as ChevronDown4 } from "lucide-react";
|
|
8782
|
-
import { jsx as
|
|
8859
|
+
import { jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
8783
8860
|
var SIZE_STYLE = {
|
|
8784
8861
|
sm: { dot: "h-2.5 w-2.5", iconDot: "h-6 w-6", padY: "py-3", densePadY: "py-2", title: "text-sm", desc: "text-xs", time: "text-[11px]", icon: "h-3.5 w-3.5" },
|
|
8785
8862
|
md: { dot: "h-3 w-3", iconDot: "h-8 w-8", padY: "py-4", densePadY: "py-2.5", title: "text-base", desc: "text-sm", time: "text-xs", icon: "h-4 w-4" },
|
|
@@ -8805,21 +8882,21 @@ var Marker = ({ index, last, size, color, status = "default", lineColor, lineSty
|
|
|
8805
8882
|
const dotColor = color ? `background:${color}` : void 0;
|
|
8806
8883
|
const cls = color ? void 0 : STATUS_COLOR[status];
|
|
8807
8884
|
return /* @__PURE__ */ jsxs36("div", { className: "flex flex-col items-center", children: [
|
|
8808
|
-
dot ? /* @__PURE__ */
|
|
8885
|
+
dot ? /* @__PURE__ */ jsx40("div", { className: "flex items-center justify-center", children: dot }) : Icon ? /* @__PURE__ */ jsx40(
|
|
8809
8886
|
"div",
|
|
8810
8887
|
{
|
|
8811
8888
|
className: cn("rounded-full ring-2 ring-background flex items-center justify-center", sz.iconDot, cls, active && "ring-primary/40 ring-4"),
|
|
8812
8889
|
style: dotColor ? { background: color } : void 0,
|
|
8813
|
-
children: /* @__PURE__ */
|
|
8890
|
+
children: /* @__PURE__ */ jsx40(Icon, { className: cn("text-white", sz.icon) })
|
|
8814
8891
|
}
|
|
8815
|
-
) : /* @__PURE__ */
|
|
8892
|
+
) : /* @__PURE__ */ jsx40(
|
|
8816
8893
|
"div",
|
|
8817
8894
|
{
|
|
8818
8895
|
className: cn("rounded-full ring-2 ring-background", sz.dot, cls, active && "ring-primary/40 ring-4 scale-125"),
|
|
8819
8896
|
style: dotColor ? { background: color } : void 0
|
|
8820
8897
|
}
|
|
8821
8898
|
),
|
|
8822
|
-
!last && showLine && /* @__PURE__ */
|
|
8899
|
+
!last && showLine && /* @__PURE__ */ jsx40(
|
|
8823
8900
|
"div",
|
|
8824
8901
|
{
|
|
8825
8902
|
className: cn("flex-1 border-l-2", LINE_STYLE_MAP[lineStyle]),
|
|
@@ -8845,8 +8922,8 @@ var TimelineRoot = React33.forwardRef(
|
|
|
8845
8922
|
children,
|
|
8846
8923
|
...rest
|
|
8847
8924
|
}, ref) => {
|
|
8848
|
-
const content = items ? items.map((it, i) => /* @__PURE__ */
|
|
8849
|
-
return /* @__PURE__ */
|
|
8925
|
+
const content = items ? items.map((it, i) => /* @__PURE__ */ jsx40(TimelineItem, { ...it, className: cn(itemClassName, it.className), "data-index": i, "data-last": i === (items?.length ?? 0) - 1 }, i)) : children;
|
|
8926
|
+
return /* @__PURE__ */ jsx40(TimelineContext.Provider, { value: { align, variant, size, mode, lineColor, lineStyle, itemClassName, animate, dense, showLine }, children: /* @__PURE__ */ jsx40(
|
|
8850
8927
|
"div",
|
|
8851
8928
|
{
|
|
8852
8929
|
ref,
|
|
@@ -8857,7 +8934,7 @@ var TimelineRoot = React33.forwardRef(
|
|
|
8857
8934
|
className
|
|
8858
8935
|
),
|
|
8859
8936
|
...rest,
|
|
8860
|
-
children: mode === "vertical" ? /* @__PURE__ */
|
|
8937
|
+
children: mode === "vertical" ? /* @__PURE__ */ jsx40("div", { className: "space-y-0", children: content }) : content
|
|
8861
8938
|
}
|
|
8862
8939
|
) });
|
|
8863
8940
|
}
|
|
@@ -8909,33 +8986,33 @@ var TimelineItem = React33.forwardRef(
|
|
|
8909
8986
|
/* @__PURE__ */ jsxs36("div", { className: "flex items-start justify-between gap-2", children: [
|
|
8910
8987
|
/* @__PURE__ */ jsxs36("div", { className: "flex-1 min-w-0", children: [
|
|
8911
8988
|
title && /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2", children: [
|
|
8912
|
-
/* @__PURE__ */
|
|
8913
|
-
badge && /* @__PURE__ */
|
|
8989
|
+
/* @__PURE__ */ jsx40("div", { className: cn("font-semibold text-foreground", sz.title), children: title }),
|
|
8990
|
+
badge && /* @__PURE__ */ jsx40("span", { className: "px-2 py-0.5 rounded-full text-[10px] font-medium bg-primary/10 text-primary", children: badge })
|
|
8914
8991
|
] }),
|
|
8915
|
-
description && /* @__PURE__ */
|
|
8916
|
-
children && /* @__PURE__ */
|
|
8992
|
+
description && /* @__PURE__ */ jsx40("div", { className: cn("text-muted-foreground mt-1", sz.desc), children: description }),
|
|
8993
|
+
children && /* @__PURE__ */ jsx40("div", { className: "mt-2", children })
|
|
8917
8994
|
] }),
|
|
8918
|
-
collapsible && /* @__PURE__ */
|
|
8995
|
+
collapsible && /* @__PURE__ */ jsx40(
|
|
8919
8996
|
"button",
|
|
8920
8997
|
{
|
|
8921
8998
|
type: "button",
|
|
8922
8999
|
onClick: toggleExpanded,
|
|
8923
9000
|
className: cn("text-muted-foreground hover:text-foreground transition-transform p-1", isExpanded && "rotate-180"),
|
|
8924
|
-
children: /* @__PURE__ */
|
|
9001
|
+
children: /* @__PURE__ */ jsx40(ChevronDown4, { className: "h-4 w-4" })
|
|
8925
9002
|
}
|
|
8926
9003
|
)
|
|
8927
9004
|
] }),
|
|
8928
|
-
time && /* @__PURE__ */
|
|
8929
|
-
collapsible && isExpanded && expandContent && /* @__PURE__ */
|
|
9005
|
+
time && /* @__PURE__ */ jsx40("div", { className: cn("mt-2 text-muted-foreground flex items-center gap-1", sz.time), children: time }),
|
|
9006
|
+
collapsible && isExpanded && expandContent && /* @__PURE__ */ jsx40("div", { className: "mt-3 pt-3 border-t border-border/50 text-sm", children: expandContent })
|
|
8930
9007
|
] });
|
|
8931
9008
|
const markerWidth = Icon || dot ? "w-auto" : "w-6";
|
|
8932
9009
|
const leftSide = /* @__PURE__ */ jsxs36("div", { className: cn("flex items-stretch gap-4", padding, ctx.animate && "animate-in slide-in-from-left duration-500"), style: { animationDelay: ctx.animate ? `${(idx ?? 0) * 100}ms` : void 0 }, children: [
|
|
8933
|
-
/* @__PURE__ */
|
|
8934
|
-
/* @__PURE__ */
|
|
9010
|
+
/* @__PURE__ */ jsx40("div", { className: cn("flex-shrink-0 flex items-stretch", markerWidth), children: /* @__PURE__ */ jsx40(Marker, { index: idx ?? 0, last: isLast, size: ctx.size, color, status, lineColor: ctx.lineColor, lineStyle: ctx.lineStyle, active, dot, icon: Icon, showLine: ctx.showLine }) }),
|
|
9011
|
+
/* @__PURE__ */ jsx40("div", { className: "flex-1", children: contentBox })
|
|
8935
9012
|
] });
|
|
8936
9013
|
const rightSide = /* @__PURE__ */ jsxs36("div", { className: cn("flex items-stretch gap-4", padding, ctx.animate && "animate-in slide-in-from-right duration-500"), style: { animationDelay: ctx.animate ? `${(idx ?? 0) * 100}ms` : void 0 }, children: [
|
|
8937
|
-
/* @__PURE__ */
|
|
8938
|
-
/* @__PURE__ */
|
|
9014
|
+
/* @__PURE__ */ jsx40("div", { className: "flex-1 flex justify-end", children: contentBox }),
|
|
9015
|
+
/* @__PURE__ */ jsx40("div", { className: cn("flex-shrink-0 flex items-stretch", markerWidth), children: /* @__PURE__ */ jsx40(Marker, { index: idx ?? 0, last: isLast, size: ctx.size, color, status, lineColor: ctx.lineColor, lineStyle: ctx.lineStyle, active, dot, icon: Icon, showLine: ctx.showLine }) })
|
|
8939
9016
|
] });
|
|
8940
9017
|
const horizontalItem = /* @__PURE__ */ jsxs36(
|
|
8941
9018
|
"div",
|
|
@@ -8946,19 +9023,19 @@ var TimelineItem = React33.forwardRef(
|
|
|
8946
9023
|
),
|
|
8947
9024
|
style: { animationDelay: ctx.animate ? `${(idx ?? 0) * 100}ms` : void 0 },
|
|
8948
9025
|
children: [
|
|
8949
|
-
/* @__PURE__ */
|
|
8950
|
-
!isLast && ctx.showLine && /* @__PURE__ */
|
|
9026
|
+
/* @__PURE__ */ jsx40(Marker, { index: idx ?? 0, last: isLast, size: ctx.size, color, status, lineColor: ctx.lineColor, lineStyle: ctx.lineStyle, active, dot, icon: Icon, showLine: false }),
|
|
9027
|
+
!isLast && ctx.showLine && /* @__PURE__ */ jsx40("div", { className: cn("h-px w-full border-t-2", LINE_STYLE_MAP[ctx.lineStyle]), style: { borderColor: ctx.lineColor || "hsl(var(--border))" } }),
|
|
8951
9028
|
contentBox
|
|
8952
9029
|
]
|
|
8953
9030
|
}
|
|
8954
9031
|
);
|
|
8955
9032
|
if (ctx.mode === "horizontal") {
|
|
8956
|
-
return /* @__PURE__ */
|
|
9033
|
+
return /* @__PURE__ */ jsx40("div", { ref, className: cn("relative", className), ...rest, children: horizontalItem });
|
|
8957
9034
|
}
|
|
8958
9035
|
let row = leftSide;
|
|
8959
9036
|
if (ctx.align === "right") row = rightSide;
|
|
8960
9037
|
if (ctx.align === "alternate") row = (idx ?? 0) % 2 === 0 ? leftSide : rightSide;
|
|
8961
|
-
return /* @__PURE__ */
|
|
9038
|
+
return /* @__PURE__ */ jsx40("div", { ref, className: cn("relative", className), ...rest, children: row });
|
|
8962
9039
|
}
|
|
8963
9040
|
);
|
|
8964
9041
|
TimelineItem.displayName = "Timeline.Item";
|
|
@@ -8968,7 +9045,7 @@ var Timeline_default = Timeline;
|
|
|
8968
9045
|
// ../../components/ui/ColorPicker.tsx
|
|
8969
9046
|
import * as React34 from "react";
|
|
8970
9047
|
import { Pipette, X as X10, Copy, Check as Check8, Palette, History } from "lucide-react";
|
|
8971
|
-
import { jsx as
|
|
9048
|
+
import { jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
8972
9049
|
var clamp = (n, min, max) => Math.max(min, Math.min(max, n));
|
|
8973
9050
|
function hexToRgb(hex) {
|
|
8974
9051
|
const str = hex.replace(/^#/, "").trim();
|
|
@@ -9127,7 +9204,7 @@ var Swatch = ({
|
|
|
9127
9204
|
md: "h-6 w-6",
|
|
9128
9205
|
lg: "h-8 w-8"
|
|
9129
9206
|
};
|
|
9130
|
-
return /* @__PURE__ */
|
|
9207
|
+
return /* @__PURE__ */ jsx41(
|
|
9131
9208
|
"button",
|
|
9132
9209
|
{
|
|
9133
9210
|
type: "button",
|
|
@@ -9266,7 +9343,7 @@ function ColorPicker({
|
|
|
9266
9343
|
"aria-label": "Open color picker",
|
|
9267
9344
|
children: [
|
|
9268
9345
|
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
|
|
9269
|
-
/* @__PURE__ */
|
|
9346
|
+
/* @__PURE__ */ jsx41(
|
|
9270
9347
|
"span",
|
|
9271
9348
|
{
|
|
9272
9349
|
className: cn(
|
|
@@ -9276,9 +9353,9 @@ function ColorPicker({
|
|
|
9276
9353
|
style: { backgroundColor: withAlpha ? `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})` : hexForInput }
|
|
9277
9354
|
}
|
|
9278
9355
|
),
|
|
9279
|
-
/* @__PURE__ */
|
|
9356
|
+
/* @__PURE__ */ jsx41("span", { className: "font-mono text-muted-foreground", children: text })
|
|
9280
9357
|
] }),
|
|
9281
|
-
/* @__PURE__ */
|
|
9358
|
+
/* @__PURE__ */ jsx41(Pipette, { className: cn(size === "sm" ? "w-3.5 h-3.5" : size === "lg" ? "w-5 h-5" : "w-4 h-4", "text-muted-foreground") })
|
|
9282
9359
|
]
|
|
9283
9360
|
}
|
|
9284
9361
|
);
|
|
@@ -9288,7 +9365,7 @@ function ColorPicker({
|
|
|
9288
9365
|
default: 320,
|
|
9289
9366
|
full: 360
|
|
9290
9367
|
};
|
|
9291
|
-
return /* @__PURE__ */
|
|
9368
|
+
return /* @__PURE__ */ jsx41("div", { className: cn("inline-block w-full", className), ...rest, children: /* @__PURE__ */ jsx41(
|
|
9292
9369
|
Popover,
|
|
9293
9370
|
{
|
|
9294
9371
|
trigger,
|
|
@@ -9300,7 +9377,7 @@ function ColorPicker({
|
|
|
9300
9377
|
contentClassName: cn("p-3 rounded-lg border border-border bg-card shadow-lg", contentClassName),
|
|
9301
9378
|
children: /* @__PURE__ */ jsxs37("div", { className: "space-y-3", children: [
|
|
9302
9379
|
variant !== "minimal" && /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
|
|
9303
|
-
/* @__PURE__ */
|
|
9380
|
+
/* @__PURE__ */ jsx41("input", { type: "color", value: hexForInput, onChange: handleNativeChange, className: "h-9 w-9 rounded-md cursor-pointer border border-border" }),
|
|
9304
9381
|
/* @__PURE__ */ jsxs37(
|
|
9305
9382
|
"button",
|
|
9306
9383
|
{
|
|
@@ -9308,7 +9385,7 @@ function ColorPicker({
|
|
|
9308
9385
|
onClick: tryEyedropper,
|
|
9309
9386
|
className: cn("h-9 px-3 rounded-md border border-border text-xs hover:bg-accent/10 transition-colors flex items-center gap-1.5"),
|
|
9310
9387
|
children: [
|
|
9311
|
-
/* @__PURE__ */
|
|
9388
|
+
/* @__PURE__ */ jsx41(Pipette, { className: "w-3.5 h-3.5" }),
|
|
9312
9389
|
variant === "full" && "Pick"
|
|
9313
9390
|
]
|
|
9314
9391
|
}
|
|
@@ -9323,7 +9400,7 @@ function ColorPicker({
|
|
|
9323
9400
|
copied && "bg-green-500/10 border-green-500/30"
|
|
9324
9401
|
),
|
|
9325
9402
|
children: [
|
|
9326
|
-
copied ? /* @__PURE__ */
|
|
9403
|
+
copied ? /* @__PURE__ */ jsx41(Check8, { className: "w-3.5 h-3.5 text-green-600" }) : /* @__PURE__ */ jsx41(Copy, { className: "w-3.5 h-3.5" }),
|
|
9327
9404
|
variant === "full" && (copied ? "Copied!" : "Copy")
|
|
9328
9405
|
]
|
|
9329
9406
|
}
|
|
@@ -9335,14 +9412,14 @@ function ColorPicker({
|
|
|
9335
9412
|
onClick: clear,
|
|
9336
9413
|
className: "ml-auto h-9 px-2 rounded-md border border-border text-xs hover:bg-destructive/10 transition-colors flex items-center gap-1",
|
|
9337
9414
|
children: [
|
|
9338
|
-
/* @__PURE__ */
|
|
9415
|
+
/* @__PURE__ */ jsx41(X10, { className: "w-3.5 h-3.5" }),
|
|
9339
9416
|
variant === "full" && "Clear"
|
|
9340
9417
|
]
|
|
9341
9418
|
}
|
|
9342
9419
|
)
|
|
9343
9420
|
] }),
|
|
9344
9421
|
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
|
|
9345
|
-
/* @__PURE__ */
|
|
9422
|
+
/* @__PURE__ */ jsx41(
|
|
9346
9423
|
Input_default,
|
|
9347
9424
|
{
|
|
9348
9425
|
value: text,
|
|
@@ -9353,7 +9430,7 @@ function ColorPicker({
|
|
|
9353
9430
|
className: "flex-1"
|
|
9354
9431
|
}
|
|
9355
9432
|
),
|
|
9356
|
-
variant === "minimal" && copyable && /* @__PURE__ */
|
|
9433
|
+
variant === "minimal" && copyable && /* @__PURE__ */ jsx41(
|
|
9357
9434
|
"button",
|
|
9358
9435
|
{
|
|
9359
9436
|
type: "button",
|
|
@@ -9362,17 +9439,17 @@ function ColorPicker({
|
|
|
9362
9439
|
"h-9 w-9 rounded-md border border-border hover:bg-accent/10 transition-colors flex items-center justify-center",
|
|
9363
9440
|
copied && "bg-green-500/10 border-green-500/30"
|
|
9364
9441
|
),
|
|
9365
|
-
children: copied ? /* @__PURE__ */
|
|
9442
|
+
children: copied ? /* @__PURE__ */ jsx41(Check8, { className: "w-3.5 h-3.5 text-green-600" }) : /* @__PURE__ */ jsx41(Copy, { className: "w-3.5 h-3.5" })
|
|
9366
9443
|
}
|
|
9367
9444
|
)
|
|
9368
9445
|
] }),
|
|
9369
|
-
withAlpha && /* @__PURE__ */
|
|
9446
|
+
withAlpha && /* @__PURE__ */ jsx41("div", { className: "pt-1", children: /* @__PURE__ */ jsx41(Slider, { min: 0, max: 100, step: 1, value: alphaPct, onChange: (v) => setAlpha(v), label: "Alpha", showValue: true, formatValue: (v) => `${v}%`, size: "sm" }) }),
|
|
9370
9447
|
variant !== "minimal" && /* @__PURE__ */ jsxs37("div", { children: [
|
|
9371
9448
|
/* @__PURE__ */ jsxs37("div", { className: "text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1.5", children: [
|
|
9372
|
-
/* @__PURE__ */
|
|
9449
|
+
/* @__PURE__ */ jsx41(Palette, { className: "w-3.5 h-3.5" }),
|
|
9373
9450
|
" Presets"
|
|
9374
9451
|
] }),
|
|
9375
|
-
/* @__PURE__ */
|
|
9452
|
+
/* @__PURE__ */ jsx41("div", { className: "grid grid-cols-8 gap-2", children: swatches.map((c) => /* @__PURE__ */ jsx41(
|
|
9376
9453
|
Swatch,
|
|
9377
9454
|
{
|
|
9378
9455
|
color: c,
|
|
@@ -9390,10 +9467,10 @@ function ColorPicker({
|
|
|
9390
9467
|
] }),
|
|
9391
9468
|
showRecent && recentColors.length > 0 && /* @__PURE__ */ jsxs37("div", { children: [
|
|
9392
9469
|
/* @__PURE__ */ jsxs37("div", { className: "text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1.5", children: [
|
|
9393
|
-
/* @__PURE__ */
|
|
9470
|
+
/* @__PURE__ */ jsx41(History, { className: "w-3.5 h-3.5" }),
|
|
9394
9471
|
" Recent"
|
|
9395
9472
|
] }),
|
|
9396
|
-
/* @__PURE__ */
|
|
9473
|
+
/* @__PURE__ */ jsx41("div", { className: "flex gap-2 flex-wrap", children: recentColors.map((c, i) => /* @__PURE__ */ jsx41(
|
|
9397
9474
|
Swatch,
|
|
9398
9475
|
{
|
|
9399
9476
|
color: c,
|
|
@@ -9410,11 +9487,11 @@ function ColorPicker({
|
|
|
9410
9487
|
)) })
|
|
9411
9488
|
] }),
|
|
9412
9489
|
showHarmony && harmony && variant !== "minimal" && /* @__PURE__ */ jsxs37("div", { children: [
|
|
9413
|
-
/* @__PURE__ */
|
|
9490
|
+
/* @__PURE__ */ jsx41("div", { className: "text-xs font-medium text-muted-foreground mb-2", children: "Harmony" }),
|
|
9414
9491
|
/* @__PURE__ */ jsxs37("div", { className: "space-y-2", children: [
|
|
9415
9492
|
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
|
|
9416
|
-
/* @__PURE__ */
|
|
9417
|
-
/* @__PURE__ */
|
|
9493
|
+
/* @__PURE__ */ jsx41("span", { className: "text-xs text-muted-foreground w-24", children: "Complementary" }),
|
|
9494
|
+
/* @__PURE__ */ jsx41(
|
|
9418
9495
|
Swatch,
|
|
9419
9496
|
{
|
|
9420
9497
|
color: harmony.complementary,
|
|
@@ -9428,11 +9505,11 @@ function ColorPicker({
|
|
|
9428
9505
|
}
|
|
9429
9506
|
}
|
|
9430
9507
|
),
|
|
9431
|
-
/* @__PURE__ */
|
|
9508
|
+
/* @__PURE__ */ jsx41("span", { className: "text-xs font-mono text-muted-foreground", children: harmony.complementary })
|
|
9432
9509
|
] }),
|
|
9433
9510
|
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
|
|
9434
|
-
/* @__PURE__ */
|
|
9435
|
-
/* @__PURE__ */
|
|
9511
|
+
/* @__PURE__ */ jsx41("span", { className: "text-xs text-muted-foreground w-24", children: "Triadic" }),
|
|
9512
|
+
/* @__PURE__ */ jsx41("div", { className: "flex gap-2", children: harmony.triadic.map((c) => /* @__PURE__ */ jsx41(
|
|
9436
9513
|
Swatch,
|
|
9437
9514
|
{
|
|
9438
9515
|
color: c,
|
|
@@ -9449,8 +9526,8 @@ function ColorPicker({
|
|
|
9449
9526
|
)) })
|
|
9450
9527
|
] }),
|
|
9451
9528
|
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
|
|
9452
|
-
/* @__PURE__ */
|
|
9453
|
-
/* @__PURE__ */
|
|
9529
|
+
/* @__PURE__ */ jsx41("span", { className: "text-xs text-muted-foreground w-24", children: "Analogous" }),
|
|
9530
|
+
/* @__PURE__ */ jsx41("div", { className: "flex gap-2", children: harmony.analogous.map((c) => /* @__PURE__ */ jsx41(
|
|
9454
9531
|
Swatch,
|
|
9455
9532
|
{
|
|
9456
9533
|
color: c,
|
|
@@ -9475,7 +9552,7 @@ function ColorPicker({
|
|
|
9475
9552
|
|
|
9476
9553
|
// ../../components/ui/Grid.tsx
|
|
9477
9554
|
import React35, { useId as useId6 } from "react";
|
|
9478
|
-
import { Fragment as Fragment15, jsx as
|
|
9555
|
+
import { Fragment as Fragment15, jsx as jsx42, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
9479
9556
|
var BP_MIN = {
|
|
9480
9557
|
sm: 640,
|
|
9481
9558
|
md: 768,
|
|
@@ -9595,7 +9672,7 @@ var GridRoot = React35.forwardRef(
|
|
|
9595
9672
|
style,
|
|
9596
9673
|
...rest,
|
|
9597
9674
|
children: [
|
|
9598
|
-
/* @__PURE__ */
|
|
9675
|
+
/* @__PURE__ */ jsx42("style", { dangerouslySetInnerHTML: { __html: css } }),
|
|
9599
9676
|
children
|
|
9600
9677
|
]
|
|
9601
9678
|
}
|
|
@@ -9638,7 +9715,7 @@ var GridItem = React35.forwardRef(
|
|
|
9638
9715
|
st.animation = `uvGridItemFadeIn 0.5s ease-out forwards`;
|
|
9639
9716
|
}
|
|
9640
9717
|
return /* @__PURE__ */ jsxs38(Fragment15, { children: [
|
|
9641
|
-
animationDelay != null && /* @__PURE__ */
|
|
9718
|
+
animationDelay != null && /* @__PURE__ */ jsx42(
|
|
9642
9719
|
"style",
|
|
9643
9720
|
{
|
|
9644
9721
|
dangerouslySetInnerHTML: {
|
|
@@ -9646,7 +9723,7 @@ var GridItem = React35.forwardRef(
|
|
|
9646
9723
|
}
|
|
9647
9724
|
}
|
|
9648
9725
|
),
|
|
9649
|
-
/* @__PURE__ */
|
|
9726
|
+
/* @__PURE__ */ jsx42(
|
|
9650
9727
|
"div",
|
|
9651
9728
|
{
|
|
9652
9729
|
ref,
|
|
@@ -9667,21 +9744,21 @@ var Grid_default = Grid;
|
|
|
9667
9744
|
|
|
9668
9745
|
// ../../components/ui/ClientOnly.tsx
|
|
9669
9746
|
import { useEffect as useEffect18, useState as useState31 } from "react";
|
|
9670
|
-
import { Fragment as Fragment16, jsx as
|
|
9747
|
+
import { Fragment as Fragment16, jsx as jsx43 } from "react/jsx-runtime";
|
|
9671
9748
|
function ClientOnly({ children, fallback = null }) {
|
|
9672
9749
|
const [hasMounted, setHasMounted] = useState31(false);
|
|
9673
9750
|
useEffect18(() => {
|
|
9674
9751
|
setHasMounted(true);
|
|
9675
9752
|
}, []);
|
|
9676
9753
|
if (!hasMounted) {
|
|
9677
|
-
return /* @__PURE__ */
|
|
9754
|
+
return /* @__PURE__ */ jsx43(Fragment16, { children: fallback });
|
|
9678
9755
|
}
|
|
9679
|
-
return /* @__PURE__ */
|
|
9756
|
+
return /* @__PURE__ */ jsx43(Fragment16, { children });
|
|
9680
9757
|
}
|
|
9681
9758
|
|
|
9682
9759
|
// ../../components/ui/Loading.tsx
|
|
9683
9760
|
import { Activity as Activity3 } from "lucide-react";
|
|
9684
|
-
import { jsx as
|
|
9761
|
+
import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
9685
9762
|
var LoadingSpinner = ({
|
|
9686
9763
|
size = "md",
|
|
9687
9764
|
className,
|
|
@@ -9697,7 +9774,7 @@ var LoadingSpinner = ({
|
|
|
9697
9774
|
foreground: "text-foreground",
|
|
9698
9775
|
muted: "text-muted-foreground"
|
|
9699
9776
|
};
|
|
9700
|
-
return /* @__PURE__ */
|
|
9777
|
+
return /* @__PURE__ */ jsx44(
|
|
9701
9778
|
Activity3,
|
|
9702
9779
|
{
|
|
9703
9780
|
className: cn(
|
|
@@ -9718,7 +9795,7 @@ var LoadingDots = ({
|
|
|
9718
9795
|
foreground: "bg-foreground",
|
|
9719
9796
|
muted: "bg-muted-foreground"
|
|
9720
9797
|
};
|
|
9721
|
-
return /* @__PURE__ */
|
|
9798
|
+
return /* @__PURE__ */ jsx44("div", { className: cn("flex items-center space-x-1", className), children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx44(
|
|
9722
9799
|
"div",
|
|
9723
9800
|
{
|
|
9724
9801
|
className: cn(
|
|
@@ -9740,7 +9817,7 @@ var LoadingBar = ({
|
|
|
9740
9817
|
label
|
|
9741
9818
|
}) => {
|
|
9742
9819
|
const pct = progress ? Math.min(Math.max(progress, 0), 100) : void 0;
|
|
9743
|
-
return /* @__PURE__ */
|
|
9820
|
+
return /* @__PURE__ */ jsx44(
|
|
9744
9821
|
"div",
|
|
9745
9822
|
{
|
|
9746
9823
|
className: cn("w-full bg-muted rounded-full h-2", className),
|
|
@@ -9749,7 +9826,7 @@ var LoadingBar = ({
|
|
|
9749
9826
|
"aria-valuemax": pct === void 0 ? void 0 : 100,
|
|
9750
9827
|
"aria-valuenow": pct === void 0 ? void 0 : Math.round(pct),
|
|
9751
9828
|
"aria-label": label || "Loading",
|
|
9752
|
-
children: /* @__PURE__ */
|
|
9829
|
+
children: /* @__PURE__ */ jsx44(
|
|
9753
9830
|
"div",
|
|
9754
9831
|
{
|
|
9755
9832
|
className: cn(
|
|
@@ -9767,9 +9844,9 @@ var LoadingBar = ({
|
|
|
9767
9844
|
|
|
9768
9845
|
// ../../components/ui/Table.tsx
|
|
9769
9846
|
import React36 from "react";
|
|
9770
|
-
import { jsx as
|
|
9847
|
+
import { jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
9771
9848
|
var Table = React36.forwardRef(
|
|
9772
|
-
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */
|
|
9849
|
+
({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9773
9850
|
"div",
|
|
9774
9851
|
{
|
|
9775
9852
|
className: cn(
|
|
@@ -9779,7 +9856,7 @@ var Table = React36.forwardRef(
|
|
|
9779
9856
|
"backdrop-blur-sm transition-all duration-300",
|
|
9780
9857
|
containerClassName
|
|
9781
9858
|
),
|
|
9782
|
-
children: /* @__PURE__ */
|
|
9859
|
+
children: /* @__PURE__ */ jsx45(
|
|
9783
9860
|
"table",
|
|
9784
9861
|
{
|
|
9785
9862
|
ref,
|
|
@@ -9810,7 +9887,7 @@ var TableHeader = React36.forwardRef(
|
|
|
9810
9887
|
)
|
|
9811
9888
|
);
|
|
9812
9889
|
TableHeader.displayName = "TableHeader";
|
|
9813
|
-
var TableBody = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
9890
|
+
var TableBody = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9814
9891
|
"tbody",
|
|
9815
9892
|
{
|
|
9816
9893
|
ref,
|
|
@@ -9819,7 +9896,7 @@ var TableBody = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
9819
9896
|
}
|
|
9820
9897
|
));
|
|
9821
9898
|
TableBody.displayName = "TableBody";
|
|
9822
|
-
var TableFooter = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
9899
|
+
var TableFooter = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9823
9900
|
"tfoot",
|
|
9824
9901
|
{
|
|
9825
9902
|
ref,
|
|
@@ -9831,7 +9908,7 @@ var TableFooter = React36.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
9831
9908
|
}
|
|
9832
9909
|
));
|
|
9833
9910
|
TableFooter.displayName = "TableFooter";
|
|
9834
|
-
var TableRow = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
9911
|
+
var TableRow = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9835
9912
|
"tr",
|
|
9836
9913
|
{
|
|
9837
9914
|
ref,
|
|
@@ -9845,7 +9922,7 @@ var TableRow = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
9845
9922
|
}
|
|
9846
9923
|
));
|
|
9847
9924
|
TableRow.displayName = "TableRow";
|
|
9848
|
-
var TableHead = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
9925
|
+
var TableHead = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9849
9926
|
"th",
|
|
9850
9927
|
{
|
|
9851
9928
|
ref,
|
|
@@ -9857,7 +9934,7 @@ var TableHead = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
9857
9934
|
}
|
|
9858
9935
|
));
|
|
9859
9936
|
TableHead.displayName = "TableHead";
|
|
9860
|
-
var TableCell = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
9937
|
+
var TableCell = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9861
9938
|
"td",
|
|
9862
9939
|
{
|
|
9863
9940
|
ref,
|
|
@@ -9866,7 +9943,7 @@ var TableCell = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
9866
9943
|
}
|
|
9867
9944
|
));
|
|
9868
9945
|
TableCell.displayName = "TableCell";
|
|
9869
|
-
var TableCaption = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
9946
|
+
var TableCaption = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx45(
|
|
9870
9947
|
"caption",
|
|
9871
9948
|
{
|
|
9872
9949
|
ref,
|
|
@@ -9880,7 +9957,7 @@ TableCaption.displayName = "TableCaption";
|
|
|
9880
9957
|
import { Filter as FilterIcon } from "lucide-react";
|
|
9881
9958
|
import React37 from "react";
|
|
9882
9959
|
import { useTranslations as useTranslations7 } from "next-intl";
|
|
9883
|
-
import { Fragment as Fragment17, jsx as
|
|
9960
|
+
import { Fragment as Fragment17, jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
9884
9961
|
function useDebounced(value, delay = 300) {
|
|
9885
9962
|
const [debounced, setDebounced] = React37.useState(value);
|
|
9886
9963
|
React37.useEffect(() => {
|
|
@@ -9944,7 +10021,7 @@ function DataTable({
|
|
|
9944
10021
|
className: "h-8 w-full text-sm"
|
|
9945
10022
|
};
|
|
9946
10023
|
if (col.filter.type === "text") {
|
|
9947
|
-
return /* @__PURE__ */
|
|
10024
|
+
return /* @__PURE__ */ jsx46(
|
|
9948
10025
|
Input_default,
|
|
9949
10026
|
{
|
|
9950
10027
|
...commonProps,
|
|
@@ -9959,7 +10036,7 @@ function DataTable({
|
|
|
9959
10036
|
}
|
|
9960
10037
|
if (col.filter.type === "select") {
|
|
9961
10038
|
const options = col.filter.options || [];
|
|
9962
|
-
return /* @__PURE__ */
|
|
10039
|
+
return /* @__PURE__ */ jsx46(
|
|
9963
10040
|
Combobox,
|
|
9964
10041
|
{
|
|
9965
10042
|
options: ["", ...options],
|
|
@@ -9975,7 +10052,7 @@ function DataTable({
|
|
|
9975
10052
|
);
|
|
9976
10053
|
}
|
|
9977
10054
|
if (col.filter.type === "date") {
|
|
9978
|
-
return /* @__PURE__ */
|
|
10055
|
+
return /* @__PURE__ */ jsx46(
|
|
9979
10056
|
DatePicker,
|
|
9980
10057
|
{
|
|
9981
10058
|
placeholder: col.filter.placeholder || `Select ${String(col.title)}`,
|
|
@@ -9989,7 +10066,7 @@ function DataTable({
|
|
|
9989
10066
|
}
|
|
9990
10067
|
return null;
|
|
9991
10068
|
};
|
|
9992
|
-
const renderHeader = /* @__PURE__ */
|
|
10069
|
+
const renderHeader = /* @__PURE__ */ jsx46(TableRow, { children: visibleColumns.map((col, colIdx) => /* @__PURE__ */ jsx46(
|
|
9993
10070
|
TableHead,
|
|
9994
10071
|
{
|
|
9995
10072
|
style: { width: col.width },
|
|
@@ -10003,8 +10080,8 @@ function DataTable({
|
|
|
10003
10080
|
const isRightAlign = col.align === "right" || !col.align && headerAlign === "right";
|
|
10004
10081
|
const isCenterAlign = col.align === "center" || !col.align && headerAlign === "center";
|
|
10005
10082
|
const titleContent = /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-1 min-w-0 flex-shrink", children: [
|
|
10006
|
-
/* @__PURE__ */
|
|
10007
|
-
col.sortable && /* @__PURE__ */
|
|
10083
|
+
/* @__PURE__ */ jsx46("span", { className: "truncate font-medium text-sm", children: col.title }),
|
|
10084
|
+
col.sortable && /* @__PURE__ */ jsx46(
|
|
10008
10085
|
"button",
|
|
10009
10086
|
{
|
|
10010
10087
|
className: cn(
|
|
@@ -10022,7 +10099,7 @@ function DataTable({
|
|
|
10022
10099
|
"aria-label": "Sort",
|
|
10023
10100
|
title: `Sort by ${String(col.title)}`,
|
|
10024
10101
|
children: /* @__PURE__ */ jsxs41("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "none", className: "inline-block", children: [
|
|
10025
|
-
/* @__PURE__ */
|
|
10102
|
+
/* @__PURE__ */ jsx46(
|
|
10026
10103
|
"path",
|
|
10027
10104
|
{
|
|
10028
10105
|
d: "M7 8l3-3 3 3",
|
|
@@ -10033,7 +10110,7 @@ function DataTable({
|
|
|
10033
10110
|
opacity: sort?.key === col.key && sort.order === "asc" ? 1 : 0.4
|
|
10034
10111
|
}
|
|
10035
10112
|
),
|
|
10036
|
-
/* @__PURE__ */
|
|
10113
|
+
/* @__PURE__ */ jsx46(
|
|
10037
10114
|
"path",
|
|
10038
10115
|
{
|
|
10039
10116
|
d: "M7 12l3 3 3-3",
|
|
@@ -10048,11 +10125,11 @@ function DataTable({
|
|
|
10048
10125
|
}
|
|
10049
10126
|
)
|
|
10050
10127
|
] });
|
|
10051
|
-
const filterContent = col.filter && /* @__PURE__ */
|
|
10128
|
+
const filterContent = col.filter && /* @__PURE__ */ jsx46(
|
|
10052
10129
|
Popover,
|
|
10053
10130
|
{
|
|
10054
10131
|
placement: isRightAlign ? "bottom-end" : "bottom-start",
|
|
10055
|
-
trigger: /* @__PURE__ */
|
|
10132
|
+
trigger: /* @__PURE__ */ jsx46(
|
|
10056
10133
|
"button",
|
|
10057
10134
|
{
|
|
10058
10135
|
className: cn(
|
|
@@ -10062,7 +10139,7 @@ function DataTable({
|
|
|
10062
10139
|
),
|
|
10063
10140
|
"aria-label": "Filter",
|
|
10064
10141
|
title: "Filter",
|
|
10065
|
-
children: /* @__PURE__ */
|
|
10142
|
+
children: /* @__PURE__ */ jsx46(FilterIcon, { className: "h-4 w-4" })
|
|
10066
10143
|
}
|
|
10067
10144
|
),
|
|
10068
10145
|
children: /* @__PURE__ */ jsxs41("div", { className: "w-48 p-2 space-y-2", children: [
|
|
@@ -10071,7 +10148,7 @@ function DataTable({
|
|
|
10071
10148
|
col.title
|
|
10072
10149
|
] }),
|
|
10073
10150
|
renderFilterControl(col),
|
|
10074
|
-
filters[col.key] && /* @__PURE__ */
|
|
10151
|
+
filters[col.key] && /* @__PURE__ */ jsx46(
|
|
10075
10152
|
"button",
|
|
10076
10153
|
{
|
|
10077
10154
|
onClick: () => {
|
|
@@ -10089,7 +10166,7 @@ function DataTable({
|
|
|
10089
10166
|
] })
|
|
10090
10167
|
}
|
|
10091
10168
|
);
|
|
10092
|
-
return /* @__PURE__ */
|
|
10169
|
+
return /* @__PURE__ */ jsx46(
|
|
10093
10170
|
"div",
|
|
10094
10171
|
{
|
|
10095
10172
|
className: cn(
|
|
@@ -10152,13 +10229,13 @@ function DataTable({
|
|
|
10152
10229
|
}, [processedData, curPage, curPageSize]);
|
|
10153
10230
|
return /* @__PURE__ */ jsxs41("div", { className: cn("space-y-2", className), children: [
|
|
10154
10231
|
/* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-between gap-4 mb-1", children: [
|
|
10155
|
-
/* @__PURE__ */
|
|
10232
|
+
/* @__PURE__ */ jsx46("div", { className: "text-sm text-muted-foreground", children: caption }),
|
|
10156
10233
|
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2", children: [
|
|
10157
|
-
enableDensityToggle && /* @__PURE__ */
|
|
10234
|
+
enableDensityToggle && /* @__PURE__ */ jsx46(
|
|
10158
10235
|
DropdownMenu_default,
|
|
10159
10236
|
{
|
|
10160
10237
|
trigger: /* @__PURE__ */ jsxs41(Button_default, { variant: "ghost", size: "sm", className: "h-8 px-2", children: [
|
|
10161
|
-
/* @__PURE__ */
|
|
10238
|
+
/* @__PURE__ */ jsx46("svg", { className: "w-4 h-4 mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx46("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 10h16M4 14h16M4 18h16" }) }),
|
|
10162
10239
|
labels?.density || t("density")
|
|
10163
10240
|
] }),
|
|
10164
10241
|
items: [
|
|
@@ -10168,11 +10245,11 @@ function DataTable({
|
|
|
10168
10245
|
]
|
|
10169
10246
|
}
|
|
10170
10247
|
),
|
|
10171
|
-
enableColumnVisibilityToggle && /* @__PURE__ */
|
|
10248
|
+
enableColumnVisibilityToggle && /* @__PURE__ */ jsx46(
|
|
10172
10249
|
DropdownMenu_default,
|
|
10173
10250
|
{
|
|
10174
10251
|
trigger: /* @__PURE__ */ jsxs41(Button_default, { variant: "ghost", size: "sm", className: "h-8 px-2", children: [
|
|
10175
|
-
/* @__PURE__ */
|
|
10252
|
+
/* @__PURE__ */ jsx46("svg", { className: "w-4 h-4 mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx46(
|
|
10176
10253
|
"path",
|
|
10177
10254
|
{
|
|
10178
10255
|
strokeLinecap: "round",
|
|
@@ -10190,19 +10267,19 @@ function DataTable({
|
|
|
10190
10267
|
setVisibleCols((prev) => prev.includes(c.key) ? prev.filter((k) => k !== c.key) : [...prev, c.key]);
|
|
10191
10268
|
},
|
|
10192
10269
|
children: [
|
|
10193
|
-
/* @__PURE__ */
|
|
10194
|
-
/* @__PURE__ */
|
|
10270
|
+
/* @__PURE__ */ jsx46("input", { type: "checkbox", className: "mr-2 rounded border-border", readOnly: true, checked: visibleCols.includes(c.key) }),
|
|
10271
|
+
/* @__PURE__ */ jsx46("span", { className: "truncate", children: c.title })
|
|
10195
10272
|
]
|
|
10196
10273
|
},
|
|
10197
10274
|
c.key
|
|
10198
10275
|
))
|
|
10199
10276
|
}
|
|
10200
10277
|
),
|
|
10201
|
-
enableHeaderAlignToggle && /* @__PURE__ */
|
|
10278
|
+
enableHeaderAlignToggle && /* @__PURE__ */ jsx46(
|
|
10202
10279
|
DropdownMenu_default,
|
|
10203
10280
|
{
|
|
10204
10281
|
trigger: /* @__PURE__ */ jsxs41(Button_default, { variant: "ghost", size: "sm", className: "h-8 px-2", children: [
|
|
10205
|
-
/* @__PURE__ */
|
|
10282
|
+
/* @__PURE__ */ jsx46("svg", { className: "w-4 h-4 mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx46("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h10M4 18h16" }) }),
|
|
10206
10283
|
labels?.headerAlign || t("headerAlign")
|
|
10207
10284
|
] }),
|
|
10208
10285
|
items: [
|
|
@@ -10215,17 +10292,17 @@ function DataTable({
|
|
|
10215
10292
|
toolbar
|
|
10216
10293
|
] })
|
|
10217
10294
|
] }),
|
|
10218
|
-
/* @__PURE__ */
|
|
10295
|
+
/* @__PURE__ */ jsx46("div", { className: cn("relative rounded-md border border-border/50 overflow-hidden", loading2 && "opacity-60 pointer-events-none"), children: /* @__PURE__ */ jsxs41(
|
|
10219
10296
|
Table,
|
|
10220
10297
|
{
|
|
10221
10298
|
containerClassName: "border-0 md:border-0 rounded-none md:rounded-none shadow-none bg-transparent",
|
|
10222
10299
|
className: "[&_thead]:sticky [&_thead]:top-0 [&_thead]:z-[5] [&_thead]:bg-background [&_thead]:backdrop-blur-sm",
|
|
10223
10300
|
children: [
|
|
10224
|
-
/* @__PURE__ */
|
|
10225
|
-
/* @__PURE__ */
|
|
10301
|
+
/* @__PURE__ */ jsx46(TableHeader, { children: renderHeader }),
|
|
10302
|
+
/* @__PURE__ */ jsx46(TableBody, { children: loading2 ? /* @__PURE__ */ jsx46(TableRow, { children: /* @__PURE__ */ jsx46(TableCell, { colSpan: visibleColumns.length, className: "text-center py-8", children: /* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-center gap-2 text-muted-foreground", children: [
|
|
10226
10303
|
/* @__PURE__ */ jsxs41("svg", { className: "animate-spin h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
10227
|
-
/* @__PURE__ */
|
|
10228
|
-
/* @__PURE__ */
|
|
10304
|
+
/* @__PURE__ */ jsx46("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
10305
|
+
/* @__PURE__ */ jsx46(
|
|
10229
10306
|
"path",
|
|
10230
10307
|
{
|
|
10231
10308
|
className: "opacity-75",
|
|
@@ -10234,12 +10311,12 @@ function DataTable({
|
|
|
10234
10311
|
}
|
|
10235
10312
|
)
|
|
10236
10313
|
] }),
|
|
10237
|
-
/* @__PURE__ */
|
|
10238
|
-
] }) }) }) : !displayedData || displayedData.length === 0 ? /* @__PURE__ */
|
|
10314
|
+
/* @__PURE__ */ jsx46("span", { className: "text-sm", children: "Loading..." })
|
|
10315
|
+
] }) }) }) : !displayedData || displayedData.length === 0 ? /* @__PURE__ */ jsx46(TableRow, { children: /* @__PURE__ */ jsx46(TableCell, { colSpan: visibleColumns.length, className: "text-center py-6 text-muted-foreground", children: "No data" }) }) : displayedData.map((row, idx) => {
|
|
10239
10316
|
const isLastRow = idx === displayedData.length - 1;
|
|
10240
|
-
return /* @__PURE__ */
|
|
10317
|
+
return /* @__PURE__ */ jsx46(TableRow, { className: cn(densityRowClass, striped && idx % 2 === 0 && "bg-muted/30"), children: visibleColumns.map((col, colIdx) => {
|
|
10241
10318
|
const value = col.dataIndex ? row[col.dataIndex] : void 0;
|
|
10242
|
-
return /* @__PURE__ */
|
|
10319
|
+
return /* @__PURE__ */ jsx46(
|
|
10243
10320
|
TableCell,
|
|
10244
10321
|
{
|
|
10245
10322
|
className: cn(
|
|
@@ -10259,7 +10336,7 @@ function DataTable({
|
|
|
10259
10336
|
]
|
|
10260
10337
|
}
|
|
10261
10338
|
) }),
|
|
10262
|
-
totalItems > 0 && /* @__PURE__ */
|
|
10339
|
+
totalItems > 0 && /* @__PURE__ */ jsx46("div", { className: "border-t bg-muted/30 p-4 rounded-b-md", children: /* @__PURE__ */ jsx46(
|
|
10263
10340
|
Pagination,
|
|
10264
10341
|
{
|
|
10265
10342
|
page: curPage,
|
|
@@ -12049,7 +12126,7 @@ function useForm(props = {}) {
|
|
|
12049
12126
|
|
|
12050
12127
|
// ../../components/ui/Form.tsx
|
|
12051
12128
|
import { useTranslations as useTranslations8 } from "next-intl";
|
|
12052
|
-
import { jsx as
|
|
12129
|
+
import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
12053
12130
|
var FormConfigContext = React39.createContext({ size: "md" });
|
|
12054
12131
|
var FormWrapper = ({
|
|
12055
12132
|
children,
|
|
@@ -12069,14 +12146,14 @@ var FormWrapper = ({
|
|
|
12069
12146
|
}
|
|
12070
12147
|
}, [JSON.stringify(initialValues)]);
|
|
12071
12148
|
const { validationSchema: _, ...formProps } = props;
|
|
12072
|
-
return /* @__PURE__ */
|
|
12149
|
+
return /* @__PURE__ */ jsx47(FormProvider, { ...methods, children: /* @__PURE__ */ jsx47(FormConfigContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx47("form", { onSubmit: methods.handleSubmit(onSubmit), className, ...formProps, children }) }) });
|
|
12073
12150
|
};
|
|
12074
12151
|
var Form = FormWrapper;
|
|
12075
12152
|
var FormFieldContext = React39.createContext({});
|
|
12076
12153
|
var FormField = ({
|
|
12077
12154
|
...props
|
|
12078
12155
|
}) => {
|
|
12079
|
-
return /* @__PURE__ */
|
|
12156
|
+
return /* @__PURE__ */ jsx47(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx47(Controller, { ...props }) });
|
|
12080
12157
|
};
|
|
12081
12158
|
var useFormField = () => {
|
|
12082
12159
|
const fieldContext = React39.useContext(FormFieldContext);
|
|
@@ -12104,7 +12181,7 @@ var useFormField = () => {
|
|
|
12104
12181
|
var FormItemContext = React39.createContext({});
|
|
12105
12182
|
var FormItem = React39.forwardRef(({ className, ...props }, ref) => {
|
|
12106
12183
|
const id = React39.useId();
|
|
12107
|
-
return /* @__PURE__ */
|
|
12184
|
+
return /* @__PURE__ */ jsx47(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx47("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
12108
12185
|
});
|
|
12109
12186
|
FormItem.displayName = "FormItem";
|
|
12110
12187
|
var FormLabel = React39.forwardRef(({ className, children, required, ...props }, ref) => {
|
|
@@ -12120,7 +12197,7 @@ var FormLabel = React39.forwardRef(({ className, children, required, ...props },
|
|
|
12120
12197
|
...props,
|
|
12121
12198
|
children: [
|
|
12122
12199
|
children,
|
|
12123
|
-
required && /* @__PURE__ */
|
|
12200
|
+
required && /* @__PURE__ */ jsx47("span", { className: "text-destructive ml-1", children: "*" })
|
|
12124
12201
|
]
|
|
12125
12202
|
}
|
|
12126
12203
|
);
|
|
@@ -12128,7 +12205,7 @@ var FormLabel = React39.forwardRef(({ className, children, required, ...props },
|
|
|
12128
12205
|
FormLabel.displayName = "FormLabel";
|
|
12129
12206
|
var FormControl = React39.forwardRef(({ ...props }, ref) => {
|
|
12130
12207
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
12131
|
-
return /* @__PURE__ */
|
|
12208
|
+
return /* @__PURE__ */ jsx47(
|
|
12132
12209
|
"div",
|
|
12133
12210
|
{
|
|
12134
12211
|
ref,
|
|
@@ -12142,7 +12219,7 @@ var FormControl = React39.forwardRef(({ ...props }, ref) => {
|
|
|
12142
12219
|
FormControl.displayName = "FormControl";
|
|
12143
12220
|
var FormDescription = React39.forwardRef(({ className, ...props }, ref) => {
|
|
12144
12221
|
const { formDescriptionId } = useFormField();
|
|
12145
|
-
return /* @__PURE__ */
|
|
12222
|
+
return /* @__PURE__ */ jsx47("p", { ref, id: formDescriptionId, className: cn("text-sm text-muted-foreground", className), ...props });
|
|
12146
12223
|
});
|
|
12147
12224
|
FormDescription.displayName = "FormDescription";
|
|
12148
12225
|
var FormMessage = React39.forwardRef(({ className, children, ...props }, ref) => {
|
|
@@ -12151,26 +12228,26 @@ var FormMessage = React39.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
12151
12228
|
if (!body) {
|
|
12152
12229
|
return null;
|
|
12153
12230
|
}
|
|
12154
|
-
return /* @__PURE__ */
|
|
12231
|
+
return /* @__PURE__ */ jsx47("p", { ref, id: formMessageId, className: cn("text-sm font-medium text-destructive", className), ...props, children: body });
|
|
12155
12232
|
});
|
|
12156
12233
|
FormMessage.displayName = "FormMessage";
|
|
12157
|
-
var FormInput = React39.forwardRef(({ name, ...props }, ref) => /* @__PURE__ */
|
|
12234
|
+
var FormInput = React39.forwardRef(({ name, ...props }, ref) => /* @__PURE__ */ jsx47(FormConfigContext.Consumer, { children: ({ size }) => /* @__PURE__ */ jsx47(
|
|
12158
12235
|
FormField,
|
|
12159
12236
|
{
|
|
12160
12237
|
name,
|
|
12161
12238
|
render: ({ field }) => /* @__PURE__ */ jsxs42(FormItem, { children: [
|
|
12162
|
-
/* @__PURE__ */
|
|
12163
|
-
/* @__PURE__ */
|
|
12239
|
+
/* @__PURE__ */ jsx47(FormControl, { children: /* @__PURE__ */ jsx47(Input_default, { size: props.size ?? size, ...field, ...props }) }),
|
|
12240
|
+
/* @__PURE__ */ jsx47(FormMessage, {})
|
|
12164
12241
|
] })
|
|
12165
12242
|
}
|
|
12166
12243
|
) }));
|
|
12167
12244
|
FormInput.displayName = "FormInput";
|
|
12168
|
-
var FormCheckbox = React39.forwardRef(({ name, ...props }, ref) => /* @__PURE__ */
|
|
12245
|
+
var FormCheckbox = React39.forwardRef(({ name, ...props }, ref) => /* @__PURE__ */ jsx47(FormConfigContext.Consumer, { children: ({ size }) => /* @__PURE__ */ jsx47(
|
|
12169
12246
|
FormField,
|
|
12170
12247
|
{
|
|
12171
12248
|
name,
|
|
12172
12249
|
render: ({ field }) => /* @__PURE__ */ jsxs42(FormItem, { children: [
|
|
12173
|
-
/* @__PURE__ */
|
|
12250
|
+
/* @__PURE__ */ jsx47(FormControl, { children: /* @__PURE__ */ jsx47(
|
|
12174
12251
|
Checkbox,
|
|
12175
12252
|
{
|
|
12176
12253
|
ref,
|
|
@@ -12184,20 +12261,20 @@ var FormCheckbox = React39.forwardRef(({ name, ...props }, ref) => /* @__PURE__
|
|
|
12184
12261
|
...props
|
|
12185
12262
|
}
|
|
12186
12263
|
) }),
|
|
12187
|
-
/* @__PURE__ */
|
|
12264
|
+
/* @__PURE__ */ jsx47(FormMessage, {})
|
|
12188
12265
|
] })
|
|
12189
12266
|
}
|
|
12190
12267
|
) }));
|
|
12191
12268
|
FormCheckbox.displayName = "FormCheckbox";
|
|
12192
|
-
var FormActions = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
12269
|
+
var FormActions = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx47("div", { ref, className: cn("flex gap-2 justify-end", className), ...props }));
|
|
12193
12270
|
FormActions.displayName = "FormActions";
|
|
12194
|
-
var FormSubmitButton = React39.forwardRef(({ children, loading: loading2, ...props }, ref) => /* @__PURE__ */
|
|
12271
|
+
var FormSubmitButton = React39.forwardRef(({ children, loading: loading2, ...props }, ref) => /* @__PURE__ */ jsx47(FormConfigContext.Consumer, { children: ({ size }) => /* @__PURE__ */ jsx47(Button_default, { ref, type: "submit", size: props.size ?? size, disabled: loading2, ...props, children }) }));
|
|
12195
12272
|
FormSubmitButton.displayName = "FormSubmitButton";
|
|
12196
12273
|
|
|
12197
12274
|
// ../../components/ui/NotificationModal.tsx
|
|
12198
12275
|
import { ExternalLink } from "lucide-react";
|
|
12199
12276
|
import { useTranslations as useTranslations9 } from "next-intl";
|
|
12200
|
-
import { jsx as
|
|
12277
|
+
import { jsx as jsx48, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
12201
12278
|
function NotificationModal({ isOpen, onClose, notification, titleText, openLinkText, closeText }) {
|
|
12202
12279
|
const t = useTranslations9("Common");
|
|
12203
12280
|
if (!notification) return null;
|
|
@@ -12218,7 +12295,7 @@ function NotificationModal({ isOpen, onClose, notification, titleText, openLinkT
|
|
|
12218
12295
|
onClose();
|
|
12219
12296
|
}
|
|
12220
12297
|
};
|
|
12221
|
-
return /* @__PURE__ */
|
|
12298
|
+
return /* @__PURE__ */ jsx48(
|
|
12222
12299
|
Modal_default,
|
|
12223
12300
|
{
|
|
12224
12301
|
isOpen,
|
|
@@ -12227,15 +12304,15 @@ function NotificationModal({ isOpen, onClose, notification, titleText, openLinkT
|
|
|
12227
12304
|
size: "md",
|
|
12228
12305
|
children: /* @__PURE__ */ jsxs43("div", { className: "space-y-4", children: [
|
|
12229
12306
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2 pb-2 border-b border-border", children: [
|
|
12230
|
-
/* @__PURE__ */
|
|
12307
|
+
/* @__PURE__ */ jsx48("div", { className: cn(
|
|
12231
12308
|
"w-2 h-2 rounded-full",
|
|
12232
12309
|
!notification.is_read ? "bg-primary" : "bg-border"
|
|
12233
12310
|
) }),
|
|
12234
|
-
/* @__PURE__ */
|
|
12311
|
+
/* @__PURE__ */ jsx48("span", { className: "text-xs text-muted-foreground", children: !notification.is_read ? t("newNotification") : t("readStatus") })
|
|
12235
12312
|
] }),
|
|
12236
|
-
notification.title && /* @__PURE__ */
|
|
12237
|
-
notification.body && /* @__PURE__ */
|
|
12238
|
-
/* @__PURE__ */
|
|
12313
|
+
notification.title && /* @__PURE__ */ jsx48("h3", { className: "text-lg font-semibold text-foreground", children: notification.title }),
|
|
12314
|
+
notification.body && /* @__PURE__ */ jsx48("div", { className: "text-sm text-muted-foreground whitespace-pre-wrap leading-relaxed", children: notification.body }),
|
|
12315
|
+
/* @__PURE__ */ jsx48("div", { className: "text-xs text-muted-foreground border-t border-border pt-2", children: formatTime3(notification.created_at) }),
|
|
12239
12316
|
/* @__PURE__ */ jsxs43("div", { className: "flex gap-2 justify-end pt-2", children: [
|
|
12240
12317
|
hasLink && /* @__PURE__ */ jsxs43(
|
|
12241
12318
|
Button_default,
|
|
@@ -12245,12 +12322,12 @@ function NotificationModal({ isOpen, onClose, notification, titleText, openLinkT
|
|
|
12245
12322
|
onClick: handleLinkClick,
|
|
12246
12323
|
className: "gap-2",
|
|
12247
12324
|
children: [
|
|
12248
|
-
/* @__PURE__ */
|
|
12325
|
+
/* @__PURE__ */ jsx48(ExternalLink, { className: "w-4 h-4" }),
|
|
12249
12326
|
openLinkText || t("openLink")
|
|
12250
12327
|
]
|
|
12251
12328
|
}
|
|
12252
12329
|
),
|
|
12253
|
-
/* @__PURE__ */
|
|
12330
|
+
/* @__PURE__ */ jsx48(
|
|
12254
12331
|
Button_default,
|
|
12255
12332
|
{
|
|
12256
12333
|
variant: "ghost",
|
|
@@ -12270,159 +12347,9 @@ var NotificationModal_default = NotificationModal;
|
|
|
12270
12347
|
import Link2 from "next/link";
|
|
12271
12348
|
import { usePathname } from "next/navigation";
|
|
12272
12349
|
import { Phone } from "lucide-react";
|
|
12273
|
-
|
|
12274
|
-
// ../../node_modules/react-icons/lib/iconBase.mjs
|
|
12275
|
-
import React41 from "react";
|
|
12276
|
-
|
|
12277
|
-
// ../../node_modules/react-icons/lib/iconContext.mjs
|
|
12278
|
-
import React40 from "react";
|
|
12279
|
-
var DefaultContext = {
|
|
12280
|
-
color: void 0,
|
|
12281
|
-
size: void 0,
|
|
12282
|
-
className: void 0,
|
|
12283
|
-
style: void 0,
|
|
12284
|
-
attr: void 0
|
|
12285
|
-
};
|
|
12286
|
-
var IconContext = React40.createContext && /* @__PURE__ */ React40.createContext(DefaultContext);
|
|
12287
|
-
|
|
12288
|
-
// ../../node_modules/react-icons/lib/iconBase.mjs
|
|
12289
|
-
var _excluded = ["attr", "size", "title"];
|
|
12290
|
-
function _objectWithoutProperties(source, excluded) {
|
|
12291
|
-
if (source == null) return {};
|
|
12292
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
12293
|
-
var key, i;
|
|
12294
|
-
if (Object.getOwnPropertySymbols) {
|
|
12295
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
12296
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
12297
|
-
key = sourceSymbolKeys[i];
|
|
12298
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
12299
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
12300
|
-
target[key] = source[key];
|
|
12301
|
-
}
|
|
12302
|
-
}
|
|
12303
|
-
return target;
|
|
12304
|
-
}
|
|
12305
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
12306
|
-
if (source == null) return {};
|
|
12307
|
-
var target = {};
|
|
12308
|
-
for (var key in source) {
|
|
12309
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12310
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
12311
|
-
target[key] = source[key];
|
|
12312
|
-
}
|
|
12313
|
-
}
|
|
12314
|
-
return target;
|
|
12315
|
-
}
|
|
12316
|
-
function _extends() {
|
|
12317
|
-
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
12318
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
12319
|
-
var source = arguments[i];
|
|
12320
|
-
for (var key in source) {
|
|
12321
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
12322
|
-
target[key] = source[key];
|
|
12323
|
-
}
|
|
12324
|
-
}
|
|
12325
|
-
}
|
|
12326
|
-
return target;
|
|
12327
|
-
};
|
|
12328
|
-
return _extends.apply(this, arguments);
|
|
12329
|
-
}
|
|
12330
|
-
function ownKeys(e, r) {
|
|
12331
|
-
var t = Object.keys(e);
|
|
12332
|
-
if (Object.getOwnPropertySymbols) {
|
|
12333
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
12334
|
-
r && (o = o.filter(function(r2) {
|
|
12335
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
12336
|
-
})), t.push.apply(t, o);
|
|
12337
|
-
}
|
|
12338
|
-
return t;
|
|
12339
|
-
}
|
|
12340
|
-
function _objectSpread(e) {
|
|
12341
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
12342
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
12343
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
12344
|
-
_defineProperty(e, r2, t[r2]);
|
|
12345
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
12346
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
12347
|
-
});
|
|
12348
|
-
}
|
|
12349
|
-
return e;
|
|
12350
|
-
}
|
|
12351
|
-
function _defineProperty(obj, key, value) {
|
|
12352
|
-
key = _toPropertyKey(key);
|
|
12353
|
-
if (key in obj) {
|
|
12354
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
12355
|
-
} else {
|
|
12356
|
-
obj[key] = value;
|
|
12357
|
-
}
|
|
12358
|
-
return obj;
|
|
12359
|
-
}
|
|
12360
|
-
function _toPropertyKey(t) {
|
|
12361
|
-
var i = _toPrimitive(t, "string");
|
|
12362
|
-
return "symbol" == typeof i ? i : i + "";
|
|
12363
|
-
}
|
|
12364
|
-
function _toPrimitive(t, r) {
|
|
12365
|
-
if ("object" != typeof t || !t) return t;
|
|
12366
|
-
var e = t[Symbol.toPrimitive];
|
|
12367
|
-
if (void 0 !== e) {
|
|
12368
|
-
var i = e.call(t, r || "default");
|
|
12369
|
-
if ("object" != typeof i) return i;
|
|
12370
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
12371
|
-
}
|
|
12372
|
-
return ("string" === r ? String : Number)(t);
|
|
12373
|
-
}
|
|
12374
|
-
function Tree2Element(tree) {
|
|
12375
|
-
return tree && tree.map((node, i) => /* @__PURE__ */ React41.createElement(node.tag, _objectSpread({
|
|
12376
|
-
key: i
|
|
12377
|
-
}, node.attr), Tree2Element(node.child)));
|
|
12378
|
-
}
|
|
12379
|
-
function GenIcon(data) {
|
|
12380
|
-
return (props) => /* @__PURE__ */ React41.createElement(IconBase, _extends({
|
|
12381
|
-
attr: _objectSpread({}, data.attr)
|
|
12382
|
-
}, props), Tree2Element(data.child));
|
|
12383
|
-
}
|
|
12384
|
-
function IconBase(props) {
|
|
12385
|
-
var elem = (conf) => {
|
|
12386
|
-
var {
|
|
12387
|
-
attr,
|
|
12388
|
-
size,
|
|
12389
|
-
title
|
|
12390
|
-
} = props, svgProps = _objectWithoutProperties(props, _excluded);
|
|
12391
|
-
var computedSize = size || conf.size || "1em";
|
|
12392
|
-
var className;
|
|
12393
|
-
if (conf.className) className = conf.className;
|
|
12394
|
-
if (props.className) className = (className ? className + " " : "") + props.className;
|
|
12395
|
-
return /* @__PURE__ */ React41.createElement("svg", _extends({
|
|
12396
|
-
stroke: "currentColor",
|
|
12397
|
-
fill: "currentColor",
|
|
12398
|
-
strokeWidth: "0"
|
|
12399
|
-
}, conf.attr, attr, svgProps, {
|
|
12400
|
-
className,
|
|
12401
|
-
style: _objectSpread(_objectSpread({
|
|
12402
|
-
color: props.color || conf.color
|
|
12403
|
-
}, conf.style), props.style),
|
|
12404
|
-
height: computedSize,
|
|
12405
|
-
width: computedSize,
|
|
12406
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
12407
|
-
}), title && /* @__PURE__ */ React41.createElement("title", null, title), props.children);
|
|
12408
|
-
};
|
|
12409
|
-
return IconContext !== void 0 ? /* @__PURE__ */ React41.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
|
12410
|
-
}
|
|
12411
|
-
|
|
12412
|
-
// ../../node_modules/react-icons/fa/index.mjs
|
|
12413
|
-
function FaInstagram(props) {
|
|
12414
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 448 512" }, "child": [{ "tag": "path", "attr": { "d": "M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z" }, "child": [] }] })(props);
|
|
12415
|
-
}
|
|
12416
|
-
|
|
12417
|
-
// ../../node_modules/react-icons/si/index.mjs
|
|
12418
|
-
function SiZalo(props) {
|
|
12419
|
-
return GenIcon({ "tag": "svg", "attr": { "role": "img", "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M12.49 10.2722v-.4496h1.3467v6.3218h-.7704a.576.576 0 01-.5763-.5729l-.0006.0005a3.273 3.273 0 01-1.9372.6321c-1.8138 0-3.2844-1.4697-3.2844-3.2823 0-1.8125 1.4706-3.2822 3.2844-3.2822a3.273 3.273 0 011.9372.6321l.0006.0005zM6.9188 7.7896v.205c0 .3823-.051.6944-.2995 1.0605l-.03.0343c-.0542.0615-.1815.206-.2421.2843L2.024 14.8h4.8948v.7682a.5764.5764 0 01-.5767.5761H0v-.3622c0-.4436.1102-.6414.2495-.8476L4.8582 9.23H.1922V7.7896h6.7266zm8.5513 8.3548a.4805.4805 0 01-.4803-.4798v-7.875h1.4416v8.3548H15.47zM20.6934 9.6C22.52 9.6 24 11.0807 24 12.9044c0 1.8252-1.4801 3.306-3.3066 3.306-1.8264 0-3.3066-1.4808-3.3066-3.306 0-1.8237 1.4802-3.3044 3.3066-3.3044zm-10.1412 5.253c1.0675 0 1.9324-.8645 1.9324-1.9312 0-1.065-.865-1.9295-1.9324-1.9295s-1.9324.8644-1.9324 1.9295c0 1.0667.865 1.9312 1.9324 1.9312zm10.1412-.0033c1.0737 0 1.945-.8707 1.945-1.9453 0-1.073-.8713-1.9436-1.945-1.9436-1.0753 0-1.945.8706-1.945 1.9436 0 1.0746.8697 1.9453 1.945 1.9453z" }, "child": [] }] })(props);
|
|
12420
|
-
}
|
|
12421
|
-
|
|
12422
|
-
// ../../components/ui/FloatingContacts.tsx
|
|
12423
|
-
import { jsx as jsx50, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
12350
|
+
import { jsx as jsx49, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
12424
12351
|
function MessengerIcon(props) {
|
|
12425
|
-
return /* @__PURE__ */
|
|
12352
|
+
return /* @__PURE__ */ jsx49("svg", { viewBox: "0 0 24 24", width: 24, height: 24, "aria-hidden": "true", ...props, children: /* @__PURE__ */ jsx49(
|
|
12426
12353
|
"path",
|
|
12427
12354
|
{
|
|
12428
12355
|
d: "M12 2C6.477 2 2 6.145 2 11.235c0 2.93 1.35 5.542 3.464 7.25v3.515l3.344-1.836c.894.247 1.843.375 2.192.375 5.523 0 10-4.145 10-9.235S17.523 2 12 2zm.994 12.444l-2.563-2.73-5.004 2.73 5.507-5.84 2.626 2.729 4.942-2.729-5.508 5.84z",
|
|
@@ -12431,10 +12358,16 @@ function MessengerIcon(props) {
|
|
|
12431
12358
|
) });
|
|
12432
12359
|
}
|
|
12433
12360
|
function ZaloIcon(props) {
|
|
12434
|
-
return /* @__PURE__ */
|
|
12361
|
+
return /* @__PURE__ */ jsx49("svg", { viewBox: "0 0 48 48", width: 20, height: 20, "aria-hidden": "true", ...props, children: /* @__PURE__ */ jsx49(
|
|
12362
|
+
"path",
|
|
12363
|
+
{
|
|
12364
|
+
fill: "white",
|
|
12365
|
+
d: "M24 4C12.954 4 4 12.954 4 24s8.954 20 20 20 20-8.954 20-20S35.046 4 24 4zm6.164 27.602h-4.239c-.405 0-.732-.328-.732-.732v-7.596l-2.646 7.933c-.096.288-.366.482-.67.482h-1.773c-.304 0-.574-.194-.67-.482l-2.647-7.933v7.596c0 .405-.327.732-.732.732h-2.873c-.405 0-.732-.328-.732-.732V17.134c0-.405.327-.732.732-.732h3.91c.32 0 .602.208.698.514l2.68 8.042 2.68-8.042c.096-.306.378-.514.698-.514h3.91c.405 0 .732.327.732.732v14.466c0 .404-.327.732-.732.732z"
|
|
12366
|
+
}
|
|
12367
|
+
) });
|
|
12435
12368
|
}
|
|
12436
12369
|
function InstagramIcon(props) {
|
|
12437
|
-
return /* @__PURE__ */
|
|
12370
|
+
return /* @__PURE__ */ jsx49("svg", { viewBox: "0 0 24 24", width: 20, height: 20, "aria-hidden": "true", fill: "white", ...props, children: /* @__PURE__ */ jsx49("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z" }) });
|
|
12438
12371
|
}
|
|
12439
12372
|
function FloatingContacts({ className }) {
|
|
12440
12373
|
const pathname = usePathname();
|
|
@@ -12470,7 +12403,7 @@ function FloatingContacts({ className }) {
|
|
|
12470
12403
|
}
|
|
12471
12404
|
];
|
|
12472
12405
|
return /* @__PURE__ */ jsxs44("div", { className: cn("fixed bottom-6 right-4 z-[100000]", "flex flex-col items-end gap-3", className), "aria-label": "Quick contacts", children: [
|
|
12473
|
-
/* @__PURE__ */
|
|
12406
|
+
/* @__PURE__ */ jsx49(
|
|
12474
12407
|
Link2,
|
|
12475
12408
|
{
|
|
12476
12409
|
href: `tel:${hotline.replace(/\D/g, "")}`,
|
|
@@ -12481,10 +12414,10 @@ function FloatingContacts({ className }) {
|
|
|
12481
12414
|
"hover:scale-105 active:scale-95 transition-transform",
|
|
12482
12415
|
"bg-[#22c55e]"
|
|
12483
12416
|
),
|
|
12484
|
-
children: /* @__PURE__ */
|
|
12417
|
+
children: /* @__PURE__ */ jsx49(Phone, { className: "w-6 h-6" })
|
|
12485
12418
|
}
|
|
12486
12419
|
),
|
|
12487
|
-
moreItems.map(({ key, href, label, bg, Icon, external }) => /* @__PURE__ */
|
|
12420
|
+
moreItems.map(({ key, href, label, bg, Icon, external }) => /* @__PURE__ */ jsx49(
|
|
12488
12421
|
Link2,
|
|
12489
12422
|
{
|
|
12490
12423
|
href,
|
|
@@ -12496,7 +12429,7 @@ function FloatingContacts({ className }) {
|
|
|
12496
12429
|
"hover:scale-105 active:scale-95 transition-transform",
|
|
12497
12430
|
bg
|
|
12498
12431
|
),
|
|
12499
|
-
children: /* @__PURE__ */
|
|
12432
|
+
children: /* @__PURE__ */ jsx49(Icon, { className: "w-6 h-6" })
|
|
12500
12433
|
},
|
|
12501
12434
|
key
|
|
12502
12435
|
))
|
|
@@ -12505,7 +12438,7 @@ function FloatingContacts({ className }) {
|
|
|
12505
12438
|
|
|
12506
12439
|
// ../../components/ui/AccessDenied.tsx
|
|
12507
12440
|
import { Lock, ShieldAlert, Ban } from "lucide-react";
|
|
12508
|
-
import { jsx as
|
|
12441
|
+
import { jsx as jsx50, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
12509
12442
|
var VARIANT_STYLES = {
|
|
12510
12443
|
destructive: { bg: "bg-destructive/5", border: "border-destructive/20", text: "text-destructive" },
|
|
12511
12444
|
warning: { bg: "bg-warning/5", border: "border-warning/20", text: "text-warning" },
|
|
@@ -12526,13 +12459,13 @@ function AccessDenied({
|
|
|
12526
12459
|
}) {
|
|
12527
12460
|
const styles = VARIANT_STYLES[variant];
|
|
12528
12461
|
const UsedIcon = Icon || DEFAULT_ICONS[variant];
|
|
12529
|
-
return /* @__PURE__ */
|
|
12530
|
-
/* @__PURE__ */
|
|
12462
|
+
return /* @__PURE__ */ jsx50(Card_default, { className: cn("p-8 text-center shadow-sm", styles.bg, styles.border, className), children: /* @__PURE__ */ jsxs45("div", { className: "flex flex-col items-center gap-4", children: [
|
|
12463
|
+
/* @__PURE__ */ jsx50("div", { className: cn("p-3 rounded-lg", styles.bg.replace("/5", "/10")), children: /* @__PURE__ */ jsx50(UsedIcon, { className: cn("w-8 h-8", styles.text) }) }),
|
|
12531
12464
|
/* @__PURE__ */ jsxs45("div", { children: [
|
|
12532
|
-
/* @__PURE__ */
|
|
12533
|
-
/* @__PURE__ */
|
|
12465
|
+
/* @__PURE__ */ jsx50("h3", { className: cn("font-semibold mb-2", styles.text), children: title }),
|
|
12466
|
+
/* @__PURE__ */ jsx50("p", { className: cn(styles.text.replace("text-", "text-") + "/80", "text-sm"), children: description })
|
|
12534
12467
|
] }),
|
|
12535
|
-
children && /* @__PURE__ */
|
|
12468
|
+
children && /* @__PURE__ */ jsx50("div", { className: "mt-2 flex flex-wrap gap-2 justify-center", children })
|
|
12536
12469
|
] }) });
|
|
12537
12470
|
}
|
|
12538
12471
|
|
|
@@ -12540,7 +12473,7 @@ function AccessDenied({
|
|
|
12540
12473
|
import { Moon, Sun, Monitor } from "lucide-react";
|
|
12541
12474
|
import { useEffect as useEffect20, useRef as useRef12, useState as useState32 } from "react";
|
|
12542
12475
|
import { createPortal as createPortal10 } from "react-dom";
|
|
12543
|
-
import { Fragment as Fragment18, jsx as
|
|
12476
|
+
import { Fragment as Fragment18, jsx as jsx51, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
12544
12477
|
function ThemeToggleHeadless({
|
|
12545
12478
|
theme,
|
|
12546
12479
|
onChange,
|
|
@@ -12570,7 +12503,7 @@ function ThemeToggleHeadless({
|
|
|
12570
12503
|
return { top, left, width };
|
|
12571
12504
|
};
|
|
12572
12505
|
return /* @__PURE__ */ jsxs46("div", { className: cn("relative", className), children: [
|
|
12573
|
-
/* @__PURE__ */
|
|
12506
|
+
/* @__PURE__ */ jsx51(
|
|
12574
12507
|
Button_default,
|
|
12575
12508
|
{
|
|
12576
12509
|
variant: "ghost",
|
|
@@ -12588,13 +12521,13 @@ function ThemeToggleHeadless({
|
|
|
12588
12521
|
"aria-haspopup": "menu",
|
|
12589
12522
|
"aria-expanded": isOpen,
|
|
12590
12523
|
"aria-label": labels?.heading ?? "Theme",
|
|
12591
|
-
children: /* @__PURE__ */
|
|
12524
|
+
children: /* @__PURE__ */ jsx51(CurrentIcon, { className: "h-5 w-5" })
|
|
12592
12525
|
}
|
|
12593
12526
|
),
|
|
12594
12527
|
isOpen && /* @__PURE__ */ jsxs46(Fragment18, { children: [
|
|
12595
|
-
typeof window !== "undefined" && createPortal10(/* @__PURE__ */
|
|
12528
|
+
typeof window !== "undefined" && createPortal10(/* @__PURE__ */ jsx51("div", { className: "fixed inset-0 z-[9998]", onClick: () => setIsOpen(false) }), document.body),
|
|
12596
12529
|
typeof window !== "undefined" && dropdownPosition && createPortal10(
|
|
12597
|
-
/* @__PURE__ */
|
|
12530
|
+
/* @__PURE__ */ jsx51(
|
|
12598
12531
|
"div",
|
|
12599
12532
|
{
|
|
12600
12533
|
className: "z-[9999] bg-card border border-border rounded-lg shadow-lg overflow-hidden",
|
|
@@ -12602,7 +12535,7 @@ function ThemeToggleHeadless({
|
|
|
12602
12535
|
onMouseDown: (e) => e.stopPropagation(),
|
|
12603
12536
|
role: "menu",
|
|
12604
12537
|
children: /* @__PURE__ */ jsxs46("div", { className: "p-2", children: [
|
|
12605
|
-
/* @__PURE__ */
|
|
12538
|
+
/* @__PURE__ */ jsx51("div", { className: "px-3 py-2 text-sm font-medium text-muted-foreground border-b border-border mb-2", children: labels?.heading ?? "Theme" }),
|
|
12606
12539
|
themes.map((opt) => {
|
|
12607
12540
|
const Icon = opt.icon;
|
|
12608
12541
|
const active = theme === opt.value;
|
|
@@ -12622,9 +12555,9 @@ function ThemeToggleHeadless({
|
|
|
12622
12555
|
role: "menuitemradio",
|
|
12623
12556
|
"aria-checked": active,
|
|
12624
12557
|
children: [
|
|
12625
|
-
/* @__PURE__ */
|
|
12626
|
-
/* @__PURE__ */
|
|
12627
|
-
active && /* @__PURE__ */
|
|
12558
|
+
/* @__PURE__ */ jsx51(Icon, { className: "h-4 w-4" }),
|
|
12559
|
+
/* @__PURE__ */ jsx51("span", { className: "flex-1 text-left", children: opt.label }),
|
|
12560
|
+
active && /* @__PURE__ */ jsx51("div", { className: "w-2 h-2 rounded-full bg-primary" })
|
|
12628
12561
|
]
|
|
12629
12562
|
},
|
|
12630
12563
|
opt.value
|
|
@@ -12643,7 +12576,7 @@ function ThemeToggleHeadless({
|
|
|
12643
12576
|
import { useRef as useRef13, useState as useState33 } from "react";
|
|
12644
12577
|
import { createPortal as createPortal11 } from "react-dom";
|
|
12645
12578
|
import { Globe } from "lucide-react";
|
|
12646
|
-
import { Fragment as Fragment19, jsx as
|
|
12579
|
+
import { Fragment as Fragment19, jsx as jsx52, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
12647
12580
|
function LanguageSwitcherHeadless({
|
|
12648
12581
|
locales,
|
|
12649
12582
|
currentLocale,
|
|
@@ -12666,7 +12599,7 @@ function LanguageSwitcherHeadless({
|
|
|
12666
12599
|
return { top, left, width };
|
|
12667
12600
|
};
|
|
12668
12601
|
return /* @__PURE__ */ jsxs47("div", { className: cn("relative", className), children: [
|
|
12669
|
-
/* @__PURE__ */
|
|
12602
|
+
/* @__PURE__ */ jsx52(
|
|
12670
12603
|
Button_default,
|
|
12671
12604
|
{
|
|
12672
12605
|
variant: "ghost",
|
|
@@ -12685,13 +12618,13 @@ function LanguageSwitcherHeadless({
|
|
|
12685
12618
|
"aria-expanded": isOpen,
|
|
12686
12619
|
"aria-label": labels?.heading ?? "Language",
|
|
12687
12620
|
title: labels?.heading ?? "Language",
|
|
12688
|
-
children: /* @__PURE__ */
|
|
12621
|
+
children: /* @__PURE__ */ jsx52(Globe, { className: "h-5 w-5" })
|
|
12689
12622
|
}
|
|
12690
12623
|
),
|
|
12691
12624
|
isOpen && /* @__PURE__ */ jsxs47(Fragment19, { children: [
|
|
12692
|
-
typeof window !== "undefined" && createPortal11(/* @__PURE__ */
|
|
12625
|
+
typeof window !== "undefined" && createPortal11(/* @__PURE__ */ jsx52("div", { className: "fixed inset-0 z-[9998]", onClick: () => setIsOpen(false) }), document.body),
|
|
12693
12626
|
typeof window !== "undefined" && dropdownPosition && createPortal11(
|
|
12694
|
-
/* @__PURE__ */
|
|
12627
|
+
/* @__PURE__ */ jsx52(
|
|
12695
12628
|
"div",
|
|
12696
12629
|
{
|
|
12697
12630
|
className: "z-[9999] bg-card border border-border rounded-lg shadow-lg overflow-hidden",
|
|
@@ -12699,7 +12632,7 @@ function LanguageSwitcherHeadless({
|
|
|
12699
12632
|
onMouseDown: (e) => e.stopPropagation(),
|
|
12700
12633
|
role: "menu",
|
|
12701
12634
|
children: /* @__PURE__ */ jsxs47("div", { className: "p-2", children: [
|
|
12702
|
-
/* @__PURE__ */
|
|
12635
|
+
/* @__PURE__ */ jsx52("div", { className: "px-3 py-2 text-sm font-medium text-muted-foreground border-b border-border mb-2", children: labels?.heading ?? "Language" }),
|
|
12703
12636
|
locales.map((language) => /* @__PURE__ */ jsxs47(
|
|
12704
12637
|
Button_default,
|
|
12705
12638
|
{
|
|
@@ -12713,9 +12646,9 @@ function LanguageSwitcherHeadless({
|
|
|
12713
12646
|
role: "menuitemradio",
|
|
12714
12647
|
"aria-checked": currentLocale === language.code,
|
|
12715
12648
|
children: [
|
|
12716
|
-
language.flag && /* @__PURE__ */
|
|
12717
|
-
/* @__PURE__ */
|
|
12718
|
-
currentLocale === language.code && /* @__PURE__ */
|
|
12649
|
+
language.flag && /* @__PURE__ */ jsx52("span", { className: "text-lg", children: language.flag }),
|
|
12650
|
+
/* @__PURE__ */ jsx52("span", { className: "flex-1 text-left", children: language.name }),
|
|
12651
|
+
currentLocale === language.code && /* @__PURE__ */ jsx52("div", { className: "w-2 h-2 rounded-full bg-primary" })
|
|
12719
12652
|
]
|
|
12720
12653
|
},
|
|
12721
12654
|
language.code
|