@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/CHANGE_LOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.8.0](https://www.npmjs.com/package/@digital-ai/dot-components) (05/09/2023)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.7.4...2.8.0)
|
|
6
|
+
|
|
7
|
+
**Features:**
|
|
8
|
+
|
|
9
|
+
- S-92379: `DotAutoComplete`: expose `filterOptions` prop [\#1479](https://github.com/digital-ai/dot-components/pull/1479) ([dmiletic85](https://github.com/dmiletic85))
|
|
10
|
+
|
|
11
|
+
**Fixed bugs:**
|
|
12
|
+
|
|
13
|
+
- D-24399: Add filled pill css and include a few sample icon choices in stories [\#1477](https://github.com/digital-ai/dot-components/pull/1477) ([jmcnally](https://github.com/jmcnally))
|
|
14
|
+
|
|
15
|
+
**Misc:**
|
|
16
|
+
|
|
17
|
+
- S-91986: `aria-role` on missing components [\#1482](https://github.com/digital-ai/dot-components/pull/1482) ([CWSites](https://github.com/CWSites))
|
|
18
|
+
|
|
3
19
|
## [2.7.4](https://www.npmjs.com/package/@digital-ai/dot-components) (05/04/2023)
|
|
4
20
|
|
|
5
21
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.7.3...2.7.4)
|
|
@@ -418,7 +434,6 @@
|
|
|
418
434
|
|
|
419
435
|
**Fixed bugs:**
|
|
420
436
|
|
|
421
|
-
- S-86692: component cleanup [\#1238](https://github.com/digital-ai/dot-components/pull/1238) ([CWSites](https://github.com/CWSites))
|
|
422
437
|
- S-84151: fix e2e tests for Release 2.0 [\#1146](https://github.com/digital-ai/dot-components/pull/1146) ([CWSites](https://github.com/CWSites))
|
|
423
438
|
|
|
424
439
|
**Misc:**
|
|
@@ -449,6 +464,7 @@
|
|
|
449
464
|
|
|
450
465
|
**Fixed bugs:**
|
|
451
466
|
|
|
467
|
+
- S-86692: component cleanup [\#1238](https://github.com/digital-ai/dot-components/pull/1238) ([CWSites](https://github.com/CWSites))
|
|
452
468
|
- D-20931: `DotAccordion` - display top border correctly when expanded [\#1232](https://github.com/digital-ai/dot-components/pull/1232) ([CWSites](https://github.com/CWSites))
|
|
453
469
|
- D-22087: `DotRadioGroup` / `DotCheckboxGroup` helper texts do not follow the same styles as other helper texts [\#1225](https://github.com/digital-ai/dot-components/pull/1225) ([dmiletic85](https://github.com/dmiletic85))
|
|
454
470
|
|
|
@@ -528,7 +544,6 @@
|
|
|
528
544
|
|
|
529
545
|
**Fixed bugs:**
|
|
530
546
|
|
|
531
|
-
- D-21245: make sure `data-testid` is passed to nested lists [\#1182](https://github.com/digital-ai/dot-components/pull/1182) ([CWSites](https://github.com/CWSites))
|
|
532
547
|
- D-21267: adjust color of helper text [\#1174](https://github.com/digital-ai/dot-components/pull/1174) ([CWSites](https://github.com/CWSites))
|
|
533
548
|
|
|
534
549
|
## [1.17.1](https://www.npmjs.com/package/@digital-ai/dot-components) (05/19/2022)
|
|
@@ -537,6 +552,7 @@
|
|
|
537
552
|
|
|
538
553
|
**Fixed bugs:**
|
|
539
554
|
|
|
555
|
+
- D-21245: make sure `data-testid` is passed to nested lists [\#1182](https://github.com/digital-ai/dot-components/pull/1182) ([CWSites](https://github.com/CWSites))
|
|
540
556
|
- D-21287: `DotButtonToggle`: Button size is not respected after tooltip change [\#1171](https://github.com/digital-ai/dot-components/pull/1171) ([dmiletic85](https://github.com/dmiletic85))
|
|
541
557
|
|
|
542
558
|
## [1.17.0](https://www.npmjs.com/package/@digital-ai/dot-components) (05/18/2022)
|
|
@@ -547,10 +563,6 @@
|
|
|
547
563
|
|
|
548
564
|
- S-84947: `DotButtonToggle`: Add tooltip support [\#1166](https://github.com/digital-ai/dot-components/pull/1166) ([dmiletic85](https://github.com/dmiletic85))
|
|
549
565
|
|
|
550
|
-
**Fixed bugs:**
|
|
551
|
-
|
|
552
|
-
- D-21265: `helperText` on input fields shouldn't be bold [\#1167](https://github.com/digital-ai/dot-components/pull/1167) ([dmiletic85](https://github.com/dmiletic85))
|
|
553
|
-
|
|
554
566
|
**Misc:**
|
|
555
567
|
|
|
556
568
|
- update release template with task for marking stories as done [\#1161](https://github.com/digital-ai/dot-components/pull/1161) ([CWSites](https://github.com/CWSites))
|
|
@@ -965,7 +977,6 @@
|
|
|
965
977
|
|
|
966
978
|
- \#841 Fix DotDynamicForm initial form state for controls with initialValue false [\#842](https://github.com/digital-ai/dot-components/pull/842) ([selsemore](https://github.com/selsemore))
|
|
967
979
|
- D-19189: Extended sidenav drawer should collapse when another drawer option is clicked [\#830](https://github.com/digital-ai/dot-components/pull/830) ([dmiletic85](https://github.com/dmiletic85))
|
|
968
|
-
- D-19177: `Go back` item in `DotSidebar` is not aligned with rest of items [\#826](https://github.com/digital-ai/dot-components/pull/826) ([dmiletic85](https://github.com/dmiletic85))
|
|
969
980
|
|
|
970
981
|
**Misc:**
|
|
971
982
|
|
|
@@ -984,6 +995,7 @@
|
|
|
984
995
|
**Fixed bugs:**
|
|
985
996
|
|
|
986
997
|
- D-19151: `DotBadge` generates console warnings [\#827](https://github.com/digital-ai/dot-components/pull/827) ([dmiletic85](https://github.com/dmiletic85))
|
|
998
|
+
- D-19177: `Go back` item in `DotSidebar` is not aligned with rest of items [\#826](https://github.com/digital-ai/dot-components/pull/826) ([dmiletic85](https://github.com/dmiletic85))
|
|
987
999
|
|
|
988
1000
|
## [1.3.4](https://www.npmjs.com/package/@digital-ai/dot-components) (11/30/2021)
|
|
989
1001
|
|
|
@@ -1150,6 +1162,10 @@
|
|
|
1150
1162
|
|
|
1151
1163
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/1.0.12...1.1.0)
|
|
1152
1164
|
|
|
1165
|
+
**Fixed bugs:**
|
|
1166
|
+
|
|
1167
|
+
- D-18665: AppToolbar z-index update [\#685](https://github.com/digital-ai/dot-components/pull/685) ([CWSites](https://github.com/CWSites))
|
|
1168
|
+
|
|
1153
1169
|
**Misc:**
|
|
1154
1170
|
|
|
1155
1171
|
- MINOR release [\#695](https://github.com/digital-ai/dot-components/pull/695) ([CWSites](https://github.com/CWSites))
|
|
@@ -1168,7 +1184,6 @@
|
|
|
1168
1184
|
|
|
1169
1185
|
- D-18817: set mainMenuItems to `null` by default [\#688](https://github.com/digital-ai/dot-components/pull/688) ([CWSites](https://github.com/CWSites))
|
|
1170
1186
|
- D-18664: update link to allow for keypress [\#686](https://github.com/digital-ai/dot-components/pull/686) ([CWSites](https://github.com/CWSites))
|
|
1171
|
-
- D-18665: AppToolbar z-index update [\#685](https://github.com/digital-ai/dot-components/pull/685) ([CWSites](https://github.com/CWSites))
|
|
1172
1187
|
- D-18663: Update AutoComplete value typing [\#684](https://github.com/digital-ai/dot-components/pull/684) ([CWSites](https://github.com/CWSites))
|
|
1173
1188
|
|
|
1174
1189
|
**Misc:**
|
package/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect, useState, useRef, useMemo, useContext, createContext, forwardRef, Fragment, useCallback, createElement, useLayoutEffect } from 'react';
|
|
4
4
|
import { Tooltip, Icon, Typography, Accordion, AccordionSummary, AccordionDetails, AccordionActions, InputAdornment, InputLabel, TextField, Toolbar, Alert, Fade, StyledEngineProvider, Avatar, Button, darken, Link, List, ListItem, CircularProgress, Popper, MenuList, MenuItem, Paper, ClickAwayListener, Drawer, IconButton, ListItemIcon, Collapse, ListSubheader, Divider, ListItemText, Badge, useMediaQuery, Autocomplete, Chip, AvatarGroup, Breadcrumbs, ToggleButtonGroup, ToggleButton, Card, CardContent, CardHeader, FormControlLabel, Checkbox, FormControl, FormGroup, FormLabel, FormHelperText, Dialog, DialogContent, DialogActions, useTheme as useTheme$1, RadioGroup, Radio, Switch, Skeleton, Snackbar, ButtonGroup, Stepper, Step, StepLabel, StepContent, TablePagination, TableContainer, TableCell, TableRow, TableBody, TableSortLabel, TableHead, Table, Tabs, Tab, LinearProgress } from '@mui/material';
|
|
5
5
|
import '@digital-ai/dot-icons';
|
|
6
6
|
import styled, { css, createGlobalStyle, ThemeProvider as ThemeProvider$1, keyframes } from 'styled-components';
|
|
@@ -21,6 +21,7 @@ function useStylesWithRootClass(name, className, ...args) {
|
|
|
21
21
|
|
|
22
22
|
const DotTooltip = ({
|
|
23
23
|
ariaLabel,
|
|
24
|
+
ariaRole: _ariaRole = 'tooltip',
|
|
24
25
|
children,
|
|
25
26
|
className,
|
|
26
27
|
'data-testid': dataTestId,
|
|
@@ -39,6 +40,7 @@ const DotTooltip = ({
|
|
|
39
40
|
onClose: onClose,
|
|
40
41
|
open: open,
|
|
41
42
|
placement: _placement,
|
|
43
|
+
role: _ariaRole,
|
|
42
44
|
title: title
|
|
43
45
|
}, {
|
|
44
46
|
children: jsx("span", {
|
|
@@ -55,6 +57,7 @@ const StyledIcon = styled(Icon).withConfig({
|
|
|
55
57
|
|
|
56
58
|
const DotIcon = ({
|
|
57
59
|
ariaLabel,
|
|
60
|
+
ariaRole: _ariaRole = 'img',
|
|
58
61
|
className,
|
|
59
62
|
'data-testid': dataTestId,
|
|
60
63
|
fontSize: _fontSize = 'medium',
|
|
@@ -72,11 +75,13 @@ const DotIcon = ({
|
|
|
72
75
|
root: rootClasses
|
|
73
76
|
},
|
|
74
77
|
"data-testid": dataTestId,
|
|
75
|
-
fontSize: _fontSize
|
|
78
|
+
fontSize: _fontSize,
|
|
79
|
+
role: _ariaRole
|
|
76
80
|
}, {
|
|
77
81
|
children: jsx("i", {
|
|
78
82
|
className: `icon-${iconId} dot-i`,
|
|
79
|
-
"data-testid": dataTestId && `${dataTestId}-i
|
|
83
|
+
"data-testid": dataTestId && `${dataTestId}-i`,
|
|
84
|
+
role: _ariaRole
|
|
80
85
|
}, void 0)
|
|
81
86
|
}), void 0)
|
|
82
87
|
}), void 0);
|
|
@@ -84,6 +89,8 @@ const DotIcon = ({
|
|
|
84
89
|
|
|
85
90
|
const DotTypography = ({
|
|
86
91
|
ariaLabel,
|
|
92
|
+
ariaLevel,
|
|
93
|
+
ariaRole,
|
|
87
94
|
className,
|
|
88
95
|
'data-testid': dataTestId,
|
|
89
96
|
children,
|
|
@@ -93,14 +100,21 @@ const DotTypography = ({
|
|
|
93
100
|
variant
|
|
94
101
|
}) => {
|
|
95
102
|
const rootClasses = useStylesWithRootClass('dot-typography', className);
|
|
103
|
+
useEffect(() => {
|
|
104
|
+
if (ariaRole === 'heading' && !ariaLevel) {
|
|
105
|
+
console.warn('please include ariaLevel when using ariaRole="heading"');
|
|
106
|
+
}
|
|
107
|
+
}, []);
|
|
96
108
|
return jsx(Typography, Object.assign({
|
|
97
109
|
"aria-label": ariaLabel,
|
|
110
|
+
"aria-level": ariaLevel,
|
|
98
111
|
classes: {
|
|
99
112
|
root: rootClasses
|
|
100
113
|
},
|
|
101
114
|
component: component,
|
|
102
115
|
"data-testid": dataTestId,
|
|
103
116
|
noWrap: noWrap,
|
|
117
|
+
role: ariaRole,
|
|
104
118
|
style: {
|
|
105
119
|
marginBottom: noMarginBottom ? 0 : undefined
|
|
106
120
|
},
|
|
@@ -1655,6 +1669,7 @@ const AvatarContent = ({
|
|
|
1655
1669
|
const DotAvatar = ({
|
|
1656
1670
|
alt,
|
|
1657
1671
|
ariaLabel,
|
|
1672
|
+
ariaRole: _ariaRole = 'img',
|
|
1658
1673
|
className,
|
|
1659
1674
|
component: _component = 'div',
|
|
1660
1675
|
color,
|
|
@@ -1691,6 +1706,7 @@ const DotAvatar = ({
|
|
|
1691
1706
|
component: onClick ? 'button' : _component,
|
|
1692
1707
|
"data-testid": dataTestId,
|
|
1693
1708
|
onClick: event => onClick ? onClick(event) : null,
|
|
1709
|
+
role: onClick ? 'button' : _ariaRole,
|
|
1694
1710
|
src: _type === 'image' ? imageSrc : null,
|
|
1695
1711
|
style: style,
|
|
1696
1712
|
tabIndex: tooltip ? _tabIndex : undefined,
|
|
@@ -1700,9 +1716,9 @@ const DotAvatar = ({
|
|
|
1700
1716
|
"data-testid": dataTestId,
|
|
1701
1717
|
iconId: iconId,
|
|
1702
1718
|
imageSrc: imageSrc,
|
|
1719
|
+
size: _size,
|
|
1703
1720
|
text: _text,
|
|
1704
|
-
type: _type
|
|
1705
|
-
size: _size
|
|
1721
|
+
type: _type
|
|
1706
1722
|
}, void 0)
|
|
1707
1723
|
}), void 0)
|
|
1708
1724
|
}), void 0);
|
|
@@ -1719,6 +1735,7 @@ const StyledButton = styled(Button).withConfig({
|
|
|
1719
1735
|
/** This component wraps the Button component from @material-ui. */
|
|
1720
1736
|
const DotButton = /*#__PURE__*/forwardRef(({
|
|
1721
1737
|
ariaLabel,
|
|
1738
|
+
ariaRole: _ariaRole = 'button',
|
|
1722
1739
|
autoFocus: _autoFocus = false,
|
|
1723
1740
|
children,
|
|
1724
1741
|
className,
|
|
@@ -1775,6 +1792,7 @@ const DotButton = /*#__PURE__*/forwardRef(({
|
|
|
1775
1792
|
onClick: event => onClick && onClick(event),
|
|
1776
1793
|
onKeyDown: onKeyDown,
|
|
1777
1794
|
ref: ref,
|
|
1795
|
+
role: _ariaRole,
|
|
1778
1796
|
size: _size,
|
|
1779
1797
|
startIcon: startIcon,
|
|
1780
1798
|
tabIndex: tabIndex,
|
|
@@ -1794,6 +1812,7 @@ const StyledLink = styled(Link).withConfig({
|
|
|
1794
1812
|
|
|
1795
1813
|
const DotLink = ({
|
|
1796
1814
|
ariaLabel,
|
|
1815
|
+
ariaRole: _ariaRole = 'link',
|
|
1797
1816
|
children,
|
|
1798
1817
|
className,
|
|
1799
1818
|
color: _color = 'primary',
|
|
@@ -1831,6 +1850,7 @@ const DotLink = ({
|
|
|
1831
1850
|
onMouseEnter: onMouseEnter,
|
|
1832
1851
|
onPointerDown: onPointerDown,
|
|
1833
1852
|
rel: _rel,
|
|
1853
|
+
role: _ariaRole,
|
|
1834
1854
|
tabIndex: _tabIndex,
|
|
1835
1855
|
target: target,
|
|
1836
1856
|
underline: underline
|
|
@@ -2126,6 +2146,7 @@ const DotMenuList = /*#__PURE__*/forwardRef(({
|
|
|
2126
2146
|
const DotMenu = ({
|
|
2127
2147
|
anchorEl,
|
|
2128
2148
|
ariaLabel,
|
|
2149
|
+
ariaRole: _ariaRole = 'menu',
|
|
2129
2150
|
className,
|
|
2130
2151
|
'data-testid': dataTestId,
|
|
2131
2152
|
dense: _dense = true,
|
|
@@ -2223,6 +2244,7 @@ const DotMenu = ({
|
|
|
2223
2244
|
onSelect: onSelect,
|
|
2224
2245
|
selectedKey: selectedKey
|
|
2225
2246
|
}, void 0),
|
|
2247
|
+
ariaRole: _ariaRole,
|
|
2226
2248
|
selectedKey: selectedKey
|
|
2227
2249
|
}, void 0)
|
|
2228
2250
|
}), void 0)
|
|
@@ -2269,6 +2291,7 @@ const StyledIconButton = styled(IconButton).withConfig({
|
|
|
2269
2291
|
|
|
2270
2292
|
const DotIconButton = ({
|
|
2271
2293
|
ariaLabel,
|
|
2294
|
+
ariaRole: _ariaRole = 'button',
|
|
2272
2295
|
className,
|
|
2273
2296
|
color: _color = 'inherit',
|
|
2274
2297
|
'data-testid': dataTestId,
|
|
@@ -2296,6 +2319,7 @@ const DotIconButton = ({
|
|
|
2296
2319
|
disableRipple: _disableRipple,
|
|
2297
2320
|
disabled: _disabled,
|
|
2298
2321
|
onClick: event => onClick && onClick(event),
|
|
2322
|
+
role: _ariaRole,
|
|
2299
2323
|
size: _size
|
|
2300
2324
|
}, {
|
|
2301
2325
|
children: jsx(DotIcon, {
|
|
@@ -2318,8 +2342,10 @@ const DotDrawerHeader = ({
|
|
|
2318
2342
|
const rootClasses = useStylesWithRootClass(rootClassName$T, className);
|
|
2319
2343
|
return jsxs(StyleDrawerHeader, Object.assign({
|
|
2320
2344
|
"aria-label": ariaLabel,
|
|
2345
|
+
"aria-level": 2,
|
|
2321
2346
|
className: rootClasses,
|
|
2322
|
-
"data-testid": dataTestId
|
|
2347
|
+
"data-testid": dataTestId,
|
|
2348
|
+
role: "heading"
|
|
2323
2349
|
}, {
|
|
2324
2350
|
children: [children, variant !== 'permanent' && jsx(DotIconButton, {
|
|
2325
2351
|
className: "close-button",
|
|
@@ -2337,6 +2363,7 @@ const StyleDrawerBody = styled.div.withConfig({
|
|
|
2337
2363
|
|
|
2338
2364
|
const DotDrawerBody = ({
|
|
2339
2365
|
ariaLabel,
|
|
2366
|
+
ariaRole: _ariaRole = 'region',
|
|
2340
2367
|
children,
|
|
2341
2368
|
className,
|
|
2342
2369
|
'data-testid': dataTestId,
|
|
@@ -2348,7 +2375,8 @@ const DotDrawerBody = ({
|
|
|
2348
2375
|
return jsxs(StyleDrawerBody, Object.assign({
|
|
2349
2376
|
"aria-label": ariaLabel,
|
|
2350
2377
|
className: rootClasses,
|
|
2351
|
-
"data-testid": dataTestId
|
|
2378
|
+
"data-testid": dataTestId,
|
|
2379
|
+
role: _ariaRole
|
|
2352
2380
|
}, {
|
|
2353
2381
|
children: [children, !headerExists && variant !== 'permanent' && jsx(DotIconButton, {
|
|
2354
2382
|
className: "dot-drawer-close-button",
|
|
@@ -2368,6 +2396,7 @@ const StyleDrawerFooter = styled.div.withConfig({
|
|
|
2368
2396
|
|
|
2369
2397
|
const DotDrawerFooter = ({
|
|
2370
2398
|
ariaLabel,
|
|
2399
|
+
ariaRole: _ariaRole = 'region',
|
|
2371
2400
|
children,
|
|
2372
2401
|
className,
|
|
2373
2402
|
'data-testid': dataTestId
|
|
@@ -2376,7 +2405,8 @@ const DotDrawerFooter = ({
|
|
|
2376
2405
|
return jsx(StyleDrawerFooter, Object.assign({
|
|
2377
2406
|
"aria-label": ariaLabel,
|
|
2378
2407
|
className: rootClasses,
|
|
2379
|
-
"data-testid": dataTestId
|
|
2408
|
+
"data-testid": dataTestId,
|
|
2409
|
+
role: _ariaRole
|
|
2380
2410
|
}, {
|
|
2381
2411
|
children: children
|
|
2382
2412
|
}), void 0);
|
|
@@ -2385,6 +2415,7 @@ const DotDrawerFooter = ({
|
|
|
2385
2415
|
const DotDrawer = ({
|
|
2386
2416
|
anchor: _anchor = 'right',
|
|
2387
2417
|
ariaLabel,
|
|
2418
|
+
ariaRole: _ariaRole = 'presentation',
|
|
2388
2419
|
className,
|
|
2389
2420
|
children,
|
|
2390
2421
|
'data-testid': dataTestId,
|
|
@@ -2414,7 +2445,9 @@ const DotDrawer = ({
|
|
|
2414
2445
|
const bodyTestId = drawerBodyProps ? drawerBodyProps[`data-testid`] : 'drawer-body';
|
|
2415
2446
|
return jsxs(StyledDrawer, Object.assign({
|
|
2416
2447
|
ModalProps: ModalProps,
|
|
2417
|
-
PaperProps: PaperProps,
|
|
2448
|
+
PaperProps: Object.assign(Object.assign({}, PaperProps), {
|
|
2449
|
+
role: _ariaRole
|
|
2450
|
+
}),
|
|
2418
2451
|
anchor: _anchor,
|
|
2419
2452
|
"aria-label": ariaLabel,
|
|
2420
2453
|
classes: {
|
|
@@ -2425,6 +2458,7 @@ const DotDrawer = ({
|
|
|
2425
2458
|
height: height,
|
|
2426
2459
|
onClose: handleClose,
|
|
2427
2460
|
open: open,
|
|
2461
|
+
role: _ariaRole,
|
|
2428
2462
|
variant: _variant,
|
|
2429
2463
|
width: _width
|
|
2430
2464
|
}, {
|
|
@@ -2483,6 +2517,7 @@ const DotListDivider = ({
|
|
|
2483
2517
|
};
|
|
2484
2518
|
const DotList = ({
|
|
2485
2519
|
ariaLabel,
|
|
2520
|
+
ariaRole: _ariaRole = 'list',
|
|
2486
2521
|
children,
|
|
2487
2522
|
className,
|
|
2488
2523
|
component: _component = 'ul',
|
|
@@ -2512,6 +2547,7 @@ const DotList = ({
|
|
|
2512
2547
|
dense: _dense,
|
|
2513
2548
|
disablePadding: _disablePadding,
|
|
2514
2549
|
ref: listRef,
|
|
2550
|
+
role: _ariaRole,
|
|
2515
2551
|
style: {
|
|
2516
2552
|
width: listWidth
|
|
2517
2553
|
}
|
|
@@ -2568,6 +2604,7 @@ const DotList = ({
|
|
|
2568
2604
|
};
|
|
2569
2605
|
const DotListItem = ({
|
|
2570
2606
|
ariaLabel,
|
|
2607
|
+
ariaRole: _ariaRole2 = 'listitem',
|
|
2571
2608
|
className,
|
|
2572
2609
|
component: _component2 = 'li',
|
|
2573
2610
|
'data-testid': dataTestId,
|
|
@@ -2634,6 +2671,7 @@ const DotListItem = ({
|
|
|
2634
2671
|
divider: _divider,
|
|
2635
2672
|
href: onClick ? null : href,
|
|
2636
2673
|
onClick: onClick || !href ? handleClick : null,
|
|
2674
|
+
role: onClick ? 'button' : _ariaRole2,
|
|
2637
2675
|
selected: isFlyout ? isOpened : selected,
|
|
2638
2676
|
target: target
|
|
2639
2677
|
}, {
|
|
@@ -2984,6 +3022,7 @@ const StyledSearchInput = styled.span.withConfig({
|
|
|
2984
3022
|
|
|
2985
3023
|
function SearchInput({
|
|
2986
3024
|
'data-testid': dataTestId,
|
|
3025
|
+
ariaRole = 'searchbox',
|
|
2987
3026
|
autoFocus = true,
|
|
2988
3027
|
className,
|
|
2989
3028
|
disabled = false,
|
|
@@ -3028,6 +3067,7 @@ function SearchInput({
|
|
|
3028
3067
|
title: tooltip
|
|
3029
3068
|
}, {
|
|
3030
3069
|
children: jsx(DotInputText, {
|
|
3070
|
+
ariaRole: ariaRole,
|
|
3031
3071
|
"data-testid": dataTestId,
|
|
3032
3072
|
autoFocus: autoFocus,
|
|
3033
3073
|
className: "search-text",
|
|
@@ -3504,7 +3544,8 @@ const DotAppSwitcherView = ({
|
|
|
3504
3544
|
if (selectedAppType && appTypeMap && appTypeLabels) {
|
|
3505
3545
|
const labelConfig = appTypeLabels.get(selectedAppType);
|
|
3506
3546
|
return jsxs("div", Object.assign({
|
|
3507
|
-
className: "content"
|
|
3547
|
+
className: "content",
|
|
3548
|
+
role: "contentinfo"
|
|
3508
3549
|
}, {
|
|
3509
3550
|
children: [jsx("span", {
|
|
3510
3551
|
children: jsx(DotButton, Object.assign({
|
|
@@ -3520,7 +3561,9 @@ const DotAppSwitcherView = ({
|
|
|
3520
3561
|
}, void 0)
|
|
3521
3562
|
}), void 0)
|
|
3522
3563
|
}, void 0), jsx("div", Object.assign({
|
|
3523
|
-
|
|
3564
|
+
"aria-level": 2,
|
|
3565
|
+
className: "product-heading",
|
|
3566
|
+
role: "heading"
|
|
3524
3567
|
}, {
|
|
3525
3568
|
children: createAppTypeLabel(selectedAppType, labelConfig.logo, labelConfig.singleTypeApps)
|
|
3526
3569
|
}), void 0), ((_a = appTypeMap === null || appTypeMap === void 0 ? void 0 : appTypeMap.get(selectedAppType)) === null || _a === void 0 ? void 0 : _a.length) >= _searchInstancesThreshold && jsx("div", Object.assign({
|
|
@@ -3533,14 +3576,16 @@ const DotAppSwitcherView = ({
|
|
|
3533
3576
|
value: searchText
|
|
3534
3577
|
}, void 0)
|
|
3535
3578
|
}), void 0), jsx("div", Object.assign({
|
|
3536
|
-
className: "product-applications"
|
|
3579
|
+
className: "product-applications",
|
|
3580
|
+
role: "list"
|
|
3537
3581
|
}, {
|
|
3538
3582
|
children: filteredAppInstances()
|
|
3539
3583
|
}), void 0)]
|
|
3540
3584
|
}), void 0);
|
|
3541
3585
|
} else {
|
|
3542
3586
|
return jsxs("div", Object.assign({
|
|
3543
|
-
className: "content"
|
|
3587
|
+
className: "content",
|
|
3588
|
+
role: "contentinfo"
|
|
3544
3589
|
}, {
|
|
3545
3590
|
children: [jsx(DotList, {
|
|
3546
3591
|
items: appTypeMenuItems === null || appTypeMenuItems === void 0 ? void 0 : appTypeMenuItems.map(item => ({
|
|
@@ -3554,7 +3599,9 @@ const DotAppSwitcherView = ({
|
|
|
3554
3599
|
const header = {
|
|
3555
3600
|
className: 'app-switcher-header',
|
|
3556
3601
|
children: jsxs("div", Object.assign({
|
|
3602
|
+
"aria-level": 1,
|
|
3557
3603
|
className: "app-switcher-header-title",
|
|
3604
|
+
role: "heading",
|
|
3558
3605
|
style: {
|
|
3559
3606
|
marginTop: _yOffset + 'px',
|
|
3560
3607
|
width: '80%'
|
|
@@ -3566,6 +3613,8 @@ const DotAppSwitcherView = ({
|
|
|
3566
3613
|
type: "image",
|
|
3567
3614
|
variant: "circular"
|
|
3568
3615
|
}, void 0), jsx(DotTypography, Object.assign({
|
|
3616
|
+
ariaRole: "heading",
|
|
3617
|
+
ariaLevel: 1,
|
|
3569
3618
|
className: "app-switcher-label"
|
|
3570
3619
|
}, {
|
|
3571
3620
|
children: "App switcher"
|
|
@@ -4307,6 +4356,7 @@ const DotAutoComplete = ({
|
|
|
4307
4356
|
disablePortal: _disablePortal = true,
|
|
4308
4357
|
endAdornmentTooltip,
|
|
4309
4358
|
error: _error = false,
|
|
4359
|
+
filterOptions,
|
|
4310
4360
|
filterSelectedOptions: _filterSelectedOptions = true,
|
|
4311
4361
|
freesolo: _freesolo = true,
|
|
4312
4362
|
checkIfOptionDisabled,
|
|
@@ -4528,6 +4578,7 @@ const DotAutoComplete = ({
|
|
|
4528
4578
|
"data-testid": dataTestId,
|
|
4529
4579
|
defaultValue: defaultValue,
|
|
4530
4580
|
disabled: _disabled,
|
|
4581
|
+
filterOptions: filterOptions,
|
|
4531
4582
|
filterSelectedOptions: _filterSelectedOptions,
|
|
4532
4583
|
freeSolo: _freesolo,
|
|
4533
4584
|
getOptionLabel: option => parseAutoCompleteValue(option),
|
|
@@ -4969,7 +5020,9 @@ const DotBreadcrumbs = ({
|
|
|
4969
5020
|
itemsAfterCollapse: itemsAfterCollapse,
|
|
4970
5021
|
maxItems: getMaxItems(adjustMaxItems, maxVisibleItems, maxItems),
|
|
4971
5022
|
ref: breadcrumbRef,
|
|
5023
|
+
role: "navigation",
|
|
4972
5024
|
separator: jsx(DotIcon, {
|
|
5025
|
+
ariaRole: "presentation",
|
|
4973
5026
|
className: "separator",
|
|
4974
5027
|
iconId: "chevron-right"
|
|
4975
5028
|
}, void 0)
|
|
@@ -6252,6 +6305,7 @@ function DotRadioButton({
|
|
|
6252
6305
|
return jsx(StyledFormControlLabel, {
|
|
6253
6306
|
className: rootClasses,
|
|
6254
6307
|
control: radioControl,
|
|
6308
|
+
"aria-label": value,
|
|
6255
6309
|
label: label || radioControl,
|
|
6256
6310
|
labelPlacement: labelPlacement,
|
|
6257
6311
|
value: value
|
|
@@ -6260,6 +6314,7 @@ function DotRadioButton({
|
|
|
6260
6314
|
|
|
6261
6315
|
const DotRadioGroup = ({
|
|
6262
6316
|
ariaLabel,
|
|
6317
|
+
ariaRole: _ariaRole = 'radiogroup',
|
|
6263
6318
|
className,
|
|
6264
6319
|
'data-testid': dataTestId,
|
|
6265
6320
|
defaultValue,
|
|
@@ -6338,6 +6393,7 @@ const DotRadioGroup = ({
|
|
|
6338
6393
|
defaultValue: defaultValue,
|
|
6339
6394
|
name: name,
|
|
6340
6395
|
onChange: handleChange,
|
|
6396
|
+
role: _ariaRole,
|
|
6341
6397
|
row: row,
|
|
6342
6398
|
value: selectedValue
|
|
6343
6399
|
}, {
|
|
@@ -7054,6 +7110,7 @@ const checkIfEmptyValue = inputValue => inputValue.trim() === '';
|
|
|
7054
7110
|
*/
|
|
7055
7111
|
const DotInlineEdit = ({
|
|
7056
7112
|
ariaLabel,
|
|
7113
|
+
ariaRole: _ariaRole = 'combobox',
|
|
7057
7114
|
bindings,
|
|
7058
7115
|
charactersLimit,
|
|
7059
7116
|
className,
|
|
@@ -7186,7 +7243,8 @@ const DotInlineEdit = ({
|
|
|
7186
7243
|
children: viewModeChildren
|
|
7187
7244
|
}), void 0) : jsx("div", Object.assign({
|
|
7188
7245
|
className: viewModeClasses,
|
|
7189
|
-
"data-testid": dataTestId && `${dataTestId}-view-mode-wrapper
|
|
7246
|
+
"data-testid": dataTestId && `${dataTestId}-view-mode-wrapper`,
|
|
7247
|
+
role: "presentation"
|
|
7190
7248
|
}, {
|
|
7191
7249
|
children: viewModeChildren
|
|
7192
7250
|
}), void 0);
|
|
@@ -7258,6 +7316,7 @@ const DotInlineEdit = ({
|
|
|
7258
7316
|
onMouseOut: () => handleShowTooltip(false),
|
|
7259
7317
|
onKeyDown: !readOnly ? event => handleKeyPress(event) : undefined,
|
|
7260
7318
|
ref: inlineEditRef,
|
|
7319
|
+
role: _ariaRole,
|
|
7261
7320
|
tabIndex: !readOnly ? _tabIndex : undefined,
|
|
7262
7321
|
typography: _typography
|
|
7263
7322
|
}, {
|
|
@@ -7344,19 +7403,23 @@ const StyledPill = styled(Chip).withConfig({
|
|
|
7344
7403
|
componentId: "l7oxi2-0"
|
|
7345
7404
|
})(["", ""], ({
|
|
7346
7405
|
theme
|
|
7347
|
-
}) => css(["&.", "{background-color:", ";color:", ";
|
|
7406
|
+
}) => css(["&.", "{background-color:", ";border-color:", ";color:", ";.dot-icon{color:", ";}&.MuiChip-outlined{&.error{background-color:", ";border-color:", ";color:", ";.dot-icon{color:", ";}}&.success{background-color:", ";border-color:", ";color:", ";.dot-icon{color:", ";}}&.warning{background-color:", ";border-color:", ";color:", ";.dot-icon{color:", ";}}&.in-progress{background-color:", ";border-color:", ";color:", ";.dot-icon{color:", ";}}}&.MuiChip-filled{&.error{background-color:", ";border-color:", ";color:", ";.dot-icon{color:", ";}}&.success{background-color:", ";border-color:", ";color:", ";.dot-icon{color:", ";}}&.warning{background-color:", ";border-color:", ";color:", ";.dot-icon{color:", ";}}&.in-progress{background-color:", ";border-color:", ";color:", ";.dot-icon{color:", ";}}}}"], rootClassName$n, ({
|
|
7348
7407
|
backgroundcolor
|
|
7349
7408
|
}) => {
|
|
7350
7409
|
return backgroundcolor || theme.palette.grey[200];
|
|
7410
|
+
}, ({
|
|
7411
|
+
bordercolor
|
|
7412
|
+
}) => {
|
|
7413
|
+
return bordercolor ? bordercolor : theme.palette.layer.n700;
|
|
7351
7414
|
}, ({
|
|
7352
7415
|
labelcolor
|
|
7353
7416
|
}) => {
|
|
7354
7417
|
return labelcolor ? labelcolor : theme.palette.layer.n700;
|
|
7355
7418
|
}, ({
|
|
7356
|
-
|
|
7419
|
+
labelcolor
|
|
7357
7420
|
}) => {
|
|
7358
|
-
return
|
|
7359
|
-
}, theme.palette.error[100], theme.palette.error.main, theme.palette.
|
|
7421
|
+
return labelcolor ? labelcolor : theme.palette.layer.n700;
|
|
7422
|
+
}, 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));
|
|
7360
7423
|
|
|
7361
7424
|
const DotPill = ({
|
|
7362
7425
|
ariaLabel,
|
|
@@ -9179,6 +9242,7 @@ const joinAcceptedAndRejectedFiles = (filesAccepted, filesRejected) => mapAccept
|
|
|
9179
9242
|
const DotFileUpload = ({
|
|
9180
9243
|
accept,
|
|
9181
9244
|
ariaLabel,
|
|
9245
|
+
ariaRole: _ariaRole = 'region',
|
|
9182
9246
|
buttonOnly: _buttonOnly = false,
|
|
9183
9247
|
className,
|
|
9184
9248
|
'data-testid': dataTestId,
|
|
@@ -9242,7 +9306,8 @@ const DotFileUpload = ({
|
|
|
9242
9306
|
uploadedFiles
|
|
9243
9307
|
});
|
|
9244
9308
|
return jsxs(StyledFileUploadContainer, Object.assign({
|
|
9245
|
-
className: containerClassName$2
|
|
9309
|
+
className: containerClassName$2,
|
|
9310
|
+
role: _ariaRole
|
|
9246
9311
|
}, {
|
|
9247
9312
|
children: [jsxs(StyledFileUpload, Object.assign({}, getRootProps(), {
|
|
9248
9313
|
"aria-label": ariaLabel,
|