@dmsi/wedgekit-react 0.0.561 → 0.0.563

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 (39) hide show
  1. package/dist/chunk-6MGHIYMP.js +42 -0
  2. package/dist/components/CalendarRange.cjs +58 -49
  3. package/dist/components/CalendarRange.js +3 -2
  4. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +26 -17
  5. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +3 -2
  6. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +36 -27
  7. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +3 -2
  8. package/dist/components/DataGrid/PinnedColumns.cjs +48 -39
  9. package/dist/components/DataGrid/PinnedColumns.js +3 -2
  10. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +27 -18
  11. package/dist/components/DataGrid/TableBody/LoadingCell.js +3 -2
  12. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +30 -21
  13. package/dist/components/DataGrid/TableBody/TableBodyRow.js +3 -2
  14. package/dist/components/DataGrid/TableBody/index.cjs +43 -34
  15. package/dist/components/DataGrid/TableBody/index.js +3 -2
  16. package/dist/components/DataGrid/index.cjs +123 -114
  17. package/dist/components/DataGrid/index.js +3 -2
  18. package/dist/components/DataGrid/utils.cjs +25 -16
  19. package/dist/components/DataGrid/utils.js +3 -2
  20. package/dist/components/DateInput.cjs +77 -68
  21. package/dist/components/DateInput.js +3 -2
  22. package/dist/components/DateRangeInput.cjs +77 -68
  23. package/dist/components/DateRangeInput.js +3 -2
  24. package/dist/components/EditingContext.cjs +8 -2
  25. package/dist/components/EditingContext.js +7 -32
  26. package/dist/components/MobileDataGrid/ColumnList.js +1 -1
  27. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +34 -25
  28. package/dist/components/MobileDataGrid/ColumnSelector/index.js +3 -2
  29. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
  30. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +42 -33
  31. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +3 -2
  32. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
  33. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +1 -1
  34. package/dist/components/MobileDataGrid/index.cjs +136 -127
  35. package/dist/components/MobileDataGrid/index.js +3 -2
  36. package/dist/components/index.cjs +46 -31
  37. package/dist/components/index.js +7 -3
  38. package/package.json +1 -1
  39. /package/dist/{chunk-LKFYNRJZ.js → chunk-3JQPFWKR.js} +0 -0
@@ -62,7 +62,7 @@ __export(DateRangeInput_exports, {
62
62
  DateRangeInput: () => DateRangeInput
63
63
  });
64
64
  module.exports = __toCommonJS(DateRangeInput_exports);
65
- var import_react39 = require("react");
65
+ var import_react40 = require("react");
66
66
  var import_react_dom5 = require("react-dom");
67
67
 
68
68
  // src/components/Input.tsx
@@ -834,7 +834,7 @@ Percentage.displayName = "Percentage";
834
834
 
835
835
  // src/components/CalendarRange.tsx
836
836
  var import_clsx42 = __toESM(require("clsx"), 1);
837
- var import_react38 = __toESM(require("react"), 1);
837
+ var import_react39 = __toESM(require("react"), 1);
838
838
  var import_polyfill = require("@js-temporal/polyfill");
839
839
 
840
840
  // src/components/DataGridCell.tsx
@@ -5404,12 +5404,21 @@ var import_jsx_runtime60 = require("react/jsx-runtime");
5404
5404
  // src/components/OrderCheckIcon.tsx
5405
5405
  var import_jsx_runtime61 = require("react/jsx-runtime");
5406
5406
 
5407
+ // src/components/EditingContext.tsx
5408
+ var import_react37 = require("react");
5409
+ var import_jsx_runtime62 = require("react/jsx-runtime");
5410
+ var EditingContext = (0, import_react37.createContext)({
5411
+ data: [],
5412
+ setData: () => {
5413
+ }
5414
+ });
5415
+
5407
5416
  // src/components/AccessCard.tsx
5408
5417
  var import_clsx40 = __toESM(require("clsx"), 1);
5409
5418
 
5410
5419
  // src/components/Radio.tsx
