@dmsi/wedgekit-react 0.0.440 → 0.0.442

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 (60) hide show
  1. package/dist/{chunk-IMOIZFJZ.js → chunk-DNYGKNQM.js} +1 -1
  2. package/dist/chunk-ETAEB3TA.js +19 -0
  3. package/dist/{chunk-G5DEC7H3.js → chunk-YCDDBSVU.js} +16 -23
  4. package/dist/components/CalendarRange.cjs +38 -40
  5. package/dist/components/CalendarRange.css +23 -11
  6. package/dist/components/CalendarRange.js +3 -3
  7. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +38 -40
  8. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +23 -11
  9. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +3 -3
  10. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +38 -40
  11. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +23 -11
  12. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +3 -3
  13. package/dist/components/DataGrid/PinnedColumns.cjs +38 -40
  14. package/dist/components/DataGrid/PinnedColumns.css +23 -11
  15. package/dist/components/DataGrid/PinnedColumns.js +3 -3
  16. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +38 -40
  17. package/dist/components/DataGrid/TableBody/LoadingCell.css +23 -11
  18. package/dist/components/DataGrid/TableBody/LoadingCell.js +3 -3
  19. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +38 -40
  20. package/dist/components/DataGrid/TableBody/TableBodyRow.css +23 -11
  21. package/dist/components/DataGrid/TableBody/TableBodyRow.js +3 -3
  22. package/dist/components/DataGrid/TableBody/index.cjs +38 -40
  23. package/dist/components/DataGrid/TableBody/index.css +23 -11
  24. package/dist/components/DataGrid/TableBody/index.js +3 -3
  25. package/dist/components/DataGrid/index.cjs +38 -40
  26. package/dist/components/DataGrid/index.css +23 -11
  27. package/dist/components/DataGrid/index.js +3 -3
  28. package/dist/components/DataGrid/utils.cjs +38 -40
  29. package/dist/components/DataGrid/utils.css +23 -11
  30. package/dist/components/DataGrid/utils.js +3 -3
  31. package/dist/components/DateInput.cjs +38 -40
  32. package/dist/components/DateInput.css +23 -11
  33. package/dist/components/DateInput.js +3 -3
  34. package/dist/components/DateRangeInput.cjs +38 -40
  35. package/dist/components/DateRangeInput.css +23 -11
  36. package/dist/components/DateRangeInput.js +3 -3
  37. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +38 -40
  38. package/dist/components/MobileDataGrid/ColumnSelector/index.css +23 -11
  39. package/dist/components/MobileDataGrid/ColumnSelector/index.js +3 -3
  40. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +38 -40
  41. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +23 -11
  42. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +3 -3
  43. package/dist/components/MobileDataGrid/index.cjs +61 -63
  44. package/dist/components/MobileDataGrid/index.css +23 -11
  45. package/dist/components/MobileDataGrid/index.js +3 -3
  46. package/dist/components/ProductImagePreview/ProductPrimaryImage.cjs +29 -83
  47. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +1 -3
  48. package/dist/components/ProductImagePreview/index.cjs +44 -77
  49. package/dist/components/ProductImagePreview/index.js +2 -3
  50. package/dist/components/SkeletonParagraph.cjs +12 -2
  51. package/dist/components/SkeletonParagraph.js +1 -1
  52. package/dist/components/index.cjs +105 -98
  53. package/dist/components/index.css +23 -11
  54. package/dist/components/index.js +3 -3
  55. package/dist/index.css +23 -11
  56. package/package.json +1 -1
  57. package/src/components/ProductImagePreview/ProductPrimaryImage.tsx +24 -34
  58. package/src/components/SkeletonParagraph.tsx +20 -2
  59. package/src/index.css +27 -0
  60. package/dist/chunk-ESCNCQGI.js +0 -9
