@digital-ai/dot-components 2.7.4 → 2.8.0
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/CHANGE_LOG.md +23 -8
- package/index.esm.js +84 -19
- package/index.umd.js +242 -162
- package/lib/Typography.stories.d.ts +1 -1
- package/lib/components/AccessibilityProps.d.ts +1 -0
- package/lib/components/CommonProps.d.ts +3 -0
- package/lib/components/app-switcher/AppSwitcher.styles.d.ts +1 -1
- package/lib/components/app-toolbar/AppToolbar.styles.d.ts +1 -1
- package/lib/components/auto-complete/AutoComplete.d.ts +5 -3
- package/lib/components/auto-complete/AutoComplete.stories.d.ts +2 -1
- package/lib/components/auto-complete/AutoComplete.stories.styles.d.ts +2 -0
- package/lib/components/auto-complete/Autocomplete.stories.data.d.ts +1 -5
- package/lib/components/auto-complete/index.d.ts +1 -1
- package/lib/components/avatar/Avatar.d.ts +1 -1
- package/lib/components/avatar/Avatar.stories.d.ts +1 -1
- package/lib/components/button/IconButton.d.ts +1 -1
- package/lib/components/button/IconButton.stories.d.ts +1 -1
- package/lib/components/drawer/Drawer.d.ts +3 -1
- package/lib/components/drawer/Drawer.stories.d.ts +1 -1
- package/lib/components/drawer/DrawerBody.d.ts +1 -1
- package/lib/components/drawer/DrawerFooter.d.ts +1 -1
- package/lib/components/file-upload/FileUpload.d.ts +1 -1
- package/lib/components/file-upload/FileUpload.stories.d.ts +1 -1
- package/lib/components/icon/Icon.d.ts +1 -1
- package/lib/components/icon/Icon.stories.d.ts +1 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/components/inline-edit/InlineEdit.d.ts +1 -1
- package/lib/components/inline-edit/InlineEdit.stories.d.ts +1 -1
- package/lib/components/link/Link.d.ts +1 -1
- package/lib/components/link/Link.stories.d.ts +1 -1
- package/lib/components/list/List.d.ts +2 -2
- package/lib/components/list/List.stories.d.ts +1 -1
- package/lib/components/list/NestedList.styles.d.ts +1 -1
- package/lib/components/menu/Menu.d.ts +1 -1
- package/lib/components/menu/Menu.stories.d.ts +1 -1
- package/lib/components/radio/RadioGroup.d.ts +1 -1
- package/lib/components/radio/RadioGroup.stories.d.ts +1 -1
- package/lib/components/search-input/SearchInput.d.ts +1 -1
- package/lib/components/split-button/SplitButton.styles.d.ts +1 -1
- package/lib/components/stepper/Stepper.styles.d.ts +1 -1
- package/lib/components/table/Table.styles.d.ts +1 -1
- package/lib/components/table/TableActions.styles.d.ts +1 -1
- package/lib/components/tooltip/Tooltip.d.ts +1 -1
- package/lib/components/tooltip/Tooltip.stories.d.ts +1 -1
- package/lib/components/typography/Typography.d.ts +3 -1
- package/lib/components/typography/Typography.stories.d.ts +1 -1
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -150,14 +150,16 @@
|
|
|
150
150
|
|
|
151
151
|
var DotTooltip = function DotTooltip(_a) {
|
|
152
152
|
var ariaLabel = _a.ariaLabel,
|
|
153
|
+
_b = _a.ariaRole,
|
|
154
|
+
ariaRole = _b === void 0 ? 'tooltip' : _b,
|
|
153
155
|
children = _a.children,
|
|
154
156
|
className = _a.className,
|
|
155
157
|
dataTestId = _a["data-testid"],
|
|
156
158
|
leaveDelay = _a.leaveDelay,
|
|
157
159
|
onClose = _a.onClose,
|
|
158
160
|
open = _a.open,
|
|
159
|
-
|
|
160
|
-
placement =
|
|
161
|
+
_c = _a.placement,
|
|
162
|
+
placement = _c === void 0 ? 'bottom' : _c,
|
|
161
163
|
title = _a.title;
|
|
162
164
|
var rootClasses = useStylesWithRootClass('dot-tooltip', className);
|
|
163
165
|
return title ? jsxRuntime.jsx(material.Tooltip, __assign({
|
|
@@ -168,6 +170,7 @@
|
|
|
168
170
|
onClose: onClose,
|
|
169
171
|
open: open,
|
|
170
172
|
placement: placement,
|
|
173
|
+
role: ariaRole,
|
|
171
174
|
title: title
|
|
172
175
|
}, {
|
|
173
176
|
children: jsxRuntime.jsx("span", {
|
|
@@ -187,10 +190,12 @@
|
|
|
187
190
|
|
|
188
191
|
var DotIcon = function DotIcon(_a) {
|
|
189
192
|
var ariaLabel = _a.ariaLabel,
|
|
193
|
+
_b = _a.ariaRole,
|
|
194
|
+
ariaRole = _b === void 0 ? 'img' : _b,
|
|
190
195
|
className = _a.className,
|
|
191
196
|
dataTestId = _a["data-testid"],
|
|
192
|
-
|
|
193
|
-
fontSize =
|
|
197
|
+
_c = _a.fontSize,
|
|
198
|
+
fontSize = _c === void 0 ? 'medium' : _c,
|
|
194
199
|
iconId = _a.iconId,
|
|
195
200
|
tooltip = _a.tooltip;
|
|
196
201
|
var rootClasses = useStylesWithRootClass(rootClassName$15, className);
|
|
@@ -204,11 +209,13 @@
|
|
|
204
209
|
root: rootClasses
|
|
205
210
|
},
|
|
206
211
|
"data-testid": dataTestId,
|
|
207
|
-
fontSize: fontSize
|
|
212
|
+
fontSize: fontSize,
|
|
213
|
+
role: ariaRole
|
|
208
214
|
}, {
|
|
209
215
|
children: jsxRuntime.jsx("i", {
|
|
210
216
|
className: "icon-" + iconId + " dot-i",
|
|
211
|
-
"data-testid": dataTestId && dataTestId + "-i"
|
|
217
|
+
"data-testid": dataTestId && dataTestId + "-i",
|
|
218
|
+
role: ariaRole
|
|
212
219
|
}, void 0)
|
|
213
220
|
}), void 0)
|
|
214
221
|
}), void 0);
|
|
@@ -216,6 +223,8 @@
|
|
|
216
223
|
|
|
217
224
|
var DotTypography = function DotTypography(_a) {
|
|
218
225
|
var ariaLabel = _a.ariaLabel,
|
|
226
|
+
ariaLevel = _a.ariaLevel,
|
|
227
|
+
ariaRole = _a.ariaRole,
|
|
219
228
|
className = _a.className,
|
|
220
229
|
dataTestId = _a["data-testid"],
|
|
221
230
|
children = _a.children,
|
|
@@ -224,14 +233,21 @@
|
|
|
224
233
|
noWrap = _a.noWrap,
|
|
225
234
|
variant = _a.variant;
|
|
226
235
|
var rootClasses = useStylesWithRootClass('dot-typography', className);
|
|
236
|
+
React.useEffect(function () {
|
|
237
|
+
if (ariaRole === 'heading' && !ariaLevel) {
|
|
238
|
+
console.warn('please include ariaLevel when using ariaRole="heading"');
|
|
239
|
+
}
|
|
240
|
+
}, []);
|
|
227
241
|
return jsxRuntime.jsx(material.Typography, __assign({
|
|
228
242
|
"aria-label": ariaLabel,
|
|
243
|
+
"aria-level": ariaLevel,
|
|
229
244
|
classes: {
|
|
230
245
|
root: rootClasses
|
|
231
246
|
},
|
|
232
247
|
component: component,
|
|
233
248
|
"data-testid": dataTestId,
|
|
234
249
|
noWrap: noWrap,
|
|
250
|
+
role: ariaRole,
|
|
235
251
|
style: {
|
|
236
252
|
marginBottom: noMarginBottom ? 0 : undefined
|
|
237
253
|
},
|
|
@@ -1872,25 +1888,27 @@
|
|
|
1872
1888
|
var DotAvatar = function DotAvatar(_a) {
|
|
1873
1889
|
var alt = _a.alt,
|
|
1874
1890
|
ariaLabel = _a.ariaLabel,
|
|
1891
|
+
_b = _a.ariaRole,
|
|
1892
|
+
ariaRole = _b === void 0 ? 'img' : _b,
|
|
1875
1893
|
className = _a.className,
|
|
1876
|
-
|
|
1877
|
-
component =
|
|
1894
|
+
_c = _a.component,
|
|
1895
|
+
component = _c === void 0 ? 'div' : _c,
|
|
1878
1896
|
color = _a.color,
|
|
1879
1897
|
dataTestId = _a["data-testid"],
|
|
1880
1898
|
iconId = _a.iconId,
|
|
1881
1899
|
imageSrc = _a.imageSrc,
|
|
1882
1900
|
onClick = _a.onClick,
|
|
1883
|
-
|
|
1884
|
-
size =
|
|
1885
|
-
|
|
1886
|
-
tabIndex =
|
|
1887
|
-
|
|
1888
|
-
text =
|
|
1889
|
-
|
|
1890
|
-
type =
|
|
1901
|
+
_d = _a.size,
|
|
1902
|
+
size = _d === void 0 ? 'medium' : _d,
|
|
1903
|
+
_e = _a.tabIndex,
|
|
1904
|
+
tabIndex = _e === void 0 ? 0 : _e,
|
|
1905
|
+
_f = _a.text,
|
|
1906
|
+
text = _f === void 0 ? alt : _f,
|
|
1907
|
+
_g = _a.type,
|
|
1908
|
+
type = _g === void 0 ? 'image' : _g,
|
|
1891
1909
|
tooltip = _a.tooltip,
|
|
1892
|
-
|
|
1893
|
-
variant =
|
|
1910
|
+
_h = _a.variant,
|
|
1911
|
+
variant = _h === void 0 ? 'circular' : _h,
|
|
1894
1912
|
style = _a.style;
|
|
1895
1913
|
var rootClasses = useStylesWithRootClass(rootClassName$10, className);
|
|
1896
1914
|
var getAvatarColor = function getAvatarColor() {
|
|
@@ -1915,6 +1933,7 @@
|
|
|
1915
1933
|
onClick: function (event) {
|
|
1916
1934
|
return onClick ? onClick(event) : null;
|
|
1917
1935
|
},
|
|
1936
|
+
role: onClick ? 'button' : ariaRole,
|
|
1918
1937
|
src: type === 'image' ? imageSrc : null,
|
|
1919
1938
|
style: style,
|
|
1920
1939
|
tabIndex: tooltip ? tabIndex : undefined,
|
|
@@ -1924,9 +1943,9 @@
|
|
|
1924
1943
|
"data-testid": dataTestId,
|
|
1925
1944
|
iconId: iconId,
|
|
1926
1945
|
imageSrc: imageSrc,
|
|
1946
|
+
size: size,
|
|
1927
1947
|
text: text,
|
|
1928
|
-
type: type
|
|
1929
|
-
size: size
|
|
1948
|
+
type: type
|
|
1930
1949
|
}, void 0)
|
|
1931
1950
|
}), void 0)
|
|
1932
1951
|
}), void 0);
|
|
@@ -1945,29 +1964,31 @@
|
|
|
1945
1964
|
/** This component wraps the Button component from @material-ui. */
|
|
1946
1965
|
var DotButton = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
1947
1966
|
var ariaLabel = _a.ariaLabel,
|
|
1948
|
-
_b = _a.
|
|
1949
|
-
|
|
1967
|
+
_b = _a.ariaRole,
|
|
1968
|
+
ariaRole = _b === void 0 ? 'button' : _b,
|
|
1969
|
+
_c = _a.autoFocus,
|
|
1970
|
+
autoFocus = _c === void 0 ? false : _c,
|
|
1950
1971
|
children = _a.children,
|
|
1951
1972
|
className = _a.className,
|
|
1952
1973
|
dataTestId = _a["data-testid"],
|
|
1953
|
-
|
|
1954
|
-
disabled =
|
|
1955
|
-
|
|
1956
|
-
disableRipple =
|
|
1974
|
+
_d = _a.disabled,
|
|
1975
|
+
disabled = _d === void 0 ? false : _d,
|
|
1976
|
+
_e = _a.disableRipple,
|
|
1977
|
+
disableRipple = _e === void 0 ? false : _e,
|
|
1957
1978
|
endIcon = _a.endIcon,
|
|
1958
|
-
|
|
1959
|
-
fullWidth =
|
|
1960
|
-
|
|
1961
|
-
isSubmit =
|
|
1979
|
+
_f = _a.fullWidth,
|
|
1980
|
+
fullWidth = _f === void 0 ? false : _f,
|
|
1981
|
+
_g = _a.isSubmit,
|
|
1982
|
+
isSubmit = _g === void 0 ? false : _g,
|
|
1962
1983
|
onClick = _a.onClick,
|
|
1963
1984
|
onKeyDown = _a.onKeyDown,
|
|
1964
|
-
|
|
1965
|
-
size =
|
|
1985
|
+
_h = _a.size,
|
|
1986
|
+
size = _h === void 0 ? 'medium' : _h,
|
|
1966
1987
|
startIcon = _a.startIcon,
|
|
1967
1988
|
tabIndex = _a.tabIndex,
|
|
1968
1989
|
tooltip = _a.tooltip,
|
|
1969
|
-
|
|
1970
|
-
type =
|
|
1990
|
+
_j = _a.type,
|
|
1991
|
+
type = _j === void 0 ? 'primary' : _j;
|
|
1971
1992
|
var rootClasses = useStylesWithRootClass(rootClassName$$, className);
|
|
1972
1993
|
var color;
|
|
1973
1994
|
var variant;
|
|
@@ -2009,6 +2030,7 @@
|
|
|
2009
2030
|
},
|
|
2010
2031
|
onKeyDown: onKeyDown,
|
|
2011
2032
|
ref: ref,
|
|
2033
|
+
role: ariaRole,
|
|
2012
2034
|
size: size,
|
|
2013
2035
|
startIcon: startIcon,
|
|
2014
2036
|
tabIndex: tabIndex,
|
|
@@ -2031,19 +2053,21 @@
|
|
|
2031
2053
|
|
|
2032
2054
|
var DotLink = function DotLink(_a) {
|
|
2033
2055
|
var ariaLabel = _a.ariaLabel,
|
|
2056
|
+
_b = _a.ariaRole,
|
|
2057
|
+
ariaRole = _b === void 0 ? 'link' : _b,
|
|
2034
2058
|
children = _a.children,
|
|
2035
2059
|
className = _a.className,
|
|
2036
|
-
|
|
2037
|
-
color =
|
|
2060
|
+
_c = _a.color,
|
|
2061
|
+
color = _c === void 0 ? 'primary' : _c,
|
|
2038
2062
|
dataTestId = _a["data-testid"],
|
|
2039
2063
|
href = _a.href,
|
|
2040
2064
|
onClick = _a.onClick,
|
|
2041
2065
|
onMouseEnter = _a.onMouseEnter,
|
|
2042
2066
|
onPointerDown = _a.onPointerDown,
|
|
2043
|
-
|
|
2044
|
-
rel =
|
|
2045
|
-
|
|
2046
|
-
tabIndex =
|
|
2067
|
+
_d = _a.rel,
|
|
2068
|
+
rel = _d === void 0 ? 'noreferrer' : _d,
|
|
2069
|
+
_e = _a.tabIndex,
|
|
2070
|
+
tabIndex = _e === void 0 ? 0 : _e,
|
|
2047
2071
|
target = _a.target,
|
|
2048
2072
|
tooltip = _a.tooltip,
|
|
2049
2073
|
underline = _a.underline;
|
|
@@ -2070,6 +2094,7 @@
|
|
|
2070
2094
|
onMouseEnter: onMouseEnter,
|
|
2071
2095
|
onPointerDown: onPointerDown,
|
|
2072
2096
|
rel: rel,
|
|
2097
|
+
role: ariaRole,
|
|
2073
2098
|
tabIndex: tabIndex,
|
|
2074
2099
|
target: target,
|
|
2075
2100
|
underline: underline
|
|
@@ -2390,25 +2415,27 @@
|
|
|
2390
2415
|
var DotMenu = function DotMenu(_a) {
|
|
2391
2416
|
var anchorEl = _a.anchorEl,
|
|
2392
2417
|
ariaLabel = _a.ariaLabel,
|
|
2418
|
+
_b = _a.ariaRole,
|
|
2419
|
+
ariaRole = _b === void 0 ? 'menu' : _b,
|
|
2393
2420
|
className = _a.className,
|
|
2394
2421
|
dataTestId = _a["data-testid"],
|
|
2395
|
-
|
|
2396
|
-
dense =
|
|
2422
|
+
_c = _a.dense,
|
|
2423
|
+
dense = _c === void 0 ? true : _c,
|
|
2397
2424
|
disablePortal = _a.disablePortal,
|
|
2398
2425
|
id = _a.id,
|
|
2399
|
-
|
|
2400
|
-
loading =
|
|
2401
|
-
|
|
2402
|
-
maxVisibleItems =
|
|
2426
|
+
_d = _a.loading,
|
|
2427
|
+
loading = _d === void 0 ? false : _d,
|
|
2428
|
+
_e = _a.maxVisibleItems,
|
|
2429
|
+
maxVisibleItems = _e === void 0 ? DEFAULT_MAX_VISIBLE_ITEMS : _e,
|
|
2403
2430
|
menuItemHeight = _a.menuItemHeight,
|
|
2404
|
-
|
|
2405
|
-
menuItems =
|
|
2406
|
-
|
|
2407
|
-
menuPlacement =
|
|
2431
|
+
_f = _a.menuItems,
|
|
2432
|
+
menuItems = _f === void 0 ? [] : _f,
|
|
2433
|
+
_g = _a.menuPlacement,
|
|
2434
|
+
menuPlacement = _g === void 0 ? 'bottom' : _g,
|
|
2408
2435
|
onLeave = _a.onLeave,
|
|
2409
2436
|
onSelect = _a.onSelect,
|
|
2410
|
-
|
|
2411
|
-
open =
|
|
2437
|
+
_h = _a.open,
|
|
2438
|
+
open = _h === void 0 ? false : _h,
|
|
2412
2439
|
selectedKey = _a.selectedKey;
|
|
2413
2440
|
var rootClasses = useStylesWithRootClass(rootClassName$W, className, loading ? 'loading' : '');
|
|
2414
2441
|
var isSubmenu = checkIfSubmenu(anchorEl);
|
|
@@ -2493,6 +2520,7 @@
|
|
|
2493
2520
|
selectedKey: selectedKey
|
|
2494
2521
|
}, void 0);
|
|
2495
2522
|
},
|
|
2523
|
+
ariaRole: ariaRole,
|
|
2496
2524
|
selectedKey: selectedKey
|
|
2497
2525
|
}, void 0)
|
|
2498
2526
|
}), void 0)
|
|
@@ -2549,21 +2577,23 @@
|
|
|
2549
2577
|
|
|
2550
2578
|
var DotIconButton = function DotIconButton(_a) {
|
|
2551
2579
|
var ariaLabel = _a.ariaLabel,
|
|
2580
|
+
_b = _a.ariaRole,
|
|
2581
|
+
ariaRole = _b === void 0 ? 'button' : _b,
|
|
2552
2582
|
className = _a.className,
|
|
2553
|
-
|
|
2554
|
-
color =
|
|
2583
|
+
_c = _a.color,
|
|
2584
|
+
color = _c === void 0 ? 'inherit' : _c,
|
|
2555
2585
|
dataTestId = _a["data-testid"],
|
|
2556
|
-
|
|
2557
|
-
disabled =
|
|
2558
|
-
|
|
2559
|
-
disableRipple =
|
|
2586
|
+
_d = _a.disabled,
|
|
2587
|
+
disabled = _d === void 0 ? false : _d,
|
|
2588
|
+
_e = _a.disableRipple,
|
|
2589
|
+
disableRipple = _e === void 0 ? false : _e,
|
|
2560
2590
|
iconId = _a.iconId,
|
|
2561
|
-
|
|
2562
|
-
iconSize =
|
|
2591
|
+
_f = _a.iconSize,
|
|
2592
|
+
iconSize = _f === void 0 ? 'small' : _f,
|
|
2563
2593
|
onClick = _a.onClick,
|
|
2564
2594
|
tooltip = _a.tooltip,
|
|
2565
|
-
|
|
2566
|
-
size =
|
|
2595
|
+
_g = _a.size,
|
|
2596
|
+
size = _g === void 0 ? 'medium' : _g;
|
|
2567
2597
|
var rippleClassName = disableRipple ? 'ripple-disabled' : '';
|
|
2568
2598
|
var rootClasses = useStylesWithRootClass(rootClassName$S, rippleClassName, className);
|
|
2569
2599
|
return jsxRuntime.jsx(DotTooltip, __assign({
|
|
@@ -2582,6 +2612,7 @@
|
|
|
2582
2612
|
onClick: function (event) {
|
|
2583
2613
|
return onClick && onClick(event);
|
|
2584
2614
|
},
|
|
2615
|
+
role: ariaRole,
|
|
2585
2616
|
size: size
|
|
2586
2617
|
}, {
|
|
2587
2618
|
children: jsxRuntime.jsx(DotIcon, {
|
|
@@ -2603,8 +2634,10 @@
|
|
|
2603
2634
|
var rootClasses = useStylesWithRootClass(rootClassName$T, className);
|
|
2604
2635
|
return jsxRuntime.jsxs(StyleDrawerHeader, __assign({
|
|
2605
2636
|
"aria-label": ariaLabel,
|
|
2637
|
+
"aria-level": 2,
|
|
2606
2638
|
className: rootClasses,
|
|
2607
|
-
"data-testid": dataTestId
|
|
2639
|
+
"data-testid": dataTestId,
|
|
2640
|
+
role: "heading"
|
|
2608
2641
|
}, {
|
|
2609
2642
|
children: [children, variant !== 'permanent' && jsxRuntime.jsx(DotIconButton, {
|
|
2610
2643
|
className: "close-button",
|
|
@@ -2625,6 +2658,8 @@
|
|
|
2625
2658
|
|
|
2626
2659
|
var DotDrawerBody = function DotDrawerBody(_a) {
|
|
2627
2660
|
var ariaLabel = _a.ariaLabel,
|
|
2661
|
+
_b = _a.ariaRole,
|
|
2662
|
+
ariaRole = _b === void 0 ? 'region' : _b,
|
|
2628
2663
|
children = _a.children,
|
|
2629
2664
|
className = _a.className,
|
|
2630
2665
|
dataTestId = _a["data-testid"],
|
|
@@ -2635,7 +2670,8 @@
|
|
|
2635
2670
|
return jsxRuntime.jsxs(StyleDrawerBody, __assign({
|
|
2636
2671
|
"aria-label": ariaLabel,
|
|
2637
2672
|
className: rootClasses,
|
|
2638
|
-
"data-testid": dataTestId
|
|
2673
|
+
"data-testid": dataTestId,
|
|
2674
|
+
role: ariaRole
|
|
2639
2675
|
}, {
|
|
2640
2676
|
children: [children, !headerExists && variant !== 'permanent' && jsxRuntime.jsx(DotIconButton, {
|
|
2641
2677
|
className: "dot-drawer-close-button",
|
|
@@ -2657,6 +2693,8 @@
|
|
|
2657
2693
|
|
|
2658
2694
|
var DotDrawerFooter = function DotDrawerFooter(_a) {
|
|
2659
2695
|
var ariaLabel = _a.ariaLabel,
|
|
2696
|
+
_b = _a.ariaRole,
|
|
2697
|
+
ariaRole = _b === void 0 ? 'region' : _b,
|
|
2660
2698
|
children = _a.children,
|
|
2661
2699
|
className = _a.className,
|
|
2662
2700
|
dataTestId = _a["data-testid"];
|
|
@@ -2664,7 +2702,8 @@
|
|
|
2664
2702
|
return jsxRuntime.jsx(StyleDrawerFooter, __assign({
|
|
2665
2703
|
"aria-label": ariaLabel,
|
|
2666
2704
|
className: rootClasses,
|
|
2667
|
-
"data-testid": dataTestId
|
|
2705
|
+
"data-testid": dataTestId,
|
|
2706
|
+
role: ariaRole
|
|
2668
2707
|
}, {
|
|
2669
2708
|
children: children
|
|
2670
2709
|
}), void 0);
|
|
@@ -2674,6 +2713,8 @@
|
|
|
2674
2713
|
var _b = _a.anchor,
|
|
2675
2714
|
anchor = _b === void 0 ? 'right' : _b,
|
|
2676
2715
|
ariaLabel = _a.ariaLabel,
|
|
2716
|
+
_c = _a.ariaRole,
|
|
2717
|
+
ariaRole = _c === void 0 ? 'presentation' : _c,
|
|
2677
2718
|
className = _a.className,
|
|
2678
2719
|
children = _a.children,
|
|
2679
2720
|
dataTestId = _a["data-testid"],
|
|
@@ -2685,10 +2726,10 @@
|
|
|
2685
2726
|
onClose = _a.onClose,
|
|
2686
2727
|
open = _a.open,
|
|
2687
2728
|
PaperProps = _a.PaperProps,
|
|
2688
|
-
|
|
2689
|
-
variant =
|
|
2690
|
-
|
|
2691
|
-
width =
|
|
2729
|
+
_d = _a.variant,
|
|
2730
|
+
variant = _d === void 0 ? 'temporary' : _d,
|
|
2731
|
+
_e = _a.width,
|
|
2732
|
+
width = _e === void 0 ? '256px' : _e;
|
|
2692
2733
|
React.useEffect(function () {
|
|
2693
2734
|
if (children !== undefined && drawerBodyProps !== undefined) {
|
|
2694
2735
|
console.warn('Please use `children` or `drawerBodyProps`. If both are used, `children` is ignored.');
|
|
@@ -2704,7 +2745,9 @@
|
|
|
2704
2745
|
var bodyTestId = drawerBodyProps ? drawerBodyProps["data-testid"] : 'drawer-body';
|
|
2705
2746
|
return jsxRuntime.jsxs(StyledDrawer, __assign({
|
|
2706
2747
|
ModalProps: ModalProps,
|
|
2707
|
-
PaperProps: PaperProps,
|
|
2748
|
+
PaperProps: __assign(__assign({}, PaperProps), {
|
|
2749
|
+
role: ariaRole
|
|
2750
|
+
}),
|
|
2708
2751
|
anchor: anchor,
|
|
2709
2752
|
"aria-label": ariaLabel,
|
|
2710
2753
|
classes: {
|
|
@@ -2715,6 +2758,7 @@
|
|
|
2715
2758
|
height: height,
|
|
2716
2759
|
onClose: handleClose,
|
|
2717
2760
|
open: open,
|
|
2761
|
+
role: ariaRole,
|
|
2718
2762
|
variant: variant,
|
|
2719
2763
|
width: width
|
|
2720
2764
|
}, {
|
|
@@ -2774,31 +2818,33 @@
|
|
|
2774
2818
|
};
|
|
2775
2819
|
var DotList = function DotList(_a) {
|
|
2776
2820
|
var ariaLabel = _a.ariaLabel,
|
|
2821
|
+
_b = _a.ariaRole,
|
|
2822
|
+
ariaRole = _b === void 0 ? 'list' : _b,
|
|
2777
2823
|
children = _a.children,
|
|
2778
2824
|
className = _a.className,
|
|
2779
|
-
|
|
2780
|
-
component =
|
|
2825
|
+
_c = _a.component,
|
|
2826
|
+
component = _c === void 0 ? 'ul' : _c,
|
|
2781
2827
|
dataTestId = _a["data-testid"],
|
|
2782
|
-
|
|
2783
|
-
dense =
|
|
2784
|
-
|
|
2785
|
-
disablePadding =
|
|
2786
|
-
|
|
2787
|
-
items =
|
|
2788
|
-
|
|
2789
|
-
menuPlacement =
|
|
2790
|
-
|
|
2791
|
-
nestedDrawerLeftSpacing =
|
|
2792
|
-
|
|
2793
|
-
nestedListType =
|
|
2794
|
-
|
|
2795
|
-
width =
|
|
2828
|
+
_d = _a.dense,
|
|
2829
|
+
dense = _d === void 0 ? false : _d,
|
|
2830
|
+
_e = _a.disablePadding,
|
|
2831
|
+
disablePadding = _e === void 0 ? false : _e,
|
|
2832
|
+
_f = _a.items,
|
|
2833
|
+
items = _f === void 0 ? [] : _f,
|
|
2834
|
+
_g = _a.menuPlacement,
|
|
2835
|
+
menuPlacement = _g === void 0 ? 'right-start' : _g,
|
|
2836
|
+
_h = _a.nestedDrawerLeftSpacing,
|
|
2837
|
+
nestedDrawerLeftSpacing = _h === void 0 ? 240 : _h,
|
|
2838
|
+
_j = _a.nestedListType,
|
|
2839
|
+
nestedListType = _j === void 0 ? 'expandable' : _j,
|
|
2840
|
+
_k = _a.width,
|
|
2841
|
+
width = _k === void 0 ? 240 : _k;
|
|
2796
2842
|
var rootClasses = useStylesWithRootClass(rootClassName$Z, className);
|
|
2797
2843
|
var listWidth = typeof width === 'number' ? width + "px" : width;
|
|
2798
2844
|
var listRef = React.useRef();
|
|
2799
|
-
var
|
|
2800
|
-
listItemIndex =
|
|
2801
|
-
setListItemIndex =
|
|
2845
|
+
var _l = React.useState(null),
|
|
2846
|
+
listItemIndex = _l[0],
|
|
2847
|
+
setListItemIndex = _l[1];
|
|
2802
2848
|
var updateSelectedListItem = function updateSelectedListItem(currentIndex) {
|
|
2803
2849
|
currentIndex === listItemIndex ? setListItemIndex(null) : setListItemIndex(currentIndex);
|
|
2804
2850
|
};
|
|
@@ -2812,6 +2858,7 @@
|
|
|
2812
2858
|
dense: dense,
|
|
2813
2859
|
disablePadding: disablePadding,
|
|
2814
2860
|
ref: listRef,
|
|
2861
|
+
role: ariaRole,
|
|
2815
2862
|
style: {
|
|
2816
2863
|
width: listWidth
|
|
2817
2864
|
}
|
|
@@ -2868,19 +2915,21 @@
|
|
|
2868
2915
|
};
|
|
2869
2916
|
var DotListItem = function DotListItem(_a) {
|
|
2870
2917
|
var ariaLabel = _a.ariaLabel,
|
|
2918
|
+
_b = _a.ariaRole,
|
|
2919
|
+
ariaRole = _b === void 0 ? 'listitem' : _b,
|
|
2871
2920
|
className = _a.className,
|
|
2872
|
-
|
|
2873
|
-
component =
|
|
2921
|
+
_c = _a.component,
|
|
2922
|
+
component = _c === void 0 ? 'li' : _c,
|
|
2874
2923
|
dataTestId = _a["data-testid"],
|
|
2875
|
-
|
|
2876
|
-
divider =
|
|
2924
|
+
_d = _a.divider,
|
|
2925
|
+
divider = _d === void 0 ? false : _d,
|
|
2877
2926
|
endIcon = _a.endIcon,
|
|
2878
2927
|
href = _a.href,
|
|
2879
2928
|
isOpened = _a.isOpened,
|
|
2880
2929
|
onClick = _a.onClick,
|
|
2881
2930
|
onMenuLeave = _a.onMenuLeave,
|
|
2882
|
-
|
|
2883
|
-
items =
|
|
2931
|
+
_e = _a.items,
|
|
2932
|
+
items = _e === void 0 ? [] : _e,
|
|
2884
2933
|
menuPlacement = _a.menuPlacement,
|
|
2885
2934
|
nestedDrawerLeftSpacing = _a.nestedDrawerLeftSpacing,
|
|
2886
2935
|
nestedListType = _a.nestedListType,
|
|
@@ -2891,13 +2940,13 @@
|
|
|
2891
2940
|
target = _a.target,
|
|
2892
2941
|
text = _a.text,
|
|
2893
2942
|
tooltip = _a.tooltip,
|
|
2894
|
-
|
|
2895
|
-
tooltipPlacement =
|
|
2943
|
+
_f = _a.tooltipPlacement,
|
|
2944
|
+
tooltipPlacement = _f === void 0 ? DEFAULT_TOOLTIP_PLACEMENT : _f;
|
|
2896
2945
|
var hasChildren = items.length > 0;
|
|
2897
2946
|
var isFlyout = nestedListType === 'menu' && hasChildren;
|
|
2898
|
-
var
|
|
2899
|
-
anchorEl =
|
|
2900
|
-
setAnchorEl =
|
|
2947
|
+
var _g = React.useState(null),
|
|
2948
|
+
anchorEl = _g[0],
|
|
2949
|
+
setAnchorEl = _g[1];
|
|
2901
2950
|
var showEndIcon = endIcon || hasChildren;
|
|
2902
2951
|
var rootClasses = useStylesWithRootClass(listItemRootClass, className, isOpened ? 'open' : '');
|
|
2903
2952
|
var toggleOpen = function toggleOpen(event) {
|
|
@@ -2945,6 +2994,7 @@
|
|
|
2945
2994
|
divider: divider,
|
|
2946
2995
|
href: onClick ? null : href,
|
|
2947
2996
|
onClick: onClick || !href ? handleClick : null,
|
|
2997
|
+
role: onClick ? 'button' : ariaRole,
|
|
2948
2998
|
selected: isFlyout ? isOpened : selected,
|
|
2949
2999
|
target: target
|
|
2950
3000
|
}, {
|
|
@@ -3313,22 +3363,24 @@
|
|
|
3313
3363
|
|
|
3314
3364
|
function SearchInput(_a) {
|
|
3315
3365
|
var dataTestId = _a["data-testid"],
|
|
3316
|
-
_b = _a.
|
|
3317
|
-
|
|
3366
|
+
_b = _a.ariaRole,
|
|
3367
|
+
ariaRole = _b === void 0 ? 'searchbox' : _b,
|
|
3368
|
+
_c = _a.autoFocus,
|
|
3369
|
+
autoFocus = _c === void 0 ? true : _c,
|
|
3318
3370
|
className = _a.className,
|
|
3319
|
-
|
|
3320
|
-
disabled =
|
|
3371
|
+
_d = _a.disabled,
|
|
3372
|
+
disabled = _d === void 0 ? false : _d,
|
|
3321
3373
|
onChange = _a.onChange,
|
|
3322
3374
|
onClear = _a.onClear,
|
|
3323
|
-
|
|
3324
|
-
placeholder =
|
|
3325
|
-
|
|
3326
|
-
tooltip =
|
|
3375
|
+
_e = _a.placeholder,
|
|
3376
|
+
placeholder = _e === void 0 ? 'Search' : _e,
|
|
3377
|
+
_f = _a.tooltip,
|
|
3378
|
+
tooltip = _f === void 0 ? null : _f,
|
|
3327
3379
|
value = _a.value;
|
|
3328
3380
|
var rootClasses = useStylesWithRootClass(rootClassName$P, className);
|
|
3329
|
-
var
|
|
3330
|
-
searchText =
|
|
3331
|
-
setSearchText =
|
|
3381
|
+
var _g = React.useState(value),
|
|
3382
|
+
searchText = _g[0],
|
|
3383
|
+
setSearchText = _g[1];
|
|
3332
3384
|
var previousSearchText = '';
|
|
3333
3385
|
var handleChange = React.useCallback(function (event) {
|
|
3334
3386
|
previousSearchText = event.target.value;
|
|
@@ -3362,6 +3414,7 @@
|
|
|
3362
3414
|
title: tooltip
|
|
3363
3415
|
}, {
|
|
3364
3416
|
children: jsxRuntime.jsx(DotInputText, {
|
|
3417
|
+
ariaRole: ariaRole,
|
|
3365
3418
|
"data-testid": dataTestId,
|
|
3366
3419
|
autoFocus: autoFocus,
|
|
3367
3420
|
className: "search-text",
|
|
@@ -3882,7 +3935,8 @@
|
|
|
3882
3935
|
if (selectedAppType && appTypeMap && appTypeLabels) {
|
|
3883
3936
|
var labelConfig = appTypeLabels.get(selectedAppType);
|
|
3884
3937
|
return jsxRuntime.jsxs("div", __assign({
|
|
3885
|
-
className: "content"
|
|
3938
|
+
className: "content",
|
|
3939
|
+
role: "contentinfo"
|
|
3886
3940
|
}, {
|
|
3887
3941
|
children: [jsxRuntime.jsx("span", {
|
|
3888
3942
|
children: jsxRuntime.jsx(DotButton, __assign({
|
|
@@ -3898,7 +3952,9 @@
|
|
|
3898
3952
|
}, void 0)
|
|
3899
3953
|
}), void 0)
|
|
3900
3954
|
}, void 0), jsxRuntime.jsx("div", __assign({
|
|
3901
|
-
|
|
3955
|
+
"aria-level": 2,
|
|
3956
|
+
className: "product-heading",
|
|
3957
|
+
role: "heading"
|
|
3902
3958
|
}, {
|
|
3903
3959
|
children: createAppTypeLabel(selectedAppType, labelConfig.logo, labelConfig.singleTypeApps)
|
|
3904
3960
|
}), void 0), ((_a = appTypeMap === null || appTypeMap === void 0 ? void 0 : appTypeMap.get(selectedAppType)) === null || _a === void 0 ? void 0 : _a.length) >= searchInstancesThreshold && jsxRuntime.jsx("div", __assign({
|
|
@@ -3911,14 +3967,16 @@
|
|
|
3911
3967
|
value: searchText
|
|
3912
3968
|
}, void 0)
|
|
3913
3969
|
}), void 0), jsxRuntime.jsx("div", __assign({
|
|
3914
|
-
className: "product-applications"
|
|
3970
|
+
className: "product-applications",
|
|
3971
|
+
role: "list"
|
|
3915
3972
|
}, {
|
|
3916
3973
|
children: filteredAppInstances()
|
|
3917
3974
|
}), void 0)]
|
|
3918
3975
|
}), void 0);
|
|
3919
3976
|
} else {
|
|
3920
3977
|
return jsxRuntime.jsxs("div", __assign({
|
|
3921
|
-
className: "content"
|
|
3978
|
+
className: "content",
|
|
3979
|
+
role: "contentinfo"
|
|
3922
3980
|
}, {
|
|
3923
3981
|
children: [jsxRuntime.jsx(DotList, {
|
|
3924
3982
|
items: appTypeMenuItems === null || appTypeMenuItems === void 0 ? void 0 : appTypeMenuItems.map(function (item) {
|
|
@@ -3934,7 +3992,9 @@
|
|
|
3934
3992
|
var header = {
|
|
3935
3993
|
className: 'app-switcher-header',
|
|
3936
3994
|
children: jsxRuntime.jsxs("div", __assign({
|
|
3995
|
+
"aria-level": 1,
|
|
3937
3996
|
className: "app-switcher-header-title",
|
|
3997
|
+
role: "heading",
|
|
3938
3998
|
style: {
|
|
3939
3999
|
marginTop: yOffset + 'px',
|
|
3940
4000
|
width: '80%'
|
|
@@ -3946,6 +4006,8 @@
|
|
|
3946
4006
|
type: "image",
|
|
3947
4007
|
variant: "circular"
|
|
3948
4008
|
}, void 0), jsxRuntime.jsx(DotTypography, __assign({
|
|
4009
|
+
ariaRole: "heading",
|
|
4010
|
+
ariaLevel: 1,
|
|
3949
4011
|
className: "app-switcher-label"
|
|
3950
4012
|
}, {
|
|
3951
4013
|
children: "App switcher"
|
|
@@ -4744,6 +4806,7 @@
|
|
|
4744
4806
|
endAdornmentTooltip = _a.endAdornmentTooltip,
|
|
4745
4807
|
_e = _a.error,
|
|
4746
4808
|
error = _e === void 0 ? false : _e,
|
|
4809
|
+
filterOptions = _a.filterOptions,
|
|
4747
4810
|
_f = _a.filterSelectedOptions,
|
|
4748
4811
|
filterSelectedOptions = _f === void 0 ? true : _f,
|
|
4749
4812
|
_g = _a.freesolo,
|
|
@@ -4981,6 +5044,7 @@
|
|
|
4981
5044
|
"data-testid": dataTestId,
|
|
4982
5045
|
defaultValue: defaultValue,
|
|
4983
5046
|
disabled: disabled,
|
|
5047
|
+
filterOptions: filterOptions,
|
|
4984
5048
|
filterSelectedOptions: filterSelectedOptions,
|
|
4985
5049
|
freeSolo: freesolo,
|
|
4986
5050
|
getOptionLabel: function (option) {
|
|
@@ -5446,7 +5510,9 @@
|
|
|
5446
5510
|
itemsAfterCollapse: itemsAfterCollapse,
|
|
5447
5511
|
maxItems: getMaxItems(adjustMaxItems, maxVisibleItems, maxItems),
|
|
5448
5512
|
ref: breadcrumbRef,
|
|
5513
|
+
role: "navigation",
|
|
5449
5514
|
separator: jsxRuntime.jsx(DotIcon, {
|
|
5515
|
+
ariaRole: "presentation",
|
|
5450
5516
|
className: "separator",
|
|
5451
5517
|
iconId: "chevron-right"
|
|
5452
5518
|
}, void 0)
|
|
@@ -6799,6 +6865,7 @@
|
|
|
6799
6865
|
return jsxRuntime.jsx(StyledFormControlLabel, {
|
|
6800
6866
|
className: rootClasses,
|
|
6801
6867
|
control: radioControl,
|
|
6868
|
+
"aria-label": value,
|
|
6802
6869
|
label: label || radioControl,
|
|
6803
6870
|
labelPlacement: labelPlacement,
|
|
6804
6871
|
value: value
|
|
@@ -6807,6 +6874,8 @@
|
|
|
6807
6874
|
|
|
6808
6875
|
var DotRadioGroup = function DotRadioGroup(_a) {
|
|
6809
6876
|
var ariaLabel = _a.ariaLabel,
|
|
6877
|
+
_b = _a.ariaRole,
|
|
6878
|
+
ariaRole = _b === void 0 ? 'radiogroup' : _b,
|
|
6810
6879
|
className = _a.className,
|
|
6811
6880
|
dataTestId = _a["data-testid"],
|
|
6812
6881
|
defaultValue = _a.defaultValue,
|
|
@@ -6816,22 +6885,22 @@
|
|
|
6816
6885
|
helperText = _a.helperText,
|
|
6817
6886
|
groupLabel = _a.groupLabel,
|
|
6818
6887
|
name = _a.name,
|
|
6819
|
-
|
|
6820
|
-
labelPlacement =
|
|
6888
|
+
_c = _a.labelPlacement,
|
|
6889
|
+
labelPlacement = _c === void 0 ? 'end' : _c,
|
|
6821
6890
|
onChange = _a.onChange,
|
|
6822
6891
|
value = _a.value,
|
|
6823
6892
|
options = _a.options,
|
|
6824
6893
|
startIcon = _a.startIcon,
|
|
6825
6894
|
required = _a.required,
|
|
6826
6895
|
row = _a.row,
|
|
6827
|
-
|
|
6828
|
-
size =
|
|
6896
|
+
_d = _a.size,
|
|
6897
|
+
size = _d === void 0 ? 'medium' : _d;
|
|
6829
6898
|
var placement = "" + placementClassName + labelPlacement;
|
|
6830
6899
|
var rootClasses = useStylesWithRootClass(rootClassName$A, className, placement);
|
|
6831
6900
|
var radioValue = value || defaultValue;
|
|
6832
|
-
var
|
|
6833
|
-
selectedValue =
|
|
6834
|
-
setSelectedValue =
|
|
6901
|
+
var _e = React.useState(radioValue),
|
|
6902
|
+
selectedValue = _e[0],
|
|
6903
|
+
setSelectedValue = _e[1];
|
|
6835
6904
|
/* This will ensure that value can be updated from the outside */
|
|
6836
6905
|
React.useEffect(function () {
|
|
6837
6906
|
setSelectedValue(radioValue);
|
|
@@ -6887,6 +6956,7 @@
|
|
|
6887
6956
|
defaultValue: defaultValue,
|
|
6888
6957
|
name: name,
|
|
6889
6958
|
onChange: handleChange,
|
|
6959
|
+
role: ariaRole,
|
|
6890
6960
|
row: row,
|
|
6891
6961
|
value: selectedValue
|
|
6892
6962
|
}, {
|
|
@@ -7600,39 +7670,41 @@
|
|
|
7600
7670
|
*/
|
|
7601
7671
|
var DotInlineEdit = function DotInlineEdit(_a) {
|
|
7602
7672
|
var ariaLabel = _a.ariaLabel,
|
|
7673
|
+
_b = _a.ariaRole,
|
|
7674
|
+
ariaRole = _b === void 0 ? 'combobox' : _b,
|
|
7603
7675
|
bindings = _a.bindings,
|
|
7604
7676
|
charactersLimit = _a.charactersLimit,
|
|
7605
7677
|
className = _a.className,
|
|
7606
7678
|
dataTestId = _a["data-testid"],
|
|
7607
|
-
|
|
7608
|
-
fullWidth =
|
|
7679
|
+
_c = _a.fullWidth,
|
|
7680
|
+
fullWidth = _c === void 0 ? true : _c,
|
|
7609
7681
|
hideActionButtons = _a.hideActionButtons,
|
|
7610
7682
|
name = _a.name,
|
|
7611
7683
|
onChange = _a.onChange,
|
|
7612
7684
|
onEditStateChange = _a.onEditStateChange,
|
|
7613
7685
|
readOnly = _a.readOnly,
|
|
7614
7686
|
selectTextOnEdit = _a.selectTextOnEdit,
|
|
7615
|
-
|
|
7616
|
-
startEditable =
|
|
7617
|
-
|
|
7618
|
-
tabIndex =
|
|
7687
|
+
_d = _a.startEditable,
|
|
7688
|
+
startEditable = _d === void 0 ? false : _d,
|
|
7689
|
+
_e = _a.tabIndex,
|
|
7690
|
+
tabIndex = _e === void 0 ? 0 : _e,
|
|
7619
7691
|
tooltip = _a.tooltip,
|
|
7620
|
-
|
|
7621
|
-
typography =
|
|
7622
|
-
|
|
7623
|
-
value =
|
|
7624
|
-
var _g = React.useState(false),
|
|
7625
|
-
editing = _g[0],
|
|
7626
|
-
setEditing = _g[1];
|
|
7692
|
+
_f = _a.typography,
|
|
7693
|
+
typography = _f === void 0 ? 'body1' : _f,
|
|
7694
|
+
_g = _a.value,
|
|
7695
|
+
value = _g === void 0 ? '' : _g;
|
|
7627
7696
|
var _h = React.useState(false),
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
var _j = React.useState(
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
var _k = React.useState(
|
|
7634
|
-
|
|
7635
|
-
|
|
7697
|
+
editing = _h[0],
|
|
7698
|
+
setEditing = _h[1];
|
|
7699
|
+
var _j = React.useState(false),
|
|
7700
|
+
showTooltip = _j[0],
|
|
7701
|
+
setShowTooltip = _j[1];
|
|
7702
|
+
var _k = React.useState(''),
|
|
7703
|
+
originalValue = _k[0],
|
|
7704
|
+
setOriginalValue = _k[1];
|
|
7705
|
+
var _l = React.useState(value),
|
|
7706
|
+
inputValue = _l[0],
|
|
7707
|
+
setInputValue = _l[1];
|
|
7636
7708
|
var inputRef = React.useRef();
|
|
7637
7709
|
var inlineEditRef = React.useRef();
|
|
7638
7710
|
React.useEffect(function () {
|
|
@@ -7789,7 +7861,8 @@
|
|
|
7789
7861
|
children: viewModeChildren
|
|
7790
7862
|
}), void 0) : jsxRuntime.jsx("div", __assign({
|
|
7791
7863
|
className: viewModeClasses,
|
|
7792
|
-
"data-testid": dataTestId && dataTestId + "-view-mode-wrapper"
|
|
7864
|
+
"data-testid": dataTestId && dataTestId + "-view-mode-wrapper",
|
|
7865
|
+
role: "presentation"
|
|
7793
7866
|
}, {
|
|
7794
7867
|
children: viewModeChildren
|
|
7795
7868
|
}), void 0);
|
|
@@ -7873,6 +7946,7 @@
|
|
|
7873
7946
|
return handleKeyPress(event);
|
|
7874
7947
|
} : undefined,
|
|
7875
7948
|
ref: inlineEditRef,
|
|
7949
|
+
role: ariaRole,
|
|
7876
7950
|
tabIndex: !readOnly ? tabIndex : undefined,
|
|
7877
7951
|
typography: typography
|
|
7878
7952
|
}, {
|
|
@@ -7969,16 +8043,19 @@
|
|
|
7969
8043
|
componentId: "l7oxi2-0"
|
|
7970
8044
|
})(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
7971
8045
|
var theme = _a.theme;
|
|
7972
|
-
return styled.css(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n &.", " {\n background-color: ", ";\n color: ", ";\n
|
|
8046
|
+
return styled.css(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n &.", " {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n\n &.MuiChip-outlined {\n &.error {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n\n &.success {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n\n &.warning {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n\n &.in-progress {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n }\n\n &.MuiChip-filled {\n &.error {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n\n &.success {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n\n &.warning {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n\n &.in-progress {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n }\n }\n "], ["\n &.", " {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n\n &.MuiChip-outlined {\n &.error {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n\n &.success {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n\n &.warning {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n\n &.in-progress {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n }\n\n &.MuiChip-filled {\n &.error {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n\n &.success {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n\n &.warning {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n\n &.in-progress {\n background-color: ", ";\n border-color: ", ";\n color: ", ";\n .dot-icon {\n color: ", ";\n }\n }\n }\n }\n "])), rootClassName$n, function (_a) {
|
|
7973
8047
|
var backgroundcolor = _a.backgroundcolor;
|
|
7974
8048
|
return backgroundcolor || theme.palette.grey[200];
|
|
8049
|
+
}, function (_a) {
|
|
8050
|
+
var bordercolor = _a.bordercolor;
|
|
8051
|
+
return bordercolor ? bordercolor : theme.palette.layer.n700;
|
|
7975
8052
|
}, function (_a) {
|
|
7976
8053
|
var labelcolor = _a.labelcolor;
|
|
7977
8054
|
return labelcolor ? labelcolor : theme.palette.layer.n700;
|
|
7978
8055
|
}, function (_a) {
|
|
7979
|
-
var
|
|
7980
|
-
return
|
|
7981
|
-
}, theme.palette.error[100], theme.palette.error.main, theme.palette.
|
|
8056
|
+
var labelcolor = _a.labelcolor;
|
|
8057
|
+
return labelcolor ? labelcolor : theme.palette.layer.n700;
|
|
8058
|
+
}, theme.palette.error[100], theme.palette.error.main, theme.palette.layer.n700, theme.palette.error.main, theme.palette.success[100], theme.palette.success.main, theme.palette.layer.n700, theme.palette.success.main, theme.palette.warning[100], theme.palette.warning.main, theme.palette.layer.n700, theme.palette.warning.main, theme.palette.primary[100], theme.palette.primary.main, theme.palette.layer.n700, theme.palette.primary.main, theme.palette.error.main, theme.palette.error.main, theme.palette.layer.n0, theme.palette.layer.n0, theme.palette.success.main, theme.palette.success.main, theme.palette.layer.n0, theme.palette.layer.n0, theme.palette.warning.main, theme.palette.warning.main, theme.palette.layer.n700, theme.palette.layer.n700, theme.palette.primary.main, theme.palette.primary.main, theme.palette.layer.n0, theme.palette.layer.n0);
|
|
7982
8059
|
});
|
|
7983
8060
|
var templateObject_1$n, templateObject_2$m;
|
|
7984
8061
|
|
|
@@ -9987,8 +10064,10 @@
|
|
|
9987
10064
|
var DotFileUpload = function DotFileUpload(_a) {
|
|
9988
10065
|
var accept = _a.accept,
|
|
9989
10066
|
ariaLabel = _a.ariaLabel,
|
|
9990
|
-
_b = _a.
|
|
9991
|
-
|
|
10067
|
+
_b = _a.ariaRole,
|
|
10068
|
+
ariaRole = _b === void 0 ? 'region' : _b,
|
|
10069
|
+
_c = _a.buttonOnly,
|
|
10070
|
+
buttonOnly = _c === void 0 ? false : _c,
|
|
9992
10071
|
className = _a.className,
|
|
9993
10072
|
dataTestId = _a["data-testid"],
|
|
9994
10073
|
disabled = _a.disabled,
|
|
@@ -9998,12 +10077,12 @@
|
|
|
9998
10077
|
onChange = _a.onChange,
|
|
9999
10078
|
onDragEnter = _a.onDragEnter,
|
|
10000
10079
|
onFileClick = _a.onFileClick;
|
|
10001
|
-
var
|
|
10002
|
-
uploadedFiles =
|
|
10003
|
-
setUploadedFiles =
|
|
10004
|
-
var
|
|
10005
|
-
hasMaxFilesError =
|
|
10006
|
-
setHasMaxFilesError =
|
|
10080
|
+
var _d = React.useState([]),
|
|
10081
|
+
uploadedFiles = _d[0],
|
|
10082
|
+
setUploadedFiles = _d[1];
|
|
10083
|
+
var _e = React.useState(false),
|
|
10084
|
+
hasMaxFilesError = _e[0],
|
|
10085
|
+
setHasMaxFilesError = _e[1];
|
|
10007
10086
|
var isUploadDisabled = disabled || maxFiles && uploadedFiles.length >= maxFiles;
|
|
10008
10087
|
var rootClasses = useStylesWithRootClass(rootClassName$6, className, !buttonOnly ? dropZoneClassName : '', isUploadDisabled ? 'disabled' : '');
|
|
10009
10088
|
var maxFilesClasses = useStylesWithRootClass('dot-max-files-message', hasMaxFilesError ? 'dot-max-files-reached' : '');
|
|
@@ -10028,7 +10107,7 @@
|
|
|
10028
10107
|
var onDrop = React.useCallback(function (acceptedFiles, fileRejections) {
|
|
10029
10108
|
hideFilesList ? setNewlyUploadedFiles(acceptedFiles, fileRejections) : parseFiles(acceptedFiles, fileRejections);
|
|
10030
10109
|
}, [hideFilesList, setNewlyUploadedFiles, parseFiles]);
|
|
10031
|
-
var
|
|
10110
|
+
var _f = reactDropzone.useDropzone({
|
|
10032
10111
|
accept: accept,
|
|
10033
10112
|
disabled: isUploadDisabled,
|
|
10034
10113
|
maxSize: maxSize * 1000000,
|
|
@@ -10037,10 +10116,10 @@
|
|
|
10037
10116
|
onDragEnter: onDragEnter,
|
|
10038
10117
|
onDrop: onDrop
|
|
10039
10118
|
}),
|
|
10040
|
-
getRootProps =
|
|
10041
|
-
getInputProps =
|
|
10042
|
-
isDragActive =
|
|
10043
|
-
open =
|
|
10119
|
+
getRootProps = _f.getRootProps,
|
|
10120
|
+
getInputProps = _f.getInputProps,
|
|
10121
|
+
isDragActive = _f.isDragActive,
|
|
10122
|
+
open = _f.open;
|
|
10044
10123
|
var deleteFile = function deleteFile(fileIndexToBeRemoved) {
|
|
10045
10124
|
uploadedFiles.splice(fileIndexToBeRemoved, 1);
|
|
10046
10125
|
setUploadedFiles(__spreadArray([], uploadedFiles));
|
|
@@ -10053,7 +10132,8 @@
|
|
|
10053
10132
|
uploadedFiles: uploadedFiles
|
|
10054
10133
|
});
|
|
10055
10134
|
return jsxRuntime.jsxs(StyledFileUploadContainer, __assign({
|
|
10056
|
-
className: containerClassName$2
|
|
10135
|
+
className: containerClassName$2,
|
|
10136
|
+
role: ariaRole
|
|
10057
10137
|
}, {
|
|
10058
10138
|
children: [jsxRuntime.jsxs(StyledFileUpload, __assign({}, getRootProps(), {
|
|
10059
10139
|
"aria-label": ariaLabel,
|