@dmsi/wedgekit-react 0.0.552 → 0.0.554
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-7COWXCPA.js → chunk-45SH6WHE.js} +3 -3
- package/dist/{chunk-KJ5OQPPV.js → chunk-63WMDTVQ.js} +1 -1
- package/dist/{chunk-FJFZBIRG.js → chunk-7ZCXZDJD.js} +3 -3
- package/dist/{chunk-FWCVZWE6.js → chunk-7ZL4GBAD.js} +3 -3
- package/dist/{chunk-5BRIDIUA.js → chunk-AGHBLWDZ.js} +3 -3
- package/dist/{chunk-QYKOR7LE.js → chunk-CQLRGYHM.js} +3 -3
- package/dist/{chunk-XRE52QTN.js → chunk-D5V3PUQQ.js} +6 -6
- package/dist/{chunk-Y3EFHKAG.js → chunk-DWICBU2V.js} +1 -1
- package/dist/{chunk-CMMQTIVM.js → chunk-EJOPJIRO.js} +3 -3
- package/dist/{chunk-K4SIZGMK.js → chunk-EQ2RAI53.js} +1 -1
- package/dist/{chunk-SBGGDIE3.js → chunk-FIVKYEC3.js} +7 -7
- package/dist/{chunk-QMMPHXVE.js → chunk-GVIXW2QS.js} +3 -3
- package/dist/{chunk-ZIPJMN2E.js → chunk-GYQA4UIK.js} +6 -6
- package/dist/{chunk-45AHDOAU.js → chunk-HVYK7COK.js} +9 -3
- package/dist/{chunk-AKJUBFJK.js → chunk-KV7LAH3T.js} +3 -3
- package/dist/{chunk-AX4M7X4Z.js → chunk-MTGNBARV.js} +5 -2
- package/dist/{chunk-MHXYGKWA.js → chunk-Q3G6Z5DM.js} +1 -1
- package/dist/{chunk-4DXOA7NZ.js → chunk-RZ5EIDX4.js} +1 -1
- package/dist/{chunk-PJL5XESN.js → chunk-TL4M56HJ.js} +1 -1
- package/dist/{chunk-WNGFRQ4Y.js → chunk-TXPN24PW.js} +13 -13
- package/dist/{chunk-Z2QAJY5I.js → chunk-UAMI54FE.js} +1 -1
- package/dist/chunk-XJF4S3RB.js +82 -0
- package/dist/chunk-XR733AKC.js +82 -0
- package/dist/{chunk-7SFFUICM.js → chunk-YLC7OHW2.js} +6 -6
- package/dist/chunk-ZCJWOHFN.js +139 -0
- package/dist/{chunk-JADOJNBI.js → chunk-ZDXJXDZT.js} +4 -4
- package/dist/components/AccessCard.cjs +661 -0
- package/dist/components/AccessCard.js +13 -0
- package/dist/components/AccessCardGroup.cjs +365 -0
- package/dist/components/AccessCardGroup.js +11 -0
- package/dist/components/Accordion.cjs +5 -2
- package/dist/components/Accordion.js +2 -2
- package/dist/components/Alert.cjs +64 -28
- package/dist/components/Alert.js +4 -3
- package/dist/components/Button.cjs +38 -5
- package/dist/components/Button.js +2 -1
- package/dist/components/CalendarRange.cjs +298 -128
- package/dist/components/CalendarRange.css +44 -0
- package/dist/components/CalendarRange.js +28 -24
- package/dist/components/CompactImagesPreview.cjs +5 -2
- package/dist/components/CompactImagesPreview.js +2 -2
- package/dist/components/ContentTab.cjs +42 -9
- package/dist/components/ContentTab.js +3 -2
- package/dist/components/ContentTabs.cjs +47 -14
- package/dist/components/ContentTabs.js +3 -2
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +281 -111
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.css +44 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +28 -24
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +291 -121
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.css +44 -0
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +28 -24
- package/dist/components/DataGrid/PinnedColumns.cjs +306 -136
- package/dist/components/DataGrid/PinnedColumns.css +44 -0
- package/dist/components/DataGrid/PinnedColumns.js +28 -24
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +282 -112
- package/dist/components/DataGrid/TableBody/LoadingCell.css +44 -0
- package/dist/components/DataGrid/TableBody/LoadingCell.js +28 -24
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +288 -118
- package/dist/components/DataGrid/TableBody/TableBodyRow.css +44 -0
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +28 -24
- package/dist/components/DataGrid/TableBody/index.cjs +303 -133
- package/dist/components/DataGrid/TableBody/index.css +44 -0
- package/dist/components/DataGrid/TableBody/index.js +28 -24
- package/dist/components/DataGrid/index.cjs +392 -222
- package/dist/components/DataGrid/index.css +44 -0
- package/dist/components/DataGrid/index.js +28 -24
- package/dist/components/DataGrid/utils.cjs +282 -112
- package/dist/components/DataGrid/utils.css +44 -0
- package/dist/components/DataGrid/utils.js +28 -24
- package/dist/components/DataGridCell.js +3 -3
- package/dist/components/DateInput.cjs +311 -141
- package/dist/components/DateInput.css +44 -0
- package/dist/components/DateInput.js +28 -24
- package/dist/components/DateRangeInput.cjs +317 -147
- package/dist/components/DateRangeInput.css +44 -0
- package/dist/components/DateRangeInput.js +28 -24
- package/dist/components/FilterGroup.cjs +87 -52
- package/dist/components/FilterGroup.js +6 -5
- package/dist/components/InputGroup.cjs +1 -1
- package/dist/components/InputGroup.js +1 -1
- package/dist/components/ListGroup.cjs +5 -2
- package/dist/components/ListGroup.js +2 -2
- package/dist/components/MenuOption.js +2 -2
- package/dist/components/MobileDataGrid/ColumnList.cjs +5 -2
- package/dist/components/MobileDataGrid/ColumnList.js +3 -3
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +288 -118
- package/dist/components/MobileDataGrid/ColumnSelector/index.css +44 -0
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +28 -24
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.cjs +5 -2
- package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +2 -2
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +293 -120
- package/dist/components/MobileDataGrid/MobileDataGridHeader.css +44 -0
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +28 -24
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.cjs +5 -2
- package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +2 -2
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.cjs +94 -58
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +8 -7
- package/dist/components/MobileDataGrid/index.cjs +372 -199
- package/dist/components/MobileDataGrid/index.css +44 -0
- package/dist/components/MobileDataGrid/index.js +28 -24
- package/dist/components/Modal.cjs +64 -29
- package/dist/components/Modal.js +5 -4
- package/dist/components/ModalButtons.cjs +47 -14
- package/dist/components/ModalButtons.js +3 -2
- package/dist/components/ModalHeader.cjs +47 -12
- package/dist/components/ModalHeader.js +3 -2
- package/dist/components/NavigationTab.cjs +43 -10
- package/dist/components/NavigationTab.js +3 -2
- package/dist/components/NavigationTabs.cjs +48 -15
- package/dist/components/NavigationTabs.js +3 -2
- package/dist/components/NestedMenu.cjs +48 -13
- package/dist/components/NestedMenu.js +6 -5
- package/dist/components/Notification.cjs +68 -32
- package/dist/components/Notification.js +7 -6
- package/dist/components/OptionPill.cjs +48 -13
- package/dist/components/OptionPill.js +3 -2
- package/dist/components/PDFViewer/DownloadIcon.cjs +46 -13
- package/dist/components/PDFViewer/DownloadIcon.js +3 -2
- package/dist/components/PDFViewer/PDFElement.cjs +5 -2
- package/dist/components/PDFViewer/PDFElement.js +2 -2
- package/dist/components/PDFViewer/PDFNavigation.cjs +64 -28
- package/dist/components/PDFViewer/PDFNavigation.js +4 -3
- package/dist/components/PDFViewer/index.cjs +69 -61
- package/dist/components/PDFViewer/index.js +11 -11
- package/dist/components/ProductImagePreview/index.cjs +5 -2
- package/dist/components/ProductImagePreview/index.js +5 -5
- package/dist/components/Radio.js +5 -134
- package/dist/components/SideMenuGroup.cjs +5 -2
- package/dist/components/SideMenuGroup.js +1 -1
- package/dist/components/SideMenuItem.cjs +5 -2
- package/dist/components/SideMenuItem.js +3 -3
- package/dist/components/SimpleTable.cjs +5 -2
- package/dist/components/SimpleTable.js +2 -2
- package/dist/components/Stack.cjs +5 -2
- package/dist/components/Stack.js +1 -1
- package/dist/components/Stepper.cjs +73 -40
- package/dist/components/Stepper.js +4 -3
- package/dist/components/Swatch.cjs +5 -2
- package/dist/components/Swatch.js +3 -3
- package/dist/components/Time.cjs +5 -2
- package/dist/components/Time.js +2 -2
- package/dist/components/Toast.cjs +51 -16
- package/dist/components/Toast.js +4 -3
- package/dist/components/Upload.cjs +46 -38
- package/dist/components/Upload.js +6 -6
- package/dist/components/index.cjs +537 -231
- package/dist/components/index.css +44 -0
- package/dist/components/index.js +40 -30
- package/dist/index.css +44 -0
- package/package.json +1 -1
- package/dist/{chunk-EZ4KZYKG.js → chunk-YWQEMS2C.js} +3 -3
|
@@ -59,6 +59,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
59
59
|
// src/components/index.ts
|
|
60
60
|
var components_exports = {};
|
|
61
61
|
__export(components_exports, {
|
|
62
|
+
AccessCard: () => AccessCard,
|
|
63
|
+
AccessCardGroup: () => AccessCardGroup,
|
|
62
64
|
Accordion: () => Accordion,
|
|
63
65
|
Alert: () => Alert,
|
|
64
66
|
Button: () => Button,
|
|
@@ -4095,7 +4097,39 @@ Checkbox.displayName = "Checkbox";
|
|
|
4095
4097
|
|
|
4096
4098
|
// src/components/Button.tsx
|
|
4097
4099
|
var import_clsx18 = __toESM(require("clsx"), 1);
|
|
4100
|
+
|
|
4101
|
+
// src/components/Spinner.tsx
|
|
4098
4102
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
4103
|
+
var Spinner = ({ size = "small", testid }) => {
|
|
4104
|
+
const dimension = size === "large" ? 48 : 24;
|
|
4105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
4106
|
+
"svg",
|
|
4107
|
+
{
|
|
4108
|
+
"data-testid": testid,
|
|
4109
|
+
width: dimension,
|
|
4110
|
+
height: dimension,
|
|
4111
|
+
viewBox: "0 0 24 24",
|
|
4112
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4113
|
+
fill: "#1D1E1E",
|
|
4114
|
+
className: "spinner",
|
|
4115
|
+
"aria-label": "Loading",
|
|
4116
|
+
children: [
|
|
4117
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
|
|
4118
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
|
|
4119
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
|
|
4120
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
|
|
4121
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
|
|
4122
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
|
|
4123
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
|
|
4124
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
|
|
4125
|
+
]
|
|
4126
|
+
}
|
|
4127
|
+
);
|
|
4128
|
+
};
|
|
4129
|
+
Spinner.displayName = "Spinner";
|
|
4130
|
+
|
|
4131
|
+
// src/components/Button.tsx
|
|
4132
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
4099
4133
|
var Button = (_a) => {
|
|
4100
4134
|
var _b = _a, {
|
|
4101
4135
|
variant = "primary",
|
|
@@ -4111,7 +4145,8 @@ var Button = (_a) => {
|
|
|
4111
4145
|
colorClassName,
|
|
4112
4146
|
href,
|
|
4113
4147
|
id,
|
|
4114
|
-
testid
|
|
4148
|
+
testid,
|
|
4149
|
+
isLoading
|
|
4115
4150
|
} = _b, props = __objRest(_b, [
|
|
4116
4151
|
"variant",
|
|
4117
4152
|
"as",
|
|
@@ -4126,7 +4161,8 @@ var Button = (_a) => {
|
|
|
4126
4161
|
"colorClassName",
|
|
4127
4162
|
"href",
|
|
4128
4163
|
"id",
|
|
4129
|
-
"testid"
|
|
4164
|
+
"testid",
|
|
4165
|
+
"isLoading"
|
|
4130
4166
|
]);
|
|
4131
4167
|
const primaryVariantStyles = variant === "primary" && (0, import_clsx18.default)(
|
|
4132
4168
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
@@ -4210,7 +4246,7 @@ var Button = (_a) => {
|
|
|
4210
4246
|
typography.buttonLabel
|
|
4211
4247
|
);
|
|
4212
4248
|
const Element = href && !as ? "a" : as;
|
|
4213
|
-
return /* @__PURE__ */ (0,
|
|
4249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4214
4250
|
Element,
|
|
4215
4251
|
__spreadProps(__spreadValues({
|
|
4216
4252
|
id,
|
|
@@ -4224,7 +4260,8 @@ var Button = (_a) => {
|
|
|
4224
4260
|
"data-theme": variant === "navigation" ? "brand" : void 0,
|
|
4225
4261
|
children: [
|
|
4226
4262
|
leftIcon && leftIcon,
|
|
4227
|
-
|
|
4263
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Spinner, { size: "small" }),
|
|
4264
|
+
!iconOnly && !isLoading && children && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { id: id ? `${id}-label` : void 0, "data-testid": testid ? `${testid}-label` : void 0, className: labelClasses, children }),
|
|
4228
4265
|
rightIcon && rightIcon
|
|
4229
4266
|
]
|
|
4230
4267
|
})
|
|
@@ -4236,7 +4273,7 @@ Button.displayName = "Button";
|
|
|
4236
4273
|
var import_clsx19 = __toESM(require("clsx"), 1);
|
|
4237
4274
|
var import_react18 = require("react");
|
|
4238
4275
|
var import_react_dom2 = require("react-dom");
|
|
4239
|
-
var
|
|
4276
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
4240
4277
|
var Tooltip = ({
|
|
4241
4278
|
id,
|
|
4242
4279
|
testid,
|
|
@@ -4303,7 +4340,7 @@ var Tooltip = ({
|
|
|
4303
4340
|
return () => window.removeEventListener("resize", updatePosition);
|
|
4304
4341
|
}
|
|
4305
4342
|
}, [isVisible]);
|
|
4306
|
-
return /* @__PURE__ */ (0,
|
|
4343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
4307
4344
|
"div",
|
|
4308
4345
|
{
|
|
4309
4346
|
id,
|
|
@@ -4315,7 +4352,7 @@ var Tooltip = ({
|
|
|
4315
4352
|
children: [
|
|
4316
4353
|
children,
|
|
4317
4354
|
!keepHidden && isVisible && typeof document !== "undefined" && (0, import_react_dom2.createPortal)(
|
|
4318
|
-
/* @__PURE__ */ (0,
|
|
4355
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4319
4356
|
"div",
|
|
4320
4357
|
{
|
|
4321
4358
|
id: id ? `${id}-message` : void 0,
|
|
@@ -4362,7 +4399,7 @@ var import_react_dom3 = require("react-dom");
|
|
|
4362
4399
|
var import_clsx20 = __toESM(require("clsx"), 1);
|
|
4363
4400
|
var import_react19 = __toESM(require("react"), 1);
|
|
4364
4401
|
var import_polyfill = require("@js-temporal/polyfill");
|
|
4365
|
-
var
|
|
4402
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
4366
4403
|
function DateCell(_a) {
|
|
4367
4404
|
var _b = _a, {
|
|
4368
4405
|
date,
|
|
@@ -4397,7 +4434,7 @@ function DateCell(_a) {
|
|
|
4397
4434
|
"id",
|
|
4398
4435
|
"testid"
|
|
4399
4436
|
]);
|
|
4400
|
-
return /* @__PURE__ */ (0,
|
|
4437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4401
4438
|
"span",
|
|
4402
4439
|
__spreadProps(__spreadValues({}, props), {
|
|
4403
4440
|
id,
|
|
@@ -4553,7 +4590,7 @@ function CalendarRange({
|
|
|
4553
4590
|
}
|
|
4554
4591
|
return false;
|
|
4555
4592
|
}
|
|
4556
|
-
return /* @__PURE__ */ (0,
|
|
4593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4557
4594
|
"div",
|
|
4558
4595
|
{
|
|
4559
4596
|
id,
|
|
@@ -4566,7 +4603,7 @@ function CalendarRange({
|
|
|
4566
4603
|
// baseTransition,
|
|
4567
4604
|
"overflow-hidden"
|
|
4568
4605
|
),
|
|
4569
|
-
children: /* @__PURE__ */ (0,
|
|
4606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4570
4607
|
"div",
|
|
4571
4608
|
{
|
|
4572
4609
|
className: (0, import_clsx20.default)(
|
|
@@ -4574,7 +4611,7 @@ function CalendarRange({
|
|
|
4574
4611
|
layoutGap
|
|
4575
4612
|
),
|
|
4576
4613
|
children: (mode === "double" ? [0, 1] : [0]).map((offset, idx) => {
|
|
4577
|
-
return /* @__PURE__ */ (0,
|
|
4614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4578
4615
|
CalendarPane,
|
|
4579
4616
|
{
|
|
4580
4617
|
getMonthData,
|
|
@@ -4639,13 +4676,13 @@ function CalendarPane({
|
|
|
4639
4676
|
const month = getMonthData(offset);
|
|
4640
4677
|
const totalCells = 42;
|
|
4641
4678
|
const emptyCells = month.firstDayOffset;
|
|
4642
|
-
return /* @__PURE__ */ (0,
|
|
4643
|
-
/* @__PURE__ */ (0,
|
|
4679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react19.default.Fragment, { children: [
|
|
4680
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4644
4681
|
"div",
|
|
4645
4682
|
{
|
|
4646
4683
|
className: (0, import_clsx20.default)("flex flex-col"),
|
|
4647
4684
|
children: [
|
|
4648
|
-
/* @__PURE__ */ (0,
|
|
4685
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4649
4686
|
"div",
|
|
4650
4687
|
{
|
|
4651
4688
|
className: (0, import_clsx20.default)(
|
|
@@ -4654,7 +4691,7 @@ function CalendarPane({
|
|
|
4654
4691
|
"text-text-action-primary-normal"
|
|
4655
4692
|
),
|
|
4656
4693
|
children: [
|
|
4657
|
-
idx === 0 ? /* @__PURE__ */ (0,
|
|
4694
|
+
idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4658
4695
|
"button",
|
|
4659
4696
|
{
|
|
4660
4697
|
id: id ? `${id}-prev-month-button` : void 0,
|
|
@@ -4666,11 +4703,11 @@ function CalendarPane({
|
|
|
4666
4703
|
),
|
|
4667
4704
|
"aria-label": "Previous month",
|
|
4668
4705
|
onClick: () => setBaseMonth(baseMonth.subtract({ months: 1 })),
|
|
4669
|
-
children: /* @__PURE__ */ (0,
|
|
4706
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: "chevron_left", size: 24 })
|
|
4670
4707
|
}
|
|
4671
|
-
) : /* @__PURE__ */ (0,
|
|
4672
|
-
/* @__PURE__ */ (0,
|
|
4673
|
-
/* @__PURE__ */ (0,
|
|
4708
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: (0, import_clsx20.default)(componentPadding, "mr-1") }),
|
|
4709
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex gap-desktop-compact-component-padding", children: [
|
|
4710
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4674
4711
|
"button",
|
|
4675
4712
|
{
|
|
4676
4713
|
ref: (el) => {
|
|
@@ -4685,13 +4722,13 @@ function CalendarPane({
|
|
|
4685
4722
|
children: month.name
|
|
4686
4723
|
}
|
|
4687
4724
|
),
|
|
4688
|
-
/* @__PURE__ */ (0,
|
|
4725
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4689
4726
|
Menu,
|
|
4690
4727
|
{
|
|
4691
4728
|
show: monthMenuOpen,
|
|
4692
4729
|
positionTo: monthMenuRef,
|
|
4693
4730
|
setShow: () => setMonthMenuOpen(false),
|
|
4694
|
-
children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0,
|
|
4731
|
+
children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4695
4732
|
MenuOption,
|
|
4696
4733
|
{
|
|
4697
4734
|
selected: baseMonth.month === x + 1,
|
|
@@ -4705,7 +4742,7 @@ function CalendarPane({
|
|
|
4705
4742
|
))
|
|
4706
4743
|
}
|
|
4707
4744
|
),
|
|
4708
|
-
/* @__PURE__ */ (0,
|
|
4745
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4709
4746
|
"button",
|
|
4710
4747
|
{
|
|
4711
4748
|
ref: (el) => {
|
|
@@ -4720,13 +4757,13 @@ function CalendarPane({
|
|
|
4720
4757
|
children: month.year
|
|
4721
4758
|
}
|
|
4722
4759
|
),
|
|
4723
|
-
/* @__PURE__ */ (0,
|
|
4760
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4724
4761
|
Menu,
|
|
4725
4762
|
{
|
|
4726
4763
|
show: yearMenuOpen,
|
|
4727
4764
|
positionTo: yearMenuRef,
|
|
4728
4765
|
setShow: () => setYearMenuOpen(false),
|
|
4729
|
-
children: years.map((y) => /* @__PURE__ */ (0,
|
|
4766
|
+
children: years.map((y) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4730
4767
|
MenuOption,
|
|
4731
4768
|
{
|
|
4732
4769
|
selected: baseMonth.year === y,
|
|
@@ -4741,7 +4778,7 @@ function CalendarPane({
|
|
|
4741
4778
|
}
|
|
4742
4779
|
)
|
|
4743
4780
|
] }),
|
|
4744
|
-
(mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0,
|
|
4781
|
+
(mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4745
4782
|
"button",
|
|
4746
4783
|
{
|
|
4747
4784
|
id: id ? `${id}-next-month-button` : void 0,
|
|
@@ -4753,13 +4790,13 @@ function CalendarPane({
|
|
|
4753
4790
|
),
|
|
4754
4791
|
"aria-label": "Next month",
|
|
4755
4792
|
onClick: () => setBaseMonth(baseMonth.add({ months: 1 })),
|
|
4756
|
-
children: /* @__PURE__ */ (0,
|
|
4793
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { name: "chevron_right", size: 24 })
|
|
4757
4794
|
}
|
|
4758
|
-
) : /* @__PURE__ */ (0,
|
|
4795
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: (0, import_clsx20.default)(componentPadding, "ml-1") })
|
|
4759
4796
|
]
|
|
4760
4797
|
}
|
|
4761
4798
|
),
|
|
4762
|
-
/* @__PURE__ */ (0,
|
|
4799
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: (0, import_clsx20.default)("grid grid-cols-7"), children: weekDays.map((d) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4763
4800
|
"span",
|
|
4764
4801
|
{
|
|
4765
4802
|
className: (0, import_clsx20.default)(
|
|
@@ -4771,7 +4808,7 @@ function CalendarPane({
|
|
|
4771
4808
|
},
|
|
4772
4809
|
d
|
|
4773
4810
|
)) }),
|
|
4774
|
-
/* @__PURE__ */ (0,
|
|
4811
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: (0, import_clsx20.default)("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
|
|
4775
4812
|
const day = i - emptyCells + 1;
|
|
4776
4813
|
const date = month.date.with({ day: 1 }).add({
|
|
4777
4814
|
days: i - emptyCells
|
|
@@ -4785,7 +4822,7 @@ function CalendarPane({
|
|
|
4785
4822
|
const hoverDateIsAfterPendingFrom = hoveredDate && pendingFrom && import_polyfill.Temporal.PlainDate.compare(hoveredDate, pendingFrom) >= 0;
|
|
4786
4823
|
const isRangeStart = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && fromDate && date.equals(fromDate) || hoverDateIsAfterPendingFrom && date.equals(pendingFrom);
|
|
4787
4824
|
const isRangeEnd = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && toDate && date.equals(toDate) || hoverDateIsBeforePendingFrom && date.equals(pendingFrom);
|
|
4788
|
-
return /* @__PURE__ */ (0,
|
|
4825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4789
4826
|
DateCell,
|
|
4790
4827
|
{
|
|
4791
4828
|
id: id ? `${id}-date-${date.toString()}` : void 0,
|
|
@@ -4810,7 +4847,7 @@ function CalendarPane({
|
|
|
4810
4847
|
]
|
|
4811
4848
|
}
|
|
4812
4849
|
),
|
|
4813
|
-
mode === "double" && idx === 0 && /* @__PURE__ */ (0,
|
|
4850
|
+
mode === "double" && idx === 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4814
4851
|
"div",
|
|
4815
4852
|
{
|
|
4816
4853
|
className: (0, import_clsx20.default)(
|
|
@@ -4824,7 +4861,7 @@ function CalendarPane({
|
|
|
4824
4861
|
}
|
|
4825
4862
|
|
|
4826
4863
|
// src/components/DateInput.tsx
|
|
4827
|
-
var
|
|
4864
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
4828
4865
|
var DateInput = (_a) => {
|
|
4829
4866
|
var _b = _a, {
|
|
4830
4867
|
id,
|
|
@@ -4985,8 +5022,8 @@ var DateInput = (_a) => {
|
|
|
4985
5022
|
}
|
|
4986
5023
|
}
|
|
4987
5024
|
};
|
|
4988
|
-
return /* @__PURE__ */ (0,
|
|
4989
|
-
/* @__PURE__ */ (0,
|
|
5025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "relative", children: [
|
|
5026
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4990
5027
|
InputBase,
|
|
4991
5028
|
__spreadProps(__spreadValues({
|
|
4992
5029
|
id,
|
|
@@ -5000,7 +5037,7 @@ var DateInput = (_a) => {
|
|
|
5000
5037
|
placeholder,
|
|
5001
5038
|
disabled,
|
|
5002
5039
|
readOnly,
|
|
5003
|
-
after: /* @__PURE__ */ (0,
|
|
5040
|
+
after: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { name: "calendar_month" }),
|
|
5004
5041
|
onFocus: handleFocus,
|
|
5005
5042
|
onClick: handleClick,
|
|
5006
5043
|
onChange: handleInputChange,
|
|
@@ -5011,7 +5048,7 @@ var DateInput = (_a) => {
|
|
|
5011
5048
|
})
|
|
5012
5049
|
),
|
|
5013
5050
|
visible && !readOnly && (0, import_react_dom3.createPortal)(
|
|
5014
|
-
/* @__PURE__ */ (0,
|
|
5051
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5015
5052
|
"div",
|
|
5016
5053
|
{
|
|
5017
5054
|
ref: (el) => {
|
|
@@ -5023,7 +5060,7 @@ var DateInput = (_a) => {
|
|
|
5023
5060
|
left: `${calendarPosition.left}px`,
|
|
5024
5061
|
minWidth: `${calendarPosition.width}px`
|
|
5025
5062
|
},
|
|
5026
|
-
children: /* @__PURE__ */ (0,
|
|
5063
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5027
5064
|
CalendarRange,
|
|
5028
5065
|
{
|
|
5029
5066
|
id: id ? `${id}-calendar` : void 0,
|
|
@@ -5059,7 +5096,7 @@ var import_clsx23 = __toESM(require("clsx"), 1);
|
|
|
5059
5096
|
|
|
5060
5097
|
// src/components/Card.tsx
|
|
5061
5098
|
var import_clsx21 = __toESM(require("clsx"), 1);
|
|
5062
|
-
var
|
|
5099
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
5063
5100
|
function Card(props) {
|
|
5064
5101
|
const _a = props, {
|
|
5065
5102
|
children,
|
|
@@ -5098,7 +5135,7 @@ function Card(props) {
|
|
|
5098
5135
|
paddingLeft && "pl-mobile-layout-padding desktop:pl-desktop-layout-padding compact:pl-desktop-compact-layout-padding",
|
|
5099
5136
|
paddingRight && "pr-mobile-layout-padding desktop:pr-desktop-layout-padding compact:pr-desktop-compact-layout-padding"
|
|
5100
5137
|
);
|
|
5101
|
-
return /* @__PURE__ */ (0,
|
|
5138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5102
5139
|
CardComponent,
|
|
5103
5140
|
__spreadProps(__spreadValues({}, rest), {
|
|
5104
5141
|
"data-testid": testid,
|
|
@@ -5115,7 +5152,7 @@ function Card(props) {
|
|
|
5115
5152
|
|
|
5116
5153
|
// src/components/Stack.tsx
|
|
5117
5154
|
var import_clsx22 = __toESM(require("clsx"), 1);
|
|
5118
|
-
var
|
|
5155
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
5119
5156
|
var getFlexClassNames = ({ items, justify, grow }) => (0, import_clsx22.default)(
|
|
5120
5157
|
"flex",
|
|
5121
5158
|
items === "start" && "items-start",
|
|
@@ -5188,7 +5225,8 @@ var Stack = (_a) => {
|
|
|
5188
5225
|
bottom,
|
|
5189
5226
|
zIndex,
|
|
5190
5227
|
flexWrap,
|
|
5191
|
-
className
|
|
5228
|
+
className,
|
|
5229
|
+
unclipEdges
|
|
5192
5230
|
} = _b, props = __objRest(_b, [
|
|
5193
5231
|
"children",
|
|
5194
5232
|
"items",
|
|
@@ -5237,12 +5275,13 @@ var Stack = (_a) => {
|
|
|
5237
5275
|
"bottom",
|
|
5238
5276
|
"zIndex",
|
|
5239
5277
|
"flexWrap",
|
|
5240
|
-
"className"
|
|
5278
|
+
"className",
|
|
5279
|
+
"unclipEdges"
|
|
5241
5280
|
]);
|
|
5242
5281
|
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
5243
5282
|
const flexClassNames = getFlexClassNames({ items, justify, grow });
|
|
5244
5283
|
const gapClassNames = useGapClassNames(sizing);
|
|
5245
|
-
return /* @__PURE__ */ (0,
|
|
5284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5246
5285
|
"div",
|
|
5247
5286
|
__spreadProps(__spreadValues({
|
|
5248
5287
|
id,
|
|
@@ -5329,6 +5368,7 @@ var Stack = (_a) => {
|
|
|
5329
5368
|
elevation === 4 && "shadow-4",
|
|
5330
5369
|
elevation === 16 && "shadow-16",
|
|
5331
5370
|
rounded && "rounded",
|
|
5371
|
+
unclipEdges && "-m-0.75 p-1",
|
|
5332
5372
|
className
|
|
5333
5373
|
),
|
|
5334
5374
|
children
|
|
@@ -5337,7 +5377,7 @@ var Stack = (_a) => {
|
|
|
5337
5377
|
};
|
|
5338
5378
|
|
|
5339
5379
|
// src/components/Accordion.tsx
|
|
5340
|
-
var
|
|
5380
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
5341
5381
|
function Accordion(props) {
|
|
5342
5382
|
const {
|
|
5343
5383
|
isOpen,
|
|
@@ -5350,7 +5390,7 @@ function Accordion(props) {
|
|
|
5350
5390
|
const {
|
|
5351
5391
|
title,
|
|
5352
5392
|
before,
|
|
5353
|
-
after = /* @__PURE__ */ (0,
|
|
5393
|
+
after = /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5354
5394
|
Icon,
|
|
5355
5395
|
{
|
|
5356
5396
|
name: "expand_more",
|
|
@@ -5367,7 +5407,7 @@ function Accordion(props) {
|
|
|
5367
5407
|
e.preventDefault();
|
|
5368
5408
|
onClick == null ? void 0 : onClick();
|
|
5369
5409
|
}
|
|
5370
|
-
return /* @__PURE__ */ (0,
|
|
5410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
5371
5411
|
Card,
|
|
5372
5412
|
{
|
|
5373
5413
|
className: (0, import_clsx23.default)(
|
|
@@ -5379,7 +5419,7 @@ function Accordion(props) {
|
|
|
5379
5419
|
onClick: handleClick,
|
|
5380
5420
|
testid,
|
|
5381
5421
|
children: [
|
|
5382
|
-
/* @__PURE__ */ (0,
|
|
5422
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
5383
5423
|
Stack,
|
|
5384
5424
|
{
|
|
5385
5425
|
sizing: "component",
|
|
@@ -5388,9 +5428,9 @@ function Accordion(props) {
|
|
|
5388
5428
|
justify: "between",
|
|
5389
5429
|
items: "center",
|
|
5390
5430
|
children: [
|
|
5391
|
-
/* @__PURE__ */ (0,
|
|
5431
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Stack, { sizing: "layout-group", horizontal: true, items: titleAlign, children: [
|
|
5392
5432
|
before,
|
|
5393
|
-
typeof title === "string" ? /* @__PURE__ */ (0,
|
|
5433
|
+
typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5394
5434
|
Paragraph,
|
|
5395
5435
|
{
|
|
5396
5436
|
testid: testid ? `${testid}-title` : void 0,
|
|
@@ -5403,7 +5443,7 @@ function Accordion(props) {
|
|
|
5403
5443
|
]
|
|
5404
5444
|
}
|
|
5405
5445
|
),
|
|
5406
|
-
/* @__PURE__ */ (0,
|
|
5446
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5407
5447
|
"div",
|
|
5408
5448
|
{
|
|
5409
5449
|
className: (0, import_clsx23.default)("grid transition-all duration-300 ease-in-out"),
|
|
@@ -5411,7 +5451,7 @@ function Accordion(props) {
|
|
|
5411
5451
|
gridTemplateRows: isOpen ? "1fr" : "0fr"
|
|
5412
5452
|
},
|
|
5413
5453
|
"data-testid": testid ? `${testid}-content-container` : void 0,
|
|
5414
|
-
children: /* @__PURE__ */ (0,
|
|
5454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5415
5455
|
"div",
|
|
5416
5456
|
{
|
|
5417
5457
|
className: (0, import_clsx23.default)(
|
|
@@ -5432,7 +5472,7 @@ function Accordion(props) {
|
|
|
5432
5472
|
|
|
5433
5473
|
// src/components/Heading.tsx
|
|
5434
5474
|
var import_clsx24 = __toESM(require("clsx"), 1);
|
|
5435
|
-
var
|
|
5475
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5436
5476
|
var Heading = (_a) => {
|
|
5437
5477
|
var _b = _a, {
|
|
5438
5478
|
className,
|
|
@@ -5455,7 +5495,7 @@ var Heading = (_a) => {
|
|
|
5455
5495
|
]);
|
|
5456
5496
|
const defaultElement = variant === "heading1" ? "h1" : variant === "heading2" ? "h2" : "h3";
|
|
5457
5497
|
const Element = as != null ? as : defaultElement;
|
|
5458
|
-
return /* @__PURE__ */ (0,
|
|
5498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5459
5499
|
Element,
|
|
5460
5500
|
__spreadProps(__spreadValues({
|
|
5461
5501
|
id,
|
|
@@ -5476,15 +5516,15 @@ var Heading = (_a) => {
|
|
|
5476
5516
|
);
|
|
5477
5517
|
};
|
|
5478
5518
|
Heading.displayName = "Heading";
|
|
5479
|
-
var Heading1 = (props) => /* @__PURE__ */ (0,
|
|
5480
|
-
var Heading2 = (props) => /* @__PURE__ */ (0,
|
|
5481
|
-
var Heading3 = (props) => /* @__PURE__ */ (0,
|
|
5519
|
+
var Heading1 = (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading1" }));
|
|
5520
|
+
var Heading2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading2" }));
|
|
5521
|
+
var Heading3 = (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, __spreadProps(__spreadValues({}, props), { variant: "heading3" }));
|
|
5482
5522
|
Heading1.displayName = "Heading1";
|
|
5483
5523
|
Heading2.displayName = "Heading2";
|
|
5484
5524
|
Heading3.displayName = "Heading3";
|
|
5485
5525
|
|
|
5486
5526
|
// src/components/Theme.tsx
|
|
5487
|
-
var
|
|
5527
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5488
5528
|
function Theme({
|
|
5489
5529
|
theme,
|
|
5490
5530
|
children,
|
|
@@ -5492,7 +5532,7 @@ function Theme({
|
|
|
5492
5532
|
testid,
|
|
5493
5533
|
ref
|
|
5494
5534
|
}) {
|
|
5495
|
-
return /* @__PURE__ */ (0,
|
|
5535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5496
5536
|
"div",
|
|
5497
5537
|
{
|
|
5498
5538
|
id,
|
|
@@ -5527,7 +5567,7 @@ function useGridContext() {
|
|
|
5527
5567
|
}
|
|
5528
5568
|
|
|
5529
5569
|
// src/components/MobileDataGrid/ColumnSelector/index.tsx
|
|
5530
|
-
var
|
|
5570
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5531
5571
|
function ColumnSelector() {
|
|
5532
5572
|
const context = useGridContext();
|
|
5533
5573
|
const ref = (0, import_react23.useRef)(null);
|
|
@@ -5548,7 +5588,7 @@ function ColumnSelector() {
|
|
|
5548
5588
|
},
|
|
5549
5589
|
[dispatch]
|
|
5550
5590
|
);
|
|
5551
|
-
return /* @__PURE__ */ (0,
|
|
5591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
5552
5592
|
"div",
|
|
5553
5593
|
{
|
|
5554
5594
|
id: id ? `${id}-column-selector` : void 0,
|
|
@@ -5556,7 +5596,7 @@ function ColumnSelector() {
|
|
|
5556
5596
|
className: "text-text-secondary-normal border-l border-brand-200 p-mobile-container-padding",
|
|
5557
5597
|
ref,
|
|
5558
5598
|
children: [
|
|
5559
|
-
/* @__PURE__ */ (0,
|
|
5599
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5560
5600
|
Button,
|
|
5561
5601
|
{
|
|
5562
5602
|
id: id ? `${id}-button` : void 0,
|
|
@@ -5565,10 +5605,10 @@ function ColumnSelector() {
|
|
|
5565
5605
|
variant: "navigation",
|
|
5566
5606
|
iconOnly: true,
|
|
5567
5607
|
size: 24,
|
|
5568
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
5608
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { name: "tune" })
|
|
5569
5609
|
}
|
|
5570
5610
|
),
|
|
5571
|
-
/* @__PURE__ */ (0,
|
|
5611
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
5572
5612
|
Menu,
|
|
5573
5613
|
{
|
|
5574
5614
|
id: id ? `${id}-menu` : void 0,
|
|
@@ -5579,7 +5619,7 @@ function ColumnSelector() {
|
|
|
5579
5619
|
setShow,
|
|
5580
5620
|
calculateMinMaxHeight: true,
|
|
5581
5621
|
children: [
|
|
5582
|
-
/* @__PURE__ */ (0,
|
|
5622
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5583
5623
|
Button,
|
|
5584
5624
|
{
|
|
5585
5625
|
id: id ? `${id}-reset-button` : void 0,
|
|
@@ -5597,11 +5637,11 @@ function ColumnSelector() {
|
|
|
5597
5637
|
return (_a = x.meta) == null ? void 0 : _a.inVisibilityMenu;
|
|
5598
5638
|
}).map((column) => {
|
|
5599
5639
|
var _a, _b, _c;
|
|
5600
|
-
return /* @__PURE__ */ (0,
|
|
5640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5601
5641
|
MenuOption,
|
|
5602
5642
|
{
|
|
5603
5643
|
testid: testid ? `${testid}-option-${column.id}` : void 0,
|
|
5604
|
-
children: /* @__PURE__ */ (0,
|
|
5644
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5605
5645
|
Checkbox,
|
|
5606
5646
|
{
|
|
5607
5647
|
id: id ? `${id}-checkbox-${column.id}` : void 0,
|
|
@@ -5631,7 +5671,7 @@ function ColumnSelector() {
|
|
|
5631
5671
|
}
|
|
5632
5672
|
|
|
5633
5673
|
// src/components/MobileDataGrid/MobileDataGridHeader.tsx
|
|
5634
|
-
var
|
|
5674
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5635
5675
|
function MobileDataGridHeader({
|
|
5636
5676
|
header: Header,
|
|
5637
5677
|
enableColumnSelector,
|
|
@@ -5649,15 +5689,15 @@ function MobileDataGridHeader({
|
|
|
5649
5689
|
handleRowSelectAll
|
|
5650
5690
|
} = ctx;
|
|
5651
5691
|
if (typeof Header === "undefined" && !primaryKey) return null;
|
|
5652
|
-
if (typeof Header === "function") return /* @__PURE__ */ (0,
|
|
5692
|
+
if (typeof Header === "function") return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Header, __spreadValues({}, ctx));
|
|
5653
5693
|
if (typeof Header === "string" || primaryKey)
|
|
5654
|
-
return /* @__PURE__ */ (0,
|
|
5694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5655
5695
|
"div",
|
|
5656
5696
|
{
|
|
5657
5697
|
id: id ? `${id}-header` : void 0,
|
|
5658
5698
|
"data-testid": testid ? `${testid}-header` : void 0,
|
|
5659
5699
|
className: "sticky top-0",
|
|
5660
|
-
children: /* @__PURE__ */ (0,
|
|
5700
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Theme, { theme: "brand", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
5661
5701
|
Stack,
|
|
5662
5702
|
{
|
|
5663
5703
|
horizontal: true,
|
|
@@ -5667,7 +5707,7 @@ function MobileDataGridHeader({
|
|
|
5667
5707
|
backgroundColor: "background-primary-normal",
|
|
5668
5708
|
style: { borderTopRightRadius: 4, borderTopLeftRadius: 4 },
|
|
5669
5709
|
children: [
|
|
5670
|
-
enableRowSelection && /* @__PURE__ */ (0,
|
|
5710
|
+
enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "p-mobile-component-padding border-r border-brand-200 max-w-fit h-full", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5671
5711
|
Checkbox,
|
|
5672
5712
|
{
|
|
5673
5713
|
id: id ? `${id}-select-all-checkbox` : void 0,
|
|
@@ -5677,7 +5717,7 @@ function MobileDataGridHeader({
|
|
|
5677
5717
|
onChange: handleRowSelectAll
|
|
5678
5718
|
}
|
|
5679
5719
|
) }),
|
|
5680
|
-
/* @__PURE__ */ (0,
|
|
5720
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
5681
5721
|
Stack,
|
|
5682
5722
|
{
|
|
5683
5723
|
horizontal: true,
|
|
@@ -5685,10 +5725,10 @@ function MobileDataGridHeader({
|
|
|
5685
5725
|
items: "center",
|
|
5686
5726
|
sizing: "component",
|
|
5687
5727
|
padding: true,
|
|
5688
|
-
children: /* @__PURE__ */ (0,
|
|
5728
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Heading3, { as: "span", color: "text-primary-normal", children: typeof Header === "string" ? Header : (_b = (_a = columns.find((col) => col.id === primaryKey)) == null ? void 0 : _a.header) == null ? void 0 : _b.toString() })
|
|
5689
5729
|
}
|
|
5690
5730
|
),
|
|
5691
|
-
enableColumnSelector && /* @__PURE__ */ (0,
|
|
5731
|
+
enableColumnSelector && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ColumnSelector, {})
|
|
5692
5732
|
]
|
|
5693
5733
|
}
|
|
5694
5734
|
) })
|
|
@@ -5727,7 +5767,7 @@ function dataGridReducer(state, action) {
|
|
|
5727
5767
|
}
|
|
5728
5768
|
|
|
5729
5769
|
// src/components/MobileDataGrid/GridContextProvider/index.tsx
|
|
5730
|
-
var
|
|
5770
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5731
5771
|
function GridContextProvider(props) {
|
|
5732
5772
|
const {
|
|
5733
5773
|
initialColumns,
|
|
@@ -5798,7 +5838,7 @@ function GridContextProvider(props) {
|
|
|
5798
5838
|
return ((_a = x.meta) == null ? void 0 : _a.visible) !== false;
|
|
5799
5839
|
}).slice(0, effectiveLimit);
|
|
5800
5840
|
}, [columns, numberOfColumnsToShow, primaryKey]);
|
|
5801
|
-
return /* @__PURE__ */ (0,
|
|
5841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5802
5842
|
GridContext.Provider,
|
|
5803
5843
|
{
|
|
5804
5844
|
value: {
|
|
@@ -5831,7 +5871,7 @@ var import_react26 = require("react");
|
|
|
5831
5871
|
|
|
5832
5872
|
// src/components/ModalHeader.tsx
|
|
5833
5873
|
var import_clsx25 = __toESM(require("clsx"), 1);
|
|
5834
|
-
var
|
|
5874
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5835
5875
|
var ModalHeader = ({
|
|
5836
5876
|
title,
|
|
5837
5877
|
hideCloseIcon,
|
|
@@ -5844,7 +5884,7 @@ var ModalHeader = ({
|
|
|
5844
5884
|
titleAs: TitleComponent
|
|
5845
5885
|
}) => {
|
|
5846
5886
|
const Title = TitleComponent || Heading2;
|
|
5847
|
-
return /* @__PURE__ */ (0,
|
|
5887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
5848
5888
|
"div",
|
|
5849
5889
|
{
|
|
5850
5890
|
id,
|
|
@@ -5859,9 +5899,9 @@ var ModalHeader = ({
|
|
|
5859
5899
|
headerClassname
|
|
5860
5900
|
),
|
|
5861
5901
|
children: [
|
|
5862
|
-
/* @__PURE__ */ (0,
|
|
5902
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: (0, import_clsx25.default)("flex items-center flex-1", layoutGroupGap), children: [
|
|
5863
5903
|
headerIcon,
|
|
5864
|
-
title && /* @__PURE__ */ (0,
|
|
5904
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5865
5905
|
Title,
|
|
5866
5906
|
{
|
|
5867
5907
|
id: id ? `${id}-title` : void 0,
|
|
@@ -5871,7 +5911,7 @@ var ModalHeader = ({
|
|
|
5871
5911
|
}
|
|
5872
5912
|
)
|
|
5873
5913
|
] }),
|
|
5874
|
-
!hideCloseIcon && /* @__PURE__ */ (0,
|
|
5914
|
+
!hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5875
5915
|
Button,
|
|
5876
5916
|
{
|
|
5877
5917
|
id: id ? `${id}-close-button` : void 0,
|
|
@@ -5879,7 +5919,7 @@ var ModalHeader = ({
|
|
|
5879
5919
|
iconOnly: true,
|
|
5880
5920
|
variant: "tertiary",
|
|
5881
5921
|
onClick: onClose,
|
|
5882
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
5922
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-brand-text-action-primary-normal desktop:text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { name: "close", size: 24 }) })
|
|
5883
5923
|
}
|
|
5884
5924
|
)
|
|
5885
5925
|
]
|
|
@@ -5890,14 +5930,14 @@ ModalHeader.displayName = "ModalHeader";
|
|
|
5890
5930
|
|
|
5891
5931
|
// src/components/ModalContent.tsx
|
|
5892
5932
|
var import_clsx26 = __toESM(require("clsx"), 1);
|
|
5893
|
-
var
|
|
5933
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5894
5934
|
function ModalContent({
|
|
5895
5935
|
fixedHeightScrolling,
|
|
5896
5936
|
children,
|
|
5897
5937
|
id,
|
|
5898
5938
|
testid
|
|
5899
5939
|
}) {
|
|
5900
|
-
return /* @__PURE__ */ (0,
|
|
5940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5901
5941
|
"div",
|
|
5902
5942
|
{
|
|
5903
5943
|
id,
|
|
@@ -5915,7 +5955,7 @@ ModalContent.displayName = "ModalContent";
|
|
|
5915
5955
|
|
|
5916
5956
|
// src/components/ModalButtons.tsx
|
|
5917
5957
|
var import_clsx27 = __toESM(require("clsx"), 1);
|
|
5918
|
-
var
|
|
5958
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5919
5959
|
var ModalButtons = ({
|
|
5920
5960
|
onClose,
|
|
5921
5961
|
onContinue,
|
|
@@ -5923,7 +5963,7 @@ var ModalButtons = ({
|
|
|
5923
5963
|
id,
|
|
5924
5964
|
testid
|
|
5925
5965
|
}) => {
|
|
5926
|
-
return /* @__PURE__ */ (0,
|
|
5966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5927
5967
|
"div",
|
|
5928
5968
|
{
|
|
5929
5969
|
id,
|
|
@@ -5933,26 +5973,26 @@ var ModalButtons = ({
|
|
|
5933
5973
|
layoutPaddding,
|
|
5934
5974
|
layoutGroupGap
|
|
5935
5975
|
),
|
|
5936
|
-
children: customActions != null ? customActions : /* @__PURE__ */ (0,
|
|
5937
|
-
/* @__PURE__ */ (0,
|
|
5976
|
+
children: customActions != null ? customActions : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
5977
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5938
5978
|
Button,
|
|
5939
5979
|
{
|
|
5940
5980
|
id: id ? `${id}-close-button` : void 0,
|
|
5941
5981
|
testid: testid ? `${testid}-close-button` : void 0,
|
|
5942
5982
|
variant: "secondary",
|
|
5943
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
5983
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { name: "close", size: 24 }),
|
|
5944
5984
|
onClick: onClose,
|
|
5945
5985
|
className: "max-sm:w-full",
|
|
5946
5986
|
children: "Close"
|
|
5947
5987
|
}
|
|
5948
5988
|
),
|
|
5949
|
-
/* @__PURE__ */ (0,
|
|
5989
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5950
5990
|
Button,
|
|
5951
5991
|
{
|
|
5952
5992
|
id: id ? `${id}-continue-button` : void 0,
|
|
5953
5993
|
testid: testid ? `${testid}-continue-button` : void 0,
|
|
5954
5994
|
variant: "primary",
|
|
5955
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
5995
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { name: "check", size: 24 }),
|
|
5956
5996
|
className: "max-sm:w-full",
|
|
5957
5997
|
onClick: onContinue,
|
|
5958
5998
|
children: "Continue"
|
|
@@ -5966,7 +6006,7 @@ ModalButtons.displayName = "ModalButtons";
|
|
|
5966
6006
|
|
|
5967
6007
|
// src/components/ModalScrim.tsx
|
|
5968
6008
|
var import_clsx28 = __toESM(require("clsx"), 1);
|
|
5969
|
-
var
|
|
6009
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5970
6010
|
var ModalScrim = ({
|
|
5971
6011
|
show = false,
|
|
5972
6012
|
size = "small",
|
|
@@ -5976,7 +6016,7 @@ var ModalScrim = ({
|
|
|
5976
6016
|
id,
|
|
5977
6017
|
testid
|
|
5978
6018
|
}) => {
|
|
5979
|
-
return /* @__PURE__ */ (0,
|
|
6019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5980
6020
|
"div",
|
|
5981
6021
|
{
|
|
5982
6022
|
id,
|
|
@@ -6012,7 +6052,7 @@ var useMounted = () => {
|
|
|
6012
6052
|
};
|
|
6013
6053
|
|
|
6014
6054
|
// src/components/Modal.tsx
|
|
6015
|
-
var
|
|
6055
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
6016
6056
|
var fadeInScale = (element, duration = 300) => element.animate(
|
|
6017
6057
|
[
|
|
6018
6058
|
{ opacity: 0, transform: "scale(0.95)" },
|
|
@@ -6185,7 +6225,7 @@ var Modal = ({
|
|
|
6185
6225
|
return null;
|
|
6186
6226
|
}
|
|
6187
6227
|
return (0, import_react_dom4.createPortal)(
|
|
6188
|
-
/* @__PURE__ */ (0,
|
|
6228
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6189
6229
|
ModalScrim,
|
|
6190
6230
|
{
|
|
6191
6231
|
id: id ? `${id}-scrim` : void 0,
|
|
@@ -6194,7 +6234,7 @@ var Modal = ({
|
|
|
6194
6234
|
ref: bgRef,
|
|
6195
6235
|
show: open,
|
|
6196
6236
|
onClick: backgroundClickHandler,
|
|
6197
|
-
children: /* @__PURE__ */ (0,
|
|
6237
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
6198
6238
|
"div",
|
|
6199
6239
|
{
|
|
6200
6240
|
id,
|
|
@@ -6209,7 +6249,7 @@ var Modal = ({
|
|
|
6209
6249
|
),
|
|
6210
6250
|
onClick: (e) => e.stopPropagation(),
|
|
6211
6251
|
children: [
|
|
6212
|
-
/* @__PURE__ */ (0,
|
|
6252
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6213
6253
|
ModalHeader,
|
|
6214
6254
|
{
|
|
6215
6255
|
id: id ? `${id}-header` : void 0,
|
|
@@ -6223,7 +6263,7 @@ var Modal = ({
|
|
|
6223
6263
|
titleAs: TitleComponent
|
|
6224
6264
|
}
|
|
6225
6265
|
),
|
|
6226
|
-
children && (size !== "screen" || noWrapper) ? /* @__PURE__ */ (0,
|
|
6266
|
+
children && (size !== "screen" || noWrapper) ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6227
6267
|
ModalContent,
|
|
6228
6268
|
{
|
|
6229
6269
|
id: id ? `${id}-content` : void 0,
|
|
@@ -6232,7 +6272,7 @@ var Modal = ({
|
|
|
6232
6272
|
children
|
|
6233
6273
|
}
|
|
6234
6274
|
) : children,
|
|
6235
|
-
showButtons ? customFooter ? customActions : /* @__PURE__ */ (0,
|
|
6275
|
+
showButtons ? customFooter ? customActions : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6236
6276
|
ModalButtons,
|
|
6237
6277
|
{
|
|
6238
6278
|
id: id ? `${id}-buttons` : void 0,
|
|
@@ -6253,7 +6293,7 @@ var Modal = ({
|
|
|
6253
6293
|
Modal.displayName = "Modal";
|
|
6254
6294
|
|
|
6255
6295
|
// src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx
|
|
6256
|
-
var
|
|
6296
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6257
6297
|
function MobileDataGridColumn(props) {
|
|
6258
6298
|
var _a, _b;
|
|
6259
6299
|
const { column, data } = props;
|
|
@@ -6264,8 +6304,8 @@ function MobileDataGridColumn(props) {
|
|
|
6264
6304
|
value = formatDate(value);
|
|
6265
6305
|
}
|
|
6266
6306
|
}
|
|
6267
|
-
return /* @__PURE__ */ (0,
|
|
6268
|
-
/* @__PURE__ */ (0,
|
|
6307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "grid grid-cols-2 gap-2 flex-1", children: [
|
|
6308
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Paragraph, { color: "text-secondary-normal", className: "text-left", children: [
|
|
6269
6309
|
(_b = column.header) == null ? void 0 : _b.toString(),
|
|
6270
6310
|
":"
|
|
6271
6311
|
] }),
|
|
@@ -6275,28 +6315,28 @@ function MobileDataGridColumn(props) {
|
|
|
6275
6315
|
}
|
|
6276
6316
|
|
|
6277
6317
|
// src/components/MobileDataGrid/RowDetailModalProvider/ModalContent.tsx
|
|
6278
|
-
var
|
|
6318
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6279
6319
|
function ModalContent2() {
|
|
6280
6320
|
const context = useGridContext();
|
|
6281
6321
|
const { columns, currentRow } = context;
|
|
6282
6322
|
if (!currentRow) return null;
|
|
6283
|
-
return /* @__PURE__ */ (0,
|
|
6323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Stack, { sizing: "layout-group", children: columns.filter((x) => {
|
|
6284
6324
|
var _a;
|
|
6285
6325
|
return !((_a = x.id) == null ? void 0 : _a.startsWith("__"));
|
|
6286
6326
|
}).map(
|
|
6287
6327
|
(column, index) => {
|
|
6288
6328
|
var _a, _b;
|
|
6289
|
-
return ((_a = column.meta) == null ? void 0 : _a.useCustomRenderer) && column.meta.mobileCell && column.id ? /* @__PURE__ */ (0,
|
|
6329
|
+
return ((_a = column.meta) == null ? void 0 : _a.useCustomRenderer) && column.meta.mobileCell && column.id ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6290
6330
|
"div",
|
|
6291
6331
|
{
|
|
6292
6332
|
className: "grid grid-cols-2 gap-2 items-center flex-1",
|
|
6293
6333
|
children: [
|
|
6294
|
-
/* @__PURE__ */ (0,
|
|
6334
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Paragraph, { color: "text-secondary-normal", className: "text-left", children: [
|
|
6295
6335
|
(_b = column.header) == null ? void 0 : _b.toString(),
|
|
6296
6336
|
":"
|
|
6297
6337
|
] }),
|
|
6298
6338
|
" ",
|
|
6299
|
-
/* @__PURE__ */ (0,
|
|
6339
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6300
6340
|
column.meta.mobileCell,
|
|
6301
6341
|
{
|
|
6302
6342
|
column,
|
|
@@ -6307,7 +6347,7 @@ function ModalContent2() {
|
|
|
6307
6347
|
]
|
|
6308
6348
|
},
|
|
6309
6349
|
`${column.id}-${index}`
|
|
6310
|
-
) : /* @__PURE__ */ (0,
|
|
6350
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6311
6351
|
MobileDataGridColumn,
|
|
6312
6352
|
{
|
|
6313
6353
|
column,
|
|
@@ -6320,7 +6360,7 @@ function ModalContent2() {
|
|
|
6320
6360
|
}
|
|
6321
6361
|
|
|
6322
6362
|
// src/components/MobileDataGrid/RowDetailModalProvider/index.tsx
|
|
6323
|
-
var
|
|
6363
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6324
6364
|
function RowDetailModalProvider() {
|
|
6325
6365
|
var _a;
|
|
6326
6366
|
const context = useGridContext();
|
|
@@ -6332,7 +6372,7 @@ function RowDetailModalProvider() {
|
|
|
6332
6372
|
primaryKey,
|
|
6333
6373
|
closeRowDetail
|
|
6334
6374
|
} = context;
|
|
6335
|
-
return /* @__PURE__ */ (0,
|
|
6375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6336
6376
|
Modal,
|
|
6337
6377
|
{
|
|
6338
6378
|
fixedHeightScrolling: true,
|
|
@@ -6341,7 +6381,7 @@ function RowDetailModalProvider() {
|
|
|
6341
6381
|
hideCloseIcon: true,
|
|
6342
6382
|
size: "medium",
|
|
6343
6383
|
className: "!p-0",
|
|
6344
|
-
headerIcon: /* @__PURE__ */ (0,
|
|
6384
|
+
headerIcon: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
6345
6385
|
Stack,
|
|
6346
6386
|
{
|
|
6347
6387
|
horizontal: true,
|
|
@@ -6350,8 +6390,8 @@ function RowDetailModalProvider() {
|
|
|
6350
6390
|
justify: "between",
|
|
6351
6391
|
width: "full",
|
|
6352
6392
|
children: [
|
|
6353
|
-
/* @__PURE__ */ (0,
|
|
6354
|
-
/* @__PURE__ */ (0,
|
|
6393
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Heading2, { children: (_a = currentRow == null ? void 0 : currentRow[primaryKey != null ? primaryKey : "id"]) != null ? _a : "Grid Detail" }),
|
|
6394
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6355
6395
|
Button,
|
|
6356
6396
|
{
|
|
6357
6397
|
id: id ? `${id}-open-in-new-button` : void 0,
|
|
@@ -6359,15 +6399,15 @@ function RowDetailModalProvider() {
|
|
|
6359
6399
|
iconOnly: true,
|
|
6360
6400
|
variant: "tertiary",
|
|
6361
6401
|
onClick: closeRowDetail,
|
|
6362
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
6402
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { name: "open_in_new", size: 24 }) })
|
|
6363
6403
|
}
|
|
6364
6404
|
)
|
|
6365
6405
|
]
|
|
6366
6406
|
}
|
|
6367
6407
|
),
|
|
6368
|
-
customActions: /* @__PURE__ */ (0,
|
|
6408
|
+
customActions: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Button, { onClick: closeRowDetail, className: "w-full", children: "Close" }),
|
|
6369
6409
|
showButtons: true,
|
|
6370
|
-
children: /* @__PURE__ */ (0,
|
|
6410
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "bg-white max-h-full flex flex-col flex-grow-1", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ModalContent2, {}) })
|
|
6371
6411
|
}
|
|
6372
6412
|
);
|
|
6373
6413
|
}
|
|
@@ -6377,7 +6417,7 @@ var import_clsx31 = __toESM(require("clsx"), 1);
|
|
|
6377
6417
|
|
|
6378
6418
|
// src/components/MobileDataGrid/MobileDataGridCard/index.tsx
|
|
6379
6419
|
var import_clsx30 = __toESM(require("clsx"), 1);
|
|
6380
|
-
var
|
|
6420
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
6381
6421
|
function MobileDataGridCard({
|
|
6382
6422
|
renderLink,
|
|
6383
6423
|
renderChevron = true,
|
|
@@ -6389,7 +6429,7 @@ function MobileDataGridCard({
|
|
|
6389
6429
|
var _a;
|
|
6390
6430
|
const context = useGridContext();
|
|
6391
6431
|
const { id, testid, visibleColumns, getId, handleRowSelect, openRowDetail } = context;
|
|
6392
|
-
return /* @__PURE__ */ (0,
|
|
6432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
6393
6433
|
"li",
|
|
6394
6434
|
{
|
|
6395
6435
|
id: id ? `${id}-card-${getId(data)}` : void 0,
|
|
@@ -6404,9 +6444,9 @@ function MobileDataGridCard({
|
|
|
6404
6444
|
),
|
|
6405
6445
|
onClick: () => openRowDetail(data),
|
|
6406
6446
|
children: [
|
|
6407
|
-
/* @__PURE__ */ (0,
|
|
6408
|
-
/* @__PURE__ */ (0,
|
|
6409
|
-
enableRowSelection && /* @__PURE__ */ (0,
|
|
6447
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Stack, { sizing: "component", children: [
|
|
6448
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Stack, { horizontal: true, horizontalMobile: true, items: "center", justify: "between", children: [
|
|
6449
|
+
enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6410
6450
|
Stack,
|
|
6411
6451
|
{
|
|
6412
6452
|
sizing: "component",
|
|
@@ -6414,7 +6454,7 @@ function MobileDataGridCard({
|
|
|
6414
6454
|
width: "fit",
|
|
6415
6455
|
style: { paddingLeft: 0, paddingRight: 8 },
|
|
6416
6456
|
onClick: (e) => e.stopPropagation(),
|
|
6417
|
-
children: /* @__PURE__ */ (0,
|
|
6457
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6418
6458
|
Checkbox,
|
|
6419
6459
|
{
|
|
6420
6460
|
id: id ? `${id}-${getId(data)}-select-checkbox` : void 0,
|
|
@@ -6425,17 +6465,17 @@ function MobileDataGridCard({
|
|
|
6425
6465
|
)
|
|
6426
6466
|
}
|
|
6427
6467
|
),
|
|
6428
|
-
/* @__PURE__ */ (0,
|
|
6468
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6429
6469
|
Stack,
|
|
6430
6470
|
{
|
|
6431
6471
|
sizing: "component",
|
|
6432
6472
|
padding: true,
|
|
6433
6473
|
onClick: (e) => e.stopPropagation(),
|
|
6434
6474
|
style: { paddingInline: 0 },
|
|
6435
|
-
children: renderLink ? renderLink(data) : /* @__PURE__ */ (0,
|
|
6475
|
+
children: renderLink ? renderLink(data) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Subheader, { children: String((_a = data[context.primaryKey]) != null ? _a : "") })
|
|
6436
6476
|
}
|
|
6437
6477
|
),
|
|
6438
|
-
/* @__PURE__ */ (0,
|
|
6478
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6439
6479
|
Stack,
|
|
6440
6480
|
{
|
|
6441
6481
|
horizontal: true,
|
|
@@ -6448,18 +6488,18 @@ function MobileDataGridCard({
|
|
|
6448
6488
|
}
|
|
6449
6489
|
)
|
|
6450
6490
|
] }),
|
|
6451
|
-
/* @__PURE__ */ (0,
|
|
6491
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Stack, { sizing: "layout-group", children: visibleColumns.filter((x) => {
|
|
6452
6492
|
var _a2, _b;
|
|
6453
6493
|
return ((_a2 = x.meta) == null ? void 0 : _a2.visible) !== false && !((_b = x.id) == null ? void 0 : _b.startsWith("__"));
|
|
6454
6494
|
}).map(
|
|
6455
6495
|
(column, index) => {
|
|
6456
6496
|
var _a2, _b;
|
|
6457
|
-
return ((_a2 = column.meta) == null ? void 0 : _a2.useCustomRenderer) && column.meta.mobileCell && column.id ? /* @__PURE__ */ (0,
|
|
6497
|
+
return ((_a2 = column.meta) == null ? void 0 : _a2.useCustomRenderer) && column.meta.mobileCell && column.id ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
6458
6498
|
"div",
|
|
6459
6499
|
{
|
|
6460
6500
|
className: "grid grid-cols-2 gap-2 items-center flex-1",
|
|
6461
6501
|
children: [
|
|
6462
|
-
/* @__PURE__ */ (0,
|
|
6502
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
6463
6503
|
Paragraph,
|
|
6464
6504
|
{
|
|
6465
6505
|
color: "text-secondary-normal",
|
|
@@ -6471,7 +6511,7 @@ function MobileDataGridCard({
|
|
|
6471
6511
|
}
|
|
6472
6512
|
),
|
|
6473
6513
|
" ",
|
|
6474
|
-
/* @__PURE__ */ (0,
|
|
6514
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6475
6515
|
column.meta.mobileCell,
|
|
6476
6516
|
{
|
|
6477
6517
|
column,
|
|
@@ -6482,7 +6522,7 @@ function MobileDataGridCard({
|
|
|
6482
6522
|
]
|
|
6483
6523
|
},
|
|
6484
6524
|
`${column.id}-${index}`
|
|
6485
|
-
) : /* @__PURE__ */ (0,
|
|
6525
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6486
6526
|
MobileDataGridColumn,
|
|
6487
6527
|
{
|
|
6488
6528
|
column,
|
|
@@ -6493,14 +6533,14 @@ function MobileDataGridCard({
|
|
|
6493
6533
|
}
|
|
6494
6534
|
) })
|
|
6495
6535
|
] }),
|
|
6496
|
-
renderChevron && /* @__PURE__ */ (0,
|
|
6536
|
+
renderChevron && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Stack, { items: "center", justify: "center", horizontal: true, horizontalMobile: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-icon-primary-normal", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { name: "keyboard_arrow_down" }) }) })
|
|
6497
6537
|
]
|
|
6498
6538
|
}
|
|
6499
6539
|
);
|
|
6500
6540
|
}
|
|
6501
6541
|
|
|
6502
6542
|
// src/components/MobileDataGrid/ColumnList.tsx
|
|
6503
|
-
var
|
|
6543
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
6504
6544
|
function ColumnList(props) {
|
|
6505
6545
|
const {
|
|
6506
6546
|
withBorder,
|
|
@@ -6512,14 +6552,14 @@ function ColumnList(props) {
|
|
|
6512
6552
|
} = props;
|
|
6513
6553
|
const ctx = useGridContext();
|
|
6514
6554
|
const { id, testid, data, getId, selectedRowIds } = ctx;
|
|
6515
|
-
return /* @__PURE__ */ (0,
|
|
6555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6516
6556
|
"div",
|
|
6517
6557
|
{
|
|
6518
6558
|
className: (0, import_clsx31.default)(
|
|
6519
6559
|
"flex flex-col flex-1 relative overflow-y-auto overflow-x-hidden",
|
|
6520
6560
|
!!Footer && "mb-20"
|
|
6521
6561
|
),
|
|
6522
|
-
children: /* @__PURE__ */ (0,
|
|
6562
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6523
6563
|
"ul",
|
|
6524
6564
|
{
|
|
6525
6565
|
id,
|
|
@@ -6532,7 +6572,7 @@ function ColumnList(props) {
|
|
|
6532
6572
|
children: [
|
|
6533
6573
|
data.map((item) => {
|
|
6534
6574
|
const id2 = getId(item);
|
|
6535
|
-
return /* @__PURE__ */ (0,
|
|
6575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6536
6576
|
MobileDataGridCard,
|
|
6537
6577
|
{
|
|
6538
6578
|
data: item,
|
|
@@ -6545,7 +6585,7 @@ function ColumnList(props) {
|
|
|
6545
6585
|
id2
|
|
6546
6586
|
);
|
|
6547
6587
|
}),
|
|
6548
|
-
!!Footer && /* @__PURE__ */ (0,
|
|
6588
|
+
!!Footer && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "fixed left-0 right-0 bottom-0 flex flex-col w-full min-h-20", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Footer, __spreadValues({}, ctx)) })
|
|
6549
6589
|
]
|
|
6550
6590
|
}
|
|
6551
6591
|
)
|
|
@@ -6554,7 +6594,7 @@ function ColumnList(props) {
|
|
|
6554
6594
|
}
|
|
6555
6595
|
|
|
6556
6596
|
// src/components/MobileDataGrid/index.tsx
|
|
6557
|
-
var
|
|
6597
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6558
6598
|
function MobileDataGrid(props) {
|
|
6559
6599
|
const {
|
|
6560
6600
|
columns,
|
|
@@ -6576,7 +6616,7 @@ function MobileDataGrid(props) {
|
|
|
6576
6616
|
rowActions,
|
|
6577
6617
|
rounded
|
|
6578
6618
|
} = props;
|
|
6579
|
-
return /* @__PURE__ */ (0,
|
|
6619
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6580
6620
|
GridContextProvider,
|
|
6581
6621
|
{
|
|
6582
6622
|
initialColumns: columns,
|
|
@@ -6588,7 +6628,7 @@ function MobileDataGrid(props) {
|
|
|
6588
6628
|
numberOfColumnsToShow,
|
|
6589
6629
|
primaryKey,
|
|
6590
6630
|
children: [
|
|
6591
|
-
/* @__PURE__ */ (0,
|
|
6631
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6592
6632
|
Stack,
|
|
6593
6633
|
{
|
|
6594
6634
|
height: "full",
|
|
@@ -6596,7 +6636,7 @@ function MobileDataGrid(props) {
|
|
|
6596
6636
|
overflowX: "hidden",
|
|
6597
6637
|
overflowY: "hidden",
|
|
6598
6638
|
children: [
|
|
6599
|
-
!hideHeader && /* @__PURE__ */ (0,
|
|
6639
|
+
!hideHeader && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6600
6640
|
MobileDataGridHeader,
|
|
6601
6641
|
{
|
|
6602
6642
|
header,
|
|
@@ -6604,7 +6644,7 @@ function MobileDataGrid(props) {
|
|
|
6604
6644
|
enableRowSelection
|
|
6605
6645
|
}
|
|
6606
6646
|
),
|
|
6607
|
-
/* @__PURE__ */ (0,
|
|
6647
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6608
6648
|
ColumnList,
|
|
6609
6649
|
{
|
|
6610
6650
|
withBorder,
|
|
@@ -6618,7 +6658,7 @@ function MobileDataGrid(props) {
|
|
|
6618
6658
|
]
|
|
6619
6659
|
}
|
|
6620
6660
|
),
|
|
6621
|
-
/* @__PURE__ */ (0,
|
|
6661
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(RowDetailModalProvider, {})
|
|
6622
6662
|
]
|
|
6623
6663
|
}
|
|
6624
6664
|
);
|
|
@@ -6629,10 +6669,10 @@ var import_react28 = require("react");
|
|
|
6629
6669
|
|
|
6630
6670
|
// src/components/ImagePlaceholder.tsx
|
|
6631
6671
|
var import_react27 = require("react");
|
|
6632
|
-
var
|
|
6672
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6633
6673
|
function ImagePlaceholder(props) {
|
|
6634
6674
|
const clipId = (0, import_react27.useId)();
|
|
6635
|
-
return /* @__PURE__ */ (0,
|
|
6675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
6636
6676
|
"svg",
|
|
6637
6677
|
__spreadProps(__spreadValues({
|
|
6638
6678
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6641,15 +6681,15 @@ function ImagePlaceholder(props) {
|
|
|
6641
6681
|
fill: "none"
|
|
6642
6682
|
}, props), {
|
|
6643
6683
|
children: [
|
|
6644
|
-
/* @__PURE__ */ (0,
|
|
6645
|
-
/* @__PURE__ */ (0,
|
|
6684
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("g", { clipPath: `url(#${clipId})`, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("rect", { width: props.width, height: props.width, fill: "#F7F7F7", rx: 2 }) }),
|
|
6685
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("clipPath", { id: clipId, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("rect", { width: props.width, height: props.width, fill: "#fff", rx: 2 }) }) })
|
|
6646
6686
|
]
|
|
6647
6687
|
})
|
|
6648
6688
|
);
|
|
6649
6689
|
}
|
|
6650
6690
|
|
|
6651
6691
|
// src/components/ProductImagePreview/Thumbnail.tsx
|
|
6652
|
-
var
|
|
6692
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6653
6693
|
function Thumbnail({
|
|
6654
6694
|
width,
|
|
6655
6695
|
height,
|
|
@@ -6660,7 +6700,7 @@ function Thumbnail({
|
|
|
6660
6700
|
isPlaceholder = false
|
|
6661
6701
|
}) {
|
|
6662
6702
|
const [imageError, setImageError] = (0, import_react28.useState)(false);
|
|
6663
|
-
return /* @__PURE__ */ (0,
|
|
6703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6664
6704
|
"button",
|
|
6665
6705
|
{
|
|
6666
6706
|
type: "button",
|
|
@@ -6673,7 +6713,7 @@ function Thumbnail({
|
|
|
6673
6713
|
].join(" "),
|
|
6674
6714
|
style: { maxWidth: width, maxHeight: height, aspectRatio: "1 / 1" },
|
|
6675
6715
|
"aria-pressed": isActive && !isPlaceholder ? "true" : "false",
|
|
6676
|
-
children: isPlaceholder ? /* @__PURE__ */ (0,
|
|
6716
|
+
children: isPlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ImagePlaceholder, { width: 115, height: 115 }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6677
6717
|
"img",
|
|
6678
6718
|
{
|
|
6679
6719
|
src: imageError ? "/placeholder.svg" : src,
|
|
@@ -6692,7 +6732,7 @@ function Thumbnail({
|
|
|
6692
6732
|
|
|
6693
6733
|
// src/components/Grid.tsx
|
|
6694
6734
|
var import_clsx32 = __toESM(require("clsx"), 1);
|
|
6695
|
-
var
|
|
6735
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6696
6736
|
var GAP_BY_SIZING = {
|
|
6697
6737
|
none: "gap-0",
|
|
6698
6738
|
"layout-group": "gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-compact-layout-group-gap",
|
|
@@ -6740,7 +6780,7 @@ var Grid = (_a) => {
|
|
|
6740
6780
|
]);
|
|
6741
6781
|
var _a2, _b2;
|
|
6742
6782
|
const columnClasses = buildColumnClasses(columns, responsive);
|
|
6743
|
-
return /* @__PURE__ */ (0,
|
|
6783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6744
6784
|
"div",
|
|
6745
6785
|
__spreadProps(__spreadValues({
|
|
6746
6786
|
id,
|
|
@@ -6761,7 +6801,7 @@ var Grid = (_a) => {
|
|
|
6761
6801
|
|
|
6762
6802
|
// src/components/ProductImagePreview/ProductPrimaryImage.tsx
|
|
6763
6803
|
var import_react29 = require("react");
|
|
6764
|
-
var
|
|
6804
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6765
6805
|
var placeholderImageUri = "/placeholder.svg";
|
|
6766
6806
|
function ProductPrimaryImage({
|
|
6767
6807
|
image,
|
|
@@ -6881,7 +6921,7 @@ function ProductPrimaryImage({
|
|
|
6881
6921
|
top: Math.max(0, Math.min(height - size, topRaw))
|
|
6882
6922
|
};
|
|
6883
6923
|
}
|
|
6884
|
-
return /* @__PURE__ */ (0,
|
|
6924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
6885
6925
|
"div",
|
|
6886
6926
|
{
|
|
6887
6927
|
ref: containerRef,
|
|
@@ -6901,7 +6941,7 @@ function ProductPrimaryImage({
|
|
|
6901
6941
|
onPointerLeave: handlePointerLeave,
|
|
6902
6942
|
onPointerMove: handlePointerMove,
|
|
6903
6943
|
children: [
|
|
6904
|
-
/* @__PURE__ */ (0,
|
|
6944
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6905
6945
|
"img",
|
|
6906
6946
|
{
|
|
6907
6947
|
src: imageSrc != null ? imageSrc : placeholderImageUri,
|
|
@@ -6913,7 +6953,7 @@ function ProductPrimaryImage({
|
|
|
6913
6953
|
},
|
|
6914
6954
|
imageSrc
|
|
6915
6955
|
),
|
|
6916
|
-
zoomEnabled && active && lensStyle && /* @__PURE__ */ (0,
|
|
6956
|
+
zoomEnabled && active && lensStyle && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6917
6957
|
"div",
|
|
6918
6958
|
{
|
|
6919
6959
|
"aria-hidden": true,
|
|
@@ -6931,7 +6971,7 @@ var import_react30 = require("react");
|
|
|
6931
6971
|
|
|
6932
6972
|
// src/components/Surface.tsx
|
|
6933
6973
|
var import_clsx33 = __toESM(require("clsx"), 1);
|
|
6934
|
-
var
|
|
6974
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6935
6975
|
var Surface = (_a) => {
|
|
6936
6976
|
var _b = _a, {
|
|
6937
6977
|
children,
|
|
@@ -6944,7 +6984,7 @@ var Surface = (_a) => {
|
|
|
6944
6984
|
"elevation",
|
|
6945
6985
|
"id"
|
|
6946
6986
|
]);
|
|
6947
|
-
return /* @__PURE__ */ (0,
|
|
6987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6948
6988
|
"div",
|
|
6949
6989
|
__spreadProps(__spreadValues({
|
|
6950
6990
|
id,
|
|
@@ -6965,7 +7005,7 @@ var Surface = (_a) => {
|
|
|
6965
7005
|
Surface.displayName = "Surface";
|
|
6966
7006
|
|
|
6967
7007
|
// src/components/ProductImagePreview/ZoomWindow.tsx
|
|
6968
|
-
var
|
|
7008
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6969
7009
|
function ZoomWindow({
|
|
6970
7010
|
image,
|
|
6971
7011
|
width,
|
|
@@ -7023,7 +7063,7 @@ function ZoomWindow({
|
|
|
7023
7063
|
top
|
|
7024
7064
|
};
|
|
7025
7065
|
};
|
|
7026
|
-
return /* @__PURE__ */ (0,
|
|
7066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7027
7067
|
Surface,
|
|
7028
7068
|
{
|
|
7029
7069
|
elevation: 16,
|
|
@@ -7038,7 +7078,7 @@ function ZoomWindow({
|
|
|
7038
7078
|
userSelect: "none"
|
|
7039
7079
|
}, calculatePosition()),
|
|
7040
7080
|
"aria-hidden": true,
|
|
7041
|
-
children: /* @__PURE__ */ (0,
|
|
7081
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7042
7082
|
"img",
|
|
7043
7083
|
{
|
|
7044
7084
|
src: imageSrc,
|
|
@@ -7060,7 +7100,7 @@ function ZoomWindow({
|
|
|
7060
7100
|
|
|
7061
7101
|
// src/components/ProductImagePreview/CarouselPagination.tsx
|
|
7062
7102
|
var import_clsx34 = require("clsx");
|
|
7063
|
-
var
|
|
7103
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
7064
7104
|
function CarouselPagination({
|
|
7065
7105
|
images,
|
|
7066
7106
|
currentIndex,
|
|
@@ -7068,7 +7108,7 @@ function CarouselPagination({
|
|
|
7068
7108
|
className
|
|
7069
7109
|
}) {
|
|
7070
7110
|
if (!(images == null ? void 0 : images.length)) return null;
|
|
7071
|
-
return /* @__PURE__ */ (0,
|
|
7111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7072
7112
|
"div",
|
|
7073
7113
|
{
|
|
7074
7114
|
className: (0, import_clsx34.clsx)(
|
|
@@ -7076,7 +7116,7 @@ function CarouselPagination({
|
|
|
7076
7116
|
className
|
|
7077
7117
|
),
|
|
7078
7118
|
"aria-label": "Image navigation",
|
|
7079
|
-
children: /* @__PURE__ */ (0,
|
|
7119
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7080
7120
|
"div",
|
|
7081
7121
|
{
|
|
7082
7122
|
className: "grid gap-2 place-items-center",
|
|
@@ -7084,7 +7124,7 @@ function CarouselPagination({
|
|
|
7084
7124
|
gridTemplateColumns: `repeat(${Math.min(images.length, 8)}, 1fr)`
|
|
7085
7125
|
},
|
|
7086
7126
|
role: "tablist",
|
|
7087
|
-
children: images.map((_, index) => /* @__PURE__ */ (0,
|
|
7127
|
+
children: images.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7088
7128
|
"button",
|
|
7089
7129
|
{
|
|
7090
7130
|
type: "button",
|
|
@@ -7108,7 +7148,7 @@ function CarouselPagination({
|
|
|
7108
7148
|
|
|
7109
7149
|
// src/components/ProductImagePreview/MobileImageCarousel.tsx
|
|
7110
7150
|
var import_react31 = require("react");
|
|
7111
|
-
var
|
|
7151
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
7112
7152
|
function MobileImageCarousel({
|
|
7113
7153
|
images,
|
|
7114
7154
|
currentIndex,
|
|
@@ -7223,7 +7263,7 @@ function MobileImageCarousel({
|
|
|
7223
7263
|
[isDragging, currentIndex, onChangeIndex]
|
|
7224
7264
|
);
|
|
7225
7265
|
if (!images.length) return null;
|
|
7226
|
-
return /* @__PURE__ */ (0,
|
|
7266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: `md:hidden w-full ${className}`, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7227
7267
|
"div",
|
|
7228
7268
|
{
|
|
7229
7269
|
ref: containerRef,
|
|
@@ -7238,7 +7278,7 @@ function MobileImageCarousel({
|
|
|
7238
7278
|
onTouchStart: handleTouchStart,
|
|
7239
7279
|
onTouchMove: handleTouchMove,
|
|
7240
7280
|
onTouchEnd: handleTouchEnd,
|
|
7241
|
-
children: /* @__PURE__ */ (0,
|
|
7281
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7242
7282
|
"div",
|
|
7243
7283
|
{
|
|
7244
7284
|
className: "flex items-center",
|
|
@@ -7251,7 +7291,7 @@ function MobileImageCarousel({
|
|
|
7251
7291
|
const isActive = index === currentIndex;
|
|
7252
7292
|
const distance = Math.abs(index - currentIndex);
|
|
7253
7293
|
const shouldRender = distance <= 2;
|
|
7254
|
-
return /* @__PURE__ */ (0,
|
|
7294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7255
7295
|
"div",
|
|
7256
7296
|
{
|
|
7257
7297
|
className: "flex-shrink-0 transition-opacity duration-300",
|
|
@@ -7261,7 +7301,7 @@ function MobileImageCarousel({
|
|
|
7261
7301
|
opacity: isActive ? 1 : Math.max(0.3, 1 - distance * 0.3)
|
|
7262
7302
|
},
|
|
7263
7303
|
onClick: () => handleImageClick(index),
|
|
7264
|
-
children: shouldRender ? /* @__PURE__ */ (0,
|
|
7304
|
+
children: shouldRender ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7265
7305
|
"img",
|
|
7266
7306
|
{
|
|
7267
7307
|
src: image.src,
|
|
@@ -7273,7 +7313,7 @@ function MobileImageCarousel({
|
|
|
7273
7313
|
aspectRatio: "1 / 1"
|
|
7274
7314
|
}
|
|
7275
7315
|
}
|
|
7276
|
-
) : /* @__PURE__ */ (0,
|
|
7316
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7277
7317
|
"div",
|
|
7278
7318
|
{
|
|
7279
7319
|
className: "w-full h-full bg-neutral-100 rounded-md border border-gray-200",
|
|
@@ -7409,7 +7449,7 @@ function useProductImagePreview(props) {
|
|
|
7409
7449
|
}
|
|
7410
7450
|
|
|
7411
7451
|
// src/components/ProductImagePreview/index.tsx
|
|
7412
|
-
var
|
|
7452
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7413
7453
|
var PLACEHOLDER_IMAGES = [
|
|
7414
7454
|
{ src: "", alt: "placeholder" },
|
|
7415
7455
|
{ src: "", alt: "placeholder" }
|
|
@@ -7452,9 +7492,9 @@ function ProductImagePreview(props) {
|
|
|
7452
7492
|
});
|
|
7453
7493
|
if (typeof isMobile === "undefined") return null;
|
|
7454
7494
|
const effectiveZoomEnabled = zoomEnabled && !isMobile;
|
|
7455
|
-
return /* @__PURE__ */ (0,
|
|
7456
|
-
/* @__PURE__ */ (0,
|
|
7457
|
-
/* @__PURE__ */ (0,
|
|
7495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Stack, { sizing: "layout", style: { width, position: "relative" }, children: [
|
|
7496
|
+
/* @__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: [
|
|
7497
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { ref: primaryImageRef, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7458
7498
|
ProductPrimaryImage,
|
|
7459
7499
|
{
|
|
7460
7500
|
image: active,
|
|
@@ -7468,7 +7508,7 @@ function ProductImagePreview(props) {
|
|
|
7468
7508
|
isPlaceholder: images.length === 0
|
|
7469
7509
|
}
|
|
7470
7510
|
) }),
|
|
7471
|
-
effectiveZoomEnabled && /* @__PURE__ */ (0,
|
|
7511
|
+
effectiveZoomEnabled && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7472
7512
|
ZoomWindow,
|
|
7473
7513
|
{
|
|
7474
7514
|
image: active,
|
|
@@ -7483,7 +7523,7 @@ function ProductImagePreview(props) {
|
|
|
7483
7523
|
}
|
|
7484
7524
|
)
|
|
7485
7525
|
] }) }),
|
|
7486
|
-
/* @__PURE__ */ (0,
|
|
7526
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7487
7527
|
MobileImageCarousel,
|
|
7488
7528
|
{
|
|
7489
7529
|
images,
|
|
@@ -7493,14 +7533,14 @@ function ProductImagePreview(props) {
|
|
|
7493
7533
|
onChangeIndex: handleSelect
|
|
7494
7534
|
}
|
|
7495
7535
|
),
|
|
7496
|
-
/* @__PURE__ */ (0,
|
|
7536
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "hidden md:block", children: images.length <= 3 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7497
7537
|
"div",
|
|
7498
7538
|
{
|
|
7499
7539
|
className: "flex justify-center gap-4",
|
|
7500
7540
|
style: { width: "100%", maxWidth: width },
|
|
7501
7541
|
"aria-label": "Product image thumbnails",
|
|
7502
7542
|
children: (images.length === 0 ? PLACEHOLDER_IMAGES : images).map(
|
|
7503
|
-
(img, i) => /* @__PURE__ */ (0,
|
|
7543
|
+
(img, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { style: { maxWidth: "115px" }, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7504
7544
|
Thumbnail,
|
|
7505
7545
|
{
|
|
7506
7546
|
src: img.src,
|
|
@@ -7512,7 +7552,7 @@ function ProductImagePreview(props) {
|
|
|
7512
7552
|
) }, img.src + i)
|
|
7513
7553
|
)
|
|
7514
7554
|
}
|
|
7515
|
-
) : /* @__PURE__ */ (0,
|
|
7555
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7516
7556
|
Grid,
|
|
7517
7557
|
{
|
|
7518
7558
|
sizing: "layout-group",
|
|
@@ -7523,7 +7563,7 @@ function ProductImagePreview(props) {
|
|
|
7523
7563
|
},
|
|
7524
7564
|
columns: thumbsPerRow > 12 ? 12 : thumbsPerRow < 1 ? 1 : thumbsPerRow,
|
|
7525
7565
|
children: (images.length === 0 ? PLACEHOLDER_IMAGES : images).map(
|
|
7526
|
-
(img, i) => /* @__PURE__ */ (0,
|
|
7566
|
+
(img, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7527
7567
|
Thumbnail,
|
|
7528
7568
|
{
|
|
7529
7569
|
src: img.src,
|
|
@@ -7537,7 +7577,7 @@ function ProductImagePreview(props) {
|
|
|
7537
7577
|
)
|
|
7538
7578
|
}
|
|
7539
7579
|
) }),
|
|
7540
|
-
/* @__PURE__ */ (0,
|
|
7580
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7541
7581
|
CarouselPagination,
|
|
7542
7582
|
{
|
|
7543
7583
|
images,
|
|
@@ -7551,7 +7591,7 @@ function ProductImagePreview(props) {
|
|
|
7551
7591
|
// src/components/CompactImagesPreview.tsx
|
|
7552
7592
|
var import_react33 = require("react");
|
|
7553
7593
|
var import_clsx35 = __toESM(require("clsx"), 1);
|
|
7554
|
-
var
|
|
7594
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
7555
7595
|
function CompactImagesPreview(props) {
|
|
7556
7596
|
const {
|
|
7557
7597
|
sources,
|
|
@@ -7588,7 +7628,7 @@ function CompactImagesPreview(props) {
|
|
|
7588
7628
|
[currentSourceIndex, onChangeSource, imagesCount]
|
|
7589
7629
|
);
|
|
7590
7630
|
if (!sources.length || currentSourceIndex >= sources.length || typeof isMobile === "undefined")
|
|
7591
|
-
return /* @__PURE__ */ (0,
|
|
7631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7592
7632
|
"img",
|
|
7593
7633
|
{
|
|
7594
7634
|
"data-testid": testid ? `${testid}-placeholder` : void 0,
|
|
@@ -7606,8 +7646,8 @@ function CompactImagesPreview(props) {
|
|
|
7606
7646
|
}
|
|
7607
7647
|
);
|
|
7608
7648
|
const currentSource = sources[currentSourceIndex];
|
|
7609
|
-
return /* @__PURE__ */ (0,
|
|
7610
|
-
/* @__PURE__ */ (0,
|
|
7649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Stack, { "data-testid": testid, sizing: "layout", children: [
|
|
7650
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7611
7651
|
"img",
|
|
7612
7652
|
{
|
|
7613
7653
|
"data-testid": testid ? `${testid}-main-image` : void 0,
|
|
@@ -7624,7 +7664,7 @@ function CompactImagesPreview(props) {
|
|
|
7624
7664
|
onClick: onMainImageClick
|
|
7625
7665
|
}
|
|
7626
7666
|
),
|
|
7627
|
-
/* @__PURE__ */ (0,
|
|
7667
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex flex-row flex-wrap items-center gap-3", children: sources.slice(0, 4).map((source, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7628
7668
|
"button",
|
|
7629
7669
|
{
|
|
7630
7670
|
"data-testid": testid ? `${testid}-thumbnail-${index}` : void 0,
|
|
@@ -7636,7 +7676,7 @@ function CompactImagesPreview(props) {
|
|
|
7636
7676
|
"cursor-pointer",
|
|
7637
7677
|
currentSourceIndex === index && enableThumbnailBorder ? "ring-2 ring-offset-2 ring-brand-400 transition-discrete duration-300" : "ring-brand-400/0"
|
|
7638
7678
|
),
|
|
7639
|
-
children: /* @__PURE__ */ (0,
|
|
7679
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7640
7680
|
"img",
|
|
7641
7681
|
{
|
|
7642
7682
|
src: source.uri,
|
|
@@ -7658,17 +7698,17 @@ function CompactImagesPreview(props) {
|
|
|
7658
7698
|
|
|
7659
7699
|
// src/components/SimpleTable.tsx
|
|
7660
7700
|
var import_clsx36 = __toESM(require("clsx"), 1);
|
|
7661
|
-
var
|
|
7701
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7662
7702
|
function SimpleTable({
|
|
7663
7703
|
columns,
|
|
7664
7704
|
data,
|
|
7665
7705
|
additionalRows
|
|
7666
7706
|
}) {
|
|
7667
7707
|
const allRows = additionalRows && additionalRows.length > 0 ? [...data, ...additionalRows] : data;
|
|
7668
|
-
return /* @__PURE__ */ (0,
|
|
7669
|
-
/* @__PURE__ */ (0,
|
|
7708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Stack, { elevation: 4, rounded: true, overflowX: "hidden", overflowY: "hidden", 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: [
|
|
7709
|
+
/* @__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) => {
|
|
7670
7710
|
var _a, _b;
|
|
7671
|
-
return /* @__PURE__ */ (0,
|
|
7711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7672
7712
|
"th",
|
|
7673
7713
|
{
|
|
7674
7714
|
scope: "col",
|
|
@@ -7676,12 +7716,12 @@ function SimpleTable({
|
|
|
7676
7716
|
"p-mobile-layout-padding desktop:p-desktop-layout-padding font-semibold text-text-primary-normal",
|
|
7677
7717
|
((_a = column.meta) == null ? void 0 : _a.headerWidth) ? column.meta.headerWidth : "w-2/3"
|
|
7678
7718
|
),
|
|
7679
|
-
children: /* @__PURE__ */ (0,
|
|
7719
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Subheader, { children: (_b = column.header) == null ? void 0 : _b.toString() })
|
|
7680
7720
|
},
|
|
7681
7721
|
index
|
|
7682
7722
|
);
|
|
7683
7723
|
}) }) }),
|
|
7684
|
-
/* @__PURE__ */ (0,
|
|
7724
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tbody", { children: allRows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7685
7725
|
"tr",
|
|
7686
7726
|
{
|
|
7687
7727
|
className: "border-t border-border-primary-normal divide-x divide-border-primary-normal",
|
|
@@ -7689,7 +7729,7 @@ function SimpleTable({
|
|
|
7689
7729
|
var _a;
|
|
7690
7730
|
const rawValue = column.id ? row[column.id] : null;
|
|
7691
7731
|
const cellValue = rawValue != null ? rawValue : null;
|
|
7692
|
-
return /* @__PURE__ */ (0,
|
|
7732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7693
7733
|
"td",
|
|
7694
7734
|
{
|
|
7695
7735
|
className: (0, import_clsx36.default)(
|
|
@@ -7710,7 +7750,7 @@ function SimpleTable({
|
|
|
7710
7750
|
// src/components/ListGroup.tsx
|
|
7711
7751
|
var import_react34 = require("react");
|
|
7712
7752
|
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
7713
|
-
var
|
|
7753
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
7714
7754
|
function ListGroup({
|
|
7715
7755
|
title,
|
|
7716
7756
|
defaultOpen = false,
|
|
@@ -7730,8 +7770,8 @@ function ListGroup({
|
|
|
7730
7770
|
if (!isControlled) setUncontrolledOpen(next);
|
|
7731
7771
|
onToggle == null ? void 0 : onToggle(next);
|
|
7732
7772
|
};
|
|
7733
|
-
return /* @__PURE__ */ (0,
|
|
7734
|
-
/* @__PURE__ */ (0,
|
|
7773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { "data-testid": testid, className: (0, import_clsx37.default)("rounded-sm", className), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Stack, { sizing: "layout", noGap: true, children: [
|
|
7774
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
7735
7775
|
"button",
|
|
7736
7776
|
{
|
|
7737
7777
|
type: "button",
|
|
@@ -7742,8 +7782,8 @@ function ListGroup({
|
|
|
7742
7782
|
),
|
|
7743
7783
|
"aria-expanded": isOpen,
|
|
7744
7784
|
children: [
|
|
7745
|
-
/* @__PURE__ */ (0,
|
|
7746
|
-
/* @__PURE__ */ (0,
|
|
7785
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Label, { children: title }),
|
|
7786
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7747
7787
|
Icon,
|
|
7748
7788
|
{
|
|
7749
7789
|
name: "expand_more",
|
|
@@ -7756,14 +7796,14 @@ function ListGroup({
|
|
|
7756
7796
|
]
|
|
7757
7797
|
}
|
|
7758
7798
|
),
|
|
7759
|
-
isOpen && /* @__PURE__ */ (0,
|
|
7799
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Stack, { sizing: "layout", paddingTop: true, children })
|
|
7760
7800
|
] }) });
|
|
7761
7801
|
}
|
|
7762
7802
|
|
|
7763
7803
|
// src/components/Pagination.tsx
|
|
7764
7804
|
var import_react35 = require("react");
|
|
7765
7805
|
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
7766
|
-
var
|
|
7806
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7767
7807
|
var Pagination = ({
|
|
7768
7808
|
totalPages,
|
|
7769
7809
|
currentPage,
|
|
@@ -7838,7 +7878,7 @@ var Pagination = ({
|
|
|
7838
7878
|
"focus:bg-background-grouped-secondary-normal focus:outline-0",
|
|
7839
7879
|
"disabled:bg-transparent disabled:text-text-action-primary-disabled"
|
|
7840
7880
|
);
|
|
7841
|
-
return /* @__PURE__ */ (0,
|
|
7881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
7842
7882
|
"nav",
|
|
7843
7883
|
{
|
|
7844
7884
|
id,
|
|
@@ -7853,19 +7893,19 @@ var Pagination = ({
|
|
|
7853
7893
|
className
|
|
7854
7894
|
),
|
|
7855
7895
|
children: [
|
|
7856
|
-
/* @__PURE__ */ (0,
|
|
7896
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7857
7897
|
"button",
|
|
7858
7898
|
{
|
|
7859
7899
|
disabled: disabled || currentPage <= 1,
|
|
7860
7900
|
"aria-label": "Previous page",
|
|
7861
7901
|
onClick: () => goTo(currentPage - 1),
|
|
7862
7902
|
className: (0, import_clsx38.default)(buttonClass, "border-r-1 border-border-primary-normal"),
|
|
7863
|
-
children: /* @__PURE__ */ (0,
|
|
7903
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon, { name: "keyboard_arrow_left" })
|
|
7864
7904
|
}
|
|
7865
7905
|
),
|
|
7866
|
-
/* @__PURE__ */ (0,
|
|
7906
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { className: (0, import_clsx38.default)("flex items-center"), children: pageTokens.map((token, index) => {
|
|
7867
7907
|
if (token === "ellipsis") {
|
|
7868
|
-
return /* @__PURE__ */ (0,
|
|
7908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7869
7909
|
"li",
|
|
7870
7910
|
{
|
|
7871
7911
|
className: "w-8 h-8 select-none text-text-action-primary-disabled",
|
|
@@ -7875,7 +7915,7 @@ var Pagination = ({
|
|
|
7875
7915
|
);
|
|
7876
7916
|
}
|
|
7877
7917
|
const selected = token === currentPage;
|
|
7878
|
-
return /* @__PURE__ */ (0,
|
|
7918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7879
7919
|
"button",
|
|
7880
7920
|
{
|
|
7881
7921
|
"aria-label": `Page ${token}`,
|
|
@@ -7886,18 +7926,18 @@ var Pagination = ({
|
|
|
7886
7926
|
buttonClass,
|
|
7887
7927
|
selected && "border-x-1 bg-background-grouped-secondary-normal border-border-primary-normal"
|
|
7888
7928
|
),
|
|
7889
|
-
children: /* @__PURE__ */ (0,
|
|
7929
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Subheader, { align: "center", weight: "bold", children: token })
|
|
7890
7930
|
}
|
|
7891
7931
|
) }, token);
|
|
7892
7932
|
}) }),
|
|
7893
|
-
/* @__PURE__ */ (0,
|
|
7933
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7894
7934
|
"button",
|
|
7895
7935
|
{
|
|
7896
7936
|
disabled: disabled || currentPage >= totalPages,
|
|
7897
7937
|
"aria-label": "Next page",
|
|
7898
7938
|
onClick: () => goTo(currentPage + 1),
|
|
7899
7939
|
className: (0, import_clsx38.default)(buttonClass, "border-l-1 border-border-primary-normal"),
|
|
7900
|
-
children: /* @__PURE__ */ (0,
|
|
7940
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Icon, { name: "keyboard_arrow_right" })
|
|
7901
7941
|
}
|
|
7902
7942
|
)
|
|
7903
7943
|
]
|
|
@@ -7907,7 +7947,7 @@ var Pagination = ({
|
|
|
7907
7947
|
Pagination.displayName = "Pagination";
|
|
7908
7948
|
|
|
7909
7949
|
// src/components/SkeletonParagraph.tsx
|
|
7910
|
-
var
|
|
7950
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7911
7951
|
function SkeletonParagraph({
|
|
7912
7952
|
className = "",
|
|
7913
7953
|
heightClassName = "h-6",
|
|
@@ -7918,7 +7958,7 @@ function SkeletonParagraph({
|
|
|
7918
7958
|
medium: "min-w-20 w-1/2",
|
|
7919
7959
|
large: "min-w-32 w-full"
|
|
7920
7960
|
};
|
|
7921
|
-
return /* @__PURE__ */ (0,
|
|
7961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7922
7962
|
"div",
|
|
7923
7963
|
{
|
|
7924
7964
|
"aria-label": "Loading content",
|
|
@@ -7929,9 +7969,9 @@ function SkeletonParagraph({
|
|
|
7929
7969
|
}
|
|
7930
7970
|
|
|
7931
7971
|
// src/components/EmptyCartIcon.tsx
|
|
7932
|
-
var
|
|
7972
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
7933
7973
|
function EmptyCartIcon() {
|
|
7934
|
-
return /* @__PURE__ */ (0,
|
|
7974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7935
7975
|
"svg",
|
|
7936
7976
|
{
|
|
7937
7977
|
width: "211",
|
|
@@ -7939,7 +7979,7 @@ function EmptyCartIcon() {
|
|
|
7939
7979
|
viewBox: "0 0 211 196",
|
|
7940
7980
|
fill: "none",
|
|
7941
7981
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7942
|
-
children: /* @__PURE__ */ (0,
|
|
7982
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7943
7983
|
"path",
|
|
7944
7984
|
{
|
|
7945
7985
|
"fill-rule": "evenodd",
|
|
@@ -7954,7 +7994,7 @@ function EmptyCartIcon() {
|
|
|
7954
7994
|
|
|
7955
7995
|
// src/components/SearchResultImage/index.tsx
|
|
7956
7996
|
var import_react36 = require("react");
|
|
7957
|
-
var
|
|
7997
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7958
7998
|
function SearchResultImage({
|
|
7959
7999
|
width = 20,
|
|
7960
8000
|
height = 20,
|
|
@@ -7963,7 +8003,7 @@ function SearchResultImage({
|
|
|
7963
8003
|
}) {
|
|
7964
8004
|
const [imageError, setImageError] = (0, import_react36.useState)(false);
|
|
7965
8005
|
const showPlaceholder = imageError || !src;
|
|
7966
|
-
return /* @__PURE__ */ (0,
|
|
8006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_jsx_runtime60.Fragment, { children: showPlaceholder ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ImagePlaceholder, { width, height }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7967
8007
|
"img",
|
|
7968
8008
|
{
|
|
7969
8009
|
src,
|
|
@@ -7980,7 +8020,7 @@ function SearchResultImage({
|
|
|
7980
8020
|
// src/components/Alert.tsx
|
|
7981
8021
|
var import_clsx39 = __toESM(require("clsx"), 1);
|
|
7982
8022
|
var import_react37 = require("react");
|
|
7983
|
-
var
|
|
8023
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7984
8024
|
function Alert(_a) {
|
|
7985
8025
|
var _b = _a, {
|
|
7986
8026
|
id,
|
|
@@ -8003,7 +8043,7 @@ function Alert(_a) {
|
|
|
8003
8043
|
const handleClose = (0, import_react37.useCallback)(() => {
|
|
8004
8044
|
if (onClose) onClose();
|
|
8005
8045
|
}, [onClose]);
|
|
8006
|
-
return /* @__PURE__ */ (0,
|
|
8046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8007
8047
|
Stack,
|
|
8008
8048
|
__spreadProps(__spreadValues({
|
|
8009
8049
|
id,
|
|
@@ -8019,7 +8059,7 @@ function Alert(_a) {
|
|
|
8019
8059
|
horizontalMobile: true
|
|
8020
8060
|
}, rest), {
|
|
8021
8061
|
children: [
|
|
8022
|
-
/* @__PURE__ */ (0,
|
|
8062
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8023
8063
|
"div",
|
|
8024
8064
|
{
|
|
8025
8065
|
className: (0, import_clsx39.default)("min-w-[2px] min-h-full flex", {
|
|
@@ -8028,27 +8068,27 @@ function Alert(_a) {
|
|
|
8028
8068
|
})
|
|
8029
8069
|
}
|
|
8030
8070
|
),
|
|
8031
|
-
/* @__PURE__ */ (0,
|
|
8071
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8032
8072
|
"span",
|
|
8033
8073
|
{
|
|
8034
8074
|
className: (0, import_clsx39.default)({
|
|
8035
8075
|
"text-icon-critical-normal": isError,
|
|
8036
8076
|
"text-icon-warning-normal": !isError
|
|
8037
8077
|
}),
|
|
8038
|
-
children: /* @__PURE__ */ (0,
|
|
8078
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { name: "warning" })
|
|
8039
8079
|
}
|
|
8040
8080
|
),
|
|
8041
|
-
/* @__PURE__ */ (0,
|
|
8042
|
-
/* @__PURE__ */ (0,
|
|
8043
|
-
/* @__PURE__ */ (0,
|
|
8081
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Stack, { flexGrow: 1, sizing: "component", children: [
|
|
8082
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Heading2, { children: title }),
|
|
8083
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Paragraph, { children: message })
|
|
8044
8084
|
] }),
|
|
8045
|
-
dismissible && /* @__PURE__ */ (0,
|
|
8085
|
+
dismissible && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8046
8086
|
Button,
|
|
8047
8087
|
{
|
|
8048
8088
|
"aria-label": "Dismiss alert",
|
|
8049
8089
|
iconOnly: true,
|
|
8050
8090
|
variant: "tertiary",
|
|
8051
|
-
leftIcon: /* @__PURE__ */ (0,
|
|
8091
|
+
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { name: "close" }),
|
|
8052
8092
|
onClick: handleClose
|
|
8053
8093
|
}
|
|
8054
8094
|
)
|
|
@@ -8058,9 +8098,9 @@ function Alert(_a) {
|
|
|
8058
8098
|
}
|
|
8059
8099
|
|
|
8060
8100
|
// src/components/OrderCheckIcon.tsx
|
|
8061
|
-
var
|
|
8101
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
8062
8102
|
function OrderCheckIcon(props) {
|
|
8063
|
-
return /* @__PURE__ */ (0,
|
|
8103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8064
8104
|
"svg",
|
|
8065
8105
|
__spreadProps(__spreadValues({
|
|
8066
8106
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -8069,7 +8109,7 @@ function OrderCheckIcon(props) {
|
|
|
8069
8109
|
width: 37,
|
|
8070
8110
|
height: 36
|
|
8071
8111
|
}, props), {
|
|
8072
|
-
children: /* @__PURE__ */ (0,
|
|
8112
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8073
8113
|
"path",
|
|
8074
8114
|
{
|
|
8075
8115
|
d: "M18.457 3.00024C19.6493 3.01827 20.8644 3.13827 22.0283 3.41724C22.8321 3.61234 23.3287 4.42237 23.1337 5.22778C22.9402 6.03178 22.1252 6.5272 21.3242 6.33521C20.3928 6.11026 19.4046 6.01526 18.4658 6.00024C15.2603 6.00924 12.2492 7.26586 9.99018 9.53833C7.72976 11.8108 6.49103 14.829 6.49995 18.0344C6.50895 21.2399 7.7656 24.2495 10.038 26.51C12.303 28.7615 15.3065 30.0002 18.4999 30.0002H18.5341C21.7396 29.9912 24.7507 28.7346 27.0097 26.4622C29.2701 24.1882 30.5089 21.1714 30.4999 17.9661C30.4984 17.1382 31.1673 16.4629 31.9951 16.4612H31.9999C32.8263 16.4612 33.4982 17.13 33.4999 17.9563C33.5119 21.9627 31.9625 25.7354 29.1367 28.5764C26.3123 31.4173 22.5503 32.9881 18.5439 33.0002H18.4999C14.5086 33.0002 10.7542 31.4523 7.92378 28.637C5.08288 25.8126 3.51206 22.0505 3.49995 18.0442C3.48795 14.0363 5.03742 10.265 7.86323 7.42407C10.6877 4.58307 14.4505 3.01224 18.457 3.00024ZM27.872 9.51196C28.418 8.89248 29.3642 8.82637 29.9882 9.37231C30.6107 9.91681 30.6739 10.8645 30.1279 11.4885L19.6279 23.4885C19.3549 23.8004 18.9652 23.9852 18.5498 24.0002H18.4999C18.1025 24.0002 17.7214 23.8428 17.4394 23.5608L12.9394 19.0608C12.3529 18.4743 12.353 17.5262 12.9394 16.9397C13.5259 16.3532 14.474 16.3532 15.0605 16.9397L18.4267 20.3059L27.872 9.51196Z",
|
|
@@ -8079,8 +8119,274 @@ function OrderCheckIcon(props) {
|
|
|
8079
8119
|
})
|
|
8080
8120
|
);
|
|
8081
8121
|
}
|
|
8122
|
+
|
|
8123
|
+
// src/components/AccessCard.tsx
|
|
8124
|
+
var import_clsx41 = __toESM(require("clsx"), 1);
|
|
8125
|
+
|
|
8126
|
+
// src/components/Radio.tsx
|
|
8127
|
+
var import_clsx40 = __toESM(require("clsx"), 1);
|
|
8128
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
8129
|
+
var Radio = (_a) => {
|
|
8130
|
+
var _b = _a, {
|
|
8131
|
+
className,
|
|
8132
|
+
label,
|
|
8133
|
+
error,
|
|
8134
|
+
disabled,
|
|
8135
|
+
checked,
|
|
8136
|
+
readOnly,
|
|
8137
|
+
id,
|
|
8138
|
+
testid
|
|
8139
|
+
} = _b, props = __objRest(_b, [
|
|
8140
|
+
"className",
|
|
8141
|
+
"label",
|
|
8142
|
+
"error",
|
|
8143
|
+
"disabled",
|
|
8144
|
+
"checked",
|
|
8145
|
+
"readOnly",
|
|
8146
|
+
"id",
|
|
8147
|
+
"testid"
|
|
8148
|
+
]);
|
|
8149
|
+
const radioId = id;
|
|
8150
|
+
const paragraphColor = disabled ? "text-primary-disabled" : error ? "text-primary-error" : "text-primary-normal";
|
|
8151
|
+
const defaultClassName = (0, import_clsx40.default)(
|
|
8152
|
+
!error && !disabled && "border-border-primary-normal peer-hover:border-border-action-hover peer-hover:bg-background-action-secondary-hover peer-focus:border-border-action-hover peer-focus:bg-background-action-secondary-hover peer-active:border-border-action-active peer-active:bg-background-action-secondary-active peer-checked:border-0 peer-checked:bg-background-action-secondary-hover"
|
|
8153
|
+
);
|
|
8154
|
+
const errorClassName = (0, import_clsx40.default)(
|
|
8155
|
+
error && !disabled && "border-border-action-critical-normal peer-hover:border-border-action-critical-hover peer-hover:bg-background-action-critical-secondary-hover peer-focus:border-border-action-critical-hover peer-focus:bg-background-action-critical-secondary-hover peer-active:border-border-action-critical-active peer-active:bg-background-action-secondary-active peer-checked:bg-background-action-critical-secondary-hover peer-checked:border-0 "
|
|
8156
|
+
);
|
|
8157
|
+
const disabledClassName = (0, import_clsx40.default)(
|
|
8158
|
+
disabled && "peer-disabled:bg-background-action-secondary-disabled peer-disabled:border-border-primary-normal peer-checked:border-0"
|
|
8159
|
+
);
|
|
8160
|
+
const readonlyClassName = (0, import_clsx40.default)(
|
|
8161
|
+
readOnly && "peer-read-only:bg-background-action-secondary-disabled peer-read-only:border-border-primary-normal peer-checked:border-0"
|
|
8162
|
+
);
|
|
8163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
8164
|
+
"label",
|
|
8165
|
+
{
|
|
8166
|
+
htmlFor: radioId,
|
|
8167
|
+
"data-testid": testid,
|
|
8168
|
+
className: (0, import_clsx40.default)(
|
|
8169
|
+
"flex items-center",
|
|
8170
|
+
componentGap,
|
|
8171
|
+
disabled ? "cursor-default" : "cursor-pointer",
|
|
8172
|
+
className
|
|
8173
|
+
),
|
|
8174
|
+
children: [
|
|
8175
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "relative", children: [
|
|
8176
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
8177
|
+
"input",
|
|
8178
|
+
__spreadValues({
|
|
8179
|
+
id: radioId,
|
|
8180
|
+
"data-testid": testid ? `${testid}-input` : void 0,
|
|
8181
|
+
type: "radio",
|
|
8182
|
+
className: "sr-only peer",
|
|
8183
|
+
disabled,
|
|
8184
|
+
checked,
|
|
8185
|
+
readOnly
|
|
8186
|
+
}, props)
|
|
8187
|
+
),
|
|
8188
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
8189
|
+
"div",
|
|
8190
|
+
{
|
|
8191
|
+
className: (0, import_clsx40.default)(
|
|
8192
|
+
"size-6 rounded-full border flex items-center justify-center",
|
|
8193
|
+
baseTransition,
|
|
8194
|
+
defaultClassName,
|
|
8195
|
+
errorClassName,
|
|
8196
|
+
disabledClassName,
|
|
8197
|
+
readonlyClassName
|
|
8198
|
+
),
|
|
8199
|
+
children: checked && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
8200
|
+
RadioIcon,
|
|
8201
|
+
{
|
|
8202
|
+
className: (0, import_clsx40.default)(
|
|
8203
|
+
"transition-colors",
|
|
8204
|
+
!error && !disabled && "text-icon-on-action-secondary-normal hover:text-icon-on-action-secondary-hover active:text-icon-on-action-secondary-active peer-hover:text-icon-on-action-secondary-hover peer-focus:text-icon-on-action-secondary-hover peer-active:text-icon-on-action-secondary-active",
|
|
8205
|
+
error && !disabled && "text-icon-action-critical-secondary-normal hover:text-icon-action-critical-secondary-hover active:text-icon-action-critical-secondary-active peer-hover:text-icon-action-critical-secondary-hover peer-focus:text-icon-action-critical-secondary-hover peer-active:text-icon-action-critical-secondary-active",
|
|
8206
|
+
disabled && "text-icon-on-action-secondary-disabled",
|
|
8207
|
+
readOnly && "text-icon-on-action-secondary-disabled"
|
|
8208
|
+
)
|
|
8209
|
+
}
|
|
8210
|
+
)
|
|
8211
|
+
}
|
|
8212
|
+
)
|
|
8213
|
+
] }),
|
|
8214
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Paragraph, { id: radioId ? `${radioId}-label` : void 0, testid: testid ? `${testid}-label` : void 0, padded: true, color: paragraphColor, children: label })
|
|
8215
|
+
]
|
|
8216
|
+
}
|
|
8217
|
+
);
|
|
8218
|
+
};
|
|
8219
|
+
Radio.displayName = "Radio";
|
|
8220
|
+
var RadioIcon = ({ className }) => {
|
|
8221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
8222
|
+
"svg",
|
|
8223
|
+
{
|
|
8224
|
+
className,
|
|
8225
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8226
|
+
width: "24",
|
|
8227
|
+
height: "24",
|
|
8228
|
+
viewBox: "0 0 24 24",
|
|
8229
|
+
fill: "none",
|
|
8230
|
+
children: [
|
|
8231
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
8232
|
+
"rect",
|
|
8233
|
+
{
|
|
8234
|
+
x: "1",
|
|
8235
|
+
y: "1",
|
|
8236
|
+
width: "22",
|
|
8237
|
+
height: "22",
|
|
8238
|
+
rx: "11",
|
|
8239
|
+
stroke: "currentColor",
|
|
8240
|
+
strokeWidth: "2"
|
|
8241
|
+
}
|
|
8242
|
+
),
|
|
8243
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("rect", { x: "4", y: "4", width: "16", height: "16", rx: "8", fill: "currentColor" })
|
|
8244
|
+
]
|
|
8245
|
+
}
|
|
8246
|
+
);
|
|
8247
|
+
};
|
|
8248
|
+
RadioIcon.displayName = "RadioIcon";
|
|
8249
|
+
|
|
8250
|
+
// src/components/AccessCard.tsx
|
|
8251
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
8252
|
+
function AccessCard(props) {
|
|
8253
|
+
const {
|
|
8254
|
+
title,
|
|
8255
|
+
description,
|
|
8256
|
+
status,
|
|
8257
|
+
onClick,
|
|
8258
|
+
onDefaultGrantedChange,
|
|
8259
|
+
defaultGranted,
|
|
8260
|
+
testid,
|
|
8261
|
+
error,
|
|
8262
|
+
unavailable
|
|
8263
|
+
} = props;
|
|
8264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
8265
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
8266
|
+
"div",
|
|
8267
|
+
{
|
|
8268
|
+
"data-testid": testid,
|
|
8269
|
+
className: (0, import_clsx41.default)(
|
|
8270
|
+
"cursor-pointer bg-background-grouped-secondary-normal",
|
|
8271
|
+
"px-4 py-2 gap-2",
|
|
8272
|
+
"shadow-access-card rounded",
|
|
8273
|
+
"flex items-center",
|
|
8274
|
+
unavailable && "opacity-50 pointer-events-none"
|
|
8275
|
+
),
|
|
8276
|
+
onClick: (e) => {
|
|
8277
|
+
const target = e.target;
|
|
8278
|
+
const targetIsTheRadioComponent = target.closest("label");
|
|
8279
|
+
if (targetIsTheRadioComponent || defaultGranted) {
|
|
8280
|
+
return;
|
|
8281
|
+
}
|
|
8282
|
+
onClick == null ? void 0 : onClick();
|
|
8283
|
+
},
|
|
8284
|
+
children: [
|
|
8285
|
+
status === "granted" && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8286
|
+
Radio,
|
|
8287
|
+
{
|
|
8288
|
+
testid: testid ? `${testid}-radio` : void 0,
|
|
8289
|
+
checked: defaultGranted,
|
|
8290
|
+
onChange: () => {
|
|
8291
|
+
if (unavailable) {
|
|
8292
|
+
return;
|
|
8293
|
+
}
|
|
8294
|
+
onDefaultGrantedChange == null ? void 0 : onDefaultGrantedChange();
|
|
8295
|
+
}
|
|
8296
|
+
}
|
|
8297
|
+
),
|
|
8298
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex flex-col gap-1 flex-1", children: [
|
|
8299
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Subheader, { children: title }),
|
|
8300
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Caption, { color: "text-primary-normal", children: description })
|
|
8301
|
+
] }),
|
|
8302
|
+
!defaultGranted && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8303
|
+
Icon,
|
|
8304
|
+
{
|
|
8305
|
+
name: status === "granted" ? "remove" : "add"
|
|
8306
|
+
}
|
|
8307
|
+
)
|
|
8308
|
+
]
|
|
8309
|
+
}
|
|
8310
|
+
),
|
|
8311
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Caption, { style: "error", children: error })
|
|
8312
|
+
] });
|
|
8313
|
+
}
|
|
8314
|
+
|
|
8315
|
+
// src/components/AccessCardGroup.tsx
|
|
8316
|
+
var import_clsx42 = __toESM(require("clsx"), 1);
|
|
8317
|
+
var import_react38 = require("react");
|
|
8318
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
8319
|
+
function AccessCardGroup(props) {
|
|
8320
|
+
const {
|
|
8321
|
+
title,
|
|
8322
|
+
children,
|
|
8323
|
+
status,
|
|
8324
|
+
expanded,
|
|
8325
|
+
hasDefault,
|
|
8326
|
+
onClick,
|
|
8327
|
+
onGrantDenyClick,
|
|
8328
|
+
testid,
|
|
8329
|
+
unavailable
|
|
8330
|
+
} = props;
|
|
8331
|
+
const [expand, setExpand] = (0, import_react38.useState)(expanded);
|
|
8332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { "data-testid": testid, className: "mb-mobile-layout-group-gap desktop:mb-desktop-layout-group-gap compact:mb-desktop-compact-layout-group-gap", children: [
|
|
8333
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
8334
|
+
"div",
|
|
8335
|
+
{
|
|
8336
|
+
className: (0, import_clsx42.default)(
|
|
8337
|
+
"flex items-center",
|
|
8338
|
+
"p-2 pr-4 gap-2",
|
|
8339
|
+
"rounded",
|
|
8340
|
+
"bg-neutral-500 text-neutral-000",
|
|
8341
|
+
"cursor-pointer",
|
|
8342
|
+
expand && "mb-2",
|
|
8343
|
+
unavailable && "opacity-75"
|
|
8344
|
+
),
|
|
8345
|
+
onClick: () => {
|
|
8346
|
+
setExpand(!expand);
|
|
8347
|
+
onClick == null ? void 0 : onClick();
|
|
8348
|
+
},
|
|
8349
|
+
children: [
|
|
8350
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8351
|
+
Icon,
|
|
8352
|
+
{
|
|
8353
|
+
name: "keyboard_arrow_down",
|
|
8354
|
+
className: (0, import_clsx42.default)(
|
|
8355
|
+
expand && "rotate-180",
|
|
8356
|
+
"transform transition-all duration-300 ease-in-out"
|
|
8357
|
+
)
|
|
8358
|
+
}
|
|
8359
|
+
),
|
|
8360
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Subheader, { children: title }) }),
|
|
8361
|
+
!hasDefault && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8362
|
+
Icon,
|
|
8363
|
+
{
|
|
8364
|
+
name: status === "granted" ? "remove" : "add",
|
|
8365
|
+
onClick: (e) => {
|
|
8366
|
+
e.stopPropagation();
|
|
8367
|
+
onGrantDenyClick == null ? void 0 : onGrantDenyClick();
|
|
8368
|
+
}
|
|
8369
|
+
}
|
|
8370
|
+
)
|
|
8371
|
+
]
|
|
8372
|
+
}
|
|
8373
|
+
),
|
|
8374
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8375
|
+
"div",
|
|
8376
|
+
{
|
|
8377
|
+
className: (0, import_clsx42.default)(
|
|
8378
|
+
"grid transition-all duration-300 ease-in-out",
|
|
8379
|
+
expand ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
8380
|
+
),
|
|
8381
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "overflow-hidden -m-[3px] p-[4px]", children })
|
|
8382
|
+
}
|
|
8383
|
+
)
|
|
8384
|
+
] });
|
|
8385
|
+
}
|
|
8082
8386
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8083
8387
|
0 && (module.exports = {
|
|
8388
|
+
AccessCard,
|
|
8389
|
+
AccessCardGroup,
|
|
8084
8390
|
Accordion,
|
|
8085
8391
|
Alert,
|
|
8086
8392
|
Button,
|