@dmsi/wedgekit-react 0.0.414 → 0.0.417

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 (124) hide show
  1. package/dist/chunk-3HBYDOYE.js +114 -0
  2. package/dist/{chunk-JIMJIJOF.js → chunk-5TGP5EFM.js} +2 -2
  3. package/dist/{chunk-2HMCS25C.js → chunk-6LHBY2IH.js} +1 -1
  4. package/dist/{chunk-6I5LZ2ZC.js → chunk-7AXHAWJX.js} +3 -3
  5. package/dist/{chunk-MQX7GFLX.js → chunk-CAQWLY5V.js} +24 -6
  6. package/dist/{chunk-QQ5G773N.js → chunk-DCLNAUC4.js} +1 -1
  7. package/dist/{chunk-GB4ZTUQV.js → chunk-DTW7JCBR.js} +36 -0
  8. package/dist/{chunk-OBY5EH47.js → chunk-HYJIDHAK.js} +6 -6
  9. package/dist/{chunk-LZGYABCX.js → chunk-IMOIZFJZ.js} +8 -8
  10. package/dist/chunk-KBJZUVLM.js +65 -0
  11. package/dist/{chunk-AA6GE3TH.js → chunk-LUPHOXAQ.js} +1 -1
  12. package/dist/chunk-NRNWEQD7.js +66 -0
  13. package/dist/{chunk-44TDIHUP.js → chunk-P3MIP2FD.js} +1 -1
  14. package/dist/chunk-PQWWVBSR.js +61 -0
  15. package/dist/{chunk-ERW5DEIO.js → chunk-RQLWSLVE.js} +1 -1
  16. package/dist/chunk-TYAQWVIM.js +159 -0
  17. package/dist/{chunk-KZZKQLKF.js → chunk-W55J2KJZ.js} +1 -1
  18. package/dist/chunk-Y2GK27RX.js +79 -0
  19. package/dist/components/Accordion.cjs +74 -2
  20. package/dist/components/Accordion.js +3 -3
  21. package/dist/components/CalendarRange.cjs +232 -53
  22. package/dist/components/CalendarRange.css +178 -65
  23. package/dist/components/CalendarRange.js +25 -17
  24. package/dist/components/Card.cjs +38 -2
  25. package/dist/components/Card.js +1 -1
  26. package/dist/components/CompactImagesPreview.cjs +59 -5
  27. package/dist/components/CompactImagesPreview.js +2 -2
  28. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +190 -11
  29. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +178 -65
  30. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +25 -17
  31. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +200 -21
  32. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +178 -65
  33. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +25 -17
  34. package/dist/components/DataGrid/PinnedColumns.cjs +215 -36
  35. package/dist/components/DataGrid/PinnedColumns.css +178 -65
  36. package/dist/components/DataGrid/PinnedColumns.js +25 -17
  37. package/dist/components/DataGrid/TableBody/LoadingCell.cjs +191 -12
  38. package/dist/components/DataGrid/TableBody/LoadingCell.css +178 -65
  39. package/dist/components/DataGrid/TableBody/LoadingCell.js +25 -17
  40. package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +197 -18
  41. package/dist/components/DataGrid/TableBody/TableBodyRow.css +178 -65
  42. package/dist/components/DataGrid/TableBody/TableBodyRow.js +25 -17
  43. package/dist/components/DataGrid/TableBody/index.cjs +212 -33
  44. package/dist/components/DataGrid/TableBody/index.css +178 -65
  45. package/dist/components/DataGrid/TableBody/index.js +25 -17
  46. package/dist/components/DataGrid/index.cjs +301 -122
  47. package/dist/components/DataGrid/index.css +178 -65
  48. package/dist/components/DataGrid/index.js +25 -17
  49. package/dist/components/DataGrid/utils.cjs +191 -12
  50. package/dist/components/DataGrid/utils.css +178 -65
  51. package/dist/components/DataGrid/utils.js +25 -17
  52. package/dist/components/DateInput.cjs +251 -72
  53. package/dist/components/DateInput.css +178 -65
  54. package/dist/components/DateInput.js +25 -17
  55. package/dist/components/DateRangeInput.cjs +251 -72
  56. package/dist/components/DateRangeInput.css +178 -65
  57. package/dist/components/DateRangeInput.js +25 -17
  58. package/dist/components/Grid.cjs +81 -76
  59. package/dist/components/Grid.js +1 -1
  60. package/dist/components/ListGroup.cjs +553 -0
  61. package/dist/components/ListGroup.js +11 -0
  62. package/dist/components/MobileDataGrid/ColumnList.cjs +36 -0
  63. package/dist/components/MobileDataGrid/ColumnList.js +3 -3
  64. package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +198 -19
  65. package/dist/components/MobileDataGrid/ColumnSelector/index.css +178 -65
  66. package/dist/components/MobileDataGrid/ColumnSelector/index.js +25 -17
  67. package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +36 -0
  68. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +2 -2
  69. package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +242 -27
  70. package/dist/components/MobileDataGrid/MobileDataGridHeader.css +178 -65
  71. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +25 -17
  72. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.cjs +36 -0
  73. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +2 -2
  74. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +36 -0
  75. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +5 -5
  76. package/dist/components/MobileDataGrid/index.cjs +742 -527
  77. package/dist/components/MobileDataGrid/index.css +178 -65
  78. package/dist/components/MobileDataGrid/index.js +25 -17
  79. package/dist/components/Modal.js +2 -2
  80. package/dist/components/Notification.cjs +36 -0
  81. package/dist/components/Notification.js +1 -1
  82. package/dist/components/PDFViewer/PDFElement.cjs +36 -0
  83. package/dist/components/PDFViewer/PDFElement.js +2 -2
  84. package/dist/components/PDFViewer/PDFNavigation.cjs +36 -0
  85. package/dist/components/PDFViewer/PDFNavigation.js +2 -2
  86. package/dist/components/PDFViewer/index.cjs +36 -0
  87. package/dist/components/PDFViewer/index.js +8 -111
  88. package/dist/components/Pagination.cjs +427 -0
  89. package/dist/components/Pagination.js +10 -0
  90. package/dist/components/ProductImagePreview/index.cjs +139 -127
  91. package/dist/components/ProductImagePreview/index.js +5 -5
  92. package/dist/components/SideMenuGroup.cjs +36 -0
  93. package/dist/components/SideMenuGroup.js +1 -1
  94. package/dist/components/SideMenuItem.cjs +36 -0
  95. package/dist/components/SideMenuItem.js +1 -1
  96. package/dist/components/SimpleTable.cjs +521 -0
  97. package/dist/components/SimpleTable.js +10 -0
  98. package/dist/components/Stack.cjs +36 -0
  99. package/dist/components/Stack.js +1 -1
  100. package/dist/components/Swatch.cjs +36 -0
  101. package/dist/components/Swatch.js +1 -1
  102. package/dist/components/Time.cjs +36 -0
  103. package/dist/components/Time.js +1 -1
  104. package/dist/components/Tooltip.cjs +1 -1
  105. package/dist/components/Tooltip.js +1 -1
  106. package/dist/components/Upload.cjs +36 -0
  107. package/dist/components/Upload.js +1 -1
  108. package/dist/components/index.cjs +739 -131
  109. package/dist/components/index.css +178 -65
  110. package/dist/components/index.js +37 -17
  111. package/dist/index.css +178 -65
  112. package/package.json +1 -1
  113. package/src/components/Card.tsx +60 -2
  114. package/src/components/CompactImagesPreview.tsx +54 -30
  115. package/src/components/Grid.tsx +59 -91
  116. package/src/components/ListGroup.tsx +82 -0
  117. package/src/components/Pagination.tsx +182 -0
  118. package/src/components/SimpleTable.tsx +77 -0
  119. package/src/components/Stack.tsx +76 -0
  120. package/src/components/Tooltip.tsx +4 -3
  121. package/src/components/index.ts +4 -0
  122. package/dist/chunk-ER6RCOH3.js +0 -97
  123. package/dist/chunk-EZCH4PQS.js +0 -29
  124. package/dist/{chunk-D6YCMQPO.js → chunk-SBCFBHNG.js} +3 -3
