@dmsi/wedgekit-react 0.0.476 → 0.0.478

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 (33) hide show
  1. package/dist/{chunk-HSJ34DOK.js → chunk-WIDUWFLX.js} +748 -34
  2. package/dist/components/CalendarRange.cjs +452 -152
  3. package/dist/components/CalendarRange.js +1 -2
  4. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +916 -151
  5. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +1 -1
  6. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +926 -161
  7. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +1 -1
  8. package/dist/components/DataGrid/PinnedColumns.cjs +941 -176
  9. package/dist/components/DataGrid/PinnedColumns.js +1 -1
  10. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +917 -152
  11. package/dist/components/DataGrid/TableBody/LoadingCell.js +1 -1
  12. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +923 -158
  13. package/dist/components/DataGrid/TableBody/TableBodyRow.js +1 -1
  14. package/dist/components/DataGrid/TableBody/index.cjs +938 -173
  15. package/dist/components/DataGrid/TableBody/index.js +1 -1
  16. package/dist/components/DataGrid/index.cjs +1027 -262
  17. package/dist/components/DataGrid/index.js +1 -1
  18. package/dist/components/DataGrid/utils.cjs +917 -152
  19. package/dist/components/DataGrid/utils.js +1 -1
  20. package/dist/components/DateInput.js +7 -254
  21. package/dist/components/DateRangeInput.cjs +406 -176
  22. package/dist/components/DateRangeInput.js +1 -2
  23. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +923 -158
  24. package/dist/components/MobileDataGrid/ColumnSelector/index.js +1 -1
  25. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +921 -156
  26. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +1 -1
  27. package/dist/components/MobileDataGrid/index.cjs +971 -206
  28. package/dist/components/MobileDataGrid/index.js +1 -1
  29. package/dist/components/index.cjs +1145 -378
  30. package/dist/components/index.js +3 -1
  31. package/package.json +1 -1
  32. package/src/components/index.ts +1 -0
  33. package/dist/chunk-X35NLL3N.js +0 -493
@@ -473,6 +473,76 @@ function formatCurrencyDisplay(value) {
473
473
  }
474
474
 
475
475
  // src/utils/date.ts
