@deepnoid/ui 0.1.26 → 0.1.28
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 +170 -166
- package/dist/{chunk-MSAULFDB.mjs → chunk-272FMLIL.mjs} +17 -17
- package/dist/{chunk-3IU2RPSM.mjs → chunk-2SDYFOZL.mjs} +46 -35
- package/dist/{chunk-HWL7TPUN.mjs → chunk-2TKEWFGH.mjs} +1 -1
- package/dist/chunk-4OSN2OE2.mjs +178 -0
- package/dist/chunk-6TIIBU7J.mjs +35 -0
- package/dist/{chunk-Q72LZAPG.mjs → chunk-A7RU3FU5.mjs} +1 -1
- package/dist/{chunk-P5PJTJLY.mjs → chunk-BEQ3KZGS.mjs} +19 -19
- package/dist/{chunk-IRAHS4WS.mjs → chunk-G67WUZO3.mjs} +1 -1
- package/dist/{chunk-YBDA3WQP.mjs → chunk-IBI3OVQI.mjs} +1 -1
- package/dist/{chunk-BQUZRVYW.mjs → chunk-JTZUXVOU.mjs} +1 -1
- package/dist/{chunk-6OMHIMIA.mjs → chunk-JV7VLO2L.mjs} +2 -2
- package/dist/{chunk-B3DFSXGC.mjs → chunk-K7VUN5BS.mjs} +2 -2
- package/dist/{chunk-DLQFMOBN.mjs → chunk-KYJTZPXY.mjs} +1 -1
- package/dist/{chunk-OUAKGMDW.mjs → chunk-MEY4IL7D.mjs} +1 -1
- package/dist/{chunk-SCFTSNCK.mjs → chunk-NHVIKP4H.mjs} +6 -6
- package/dist/{chunk-PMMTMYRI.mjs → chunk-QIEKOGY7.mjs} +1 -1
- package/dist/{chunk-QY7LYAXT.mjs → chunk-RT3S3VVJ.mjs} +2 -2
- package/dist/{chunk-IVK24VIL.mjs → chunk-SO7BGWM7.mjs} +2 -2
- package/dist/{chunk-XQGD4ZIX.mjs → chunk-SP3JVQY3.mjs} +1 -1
- package/dist/{chunk-EAK5DVWA.mjs → chunk-UNH3BCGN.mjs} +8 -1
- package/dist/{chunk-6HX3PPL6.mjs → chunk-WLNLVX7Q.mjs} +1 -1
- package/dist/components/avatar/avatar.js +46 -35
- package/dist/components/avatar/avatar.mjs +2 -2
- package/dist/components/avatar/index.js +46 -35
- package/dist/components/avatar/index.mjs +2 -2
- package/dist/components/breadcrumb/breadcrumb.js +46 -35
- package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
- package/dist/components/breadcrumb/index.js +46 -35
- package/dist/components/breadcrumb/index.mjs +5 -5
- package/dist/components/button/button.js +46 -35
- package/dist/components/button/button.mjs +3 -3
- package/dist/components/button/icon-button.js +46 -35
- package/dist/components/button/icon-button.mjs +3 -3
- package/dist/components/button/index.js +46 -35
- package/dist/components/button/index.mjs +4 -4
- package/dist/components/chip/chip.js +46 -35
- package/dist/components/chip/chip.mjs +3 -3
- package/dist/components/chip/index.js +46 -35
- package/dist/components/chip/index.mjs +3 -3
- package/dist/components/dateTimePicker/calendar.js +46 -35
- package/dist/components/dateTimePicker/calendar.mjs +3 -3
- package/dist/components/dateTimePicker/dateTimePicker.js +46 -35
- package/dist/components/dateTimePicker/dateTimePicker.mjs +9 -9
- package/dist/components/dateTimePicker/index.js +46 -35
- package/dist/components/dateTimePicker/index.mjs +9 -9
- package/dist/components/dateTimePicker/timePicker.js +46 -35
- package/dist/components/dateTimePicker/timePicker.mjs +5 -5
- package/dist/components/icon/Icon.d.mts +9 -5
- package/dist/components/icon/Icon.d.ts +9 -5
- package/dist/components/icon/Icon.js +46 -35
- package/dist/components/icon/Icon.mjs +2 -2
- package/dist/components/icon/index.js +46 -35
- package/dist/components/icon/index.mjs +2 -2
- package/dist/components/icon/template.d.mts +3 -2
- package/dist/components/icon/template.d.ts +3 -2
- package/dist/components/icon/template.js +46 -35
- package/dist/components/icon/template.mjs +1 -1
- package/dist/components/input/index.js +64 -53
- package/dist/components/input/index.mjs +3 -3
- package/dist/components/input/input.d.mts +44 -44
- package/dist/components/input/input.d.ts +44 -44
- package/dist/components/input/input.js +64 -53
- package/dist/components/input/input.mjs +3 -3
- package/dist/components/list/index.js +46 -35
- package/dist/components/list/index.mjs +4 -4
- package/dist/components/list/listItem.js +46 -35
- package/dist/components/list/listItem.mjs +4 -4
- package/dist/components/modal/index.js +46 -35
- package/dist/components/modal/index.mjs +5 -5
- package/dist/components/modal/modal.js +46 -35
- package/dist/components/modal/modal.mjs +5 -5
- package/dist/components/pagination/index.js +64 -53
- package/dist/components/pagination/index.mjs +4 -4
- package/dist/components/pagination/pagination.js +64 -53
- package/dist/components/pagination/pagination.mjs +4 -4
- package/dist/components/select/index.js +62 -51
- package/dist/components/select/index.mjs +3 -3
- package/dist/components/select/select.d.mts +38 -38
- package/dist/components/select/select.d.ts +38 -38
- package/dist/components/select/select.js +62 -51
- package/dist/components/select/select.mjs +3 -3
- package/dist/components/table/definition-table.d.mts +51 -0
- package/dist/components/table/definition-table.d.ts +51 -0
- package/dist/components/table/definition-table.js +351 -0
- package/dist/components/table/definition-table.mjs +9 -0
- package/dist/components/table/form-table.d.mts +1 -1
- package/dist/components/table/form-table.d.ts +1 -1
- package/dist/components/table/form-table.mjs +43 -3
- package/dist/components/table/index.d.mts +1 -1
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/index.js +86 -82
- package/dist/components/table/index.mjs +9 -9
- package/dist/components/table/table-head.js +8 -1
- package/dist/components/table/table-head.mjs +1 -1
- package/dist/components/table/table.js +72 -54
- package/dist/components/table/table.mjs +6 -6
- package/dist/components/toast/index.js +46 -35
- package/dist/components/toast/index.mjs +4 -4
- package/dist/components/toast/toast.js +46 -35
- package/dist/components/toast/toast.mjs +3 -3
- package/dist/components/toast/use-toast.js +46 -35
- package/dist/components/toast/use-toast.mjs +4 -4
- package/dist/components/tree/index.d.mts +1 -0
- package/dist/components/tree/index.d.ts +1 -0
- package/dist/components/tree/index.js +170 -84
- package/dist/components/tree/index.mjs +3 -3
- package/dist/components/tree/tree.d.mts +17 -10
- package/dist/components/tree/tree.d.ts +17 -10
- package/dist/components/tree/tree.js +175 -84
- package/dist/components/tree/tree.mjs +5 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +226 -147
- package/dist/index.mjs +31 -31
- package/package.json +1 -1
- package/dist/chunk-ICZTNO4V.mjs +0 -49
- package/dist/chunk-TEQ723QO.mjs +0 -102
|
@@ -1,9 +1,49 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-4ZJFD3L3.mjs";
|
|
3
|
+
tv
|
|
4
|
+
} from "../../chunk-4ZJFD3L3.mjs";
|
|
6
5
|
import "../../chunk-AC6TWLRT.mjs";
|
|
6
|
+
|
|
7
|
+
// src/components/table/form-table.tsx
|
|
8
|
+
import { forwardRef, useMemo } from "react";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var DEFAULT_COLUMN_CLASSES = [
|
|
11
|
+
"w-[120px] px-[10px] py-[9.5px] font-bold text-md text-body-foreground border-r border-neutral-light",
|
|
12
|
+
"px-[10px] py-[9.5px]"
|
|
13
|
+
];
|
|
14
|
+
var FormTableRow = ({ columns, columnClasses = [] }) => /* @__PURE__ */ jsx("tr", { className: "border-neutral-light min-h-[50px] border-b", children: columns.map((col, index) => {
|
|
15
|
+
var _a;
|
|
16
|
+
return /* @__PURE__ */ jsx("td", { className: (_a = columnClasses[index]) != null ? _a : DEFAULT_COLUMN_CLASSES[index], children: col }, index);
|
|
17
|
+
}) });
|
|
18
|
+
var FormTable = forwardRef(
|
|
19
|
+
({ rows, onSubmit, footer, classNames }, ref) => {
|
|
20
|
+
const slots = useMemo(() => formTableStyle(), []);
|
|
21
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
|
+
/* @__PURE__ */ jsx("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: /* @__PURE__ */ jsx("tbody", { children: rows.map((row, i) => /* @__PURE__ */ jsx(FormTableRow, { ...row }, i)) }) }),
|
|
23
|
+
footer && /* @__PURE__ */ jsx("div", { children: footer })
|
|
24
|
+
] });
|
|
25
|
+
if (onSubmit) {
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"form",
|
|
28
|
+
{
|
|
29
|
+
ref,
|
|
30
|
+
onSubmit,
|
|
31
|
+
className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
|
|
32
|
+
children: content
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return /* @__PURE__ */ jsx("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: content });
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
FormTable.displayName = "FormTable";
|
|
40
|
+
var form_table_default = FormTable;
|
|
41
|
+
var formTableStyle = tv({
|
|
42
|
+
slots: {
|
|
43
|
+
base: ["flex", "flex-col", "gap-[30px]"],
|
|
44
|
+
table: ["w-full", "table-fixed", "border", "border-neutral-light"]
|
|
45
|
+
}
|
|
46
|
+
});
|
|
7
47
|
export {
|
|
8
48
|
form_table_default as default
|
|
9
49
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Table, TableColumn, TableRef, TableRow } from './table.mjs';
|
|
2
|
-
export { default as
|
|
2
|
+
export { default as DefinitionTable } from './definition-table.mjs';
|
|
3
3
|
import 'tailwind-variants';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '../../utils/types.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as Table, TableColumn, TableRef, TableRow } from './table.js';
|
|
2
|
-
export { default as
|
|
2
|
+
export { default as DefinitionTable } from './definition-table.js';
|
|
3
3
|
import 'tailwind-variants';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '../../utils/types.js';
|
|
@@ -102,7 +102,7 @@ var require_plugin = __commonJS({
|
|
|
102
102
|
// src/components/table/index.ts
|
|
103
103
|
var table_exports = {};
|
|
104
104
|
__export(table_exports, {
|
|
105
|
-
|
|
105
|
+
DefinitionTable: () => definition_table_default,
|
|
106
106
|
Table: () => table_default
|
|
107
107
|
});
|
|
108
108
|
module.exports = __toCommonJS(table_exports);
|
|
@@ -618,7 +618,14 @@ var TableHead = ({ columns, slots, size, rowCheckbox, isCheckedAll, classNames,
|
|
|
618
618
|
},
|
|
619
619
|
`${column.field}${index}thead`
|
|
620
620
|
));
|
|
621
|
-
const renderSelectAllCheckbox = () => rowCheckbox && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
621
|
+
const renderSelectAllCheckbox = () => rowCheckbox && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
622
|
+
checkbox_default,
|
|
623
|
+
{
|
|
624
|
+
size,
|
|
625
|
+
checked: isCheckedAll,
|
|
626
|
+
onChange: (e) => onCheckAll(e.target.checked)
|
|
627
|
+
}
|
|
628
|
+
) }) });
|
|
622
629
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
623
630
|
renderColumnHeaders(),
|
|
624
631
|
renderSelectAllCheckbox()
|
|
@@ -1258,22 +1265,61 @@ var template = {
|
|
|
1258
1265
|
}
|
|
1259
1266
|
);
|
|
1260
1267
|
},
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1268
|
+
plus: ({ className }) => {
|
|
1269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1270
|
+
"svg",
|
|
1271
|
+
{
|
|
1272
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1273
|
+
width: "18",
|
|
1274
|
+
height: "18",
|
|
1275
|
+
viewBox: "0 0 18 18",
|
|
1276
|
+
fill: "none",
|
|
1277
|
+
className,
|
|
1278
|
+
children: [
|
|
1279
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M4.5 9H13.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1280
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M9 13.5V4.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1281
|
+
]
|
|
1282
|
+
}
|
|
1283
|
+
);
|
|
1284
|
+
},
|
|
1285
|
+
minus: ({ className }) => {
|
|
1264
1286
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1265
1287
|
"svg",
|
|
1266
1288
|
{
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1289
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1290
|
+
width: "18",
|
|
1291
|
+
height: "18",
|
|
1292
|
+
viewBox: "0 0 18 18",
|
|
1270
1293
|
fill: "none",
|
|
1294
|
+
className,
|
|
1295
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M4.5 9H13.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1296
|
+
}
|
|
1297
|
+
);
|
|
1298
|
+
},
|
|
1299
|
+
pencil: ({ className }) => {
|
|
1300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1301
|
+
"svg",
|
|
1302
|
+
{
|
|
1271
1303
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1304
|
+
width: "18",
|
|
1305
|
+
height: "18",
|
|
1306
|
+
viewBox: "0 0 18 18",
|
|
1307
|
+
fill: "none",
|
|
1272
1308
|
className,
|
|
1273
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1309
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1310
|
+
"path",
|
|
1311
|
+
{
|
|
1312
|
+
d: "M12.6465 3.36525L13.9117 2.09925C14.1755 1.83549 14.5332 1.68732 14.9062 1.68732C15.2793 1.68732 15.637 1.83549 15.9008 2.09925C16.1645 2.36301 16.3127 2.72074 16.3127 3.09375C16.3127 3.46676 16.1645 3.82449 15.9008 4.08825L7.9365 12.0525C7.53999 12.4488 7.05102 12.74 6.51375 12.9L4.5 13.5L5.1 11.4863C5.25996 10.949 5.55123 10.46 5.9475 10.0635L12.6465 3.36525ZM12.6465 3.36525L14.625 5.34375M13.5 10.5V14.0625C13.5 14.5101 13.3222 14.9393 13.0057 15.2557C12.6893 15.5722 12.2601 15.75 11.8125 15.75H3.9375C3.48995 15.75 3.06072 15.5722 2.74426 15.2557C2.42779 14.9393 2.25 14.5101 2.25 14.0625V6.1875C2.25 5.73995 2.42779 5.31073 2.74426 4.99426C3.06072 4.67779 3.48995 4.5 3.9375 4.5H7.5",
|
|
1313
|
+
stroke: "currentColor",
|
|
1314
|
+
strokeLinecap: "round",
|
|
1315
|
+
strokeLinejoin: "round"
|
|
1316
|
+
}
|
|
1317
|
+
)
|
|
1274
1318
|
}
|
|
1275
1319
|
);
|
|
1276
1320
|
},
|
|
1321
|
+
// ----------------------------------- old ---------------------------------
|
|
1322
|
+
// ** Status **
|
|
1277
1323
|
check: ({ className, fill }) => {
|
|
1278
1324
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1279
1325
|
"svg",
|
|
@@ -2920,34 +2966,6 @@ var template = {
|
|
|
2920
2966
|
}
|
|
2921
2967
|
);
|
|
2922
2968
|
},
|
|
2923
|
-
pencil: ({ className, fill }) => {
|
|
2924
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2925
|
-
"svg",
|
|
2926
|
-
{
|
|
2927
|
-
width: "24",
|
|
2928
|
-
height: "24",
|
|
2929
|
-
viewBox: "0 0 24 24",
|
|
2930
|
-
fill: "none",
|
|
2931
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2932
|
-
className,
|
|
2933
|
-
children: fill ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2934
|
-
"path",
|
|
2935
|
-
{
|
|
2936
|
-
d: "M21.7313 2.26918C21.239 1.77699 20.5714 1.50049 19.8753 1.50049C19.1791 1.50049 18.5115 1.77699 18.0193 2.26918L16.8623 3.42618L20.5743 7.13818L21.7313 5.98118C22.2234 5.48891 22.4999 4.8213 22.4999 4.12518C22.4999 3.42906 22.2234 2.76145 21.7313 2.26918ZM19.5133 8.19918L15.8013 4.48718L3.65125 16.6372C3.03411 17.254 2.58043 18.015 2.33125 18.8512L1.53125 21.5362C1.49263 21.6657 1.48975 21.8033 1.52292 21.9344C1.55608 22.0655 1.62407 22.1852 1.71967 22.2808C1.81527 22.3764 1.93494 22.4443 2.06601 22.4775C2.19709 22.5107 2.33469 22.5078 2.46425 22.4692L5.14925 21.6692C5.98548 21.42 6.74642 20.9663 7.36325 20.3492L19.5133 8.19918Z",
|
|
2937
|
-
fill: "currentColor"
|
|
2938
|
-
}
|
|
2939
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2940
|
-
"path",
|
|
2941
|
-
{
|
|
2942
|
-
d: "M16.862 4.487L18.549 2.799C18.9007 2.44733 19.3777 2.24976 19.875 2.24976C20.3723 2.24976 20.8493 2.44733 21.201 2.799C21.5527 3.15068 21.7502 3.62766 21.7502 4.125C21.7502 4.62235 21.5527 5.09933 21.201 5.451L6.832 19.82C6.30332 20.3484 5.65137 20.7367 4.935 20.95L2.25 21.75L3.05 19.065C3.26328 18.3486 3.65163 17.6967 4.18 17.168L16.863 4.487H16.862ZM16.862 4.487L19.5 7.125",
|
|
2943
|
-
stroke: "currentColor",
|
|
2944
|
-
strokeLinecap: "round",
|
|
2945
|
-
strokeLinejoin: "round"
|
|
2946
|
-
}
|
|
2947
|
-
)
|
|
2948
|
-
}
|
|
2949
|
-
);
|
|
2950
|
-
},
|
|
2951
2969
|
"pencil-square": ({ className, fill }) => {
|
|
2952
2970
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
2953
2971
|
"svg",
|
|
@@ -4714,7 +4732,7 @@ var Icon_default = Icon;
|
|
|
4714
4732
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
4715
4733
|
var Input = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
4716
4734
|
const [props, variantProps] = mapPropsVariants(originalProps, inputStyle.variantKeys);
|
|
4717
|
-
const { classNames, label,
|
|
4735
|
+
const { classNames, label, helperMessage, errorMessage, startContent, endContent, ...inputProps } = props;
|
|
4718
4736
|
const inputRef = (0, import_react5.useRef)(null);
|
|
4719
4737
|
const slots = (0, import_react5.useMemo)(() => inputStyle({ ...variantProps }), [variantProps]);
|
|
4720
4738
|
const getContentProps = (0, import_react5.useCallback)(
|
|
@@ -4757,7 +4775,7 @@ var Input = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
4757
4775
|
className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
|
|
4758
4776
|
};
|
|
4759
4777
|
return import_react5.default.cloneElement(endContent, mergedProps);
|
|
4760
|
-
} else if (
|
|
4778
|
+
} else if (errorMessage) {
|
|
4761
4779
|
const iconProps = { ...getContentProps(), className: getContentProps().className };
|
|
4762
4780
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
|
|
4763
4781
|
} else {
|
|
@@ -4811,8 +4829,8 @@ var Input = (0, import_react5.forwardRef)((originalProps, ref) => {
|
|
|
4811
4829
|
]
|
|
4812
4830
|
}
|
|
4813
4831
|
),
|
|
4814
|
-
|
|
4815
|
-
|
|
4832
|
+
helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }), children: helperMessage }),
|
|
4833
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
|
|
4816
4834
|
] })
|
|
4817
4835
|
]
|
|
4818
4836
|
}
|
|
@@ -4852,8 +4870,8 @@ var inputStyle = tv(
|
|
|
4852
4870
|
"group-has-[:hover]/input:text-neutral-dark",
|
|
4853
4871
|
"group-has-[p.error]/input:text-danger-main"
|
|
4854
4872
|
],
|
|
4855
|
-
|
|
4856
|
-
|
|
4873
|
+
helperMessage: ["text-neutral-main", "group-has-[:hover]/input:text-neutral-dark"],
|
|
4874
|
+
errorMessage: ["text-danger-main"],
|
|
4857
4875
|
readonly: ["pointer-events-none", "!text-body-foreground"]
|
|
4858
4876
|
},
|
|
4859
4877
|
variants: {
|
|
@@ -4888,7 +4906,7 @@ var inputStyle = tv(
|
|
|
4888
4906
|
"group-has-[:focus]/input:text-primary-main",
|
|
4889
4907
|
"!group-has-[p.error]:not(input:focus):hover/input:text-primary-main"
|
|
4890
4908
|
],
|
|
4891
|
-
|
|
4909
|
+
helperMessage: [
|
|
4892
4910
|
"group-has-[:focus]/input:text-primary-main",
|
|
4893
4911
|
"group-has-[:focus:hover]/input:text-primary-main",
|
|
4894
4912
|
"group-has-[:focus]/input:hover:text-primary-main"
|
|
@@ -4899,7 +4917,7 @@ var inputStyle = tv(
|
|
|
4899
4917
|
"group-has-[:focus]/input:text-secondary-main",
|
|
4900
4918
|
"!group-has-[p.error]:not(input:focus):hover/input:text-secondary-main"
|
|
4901
4919
|
],
|
|
4902
|
-
|
|
4920
|
+
helperMessage: [
|
|
4903
4921
|
"group-has-[:focus]/input:text-secondary-main",
|
|
4904
4922
|
"group-has-[:focus:hover]/input:text-secondary-main",
|
|
4905
4923
|
"group-has-[:focus]/input:hover:text-secondary-main"
|
|
@@ -4912,32 +4930,32 @@ var inputStyle = tv(
|
|
|
4912
4930
|
label: ["text-sm"],
|
|
4913
4931
|
innerWrapper: ["gap-[4px]"],
|
|
4914
4932
|
inputWrapper: ["w-[240px]", "h-[24px]", "rounded-sm", "px-[4px]", "gap-[4px]"],
|
|
4915
|
-
|
|
4916
|
-
|
|
4933
|
+
helperMessage: ["text-sm"],
|
|
4934
|
+
errorMessage: ["text-sm"]
|
|
4917
4935
|
},
|
|
4918
4936
|
md: {
|
|
4919
4937
|
base: ["text-md", "gap-[6px]"],
|
|
4920
4938
|
label: ["text-md"],
|
|
4921
4939
|
innerWrapper: ["gap-[6px]"],
|
|
4922
4940
|
inputWrapper: ["w-[240px]", "h-[32px]", "rounded-md", "px-[6px]", "gap-[6px]"],
|
|
4923
|
-
|
|
4924
|
-
|
|
4941
|
+
helperMessage: ["text-sm"],
|
|
4942
|
+
errorMessage: ["text-sm"]
|
|
4925
4943
|
},
|
|
4926
4944
|
lg: {
|
|
4927
4945
|
base: ["text-lg", "gap-[8px]"],
|
|
4928
4946
|
label: ["text-lg"],
|
|
4929
4947
|
innerWrapper: ["gap-[8px]"],
|
|
4930
4948
|
inputWrapper: ["w-[240px]", "h-[40px]", "rounded-lg", "px-[8px]", "gap-[8px]"],
|
|
4931
|
-
|
|
4932
|
-
|
|
4949
|
+
helperMessage: ["text-md"],
|
|
4950
|
+
errorMessage: ["text-md"]
|
|
4933
4951
|
},
|
|
4934
4952
|
xl: {
|
|
4935
4953
|
base: ["text-xl", "gap-[10px]"],
|
|
4936
4954
|
label: ["text-xl"],
|
|
4937
4955
|
innerWrapper: ["gap-[10px]"],
|
|
4938
4956
|
inputWrapper: ["w-[240px]", "h-[50px]", "rounded-lg", "px-[10px]", "gap-[10px]"],
|
|
4939
|
-
|
|
4940
|
-
|
|
4957
|
+
helperMessage: ["text-md"],
|
|
4958
|
+
errorMessage: ["text-md"]
|
|
4941
4959
|
}
|
|
4942
4960
|
},
|
|
4943
4961
|
direction: {
|
|
@@ -4961,8 +4979,8 @@ var inputStyle = tv(
|
|
|
4961
4979
|
"group-has-[p.error]/input:placeholder:text-danger-light"
|
|
4962
4980
|
],
|
|
4963
4981
|
content: ["text-neutral-light", "group-has-[p.error]/input:text-danger-light"],
|
|
4964
|
-
|
|
4965
|
-
|
|
4982
|
+
helperMessage: ["!text-neutral-light"],
|
|
4983
|
+
errorMessage: ["!text-danger-light"]
|
|
4966
4984
|
}
|
|
4967
4985
|
}
|
|
4968
4986
|
},
|
|
@@ -5644,41 +5662,27 @@ var tableStyle = (0, import_tailwind_variants6.tv)({
|
|
|
5644
5662
|
}
|
|
5645
5663
|
});
|
|
5646
5664
|
|
|
5647
|
-
// src/components/table/
|
|
5665
|
+
// src/components/table/definition-table.tsx
|
|
5648
5666
|
var import_react8 = require("react");
|
|
5649
5667
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
5650
5668
|
var DEFAULT_COLUMN_CLASSES = [
|
|
5651
5669
|
"w-[120px] px-[10px] py-[9.5px] font-bold text-md text-body-foreground border-r border-neutral-light",
|
|
5652
5670
|
"px-[10px] py-[9.5px]"
|
|
5653
5671
|
];
|
|
5654
|
-
var
|
|
5672
|
+
var DefinitionTableRow = ({ columns, columnClasses = [] }) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("tr", { className: "border-neutral-light min-h-[50px] border-b", children: columns.map((col, index) => {
|
|
5655
5673
|
var _a;
|
|
5656
5674
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("td", { className: (_a = columnClasses[index]) != null ? _a : DEFAULT_COLUMN_CLASSES[index], children: col }, index);
|
|
5657
5675
|
}) });
|
|
5658
|
-
var
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
{
|
|
5669
|
-
ref,
|
|
5670
|
-
onSubmit,
|
|
5671
|
-
className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
|
|
5672
|
-
children: content
|
|
5673
|
-
}
|
|
5674
|
-
);
|
|
5675
|
-
}
|
|
5676
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: content });
|
|
5677
|
-
}
|
|
5678
|
-
);
|
|
5679
|
-
FormTable.displayName = "FormTable";
|
|
5680
|
-
var form_table_default = FormTable;
|
|
5681
|
-
var formTableStyle = tv({
|
|
5676
|
+
var DefinitionTable = (0, import_react8.forwardRef)(({ rows, footer, classNames }, ref) => {
|
|
5677
|
+
const slots = (0, import_react8.useMemo)(() => DefinitionTableStyle(), []);
|
|
5678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: [
|
|
5679
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DefinitionTableRow, { ...row }, i)) }) }),
|
|
5680
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { children: footer })
|
|
5681
|
+
] });
|
|
5682
|
+
});
|
|
5683
|
+
DefinitionTable.displayName = "DefinitionTable";
|
|
5684
|
+
var definition_table_default = DefinitionTable;
|
|
5685
|
+
var DefinitionTableStyle = tv({
|
|
5682
5686
|
slots: {
|
|
5683
5687
|
base: ["flex", "flex-col", "gap-[30px]"],
|
|
5684
5688
|
table: ["w-full", "table-fixed", "border", "border-neutral-light"]
|
|
@@ -5686,6 +5690,6 @@ var formTableStyle = tv({
|
|
|
5686
5690
|
});
|
|
5687
5691
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5688
5692
|
0 && (module.exports = {
|
|
5689
|
-
|
|
5693
|
+
DefinitionTable,
|
|
5690
5694
|
Table
|
|
5691
5695
|
});
|
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
import "../../chunk-DX3KXNP6.mjs";
|
|
3
3
|
import {
|
|
4
4
|
table_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-JV7VLO2L.mjs";
|
|
6
6
|
import "../../chunk-XRC5OUYQ.mjs";
|
|
7
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-UNH3BCGN.mjs";
|
|
8
8
|
import "../../chunk-DQRAFUDA.mjs";
|
|
9
9
|
import "../../chunk-M37VBNB3.mjs";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
} from "../../chunk-
|
|
11
|
+
definition_table_default
|
|
12
|
+
} from "../../chunk-6TIIBU7J.mjs";
|
|
13
13
|
import "../../chunk-7B7LRG5J.mjs";
|
|
14
|
-
import "../../chunk-
|
|
14
|
+
import "../../chunk-SO7BGWM7.mjs";
|
|
15
15
|
import "../../chunk-F3HENRVM.mjs";
|
|
16
16
|
import "../../chunk-2GCSFWHD.mjs";
|
|
17
|
-
import "../../chunk-
|
|
17
|
+
import "../../chunk-BEQ3KZGS.mjs";
|
|
18
18
|
import "../../chunk-QZ3LVYJW.mjs";
|
|
19
19
|
import "../../chunk-D6QI3DJG.mjs";
|
|
20
20
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
21
|
-
import "../../chunk-
|
|
22
|
-
import "../../chunk-
|
|
21
|
+
import "../../chunk-2TKEWFGH.mjs";
|
|
22
|
+
import "../../chunk-2SDYFOZL.mjs";
|
|
23
23
|
import "../../chunk-4ZJFD3L3.mjs";
|
|
24
24
|
import "../../chunk-27Y6K5NK.mjs";
|
|
25
25
|
import "../../chunk-E3G5QXSH.mjs";
|
|
26
26
|
import "../../chunk-AC6TWLRT.mjs";
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
definition_table_default as DefinitionTable,
|
|
29
29
|
table_default as Table
|
|
30
30
|
};
|
|
@@ -613,7 +613,14 @@ var TableHead = ({ columns, slots, size, rowCheckbox, isCheckedAll, classNames,
|
|
|
613
613
|
},
|
|
614
614
|
`${column.field}${index}thead`
|
|
615
615
|
));
|
|
616
|
-
const renderSelectAllCheckbox = () => rowCheckbox && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
616
|
+
const renderSelectAllCheckbox = () => rowCheckbox && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
617
|
+
checkbox_default,
|
|
618
|
+
{
|
|
619
|
+
size,
|
|
620
|
+
checked: isCheckedAll,
|
|
621
|
+
onChange: (e) => onCheckAll(e.target.checked)
|
|
622
|
+
}
|
|
623
|
+
) }) });
|
|
617
624
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
618
625
|
renderColumnHeaders(),
|
|
619
626
|
renderSelectAllCheckbox()
|