@dmsi/wedgekit-react 0.0.387 → 0.0.389

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 (113) hide show
  1. package/dist/{chunk-PH76F7QS.js → chunk-2HMCS25C.js} +1 -1
  2. package/dist/{chunk-HPQWEZJL.js → chunk-3X3Y4TMS.js} +7 -2
  3. package/dist/{chunk-3XOYPT5O.js → chunk-44TDIHUP.js} +1 -1
  4. package/dist/{chunk-F4CV7SBS.js → chunk-6I5LZ2ZC.js} +2 -2
  5. package/dist/{chunk-2FADUKPP.js → chunk-AA6GE3TH.js} +1 -1
  6. package/dist/{chunk-DCCTNHNL.js → chunk-ERW5DEIO.js} +1 -1
  7. package/dist/{chunk-4LXG6QNT.js → chunk-EZCH4PQS.js} +2 -1
  8. package/dist/{chunk-CQFPNZTN.js → chunk-G5DEC7H3.js} +15 -5
  9. package/dist/{chunk-MX57T3HP.js → chunk-GB4ZTUQV.js} +8 -4
  10. package/dist/{chunk-TPXHOAY3.js → chunk-JIMJIJOF.js} +2 -2
  11. package/dist/{chunk-R4SFLYOZ.js → chunk-KZZKQLKF.js} +1 -1
  12. package/dist/{chunk-KKESN5SF.js → chunk-LCJZRP5S.js} +11 -2
  13. package/dist/{chunk-GNHKKYCY.js → chunk-LLZ3SSZJ.js} +2 -2
  14. package/dist/{chunk-A7CEYUVE.js → chunk-LZGYABCX.js} +3 -3
  15. package/dist/{chunk-FSLETAX4.js → chunk-MQX7GFLX.js} +11 -4
  16. package/dist/{chunk-2T2GISEG.js → chunk-OW3WN3JV.js} +3 -3
  17. package/dist/components/Accordion.cjs +10 -5
  18. package/dist/components/Accordion.js +3 -3
  19. package/dist/components/CalendarRange.cjs +24 -21
  20. package/dist/components/CalendarRange.css +18 -0
  21. package/dist/components/CalendarRange.js +15 -15
  22. package/dist/components/Card.cjs +2 -1
  23. package/dist/components/Card.js +1 -1
  24. package/dist/components/CompactImagesPreview.cjs +18 -7
  25. package/dist/components/CompactImagesPreview.js +2 -2
  26. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +14 -11
  27. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +18 -0
  28. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +15 -15
  29. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +17 -14
  30. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +18 -0
  31. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +15 -15
  32. package/dist/components/DataGrid/PinnedColumns.cjs +19 -16
  33. package/dist/components/DataGrid/PinnedColumns.css +18 -0
  34. package/dist/components/DataGrid/PinnedColumns.js +15 -15
  35. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +12 -9
  36. package/dist/components/DataGrid/TableBody/LoadingCell.css +18 -0
  37. package/dist/components/DataGrid/TableBody/LoadingCell.js +15 -15
  38. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +14 -11
  39. package/dist/components/DataGrid/TableBody/TableBodyRow.css +18 -0
  40. package/dist/components/DataGrid/TableBody/TableBodyRow.js +15 -15
  41. package/dist/components/DataGrid/TableBody/index.cjs +14 -11
  42. package/dist/components/DataGrid/TableBody/index.css +18 -0
  43. package/dist/components/DataGrid/TableBody/index.js +15 -15
  44. package/dist/components/DataGrid/index.cjs +36 -33
  45. package/dist/components/DataGrid/index.css +18 -0
  46. package/dist/components/DataGrid/index.js +15 -15
  47. package/dist/components/DataGrid/utils.cjs +12 -9
  48. package/dist/components/DataGrid/utils.css +18 -0
  49. package/dist/components/DataGrid/utils.js +15 -15
  50. package/dist/components/DateInput.cjs +37 -34
  51. package/dist/components/DateInput.css +18 -0
  52. package/dist/components/DateInput.js +15 -15
  53. package/dist/components/DateRangeInput.cjs +37 -34
  54. package/dist/components/DateRangeInput.css +18 -0
  55. package/dist/components/DateRangeInput.js +15 -15
  56. package/dist/components/FilterGroup.cjs +11 -2
  57. package/dist/components/FilterGroup.js +1 -1
  58. package/dist/components/MobileDataGrid/ColumnList.cjs +8 -4
  59. package/dist/components/MobileDataGrid/ColumnList.js +3 -3
  60. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +16 -13
  61. package/dist/components/MobileDataGrid/ColumnSelector/index.css +18 -0
  62. package/dist/components/MobileDataGrid/ColumnSelector/index.js +15 -15
  63. package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +8 -4
  64. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +2 -2
  65. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +24 -17
  66. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +18 -0
  67. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +15 -15
  68. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.cjs +8 -4
  69. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +2 -2
  70. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +8 -4
  71. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +3 -3
  72. package/dist/components/MobileDataGrid/index.cjs +50 -43
  73. package/dist/components/MobileDataGrid/index.css +18 -0
  74. package/dist/components/MobileDataGrid/index.js +15 -15
  75. package/dist/components/Notification.cjs +8 -4
  76. package/dist/components/Notification.js +1 -1
  77. package/dist/components/OptionPill.cjs +11 -2
  78. package/dist/components/OptionPill.js +1 -1
  79. package/dist/components/PDFViewer/PDFElement.cjs +8 -4
  80. package/dist/components/PDFViewer/PDFElement.js +2 -2
  81. package/dist/components/PDFViewer/PDFNavigation.cjs +8 -4
  82. package/dist/components/PDFViewer/PDFNavigation.js +2 -2
  83. package/dist/components/PDFViewer/index.cjs +8 -4
  84. package/dist/components/PDFViewer/index.js +4 -4
  85. package/dist/components/ProductImagePreview/ProductPrimaryImage.cjs +15 -5
  86. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +1 -1
  87. package/dist/components/ProductImagePreview/Thumbnail.cjs +7 -2
  88. package/dist/components/ProductImagePreview/Thumbnail.js +1 -1
  89. package/dist/components/ProductImagePreview/index.cjs +84 -63
  90. package/dist/components/ProductImagePreview/index.js +4 -4
  91. package/dist/components/SideMenuGroup.cjs +8 -4
  92. package/dist/components/SideMenuGroup.js +1 -1
  93. package/dist/components/SideMenuItem.cjs +8 -4
  94. package/dist/components/SideMenuItem.js +1 -1
  95. package/dist/components/Stack.cjs +8 -4
  96. package/dist/components/Stack.js +1 -1
  97. package/dist/components/Swatch.cjs +8 -4
  98. package/dist/components/Swatch.js +1 -1
  99. package/dist/components/Time.cjs +8 -4
  100. package/dist/components/Time.js +1 -1
  101. package/dist/components/Upload.cjs +8 -4
  102. package/dist/components/Upload.js +1 -1
  103. package/dist/components/index.cjs +100 -71
  104. package/dist/components/index.css +18 -0
  105. package/dist/components/index.js +15 -15
  106. package/dist/index.css +18 -0
  107. package/package.json +1 -1
  108. package/src/components/Card.tsx +15 -4
  109. package/src/components/CompactImagesPreview.tsx +10 -3
  110. package/src/components/OptionPill.tsx +13 -1
  111. package/src/components/ProductImagePreview/ProductPrimaryImage.tsx +16 -5
  112. package/src/components/ProductImagePreview/Thumbnail.tsx +7 -1
  113. package/src/components/Stack.tsx +4 -0