476
+ function parseInputDate(input) {
477
+ const match = input.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);
478
+ if (!match) {
479
+ return null;
480
+ }
481
+ const [, month, day, year] = match;
482
+ const paddedMonth = month.padStart(2, "0");
483
+ const paddedDay = day.padStart(2, "0");
484
+ return `${year}-${paddedMonth}-${paddedDay}`;
485
+ }
486
+ function isValidDate(dateString) {
487
+ const date = new Date(dateString);
488
+ return date instanceof Date && !isNaN(date.getTime()) && dateString === date.toISOString().split("T")[0];
489
+ }
490
+ function formatInputValue(value) {
491
+ const digits = value.replace(/\D/g, "");
492
+ if (digits.length < 2) {
493
+ return digits;
494
+ }
495
+ if (digits.length >= 4) {
496
+ return `${digits.slice(0, 2)}/${digits.slice(2, 4)}/${digits.slice(4, 8)}`;
497
+ }
498
+ return `${digits.slice(0, 2)}/${digits.slice(2)}`;
499
+ }
500
+ function isDigit(character) {
501
+ return /\d/.test(character);
502
+ }
503
+ function isSlash(character) {
504
+ return character === "/";
505
+ }
506
+ function countDigitsUpToCursor(value, cursorPosition) {
507
+ let digitCount = 0;
508
+ for (let i = 0; i < cursorPosition && i < value.length; i++) {
509
+ if (!isDigit(value[i])) {
510
+ continue;
511
+ }
512
+ digitCount++;
513
+ }
514
+ return digitCount;
515
+ }
516
+ function findPositionAfterDigitCount(formattedValue, targetDigitCount) {
517
+ let currentDigitCount = 0;
518
+ for (let i = 0; i < formattedValue.length; i++) {
519
+ if (!isDigit(formattedValue[i])) {
520
+ continue;
521
+ }
522
+ currentDigitCount++;
523
+ if (currentDigitCount !== targetDigitCount) {
524
+ continue;
525
+ }
526
+ const positionAfterDigit = i + 1;
527
+ const nextCharacter = formattedValue[positionAfterDigit];
528
+ if (nextCharacter && isSlash(nextCharacter)) {
529
+ return positionAfterDigit + 1;
530
+ }
531
+ return positionAfterDigit;
532
+ }
533
+ return formattedValue.length;
534
+ }
535
+ function calculateCursorPosition(originalValue, formattedValue, originalPosition) {
536
+ const targetDigitCount = countDigitsUpToCursor(
537
+ originalValue,
538
+ originalPosition
539
+ );
540
+ const newPosition = findPositionAfterDigitCount(
541
+ formattedValue,
542
+ targetDigitCount
543
+ );
544
+ return Math.min(newPosition, formattedValue.length);
545
+ }
476
546
  function parseDateParts(dateString) {
477
547
  const [yearStr, monthStr, dayStr] = dateString.split("-");
478
548
  if (!yearStr || !monthStr || !dayStr) {
@@ -3804,23 +3874,718 @@ var Tooltip = ({
3804
3874
  };
3805
3875
  Tooltip.displayName = "Tooltip";
3806
3876
 
3807
- // src/components/Accordion.tsx
3808
- var import_clsx20 = __toESM(require("clsx"), 1);
3877
+ // src/components/DateInput.tsx
3878
+ var import_react17 = require("react");
3879
+ var import_react_dom3 = require("react-dom");
3809
3880
 
3810
- // src/components/Card.tsx
3881
+ // src/components/CalendarRange.tsx
3811
3882
  var import_clsx18 = __toESM(require("clsx"), 1);
3883
+ var import_react16 = __toESM(require("react"), 1);
3884
+ var import_polyfill = require("@js-temporal/polyfill");
3812
3885
  var import_jsx_runtime19 = require("react/jsx-runtime");
3886
+ function DateCell(_a) {
3887
+ var _b = _a, {
3888
+ date,
3889
+ isInMonth,
3890
+ isToday,
3891
+ isSelected,
3892
+ inRange,
3893
+ isDisabled,
3894
+ isRangeStart,
3895
+ isRangeEnd,
3896
+ onClick,
3897
+ onMouseEnter,
3898
+ onMouseLeave,
3899
+ cellPadding = "",
3900
+ isRangeDisabled = false,
3901
+ id,
3902
+ testid
3903
+ } = _b, props = __objRest(_b, [
3904
+ "date",
3905
+ "isInMonth",
3906
+ "isToday",
3907
+ "isSelected",
3908
+ "inRange",
3909
+ "isDisabled",
3910
+ "isRangeStart",
3911
+ "isRangeEnd",
3912
+ "onClick",
3913
+ "onMouseEnter",
3914
+ "onMouseLeave",
3915
+ "cellPadding",
3916
+ "isRangeDisabled",
3917
+ "id",
3918
+ "testid"
3919
+ ]);
3920
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3921
+ "span",
3922
+ __spreadProps(__spreadValues({}, props), {
3923
+ id,
3924
+ "data-testid": testid,
3925
+ className: (0, import_clsx18.default)(
3926
+ "flex items-center justify-center aspect-square select-none transition-colors border duration-100 font-medium",
3927
+ typography.caption,
3928
+ cellPadding,
3929
+ !isToday && !isSelected && !inRange && !isDisabled && !isRangeStart && !isRangeEnd && "border-transparent",
3930
+ !isInMonth && "border-transparent",
3931
+ // Today: subtle border ring
3932
+ isToday && !isSelected && !inRange && "rounded-full border-border-primary-normal ",
3933
+ // Selected: Figma blue, white text, strong shadow
3934
+ isSelected && "bg-action-400 text-white border-action-400 z-10",
3935
+ !isSelected && !inRange && "rounded-base",
3936
+ // When range is disabled OR when only 'from' is selected (no range yet), apply rounded corners
3937
+ (isRangeDisabled || !inRange && isSelected) && "rounded-base",
3938
+ inRange && isSelected && "hover:border-action-500",
3939
+ // In range: Figma light blue background
3940
+ inRange && !isSelected && "bg-action-100 text-text-primary-normal border-y-action-400 border-x-0 ",
3941
+ // Disabled: Figma gray, no pointer, no hover
3942
+ isDisabled && !inRange ? "text-text-primary-disabled bg-transparent pointer-events-none opacity-40 border-transparent" : [
3943
+ "text-text-primary-normal cursor-pointer",
3944
+ // Figma hover: blue bg, blue text (or red text if selected)
3945
+ isSelected ? "hover:bg-background-action-primary-hover hover:text-white" : "hover:bg-action-100 hover:text-text-action-primary-hover",
3946
+ // Figma active: darker blue bg, white text
3947
+ "active:bg-action-300 active:text-white",
3948
+ // Figma focus: ring
3949
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-400"
3950
+ ],
3951
+ isRangeStart && "rounded-l",
3952
+ isRangeEnd && "rounded-r"
3953
+ ),
3954
+ tabIndex: isDisabled ? -1 : 0,
3955
+ "aria-disabled": isDisabled,
3956
+ onClick: () => !isDisabled && isInMonth && onClick(),
3957
+ onMouseEnter: () => isInMonth && onMouseEnter(),
3958
+ onMouseLeave: () => isInMonth && onMouseLeave(),
3959
+ children: isInMonth ? date.day : ""
3960
+ })
3961
+ );
3962
+ }
3963
+ function CalendarRange({
3964
+ from,
3965
+ to,
3966
+ onChange,
3967
+ isDateAvailable,
3968
+ mode = "double",
3969
+ cardStyle = false,
3970
+ disableRange = false,
3971
+ id,
3972
+ testid
3973
+ }) {
3974
+ const weekDays = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
3975
+ const parseDate = (d) => {
3976
+ if (!d) {
3977
+ return void 0;
3978
+ }
3979
+ try {
3980
+ if (typeof d === "number") {
3981
+ return import_polyfill.Temporal.PlainDate.from(new Date(d).toISOString().slice(0, 10));
3982
+ }
3983
+ if (typeof d === "string") {
3984
+ return import_polyfill.Temporal.PlainDate.from(d);
3985
+ }
3986
+ return void 0;
3987
+ } catch (error) {
3988
+ console.error("Invalid date format:", d, error);
3989
+ return import_polyfill.Temporal.Now.plainDateISO();
3990
+ }
3991
+ };
3992
+ const fromDate = parseDate(from);
3993
+ const toDate = parseDate(to);
3994
+ const today = import_polyfill.Temporal.Now.plainDateISO();
3995
+ const [baseMonth, setBaseMonth] = (0, import_react16.useState)(
3996
+ fromDate != null ? fromDate : today.with({ day: 1 })
3997
+ );
3998
+ const [selecting, setSelecting] = (0, import_react16.useState)("from");
3999
+ const [pendingFrom, setPendingFrom] = (0, import_react16.useState)(void 0);
4000
+ const [hoveredDate, setHoveredDate] = (0, import_react16.useState)(void 0);
4001
+ (0, import_react16.useEffect)(() => {
4002
+ if (fromDate) {
4003
+ setBaseMonth(fromDate.with({ day: 1 }));
4004
+ } else if (toDate) {
4005
+ setBaseMonth(toDate.with({ day: 1 }));
4006
+ }
4007
+ }, [from, to]);
4008
+ (0, import_react16.useEffect)(() => {
4009
+ if (fromDate && toDate) {
4010
+ setSelecting("from");
4011
+ setPendingFrom(void 0);
4012
+ setHoveredDate(void 0);
4013
+ }
4014
+ }, [from, to]);
4015
+ function getMonthData(monthOffset) {
4016
+ const monthDate = baseMonth.add({ months: monthOffset }).with({ day: 1 });
4017
+ const days = monthDate.daysInMonth;
4018
+ const firstDayOffset = monthDate.dayOfWeek % 7;
4019
+ return {
4020
+ name: monthDate.toLocaleString("en-US", { month: "long" }),
4021
+ year: monthDate.year,
4022
+ days,
4023
+ firstDayOffset,
4024
+ date: monthDate
4025
+ };
4026
+ }
4027
+ function getMonthDataWith(monthOffset) {
4028
+ const monthDate = baseMonth.with({ month: monthOffset }).with({ day: 1 });
4029
+ const days = monthDate.daysInMonth;
4030
+ const firstDayOffset = monthDate.dayOfWeek % 7;
4031
+ return {
4032
+ name: monthDate.toLocaleString("en-US", { month: "long" }),
4033
+ year: monthDate.year,
4034
+ days,
4035
+ firstDayOffset,
4036
+ date: monthDate
4037
+ };
4038
+ }
4039
+ function handleDayClick(date) {
4040
+ if (isDateAvailable && !isDateAvailable(date)) return;
4041
+ if (mode === "single" && disableRange) {
4042
+ if (onChange) {
4043
+ onChange(date.toString(), date.toString());
4044
+ }
4045
+ return;
4046
+ }
4047
+ if (selecting === "from") {
4048
+ setPendingFrom(date);
4049
+ setSelecting("to");
4050
+ setHoveredDate(void 0);
4051
+ } else if (pendingFrom) {
4052
+ if (onChange) {
4053
+ const [start, end] = import_polyfill.Temporal.PlainDate.compare(date, pendingFrom) < 0 ? [date, pendingFrom] : [pendingFrom, date];
4054
+ onChange(start.toString(), end.toString());
4055
+ }
4056
+ setPendingFrom(void 0);
4057
+ setSelecting("from");
4058
+ setHoveredDate(void 0);
4059
+ }
4060
+ }
4061
+ function isInRange(date) {
4062
+ if (mode === "single" && disableRange) {
4063
+ return false;
4064
+ }
4065
+ if (pendingFrom && selecting === "to" && hoveredDate) {
4066
+ const [start, end] = import_polyfill.Temporal.PlainDate.compare(hoveredDate, pendingFrom) < 0 ? [hoveredDate, pendingFrom] : [pendingFrom, hoveredDate];
4067
+ return import_polyfill.Temporal.PlainDate.compare(date, start) >= 0 && import_polyfill.Temporal.PlainDate.compare(date, end) <= 0;
4068
+ }
4069
+ if (!pendingFrom && fromDate && toDate) {
4070
+ return import_polyfill.Temporal.PlainDate.compare(date, fromDate) >= 0 && import_polyfill.Temporal.PlainDate.compare(date, toDate) <= 0;
4071
+ }
4072
+ return false;
4073
+ }
4074
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4075
+ "div",
4076
+ {
4077
+ id,
4078
+ "data-testid": testid,
4079
+ className: (0, import_clsx18.default)(
4080
+ "relative bg-background-grouped-primary-normal rounded-base w-fit",
4081
+ layoutPaddding,
4082
+ layoutGap,
4083
+ cardStyle && "shadow-4",
4084
+ // baseTransition,
4085
+ "overflow-hidden"
4086
+ ),
4087
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4088
+ "div",
4089
+ {
4090
+ className: (0, import_clsx18.default)(
4091
+ "flex flex-row items-start justify-start bg-background-primary-normal overflow-clip",
4092
+ layoutGap
4093
+ ),
4094
+ children: (mode === "double" ? [0, 1] : [0]).map((offset, idx) => {
4095
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4096
+ CalendarPane,
4097
+ {
4098
+ getMonthData,
4099
+ getMonthDataWith,
4100
+ offset,
4101
+ idx,
4102
+ id,
4103
+ testid,
4104
+ baseMonth,
4105
+ setBaseMonth,
4106
+ mode,
4107
+ pendingFrom,
4108
+ weekDays,
4109
+ fromDate,
4110
+ toDate,
4111
+ isDateAvailable,
4112
+ disableRange,
4113
+ hoveredDate,
4114
+ isInRange,
4115
+ today,
4116
+ setHoveredDate,
4117
+ handleDayClick
4118
+ },
4119
+ idx
4120
+ );
4121
+ })
4122
+ }
4123
+ )
4124
+ }
4125
+ );
4126
+ }
4127
+ function CalendarPane({
4128
+ getMonthData,
4129
+ getMonthDataWith,
4130
+ offset,
4131
+ idx,
4132
+ id,
4133
+ testid,
4134
+ baseMonth,
4135
+ setBaseMonth,
4136
+ mode,
4137
+ pendingFrom,
4138
+ weekDays,
4139
+ fromDate,
4140
+ toDate,
4141
+ isDateAvailable,
4142
+ disableRange,
4143
+ hoveredDate,
4144
+ isInRange,
4145
+ today,
4146
+ setHoveredDate,
4147
+ handleDayClick
4148
+ }) {
4149
+ const months = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
4150
+ const years = Array.from({ length: 100 }).map(
4151
+ (_, i) => baseMonth.year - 50 + i
4152
+ );
4153
+ const [monthMenuOpen, setMonthMenuOpen] = (0, import_react16.useState)(false);
4154
+ const [yearMenuOpen, setYearMenuOpen] = (0, import_react16.useState)(false);
4155
+ const monthMenuRef = (0, import_react16.useRef)(null);
4156
+ const yearMenuRef = (0, import_react16.useRef)(null);
4157
+ const month = getMonthData(offset);
4158
+ const totalCells = 42;
4159
+ const emptyCells = month.firstDayOffset;
4160
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react16.default.Fragment, { children: [
4161
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
4162
+ "div",
4163
+ {
4164
+ className: (0, import_clsx18.default)("flex flex-col"),
4165
+ children: [
4166
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
4167
+ "div",
4168
+ {
4169
+ className: (0, import_clsx18.default)(
4170
+ "flex flex-row items-center justify-between",
4171
+ typography.label,
4172
+ "text-text-action-primary-normal"
4173
+ ),
4174
+ children: [
4175
+ idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4176
+ "button",
4177
+ {
4178
+ id: id ? `${id}-prev-month-button` : void 0,
4179
+ "data-testid": testid ? `${testid}-prev-month-button` : void 0,
4180
+ type: "button",
4181
+ className: (0, import_clsx18.default)(
4182
+ "flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
4183
+ componentPadding
4184
+ ),
4185
+ "aria-label": "Previous month",
4186
+ onClick: () => setBaseMonth(baseMonth.subtract({ months: 1 })),
4187
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: "chevron_left", size: 24 })
4188
+ }
4189
+ ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: (0, import_clsx18.default)(componentPadding, "mr-1") }),
4190
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex gap-desktop-compact-component-padding", children: [
4191
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4192
+ "button",
4193
+ {
4194
+ ref: (el) => {
4195
+ monthMenuRef.current = el;
4196
+ },
4197
+ type: "button",
4198
+ onClick: () => {
4199
+ setMonthMenuOpen(true);
4200
+ setYearMenuOpen(false);
4201
+ },
4202
+ className: "font-semibold text-text-action-primary-normal text-[14px] py-[2px] truncate",
4203
+ children: month.name
4204
+ }
4205
+ ),
4206
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4207
+ Menu,
4208
+ {
4209
+ show: monthMenuOpen,
4210
+ positionTo: monthMenuRef,
4211
+ setShow: () => setMonthMenuOpen(false),
4212
+ children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4213
+ MenuOption,
4214
+ {
4215
+ selected: baseMonth.month === x + 1,
4216
+ onClick: () => {
4217
+ setBaseMonth(baseMonth.with({ month: x + 1 }));
4218
+ setMonthMenuOpen(false);
4219
+ },
4220
+ children: m.name
4221
+ },
4222
+ m.name
4223
+ ))
4224
+ }
4225
+ ),
4226
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4227
+ "button",
4228
+ {
4229
+ ref: (el) => {
4230
+ yearMenuRef.current = el;
4231
+ },
4232
+ type: "button",
4233
+ onClick: () => {
4234
+ setYearMenuOpen(true);
4235
+ setMonthMenuOpen(false);
4236
+ },
4237
+ className: "font-semibold text-text-action-primary-normal text-[14px] py-[2px] truncate",
4238
+ children: month.year
4239
+ }
4240
+ ),
4241
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4242
+ Menu,
4243
+ {
4244
+ show: yearMenuOpen,
4245
+ positionTo: yearMenuRef,
4246
+ setShow: () => setYearMenuOpen(false),
4247
+ children: years.map((y) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4248
+ MenuOption,
4249
+ {
4250
+ selected: baseMonth.year === y,
4251
+ onClick: () => {
4252
+ setBaseMonth(baseMonth.with({ year: y }));
4253
+ setYearMenuOpen(false);
4254
+ },
4255
+ children: y
4256
+ },
4257
+ y
4258
+ ))
4259
+ }
4260
+ )
4261
+ ] }),
4262
+ (mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4263
+ "button",
4264
+ {
4265
+ id: id ? `${id}-next-month-button` : void 0,
4266
+ "data-testid": testid ? `${testid}-next-month-button` : void 0,
4267
+ type: "button",
4268
+ className: (0, import_clsx18.default)(
4269
+ "flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
4270
+ componentPadding
4271
+ ),
4272
+ "aria-label": "Next month",
4273
+ onClick: () => setBaseMonth(baseMonth.add({ months: 1 })),
4274
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { name: "chevron_right", size: 24 })
4275
+ }
4276
+ ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: (0, import_clsx18.default)(componentPadding, "ml-1") })
4277
+ ]
4278
+ }
4279
+ ),
4280
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0, import_clsx18.default)("grid grid-cols-7"), children: weekDays.map((d) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4281
+ "span",
4282
+ {
4283
+ className: (0, import_clsx18.default)(
4284
+ typography.caption,
4285
+ "text-text-secondary-normal text-center",
4286
+ "w-10"
4287
+ ),
4288
+ children: d
4289
+ },
4290
+ d
4291
+ )) }),
4292
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0, import_clsx18.default)("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
4293
+ const day = i - emptyCells + 1;
4294
+ const date = month.date.with({ day: 1 }).add({
4295
+ days: i - emptyCells
4296
+ });
4297
+ const isInMonth = day > 0 && day <= month.days;
4298
+ const isToday = isInMonth && date.equals(today);
4299
+ const isSelected = isInMonth && (!pendingFrom && fromDate && date.equals(fromDate) || !pendingFrom && toDate && date.equals(toDate) || pendingFrom && date.equals(pendingFrom));
4300
+ const inRange = isInMonth && isInRange(date);
4301
+ const isDisabled = !isInMonth || (isDateAvailable ? !isDateAvailable(date) : false);
4302
+ const hoverDateIsBeforePendingFrom = hoveredDate && pendingFrom && import_polyfill.Temporal.PlainDate.compare(hoveredDate, pendingFrom) < 0;
4303
+ const hoverDateIsAfterPendingFrom = hoveredDate && pendingFrom && import_polyfill.Temporal.PlainDate.compare(hoveredDate, pendingFrom) >= 0;
4304
+ const isRangeStart = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && fromDate && date.equals(fromDate) || hoverDateIsAfterPendingFrom && date.equals(pendingFrom);
4305
+ const isRangeEnd = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && toDate && date.equals(toDate) || hoverDateIsBeforePendingFrom && date.equals(pendingFrom);
4306
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4307
+ DateCell,
4308
+ {
4309
+ id: id ? `${id}-date-${date.toString()}` : void 0,
4310
+ testid: testid ? `${testid}-date-${date.toString()}` : void 0,
4311
+ date,
4312
+ isInMonth: !!isInMonth,
4313
+ isToday: !!isToday,
4314
+ isSelected: !!isSelected,
4315
+ inRange: !!inRange,
4316
+ isDisabled: !!isDisabled,
4317
+ onClick: () => handleDayClick(date),
4318
+ onMouseEnter: () => setHoveredDate(date),
4319
+ onMouseLeave: () => setHoveredDate(void 0),
4320
+ isRangeStart: !!isRangeStart,
4321
+ isRangeEnd: !!isRangeEnd,
4322
+ isRangeDisabled: mode === "single" && disableRange,
4323
+ cellPadding: componentPadding
4324
+ },
4325
+ i
4326
+ );
4327
+ }) })
4328
+ ]
4329
+ }
4330
+ ),
4331
+ mode === "double" && idx === 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4332
+ "div",
4333
+ {
4334
+ className: (0, import_clsx18.default)(
4335
+ "self-stretch bg-border-primary-normal rounded-base",
4336
+ // 1px width, full height, matches Figma divider
4337
+ "w-px"
4338
+ )
4339
+ }
4340
+ )
4341
+ ] }, month.name + month.year);
4342
+ }
3813
4343
 
