@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
@@ -239,7 +239,7 @@ function Icon(_a) {
239
239
  }
240
240
 
241
241
  // src/components/CalendarRange.tsx
242
- var import_react38 = __toESM(require("react"), 1);
242
+ var import_react39 = __toESM(require("react"), 1);
243
243
  var import_polyfill = require("@js-temporal/polyfill");
244
244
 
245
245
  // src/components/DataGridCell.tsx
@@ -479,6 +479,76 @@ function formatCurrencyDisplay(value) {
479
479
  }
480
480
 
481
481
  // src/utils/date.ts
482
+ function parseInputDate(input) {
483
+ const match = input.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);
484
+ if (!match) {
485
+ return null;
486
+ }
487
+ const [, month, day, year] = match;
488
+ const paddedMonth = month.padStart(2, "0");
489
+ const paddedDay = day.padStart(2, "0");
490
+ return `${year}-${paddedMonth}-${paddedDay}`;
491
+ }
492
+ function isValidDate(dateString) {
493
+ const date = new Date(dateString);
494
+ return date instanceof Date && !isNaN(date.getTime()) && dateString === date.toISOString().split("T")[0];
495
+ }
496
+ function formatInputValue(value) {
497
+ const digits = value.replace(/\D/g, "");
498
+ if (digits.length < 2) {
499
+ return digits;
500
+ }
501
+ if (digits.length >= 4) {
502
+ return `${digits.slice(0, 2)}/${digits.slice(2, 4)}/${digits.slice(4, 8)}`;
503
+ }
504
+ return `${digits.slice(0, 2)}/${digits.slice(2)}`;
505
+ }
506
+ function isDigit(character) {
507
+ return /\d/.test(character);
508
+ }
509
+ function isSlash(character) {
510
+ return character === "/";
511
+ }
512
+ function countDigitsUpToCursor(value, cursorPosition) {
513
+ let digitCount = 0;
514
+ for (let i = 0; i < cursorPosition && i < value.length; i++) {
515
+ if (!isDigit(value[i])) {
516
+ continue;
517
+ }
518
+ digitCount++;
519
+ }
520
+ return digitCount;
521
+ }
522
+ function findPositionAfterDigitCount(formattedValue, targetDigitCount) {
523
+ let currentDigitCount = 0;
524
+ for (let i = 0; i < formattedValue.length; i++) {
525
+ if (!isDigit(formattedValue[i])) {
526
+ continue;
527
+ }
528
+ currentDigitCount++;
529
+ if (currentDigitCount !== targetDigitCount) {
530
+ continue;
531
+ }
532
+ const positionAfterDigit = i + 1;
533
+ const nextCharacter = formattedValue[positionAfterDigit];
534
+ if (nextCharacter && isSlash(nextCharacter)) {
535
+ return positionAfterDigit + 1;
536
+ }
537
+ return positionAfterDigit;
538
+ }
539
+ return formattedValue.length;
540
+ }
541
+ function calculateCursorPosition(originalValue, formattedValue, originalPosition) {
542
+ const targetDigitCount = countDigitsUpToCursor(
543
+ originalValue,
544
+ originalPosition
545
+ );
546
+ const newPosition = findPositionAfterDigitCount(
547
+ formattedValue,
548
+ targetDigitCount
549
+ );
550
+ return Math.min(newPosition, formattedValue.length);
551
+ }
482
552
  function parseDateParts(dateString) {
483
553
  const [yearStr, monthStr, dayStr] = dateString.split("-");
484
554
  if (!yearStr || !monthStr || !dayStr) {
@@ -4063,23 +4133,253 @@ var Tooltip = ({
4063
4133
  };
4064
4134
  Tooltip.displayName = "Tooltip";
4065
4135
 
4136
+ // src/components/DateInput.tsx
4137
+ var import_react19 = require("react");
4138
+ var import_react_dom3 = require("react-dom");
4139
+ var import_jsx_runtime22 = require("react/jsx-runtime");
4140
+ var DateInput = (_a) => {
4141
+ var _b = _a, {
4142
+ id,
4143
+ testid,
4144
+ value,
4145
+ onChange,
4146
+ placeholder = "MM/DD/YYYY",
4147
+ disabled,
4148
+ readOnly = false,
4149
+ label
4150
+ } = _b, props = __objRest(_b, [
4151
+ "id",
4152
+ "testid",
4153
+ "value",
4154
+ "onChange",
4155
+ "placeholder",
4156
+ "disabled",
4157
+ "readOnly",
4158
+ "label"
4159
+ ]);
4160
+ const [visible, setVisible] = (0, import_react19.useState)(false);
4161
+ const [inputValue, setInputValue] = (0, import_react19.useState)("");
4162
+ const [isTyping, setIsTyping] = (0, import_react19.useState)(false);
4163
+ const popoverRef = (0, import_react19.useRef)(null);
4164
+ const triggerRef = (0, import_react19.useRef)(null);
4165
+ const rootRef = (0, import_react19.useRef)(null);
4166
+ const [calendarPosition, setCalendarPosition] = (0, import_react19.useState)({
4167
+ top: 0,
4168
+ left: 0,
4169
+ width: 0
4170
+ });
4171
+ const [from, to] = [value, ""];
4172
+ (0, import_react19.useEffect)(() => {
4173
+ if (!isTyping) {
4174
+ setInputValue(formatDisplayValue(from));
4175
+ }
4176
+ }, [from, isTyping]);
4177
+ (0, import_react19.useLayoutEffect)(() => {
4178
+ if (visible) {
4179
+ updatePosition();
4180
+ }
4181
+ }, [visible]);
4182
+ const updatePosition = () => {
4183
+ if (rootRef.current) {
4184
+ const rect = rootRef.current.getBoundingClientRect();
4185
+ setCalendarPosition({
4186
+ top: rect.bottom + window.scrollY,
4187
+ left: rect.left + window.scrollX,
4188
+ width: rect.width
4189
+ });
4190
+ }
4191
+ };
4192
+ (0, import_react19.useEffect)(() => {
4193
+ updatePosition();
4194
+ const resizeObserver = new ResizeObserver(updatePosition);
4195
+ if (triggerRef.current) {
4196
+ resizeObserver.observe(triggerRef.current);
4197
+ }
4198
+ window.addEventListener("scroll", updatePosition);
4199
+ return () => {
4200
+ resizeObserver.disconnect();
4201
+ window.removeEventListener("scroll", updatePosition);
4202
+ };
4203
+ }, []);
4204
+ (0, import_react19.useEffect)(() => {
4205
+ const handleKeyDown2 = (event) => {
4206
+ var _a2;
4207
+ if (event.key === "Escape" && popoverRef.current) {
4208
+ setVisible(false);
4209
+ (_a2 = triggerRef.current) == null ? void 0 : _a2.blur();
4210
+ }
4211
+ };
4212
+ document.addEventListener("keydown", handleKeyDown2);
4213
+ return () => {
4214
+ document.removeEventListener("keydown", handleKeyDown2);
4215
+ };
4216
+ });
4217
+ (0, import_react19.useEffect)(() => {
4218
+ const handleClickOutside = (event) => {
4219
+ if (popoverRef.current && !popoverRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
4220
+ setVisible(false);
4221
+ }
4222
+ };
4223
+ document.addEventListener("mousedown", handleClickOutside);
4224
+ return () => {
4225
+ document.removeEventListener("mousedown", handleClickOutside);
4226
+ };
4227
+ }, []);
4228
+ function handleDateChange(fromValue) {
4229
+ onChange(fromValue);
4230
+ setVisible(false);
4231
+ setIsTyping(false);
4232
+ }
4233
+ const handleFocus = () => {
4234
+ if (readOnly) return;
4235
+ setVisible(true);
4236
+ };
4237
+ const handleClick = () => {
4238
+ handleFocus();
4239
+ };
4240
+ const handleInputChange = (event) => {
4241
+ if (readOnly) return;
4242
+ const rawValue = event.target.value;
4243
+ const cursorPosition = event.target.selectionStart || 0;
4244
+ setIsTyping(true);
4245
+ const formattedValue = formatInputValue(rawValue);
4246
+ setInputValue(formattedValue);
4247
+ requestAnimationFrame(() => {
4248
+ if (triggerRef.current) {
4249
+ const newPosition = calculateCursorPosition(
4250
+ rawValue,
4251
+ formattedValue,
4252
+ cursorPosition
4253
+ );
4254
+ triggerRef.current.setSelectionRange(newPosition, newPosition);
4255
+ }
4256
+ });
4257
+ const parsedDate = parseInputDate(formattedValue);
4258
+ if (parsedDate && isValidDate(parsedDate)) {
4259
+ onChange(parsedDate);
4260
+ }
4261
+ };
4262
+ const handleBlur = () => {
4263
+ setIsTyping(false);
4264
+ const parsedDate = parseInputDate(inputValue);
4265
+ if (!parsedDate || !isValidDate(parsedDate)) {
4266
+ setInputValue(formatDisplayValue(from));
4267
+ }
4268
+ };
4269
+ const handleKeyDown = (event) => {
4270
+ if (event.key === "Backspace") {
4271
+ const input = event.target;
4272
+ const cursorPosition = input.selectionStart || 0;
4273
+ const value2 = input.value;
4274
+ if (cursorPosition > 0 && value2[cursorPosition - 1] === "/") {
4275
+ event.preventDefault();
4276
+ const newValue = value2.slice(0, cursorPosition - 2) + value2.slice(cursorPosition);
4277
+ const formattedValue = formatInputValue(newValue);
4278
+ setInputValue(formattedValue);
4279
+ requestAnimationFrame(() => {
4280
+ if (triggerRef.current) {
4281
+ const newPosition = Math.max(0, cursorPosition - 2);
4282
+ triggerRef.current.setSelectionRange(newPosition, newPosition);
4283
+ }
4284
+ });
4285
+ setIsTyping(true);
4286
+ return;
4287
+ }
4288
+ }
4289
+ if (event.key === "Enter") {
4290
+ const parsedDate = parseInputDate(inputValue);
4291
+ if (parsedDate && isValidDate(parsedDate)) {
4292
+ onChange(parsedDate);
4293
+ setVisible(false);
4294
+ setIsTyping(false);
4295
+ }
4296
+ }
4297
+ };
4298
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "relative", children: [
4299
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4300
+ InputBase,
4301
+ __spreadProps(__spreadValues({
4302
+ id,
4303
+ testid,
4304
+ ref: (el) => {
4305
+ triggerRef.current = el;
4306
+ }
4307
+ }, props), {
4308
+ wrapperRef: rootRef,
4309
+ value: inputValue,
4310
+ placeholder,
4311
+ disabled,
4312
+ readOnly,
4313
+ after: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: "calendar_month" }),
4314
+ onFocus: handleFocus,
4315
+ onClick: handleClick,
4316
+ onChange: handleInputChange,
4317
+ onBlur: handleBlur,
4318
+ onKeyDown: handleKeyDown,
4319
+ label,
4320
+ secondaryIconColor: true
4321
+ })
4322
+ ),
4323
+ visible && !readOnly && (0, import_react_dom3.createPortal)(
4324
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4325
+ "div",
4326
+ {
4327
+ ref: (el) => {
4328
+ popoverRef.current = el;
4329
+ },
4330
+ className: "absolute z-40 bg-white",
4331
+ style: {
4332
+ top: `${calendarPosition.top + 4}px`,
4333
+ left: `${calendarPosition.left}px`,
4334
+ minWidth: `${calendarPosition.width}px`
4335
+ },
4336
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4337
+ CalendarRange,
4338
+ {
4339
+ id: id ? `${id}-calendar` : void 0,
4340
+ testid: testid ? `${testid}-calendar` : void 0,
4341
+ from,
4342
+ to: to || from,
4343
+ onChange: handleDateChange,
4344
+ cardStyle: true,
4345
+ mode: "single",
4346
+ disableRange: true
4347
+ }
4348
+ )
4349
+ }
4350
+ ),
4351
+ findDocumentRoot(popoverRef.current)
4352
+ )
4353
+ ] });
4354
+ };
4355
+ DateInput.displayName = "DateInput";
4356
+ function formatDisplayValue(from) {
4357
+ if (!from) {
4358
+ return "";
4359
+ }
4360
+ if (!isValidDate(from)) {
4361
+ return "";
4362
+ }
4363
+ return formatDate(from);
4364
+ }
4365
+
4066
4366
  // src/components/Accordion.tsx
