@dmsi/wedgekit-react 0.0.415 → 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.
- package/dist/chunk-3HBYDOYE.js +114 -0
- package/dist/{chunk-JIMJIJOF.js → chunk-5TGP5EFM.js} +2 -2
- package/dist/{chunk-2HMCS25C.js → chunk-6LHBY2IH.js} +1 -1
- package/dist/{chunk-6I5LZ2ZC.js → chunk-7AXHAWJX.js} +3 -3
- package/dist/{chunk-MQX7GFLX.js → chunk-CAQWLY5V.js} +24 -6
- package/dist/{chunk-QQ5G773N.js → chunk-DCLNAUC4.js} +1 -1
- package/dist/{chunk-GB4ZTUQV.js → chunk-DTW7JCBR.js} +36 -0
- package/dist/{chunk-BK7SPR6Y.js → chunk-HYJIDHAK.js} +6 -6
- package/dist/{chunk-ZHZIIVJN.js → chunk-IMOIZFJZ.js} +5 -5
- package/dist/chunk-KBJZUVLM.js +65 -0
- package/dist/{chunk-AA6GE3TH.js → chunk-LUPHOXAQ.js} +1 -1
- package/dist/chunk-NRNWEQD7.js +66 -0
- package/dist/{chunk-44TDIHUP.js → chunk-P3MIP2FD.js} +1 -1
- package/dist/{chunk-7ULLUUVJ.js → chunk-PQWWVBSR.js} +1 -1
- package/dist/{chunk-ERW5DEIO.js → chunk-RQLWSLVE.js} +1 -1
- package/dist/chunk-TYAQWVIM.js +159 -0
- package/dist/{chunk-KZZKQLKF.js → chunk-W55J2KJZ.js} +1 -1
- package/dist/chunk-Y2GK27RX.js +79 -0
- package/dist/components/Accordion.cjs +74 -2
- package/dist/components/Accordion.js +3 -3
- package/dist/components/CalendarRange.cjs +228 -53
- package/dist/components/CalendarRange.css +169 -65
- package/dist/components/CalendarRange.js +23 -16
- package/dist/components/Card.cjs +38 -2
- package/dist/components/Card.js +1 -1
- package/dist/components/CompactImagesPreview.cjs +59 -5
- package/dist/components/CompactImagesPreview.js +2 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +186 -11
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +169 -65
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +23 -16
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +195 -20
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +169 -65
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +23 -16
- package/dist/components/DataGrid/PinnedColumns.cjs +211 -36
- package/dist/components/DataGrid/PinnedColumns.css +169 -65
- package/dist/components/DataGrid/PinnedColumns.js +23 -16
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +187 -12
- package/dist/components/DataGrid/TableBody/LoadingCell.css +169 -65
- package/dist/components/DataGrid/TableBody/LoadingCell.js +23 -16
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +193 -18
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +169 -65
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +23 -16
- package/dist/components/DataGrid/TableBody/index.cjs +208 -33
- package/dist/components/DataGrid/TableBody/index.css +169 -65
- package/dist/components/DataGrid/TableBody/index.js +23 -16
- package/dist/components/DataGrid/index.cjs +297 -122
- package/dist/components/DataGrid/index.css +169 -65
- package/dist/components/DataGrid/index.js +23 -16
- package/dist/components/DataGrid/utils.cjs +187 -12
- package/dist/components/DataGrid/utils.css +169 -65
- package/dist/components/DataGrid/utils.js +23 -16
- package/dist/components/DateInput.cjs +247 -72
- package/dist/components/DateInput.css +169 -65
- package/dist/components/DateInput.js +23 -16
- package/dist/components/DateRangeInput.cjs +247 -72
- package/dist/components/DateRangeInput.css +169 -65
- package/dist/components/DateRangeInput.js +23 -16
- package/dist/components/Grid.cjs +81 -76
- package/dist/components/Grid.js +1 -1
- package/dist/components/ListGroup.cjs +553 -0
- package/dist/components/ListGroup.js +11 -0
- package/dist/components/MobileDataGrid/ColumnList.cjs +36 -0
- package/dist/components/MobileDataGrid/ColumnList.js +3 -3
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +194 -19
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +169 -65
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +23 -16
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +36 -0
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +2 -2
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +238 -27
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +169 -65
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +23 -16
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.cjs +36 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +2 -2
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +36 -0
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +5 -5
- package/dist/components/MobileDataGrid/index.cjs +740 -529
- package/dist/components/MobileDataGrid/index.css +169 -65
- package/dist/components/MobileDataGrid/index.js +23 -16
- package/dist/components/Modal.js +2 -2
- package/dist/components/Notification.cjs +36 -0
- package/dist/components/Notification.js +1 -1
- package/dist/components/PDFViewer/PDFElement.cjs +36 -0
- package/dist/components/PDFViewer/PDFElement.js +2 -2
- package/dist/components/PDFViewer/PDFNavigation.cjs +36 -0
- package/dist/components/PDFViewer/PDFNavigation.js +2 -2
- package/dist/components/PDFViewer/index.cjs +36 -0
- package/dist/components/PDFViewer/index.js +8 -111
- package/dist/components/Pagination.cjs +427 -0
- package/dist/components/Pagination.js +10 -0
- package/dist/components/ProductImagePreview/index.cjs +139 -127
- package/dist/components/ProductImagePreview/index.js +4 -4
- package/dist/components/SideMenuGroup.cjs +36 -0
- package/dist/components/SideMenuGroup.js +1 -1
- package/dist/components/SideMenuItem.cjs +36 -0
- package/dist/components/SideMenuItem.js +1 -1
- package/dist/components/SimpleTable.cjs +36 -0
- package/dist/components/SimpleTable.js +2 -2
- package/dist/components/Stack.cjs +36 -0
- package/dist/components/Stack.js +1 -1
- package/dist/components/Swatch.cjs +36 -0
- package/dist/components/Swatch.js +1 -1
- package/dist/components/Time.cjs +36 -0
- package/dist/components/Time.js +1 -1
- package/dist/components/Tooltip.cjs +1 -1
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/Upload.cjs +36 -0
- package/dist/components/Upload.js +1 -1
- package/dist/components/index.cjs +686 -131
- package/dist/components/index.css +169 -65
- package/dist/components/index.js +33 -17
- package/dist/index.css +169 -65
- package/package.json +1 -1
- package/src/components/Card.tsx +60 -2
- package/src/components/CompactImagesPreview.tsx +54 -30
- package/src/components/Grid.tsx +59 -91
- package/src/components/ListGroup.tsx +82 -0
- package/src/components/Pagination.tsx +182 -0
- package/src/components/Stack.tsx +76 -0
- package/src/components/Tooltip.tsx +4 -3
- package/src/components/index.ts +3 -0
- package/dist/chunk-ER6RCOH3.js +0 -97
- package/dist/chunk-EZCH4PQS.js +0 -29
- 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,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ModalContent
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
RowDetailModalProvider
|
|
3
|
-
} from "./chunk-6I5LZ2ZC.js";
|
|
4
1
|
import {
|
|
5
2
|
GridContextProvider
|
|
6
3
|
} from "./chunk-M7INAUAJ.js";
|
|
4
|
+
import {
|
|
5
|
+
RowDetailModalProvider
|
|
6
|
+
} from "./chunk-7AXHAWJX.js";
|
|
7
7
|
import {
|
|
8
8
|
ColumnList
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LUPHOXAQ.js";
|
|
10
10
|
import {
|
|
11
11
|
useGridContext
|
|
12
12
|
} from "./chunk-5IFPG6TS.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-EWGHVZL5.js";
|
|
16
16
|
import {
|
|
17
17
|
Tooltip
|
|
18
|
-
} from "./chunk-
|
|
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-
|
|
64
|
+
} from "./chunk-DTW7JCBR.js";
|
|
65
65
|
import {
|
|
66
66
|
Paragraph
|
|
67
67
|
} from "./chunk-OGIFIPKH.js";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CarouselPagination
|
|
3
|
+
} from "./chunk-MBZ55T2D.js";
|
|
1
4
|
import {
|
|
2
5
|
MobileImageCarousel
|
|
3
6
|
} from "./chunk-2IKT6IHB.js";
|
|
@@ -10,18 +13,15 @@ import {
|
|
|
10
13
|
import {
|
|
11
14
|
ZoomWindow
|
|
12
15
|
} from "./chunk-BQNPOGD5.js";
|
|
13
|
-
import {
|
|
14
|
-
CarouselPagination
|
|
15
|
-
} from "./chunk-MBZ55T2D.js";
|
|
16
16
|
import {
|
|
17
17
|
Grid
|
|
18
|
-
} from "./chunk-
|
|
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-
|
|
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
|
+
};
|
|
@@ -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
|
+
};
|