@@ -313,7 +313,8 @@ var Stack = (_a) => {
313
313
  marginBottom,
314
314
  testid,
315
315
  bottom,
316
- zIndex
316
+ zIndex,
317
+ flexWrap
317
318
  } = _b, props = __objRest(_b, [
318
319
  "children",
319
320
  "items",
@@ -352,9 +353,10 @@ var Stack = (_a) => {
352
353
  "marginBottom",
353
354
  "testid",
354
355
  "bottom",
355
- "zIndex"
356
+ "zIndex",
357
+ "flexWrap"
356
358
  ]);
357
- var _a2, _b2, _c, _d, _e, _f;
359
+ var _a2, _b2, _c, _d, _e, _f, _g;
358
360
  const flexClassNames = getFlexClassNames({ items, justify, grow });
359
361
  const gapClassNames = useGapClassNames(sizing);
360
362
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
@@ -381,7 +383,9 @@ var Stack = (_a) => {
381
383
  borderBlock: (_d = props.style) == null ? void 0 : _d.borderBlock,
382
384
  marginInline: (_e = props.style) == null ? void 0 : _e.marginInline,
383
385
  zIndex: zIndex !== void 0 ? zIndex : void 0,
384
- gap: (_f = props.style) == null ? void 0 : _f.gap
386
+ flexWrap,
387
+ paddingInline: (_f = props.style) == null ? void 0 : _f.paddingInline,
388
+ gap: (_g = props.style) == null ? void 0 : _g.gap
385
389
  },
386
390
  className: (0, import_clsx3.default)(
387
391
  "scrollbar-thin",
@@ -7,7 +7,7 @@ import {
7
7
  } from "../chunk-EU73QPW7.js";
8
8
  import {
9
9
  Stack
10
- } from "../chunk-MX57T3HP.js";
10
+ } from "../chunk-GB4ZTUQV.js";
11
11
  import {
12
12
  Paragraph
13
13
  } from "../chunk-OGIFIPKH.js";
@@ -806,7 +806,8 @@ var Stack = (_a) => {
806
806
  marginBottom,
807
807
  testid,
808
808
  bottom,
809
- zIndex
809
+ zIndex,
810
+ flexWrap
810
811
  } = _b, props = __objRest(_b, [
811
812
  "children",
812
813
  "items",
@@ -845,9 +846,10 @@ var Stack = (_a) => {
845
846
  "marginBottom",
846
847
  "testid",
847
848
  "bottom",
848
- "zIndex"
849
+ "zIndex",
850
+ "flexWrap"
849
851
  ]);
850
- var _a2, _b2, _c, _d, _e, _f;
852
+ var _a2, _b2, _c, _d, _e, _f, _g;
851
853
  const flexClassNames = getFlexClassNames({ items, justify, grow });
852
854
  const gapClassNames = useGapClassNames(sizing);
853
855
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
@@ -874,7 +876,9 @@ var Stack = (_a) => {
874
876
  borderBlock: (_d = props.style) == null ? void 0 : _d.borderBlock,
875
877
  marginInline: (_e = props.style) == null ? void 0 : _e.marginInline,
876
878
  zIndex: zIndex !== void 0 ? zIndex : void 0,
877
- gap: (_f = props.style) == null ? void 0 : _f.gap
879
+ flexWrap,
880
+ paddingInline: (_f = props.style) == null ? void 0 : _f.paddingInline,
881
+ gap: (_g = props.style) == null ? void 0 : _g.gap
878
882
  },
879
883
  className: (0, import_clsx5.default)(
880
884
  "scrollbar-thin",
@@ -9,7 +9,7 @@ import "../chunk-TYTD4FLW.js";
9
9
  import "../chunk-5UH6QUFB.js";
10
10
  import {
11
11
  Stack
12
- } from "../chunk-MX57T3HP.js";
12
+ } from "../chunk-GB4ZTUQV.js";
13
13
  import {
14
14
  Icon
15
15
  } from "../chunk-NKUETCDA.js";
@@ -487,7 +487,8 @@ var Stack = (_a) => {
487
487
  marginBottom,
488
488
  testid,
489
489
  bottom,
490
- zIndex
490
+ zIndex,
491
+ flexWrap
491
492
  } = _b, props = __objRest(_b, [
492
493
  "children",
493
494
  "items",
@@ -526,9 +527,10 @@ var Stack = (_a) => {
526
527
  "marginBottom",
527
528
  "testid",
528
529
  "bottom",
529
- "zIndex"
530
+ "zIndex",
531
+ "flexWrap"
530
532
  ]);
531
- var _a2, _b2, _c, _d, _e, _f;
533
+ var _a2, _b2, _c, _d, _e, _f, _g;
532
534
  const flexClassNames = getFlexClassNames({ items, justify, grow });
533
535
  const gapClassNames = useGapClassNames(sizing);
534
536
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
@@ -555,7 +557,9 @@ var Stack = (_a) => {
555
557
  borderBlock: (_d = props.style) == null ? void 0 : _d.borderBlock,
556
558
  marginInline: (_e = props.style) == null ? void 0 : _e.marginInline,
557
559
  zIndex: zIndex !== void 0 ? zIndex : void 0,
558
- gap: (_f = props.style) == null ? void 0 : _f.gap
560
+ flexWrap,
561
+ paddingInline: (_f = props.style) == null ? void 0 : _f.paddingInline,
562
+ gap: (_g = props.style) == null ? void 0 : _g.gap
559
563
  },
560
564
  className: (0, import_clsx5.default)(
561
565
  "scrollbar-thin",
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-SBRRNFOP.js";
4
4
  import {
5
5
  Stack
6
- } from "../chunk-MX57T3HP.js";
6
+ } from "../chunk-GB4ZTUQV.js";
7
7
  import {
8
8
  Paragraph
9
9
  } from "../chunk-OGIFIPKH.js";
@@ -4046,8 +4046,9 @@ var import_clsx19 = __toESM(require("clsx"), 1);
4046
4046
  var import_jsx_runtime22 = require("react/jsx-runtime");
4047
4047
  function Card(props) {
4048
4048
  const _a = props, { children, selected, testid } = _a, rest = __objRest(_a, ["children", "selected", "testid"]);
4049
+ const CardComponent = props.as || "div";
4049
4050
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4050
- "div",
4051
+ CardComponent,
4051
4052
  __spreadProps(__spreadValues({}, rest), {
4052
4053
  "data-testid": testid,
4053
4054
  className: (0, import_clsx19.default)(
@@ -4125,7 +4126,8 @@ var Stack = (_a) => {
4125
4126
  marginBottom,
4126
4127
  testid,
4127
4128
  bottom,
4128
- zIndex
4129
+ zIndex,
4130
+ flexWrap
4129
4131
  } = _b, props = __objRest(_b, [
4130
4132
  "children",
4131
4133
  "items",
@@ -4164,9 +4166,10 @@ var Stack = (_a) => {
4164
4166
  "marginBottom",
4165
4167
  "testid",
4166
4168
  "bottom",
4167
- "zIndex"
4169
+ "zIndex",
4170
+ "flexWrap"
4168
4171
  ]);
4169
- var _a2, _b2, _c, _d, _e, _f;
4172
+ var _a2, _b2, _c, _d, _e, _f, _g;
4170
4173
  const flexClassNames = getFlexClassNames({ items, justify, grow });
4171
4174
  const gapClassNames = useGapClassNames(sizing);
4172
4175
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
@@ -4193,7 +4196,9 @@ var Stack = (_a) => {
4193
4196
  borderBlock: (_d = props.style) == null ? void 0 : _d.borderBlock,
4194
4197
  marginInline: (_e = props.style) == null ? void 0 : _e.marginInline,
4195
4198
  zIndex: zIndex !== void 0 ? zIndex : void 0,
4196
- gap: (_f = props.style) == null ? void 0 : _f.gap
4199
+ flexWrap,
4200
+ paddingInline: (_f = props.style) == null ? void 0 : _f.paddingInline,
4201
+ gap: (_g = props.style) == null ? void 0 : _g.gap
4197
4202
  },
4198
4203
  className: (0, import_clsx20.default)(
4199
4204
  "scrollbar-thin",
@@ -5510,6 +5515,9 @@ function MobileDataGrid(props) {
5510
5515
  );
5511
5516
  }
5512
5517
 
5518
+ // src/components/ProductImagePreview/Thumbnail.tsx
5519
+ var import_react26 = require("react");
5520
+
5513
5521
  // src/components/ImagePlaceholder.tsx
5514
5522
  var import_react25 = require("react");
5515
5523
  var import_jsx_runtime41 = require("react/jsx-runtime");
@@ -5542,6 +5550,7 @@ function Thumbnail({
5542
5550
  onClick,
5543
5551
  isPlaceholder = false
5544
5552
  }) {
5553
+ const [imageError, setImageError] = (0, import_react26.useState)(false);
5545
5554
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5546
5555
  "button",
5547
5556
  {
@@ -5558,11 +5567,14 @@ function Thumbnail({
5558
5567
  children: isPlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ImagePlaceholder, { width: 115, height: 115 }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5559
5568
  "img",
5560
5569
  {
5561
- src,
5570
+ src: imageError ? "/placeholder.svg" : src,
5562
5571
  alt,
5563
5572
  className: "object-cover w-full h-full select-none",
5564
5573
  draggable: false,
5565
- loading: "lazy"
5574
+ loading: "lazy",
5575
+ onError: () => {
5576
+ setImageError(true);
5577
+ }
5566
5578
  }
5567
5579
  )
5568
5580
  }
@@ -5570,7 +5582,7 @@ function Thumbnail({
5570
5582
  }
5571
5583
 
5572
5584
  // src/components/Grid.tsx
5573
- var import_react26 = require("react");
5585
+ var import_react27 = require("react");
5574
5586
  var import_clsx30 = __toESM(require("clsx"), 1);
5575
5587
  var import_jsx_runtime43 = require("react/jsx-runtime");
5576
5588
  var COLUMNS_WITH_SIDE_MENU_MAP = {
@@ -5639,7 +5651,7 @@ var Grid = ({
5639
5651
  testid,
5640
5652
  style
5641
5653
  }) => {
5642
- const childCount = import_react26.Children.count(children);
5654
+ const childCount = import_react27.Children.count(children);
5643
5655
  return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5644
5656
  "div",
5645
5657
  {
@@ -5664,7 +5676,7 @@ var Grid = ({
5664
5676
  };
5665
5677
 
5666
5678
  // src/components/ProductImagePreview/ProductPrimaryImage.tsx
5667
- var import_react27 = require("react");
5679
+ var import_react28 = require("react");
5668
5680
 
5669
5681
  // src/components/Spinner.tsx
5670
5682
  var import_jsx_runtime44 = require("react/jsx-runtime");
@@ -5710,14 +5722,14 @@ function ProductPrimaryImage({
5710
5722
  onZoomPositionChange,
5711
5723
  onScrollZoom
5712
5724
  }) {
5713
- const containerRef = (0, import_react27.useRef)(null);
5714
- const lastPointRef = (0, import_react27.useRef)(null);
5715
- const rafRef = (0, import_react27.useRef)(null);
5716
- const [active, setActive] = (0, import_react27.useState)(false);
5717
- const [, forceRerender] = (0, import_react27.useState)(0);
5718
- const [imageLoading, setImageLoading] = (0, import_react27.useState)(true);
5719
- const [imageError, setImageError] = (0, import_react27.useState)(false);
5720
- const imageSrc = (0, import_react27.useMemo)(() => image == null ? void 0 : image.src, [image == null ? void 0 : image.src]);
5725
+ const containerRef = (0, import_react28.useRef)(null);
5726
+ const lastPointRef = (0, import_react28.useRef)(null);
5727
+ const rafRef = (0, import_react28.useRef)(null);
5728
+ const [active, setActive] = (0, import_react28.useState)(false);
5729
+ const [, forceRerender] = (0, import_react28.useState)(0);
5730
+ const [imageLoading, setImageLoading] = (0, import_react28.useState)(true);
5731
+ const [imageError, setImageError] = (0, import_react28.useState)(false);
5732
+ const imageSrc = (0, import_react28.useMemo)(() => image == null ? void 0 : image.src, [image == null ? void 0 : image.src]);
5721
5733
  const schedule = () => {
5722
5734
  if (rafRef.current != null) return;
5723
5735
  rafRef.current = requestAnimationFrame(() => {
@@ -5725,7 +5737,7 @@ function ProductPrimaryImage({
5725
5737
  forceRerender((n) => n + 1);
5726
5738
  });
5727
5739
  };
5728
- const handlePointerEnter = (0, import_react27.useCallback)(() => {
5740
+ const handlePointerEnter = (0, import_react28.useCallback)(() => {
5729
5741
  if (!zoomEnabled) return;
5730
5742
  setActive(true);
5731
5743
  const el = containerRef.current;
@@ -5738,15 +5750,15 @@ function ProductPrimaryImage({
5738
5750
  );
5739
5751
  }
5740
5752
  }, [zoomEnabled, onZoomPositionChange, zoomLensSize]);
5741
- const handlePointerLeave = (0, import_react27.useCallback)(() => {
5753
+ const handlePointerLeave = (0, import_react28.useCallback)(() => {
5742
5754
  if (!zoomEnabled) return;
5743
5755
  setActive(false);
5744
5756
  lastPointRef.current = null;
5745
5757
  onZoomPositionChange == null ? void 0 : onZoomPositionChange(null, false);
5746
5758
  }, [zoomEnabled, onZoomPositionChange]);
5747
- const handlePointerMove = (0, import_react27.useCallback)(
5759
+ const handlePointerMove = (0, import_react28.useCallback)(
5748
5760
  (e) => {
5749
- if (!zoomEnabled || !active) return;
5761
+ if (!zoomEnabled || !active || imageError) return;
5750
5762
  if (e.pointerType === "touch") return;
5751
5763
  const el = containerRef.current;
5752
5764
  if (!el) return;
@@ -5778,9 +5790,9 @@ function ProductPrimaryImage({
5778
5790
  true
5779
5791
  );
5780
5792
  },
5781
- [zoomEnabled, active, onZoomPositionChange, zoomLensSize]
5793
+ [zoomEnabled, active, imageError, zoomLensSize, onZoomPositionChange]
5782
5794
  );
5783
- (0, import_react27.useEffect)(() => {
5795
+ (0, import_react28.useEffect)(() => {
5784
5796
  const container = containerRef.current;
5785
5797
  if (!container || !scrollToZoomEnabled) return;
5786
5798
  const handleNativeWheel = (e) => {
@@ -5795,6 +5807,10 @@ function ProductPrimaryImage({
5795
5807
  container.removeEventListener("wheel", handleNativeWheel);
5796
5808
  };
5797
5809
  }, [scrollToZoomEnabled, zoomEnabled, active, onScrollZoom]);
5810
+ (0, import_react28.useEffect)(() => {
5811
+ setImageLoading(true);
5812
+ setImageError(false);
5813
+ }, [image]);
5798
5814
  if (!image && !isPlaceholder) return null;
5799
5815
  const pt = lastPointRef.current;
5800
5816
  let lensStyle;
@@ -5818,7 +5834,13 @@ function ProductPrimaryImage({
5818
5834
  zoomEnabled ? "cursor-crosshair" : "",
5819
5835
  className
5820
5836
  ].join(" "),
5821
- style: { maxWidth: width, maxHeight: height, aspectRatio: "1 / 1" },
5837
+ style: {
5838
+ maxWidth: width,
5839
+ maxHeight: height,
5840
+ minWidth: width,
5841
+ minHeight: height,
5842
+ aspectRatio: "1 / 1"
5843
+ },
5822
5844
  onPointerEnter: handlePointerEnter,
5823
5845
  onPointerLeave: handlePointerLeave,
5824
5846
  onPointerMove: handlePointerMove,
@@ -5827,9 +5849,9 @@ function ProductPrimaryImage({
5827
5849
  isPlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ImagePlaceholder, { width, height }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
5828
5850
  "img",
5829
5851
  {
5830
- src: imageSrc,
5852
+ src: imageError ? "/placeholder.svg" : imageSrc,
5831
5853
  alt: (image == null ? void 0 : image.alt) || "Product image",
5832
- className: "object-cover w-full h-full select-none",
5854
+ className: "object-cover min-w-full min-h-full select-none",
5833
5855
  draggable: false,
5834
5856
  loading: "lazy",
5835
5857
  onLoad: () => setImageLoading(false),
@@ -5854,7 +5876,7 @@ function ProductPrimaryImage({
5854
5876
  }
5855
5877
 
5856
5878
  // src/components/ProductImagePreview/ZoomWindow.tsx
5857
- var import_react28 = require("react");
5879
+ var import_react29 = require("react");
5858
5880
 
5859
5881
  // src/components/Surface.tsx
5860
5882
  var import_clsx31 = __toESM(require("clsx"), 1);
@@ -5905,7 +5927,7 @@ function ZoomWindow({
5905
5927
  offset = 10,
5906
5928
  className = ""
5907
5929
  }) {
5908
- const imageSrc = (0, import_react28.useMemo)(() => image == null ? void 0 : image.src, [image == null ? void 0 : image.src]);
5930
+ const imageSrc = (0, import_react29.useMemo)(() => image == null ? void 0 : image.src, [image == null ? void 0 : image.src]);
5909
5931
  if (!image || !active || !pointer) return null;
5910
5932
  const zoomWindowSize = pointer.lensSize * scaleFactor;
5911
5933
  const baseW = pointer.w || width;
@@ -6034,7 +6056,7 @@ function CarouselPagination({
6034
6056
  }
6035
6057
 
6036
6058
  // src/components/ProductImagePreview/MobileImageCarousel.tsx
6037
- var import_react29 = require("react");
6059
+ var import_react30 = require("react");
6038
6060
  var import_jsx_runtime49 = require("react/jsx-runtime");
6039
6061
  function MobileImageCarousel({
6040
6062
  images,
@@ -6044,15 +6066,15 @@ function MobileImageCarousel({
6044
6066
  onChangeIndex,
6045
6067
  className = ""
6046
6068
  }) {
6047
- const containerRef = (0, import_react29.useRef)(null);
6048
- const [isDragging, setIsDragging] = (0, import_react29.useState)(false);
6049
- const [startX, setStartX] = (0, import_react29.useState)(0);
6050
- const [currentTranslate, setCurrentTranslate] = (0, import_react29.useState)(0);
6051
- const [prevTranslate, setPrevTranslate] = (0, import_react29.useState)(0);
6052
- const [containerWidth, setContainerWidth] = (0, import_react29.useState)(width);
6069
+ const containerRef = (0, import_react30.useRef)(null);
6070
+ const [isDragging, setIsDragging] = (0, import_react30.useState)(false);
6071
+ const [startX, setStartX] = (0, import_react30.useState)(0);
6072
+ const [currentTranslate, setCurrentTranslate] = (0, import_react30.useState)(0);
6073
+ const [prevTranslate, setPrevTranslate] = (0, import_react30.useState)(0);
6074
+ const [containerWidth, setContainerWidth] = (0, import_react30.useState)(width);
6053
6075
  const imageSize = Math.min(containerWidth * 0.6, height * 0.6);
6054
6076
  const gap = 16;
6055
- const getTranslateX = (0, import_react29.useCallback)(
6077
+ const getTranslateX = (0, import_react30.useCallback)(
6056
6078
  (index) => {
6057
6079
  const containerCenter = containerWidth / 2;
6058
6080
  const imageCenter = imageSize / 2;
@@ -6061,12 +6083,12 @@ function MobileImageCarousel({
6061
6083
  },
6062
6084
  [containerWidth, imageSize, gap]
6063
6085
  );
6064
- (0, import_react29.useEffect)(() => {
6086
+ (0, import_react30.useEffect)(() => {
6065
6087
  const translateX = getTranslateX(currentIndex);
6066
6088
  setCurrentTranslate(translateX);
6067
6089
  setPrevTranslate(translateX);
6068
6090
  }, [currentIndex, getTranslateX]);
6069
- (0, import_react29.useEffect)(() => {
6091
+ (0, import_react30.useEffect)(() => {
6070
6092
  const updateContainerWidth = () => {
6071
6093
  if (containerRef.current) {
6072
6094
  const rect = containerRef.current.getBoundingClientRect();
@@ -6080,11 +6102,11 @@ function MobileImageCarousel({
6080
6102
  }
6081
6103
  return () => resizeObserver.disconnect();
6082
6104
  }, []);
6083
- const handleStart = (0, import_react29.useCallback)((clientX) => {
6105
+ const handleStart = (0, import_react30.useCallback)((clientX) => {
6084
6106
  setIsDragging(true);
6085
6107
  setStartX(clientX);
6086
6108
  }, []);
6087
- const handleMove = (0, import_react29.useCallback)(
6109
+ const handleMove = (0, import_react30.useCallback)(
6088
6110
  (clientX) => {
6089
6111
  if (!isDragging) return;
6090
6112
  const currentPosition = clientX;
@@ -6093,7 +6115,7 @@ function MobileImageCarousel({
6093
6115
  },
6094
6116
  [isDragging, startX, prevTranslate]
6095
6117
  );
6096
- const handleEnd = (0, import_react29.useCallback)(() => {
6118
+ const handleEnd = (0, import_react30.useCallback)(() => {
6097
6119
  if (!isDragging) return;
6098
6120
  setIsDragging(false);
6099
6121
  const moved = currentTranslate - prevTranslate;
@@ -6141,7 +6163,7 @@ function MobileImageCarousel({
6141
6163
  const handleTouchEnd = () => {
6142
6164
  handleEnd();
6143
6165
  };
6144
- const handleImageClick = (0, import_react29.useCallback)(
6166
+ const handleImageClick = (0, import_react30.useCallback)(
6145
6167
  (index) => {
6146
6168
  if (!isDragging && index !== currentIndex) {
6147
6169
  onChangeIndex(index);
@@ -6221,7 +6243,7 @@ function MobileImageCarousel({
6221
6243
  }
6222
6244
 
6223
6245
  // src/components/ProductImagePreview/useProductImagePreview.ts
6224
- var import_react30 = require("react");
6246
+ var import_react31 = require("react");
6225
6247
  function useProductImagePreview(props) {
6226
6248
  const {
6227
6249
  images,
@@ -6234,18 +6256,18 @@ function useProductImagePreview(props) {
6234
6256
  } = props;
6235
6257
  const hasImages = !!(images == null ? void 0 : images.length);
6236
6258
  const safeIndex = hasImages && currentIndex >= 0 && currentIndex < images.length ? currentIndex : 0;
6237
- const active = (0, import_react30.useMemo)(() => {
6259
+ const active = (0, import_react31.useMemo)(() => {
6238
6260
  return hasImages ? images[safeIndex] : void 0;
6239
6261
  }, [hasImages, images, safeIndex]);
6240
- const [zoomPoint, setZoomPoint] = (0, import_react30.useState)(null);
6241
- const [zoomActive, setZoomActive] = (0, import_react30.useState)(false);
6242
- const [currentZoomFactor, setCurrentZoomFactor] = (0, import_react30.useState)(zoomFactor);
6243
- const [primaryImagePosition, setPrimaryImagePosition] = (0, import_react30.useState)(null);
6244
- const primaryImageRef = (0, import_react30.useRef)(null);
6245
- const cleanupRef = (0, import_react30.useRef)(null);
6262
+ const [zoomPoint, setZoomPoint] = (0, import_react31.useState)(null);
6263
+ const [zoomActive, setZoomActive] = (0, import_react31.useState)(false);
6264
+ const [currentZoomFactor, setCurrentZoomFactor] = (0, import_react31.useState)(zoomFactor);
6265
+ const [primaryImagePosition, setPrimaryImagePosition] = (0, import_react31.useState)(null);
6266
+ const primaryImageRef = (0, import_react31.useRef)(null);
6267
+ const cleanupRef = (0, import_react31.useRef)(null);
6246
6268
  const effectiveZoomEnabled = zoomEnabled && !isMobile;
6247
6269
  const effectiveScrollToZoomEnabled = scrollToZoomEnabled && !isMobile;
6248
- (0, import_react30.useEffect)(() => {
6270
+ (0, import_react31.useEffect)(() => {
6249
6271
  if (!effectiveZoomEnabled) return;
6250
6272
  const setupTracking = () => {
6251
6273
  const element = primaryImageRef.current;
@@ -6279,24 +6301,24 @@ function useProductImagePreview(props) {
6279
6301
  }
6280
6302
  };
6281
6303
  }, [effectiveZoomEnabled]);
6282
- const handleSelect = (0, import_react30.useCallback)(
6304
+ const handleSelect = (0, import_react31.useCallback)(
6283
6305
  (idx) => {
6284
6306
  if (idx === safeIndex) return;
6285
6307
  onChangeIndex(idx);
6286
6308
  },
6287
6309
  [safeIndex, onChangeIndex]
6288
6310
  );
6289
- const handleNext = (0, import_react30.useCallback)(() => {
6311
+ const handleNext = (0, import_react31.useCallback)(() => {
6290
6312
  if (!hasImages) return;
6291
6313
  const nextIndex = (safeIndex + 1) % images.length;
6292
6314
  onChangeIndex(nextIndex);
6293
6315
  }, [hasImages, safeIndex, images.length, onChangeIndex]);
6294
- const handlePrevious = (0, import_react30.useCallback)(() => {
6316
+ const handlePrevious = (0, import_react31.useCallback)(() => {
6295
6317
  if (!hasImages) return;
6296
6318
  const previousIndex = safeIndex === 0 ? images.length - 1 : safeIndex - 1;
6297
6319
  onChangeIndex(previousIndex);
6298
6320
  }, [hasImages, safeIndex, images.length, onChangeIndex]);
6299
- const handleZoomPositionChange = (0, import_react30.useCallback)(
6321
+ const handleZoomPositionChange = (0, import_react31.useCallback)(
6300
6322
  (p, active2) => {
6301
6323
  if (isMobile) return;
6302
6324
  setZoomPoint(p);
@@ -6304,7 +6326,7 @@ function useProductImagePreview(props) {
6304
6326
  },
6305
6327
  [isMobile]
6306
6328
  );
6307
- const handleScrollZoom = (0, import_react30.useCallback)(
6329
+ const handleScrollZoom = (0, import_react31.useCallback)(
6308
6330
  (delta) => {
6309
6331
  if (!effectiveScrollToZoomEnabled) return;
6310
6332
  const newZoomFactor = Math.max(1, Math.min(5, currentZoomFactor + delta));
@@ -6312,7 +6334,7 @@ function useProductImagePreview(props) {
6312
6334
  },
6313
6335
  [effectiveScrollToZoomEnabled, currentZoomFactor]
6314
6336
  );
6315
- (0, import_react30.useEffect)(() => {
6337
+ (0, import_react31.useEffect)(() => {
6316
6338
  setCurrentZoomFactor(zoomFactor);
6317
6339
  }, [zoomFactor]);
6318
6340
  return {
@@ -6476,7 +6498,7 @@ function ProductImagePreview(props) {
6476
6498
  }
6477
6499
 
6478
6500
  // src/components/CompactImagesPreview.tsx
6479
- var import_react31 = require("react");
6501
+ var import_react32 = require("react");
6480
6502
  var import_clsx33 = __toESM(require("clsx"), 1);
6481
6503
  var import_jsx_runtime51 = require("react/jsx-runtime");
6482
6504
  function CompactImagesPreview(props) {
@@ -6493,7 +6515,7 @@ function CompactImagesPreview(props) {
6493
6515
  } = props;
6494
6516
  const isMobile = useMatchesMobile();
6495
6517
  const imagesCount = sources.length;
6496
- const handleThumbnailClick = (0, import_react31.useCallback)(
6518
+ const handleThumbnailClick = (0, import_react32.useCallback)(
6497
6519
  (newIndex) => {
6498
6520
  if (newIndex === currentSourceIndex) return;
6499
6521
  if (newIndex < 0 || newIndex >= imagesCount) return;
@@ -6506,7 +6528,12 @@ function CompactImagesPreview(props) {
6506
6528
  "img",
6507
6529
  {
6508
6530
  className: "object-center",
6509
- style: { width: activeImageWidth, height: activeImageHeight },
6531
+ style: {
6532
+ width: activeImageWidth,
6533
+ height: activeImageHeight,
6534
+ objectPosition: "center",
6535
+ objectFit: "cover"
6536
+ },
6510
6537
  src: placeholderImageUri,
6511
6538
  alt: "placeholder image"
6512
6539
  }
@@ -6519,7 +6546,8 @@ function CompactImagesPreview(props) {
6519
6546
  style: {
6520
6547
  width: isMobile ? "100%" : activeImageWidth,
6521
6548
  height: activeImageHeight,
6522
- objectPosition: "center"
6549
+ objectPosition: "center",
6550
+ objectFit: "cover"
6523
6551
  },
6524
6552
  src: currentSource.uri,
6525
6553
  alt: currentSource.name
@@ -6544,7 +6572,8 @@ function CompactImagesPreview(props) {
6544
6572
  style: {
6545
6573
  width: thumbnailWidth,
6546
6574
  height: thumbnailHeight,
6547
- objectPosition: "center"
6575
+ objectPosition: "center",
6576
+ objectFit: "cover"
6548
6577
  }
6549
6578
  }
6550
6579
  )
@@ -6555,15 +6584,15 @@ function CompactImagesPreview(props) {
6555
6584
  }
6556
6585
 
6557
6586
  // src/components/PDFViewer/index.tsx
6558
- var import_react34 = require("react");
6587
+ var import_react35 = require("react");
6559
6588
 
6560
6589
  // src/components/PDFViewer/PDFElement.tsx
6561
6590
  var import_react_pdf2 = require("@mikecousins/react-pdf");
6562
- var import_react33 = require("react");
6591
+ var import_react34 = require("react");
6563
6592
 
6564
6593
  // src/components/PDFViewer/PDFPage.tsx
6565
6594
  var import_react_pdf = require("@mikecousins/react-pdf");
6566
- var import_react32 = require("react");
6595
+ var import_react33 = require("react");
6567
6596
  var import_jsx_runtime52 = require("react/jsx-runtime");
6568
6597
  function PdfPage({
6569
6598
  file,
@@ -6571,7 +6600,7 @@ function PdfPage({
6571
6600
  testid,
6572
6601
  isMobile
6573
6602
  }) {
6574
- const canvasRef = (0, import_react32.useRef)(null);
6603
+ const canvasRef = (0, import_react33.useRef)(null);
6575
6604
  const { pdfDocument } = (0, import_react_pdf.usePdf)({
6576
6605
  file,
6577
6606
  page: pageNumber,
@@ -6600,7 +6629,7 @@ function PDFElement({
6600
6629
  error
6601
6630
  }) {
6602
6631
  var _a;
6603
- const canvasRef = (0, import_react33.useRef)(null);
6632
+ const canvasRef = (0, import_react34.useRef)(null);
6604
6633
  const { pdfDocument } = (0, import_react_pdf2.usePdf)({
6605
6634
  file: `data:application/pdf;base64,${b64}`,
6606
6635
  workerSrc: "/scripts/pdf.worker.min.mjs",
@@ -6756,9 +6785,9 @@ function PDFViewer(props) {
6756
6785
  withPagination = true,
6757
6786
  error
6758
6787
  } = props;
6759
- const [currentIndex, setCurrentIndex] = (0, import_react34.useState)(0);
6760
- const [isDownloading, setIsDownloading] = (0, import_react34.useState)(false);
6761
- const handleDownload = (0, import_react34.useCallback)(() => {
6788
+ const [currentIndex, setCurrentIndex] = (0, import_react35.useState)(0);
6789
+ const [isDownloading, setIsDownloading] = (0, import_react35.useState)(false);
6790
+ const handleDownload = (0, import_react35.useCallback)(() => {
6762
6791
  setIsDownloading(true);
6763
6792
  const link = document.createElement("a");
6764
6793
  const currentPdf = encodedPdfs[currentIndex];
@@ -823,6 +823,9 @@
823
823
  .min-h-\[120px\] {
824
824
  min-height: 120px;
825
825
  }
826
+ .min-h-full {
827
+ min-height: 100%;
828
+ }
826
829
  .min-h-min {
827
830
  min-height: min-content;
828
831
  }
@@ -3594,6 +3597,21 @@
3594
3597
  outline-style: none;
3595
3598
  }
3596
3599
  }
3600
+ .data-active\:border-transparent {
3601
+ &[data-active] {
3602
+ border-color: transparent;
3603
+ }
3604
+ }
3605
+ .data-active\:bg-background-action-primary-normal {
3606
+ &[data-active] {
3607
+ background-color: var(--color-background-action-primary-normal);
3608
+ }
3609
+ }
3610
+ .data-active\:text-white {
3611
+ &[data-active] {
3612
+ color: var(--color-white);
3613
+ }
3614
+ }
3597
3615
  .data-disabled\:cursor-default {
3598
3616
  &[data-disabled] {
3599
3617
  cursor: default;