@dmsi/wedgekit-react 0.0.413 → 0.0.415

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 (55) hide show
  1. package/dist/chunk-7ULLUUVJ.js +61 -0
  2. package/dist/components/CalendarRange.cjs +39 -35
  3. package/dist/components/CalendarRange.css +9 -0
  4. package/dist/components/CalendarRange.js +6 -5
  5. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +6 -2
  6. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +9 -0
  7. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +6 -5
  8. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +13 -9
  9. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +9 -0
  10. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +6 -5
  11. package/dist/components/DataGrid/PinnedColumns.cjs +27 -23
  12. package/dist/components/DataGrid/PinnedColumns.css +9 -0
  13. package/dist/components/DataGrid/PinnedColumns.js +6 -5
  14. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +9 -5
  15. package/dist/components/DataGrid/TableBody/LoadingCell.css +9 -0
  16. package/dist/components/DataGrid/TableBody/LoadingCell.js +6 -5
  17. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +14 -10
  18. package/dist/components/DataGrid/TableBody/TableBodyRow.css +9 -0
  19. package/dist/components/DataGrid/TableBody/TableBodyRow.js +6 -5
  20. package/dist/components/DataGrid/TableBody/index.cjs +29 -25
  21. package/dist/components/DataGrid/TableBody/index.css +9 -0
  22. package/dist/components/DataGrid/TableBody/index.js +6 -5
  23. package/dist/components/DataGrid/index.cjs +98 -94
  24. package/dist/components/DataGrid/index.css +9 -0
  25. package/dist/components/DataGrid/index.js +6 -5
  26. package/dist/components/DataGrid/utils.cjs +9 -5
  27. package/dist/components/DataGrid/utils.css +9 -0
  28. package/dist/components/DataGrid/utils.js +6 -5
  29. package/dist/components/DateInput.cjs +45 -41
  30. package/dist/components/DateInput.css +9 -0
  31. package/dist/components/DateInput.js +6 -5
  32. package/dist/components/DateRangeInput.cjs +45 -41
  33. package/dist/components/DateRangeInput.css +9 -0
  34. package/dist/components/DateRangeInput.js +6 -5
  35. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +12 -8
  36. package/dist/components/MobileDataGrid/ColumnSelector/index.css +9 -0
  37. package/dist/components/MobileDataGrid/ColumnSelector/index.js +6 -5
  38. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +20 -16
  39. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +9 -0
  40. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +6 -5
  41. package/dist/components/MobileDataGrid/index.cjs +103 -99
  42. package/dist/components/MobileDataGrid/index.css +9 -0
  43. package/dist/components/MobileDataGrid/index.js +6 -5
  44. package/dist/components/ProductImagePreview/index.js +2 -2
  45. package/dist/components/SimpleTable.cjs +485 -0
  46. package/dist/components/SimpleTable.js +10 -0
  47. package/dist/components/index.cjs +53 -0
  48. package/dist/components/index.css +9 -0
  49. package/dist/components/index.js +9 -5
  50. package/dist/index.css +9 -0
  51. package/package.json +1 -1
  52. package/src/components/SimpleTable.tsx +77 -0
  53. package/src/components/index.ts +1 -0
  54. package/dist/{chunk-OBY5EH47.js → chunk-BK7SPR6Y.js} +6 -6
  55. package/dist/{chunk-LZGYABCX.js → chunk-ZHZIIVJN.js} +3 -3
@@ -4380,14 +4380,18 @@ var import_react31 = require("react");
4380
4380
  var import_clsx31 = __toESM(require("clsx"), 1);
4381
4381
  var import_jsx_runtime48 = require("react/jsx-runtime");
4382
4382
 
4383
+ // src/components/SimpleTable.tsx
4384
+ var import_clsx32 = __toESM(require("clsx"), 1);
4385
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4386
+
4383
4387
  // src/components/DataGrid/TableBody/index.tsx
4384
- var import_clsx33 = __toESM(require("clsx"), 1);
4388
+ var import_clsx34 = __toESM(require("clsx"), 1);
4385
4389
 
4386
4390
  // src/components/DataGrid/TableBody/TableBodyRow.tsx
