@deepnoid/ui 0.0.97 → 0.0.99

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.
Files changed (32) hide show
  1. package/dist/{chunk-P6AZMYVR.mjs → chunk-FY5YCQL5.mjs} +1 -1
  2. package/dist/{chunk-PNFR2J4Q.mjs → chunk-JMXQYSKY.mjs} +71 -43
  3. package/dist/{chunk-B4KZBOGT.mjs → chunk-UGBBOYHB.mjs} +1 -1
  4. package/dist/components/pagination/index.js +1 -1
  5. package/dist/components/pagination/index.mjs +1 -1
  6. package/dist/components/pagination/pagination.js +1 -1
  7. package/dist/components/pagination/pagination.mjs +1 -1
  8. package/dist/components/pagination/pagination.test.js +1 -1
  9. package/dist/components/pagination/pagination.test.mjs +1 -1
  10. package/dist/components/select/index.mjs +2 -2
  11. package/dist/components/select/select.mjs +2 -2
  12. package/dist/components/select/select.test.mjs +2 -2
  13. package/dist/components/table/index.js +71 -43
  14. package/dist/components/table/index.mjs +1 -1
  15. package/dist/components/table/table-body.d.mts +0 -1
  16. package/dist/components/table/table-body.d.ts +0 -1
  17. package/dist/components/table/table.d.mts +60 -3
  18. package/dist/components/table/table.d.ts +60 -3
  19. package/dist/components/table/table.js +71 -43
  20. package/dist/components/table/table.mjs +1 -1
  21. package/dist/components/table/table.test.js +71 -43
  22. package/dist/components/table/table.test.mjs +1 -1
  23. package/dist/components/tooltip/index.js +1 -1
  24. package/dist/components/tooltip/index.mjs +1 -1
  25. package/dist/components/tooltip/tooltip.js +1 -1
  26. package/dist/components/tooltip/tooltip.mjs +1 -1
  27. package/dist/components/tooltip/tooltip.test.js +1 -1
  28. package/dist/components/tooltip/tooltip.test.mjs +1 -1
  29. package/dist/index.js +73 -45
  30. package/dist/index.mjs +24 -24
  31. package/package.json +1 -1
  32. package/dist/{chunk-2BCJZILI.mjs → chunk-JN7EGKJL.mjs} +3 -3
package/dist/index.js CHANGED
@@ -5466,7 +5466,7 @@ var import_tailwind_variants8 = require("tailwind-variants");
5466
5466
  var import_jsx_runtime11 = require("react/jsx-runtime");