@@ -0,0 +1,114 @@
1
+ import {
2
+ DownloadIcon
3
+ } from "./chunk-EJSPFQCY.js";
4
+ import {
5
+ PDFElement
6
+ } from "./chunk-RQLWSLVE.js";
7
+ import {
8
+ PdfNavigation
9
+ } from "./chunk-6LHBY2IH.js";
10
+ import {
11
+ Modal
12
+ } from "./chunk-SBCFBHNG.js";
13
+
14
+ // src/components/PDFViewer/index.tsx
15
+ import { useCallback, useState } from "react";
16
+ import { jsx } from "react/jsx-runtime";
17
+ function PDFViewer(props) {
18
+ const {
19
+ isOpen,
20
+ onClose,
21
+ encodedPdfs,
22
+ customActions,
23
+ testid,
24
+ isMobile,
25
+ title,
26
+ customFooter = false,
27
+ withPagination = true,
28
+ error
29
+ } = props;
30
+ const [currentIndex, setCurrentIndex] = useState(0);
31
+ const [isDownloading, setIsDownloading] = useState(false);
32
+ const handleDownload = useCallback(() => {
33
+ setIsDownloading(true);
34
+ const link = document.createElement("a");
35
+ const currentPdf = encodedPdfs[currentIndex];
36
+ if (!currentPdf) {
37
+ setIsDownloading(false);
38
+ return;
39
+ }
40
+ link.href = `data:application/pdf;base64,${currentPdf.base64}`;
41
+ link.download = currentPdf.fileName.endsWith(".pdf") ? currentPdf.fileName : `${currentPdf.fileName}.pdf`;
42
+ document.body.appendChild(link);
43
+ link.click();
44
+ document.body.removeChild(link);
45
+ setIsDownloading(false);
46
+ }, [currentIndex, encodedPdfs]);
47
+ if (!encodedPdfs.length) return null;
48
+ function handleNextFile() {
49
+ if (currentIndex < encodedPdfs.length - 1) {
50
+ setCurrentIndex((prev) => prev + 1);
51
+ }
52
+ }
53
+ function handlePreviousFile() {
54
+ if (currentIndex > 0) {
55
+ setCurrentIndex((prev) => prev - 1);
56
+ }
57
+ }
58
+ function handleClose() {
59
+ setCurrentIndex(0);
60
+ setIsDownloading(false);
61
+ onClose();
62
+ }
63
+ return /* @__PURE__ */ jsx(
64
+ Modal,
65
+ {
66
+ testid,
67
+ open: isOpen,
68
+ customFooter,
69
+ onClose: handleClose,
70
+ noWrapper: true,
71
+ showButtons: isMobile && customFooter ? !!customActions : !!encodedPdfs.length,
72
+ customActions: !!encodedPdfs.length && !isMobile && withPagination ? /* @__PURE__ */ jsx(
73
+ PdfNavigation,
74
+ {
75
+ testid,
76
+ currentIndex,
77
+ total: encodedPdfs.length,
78
+ onPrev: handlePreviousFile,
79
+ onNext: handleNextFile,
80
+ disablePrev: currentIndex === 0,
81
+ disableNext: currentIndex === encodedPdfs.length - 1,
82
+ extraActions: customActions,
83
+ fileName: encodedPdfs[currentIndex].fileName
84
+ }
85
+ ) : customActions,
86
+ fixedHeightScrolling: true,
87
+ headerIconAlign: "right",
88
+ headerIcon: !isMobile ? /* @__PURE__ */ jsx(
89
+ DownloadIcon,
90
+ {
91
+ testid: testid ? `${testid}-download-icon` : void 0,
92
+ onClick: handleDownload,
93
+ isDownloading
94
+ }
95
+ ) : void 0,
96
+ title: isMobile ? title != null ? title : encodedPdfs[currentIndex].fileName : void 0,
97
+ size: isMobile ? "screen" : "large",
98
+ headerClassname: "bg-brand-400 desktop:bg-background-grouped-primary-normal p-mobile-layout-padding text-brand-text-action-primary-normal",
99
+ children: /* @__PURE__ */ jsx(
100
+ PDFElement,
101
+ {
102
+ testid,
103
+ b64: encodedPdfs[currentIndex].base64,
104
+ isMobile,
105
+ error
106
+ }
107
+ )
108
+ }
109
+ );
110
+ }
111
+
112
+ export {
113
+ PDFViewer
114
+ };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Card
3
- } from "./chunk-EZCH4PQS.js";
3
+ } from "./chunk-KBJZUVLM.js";
4
4
  import {
5
5
  Stack
6
- } from "./chunk-GB4ZTUQV.js";
6
+ } from "./chunk-DTW7JCBR.js";
7
7
  import {
8
8
  Paragraph
9
9
  } from "./chunk-OGIFIPKH.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-EU73QPW7.js";