4387
- var import_clsx32 = __toESM(require("clsx"), 1);
4391
+ var import_clsx33 = __toESM(require("clsx"), 1);
4388
4392
  var import_react_table3 = require("@tanstack/react-table");
4389
4393
  var import_react32 = __toESM(require("react"), 1);
4390
- var import_jsx_runtime49 = require("react/jsx-runtime");
4394
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4391
4395
  var valueFormatters = {
4392
4396
  date: (value) => typeof value === "string" ? formatDate(value) : "",
4393
4397
  currency: (value) => formatCurrencyDisplay(value)
@@ -4420,10 +4424,10 @@ function TableBodyRow({
4420
4424
  const columns = locked ? visibleCells : virtualColumns;
4421
4425
  const isError = typeof row.original === "object" && row.original !== null && "rowState" in row.original && row.original.rowState === "error";
4422
4426
  const CellElement = locked ? DataGridCell : DragAlongCell;
4423
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
4427
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
4424
4428
  "tr",
4425
4429
  {
4426
- className: (0, import_clsx32.default)(
4430
+ className: (0, import_clsx33.default)(
4427
4431
  "min-h-10",
4428
4432
  "transition-colors hover:bg-background-action-secondary-hover",
4429
4433
  row.getIsSelected() && "!bg-background-action-secondary-hover",
@@ -4441,7 +4445,7 @@ function TableBodyRow({
4441
4445
  children: [
4442
4446
  !locked && virtualPaddingLeft ? (
4443
4447
  // fake empty column to the left for virtualization scroll padding
4444
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("td", { style: { display: "flex", width: virtualPaddingLeft } })
4448
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("td", { style: { display: "flex", width: virtualPaddingLeft } })
4445
4449
  ) : null,
4446
4450
  columns.map((column) => {
4447
4451
  var _a2, _b, _c, _d;
@@ -4452,17 +4456,17 @@ function TableBodyRow({
4452
4456
  const cellFormat = (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.format;
4453
4457
  const cellValue = cellFormat && isValueFormatterKey(cellFormat) ? valueFormatters[cellFormat](cell.getValue()) : cell.getValue();
4454
4458
  const cellAlignment = (_c = (_b = cell.column.columnDef.meta) == null ? void 0 : _b.align) != null ? _c : typeof cellValue === "number" ? "right" : "left";
4455
- return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react32.default.Fragment, { children: (0, import_react_table3.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4459
+ return ((_d = cell.column.columnDef.meta) == null ? void 0 : _d.useCustomRenderer) ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react32.default.Fragment, { children: (0, import_react_table3.flexRender)(cell.column.columnDef.cell, cell.getContext()) }, cell.id) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4456
4460
  CellElement,
4457
4461
  {
4458
4462
  id: id ? `${id}-row-${row.id}-cell-${cell.id}` : void 0,
4459
4463
  testid: testid ? `${testid}-row-${row.id}-cell-${cell.id}` : void 0,
4460
4464
  cell,
4461
- className: (0, import_clsx32.default)({
4465
+ className: (0, import_clsx33.default)({
4462
4466
  "justify-start": cellAlignment === "left",
4463
4467
  "justify-end": cellAlignment === "right"
4464
4468
  }),
4465
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4469
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4466
4470
  Tooltip,
4467
4471
  {
4468
4472
  id: id ? `${id}-tooltip-${cell.id}` : void 0,
@@ -4470,7 +4474,7 @@ function TableBodyRow({
4470
4474
  showOnTruncation: true,
4471
4475
  message: cellValue,
4472
4476
  position: "bottom",
4473
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Paragraph, { addOverflow: true, tall: true, children: cellValue })
4477
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Paragraph, { addOverflow: true, tall: true, children: cellValue })
4474
4478
  }
4475
4479
  )
4476
4480
  },
@@ -4479,7 +4483,7 @@ function TableBodyRow({
4479
4483
  }),
4480
4484
  !locked && virtualPaddingRight ? (
4481
4485
  // fake empty column to the right for virtualization scroll padding
4482
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("td", { style: { display: "flex", width: virtualPaddingRight } })
4486
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("td", { style: { display: "flex", width: virtualPaddingRight } })
4483
4487
  ) : null
4484
4488
  ]
4485
4489
  },
@@ -4488,7 +4492,7 @@ function TableBodyRow({
4488
4492
  }
4489
4493
 
4490
4494
  // src/components/DataGrid/TableBody/LoadingCell.tsx
4491
- var import_jsx_runtime50 = require("react/jsx-runtime");
4495
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4492
4496
  function LoadingCell({
4493
4497
  id,
4494
4498
  testid,
@@ -4496,16 +4500,16 @@ function LoadingCell({
4496
4500
  }) {
4497
4501
  const key = `loading-${column.id}`;
4498
4502
  if (column.cell === "checkbox") {
4499
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Checkbox, { id: id ? `${id}-${key}-checkbox` : void 0, testid: testid ? `${testid}-${key}-checkbox` : void 0, disabled: true }) }, key);
4503
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Checkbox, { id: id ? `${id}-${key}-checkbox` : void 0, testid: testid ? `${testid}-${key}-checkbox` : void 0, disabled: true }) }, key);
4500
4504
  }
4501
4505
  if (column.cell === "input") {
4502
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4506
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4503
4507
  DataGridCell,
4504
4508
  {
4505
4509
  id: id ? `${id}-${key}` : void 0,
4506
4510
  testid: testid ? `${testid}-${key}` : void 0,
4507
4511
  component: "input",
4508
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4512
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4509
4513
  Input,
4510
4514
  {
4511
4515
  id: id ? `${id}-${key}-input` : void 0,
@@ -4519,11 +4523,11 @@ function LoadingCell({
4519
4523
  key
4520
4524
  );
4521
4525
  }
4522
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "bg-linear-270 to-neutral-300/[24%] from-neutral-300/[12%] rounded-xs w-full max-w-25 h-6" }) }, key);
4526
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DataGridCell, { id: id ? `${id}-${key}` : void 0, testid: testid ? `${testid}-${key}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "bg-linear-270 to-neutral-300/[24%] from-neutral-300/[12%] rounded-xs w-full max-w-25 h-6" }) }, key);
4523
4527
  }
4524
4528
 
4525
4529
  // src/components/DataGrid/TableBody/index.tsx
4526
- var import_jsx_runtime51 = require("react/jsx-runtime");
4530
+ var import_jsx_runtime52 = require("react/jsx-runtime");
4527
4531
  function TableBody({
4528
4532
  id,
4529
4533
  testid,
@@ -4557,10 +4561,10 @@ function TableBody({
4557
4561
  } else {
4558
4562
  headerGroups = table.getCenterHeaderGroups();
4559
4563
  }
4560
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
4564
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
4561
4565
  "tbody",
4562
4566
  {
4563
- className: (0, import_clsx33.default)(locked ? "shadow-16" : ""),
4567
+ className: (0, import_clsx34.default)(locked ? "shadow-16" : ""),
4564
4568
  style: {
4565
4569
  display: "grid",
4566
4570
  height: `${showFilterRow ? rowVirtualizer.getTotalSize() + 40 : rowVirtualizer.getTotalSize()}px`,
@@ -4569,7 +4573,7 @@ function TableBody({
4569
4573
  // needed for absolute positioning of rows
4570
4574
  },
4571
4575
  children: [
4572
- showFilterRow && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4576
+ showFilterRow && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4573
4577
  "tr",
4574
4578
  {
4575
4579
  style: {
@@ -4585,7 +4589,7 @@ function TableBody({
4585
4589
  children: headerGroups.flatMap(
4586
4590
  (x) => x.headers.map((header) => {
4587
4591
  var _a, _b, _c, _d, _e;
4588
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4592
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4589
4593
  CellElement,
4590
4594
  {
4591
4595
  id: id ? `${id}-filter-cell-${header.id}` : void 0,
@@ -4596,7 +4600,7 @@ function TableBody({
4596
4600
  children: header.column.getCanFilter() && ((_e = (_c = (_b = header.column.columnDef.meta) == null ? void 0 : _b.filterRowCell) == null ? void 0 : _c.call(_b, {
4597
4601
  header,
4598
4602
  table
4599
- })) != null ? _e : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4603
+ })) != null ? _e : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4600
4604
  Search,
4601
4605
  {
4602
4606
  id: id ? `${id}-filter-search-${header.id}` : void 0,
@@ -4617,7 +4621,7 @@ function TableBody({
4617
4621
  ),
4618
4622
  virtualRows.map((virtualRow) => {
4619
4623
  const row = rows[virtualRow.index];
4620
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4624
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4621
4625
  TableBodyRow,
4622
4626
  {
4623
4627
  id,
@@ -4636,7 +4640,7 @@ function TableBody({
4636
4640
  row.id
4637
4641
  );
4638
4642
  }),
4639
- !pagination && isLoadingMore && hasMore && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4643
+ !pagination && isLoadingMore && hasMore && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4640
4644
  "tr",
4641
4645
  {
4642
4646
  style: {
@@ -4646,7 +4650,7 @@ function TableBody({
4646
4650
  transform: `translateY(${virtualRows[virtualRows.length - 1].start + 40}px)`
4647
4651
  },
4648
4652
  className: "odd:bg-background-grouped-primary-normal even:bg-background-grouped-secondary-normal",
4649
- children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4653
+ children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4650
4654
  LoadingCell,
4651
4655
  {
4652
4656
  id,
@@ -841,6 +841,9 @@
841
841
  .\!w-20 {
842
842
  width: calc(var(--spacing) * 20) !important;
843
843
  }
844
+ .w-2\/3 {
845
+ width: calc(2/3 * 100%);
846
+ }
844
847
  .w-3 {
845
848
  width: calc(var(--spacing) * 3);
846
849
  }
@@ -961,6 +964,9 @@
961
964
  .grow-0 {
962
965
  flex-grow: 0;
963
966
  }
967
+ .border-collapse {
968
+ border-collapse: collapse;
969
+ }
964
970
  .translate-x-0 {
965
971
  --tw-translate-x: calc(var(--spacing) * 0);
966
972
  translate: var(--tw-translate-x) var(--tw-translate-y);
@@ -2035,6 +2041,9 @@
2035
2041
  .text-right {
2036
2042
  text-align: right;
2037
2043
  }
2044
+ .align-middle {
2045
+ vertical-align: middle;
2046
+ }
2038
2047
  .font-sans {
2039
2048
  font-family: var(--font-sans);
2040
2049
  }
@@ -1,24 +1,25 @@
1
1
  import {
2
2
  TableBody
3
- } from "../../../chunk-OBY5EH47.js";
4
- import "../../../chunk-M7INAUAJ.js";
3
+ } from "../../../chunk-BK7SPR6Y.js";
5
4
  import "../../../chunk-6I5LZ2ZC.js";
5
+ import "../../../chunk-M7INAUAJ.js";
6
6
  import "../../../chunk-44TDIHUP.js";
7
- import "../../../chunk-LZGYABCX.js";
7
+ import "../../../chunk-ZHZIIVJN.js";
8
+ import "../../../chunk-2IKT6IHB.js";
8
9
  import "../../../chunk-G5DEC7H3.js";
9
10
  import "../../../chunk-3X3Y4TMS.js";
10
11
  import "../../../chunk-BQNPOGD5.js";
11
12
  import "../../../chunk-MBZ55T2D.js";
12
- import "../../../chunk-2IKT6IHB.js";
13
13
  import "../../../chunk-AA6GE3TH.js";
14
14
  import "../../../chunk-KZZKQLKF.js";
15
15
  import "../../../chunk-5IFPG6TS.js";
16
16
  import "../../../chunk-AJ5M6MVX.js";
17
17
  import "../../../chunk-M6TSTDNZ.js";
18
+ import "../../../chunk-EWGHVZL5.js";
18
19
  import "../../../chunk-QQ5G773N.js";
19
20
  import "../../../chunk-AT4AWD6B.js";
20
- import "../../../chunk-EWGHVZL5.js";
21
21
  import "../../../chunk-J5V2JRIK.js";
22
+ import "../../../chunk-7ULLUUVJ.js";
22
23
  import "../../../chunk-D6YCMQPO.js";
23
24
  import "../../../chunk-4RJKB7LC.js";
24
25
  import "../../../chunk-XM7IQHBU.js";