@dmsi/wedgekit-react 0.0.140 → 0.0.141
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-4OS6APPF.js → chunk-4LXG6QNT.js} +2 -1
- package/dist/{chunk-KS4RDR6P.js → chunk-4NCDT5ZY.js} +21 -8
- package/dist/{chunk-R5TLUWDD.js → chunk-4T3DRGLF.js} +32 -30
- package/dist/{chunk-QZGUMB7T.js → chunk-4VTOTNKJ.js} +3 -0
- package/dist/{chunk-Y4HUYAI5.js → chunk-56Y5DDG3.js} +5 -2
- package/dist/{chunk-D2YP2BTN.js → chunk-5GOJRLQO.js} +10 -4
- package/dist/{chunk-J6LETUNM.js → chunk-AZ7LVLOK.js} +5 -2
- package/dist/{chunk-TTO4PL7Y.js → chunk-BATIOCXB.js} +7 -4
- package/dist/{chunk-CG2NIXZE.js → chunk-C4JGTH6G.js} +7 -3
- package/dist/{chunk-O4M2GISS.js → chunk-CYZL57LH.js} +5 -2
- package/dist/{chunk-6HIALT5L.js → chunk-E7D24OHM.js} +14 -5
- package/dist/{chunk-3ZUSYRI7.js → chunk-EPQLWHCL.js} +2 -2
- package/dist/{chunk-AY7ELVQY.js → chunk-EUXB3XKL.js} +5 -2
- package/dist/{chunk-6DONKNDT.js → chunk-EWGHVZL5.js} +2 -0
- package/dist/{chunk-VH3EJNVE.js → chunk-FFU6FB3K.js} +6 -3
- package/dist/{chunk-H6LXXGX6.js → chunk-FKMKHLQH.js} +6 -3
- package/dist/{chunk-4F6VQXKY.js → chunk-GG5JOFS6.js} +2 -1
- package/dist/{chunk-XCIBYDVK.js → chunk-GXSXCEAA.js} +25 -14
- package/dist/{chunk-VG4EPHJA.js → chunk-HVI3CL7Y.js} +6 -3
- package/dist/{chunk-AOELEEUS.js → chunk-I6GEUF6Y.js} +6 -3
- package/dist/{chunk-Z36QJ7ZF.js → chunk-J4E6Q5TM.js} +12 -9
- package/dist/{chunk-S5K22XTH.js → chunk-JWCT72WR.js} +5 -2
- package/dist/{chunk-QNQ5K7NW.js → chunk-LM5MKBPM.js} +8 -3
- package/dist/{chunk-EO3JJWFW.js → chunk-N6JVLYEE.js} +6 -3
- package/dist/{chunk-IGQVA7SC.js → chunk-NKUETCDA.js} +5 -2
- package/dist/{chunk-PCCJ7L3N.js → chunk-NMVSRA5Y.js} +12 -4
- package/dist/{chunk-X62XGQY7.js → chunk-NW2C4DL4.js} +18 -15
- package/dist/{chunk-OB3URVCR.js → chunk-PMBEIP24.js} +5 -1
- package/dist/{chunk-6UI5GABI.js → chunk-R7ELP5C5.js} +8 -5
- package/dist/{chunk-FWPJ73IK.js → chunk-SYEJVSE4.js} +3 -1
- package/dist/{chunk-WT5XXW6G.js → chunk-WFQEE2OO.js} +9 -4
- package/dist/{chunk-QTD7K43M.js → chunk-WSS2DFTP.js} +8 -6
- package/dist/{chunk-37TJJQL3.js → chunk-YR7JUKYO.js} +3 -0
- package/dist/{chunk-4JLU7TAC.js → chunk-ZFOANBWG.js} +3 -1
- package/dist/{chunk-P242H6OU.js → chunk-ZGFQN47L.js} +5 -2
- package/dist/components/AccessChangerTabItem.cjs +10 -4
- package/dist/components/AccessChangerTabItem.js +2 -2
- package/dist/components/Accordion.cjs +23 -11
- package/dist/components/Accordion.js +5 -5
- package/dist/components/Breadcrumbs.cjs +19 -8
- package/dist/components/Breadcrumbs.js +10 -5
- package/dist/components/Button.cjs +6 -3
- package/dist/components/Button.js +1 -1
- package/dist/components/CalendarRange.cjs +16 -5
- package/dist/components/CalendarRange.js +2 -2
- package/dist/components/Caption.cjs +18 -6
- package/dist/components/Caption.js +2 -2
- package/dist/components/Card.cjs +2 -1
- package/dist/components/Card.js +1 -1
- package/dist/components/Checkbox.cjs +18 -7
- package/dist/components/Checkbox.js +3 -3
- package/dist/components/ContentTab.cjs +22 -16
- package/dist/components/ContentTab.js +2 -2
- package/dist/components/ContentTabs.cjs +27 -18
- package/dist/components/ContentTabs.js +7 -4
- package/dist/components/DataGridCell.cjs +73 -39
- package/dist/components/DataGridCell.js +8 -8
- package/dist/components/DateInput.cjs +55 -35
- package/dist/components/DateInput.js +8 -4
- package/dist/components/DateRangeInput.cjs +55 -35
- package/dist/components/DateRangeInput.js +8 -4
- package/dist/components/Display.cjs +5 -2
- package/dist/components/Display.js +1 -1
- package/dist/components/FilterGroup.cjs +85 -44
- package/dist/components/FilterGroup.js +20 -10
- package/dist/components/FullViewportBox.cjs +3 -1
- package/dist/components/FullViewportBox.js +3 -1
- package/dist/components/Grid.cjs +3 -1
- package/dist/components/Grid.js +3 -1
- package/dist/components/Heading.cjs +5 -2
- package/dist/components/Heading.js +1 -1
- package/dist/components/HorizontalDivider.cjs +2 -2
- package/dist/components/HorizontalDivider.js +1 -1
- package/dist/components/Icon.cjs +5 -2
- package/dist/components/Icon.js +1 -1
- package/dist/components/Input.cjs +40 -32
- package/dist/components/Input.js +3 -3
- package/dist/components/InputGroup.cjs +11 -4
- package/dist/components/InputGroup.js +7 -3
- package/dist/components/Label.cjs +5 -2
- package/dist/components/Label.js +1 -1
- package/dist/components/Link.cjs +6 -3
- package/dist/components/Link.js +1 -1
- package/dist/components/List.cjs +3 -2
- package/dist/components/List.js +3 -2
- package/dist/components/LoadingScrim.cjs +4 -2
- package/dist/components/LoadingScrim.js +3 -2
- package/dist/components/MainBar.cjs +2 -0
- package/dist/components/MainBar.js +2 -0
- package/dist/components/Menu.cjs +3 -0
- package/dist/components/Menu.js +1 -1
- package/dist/components/MenuOption.cjs +19 -7
- package/dist/components/MenuOption.js +4 -4
- package/dist/components/MobileDataGrid.cjs +42 -18
- package/dist/components/MobileDataGrid.js +18 -11
- package/dist/components/Modal.cjs +38 -12
- package/dist/components/Modal.js +8 -8
- package/dist/components/ModalButtons.cjs +16 -6
- package/dist/components/ModalButtons.js +3 -3
- package/dist/components/ModalContent.cjs +3 -1
- package/dist/components/ModalContent.js +1 -1
- package/dist/components/ModalHeader.cjs +21 -9
- package/dist/components/ModalHeader.js +4 -4
- package/dist/components/ModalScrim.cjs +3 -1
- package/dist/components/ModalScrim.js +1 -1
- package/dist/components/NavigationTab.cjs +14 -5
- package/dist/components/NavigationTab.js +3 -3
- package/dist/components/NavigationTabs.cjs +17 -6
- package/dist/components/NavigationTabs.js +6 -4
- package/dist/components/NestedMenu.cjs +23 -9
- package/dist/components/NestedMenu.js +8 -6
- package/dist/components/Notification.cjs +32 -13
- package/dist/components/Notification.js +9 -5
- package/dist/components/OptionPill.cjs +21 -7
- package/dist/components/OptionPill.js +4 -4
- package/dist/components/PDFViewer.cjs +73 -29
- package/dist/components/PDFViewer.js +26 -20
- package/dist/components/Paragraph.cjs +6 -3
- package/dist/components/Paragraph.js +1 -1
- package/dist/components/Password.cjs +50 -37
- package/dist/components/Password.js +13 -8
- package/dist/components/PaymentOnAccountModal.cjs +135 -69
- package/dist/components/PaymentOnAccountModal.js +21 -21
- package/dist/components/ProjectBar.cjs +3 -1
- package/dist/components/ProjectBar.js +3 -1
- package/dist/components/Radio.cjs +12 -6
- package/dist/components/Radio.js +2 -2
- package/dist/components/Search.cjs +44 -32
- package/dist/components/Search.js +4 -4
- package/dist/components/Select.cjs +43 -32
- package/dist/components/Select.js +4 -4
- package/dist/components/SelectPaymentMethod.cjs +67 -29
- package/dist/components/SelectPaymentMethod.js +12 -12
- package/dist/components/SideMenu.cjs +3 -1
- package/dist/components/SideMenu.js +3 -1
- package/dist/components/SideMenuGroup.cjs +19 -8
- package/dist/components/SideMenuGroup.js +6 -4
- package/dist/components/SideMenuItem.cjs +15 -6
- package/dist/components/SideMenuItem.js +5 -2
- package/dist/components/Spinner.cjs +2 -1
- package/dist/components/Spinner.js +1 -1
- package/dist/components/Stack.cjs +6 -3
- package/dist/components/Stack.js +1 -1
- package/dist/components/StatusPill.cjs +12 -6
- package/dist/components/StatusPill.js +8 -5
- package/dist/components/Stepper.cjs +54 -38
- package/dist/components/Stepper.js +12 -7
- package/dist/components/Subheader.cjs +5 -2
- package/dist/components/Subheader.js +1 -1
- package/dist/components/Swatch.cjs +22 -10
- package/dist/components/Swatch.js +4 -4
- package/dist/components/Textarea.cjs +4 -1
- package/dist/components/Textarea.js +4 -1
- package/dist/components/Theme.cjs +2 -0
- package/dist/components/Theme.js +1 -1
- package/dist/components/Time.cjs +52 -36
- package/dist/components/Time.js +10 -5
- package/dist/components/Toast.cjs +29 -12
- package/dist/components/Toast.js +11 -6
- package/dist/components/Tooltip.cjs +3 -0
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/TopBar.cjs +11 -4
- package/dist/components/TopBar.js +11 -4
- package/dist/components/Upload.cjs +30 -15
- package/dist/components/Upload.js +16 -10
- package/dist/components/index.cjs +221 -84
- package/dist/components/index.js +80 -38
- package/dist/index.css +24 -4
- package/package.json +1 -1
- package/src/components/Accordion.tsx +5 -2
- package/src/components/Breadcrumbs.tsx +9 -2
- package/src/components/Button.tsx +4 -1
- package/src/components/CalendarRange.tsx +9 -0
- package/src/components/Caption.tsx +11 -1
- package/src/components/Card.tsx +3 -2
- package/src/components/Checkbox.tsx +5 -0
- package/src/components/ContentTab.tsx +14 -12
- package/src/components/ContentTabs.tsx +6 -2
- package/src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx +4 -1
- package/src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx +7 -0
- package/src/components/DataGrid/PinnedColumns.tsx +8 -1
- package/src/components/DataGrid/TableBody/LoadingCell.tsx +7 -3
- package/src/components/DataGrid/TableBody/TableBodyRow.tsx +7 -1
- package/src/components/DataGrid/TableBody/index.tsx +7 -1
- package/src/components/DataGrid/index.tsx +18 -2
- package/src/components/DataGrid/types.ts +1 -0
- package/src/components/DataGridCell.tsx +12 -0
- package/src/components/DateInput.tsx +4 -0
- package/src/components/DateRangeInput.tsx +4 -0
- package/src/components/Display.tsx +3 -0
- package/src/components/FilterGroup.tsx +10 -0
- package/src/components/FullViewportBox.tsx +3 -0
- package/src/components/Grid.tsx +3 -0
- package/src/components/Heading.tsx +3 -0
- package/src/components/HorizontalDivider.tsx +2 -2
- package/src/components/Icon.tsx +3 -0
- package/src/components/Input.tsx +32 -36
- package/src/components/InputGroup.tsx +6 -2
- package/src/components/Label.tsx +3 -0
- package/src/components/Link.tsx +3 -0
- package/src/components/List.tsx +3 -1
- package/src/components/LoadingScrim.tsx +2 -1
- package/src/components/MainBar.tsx +3 -0
- package/src/components/Menu.tsx +3 -0
- package/src/components/MenuOption.tsx +4 -0
- package/src/components/MobileDataGrid.tsx +12 -3
- package/src/components/Modal.tsx +7 -0
- package/src/components/ModalButtons.tsx +5 -0
- package/src/components/ModalContent.tsx +3 -0
- package/src/components/ModalHeader.tsx +5 -1
- package/src/components/ModalScrim.tsx +3 -0
- package/src/components/NavigationTab.tsx +3 -0
- package/src/components/NavigationTabs.tsx +7 -3
- package/src/components/NestedMenu.tsx +5 -2
- package/src/components/Notification.tsx +4 -0
- package/src/components/OptionPill.tsx +5 -0
- package/src/components/PDFViewer.tsx +16 -8
- package/src/components/Paragraph.tsx +3 -0
- package/src/components/Password.tsx +7 -2
- package/src/components/PaymentOnAccountModal.tsx +6 -2
- package/src/components/ProjectBar.tsx +3 -0
- package/src/components/Radio.tsx +4 -1
- package/src/components/Search.tsx +5 -0
- package/src/components/Select.tsx +4 -0
- package/src/components/SelectPaymentMethod.tsx +17 -3
- package/src/components/SideMenu.tsx +3 -0
- package/src/components/SideMenuGroup.tsx +4 -1
- package/src/components/SideMenuItem.tsx +4 -0
- package/src/components/Spinner.tsx +3 -1
- package/src/components/Stack.tsx +3 -0
- package/src/components/StatusPill.tsx +4 -1
- package/src/components/Stepper.tsx +6 -1
- package/src/components/Subheader.tsx +3 -0
- package/src/components/Textarea.tsx +4 -1
- package/src/components/Theme.tsx +3 -0
- package/src/components/Time.tsx +7 -1
- package/src/components/Toast.tsx +8 -3
- package/src/components/Tooltip.tsx +4 -0
- package/src/components/TopBar.tsx +7 -2
- package/src/components/Upload.tsx +10 -4
|
@@ -209,7 +209,8 @@ var Heading = (_a) => {
|
|
|
209
209
|
color,
|
|
210
210
|
align,
|
|
211
211
|
variant = "heading1",
|
|
212
|
-
id
|
|
212
|
+
id,
|
|
213
|
+
testid
|
|
213
214
|
} = _b, props = __objRest(_b, [
|
|
214
215
|
"className",
|
|
215
216
|
"children",
|
|
@@ -217,7 +218,8 @@ var Heading = (_a) => {
|
|
|
217
218
|
"color",
|
|
218
219
|
"align",
|
|
219
220
|
"variant",
|
|
220
|
-
"id"
|
|
221
|
+
"id",
|
|
222
|
+
"testid"
|
|
221
223
|
]);
|
|
222
224
|
const defaultElement = variant === "heading1" ? "h1" : variant === "heading2" ? "h2" : "h3";
|
|
223
225
|
const Element = as != null ? as : defaultElement;
|
|
@@ -225,6 +227,7 @@ var Heading = (_a) => {
|
|
|
225
227
|
Element,
|
|
226
228
|
__spreadProps(__spreadValues({
|
|
227
229
|
id,
|
|
230
|
+
"data-testid": testid,
|
|
228
231
|
className: (0, import_clsx2.default)(
|
|
229
232
|
typography[variant],
|
|
230
233
|
className,
|
|
@@ -265,7 +268,8 @@ var Button = (_a) => {
|
|
|
265
268
|
iconOnly = false,
|
|
266
269
|
colorClassName,
|
|
267
270
|
href,
|
|
268
|
-
id
|
|
271
|
+
id,
|
|
272
|
+
testid
|
|
269
273
|
} = _b, props = __objRest(_b, [
|
|
270
274
|
"variant",
|
|
271
275
|
"as",
|
|
@@ -279,7 +283,8 @@ var Button = (_a) => {
|
|
|
279
283
|
"iconOnly",
|
|
280
284
|
"colorClassName",
|
|
281
285
|
"href",
|
|
282
|
-
"id"
|
|
286
|
+
"id",
|
|
287
|
+
"testid"
|
|
283
288
|
]);
|
|
284
289
|
const primaryVariantStyles = variant === "primary" && (0, import_clsx3.default)(
|
|
285
290
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
@@ -367,6 +372,7 @@ var Button = (_a) => {
|
|
|
367
372
|
Element,
|
|
368
373
|
__spreadProps(__spreadValues({
|
|
369
374
|
id,
|
|
375
|
+
"data-testid": testid,
|
|
370
376
|
type: Element === "button" ? "button" : void 0,
|
|
371
377
|
className: buttonClasses
|
|
372
378
|
}, props), {
|
|
@@ -376,7 +382,7 @@ var Button = (_a) => {
|
|
|
376
382
|
"data-theme": variant === "navigation" ? "brand" : void 0,
|
|
377
383
|
children: [
|
|
378
384
|
leftIcon && leftIcon,
|
|
379
|
-
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { id: id ? `${id}-label` : void 0, className: labelClasses, children }),
|
|
385
|
+
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { id: id ? `${id}-label` : void 0, "data-testid": testid ? `${testid}-label` : void 0, className: labelClasses, children }),
|
|
380
386
|
rightIcon && rightIcon
|
|
381
387
|
]
|
|
382
388
|
})
|
|
@@ -391,17 +397,20 @@ function Icon(_a) {
|
|
|
391
397
|
var _b = _a, {
|
|
392
398
|
name,
|
|
393
399
|
size = 24,
|
|
394
|
-
variant = "outline"
|
|
400
|
+
variant = "outline",
|
|
401
|
+
testid
|
|
395
402
|
} = _b, props = __objRest(_b, [
|
|
396
403
|
"name",
|
|
397
404
|
"size",
|
|
398
|
-
"variant"
|
|
405
|
+
"variant",
|
|
406
|
+
"testid"
|
|
399
407
|
]);
|
|
400
408
|
const variantStyle = variant === "filled" ? '"FILL" 1' : '"FILL" 0';
|
|
401
409
|
const weightStyle = size === 16 ? '"wght" 400' : '"wght" 300';
|
|
402
410
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
403
411
|
"span",
|
|
404
412
|
__spreadProps(__spreadValues({}, props), {
|
|
413
|
+
"data-testid": testid,
|
|
405
414
|
className: (0, import_clsx4.default)(
|
|
406
415
|
"icon",
|
|
407
416
|
`icon-${size}`,
|
|
@@ -424,12 +433,14 @@ var ModalHeader = ({
|
|
|
424
433
|
hideCloseIcon,
|
|
425
434
|
headerIcon,
|
|
426
435
|
onClose,
|
|
427
|
-
id
|
|
436
|
+
id,
|
|
437
|
+
testid
|
|
428
438
|
}) => {
|
|
429
439
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
430
440
|
"div",
|
|
431
441
|
{
|
|
432
442
|
id,
|
|
443
|
+
"data-testid": testid,
|
|
433
444
|
className: (0, import_clsx5.default)(
|
|
434
445
|
"flex justify-between items-center",
|
|
435
446
|
layoutPaddding,
|
|
@@ -438,12 +449,13 @@ var ModalHeader = ({
|
|
|
438
449
|
children: [
|
|
439
450
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: (0, import_clsx5.default)("flex items-center", layoutGroupGap), children: [
|
|
440
451
|
headerIcon,
|
|
441
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Heading2, { id: id ? `${id}-title` : void 0, as: "p", children: title })
|
|
452
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Heading2, { id: id ? `${id}-title` : void 0, testid: testid ? `${testid}-title` : void 0, as: "p", children: title })
|
|
442
453
|
] }),
|
|
443
454
|
!hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
444
455
|
Button,
|
|
445
456
|
{
|
|
446
457
|
id: id ? `${id}-close-button` : void 0,
|
|
458
|
+
testid: testid ? `${testid}-close-button` : void 0,
|
|
447
459
|
iconOnly: true,
|
|
448
460
|
variant: "tertiary",
|
|
449
461
|
onClick: onClose,
|
|
@@ -462,12 +474,14 @@ var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
|
462
474
|
function ModalContent({
|
|
463
475
|
fixedHeightScrolling,
|
|
464
476
|
children,
|
|
465
|
-
id
|
|
477
|
+
id,
|
|
478
|
+
testid
|
|
466
479
|
}) {
|
|
467
480
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
468
481
|
"div",
|
|
469
482
|
{
|
|
470
483
|
id,
|
|
484
|
+
"data-testid": testid,
|
|
471
485
|
className: (0, import_clsx6.default)(
|
|
472
486
|
"flex-grow desktop:flex-grow-0",
|
|
473
487
|
layoutPaddding,
|
|
@@ -486,12 +500,14 @@ var ModalButtons = ({
|
|
|
486
500
|
onClose,
|
|
487
501
|
onContinue,
|
|
488
502
|
customActions,
|
|
489
|
-
id
|
|
503
|
+
id,
|
|
504
|
+
testid
|
|
490
505
|
}) => {
|
|
491
506
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
492
507
|
"div",
|
|
493
508
|
{
|
|
494
509
|
id,
|
|
510
|
+
"data-testid": testid,
|
|
495
511
|
className: (0, import_clsx7.default)(
|
|
496
512
|
"border-t border-neutral-300 flex justify-end",
|
|
497
513
|
layoutPaddding,
|
|
@@ -502,6 +518,7 @@ var ModalButtons = ({
|
|
|
502
518
|
Button,
|
|
503
519
|
{
|
|
504
520
|
id: id ? `${id}-close-button` : void 0,
|
|
521
|
+
testid: testid ? `${testid}-close-button` : void 0,
|
|
505
522
|
variant: "secondary",
|
|
506
523
|
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "close", size: 24 }),
|
|
507
524
|
onClick: onClose,
|
|
@@ -513,6 +530,7 @@ var ModalButtons = ({
|
|
|
513
530
|
Button,
|
|
514
531
|
{
|
|
515
532
|
id: id ? `${id}-continue-button` : void 0,
|
|
533
|
+
testid: testid ? `${testid}-continue-button` : void 0,
|
|
516
534
|
variant: "primary",
|
|
517
535
|
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { name: "check", size: 24 }),
|
|
518
536
|
className: "max-sm:w-full",
|
|
@@ -535,12 +553,14 @@ var ModalScrim = ({
|
|
|
535
553
|
children,
|
|
536
554
|
onClick,
|
|
537
555
|
ref,
|
|
538
|
-
id
|
|
556
|
+
id,
|
|
557
|
+
testid
|
|
539
558
|
}) => {
|
|
540
559
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
541
560
|
"div",
|
|
542
561
|
{
|
|
543
562
|
id,
|
|
563
|
+
"data-testid": testid,
|
|
544
564
|
className: (0, import_clsx8.default)(
|
|
545
565
|
"overflow-y-auto h-screen transition-[visibility,opacity,background] ease-in-out duration-100 grid place-content-center desktop:p-4 group bg-neutral-600/50 fixed opacity-0",
|
|
546
566
|
!show && " pointer-events-none",
|
|
@@ -677,6 +697,7 @@ var sizes = {
|
|
|
677
697
|
};
|
|
678
698
|
var Modal = ({
|
|
679
699
|
id,
|
|
700
|
+
testid,
|
|
680
701
|
title,
|
|
681
702
|
open = false,
|
|
682
703
|
size = "small",
|
|
@@ -785,6 +806,7 @@ var Modal = ({
|
|
|
785
806
|
ModalScrim,
|
|
786
807
|
{
|
|
787
808
|
id: id ? `${id}-scrim` : void 0,
|
|
809
|
+
testid: testid ? `${testid}-scrim` : void 0,
|
|
788
810
|
size,
|
|
789
811
|
ref: bgRef,
|
|
790
812
|
show: open,
|
|
@@ -793,6 +815,7 @@ var Modal = ({
|
|
|
793
815
|
"div",
|
|
794
816
|
{
|
|
795
817
|
id,
|
|
818
|
+
"data-testid": testid,
|
|
796
819
|
ref: modalRef,
|
|
797
820
|
className: (0, import_clsx9.default)(
|
|
798
821
|
"bg-white shadow-md rounded-sm flex flex-col overflow-hidden w-full opacity-0 h-fit",
|
|
@@ -806,6 +829,7 @@ var Modal = ({
|
|
|
806
829
|
ModalHeader,
|
|
807
830
|
{
|
|
808
831
|
id: id ? `${id}-header` : void 0,
|
|
832
|
+
testid: testid ? `${testid}-header` : void 0,
|
|
809
833
|
title,
|
|
810
834
|
onClose: handleClose,
|
|
811
835
|
hideCloseIcon,
|
|
@@ -816,6 +840,7 @@ var Modal = ({
|
|
|
816
840
|
ModalContent,
|
|
817
841
|
{
|
|
818
842
|
id: id ? `${id}-content` : void 0,
|
|
843
|
+
testid: testid ? `${testid}-content` : void 0,
|
|
819
844
|
fixedHeightScrolling: computedFixedHeightScrolling,
|
|
820
845
|
children
|
|
821
846
|
}
|
|
@@ -824,6 +849,7 @@ var Modal = ({
|
|
|
824
849
|
ModalButtons,
|
|
825
850
|
{
|
|
826
851
|
id: id ? `${id}-buttons` : void 0,
|
|
852
|
+
testid: testid ? `${testid}-buttons` : void 0,
|
|
827
853
|
onClose: handleClose,
|
|
828
854
|
onContinue,
|
|
829
855
|
customActions
|
|
@@ -901,7 +927,8 @@ var Stack = (_a) => {
|
|
|
901
927
|
id,
|
|
902
928
|
noGap,
|
|
903
929
|
marginTop,
|
|
904
|
-
marginBottom
|
|
930
|
+
marginBottom,
|
|
931
|
+
testid
|
|
905
932
|
} = _b, props = __objRest(_b, [
|
|
906
933
|
"children",
|
|
907
934
|
"items",
|
|
@@ -937,14 +964,16 @@ var Stack = (_a) => {
|
|
|
937
964
|
"id",
|
|
938
965
|
"noGap",
|
|
939
966
|
"marginTop",
|
|
940
|
-
"marginBottom"
|
|
967
|
+
"marginBottom",
|
|
968
|
+
"testid"
|
|
941
969
|
]);
|
|
942
970
|
const flexClassNames = getFlexClassNames({ items, justify, grow });
|
|
943
971
|
const gapClassNames = useGapClassNames(sizing);
|
|
944
972
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
945
973
|
"div",
|
|
946
974
|
__spreadProps(__spreadValues({
|
|
947
|
-
id
|
|
975
|
+
id,
|
|
976
|
+
"data-testid": testid
|
|
948
977
|
}, props), {
|
|
949
978
|
style: {
|
|
950
979
|
height: height === "full" ? "100%" : height !== void 0 ? `${height}px` : void 0,
|
|
@@ -1017,7 +1046,8 @@ var Caption = (_a) => {
|
|
|
1017
1046
|
style = "default",
|
|
1018
1047
|
color,
|
|
1019
1048
|
align,
|
|
1020
|
-
id
|
|
1049
|
+
id,
|
|
1050
|
+
testid
|
|
1021
1051
|
} = _b, props = __objRest(_b, [
|
|
1022
1052
|
"className",
|
|
1023
1053
|
"children",
|
|
@@ -1025,14 +1055,16 @@ var Caption = (_a) => {
|
|
|
1025
1055
|
"style",
|
|
1026
1056
|
"color",
|
|
1027
1057
|
"align",
|
|
1028
|
-
"id"
|
|
1058
|
+
"id",
|
|
1059
|
+
"testid"
|
|
1029
1060
|
]);
|
|
1030
1061
|
const Element = as;
|
|
1031
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { id, className: "flex gap-1", children: [
|
|
1062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { id, "data-testid": testid, className: "flex gap-1", children: [
|
|
1032
1063
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1033
1064
|
WhichIcon,
|
|
1034
1065
|
{
|
|
1035
1066
|
id,
|
|
1067
|
+
testid,
|
|
1036
1068
|
style,
|
|
1037
1069
|
size: 16,
|
|
1038
1070
|
className: "mt-[3px] desktop:mt-0"
|
|
@@ -1042,6 +1074,7 @@ var Caption = (_a) => {
|
|
|
1042
1074
|
Element,
|
|
1043
1075
|
__spreadProps(__spreadValues({
|
|
1044
1076
|
id: id ? `${id}-text` : void 0,
|
|
1077
|
+
"data-testid": testid ? `${testid}-text` : void 0,
|
|
1045
1078
|
className: (0, import_clsx11.default)(
|
|
1046
1079
|
typography.caption.replace("text-text-primary-normal", ""),
|
|
1047
1080
|
(style === "default" || style === "info") && "text-text-secondary-normal",
|
|
@@ -1066,13 +1099,15 @@ var WhichIcon = ({
|
|
|
1066
1099
|
style,
|
|
1067
1100
|
size,
|
|
1068
1101
|
className,
|
|
1069
|
-
id
|
|
1102
|
+
id,
|
|
1103
|
+
testid
|
|
1070
1104
|
}) => {
|
|
1071
1105
|
if (style === "success") {
|
|
1072
1106
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-icon-success-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1073
1107
|
Icon,
|
|
1074
1108
|
{
|
|
1075
1109
|
id: id ? `${id}-icon` : void 0,
|
|
1110
|
+
testid: testid ? `${testid}-icon` : void 0,
|
|
1076
1111
|
className,
|
|
1077
1112
|
name: "check_circle",
|
|
1078
1113
|
size
|
|
@@ -1084,6 +1119,7 @@ var WhichIcon = ({
|
|
|
1084
1119
|
Icon,
|
|
1085
1120
|
{
|
|
1086
1121
|
id: id ? `${id}-icon` : void 0,
|
|
1122
|
+
testid: testid ? `${testid}-icon` : void 0,
|
|
1087
1123
|
className,
|
|
1088
1124
|
name: "warning",
|
|
1089
1125
|
size
|
|
@@ -1095,6 +1131,7 @@ var WhichIcon = ({
|
|
|
1095
1131
|
Icon,
|
|
1096
1132
|
{
|
|
1097
1133
|
id: id ? `${id}-icon` : void 0,
|
|
1134
|
+
testid: testid ? `${testid}-icon` : void 0,
|
|
1098
1135
|
className,
|
|
1099
1136
|
name: "info",
|
|
1100
1137
|
size
|
|
@@ -1106,6 +1143,7 @@ var WhichIcon = ({
|
|
|
1106
1143
|
Icon,
|
|
1107
1144
|
{
|
|
1108
1145
|
id: id ? `${id}-icon` : void 0,
|
|
1146
|
+
testid: testid ? `${testid}-icon` : void 0,
|
|
1109
1147
|
className,
|
|
1110
1148
|
name: "info",
|
|
1111
1149
|
size
|
|
@@ -1119,7 +1157,7 @@ Caption.displayName = "Caption";
|
|
|
1119
1157
|
// src/components/PDFViewer.tsx
|
|
1120
1158
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1121
1159
|
function PDFViewer(props) {
|
|
1122
|
-
const { isOpen, onClose, encodedPdfs, customActions } = props;
|
|
1160
|
+
const { isOpen, onClose, encodedPdfs, customActions, testid } = props;
|
|
1123
1161
|
const [currentIndex, setCurrentIndex] = (0, import_react6.useState)(0);
|
|
1124
1162
|
const [isDownloading, setIsDownloading] = (0, import_react6.useState)(false);
|
|
1125
1163
|
const handleDownload = (0, import_react6.useCallback)(() => {
|
|
@@ -1136,16 +1174,18 @@ function PDFViewer(props) {
|
|
|
1136
1174
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1137
1175
|
Modal,
|
|
1138
1176
|
{
|
|
1177
|
+
testid,
|
|
1139
1178
|
open: isOpen,
|
|
1140
1179
|
onClose,
|
|
1141
1180
|
showButtons: !!customActions,
|
|
1142
1181
|
customActions,
|
|
1143
|
-
headerIcon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DownloadIcon, { onClick: handleDownload, isDownloading }),
|
|
1182
|
+
headerIcon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DownloadIcon, { testid: testid ? `${testid}-download-icon` : void 0, onClick: handleDownload, isDownloading }),
|
|
1144
1183
|
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Stack, { sizing: "layout", children: [
|
|
1145
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PDFElement, { b64: encodedPdfs[currentIndex].base64 }),
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PDFElement, { testid, b64: encodedPdfs[currentIndex].base64 }),
|
|
1146
1185
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Stack, { horizontal: true, overflowX: "auto", sizing: "layout-group", children: encodedPdfs.map((pdf, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1147
1186
|
Button,
|
|
1148
1187
|
{
|
|
1188
|
+
testid: testid ? `${testid}-${pdf.fileName}-button` : void 0,
|
|
1149
1189
|
variant: index === currentIndex ? "primary" : "secondary",
|
|
1150
1190
|
onClick: (e) => {
|
|
1151
1191
|
setCurrentIndex(index);
|
|
@@ -1169,11 +1209,13 @@ function PDFViewer(props) {
|
|
|
1169
1209
|
}
|
|
1170
1210
|
function DownloadIcon({
|
|
1171
1211
|
onClick,
|
|
1172
|
-
isDownloading
|
|
1212
|
+
isDownloading,
|
|
1213
|
+
testid
|
|
1173
1214
|
}) {
|
|
1174
1215
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1175
1216
|
Button,
|
|
1176
1217
|
{
|
|
1218
|
+
testid,
|
|
1177
1219
|
iconOnly: true,
|
|
1178
1220
|
variant: "tertiary",
|
|
1179
1221
|
leftIcon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon, { name: isDownloading ? "cached" : "download" }),
|
|
@@ -1181,7 +1223,7 @@ function DownloadIcon({
|
|
|
1181
1223
|
}
|
|
1182
1224
|
);
|
|
1183
1225
|
}
|
|
1184
|
-
function PDFElement({ b64 }) {
|
|
1226
|
+
function PDFElement({ b64, testid }) {
|
|
1185
1227
|
const [page, setPage] = (0, import_react6.useState)(1);
|
|
1186
1228
|
const canvasRef = (0, import_react6.useRef)(null);
|
|
1187
1229
|
const { pdfDocument } = (0, import_react_pdf.usePdf)({
|
|
@@ -1192,26 +1234,28 @@ function PDFElement({ b64 }) {
|
|
|
1192
1234
|
scale: 1
|
|
1193
1235
|
});
|
|
1194
1236
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex flex-col space-y-4", children: [
|
|
1195
|
-
pdfDocument ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("canvas", { ref: canvasRef }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { children: "Loading PDF..." }),
|
|
1196
|
-
(pdfDocument == null ? void 0 : pdfDocument.numPages) && pdfDocument.numPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("ul", { className: "flex flex-row justify-between items-center", children: [
|
|
1237
|
+
pdfDocument ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("canvas", { "data-testid": testid ? `${testid}-pdf-content` : void 0, ref: canvasRef }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { "data-testid": testid ? `${testid}-pdf-loading` : void 0, children: "Loading PDF..." }),
|
|
1238
|
+
(pdfDocument == null ? void 0 : pdfDocument.numPages) && pdfDocument.numPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("ul", { className: "flex flex-row justify-between items-center", "data-testid": testid ? `${testid}-pdf-pagination` : void 0, children: [
|
|
1197
1239
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { className: "previous", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1198
1240
|
"button",
|
|
1199
1241
|
{
|
|
1242
|
+
"data-testid": testid ? `${testid}-pdf-pagination-previous-button` : void 0,
|
|
1200
1243
|
disabled: page === 1,
|
|
1201
1244
|
onClick: () => setPage(page - 1),
|
|
1202
1245
|
className: "not-disabled:cursor-pointer not-disabled:hover:underline ",
|
|
1203
1246
|
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Caption, { children: "Previous" })
|
|
1204
1247
|
}
|
|
1205
1248
|
) }),
|
|
1206
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { className: "text-label-desktop text-text-on-action-primary-normal", children: [
|
|
1249
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("li", { "data-testid": testid ? `${testid}-pdf-pagination-text` : void 0, className: "text-label-desktop text-text-on-action-primary-normal", children: [
|
|
1207
1250
|
"Page ",
|
|
1208
|
-
page,
|
|
1251
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "data-testid": testid ? `${testid}-pdf-pagination-page-${page}` : void 0, children: page }),
|
|
1209
1252
|
" of ",
|
|
1210
|
-
pdfDocument.numPages
|
|
1253
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "data-testid": testid ? `${testid}-pdf-pagination-total-page-${pdfDocument.numPages}` : void 0, children: pdfDocument.numPages })
|
|
1211
1254
|
] }),
|
|
1212
1255
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { className: "next", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1213
1256
|
"button",
|
|
1214
1257
|
{
|
|
1258
|
+
"data-testid": testid ? `${testid}-pdf-pagination-next-button` : void 0,
|
|
1215
1259
|
disabled: page === pdfDocument.numPages,
|
|
1216
1260
|
onClick: () => setPage(page + 1),
|
|
1217
1261
|
className: "not-disabled:cursor-pointer not-disabled:hover:underline ",
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Modal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-5GOJRLQO.js";
|
|
5
5
|
import "../chunk-4RJKB7LC.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-C4JGTH6G.js";
|
|
7
|
+
import "../chunk-SYEJVSE4.js";
|
|
8
|
+
import "../chunk-R7ELP5C5.js";
|
|
9
|
+
import "../chunk-ZFOANBWG.js";
|
|
10
|
+
import "../chunk-AZ7LVLOK.js";
|
|
11
11
|
import {
|
|
12
12
|
Caption
|
|
13
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-E7D24OHM.js";
|
|
14
14
|
import "../chunk-WNQ53SVY.js";
|
|
15
15
|
import "../chunk-4T7F5BZZ.js";
|
|
16
16
|
import {
|
|
17
17
|
Stack
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-N6JVLYEE.js";
|
|
19
19
|
import {
|
|
20
20
|
Button
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-FKMKHLQH.js";
|
|
22
22
|
import {
|
|
23
23
|
Icon
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-NKUETCDA.js";
|
|
25
25
|
import "../chunk-RDLEIAQU.js";
|
|
26
26
|
import "../chunk-ORMEWXMH.js";
|
|
27
27
|
|
|
@@ -30,7 +30,7 @@ import { usePdf } from "@mikecousins/react-pdf";
|
|
|
30
30
|
import { useCallback, useRef, useState } from "react";
|
|
31
31
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
32
32
|
function PDFViewer(props) {
|
|
33
|
-
const { isOpen, onClose, encodedPdfs, customActions } = props;
|
|
33
|
+
const { isOpen, onClose, encodedPdfs, customActions, testid } = props;
|
|
34
34
|
const [currentIndex, setCurrentIndex] = useState(0);
|
|
35
35
|
const [isDownloading, setIsDownloading] = useState(false);
|
|
36
36
|
const handleDownload = useCallback(() => {
|
|
@@ -47,16 +47,18 @@ function PDFViewer(props) {
|
|
|
47
47
|
return /* @__PURE__ */ jsx(
|
|
48
48
|
Modal,
|
|
49
49
|
{
|
|
50
|
+
testid,
|
|
50
51
|
open: isOpen,
|
|
51
52
|
onClose,
|
|
52
53
|
showButtons: !!customActions,
|
|
53
54
|
customActions,
|
|
54
|
-
headerIcon: /* @__PURE__ */ jsx(DownloadIcon, { onClick: handleDownload, isDownloading }),
|
|
55
|
+
headerIcon: /* @__PURE__ */ jsx(DownloadIcon, { testid: testid ? `${testid}-download-icon` : void 0, onClick: handleDownload, isDownloading }),
|
|
55
56
|
children: /* @__PURE__ */ jsxs(Stack, { sizing: "layout", children: [
|
|
56
|
-
/* @__PURE__ */ jsx(PDFElement, { b64: encodedPdfs[currentIndex].base64 }),
|
|
57
|
+
/* @__PURE__ */ jsx(PDFElement, { testid, b64: encodedPdfs[currentIndex].base64 }),
|
|
57
58
|
/* @__PURE__ */ jsx(Stack, { horizontal: true, overflowX: "auto", sizing: "layout-group", children: encodedPdfs.map((pdf, index) => /* @__PURE__ */ jsx(
|
|
58
59
|
Button,
|
|
59
60
|
{
|
|
61
|
+
testid: testid ? `${testid}-${pdf.fileName}-button` : void 0,
|
|
60
62
|
variant: index === currentIndex ? "primary" : "secondary",
|
|
61
63
|
onClick: (e) => {
|
|
62
64
|
setCurrentIndex(index);
|
|
@@ -80,11 +82,13 @@ function PDFViewer(props) {
|
|
|
80
82
|
}
|
|
81
83
|
function DownloadIcon({
|
|
82
84
|
onClick,
|
|
83
|
-
isDownloading
|
|
85
|
+
isDownloading,
|
|
86
|
+
testid
|
|
84
87
|
}) {
|
|
85
88
|
return /* @__PURE__ */ jsx(
|
|
86
89
|
Button,
|
|
87
90
|
{
|
|
91
|
+
testid,
|
|
88
92
|
iconOnly: true,
|
|
89
93
|
variant: "tertiary",
|
|
90
94
|
leftIcon: /* @__PURE__ */ jsx(Icon, { name: isDownloading ? "cached" : "download" }),
|
|
@@ -92,7 +96,7 @@ function DownloadIcon({
|
|
|
92
96
|
}
|
|
93
97
|
);
|
|
94
98
|
}
|
|
95
|
-
function PDFElement({ b64 }) {
|
|
99
|
+
function PDFElement({ b64, testid }) {
|
|
96
100
|
const [page, setPage] = useState(1);
|
|
97
101
|
const canvasRef = useRef(null);
|
|
98
102
|
const { pdfDocument } = usePdf({
|
|
@@ -103,26 +107,28 @@ function PDFElement({ b64 }) {
|
|
|
103
107
|
scale: 1
|
|
104
108
|
});
|
|
105
109
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-4", children: [
|
|
106
|
-
pdfDocument ? /* @__PURE__ */ jsx("canvas", { ref: canvasRef }) : /* @__PURE__ */ jsx("div", { children: "Loading PDF..." }),
|
|
107
|
-
(pdfDocument == null ? void 0 : pdfDocument.numPages) && pdfDocument.numPages > 1 && /* @__PURE__ */ jsxs("ul", { className: "flex flex-row justify-between items-center", children: [
|
|
110
|
+
pdfDocument ? /* @__PURE__ */ jsx("canvas", { "data-testid": testid ? `${testid}-pdf-content` : void 0, ref: canvasRef }) : /* @__PURE__ */ jsx("div", { "data-testid": testid ? `${testid}-pdf-loading` : void 0, children: "Loading PDF..." }),
|
|
111
|
+
(pdfDocument == null ? void 0 : pdfDocument.numPages) && pdfDocument.numPages > 1 && /* @__PURE__ */ jsxs("ul", { className: "flex flex-row justify-between items-center", "data-testid": testid ? `${testid}-pdf-pagination` : void 0, children: [
|
|
108
112
|
/* @__PURE__ */ jsx("li", { className: "previous", children: /* @__PURE__ */ jsx(
|
|
109
113
|
"button",
|
|
110
114
|
{
|
|
115
|
+
"data-testid": testid ? `${testid}-pdf-pagination-previous-button` : void 0,
|
|
111
116
|
disabled: page === 1,
|
|
112
117
|
onClick: () => setPage(page - 1),
|
|
113
118
|
className: "not-disabled:cursor-pointer not-disabled:hover:underline ",
|
|
114
119
|
children: /* @__PURE__ */ jsx(Caption, { children: "Previous" })
|
|
115
120
|
}
|
|
116
121
|
) }),
|
|
117
|
-
/* @__PURE__ */ jsxs("li", { className: "text-label-desktop text-text-on-action-primary-normal", children: [
|
|
122
|
+
/* @__PURE__ */ jsxs("li", { "data-testid": testid ? `${testid}-pdf-pagination-text` : void 0, className: "text-label-desktop text-text-on-action-primary-normal", children: [
|
|
118
123
|
"Page ",
|
|
119
|
-
page,
|
|
124
|
+
/* @__PURE__ */ jsx("span", { "data-testid": testid ? `${testid}-pdf-pagination-page-${page}` : void 0, children: page }),
|
|
120
125
|
" of ",
|
|
121
|
-
pdfDocument.numPages
|
|
126
|
+
/* @__PURE__ */ jsx("span", { "data-testid": testid ? `${testid}-pdf-pagination-total-page-${pdfDocument.numPages}` : void 0, children: pdfDocument.numPages })
|
|
122
127
|
] }),
|
|
123
128
|
/* @__PURE__ */ jsx("li", { className: "next", children: /* @__PURE__ */ jsx(
|
|
124
129
|
"button",
|
|
125
130
|
{
|
|
131
|
+
"data-testid": testid ? `${testid}-pdf-pagination-next-button` : void 0,
|
|
126
132
|
disabled: page === pdfDocument.numPages,
|
|
127
133
|
onClick: () => setPage(page + 1),
|
|
128
134
|
className: "not-disabled:cursor-pointer not-disabled:hover:underline ",
|
|
@@ -202,7 +202,8 @@ var Paragraph = (_a) => {
|
|
|
202
202
|
addOverflow,
|
|
203
203
|
children,
|
|
204
204
|
as = "p",
|
|
205
|
-
id
|
|
205
|
+
id,
|
|
206
|
+
testid
|
|
206
207
|
} = _b, props = __objRest(_b, [
|
|
207
208
|
"className",
|
|
208
209
|
"color",
|
|
@@ -212,13 +213,15 @@ var Paragraph = (_a) => {
|
|
|
212
213
|
"addOverflow",
|
|
213
214
|
"children",
|
|
214
215
|
"as",
|
|
215
|
-
"id"
|
|
216
|
+
"id",
|
|
217
|
+
"testid"
|
|
216
218
|
]);
|
|
217
219
|
const Element = as;
|
|
218
220
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
219
221
|
Element,
|
|
220
222
|
__spreadProps(__spreadValues({
|
|
221
|
-
id
|
|
223
|
+
id,
|
|
224
|
+
"data-testid": testid
|
|
222
225
|
}, props), {
|
|
223
226
|
className: (0, import_clsx2.default)(
|
|
224
227
|
typography.paragraph,
|