@digital-ai/dot-components 2.12.0 → 2.13.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 +38 -8
- package/index.esm.js +112 -95
- package/index.umd.js +116 -99
- package/lib/components/table/Table.d.ts +5 -1
- package/lib/components/table/Table.stories.d.ts +2 -1
- package/package.json +1 -1
package/CHANGE_LOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.13.0](https://www.npmjs.com/package/@digital-ai/dot-components) (08/13/2023)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.12.1...2.13.0)
|
|
6
|
+
|
|
7
|
+
**Features:**
|
|
8
|
+
|
|
9
|
+
- S-95094: `DotTable` - Expose `rowsPerPageOptions` and `labelRowsPerPage` [\#1583](https://github.com/digital-ai/dot-components/pull/1583) ([dmiletic85](https://github.com/dmiletic85))
|
|
10
|
+
|
|
11
|
+
**Fixed bugs:**
|
|
12
|
+
|
|
13
|
+
- D-26200: `DotMenu` has an extra empty space [\#1585](https://github.com/digital-ai/dot-components/pull/1585) ([dmiletic85](https://github.com/dmiletic85))
|
|
14
|
+
- D-26197: `DotTable`, `DotTableActions`: Hovered action buttons are not displayed properly within list item [\#1584](https://github.com/digital-ai/dot-components/pull/1584) ([dmiletic85](https://github.com/dmiletic85))
|
|
15
|
+
|
|
16
|
+
## [2.12.1](https://www.npmjs.com/package/@digital-ai/dot-components) (08/07/2023)
|
|
17
|
+
|
|
18
|
+
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.12.0...2.12.1)
|
|
19
|
+
|
|
20
|
+
**Fixed bugs:**
|
|
21
|
+
|
|
22
|
+
- S-94608: Review Checkbox & Radio Button a11y issues [\#1575](https://github.com/digital-ai/dot-components/pull/1575) ([CWSites](https://github.com/CWSites))
|
|
23
|
+
|
|
24
|
+
**Misc:**
|
|
25
|
+
|
|
26
|
+
- S-91997: update aria-label on `DotProgress` [\#1574](https://github.com/digital-ai/dot-components/pull/1574) ([CWSites](https://github.com/CWSites))
|
|
27
|
+
- S-91994: a11y updates to Drawer [\#1573](https://github.com/digital-ai/dot-components/pull/1573) ([CWSites](https://github.com/CWSites))
|
|
28
|
+
- S-91996: adjust components with invalid child elements [\#1571](https://github.com/digital-ai/dot-components/pull/1571) ([CWSites](https://github.com/CWSites))
|
|
29
|
+
|
|
3
30
|
## [2.12.0](https://www.npmjs.com/package/@digital-ai/dot-components) (07/27/2023)
|
|
4
31
|
|
|
5
32
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.11.3...2.12.0)
|
|
@@ -378,10 +405,6 @@
|
|
|
378
405
|
|
|
379
406
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.3.0...2.3.1)
|
|
380
407
|
|
|
381
|
-
**Features:**
|
|
382
|
-
|
|
383
|
-
- S-90007 Expose ListboxComponent [\#1358](https://github.com/digital-ai/dot-components/pull/1358) ([angel-git](https://github.com/angel-git))
|
|
384
|
-
|
|
385
408
|
**Fixed bugs:**
|
|
386
409
|
|
|
387
410
|
- S-89896: Remove 'identity.' from host when constructing platform url [\#1379](https://github.com/digital-ai/dot-components/pull/1379) ([jmcnally](https://github.com/jmcnally))
|
|
@@ -399,12 +422,15 @@
|
|
|
399
422
|
|
|
400
423
|
- CI: bumps version to 2.2.1 \[skip ci\] \(\#1371\) [\#1372](https://github.com/digital-ai/dot-components/pull/1372) ([CWSites](https://github.com/CWSites))
|
|
401
424
|
- resolving more warnings [\#1369](https://github.com/digital-ai/dot-components/pull/1369) ([CWSites](https://github.com/CWSites))
|
|
402
|
-
- Upload drip echo icon [\#1366](https://github.com/digital-ai/dot-components/pull/1366) ([pauldigitalai](https://github.com/pauldigitalai))
|
|
403
425
|
|
|
404
426
|
## [2.2.1](https://www.npmjs.com/package/@digital-ai/dot-components) (02/08/2023)
|
|
405
427
|
|
|
406
428
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/1.21.8...2.2.1)
|
|
407
429
|
|
|
430
|
+
**Features:**
|
|
431
|
+
|
|
432
|
+
- S-90007 Expose ListboxComponent [\#1358](https://github.com/digital-ai/dot-components/pull/1358) ([angel-git](https://github.com/angel-git))
|
|
433
|
+
|
|
408
434
|
**Fixed bugs:**
|
|
409
435
|
|
|
410
436
|
- S-90105 `DotAutoComplete`: fix `readOnly` input attribute [\#1357](https://github.com/digital-ai/dot-components/pull/1357) ([angel-git](https://github.com/angel-git))
|
|
@@ -416,6 +442,7 @@
|
|
|
416
442
|
**Misc:**
|
|
417
443
|
|
|
418
444
|
- GitHub Action Troubleshooting [\#1368](https://github.com/digital-ai/dot-components/pull/1368) ([CWSites](https://github.com/CWSites))
|
|
445
|
+
- Upload drip echo icon [\#1366](https://github.com/digital-ai/dot-components/pull/1366) ([pauldigitalai](https://github.com/pauldigitalai))
|
|
419
446
|
- S-90007 Add missing test [\#1362](https://github.com/digital-ai/dot-components/pull/1362) ([angel-git](https://github.com/angel-git))
|
|
420
447
|
- icons-pin-update-Jan-27th [\#1354](https://github.com/digital-ai/dot-components/pull/1354) ([pauldigitalai](https://github.com/pauldigitalai))
|
|
421
448
|
|
|
@@ -557,7 +584,6 @@
|
|
|
557
584
|
**Features:**
|
|
558
585
|
|
|
559
586
|
- S-87871 Expose callback when sidebar collapses/expands [\#1274](https://github.com/digital-ai/dot-components/pull/1274) ([angel-git](https://github.com/angel-git))
|
|
560
|
-
- S-87316 Add focus state for Inline Edit [\#1255](https://github.com/digital-ai/dot-components/pull/1255) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
561
587
|
|
|
562
588
|
**Fixed bugs:**
|
|
563
589
|
|
|
@@ -586,6 +612,10 @@
|
|
|
586
612
|
|
|
587
613
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.0.0-rc.1...1.21.2)
|
|
588
614
|
|
|
615
|
+
**Features:**
|
|
616
|
+
|
|
617
|
+
- S-87316 Add focus state for Inline Edit [\#1255](https://github.com/digital-ai/dot-components/pull/1255) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
618
|
+
|
|
589
619
|
**Fixed bugs:**
|
|
590
620
|
|
|
591
621
|
- D-22241: `DotFileListItem`: fix focus states and expose `onKeyPress` [\#1254](https://github.com/digital-ai/dot-components/pull/1254) ([dmiletic85](https://github.com/dmiletic85))
|
|
@@ -1026,7 +1056,6 @@
|
|
|
1026
1056
|
|
|
1027
1057
|
**Features:**
|
|
1028
1058
|
|
|
1029
|
-
- S-80939: `Menu`: Add option to customize item's height [\#902](https://github.com/digital-ai/dot-components/pull/902) ([dmiletic85](https://github.com/dmiletic85))
|
|
1030
1059
|
- S-77210: Component - Drawer [\#893](https://github.com/digital-ai/dot-components/pull/893) ([monapatel91](https://github.com/monapatel91))
|
|
1031
1060
|
|
|
1032
1061
|
**Fixed bugs:**
|
|
@@ -1046,6 +1075,7 @@
|
|
|
1046
1075
|
|
|
1047
1076
|
**Features:**
|
|
1048
1077
|
|
|
1078
|
+
- S-80939: `Menu`: Add option to customize item's height [\#902](https://github.com/digital-ai/dot-components/pull/902) ([dmiletic85](https://github.com/dmiletic85))
|
|
1049
1079
|
- S-80871: `Sidebar` Changes on back arrow [\#896](https://github.com/digital-ai/dot-components/pull/896) ([dmiletic85](https://github.com/dmiletic85))
|
|
1050
1080
|
- S-80855: Display tooltip on last breadcrumb item \(on hover\) when it is clipped with ellipsis [\#883](https://github.com/digital-ai/dot-components/pull/883) ([dmiletic85](https://github.com/dmiletic85))
|
|
1051
1081
|
|
|
@@ -1155,7 +1185,6 @@
|
|
|
1155
1185
|
|
|
1156
1186
|
**Features:**
|
|
1157
1187
|
|
|
1158
|
-
- S-80473: Expose onFocus and onBlur callbacks for DotInputText and DotInputSelect components [\#832](https://github.com/digital-ai/dot-components/pull/832) ([selsemore](https://github.com/selsemore))
|
|
1159
1188
|
- S-80268: `DotDynamicForm` improvements [\#821](https://github.com/digital-ai/dot-components/pull/821) ([dmiletic85](https://github.com/dmiletic85))
|
|
1160
1189
|
|
|
1161
1190
|
**Fixed bugs:**
|
|
@@ -1169,6 +1198,7 @@
|
|
|
1169
1198
|
|
|
1170
1199
|
**Features:**
|
|
1171
1200
|
|
|
1201
|
+
- S-80473: Expose onFocus and onBlur callbacks for DotInputText and DotInputSelect components [\#832](https://github.com/digital-ai/dot-components/pull/832) ([selsemore](https://github.com/selsemore))
|
|
1172
1202
|
- S-80369: Create `ProgressButton` component [\#822](https://github.com/digital-ai/dot-components/pull/822) ([dmiletic85](https://github.com/dmiletic85))
|
|
1173
1203
|
- S-79696: change size of collapse icon button, add tooltip [\#819](https://github.com/digital-ai/dot-components/pull/819) ([CWSites](https://github.com/CWSites))
|
|
1174
1204
|
- S-80264: Agility wrapper sandbox documentation [\#810](https://github.com/digital-ai/dot-components/pull/810) ([CWSites](https://github.com/CWSites))
|
package/index.esm.js
CHANGED
|
@@ -80,7 +80,7 @@ const DotIcon = ({
|
|
|
80
80
|
role: _ariaRole
|
|
81
81
|
}, {
|
|
82
82
|
children: jsx("i", {
|
|
83
|
-
"aria-label": ariaLabel || `${iconId} icon
|
|
83
|
+
"aria-label": ariaLabel || `${iconId} icon`,
|
|
84
84
|
className: `icon-${iconId} dot-i`,
|
|
85
85
|
"data-testid": dataTestId && `${dataTestId}-i`,
|
|
86
86
|
role: _ariaRole
|
|
@@ -1896,7 +1896,7 @@ const StyledList = styled(List).withConfig({
|
|
|
1896
1896
|
componentId: "wxwqwr-0"
|
|
1897
1897
|
})(["", ""], ({
|
|
1898
1898
|
theme
|
|
1899
|
-
}) => css(["&.", "{background:", ";.dot-icon{color:", ";}&.", " .", "{padding-left:", ";}.MuiListSubheader-root{padding:0;.MuiTypography-root{padding:", ";}}}"], rootClassName$Z, theme.palette.layer.n0, theme.palette.layer.n700, nestedListClassName, listItemRootClass, theme.spacing(4), theme.spacing(1)));
|
|
1899
|
+
}) => css(["&.", "{background:", ";.dot-icon{color:", ";}&.", " .", "{padding-left:", ";}.", ".expandable{flex-direction:column;.MuiCollapse-root{padding-top:", ";margin-bottom:", ";}}.MuiListSubheader-root{padding:0;.MuiTypography-root{padding:", ";}}}"], rootClassName$Z, theme.palette.layer.n0, theme.palette.layer.n700, nestedListClassName, listItemRootClass, theme.spacing(4), listItemRootClass, theme.spacing(1), theme.spacing(-1), theme.spacing(1)));
|
|
1900
1900
|
|
|
1901
1901
|
const getChevronIcon = (nestedListType, isOpened) => {
|
|
1902
1902
|
if (nestedListType !== 'expandable') {
|
|
@@ -1916,7 +1916,7 @@ const StyledListItem = styled(ListItem).withConfig({
|
|
|
1916
1916
|
componentId: "sc-1fawh8v-0"
|
|
1917
1917
|
})(["", ""], ({
|
|
1918
1918
|
theme
|
|
1919
|
-
}) => css(["&.", "{&.", "{padding:0;}p.MuiTypography-root{margin-bottom:0;}.", "{align-items:center;display:flex;flex-grow:2;}.", " .MuiIcon-root{margin-right:", ";}.dot-icon i:before{color:", ";}}"], listItemRootClass, flyoutListItemClassName, listItemLinkClassName, flyoutItemLinkClassName, theme.spacing(4), theme.palette.text.primary));
|
|
1919
|
+
}) => css(["&.", "{&.", "{padding:0;}.dot-tooltip{display:flex;width:100%;}p.MuiTypography-root{flex-grow:2;margin-bottom:0;}.", "{align-items:center;display:flex;flex-grow:2;}.", " .MuiIcon-root{margin-right:", ";}.dot-icon i:before{color:", ";}}"], listItemRootClass, flyoutListItemClassName, listItemLinkClassName, flyoutItemLinkClassName, theme.spacing(4), theme.palette.text.primary));
|
|
1920
1920
|
|
|
1921
1921
|
const rootClassName$Y = 'dot-progress';
|
|
1922
1922
|
const StyledCircularProgress = styled(CircularProgress).withConfig({
|
|
@@ -1936,11 +1936,16 @@ const DotProgress = ({
|
|
|
1936
1936
|
variant: _variant = 'indeterminate'
|
|
1937
1937
|
}) => {
|
|
1938
1938
|
const rootClasses = useStylesWithRootClass(rootClassName$Y, className);
|
|
1939
|
+
useEffect(() => {
|
|
1940
|
+
if (!ariaLabel) {
|
|
1941
|
+
console.warn('a11y: DotProgress must have an ariaLabel to describe the progress component');
|
|
1942
|
+
}
|
|
1943
|
+
}, []);
|
|
1939
1944
|
return jsx(DotTooltip, Object.assign({
|
|
1940
1945
|
title: _tooltip
|
|
1941
1946
|
}, {
|
|
1942
1947
|
children: jsx(StyledCircularProgress, {
|
|
1943
|
-
"aria-label": ariaLabel,
|
|
1948
|
+
"aria-label": ariaLabel || _tooltip,
|
|
1944
1949
|
classes: {
|
|
1945
1950
|
root: rootClasses
|
|
1946
1951
|
},
|
|
@@ -2046,8 +2051,7 @@ const calculateMaxHeight = ({
|
|
|
2046
2051
|
height
|
|
2047
2052
|
}) => {
|
|
2048
2053
|
const customItemHeight = height ? height : itemHeight;
|
|
2049
|
-
|
|
2050
|
-
maxHeight += customItemHeight + 3;
|
|
2054
|
+
maxHeight += customItemHeight;
|
|
2051
2055
|
});
|
|
2052
2056
|
return maxHeight;
|
|
2053
2057
|
};
|
|
@@ -2376,7 +2380,8 @@ const DotDrawerHeader = ({
|
|
|
2376
2380
|
"aria-level": 2,
|
|
2377
2381
|
className: rootClasses,
|
|
2378
2382
|
"data-testid": dataTestId,
|
|
2379
|
-
role: "heading"
|
|
2383
|
+
role: "heading",
|
|
2384
|
+
tabIndex: -1
|
|
2380
2385
|
}, {
|
|
2381
2386
|
children: [children, variant !== 'permanent' && jsx(DotIconButton, {
|
|
2382
2387
|
ariaLabel: "close drawer",
|
|
@@ -2547,10 +2552,12 @@ const DotListDivider = ({
|
|
|
2547
2552
|
}), void 0)
|
|
2548
2553
|
}), void 0);
|
|
2549
2554
|
}
|
|
2550
|
-
return jsx(
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2555
|
+
return jsx("li", {
|
|
2556
|
+
children: jsx(Divider, {
|
|
2557
|
+
"aria-hidden": true,
|
|
2558
|
+
"data-testid": `divider-${index}`,
|
|
2559
|
+
role: "separator"
|
|
2560
|
+
}, void 0)
|
|
2554
2561
|
}, void 0);
|
|
2555
2562
|
};
|
|
2556
2563
|
const DotList = ({
|
|
@@ -2671,7 +2678,7 @@ const DotListItem = ({
|
|
|
2671
2678
|
const isFlyout = nestedListType === 'menu' && hasChildren;
|
|
2672
2679
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
2673
2680
|
const showEndIcon = endIcon || hasChildren;
|
|
2674
|
-
const rootClasses = useStylesWithRootClass(listItemRootClass, className, isOpened ? 'open' : '');
|
|
2681
|
+
const rootClasses = useStylesWithRootClass(listItemRootClass, className, nestedListType === 'expandable' && hasChildren ? 'expandable' : '', isOpened ? 'open' : '');
|
|
2675
2682
|
const toggleOpen = event => setAnchorEl(event.currentTarget);
|
|
2676
2683
|
const handleClick = event => {
|
|
2677
2684
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
@@ -2694,47 +2701,55 @@ const DotListItem = ({
|
|
|
2694
2701
|
}
|
|
2695
2702
|
return endIcon;
|
|
2696
2703
|
};
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2704
|
+
const renderListItemLink = jsxs(DotLink, Object.assign({
|
|
2705
|
+
href: href,
|
|
2706
|
+
className: listItemLinkClassName,
|
|
2707
|
+
underline: "none",
|
|
2708
|
+
target: target
|
|
2709
|
+
}, {
|
|
2710
|
+
children: [startIcon && jsx(ListItemIcon, {
|
|
2711
|
+
children: startIcon
|
|
2712
|
+
}, void 0), renderListItemText(), showEndIcon && renderListItemEndIcon()]
|
|
2713
|
+
}), void 0);
|
|
2714
|
+
return jsx(StyledListItem, Object.assign({
|
|
2715
|
+
"aria-label": ariaLabel,
|
|
2716
|
+
button: true,
|
|
2717
|
+
classes: {
|
|
2718
|
+
root: rootClasses
|
|
2719
|
+
},
|
|
2720
|
+
component: _component2,
|
|
2721
|
+
"data-testid": dataTestId,
|
|
2722
|
+
divider: _divider,
|
|
2723
|
+
href: onClick ? null : href,
|
|
2724
|
+
onClick: onClick || !href ? handleClick : null,
|
|
2725
|
+
role: onClick ? 'button' : _ariaRole2,
|
|
2726
|
+
selected: isFlyout ? isOpened : selected,
|
|
2727
|
+
target: target
|
|
2728
|
+
}, {
|
|
2729
|
+
children: jsxs(Fragment, {
|
|
2730
|
+
children: [jsx(DotTooltip, Object.assign({
|
|
2731
|
+
"data-testid": `${dataTestId}-tooltip`,
|
|
2732
|
+
placement: _tooltipPlacement,
|
|
2733
|
+
title: tooltip
|
|
2717
2734
|
}, {
|
|
2718
|
-
children:
|
|
2719
|
-
className: listItemLinkClassName
|
|
2720
|
-
}, {
|
|
2735
|
+
children: href && !onClick ? renderListItemLink : jsxs(Fragment, {
|
|
2721
2736
|
children: [startIcon && jsx(ListItemIcon, {
|
|
2722
2737
|
children: startIcon
|
|
2723
|
-
}, void 0), renderListItemText()]
|
|
2724
|
-
}
|
|
2725
|
-
}), void 0)
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
}, void 0)
|
|
2737
|
-
}, void 0);
|
|
2738
|
+
}, void 0), renderListItemText(), showEndIcon && renderListItemEndIcon()]
|
|
2739
|
+
}, void 0)
|
|
2740
|
+
}), void 0), hasChildren && jsx(NestedList, {
|
|
2741
|
+
anchorEl: anchorEl,
|
|
2742
|
+
ariaLabel: "nested list",
|
|
2743
|
+
"data-testid": "nestedList",
|
|
2744
|
+
items: _items2,
|
|
2745
|
+
menuPlacement: menuPlacement,
|
|
2746
|
+
nestedDrawerLeftSpacing: nestedDrawerLeftSpacing,
|
|
2747
|
+
onMenuLeave: handleMenuLeave,
|
|
2748
|
+
open: isOpened,
|
|
2749
|
+
type: nestedListType
|
|
2750
|
+
}, void 0)]
|
|
2751
|
+
}, void 0)
|
|
2752
|
+
}), void 0);
|
|
2738
2753
|
};
|
|
2739
2754
|
const NestedList = ({
|
|
2740
2755
|
ariaLabel,
|
|
@@ -2777,17 +2792,17 @@ const NestedList = ({
|
|
|
2777
2792
|
text
|
|
2778
2793
|
} = item;
|
|
2779
2794
|
return {
|
|
2780
|
-
children: jsx(
|
|
2781
|
-
|
|
2782
|
-
|
|
2795
|
+
children: jsx(StyledListItem, Object.assign({
|
|
2796
|
+
className: flyoutItemClasses,
|
|
2797
|
+
component: href && !onClick ? 'a' : null,
|
|
2798
|
+
"data-testid": `${dataTestId}-item-${index}`,
|
|
2799
|
+
href: href,
|
|
2800
|
+
onClick: onClick,
|
|
2801
|
+
target: target
|
|
2783
2802
|
}, {
|
|
2784
|
-
children: jsx(
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
"data-testid": `${dataTestId}-item-${index}`,
|
|
2788
|
-
href: href,
|
|
2789
|
-
onClick: onClick,
|
|
2790
|
-
target: target
|
|
2803
|
+
children: jsx(DotTooltip, Object.assign({
|
|
2804
|
+
placement: tooltipPlacement,
|
|
2805
|
+
title: tooltip
|
|
2791
2806
|
}, {
|
|
2792
2807
|
children: jsxs("span", Object.assign({
|
|
2793
2808
|
className: flyoutSpanClasses
|
|
@@ -2798,8 +2813,8 @@ const NestedList = ({
|
|
|
2798
2813
|
children: text
|
|
2799
2814
|
}), void 0)]
|
|
2800
2815
|
}), void 0)
|
|
2801
|
-
}), `${parentItemIndex}-${index}`)
|
|
2802
|
-
}), `${parentItemIndex}-${index}
|
|
2816
|
+
}), `${parentItemIndex}-${index}-tooltip`)
|
|
2817
|
+
}), `${parentItemIndex}-${index}`),
|
|
2803
2818
|
classes: '',
|
|
2804
2819
|
key: String(index)
|
|
2805
2820
|
};
|
|
@@ -6307,7 +6322,7 @@ const DotProgressButton = ({
|
|
|
6307
6322
|
const titleClasses = useStylesWithRootClass(_isLoading ? 'hidden' : '');
|
|
6308
6323
|
const progressCircleSize = _size === 'large' ? SPINNER_LARGE_SIZE : SPINNER_DEFAULT_SIZE;
|
|
6309
6324
|
return jsxs(StyledProgressButton, Object.assign({
|
|
6310
|
-
ariaLabel: ariaLabel,
|
|
6325
|
+
ariaLabel: ariaLabel || tooltip,
|
|
6311
6326
|
className: rootClasses,
|
|
6312
6327
|
"data-testid": dataTestId,
|
|
6313
6328
|
disableRipple: _disableRipple,
|
|
@@ -6339,7 +6354,7 @@ const StyledRadioButton = styled(Radio).withConfig({
|
|
|
6339
6354
|
|
|
6340
6355
|
function DotRadioButton({
|
|
6341
6356
|
ariaLabel,
|
|
6342
|
-
checked
|
|
6357
|
+
checked,
|
|
6343
6358
|
className,
|
|
6344
6359
|
'data-testid': dataTestId,
|
|
6345
6360
|
disabled,
|
|
@@ -6359,7 +6374,7 @@ function DotRadioButton({
|
|
|
6359
6374
|
};
|
|
6360
6375
|
// a11y: role doesn't need to be specified because it is done so automatically by the MUI component
|
|
6361
6376
|
const radioControl = jsx(StyledRadioButton, {
|
|
6362
|
-
"aria-
|
|
6377
|
+
"aria-checked": checked,
|
|
6363
6378
|
checked: checked,
|
|
6364
6379
|
classes: {
|
|
6365
6380
|
root: rootClassName$r
|
|
@@ -6505,6 +6520,8 @@ const DotSwitch = ({
|
|
|
6505
6520
|
const handleChange = event => {
|
|
6506
6521
|
onChange && onChange(event);
|
|
6507
6522
|
};
|
|
6523
|
+
// TODO: Future version of MUI v6 will have proper role="switch" instead of role="checkbox"
|
|
6524
|
+
// https://github.com/mui/material-ui/pull/17870
|
|
6508
6525
|
const switchControl = jsx(StyledSwitch, {
|
|
6509
6526
|
checked: checked,
|
|
6510
6527
|
classes: {
|
|
@@ -8826,6 +8843,7 @@ const DotTable = ({
|
|
|
8826
8843
|
emptyMessage,
|
|
8827
8844
|
footerTypography: _footerTypography = TABLE_TYPOGRAPHY_VARIANT,
|
|
8828
8845
|
headerTypography: _headerTypography = TABLE_TYPOGRAPHY_VARIANT,
|
|
8846
|
+
labelRowsPerPage,
|
|
8829
8847
|
loading: _loading = false,
|
|
8830
8848
|
maxHeight,
|
|
8831
8849
|
multiSelect,
|
|
@@ -8835,6 +8853,7 @@ const DotTable = ({
|
|
|
8835
8853
|
onUpdateData,
|
|
8836
8854
|
page: _page = 0,
|
|
8837
8855
|
rowsPerPage,
|
|
8856
|
+
rowsPerPageOptions,
|
|
8838
8857
|
stickyHeader: _stickyHeader = true,
|
|
8839
8858
|
sortable: _sortable = true,
|
|
8840
8859
|
toolbar
|
|
@@ -8989,10 +9008,12 @@ const DotTable = ({
|
|
|
8989
9008
|
}), void 0)
|
|
8990
9009
|
}), void 0), rowsPerPage && jsx(DotTablePagination, {
|
|
8991
9010
|
count: getTotalCount(),
|
|
9011
|
+
labelRowsPerPage: labelRowsPerPage,
|
|
8992
9012
|
onPageChange: onPageChange,
|
|
8993
9013
|
onRowsPerPageChange: onRowsPerPageChange,
|
|
8994
9014
|
page: tablePage,
|
|
8995
9015
|
rowsPerPage: tableRowsPerPage,
|
|
9016
|
+
rowsPerPageOptions: rowsPerPageOptions,
|
|
8996
9017
|
typography: _footerTypography
|
|
8997
9018
|
}, void 0)]
|
|
8998
9019
|
}), void 0);
|
|
@@ -9040,9 +9061,7 @@ const TableActionsContainer = styled.div.withConfig({
|
|
|
9040
9061
|
const StyledMenu = styled(DotMenu).withConfig({
|
|
9041
9062
|
displayName: "TableActionsstyles__StyledMenu",
|
|
9042
9063
|
componentId: "sc-8lo813-1"
|
|
9043
|
-
})(["", ""], ({
|
|
9044
|
-
theme
|
|
9045
|
-
}) => css(["&.dot-menu .table-menu-button{margin-left:0;padding-left:0;&:hover{background-color:", ";}}"], theme.palette.grey[50]));
|
|
9064
|
+
})(["", ""], () => css(["&.dot-menu .table-menu-button{margin-left:0;padding-left:0;&:hover{background-color:transparent;}}"]));
|
|
9046
9065
|
|
|
9047
9066
|
const DotTableActions = ({
|
|
9048
9067
|
actions,
|
|
@@ -9560,9 +9579,8 @@ const StyledDraggableList = styled.div.withConfig({
|
|
|
9560
9579
|
componentId: "sc-1nekees-0"
|
|
9561
9580
|
})(["", ""], ({
|
|
9562
9581
|
theme,
|
|
9563
|
-
width,
|
|
9564
9582
|
draggableHandle
|
|
9565
|
-
}) => css(["&.", "
|
|
9583
|
+
}) => css(["&.", "{padding:", ";.", "{.dot-icon{color:", ";}&.react-draggable-dragging{background-color:", ";}&.with-default-cursor{cursor:default;}&.with-handle-grab-cursor ", "{cursor:grab;}}}"], rootClassName$3, theme.spacing(1, 0), listItemClassName, theme.palette.layer.n700, theme.palette.grey[50], draggableHandle));
|
|
9566
9584
|
|
|
9567
9585
|
const getOrderedListItems = (layout, listItems) => {
|
|
9568
9586
|
if (!listItems || !layout) return [];
|
|
@@ -9617,35 +9635,34 @@ const DotDraggableList = ({
|
|
|
9617
9635
|
draggableHandle: draggableHandle,
|
|
9618
9636
|
width: listWidth
|
|
9619
9637
|
}, {
|
|
9620
|
-
children: jsx(
|
|
9621
|
-
"
|
|
9638
|
+
children: jsx(ListGridLayout, Object.assign({
|
|
9639
|
+
className: "layout",
|
|
9640
|
+
draggableHandle: draggableHandle,
|
|
9641
|
+
isDraggable: !disableDrag,
|
|
9642
|
+
layout: getListItemLayout(orderedItems),
|
|
9643
|
+
cols: 1,
|
|
9644
|
+
margin: [0, 0],
|
|
9645
|
+
onLayoutChange: onChange && handleLayoutChange(),
|
|
9646
|
+
rowHeight: _rowHeight,
|
|
9622
9647
|
style: {
|
|
9623
9648
|
width: listWidth
|
|
9624
9649
|
}
|
|
9625
9650
|
}, {
|
|
9626
|
-
children:
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
})
|
|
9640
|
-
|
|
9641
|
-
"data-testid": dataTestId && `${dataTestId}-item`,
|
|
9642
|
-
button: true,
|
|
9643
|
-
children: renderNodeOrTypography(children),
|
|
9644
|
-
className: listItemClasses,
|
|
9645
|
-
disableRipple: true
|
|
9646
|
-
}, itemId);
|
|
9647
|
-
})
|
|
9648
|
-
}), void 0)
|
|
9651
|
+
children: orderedItems.map(({
|
|
9652
|
+
id: itemId,
|
|
9653
|
+
children
|
|
9654
|
+
}) => {
|
|
9655
|
+
return jsx(ListItem, {
|
|
9656
|
+
"data-testid": dataTestId && `${dataTestId}-item`,
|
|
9657
|
+
button: true,
|
|
9658
|
+
children: renderNodeOrTypography(children),
|
|
9659
|
+
className: listItemClasses,
|
|
9660
|
+
disableRipple: true,
|
|
9661
|
+
style: {
|
|
9662
|
+
width: listWidth
|
|
9663
|
+
}
|
|
9664
|
+
}, itemId);
|
|
9665
|
+
})
|
|
9649
9666
|
}), void 0)
|
|
9650
9667
|
}), void 0);
|
|
9651
9668
|
};
|
package/index.umd.js
CHANGED
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
role: ariaRole
|
|
215
215
|
}, {
|
|
216
216
|
children: jsxRuntime.jsx("i", {
|
|
217
|
-
"aria-label": ariaLabel || iconId + " icon
|
|
217
|
+
"aria-label": ariaLabel || iconId + " icon",
|
|
218
218
|
className: "icon-" + iconId + " dot-i",
|
|
219
219
|
"data-testid": dataTestId && dataTestId + "-i",
|
|
220
220
|
role: ariaRole
|
|
@@ -2141,7 +2141,7 @@
|
|
|
2141
2141
|
componentId: "wxwqwr-0"
|
|
2142
2142
|
})(templateObject_2$_ || (templateObject_2$_ = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
2143
2143
|
var theme = _a.theme;
|
|
2144
|
-
return styled.css(templateObject_1$12 || (templateObject_1$12 = __makeTemplateObject(["\n &.", " {\n background: ", ";\n\n .dot-icon {\n color: ", ";\n }\n\n &.", " .", " {\n padding-left: ", ";\n }\n\n .MuiListSubheader-root {\n padding: 0;\n\n .MuiTypography-root {\n padding: ", ";\n }\n }\n }\n "], ["\n &.", " {\n background: ", ";\n\n .dot-icon {\n color: ", ";\n }\n\n &.", " .", " {\n padding-left: ", ";\n }\n\n .MuiListSubheader-root {\n padding: 0;\n\n .MuiTypography-root {\n padding: ", ";\n }\n }\n }\n "])), rootClassName$Z, theme.palette.layer.n0, theme.palette.layer.n700, nestedListClassName, listItemRootClass, theme.spacing(4), theme.spacing(1));
|
|
2144
|
+
return styled.css(templateObject_1$12 || (templateObject_1$12 = __makeTemplateObject(["\n &.", " {\n background: ", ";\n\n .dot-icon {\n color: ", ";\n }\n\n &.", " .", " {\n padding-left: ", ";\n }\n\n .", ".expandable {\n flex-direction: column;\n\n .MuiCollapse-root {\n padding-top: ", ";\n margin-bottom: ", ";\n }\n }\n\n .MuiListSubheader-root {\n padding: 0;\n\n .MuiTypography-root {\n padding: ", ";\n }\n }\n }\n "], ["\n &.", " {\n background: ", ";\n\n .dot-icon {\n color: ", ";\n }\n\n &.", " .", " {\n padding-left: ", ";\n }\n\n .", ".expandable {\n flex-direction: column;\n\n .MuiCollapse-root {\n padding-top: ", ";\n margin-bottom: ", ";\n }\n }\n\n .MuiListSubheader-root {\n padding: 0;\n\n .MuiTypography-root {\n padding: ", ";\n }\n }\n }\n "])), rootClassName$Z, theme.palette.layer.n0, theme.palette.layer.n700, nestedListClassName, listItemRootClass, theme.spacing(4), listItemRootClass, theme.spacing(1), theme.spacing(-1), theme.spacing(1));
|
|
2145
2145
|
});
|
|
2146
2146
|
var templateObject_1$12, templateObject_2$_;
|
|
2147
2147
|
|
|
@@ -2163,7 +2163,7 @@
|
|
|
2163
2163
|
componentId: "sc-1fawh8v-0"
|
|
2164
2164
|
})(templateObject_2$Z || (templateObject_2$Z = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
2165
2165
|
var theme = _a.theme;
|
|
2166
|
-
return styled.css(templateObject_1$11 || (templateObject_1$11 = __makeTemplateObject(["\n &.", " {\n &.", " {\n padding: 0;\n }\n\n p.MuiTypography-root {\n margin-bottom: 0;\n }\n\n .", " {\n align-items: center;\n display: flex;\n flex-grow: 2;\n }\n\n .", " .MuiIcon-root {\n margin-right: ", ";\n }\n\n .dot-icon i:before {\n color: ", ";\n }\n }\n "], ["\n &.", " {\n &.", " {\n padding: 0;\n }\n\n p.MuiTypography-root {\n margin-bottom: 0;\n }\n\n .", " {\n align-items: center;\n display: flex;\n flex-grow: 2;\n }\n\n .", " .MuiIcon-root {\n margin-right: ", ";\n }\n\n .dot-icon i:before {\n color: ", ";\n }\n }\n "])), listItemRootClass, flyoutListItemClassName, listItemLinkClassName, flyoutItemLinkClassName, theme.spacing(4), theme.palette.text.primary);
|
|
2166
|
+
return styled.css(templateObject_1$11 || (templateObject_1$11 = __makeTemplateObject(["\n &.", " {\n &.", " {\n padding: 0;\n }\n\n .dot-tooltip {\n display: flex;\n width: 100%;\n }\n\n p.MuiTypography-root {\n flex-grow: 2;\n margin-bottom: 0;\n }\n\n .", " {\n align-items: center;\n display: flex;\n flex-grow: 2;\n }\n\n .", " .MuiIcon-root {\n margin-right: ", ";\n }\n\n .dot-icon i:before {\n color: ", ";\n }\n }\n "], ["\n &.", " {\n &.", " {\n padding: 0;\n }\n\n .dot-tooltip {\n display: flex;\n width: 100%;\n }\n\n p.MuiTypography-root {\n flex-grow: 2;\n margin-bottom: 0;\n }\n\n .", " {\n align-items: center;\n display: flex;\n flex-grow: 2;\n }\n\n .", " .MuiIcon-root {\n margin-right: ", ";\n }\n\n .dot-icon i:before {\n color: ", ";\n }\n }\n "])), listItemRootClass, flyoutListItemClassName, listItemLinkClassName, flyoutItemLinkClassName, theme.spacing(4), theme.palette.text.primary);
|
|
2167
2167
|
});
|
|
2168
2168
|
var templateObject_1$11, templateObject_2$Z;
|
|
2169
2169
|
|
|
@@ -2190,11 +2190,16 @@
|
|
|
2190
2190
|
_f = _a.variant,
|
|
2191
2191
|
variant = _f === void 0 ? 'indeterminate' : _f;
|
|
2192
2192
|
var rootClasses = useStylesWithRootClass(rootClassName$Y, className);
|
|
2193
|
+
React.useEffect(function () {
|
|
2194
|
+
if (!ariaLabel) {
|
|
2195
|
+
console.warn('a11y: DotProgress must have an ariaLabel to describe the progress component');
|
|
2196
|
+
}
|
|
2197
|
+
}, []);
|
|
2193
2198
|
return jsxRuntime.jsx(DotTooltip, __assign({
|
|
2194
2199
|
title: tooltip
|
|
2195
2200
|
}, {
|
|
2196
2201
|
children: jsxRuntime.jsx(StyledCircularProgress, {
|
|
2197
|
-
"aria-label": ariaLabel,
|
|
2202
|
+
"aria-label": ariaLabel || tooltip,
|
|
2198
2203
|
classes: {
|
|
2199
2204
|
root: rootClasses
|
|
2200
2205
|
},
|
|
@@ -2307,8 +2312,7 @@
|
|
|
2307
2312
|
visibleItems.forEach(function (_a) {
|
|
2308
2313
|
var height = _a.height;
|
|
2309
2314
|
var customItemHeight = height ? height : itemHeight;
|
|
2310
|
-
|
|
2311
|
-
maxHeight += customItemHeight + 3;
|
|
2315
|
+
maxHeight += customItemHeight;
|
|
2312
2316
|
});
|
|
2313
2317
|
return maxHeight;
|
|
2314
2318
|
};
|
|
@@ -2669,7 +2673,8 @@
|
|
|
2669
2673
|
"aria-level": 2,
|
|
2670
2674
|
className: rootClasses,
|
|
2671
2675
|
"data-testid": dataTestId,
|
|
2672
|
-
role: "heading"
|
|
2676
|
+
role: "heading",
|
|
2677
|
+
tabIndex: -1
|
|
2673
2678
|
}, {
|
|
2674
2679
|
children: [children, variant !== 'permanent' && jsxRuntime.jsx(DotIconButton, {
|
|
2675
2680
|
ariaLabel: "close drawer",
|
|
@@ -2849,10 +2854,12 @@
|
|
|
2849
2854
|
}), void 0)
|
|
2850
2855
|
}), void 0);
|
|
2851
2856
|
}
|
|
2852
|
-
return jsxRuntime.jsx(
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2857
|
+
return jsxRuntime.jsx("li", {
|
|
2858
|
+
children: jsxRuntime.jsx(material.Divider, {
|
|
2859
|
+
"aria-hidden": true,
|
|
2860
|
+
"data-testid": "divider-" + index,
|
|
2861
|
+
role: "separator"
|
|
2862
|
+
}, void 0)
|
|
2856
2863
|
}, void 0);
|
|
2857
2864
|
};
|
|
2858
2865
|
var DotList = function DotList(_a) {
|
|
@@ -2989,7 +2996,7 @@
|
|
|
2989
2996
|
anchorEl = _g[0],
|
|
2990
2997
|
setAnchorEl = _g[1];
|
|
2991
2998
|
var showEndIcon = endIcon || hasChildren;
|
|
2992
|
-
var rootClasses = useStylesWithRootClass(listItemRootClass, className, isOpened ? 'open' : '');
|
|
2999
|
+
var rootClasses = useStylesWithRootClass(listItemRootClass, className, nestedListType === 'expandable' && hasChildren ? 'expandable' : '', isOpened ? 'open' : '');
|
|
2993
3000
|
var toggleOpen = function toggleOpen(event) {
|
|
2994
3001
|
return setAnchorEl(event.currentTarget);
|
|
2995
3002
|
};
|
|
@@ -3018,47 +3025,55 @@
|
|
|
3018
3025
|
}
|
|
3019
3026
|
return endIcon;
|
|
3020
3027
|
};
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3028
|
+
var renderListItemLink = jsxRuntime.jsxs(DotLink, __assign({
|
|
3029
|
+
href: href,
|
|
3030
|
+
className: listItemLinkClassName,
|
|
3031
|
+
underline: "none",
|
|
3032
|
+
target: target
|
|
3033
|
+
}, {
|
|
3034
|
+
children: [startIcon && jsxRuntime.jsx(material.ListItemIcon, {
|
|
3035
|
+
children: startIcon
|
|
3036
|
+
}, void 0), renderListItemText(), showEndIcon && renderListItemEndIcon()]
|
|
3037
|
+
}), void 0);
|
|
3038
|
+
return jsxRuntime.jsx(StyledListItem, __assign({
|
|
3039
|
+
"aria-label": ariaLabel,
|
|
3040
|
+
button: true,
|
|
3041
|
+
classes: {
|
|
3042
|
+
root: rootClasses
|
|
3043
|
+
},
|
|
3044
|
+
component: component,
|
|
3045
|
+
"data-testid": dataTestId,
|
|
3046
|
+
divider: divider,
|
|
3047
|
+
href: onClick ? null : href,
|
|
3048
|
+
onClick: onClick || !href ? handleClick : null,
|
|
3049
|
+
role: onClick ? 'button' : ariaRole,
|
|
3050
|
+
selected: isFlyout ? isOpened : selected,
|
|
3051
|
+
target: target
|
|
3052
|
+
}, {
|
|
3053
|
+
children: jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3054
|
+
children: [jsxRuntime.jsx(DotTooltip, __assign({
|
|
3055
|
+
"data-testid": dataTestId + "-tooltip",
|
|
3056
|
+
placement: tooltipPlacement,
|
|
3057
|
+
title: tooltip
|
|
3041
3058
|
}, {
|
|
3042
|
-
children:
|
|
3043
|
-
className: listItemLinkClassName
|
|
3044
|
-
}, {
|
|
3059
|
+
children: href && !onClick ? renderListItemLink : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3045
3060
|
children: [startIcon && jsxRuntime.jsx(material.ListItemIcon, {
|
|
3046
3061
|
children: startIcon
|
|
3047
|
-
}, void 0), renderListItemText()]
|
|
3048
|
-
}
|
|
3049
|
-
}), void 0)
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
}, void 0)
|
|
3061
|
-
}, void 0);
|
|
3062
|
+
}, void 0), renderListItemText(), showEndIcon && renderListItemEndIcon()]
|
|
3063
|
+
}, void 0)
|
|
3064
|
+
}), void 0), hasChildren && jsxRuntime.jsx(NestedList, {
|
|
3065
|
+
anchorEl: anchorEl,
|
|
3066
|
+
ariaLabel: "nested list",
|
|
3067
|
+
"data-testid": "nestedList",
|
|
3068
|
+
items: items,
|
|
3069
|
+
menuPlacement: menuPlacement,
|
|
3070
|
+
nestedDrawerLeftSpacing: nestedDrawerLeftSpacing,
|
|
3071
|
+
onMenuLeave: handleMenuLeave,
|
|
3072
|
+
open: isOpened,
|
|
3073
|
+
type: nestedListType
|
|
3074
|
+
}, void 0)]
|
|
3075
|
+
}, void 0)
|
|
3076
|
+
}), void 0);
|
|
3062
3077
|
};
|
|
3063
3078
|
var NestedList = function NestedList(_a) {
|
|
3064
3079
|
var ariaLabel = _a.ariaLabel,
|
|
@@ -3099,17 +3114,17 @@
|
|
|
3099
3114
|
tooltipPlacement = _a === void 0 ? DEFAULT_TOOLTIP_PLACEMENT : _a,
|
|
3100
3115
|
text = item.text;
|
|
3101
3116
|
return {
|
|
3102
|
-
children: jsxRuntime.jsx(
|
|
3103
|
-
|
|
3104
|
-
|
|
3117
|
+
children: jsxRuntime.jsx(StyledListItem, __assign({
|
|
3118
|
+
className: flyoutItemClasses,
|
|
3119
|
+
component: href && !onClick ? 'a' : null,
|
|
3120
|
+
"data-testid": dataTestId + "-item-" + index,
|
|
3121
|
+
href: href,
|
|
3122
|
+
onClick: onClick,
|
|
3123
|
+
target: target
|
|
3105
3124
|
}, {
|
|
3106
|
-
children: jsxRuntime.jsx(
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
"data-testid": dataTestId + "-item-" + index,
|
|
3110
|
-
href: href,
|
|
3111
|
-
onClick: onClick,
|
|
3112
|
-
target: target
|
|
3125
|
+
children: jsxRuntime.jsx(DotTooltip, __assign({
|
|
3126
|
+
placement: tooltipPlacement,
|
|
3127
|
+
title: tooltip
|
|
3113
3128
|
}, {
|
|
3114
3129
|
children: jsxRuntime.jsxs("span", __assign({
|
|
3115
3130
|
className: flyoutSpanClasses
|
|
@@ -3120,8 +3135,8 @@
|
|
|
3120
3135
|
children: text
|
|
3121
3136
|
}), void 0)]
|
|
3122
3137
|
}), void 0)
|
|
3123
|
-
}), parentItemIndex + "-" + index)
|
|
3124
|
-
}), parentItemIndex + "-" + index
|
|
3138
|
+
}), parentItemIndex + "-" + index + "-tooltip")
|
|
3139
|
+
}), parentItemIndex + "-" + index),
|
|
3125
3140
|
classes: '',
|
|
3126
3141
|
key: String(index)
|
|
3127
3142
|
};
|
|
@@ -6866,7 +6881,7 @@
|
|
|
6866
6881
|
var titleClasses = useStylesWithRootClass(isLoading ? 'hidden' : '');
|
|
6867
6882
|
var progressCircleSize = size === 'large' ? SPINNER_LARGE_SIZE : SPINNER_DEFAULT_SIZE;
|
|
6868
6883
|
return jsxRuntime.jsxs(StyledProgressButton, __assign({
|
|
6869
|
-
ariaLabel: ariaLabel,
|
|
6884
|
+
ariaLabel: ariaLabel || tooltip,
|
|
6870
6885
|
className: rootClasses,
|
|
6871
6886
|
"data-testid": dataTestId,
|
|
6872
6887
|
disableRipple: disableRipple,
|
|
@@ -6901,21 +6916,20 @@
|
|
|
6901
6916
|
|
|
6902
6917
|
function DotRadioButton(_a) {
|
|
6903
6918
|
var ariaLabel = _a.ariaLabel,
|
|
6904
|
-
|
|
6905
|
-
checked = _b === void 0 ? false : _b,
|
|
6919
|
+
checked = _a.checked,
|
|
6906
6920
|
className = _a.className,
|
|
6907
6921
|
dataTestId = _a["data-testid"],
|
|
6908
6922
|
disabled = _a.disabled,
|
|
6909
6923
|
id = _a.id,
|
|
6910
6924
|
inputRef = _a.inputRef,
|
|
6911
6925
|
label = _a.label,
|
|
6912
|
-
|
|
6913
|
-
labelPlacement =
|
|
6926
|
+
_b = _a.labelPlacement,
|
|
6927
|
+
labelPlacement = _b === void 0 ? 'end' : _b,
|
|
6914
6928
|
name = _a.name,
|
|
6915
6929
|
onChange = _a.onChange,
|
|
6916
6930
|
required = _a.required,
|
|
6917
|
-
|
|
6918
|
-
size =
|
|
6931
|
+
_c = _a.size,
|
|
6932
|
+
size = _c === void 0 ? 'medium' : _c,
|
|
6919
6933
|
value = _a.value;
|
|
6920
6934
|
var rootClasses = useStylesWithRootClass(rootClassName$C, className);
|
|
6921
6935
|
var handleChange = function handleChange(event) {
|
|
@@ -6923,7 +6937,7 @@
|
|
|
6923
6937
|
};
|
|
6924
6938
|
// a11y: role doesn't need to be specified because it is done so automatically by the MUI component
|
|
6925
6939
|
var radioControl = jsxRuntime.jsx(StyledRadioButton, {
|
|
6926
|
-
"aria-
|
|
6940
|
+
"aria-checked": checked,
|
|
6927
6941
|
checked: checked,
|
|
6928
6942
|
classes: {
|
|
6929
6943
|
root: rootClassName$r
|
|
@@ -7076,6 +7090,8 @@
|
|
|
7076
7090
|
var handleChange = function handleChange(event) {
|
|
7077
7091
|
onChange && onChange(event);
|
|
7078
7092
|
};
|
|
7093
|
+
// TODO: Future version of MUI v6 will have proper role="switch" instead of role="checkbox"
|
|
7094
|
+
// https://github.com/mui/material-ui/pull/17870
|
|
7079
7095
|
var switchControl = jsxRuntime.jsx(StyledSwitch, {
|
|
7080
7096
|
checked: checked,
|
|
7081
7097
|
classes: {
|
|
@@ -9583,6 +9599,7 @@
|
|
|
9583
9599
|
footerTypography = _c === void 0 ? TABLE_TYPOGRAPHY_VARIANT : _c,
|
|
9584
9600
|
_d = _a.headerTypography,
|
|
9585
9601
|
headerTypography = _d === void 0 ? TABLE_TYPOGRAPHY_VARIANT : _d,
|
|
9602
|
+
labelRowsPerPage = _a.labelRowsPerPage,
|
|
9586
9603
|
_e = _a.loading,
|
|
9587
9604
|
loading = _e === void 0 ? false : _e,
|
|
9588
9605
|
maxHeight = _a.maxHeight,
|
|
@@ -9595,6 +9612,7 @@
|
|
|
9595
9612
|
_g = _a.page,
|
|
9596
9613
|
page = _g === void 0 ? 0 : _g,
|
|
9597
9614
|
rowsPerPage = _a.rowsPerPage,
|
|
9615
|
+
rowsPerPageOptions = _a.rowsPerPageOptions,
|
|
9598
9616
|
_h = _a.stickyHeader,
|
|
9599
9617
|
stickyHeader = _h === void 0 ? true : _h,
|
|
9600
9618
|
_j = _a.sortable,
|
|
@@ -9760,10 +9778,12 @@
|
|
|
9760
9778
|
}), void 0)
|
|
9761
9779
|
}), void 0), rowsPerPage && jsxRuntime.jsx(DotTablePagination, {
|
|
9762
9780
|
count: getTotalCount(),
|
|
9781
|
+
labelRowsPerPage: labelRowsPerPage,
|
|
9763
9782
|
onPageChange: onPageChange,
|
|
9764
9783
|
onRowsPerPageChange: onRowsPerPageChange,
|
|
9765
9784
|
page: tablePage,
|
|
9766
9785
|
rowsPerPage: tableRowsPerPage,
|
|
9786
|
+
rowsPerPageOptions: rowsPerPageOptions,
|
|
9767
9787
|
typography: footerTypography
|
|
9768
9788
|
}, void 0)]
|
|
9769
9789
|
}), void 0);
|
|
@@ -9811,9 +9831,8 @@
|
|
|
9811
9831
|
var StyledMenu = styled__default["default"](DotMenu).withConfig({
|
|
9812
9832
|
displayName: "TableActionsstyles__StyledMenu",
|
|
9813
9833
|
componentId: "sc-8lo813-1"
|
|
9814
|
-
})(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (
|
|
9815
|
-
|
|
9816
|
-
return styled.css(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n &.dot-menu .table-menu-button {\n margin-left: 0;\n padding-left: 0;\n &:hover {\n background-color: ", ";\n }\n }\n "], ["\n &.dot-menu .table-menu-button {\n margin-left: 0;\n padding-left: 0;\n &:hover {\n background-color: ", ";\n }\n }\n "])), theme.palette.grey[50]);
|
|
9834
|
+
})(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function () {
|
|
9835
|
+
return styled.css(templateObject_2$7 || (templateObject_2$7 = __makeTemplateObject(["\n &.dot-menu .table-menu-button {\n margin-left: 0;\n padding-left: 0;\n &:hover {\n background-color: transparent;\n }\n }\n "], ["\n &.dot-menu .table-menu-button {\n margin-left: 0;\n padding-left: 0;\n &:hover {\n background-color: transparent;\n }\n }\n "])));
|
|
9817
9836
|
});
|
|
9818
9837
|
var templateObject_1$8, templateObject_2$7, templateObject_3$3;
|
|
9819
9838
|
|
|
@@ -10398,9 +10417,8 @@
|
|
|
10398
10417
|
componentId: "sc-1nekees-0"
|
|
10399
10418
|
})(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
10400
10419
|
var theme = _a.theme,
|
|
10401
|
-
width = _a.width,
|
|
10402
10420
|
draggableHandle = _a.draggableHandle;
|
|
10403
|
-
return styled.css(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n &.", "
|
|
10421
|
+
return styled.css(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n &.", " {\n padding: ", ";\n\n .", " {\n .dot-icon {\n color: ", ";\n }\n\n &.react-draggable-dragging {\n background-color: ", ";\n }\n\n &.with-default-cursor {\n cursor: default;\n }\n\n &.with-handle-grab-cursor ", " {\n cursor: grab;\n }\n }\n }\n "], ["\n &.", " {\n padding: ", ";\n\n .", " {\n .dot-icon {\n color: ", ";\n }\n\n &.react-draggable-dragging {\n background-color: ", ";\n }\n\n &.with-default-cursor {\n cursor: default;\n }\n\n &.with-handle-grab-cursor ", " {\n cursor: grab;\n }\n }\n }\n "])), rootClassName$3, theme.spacing(1, 0), listItemClassName, theme.palette.layer.n700, theme.palette.grey[50], draggableHandle);
|
|
10404
10422
|
});
|
|
10405
10423
|
var templateObject_1$3, templateObject_2$2;
|
|
10406
10424
|
|
|
@@ -10472,34 +10490,33 @@
|
|
|
10472
10490
|
draggableHandle: draggableHandle,
|
|
10473
10491
|
width: listWidth
|
|
10474
10492
|
}, {
|
|
10475
|
-
children: jsxRuntime.jsx(
|
|
10476
|
-
|
|
10493
|
+
children: jsxRuntime.jsx(ListGridLayout, __assign({
|
|
10494
|
+
className: "layout",
|
|
10495
|
+
draggableHandle: draggableHandle,
|
|
10496
|
+
isDraggable: !disableDrag,
|
|
10497
|
+
layout: getListItemLayout(orderedItems),
|
|
10498
|
+
cols: 1,
|
|
10499
|
+
margin: [0, 0],
|
|
10500
|
+
onLayoutChange: onChange && handleLayoutChange(),
|
|
10501
|
+
rowHeight: rowHeight,
|
|
10477
10502
|
style: {
|
|
10478
10503
|
width: listWidth
|
|
10479
10504
|
}
|
|
10480
10505
|
}, {
|
|
10481
|
-
children:
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
"data-testid": dataTestId && dataTestId + "-item",
|
|
10496
|
-
button: true,
|
|
10497
|
-
children: renderNodeOrTypography(children),
|
|
10498
|
-
className: listItemClasses,
|
|
10499
|
-
disableRipple: true
|
|
10500
|
-
}, itemId);
|
|
10501
|
-
})
|
|
10502
|
-
}), void 0)
|
|
10506
|
+
children: orderedItems.map(function (_a) {
|
|
10507
|
+
var itemId = _a.id,
|
|
10508
|
+
children = _a.children;
|
|
10509
|
+
return jsxRuntime.jsx(material.ListItem, {
|
|
10510
|
+
"data-testid": dataTestId && dataTestId + "-item",
|
|
10511
|
+
button: true,
|
|
10512
|
+
children: renderNodeOrTypography(children),
|
|
10513
|
+
className: listItemClasses,
|
|
10514
|
+
disableRipple: true,
|
|
10515
|
+
style: {
|
|
10516
|
+
width: listWidth
|
|
10517
|
+
}
|
|
10518
|
+
}, itemId);
|
|
10519
|
+
})
|
|
10503
10520
|
}), void 0)
|
|
10504
10521
|
}), void 0);
|
|
10505
10522
|
};
|
|
@@ -32,6 +32,8 @@ export interface TableProps extends CommonProps {
|
|
|
32
32
|
footerTypography?: TypographyVariant;
|
|
33
33
|
/** Typography variant which will be used for table header cell values **/
|
|
34
34
|
headerTypography?: TypographyVariant;
|
|
35
|
+
/** Customize the rows per page label. Default is 'Rows per page:' */
|
|
36
|
+
labelRowsPerPage?: ReactNode;
|
|
35
37
|
/** Table is loading */
|
|
36
38
|
loading?: boolean;
|
|
37
39
|
/** Maximum height of table container */
|
|
@@ -50,6 +52,8 @@ export interface TableProps extends CommonProps {
|
|
|
50
52
|
page?: number;
|
|
51
53
|
/** Rows per page for paginated table */
|
|
52
54
|
rowsPerPage?: RowsPerPageOption;
|
|
55
|
+
/** Customizes the options of the rows per page select field. Default: [10, 25, 50, 100, 150, 200] */
|
|
56
|
+
rowsPerPageOptions?: number[];
|
|
53
57
|
/** Table is sortable */
|
|
54
58
|
sortable?: boolean;
|
|
55
59
|
/** Table header is sticky */
|
|
@@ -64,4 +68,4 @@ export declare function stableSort<T>(array: T[], comparator: (order: T, orderBy
|
|
|
64
68
|
* A wrapper component around the Table component from @material-ui. This component can be used for
|
|
65
69
|
* creating a common structure for tables in the system.
|
|
66
70
|
*/
|
|
67
|
-
export declare const DotTable: ({ ariaLabel, bodyTypography, className, columns, count, data, "data-testid": dataTestId, emptyMessage, footerTypography, headerTypography, loading, maxHeight, multiSelect, order, orderBy, onRowClick, onUpdateData, page, rowsPerPage, stickyHeader, sortable, toolbar, }: TableProps) => JSX.Element;
|
|
71
|
+
export declare const DotTable: ({ ariaLabel, bodyTypography, className, columns, count, data, "data-testid": dataTestId, emptyMessage, footerTypography, headerTypography, labelRowsPerPage, loading, maxHeight, multiSelect, order, orderBy, onRowClick, onUpdateData, page, rowsPerPage, rowsPerPageOptions, stickyHeader, sortable, toolbar, }: TableProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Story, ComponentMeta } from '@storybook/react';
|
|
2
2
|
import { TableProps } from './Table';
|
|
3
|
-
declare const _default: ComponentMeta<({ ariaLabel, bodyTypography, className, columns, count, data, "data-testid": dataTestId, emptyMessage, footerTypography, headerTypography, loading, maxHeight, multiSelect, order, orderBy, onRowClick, onUpdateData, page, rowsPerPage, stickyHeader, sortable, toolbar, }: TableProps) => JSX.Element>;
|
|
3
|
+
declare const _default: ComponentMeta<({ ariaLabel, bodyTypography, className, columns, count, data, "data-testid": dataTestId, emptyMessage, footerTypography, headerTypography, labelRowsPerPage, loading, maxHeight, multiSelect, order, orderBy, onRowClick, onUpdateData, page, rowsPerPage, rowsPerPageOptions, stickyHeader, sortable, toolbar, }: TableProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: Story;
|
|
6
6
|
export declare const LocallyPaginatedTable: Story;
|
|
@@ -8,3 +8,4 @@ export declare const RemotelyPaginatedTable: Story;
|
|
|
8
8
|
export declare const WithActionMenu: Story;
|
|
9
9
|
export declare const WithCheckboxSelection: Story;
|
|
10
10
|
export declare const EmptyTable: Story;
|
|
11
|
+
export declare const WithCustomPaginationOptions: Story;
|