@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_react35 = require("react");
715
+ var import_react38 = 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,40 +4428,735 @@ 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/ProductImagePreview/Thumbnail.tsx
4372
- var import_react20 = require("react");
5137
+ var import_react22 = require("react");
4373
5138
 
4374
5139
  // src/components/ImagePlaceholder.tsx
4375
- var import_react19 = require("react");
4376
- var import_jsx_runtime27 = require("react/jsx-runtime");
5140
+ var import_react21 = require("react");
5141
+ var import_jsx_runtime29 = require("react/jsx-runtime");
4377
5142
 
4378
5143
  // src/components/ProductImagePreview/Thumbnail.tsx
4379
- var import_jsx_runtime28 = require("react/jsx-runtime");
5144
+ var import_jsx_runtime30 = require("react/jsx-runtime");
4380
5145
 
4381
5146
  // src/components/Grid.tsx
4382
- var import_clsx23 = __toESM(require("clsx"), 1);
4383
- var import_jsx_runtime29 = require("react/jsx-runtime");
5147
+ var import_clsx24 = __toESM(require("clsx"), 1);
5148
+ var import_jsx_runtime31 = require("react/jsx-runtime");
4384
5149
 
4385
5150
  // src/components/ProductImagePreview/ProductPrimaryImage.tsx
4386
- var import_react21 = require("react");
4387
- var import_jsx_runtime30 = require("react/jsx-runtime");
5151
+ var import_react23 = require("react");
5152
+ var import_jsx_runtime32 = require("react/jsx-runtime");
4388
5153
 
4389
5154
  // src/components/ProductImagePreview/ZoomWindow.tsx
4390
- var import_react22 = require("react");
5155
+ var import_react24 = require("react");
4391
5156
 
4392
5157
  // src/components/Surface.tsx
