@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
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  DataGrid,
4
4
  DataGrid_default
5
- } from "../../chunk-LKFYNRJZ.js";
5
+ } from "../../chunk-3JQPFWKR.js";
6
6
  import "../../chunk-CJ7V4X6B.js";
7
7
  import "../../chunk-M7INAUAJ.js";
8
8
  import "../../chunk-7ZCXZDJD.js";
@@ -16,8 +16,8 @@ import "../../chunk-2IKT6IHB.js";
16
16
  import "../../chunk-RZ5EIDX4.js";
17
17
  import "../../chunk-AGHBLWDZ.js";
18
18
  import "../../chunk-5IFPG6TS.js";
19
- import "../../chunk-M4FM3B3R.js";
20
19
  import "../../chunk-AJ5M6MVX.js";
20
+ import "../../chunk-M4FM3B3R.js";
21
21
  import "../../chunk-AT4AWD6B.js";
22
22
  import "../../chunk-EWGHVZL5.js";
23
23
  import "../../chunk-I5BV7UPG.js";
@@ -34,6 +34,7 @@ import "../../chunk-EJOPJIRO.js";
34
34
  import "../../chunk-AG43RS4Q.js";
35
35
  import "../../chunk-QVWYTQKL.js";
36
36
  import "../../chunk-UAMI54FE.js";
37
+ import "../../chunk-6MGHIYMP.js";
37
38
  import "../../chunk-75USUR3I.js";
38
39
  import "../../chunk-BWPNXY7T.js";
39
40
  import "../../chunk-DWKS5ZXG.js";
@@ -5840,12 +5840,21 @@ var import_jsx_runtime60 = require("react/jsx-runtime");
5840
5840
  // src/components/OrderCheckIcon.tsx
5841
5841
  var import_jsx_runtime61 = require("react/jsx-runtime");
5842
5842
 
5843
+ // src/components/EditingContext.tsx
5844
+ var import_react38 = require("react");
5845
+ var import_jsx_runtime62 = require("react/jsx-runtime");
5846
+ var EditingContext = (0, import_react38.createContext)({
5847
+ data: [],
5848
+ setData: () => {
5849
+ }
5850
+ });
5851
+
5843
5852
  // src/components/AccessCard.tsx
5844
5853
  var import_clsx40 = __toESM(require("clsx"), 1);
5845
5854
 
5846
5855
  // src/components/Radio.tsx
5847
5856
  var import_clsx39 = __toESM(require("clsx"), 1);
5848
- var import_jsx_runtime62 = require("react/jsx-runtime");
5857
+ var import_jsx_runtime63 = require("react/jsx-runtime");
5849
5858
  var Radio = (_a) => {
5850
5859
  var _b = _a, {
5851
5860
  className,
@@ -5880,7 +5889,7 @@ var Radio = (_a) => {
5880
5889
  const readonlyClassName = (0, import_clsx39.default)(
5881
5890
  readOnly && "peer-read-only:bg-background-action-secondary-disabled peer-read-only:border-border-primary-normal peer-checked:border-0"
5882
5891
  );
5883
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5892
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
5884
5893
  "label",
5885
5894
  {
5886
5895
  htmlFor: radioId,
@@ -5892,8 +5901,8 @@ var Radio = (_a) => {
5892
5901
  className
5893
5902
  ),
5894
5903
  children: [
5895
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "relative", children: [
5896
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5904
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "relative", children: [
5905
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5897
5906
  "input",
5898
5907
  __spreadValues({
5899
5908
  id: radioId,
@@ -5905,7 +5914,7 @@ var Radio = (_a) => {
5905
5914
  readOnly
5906
5915
  }, props)
5907
5916
  ),
5908
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5917
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5909
5918
  "div",
5910
5919
  {
5911
5920
  className: (0, import_clsx39.default)(
@@ -5916,7 +5925,7 @@ var Radio = (_a) => {
5916
5925
  disabledClassName,
5917
5926
  readonlyClassName
5918
5927
  ),
5919
- children: checked && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5928
+ children: checked && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5920
5929
  RadioIcon,
5921
5930
  {
5922
5931
  className: (0, import_clsx39.default)(
@@ -5931,14 +5940,14 @@ var Radio = (_a) => {
5931
5940
  }
5932
5941
  )
5933
5942
  ] }),
5934
- 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 })
5943
+ 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 })
5935
5944
  ]
5936
5945
  }
5937
5946
  );
