@digital-ai/dot-components 2.7.4 → 2.8.1
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 +45 -9
- package/index.esm.js +106 -32
- package/index.umd.js +263 -174
- 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 +7 -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/input-form-fields/InputFormFields.propTypes.d.ts +2 -0
- package/lib/components/input-form-fields/InputSelect.d.ts +1 -1
- package/lib/components/input-form-fields/InputSelect.stories.d.ts +1 -1
- package/lib/components/input-form-fields/InputText.d.ts +2 -1
- package/lib/components/input-form-fields/InputText.stories.d.ts +2 -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/time-picker/TimePicker.d.ts +3 -1
- package/lib/components/time-picker/TimePicker.stories.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
|
},
|
|
@@ -368,7 +384,7 @@
|
|
|
368
384
|
})(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
369
385
|
var theme = _a.theme,
|
|
370
386
|
InputProps = _a.InputProps;
|
|
371
|
-
return styled.css(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n &.", " {\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiInputBase-inputSizeSmall {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n\n &:not(textarea) {\n /* padding above and below together is 21px, and total height should be 40px */\n height: 19px;\n }\n }\n .MuiInputBase-inputMultiline {\n padding: 0;\n }\n }\n\n &.", ", &.", " {\n .", " {\n color: ", ";\n\n .dot-icon i {\n margin-top: -2px;\n }\n }\n\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n\n .MuiInputBase-inputSizeSmall:not(textarea) {\n height: 19px;\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n\n select.dot-select {\n padding-left: ", ";\n }\n\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n\n .MuiSelect-icon {\n right: ", ";\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n\n &.", " .", " {\n border-color: ", ";\n }\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .MuiInputBase-inputAdornedStart {\n padding-left: 12px;\n }\n .MuiInputBase-inputAdornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n ", ";\n }\n }\n "], ["\n &.", " {\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiInputBase-inputSizeSmall {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n\n &:not(textarea) {\n /* padding above and below together is 21px, and total height should be 40px */\n height: 19px;\n }\n }\n .MuiInputBase-inputMultiline {\n padding: 0;\n }\n }\n\n &.", ", &.", " {\n .", " {\n color: ", ";\n\n .dot-icon i {\n margin-top: -2px;\n }\n }\n\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n\n .MuiInputBase-inputSizeSmall:not(textarea) {\n height: 19px;\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n\n select.dot-select {\n padding-left: ", ";\n }\n\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n\n .MuiSelect-icon {\n right: ", ";\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n\n &.", " .", " {\n border-color: ", ";\n }\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .MuiInputBase-inputAdornedStart {\n padding-left: 12px;\n }\n .MuiInputBase-inputAdornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n ", ";\n }\n }\n "])), rootClassName$13, InputProps.startAdornment ? "18px 12px 18px 0px" : "18px 12px", rootSelectClassName, rootClassName$13, adornmentIconClassName, theme.palette.layer.n700, theme.spacing(1.5), InputProps.endAdornment ? "44px" : "12px", successClassName, theme.palette.secondary.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.secondary.main, errorClassName, theme.palette.error.main, adornmentIconClassName, theme.palette.error.main, warningClassName, theme.palette.warning.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.warning.main, warningClassName, fieldsetClassName, theme.palette.warning[500], theme.palette.grey[700], formHelperTextRootStyles(theme));
|
|
387
|
+
return styled.css(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n &.", " {\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiInputBase-inputSizeSmall {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n\n &:not(textarea) {\n /* padding above and below together is 21px, and total height should be 40px */\n height: 19px;\n }\n }\n .MuiInputBase-inputMultiline {\n padding: 0;\n }\n }\n\n &.", " .", " {\n // inputSelect has an arrow so we need spacing for end adornment\n margin-right: ", ";\n }\n\n &.", ", &.", " {\n .", " {\n color: ", ";\n p {\n font-size: ", "px;\n margin: 0;\n }\n\n .dot-icon i {\n margin-top: -2px;\n }\n }\n\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n\n .MuiInputBase-inputSizeSmall:not(textarea) {\n height: 19px;\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n\n select.dot-select {\n padding-left: ", ";\n }\n\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n\n .MuiSelect-icon {\n right: ", ";\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n\n &.", " .", " {\n border-color: ", ";\n }\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .MuiInputBase-inputAdornedStart {\n padding-left: 12px;\n }\n .MuiInputBase-inputAdornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n ", ";\n }\n }\n "], ["\n &.", " {\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n .MuiInputBase-input {\n box-sizing: content-box;\n }\n .MuiOutlinedInput-input {\n padding: ", ";\n }\n .MuiInputBase-inputSizeSmall {\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n\n &:not(textarea) {\n /* padding above and below together is 21px, and total height should be 40px */\n height: 19px;\n }\n }\n .MuiInputBase-inputMultiline {\n padding: 0;\n }\n }\n\n &.", " .", " {\n // inputSelect has an arrow so we need spacing for end adornment\n margin-right: ", ";\n }\n\n &.", ", &.", " {\n .", " {\n color: ", ";\n p {\n font-size: ", "px;\n margin: 0;\n }\n\n .dot-icon i {\n margin-top: -2px;\n }\n }\n\n .MuiInputBase-root {\n margin-bottom: 0;\n }\n\n .MuiInputBase-inputSizeSmall:not(textarea) {\n height: 19px;\n padding-top: 10.5px;\n padding-bottom: 10.5px;\n }\n\n select.dot-select {\n padding-left: ", ";\n }\n\n .MuiSelect-select:focus {\n background-color: transparent;\n }\n\n .MuiSelect-icon {\n right: ", ";\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiFormLabel-root.Mui-focused {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n &.", " {\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .", " .dot-icon {\n color: ", ";\n }\n }\n\n .MuiOutlinedInput-adornedStart {\n padding-left: 12px;\n\n &.", " .", " {\n border-color: ", ";\n }\n }\n\n .MuiInputLabel-outlined.MuiInputLabel-shrink {\n color: ", ";\n }\n\n .MuiInputBase-inputAdornedStart {\n padding-left: 12px;\n }\n .MuiInputBase-inputAdornedEnd {\n padding-right: 12px;\n }\n .MuiFormHelperText-root {\n ", ";\n }\n }\n "])), rootClassName$13, InputProps.startAdornment ? "18px 12px 18px 0px" : "18px 12px", rootSelectClassName, adornmentIconClassName, theme.spacing(2), rootSelectClassName, rootClassName$13, adornmentIconClassName, theme.palette.layer.n700, theme.typography.body2.fontSize, theme.spacing(1.5), InputProps.endAdornment ? "44px" : "12px", successClassName, theme.palette.secondary.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.secondary.main, errorClassName, theme.palette.error.main, adornmentIconClassName, theme.palette.error.main, warningClassName, theme.palette.warning.main, theme.palette.grey[700], adornmentIconClassName, theme.palette.warning.main, warningClassName, fieldsetClassName, theme.palette.warning[500], theme.palette.grey[700], formHelperTextRootStyles(theme));
|
|
372
388
|
});
|
|
373
389
|
var templateObject_1$19, templateObject_2$14, templateObject_3$c, templateObject_4$a, templateObject_5$3, templateObject_6$1;
|
|
374
390
|
|
|
@@ -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);
|
|
@@ -1938,36 +1957,38 @@
|
|
|
1938
1957
|
componentId: "sx99hh-0"
|
|
1939
1958
|
})(templateObject_2$10 || (templateObject_2$10 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
1940
1959
|
var theme = _a.theme;
|
|
1941
|
-
return styled.css(templateObject_1$14 || (templateObject_1$14 = __makeTemplateObject(["\n &.", " {\n margin: ", ";\n min-width: auto;\n white-space: nowrap;\n\n
|
|
1960
|
+
return styled.css(templateObject_1$14 || (templateObject_1$14 = __makeTemplateObject(["\n &.", " {\n margin: ", ";\n padding: ", ";\n min-width: auto;\n white-space: nowrap;\n\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n\n &.MuiButton-containedSecondary {\n background-color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n }\n\n &.MuiButton-outlined,\n &.MuiButton-text {\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n }\n\n &.MuiButton-outlined {\n border-color: ", ";\n color: ", ";\n }\n\n &.MuiButton-text {\n background-color: transparent;\n color: ", ";\n }\n\n &.Mui-disabled {\n background-color: ", ";\n color: ", ";\n\n &.MuiButton-outlined {\n border-color: ", ";\n }\n\n &.MuiButton-text,\n &.MuiButton-containedSecondary {\n background-color: transparent;\n }\n }\n\n &:not(.MuiButton-sizeLarge):not(.MuiButton-sizeSmall) {\n /* Override height for medium size */\n height: ", ";\n }\n\n .dot-icon {\n display: flex;\n padding: 0;\n }\n }\n "], ["\n &.", " {\n margin: ", ";\n padding: ", ";\n min-width: auto;\n white-space: nowrap;\n\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n\n &.MuiButton-containedSecondary {\n background-color: ", ";\n\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n }\n\n &.MuiButton-outlined,\n &.MuiButton-text {\n &:hover {\n background-color: ", ";\n }\n &:active {\n background-color: ", ";\n }\n }\n\n &.MuiButton-outlined {\n border-color: ", ";\n color: ", ";\n }\n\n &.MuiButton-text {\n background-color: transparent;\n color: ", ";\n }\n\n &.Mui-disabled {\n background-color: ", ";\n color: ", ";\n\n &.MuiButton-outlined {\n border-color: ", ";\n }\n\n &.MuiButton-text,\n &.MuiButton-containedSecondary {\n background-color: transparent;\n }\n }\n\n &:not(.MuiButton-sizeLarge):not(.MuiButton-sizeSmall) {\n /* Override height for medium size */\n height: ", ";\n }\n\n .dot-icon {\n display: flex;\n padding: 0;\n }\n }\n "])), rootClassName$$, theme.spacing(0.5), theme.spacing(0.75, 2), theme.palette.primary[800], theme.palette.primary[400], theme.palette.error[500], theme.palette.error[600], theme.palette.error[400], theme.palette.grey[50], theme.palette.grey[100], theme.palette.grey[300], theme.palette.grey[700], theme.palette.grey[700], theme.palette.grey[50], theme.palette.grey[400], theme.palette.grey[200], theme.spacing(5));
|
|
1942
1961
|
});
|
|
1943
1962
|
var templateObject_1$14, templateObject_2$10;
|
|
1944
1963
|
|
|
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
|
}, {
|
|
@@ -3109,6 +3159,7 @@
|
|
|
3109
3159
|
error = _a.error,
|
|
3110
3160
|
dataTestId = _a.dataTestId,
|
|
3111
3161
|
endIcon = _a.endIcon,
|
|
3162
|
+
endText = _a.endText,
|
|
3112
3163
|
success = _a.success,
|
|
3113
3164
|
warning = _a.warning;
|
|
3114
3165
|
var renderIcon = function renderIcon(iconType) {
|
|
@@ -3125,7 +3176,7 @@
|
|
|
3125
3176
|
className: adornmentIconClassName + " end",
|
|
3126
3177
|
position: "end"
|
|
3127
3178
|
}, {
|
|
3128
|
-
children: endAdornmentIcon
|
|
3179
|
+
children: endAdornmentIcon || endText
|
|
3129
3180
|
}), void 0);
|
|
3130
3181
|
return endAdornmentTooltip ? jsxRuntime.jsx(DotTooltip, __assign({
|
|
3131
3182
|
title: endAdornmentTooltip
|
|
@@ -3155,6 +3206,7 @@
|
|
|
3155
3206
|
hasDebounce = _a.hasDebounce,
|
|
3156
3207
|
helperText = _a.helperText,
|
|
3157
3208
|
endIcon = _a.endIcon,
|
|
3209
|
+
endText = _a.endText,
|
|
3158
3210
|
id = _a.id,
|
|
3159
3211
|
inputRef = _a.inputRef,
|
|
3160
3212
|
label = _a.label,
|
|
@@ -3234,13 +3286,14 @@
|
|
|
3234
3286
|
children: startIcon
|
|
3235
3287
|
}), void 0);
|
|
3236
3288
|
};
|
|
3237
|
-
var
|
|
3238
|
-
if (!hasEndAdornmentIcon) return null;
|
|
3289
|
+
var endAdornmentIconOrText = function endAdornmentIconOrText() {
|
|
3290
|
+
if (!hasEndAdornmentIcon && !endText) return null;
|
|
3239
3291
|
return jsxRuntime.jsx(EndAdornment, __assign({}, {
|
|
3240
3292
|
endAdornmentTooltip: endAdornmentTooltip,
|
|
3241
3293
|
error: error,
|
|
3242
3294
|
dataTestId: dataTestId,
|
|
3243
3295
|
endIcon: endIcon,
|
|
3296
|
+
endText: endText,
|
|
3244
3297
|
success: success,
|
|
3245
3298
|
warning: warning
|
|
3246
3299
|
}), void 0);
|
|
@@ -3258,7 +3311,7 @@
|
|
|
3258
3311
|
}), void 0), jsxRuntime.jsx(StyledTextField, {
|
|
3259
3312
|
InputProps: {
|
|
3260
3313
|
startAdornment: startAdornmentIcon(),
|
|
3261
|
-
endAdornment:
|
|
3314
|
+
endAdornment: endAdornmentIconOrText()
|
|
3262
3315
|
},
|
|
3263
3316
|
"aria-label": name,
|
|
3264
3317
|
autoComplete: autoComplete,
|
|
@@ -3313,22 +3366,24 @@
|
|
|
3313
3366
|
|
|
3314
3367
|
function SearchInput(_a) {
|
|
3315
3368
|
var dataTestId = _a["data-testid"],
|
|
3316
|
-
_b = _a.
|
|
3317
|
-
|
|
3369
|
+
_b = _a.ariaRole,
|
|
3370
|
+
ariaRole = _b === void 0 ? 'searchbox' : _b,
|
|
3371
|
+
_c = _a.autoFocus,
|
|
3372
|
+
autoFocus = _c === void 0 ? true : _c,
|
|
3318
3373
|
className = _a.className,
|
|
3319
|
-
|
|
3320
|
-
disabled =
|
|
3374
|
+
_d = _a.disabled,
|
|
3375
|
+
disabled = _d === void 0 ? false : _d,
|
|
3321
3376
|
onChange = _a.onChange,
|
|
3322
3377
|
onClear = _a.onClear,
|
|
3323
|
-
|
|
3324
|
-
placeholder =
|
|
3325
|
-
|
|
3326
|
-
tooltip =
|
|
3378
|
+
_e = _a.placeholder,
|
|
3379
|
+
placeholder = _e === void 0 ? 'Search' : _e,
|
|
3380
|
+
_f = _a.tooltip,
|
|
3381
|
+
tooltip = _f === void 0 ? null : _f,
|
|
3327
3382
|
value = _a.value;
|
|
3328
3383
|
var rootClasses = useStylesWithRootClass(rootClassName$P, className);
|
|
3329
|
-
var
|
|
3330
|
-
searchText =
|
|
3331
|
-
setSearchText =
|
|
3384
|
+
var _g = React.useState(value),
|
|
3385
|
+
searchText = _g[0],
|
|
3386
|
+
setSearchText = _g[1];
|
|
3332
3387
|
var previousSearchText = '';
|
|
3333
3388
|
var handleChange = React.useCallback(function (event) {
|
|
3334
3389
|
previousSearchText = event.target.value;
|
|
@@ -3362,6 +3417,7 @@
|
|
|
3362
3417
|
title: tooltip
|
|
3363
3418
|
}, {
|
|
3364
3419
|
children: jsxRuntime.jsx(DotInputText, {
|
|
3420
|
+
ariaRole: ariaRole,
|
|
3365
3421
|
"data-testid": dataTestId,
|
|
3366
3422
|
autoFocus: autoFocus,
|
|
3367
3423
|
className: "search-text",
|
|
@@ -3882,7 +3938,8 @@
|
|
|
3882
3938
|
if (selectedAppType && appTypeMap && appTypeLabels) {
|
|
3883
3939
|
var labelConfig = appTypeLabels.get(selectedAppType);
|
|
3884
3940
|
return jsxRuntime.jsxs("div", __assign({
|
|
3885
|
-
className: "content"
|
|
3941
|
+
className: "content",
|
|
3942
|
+
role: "contentinfo"
|
|
3886
3943
|
}, {
|
|
3887
3944
|
children: [jsxRuntime.jsx("span", {
|
|
3888
3945
|
children: jsxRuntime.jsx(DotButton, __assign({
|
|
@@ -3898,7 +3955,9 @@
|
|
|
3898
3955
|
}, void 0)
|
|
3899
3956
|
}), void 0)
|
|
3900
3957
|
}, void 0), jsxRuntime.jsx("div", __assign({
|
|
3901
|
-
|
|
3958
|
+
"aria-level": 2,
|
|
3959
|
+
className: "product-heading",
|
|
3960
|
+
role: "heading"
|
|
3902
3961
|
}, {
|
|
3903
3962
|
children: createAppTypeLabel(selectedAppType, labelConfig.logo, labelConfig.singleTypeApps)
|
|
3904
3963
|
}), 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 +3970,16 @@
|
|
|
3911
3970
|
value: searchText
|
|
3912
3971
|
}, void 0)
|
|
3913
3972
|
}), void 0), jsxRuntime.jsx("div", __assign({
|
|
3914
|
-
className: "product-applications"
|
|
3973
|
+
className: "product-applications",
|
|
3974
|
+
role: "list"
|
|
3915
3975
|
}, {
|
|
3916
3976
|
children: filteredAppInstances()
|
|
3917
3977
|
}), void 0)]
|
|
3918
3978
|
}), void 0);
|
|
3919
3979
|
} else {
|
|
3920
3980
|
return jsxRuntime.jsxs("div", __assign({
|
|
3921
|
-
className: "content"
|
|
3981
|
+
className: "content",
|
|
3982
|
+
role: "contentinfo"
|
|
3922
3983
|
}, {
|
|
3923
3984
|
children: [jsxRuntime.jsx(DotList, {
|
|
3924
3985
|
items: appTypeMenuItems === null || appTypeMenuItems === void 0 ? void 0 : appTypeMenuItems.map(function (item) {
|
|
@@ -3934,7 +3995,9 @@
|
|
|
3934
3995
|
var header = {
|
|
3935
3996
|
className: 'app-switcher-header',
|
|
3936
3997
|
children: jsxRuntime.jsxs("div", __assign({
|
|
3998
|
+
"aria-level": 1,
|
|
3937
3999
|
className: "app-switcher-header-title",
|
|
4000
|
+
role: "heading",
|
|
3938
4001
|
style: {
|
|
3939
4002
|
marginTop: yOffset + 'px',
|
|
3940
4003
|
width: '80%'
|
|
@@ -3946,6 +4009,8 @@
|
|
|
3946
4009
|
type: "image",
|
|
3947
4010
|
variant: "circular"
|
|
3948
4011
|
}, void 0), jsxRuntime.jsx(DotTypography, __assign({
|
|
4012
|
+
ariaRole: "heading",
|
|
4013
|
+
ariaLevel: 1,
|
|
3949
4014
|
className: "app-switcher-label"
|
|
3950
4015
|
}, {
|
|
3951
4016
|
children: "App switcher"
|
|
@@ -4744,6 +4809,7 @@
|
|
|
4744
4809
|
endAdornmentTooltip = _a.endAdornmentTooltip,
|
|
4745
4810
|
_e = _a.error,
|
|
4746
4811
|
error = _e === void 0 ? false : _e,
|
|
4812
|
+
filterOptions = _a.filterOptions,
|
|
4747
4813
|
_f = _a.filterSelectedOptions,
|
|
4748
4814
|
filterSelectedOptions = _f === void 0 ? true : _f,
|
|
4749
4815
|
_g = _a.freesolo,
|
|
@@ -4754,6 +4820,7 @@
|
|
|
4754
4820
|
helperText = _a.helperText,
|
|
4755
4821
|
inputId = _a.inputId,
|
|
4756
4822
|
inputRef = _a.inputRef,
|
|
4823
|
+
inputValue = _a.inputValue,
|
|
4757
4824
|
label = _a.label,
|
|
4758
4825
|
loading = _a.loading,
|
|
4759
4826
|
maxHeight = _a.maxHeight,
|
|
@@ -4920,9 +4987,9 @@
|
|
|
4920
4987
|
}
|
|
4921
4988
|
};
|
|
4922
4989
|
// Create handler only if 'onInputChange' or 'actionItem' prop is defined
|
|
4923
|
-
var handleInputChange = (onInputChange || isActionItemDefined) && function (event,
|
|
4924
|
-
isActionItemDefined && setInputText(
|
|
4925
|
-
onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(event,
|
|
4990
|
+
var handleInputChange = (onInputChange || isActionItemDefined) && function (event, currentInputValue, reason) {
|
|
4991
|
+
isActionItemDefined && setInputText(currentInputValue);
|
|
4992
|
+
onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(event, currentInputValue, reason);
|
|
4926
4993
|
} || undefined;
|
|
4927
4994
|
// Create callback when action item click event handler is defined,
|
|
4928
4995
|
// free-solo mode is NOT set and 'Enter' key has been pressed
|
|
@@ -4981,6 +5048,7 @@
|
|
|
4981
5048
|
"data-testid": dataTestId,
|
|
4982
5049
|
defaultValue: defaultValue,
|
|
4983
5050
|
disabled: disabled,
|
|
5051
|
+
filterOptions: filterOptions,
|
|
4984
5052
|
filterSelectedOptions: filterSelectedOptions,
|
|
4985
5053
|
freeSolo: freesolo,
|
|
4986
5054
|
getOptionLabel: function (option) {
|
|
@@ -4990,6 +5058,7 @@
|
|
|
4990
5058
|
groupBy: group ? function (option) {
|
|
4991
5059
|
return option.group;
|
|
4992
5060
|
} : undefined,
|
|
5061
|
+
inputValue: inputValue,
|
|
4993
5062
|
ListboxComponent: ListboxComponent,
|
|
4994
5063
|
loading: loading,
|
|
4995
5064
|
multiple: multiple,
|
|
@@ -5024,7 +5093,7 @@
|
|
|
5024
5093
|
// passed to renderInput includes inputProps and InputProps properties
|
|
5025
5094
|
// that must be passed to TextField in order for Autocomplete to work
|
|
5026
5095
|
// correctly. We decided that at this time exposing those props in
|
|
5027
|
-
// DotInputText would not be a worthwhile tradeoff. Instead we are
|
|
5096
|
+
// DotInputText would not be a worthwhile tradeoff. Instead, we are
|
|
5028
5097
|
// using the StyledTextField used by DotInputText so that we will
|
|
5029
5098
|
// at least pick up any styling that is used there. Should additional
|
|
5030
5099
|
// functionality be added to DotInputText we will have to make a
|
|
@@ -5446,7 +5515,9 @@
|
|
|
5446
5515
|
itemsAfterCollapse: itemsAfterCollapse,
|
|
5447
5516
|
maxItems: getMaxItems(adjustMaxItems, maxVisibleItems, maxItems),
|
|
5448
5517
|
ref: breadcrumbRef,
|
|
5518
|
+
role: "navigation",
|
|
5449
5519
|
separator: jsxRuntime.jsx(DotIcon, {
|
|
5520
|
+
ariaRole: "presentation",
|
|
5450
5521
|
className: "separator",
|
|
5451
5522
|
iconId: "chevron-right"
|
|
5452
5523
|
}, void 0)
|
|
@@ -6580,6 +6651,7 @@
|
|
|
6580
6651
|
_b = _a.disabled,
|
|
6581
6652
|
disabled = _b === void 0 ? false : _b,
|
|
6582
6653
|
endIcon = _a.endIcon,
|
|
6654
|
+
endText = _a.endText,
|
|
6583
6655
|
_c = _a.error,
|
|
6584
6656
|
error = _c === void 0 ? false : _c,
|
|
6585
6657
|
_d = _a.fullWidth,
|
|
@@ -6609,6 +6681,7 @@
|
|
|
6609
6681
|
warning = _h === void 0 ? false : _h;
|
|
6610
6682
|
var hasWarning = !error && warning && warningClassName;
|
|
6611
6683
|
var hasSuccess = !error && !warning && success && successClassName;
|
|
6684
|
+
var endAdornment = endIcon || endText;
|
|
6612
6685
|
var rootStyles = useStylesWithRootClass(rootSelectClassName, hasSuccess, hasWarning, readOnly ? 'read-only' : '');
|
|
6613
6686
|
var getOption = function getOption(option) {
|
|
6614
6687
|
return typeof option === 'string' ? option : option.option;
|
|
@@ -6633,11 +6706,11 @@
|
|
|
6633
6706
|
}, {
|
|
6634
6707
|
children: startIcon
|
|
6635
6708
|
}), void 0),
|
|
6636
|
-
endAdornment:
|
|
6709
|
+
endAdornment: endAdornment && jsxRuntime.jsx(StyledAdornment, __assign({
|
|
6637
6710
|
className: adornmentIconClassName + " end",
|
|
6638
6711
|
position: "end"
|
|
6639
6712
|
}, {
|
|
6640
|
-
children:
|
|
6713
|
+
children: endAdornment
|
|
6641
6714
|
}), void 0)
|
|
6642
6715
|
},
|
|
6643
6716
|
SelectProps: {
|
|
@@ -6799,6 +6872,7 @@
|
|
|
6799
6872
|
return jsxRuntime.jsx(StyledFormControlLabel, {
|
|
6800
6873
|
className: rootClasses,
|
|
6801
6874
|
control: radioControl,
|
|
6875
|
+
"aria-label": value,
|
|
6802
6876
|
label: label || radioControl,
|
|
6803
6877
|
labelPlacement: labelPlacement,
|
|
6804
6878
|
value: value
|
|
@@ -6807,6 +6881,8 @@
|
|
|
6807
6881
|
|
|
6808
6882
|
var DotRadioGroup = function DotRadioGroup(_a) {
|
|
6809
6883
|
var ariaLabel = _a.ariaLabel,
|
|
6884
|
+
_b = _a.ariaRole,
|
|
6885
|
+
ariaRole = _b === void 0 ? 'radiogroup' : _b,
|
|
6810
6886
|
className = _a.className,
|
|
6811
6887
|
dataTestId = _a["data-testid"],
|
|
6812
6888
|
defaultValue = _a.defaultValue,
|
|
@@ -6816,22 +6892,22 @@
|
|
|
6816
6892
|
helperText = _a.helperText,
|
|
6817
6893
|
groupLabel = _a.groupLabel,
|
|
6818
6894
|
name = _a.name,
|
|
6819
|
-
|
|
6820
|
-
labelPlacement =
|
|
6895
|
+
_c = _a.labelPlacement,
|
|
6896
|
+
labelPlacement = _c === void 0 ? 'end' : _c,
|
|
6821
6897
|
onChange = _a.onChange,
|
|
6822
6898
|
value = _a.value,
|
|
6823
6899
|
options = _a.options,
|
|
6824
6900
|
startIcon = _a.startIcon,
|
|
6825
6901
|
required = _a.required,
|
|
6826
6902
|
row = _a.row,
|
|
6827
|
-
|
|
6828
|
-
size =
|
|
6903
|
+
_d = _a.size,
|
|
6904
|
+
size = _d === void 0 ? 'medium' : _d;
|
|
6829
6905
|
var placement = "" + placementClassName + labelPlacement;
|
|
6830
6906
|
var rootClasses = useStylesWithRootClass(rootClassName$A, className, placement);
|
|
6831
6907
|
var radioValue = value || defaultValue;
|
|
6832
|
-
var
|
|
6833
|
-
selectedValue =
|
|
6834
|
-
setSelectedValue =
|
|
6908
|
+
var _e = React.useState(radioValue),
|
|
6909
|
+
selectedValue = _e[0],
|
|
6910
|
+
setSelectedValue = _e[1];
|
|
6835
6911
|
/* This will ensure that value can be updated from the outside */
|
|
6836
6912
|
React.useEffect(function () {
|
|
6837
6913
|
setSelectedValue(radioValue);
|
|
@@ -6887,6 +6963,7 @@
|
|
|
6887
6963
|
defaultValue: defaultValue,
|
|
6888
6964
|
name: name,
|
|
6889
6965
|
onChange: handleChange,
|
|
6966
|
+
role: ariaRole,
|
|
6890
6967
|
row: row,
|
|
6891
6968
|
value: selectedValue
|
|
6892
6969
|
}, {
|
|
@@ -7600,39 +7677,41 @@
|
|
|
7600
7677
|
*/
|
|
7601
7678
|
var DotInlineEdit = function DotInlineEdit(_a) {
|
|
7602
7679
|
var ariaLabel = _a.ariaLabel,
|
|
7680
|
+
_b = _a.ariaRole,
|
|
7681
|
+
ariaRole = _b === void 0 ? 'combobox' : _b,
|
|
7603
7682
|
bindings = _a.bindings,
|
|
7604
7683
|
charactersLimit = _a.charactersLimit,
|
|
7605
7684
|
className = _a.className,
|
|
7606
7685
|
dataTestId = _a["data-testid"],
|
|
7607
|
-
|
|
7608
|
-
fullWidth =
|
|
7686
|
+
_c = _a.fullWidth,
|
|
7687
|
+
fullWidth = _c === void 0 ? true : _c,
|
|
7609
7688
|
hideActionButtons = _a.hideActionButtons,
|
|
7610
7689
|
name = _a.name,
|
|
7611
7690
|
onChange = _a.onChange,
|
|
7612
7691
|
onEditStateChange = _a.onEditStateChange,
|
|
7613
7692
|
readOnly = _a.readOnly,
|
|
7614
7693
|
selectTextOnEdit = _a.selectTextOnEdit,
|
|
7615
|
-
|
|
7616
|
-
startEditable =
|
|
7617
|
-
|
|
7618
|
-
tabIndex =
|
|
7694
|
+
_d = _a.startEditable,
|
|
7695
|
+
startEditable = _d === void 0 ? false : _d,
|
|
7696
|
+
_e = _a.tabIndex,
|
|
7697
|
+
tabIndex = _e === void 0 ? 0 : _e,
|
|
7619
7698
|
tooltip = _a.tooltip,
|
|
7620
|
-
|
|
7621
|
-
typography =
|
|
7622
|
-
|
|
7623
|
-
value =
|
|
7624
|
-
var _g = React.useState(false),
|
|
7625
|
-
editing = _g[0],
|
|
7626
|
-
setEditing = _g[1];
|
|
7699
|
+
_f = _a.typography,
|
|
7700
|
+
typography = _f === void 0 ? 'body1' : _f,
|
|
7701
|
+
_g = _a.value,
|
|
7702
|
+
value = _g === void 0 ? '' : _g;
|
|
7627
7703
|
var _h = React.useState(false),
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
var _j = React.useState(
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
var _k = React.useState(
|
|
7634
|
-
|
|
7635
|
-
|
|
7704
|
+
editing = _h[0],
|
|
7705
|
+
setEditing = _h[1];
|
|
7706
|
+
var _j = React.useState(false),
|
|
7707
|
+
showTooltip = _j[0],
|
|
7708
|
+
setShowTooltip = _j[1];
|
|
7709
|
+
var _k = React.useState(''),
|
|
7710
|
+
originalValue = _k[0],
|
|
7711
|
+
setOriginalValue = _k[1];
|
|
7712
|
+
var _l = React.useState(value),
|
|
7713
|
+
inputValue = _l[0],
|
|
7714
|
+
setInputValue = _l[1];
|
|
7636
7715
|
var inputRef = React.useRef();
|
|
7637
7716
|
var inlineEditRef = React.useRef();
|
|
7638
7717
|
React.useEffect(function () {
|
|
@@ -7789,7 +7868,8 @@
|
|
|
7789
7868
|
children: viewModeChildren
|
|
7790
7869
|
}), void 0) : jsxRuntime.jsx("div", __assign({
|
|
7791
7870
|
className: viewModeClasses,
|
|
7792
|
-
"data-testid": dataTestId && dataTestId + "-view-mode-wrapper"
|
|
7871
|
+
"data-testid": dataTestId && dataTestId + "-view-mode-wrapper",
|
|
7872
|
+
role: "presentation"
|
|
7793
7873
|
}, {
|
|
7794
7874
|
children: viewModeChildren
|
|
7795
7875
|
}), void 0);
|
|
@@ -7873,6 +7953,7 @@
|
|
|
7873
7953
|
return handleKeyPress(event);
|
|
7874
7954
|
} : undefined,
|
|
7875
7955
|
ref: inlineEditRef,
|
|
7956
|
+
role: ariaRole,
|
|
7876
7957
|
tabIndex: !readOnly ? tabIndex : undefined,
|
|
7877
7958
|
typography: typography
|
|
7878
7959
|
}, {
|
|
@@ -7969,16 +8050,19 @@
|
|
|
7969
8050
|
componentId: "l7oxi2-0"
|
|
7970
8051
|
})(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
7971
8052
|
var theme = _a.theme;
|
|
7972
|
-
return styled.css(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n &.", " {\n background-color: ", ";\n color: ", ";\n
|
|
8053
|
+
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
8054
|
var backgroundcolor = _a.backgroundcolor;
|
|
7974
8055
|
return backgroundcolor || theme.palette.grey[200];
|
|
8056
|
+
}, function (_a) {
|
|
8057
|
+
var bordercolor = _a.bordercolor;
|
|
8058
|
+
return bordercolor ? bordercolor : theme.palette.layer.n700;
|
|
7975
8059
|
}, function (_a) {
|
|
7976
8060
|
var labelcolor = _a.labelcolor;
|
|
7977
8061
|
return labelcolor ? labelcolor : theme.palette.layer.n700;
|
|
7978
8062
|
}, function (_a) {
|
|
7979
|
-
var
|
|
7980
|
-
return
|
|
7981
|
-
}, theme.palette.error[100], theme.palette.error.main, theme.palette.
|
|
8063
|
+
var labelcolor = _a.labelcolor;
|
|
8064
|
+
return labelcolor ? labelcolor : theme.palette.layer.n700;
|
|
8065
|
+
}, 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
8066
|
});
|
|
7983
8067
|
var templateObject_1$n, templateObject_2$m;
|
|
7984
8068
|
|
|
@@ -9987,8 +10071,10 @@
|
|
|
9987
10071
|
var DotFileUpload = function DotFileUpload(_a) {
|
|
9988
10072
|
var accept = _a.accept,
|
|
9989
10073
|
ariaLabel = _a.ariaLabel,
|
|
9990
|
-
_b = _a.
|
|
9991
|
-
|
|
10074
|
+
_b = _a.ariaRole,
|
|
10075
|
+
ariaRole = _b === void 0 ? 'region' : _b,
|
|
10076
|
+
_c = _a.buttonOnly,
|
|
10077
|
+
buttonOnly = _c === void 0 ? false : _c,
|
|
9992
10078
|
className = _a.className,
|
|
9993
10079
|
dataTestId = _a["data-testid"],
|
|
9994
10080
|
disabled = _a.disabled,
|
|
@@ -9998,12 +10084,12 @@
|
|
|
9998
10084
|
onChange = _a.onChange,
|
|
9999
10085
|
onDragEnter = _a.onDragEnter,
|
|
10000
10086
|
onFileClick = _a.onFileClick;
|
|
10001
|
-
var
|
|
10002
|
-
uploadedFiles =
|
|
10003
|
-
setUploadedFiles =
|
|
10004
|
-
var
|
|
10005
|
-
hasMaxFilesError =
|
|
10006
|
-
setHasMaxFilesError =
|
|
10087
|
+
var _d = React.useState([]),
|
|
10088
|
+
uploadedFiles = _d[0],
|
|
10089
|
+
setUploadedFiles = _d[1];
|
|
10090
|
+
var _e = React.useState(false),
|
|
10091
|
+
hasMaxFilesError = _e[0],
|
|
10092
|
+
setHasMaxFilesError = _e[1];
|
|
10007
10093
|
var isUploadDisabled = disabled || maxFiles && uploadedFiles.length >= maxFiles;
|
|
10008
10094
|
var rootClasses = useStylesWithRootClass(rootClassName$6, className, !buttonOnly ? dropZoneClassName : '', isUploadDisabled ? 'disabled' : '');
|
|
10009
10095
|
var maxFilesClasses = useStylesWithRootClass('dot-max-files-message', hasMaxFilesError ? 'dot-max-files-reached' : '');
|
|
@@ -10028,7 +10114,7 @@
|
|
|
10028
10114
|
var onDrop = React.useCallback(function (acceptedFiles, fileRejections) {
|
|
10029
10115
|
hideFilesList ? setNewlyUploadedFiles(acceptedFiles, fileRejections) : parseFiles(acceptedFiles, fileRejections);
|
|
10030
10116
|
}, [hideFilesList, setNewlyUploadedFiles, parseFiles]);
|
|
10031
|
-
var
|
|
10117
|
+
var _f = reactDropzone.useDropzone({
|
|
10032
10118
|
accept: accept,
|
|
10033
10119
|
disabled: isUploadDisabled,
|
|
10034
10120
|
maxSize: maxSize * 1000000,
|
|
@@ -10037,10 +10123,10 @@
|
|
|
10037
10123
|
onDragEnter: onDragEnter,
|
|
10038
10124
|
onDrop: onDrop
|
|
10039
10125
|
}),
|
|
10040
|
-
getRootProps =
|
|
10041
|
-
getInputProps =
|
|
10042
|
-
isDragActive =
|
|
10043
|
-
open =
|
|
10126
|
+
getRootProps = _f.getRootProps,
|
|
10127
|
+
getInputProps = _f.getInputProps,
|
|
10128
|
+
isDragActive = _f.isDragActive,
|
|
10129
|
+
open = _f.open;
|
|
10044
10130
|
var deleteFile = function deleteFile(fileIndexToBeRemoved) {
|
|
10045
10131
|
uploadedFiles.splice(fileIndexToBeRemoved, 1);
|
|
10046
10132
|
setUploadedFiles(__spreadArray([], uploadedFiles));
|
|
@@ -10053,7 +10139,8 @@
|
|
|
10053
10139
|
uploadedFiles: uploadedFiles
|
|
10054
10140
|
});
|
|
10055
10141
|
return jsxRuntime.jsxs(StyledFileUploadContainer, __assign({
|
|
10056
|
-
className: containerClassName$2
|
|
10142
|
+
className: containerClassName$2,
|
|
10143
|
+
role: ariaRole
|
|
10057
10144
|
}, {
|
|
10058
10145
|
children: [jsxRuntime.jsxs(StyledFileUpload, __assign({}, getRootProps(), {
|
|
10059
10146
|
"aria-label": ariaLabel,
|
|
@@ -10694,6 +10781,7 @@
|
|
|
10694
10781
|
onClose = _a.onClose,
|
|
10695
10782
|
onKeyDown = _a.onKeyDown,
|
|
10696
10783
|
onOpen = _a.onOpen,
|
|
10784
|
+
onPopperTimeChange = _a.onPopperTimeChange,
|
|
10697
10785
|
open = _a.open,
|
|
10698
10786
|
persistentLabel = _a.persistentLabel,
|
|
10699
10787
|
_g = _a.readOnly,
|
|
@@ -10760,6 +10848,7 @@
|
|
|
10760
10848
|
};
|
|
10761
10849
|
var handlePickerChange = function handlePickerChange(pickedDateTime) {
|
|
10762
10850
|
setPickerTime(pickedDateTime);
|
|
10851
|
+
onPopperTimeChange && onPopperTimeChange(pickedDateTime.format(DEFAULT_TIME_FORMAT));
|
|
10763
10852
|
};
|
|
10764
10853
|
var handleInputChange = function handleInputChange(currentValue, context) {
|
|
10765
10854
|
var currentTimeValue = currentValue ? currentValue : null;
|