4
4
  import {
5
5
  Stack
6
- } from "./chunk-GB4ZTUQV.js";
6
+ } from "./chunk-DTW7JCBR.js";
7
7
  import {
8
8
  Paragraph
9
9
  } from "./chunk-OGIFIPKH.js";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  ModalContent
3
- } from "./chunk-44TDIHUP.js";
3
+ } from "./chunk-P3MIP2FD.js";
4
4
  import {
5
5
  useGridContext
6
6
  } from "./chunk-5IFPG6TS.js";
7
7
  import {
8
8
  Modal
9
- } from "./chunk-D6YCMQPO.js";
9
+ } from "./chunk-SBCFBHNG.js";
10
10
  import {
11
11
  Heading2
12
12
  } from "./chunk-EU73QPW7.js";
13
13
  import {
14
14
  Stack
15
- } from "./chunk-GB4ZTUQV.js";
15
+ } from "./chunk-DTW7JCBR.js";
16
16
  import {
17
17
  Icon
18
18
  } from "./chunk-NKUETCDA.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-MYKYZHEO.js";
4
4
  import {
5
5
  Stack
6
- } from "./chunk-GB4ZTUQV.js";
6
+ } from "./chunk-DTW7JCBR.js";
7
7
 
8
8
  // src/components/CompactImagesPreview.tsx