5938
5947
  };
5939
5948
  Radio.displayName = "Radio";
5940
5949
  var RadioIcon = ({ className }) => {
5941
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5950
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
5942
5951
  "svg",
5943
5952
  {
5944
5953
  className,
@@ -5948,7 +5957,7 @@ var RadioIcon = ({ className }) => {
5948
5957
  viewBox: "0 0 24 24",
5949
5958
  fill: "none",
5950
5959
  children: [
5951
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5960
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5952
5961
  "rect",
5953
5962
  {
5954
5963
  x: "1",
@@ -5960,7 +5969,7 @@ var RadioIcon = ({ className }) => {
5960
5969
  strokeWidth: "2"
5961
5970
  }
5962
5971
  ),
5963
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "4", y: "4", width: "16", height: "16", rx: "8", fill: "currentColor" })
5972
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("rect", { x: "4", y: "4", width: "16", height: "16", rx: "8", fill: "currentColor" })
5964
5973
  ]
5965
5974
  }
5966
5975
  );
@@ -5968,24 +5977,24 @@ var RadioIcon = ({ className }) => {
5968
5977
  RadioIcon.displayName = "RadioIcon";
5969
5978
 
5970
5979
  // src/components/AccessCard.tsx
5971
- var import_jsx_runtime63 = require("react/jsx-runtime");
5980
+ var import_jsx_runtime64 = require("react/jsx-runtime");
5972
5981
 
5973
5982
  // src/components/AccessCardGroup.tsx
5974
5983
  var import_clsx41 = __toESM(require("clsx"), 1);
5975
- var import_react38 = require("react");
5976
- var import_jsx_runtime64 = require("react/jsx-runtime");
5984
+ var import_react39 = require("react");
5985
+ var import_jsx_runtime65 = require("react/jsx-runtime");
5977
5986
 
5978
5987
  // src/components/DataGrid/utils.tsx
5979
- var import_jsx_runtime65 = require("react/jsx-runtime");
5988
+ var import_jsx_runtime66 = require("react/jsx-runtime");
5980
5989
  function getSortIcon(sort, nextSort = false) {
5981
5990
  const iconClassName = (0, import_clsx42.default)(
5982
5991
  "text-icon-on-action-primary-normal",
5983
5992
  nextSort && "hidden group-hover:block"
5984
5993
  );
5985
5994
  if (sort === "asc")
5986
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon, { size: 16, className: iconClassName, name: "arrow_upward" });
5995
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { size: 16, className: iconClassName, name: "arrow_upward" });
5987
5996
  if (sort === "desc")
5988
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon, { size: 16, className: iconClassName, name: "arrow_downward" });
5997
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { size: 16, className: iconClassName, name: "arrow_downward" });
5989
5998
  return null;
5990
5999
  }
5991
6000
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getSortIcon
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";
@@ -62,7 +62,7 @@ __export(DateInput_exports, {
62
62
  DateInput: () => DateInput
63
63
  });
64
64
  module.exports = __toCommonJS(DateInput_exports);
65
- var import_react38 = require("react");
65
+ var import_react39 = require("react");
66
66
  var import_react_dom4 = 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_react37 = __toESM(require("react"), 1);
837
+ var import_react38 = __toESM(require("react"), 1);
838
838
  var import_polyfill = require("@js-temporal/polyfill");
839
839
 
840
840
  // src/components/DataGridCell.tsx
@@ -5163,12 +5163,21 @@ var import_jsx_runtime59 = require("react/jsx-runtime");
5163
5163
  // src/components/OrderCheckIcon.tsx
