@deepnoid/ui 0.1.13 → 0.1.16
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/.turbo/turbo-build.log +157 -147
- package/dist/{chunk-TTY3EEXX.mjs → chunk-2PKM7SLZ.mjs} +4 -4
- package/dist/{chunk-56VCX2QR.mjs → chunk-33LANVZV.mjs} +3 -3
- package/dist/{chunk-2KAR2PTQ.mjs → chunk-36JC3WXM.mjs} +3 -3
- package/dist/{chunk-YQGZRSUQ.mjs → chunk-3MPMVCR7.mjs} +3 -3
- package/dist/{chunk-2ZT6V4QR.mjs → chunk-4ZJFD3L3.mjs} +54 -7
- package/dist/{chunk-ZMJYDLTS.mjs → chunk-CU6CIHC2.mjs} +5 -5
- package/dist/chunk-DQRAFUDA.mjs +1 -0
- package/dist/{chunk-O5UA4WDU.mjs → chunk-EDRRWKRE.mjs} +10 -7
- package/dist/{chunk-OQS4LGZK.mjs → chunk-H4UNPIQJ.mjs} +1 -1
- package/dist/{chunk-NEUCUEIG.mjs → chunk-IB424QKO.mjs} +4 -4
- package/dist/{chunk-U2YKMXVG.mjs → chunk-IL5ENWCR.mjs} +3 -3
- package/dist/{chunk-T5LK5CJS.mjs → chunk-KCPPDCLS.mjs} +4 -5
- package/dist/{chunk-56RN6YOP.mjs → chunk-LNNTSCMC.mjs} +3 -3
- package/dist/{chunk-WB24YDE2.mjs → chunk-LPZOH3RP.mjs} +1 -1
- package/dist/chunk-M37VBNB3.mjs +44 -0
- package/dist/{chunk-6G7GOPSB.mjs → chunk-OKLT5ESS.mjs} +5 -5
- package/dist/{chunk-HJZWSGUX.mjs → chunk-P5QCU457.mjs} +3 -3
- package/dist/{chunk-NJ4PBW65.mjs → chunk-P6NVCCBZ.mjs} +1 -1
- package/dist/{chunk-GQS6V47G.mjs → chunk-QEXS35XA.mjs} +1 -1
- package/dist/{chunk-4GLKWK3Z.mjs → chunk-S6DHANZX.mjs} +3 -3
- package/dist/{chunk-ZEZ6ZA3N.mjs → chunk-SSMMWMQC.mjs} +3 -3
- package/dist/{chunk-VVOOYDJS.mjs → chunk-UFVQPPPW.mjs} +3 -3
- package/dist/{chunk-7R4QY3TA.mjs → chunk-UYPVP36M.mjs} +1 -1
- package/dist/{chunk-M2IRRTFM.mjs → chunk-V3DWFAL7.mjs} +18 -15
- package/dist/{chunk-7R4NOC2G.mjs → chunk-VBY63YVZ.mjs} +4 -4
- package/dist/{chunk-57WBWSSL.mjs → chunk-XBIHKPK4.mjs} +4 -4
- package/dist/{chunk-LP724WOP.mjs → chunk-XKEXTBMD.mjs} +3 -3
- package/dist/{chunk-GXWSYM7Z.mjs → chunk-YD7UPDCV.mjs} +4 -4
- package/dist/{chunk-J5WJD6XZ.mjs → chunk-YLRYHUTW.mjs} +3 -3
- package/dist/{chunk-AHTNXGAY.mjs → chunk-ZQFIB7ZW.mjs} +2 -2
- package/dist/components/avatar/avatar.mjs +2 -2
- package/dist/components/avatar/index.mjs +2 -2
- package/dist/components/backdrop/backdrop.mjs +2 -2
- package/dist/components/backdrop/index.mjs +2 -2
- package/dist/components/breadcrumb/breadcrumb.js +3 -4
- package/dist/components/breadcrumb/breadcrumb.mjs +6 -6
- package/dist/components/breadcrumb/index.js +3 -4
- package/dist/components/breadcrumb/index.mjs +6 -6
- package/dist/components/button/button-group.mjs +2 -2
- package/dist/components/button/button.mjs +2 -2
- package/dist/components/button/icon-button.d.mts +1 -1
- package/dist/components/button/icon-button.d.ts +1 -1
- package/dist/components/button/icon-button.js +2 -2
- package/dist/components/button/icon-button.mjs +2 -2
- package/dist/components/button/index.js +3 -3
- package/dist/components/button/index.mjs +5 -5
- package/dist/components/button/text-button.js +1 -1
- package/dist/components/button/text-button.mjs +2 -2
- package/dist/components/checkbox/checkbox.mjs +2 -2
- package/dist/components/checkbox/index.mjs +2 -2
- package/dist/components/chip/chip.mjs +2 -2
- package/dist/components/chip/index.mjs +2 -2
- package/dist/components/dateTimePicker/calendar.mjs +2 -2
- package/dist/components/dateTimePicker/dateTimePicker.mjs +7 -7
- package/dist/components/dateTimePicker/index.mjs +7 -7
- package/dist/components/dateTimePicker/timePicker.mjs +5 -5
- package/dist/components/input/index.mjs +2 -2
- package/dist/components/input/input.mjs +2 -2
- package/dist/components/list/index.mjs +4 -4
- package/dist/components/list/list.mjs +2 -2
- package/dist/components/list/listItem.mjs +3 -3
- package/dist/components/modal/index.mjs +6 -6
- package/dist/components/modal/modal.mjs +6 -6
- package/dist/components/pagination/index.mjs +3 -3
- package/dist/components/pagination/pagination.mjs +3 -3
- package/dist/components/radio/index.mjs +2 -2
- package/dist/components/radio/radio.mjs +2 -2
- package/dist/components/scroll/index.d.mts +3 -0
- package/dist/components/scroll/index.d.ts +3 -0
- package/dist/components/scroll/index.js +108 -0
- package/dist/components/scroll/index.mjs +10 -0
- package/dist/components/scroll/scrollArea.d.mts +15 -0
- package/dist/components/scroll/scrollArea.d.ts +15 -0
- package/dist/components/scroll/scrollArea.js +102 -0
- package/dist/components/scroll/scrollArea.mjs +9 -0
- package/dist/components/select/index.mjs +3 -3
- package/dist/components/select/option.mjs +2 -2
- package/dist/components/select/select.mjs +3 -3
- package/dist/components/table/index.js +63 -24
- package/dist/components/table/index.mjs +9 -7
- package/dist/components/table/table-body.js +17 -14
- package/dist/components/table/table-body.mjs +3 -3
- package/dist/components/table/table-head.mjs +3 -3
- package/dist/components/table/table.js +63 -24
- package/dist/components/table/table.mjs +9 -7
- package/dist/components/tabs/index.mjs +2 -2
- package/dist/components/tabs/tabs.mjs +2 -2
- package/dist/components/toast/index.mjs +3 -3
- package/dist/components/toast/toast.mjs +2 -2
- package/dist/components/toast/use-toast.mjs +3 -3
- package/dist/components/tooltip/index.mjs +2 -2
- package/dist/components/tooltip/tooltip.mjs +2 -2
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +222 -135
- package/dist/index.mjs +47 -42
- package/dist/utils/tailwind-variants.mjs +1 -1
- package/package.json +1 -1
- package/tailwind.config.ts +1 -4
package/dist/index.js
CHANGED
|
@@ -118,6 +118,7 @@ __export(index_exports, {
|
|
|
118
118
|
Modal: () => modal_default,
|
|
119
119
|
Pagination: () => pagination_default,
|
|
120
120
|
Radio: () => radio_default,
|
|
121
|
+
ScrollArea: () => scrollArea_default,
|
|
121
122
|
Select: () => select_default,
|
|
122
123
|
Switch: () => switch_default,
|
|
123
124
|
Table: () => table_default,
|
|
@@ -4369,6 +4370,59 @@ var getTransColor = (hex, alpha) => {
|
|
|
4369
4370
|
return `rgba(${r},${g},${b},${alpha})`;
|
|
4370
4371
|
};
|
|
4371
4372
|
|
|
4373
|
+
// ../tailwind-config/src/scrollbar/index.ts
|
|
4374
|
+
var scrollbar = {
|
|
4375
|
+
".scrollbar-hide": {
|
|
4376
|
+
"-ms-overflow-style": "none",
|
|
4377
|
+
// IE/Edge
|
|
4378
|
+
"scrollbar-width": "none",
|
|
4379
|
+
// Firefox
|
|
4380
|
+
"&::-webkit-scrollbar": {
|
|
4381
|
+
display: "none"
|
|
4382
|
+
// Chrome/Safari
|
|
4383
|
+
}
|
|
4384
|
+
},
|
|
4385
|
+
".scrollbar-sm": {
|
|
4386
|
+
"&::-webkit-scrollbar": {
|
|
4387
|
+
width: "6px",
|
|
4388
|
+
height: "6px"
|
|
4389
|
+
},
|
|
4390
|
+
"&::-webkit-scrollbar-thumb": {
|
|
4391
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
4392
|
+
borderRadius: "100px"
|
|
4393
|
+
},
|
|
4394
|
+
"&::-webkit-scrollbar-track": {
|
|
4395
|
+
backgroundColor: "#F2F3F4"
|
|
4396
|
+
}
|
|
4397
|
+
},
|
|
4398
|
+
".scrollbar-md": {
|
|
4399
|
+
"&::-webkit-scrollbar": {
|
|
4400
|
+
width: "8px",
|
|
4401
|
+
height: "8px"
|
|
4402
|
+
},
|
|
4403
|
+
"&::-webkit-scrollbar-thumb": {
|
|
4404
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
4405
|
+
borderRadius: "100px"
|
|
4406
|
+
},
|
|
4407
|
+
"&::-webkit-scrollbar-track": {
|
|
4408
|
+
backgroundColor: "#F2F3F4"
|
|
4409
|
+
}
|
|
4410
|
+
},
|
|
4411
|
+
".scrollbar-lg": {
|
|
4412
|
+
"&::-webkit-scrollbar": {
|
|
4413
|
+
width: "10px",
|
|
4414
|
+
height: "10px"
|
|
4415
|
+
},
|
|
4416
|
+
"&::-webkit-scrollbar-thumb": {
|
|
4417
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
4418
|
+
borderRadius: "100px"
|
|
4419
|
+
},
|
|
4420
|
+
"&::-webkit-scrollbar-track": {
|
|
4421
|
+
backgroundColor: "#F2F3F4"
|
|
4422
|
+
}
|
|
4423
|
+
}
|
|
4424
|
+
};
|
|
4425
|
+
|
|
4372
4426
|
// ../tailwind-config/src/plugin.ts
|
|
4373
4427
|
var resolveConfig = (themes = {}, defaultTheme, prefix = "dn") => {
|
|
4374
4428
|
const resolved = {
|
|
@@ -4411,13 +4465,7 @@ var resolveConfig = (themes = {}, defaultTheme, prefix = "dn") => {
|
|
|
4411
4465
|
}
|
|
4412
4466
|
resolved.utilities = {
|
|
4413
4467
|
...resolved.utilities,
|
|
4414
|
-
|
|
4415
|
-
"-ms-overflow-style": "none",
|
|
4416
|
-
"scrollbar-width": "none",
|
|
4417
|
-
"&::-webkit-scrollbar": {
|
|
4418
|
-
display: "none"
|
|
4419
|
-
}
|
|
4420
|
-
},
|
|
4468
|
+
...scrollbar,
|
|
4421
4469
|
".input-arrow-hide": {
|
|
4422
4470
|
"&[type='number']::-webkit-inner-spin-button": {
|
|
4423
4471
|
"-webkit-appearance": "none",
|
|
@@ -5158,7 +5206,7 @@ var import_react5 = require("react");
|
|
|
5158
5206
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
5159
5207
|
var IconButton = (0, import_react5.forwardRef)((props, ref) => {
|
|
5160
5208
|
const [localProps, variantProps] = mapPropsVariants(props, iconButtonStyle.variantKeys);
|
|
5161
|
-
const { classNames,
|
|
5209
|
+
const { classNames, name, disableRipple, isDisabled, isLoading, size, onMouseDown, ...buttonProps } = {
|
|
5162
5210
|
...localProps,
|
|
5163
5211
|
...variantProps
|
|
5164
5212
|
};
|
|
@@ -5190,7 +5238,7 @@ var IconButton = (0, import_react5.forwardRef)((props, ref) => {
|
|
|
5190
5238
|
"data-loading": isLoading,
|
|
5191
5239
|
className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
|
|
5192
5240
|
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon_default, { name: "loading", size, className: "animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
5193
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon_default, { name
|
|
5241
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon_default, { name, size }),
|
|
5194
5242
|
!disableRipple && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ripple_default, { ...rippleProps })
|
|
5195
5243
|
] })
|
|
5196
5244
|
}
|
|
@@ -5566,7 +5614,7 @@ var textButtonStyle = tv({
|
|
|
5566
5614
|
slots: {
|
|
5567
5615
|
base: ["flex", "items-center", "justify-center", "whitespace-nowrap", "overflow-hidden"],
|
|
5568
5616
|
content: [],
|
|
5569
|
-
underline: ["underline", "decoration-skip-ink", "underline-offset-
|
|
5617
|
+
underline: ["underline", "decoration-skip-ink", "underline-offset-auto"]
|
|
5570
5618
|
},
|
|
5571
5619
|
variants: {
|
|
5572
5620
|
variant: {
|
|
@@ -5657,8 +5705,7 @@ var buttonGroup = tv({
|
|
|
5657
5705
|
|
|
5658
5706
|
// src/components/breadcrumb/breadcrumb.tsx
|
|
5659
5707
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
5660
|
-
var BreadcrumbMenu = (0, import_react8.forwardRef)(({ label, onClick, isCurrent, size }
|
|
5661
|
-
const slots = (0, import_react8.useMemo)(() => breadcrumbStyle({ size }), [size]);
|
|
5708
|
+
var BreadcrumbMenu = (0, import_react8.forwardRef)(({ label, onClick, isCurrent, size }) => {
|
|
5662
5709
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
5663
5710
|
text_button_default,
|
|
5664
5711
|
{
|
|
@@ -5712,7 +5759,7 @@ var breadcrumb_default = Breadcrumb;
|
|
|
5712
5759
|
var breadcrumbStyle = tv({
|
|
5713
5760
|
slots: {
|
|
5714
5761
|
base: ["flex", "items-center"],
|
|
5715
|
-
icon: ["
|
|
5762
|
+
icon: ["text-primary-main"],
|
|
5716
5763
|
separator: ["text-neutral-main"]
|
|
5717
5764
|
},
|
|
5718
5765
|
variants: {
|
|
@@ -6476,7 +6523,7 @@ var textareaStyle = (0, import_tailwind_variants11.tv)({
|
|
|
6476
6523
|
|
|
6477
6524
|
// src/components/table/table.tsx
|
|
6478
6525
|
var import_react17 = require("react");
|
|
6479
|
-
var
|
|
6526
|
+
var import_tailwind_variants15 = require("tailwind-variants");
|
|
6480
6527
|
|
|
6481
6528
|
// src/components/checkbox/checkbox.tsx
|
|
6482
6529
|
var import_react12 = require("react");
|
|
@@ -6752,20 +6799,23 @@ var TableBody = ({
|
|
|
6752
6799
|
);
|
|
6753
6800
|
const hasRows = rows.length > 0;
|
|
6754
6801
|
const colSpan = (columns.length || 1) + (selectableRows ? 1 : 0);
|
|
6755
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tbody", { className: slots.tbody({ class: classNames == null ? void 0 : classNames.tbody }), children: [
|
|
6803
|
+
hasRows && rows.map((row, rowIndex) => {
|
|
6804
|
+
const isRowChecked = checkedRows.has(rowIndex);
|
|
6805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "aria-checked": isRowChecked, children: [
|
|
6806
|
+
columns.map((column) => /* @__PURE__ */ (0, import_react14.createElement)("td", { ...getCellProps(column, row), key: column.field })),
|
|
6807
|
+
selectableRows && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
6808
|
+
checkbox_default,
|
|
6809
|
+
{
|
|
6810
|
+
size,
|
|
6811
|
+
checked: isRowChecked,
|
|
6812
|
+
onChange: (e) => onCheckRow(rowIndex, e.target.checked)
|
|
6813
|
+
}
|
|
6814
|
+
) }) })
|
|
6815
|
+
] }, rowIndex);
|
|
6816
|
+
}),
|
|
6817
|
+
!hasRows && emptyContent && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: clsx(slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "border-none"), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { colSpan, className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: emptyContent }) })
|
|
6818
|
+
] });
|
|
6769
6819
|
};
|
|
6770
6820
|
var table_body_default = TableBody;
|
|
6771
6821
|
|
|
@@ -7055,8 +7105,44 @@ var paginationStyle = tv(
|
|
|
7055
7105
|
}
|
|
7056
7106
|
);
|
|
7057
7107
|
|
|
7058
|
-
// src/components/
|
|
7108
|
+
// src/components/scroll/scrollArea.tsx
|
|
7109
|
+
var import_tailwind_variants14 = require("tailwind-variants");
|
|
7059
7110
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
7111
|
+
var ScrollArea = ({ children, className, direction, size }) => {
|
|
7112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: clsx(scrollAreaStyle({ direction, size }), className), children });
|
|
7113
|
+
};
|
|
7114
|
+
ScrollArea.displayName = "ScrollArea";
|
|
7115
|
+
var scrollArea_default = ScrollArea;
|
|
7116
|
+
var scrollAreaStyle = (0, import_tailwind_variants14.tv)({
|
|
7117
|
+
base: [
|
|
7118
|
+
"h-full",
|
|
7119
|
+
"x-full",
|
|
7120
|
+
"scrollbar-thumb-trans-soft",
|
|
7121
|
+
"hover:scrollbar-thumb-neutral-light",
|
|
7122
|
+
"scrollbar-track-neutral-soft",
|
|
7123
|
+
"scrollbar-button-neutral-main"
|
|
7124
|
+
],
|
|
7125
|
+
variants: {
|
|
7126
|
+
direction: {
|
|
7127
|
+
x: ["overflow-x-auto", "overflow-y-hidden"],
|
|
7128
|
+
y: ["overflow-y-auto", "overflow-x-hidden"],
|
|
7129
|
+
both: ["overflow-auto"]
|
|
7130
|
+
},
|
|
7131
|
+
size: {
|
|
7132
|
+
sm: ["scrollbar-sm"],
|
|
7133
|
+
// "scrollbar-thin",
|
|
7134
|
+
md: ["scrollbar-md"],
|
|
7135
|
+
lg: ["scrollbar-lg"]
|
|
7136
|
+
}
|
|
7137
|
+
},
|
|
7138
|
+
defaultVariants: {
|
|
7139
|
+
direction: "both",
|
|
7140
|
+
size: "md"
|
|
7141
|
+
}
|
|
7142
|
+
});
|
|
7143
|
+
|
|
7144
|
+
// src/components/table/table.tsx
|
|
7145
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
7060
7146
|
var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
7061
7147
|
const [props, variantProps] = mapPropsVariants(originalProps, tableStyle.variantKeys);
|
|
7062
7148
|
const {
|
|
@@ -7093,9 +7179,9 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
7093
7179
|
setCheckedRows(newChecked);
|
|
7094
7180
|
};
|
|
7095
7181
|
const slots = (0, import_react17.useMemo)(() => tableStyle(variantProps), [variantProps]);
|
|
7096
|
-
return /* @__PURE__ */ (0,
|
|
7097
|
-
/* @__PURE__ */ (0,
|
|
7098
|
-
/* @__PURE__ */ (0,
|
|
7182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { ref: divRef, "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
7183
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(scrollArea_default, { size: size === "xl" ? "lg" : size, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: [
|
|
7184
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
7099
7185
|
table_head_default,
|
|
7100
7186
|
{
|
|
7101
7187
|
columns,
|
|
@@ -7107,7 +7193,7 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
7107
7193
|
slots
|
|
7108
7194
|
}
|
|
7109
7195
|
),
|
|
7110
|
-
/* @__PURE__ */ (0,
|
|
7196
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
7111
7197
|
table_body_default,
|
|
7112
7198
|
{
|
|
7113
7199
|
slots,
|
|
@@ -7121,8 +7207,8 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
7121
7207
|
classNames
|
|
7122
7208
|
}
|
|
7123
7209
|
)
|
|
7124
|
-
] }),
|
|
7125
|
-
showPagination && /* @__PURE__ */ (0,
|
|
7210
|
+
] }) }),
|
|
7211
|
+
showPagination && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
7126
7212
|
pagination_default,
|
|
7127
7213
|
{
|
|
7128
7214
|
color,
|
|
@@ -7136,9 +7222,9 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
7136
7222
|
});
|
|
7137
7223
|
Table.displayName = "Table";
|
|
7138
7224
|
var table_default = Table;
|
|
7139
|
-
var tableStyle = (0,
|
|
7225
|
+
var tableStyle = (0, import_tailwind_variants15.tv)({
|
|
7140
7226
|
slots: {
|
|
7141
|
-
base: ["flex", "flex-col", "relative", "select-none"],
|
|
7227
|
+
base: ["flex", "flex-col", "relative", "select-none", "gap-[20px]"],
|
|
7142
7228
|
table: ["w-full", "h-auto"],
|
|
7143
7229
|
thead: ["w-full"],
|
|
7144
7230
|
tbody: ["w-full"],
|
|
@@ -7404,10 +7490,10 @@ var useSelect = ({ options, defaultOption, onChange }) => {
|
|
|
7404
7490
|
};
|
|
7405
7491
|
|
|
7406
7492
|
// src/components/select/option.tsx
|
|
7407
|
-
var
|
|
7493
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
7408
7494
|
var Option = (props) => {
|
|
7409
7495
|
const { base, option, icon } = optionStyle(props);
|
|
7410
|
-
return /* @__PURE__ */ (0,
|
|
7496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
7411
7497
|
"div",
|
|
7412
7498
|
{
|
|
7413
7499
|
title: props.option.value,
|
|
@@ -7417,8 +7503,8 @@ var Option = (props) => {
|
|
|
7417
7503
|
props.isSelected && (node == null ? void 0 : node.scrollIntoView());
|
|
7418
7504
|
},
|
|
7419
7505
|
children: [
|
|
7420
|
-
/* @__PURE__ */ (0,
|
|
7421
|
-
props.isSelected && /* @__PURE__ */ (0,
|
|
7506
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: option(), children: props.children }),
|
|
7507
|
+
props.isSelected && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: icon(), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon_default, { name: "check", size: props.size }) })
|
|
7422
7508
|
]
|
|
7423
7509
|
}
|
|
7424
7510
|
);
|
|
@@ -7469,7 +7555,7 @@ var optionStyle = tv({
|
|
|
7469
7555
|
});
|
|
7470
7556
|
|
|
7471
7557
|
// src/components/select/select.tsx
|
|
7472
|
-
var
|
|
7558
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
7473
7559
|
var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
|
|
7474
7560
|
const [props, variantProps] = mapPropsVariants(originalProps, select.variantKeys);
|
|
7475
7561
|
const { classNames, options, defaultOption, onChange, ...inputProps } = props;
|
|
@@ -7533,17 +7619,17 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
|
|
|
7533
7619
|
}),
|
|
7534
7620
|
[slots, classNames]
|
|
7535
7621
|
);
|
|
7536
|
-
return /* @__PURE__ */ (0,
|
|
7537
|
-
/* @__PURE__ */ (0,
|
|
7538
|
-
props.label && /* @__PURE__ */ (0,
|
|
7539
|
-
/* @__PURE__ */ (0,
|
|
7540
|
-
/* @__PURE__ */ (0,
|
|
7541
|
-
/* @__PURE__ */ (0,
|
|
7622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
7623
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { ...getBaseProps(), children: [
|
|
7624
|
+
props.label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { ...getLabelProps(), children: props.label }),
|
|
7625
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { "data-expanded": !!targetRect, ...getSelectWrapperProps(), children: [
|
|
7626
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { ...getSelectProps() }),
|
|
7627
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon_default, { name: !!targetRect ? "arrow-triangle-up" : "arrow-triangle-down", size: originalProps.size, fill: true })
|
|
7542
7628
|
] }),
|
|
7543
|
-
props.errorMessage && /* @__PURE__ */ (0,
|
|
7629
|
+
props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { ...getErrorMessageProps(), children: props.errorMessage })
|
|
7544
7630
|
] }),
|
|
7545
|
-
targetRect && /* @__PURE__ */ (0,
|
|
7546
|
-
/* @__PURE__ */ (0,
|
|
7631
|
+
targetRect && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children: (0, import_react_dom.createPortal)(
|
|
7632
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
7547
7633
|
"div",
|
|
7548
7634
|
{
|
|
7549
7635
|
...getOptionsWrapperProps(),
|
|
@@ -7553,7 +7639,7 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
|
|
|
7553
7639
|
left: position == null ? void 0 : position.left,
|
|
7554
7640
|
width: targetRect.width
|
|
7555
7641
|
},
|
|
7556
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
7642
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
7557
7643
|
option_default,
|
|
7558
7644
|
{
|
|
7559
7645
|
variant: originalProps.variant,
|
|
@@ -7703,15 +7789,15 @@ var select = tv({
|
|
|
7703
7789
|
|
|
7704
7790
|
// src/components/chip/chip.tsx
|
|
7705
7791
|
var import_react20 = require("react");
|
|
7706
|
-
var
|
|
7792
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
7707
7793
|
var Chip = (0, import_react20.forwardRef)((originalProps, ref) => {
|
|
7708
7794
|
var _a;
|
|
7709
7795
|
const [rawProps, variantProps] = mapPropsVariants(originalProps, chipStyle.variantKeys);
|
|
7710
7796
|
const props = { ...rawProps, ...variantProps };
|
|
7711
7797
|
const Component = props.onClick ? "button" : "div";
|
|
7712
7798
|
const slots = (0, import_react20.useMemo)(() => chipStyle({ ...variantProps }), [variantProps]);
|
|
7713
|
-
const renderIcon = (name) => name ? /* @__PURE__ */ (0,
|
|
7714
|
-
return /* @__PURE__ */ (0,
|
|
7799
|
+
const renderIcon = (name) => name ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon_default, { name, fill: true, size: props.size, className: slots.icon() }) : null;
|
|
7800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
7715
7801
|
Component,
|
|
7716
7802
|
{
|
|
7717
7803
|
ref,
|
|
@@ -7887,12 +7973,12 @@ var chipStyle = tv({
|
|
|
7887
7973
|
|
|
7888
7974
|
// src/components/radio/radio.tsx
|
|
7889
7975
|
var import_react21 = require("react");
|
|
7890
|
-
var
|
|
7976
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
7891
7977
|
var Radio = (0, import_react21.forwardRef)((originalProps, ref) => {
|
|
7892
7978
|
const [props, variantProps] = mapPropsVariants(originalProps, radioStyle.variantKeys);
|
|
7893
7979
|
const { children, classNames, labelPosition = "end", ...inputProps } = props;
|
|
7894
7980
|
const slots = (0, import_react21.useMemo)(() => radioStyle({ ...variantProps }), [variantProps]);
|
|
7895
|
-
return /* @__PURE__ */ (0,
|
|
7981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
7896
7982
|
"label",
|
|
7897
7983
|
{
|
|
7898
7984
|
className: clsx(
|
|
@@ -7900,9 +7986,9 @@ var Radio = (0, import_react21.forwardRef)((originalProps, ref) => {
|
|
|
7900
7986
|
labelPosition === "start" && slots.labelReverse({ class: classNames == null ? void 0 : classNames.labelReverse })
|
|
7901
7987
|
),
|
|
7902
7988
|
children: [
|
|
7903
|
-
/* @__PURE__ */ (0,
|
|
7904
|
-
/* @__PURE__ */ (0,
|
|
7905
|
-
/* @__PURE__ */ (0,
|
|
7989
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { ...inputProps, type: "radio", ref }) }),
|
|
7990
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: slots.outerDot({ class: classNames == null ? void 0 : classNames.outerDot }), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: slots.innerDot({ class: classNames == null ? void 0 : classNames.innerDot }) }) }),
|
|
7991
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: slots.labelWrapper({ class: classNames == null ? void 0 : classNames.labelWrapper }), children: children && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children }) })
|
|
7906
7992
|
]
|
|
7907
7993
|
}
|
|
7908
7994
|
);
|
|
@@ -8043,20 +8129,20 @@ var radioStyle = tv({
|
|
|
8043
8129
|
|
|
8044
8130
|
// src/components/switch/switch.tsx
|
|
8045
8131
|
var import_react22 = require("react");
|
|
8046
|
-
var
|
|
8047
|
-
var
|
|
8132
|
+
var import_tailwind_variants20 = require("tailwind-variants");
|
|
8133
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
8048
8134
|
var Switch = (0, import_react22.forwardRef)((originalProps, ref) => {
|
|
8049
8135
|
const [rawProps, variantProps] = mapPropsVariants(originalProps, switchStyle.variantKeys);
|
|
8050
8136
|
const { size, color, isDisabled, disableAnimation, id, classNames, ...inputProps } = { ...rawProps, ...variantProps };
|
|
8051
8137
|
const slots = (0, import_react22.useMemo)(() => switchStyle({ ...variantProps }), [variantProps]);
|
|
8052
|
-
return /* @__PURE__ */ (0,
|
|
8053
|
-
/* @__PURE__ */ (0,
|
|
8054
|
-
/* @__PURE__ */ (0,
|
|
8138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
8139
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("input", { ...inputProps, id, ref, type: "checkbox", disabled: isDisabled, className: "hidden" }),
|
|
8140
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.outerWrapper({ class: classNames == null ? void 0 : classNames.outerWrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: slots.thumb({ class: classNames == null ? void 0 : classNames.thumb }) }) }) })
|
|
8055
8141
|
] });
|
|
8056
8142
|
});
|
|
8057
8143
|
Switch.displayName = "Switch";
|
|
8058
8144
|
var switch_default = Switch;
|
|
8059
|
-
var switchStyle = (0,
|
|
8145
|
+
var switchStyle = (0, import_tailwind_variants20.tv)({
|
|
8060
8146
|
slots: {
|
|
8061
8147
|
base: ["group/switch", "relative", "max-w-fit", "inline-flex", "items-center", "justify-start", "cursor-pointer"],
|
|
8062
8148
|
outerWrapper: [
|
|
@@ -8318,7 +8404,7 @@ var useTooltip = ({ placement, offset, targetRect }) => {
|
|
|
8318
8404
|
};
|
|
8319
8405
|
|
|
8320
8406
|
// src/components/tooltip/tooltip.tsx
|
|
8321
|
-
var
|
|
8407
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
8322
8408
|
var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
|
|
8323
8409
|
const [props, variantProps] = mapPropsVariants(originalProps, tooltipStyle.variantKeys);
|
|
8324
8410
|
const { placement = "top", offset = 5, delay = 100, persistent = false, classNames } = props;
|
|
@@ -8361,8 +8447,8 @@ var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
|
|
|
8361
8447
|
(0, import_react24.useEffect)(() => {
|
|
8362
8448
|
if (persistent) showTooltip();
|
|
8363
8449
|
}, [persistent, showTooltip]);
|
|
8364
|
-
return /* @__PURE__ */ (0,
|
|
8365
|
-
/* @__PURE__ */ (0,
|
|
8450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
8451
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
8366
8452
|
"div",
|
|
8367
8453
|
{
|
|
8368
8454
|
ref: (node) => {
|
|
@@ -8379,7 +8465,7 @@ var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
|
|
|
8379
8465
|
}
|
|
8380
8466
|
),
|
|
8381
8467
|
targetRect && (0, import_react_dom2.createPortal)(
|
|
8382
|
-
/* @__PURE__ */ (0,
|
|
8468
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
8383
8469
|
"div",
|
|
8384
8470
|
{
|
|
8385
8471
|
ref: tooltipRef,
|
|
@@ -8392,7 +8478,7 @@ var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
|
|
|
8392
8478
|
},
|
|
8393
8479
|
children: [
|
|
8394
8480
|
props.content,
|
|
8395
|
-
variantProps.tail && /* @__PURE__ */ (0,
|
|
8481
|
+
variantProps.tail && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
8396
8482
|
"div",
|
|
8397
8483
|
{
|
|
8398
8484
|
className: `absolute h-2 w-2 rotate-45 bg-inherit ${getTailClassName(placement)}`,
|
|
@@ -8445,7 +8531,7 @@ var tooltipStyle = tv({
|
|
|
8445
8531
|
// src/components/modal/modal.tsx
|
|
8446
8532
|
var import_react25 = require("react");
|
|
8447
8533
|
var import_react_dom3 = require("react-dom");
|
|
8448
|
-
var
|
|
8534
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
8449
8535
|
var Modal = (0, import_react25.forwardRef)((originalProps, ref) => {
|
|
8450
8536
|
const [props, variantProps] = mapPropsVariants(originalProps, modal.variantKeys);
|
|
8451
8537
|
const {
|
|
@@ -8554,20 +8640,20 @@ var Modal = (0, import_react25.forwardRef)((originalProps, ref) => {
|
|
|
8554
8640
|
document.body.classList.remove("overflow-hidden");
|
|
8555
8641
|
};
|
|
8556
8642
|
}, [isOpen, isKeyboardDismissDisabled, onCancel]);
|
|
8557
|
-
return /* @__PURE__ */ (0,
|
|
8558
|
-
/* @__PURE__ */ (0,
|
|
8559
|
-
typeof icon === "string" ? /* @__PURE__ */ (0,
|
|
8560
|
-
/* @__PURE__ */ (0,
|
|
8561
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
8562
|
-
/* @__PURE__ */ (0,
|
|
8563
|
-
(title || subTitle) && /* @__PURE__ */ (0,
|
|
8564
|
-
title && /* @__PURE__ */ (0,
|
|
8565
|
-
subTitle && /* @__PURE__ */ (0,
|
|
8643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: isOpen && (0, import_react_dom3.createPortal)(
|
|
8644
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ...getBackdropProps(), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ref, ...getModalWrapperProps(), children: [
|
|
8645
|
+
typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ...getIconProps(), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon_default, { name: icon, className: "h-[80px] w-[80px]" }) }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ...getIconProps(), children: icon }),
|
|
8646
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ...getBodyWrapperProps(), children: [
|
|
8647
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon_default, { name: "close", ...getCloseIconProps(), onClick: onCancel }),
|
|
8648
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ...getBodyProps(), children: [
|
|
8649
|
+
(title || subTitle) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ...getTitleWrapperProps(), children: [
|
|
8650
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ...getTitleProps(), children: title }),
|
|
8651
|
+
subTitle && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ...getSubTitleProps(), children: subTitle })
|
|
8566
8652
|
] }),
|
|
8567
|
-
content && typeof content === "string" ? /* @__PURE__ */ (0,
|
|
8568
|
-
(cancelButtonText || confirmButtonText) && /* @__PURE__ */ (0,
|
|
8569
|
-
cancelButtonText && /* @__PURE__ */ (0,
|
|
8570
|
-
confirmButtonText && /* @__PURE__ */ (0,
|
|
8653
|
+
content && typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ...getContentProps(), children: content }) : content,
|
|
8654
|
+
(cancelButtonText || confirmButtonText) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ...getFooterWrapperProps(), children: [
|
|
8655
|
+
cancelButtonText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(button_default, { variant: "outline", color: originalProps.color, fullWidth: true, onClick: onCancel, children: cancelButtonText }),
|
|
8656
|
+
confirmButtonText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(button_default, { size: "md", color: originalProps.color, fullWidth: true, onClick: onConfirm, children: confirmButtonText })
|
|
8571
8657
|
] })
|
|
8572
8658
|
] })
|
|
8573
8659
|
] })
|
|
@@ -8639,12 +8725,12 @@ var modal = tv({
|
|
|
8639
8725
|
|
|
8640
8726
|
// src/components/list/list.tsx
|
|
8641
8727
|
var import_react26 = require("react");
|
|
8642
|
-
var
|
|
8728
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
8643
8729
|
var List = (0, import_react26.forwardRef)((originalProps, ref) => {
|
|
8644
8730
|
const [props, variantProps] = mapPropsVariants(originalProps, listStyle.variantKeys);
|
|
8645
8731
|
const { children, classNames } = props;
|
|
8646
8732
|
const slots = (0, import_react26.useMemo)(() => listStyle(variantProps), [variantProps]);
|
|
8647
|
-
return /* @__PURE__ */ (0,
|
|
8733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: import_react26.Children.map(children, (child) => {
|
|
8648
8734
|
if (!(0, import_react26.isValidElement)(child)) return child;
|
|
8649
8735
|
return (0, import_react26.cloneElement)(child, {
|
|
8650
8736
|
...variantProps,
|
|
@@ -8684,7 +8770,7 @@ var listStyle = tv({
|
|
|
8684
8770
|
|
|
8685
8771
|
// src/components/list/listItem.tsx
|
|
8686
8772
|
var import_react27 = require("react");
|
|
8687
|
-
var
|
|
8773
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
8688
8774
|
var ListItem = (0, import_react27.forwardRef)((props, ref) => {
|
|
8689
8775
|
const [rawProps, variantProps] = mapPropsVariants(props, listItemStyle.variantKeys);
|
|
8690
8776
|
const {
|
|
@@ -8700,16 +8786,16 @@ var ListItem = (0, import_react27.forwardRef)((props, ref) => {
|
|
|
8700
8786
|
const slots = (0, import_react27.useMemo)(() => listItemStyle(variantProps), [variantProps]);
|
|
8701
8787
|
const iconSize = ["lg", "xl"].includes(size) ? "lg" : "md";
|
|
8702
8788
|
const avatarSize = iconSize;
|
|
8703
|
-
return /* @__PURE__ */ (0,
|
|
8704
|
-
/* @__PURE__ */ (0,
|
|
8705
|
-
avatar && /* @__PURE__ */ (0,
|
|
8706
|
-
startIconName && /* @__PURE__ */ (0,
|
|
8707
|
-
/* @__PURE__ */ (0,
|
|
8708
|
-
/* @__PURE__ */ (0,
|
|
8709
|
-
subTitle && /* @__PURE__ */ (0,
|
|
8789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), "data-selected": selected, onClick, children: [
|
|
8790
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
8791
|
+
avatar && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(avatar_default, { ...avatar, variant: "round", size: avatarSize }),
|
|
8792
|
+
startIconName && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon_default, { name: startIconName, fill: true, size, className: slots.startIcon({ class: classNames == null ? void 0 : classNames.startIcon }) }),
|
|
8793
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: slots.titleWrapper({ class: classNames == null ? void 0 : classNames.titleWrapper }), children: [
|
|
8794
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
|
|
8795
|
+
subTitle && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: slots.subTitle({ class: classNames == null ? void 0 : classNames.subTitle }), children: subTitle })
|
|
8710
8796
|
] })
|
|
8711
8797
|
] }),
|
|
8712
|
-
/* @__PURE__ */ (0,
|
|
8798
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon_default, { name: "right-chevron", size: iconSize, className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }) })
|
|
8713
8799
|
] });
|
|
8714
8800
|
});
|
|
8715
8801
|
ListItem.displayName = "ListItem";
|
|
@@ -8878,7 +8964,7 @@ var listItemStyle = tv({
|
|
|
8878
8964
|
|
|
8879
8965
|
// src/components/toast/toast.tsx
|
|
8880
8966
|
var import_react28 = require("react");
|
|
8881
|
-
var
|
|
8967
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
8882
8968
|
var Toast = (0, import_react28.forwardRef)((originalProps, ref) => {
|
|
8883
8969
|
const [props, variantProps] = mapPropsVariants(originalProps, toast.variantKeys);
|
|
8884
8970
|
const { width = 300, placement, classNames, showIcon = true, showCloseButton = true, onClose, ...toastProps } = props;
|
|
@@ -8907,10 +8993,10 @@ var Toast = (0, import_react28.forwardRef)((originalProps, ref) => {
|
|
|
8907
8993
|
}),
|
|
8908
8994
|
[slots, classNames == null ? void 0 : classNames.base]
|
|
8909
8995
|
);
|
|
8910
|
-
return /* @__PURE__ */ (0,
|
|
8911
|
-
showIcon && /* @__PURE__ */ (0,
|
|
8912
|
-
/* @__PURE__ */ (0,
|
|
8913
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
8996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { ref: toastRef, ...getBaseProps(), children: [
|
|
8997
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: originalProps.icon || "info-circle", fill: true, className: "mt-[2px]" }),
|
|
8998
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-1 select-none", children: props.content }),
|
|
8999
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: "close", className: "cursor-pointer mt-[2px]", onClick: onClose })
|
|
8914
9000
|
] });
|
|
8915
9001
|
});
|
|
8916
9002
|
Toast.displayName = "Toast";
|
|
@@ -9019,7 +9105,7 @@ var getToastPosition = (placement, width, offset) => {
|
|
|
9019
9105
|
};
|
|
9020
9106
|
|
|
9021
9107
|
// src/components/toast/use-toast.tsx
|
|
9022
|
-
var
|
|
9108
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
9023
9109
|
var ToastContext = (0, import_react29.createContext)(null);
|
|
9024
9110
|
var useToast = () => {
|
|
9025
9111
|
const context = (0, import_react29.useContext)(ToastContext);
|
|
@@ -9082,9 +9168,9 @@ var ToastProvider = ({
|
|
|
9082
9168
|
window.addEventListener("resize", calculatePosition);
|
|
9083
9169
|
return () => window.removeEventListener("resize", calculatePosition);
|
|
9084
9170
|
}, [globalOptions == null ? void 0 : globalOptions.placement, globalOptions == null ? void 0 : globalOptions.width]);
|
|
9085
|
-
return /* @__PURE__ */ (0,
|
|
9171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(ToastContext.Provider, { value, children: [
|
|
9086
9172
|
children,
|
|
9087
|
-
/* @__PURE__ */ (0,
|
|
9173
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { id: "deepnoid-toast-container", className: "flex flex-col gap-[10px]", style: containerStyle, children: toasts.map((toast2) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(toast_default, { ref: toastRef, onClose: () => removeToast(toast2.id), ...toast2 }, toast2.id)) })
|
|
9088
9174
|
] });
|
|
9089
9175
|
};
|
|
9090
9176
|
|
|
@@ -9187,7 +9273,7 @@ var useDatePicker = ({ initialDate, initialTime }) => {
|
|
|
9187
9273
|
|
|
9188
9274
|
// src/components/dateTimePicker/calendar.tsx
|
|
9189
9275
|
var import_react31 = __toESM(require("react"));
|
|
9190
|
-
var
|
|
9276
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
9191
9277
|
var Calendar = (0, import_react31.forwardRef)((originalProps, ref) => {
|
|
9192
9278
|
const [props, variantProps] = mapPropsVariants(originalProps, calendarStyle.variantKeys);
|
|
9193
9279
|
const { selectedDate, classNames, highlightWeekend = true, onChangeDate, ...inputProps } = props;
|
|
@@ -9288,18 +9374,18 @@ var Calendar = (0, import_react31.forwardRef)((originalProps, ref) => {
|
|
|
9288
9374
|
[slots, classNames, selectedDate, currentDate, highlightWeekend]
|
|
9289
9375
|
);
|
|
9290
9376
|
const calendarDates = getCalendarDates();
|
|
9291
|
-
return /* @__PURE__ */ (0,
|
|
9292
|
-
/* @__PURE__ */ (0,
|
|
9293
|
-
/* @__PURE__ */ (0,
|
|
9294
|
-
/* @__PURE__ */ (0,
|
|
9295
|
-
/* @__PURE__ */ (0,
|
|
9377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { ...getBaseProps(), children: [
|
|
9378
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "calendar-header flex justify-between items-center mb-4", children: [
|
|
9379
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon_default, { name: "brace-left", size: "md", className: "cursor-pointer", onClick: handlePrevMonth }),
|
|
9380
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-h6 font-semibold", children: currentDate.toLocaleString("default", { year: "numeric", month: "2-digit" }) }),
|
|
9381
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon_default, { name: "brace-right", size: "md", className: "cursor-pointer", onClick: handleNextMonth })
|
|
9296
9382
|
] }),
|
|
9297
|
-
/* @__PURE__ */ (0,
|
|
9298
|
-
/* @__PURE__ */ (0,
|
|
9383
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "grid grid-cols-7 gap-2 text-center", children: daysOfWeek.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { ...getDateTitleProps(index), children: day }, `${day}-${index}`)) }),
|
|
9384
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "grid grid-cols-7 gap-[5px] text-center mt-2", children: calendarDates.map((week, weekIndex) => {
|
|
9299
9385
|
const hasCurrentMonthDates = week.some((dateObj) => dateObj.currentMonth);
|
|
9300
9386
|
if (!hasCurrentMonthDates) return null;
|
|
9301
|
-
return /* @__PURE__ */ (0,
|
|
9302
|
-
return /* @__PURE__ */ (0,
|
|
9387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react31.default.Fragment, { children: week.map((dateObj, index) => {
|
|
9388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { ...getDateProps(dateObj), children: dateObj.date }, index);
|
|
9303
9389
|
}) }, weekIndex);
|
|
9304
9390
|
}) })
|
|
9305
9391
|
] }) });
|
|
@@ -9371,7 +9457,7 @@ var calendarStyle = tv({
|
|
|
9371
9457
|
|
|
9372
9458
|
// src/components/dateTimePicker/timePicker.tsx
|
|
9373
9459
|
var import_react32 = require("react");
|
|
9374
|
-
var
|
|
9460
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
9375
9461
|
var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime }) => {
|
|
9376
9462
|
const TOTAL_HOURS = 12;
|
|
9377
9463
|
const TOTAL_MINUTES = 60;
|
|
@@ -9433,8 +9519,8 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
|
|
|
9433
9519
|
onChangeTime(formattedTime);
|
|
9434
9520
|
}
|
|
9435
9521
|
};
|
|
9436
|
-
return /* @__PURE__ */ (0,
|
|
9437
|
-
/* @__PURE__ */ (0,
|
|
9522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex h-[200px] p-[10px] gap-[5px] border border-neutral-main rounded-md bg-background shadow-lg", children: [
|
|
9523
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(list_default, { ref: periodRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: PERIODS.map((period, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
9438
9524
|
listItem_default,
|
|
9439
9525
|
{
|
|
9440
9526
|
color,
|
|
@@ -9448,7 +9534,7 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
|
|
|
9448
9534
|
},
|
|
9449
9535
|
`${period}-${index}`
|
|
9450
9536
|
)) }),
|
|
9451
|
-
/* @__PURE__ */ (0,
|
|
9537
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(list_default, { ref: hourRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: hoursArray.map((hour, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
9452
9538
|
listItem_default,
|
|
9453
9539
|
{
|
|
9454
9540
|
color,
|
|
@@ -9462,7 +9548,7 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
|
|
|
9462
9548
|
},
|
|
9463
9549
|
`${hour}-${index}`
|
|
9464
9550
|
)) }),
|
|
9465
|
-
/* @__PURE__ */ (0,
|
|
9551
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(list_default, { ref: minuteRef, classNames: { base: "overflow-y-auto scrollbar-hide" }, children: minutesArray.map((minute, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
9466
9552
|
listItem_default,
|
|
9467
9553
|
{
|
|
9468
9554
|
color,
|
|
@@ -9481,7 +9567,7 @@ var TimePicker = ({ color = "primary", selectedTime, isFocusInput, onChangeTime
|
|
|
9481
9567
|
var timePicker_default = TimePicker;
|
|
9482
9568
|
|
|
9483
9569
|
// src/components/dateTimePicker/dateTimePicker.tsx
|
|
9484
|
-
var
|
|
9570
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
9485
9571
|
var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
9486
9572
|
const [props, variantProps] = mapPropsVariants(originalProps, dateTimePickerStyle.variantKeys);
|
|
9487
9573
|
const {
|
|
@@ -9596,10 +9682,10 @@ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
9596
9682
|
return import_react33.default.cloneElement(startContent, mergedProps);
|
|
9597
9683
|
} else {
|
|
9598
9684
|
const contentProps = getContentProps();
|
|
9599
|
-
return /* @__PURE__ */ (0,
|
|
9685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ...contentProps, children: startContent });
|
|
9600
9686
|
}
|
|
9601
9687
|
};
|
|
9602
|
-
const renderDateTimePickerIcon = () => /* @__PURE__ */ (0,
|
|
9688
|
+
const renderDateTimePickerIcon = () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ...getContentProps(), onClick: handleToggleDatePicker, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
9603
9689
|
Icon_default,
|
|
9604
9690
|
{
|
|
9605
9691
|
name: type === "time" ? "clock" : "calendar",
|
|
@@ -9618,9 +9704,9 @@ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
9618
9704
|
return import_react33.default.cloneElement(endContent, mergedProps);
|
|
9619
9705
|
} else if (errorMessage) {
|
|
9620
9706
|
const iconProps = { ...getContentProps(), className: getContentProps().className };
|
|
9621
|
-
return /* @__PURE__ */ (0,
|
|
9707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
|
|
9622
9708
|
} else {
|
|
9623
|
-
return /* @__PURE__ */ (0,
|
|
9709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, {});
|
|
9624
9710
|
}
|
|
9625
9711
|
};
|
|
9626
9712
|
const renderEndContent = () => {
|
|
@@ -9635,20 +9721,20 @@ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
9635
9721
|
return renderContentWithIcon();
|
|
9636
9722
|
}
|
|
9637
9723
|
};
|
|
9638
|
-
return /* @__PURE__ */ (0,
|
|
9639
|
-
/* @__PURE__ */ (0,
|
|
9640
|
-
label && /* @__PURE__ */ (0,
|
|
9641
|
-
/* @__PURE__ */ (0,
|
|
9642
|
-
/* @__PURE__ */ (0,
|
|
9724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
9725
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ...getBaseProps(), children: [
|
|
9726
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("label", { ...getLabelProps(), children: label }),
|
|
9727
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ...getInnerWrapperProps(), children: [
|
|
9728
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { ...getInputWrapperProps(), children: [
|
|
9643
9729
|
startContent && renderStartContent(),
|
|
9644
|
-
/* @__PURE__ */ (0,
|
|
9730
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("input", { ...getInputProps() }),
|
|
9645
9731
|
renderEndContent()
|
|
9646
9732
|
] }),
|
|
9647
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
9733
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { ...getErrorMessageProps(), children: errorMessage })
|
|
9648
9734
|
] })
|
|
9649
9735
|
] }),
|
|
9650
|
-
targetRect && /* @__PURE__ */ (0,
|
|
9651
|
-
/* @__PURE__ */ (0,
|
|
9736
|
+
targetRect && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: (0, import_react_dom4.createPortal)(
|
|
9737
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
9652
9738
|
"div",
|
|
9653
9739
|
{
|
|
9654
9740
|
ref: datePickerWrapperRef,
|
|
@@ -9659,7 +9745,7 @@ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
9659
9745
|
zIndex: 1e3
|
|
9660
9746
|
},
|
|
9661
9747
|
children: [
|
|
9662
|
-
type === "date" && /* @__PURE__ */ (0,
|
|
9748
|
+
type === "date" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
9663
9749
|
calendar_default,
|
|
9664
9750
|
{
|
|
9665
9751
|
color: originalProps.color,
|
|
@@ -9671,7 +9757,7 @@ var DatePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
9671
9757
|
}
|
|
9672
9758
|
}
|
|
9673
9759
|
),
|
|
9674
|
-
type === "time" && /* @__PURE__ */ (0,
|
|
9760
|
+
type === "time" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
9675
9761
|
timePicker_default,
|
|
9676
9762
|
{
|
|
9677
9763
|
color: originalProps.color,
|
|
@@ -9837,6 +9923,7 @@ var dateTimePickerStyle = tv({
|
|
|
9837
9923
|
Modal,
|
|
9838
9924
|
Pagination,
|
|
9839
9925
|
Radio,
|
|
9926
|
+
ScrollArea,
|
|
9840
9927
|
Select,
|
|
9841
9928
|
Switch,
|
|
9842
9929
|
Table,
|