@mesob/ui 0.5.5 → 0.5.7
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/components.d.ts +12 -5
- package/dist/components.js +656 -558
- package/dist/components.js.map +1 -1
- package/package.json +7 -2
- package/src/styles/style-lyra.css +245 -6
- package/src/styles/style-maia.css +239 -5
- package/src/styles/style-mira.css +244 -5
- package/src/styles/style-nova.css +132 -5
- package/src/styles/style-vega.css +132 -5
- package/src/styles/themes.css +31 -0
- package/src/styles/lyra/button.css +0 -107
- package/src/styles/maia/button.css +0 -107
- package/src/styles/mira/button.css +0 -107
package/dist/components.js
CHANGED
|
@@ -1010,35 +1010,53 @@ var inputGroupAddonVariants = cva3(
|
|
|
1010
1010
|
function InputGroupAddon({
|
|
1011
1011
|
className,
|
|
1012
1012
|
align = "inline-start",
|
|
1013
|
-
|
|
1013
|
+
as: Component = "button",
|
|
1014
1014
|
...props
|
|
1015
1015
|
}) {
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
}
|
|
1027
|
-
e.currentTarget.closest("[data-slot=input-group]")?.querySelector("input, textarea, [role=combobox]")?.focus();
|
|
1028
|
-
},
|
|
1029
|
-
onKeyDown: (e) => {
|
|
1030
|
-
if (e.key !== "Enter" && e.key !== " ") {
|
|
1031
|
-
return;
|
|
1032
|
-
}
|
|
1033
|
-
if (e.target.closest("button")) {
|
|
1034
|
-
return;
|
|
1035
|
-
}
|
|
1036
|
-
e.preventDefault();
|
|
1037
|
-
e.currentTarget.closest("[data-slot=input-group]")?.querySelector("input, textarea, [role=combobox]")?.focus();
|
|
1038
|
-
},
|
|
1039
|
-
...props
|
|
1016
|
+
const isButton = Component === "button";
|
|
1017
|
+
const addonClass = cn(inputGroupAddonVariants({ align }), className);
|
|
1018
|
+
const shared = {
|
|
1019
|
+
"data-slot": "input-group-addon",
|
|
1020
|
+
"data-align": align,
|
|
1021
|
+
className: addonClass
|
|
1022
|
+
};
|
|
1023
|
+
const handleClick = (e) => {
|
|
1024
|
+
if (!isButton) {
|
|
1025
|
+
return;
|
|
1040
1026
|
}
|
|
1041
|
-
|
|
1027
|
+
if (e.target.closest("button")) {
|
|
1028
|
+
return;
|
|
1029
|
+
}
|
|
1030
|
+
e.currentTarget.closest("[data-slot=input-group]")?.querySelector("input, textarea, [role=combobox]")?.focus();
|
|
1031
|
+
};
|
|
1032
|
+
const handleKeyDown = (e) => {
|
|
1033
|
+
if (!isButton) {
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
if (e.key !== "Enter" && e.key !== " ") {
|
|
1037
|
+
return;
|
|
1038
|
+
}
|
|
1039
|
+
if (e.target.closest("button")) {
|
|
1040
|
+
return;
|
|
1041
|
+
}
|
|
1042
|
+
e.preventDefault();
|
|
1043
|
+
e.currentTarget.closest("[data-slot=input-group]")?.querySelector("input, textarea, [role=combobox]")?.focus();
|
|
1044
|
+
};
|
|
1045
|
+
if (isButton) {
|
|
1046
|
+
const p2 = props;
|
|
1047
|
+
return /* @__PURE__ */ jsx11(
|
|
1048
|
+
"button",
|
|
1049
|
+
{
|
|
1050
|
+
type: p2.type ?? "button",
|
|
1051
|
+
...shared,
|
|
1052
|
+
onClick: handleClick,
|
|
1053
|
+
onKeyDown: handleKeyDown,
|
|
1054
|
+
...p2
|
|
1055
|
+
}
|
|
1056
|
+
);
|
|
1057
|
+
}
|
|
1058
|
+
const p = props;
|
|
1059
|
+
return /* @__PURE__ */ jsx11("div", { ...shared, ...p });
|
|
1042
1060
|
}
|
|
1043
1061
|
var inputGroupButtonVariants = cva3(
|
|
1044
1062
|
"cn-input-group-button shadow-none flex items-center",
|
|
@@ -1171,7 +1189,7 @@ function CommandInput({
|
|
|
1171
1189
|
...props
|
|
1172
1190
|
}
|
|
1173
1191
|
),
|
|
1174
|
-
/* @__PURE__ */ jsx12(InputGroupAddon, { children: /* @__PURE__ */ jsx12(IconSearch, { className: "cn-command-input-icon" }) })
|
|
1192
|
+
/* @__PURE__ */ jsx12(InputGroupAddon, { as: "div", children: /* @__PURE__ */ jsx12(IconSearch, { className: "cn-command-input-icon" }) })
|
|
1175
1193
|
] }) });
|
|
1176
1194
|
}
|
|
1177
1195
|
function CommandList({
|
|
@@ -2990,15 +3008,20 @@ function AppSidebar({
|
|
|
2990
3008
|
}
|
|
2991
3009
|
|
|
2992
3010
|
// src/components/ui/card.tsx
|
|
2993
|
-
import {
|
|
3011
|
+
import { Children, isValidElement as isValidElement2 } from "react";
|
|
3012
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2994
3013
|
function Card({
|
|
2995
3014
|
className,
|
|
2996
3015
|
children,
|
|
2997
|
-
size = "
|
|
3016
|
+
size = "md",
|
|
2998
3017
|
padding,
|
|
2999
3018
|
radius,
|
|
3000
|
-
withBorder,
|
|
3019
|
+
withBorder = true,
|
|
3001
3020
|
variant,
|
|
3021
|
+
header,
|
|
3022
|
+
title,
|
|
3023
|
+
actions,
|
|
3024
|
+
footer,
|
|
3002
3025
|
...props
|
|
3003
3026
|
}) {
|
|
3004
3027
|
const paddingClasses = {
|
|
@@ -3017,13 +3040,15 @@ function Card({
|
|
|
3017
3040
|
xl: "rounded-[var(--radius-xl)]",
|
|
3018
3041
|
full: "rounded-full"
|
|
3019
3042
|
};
|
|
3020
|
-
|
|
3043
|
+
const hasStructure = header != null || footer != null || title != null || actions != null;
|
|
3044
|
+
return /* @__PURE__ */ jsxs15(
|
|
3021
3045
|
"div",
|
|
3022
3046
|
{
|
|
3023
3047
|
"data-slot": "card",
|
|
3048
|
+
"data-sectioned": hasStructure ? "" : void 0,
|
|
3024
3049
|
"data-size": size,
|
|
3025
3050
|
className: cn(
|
|
3026
|
-
"cn-card group/card
|
|
3051
|
+
"cn-card group/card",
|
|
3027
3052
|
variant === "outline" && "cn-card-variant-outline",
|
|
3028
3053
|
variant === "filled" && "cn-card-variant-filled",
|
|
3029
3054
|
withBorder && "cn-card-with-border",
|
|
@@ -3032,17 +3057,46 @@ function Card({
|
|
|
3032
3057
|
className
|
|
3033
3058
|
),
|
|
3034
3059
|
...props,
|
|
3035
|
-
children
|
|
3060
|
+
children: [
|
|
3061
|
+
cardHeaderFromProps(header, title, actions),
|
|
3062
|
+
bodySlot(children, hasStructure),
|
|
3063
|
+
footer != null ? /* @__PURE__ */ jsx22(CardFooter, { children: footer }) : null
|
|
3064
|
+
]
|
|
3036
3065
|
}
|
|
3037
3066
|
);
|
|
3038
3067
|
}
|
|
3068
|
+
function isSingleCardContent(children) {
|
|
3069
|
+
if (Children.count(children) !== 1) {
|
|
3070
|
+
return false;
|
|
3071
|
+
}
|
|
3072
|
+
const only = Children.only(children);
|
|
3073
|
+
return isValidElement2(only) && only.props["data-slot"] === "card-content";
|
|
3074
|
+
}
|
|
3075
|
+
function bodySlot(children, hasStructure) {
|
|
3076
|
+
if (children == null || !hasStructure || isSingleCardContent(children)) {
|
|
3077
|
+
return children;
|
|
3078
|
+
}
|
|
3079
|
+
return /* @__PURE__ */ jsx22(CardContent, { children });
|
|
3080
|
+
}
|
|
3081
|
+
function cardHeaderFromProps(header, title, actions) {
|
|
3082
|
+
if (header != null) {
|
|
3083
|
+
return /* @__PURE__ */ jsx22(CardHeader, { children: header });
|
|
3084
|
+
}
|
|
3085
|
+
if (title != null || actions != null) {
|
|
3086
|
+
return /* @__PURE__ */ jsxs15(CardHeader, { className: "items-center", children: [
|
|
3087
|
+
title != null ? /* @__PURE__ */ jsx22(CardTitle, { children: title }) : null,
|
|
3088
|
+
actions != null ? /* @__PURE__ */ jsx22(CardAction, { children: actions }) : null
|
|
3089
|
+
] });
|
|
3090
|
+
}
|
|
3091
|
+
return null;
|
|
3092
|
+
}
|
|
3039
3093
|
function CardHeader({ className, ...props }) {
|
|
3040
3094
|
return /* @__PURE__ */ jsx22(
|
|
3041
3095
|
"div",
|
|
3042
3096
|
{
|
|
3043
3097
|
"data-slot": "card-header",
|
|
3044
3098
|
className: cn(
|
|
3045
|
-
"cn-card-header group/card-header @container/card-header grid auto-rows-min
|
|
3099
|
+
"cn-card-header group/card-header @container/card-header grid auto-rows-min has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] has-data-[slot=card-description]:[&>[data-slot=card-action]]:row-span-2 [&:not(:last-child)]:border-border/60 [&:not(:last-child)]:border-b",
|
|
3046
3100
|
className
|
|
3047
3101
|
),
|
|
3048
3102
|
...props
|
|
@@ -3075,7 +3129,7 @@ function CardAction({ className, ...props }) {
|
|
|
3075
3129
|
{
|
|
3076
3130
|
"data-slot": "card-action",
|
|
3077
3131
|
className: cn(
|
|
3078
|
-
"col-start-2 row-
|
|
3132
|
+
"col-start-2 row-start-1 inline-flex shrink-0 flex-wrap items-center justify-self-end gap-2 self-center",
|
|
3079
3133
|
className
|
|
3080
3134
|
),
|
|
3081
3135
|
...props
|
|
@@ -3097,7 +3151,10 @@ function CardFooter({ className, ...props }) {
|
|
|
3097
3151
|
"div",
|
|
3098
3152
|
{
|
|
3099
3153
|
"data-slot": "card-footer",
|
|
3100
|
-
className: cn(
|
|
3154
|
+
className: cn(
|
|
3155
|
+
"cn-card-footer flex items-center [&:not(:first-child)]:border-border/60 [&:not(:first-child)]:border-t",
|
|
3156
|
+
className
|
|
3157
|
+
),
|
|
3101
3158
|
...props
|
|
3102
3159
|
}
|
|
3103
3160
|
);
|
|
@@ -3105,8 +3162,8 @@ function CardFooter({ className, ...props }) {
|
|
|
3105
3162
|
|
|
3106
3163
|
// src/components/ui/loader.tsx
|
|
3107
3164
|
import * as React5 from "react";
|
|
3108
|
-
import { Fragment as Fragment7, jsx as jsx23, jsxs as
|
|
3109
|
-
var OvalLoader = ({ className }) => /* @__PURE__ */
|
|
3165
|
+
import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3166
|
+
var OvalLoader = ({ className }) => /* @__PURE__ */ jsxs16(
|
|
3110
3167
|
"svg",
|
|
3111
3168
|
{
|
|
3112
3169
|
viewBox: "0 0 38 38",
|
|
@@ -3119,7 +3176,7 @@ var OvalLoader = ({ className }) => /* @__PURE__ */ jsxs15(
|
|
|
3119
3176
|
"aria-label": "Loading",
|
|
3120
3177
|
children: [
|
|
3121
3178
|
/* @__PURE__ */ jsx23("title", { children: "Loading" }),
|
|
3122
|
-
/* @__PURE__ */ jsx23("g", { fill: "none", fillRule: "evenodd", children: /* @__PURE__ */
|
|
3179
|
+
/* @__PURE__ */ jsx23("g", { fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ jsxs16("g", { transform: "translate(1 1)", strokeWidth: "2", children: [
|
|
3123
3180
|
/* @__PURE__ */ jsx23(
|
|
3124
3181
|
"circle",
|
|
3125
3182
|
{
|
|
@@ -3212,7 +3269,7 @@ var Loader = React5.forwardRef(
|
|
|
3212
3269
|
}
|
|
3213
3270
|
const loaderSize = getLoaderSize2(size);
|
|
3214
3271
|
const LoaderComponent = loaders[type];
|
|
3215
|
-
return /* @__PURE__ */
|
|
3272
|
+
return /* @__PURE__ */ jsxs16(
|
|
3216
3273
|
"output",
|
|
3217
3274
|
{
|
|
3218
3275
|
ref,
|
|
@@ -3262,7 +3319,7 @@ function Overlay({
|
|
|
3262
3319
|
}
|
|
3263
3320
|
|
|
3264
3321
|
// src/components/ui/loading-overlay.tsx
|
|
3265
|
-
import { jsx as jsx25, jsxs as
|
|
3322
|
+
import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3266
3323
|
function LoadingOverlay({
|
|
3267
3324
|
visible,
|
|
3268
3325
|
zIndex = 1e3,
|
|
@@ -3277,7 +3334,7 @@ function LoadingOverlay({
|
|
|
3277
3334
|
if (!visible) {
|
|
3278
3335
|
return null;
|
|
3279
3336
|
}
|
|
3280
|
-
return /* @__PURE__ */
|
|
3337
|
+
return /* @__PURE__ */ jsxs17(
|
|
3281
3338
|
"div",
|
|
3282
3339
|
{
|
|
3283
3340
|
"data-slot": "loading-overlay",
|
|
@@ -3357,7 +3414,7 @@ function EntityPageLoading({
|
|
|
3357
3414
|
}
|
|
3358
3415
|
|
|
3359
3416
|
// src/components/app/error-page-view.tsx
|
|
3360
|
-
import { jsx as jsx28, jsxs as
|
|
3417
|
+
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3361
3418
|
function ErrorPageView({
|
|
3362
3419
|
code,
|
|
3363
3420
|
title,
|
|
@@ -3366,15 +3423,15 @@ function ErrorPageView({
|
|
|
3366
3423
|
secondaryAction,
|
|
3367
3424
|
onRetry
|
|
3368
3425
|
}) {
|
|
3369
|
-
return /* @__PURE__ */
|
|
3426
|
+
return /* @__PURE__ */ jsxs18("div", { className: "flex min-h-svh flex-col items-center justify-center bg-background px-6 py-16 sm:px-8", children: [
|
|
3370
3427
|
/* @__PURE__ */ jsx28("div", { className: "absolute inset-0 bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,var(--color-primary)/0.08,transparent)]" }),
|
|
3371
|
-
/* @__PURE__ */
|
|
3428
|
+
/* @__PURE__ */ jsxs18("div", { className: "relative flex w-full min-w-72 max-w-3xl shrink-0 flex-col items-center gap-8 text-center", children: [
|
|
3372
3429
|
/* @__PURE__ */ jsx28("span", { className: "font-mono text-[7rem] font-bold leading-none tracking-tighter text-muted-foreground/50", children: code }),
|
|
3373
|
-
/* @__PURE__ */
|
|
3430
|
+
/* @__PURE__ */ jsxs18("div", { className: "w-full space-y-2", children: [
|
|
3374
3431
|
/* @__PURE__ */ jsx28("h1", { className: "text-2xl font-semibold tracking-tight text-foreground sm:text-3xl", children: title }),
|
|
3375
3432
|
/* @__PURE__ */ jsx28("p", { className: "w-full text-sm text-muted-foreground sm:text-base", children: description })
|
|
3376
3433
|
] }),
|
|
3377
|
-
/* @__PURE__ */
|
|
3434
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex w-full flex-col gap-3 sm:flex-row sm:justify-center", children: [
|
|
3378
3435
|
primaryAction,
|
|
3379
3436
|
secondaryAction,
|
|
3380
3437
|
onRetry && /* @__PURE__ */ jsx28(Button, { variant: "ghost", size: "lg", onClick: onRetry, children: "Try again" })
|
|
@@ -3518,7 +3575,7 @@ function Text({
|
|
|
3518
3575
|
}
|
|
3519
3576
|
|
|
3520
3577
|
// src/components/app/no-data-available.tsx
|
|
3521
|
-
import { jsx as jsx29, jsxs as
|
|
3578
|
+
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3522
3579
|
var isExternal = (href) => href.startsWith("http") || href.startsWith("//") || href.startsWith("mailto:") || href.startsWith("tel:");
|
|
3523
3580
|
function NoDataAvailable({
|
|
3524
3581
|
title,
|
|
@@ -3538,7 +3595,7 @@ function NoDataAvailable({
|
|
|
3538
3595
|
alert: IconAlertCircle
|
|
3539
3596
|
};
|
|
3540
3597
|
const IconComponent = iconMap[iconType];
|
|
3541
|
-
return /* @__PURE__ */ jsx29(Card, { children: /* @__PURE__ */ jsx29("div", { className: "flex justify-center", children: /* @__PURE__ */
|
|
3598
|
+
return /* @__PURE__ */ jsx29(Card, { children: /* @__PURE__ */ jsx29("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs19("div", { className: "flex flex-col items-center gap-4 text-center", children: [
|
|
3542
3599
|
icon || /* @__PURE__ */ jsx29(IconComponent, { size: 80, className: "text-primary", stroke: 1.5 }),
|
|
3543
3600
|
/* @__PURE__ */ jsx29(
|
|
3544
3601
|
Text,
|
|
@@ -3575,13 +3632,13 @@ import { forwardRef as forwardRef3 } from "react";
|
|
|
3575
3632
|
|
|
3576
3633
|
// src/components/ui/scroll-area.tsx
|
|
3577
3634
|
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
3578
|
-
import { jsx as jsx30, jsxs as
|
|
3635
|
+
import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3579
3636
|
function ScrollArea({
|
|
3580
3637
|
className,
|
|
3581
3638
|
children,
|
|
3582
3639
|
...props
|
|
3583
3640
|
}) {
|
|
3584
|
-
return /* @__PURE__ */
|
|
3641
|
+
return /* @__PURE__ */ jsxs20(
|
|
3585
3642
|
ScrollAreaPrimitive.Root,
|
|
3586
3643
|
{
|
|
3587
3644
|
"data-slot": "scroll-area",
|
|
@@ -3630,9 +3687,9 @@ function ScrollBar({
|
|
|
3630
3687
|
}
|
|
3631
3688
|
|
|
3632
3689
|
// src/components/display-table/display-table.tsx
|
|
3633
|
-
import { Fragment as Fragment8, jsx as jsx31, jsxs as
|
|
3690
|
+
import { Fragment as Fragment8, jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3634
3691
|
function renderTableData(data, opts) {
|
|
3635
|
-
return /* @__PURE__ */
|
|
3692
|
+
return /* @__PURE__ */ jsxs21(Fragment8, { children: [
|
|
3636
3693
|
data.caption != null && /* @__PURE__ */ jsx31(
|
|
3637
3694
|
DisplayTableCaption,
|
|
3638
3695
|
{
|
|
@@ -3831,7 +3888,7 @@ import { useState as useState6 } from "react";
|
|
|
3831
3888
|
|
|
3832
3889
|
// src/components/ui/alert-dialog.tsx
|
|
3833
3890
|
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
3834
|
-
import { jsx as jsx32, jsxs as
|
|
3891
|
+
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3835
3892
|
function AlertDialog({
|
|
3836
3893
|
...props
|
|
3837
3894
|
}) {
|
|
@@ -3868,7 +3925,7 @@ function AlertDialogContent({
|
|
|
3868
3925
|
size = "default",
|
|
3869
3926
|
...props
|
|
3870
3927
|
}) {
|
|
3871
|
-
return /* @__PURE__ */
|
|
3928
|
+
return /* @__PURE__ */ jsxs22(AlertDialogPortal, { children: [
|
|
3872
3929
|
/* @__PURE__ */ jsx32(AlertDialogOverlay, {}),
|
|
3873
3930
|
/* @__PURE__ */ jsx32(
|
|
3874
3931
|
AlertDialogPrimitive.Popup,
|
|
@@ -3981,7 +4038,7 @@ function AlertDialogCancel({
|
|
|
3981
4038
|
}
|
|
3982
4039
|
|
|
3983
4040
|
// src/components/entity/entity-bulk-actions.tsx
|
|
3984
|
-
import { Fragment as Fragment9, jsx as jsx33, jsxs as
|
|
4041
|
+
import { Fragment as Fragment9, jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3985
4042
|
function EntityBulkActions({
|
|
3986
4043
|
selectedCount,
|
|
3987
4044
|
actions,
|
|
@@ -4008,9 +4065,9 @@ function EntityBulkActions({
|
|
|
4008
4065
|
});
|
|
4009
4066
|
}
|
|
4010
4067
|
const allActions = actions ? [...actions, ...defaultActions] : defaultActions;
|
|
4011
|
-
return /* @__PURE__ */
|
|
4012
|
-
/* @__PURE__ */
|
|
4013
|
-
/* @__PURE__ */
|
|
4068
|
+
return /* @__PURE__ */ jsxs23(Fragment9, { children: [
|
|
4069
|
+
/* @__PURE__ */ jsxs23(DropdownMenu, { children: [
|
|
4070
|
+
/* @__PURE__ */ jsxs23(
|
|
4014
4071
|
DropdownMenuTrigger,
|
|
4015
4072
|
{
|
|
4016
4073
|
render: /* @__PURE__ */ jsx33(
|
|
@@ -4028,9 +4085,9 @@ function EntityBulkActions({
|
|
|
4028
4085
|
]
|
|
4029
4086
|
}
|
|
4030
4087
|
),
|
|
4031
|
-
/* @__PURE__ */ jsx33(DropdownMenuPositioner, { align: "end", children: /* @__PURE__ */ jsx33(DropdownMenuContent, { children: allActions.map((action, index) => /* @__PURE__ */
|
|
4088
|
+
/* @__PURE__ */ jsx33(DropdownMenuPositioner, { align: "end", children: /* @__PURE__ */ jsx33(DropdownMenuContent, { children: allActions.map((action, index) => /* @__PURE__ */ jsxs23("div", { children: [
|
|
4032
4089
|
action.variant === "destructive" && index > 0 && /* @__PURE__ */ jsx33(DropdownMenuSeparator, {}),
|
|
4033
|
-
/* @__PURE__ */
|
|
4090
|
+
/* @__PURE__ */ jsxs23(
|
|
4034
4091
|
DropdownMenuItem,
|
|
4035
4092
|
{
|
|
4036
4093
|
onClick: action.onClick,
|
|
@@ -4043,22 +4100,22 @@ function EntityBulkActions({
|
|
|
4043
4100
|
)
|
|
4044
4101
|
] }, action.label)) }) })
|
|
4045
4102
|
] }),
|
|
4046
|
-
/* @__PURE__ */ jsx33(AlertDialog, { open: showDeleteConfirm, onOpenChange: setShowDeleteConfirm, children: /* @__PURE__ */
|
|
4047
|
-
/* @__PURE__ */
|
|
4048
|
-
/* @__PURE__ */
|
|
4103
|
+
/* @__PURE__ */ jsx33(AlertDialog, { open: showDeleteConfirm, onOpenChange: setShowDeleteConfirm, children: /* @__PURE__ */ jsxs23(AlertDialogContent, { children: [
|
|
4104
|
+
/* @__PURE__ */ jsxs23(AlertDialogHeader, { children: [
|
|
4105
|
+
/* @__PURE__ */ jsxs23(AlertDialogTitle, { children: [
|
|
4049
4106
|
"Delete ",
|
|
4050
4107
|
selectedCount,
|
|
4051
4108
|
" ",
|
|
4052
4109
|
itemName,
|
|
4053
4110
|
"(s)?"
|
|
4054
4111
|
] }),
|
|
4055
|
-
/* @__PURE__ */
|
|
4112
|
+
/* @__PURE__ */ jsxs23(AlertDialogDescription, { children: [
|
|
4056
4113
|
"This will permanently delete the selected ",
|
|
4057
4114
|
itemName,
|
|
4058
4115
|
"(s). This action cannot be undone."
|
|
4059
4116
|
] })
|
|
4060
4117
|
] }),
|
|
4061
|
-
/* @__PURE__ */
|
|
4118
|
+
/* @__PURE__ */ jsxs23(AlertDialogFooter, { children: [
|
|
4062
4119
|
/* @__PURE__ */ jsx33(AlertDialogCancel, { children: "Cancel" }),
|
|
4063
4120
|
/* @__PURE__ */ jsx33(
|
|
4064
4121
|
AlertDialogAction,
|
|
@@ -4078,7 +4135,7 @@ function EntityBulkActions({
|
|
|
4078
4135
|
|
|
4079
4136
|
// src/components/entity/entity-delete-confirm-button.tsx
|
|
4080
4137
|
import { IconTrash as IconTrash2 } from "@tabler/icons-react";
|
|
4081
|
-
import { jsx as jsx34, jsxs as
|
|
4138
|
+
import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4082
4139
|
var defaultTriggerClassName = "size-8 opacity-0 transition-opacity group-hover:opacity-100 text-destructive hover:text-destructive";
|
|
4083
4140
|
function DeleteConfirmButton({
|
|
4084
4141
|
entityName,
|
|
@@ -4101,14 +4158,14 @@ function DeleteConfirmButton({
|
|
|
4101
4158
|
children: /* @__PURE__ */ jsx34(IconTrash2, { className: "size-4" })
|
|
4102
4159
|
}
|
|
4103
4160
|
);
|
|
4104
|
-
return /* @__PURE__ */
|
|
4161
|
+
return /* @__PURE__ */ jsxs24(AlertDialog, { children: [
|
|
4105
4162
|
/* @__PURE__ */ jsx34(AlertDialogTrigger, { render: trigger ?? defaultTrigger }),
|
|
4106
|
-
/* @__PURE__ */
|
|
4107
|
-
/* @__PURE__ */
|
|
4163
|
+
/* @__PURE__ */ jsxs24(AlertDialogContent, { children: [
|
|
4164
|
+
/* @__PURE__ */ jsxs24(AlertDialogHeader, { children: [
|
|
4108
4165
|
/* @__PURE__ */ jsx34(AlertDialogTitle, { children: resolvedTitle }),
|
|
4109
4166
|
/* @__PURE__ */ jsx34(AlertDialogDescription, { children: resolvedDescription })
|
|
4110
4167
|
] }),
|
|
4111
|
-
/* @__PURE__ */
|
|
4168
|
+
/* @__PURE__ */ jsxs24(AlertDialogFooter, { children: [
|
|
4112
4169
|
/* @__PURE__ */ jsx34(AlertDialogCancel, { children: cancelLabel }),
|
|
4113
4170
|
/* @__PURE__ */ jsx34(AlertDialogAction, { variant: "destructive", onClick: onConfirm, children: confirmLabel })
|
|
4114
4171
|
] })
|
|
@@ -4121,7 +4178,7 @@ import { useMesob as useMesob5 } from "@mesob/ui/providers";
|
|
|
4121
4178
|
import { IconChevronDown as IconChevronDown4, IconMenu2 as IconMenu22 } from "@tabler/icons-react";
|
|
4122
4179
|
import {
|
|
4123
4180
|
cloneElement,
|
|
4124
|
-
isValidElement as
|
|
4181
|
+
isValidElement as isValidElement3,
|
|
4125
4182
|
useLayoutEffect,
|
|
4126
4183
|
useMemo as useMemo3,
|
|
4127
4184
|
useRef as useRef3,
|
|
@@ -4130,13 +4187,13 @@ import {
|
|
|
4130
4187
|
|
|
4131
4188
|
// src/components/layout/page/page-go-back.tsx
|
|
4132
4189
|
import { IconArrowLeft } from "@tabler/icons-react";
|
|
4133
|
-
import { jsx as jsx35, jsxs as
|
|
4190
|
+
import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4134
4191
|
function PageGoBack({
|
|
4135
4192
|
onBack,
|
|
4136
4193
|
label = "Go back",
|
|
4137
4194
|
children
|
|
4138
4195
|
}) {
|
|
4139
|
-
return /* @__PURE__ */ jsx35(TooltipProvider, { children: /* @__PURE__ */
|
|
4196
|
+
return /* @__PURE__ */ jsx35(TooltipProvider, { children: /* @__PURE__ */ jsxs25(Tooltip, { children: [
|
|
4140
4197
|
/* @__PURE__ */ jsx35(
|
|
4141
4198
|
TooltipTrigger,
|
|
4142
4199
|
{
|
|
@@ -4151,7 +4208,7 @@ function PageGoBack({
|
|
|
4151
4208
|
// src/components/ui/select.tsx
|
|
4152
4209
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
4153
4210
|
import { IconCheck as IconCheck2, IconChevronDown as IconChevronDown3, IconChevronUp } from "@tabler/icons-react";
|
|
4154
|
-
import { jsx as jsx36, jsxs as
|
|
4211
|
+
import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4155
4212
|
var Select = SelectPrimitive.Root;
|
|
4156
4213
|
var SELECT_TRIGGER_BASE_CN = "flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
4157
4214
|
var SELECT_CONTENT_BASE_CN = "cn-menu-target relative isolate z-50 max-h-[min(100dvh,var(--available-height,100dvh))] w-[var(--anchor-width,auto)] origin-(--transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none";
|
|
@@ -4182,7 +4239,7 @@ function SelectTrigger({
|
|
|
4182
4239
|
children,
|
|
4183
4240
|
...props
|
|
4184
4241
|
}) {
|
|
4185
|
-
return /* @__PURE__ */
|
|
4242
|
+
return /* @__PURE__ */ jsxs26(
|
|
4186
4243
|
SelectPrimitive.Trigger,
|
|
4187
4244
|
{
|
|
4188
4245
|
"data-slot": "select-trigger",
|
|
@@ -4215,7 +4272,7 @@ function SelectContent({
|
|
|
4215
4272
|
alignOffset,
|
|
4216
4273
|
alignItemWithTrigger,
|
|
4217
4274
|
className: "isolate z-50",
|
|
4218
|
-
children: /* @__PURE__ */
|
|
4275
|
+
children: /* @__PURE__ */ jsxs26(
|
|
4219
4276
|
SelectPrimitive.Popup,
|
|
4220
4277
|
{
|
|
4221
4278
|
"data-slot": "select-content",
|
|
@@ -4255,7 +4312,7 @@ function SelectItem({
|
|
|
4255
4312
|
children,
|
|
4256
4313
|
...props
|
|
4257
4314
|
}) {
|
|
4258
|
-
return /* @__PURE__ */
|
|
4315
|
+
return /* @__PURE__ */ jsxs26(
|
|
4259
4316
|
SelectPrimitive.Item,
|
|
4260
4317
|
{
|
|
4261
4318
|
"data-slot": "select-item",
|
|
@@ -4317,7 +4374,7 @@ function SelectScrollDownButton({
|
|
|
4317
4374
|
}
|
|
4318
4375
|
|
|
4319
4376
|
// src/components/entity/entity-detail-header.tsx
|
|
4320
|
-
import { jsx as jsx37, jsxs as
|
|
4377
|
+
import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4321
4378
|
function EntityDetailHeader({
|
|
4322
4379
|
title,
|
|
4323
4380
|
icon,
|
|
@@ -4444,7 +4501,7 @@ function EntityDetailHeader({
|
|
|
4444
4501
|
};
|
|
4445
4502
|
const underline = isActive ? /* @__PURE__ */ jsx37("div", { className: "cn-entity-detail-header-underline absolute bottom-0 left-0 right-0 z-20 h-0.5 bg-primary" }) : null;
|
|
4446
4503
|
if (tab.href && LinkComponent) {
|
|
4447
|
-
return /* @__PURE__ */
|
|
4504
|
+
return /* @__PURE__ */ jsxs27(
|
|
4448
4505
|
LinkComponent,
|
|
4449
4506
|
{
|
|
4450
4507
|
href: tab.href,
|
|
@@ -4460,7 +4517,7 @@ function EntityDetailHeader({
|
|
|
4460
4517
|
tab.value
|
|
4461
4518
|
);
|
|
4462
4519
|
}
|
|
4463
|
-
return /* @__PURE__ */
|
|
4520
|
+
return /* @__PURE__ */ jsxs27(
|
|
4464
4521
|
"button",
|
|
4465
4522
|
{
|
|
4466
4523
|
type: "button",
|
|
@@ -4505,12 +4562,12 @@ function EntityDetailHeader({
|
|
|
4505
4562
|
if (loading) {
|
|
4506
4563
|
return /* @__PURE__ */ jsx37("div", { className: cn("flex flex-col gap-4", className), children: /* @__PURE__ */ jsx37(Skeleton, { className: "h-24 w-full rounded-xl" }) });
|
|
4507
4564
|
}
|
|
4508
|
-
return /* @__PURE__ */
|
|
4509
|
-
/* @__PURE__ */
|
|
4510
|
-
/* @__PURE__ */
|
|
4511
|
-
/* @__PURE__ */
|
|
4565
|
+
return /* @__PURE__ */ jsxs27("div", { className: cn("flex flex-col gap-4", className), children: [
|
|
4566
|
+
/* @__PURE__ */ jsxs27(Card, { className: "overflow-hidden p-0 gap-0", children: [
|
|
4567
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between gap-2 pl-1 pr-4 pt-4", children: [
|
|
4568
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center ", children: [
|
|
4512
4569
|
resolvedBackButton,
|
|
4513
|
-
icon && (
|
|
4570
|
+
icon && (isValidElement3(icon) ? cloneElement(
|
|
4514
4571
|
icon,
|
|
4515
4572
|
{
|
|
4516
4573
|
className: cn(
|
|
@@ -4523,14 +4580,14 @@ function EntityDetailHeader({
|
|
|
4523
4580
|
] }),
|
|
4524
4581
|
actions && /* @__PURE__ */ jsx37("div", { className: "flex items-center gap-2", children: actions })
|
|
4525
4582
|
] }),
|
|
4526
|
-
/* @__PURE__ */
|
|
4527
|
-
/* @__PURE__ */ jsx37("div", { className: "mb-3 w-full sm:hidden", children: /* @__PURE__ */
|
|
4583
|
+
/* @__PURE__ */ jsxs27("div", { ref: containerRef, className: "w-full px-4", children: [
|
|
4584
|
+
/* @__PURE__ */ jsx37("div", { className: "mb-3 w-full sm:hidden", children: /* @__PURE__ */ jsxs27(
|
|
4528
4585
|
Select,
|
|
4529
4586
|
{
|
|
4530
4587
|
value: activeTab,
|
|
4531
4588
|
onValueChange: (v) => handleTabChange(v),
|
|
4532
4589
|
children: [
|
|
4533
|
-
/* @__PURE__ */
|
|
4590
|
+
/* @__PURE__ */ jsxs27(SelectTrigger, { className: "h-9 w-full gap-2 [&>svg:first-child]:shrink-0", children: [
|
|
4534
4591
|
/* @__PURE__ */ jsx37(IconMenu22, { className: "size-4 text-muted-foreground" }),
|
|
4535
4592
|
/* @__PURE__ */ jsx37(SelectValue, {})
|
|
4536
4593
|
] }),
|
|
@@ -4538,7 +4595,7 @@ function EntityDetailHeader({
|
|
|
4538
4595
|
]
|
|
4539
4596
|
}
|
|
4540
4597
|
) }),
|
|
4541
|
-
/* @__PURE__ */
|
|
4598
|
+
/* @__PURE__ */ jsxs27(
|
|
4542
4599
|
"div",
|
|
4543
4600
|
{
|
|
4544
4601
|
ref: tabsListRef,
|
|
@@ -4550,8 +4607,8 @@ function EntityDetailHeader({
|
|
|
4550
4607
|
);
|
|
4551
4608
|
return renderTab(tab, originalIndex);
|
|
4552
4609
|
}),
|
|
4553
|
-
overflowTabs.length > 0 && /* @__PURE__ */
|
|
4554
|
-
/* @__PURE__ */
|
|
4610
|
+
overflowTabs.length > 0 && /* @__PURE__ */ jsxs27(DropdownMenu, { children: [
|
|
4611
|
+
/* @__PURE__ */ jsxs27(
|
|
4555
4612
|
DropdownMenuTrigger,
|
|
4556
4613
|
{
|
|
4557
4614
|
ref: dropdownTriggerRef,
|
|
@@ -4582,7 +4639,7 @@ function EntityDetailHeader({
|
|
|
4582
4639
|
|
|
4583
4640
|
// src/components/entity/entity-drawer.tsx
|
|
4584
4641
|
import { useState as useState8 } from "react";
|
|
4585
|
-
import { Fragment as Fragment10, jsx as jsx38, jsxs as
|
|
4642
|
+
import { Fragment as Fragment10, jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4586
4643
|
var sizeClasses2 = {
|
|
4587
4644
|
sm: "w-full min-w-0 sm:!max-w-[26rem]",
|
|
4588
4645
|
md: "w-full min-w-0 sm:!max-w-[32rem]",
|
|
@@ -4610,7 +4667,7 @@ function EntityDrawer({
|
|
|
4610
4667
|
setShowConfirm(false);
|
|
4611
4668
|
onClose();
|
|
4612
4669
|
};
|
|
4613
|
-
return /* @__PURE__ */
|
|
4670
|
+
return /* @__PURE__ */ jsxs28(Fragment10, { children: [
|
|
4614
4671
|
/* @__PURE__ */ jsx38(
|
|
4615
4672
|
Sheet,
|
|
4616
4673
|
{
|
|
@@ -4625,7 +4682,7 @@ function EntityDrawer({
|
|
|
4625
4682
|
}
|
|
4626
4683
|
}
|
|
4627
4684
|
},
|
|
4628
|
-
children: /* @__PURE__ */
|
|
4685
|
+
children: /* @__PURE__ */ jsxs28(
|
|
4629
4686
|
SheetContent,
|
|
4630
4687
|
{
|
|
4631
4688
|
className: `${sizeClasses2[size]} flex min-h-0 flex-col overflow-hidden p-0`,
|
|
@@ -4638,12 +4695,12 @@ function EntityDrawer({
|
|
|
4638
4695
|
)
|
|
4639
4696
|
}
|
|
4640
4697
|
),
|
|
4641
|
-
/* @__PURE__ */ jsx38(AlertDialog, { open: showConfirm, onOpenChange: setShowConfirm, children: /* @__PURE__ */
|
|
4642
|
-
/* @__PURE__ */
|
|
4698
|
+
/* @__PURE__ */ jsx38(AlertDialog, { open: showConfirm, onOpenChange: setShowConfirm, children: /* @__PURE__ */ jsxs28(AlertDialogContent, { children: [
|
|
4699
|
+
/* @__PURE__ */ jsxs28(AlertDialogHeader, { children: [
|
|
4643
4700
|
/* @__PURE__ */ jsx38(AlertDialogTitle, { children: "Discard changes?" }),
|
|
4644
4701
|
/* @__PURE__ */ jsx38(AlertDialogDescription, { children: "You have unsaved changes. Are you sure you want to discard them?" })
|
|
4645
4702
|
] }),
|
|
4646
|
-
/* @__PURE__ */
|
|
4703
|
+
/* @__PURE__ */ jsxs28(AlertDialogFooter, { children: [
|
|
4647
4704
|
/* @__PURE__ */ jsx38(AlertDialogCancel, { children: "Cancel" }),
|
|
4648
4705
|
/* @__PURE__ */ jsx38(
|
|
4649
4706
|
AlertDialogAction,
|
|
@@ -4661,7 +4718,7 @@ function EntityDrawer({
|
|
|
4661
4718
|
// src/components/entity/entity-drawer-trigger.tsx
|
|
4662
4719
|
import { IconChevronRight as IconChevronRight3, IconPencil, IconPlus } from "@tabler/icons-react";
|
|
4663
4720
|
import { useState as useState9 } from "react";
|
|
4664
|
-
import { Fragment as Fragment11, jsx as jsx39, jsxs as
|
|
4721
|
+
import { Fragment as Fragment11, jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4665
4722
|
function EntityDrawerTrigger({
|
|
4666
4723
|
mode,
|
|
4667
4724
|
entity,
|
|
@@ -4691,7 +4748,7 @@ function EntityDrawerTrigger({
|
|
|
4691
4748
|
}
|
|
4692
4749
|
};
|
|
4693
4750
|
const buttonLabel = label || (mode === "new" ? `New ${entity}` : `Edit ${entity}`);
|
|
4694
|
-
return /* @__PURE__ */
|
|
4751
|
+
return /* @__PURE__ */ jsxs29(Fragment11, { children: [
|
|
4695
4752
|
mode === "edit" && variant === "icon" && /* @__PURE__ */ jsx39(
|
|
4696
4753
|
Button,
|
|
4697
4754
|
{
|
|
@@ -4814,7 +4871,7 @@ function EmptyContent({ className, ...props }) {
|
|
|
4814
4871
|
}
|
|
4815
4872
|
|
|
4816
4873
|
// src/components/entity/entity-empty-state.tsx
|
|
4817
|
-
import { jsx as jsx41, jsxs as
|
|
4874
|
+
import { jsx as jsx41, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4818
4875
|
function EntityEmptyState({
|
|
4819
4876
|
icon: Icon = IconPackage,
|
|
4820
4877
|
title,
|
|
@@ -4828,8 +4885,8 @@ function EntityEmptyState({
|
|
|
4828
4885
|
const defaultTitle = `No ${entityName}s yet`;
|
|
4829
4886
|
const defaultDescription = `Get started by creating your first ${entityName}.`;
|
|
4830
4887
|
const defaultActionLabel = `Create ${entityName}`;
|
|
4831
|
-
return /* @__PURE__ */
|
|
4832
|
-
/* @__PURE__ */
|
|
4888
|
+
return /* @__PURE__ */ jsxs30(Empty, { className: cn("cn-entity-empty-state w-full", className), children: [
|
|
4889
|
+
/* @__PURE__ */ jsxs30(EmptyHeader, { className: "flex w-full max-w-lg flex-col items-center text-center", children: [
|
|
4833
4890
|
/* @__PURE__ */ jsx41(EmptyMedia, { variant: "icon", children: /* @__PURE__ */ jsx41(Icon, { className: "size-5" }) }),
|
|
4834
4891
|
/* @__PURE__ */ jsx41(EmptyTitle, { children: title ?? defaultTitle }),
|
|
4835
4892
|
/* @__PURE__ */ jsx41(EmptyDescription, { children: description ?? defaultDescription })
|
|
@@ -4848,7 +4905,7 @@ function EntityEmptyState({
|
|
|
4848
4905
|
// src/components/entity/entity-filter.tsx
|
|
4849
4906
|
import { IconFilter } from "@tabler/icons-react";
|
|
4850
4907
|
import { parseAsInteger, parseAsString, useQueryState } from "nuqs";
|
|
4851
|
-
import { jsx as jsx42, jsxs as
|
|
4908
|
+
import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4852
4909
|
function EntityFilter({
|
|
4853
4910
|
options,
|
|
4854
4911
|
placeholder = "Filter",
|
|
@@ -4873,15 +4930,15 @@ function EntityFilter({
|
|
|
4873
4930
|
const validOptions = options.filter((opt) => opt.value !== "");
|
|
4874
4931
|
const filterLabel = displayValue === "" ? allLabel : options.find((o) => o.value === displayValue)?.label ?? placeholder;
|
|
4875
4932
|
const showPlaceholder = displayValue === void 0;
|
|
4876
|
-
return /* @__PURE__ */
|
|
4933
|
+
return /* @__PURE__ */ jsxs31("div", { className: cn("flex w-full items-center gap-2", className), children: [
|
|
4877
4934
|
label && /* @__PURE__ */ jsx42("span", { className: "shrink-0 text-sm text-muted-foreground", children: label }),
|
|
4878
|
-
/* @__PURE__ */ jsx42("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */
|
|
4935
|
+
/* @__PURE__ */ jsx42("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs31(
|
|
4879
4936
|
Select,
|
|
4880
4937
|
{
|
|
4881
4938
|
value: displayValue,
|
|
4882
4939
|
onValueChange: (v) => handleChange(v),
|
|
4883
4940
|
children: [
|
|
4884
|
-
/* @__PURE__ */
|
|
4941
|
+
/* @__PURE__ */ jsxs31(SelectTrigger, { className: "h-9 w-full min-w-[150px]", children: [
|
|
4885
4942
|
/* @__PURE__ */ jsx42(IconFilter, { className: "size-4" }),
|
|
4886
4943
|
/* @__PURE__ */ jsx42(
|
|
4887
4944
|
"span",
|
|
@@ -4894,7 +4951,7 @@ function EntityFilter({
|
|
|
4894
4951
|
}
|
|
4895
4952
|
)
|
|
4896
4953
|
] }),
|
|
4897
|
-
/* @__PURE__ */
|
|
4954
|
+
/* @__PURE__ */ jsxs31(SelectContent, { children: [
|
|
4898
4955
|
hasAllOption && /* @__PURE__ */ jsx42(SelectItem, { value: "", children: allLabel }, ""),
|
|
4899
4956
|
validOptions.map((option) => /* @__PURE__ */ jsx42(SelectItem, { value: option.value, children: option.label }, option.value))
|
|
4900
4957
|
] })
|
|
@@ -4906,7 +4963,7 @@ function EntityFilter({
|
|
|
4906
4963
|
|
|
4907
4964
|
// src/components/entity/entity-filter-state.tsx
|
|
4908
4965
|
import { IconFilter as IconFilter2 } from "@tabler/icons-react";
|
|
4909
|
-
import { jsx as jsx43, jsxs as
|
|
4966
|
+
import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4910
4967
|
function EntityFilterState({
|
|
4911
4968
|
value,
|
|
4912
4969
|
onValueChange,
|
|
@@ -4918,13 +4975,13 @@ function EntityFilterState({
|
|
|
4918
4975
|
const allLabel = options.find((o) => o.value === "")?.label ?? "All";
|
|
4919
4976
|
const displayValue = value === "" || value === "__all__" ? "" : value;
|
|
4920
4977
|
const label = displayValue === "" ? allLabel : options.find((o) => o.value === displayValue)?.label ?? placeholder;
|
|
4921
|
-
return /* @__PURE__ */ jsx43("div", { className: cn("flex w-full items-center gap-2", className), children: /* @__PURE__ */ jsx43("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */
|
|
4978
|
+
return /* @__PURE__ */ jsx43("div", { className: cn("flex w-full items-center gap-2", className), children: /* @__PURE__ */ jsx43("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs32(
|
|
4922
4979
|
Select,
|
|
4923
4980
|
{
|
|
4924
4981
|
value: displayValue,
|
|
4925
4982
|
onValueChange: (v) => onValueChange(v === "" ? "" : v),
|
|
4926
4983
|
children: [
|
|
4927
|
-
/* @__PURE__ */
|
|
4984
|
+
/* @__PURE__ */ jsxs32(SelectTrigger, { className: "h-9 w-full min-w-[150px]", children: [
|
|
4928
4985
|
/* @__PURE__ */ jsx43(IconFilter2, { className: "size-4" }),
|
|
4929
4986
|
/* @__PURE__ */ jsx43(
|
|
4930
4987
|
"span",
|
|
@@ -4937,7 +4994,7 @@ function EntityFilterState({
|
|
|
4937
4994
|
}
|
|
4938
4995
|
)
|
|
4939
4996
|
] }),
|
|
4940
|
-
/* @__PURE__ */
|
|
4997
|
+
/* @__PURE__ */ jsxs32(SelectContent, { children: [
|
|
4941
4998
|
hasAll && /* @__PURE__ */ jsx43(SelectItem, { value: "", children: allLabel }),
|
|
4942
4999
|
options.filter((o) => o.value !== "").map((opt) => /* @__PURE__ */ jsx43(SelectItem, { value: opt.value, children: opt.label }, opt.value))
|
|
4943
5000
|
] })
|
|
@@ -4952,7 +5009,7 @@ import {
|
|
|
4952
5009
|
IconRotateClockwise,
|
|
4953
5010
|
IconTrash as IconTrash3
|
|
4954
5011
|
} from "@tabler/icons-react";
|
|
4955
|
-
import { jsx as jsx44, jsxs as
|
|
5012
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4956
5013
|
function EntityFormActions({
|
|
4957
5014
|
mode,
|
|
4958
5015
|
onSubmit,
|
|
@@ -4968,7 +5025,7 @@ function EntityFormActions({
|
|
|
4968
5025
|
}) {
|
|
4969
5026
|
const defaultSubmitLabel = mode === "new" ? "Create" : "Update";
|
|
4970
5027
|
const label = submitLabel || defaultSubmitLabel;
|
|
4971
|
-
return /* @__PURE__ */
|
|
5028
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
|
|
4972
5029
|
onSubmit && /* @__PURE__ */ jsx44(
|
|
4973
5030
|
Button,
|
|
4974
5031
|
{
|
|
@@ -4980,7 +5037,7 @@ function EntityFormActions({
|
|
|
4980
5037
|
children: label
|
|
4981
5038
|
}
|
|
4982
5039
|
),
|
|
4983
|
-
mode === "new" && onReset && /* @__PURE__ */
|
|
5040
|
+
mode === "new" && onReset && /* @__PURE__ */ jsxs33(
|
|
4984
5041
|
Button,
|
|
4985
5042
|
{
|
|
4986
5043
|
variant: "outline",
|
|
@@ -4993,7 +5050,7 @@ function EntityFormActions({
|
|
|
4993
5050
|
]
|
|
4994
5051
|
}
|
|
4995
5052
|
),
|
|
4996
|
-
mode === "edit" && onDelete && /* @__PURE__ */
|
|
5053
|
+
mode === "edit" && onDelete && /* @__PURE__ */ jsxs33(AlertDialog, { children: [
|
|
4997
5054
|
/* @__PURE__ */ jsx44(
|
|
4998
5055
|
AlertDialogTrigger,
|
|
4999
5056
|
{
|
|
@@ -5010,16 +5067,16 @@ function EntityFormActions({
|
|
|
5010
5067
|
children: deleteLabel
|
|
5011
5068
|
}
|
|
5012
5069
|
),
|
|
5013
|
-
/* @__PURE__ */
|
|
5014
|
-
/* @__PURE__ */
|
|
5070
|
+
/* @__PURE__ */ jsxs33(AlertDialogContent, { children: [
|
|
5071
|
+
/* @__PURE__ */ jsxs33(AlertDialogHeader, { children: [
|
|
5015
5072
|
/* @__PURE__ */ jsx44(AlertDialogTitle, { children: "Are you sure?" }),
|
|
5016
|
-
/* @__PURE__ */
|
|
5073
|
+
/* @__PURE__ */ jsxs33(AlertDialogDescription, { children: [
|
|
5017
5074
|
"This will permanently delete this ",
|
|
5018
5075
|
itemName,
|
|
5019
5076
|
". This action cannot be undone."
|
|
5020
5077
|
] })
|
|
5021
5078
|
] }),
|
|
5022
|
-
/* @__PURE__ */
|
|
5079
|
+
/* @__PURE__ */ jsxs33(AlertDialogFooter, { children: [
|
|
5023
5080
|
/* @__PURE__ */ jsx44(AlertDialogCancel, { children: "Cancel" }),
|
|
5024
5081
|
/* @__PURE__ */ jsx44(AlertDialogAction, { onClick: onDelete, variant: "destructive", children: "Delete" })
|
|
5025
5082
|
] })
|
|
@@ -5041,7 +5098,7 @@ function EntityFormActions({
|
|
|
5041
5098
|
// src/components/entity/entity-header.tsx
|
|
5042
5099
|
import { IconChevronDown as IconChevronDown5, IconChevronUp as IconChevronUp2 } from "@tabler/icons-react";
|
|
5043
5100
|
import { useState as useState10 } from "react";
|
|
5044
|
-
import { jsx as jsx45, jsxs as
|
|
5101
|
+
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5045
5102
|
function EntityHeader({
|
|
5046
5103
|
title,
|
|
5047
5104
|
icon,
|
|
@@ -5055,13 +5112,13 @@ function EntityHeader({
|
|
|
5055
5112
|
const [toolbarOpen, setToolbarOpen] = useState10(false);
|
|
5056
5113
|
const hasToolbar = [search, filter, sort, view].some(Boolean);
|
|
5057
5114
|
const hasTitleRow = title || icon || actions;
|
|
5058
|
-
const content = /* @__PURE__ */
|
|
5059
|
-
hasTitleRow && /* @__PURE__ */
|
|
5060
|
-
/* @__PURE__ */
|
|
5115
|
+
const content = /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-4", children: [
|
|
5116
|
+
hasTitleRow && /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between", children: [
|
|
5117
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", children: [
|
|
5061
5118
|
icon,
|
|
5062
5119
|
/* @__PURE__ */ jsx45("span", { className: "text-lg font-semibold", children: title })
|
|
5063
5120
|
] }),
|
|
5064
|
-
/* @__PURE__ */
|
|
5121
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-3", children: [
|
|
5065
5122
|
actions,
|
|
5066
5123
|
hasToolbar && /* @__PURE__ */ jsx45(
|
|
5067
5124
|
Button,
|
|
@@ -5077,7 +5134,7 @@ function EntityHeader({
|
|
|
5077
5134
|
)
|
|
5078
5135
|
] })
|
|
5079
5136
|
] }),
|
|
5080
|
-
hasToolbar && /* @__PURE__ */
|
|
5137
|
+
hasToolbar && /* @__PURE__ */ jsxs34(
|
|
5081
5138
|
"div",
|
|
5082
5139
|
{
|
|
5083
5140
|
className: cn(
|
|
@@ -5087,7 +5144,7 @@ function EntityHeader({
|
|
|
5087
5144
|
),
|
|
5088
5145
|
children: [
|
|
5089
5146
|
/* @__PURE__ */ jsx45("div", { className: "w-full min-w-0 flex-1 md:min-w-[12rem]", children: search }),
|
|
5090
|
-
/* @__PURE__ */
|
|
5147
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex w-full shrink-0 flex-col gap-2 *:w-full md:w-auto md:flex-row md:items-center md:gap-2 md:*:w-auto", children: [
|
|
5091
5148
|
filter,
|
|
5092
5149
|
sort,
|
|
5093
5150
|
view
|
|
@@ -5189,7 +5246,7 @@ function TableCaption({
|
|
|
5189
5246
|
}
|
|
5190
5247
|
|
|
5191
5248
|
// src/components/entity/entity-loading-state.tsx
|
|
5192
|
-
import { jsx as jsx47, jsxs as
|
|
5249
|
+
import { jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5193
5250
|
function EntityLoadingState({
|
|
5194
5251
|
view,
|
|
5195
5252
|
rowCount = 5,
|
|
@@ -5213,7 +5270,7 @@ function EntityLoadingState({
|
|
|
5213
5270
|
return Array.from({ length: cardCount }, makeKey);
|
|
5214
5271
|
}, [cardCount, makeKey]);
|
|
5215
5272
|
if (view === "table") {
|
|
5216
|
-
return /* @__PURE__ */ jsx47("div", { className: cn("cn-entity-loading-table", className), children: /* @__PURE__ */
|
|
5273
|
+
return /* @__PURE__ */ jsx47("div", { className: cn("cn-entity-loading-table", className), children: /* @__PURE__ */ jsxs35(Table, { children: [
|
|
5217
5274
|
/* @__PURE__ */ jsx47(TableHeader, { children: /* @__PURE__ */ jsx47(TableRow, { children: Array.from({ length: columnCount }).map((_, i) => /* @__PURE__ */ jsx47(TableHead, { children: /* @__PURE__ */ jsx47(Skeleton, { className: "h-4 w-24" }) }, headerKeys[i])) }) }),
|
|
5218
5275
|
/* @__PURE__ */ jsx47(TableBody, { children: Array.from({ length: rowCount }).map((_, rowIndex) => /* @__PURE__ */ jsx47(TableRow, { children: Array.from({ length: columnCount }).map((_2, colIndex) => /* @__PURE__ */ jsx47(TableCell, { children: /* @__PURE__ */ jsx47(Skeleton, { className: "h-4 w-full" }) }, cellKeys[rowIndex][colIndex])) }, rowKeys[rowIndex])) })
|
|
5219
5276
|
] }) });
|
|
@@ -5225,12 +5282,12 @@ function EntityLoadingState({
|
|
|
5225
5282
|
"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",
|
|
5226
5283
|
className
|
|
5227
5284
|
),
|
|
5228
|
-
children: Array.from({ length: cardCount }).map((_, i) => /* @__PURE__ */
|
|
5229
|
-
/* @__PURE__ */
|
|
5285
|
+
children: Array.from({ length: cardCount }).map((_, i) => /* @__PURE__ */ jsxs35("div", { className: "cn-entity-loading-card", children: [
|
|
5286
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2", children: [
|
|
5230
5287
|
/* @__PURE__ */ jsx47(Skeleton, { className: "h-4 w-4 rounded-full" }),
|
|
5231
5288
|
/* @__PURE__ */ jsx47(Skeleton, { className: "h-5 w-32" })
|
|
5232
5289
|
] }),
|
|
5233
|
-
/* @__PURE__ */
|
|
5290
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex gap-2", children: [
|
|
5234
5291
|
/* @__PURE__ */ jsx47(Skeleton, { className: "h-5 w-16" }),
|
|
5235
5292
|
/* @__PURE__ */ jsx47(Skeleton, { className: "h-5 w-16" })
|
|
5236
5293
|
] }),
|
|
@@ -5247,7 +5304,7 @@ import { IconSearch as IconSearch3, IconX as IconX3 } from "@tabler/icons-react"
|
|
|
5247
5304
|
import { parseAsInteger as parseAsInteger2, parseAsString as parseAsString2, useQueryState as useQueryState2 } from "nuqs";
|
|
5248
5305
|
import { useRef as useRef4 } from "react";
|
|
5249
5306
|
import { useDebouncedCallback } from "use-debounce";
|
|
5250
|
-
import { jsx as jsx48, jsxs as
|
|
5307
|
+
import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
5251
5308
|
function EntitySearch({
|
|
5252
5309
|
paramKey = "search",
|
|
5253
5310
|
placeholder = "Search...",
|
|
@@ -5270,7 +5327,7 @@ function EntitySearch({
|
|
|
5270
5327
|
ref.current.value = "";
|
|
5271
5328
|
}
|
|
5272
5329
|
};
|
|
5273
|
-
return /* @__PURE__ */
|
|
5330
|
+
return /* @__PURE__ */ jsxs36("div", { className: cn("relative w-full min-w-0", className), children: [
|
|
5274
5331
|
/* @__PURE__ */ jsx48(IconSearch3, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
5275
5332
|
/* @__PURE__ */ jsx48(
|
|
5276
5333
|
Input,
|
|
@@ -5298,7 +5355,7 @@ function EntitySearch({
|
|
|
5298
5355
|
import { IconSearch as IconSearch4, IconX as IconX4 } from "@tabler/icons-react";
|
|
5299
5356
|
import { useRef as useRef5 } from "react";
|
|
5300
5357
|
import { useDebouncedCallback as useDebouncedCallback2 } from "use-debounce";
|
|
5301
|
-
import { jsx as jsx49, jsxs as
|
|
5358
|
+
import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5302
5359
|
function EntitySearchState({
|
|
5303
5360
|
value,
|
|
5304
5361
|
onValueChange,
|
|
@@ -5316,7 +5373,7 @@ function EntitySearchState({
|
|
|
5316
5373
|
ref.current.value = "";
|
|
5317
5374
|
}
|
|
5318
5375
|
};
|
|
5319
|
-
return /* @__PURE__ */
|
|
5376
|
+
return /* @__PURE__ */ jsxs37("div", { className: cn("relative w-full min-w-0", className), children: [
|
|
5320
5377
|
/* @__PURE__ */ jsx49(IconSearch4, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
5321
5378
|
/* @__PURE__ */ jsx49(
|
|
5322
5379
|
Input,
|
|
@@ -5342,7 +5399,7 @@ function EntitySearchState({
|
|
|
5342
5399
|
|
|
5343
5400
|
// src/components/layout/section/section.tsx
|
|
5344
5401
|
import { useState as useState11 } from "react";
|
|
5345
|
-
import { jsx as jsx50, jsxs as
|
|
5402
|
+
import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5346
5403
|
function Section({
|
|
5347
5404
|
title,
|
|
5348
5405
|
children,
|
|
@@ -5361,14 +5418,14 @@ function Section({
|
|
|
5361
5418
|
setOpen(next);
|
|
5362
5419
|
onOpenChange?.(next);
|
|
5363
5420
|
};
|
|
5364
|
-
return /* @__PURE__ */
|
|
5421
|
+
return /* @__PURE__ */ jsxs38(
|
|
5365
5422
|
Card,
|
|
5366
5423
|
{
|
|
5367
5424
|
className: cn("gap-0 p-0", className),
|
|
5368
5425
|
"data-slot": "section",
|
|
5369
5426
|
"data-state": open ? "open" : "closed",
|
|
5370
5427
|
children: [
|
|
5371
|
-
/* @__PURE__ */
|
|
5428
|
+
/* @__PURE__ */ jsxs38(
|
|
5372
5429
|
"div",
|
|
5373
5430
|
{
|
|
5374
5431
|
className: cn(
|
|
@@ -5378,7 +5435,7 @@ function Section({
|
|
|
5378
5435
|
),
|
|
5379
5436
|
children: [
|
|
5380
5437
|
/* @__PURE__ */ jsx50("div", { className: "text-lg font-semibold", children: title }),
|
|
5381
|
-
/* @__PURE__ */
|
|
5438
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2", children: [
|
|
5382
5439
|
open && actions,
|
|
5383
5440
|
/* @__PURE__ */ jsx50(
|
|
5384
5441
|
Button,
|
|
@@ -5395,7 +5452,7 @@ function Section({
|
|
|
5395
5452
|
]
|
|
5396
5453
|
}
|
|
5397
5454
|
),
|
|
5398
|
-
open ? /* @__PURE__ */
|
|
5455
|
+
open ? /* @__PURE__ */ jsxs38("div", { "data-slot": "section-content", children: [
|
|
5399
5456
|
/* @__PURE__ */ jsx50("div", { className: cn("p-4", contentClassName), children: lazy ? open && children : children }),
|
|
5400
5457
|
footer ? /* @__PURE__ */ jsx50(
|
|
5401
5458
|
"div",
|
|
@@ -5416,7 +5473,7 @@ import {
|
|
|
5416
5473
|
IconSortAscendingLetters,
|
|
5417
5474
|
IconSortDescendingLetters
|
|
5418
5475
|
} from "@tabler/icons-react";
|
|
5419
|
-
import { jsx as jsx51, jsxs as
|
|
5476
|
+
import { jsx as jsx51, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5420
5477
|
function EntitySortState({
|
|
5421
5478
|
sort,
|
|
5422
5479
|
order,
|
|
@@ -5426,8 +5483,8 @@ function EntitySortState({
|
|
|
5426
5483
|
className
|
|
5427
5484
|
}) {
|
|
5428
5485
|
const sortLabel = options.find((o) => o.value === sort)?.label;
|
|
5429
|
-
return /* @__PURE__ */
|
|
5430
|
-
/* @__PURE__ */ jsx51("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */
|
|
5486
|
+
return /* @__PURE__ */ jsxs39("div", { className: cn("flex w-full items-center gap-0", className), children: [
|
|
5487
|
+
/* @__PURE__ */ jsx51("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs39(Select, { value: sort, onValueChange: (v) => onSortChange(v), children: [
|
|
5431
5488
|
/* @__PURE__ */ jsx51(SelectTrigger, { className: "h-9 w-full min-w-[150px] rounded-r-none border-r-0", children: /* @__PURE__ */ jsx51(
|
|
5432
5489
|
"span",
|
|
5433
5490
|
{
|
|
@@ -5575,7 +5632,7 @@ function EntityViewToggleState({
|
|
|
5575
5632
|
}
|
|
5576
5633
|
|
|
5577
5634
|
// src/components/entity/entity-section.tsx
|
|
5578
|
-
import { jsx as jsx54, jsxs as
|
|
5635
|
+
import { jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5579
5636
|
function EntitySection({
|
|
5580
5637
|
title,
|
|
5581
5638
|
icon,
|
|
@@ -5621,7 +5678,7 @@ function EntitySection({
|
|
|
5621
5678
|
const filterOpts = config.filterOptions ?? filterOptions;
|
|
5622
5679
|
const sortOpts = config.sortOptions ?? sortOptions;
|
|
5623
5680
|
const viewOpts = config.views ?? views;
|
|
5624
|
-
return /* @__PURE__ */ jsx54(Section, { title, onOpenChange, actions, children: /* @__PURE__ */
|
|
5681
|
+
return /* @__PURE__ */ jsx54(Section, { title, onOpenChange, actions, children: /* @__PURE__ */ jsxs40("div", { className: "space-y-4", children: [
|
|
5625
5682
|
showToolbar && /* @__PURE__ */ jsx54(
|
|
5626
5683
|
EntityHeader,
|
|
5627
5684
|
{
|
|
@@ -5728,7 +5785,7 @@ function Checkbox({
|
|
|
5728
5785
|
// src/components/ui/chip.tsx
|
|
5729
5786
|
import { IconX as IconX5 } from "@tabler/icons-react";
|
|
5730
5787
|
import { cva as cva8 } from "class-variance-authority";
|
|
5731
|
-
import { jsx as jsx56, jsxs as
|
|
5788
|
+
import { jsx as jsx56, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
5732
5789
|
var chipVariants = cva8(
|
|
5733
5790
|
"cn-chip inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium transition-colors border",
|
|
5734
5791
|
{
|
|
@@ -5753,7 +5810,7 @@ function Chip({
|
|
|
5753
5810
|
children,
|
|
5754
5811
|
...props
|
|
5755
5812
|
}) {
|
|
5756
|
-
return /* @__PURE__ */
|
|
5813
|
+
return /* @__PURE__ */ jsxs41(
|
|
5757
5814
|
"div",
|
|
5758
5815
|
{
|
|
5759
5816
|
"data-slot": "chip",
|
|
@@ -5784,7 +5841,7 @@ import {
|
|
|
5784
5841
|
IconChevronsRight
|
|
5785
5842
|
} from "@tabler/icons-react";
|
|
5786
5843
|
import { useTranslations } from "next-intl";
|
|
5787
|
-
import { jsx as jsx57, jsxs as
|
|
5844
|
+
import { jsx as jsx57, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
5788
5845
|
function addRange(pages, start, end) {
|
|
5789
5846
|
for (let i = start; i <= end; i++) {
|
|
5790
5847
|
pages.push(i);
|
|
@@ -5838,16 +5895,16 @@ function DataTablePagination({
|
|
|
5838
5895
|
const hasSelection = selectedRows > 0;
|
|
5839
5896
|
const rowText = hasSelection ? `${selectedRows} ${t("of")} ${totalRows} ${rowLabel} ${t("selected")}` : `${totalRows} ${rowLabel} ${t("total")}`;
|
|
5840
5897
|
const pageText = `${t("page")} ${pageIndex + 1} ${t("of")} ${pageCount || 1}`;
|
|
5841
|
-
return /* @__PURE__ */
|
|
5842
|
-
/* @__PURE__ */
|
|
5843
|
-
/* @__PURE__ */ jsx57("div", { className: "cn-data-table-pagination-summary text-muted-foreground", children: /* @__PURE__ */
|
|
5898
|
+
return /* @__PURE__ */ jsxs42("div", { className: "cn-data-table-pagination flex flex-col sm:flex-row", children: [
|
|
5899
|
+
/* @__PURE__ */ jsxs42("div", { className: "cn-data-table-pagination-left flex items-center justify-center sm:justify-start", children: [
|
|
5900
|
+
/* @__PURE__ */ jsx57("div", { className: "cn-data-table-pagination-summary text-muted-foreground", children: /* @__PURE__ */ jsxs42("span", { children: [
|
|
5844
5901
|
rowText,
|
|
5845
5902
|
/* @__PURE__ */ jsx57("span", { className: "mx-2", children: "\xB7" }),
|
|
5846
5903
|
pageText
|
|
5847
5904
|
] }) }),
|
|
5848
|
-
/* @__PURE__ */
|
|
5905
|
+
/* @__PURE__ */ jsxs42("div", { className: "cn-data-table-pagination-size flex items-center", children: [
|
|
5849
5906
|
/* @__PURE__ */ jsx57("span", { className: "cn-data-table-pagination-size-label font-medium whitespace-nowrap", children: t("rowsPerPage") }),
|
|
5850
|
-
/* @__PURE__ */
|
|
5907
|
+
/* @__PURE__ */ jsxs42(
|
|
5851
5908
|
Select,
|
|
5852
5909
|
{
|
|
5853
5910
|
value: `${pageSize}`,
|
|
@@ -5866,13 +5923,13 @@ function DataTablePagination({
|
|
|
5866
5923
|
)
|
|
5867
5924
|
] })
|
|
5868
5925
|
] }),
|
|
5869
|
-
/* @__PURE__ */ jsx57("div", { className: "cn-data-table-pagination-right flex justify-center sm:justify-end", children: /* @__PURE__ */
|
|
5926
|
+
/* @__PURE__ */ jsx57("div", { className: "cn-data-table-pagination-right flex justify-center sm:justify-end", children: /* @__PURE__ */ jsxs42(
|
|
5870
5927
|
"nav",
|
|
5871
5928
|
{
|
|
5872
5929
|
"aria-label": "Pagination",
|
|
5873
5930
|
className: "cn-data-table-pagination-nav flex items-center gap-1",
|
|
5874
5931
|
children: [
|
|
5875
|
-
/* @__PURE__ */
|
|
5932
|
+
/* @__PURE__ */ jsxs42(
|
|
5876
5933
|
Button,
|
|
5877
5934
|
{
|
|
5878
5935
|
variant: "outline",
|
|
@@ -5887,7 +5944,7 @@ function DataTablePagination({
|
|
|
5887
5944
|
]
|
|
5888
5945
|
}
|
|
5889
5946
|
),
|
|
5890
|
-
/* @__PURE__ */
|
|
5947
|
+
/* @__PURE__ */ jsxs42(
|
|
5891
5948
|
Button,
|
|
5892
5949
|
{
|
|
5893
5950
|
variant: "outline",
|
|
@@ -5932,7 +5989,7 @@ function DataTablePagination({
|
|
|
5932
5989
|
pageNum
|
|
5933
5990
|
);
|
|
5934
5991
|
}),
|
|
5935
|
-
/* @__PURE__ */
|
|
5992
|
+
/* @__PURE__ */ jsxs42(
|
|
5936
5993
|
Button,
|
|
5937
5994
|
{
|
|
5938
5995
|
variant: "outline",
|
|
@@ -5947,7 +6004,7 @@ function DataTablePagination({
|
|
|
5947
6004
|
]
|
|
5948
6005
|
}
|
|
5949
6006
|
),
|
|
5950
|
-
/* @__PURE__ */
|
|
6007
|
+
/* @__PURE__ */ jsxs42(
|
|
5951
6008
|
Button,
|
|
5952
6009
|
{
|
|
5953
6010
|
variant: "outline",
|
|
@@ -6054,7 +6111,7 @@ function RadioGroupItem({
|
|
|
6054
6111
|
}
|
|
6055
6112
|
|
|
6056
6113
|
// src/components/entity/entity-selector-modal.tsx
|
|
6057
|
-
import { jsx as jsx59, jsxs as
|
|
6114
|
+
import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
6058
6115
|
var modalSizeClasses = {
|
|
6059
6116
|
sm: "sm:max-w-[28rem]",
|
|
6060
6117
|
md: "sm:max-w-[36rem]",
|
|
@@ -6071,7 +6128,7 @@ function EntitySelectorModal({
|
|
|
6071
6128
|
footer,
|
|
6072
6129
|
children
|
|
6073
6130
|
}) {
|
|
6074
|
-
return /* @__PURE__ */ jsx59(Dialog, { open, onOpenChange, children: /* @__PURE__ */
|
|
6131
|
+
return /* @__PURE__ */ jsx59(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs43(
|
|
6075
6132
|
DialogContent,
|
|
6076
6133
|
{
|
|
6077
6134
|
className: cn(
|
|
@@ -6114,7 +6171,7 @@ function useEntityPagination({
|
|
|
6114
6171
|
}
|
|
6115
6172
|
|
|
6116
6173
|
// src/components/entity/entity-selector.tsx
|
|
6117
|
-
import { Fragment as Fragment12, jsx as jsx60, jsxs as
|
|
6174
|
+
import { Fragment as Fragment12, jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
6118
6175
|
function EntitySelectorFooter({
|
|
6119
6176
|
onCancel,
|
|
6120
6177
|
onSelect,
|
|
@@ -6139,9 +6196,9 @@ function EntitySelectorFooter({
|
|
|
6139
6196
|
hint = ` (${selectedCount})`;
|
|
6140
6197
|
}
|
|
6141
6198
|
}
|
|
6142
|
-
return /* @__PURE__ */
|
|
6199
|
+
return /* @__PURE__ */ jsxs44(Fragment12, { children: [
|
|
6143
6200
|
/* @__PURE__ */ jsx60(Button, { variant: "outline", size: "md", onClick: onCancel, children: "Cancel" }),
|
|
6144
|
-
/* @__PURE__ */
|
|
6201
|
+
/* @__PURE__ */ jsxs44(
|
|
6145
6202
|
Button,
|
|
6146
6203
|
{
|
|
6147
6204
|
variant: "default",
|
|
@@ -6301,7 +6358,7 @@ function EntitySelector({
|
|
|
6301
6358
|
}
|
|
6302
6359
|
);
|
|
6303
6360
|
} else {
|
|
6304
|
-
content = /* @__PURE__ */
|
|
6361
|
+
content = /* @__PURE__ */ jsxs44(Fragment12, { children: [
|
|
6305
6362
|
/* @__PURE__ */ jsx60(
|
|
6306
6363
|
EntityHeader,
|
|
6307
6364
|
{
|
|
@@ -6344,13 +6401,13 @@ function EntitySelector({
|
|
|
6344
6401
|
) : void 0
|
|
6345
6402
|
}
|
|
6346
6403
|
),
|
|
6347
|
-
state2.view === "table" || !renderCard ? /* @__PURE__ */
|
|
6348
|
-
multiple ? /* @__PURE__ */
|
|
6349
|
-
/* @__PURE__ */ jsx60(DisplayTableThead, { children: /* @__PURE__ */
|
|
6404
|
+
state2.view === "table" || !renderCard ? /* @__PURE__ */ jsxs44("div", { className: "space-y-4", children: [
|
|
6405
|
+
multiple ? /* @__PURE__ */ jsxs44(DisplayTable, { withTableBorder: true, children: [
|
|
6406
|
+
/* @__PURE__ */ jsx60(DisplayTableThead, { children: /* @__PURE__ */ jsxs44(DisplayTableTr, { children: [
|
|
6350
6407
|
/* @__PURE__ */ jsx60(DisplayTableTh, { className: "w-[50px]" }),
|
|
6351
6408
|
columns.map((col) => /* @__PURE__ */ jsx60(DisplayTableTh, { className: col.className, children: col.header }, col.key))
|
|
6352
6409
|
] }) }),
|
|
6353
|
-
/* @__PURE__ */ jsx60(DisplayTableTbody, { children: items.map((item) => /* @__PURE__ */
|
|
6410
|
+
/* @__PURE__ */ jsx60(DisplayTableTbody, { children: items.map((item) => /* @__PURE__ */ jsxs44(
|
|
6354
6411
|
DisplayTableTr,
|
|
6355
6412
|
{
|
|
6356
6413
|
className: "group",
|
|
@@ -6380,12 +6437,12 @@ function EntitySelector({
|
|
|
6380
6437
|
handleRowSelectionChange(() => ({ [id]: true }));
|
|
6381
6438
|
}
|
|
6382
6439
|
},
|
|
6383
|
-
children: /* @__PURE__ */
|
|
6384
|
-
/* @__PURE__ */ jsx60(DisplayTableThead, { children: /* @__PURE__ */
|
|
6440
|
+
children: /* @__PURE__ */ jsxs44(DisplayTable, { withTableBorder: true, children: [
|
|
6441
|
+
/* @__PURE__ */ jsx60(DisplayTableThead, { children: /* @__PURE__ */ jsxs44(DisplayTableTr, { children: [
|
|
6385
6442
|
/* @__PURE__ */ jsx60(DisplayTableTh, { className: "w-[50px]" }),
|
|
6386
6443
|
columns.map((col) => /* @__PURE__ */ jsx60(DisplayTableTh, { className: col.className, children: col.header }, col.key))
|
|
6387
6444
|
] }) }),
|
|
6388
|
-
/* @__PURE__ */ jsx60(DisplayTableTbody, { children: items.map((item) => /* @__PURE__ */
|
|
6445
|
+
/* @__PURE__ */ jsx60(DisplayTableTbody, { children: items.map((item) => /* @__PURE__ */ jsxs44(
|
|
6389
6446
|
DisplayTableTr,
|
|
6390
6447
|
{
|
|
6391
6448
|
className: cn(
|
|
@@ -6418,7 +6475,7 @@ function EntitySelector({
|
|
|
6418
6475
|
}
|
|
6419
6476
|
}
|
|
6420
6477
|
)
|
|
6421
|
-
] }) : /* @__PURE__ */
|
|
6478
|
+
] }) : /* @__PURE__ */ jsxs44("div", { className: "space-y-4", children: [
|
|
6422
6479
|
/* @__PURE__ */ jsx60("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", children: items.map((item) => /* @__PURE__ */ jsx60("div", { children: renderCard(
|
|
6423
6480
|
item,
|
|
6424
6481
|
Boolean(rowSelection[item.id]),
|
|
@@ -6456,7 +6513,7 @@ function EntitySelector({
|
|
|
6456
6513
|
] })
|
|
6457
6514
|
] });
|
|
6458
6515
|
}
|
|
6459
|
-
return /* @__PURE__ */
|
|
6516
|
+
return /* @__PURE__ */ jsxs44(Fragment12, { children: [
|
|
6460
6517
|
/* @__PURE__ */ jsx60(
|
|
6461
6518
|
"div",
|
|
6462
6519
|
{
|
|
@@ -6492,8 +6549,8 @@ function EntitySelector({
|
|
|
6492
6549
|
maxSelect
|
|
6493
6550
|
}
|
|
6494
6551
|
),
|
|
6495
|
-
children: /* @__PURE__ */
|
|
6496
|
-
selectedItems.length > 0 && /* @__PURE__ */
|
|
6552
|
+
children: /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-4", children: [
|
|
6553
|
+
selectedItems.length > 0 && /* @__PURE__ */ jsxs44("div", { className: "cn-selector-selected-bar", children: [
|
|
6497
6554
|
/* @__PURE__ */ jsx60("span", { className: "cn-selector-selected-bar-label", children: "Selected:" }),
|
|
6498
6555
|
selectedItems.map((item) => /* @__PURE__ */ jsx60(
|
|
6499
6556
|
Chip,
|
|
@@ -6522,7 +6579,7 @@ import {
|
|
|
6522
6579
|
IconSortDescendingLetters as IconSortDescendingLetters2
|
|
6523
6580
|
} from "@tabler/icons-react";
|
|
6524
6581
|
import { parseAsInteger as parseAsInteger3, parseAsString as parseAsString3, useQueryState as useQueryState3 } from "nuqs";
|
|
6525
|
-
import { jsx as jsx61, jsxs as
|
|
6582
|
+
import { jsx as jsx61, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
6526
6583
|
function EntitySort({
|
|
6527
6584
|
options,
|
|
6528
6585
|
defaultSort = "createdAt",
|
|
@@ -6547,8 +6604,8 @@ function EntitySort({
|
|
|
6547
6604
|
setPage(1);
|
|
6548
6605
|
};
|
|
6549
6606
|
const sortLabel = options.find((o) => o.value === sort)?.label;
|
|
6550
|
-
return /* @__PURE__ */
|
|
6551
|
-
/* @__PURE__ */ jsx61("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */
|
|
6607
|
+
return /* @__PURE__ */ jsxs45("div", { className: cn("flex w-full items-center gap-0", className), children: [
|
|
6608
|
+
/* @__PURE__ */ jsx61("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs45(
|
|
6552
6609
|
Select,
|
|
6553
6610
|
{
|
|
6554
6611
|
value: sort,
|
|
@@ -6828,7 +6885,7 @@ function Image({
|
|
|
6828
6885
|
}
|
|
6829
6886
|
|
|
6830
6887
|
// src/components/files/file-upload.tsx
|
|
6831
|
-
import { jsx as jsx64, jsxs as
|
|
6888
|
+
import { jsx as jsx64, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
6832
6889
|
function formatBytes(size) {
|
|
6833
6890
|
if (!size) {
|
|
6834
6891
|
return null;
|
|
@@ -6924,7 +6981,7 @@ function FilePreview({ item }) {
|
|
|
6924
6981
|
{
|
|
6925
6982
|
"data-slot": "file-upload-preview",
|
|
6926
6983
|
className: "cn-file-upload-preview flex aspect-[4/3] items-center justify-center p-3",
|
|
6927
|
-
children: /* @__PURE__ */
|
|
6984
|
+
children: /* @__PURE__ */ jsxs46("div", { className: "flex flex-col items-center gap-2 text-center", children: [
|
|
6928
6985
|
/* @__PURE__ */ jsx64(AudioIcon, { className: "text-muted-foreground size-8" }),
|
|
6929
6986
|
/* @__PURE__ */ jsx64("span", { className: "text-muted-foreground text-xs", children: "Audio preview" })
|
|
6930
6987
|
] })
|
|
@@ -7062,7 +7119,7 @@ function FileUpload({
|
|
|
7062
7119
|
let listContent = null;
|
|
7063
7120
|
if (showList) {
|
|
7064
7121
|
if (items.length > 0) {
|
|
7065
|
-
listContent = /* @__PURE__ */
|
|
7122
|
+
listContent = /* @__PURE__ */ jsxs46(
|
|
7066
7123
|
"div",
|
|
7067
7124
|
{
|
|
7068
7125
|
"data-slot": "file-upload-list",
|
|
@@ -7070,19 +7127,19 @@ function FileUpload({
|
|
|
7070
7127
|
children: [
|
|
7071
7128
|
items.map((item) => {
|
|
7072
7129
|
const FileIcon = getFileIcon(item.type);
|
|
7073
|
-
return /* @__PURE__ */
|
|
7130
|
+
return /* @__PURE__ */ jsxs46(
|
|
7074
7131
|
"div",
|
|
7075
7132
|
{
|
|
7076
7133
|
"data-slot": "file-upload-item",
|
|
7077
7134
|
className: "cn-file-upload-item flex flex-col gap-3 overflow-hidden",
|
|
7078
7135
|
children: [
|
|
7079
7136
|
/* @__PURE__ */ jsx64(FilePreview, { item }),
|
|
7080
|
-
/* @__PURE__ */
|
|
7081
|
-
/* @__PURE__ */
|
|
7137
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex items-start justify-between gap-3 px-3 pb-3", children: [
|
|
7138
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex min-w-0 items-start gap-3", children: [
|
|
7082
7139
|
/* @__PURE__ */ jsx64("div", { className: "cn-file-upload-item-icon text-muted-foreground flex size-9 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx64(FileIcon, { className: "size-4" }) }),
|
|
7083
|
-
/* @__PURE__ */
|
|
7140
|
+
/* @__PURE__ */ jsxs46("div", { className: "min-w-0", children: [
|
|
7084
7141
|
/* @__PURE__ */ jsx64("div", { className: "truncate text-sm font-medium", children: item.name }),
|
|
7085
|
-
/* @__PURE__ */
|
|
7142
|
+
/* @__PURE__ */ jsxs46("div", { className: "text-muted-foreground flex flex-wrap gap-x-2 text-xs", children: [
|
|
7086
7143
|
formatBytes(item.size) ? /* @__PURE__ */ jsx64("span", { children: formatBytes(item.size) }) : null,
|
|
7087
7144
|
/* @__PURE__ */ jsx64("span", { children: item.source === "remote" ? "uploaded" : "local" })
|
|
7088
7145
|
] })
|
|
@@ -7131,13 +7188,13 @@ function FileUpload({
|
|
|
7131
7188
|
);
|
|
7132
7189
|
}
|
|
7133
7190
|
}
|
|
7134
|
-
return /* @__PURE__ */
|
|
7191
|
+
return /* @__PURE__ */ jsxs46(
|
|
7135
7192
|
"div",
|
|
7136
7193
|
{
|
|
7137
7194
|
"data-slot": "file-upload-wrapper",
|
|
7138
7195
|
className: cn("flex flex-col gap-4", className),
|
|
7139
7196
|
children: [
|
|
7140
|
-
/* @__PURE__ */
|
|
7197
|
+
/* @__PURE__ */ jsxs46(
|
|
7141
7198
|
"label",
|
|
7142
7199
|
{
|
|
7143
7200
|
"data-slot": "file-upload-dropzone",
|
|
@@ -7172,15 +7229,15 @@ function FileUpload({
|
|
|
7172
7229
|
onChange: handleInputChange
|
|
7173
7230
|
}
|
|
7174
7231
|
),
|
|
7175
|
-
/* @__PURE__ */
|
|
7232
|
+
/* @__PURE__ */ jsxs46(
|
|
7176
7233
|
"div",
|
|
7177
7234
|
{
|
|
7178
7235
|
"data-slot": "file-upload-prompt",
|
|
7179
7236
|
className: "cn-file-upload-prompt flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
7180
7237
|
children: [
|
|
7181
|
-
/* @__PURE__ */
|
|
7238
|
+
/* @__PURE__ */ jsxs46("div", { className: "cn-file-upload-prompt-main flex items-start gap-3", children: [
|
|
7182
7239
|
/* @__PURE__ */ jsx64("div", { className: "cn-file-upload-icon text-muted-foreground flex size-10 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx64(IconUpload, { className: "size-4" }) }),
|
|
7183
|
-
/* @__PURE__ */
|
|
7240
|
+
/* @__PURE__ */ jsxs46("div", { className: "cn-file-upload-copy space-y-1", children: [
|
|
7184
7241
|
/* @__PURE__ */ jsx64(
|
|
7185
7242
|
"div",
|
|
7186
7243
|
{
|
|
@@ -7197,7 +7254,7 @@ function FileUpload({
|
|
|
7197
7254
|
children: description
|
|
7198
7255
|
}
|
|
7199
7256
|
),
|
|
7200
|
-
accept ? /* @__PURE__ */
|
|
7257
|
+
accept ? /* @__PURE__ */ jsxs46(
|
|
7201
7258
|
"div",
|
|
7202
7259
|
{
|
|
7203
7260
|
"data-slot": "file-upload-accept",
|
|
@@ -7255,7 +7312,7 @@ import Cropper from "react-easy-crop";
|
|
|
7255
7312
|
// src/components/ui/slider.tsx
|
|
7256
7313
|
import { Slider as SliderPrimitive } from "@base-ui/react/slider";
|
|
7257
7314
|
import * as React8 from "react";
|
|
7258
|
-
import { jsx as jsx65, jsxs as
|
|
7315
|
+
import { jsx as jsx65, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
7259
7316
|
function Slider({
|
|
7260
7317
|
className,
|
|
7261
7318
|
defaultValue,
|
|
@@ -7293,7 +7350,7 @@ function Slider({
|
|
|
7293
7350
|
max,
|
|
7294
7351
|
thumbAlignment: "edge",
|
|
7295
7352
|
...props,
|
|
7296
|
-
children: /* @__PURE__ */
|
|
7353
|
+
children: /* @__PURE__ */ jsxs47(SliderPrimitive.Control, { className: "cn-slider relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", children: [
|
|
7297
7354
|
/* @__PURE__ */ jsx65(
|
|
7298
7355
|
SliderPrimitive.Track,
|
|
7299
7356
|
{
|
|
@@ -7400,7 +7457,7 @@ async function getCroppedImage({
|
|
|
7400
7457
|
|
|
7401
7458
|
// src/components/files/image-crop-dialog.tsx
|
|
7402
7459
|
import "react-easy-crop/react-easy-crop.css";
|
|
7403
|
-
import { jsx as jsx66, jsxs as
|
|
7460
|
+
import { jsx as jsx66, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
7404
7461
|
function ImageCropDialog({
|
|
7405
7462
|
open,
|
|
7406
7463
|
file,
|
|
@@ -7472,9 +7529,9 @@ function ImageCropDialog({
|
|
|
7472
7529
|
setSaving(false);
|
|
7473
7530
|
}
|
|
7474
7531
|
};
|
|
7475
|
-
return /* @__PURE__ */ jsx66(Dialog, { open, onOpenChange, children: /* @__PURE__ */
|
|
7532
|
+
return /* @__PURE__ */ jsx66(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs48(DialogContent, { className: "w-[min(96vw,72rem)] max-w-none overflow-hidden p-0", children: [
|
|
7476
7533
|
/* @__PURE__ */ jsx66(DialogHeader, { className: "border-border/70 gap-1 border-b px-5 py-4 sm:px-6", children: /* @__PURE__ */ jsx66(DialogTitle, { className: "text-lg font-semibold sm:text-xl", children: title }) }),
|
|
7477
|
-
/* @__PURE__ */
|
|
7534
|
+
/* @__PURE__ */ jsxs48("div", { className: "grid gap-0 lg:grid-cols-[minmax(0,1fr)_340px]", children: [
|
|
7478
7535
|
/* @__PURE__ */ jsx66("div", { className: "border-b p-4 lg:border-r lg:border-b-0 lg:p-6", children: /* @__PURE__ */ jsx66("div", { className: "bg-muted/30 relative min-h-[320px] min-w-0 overflow-hidden rounded-[var(--radius-lg)] lg:min-h-[560px]", children: previewUrl ? /* @__PURE__ */ jsx66(
|
|
7479
7536
|
Cropper,
|
|
7480
7537
|
{
|
|
@@ -7491,7 +7548,7 @@ function ImageCropDialog({
|
|
|
7491
7548
|
objectFit: "contain"
|
|
7492
7549
|
}
|
|
7493
7550
|
) : null }) }),
|
|
7494
|
-
/* @__PURE__ */
|
|
7551
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex min-w-0 flex-col gap-5 px-5 py-4 sm:px-6 sm:py-5", children: [
|
|
7495
7552
|
/* @__PURE__ */ jsx66("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx66(
|
|
7496
7553
|
Button,
|
|
7497
7554
|
{
|
|
@@ -7506,13 +7563,13 @@ function ImageCropDialog({
|
|
|
7506
7563
|
children: "Reset"
|
|
7507
7564
|
}
|
|
7508
7565
|
) }),
|
|
7509
|
-
/* @__PURE__ */
|
|
7510
|
-
/* @__PURE__ */
|
|
7511
|
-
/* @__PURE__ */
|
|
7566
|
+
/* @__PURE__ */ jsxs48("div", { className: "space-y-3", children: [
|
|
7567
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex items-center justify-between gap-3", children: [
|
|
7568
|
+
/* @__PURE__ */ jsxs48(Label, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
7512
7569
|
/* @__PURE__ */ jsx66(IconZoomIn, { className: "size-4" }),
|
|
7513
7570
|
"Zoom"
|
|
7514
7571
|
] }),
|
|
7515
|
-
/* @__PURE__ */
|
|
7572
|
+
/* @__PURE__ */ jsxs48(Text, { size: "sm", variant: "muted", children: [
|
|
7516
7573
|
zoom.toFixed(2),
|
|
7517
7574
|
"x"
|
|
7518
7575
|
] })
|
|
@@ -7527,21 +7584,21 @@ function ImageCropDialog({
|
|
|
7527
7584
|
onValueChange: (value) => setZoom(Number(value))
|
|
7528
7585
|
}
|
|
7529
7586
|
),
|
|
7530
|
-
/* @__PURE__ */
|
|
7531
|
-
/* @__PURE__ */
|
|
7587
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex justify-between", children: [
|
|
7588
|
+
/* @__PURE__ */ jsxs48(Text, { size: "xs", variant: "muted", children: [
|
|
7532
7589
|
/* @__PURE__ */ jsx66(IconZoomOut, { className: "mr-1 inline size-3" }),
|
|
7533
7590
|
"1x"
|
|
7534
7591
|
] }),
|
|
7535
7592
|
/* @__PURE__ */ jsx66(Text, { size: "xs", variant: "muted", children: "3x" })
|
|
7536
7593
|
] })
|
|
7537
7594
|
] }),
|
|
7538
|
-
/* @__PURE__ */
|
|
7539
|
-
/* @__PURE__ */
|
|
7540
|
-
/* @__PURE__ */
|
|
7595
|
+
/* @__PURE__ */ jsxs48("div", { className: "space-y-3", children: [
|
|
7596
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex items-center justify-between gap-3", children: [
|
|
7597
|
+
/* @__PURE__ */ jsxs48(Label, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
7541
7598
|
/* @__PURE__ */ jsx66(IconRotate, { className: "size-4" }),
|
|
7542
7599
|
"Rotation"
|
|
7543
7600
|
] }),
|
|
7544
|
-
/* @__PURE__ */
|
|
7601
|
+
/* @__PURE__ */ jsxs48(Text, { size: "sm", variant: "muted", children: [
|
|
7545
7602
|
rotation,
|
|
7546
7603
|
"\xB0"
|
|
7547
7604
|
] })
|
|
@@ -7569,7 +7626,7 @@ function ImageCropDialog({
|
|
|
7569
7626
|
] })
|
|
7570
7627
|
] })
|
|
7571
7628
|
] }),
|
|
7572
|
-
/* @__PURE__ */
|
|
7629
|
+
/* @__PURE__ */ jsxs48(DialogFooter, { className: "border-border/70 flex justify-end border-t px-5 py-4 sm:px-6", children: [
|
|
7573
7630
|
/* @__PURE__ */ jsx66(Button, { variant: "outline", onClick: () => onOpenChange(false), children: "Cancel" }),
|
|
7574
7631
|
/* @__PURE__ */ jsx66(Button, { onClick: handleSave, loading: saving, children: "Use image" })
|
|
7575
7632
|
] })
|
|
@@ -7584,7 +7641,7 @@ import {
|
|
|
7584
7641
|
IconTrash as IconTrash4
|
|
7585
7642
|
} from "@tabler/icons-react";
|
|
7586
7643
|
import { useEffect as useEffect12, useId as useId2, useRef as useRef8, useState as useState17 } from "react";
|
|
7587
|
-
import { Fragment as Fragment13, jsx as jsx67, jsxs as
|
|
7644
|
+
import { Fragment as Fragment13, jsx as jsx67, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
7588
7645
|
function ImageUpload({
|
|
7589
7646
|
className,
|
|
7590
7647
|
file: fileProp,
|
|
@@ -7635,20 +7692,20 @@ function ImageUpload({
|
|
|
7635
7692
|
}
|
|
7636
7693
|
setFile(nextFile);
|
|
7637
7694
|
};
|
|
7638
|
-
return /* @__PURE__ */
|
|
7695
|
+
return /* @__PURE__ */ jsxs49(Fragment13, { children: [
|
|
7639
7696
|
/* @__PURE__ */ jsx67(
|
|
7640
7697
|
"div",
|
|
7641
7698
|
{
|
|
7642
7699
|
"data-slot": "image-upload-wrapper",
|
|
7643
7700
|
className: cn("flex flex-col gap-4", className),
|
|
7644
|
-
children: /* @__PURE__ */
|
|
7701
|
+
children: /* @__PURE__ */ jsxs49(
|
|
7645
7702
|
"div",
|
|
7646
7703
|
{
|
|
7647
7704
|
"data-slot": "image-upload",
|
|
7648
7705
|
className: "cn-image-upload flex flex-col gap-4 rounded-[var(--radius-lg)] border bg-background p-4",
|
|
7649
7706
|
children: [
|
|
7650
|
-
/* @__PURE__ */
|
|
7651
|
-
/* @__PURE__ */
|
|
7707
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [
|
|
7708
|
+
/* @__PURE__ */ jsxs49("div", { className: "cn-image-upload-copy space-y-1", children: [
|
|
7652
7709
|
/* @__PURE__ */ jsx67(
|
|
7653
7710
|
"div",
|
|
7654
7711
|
{
|
|
@@ -7666,7 +7723,7 @@ function ImageUpload({
|
|
|
7666
7723
|
}
|
|
7667
7724
|
)
|
|
7668
7725
|
] }),
|
|
7669
|
-
/* @__PURE__ */
|
|
7726
|
+
/* @__PURE__ */ jsxs49("div", { className: "cn-image-upload-toolbar flex gap-2", children: [
|
|
7670
7727
|
file && enableCrop ? /* @__PURE__ */ jsx67(
|
|
7671
7728
|
Button,
|
|
7672
7729
|
{
|
|
@@ -7731,7 +7788,7 @@ function ImageUpload({
|
|
|
7731
7788
|
"cn-image-upload-dropzone block cursor-pointer rounded-[var(--radius-lg)] border border-dashed p-3 transition-colors hover:bg-accent/40",
|
|
7732
7789
|
disabled && "cursor-not-allowed opacity-60"
|
|
7733
7790
|
),
|
|
7734
|
-
children: previewUrl ? /* @__PURE__ */
|
|
7791
|
+
children: previewUrl ? /* @__PURE__ */ jsxs49("div", { className: "grid gap-4 lg:grid-cols-[minmax(0,1fr)_220px]", children: [
|
|
7735
7792
|
/* @__PURE__ */ jsx67("div", { className: "cn-image-upload-preview relative aspect-[4/3] overflow-hidden", children: /* @__PURE__ */ jsx67(
|
|
7736
7793
|
Image,
|
|
7737
7794
|
{
|
|
@@ -7740,8 +7797,8 @@ function ImageUpload({
|
|
|
7740
7797
|
className: "size-full object-cover"
|
|
7741
7798
|
}
|
|
7742
7799
|
) }),
|
|
7743
|
-
/* @__PURE__ */
|
|
7744
|
-
/* @__PURE__ */
|
|
7800
|
+
/* @__PURE__ */ jsxs49("div", { className: "cn-image-upload-sidebar flex flex-col justify-between gap-4", children: [
|
|
7801
|
+
/* @__PURE__ */ jsxs49("div", { className: "cn-image-upload-meta space-y-1", children: [
|
|
7745
7802
|
/* @__PURE__ */ jsx67(
|
|
7746
7803
|
"div",
|
|
7747
7804
|
{
|
|
@@ -7751,12 +7808,12 @@ function ImageUpload({
|
|
|
7751
7808
|
}
|
|
7752
7809
|
),
|
|
7753
7810
|
/* @__PURE__ */ jsx67("div", { className: "text-muted-foreground text-xs", children: file ? `${Math.round(file.size / 1024)} KB` : "Remote preview" }),
|
|
7754
|
-
/* @__PURE__ */
|
|
7811
|
+
/* @__PURE__ */ jsxs49("div", { className: "text-muted-foreground text-xs", children: [
|
|
7755
7812
|
"Accepts ",
|
|
7756
7813
|
accept
|
|
7757
7814
|
] })
|
|
7758
7815
|
] }),
|
|
7759
|
-
/* @__PURE__ */
|
|
7816
|
+
/* @__PURE__ */ jsxs49("div", { className: "cn-image-upload-actions flex flex-wrap gap-2", children: [
|
|
7760
7817
|
/* @__PURE__ */ jsx67(
|
|
7761
7818
|
Button,
|
|
7762
7819
|
{
|
|
@@ -7787,11 +7844,11 @@ function ImageUpload({
|
|
|
7787
7844
|
) : null
|
|
7788
7845
|
] })
|
|
7789
7846
|
] })
|
|
7790
|
-
] }) : /* @__PURE__ */
|
|
7847
|
+
] }) : /* @__PURE__ */ jsxs49("div", { className: "cn-image-upload-placeholder flex min-h-64 flex-col items-center justify-center gap-3 px-6 text-center", children: [
|
|
7791
7848
|
/* @__PURE__ */ jsx67("div", { className: "cn-image-upload-placeholder-icon text-muted-foreground flex size-12 items-center justify-center", children: /* @__PURE__ */ jsx67(IconPhotoPlus, { className: "size-5" }) }),
|
|
7792
|
-
/* @__PURE__ */
|
|
7849
|
+
/* @__PURE__ */ jsxs49("div", { className: "cn-image-upload-placeholder-copy space-y-1", children: [
|
|
7793
7850
|
/* @__PURE__ */ jsx67("div", { className: "text-sm font-medium", children: "Drag and drop or click to upload" }),
|
|
7794
|
-
/* @__PURE__ */
|
|
7851
|
+
/* @__PURE__ */ jsxs49("div", { className: "text-muted-foreground text-sm", children: [
|
|
7795
7852
|
"Accepts ",
|
|
7796
7853
|
accept
|
|
7797
7854
|
] }),
|
|
@@ -7839,9 +7896,9 @@ function PageContainer({ className, children }) {
|
|
|
7839
7896
|
}
|
|
7840
7897
|
|
|
7841
7898
|
// src/components/layout/page/page-section.tsx
|
|
7842
|
-
import { jsx as jsx70, jsxs as
|
|
7899
|
+
import { jsx as jsx70, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
7843
7900
|
function PageSection({ title, className, children }) {
|
|
7844
|
-
return /* @__PURE__ */
|
|
7901
|
+
return /* @__PURE__ */ jsxs50("div", { className: cn("flex flex-col gap-4", className), children: [
|
|
7845
7902
|
title ? /* @__PURE__ */ jsx70("h4", { className: "font-medium text-foreground", children: title }) : null,
|
|
7846
7903
|
children
|
|
7847
7904
|
] });
|
|
@@ -7854,7 +7911,7 @@ function PageSubTitle({ className, children }) {
|
|
|
7854
7911
|
}
|
|
7855
7912
|
|
|
7856
7913
|
// src/components/layout/page/page-title.tsx
|
|
7857
|
-
import { jsx as jsx72, jsxs as
|
|
7914
|
+
import { jsx as jsx72, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
7858
7915
|
function PageTitle({
|
|
7859
7916
|
icon,
|
|
7860
7917
|
back,
|
|
@@ -7862,7 +7919,7 @@ function PageTitle({
|
|
|
7862
7919
|
children,
|
|
7863
7920
|
className
|
|
7864
7921
|
}) {
|
|
7865
|
-
return /* @__PURE__ */
|
|
7922
|
+
return /* @__PURE__ */ jsxs51(
|
|
7866
7923
|
"div",
|
|
7867
7924
|
{
|
|
7868
7925
|
className: cn(
|
|
@@ -7872,7 +7929,7 @@ function PageTitle({
|
|
|
7872
7929
|
children: [
|
|
7873
7930
|
back ?? null,
|
|
7874
7931
|
icon ?? null,
|
|
7875
|
-
/* @__PURE__ */
|
|
7932
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex grow items-center justify-between", children: [
|
|
7876
7933
|
/* @__PURE__ */ jsx72("h3", { className: "font-medium", children }),
|
|
7877
7934
|
action ?? null
|
|
7878
7935
|
] })
|
|
@@ -7910,6 +7967,11 @@ var Toaster = ({ ...props }) => {
|
|
|
7910
7967
|
"group-[.toast]:text-muted-foreground",
|
|
7911
7968
|
props.toastOptions?.classNames?.description
|
|
7912
7969
|
].filter(Boolean).join(" "),
|
|
7970
|
+
title: [
|
|
7971
|
+
"group-[.toast]:text-current",
|
|
7972
|
+
"font-medium",
|
|
7973
|
+
props.toastOptions?.classNames?.title
|
|
7974
|
+
].filter(Boolean).join(" "),
|
|
7913
7975
|
actionButton: [
|
|
7914
7976
|
"group-[.toast]:bg-primary",
|
|
7915
7977
|
"group-[.toast]:text-primary-foreground",
|
|
@@ -7927,18 +7989,31 @@ var Toaster = ({ ...props }) => {
|
|
|
7927
7989
|
Sonner,
|
|
7928
7990
|
{
|
|
7929
7991
|
theme,
|
|
7992
|
+
richColors: props.richColors ?? true,
|
|
7930
7993
|
className: "toaster group",
|
|
7931
7994
|
icons: {
|
|
7932
7995
|
success: /* @__PURE__ */ jsx73(IconCircleCheck, { className: "size-4" }),
|
|
7933
7996
|
info: /* @__PURE__ */ jsx73(IconInfoCircle, { className: "size-4" }),
|
|
7934
7997
|
warning: /* @__PURE__ */ jsx73(IconAlertTriangle, { className: "size-4" }),
|
|
7935
7998
|
error: /* @__PURE__ */ jsx73(IconX7, { className: "size-4" }),
|
|
7936
|
-
loading: /* @__PURE__ */ jsx73(IconLoader22, { className: "size-4 animate-spin" })
|
|
7999
|
+
loading: /* @__PURE__ */ jsx73(IconLoader22, { className: "cn-spinner size-4 animate-spin" })
|
|
7937
8000
|
},
|
|
7938
8001
|
style: {
|
|
7939
8002
|
"--normal-bg": "var(--popover)",
|
|
7940
8003
|
"--normal-text": "var(--popover-foreground)",
|
|
7941
8004
|
"--normal-border": "var(--border)",
|
|
8005
|
+
"--success-bg": "oklch(0.962 0.044 163.31)",
|
|
8006
|
+
"--success-border": "oklch(0.845 0.143 164.98)",
|
|
8007
|
+
"--success-text": "oklch(0.372 0.116 166.6)",
|
|
8008
|
+
"--info-bg": "oklch(0.964 0.03 240.13)",
|
|
8009
|
+
"--info-border": "oklch(0.809 0.105 240.95)",
|
|
8010
|
+
"--info-text": "oklch(0.402 0.097 241.53)",
|
|
8011
|
+
"--warning-bg": "oklch(0.973 0.071 93.84)",
|
|
8012
|
+
"--warning-border": "oklch(0.864 0.173 91.82)",
|
|
8013
|
+
"--warning-text": "oklch(0.442 0.095 80.63)",
|
|
8014
|
+
"--error-bg": "oklch(0.957 0.032 17.26)",
|
|
8015
|
+
"--error-border": "oklch(0.808 0.114 19.57)",
|
|
8016
|
+
"--error-text": "oklch(0.444 0.137 25.33)",
|
|
7942
8017
|
"--border-radius": "var(--radius)"
|
|
7943
8018
|
},
|
|
7944
8019
|
toastOptions,
|
|
@@ -7948,7 +8023,7 @@ var Toaster = ({ ...props }) => {
|
|
|
7948
8023
|
};
|
|
7949
8024
|
|
|
7950
8025
|
// src/components/layout/shell.tsx
|
|
7951
|
-
import { jsx as jsx74, jsxs as
|
|
8026
|
+
import { jsx as jsx74, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
7952
8027
|
function Shell({
|
|
7953
8028
|
sidebar,
|
|
7954
8029
|
headerActions,
|
|
@@ -7956,13 +8031,13 @@ function Shell({
|
|
|
7956
8031
|
showToaster = true,
|
|
7957
8032
|
contentClassName
|
|
7958
8033
|
}) {
|
|
7959
|
-
return /* @__PURE__ */ jsx74(BreadcrumbProvider, { children: /* @__PURE__ */
|
|
8034
|
+
return /* @__PURE__ */ jsx74(BreadcrumbProvider, { children: /* @__PURE__ */ jsxs52(SidebarProvider, { children: [
|
|
7960
8035
|
sidebar,
|
|
7961
|
-
/* @__PURE__ */
|
|
7962
|
-
/* @__PURE__ */
|
|
7963
|
-
/* @__PURE__ */
|
|
8036
|
+
/* @__PURE__ */ jsxs52(SidebarInset, { children: [
|
|
8037
|
+
/* @__PURE__ */ jsxs52("header", { className: "cn-shell-header", children: [
|
|
8038
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2", children: [
|
|
7964
8039
|
/* @__PURE__ */ jsx74(SidebarTrigger, { className: "-ml-1" }),
|
|
7965
|
-
/* @__PURE__ */
|
|
8040
|
+
/* @__PURE__ */ jsxs52("div", { className: "hidden md:flex md:items-center md:gap-2", children: [
|
|
7966
8041
|
/* @__PURE__ */ jsx74(
|
|
7967
8042
|
Separator,
|
|
7968
8043
|
{
|
|
@@ -8179,7 +8254,7 @@ function pad2(n) {
|
|
|
8179
8254
|
}
|
|
8180
8255
|
|
|
8181
8256
|
// src/components/date-time/date-picker/picker-content.tsx
|
|
8182
|
-
import { Fragment as Fragment14, jsx as jsx76, jsxs as
|
|
8257
|
+
import { Fragment as Fragment14, jsx as jsx76, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
8183
8258
|
var JS_WEEKDAY_SHORT = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
8184
8259
|
function weekdayHeaderLabels(firstDayOfWeek) {
|
|
8185
8260
|
return Array.from({ length: 7 }, (_, col) => {
|
|
@@ -8249,7 +8324,7 @@ function DatePickerContent({
|
|
|
8249
8324
|
}) {
|
|
8250
8325
|
const monthShortList = calendarType === "EC" ? EC_MONTHS_SHORT : MONTHS_SHORT;
|
|
8251
8326
|
const hasPresets = !!presets?.length;
|
|
8252
|
-
return /* @__PURE__ */
|
|
8327
|
+
return /* @__PURE__ */ jsxs53("div", { className: "flex", children: [
|
|
8253
8328
|
hasPresets && /* @__PURE__ */ jsx76("div", { className: "flex flex-col gap-0.5 border-r border-border py-2 pl-2 pr-1", children: presets.map((preset) => /* @__PURE__ */ jsx76(
|
|
8254
8329
|
"button",
|
|
8255
8330
|
{
|
|
@@ -8261,7 +8336,7 @@ function DatePickerContent({
|
|
|
8261
8336
|
},
|
|
8262
8337
|
preset.label
|
|
8263
8338
|
)) }),
|
|
8264
|
-
/* @__PURE__ */
|
|
8339
|
+
/* @__PURE__ */ jsxs53(
|
|
8265
8340
|
"div",
|
|
8266
8341
|
{
|
|
8267
8342
|
className: cn(
|
|
@@ -8271,7 +8346,7 @@ function DatePickerContent({
|
|
|
8271
8346
|
hasPresets && "min-w-0 flex-1"
|
|
8272
8347
|
),
|
|
8273
8348
|
children: [
|
|
8274
|
-
/* @__PURE__ */
|
|
8349
|
+
/* @__PURE__ */ jsxs53("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
8275
8350
|
/* @__PURE__ */ jsx76(
|
|
8276
8351
|
"button",
|
|
8277
8352
|
{
|
|
@@ -8313,8 +8388,8 @@ function DatePickerContent({
|
|
|
8313
8388
|
const dayGridClass = withWeekNumbers ? "grid grid-cols-[2rem_repeat(7,minmax(0,1fr))]" : "grid grid-cols-7";
|
|
8314
8389
|
const rowCount = cells.length / 7;
|
|
8315
8390
|
const labels = weekdayHeaderLabels(firstDayOfWeek);
|
|
8316
|
-
return /* @__PURE__ */
|
|
8317
|
-
!hideWeekdays && /* @__PURE__ */
|
|
8391
|
+
return /* @__PURE__ */ jsxs53(Fragment14, { children: [
|
|
8392
|
+
!hideWeekdays && /* @__PURE__ */ jsxs53("div", { className: cn("mb-0.5", dayGridClass), children: [
|
|
8318
8393
|
withWeekNumbers && /* @__PURE__ */ jsx76("div", { className: "select-none py-1.5 text-center text-xs font-medium text-muted-foreground", children: "#" }),
|
|
8319
8394
|
labels.map((wd, i) => {
|
|
8320
8395
|
const js = (firstDayOfWeek + i) % 7;
|
|
@@ -8341,7 +8416,7 @@ function DatePickerContent({
|
|
|
8341
8416
|
children: Array.from({ length: rowCount }, (_, row) => {
|
|
8342
8417
|
const rowCells = cells.slice(row * 7, row * 7 + 7);
|
|
8343
8418
|
const weekNo = getISOWeekNumber(rowCells[0].gcDate);
|
|
8344
|
-
return /* @__PURE__ */
|
|
8419
|
+
return /* @__PURE__ */ jsxs53(
|
|
8345
8420
|
"div",
|
|
8346
8421
|
{
|
|
8347
8422
|
className: dayGridClass,
|
|
@@ -8368,7 +8443,7 @@ function DatePickerContent({
|
|
|
8368
8443
|
const showStrip = hasRange && (inRange || (rStart || rEnd) && !(rStart && rEnd));
|
|
8369
8444
|
return (
|
|
8370
8445
|
/* biome-ignore lint/a11y/useSemanticElements: calendar cell, not a form fieldset */
|
|
8371
|
-
/* @__PURE__ */
|
|
8446
|
+
/* @__PURE__ */ jsxs53(
|
|
8372
8447
|
"div",
|
|
8373
8448
|
{
|
|
8374
8449
|
role: "group",
|
|
@@ -8493,7 +8568,7 @@ function DatePickerContent({
|
|
|
8493
8568
|
y
|
|
8494
8569
|
);
|
|
8495
8570
|
}) }),
|
|
8496
|
-
/* @__PURE__ */
|
|
8571
|
+
/* @__PURE__ */ jsxs53("div", { className: "mt-2 flex items-center justify-end gap-1 border-t border-border pt-2", children: [
|
|
8497
8572
|
/* @__PURE__ */ jsx76(
|
|
8498
8573
|
"button",
|
|
8499
8574
|
{
|
|
@@ -9374,7 +9449,7 @@ function FormMessage({ className, ...props }) {
|
|
|
9374
9449
|
import { IconMinus } from "@tabler/icons-react";
|
|
9375
9450
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
9376
9451
|
import * as React10 from "react";
|
|
9377
|
-
import { jsx as jsx79, jsxs as
|
|
9452
|
+
import { jsx as jsx79, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
9378
9453
|
function InputOTP({
|
|
9379
9454
|
className,
|
|
9380
9455
|
containerClassName,
|
|
@@ -9411,7 +9486,7 @@ function InputOTPSlot({
|
|
|
9411
9486
|
}) {
|
|
9412
9487
|
const inputOTPContext = React10.useContext(OTPInputContext);
|
|
9413
9488
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
9414
|
-
return /* @__PURE__ */
|
|
9489
|
+
return /* @__PURE__ */ jsxs54(
|
|
9415
9490
|
"div",
|
|
9416
9491
|
{
|
|
9417
9492
|
"data-slot": "input-otp-slot",
|
|
@@ -9595,7 +9670,7 @@ function HardbreakControl({ editor }) {
|
|
|
9595
9670
|
// src/components/rich-text/controls/iframe-control.tsx
|
|
9596
9671
|
import { IconExternalLink } from "@tabler/icons-react";
|
|
9597
9672
|
import { useState as useState19 } from "react";
|
|
9598
|
-
import { jsx as jsx82, jsxs as
|
|
9673
|
+
import { jsx as jsx82, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
9599
9674
|
function IframeControl() {
|
|
9600
9675
|
const { editor } = useRichTextEditorContext();
|
|
9601
9676
|
const [open, setOpen] = useState19(false);
|
|
@@ -9629,7 +9704,7 @@ function IframeControl() {
|
|
|
9629
9704
|
setOpen(false);
|
|
9630
9705
|
setIframeTag("");
|
|
9631
9706
|
};
|
|
9632
|
-
return /* @__PURE__ */
|
|
9707
|
+
return /* @__PURE__ */ jsxs55(Dialog, { open, onOpenChange: setOpen, children: [
|
|
9633
9708
|
/* @__PURE__ */ jsx82(
|
|
9634
9709
|
DialogTrigger,
|
|
9635
9710
|
{
|
|
@@ -9645,9 +9720,9 @@ function IframeControl() {
|
|
|
9645
9720
|
children: /* @__PURE__ */ jsx82(IconExternalLink, { className: "size-4" })
|
|
9646
9721
|
}
|
|
9647
9722
|
),
|
|
9648
|
-
/* @__PURE__ */
|
|
9723
|
+
/* @__PURE__ */ jsxs55(DialogContent, { children: [
|
|
9649
9724
|
/* @__PURE__ */ jsx82(DialogHeader, { children: /* @__PURE__ */ jsx82(DialogTitle, { children: "Insert Iframe" }) }),
|
|
9650
|
-
/* @__PURE__ */ jsx82("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */
|
|
9725
|
+
/* @__PURE__ */ jsx82("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsxs55("div", { className: "flex flex-col gap-2", children: [
|
|
9651
9726
|
/* @__PURE__ */ jsx82(Label, { htmlFor: "iframe-tag", children: "Iframe Tag" }),
|
|
9652
9727
|
/* @__PURE__ */ jsx82(
|
|
9653
9728
|
Input,
|
|
@@ -9665,7 +9740,7 @@ function IframeControl() {
|
|
|
9665
9740
|
}
|
|
9666
9741
|
)
|
|
9667
9742
|
] }) }),
|
|
9668
|
-
/* @__PURE__ */
|
|
9743
|
+
/* @__PURE__ */ jsxs55(DialogFooter, { children: [
|
|
9669
9744
|
/* @__PURE__ */ jsx82(Button, { variant: "outline", onClick: handleClose, children: "Cancel" }),
|
|
9670
9745
|
/* @__PURE__ */ jsx82(Button, { onClick: handleAdd, children: "Add Iframe" })
|
|
9671
9746
|
] })
|
|
@@ -9676,7 +9751,7 @@ function IframeControl() {
|
|
|
9676
9751
|
// src/components/rich-text/controls/image-control.tsx
|
|
9677
9752
|
import { IconPhoto as IconPhoto2 } from "@tabler/icons-react";
|
|
9678
9753
|
import { useState as useState20 } from "react";
|
|
9679
|
-
import { jsx as jsx83, jsxs as
|
|
9754
|
+
import { jsx as jsx83, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
9680
9755
|
function ImageControl() {
|
|
9681
9756
|
const { editor } = useRichTextEditorContext();
|
|
9682
9757
|
const [open, setOpen] = useState20(false);
|
|
@@ -9697,7 +9772,7 @@ function ImageControl() {
|
|
|
9697
9772
|
setOpen(false);
|
|
9698
9773
|
setUrl("");
|
|
9699
9774
|
};
|
|
9700
|
-
return /* @__PURE__ */
|
|
9775
|
+
return /* @__PURE__ */ jsxs56(Dialog, { open, onOpenChange: setOpen, children: [
|
|
9701
9776
|
/* @__PURE__ */ jsx83(
|
|
9702
9777
|
DialogTrigger,
|
|
9703
9778
|
{
|
|
@@ -9713,9 +9788,9 @@ function ImageControl() {
|
|
|
9713
9788
|
children: /* @__PURE__ */ jsx83(IconPhoto2, { className: "size-4" })
|
|
9714
9789
|
}
|
|
9715
9790
|
),
|
|
9716
|
-
/* @__PURE__ */
|
|
9791
|
+
/* @__PURE__ */ jsxs56(DialogContent, { children: [
|
|
9717
9792
|
/* @__PURE__ */ jsx83(DialogHeader, { children: /* @__PURE__ */ jsx83(DialogTitle, { children: "Insert Image" }) }),
|
|
9718
|
-
/* @__PURE__ */ jsx83("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */
|
|
9793
|
+
/* @__PURE__ */ jsx83("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsxs56("div", { className: "flex flex-col gap-2", children: [
|
|
9719
9794
|
/* @__PURE__ */ jsx83(Label, { htmlFor: "image-url", children: "Image URL" }),
|
|
9720
9795
|
/* @__PURE__ */ jsx83(
|
|
9721
9796
|
Input,
|
|
@@ -9733,7 +9808,7 @@ function ImageControl() {
|
|
|
9733
9808
|
}
|
|
9734
9809
|
)
|
|
9735
9810
|
] }) }),
|
|
9736
|
-
/* @__PURE__ */
|
|
9811
|
+
/* @__PURE__ */ jsxs56(DialogFooter, { children: [
|
|
9737
9812
|
/* @__PURE__ */ jsx83(Button, { variant: "outline", onClick: handleClose, children: "Cancel" }),
|
|
9738
9813
|
/* @__PURE__ */ jsx83(Button, { onClick: handleAdd, children: "Add Image" })
|
|
9739
9814
|
] })
|
|
@@ -9750,7 +9825,7 @@ import {
|
|
|
9750
9825
|
IconTableMinus,
|
|
9751
9826
|
IconTrash as IconTrash5
|
|
9752
9827
|
} from "@tabler/icons-react";
|
|
9753
|
-
import { Fragment as Fragment15, jsx as jsx84, jsxs as
|
|
9828
|
+
import { Fragment as Fragment15, jsx as jsx84, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
9754
9829
|
function TableControl({ editor }) {
|
|
9755
9830
|
if (!editor) {
|
|
9756
9831
|
return null;
|
|
@@ -9758,7 +9833,7 @@ function TableControl({ editor }) {
|
|
|
9758
9833
|
const handleInsertTable = () => {
|
|
9759
9834
|
editor.chain().focus().insertTable({ rows: 2, cols: 2, withHeaderRow: true }).run();
|
|
9760
9835
|
};
|
|
9761
|
-
return /* @__PURE__ */
|
|
9836
|
+
return /* @__PURE__ */ jsxs57(Fragment15, { children: [
|
|
9762
9837
|
/* @__PURE__ */ jsx84(
|
|
9763
9838
|
RichTextEditorControl,
|
|
9764
9839
|
{
|
|
@@ -9825,7 +9900,7 @@ function TableControl({ editor }) {
|
|
|
9825
9900
|
// src/components/rich-text/controls/youtube-control.tsx
|
|
9826
9901
|
import { IconBrandYoutube } from "@tabler/icons-react";
|
|
9827
9902
|
import { useState as useState21 } from "react";
|
|
9828
|
-
import { jsx as jsx85, jsxs as
|
|
9903
|
+
import { jsx as jsx85, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
9829
9904
|
function YoutubeControl() {
|
|
9830
9905
|
const { editor } = useRichTextEditorContext();
|
|
9831
9906
|
const [open, setOpen] = useState21(false);
|
|
@@ -9846,7 +9921,7 @@ function YoutubeControl() {
|
|
|
9846
9921
|
setOpen(false);
|
|
9847
9922
|
setUrl("");
|
|
9848
9923
|
};
|
|
9849
|
-
return /* @__PURE__ */
|
|
9924
|
+
return /* @__PURE__ */ jsxs58(Dialog, { open, onOpenChange: setOpen, children: [
|
|
9850
9925
|
/* @__PURE__ */ jsx85(
|
|
9851
9926
|
DialogTrigger,
|
|
9852
9927
|
{
|
|
@@ -9862,9 +9937,9 @@ function YoutubeControl() {
|
|
|
9862
9937
|
children: /* @__PURE__ */ jsx85(IconBrandYoutube, { className: "size-4" })
|
|
9863
9938
|
}
|
|
9864
9939
|
),
|
|
9865
|
-
/* @__PURE__ */
|
|
9940
|
+
/* @__PURE__ */ jsxs58(DialogContent, { children: [
|
|
9866
9941
|
/* @__PURE__ */ jsx85(DialogHeader, { children: /* @__PURE__ */ jsx85(DialogTitle, { children: "Insert YouTube Video" }) }),
|
|
9867
|
-
/* @__PURE__ */ jsx85("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */
|
|
9942
|
+
/* @__PURE__ */ jsx85("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ jsxs58("div", { className: "flex flex-col gap-2", children: [
|
|
9868
9943
|
/* @__PURE__ */ jsx85(Label, { htmlFor: "youtube-url", children: "YouTube URL" }),
|
|
9869
9944
|
/* @__PURE__ */ jsx85(
|
|
9870
9945
|
Input,
|
|
@@ -9882,7 +9957,7 @@ function YoutubeControl() {
|
|
|
9882
9957
|
}
|
|
9883
9958
|
)
|
|
9884
9959
|
] }) }),
|
|
9885
|
-
/* @__PURE__ */
|
|
9960
|
+
/* @__PURE__ */ jsxs58(DialogFooter, { children: [
|
|
9886
9961
|
/* @__PURE__ */ jsx85(Button, { variant: "outline", onClick: handleClose, children: "Cancel" }),
|
|
9887
9962
|
/* @__PURE__ */ jsx85(Button, { onClick: handleAdd, children: "Add Video" })
|
|
9888
9963
|
] })
|
|
@@ -10008,7 +10083,7 @@ var Iframe = Node.create({
|
|
|
10008
10083
|
});
|
|
10009
10084
|
|
|
10010
10085
|
// src/components/rich-text/rich-text-input.tsx
|
|
10011
|
-
import { Fragment as Fragment16, jsx as jsx86, jsxs as
|
|
10086
|
+
import { Fragment as Fragment16, jsx as jsx86, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
10012
10087
|
var EMPTY_KEY = "__empty__";
|
|
10013
10088
|
function RichTextInputEditor({
|
|
10014
10089
|
field,
|
|
@@ -10135,14 +10210,14 @@ function RichTextInputEditor({
|
|
|
10135
10210
|
}, [editor, value]);
|
|
10136
10211
|
const enabledControllersLength = enabledControllers.length;
|
|
10137
10212
|
const isControllerEnabled = (controller) => enabledControllersLength === 0 || enabledControllers.includes(controller);
|
|
10138
|
-
return /* @__PURE__ */
|
|
10139
|
-
label && /* @__PURE__ */
|
|
10213
|
+
return /* @__PURE__ */ jsxs59("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
10214
|
+
label && /* @__PURE__ */ jsxs59(Label, { children: [
|
|
10140
10215
|
label,
|
|
10141
10216
|
withAsterisk && /* @__PURE__ */ jsx86("span", { className: "text-destructive", children: "*" })
|
|
10142
10217
|
] }),
|
|
10143
|
-
/* @__PURE__ */
|
|
10144
|
-
/* @__PURE__ */
|
|
10145
|
-
/* @__PURE__ */
|
|
10218
|
+
/* @__PURE__ */ jsxs59(RichTextEditor, { editor, children: [
|
|
10219
|
+
/* @__PURE__ */ jsxs59(RichTextEditorToolbar, { children: [
|
|
10220
|
+
/* @__PURE__ */ jsxs59(RichTextEditorControlsGroup, { children: [
|
|
10146
10221
|
isControllerEnabled("bold") && /* @__PURE__ */ jsx86(
|
|
10147
10222
|
RichTextEditorControl,
|
|
10148
10223
|
{
|
|
@@ -10218,7 +10293,7 @@ function RichTextInputEditor({
|
|
|
10218
10293
|
}
|
|
10219
10294
|
)
|
|
10220
10295
|
] }),
|
|
10221
|
-
/* @__PURE__ */
|
|
10296
|
+
/* @__PURE__ */ jsxs59(RichTextEditorControlsGroup, { children: [
|
|
10222
10297
|
isControllerEnabled("h1") && /* @__PURE__ */ jsx86(
|
|
10223
10298
|
RichTextEditorControl,
|
|
10224
10299
|
{
|
|
@@ -10260,7 +10335,7 @@ function RichTextInputEditor({
|
|
|
10260
10335
|
}
|
|
10261
10336
|
)
|
|
10262
10337
|
] }),
|
|
10263
|
-
/* @__PURE__ */
|
|
10338
|
+
/* @__PURE__ */ jsxs59(RichTextEditorControlsGroup, { children: [
|
|
10264
10339
|
isControllerEnabled("bulletList") && /* @__PURE__ */ jsx86(
|
|
10265
10340
|
RichTextEditorControl,
|
|
10266
10341
|
{
|
|
@@ -10282,8 +10357,8 @@ function RichTextInputEditor({
|
|
|
10282
10357
|
}
|
|
10283
10358
|
)
|
|
10284
10359
|
] }),
|
|
10285
|
-
/* @__PURE__ */
|
|
10286
|
-
isControllerEnabled("link") && /* @__PURE__ */
|
|
10360
|
+
/* @__PURE__ */ jsxs59(RichTextEditorControlsGroup, { children: [
|
|
10361
|
+
isControllerEnabled("link") && /* @__PURE__ */ jsxs59(Fragment16, { children: [
|
|
10287
10362
|
/* @__PURE__ */ jsx86(
|
|
10288
10363
|
RichTextEditorControl,
|
|
10289
10364
|
{
|
|
@@ -10321,7 +10396,7 @@ function RichTextInputEditor({
|
|
|
10321
10396
|
}
|
|
10322
10397
|
)
|
|
10323
10398
|
] }),
|
|
10324
|
-
/* @__PURE__ */
|
|
10399
|
+
/* @__PURE__ */ jsxs59(RichTextEditorControlsGroup, { children: [
|
|
10325
10400
|
isControllerEnabled("alignLeft") && /* @__PURE__ */ jsx86(
|
|
10326
10401
|
RichTextEditorControl,
|
|
10327
10402
|
{
|
|
@@ -10363,7 +10438,7 @@ function RichTextInputEditor({
|
|
|
10363
10438
|
}
|
|
10364
10439
|
)
|
|
10365
10440
|
] }),
|
|
10366
|
-
/* @__PURE__ */
|
|
10441
|
+
/* @__PURE__ */ jsxs59(RichTextEditorControlsGroup, { children: [
|
|
10367
10442
|
isControllerEnabled("subscript") && /* @__PURE__ */ jsx86(
|
|
10368
10443
|
RichTextEditorControl,
|
|
10369
10444
|
{
|
|
@@ -10386,9 +10461,9 @@ function RichTextInputEditor({
|
|
|
10386
10461
|
)
|
|
10387
10462
|
] }),
|
|
10388
10463
|
editor && isControllerEnabled("hardBreak") && /* @__PURE__ */ jsx86(HardbreakControl, { editor }),
|
|
10389
|
-
mode === "large" && /* @__PURE__ */
|
|
10464
|
+
mode === "large" && /* @__PURE__ */ jsxs59(Fragment16, { children: [
|
|
10390
10465
|
isControllerEnabled("table") && /* @__PURE__ */ jsx86(RichTextEditorControlsGroup, { children: /* @__PURE__ */ jsx86(TableControl, { editor }) }),
|
|
10391
|
-
/* @__PURE__ */
|
|
10466
|
+
/* @__PURE__ */ jsxs59(RichTextEditorControlsGroup, { children: [
|
|
10392
10467
|
isControllerEnabled("image") && /* @__PURE__ */ jsx86(ImageControl, {}),
|
|
10393
10468
|
isControllerEnabled("youtube") && /* @__PURE__ */ jsx86(YoutubeControl, {}),
|
|
10394
10469
|
isControllerEnabled("map") && /* @__PURE__ */ jsx86(IframeControl, {})
|
|
@@ -10420,7 +10495,7 @@ function VisuallyHidden({ className, ...props }) {
|
|
|
10420
10495
|
}
|
|
10421
10496
|
|
|
10422
10497
|
// src/components/locale/locale-input-rich-text.tsx
|
|
10423
|
-
import { jsx as jsx88, jsxs as
|
|
10498
|
+
import { jsx as jsx88, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
10424
10499
|
function LocaleInputRichText({
|
|
10425
10500
|
label,
|
|
10426
10501
|
required,
|
|
@@ -10438,13 +10513,13 @@ function LocaleInputRichText({
|
|
|
10438
10513
|
const otherLanguages = supportedLanguages.filter(
|
|
10439
10514
|
(lang) => lang.value !== defaultLanguage
|
|
10440
10515
|
);
|
|
10441
|
-
return /* @__PURE__ */
|
|
10442
|
-
label && /* @__PURE__ */
|
|
10516
|
+
return /* @__PURE__ */ jsxs60(Field, { className: cn(className), children: [
|
|
10517
|
+
label && /* @__PURE__ */ jsxs60(FieldLabel, { children: [
|
|
10443
10518
|
label,
|
|
10444
10519
|
required && /* @__PURE__ */ jsx88("span", { className: "text-destructive ml-1", children: "*" })
|
|
10445
10520
|
] }),
|
|
10446
|
-
/* @__PURE__ */
|
|
10447
|
-
/* @__PURE__ */
|
|
10521
|
+
/* @__PURE__ */ jsxs60(FieldContent, { children: [
|
|
10522
|
+
/* @__PURE__ */ jsxs60("div", { className: "relative", children: [
|
|
10448
10523
|
/* @__PURE__ */ jsx88(
|
|
10449
10524
|
Controller2,
|
|
10450
10525
|
{
|
|
@@ -10462,7 +10537,7 @@ function LocaleInputRichText({
|
|
|
10462
10537
|
)
|
|
10463
10538
|
}
|
|
10464
10539
|
),
|
|
10465
|
-
/* @__PURE__ */
|
|
10540
|
+
/* @__PURE__ */ jsxs60("div", { className: "absolute top-3 right-2 z-10 flex items-center gap-1", children: [
|
|
10466
10541
|
/* @__PURE__ */ jsx88(
|
|
10467
10542
|
"button",
|
|
10468
10543
|
{
|
|
@@ -10483,7 +10558,7 @@ function LocaleInputRichText({
|
|
|
10483
10558
|
)
|
|
10484
10559
|
] })
|
|
10485
10560
|
] }),
|
|
10486
|
-
expanded && otherLanguages.length > 0 && /* @__PURE__ */ jsx88("div", { className: "cn-locale-input-expanded-rich", children: otherLanguages.map((lang) => /* @__PURE__ */
|
|
10561
|
+
expanded && otherLanguages.length > 0 && /* @__PURE__ */ jsx88("div", { className: "cn-locale-input-expanded-rich", children: otherLanguages.map((lang) => /* @__PURE__ */ jsxs60("div", { className: "space-y-2", children: [
|
|
10487
10562
|
/* @__PURE__ */ jsx88(FieldLabel, { className: "text-xs text-muted-foreground", children: lang.label }),
|
|
10488
10563
|
/* @__PURE__ */ jsx88(
|
|
10489
10564
|
Controller2,
|
|
@@ -10503,7 +10578,7 @@ function LocaleInputRichText({
|
|
|
10503
10578
|
}
|
|
10504
10579
|
)
|
|
10505
10580
|
] }, lang.value)) }),
|
|
10506
|
-
/* @__PURE__ */ jsx88(Dialog, { open: fullscreen, onOpenChange: setFullscreen, children: /* @__PURE__ */
|
|
10581
|
+
/* @__PURE__ */ jsx88(Dialog, { open: fullscreen, onOpenChange: setFullscreen, children: /* @__PURE__ */ jsxs60(
|
|
10507
10582
|
DialogContent,
|
|
10508
10583
|
{
|
|
10509
10584
|
showCloseButton: false,
|
|
@@ -10512,7 +10587,7 @@ function LocaleInputRichText({
|
|
|
10512
10587
|
"!top-0 !left-0 !right-0 !bottom-0 !h-screen !w-screen !max-w-none !translate-x-0 !translate-y-0 !rounded-none"
|
|
10513
10588
|
),
|
|
10514
10589
|
children: [
|
|
10515
|
-
/* @__PURE__ */ jsx88(VisuallyHidden, { children: /* @__PURE__ */
|
|
10590
|
+
/* @__PURE__ */ jsx88(VisuallyHidden, { children: /* @__PURE__ */ jsxs60(DialogTitle, { children: [
|
|
10516
10591
|
label || "Edit content",
|
|
10517
10592
|
" - Fullscreen editor"
|
|
10518
10593
|
] }) }),
|
|
@@ -10552,7 +10627,7 @@ function LocaleInputRichText({
|
|
|
10552
10627
|
// src/components/locale/locale-input-text.tsx
|
|
10553
10628
|
import { IconTextRecognition as IconTextRecognition2 } from "@tabler/icons-react";
|
|
10554
10629
|
import { useState as useState23 } from "react";
|
|
10555
|
-
import { jsx as jsx89, jsxs as
|
|
10630
|
+
import { jsx as jsx89, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
10556
10631
|
function LocaleInputText({
|
|
10557
10632
|
label,
|
|
10558
10633
|
required,
|
|
@@ -10569,13 +10644,13 @@ function LocaleInputText({
|
|
|
10569
10644
|
(lang) => lang.value !== defaultLanguage
|
|
10570
10645
|
);
|
|
10571
10646
|
const defaultError = errors?.[field]?.[defaultLanguage];
|
|
10572
|
-
return /* @__PURE__ */
|
|
10573
|
-
label && /* @__PURE__ */
|
|
10647
|
+
return /* @__PURE__ */ jsxs61(Field, { className: cn(className), children: [
|
|
10648
|
+
label && /* @__PURE__ */ jsxs61(FieldLabel, { children: [
|
|
10574
10649
|
label,
|
|
10575
10650
|
required && /* @__PURE__ */ jsx89("span", { className: "text-destructive ", children: "*" })
|
|
10576
10651
|
] }),
|
|
10577
|
-
/* @__PURE__ */
|
|
10578
|
-
/* @__PURE__ */
|
|
10652
|
+
/* @__PURE__ */ jsxs61(FieldContent, { children: [
|
|
10653
|
+
/* @__PURE__ */ jsxs61("div", { className: "relative", children: [
|
|
10579
10654
|
/* @__PURE__ */ jsx89(
|
|
10580
10655
|
Input,
|
|
10581
10656
|
{
|
|
@@ -10598,9 +10673,9 @@ function LocaleInputText({
|
|
|
10598
10673
|
)
|
|
10599
10674
|
] }),
|
|
10600
10675
|
/* @__PURE__ */ jsx89(FieldError, { errors: defaultError ? [defaultError] : void 0 }),
|
|
10601
|
-
expanded && otherLanguages.length > 0 && /* @__PURE__ */ jsx89("div", { className: "cn-locale-input-expanded", children: otherLanguages.map((lang) => /* @__PURE__ */ jsx89("div", { className: "space-y-1", children: /* @__PURE__ */
|
|
10676
|
+
expanded && otherLanguages.length > 0 && /* @__PURE__ */ jsx89("div", { className: "cn-locale-input-expanded", children: otherLanguages.map((lang) => /* @__PURE__ */ jsx89("div", { className: "space-y-1", children: /* @__PURE__ */ jsxs61("div", { className: "flex items-center gap-2", children: [
|
|
10602
10677
|
/* @__PURE__ */ jsx89(FieldLabel, { className: "min-w-[60px] text-xs text-muted-foreground", children: lang.label }),
|
|
10603
|
-
/* @__PURE__ */
|
|
10678
|
+
/* @__PURE__ */ jsxs61("div", { className: "flex-1 space-y-1", children: [
|
|
10604
10679
|
/* @__PURE__ */ jsx89(
|
|
10605
10680
|
Input,
|
|
10606
10681
|
{
|
|
@@ -10628,7 +10703,7 @@ function LocaleInputText({
|
|
|
10628
10703
|
// src/components/locale/locale-input-textarea.tsx
|
|
10629
10704
|
import { IconTextRecognition as IconTextRecognition3 } from "@tabler/icons-react";
|
|
10630
10705
|
import { useState as useState24 } from "react";
|
|
10631
|
-
import { jsx as jsx90, jsxs as
|
|
10706
|
+
import { jsx as jsx90, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
10632
10707
|
function LocaleInputTextarea({
|
|
10633
10708
|
label,
|
|
10634
10709
|
required,
|
|
@@ -10646,13 +10721,13 @@ function LocaleInputTextarea({
|
|
|
10646
10721
|
(lang) => lang.value !== defaultLanguage
|
|
10647
10722
|
);
|
|
10648
10723
|
const defaultError = errors?.[field]?.[defaultLanguage];
|
|
10649
|
-
return /* @__PURE__ */
|
|
10650
|
-
label && /* @__PURE__ */
|
|
10724
|
+
return /* @__PURE__ */ jsxs62(Field, { className: cn("cn-locale-input", className), children: [
|
|
10725
|
+
label && /* @__PURE__ */ jsxs62(FieldLabel, { children: [
|
|
10651
10726
|
label,
|
|
10652
10727
|
required && /* @__PURE__ */ jsx90("span", { className: "text-destructive ml-1", children: "*" })
|
|
10653
10728
|
] }),
|
|
10654
|
-
/* @__PURE__ */
|
|
10655
|
-
/* @__PURE__ */
|
|
10729
|
+
/* @__PURE__ */ jsxs62(FieldContent, { children: [
|
|
10730
|
+
/* @__PURE__ */ jsxs62("div", { className: "relative", children: [
|
|
10656
10731
|
/* @__PURE__ */ jsx90(
|
|
10657
10732
|
Textarea,
|
|
10658
10733
|
{
|
|
@@ -10676,9 +10751,9 @@ function LocaleInputTextarea({
|
|
|
10676
10751
|
)
|
|
10677
10752
|
] }),
|
|
10678
10753
|
/* @__PURE__ */ jsx90(FieldError, { errors: defaultError ? [defaultError] : void 0 }),
|
|
10679
|
-
expanded && otherLanguages.length > 0 && /* @__PURE__ */ jsx90("div", { className: "cn-locale-input-expanded", children: otherLanguages.map((lang) => /* @__PURE__ */ jsx90("div", { className: "space-y-1", children: /* @__PURE__ */
|
|
10754
|
+
expanded && otherLanguages.length > 0 && /* @__PURE__ */ jsx90("div", { className: "cn-locale-input-expanded", children: otherLanguages.map((lang) => /* @__PURE__ */ jsx90("div", { className: "space-y-1", children: /* @__PURE__ */ jsxs62("div", { className: "flex items-start gap-2", children: [
|
|
10680
10755
|
/* @__PURE__ */ jsx90(FieldLabel, { className: "min-w-[60px] text-xs text-muted-foreground mt-2", children: lang.label }),
|
|
10681
|
-
/* @__PURE__ */
|
|
10756
|
+
/* @__PURE__ */ jsxs62("div", { className: "flex-1 space-y-1", children: [
|
|
10682
10757
|
/* @__PURE__ */ jsx90(
|
|
10683
10758
|
Textarea,
|
|
10684
10759
|
{
|
|
@@ -10736,7 +10811,7 @@ function LocaleText({ text, defaultLocale }) {
|
|
|
10736
10811
|
}
|
|
10737
10812
|
|
|
10738
10813
|
// src/components/mesob-logo.tsx
|
|
10739
|
-
import { jsx as jsx93, jsxs as
|
|
10814
|
+
import { jsx as jsx93, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
10740
10815
|
function MesobLogo({
|
|
10741
10816
|
width,
|
|
10742
10817
|
height,
|
|
@@ -10745,7 +10820,7 @@ function MesobLogo({
|
|
|
10745
10820
|
iconColor = "#fff",
|
|
10746
10821
|
className
|
|
10747
10822
|
}) {
|
|
10748
|
-
return /* @__PURE__ */
|
|
10823
|
+
return /* @__PURE__ */ jsxs63(
|
|
10749
10824
|
"svg",
|
|
10750
10825
|
{
|
|
10751
10826
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -10816,7 +10891,7 @@ function MesobLogo({
|
|
|
10816
10891
|
import { IconX as IconX9 } from "@tabler/icons-react";
|
|
10817
10892
|
import { cva as cva9 } from "class-variance-authority";
|
|
10818
10893
|
import { useState as useState25 } from "react";
|
|
10819
|
-
import { jsx as jsx94, jsxs as
|
|
10894
|
+
import { jsx as jsx94, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
10820
10895
|
var modalContentVariants = cva9(
|
|
10821
10896
|
cn(
|
|
10822
10897
|
"p-0 gap-0 flex flex-col overflow-hidden",
|
|
@@ -10885,7 +10960,7 @@ function ModalContent({
|
|
|
10885
10960
|
);
|
|
10886
10961
|
}
|
|
10887
10962
|
function ModalHeader({ className, children, ...props }) {
|
|
10888
|
-
return /* @__PURE__ */
|
|
10963
|
+
return /* @__PURE__ */ jsxs64(
|
|
10889
10964
|
DialogHeader,
|
|
10890
10965
|
{
|
|
10891
10966
|
"data-slot": "modal-header",
|
|
@@ -10987,9 +11062,9 @@ function Modal({
|
|
|
10987
11062
|
};
|
|
10988
11063
|
const shouldShowHeader = title || subtitle;
|
|
10989
11064
|
const shouldShowFooter = footer !== void 0;
|
|
10990
|
-
return /* @__PURE__ */
|
|
11065
|
+
return /* @__PURE__ */ jsxs64(ModalRoot, { open: currentOpen, onOpenChange: handleOpenChange, ...props, children: [
|
|
10991
11066
|
trigger && /* @__PURE__ */ jsx94(ModalTrigger, { render: trigger, ...triggerProps }),
|
|
10992
|
-
/* @__PURE__ */
|
|
11067
|
+
/* @__PURE__ */ jsxs64(
|
|
10993
11068
|
ModalContent,
|
|
10994
11069
|
{
|
|
10995
11070
|
size,
|
|
@@ -10997,7 +11072,7 @@ function Modal({
|
|
|
10997
11072
|
className: contentProps?.className,
|
|
10998
11073
|
...contentProps,
|
|
10999
11074
|
children: [
|
|
11000
|
-
shouldShowHeader && /* @__PURE__ */
|
|
11075
|
+
shouldShowHeader && /* @__PURE__ */ jsxs64(ModalHeader, { className: headerProps?.className, ...headerProps, children: [
|
|
11001
11076
|
title && /* @__PURE__ */ jsx94(ModalTitle, { children: title }),
|
|
11002
11077
|
subtitle && /* @__PURE__ */ jsx94(ModalSubtitle, { children: subtitle })
|
|
11003
11078
|
] }),
|
|
@@ -11010,7 +11085,7 @@ function Modal({
|
|
|
11010
11085
|
}
|
|
11011
11086
|
|
|
11012
11087
|
// src/components/powered-by.tsx
|
|
11013
|
-
import { jsx as jsx95, jsxs as
|
|
11088
|
+
import { jsx as jsx95, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
11014
11089
|
function PoweredBy({ className }) {
|
|
11015
11090
|
return /* @__PURE__ */ jsx95(
|
|
11016
11091
|
"div",
|
|
@@ -11019,7 +11094,7 @@ function PoweredBy({ className }) {
|
|
|
11019
11094
|
"flex flex-col items-center gap-1.5 py-3 text-center",
|
|
11020
11095
|
className
|
|
11021
11096
|
),
|
|
11022
|
-
children: /* @__PURE__ */
|
|
11097
|
+
children: /* @__PURE__ */ jsxs65(
|
|
11023
11098
|
"a",
|
|
11024
11099
|
{
|
|
11025
11100
|
href: "https://mesob.com",
|
|
@@ -11063,11 +11138,11 @@ function RichTextDisplay({ content, className }) {
|
|
|
11063
11138
|
// src/components/theme-toggle.tsx
|
|
11064
11139
|
import { IconMoon, IconSun } from "@tabler/icons-react";
|
|
11065
11140
|
import { useTheme as useTheme2 } from "next-themes";
|
|
11066
|
-
import { jsx as jsx97, jsxs as
|
|
11141
|
+
import { jsx as jsx97, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
11067
11142
|
function ThemeToggle({ className }) {
|
|
11068
11143
|
const { resolvedTheme, setTheme, theme } = useTheme2();
|
|
11069
11144
|
const isDark = (theme ?? resolvedTheme) === "dark";
|
|
11070
|
-
return /* @__PURE__ */
|
|
11145
|
+
return /* @__PURE__ */ jsxs66(
|
|
11071
11146
|
Button,
|
|
11072
11147
|
{
|
|
11073
11148
|
variant: "ghost",
|
|
@@ -11538,14 +11613,14 @@ function useDateInput(props) {
|
|
|
11538
11613
|
}
|
|
11539
11614
|
|
|
11540
11615
|
// src/components/date-time/date-input/date-input.tsx
|
|
11541
|
-
import { jsx as jsx99, jsxs as
|
|
11616
|
+
import { jsx as jsx99, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
11542
11617
|
var SIZE_CLASS = {
|
|
11543
11618
|
sm: "[&_[data-slot=input-group-control]]:min-h-8 [&_[data-slot=input-group-control]]:text-xs",
|
|
11544
11619
|
md: "[&_[data-slot=input-group-control]]:min-h-10 [&_[data-slot=input-group-control]]:text-sm",
|
|
11545
11620
|
lg: "[&_[data-slot=input-group-control]]:min-h-11 [&_[data-slot=input-group-control]]:text-sm",
|
|
11546
11621
|
xl: "[&_[data-slot=input-group-control]]:min-h-12 [&_[data-slot=input-group-control]]:text-base"
|
|
11547
11622
|
};
|
|
11548
|
-
var CalendarIcon = /* @__PURE__ */
|
|
11623
|
+
var CalendarIcon = /* @__PURE__ */ jsxs67("svg", { className: "size-4", fill: "none", viewBox: "0 0 24 24", "aria-hidden": true, children: [
|
|
11549
11624
|
/* @__PURE__ */ jsx99("title", { className: "sr-only", children: "Calendar" }),
|
|
11550
11625
|
/* @__PURE__ */ jsx99(
|
|
11551
11626
|
"path",
|
|
@@ -11558,7 +11633,7 @@ var CalendarIcon = /* @__PURE__ */ jsxs66("svg", { className: "size-4", fill: "n
|
|
|
11558
11633
|
}
|
|
11559
11634
|
)
|
|
11560
11635
|
] });
|
|
11561
|
-
var CloseIcon = /* @__PURE__ */
|
|
11636
|
+
var CloseIcon = /* @__PURE__ */ jsxs67("svg", { className: "size-3.5", fill: "none", viewBox: "0 0 24 24", "aria-hidden": true, children: [
|
|
11562
11637
|
/* @__PURE__ */ jsx99("title", { className: "sr-only", children: "Clear" }),
|
|
11563
11638
|
/* @__PURE__ */ jsx99(
|
|
11564
11639
|
"path",
|
|
@@ -11635,8 +11710,8 @@ var DateInput = forwardRef4(
|
|
|
11635
11710
|
disabled,
|
|
11636
11711
|
className,
|
|
11637
11712
|
labelProps: { htmlFor: inputId },
|
|
11638
|
-
children: /* @__PURE__ */
|
|
11639
|
-
/* @__PURE__ */ jsx99("div", { ref: state2.triggerRef, className: "w-full", children: /* @__PURE__ */
|
|
11713
|
+
children: /* @__PURE__ */ jsxs67(Popover, { open: state2.open, onOpenChange: state2.handleOpenChange, children: [
|
|
11714
|
+
/* @__PURE__ */ jsx99("div", { ref: state2.triggerRef, className: "w-full", children: /* @__PURE__ */ jsxs67(
|
|
11640
11715
|
InputGroup,
|
|
11641
11716
|
{
|
|
11642
11717
|
disabled,
|
|
@@ -11671,7 +11746,7 @@ var DateInput = forwardRef4(
|
|
|
11671
11746
|
"aria-label": ariaLabel
|
|
11672
11747
|
}
|
|
11673
11748
|
),
|
|
11674
|
-
/* @__PURE__ */
|
|
11749
|
+
/* @__PURE__ */ jsxs67("span", { className: "mr-1 flex items-center gap-0.5 pr-0.5", children: [
|
|
11675
11750
|
state2.showClear ? /* @__PURE__ */ jsx99(
|
|
11676
11751
|
InputGroupButton,
|
|
11677
11752
|
{
|
|
@@ -11762,7 +11837,7 @@ import { forwardRef as forwardRef6 } from "react";
|
|
|
11762
11837
|
|
|
11763
11838
|
// src/components/date-time/datetime-picker/trigger-button.tsx
|
|
11764
11839
|
import { forwardRef as forwardRef5 } from "react";
|
|
11765
|
-
import { jsx as jsx100, jsxs as
|
|
11840
|
+
import { jsx as jsx100, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
11766
11841
|
var DateTimeTriggerButton = forwardRef5(function DateTimeTriggerButton2({
|
|
11767
11842
|
displayValue,
|
|
11768
11843
|
placeholder,
|
|
@@ -11777,7 +11852,7 @@ var DateTimeTriggerButton = forwardRef5(function DateTimeTriggerButton2({
|
|
|
11777
11852
|
"aria-label": ariaLabel
|
|
11778
11853
|
}, ref) {
|
|
11779
11854
|
const filled = variant === "filled";
|
|
11780
|
-
return /* @__PURE__ */
|
|
11855
|
+
return /* @__PURE__ */ jsxs68(
|
|
11781
11856
|
"button",
|
|
11782
11857
|
{
|
|
11783
11858
|
ref,
|
|
@@ -11814,7 +11889,7 @@ var DateTimeTriggerButton = forwardRef5(function DateTimeTriggerButton2({
|
|
|
11814
11889
|
});
|
|
11815
11890
|
|
|
11816
11891
|
// src/components/date-time/datetime-picker/input-shell.tsx
|
|
11817
|
-
import { jsx as jsx101, jsxs as
|
|
11892
|
+
import { jsx as jsx101, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
11818
11893
|
function DateInputShell({
|
|
11819
11894
|
label,
|
|
11820
11895
|
placeholder,
|
|
@@ -11861,14 +11936,26 @@ function DateInputShell({
|
|
|
11861
11936
|
"aria-label": ariaLabel
|
|
11862
11937
|
}
|
|
11863
11938
|
);
|
|
11864
|
-
const wrapper = /* @__PURE__ */
|
|
11865
|
-
label ? /* @__PURE__ */
|
|
11939
|
+
const wrapper = /* @__PURE__ */ jsxs69("div", { className: cn("relative inline-block w-full", className), children: [
|
|
11940
|
+
label ? /* @__PURE__ */ jsxs69("label", { className: "mb-1.5 block text-sm font-semibold text-foreground", children: [
|
|
11866
11941
|
label,
|
|
11867
11942
|
required || withAsterisk ? /* @__PURE__ */ jsx101("span", { className: "ml-0.5 text-destructive", "aria-hidden": true, children: "*" }) : null
|
|
11868
11943
|
] }) : null,
|
|
11869
11944
|
description ? /* @__PURE__ */ jsx101("p", { className: "mb-1.5 text-xs text-muted-foreground", children: description }) : null,
|
|
11870
|
-
/* @__PURE__ */
|
|
11871
|
-
dropdownType === "modal" ? /* @__PURE__ */ jsx101(
|
|
11945
|
+
/* @__PURE__ */ jsxs69("div", { ref: triggerRef, className: "relative", children: [
|
|
11946
|
+
dropdownType === "modal" ? /* @__PURE__ */ jsx101(
|
|
11947
|
+
DialogTrigger,
|
|
11948
|
+
{
|
|
11949
|
+
render: /* @__PURE__ */ jsx101("div", { "data-slot": "dialog-trigger", className: "block w-full" }),
|
|
11950
|
+
children: triggerButton
|
|
11951
|
+
}
|
|
11952
|
+
) : /* @__PURE__ */ jsx101(
|
|
11953
|
+
PopoverTrigger,
|
|
11954
|
+
{
|
|
11955
|
+
render: /* @__PURE__ */ jsx101("div", { "data-slot": "popover-trigger", className: "block w-full" }),
|
|
11956
|
+
children: triggerButton
|
|
11957
|
+
}
|
|
11958
|
+
),
|
|
11872
11959
|
showClear && /* @__PURE__ */ jsx101(
|
|
11873
11960
|
"button",
|
|
11874
11961
|
{
|
|
@@ -11879,7 +11966,7 @@ function DateInputShell({
|
|
|
11879
11966
|
},
|
|
11880
11967
|
className: "absolute right-2.5 top-1/2 -translate-y-1/2 rounded-sm p-0.5 text-muted-foreground hover:text-foreground",
|
|
11881
11968
|
"aria-label": "Clear",
|
|
11882
|
-
children: /* @__PURE__ */
|
|
11969
|
+
children: /* @__PURE__ */ jsxs69(
|
|
11883
11970
|
"svg",
|
|
11884
11971
|
{
|
|
11885
11972
|
className: "size-3.5",
|
|
@@ -11905,7 +11992,7 @@ function DateInputShell({
|
|
|
11905
11992
|
)
|
|
11906
11993
|
] }),
|
|
11907
11994
|
error ? /* @__PURE__ */ jsx101("p", { className: "mt-1.5 text-xs text-destructive", children: error }) : null,
|
|
11908
|
-
dropdownType === "modal" ? /* @__PURE__ */
|
|
11995
|
+
dropdownType === "modal" ? /* @__PURE__ */ jsxs69(
|
|
11909
11996
|
DialogContent,
|
|
11910
11997
|
{
|
|
11911
11998
|
className: cn(
|
|
@@ -12126,7 +12213,7 @@ function DateCalendar(props) {
|
|
|
12126
12213
|
import { forwardRef as forwardRef7 } from "react";
|
|
12127
12214
|
|
|
12128
12215
|
// src/components/date-time/datetime-picker/dropdown-content.tsx
|
|
12129
|
-
import { Fragment as Fragment18, jsx as jsx104, jsxs as
|
|
12216
|
+
import { Fragment as Fragment18, jsx as jsx104, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
12130
12217
|
var ChevronLeft2 = /* @__PURE__ */ jsx104(
|
|
12131
12218
|
"svg",
|
|
12132
12219
|
{
|
|
@@ -12176,9 +12263,9 @@ function TimeRow({
|
|
|
12176
12263
|
const hourVal = String(hour12);
|
|
12177
12264
|
const minVal = timeM ? pad2(Number.parseInt(timeM, 10)) : "00";
|
|
12178
12265
|
const secVal = timeS ? pad2(Number.parseInt(timeS, 10)) : "00";
|
|
12179
|
-
return /* @__PURE__ */
|
|
12266
|
+
return /* @__PURE__ */ jsxs70("fieldset", { className: "mt-2 flex w-fit flex-wrap items-center gap-2 rounded-lg border border-input bg-muted/30 px-3 py-2.5", children: [
|
|
12180
12267
|
/* @__PURE__ */ jsx104("legend", { className: "sr-only", children: "Time" }),
|
|
12181
|
-
/* @__PURE__ */
|
|
12268
|
+
/* @__PURE__ */ jsxs70(Select, { value: hourVal, onValueChange: (v) => setHour12(Number(v), ampm), children: [
|
|
12182
12269
|
/* @__PURE__ */ jsx104(
|
|
12183
12270
|
SelectTrigger,
|
|
12184
12271
|
{
|
|
@@ -12191,7 +12278,7 @@ function TimeRow({
|
|
|
12191
12278
|
/* @__PURE__ */ jsx104(SelectContent, { ...TIME_SELECT_CONTENT_PROPS, children: HOURS_12.map((h) => /* @__PURE__ */ jsx104(SelectItem, { value: String(h), children: pad2(h) }, h)) })
|
|
12192
12279
|
] }),
|
|
12193
12280
|
/* @__PURE__ */ jsx104("span", { className: "text-muted-foreground", children: ":" }),
|
|
12194
|
-
/* @__PURE__ */
|
|
12281
|
+
/* @__PURE__ */ jsxs70(
|
|
12195
12282
|
Select,
|
|
12196
12283
|
{
|
|
12197
12284
|
value: minVal,
|
|
@@ -12212,9 +12299,9 @@ function TimeRow({
|
|
|
12212
12299
|
]
|
|
12213
12300
|
}
|
|
12214
12301
|
),
|
|
12215
|
-
withSeconds && /* @__PURE__ */
|
|
12302
|
+
withSeconds && /* @__PURE__ */ jsxs70(Fragment18, { children: [
|
|
12216
12303
|
/* @__PURE__ */ jsx104("span", { className: "text-muted-foreground", children: ":" }),
|
|
12217
|
-
/* @__PURE__ */
|
|
12304
|
+
/* @__PURE__ */ jsxs70(
|
|
12218
12305
|
Select,
|
|
12219
12306
|
{
|
|
12220
12307
|
value: secVal,
|
|
@@ -12286,7 +12373,7 @@ function DateTimeDropdownContent({
|
|
|
12286
12373
|
hasPresets
|
|
12287
12374
|
}) {
|
|
12288
12375
|
const monthShortList = calendarType === "EC" ? EC_MONTHS_SHORT : MONTHS_SHORT;
|
|
12289
|
-
return /* @__PURE__ */
|
|
12376
|
+
return /* @__PURE__ */ jsxs70("div", { className: "flex", children: [
|
|
12290
12377
|
hasPresets && presets?.length ? /* @__PURE__ */ jsx104("div", { className: "flex flex-col gap-0.5 border-r border-border py-2 pl-2 pr-1", children: presets.map((preset) => /* @__PURE__ */ jsx104(
|
|
12291
12378
|
"button",
|
|
12292
12379
|
{
|
|
@@ -12297,7 +12384,7 @@ function DateTimeDropdownContent({
|
|
|
12297
12384
|
},
|
|
12298
12385
|
preset.label
|
|
12299
12386
|
)) }) : null,
|
|
12300
|
-
/* @__PURE__ */
|
|
12387
|
+
/* @__PURE__ */ jsxs70(
|
|
12301
12388
|
"div",
|
|
12302
12389
|
{
|
|
12303
12390
|
className: cn(
|
|
@@ -12307,7 +12394,7 @@ function DateTimeDropdownContent({
|
|
|
12307
12394
|
hasPresets && presets?.length && "flex-1"
|
|
12308
12395
|
),
|
|
12309
12396
|
children: [
|
|
12310
|
-
/* @__PURE__ */
|
|
12397
|
+
/* @__PURE__ */ jsxs70("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
12311
12398
|
/* @__PURE__ */ jsx104(
|
|
12312
12399
|
"button",
|
|
12313
12400
|
{
|
|
@@ -12338,7 +12425,7 @@ function DateTimeDropdownContent({
|
|
|
12338
12425
|
}
|
|
12339
12426
|
)
|
|
12340
12427
|
] }),
|
|
12341
|
-
view === "days" && /* @__PURE__ */
|
|
12428
|
+
view === "days" && /* @__PURE__ */ jsxs70(Fragment18, { children: [
|
|
12342
12429
|
/* @__PURE__ */ jsx104("div", { className: "mb-0.5 grid grid-cols-7", children: WEEKDAYS.map((wd, i) => /* @__PURE__ */ jsx104(
|
|
12343
12430
|
"div",
|
|
12344
12431
|
{
|
|
@@ -12435,8 +12522,8 @@ function DateTimeDropdownContent({
|
|
|
12435
12522
|
onTimeSChange
|
|
12436
12523
|
}
|
|
12437
12524
|
),
|
|
12438
|
-
/* @__PURE__ */
|
|
12439
|
-
/* @__PURE__ */
|
|
12525
|
+
/* @__PURE__ */ jsxs70("div", { className: "mt-2 flex items-center justify-between gap-2 border-t border-border pt-2", children: [
|
|
12526
|
+
/* @__PURE__ */ jsxs70("div", { className: "flex gap-1", children: [
|
|
12440
12527
|
/* @__PURE__ */ jsx104(
|
|
12441
12528
|
"button",
|
|
12442
12529
|
{
|
|
@@ -13079,7 +13166,7 @@ function TimeGrid({
|
|
|
13079
13166
|
|
|
13080
13167
|
// src/components/date-time/datetime-picker/time-input.tsx
|
|
13081
13168
|
import { useCallback as useCallback13, useEffect as useEffect18, useState as useState30 } from "react";
|
|
13082
|
-
import { Fragment as Fragment19, jsx as jsx108, jsxs as
|
|
13169
|
+
import { Fragment as Fragment19, jsx as jsx108, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
13083
13170
|
function TimeInput({
|
|
13084
13171
|
value,
|
|
13085
13172
|
onChange,
|
|
@@ -13145,7 +13232,7 @@ function TimeInput({
|
|
|
13145
13232
|
}
|
|
13146
13233
|
commit(nh || h, nm || m, withSeconds ? ns || s : "00");
|
|
13147
13234
|
}, [h, m, s, commit, withSeconds]);
|
|
13148
|
-
return /* @__PURE__ */
|
|
13235
|
+
return /* @__PURE__ */ jsxs71(
|
|
13149
13236
|
"fieldset",
|
|
13150
13237
|
{
|
|
13151
13238
|
className: cn(
|
|
@@ -13187,7 +13274,7 @@ function TimeInput({
|
|
|
13187
13274
|
className: "w-7 shrink-0 border-0 bg-transparent text-center text-sm text-foreground outline-none placeholder:text-muted-foreground"
|
|
13188
13275
|
}
|
|
13189
13276
|
),
|
|
13190
|
-
withSeconds && /* @__PURE__ */
|
|
13277
|
+
withSeconds && /* @__PURE__ */ jsxs71(Fragment19, { children: [
|
|
13191
13278
|
/* @__PURE__ */ jsx108("span", { className: "select-none text-sm text-muted-foreground", children: ":" }),
|
|
13192
13279
|
/* @__PURE__ */ jsx108(
|
|
13193
13280
|
"input",
|
|
@@ -13331,7 +13418,7 @@ function useMiniCalendar(props) {
|
|
|
13331
13418
|
}
|
|
13332
13419
|
|
|
13333
13420
|
// src/components/date-time/mini-calendar/mini-calendar.tsx
|
|
13334
|
-
import { jsx as jsx110, jsxs as
|
|
13421
|
+
import { jsx as jsx110, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
13335
13422
|
var ChevronLeft3 = /* @__PURE__ */ jsx110(
|
|
13336
13423
|
"svg",
|
|
13337
13424
|
{
|
|
@@ -13378,7 +13465,7 @@ function MiniCalendar({
|
|
|
13378
13465
|
type: _nextType,
|
|
13379
13466
|
...nextSpread
|
|
13380
13467
|
} = nextControlProps ?? {};
|
|
13381
|
-
return /* @__PURE__ */
|
|
13468
|
+
return /* @__PURE__ */ jsxs72(
|
|
13382
13469
|
"div",
|
|
13383
13470
|
{
|
|
13384
13471
|
className: cn("flex w-full max-w-full items-stretch gap-0.5", className),
|
|
@@ -13424,7 +13511,7 @@ function MiniCalendar({
|
|
|
13424
13511
|
...userRest
|
|
13425
13512
|
} = user;
|
|
13426
13513
|
const disabled = dayDisabled || !!userDisabled;
|
|
13427
|
-
return /* @__PURE__ */
|
|
13514
|
+
return /* @__PURE__ */ jsxs72(
|
|
13428
13515
|
"button",
|
|
13429
13516
|
{
|
|
13430
13517
|
type: "button",
|
|
@@ -13498,7 +13585,7 @@ function MiniCalendar({
|
|
|
13498
13585
|
}
|
|
13499
13586
|
|
|
13500
13587
|
// src/components/date-time/month-picker/picker-content.tsx
|
|
13501
|
-
import { jsx as jsx111, jsxs as
|
|
13588
|
+
import { jsx as jsx111, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
13502
13589
|
var ChevronLeft4 = /* @__PURE__ */ jsx111(
|
|
13503
13590
|
"svg",
|
|
13504
13591
|
{
|
|
@@ -13545,8 +13632,8 @@ function MonthPickerContent({
|
|
|
13545
13632
|
isRangeEnd
|
|
13546
13633
|
}) {
|
|
13547
13634
|
const monthList = calendarType === "EC" ? EC_MONTHS_SHORT : MONTHS_SHORT;
|
|
13548
|
-
return /* @__PURE__ */
|
|
13549
|
-
/* @__PURE__ */
|
|
13635
|
+
return /* @__PURE__ */ jsxs73("div", { className: "min-w-[22rem] p-3", children: [
|
|
13636
|
+
/* @__PURE__ */ jsxs73("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
13550
13637
|
/* @__PURE__ */ jsx111(
|
|
13551
13638
|
"button",
|
|
13552
13639
|
{
|
|
@@ -13590,7 +13677,7 @@ function MonthPickerContent({
|
|
|
13590
13677
|
const showStrip = hasRange && (inRange || (rStart || rEnd) && !(rStart && rEnd));
|
|
13591
13678
|
return (
|
|
13592
13679
|
/* biome-ignore lint/a11y/useSemanticElements: calendar cell, not a form fieldset */
|
|
13593
|
-
/* @__PURE__ */
|
|
13680
|
+
/* @__PURE__ */ jsxs73(
|
|
13594
13681
|
"div",
|
|
13595
13682
|
{
|
|
13596
13683
|
role: "group",
|
|
@@ -13659,7 +13746,7 @@ function MonthPickerContent({
|
|
|
13659
13746
|
y
|
|
13660
13747
|
);
|
|
13661
13748
|
}) }),
|
|
13662
|
-
/* @__PURE__ */
|
|
13749
|
+
/* @__PURE__ */ jsxs73("div", { className: "mt-2 flex items-center justify-end gap-1 border-t border-border pt-2", children: [
|
|
13663
13750
|
/* @__PURE__ */ jsx111(
|
|
13664
13751
|
"button",
|
|
13665
13752
|
{
|
|
@@ -14224,8 +14311,8 @@ var MonthPickerInput = forwardRef8(function MonthPickerInput2(props, ref) {
|
|
|
14224
14311
|
import { forwardRef as forwardRef9 } from "react";
|
|
14225
14312
|
|
|
14226
14313
|
// src/components/date-time/time-picker/time-picker-content.tsx
|
|
14227
|
-
import { Fragment as Fragment20, jsx as jsx114, jsxs as
|
|
14228
|
-
var CheckIcon = /* @__PURE__ */
|
|
14314
|
+
import { Fragment as Fragment20, jsx as jsx114, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
14315
|
+
var CheckIcon = /* @__PURE__ */ jsxs74(
|
|
14229
14316
|
"svg",
|
|
14230
14317
|
{
|
|
14231
14318
|
className: "size-4",
|
|
@@ -14253,8 +14340,8 @@ function TimePickerContent({
|
|
|
14253
14340
|
onTimeSChange,
|
|
14254
14341
|
onConfirm
|
|
14255
14342
|
}) {
|
|
14256
|
-
return /* @__PURE__ */ jsx114("div", { className: "p-3", children: /* @__PURE__ */
|
|
14257
|
-
/* @__PURE__ */
|
|
14343
|
+
return /* @__PURE__ */ jsx114("div", { className: "p-3", children: /* @__PURE__ */ jsxs74("div", { className: "flex items-center gap-2", children: [
|
|
14344
|
+
/* @__PURE__ */ jsxs74("fieldset", { className: "flex flex-1 flex-row items-center gap-0.5 rounded border border-solid border-input bg-background px-2.5 py-0", children: [
|
|
14258
14345
|
/* @__PURE__ */ jsx114("legend", { className: "sr-only", children: "Time" }),
|
|
14259
14346
|
/* @__PURE__ */ jsx114(
|
|
14260
14347
|
"input",
|
|
@@ -14291,7 +14378,7 @@ function TimePickerContent({
|
|
|
14291
14378
|
className: "w-7 shrink-0 border-0 bg-transparent text-center text-sm text-foreground outline-none placeholder:text-muted-foreground"
|
|
14292
14379
|
}
|
|
14293
14380
|
),
|
|
14294
|
-
withSeconds && /* @__PURE__ */
|
|
14381
|
+
withSeconds && /* @__PURE__ */ jsxs74(Fragment20, { children: [
|
|
14295
14382
|
/* @__PURE__ */ jsx114("span", { className: "select-none px-1 text-sm text-muted-foreground", children: ":" }),
|
|
14296
14383
|
/* @__PURE__ */ jsx114(
|
|
14297
14384
|
"input",
|
|
@@ -14520,7 +14607,7 @@ var TimePicker = forwardRef9(
|
|
|
14520
14607
|
);
|
|
14521
14608
|
|
|
14522
14609
|
// src/components/date-time/year-picker/picker-content.tsx
|
|
14523
|
-
import { jsx as jsx116, jsxs as
|
|
14610
|
+
import { jsx as jsx116, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
14524
14611
|
var ChevronLeft5 = /* @__PURE__ */ jsx116(
|
|
14525
14612
|
"svg",
|
|
14526
14613
|
{
|
|
@@ -14559,8 +14646,8 @@ function YearPickerContent({
|
|
|
14559
14646
|
isRangeStart,
|
|
14560
14647
|
isRangeEnd
|
|
14561
14648
|
}) {
|
|
14562
|
-
return /* @__PURE__ */
|
|
14563
|
-
/* @__PURE__ */
|
|
14649
|
+
return /* @__PURE__ */ jsxs75("div", { className: "min-w-[22rem] p-3", children: [
|
|
14650
|
+
/* @__PURE__ */ jsxs75("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
14564
14651
|
/* @__PURE__ */ jsx116(
|
|
14565
14652
|
"button",
|
|
14566
14653
|
{
|
|
@@ -14620,7 +14707,7 @@ function YearPickerContent({
|
|
|
14620
14707
|
})
|
|
14621
14708
|
}
|
|
14622
14709
|
),
|
|
14623
|
-
/* @__PURE__ */
|
|
14710
|
+
/* @__PURE__ */ jsxs75("div", { className: "mt-2 flex justify-end gap-1 border-t border-border pt-2", children: [
|
|
14624
14711
|
/* @__PURE__ */ jsx116(
|
|
14625
14712
|
"button",
|
|
14626
14713
|
{
|
|
@@ -15039,7 +15126,7 @@ var YearPickerInput = forwardRef10(function YearPickerInput2(props, ref) {
|
|
|
15039
15126
|
// src/components/ui/accordion.tsx
|
|
15040
15127
|
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
|
|
15041
15128
|
import { IconChevronDown as IconChevronDown6, IconChevronUp as IconChevronUp3 } from "@tabler/icons-react";
|
|
15042
|
-
import { Fragment as Fragment21, jsx as jsx119, jsxs as
|
|
15129
|
+
import { Fragment as Fragment21, jsx as jsx119, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
15043
15130
|
var ACCORDION_ROOT_BASE_CN = "flex w-full flex-col";
|
|
15044
15131
|
var ACCORDION_TRIGGER_BASE_CN = cn(
|
|
15045
15132
|
"group/accordion-trigger relative flex flex-1 items-start justify-between",
|
|
@@ -15101,7 +15188,7 @@ function AccordionTrigger({
|
|
|
15101
15188
|
...props
|
|
15102
15189
|
}) {
|
|
15103
15190
|
const showChevron = chevron !== null;
|
|
15104
|
-
return /* @__PURE__ */ jsx119(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */
|
|
15191
|
+
return /* @__PURE__ */ jsx119(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs76(
|
|
15105
15192
|
AccordionPrimitive.Trigger,
|
|
15106
15193
|
{
|
|
15107
15194
|
"data-slot": "accordion-trigger",
|
|
@@ -15112,7 +15199,7 @@ function AccordionTrigger({
|
|
|
15112
15199
|
),
|
|
15113
15200
|
...props,
|
|
15114
15201
|
children: [
|
|
15115
|
-
showChevron && chevronPosition === "left" && /* @__PURE__ */ jsx119("span", { className: "mr-2 inline-flex items-center", children: chevron ?? /* @__PURE__ */
|
|
15202
|
+
showChevron && chevronPosition === "left" && /* @__PURE__ */ jsx119("span", { className: "mr-2 inline-flex items-center", children: chevron ?? /* @__PURE__ */ jsxs76(Fragment21, { children: [
|
|
15116
15203
|
/* @__PURE__ */ jsx119(
|
|
15117
15204
|
IconChevronDown6,
|
|
15118
15205
|
{
|
|
@@ -15130,7 +15217,7 @@ function AccordionTrigger({
|
|
|
15130
15217
|
] }) }),
|
|
15131
15218
|
icon && /* @__PURE__ */ jsx119("span", { className: "text-muted-foreground mr-2 inline-flex shrink-0", children: icon }),
|
|
15132
15219
|
children,
|
|
15133
|
-
showChevron && chevronPosition !== "left" && (chevron ?? /* @__PURE__ */
|
|
15220
|
+
showChevron && chevronPosition !== "left" && (chevron ?? /* @__PURE__ */ jsxs76(Fragment21, { children: [
|
|
15134
15221
|
/* @__PURE__ */ jsx119(
|
|
15135
15222
|
IconChevronDown6,
|
|
15136
15223
|
{
|
|
@@ -15185,7 +15272,7 @@ function AccordionContent({
|
|
|
15185
15272
|
// src/components/ui/action-icon.tsx
|
|
15186
15273
|
import { useRender as useRender5 } from "@base-ui/react/use-render";
|
|
15187
15274
|
import { cva as cva10 } from "class-variance-authority";
|
|
15188
|
-
import { Fragment as Fragment22, jsx as jsx120, jsxs as
|
|
15275
|
+
import { Fragment as Fragment22, jsx as jsx120, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
15189
15276
|
var actionIconVariants = cva10(
|
|
15190
15277
|
"cn-action-icon inline-flex items-center justify-center shrink-0 font-medium transition-colors cursor-pointer select-none leading-none relative overflow-hidden disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed data-[loading]:cursor-not-allowed [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
15191
15278
|
{
|
|
@@ -15256,7 +15343,7 @@ function ActionIcon({
|
|
|
15256
15343
|
color && "bg-[var(--action-icon-color)] hover:bg-[var(--action-icon-color-hover)]",
|
|
15257
15344
|
className
|
|
15258
15345
|
),
|
|
15259
|
-
children: /* @__PURE__ */
|
|
15346
|
+
children: /* @__PURE__ */ jsxs77(Fragment22, { children: [
|
|
15260
15347
|
loading && /* @__PURE__ */ jsx120("span", { className: "cn-action-icon-loader absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx120(
|
|
15261
15348
|
Spinner,
|
|
15262
15349
|
{
|
|
@@ -15451,8 +15538,9 @@ function Anchor({
|
|
|
15451
15538
|
|
|
15452
15539
|
// src/components/ui/angle-slider.tsx
|
|
15453
15540
|
import { useCallback as useCallback20, useRef as useRef13, useState as useState35 } from "react";
|
|
15454
|
-
import { jsx as jsx124, jsxs as
|
|
15541
|
+
import { jsx as jsx124, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
15455
15542
|
var TAU = 2 * Math.PI;
|
|
15543
|
+
var px = (n) => `${Math.round(n * 1e4) / 1e4}px`;
|
|
15456
15544
|
function AngleSlider({
|
|
15457
15545
|
className,
|
|
15458
15546
|
value: valueProp,
|
|
@@ -15531,7 +15619,7 @@ function AngleSlider({
|
|
|
15531
15619
|
const innerInset = Math.max(12, Math.round(size * 0.18));
|
|
15532
15620
|
const thumbX = size / 2 + r * Math.cos(angleRad) - thumbOffset;
|
|
15533
15621
|
const thumbY = size / 2 + r * Math.sin(angleRad) - thumbOffset;
|
|
15534
|
-
return /* @__PURE__ */
|
|
15622
|
+
return /* @__PURE__ */ jsxs78(
|
|
15535
15623
|
"div",
|
|
15536
15624
|
{
|
|
15537
15625
|
ref,
|
|
@@ -15548,11 +15636,11 @@ function AngleSlider({
|
|
|
15548
15636
|
disabled && "pointer-events-none cursor-not-allowed opacity-50",
|
|
15549
15637
|
className
|
|
15550
15638
|
),
|
|
15551
|
-
style: { width: size, height: size },
|
|
15639
|
+
style: { width: px(size), height: px(size) },
|
|
15552
15640
|
onPointerDown: handlePointerDown,
|
|
15553
15641
|
...props,
|
|
15554
15642
|
children: [
|
|
15555
|
-
/* @__PURE__ */
|
|
15643
|
+
/* @__PURE__ */ jsxs78(
|
|
15556
15644
|
"svg",
|
|
15557
15645
|
{
|
|
15558
15646
|
className: "absolute inset-0 size-full",
|
|
@@ -15594,7 +15682,7 @@ function AngleSlider({
|
|
|
15594
15682
|
{
|
|
15595
15683
|
className: "cn-angle-slider-inner absolute",
|
|
15596
15684
|
style: {
|
|
15597
|
-
inset: innerInset
|
|
15685
|
+
inset: px(innerInset)
|
|
15598
15686
|
}
|
|
15599
15687
|
}
|
|
15600
15688
|
),
|
|
@@ -15604,10 +15692,10 @@ function AngleSlider({
|
|
|
15604
15692
|
"data-slot": "angle-slider-thumb",
|
|
15605
15693
|
className: "cn-angle-slider-thumb absolute",
|
|
15606
15694
|
style: {
|
|
15607
|
-
width: thumbSize,
|
|
15608
|
-
height: thumbSize,
|
|
15609
|
-
left: thumbX,
|
|
15610
|
-
top: thumbY
|
|
15695
|
+
width: px(thumbSize),
|
|
15696
|
+
height: px(thumbSize),
|
|
15697
|
+
left: px(thumbX),
|
|
15698
|
+
top: px(thumbY)
|
|
15611
15699
|
}
|
|
15612
15700
|
}
|
|
15613
15701
|
),
|
|
@@ -15622,7 +15710,7 @@ import { useMesob as useMesob8 } from "@mesob/ui/providers";
|
|
|
15622
15710
|
import { IconChevronDown as IconChevronDown7 } from "@tabler/icons-react";
|
|
15623
15711
|
import { motion } from "motion/react";
|
|
15624
15712
|
import { useLayoutEffect as useLayoutEffect2, useMemo as useMemo12, useRef as useRef14, useState as useState36 } from "react";
|
|
15625
|
-
import { jsx as jsx125, jsxs as
|
|
15713
|
+
import { jsx as jsx125, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
15626
15714
|
function AnimatedTabs({
|
|
15627
15715
|
tabs,
|
|
15628
15716
|
activeTab: controlledActiveTab,
|
|
@@ -15802,13 +15890,13 @@ function AnimatedTabs({
|
|
|
15802
15890
|
tab.value
|
|
15803
15891
|
);
|
|
15804
15892
|
};
|
|
15805
|
-
return /* @__PURE__ */
|
|
15893
|
+
return /* @__PURE__ */ jsxs79(
|
|
15806
15894
|
"div",
|
|
15807
15895
|
{
|
|
15808
15896
|
"data-slot": "animated-tabs",
|
|
15809
15897
|
className: cn("cn-animated-tabs flex flex-col", className),
|
|
15810
15898
|
children: [
|
|
15811
|
-
/* @__PURE__ */ jsx125("div", { ref: containerRef, className: "w-full", children: /* @__PURE__ */
|
|
15899
|
+
/* @__PURE__ */ jsx125("div", { ref: containerRef, className: "w-full", children: /* @__PURE__ */ jsxs79(
|
|
15812
15900
|
"div",
|
|
15813
15901
|
{
|
|
15814
15902
|
ref: tabsListRef,
|
|
@@ -15819,8 +15907,8 @@ function AnimatedTabs({
|
|
|
15819
15907
|
const originalIndex = tabs.findIndex((t) => t.value === tab.value);
|
|
15820
15908
|
return renderTab(tab, originalIndex);
|
|
15821
15909
|
}),
|
|
15822
|
-
overflowTabs.length > 0 && /* @__PURE__ */
|
|
15823
|
-
/* @__PURE__ */
|
|
15910
|
+
overflowTabs.length > 0 && /* @__PURE__ */ jsxs79(DropdownMenu, { children: [
|
|
15911
|
+
/* @__PURE__ */ jsxs79(
|
|
15824
15912
|
DropdownMenuTrigger,
|
|
15825
15913
|
{
|
|
15826
15914
|
ref: dropdownTriggerRef,
|
|
@@ -15912,7 +16000,7 @@ function BackgroundImage({
|
|
|
15912
16000
|
// src/components/ui/badge.tsx
|
|
15913
16001
|
import { useRender as useRender6 } from "@base-ui/react/use-render";
|
|
15914
16002
|
import { cva as cva12 } from "class-variance-authority";
|
|
15915
|
-
import { Fragment as Fragment23, jsx as jsx128, jsxs as
|
|
16003
|
+
import { Fragment as Fragment23, jsx as jsx128, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
15916
16004
|
var BADGE_VARIANT_CN = {
|
|
15917
16005
|
default: "cn-badge-variant-default",
|
|
15918
16006
|
secondary: "cn-badge-variant-secondary",
|
|
@@ -15994,7 +16082,7 @@ function Badge({
|
|
|
15994
16082
|
color && "bg-[var(--badge-color)] text-[var(--badge-color-fg)]",
|
|
15995
16083
|
className
|
|
15996
16084
|
),
|
|
15997
|
-
children: /* @__PURE__ */
|
|
16085
|
+
children: /* @__PURE__ */ jsxs80(Fragment23, { children: [
|
|
15998
16086
|
leftSection,
|
|
15999
16087
|
children,
|
|
16000
16088
|
rightSection
|
|
@@ -16360,7 +16448,7 @@ function CalendarDayButton({
|
|
|
16360
16448
|
import { IconChevronLeft as IconChevronLeft3, IconChevronRight as IconChevronRight6 } from "@tabler/icons-react";
|
|
16361
16449
|
import useEmblaCarousel from "embla-carousel-react";
|
|
16362
16450
|
import * as React12 from "react";
|
|
16363
|
-
import { jsx as jsx133, jsxs as
|
|
16451
|
+
import { jsx as jsx133, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
16364
16452
|
var CarouselContext = React12.createContext(null);
|
|
16365
16453
|
function useCarousel() {
|
|
16366
16454
|
const context = React12.useContext(CarouselContext);
|
|
@@ -16501,7 +16589,7 @@ function CarouselPrevious({
|
|
|
16501
16589
|
...props
|
|
16502
16590
|
}) {
|
|
16503
16591
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
16504
|
-
return /* @__PURE__ */
|
|
16592
|
+
return /* @__PURE__ */ jsxs81(
|
|
16505
16593
|
Button,
|
|
16506
16594
|
{
|
|
16507
16595
|
"data-slot": "carousel-previous",
|
|
@@ -16529,7 +16617,7 @@ function CarouselNext({
|
|
|
16529
16617
|
...props
|
|
16530
16618
|
}) {
|
|
16531
16619
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
16532
|
-
return /* @__PURE__ */
|
|
16620
|
+
return /* @__PURE__ */ jsxs81(
|
|
16533
16621
|
Button,
|
|
16534
16622
|
{
|
|
16535
16623
|
"data-slot": "carousel-next",
|
|
@@ -16572,7 +16660,7 @@ function Center({ className, inline, children, ...props }) {
|
|
|
16572
16660
|
// src/components/ui/chart.tsx
|
|
16573
16661
|
import * as React13 from "react";
|
|
16574
16662
|
import * as RechartsPrimitive from "recharts";
|
|
16575
|
-
import { Fragment as Fragment24, jsx as jsx135, jsxs as
|
|
16663
|
+
import { Fragment as Fragment24, jsx as jsx135, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
16576
16664
|
var THEMES = { light: "", dark: ".dark" };
|
|
16577
16665
|
var sanitizeToken = (value) => value.replace(/[^a-zA-Z0-9-_]/g, "");
|
|
16578
16666
|
var ChartContext = React13.createContext(null);
|
|
@@ -16594,7 +16682,7 @@ function ChartContainer({
|
|
|
16594
16682
|
const sanitizedUniqueId = sanitizeToken(uniqueId);
|
|
16595
16683
|
const chartToken = id ? sanitizeToken(id) : sanitizedUniqueId;
|
|
16596
16684
|
const chartId = `chart-${chartToken || sanitizedUniqueId}`;
|
|
16597
|
-
return /* @__PURE__ */ jsx135(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */
|
|
16685
|
+
return /* @__PURE__ */ jsx135(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs82(
|
|
16598
16686
|
"div",
|
|
16599
16687
|
{
|
|
16600
16688
|
"data-slot": "chart",
|
|
@@ -16673,7 +16761,7 @@ function ChartTooltipContent({
|
|
|
16673
16761
|
return null;
|
|
16674
16762
|
}
|
|
16675
16763
|
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
16676
|
-
return /* @__PURE__ */
|
|
16764
|
+
return /* @__PURE__ */ jsxs82(
|
|
16677
16765
|
"div",
|
|
16678
16766
|
{
|
|
16679
16767
|
className: cn(
|
|
@@ -16693,7 +16781,7 @@ function ChartTooltipContent({
|
|
|
16693
16781
|
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
16694
16782
|
indicator === "dot" && "items-center"
|
|
16695
16783
|
),
|
|
16696
|
-
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */
|
|
16784
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs82(Fragment24, { children: [
|
|
16697
16785
|
itemConfig?.icon ? /* @__PURE__ */ jsx135(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx135(
|
|
16698
16786
|
"div",
|
|
16699
16787
|
{
|
|
@@ -16712,7 +16800,7 @@ function ChartTooltipContent({
|
|
|
16712
16800
|
}
|
|
16713
16801
|
}
|
|
16714
16802
|
),
|
|
16715
|
-
/* @__PURE__ */
|
|
16803
|
+
/* @__PURE__ */ jsxs82(
|
|
16716
16804
|
"div",
|
|
16717
16805
|
{
|
|
16718
16806
|
className: cn(
|
|
@@ -16720,7 +16808,7 @@ function ChartTooltipContent({
|
|
|
16720
16808
|
nestLabel ? "items-end" : "items-center"
|
|
16721
16809
|
),
|
|
16722
16810
|
children: [
|
|
16723
|
-
/* @__PURE__ */
|
|
16811
|
+
/* @__PURE__ */ jsxs82("div", { className: "grid gap-1.5", children: [
|
|
16724
16812
|
nestLabel ? tooltipLabel : null,
|
|
16725
16813
|
/* @__PURE__ */ jsx135("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
|
|
16726
16814
|
] }),
|
|
@@ -16760,7 +16848,7 @@ function ChartLegendContent({
|
|
|
16760
16848
|
children: payload.filter((item) => item.type !== "none").map((item) => {
|
|
16761
16849
|
const key = `${nameKey || item.dataKey || "value"}`;
|
|
16762
16850
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
16763
|
-
return /* @__PURE__ */
|
|
16851
|
+
return /* @__PURE__ */ jsxs82(
|
|
16764
16852
|
"div",
|
|
16765
16853
|
{
|
|
16766
16854
|
className: cn(
|
|
@@ -17123,7 +17211,7 @@ function hasAlpha(format) {
|
|
|
17123
17211
|
import { useCallback as useCallback21, useEffect as useEffect24, useRef as useRef16, useState as useState38 } from "react";
|
|
17124
17212
|
|
|
17125
17213
|
// src/components/ui/color-swatch.tsx
|
|
17126
|
-
import { jsx as jsx139, jsxs as
|
|
17214
|
+
import { jsx as jsx139, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
17127
17215
|
var radiusClasses = {
|
|
17128
17216
|
xs: "rounded-[var(--radius-xs)]",
|
|
17129
17217
|
sm: "rounded-[var(--radius-sm)]",
|
|
@@ -17143,7 +17231,7 @@ function ColorSwatch({
|
|
|
17143
17231
|
...props
|
|
17144
17232
|
}) {
|
|
17145
17233
|
const sizeStyle = typeof size === "number" ? { width: size, height: size, minWidth: size, minHeight: size } : { width: size, height: size, minWidth: size, minHeight: size };
|
|
17146
|
-
return /* @__PURE__ */
|
|
17234
|
+
return /* @__PURE__ */ jsxs83(
|
|
17147
17235
|
"div",
|
|
17148
17236
|
{
|
|
17149
17237
|
"data-slot": "color-swatch",
|
|
@@ -17170,7 +17258,7 @@ function ColorSwatch({
|
|
|
17170
17258
|
}
|
|
17171
17259
|
|
|
17172
17260
|
// src/components/ui/color-picker.tsx
|
|
17173
|
-
import { Fragment as Fragment25, jsx as jsx140, jsxs as
|
|
17261
|
+
import { Fragment as Fragment25, jsx as jsx140, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
17174
17262
|
var SATURATION_HEIGHT = {
|
|
17175
17263
|
xs: 80,
|
|
17176
17264
|
sm: 100,
|
|
@@ -17387,7 +17475,7 @@ function ColorPicker({
|
|
|
17387
17475
|
const showAlpha = hasAlpha(format);
|
|
17388
17476
|
const satHeight = SATURATION_HEIGHT[size];
|
|
17389
17477
|
const thumbSize = THUMB_SIZE[size];
|
|
17390
|
-
const pickerEl = /* @__PURE__ */
|
|
17478
|
+
const pickerEl = /* @__PURE__ */ jsxs84(
|
|
17391
17479
|
"div",
|
|
17392
17480
|
{
|
|
17393
17481
|
className: cn(
|
|
@@ -17401,7 +17489,7 @@ function ColorPicker({
|
|
|
17401
17489
|
"--cp-thumb-size": `${thumbSize}px`
|
|
17402
17490
|
},
|
|
17403
17491
|
children: [
|
|
17404
|
-
withPicker && /* @__PURE__ */
|
|
17492
|
+
withPicker && /* @__PURE__ */ jsxs84(Fragment25, { children: [
|
|
17405
17493
|
/* @__PURE__ */ jsx140(
|
|
17406
17494
|
"div",
|
|
17407
17495
|
{
|
|
@@ -17438,7 +17526,7 @@ function ColorPicker({
|
|
|
17438
17526
|
)
|
|
17439
17527
|
}
|
|
17440
17528
|
),
|
|
17441
|
-
/* @__PURE__ */
|
|
17529
|
+
/* @__PURE__ */ jsxs84("div", { className: "flex flex-col gap-1", children: [
|
|
17442
17530
|
hueLabel && /* @__PURE__ */ jsx140("span", { className: "text-muted-foreground text-xs", children: hueLabel }),
|
|
17443
17531
|
/* @__PURE__ */ jsx140(
|
|
17444
17532
|
HueAlphaSlider,
|
|
@@ -17456,9 +17544,9 @@ function ColorPicker({
|
|
|
17456
17544
|
}
|
|
17457
17545
|
)
|
|
17458
17546
|
] }),
|
|
17459
|
-
showAlpha && /* @__PURE__ */
|
|
17547
|
+
showAlpha && /* @__PURE__ */ jsxs84("div", { className: "flex flex-col gap-1", children: [
|
|
17460
17548
|
alphaLabel && /* @__PURE__ */ jsx140("span", { className: "text-muted-foreground text-xs", children: alphaLabel }),
|
|
17461
|
-
/* @__PURE__ */
|
|
17549
|
+
/* @__PURE__ */ jsxs84("div", { className: "relative", children: [
|
|
17462
17550
|
/* @__PURE__ */ jsx140(
|
|
17463
17551
|
"div",
|
|
17464
17552
|
{
|
|
@@ -17485,7 +17573,7 @@ function ColorPicker({
|
|
|
17485
17573
|
)
|
|
17486
17574
|
] })
|
|
17487
17575
|
] }),
|
|
17488
|
-
showAlpha && /* @__PURE__ */
|
|
17576
|
+
showAlpha && /* @__PURE__ */ jsxs84("div", { className: "flex items-center gap-2", children: [
|
|
17489
17577
|
/* @__PURE__ */ jsx140(
|
|
17490
17578
|
ColorSwatch,
|
|
17491
17579
|
{
|
|
@@ -17588,7 +17676,7 @@ function ColorPicker({
|
|
|
17588
17676
|
}
|
|
17589
17677
|
|
|
17590
17678
|
// src/components/ui/color-input.tsx
|
|
17591
|
-
import { jsx as jsx141, jsxs as
|
|
17679
|
+
import { jsx as jsx141, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
17592
17680
|
var sizeClasses3 = {
|
|
17593
17681
|
xs: "h-7 text-xs px-2",
|
|
17594
17682
|
sm: "h-8 text-sm px-2.5",
|
|
@@ -17807,7 +17895,7 @@ var ColorInput = React14.forwardRef(
|
|
|
17807
17895
|
)
|
|
17808
17896
|
}
|
|
17809
17897
|
) : null;
|
|
17810
|
-
const inputEl = /* @__PURE__ */
|
|
17898
|
+
const inputEl = /* @__PURE__ */ jsxs85("div", { ref: anchorRef, className: "relative w-full", children: [
|
|
17811
17899
|
leftSection && /* @__PURE__ */ jsx141("div", { className: "pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 flex items-center", children: leftSection }),
|
|
17812
17900
|
/* @__PURE__ */ jsx141(
|
|
17813
17901
|
Input,
|
|
@@ -17846,7 +17934,7 @@ var ColorInput = React14.forwardRef(
|
|
|
17846
17934
|
),
|
|
17847
17935
|
rightSection && /* @__PURE__ */ jsx141("div", { className: "absolute right-0.5 top-1/2 -translate-y-1/2 flex items-center pointer-events-auto", children: rightSection })
|
|
17848
17936
|
] });
|
|
17849
|
-
const content = !withPopover || popoverDisabled ? inputEl : /* @__PURE__ */
|
|
17937
|
+
const content = !withPopover || popoverDisabled ? inputEl : /* @__PURE__ */ jsxs85(Popover, { open: dropdownOpened, onOpenChange: setDropdownOpened, children: [
|
|
17850
17938
|
inputEl,
|
|
17851
17939
|
/* @__PURE__ */ jsx141(
|
|
17852
17940
|
PopoverContent,
|
|
@@ -17921,7 +18009,7 @@ ColorInput.displayName = "ColorInput";
|
|
|
17921
18009
|
import { Combobox as ComboboxPrimitive } from "@base-ui/react/combobox";
|
|
17922
18010
|
import { IconCheck as IconCheck4, IconChevronDown as IconChevronDown9 } from "@tabler/icons-react";
|
|
17923
18011
|
import { useMemo as useMemo13, useState as useState40 } from "react";
|
|
17924
|
-
import { jsx as jsx142, jsxs as
|
|
18012
|
+
import { jsx as jsx142, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
17925
18013
|
var COMBOBOX_CONTENT_BASE_CN = "cn-menu-target group/combobox-content relative max-h-[min(100dvh,var(--available-height,100dvh))] w-[var(--anchor-width,auto)] max-w-[min(100vw,var(--available-width,100vw))] min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-[var(--anchor-width,auto)]";
|
|
17926
18014
|
var COMBOBOX_ITEM_BASE_CN = "relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
17927
18015
|
function Combobox({
|
|
@@ -17947,7 +18035,7 @@ function Combobox({
|
|
|
17947
18035
|
const q = inputValue.toLowerCase();
|
|
17948
18036
|
return options.filter((o) => o.label.toLowerCase().includes(q));
|
|
17949
18037
|
}, [inputValue, options]);
|
|
17950
|
-
return /* @__PURE__ */
|
|
18038
|
+
return /* @__PURE__ */ jsxs86(
|
|
17951
18039
|
ComboboxPrimitive.Root,
|
|
17952
18040
|
{
|
|
17953
18041
|
"data-slot": "combobox",
|
|
@@ -17958,7 +18046,7 @@ function Combobox({
|
|
|
17958
18046
|
onValueChange: (next) => onValueChange?.(next ?? null),
|
|
17959
18047
|
...props,
|
|
17960
18048
|
children: [
|
|
17961
|
-
/* @__PURE__ */
|
|
18049
|
+
/* @__PURE__ */ jsxs86(InputGroup, { className: cn("w-auto", className), children: [
|
|
17962
18050
|
/* @__PURE__ */ jsx142(
|
|
17963
18051
|
ComboboxPrimitive.Input,
|
|
17964
18052
|
{
|
|
@@ -17971,36 +18059,44 @@ function Combobox({
|
|
|
17971
18059
|
)
|
|
17972
18060
|
}
|
|
17973
18061
|
),
|
|
17974
|
-
/* @__PURE__ */
|
|
17975
|
-
|
|
17976
|
-
|
|
17977
|
-
|
|
17978
|
-
|
|
17979
|
-
|
|
17980
|
-
|
|
17981
|
-
|
|
18062
|
+
/* @__PURE__ */ jsxs86(
|
|
18063
|
+
"div",
|
|
18064
|
+
{
|
|
18065
|
+
"data-slot": "input-group-addon",
|
|
18066
|
+
"data-align": "inline-end",
|
|
18067
|
+
className: "cn-input-group-addon cn-input-group-addon-align-inline-end order-last flex cursor-text items-center justify-center select-none appearance-none border-0 bg-transparent p-0 text-inherit",
|
|
18068
|
+
children: [
|
|
18069
|
+
/* @__PURE__ */ jsx142(
|
|
18070
|
+
InputGroupButton,
|
|
17982
18071
|
{
|
|
17983
|
-
|
|
17984
|
-
|
|
18072
|
+
size: "icon-xs",
|
|
18073
|
+
variant: "ghost",
|
|
18074
|
+
render: /* @__PURE__ */ jsx142(ComboboxPrimitive.Trigger, { "data-slot": "combobox-trigger", children: /* @__PURE__ */ jsx142(
|
|
18075
|
+
IconChevronDown9,
|
|
18076
|
+
{
|
|
18077
|
+
"data-slot": "combobox-trigger-icon",
|
|
18078
|
+
className: "cn-combobox-trigger-icon"
|
|
18079
|
+
}
|
|
18080
|
+
) }),
|
|
18081
|
+
disabled,
|
|
18082
|
+
className: cn(
|
|
18083
|
+
showClear && "group-has-data-[slot=combobox-clear]/input-group:hidden",
|
|
18084
|
+
"data-pressed:bg-transparent"
|
|
18085
|
+
)
|
|
18086
|
+
}
|
|
18087
|
+
),
|
|
18088
|
+
showClear && /* @__PURE__ */ jsx142(
|
|
18089
|
+
ComboboxPrimitive.Clear,
|
|
18090
|
+
{
|
|
18091
|
+
"data-slot": "combobox-clear",
|
|
18092
|
+
render: /* @__PURE__ */ jsx142(InputGroupButton, { variant: "ghost", size: "icon-xs" }),
|
|
18093
|
+
disabled,
|
|
18094
|
+
children: /* @__PURE__ */ jsx142("span", { className: "sr-only", children: "Clear" })
|
|
17985
18095
|
}
|
|
17986
|
-
) }),
|
|
17987
|
-
disabled,
|
|
17988
|
-
className: cn(
|
|
17989
|
-
showClear && "group-has-data-[slot=combobox-clear]/input-group:hidden",
|
|
17990
|
-
"data-pressed:bg-transparent"
|
|
17991
18096
|
)
|
|
17992
|
-
|
|
17993
|
-
|
|
17994
|
-
|
|
17995
|
-
ComboboxPrimitive.Clear,
|
|
17996
|
-
{
|
|
17997
|
-
"data-slot": "combobox-clear",
|
|
17998
|
-
render: /* @__PURE__ */ jsx142(InputGroupButton, { variant: "ghost", size: "icon-xs" }),
|
|
17999
|
-
disabled,
|
|
18000
|
-
children: /* @__PURE__ */ jsx142("span", { className: "sr-only", children: "Clear" })
|
|
18001
|
-
}
|
|
18002
|
-
)
|
|
18003
|
-
] })
|
|
18097
|
+
]
|
|
18098
|
+
}
|
|
18099
|
+
)
|
|
18004
18100
|
] }),
|
|
18005
18101
|
/* @__PURE__ */ jsx142(ComboboxPrimitive.Portal, { children: /* @__PURE__ */ jsx142(
|
|
18006
18102
|
ComboboxPrimitive.Positioner,
|
|
@@ -18027,7 +18123,7 @@ function Combobox({
|
|
|
18027
18123
|
className: "cn-combobox-empty",
|
|
18028
18124
|
children: emptyText
|
|
18029
18125
|
}
|
|
18030
|
-
) : filteredOptions.map((option) => /* @__PURE__ */
|
|
18126
|
+
) : filteredOptions.map((option) => /* @__PURE__ */ jsxs86(
|
|
18031
18127
|
ComboboxPrimitive.Item,
|
|
18032
18128
|
{
|
|
18033
18129
|
value: option.value,
|
|
@@ -18088,7 +18184,7 @@ var containerVariants = cva16("mx-auto w-full", {
|
|
|
18088
18184
|
function Container({
|
|
18089
18185
|
className,
|
|
18090
18186
|
size,
|
|
18091
|
-
px,
|
|
18187
|
+
px: px2,
|
|
18092
18188
|
fluid,
|
|
18093
18189
|
children,
|
|
18094
18190
|
...props
|
|
@@ -18099,7 +18195,7 @@ function Container({
|
|
|
18099
18195
|
"data-slot": "container",
|
|
18100
18196
|
className: cn(
|
|
18101
18197
|
"cn-container min-w-0 transition-[max-width,padding]",
|
|
18102
|
-
containerVariants({ size: fluid ? "fluid" : size, px }),
|
|
18198
|
+
containerVariants({ size: fluid ? "fluid" : size, px: px2 }),
|
|
18103
18199
|
className
|
|
18104
18200
|
),
|
|
18105
18201
|
...props,
|
|
@@ -18111,7 +18207,7 @@ function Container({
|
|
|
18111
18207
|
// src/components/ui/context-menu.tsx
|
|
18112
18208
|
import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu";
|
|
18113
18209
|
import { IconCheck as IconCheck5, IconChevronRight as IconChevronRight7 } from "@tabler/icons-react";
|
|
18114
|
-
import { jsx as jsx144, jsxs as
|
|
18210
|
+
import { jsx as jsx144, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
18115
18211
|
var CONTEXT_MENU_POSITIONER_CN = "isolate z-50 outline-none";
|
|
18116
18212
|
var CONTEXT_MENU_CONTENT_CN = cn(
|
|
18117
18213
|
"cn-context-menu-content cn-context-menu-content-logical cn-menu-target",
|
|
@@ -18180,7 +18276,7 @@ function ContextMenuSubTrigger({
|
|
|
18180
18276
|
children,
|
|
18181
18277
|
...props
|
|
18182
18278
|
}) {
|
|
18183
|
-
return /* @__PURE__ */
|
|
18279
|
+
return /* @__PURE__ */ jsxs87(
|
|
18184
18280
|
ContextMenuPrimitive.SubmenuTrigger,
|
|
18185
18281
|
{
|
|
18186
18282
|
"data-slot": "context-menu-sub-trigger",
|
|
@@ -18292,7 +18388,7 @@ function ContextMenuCheckboxItem({
|
|
|
18292
18388
|
inset,
|
|
18293
18389
|
...props
|
|
18294
18390
|
}) {
|
|
18295
|
-
return /* @__PURE__ */
|
|
18391
|
+
return /* @__PURE__ */ jsxs87(
|
|
18296
18392
|
ContextMenuPrimitive.CheckboxItem,
|
|
18297
18393
|
{
|
|
18298
18394
|
"data-slot": "context-menu-checkbox-item",
|
|
@@ -18317,7 +18413,7 @@ function ContextMenuRadioItem({
|
|
|
18317
18413
|
inset,
|
|
18318
18414
|
...props
|
|
18319
18415
|
}) {
|
|
18320
|
-
return /* @__PURE__ */
|
|
18416
|
+
return /* @__PURE__ */ jsxs87(
|
|
18321
18417
|
ContextMenuPrimitive.RadioItem,
|
|
18322
18418
|
{
|
|
18323
18419
|
"data-slot": "context-menu-radio-item",
|
|
@@ -18430,7 +18526,7 @@ import {
|
|
|
18430
18526
|
useReactTable
|
|
18431
18527
|
} from "@tanstack/react-table";
|
|
18432
18528
|
import * as React15 from "react";
|
|
18433
|
-
import { jsx as jsx146, jsxs as
|
|
18529
|
+
import { jsx as jsx146, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
18434
18530
|
function DataTable({
|
|
18435
18531
|
columns,
|
|
18436
18532
|
data,
|
|
@@ -18518,7 +18614,7 @@ function DataTable({
|
|
|
18518
18614
|
getFacetedRowModel: getFacetedRowModel(),
|
|
18519
18615
|
getFacetedUniqueValues: getFacetedUniqueValues()
|
|
18520
18616
|
});
|
|
18521
|
-
return /* @__PURE__ */ jsx146("div", { "data-slot": "data-table", className: "cn-data-table", children: /* @__PURE__ */
|
|
18617
|
+
return /* @__PURE__ */ jsx146("div", { "data-slot": "data-table", className: "cn-data-table", children: /* @__PURE__ */ jsxs88(Table, { children: [
|
|
18522
18618
|
/* @__PURE__ */ jsx146(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx146(TableRow, { children: headerGroup.headers.map((header, index) => {
|
|
18523
18619
|
const isFirst = index === 0;
|
|
18524
18620
|
const isLast = index === headerGroup.headers.length - 1;
|
|
@@ -18578,13 +18674,13 @@ function DataTable({
|
|
|
18578
18674
|
|
|
18579
18675
|
// src/components/ui/data-table/data-table-action.tsx
|
|
18580
18676
|
import { IconChevronRight as IconChevronRight8 } from "@tabler/icons-react";
|
|
18581
|
-
import { jsx as jsx147, jsxs as
|
|
18677
|
+
import { jsx as jsx147, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
18582
18678
|
function DataTableAction({
|
|
18583
18679
|
onClick,
|
|
18584
18680
|
disabled,
|
|
18585
18681
|
"aria-label": ariaLabel = "Open menu"
|
|
18586
18682
|
}) {
|
|
18587
|
-
return /* @__PURE__ */ jsx147("div", { className: "cn-data-table-action flex justify-end", children: /* @__PURE__ */
|
|
18683
|
+
return /* @__PURE__ */ jsx147("div", { className: "cn-data-table-action flex justify-end", children: /* @__PURE__ */ jsxs89(
|
|
18588
18684
|
Button,
|
|
18589
18685
|
{
|
|
18590
18686
|
variant: "ghost",
|
|
@@ -18620,12 +18716,12 @@ function DataTableColumnHeader({
|
|
|
18620
18716
|
|
|
18621
18717
|
// src/components/ui/data-table/data-table-view-options.tsx
|
|
18622
18718
|
import { IconSettings } from "@tabler/icons-react";
|
|
18623
|
-
import { jsx as jsx149, jsxs as
|
|
18719
|
+
import { jsx as jsx149, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
18624
18720
|
function DataTableViewOptions({
|
|
18625
18721
|
table
|
|
18626
18722
|
}) {
|
|
18627
|
-
return /* @__PURE__ */
|
|
18628
|
-
/* @__PURE__ */
|
|
18723
|
+
return /* @__PURE__ */ jsxs90(DropdownMenu, { children: [
|
|
18724
|
+
/* @__PURE__ */ jsxs90(
|
|
18629
18725
|
DropdownMenuTrigger,
|
|
18630
18726
|
{
|
|
18631
18727
|
render: /* @__PURE__ */ jsx149(
|
|
@@ -18648,7 +18744,7 @@ function DataTableViewOptions({
|
|
|
18648
18744
|
DropdownMenuContent,
|
|
18649
18745
|
{
|
|
18650
18746
|
className: cn("cn-data-table-view-options-content w-[150px]"),
|
|
18651
|
-
children: /* @__PURE__ */
|
|
18747
|
+
children: /* @__PURE__ */ jsxs90(DropdownMenuGroup, { children: [
|
|
18652
18748
|
/* @__PURE__ */ jsx149(DropdownMenuLabel, { children: "Toggle columns" }),
|
|
18653
18749
|
table.getAllColumns().filter(
|
|
18654
18750
|
(column) => typeof column.accessorFn !== "undefined" && column.getCanHide()
|
|
@@ -18676,7 +18772,7 @@ import {
|
|
|
18676
18772
|
|
|
18677
18773
|
// src/components/ui/drawer.tsx
|
|
18678
18774
|
import { Dialog as DrawerPrimitive } from "@base-ui/react/dialog";
|
|
18679
|
-
import { jsx as jsx150, jsxs as
|
|
18775
|
+
import { jsx as jsx150, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
18680
18776
|
function Drawer({
|
|
18681
18777
|
...props
|
|
18682
18778
|
}) {
|
|
@@ -18716,9 +18812,9 @@ function DrawerContent({
|
|
|
18716
18812
|
side = "bottom",
|
|
18717
18813
|
...props
|
|
18718
18814
|
}) {
|
|
18719
|
-
return /* @__PURE__ */
|
|
18815
|
+
return /* @__PURE__ */ jsxs91(DrawerPortal, { "data-slot": "drawer-portal", keepMounted: true, children: [
|
|
18720
18816
|
/* @__PURE__ */ jsx150(DrawerOverlay, {}),
|
|
18721
|
-
/* @__PURE__ */
|
|
18817
|
+
/* @__PURE__ */ jsxs91(
|
|
18722
18818
|
DrawerPrimitive.Popup,
|
|
18723
18819
|
{
|
|
18724
18820
|
"data-slot": "drawer-content",
|
|
@@ -18785,7 +18881,7 @@ function DrawerDescription({
|
|
|
18785
18881
|
|
|
18786
18882
|
// src/components/ui/dropdown-button.tsx
|
|
18787
18883
|
import { IconChevronDown as IconChevronDown10 } from "@tabler/icons-react";
|
|
18788
|
-
import { Fragment as Fragment26, jsx as jsx151, jsxs as
|
|
18884
|
+
import { Fragment as Fragment26, jsx as jsx151, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
18789
18885
|
var DROPDOWN_BUTTON_TRIGGER_SIZE_CN = {
|
|
18790
18886
|
xs: "px-1.5",
|
|
18791
18887
|
sm: "px-2",
|
|
@@ -18800,7 +18896,7 @@ function getButtonVariant(variant) {
|
|
|
18800
18896
|
return variant;
|
|
18801
18897
|
}
|
|
18802
18898
|
function renderItemContent(item) {
|
|
18803
|
-
return /* @__PURE__ */
|
|
18899
|
+
return /* @__PURE__ */ jsxs92(Fragment26, { children: [
|
|
18804
18900
|
item.icon,
|
|
18805
18901
|
/* @__PURE__ */ jsx151("span", { className: "min-w-0 flex-1 truncate", children: item.label }),
|
|
18806
18902
|
item.shortcut ? /* @__PURE__ */ jsx151(DropdownMenuShortcut, { children: item.shortcut }) : null
|
|
@@ -18808,7 +18904,7 @@ function renderItemContent(item) {
|
|
|
18808
18904
|
}
|
|
18809
18905
|
function renderActionItem(item, key) {
|
|
18810
18906
|
if (item.items?.length) {
|
|
18811
|
-
return /* @__PURE__ */
|
|
18907
|
+
return /* @__PURE__ */ jsxs92(DropdownMenuSub, { children: [
|
|
18812
18908
|
/* @__PURE__ */ jsx151(DropdownMenuSubTrigger, { inset: item.inset, children: renderItemContent(item) }),
|
|
18813
18909
|
/* @__PURE__ */ jsx151(DropdownMenuSubContent, { children: renderDropdownButtonItems(item.items) })
|
|
18814
18910
|
] }, key);
|
|
@@ -18890,7 +18986,7 @@ function DropdownButton({
|
|
|
18890
18986
|
const variantClass = variant === "danger" ? "cn-dropdown-button-variant-danger" : "";
|
|
18891
18987
|
const isDisabled = buttonProps.disabled || buttonProps.loading || items.length === 0;
|
|
18892
18988
|
if (!split) {
|
|
18893
|
-
return /* @__PURE__ */
|
|
18989
|
+
return /* @__PURE__ */ jsxs92(DropdownMenu, { children: [
|
|
18894
18990
|
/* @__PURE__ */ jsx151(
|
|
18895
18991
|
DropdownMenuTrigger,
|
|
18896
18992
|
{
|
|
@@ -18921,8 +19017,8 @@ function DropdownButton({
|
|
|
18921
19017
|
) })
|
|
18922
19018
|
] });
|
|
18923
19019
|
}
|
|
18924
|
-
return /* @__PURE__ */
|
|
18925
|
-
/* @__PURE__ */
|
|
19020
|
+
return /* @__PURE__ */ jsxs92(DropdownMenu, { children: [
|
|
19021
|
+
/* @__PURE__ */ jsxs92("div", { className: cn("cn-dropdown-button-shell", className), children: [
|
|
18926
19022
|
/* @__PURE__ */ jsx151(
|
|
18927
19023
|
Button,
|
|
18928
19024
|
{
|
|
@@ -18978,7 +19074,7 @@ function DropdownButton({
|
|
|
18978
19074
|
|
|
18979
19075
|
// src/components/ui/file-button.tsx
|
|
18980
19076
|
import { useRef as useRef18 } from "react";
|
|
18981
|
-
import { Fragment as Fragment27, jsx as jsx152, jsxs as
|
|
19077
|
+
import { Fragment as Fragment27, jsx as jsx152, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
18982
19078
|
function FileButton({
|
|
18983
19079
|
onChange,
|
|
18984
19080
|
accept,
|
|
@@ -18996,7 +19092,7 @@ function FileButton({
|
|
|
18996
19092
|
const handleChange = (e) => {
|
|
18997
19093
|
onChange(e.target.files);
|
|
18998
19094
|
};
|
|
18999
|
-
return /* @__PURE__ */
|
|
19095
|
+
return /* @__PURE__ */ jsxs93(Fragment27, { children: [
|
|
19000
19096
|
/* @__PURE__ */ jsx152(
|
|
19001
19097
|
"input",
|
|
19002
19098
|
{
|
|
@@ -19164,7 +19260,7 @@ function FilePreviewSurface({
|
|
|
19164
19260
|
}
|
|
19165
19261
|
|
|
19166
19262
|
// src/components/ui/file-drop-input.tsx
|
|
19167
|
-
import { Fragment as Fragment28, jsx as jsx154, jsxs as
|
|
19263
|
+
import { Fragment as Fragment28, jsx as jsx154, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
19168
19264
|
function FileDropInput({
|
|
19169
19265
|
className,
|
|
19170
19266
|
onFilesChange,
|
|
@@ -19241,14 +19337,14 @@ function FileDropInput({
|
|
|
19241
19337
|
}
|
|
19242
19338
|
setFiles(nextFiles);
|
|
19243
19339
|
};
|
|
19244
|
-
const fileDropInputElement = /* @__PURE__ */
|
|
19245
|
-
/* @__PURE__ */
|
|
19340
|
+
const fileDropInputElement = /* @__PURE__ */ jsxs94(Fragment28, { children: [
|
|
19341
|
+
/* @__PURE__ */ jsxs94(
|
|
19246
19342
|
"div",
|
|
19247
19343
|
{
|
|
19248
19344
|
"data-slot": "file-drop-input-wrapper",
|
|
19249
19345
|
className: cn("cn-file-drop-input-wrapper", className),
|
|
19250
19346
|
children: [
|
|
19251
|
-
/* @__PURE__ */
|
|
19347
|
+
/* @__PURE__ */ jsxs94(
|
|
19252
19348
|
"label",
|
|
19253
19349
|
{
|
|
19254
19350
|
htmlFor: inputId,
|
|
@@ -19278,7 +19374,7 @@ function FileDropInput({
|
|
|
19278
19374
|
...props
|
|
19279
19375
|
}
|
|
19280
19376
|
),
|
|
19281
|
-
singleItem ? /* @__PURE__ */
|
|
19377
|
+
singleItem ? /* @__PURE__ */ jsxs94(
|
|
19282
19378
|
"div",
|
|
19283
19379
|
{
|
|
19284
19380
|
"data-slot": "file-drop-input-single-preview",
|
|
@@ -19298,7 +19394,7 @@ function FileDropInput({
|
|
|
19298
19394
|
)
|
|
19299
19395
|
}
|
|
19300
19396
|
),
|
|
19301
|
-
/* @__PURE__ */
|
|
19397
|
+
/* @__PURE__ */ jsxs94(
|
|
19302
19398
|
"div",
|
|
19303
19399
|
{
|
|
19304
19400
|
"data-slot": "file-drop-input-preview-actions",
|
|
@@ -19345,14 +19441,14 @@ function FileDropInput({
|
|
|
19345
19441
|
)
|
|
19346
19442
|
]
|
|
19347
19443
|
}
|
|
19348
|
-
) : /* @__PURE__ */
|
|
19444
|
+
) : /* @__PURE__ */ jsxs94(
|
|
19349
19445
|
"div",
|
|
19350
19446
|
{
|
|
19351
19447
|
"data-slot": "file-drop-input-prompt",
|
|
19352
19448
|
className: "cn-file-drop-input-prompt",
|
|
19353
19449
|
children: [
|
|
19354
19450
|
/* @__PURE__ */ jsx154(IconPhoto4, { className: "cn-file-drop-input-icon" }),
|
|
19355
|
-
/* @__PURE__ */
|
|
19451
|
+
/* @__PURE__ */ jsxs94("div", { children: [
|
|
19356
19452
|
/* @__PURE__ */ jsx154("div", { className: "cn-file-drop-input-title", children: dropLabel }),
|
|
19357
19453
|
/* @__PURE__ */ jsx154("div", { className: "cn-file-drop-input-description", children: dropDescription })
|
|
19358
19454
|
] })
|
|
@@ -19369,13 +19465,13 @@ function FileDropInput({
|
|
|
19369
19465
|
className: "cn-file-drop-input-list",
|
|
19370
19466
|
children: items.map((item) => {
|
|
19371
19467
|
const ItemIcon = getFileIcon2(item.type);
|
|
19372
|
-
return /* @__PURE__ */
|
|
19468
|
+
return /* @__PURE__ */ jsxs94(
|
|
19373
19469
|
"div",
|
|
19374
19470
|
{
|
|
19375
19471
|
"data-slot": "file-drop-input-item",
|
|
19376
19472
|
className: "cn-file-drop-input-item",
|
|
19377
19473
|
children: [
|
|
19378
|
-
/* @__PURE__ */
|
|
19474
|
+
/* @__PURE__ */ jsxs94("div", { className: "cn-file-drop-input-item-left", children: [
|
|
19379
19475
|
/* @__PURE__ */ jsx154(ItemIcon, { className: "cn-file-drop-input-item-icon" }),
|
|
19380
19476
|
/* @__PURE__ */ jsx154("span", { className: "cn-file-drop-input-item-name", children: item.name }),
|
|
19381
19477
|
formatBytes2(item.size) ? /* @__PURE__ */ jsx154("span", { className: "cn-file-drop-input-item-size", children: formatBytes2(item.size) }) : null
|
|
@@ -19456,7 +19552,7 @@ import {
|
|
|
19456
19552
|
IconX as IconX12
|
|
19457
19553
|
} from "@tabler/icons-react";
|
|
19458
19554
|
import { useId as useId7, useRef as useRef20, useState as useState45 } from "react";
|
|
19459
|
-
import { Fragment as Fragment29, jsx as jsx155, jsxs as
|
|
19555
|
+
import { Fragment as Fragment29, jsx as jsx155, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
19460
19556
|
function FileInput({
|
|
19461
19557
|
className,
|
|
19462
19558
|
onFilesChange,
|
|
@@ -19537,18 +19633,18 @@ function FileInput({
|
|
|
19537
19633
|
const RootIcon = singleItem ? getFileIcon2(singleItem.type) : IconPaperclip;
|
|
19538
19634
|
let metaContent = null;
|
|
19539
19635
|
if (items.length > 1) {
|
|
19540
|
-
metaContent = /* @__PURE__ */
|
|
19636
|
+
metaContent = /* @__PURE__ */ jsxs95("div", { "data-slot": "file-input-meta", className: "cn-file-input-meta", children: [
|
|
19541
19637
|
items.length,
|
|
19542
19638
|
" files selected"
|
|
19543
19639
|
] });
|
|
19544
19640
|
} else if (props.accept) {
|
|
19545
|
-
metaContent = /* @__PURE__ */
|
|
19641
|
+
metaContent = /* @__PURE__ */ jsxs95("div", { "data-slot": "file-input-meta", className: "cn-file-input-meta", children: [
|
|
19546
19642
|
"Accepts ",
|
|
19547
19643
|
props.accept
|
|
19548
19644
|
] });
|
|
19549
19645
|
}
|
|
19550
|
-
const fileInputElement = /* @__PURE__ */
|
|
19551
|
-
/* @__PURE__ */
|
|
19646
|
+
const fileInputElement = /* @__PURE__ */ jsxs95(Fragment29, { children: [
|
|
19647
|
+
/* @__PURE__ */ jsxs95(
|
|
19552
19648
|
"div",
|
|
19553
19649
|
{
|
|
19554
19650
|
"data-slot": "file-input-wrapper",
|
|
@@ -19577,7 +19673,7 @@ function FileInput({
|
|
|
19577
19673
|
className: "cn-file-input-root",
|
|
19578
19674
|
onClick: () => inputRef.current?.click(),
|
|
19579
19675
|
disabled,
|
|
19580
|
-
children: singleItem ? /* @__PURE__ */
|
|
19676
|
+
children: singleItem ? /* @__PURE__ */ jsxs95(Fragment29, { children: [
|
|
19581
19677
|
/* @__PURE__ */ jsx155(
|
|
19582
19678
|
"div",
|
|
19583
19679
|
{
|
|
@@ -19592,7 +19688,7 @@ function FileInput({
|
|
|
19592
19688
|
)
|
|
19593
19689
|
}
|
|
19594
19690
|
),
|
|
19595
|
-
/* @__PURE__ */
|
|
19691
|
+
/* @__PURE__ */ jsxs95("div", { "data-slot": "file-input-body", className: "cn-file-input-body", children: [
|
|
19596
19692
|
/* @__PURE__ */ jsx155(
|
|
19597
19693
|
"div",
|
|
19598
19694
|
{
|
|
@@ -19603,7 +19699,7 @@ function FileInput({
|
|
|
19603
19699
|
),
|
|
19604
19700
|
/* @__PURE__ */ jsx155("div", { "data-slot": "file-input-meta", className: "cn-file-input-meta", children: formatBytes2(singleItem.size) ?? "uploaded file" })
|
|
19605
19701
|
] }),
|
|
19606
|
-
/* @__PURE__ */
|
|
19702
|
+
/* @__PURE__ */ jsxs95(
|
|
19607
19703
|
"div",
|
|
19608
19704
|
{
|
|
19609
19705
|
"data-slot": "file-input-actions",
|
|
@@ -19642,7 +19738,7 @@ function FileInput({
|
|
|
19642
19738
|
]
|
|
19643
19739
|
}
|
|
19644
19740
|
)
|
|
19645
|
-
] }) : /* @__PURE__ */
|
|
19741
|
+
] }) : /* @__PURE__ */ jsxs95(Fragment29, { children: [
|
|
19646
19742
|
/* @__PURE__ */ jsx155(
|
|
19647
19743
|
"div",
|
|
19648
19744
|
{
|
|
@@ -19651,7 +19747,7 @@ function FileInput({
|
|
|
19651
19747
|
children: leftSection ?? /* @__PURE__ */ jsx155(RootIcon, { className: "size-4" })
|
|
19652
19748
|
}
|
|
19653
19749
|
),
|
|
19654
|
-
/* @__PURE__ */
|
|
19750
|
+
/* @__PURE__ */ jsxs95("div", { "data-slot": "file-input-body", className: "cn-file-input-body", children: [
|
|
19655
19751
|
/* @__PURE__ */ jsx155(
|
|
19656
19752
|
"div",
|
|
19657
19753
|
{
|
|
@@ -19675,13 +19771,13 @@ function FileInput({
|
|
|
19675
19771
|
),
|
|
19676
19772
|
!singleItem && items.length > 1 ? /* @__PURE__ */ jsx155("div", { "data-slot": "file-input-list", className: "cn-file-input-list", children: items.map((item) => {
|
|
19677
19773
|
const ItemIcon = getFileIcon2(item.type);
|
|
19678
|
-
return /* @__PURE__ */
|
|
19774
|
+
return /* @__PURE__ */ jsxs95(
|
|
19679
19775
|
"div",
|
|
19680
19776
|
{
|
|
19681
19777
|
"data-slot": "file-input-item",
|
|
19682
19778
|
className: "cn-file-input-item",
|
|
19683
19779
|
children: [
|
|
19684
|
-
/* @__PURE__ */
|
|
19780
|
+
/* @__PURE__ */ jsxs95("div", { className: "cn-file-input-item-left", children: [
|
|
19685
19781
|
/* @__PURE__ */ jsx155(ItemIcon, { className: "cn-file-input-item-icon" }),
|
|
19686
19782
|
/* @__PURE__ */ jsx155("span", { className: "cn-file-input-item-name", children: item.name }),
|
|
19687
19783
|
formatBytes2(item.size) ? /* @__PURE__ */ jsx155("span", { className: "cn-file-input-item-size", children: formatBytes2(item.size) }) : null
|
|
@@ -20253,7 +20349,7 @@ function HoverCardContent({
|
|
|
20253
20349
|
|
|
20254
20350
|
// src/components/ui/indicator.tsx
|
|
20255
20351
|
import { cva as cva18 } from "class-variance-authority";
|
|
20256
|
-
import { jsx as jsx163, jsxs as
|
|
20352
|
+
import { jsx as jsx163, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
20257
20353
|
var indicatorVariants = cva18(
|
|
20258
20354
|
"cn-indicator absolute flex items-center justify-center rounded-full text-xs font-medium transition-colors",
|
|
20259
20355
|
{
|
|
@@ -20317,7 +20413,7 @@ function Indicator({
|
|
|
20317
20413
|
if (disabled) {
|
|
20318
20414
|
return /* @__PURE__ */ jsx163("div", { className: cn(inline && "inline-block"), children });
|
|
20319
20415
|
}
|
|
20320
|
-
return /* @__PURE__ */
|
|
20416
|
+
return /* @__PURE__ */ jsxs96(
|
|
20321
20417
|
"div",
|
|
20322
20418
|
{
|
|
20323
20419
|
"data-slot": "indicator-wrapper",
|
|
@@ -20525,7 +20621,7 @@ function ItemFooter({ className, ...props }) {
|
|
|
20525
20621
|
|
|
20526
20622
|
// src/components/ui/json-input.tsx
|
|
20527
20623
|
import { useState as useState47 } from "react";
|
|
20528
|
-
import { jsx as jsx165, jsxs as
|
|
20624
|
+
import { jsx as jsx165, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
20529
20625
|
function JsonInput({
|
|
20530
20626
|
className,
|
|
20531
20627
|
value,
|
|
@@ -20578,7 +20674,7 @@ function JsonInput({
|
|
|
20578
20674
|
onBlur?.(e);
|
|
20579
20675
|
};
|
|
20580
20676
|
const errorMessage = validationError || error;
|
|
20581
|
-
return /* @__PURE__ */
|
|
20677
|
+
return /* @__PURE__ */ jsxs97("div", { "data-slot": "json-input", className: "cn-json-input relative w-full", children: [
|
|
20582
20678
|
/* @__PURE__ */ jsx165(
|
|
20583
20679
|
Textarea,
|
|
20584
20680
|
{
|
|
@@ -20712,7 +20808,7 @@ function Mark({ className, color, ...props }) {
|
|
|
20712
20808
|
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
20713
20809
|
import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar";
|
|
20714
20810
|
import { IconCheck as IconCheck7, IconChevronRight as IconChevronRight9 } from "@tabler/icons-react";
|
|
20715
|
-
import { jsx as jsx169, jsxs as
|
|
20811
|
+
import { jsx as jsx169, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
20716
20812
|
var MENUBAR_POSITIONER_CN = "isolate z-50 outline-none";
|
|
20717
20813
|
var MENUBAR_CONTENT_CN = cn(
|
|
20718
20814
|
"cn-menubar-content cn-menubar-content-logical cn-menu-target",
|
|
@@ -20837,7 +20933,7 @@ function MenubarCheckboxItem({
|
|
|
20837
20933
|
inset,
|
|
20838
20934
|
...props
|
|
20839
20935
|
}) {
|
|
20840
|
-
return /* @__PURE__ */
|
|
20936
|
+
return /* @__PURE__ */ jsxs98(
|
|
20841
20937
|
MenuPrimitive.CheckboxItem,
|
|
20842
20938
|
{
|
|
20843
20939
|
"data-slot": "menubar-checkbox-item",
|
|
@@ -20862,7 +20958,7 @@ function MenubarRadioItem({
|
|
|
20862
20958
|
inset,
|
|
20863
20959
|
...props
|
|
20864
20960
|
}) {
|
|
20865
|
-
return /* @__PURE__ */
|
|
20961
|
+
return /* @__PURE__ */ jsxs98(
|
|
20866
20962
|
MenuPrimitive.RadioItem,
|
|
20867
20963
|
{
|
|
20868
20964
|
"data-slot": "menubar-radio-item",
|
|
@@ -20928,7 +21024,7 @@ function MenubarSubTrigger({
|
|
|
20928
21024
|
children,
|
|
20929
21025
|
...props
|
|
20930
21026
|
}) {
|
|
20931
|
-
return /* @__PURE__ */
|
|
21027
|
+
return /* @__PURE__ */ jsxs98(
|
|
20932
21028
|
MenuPrimitive.SubmenuTrigger,
|
|
20933
21029
|
{
|
|
20934
21030
|
"data-slot": "menubar-sub-trigger",
|
|
@@ -20981,7 +21077,7 @@ function MenubarSubContent({
|
|
|
20981
21077
|
|
|
20982
21078
|
// src/components/ui/money-input.tsx
|
|
20983
21079
|
import { forwardRef as forwardRef12, useCallback as useCallback23, useState as useState48 } from "react";
|
|
20984
|
-
import { jsx as jsx170, jsxs as
|
|
21080
|
+
import { jsx as jsx170, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
20985
21081
|
var defaultCurrencies = [
|
|
20986
21082
|
{ label: "ETB", value: "etb", symbol: "Br" },
|
|
20987
21083
|
{ label: "USD", value: "usd", symbol: "$" },
|
|
@@ -21072,7 +21168,7 @@ var MoneyInput = forwardRef12(
|
|
|
21072
21168
|
ref,
|
|
21073
21169
|
"data-slot": "money-input",
|
|
21074
21170
|
className: cn("w-full", className),
|
|
21075
|
-
children: /* @__PURE__ */
|
|
21171
|
+
children: /* @__PURE__ */ jsxs99(InputGroup, { disabled, className: cn(sizes.group), children: [
|
|
21076
21172
|
/* @__PURE__ */ jsx170(
|
|
21077
21173
|
InputGroupAddon,
|
|
21078
21174
|
{
|
|
@@ -21095,7 +21191,7 @@ var MoneyInput = forwardRef12(
|
|
|
21095
21191
|
className: "tabular-nums !pl-2"
|
|
21096
21192
|
}
|
|
21097
21193
|
),
|
|
21098
|
-
/* @__PURE__ */ jsx170(InputGroupAddon, { align: "inline-end", className: "py-0 pr-0", children: /* @__PURE__ */ jsx170("div", { className: "cn-money-input-currency-divider flex h-full items-center", children: /* @__PURE__ */
|
|
21194
|
+
/* @__PURE__ */ jsx170(InputGroupAddon, { align: "inline-end", className: "py-0 pr-0", as: "div", children: /* @__PURE__ */ jsx170("div", { className: "cn-money-input-currency-divider flex h-full items-center", children: /* @__PURE__ */ jsxs99(
|
|
21099
21195
|
Select,
|
|
21100
21196
|
{
|
|
21101
21197
|
value: internalCurrency,
|
|
@@ -21127,7 +21223,7 @@ MoneyInput.displayName = "MoneyInput";
|
|
|
21127
21223
|
import { Autocomplete as AutocompletePrimitive2 } from "@base-ui/react/autocomplete";
|
|
21128
21224
|
import { IconCheck as IconCheck8, IconChevronDown as IconChevronDown11, IconX as IconX13 } from "@tabler/icons-react";
|
|
21129
21225
|
import { useState as useState49 } from "react";
|
|
21130
|
-
import { jsx as jsx171, jsxs as
|
|
21226
|
+
import { jsx as jsx171, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
21131
21227
|
function MultiSelect({
|
|
21132
21228
|
options,
|
|
21133
21229
|
value = [],
|
|
@@ -21160,7 +21256,7 @@ function MultiSelect({
|
|
|
21160
21256
|
"relative w-full data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
21161
21257
|
className
|
|
21162
21258
|
),
|
|
21163
|
-
children: /* @__PURE__ */
|
|
21259
|
+
children: /* @__PURE__ */ jsxs100(
|
|
21164
21260
|
AutocompletePrimitive2.Root,
|
|
21165
21261
|
{
|
|
21166
21262
|
open: disabled ? false : open,
|
|
@@ -21177,16 +21273,16 @@ function MultiSelect({
|
|
|
21177
21273
|
inline: true,
|
|
21178
21274
|
...props,
|
|
21179
21275
|
children: [
|
|
21180
|
-
/* @__PURE__ */
|
|
21181
|
-
/* @__PURE__ */ jsx171("div", { className: "cn-combobox-chips", children: /* @__PURE__ */
|
|
21182
|
-
selectedOptions.map((option) => /* @__PURE__ */
|
|
21276
|
+
/* @__PURE__ */ jsxs100("div", { className: "relative", children: [
|
|
21277
|
+
/* @__PURE__ */ jsx171("div", { className: "cn-combobox-chips", children: /* @__PURE__ */ jsxs100("div", { className: "flex flex-wrap gap-1", children: [
|
|
21278
|
+
selectedOptions.map((option) => /* @__PURE__ */ jsxs100(
|
|
21183
21279
|
"span",
|
|
21184
21280
|
{
|
|
21185
21281
|
"data-slot": "multi-select-chip",
|
|
21186
21282
|
className: "cn-combobox-chip",
|
|
21187
21283
|
children: [
|
|
21188
21284
|
/* @__PURE__ */ jsx171("span", { className: "flex-1", children: option.label }),
|
|
21189
|
-
/* @__PURE__ */
|
|
21285
|
+
/* @__PURE__ */ jsxs100(
|
|
21190
21286
|
"button",
|
|
21191
21287
|
{
|
|
21192
21288
|
type: "button",
|
|
@@ -21226,7 +21322,7 @@ function MultiSelect({
|
|
|
21226
21322
|
{
|
|
21227
21323
|
"data-slot": "multi-select-content",
|
|
21228
21324
|
className: cn("cn-multi-select-content cn-combobox-content"),
|
|
21229
|
-
children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx171("div", { className: "cn-multi-select-empty", children: emptyText }) : filteredOptions.map((option) => /* @__PURE__ */
|
|
21325
|
+
children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx171("div", { className: "cn-multi-select-empty", children: emptyText }) : filteredOptions.map((option) => /* @__PURE__ */ jsxs100(
|
|
21230
21326
|
AutocompletePrimitive2.Item,
|
|
21231
21327
|
{
|
|
21232
21328
|
value: option.value,
|
|
@@ -21257,7 +21353,7 @@ function MultiSelect({
|
|
|
21257
21353
|
// src/components/ui/native-select.tsx
|
|
21258
21354
|
import { IconChevronDown as IconChevronDown12 } from "@tabler/icons-react";
|
|
21259
21355
|
import { forwardRef as forwardRef13 } from "react";
|
|
21260
|
-
import { jsx as jsx172, jsxs as
|
|
21356
|
+
import { jsx as jsx172, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
21261
21357
|
function mapNativeSelectSize(size) {
|
|
21262
21358
|
return size === "xs" || size === "sm" ? "sm" : "default";
|
|
21263
21359
|
}
|
|
@@ -21270,7 +21366,7 @@ var NativeSelectBase = forwardRef13(
|
|
|
21270
21366
|
({ className, size = "md", data, children, rightSection, ...props }, ref) => {
|
|
21271
21367
|
const options = data ? parseOptions(data) : null;
|
|
21272
21368
|
const mappedSize = mapNativeSelectSize(size);
|
|
21273
|
-
return /* @__PURE__ */
|
|
21369
|
+
return /* @__PURE__ */ jsxs101(
|
|
21274
21370
|
"div",
|
|
21275
21371
|
{
|
|
21276
21372
|
"data-slot": "native-select-wrapper",
|
|
@@ -21352,7 +21448,7 @@ NativeSelect.displayName = "NativeSelect";
|
|
|
21352
21448
|
// src/components/ui/nav-link.tsx
|
|
21353
21449
|
import { useMesob as useMesob9 } from "@mesob/ui/providers";
|
|
21354
21450
|
import { cva as cva21 } from "class-variance-authority";
|
|
21355
|
-
import { jsx as jsx173, jsxs as
|
|
21451
|
+
import { jsx as jsx173, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
21356
21452
|
var isExternal3 = (href) => !href || href.startsWith("http") || href.startsWith("//") || href.startsWith("mailto:") || href.startsWith("tel:");
|
|
21357
21453
|
var navLinkVariants = cva21(
|
|
21358
21454
|
"cn-nav-link flex items-center gap-3 px-3 py-2 text-sm font-medium transition-colors cursor-pointer",
|
|
@@ -21391,7 +21487,7 @@ function NavLink({
|
|
|
21391
21487
|
const useLink = href && !isExternal3(href) && Link2;
|
|
21392
21488
|
const Comp = useLink ? Link2 : "a";
|
|
21393
21489
|
const linkProps = useLink ? { ...props, href, ...locale && { locale } } : { ...props, href };
|
|
21394
|
-
return /* @__PURE__ */
|
|
21490
|
+
return /* @__PURE__ */ jsxs102(
|
|
21395
21491
|
Comp,
|
|
21396
21492
|
{
|
|
21397
21493
|
"data-slot": "nav-link",
|
|
@@ -21425,14 +21521,14 @@ function NavLink({
|
|
|
21425
21521
|
import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu";
|
|
21426
21522
|
import { IconChevronDown as IconChevronDown13 } from "@tabler/icons-react";
|
|
21427
21523
|
import { cva as cva22 } from "class-variance-authority";
|
|
21428
|
-
import { jsx as jsx174, jsxs as
|
|
21524
|
+
import { jsx as jsx174, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
21429
21525
|
function NavigationMenu({
|
|
21430
21526
|
className,
|
|
21431
21527
|
children,
|
|
21432
21528
|
viewport = true,
|
|
21433
21529
|
...props
|
|
21434
21530
|
}) {
|
|
21435
|
-
return /* @__PURE__ */
|
|
21531
|
+
return /* @__PURE__ */ jsxs103(
|
|
21436
21532
|
NavigationMenuPrimitive.Root,
|
|
21437
21533
|
{
|
|
21438
21534
|
"data-slot": "navigation-menu",
|
|
@@ -21498,7 +21594,7 @@ function NavigationMenuTrigger({
|
|
|
21498
21594
|
children,
|
|
21499
21595
|
...props
|
|
21500
21596
|
}) {
|
|
21501
|
-
return /* @__PURE__ */
|
|
21597
|
+
return /* @__PURE__ */ jsxs103(
|
|
21502
21598
|
NavigationMenuPrimitive.Trigger,
|
|
21503
21599
|
{
|
|
21504
21600
|
"data-slot": "navigation-menu-trigger",
|
|
@@ -21888,7 +21984,7 @@ function UnstyledButton({
|
|
|
21888
21984
|
}
|
|
21889
21985
|
|
|
21890
21986
|
// src/components/ui/number-input.tsx
|
|
21891
|
-
import { jsx as jsx178, jsxs as
|
|
21987
|
+
import { jsx as jsx178, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
21892
21988
|
var sizeClasses5 = {
|
|
21893
21989
|
xs: "h-7",
|
|
21894
21990
|
sm: "h-8",
|
|
@@ -21991,7 +22087,7 @@ var NumberInput = forwardRef14(
|
|
|
21991
22087
|
};
|
|
21992
22088
|
const hasWrapper = label || description || error || required || withAsterisk;
|
|
21993
22089
|
const showControls = controls && !disabled;
|
|
21994
|
-
const controlsEl = showControls ? /* @__PURE__ */
|
|
22090
|
+
const controlsEl = showControls ? /* @__PURE__ */ jsxs104(
|
|
21995
22091
|
"div",
|
|
21996
22092
|
{
|
|
21997
22093
|
"data-slot": "number-input-controls",
|
|
@@ -22032,7 +22128,7 @@ var NumberInput = forwardRef14(
|
|
|
22032
22128
|
]
|
|
22033
22129
|
}
|
|
22034
22130
|
) : null;
|
|
22035
|
-
const inputEl = /* @__PURE__ */
|
|
22131
|
+
const inputEl = /* @__PURE__ */ jsxs104(InputGroup, { disabled, className: cn(sizeClasses5[size]), children: [
|
|
22036
22132
|
leftSection && /* @__PURE__ */ jsx178(InputGroupAddon, { align: "inline-start", className: "pointer-events-none", children: leftSection }),
|
|
22037
22133
|
/* @__PURE__ */ jsx178(
|
|
22038
22134
|
InputGroupInput,
|
|
@@ -22052,12 +22148,13 @@ var NumberInput = forwardRef14(
|
|
|
22052
22148
|
...inputProps
|
|
22053
22149
|
}
|
|
22054
22150
|
),
|
|
22055
|
-
rightSection && !showControls && /* @__PURE__ */ jsx178(InputGroupAddon, { align: "inline-end", children: rightSection }),
|
|
22151
|
+
rightSection && !showControls && /* @__PURE__ */ jsx178(InputGroupAddon, { align: "inline-end", as: "div", children: rightSection }),
|
|
22056
22152
|
showControls && /* @__PURE__ */ jsx178(
|
|
22057
22153
|
InputGroupAddon,
|
|
22058
22154
|
{
|
|
22059
22155
|
align: "inline-end",
|
|
22060
22156
|
className: "cn-number-input-controls-addon",
|
|
22157
|
+
as: "div",
|
|
22061
22158
|
children: controlsEl
|
|
22062
22159
|
}
|
|
22063
22160
|
)
|
|
@@ -22092,7 +22189,7 @@ import {
|
|
|
22092
22189
|
IconChevronRight as IconChevronRight10,
|
|
22093
22190
|
IconDots as IconDots2
|
|
22094
22191
|
} from "@tabler/icons-react";
|
|
22095
|
-
import { jsx as jsx179, jsxs as
|
|
22192
|
+
import { jsx as jsx179, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
22096
22193
|
function Pagination({ className, ...props }) {
|
|
22097
22194
|
return /* @__PURE__ */ jsx179(
|
|
22098
22195
|
"nav",
|
|
@@ -22148,7 +22245,7 @@ function PaginationPrevious({
|
|
|
22148
22245
|
className,
|
|
22149
22246
|
...props
|
|
22150
22247
|
}) {
|
|
22151
|
-
return /* @__PURE__ */
|
|
22248
|
+
return /* @__PURE__ */ jsxs105(
|
|
22152
22249
|
PaginationLink,
|
|
22153
22250
|
{
|
|
22154
22251
|
"aria-label": "Go to previous page",
|
|
@@ -22166,7 +22263,7 @@ function PaginationNext({
|
|
|
22166
22263
|
className,
|
|
22167
22264
|
...props
|
|
22168
22265
|
}) {
|
|
22169
|
-
return /* @__PURE__ */
|
|
22266
|
+
return /* @__PURE__ */ jsxs105(
|
|
22170
22267
|
PaginationLink,
|
|
22171
22268
|
{
|
|
22172
22269
|
"aria-label": "Go to next page",
|
|
@@ -22184,7 +22281,7 @@ function PaginationEllipsis({
|
|
|
22184
22281
|
className,
|
|
22185
22282
|
...props
|
|
22186
22283
|
}) {
|
|
22187
|
-
return /* @__PURE__ */
|
|
22284
|
+
return /* @__PURE__ */ jsxs105(
|
|
22188
22285
|
"span",
|
|
22189
22286
|
{
|
|
22190
22287
|
"aria-hidden": true,
|
|
@@ -22253,7 +22350,7 @@ function Paper({
|
|
|
22253
22350
|
// src/components/ui/password-input.tsx
|
|
22254
22351
|
import { IconEye, IconEyeOff } from "@tabler/icons-react";
|
|
22255
22352
|
import { forwardRef as forwardRef15, useState as useState50 } from "react";
|
|
22256
|
-
import { jsx as jsx181, jsxs as
|
|
22353
|
+
import { jsx as jsx181, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
22257
22354
|
var PasswordInput = forwardRef15(
|
|
22258
22355
|
({ className, showToggle = true, size, ...props }, ref) => {
|
|
22259
22356
|
const [showPassword, setShowPassword] = useState50(false);
|
|
@@ -22265,7 +22362,7 @@ var PasswordInput = forwardRef15(
|
|
|
22265
22362
|
xl: "h-12"
|
|
22266
22363
|
};
|
|
22267
22364
|
const iconButtonSize = size === "xs" || size === "sm" ? "icon-xs" : "icon-sm";
|
|
22268
|
-
return /* @__PURE__ */
|
|
22365
|
+
return /* @__PURE__ */ jsxs106(
|
|
22269
22366
|
InputGroup,
|
|
22270
22367
|
{
|
|
22271
22368
|
disabled: props.disabled,
|
|
@@ -22280,7 +22377,7 @@ var PasswordInput = forwardRef15(
|
|
|
22280
22377
|
...props
|
|
22281
22378
|
}
|
|
22282
22379
|
),
|
|
22283
|
-
showToggle && /* @__PURE__ */ jsx181(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx181(
|
|
22380
|
+
showToggle && /* @__PURE__ */ jsx181(InputGroupAddon, { align: "inline-end", as: "div", children: /* @__PURE__ */ jsx181(
|
|
22284
22381
|
InputGroupButton,
|
|
22285
22382
|
{
|
|
22286
22383
|
type: "button",
|
|
@@ -22343,7 +22440,7 @@ PasswordInputWithWrapper.displayName = "PasswordInputWithWrapper";
|
|
|
22343
22440
|
|
|
22344
22441
|
// src/components/ui/pill.tsx
|
|
22345
22442
|
import { cva as cva23 } from "class-variance-authority";
|
|
22346
|
-
import { jsx as jsx182, jsxs as
|
|
22443
|
+
import { jsx as jsx182, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
22347
22444
|
var pillVariants = cva23(
|
|
22348
22445
|
"cn-pill inline-flex items-center gap-1 font-medium shrink-0 outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-100",
|
|
22349
22446
|
{
|
|
@@ -22387,7 +22484,7 @@ function Pill({
|
|
|
22387
22484
|
disabled,
|
|
22388
22485
|
...props
|
|
22389
22486
|
}) {
|
|
22390
|
-
return /* @__PURE__ */
|
|
22487
|
+
return /* @__PURE__ */ jsxs107(
|
|
22391
22488
|
"span",
|
|
22392
22489
|
{
|
|
22393
22490
|
"data-slot": "pill",
|
|
@@ -22631,7 +22728,7 @@ function ResizableHandle({
|
|
|
22631
22728
|
}
|
|
22632
22729
|
|
|
22633
22730
|
// src/components/ui/ring-progress.tsx
|
|
22634
|
-
import { jsx as jsx186, jsxs as
|
|
22731
|
+
import { jsx as jsx186, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
22635
22732
|
function RingProgress({
|
|
22636
22733
|
value,
|
|
22637
22734
|
size = 120,
|
|
@@ -22645,7 +22742,7 @@ function RingProgress({
|
|
|
22645
22742
|
const radius = (size - thickness) / 2;
|
|
22646
22743
|
const circumference = 2 * Math.PI * radius;
|
|
22647
22744
|
const offset = circumference - normalizedValue / 100 * circumference;
|
|
22648
|
-
return /* @__PURE__ */
|
|
22745
|
+
return /* @__PURE__ */ jsxs108(
|
|
22649
22746
|
"div",
|
|
22650
22747
|
{
|
|
22651
22748
|
"data-slot": "ring-progress",
|
|
@@ -22656,12 +22753,8 @@ function RingProgress({
|
|
|
22656
22753
|
style: { width: size, height: size },
|
|
22657
22754
|
...props,
|
|
22658
22755
|
children: [
|
|
22659
|
-
/* @__PURE__ */
|
|
22660
|
-
/* @__PURE__ */
|
|
22661
|
-
"Progress: ",
|
|
22662
|
-
normalizedValue,
|
|
22663
|
-
"%"
|
|
22664
|
-
] }),
|
|
22756
|
+
/* @__PURE__ */ jsxs108("svg", { width: size, height: size, className: "-rotate-90", "aria-hidden": "true", children: [
|
|
22757
|
+
/* @__PURE__ */ jsx186("title", { children: `Progress: ${normalizedValue}%` }),
|
|
22665
22758
|
/* @__PURE__ */ jsx186(
|
|
22666
22759
|
"circle",
|
|
22667
22760
|
{
|
|
@@ -22697,7 +22790,7 @@ function RingProgress({
|
|
|
22697
22790
|
}
|
|
22698
22791
|
|
|
22699
22792
|
// src/components/ui/semi-circle-progress.tsx
|
|
22700
|
-
import { jsx as jsx187, jsxs as
|
|
22793
|
+
import { jsx as jsx187, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
22701
22794
|
function SemiCircleProgress({
|
|
22702
22795
|
className,
|
|
22703
22796
|
value,
|
|
@@ -22711,7 +22804,7 @@ function SemiCircleProgress({
|
|
|
22711
22804
|
const radius = (size - thickness) / 2;
|
|
22712
22805
|
const circumference = Math.PI * radius;
|
|
22713
22806
|
const strokeDashoffset = circumference - normalizedValue / 100 * circumference;
|
|
22714
|
-
return /* @__PURE__ */
|
|
22807
|
+
return /* @__PURE__ */ jsxs109(
|
|
22715
22808
|
"div",
|
|
22716
22809
|
{
|
|
22717
22810
|
"data-slot": "semi-circle-progress",
|
|
@@ -22721,7 +22814,7 @@ function SemiCircleProgress({
|
|
|
22721
22814
|
),
|
|
22722
22815
|
...props,
|
|
22723
22816
|
children: [
|
|
22724
|
-
/* @__PURE__ */
|
|
22817
|
+
/* @__PURE__ */ jsxs109(
|
|
22725
22818
|
"svg",
|
|
22726
22819
|
{
|
|
22727
22820
|
width: size,
|
|
@@ -22731,11 +22824,7 @@ function SemiCircleProgress({
|
|
|
22731
22824
|
role: "img",
|
|
22732
22825
|
"aria-label": `Progress: ${Math.round(normalizedValue)}%`,
|
|
22733
22826
|
children: [
|
|
22734
|
-
/* @__PURE__ */
|
|
22735
|
-
"Progress: ",
|
|
22736
|
-
Math.round(normalizedValue),
|
|
22737
|
-
"%"
|
|
22738
|
-
] }),
|
|
22827
|
+
/* @__PURE__ */ jsx187("title", { children: `Progress: ${Math.round(normalizedValue)}%` }),
|
|
22739
22828
|
/* @__PURE__ */ jsx187(
|
|
22740
22829
|
"path",
|
|
22741
22830
|
{
|
|
@@ -22886,7 +22975,7 @@ function Space({ className, h, w, style, ...props }) {
|
|
|
22886
22975
|
// src/components/ui/spoiler.tsx
|
|
22887
22976
|
import { IconChevronDown as IconChevronDown15 } from "@tabler/icons-react";
|
|
22888
22977
|
import { useEffect as useEffect30, useRef as useRef22, useState as useState52 } from "react";
|
|
22889
|
-
import { jsx as jsx190, jsxs as
|
|
22978
|
+
import { jsx as jsx190, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
22890
22979
|
function Spoiler({
|
|
22891
22980
|
maxHeight = 100,
|
|
22892
22981
|
showLabel = "Show more",
|
|
@@ -22916,7 +23005,7 @@ function Spoiler({
|
|
|
22916
23005
|
window.removeEventListener("resize", update);
|
|
22917
23006
|
};
|
|
22918
23007
|
}, [maxHeight]);
|
|
22919
|
-
return /* @__PURE__ */
|
|
23008
|
+
return /* @__PURE__ */ jsxs110(
|
|
22920
23009
|
"div",
|
|
22921
23010
|
{
|
|
22922
23011
|
"data-slot": "spoiler",
|
|
@@ -22942,7 +23031,7 @@ function Spoiler({
|
|
|
22942
23031
|
className: "cn-spoiler-fade pointer-events-none absolute inset-x-0 bottom-0"
|
|
22943
23032
|
}
|
|
22944
23033
|
),
|
|
22945
|
-
shouldShowButton && /* @__PURE__ */
|
|
23034
|
+
shouldShowButton && /* @__PURE__ */ jsxs110(
|
|
22946
23035
|
Button,
|
|
22947
23036
|
{
|
|
22948
23037
|
variant: "ghost",
|
|
@@ -23017,7 +23106,7 @@ function Stack({
|
|
|
23017
23106
|
|
|
23018
23107
|
// src/components/ui/status-dropdown-button.tsx
|
|
23019
23108
|
import { useCallback as useCallback25, useMemo as useMemo16, useState as useState53 } from "react";
|
|
23020
|
-
import { Fragment as Fragment30, jsx as jsx192, jsxs as
|
|
23109
|
+
import { Fragment as Fragment30, jsx as jsx192, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
23021
23110
|
var STATUS_MENU_SEPARATOR = "separator";
|
|
23022
23111
|
function resolveConfirmConfig(target, entityLabel) {
|
|
23023
23112
|
if (!target.confirm) {
|
|
@@ -23110,7 +23199,7 @@ function StatusDropdownButton({
|
|
|
23110
23199
|
[value, states, transitions, groupLabel, onPick]
|
|
23111
23200
|
);
|
|
23112
23201
|
const current = states.find((s) => s.value === value);
|
|
23113
|
-
return /* @__PURE__ */
|
|
23202
|
+
return /* @__PURE__ */ jsxs111(Fragment30, { children: [
|
|
23114
23203
|
/* @__PURE__ */ jsx192(
|
|
23115
23204
|
DropdownButton,
|
|
23116
23205
|
{
|
|
@@ -23118,7 +23207,7 @@ function StatusDropdownButton({
|
|
|
23118
23207
|
className,
|
|
23119
23208
|
items,
|
|
23120
23209
|
variant,
|
|
23121
|
-
children: /* @__PURE__ */
|
|
23210
|
+
children: /* @__PURE__ */ jsxs111(
|
|
23122
23211
|
"span",
|
|
23123
23212
|
{
|
|
23124
23213
|
className: cn(
|
|
@@ -23143,12 +23232,12 @@ function StatusDropdownButton({
|
|
|
23143
23232
|
setPending(null);
|
|
23144
23233
|
}
|
|
23145
23234
|
},
|
|
23146
|
-
children: /* @__PURE__ */
|
|
23147
|
-
/* @__PURE__ */
|
|
23235
|
+
children: /* @__PURE__ */ jsxs111(AlertDialogContent, { children: [
|
|
23236
|
+
/* @__PURE__ */ jsxs111(AlertDialogHeader, { children: [
|
|
23148
23237
|
/* @__PURE__ */ jsx192(AlertDialogTitle, { children: pending?.config.title ?? "Confirm?" }),
|
|
23149
23238
|
pending?.config.description != null ? /* @__PURE__ */ jsx192(AlertDialogDescription, { children: pending.config.description }) : null
|
|
23150
23239
|
] }),
|
|
23151
|
-
/* @__PURE__ */
|
|
23240
|
+
/* @__PURE__ */ jsxs111(AlertDialogFooter, { children: [
|
|
23152
23241
|
/* @__PURE__ */ jsx192(AlertDialogCancel, { children: pending?.config.cancelLabel ?? "Cancel" }),
|
|
23153
23242
|
/* @__PURE__ */ jsx192(
|
|
23154
23243
|
AlertDialogAction,
|
|
@@ -23173,7 +23262,7 @@ function StatusDropdownButton({
|
|
|
23173
23262
|
// src/components/ui/stepper.tsx
|
|
23174
23263
|
import { IconCheck as IconCheck9 } from "@tabler/icons-react";
|
|
23175
23264
|
import { createContext as createContext8, useContext as useContext9 } from "react";
|
|
23176
|
-
import { jsx as jsx193, jsxs as
|
|
23265
|
+
import { jsx as jsx193, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
23177
23266
|
var StepperContext = createContext8({
|
|
23178
23267
|
activeStep: 0,
|
|
23179
23268
|
orientation: "horizontal"
|
|
@@ -23218,7 +23307,7 @@ function Step({
|
|
|
23218
23307
|
} else if (isActive) {
|
|
23219
23308
|
state2 = "active";
|
|
23220
23309
|
}
|
|
23221
|
-
return /* @__PURE__ */
|
|
23310
|
+
return /* @__PURE__ */ jsxs112(
|
|
23222
23311
|
"div",
|
|
23223
23312
|
{
|
|
23224
23313
|
"data-slot": "step",
|
|
@@ -23230,7 +23319,7 @@ function Step({
|
|
|
23230
23319
|
),
|
|
23231
23320
|
...props,
|
|
23232
23321
|
children: [
|
|
23233
|
-
/* @__PURE__ */
|
|
23322
|
+
/* @__PURE__ */ jsxs112(
|
|
23234
23323
|
"div",
|
|
23235
23324
|
{
|
|
23236
23325
|
className: cn(
|
|
@@ -23247,7 +23336,7 @@ function Step({
|
|
|
23247
23336
|
children: isCompleted ? /* @__PURE__ */ jsx193(IconCheck9, { className: "size-5" }) : /* @__PURE__ */ jsx193("span", { children: index + 1 })
|
|
23248
23337
|
}
|
|
23249
23338
|
),
|
|
23250
|
-
(label || description) && /* @__PURE__ */
|
|
23339
|
+
(label || description) && /* @__PURE__ */ jsxs112(
|
|
23251
23340
|
"div",
|
|
23252
23341
|
{
|
|
23253
23342
|
className: cn(
|
|
@@ -23359,7 +23448,7 @@ function TableOfContents({
|
|
|
23359
23448
|
// src/components/ui/tags-input.tsx
|
|
23360
23449
|
import { IconX as IconX14 } from "@tabler/icons-react";
|
|
23361
23450
|
import { useState as useState54 } from "react";
|
|
23362
|
-
import { jsx as jsx196, jsxs as
|
|
23451
|
+
import { jsx as jsx196, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
23363
23452
|
function TagsInput({
|
|
23364
23453
|
className,
|
|
23365
23454
|
value,
|
|
@@ -23417,21 +23506,21 @@ function TagsInput({
|
|
|
23417
23506
|
}
|
|
23418
23507
|
setInputValue(newValue);
|
|
23419
23508
|
};
|
|
23420
|
-
return /* @__PURE__ */
|
|
23509
|
+
return /* @__PURE__ */ jsxs113(
|
|
23421
23510
|
"div",
|
|
23422
23511
|
{
|
|
23423
23512
|
"data-slot": "tags-input",
|
|
23424
23513
|
className: cn("cn-tags-input cn-combobox-chips", className),
|
|
23425
23514
|
...props,
|
|
23426
23515
|
children: [
|
|
23427
|
-
tags.map((tag, index) => /* @__PURE__ */
|
|
23516
|
+
tags.map((tag, index) => /* @__PURE__ */ jsxs113(
|
|
23428
23517
|
"span",
|
|
23429
23518
|
{
|
|
23430
23519
|
"data-slot": "tags-input-tag",
|
|
23431
23520
|
className: "cn-combobox-chip",
|
|
23432
23521
|
children: [
|
|
23433
23522
|
tag,
|
|
23434
|
-
/* @__PURE__ */
|
|
23523
|
+
/* @__PURE__ */ jsxs113(
|
|
23435
23524
|
"button",
|
|
23436
23525
|
{
|
|
23437
23526
|
type: "button",
|
|
@@ -23468,7 +23557,7 @@ function TagsInput({
|
|
|
23468
23557
|
|
|
23469
23558
|
// src/components/ui/text-input.tsx
|
|
23470
23559
|
import { forwardRef as forwardRef16 } from "react";
|
|
23471
|
-
import { jsx as jsx197, jsxs as
|
|
23560
|
+
import { jsx as jsx197, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
23472
23561
|
var TextInput = forwardRef16(
|
|
23473
23562
|
({
|
|
23474
23563
|
label,
|
|
@@ -23497,13 +23586,21 @@ var TextInput = forwardRef16(
|
|
|
23497
23586
|
xl: "h-12"
|
|
23498
23587
|
};
|
|
23499
23588
|
const hasWrapper = label || description || error || required || withAsterisk;
|
|
23500
|
-
const inputElement = /* @__PURE__ */
|
|
23589
|
+
const inputElement = /* @__PURE__ */ jsxs114(
|
|
23501
23590
|
InputGroup,
|
|
23502
23591
|
{
|
|
23503
23592
|
disabled,
|
|
23504
23593
|
className: cn(size && groupSizeClasses[size]),
|
|
23505
23594
|
children: [
|
|
23506
|
-
leftSection && /* @__PURE__ */ jsx197(
|
|
23595
|
+
leftSection && /* @__PURE__ */ jsx197(
|
|
23596
|
+
InputGroupAddon,
|
|
23597
|
+
{
|
|
23598
|
+
align: "inline-start",
|
|
23599
|
+
className: "pointer-events-none",
|
|
23600
|
+
as: "div",
|
|
23601
|
+
children: leftSection
|
|
23602
|
+
}
|
|
23603
|
+
),
|
|
23507
23604
|
/* @__PURE__ */ jsx197(
|
|
23508
23605
|
InputGroupInput,
|
|
23509
23606
|
{
|
|
@@ -23519,6 +23616,7 @@ var TextInput = forwardRef16(
|
|
|
23519
23616
|
InputGroupAddon,
|
|
23520
23617
|
{
|
|
23521
23618
|
align: "inline-end",
|
|
23619
|
+
as: "div",
|
|
23522
23620
|
className: cn(
|
|
23523
23621
|
rightSectionPointerEvents === "none" && "pointer-events-none"
|
|
23524
23622
|
),
|
|
@@ -24132,7 +24230,7 @@ function Transition({
|
|
|
24132
24230
|
// src/components/ui/tree.tsx
|
|
24133
24231
|
import { IconChevronRight as IconChevronRight11 } from "@tabler/icons-react";
|
|
24134
24232
|
import { useState as useState56 } from "react";
|
|
24135
|
-
import { jsx as jsx204, jsxs as
|
|
24233
|
+
import { jsx as jsx204, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
24136
24234
|
function Tree({
|
|
24137
24235
|
className,
|
|
24138
24236
|
data,
|
|
@@ -24213,14 +24311,14 @@ function TreeNode({
|
|
|
24213
24311
|
hasChildren,
|
|
24214
24312
|
selected
|
|
24215
24313
|
}) ?? node.label;
|
|
24216
|
-
return /* @__PURE__ */
|
|
24314
|
+
return /* @__PURE__ */ jsxs115(
|
|
24217
24315
|
"div",
|
|
24218
24316
|
{
|
|
24219
24317
|
role: "treeitem",
|
|
24220
24318
|
tabIndex: 0,
|
|
24221
24319
|
"aria-expanded": hasChildren ? expanded : void 0,
|
|
24222
24320
|
children: [
|
|
24223
|
-
/* @__PURE__ */
|
|
24321
|
+
/* @__PURE__ */ jsxs115(
|
|
24224
24322
|
UnstyledButton,
|
|
24225
24323
|
{
|
|
24226
24324
|
type: "button",
|