5164
5164
  var import_jsx_runtime60 = require("react/jsx-runtime");
5165
5165
 
5166
+ // src/components/EditingContext.tsx
5167
+ var import_react36 = require("react");
5168
+ var import_jsx_runtime61 = require("react/jsx-runtime");
5169
+ var EditingContext = (0, import_react36.createContext)({
5170
+ data: [],
5171
+ setData: () => {
5172
+ }
5173
+ });
5174
+
5166
5175
  // src/components/AccessCard.tsx
5167
5176
  var import_clsx40 = __toESM(require("clsx"), 1);
5168
5177
 
5169
5178
  // src/components/Radio.tsx
5170
5179
  var import_clsx39 = __toESM(require("clsx"), 1);
5171
- var import_jsx_runtime61 = require("react/jsx-runtime");
5180
+ var import_jsx_runtime62 = require("react/jsx-runtime");
5172
5181
  var Radio = (_a) => {
5173
5182
  var _b = _a, {
5174
5183
  className,
@@ -5203,7 +5212,7 @@ var Radio = (_a) => {
5203
5212
  const readonlyClassName = (0, import_clsx39.default)(
5204
5213
  readOnly && "peer-read-only:bg-background-action-secondary-disabled peer-read-only:border-border-primary-normal peer-checked:border-0"
5205
5214
  );
5206
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
5215
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5207
5216
  "label",
5208
5217
  {
5209
5218
  htmlFor: radioId,
@@ -5215,8 +5224,8 @@ var Radio = (_a) => {
5215
5224
  className
5216
5225
  ),
5217
5226
  children: [
5218
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "relative", children: [
5219
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5227
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "relative", children: [
5228
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5220
5229
  "input",
5221
5230
  __spreadValues({
5222
5231
  id: radioId,
@@ -5228,7 +5237,7 @@ var Radio = (_a) => {
5228
5237
  readOnly
5229
5238
  }, props)
5230
5239
  ),
5231
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5240
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5232
5241
  "div",
5233
5242
  {
5234
5243
  className: (0, import_clsx39.default)(
@@ -5239,7 +5248,7 @@ var Radio = (_a) => {
5239
5248
  disabledClassName,
5240
5249
  readonlyClassName
5241
5250
  ),
5242
- children: checked && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5251
+ children: checked && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5243
5252
  RadioIcon,
5244
5253
  {
5245
5254
  className: (0, import_clsx39.default)(
@@ -5254,14 +5263,14 @@ var Radio = (_a) => {
5254
5263
  }
5255
5264
  )
5256
5265
  ] }),
5257
- label && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Paragraph, { id: radioId ? `${radioId}-label` : void 0, testid: testid ? `${testid}-label` : void 0, padded: true, color: paragraphColor, children: label })
5266
+ 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 })
5258
5267
  ]
5259
5268
  }
5260
5269
  );
5261
5270
  };
5262
5271
  Radio.displayName = "Radio";
