@dmsi/wedgekit-react 0.0.697 → 0.0.698
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-FESS4LWU.js +72 -0
- package/dist/{chunk-L3BXRDLP.js → chunk-KBIEWFQS.js} +4 -2
- package/dist/{chunk-34VEVX5H.js → chunk-NSZTJ5R4.js} +9 -2
- package/dist/{chunk-B2DVT7KT.js → chunk-SNENJFTN.js} +98 -89
- package/dist/components/AccessChangerTabItem.cjs +5 -2
- package/dist/components/AccessChangerTabItem.js +5 -2
- package/dist/components/CalendarRange.js +5 -5
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +5 -5
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +5 -5
- package/dist/components/DataGrid/PinnedColumns.js +5 -5
- package/dist/components/DataGrid/TableBody/LoadingCell.js +5 -5
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +5 -5
- package/dist/components/DataGrid/TableBody/index.js +5 -5
- package/dist/components/DataGrid/index.js +5 -5
- package/dist/components/DataGrid/utils.js +5 -5
- package/dist/components/DateInput.js +5 -5
- package/dist/components/DateRangeInput.js +5 -5
- package/dist/components/MobileDataGrid/ColumnList.js +1 -1
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +5 -5
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +1 -1
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +5 -5
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +1 -1
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +1 -1
- package/dist/components/MobileDataGrid/index.js +5 -5
- package/dist/components/OrderCheckIcon.cjs +20 -2
- package/dist/components/OrderCheckIcon.js +1 -1
- package/dist/components/ProductImagePreview/index.cjs +98 -89
- package/dist/components/ProductImagePreview/index.js +1 -1
- package/dist/components/SimpleTable.cjs +46 -35
- package/dist/components/SimpleTable.js +1 -1
- package/dist/components/SkeletonParagraph.cjs +4 -2
- package/dist/components/SkeletonParagraph.js +1 -1
- package/dist/components/WorldpayIframe.cjs +12 -2
- package/dist/components/WorldpayIframe.js +12 -2
- package/dist/components/index.cjs +156 -128
- package/dist/components/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-63WMDTVQ.js +0 -61
|
@@ -7559,7 +7559,8 @@ function ProductImagePreview(props) {
|
|
|
7559
7559
|
zoomLensSize,
|
|
7560
7560
|
zoomFactor = 2,
|
|
7561
7561
|
zoomWindowScaleFactor = 2.5,
|
|
7562
|
-
zoomWindowOffset = 10
|
|
7562
|
+
zoomWindowOffset = 10,
|
|
7563
|
+
testid
|
|
7563
7564
|
} = props;
|
|
7564
7565
|
const isMobile = useMatchesMobile();
|
|
7565
7566
|
const {
|
|
@@ -7584,100 +7585,108 @@ function ProductImagePreview(props) {
|
|
|
7584
7585
|
});
|
|
7585
7586
|
if (typeof isMobile === "undefined") return null;
|
|
7586
7587
|
const effectiveZoomEnabled = zoomEnabled && !isMobile;
|
|
7587
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
7588
|
-
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
scrollToZoomEnabled: scrollToZoomEnabled && !isMobile,
|
|
7598
|
-
onZoomPositionChange: handleZoomPositionChange,
|
|
7599
|
-
onScrollZoom: handleScrollZoom,
|
|
7600
|
-
isPlaceholder: images.length === 0
|
|
7601
|
-
}
|
|
7602
|
-
) }),
|
|
7603
|
-
effectiveZoomEnabled && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7604
|
-
ZoomWindow,
|
|
7605
|
-
{
|
|
7606
|
-
image: active,
|
|
7607
|
-
width,
|
|
7608
|
-
height,
|
|
7609
|
-
pointer: zoomPoint,
|
|
7610
|
-
active: zoomActive,
|
|
7611
|
-
zoomFactor: currentZoomFactor,
|
|
7612
|
-
scaleFactor: zoomWindowScaleFactor,
|
|
7613
|
-
primaryImagePosition,
|
|
7614
|
-
offset: zoomWindowOffset
|
|
7615
|
-
}
|
|
7616
|
-
)
|
|
7617
|
-
] }) }),
|
|
7618
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7619
|
-
MobileImageCarousel,
|
|
7620
|
-
{
|
|
7621
|
-
images,
|
|
7622
|
-
currentIndex: safeIndex,
|
|
7623
|
-
width,
|
|
7624
|
-
height,
|
|
7625
|
-
onChangeIndex: handleSelect
|
|
7626
|
-
}
|
|
7627
|
-
),
|
|
7628
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "hidden md:block", children: images.length <= 3 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7629
|
-
"div",
|
|
7630
|
-
{
|
|
7631
|
-
className: "flex justify-center gap-4",
|
|
7632
|
-
style: { width: "100%", maxWidth: width },
|
|
7633
|
-
"aria-label": "Product image thumbnails",
|
|
7634
|
-
children: (images.length === 0 ? PLACEHOLDER_IMAGES : images).map(
|
|
7635
|
-
(img, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { style: { maxWidth: "115px" }, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7636
|
-
Thumbnail,
|
|
7588
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
7589
|
+
Stack,
|
|
7590
|
+
{
|
|
7591
|
+
sizing: "layout",
|
|
7592
|
+
style: { width, position: "relative" },
|
|
7593
|
+
testid,
|
|
7594
|
+
children: [
|
|
7595
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "hidden md:block", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex gap-4 items-start", children: [
|
|
7596
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { ref: primaryImageRef, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7597
|
+
ProductPrimaryImage,
|
|
7637
7598
|
{
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7599
|
+
image: active,
|
|
7600
|
+
width,
|
|
7601
|
+
height,
|
|
7602
|
+
zoomEnabled: effectiveZoomEnabled,
|
|
7603
|
+
zoomLensSize,
|
|
7604
|
+
scrollToZoomEnabled: scrollToZoomEnabled && !isMobile,
|
|
7605
|
+
onZoomPositionChange: handleZoomPositionChange,
|
|
7606
|
+
onScrollZoom: handleScrollZoom,
|
|
7642
7607
|
isPlaceholder: images.length === 0
|
|
7643
7608
|
}
|
|
7644
|
-
) },
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7648
|
-
Grid,
|
|
7649
|
-
{
|
|
7650
|
-
sizing: "layout-group",
|
|
7651
|
-
"aria-label": "Product image thumbnails",
|
|
7652
|
-
style: {
|
|
7653
|
-
width: "100%",
|
|
7654
|
-
maxWidth: width
|
|
7655
|
-
},
|
|
7656
|
-
columns: thumbsPerRow > 12 ? 12 : thumbsPerRow < 1 ? 1 : thumbsPerRow,
|
|
7657
|
-
children: (images.length === 0 ? PLACEHOLDER_IMAGES : images).map(
|
|
7658
|
-
(img, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7659
|
-
Thumbnail,
|
|
7609
|
+
) }),
|
|
7610
|
+
effectiveZoomEnabled && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7611
|
+
ZoomWindow,
|
|
7660
7612
|
{
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7613
|
+
image: active,
|
|
7614
|
+
width,
|
|
7615
|
+
height,
|
|
7616
|
+
pointer: zoomPoint,
|
|
7617
|
+
active: zoomActive,
|
|
7618
|
+
zoomFactor: currentZoomFactor,
|
|
7619
|
+
scaleFactor: zoomWindowScaleFactor,
|
|
7620
|
+
primaryImagePosition,
|
|
7621
|
+
offset: zoomWindowOffset
|
|
7622
|
+
}
|
|
7668
7623
|
)
|
|
7624
|
+
] }) }),
|
|
7625
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7626
|
+
MobileImageCarousel,
|
|
7627
|
+
{
|
|
7628
|
+
images,
|
|
7629
|
+
currentIndex: safeIndex,
|
|
7630
|
+
width,
|
|
7631
|
+
height,
|
|
7632
|
+
onChangeIndex: handleSelect
|
|
7633
|
+
}
|
|
7634
|
+
),
|
|
7635
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "hidden md:block", children: images.length <= 3 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7636
|
+
"div",
|
|
7637
|
+
{
|
|
7638
|
+
className: "flex justify-center gap-4",
|
|
7639
|
+
style: { width: "100%", maxWidth: width },
|
|
7640
|
+
"aria-label": "Product image thumbnails",
|
|
7641
|
+
children: (images.length === 0 ? PLACEHOLDER_IMAGES : images).map(
|
|
7642
|
+
(img, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { style: { maxWidth: "115px" }, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7643
|
+
Thumbnail,
|
|
7644
|
+
{
|
|
7645
|
+
src: img.src,
|
|
7646
|
+
alt: img.alt || `Thumbnail ${i + 1}`,
|
|
7647
|
+
isActive: i === safeIndex,
|
|
7648
|
+
onClick: () => handleSelect(i),
|
|
7649
|
+
isPlaceholder: images.length === 0
|
|
7650
|
+
}
|
|
7651
|
+
) }, img.src + i)
|
|
7652
|
+
)
|
|
7653
|
+
}
|
|
7654
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7655
|
+
Grid,
|
|
7656
|
+
{
|
|
7657
|
+
sizing: "layout-group",
|
|
7658
|
+
"aria-label": "Product image thumbnails",
|
|
7659
|
+
style: {
|
|
7660
|
+
width: "100%",
|
|
7661
|
+
maxWidth: width
|
|
7662
|
+
},
|
|
7663
|
+
columns: thumbsPerRow > 12 ? 12 : thumbsPerRow < 1 ? 1 : thumbsPerRow,
|
|
7664
|
+
children: (images.length === 0 ? PLACEHOLDER_IMAGES : images).map(
|
|
7665
|
+
(img, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7666
|
+
Thumbnail,
|
|
7667
|
+
{
|
|
7668
|
+
src: img.src,
|
|
7669
|
+
alt: img.alt || `Thumbnail ${i + 1}`,
|
|
7670
|
+
isActive: i === safeIndex,
|
|
7671
|
+
onClick: () => handleSelect(i),
|
|
7672
|
+
isPlaceholder: images.length === 0
|
|
7673
|
+
},
|
|
7674
|
+
img.src + i
|
|
7675
|
+
)
|
|
7676
|
+
)
|
|
7677
|
+
}
|
|
7678
|
+
) }),
|
|
7679
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7680
|
+
CarouselPagination,
|
|
7681
|
+
{
|
|
7682
|
+
images,
|
|
7683
|
+
currentIndex: safeIndex,
|
|
7684
|
+
onSelect: handleSelect
|
|
7685
|
+
}
|
|
7669
7686
|
)
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
CarouselPagination,
|
|
7674
|
-
{
|
|
7675
|
-
images,
|
|
7676
|
-
currentIndex: safeIndex,
|
|
7677
|
-
onSelect: handleSelect
|
|
7678
|
-
}
|
|
7679
|
-
)
|
|
7680
|
-
] });
|
|
7687
|
+
]
|
|
7688
|
+
}
|
|
7689
|
+
);
|
|
7681
7690
|
}
|
|
7682
7691
|
|
|
7683
7692
|
// src/components/CompactImagesPreview.tsx
|
|
@@ -7794,49 +7803,60 @@ var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
|
7794
7803
|
function SimpleTable({
|
|
7795
7804
|
columns,
|
|
7796
7805
|
data,
|
|
7797
|
-
additionalRows
|
|
7806
|
+
additionalRows,
|
|
7807
|
+
testid
|
|
7798
7808
|
}) {
|
|
7799
7809
|
const allRows = additionalRows && additionalRows.length > 0 ? [...data, ...additionalRows] : data;
|
|
7800
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Subheader, { children: (_b = column.header) == null ? void 0 : _b.toString() })
|
|
7812
|
-
},
|
|
7813
|
-
index
|
|
7814
|
-
);
|
|
7815
|
-
}) }) }),
|
|
7816
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tbody", { children: allRows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7817
|
-
"tr",
|
|
7818
|
-
{
|
|
7819
|
-
className: "border-t border-border-primary-normal divide-x divide-border-primary-normal",
|
|
7820
|
-
children: columns.map((column, colIndex) => {
|
|
7821
|
-
var _a;
|
|
7822
|
-
const rawValue = column.id ? row[column.id] : null;
|
|
7823
|
-
const cellValue = rawValue != null ? rawValue : null;
|
|
7810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7811
|
+
Stack,
|
|
7812
|
+
{
|
|
7813
|
+
elevation: 4,
|
|
7814
|
+
rounded: true,
|
|
7815
|
+
overflowX: "hidden",
|
|
7816
|
+
overflowY: "hidden",
|
|
7817
|
+
testid,
|
|
7818
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("table", { className: "w-full border-collapse text-left text-sm border overflow-hidden rounded border-border-primary-normal", children: [
|
|
7819
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tr", { className: "bg-background-primary-normal divide-x divide-border-primary-normal", children: columns.map((column, index) => {
|
|
7820
|
+
var _a, _b;
|
|
7824
7821
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7825
|
-
"
|
|
7822
|
+
"th",
|
|
7826
7823
|
{
|
|
7824
|
+
scope: "col",
|
|
7827
7825
|
className: (0, import_clsx36.default)(
|
|
7828
|
-
"p-mobile-layout-padding desktop:p-desktop-layout-padding
|
|
7829
|
-
(_a = column.meta) == null ? void 0 : _a.headerWidth
|
|
7826
|
+
"p-mobile-layout-padding desktop:p-desktop-layout-padding font-semibold text-text-primary-normal",
|
|
7827
|
+
((_a = column.meta) == null ? void 0 : _a.headerWidth) ? column.meta.headerWidth : "w-2/3"
|
|
7830
7828
|
),
|
|
7831
|
-
children:
|
|
7829
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Subheader, { children: (_b = column.header) == null ? void 0 : _b.toString() })
|
|
7832
7830
|
},
|
|
7833
|
-
|
|
7831
|
+
index
|
|
7834
7832
|
);
|
|
7835
|
-
})
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7833
|
+
}) }) }),
|
|
7834
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tbody", { children: allRows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7835
|
+
"tr",
|
|
7836
|
+
{
|
|
7837
|
+
className: "border-t border-border-primary-normal divide-x divide-border-primary-normal",
|
|
7838
|
+
children: columns.map((column, colIndex) => {
|
|
7839
|
+
var _a;
|
|
7840
|
+
const rawValue = column.id ? row[column.id] : null;
|
|
7841
|
+
const cellValue = rawValue != null ? rawValue : null;
|
|
7842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7843
|
+
"td",
|
|
7844
|
+
{
|
|
7845
|
+
className: (0, import_clsx36.default)(
|
|
7846
|
+
"p-mobile-layout-padding desktop:p-desktop-layout-padding align-middle text-text-primary-normal",
|
|
7847
|
+
(_a = column.meta) == null ? void 0 : _a.headerWidth
|
|
7848
|
+
),
|
|
7849
|
+
children: cellValue !== null && cellValue !== void 0 ? typeof cellValue === "string" || typeof cellValue === "number" ? cellValue.toString() : cellValue : ""
|
|
7850
|
+
},
|
|
7851
|
+
colIndex
|
|
7852
|
+
);
|
|
7853
|
+
})
|
|
7854
|
+
},
|
|
7855
|
+
rowIndex
|
|
7856
|
+
)) })
|
|
7857
|
+
] })
|
|
7858
|
+
}
|
|
7859
|
+
);
|
|
7840
7860
|
}
|
|
7841
7861
|
|
|
7842
7862
|
// src/components/ListGroup.tsx
|
|
@@ -8043,7 +8063,8 @@ var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
|
8043
8063
|
function SkeletonParagraph({
|
|
8044
8064
|
className = "",
|
|
8045
8065
|
heightClassName = "h-6",
|
|
8046
|
-
size = "large"
|
|
8066
|
+
size = "large",
|
|
8067
|
+
testid
|
|
8047
8068
|
}) {
|
|
8048
8069
|
const sizeClassMap = {
|
|
8049
8070
|
small: "min-w-10 w-1/4",
|
|
@@ -8055,7 +8076,8 @@ function SkeletonParagraph({
|
|
|
8055
8076
|
{
|
|
8056
8077
|
"aria-label": "Loading content",
|
|
8057
8078
|
role: "status",
|
|
8058
|
-
className: `skeleton-paragraph ${heightClassName} ${sizeClassMap[size]} rounded-xs ${className}
|
|
8079
|
+
className: `skeleton-paragraph ${heightClassName} ${sizeClassMap[size]} rounded-xs ${className}`,
|
|
8080
|
+
"data-testid": testid
|
|
8059
8081
|
}
|
|
8060
8082
|
);
|
|
8061
8083
|
}
|
|
@@ -8191,7 +8213,12 @@ function Alert(_a) {
|
|
|
8191
8213
|
|
|
8192
8214
|
// src/components/OrderCheckIcon.tsx
|
|
8193
8215
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
8194
|
-
function OrderCheckIcon(
|
|
8216
|
+
function OrderCheckIcon(_a) {
|
|
8217
|
+
var _b = _a, {
|
|
8218
|
+
testid
|
|
8219
|
+
} = _b, props = __objRest(_b, [
|
|
8220
|
+
"testid"
|
|
8221
|
+
]);
|
|
8195
8222
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8196
8223
|
"svg",
|
|
8197
8224
|
__spreadProps(__spreadValues({
|
|
@@ -8199,7 +8226,8 @@ function OrderCheckIcon(props) {
|
|
|
8199
8226
|
viewBox: "0 0 37 36",
|
|
8200
8227
|
fill: "none",
|
|
8201
8228
|
width: 37,
|
|
8202
|
-
height: 36
|
|
8229
|
+
height: 36,
|
|
8230
|
+
"data-testid": testid
|
|
8203
8231
|
}, props), {
|
|
8204
8232
|
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8205
8233
|
"path",
|
package/dist/components/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import "../chunk-M7INAUAJ.js";
|
|
|
8
8
|
import "../chunk-URAV33TJ.js";
|
|
9
9
|
import {
|
|
10
10
|
ProductImagePreview
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-SNENJFTN.js";
|
|
12
12
|
import "../chunk-YCDDBSVU.js";
|
|
13
13
|
import "../chunk-3X3Y4TMS.js";
|
|
14
14
|
import "../chunk-BQNPOGD5.js";
|
|
@@ -22,8 +22,8 @@ import "../chunk-I2L2DXPU.js";
|
|
|
22
22
|
import {
|
|
23
23
|
useGridContext
|
|
24
24
|
} from "../chunk-5IFPG6TS.js";
|
|
25
|
-
import "../chunk-ZILLGHBE.js";
|
|
26
25
|
import "../chunk-AJ5M6MVX.js";
|
|
26
|
+
import "../chunk-ZILLGHBE.js";
|
|
27
27
|
import "../chunk-AT4AWD6B.js";
|
|
28
28
|
import "../chunk-EWGHVZL5.js";
|
|
29
29
|
import {
|
|
@@ -31,13 +31,13 @@ import {
|
|
|
31
31
|
} from "../chunk-UF5XGCSF.js";
|
|
32
32
|
import {
|
|
33
33
|
SimpleTable
|
|
34
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-FESS4LWU.js";
|
|
35
35
|
import {
|
|
36
36
|
SkeletonParagraph
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-KBIEWFQS.js";
|
|
38
38
|
import {
|
|
39
39
|
OrderCheckIcon
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-NSZTJ5R4.js";
|
|
41
41
|
import {
|
|
42
42
|
Pagination
|
|
43
43
|
} from "../chunk-LB7UT6F3.js";
|
package/package.json
CHANGED
package/dist/chunk-63WMDTVQ.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Subheader
|
|
3
|
-
} from "./chunk-BYC6QID5.js";
|
|
4
|
-
import {
|
|
5
|
-
Stack
|
|
6
|
-
} from "./chunk-MTGNBARV.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
|
-
};
|