5467
5467
  var Table = (0, import_react11.forwardRef)((originalProps, ref) => {
5468
5468
  const [props, variantProps] = mapPropsVariants(originalProps, table.variantKeys);
5469
- const { classNames, rows, columns, isLoading, className, emptyContent, onRowAction, ...tableComponentsProps } = props;
5469
+ const { classNames, rows, columns, className, emptyContent, loadingContent, onRowAction, ...tableComponentsProps } = props;
5470
5470
  const [checkedRows, setCheckedRows] = (0, import_react11.useState)(/* @__PURE__ */ new Set());
5471
5471
  const [selectedRows, setSelectedRows] = (0, import_react11.useState)(/* @__PURE__ */ new Set());
5472
5472
  (0, import_react11.useEffect)(() => {
@@ -5486,10 +5486,17 @@ var Table = (0, import_react11.forwardRef)((originalProps, ref) => {
5486
5486
  const getTableProps = (0, import_react11.useCallback)(
5487
5487
  (props2) => ({
5488
5488
  ...props2,
5489
- className: slots.table({ class: clsx(classNames == null ? void 0 : classNames.table, className) })
5489
+ className: slots.table({ class: clsx(classNames == null ? void 0 : classNames.table) })
5490
5490
  }),
5491
5491
  [classNames == null ? void 0 : classNames.table, slots]
5492
5492
  );
5493
+ const getLoadingWrapperProps = (0, import_react11.useCallback)(
5494
+ (props2) => ({
5495
+ ...props2,
5496
+ className: slots.loadingWrapper({ class: clsx(classNames == null ? void 0 : classNames.loadingWrapper) })
5497
+ }),
5498
+ [classNames == null ? void 0 : classNames.loadingWrapper, slots]
5499
+ );
5493
5500
  const handleCheckAll = (isChecked) => {
5494
5501
  const newCheckedRows = isChecked ? new Set(rows.map((_, index) => index)) : /* @__PURE__ */ new Set();
5495
5502
  setCheckedRows(newCheckedRows);
@@ -5527,53 +5534,55 @@ var Table = (0, import_react11.forwardRef)((originalProps, ref) => {
5527
5534
  setCheckedRows,
5528
5535
  setSelectedRows
5529
5536
  }));
5530
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ref, "data-table": "base", ...getBaseProps(), children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("table", { ...getTableProps(tableComponentsProps), children: [
5531
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5532
- table_head_default,
5533
- {
5534
- classNames,
5535
- slots,
5536
- columns,
5537
- size: originalProps.size,
5538
- color: originalProps.color === "neutral" ? "primary" : originalProps.color,
5539
- isChecked: originalProps.isChecked,
5540
- isExpanded: originalProps.isExpanded,
5541
- onCheckAll: handleCheckAll,
5542
- isCheckedAll: checkedRows.size === rows.length
5543
- }
5544
- ),
5545
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5546
- table_body_default,
5547
- {
5548
- rows,
5549
- columns,
5550
- slots,
5551
- size: originalProps.size,
5552
- color: originalProps.color === "neutral" ? "primary" : originalProps.color,
5553
- isSelected: originalProps.isSelected,
5554
- isChecked: originalProps.isChecked,
5555
- isCheckedRow: originalProps.isCheckedRow,
5556
- isExpanded: originalProps.isExpanded,
5557
- isLoading,
5558
- classNames,
5559
- emptyContent,
5560
- selectedRows,
5561
- checkedRows,
5562
- onCheckedRow: handleCheckRow,
5563
- onSelectedRow: handleSelectRow,
5564
- onRowAction
5565
- }
5566
- )
5567
- ] }) });
5537
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { ref, "data-table": "base", ...getBaseProps(), children: [
5538
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("table", { ...getTableProps(tableComponentsProps), children: [
5539
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5540
+ table_head_default,
5541
+ {
5542
+ classNames,
5543
+ slots,
5544
+ columns,
5545
+ size: originalProps.size,
5546
+ color: originalProps.color === "neutral" ? "primary" : originalProps.color,
5547
+ isChecked: originalProps.isChecked,
5548
+ isExpanded: originalProps.isExpanded,
5549
+ onCheckAll: handleCheckAll,
5550
+ isCheckedAll: checkedRows.size === rows.length
5551
+ }
5552
+ ),
5553
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5554
+ table_body_default,
5555
+ {
5556
+ rows,
5557
+ columns,
5558
+ slots,
5559
+ size: originalProps.size,
5560
+ color: originalProps.color === "neutral" ? "primary" : originalProps.color,
5561
+ isSelected: originalProps.isSelected,
5562
+ isChecked: originalProps.isChecked,
5563
+ isCheckedRow: originalProps.isCheckedRow,
5564
+ isExpanded: originalProps.isExpanded,
5565
+ classNames,
5566
+ emptyContent,
5567
+ selectedRows,
5568
+ checkedRows,
5569
+ onCheckedRow: handleCheckRow,
5570
+ onSelectedRow: handleSelectRow,
5571
+ onRowAction
5572
+ }
5573
+ )
5574
+ ] }),
5575
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ...getLoadingWrapperProps(), children: loadingContent || "Loading..." })
5576
+ ] });
5568
5577
  });
5569
5578
  Table.displayName = "Table";
5570
5579
  var table_default = Table;
