@dmsi/wedgekit-react 0.0.475 → 0.0.477

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 (77) hide show
  1. package/dist/{chunk-IG2YUDHI.js → chunk-24K4HHV5.js} +4 -4
  2. package/dist/{chunk-OEMLNGE2.js → chunk-4Q7T4GJ2.js} +2 -2
  3. package/dist/chunk-4UH72JT2.js +104 -0
  4. package/dist/{chunk-KJNK7KEV.js → chunk-QMSPTD6L.js} +1 -1
  5. package/dist/{chunk-GTPSPGSJ.js → chunk-WIDUWFLX.js} +761 -47
  6. package/dist/components/Accordion.js +2 -2
  7. package/dist/components/Alert.cjs +787 -0
  8. package/dist/components/Alert.js +13 -0
  9. package/dist/components/CalendarRange.cjs +465 -160
  10. package/dist/components/CalendarRange.css +3 -0
  11. package/dist/components/CalendarRange.js +19 -19
  12. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +918 -148
  13. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +3 -0
  14. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +19 -18
  15. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +928 -158
  16. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +3 -0
  17. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +19 -18
  18. package/dist/components/DataGrid/PinnedColumns.cjs +943 -173
  19. package/dist/components/DataGrid/PinnedColumns.css +3 -0
  20. package/dist/components/DataGrid/PinnedColumns.js +19 -18
  21. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +919 -149
  22. package/dist/components/DataGrid/TableBody/LoadingCell.css +3 -0
  23. package/dist/components/DataGrid/TableBody/LoadingCell.js +19 -18
  24. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +925 -155
  25. package/dist/components/DataGrid/TableBody/TableBodyRow.css +3 -0
  26. package/dist/components/DataGrid/TableBody/TableBodyRow.js +19 -18
  27. package/dist/components/DataGrid/TableBody/index.cjs +940 -170
  28. package/dist/components/DataGrid/TableBody/index.css +3 -0
  29. package/dist/components/DataGrid/TableBody/index.js +19 -18
  30. package/dist/components/DataGrid/index.cjs +1029 -259
  31. package/dist/components/DataGrid/index.css +3 -0
  32. package/dist/components/DataGrid/index.js +19 -18
  33. package/dist/components/DataGrid/utils.cjs +919 -149
  34. package/dist/components/DataGrid/utils.css +3 -0
  35. package/dist/components/DataGrid/utils.js +19 -18
  36. package/dist/components/DataGridCell.js +2 -2
  37. package/dist/components/DateInput.cjs +70 -65
  38. package/dist/components/DateInput.css +3 -0
  39. package/dist/components/DateInput.js +25 -271
  40. package/dist/components/DateRangeInput.cjs +419 -184
  41. package/dist/components/DateRangeInput.css +3 -0
  42. package/dist/components/DateRangeInput.js +19 -19
  43. package/dist/components/FilterGroup.js +6 -6
  44. package/dist/components/MobileDataGrid/ColumnList.js +3 -3
  45. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +925 -155
  46. package/dist/components/MobileDataGrid/ColumnSelector/index.css +3 -0
  47. package/dist/components/MobileDataGrid/ColumnSelector/index.js +19 -18
  48. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +2 -2
  49. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +923 -153
  50. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +3 -0
  51. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +19 -18
  52. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +2 -2
  53. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +6 -6
  54. package/dist/components/MobileDataGrid/index.cjs +973 -203
  55. package/dist/components/MobileDataGrid/index.css +3 -0
  56. package/dist/components/MobileDataGrid/index.js +19 -18
  57. package/dist/components/Modal.js +3 -3
  58. package/dist/components/Notification.js +3 -3
  59. package/dist/components/PDFViewer/PDFNavigation.js +2 -2
  60. package/dist/components/PDFViewer/index.js +6 -6
  61. package/dist/components/SideMenuItem.js +3 -3
  62. package/dist/components/Swatch.js +3 -3
  63. package/dist/components/Upload.js +3 -3
  64. package/dist/components/index.cjs +1212 -363
  65. package/dist/components/index.css +3 -0
  66. package/dist/components/index.js +34 -28
  67. package/dist/index.css +3 -0
  68. package/package.json +1 -1
  69. package/src/components/Alert.tsx +81 -0
  70. package/src/components/index.ts +2 -0
  71. package/dist/chunk-X35NLL3N.js +0 -493
  72. package/dist/{chunk-IT4VFU6T.js → chunk-3DEYCNUE.js} +3 -3
  73. package/dist/{chunk-GTBGPBH6.js → chunk-B53XDCLO.js} +3 -3
  74. package/dist/{chunk-ZQSD74IJ.js → chunk-IY7SXEVY.js} +3 -3
  75. package/dist/{chunk-BFFNSUNS.js → chunk-QBSEKZWX.js} +3 -3
  76. package/dist/{chunk-NIWXVOBW.js → chunk-X67L3NZI.js} +3 -3
  77. package/dist/{chunk-TVXBP5CW.js → chunk-XIXQUEYC.js} +3 -3