@@ -5729,39 +5729,8 @@ var Grid = (_a) => {
5729
5729
 
5730
5730
  // src/components/ProductImagePreview/ProductPrimaryImage.tsx
5731
5731
  var import_react27 = require("react");
5732
-
5733
- // src/components/Spinner.tsx
5734
5732
  var import_jsx_runtime44 = require("react/jsx-runtime");
5735
- var Spinner = ({ size = "small", testid }) => {
5736
- const dimension = size === "large" ? 48 : 24;
5737
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
5738
- "svg",
5739
- {
5740
- "data-testid": testid,
5741
- width: dimension,
5742
- height: dimension,
5743
- viewBox: "0 0 24 24",
5744
- xmlns: "http://www.w3.org/2000/svg",
5745
- fill: "#1D1E1E",
5746
- className: "spinner",
5747
- "aria-label": "Loading",
5748
- children: [
5749
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
5750
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
5751
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
5752
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
5753
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
5754
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
5755
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
5756
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
5757
- ]
5758
- }
5759
- );
5760
- };
5761
- Spinner.displayName = "Spinner";
5762
-
5763
- // src/components/ProductImagePreview/ProductPrimaryImage.tsx
5764
- var import_jsx_runtime45 = require("react/jsx-runtime");
5733
+ var placeholderImageUri = "/placeholder.svg";
5765
5734
  function ProductPrimaryImage({
5766
5735
  image,
5767
5736
  width,
@@ -5779,8 +5748,6 @@ function ProductPrimaryImage({
5779
5748
  const rafRef = (0, import_react27.useRef)(null);
5780
5749
  const [active, setActive] = (0, import_react27.useState)(false);
5781
5750
  const [, forceRerender] = (0, import_react27.useState)(0);
5782
- const [imageLoading, setImageLoading] = (0, import_react27.useState)(true);
5783
- const [imageError, setImageError] = (0, import_react27.useState)(false);
5784
5751
  const imageSrc = (0, import_react27.useMemo)(() => image == null ? void 0 : image.src, [image == null ? void 0 : image.src]);
5785
5752
  const schedule = () => {
5786
5753
  if (rafRef.current != null) return;
@@ -5810,7 +5777,8 @@ function ProductPrimaryImage({
5810
5777
  }, [zoomEnabled, onZoomPositionChange]);
5811
5778
  const handlePointerMove = (0, import_react27.useCallback)(
5812
5779
  (e) => {
5813
- if (!zoomEnabled || !active || imageError) return;
5780
+ if (isPlaceholder) return;
5781
+ if (!zoomEnabled || !active) return;
5814
5782
  if (e.pointerType === "touch") return;
5815
5783
  const el = containerRef.current;
5816
5784
  if (!el) return;
@@ -5842,7 +5810,7 @@ function ProductPrimaryImage({
5842
5810
  true
5843
5811
  );
5844
5812
  },
5845
- [zoomEnabled, active, imageError, zoomLensSize, onZoomPositionChange]
5813
+ [isPlaceholder, zoomEnabled, active, zoomLensSize, onZoomPositionChange]
5846
5814
  );
5847
5815
  (0, import_react27.useEffect)(() => {
5848
5816
  const container = containerRef.current;
@@ -5859,11 +5827,15 @@ function ProductPrimaryImage({
5859
5827
  container.removeEventListener("wheel", handleNativeWheel);
5860
5828
  };
5861
5829
  }, [scrollToZoomEnabled, zoomEnabled, active, onScrollZoom]);
5862
- (0, import_react27.useEffect)(() => {
5863
- setImageLoading(true);
5864
- setImageError(false);
5865
- }, [image]);
5866
- if (!image && !isPlaceholder) return null;
5830
+ const handleImgError = (0, import_react27.useCallback)(
5831
+ (e) => {
5832
+ if (!placeholderImageUri) return;
5833
+ const img = e.currentTarget;
5834
+ if (img.src === placeholderImageUri) return;
5835
+ img.src = placeholderImageUri;
5836
+ },
5837
+ []
5838
+ );
5867
5839
  const pt = lastPointRef.current;
5868
5840
  let lensStyle;
5869
5841
  if (pt && active && zoomEnabled) {
@@ -5877,7 +5849,7 @@ function ProductPrimaryImage({
5877
5849
  top: Math.max(0, Math.min(height - size, topRaw))
5878
5850
  };
5879
5851
  }
5880
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
5852
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
5881
5853
  "div",
5882
5854
  {
5883
5855
  ref: containerRef,
@@ -5897,24 +5869,19 @@ function ProductPrimaryImage({
5897
5869
  onPointerLeave: handlePointerLeave,
5898
5870
  onPointerMove: handlePointerMove,
5899
5871
  children: [
5900
- imageLoading && !imageError && !isPlaceholder && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-neutral-50", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Spinner, { size: "small" }) }),
5901
- isPlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ImagePlaceholder, { width, height }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
5872
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5902
5873
  "img",
5903
5874
  {
5904
- src: imageError ? "/placeholder.svg" : imageSrc,
5875
+ src: imageSrc != null ? imageSrc : placeholderImageUri,
5905
5876
  alt: (image == null ? void 0 : image.alt) || "Product image",
5906
5877
  className: "object-cover min-w-full min-h-full select-none",
5907
5878
  draggable: false,
5908
5879
  loading: "lazy",
5909
- onLoad: () => setImageLoading(false),
5910
- onError: () => {
5911
- setImageLoading(false);
5912
- setImageError(true);
5913
- }
5880
+ onError: handleImgError
5914
5881
  },
5915
5882
  imageSrc
5916
5883
  ),
5917
- zoomEnabled && active && lensStyle && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
5884
+ zoomEnabled && active && lensStyle && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5918
5885
  "div",
5919
5886
  {
5920
5887
  "aria-hidden": true,
@@ -5932,7 +5899,7 @@ var import_react28 = require("react");
5932
5899
 
5933
5900
  // src/components/Surface.tsx
5934
5901
  var import_clsx31 = __toESM(require("clsx"), 1);
5935
- var import_jsx_runtime46 = require("react/jsx-runtime");
5902
+ var import_jsx_runtime45 = require("react/jsx-runtime");
5936
5903
  var Surface = (_a) => {
5937
5904
  var _b = _a, {
5938
5905
  children,
@@ -5945,7 +5912,7 @@ var Surface = (_a) => {
5945
5912
  "elevation",
5946
5913
  "id"
5947
5914
  ]);
5948
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5915
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
5949
5916
  "div",
5950
5917
  __spreadProps(__spreadValues({
5951
5918
  id,
@@ -5966,7 +5933,7 @@ var Surface = (_a) => {
5966
5933
  Surface.displayName = "Surface";
5967
5934
 
5968
5935
  // src/components/ProductImagePreview/ZoomWindow.tsx
5969
- var import_jsx_runtime47 = require("react/jsx-runtime");
5936
+ var import_jsx_runtime46 = require("react/jsx-runtime");
5970
5937
  function ZoomWindow({
5971
5938
  image,
5972
5939
  width,
@@ -6024,7 +5991,7 @@ function ZoomWindow({
6024
5991
  top
6025
5992
  };
6026
5993
  };
6027
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5994
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6028
5995
  Surface,
6029
5996
  {
6030
5997
  elevation: 16,
@@ -6039,7 +6006,7 @@ function ZoomWindow({
6039
6006
  userSelect: "none"
6040
6007
  }, calculatePosition()),
6041
6008
  "aria-hidden": true,
6042
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6009
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6043
6010
  "img",
6044
6011
  {
6045
6012
  src: imageSrc,
@@ -6061,7 +6028,7 @@ function ZoomWindow({
6061
6028
 
6062
6029
  // src/components/ProductImagePreview/CarouselPagination.tsx
6063
6030
  var import_clsx32 = require("clsx");
6064
- var import_jsx_runtime48 = require("react/jsx-runtime");
6031
+ var import_jsx_runtime47 = require("react/jsx-runtime");
6065
6032
  function CarouselPagination({
6066
6033
  images,
6067
6034
  currentIndex,
@@ -6069,7 +6036,7 @@ function CarouselPagination({
6069
6036
  className
6070
6037
  }) {
6071
6038
  if (!(images == null ? void 0 : images.length)) return null;
6072
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6039
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6073
6040
  "div",
6074
6041
  {
6075
6042
  className: (0, import_clsx32.clsx)(
@@ -6077,7 +6044,7 @@ function CarouselPagination({
6077
6044
  className
6078
6045
  ),
6079
6046
  "aria-label": "Image navigation",
6080
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6047
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6081
6048
  "div",
6082
6049
  {
6083
6050
  className: "grid gap-2 place-items-center",
@@ -6085,7 +6052,7 @@ function CarouselPagination({
6085
6052
  gridTemplateColumns: `repeat(${Math.min(images.length, 8)}, 1fr)`
6086
6053
  },
6087
6054
  role: "tablist",
6088
- children: images.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6055
+ children: images.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6089
6056
  "button",
6090
6057
  {
6091
6058
  type: "button",
@@ -6109,7 +6076,7 @@ function CarouselPagination({
6109
6076
 
6110
6077
  // src/components/ProductImagePreview/MobileImageCarousel.tsx
6111
6078
  var import_react29 = require("react");
6112
- var import_jsx_runtime49 = require("react/jsx-runtime");
6079
+ var import_jsx_runtime48 = require("react/jsx-runtime");
6113
6080
  function MobileImageCarousel({
6114
6081
  images,
6115
6082
  currentIndex,
@@ -6224,7 +6191,7 @@ function MobileImageCarousel({
6224
6191
  [isDragging, currentIndex, onChangeIndex]
6225
6192
  );
6226
6193
  if (!images.length) return null;
6227
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: `md:hidden w-full ${className}`, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6194
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: `md:hidden w-full ${className}`, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6228
6195
  "div",
6229
6196
  {
6230
6197
  ref: containerRef,
@@ -6239,7 +6206,7 @@ function MobileImageCarousel({
6239
6206
  onTouchStart: handleTouchStart,
6240
6207
  onTouchMove: handleTouchMove,
6241
6208
  onTouchEnd: handleTouchEnd,
6242
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6209
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6243
6210
  "div",
6244
6211
  {
6245
6212
  className: "flex items-center",
@@ -6252,7 +6219,7 @@ function MobileImageCarousel({
6252
6219
  const isActive = index === currentIndex;
6253
6220
  const distance = Math.abs(index - currentIndex);
6254
6221
  const shouldRender = distance <= 2;
6255
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6222
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6256
6223
  "div",
6257
6224
  {
6258
6225
  className: "flex-shrink-0 transition-opacity duration-300",
@@ -6262,7 +6229,7 @@ function MobileImageCarousel({
6262
6229
  opacity: isActive ? 1 : Math.max(0.3, 1 - distance * 0.3)
6263
6230
  },
6264
6231
  onClick: () => handleImageClick(index),
6265
- children: shouldRender ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6232
+ children: shouldRender ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6266
6233
  "img",
6267
6234
  {
6268
6235
  src: image.src,
@@ -6274,7 +6241,7 @@ function MobileImageCarousel({
6274
6241
  aspectRatio: "1 / 1"
6275
6242
  }
6276
6243
  }
6277
- ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6244
+ ) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6278
6245
  "div",
6279
6246
  {
6280
6247
  className: "w-full h-full bg-neutral-100 rounded-md border border-gray-200",
@@ -6410,7 +6377,7 @@ function useProductImagePreview(props) {
6410
6377
  }
6411
6378
 
6412
6379
  // src/components/ProductImagePreview/index.tsx
6413
- var import_jsx_runtime50 = require("react/jsx-runtime");
6380
+ var import_jsx_runtime49 = require("react/jsx-runtime");
6414
6381
  var PLACEHOLDER_IMAGES = [
6415
6382
  { src: "", alt: "placeholder" },
6416
6383
  { src: "", alt: "placeholder" }
@@ -6453,9 +6420,9 @@ function ProductImagePreview(props) {
6453
6420
  });
6454
6421
  if (typeof isMobile === "undefined") return null;
6455
6422
  const effectiveZoomEnabled = zoomEnabled && !isMobile;
6456
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Stack, { sizing: "layout", style: { width, position: "relative" }, children: [
6457
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex gap-4 items-start", children: [
6458
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ref: primaryImageRef, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6423
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Stack, { sizing: "layout", style: { width, position: "relative" }, children: [
6424
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex gap-4 items-start", children: [
6425
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { ref: primaryImageRef, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6459
6426
  ProductPrimaryImage,
6460
6427
  {
6461
6428
  image: active,
@@ -6469,7 +6436,7 @@ function ProductImagePreview(props) {
6469
6436
  isPlaceholder: images.length === 0
6470
6437
  }
6471
6438
  ) }),
6472
- effectiveZoomEnabled && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6439
+ effectiveZoomEnabled && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6473
6440
  ZoomWindow,
6474
6441
  {
6475
6442
  image: active,
@@ -6484,7 +6451,7 @@ function ProductImagePreview(props) {
6484
6451
  }
6485
6452
  )
6486
6453
  ] }) }),
6487
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6454
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6488
6455
  MobileImageCarousel,
6489
6456
  {
6490
6457
  images,
@@ -6494,14 +6461,14 @@ function ProductImagePreview(props) {
6494
6461
  onChangeIndex: handleSelect
6495
6462
  }
6496
6463
  ),
6497
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "hidden md:block", children: images.length <= 3 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6464
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "hidden md:block", children: images.length <= 3 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6498
6465
  "div",
6499
6466
  {
6500
6467
  className: "flex justify-center gap-4",
6501
6468
  style: { width: "100%", maxWidth: width },
6502
6469
  "aria-label": "Product image thumbnails",
6503
6470
  children: (images.length === 0 ? PLACEHOLDER_IMAGES : images).map(
6504
- (img, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { style: { maxWidth: "115px" }, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6471
+ (img, i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { style: { maxWidth: "115px" }, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6505
6472
  Thumbnail,
6506
6473
  {
6507
6474
  src: img.src,
@@ -6513,7 +6480,7 @@ function ProductImagePreview(props) {
6513
6480
  ) }, img.src + i)
6514
6481
  )
6515
6482
  }
6516
- ) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6483
+ ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6517
6484
  Grid,
6518
6485
  {
6519
6486
  sizing: "layout-group",
@@ -6524,7 +6491,7 @@ function ProductImagePreview(props) {
6524
6491
  },
6525
6492
  columns: thumbsPerRow > 12 ? 12 : thumbsPerRow < 1 ? 1 : thumbsPerRow,
6526
6493
  children: (images.length === 0 ? PLACEHOLDER_IMAGES : images).map(
6527
- (img, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6494
+ (img, i) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6528
6495
  Thumbnail,
6529
6496
  {
6530
6497
  src: img.src,
@@ -6538,7 +6505,7 @@ function ProductImagePreview(props) {
6538
6505
  )
6539
6506
  }
6540
6507
  ) }),
6541
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6508
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6542
6509
  CarouselPagination,
6543
6510
  {
6544
6511
  images,
@@ -6552,7 +6519,7 @@ function ProductImagePreview(props) {
6552
6519
  // src/components/CompactImagesPreview.tsx
6553
6520
  var import_react31 = require("react");
6554
6521
  var import_clsx33 = __toESM(require("clsx"), 1);
6555
- var import_jsx_runtime51 = require("react/jsx-runtime");
6522
+ var import_jsx_runtime50 = require("react/jsx-runtime");
6556
6523
  function CompactImagesPreview(props) {
6557
6524
  const {
6558
6525
  sources,
@@ -6562,7 +6529,7 @@ function CompactImagesPreview(props) {
6562
6529
  thumbnailWidth = 30.5,
6563
6530
  thumbnailHeight = 30,
6564
6531
  enableThumbnailBorder = false,
6565
- placeholderImageUri,
6532
+ placeholderImageUri: placeholderImageUri2,
6566
6533
  placeholderAlt = "placeholder image",
6567
6534
  onChangeSource,
6568
6535
  onMainImageClick
@@ -6571,13 +6538,13 @@ function CompactImagesPreview(props) {
6571
6538
  const imagesCount = sources.length;
6572
6539
  const handleImgError = (0, import_react31.useCallback)(
6573
6540
  (e) => {
6574
- if (!placeholderImageUri) return;
6541
+ if (!placeholderImageUri2) return;
6575
6542
  const img = e.currentTarget;
6576
- if (img.src === placeholderImageUri) return;
6577
- img.src = placeholderImageUri;
6543
+ if (img.src === placeholderImageUri2) return;
6544
+ img.src = placeholderImageUri2;
6578
6545
  if (!img.alt) img.alt = placeholderAlt;
6579
6546
  },
6580
- [placeholderImageUri, placeholderAlt]
6547
+ [placeholderImageUri2, placeholderAlt]
6581
6548
  );
6582
6549
  const handleThumbnailClick = (0, import_react31.useCallback)(
6583
6550
  (newIndex) => {
@@ -6588,7 +6555,7 @@ function CompactImagesPreview(props) {
6588
6555
  [currentSourceIndex, onChangeSource, imagesCount]
6589
6556
  );
6590
6557
  if (!sources.length || currentSourceIndex >= sources.length || typeof isMobile === "undefined")
6591
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6558
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6592
6559
  "img",
6593
6560
  {
6594
6561
  className: "object-center",
@@ -6598,15 +6565,15 @@ function CompactImagesPreview(props) {
6598
6565
  objectPosition: "center",
6599
6566
  objectFit: "cover"
6600
6567
  },
6601
- src: placeholderImageUri,
6568
+ src: placeholderImageUri2,
6602
6569
  alt: placeholderAlt,
6603
6570
  onError: handleImgError,
6604
6571
  onClick: onMainImageClick
6605
6572
  }
6606
6573
  );
6607
6574
  const currentSource = sources[currentSourceIndex];
6608
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Stack, { sizing: "layout", children: [
6609
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6575
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Stack, { sizing: "layout", children: [
6576
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6610
6577
  "img",
6611
6578
  {
6612
6579
  className: (0, import_clsx33.default)("object-center", onMainImageClick && "cursor-pointer"),
@@ -6622,7 +6589,7 @@ function CompactImagesPreview(props) {
6622
6589
  onClick: onMainImageClick
6623
6590
  }
6624
6591
  ),
6625
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex flex-row flex-wrap items-center gap-3", children: sources.slice(0, 4).map((source, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6592
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex flex-row flex-wrap items-center gap-3", children: sources.slice(0, 4).map((source, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6626
6593
  "button",
6627
6594
  {
6628
6595
  onClick: (e) => {
@@ -6633,7 +6600,7 @@ function CompactImagesPreview(props) {
6633
6600
  "cursor-pointer",
6634
6601
  currentSourceIndex === index && enableThumbnailBorder ? "ring-2 ring-offset-2 ring-brand-400 transition-discrete duration-300" : "ring-brand-400/0"
6635
6602
  ),
6636
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6603
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6637
6604
  "img",
6638
6605
  {
6639
6606
  src: source.uri,
@@ -6655,17 +6622,17 @@ function CompactImagesPreview(props) {
6655
6622
 
6656
6623
  // src/components/SimpleTable.tsx
6657
6624
  var import_clsx34 = __toESM(require("clsx"), 1);
6658
- var import_jsx_runtime52 = require("react/jsx-runtime");
6625
+ var import_jsx_runtime51 = require("react/jsx-runtime");
6659
6626
  function SimpleTable({
6660
6627
  columns,
6661
6628
  data,
6662
6629
  additionalRows
6663
6630
  }) {
6664
6631
  const allRows = additionalRows && additionalRows.length > 0 ? [...data, ...additionalRows] : data;
6665
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Stack, { elevation: 4, rounded: true, overflowX: "hidden", overflowY: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("table", { className: "w-full border-collapse text-left text-sm border overflow-hidden rounded border-border-primary-normal", children: [
6666
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("tr", { className: "bg-background-primary-normal divide-x divide-border-primary-normal", children: columns.map((column, index) => {
6632
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Stack, { elevation: 4, rounded: true, overflowX: "hidden", overflowY: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("table", { className: "w-full border-collapse text-left text-sm border overflow-hidden rounded border-border-primary-normal", children: [
6633
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tr", { className: "bg-background-primary-normal divide-x divide-border-primary-normal", children: columns.map((column, index) => {
6667
6634
  var _a, _b;
6668
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
6635
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6669
6636
  "th",
6670
6637
  {
6671
6638
  scope: "col",
@@ -6673,12 +6640,12 @@ function SimpleTable({
6673
6640
  "p-mobile-layout-padding desktop:p-desktop-layout-padding font-semibold text-text-primary-normal",
6674
6641
  ((_a = column.meta) == null ? void 0 : _a.headerWidth) ? column.meta.headerWidth : "w-2/3"
6675
6642
  ),
6676
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Subheader, { children: (_b = column.header) == null ? void 0 : _b.toString() })
6643
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Subheader, { children: (_b = column.header) == null ? void 0 : _b.toString() })
6677
6644
  },
6678
6645
  index
6679
6646
  );
6680
6647
  }) }) }),
6681
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("tbody", { children: allRows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
6648
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tbody", { children: allRows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6682
6649
  "tr",
6683
6650
  {
6684
6651
  className: "border-t border-border-primary-normal divide-x divide-border-primary-normal",
@@ -6686,7 +6653,7 @@ function SimpleTable({
6686
6653
  var _a;
6687
6654
  const rawValue = column.id ? row[column.id] : null;
6688
6655
  const cellValue = rawValue != null ? rawValue : null;
6689
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
6656
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6690
6657
  "td",
6691
6658
  {
6692
6659
  className: (0, import_clsx34.default)(
@@ -6711,6 +6678,36 @@ var import_react34 = require("react");
6711
6678
  var import_react_pdf2 = require("@mikecousins/react-pdf");
6712
6679
  var import_react33 = require("react");
6713
6680
 
6681
+ // src/components/Spinner.tsx
6682
+ var import_jsx_runtime52 = require("react/jsx-runtime");
6683
+ var Spinner = ({ size = "small", testid }) => {
6684
+ const dimension = size === "large" ? 48 : 24;
6685
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
6686
+ "svg",
6687
+ {
6688
+ "data-testid": testid,
6689
+ width: dimension,
6690
+ height: dimension,
6691
+ viewBox: "0 0 24 24",
6692
+ xmlns: "http://www.w3.org/2000/svg",
6693
+ fill: "#1D1E1E",
6694
+ className: "spinner",
6695
+ "aria-label": "Loading",
6696
+ children: [
6697
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
6698
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
6699
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
6700
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
6701
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
6702
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
6703
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
6704
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
6705
+ ]
6706
+ }
6707
+ );
6708
+ };
6709
+ Spinner.displayName = "Spinner";
6710
+
6714
6711
  // src/components/PDFViewer/PDFPage.tsx
6715
6712
  var import_react_pdf = require("@mikecousins/react-pdf");
6716
6713
  var import_react32 = require("react");
@@ -7189,8 +7186,18 @@ Pagination.displayName = "Pagination";
7189
7186
 
7190
7187
  // src/components/SkeletonParagraph.tsx
7191
7188
  var import_jsx_runtime60 = require("react/jsx-runtime");
7192
- function SkeletonParagraph() {
7193
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "h-[24px] bg-gradient-to-r from-neutral-100 to-[#f7f7f7] w-full rounded-xs min-w-32 " });
7189
+ function SkeletonParagraph({
7190
+ className = "",
7191
+ heightClassName = "h-6"
7192
+ }) {
7193
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
7194
+ "div",
7195
+ {
7196
+ "aria-label": "Loading content",
7197
+ role: "status",
7198
+ className: `skeleton-paragraph ${heightClassName} w-full min-w-32 rounded-xs ${className}`
7199
+ }
7200
+ );
7194
7201
  }
7195
7202
  // Annotate the CommonJS export names for ESM import in node:
7196
7203
  0 && (module.exports = {
@@ -778,9 +778,6 @@
778
778
  .h-60 {
779
779
  height: calc(var(--spacing) * 60);
780
780
  }
781
- .h-\[24px\] {
782
- height: 24px;
783
- }
784
781
  .h-\[166px\] {
785
782
  height: 166px;
786
783
  }
@@ -1870,10 +1867,6 @@
1870
1867
  --tw-gradient-position: to right in oklab;
1871
1868
  background-image: linear-gradient(var(--tw-gradient-stops));
1872
1869
  }
1873
- .from-neutral-100 {
1874
- --tw-gradient-from: var(--color-neutral-100);
1875
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1876
- }
1877
1870
  .from-neutral-300\/\[12\%\] {
1878
1871
  --tw-gradient-from: color-mix(in srgb, #c1c1c1 12%, transparent);
1879
1872
  @supports (color: color-mix(in lab, red, red)) {
@@ -1885,10 +1878,6 @@
1885
1878
  --tw-gradient-from: var(--color-white);
1886
1879
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1887
1880
  }
1888
- .to-\[\#f7f7f7\] {
1889
- --tw-gradient-to: #f7f7f7;
1890
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1891
- }
1892
1881
  .to-neutral-300\/\[24\%\] {
1893
1882
  --tw-gradient-to: color-mix(in srgb, #c1c1c1 24%, transparent);
1894
1883
  @supports (color: color-mix(in lab, red, red)) {
@@ -4674,6 +4663,29 @@
4674
4663
  --color-background-action-critical-secondary-disabled: var( --color-neutral-200 );
4675
4664
  --color-background-brand-normal: var( --color-brand-400 );
4676
4665
  }
4666
+ .skeleton-paragraph {
4667
+ position: relative;
4668
+ overflow: hidden;
4669
+ background-color: #f7f7f7;
4670
+ }
4671
+ .skeleton-paragraph::after {
4672
+ content: "";
4673
+ position: absolute;
4674
+ inset: 0;
4675
+ transform: translateX(-100%);
4676
+ background-image:
4677
+ linear-gradient(
4678
+ 90deg,
4679
+ rgba(255, 255, 255, 0) 0%,
4680
+ rgba(255, 255, 255, 0.6) 50%,
4681
+ rgba(255, 255, 255, 0) 100%);
4682
+ animation: skeleton-shimmer 1.4s ease-in-out infinite;
4683
+ }
4684
+ @keyframes skeleton-shimmer {
4685
+ 100% {
4686
+ transform: translateX(100%);
4687
+ }
4688
+ }
4677
4689
  @media (prefers-color-scheme: dark) {
4678
4690
  :root {
4679
4691
  --color-text-primary-normal: var(--color-neutral-000);
@@ -10,10 +10,10 @@ import {
10
10
  } from "../chunk-3HBYDOYE.js";
11
11
  import {
12
12
  ProductImagePreview
13
- } from "../chunk-IMOIZFJZ.js";
13
+ } from "../chunk-DNYGKNQM.js";
14
14
  import "../chunk-MBZ55T2D.js";
15
15
  import "../chunk-2IKT6IHB.js";
16
- import "../chunk-G5DEC7H3.js";
16
+ import "../chunk-YCDDBSVU.js";
17
17
  import "../chunk-3X3Y4TMS.js";
18
18
  import "../chunk-BQNPOGD5.js";
19
19
  import "../chunk-LUPHOXAQ.js";
@@ -34,7 +34,7 @@ import {
34
34
  } from "../chunk-PQWWVBSR.js";
35
35
  import {
36
36
  SkeletonParagraph
37
- } from "../chunk-ESCNCQGI.js";
37
+ } from "../chunk-ETAEB3TA.js";
38
38
  import "../chunk-AT4AWD6B.js";
39
39
  import {
40
40
  Select
package/dist/index.css CHANGED
@@ -756,9 +756,6 @@
756
756
  .h-60 {
757
757
  height: calc(var(--spacing) * 60);
758
758
  }
759
- .h-\[24px\] {
760
- height: 24px;
761
- }
762
759
  .h-\[166px\] {
763
760
  height: 166px;
764
761
  }
@@ -1848,10 +1845,6 @@
1848
1845
  --tw-gradient-position: to right in oklab;
1849
1846
  background-image: linear-gradient(var(--tw-gradient-stops));
1850
1847
  }
1851
- .from-neutral-100 {
1852
- --tw-gradient-from: var(--color-neutral-100);
1853
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1854
- }
1855
1848
  .from-neutral-300\/\[12\%\] {
1856
1849
  --tw-gradient-from: color-mix(in srgb, #c1c1c1 12%, transparent);
1857
1850
  @supports (color: color-mix(in lab, red, red)) {
@@ -1863,10 +1856,6 @@
1863
1856
  --tw-gradient-from: var(--color-white);
1864
1857
  --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1865
1858
  }
1866
- .to-\[\#f7f7f7\] {
1867
- --tw-gradient-to: #f7f7f7;
1868
- --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
1869
- }
1870
1859
  .to-neutral-300\/\[24\%\] {
1871
1860
  --tw-gradient-to: color-mix(in srgb, #c1c1c1 24%, transparent);
1872
1861
  @supports (color: color-mix(in lab, red, red)) {
@@ -4652,6 +4641,29 @@
4652
4641
  --color-background-action-critical-secondary-disabled: var( --color-neutral-200 );
4653
4642
  --color-background-brand-normal: var( --color-brand-400 );
4654
4643
  }
4644
+ .skeleton-paragraph {
4645
+ position: relative;
4646
+ overflow: hidden;
4647
+ background-color: #f7f7f7;
4648
+ }
4649
+ .skeleton-paragraph::after {
4650
+ content: "";
4651
+ position: absolute;
4652
+ inset: 0;
4653
+ transform: translateX(-100%);
4654
+ background-image:
4655
+ linear-gradient(
4656
+ 90deg,
4657
+ rgba(255, 255, 255, 0) 0%,
4658
+ rgba(255, 255, 255, 0.6) 50%,
4659
+ rgba(255, 255, 255, 0) 100%);
4660
+ animation: skeleton-shimmer 1.4s ease-in-out infinite;
4661
+ }
4662
+ @keyframes skeleton-shimmer {
4663
+ 100% {
4664
+ transform: translateX(100%);
4665
+ }
4666
+ }
4655
4667
  @media (prefers-color-scheme: dark) {
4656
4668
  :root {
4657
4669
  --color-text-primary-normal: var(--color-neutral-000);