@dmsi/wedgekit-react 0.0.140 → 0.0.142
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
package/src/components/Toast.tsx
CHANGED
|
@@ -11,6 +11,7 @@ import { componentGap, componentPadding, layoutGroupGap } from "../classNames";
|
|
|
11
11
|
|
|
12
12
|
export interface ToastProps {
|
|
13
13
|
id?: string;
|
|
14
|
+
testid?: string;
|
|
14
15
|
variant?: "success" | "warning" | "error" | "info";
|
|
15
16
|
title?: string;
|
|
16
17
|
message?: string;
|
|
@@ -116,6 +117,7 @@ function getToastRoot(): HTMLElement {
|
|
|
116
117
|
|
|
117
118
|
export const Toast = ({
|
|
118
119
|
id,
|
|
120
|
+
testid,
|
|
119
121
|
variant = "success",
|
|
120
122
|
title,
|
|
121
123
|
message,
|
|
@@ -195,6 +197,7 @@ export const Toast = ({
|
|
|
195
197
|
return (
|
|
196
198
|
<div
|
|
197
199
|
id={id}
|
|
200
|
+
data-testid={testid}
|
|
198
201
|
ref={toastElementRef}
|
|
199
202
|
onMouseEnter={handleMouseEnter}
|
|
200
203
|
onMouseLeave={handleMouseLeave}
|
|
@@ -211,10 +214,10 @@ export const Toast = ({
|
|
|
211
214
|
<div className={clsx("flex items-center", layoutGroupGap)}>
|
|
212
215
|
<div className={clsx("flex flex-col w-68", componentGap)}>
|
|
213
216
|
{title && (
|
|
214
|
-
<Heading3 id={id ? `${id}-title` : undefined}>{title}</Heading3>
|
|
217
|
+
<Heading3 testid={testid ? `${testid}-title` : undefined} id={id ? `${id}-title` : undefined}>{title}</Heading3>
|
|
215
218
|
)}
|
|
216
219
|
{message && (
|
|
217
|
-
<Paragraph id={id ? `${id}-message` : undefined}>
|
|
220
|
+
<Paragraph testid={testid ? `${testid}-message` : undefined} id={id ? `${id}-message` : undefined}>
|
|
218
221
|
{message}
|
|
219
222
|
</Paragraph>
|
|
220
223
|
)}
|
|
@@ -223,6 +226,7 @@ export const Toast = ({
|
|
|
223
226
|
{showViewButton && (
|
|
224
227
|
<Button
|
|
225
228
|
id={id ? `${id}-view-button` : undefined}
|
|
229
|
+
testid={testid ? `${testid}-view-button` : undefined}
|
|
226
230
|
variant="tertiary"
|
|
227
231
|
href={viewButtonLink}
|
|
228
232
|
>
|
|
@@ -236,7 +240,7 @@ export const Toast = ({
|
|
|
236
240
|
|
|
237
241
|
Toast.displayName = "Toast";
|
|
238
242
|
|
|
239
|
-
export function createToast(config: Omit<ToastProps, "id"> & { id?: string }) {
|
|
243
|
+
export function createToast(config: Omit<ToastProps, "id"> & { id?: string, testid?: string }) {
|
|
240
244
|
const toastRoot = getToastRoot();
|
|
241
245
|
const toastContainer = document.createElement("div");
|
|
242
246
|
toastRoot.appendChild(toastContainer);
|
|
@@ -251,6 +255,7 @@ export function createToast(config: Omit<ToastProps, "id"> & { id?: string }) {
|
|
|
251
255
|
root.render(
|
|
252
256
|
<Toast
|
|
253
257
|
id={config.id}
|
|
258
|
+
testid={config.testid}
|
|
254
259
|
show={true}
|
|
255
260
|
onClose={handleClose}
|
|
256
261
|
variant={config.variant}
|
|
@@ -13,6 +13,7 @@ import { componentPadding, typography } from "../classNames";
|
|
|
13
13
|
|
|
14
14
|
export type TooltipProps = PropsWithChildren<{
|
|
15
15
|
id?: string;
|
|
16
|
+
testid?: string;
|
|
16
17
|
message: string;
|
|
17
18
|
position?: "top" | "bottom" | "left" | "right";
|
|
18
19
|
children?: ReactNode;
|
|
@@ -22,6 +23,7 @@ export type TooltipProps = PropsWithChildren<{
|
|
|
22
23
|
|
|
23
24
|
export const Tooltip = ({
|
|
24
25
|
id,
|
|
26
|
+
testid,
|
|
25
27
|
message,
|
|
26
28
|
position = "top",
|
|
27
29
|
children,
|
|
@@ -99,6 +101,7 @@ export const Tooltip = ({
|
|
|
99
101
|
return (
|
|
100
102
|
<div
|
|
101
103
|
id={id}
|
|
104
|
+
data-testid={testid}
|
|
102
105
|
ref={ref}
|
|
103
106
|
className="relative inline-grid grid-cols-[auto_1fr] items-center"
|
|
104
107
|
onMouseEnter={handleMouseEnter}
|
|
@@ -111,6 +114,7 @@ export const Tooltip = ({
|
|
|
111
114
|
createPortal(
|
|
112
115
|
<div
|
|
113
116
|
id={id ? `${id}-message` : undefined}
|
|
117
|
+
data-testid={testid ? `${testid}-message` : undefined}
|
|
114
118
|
ref={tooltipRef}
|
|
115
119
|
style={{
|
|
116
120
|
position: "fixed",
|
|
@@ -26,13 +26,15 @@ export const TopBarBase = ({
|
|
|
26
26
|
mobileRight,
|
|
27
27
|
brandLogo = <LogoDMSiTopBar />,
|
|
28
28
|
id,
|
|
29
|
+
testid,
|
|
29
30
|
...props
|
|
30
|
-
}: TopBarProps & { id?: string }) => {
|
|
31
|
+
}: TopBarProps & { id?: string; testid?: string }) => {
|
|
31
32
|
const defaultStyles = clsx("bg-background-primary-normal");
|
|
32
33
|
|
|
33
34
|
return (
|
|
34
35
|
<div
|
|
35
36
|
id={id}
|
|
37
|
+
data-testid={testid}
|
|
36
38
|
className={clsx(
|
|
37
39
|
"flex items-center justify-between",
|
|
38
40
|
containerPaddingX,
|
|
@@ -101,17 +103,20 @@ export const TopBar = ({
|
|
|
101
103
|
left,
|
|
102
104
|
brandLogo = <LogoDMSiTopBar />,
|
|
103
105
|
id,
|
|
106
|
+
testid,
|
|
104
107
|
...props
|
|
105
|
-
}: TopBarProps & { brandLogo?: ReactNode; id?: string }) => {
|
|
108
|
+
}: TopBarProps & { brandLogo?: ReactNode; id?: string; testid?: string }) => {
|
|
106
109
|
return (
|
|
107
110
|
<TopBarBase
|
|
108
111
|
{...props}
|
|
109
112
|
id={id}
|
|
113
|
+
testid={testid}
|
|
110
114
|
brandLogo={brandLogo}
|
|
111
115
|
left={
|
|
112
116
|
<>
|
|
113
117
|
<a
|
|
114
118
|
id={id ? `${id}-brand-logo-link` : undefined}
|
|
119
|
+
data-testid={testid ? `${testid}-brand-logo-link` : undefined}
|
|
115
120
|
href="/"
|
|
116
121
|
className="grow max-w-[400px] h-auto max-h-10 *:max-h-[inherit]"
|
|
117
122
|
>
|
|
@@ -10,6 +10,7 @@ export type UploadProps = {
|
|
|
10
10
|
text?: string;
|
|
11
11
|
errorText?: string;
|
|
12
12
|
onRemove?: () => void;
|
|
13
|
+
testid?: string;
|
|
13
14
|
} & ComponentProps<"input">;
|
|
14
15
|
|
|
15
16
|
export function Upload(props: UploadProps) {
|
|
@@ -20,6 +21,7 @@ export function Upload(props: UploadProps) {
|
|
|
20
21
|
text = 'Upload your file',
|
|
21
22
|
value,
|
|
22
23
|
onRemove,
|
|
24
|
+
testid,
|
|
23
25
|
...rest
|
|
24
26
|
} = props;
|
|
25
27
|
|
|
@@ -37,30 +39,33 @@ export function Upload(props: UploadProps) {
|
|
|
37
39
|
"w-full h-[166px] desktop:w-[340px] desktop:h-[190px]",
|
|
38
40
|
componentGap,
|
|
39
41
|
)}
|
|
42
|
+
data-testid={testid}
|
|
40
43
|
>
|
|
41
44
|
<input
|
|
42
45
|
{...rest}
|
|
43
46
|
type="file"
|
|
44
47
|
className="sr-only"
|
|
48
|
+
data-testid={testid ? `${testid}-file-input` : undefined}
|
|
45
49
|
/>
|
|
46
50
|
|
|
47
51
|
{isLoading && (
|
|
48
52
|
<>
|
|
49
|
-
<Icon name="cached" className="text-icon-primary-normal animate-spin" />
|
|
50
|
-
<Paragraph color="text-secondary-normal">Loading...</Paragraph>
|
|
53
|
+
<Icon testid={testid ? `${testid}-loading-icon` : undefined} name="cached" className="text-icon-primary-normal animate-spin" />
|
|
54
|
+
<Paragraph testid={testid ? `${testid}-loading-text` : undefined} color="text-secondary-normal">Loading...</Paragraph>
|
|
51
55
|
</>
|
|
52
56
|
)}
|
|
53
57
|
|
|
54
58
|
{!value && !isLoading && (
|
|
55
59
|
<>
|
|
56
|
-
<Icon name="cloud_upload" className="text-icon-primary-normal" />
|
|
57
|
-
<Paragraph color={errorText ? 'text-primary-error' : 'text-secondary-normal'}>{errorText ? errorText : text}</Paragraph>
|
|
60
|
+
<Icon testid={testid ? `${testid}-icon` : undefined} name="cloud_upload" className="text-icon-primary-normal" />
|
|
61
|
+
<Paragraph testid={testid ? `${testid}-text` : undefined} color={errorText ? 'text-primary-error' : 'text-secondary-normal'}>{errorText ? errorText : text}</Paragraph>
|
|
58
62
|
</>
|
|
59
63
|
)}
|
|
60
64
|
|
|
61
65
|
{value && (
|
|
62
66
|
<>
|
|
63
67
|
<img
|
|
68
|
+
data-testid={testid ? `${testid}-uploaded-image` : undefined}
|
|
64
69
|
src={value as string}
|
|
65
70
|
alt=""
|
|
66
71
|
className="absolute inset-0 object-contain object-center max-h-full max-w-full self-center justify-self-center"
|
|
@@ -68,6 +73,7 @@ export function Upload(props: UploadProps) {
|
|
|
68
73
|
|
|
69
74
|
<div className="absolute right-2 top-2">
|
|
70
75
|
<Button
|
|
76
|
+
testid={testid ? `${testid}-remove-image-button` : undefined}
|
|
71
77
|
onClick={(e: MouseEvent) => {
|
|
72
78
|
e.preventDefault();
|
|
73
79
|
e.stopPropagation();
|