@@ -712,7 +712,7 @@ function Theme({
712
712
  }
713
713
 
714
714
  // src/components/MobileDataGrid/ColumnSelector/index.tsx
715
- var import_react36 = require("react");
715
+ var import_react39 = require("react");
716
716
 
717
717
  // src/components/DataGridCell.tsx
718
718
  var import_sortable = require("@dnd-kit/sortable");
@@ -898,6 +898,76 @@ function formatCurrencyDisplay(value) {
898
898
  }
899
899
 
900
900
  // src/utils/date.ts
901
+ function parseInputDate(input) {
902
+ const match = input.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);
903
+ if (!match) {
904
+ return null;
905
+ }
906
+ const [, month, day, year] = match;
907
+ const paddedMonth = month.padStart(2, "0");
908
+ const paddedDay = day.padStart(2, "0");
909
+ return `${year}-${paddedMonth}-${paddedDay}`;
910
+ }
911
+ function isValidDate(dateString) {
912
+ const date = new Date(dateString);
913
+ return date instanceof Date && !isNaN(date.getTime()) && dateString === date.toISOString().split("T")[0];
914
+ }
915
+ function formatInputValue(value) {
916
+ const digits = value.replace(/\D/g, "");
917
+ if (digits.length < 2) {
918
+ return digits;
919
+ }
920
+ if (digits.length >= 4) {
921
+ return `${digits.slice(0, 2)}/${digits.slice(2, 4)}/${digits.slice(4, 8)}`;
922
+ }
923
+ return `${digits.slice(0, 2)}/${digits.slice(2)}`;
924
+ }
925
+ function isDigit(character) {
926
+ return /\d/.test(character);
927
+ }
928
+ function isSlash(character) {
929
+ return character === "/";
930
+ }
931
+ function countDigitsUpToCursor(value, cursorPosition) {
932
+ let digitCount = 0;
933
+ for (let i = 0; i < cursorPosition && i < value.length; i++) {
934
+ if (!isDigit(value[i])) {
935
+ continue;
936
+ }
937
+ digitCount++;
938
+ }
939
+ return digitCount;
940
+ }
941
+ function findPositionAfterDigitCount(formattedValue, targetDigitCount) {
942
+ let currentDigitCount = 0;
943
+ for (let i = 0; i < formattedValue.length; i++) {
944
+ if (!isDigit(formattedValue[i])) {
945
+ continue;
946
+ }
947
+ currentDigitCount++;
948
+ if (currentDigitCount !== targetDigitCount) {
949
+ continue;
950
+ }
951
+ const positionAfterDigit = i + 1;
952
+ const nextCharacter = formattedValue[positionAfterDigit];
953
+ if (nextCharacter && isSlash(nextCharacter)) {
954
+ return positionAfterDigit + 1;
955
+ }
956
+ return positionAfterDigit;
957
+ }
958
+ return formattedValue.length;
959
+ }
960
+ function calculateCursorPosition(originalValue, formattedValue, originalPosition) {
961
+ const targetDigitCount = countDigitsUpToCursor(
962
+ originalValue,
963
+ originalPosition
964
+ );
965
+ const newPosition = findPositionAfterDigitCount(
966
+ formattedValue,
967
+ targetDigitCount
968
+ );
969
+ return Math.min(newPosition, formattedValue.length);
970
+ }
901
971
  function parseDateParts(dateString) {
902
972
  const [yearStr, monthStr, dayStr] = dateString.split("-");
903
973
  if (!yearStr || !monthStr || !dayStr) {
@@ -4358,33 +4428,728 @@ var Tooltip = ({
4358
4428
  };
4359
4429
  Tooltip.displayName = "Tooltip";
4360
4430
 
4361
- // src/components/Accordion.tsx
4362
- var import_clsx22 = __toESM(require("clsx"), 1);
4431
+ // src/components/DateInput.tsx
4432
+ var import_react20 = require("react");
4433
+ var import_react_dom3 = require("react-dom");
4363
4434
 
4364
- // src/components/Card.tsx
4435
+ // src/components/CalendarRange.tsx
4365
4436
  var import_clsx21 = __toESM(require("clsx"), 1);
4437
+ var import_react19 = __toESM(require("react"), 1);
4438
+ var import_polyfill = require("@js-temporal/polyfill");
4366
4439
  var import_jsx_runtime25 = require("react/jsx-runtime");
4440
+ function DateCell(_a) {
4441
+ var _b = _a, {
4442
+ date,
4443
+ isInMonth,
4444
+ isToday,
4445
+ isSelected,
4446
+ inRange,
4447
+ isDisabled,
4448
+ isRangeStart,
4449
+ isRangeEnd,
4450
+ onClick,
4451
+ onMouseEnter,
4452
+ onMouseLeave,
4453
+ cellPadding = "",
4454
+ isRangeDisabled = false,
4455
+ id,
4456
+ testid
4457
+ } = _b, props = __objRest(_b, [
4458
+ "date",
4459
+ "isInMonth",
4460
+ "isToday",
4461
+ "isSelected",
4462
+ "inRange",
4463
+ "isDisabled",
4464
+ "isRangeStart",
4465
+ "isRangeEnd",
4466
+ "onClick",
4467
+ "onMouseEnter",
4468
+ "onMouseLeave",
4469
+ "cellPadding",
4470
+ "isRangeDisabled",
4471
+ "id",
4472
+ "testid"
4473
+ ]);
4474
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4475
+ "span",
4476
+ __spreadProps(__spreadValues({}, props), {
4477
+ id,
4478
+ "data-testid": testid,
4479
+ className: (0, import_clsx21.default)(
4480
+ "flex items-center justify-center aspect-square select-none transition-colors border duration-100 font-medium",
4481
+ typography.caption,
4482
+ cellPadding,
4483
+ !isToday && !isSelected && !inRange && !isDisabled && !isRangeStart && !isRangeEnd && "border-transparent",
4484
+ !isInMonth && "border-transparent",
4485
+ // Today: subtle border ring
4486
+ isToday && !isSelected && !inRange && "rounded-full border-border-primary-normal ",
4487
+ // Selected: Figma blue, white text, strong shadow
4488
+ isSelected && "bg-action-400 text-white border-action-400 z-10",
4489
+ !isSelected && !inRange && "rounded-base",
4490
+ // When range is disabled OR when only 'from' is selected (no range yet), apply rounded corners
4491
+ (isRangeDisabled || !inRange && isSelected) && "rounded-base",
4492
+ inRange && isSelected && "hover:border-action-500",
4493
+ // In range: Figma light blue background
4494
+ inRange && !isSelected && "bg-action-100 text-text-primary-normal border-y-action-400 border-x-0 ",
4495
+ // Disabled: Figma gray, no pointer, no hover
4496
+ isDisabled && !inRange ? "text-text-primary-disabled bg-transparent pointer-events-none opacity-40 border-transparent" : [
4497
+ "text-text-primary-normal cursor-pointer",
4498
+ // Figma hover: blue bg, blue text (or red text if selected)
4499
+ isSelected ? "hover:bg-background-action-primary-hover hover:text-white" : "hover:bg-action-100 hover:text-text-action-primary-hover",
4500
+ // Figma active: darker blue bg, white text
4501
+ "active:bg-action-300 active:text-white",
4502
+ // Figma focus: ring
4503
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-400"
4504
+ ],
4505
+ isRangeStart && "rounded-l",
4506
+ isRangeEnd && "rounded-r"
4507
+ ),
4508
+ tabIndex: isDisabled ? -1 : 0,
4509
+ "aria-disabled": isDisabled,
4510
+ onClick: () => !isDisabled && isInMonth && onClick(),
4511
+ onMouseEnter: () => isInMonth && onMouseEnter(),
4512
+ onMouseLeave: () => isInMonth && onMouseLeave(),
4513
+ children: isInMonth ? date.day : ""
4514
+ })
4515
+ );
4516
+ }
4517
+ function CalendarRange({
4518
+ from,
4519
+ to,
4520
+ onChange,
4521
+ isDateAvailable,
4522
+ mode = "double",
4523
+ cardStyle = false,
4524
+ disableRange = false,
4525
+ id,
4526
+ testid
4527
+ }) {
4528
+ const weekDays = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
4529
+ const parseDate = (d) => {
4530
+ if (!d) {
4531
+ return void 0;
4532
+ }
4533
+ try {
4534
+ if (typeof d === "number") {
4535
+ return import_polyfill.Temporal.PlainDate.from(new Date(d).toISOString().slice(0, 10));
4536
+ }
4537
+ if (typeof d === "string") {
4538
+ return import_polyfill.Temporal.PlainDate.from(d);
4539
+ }
4540
+ return void 0;
4541
+ } catch (error) {
4542
+ console.error("Invalid date format:", d, error);
4543
+ return import_polyfill.Temporal.Now.plainDateISO();
4544
+ }
4545
+ };
4546
+ const fromDate = parseDate(from);
4547
+ const toDate = parseDate(to);
4548
+ const today = import_polyfill.Temporal.Now.plainDateISO();
4549
+ const [baseMonth, setBaseMonth] = (0, import_react19.useState)(
4550
+ fromDate != null ? fromDate : today.with({ day: 1 })
4551
+ );
4552
+ const [selecting, setSelecting] = (0, import_react19.useState)("from");
4553
+ const [pendingFrom, setPendingFrom] = (0, import_react19.useState)(void 0);
4554
+ const [hoveredDate, setHoveredDate] = (0, import_react19.useState)(void 0);
4555
+ (0, import_react19.useEffect)(() => {
4556
+ if (fromDate) {
4557
+ setBaseMonth(fromDate.with({ day: 1 }));
4558
+ } else if (toDate) {
4559
+ setBaseMonth(toDate.with({ day: 1 }));
4560
+ }
4561
+ }, [from, to]);
4562
+ (0, import_react19.useEffect)(() => {
4563
+ if (fromDate && toDate) {
4564
+ setSelecting("from");
4565
+ setPendingFrom(void 0);
4566
+ setHoveredDate(void 0);
4567
+ }
4568
+ }, [from, to]);
4569
+ function getMonthData(monthOffset) {
4570
+ const monthDate = baseMonth.add({ months: monthOffset }).with({ day: 1 });
4571
+ const days = monthDate.daysInMonth;
4572
+ const firstDayOffset = monthDate.dayOfWeek % 7;
4573
+ return {
4574
+ name: monthDate.toLocaleString("en-US", { month: "long" }),
4575
+ year: monthDate.year,
4576
+ days,
4577
+ firstDayOffset,
4578
+ date: monthDate
4579
+ };
4580
+ }
4581
+ function getMonthDataWith(monthOffset) {
4582
+ const monthDate = baseMonth.with({ month: monthOffset }).with({ day: 1 });
4583
+ const days = monthDate.daysInMonth;
4584
+ const firstDayOffset = monthDate.dayOfWeek % 7;
4585
+ return {
4586
+ name: monthDate.toLocaleString("en-US", { month: "long" }),
4587
+ year: monthDate.year,
4588
+ days,
4589
+ firstDayOffset,
4590
+ date: monthDate
4591
+ };
4592
+ }
4593
+ function handleDayClick(date) {
4594
+ if (isDateAvailable && !isDateAvailable(date)) return;
4595
+ if (mode === "single" && disableRange) {
4596
+ if (onChange) {
4597
+ onChange(date.toString(), date.toString());
4598
+ }
4599
+ return;
4600
+ }
4601
+ if (selecting === "from") {
4602
+ setPendingFrom(date);
4603
+ setSelecting("to");
4604
+ setHoveredDate(void 0);
4605
+ } else if (pendingFrom) {
4606
+ if (onChange) {
4607
+ const [start, end] = import_polyfill.Temporal.PlainDate.compare(date, pendingFrom) < 0 ? [date, pendingFrom] : [pendingFrom, date];
4608
+ onChange(start.toString(), end.toString());
4609
+ }
4610
+ setPendingFrom(void 0);
4611
+ setSelecting("from");
4612
+ setHoveredDate(void 0);
4613
+ }
4614
+ }
4615
+ function isInRange(date) {
4616
+ if (mode === "single" && disableRange) {
4617
+ return false;
4618
+ }
4619
+ if (pendingFrom && selecting === "to" && hoveredDate) {
4620
+ const [start, end] = import_polyfill.Temporal.PlainDate.compare(hoveredDate, pendingFrom) < 0 ? [hoveredDate, pendingFrom] : [pendingFrom, hoveredDate];
4621
+ return import_polyfill.Temporal.PlainDate.compare(date, start) >= 0 && import_polyfill.Temporal.PlainDate.compare(date, end) <= 0;
4622
+ }
4623
+ if (!pendingFrom && fromDate && toDate) {
4624
+ return import_polyfill.Temporal.PlainDate.compare(date, fromDate) >= 0 && import_polyfill.Temporal.PlainDate.compare(date, toDate) <= 0;
4625
+ }
4626
+ return false;
4627
+ }
4628
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4629
+ "div",
4630
+ {
4631
+ id,
4632
+ "data-testid": testid,
4633
+ className: (0, import_clsx21.default)(
4634
+ "relative bg-background-grouped-primary-normal rounded-base w-fit",
4635
+ layoutPaddding,
4636
+ layoutGap,
4637
+ cardStyle && "shadow-4",
4638
+ // baseTransition,
4639
+ "overflow-hidden"
4640
+ ),
4641
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4642
+ "div",
4643
+ {
4644
+ className: (0, import_clsx21.default)(
4645
+ "flex flex-row items-start justify-start bg-background-primary-normal overflow-clip",
4646
+ layoutGap
4647
+ ),
4648
+ children: (mode === "double" ? [0, 1] : [0]).map((offset, idx) => {
4649
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4650
+ CalendarPane,
4651
+ {
4652
+ getMonthData,
4653
+ getMonthDataWith,
4654
+ offset,
4655
+ idx,
4656
+ id,
4657
+ testid,
4658
+ baseMonth,
4659
+ setBaseMonth,
4660
+ mode,
4661
+ pendingFrom,
4662
+ weekDays,
4663
+ fromDate,
4664
+ toDate,
4665
+ isDateAvailable,
4666
+ disableRange,
4667
+ hoveredDate,
4668
+ isInRange,
4669
+ today,
4670
+ setHoveredDate,
4671
+ handleDayClick
4672
+ },
4673
+ idx
4674
+ );
4675
+ })
4676
+ }
4677
+ )
4678
+ }
4679
+ );
4680
+ }
4681
+ function CalendarPane({
4682
+ getMonthData,
4683
+ getMonthDataWith,
4684
+ offset,
4685
+ idx,
4686
+ id,
4687
+ testid,
4688
+ baseMonth,
4689
+ setBaseMonth,
4690
+ mode,
4691
+ pendingFrom,
4692
+ weekDays,
4693
+ fromDate,
4694
+ toDate,
4695
+ isDateAvailable,
4696
+ disableRange,
4697
+ hoveredDate,
4698
+ isInRange,
4699
+ today,
4700
+ setHoveredDate,
4701
+ handleDayClick
4702
+ }) {
4703
+ const months = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
4704
+ const years = Array.from({ length: 100 }).map(
4705
+ (_, i) => baseMonth.year - 50 + i
4706
+ );
4707
+ const [monthMenuOpen, setMonthMenuOpen] = (0, import_react19.useState)(false);
4708
+ const [yearMenuOpen, setYearMenuOpen] = (0, import_react19.useState)(false);
4709
+ const monthMenuRef = (0, import_react19.useRef)(null);
4710
+ const yearMenuRef = (0, import_react19.useRef)(null);
4711
+ const month = getMonthData(offset);
4712
+ const totalCells = 42;
4713
+ const emptyCells = month.firstDayOffset;
4714
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react19.default.Fragment, { children: [
4715
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
4716
+ "div",
4717
+ {
4718
+ className: (0, import_clsx21.default)("flex flex-col"),
4719
+ children: [
4720
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
4721
+ "div",
4722
+ {
4723
+ className: (0, import_clsx21.default)(
4724
+ "flex flex-row items-center justify-between",
4725
+ typography.label,
4726
+ "text-text-action-primary-normal"
4727
+ ),
4728
+ children: [
4729
+ idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4730
+ "button",
4731
+ {
4732
+ id: id ? `${id}-prev-month-button` : void 0,
4733
+ "data-testid": testid ? `${testid}-prev-month-button` : void 0,
4734
+ type: "button",
4735
+ className: (0, import_clsx21.default)(
4736
+ "flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
4737
+ componentPadding
4738
+ ),
4739
+ "aria-label": "Previous month",
4740
+ onClick: () => setBaseMonth(baseMonth.subtract({ months: 1 })),
4741
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "chevron_left", size: 24 })
4742
+ }
4743
+ ) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: (0, import_clsx21.default)(componentPadding, "mr-1") }),
4744
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex gap-desktop-compact-component-padding", children: [
4745
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4746
+ "button",
4747
+ {
4748
+ ref: (el) => {
4749
+ monthMenuRef.current = el;
4750
+ },
4751
+ type: "button",
4752
+ onClick: () => {
4753
+ setMonthMenuOpen(true);
4754
+ setYearMenuOpen(false);
4755
+ },
4756
+ className: "font-semibold text-text-action-primary-normal text-[14px] py-[2px] truncate",
4757
+ children: month.name
4758
+ }
4759
+ ),
4760
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4761
+ Menu,
4762
+ {
4763
+ show: monthMenuOpen,
4764
+ positionTo: monthMenuRef,
4765
+ setShow: () => setMonthMenuOpen(false),
4766
+ children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4767
+ MenuOption,
4768
+ {
4769
+ selected: baseMonth.month === x + 1,
4770
+ onClick: () => {
4771
+ setBaseMonth(baseMonth.with({ month: x + 1 }));
4772
+ setMonthMenuOpen(false);
4773
+ },
4774
+ children: m.name
4775
+ },
4776
+ m.name
4777
+ ))
4778
+ }
4779
+ ),
4780
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4781
+ "button",
4782
+ {
4783
+ ref: (el) => {
4784
+ yearMenuRef.current = el;
4785
+ },
4786
+ type: "button",
4787
+ onClick: () => {
4788
+ setYearMenuOpen(true);
4789
+ setMonthMenuOpen(false);
4790
+ },
4791
+ className: "font-semibold text-text-action-primary-normal text-[14px] py-[2px] truncate",
4792
+ children: month.year
4793
+ }
4794
+ ),
4795
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4796
+ Menu,
4797
+ {
4798
+ show: yearMenuOpen,
4799
+ positionTo: yearMenuRef,
4800
+ setShow: () => setYearMenuOpen(false),
4801
+ children: years.map((y) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4802
+ MenuOption,
4803
+ {
4804
+ selected: baseMonth.year === y,
4805
+ onClick: () => {
4806
+ setBaseMonth(baseMonth.with({ year: y }));
4807
+ setYearMenuOpen(false);
4808
+ },
4809
+ children: y
4810
+ },
4811
+ y
4812
+ ))
4813
+ }
4814
+ )
4815
+ ] }),
4816
+ (mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4817
+ "button",
4818
+ {
4819
+ id: id ? `${id}-next-month-button` : void 0,
4820
+ "data-testid": testid ? `${testid}-next-month-button` : void 0,
4821
+ type: "button",
4822
+ className: (0, import_clsx21.default)(
4823
+ "flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
4824
+ componentPadding
4825
+ ),
4826
+ "aria-label": "Next month",
4827
+ onClick: () => setBaseMonth(baseMonth.add({ months: 1 })),
4828
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "chevron_right", size: 24 })
4829
+ }
4830
+ ) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: (0, import_clsx21.default)(componentPadding, "ml-1") })
4831
+ ]
4832
+ }
4833
+ ),
4834
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: (0, import_clsx21.default)("grid grid-cols-7"), children: weekDays.map((d) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4835
+ "span",
4836
+ {
4837
+ className: (0, import_clsx21.default)(
4838
+ typography.caption,
4839
+ "text-text-secondary-normal text-center",
4840
+ "w-10"
4841
+ ),
4842
+ children: d
4843
+ },
4844
+ d
4845
+ )) }),
4846
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: (0, import_clsx21.default)("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
4847
+ const day = i - emptyCells + 1;
4848
+ const date = month.date.with({ day: 1 }).add({
4849
+ days: i - emptyCells
4850
+ });
4851
+ const isInMonth = day > 0 && day <= month.days;
4852
+ const isToday = isInMonth && date.equals(today);
4853
+ const isSelected = isInMonth && (!pendingFrom && fromDate && date.equals(fromDate) || !pendingFrom && toDate && date.equals(toDate) || pendingFrom && date.equals(pendingFrom));
4854
+ const inRange = isInMonth && isInRange(date);
4855
+ const isDisabled = !isInMonth || (isDateAvailable ? !isDateAvailable(date) : false);
4856
+ const hoverDateIsBeforePendingFrom = hoveredDate && pendingFrom && import_polyfill.Temporal.PlainDate.compare(hoveredDate, pendingFrom) < 0;
4857
+ const hoverDateIsAfterPendingFrom = hoveredDate && pendingFrom && import_polyfill.Temporal.PlainDate.compare(hoveredDate, pendingFrom) >= 0;
4858
+ const isRangeStart = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && fromDate && date.equals(fromDate) || hoverDateIsAfterPendingFrom && date.equals(pendingFrom);
4859
+ const isRangeEnd = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && toDate && date.equals(toDate) || hoverDateIsBeforePendingFrom && date.equals(pendingFrom);
4860
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4861
+ DateCell,
4862
+ {
4863
+ id: id ? `${id}-date-${date.toString()}` : void 0,
4864
+ testid: testid ? `${testid}-date-${date.toString()}` : void 0,
4865
+ date,
4866
+ isInMonth: !!isInMonth,
4867
+ isToday: !!isToday,
4868
+ isSelected: !!isSelected,
4869
+ inRange: !!inRange,
4870
+ isDisabled: !!isDisabled,
4871
+ onClick: () => handleDayClick(date),
4872
+ onMouseEnter: () => setHoveredDate(date),
4873
+ onMouseLeave: () => setHoveredDate(void 0),
4874
+ isRangeStart: !!isRangeStart,
4875
+ isRangeEnd: !!isRangeEnd,
4876
+ isRangeDisabled: mode === "single" && disableRange,
4877
+ cellPadding: componentPadding
4878
+ },
4879
+ i
4880
+ );
4881
+ }) })
4882
+ ]
4883
+ }
4884
+ ),
4885
+ mode === "double" && idx === 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4886
+ "div",
4887
+ {
4888
+ className: (0, import_clsx21.default)(
4889
+ "self-stretch bg-border-primary-normal rounded-base",
4890
+ // 1px width, full height, matches Figma divider
4891
+ "w-px"
4892
+ )
4893
+ }
4894
+ )
4895
+ ] }, month.name + month.year);
4896
+ }
4367
4897
 
