@dmsi/wedgekit-react 0.0.414 → 0.0.417
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/dist/chunk-3HBYDOYE.js +114 -0
- package/dist/{chunk-JIMJIJOF.js → chunk-5TGP5EFM.js} +2 -2
- package/dist/{chunk-2HMCS25C.js → chunk-6LHBY2IH.js} +1 -1
- package/dist/{chunk-6I5LZ2ZC.js → chunk-7AXHAWJX.js} +3 -3
- package/dist/{chunk-MQX7GFLX.js → chunk-CAQWLY5V.js} +24 -6
- package/dist/{chunk-QQ5G773N.js → chunk-DCLNAUC4.js} +1 -1
- package/dist/{chunk-GB4ZTUQV.js → chunk-DTW7JCBR.js} +36 -0
- package/dist/{chunk-OBY5EH47.js → chunk-HYJIDHAK.js} +6 -6
- package/dist/{chunk-LZGYABCX.js → chunk-IMOIZFJZ.js} +8 -8
- package/dist/chunk-KBJZUVLM.js +65 -0
- package/dist/{chunk-AA6GE3TH.js → chunk-LUPHOXAQ.js} +1 -1
- package/dist/chunk-NRNWEQD7.js +66 -0
- package/dist/{chunk-44TDIHUP.js → chunk-P3MIP2FD.js} +1 -1
- package/dist/chunk-PQWWVBSR.js +61 -0
- package/dist/{chunk-ERW5DEIO.js → chunk-RQLWSLVE.js} +1 -1
- package/dist/chunk-TYAQWVIM.js +159 -0
- package/dist/{chunk-KZZKQLKF.js → chunk-W55J2KJZ.js} +1 -1
- package/dist/chunk-Y2GK27RX.js +79 -0
- package/dist/components/Accordion.cjs +74 -2
- package/dist/components/Accordion.js +3 -3
- package/dist/components/CalendarRange.cjs +232 -53
- package/dist/components/CalendarRange.css +178 -65
- package/dist/components/CalendarRange.js +25 -17
- package/dist/components/Card.cjs +38 -2
- package/dist/components/Card.js +1 -1
- package/dist/components/CompactImagesPreview.cjs +59 -5
- package/dist/components/CompactImagesPreview.js +2 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +190 -11
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +178 -65
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +25 -17
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +200 -21
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +178 -65
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +25 -17
- package/dist/components/DataGrid/PinnedColumns.cjs +215 -36
- package/dist/components/DataGrid/PinnedColumns.css +178 -65
- package/dist/components/DataGrid/PinnedColumns.js +25 -17
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +191 -12
- package/dist/components/DataGrid/TableBody/LoadingCell.css +178 -65
- package/dist/components/DataGrid/TableBody/LoadingCell.js +25 -17
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +197 -18
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +178 -65
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +25 -17
- package/dist/components/DataGrid/TableBody/index.cjs +212 -33
- package/dist/components/DataGrid/TableBody/index.css +178 -65
- package/dist/components/DataGrid/TableBody/index.js +25 -17
- package/dist/components/DataGrid/index.cjs +301 -122
- package/dist/components/DataGrid/index.css +178 -65
- package/dist/components/DataGrid/index.js +25 -17
- package/dist/components/DataGrid/utils.cjs +191 -12
- package/dist/components/DataGrid/utils.css +178 -65
- package/dist/components/DataGrid/utils.js +25 -17
- package/dist/components/DateInput.cjs +251 -72
- package/dist/components/DateInput.css +178 -65
- package/dist/components/DateInput.js +25 -17
- package/dist/components/DateRangeInput.cjs +251 -72
- package/dist/components/DateRangeInput.css +178 -65
- package/dist/components/DateRangeInput.js +25 -17
- package/dist/components/Grid.cjs +81 -76
- package/dist/components/Grid.js +1 -1
- package/dist/components/ListGroup.cjs +553 -0
- package/dist/components/ListGroup.js +11 -0
- package/dist/components/MobileDataGrid/ColumnList.cjs +36 -0
- package/dist/components/MobileDataGrid/ColumnList.js +3 -3
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +198 -19
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +178 -65
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +25 -17
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +36 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +2 -2
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +242 -27
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +178 -65
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +25 -17
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.cjs +36 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +2 -2
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +36 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +5 -5
- package/dist/components/MobileDataGrid/index.cjs +742 -527
- package/dist/components/MobileDataGrid/index.css +178 -65
- package/dist/components/MobileDataGrid/index.js +25 -17
- package/dist/components/Modal.js +2 -2
- package/dist/components/Notification.cjs +36 -0
- package/dist/components/Notification.js +1 -1
- package/dist/components/PDFViewer/PDFElement.cjs +36 -0
- package/dist/components/PDFViewer/PDFElement.js +2 -2
- package/dist/components/PDFViewer/PDFNavigation.cjs +36 -0
- package/dist/components/PDFViewer/PDFNavigation.js +2 -2
- package/dist/components/PDFViewer/index.cjs +36 -0
- package/dist/components/PDFViewer/index.js +8 -111
- package/dist/components/Pagination.cjs +427 -0
- package/dist/components/Pagination.js +10 -0
- package/dist/components/ProductImagePreview/index.cjs +139 -127
- package/dist/components/ProductImagePreview/index.js +5 -5
- package/dist/components/SideMenuGroup.cjs +36 -0
- package/dist/components/SideMenuGroup.js +1 -1
- package/dist/components/SideMenuItem.cjs +36 -0
- package/dist/components/SideMenuItem.js +1 -1
- package/dist/components/SimpleTable.cjs +521 -0
- package/dist/components/SimpleTable.js +10 -0
- package/dist/components/Stack.cjs +36 -0
- package/dist/components/Stack.js +1 -1
- package/dist/components/Swatch.cjs +36 -0
- package/dist/components/Swatch.js +1 -1
- package/dist/components/Time.cjs +36 -0
- package/dist/components/Time.js +1 -1
- package/dist/components/Tooltip.cjs +1 -1
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/Upload.cjs +36 -0
- package/dist/components/Upload.js +1 -1
- package/dist/components/index.cjs +739 -131
- package/dist/components/index.css +178 -65
- package/dist/components/index.js +37 -17
- package/dist/index.css +178 -65
- package/package.json +1 -1
- package/src/components/Card.tsx +60 -2
- package/src/components/CompactImagesPreview.tsx +54 -30
- package/src/components/Grid.tsx +59 -91
- package/src/components/ListGroup.tsx +82 -0
- package/src/components/Pagination.tsx +182 -0
- package/src/components/SimpleTable.tsx +77 -0
- package/src/components/Stack.tsx +76 -0
- package/src/components/Tooltip.tsx +4 -3
- package/src/components/index.ts +4 -0
- package/dist/chunk-ER6RCOH3.js +0 -97
- package/dist/chunk-EZCH4PQS.js +0 -29
- package/dist/{chunk-D6YCMQPO.js → chunk-SBCFBHNG.js} +3 -3
|
@@ -1,36 +1,44 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadingCell
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-HYJIDHAK.js";
|
|
4
4
|
import "../../../chunk-M7INAUAJ.js";
|
|
5
|
-
import "../../../chunk-
|
|
6
|
-
import "../../../chunk-
|
|
7
|
-
import "../../../chunk-
|
|
5
|
+
import "../../../chunk-7AXHAWJX.js";
|
|
6
|
+
import "../../../chunk-P3MIP2FD.js";
|
|
7
|
+
import "../../../chunk-3HBYDOYE.js";
|
|
8
|
+
import "../../../chunk-IMOIZFJZ.js";
|
|
9
|
+
import "../../../chunk-MBZ55T2D.js";
|
|
10
|
+
import "../../../chunk-2IKT6IHB.js";
|
|
8
11
|
import "../../../chunk-G5DEC7H3.js";
|
|
9
12
|
import "../../../chunk-3X3Y4TMS.js";
|
|
10
13
|
import "../../../chunk-BQNPOGD5.js";
|
|
11
|
-
import "../../../chunk-
|
|
12
|
-
import "../../../chunk-
|
|
13
|
-
import "../../../chunk-AA6GE3TH.js";
|
|
14
|
-
import "../../../chunk-KZZKQLKF.js";
|
|
14
|
+
import "../../../chunk-LUPHOXAQ.js";
|
|
15
|
+
import "../../../chunk-W55J2KJZ.js";
|
|
15
16
|
import "../../../chunk-5IFPG6TS.js";
|
|
16
17
|
import "../../../chunk-AJ5M6MVX.js";
|
|
17
18
|
import "../../../chunk-M6TSTDNZ.js";
|
|
18
|
-
import "../../../chunk-
|
|
19
|
-
import "../../../chunk-
|
|
19
|
+
import "../../../chunk-EJSPFQCY.js";
|
|
20
|
+
import "../../../chunk-RQLWSLVE.js";
|
|
21
|
+
import "../../../chunk-6LHBY2IH.js";
|
|
22
|
+
import "../../../chunk-VJVY6NPF.js";
|
|
20
23
|
import "../../../chunk-EWGHVZL5.js";
|
|
24
|
+
import "../../../chunk-DCLNAUC4.js";
|
|
25
|
+
import "../../../chunk-PQWWVBSR.js";
|
|
26
|
+
import "../../../chunk-AT4AWD6B.js";
|
|
21
27
|
import "../../../chunk-J5V2JRIK.js";
|
|
22
|
-
import "../../../chunk-
|
|
28
|
+
import "../../../chunk-TYAQWVIM.js";
|
|
29
|
+
import "../../../chunk-SBCFBHNG.js";
|
|
23
30
|
import "../../../chunk-4RJKB7LC.js";
|
|
31
|
+
import "../../../chunk-AG43RS4Q.js";
|
|
24
32
|
import "../../../chunk-XM7IQHBU.js";
|
|
25
33
|
import "../../../chunk-FRHPFACM.js";
|
|
26
34
|
import "../../../chunk-T36HX6QY.js";
|
|
27
|
-
import "../../../chunk-
|
|
35
|
+
import "../../../chunk-NRNWEQD7.js";
|
|
28
36
|
import "../../../chunk-SBRRNFOP.js";
|
|
29
|
-
import "../../../chunk-
|
|
37
|
+
import "../../../chunk-Y2GK27RX.js";
|
|
30
38
|
import "../../../chunk-EU73QPW7.js";
|
|
31
39
|
import "../../../chunk-QVWYTQKL.js";
|
|
32
40
|
import "../../../chunk-NO5BIKWS.js";
|
|
33
|
-
import "../../../chunk-
|
|
41
|
+
import "../../../chunk-CAQWLY5V.js";
|
|
34
42
|
import "../../../chunk-V47RTW7E.js";
|
|
35
43
|
import "../../../chunk-22VBZWJG.js";
|
|
36
44
|
import "../../../chunk-NVOZAVEX.js";
|
|
@@ -44,9 +52,9 @@ import "../../../chunk-VXWSAIB5.js";
|
|
|
44
52
|
import "../../../chunk-TYTD4FLW.js";
|
|
45
53
|
import "../../../chunk-5UH6QUFB.js";
|
|
46
54
|
import "../../../chunk-FA7IFW66.js";
|
|
47
|
-
import "../../../chunk-
|
|
48
|
-
import "../../../chunk-
|
|
49
|
-
import "../../../chunk-
|
|
55
|
+
import "../../../chunk-5TGP5EFM.js";
|
|
56
|
+
import "../../../chunk-KBJZUVLM.js";
|
|
57
|
+
import "../../../chunk-DTW7JCBR.js";
|
|
50
58
|
import "../../../chunk-OGIFIPKH.js";
|
|
51
59
|
import "../../../chunk-NKUETCDA.js";
|
|
52
60
|
import "../../../chunk-WWAPK5PH.js";
|
|
@@ -62,9 +62,9 @@ __export(TableBodyRow_exports, {
|
|
|
62
62
|
TableBodyRow: () => TableBodyRow
|
|
63
63
|
});
|
|
64
64
|
module.exports = __toCommonJS(TableBodyRow_exports);
|
|
65
|
-
var
|
|
65
|
+
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
66
66
|
var import_react_table3 = require("@tanstack/react-table");
|
|
67
|
-
var
|
|
67
|
+
var import_react36 = __toESM(require("react"), 1);
|
|
68
68
|
|
|
69
69
|
// src/components/DataGridCell.tsx
|
|
70
70
|
var import_sortable = require("@dnd-kit/sortable");
|
|
@@ -3870,7 +3870,7 @@ var Tooltip = ({
|
|
|
3870
3870
|
id,
|
|
3871
3871
|
"data-testid": testid,
|
|
3872
3872
|
ref,
|
|
3873
|
-
className: "relative inline-grid grid-cols-[auto_1fr] items-center",
|
|
3873
|
+
className: "relative inline-grid grid-cols-[auto_1fr] items-center cursor-pointer",
|
|
3874
3874
|
onMouseEnter: handleMouseEnter,
|
|
3875
3875
|
onMouseLeave: handleMouseLeave,
|
|
3876
3876
|
children: [
|
|
@@ -4461,12 +4461,11 @@ var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
|
4461
4461
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
4462
4462
|
|
|
4463
4463
|
// src/components/Grid.tsx
|
|
4464
|
-
var import_react26 = require("react");
|
|
4465
4464
|
var import_clsx29 = __toESM(require("clsx"), 1);
|
|
4466
4465
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
4467
4466
|
|
|
4468
4467
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
4469
|
-
var
|
|
4468
|
+
var import_react26 = require("react");
|
|
4470
4469
|
|
|
4471
4470
|
// src/components/Spinner.tsx
|
|
4472
4471
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
@@ -4502,7 +4501,7 @@ Spinner.displayName = "Spinner";
|
|
|
4502
4501
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
4503
4502
|
|
|
4504
4503
|
// src/components/ProductImagePreview/ZoomWindow.tsx
|
|
4505
|
-
var
|
|
4504
|
+
var import_react27 = require("react");
|
|
4506
4505
|
|
|
4507
4506
|
// src/components/Surface.tsx
|
|
4508
4507
|
var import_clsx30 = __toESM(require("clsx"), 1);
|
|
@@ -4547,22 +4546,202 @@ var import_clsx31 = require("clsx");
|
|
|
4547
4546
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4548
4547
|
|
|
4549
4548
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
4550
|
-
var
|
|
4549
|
+
var import_react28 = require("react");
|
|
4551
4550
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4552
4551
|
|
|
4553
4552
|
// src/components/ProductImagePreview/useProductImagePreview.ts
|
|
4554
|
-
var
|
|
4553
|
+
var import_react29 = require("react");
|
|
4555
4554
|
|
|
4556
4555
|
// src/components/ProductImagePreview/index.tsx
|
|
4557
4556
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4558
4557
|
|
|
4559
4558
|
// src/components/CompactImagesPreview.tsx
|
|
4560
|
-
var
|
|
4559
|
+
var import_react30 = require("react");
|
|
4561
4560
|
var import_clsx32 = __toESM(require("clsx"), 1);
|
|
4562
4561
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4563
4562
|
|
|
4564
|
-
// src/components/
|
|
4563
|
+
// src/components/SimpleTable.tsx
|
|
4564
|
+
var import_clsx33 = __toESM(require("clsx"), 1);
|
|
4565
4565
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4566
|
+
|
|
4567
|
+
// src/components/PDFViewer/index.tsx
|
|
4568
|
+
var import_react33 = require("react");
|
|
4569
|
+
|
|
4570
|
+
// src/components/PDFViewer/PDFElement.tsx
|
|
4571
|
+
var import_react_pdf2 = require("@mikecousins/react-pdf");
|
|
4572
|
+
var import_react32 = require("react");
|
|
4573
|
+
|
|
4574
|
+
// src/components/PDFViewer/PDFPage.tsx
|
|
4575
|
+
var import_react_pdf = require("@mikecousins/react-pdf");
|
|
4576
|
+
var import_react31 = require("react");
|
|
4577
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4578
|
+
|
|
4579
|
+
// src/components/PDFViewer/PDFElement.tsx
|
|
4580
|
+
var import_clsx34 = __toESM(require("clsx"), 1);
|
|
4581
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4582
|
+
|
|
4583
|
+
// src/components/PDFViewer/DownloadIcon.tsx
|
|
4584
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4585
|
+
|
|
4586
|
+
// src/components/PDFViewer/PDFNavigation.tsx
|
|
4587
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4588
|
+
|
|
4589
|
+
// src/components/PDFViewer/index.tsx
|
|
4590
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4591
|
+
|
|
4592
|
+
// src/components/ListGroup.tsx
|
|
4593
|
+
var import_react34 = require("react");
|
|
4594
|
+
var import_clsx35 = __toESM(require("clsx"), 1);
|
|
4595
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4596
|
+
|
|
4597
|
+
// src/components/Pagination.tsx
|
|
4598
|
+
var import_react35 = require("react");
|
|
4599
|
+
var import_clsx36 = __toESM(require("clsx"), 1);
|
|
4600
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4601
|
+
var Pagination = ({
|
|
4602
|
+
totalPages,
|
|
4603
|
+
currentPage,
|
|
4604
|
+
onPageChange,
|
|
4605
|
+
id,
|
|
4606
|
+
testid,
|
|
4607
|
+
className,
|
|
4608
|
+
disabled
|
|
4609
|
+
}) => {
|
|
4610
|
+
const goTo = (0, import_react35.useCallback)(
|
|
4611
|
+
(page) => {
|
|
4612
|
+
if (disabled) return;
|
|
4613
|
+
onPageChange(page);
|
|
4614
|
+
},
|
|
4615
|
+
[onPageChange, disabled]
|
|
4616
|
+
);
|
|
4617
|
+
const handleKey = (e) => {
|
|
4618
|
+
if (disabled) return;
|
|
4619
|
+
if (e.key === "ArrowLeft") {
|
|
4620
|
+
e.preventDefault();
|
|
4621
|
+
goTo(currentPage - 1);
|
|
4622
|
+
} else if (e.key === "ArrowRight") {
|
|
4623
|
+
e.preventDefault();
|
|
4624
|
+
goTo(currentPage + 1);
|
|
4625
|
+
}
|
|
4626
|
+
};
|
|
4627
|
+
const pageTokens = (0, import_react35.useMemo)(() => {
|
|
4628
|
+
if (totalPages <= 5) {
|
|
4629
|
+
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
4630
|
+
}
|
|
4631
|
+
const pages = /* @__PURE__ */ new Set();
|
|
4632
|
+
pages.add(1);
|
|
4633
|
+
pages.add(totalPages);
|
|
4634
|
+
if (currentPage <= 3) {
|
|
4635
|
+
pages.add(2);
|
|
4636
|
+
pages.add(3);
|
|
4637
|
+
pages.add(4);
|
|
4638
|
+
} else if (currentPage >= totalPages - 2) {
|
|
4639
|
+
pages.add(totalPages - 1);
|
|
4640
|
+
pages.add(totalPages - 2);
|
|
4641
|
+
pages.add(totalPages - 3);
|
|
4642
|
+
} else {
|
|
4643
|
+
pages.add(currentPage - 1);
|
|
4644
|
+
pages.add(currentPage);
|
|
4645
|
+
pages.add(currentPage + 1);
|
|
4646
|
+
}
|
|
4647
|
+
const sorted = Array.from(pages).sort((a, b) => a - b);
|
|
4648
|
+
const tokens = [];
|
|
4649
|
+
for (let i = 0; i < sorted.length; i++) {
|
|
4650
|
+
const value = sorted[i];
|
|
4651
|
+
const prev = sorted[i - 1];
|
|
4652
|
+
if (i > 0) {
|
|
4653
|
+
if (value - prev === 2) {
|
|
4654
|
+
tokens.push(prev + 1);
|
|
4655
|
+
} else if (value - prev > 2) {
|
|
4656
|
+
tokens.push("ellipsis");
|
|
4657
|
+
}
|
|
4658
|
+
}
|
|
4659
|
+
tokens.push(value);
|
|
4660
|
+
}
|
|
4661
|
+
return tokens;
|
|
4662
|
+
}, [totalPages, currentPage]);
|
|
4663
|
+
if (totalPages <= 1) return null;
|
|
4664
|
+
const buttonClass = (0, import_clsx36.default)(
|
|
4665
|
+
"cursor-pointer disabled:cursor-default",
|
|
4666
|
+
paddingUsingComponentGap,
|
|
4667
|
+
"w-8 h-8",
|
|
4668
|
+
"flex items-center justify-center",
|
|
4669
|
+
"bg-transparent",
|
|
4670
|
+
"box-content",
|
|
4671
|
+
"hover:bg-background-grouped-secondary-normal",
|
|
4672
|
+
"focus:bg-background-grouped-secondary-normal focus:outline-0",
|
|
4673
|
+
"disabled:bg-transparent disabled:text-text-action-primary-disabled"
|
|
4674
|
+
);
|
|
4675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
4676
|
+
"nav",
|
|
4677
|
+
{
|
|
4678
|
+
id,
|
|
4679
|
+
"data-testid": testid,
|
|
4680
|
+
"aria-label": "Pagination",
|
|
4681
|
+
onKeyDown: handleKey,
|
|
4682
|
+
className: (0, import_clsx36.default)(
|
|
4683
|
+
"flex items-center",
|
|
4684
|
+
"border border-border-primary-normal",
|
|
4685
|
+
"bg-background-grouped-primary-normal",
|
|
4686
|
+
"rounded-sm",
|
|
4687
|
+
className
|
|
4688
|
+
),
|
|
4689
|
+
children: [
|
|
4690
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4691
|
+
"button",
|
|
4692
|
+
{
|
|
4693
|
+
disabled: disabled || currentPage <= 1,
|
|
4694
|
+
"aria-label": "Previous page",
|
|
4695
|
+
onClick: () => goTo(currentPage - 1),
|
|
4696
|
+
className: (0, import_clsx36.default)(buttonClass, "border-r-1 border-border-primary-normal"),
|
|
4697
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: "keyboard_arrow_left" })
|
|
4698
|
+
}
|
|
4699
|
+
),
|
|
4700
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { className: (0, import_clsx36.default)("flex items-center"), children: pageTokens.map((token, index) => {
|
|
4701
|
+
if (token === "ellipsis") {
|
|
4702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4703
|
+
"li",
|
|
4704
|
+
{
|
|
4705
|
+
className: "w-8 h-8 select-none text-text-action-primary-disabled",
|
|
4706
|
+
children: "\u2026"
|
|
4707
|
+
},
|
|
4708
|
+
`ellipsis-${index}`
|
|
4709
|
+
);
|
|
4710
|
+
}
|
|
4711
|
+
const selected = token === currentPage;
|
|
4712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4713
|
+
"button",
|
|
4714
|
+
{
|
|
4715
|
+
"aria-label": `Page ${token}`,
|
|
4716
|
+
"aria-current": selected ? "page" : void 0,
|
|
4717
|
+
disabled,
|
|
4718
|
+
onClick: () => goTo(token),
|
|
4719
|
+
className: (0, import_clsx36.default)(
|
|
4720
|
+
buttonClass,
|
|
4721
|
+
selected && "border-x-1 bg-background-grouped-secondary-normal border-border-primary-normal"
|
|
4722
|
+
),
|
|
4723
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Subheader, { align: "center", weight: "bold", children: token })
|
|
4724
|
+
}
|
|
4725
|
+
) }, token);
|
|
4726
|
+
}) }),
|
|
4727
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4728
|
+
"button",
|
|
4729
|
+
{
|
|
4730
|
+
disabled: disabled || currentPage >= totalPages,
|
|
4731
|
+
"aria-label": "Next page",
|
|
4732
|
+
onClick: () => goTo(currentPage + 1),
|
|
4733
|
+
className: (0, import_clsx36.default)(buttonClass, "border-l-1 border-border-primary-normal"),
|
|
4734
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: "keyboard_arrow_right" })
|
|
4735
|
+
}
|
|
4736
|
+
)
|
|
4737
|
+
]
|
|
4738
|
+
}
|
|
4739
|
+
);
|
|
4740
|
+
};
|
|
4741
|
+
Pagination.displayName = "Pagination";
|
|
4742
|
+
|
|
4743
|
+
// src/components/DataGrid/TableBody/TableBodyRow.tsx
|
|
4744
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4566
4745
|
var valueFormatters = {
|
|
4567
4746
|
date: (value) => typeof value === "string" ? formatDate(value) : "",
|
|
4568
4747
|
currency: (value) => formatCurrencyDisplay(value)
|
|
@@ -4595,10 +4774,10 @@ function TableBodyRow({
|
|
|
4595
4774
|
const columns = locked ? visibleCells : virtualColumns;
|
|
4596
4775
|
const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
|
|
4597
4776
|
const CellElement = locked ? DataGridCell : DragAlongCell;
|
|
4598
|
-
return /* @__PURE__ */ (0,
|
|
4777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
4599
4778
|
"tr",
|
|
4600
4779
|
{
|
|
4601
|
-
className: (0,
|
|
4780
|
+
className: (0, import_clsx37.default)(
|
|
4602
4781
|
"min-h-10",
|
|
4603
4782
|
"transition-colors hover:bg-background-action-secondary-hover",
|
|
4604
4783
|
row.getIsSelected() && "!bg-background-action-secondary-hover",
|
|
@@ -4616,7 +4795,7 @@ function TableBodyRow({
|
|
|
4616
4795
|
children: [
|
|
4617
4796
|
!locked && virtualPaddingLeft ? (
|
|
4618
4797
|
// fake empty column to the left for virtualization scroll padding
|
|
4619
|
-
/* @__PURE__ */ (0,
|
|
4798
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("td", { style: { display: "flex", width: virtualPaddingLeft } })
|
|
4620
4799
|
) : null,
|
|
4621
4800
|
columns.map((column) => {
|
|
4622
4801
|
var _a2, _b, _c, _d;
|
|
@@ -4627,17 +4806,17 @@ function TableBodyRow({
|
|
|
4627
4806
|
const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
|
|
4628
4807
|
const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
|
|
4629
4808
|
const cellAlignment = (_c = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
|
|
4630
|
-
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0,
|
|
4809
|
+
return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react36.default.Fragment, { children: (0, import_react_table3.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4631
4810
|
CellElement,
|
|
4632
4811
|
{
|
|
4633
4812
|
id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
4634
4813
|
testid: testid ? `${testid}-row-${row.id}-cell-${cell.id}` : void 0,
|
|
4635
4814
|
cell,
|
|
4636
|
-
className: (0,
|
|
4815
|
+
className: (0, import_clsx37.default)({
|
|
4637
4816
|
"justify-start": cellAlignment === "left",
|
|
4638
4817
|
"justify-end": cellAlignment === "right"
|
|
4639
4818
|
}),
|
|
4640
|
-
children: /* @__PURE__ */ (0,
|
|
4819
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4641
4820
|
Tooltip,
|
|
4642
4821
|
{
|
|
4643
4822
|
id: id ? `${id}-tooltip-${cell.id}` : void 0,
|
|
@@ -4645,7 +4824,7 @@ function TableBodyRow({
|
|
|
4645
4824
|
showOnTruncation: true,
|
|
4646
4825
|
message: cellValue,
|
|
4647
4826
|
position: "bottom",
|
|
4648
|
-
children: /* @__PURE__ */ (0,
|
|
4827
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Paragraph, { addOverflow: true, tall: true, children: cellValue })
|
|
4649
4828
|
}
|
|
4650
4829
|
)
|
|
4651
4830
|
},
|
|
@@ -4654,7 +4833,7 @@ function TableBodyRow({
|
|
|
4654
4833
|
}),
|
|
4655
4834
|
!locked && virtualPaddingRight ? (
|
|
4656
4835
|
// fake empty column to the right for virtualization scroll padding
|
|
4657
|
-
/* @__PURE__ */ (0,
|
|
4836
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("td", { style: { display: "flex", width: virtualPaddingRight } })
|
|
4658
4837
|
) : null
|
|
4659
4838
|
]
|
|
4660
4839
|
},
|