@snapcall/design-system 1.13.1 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +326 -193
- package/dist/index.mjs +325 -193
- package/dist/tailwind.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -422,6 +422,7 @@ __export(src_exports, {
|
|
|
422
422
|
CornerUpRightIcon: () => CornerUpRightIcon,
|
|
423
423
|
CpuChip1Icon: () => CpuChip1Icon,
|
|
424
424
|
CpuChip2Icon: () => CpuChip2Icon,
|
|
425
|
+
CreatableSelect: () => CreatableSelect,
|
|
425
426
|
CreditCard1Icon: () => CreditCard1Icon,
|
|
426
427
|
CreditCard2Icon: () => CreditCard2Icon,
|
|
427
428
|
CreditCardCheckIcon: () => CreditCardCheckIcon,
|
|
@@ -53302,7 +53303,7 @@ var CommandItem = React6.forwardRef(
|
|
|
53302
53303
|
__spreadProps(__spreadValues({
|
|
53303
53304
|
ref,
|
|
53304
53305
|
className: cn(
|
|
53305
|
-
"px-2 py-1.5 text-sm flex flex-col gap-1 text-gray-1000 rounded-md cursor-pointer focus-within:bg-gray-100 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 hover:bg-gray-50 active:bg-gray-100 data-[state=checked]:bg-gray-50",
|
|
53306
|
+
"px-2 py-1.5 text-sm flex flex-col gap-1 text-gray-1000 rounded-md cursor-pointer focus-within:bg-gray-100 data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 hover:bg-gray-50 active:bg-gray-100 data-[state=checked]:bg-gray-50 data-[selected=true]:bg-gray-50",
|
|
53306
53307
|
className
|
|
53307
53308
|
)
|
|
53308
53309
|
}, props), {
|
|
@@ -53323,10 +53324,141 @@ var CommandItem = React6.forwardRef(
|
|
|
53323
53324
|
);
|
|
53324
53325
|
CommandItem.displayName = import_cmdk.Command.Item.displayName;
|
|
53325
53326
|
|
|
53327
|
+
// src/components/CreatableSelect/CreatableSelect.tsx
|
|
53328
|
+
var import_react1228 = require("react");
|
|
53329
|
+
var import_cmdk2 = require("cmdk");
|
|
53330
|
+
var import_jsx_runtime1232 = require("react/jsx-runtime");
|
|
53331
|
+
function CreatableSelect({
|
|
53332
|
+
isLoading,
|
|
53333
|
+
items,
|
|
53334
|
+
multiple,
|
|
53335
|
+
newLabel = "New: ",
|
|
53336
|
+
nothingFoundLabel = "No matches found",
|
|
53337
|
+
placeholder,
|
|
53338
|
+
value,
|
|
53339
|
+
valueKey,
|
|
53340
|
+
onValueChanged,
|
|
53341
|
+
getItemProps
|
|
53342
|
+
}) {
|
|
53343
|
+
const inputRef = (0, import_react1228.useRef)(null);
|
|
53344
|
+
const [open, setOpen] = (0, import_react1228.useState)(false);
|
|
53345
|
+
const [inputValue, setInputValue] = (0, import_react1228.useState)("");
|
|
53346
|
+
const handleUnselect = (0, import_react1228.useCallback)(
|
|
53347
|
+
(selected) => {
|
|
53348
|
+
onValueChanged(value.filter((s) => s !== selected));
|
|
53349
|
+
},
|
|
53350
|
+
[onValueChanged, value]
|
|
53351
|
+
);
|
|
53352
|
+
const handleKeyDown = (0, import_react1228.useCallback)(
|
|
53353
|
+
(e) => {
|
|
53354
|
+
const input = inputRef.current;
|
|
53355
|
+
if (input) {
|
|
53356
|
+
if (["Delete", "Backspace"].includes(e.key) && input.value === "") {
|
|
53357
|
+
onValueChanged([...value.slice(0, -1)]);
|
|
53358
|
+
}
|
|
53359
|
+
if (e.key === "Escape") {
|
|
53360
|
+
input.blur();
|
|
53361
|
+
}
|
|
53362
|
+
}
|
|
53363
|
+
},
|
|
53364
|
+
[onValueChanged, value]
|
|
53365
|
+
);
|
|
53366
|
+
const selectables = items.filter(
|
|
53367
|
+
(it) => !value.includes(it[valueKey])
|
|
53368
|
+
);
|
|
53369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1232.jsxs)(
|
|
53370
|
+
Command,
|
|
53371
|
+
{
|
|
53372
|
+
onKeyDown: handleKeyDown,
|
|
53373
|
+
className: "overflow-visible bg-transparent",
|
|
53374
|
+
children: [
|
|
53375
|
+
/* @__PURE__ */ (0, import_jsx_runtime1232.jsx)("div", { className: "flex px-3 py-2 min-h-9 w-full rounded-md border border-gray-200 bg-transparent focus-within:outline focus-within:outline-[2px] focus-within:outline-blue-300 focus-within:outline-offset-[2px]", children: /* @__PURE__ */ (0, import_jsx_runtime1232.jsxs)("div", { className: "flex flex-wrap w-full gap-1", children: [
|
|
53376
|
+
multiple && value.map((it) => /* @__PURE__ */ (0, import_jsx_runtime1232.jsxs)(Badge, { children: [
|
|
53377
|
+
it,
|
|
53378
|
+
/* @__PURE__ */ (0, import_jsx_runtime1232.jsx)(
|
|
53379
|
+
"button",
|
|
53380
|
+
{
|
|
53381
|
+
className: "ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
53382
|
+
onKeyDown: (e) => e.key === "Enter" && handleUnselect(it),
|
|
53383
|
+
onMouseDown: (e) => {
|
|
53384
|
+
e.preventDefault();
|
|
53385
|
+
e.stopPropagation();
|
|
53386
|
+
},
|
|
53387
|
+
onClick: () => handleUnselect(it),
|
|
53388
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1232.jsx)(XCloseIcon, { size: 12, className: "text-current" })
|
|
53389
|
+
}
|
|
53390
|
+
)
|
|
53391
|
+
] }, it)),
|
|
53392
|
+
!multiple && value.map((it) => /* @__PURE__ */ (0, import_jsx_runtime1232.jsx)("span", { className: "text-sm", children: it }, it)),
|
|
53393
|
+
/* @__PURE__ */ (0, import_jsx_runtime1232.jsx)(
|
|
53394
|
+
import_cmdk2.Command.Input,
|
|
53395
|
+
{
|
|
53396
|
+
ref: inputRef,
|
|
53397
|
+
value: inputValue,
|
|
53398
|
+
onValueChange: (v) => {
|
|
53399
|
+
setInputValue(v);
|
|
53400
|
+
!multiple && onValueChanged([]);
|
|
53401
|
+
},
|
|
53402
|
+
onBlur: () => setOpen(false),
|
|
53403
|
+
onFocus: () => setOpen(true),
|
|
53404
|
+
placeholder: multiple || value.length === 0 ? placeholder : "",
|
|
53405
|
+
className: "flex-grow text-sm bg-transparent outline-none text-gray-1000 placeholder:text-gray-700"
|
|
53406
|
+
}
|
|
53407
|
+
)
|
|
53408
|
+
] }) }),
|
|
53409
|
+
/* @__PURE__ */ (0, import_jsx_runtime1232.jsx)("div", { className: "relative", children: open && /* @__PURE__ */ (0, import_jsx_runtime1232.jsx)("div", { className: "absolute z-50 w-full bg-white border rounded-md shadow-md outline-none top-2 text-gray-1000 animate-in", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime1232.jsx)(CommandLoading, {}) : selectables.length < 1 ? /* @__PURE__ */ (0, import_jsx_runtime1232.jsx)("span", { className: "flex flex-col gap-4 p-4 text-center text-gray-700", children: nothingFoundLabel }) : /* @__PURE__ */ (0, import_jsx_runtime1232.jsxs)(CommandList, { className: "h-full overflow-auto", children: [
|
|
53410
|
+
selectables.map((it) => {
|
|
53411
|
+
const itemProps = getItemProps(it);
|
|
53412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1232.jsx)(
|
|
53413
|
+
CommandItem,
|
|
53414
|
+
__spreadValues({
|
|
53415
|
+
onMouseDown: (e) => {
|
|
53416
|
+
e.preventDefault();
|
|
53417
|
+
e.stopPropagation();
|
|
53418
|
+
},
|
|
53419
|
+
onSelect: () => {
|
|
53420
|
+
setInputValue("");
|
|
53421
|
+
onValueChanged(
|
|
53422
|
+
multiple ? [...value, it[valueKey]] : [it[valueKey]]
|
|
53423
|
+
);
|
|
53424
|
+
},
|
|
53425
|
+
className: "cursor-pointer"
|
|
53426
|
+
}, itemProps),
|
|
53427
|
+
it[valueKey]
|
|
53428
|
+
);
|
|
53429
|
+
}),
|
|
53430
|
+
inputValue && !value.includes(inputValue) && /* @__PURE__ */ (0, import_jsx_runtime1232.jsx)(
|
|
53431
|
+
CommandItem,
|
|
53432
|
+
{
|
|
53433
|
+
value: inputValue,
|
|
53434
|
+
onMouseDown: (e) => {
|
|
53435
|
+
e.preventDefault();
|
|
53436
|
+
e.stopPropagation();
|
|
53437
|
+
},
|
|
53438
|
+
onSelect: () => {
|
|
53439
|
+
onValueChanged(
|
|
53440
|
+
multiple ? [
|
|
53441
|
+
...value,
|
|
53442
|
+
...inputValue.split(",").map((it) => it.trim())
|
|
53443
|
+
] : [inputValue]
|
|
53444
|
+
);
|
|
53445
|
+
setInputValue("");
|
|
53446
|
+
},
|
|
53447
|
+
className: "cursor-pointer",
|
|
53448
|
+
children: `${newLabel}${inputValue}`
|
|
53449
|
+
},
|
|
53450
|
+
"new-item"
|
|
53451
|
+
)
|
|
53452
|
+
] }) }) })
|
|
53453
|
+
]
|
|
53454
|
+
}
|
|
53455
|
+
);
|
|
53456
|
+
}
|
|
53457
|
+
|
|
53326
53458
|
// src/components/Dialog/Dialog.tsx
|
|
53327
|
-
var
|
|
53459
|
+
var React8 = __toESM(require("react"));
|
|
53328
53460
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
53329
|
-
var
|
|
53461
|
+
var import_jsx_runtime1233 = require("react/jsx-runtime");
|
|
53330
53462
|
var Dialog = DialogPrimitive.Root;
|
|
53331
53463
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
53332
53464
|
var DialogPortal = (_a) => {
|
|
@@ -53335,12 +53467,12 @@ var DialogPortal = (_a) => {
|
|
|
53335
53467
|
} = _b, props = __objRest(_b, [
|
|
53336
53468
|
"className"
|
|
53337
53469
|
]);
|
|
53338
|
-
return /* @__PURE__ */ (0,
|
|
53470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1233.jsx)(DialogPrimitive.Portal, __spreadValues({ className: cn(className) }, props));
|
|
53339
53471
|
};
|
|
53340
53472
|
DialogPortal.displayName = DialogPrimitive.Portal.displayName;
|
|
53341
|
-
var DialogOverlay =
|
|
53473
|
+
var DialogOverlay = React8.forwardRef((_a, ref) => {
|
|
53342
53474
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
53343
|
-
return /* @__PURE__ */ (0,
|
|
53475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1233.jsx)(
|
|
53344
53476
|
DialogPrimitive.Overlay,
|
|
53345
53477
|
__spreadValues({
|
|
53346
53478
|
ref,
|
|
@@ -53352,11 +53484,11 @@ var DialogOverlay = React7.forwardRef((_a, ref) => {
|
|
|
53352
53484
|
);
|
|
53353
53485
|
});
|
|
53354
53486
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
53355
|
-
var DialogContent =
|
|
53487
|
+
var DialogContent = React8.forwardRef((_a, ref) => {
|
|
53356
53488
|
var _b = _a, { className, children, bottomSheet = false } = _b, props = __objRest(_b, ["className", "children", "bottomSheet"]);
|
|
53357
|
-
return /* @__PURE__ */ (0,
|
|
53358
|
-
/* @__PURE__ */ (0,
|
|
53359
|
-
/* @__PURE__ */ (0,
|
|
53489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1233.jsxs)(DialogPortal, { children: [
|
|
53490
|
+
/* @__PURE__ */ (0, import_jsx_runtime1233.jsx)(DialogOverlay, {}),
|
|
53491
|
+
/* @__PURE__ */ (0, import_jsx_runtime1233.jsxs)(
|
|
53360
53492
|
DialogPrimitive.Content,
|
|
53361
53493
|
__spreadProps(__spreadValues({
|
|
53362
53494
|
ref,
|
|
@@ -53373,7 +53505,7 @@ var DialogContent = React7.forwardRef((_a, ref) => {
|
|
|
53373
53505
|
}, props), {
|
|
53374
53506
|
children: [
|
|
53375
53507
|
children,
|
|
53376
|
-
/* @__PURE__ */ (0,
|
|
53508
|
+
/* @__PURE__ */ (0, import_jsx_runtime1233.jsxs)(
|
|
53377
53509
|
DialogPrimitive.Close,
|
|
53378
53510
|
{
|
|
53379
53511
|
className: cn(
|
|
@@ -53382,8 +53514,8 @@ var DialogContent = React7.forwardRef((_a, ref) => {
|
|
|
53382
53514
|
"absolute right-6 top-6"
|
|
53383
53515
|
),
|
|
53384
53516
|
children: [
|
|
53385
|
-
/* @__PURE__ */ (0,
|
|
53386
|
-
/* @__PURE__ */ (0,
|
|
53517
|
+
/* @__PURE__ */ (0, import_jsx_runtime1233.jsx)(XCloseIcon, { className: "w-3 h-3" }),
|
|
53518
|
+
/* @__PURE__ */ (0, import_jsx_runtime1233.jsx)("span", { className: "sr-only", children: "Close" })
|
|
53387
53519
|
]
|
|
53388
53520
|
}
|
|
53389
53521
|
)
|
|
@@ -53399,7 +53531,7 @@ var DialogHeader = (_a) => {
|
|
|
53399
53531
|
} = _b, props = __objRest(_b, [
|
|
53400
53532
|
"className"
|
|
53401
53533
|
]);
|
|
53402
|
-
return /* @__PURE__ */ (0,
|
|
53534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1233.jsx)(
|
|
53403
53535
|
"div",
|
|
53404
53536
|
__spreadValues({
|
|
53405
53537
|
className: cn(
|
|
@@ -53416,7 +53548,7 @@ var DialogFooter = (_a) => {
|
|
|
53416
53548
|
} = _b, props = __objRest(_b, [
|
|
53417
53549
|
"className"
|
|
53418
53550
|
]);
|
|
53419
|
-
return /* @__PURE__ */ (0,
|
|
53551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1233.jsx)(
|
|
53420
53552
|
"div",
|
|
53421
53553
|
__spreadValues({
|
|
53422
53554
|
className: cn(
|
|
@@ -53427,9 +53559,9 @@ var DialogFooter = (_a) => {
|
|
|
53427
53559
|
);
|
|
53428
53560
|
};
|
|
53429
53561
|
DialogFooter.displayName = "DialogFooter";
|
|
53430
|
-
var DialogTitle =
|
|
53562
|
+
var DialogTitle = React8.forwardRef((_a, ref) => {
|
|
53431
53563
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
53432
|
-
return /* @__PURE__ */ (0,
|
|
53564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1233.jsx)(
|
|
53433
53565
|
DialogPrimitive.Title,
|
|
53434
53566
|
__spreadValues({
|
|
53435
53567
|
ref,
|
|
@@ -53438,9 +53570,9 @@ var DialogTitle = React7.forwardRef((_a, ref) => {
|
|
|
53438
53570
|
);
|
|
53439
53571
|
});
|
|
53440
53572
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
53441
|
-
var DialogDescription =
|
|
53573
|
+
var DialogDescription = React8.forwardRef((_a, ref) => {
|
|
53442
53574
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
53443
|
-
return /* @__PURE__ */ (0,
|
|
53575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1233.jsx)(
|
|
53444
53576
|
DialogPrimitive.Description,
|
|
53445
53577
|
__spreadValues({
|
|
53446
53578
|
ref,
|
|
@@ -53451,9 +53583,9 @@ var DialogDescription = React7.forwardRef((_a, ref) => {
|
|
|
53451
53583
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
53452
53584
|
|
|
53453
53585
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
53454
|
-
var
|
|
53586
|
+
var import_react1229 = __toESM(require("react"));
|
|
53455
53587
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
53456
|
-
var
|
|
53588
|
+
var import_jsx_runtime1234 = require("react/jsx-runtime");
|
|
53457
53589
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
53458
53590
|
var DropdownMenuItemBase = ({
|
|
53459
53591
|
icon,
|
|
@@ -53465,7 +53597,7 @@ var DropdownMenuItemBase = ({
|
|
|
53465
53597
|
description,
|
|
53466
53598
|
hasSubNav
|
|
53467
53599
|
}) => {
|
|
53468
|
-
return /* @__PURE__ */ (0,
|
|
53600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1234.jsxs)(
|
|
53469
53601
|
"div",
|
|
53470
53602
|
{
|
|
53471
53603
|
className: cn(
|
|
@@ -53474,9 +53606,9 @@ var DropdownMenuItemBase = ({
|
|
|
53474
53606
|
className
|
|
53475
53607
|
),
|
|
53476
53608
|
children: [
|
|
53477
|
-
/* @__PURE__ */ (0,
|
|
53478
|
-
checkbox && /* @__PURE__ */ (0,
|
|
53479
|
-
icon &&
|
|
53609
|
+
/* @__PURE__ */ (0, import_jsx_runtime1234.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
53610
|
+
checkbox && /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(Checkbox, { checked }),
|
|
53611
|
+
icon && import_react1229.default.cloneElement(icon, {
|
|
53480
53612
|
size: 16,
|
|
53481
53613
|
className: cn(
|
|
53482
53614
|
"flex-shrink-0",
|
|
@@ -53484,15 +53616,15 @@ var DropdownMenuItemBase = ({
|
|
|
53484
53616
|
icon.props.className
|
|
53485
53617
|
)
|
|
53486
53618
|
}),
|
|
53487
|
-
/* @__PURE__ */ (0,
|
|
53488
|
-
hasSubNav && /* @__PURE__ */ (0,
|
|
53619
|
+
/* @__PURE__ */ (0, import_jsx_runtime1234.jsx)("span", { className: "flex gap-2 grow", children }),
|
|
53620
|
+
hasSubNav && /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)("div", { className: "inline-flex items-center justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(ChevronRightIcon, { size: 16, className: "text-gray-1000" }) })
|
|
53489
53621
|
] }),
|
|
53490
|
-
description && /* @__PURE__ */ (0,
|
|
53622
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)("div", { className: "text-xs text-gray-700", children: description })
|
|
53491
53623
|
]
|
|
53492
53624
|
}
|
|
53493
53625
|
);
|
|
53494
53626
|
};
|
|
53495
|
-
var DropdownMenuCheckboxItem =
|
|
53627
|
+
var DropdownMenuCheckboxItem = import_react1229.default.forwardRef(
|
|
53496
53628
|
(_a, forwardedRef) => {
|
|
53497
53629
|
var _b = _a, { className, children, checked, icon, description, destructive } = _b, props = __objRest(_b, ["className", "children", "checked", "icon", "description", "destructive"]);
|
|
53498
53630
|
const extraProps = {
|
|
@@ -53502,20 +53634,20 @@ var DropdownMenuCheckboxItem = import_react1228.default.forwardRef(
|
|
|
53502
53634
|
checked,
|
|
53503
53635
|
className
|
|
53504
53636
|
};
|
|
53505
|
-
return /* @__PURE__ */ (0,
|
|
53637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(
|
|
53506
53638
|
DropdownMenuPrimitive.CheckboxItem,
|
|
53507
53639
|
__spreadProps(__spreadValues({
|
|
53508
53640
|
checked
|
|
53509
53641
|
}, props), {
|
|
53510
53642
|
ref: forwardedRef,
|
|
53511
53643
|
className: "outline-none select-none group",
|
|
53512
|
-
children: /* @__PURE__ */ (0,
|
|
53644
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(DropdownMenuItemBase, __spreadProps(__spreadValues({ checkbox: true }, extraProps), { children }))
|
|
53513
53645
|
})
|
|
53514
53646
|
);
|
|
53515
53647
|
}
|
|
53516
53648
|
);
|
|
53517
53649
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
53518
|
-
var DropdownMenuContent =
|
|
53650
|
+
var DropdownMenuContent = import_react1229.default.forwardRef(
|
|
53519
53651
|
(_a, forwardedRef) => {
|
|
53520
53652
|
var _b = _a, {
|
|
53521
53653
|
children,
|
|
@@ -53530,7 +53662,7 @@ var DropdownMenuContent = import_react1228.default.forwardRef(
|
|
|
53530
53662
|
"sideOffset",
|
|
53531
53663
|
"align"
|
|
53532
53664
|
]);
|
|
53533
|
-
return /* @__PURE__ */ (0,
|
|
53665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(
|
|
53534
53666
|
DropdownMenuPrimitive.Content,
|
|
53535
53667
|
__spreadProps(__spreadValues({
|
|
53536
53668
|
className: cn(
|
|
@@ -53549,7 +53681,7 @@ var DropdownMenuContent = import_react1228.default.forwardRef(
|
|
|
53549
53681
|
);
|
|
53550
53682
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
53551
53683
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
53552
|
-
var DropdownMenuItem =
|
|
53684
|
+
var DropdownMenuItem = import_react1229.default.forwardRef(
|
|
53553
53685
|
(_a, forwardedRef) => {
|
|
53554
53686
|
var _b = _a, { className, children, icon, description, destructive } = _b, props = __objRest(_b, ["className", "children", "icon", "description", "destructive"]);
|
|
53555
53687
|
const extraProps = {
|
|
@@ -53558,20 +53690,20 @@ var DropdownMenuItem = import_react1228.default.forwardRef(
|
|
|
53558
53690
|
icon,
|
|
53559
53691
|
className
|
|
53560
53692
|
};
|
|
53561
|
-
return /* @__PURE__ */ (0,
|
|
53693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(
|
|
53562
53694
|
DropdownMenuPrimitive.Item,
|
|
53563
53695
|
__spreadProps(__spreadValues({}, props), {
|
|
53564
53696
|
ref: forwardedRef,
|
|
53565
53697
|
className: "outline-none select-none group",
|
|
53566
|
-
children: /* @__PURE__ */ (0,
|
|
53698
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(DropdownMenuItemBase, __spreadProps(__spreadValues({}, extraProps), { children }))
|
|
53567
53699
|
})
|
|
53568
53700
|
);
|
|
53569
53701
|
}
|
|
53570
53702
|
);
|
|
53571
53703
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
53572
|
-
var DropdownMenuLabel =
|
|
53704
|
+
var DropdownMenuLabel = import_react1229.default.forwardRef((_a, forwardedRef) => {
|
|
53573
53705
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
53574
|
-
return /* @__PURE__ */ (0,
|
|
53706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(
|
|
53575
53707
|
DropdownMenuPrimitive.Label,
|
|
53576
53708
|
__spreadProps(__spreadValues({
|
|
53577
53709
|
className: cn(
|
|
@@ -53586,7 +53718,7 @@ var DropdownMenuLabel = import_react1228.default.forwardRef((_a, forwardedRef) =
|
|
|
53586
53718
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
53587
53719
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
53588
53720
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
53589
|
-
var DropdownMenuRadioItem =
|
|
53721
|
+
var DropdownMenuRadioItem = import_react1229.default.forwardRef(
|
|
53590
53722
|
(_a, forwardedRef) => {
|
|
53591
53723
|
var _b = _a, { className, children, icon, description, destructive } = _b, props = __objRest(_b, ["className", "children", "icon", "description", "destructive"]);
|
|
53592
53724
|
const extraProps = {
|
|
@@ -53595,20 +53727,20 @@ var DropdownMenuRadioItem = import_react1228.default.forwardRef(
|
|
|
53595
53727
|
icon,
|
|
53596
53728
|
className
|
|
53597
53729
|
};
|
|
53598
|
-
return /* @__PURE__ */ (0,
|
|
53730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(
|
|
53599
53731
|
DropdownMenuPrimitive.RadioItem,
|
|
53600
53732
|
__spreadProps(__spreadValues({}, props), {
|
|
53601
53733
|
ref: forwardedRef,
|
|
53602
53734
|
className: "outline-none select-none group",
|
|
53603
|
-
children: /* @__PURE__ */ (0,
|
|
53735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(DropdownMenuItemBase, __spreadProps(__spreadValues({}, extraProps), { children }))
|
|
53604
53736
|
})
|
|
53605
53737
|
);
|
|
53606
53738
|
}
|
|
53607
53739
|
);
|
|
53608
53740
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
53609
|
-
var DropdownMenuSeparator =
|
|
53741
|
+
var DropdownMenuSeparator = import_react1229.default.forwardRef((_a, forwardedRef) => {
|
|
53610
53742
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
53611
|
-
return /* @__PURE__ */ (0,
|
|
53743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(
|
|
53612
53744
|
DropdownMenuPrimitive.Separator,
|
|
53613
53745
|
__spreadProps(__spreadValues({
|
|
53614
53746
|
className: cn("my-1 border-b border-gray-200", className)
|
|
@@ -53619,9 +53751,9 @@ var DropdownMenuSeparator = import_react1228.default.forwardRef((_a, forwardedRe
|
|
|
53619
53751
|
});
|
|
53620
53752
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
53621
53753
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
53622
|
-
var DropdownMenuSubContent =
|
|
53754
|
+
var DropdownMenuSubContent = import_react1229.default.forwardRef((_a, forwardedRef) => {
|
|
53623
53755
|
var _b = _a, { children, className, sideOffset = 8 } = _b, props = __objRest(_b, ["children", "className", "sideOffset"]);
|
|
53624
|
-
return /* @__PURE__ */ (0,
|
|
53756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(
|
|
53625
53757
|
DropdownMenuPrimitive.SubContent,
|
|
53626
53758
|
__spreadProps(__spreadValues({
|
|
53627
53759
|
className: cn(
|
|
@@ -53636,7 +53768,7 @@ var DropdownMenuSubContent = import_react1228.default.forwardRef((_a, forwardedR
|
|
|
53636
53768
|
);
|
|
53637
53769
|
});
|
|
53638
53770
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
53639
|
-
var DropdownMenuSubTrigger =
|
|
53771
|
+
var DropdownMenuSubTrigger = import_react1229.default.forwardRef(
|
|
53640
53772
|
(_a, forwardedRef) => {
|
|
53641
53773
|
var _b = _a, { className, children, icon, description, destructive } = _b, props = __objRest(_b, ["className", "children", "icon", "description", "destructive"]);
|
|
53642
53774
|
const extraProps = {
|
|
@@ -53645,12 +53777,12 @@ var DropdownMenuSubTrigger = import_react1228.default.forwardRef(
|
|
|
53645
53777
|
icon,
|
|
53646
53778
|
className
|
|
53647
53779
|
};
|
|
53648
|
-
return /* @__PURE__ */ (0,
|
|
53780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(
|
|
53649
53781
|
DropdownMenuPrimitive.SubTrigger,
|
|
53650
53782
|
__spreadProps(__spreadValues({}, props), {
|
|
53651
53783
|
ref: forwardedRef,
|
|
53652
53784
|
className: "outline-none select-none group",
|
|
53653
|
-
children: /* @__PURE__ */ (0,
|
|
53785
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1234.jsx)(DropdownMenuItemBase, __spreadProps(__spreadValues({ hasSubNav: true }, extraProps), { children }))
|
|
53654
53786
|
})
|
|
53655
53787
|
);
|
|
53656
53788
|
}
|
|
@@ -53659,16 +53791,16 @@ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayNam
|
|
|
53659
53791
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
53660
53792
|
|
|
53661
53793
|
// src/components/FilterButton/FilterButton.tsx
|
|
53662
|
-
var
|
|
53663
|
-
var
|
|
53664
|
-
var FilterButton =
|
|
53794
|
+
var import_react1230 = __toESM(require("react"));
|
|
53795
|
+
var import_jsx_runtime1235 = require("react/jsx-runtime");
|
|
53796
|
+
var FilterButton = import_react1230.default.forwardRef(
|
|
53665
53797
|
(_a, ref) => {
|
|
53666
53798
|
var _b = _a, { selectedCount, children, size = "sm", variant = "outline" } = _b, props = __objRest(_b, ["selectedCount", "children", "size", "variant"]);
|
|
53667
|
-
return /* @__PURE__ */ (0,
|
|
53799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1235.jsxs)(Button, __spreadProps(__spreadValues({ ref, variant, size }, props), { children: [
|
|
53668
53800
|
children,
|
|
53669
|
-
selectedCount !== void 0 && selectedCount > 0 && /* @__PURE__ */ (0,
|
|
53670
|
-
/* @__PURE__ */ (0,
|
|
53671
|
-
/* @__PURE__ */ (0,
|
|
53801
|
+
selectedCount !== void 0 && selectedCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime1235.jsxs)(import_jsx_runtime1235.Fragment, { children: [
|
|
53802
|
+
/* @__PURE__ */ (0, import_jsx_runtime1235.jsx)("span", { className: "h-4 border-l border-gray-200" }),
|
|
53803
|
+
/* @__PURE__ */ (0, import_jsx_runtime1235.jsx)(Badge, { variant: "fill", color: "blue", children: selectedCount })
|
|
53672
53804
|
] })
|
|
53673
53805
|
] }));
|
|
53674
53806
|
}
|
|
@@ -53676,17 +53808,17 @@ var FilterButton = import_react1229.default.forwardRef(
|
|
|
53676
53808
|
FilterButton.displayName = "FilterButton";
|
|
53677
53809
|
|
|
53678
53810
|
// src/components/Form/Form.tsx
|
|
53679
|
-
var
|
|
53811
|
+
var React12 = __toESM(require("react"));
|
|
53680
53812
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
53681
53813
|
var import_react_hook_form = require("react-hook-form");
|
|
53682
53814
|
|
|
53683
53815
|
// src/components/Label/Label.tsx
|
|
53684
|
-
var
|
|
53816
|
+
var React11 = __toESM(require("react"));
|
|
53685
53817
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
|
|
53686
|
-
var
|
|
53687
|
-
var Label2 =
|
|
53818
|
+
var import_jsx_runtime1236 = require("react/jsx-runtime");
|
|
53819
|
+
var Label2 = React11.forwardRef((_a, ref) => {
|
|
53688
53820
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
53689
|
-
return /* @__PURE__ */ (0,
|
|
53821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1236.jsx)(
|
|
53690
53822
|
LabelPrimitive.Root,
|
|
53691
53823
|
__spreadValues({
|
|
53692
53824
|
ref,
|
|
@@ -53700,24 +53832,24 @@ var Label2 = React10.forwardRef((_a, ref) => {
|
|
|
53700
53832
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
53701
53833
|
|
|
53702
53834
|
// src/components/Form/Form.tsx
|
|
53703
|
-
var
|
|
53835
|
+
var import_jsx_runtime1237 = require("react/jsx-runtime");
|
|
53704
53836
|
var Form = import_react_hook_form.FormProvider;
|
|
53705
|
-
var FormFieldContext =
|
|
53837
|
+
var FormFieldContext = React12.createContext(
|
|
53706
53838
|
{}
|
|
53707
53839
|
);
|
|
53708
53840
|
var FormField = (_a) => {
|
|
53709
53841
|
var props = __objRest(_a, []);
|
|
53710
|
-
return /* @__PURE__ */ (0,
|
|
53842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1237.jsx)(
|
|
53711
53843
|
FormFieldContext.Provider,
|
|
53712
53844
|
{
|
|
53713
53845
|
value: { name: props.name, isDisabled: props.disabled },
|
|
53714
|
-
children: /* @__PURE__ */ (0,
|
|
53846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1237.jsx)(import_react_hook_form.Controller, __spreadValues({}, props))
|
|
53715
53847
|
}
|
|
53716
53848
|
);
|
|
53717
53849
|
};
|
|
53718
53850
|
var useFormField = () => {
|
|
53719
|
-
const fieldContext =
|
|
53720
|
-
const itemContext =
|
|
53851
|
+
const fieldContext = React12.useContext(FormFieldContext);
|
|
53852
|
+
const itemContext = React12.useContext(FormItemContext);
|
|
53721
53853
|
const { getFieldState, formState } = (0, import_react_hook_form.useFormContext)();
|
|
53722
53854
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
53723
53855
|
if (!fieldContext) {
|
|
@@ -53733,13 +53865,13 @@ var useFormField = () => {
|
|
|
53733
53865
|
formMessageId: `${id}-form-item-message`
|
|
53734
53866
|
}, fieldState);
|
|
53735
53867
|
};
|
|
53736
|
-
var FormItemContext =
|
|
53868
|
+
var FormItemContext = React12.createContext(
|
|
53737
53869
|
{}
|
|
53738
53870
|
);
|
|
53739
|
-
var FormItem =
|
|
53871
|
+
var FormItem = React12.forwardRef((_a, ref) => {
|
|
53740
53872
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
53741
|
-
const id =
|
|
53742
|
-
return /* @__PURE__ */ (0,
|
|
53873
|
+
const id = React12.useId();
|
|
53874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1237.jsx)(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ (0, import_jsx_runtime1237.jsx)(
|
|
53743
53875
|
"div",
|
|
53744
53876
|
__spreadValues({
|
|
53745
53877
|
ref,
|
|
@@ -53748,10 +53880,10 @@ var FormItem = React11.forwardRef((_a, ref) => {
|
|
|
53748
53880
|
) });
|
|
53749
53881
|
});
|
|
53750
53882
|
FormItem.displayName = "FormItem";
|
|
53751
|
-
var FormLabel =
|
|
53883
|
+
var FormLabel = React12.forwardRef((_a, ref) => {
|
|
53752
53884
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
53753
53885
|
const { isDisabled, formItemId } = useFormField();
|
|
53754
|
-
return /* @__PURE__ */ (0,
|
|
53886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1237.jsx)(
|
|
53755
53887
|
Label2,
|
|
53756
53888
|
__spreadValues({
|
|
53757
53889
|
ref,
|
|
@@ -53761,10 +53893,10 @@ var FormLabel = React11.forwardRef((_a, ref) => {
|
|
|
53761
53893
|
);
|
|
53762
53894
|
});
|
|
53763
53895
|
FormLabel.displayName = "FormLabel";
|
|
53764
|
-
var FormControl =
|
|
53896
|
+
var FormControl = React12.forwardRef((_a, ref) => {
|
|
53765
53897
|
var props = __objRest(_a, []);
|
|
53766
53898
|
const { error, isDisabled, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
53767
|
-
return /* @__PURE__ */ (0,
|
|
53899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1237.jsx)(
|
|
53768
53900
|
import_react_slot2.Slot,
|
|
53769
53901
|
__spreadValues({
|
|
53770
53902
|
ref,
|
|
@@ -53777,10 +53909,10 @@ var FormControl = React11.forwardRef((_a, ref) => {
|
|
|
53777
53909
|
);
|
|
53778
53910
|
});
|
|
53779
53911
|
FormControl.displayName = "FormControl";
|
|
53780
|
-
var FormDescription =
|
|
53912
|
+
var FormDescription = React12.forwardRef((_a, ref) => {
|
|
53781
53913
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
53782
53914
|
const { formDescriptionId, isDisabled } = useFormField();
|
|
53783
|
-
return /* @__PURE__ */ (0,
|
|
53915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1237.jsx)(
|
|
53784
53916
|
"p",
|
|
53785
53917
|
__spreadValues({
|
|
53786
53918
|
ref,
|
|
@@ -53794,12 +53926,12 @@ var FormDescription = React11.forwardRef((_a, ref) => {
|
|
|
53794
53926
|
);
|
|
53795
53927
|
});
|
|
53796
53928
|
FormDescription.displayName = "FormDescription";
|
|
53797
|
-
var FormMessage =
|
|
53929
|
+
var FormMessage = React12.forwardRef((_a, ref) => {
|
|
53798
53930
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
53799
53931
|
const { error, isDisabled, formMessageId } = useFormField();
|
|
53800
53932
|
const body = error ? String(error == null ? void 0 : error.message) : children;
|
|
53801
53933
|
const textColorClassName = error ? "text-red-700" : "text-gray-700";
|
|
53802
|
-
return /* @__PURE__ */ (0,
|
|
53934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1237.jsx)(
|
|
53803
53935
|
"p",
|
|
53804
53936
|
__spreadProps(__spreadValues({
|
|
53805
53937
|
ref,
|
|
@@ -53818,10 +53950,10 @@ var FormMessage = React11.forwardRef((_a, ref) => {
|
|
|
53818
53950
|
FormMessage.displayName = "FormMessage";
|
|
53819
53951
|
|
|
53820
53952
|
// src/components/Input/Input.tsx
|
|
53821
|
-
var
|
|
53953
|
+
var React13 = __toESM(require("react"));
|
|
53822
53954
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
53823
|
-
var
|
|
53824
|
-
var Input =
|
|
53955
|
+
var import_jsx_runtime1238 = require("react/jsx-runtime");
|
|
53956
|
+
var Input = React13.forwardRef(
|
|
53825
53957
|
(_a, ref) => {
|
|
53826
53958
|
var _b = _a, {
|
|
53827
53959
|
className,
|
|
@@ -53839,8 +53971,8 @@ var Input = React12.forwardRef(
|
|
|
53839
53971
|
"suffixEnchancer"
|
|
53840
53972
|
]);
|
|
53841
53973
|
const isDisabled = !!props["data-is-disabled"] || disabled;
|
|
53842
|
-
return /* @__PURE__ */ (0,
|
|
53843
|
-
/* @__PURE__ */ (0,
|
|
53974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1238.jsxs)("div", { className: "flex gap-2", children: [
|
|
53975
|
+
/* @__PURE__ */ (0, import_jsx_runtime1238.jsxs)(
|
|
53844
53976
|
"div",
|
|
53845
53977
|
{
|
|
53846
53978
|
className: cn(
|
|
@@ -53852,7 +53984,7 @@ var Input = React12.forwardRef(
|
|
|
53852
53984
|
className
|
|
53853
53985
|
),
|
|
53854
53986
|
children: [
|
|
53855
|
-
prefixEnchancer && /* @__PURE__ */ (0,
|
|
53987
|
+
prefixEnchancer && /* @__PURE__ */ (0, import_jsx_runtime1238.jsx)(
|
|
53856
53988
|
import_react_slot3.Slot,
|
|
53857
53989
|
{
|
|
53858
53990
|
className: cn(
|
|
@@ -53862,7 +53994,7 @@ var Input = React12.forwardRef(
|
|
|
53862
53994
|
children: prefixEnchancer
|
|
53863
53995
|
}
|
|
53864
53996
|
),
|
|
53865
|
-
/* @__PURE__ */ (0,
|
|
53997
|
+
/* @__PURE__ */ (0, import_jsx_runtime1238.jsx)(
|
|
53866
53998
|
"input",
|
|
53867
53999
|
__spreadProps(__spreadValues({}, props), {
|
|
53868
54000
|
disabled: isDisabled,
|
|
@@ -53871,7 +54003,7 @@ var Input = React12.forwardRef(
|
|
|
53871
54003
|
ref
|
|
53872
54004
|
})
|
|
53873
54005
|
),
|
|
53874
|
-
suffixEnchancer && /* @__PURE__ */ (0,
|
|
54006
|
+
suffixEnchancer && /* @__PURE__ */ (0, import_jsx_runtime1238.jsx)(
|
|
53875
54007
|
import_react_slot3.Slot,
|
|
53876
54008
|
{
|
|
53877
54009
|
className: cn(
|
|
@@ -53884,7 +54016,7 @@ var Input = React12.forwardRef(
|
|
|
53884
54016
|
]
|
|
53885
54017
|
}
|
|
53886
54018
|
),
|
|
53887
|
-
button &&
|
|
54019
|
+
button && React13.cloneElement(button, {
|
|
53888
54020
|
size: "sm",
|
|
53889
54021
|
disabled: isDisabled,
|
|
53890
54022
|
className: cn("flex-shrink-0", button.props.className)
|
|
@@ -53895,7 +54027,7 @@ var Input = React12.forwardRef(
|
|
|
53895
54027
|
Input.displayName = "Input";
|
|
53896
54028
|
|
|
53897
54029
|
// src/components/Pagination/Pagination.tsx
|
|
53898
|
-
var
|
|
54030
|
+
var import_jsx_runtime1239 = require("react/jsx-runtime");
|
|
53899
54031
|
var PaginationPageChoice = /* @__PURE__ */ ((PaginationPageChoice2) => {
|
|
53900
54032
|
PaginationPageChoice2["FIRST"] = "FIRST";
|
|
53901
54033
|
PaginationPageChoice2["PREVIOUS"] = "PREVIOUS";
|
|
@@ -53911,12 +54043,12 @@ var Pagination = ({
|
|
|
53911
54043
|
onPageChange,
|
|
53912
54044
|
className
|
|
53913
54045
|
}) => {
|
|
53914
|
-
return /* @__PURE__ */ (0,
|
|
53915
|
-
totalRowsCaption && /* @__PURE__ */ (0,
|
|
53916
|
-
/* @__PURE__ */ (0,
|
|
53917
|
-
currentPageCation && /* @__PURE__ */ (0,
|
|
53918
|
-
/* @__PURE__ */ (0,
|
|
53919
|
-
/* @__PURE__ */ (0,
|
|
54046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1239.jsxs)("div", { className: cn("flex items-center justify-between px-2", className), children: [
|
|
54047
|
+
totalRowsCaption && /* @__PURE__ */ (0, import_jsx_runtime1239.jsx)("div", { className: "flex-1 text-sm text-gray-700", children: totalRowsCaption }),
|
|
54048
|
+
/* @__PURE__ */ (0, import_jsx_runtime1239.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
54049
|
+
currentPageCation && /* @__PURE__ */ (0, import_jsx_runtime1239.jsx)("div", { className: "flex items-center justify-center text-sm font-medium text-gray-1000", children: currentPageCation }),
|
|
54050
|
+
/* @__PURE__ */ (0, import_jsx_runtime1239.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
54051
|
+
/* @__PURE__ */ (0, import_jsx_runtime1239.jsx)(
|
|
53920
54052
|
Button,
|
|
53921
54053
|
{
|
|
53922
54054
|
variant: "outline",
|
|
@@ -53924,10 +54056,10 @@ var Pagination = ({
|
|
|
53924
54056
|
size: "sm",
|
|
53925
54057
|
onClick: () => onPageChange("FIRST" /* FIRST */),
|
|
53926
54058
|
disabled: !previousPageAvailable,
|
|
53927
|
-
children: /* @__PURE__ */ (0,
|
|
54059
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1239.jsx)(ChevronLeftDoubleIcon, { size: "16" })
|
|
53928
54060
|
}
|
|
53929
54061
|
),
|
|
53930
|
-
/* @__PURE__ */ (0,
|
|
54062
|
+
/* @__PURE__ */ (0, import_jsx_runtime1239.jsx)(
|
|
53931
54063
|
Button,
|
|
53932
54064
|
{
|
|
53933
54065
|
variant: "outline",
|
|
@@ -53935,10 +54067,10 @@ var Pagination = ({
|
|
|
53935
54067
|
size: "sm",
|
|
53936
54068
|
onClick: () => onPageChange("PREVIOUS" /* PREVIOUS */),
|
|
53937
54069
|
disabled: !previousPageAvailable,
|
|
53938
|
-
children: /* @__PURE__ */ (0,
|
|
54070
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1239.jsx)(ChevronLeftIcon, { size: "16" })
|
|
53939
54071
|
}
|
|
53940
54072
|
),
|
|
53941
|
-
/* @__PURE__ */ (0,
|
|
54073
|
+
/* @__PURE__ */ (0, import_jsx_runtime1239.jsx)(
|
|
53942
54074
|
Button,
|
|
53943
54075
|
{
|
|
53944
54076
|
variant: "outline",
|
|
@@ -53946,10 +54078,10 @@ var Pagination = ({
|
|
|
53946
54078
|
size: "sm",
|
|
53947
54079
|
onClick: () => onPageChange("NEXT" /* NEXT */),
|
|
53948
54080
|
disabled: !nextPageAvailable,
|
|
53949
|
-
children: /* @__PURE__ */ (0,
|
|
54081
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1239.jsx)(ChevronRightIcon, { size: "16" })
|
|
53950
54082
|
}
|
|
53951
54083
|
),
|
|
53952
|
-
/* @__PURE__ */ (0,
|
|
54084
|
+
/* @__PURE__ */ (0, import_jsx_runtime1239.jsx)(
|
|
53953
54085
|
Button,
|
|
53954
54086
|
{
|
|
53955
54087
|
variant: "outline",
|
|
@@ -53957,7 +54089,7 @@ var Pagination = ({
|
|
|
53957
54089
|
size: "sm",
|
|
53958
54090
|
onClick: () => onPageChange("LAST" /* LAST */),
|
|
53959
54091
|
disabled: !nextPageAvailable,
|
|
53960
|
-
children: /* @__PURE__ */ (0,
|
|
54092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1239.jsx)(ChevronRightDoubleIcon, { size: "16" })
|
|
53961
54093
|
}
|
|
53962
54094
|
)
|
|
53963
54095
|
] })
|
|
@@ -53966,14 +54098,14 @@ var Pagination = ({
|
|
|
53966
54098
|
};
|
|
53967
54099
|
|
|
53968
54100
|
// src/components/Popover/Popover.tsx
|
|
53969
|
-
var
|
|
54101
|
+
var React14 = __toESM(require("react"));
|
|
53970
54102
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
53971
|
-
var
|
|
54103
|
+
var import_jsx_runtime1240 = require("react/jsx-runtime");
|
|
53972
54104
|
var Popover = PopoverPrimitive.Root;
|
|
53973
54105
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
53974
|
-
var PopoverContent =
|
|
54106
|
+
var PopoverContent = React14.forwardRef((_a, ref) => {
|
|
53975
54107
|
var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
|
|
53976
|
-
return /* @__PURE__ */ (0,
|
|
54108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1240.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime1240.jsx)(
|
|
53977
54109
|
PopoverPrimitive.Content,
|
|
53978
54110
|
__spreadValues({
|
|
53979
54111
|
ref,
|
|
@@ -53989,16 +54121,16 @@ var PopoverContent = React13.forwardRef((_a, ref) => {
|
|
|
53989
54121
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
53990
54122
|
|
|
53991
54123
|
// src/components/Select/Select.tsx
|
|
53992
|
-
var
|
|
54124
|
+
var React15 = __toESM(require("react"));
|
|
53993
54125
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
53994
|
-
var
|
|
54126
|
+
var import_jsx_runtime1241 = require("react/jsx-runtime");
|
|
53995
54127
|
var Select = SelectPrimitive.Root;
|
|
53996
54128
|
var SelectGroup = SelectPrimitive.Group;
|
|
53997
54129
|
var SelectValue = SelectPrimitive.Value;
|
|
53998
|
-
var SelectTrigger =
|
|
54130
|
+
var SelectTrigger = React15.forwardRef((_a, ref) => {
|
|
53999
54131
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
54000
54132
|
const isDisabled = props["data-is-disabled"];
|
|
54001
|
-
return /* @__PURE__ */ (0,
|
|
54133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1241.jsxs)(
|
|
54002
54134
|
SelectPrimitive.Trigger,
|
|
54003
54135
|
__spreadProps(__spreadValues({
|
|
54004
54136
|
ref,
|
|
@@ -54015,15 +54147,15 @@ var SelectTrigger = React14.forwardRef((_a, ref) => {
|
|
|
54015
54147
|
}, props), {
|
|
54016
54148
|
children: [
|
|
54017
54149
|
children,
|
|
54018
|
-
/* @__PURE__ */ (0,
|
|
54150
|
+
/* @__PURE__ */ (0, import_jsx_runtime1241.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime1241.jsx)(ChevronSelectorVerticalIcon, { size: "16", className: "w-4 h-4 opacity-50" }) })
|
|
54019
54151
|
]
|
|
54020
54152
|
})
|
|
54021
54153
|
);
|
|
54022
54154
|
});
|
|
54023
54155
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
54024
|
-
var SelectContent =
|
|
54156
|
+
var SelectContent = React15.forwardRef((_a, ref) => {
|
|
54025
54157
|
var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
|
|
54026
|
-
return /* @__PURE__ */ (0,
|
|
54158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1241.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime1241.jsx)(
|
|
54027
54159
|
SelectPrimitive.Content,
|
|
54028
54160
|
__spreadProps(__spreadValues({
|
|
54029
54161
|
ref,
|
|
@@ -54034,7 +54166,7 @@ var SelectContent = React14.forwardRef((_a, ref) => {
|
|
|
54034
54166
|
),
|
|
54035
54167
|
position
|
|
54036
54168
|
}, props), {
|
|
54037
|
-
children: /* @__PURE__ */ (0,
|
|
54169
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1241.jsx)(
|
|
54038
54170
|
SelectPrimitive.Viewport,
|
|
54039
54171
|
{
|
|
54040
54172
|
className: cn(
|
|
@@ -54048,9 +54180,9 @@ var SelectContent = React14.forwardRef((_a, ref) => {
|
|
|
54048
54180
|
) });
|
|
54049
54181
|
});
|
|
54050
54182
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
54051
|
-
var SelectLabel =
|
|
54183
|
+
var SelectLabel = React15.forwardRef((_a, ref) => {
|
|
54052
54184
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54053
|
-
return /* @__PURE__ */ (0,
|
|
54185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1241.jsx)(
|
|
54054
54186
|
SelectPrimitive.Label,
|
|
54055
54187
|
__spreadValues({
|
|
54056
54188
|
ref,
|
|
@@ -54059,9 +54191,9 @@ var SelectLabel = React14.forwardRef((_a, ref) => {
|
|
|
54059
54191
|
);
|
|
54060
54192
|
});
|
|
54061
54193
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
54062
|
-
var SelectItem =
|
|
54194
|
+
var SelectItem = React15.forwardRef((_a, ref) => {
|
|
54063
54195
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
54064
|
-
return /* @__PURE__ */ (0,
|
|
54196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1241.jsx)(
|
|
54065
54197
|
SelectPrimitive.Item,
|
|
54066
54198
|
__spreadProps(__spreadValues({
|
|
54067
54199
|
ref,
|
|
@@ -54070,14 +54202,14 @@ var SelectItem = React14.forwardRef((_a, ref) => {
|
|
|
54070
54202
|
className
|
|
54071
54203
|
)
|
|
54072
54204
|
}, props), {
|
|
54073
|
-
children: /* @__PURE__ */ (0,
|
|
54205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1241.jsx)(SelectPrimitive.ItemText, { children })
|
|
54074
54206
|
})
|
|
54075
54207
|
);
|
|
54076
54208
|
});
|
|
54077
54209
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
54078
|
-
var SelectSeparator =
|
|
54210
|
+
var SelectSeparator = React15.forwardRef((_a, ref) => {
|
|
54079
54211
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54080
|
-
return /* @__PURE__ */ (0,
|
|
54212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1241.jsx)(
|
|
54081
54213
|
SelectPrimitive.Separator,
|
|
54082
54214
|
__spreadValues({
|
|
54083
54215
|
ref,
|
|
@@ -54088,12 +54220,12 @@ var SelectSeparator = React14.forwardRef((_a, ref) => {
|
|
|
54088
54220
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
54089
54221
|
|
|
54090
54222
|
// src/components/Switch/Switch.tsx
|
|
54091
|
-
var
|
|
54223
|
+
var React16 = __toESM(require("react"));
|
|
54092
54224
|
var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"));
|
|
54093
|
-
var
|
|
54094
|
-
var Switch =
|
|
54225
|
+
var import_jsx_runtime1242 = require("react/jsx-runtime");
|
|
54226
|
+
var Switch = React16.forwardRef((_a, ref) => {
|
|
54095
54227
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54096
|
-
return /* @__PURE__ */ (0,
|
|
54228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1242.jsx)(
|
|
54097
54229
|
SwitchPrimitive.Root,
|
|
54098
54230
|
__spreadProps(__spreadValues({
|
|
54099
54231
|
className: cn(
|
|
@@ -54102,18 +54234,18 @@ var Switch = React15.forwardRef((_a, ref) => {
|
|
|
54102
54234
|
)
|
|
54103
54235
|
}, props), {
|
|
54104
54236
|
ref,
|
|
54105
|
-
children: /* @__PURE__ */ (0,
|
|
54237
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1242.jsx)(SwitchPrimitive.Thumb, { className: "inline-block w-4 h-4 bg-gray-600 rounded-full translate-x-0.5 data-[state=checked]:translate-x-5 data-[state=checked]:bg-white transition-transform ease-linear will-change-transform" })
|
|
54106
54238
|
})
|
|
54107
54239
|
);
|
|
54108
54240
|
});
|
|
54109
54241
|
Switch.displayName = SwitchPrimitive.Root.displayName;
|
|
54110
54242
|
|
|
54111
54243
|
// src/components/Table/Table.tsx
|
|
54112
|
-
var
|
|
54113
|
-
var
|
|
54114
|
-
var Table =
|
|
54244
|
+
var React17 = __toESM(require("react"));
|
|
54245
|
+
var import_jsx_runtime1243 = require("react/jsx-runtime");
|
|
54246
|
+
var Table = React17.forwardRef((_a, ref) => {
|
|
54115
54247
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54116
|
-
return /* @__PURE__ */ (0,
|
|
54248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1243.jsx)("div", { className: "w-full overflow-auto border rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime1243.jsx)(
|
|
54117
54249
|
"table",
|
|
54118
54250
|
__spreadValues({
|
|
54119
54251
|
ref,
|
|
@@ -54122,9 +54254,9 @@ var Table = React16.forwardRef((_a, ref) => {
|
|
|
54122
54254
|
) });
|
|
54123
54255
|
});
|
|
54124
54256
|
Table.displayName = "Table";
|
|
54125
|
-
var TableHeader =
|
|
54257
|
+
var TableHeader = React17.forwardRef((_a, ref) => {
|
|
54126
54258
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54127
|
-
return /* @__PURE__ */ (0,
|
|
54259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1243.jsx)(
|
|
54128
54260
|
"thead",
|
|
54129
54261
|
__spreadValues({
|
|
54130
54262
|
ref,
|
|
@@ -54133,9 +54265,9 @@ var TableHeader = React16.forwardRef((_a, ref) => {
|
|
|
54133
54265
|
);
|
|
54134
54266
|
});
|
|
54135
54267
|
TableHeader.displayName = "TableHeader";
|
|
54136
|
-
var TableBody =
|
|
54268
|
+
var TableBody = React17.forwardRef((_a, ref) => {
|
|
54137
54269
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54138
|
-
return /* @__PURE__ */ (0,
|
|
54270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1243.jsx)(
|
|
54139
54271
|
"tbody",
|
|
54140
54272
|
__spreadValues({
|
|
54141
54273
|
ref,
|
|
@@ -54147,9 +54279,9 @@ var TableBody = React16.forwardRef((_a, ref) => {
|
|
|
54147
54279
|
);
|
|
54148
54280
|
});
|
|
54149
54281
|
TableBody.displayName = "TableBody";
|
|
54150
|
-
var TableRow =
|
|
54282
|
+
var TableRow = React17.forwardRef((_a, ref) => {
|
|
54151
54283
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54152
|
-
return /* @__PURE__ */ (0,
|
|
54284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1243.jsx)(
|
|
54153
54285
|
"tr",
|
|
54154
54286
|
__spreadValues({
|
|
54155
54287
|
ref,
|
|
@@ -54161,9 +54293,9 @@ var TableRow = React16.forwardRef((_a, ref) => {
|
|
|
54161
54293
|
);
|
|
54162
54294
|
});
|
|
54163
54295
|
TableRow.displayName = "TableRow";
|
|
54164
|
-
var TableHead =
|
|
54296
|
+
var TableHead = React17.forwardRef((_a, ref) => {
|
|
54165
54297
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54166
|
-
return /* @__PURE__ */ (0,
|
|
54298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1243.jsx)(
|
|
54167
54299
|
"th",
|
|
54168
54300
|
__spreadValues({
|
|
54169
54301
|
ref,
|
|
@@ -54175,9 +54307,9 @@ var TableHead = React16.forwardRef((_a, ref) => {
|
|
|
54175
54307
|
);
|
|
54176
54308
|
});
|
|
54177
54309
|
TableHead.displayName = "TableHead";
|
|
54178
|
-
var TableCell =
|
|
54310
|
+
var TableCell = React17.forwardRef((_a, ref) => {
|
|
54179
54311
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54180
|
-
return /* @__PURE__ */ (0,
|
|
54312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1243.jsx)(
|
|
54181
54313
|
"td",
|
|
54182
54314
|
__spreadValues({
|
|
54183
54315
|
ref,
|
|
@@ -54189,18 +54321,18 @@ var TableCell = React16.forwardRef((_a, ref) => {
|
|
|
54189
54321
|
);
|
|
54190
54322
|
});
|
|
54191
54323
|
TableCell.displayName = "TableCell";
|
|
54192
|
-
var TableEmpty =
|
|
54324
|
+
var TableEmpty = React17.forwardRef((_a, ref) => {
|
|
54193
54325
|
var _b = _a, { className, title, description, children } = _b, props = __objRest(_b, ["className", "title", "description", "children"]);
|
|
54194
|
-
return /* @__PURE__ */ (0,
|
|
54326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1243.jsxs)(
|
|
54195
54327
|
"div",
|
|
54196
54328
|
__spreadProps(__spreadValues({
|
|
54197
54329
|
ref,
|
|
54198
54330
|
className: cn("flex flex-col gap-6 items-center py-12", className)
|
|
54199
54331
|
}, props), {
|
|
54200
54332
|
children: [
|
|
54201
|
-
title && /* @__PURE__ */ (0,
|
|
54202
|
-
description && /* @__PURE__ */ (0,
|
|
54203
|
-
/* @__PURE__ */ (0,
|
|
54333
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime1243.jsx)("span", { className: "text-lg font-semibold text-gray-1000", children: title }),
|
|
54334
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime1243.jsx)("span", { className: "text-sm font-normal text-gray-900", children: description }),
|
|
54335
|
+
/* @__PURE__ */ (0, import_jsx_runtime1243.jsx)("div", { children })
|
|
54204
54336
|
]
|
|
54205
54337
|
})
|
|
54206
54338
|
);
|
|
@@ -54208,13 +54340,13 @@ var TableEmpty = React16.forwardRef((_a, ref) => {
|
|
|
54208
54340
|
TableEmpty.displayName = "TableEmpty";
|
|
54209
54341
|
|
|
54210
54342
|
// src/components/Tabs/Tabs.tsx
|
|
54211
|
-
var
|
|
54343
|
+
var React18 = __toESM(require("react"));
|
|
54212
54344
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
|
54213
|
-
var
|
|
54345
|
+
var import_jsx_runtime1244 = require("react/jsx-runtime");
|
|
54214
54346
|
var Tabs = TabsPrimitive.Root;
|
|
54215
|
-
var TabsList =
|
|
54347
|
+
var TabsList = React18.forwardRef((_a, ref) => {
|
|
54216
54348
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54217
|
-
return /* @__PURE__ */ (0,
|
|
54349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1244.jsx)(
|
|
54218
54350
|
TabsPrimitive.List,
|
|
54219
54351
|
__spreadValues({
|
|
54220
54352
|
ref,
|
|
@@ -54226,9 +54358,9 @@ var TabsList = React17.forwardRef((_a, ref) => {
|
|
|
54226
54358
|
);
|
|
54227
54359
|
});
|
|
54228
54360
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
54229
|
-
var TabsTrigger =
|
|
54361
|
+
var TabsTrigger = React18.forwardRef((_a, ref) => {
|
|
54230
54362
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54231
|
-
return /* @__PURE__ */ (0,
|
|
54363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1244.jsx)(
|
|
54232
54364
|
TabsPrimitive.Trigger,
|
|
54233
54365
|
__spreadValues({
|
|
54234
54366
|
ref,
|
|
@@ -54243,9 +54375,9 @@ var TabsTrigger = React17.forwardRef((_a, ref) => {
|
|
|
54243
54375
|
);
|
|
54244
54376
|
});
|
|
54245
54377
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
54246
|
-
var TabsContent =
|
|
54378
|
+
var TabsContent = React18.forwardRef((_a, ref) => {
|
|
54247
54379
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54248
|
-
return /* @__PURE__ */ (0,
|
|
54380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1244.jsx)(
|
|
54249
54381
|
TabsPrimitive.Content,
|
|
54250
54382
|
__spreadValues({
|
|
54251
54383
|
ref,
|
|
@@ -54259,13 +54391,13 @@ var TabsContent = React17.forwardRef((_a, ref) => {
|
|
|
54259
54391
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
54260
54392
|
|
|
54261
54393
|
// src/components/Textarea/Textarea.tsx
|
|
54262
|
-
var
|
|
54263
|
-
var
|
|
54264
|
-
var Textarea =
|
|
54394
|
+
var React19 = __toESM(require("react"));
|
|
54395
|
+
var import_jsx_runtime1245 = require("react/jsx-runtime");
|
|
54396
|
+
var Textarea = React19.forwardRef(
|
|
54265
54397
|
(_a, ref) => {
|
|
54266
54398
|
var _b = _a, { className, disabled } = _b, props = __objRest(_b, ["className", "disabled"]);
|
|
54267
54399
|
const isDisabled = !!props["data-is-disabled"] || disabled;
|
|
54268
|
-
return /* @__PURE__ */ (0,
|
|
54400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1245.jsx)("div", { className: "flex gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime1245.jsx)(
|
|
54269
54401
|
"div",
|
|
54270
54402
|
{
|
|
54271
54403
|
className: cn(
|
|
@@ -54276,7 +54408,7 @@ var Textarea = React18.forwardRef(
|
|
|
54276
54408
|
},
|
|
54277
54409
|
className
|
|
54278
54410
|
),
|
|
54279
|
-
children: /* @__PURE__ */ (0,
|
|
54411
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1245.jsx)(
|
|
54280
54412
|
"textarea",
|
|
54281
54413
|
__spreadProps(__spreadValues({}, props), {
|
|
54282
54414
|
disabled: isDisabled,
|
|
@@ -54291,19 +54423,19 @@ var Textarea = React18.forwardRef(
|
|
|
54291
54423
|
Textarea.displayName = "Textarea";
|
|
54292
54424
|
|
|
54293
54425
|
// src/components/Toaster/Toast.tsx
|
|
54294
|
-
var
|
|
54426
|
+
var React20 = __toESM(require("react"));
|
|
54295
54427
|
var ToastPrimitives = __toESM(require("@radix-ui/react-toast"));
|
|
54296
54428
|
var import_class_variance_authority4 = require("class-variance-authority");
|
|
54297
|
-
var
|
|
54429
|
+
var import_jsx_runtime1246 = require("react/jsx-runtime");
|
|
54298
54430
|
var ToastProvider = ToastPrimitives.Provider;
|
|
54299
|
-
var ToastViewport =
|
|
54431
|
+
var ToastViewport = React20.forwardRef((_a, ref) => {
|
|
54300
54432
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54301
|
-
return /* @__PURE__ */ (0,
|
|
54433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1246.jsx)(
|
|
54302
54434
|
ToastPrimitives.Viewport,
|
|
54303
54435
|
__spreadValues({
|
|
54304
54436
|
ref,
|
|
54305
54437
|
className: cn(
|
|
54306
|
-
"fixed top-8 left-1/2 -translate-x-1/2 z-[100] flex max-h-screen flex-col-reverse sm:flex-col md:max-w-[420px]",
|
|
54438
|
+
"fixed top-8 left-1/2 -translate-x-1/2 z-[100] flex max-h-screen flex-col-reverse sm:flex-col w-max md:max-w-[420px]",
|
|
54307
54439
|
className
|
|
54308
54440
|
)
|
|
54309
54441
|
}, props)
|
|
@@ -54324,9 +54456,9 @@ var toastVariants = (0, import_class_variance_authority4.cva)(
|
|
|
54324
54456
|
}
|
|
54325
54457
|
}
|
|
54326
54458
|
);
|
|
54327
|
-
var Toast =
|
|
54459
|
+
var Toast = React20.forwardRef((_a, ref) => {
|
|
54328
54460
|
var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
|
|
54329
|
-
return /* @__PURE__ */ (0,
|
|
54461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1246.jsx)(
|
|
54330
54462
|
ToastPrimitives.Root,
|
|
54331
54463
|
__spreadValues({
|
|
54332
54464
|
ref,
|
|
@@ -54335,28 +54467,28 @@ var Toast = React19.forwardRef((_a, ref) => {
|
|
|
54335
54467
|
);
|
|
54336
54468
|
});
|
|
54337
54469
|
Toast.displayName = ToastPrimitives.Root.displayName;
|
|
54338
|
-
var ToastAction =
|
|
54470
|
+
var ToastAction = React20.forwardRef((_a, ref) => {
|
|
54339
54471
|
var _b = _a, { className, altText } = _b, props = __objRest(_b, ["className", "altText"]);
|
|
54340
|
-
return /* @__PURE__ */ (0,
|
|
54472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1246.jsx)(ToastPrimitives.Action, { altText, ref, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime1246.jsx)(Button, __spreadValues({ size: "xs" }, props)) });
|
|
54341
54473
|
});
|
|
54342
54474
|
ToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
54343
|
-
var ToastClose =
|
|
54475
|
+
var ToastClose = React20.forwardRef((_a, ref) => {
|
|
54344
54476
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54345
|
-
return /* @__PURE__ */ (0,
|
|
54477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1246.jsx)(
|
|
54346
54478
|
ToastPrimitives.Close,
|
|
54347
54479
|
__spreadProps(__spreadValues({
|
|
54348
54480
|
ref,
|
|
54349
54481
|
className: cn("focus:outline-none focus:ring-1", className),
|
|
54350
54482
|
"toast-close": ""
|
|
54351
54483
|
}, props), {
|
|
54352
|
-
children: /* @__PURE__ */ (0,
|
|
54484
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime1246.jsx)(XCloseIcon, { className: "text-white", size: 16 })
|
|
54353
54485
|
})
|
|
54354
54486
|
);
|
|
54355
54487
|
});
|
|
54356
54488
|
ToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
54357
|
-
var ToastTitle =
|
|
54489
|
+
var ToastTitle = React20.forwardRef((_a, ref) => {
|
|
54358
54490
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54359
|
-
return /* @__PURE__ */ (0,
|
|
54491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1246.jsx)(
|
|
54360
54492
|
ToastPrimitives.Title,
|
|
54361
54493
|
__spreadValues({
|
|
54362
54494
|
ref,
|
|
@@ -54365,9 +54497,9 @@ var ToastTitle = React19.forwardRef((_a, ref) => {
|
|
|
54365
54497
|
);
|
|
54366
54498
|
});
|
|
54367
54499
|
ToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
54368
|
-
var ToastDescription =
|
|
54500
|
+
var ToastDescription = React20.forwardRef((_a, ref) => {
|
|
54369
54501
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54370
|
-
return /* @__PURE__ */ (0,
|
|
54502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1246.jsx)(
|
|
54371
54503
|
ToastPrimitives.Description,
|
|
54372
54504
|
__spreadValues({
|
|
54373
54505
|
ref,
|
|
@@ -54378,10 +54510,10 @@ var ToastDescription = React19.forwardRef((_a, ref) => {
|
|
|
54378
54510
|
ToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
54379
54511
|
|
|
54380
54512
|
// src/components/Toaster/Toaster.tsx
|
|
54381
|
-
var
|
|
54513
|
+
var import_react1231 = __toESM(require("react"));
|
|
54382
54514
|
|
|
54383
54515
|
// src/components/Toaster/useToast.tsx
|
|
54384
|
-
var
|
|
54516
|
+
var React21 = __toESM(require("react"));
|
|
54385
54517
|
var TOAST_LIMIT = 3;
|
|
54386
54518
|
var TOAST_REMOVE_DELAY = 1e6;
|
|
54387
54519
|
var count = 0;
|
|
@@ -54490,8 +54622,8 @@ var toast = (parentId) => (_a) => {
|
|
|
54490
54622
|
};
|
|
54491
54623
|
};
|
|
54492
54624
|
function useToast({ toasterId = "default" } = {}) {
|
|
54493
|
-
const [state, setState] =
|
|
54494
|
-
|
|
54625
|
+
const [state, setState] = React21.useState(memoryState);
|
|
54626
|
+
React21.useEffect(() => {
|
|
54495
54627
|
listeners.push(setState);
|
|
54496
54628
|
return () => {
|
|
54497
54629
|
const index = listeners.indexOf(setState);
|
|
@@ -54507,7 +54639,7 @@ function useToast({ toasterId = "default" } = {}) {
|
|
|
54507
54639
|
}
|
|
54508
54640
|
|
|
54509
54641
|
// src/components/Toaster/Toaster.tsx
|
|
54510
|
-
var
|
|
54642
|
+
var import_jsx_runtime1247 = require("react/jsx-runtime");
|
|
54511
54643
|
var ToastContent = ({
|
|
54512
54644
|
title,
|
|
54513
54645
|
description,
|
|
@@ -54515,19 +54647,19 @@ var ToastContent = ({
|
|
|
54515
54647
|
actions,
|
|
54516
54648
|
hideClose
|
|
54517
54649
|
}) => {
|
|
54518
|
-
return /* @__PURE__ */ (0,
|
|
54519
|
-
/* @__PURE__ */ (0,
|
|
54520
|
-
/* @__PURE__ */ (0,
|
|
54521
|
-
icon &&
|
|
54650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1247.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
54651
|
+
/* @__PURE__ */ (0, import_jsx_runtime1247.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
54652
|
+
/* @__PURE__ */ (0, import_jsx_runtime1247.jsxs)("div", { className: "flex items-center flex-grow gap-2", children: [
|
|
54653
|
+
icon && import_react1231.default.cloneElement(icon, {
|
|
54522
54654
|
size: 16,
|
|
54523
54655
|
className: cn("shrink-0", icon.props.className)
|
|
54524
54656
|
}),
|
|
54525
|
-
title && /* @__PURE__ */ (0,
|
|
54657
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime1247.jsx)(ToastTitle, { children: title })
|
|
54526
54658
|
] }),
|
|
54527
54659
|
actions,
|
|
54528
|
-
!hideClose && /* @__PURE__ */ (0,
|
|
54660
|
+
!hideClose && /* @__PURE__ */ (0, import_jsx_runtime1247.jsx)(ToastClose, {})
|
|
54529
54661
|
] }),
|
|
54530
|
-
description && /* @__PURE__ */ (0,
|
|
54662
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime1247.jsx)(ToastDescription, { children: description })
|
|
54531
54663
|
] });
|
|
54532
54664
|
};
|
|
54533
54665
|
function Toaster(_a) {
|
|
@@ -54539,7 +54671,7 @@ function Toaster(_a) {
|
|
|
54539
54671
|
"toasterId"
|
|
54540
54672
|
]);
|
|
54541
54673
|
const { toasts } = useToast({ toasterId });
|
|
54542
|
-
return /* @__PURE__ */ (0,
|
|
54674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1247.jsxs)(ToastProvider, __spreadProps(__spreadValues({}, props), { children: [
|
|
54543
54675
|
toasts.filter((t) => t.parentId === toasterId).map(
|
|
54544
54676
|
(_a2) => {
|
|
54545
54677
|
var _b2 = _a2, {
|
|
@@ -54559,7 +54691,7 @@ function Toaster(_a) {
|
|
|
54559
54691
|
"icon",
|
|
54560
54692
|
"hideClose"
|
|
54561
54693
|
]);
|
|
54562
|
-
return /* @__PURE__ */ (0,
|
|
54694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1247.jsx)(Toast, __spreadProps(__spreadValues({}, props2), { children: /* @__PURE__ */ (0, import_jsx_runtime1247.jsx)(
|
|
54563
54695
|
ToastContent,
|
|
54564
54696
|
{
|
|
54565
54697
|
title,
|
|
@@ -54571,27 +54703,27 @@ function Toaster(_a) {
|
|
|
54571
54703
|
) }), id);
|
|
54572
54704
|
}
|
|
54573
54705
|
),
|
|
54574
|
-
/* @__PURE__ */ (0,
|
|
54706
|
+
/* @__PURE__ */ (0, import_jsx_runtime1247.jsx)(ToastViewport, { className })
|
|
54575
54707
|
] }));
|
|
54576
54708
|
}
|
|
54577
54709
|
|
|
54578
54710
|
// src/components/Tooltip/Tooltip.tsx
|
|
54579
|
-
var
|
|
54711
|
+
var React23 = __toESM(require("react"));
|
|
54580
54712
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
54581
|
-
var
|
|
54713
|
+
var import_jsx_runtime1248 = require("react/jsx-runtime");
|
|
54582
54714
|
var TooltipProvider = (_a) => {
|
|
54583
54715
|
var _b = _a, {
|
|
54584
54716
|
delayDuration = 0
|
|
54585
54717
|
} = _b, props = __objRest(_b, [
|
|
54586
54718
|
"delayDuration"
|
|
54587
54719
|
]);
|
|
54588
|
-
return /* @__PURE__ */ (0,
|
|
54720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1248.jsx)(TooltipPrimitive.Provider, __spreadValues({ delayDuration }, props));
|
|
54589
54721
|
};
|
|
54590
54722
|
var Tooltip = TooltipPrimitive.Root;
|
|
54591
54723
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
54592
|
-
var TooltipContent =
|
|
54724
|
+
var TooltipContent = React23.forwardRef((_a, ref) => {
|
|
54593
54725
|
var _b = _a, { className, sideOffset = 4 } = _b, props = __objRest(_b, ["className", "sideOffset"]);
|
|
54594
|
-
return /* @__PURE__ */ (0,
|
|
54726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime1248.jsx)(
|
|
54595
54727
|
TooltipPrimitive.Content,
|
|
54596
54728
|
__spreadValues({
|
|
54597
54729
|
ref,
|
|
@@ -54969,6 +55101,7 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
|
54969
55101
|
CornerUpRightIcon,
|
|
54970
55102
|
CpuChip1Icon,
|
|
54971
55103
|
CpuChip2Icon,
|
|
55104
|
+
CreatableSelect,
|
|
54972
55105
|
CreditCard1Icon,
|
|
54973
55106
|
CreditCard2Icon,
|
|
54974
55107
|
CreditCardCheckIcon,
|