4368
- // src/components/Accordion.tsx
4898
+ // src/components/DateInput.tsx
4369
4899
  var import_jsx_runtime26 = require("react/jsx-runtime");
4900
+ var DateInput = (_a) => {
4901
+ var _b = _a, {
4902
+ id,
4903
+ testid,
4904
+ value,
4905
+ onChange,
4906
+ placeholder = "MM/DD/YYYY",
4907
+ disabled,
4908
+ readOnly = false,
4909
+ label
4910
+ } = _b, props = __objRest(_b, [
4911
+ "id",
4912
+ "testid",
4913
+ "value",
4914
+ "onChange",
4915
+ "placeholder",
4916
+ "disabled",
4917
+ "readOnly",
4918
+ "label"
4919
+ ]);
4920
+ const [visible, setVisible] = (0, import_react20.useState)(false);
4921
+ const [inputValue, setInputValue] = (0, import_react20.useState)("");
4922
+ const [isTyping, setIsTyping] = (0, import_react20.useState)(false);
4923
+ const popoverRef = (0, import_react20.useRef)(null);
4924
+ const triggerRef = (0, import_react20.useRef)(null);
4925
+ const rootRef = (0, import_react20.useRef)(null);
4926
+ const [calendarPosition, setCalendarPosition] = (0, import_react20.useState)({
4927
+ top: 0,
4928
+ left: 0,
4929
+ width: 0
4930
+ });
4931
+ const [from, to] = [value, ""];
4932
+ (0, import_react20.useEffect)(() => {
4933
+ if (!isTyping) {
4934
+ setInputValue(formatDisplayValue(from));
4935
+ }
4936
+ }, [from, isTyping]);
4937
+ (0, import_react20.useLayoutEffect)(() => {
4938
+ if (visible) {
4939
+ updatePosition();
4940
+ }
4941
+ }, [visible]);
4942
+ const updatePosition = () => {
4943
+ if (rootRef.current) {
4944
+ const rect = rootRef.current.getBoundingClientRect();
4945
+ setCalendarPosition({
4946
+ top: rect.bottom + window.scrollY,
4947
+ left: rect.left + window.scrollX,
4948
+ width: rect.width
4949
+ });
4950
+ }
4951
+ };
4952
+ (0, import_react20.useEffect)(() => {
4953
+ updatePosition();
4954
+ const resizeObserver = new ResizeObserver(updatePosition);
4955
+ if (triggerRef.current) {
4956
+ resizeObserver.observe(triggerRef.current);
4957
+ }
4958
+ window.addEventListener("scroll", updatePosition);
4959
+ return () => {
4960
+ resizeObserver.disconnect();
4961
+ window.removeEventListener("scroll", updatePosition);
4962
+ };
4963
+ }, []);
4964
+ (0, import_react20.useEffect)(() => {
4965
+ const handleKeyDown2 = (event) => {
4966
+ var _a2;
4967
+ if (event.key === "Escape" && popoverRef.current) {
4968
+ setVisible(false);
4969
+ (_a2 = triggerRef.current) == null ? void 0 : _a2.blur();
4970
+ }
4971
+ };
4972
+ document.addEventListener("keydown", handleKeyDown2);
4973
+ return () => {
4974
+ document.removeEventListener("keydown", handleKeyDown2);
4975
+ };
4976
+ });
4977
+ (0, import_react20.useEffect)(() => {
4978
+ const handleClickOutside = (event) => {
4979
+ if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
4980
+ setVisible(false);
4981
+ }
4982
+ };
4983
+ document.addEventListener("mousedown", handleClickOutside);
4984
+ return () => {
4985
+ document.removeEventListener("mousedown", handleClickOutside);
4986
+ };
4987
+ }, []);
4988
+ function handleDateChange(fromValue) {
4989
+ onChange(fromValue);
4990
+ setVisible(false);
4991
+ setIsTyping(false);
4992
+ }
4993
+ const handleFocus = () => {
4994
+ if (readOnly) return;
4995
+ setVisible(true);
4996
+ };
4997
+ const handleClick = () => {
4998
+ handleFocus();
4999
+ };
5000
+ const handleInputChange = (event) => {
5001
+ if (readOnly) return;
5002
+ const rawValue = event.target.value;
5003
+ const cursorPosition = event.target.selectionStart || 0;
5004
+ setIsTyping(true);
5005
+ const formattedValue = formatInputValue(rawValue);
5006
+ setInputValue(formattedValue);
5007
+ requestAnimationFrame(() => {
5008
+ if (triggerRef.current) {
5009
+ const newPosition = calculateCursorPosition(
5010
+ rawValue,
5011
+ formattedValue,
5012
+ cursorPosition
5013
+ );
5014
+ triggerRef.current.setSelectionRange(newPosition, newPosition);
5015
+ }
5016
+ });
5017
+ const parsedDate = parseInputDate(formattedValue);
5018
+ if (parsedDate && isValidDate(parsedDate)) {
5019
+ onChange(parsedDate);
5020
+ }
5021
+ };
5022
+ const handleBlur = () => {
5023
+ setIsTyping(false);
5024
+ const parsedDate = parseInputDate(inputValue);
5025
+ if (!parsedDate || !isValidDate(parsedDate)) {
5026
+ setInputValue(formatDisplayValue(from));
5027
+ }
5028
+ };
5029
+ const handleKeyDown = (event) => {
5030
+ if (event.key === "Backspace") {
5031
+ const input = event.target;
5032
+ const cursorPosition = input.selectionStart || 0;
5033
+ const value2 = input.value;
5034
+ if (cursorPosition > 0 && value2[cursorPosition - 1] === "/") {
5035
+ event.preventDefault();
5036
+ const newValue = value2.slice(0, cursorPosition - 2) + value2.slice(cursorPosition);
5037
+ const formattedValue = formatInputValue(newValue);
5038
+ setInputValue(formattedValue);
5039
+ requestAnimationFrame(() => {
5040
+ if (triggerRef.current) {
5041
+ const newPosition = Math.max(0, cursorPosition - 2);
5042
+ triggerRef.current.setSelectionRange(newPosition, newPosition);
5043
+ }
5044
+ });
5045
+ setIsTyping(true);
5046
+ return;
5047
+ }
5048
+ }
5049
+ if (event.key === "Enter") {
5050
+ const parsedDate = parseInputDate(inputValue);
5051
+ if (parsedDate && isValidDate(parsedDate)) {
5052
+ onChange(parsedDate);
5053
+ setVisible(false);
5054
+ setIsTyping(false);
5055
+ }
5056
+ }
5057
+ };
5058
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "relative", children: [
5059
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5060
+ InputBase,
5061
+ __spreadProps(__spreadValues({
5062
+ id,
5063
+ testid,
5064
+ ref: (el) => {
5065
+ triggerRef.current = el;
5066
+ }
5067
+ }, props), {
5068
+ wrapperRef: rootRef,
5069
+ value: inputValue,
5070
+ placeholder,
5071
+ disabled,
5072
+ readOnly,
5073
+ after: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { name: "calendar_month" }),
5074
+ onFocus: handleFocus,
5075
+ onClick: handleClick,
5076
+ onChange: handleInputChange,
5077
+ onBlur: handleBlur,
5078
+ onKeyDown: handleKeyDown,
5079
+ label,
5080
+ secondaryIconColor: true
5081
+ })
5082
+ ),
5083
+ visible && !readOnly && (0, import_react_dom3.createPortal)(
5084
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5085
+ "div",
5086
+ {
5087
+ ref: (el) => {
5088
+ popoverRef.current = el;
5089
+ },
5090
+ className: "absolute z-40 bg-white",
5091
+ style: {
5092
+ top: `${calendarPosition.top + 4}px`,
5093
+ left: `${calendarPosition.left}px`,
5094
+ minWidth: `${calendarPosition.width}px`
5095
+ },
5096
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5097
+ CalendarRange,
5098
+ {
5099
+ id: id ? `${id}-calendar` : void 0,
5100
+ testid: testid ? `${testid}-calendar` : void 0,
5101
+ from,
5102
+ to: to || from,
5103
+ onChange: handleDateChange,
5104
+ cardStyle: true,
5105
+ mode: "single",
5106
+ disableRange: true
5107
+ }
5108
+ )
5109
+ }
5110
+ ),
5111
+ findDocumentRoot(popoverRef.current)
5112
+ )
5113
+ ] });
5114
+ };
5115
+ DateInput.displayName = "DateInput";
5116
+ function formatDisplayValue(from) {
5117
+ if (!from) {
5118
+ return "";
5119
+ }
5120
+ if (!isValidDate(from)) {
5121
+ return "";
5122
+ }
5123
+ return formatDate(from);
5124
+ }
5125
+
5126
+ // src/components/Accordion.tsx
5127
+ var import_clsx23 = __toESM(require("clsx"), 1);
5128
+
5129
+ // src/components/Card.tsx
5130
+ var import_clsx22 = __toESM(require("clsx"), 1);
5131
+ var import_jsx_runtime27 = require("react/jsx-runtime");
5132
+
5133
+ // src/components/Accordion.tsx
5134
+ var import_jsx_runtime28 = require("react/jsx-runtime");
4370
5135
 