4393
- var import_clsx24 = __toESM(require("clsx"), 1);
4394
- var import_jsx_runtime31 = require("react/jsx-runtime");
5158
+ var import_clsx25 = __toESM(require("clsx"), 1);
5159
+ var import_jsx_runtime33 = require("react/jsx-runtime");
4395
5160
  var Surface = (_a) => {
4396
5161
  var _b = _a, {
4397
5162
  children,
@@ -4404,11 +5169,11 @@ var Surface = (_a) => {
4404
5169
  "elevation",
4405
5170
  "id"
4406
5171
  ]);
4407
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5172
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4408
5173
  "div",
4409
5174
  __spreadProps(__spreadValues({
4410
5175
  id,
4411
- className: (0, import_clsx24.default)(
5176
+ className: (0, import_clsx25.default)(
4412
5177
  "rounded-base",
4413
5178
  {
4414
5179
  "shadow-2": elevation === 2,
@@ -4425,41 +5190,41 @@ var Surface = (_a) => {
4425
5190
  Surface.displayName = "Surface";
4426
5191
 
4427
5192
  // src/components/ProductImagePreview/ZoomWindow.tsx
4428
- var import_jsx_runtime32 = require("react/jsx-runtime");
5193
+ var import_jsx_runtime34 = require("react/jsx-runtime");
4429
5194
 
4430
5195
  // src/components/ProductImagePreview/CarouselPagination.tsx
4431
- var import_clsx25 = require("clsx");
4432
- var import_jsx_runtime33 = require("react/jsx-runtime");
5196
+ var import_clsx26 = require("clsx");
5197
+ var import_jsx_runtime35 = require("react/jsx-runtime");
4433
5198
 
4434
5199
  // src/components/ProductImagePreview/MobileImageCarousel.tsx
4435
- var import_react23 = require("react");
4436
- var import_jsx_runtime34 = require("react/jsx-runtime");
5200
+ var import_react25 = require("react");
5201
+ var import_jsx_runtime36 = require("react/jsx-runtime");
4437
5202
 
4438
5203
  // src/components/ProductImagePreview/useProductImagePreview.ts
4439
- var import_react24 = require("react");
5204
+ var import_react26 = require("react");
4440
5205
 
4441
5206
  // src/components/ProductImagePreview/index.tsx
4442
- var import_jsx_runtime35 = require("react/jsx-runtime");
5207
+ var import_jsx_runtime37 = require("react/jsx-runtime");
4443
5208
 
4444
5209
  // src/components/CompactImagesPreview.tsx
4445
- var import_react25 = require("react");
4446
- var import_clsx26 = __toESM(require("clsx"), 1);
4447
- var import_jsx_runtime36 = require("react/jsx-runtime");
5210
+ var import_react27 = require("react");
5211
+ var import_clsx27 = __toESM(require("clsx"), 1);
5212
+ var import_jsx_runtime38 = require("react/jsx-runtime");
4448
5213
 
4449
5214
  // src/components/SimpleTable.tsx
4450
- var import_clsx27 = __toESM(require("clsx"), 1);
4451
- var import_jsx_runtime37 = require("react/jsx-runtime");
5215
+ var import_clsx28 = __toESM(require("clsx"), 1);
5216
+ var import_jsx_runtime39 = require("react/jsx-runtime");
4452
5217
 
4453
5218
  // src/components/PDFViewer/index.tsx
4454
- var import_react30 = require("react");
5219
+ var import_react32 = require("react");
4455
5220
 
4456
5221
  // src/components/Modal.tsx
4457
- var import_clsx32 = __toESM(require("clsx"), 1);
4458
- var import_react27 = require("react");
5222
+ var import_clsx33 = __toESM(require("clsx"), 1);
5223
+ var import_react29 = require("react");
4459
5224
 
4460
5225
  // src/components/ModalHeader.tsx
4461
- var import_clsx28 = __toESM(require("clsx"), 1);
4462
- var import_jsx_runtime38 = require("react/jsx-runtime");
5226
+ var import_clsx29 = __toESM(require("clsx"), 1);
5227
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4463
5228
  var ModalHeader = ({
4464
5229
  title,
4465
5230
  hideCloseIcon,
@@ -4470,12 +5235,12 @@ var ModalHeader = ({
4470
5235
  testid,
4471
5236
  headerClassname
4472
5237
  }) => {
4473
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
5238
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
4474
5239
  "div",
4475
5240
  {
4476
5241
  id,
4477
5242
  "data-testid": testid,
4478
- className: (0, import_clsx28.default)(
5243
+ className: (0, import_clsx29.default)(
4479
5244
  "flex justify-between items-center",
4480
5245
  headerIconAlign === "center" && "justify-center",
4481
5246
  headerIconAlign === "right" && "justify-end",
@@ -4485,9 +5250,9 @@ var ModalHeader = ({
4485
5250
  headerClassname
4486
5251
  ),
4487
5252
  children: [
4488
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: (0, import_clsx28.default)("flex items-center flex-1", layoutGroupGap), children: [
5253
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: (0, import_clsx29.default)("flex items-center flex-1", layoutGroupGap), children: [
4489
5254
  headerIcon,
4490
- title && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5255
+ title && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4491
5256
  Heading2,
4492
5257
  {
4493
5258
  id: id ? `${id}-title` : void 0,
@@ -4497,7 +5262,7 @@ var ModalHeader = ({
4497
5262
  }
4498
5263
  )
4499
5264
  ] }),
4500
- !hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5265
+ !hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4501
5266
  Button,
4502
5267
  {
4503
5268
  id: id ? `${id}-close-button` : void 0,
@@ -4505,7 +5270,7 @@ var ModalHeader = ({
4505
5270
  iconOnly: true,
4506
5271
  variant: "tertiary",
4507
5272
  onClick: onClose,
4508
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-brand-text-action-primary-normal desktop:text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { name: "close", size: 24 }) })
5273
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-brand-text-action-primary-normal desktop:text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { name: "close", size: 24 }) })
4509
5274
  }
4510
5275
  )
4511
5276
  ]
@@ -4515,20 +5280,20 @@ var ModalHeader = ({
4515
5280
  ModalHeader.displayName = "ModalHeader";
4516
5281
 
4517
5282
  // src/components/ModalContent.tsx
4518
- var import_clsx29 = __toESM(require("clsx"), 1);
4519
- var import_jsx_runtime39 = require("react/jsx-runtime");
5283
+ var import_clsx30 = __toESM(require("clsx"), 1);
5284
+ var import_jsx_runtime41 = require("react/jsx-runtime");
4520
5285
  function ModalContent({
4521
5286
  fixedHeightScrolling,
4522
5287
  children,
4523
5288
  id,
4524
5289
  testid
4525
5290
  }) {
4526
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5291
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4527
5292
  "div",
4528
5293
  {
4529
5294
  id,
4530
5295
  "data-testid": testid,
4531
- className: (0, import_clsx29.default)(
5296
+ className: (0, import_clsx30.default)(
4532
5297
  "flex-grow desktop:flex-grow-0",
4533
5298
  layoutPaddding,
4534
5299
  fixedHeightScrolling && "overflow-auto"
@@ -4540,8 +5305,8 @@ function ModalContent({
4540
5305
  ModalContent.displayName = "ModalContent";
4541
5306
 
4542
5307
  // src/components/ModalButtons.tsx
4543
- var import_clsx30 = __toESM(require("clsx"), 1);
4544
- var import_jsx_runtime40 = require("react/jsx-runtime");
5308
+ var import_clsx31 = __toESM(require("clsx"), 1);
5309
+ var import_jsx_runtime42 = require("react/jsx-runtime");
4545
5310
  var ModalButtons = ({
4546
5311
  onClose,
4547
5312
  onContinue,
@@ -4549,36 +5314,36 @@ var ModalButtons = ({
4549
5314
  id,
4550
5315
  testid
4551
5316
  }) => {
4552
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5317
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4553
5318
  "div",
4554
5319
  {
4555
5320
  id,
4556
5321
  "data-testid": testid,
4557
- className: (0, import_clsx30.default)(
5322
+ className: (0, import_clsx31.default)(
4558
5323
  "border-t border-neutral-300 flex justify-end",
4559
5324
  layoutPaddding,
4560
5325
  layoutGroupGap
4561
5326
  ),
4562
- children: customActions != null ? customActions : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
4563
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5327
+ children: customActions != null ? customActions : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
5328
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4564
5329
  Button,
4565
5330
  {
4566
5331
  id: id ? `${id}-close-button` : void 0,
4567
5332
  testid: testid ? `${testid}-close-button` : void 0,
4568
5333
  variant: "secondary",
4569
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { name: "close", size: 24 }),
5334
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: "close", size: 24 }),
4570
5335
  onClick: onClose,
4571
5336
  className: "max-sm:w-full",
4572
5337
  children: "Close"
4573
5338
  }
4574
5339
  ),
4575
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5340
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4576
5341
  Button,
4577
5342
  {
4578
5343
  id: id ? `${id}-continue-button` : void 0,
4579
5344
  testid: testid ? `${testid}-continue-button` : void 0,
4580
5345
  variant: "primary",
4581
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { name: "check", size: 24 }),
5346
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: "check", size: 24 }),
4582
5347
  className: "max-sm:w-full",
4583
5348
  onClick: onContinue,
4584
5349
  children: "Continue"
@@ -4591,8 +5356,8 @@ var ModalButtons = ({
4591
5356
  ModalButtons.displayName = "ModalButtons";
4592
5357
 
4593
5358
  // src/components/ModalScrim.tsx
4594
- var import_clsx31 = __toESM(require("clsx"), 1);
4595
- var import_jsx_runtime41 = require("react/jsx-runtime");
5359
+ var import_clsx32 = __toESM(require("clsx"), 1);
5360
+ var import_jsx_runtime43 = require("react/jsx-runtime");
4596
5361
  var ModalScrim = ({
4597
5362
  show = false,
4598
5363
  size = "small",
@@ -4602,12 +5367,12 @@ var ModalScrim = ({
4602
5367
  id,
4603
5368
  testid
4604
5369
  }) => {
4605
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5370
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
4606
5371
  "div",
4607
5372
  {
4608
5373
  id,
4609
5374
  "data-testid": testid,
4610
- className: (0, import_clsx31.default)(
5375
+ className: (0, import_clsx32.default)(
4611
5376
  "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",
4612
5377
  !show && " pointer-events-none",
4613
5378
  size === "small" && "p-4",
@@ -4623,14 +5388,14 @@ var ModalScrim = ({
4623
5388
  ModalScrim.displayName = "ModalScrim";
4624
5389
 
4625
5390
  // src/components/Modal.tsx
4626
- var import_react_dom3 = require("react-dom");
5391
+ var import_react_dom4 = require("react-dom");
4627
5392
  var import_react_use = require("react-use");
4628
5393
 
4629
5394
  // src/components/useMounted.tsx
4630
- var import_react26 = require("react");
5395
+ var import_react28 = require("react");
4631
5396
  var useMounted = () => {
4632
- const [isMounted, setIsMounted] = (0, import_react26.useState)(false);
4633
- (0, import_react26.useEffect)(() => {
5397
+ const [isMounted, setIsMounted] = (0, import_react28.useState)(false);
5398
+ (0, import_react28.useEffect)(() => {
4634
5399
  setIsMounted(true);
4635
5400
  return () => setIsMounted(false);
4636
5401
  }, []);
@@ -4638,7 +5403,7 @@ var useMounted = () => {
4638
5403
  };
4639
5404
 
4640
5405
  // src/components/Modal.tsx
4641
- var import_jsx_runtime42 = require("react/jsx-runtime");
5406
+ var import_jsx_runtime44 = require("react/jsx-runtime");
4642
5407
  var fadeInScale = (element, duration = 300) => element.animate(
4643
5408
  [
4644
5409
  { opacity: 0, transform: "scale(0.95)" },
@@ -4722,12 +5487,12 @@ var Modal = ({
4722
5487
  }) => {
4723
5488
  var _a;
4724
5489
  const mounted = useMounted();
4725
- const modalRef = (0, import_react27.useRef)(null);
4726
- const bgRef = (0, import_react27.useRef)(null);
5490
+ const modalRef = (0, import_react29.useRef)(null);
5491
+ const bgRef = (0, import_react29.useRef)(null);
4727
5492
  const wasOpen = (0, import_react_use.usePrevious)(open);
4728
5493
  const isMobile = useMatchesMobile();
4729
5494
  const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
4730
- (0, import_react27.useEffect)(() => {
5495
+ (0, import_react29.useEffect)(() => {
4731
5496
  if (!mounted) return;
4732
5497
  if (!modalRef.current || !bgRef.current) {
4733
5498
  console.error("Modal or background reference is not set.");
@@ -4747,7 +5512,7 @@ var Modal = ({
4747
5512
  bgFadeIn(bgRef.current);
4748
5513
  }
4749
5514
  }, [mounted, onClose, open, wasOpen]);
4750
- const handleKeyDown = (0, import_react27.useCallback)(
5515
+ const handleKeyDown = (0, import_react29.useCallback)(
4751
5516
  (e) => {
4752
5517
  if (e.key === "Escape") {
4753
5518
  if (onClose) {
@@ -4758,12 +5523,12 @@ var Modal = ({
4758
5523
  },
4759
5524
  [onClose]
4760
5525
  );
4761
- const handleClose = (0, import_react27.useCallback)(() => {
5526
+ const handleClose = (0, import_react29.useCallback)(() => {
4762
5527
  if (onClose) {
4763
5528
  onClose();
4764
5529
  }
4765
5530
  }, [onClose]);
4766
- (0, import_react27.useEffect)(() => {
5531
+ (0, import_react29.useEffect)(() => {
4767
5532
  if (open) {
4768
5533
  document.addEventListener("keyup", handleKeyDown);
4769
5534
  }
@@ -4771,7 +5536,7 @@ var Modal = ({
4771
5536
  document.removeEventListener("keyup", handleKeyDown);
4772
5537
  };
4773
5538
  }, [open, handleKeyDown]);
4774
- (0, import_react27.useEffect)(() => {
5539
+ (0, import_react29.useEffect)(() => {
4775
5540
  if (!open) return;
4776
5541
  const scrollY = window.scrollY;
4777
5542
  const body = document.body;
@@ -4792,7 +5557,7 @@ var Modal = ({
4792
5557
  };
4793
5558
  }, [open]);
4794
5559
  const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
4795
- const backgroundClickHandler = (0, import_react27.useCallback)(
5560
+ const backgroundClickHandler = (0, import_react29.useCallback)(
4796
5561
  (e) => {
4797
5562
  const target = e.target;
4798
5563
  const currentTarget = e.currentTarget;
@@ -4809,8 +5574,8 @@ var Modal = ({
4809
5574
  if (!mounted) {
4810
5575
  return null;
4811
5576
  }
4812
- return (0, import_react_dom3.createPortal)(
4813
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5577
+ return (0, import_react_dom4.createPortal)(
5578
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4814
5579
  ModalScrim,
4815
5580
  {
4816
5581
  id: id ? `${id}-scrim` : void 0,
@@ -4819,13 +5584,13 @@ var Modal = ({
4819
5584
  ref: bgRef,
4820
5585
  show: open,
4821
5586
  onClick: backgroundClickHandler,
4822
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
5587
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
4823
5588
  "div",
4824
5589
  {
4825
5590
  id,
4826
5591
  "data-testid": testid,
4827
5592
  ref: modalRef,
4828
- className: (0, import_clsx32.default)(
5593
+ className: (0, import_clsx33.default)(
4829
5594
  "shadow-md rounded-sm flex flex-col overflow-hidden w-full opacity-0 h-fit",
4830
5595
  computedFixedHeightScrolling && size !== "screen" && "desktop:max-h-[calc(100vh-32px)] desktop:h-auto",
4831
5596
  className,
@@ -4834,7 +5599,7 @@ var Modal = ({
4834
5599
  ),
4835
5600
  onClick: (e) => e.stopPropagation(),
4836
5601
  children: [
4837
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5602
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4838
5603
  ModalHeader,
4839
5604
  {
4840
5605
  id: id ? `${id}-header` : void 0,
@@ -4847,7 +5612,7 @@ var Modal = ({
4847
5612
  headerClassname
4848
5613
  }
4849
5614
  ),
4850
- children && (size !== "screen" || noWrapper) ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5615
+ children && (size !== "screen" || noWrapper) ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4851
5616
  ModalContent,
4852
5617
  {
4853
5618
  id: id ? `${id}-content` : void 0,
@@ -4856,7 +5621,7 @@ var Modal = ({
4856
5621
  children
4857
5622
  }
4858
5623
  ) : children,
4859
- showButtons ? customFooter ? customActions : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5624
+ showButtons ? customFooter ? customActions : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4860
5625
  ModalButtons,
4861
5626
  {
4862
5627
  id: id ? `${id}-buttons` : void 0,
@@ -4878,13 +5643,13 @@ Modal.displayName = "Modal";
4878
5643
 
4879
5644
  // src/components/PDFViewer/PDFElement.tsx
4880
5645
  var import_react_pdf2 = require("@mikecousins/react-pdf");
4881
- var import_react29 = require("react");
5646
+ var import_react31 = require("react");
4882
5647
 
4883
5648
  // src/components/Spinner.tsx
4884
- var import_jsx_runtime43 = require("react/jsx-runtime");
5649
+ var import_jsx_runtime45 = require("react/jsx-runtime");
4885
5650
  var Spinner = ({ size = "small", testid }) => {
4886
5651
  const dimension = size === "large" ? 48 : 24;
4887
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
5652
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
4888
5653
  "svg",
4889
5654
  {
4890
5655
  "data-testid": testid,
@@ -4896,14 +5661,14 @@ var Spinner = ({ size = "small", testid }) => {
4896
5661
  className: "spinner",
4897
5662
  "aria-label": "Loading",
4898
5663
  children: [
4899
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
4900
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
4901
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
4902
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
4903
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
4904
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
4905
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
4906
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
5664
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
5665
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
5666
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
5667
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
5668
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
5669
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
5670
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
5671
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
4907
5672
  ]
4908
5673
  }
4909
5674
  );
@@ -4912,31 +5677,31 @@ Spinner.displayName = "Spinner";
4912
5677
 
4913
5678
  // src/components/PDFViewer/PDFPage.tsx
4914
5679
  var import_react_pdf = require("@mikecousins/react-pdf");
4915
- var import_react28 = require("react");
4916
- var import_jsx_runtime44 = require("react/jsx-runtime");
5680
+ var import_react30 = require("react");
5681
+ var import_jsx_runtime46 = require("react/jsx-runtime");
4917
5682
 
4918
5683
  // src/components/PDFViewer/PDFElement.tsx
4919
- var import_clsx33 = __toESM(require("clsx"), 1);
4920
- var import_jsx_runtime45 = require("react/jsx-runtime");
5684
+ var import_clsx34 = __toESM(require("clsx"), 1);
5685
+ var import_jsx_runtime47 = require("react/jsx-runtime");
4921
5686
 
4922
5687
  // src/components/PDFViewer/DownloadIcon.tsx
4923
- var import_jsx_runtime46 = require("react/jsx-runtime");
5688
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4924
5689
 
4925
5690
  // src/components/PDFViewer/PDFNavigation.tsx
4926
- var import_jsx_runtime47 = require("react/jsx-runtime");
5691
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4927
5692
 
4928
5693
  // src/components/PDFViewer/index.tsx
4929
- var import_jsx_runtime48 = require("react/jsx-runtime");
5694
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4930
5695
 
4931
5696
  // src/components/ListGroup.tsx
4932
- var import_react31 = require("react");
4933
- var import_clsx34 = __toESM(require("clsx"), 1);
4934
- var import_jsx_runtime49 = require("react/jsx-runtime");
5697
+ var import_react33 = require("react");
5698
+ var import_clsx35 = __toESM(require("clsx"), 1);
5699
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4935
5700
 
4936
5701
  // src/components/Pagination.tsx
4937
- var import_react32 = require("react");
4938
- var import_clsx35 = __toESM(require("clsx"), 1);
4939
- var import_jsx_runtime50 = require("react/jsx-runtime");
5702
+ var import_react34 = require("react");
5703
+ var import_clsx36 = __toESM(require("clsx"), 1);
5704
+ var import_jsx_runtime52 = require("react/jsx-runtime");
4940
5705
  var Pagination = ({
4941
5706
  totalPages,
4942
5707
  currentPage,
@@ -4946,7 +5711,7 @@ var Pagination = ({
4946
5711
  className,
4947
5712
  disabled
4948
5713
  }) => {
4949
- const goTo = (0, import_react32.useCallback)(
5714
+ const goTo = (0, import_react34.useCallback)(
4950
5715
  (page) => {
4951
5716
  if (disabled) return;
4952
5717
  onPageChange(page);
@@ -4963,7 +5728,7 @@ var Pagination = ({
4963
5728
  goTo(currentPage + 1);
4964
5729
  }
4965
5730
  };
4966
- const pageTokens = (0, import_react32.useMemo)(() => {
5731
+ const pageTokens = (0, import_react34.useMemo)(() => {
4967
5732
  if (totalPages <= 5) {
4968
5733
  return Array.from({ length: totalPages }, (_, i) => i + 1);
4969
5734
  }
@@ -5000,7 +5765,7 @@ var Pagination = ({
5000
5765
  return tokens;
5001
5766
  }, [totalPages, currentPage]);
5002
5767
  if (totalPages <= 1) return null;
5003
- const buttonClass = (0, import_clsx35.default)(
5768
+ const buttonClass = (0, import_clsx36.default)(
5004
5769
  "cursor-pointer disabled:cursor-default",
5005
5770
  paddingUsingComponentGap,
5006
5771
  "w-8 h-8",
@@ -5011,14 +5776,14 @@ var Pagination = ({
5011
5776
  "focus:bg-background-grouped-secondary-normal focus:outline-0",
5012
5777
  "disabled:bg-transparent disabled:text-text-action-primary-disabled"
5013
5778
  );
5014
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
5779
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
5015
5780
  "nav",
5016
5781
  {
5017
5782
  id,
5018
5783
  "data-testid": testid,
5019
5784
  "aria-label": "Pagination",
5020
5785
  onKeyDown: handleKey,
5021
- className: (0, import_clsx35.default)(
5786
+ className: (0, import_clsx36.default)(
5022
5787
  "flex items-center",
5023
5788
  "border border-border-primary-normal",
5024
5789
  "bg-background-grouped-primary-normal",
@@ -5026,19 +5791,19 @@ var Pagination = ({
5026
5791
  className
5027
5792
  ),
5028
5793
  children: [
5029
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5794
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5030
5795
  "button",
5031
5796
  {
5032
5797
  disabled: disabled || currentPage <= 1,
5033
5798
  "aria-label": "Previous page",
5034
5799
  onClick: () => goTo(currentPage - 1),
5035
- className: (0, import_clsx35.default)(buttonClass, "border-r-1 border-border-primary-normal"),
5036
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { name: "keyboard_arrow_left" })
5800
+ className: (0, import_clsx36.default)(buttonClass, "border-r-1 border-border-primary-normal"),
5801
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon, { name: "keyboard_arrow_left" })
5037
5802
  }
5038
5803
  ),
5039
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("ul", { className: (0, import_clsx35.default)("flex items-center"), children: pageTokens.map((token, index) => {
5804
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ul", { className: (0, import_clsx36.default)("flex items-center"), children: pageTokens.map((token, index) => {
5040
5805
  if (token === "ellipsis") {
5041
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5806
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5042
5807
  "li",
5043
5808
  {
5044
5809
  className: "w-8 h-8 select-none text-text-action-primary-disabled",
@@ -5048,29 +5813,29 @@ var Pagination = ({
5048
5813
  );
5049
5814
  }
5050
5815
  const selected = token === currentPage;
5051
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5816
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5052
5817
  "button",
5053
5818
  {
5054
5819
  "aria-label": `Page ${token}`,
5055
5820
  "aria-current": selected ? "page" : void 0,
5056
5821
  disabled,
5057
5822
  onClick: () => goTo(token),
5058
- className: (0, import_clsx35.default)(
5823
+ className: (0, import_clsx36.default)(
5059
5824
  buttonClass,
5060
5825
  selected && "border-x-1 bg-background-grouped-secondary-normal border-border-primary-normal"
5061
5826
  ),
5062
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Subheader, { align: "center", weight: "bold", children: token })
5827
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Subheader, { align: "center", weight: "bold", children: token })
5063
5828
  }
5064
5829
  ) }, token);
5065
5830
  }) }),
5066
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
5831
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5067
5832
  "button",
5068
5833
  {
5069
5834
  disabled: disabled || currentPage >= totalPages,
5070
5835
  "aria-label": "Next page",
5071
5836
  onClick: () => goTo(currentPage + 1),
5072
- className: (0, import_clsx35.default)(buttonClass, "border-l-1 border-border-primary-normal"),
5073
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon, { name: "keyboard_arrow_right" })
5837
+ className: (0, import_clsx36.default)(buttonClass, "border-l-1 border-border-primary-normal"),
5838
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon, { name: "keyboard_arrow_right" })
5074
5839
  }
5075
5840
  )
5076
5841
  ]
@@ -5080,21 +5845,26 @@ var Pagination = ({
5080
5845
  Pagination.displayName = "Pagination";
5081
5846
 
5082
5847
  // src/components/SkeletonParagraph.tsx
5083
- var import_jsx_runtime51 = require("react/jsx-runtime");
5848
+ var import_jsx_runtime53 = require("react/jsx-runtime");
5084
5849
 
5085
5850
  // src/components/EmptyCartIcon.tsx
5086
- var import_jsx_runtime52 = require("react/jsx-runtime");
5851
+ var import_jsx_runtime54 = require("react/jsx-runtime");
5852
+
5853
+ // src/components/Alert.tsx
5854
+ var import_clsx37 = __toESM(require("clsx"), 1);
5855
+ var import_react35 = require("react");
5856
+ var import_jsx_runtime55 = require("react/jsx-runtime");
5087
5857
 
5088
5858
  // src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
5089
- var import_react34 = require("react");
5859
+ var import_react37 = require("react");
5090
5860
 
5091
5861
  // src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
5092
- var import_react33 = require("react");
5093
- var GridContext = (0, import_react33.createContext)(null);
5862
+ var import_react36 = require("react");
5863
+ var GridContext = (0, import_react36.createContext)(null);
5094
5864
 
5095
5865
  // src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
5096
5866
  function useGridContext() {
5097
- const ctx = (0, import_react34.useContext)(GridContext);
5867
+ const ctx = (0, import_react37.useContext)(GridContext);
5098
5868
  if (!ctx) {
5099
5869
  throw new Error("useGridContext must be used within GridContextProvider");
5100
5870
  }
@@ -5102,11 +5872,11 @@ function useGridContext() {
5102
5872
  }
5103
5873
 
5104
5874
  // src/components/MobileDataGrid/ColumnSelector/index.tsx
5105
- var import_jsx_runtime53 = require("react/jsx-runtime");
5875
+ var import_jsx_runtime56 = require("react/jsx-runtime");
5106
5876
  function ColumnSelector() {
5107
5877
  const context = useGridContext();
5108
- const ref = (0, import_react35.useRef)(null);
5109
- const [show, setShow] = (0, import_react35.useState)(false);
5878
+ const ref = (0, import_react38.useRef)(null);
5879
+ const [show, setShow] = (0, import_react38.useState)(false);
5110
5880
  const {
5111
5881
  columns,
5112
5882
  id,
@@ -5117,13 +5887,13 @@ function ColumnSelector() {
5117
5887
  resetColumnVisibility,
5118
5888
  dispatch
5119
5889
  } = context;
5120
- const toggleColumnVisibility = (0, import_react35.useCallback)(
5890
+ const toggleColumnVisibility = (0, import_react38.useCallback)(
5121
5891
  (index, visible) => {
5122
5892
  dispatch({ type: "UPDATE", index, payload: { meta: { visible } } });
5123
5893
  },
5124
5894
  [dispatch]
5125
5895
  );
5126
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
5896
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
5127
5897
  "div",
5128
5898
  {
5129
5899
  id: id ? `${id}-column-selector` : void 0,
@@ -5131,7 +5901,7 @@ function ColumnSelector() {
5131
5901
  className: "text-text-secondary-normal border-l border-brand-200 p-mobile-container-padding",
5132
5902
  ref,
5133
5903
  children: [
5134
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5904
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5135
5905
  Button,
5136
5906
  {
5137
5907
  id: id ? `${id}-button` : void 0,
@@ -5140,10 +5910,10 @@ function ColumnSelector() {
5140
5910
  variant: "navigation",
5141
5911
  iconOnly: true,
5142
5912
  size: 24,
5143
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon, { name: "tune" })
5913
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: "tune" })
5144
5914
  }
5145
5915
  ),
5146
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
5916
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
5147
5917
  Menu,
5148
5918
  {
5149
5919
  id: id ? `${id}-menu` : void 0,
@@ -5154,7 +5924,7 @@ function ColumnSelector() {
5154
5924
  setShow,
5155
5925
  calculateMinMaxHeight: true,
5156
5926
  children: [
5157
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5927
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5158
5928
  Button,
5159
5929
  {
5160
5930
  id: id ? `${id}-reset-button` : void 0,
@@ -5172,11 +5942,11 @@ function ColumnSelector() {
5172
5942
  return (_a = x.meta) == null ? void 0 : _a.inVisibilityMenu;
5173
5943
  }).map((column) => {
5174
5944
  var _a, _b, _c;
5175
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5945
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5176
5946
  MenuOption,
5177
5947
  {
5178
5948
  testid: testid ? `${testid}-option-${column.id}` : void 0,
5179
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5949
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5180
5950
  Checkbox,
5181
5951
  {
5182
5952
  id: id ? `${id}-checkbox-${column.id}` : void 0,
@@ -5206,7 +5976,7 @@ function ColumnSelector() {
5206
5976
  }
5207
5977
 
5208
5978
  // src/components/MobileDataGrid/MobileDataGridHeader.tsx
5209
- var import_jsx_runtime54 = require("react/jsx-runtime");
5979
+ var import_jsx_runtime57 = require("react/jsx-runtime");
5210
5980
  function MobileDataGridHeader({
5211
5981
  header: Header,
5212
5982
  enableColumnSelector,
@@ -5224,15 +5994,15 @@ function MobileDataGridHeader({
5224
5994
  handleRowSelectAll
5225
5995
  } = ctx;
5226
5996
  if (typeof Header === "undefined" && !primaryKey) return null;
5227
- if (typeof Header === "function") return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Header, __spreadValues({}, ctx));
5997
+ if (typeof Header === "function") return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Header, __spreadValues({}, ctx));
5228
5998
  if (typeof Header === "string" || primaryKey)
5229
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
5999
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5230
6000
  "div",
5231
6001
  {
5232
6002
  id: id ? `${id}-header` : void 0,
5233
6003
  "data-testid": testid ? `${testid}-header` : void 0,
5234
6004
  className: "sticky top-0",
5235
- children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Theme, { theme: "brand", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
6005
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Theme, { theme: "brand", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
5236
6006
  Stack,
5237
6007
  {
5238
6008
  horizontal: true,
@@ -5241,7 +6011,7 @@ function MobileDataGridHeader({
5241
6011
  justify: "between",
5242
6012
  backgroundColor: "background-primary-normal",
5243
6013
  children: [
5244
- enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "p-mobile-component-padding border-r border-brand-200 max-w-fit h-full", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
6014
+ enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "p-mobile-component-padding border-r border-brand-200 max-w-fit h-full", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5245
6015
  Checkbox,
5246
6016
  {
5247
6017
  id: id ? `${id}-select-all-checkbox` : void 0,
@@ -5251,7 +6021,7 @@ function MobileDataGridHeader({
5251
6021
  onChange: handleRowSelectAll
5252
6022
  }
5253
6023
  ) }),
5254
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
6024
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5255
6025
  Stack,
5256
6026
  {
5257
6027
  horizontal: true,
@@ -5259,10 +6029,10 @@ function MobileDataGridHeader({
5259
6029
  items: "center",
5260
6030
  sizing: "component",
5261
6031
  padding: true,
5262
- children: /* @__PURE__ */ (0, import_jsx_runtime54.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() })
6032
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.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() })
5263
6033
  }
5264
6034
  ),
5265
- enableColumnSelector && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ColumnSelector, {})
6035
+ enableColumnSelector && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ColumnSelector, {})
5266
6036
  ]
5267
6037
  }
5268
6038
  ) })
@@ -5271,7 +6041,7 @@ function MobileDataGridHeader({
5271
6041
  }
5272
6042
 
5273
6043
  // src/components/MobileDataGrid/GridContextProvider/index.tsx
5274
- var import_react36 = require("react");
6044
+ var import_react39 = require("react");
5275
6045
 
5276
6046
  // src/components/MobileDataGrid/dataGridReducer.ts
5277
6047
  function dataGridReducer(state, action) {
@@ -5301,7 +6071,7 @@ function dataGridReducer(state, action) {
5301
6071
  }
5302
6072
 
5303
6073
  // src/components/MobileDataGrid/GridContextProvider/index.tsx
5304
- var import_jsx_runtime55 = require("react/jsx-runtime");
6074
+ var import_jsx_runtime58 = require("react/jsx-runtime");
5305
6075
  function GridContextProvider(props) {
5306
6076
  const {
5307
6077
  initialColumns,
@@ -5314,10 +6084,10 @@ function GridContextProvider(props) {
5314
6084
  getId,
5315
6085
  onRowSelect
5316
6086
  } = props;
5317
- const [columns, dispatch] = (0, import_react36.useReducer)(dataGridReducer, initialColumns);
5318
- const [selectedRowIds, setSelectedRowIds] = (0, import_react36.useState)([]);
5319
- const [currentRow, setCurrentRow] = (0, import_react36.useState)(null);
5320
- const resetColumnVisibility = (0, import_react36.useCallback)(() => {
6087
+ const [columns, dispatch] = (0, import_react39.useReducer)(dataGridReducer, initialColumns);
6088
+ const [selectedRowIds, setSelectedRowIds] = (0, import_react39.useState)([]);
6089
+ const [currentRow, setCurrentRow] = (0, import_react39.useState)(null);
6090
+ const resetColumnVisibility = (0, import_react39.useCallback)(() => {
5321
6091
  const newColumns = columns.map((column) => {
5322
6092
  var _a;
5323
6093
  const initialColumn = initialColumns.find((c) => c.id === column.id);
@@ -5329,7 +6099,7 @@ function GridContextProvider(props) {
5329
6099
  });
5330
6100
  dispatch({ type: "SET", payload: newColumns });
5331
6101
  }, [columns, initialColumns]);
5332
- const handleRowSelect = (0, import_react36.useCallback)(
6102
+ const handleRowSelect = (0, import_react39.useCallback)(
5333
6103
  (item) => {
5334
6104
  var _a;
5335
6105
  const rowId = (_a = getId(item)) != null ? _a : "";
@@ -5340,7 +6110,7 @@ function GridContextProvider(props) {
5340
6110
  },
5341
6111
  [getId, onRowSelect, selectedRowIds]
5342
6112
  );
5343
- const handleRowSelectAll = (0, import_react36.useCallback)(() => {
6113
+ const handleRowSelectAll = (0, import_react39.useCallback)(() => {
5344
6114
  setSelectedRowIds((prev) => {
5345
6115
  if (prev.length === data.length) {
5346
6116
  return [];
@@ -5348,13 +6118,13 @@ function GridContextProvider(props) {
5348
6118
  return data.map(getId).filter((id2) => id2 !== void 0);
5349
6119
  });
5350
6120
  }, [data, getId]);
5351
- const openRowDetail = (0, import_react36.useCallback)((row) => {
6121
+ const openRowDetail = (0, import_react39.useCallback)((row) => {
5352
6122
  setCurrentRow(row);
5353
6123
  }, []);
5354
- const closeRowDetail = (0, import_react36.useCallback)(() => {
6124
+ const closeRowDetail = (0, import_react39.useCallback)(() => {
5355
6125
  setCurrentRow(null);
5356
6126
  }, []);
5357
- const visibleColumns = (0, import_react36.useMemo)(() => {
6127
+ const visibleColumns = (0, import_react39.useMemo)(() => {
5358
6128
  const effectiveLimit = typeof numberOfColumnsToShow === "number" ? Math.max(numberOfColumnsToShow - 1, 0) : void 0;
5359
6129
  if (primaryKey) {
5360
6130
  const pkColumn = columns.find((col) => col.id === String(primaryKey));
@@ -5372,7 +6142,7 @@ function GridContextProvider(props) {
5372
6142
  return ((_a = x.meta) == null ? void 0 : _a.visible) !== false;
5373
6143
  }).slice(0, effectiveLimit);
5374
6144
  }, [columns, numberOfColumnsToShow, primaryKey]);
5375
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6145
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5376
6146
  GridContext.Provider,
5377
6147
  {
5378
6148
  value: {
@@ -5400,12 +6170,12 @@ function GridContextProvider(props) {
5400
6170
  }
5401
6171
 
5402
6172
  // src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx
5403
- var import_jsx_runtime56 = require("react/jsx-runtime");
6173
+ var import_jsx_runtime59 = require("react/jsx-runtime");
5404
6174
  function MobileDataGridColumn(props) {
5405
6175
  var _a;
5406
6176
  const { column, data } = props;
5407
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "grid grid-cols-2 gap-2 px-3 flex-1", children: [
5408
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Paragraph, { color: "text-secondary-normal", className: "text-left", children: [
6177
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "grid grid-cols-2 gap-2 px-3 flex-1", children: [
6178
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Paragraph, { color: "text-secondary-normal", className: "text-left", children: [
5409
6179
  (_a = column.header) == null ? void 0 : _a.toString(),
5410
6180
  ":"
5411
6181
  ] }),
@@ -5415,28 +6185,28 @@ function MobileDataGridColumn(props) {
5415
6185
  }
5416
6186
 
5417
6187
  // src/components/MobileDataGrid/RowDetailModalProvider/ModalContent.tsx
5418
- var import_jsx_runtime57 = require("react/jsx-runtime");
6188
+ var import_jsx_runtime60 = require("react/jsx-runtime");
5419
6189
  function ModalContent2() {
5420
6190
  const context = useGridContext();
5421
6191
  const { columns, currentRow } = context;
5422
6192
  if (!currentRow) return null;
5423
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Stack, { sizing: "layout-group", children: columns.filter((x) => {
6193
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Stack, { sizing: "layout-group", children: columns.filter((x) => {
5424
6194
  var _a;
5425
6195
  return !((_a = x.id) == null ? void 0 : _a.startsWith("__"));
5426
6196
  }).map(
5427
6197
  (column, index) => {
5428
6198
  var _a, _b;
5429
- return ((_a = column.meta) == null ? void 0 : _a.useCustomRenderer) && column.meta.mobileCell && column.id ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
6199
+ return ((_a = column.meta) == null ? void 0 : _a.useCustomRenderer) && column.meta.mobileCell && column.id ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
5430
6200
  "div",
5431
6201
  {
5432
6202
  className: "grid grid-cols-2 gap-2 px-3 items-center flex-1",
5433
6203
  children: [
5434
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Paragraph, { color: "text-secondary-normal", className: "text-left", children: [
6204
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Paragraph, { color: "text-secondary-normal", className: "text-left", children: [
5435
6205
  (_b = column.header) == null ? void 0 : _b.toString(),
5436
6206
  ":"
5437
6207
  ] }),
5438
6208
  " ",
5439
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6209
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5440
6210
  column.meta.mobileCell,
5441
6211
  {
5442
6212
  column,
@@ -5447,7 +6217,7 @@ function ModalContent2() {
5447
6217
  ]
5448
6218
  },
5449
6219
  `${column.id}-${index}`
5450
- ) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
6220
+ ) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5451
6221
  MobileDataGridColumn,
5452
6222
  {
5453
6223
  column,
@@ -5460,7 +6230,7 @@ function ModalContent2() {
5460
6230
  }
5461
6231
 
5462
6232
  // src/components/MobileDataGrid/RowDetailModalProvider/index.tsx
5463
- var import_jsx_runtime58 = require("react/jsx-runtime");
6233
+ var import_jsx_runtime61 = require("react/jsx-runtime");
5464
6234
  function RowDetailModalProvider() {
5465
6235
  var _a;
5466
6236
  const context = useGridContext();
@@ -5472,7 +6242,7 @@ function RowDetailModalProvider() {
5472
6242
  primaryKey,
5473
6243
  closeRowDetail
5474
6244
  } = context;
5475
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6245
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5476
6246
  Modal,
5477
6247
  {
5478
6248
  fixedHeightScrolling: true,
@@ -5481,7 +6251,7 @@ function RowDetailModalProvider() {
5481
6251
  hideCloseIcon: true,
5482
6252
  size: "medium",
5483
6253
  className: "!p-0",
5484
- headerIcon: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
6254
+ headerIcon: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
5485
6255
  Stack,
5486
6256
  {
5487
6257
  horizontal: true,
@@ -5490,8 +6260,8 @@ function RowDetailModalProvider() {
5490
6260
  justify: "between",
5491
6261
  width: "full",
5492
6262
  children: [
5493
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Heading2, { children: (_a = currentRow == null ? void 0 : currentRow[primaryKey != null ? primaryKey : "id"]) != null ? _a : "Grid Detail" }),
5494
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
6263
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Heading2, { children: (_a = currentRow == null ? void 0 : currentRow[primaryKey != null ? primaryKey : "id"]) != null ? _a : "Grid Detail" }),
6264
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5495
6265
  Button,
5496
6266
  {
5497
6267
  id: id ? `${id}-open-in-new-button` : void 0,
@@ -5499,25 +6269,25 @@ function RowDetailModalProvider() {
5499
6269
  iconOnly: true,
5500
6270
  variant: "tertiary",
5501
6271
  onClick: closeRowDetail,
5502
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: "open_in_new", size: 24 }) })
6272
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { name: "open_in_new", size: 24 }) })
5503
6273
  }
5504
6274
  )
5505
6275
  ]
5506
6276
  }
5507
6277
  ),
5508
- customActions: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button, { onClick: closeRowDetail, className: "w-full", children: "Close" }),
6278
+ customActions: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Button, { onClick: closeRowDetail, className: "w-full", children: "Close" }),
5509
6279
  showButtons: true,
5510
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "bg-white max-h-full flex flex-col flex-grow-1", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ModalContent2, {}) })
6280
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-white max-h-full flex flex-col flex-grow-1", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ModalContent2, {}) })
5511
6281
  }
5512
6282
  );
5513
6283
  }
5514
6284
 
5515
6285
  // src/components/MobileDataGrid/ColumnList.tsx
5516
- var import_clsx37 = __toESM(require("clsx"), 1);
6286
+ var import_clsx39 = __toESM(require("clsx"), 1);
5517
6287
 
5518
6288
  // src/components/MobileDataGrid/MobileDataGridCard/index.tsx
5519
- var import_clsx36 = __toESM(require("clsx"), 1);
5520
- var import_jsx_runtime59 = require("react/jsx-runtime");
6289
+ var import_clsx38 = __toESM(require("clsx"), 1);
6290
+ var import_jsx_runtime62 = require("react/jsx-runtime");
5521
6291
  function MobileDataGridCard({
5522
6292
  renderLink,
5523
6293
  renderChevron = true,
@@ -5529,27 +6299,27 @@ function MobileDataGridCard({
5529
6299
  var _a;
5530
6300
  const context = useGridContext();
5531
6301
  const { id, testid, visibleColumns, getId, handleRowSelect, openRowDetail } = context;
5532
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
6302
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5533
6303
  "li",
5534
6304
  {
5535
6305
  id: id ? `${id}-card-${getId(data)}` : void 0,
5536
6306
  "data-testid": testid ? `${testid}-card-${getId(data)}` : void 0,
5537
- className: (0, import_clsx36.default)(
6307
+ className: (0, import_clsx38.default)(
5538
6308
  "hover:bg-action-100 cursor-pointer list-none",
5539
6309
  selected ? "bg-action-100" : "bg-background-grouped-primary-normal"
5540
6310
  ),
5541
6311
  onClick: () => openRowDetail(data),
5542
6312
  children: [
5543
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Stack, { sizing: "component", children: [
5544
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Stack, { horizontal: true, horizontalMobile: true, items: "center", justify: "between", children: [
5545
- enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6313
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Stack, { sizing: "component", children: [
6314
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Stack, { horizontal: true, horizontalMobile: true, items: "center", justify: "between", children: [
6315
+ enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5546
6316
  Stack,
5547
6317
  {
5548
6318
  sizing: "component",
5549
6319
  padding: true,
5550
6320
  width: "fit",
5551
6321
  onClick: (e) => e.stopPropagation(),
5552
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6322
+ children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5553
6323
  Checkbox,
5554
6324
  {
5555
6325
  id: id ? `${id}-${getId(data)}-select-checkbox` : void 0,
@@ -5560,16 +6330,16 @@ function MobileDataGridCard({
5560
6330
  )
5561
6331
  }
5562
6332
  ),
5563
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6333
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5564
6334
  Stack,
5565
6335
  {
5566
6336
  sizing: "component",
5567
6337
  padding: true,
5568
6338
  onClick: (e) => e.stopPropagation(),
5569
- children: renderLink ? renderLink(data) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Subheader, { children: String((_a = data[context.primaryKey]) != null ? _a : "") })
6339
+ children: renderLink ? renderLink(data) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Subheader, { children: String((_a = data[context.primaryKey]) != null ? _a : "") })
5570
6340
  }
5571
6341
  ),
5572
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6342
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5573
6343
  Stack,
5574
6344
  {
5575
6345
  horizontal: true,
@@ -5582,18 +6352,18 @@ function MobileDataGridCard({
5582
6352
  }
5583
6353
  )
5584
6354
  ] }),
5585
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Stack, { sizing: "layout-group", children: visibleColumns.filter((x) => {
6355
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Stack, { sizing: "layout-group", children: visibleColumns.filter((x) => {
5586
6356
  var _a2, _b;
5587
6357
  return ((_a2 = x.meta) == null ? void 0 : _a2.visible) !== false && !((_b = x.id) == null ? void 0 : _b.startsWith("__"));
5588
6358
  }).map(
5589
6359
  (column, index) => {
5590
6360
  var _a2, _b;
5591
- return ((_a2 = column.meta) == null ? void 0 : _a2.useCustomRenderer) && column.meta.mobileCell && column.id ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
6361
+ return ((_a2 = column.meta) == null ? void 0 : _a2.useCustomRenderer) && column.meta.mobileCell && column.id ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5592
6362
  "div",
5593
6363
  {
5594
6364
  className: "grid grid-cols-2 gap-2 px-3 items-center flex-1",
5595
6365
  children: [
5596
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
6366
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5597
6367
  Paragraph,
5598
6368
  {
5599
6369
  color: "text-secondary-normal",
@@ -5605,7 +6375,7 @@ function MobileDataGridCard({
5605
6375
  }
5606
6376
  ),
5607
6377
  " ",
5608
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6378
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5609
6379
  column.meta.mobileCell,
5610
6380
  {
5611
6381
  column,
@@ -5616,7 +6386,7 @@ function MobileDataGridCard({
5616
6386
  ]
5617
6387
  },
5618
6388
  `${column.id}-${index}`
5619
- ) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
6389
+ ) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5620
6390
  MobileDataGridColumn,
5621
6391
  {
5622
6392
  column,
@@ -5627,14 +6397,14 @@ function MobileDataGridCard({
5627
6397
  }
5628
6398
  ) })
5629
6399
  ] }),
5630
- renderChevron && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Stack, { items: "center", justify: "center", horizontal: true, horizontalMobile: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icon, { name: "keyboard_arrow_down" }) })
6400
+ renderChevron && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Stack, { items: "center", justify: "center", horizontal: true, horizontalMobile: true, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Icon, { name: "keyboard_arrow_down" }) })
5631
6401
  ]
5632
6402
  }
5633
6403
  );
5634
6404
  }
5635
6405
 
5636
6406
  // src/components/MobileDataGrid/ColumnList.tsx
5637
- var import_jsx_runtime60 = require("react/jsx-runtime");
6407
+ var import_jsx_runtime63 = require("react/jsx-runtime");
5638
6408
  function ColumnList(props) {
5639
6409
  const {
5640
6410
  withBorder,
@@ -5646,19 +6416,19 @@ function ColumnList(props) {
5646
6416
  } = props;
5647
6417
  const ctx = useGridContext();
5648
6418
  const { id, testid, data, getId, selectedRowIds } = ctx;
5649
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6419
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5650
6420
  "div",
5651
6421
  {
5652
- className: (0, import_clsx37.default)(
6422
+ className: (0, import_clsx39.default)(
5653
6423
  "flex flex-col flex-1 relative overflow-y-auto overflow-x-hidden",
5654
6424
  !!Footer && "mb-20"
5655
6425
  ),
5656
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
6426
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
5657
6427
  "ul",
5658
6428
  {
5659
6429
  id,
5660
6430
  "data-testid": testid,
5661
- className: (0, import_clsx37.default)(
6431
+ className: (0, import_clsx39.default)(
5662
6432
  "rounded absolute top-0 left-0 w-full flex-1",
5663
6433
  "divide-y divide-border-primary-normal",
5664
6434
  withBorder && "border border-border-primary-normal"
@@ -5666,7 +6436,7 @@ function ColumnList(props) {
5666
6436
  children: [
5667
6437
  data.map((item) => {
5668
6438
  const id2 = getId(item);
5669
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
6439
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5670
6440
  MobileDataGridCard,
5671
6441
  {
5672
6442
  data: item,
@@ -5679,7 +6449,7 @@ function ColumnList(props) {
5679
6449
  id2
5680
6450
  );
5681
6451
  }),
5682
- !!Footer && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "fixed left-0 right-0 bottom-0 flex flex-col w-full min-h-20", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Footer, __spreadValues({}, ctx)) })
6452
+ !!Footer && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "fixed left-0 right-0 bottom-0 flex flex-col w-full min-h-20", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Footer, __spreadValues({}, ctx)) })
5683
6453
  ]
5684
6454
  }
5685
6455
  )
@@ -5688,7 +6458,7 @@ function ColumnList(props) {
5688
6458
  }
5689
6459
 
5690
6460
  // src/components/MobileDataGrid/index.tsx
5691
- var import_jsx_runtime61 = require("react/jsx-runtime");
6461
+ var import_jsx_runtime64 = require("react/jsx-runtime");
5692
6462
  function MobileDataGrid(props) {
5693
6463
  const {
5694
6464
  columns,
@@ -5710,7 +6480,7 @@ function MobileDataGrid(props) {
5710
6480
  rowActions,
5711
6481
  rounded
5712
6482
  } = props;
5713
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
6483
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
5714
6484
  GridContextProvider,
5715
6485
  {
5716
6486
  initialColumns: columns,
@@ -5722,7 +6492,7 @@ function MobileDataGrid(props) {
5722
6492
  numberOfColumnsToShow,
5723
6493
  primaryKey,
5724
6494
  children: [
5725
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
6495
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
5726
6496
  Stack,
5727
6497
  {
5728
6498
  height: "full",
@@ -5730,7 +6500,7 @@ function MobileDataGrid(props) {
5730
6500
  overflowX: "hidden",
5731
6501
  overflowY: "hidden",
5732
6502
  children: [
5733
- !hideHeader && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
6503
+ !hideHeader && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5734
6504
  MobileDataGridHeader,
5735
6505
  {
5736
6506
  header,
@@ -5738,7 +6508,7 @@ function MobileDataGrid(props) {
5738
6508
  enableRowSelection
5739
6509
  }
5740
6510
  ),
5741
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
6511
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5742
6512
  ColumnList,
5743
6513
  {
5744
6514
  withBorder,
@@ -5752,7 +6522,7 @@ function MobileDataGrid(props) {
5752
6522
  ]
5753
6523
  }
5754
6524
  ),
5755
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(RowDetailModalProvider, {})
6525
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(RowDetailModalProvider, {})
5756
6526
  ]
5757
6527
  }
5758
6528
  );