9
9
  import { useCallback } from "react";
@@ -19,10 +19,22 @@ function CompactImagesPreview(props) {
19
19
  thumbnailHeight = 30,
20
20
  enableThumbnailBorder = false,
21
21
  placeholderImageUri,
22
- onChangeSource
22
+ placeholderAlt = "placeholder image",
23
+ onChangeSource,
24
+ onMainImageClick
23
25
  } = props;
24
26
  const isMobile = useMatchesMobile();
25
27
  const imagesCount = sources.length;
28
+ const handleImgError = useCallback(
29
+ (e) => {
30
+ if (!placeholderImageUri) return;
31
+ const img = e.currentTarget;
32
+ if (img.src === placeholderImageUri) return;
33
+ img.src = placeholderImageUri;
34
+ if (!img.alt) img.alt = placeholderAlt;
35
+ },
36
+ [placeholderImageUri, placeholderAlt]
37
+ );
26
38
  const handleThumbnailClick = useCallback(
27
39
  (newIndex) => {
28
40
  if (newIndex === currentSourceIndex) return;
@@ -43,7 +55,9 @@ function CompactImagesPreview(props) {
43
55
  objectFit: "cover"
44
56
  },
45
57
  src: placeholderImageUri,
46
- alt: "placeholder image"
58
+ alt: placeholderAlt,
59
+ onError: handleImgError,
60
+ onClick: onMainImageClick
47
61
  }
48
62
  );
49
63
  const currentSource = sources[currentSourceIndex];