5263
5272
  var RadioIcon = ({ className }) => {
5264
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
5273
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5265
5274
  "svg",
5266
5275
  {
5267
5276
  className,
@@ -5271,7 +5280,7 @@ var RadioIcon = ({ className }) => {
5271
5280
  viewBox: "0 0 24 24",
5272
5281
  fill: "none",
5273
5282
  children: [
5274
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5283
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5275
5284
  "rect",
5276
5285
  {
5277
5286
  x: "1",
@@ -5283,7 +5292,7 @@ var RadioIcon = ({ className }) => {
5283
5292
  strokeWidth: "2"
5284
5293
  }
5285
5294
  ),
5286
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("rect", { x: "4", y: "4", width: "16", height: "16", rx: "8", fill: "currentColor" })
5295
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("rect", { x: "4", y: "4", width: "16", height: "16", rx: "8", fill: "currentColor" })
5287
5296
  ]
5288
5297
  }
5289
5298
  );
@@ -5291,15 +5300,15 @@ var RadioIcon = ({ className }) => {
5291
5300
  RadioIcon.displayName = "RadioIcon";
5292
5301
 
5293
5302
  // src/components/AccessCard.tsx
5294
- var import_jsx_runtime62 = require("react/jsx-runtime");
5303
+ var import_jsx_runtime63 = require("react/jsx-runtime");
5295
5304
 
5296
5305
  // src/components/AccessCardGroup.tsx
5297
5306
  var import_clsx41 = __toESM(require("clsx"), 1);
5298
- var import_react36 = require("react");
5299
- var import_jsx_runtime63 = require("react/jsx-runtime");
5307
+ var import_react37 = require("react");
5308
+ var import_jsx_runtime64 = require("react/jsx-runtime");
5300
5309
 
5301
5310
  // src/components/CalendarRange.tsx
5302
- var import_jsx_runtime64 = require("react/jsx-runtime");
5311
+ var import_jsx_runtime65 = require("react/jsx-runtime");
5303
5312
  function DateCell(_a) {
5304
5313
  var _b = _a, {
5305
5314
  date,
@@ -5334,7 +5343,7 @@ function DateCell(_a) {
5334
5343
  "id",
5335
5344
  "testid"
5336
5345
  ]);
5337
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5346
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5338
5347
  "span",
5339
5348
  __spreadProps(__spreadValues({}, props), {
5340
5349
  id,
@@ -5410,20 +5419,20 @@ function CalendarRange({
5410
5419
  const fromDate = parseDate(from);
5411
5420
  const toDate = parseDate(to);
5412
5421
  const today = import_polyfill.Temporal.Now.plainDateISO();
5413
- const [baseMonth, setBaseMonth] = (0, import_react37.useState)(
5422
+ const [baseMonth, setBaseMonth] = (0, import_react38.useState)(
5414
5423
  fromDate != null ? fromDate : today.with({ day: 1 })
5415
5424
  );
5416
- const [selecting, setSelecting] = (0, import_react37.useState)("from");
5417
- const [pendingFrom, setPendingFrom] = (0, import_react37.useState)(void 0);
5418
- const [hoveredDate, setHoveredDate] = (0, import_react37.useState)(void 0);
5419
- (0, import_react37.useEffect)(() => {
5425
+ const [selecting, setSelecting] = (0, import_react38.useState)("from");
5426
+ const [pendingFrom, setPendingFrom] = (0, import_react38.useState)(void 0);
5427
+ const [hoveredDate, setHoveredDate] = (0, import_react38.useState)(void 0);
5428
+ (0, import_react38.useEffect)(() => {
5420
5429
  if (fromDate) {
5421
5430
  setBaseMonth(fromDate.with({ day: 1 }));
5422
5431
  } else if (toDate) {
5423
5432
  setBaseMonth(toDate.with({ day: 1 }));
5424
5433
  }
5425
5434
  }, [from, to]);
5426
- (0, import_react37.useEffect)(() => {
5435
+ (0, import_react38.useEffect)(() => {
5427
5436
  if (fromDate && toDate) {
5428
5437
  setSelecting("from");
5429
5438
  setPendingFrom(void 0);
@@ -5490,7 +5499,7 @@ function CalendarRange({
5490
5499
  }
5491
5500
  return false;
5492
5501
  }
5493
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5502
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5494
5503
  "div",
5495
5504
  {
5496
5505
  id,
@@ -5503,7 +5512,7 @@ function CalendarRange({
5503
5512
  // baseTransition,
5504
5513
  "overflow-hidden"
5505
5514
  ),
5506
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5515
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5507
5516
  "div",
5508
5517
  {
5509
5518
  className: (0, import_clsx42.default)(
@@ -5511,7 +5520,7 @@ function CalendarRange({
5511
5520
  layoutGap
5512
5521
  ),
5513
5522
  children: (mode === "double" ? [0, 1] : [0]).map((offset, idx) => {
5514
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5523
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5515
5524
  CalendarPane,
5516
5525
  {
5517
5526
  getMonthData,
@@ -5569,20 +5578,20 @@ function CalendarPane({
5569
5578
  const years = Array.from({ length: 100 }).map(
5570
5579
  (_, i) => baseMonth.year - 50 + i
5571
5580
  );
5572
- const [monthMenuOpen, setMonthMenuOpen] = (0, import_react37.useState)(false);
5573
- const [yearMenuOpen, setYearMenuOpen] = (0, import_react37.useState)(false);
5574
- const monthMenuRef = (0, import_react37.useRef)(null);
5575
- const yearMenuRef = (0, import_react37.useRef)(null);
5581
+ const [monthMenuOpen, setMonthMenuOpen] = (0, import_react38.useState)(false);
5582
+ const [yearMenuOpen, setYearMenuOpen] = (0, import_react38.useState)(false);
5583
+ const monthMenuRef = (0, import_react38.useRef)(null);
5584
+ const yearMenuRef = (0, import_react38.useRef)(null);
5576
5585
  const month = getMonthData(offset);
5577
5586
  const totalCells = 42;
5578
5587
  const emptyCells = month.firstDayOffset;
5579
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_react37.default.Fragment, { children: [
5580
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
5588
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react38.default.Fragment, { children: [
5589
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
5581
5590
  "div",
5582
5591
  {
5583
5592
  className: (0, import_clsx42.default)("flex flex-col"),
5584
5593
  children: [
5585
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
5594
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
5586
5595
  "div",
5587
5596
  {
5588
5597
  className: (0, import_clsx42.default)(
@@ -5591,7 +5600,7 @@ function CalendarPane({
5591
5600
  "text-text-action-primary-normal"
5592
5601
  ),
5593
5602
  children: [
5594
- idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5603
+ idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5595
5604
  "button",
5596
5605
  {
5597
5606
  id: id ? `${id}-prev-month-button` : void 0,
@@ -5603,11 +5612,11 @@ function CalendarPane({
5603
5612
  ),
5604
5613
  "aria-label": "Previous month",
5605
5614
  onClick: () => setBaseMonth(baseMonth.subtract({ months: 1 })),
5606
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Icon, { name: "chevron_left", size: 24 })
5615
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon, { name: "chevron_left", size: 24 })
5607
5616
  }
5608
- ) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: (0, import_clsx42.default)(componentPadding, "mr-1") }),
5609
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex gap-desktop-compact-component-padding", children: [
5610
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5617
+ ) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: (0, import_clsx42.default)(componentPadding, "mr-1") }),
5618
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex gap-desktop-compact-component-padding", children: [
5619
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5611
5620
  "button",
5612
5621
  {
5613
5622
  ref: (el) => {
@@ -5622,13 +5631,13 @@ function CalendarPane({
5622
5631
  children: month.name
5623
5632
  }
5624
5633
  ),
5625
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5634
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5626
5635
  Menu,
5627
5636
  {
5628
5637
  show: monthMenuOpen,
5629
5638
  positionTo: monthMenuRef,
5630
5639
  setShow: () => setMonthMenuOpen(false),
5631
- children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5640
+ children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5632
5641
  MenuOption,
5633
5642
  {
5634
5643
  selected: baseMonth.month === x + 1,
@@ -5642,7 +5651,7 @@ function CalendarPane({
5642
5651
  ))
5643
5652
  }
5644
5653
  ),
5645
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5654
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5646
5655
  "button",
5647
5656
  {
5648
5657
  ref: (el) => {
@@ -5657,13 +5666,13 @@ function CalendarPane({
5657
5666
  children: month.year
5658
5667
  }
5659
5668
  ),
5660
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5669
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5661
5670
  Menu,
5662
5671
  {
5663
5672
  show: yearMenuOpen,
5664
5673
  positionTo: yearMenuRef,
5665
5674
  setShow: () => setYearMenuOpen(false),
5666
- children: years.map((y) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5675
+ children: years.map((y) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5667
5676
  MenuOption,
5668
5677
  {
5669
5678
  selected: baseMonth.year === y,
@@ -5678,7 +5687,7 @@ function CalendarPane({
5678
5687
  }
5679
5688
  )
5680
5689
  ] }),
5681
- (mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5690
+ (mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5682
5691
  "button",
5683
5692
  {
5684
5693
  id: id ? `${id}-next-month-button` : void 0,
@@ -5690,13 +5699,13 @@ function CalendarPane({
5690
5699
  ),
5691
5700
  "aria-label": "Next month",
5692
5701
  onClick: () => setBaseMonth(baseMonth.add({ months: 1 })),
5693
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Icon, { name: "chevron_right", size: 24 })
5702
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon, { name: "chevron_right", size: 24 })
5694
5703
  }
5695
- ) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: (0, import_clsx42.default)(componentPadding, "ml-1") })
5704
+ ) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: (0, import_clsx42.default)(componentPadding, "ml-1") })
5696
5705
  ]
5697
5706
  }
5698
5707
  ),
5699
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: (0, import_clsx42.default)("grid grid-cols-7"), children: weekDays.map((d) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5708
+ /* @__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)(
5700
5709
  "span",
5701
5710
  {
5702
5711
  className: (0, import_clsx42.default)(
@@ -5708,7 +5717,7 @@ function CalendarPane({
5708
5717
  },
5709
5718
  d
5710
5719
  )) }),
5711
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: (0, import_clsx42.default)("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
5720
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: (0, import_clsx42.default)("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
5712
5721
  const day = i - emptyCells + 1;
5713
5722
  const date = month.date.with({ day: 1 }).add({
5714
5723
  days: i - emptyCells
@@ -5722,7 +5731,7 @@ function CalendarPane({
5722
5731
  const hoverDateIsAfterPendingFrom = hoveredDate && pendingFrom && import_polyfill.Temporal.PlainDate.compare(hoveredDate, pendingFrom) >= 0;
5723
5732
  const isRangeStart = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && fromDate && date.equals(fromDate) || hoverDateIsAfterPendingFrom && date.equals(pendingFrom);
5724
5733
  const isRangeEnd = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && toDate && date.equals(toDate) || hoverDateIsBeforePendingFrom && date.equals(pendingFrom);
5725
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5734
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5726
5735
  DateCell,
5727
5736
  {
5728
5737
  id: id ? `${id}-date-${date.toString()}` : void 0,
@@ -5747,7 +5756,7 @@ function CalendarPane({
5747
5756
  ]
5748
5757
  }
5749
5758
  ),
5750
- mode === "double" && idx === 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5759
+ mode === "double" && idx === 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5751
5760
  "div",
5752
5761
  {
5753
5762
  className: (0, import_clsx42.default)(
@@ -5761,7 +5770,7 @@ function CalendarPane({
5761
5770
  }
5762
5771
 
5763
5772
  // src/components/DateInput.tsx
5764
- var import_jsx_runtime65 = require("react/jsx-runtime");
5773
+ var import_jsx_runtime66 = require("react/jsx-runtime");
5765
5774
  var DateInput = (_a) => {
5766
5775
  var _b = _a, {
5767
5776
  id,
@@ -5784,24 +5793,24 @@ var DateInput = (_a) => {
5784
5793
  "label",
5785
5794
  "isDateAvailable"
5786
5795
  ]);
5787
- const [visible, setVisible] = (0, import_react38.useState)(false);
5788
- const [inputValue, setInputValue] = (0, import_react38.useState)("");
5789
- const [isTyping, setIsTyping] = (0, import_react38.useState)(false);
5790
- const popoverRef = (0, import_react38.useRef)(null);
5791
- const triggerRef = (0, import_react38.useRef)(null);
5792
- const rootRef = (0, import_react38.useRef)(null);
5793
- const [calendarPosition, setCalendarPosition] = (0, import_react38.useState)({
5796
+ const [visible, setVisible] = (0, import_react39.useState)(false);
5797
+ const [inputValue, setInputValue] = (0, import_react39.useState)("");
5798
+ const [isTyping, setIsTyping] = (0, import_react39.useState)(false);
5799
+ const popoverRef = (0, import_react39.useRef)(null);
5800
+ const triggerRef = (0, import_react39.useRef)(null);
5801
+ const rootRef = (0, import_react39.useRef)(null);
5802
+ const [calendarPosition, setCalendarPosition] = (0, import_react39.useState)({
5794
5803
  top: 0,
5795
5804
  left: 0,
5796
5805
  width: 0
5797
5806
  });
5798
5807
  const [from, to] = [value, ""];
5799
- (0, import_react38.useEffect)(() => {
5808
+ (0, import_react39.useEffect)(() => {
5800
5809
  if (!isTyping) {
5801
5810
  setInputValue(formatDisplayValue(from));
5802
5811
  }
5803
5812
  }, [from, isTyping]);
5804
- (0, import_react38.useLayoutEffect)(() => {
5813
+ (0, import_react39.useLayoutEffect)(() => {
5805
5814
  if (visible) {
5806
5815
  updatePosition();
5807
5816
  }
@@ -5816,7 +5825,7 @@ var DateInput = (_a) => {
5816
5825
  });
5817
5826
  }
5818
5827
  };
5819
- (0, import_react38.useEffect)(() => {
5828
+ (0, import_react39.useEffect)(() => {
5820
5829
  updatePosition();
5821
5830
  const resizeObserver = new ResizeObserver(updatePosition);
5822
5831
  if (triggerRef.current) {
@@ -5828,7 +5837,7 @@ var DateInput = (_a) => {
5828
5837
  window.removeEventListener("scroll", updatePosition);
5829
5838
  };
5830
5839
  }, []);
5831
- (0, import_react38.useEffect)(() => {
5840
+ (0, import_react39.useEffect)(() => {
5832
5841
  const handleKeyDown2 = (event) => {
5833
5842
  var _a2;
5834
5843
  if (event.key === "Escape" && popoverRef.current) {
@@ -5841,7 +5850,7 @@ var DateInput = (_a) => {
5841
5850
  document.removeEventListener("keydown", handleKeyDown2);
5842
5851
  };
5843
5852
  });
5844
- (0, import_react38.useEffect)(() => {
5853
+ (0, import_react39.useEffect)(() => {
5845
5854
  const handleClickOutside = (event) => {
5846
5855
  if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
5847
5856
  setVisible(false);
@@ -5922,8 +5931,8 @@ var DateInput = (_a) => {
5922
5931
  }
5923
5932
  }
5924
5933
  };
5925
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "relative", children: [
5926
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5934
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "relative", children: [
5935
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5927
5936
  InputBase,
5928
5937
  __spreadProps(__spreadValues({
5929
5938
  id,
@@ -5937,7 +5946,7 @@ var DateInput = (_a) => {
5937
5946
  placeholder,
5938
5947
  disabled,
5939
5948
  readOnly,
5940
- after: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Icon, { name: "calendar_month" }),
5949
+ after: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon, { name: "calendar_month" }),
5941
5950
  onFocus: handleFocus,
5942
5951
  onClick: handleClick,
5943
5952
  onChange: handleInputChange,
@@ -5948,7 +5957,7 @@ var DateInput = (_a) => {
5948
5957
  })
5949
5958
  ),
5950
5959
  visible && !readOnly && (0, import_react_dom4.createPortal)(
5951
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5960
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5952
5961
  "div",
5953
5962
  {
5954
5963
  ref: (el) => {
@@ -5960,7 +5969,7 @@ var DateInput = (_a) => {
5960
5969
  left: `${calendarPosition.left}px`,
5961
5970
  minWidth: `${calendarPosition.width}px`
5962
5971
  },
5963
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5972
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5964
5973
  CalendarRange,
5965
5974
  {
5966
5975
  id: id ? `${id}-calendar` : void 0,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DateInput
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";