@dmsi/wedgekit-react 0.0.502 → 0.0.504
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-LJLHGLTS.js → chunk-BMPL6LCR.js} +4 -4
- package/dist/{chunk-D4TFZ2WM.js → chunk-ELXVDRWS.js} +4 -4
- package/dist/{chunk-QV3NANQC.js → chunk-JWVZOEF5.js} +4 -4
- package/dist/{chunk-VOSQMHNF.js → chunk-U5V2IRZX.js} +4 -29
- package/dist/{chunk-S5ZJ3Q7P.js → chunk-VJVY6NPF.js} +3 -3
- package/dist/components/Alert.js +2 -2
- package/dist/components/CalendarRange.cjs +75 -128
- package/dist/components/CalendarRange.js +10 -16
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.cjs +33 -86
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +10 -16
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.cjs +43 -96
- package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +10 -16
- package/dist/components/DataGrid/PinnedColumns.cjs +58 -111
- package/dist/components/DataGrid/PinnedColumns.js +10 -16
- package/dist/components/DataGrid/TableBody/LoadingCell.cjs +34 -87
- package/dist/components/DataGrid/TableBody/LoadingCell.js +10 -16
- package/dist/components/DataGrid/TableBody/TableBodyRow.cjs +40 -93
- package/dist/components/DataGrid/TableBody/TableBodyRow.js +10 -16
- package/dist/components/DataGrid/TableBody/index.cjs +55 -108
- package/dist/components/DataGrid/TableBody/index.js +10 -16
- package/dist/components/DataGrid/index.cjs +144 -197
- package/dist/components/DataGrid/index.js +10 -16
- package/dist/components/DataGrid/utils.cjs +34 -87
- package/dist/components/DataGrid/utils.js +10 -16
- package/dist/components/DateInput.cjs +94 -147
- package/dist/components/DateInput.js +10 -16
- package/dist/components/DateRangeInput.cjs +94 -147
- package/dist/components/DateRangeInput.js +10 -16
- package/dist/components/FilterGroup.js +5 -5
- package/dist/components/MobileDataGrid/ColumnSelector/index.cjs +41 -94
- package/dist/components/MobileDataGrid/ColumnSelector/index.js +10 -16
- package/dist/components/MobileDataGrid/MobileDataGridHeader.cjs +49 -102
- package/dist/components/MobileDataGrid/MobileDataGridHeader.js +10 -16
- package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +5 -5
- package/dist/components/MobileDataGrid/index.cjs +868 -921
- package/dist/components/MobileDataGrid/index.js +10 -16
- package/dist/components/Modal.js +4 -4
- package/dist/components/ModalButtons.js +2 -2
- package/dist/components/ModalHeader.js +2 -2
- package/dist/components/NavigationTab.js +2 -2
- package/dist/components/NavigationTabs.js +2 -2
- package/dist/components/NestedMenu.js +3 -3
- package/dist/components/Notification.js +3 -3
- package/dist/components/OptionPill.js +2 -2
- package/dist/components/PDFViewer/DownloadIcon.js +2 -2
- package/dist/components/PDFViewer/PDFElement.cjs +5 -31
- package/dist/components/PDFViewer/PDFElement.js +2 -3
- package/dist/components/PDFViewer/PDFNavigation.js +2 -2
- package/dist/components/PDFViewer/PDFPage.cjs +3 -3
- package/dist/components/PDFViewer/PDFPage.js +1 -1
- package/dist/components/PDFViewer/index.cjs +5 -35
- package/dist/components/PDFViewer/index.js +114 -11
- package/dist/components/ProductImagePreview/index.js +1 -1
- package/dist/components/Stepper.js +3 -3
- package/dist/components/Toast.js +3 -3
- package/dist/components/Upload.js +3 -3
- package/dist/components/index.cjs +56 -402
- package/dist/components/index.js +16 -25
- package/package.json +1 -1
- package/src/components/PDFViewer/PDFElement.tsx +3 -38
- package/src/components/PDFViewer/PDFPage.tsx +2 -4
- package/src/components/PDFViewer/index.tsx +1 -9
- package/src/components/index.ts +0 -1
- package/dist/chunk-B2O4TEOI.js +0 -119
- package/dist/{chunk-5DQVYX6H.js → chunk-56RPZLV7.js} +3 -3
- package/dist/{chunk-25RZP3VR.js → chunk-AKJUBFJK.js} +3 -3
- package/dist/{chunk-TAPYQBQU.js → chunk-CMMQTIVM.js} +3 -3
- package/dist/{chunk-GYEXSNFP.js → chunk-FWCVZWE6.js} +3 -3
- package/dist/{chunk-MV6W7OMC.js → chunk-QMMPHXVE.js} +3 -3
- package/dist/{chunk-BWBSDSA7.js → chunk-SPJ6V6WJ.js} +3 -3
- package/dist/{chunk-VS53C5ZD.js → chunk-YJGDVWTH.js} +3 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useMounted
|
|
3
3
|
} from "./chunk-4RJKB7LC.js";
|
|
4
|
-
import {
|
|
5
|
-
ModalButtons
|
|
6
|
-
} from "./chunk-25RZP3VR.js";
|
|
7
4
|
import {
|
|
8
5
|
ModalContent
|
|
9
6
|
} from "./chunk-WVVEOCEH.js";
|
|
10
7
|
import {
|
|
11
8
|
ModalHeader
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CMMQTIVM.js";
|
|
13
10
|
import {
|
|
14
11
|
ModalScrim
|
|
15
12
|
} from "./chunk-AG43RS4Q.js";
|
|
13
|
+
import {
|
|
14
|
+
ModalButtons
|
|
15
|
+
} from "./chunk-AKJUBFJK.js";
|
|
16
16
|
import {
|
|
17
17
|
useMatchesMobile
|
|
18
18
|
} from "./chunk-URYQ24NF.js";
|
|
@@ -6,19 +6,19 @@ import {
|
|
|
6
6
|
} from "./chunk-5IFPG6TS.js";
|
|
7
7
|
import {
|
|
8
8
|
Modal
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BMPL6LCR.js";
|
|
10
10
|
import {
|
|
11
11
|
Heading2
|
|
12
12
|
} from "./chunk-MXSJF6TW.js";
|
|
13
|
-
import {
|
|
14
|
-
Button
|
|
15
|
-
} from "./chunk-45AHDOAU.js";
|
|
16
13
|
import {
|
|
17
14
|
Stack
|
|
18
15
|
} from "./chunk-TPXH53SA.js";
|
|
19
16
|
import {
|
|
20
17
|
Icon
|
|
21
18
|
} from "./chunk-NKUETCDA.js";
|
|
19
|
+
import {
|
|
20
|
+
Button
|
|
21
|
+
} from "./chunk-45AHDOAU.js";
|
|
22
22
|
|
|
23
23
|
// src/components/MobileDataGrid/RowDetailModalProvider/index.tsx
|
|
24
24
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-M7INAUAJ.js";
|
|
4
4
|
import {
|
|
5
5
|
RowDetailModalProvider
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ELXVDRWS.js";
|
|
7
7
|
import {
|
|
8
8
|
ColumnList
|
|
9
9
|
} from "./chunk-PRN2EQBX.js";
|
|
@@ -67,9 +67,6 @@ import {
|
|
|
67
67
|
import {
|
|
68
68
|
Heading3
|
|
69
69
|
} from "./chunk-MXSJF6TW.js";
|
|
70
|
-
import {
|
|
71
|
-
Button
|
|
72
|
-
} from "./chunk-45AHDOAU.js";
|
|
73
70
|
import {
|
|
74
71
|
Paragraph
|
|
75
72
|
} from "./chunk-WMPWWFUJ.js";
|
|
@@ -79,6 +76,9 @@ import {
|
|
|
79
76
|
import {
|
|
80
77
|
Icon
|
|
81
78
|
} from "./chunk-NKUETCDA.js";
|
|
79
|
+
import {
|
|
80
|
+
Button
|
|
81
|
+
} from "./chunk-45AHDOAU.js";
|
|
82
82
|
import {
|
|
83
83
|
componentGap,
|
|
84
84
|
componentPadding,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PdfPage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VJVY6NPF.js";
|
|
4
4
|
import {
|
|
5
5
|
Spinner
|
|
6
6
|
} from "./chunk-SBRRNFOP.js";
|
|
@@ -9,7 +9,8 @@ import {
|
|
|
9
9
|
} from "./chunk-TPXH53SA.js";
|
|
10
10
|
|
|
11
11
|
// src/components/PDFViewer/PDFElement.tsx
|
|
12
|
-
import {
|
|
12
|
+
import { usePdf } from "@mikecousins/react-pdf";
|
|
13
|
+
import { useRef } from "react";
|
|
13
14
|
import clsx from "clsx";
|
|
14
15
|
import { jsx } from "react/jsx-runtime";
|
|
15
16
|
function PDFElement({
|
|
@@ -17,35 +18,10 @@ function PDFElement({
|
|
|
17
18
|
testid,
|
|
18
19
|
isMobile,
|
|
19
20
|
error
|
|
20
|
-
}) {
|
|
21
|
-
const [pdfHook, setPDFHook] = useState(null);
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
import("@mikecousins/react-pdf").then((m) => setPDFHook(m.usePdf));
|
|
24
|
-
}, []);
|
|
25
|
-
if (pdfHook === null) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return /* @__PURE__ */ jsx(
|
|
29
|
-
PDFElementInternal,
|
|
30
|
-
{
|
|
31
|
-
b64,
|
|
32
|
-
testid,
|
|
33
|
-
isMobile,
|
|
34
|
-
error,
|
|
35
|
-
usePDF: pdfHook
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
function PDFElementInternal({
|
|
40
|
-
b64,
|
|
41
|
-
testid,
|
|
42
|
-
isMobile,
|
|
43
|
-
error,
|
|
44
|
-
usePDF
|
|
45
21
|
}) {
|
|
46
22
|
var _a;
|
|
47
23
|
const canvasRef = useRef(null);
|
|
48
|
-
const { pdfDocument } =
|
|
24
|
+
const { pdfDocument } = usePdf({
|
|
49
25
|
file: `data:application/pdf;base64,${b64}`,
|
|
50
26
|
workerSrc: "/scripts/pdf.worker.min.mjs",
|
|
51
27
|
scale: isMobile ? 1 : 1.3,
|
|
@@ -70,7 +46,6 @@ function PDFElementInternal({
|
|
|
70
46
|
children: /* @__PURE__ */ jsx(
|
|
71
47
|
PdfPage,
|
|
72
48
|
{
|
|
73
|
-
usePDF,
|
|
74
49
|
testid: testid ? `${testid}-pdf_page_${i + 1}` : void 0,
|
|
75
50
|
file: `data:application/pdf;base64,${b64}`,
|
|
76
51
|
pageNumber: i + 1
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// src/components/PDFViewer/PDFPage.tsx
|
|
2
|
+
import { usePdf } from "@mikecousins/react-pdf";
|
|
2
3
|
import { useRef } from "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
function PdfPage({
|
|
5
6
|
file,
|
|
6
7
|
pageNumber,
|
|
7
8
|
testid,
|
|
8
|
-
isMobile
|
|
9
|
-
usePDF
|
|
9
|
+
isMobile
|
|
10
10
|
}) {
|
|
11
11
|
const canvasRef = useRef(null);
|
|
12
|
-
const { pdfDocument } =
|
|
12
|
+
const { pdfDocument } = usePdf({
|
|
13
13
|
file,
|
|
14
14
|
page: pageNumber,
|
|
15
15
|
canvasRef,
|
package/dist/components/Alert.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Alert
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-SPJ6V6WJ.js";
|
|
4
4
|
import "../chunk-MXSJF6TW.js";
|
|
5
|
-
import "../chunk-45AHDOAU.js";
|
|
6
5
|
import "../chunk-WMPWWFUJ.js";
|
|
7
6
|
import "../chunk-TPXH53SA.js";
|
|
8
7
|
import "../chunk-NKUETCDA.js";
|
|
8
|
+
import "../chunk-45AHDOAU.js";
|
|
9
9
|
import "../chunk-7KWFEH56.js";
|
|
10
10
|
import "../chunk-ORMEWXMH.js";
|
|
11
11
|
export {
|
|
@@ -64,7 +64,7 @@ __export(CalendarRange_exports, {
|
|
|
64
64
|
isWeekend: () => isWeekend
|
|
65
65
|
});
|
|
66
66
|
module.exports = __toCommonJS(CalendarRange_exports);
|
|
67
|
-
var
|
|
67
|
+
var import_clsx39 = __toESM(require("clsx"), 1);
|
|
68
68
|
|
|
69
69
|
// src/classNames.ts
|
|
70
70
|
var import_clsx = __toESM(require("clsx"), 1);
|
|
@@ -242,7 +242,7 @@ function Icon(_a) {
|
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
// src/components/CalendarRange.tsx
|
|
245
|
-
var
|
|
245
|
+
var import_react37 = __toESM(require("react"), 1);
|
|
246
246
|
var import_polyfill = require("@js-temporal/polyfill");
|
|
247
247
|
|
|
248
248
|
// src/components/DataGridCell.tsx
|
|
@@ -5127,68 +5127,15 @@ var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
|
5127
5127
|
var import_clsx35 = __toESM(require("clsx"), 1);
|
|
5128
5128
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5129
5129
|
|
|
5130
|
-
// src/components/
|
|
5131
|
-
var import_react35 = require("react");
|
|
5132
|
-
|
|
5133
|
-
// src/components/PDFViewer/PDFElement.tsx
|
|
5134
|
-
var import_react34 = require("react");
|
|
5135
|
-
|
|
5136
|
-
// src/components/Spinner.tsx
|
|
5137
|
-
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5138
|
-
var Spinner = ({ size = "small", testid }) => {
|
|
5139
|
-
const dimension = size === "large" ? 48 : 24;
|
|
5140
|
-
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
5141
|
-
"svg",
|
|
5142
|
-
{
|
|
5143
|
-
"data-testid": testid,
|
|
5144
|
-
width: dimension,
|
|
5145
|
-
height: dimension,
|
|
5146
|
-
viewBox: "0 0 24 24",
|
|
5147
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
5148
|
-
fill: "#1D1E1E",
|
|
5149
|
-
className: "spinner",
|
|
5150
|
-
"aria-label": "Loading",
|
|
5151
|
-
children: [
|
|
5152
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: "12", cy: "4", r: "2", opacity: "1" }),
|
|
5153
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: "17.666", cy: "6.334", r: "2", opacity: "0.125" }),
|
|
5154
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: "20", cy: "12", r: "2", opacity: "0.25" }),
|
|
5155
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: "17.666", cy: "17.666", r: "2", opacity: "0.375" }),
|
|
5156
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: "12", cy: "20", r: "2", opacity: "0.5" }),
|
|
5157
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: "6.334", cy: "17.666", r: "2", opacity: "0.625" }),
|
|
5158
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: "4", cy: "12", r: "2", opacity: "0.75" }),
|
|
5159
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("circle", { cx: "6.334", cy: "6.334", r: "2", opacity: "0.875" })
|
|
5160
|
-
]
|
|
5161
|
-
}
|
|
5162
|
-
);
|
|
5163
|
-
};
|
|
5164
|
-
Spinner.displayName = "Spinner";
|
|
5165
|
-
|
|
5166
|
-
// src/components/PDFViewer/PDFPage.tsx
|
|
5130
|
+
// src/components/ListGroup.tsx
|
|
5167
5131
|
var import_react33 = require("react");
|
|
5168
|
-
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5169
|
-
|
|
5170
|
-
// src/components/PDFViewer/PDFElement.tsx
|
|
5171
5132
|
var import_clsx36 = __toESM(require("clsx"), 1);
|
|
5172
|
-
var
|
|
5173
|
-
|
|
5174
|
-
// src/components/PDFViewer/DownloadIcon.tsx
|
|
5175
|
-
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5176
|
-
|
|
5177
|
-
// src/components/PDFViewer/PDFNavigation.tsx
|
|
5178
|
-
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5179
|
-
|
|
5180
|
-
// src/components/PDFViewer/index.tsx
|
|
5181
|
-
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5182
|
-
|
|
5183
|
-
// src/components/ListGroup.tsx
|
|
5184
|
-
var import_react36 = require("react");
|
|
5185
|
-
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
5186
|
-
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5133
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5187
5134
|
|
|
5188
5135
|
// src/components/Pagination.tsx
|
|
5189
|
-
var
|
|
5190
|
-
var
|
|
5191
|
-
var
|
|
5136
|
+
var import_react34 = require("react");
|
|
5137
|
+
var import_clsx37 = __toESM(require("clsx"), 1);
|
|
5138
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
5192
5139
|
var Pagination = ({
|
|
5193
5140
|
totalPages,
|
|
5194
5141
|
currentPage,
|
|
@@ -5198,7 +5145,7 @@ var Pagination = ({
|
|
|
5198
5145
|
className,
|
|
5199
5146
|
disabled
|
|
5200
5147
|
}) => {
|
|
5201
|
-
const goTo = (0,
|
|
5148
|
+
const goTo = (0, import_react34.useCallback)(
|
|
5202
5149
|
(page) => {
|
|
5203
5150
|
if (disabled) return;
|
|
5204
5151
|
onPageChange(page);
|
|
@@ -5215,7 +5162,7 @@ var Pagination = ({
|
|
|
5215
5162
|
goTo(currentPage + 1);
|
|
5216
5163
|
}
|
|
5217
5164
|
};
|
|
5218
|
-
const pageTokens = (0,
|
|
5165
|
+
const pageTokens = (0, import_react34.useMemo)(() => {
|
|
5219
5166
|
if (totalPages <= 5) {
|
|
5220
5167
|
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
5221
5168
|
}
|
|
@@ -5252,7 +5199,7 @@ var Pagination = ({
|
|
|
5252
5199
|
return tokens;
|
|
5253
5200
|
}, [totalPages, currentPage]);
|
|
5254
5201
|
if (totalPages <= 1) return null;
|
|
5255
|
-
const buttonClass = (0,
|
|
5202
|
+
const buttonClass = (0, import_clsx37.default)(
|
|
5256
5203
|
"cursor-pointer disabled:cursor-default",
|
|
5257
5204
|
paddingUsingComponentGap,
|
|
5258
5205
|
"w-8 h-8",
|
|
@@ -5263,14 +5210,14 @@ var Pagination = ({
|
|
|
5263
5210
|
"focus:bg-background-grouped-secondary-normal focus:outline-0",
|
|
5264
5211
|
"disabled:bg-transparent disabled:text-text-action-primary-disabled"
|
|
5265
5212
|
);
|
|
5266
|
-
return /* @__PURE__ */ (0,
|
|
5213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
5267
5214
|
"nav",
|
|
5268
5215
|
{
|
|
5269
5216
|
id,
|
|
5270
5217
|
"data-testid": testid,
|
|
5271
5218
|
"aria-label": "Pagination",
|
|
5272
5219
|
onKeyDown: handleKey,
|
|
5273
|
-
className: (0,
|
|
5220
|
+
className: (0, import_clsx37.default)(
|
|
5274
5221
|
"flex items-center",
|
|
5275
5222
|
"border border-border-primary-normal",
|
|
5276
5223
|
"bg-background-grouped-primary-normal",
|
|
@@ -5278,19 +5225,19 @@ var Pagination = ({
|
|
|
5278
5225
|
className
|
|
5279
5226
|
),
|
|
5280
5227
|
children: [
|
|
5281
|
-
/* @__PURE__ */ (0,
|
|
5228
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5282
5229
|
"button",
|
|
5283
5230
|
{
|
|
5284
5231
|
disabled: disabled || currentPage <= 1,
|
|
5285
5232
|
"aria-label": "Previous page",
|
|
5286
5233
|
onClick: () => goTo(currentPage - 1),
|
|
5287
|
-
className: (0,
|
|
5288
|
-
children: /* @__PURE__ */ (0,
|
|
5234
|
+
className: (0, import_clsx37.default)(buttonClass, "border-r-1 border-border-primary-normal"),
|
|
5235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon, { name: "keyboard_arrow_left" })
|
|
5289
5236
|
}
|
|
5290
5237
|
),
|
|
5291
|
-
/* @__PURE__ */ (0,
|
|
5238
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("ul", { className: (0, import_clsx37.default)("flex items-center"), children: pageTokens.map((token, index) => {
|
|
5292
5239
|
if (token === "ellipsis") {
|
|
5293
|
-
return /* @__PURE__ */ (0,
|
|
5240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5294
5241
|
"li",
|
|
5295
5242
|
{
|
|
5296
5243
|
className: "w-8 h-8 select-none text-text-action-primary-disabled",
|
|
@@ -5300,29 +5247,29 @@ var Pagination = ({
|
|
|
5300
5247
|
);
|
|
5301
5248
|
}
|
|
5302
5249
|
const selected = token === currentPage;
|
|
5303
|
-
return /* @__PURE__ */ (0,
|
|
5250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5304
5251
|
"button",
|
|
5305
5252
|
{
|
|
5306
5253
|
"aria-label": `Page ${token}`,
|
|
5307
5254
|
"aria-current": selected ? "page" : void 0,
|
|
5308
5255
|
disabled,
|
|
5309
5256
|
onClick: () => goTo(token),
|
|
5310
|
-
className: (0,
|
|
5257
|
+
className: (0, import_clsx37.default)(
|
|
5311
5258
|
buttonClass,
|
|
5312
5259
|
selected && "border-x-1 bg-background-grouped-secondary-normal border-border-primary-normal"
|
|
5313
5260
|
),
|
|
5314
|
-
children: /* @__PURE__ */ (0,
|
|
5261
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Subheader, { align: "center", weight: "bold", children: token })
|
|
5315
5262
|
}
|
|
5316
5263
|
) }, token);
|
|
5317
5264
|
}) }),
|
|
5318
|
-
/* @__PURE__ */ (0,
|
|
5265
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5319
5266
|
"button",
|
|
5320
5267
|
{
|
|
5321
5268
|
disabled: disabled || currentPage >= totalPages,
|
|
5322
5269
|
"aria-label": "Next page",
|
|
5323
5270
|
onClick: () => goTo(currentPage + 1),
|
|
5324
|
-
className: (0,
|
|
5325
|
-
children: /* @__PURE__ */ (0,
|
|
5271
|
+
className: (0, import_clsx37.default)(buttonClass, "border-l-1 border-border-primary-normal"),
|
|
5272
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon, { name: "keyboard_arrow_right" })
|
|
5326
5273
|
}
|
|
5327
5274
|
)
|
|
5328
5275
|
]
|
|
@@ -5332,25 +5279,25 @@ var Pagination = ({
|
|
|
5332
5279
|
Pagination.displayName = "Pagination";
|
|
5333
5280
|
|
|
5334
5281
|
// src/components/SkeletonParagraph.tsx
|
|
5335
|
-
var
|
|
5282
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5336
5283
|
|
|
5337
5284
|
// src/components/EmptyCartIcon.tsx
|
|
5338
|
-
var
|
|
5285
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5339
5286
|
|
|
5340
5287
|
// src/components/SearchResultImage/index.tsx
|
|
5341
|
-
var
|
|
5342
|
-
var
|
|
5288
|
+
var import_react35 = require("react");
|
|
5289
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5343
5290
|
|
|
5344
5291
|
// src/components/Alert.tsx
|
|
5345
|
-
var
|
|
5346
|
-
var
|
|
5347
|
-
var
|
|
5292
|
+
var import_clsx38 = __toESM(require("clsx"), 1);
|
|
5293
|
+
var import_react36 = require("react");
|
|
5294
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5348
5295
|
|
|
5349
5296
|
// src/components/OrderCheckIcon.tsx
|
|
5350
|
-
var
|
|
5297
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5351
5298
|
|
|
5352
5299
|
// src/components/CalendarRange.tsx
|
|
5353
|
-
var
|
|
5300
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5354
5301
|
function isWeekend(date) {
|
|
5355
5302
|
return date.dayOfWeek === 6 || date.dayOfWeek === 7;
|
|
5356
5303
|
}
|
|
@@ -5388,12 +5335,12 @@ function DateCell(_a) {
|
|
|
5388
5335
|
"id",
|
|
5389
5336
|
"testid"
|
|
5390
5337
|
]);
|
|
5391
|
-
return /* @__PURE__ */ (0,
|
|
5338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5392
5339
|
"span",
|
|
5393
5340
|
__spreadProps(__spreadValues({}, props), {
|
|
5394
5341
|
id,
|
|
5395
5342
|
"data-testid": testid,
|
|
5396
|
-
className: (0,
|
|
5343
|
+
className: (0, import_clsx39.default)(
|
|
5397
5344
|
"flex items-center justify-center aspect-square select-none transition-colors border duration-100 font-medium",
|
|
5398
5345
|
typography.caption,
|
|
5399
5346
|
cellPadding,
|
|
@@ -5464,20 +5411,20 @@ function CalendarRange({
|
|
|
5464
5411
|
const fromDate = parseDate(from);
|
|
5465
5412
|
const toDate = parseDate(to);
|
|
5466
5413
|
const today = import_polyfill.Temporal.Now.plainDateISO();
|
|
5467
|
-
const [baseMonth, setBaseMonth] = (0,
|
|
5414
|
+
const [baseMonth, setBaseMonth] = (0, import_react37.useState)(
|
|
5468
5415
|
fromDate != null ? fromDate : today.with({ day: 1 })
|
|
5469
5416
|
);
|
|
5470
|
-
const [selecting, setSelecting] = (0,
|
|
5471
|
-
const [pendingFrom, setPendingFrom] = (0,
|
|
5472
|
-
const [hoveredDate, setHoveredDate] = (0,
|
|
5473
|
-
(0,
|
|
5417
|
+
const [selecting, setSelecting] = (0, import_react37.useState)("from");
|
|
5418
|
+
const [pendingFrom, setPendingFrom] = (0, import_react37.useState)(void 0);
|
|
5419
|
+
const [hoveredDate, setHoveredDate] = (0, import_react37.useState)(void 0);
|
|
5420
|
+
(0, import_react37.useEffect)(() => {
|
|
5474
5421
|
if (fromDate) {
|
|
5475
5422
|
setBaseMonth(fromDate.with({ day: 1 }));
|
|
5476
5423
|
} else if (toDate) {
|
|
5477
5424
|
setBaseMonth(toDate.with({ day: 1 }));
|
|
5478
5425
|
}
|
|
5479
5426
|
}, [from, to]);
|
|
5480
|
-
(0,
|
|
5427
|
+
(0, import_react37.useEffect)(() => {
|
|
5481
5428
|
if (fromDate && toDate) {
|
|
5482
5429
|
setSelecting("from");
|
|
5483
5430
|
setPendingFrom(void 0);
|
|
@@ -5544,12 +5491,12 @@ function CalendarRange({
|
|
|
5544
5491
|
}
|
|
5545
5492
|
return false;
|
|
5546
5493
|
}
|
|
5547
|
-
return /* @__PURE__ */ (0,
|
|
5494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5548
5495
|
"div",
|
|
5549
5496
|
{
|
|
5550
5497
|
id,
|
|
5551
5498
|
"data-testid": testid,
|
|
5552
|
-
className: (0,
|
|
5499
|
+
className: (0, import_clsx39.default)(
|
|
5553
5500
|
"relative bg-background-grouped-primary-normal rounded-base w-fit",
|
|
5554
5501
|
layoutPaddding,
|
|
5555
5502
|
layoutGap,
|
|
@@ -5557,15 +5504,15 @@ function CalendarRange({
|
|
|
5557
5504
|
// baseTransition,
|
|
5558
5505
|
"overflow-hidden"
|
|
5559
5506
|
),
|
|
5560
|
-
children: /* @__PURE__ */ (0,
|
|
5507
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5561
5508
|
"div",
|
|
5562
5509
|
{
|
|
5563
|
-
className: (0,
|
|
5510
|
+
className: (0, import_clsx39.default)(
|
|
5564
5511
|
"flex flex-row items-start justify-start bg-background-primary-normal overflow-clip",
|
|
5565
5512
|
layoutGap
|
|
5566
5513
|
),
|
|
5567
5514
|
children: (mode === "double" ? [0, 1] : [0]).map((offset, idx) => {
|
|
5568
|
-
return /* @__PURE__ */ (0,
|
|
5515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5569
5516
|
CalendarPane,
|
|
5570
5517
|
{
|
|
5571
5518
|
getMonthData,
|
|
@@ -5623,45 +5570,45 @@ function CalendarPane({
|
|
|
5623
5570
|
const years = Array.from({ length: 100 }).map(
|
|
5624
5571
|
(_, i) => baseMonth.year - 50 + i
|
|
5625
5572
|
);
|
|
5626
|
-
const [monthMenuOpen, setMonthMenuOpen] = (0,
|
|
5627
|
-
const [yearMenuOpen, setYearMenuOpen] = (0,
|
|
5628
|
-
const monthMenuRef = (0,
|
|
5629
|
-
const yearMenuRef = (0,
|
|
5573
|
+
const [monthMenuOpen, setMonthMenuOpen] = (0, import_react37.useState)(false);
|
|
5574
|
+
const [yearMenuOpen, setYearMenuOpen] = (0, import_react37.useState)(false);
|
|
5575
|
+
const monthMenuRef = (0, import_react37.useRef)(null);
|
|
5576
|
+
const yearMenuRef = (0, import_react37.useRef)(null);
|
|
5630
5577
|
const month = getMonthData(offset);
|
|
5631
5578
|
const totalCells = 42;
|
|
5632
5579
|
const emptyCells = month.firstDayOffset;
|
|
5633
|
-
return /* @__PURE__ */ (0,
|
|
5634
|
-
/* @__PURE__ */ (0,
|
|
5580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react37.default.Fragment, { children: [
|
|
5581
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
5635
5582
|
"div",
|
|
5636
5583
|
{
|
|
5637
|
-
className: (0,
|
|
5584
|
+
className: (0, import_clsx39.default)("flex flex-col"),
|
|
5638
5585
|
children: [
|
|
5639
|
-
/* @__PURE__ */ (0,
|
|
5586
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
5640
5587
|
"div",
|
|
5641
5588
|
{
|
|
5642
|
-
className: (0,
|
|
5589
|
+
className: (0, import_clsx39.default)(
|
|
5643
5590
|
"flex flex-row items-center justify-between",
|
|
5644
5591
|
typography.label,
|
|
5645
5592
|
"text-text-action-primary-normal"
|
|
5646
5593
|
),
|
|
5647
5594
|
children: [
|
|
5648
|
-
idx === 0 ? /* @__PURE__ */ (0,
|
|
5595
|
+
idx === 0 ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5649
5596
|
"button",
|
|
5650
5597
|
{
|
|
5651
5598
|
id: id ? `${id}-prev-month-button` : void 0,
|
|
5652
5599
|
"data-testid": testid ? `${testid}-prev-month-button` : void 0,
|
|
5653
5600
|
type: "button",
|
|
5654
|
-
className: (0,
|
|
5601
|
+
className: (0, import_clsx39.default)(
|
|
5655
5602
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
5656
5603
|
componentPadding
|
|
5657
5604
|
),
|
|
5658
5605
|
"aria-label": "Previous month",
|
|
5659
5606
|
onClick: () => setBaseMonth(baseMonth.subtract({ months: 1 })),
|
|
5660
|
-
children: /* @__PURE__ */ (0,
|
|
5607
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { name: "chevron_left", size: 24 })
|
|
5661
5608
|
}
|
|
5662
|
-
) : /* @__PURE__ */ (0,
|
|
5663
|
-
/* @__PURE__ */ (0,
|
|
5664
|
-
/* @__PURE__ */ (0,
|
|
5609
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: (0, import_clsx39.default)(componentPadding, "mr-1") }),
|
|
5610
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex gap-desktop-compact-component-padding", children: [
|
|
5611
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5665
5612
|
"button",
|
|
5666
5613
|
{
|
|
5667
5614
|
ref: (el) => {
|
|
@@ -5676,13 +5623,13 @@ function CalendarPane({
|
|
|
5676
5623
|
children: month.name
|
|
5677
5624
|
}
|
|
5678
5625
|
),
|
|
5679
|
-
/* @__PURE__ */ (0,
|
|
5626
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5680
5627
|
Menu,
|
|
5681
5628
|
{
|
|
5682
5629
|
show: monthMenuOpen,
|
|
5683
5630
|
positionTo: monthMenuRef,
|
|
5684
5631
|
setShow: () => setMonthMenuOpen(false),
|
|
5685
|
-
children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0,
|
|
5632
|
+
children: months.map((x) => [x, getMonthDataWith(x + 1)]).map(([x, m]) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5686
5633
|
MenuOption,
|
|
5687
5634
|
{
|
|
5688
5635
|
selected: baseMonth.month === x + 1,
|
|
@@ -5696,7 +5643,7 @@ function CalendarPane({
|
|
|
5696
5643
|
))
|
|
5697
5644
|
}
|
|
5698
5645
|
),
|
|
5699
|
-
/* @__PURE__ */ (0,
|
|
5646
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5700
5647
|
"button",
|
|
5701
5648
|
{
|
|
5702
5649
|
ref: (el) => {
|
|
@@ -5711,13 +5658,13 @@ function CalendarPane({
|
|
|
5711
5658
|
children: month.year
|
|
5712
5659
|
}
|
|
5713
5660
|
),
|
|
5714
|
-
/* @__PURE__ */ (0,
|
|
5661
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5715
5662
|
Menu,
|
|
5716
5663
|
{
|
|
5717
5664
|
show: yearMenuOpen,
|
|
5718
5665
|
positionTo: yearMenuRef,
|
|
5719
5666
|
setShow: () => setYearMenuOpen(false),
|
|
5720
|
-
children: years.map((y) => /* @__PURE__ */ (0,
|
|
5667
|
+
children: years.map((y) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5721
5668
|
MenuOption,
|
|
5722
5669
|
{
|
|
5723
5670
|
selected: baseMonth.year === y,
|
|
@@ -5732,28 +5679,28 @@ function CalendarPane({
|
|
|
5732
5679
|
}
|
|
5733
5680
|
)
|
|
5734
5681
|
] }),
|
|
5735
|
-
(mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0,
|
|
5682
|
+
(mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5736
5683
|
"button",
|
|
5737
5684
|
{
|
|
5738
5685
|
id: id ? `${id}-next-month-button` : void 0,
|
|
5739
5686
|
"data-testid": testid ? `${testid}-next-month-button` : void 0,
|
|
5740
5687
|
type: "button",
|
|
5741
|
-
className: (0,
|
|
5688
|
+
className: (0, import_clsx39.default)(
|
|
5742
5689
|
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-action-primary-normal",
|
|
5743
5690
|
componentPadding
|
|
5744
5691
|
),
|
|
5745
5692
|
"aria-label": "Next month",
|
|
5746
5693
|
onClick: () => setBaseMonth(baseMonth.add({ months: 1 })),
|
|
5747
|
-
children: /* @__PURE__ */ (0,
|
|
5694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { name: "chevron_right", size: 24 })
|
|
5748
5695
|
}
|
|
5749
|
-
) : /* @__PURE__ */ (0,
|
|
5696
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: (0, import_clsx39.default)(componentPadding, "ml-1") })
|
|
5750
5697
|
]
|
|
5751
5698
|
}
|
|
5752
5699
|
),
|
|
5753
|
-
/* @__PURE__ */ (0,
|
|
5700
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: (0, import_clsx39.default)("grid grid-cols-7"), children: weekDays.map((d) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5754
5701
|
"span",
|
|
5755
5702
|
{
|
|
5756
|
-
className: (0,
|
|
5703
|
+
className: (0, import_clsx39.default)(
|
|
5757
5704
|
typography.caption,
|
|
5758
5705
|
"text-text-secondary-normal text-center",
|
|
5759
5706
|
"w-10"
|
|
@@ -5762,7 +5709,7 @@ function CalendarPane({
|
|
|
5762
5709
|
},
|
|
5763
5710
|
d
|
|
5764
5711
|
)) }),
|
|
5765
|
-
/* @__PURE__ */ (0,
|
|
5712
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: (0, import_clsx39.default)("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
|
|
5766
5713
|
const day = i - emptyCells + 1;
|
|
5767
5714
|
const date = month.date.with({ day: 1 }).add({
|
|
5768
5715
|
days: i - emptyCells
|
|
@@ -5776,7 +5723,7 @@ function CalendarPane({
|
|
|
5776
5723
|
const hoverDateIsAfterPendingFrom = hoveredDate && pendingFrom && import_polyfill.Temporal.PlainDate.compare(hoveredDate, pendingFrom) >= 0;
|
|
5777
5724
|
const isRangeStart = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && fromDate && date.equals(fromDate) || hoverDateIsAfterPendingFrom && date.equals(pendingFrom);
|
|
5778
5725
|
const isRangeEnd = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && toDate && date.equals(toDate) || hoverDateIsBeforePendingFrom && date.equals(pendingFrom);
|
|
5779
|
-
return /* @__PURE__ */ (0,
|
|
5726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5780
5727
|
DateCell,
|
|
5781
5728
|
{
|
|
5782
5729
|
id: id ? `${id}-date-${date.toString()}` : void 0,
|
|
@@ -5801,10 +5748,10 @@ function CalendarPane({
|
|
|
5801
5748
|
]
|
|
5802
5749
|
}
|
|
5803
5750
|
),
|
|
5804
|
-
mode === "double" && idx === 0 && /* @__PURE__ */ (0,
|
|
5751
|
+
mode === "double" && idx === 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5805
5752
|
"div",
|
|
5806
5753
|
{
|
|
5807
|
-
className: (0,
|
|
5754
|
+
className: (0, import_clsx39.default)(
|
|
5808
5755
|
"self-stretch bg-border-primary-normal rounded-base",
|
|
5809
5756
|
// 1px width, full height, matches Figma divider
|
|
5810
5757
|
"w-px"
|