@@ -51,6 +65,7 @@ function CompactImagesPreview(props) {
51
65
  /* @__PURE__ */ jsx(
52
66
  "img",
53
67
  {
68
+ className: clsx("object-center", onMainImageClick && "cursor-pointer"),
54
69
  style: {
55
70
  width: isMobile ? "100%" : activeImageWidth,
56
71
  height: activeImageHeight,
@@ -58,10 +73,12 @@ function CompactImagesPreview(props) {
58
73
  objectFit: "cover"
59
74
  },
60
75
  src: currentSource.uri,
61
- alt: currentSource.name
76
+ alt: currentSource.name,
77
+ onError: handleImgError,
78
+ onClick: onMainImageClick
62
79
  }
63
80
  ),
64
- sources.length > 1 && /* @__PURE__ */ jsx("div", { className: "flex flex-row flex-wrap items-center gap-3", children: sources.map((source, index) => /* @__PURE__ */ jsx(
81
+ /* @__PURE__ */ jsx("div", { className: "flex flex-row flex-wrap items-center gap-3", children: sources.map((source, index) => /* @__PURE__ */ jsx(
65
82
  "button",
66
83
  {
67
84
  onClick: (e) => {
@@ -82,7 +99,8 @@ function CompactImagesPreview(props) {
82
99
  height: thumbnailHeight,
83
100
  objectPosition: "center",
84
101
  objectFit: "cover"
85
- }
102
+ },
103
+ onError: handleImgError
86
104
  }
87
105
  )
88
106
  },
@@ -84,7 +84,7 @@ var Tooltip = ({
84
84
  id,
85
85
  "data-testid": testid,
86
86
  ref,
87
- className: "relative inline-grid grid-cols-[auto_1fr] items-center",
87
+ className: "relative inline-grid grid-cols-[auto_1fr] items-center cursor-pointer",
88
88
  onMouseEnter: handleMouseEnter,
89
89
  onMouseLeave: handleMouseLeave,
90
90
  children: [
@@ -42,6 +42,10 @@ var Stack = (_a) => {
42
42
  padding,
43
43
  paddingX,
44
44
  paddingY,
45
+ paddingBottom,
46
+ paddingTop,
47
+ paddingLeft,
48
+ paddingRight,
45
49
  margin,
46
50
  marginX,
47
51
  marginY,
@@ -57,6 +61,10 @@ var Stack = (_a) => {
57
61
  height,
58
62
  maxHeight,
59
63
  borderColor,
64
+ borderTopColor,
65
+ borderRightColor,
66
+ borderBottomColor,
67
+ borderLeftColor,
60
68
  backgroundColor,
61
69
  sizing = "none",
62
70
  overflowY = "inherit",
@@ -82,6 +90,10 @@ var Stack = (_a) => {
82
90
  "padding",
83
91
  "paddingX",
84
92
  "paddingY",
93
+ "paddingBottom",
94
+ "paddingTop",
95
+ "paddingLeft",
96
+ "paddingRight",
85
97
  "margin",
86
98
  "marginX",
87
99
  "marginY",
@@ -97,6 +109,10 @@ var Stack = (_a) => {
97
109
  "height",
98
110
  "maxHeight",
99
111
  "borderColor",
112
+ "borderTopColor",
113
+ "borderRightColor",
114
+ "borderBottomColor",
115
+ "borderLeftColor",
100
116
  "backgroundColor",
101
117
  "sizing",
102
118
  "overflowY",
@@ -132,6 +148,10 @@ var Stack = (_a) => {
132
148
  width: width !== void 0 && typeof width === "number" ? `${width}px` : void 0,
133
149
  minWidth: minWidth !== void 0 ? `${minWidth}px` : void 0,
134
150
  border: borderColor ? `1px solid var(--color-${borderColor})` : void 0,
151
+ borderTop: borderTopColor ? `1px solid var(--color-${borderTopColor})` : void 0,
152
+ borderRight: borderRightColor ? `1px solid var(--color-${borderRightColor})` : void 0,
153
+ borderBottom: borderBottomColor ? `1px solid var(--color-${borderBottomColor})` : void 0,
154
+ borderLeft: borderLeftColor ? `1px solid var(--color-${borderLeftColor})` : void 0,
135
155
  backgroundColor: backgroundColor ? `var(--color-${backgroundColor})` : void 0,
136
156
  flexGrow: flexGrow !== void 0 ? flexGrow : void 0,
137
157
  flexShrink: flexShrink !== void 0 ? flexShrink : void 0,
@@ -171,6 +191,22 @@ var Stack = (_a) => {
171
191
  paddingY && sizing === "layout" && "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding",
172
192
  paddingY && sizing === "layout-group" && paddingYUsingLayoutGroupGap,
173
193
  paddingY && sizing === "component" && "py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding",
194
+ paddingBottom && sizing === "container" && "pb-mobile-container-padding desktop:pb-desktop-container-padding compact:pb-desktop-compact-container-padding",
195
+ paddingBottom && sizing === "layout" && "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding",
196
+ paddingBottom && sizing === "layout-group" && "pb-mobile-layout-group-padding desktop:pb-desktop-layout-group-padding compact:pb-desktop-compact-layout-group-padding",
197
+ paddingBottom && sizing === "component" && "pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding",
198
+ paddingTop && sizing === "container" && "pt-mobile-container-padding desktop:pt-desktop-container-padding compact:pt-desktop-compact-container-padding",
199
+ paddingTop && sizing === "layout" && "pt-mobile-layout-padding desktop:pt-desktop-layout-padding compact:pt-desktop-compact-layout-padding",
200
+ paddingTop && sizing === "layout-group" && "pt-mobile-layout-group-padding desktop:pt-desktop-layout-group-padding compact:pt-desktop-compact-layout-group-padding",
201
+ paddingTop && sizing === "component" && "pt-mobile-component-padding desktop:pt-desktop-component-padding compact:pt-desktop-compact-component-padding",
202
+ paddingLeft && sizing === "container" && "pl-mobile-container-padding desktop:pl-desktop-container-padding compact:pl-desktop-compact-container-padding",
203
+ paddingLeft && sizing === "layout" && "pl-mobile-layout-padding desktop:pl-desktop-layout-padding compact:pl-desktop-compact-layout-padding",
204
+ paddingLeft && sizing === "layout-group" && "pl-mobile-layout-group-padding desktop:pl-desktop-layout-group-padding compact:pl-desktop-compact-layout-group-padding",
205
+ paddingLeft && sizing === "component" && "pl-mobile-component-padding desktop:pl-desktop-component-padding compact:pl-desktop-compact-component-padding",
206
+ paddingRight && sizing === "container" && "pr-mobile-container-padding desktop:pr-desktop-container-padding compact:pr-desktop-compact-container-padding",
207
+ paddingRight && sizing === "layout" && "pr-mobile-layout-padding desktop:pr-desktop-layout-padding compact:pr-desktop-compact-layout-padding",
208
+ paddingRight && sizing === "layout-group" && "pr-mobile-layout-group-padding desktop:pr-desktop-layout-group-padding compact:pr-desktop-compact-layout-group-padding",
209
+ paddingRight && sizing === "component" && "pr-mobile-component-padding desktop:pr-desktop-component-padding compact:pr-desktop-compact-component-padding",
174
210
  margin && sizing === "container" && "m-mobile-container-padding desktop:m-desktop-container-padding compact:m-compact-container-padding",
175
211
  marginX && sizing === "container" && "mx-mobile-container-padding desktop:mx-desktop-container-padding compact:mx-compact-container-padding",
176
212
  marginTop && sizing === "container" && "mt-mobile-container-padding desktop:mt-desktop-container-padding compact:mt-compact-container-padding",
@@ -3,19 +3,19 @@ import {
3
3
  } from "./chunk-M7INAUAJ.js";
4
4
  import {
5
5
  RowDetailModalProvider
6
- } from "./chunk-6I5LZ2ZC.js";
6
+ } from "./chunk-7AXHAWJX.js";
7
7
  import {
8
8
  ColumnList
9
- } from "./chunk-AA6GE3TH.js";
9
+ } from "./chunk-LUPHOXAQ.js";
10
10
  import {
11
11
  useGridContext
12
12
  } from "./chunk-5IFPG6TS.js";
13
- import {
14
- Tooltip
15
- } from "./chunk-QQ5G773N.js";
16
13
  import {
17
14
  Theme
18
15
  } from "./chunk-EWGHVZL5.js";
16
+ import {
17
+ Tooltip
18
+ } from "./chunk-DCLNAUC4.js";
19
19
  import {
20
20
  Select
21
21
  } from "./chunk-J5V2JRIK.js";
@@ -61,7 +61,7 @@ import {
61
61
  } from "./chunk-FA7IFW66.js";
62
62
  import {
63
63
  Stack
64
- } from "./chunk-GB4ZTUQV.js";
64
+ } from "./chunk-DTW7JCBR.js";
65
65
  import {
66
66
  Paragraph
67
67
  } from "./chunk-OGIFIPKH.js";
@@ -1,3 +1,9 @@
1
+ import {
2
+ CarouselPagination
3
+ } from "./chunk-MBZ55T2D.js";
4
+ import {
5
+ MobileImageCarousel
6
+ } from "./chunk-2IKT6IHB.js";
1
7
  import {
2
8
  ProductPrimaryImage
3
9
  } from "./chunk-G5DEC7H3.js";
@@ -7,21 +13,15 @@ import {
7
13
  import {
8
14
  ZoomWindow
9
15
  } from "./chunk-BQNPOGD5.js";
10
- import {
11
- CarouselPagination
12
- } from "./chunk-MBZ55T2D.js";
13
- import {
14
- MobileImageCarousel
15
- } from "./chunk-2IKT6IHB.js";
16
16
  import {
17
17
  Grid
18
- } from "./chunk-ER6RCOH3.js";
18
+ } from "./chunk-Y2GK27RX.js";
19
19
  import {
20
20
  useMatchesMobile
21
21
  } from "./chunk-MYKYZHEO.js";
22
22
  import {
23
23
  Stack
24
- } from "./chunk-GB4ZTUQV.js";
24
+ } from "./chunk-DTW7JCBR.js";
25
25
 
26
26
  // src/components/ProductImagePreview/useProductImagePreview.ts
27
27
  import { useCallback, useEffect, useRef, useState, useMemo } from "react";
@@ -0,0 +1,65 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-ORMEWXMH.js";
6
+
7
+ // src/components/Card.tsx
8
+ import clsx from "clsx";
9
+ import { jsx } from "react/jsx-runtime";
10
+ function Card(props) {
11
+ const _a = props, {
12
+ children,
13
+ selected,
14
+ testid,
15
+ padding,
16
+ paddingX,
17
+ paddingY,
18
+ paddingBottom,
19
+ paddingTop,
20
+ paddingLeft,
21
+ paddingRight
22
+ } = _a, rest = __objRest(_a, [
23
+ "children",
24
+ "selected",
25
+ "testid",
26
+ "padding",
27
+ "paddingX",
28
+ "paddingY",
29
+ "paddingBottom",
30
+ "paddingTop",
31
+ "paddingLeft",
32
+ "paddingRight"
33
+ ]);
34
+ const CardComponent = props.as || "div";
35
+ const anyPaddingPropSpecified = padding !== void 0 || paddingX !== void 0 || paddingY !== void 0 || paddingBottom !== void 0 || paddingTop !== void 0 || paddingLeft !== void 0 || paddingRight !== void 0;
36
+ const paddingClasses = clsx(
37
+ // Backward compatibility: if no new padding props provided keep existing class.
38
+ !anyPaddingPropSpecified && "p-desktop-layout-padding",
39
+ // New responsive spacing tokens (mirrors Stack for layout sizing)
40
+ padding && "p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding",
41
+ paddingX && "px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding",
42
+ paddingY && "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding",
43
+ paddingBottom && "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding",
44
+ paddingTop && "pt-mobile-layout-padding desktop:pt-desktop-layout-padding compact:pt-desktop-compact-layout-padding",
45
+ paddingLeft && "pl-mobile-layout-padding desktop:pl-desktop-layout-padding compact:pl-desktop-compact-layout-padding",
46
+ paddingRight && "pr-mobile-layout-padding desktop:pr-desktop-layout-padding compact:pr-desktop-compact-layout-padding"
47
+ );
48
+ return /* @__PURE__ */ jsx(
49
+ CardComponent,
50
+ __spreadProps(__spreadValues({}, rest), {
51
+ "data-testid": testid,
52
+ className: clsx(
53
+ "rounded-sm",
54
+ paddingClasses,
55
+ selected ? "border-2 border-border-primary-focus" : "border border-border-primary-normal",
56
+ rest.className
57
+ ),
58
+ children
59
+ })
60
+ );
61
+ }
62
+
63
+ export {
64
+ Card
65
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MobileDataGridCard
3
- } from "./chunk-KZZKQLKF.js";
3
+ } from "./chunk-W55J2KJZ.js";
4
4
  import {
5
5
  useGridContext
6
6
  } from "./chunk-5IFPG6TS.js";
@@ -0,0 +1,66 @@
1
+ import {
2
+ Label
3
+ } from "./chunk-7CS736EF.js";
4
+ import {
5
+ Stack
6
+ } from "./chunk-DTW7JCBR.js";
7
+ import {
8
+ Icon
9
+ } from "./chunk-NKUETCDA.js";
10
+
11
+ // src/components/ListGroup.tsx
12
+ import { useState } from "react";
13
+ import clsx from "clsx";
14
+ import { jsx, jsxs } from "react/jsx-runtime";
15
+ function ListGroup({
16
+ title,
17
+ defaultOpen = false,
18
+ open: controlledOpen,
19
+ onToggle,
20
+ testid,
21
+ disabled,
22
+ className,
23
+ children
24
+ }) {
25
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
26
+ const isControlled = controlledOpen !== void 0;
27
+ const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
28
+ const toggle = () => {
29
+ if (disabled) return;
30
+ const next = !isOpen;
31
+ if (!isControlled) setUncontrolledOpen(next);
32
+ onToggle == null ? void 0 : onToggle(next);
33
+ };
34
+ return /* @__PURE__ */ jsx("div", { "data-testid": testid, className: clsx("rounded-sm", className), children: /* @__PURE__ */ jsxs(Stack, { sizing: "layout", noGap: true, children: [
35
+ /* @__PURE__ */ jsxs(
36
+ "button",
37
+ {
38
+ type: "button",
39
+ onClick: toggle,
40
+ className: clsx(
41
+ "w-full flex items-center justify-between text-left",
42
+ disabled && "opacity-50 cursor-not-allowed"
43
+ ),
44
+ "aria-expanded": isOpen,
45
+ children: [
46
+ /* @__PURE__ */ jsx(Label, { children: title }),
47
+ /* @__PURE__ */ jsx(
48
+ Icon,
49
+ {
50
+ name: "expand_more",
51
+ className: clsx(
52
+ "transition-transform duration-200",
53
+ isOpen ? "rotate-180" : "rotate-0"
54
+ )
55
+ }
56
+ )
57
+ ]
58
+ }
59
+ ),
60
+ isOpen && /* @__PURE__ */ jsx(Stack, { sizing: "layout", paddingY: true, children })
61
+ ] }) });
62
+ }
63
+
64
+ export {
65
+ ListGroup
66
+ };
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-M6TSTDNZ.js";
7
7
  import {
8
8
  Stack
9
- } from "./chunk-GB4ZTUQV.js";
9
+ } from "./chunk-DTW7JCBR.js";
10
10
  import {
11
11
  Paragraph
12
12
  } from "./chunk-OGIFIPKH.js";
@@ -0,0 +1,61 @@
1
+ import {
2
+ Subheader
3
+ } from "./chunk-FA7IFW66.js";
4
+ import {
5
+ Stack
6
+ } from "./chunk-DTW7JCBR.js";
7
+
8
+ // src/components/SimpleTable.tsx
9
+ import clsx from "clsx";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ function SimpleTable({
12
+ columns,
13
+ data,
14
+ additionalRows
15
+ }) {
16
+ const allRows = additionalRows && additionalRows.length > 0 ? [...data, ...additionalRows] : data;
17
+ return /* @__PURE__ */ jsx(Stack, { elevation: 4, rounded: true, overflowX: "hidden", overflowY: "hidden", children: /* @__PURE__ */ jsxs("table", { className: "w-full border-collapse text-left text-sm border overflow-hidden rounded border-border-primary-normal", children: [
18
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "bg-background-primary-normal divide-x divide-border-primary-normal", children: columns.map((column, index) => {
19
+ var _a, _b;
20
+ return /* @__PURE__ */ jsx(
21
+ "th",
22
+ {
23
+ scope: "col",
24
+ className: clsx(
25
+ "p-mobile-layout-padding desktop:p-desktop-layout-padding font-semibold text-text-primary-normal",
26
+ ((_a = column.meta) == null ? void 0 : _a.headerWidth) ? column.meta.headerWidth : "w-2/3"
27
+ ),
28
+ children: /* @__PURE__ */ jsx(Subheader, { children: (_b = column.header) == null ? void 0 : _b.toString() })
29
+ },
30
+ index
31
+ );
32
+ }) }) }),
33
+ /* @__PURE__ */ jsx("tbody", { children: allRows.map((row, rowIndex) => /* @__PURE__ */ jsx(
34
+ "tr",
35
+ {
36
+ className: "border-t border-border-primary-normal divide-x divide-border-primary-normal",
37
+ children: columns.map((column, colIndex) => {
38
+ var _a;
39
+ const rawValue = column.id ? row[column.id] : null;
40
+ const cellValue = rawValue != null ? rawValue : null;
41
+ return /* @__PURE__ */ jsx(
42
+ "td",
43
+ {
44
+ className: clsx(
45
+ "p-mobile-layout-padding desktop:p-desktop-layout-padding align-middle text-text-primary-normal",
46
+ (_a = column.meta) == null ? void 0 : _a.headerWidth
47
+ ),
48
+ children: cellValue !== null && cellValue !== void 0 ? typeof cellValue === "string" || typeof cellValue === "number" ? cellValue.toString() : cellValue : ""
49
+ },
50
+ colIndex
51
+ );
52
+ })
53
+ },
54
+ rowIndex
55
+ )) })
56
+ ] }) });
57
+ }
58
+
59
+ export {
60
+ SimpleTable
61
+ };
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-SBRRNFOP.js";
7
7
  import {
8
8
  Stack
9
- } from "./chunk-GB4ZTUQV.js";
9
+ } from "./chunk-DTW7JCBR.js";
10
10
 
11
11
  // src/components/PDFViewer/PDFElement.tsx
12
12
  import { usePdf } from "@mikecousins/react-pdf";