@deepnoid/ui 0.1.67 → 0.1.69
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 +178 -178
- package/dist/{chunk-XX2LIHAI.mjs → chunk-337VFHYV.mjs} +1 -1
- package/dist/{chunk-UE7QOB6Y.mjs → chunk-3YXCBM7H.mjs} +1 -1
- package/dist/{chunk-VQ7DLJ57.mjs → chunk-45XDSBRF.mjs} +2 -2
- package/dist/{chunk-25EK5DQ6.mjs → chunk-4IKNOB5Y.mjs} +1 -1
- package/dist/{chunk-KLKTY6FQ.mjs → chunk-5GBAUDP4.mjs} +19 -30
- package/dist/{chunk-5TVBNB3E.mjs → chunk-CD6HJQKL.mjs} +4 -4
- package/dist/{chunk-LCHZ36TM.mjs → chunk-CFB4JWDA.mjs} +1 -1
- package/dist/{chunk-2YUYQCUG.mjs → chunk-F5XBEFX5.mjs} +1 -1
- package/dist/{chunk-ZD67BBJ3.mjs → chunk-HLLRDA4A.mjs} +2 -2
- package/dist/{chunk-3HXQY566.mjs → chunk-IFO3TSDM.mjs} +4 -4
- package/dist/{chunk-NVRS6IWV.mjs → chunk-LA34MKK7.mjs} +3 -3
- package/dist/{chunk-D6C74C5O.mjs → chunk-LHO66CGE.mjs} +16 -21
- package/dist/{chunk-KP2ENWC6.mjs → chunk-LIP5CNY3.mjs} +2 -2
- package/dist/{chunk-FTLP7OLQ.mjs → chunk-MNGULMJI.mjs} +1 -1
- package/dist/{chunk-22ZPZFM2.mjs → chunk-NP6OELBR.mjs} +3 -3
- package/dist/{chunk-FZ3GVVL6.mjs → chunk-NQYWOEB3.mjs} +1 -1
- package/dist/{chunk-GV5UKAZV.mjs → chunk-SJTGJ6NC.mjs} +1 -1
- package/dist/{chunk-TVIVXGEN.mjs → chunk-UTWY7OBW.mjs} +1 -1
- package/dist/{chunk-SQF2SUJZ.mjs → chunk-YZ7HQHTL.mjs} +584 -3
- package/dist/{chunk-UANIXET6.mjs → chunk-ZMYJ5OW3.mjs} +3 -3
- package/dist/{chunk-YBSGSRHO.mjs → chunk-ZY7MY7KH.mjs} +1 -1
- package/dist/components/avatar/avatar.js +584 -3
- package/dist/components/avatar/avatar.mjs +2 -2
- package/dist/components/avatar/index.js +584 -3
- package/dist/components/avatar/index.mjs +2 -2
- package/dist/components/breadcrumb/breadcrumb.js +584 -3
- package/dist/components/breadcrumb/breadcrumb.mjs +6 -6
- package/dist/components/breadcrumb/index.js +584 -3
- package/dist/components/breadcrumb/index.mjs +6 -6
- package/dist/components/button/button.js +584 -3
- package/dist/components/button/button.mjs +4 -4
- package/dist/components/button/icon-button.js +584 -3
- package/dist/components/button/icon-button.mjs +4 -4
- package/dist/components/button/index.js +584 -3
- package/dist/components/button/index.mjs +5 -5
- package/dist/components/chip/chip.js +584 -3
- package/dist/components/chip/chip.mjs +3 -3
- package/dist/components/chip/index.js +584 -3
- package/dist/components/chip/index.mjs +3 -3
- package/dist/components/dateTimePicker/calendar.js +584 -3
- package/dist/components/dateTimePicker/calendar.mjs +3 -3
- package/dist/components/dateTimePicker/dateTimePicker.js +584 -3
- package/dist/components/dateTimePicker/dateTimePicker.mjs +7 -7
- package/dist/components/dateTimePicker/index.js +584 -3
- package/dist/components/dateTimePicker/index.mjs +7 -7
- package/dist/components/dateTimePicker/timePicker.js +584 -3
- package/dist/components/dateTimePicker/timePicker.mjs +5 -5
- package/dist/components/fileUpload/fileUpload.js +584 -3
- package/dist/components/fileUpload/fileUpload.mjs +7 -7
- package/dist/components/fileUpload/index.js +584 -3
- package/dist/components/fileUpload/index.mjs +7 -7
- package/dist/components/icon/Icon.d.mts +71 -3
- package/dist/components/icon/Icon.d.ts +71 -3
- package/dist/components/icon/Icon.js +584 -3
- package/dist/components/icon/Icon.mjs +2 -2
- package/dist/components/icon/index.js +584 -3
- package/dist/components/icon/index.mjs +2 -2
- package/dist/components/icon/template.d.mts +20 -3
- package/dist/components/icon/template.d.ts +20 -3
- package/dist/components/icon/template.js +584 -3
- package/dist/components/icon/template.mjs +1 -1
- package/dist/components/input/index.js +584 -3
- package/dist/components/input/index.mjs +3 -3
- package/dist/components/input/input.js +584 -3
- package/dist/components/input/input.mjs +3 -3
- package/dist/components/list/index.js +584 -3
- package/dist/components/list/index.mjs +6 -6
- package/dist/components/list/listItem.js +584 -3
- package/dist/components/list/listItem.mjs +4 -4
- package/dist/components/modal/index.js +584 -3
- package/dist/components/modal/index.mjs +6 -6
- package/dist/components/modal/modal.js +584 -3
- package/dist/components/modal/modal.mjs +6 -6
- package/dist/components/pagination/index.js +584 -3
- package/dist/components/pagination/index.mjs +4 -4
- package/dist/components/pagination/pagination.js +584 -3
- package/dist/components/pagination/pagination.mjs +4 -4
- package/dist/components/ripple/index.mjs +3 -3
- package/dist/components/select/index.js +584 -3
- package/dist/components/select/index.mjs +3 -3
- package/dist/components/select/select.js +584 -3
- package/dist/components/select/select.mjs +3 -3
- package/dist/components/table/index.js +615 -49
- package/dist/components/table/index.mjs +13 -13
- package/dist/components/table/table-body.js +19 -30
- package/dist/components/table/table-body.mjs +1 -1
- package/dist/components/table/table.d.mts +12 -12
- package/dist/components/table/table.d.ts +12 -12
- package/dist/components/table/table.js +615 -49
- package/dist/components/table/table.mjs +10 -10
- package/dist/components/toast/index.js +584 -3
- package/dist/components/toast/index.mjs +4 -4
- package/dist/components/toast/toast.js +584 -3
- package/dist/components/toast/toast.mjs +3 -3
- package/dist/components/toast/use-toast.js +584 -3
- package/dist/components/toast/use-toast.mjs +4 -4
- package/dist/components/tree/index.js +584 -3
- package/dist/components/tree/index.mjs +3 -3
- package/dist/components/tree/tree.js +584 -3
- package/dist/components/tree/tree.mjs +3 -3
- package/dist/index.js +615 -49
- package/dist/index.mjs +44 -44
- package/package.json +1 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../chunk-DX3KXNP6.mjs";
|
|
3
|
-
import {
|
|
4
|
-
definition_table_default
|
|
5
|
-
} from "../../chunk-KCAGZUYM.mjs";
|
|
6
3
|
import {
|
|
7
4
|
table_default
|
|
8
|
-
} from "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-LHO66CGE.mjs";
|
|
6
|
+
import "../../chunk-7B7LRG5J.mjs";
|
|
7
|
+
import "../../chunk-HLLRDA4A.mjs";
|
|
8
|
+
import "../../chunk-F3HENRVM.mjs";
|
|
9
|
+
import "../../chunk-5GBAUDP4.mjs";
|
|
10
10
|
import "../../chunk-TKB2JL2E.mjs";
|
|
11
|
-
import "../../chunk-DQRAFUDA.mjs";
|
|
12
|
-
import "../../chunk-M37VBNB3.mjs";
|
|
13
11
|
import "../../chunk-MZ76AA76.mjs";
|
|
14
12
|
import "../../chunk-6PN3DGOE.mjs";
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
import {
|
|
14
|
+
definition_table_default
|
|
15
|
+
} from "../../chunk-KCAGZUYM.mjs";
|
|
16
|
+
import "../../chunk-DQRAFUDA.mjs";
|
|
17
|
+
import "../../chunk-M37VBNB3.mjs";
|
|
18
18
|
import "../../chunk-2GCSFWHD.mjs";
|
|
19
|
-
import "../../chunk-
|
|
19
|
+
import "../../chunk-MNGULMJI.mjs";
|
|
20
20
|
import "../../chunk-QZ3LVYJW.mjs";
|
|
21
21
|
import "../../chunk-SKOCUCE5.mjs";
|
|
22
22
|
import "../../chunk-ZYIIXWVY.mjs";
|
|
23
|
-
import "../../chunk-
|
|
24
|
-
import "../../chunk-
|
|
23
|
+
import "../../chunk-UTWY7OBW.mjs";
|
|
24
|
+
import "../../chunk-YZ7HQHTL.mjs";
|
|
25
25
|
import "../../chunk-XOPCRI7Z.mjs";
|
|
26
26
|
import "../../chunk-27Y6K5NK.mjs";
|
|
27
27
|
import "../../chunk-E3G5QXSH.mjs";
|
|
@@ -680,7 +680,6 @@ var TableBody = ({
|
|
|
680
680
|
rowCheckbox = false,
|
|
681
681
|
checkedRows,
|
|
682
682
|
onCheckRow,
|
|
683
|
-
// onRowClick,
|
|
684
683
|
isLoading = false,
|
|
685
684
|
emptyContent,
|
|
686
685
|
skeletonRow,
|
|
@@ -695,40 +694,30 @@ var TableBody = ({
|
|
|
695
694
|
textAlign: column.align || "center"
|
|
696
695
|
});
|
|
697
696
|
const renderTdSkeleton = (key) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" }) }, key);
|
|
698
|
-
const renderCheckboxCell = (
|
|
699
|
-
checkbox_default,
|
|
700
|
-
{
|
|
701
|
-
size,
|
|
702
|
-
checked: checkedRows.has(rowIndex),
|
|
703
|
-
onChange: (e) => onCheckRow(rowIndex, e.target.checked)
|
|
704
|
-
}
|
|
705
|
-
) });
|
|
697
|
+
const renderCheckboxCell = (rowId) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(checkbox_default, { size, checked: checkedRows.has(rowId), onChange: (e) => onCheckRow(rowId, e.target.checked) }) });
|
|
706
698
|
const renderSkeletonRow = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
707
699
|
columns.map((_, colIdx) => renderTdSkeleton(`skeleton-${rowIndex}-${colIdx}`)),
|
|
708
700
|
rowCheckbox && renderTdSkeleton(`skeleton-checkbox-${rowIndex}`)
|
|
709
701
|
] }, `skeleton-${rowIndex}`);
|
|
710
702
|
const renderEmptyRow = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
|
|
711
|
-
const renderDataRow = (row, rowIndex) => (
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
rowCheckbox && renderCheckboxCell(rowIndex)
|
|
730
|
-
] }, rowIndex)
|
|
731
|
-
);
|
|
703
|
+
const renderDataRow = (row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
|
|
704
|
+
columns.map((column, colIdx) => {
|
|
705
|
+
var _a;
|
|
706
|
+
const value = row[column.field];
|
|
707
|
+
const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
|
|
708
|
+
const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
|
|
709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
710
|
+
"td",
|
|
711
|
+
{
|
|
712
|
+
className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
|
|
713
|
+
style: getCellStyle(column),
|
|
714
|
+
children: content
|
|
715
|
+
},
|
|
716
|
+
`${rowIndex}-${colIdx}`
|
|
717
|
+
);
|
|
718
|
+
}),
|
|
719
|
+
rowCheckbox && renderCheckboxCell(row.id)
|
|
720
|
+
] }, rowIndex);
|
|
732
721
|
const renderRows = () => {
|
|
733
722
|
if (isLoading) return skeletonRow ? Array.from({ length: skeletonRow }, (_, idx) => renderSkeletonRow(idx)) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {});
|
|
734
723
|
if (!rows.length && emptyContent) return renderEmptyRow();
|
|
@@ -193,18 +193,6 @@ type TableVariantProps = VariantProps<typeof tableStyle>;
|
|
|
193
193
|
type TableSlots = keyof ReturnType<typeof tableStyle>;
|
|
194
194
|
type TableReturnType = ReturnType<typeof tableStyle>;
|
|
195
195
|
type RowValue = Record<string | symbol, any>;
|
|
196
|
-
type CellParams<R extends RowValue = any, V = any, F = V> = {
|
|
197
|
-
id: string | number;
|
|
198
|
-
field: string;
|
|
199
|
-
value: V | undefined;
|
|
200
|
-
formattedValue: F | undefined;
|
|
201
|
-
row: TableRow<R>;
|
|
202
|
-
};
|
|
203
|
-
type ValueFormatterParams<V = any> = {
|
|
204
|
-
id?: string | number;
|
|
205
|
-
field: string;
|
|
206
|
-
value: V;
|
|
207
|
-
};
|
|
208
196
|
type TableRow<R extends RowValue = RowValue> = R;
|
|
209
197
|
type Align = "center" | "left" | "right";
|
|
210
198
|
type TableColumn<R extends RowValue = RowValue, V = any, F = V> = {
|
|
@@ -219,5 +207,17 @@ type TableColumn<R extends RowValue = RowValue, V = any, F = V> = {
|
|
|
219
207
|
renderCell?: (params: CellParams<R, V, F>) => ReactNode;
|
|
220
208
|
valueFormatter?: (params: ValueFormatterParams<V>) => F;
|
|
221
209
|
};
|
|
210
|
+
type CellParams<R extends RowValue = any, V = any, F = V> = {
|
|
211
|
+
id: string | number;
|
|
212
|
+
field: string;
|
|
213
|
+
value: V | undefined;
|
|
214
|
+
formattedValue: F | undefined;
|
|
215
|
+
row: TableRow<R>;
|
|
216
|
+
};
|
|
217
|
+
type ValueFormatterParams<V = any> = {
|
|
218
|
+
id?: string | number;
|
|
219
|
+
field: string;
|
|
220
|
+
value: V;
|
|
221
|
+
};
|
|
222
222
|
|
|
223
223
|
export { type TableColumn, type TableRef, type TableReturnType, type TableRow, type TableSlots, type TableVariantProps, Table as default };
|
|
@@ -193,18 +193,6 @@ type TableVariantProps = VariantProps<typeof tableStyle>;
|
|
|
193
193
|
type TableSlots = keyof ReturnType<typeof tableStyle>;
|
|
194
194
|
type TableReturnType = ReturnType<typeof tableStyle>;
|
|
195
195
|
type RowValue = Record<string | symbol, any>;
|
|
196
|
-
type CellParams<R extends RowValue = any, V = any, F = V> = {
|
|
197
|
-
id: string | number;
|
|
198
|
-
field: string;
|
|
199
|
-
value: V | undefined;
|
|
200
|
-
formattedValue: F | undefined;
|
|
201
|
-
row: TableRow<R>;
|
|
202
|
-
};
|
|
203
|
-
type ValueFormatterParams<V = any> = {
|
|
204
|
-
id?: string | number;
|
|
205
|
-
field: string;
|
|
206
|
-
value: V;
|
|
207
|
-
};
|
|
208
196
|
type TableRow<R extends RowValue = RowValue> = R;
|
|
209
197
|
type Align = "center" | "left" | "right";
|
|
210
198
|
type TableColumn<R extends RowValue = RowValue, V = any, F = V> = {
|
|
@@ -219,5 +207,17 @@ type TableColumn<R extends RowValue = RowValue, V = any, F = V> = {
|
|
|
219
207
|
renderCell?: (params: CellParams<R, V, F>) => ReactNode;
|
|
220
208
|
valueFormatter?: (params: ValueFormatterParams<V>) => F;
|
|
221
209
|
};
|
|
210
|
+
type CellParams<R extends RowValue = any, V = any, F = V> = {
|
|
211
|
+
id: string | number;
|
|
212
|
+
field: string;
|
|
213
|
+
value: V | undefined;
|
|
214
|
+
formattedValue: F | undefined;
|
|
215
|
+
row: TableRow<R>;
|
|
216
|
+
};
|
|
217
|
+
type ValueFormatterParams<V = any> = {
|
|
218
|
+
id?: string | number;
|
|
219
|
+
field: string;
|
|
220
|
+
value: V;
|
|
221
|
+
};
|
|
222
222
|
|
|
223
223
|
export { type TableColumn, type TableRef, type TableReturnType, type TableRow, type TableSlots, type TableVariantProps, Table as default };
|