@deepnoid/ui 0.1.136 → 0.1.137
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 +155 -155
- package/dist/{chunk-IUNZZ77V.mjs → chunk-3YR6VGGQ.mjs} +19 -38
- package/dist/{chunk-4URRLVNR.mjs → chunk-4JOD47VZ.mjs} +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/pagination/index.mjs +1 -1
- package/dist/components/pagination/pagination.js +1 -1
- package/dist/components/pagination/pagination.mjs +1 -1
- package/dist/components/table/index.js +604 -689
- package/dist/components/table/index.mjs +2 -4
- package/dist/components/table/table-body.d.mts +1 -2
- package/dist/components/table/table-body.d.ts +1 -2
- package/dist/components/table/table-body.js +595 -680
- package/dist/components/table/table-body.mjs +2 -4
- package/dist/components/table/table-head.d.mts +1 -2
- package/dist/components/table/table-head.d.ts +1 -2
- package/dist/components/table/table-head.js +595 -680
- package/dist/components/table/table-head.mjs +2 -4
- package/dist/components/table/table.d.mts +3 -1
- package/dist/components/table/table.d.ts +3 -1
- package/dist/components/table/table.js +595 -680
- package/dist/components/table/table.mjs +2 -4
- package/dist/index.js +268 -284
- package/dist/index.mjs +13 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7847,7 +7847,7 @@ var textareaStyle = (0, import_tailwind_variants13.tv)({
|
|
|
7847
7847
|
|
|
7848
7848
|
// src/components/table/table.tsx
|
|
7849
7849
|
var import_react17 = require("react");
|
|
7850
|
-
var
|
|
7850
|
+
var import_tailwind_variants17 = require("tailwind-variants");
|
|
7851
7851
|
|
|
7852
7852
|
// src/components/checkbox/checkbox.tsx
|
|
7853
7853
|
var import_react14 = require("react");
|
|
@@ -8056,77 +8056,8 @@ var checkboxStyle = tv({
|
|
|
8056
8056
|
}
|
|
8057
8057
|
});
|
|
8058
8058
|
|
|
8059
|
-
// src/components/skeleton/skeleton.tsx
|
|
8060
|
-
var import_tailwind_variants15 = require("tailwind-variants");
|
|
8061
|
-
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
8062
|
-
var Skeleton = ({ color = "primary", className, speed = "normal", rounded = "md" }) => {
|
|
8063
|
-
const speedMap = {
|
|
8064
|
-
fast: "0.7s",
|
|
8065
|
-
normal: "1.2s",
|
|
8066
|
-
slow: "2s"
|
|
8067
|
-
};
|
|
8068
|
-
const slots = skeletonStyle();
|
|
8069
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8070
|
-
"div",
|
|
8071
|
-
{
|
|
8072
|
-
className: clsx(slots.base({ color, rounded }), className),
|
|
8073
|
-
style: {
|
|
8074
|
-
"--shimmer-duration": speedMap[speed]
|
|
8075
|
-
},
|
|
8076
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("style", { children: `@keyframes shimmer {
|
|
8077
|
-
100% {
|
|
8078
|
-
transform: translateX(100%);
|
|
8079
|
-
}
|
|
8080
|
-
}
|
|
8081
|
-
.skeleton-shimmer::before {
|
|
8082
|
-
animation: shimmer var(--shimmer-duration) infinite linear;
|
|
8083
|
-
}
|
|
8084
|
-
` })
|
|
8085
|
-
}
|
|
8086
|
-
);
|
|
8087
|
-
};
|
|
8088
|
-
Skeleton.displayName = "Skeleton";
|
|
8089
|
-
var skeleton_default = Skeleton;
|
|
8090
|
-
var skeletonStyle = (0, import_tailwind_variants15.tv)({
|
|
8091
|
-
slots: {
|
|
8092
|
-
base: [
|
|
8093
|
-
"relative",
|
|
8094
|
-
"overflow-hidden",
|
|
8095
|
-
"w-full",
|
|
8096
|
-
"h-[18px]",
|
|
8097
|
-
"skeleton-shimmer",
|
|
8098
|
-
"before:absolute",
|
|
8099
|
-
"before:inset-0",
|
|
8100
|
-
"before:-translate-x-full",
|
|
8101
|
-
"before:bg-gradient-to-r",
|
|
8102
|
-
"before:from-transparent",
|
|
8103
|
-
"before:via-white/40",
|
|
8104
|
-
"before:to-transparent",
|
|
8105
|
-
"before:content-['']"
|
|
8106
|
-
]
|
|
8107
|
-
},
|
|
8108
|
-
variants: {
|
|
8109
|
-
color: {
|
|
8110
|
-
primary: { base: "bg-primary-soft" },
|
|
8111
|
-
secondary: { base: "bg-secondary-soft" },
|
|
8112
|
-
neutral: { base: "bg-neutral-soft" }
|
|
8113
|
-
},
|
|
8114
|
-
rounded: {
|
|
8115
|
-
sm: { base: "rounded-sm" },
|
|
8116
|
-
md: { base: "rounded-md" },
|
|
8117
|
-
lg: { base: "rounded-lg" },
|
|
8118
|
-
xl: { base: "rounded-xl" },
|
|
8119
|
-
full: { base: "rounded-full" }
|
|
8120
|
-
}
|
|
8121
|
-
},
|
|
8122
|
-
defaultVariants: {
|
|
8123
|
-
color: "primary",
|
|
8124
|
-
rounded: "md"
|
|
8125
|
-
}
|
|
8126
|
-
});
|
|
8127
|
-
|
|
8128
8059
|
// src/components/table/table-head.tsx
|
|
8129
|
-
var
|
|
8060
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
8130
8061
|
var TableHead = ({
|
|
8131
8062
|
slots,
|
|
8132
8063
|
columns,
|
|
@@ -8134,11 +8065,10 @@ var TableHead = ({
|
|
|
8134
8065
|
size,
|
|
8135
8066
|
rowCheckbox = false,
|
|
8136
8067
|
hasCheckedRows,
|
|
8137
|
-
isLoading = false,
|
|
8138
8068
|
classNames,
|
|
8139
8069
|
onCheckAll
|
|
8140
8070
|
}) => {
|
|
8141
|
-
const renderTh = (content, key, column, isCheckbox) => /* @__PURE__ */ (0,
|
|
8071
|
+
const renderTh = (content, key, column, isCheckbox) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8142
8072
|
"th",
|
|
8143
8073
|
{
|
|
8144
8074
|
className: clsx(slots.th({ class: classNames == null ? void 0 : classNames.th }), column == null ? void 0 : column.className),
|
|
@@ -8154,16 +8084,10 @@ var TableHead = ({
|
|
|
8154
8084
|
},
|
|
8155
8085
|
key
|
|
8156
8086
|
);
|
|
8157
|
-
|
|
8158
|
-
columns.map(
|
|
8159
|
-
(column, idx) => renderTh(/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(skeleton_default, { color, rounded: "lg", speed: "fast" }), `skeleton-${idx}`, column)
|
|
8160
|
-
),
|
|
8161
|
-
rowCheckbox && renderTh(/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(skeleton_default, { color, rounded: "lg", speed: "fast" }), "checkbox-skeleton", void 0, true)
|
|
8162
|
-
] }) });
|
|
8163
|
-
const renderContentRow = () => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
8087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
8164
8088
|
columns.map((column, idx) => renderTh(column.headerName, `${column.field}-${idx}`, column)),
|
|
8165
8089
|
rowCheckbox && renderTh(
|
|
8166
|
-
/* @__PURE__ */ (0,
|
|
8090
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { "data-checkbox": true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
8167
8091
|
checkbox_default,
|
|
8168
8092
|
{
|
|
8169
8093
|
size,
|
|
@@ -8176,12 +8100,11 @@ var TableHead = ({
|
|
|
8176
8100
|
true
|
|
8177
8101
|
)
|
|
8178
8102
|
] }) });
|
|
8179
|
-
return isLoading ? renderSkeletonRow() : renderContentRow();
|
|
8180
8103
|
};
|
|
8181
8104
|
var table_head_default = TableHead;
|
|
8182
8105
|
|
|
8183
8106
|
// src/components/table/table-body.tsx
|
|
8184
|
-
var
|
|
8107
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
8185
8108
|
var TableBody = ({
|
|
8186
8109
|
slots,
|
|
8187
8110
|
rows,
|
|
@@ -8194,28 +8117,20 @@ var TableBody = ({
|
|
|
8194
8117
|
onRowClick,
|
|
8195
8118
|
isLoading = false,
|
|
8196
8119
|
emptyContent,
|
|
8197
|
-
skeletonRow,
|
|
8198
8120
|
classNames,
|
|
8199
8121
|
className
|
|
8200
8122
|
}) => {
|
|
8201
|
-
const
|
|
8202
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), style: column ? getCellStyle(column) : {}, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" }) }, key);
|
|
8203
|
-
};
|
|
8204
|
-
const renderCheckboxCell = (rowId, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
8123
|
+
const renderCheckboxCell = (rowId, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8205
8124
|
"td",
|
|
8206
8125
|
{
|
|
8207
8126
|
className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"),
|
|
8208
8127
|
style: { width: "40px", minWidth: "40px", textAlign: "center" },
|
|
8209
|
-
children: /* @__PURE__ */ (0,
|
|
8128
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { "data-checkbox": true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(checkbox_default, { size, checked: checkedRows.has(rowId), onChange: (e) => onCheckRow(rowId, e.target.checked) }) })
|
|
8210
8129
|
},
|
|
8211
8130
|
`checkbox-${rowId}-${rowIndex}`
|
|
8212
8131
|
);
|
|
8213
|
-
const
|
|
8214
|
-
|
|
8215
|
-
rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
|
|
8216
|
-
] }, `skeleton-${rowIndex}`);
|
|
8217
|
-
const renderEmptyRow = () => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
|
|
8218
|
-
const renderDataRow = (row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
8132
|
+
const renderEmptyRow = () => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
|
|
8133
|
+
const renderDataRow = (row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
8219
8134
|
"tr",
|
|
8220
8135
|
{
|
|
8221
8136
|
className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }),
|
|
@@ -8226,7 +8141,7 @@ var TableBody = ({
|
|
|
8226
8141
|
const value = row[column.field];
|
|
8227
8142
|
const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
|
|
8228
8143
|
const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
|
|
8229
|
-
return /* @__PURE__ */ (0,
|
|
8144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8230
8145
|
"td",
|
|
8231
8146
|
{
|
|
8232
8147
|
className: clsx(slots.td(), classNames == null ? void 0 : classNames.td, column.className),
|
|
@@ -8241,12 +8156,18 @@ var TableBody = ({
|
|
|
8241
8156
|
},
|
|
8242
8157
|
`${row.id}-${rowIndex}`
|
|
8243
8158
|
);
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
8160
|
+
"tbody",
|
|
8161
|
+
{
|
|
8162
|
+
className: clsx(
|
|
8163
|
+
slots.tbody({ class: classNames == null ? void 0 : classNames.tbody }),
|
|
8164
|
+
className,
|
|
8165
|
+
"transition-all duration-200 ease-in-out",
|
|
8166
|
+
isLoading && slots.tbodyLoading({ class: classNames == null ? void 0 : classNames.tbodyLoading })
|
|
8167
|
+
),
|
|
8168
|
+
children: !rows.length && emptyContent ? renderEmptyRow() : rows.map((row, index) => renderDataRow(row, index))
|
|
8169
|
+
}
|
|
8170
|
+
);
|
|
8250
8171
|
};
|
|
8251
8172
|
var table_body_default = TableBody;
|
|
8252
8173
|
|
|
@@ -8279,7 +8200,7 @@ var usePagination = ({ currentPage, totalPage, groupSize, handleChangePage }) =>
|
|
|
8279
8200
|
var usePagination_default = usePagination;
|
|
8280
8201
|
|
|
8281
8202
|
// src/components/pagination/pagination.tsx
|
|
8282
|
-
var
|
|
8203
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
8283
8204
|
var Pagination = (0, import_react16.forwardRef)((originalProps, ref) => {
|
|
8284
8205
|
const [props, variantProps] = mapPropsVariants(originalProps, paginationStyle.variantKeys);
|
|
8285
8206
|
const {
|
|
@@ -8289,7 +8210,7 @@ var Pagination = (0, import_react16.forwardRef)((originalProps, ref) => {
|
|
|
8289
8210
|
totalPage,
|
|
8290
8211
|
showPageNumber = true,
|
|
8291
8212
|
showPageLabel,
|
|
8292
|
-
showFirstLastButtons,
|
|
8213
|
+
showFirstLastButtons = true,
|
|
8293
8214
|
handleChangePage,
|
|
8294
8215
|
variant,
|
|
8295
8216
|
size
|
|
@@ -8310,29 +8231,29 @@ var Pagination = (0, import_react16.forwardRef)((originalProps, ref) => {
|
|
|
8310
8231
|
}
|
|
8311
8232
|
}
|
|
8312
8233
|
};
|
|
8313
|
-
return /* @__PURE__ */ (0,
|
|
8314
|
-
/* @__PURE__ */ (0,
|
|
8315
|
-
showFirstLastButtons && /* @__PURE__ */ (0,
|
|
8234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), ref, children: [
|
|
8235
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
8236
|
+
showFirstLastButtons && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
8316
8237
|
"div",
|
|
8317
8238
|
{
|
|
8318
8239
|
"aria-label": "firstPage",
|
|
8319
8240
|
"data-is-active": currentPage > 1,
|
|
8320
8241
|
className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
|
|
8321
8242
|
onClick: currentPage > 1 ? handleClickMovePage(1) : void 0,
|
|
8322
|
-
children: /* @__PURE__ */ (0,
|
|
8243
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon_default, { name: "left-double-chevron", size })
|
|
8323
8244
|
}
|
|
8324
8245
|
),
|
|
8325
|
-
/* @__PURE__ */ (0,
|
|
8246
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
8326
8247
|
"div",
|
|
8327
8248
|
{
|
|
8328
8249
|
"aria-label": "prevPage",
|
|
8329
8250
|
"data-is-active": currentPage > 1,
|
|
8330
8251
|
className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
|
|
8331
8252
|
onClick: currentPage > 1 ? handleClickMovePage(currentPage - 1) : void 0,
|
|
8332
|
-
children: /* @__PURE__ */ (0,
|
|
8253
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon_default, { name: "left-chevron", size })
|
|
8333
8254
|
}
|
|
8334
8255
|
),
|
|
8335
|
-
showPageNumber && pageList.map((page, index) => /* @__PURE__ */ (0,
|
|
8256
|
+
showPageNumber && pageList.map((page, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
8336
8257
|
"div",
|
|
8337
8258
|
{
|
|
8338
8259
|
className: slots.button({ class: classNames == null ? void 0 : classNames.button }),
|
|
@@ -8342,29 +8263,29 @@ var Pagination = (0, import_react16.forwardRef)((originalProps, ref) => {
|
|
|
8342
8263
|
},
|
|
8343
8264
|
index
|
|
8344
8265
|
)),
|
|
8345
|
-
/* @__PURE__ */ (0,
|
|
8266
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
8346
8267
|
"div",
|
|
8347
8268
|
{
|
|
8348
8269
|
"aria-label": "nextPage",
|
|
8349
8270
|
"data-is-active": currentPage < totalPage,
|
|
8350
8271
|
className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
|
|
8351
8272
|
onClick: currentPage < totalPage ? handleClickMovePage(currentPage + 1) : void 0,
|
|
8352
|
-
children: /* @__PURE__ */ (0,
|
|
8273
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon_default, { name: "right-chevron", size })
|
|
8353
8274
|
}
|
|
8354
8275
|
),
|
|
8355
|
-
showFirstLastButtons && /* @__PURE__ */ (0,
|
|
8276
|
+
showFirstLastButtons && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
8356
8277
|
"div",
|
|
8357
8278
|
{
|
|
8358
8279
|
"aria-label": "lastPage",
|
|
8359
8280
|
"data-is-active": currentPage < totalPage,
|
|
8360
8281
|
className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
|
|
8361
8282
|
onClick: currentPage < totalPage ? handleClickMovePage(totalPage) : void 0,
|
|
8362
|
-
children: /* @__PURE__ */ (0,
|
|
8283
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon_default, { name: "right-double-chevron", size })
|
|
8363
8284
|
}
|
|
8364
8285
|
)
|
|
8365
8286
|
] }),
|
|
8366
|
-
showPageLabel && /* @__PURE__ */ (0,
|
|
8367
|
-
/* @__PURE__ */ (0,
|
|
8287
|
+
showPageLabel && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: [
|
|
8288
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
8368
8289
|
input_default,
|
|
8369
8290
|
{
|
|
8370
8291
|
variant: variant === "underline" ? "outline" : variant,
|
|
@@ -8619,14 +8540,14 @@ var paginationStyle = tv(
|
|
|
8619
8540
|
);
|
|
8620
8541
|
|
|
8621
8542
|
// src/components/scroll/scrollArea.tsx
|
|
8622
|
-
var
|
|
8623
|
-
var
|
|
8543
|
+
var import_tailwind_variants16 = require("tailwind-variants");
|
|
8544
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
8624
8545
|
var ScrollArea = ({ children, className, direction, size }) => {
|
|
8625
|
-
return /* @__PURE__ */ (0,
|
|
8546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: clsx(scrollAreaStyle({ direction, size }), className), children });
|
|
8626
8547
|
};
|
|
8627
8548
|
ScrollArea.displayName = "ScrollArea";
|
|
8628
8549
|
var scrollArea_default = ScrollArea;
|
|
8629
|
-
var scrollAreaStyle = (0,
|
|
8550
|
+
var scrollAreaStyle = (0, import_tailwind_variants16.tv)({
|
|
8630
8551
|
base: [
|
|
8631
8552
|
"h-full",
|
|
8632
8553
|
"x-full",
|
|
@@ -8655,7 +8576,7 @@ var scrollAreaStyle = (0, import_tailwind_variants17.tv)({
|
|
|
8655
8576
|
});
|
|
8656
8577
|
|
|
8657
8578
|
// src/components/table/table.tsx
|
|
8658
|
-
var
|
|
8579
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
8659
8580
|
var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
8660
8581
|
const [props, variantProps] = mapPropsVariants(originalProps, tableStyle.variantKeys);
|
|
8661
8582
|
const {
|
|
@@ -8671,13 +8592,12 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
8671
8592
|
variant,
|
|
8672
8593
|
color,
|
|
8673
8594
|
size,
|
|
8674
|
-
skeletonRow,
|
|
8675
8595
|
checkedRows,
|
|
8676
8596
|
onCheckedRowsChange,
|
|
8677
8597
|
onRowClick
|
|
8678
8598
|
} = { ...props, ...variantProps };
|
|
8679
8599
|
const { page = 1, perPage = 15 } = pagination || {};
|
|
8680
|
-
const showPagination = pagination && totalData > 0
|
|
8600
|
+
const showPagination = pagination && totalData > 0;
|
|
8681
8601
|
const [checkedRowIds, setCheckedRowIds] = (0, import_react17.useState)(new Set(checkedRows == null ? void 0 : checkedRows.map((row) => row.id)));
|
|
8682
8602
|
const tableMinWidth = (0, import_react17.useMemo)(() => {
|
|
8683
8603
|
const columnsWidth = columns.reduce((total, column) => {
|
|
@@ -8730,8 +8650,8 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
8730
8650
|
() => tableStyle({ ...variantProps, rowClickable: typeof onRowClick === "function" }),
|
|
8731
8651
|
[variantProps, onRowClick]
|
|
8732
8652
|
);
|
|
8733
|
-
return /* @__PURE__ */ (0,
|
|
8734
|
-
/* @__PURE__ */ (0,
|
|
8653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { "data-table": "base", className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
8654
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(scrollArea_default, { direction: "x", size: size === "xl" ? "lg" : size, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
8735
8655
|
"table",
|
|
8736
8656
|
{
|
|
8737
8657
|
className: slots.table({ class: classNames == null ? void 0 : classNames.table }),
|
|
@@ -8741,7 +8661,7 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
8741
8661
|
minWidth: `${tableMinWidth}px`
|
|
8742
8662
|
},
|
|
8743
8663
|
children: [
|
|
8744
|
-
/* @__PURE__ */ (0,
|
|
8664
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
8745
8665
|
table_head_default,
|
|
8746
8666
|
{
|
|
8747
8667
|
columns,
|
|
@@ -8750,12 +8670,11 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
8750
8670
|
rowCheckbox,
|
|
8751
8671
|
hasCheckedRows: rows.length > 0 && rows.every((row) => checkedRowIds.has(row.id)),
|
|
8752
8672
|
onCheckAll: handleAllRowCheck,
|
|
8753
|
-
isLoading,
|
|
8754
8673
|
classNames,
|
|
8755
8674
|
slots
|
|
8756
8675
|
}
|
|
8757
8676
|
),
|
|
8758
|
-
/* @__PURE__ */ (0,
|
|
8677
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
8759
8678
|
table_body_default,
|
|
8760
8679
|
{
|
|
8761
8680
|
slots,
|
|
@@ -8769,18 +8688,13 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
8769
8688
|
onRowClick: handleRowClick,
|
|
8770
8689
|
isLoading,
|
|
8771
8690
|
emptyContent,
|
|
8772
|
-
|
|
8773
|
-
className: clsx(
|
|
8774
|
-
"transition-all duration-150 ease-out",
|
|
8775
|
-
isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100",
|
|
8776
|
-
classNames
|
|
8777
|
-
)
|
|
8691
|
+
classNames
|
|
8778
8692
|
}
|
|
8779
8693
|
)
|
|
8780
8694
|
]
|
|
8781
8695
|
}
|
|
8782
8696
|
) }),
|
|
8783
|
-
showPagination && /* @__PURE__ */ (0,
|
|
8697
|
+
showPagination && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
8784
8698
|
pagination_default,
|
|
8785
8699
|
{
|
|
8786
8700
|
variant: variant === "outline" ? "solid" : variant,
|
|
@@ -8796,7 +8710,7 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
|
|
|
8796
8710
|
});
|
|
8797
8711
|
Table.displayName = "Table";
|
|
8798
8712
|
var table_default = Table;
|
|
8799
|
-
var tableStyle = (0,
|
|
8713
|
+
var tableStyle = (0, import_tailwind_variants17.tv)({
|
|
8800
8714
|
slots: {
|
|
8801
8715
|
base: ["flex", "flex-col", "relative", "select-none", "gap-[20px]"],
|
|
8802
8716
|
table: ["w-full", "h-auto"],
|
|
@@ -8834,7 +8748,8 @@ var tableStyle = (0, import_tailwind_variants18.tv)({
|
|
|
8834
8748
|
"[&>*]:z-1",
|
|
8835
8749
|
"[&>*]:relative",
|
|
8836
8750
|
"align-middle"
|
|
8837
|
-
]
|
|
8751
|
+
],
|
|
8752
|
+
tbodyLoading: []
|
|
8838
8753
|
},
|
|
8839
8754
|
variants: {
|
|
8840
8755
|
variant: {
|
|
@@ -9035,7 +8950,7 @@ var getCellStyle = (column) => {
|
|
|
9035
8950
|
|
|
9036
8951
|
// src/components/table/definition-table.tsx
|
|
9037
8952
|
var import_react18 = require("react");
|
|
9038
|
-
var
|
|
8953
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
9039
8954
|
var DEFAULT_CELL_CLASSES = "px-[10px] py-[8px] text-md border-r border-neutral-light h-[50px]";
|
|
9040
8955
|
var FIRST_CELL_WIDTH_CLASS = "w-[120px] font-bold text-md text-body-foreground";
|
|
9041
8956
|
var renderColGroup = (rows) => {
|
|
@@ -9061,9 +8976,9 @@ var renderColGroup = (rows) => {
|
|
|
9061
8976
|
});
|
|
9062
8977
|
const cols = [];
|
|
9063
8978
|
for (let i = 0; i < maxCols; i++) {
|
|
9064
|
-
cols.push(/* @__PURE__ */ (0,
|
|
8979
|
+
cols.push(/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("col", { style: { width: colWidths[i] || "auto" } }, i));
|
|
9065
8980
|
}
|
|
9066
|
-
return /* @__PURE__ */ (0,
|
|
8981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("colgroup", { children: cols });
|
|
9067
8982
|
};
|
|
9068
8983
|
var getHighlightColumnIndex = (rows, key) => {
|
|
9069
8984
|
if (!key) return null;
|
|
@@ -9083,7 +8998,7 @@ var DefinitionTableRow = ({
|
|
|
9083
8998
|
rowIndex = 0,
|
|
9084
8999
|
rowCount = 0,
|
|
9085
9000
|
highlightColumnIndex
|
|
9086
|
-
}) => /* @__PURE__ */ (0,
|
|
9001
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tr", { className: clsx("border-neutral-light border-b", className), children: cells.map((cell, colIndex) => {
|
|
9087
9002
|
const isFirstCell = colIndex === 0;
|
|
9088
9003
|
const isHighlighted = colIndex === highlightColumnIndex;
|
|
9089
9004
|
const isFirstRow = rowIndex === 0;
|
|
@@ -9115,7 +9030,7 @@ var DefinitionTableRow = ({
|
|
|
9115
9030
|
} else {
|
|
9116
9031
|
cellStyle = { width: "100%" };
|
|
9117
9032
|
}
|
|
9118
|
-
return /* @__PURE__ */ (0,
|
|
9033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
9119
9034
|
"td",
|
|
9120
9035
|
{
|
|
9121
9036
|
className: combinedClassName,
|
|
@@ -9134,10 +9049,10 @@ var DefinitionTable = (0, import_react18.forwardRef)(
|
|
|
9134
9049
|
() => getHighlightColumnIndex(rows, highlightColumnKey),
|
|
9135
9050
|
[rows, highlightColumnKey]
|
|
9136
9051
|
);
|
|
9137
|
-
return /* @__PURE__ */ (0,
|
|
9138
|
-
/* @__PURE__ */ (0,
|
|
9052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { ref, className: clsx(slots.base(), classNames == null ? void 0 : classNames.base), children: [
|
|
9053
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("table", { className: clsx(slots.table(), classNames == null ? void 0 : classNames.table), children: [
|
|
9139
9054
|
renderColGroup(rows),
|
|
9140
|
-
/* @__PURE__ */ (0,
|
|
9055
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
9141
9056
|
DefinitionTableRow,
|
|
9142
9057
|
{
|
|
9143
9058
|
...row,
|
|
@@ -9149,7 +9064,7 @@ var DefinitionTable = (0, import_react18.forwardRef)(
|
|
|
9149
9064
|
i
|
|
9150
9065
|
)) })
|
|
9151
9066
|
] }),
|
|
9152
|
-
footer && /* @__PURE__ */ (0,
|
|
9067
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: footer })
|
|
9153
9068
|
] });
|
|
9154
9069
|
}
|
|
9155
9070
|
);
|
|
@@ -9165,7 +9080,7 @@ var DefinitionTableStyle = tv({
|
|
|
9165
9080
|
// src/components/select/select.tsx
|
|
9166
9081
|
var import_react19 = require("react");
|
|
9167
9082
|
var import_react_dom = require("react-dom");
|
|
9168
|
-
var
|
|
9083
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
9169
9084
|
var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
|
|
9170
9085
|
var _a, _b;
|
|
9171
9086
|
const [props, variantProps] = mapPropsVariants(originalProps, select.variantKeys);
|
|
@@ -9261,7 +9176,7 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
|
|
|
9261
9176
|
const renderOptions = () => {
|
|
9262
9177
|
if (!isVisible) return null;
|
|
9263
9178
|
return (0, import_react_dom.createPortal)(
|
|
9264
|
-
/* @__PURE__ */ (0,
|
|
9179
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
9265
9180
|
"div",
|
|
9266
9181
|
{
|
|
9267
9182
|
ref: optionWrapperRef,
|
|
@@ -9279,7 +9194,7 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
|
|
|
9279
9194
|
},
|
|
9280
9195
|
children: options.map((option) => {
|
|
9281
9196
|
const isSelected = selectedOptions.some((o) => o.value === option.value);
|
|
9282
|
-
return /* @__PURE__ */ (0,
|
|
9197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
9283
9198
|
"div",
|
|
9284
9199
|
{
|
|
9285
9200
|
role: "option",
|
|
@@ -9289,9 +9204,9 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
|
|
|
9289
9204
|
optionIconPlacement === "end" ? "justify-between" : ""
|
|
9290
9205
|
),
|
|
9291
9206
|
children: [
|
|
9292
|
-
optionIconName && optionIconPlacement === "start" && /* @__PURE__ */ (0,
|
|
9207
|
+
optionIconName && optionIconPlacement === "start" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon_default, { name: optionIconName, size: originalProps.size }),
|
|
9293
9208
|
option.label,
|
|
9294
|
-
optionIconName && optionIconPlacement === "end" && /* @__PURE__ */ (0,
|
|
9209
|
+
optionIconName && optionIconPlacement === "end" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon_default, { name: optionIconName, size: originalProps.size })
|
|
9295
9210
|
]
|
|
9296
9211
|
},
|
|
9297
9212
|
option.value
|
|
@@ -9302,8 +9217,8 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
|
|
|
9302
9217
|
document.body
|
|
9303
9218
|
);
|
|
9304
9219
|
};
|
|
9305
|
-
return /* @__PURE__ */ (0,
|
|
9306
|
-
/* @__PURE__ */ (0,
|
|
9220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
9221
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
9307
9222
|
"div",
|
|
9308
9223
|
{
|
|
9309
9224
|
className: clsx(
|
|
@@ -9311,9 +9226,9 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
|
|
|
9311
9226
|
variantProps.direction === "horizon" ? slots.horizon({ class: classNames == null ? void 0 : classNames.horizon }) : slots.vertical({ class: classNames == null ? void 0 : classNames.vertical })
|
|
9312
9227
|
),
|
|
9313
9228
|
children: [
|
|
9314
|
-
label && /* @__PURE__ */ (0,
|
|
9315
|
-
/* @__PURE__ */ (0,
|
|
9316
|
-
/* @__PURE__ */ (0,
|
|
9229
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("label", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
|
|
9230
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
9231
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
9317
9232
|
"div",
|
|
9318
9233
|
{
|
|
9319
9234
|
"data-expanded": isOpen,
|
|
@@ -9324,7 +9239,7 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
|
|
|
9324
9239
|
ref: selectWrapperRef,
|
|
9325
9240
|
onClick: handleToggleSelect,
|
|
9326
9241
|
children: [
|
|
9327
|
-
/* @__PURE__ */ (0,
|
|
9242
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
9328
9243
|
"input",
|
|
9329
9244
|
{
|
|
9330
9245
|
...inputProps,
|
|
@@ -9339,8 +9254,8 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
|
|
|
9339
9254
|
size: 0
|
|
9340
9255
|
}
|
|
9341
9256
|
),
|
|
9342
|
-
/* @__PURE__ */ (0,
|
|
9343
|
-
/* @__PURE__ */ (0,
|
|
9257
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", { type: "hidden", name: inputProps.name, value: selectedValue }),
|
|
9258
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
9344
9259
|
Icon_default,
|
|
9345
9260
|
{
|
|
9346
9261
|
name: dropdownIconName,
|
|
@@ -9351,8 +9266,8 @@ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
|
|
|
9351
9266
|
]
|
|
9352
9267
|
}
|
|
9353
9268
|
),
|
|
9354
|
-
helperMessage && !errorMessage && /* @__PURE__ */ (0,
|
|
9355
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
9269
|
+
helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }), children: helperMessage }),
|
|
9270
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
|
|
9356
9271
|
] })
|
|
9357
9272
|
]
|
|
9358
9273
|
}
|
|
@@ -9617,15 +9532,15 @@ var select = tv({
|
|
|
9617
9532
|
|
|
9618
9533
|
// src/components/chip/chip.tsx
|
|
9619
9534
|
var import_react20 = require("react");
|
|
9620
|
-
var
|
|
9535
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
9621
9536
|
var Chip = (0, import_react20.forwardRef)((originalProps, ref) => {
|
|
9622
9537
|
var _a;
|
|
9623
9538
|
const [rawProps, variantProps] = mapPropsVariants(originalProps, chipStyle.variantKeys);
|
|
9624
9539
|
const props = { ...rawProps, ...variantProps };
|
|
9625
9540
|
const Component = props.onClick ? "button" : "div";
|
|
9626
9541
|
const slots = (0, import_react20.useMemo)(() => chipStyle({ ...variantProps }), [variantProps]);
|
|
9627
|
-
const renderIcon = (name) => name ? /* @__PURE__ */ (0,
|
|
9628
|
-
return /* @__PURE__ */ (0,
|
|
9542
|
+
const renderIcon = (name) => name ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon_default, { name, fill: true, size: props.size, className: slots.icon() }) : null;
|
|
9543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
9629
9544
|
Component,
|
|
9630
9545
|
{
|
|
9631
9546
|
ref,
|
|
@@ -9802,12 +9717,12 @@ var chipStyle = tv({
|
|
|
9802
9717
|
|
|
9803
9718
|
// src/components/radio/radio.tsx
|
|
9804
9719
|
var import_react21 = require("react");
|
|
9805
|
-
var
|
|
9720
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
9806
9721
|
var Radio = (0, import_react21.forwardRef)((originalProps, ref) => {
|
|
9807
9722
|
const [props, variantProps] = mapPropsVariants(originalProps, radioStyle.variantKeys);
|
|
9808
9723
|
const { children, classNames, labelPosition = "end", ...inputProps } = props;
|
|
9809
9724
|
const slots = (0, import_react21.useMemo)(() => radioStyle({ ...variantProps }), [variantProps]);
|
|
9810
|
-
return /* @__PURE__ */ (0,
|
|
9725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
9811
9726
|
"label",
|
|
9812
9727
|
{
|
|
9813
9728
|
className: clsx(
|
|
@@ -9815,9 +9730,9 @@ var Radio = (0, import_react21.forwardRef)((originalProps, ref) => {
|
|
|
9815
9730
|
labelPosition === "start" && slots.labelReverse({ class: classNames == null ? void 0 : classNames.labelReverse })
|
|
9816
9731
|
),
|
|
9817
9732
|
children: [
|
|
9818
|
-
/* @__PURE__ */ (0,
|
|
9819
|
-
/* @__PURE__ */ (0,
|
|
9820
|
-
/* @__PURE__ */ (0,
|
|
9733
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { ...inputProps, type: "radio", ref }) }),
|
|
9734
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: slots.outerDot({ class: classNames == null ? void 0 : classNames.outerDot }), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: slots.innerDot({ class: classNames == null ? void 0 : classNames.innerDot }) }) }),
|
|
9735
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: slots.labelWrapper({ class: classNames == null ? void 0 : classNames.labelWrapper }), children: children && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children }) })
|
|
9821
9736
|
]
|
|
9822
9737
|
}
|
|
9823
9738
|
);
|
|
@@ -9966,8 +9881,8 @@ var radioStyle = tv({
|
|
|
9966
9881
|
|
|
9967
9882
|
// src/components/switch/switch.tsx
|
|
9968
9883
|
var import_react22 = require("react");
|
|
9969
|
-
var
|
|
9970
|
-
var
|
|
9884
|
+
var import_tailwind_variants22 = require("tailwind-variants");
|
|
9885
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
9971
9886
|
var Switch = (0, import_react22.forwardRef)((originalProps, ref) => {
|
|
9972
9887
|
const [rawProps, variantProps] = mapPropsVariants(originalProps, switchStyle.variantKeys);
|
|
9973
9888
|
const { size, color, disabled, disableAnimation, id, checked, onChange, classNames, ...inputProps } = {
|
|
@@ -9975,8 +9890,8 @@ var Switch = (0, import_react22.forwardRef)((originalProps, ref) => {
|
|
|
9975
9890
|
...variantProps
|
|
9976
9891
|
};
|
|
9977
9892
|
const slots = (0, import_react22.useMemo)(() => switchStyle({ ...variantProps }), [variantProps]);
|
|
9978
|
-
return /* @__PURE__ */ (0,
|
|
9979
|
-
/* @__PURE__ */ (0,
|
|
9893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
9894
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
9980
9895
|
"input",
|
|
9981
9896
|
{
|
|
9982
9897
|
...inputProps,
|
|
@@ -9989,12 +9904,12 @@ var Switch = (0, import_react22.forwardRef)((originalProps, ref) => {
|
|
|
9989
9904
|
onChange
|
|
9990
9905
|
}
|
|
9991
9906
|
),
|
|
9992
|
-
/* @__PURE__ */ (0,
|
|
9907
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: slots.outerWrapper({ class: classNames == null ? void 0 : classNames.outerWrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: slots.thumb({ class: classNames == null ? void 0 : classNames.thumb }) }) }) })
|
|
9993
9908
|
] });
|
|
9994
9909
|
});
|
|
9995
9910
|
Switch.displayName = "Switch";
|
|
9996
9911
|
var switch_default = Switch;
|
|
9997
|
-
var switchStyle = (0,
|
|
9912
|
+
var switchStyle = (0, import_tailwind_variants22.tv)({
|
|
9998
9913
|
slots: {
|
|
9999
9914
|
base: ["group/switch", "relative", "max-w-fit", "inline-flex", "items-center", "justify-start", "cursor-pointer"],
|
|
10000
9915
|
outerWrapper: [
|
|
@@ -10256,7 +10171,7 @@ var useTooltip = ({ placement, offset, targetRect }) => {
|
|
|
10256
10171
|
};
|
|
10257
10172
|
|
|
10258
10173
|
// src/components/tooltip/tooltip.tsx
|
|
10259
|
-
var
|
|
10174
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
10260
10175
|
var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
|
|
10261
10176
|
const [props, variantProps] = mapPropsVariants(originalProps, tooltipStyle.variantKeys);
|
|
10262
10177
|
const { placement = "top", offset = 5, delay = 100, persistent = false, classNames, noTouchContent } = props;
|
|
@@ -10299,8 +10214,8 @@ var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
|
|
|
10299
10214
|
(0, import_react24.useEffect)(() => {
|
|
10300
10215
|
if (persistent) showTooltip();
|
|
10301
10216
|
}, [persistent, showTooltip]);
|
|
10302
|
-
return /* @__PURE__ */ (0,
|
|
10303
|
-
/* @__PURE__ */ (0,
|
|
10217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
10218
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
10304
10219
|
"div",
|
|
10305
10220
|
{
|
|
10306
10221
|
ref: (node) => {
|
|
@@ -10317,7 +10232,7 @@ var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
|
|
|
10317
10232
|
}
|
|
10318
10233
|
),
|
|
10319
10234
|
targetRect && (0, import_react_dom2.createPortal)(
|
|
10320
|
-
/* @__PURE__ */ (0,
|
|
10235
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
10321
10236
|
"div",
|
|
10322
10237
|
{
|
|
10323
10238
|
ref: tooltipRef,
|
|
@@ -10330,7 +10245,7 @@ var Tooltip = (0, import_react24.forwardRef)((originalProps, ref) => {
|
|
|
10330
10245
|
},
|
|
10331
10246
|
children: [
|
|
10332
10247
|
props.content,
|
|
10333
|
-
variantProps.tail && /* @__PURE__ */ (0,
|
|
10248
|
+
variantProps.tail && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
10334
10249
|
"div",
|
|
10335
10250
|
{
|
|
10336
10251
|
className: `absolute h-2 w-2 rotate-45 bg-inherit ${getTailClassName(placement)}`,
|
|
@@ -10383,7 +10298,7 @@ var tooltipStyle = tv({
|
|
|
10383
10298
|
// src/components/modal/modal.tsx
|
|
10384
10299
|
var import_react25 = require("react");
|
|
10385
10300
|
var import_react_dom3 = require("react-dom");
|
|
10386
|
-
var
|
|
10301
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
10387
10302
|
var Modal = (0, import_react25.forwardRef)((props, ref) => {
|
|
10388
10303
|
const [localProps, variantProps] = mapPropsVariants(props, modal.variantKeys);
|
|
10389
10304
|
const {
|
|
@@ -10414,10 +10329,10 @@ var Modal = (0, import_react25.forwardRef)((props, ref) => {
|
|
|
10414
10329
|
}, [isOpen, isKeyboardDismissDisabled, onCancel]);
|
|
10415
10330
|
if (!isOpen) return null;
|
|
10416
10331
|
return (0, import_react_dom3.createPortal)(
|
|
10417
|
-
/* @__PURE__ */ (0,
|
|
10418
|
-
/* @__PURE__ */ (0,
|
|
10419
|
-
/* @__PURE__ */ (0,
|
|
10420
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
10332
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
10333
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(backdrop_default, { open: true }),
|
|
10334
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: slots.modalWrapper({ class: classNames == null ? void 0 : classNames.modalWrapper }), children: [
|
|
10335
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
10421
10336
|
Icon_default,
|
|
10422
10337
|
{
|
|
10423
10338
|
size: "xl",
|
|
@@ -10426,13 +10341,13 @@ var Modal = (0, import_react25.forwardRef)((props, ref) => {
|
|
|
10426
10341
|
onClick: onCancel
|
|
10427
10342
|
}
|
|
10428
10343
|
),
|
|
10429
|
-
/* @__PURE__ */ (0,
|
|
10430
|
-
title && /* @__PURE__ */ (0,
|
|
10431
|
-
typeof content === "string" ? /* @__PURE__ */ (0,
|
|
10432
|
-
(cancelButtonText || confirmButtonText) && /* @__PURE__ */ (0,
|
|
10433
|
-
/* @__PURE__ */ (0,
|
|
10434
|
-
cancelButtonText && /* @__PURE__ */ (0,
|
|
10435
|
-
confirmButtonText && /* @__PURE__ */ (0,
|
|
10344
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
10345
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
|
|
10346
|
+
typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: slots.content({ class: classNames == null ? void 0 : classNames.content }), children: content }) : content,
|
|
10347
|
+
(cancelButtonText || confirmButtonText) && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: slots.footerWrapper({ class: classNames == null ? void 0 : classNames.footerWrapper }), children: [
|
|
10348
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: slots.footer({ class: classNames == null ? void 0 : classNames.footer }), children: [
|
|
10349
|
+
cancelButtonText && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(button_default, { variant: "soft", color: "neutral", full: true, onClick: onCancel, children: cancelButtonText }),
|
|
10350
|
+
confirmButtonText && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(button_default, { color: props.color, full: true, onClick: onConfirm, children: confirmButtonText })
|
|
10436
10351
|
] }),
|
|
10437
10352
|
extraFooter
|
|
10438
10353
|
] })
|
|
@@ -10504,7 +10419,7 @@ var modal = tv({
|
|
|
10504
10419
|
// src/components/drawer/drawer.tsx
|
|
10505
10420
|
var import_react26 = require("react");
|
|
10506
10421
|
var import_react_dom4 = require("react-dom");
|
|
10507
|
-
var
|
|
10422
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
10508
10423
|
var Drawer = (0, import_react26.forwardRef)((props, ref) => {
|
|
10509
10424
|
const [localProps, variantProps] = mapPropsVariants(props, drawer.variantKeys);
|
|
10510
10425
|
const { classNames, isOpen, content, isKeyboardDismissDisabled = false, onClose, backdrop = true } = localProps;
|
|
@@ -10566,7 +10481,7 @@ var Drawer = (0, import_react26.forwardRef)((props, ref) => {
|
|
|
10566
10481
|
};
|
|
10567
10482
|
if (!shouldRender) return null;
|
|
10568
10483
|
return (0, import_react_dom4.createPortal)(
|
|
10569
|
-
/* @__PURE__ */ (0,
|
|
10484
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
10570
10485
|
"div",
|
|
10571
10486
|
{
|
|
10572
10487
|
ref,
|
|
@@ -10581,15 +10496,15 @@ var Drawer = (0, import_react26.forwardRef)((props, ref) => {
|
|
|
10581
10496
|
role: "dialog",
|
|
10582
10497
|
"aria-modal": "true",
|
|
10583
10498
|
children: [
|
|
10584
|
-
backdrop && /* @__PURE__ */ (0,
|
|
10585
|
-
/* @__PURE__ */ (0,
|
|
10499
|
+
backdrop && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "absolute inset-0 bg-black/50 backdrop-blur-sm", onClick: onClose }),
|
|
10500
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
10586
10501
|
"div",
|
|
10587
10502
|
{
|
|
10588
10503
|
className: slots.drawerWrapper({
|
|
10589
10504
|
class: clsx(classNames == null ? void 0 : classNames.drawerWrapper, getAnimationClasses())
|
|
10590
10505
|
}),
|
|
10591
10506
|
onClick: (e) => e.stopPropagation(),
|
|
10592
|
-
children: /* @__PURE__ */ (0,
|
|
10507
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: content })
|
|
10593
10508
|
}
|
|
10594
10509
|
)
|
|
10595
10510
|
]
|
|
@@ -10663,12 +10578,12 @@ var drawer_default = Drawer;
|
|
|
10663
10578
|
|
|
10664
10579
|
// src/components/list/list.tsx
|
|
10665
10580
|
var import_react27 = require("react");
|
|
10666
|
-
var
|
|
10581
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
10667
10582
|
var List = (0, import_react27.forwardRef)((originalProps, ref) => {
|
|
10668
10583
|
const [props, variantProps] = mapPropsVariants(originalProps, listStyle.variantKeys);
|
|
10669
10584
|
const { children, classNames } = props;
|
|
10670
10585
|
const slots = (0, import_react27.useMemo)(() => listStyle(variantProps), [variantProps]);
|
|
10671
|
-
return /* @__PURE__ */ (0,
|
|
10586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: import_react27.Children.map(children, (child) => {
|
|
10672
10587
|
if (!(0, import_react27.isValidElement)(child)) return child;
|
|
10673
10588
|
return (0, import_react27.cloneElement)(child, {
|
|
10674
10589
|
...variantProps,
|
|
@@ -10708,7 +10623,7 @@ var listStyle = tv({
|
|
|
10708
10623
|
|
|
10709
10624
|
// src/components/list/listItem.tsx
|
|
10710
10625
|
var import_react28 = require("react");
|
|
10711
|
-
var
|
|
10626
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
10712
10627
|
var ListItem = (0, import_react28.forwardRef)((props, ref) => {
|
|
10713
10628
|
const [rawProps, variantProps] = mapPropsVariants(props, listItemStyle.variantKeys);
|
|
10714
10629
|
const {
|
|
@@ -10724,16 +10639,16 @@ var ListItem = (0, import_react28.forwardRef)((props, ref) => {
|
|
|
10724
10639
|
const slots = (0, import_react28.useMemo)(() => listItemStyle(variantProps), [variantProps]);
|
|
10725
10640
|
const iconSize = ["lg", "xl"].includes(size) ? "lg" : "md";
|
|
10726
10641
|
const avatarSize = iconSize;
|
|
10727
|
-
return /* @__PURE__ */ (0,
|
|
10728
|
-
/* @__PURE__ */ (0,
|
|
10729
|
-
avatar && /* @__PURE__ */ (0,
|
|
10730
|
-
startIconName && /* @__PURE__ */ (0,
|
|
10731
|
-
/* @__PURE__ */ (0,
|
|
10732
|
-
/* @__PURE__ */ (0,
|
|
10733
|
-
subTitle && /* @__PURE__ */ (0,
|
|
10642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), "data-selected": selected, onClick, children: [
|
|
10643
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
10644
|
+
avatar && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(avatar_default, { ...avatar, variant: "round", size: avatarSize }),
|
|
10645
|
+
startIconName && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon_default, { name: startIconName, fill: true, size, className: slots.startIcon({ class: classNames == null ? void 0 : classNames.startIcon }) }),
|
|
10646
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: slots.titleWrapper({ class: classNames == null ? void 0 : classNames.titleWrapper }), children: [
|
|
10647
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
|
|
10648
|
+
subTitle && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: slots.subTitle({ class: classNames == null ? void 0 : classNames.subTitle }), children: subTitle })
|
|
10734
10649
|
] })
|
|
10735
10650
|
] }),
|
|
10736
|
-
/* @__PURE__ */ (0,
|
|
10651
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon_default, { name: "right-chevron", size: iconSize, className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }) })
|
|
10737
10652
|
] });
|
|
10738
10653
|
});
|
|
10739
10654
|
ListItem.displayName = "ListItem";
|
|
@@ -10902,7 +10817,7 @@ var listItemStyle = tv({
|
|
|
10902
10817
|
|
|
10903
10818
|
// src/components/toast/toast.tsx
|
|
10904
10819
|
var import_react29 = require("react");
|
|
10905
|
-
var
|
|
10820
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
10906
10821
|
var Toast = (0, import_react29.forwardRef)((originalProps, ref) => {
|
|
10907
10822
|
const [props, variantProps] = mapPropsVariants(originalProps, toast.variantKeys);
|
|
10908
10823
|
const {
|
|
@@ -10930,7 +10845,7 @@ var Toast = (0, import_react29.forwardRef)((originalProps, ref) => {
|
|
|
10930
10845
|
[]
|
|
10931
10846
|
);
|
|
10932
10847
|
const animationClass = (placement == null ? void 0 : placement.includes("top")) ? "animate-slideInFromTop" : "animate-slideInFromBottom";
|
|
10933
|
-
return /* @__PURE__ */ (0,
|
|
10848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
10934
10849
|
"div",
|
|
10935
10850
|
{
|
|
10936
10851
|
ref: toastRef,
|
|
@@ -10942,12 +10857,12 @@ var Toast = (0, import_react29.forwardRef)((originalProps, ref) => {
|
|
|
10942
10857
|
),
|
|
10943
10858
|
style: hasShadow ? { boxShadow: "0px 6px 18px rgba(0, 0, 0, 0.10)" } : {},
|
|
10944
10859
|
children: [
|
|
10945
|
-
/* @__PURE__ */ (0,
|
|
10946
|
-
showIcon && /* @__PURE__ */ (0,
|
|
10947
|
-
/* @__PURE__ */ (0,
|
|
10948
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
10860
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
10861
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon_default, { name: originalProps.icon || "info-circle", fill: true, className: "mt-[2px]" }),
|
|
10862
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
|
|
10863
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon_default, { name: "close", className: "cursor-pointer", onClick: onClose })
|
|
10949
10864
|
] }),
|
|
10950
|
-
content && /* @__PURE__ */ (0,
|
|
10865
|
+
content && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children: content })
|
|
10951
10866
|
]
|
|
10952
10867
|
}
|
|
10953
10868
|
);
|
|
@@ -11091,7 +11006,7 @@ var getToastPosition = (placement, width, offset) => {
|
|
|
11091
11006
|
};
|
|
11092
11007
|
|
|
11093
11008
|
// src/components/toast/use-toast.tsx
|
|
11094
|
-
var
|
|
11009
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
11095
11010
|
var ToastContext = (0, import_react30.createContext)(null);
|
|
11096
11011
|
var useToast = () => {
|
|
11097
11012
|
const context = (0, import_react30.useContext)(ToastContext);
|
|
@@ -11142,20 +11057,20 @@ var ToastProvider = ({
|
|
|
11142
11057
|
right: right !== void 0 ? `${right}px` : void 0
|
|
11143
11058
|
});
|
|
11144
11059
|
}, [globalOptions == null ? void 0 : globalOptions.placement, globalOptions == null ? void 0 : globalOptions.width]);
|
|
11145
|
-
return /* @__PURE__ */ (0,
|
|
11060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(ToastContext.Provider, { value: contextValue, children: [
|
|
11146
11061
|
children,
|
|
11147
|
-
/* @__PURE__ */ (0,
|
|
11062
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { id: "deepnoid-toast-container", className: "flex flex-col gap-[10px]", style: containerStyle, children: toasts.map((toast2) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(toast_default, { ref: toastRef, onClose: () => removeToast(toast2.id), ...toast2 }, toast2.id)) })
|
|
11148
11063
|
] });
|
|
11149
11064
|
};
|
|
11150
11065
|
|
|
11151
11066
|
// src/components/picker/day.tsx
|
|
11152
11067
|
var import_react31 = require("react");
|
|
11153
|
-
var
|
|
11068
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
11154
11069
|
var Day = (0, import_react31.forwardRef)((originalProps, ref) => {
|
|
11155
11070
|
const [props, variantProps] = mapPropsVariants(originalProps, dayStyle.variantKeys);
|
|
11156
11071
|
const { classNames, children, ...divProps } = props;
|
|
11157
11072
|
const slots = (0, import_react31.useMemo)(() => dayStyle({ ...variantProps }), [variantProps]);
|
|
11158
|
-
return /* @__PURE__ */ (0,
|
|
11073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), ...divProps, children });
|
|
11159
11074
|
});
|
|
11160
11075
|
Day.displayName = "Day";
|
|
11161
11076
|
var day_default = Day;
|
|
@@ -11207,7 +11122,7 @@ var formatStringToDate = (date) => {
|
|
|
11207
11122
|
};
|
|
11208
11123
|
|
|
11209
11124
|
// src/components/picker/datePicker.tsx
|
|
11210
|
-
var
|
|
11125
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
11211
11126
|
var DatePicker = (0, import_react32.forwardRef)((originalProps, ref) => {
|
|
11212
11127
|
const [props, variantProps] = mapPropsVariants(originalProps, datePickerStyle.variantKeys);
|
|
11213
11128
|
const {
|
|
@@ -11346,9 +11261,9 @@ var DatePicker = (0, import_react32.forwardRef)((originalProps, ref) => {
|
|
|
11346
11261
|
if (value) setCurrentDate(new Date(value));
|
|
11347
11262
|
}, [value]);
|
|
11348
11263
|
const slots = (0, import_react32.useMemo)(() => datePickerStyle({ ...variantProps }), [variantProps]);
|
|
11349
|
-
const endContent = /* @__PURE__ */ (0,
|
|
11350
|
-
return /* @__PURE__ */ (0,
|
|
11351
|
-
/* @__PURE__ */ (0,
|
|
11264
|
+
const endContent = /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon_default, { name: "calendar", size, className: "cursor-pointer", fill: true, onClick: handleCalendarIconClick });
|
|
11265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
11266
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref: inputWrapperRef, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), onClick: handleFocusInput, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
11352
11267
|
input_default,
|
|
11353
11268
|
{
|
|
11354
11269
|
...inputProps,
|
|
@@ -11380,7 +11295,7 @@ var DatePicker = (0, import_react32.forwardRef)((originalProps, ref) => {
|
|
|
11380
11295
|
}
|
|
11381
11296
|
) }),
|
|
11382
11297
|
isPanelOpen && (0, import_react_dom5.createPortal)(
|
|
11383
|
-
/* @__PURE__ */ (0,
|
|
11298
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
11384
11299
|
"div",
|
|
11385
11300
|
{
|
|
11386
11301
|
ref: calendarWrapperRef,
|
|
@@ -11388,13 +11303,13 @@ var DatePicker = (0, import_react32.forwardRef)((originalProps, ref) => {
|
|
|
11388
11303
|
style: { position: "absolute", top: panelPos.top, left: panelPos.left, zIndex: 1e3 },
|
|
11389
11304
|
onMouseDown: handleCalendarMouseDown,
|
|
11390
11305
|
children: [
|
|
11391
|
-
/* @__PURE__ */ (0,
|
|
11392
|
-
/* @__PURE__ */ (0,
|
|
11393
|
-
/* @__PURE__ */ (0,
|
|
11394
|
-
/* @__PURE__ */ (0,
|
|
11306
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: slots.calendarHead({ class: classNames == null ? void 0 : classNames.calendarHead }), children: [
|
|
11307
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(icon_button_default, { name: "left", variant: "soft", color: "neutral", onClick: handlePrevMonth }),
|
|
11308
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-xl font-extrabold", children: monthYearFormat(currentDate.getFullYear(), currentDate.getMonth()) }),
|
|
11309
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(icon_button_default, { name: "right", variant: "soft", color: "neutral", onClick: handleNextMonth })
|
|
11395
11310
|
] }),
|
|
11396
|
-
/* @__PURE__ */ (0,
|
|
11397
|
-
/* @__PURE__ */ (0,
|
|
11311
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "grid grid-cols-7", children: daysOfWeek.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(day_default, { variant: "text", children: day }, `${day}-${index}`)) }),
|
|
11312
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "grid grid-cols-7 gap-[5px] text-center", children: getCalendarDates().map((week, weekIndex) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react32.Fragment, { children: week.map((dateObj, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
11398
11313
|
day_default,
|
|
11399
11314
|
{
|
|
11400
11315
|
variant: getDayProps(dateObj),
|
|
@@ -11403,8 +11318,8 @@ var DatePicker = (0, import_react32.forwardRef)((originalProps, ref) => {
|
|
|
11403
11318
|
},
|
|
11404
11319
|
index
|
|
11405
11320
|
)) }, weekIndex)) }),
|
|
11406
|
-
/* @__PURE__ */ (0,
|
|
11407
|
-
/* @__PURE__ */ (0,
|
|
11321
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex justify-between px-[10px]", children: [
|
|
11322
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
11408
11323
|
text_button_default,
|
|
11409
11324
|
{
|
|
11410
11325
|
variant: "underline",
|
|
@@ -11415,10 +11330,10 @@ var DatePicker = (0, import_react32.forwardRef)((originalProps, ref) => {
|
|
|
11415
11330
|
children: resetTitle
|
|
11416
11331
|
}
|
|
11417
11332
|
),
|
|
11418
|
-
/* @__PURE__ */ (0,
|
|
11333
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(text_button_default, { variant: "underline", size: "sm", classNames: { base: "font-bold" }, onClick: handleSetToday, children: todayTitle })
|
|
11419
11334
|
] }),
|
|
11420
|
-
/* @__PURE__ */ (0,
|
|
11421
|
-
/* @__PURE__ */ (0,
|
|
11335
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex gap-[10px]", children: [
|
|
11336
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
11422
11337
|
button_default,
|
|
11423
11338
|
{
|
|
11424
11339
|
variant: "soft",
|
|
@@ -11429,7 +11344,7 @@ var DatePicker = (0, import_react32.forwardRef)((originalProps, ref) => {
|
|
|
11429
11344
|
children: cancelTitle
|
|
11430
11345
|
}
|
|
11431
11346
|
),
|
|
11432
|
-
/* @__PURE__ */ (0,
|
|
11347
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(button_default, { size: "sm", classNames: { base: "flex flex-1" }, onClick: handleConfirmDate, children: confirmTitle })
|
|
11433
11348
|
] })
|
|
11434
11349
|
]
|
|
11435
11350
|
}
|
|
@@ -11480,7 +11395,7 @@ var datePickerStyle = tv({
|
|
|
11480
11395
|
// src/components/picker/timePicker.tsx
|
|
11481
11396
|
var import_react33 = require("react");
|
|
11482
11397
|
var import_react_dom6 = require("react-dom");
|
|
11483
|
-
var
|
|
11398
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
11484
11399
|
var TimePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
11485
11400
|
const [props, variantProps] = mapPropsVariants(originalProps, timePickerStyle.variantKeys);
|
|
11486
11401
|
const {
|
|
@@ -11574,12 +11489,12 @@ var TimePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
11574
11489
|
setSelectedRange(emptyRange);
|
|
11575
11490
|
onChangeRange == null ? void 0 : onChangeRange(emptyRange);
|
|
11576
11491
|
};
|
|
11577
|
-
return /* @__PURE__ */ (0,
|
|
11578
|
-
/* @__PURE__ */ (0,
|
|
11579
|
-
label && /* @__PURE__ */ (0,
|
|
11580
|
-
/* @__PURE__ */ (0,
|
|
11581
|
-
/* @__PURE__ */ (0,
|
|
11582
|
-
/* @__PURE__ */ (0,
|
|
11492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
11493
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
11494
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("label", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
|
|
11495
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
11496
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { ref: inputWrapperRef, className: slots.inputWrapper({ class: classNames == null ? void 0 : classNames.inputWrapper }), children: [
|
|
11497
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11583
11498
|
"input",
|
|
11584
11499
|
{
|
|
11585
11500
|
...inputProps,
|
|
@@ -11594,8 +11509,8 @@ var TimePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
11594
11509
|
onKeyDown: handleInputKeyDown
|
|
11595
11510
|
}
|
|
11596
11511
|
),
|
|
11597
|
-
/* @__PURE__ */ (0,
|
|
11598
|
-
displayValue && /* @__PURE__ */ (0,
|
|
11512
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }), children: [
|
|
11513
|
+
displayValue && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11599
11514
|
Icon_default,
|
|
11600
11515
|
{
|
|
11601
11516
|
name: "close",
|
|
@@ -11606,7 +11521,7 @@ var TimePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
11606
11521
|
}
|
|
11607
11522
|
}
|
|
11608
11523
|
),
|
|
11609
|
-
/* @__PURE__ */ (0,
|
|
11524
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11610
11525
|
Icon_default,
|
|
11611
11526
|
{
|
|
11612
11527
|
name: "clock",
|
|
@@ -11619,11 +11534,11 @@ var TimePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
11619
11534
|
)
|
|
11620
11535
|
] })
|
|
11621
11536
|
] }),
|
|
11622
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
11537
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
|
|
11623
11538
|
] })
|
|
11624
11539
|
] }),
|
|
11625
11540
|
isPanelOpen && (0, import_react_dom6.createPortal)(
|
|
11626
|
-
/* @__PURE__ */ (0,
|
|
11541
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11627
11542
|
"div",
|
|
11628
11543
|
{
|
|
11629
11544
|
ref: panelWrapperRef,
|
|
@@ -11635,9 +11550,9 @@ var TimePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
11635
11550
|
zIndex: 1e3
|
|
11636
11551
|
},
|
|
11637
11552
|
onMouseDown: (e) => e.preventDefault(),
|
|
11638
|
-
children: /* @__PURE__ */ (0,
|
|
11639
|
-
/* @__PURE__ */ (0,
|
|
11640
|
-
/* @__PURE__ */ (0,
|
|
11553
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "bg-body-background text-neutral-main flex items-center gap-[5px] p-[10px]", children: [
|
|
11554
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-[5px]", children: [
|
|
11555
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11641
11556
|
select_default,
|
|
11642
11557
|
{
|
|
11643
11558
|
options: renderHourOptions(),
|
|
@@ -11648,8 +11563,8 @@ var TimePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
11648
11563
|
classNames: mergedSelectClassNames
|
|
11649
11564
|
}
|
|
11650
11565
|
),
|
|
11651
|
-
/* @__PURE__ */ (0,
|
|
11652
|
-
/* @__PURE__ */ (0,
|
|
11566
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: ":" }),
|
|
11567
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11653
11568
|
select_default,
|
|
11654
11569
|
{
|
|
11655
11570
|
options: renderMinuteOptions(),
|
|
@@ -11661,9 +11576,9 @@ var TimePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
11661
11576
|
}
|
|
11662
11577
|
)
|
|
11663
11578
|
] }),
|
|
11664
|
-
/* @__PURE__ */ (0,
|
|
11665
|
-
/* @__PURE__ */ (0,
|
|
11666
|
-
/* @__PURE__ */ (0,
|
|
11579
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: "~" }),
|
|
11580
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-[5px]", children: [
|
|
11581
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11667
11582
|
select_default,
|
|
11668
11583
|
{
|
|
11669
11584
|
options: renderHourOptions(),
|
|
@@ -11674,8 +11589,8 @@ var TimePicker = (0, import_react33.forwardRef)((originalProps, ref) => {
|
|
|
11674
11589
|
classNames: mergedSelectClassNames
|
|
11675
11590
|
}
|
|
11676
11591
|
),
|
|
11677
|
-
/* @__PURE__ */ (0,
|
|
11678
|
-
/* @__PURE__ */ (0,
|
|
11592
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: ":" }),
|
|
11593
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
11679
11594
|
select_default,
|
|
11680
11595
|
{
|
|
11681
11596
|
options: renderMinuteOptions(),
|
|
@@ -11823,7 +11738,7 @@ var timePickerStyle = tv({
|
|
|
11823
11738
|
|
|
11824
11739
|
// src/components/tree/tree.tsx
|
|
11825
11740
|
var import_react34 = require("react");
|
|
11826
|
-
var
|
|
11741
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
11827
11742
|
var TreeNodeItem = (0, import_react34.forwardRef)(
|
|
11828
11743
|
({ node, depth, fileIcon, selectedName, classNames, onExpand }, ref) => {
|
|
11829
11744
|
const [isOpen, setIsOpen] = (0, import_react34.useState)(false);
|
|
@@ -11856,7 +11771,7 @@ var TreeNodeItem = (0, import_react34.forwardRef)(
|
|
|
11856
11771
|
e.preventDefault();
|
|
11857
11772
|
(_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
|
|
11858
11773
|
};
|
|
11859
|
-
return /* @__PURE__ */ (0,
|
|
11774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
11860
11775
|
"div",
|
|
11861
11776
|
{
|
|
11862
11777
|
ref,
|
|
@@ -11865,7 +11780,7 @@ var TreeNodeItem = (0, import_react34.forwardRef)(
|
|
|
11865
11780
|
slots.gap({ class: classNames == null ? void 0 : classNames.gap })
|
|
11866
11781
|
),
|
|
11867
11782
|
children: [
|
|
11868
|
-
/* @__PURE__ */ (0,
|
|
11783
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
11869
11784
|
"div",
|
|
11870
11785
|
{
|
|
11871
11786
|
className: clsx(
|
|
@@ -11876,7 +11791,7 @@ var TreeNodeItem = (0, import_react34.forwardRef)(
|
|
|
11876
11791
|
onClick: handleClick,
|
|
11877
11792
|
onContextMenu: handleRightClick,
|
|
11878
11793
|
children: [
|
|
11879
|
-
hasMore && /* @__PURE__ */ (0,
|
|
11794
|
+
hasMore && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
11880
11795
|
Icon_default,
|
|
11881
11796
|
{
|
|
11882
11797
|
name: "right-chevron",
|
|
@@ -11891,7 +11806,7 @@ var TreeNodeItem = (0, import_react34.forwardRef)(
|
|
|
11891
11806
|
]
|
|
11892
11807
|
}
|
|
11893
11808
|
),
|
|
11894
|
-
isOpen && hasMore && /* @__PURE__ */ (0,
|
|
11809
|
+
isOpen && hasMore && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: slots.gap({ class: classNames == null ? void 0 : classNames.gap }), children: children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
11895
11810
|
TreeNodeItem,
|
|
11896
11811
|
{
|
|
11897
11812
|
node: child,
|
|
@@ -11920,10 +11835,10 @@ var Tree = ({ headerContent, group, groupIcon, fileIcon, selectedName, className
|
|
|
11920
11835
|
e.preventDefault();
|
|
11921
11836
|
(_a = group.onRightClick) == null ? void 0 : _a.call(group, e);
|
|
11922
11837
|
};
|
|
11923
|
-
return /* @__PURE__ */ (0,
|
|
11924
|
-
headerContent && /* @__PURE__ */ (0,
|
|
11925
|
-
/* @__PURE__ */ (0,
|
|
11926
|
-
/* @__PURE__ */ (0,
|
|
11838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
11839
|
+
headerContent && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: headerContent }),
|
|
11840
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
|
|
11841
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
11927
11842
|
"div",
|
|
11928
11843
|
{
|
|
11929
11844
|
className: clsx(
|
|
@@ -11939,7 +11854,7 @@ var Tree = ({ headerContent, group, groupIcon, fileIcon, selectedName, className
|
|
|
11939
11854
|
]
|
|
11940
11855
|
}
|
|
11941
11856
|
),
|
|
11942
|
-
/* @__PURE__ */ (0,
|
|
11857
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: slots.itemWrapper({ class: classNames == null ? void 0 : classNames.itemWrapper }), children: group.data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
11943
11858
|
TreeNodeItem,
|
|
11944
11859
|
{
|
|
11945
11860
|
node,
|
|
@@ -11979,7 +11894,7 @@ var treeStyle = tv({
|
|
|
11979
11894
|
|
|
11980
11895
|
// src/components/fileUpload/fileUpload.tsx
|
|
11981
11896
|
var import_react37 = require("react");
|
|
11982
|
-
var
|
|
11897
|
+
var import_tailwind_variants34 = require("tailwind-variants");
|
|
11983
11898
|
|
|
11984
11899
|
// src/components/progress/progress.tsx
|
|
11985
11900
|
var import_react36 = require("react");
|
|
@@ -12016,7 +11931,7 @@ function useIsMounted(props = {}) {
|
|
|
12016
11931
|
}
|
|
12017
11932
|
|
|
12018
11933
|
// src/components/progress/progress.tsx
|
|
12019
|
-
var
|
|
11934
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
12020
11935
|
var Progress = (originalProps) => {
|
|
12021
11936
|
const [props, variantProps] = mapPropsVariants(originalProps, progressStyle.variantKeys);
|
|
12022
11937
|
const { children, classNames, value = 0, minValue = 0, maxValue = 100, ...progressProps } = props;
|
|
@@ -12031,7 +11946,7 @@ var Progress = (originalProps) => {
|
|
|
12031
11946
|
[selfMounted, isIndeterminate, value, minValue, maxValue]
|
|
12032
11947
|
);
|
|
12033
11948
|
const slots = (0, import_react36.useMemo)(() => progressStyle({ ...variantProps }), [variantProps]);
|
|
12034
|
-
return /* @__PURE__ */ (0,
|
|
11949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: slots.track({ class: classNames == null ? void 0 : classNames.track }), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12035
11950
|
"div",
|
|
12036
11951
|
{
|
|
12037
11952
|
className: slots.indicator({ class: classNames == null ? void 0 : classNames.indicator }),
|
|
@@ -12130,7 +12045,7 @@ var clampPercentage = (value) => {
|
|
|
12130
12045
|
};
|
|
12131
12046
|
|
|
12132
12047
|
// src/components/fileUpload/fileUpload.tsx
|
|
12133
|
-
var
|
|
12048
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
12134
12049
|
function FileUpload({
|
|
12135
12050
|
buttonText,
|
|
12136
12051
|
maxSizeMB = 10,
|
|
@@ -12211,10 +12126,10 @@ function FileUpload({
|
|
|
12211
12126
|
(0, import_react37.useEffect)(() => {
|
|
12212
12127
|
setMessage(errorMessage);
|
|
12213
12128
|
}, [setMessage, errorMessage]);
|
|
12214
|
-
return /* @__PURE__ */ (0,
|
|
12215
|
-
/* @__PURE__ */ (0,
|
|
12216
|
-
/* @__PURE__ */ (0,
|
|
12217
|
-
/* @__PURE__ */ (0,
|
|
12129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
12130
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: slots.container({ class: classNames == null ? void 0 : classNames.container }), children: [
|
|
12131
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: slots.inputWrapper(), children: [
|
|
12132
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
12218
12133
|
input_default,
|
|
12219
12134
|
{
|
|
12220
12135
|
name,
|
|
@@ -12226,7 +12141,7 @@ function FileUpload({
|
|
|
12226
12141
|
errorMessage: message
|
|
12227
12142
|
}
|
|
12228
12143
|
),
|
|
12229
|
-
file && /* @__PURE__ */ (0,
|
|
12144
|
+
file && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
12230
12145
|
icon_button_default,
|
|
12231
12146
|
{
|
|
12232
12147
|
name: "close",
|
|
@@ -12238,16 +12153,16 @@ function FileUpload({
|
|
|
12238
12153
|
}
|
|
12239
12154
|
)
|
|
12240
12155
|
] }),
|
|
12241
|
-
/* @__PURE__ */ (0,
|
|
12242
|
-
/* @__PURE__ */ (0,
|
|
12156
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(button_default, { type: "button", variant: "outline", onClick: handleButtonClick, disabled: !!file, children: buttonText }),
|
|
12157
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("input", { ref: fileInputRef, type: "file", hidden: true, accept: accept.join(","), onChange: handleFileChange })
|
|
12243
12158
|
] }),
|
|
12244
|
-
showProgress && file && uploadProgress < 100 && /* @__PURE__ */ (0,
|
|
12245
|
-
!message && helperMessage && /* @__PURE__ */ (0,
|
|
12159
|
+
showProgress && file && uploadProgress < 100 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(progress_default, { value: uploadProgress }),
|
|
12160
|
+
!message && helperMessage && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: slots.helperMessage(), children: helperMessage })
|
|
12246
12161
|
] });
|
|
12247
12162
|
}
|
|
12248
12163
|
FileUpload.displayName = "FileUpload";
|
|
12249
12164
|
var fileUpload_default = FileUpload;
|
|
12250
|
-
var fileUploadStyle = (0,
|
|
12165
|
+
var fileUploadStyle = (0, import_tailwind_variants34.tv)({
|
|
12251
12166
|
slots: {
|
|
12252
12167
|
base: ["flex", "flex-col", "gap-[5px]"],
|
|
12253
12168
|
container: ["flex", "gap-[10px]"],
|
|
@@ -12258,6 +12173,75 @@ var fileUploadStyle = (0, import_tailwind_variants35.tv)({
|
|
|
12258
12173
|
}
|
|
12259
12174
|
});
|
|
12260
12175
|
|
|
12176
|
+
// src/components/skeleton/skeleton.tsx
|
|
12177
|
+
var import_tailwind_variants35 = require("tailwind-variants");
|
|
12178
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
12179
|
+
var Skeleton = ({ color = "primary", className, speed = "normal", rounded = "md" }) => {
|
|
12180
|
+
const speedMap = {
|
|
12181
|
+
fast: "0.7s",
|
|
12182
|
+
normal: "1.2s",
|
|
12183
|
+
slow: "2s"
|
|
12184
|
+
};
|
|
12185
|
+
const slots = skeletonStyle();
|
|
12186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
12187
|
+
"div",
|
|
12188
|
+
{
|
|
12189
|
+
className: clsx(slots.base({ color, rounded }), className),
|
|
12190
|
+
style: {
|
|
12191
|
+
"--shimmer-duration": speedMap[speed]
|
|
12192
|
+
},
|
|
12193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("style", { children: `@keyframes shimmer {
|
|
12194
|
+
100% {
|
|
12195
|
+
transform: translateX(100%);
|
|
12196
|
+
}
|
|
12197
|
+
}
|
|
12198
|
+
.skeleton-shimmer::before {
|
|
12199
|
+
animation: shimmer var(--shimmer-duration) infinite linear;
|
|
12200
|
+
}
|
|
12201
|
+
` })
|
|
12202
|
+
}
|
|
12203
|
+
);
|
|
12204
|
+
};
|
|
12205
|
+
Skeleton.displayName = "Skeleton";
|
|
12206
|
+
var skeleton_default = Skeleton;
|
|
12207
|
+
var skeletonStyle = (0, import_tailwind_variants35.tv)({
|
|
12208
|
+
slots: {
|
|
12209
|
+
base: [
|
|
12210
|
+
"relative",
|
|
12211
|
+
"overflow-hidden",
|
|
12212
|
+
"w-full",
|
|
12213
|
+
"h-[18px]",
|
|
12214
|
+
"skeleton-shimmer",
|
|
12215
|
+
"before:absolute",
|
|
12216
|
+
"before:inset-0",
|
|
12217
|
+
"before:-translate-x-full",
|
|
12218
|
+
"before:bg-gradient-to-r",
|
|
12219
|
+
"before:from-transparent",
|
|
12220
|
+
"before:via-white/40",
|
|
12221
|
+
"before:to-transparent",
|
|
12222
|
+
"before:content-['']"
|
|
12223
|
+
]
|
|
12224
|
+
},
|
|
12225
|
+
variants: {
|
|
12226
|
+
color: {
|
|
12227
|
+
primary: { base: "bg-primary-soft" },
|
|
12228
|
+
secondary: { base: "bg-secondary-soft" },
|
|
12229
|
+
neutral: { base: "bg-neutral-soft" }
|
|
12230
|
+
},
|
|
12231
|
+
rounded: {
|
|
12232
|
+
sm: { base: "rounded-sm" },
|
|
12233
|
+
md: { base: "rounded-md" },
|
|
12234
|
+
lg: { base: "rounded-lg" },
|
|
12235
|
+
xl: { base: "rounded-xl" },
|
|
12236
|
+
full: { base: "rounded-full" }
|
|
12237
|
+
}
|
|
12238
|
+
},
|
|
12239
|
+
defaultVariants: {
|
|
12240
|
+
color: "primary",
|
|
12241
|
+
rounded: "md"
|
|
12242
|
+
}
|
|
12243
|
+
});
|
|
12244
|
+
|
|
12261
12245
|
// src/components/charts/circularProgress.tsx
|
|
12262
12246
|
var import_recharts = require("recharts");
|
|
12263
12247
|
var import_react38 = require("react");
|