3814
- // src/components/Stack.tsx
3815
- var import_clsx19 = __toESM(require("clsx"), 1);
4344
+ // src/components/DateInput.tsx
3816
4345
  var import_jsx_runtime20 = require("react/jsx-runtime");
4346
+ var DateInput = (_a) => {
4347
+ var _b = _a, {
4348
+ id,
4349
+ testid,
4350
+ value,
4351
+ onChange,
4352
+ placeholder = "MM/DD/YYYY",
4353
+ disabled,
4354
+ readOnly = false,
4355
+ label
4356
+ } = _b, props = __objRest(_b, [
4357
+ "id",
4358
+ "testid",
4359
+ "value",
4360
+ "onChange",
4361
+ "placeholder",
4362
+ "disabled",
4363
+ "readOnly",
4364
+ "label"
4365
+ ]);
4366
+ const [visible, setVisible] = (0, import_react17.useState)(false);
4367
+ const [inputValue, setInputValue] = (0, import_react17.useState)("");
4368
+ const [isTyping, setIsTyping] = (0, import_react17.useState)(false);
4369
+ const popoverRef = (0, import_react17.useRef)(null);
4370
+ const triggerRef = (0, import_react17.useRef)(null);
4371
+ const rootRef = (0, import_react17.useRef)(null);
4372
+ const [calendarPosition, setCalendarPosition] = (0, import_react17.useState)({
4373
+ top: 0,
4374
+ left: 0,
4375
+ width: 0
4376
+ });
4377
+ const [from, to] = [value, ""];
4378
+ (0, import_react17.useEffect)(() => {
4379
+ if (!isTyping) {
4380
+ setInputValue(formatDisplayValue(from));
4381
+ }
4382
+ }, [from, isTyping]);
4383
+ (0, import_react17.useLayoutEffect)(() => {
4384
+ if (visible) {
4385
+ updatePosition();
4386
+ }
4387
+ }, [visible]);
4388
+ const updatePosition = () => {
4389
+ if (rootRef.current) {
4390
+ const rect = rootRef.current.getBoundingClientRect();
4391
+ setCalendarPosition({
4392
+ top: rect.bottom + window.scrollY,
4393
+ left: rect.left + window.scrollX,
4394
+ width: rect.width
4395
+ });
4396
+ }
4397
+ };
4398
+ (0, import_react17.useEffect)(() => {
4399
+ updatePosition();
4400
+ const resizeObserver = new ResizeObserver(updatePosition);
4401
+ if (triggerRef.current) {
4402
+ resizeObserver.observe(triggerRef.current);
4403
+ }
4404
+ window.addEventListener("scroll", updatePosition);
4405
+ return () => {
4406
+ resizeObserver.disconnect();
4407
+ window.removeEventListener("scroll", updatePosition);
4408
+ };
4409
+ }, []);
4410
+ (0, import_react17.useEffect)(() => {
4411
+ const handleKeyDown2 = (event) => {
4412
+ var _a2;
4413
+ if (event.key === "Escape" && popoverRef.current) {
4414
+ setVisible(false);
4415
+ (_a2 = triggerRef.current) == null ? void 0 : _a2.blur();
4416
+ }
4417
+ };
4418
+ document.addEventListener("keydown", handleKeyDown2);
4419
+ return () => {
4420
+ document.removeEventListener("keydown", handleKeyDown2);
4421
+ };
4422
+ });
4423
+ (0, import_react17.useEffect)(() => {
4424
+ const handleClickOutside = (event) => {
4425
+ if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
4426
+ setVisible(false);
4427
+ }
4428
+ };
4429
+ document.addEventListener("mousedown", handleClickOutside);
4430
+ return () => {
4431
+ document.removeEventListener("mousedown", handleClickOutside);
4432
+ };
4433
+ }, []);
4434
+ function handleDateChange(fromValue) {
4435
+ onChange(fromValue);
4436
+ setVisible(false);
4437
+ setIsTyping(false);
4438
+ }
4439
+ const handleFocus = () => {
4440
+ if (readOnly) return;
4441
+ setVisible(true);
4442
+ };
4443
+ const handleClick = () => {
4444
+ handleFocus();
4445
+ };
4446
+ const handleInputChange = (event) => {
4447
+ if (readOnly) return;
4448
+ const rawValue = event.target.value;
4449
+ const cursorPosition = event.target.selectionStart || 0;
4450
+ setIsTyping(true);
4451
+ const formattedValue = formatInputValue(rawValue);
4452
+ setInputValue(formattedValue);
4453
+ requestAnimationFrame(() => {
4454
+ if (triggerRef.current) {
4455
+ const newPosition = calculateCursorPosition(
4456
+ rawValue,
4457
+ formattedValue,
4458
+ cursorPosition
4459
+ );
4460
+ triggerRef.current.setSelectionRange(newPosition, newPosition);
4461
+ }
4462
+ });
4463
+ const parsedDate = parseInputDate(formattedValue);
4464
+ if (parsedDate && isValidDate(parsedDate)) {
4465
+ onChange(parsedDate);
4466
+ }
4467
+ };
4468
+ const handleBlur = () => {
4469
+ setIsTyping(false);
4470
+ const parsedDate = parseInputDate(inputValue);
4471
+ if (!parsedDate || !isValidDate(parsedDate)) {
4472
+ setInputValue(formatDisplayValue(from));
4473
+ }
4474
+ };
4475
+ const handleKeyDown = (event) => {
4476
+ if (event.key === "Backspace") {
4477
+ const input = event.target;
4478
+ const cursorPosition = input.selectionStart || 0;
4479
+ const value2 = input.value;
4480
+ if (cursorPosition > 0 && value2[cursorPosition - 1] === "/") {
4481
+ event.preventDefault();
4482
+ const newValue = value2.slice(0, cursorPosition - 2) + value2.slice(cursorPosition);
4483
+ const formattedValue = formatInputValue(newValue);
4484
+ setInputValue(formattedValue);
4485
+ requestAnimationFrame(() => {
4486
+ if (triggerRef.current) {
4487
+ const newPosition = Math.max(0, cursorPosition - 2);
4488
+ triggerRef.current.setSelectionRange(newPosition, newPosition);
4489
+ }
4490
+ });
4491
+ setIsTyping(true);
4492
+ return;
4493
+ }
4494
+ }
4495
+ if (event.key === "Enter") {
4496
+ const parsedDate = parseInputDate(inputValue);
4497
+ if (parsedDate && isValidDate(parsedDate)) {
4498
+ onChange(parsedDate);
4499
+ setVisible(false);
4500
+ setIsTyping(false);
4501
+ }
4502
+ }
4503
+ };
4504
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "relative", children: [
4505
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
4506
+ InputBase,
4507
+ __spreadProps(__spreadValues({
4508
+ id,
4509
+ testid,
4510
+ ref: (el) => {
4511
+ triggerRef.current = el;
4512
+ }
4513
+ }, props), {
4514
+ wrapperRef: rootRef,
4515
+ value: inputValue,
4516
+ placeholder,
4517
+ disabled,
4518
+ readOnly,
4519
+ after: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { name: "calendar_month" }),
4520
+ onFocus: handleFocus,
4521
+ onClick: handleClick,
4522
+ onChange: handleInputChange,
4523
+ onBlur: handleBlur,
4524
+ onKeyDown: handleKeyDown,
4525
+ label,
4526
+ secondaryIconColor: true
4527
+ })
4528
+ ),
4529
+ visible && !readOnly && (0, import_react_dom3.createPortal)(
4530
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
4531
+ "div",
4532
+ {
4533
+ ref: (el) => {
4534
+ popoverRef.current = el;
4535
+ },
4536
+ className: "absolute z-40 bg-white",
4537
+ style: {
4538
+ top: `${calendarPosition.top + 4}px`,
4539
+ left: `${calendarPosition.left}px`,
4540
+ minWidth: `${calendarPosition.width}px`
4541
+ },
4542
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
4543
+ CalendarRange,
4544
+ {
4545
+ id: id ? `${id}-calendar` : void 0,
4546
+ testid: testid ? `${testid}-calendar` : void 0,
4547
+ from,
4548
+ to: to || from,
4549
+ onChange: handleDateChange,
4550
+ cardStyle: true,
4551
+ mode: "single",
4552
+ disableRange: true
4553
+ }
4554
+ )
4555
+ }
4556
+ ),
4557
+ findDocumentRoot(popoverRef.current)
4558
+ )
4559
+ ] });
4560
+ };
4561
+ DateInput.displayName = "DateInput";
4562
+ function formatDisplayValue(from) {
4563
+ if (!from) {
4564
+ return "";
4565
+ }
4566
+ if (!isValidDate(from)) {
4567
+ return "";
4568
+ }
4569
+ return formatDate(from);
4570
+ }
3817
4571
 