5571
5580
  var table = (0, import_tailwind_variants8.tv)({
5572
5581
  slots: {
5573
- base: "flex flex-col relative gap-4",
5582
+ base: "flex flex-col relative gap-4 select-none",
5574
5583
  table: "w-full h-auto",
5575
5584
  thead: "[&>tr]:first:rounded-lg",
5576
- tbody: "w-full",
5585
+ tbody: "",
5577
5586
  tr: ["group", "outline-none", "w-full"],
5578
5587
  th: [
5579
5588
  "text-foreground",
@@ -5612,7 +5621,18 @@ var table = (0, import_tailwind_variants8.tv)({
5612
5621
  "data-[direction=ascending]:rotate-180"
5613
5622
  ],
5614
5623
  emptyWrapper: "text-neutral-light align-middle text-center h-40",
5615
- loadingWrapper: "absolute inset-0 flex items-center justify-center"
5624
+ loadingWrapper: [
5625
+ "absolute",
5626
+ "inset-0",
5627
+ "flex",
5628
+ "items-center",
5629
+ "justify-center",
5630
+ "bg-black/40",
5631
+ "text-white",
5632
+ "transition-opacity",
5633
+ "duration-300",
5634
+ "ease-in-out"
5635
+ ]
5616
5636
  },
5617
5637
  variants: {
5618
5638
  variant: {
@@ -5658,6 +5678,14 @@ var table = (0, import_tailwind_variants8.tv)({
5658
5678
  expandedTr: "border-trans-light"
5659
5679
  }
5660
5680
  },
5681
+ isLoading: {
5682
+ true: {
5683
+ loadingWrapper: "visible opacity-100"
5684
+ },
5685
+ false: {
5686
+ loadingWrapper: "invisible opacity-0"
5687
+ }
5688
+ },
5661
5689
  isSelected: {
5662
5690
  true: {}
5663
5691
  },
@@ -6791,7 +6819,7 @@ var Pagination = (0, import_react19.forwardRef)((originalProps, ref) => {
6791
6819
  currentPage,
6792
6820
  groupSize,
6793
6821
  totalPage,
6794
- showPageNumber,
6822
+ showPageNumber = true,
6795
6823
  showPageLabel,
6796
6824
  showFirstLastButtons,
6797
6825
  handleChangePage
@@ -7150,7 +7178,7 @@ Tooltip.displayName = "Tooltip";
7150
7178
  var tooltip_default = Tooltip;
7151
7179
  var tooltip = tv({
7152
7180
  slots: {
7153
- base: ["z-0", "relative", "inline-flex", "bg-transparent"],
7181
+ base: ["z-0", "relative", "bg-transparent"],
7154
7182
  content: [
7155
7183
  "absolute",
7156
7184
  "top-0",
package/dist/index.mjs CHANGED
@@ -1,28 +1,14 @@
1
1
  "use client";
2
- import "./chunk-RRAZM5D3.mjs";
3
- import {
4
- textarea_default
5
- } from "./chunk-OJ2OEI5B.mjs";
6
2
  import "./chunk-HIE2YRGA.mjs";
7
3
  import {
8
4
  tooltip_default
9
- } from "./chunk-P6AZMYVR.mjs";
5
+ } from "./chunk-FY5YCQL5.mjs";
10
6
  import "./chunk-DSBSLSJW.mjs";
11
7
  import "./chunk-ODMRJXLJ.mjs";
12
- import "./chunk-2UUH2MBF.mjs";
13
- import {
14
- table_default
15
- } from "./chunk-PNFR2J4Q.mjs";
16
- import "./chunk-QDDEQY63.mjs";
17
- import "./chunk-PO3ADNA5.mjs";
18
- import "./chunk-TPFN22HR.mjs";
19
- import {
20
- radio_default
21
- } from "./chunk-QWFOYO3D.mjs";
22
- import "./chunk-3MY6LO7N.mjs";
8
+ import "./chunk-RRAZM5D3.mjs";
23
9
  import {
24
- tabs_default
25
- } from "./chunk-KRI5IALM.mjs";
10
+ textarea_default
11
+ } from "./chunk-OJ2OEI5B.mjs";
26
12
  import "./chunk-LUWGOKLG.mjs";
27
13
  import {
28
14
  ToastProvider,
@@ -36,6 +22,22 @@ import "./chunk-LVFI2NOH.mjs";
36
22
  import {
37
23
  switch_default
38
24
  } from "./chunk-S3O52LLG.mjs";
25
+ import "./chunk-3MY6LO7N.mjs";
26
+ import {
27
+ tabs_default
28
+ } from "./chunk-KRI5IALM.mjs";
29
+ import "./chunk-2UUH2MBF.mjs";
30
+ import {
31
+ table_default
32
+ } from "./chunk-JMXQYSKY.mjs";
33
+ import "./chunk-QDDEQY63.mjs";
34
+ import "./chunk-PO3ADNA5.mjs";
35
+ import "./chunk-QCEKPS7U.mjs";
36
+ import {
37
+ select_default
38
+ } from "./chunk-JN7EGKJL.mjs";
39
+ import "./chunk-RZZWHI6O.mjs";
40
+ import "./chunk-S3QS5B7F.mjs";
39
41
  import "./chunk-MV2WCFK7.mjs";
40
42
  import {
41
43
  slider_default
@@ -44,12 +46,10 @@ import "./chunk-7VOQKIIK.mjs";
44
46
  import {
45
47
  progress_default
46
48
  } from "./chunk-N2JULHST.mjs";
47
- import "./chunk-QCEKPS7U.mjs";
49
+ import "./chunk-TPFN22HR.mjs";
48
50
  import {
49
- select_default
50
- } from "./chunk-2BCJZILI.mjs";
51
- import "./chunk-S3QS5B7F.mjs";
52
- import "./chunk-RZZWHI6O.mjs";
51
+ radio_default
52
+ } from "./chunk-QWFOYO3D.mjs";
53
53
  import "./chunk-DJOG6Z35.mjs";
54
54
  import {
55
55
  modal_default
@@ -57,7 +57,7 @@ import {
57
57
  import "./chunk-7B7LRG5J.mjs";
58
58
  import {
59
59
  pagination_default
60
- } from "./chunk-B4KZBOGT.mjs";
60
+ } from "./chunk-UGBBOYHB.mjs";
61
61
  import "./chunk-F3HENRVM.mjs";
62
62
  import "./chunk-2GCSFWHD.mjs";
63
63
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepnoid/ui",
3
- "version": "0.0.97",
3
+ "version": "0.0.99",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/index.js",
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- useSelect
4
- } from "./chunk-S3QS5B7F.mjs";
5
2
  import {
6
3
  option_default
7
4
  } from "./chunk-RZZWHI6O.mjs";
5
+ import {
6
+ useSelect
7
+ } from "./chunk-S3QS5B7F.mjs";
8
8
  import {
9
9
  Icon_default
10
10
  } from "./chunk-LCI6RPWE.mjs";