5411
5420
  var import_clsx39 = __toESM(require("clsx"), 1);
5412
- var import_jsx_runtime62 = require("react/jsx-runtime");
5421
+ var import_jsx_runtime63 = require("react/jsx-runtime");
5413
5422
  var Radio = (_a) => {
5414
5423
  var _b = _a, {
5415
5424
  className,
@@ -5444,7 +5453,7 @@ var Radio = (_a) => {
5444
5453
  const readonlyClassName = (0, import_clsx39.default)(
5445
5454
  readOnly && "peer-read-only:bg-background-action-secondary-disabled peer-read-only:border-border-primary-normal peer-checked:border-0"
5446
5455
  );
5447
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5456
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
5448
5457
  "label",
5449
5458
  {
5450
5459
  htmlFor: radioId,
@@ -5456,8 +5465,8 @@ var Radio = (_a) => {
5456
5465
  className
5457
5466
  ),
5458
5467
  children: [
5459
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "relative", children: [
5460
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5468
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "relative", children: [
5469
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5461
5470
  "input",
5462
5471
  __spreadValues({
5463
5472
  id: radioId,
@@ -5469,7 +5478,7 @@ var Radio = (_a) => {
5469
5478
  readOnly
5470
5479
  }, props)
5471
5480
  ),
5472
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5481
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5473
5482
  "div",
5474
5483
  {
5475
5484
  className: (0, import_clsx39.default)(
@@ -5480,7 +5489,7 @@ var Radio = (_a) => {
5480
5489
  disabledClassName,
5481
5490
  readonlyClassName
5482
5491
  ),
5483
- children: checked && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5492
+ children: checked && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5484
5493
  RadioIcon,
5485
5494
  {
5486
5495
  className: (0, import_clsx39.default)(
@@ -5495,14 +5504,14 @@ var Radio = (_a) => {
5495
5504
  }
5496
5505
  )
5497
5506
  ] }),
5498
- label && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Paragraph, { id: radioId ? `${radioId}-label` : void 0, testid: testid ? `${testid}-label` : void 0, padded: true, color: paragraphColor, children: label })
5507
+ label && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Paragraph, { id: radioId ? `${radioId}-label` : void 0, testid: testid ? `${testid}-label` : void 0, padded: true, color: paragraphColor, children: label })
5499
5508
  ]
5500
5509
  }
5501
5510
  );
5502
5511
  };
5503
5512
  Radio.displayName = "Radio";
5504
5513
  var RadioIcon = ({ className }) => {
5505
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5514
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
5506
5515
  "svg",
5507
5516
  {
5508
5517
  className,
@@ -5512,7 +5521,7 @@ var RadioIcon = ({ className }) => {
5512
5521
  viewBox: "0 0 24 24",
5513
5522
  fill: "none",
5514
5523
  children: [
5515
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5524
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5516
5525
  "rect",
5517
5526
  {
5518
5527
  x: "1",
@@ -5524,7 +5533,7 @@ var RadioIcon = ({ className }) => {
5524
5533
  strokeWidth: "2"
5525
5534
  }
5526
5535
  ),
5527
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "4", y: "4", width: "16", height: "16", rx: "8", fill: "currentColor" })
5536
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("rect", { x: "4", y: "4", width: "16", height: "16", rx: "8", fill: "currentColor" })
5528
5537
  ]
5529
5538
  }
5530
5539
  );
