@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
|
@@ -254,7 +254,8 @@ var TopBarBase = (_a) => {
|
|
|
254
254
|
mobileLeft,
|
|
255
255
|
mobileRight,
|
|
256
256
|
brandLogo = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LogoDMSiTopBar, {}),
|
|
257
|
-
id
|
|
257
|
+
id,
|
|
258
|
+
testid
|
|
258
259
|
} = _b, props = __objRest(_b, [
|
|
259
260
|
"left",
|
|
260
261
|
"right",
|
|
@@ -262,13 +263,15 @@ var TopBarBase = (_a) => {
|
|
|
262
263
|
"mobileLeft",
|
|
263
264
|
"mobileRight",
|
|
264
265
|
"brandLogo",
|
|
265
|
-
"id"
|
|
266
|
+
"id",
|
|
267
|
+
"testid"
|
|
266
268
|
]);
|
|
267
269
|
const defaultStyles = (0, import_clsx2.default)("bg-background-primary-normal");
|
|
268
270
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
269
271
|
"div",
|
|
270
272
|
__spreadProps(__spreadValues({
|
|
271
273
|
id,
|
|
274
|
+
"data-testid": testid,
|
|
272
275
|
className: (0, import_clsx2.default)(
|
|
273
276
|
"flex items-center justify-between",
|
|
274
277
|
containerPaddingX,
|
|
@@ -335,22 +338,26 @@ var TopBar = (_a) => {
|
|
|
335
338
|
var _b = _a, {
|
|
336
339
|
left,
|
|
337
340
|
brandLogo = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LogoDMSiTopBar, {}),
|
|
338
|
-
id
|
|
341
|
+
id,
|
|
342
|
+
testid
|
|
339
343
|
} = _b, props = __objRest(_b, [
|
|
340
344
|
"left",
|
|
341
345
|
"brandLogo",
|
|
342
|
-
"id"
|
|
346
|
+
"id",
|
|
347
|
+
"testid"
|
|
343
348
|
]);
|
|
344
349
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
345
350
|
TopBarBase,
|
|
346
351
|
__spreadProps(__spreadValues({}, props), {
|
|
347
352
|
id,
|
|
353
|
+
testid,
|
|
348
354
|
brandLogo,
|
|
349
355
|
left: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
350
356
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
351
357
|
"a",
|
|
352
358
|
{
|
|
353
359
|
id: id ? `${id}-brand-logo-link` : void 0,
|
|
360
|
+
"data-testid": testid ? `${testid}-brand-logo-link` : void 0,
|
|
354
361
|
href: "/",
|
|
355
362
|
className: "grow max-w-[400px] h-auto max-h-10 *:max-h-[inherit]",
|
|
356
363
|
children: brandLogo && brandLogo
|
|
@@ -25,7 +25,8 @@ var TopBarBase = (_a) => {
|
|
|
25
25
|
mobileLeft,
|
|
26
26
|
mobileRight,
|
|
27
27
|
brandLogo = /* @__PURE__ */ jsx(LogoDMSiTopBar, {}),
|
|
28
|
-
id
|
|
28
|
+
id,
|
|
29
|
+
testid
|
|
29
30
|
} = _b, props = __objRest(_b, [
|
|
30
31
|
"left",
|
|
31
32
|
"right",
|
|
@@ -33,13 +34,15 @@ var TopBarBase = (_a) => {
|
|
|
33
34
|
"mobileLeft",
|
|
34
35
|
"mobileRight",
|
|
35
36
|
"brandLogo",
|
|
36
|
-
"id"
|
|
37
|
+
"id",
|
|
38
|
+
"testid"
|
|
37
39
|
]);
|
|
38
40
|
const defaultStyles = clsx("bg-background-primary-normal");
|
|
39
41
|
return /* @__PURE__ */ jsxs(
|
|
40
42
|
"div",
|
|
41
43
|
__spreadProps(__spreadValues({
|
|
42
44
|
id,
|
|
45
|
+
"data-testid": testid,
|
|
43
46
|
className: clsx(
|
|
44
47
|
"flex items-center justify-between",
|
|
45
48
|
containerPaddingX,
|
|
@@ -106,22 +109,26 @@ var TopBar = (_a) => {
|
|
|
106
109
|
var _b = _a, {
|
|
107
110
|
left,
|
|
108
111
|
brandLogo = /* @__PURE__ */ jsx(LogoDMSiTopBar, {}),
|
|
109
|
-
id
|
|
112
|
+
id,
|
|
113
|
+
testid
|
|
110
114
|
} = _b, props = __objRest(_b, [
|
|
111
115
|
"left",
|
|
112
116
|
"brandLogo",
|
|
113
|
-
"id"
|
|
117
|
+
"id",
|
|
118
|
+
"testid"
|
|
114
119
|
]);
|
|
115
120
|
return /* @__PURE__ */ jsx(
|
|
116
121
|
TopBarBase,
|
|
117
122
|
__spreadProps(__spreadValues({}, props), {
|
|
118
123
|
id,
|
|
124
|
+
testid,
|
|
119
125
|
brandLogo,
|
|
120
126
|
left: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
121
127
|
/* @__PURE__ */ jsx(
|
|
122
128
|
"a",
|
|
123
129
|
{
|
|
124
130
|
id: id ? `${id}-brand-logo-link` : void 0,
|
|
131
|
+
"data-testid": testid ? `${testid}-brand-logo-link` : void 0,
|
|
125
132
|
href: "/",
|
|
126
133
|
className: "grow max-w-[400px] h-auto max-h-10 *:max-h-[inherit]",
|
|
127
134
|
children: brandLogo && brandLogo
|
|
@@ -197,17 +197,20 @@ function Icon(_a) {
|
|
|
197
197
|
var _b = _a, {
|
|
198
198
|
name,
|
|
199
199
|
size = 24,
|
|
200
|
-
variant = "outline"
|
|
200
|
+
variant = "outline",
|
|
201
|
+
testid
|
|
201
202
|
} = _b, props = __objRest(_b, [
|
|
202
203
|
"name",
|
|
203
204
|
"size",
|
|
204
|
-
"variant"
|
|
205
|
+
"variant",
|
|
206
|
+
"testid"
|
|
205
207
|
]);
|
|
206
208
|
const variantStyle = variant === "filled" ? '"FILL" 1' : '"FILL" 0';
|
|
207
209
|
const weightStyle = size === 16 ? '"wght" 400' : '"wght" 300';
|
|
208
210
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
209
211
|
"span",
|
|
210
212
|
__spreadProps(__spreadValues({}, props), {
|
|
213
|
+
"data-testid": testid,
|
|
211
214
|
className: (0, import_clsx2.default)(
|
|
212
215
|
"icon",
|
|
213
216
|
`icon-${size}`,
|
|
@@ -235,7 +238,8 @@ var Paragraph = (_a) => {
|
|
|
235
238
|
addOverflow,
|
|
236
239
|
children,
|
|
237
240
|
as = "p",
|
|
238
|
-
id
|
|
241
|
+
id,
|
|
242
|
+
testid
|
|
239
243
|
} = _b, props = __objRest(_b, [
|
|
240
244
|
"className",
|
|
241
245
|
"color",
|
|
@@ -245,13 +249,15 @@ var Paragraph = (_a) => {
|
|
|
245
249
|
"addOverflow",
|
|
246
250
|
"children",
|
|
247
251
|
"as",
|
|
248
|
-
"id"
|
|
252
|
+
"id",
|
|
253
|
+
"testid"
|
|
249
254
|
]);
|
|
250
255
|
const Element = as;
|
|
251
256
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
252
257
|
Element,
|
|
253
258
|
__spreadProps(__spreadValues({
|
|
254
|
-
id
|
|
259
|
+
id,
|
|
260
|
+
"data-testid": testid
|
|
255
261
|
}, props), {
|
|
256
262
|
className: (0, import_clsx3.default)(
|
|
257
263
|
typography.paragraph,
|
|
@@ -289,7 +295,8 @@ var Button = (_a) => {
|
|
|
289
295
|
iconOnly = false,
|
|
290
296
|
colorClassName,
|
|
291
297
|
href,
|
|
292
|
-
id
|
|
298
|
+
id,
|
|
299
|
+
testid
|
|
293
300
|
} = _b, props = __objRest(_b, [
|
|
294
301
|
"variant",
|
|
295
302
|
"as",
|
|
@@ -303,7 +310,8 @@ var Button = (_a) => {
|
|
|
303
310
|
"iconOnly",
|
|
304
311
|
"colorClassName",
|
|
305
312
|
"href",
|
|
306
|
-
"id"
|
|
313
|
+
"id",
|
|
314
|
+
"testid"
|
|
307
315
|
]);
|
|
308
316
|
const primaryVariantStyles = variant === "primary" && (0, import_clsx4.default)(
|
|
309
317
|
(colorClassName == null ? void 0 : colorClassName.trim()) ? colorClassName : "text-text-on-action-primary-normal",
|
|
@@ -391,6 +399,7 @@ var Button = (_a) => {
|
|
|
391
399
|
Element,
|
|
392
400
|
__spreadProps(__spreadValues({
|
|
393
401
|
id,
|
|
402
|
+
"data-testid": testid,
|
|
394
403
|
type: Element === "button" ? "button" : void 0,
|
|
395
404
|
className: buttonClasses
|
|
396
405
|
}, props), {
|
|
@@ -400,7 +409,7 @@ var Button = (_a) => {
|
|
|
400
409
|
"data-theme": variant === "navigation" ? "brand" : void 0,
|
|
401
410
|
children: [
|
|
402
411
|
leftIcon && leftIcon,
|
|
403
|
-
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: id ? `${id}-label` : void 0, className: labelClasses, children }),
|
|
412
|
+
!iconOnly && children && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { id: id ? `${id}-label` : void 0, "data-testid": testid ? `${testid}-label` : void 0, className: labelClasses, children }),
|
|
404
413
|
rightIcon && rightIcon
|
|
405
414
|
]
|
|
406
415
|
})
|
|
@@ -417,14 +426,16 @@ function Upload(props) {
|
|
|
417
426
|
errorText,
|
|
418
427
|
text = "Upload your file",
|
|
419
428
|
value,
|
|
420
|
-
onRemove
|
|
429
|
+
onRemove,
|
|
430
|
+
testid
|
|
421
431
|
} = _a, rest = __objRest(_a, [
|
|
422
432
|
"isLoading",
|
|
423
433
|
"style",
|
|
424
434
|
"errorText",
|
|
425
435
|
"text",
|
|
426
436
|
"value",
|
|
427
|
-
"onRemove"
|
|
437
|
+
"onRemove",
|
|
438
|
+
"testid"
|
|
428
439
|
]);
|
|
429
440
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
430
441
|
"label",
|
|
@@ -439,26 +450,29 @@ function Upload(props) {
|
|
|
439
450
|
"w-full h-[166px] desktop:w-[340px] desktop:h-[190px]",
|
|
440
451
|
componentGap
|
|
441
452
|
),
|
|
453
|
+
"data-testid": testid,
|
|
442
454
|
children: [
|
|
443
455
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
444
456
|
"input",
|
|
445
457
|
__spreadProps(__spreadValues({}, rest), {
|
|
446
458
|
type: "file",
|
|
447
|
-
className: "sr-only"
|
|
459
|
+
className: "sr-only",
|
|
460
|
+
"data-testid": testid ? `${testid}-file-input` : void 0
|
|
448
461
|
})
|
|
449
462
|
),
|
|
450
463
|
isLoading && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
451
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "cached", className: "text-icon-primary-normal animate-spin" }),
|
|
452
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Paragraph, { color: "text-secondary-normal", children: "Loading..." })
|
|
464
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { testid: testid ? `${testid}-loading-icon` : void 0, name: "cached", className: "text-icon-primary-normal animate-spin" }),
|
|
465
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Paragraph, { testid: testid ? `${testid}-loading-text` : void 0, color: "text-secondary-normal", children: "Loading..." })
|
|
453
466
|
] }),
|
|
454
467
|
!value && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
455
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { name: "cloud_upload", className: "text-icon-primary-normal" }),
|
|
456
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Paragraph, { color: errorText ? "text-primary-error" : "text-secondary-normal", children: errorText ? errorText : text })
|
|
468
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { testid: testid ? `${testid}-icon` : void 0, name: "cloud_upload", className: "text-icon-primary-normal" }),
|
|
469
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Paragraph, { testid: testid ? `${testid}-text` : void 0, color: errorText ? "text-primary-error" : "text-secondary-normal", children: errorText ? errorText : text })
|
|
457
470
|
] }),
|
|
458
471
|
value && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
459
472
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
460
473
|
"img",
|
|
461
474
|
{
|
|
475
|
+
"data-testid": testid ? `${testid}-uploaded-image` : void 0,
|
|
462
476
|
src: value,
|
|
463
477
|
alt: "",
|
|
464
478
|
className: "absolute inset-0 object-contain object-center max-h-full max-w-full self-center justify-self-center"
|
|
@@ -467,6 +481,7 @@ function Upload(props) {
|
|
|
467
481
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "absolute right-2 top-2", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
468
482
|
Button,
|
|
469
483
|
{
|
|
484
|
+
testid: testid ? `${testid}-remove-image-button` : void 0,
|
|
470
485
|
onClick: (e) => {
|
|
471
486
|
e.preventDefault();
|
|
472
487
|
e.stopPropagation();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Paragraph
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-HVI3CL7Y.js";
|
|
4
4
|
import {
|
|
5
5
|
Button
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-FKMKHLQH.js";
|
|
7
7
|
import {
|
|
8
8
|
Icon
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-NKUETCDA.js";
|
|
10
10
|
import {
|
|
11
11
|
componentGap
|
|
12
12
|
} from "../chunk-RDLEIAQU.js";
|
|
@@ -26,14 +26,16 @@ function Upload(props) {
|
|
|
26
26
|
errorText,
|
|
27
27
|
text = "Upload your file",
|
|
28
28
|
value,
|
|
29
|
-
onRemove
|
|
29
|
+
onRemove,
|
|
30
|
+
testid
|
|
30
31
|
} = _a, rest = __objRest(_a, [
|
|
31
32
|
"isLoading",
|
|
32
33
|
"style",
|
|
33
34
|
"errorText",
|
|
34
35
|
"text",
|
|
35
36
|
"value",
|
|
36
|
-
"onRemove"
|
|
37
|
+
"onRemove",
|
|
38
|
+
"testid"
|
|
37
39
|
]);
|
|
38
40
|
return /* @__PURE__ */ jsxs(
|
|
39
41
|
"label",
|
|
@@ -48,26 +50,29 @@ function Upload(props) {
|
|
|
48
50
|
"w-full h-[166px] desktop:w-[340px] desktop:h-[190px]",
|
|
49
51
|
componentGap
|
|
50
52
|
),
|
|
53
|
+
"data-testid": testid,
|
|
51
54
|
children: [
|
|
52
55
|
/* @__PURE__ */ jsx(
|
|
53
56
|
"input",
|
|
54
57
|
__spreadProps(__spreadValues({}, rest), {
|
|
55
58
|
type: "file",
|
|
56
|
-
className: "sr-only"
|
|
59
|
+
className: "sr-only",
|
|
60
|
+
"data-testid": testid ? `${testid}-file-input` : void 0
|
|
57
61
|
})
|
|
58
62
|
),
|
|
59
63
|
isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
-
/* @__PURE__ */ jsx(Icon, { name: "cached", className: "text-icon-primary-normal animate-spin" }),
|
|
61
|
-
/* @__PURE__ */ jsx(Paragraph, { color: "text-secondary-normal", children: "Loading..." })
|
|
64
|
+
/* @__PURE__ */ jsx(Icon, { testid: testid ? `${testid}-loading-icon` : void 0, name: "cached", className: "text-icon-primary-normal animate-spin" }),
|
|
65
|
+
/* @__PURE__ */ jsx(Paragraph, { testid: testid ? `${testid}-loading-text` : void 0, color: "text-secondary-normal", children: "Loading..." })
|
|
62
66
|
] }),
|
|
63
67
|
!value && !isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
64
|
-
/* @__PURE__ */ jsx(Icon, { name: "cloud_upload", className: "text-icon-primary-normal" }),
|
|
65
|
-
/* @__PURE__ */ jsx(Paragraph, { color: errorText ? "text-primary-error" : "text-secondary-normal", children: errorText ? errorText : text })
|
|
68
|
+
/* @__PURE__ */ jsx(Icon, { testid: testid ? `${testid}-icon` : void 0, name: "cloud_upload", className: "text-icon-primary-normal" }),
|
|
69
|
+
/* @__PURE__ */ jsx(Paragraph, { testid: testid ? `${testid}-text` : void 0, color: errorText ? "text-primary-error" : "text-secondary-normal", children: errorText ? errorText : text })
|
|
66
70
|
] }),
|
|
67
71
|
value && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
68
72
|
/* @__PURE__ */ jsx(
|
|
69
73
|
"img",
|
|
70
74
|
{
|
|
75
|
+
"data-testid": testid ? `${testid}-uploaded-image` : void 0,
|
|
71
76
|
src: value,
|
|
72
77
|
alt: "",
|
|
73
78
|
className: "absolute inset-0 object-contain object-center max-h-full max-w-full self-center justify-self-center"
|
|
@@ -76,6 +81,7 @@ function Upload(props) {
|
|
|
76
81
|
/* @__PURE__ */ jsx("div", { className: "absolute right-2 top-2", children: /* @__PURE__ */ jsx(
|
|
77
82
|
Button,
|
|
78
83
|
{
|
|
84
|
+
testid: testid ? `${testid}-remove-image-button` : void 0,
|
|
79
85
|
onClick: (e) => {
|
|
80
86
|
e.preventDefault();
|
|
81
87
|
e.stopPropagation();
|