4371
5136
  // src/components/MobileDataGrid/GridContextProvider/index.tsx
4372
- var import_react20 = require("react");
5137
+ var import_react22 = require("react");
4373
5138
 
4374
5139
  // src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
4375
- var import_react19 = require("react");
4376
- var GridContext = (0, import_react19.createContext)(null);
5140
+ var import_react21 = require("react");
5141
+ var GridContext = (0, import_react21.createContext)(null);
4377
5142
 
4378
5143
  // src/components/MobileDataGrid/GridContextProvider/index.tsx
4379
- var import_jsx_runtime27 = require("react/jsx-runtime");
5144
+ var import_jsx_runtime29 = require("react/jsx-runtime");
4380
5145
 
4381
5146
  // src/components/Modal.tsx
4382
- var import_clsx27 = __toESM(require("clsx"), 1);
4383
- var import_react22 = require("react");
5147
+ var import_clsx28 = __toESM(require("clsx"), 1);
5148
+ var import_react24 = require("react");
4384
5149
 
4385
5150
  // src/components/ModalHeader.tsx
4386
- var import_clsx23 = __toESM(require("clsx"), 1);
4387
- var import_jsx_runtime28 = require("react/jsx-runtime");
5151
+ var import_clsx24 = __toESM(require("clsx"), 1);
5152
+ var import_jsx_runtime30 = require("react/jsx-runtime");
4388
5153
  var ModalHeader = ({
4389
5154
  title,
4390
5155
  hideCloseIcon,
@@ -4395,12 +5160,12 @@ var ModalHeader = ({
4395
5160
  testid,
4396
5161
  headerClassname
4397
5162
  }) => {
4398
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
5163
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4399
5164
  "div",
4400
5165
  {
4401
5166
  id,
4402
5167
  "data-testid": testid,
4403
- className: (0, import_clsx23.default)(
5168
+ className: (0, import_clsx24.default)(
4404
5169
  "flex justify-between items-center",
4405
5170
  headerIconAlign === "center" && "justify-center",
4406
5171
  headerIconAlign === "right" && "justify-end",
@@ -4410,9 +5175,9 @@ var ModalHeader = ({
4410
5175
  headerClassname
4411
5176
  ),
4412
5177
  children: [
4413
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: (0, import_clsx23.default)("flex items-center flex-1", layoutGroupGap), children: [
5178
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: (0, import_clsx24.default)("flex items-center flex-1", layoutGroupGap), children: [
4414
5179
  headerIcon,
4415
- title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5180
+ title && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4416
5181
  Heading2,
4417
5182
  {
4418
5183
  id: id ? `${id}-title` : void 0,
@@ -4422,7 +5187,7 @@ var ModalHeader = ({
4422
5187
  }
4423
5188
  )
4424
5189
  ] }),
4425
- !hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5190
+ !hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4426
5191
  Button,
4427
5192
  {
4428
5193
  id: id ? `${id}-close-button` : void 0,
@@ -4430,7 +5195,7 @@ var ModalHeader = ({
4430
5195
  iconOnly: true,
4431
5196
  variant: "tertiary",
4432
5197
  onClick: onClose,
4433
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-brand-text-action-primary-normal desktop:text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { name: "close", size: 24 }) })
5198
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-brand-text-action-primary-normal desktop:text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "close", size: 24 }) })
4434
5199
  }
4435
5200
  )
4436
5201
  ]
@@ -4440,20 +5205,20 @@ var ModalHeader = ({
4440
5205
  ModalHeader.displayName = "ModalHeader";
4441
5206
 
4442
5207
  // src/components/ModalContent.tsx
4443
- var import_clsx24 = __toESM(require("clsx"), 1);
4444
- var import_jsx_runtime29 = require("react/jsx-runtime");
5208
+ var import_clsx25 = __toESM(require("clsx"), 1);
5209
+ var import_jsx_runtime31 = require("react/jsx-runtime");
4445
5210
  function ModalContent({
4446
5211
  fixedHeightScrolling,
4447
5212
  children,
4448
5213
  id,
4449
5214
  testid
4450
5215
  }) {
4451
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5216
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4452
5217
  "div",
4453
5218
  {
4454
5219
  id,
4455
5220
  "data-testid": testid,
4456
- className: (0, import_clsx24.default)(
5221
+ className: (0, import_clsx25.default)(
4457
5222
  "flex-grow desktop:flex-grow-0",
4458
5223
  layoutPaddding,
4459
5224
  fixedHeightScrolling && "overflow-auto"
@@ -4465,8 +5230,8 @@ function ModalContent({
4465
5230
  ModalContent.displayName = "ModalContent";
4466
5231
 
4467
5232
  // src/components/ModalButtons.tsx
4468
- var import_clsx25 = __toESM(require("clsx"), 1);
4469
- var import_jsx_runtime30 = require("react/jsx-runtime");
5233
+ var import_clsx26 = __toESM(require("clsx"), 1);
5234
+ var import_jsx_runtime32 = require("react/jsx-runtime");
4470
5235
  var ModalButtons = ({
4471
5236
  onClose,
4472
5237
  onContinue,
@@ -4474,36 +5239,36 @@ var ModalButtons = ({
4474
5239
  id,
4475
5240
  testid
4476
5241
  }) => {
4477
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5242
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4478
5243
  "div",
4479
5244
  {
4480
5245
  id,
4481
5246
  "data-testid": testid,
4482
- className: (0, import_clsx25.default)(
5247
+ className: (0, import_clsx26.default)(
4483
5248
  "border-t border-neutral-300 flex justify-end",
4484
5249
  layoutPaddding,
4485
5250
  layoutGroupGap
4486
5251
  ),
4487
- children: customActions != null ? customActions : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
4488
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5252
+ children: customActions != null ? customActions : /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
5253
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4489
5254
  Button,
4490
5255
  {
4491
5256
  id: id ? `${id}-close-button` : void 0,
4492
5257
  testid: testid ? `${testid}-close-button` : void 0,
4493
5258
  variant: "secondary",
4494
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "close", size: 24 }),
5259
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { name: "close", size: 24 }),
4495
5260
  onClick: onClose,
4496
5261
  className: "max-sm:w-full",
4497
5262
  children: "Close"
4498
5263
  }
4499
5264
  ),
4500
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5265
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4501
5266
  Button,
4502
5267
  {
4503
5268
  id: id ? `${id}-continue-button` : void 0,
4504
5269
  testid: testid ? `${testid}-continue-button` : void 0,
4505
5270
  variant: "primary",
4506
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "check", size: 24 }),
5271
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { name: "check", size: 24 }),
4507
5272
  className: "max-sm:w-full",
4508
5273
  onClick: onContinue,
4509
5274
  children: "Continue"
@@ -4516,8 +5281,8 @@ var ModalButtons = ({
4516
5281
  ModalButtons.displayName = "ModalButtons";
4517
5282
 
4518
5283
  // src/components/ModalScrim.tsx
4519
- var import_clsx26 = __toESM(require("clsx"), 1);
4520
- var import_jsx_runtime31 = require("react/jsx-runtime");
5284
+ var import_clsx27 = __toESM(require("clsx"), 1);
5285
+ var import_jsx_runtime33 = require("react/jsx-runtime");
4521
5286
  var ModalScrim = ({
4522
5287
  show = false,
4523
5288
  size = "small",
@@ -4527,12 +5292,12 @@ var ModalScrim = ({
4527
5292
  id,
4528
5293
  testid
4529
5294
  }) => {
4530
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5295
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4531
5296
  "div",
4532
5297
  {
4533
5298
  id,
4534
5299
  "data-testid": testid,
4535
- className: (0, import_clsx26.default)(
5300
+ className: (0, import_clsx27.default)(
4536
5301
  "overflow-y-auto h-screen transition-[visibility,opacity,background] ease-in-out duration-100 grid place-content-center group bg-neutral-600/50 fixed opacity-0",
4537
5302
  !show && " pointer-events-none",
4538
5303
  size === "small" && "p-4",
@@ -4548,14 +5313,14 @@ var ModalScrim = ({
4548
5313
  ModalScrim.displayName = "ModalScrim";
4549
5314
 
4550
5315
  // src/components/Modal.tsx
4551
- var import_react_dom3 = require("react-dom");
5316
+ var import_react_dom4 = require("react-dom");
4552
5317
  var import_react_use = require("react-use");
4553
5318
 
4554
5319
  // src/components/useMounted.tsx
4555
- var import_react21 = require("react");
5320
+ var import_react23 = require("react");
4556
5321
  var useMounted = () => {
4557
- const [isMounted, setIsMounted] = (0, import_react21.useState)(false);
4558
- (0, import_react21.useEffect)(() => {
5322
+ const [isMounted, setIsMounted] = (0, import_react23.useState)(false);
5323
+ (0, import_react23.useEffect)(() => {
4559
5324
  setIsMounted(true);
4560
5325
  return () => setIsMounted(false);
4561
5326
  }, []);
@@ -4563,7 +5328,7 @@ var useMounted = () => {
4563
5328
  };
4564
5329
 
4565
5330
  // src/components/Modal.tsx
4566
- var import_jsx_runtime32 = require("react/jsx-runtime");
5331
+ var import_jsx_runtime34 = require("react/jsx-runtime");
4567
5332
  var fadeInScale = (element, duration = 300) => element.animate(
4568
5333
  [
4569
5334
  { opacity: 0, transform: "scale(0.95)" },
@@ -4647,12 +5412,12 @@ var Modal = ({
4647
5412
  }) => {
4648
5413
  var _a;
4649
5414
  const mounted = useMounted();
4650
- const modalRef = (0, import_react22.useRef)(null);
4651
- const bgRef = (0, import_react22.useRef)(null);
5415
+ const modalRef = (0, import_react24.useRef)(null);
5416
+ const bgRef = (0, import_react24.useRef)(null);
4652
5417
  const wasOpen = (0, import_react_use.usePrevious)(open);
4653
5418
  const isMobile = useMatchesMobile();
4654
5419
  const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
4655
- (0, import_react22.useEffect)(() => {
5420
+ (0, import_react24.useEffect)(() => {
4656
5421
  if (!mounted) return;
4657
5422
  if (!modalRef.current || !bgRef.current) {
4658
5423
  console.error("Modal or background reference is not set.");
@@ -4672,7 +5437,7 @@ var Modal = ({
4672
5437
  bgFadeIn(bgRef.current);
4673
5438
  }
4674
5439
  }, [mounted, onClose, open, wasOpen]);
4675
- const handleKeyDown = (0, import_react22.useCallback)(
5440
+ const handleKeyDown = (0, import_react24.useCallback)(
4676
5441
  (e) => {
4677
5442
  if (e.key === "Escape") {
4678
5443
  if (onClose) {
@@ -4683,12 +5448,12 @@ var Modal = ({
4683
5448
  },
4684
5449
  [onClose]
4685
5450
  );
4686
- const handleClose = (0, import_react22.useCallback)(() => {
5451
+ const handleClose = (0, import_react24.useCallback)(() => {
4687
5452
  if (onClose) {
4688
5453
  onClose();
4689
5454
  }
4690
5455
  }, [onClose]);
4691
- (0, import_react22.useEffect)(() => {
5456
+ (0, import_react24.useEffect)(() => {
4692
5457
  if (open) {
4693
5458
  document.addEventListener("keyup", handleKeyDown);
4694
5459
  }
@@ -4696,7 +5461,7 @@ var Modal = ({
4696
5461
  document.removeEventListener("keyup", handleKeyDown);
4697
5462
  };
4698
5463
  }, [open, handleKeyDown]);
4699
- (0, import_react22.useEffect)(() => {
5464
+ (0, import_react24.useEffect)(() => {
4700
5465
  if (!open) return;
4701
5466
  const scrollY = window.scrollY;
4702
5467
  const body = document.body;
@@ -4717,7 +5482,7 @@ var Modal = ({
4717
5482
  };
4718
5483
  }, [open]);
4719
5484
  const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
4720
- const backgroundClickHandler = (0, import_react22.useCallback)(
5485
+ const backgroundClickHandler = (0, import_react24.useCallback)(
4721
5486
  (e) => {
4722
5487
  const target = e.target;
4723
5488
  const currentTarget = e.currentTarget;
@@ -4734,8 +5499,8 @@ var Modal = ({
4734
5499
  if (!mounted) {
4735
5500
  return null;
4736
5501
  }
4737
- return (0, import_react_dom3.createPortal)(
4738
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5502
+ return (0, import_react_dom4.createPortal)(
5503
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4739
5504
  ModalScrim,
4740
5505
  {
4741
5506
  id: id ? `${id}-scrim` : void 0,
@@ -4744,13 +5509,13 @@ var Modal = ({
4744
5509
  ref: bgRef,
4745
5510
  show: open,
4746
5511
  onClick: backgroundClickHandler,
4747
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
5512
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4748
5513
  "div",
4749
5514
  {
4750
5515
  id,
4751
5516
  "data-testid": testid,
4752
5517
  ref: modalRef,
4753
- className: (0, import_clsx27.default)(
5518
+ className: (0, import_clsx28.default)(
4754
5519
  "shadow-md rounded-sm flex flex-col overflow-hidden w-full opacity-0 h-fit",
4755
5520
  computedFixedHeightScrolling && size !== "screen" && "desktop:max-h-[calc(100vh-32px)] desktop:h-auto",
4756
5521
  className,
@@ -4759,7 +5524,7 @@ var Modal = ({
4759
5524
  ),
4760
5525
  onClick: (e) => e.stopPropagation(),
4761
5526
  children: [
4762
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5527
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4763
5528
  ModalHeader,
4764
5529
  {
4765
5530
  id: id ? `${id}-header` : void 0,
@@ -4772,7 +5537,7 @@ var Modal = ({
4772
5537
  headerClassname
4773
5538
  }
4774
5539
  ),
4775
- children && (size !== "screen" || noWrapper) ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5540
+ children && (size !== "screen" || noWrapper) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4776
5541
  ModalContent,
4777
5542
  {
4778
5543
  id: id ? `${id}-content` : void 0,
@@ -4781,7 +5546,7 @@ var Modal = ({
4781
5546
  children
4782
5547
  }
4783
5548
  ) : children,
4784
- showButtons ? customFooter ? customActions : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5549
+ showButtons ? customFooter ? customActions : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4785
5550
  ModalButtons,
4786
5551
  {
4787
5552
  id: id ? `${id}-buttons` : void 0,
@@ -4802,9 +5567,9 @@ var Modal = ({
4802
5567
  Modal.displayName = "Modal";
4803
5568
 
4804
5569
  // src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
4805
- var import_react23 = require("react");
5570
+ var import_react25 = require("react");
4806
5571
  function useGridContext() {
4807
- const ctx = (0, import_react23.useContext)(GridContext);
5572
+ const ctx = (0, import_react25.useContext)(GridContext);
4808
5573
  if (!ctx) {
4809
5574
  throw new Error("useGridContext must be used within GridContextProvider");
4810
5575
  }
@@ -4812,51 +5577,51 @@ function useGridContext() {
4812
5577
  }
4813
5578
 
4814
5579
  // src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx
4815
- var import_jsx_runtime33 = require("react/jsx-runtime");
5580
+ var import_jsx_runtime35 = require("react/jsx-runtime");
4816
5581
 
4817
5582
  // src/components/MobileDataGrid/RowDetailModalProvider/ModalContent.tsx
4818
- var import_jsx_runtime34 = require("react/jsx-runtime");
5583
+ var import_jsx_runtime36 = require("react/jsx-runtime");
4819
5584
 
4820
5585
  // src/components/MobileDataGrid/RowDetailModalProvider/index.tsx
4821
- var import_jsx_runtime35 = require("react/jsx-runtime");
5586
+ var import_jsx_runtime37 = require("react/jsx-runtime");
4822
5587
 
4823
5588
  // src/components/MobileDataGrid/ColumnList.tsx
4824
- var import_clsx29 = __toESM(require("clsx"), 1);
5589
+ var import_clsx30 = __toESM(require("clsx"), 1);
4825
5590
 
4826
5591
  // src/components/MobileDataGrid/MobileDataGridCard/index.tsx
4827
- var import_clsx28 = __toESM(require("clsx"), 1);
4828
- var import_jsx_runtime36 = require("react/jsx-runtime");
5592
+ var import_clsx29 = __toESM(require("clsx"), 1);
5593
+ var import_jsx_runtime38 = require("react/jsx-runtime");
4829
5594
 
4830
5595
  // src/components/MobileDataGrid/ColumnList.tsx
4831
- var import_jsx_runtime37 = require("react/jsx-runtime");
5596
+ var import_jsx_runtime39 = require("react/jsx-runtime");
4832
5597
 
4833
5598
  // src/components/MobileDataGrid/index.tsx
4834
- var import_jsx_runtime38 = require("react/jsx-runtime");
5599
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4835
5600
 
4836
5601
  // src/components/ProductImagePreview/Thumbnail.tsx
4837
- var import_react25 = require("react");
5602
+ var import_react27 = require("react");
4838
5603
 
4839
5604
  // src/components/ImagePlaceholder.tsx
4840
- var import_react24 = require("react");
4841
- var import_jsx_runtime39 = require("react/jsx-runtime");
5605
+ var import_react26 = require("react");
5606
+ var import_jsx_runtime41 = require("react/jsx-runtime");
4842
5607
 
4843
5608
  // src/components/ProductImagePreview/Thumbnail.tsx
4844
- var import_jsx_runtime40 = require("react/jsx-runtime");
5609
+ var import_jsx_runtime42 = require("react/jsx-runtime");
4845
5610
 
4846
5611
  // src/components/Grid.tsx
4847
- var import_clsx30 = __toESM(require("clsx"), 1);
4848
- var import_jsx_runtime41 = require("react/jsx-runtime");
5612
+ var import_clsx31 = __toESM(require("clsx"), 1);
5613
+ var import_jsx_runtime43 = require("react/jsx-runtime");
4849
5614
 
4850
5615
  // src/components/ProductImagePreview/ProductPrimaryImage.tsx
4851
- var import_react26 = require("react");
4852
- var import_jsx_runtime42 = require("react/jsx-runtime");
5616
+ var import_react28 = require("react");
5617
+ var import_jsx_runtime44 = require("react/jsx-runtime");
4853
5618
 
4854
5619
  // src/components/ProductImagePreview/ZoomWindow.tsx
4855
- var import_react27 = require("react");
5620
+ var import_react29 = require("react");
4856
5621
 
4857
5622
  // src/components/Surface.tsx
4858
- var import_clsx31 = __toESM(require("clsx"), 1);
4859
- var import_jsx_runtime43 = require("react/jsx-runtime");
5623
+ var import_clsx32 = __toESM(require("clsx"), 1);
5624
+ var import_jsx_runtime45 = require("react/jsx-runtime");
4860
5625
  var Surface = (_a) => {
4861
5626
  var _b = _a, {
4862
5627
  children,
@@ -4869,11 +5634,11 @@ var Surface = (_a) => {
4869
5634
  "elevation",
4870
5635
  "id"
4871
5636
  ]);
4872
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5637
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4873
5638
  "div",
4874
5639
  __spreadProps(__spreadValues({
4875
5640
  id,
4876
- className: (0, import_clsx31.default)(
5641
+ className: (0, import_clsx32.default)(
4877
5642
  "rounded-base",
4878
5643
  {
4879
5644
  "shadow-2": elevation === 2,
@@ -4890,43 +5655,43 @@ var Surface = (_a) => {
4890
5655
  Surface.displayName = "Surface";
4891
5656
 
4892
5657
  // src/components/ProductImagePreview/ZoomWindow.tsx
4893
- var import_jsx_runtime44 = require("react/jsx-runtime");
5658
+ var import_jsx_runtime46 = require("react/jsx-runtime");
4894
5659
 
4895
5660
  // src/components/ProductImagePreview/CarouselPagination.tsx
4896
- var import_clsx32 = require("clsx");
4897
- var import_jsx_runtime45 = require("react/jsx-runtime");
5661
+ var import_clsx33 = require("clsx");
5662
+ var import_jsx_runtime47 = require("react/jsx-runtime");
4898
5663
 
4899
5664
  // src/components/ProductImagePreview/MobileImageCarousel.tsx
4900
- var import_react28 = require("react");
4901
- var import_jsx_runtime46 = require("react/jsx-runtime");
5665
+ var import_react30 = require("react");
5666
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4902
5667
 
4903
5668
  // src/components/ProductImagePreview/useProductImagePreview.ts
4904
- var import_react29 = require("react");
5669
+ var import_react31 = require("react");
4905
5670
 
4906
5671
  // src/components/ProductImagePreview/index.tsx
4907
- var import_jsx_runtime47 = require("react/jsx-runtime");
5672
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4908
5673
 
4909
5674
  // src/components/CompactImagesPreview.tsx
4910
- var import_react30 = require("react");
4911
- var import_clsx33 = __toESM(require("clsx"), 1);
4912
- var import_jsx_runtime48 = require("react/jsx-runtime");
5675
+ var import_react32 = require("react");
5676
+ var import_clsx34 = __toESM(require("clsx"), 1);
5677
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4913
5678
 
4914
5679
  // src/components/SimpleTable.tsx
4915
- var import_clsx34 = __toESM(require("clsx"), 1);
4916
- var import_jsx_runtime49 = require("react/jsx-runtime");
5680
+ var import_clsx35 = __toESM(require("clsx"), 1);
5681
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4917
5682
 
4918
5683
  // src/components/PDFViewer/index.tsx
4919
- var import_react33 = require("react");
5684
+ var import_react35 = require("react");
4920
5685
 
4921
5686
  // src/components/PDFViewer/PDFElement.tsx
4922
5687
  var import_react_pdf2 = require("@mikecousins/react-pdf");
4923
- var import_react32 = require("react");
5688
+ var import_react34 = require("react");
4924
5689
 
4925
5690
  // src/components/Spinner.tsx
4926
- var import_jsx_runtime50 = require("react/jsx-runtime");
5691
+ var import_jsx_runtime52 = require("react/jsx-runtime");
4927
5692
  var Spinner = ({ size = "small", testid }) => {
4928
5693
  const dimension = size === "large" ? 48 : 24;
4929
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
5694
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
4930
5695
  "svg",
4931
5696
  {
4932
5697
  "data-testid": testid,
@@ -4938,14 +5703,14 @@ var Spinner = ({ size = "small", testid }) => {
4938
5703
  className: "spinner",
4939
5704
  "aria-label": "Loading",
4940
5705
  children: [
4941
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
4942
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
4943
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
4944
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
4945
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
4946
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
4947
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
4948
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
5706
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
5707
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
5708
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
5709
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
5710
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
5711
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
5712
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
5713
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
4949
5714
  ]
4950
5715
  }
4951
5716
  );
@@ -4954,31 +5719,31 @@ Spinner.displayName = "Spinner";
4954
5719
 
4955
5720
  // src/components/PDFViewer/PDFPage.tsx
4956
5721
  var import_react_pdf = require("@mikecousins/react-pdf");
4957
- var import_react31 = require("react");
4958
- var import_jsx_runtime51 = require("react/jsx-runtime");
5722
+ var import_react33 = require("react");
5723
+ var import_jsx_runtime53 = require("react/jsx-runtime");
4959
5724
 
4960
5725
  // src/components/PDFViewer/PDFElement.tsx
4961
- var import_clsx35 = __toESM(require("clsx"), 1);
4962
- var import_jsx_runtime52 = require("react/jsx-runtime");
5726
+ var import_clsx36 = __toESM(require("clsx"), 1);
5727
+ var import_jsx_runtime54 = require("react/jsx-runtime");
4963
5728
 
4964
5729
  // src/components/PDFViewer/DownloadIcon.tsx
4965
- var import_jsx_runtime53 = require("react/jsx-runtime");
5730
+ var import_jsx_runtime55 = require("react/jsx-runtime");
4966
5731
 
4967
5732
  // src/components/PDFViewer/PDFNavigation.tsx
4968
- var import_jsx_runtime54 = require("react/jsx-runtime");
5733
+ var import_jsx_runtime56 = require("react/jsx-runtime");
4969
5734
 
4970
5735
  // src/components/PDFViewer/index.tsx
4971
- var import_jsx_runtime55 = require("react/jsx-runtime");
5736
+ var import_jsx_runtime57 = require("react/jsx-runtime");
4972
5737
 
4973
5738
  // src/components/ListGroup.tsx
4974
- var import_react34 = require("react");
4975
- var import_clsx36 = __toESM(require("clsx"), 1);
4976
- var import_jsx_runtime56 = require("react/jsx-runtime");
5739
+ var import_react36 = require("react");
5740
+ var import_clsx37 = __toESM(require("clsx"), 1);
5741
+ var import_jsx_runtime58 = require("react/jsx-runtime");
4977
5742
 
4978
5743
  // src/components/Pagination.tsx
4979
- var import_react35 = require("react");
4980
- var import_clsx37 = __toESM(require("clsx"), 1);
4981
- var import_jsx_runtime57 = require("react/jsx-runtime");
5744
+ var import_react37 = require("react");
5745
+ var import_clsx38 = __toESM(require("clsx"), 1);
5746
+ var import_jsx_runtime59 = require("react/jsx-runtime");
4982
5747
  var Pagination = ({
4983
5748
  totalPages,
4984
5749
  currentPage,
@@ -4988,7 +5753,7 @@ var Pagination = ({
4988
5753
  className,
4989
5754
  disabled
4990
5755
  }) => {
4991
- const goTo = (0, import_react35.useCallback)(
5756
+ const goTo = (0, import_react37.useCallback)(
4992
5757
  (page) => {
4993
5758
  if (disabled) return;
4994
5759
  onPageChange(page);
@@ -5005,7 +5770,7 @@ var Pagination = ({
5005
5770
  goTo(currentPage + 1);
5006
5771
  }
5007
5772
  };
5008
- const pageTokens = (0, import_react35.useMemo)(() => {
5773
+ const pageTokens = (0, import_react37.useMemo)(() => {
5009
5774
  if (totalPages <= 5) {
5010
5775
  return Array.from({ length: totalPages }, (_, i) => i + 1);
5011
5776
  }
@@ -5042,7 +5807,7 @@ var Pagination = ({
5042
5807
  return tokens;
5043
5808
  }, [totalPages, currentPage]);
5044
5809
  if (totalPages <= 1) return null;
5045
- const buttonClass = (0, import_clsx37.default)(
5810
+ const buttonClass = (0, import_clsx38.default)(
5046
5811
  "cursor-pointer disabled:cursor-default",
5047
5812
  paddingUsingComponentGap,
5048
5813
  "w-8 h-8",
@@ -5053,14 +5818,14 @@ var Pagination = ({
5053
5818
  "focus:bg-background-grouped-secondary-normal focus:outline-0",
5054
5819
  "disabled:bg-transparent disabled:text-text-action-primary-disabled"
5055
5820
  );
5056
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
5821
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
5057
5822
  "nav",
5058
5823
  {
5059
5824
  id,
5060
5825
  "data-testid": testid,
5061
5826
  "aria-label": "Pagination",
5062
5827
  onKeyDown: handleKey,
5063
- className: (0, import_clsx37.default)(
5828
+ className: (0, import_clsx38.default)(
5064
5829
  "flex items-center",
5065
5830
  "border border-border-primary-normal",
5066
5831
  "bg-background-grouped-primary-normal",
@@ -5068,19 +5833,19 @@ var Pagination = ({
5068
5833
  className
5069
5834
  ),
5070
5835
  children: [
5071
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5836
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5072
5837
  "button",
5073
5838
  {
5074
5839
  disabled: disabled || currentPage <= 1,
5075
5840
  "aria-label": "Previous page",
5076
5841
  onClick: () => goTo(currentPage - 1),
5077
- className: (0, import_clsx37.default)(buttonClass, "border-r-1 border-border-primary-normal"),
5078
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon, { name: "keyboard_arrow_left" })
5842
+ className: (0, import_clsx38.default)(buttonClass, "border-r-1 border-border-primary-normal"),
5843
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icon, { name: "keyboard_arrow_left" })
5079
5844
  }
5080
5845
  ),
5081
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { className: (0, import_clsx37.default)("flex items-center"), children: pageTokens.map((token, index) => {
5846
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("ul", { className: (0, import_clsx38.default)("flex items-center"), children: pageTokens.map((token, index) => {
5082
5847
  if (token === "ellipsis") {
5083
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5848
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5084
5849
  "li",
5085
5850
  {
5086
5851
  className: "w-8 h-8 select-none text-text-action-primary-disabled",
@@ -5090,29 +5855,29 @@ var Pagination = ({
5090
5855
  );
5091
5856
  }
5092
5857
  const selected = token === currentPage;
5093
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5858
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5094
5859
  "button",
5095
5860
  {
5096
5861
  "aria-label": `Page ${token}`,
5097
5862
  "aria-current": selected ? "page" : void 0,
5098
5863
  disabled,
5099
5864
  onClick: () => goTo(token),
5100
- className: (0, import_clsx37.default)(
5865
+ className: (0, import_clsx38.default)(
5101
5866
  buttonClass,
5102
5867
  selected && "border-x-1 bg-background-grouped-secondary-normal border-border-primary-normal"
5103
5868
  ),
5104
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Subheader, { align: "center", weight: "bold", children: token })
5869
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Subheader, { align: "center", weight: "bold", children: token })
5105
5870
  }
5106
5871
  ) }, token);
5107
5872
  }) }),
5108
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5873
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5109
5874
  "button",
5110
5875
  {
5111
5876
  disabled: disabled || currentPage >= totalPages,
5112
5877
  "aria-label": "Next page",
5113
5878
  onClick: () => goTo(currentPage + 1),
5114
- className: (0, import_clsx37.default)(buttonClass, "border-l-1 border-border-primary-normal"),
5115
- children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon, { name: "keyboard_arrow_right" })
5879
+ className: (0, import_clsx38.default)(buttonClass, "border-l-1 border-border-primary-normal"),
5880
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icon, { name: "keyboard_arrow_right" })
5116
5881
  }
5117
5882
  )
5118
5883
  ]
@@ -5122,17 +5887,22 @@ var Pagination = ({
5122
5887
  Pagination.displayName = "Pagination";
5123
5888
 
5124
5889
  // src/components/SkeletonParagraph.tsx
5125
- var import_jsx_runtime58 = require("react/jsx-runtime");
5890
+ var import_jsx_runtime60 = require("react/jsx-runtime");
5126
5891
 
5127
5892
  // src/components/EmptyCartIcon.tsx
5128
- var import_jsx_runtime59 = require("react/jsx-runtime");
5893
+ var import_jsx_runtime61 = require("react/jsx-runtime");
5894
+
5895
+ // src/components/Alert.tsx
5896
+ var import_clsx39 = __toESM(require("clsx"), 1);
5897
+ var import_react38 = require("react");
5898
+ var import_jsx_runtime62 = require("react/jsx-runtime");
5129
5899
 
5130
5900
  // src/components/MobileDataGrid/ColumnSelector/index.tsx
5131
- var import_jsx_runtime60 = require("react/jsx-runtime");
5901
+ var import_jsx_runtime63 = require("react/jsx-runtime");
5132
5902
  function ColumnSelector() {
5133
5903
  const context = useGridContext();
5134
- const ref = (0, import_react36.useRef)(null);
5135
- const [show, setShow] = (0, import_react36.useState)(false);
5904
+ const ref = (0, import_react39.useRef)(null);
5905
+ const [show, setShow] = (0, import_react39.useState)(false);
5136
5906
  const {
5137
5907
  columns,
5138
5908
  id,
@@ -5143,13 +5913,13 @@ function ColumnSelector() {
5143
5913
  resetColumnVisibility,
5144
5914
  dispatch
5145
5915
  } = context;
5146
- const toggleColumnVisibility = (0, import_react36.useCallback)(
5916
+ const toggleColumnVisibility = (0, import_react39.useCallback)(
5147
5917
  (index, visible) => {
5148
5918
  dispatch({ type: "UPDATE", index, payload: { meta: { visible } } });
5149
5919
  },
5150
5920
  [dispatch]
5151
5921
  );
5152
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
5922
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
5153
5923
  "div",
5154
5924
  {
5155
5925
  id: id ? `${id}-column-selector` : void 0,
@@ -5157,7 +5927,7 @@ function ColumnSelector() {
5157
5927
  className: "text-text-secondary-normal border-l border-brand-200 p-mobile-container-padding",
5158
5928
  ref,
5159
5929
  children: [
5160
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5930
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5161
5931
  Button,
5162
5932
  {
5163
5933
  id: id ? `${id}-button` : void 0,
@@ -5166,10 +5936,10 @@ function ColumnSelector() {
5166
5936
  variant: "navigation",
5167
5937
  iconOnly: true,
5168
5938
  size: 24,
5169
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: "tune" })
5939
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icon, { name: "tune" })
5170
5940
  }
5171
5941
  ),
5172
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
5942
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
5173
5943
  Menu,
5174
5944
  {
5175
5945
  id: id ? `${id}-menu` : void 0,
@@ -5180,7 +5950,7 @@ function ColumnSelector() {
5180
5950
  setShow,
5181
5951
  calculateMinMaxHeight: true,
5182
5952
  children: [
5183
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5953
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5184
5954
  Button,
5185
5955
  {
5186
5956
  id: id ? `${id}-reset-button` : void 0,
@@ -5198,11 +5968,11 @@ function ColumnSelector() {
5198
5968
  return (_a = x.meta) == null ? void 0 : _a.inVisibilityMenu;
5199
5969
  }).map((column) => {
5200
5970
  var _a, _b, _c;
5201
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5971
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5202
5972
  MenuOption,
5203
5973
  {
5204
5974
  testid: testid ? `${testid}-option-${column.id}` : void 0,
5205
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5975
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5206
5976
  Checkbox,
5207
5977
  {
5208
5978
  id: id ? `${id}-checkbox-${column.id}` : void 0,
@@ -5232,7 +6002,7 @@ function ColumnSelector() {
5232
6002
  }
5233
6003
 
5234
6004
  // src/components/MobileDataGrid/MobileDataGridHeader.tsx
5235
- var import_jsx_runtime61 = require("react/jsx-runtime");
6005
+ var import_jsx_runtime64 = require("react/jsx-runtime");
5236
6006
  function MobileDataGridHeader({
5237
6007
  header: Header,
5238
6008
  enableColumnSelector,
@@ -5250,15 +6020,15 @@ function MobileDataGridHeader({
5250
6020
  handleRowSelectAll
5251
6021
  } = ctx;
5252
6022
  if (typeof Header === "undefined" && !primaryKey) return null;
5253
- if (typeof Header === "function") return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Header, __spreadValues({}, ctx));
6023
+ if (typeof Header === "function") return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Header, __spreadValues({}, ctx));
5254
6024
  if (typeof Header === "string" || primaryKey)
5255
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
6025
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5256
6026
  "div",
5257
6027
  {
5258
6028
  id: id ? `${id}-header` : void 0,
5259
6029
  "data-testid": testid ? `${testid}-header` : void 0,
5260
6030
  className: "sticky top-0",
5261
- children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Theme, { theme: "brand", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
6031
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Theme, { theme: "brand", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
5262
6032
  Stack,
5263
6033
  {
5264
6034
  horizontal: true,
@@ -5267,7 +6037,7 @@ function MobileDataGridHeader({
5267
6037
  justify: "between",
5268
6038
  backgroundColor: "background-primary-normal",
5269
6039
  children: [
5270
- enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "p-mobile-component-padding border-r border-brand-200 max-w-fit h-full", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
6040
+ enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "p-mobile-component-padding border-r border-brand-200 max-w-fit h-full", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5271
6041
  Checkbox,
5272
6042
  {
5273
6043
  id: id ? `${id}-select-all-checkbox` : void 0,
@@ -5277,7 +6047,7 @@ function MobileDataGridHeader({
5277
6047
  onChange: handleRowSelectAll
5278
6048
  }
5279
6049
  ) }),
5280
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
6050
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5281
6051
  Stack,
5282
6052
  {
5283
6053
  horizontal: true,
@@ -5285,10 +6055,10 @@ function MobileDataGridHeader({
5285
6055
  items: "center",
5286
6056
  sizing: "component",
5287
6057
  padding: true,
5288
- children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Heading3, { as: "span", color: "text-primary-normal", children: typeof Header === "string" ? Header : (_b = (_a = columns.find((col) => col.id === primaryKey)) == null ? void 0 : _a.header) == null ? void 0 : _b.toString() })
6058
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Heading3, { as: "span", color: "text-primary-normal", children: typeof Header === "string" ? Header : (_b = (_a = columns.find((col) => col.id === primaryKey)) == null ? void 0 : _a.header) == null ? void 0 : _b.toString() })
5289
6059
  }
5290
6060
  ),
5291
- enableColumnSelector && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ColumnSelector, {})
6061
+ enableColumnSelector && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ColumnSelector, {})
5292
6062
  ]
5293
6063
  }
5294
6064
  ) })