3818
4572
  // src/components/Accordion.tsx
4573
+ var import_clsx21 = __toESM(require("clsx"), 1);
4574
+
4575
+ // src/components/Card.tsx
4576
+ var import_clsx19 = __toESM(require("clsx"), 1);
3819
4577
  var import_jsx_runtime21 = require("react/jsx-runtime");
3820
4578
 
3821
- // src/components/Heading.tsx
3822
- var import_clsx21 = __toESM(require("clsx"), 1);
4579
+ // src/components/Stack.tsx
4580
+ var import_clsx20 = __toESM(require("clsx"), 1);
3823
4581
  var import_jsx_runtime22 = require("react/jsx-runtime");
4582
+
4583
+ // src/components/Accordion.tsx
4584
+ var import_jsx_runtime23 = require("react/jsx-runtime");
4585
+
4586
+ // src/components/Heading.tsx
4587
+ var import_clsx22 = __toESM(require("clsx"), 1);
4588
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3824
4589
  var Heading = (_a) => {
3825
4590
  var _b = _a, {
3826
4591
  className,
@@ -3843,12 +4608,12 @@ var Heading = (_a) => {
3843
4608
  ]);
3844
4609
  const defaultElement = variant === "heading1" ? "h1" : variant === "heading2" ? "h2" : "h3";
3845
4610
  const Element = as != null ? as : defaultElement;
3846
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4611
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3847
4612
  Element,
3848
4613
  __spreadProps(__spreadValues({
3849
4614
  id,
3850
4615
  "data-testid": testid,
3851
- className: (0, import_clsx21.default)(
4616
+ className: (0, import_clsx22.default)(
3852
4617
  typography[variant],
3853
4618
  className,
3854
4619
  align === "left" && "text-left",
@@ -3864,43 +4629,43 @@ var Heading = (_a) => {
3864
4629
  );
3865
4630
  };
3866
4631
  Heading.displayName = "Heading";
3867
- var Heading1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading1" }));
3868
- var Heading2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading2" }));
3869
- var Heading3 = (props) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading3" }));
4632
+ var Heading1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading1" }));
4633
+ var Heading2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading2" }));
4634
+ var Heading3 = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading3" }));
3870
4635
  Heading1.displayName = "Heading1";
3871
4636
  Heading2.displayName = "Heading2";
3872
4637
  Heading3.displayName = "Heading3";
3873
4638
 
3874
4639
  // src/components/Theme.tsx
3875
- var import_jsx_runtime23 = require("react/jsx-runtime");
4640
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3876
4641
 
3877
4642
  // src/components/MobileDataGrid/ColumnSelector/index.tsx
3878
- var import_react18 = require("react");
4643
+ var import_react20 = require("react");
3879
4644
 
3880
4645
  // src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
3881
- var import_react17 = require("react");
4646
+ var import_react19 = require("react");
3882
4647
 
3883
4648
  // src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
3884
- var import_react16 = require("react");
3885
- var GridContext = (0, import_react16.createContext)(null);
4649
+ var import_react18 = require("react");
4650
+ var GridContext = (0, import_react18.createContext)(null);
3886
4651
 
3887
4652
  // src/components/MobileDataGrid/ColumnSelector/index.tsx
3888
- var import_jsx_runtime24 = require("react/jsx-runtime");
4653
+ var import_jsx_runtime26 = require("react/jsx-runtime");
3889
4654
 
3890
4655
  // src/components/MobileDataGrid/MobileDataGridHeader.tsx
3891
- var import_jsx_runtime25 = require("react/jsx-runtime");
4656
+ var import_jsx_runtime27 = require("react/jsx-runtime");
3892
4657
 
3893
4658
  // src/components/MobileDataGrid/GridContextProvider/index.tsx
3894
- var import_react19 = require("react");
3895
- var import_jsx_runtime26 = require("react/jsx-runtime");
4659
+ var import_react21 = require("react");
4660
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3896
4661
 
3897
4662
  // src/components/Modal.tsx
3898
- var import_clsx26 = __toESM(require("clsx"), 1);
3899
- var import_react21 = require("react");
4663
+ var import_clsx27 = __toESM(require("clsx"), 1);
4664
+ var import_react23 = require("react");
3900
4665
 
3901
4666
  // src/components/ModalHeader.tsx
3902
- var import_clsx22 = __toESM(require("clsx"), 1);
3903
- var import_jsx_runtime27 = require("react/jsx-runtime");
4667
+ var import_clsx23 = __toESM(require("clsx"), 1);
4668
+ var import_jsx_runtime29 = require("react/jsx-runtime");
3904
4669
  var ModalHeader = ({
3905
4670
  title,
3906
4671
  hideCloseIcon,
@@ -3911,12 +4676,12 @@ var ModalHeader = ({
3911
4676
  testid,
3912
4677
  headerClassname
3913
4678
  }) => {
3914
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4679
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
3915
4680
  "div",
3916
4681
  {
3917
4682
  id,
3918
4683
  "data-testid": testid,
3919
- className: (0, import_clsx22.default)(
4684
+ className: (0, import_clsx23.default)(
3920
4685
  "flex justify-between items-center",
3921
4686
  headerIconAlign === "center" && "justify-center",
3922
4687
  headerIconAlign === "right" && "justify-end",
@@ -3926,9 +4691,9 @@ var ModalHeader = ({
3926
4691
  headerClassname
3927
4692
  ),
3928
4693
  children: [
3929
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: (0, import_clsx22.default)("flex items-center flex-1", layoutGroupGap), children: [
4694
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: (0, import_clsx23.default)("flex items-center flex-1", layoutGroupGap), children: [
3930
4695
  headerIcon,
3931
- title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4696
+ title && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3932
4697
  Heading2,
3933
4698
  {
3934
4699
  id: id ? `${id}-title` : void 0,
@@ -3938,7 +4703,7 @@ var ModalHeader = ({
3938
4703
  }
3939
4704
  )
3940
4705
  ] }),
3941
- !hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4706
+ !hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3942
4707
  Button,
3943
4708
  {
3944
4709
  id: id ? `${id}-close-button` : void 0,
@@ -3946,7 +4711,7 @@ var ModalHeader = ({
3946
4711
  iconOnly: true,
3947
4712
  variant: "tertiary",
3948
4713
  onClick: onClose,
3949
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-brand-text-action-primary-normal desktop:text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon, { name: "close", size: 24 }) })
4714
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-brand-text-action-primary-normal desktop:text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "close", size: 24 }) })
3950
4715
  }
3951
4716
  )
3952
4717
  ]
@@ -3956,20 +4721,20 @@ var ModalHeader = ({
3956
4721
  ModalHeader.displayName = "ModalHeader";
3957
4722
 
3958
4723
  // src/components/ModalContent.tsx
3959
- var import_clsx23 = __toESM(require("clsx"), 1);
3960
- var import_jsx_runtime28 = require("react/jsx-runtime");
4724
+ var import_clsx24 = __toESM(require("clsx"), 1);
4725
+ var import_jsx_runtime30 = require("react/jsx-runtime");
3961
4726
  function ModalContent({
3962
4727
  fixedHeightScrolling,
3963
4728
  children,
3964
4729
  id,
3965
4730
  testid
3966
4731
  }) {
3967
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4732
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
3968
4733
  "div",
3969
4734
  {
3970
4735
  id,
3971
4736
  "data-testid": testid,
3972
- className: (0, import_clsx23.default)(
4737
+ className: (0, import_clsx24.default)(
3973
4738
  "flex-grow desktop:flex-grow-0",
3974
4739
  layoutPaddding,
3975
4740
  fixedHeightScrolling && "overflow-auto"
@@ -3981,8 +4746,8 @@ function ModalContent({
3981
4746
  ModalContent.displayName = "ModalContent";
3982
4747
 
3983
4748
  // src/components/ModalButtons.tsx
3984
- var import_clsx24 = __toESM(require("clsx"), 1);
3985
- var import_jsx_runtime29 = require("react/jsx-runtime");
4749
+ var import_clsx25 = __toESM(require("clsx"), 1);
4750
+ var import_jsx_runtime31 = require("react/jsx-runtime");
3986
4751
  var ModalButtons = ({
3987
4752
  onClose,
3988
4753
  onContinue,
@@ -3990,36 +4755,36 @@ var ModalButtons = ({
3990
4755
  id,
3991
4756
  testid
3992
4757
  }) => {
3993
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4758
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3994
4759
  "div",
3995
4760
  {
3996
4761
  id,
3997
4762
  "data-testid": testid,
3998
- className: (0, import_clsx24.default)(
4763
+ className: (0, import_clsx25.default)(
3999
4764
  "border-t border-neutral-300 flex justify-end",
4000
4765
  layoutPaddding,
4001
4766
  layoutGroupGap
4002
4767
  ),
4003
- children: customActions != null ? customActions : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
4004
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4768
+ children: customActions != null ? customActions : /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
4769
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4005
4770
  Button,
4006
4771
  {
4007
4772
  id: id ? `${id}-close-button` : void 0,
4008
4773
  testid: testid ? `${testid}-close-button` : void 0,
4009
4774
  variant: "secondary",
4010
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "close", size: 24 }),
4775
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { name: "close", size: 24 }),
4011
4776
  onClick: onClose,
4012
4777
  className: "max-sm:w-full",
4013
4778
  children: "Close"
4014
4779
  }
4015
4780
  ),
4016
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4781
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4017
4782
  Button,
4018
4783
  {
4019
4784
  id: id ? `${id}-continue-button` : void 0,
4020
4785
  testid: testid ? `${testid}-continue-button` : void 0,
4021
4786
  variant: "primary",
4022
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "check", size: 24 }),
4787
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { name: "check", size: 24 }),
4023
4788
  className: "max-sm:w-full",
4024
4789
  onClick: onContinue,
4025
4790
  children: "Continue"
@@ -4032,8 +4797,8 @@ var ModalButtons = ({
4032
4797
  ModalButtons.displayName = "ModalButtons";
4033
4798
 
4034
4799
  // src/components/ModalScrim.tsx
4035
- var import_clsx25 = __toESM(require("clsx"), 1);
4036
- var import_jsx_runtime30 = require("react/jsx-runtime");
4800
+ var import_clsx26 = __toESM(require("clsx"), 1);
4801
+ var import_jsx_runtime32 = require("react/jsx-runtime");
4037
4802
  var ModalScrim = ({
4038
4803
  show = false,
4039
4804
  size = "small",
@@ -4043,12 +4808,12 @@ var ModalScrim = ({
4043
4808
  id,
4044
4809
  testid
4045
4810
  }) => {
4046
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4811
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4047
4812
  "div",
4048
4813
  {
4049
4814
  id,
4050
4815
  "data-testid": testid,
4051
- className: (0, import_clsx25.default)(
4816
+ className: (0, import_clsx26.default)(
4052
4817
  "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",
4053
4818
  !show && " pointer-events-none",
4054
4819
  size === "small" && "p-4",
@@ -4064,14 +4829,14 @@ var ModalScrim = ({
4064
4829
  ModalScrim.displayName = "ModalScrim";
4065
4830
 
4066
4831
  // src/components/Modal.tsx
4067
- var import_react_dom3 = require("react-dom");
4832
+ var import_react_dom4 = require("react-dom");
4068
4833
  var import_react_use = require("react-use");
4069
4834
 
4070
4835
  // src/components/useMounted.tsx
4071
- var import_react20 = require("react");
4836
+ var import_react22 = require("react");
4072
4837
  var useMounted = () => {
4073
- const [isMounted, setIsMounted] = (0, import_react20.useState)(false);
4074
- (0, import_react20.useEffect)(() => {
4838
+ const [isMounted, setIsMounted] = (0, import_react22.useState)(false);
4839
+ (0, import_react22.useEffect)(() => {
4075
4840
  setIsMounted(true);
4076
4841
  return () => setIsMounted(false);
4077
4842
  }, []);
@@ -4079,7 +4844,7 @@ var useMounted = () => {
4079
4844
  };
4080
4845
 
4081
4846
  // src/components/Modal.tsx
4082
- var import_jsx_runtime31 = require("react/jsx-runtime");
4847
+ var import_jsx_runtime33 = require("react/jsx-runtime");
4083
4848
  var fadeInScale = (element, duration = 300) => element.animate(
4084
4849
  [
4085
4850
  { opacity: 0, transform: "scale(0.95)" },
@@ -4163,12 +4928,12 @@ var Modal = ({
4163
4928
  }) => {
4164
4929
  var _a;
4165
4930
  const mounted = useMounted();
4166
- const modalRef = (0, import_react21.useRef)(null);
4167
- const bgRef = (0, import_react21.useRef)(null);
4931
+ const modalRef = (0, import_react23.useRef)(null);
4932
+ const bgRef = (0, import_react23.useRef)(null);
4168
4933
  const wasOpen = (0, import_react_use.usePrevious)(open);
4169
4934
  const isMobile = useMatchesMobile();
4170
4935
  const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
4171
- (0, import_react21.useEffect)(() => {
4936
+ (0, import_react23.useEffect)(() => {
4172
4937
  if (!mounted) return;
4173
4938
  if (!modalRef.current || !bgRef.current) {
4174
4939
  console.error("Modal or background reference is not set.");
@@ -4188,7 +4953,7 @@ var Modal = ({
4188
4953
  bgFadeIn(bgRef.current);
4189
4954
  }
4190
4955
  }, [mounted, onClose, open, wasOpen]);
4191
- const handleKeyDown = (0, import_react21.useCallback)(
4956
+ const handleKeyDown = (0, import_react23.useCallback)(
4192
4957
  (e) => {
4193
4958
  if (e.key === "Escape") {
4194
4959
  if (onClose) {
@@ -4199,12 +4964,12 @@ var Modal = ({
4199
4964
  },
4200
4965
  [onClose]
4201
4966
  );
4202
- const handleClose = (0, import_react21.useCallback)(() => {
4967
+ const handleClose = (0, import_react23.useCallback)(() => {
4203
4968
  if (onClose) {
4204
4969
  onClose();
4205
4970
  }
4206
4971
  }, [onClose]);
4207
- (0, import_react21.useEffect)(() => {
4972
+ (0, import_react23.useEffect)(() => {
4208
4973
  if (open) {
4209
4974
  document.addEventListener("keyup", handleKeyDown);
4210
4975
  }
@@ -4212,7 +4977,7 @@ var Modal = ({
4212
4977
  document.removeEventListener("keyup", handleKeyDown);
4213
4978
  };
4214
4979
  }, [open, handleKeyDown]);
4215
- (0, import_react21.useEffect)(() => {
4980
+ (0, import_react23.useEffect)(() => {
4216
4981
  if (!open) return;
4217
4982
  const scrollY = window.scrollY;
4218
4983
  const body = document.body;
@@ -4233,7 +4998,7 @@ var Modal = ({
4233
4998
  };
4234
4999
  }, [open]);
4235
5000
  const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
4236
- const backgroundClickHandler = (0, import_react21.useCallback)(
5001
+ const backgroundClickHandler = (0, import_react23.useCallback)(
4237
5002
  (e) => {
4238
5003
  const target = e.target;
4239
5004
  const currentTarget = e.currentTarget;
@@ -4250,8 +5015,8 @@ var Modal = ({
4250
5015
  if (!mounted) {
4251
5016
  return null;
4252
5017
  }
4253
- return (0, import_react_dom3.createPortal)(
4254
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5018
+ return (0, import_react_dom4.createPortal)(
5019
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4255
5020
  ModalScrim,
4256
5021
  {
4257
5022
  id: id ? `${id}-scrim` : void 0,
@@ -4260,13 +5025,13 @@ var Modal = ({
4260
5025
  ref: bgRef,
4261
5026
  show: open,
4262
5027
  onClick: backgroundClickHandler,
4263
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
5028
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
4264
5029
  "div",
4265
5030
  {
4266
5031
  id,
4267
5032
  "data-testid": testid,
4268
5033
  ref: modalRef,
4269
- className: (0, import_clsx26.default)(
5034
+ className: (0, import_clsx27.default)(
4270
5035
  "shadow-md rounded-sm flex flex-col overflow-hidden w-full opacity-0 h-fit",
4271
5036
  computedFixedHeightScrolling && size !== "screen" && "desktop:max-h-[calc(100vh-32px)] desktop:h-auto",
4272
5037
  className,
@@ -4275,7 +5040,7 @@ var Modal = ({
4275
5040
  ),
4276
5041
  onClick: (e) => e.stopPropagation(),
4277
5042
  children: [
4278
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5043
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4279
5044
  ModalHeader,
4280
5045
  {
4281
5046
  id: id ? `${id}-header` : void 0,
@@ -4288,7 +5053,7 @@ var Modal = ({
4288
5053
  headerClassname
4289
5054
  }
4290
5055
  ),
4291
- children && (size !== "screen" || noWrapper) ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5056
+ children && (size !== "screen" || noWrapper) ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4292
5057
  ModalContent,
4293
5058
  {
4294
5059
  id: id ? `${id}-content` : void 0,
@@ -4297,7 +5062,7 @@ var Modal = ({
4297
5062
  children
4298
5063
  }
4299
5064
  ) : children,
4300
- showButtons ? customFooter ? customActions : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5065
+ showButtons ? customFooter ? customActions : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4301
5066
  ModalButtons,
4302
5067
  {
4303
5068
  id: id ? `${id}-buttons` : void 0,
@@ -4318,51 +5083,51 @@ var Modal = ({
4318
5083
  Modal.displayName = "Modal";
4319
5084
 
4320
5085
  // src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx
4321
- var import_jsx_runtime32 = require("react/jsx-runtime");
5086
+ var import_jsx_runtime34 = require("react/jsx-runtime");
4322
5087
 
4323
5088
  // src/components/MobileDataGrid/RowDetailModalProvider/ModalContent.tsx
4324
- var import_jsx_runtime33 = require("react/jsx-runtime");
5089
+ var import_jsx_runtime35 = require("react/jsx-runtime");
4325
5090
 
4326
5091
  // src/components/MobileDataGrid/RowDetailModalProvider/index.tsx
4327
- var import_jsx_runtime34 = require("react/jsx-runtime");
5092
+ var import_jsx_runtime36 = require("react/jsx-runtime");
4328
5093
 
4329
5094
  // src/components/MobileDataGrid/ColumnList.tsx
4330
- var import_clsx28 = __toESM(require("clsx"), 1);
5095
+ var import_clsx29 = __toESM(require("clsx"), 1);
4331
5096
 
4332
5097
  // src/components/MobileDataGrid/MobileDataGridCard/index.tsx
4333
- var import_clsx27 = __toESM(require("clsx"), 1);
4334
- var import_jsx_runtime35 = require("react/jsx-runtime");
5098
+ var import_clsx28 = __toESM(require("clsx"), 1);
5099
+ var import_jsx_runtime37 = require("react/jsx-runtime");
4335
5100
 
4336
5101
  // src/components/MobileDataGrid/ColumnList.tsx
4337
- var import_jsx_runtime36 = require("react/jsx-runtime");
5102
+ var import_jsx_runtime38 = require("react/jsx-runtime");
4338
5103
 
4339
5104
  // src/components/MobileDataGrid/index.tsx
4340
- var import_jsx_runtime37 = require("react/jsx-runtime");
5105
+ var import_jsx_runtime39 = require("react/jsx-runtime");
4341
5106
 
4342
5107
  // src/components/ProductImagePreview/Thumbnail.tsx
4343
- var import_react23 = require("react");
5108
+ var import_react25 = require("react");
4344
5109
 
4345
5110
  // src/components/ImagePlaceholder.tsx
4346
- var import_react22 = require("react");
4347
- var import_jsx_runtime38 = require("react/jsx-runtime");
5111
+ var import_react24 = require("react");
5112
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4348
5113
 
4349
5114
  // src/components/ProductImagePreview/Thumbnail.tsx
4350
- var import_jsx_runtime39 = require("react/jsx-runtime");
5115
+ var import_jsx_runtime41 = require("react/jsx-runtime");
4351
5116
 
4352
5117
  // src/components/Grid.tsx
4353
- var import_clsx29 = __toESM(require("clsx"), 1);
4354
- var import_jsx_runtime40 = require("react/jsx-runtime");
5118
+ var import_clsx30 = __toESM(require("clsx"), 1);
5119
+ var import_jsx_runtime42 = require("react/jsx-runtime");
4355
5120
 
4356
5121
  // src/components/ProductImagePreview/ProductPrimaryImage.tsx
4357
- var import_react24 = require("react");
4358
- var import_jsx_runtime41 = require("react/jsx-runtime");
5122
+ var import_react26 = require("react");
5123
+ var import_jsx_runtime43 = require("react/jsx-runtime");
4359
5124
 
4360
5125
  // src/components/ProductImagePreview/ZoomWindow.tsx
4361
- var import_react25 = require("react");
5126
+ var import_react27 = require("react");
4362
5127
 
4363
5128
  // src/components/Surface.tsx
4364
- var import_clsx30 = __toESM(require("clsx"), 1);
4365
- var import_jsx_runtime42 = require("react/jsx-runtime");
5129
+ var import_clsx31 = __toESM(require("clsx"), 1);
5130
+ var import_jsx_runtime44 = require("react/jsx-runtime");
4366
5131
  var Surface = (_a) => {
4367
5132
  var _b = _a, {
4368
5133
  children,
@@ -4375,11 +5140,11 @@ var Surface = (_a) => {
4375
5140
  "elevation",
4376
5141
  "id"
4377
5142
  ]);
4378
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5143
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4379
5144
  "div",
4380
5145
  __spreadProps(__spreadValues({
4381
5146
  id,
4382
- className: (0, import_clsx30.default)(
5147
+ className: (0, import_clsx31.default)(
4383
5148
  "rounded-base",
4384
5149
  {
4385
5150
  "shadow-2": elevation === 2,
@@ -4396,43 +5161,43 @@ var Surface = (_a) => {
4396
5161
  Surface.displayName = "Surface";
4397
5162
 
4398
5163
  // src/components/ProductImagePreview/ZoomWindow.tsx
4399
- var import_jsx_runtime43 = require("react/jsx-runtime");
5164
+ var import_jsx_runtime45 = require("react/jsx-runtime");
4400
5165
 
4401
5166
  // src/components/ProductImagePreview/CarouselPagination.tsx
4402
- var import_clsx31 = require("clsx");
4403
- var import_jsx_runtime44 = require("react/jsx-runtime");
5167
+ var import_clsx32 = require("clsx");
5168
+ var import_jsx_runtime46 = require("react/jsx-runtime");
4404
5169
 
4405
5170
  // src/components/ProductImagePreview/MobileImageCarousel.tsx
4406
- var import_react26 = require("react");
4407
- var import_jsx_runtime45 = require("react/jsx-runtime");
5171
+ var import_react28 = require("react");
5172
+ var import_jsx_runtime47 = require("react/jsx-runtime");
4408
5173
 
4409
5174
  // src/components/ProductImagePreview/useProductImagePreview.ts
4410
- var import_react27 = require("react");
5175
+ var import_react29 = require("react");
4411
5176
 
4412
5177
  // src/components/ProductImagePreview/index.tsx
4413
- var import_jsx_runtime46 = require("react/jsx-runtime");
5178
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4414
5179
 
4415
5180
  // src/components/CompactImagesPreview.tsx
4416
- var import_react28 = require("react");
4417
- var import_clsx32 = __toESM(require("clsx"), 1);
4418
- var import_jsx_runtime47 = require("react/jsx-runtime");
5181
+ var import_react30 = require("react");
5182
+ var import_clsx33 = __toESM(require("clsx"), 1);
5183
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4419
5184
 
4420
5185
  // src/components/SimpleTable.tsx
4421
- var import_clsx33 = __toESM(require("clsx"), 1);
4422
- var import_jsx_runtime48 = require("react/jsx-runtime");
5186
+ var import_clsx34 = __toESM(require("clsx"), 1);
5187
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4423
5188
 
4424
5189
  // src/components/PDFViewer/index.tsx
4425
- var import_react31 = require("react");
5190
+ var import_react33 = require("react");
4426
5191
 
4427
5192
  // src/components/PDFViewer/PDFElement.tsx
4428
5193
  var import_react_pdf2 = require("@mikecousins/react-pdf");
4429
- var import_react30 = require("react");
5194
+ var import_react32 = require("react");
4430
5195
 
4431
5196
  // src/components/Spinner.tsx
4432
- var import_jsx_runtime49 = require("react/jsx-runtime");
5197
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4433
5198
  var Spinner = ({ size = "small", testid }) => {
4434
5199
  const dimension = size === "large" ? 48 : 24;
4435
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
5200
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
4436
5201
  "svg",
4437
5202
  {
4438
5203
  "data-testid": testid,
@@ -4444,14 +5209,14 @@ var Spinner = ({ size = "small", testid }) => {
4444
5209
  className: "spinner",
4445
5210
  "aria-label": "Loading",
4446
5211
  children: [
4447
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
4448
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
4449
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
4450
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
4451
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
4452
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
4453
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
4454
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
5212
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
5213
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
5214
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
5215
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
5216
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
5217
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
5218
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
5219
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
4455
5220
  ]
4456
5221
  }
4457
5222
  );
@@ -4460,31 +5225,31 @@ Spinner.displayName = "Spinner";
4460
5225
 
4461
5226
  // src/components/PDFViewer/PDFPage.tsx
4462
5227
  var import_react_pdf = require("@mikecousins/react-pdf");
4463
- var import_react29 = require("react");
4464
- var import_jsx_runtime50 = require("react/jsx-runtime");
5228
+ var import_react31 = require("react");
5229
+ var import_jsx_runtime52 = require("react/jsx-runtime");
4465
5230
 
4466
5231
  // src/components/PDFViewer/PDFElement.tsx
4467
- var import_clsx34 = __toESM(require("clsx"), 1);
4468
- var import_jsx_runtime51 = require("react/jsx-runtime");
5232
+ var import_clsx35 = __toESM(require("clsx"), 1);
5233
+ var import_jsx_runtime53 = require("react/jsx-runtime");
4469
5234
 
4470
5235
  // src/components/PDFViewer/DownloadIcon.tsx
4471
- var import_jsx_runtime52 = require("react/jsx-runtime");
5236
+ var import_jsx_runtime54 = require("react/jsx-runtime");
4472
5237
 
4473
5238
  // src/components/PDFViewer/PDFNavigation.tsx
4474
- var import_jsx_runtime53 = require("react/jsx-runtime");
5239
+ var import_jsx_runtime55 = require("react/jsx-runtime");
4475
5240
 
4476
5241
  // src/components/PDFViewer/index.tsx
4477
- var import_jsx_runtime54 = require("react/jsx-runtime");
5242
+ var import_jsx_runtime56 = require("react/jsx-runtime");
4478
5243
 
4479
5244
  // src/components/ListGroup.tsx
4480
- var import_react32 = require("react");
4481
- var import_clsx35 = __toESM(require("clsx"), 1);
4482
- var import_jsx_runtime55 = require("react/jsx-runtime");
5245
+ var import_react34 = require("react");
5246
+ var import_clsx36 = __toESM(require("clsx"), 1);
5247
+ var import_jsx_runtime57 = require("react/jsx-runtime");
4483
5248
 
4484
5249
  // src/components/Pagination.tsx
4485
- var import_react33 = require("react");
4486
- var import_clsx36 = __toESM(require("clsx"), 1);
4487
- var import_jsx_runtime56 = require("react/jsx-runtime");
5250
+ var import_react35 = require("react");
5251
+ var import_clsx37 = __toESM(require("clsx"), 1);
5252
+ var import_jsx_runtime58 = require("react/jsx-runtime");
4488
5253
  var Pagination = ({
4489
5254
  totalPages,
4490
5255
  currentPage,
@@ -4494,7 +5259,7 @@ var Pagination = ({
4494
5259
  className,
4495
5260
  disabled
4496
5261
  }) => {
4497
- const goTo = (0, import_react33.useCallback)(
5262
+ const goTo = (0, import_react35.useCallback)(
4498
5263
  (page) => {
4499
5264
  if (disabled) return;
4500
5265
  onPageChange(page);
@@ -4511,7 +5276,7 @@ var Pagination = ({
4511
5276
  goTo(currentPage + 1);
4512
5277
  }
4513
5278
  };
4514
- const pageTokens = (0, import_react33.useMemo)(() => {
5279
+ const pageTokens = (0, import_react35.useMemo)(() => {
4515
5280
  if (totalPages <= 5) {
4516
5281
  return Array.from({ length: totalPages }, (_, i) => i + 1);
4517
5282
  }
@@ -4548,7 +5313,7 @@ var Pagination = ({
4548
5313
  return tokens;
4549
5314
  }, [totalPages, currentPage]);
4550
5315
  if (totalPages <= 1) return null;
4551
- const buttonClass = (0, import_clsx36.default)(
5316
+ const buttonClass = (0, import_clsx37.default)(
4552
5317
  "cursor-pointer disabled:cursor-default",
4553
5318
  paddingUsingComponentGap,
4554
5319
  "w-8 h-8",
@@ -4559,14 +5324,14 @@ var Pagination = ({
4559
5324
  "focus:bg-background-grouped-secondary-normal focus:outline-0",
4560
5325
  "disabled:bg-transparent disabled:text-text-action-primary-disabled"
4561
5326
  );
4562
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
5327
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
4563
5328
  "nav",
4564
5329
  {
4565
5330
  id,
4566
5331
  "data-testid": testid,
4567
5332
  "aria-label": "Pagination",
4568
5333
  onKeyDown: handleKey,
4569
- className: (0, import_clsx36.default)(
5334
+ className: (0, import_clsx37.default)(
4570
5335
  "flex items-center",
4571
5336
  "border border-border-primary-normal",
4572
5337
  "bg-background-grouped-primary-normal",
@@ -4574,19 +5339,19 @@ var Pagination = ({
4574
5339
  className
4575
5340
  ),
4576
5341
  children: [
4577
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5342
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4578
5343
  "button",
4579
5344
  {
4580
5345
  disabled: disabled || currentPage <= 1,
4581
5346
  "aria-label": "Previous page",
4582
5347
  onClick: () => goTo(currentPage - 1),
4583
- className: (0, import_clsx36.default)(buttonClass, "border-r-1 border-border-primary-normal"),
4584
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: "keyboard_arrow_left" })
5348
+ className: (0, import_clsx37.default)(buttonClass, "border-r-1 border-border-primary-normal"),
5349
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: "keyboard_arrow_left" })
4585
5350
  }
4586
5351
  ),
4587
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("ul", { className: (0, import_clsx36.default)("flex items-center"), children: pageTokens.map((token, index) => {
5352
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { className: (0, import_clsx37.default)("flex items-center"), children: pageTokens.map((token, index) => {
4588
5353
  if (token === "ellipsis") {
4589
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5354
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4590
5355
  "li",
4591
5356
  {
4592
5357
  className: "w-8 h-8 select-none text-text-action-primary-disabled",
@@ -4596,29 +5361,29 @@ var Pagination = ({
4596
5361
  );
4597
5362
  }
4598
5363
  const selected = token === currentPage;
4599
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5364
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4600
5365
  "button",
4601
5366
  {
4602
5367
  "aria-label": `Page ${token}`,
4603
5368
  "aria-current": selected ? "page" : void 0,
4604
5369
  disabled,
4605
5370
  onClick: () => goTo(token),
4606
- className: (0, import_clsx36.default)(
5371
+ className: (0, import_clsx37.default)(
4607
5372
  buttonClass,
4608
5373
  selected && "border-x-1 bg-background-grouped-secondary-normal border-border-primary-normal"
4609
5374
  ),
4610
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Subheader, { align: "center", weight: "bold", children: token })
5375
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Subheader, { align: "center", weight: "bold", children: token })
4611
5376
  }
4612
5377
  ) }, token);
4613
5378
  }) }),
4614
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5379
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4615
5380
  "button",
4616
5381
  {
4617
5382
  disabled: disabled || currentPage >= totalPages,
4618
5383
  "aria-label": "Next page",
4619
5384
  onClick: () => goTo(currentPage + 1),
4620
- className: (0, import_clsx36.default)(buttonClass, "border-l-1 border-border-primary-normal"),
4621
- children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: "keyboard_arrow_right" })
5385
+ className: (0, import_clsx37.default)(buttonClass, "border-l-1 border-border-primary-normal"),
5386
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon, { name: "keyboard_arrow_right" })
4622
5387
  }
4623
5388
  )
4624
5389
  ]
@@ -4628,35 +5393,35 @@ var Pagination = ({
4628
5393
  Pagination.displayName = "Pagination";
4629
5394
 
4630
5395
  // src/components/SkeletonParagraph.tsx
4631
- var import_jsx_runtime57 = require("react/jsx-runtime");
5396
+ var import_jsx_runtime59 = require("react/jsx-runtime");
4632
5397
 
4633
5398
  // src/components/EmptyCartIcon.tsx
4634
- var import_jsx_runtime58 = require("react/jsx-runtime");
5399
+ var import_jsx_runtime60 = require("react/jsx-runtime");
4635
5400
 
4636
5401
  // src/components/Alert.tsx
4637
- var import_clsx37 = __toESM(require("clsx"), 1);
4638
- var import_react34 = require("react");
4639
- var import_jsx_runtime59 = require("react/jsx-runtime");
5402
+ var import_clsx38 = __toESM(require("clsx"), 1);
5403
+ var import_react36 = require("react");
5404
+ var import_jsx_runtime61 = require("react/jsx-runtime");
4640
5405
 
4641
5406
  // src/components/DataGrid/PinnedColumns.tsx
4642
- var import_clsx38 = __toESM(require("clsx"), 1);
4643
- var import_react37 = __toESM(require("react"), 1);
5407
+ var import_clsx39 = __toESM(require("clsx"), 1);
5408
+ var import_react39 = __toESM(require("react"), 1);
4644
5409
 
4645
5410
  // src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
4646
- var import_react36 = require("react");
5411
+ var import_react38 = require("react");
4647
5412
 
4648
5413
  // src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx
4649
- var import_react35 = require("react");
4650
- var import_jsx_runtime60 = require("react/jsx-runtime");
5414
+ var import_react37 = require("react");
5415
+ var import_jsx_runtime62 = require("react/jsx-runtime");
4651
5416
  function ColumnSelectorMenuOption({
4652
5417
  id,
4653
5418
  testid,
4654
5419
  column,
4655
5420
  toggleColumnVisibility
4656
5421
  }) {
4657
- const [isVisible, setIsVisible] = (0, import_react35.useState)(column.getIsVisible());
5422
+ const [isVisible, setIsVisible] = (0, import_react37.useState)(column.getIsVisible());
4658
5423
  const label = typeof column.columnDef.header === "string" ? column.columnDef.header : null;
4659
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5424
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(MenuOption, { id, testid, defaultChecked: isVisible, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4660
5425
  Checkbox,
4661
5426
  {
4662
5427
  id: id ? `${id}-checkbox` : void 0,
@@ -4672,7 +5437,7 @@ function ColumnSelectorMenuOption({
4672
5437
  }
4673
5438
 
4674
5439
  // src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx
4675
- var import_jsx_runtime61 = require("react/jsx-runtime");
5440
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4676
5441
  function ColumnSelectorHeaderCell({
4677
5442
  id,
4678
5443
  testid,
@@ -4680,9 +5445,9 @@ function ColumnSelectorHeaderCell({
4680
5445
  toggleColumnVisibility,
4681
5446
  resetColumnVisibility
4682
5447
  }) {
4683
- const ref = (0, import_react36.useRef)(null);
4684
- const [show, setShow] = (0, import_react36.useState)(false);
4685
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
5448
+ const ref = (0, import_react38.useRef)(null);
5449
+ const [show, setShow] = (0, import_react38.useState)(false);
5450
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
4686
5451
  DataGridCell,
4687
5452
  {
4688
5453
  id,
@@ -4692,7 +5457,7 @@ function ColumnSelectorHeaderCell({
4692
5457
  color: "text-secondary-normal",
4693
5458
  ref,
4694
5459
  children: [
4695
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5460
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4696
5461
  Button,
4697
5462
  {
4698
5463
  id: id ? `${id}-button` : void 0,
@@ -4700,10 +5465,10 @@ function ColumnSelectorHeaderCell({
4700
5465
  onClick: () => setShow((prev) => !prev),
4701
5466
  variant: "navigation",
4702
5467
  iconOnly: true,
4703
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { name: "tune" })
5468
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icon, { name: "tune" })
4704
5469
  }
4705
5470
  ),
4706
- /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
5471
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
4707
5472
  Menu,
4708
5473
  {
4709
5474
  id: id ? `${id}-menu` : void 0,
@@ -4714,7 +5479,7 @@ function ColumnSelectorHeaderCell({
4714
5479
  setShow,
4715
5480
  calculateMinMaxHeight: true,
4716
5481
  children: [
4717
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5482
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4718
5483
  Button,
4719
5484
  {
4720
5485
  id: id ? `${id}-reset-button` : void 0,
@@ -4730,7 +5495,7 @@ function ColumnSelectorHeaderCell({
4730
5495
  table.getAllColumns().filter((x) => {
4731
5496
  var _a;
4732
5497
  return (_a = x.columnDef.meta) == null ? void 0 : _a.inVisibilityMenu;
4733
- }).map((column) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5498
+ }).map((column) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4734
5499
  ColumnSelectorMenuOption,
4735
5500
  {
4736
5501
  id: id ? `${id}-option-${column.id}` : void 0,
@@ -4749,7 +5514,7 @@ function ColumnSelectorHeaderCell({
4749
5514
  }
4750
5515
 
4751
5516
  // src/components/DataGrid/PinnedColumns.tsx
4752
- var import_jsx_runtime62 = require("react/jsx-runtime");
5517
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4753
5518
  function PinnedColumns(_a) {
4754
5519
  var _b = _a, {
4755
5520
  id,
@@ -4781,17 +5546,17 @@ function PinnedColumns(_a) {
4781
5546
  const pinnedTestId = testid ? `${pinDirection}-pinned-${testid}` : void 0;
4782
5547
  const hasAnyHeaders = ((_a2 = headerGroups[0]) == null ? void 0 : _a2.headers.length) > 0;
4783
5548
  if (!hasAnyHeaders && !enableColumnSelector) return;
4784
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5549
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
4785
5550
  "table",
4786
5551
  {
4787
- className: (0, import_clsx38.default)(
5552
+ className: (0, import_clsx39.default)(
4788
5553
  "flex flex-col min-h-min sticky z-20",
4789
5554
  pinDirection === "left" ? "left-0" : "right-0"
4790
5555
  ),
4791
5556
  "data-testid": pinnedTestId,
4792
5557
  children: [
4793
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("thead", { className: "sticky top-0 z-20 grid", children: headerGroups.map((headerGroup) => {
4794
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5558
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("thead", { className: "sticky top-0 z-20 grid", children: headerGroups.map((headerGroup) => {
5559
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
4795
5560
  "tr",
4796
5561
  {
4797
5562
  "data-testid": pinnedTestId ? `${pinnedTestId}-header-row-${headerGroup.id}` : void 0,
@@ -4804,7 +5569,7 @@ function PinnedColumns(_a) {
4804
5569
  }
4805
5570
  if (typeof header.column.columnDef.header === "string") {
4806
5571
  const customHeaderWidth = (_a3 = header.column.columnDef.meta) == null ? void 0 : _a3.headerWidth;
4807
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
5572
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
4808
5573
  DataCellHeader,
4809
5574
  {
4810
5575
  locked: true,
@@ -4812,16 +5577,16 @@ function PinnedColumns(_a) {
4812
5577
  header,
4813
5578
  center: centerHeader,
4814
5579
  width: customHeaderWidth,
4815
- className: (0, import_clsx38.default)(
5580
+ className: (0, import_clsx39.default)(
4816
5581
  header.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
4817
5582
  "group"
4818
5583
  ),
4819
5584
  children: [
4820
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
5585
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Subheader, { tall: true, children: header.column.columnDef.header }),
4821
5586
  getSortIcon(header.column.getIsSorted()),
4822
5587
  !header.column.getIsSorted() && header.column.getCanSort() && getSortIcon(header.column.getNextSortingOrder(), true),
4823
- header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
4824
- !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5588
+ header.column.getSortIndex() !== -1 && table.getState().sorting.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Subheader, { tall: true, children: header.column.getSortIndex() + 1 }),
5589
+ !((_b2 = header.column.columnDef.meta) == null ? void 0 : _b2.locked) && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4825
5590
  "div",
4826
5591
  {
4827
5592
  onDoubleClick: (e) => {
@@ -4844,7 +5609,7 @@ function PinnedColumns(_a) {
4844
5609
  header.id
4845
5610
  );
4846
5611
  }
4847
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react37.default.Fragment, { children: ((_c = header.column.columnDef.meta) == null ? void 0 : _c.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5612
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react39.default.Fragment, { children: ((_c = header.column.columnDef.meta) == null ? void 0 : _c.checkbox) ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(DataGridCell, { type: "header", component: "checkbox", locked: true, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4848
5613
  Checkbox,
4849
5614
  {
4850
5615
  checked: allSelectedAcrossPages,
@@ -4856,7 +5621,7 @@ function PinnedColumns(_a) {
4856
5621
  header.getContext()
4857
5622
  ) }, header.id);
4858
5623
  }),
4859
- enableColumnSelector && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5624
+ enableColumnSelector && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4860
5625
  ColumnSelectorHeaderCell,
4861
5626
  {
4862
5627
  id: id ? `${id}-column-selector` : void 0,
@@ -4873,7 +5638,7 @@ function PinnedColumns(_a) {
4873
5638
  headerGroup.id
4874
5639
  );
4875
5640
  }) }),
4876
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5641
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4877
5642
  TableBody,
4878
5643
  __spreadProps(__spreadValues({
4879
5644
  testid: pinnedTestId