@@ -5532,15 +5541,15 @@ var RadioIcon = ({ className }) => {
5532
5541
  RadioIcon.displayName = "RadioIcon";
5533
5542
 
5534
5543
  // src/components/AccessCard.tsx
5535
- var import_jsx_runtime63 = require("react/jsx-runtime");
5544
+ var import_jsx_runtime64 = require("react/jsx-runtime");
5536
5545
 
5537
5546
  // src/components/AccessCardGroup.tsx
5538
5547
  var import_clsx41 = __toESM(require("clsx"), 1);
5539
- var import_react37 = require("react");
5540
- var import_jsx_runtime64 = require("react/jsx-runtime");
5548
+ var import_react38 = require("react");
5549
+ var import_jsx_runtime65 = require("react/jsx-runtime");
5541
5550
 
5542
5551
  // src/components/CalendarRange.tsx
5543
- var import_jsx_runtime65 = require("react/jsx-runtime");
5552
+ var import_jsx_runtime66 = require("react/jsx-runtime");
5544
5553
  function DateCell(_a) {
5545
5554
  var _b = _a, {
5546
5555
  date,
@@ -5575,7 +5584,7 @@ function DateCell(_a) {
5575
5584
  "id",
5576
5585
  "testid"
5577
5586
  ]);
5578
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5587
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5579
5588
  "span",
5580
5589
  __spreadProps(__spreadValues({}, props), {
5581
5590
  id,
@@ -5651,20 +5660,20 @@ function CalendarRange({
5651
5660
  const fromDate = parseDate(from);
5652
5661
  const toDate = parseDate(to);
5653
5662
  const today = import_polyfill.Temporal.Now.plainDateISO();
5654
- const [baseMonth, setBaseMonth] = (0, import_react38.useState)(
5663
+ const [baseMonth, setBaseMonth] = (0, import_react39.useState)(
5655
5664
  fromDate != null ? fromDate : today.with({ day: 1 })
5656
5665
  );
5657
- const [selecting, setSelecting] = (0, import_react38.useState)("from");
5658
- const [pendingFrom, setPendingFrom] = (0, import_react38.useState)(void 0);
5659
- const [hoveredDate, setHoveredDate] = (0, import_react38.useState)(void 0);
5660
- (0, import_react38.useEffect)(() => {
5666
+ const [selecting, setSelecting] = (0, import_react39.useState)("from");
5667
+ const [pendingFrom, setPendingFrom] = (0, import_react39.useState)(void 0);
5668
+ const [hoveredDate, setHoveredDate] = (0, import_react39.useState)(void 0);
5669
+ (0, import_react39.useEffect)(() => {
5661
5670
  if (fromDate) {
5662
5671
  setBaseMonth(fromDate.with({ day: 1 }));
5663
5672
  } else if (toDate) {
5664
5673
  setBaseMonth(toDate.with({ day: 1 }));
5665
5674
  }
5666
5675
  }, [from, to]);
5667
- (0, import_react38.useEffect)(() => {
5676
+ (0, import_react39.useEffect)(() => {
5668
5677
  if (fromDate && toDate) {
5669
5678
  setSelecting("from");
5670
5679
  setPendingFrom(void 0);
@@ -5731,7 +5740,7 @@ function CalendarRange({
5731
5740
  }
5732
5741
  return false;
5733
5742
  }
5734
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5743
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5735
5744
  "div",
5736
5745
  {
5737
5746
  id,
@@ -5744,7 +5753,7 @@ function CalendarRange({
5744
5753
  // baseTransition,
5745
5754
  "overflow-hidden"
5746
5755
  ),
5747
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5756
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5748
5757
  "div",
5749
5758
  {
5750
5759
  className: (0, import_clsx42.default)(
@@ -5752,7 +5761,7 @@ function CalendarRange({
5752
5761
  layoutGap
5753
5762
  ),
5754
5763
  children: (mode === "double" ? [0, 1] : [0]).map((offset, idx) => {
5755
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5764
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5756
5765
  CalendarPane,
5757
5766
  {
5758
5767
  getMonthData,
@@ -5810,20 +5819,20 @@ function CalendarPane({
5810
5819
  const years = Array.from({ length: 100 }).map(
5811
5820
  (_, i) => baseMonth.year - 50 + i
5812
5821
  );
5813
- const [monthMenuOpen, setMonthMenuOpen] = (0, import_react38.useState)(false);
5814
- const [yearMenuOpen, setYearMenuOpen] = (0, import_react38.useState)(false);
5815
- const monthMenuRef = (0, import_react38.useRef)(null);
5816
- const yearMenuRef = (0, import_react38.useRef)(null);
5822
+ const [monthMenuOpen, setMonthMenuOpen] = (0, import_react39.useState)(false);
5823
+ const [yearMenuOpen, setYearMenuOpen] = (0, import_react39.useState)(false);
5824
+ const monthMenuRef = (0, import_react39.useRef)(null);
5825
+ const yearMenuRef = (0, import_react39.useRef)(null);
5817
5826
  const month = getMonthData(offset);
5818
5827
  const totalCells = 42;
5819
5828
  const emptyCells = month.firstDayOffset;
5820
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react38.default.Fragment, { children: [
5821
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
5829
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react39.default.Fragment, { children: [
5830
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
5822
5831
  "div",
5823
5832
  {
5824
5833
  className: (0, import_clsx42.default)("flex flex-col"),
5825
5834
  children: [
5826
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
5835
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
5827
5836
  "div",
5828
5837
  {
5829
5838
  className: (0, import_clsx42.default)(
@@ -5832,7 +5841,7 @@ function CalendarPane({
5832
5841
  "text-text-action-primary-normal"
5833
5842
  ),
5834
5843
  children: [
5835
- idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5844
+ idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5836
5845
  "button",
5837
5846
  {
5838
5847
  id: id ? `${id}-prev-month-button` : void 0,
@@ -5844,11 +5853,11 @@ function CalendarPane({
5844
5853
  ),
5845
5854
  "aria-label": "Previous month",
5846
5855
  onClick: () => setBaseMonth(baseMonth.subtract({ months: 1 })),
5847
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon, { name: "chevron_left", size: 24 })
5856
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { name: "chevron_left", size: 24 })
5848
5857
  }
5849
- ) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: (0, import_clsx42.default)(componentPadding, "mr-1") }),
5850
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex gap-desktop-compact-component-padding", children: [
5851
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5858
+ ) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: (0, import_clsx42.default)(componentPadding, "mr-1") }),
5859
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex gap-desktop-compact-component-padding", children: [
5860
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5852
5861
  "button",
5853
5862
  {
5854
5863
  ref: (el) => {
@@ -5863,13 +5872,13 @@ function CalendarPane({
5863
5872
  children: month.name
5864
5873
  }
5865
5874
  ),
5866
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5875
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5867
5876
  Menu,
5868
5877
  {
5869
5878
  show: monthMenuOpen,
5870
5879
  positionTo: monthMenuRef,
5871
5880
  setShow: () => setMonthMenuOpen(false),
5872
- children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5881
+ children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5873
5882
  MenuOption,
5874
5883
  {
5875
5884
  selected: baseMonth.month === x + 1,
@@ -5883,7 +5892,7 @@ function CalendarPane({
5883
5892
  ))
5884
5893
  }
5885
5894
  ),
5886
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5895
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5887
5896
  "button",
5888
5897
  {
5889
5898
  ref: (el) => {
@@ -5898,13 +5907,13 @@ function CalendarPane({
5898
5907
  children: month.year
5899
5908
  }
5900
5909
  ),
5901
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5910
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5902
5911
  Menu,
5903
5912
  {
5904
5913
  show: yearMenuOpen,
5905
5914
  positionTo: yearMenuRef,
5906
5915
  setShow: () => setYearMenuOpen(false),
5907
- children: years.map((y) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5916
+ children: years.map((y) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5908
5917
  MenuOption,
5909
5918
  {
5910
5919
  selected: baseMonth.year === y,
@@ -5919,7 +5928,7 @@ function CalendarPane({
5919
5928
  }
5920
5929
  )
5921
5930
  ] }),
5922
- (mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5931
+ (mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5923
5932
  "button",
5924
5933
  {
5925
5934
  id: id ? `${id}-next-month-button` : void 0,
@@ -5931,13 +5940,13 @@ function CalendarPane({
5931
5940
  ),
5932
5941
  "aria-label": "Next month",
5933
5942
  onClick: () => setBaseMonth(baseMonth.add({ months: 1 })),
5934
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon, { name: "chevron_right", size: 24 })
5943
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { name: "chevron_right", size: 24 })
5935
5944
  }
5936
- ) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: (0, import_clsx42.default)(componentPadding, "ml-1") })
5945
+ ) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: (0, import_clsx42.default)(componentPadding, "ml-1") })
5937
5946
  ]
5938
5947
  }
5939
5948
  ),
5940
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: (0, import_clsx42.default)("grid grid-cols-7"), children: weekDays.map((d) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5949
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: (0, import_clsx42.default)("grid grid-cols-7"), children: weekDays.map((d) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5941
5950
  "span",
5942
5951
  {
5943
5952
  className: (0, import_clsx42.default)(
@@ -5949,7 +5958,7 @@ function CalendarPane({
5949
5958
  },
5950
5959
  d
5951
5960
  )) }),
5952
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: (0, import_clsx42.default)("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
5961
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: (0, import_clsx42.default)("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
5953
5962
  const day = i - emptyCells + 1;
5954
5963
  const date = month.date.with({ day: 1 }).add({
5955
5964
  days: i - emptyCells
@@ -5963,7 +5972,7 @@ function CalendarPane({
5963
5972
  const hoverDateIsAfterPendingFrom = hoveredDate && pendingFrom && import_polyfill.Temporal.PlainDate.compare(hoveredDate, pendingFrom) >= 0;
5964
5973
  const isRangeStart = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && fromDate && date.equals(fromDate) || hoverDateIsAfterPendingFrom && date.equals(pendingFrom);
5965
5974
  const isRangeEnd = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && toDate && date.equals(toDate) || hoverDateIsBeforePendingFrom && date.equals(pendingFrom);
5966
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5975
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5967
5976
  DateCell,
5968
5977
  {
5969
5978
  id: id ? `${id}-date-${date.toString()}` : void 0,
@@ -5988,7 +5997,7 @@ function CalendarPane({
5988
5997
  ]
5989
5998
  }
5990
5999
  ),
5991
- mode === "double" && idx === 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
6000
+ mode === "double" && idx === 0 && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5992
6001
  "div",
5993
6002
  {
5994
6003
  className: (0, import_clsx42.default)(
@@ -6002,7 +6011,7 @@ function CalendarPane({
6002
6011
  }
6003
6012
 
6004
6013
  // src/components/DateRangeInput.tsx
6005
- var import_jsx_runtime66 = require("react/jsx-runtime");
6014
+ var import_jsx_runtime67 = require("react/jsx-runtime");
6006
6015
  var DateRangeInput = (_a) => {
6007
6016
  var _b = _a, {
6008
6017
  id,
@@ -6031,19 +6040,19 @@ var DateRangeInput = (_a) => {
6031
6040
  "isDateAvailable",
6032
6041
  "onPendingFromChange"
6033
6042
  ]);
6034
- const [visible, setVisible] = (0, import_react39.useState)(false);
6035
- const [inputValue, setInputValue] = (0, import_react39.useState)("");
6036
- const [isTyping, setIsTyping] = (0, import_react39.useState)(false);
6037
- const popoverRef = (0, import_react39.useRef)(null);
6038
- const rootRef = (0, import_react39.useRef)(null);
6039
- const triggerRef = (0, import_react39.useRef)(null);
6040
- const [calendarPosition, setCalendarPosition] = (0, import_react39.useState)({
6043
+ const [visible, setVisible] = (0, import_react40.useState)(false);
6044
+ const [inputValue, setInputValue] = (0, import_react40.useState)("");
6045
+ const [isTyping, setIsTyping] = (0, import_react40.useState)(false);
6046
+ const popoverRef = (0, import_react40.useRef)(null);
6047
+ const rootRef = (0, import_react40.useRef)(null);
6048
+ const triggerRef = (0, import_react40.useRef)(null);
6049
+ const [calendarPosition, setCalendarPosition] = (0, import_react40.useState)({
6041
6050
  top: 0,
6042
6051
  left: 0,
6043
6052
  width: 0
6044
6053
  });
6045
6054
  const [from, to] = value.split("|");
6046
- (0, import_react39.useEffect)(() => {
6055
+ (0, import_react40.useEffect)(() => {
6047
6056
  if (!isTyping) {
6048
6057
  const displayValue = formatDisplayValue2(from, to);
6049
6058
  if (displayValue) {
@@ -6051,7 +6060,7 @@ var DateRangeInput = (_a) => {
6051
6060
  }
6052
6061
  }
6053
6062
  }, [from, to, isTyping, disableRange]);
6054
- (0, import_react39.useLayoutEffect)(() => {
6063
+ (0, import_react40.useLayoutEffect)(() => {
6055
6064
  if (visible) {
6056
6065
  updatePosition();
6057
6066
  }
@@ -6066,7 +6075,7 @@ var DateRangeInput = (_a) => {
6066
6075
  });
6067
6076
  }
6068
6077
  };
6069
- (0, import_react39.useEffect)(() => {
6078
+ (0, import_react40.useEffect)(() => {
6070
6079
  updatePosition();
6071
6080
  const resizeObserver = new ResizeObserver(updatePosition);
6072
6081
  if (triggerRef.current) {
@@ -6078,7 +6087,7 @@ var DateRangeInput = (_a) => {
6078
6087
  window.removeEventListener("scroll", updatePosition);
6079
6088
  };
6080
6089
  }, []);
6081
- (0, import_react39.useEffect)(() => {
6090
+ (0, import_react40.useEffect)(() => {
6082
6091
  const handleKeyDown2 = (event) => {
6083
6092
  var _a2;
6084
6093
  if (event.key === "Escape" && popoverRef.current) {
@@ -6091,7 +6100,7 @@ var DateRangeInput = (_a) => {
6091
6100
  document.removeEventListener("keydown", handleKeyDown2);
6092
6101
  };
6093
6102
  }, []);
6094
- (0, import_react39.useEffect)(() => {
6103
+ (0, import_react40.useEffect)(() => {
6095
6104
  const handleClickOutside = (event) => {
6096
6105
  if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
6097
6106
  setVisible(false);
@@ -6426,8 +6435,8 @@ var DateRangeInput = (_a) => {
6426
6435
  }
6427
6436
  }
6428
6437
  };
6429
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
6430
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6438
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
6439
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
6431
6440
  InputBase,
6432
6441
  __spreadProps(__spreadValues({
6433
6442
  id,
@@ -6441,7 +6450,7 @@ var DateRangeInput = (_a) => {
6441
6450
  placeholder: disableRange ? "MM/DD/YYYY" : placeholder,
6442
6451
  disabled,
6443
6452
  readOnly,
6444
- after: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { name: "calendar_month" }),
6453
+ after: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Icon, { name: "calendar_month" }),
6445
6454
  onFocus: handleFocus,
6446
6455
  onClick: handleClick,
6447
6456
  onChange: handleInputChange,
@@ -6452,7 +6461,7 @@ var DateRangeInput = (_a) => {
6452
6461
  })
6453
6462
  ),
6454
6463
  visible && !readOnly && (0, import_react_dom5.createPortal)(
6455
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6464
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
6456
6465
  "div",
6457
6466
  {
6458
6467
  ref: (el) => {
@@ -6464,7 +6473,7 @@ var DateRangeInput = (_a) => {
6464
6473
  left: `${calendarPosition.left}px`,
6465
6474
  minWidth: `${calendarPosition.width}px`
6466
6475
  },
6467
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6476
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
6468
6477
  CalendarRange,
6469
6478
  {
6470
6479
  id: id ? `${id}-calendar` : void 0,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CalendarRange
3
- } from "../chunk-LKFYNRJZ.js";
3
+ } from "../chunk-3JQPFWKR.js";
4
4
  import "../chunk-CJ7V4X6B.js";
5
5
  import "../chunk-M7INAUAJ.js";
6
6
  import "../chunk-7ZCXZDJD.js";
@@ -14,8 +14,8 @@ import "../chunk-2IKT6IHB.js";
14
14
  import "../chunk-RZ5EIDX4.js";
15
15
  import "../chunk-AGHBLWDZ.js";
16
16
  import "../chunk-5IFPG6TS.js";
17
- import "../chunk-M4FM3B3R.js";
18
17
  import "../chunk-AJ5M6MVX.js";
18
+ import "../chunk-M4FM3B3R.js";
19
19
  import "../chunk-AT4AWD6B.js";
20
20
  import "../chunk-EWGHVZL5.js";
21
21
  import "../chunk-I5BV7UPG.js";
@@ -32,6 +32,7 @@ import "../chunk-EJOPJIRO.js";
32
32
  import "../chunk-AG43RS4Q.js";
33
33
  import "../chunk-QVWYTQKL.js";
34
34
  import "../chunk-UAMI54FE.js";
35
+ import "../chunk-6MGHIYMP.js";
35
36
  import "../chunk-75USUR3I.js";
36
37
  import "../chunk-BWPNXY7T.js";
37
38
  import "../chunk-DWKS5ZXG.js";
@@ -39,7 +39,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
39
39
  var EditingContext_exports = {};
40
40
  __export(EditingContext_exports, {
41
41
  EditingContext: () => EditingContext,
42
- EditingProvider: () => EditingProvider
42
+ EditingProvider: () => EditingProvider,
43
+ useTableEditingContext: () => useTableEditingContext
43
44
  });
44
45
  module.exports = __toCommonJS(EditingContext_exports);
45
46
  var import_react = require("react");
@@ -68,8 +69,13 @@ var EditingProvider = ({
68
69
  };
69
70
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EditingContext, { value: context, children });
70
71
  };
72
+ var useTableEditingContext = () => {
73
+ const context = (0, import_react.useContext)(EditingContext);
74
+ return context;
75
+ };
71
76
  // Annotate the CommonJS export names for ESM import in node:
72
77
  0 && (module.exports = {
73
78
  EditingContext,
74
- EditingProvider
79
+ EditingProvider,
80
+ useTableEditingContext
75
81
  });
@@ -1,37 +1,12 @@
1
1
  "use client";
2
2
  import {
3
- __spreadProps,
4
- __spreadValues
5
- } from "../chunk-ORMEWXMH.js";
6
-
7
- // src/components/EditingContext.tsx
8
- import { createContext, useState } from "react";
9
- import { jsx } from "react/jsx-runtime";
10
- var EditingContext = createContext({
11
- data: [],
12
- setData: () => {
13
- }
14
- });
15
- var EditingProvider = ({
16
- data,
17
- children
18
- }) => {
19
- const [actual, setData] = useState(data);
20
- const context = {
21
- data: actual,
22
- setData: (row, key, value) => {
23
- setData((prev) => {
24
- const newData = [...prev];
25
- newData[row] = __spreadProps(__spreadValues({}, newData[row]), {
26
- [key]: value
27
- });
28
- return newData;
29
- });
30
- }
31
- };
32
- return /* @__PURE__ */ jsx(EditingContext, { value: context, children });
33
- };
3
+ EditingContext,
4
+ EditingProvider,
5
+ useTableEditingContext
6
+ } from "../chunk-6MGHIYMP.js";
7
+ import "../chunk-ORMEWXMH.js";
34
8
  export {
35
9
  EditingContext,
36
- EditingProvider
10
+ EditingProvider,
11
+ useTableEditingContext
37
12
  };
@@ -3,8 +3,8 @@ import {
3
3
  } from "../../chunk-RZ5EIDX4.js";
4
4
  import "../../chunk-AGHBLWDZ.js";
5
5
  import "../../chunk-5IFPG6TS.js";
6
- import "../../chunk-M4FM3B3R.js";
7
6
  import "../../chunk-AJ5M6MVX.js";
7
+ import "../../chunk-M4FM3B3R.js";
8
8
  import "../../chunk-M7WHWZ2J.js";
9
9
  import "../../chunk-VXWSAIB5.js";
10
10
  import "../../chunk-DQRQZE6O.js";