4067
4367
  var import_clsx21 = __toESM(require("clsx"), 1);
4068
4368
 
4069
4369
  // src/components/Card.tsx
4070
4370
  var import_clsx19 = __toESM(require("clsx"), 1);
4071
- var import_jsx_runtime22 = require("react/jsx-runtime");
4371
+ var import_jsx_runtime23 = require("react/jsx-runtime");
4072
4372
 
4073
4373
  // src/components/Stack.tsx
4074
4374
  var import_clsx20 = __toESM(require("clsx"), 1);
4075
- var import_jsx_runtime23 = require("react/jsx-runtime");
4375
+ var import_jsx_runtime24 = require("react/jsx-runtime");
4076
4376
 
4077
4377
  // src/components/Accordion.tsx
4078
- var import_jsx_runtime24 = require("react/jsx-runtime");
4378
+ var import_jsx_runtime25 = require("react/jsx-runtime");
4079
4379
 
4080
4380
  // src/components/Heading.tsx
4081
4381
  var import_clsx22 = __toESM(require("clsx"), 1);
4082
- var import_jsx_runtime25 = require("react/jsx-runtime");
4382
+ var import_jsx_runtime26 = require("react/jsx-runtime");
4083
4383
  var Heading = (_a) => {
4084
4384
  var _b = _a, {
4085
4385
  className,
@@ -4102,7 +4402,7 @@ var Heading = (_a) => {
4102
4402
  ]);
4103
4403
  const defaultElement = variant === "heading1" ? "h1" : variant === "heading2" ? "h2" : "h3";
4104
4404
  const Element = as != null ? as : defaultElement;
4105
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4405
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4106
4406
  Element,
4107
4407
  __spreadProps(__spreadValues({
4108
4408
  id,
@@ -4123,43 +4423,43 @@ var Heading = (_a) => {
4123
4423
  );
4124
4424
  };
4125
4425
  Heading.displayName = "Heading";
4126
- var Heading1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading1" }));
4127
- var Heading2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading2" }));
4128
- var Heading3 = (props) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading3" }));
4426
+ var Heading1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading1" }));
4427
+ var Heading2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading2" }));
4428
+ var Heading3 = (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading3" }));
4129
4429
  Heading1.displayName = "Heading1";
4130
4430
  Heading2.displayName = "Heading2";
4131
4431
  Heading3.displayName = "Heading3";
4132
4432
 
4133
4433
  // src/components/Theme.tsx
4134
- var import_jsx_runtime26 = require("react/jsx-runtime");
4434
+ var import_jsx_runtime27 = require("react/jsx-runtime");
4135
4435
 
4136
4436
  // src/components/MobileDataGrid/ColumnSelector/index.tsx
4137
- var import_react21 = require("react");
4437
+ var import_react22 = require("react");
4138
4438
 
4139
4439
  // src/components/MobileDataGrid/GridContextProvider/useGridContext.ts
4140
- var import_react20 = require("react");
4440
+ var import_react21 = require("react");
4141
4441
 
4142
4442
  // src/components/MobileDataGrid/GridContextProvider/GridContext.tsx
4143
- var import_react19 = require("react");
4144
- var GridContext = (0, import_react19.createContext)(null);
4443
+ var import_react20 = require("react");
4444
+ var GridContext = (0, import_react20.createContext)(null);
4145
4445
 
4146
4446
  // src/components/MobileDataGrid/ColumnSelector/index.tsx
4147
- var import_jsx_runtime27 = require("react/jsx-runtime");
4447
+ var import_jsx_runtime28 = require("react/jsx-runtime");
4148
4448
 
4149
4449
  // src/components/MobileDataGrid/MobileDataGridHeader.tsx
4150
- var import_jsx_runtime28 = require("react/jsx-runtime");
4450
+ var import_jsx_runtime29 = require("react/jsx-runtime");
4151
4451
 
4152
4452
  // src/components/MobileDataGrid/GridContextProvider/index.tsx
4153
- var import_react22 = require("react");
4154
- var import_jsx_runtime29 = require("react/jsx-runtime");
4453
+ var import_react23 = require("react");
4454
+ var import_jsx_runtime30 = require("react/jsx-runtime");
4155
4455
 
4156
4456
  // src/components/Modal.tsx
4157
4457
  var import_clsx27 = __toESM(require("clsx"), 1);
4158
- var import_react24 = require("react");
4458
+ var import_react25 = require("react");
4159
4459
 
4160
4460
  // src/components/ModalHeader.tsx
4161
4461
  var import_clsx23 = __toESM(require("clsx"), 1);
4162
- var import_jsx_runtime30 = require("react/jsx-runtime");
4462
+ var import_jsx_runtime31 = require("react/jsx-runtime");
4163
4463
  var ModalHeader = ({
4164
4464
  title,
4165
4465
  hideCloseIcon,
@@ -4170,7 +4470,7 @@ var ModalHeader = ({
4170
4470
  testid,
4171
4471
  headerClassname
4172
4472
  }) => {
4173
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4473
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
4174
4474
  "div",
4175
4475
  {
4176
4476
  id,
@@ -4185,9 +4485,9 @@ var ModalHeader = ({
4185
4485
  headerClassname
4186
4486
  ),
4187
4487
  children: [
4188
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: (0, import_clsx23.default)("flex items-center flex-1", layoutGroupGap), children: [
4488
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: (0, import_clsx23.default)("flex items-center flex-1", layoutGroupGap), children: [
4189
4489
  headerIcon,
4190
- title && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4490
+ title && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4191
4491
  Heading2,
4192
4492
  {
4193
4493
  id: id ? `${id}-title` : void 0,
@@ -4197,7 +4497,7 @@ var ModalHeader = ({
4197
4497
  }
4198
4498
  )
4199
4499
  ] }),
4200
- !hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4500
+ !hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4201
4501
  Button,
4202
4502
  {
4203
4503
  id: id ? `${id}-close-button` : void 0,
@@ -4205,7 +4505,7 @@ var ModalHeader = ({
4205
4505
  iconOnly: true,
4206
4506
  variant: "tertiary",
4207
4507
  onClick: onClose,
4208
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-brand-text-action-primary-normal desktop:text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { name: "close", size: 24 }) })
4508
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-brand-text-action-primary-normal desktop:text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { name: "close", size: 24 }) })
4209
4509
  }
4210
4510
  )
4211
4511
  ]
@@ -4216,14 +4516,14 @@ ModalHeader.displayName = "ModalHeader";
4216
4516
 
4217
4517
  // src/components/ModalContent.tsx
4218
4518
  var import_clsx24 = __toESM(require("clsx"), 1);
4219
- var import_jsx_runtime31 = require("react/jsx-runtime");
4519
+ var import_jsx_runtime32 = require("react/jsx-runtime");
4220
4520
  function ModalContent({
4221
4521
  fixedHeightScrolling,
4222
4522
  children,
4223
4523
  id,
4224
4524
  testid
4225
4525
  }) {
4226
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
4526
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4227
4527
  "div",
4228
4528
  {
4229
4529
  id,
@@ -4241,7 +4541,7 @@ ModalContent.displayName = "ModalContent";
4241
4541
 
4242
4542
  // src/components/ModalButtons.tsx
4243
4543
  var import_clsx25 = __toESM(require("clsx"), 1);
4244
- var import_jsx_runtime32 = require("react/jsx-runtime");
4544
+ var import_jsx_runtime33 = require("react/jsx-runtime");
4245
4545
  var ModalButtons = ({
4246
4546
  onClose,
4247
4547
  onContinue,
@@ -4249,7 +4549,7 @@ var ModalButtons = ({
4249
4549
  id,
4250
4550
  testid
4251
4551
  }) => {
4252
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4552
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4253
4553
  "div",
4254
4554
  {
4255
4555
  id,
@@ -4259,26 +4559,26 @@ var ModalButtons = ({
4259
4559
  layoutPaddding,
4260
4560
  layoutGroupGap
4261
4561
  ),
4262
- children: customActions != null ? customActions : /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
4263
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4562
+ children: customActions != null ? customActions : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
4563
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4264
4564
  Button,
4265
4565
  {
4266
4566
  id: id ? `${id}-close-button` : void 0,
4267
4567
  testid: testid ? `${testid}-close-button` : void 0,
4268
4568
  variant: "secondary",
4269
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { name: "close", size: 24 }),
4569
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: "close", size: 24 }),
4270
4570
  onClick: onClose,
4271
4571
  className: "max-sm:w-full",
4272
4572
  children: "Close"
4273
4573
  }
4274
4574
  ),
4275
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4575
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4276
4576
  Button,
4277
4577
  {
4278
4578
  id: id ? `${id}-continue-button` : void 0,
4279
4579
  testid: testid ? `${testid}-continue-button` : void 0,
4280
4580
  variant: "primary",
4281
- leftIcon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon, { name: "check", size: 24 }),
4581
+ leftIcon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { name: "check", size: 24 }),
4282
4582
  className: "max-sm:w-full",
4283
4583
  onClick: onContinue,
4284
4584
  children: "Continue"
@@ -4292,7 +4592,7 @@ ModalButtons.displayName = "ModalButtons";
4292
4592
 
4293
4593
  // src/components/ModalScrim.tsx
4294
4594
  var import_clsx26 = __toESM(require("clsx"), 1);
4295
- var import_jsx_runtime33 = require("react/jsx-runtime");
4595
+ var import_jsx_runtime34 = require("react/jsx-runtime");
4296
4596
  var ModalScrim = ({
4297
4597
  show = false,
4298
4598
  size = "small",
@@ -4302,7 +4602,7 @@ var ModalScrim = ({
4302
4602
  id,
4303
4603
  testid
4304
4604
  }) => {
4305
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4605
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4306
4606
  "div",
4307
4607
  {
4308
4608
  id,
@@ -4323,14 +4623,14 @@ var ModalScrim = ({
4323
4623
  ModalScrim.displayName = "ModalScrim";
4324
4624
 
4325
4625
  // src/components/Modal.tsx
4326
- var import_react_dom3 = require("react-dom");
4626
+ var import_react_dom4 = require("react-dom");
4327
4627
  var import_react_use = require("react-use");
4328
4628
 
4329
4629
  // src/components/useMounted.tsx
4330
- var import_react23 = require("react");
4630
+ var import_react24 = require("react");
4331
4631
  var useMounted = () => {
4332
- const [isMounted, setIsMounted] = (0, import_react23.useState)(false);
4333
- (0, import_react23.useEffect)(() => {
4632
+ const [isMounted, setIsMounted] = (0, import_react24.useState)(false);
4633
+ (0, import_react24.useEffect)(() => {
4334
4634
  setIsMounted(true);
4335
4635
  return () => setIsMounted(false);
4336
4636
  }, []);
@@ -4338,7 +4638,7 @@ var useMounted = () => {
4338
4638
  };
4339
4639
 
4340
4640
  // src/components/Modal.tsx
4341
- var import_jsx_runtime34 = require("react/jsx-runtime");
4641
+ var import_jsx_runtime35 = require("react/jsx-runtime");
4342
4642
  var fadeInScale = (element, duration = 300) => element.animate(
4343
4643
  [
4344
4644
  { opacity: 0, transform: "scale(0.95)" },
@@ -4422,12 +4722,12 @@ var Modal = ({
4422
4722
  }) => {
4423
4723
  var _a;
4424
4724
  const mounted = useMounted();
4425
- const modalRef = (0, import_react24.useRef)(null);
4426
- const bgRef = (0, import_react24.useRef)(null);
4725
+ const modalRef = (0, import_react25.useRef)(null);
4726
+ const bgRef = (0, import_react25.useRef)(null);
4427
4727
  const wasOpen = (0, import_react_use.usePrevious)(open);
4428
4728
  const isMobile = useMatchesMobile();
4429
4729
  const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
4430
- (0, import_react24.useEffect)(() => {
4730
+ (0, import_react25.useEffect)(() => {
4431
4731
  if (!mounted) return;
4432
4732
  if (!modalRef.current || !bgRef.current) {
4433
4733
  console.error("Modal or background reference is not set.");
@@ -4447,7 +4747,7 @@ var Modal = ({
4447
4747
  bgFadeIn(bgRef.current);
4448
4748
  }
4449
4749
  }, [mounted, onClose, open, wasOpen]);
4450
- const handleKeyDown = (0, import_react24.useCallback)(
4750
+ const handleKeyDown = (0, import_react25.useCallback)(
4451
4751
  (e) => {
4452
4752
  if (e.key === "Escape") {
4453
4753
  if (onClose) {
@@ -4458,12 +4758,12 @@ var Modal = ({
4458
4758
  },
4459
4759
  [onClose]
4460
4760
  );
4461
- const handleClose = (0, import_react24.useCallback)(() => {
4761
+ const handleClose = (0, import_react25.useCallback)(() => {
4462
4762
  if (onClose) {
4463
4763
  onClose();
4464
4764
  }
4465
4765
  }, [onClose]);
4466
- (0, import_react24.useEffect)(() => {
4766
+ (0, import_react25.useEffect)(() => {
4467
4767
  if (open) {
4468
4768
  document.addEventListener("keyup", handleKeyDown);
4469
4769
  }
@@ -4471,7 +4771,7 @@ var Modal = ({
4471
4771
  document.removeEventListener("keyup", handleKeyDown);
4472
4772
  };
4473
4773
  }, [open, handleKeyDown]);
4474
- (0, import_react24.useEffect)(() => {
4774
+ (0, import_react25.useEffect)(() => {
4475
4775
  if (!open) return;
4476
4776
  const scrollY = window.scrollY;
4477
4777
  const body = document.body;
@@ -4492,7 +4792,7 @@ var Modal = ({
4492
4792
  };
4493
4793
  }, [open]);
4494
4794
  const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
4495
- const backgroundClickHandler = (0, import_react24.useCallback)(
4795
+ const backgroundClickHandler = (0, import_react25.useCallback)(
4496
4796
  (e) => {
4497
4797
  const target = e.target;
4498
4798
  const currentTarget = e.currentTarget;
@@ -4509,8 +4809,8 @@ var Modal = ({
4509
4809
  if (!mounted) {
4510
4810
  return null;
4511
4811
  }
4512
- return (0, import_react_dom3.createPortal)(
4513
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4812
+ return (0, import_react_dom4.createPortal)(
4813
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4514
4814
  ModalScrim,
4515
4815
  {
4516
4816
  id: id ? `${id}-scrim` : void 0,
@@ -4519,7 +4819,7 @@ var Modal = ({
4519
4819
  ref: bgRef,
4520
4820
  show: open,
4521
4821
  onClick: backgroundClickHandler,
4522
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4822
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
4523
4823
  "div",
4524
4824
  {
4525
4825
  id,
@@ -4534,7 +4834,7 @@ var Modal = ({
4534
4834
  ),
4535
4835
  onClick: (e) => e.stopPropagation(),
4536
4836
  children: [
4537
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4837
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4538
4838
  ModalHeader,
4539
4839
  {
4540
4840
  id: id ? `${id}-header` : void 0,
@@ -4547,7 +4847,7 @@ var Modal = ({
4547
4847
  headerClassname
4548
4848
  }
4549
4849
  ),
4550
- children && (size !== "screen" || noWrapper) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4850
+ children && (size !== "screen" || noWrapper) ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4551
4851
  ModalContent,
4552
4852
  {
4553
4853
  id: id ? `${id}-content` : void 0,
@@ -4556,7 +4856,7 @@ var Modal = ({
4556
4856
  children
4557
4857
  }
4558
4858
  ) : children,
4559
- showButtons ? customFooter ? customActions : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4859
+ showButtons ? customFooter ? customActions : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
4560
4860
  ModalButtons,
4561
4861
  {
4562
4862
  id: id ? `${id}-buttons` : void 0,
@@ -4577,51 +4877,51 @@ var Modal = ({
4577
4877
  Modal.displayName = "Modal";
4578
4878
 
4579
4879
  // src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx
4580
- var import_jsx_runtime35 = require("react/jsx-runtime");
4880
+ var import_jsx_runtime36 = require("react/jsx-runtime");
4581
4881
 
4582
4882
  // src/components/MobileDataGrid/RowDetailModalProvider/ModalContent.tsx
4583
- var import_jsx_runtime36 = require("react/jsx-runtime");
4883
+ var import_jsx_runtime37 = require("react/jsx-runtime");
4584
4884
 
4585
4885
  // src/components/MobileDataGrid/RowDetailModalProvider/index.tsx
4586
- var import_jsx_runtime37 = require("react/jsx-runtime");
4886
+ var import_jsx_runtime38 = require("react/jsx-runtime");
4587
4887
 
4588
4888
  // src/components/MobileDataGrid/ColumnList.tsx
4589
4889
  var import_clsx29 = __toESM(require("clsx"), 1);
4590
4890
 
4591
4891
  // src/components/MobileDataGrid/MobileDataGridCard/index.tsx
4592
4892
  var import_clsx28 = __toESM(require("clsx"), 1);
4593
- var import_jsx_runtime38 = require("react/jsx-runtime");
4893
+ var import_jsx_runtime39 = require("react/jsx-runtime");
4594
4894
 
4595
4895
  // src/components/MobileDataGrid/ColumnList.tsx
4596
- var import_jsx_runtime39 = require("react/jsx-runtime");
4896
+ var import_jsx_runtime40 = require("react/jsx-runtime");
4597
4897
 
4598
4898
  // src/components/MobileDataGrid/index.tsx
4599
- var import_jsx_runtime40 = require("react/jsx-runtime");
4899
+ var import_jsx_runtime41 = require("react/jsx-runtime");
4600
4900
 
4601
4901
  // src/components/ProductImagePreview/Thumbnail.tsx
4602
- var import_react26 = require("react");
4902
+ var import_react27 = require("react");
4603
4903
 
4604
4904
  // src/components/ImagePlaceholder.tsx
4605
- var import_react25 = require("react");
4606
- var import_jsx_runtime41 = require("react/jsx-runtime");
4905
+ var import_react26 = require("react");
4906
+ var import_jsx_runtime42 = require("react/jsx-runtime");
4607
4907
 
4608
4908
  // src/components/ProductImagePreview/Thumbnail.tsx
4609
- var import_jsx_runtime42 = require("react/jsx-runtime");
4909
+ var import_jsx_runtime43 = require("react/jsx-runtime");
4610
4910
 
4611
4911
  // src/components/Grid.tsx
4612
4912
  var import_clsx30 = __toESM(require("clsx"), 1);
4613
- var import_jsx_runtime43 = require("react/jsx-runtime");
4913
+ var import_jsx_runtime44 = require("react/jsx-runtime");
4614
4914
 
4615
4915
  // src/components/ProductImagePreview/ProductPrimaryImage.tsx
4616
- var import_react27 = require("react");
4617
- var import_jsx_runtime44 = require("react/jsx-runtime");
4916
+ var import_react28 = require("react");
4917
+ var import_jsx_runtime45 = require("react/jsx-runtime");
4618
4918
 
4619
4919
  // src/components/ProductImagePreview/ZoomWindow.tsx
4620
- var import_react28 = require("react");
4920
+ var import_react29 = require("react");
4621
4921
 
4622
4922
  // src/components/Surface.tsx
4623
4923
  var import_clsx31 = __toESM(require("clsx"), 1);
4624
- var import_jsx_runtime45 = require("react/jsx-runtime");
4924
+ var import_jsx_runtime46 = require("react/jsx-runtime");
4625
4925
  var Surface = (_a) => {
4626
4926
  var _b = _a, {
4627
4927
  children,
@@ -4634,7 +4934,7 @@ var Surface = (_a) => {
4634
4934
  "elevation",
4635
4935
  "id"
4636
4936
  ]);
4637
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4937
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4638
4938
  "div",
4639
4939
  __spreadProps(__spreadValues({
4640
4940
  id,
@@ -4655,43 +4955,43 @@ var Surface = (_a) => {
4655
4955
  Surface.displayName = "Surface";
4656
4956
 
4657
4957
  // src/components/ProductImagePreview/ZoomWindow.tsx
4658
- var import_jsx_runtime46 = require("react/jsx-runtime");
4958
+ var import_jsx_runtime47 = require("react/jsx-runtime");
4659
4959
 
4660
4960
  // src/components/ProductImagePreview/CarouselPagination.tsx
4661
4961
  var import_clsx32 = require("clsx");
4662
- var import_jsx_runtime47 = require("react/jsx-runtime");
4962
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4663
4963
 
4664
4964
  // src/components/ProductImagePreview/MobileImageCarousel.tsx
4665
- var import_react29 = require("react");
4666
- var import_jsx_runtime48 = require("react/jsx-runtime");
4965
+ var import_react30 = require("react");
4966
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4667
4967
 
4668
4968
  // src/components/ProductImagePreview/useProductImagePreview.ts
4669
- var import_react30 = require("react");
4969
+ var import_react31 = require("react");
4670
4970
 
4671
4971
  // src/components/ProductImagePreview/index.tsx
4672
- var import_jsx_runtime49 = require("react/jsx-runtime");
4972
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4673
4973
 
4674
4974
  // src/components/CompactImagesPreview.tsx
4675
- var import_react31 = require("react");
4975
+ var import_react32 = require("react");
4676
4976
  var import_clsx33 = __toESM(require("clsx"), 1);
4677
- var import_jsx_runtime50 = require("react/jsx-runtime");
4977
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4678
4978
 
4679
4979
  // src/components/SimpleTable.tsx
4680
4980
  var import_clsx34 = __toESM(require("clsx"), 1);
4681
- var import_jsx_runtime51 = require("react/jsx-runtime");
4981
+ var import_jsx_runtime52 = require("react/jsx-runtime");
4682
4982
 
4683
4983
  // src/components/PDFViewer/index.tsx
4684
- var import_react34 = require("react");
4984
+ var import_react35 = require("react");
4685
4985
 
4686
4986
  // src/components/PDFViewer/PDFElement.tsx
4687
4987
  var import_react_pdf2 = require("@mikecousins/react-pdf");
4688
- var import_react33 = require("react");
4988
+ var import_react34 = require("react");
4689
4989
 
4690
4990
  // src/components/Spinner.tsx
4691
- var import_jsx_runtime52 = require("react/jsx-runtime");
4991
+ var import_jsx_runtime53 = require("react/jsx-runtime");
4692
4992
  var Spinner = ({ size = "small", testid }) => {
4693
4993
  const dimension = size === "large" ? 48 : 24;
4694
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
4994
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
4695
4995
  "svg",
4696
4996
  {
4697
4997
  "data-testid": testid,
@@ -4703,14 +5003,14 @@ var Spinner = ({ size = "small", testid }) => {
4703
5003
  className: "spinner",
4704
5004
  "aria-label": "Loading",
4705
5005
  children: [
4706
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
4707
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
4708
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
4709
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
4710
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
4711
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
4712
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
4713
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
5006
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
5007
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
5008
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
5009
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
5010
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
5011
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
5012
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
5013
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
4714
5014
  ]
4715
5015
  }
4716
5016
  );
@@ -4719,31 +5019,31 @@ Spinner.displayName = "Spinner";
4719
5019
 
4720
5020
  // src/components/PDFViewer/PDFPage.tsx
4721
5021
  var import_react_pdf = require("@mikecousins/react-pdf");
4722
- var import_react32 = require("react");
4723
- var import_jsx_runtime53 = require("react/jsx-runtime");
5022
+ var import_react33 = require("react");
5023
+ var import_jsx_runtime54 = require("react/jsx-runtime");
4724
5024
 
4725
5025
  // src/components/PDFViewer/PDFElement.tsx
4726
5026
  var import_clsx35 = __toESM(require("clsx"), 1);
4727
- var import_jsx_runtime54 = require("react/jsx-runtime");
5027
+ var import_jsx_runtime55 = require("react/jsx-runtime");
4728
5028
 
4729
5029
  // src/components/PDFViewer/DownloadIcon.tsx
4730
- var import_jsx_runtime55 = require("react/jsx-runtime");
5030
+ var import_jsx_runtime56 = require("react/jsx-runtime");
4731
5031
 
4732
5032
  // src/components/PDFViewer/PDFNavigation.tsx
4733
- var import_jsx_runtime56 = require("react/jsx-runtime");
5033
+ var import_jsx_runtime57 = require("react/jsx-runtime");
4734
5034
 
4735
5035
  // src/components/PDFViewer/index.tsx
4736
- var import_jsx_runtime57 = require("react/jsx-runtime");
5036
+ var import_jsx_runtime58 = require("react/jsx-runtime");
4737
5037
 
4738
5038
  // src/components/ListGroup.tsx
4739
- var import_react35 = require("react");
5039
+ var import_react36 = require("react");
4740
5040
  var import_clsx36 = __toESM(require("clsx"), 1);
4741
- var import_jsx_runtime58 = require("react/jsx-runtime");
5041
+ var import_jsx_runtime59 = require("react/jsx-runtime");
4742
5042
 
4743
5043
  // src/components/Pagination.tsx
4744
- var import_react36 = require("react");
5044
+ var import_react37 = require("react");
4745
5045
  var import_clsx37 = __toESM(require("clsx"), 1);
4746
- var import_jsx_runtime59 = require("react/jsx-runtime");
5046
+ var import_jsx_runtime60 = require("react/jsx-runtime");
4747
5047
  var Pagination = ({
4748
5048
  totalPages,
4749
5049
  currentPage,
@@ -4753,7 +5053,7 @@ var Pagination = ({
4753
5053
  className,
4754
5054
  disabled
4755
5055
  }) => {
4756
- const goTo = (0, import_react36.useCallback)(
5056
+ const goTo = (0, import_react37.useCallback)(
4757
5057
  (page) => {
4758
5058
  if (disabled) return;
4759
5059
  onPageChange(page);
@@ -4770,7 +5070,7 @@ var Pagination = ({
4770
5070
  goTo(currentPage + 1);
4771
5071
  }
4772
5072
  };
4773
- const pageTokens = (0, import_react36.useMemo)(() => {
5073
+ const pageTokens = (0, import_react37.useMemo)(() => {
4774
5074
  if (totalPages <= 5) {
4775
5075
  return Array.from({ length: totalPages }, (_, i) => i + 1);
4776
5076
  }
@@ -4818,7 +5118,7 @@ var Pagination = ({
4818
5118
  "focus:bg-background-grouped-secondary-normal focus:outline-0",
4819
5119
  "disabled:bg-transparent disabled:text-text-action-primary-disabled"
4820
5120
  );
4821
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
5121
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
4822
5122
  "nav",
4823
5123
  {
4824
5124
  id,
@@ -4833,19 +5133,19 @@ var Pagination = ({
4833
5133
  className
4834
5134
  ),
4835
5135
  children: [
4836
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5136
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4837
5137
  "button",
4838
5138
  {
4839
5139
  disabled: disabled || currentPage <= 1,
4840
5140
  "aria-label": "Previous page",
4841
5141
  onClick: () => goTo(currentPage - 1),
4842
5142
  className: (0, import_clsx37.default)(buttonClass, "border-r-1 border-border-primary-normal"),
4843
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icon, { name: "keyboard_arrow_left" })
5143
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: "keyboard_arrow_left" })
4844
5144
  }
4845
5145
  ),
4846
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("ul", { className: (0, import_clsx37.default)("flex items-center"), children: pageTokens.map((token, index) => {
5146
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("ul", { className: (0, import_clsx37.default)("flex items-center"), children: pageTokens.map((token, index) => {
4847
5147
  if (token === "ellipsis") {
4848
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5148
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4849
5149
  "li",
4850
5150
  {
4851
5151
  className: "w-8 h-8 select-none text-text-action-primary-disabled",
@@ -4855,7 +5155,7 @@ var Pagination = ({
4855
5155
  );
4856
5156
  }
4857
5157
  const selected = token === currentPage;
4858
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5158
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4859
5159
  "button",
4860
5160
  {
4861
5161
  "aria-label": `Page ${token}`,
@@ -4866,18 +5166,18 @@ var Pagination = ({
4866
5166
  buttonClass,
4867
5167
  selected && "border-x-1 bg-background-grouped-secondary-normal border-border-primary-normal"
4868
5168
  ),
4869
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Subheader, { align: "center", weight: "bold", children: token })
5169
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Subheader, { align: "center", weight: "bold", children: token })
4870
5170
  }
4871
5171
  ) }, token);
4872
5172
  }) }),
4873
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5173
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4874
5174
  "button",
4875
5175
  {
4876
5176
  disabled: disabled || currentPage >= totalPages,
4877
5177
  "aria-label": "Next page",
4878
5178
  onClick: () => goTo(currentPage + 1),
4879
5179
  className: (0, import_clsx37.default)(buttonClass, "border-l-1 border-border-primary-normal"),
4880
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Icon, { name: "keyboard_arrow_right" })
5180
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { name: "keyboard_arrow_right" })
4881
5181
  }
4882
5182
  )
4883
5183
  ]
@@ -4887,18 +5187,18 @@ var Pagination = ({
4887
5187
  Pagination.displayName = "Pagination";
4888
5188
 
4889
5189
  // src/components/SkeletonParagraph.tsx
4890
- var import_jsx_runtime60 = require("react/jsx-runtime");
5190
+ var import_jsx_runtime61 = require("react/jsx-runtime");
4891
5191
 
4892
5192
  // src/components/EmptyCartIcon.tsx
4893
- var import_jsx_runtime61 = require("react/jsx-runtime");
5193
+ var import_jsx_runtime62 = require("react/jsx-runtime");
4894
5194
 
4895
5195
  // src/components/Alert.tsx
4896
5196
  var import_clsx38 = __toESM(require("clsx"), 1);
4897
- var import_react37 = require("react");
4898
- var import_jsx_runtime62 = require("react/jsx-runtime");
5197
+ var import_react38 = require("react");
5198
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4899
5199
 
4900
5200
  // src/components/CalendarRange.tsx
4901
- var import_jsx_runtime63 = require("react/jsx-runtime");
5201
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4902
5202
  function isWeekend(date) {
4903
5203
  return date.dayOfWeek === 6 || date.dayOfWeek === 7;
4904
5204
  }
@@ -4936,7 +5236,7 @@ function DateCell(_a) {
4936
5236
  "id",
4937
5237
  "testid"
4938
5238
  ]);
4939
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5239
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4940
5240
  "span",
4941
5241
  __spreadProps(__spreadValues({}, props), {
4942
5242
  id,
@@ -5011,20 +5311,20 @@ function CalendarRange({
5011
5311
  const fromDate = parseDate(from);
5012
5312
  const toDate = parseDate(to);
5013
5313
  const today = import_polyfill.Temporal.Now.plainDateISO();
5014
- const [baseMonth, setBaseMonth] = (0, import_react38.useState)(
5314
+ const [baseMonth, setBaseMonth] = (0, import_react39.useState)(
5015
5315
  fromDate != null ? fromDate : today.with({ day: 1 })
5016
5316
  );
5017
- const [selecting, setSelecting] = (0, import_react38.useState)("from");
5018
- const [pendingFrom, setPendingFrom] = (0, import_react38.useState)(void 0);
5019
- const [hoveredDate, setHoveredDate] = (0, import_react38.useState)(void 0);
5020
- (0, import_react38.useEffect)(() => {
5317
+ const [selecting, setSelecting] = (0, import_react39.useState)("from");
5318
+ const [pendingFrom, setPendingFrom] = (0, import_react39.useState)(void 0);
5319
+ const [hoveredDate, setHoveredDate] = (0, import_react39.useState)(void 0);
5320
+ (0, import_react39.useEffect)(() => {
5021
5321
  if (fromDate) {
5022
5322
  setBaseMonth(fromDate.with({ day: 1 }));
5023
5323
  } else if (toDate) {
5024
5324
  setBaseMonth(toDate.with({ day: 1 }));
5025
5325
  }
5026
5326
  }, [from, to]);
5027
- (0, import_react38.useEffect)(() => {
5327
+ (0, import_react39.useEffect)(() => {
5028
5328
  if (fromDate && toDate) {
5029
5329
  setSelecting("from");
5030
5330
  setPendingFrom(void 0);
@@ -5090,7 +5390,7 @@ function CalendarRange({
5090
5390
  }
5091
5391
  return false;
5092
5392
  }
5093
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5393
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5094
5394
  "div",
5095
5395
  {
5096
5396
  id,
@@ -5103,7 +5403,7 @@ function CalendarRange({
5103
5403
  // baseTransition,
5104
5404
  "overflow-hidden"
5105
5405
  ),
5106
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5406
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5107
5407
  "div",
5108
5408
  {
5109
5409
  className: (0, import_clsx39.default)(
@@ -5111,7 +5411,7 @@ function CalendarRange({
5111
5411
  layoutGap
5112
5412
  ),
5113
5413
  children: (mode === "double" ? [0, 1] : [0]).map((offset, idx) => {
5114
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5414
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5115
5415
  CalendarPane,
5116
5416
  {
5117
5417
  getMonthData,
@@ -5169,20 +5469,20 @@ function CalendarPane({
5169
5469
  const years = Array.from({ length: 100 }).map(
5170
5470
  (_, i) => baseMonth.year - 50 + i
5171
5471
  );
5172
- const [monthMenuOpen, setMonthMenuOpen] = (0, import_react38.useState)(false);
5173
- const [yearMenuOpen, setYearMenuOpen] = (0, import_react38.useState)(false);
5174
- const monthMenuRef = (0, import_react38.useRef)(null);
5175
- const yearMenuRef = (0, import_react38.useRef)(null);
5472
+ const [monthMenuOpen, setMonthMenuOpen] = (0, import_react39.useState)(false);
5473
+ const [yearMenuOpen, setYearMenuOpen] = (0, import_react39.useState)(false);
5474
+ const monthMenuRef = (0, import_react39.useRef)(null);
5475
+ const yearMenuRef = (0, import_react39.useRef)(null);
5176
5476
  const month = getMonthData(offset);
5177
5477
  const totalCells = 42;
5178
5478
  const emptyCells = month.firstDayOffset;
5179
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react38.default.Fragment, { children: [
5180
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
5479
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_react39.default.Fragment, { children: [
5480
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
5181
5481
  "div",
5182
5482
  {
5183
5483
  className: (0, import_clsx39.default)("flex flex-col"),
5184
5484
  children: [
5185
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
5485
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
5186
5486
  "div",
5187
5487
  {
5188
5488
  className: (0, import_clsx39.default)(
@@ -5191,7 +5491,7 @@ function CalendarPane({
5191
5491
  "text-text-action-primary-normal"
5192
5492
  ),
5193
5493
  children: [
5194
- idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5494
+ idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5195
5495
  "button",
5196
5496
  {
5197
5497
  id: id ? `${id}-prev-month-button` : void 0,
@@ -5203,11 +5503,11 @@ function CalendarPane({
5203
5503
  ),
5204
5504
  "aria-label": "Previous month",
5205
5505
  onClick: () => setBaseMonth(baseMonth.subtract({ months: 1 })),
5206
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icon, { name: "chevron_left", size: 24 })
5506
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Icon, { name: "chevron_left", size: 24 })
5207
5507
  }
5208
- ) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: (0, import_clsx39.default)(componentPadding, "mr-1") }),
5209
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex gap-desktop-compact-component-padding", children: [
5210
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5508
+ ) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: (0, import_clsx39.default)(componentPadding, "mr-1") }),
5509
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex gap-desktop-compact-component-padding", children: [
5510
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5211
5511
  "button",
5212
5512
  {
5213
5513
  ref: (el) => {
@@ -5222,13 +5522,13 @@ function CalendarPane({
5222
5522
  children: month.name
5223
5523
  }
5224
5524
  ),
5225
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5525
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5226
5526
  Menu,
5227
5527
  {
5228
5528
  show: monthMenuOpen,
5229
5529
  positionTo: monthMenuRef,
5230
5530
  setShow: () => setMonthMenuOpen(false),
5231
- children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5531
+ children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5232
5532
  MenuOption,
5233
5533
  {
5234
5534
  selected: baseMonth.month === x + 1,
@@ -5242,7 +5542,7 @@ function CalendarPane({
5242
5542
  ))
5243
5543
  }
5244
5544
  ),
5245
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5545
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5246
5546
  "button",
5247
5547
  {
5248
5548
  ref: (el) => {
@@ -5257,13 +5557,13 @@ function CalendarPane({
5257
5557
  children: month.year
5258
5558
  }
5259
5559
  ),
5260
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5560
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5261
5561
  Menu,
5262
5562
  {
5263
5563
  show: yearMenuOpen,
5264
5564
  positionTo: yearMenuRef,
5265
5565
  setShow: () => setYearMenuOpen(false),
5266
- children: years.map((y) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5566
+ children: years.map((y) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5267
5567
  MenuOption,
5268
5568
  {
5269
5569
  selected: baseMonth.year === y,
@@ -5278,7 +5578,7 @@ function CalendarPane({
5278
5578
  }
5279
5579
  )
5280
5580
  ] }),
5281
- (mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5581
+ (mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5282
5582
  "button",
5283
5583
  {
5284
5584
  id: id ? `${id}-next-month-button` : void 0,
@@ -5290,13 +5590,13 @@ function CalendarPane({
5290
5590
  ),
5291
5591
  "aria-label": "Next month",
5292
5592
  onClick: () => setBaseMonth(baseMonth.add({ months: 1 })),
5293
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icon, { name: "chevron_right", size: 24 })
5593
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Icon, { name: "chevron_right", size: 24 })
5294
5594
  }
5295
- ) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: (0, import_clsx39.default)(componentPadding, "ml-1") })
5595
+ ) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: (0, import_clsx39.default)(componentPadding, "ml-1") })
5296
5596
  ]
5297
5597
  }
5298
5598
  ),
5299
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: (0, import_clsx39.default)("grid grid-cols-7"), children: weekDays.map((d) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5599
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: (0, import_clsx39.default)("grid grid-cols-7"), children: weekDays.map((d) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5300
5600
  "span",
5301
5601
  {
5302
5602
  className: (0, import_clsx39.default)(
@@ -5308,7 +5608,7 @@ function CalendarPane({
5308
5608
  },
5309
5609
  d
5310
5610
  )) }),
5311
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: (0, import_clsx39.default)("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
5611
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: (0, import_clsx39.default)("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
5312
5612
  const day = i - emptyCells + 1;
5313
5613
  const date = month.date.with({ day: 1 }).add({
5314
5614
  days: i - emptyCells
@@ -5322,7 +5622,7 @@ function CalendarPane({
5322
5622
  const hoverDateIsAfterPendingFrom = hoveredDate && pendingFrom && import_polyfill.Temporal.PlainDate.compare(hoveredDate, pendingFrom) >= 0;
5323
5623
  const isRangeStart = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && fromDate && date.equals(fromDate) || hoverDateIsAfterPendingFrom && date.equals(pendingFrom);
5324
5624
  const isRangeEnd = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && toDate && date.equals(toDate) || hoverDateIsBeforePendingFrom && date.equals(pendingFrom);
5325
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5625
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5326
5626
  DateCell,
5327
5627
  {
5328
5628
  id: id ? `${id}-date-${date.toString()}` : void 0,
@@ -5347,7 +5647,7 @@ function CalendarPane({
5347
5647
  ]
5348
5648
  }
5349
5649
  ),
5350
- mode === "double" && idx === 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5650
+ mode === "double" && idx === 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5351
5651
  "div",
5352
5652
  {
5353
5653
  className: (0, import_clsx39.default)(