@digital-ai/dot-components 2.9.0 → 2.10.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 +18 -6
- package/index.esm.js +90 -46
- package/index.umd.js +74 -29
- package/lib/components/accordion/Accordion.styles.d.ts +1 -2
- package/lib/components/app-switcher/AppSwitcher.d.ts +1 -1
- package/lib/components/app-switcher/AppSwitcher.stories.d.ts +5 -0
- package/lib/components/file-upload/FileListItem.styles.d.ts +7 -1
- package/lib/components/inline-edit/InlineEdit.d.ts +3 -1
- package/lib/components/inline-edit/InlineEdit.stories.d.ts +2 -1
- package/lib/components/inline-edit/InlineEdit.styles.d.ts +1 -0
- package/lib/components/input-form-fields/InputFormFields.styles.d.ts +2 -2
- package/lib/components/list/ListItem.styles.d.ts +7 -1
- package/lib/components/menu/Menu.styles.d.ts +10 -1
- package/lib/components/popper/Popper.styles.d.ts +10 -1
- package/lib/components/table/Table.stories.d.ts +6 -6
- package/lib/components/table/TableCell.d.ts +3 -2
- package/package.json +1 -1
package/CHANGE_LOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.10.0](https://www.npmjs.com/package/@digital-ai/dot-components) (06/22/2023)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.9.0...2.10.0)
|
|
6
|
+
|
|
7
|
+
**Features:**
|
|
8
|
+
|
|
9
|
+
- S-92995: Add placeholder prop to inline edit [\#1519](https://github.com/digital-ai/dot-components/pull/1519) ([CWSites](https://github.com/CWSites))
|
|
10
|
+
|
|
11
|
+
**Fixed bugs:**
|
|
12
|
+
|
|
13
|
+
- S-91947: Fix table truncation defect [\#1526](https://github.com/digital-ai/dot-components/pull/1526) ([CWSites](https://github.com/CWSites))
|
|
14
|
+
|
|
15
|
+
**Misc:**
|
|
16
|
+
|
|
17
|
+
- S-91982: update keyboard functions [\#1524](https://github.com/digital-ai/dot-components/pull/1524) ([CWSites](https://github.com/CWSites))
|
|
18
|
+
|
|
3
19
|
## [2.9.0](https://www.npmjs.com/package/@digital-ai/dot-components) (06/07/2023)
|
|
4
20
|
|
|
5
21
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.8.2...2.9.0)
|
|
@@ -835,10 +851,6 @@
|
|
|
835
851
|
|
|
836
852
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/1.8.0...1.8.1)
|
|
837
853
|
|
|
838
|
-
**Fixed bugs:**
|
|
839
|
-
|
|
840
|
-
- D-19803: Fix DotDrawer regression [\#980](https://github.com/digital-ai/dot-components/pull/980) ([selsemore](https://github.com/selsemore))
|
|
841
|
-
|
|
842
854
|
**Misc:**
|
|
843
855
|
|
|
844
856
|
- S-76846: NX major upgrade to `13.7.3` [\#952](https://github.com/digital-ai/dot-components/pull/952) ([CWSites](https://github.com/CWSites))
|
|
@@ -854,6 +866,7 @@
|
|
|
854
866
|
|
|
855
867
|
**Fixed bugs:**
|
|
856
868
|
|
|
869
|
+
- D-19803: Fix DotDrawer regression [\#980](https://github.com/digital-ai/dot-components/pull/980) ([selsemore](https://github.com/selsemore))
|
|
857
870
|
- D-19722: `Table`: Fix Storybook issues by refactoring Table's story. [\#974](https://github.com/digital-ai/dot-components/pull/974) ([dmiletic85](https://github.com/dmiletic85))
|
|
858
871
|
- D-19713: Do not show alert banner close button if onClose not provided [\#973](https://github.com/digital-ai/dot-components/pull/973) ([selsemore](https://github.com/selsemore))
|
|
859
872
|
|
|
@@ -1158,6 +1171,7 @@
|
|
|
1158
1171
|
- D-18997: when specified width of sidebar, it should be applied properly [\#737](https://github.com/digital-ai/dot-components/pull/737) ([CWSites](https://github.com/CWSites))
|
|
1159
1172
|
- D-18986: update app toolbar to be dense by default [\#735](https://github.com/digital-ai/dot-components/pull/735) ([CWSites](https://github.com/CWSites))
|
|
1160
1173
|
- D-18985: update menu list to be content-box sizing [\#734](https://github.com/digital-ai/dot-components/pull/734) ([CWSites](https://github.com/CWSites))
|
|
1174
|
+
- D-18963: add ariaLabel to sidebar collapse button [\#731](https://github.com/digital-ai/dot-components/pull/731) ([CWSites](https://github.com/CWSites))
|
|
1161
1175
|
|
|
1162
1176
|
**Misc:**
|
|
1163
1177
|
|
|
@@ -1175,7 +1189,6 @@
|
|
|
1175
1189
|
|
|
1176
1190
|
**Fixed bugs:**
|
|
1177
1191
|
|
|
1178
|
-
- D-18963: add ariaLabel to sidebar collapse button [\#731](https://github.com/digital-ai/dot-components/pull/731) ([CWSites](https://github.com/CWSites))
|
|
1179
1192
|
- D-18979: export `Tooltip` component [\#729](https://github.com/digital-ai/dot-components/pull/729) ([CWSites](https://github.com/CWSites))
|
|
1180
1193
|
|
|
1181
1194
|
**Misc:**
|
|
@@ -1408,7 +1421,6 @@
|
|
|
1408
1421
|
- Upload of commit icon [\#575](https://github.com/digital-ai/dot-components/pull/575) ([BojanKocijan](https://github.com/BojanKocijan))
|
|
1409
1422
|
- S-76321: Remove PB-related code from dot-components repo [\#570](https://github.com/digital-ai/dot-components/pull/570) ([dmiletic85](https://github.com/dmiletic85))
|
|
1410
1423
|
- Issue \#562: Fix EmptyState behavior when no imageSrc prop is passed [\#568](https://github.com/digital-ai/dot-components/pull/568) ([selsemore](https://github.com/selsemore))
|
|
1411
|
-
- Issue \#566: Fix DotPill console warning message [\#567](https://github.com/digital-ai/dot-components/pull/567) ([selsemore](https://github.com/selsemore))
|
|
1412
1424
|
- Navigation rail improvements [\#565](https://github.com/digital-ai/dot-components/pull/565) ([dmiletic85](https://github.com/dmiletic85))
|
|
1413
1425
|
- New icons 27 5 2021 [\#564](https://github.com/digital-ai/dot-components/pull/564) ([BojanKocijan](https://github.com/BojanKocijan))
|
|
1414
1426
|
- Add isUnderToolbar property to Sidebar for use beneath AppToolbar [\#560](https://github.com/digital-ai/dot-components/pull/560) ([selsemore](https://github.com/selsemore))
|
package/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useEffect, useState, useRef, useMemo, useContext, createContext, forwardRef,
|
|
3
|
+
import { useEffect, useState, useRef, useMemo, useContext, createContext, forwardRef, useCallback, createElement, Fragment as Fragment$1, useLayoutEffect } from 'react';
|
|
4
4
|
import { Tooltip, Icon, Typography, Accordion, AccordionSummary, AccordionDetails, AccordionActions, InputAdornment, InputLabel, TextField, Toolbar, Alert, Fade, StyledEngineProvider, Avatar, Button, 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';
|
|
@@ -33,6 +33,7 @@ const DotTooltip = ({
|
|
|
33
33
|
}) => {
|
|
34
34
|
const rootClasses = useStylesWithRootClass('dot-tooltip', className);
|
|
35
35
|
return title ? jsx(Tooltip, Object.assign({
|
|
36
|
+
"aria-hidden": open ? false : true,
|
|
36
37
|
"aria-label": ariaLabel,
|
|
37
38
|
className: rootClasses,
|
|
38
39
|
"data-testid": dataTestId,
|
|
@@ -70,7 +71,7 @@ const DotIcon = ({
|
|
|
70
71
|
}, {
|
|
71
72
|
children: jsx(StyledIcon, Object.assign({
|
|
72
73
|
"aria-hidden": "false",
|
|
73
|
-
"aria-label": ariaLabel
|
|
74
|
+
"aria-label": ariaLabel || `${iconId} icon`,
|
|
74
75
|
classes: {
|
|
75
76
|
root: rootClasses
|
|
76
77
|
},
|
|
@@ -79,6 +80,7 @@ const DotIcon = ({
|
|
|
79
80
|
role: _ariaRole
|
|
80
81
|
}, {
|
|
81
82
|
children: jsx("i", {
|
|
83
|
+
"aria-label": ariaLabel || `${iconId} icon}`,
|
|
82
84
|
className: `icon-${iconId} dot-i`,
|
|
83
85
|
"data-testid": dataTestId && `${dataTestId}-i`,
|
|
84
86
|
role: _ariaRole
|
|
@@ -170,13 +172,15 @@ const DotAccordion = ({
|
|
|
170
172
|
square: _square
|
|
171
173
|
}, {
|
|
172
174
|
children: [jsxs(AccordionSummary, Object.assign({
|
|
175
|
+
"aria-label": ariaLabel || summary,
|
|
173
176
|
classes: {
|
|
174
177
|
root: summaryClassName
|
|
175
178
|
},
|
|
176
179
|
"data-testid": `${dataTestId}-summary`,
|
|
177
180
|
expandIcon: jsx(DotIcon, {
|
|
178
181
|
iconId: "chevron-down"
|
|
179
|
-
}, void 0)
|
|
182
|
+
}, void 0),
|
|
183
|
+
role: "button"
|
|
180
184
|
}, {
|
|
181
185
|
children: [_startIcon, jsx(DotTooltip, Object.assign({
|
|
182
186
|
"data-testid": "accordion-tooltip",
|
|
@@ -1708,7 +1712,7 @@ const DotAvatar = ({
|
|
|
1708
1712
|
}, {
|
|
1709
1713
|
children: jsx(StyledAvatar, Object.assign({
|
|
1710
1714
|
alt: alt,
|
|
1711
|
-
"aria-label": ariaLabel,
|
|
1715
|
+
"aria-label": ariaLabel || alt,
|
|
1712
1716
|
className: _size,
|
|
1713
1717
|
classes: {
|
|
1714
1718
|
root: rootClasses,
|
|
@@ -1932,6 +1936,7 @@ const DotProgress = ({
|
|
|
1932
1936
|
},
|
|
1933
1937
|
color: _color,
|
|
1934
1938
|
"data-testid": dataTestId,
|
|
1939
|
+
role: "progressbar",
|
|
1935
1940
|
size: _size,
|
|
1936
1941
|
thickness: _thickness,
|
|
1937
1942
|
value: value,
|
|
@@ -2462,6 +2467,7 @@ const DotDrawer = ({
|
|
|
2462
2467
|
return jsxs(StyledDrawer, Object.assign({
|
|
2463
2468
|
ModalProps: ModalProps,
|
|
2464
2469
|
PaperProps: Object.assign(Object.assign({}, PaperProps), {
|
|
2470
|
+
'aria-label': ariaLabel,
|
|
2465
2471
|
role: _ariaRole
|
|
2466
2472
|
}),
|
|
2467
2473
|
anchor: _anchor,
|
|
@@ -2518,7 +2524,8 @@ const DotListDivider = ({
|
|
|
2518
2524
|
}) => {
|
|
2519
2525
|
if (item.text) {
|
|
2520
2526
|
return jsx(ListSubheader, Object.assign({
|
|
2521
|
-
disableSticky: true
|
|
2527
|
+
disableSticky: true,
|
|
2528
|
+
role: "heading"
|
|
2522
2529
|
}, {
|
|
2523
2530
|
children: jsx(DotTypography, Object.assign({
|
|
2524
2531
|
variant: "overline"
|
|
@@ -2529,7 +2536,8 @@ const DotListDivider = ({
|
|
|
2529
2536
|
}
|
|
2530
2537
|
return jsx(Divider, {
|
|
2531
2538
|
"aria-hidden": true,
|
|
2532
|
-
"data-testid": `divider-${index}
|
|
2539
|
+
"data-testid": `divider-${index}`,
|
|
2540
|
+
role: "separator"
|
|
2533
2541
|
}, void 0);
|
|
2534
2542
|
};
|
|
2535
2543
|
const DotList = ({
|
|
@@ -2584,9 +2592,11 @@ const DotList = ({
|
|
|
2584
2592
|
}
|
|
2585
2593
|
};
|
|
2586
2594
|
if (item.child) {
|
|
2587
|
-
return jsx(
|
|
2595
|
+
return jsx("div", Object.assign({
|
|
2596
|
+
role: "listitem"
|
|
2597
|
+
}, {
|
|
2588
2598
|
children: item.child
|
|
2589
|
-
}, `item-child-${index}`);
|
|
2599
|
+
}), `item-child-${index}`);
|
|
2590
2600
|
}
|
|
2591
2601
|
if (item.divider) {
|
|
2592
2602
|
return jsx(DotListDivider, {
|
|
@@ -2671,7 +2681,7 @@ const DotListItem = ({
|
|
|
2671
2681
|
}
|
|
2672
2682
|
return endIcon;
|
|
2673
2683
|
};
|
|
2674
|
-
return jsxs(Fragment
|
|
2684
|
+
return jsxs(Fragment, {
|
|
2675
2685
|
children: [jsx(DotTooltip, Object.assign({
|
|
2676
2686
|
"data-testid": `${dataTestId}-tooltip`,
|
|
2677
2687
|
placement: _tooltipPlacement,
|
|
@@ -2992,7 +3002,7 @@ const DotInputText = ({
|
|
|
2992
3002
|
startAdornment: startAdornmentIcon(),
|
|
2993
3003
|
endAdornment: endAdornmentIconOrText()
|
|
2994
3004
|
},
|
|
2995
|
-
"aria-label": name,
|
|
3005
|
+
"aria-label": name || label,
|
|
2996
3006
|
autoComplete: _autoComplete,
|
|
2997
3007
|
autoFocus: autoFocus,
|
|
2998
3008
|
classes: {
|
|
@@ -3015,6 +3025,8 @@ const DotInputText = ({
|
|
|
3015
3025
|
},
|
|
3016
3026
|
inputRef: inputRef,
|
|
3017
3027
|
label: persistentLabel ? null : label,
|
|
3028
|
+
maxRows: _multiline ? maxRows : null,
|
|
3029
|
+
minRows: _multiline ? minRows : null,
|
|
3018
3030
|
multiline: _multiline,
|
|
3019
3031
|
name: name,
|
|
3020
3032
|
onBlur: onBlur,
|
|
@@ -3024,9 +3036,9 @@ const DotInputText = ({
|
|
|
3024
3036
|
onMouseUp: onMouseUp,
|
|
3025
3037
|
placeholder: placeholder,
|
|
3026
3038
|
required: _required,
|
|
3027
|
-
|
|
3028
|
-
maxRows: _multiline ? maxRows : null,
|
|
3039
|
+
role: "textbox",
|
|
3029
3040
|
size: _size,
|
|
3041
|
+
tabIndex: 0,
|
|
3030
3042
|
type: _type,
|
|
3031
3043
|
value: inputTextValue,
|
|
3032
3044
|
variant: "outlined"
|
|
@@ -3548,7 +3560,7 @@ const DotAppSwitcherView = ({
|
|
|
3548
3560
|
setRecentAppInstances(recentAppInstancesSetter(latestInstance, _maxRecentInstances));
|
|
3549
3561
|
}
|
|
3550
3562
|
}, [recentAppInstances]);
|
|
3551
|
-
const recentAppInstancesSection = jsxs(Fragment
|
|
3563
|
+
const recentAppInstancesSection = jsxs(Fragment, {
|
|
3552
3564
|
children: [sectionHeaderMenuItem('RECENT', recentAppInstances.length).children, jsx("div", Object.assign({
|
|
3553
3565
|
className: "product-applications"
|
|
3554
3566
|
}, {
|
|
@@ -3598,7 +3610,7 @@ const DotAppSwitcherView = ({
|
|
|
3598
3610
|
}, void 0)
|
|
3599
3611
|
}), void 0), jsx("div", Object.assign({
|
|
3600
3612
|
className: "product-applications",
|
|
3601
|
-
role: "
|
|
3613
|
+
role: "presentation"
|
|
3602
3614
|
}, {
|
|
3603
3615
|
children: filteredAppInstances()
|
|
3604
3616
|
}), void 0)]
|
|
@@ -3609,6 +3621,7 @@ const DotAppSwitcherView = ({
|
|
|
3609
3621
|
role: "contentinfo"
|
|
3610
3622
|
}, {
|
|
3611
3623
|
children: [jsx(DotList, {
|
|
3624
|
+
ariaRole: "presentation",
|
|
3612
3625
|
items: appTypeMenuItems === null || appTypeMenuItems === void 0 ? void 0 : appTypeMenuItems.map(item => ({
|
|
3613
3626
|
child: item.children
|
|
3614
3627
|
})),
|
|
@@ -3643,6 +3656,7 @@ const DotAppSwitcherView = ({
|
|
|
3643
3656
|
}), void 0)
|
|
3644
3657
|
};
|
|
3645
3658
|
return jsx(StyledAppSwitcher, Object.assign({
|
|
3659
|
+
ariaLabel: "App Switcher",
|
|
3646
3660
|
className: rootClasses,
|
|
3647
3661
|
ModalProps: {
|
|
3648
3662
|
style: {
|
|
@@ -3891,7 +3905,7 @@ const Header = ({
|
|
|
3891
3905
|
appLogo: appLogo,
|
|
3892
3906
|
appLogoSmall: appLogoSmall,
|
|
3893
3907
|
smallOnly: !isOpen
|
|
3894
|
-
}, void 0) : jsxs(Fragment
|
|
3908
|
+
}, void 0) : jsxs(Fragment, {
|
|
3895
3909
|
children: [jsx(DotAvatar, Object.assign({}, titleAvatarProps), void 0), isOpen && jsx(DotTypography, Object.assign({
|
|
3896
3910
|
variant: "h4"
|
|
3897
3911
|
}, {
|
|
@@ -4155,7 +4169,7 @@ const DotAppToolbar = ({
|
|
|
4155
4169
|
borderBottomColor: borderColor
|
|
4156
4170
|
}
|
|
4157
4171
|
}, {
|
|
4158
|
-
children: [showMainMenu && jsxs(Fragment
|
|
4172
|
+
children: [showMainMenu && jsxs(Fragment, {
|
|
4159
4173
|
children: [jsx("div", Object.assign({
|
|
4160
4174
|
className: "dot-main-menu-btn"
|
|
4161
4175
|
}, {
|
|
@@ -4584,7 +4598,7 @@ const DotAutoComplete = ({
|
|
|
4584
4598
|
children: icon
|
|
4585
4599
|
}), void 0) : icon;
|
|
4586
4600
|
};
|
|
4587
|
-
return jsxs(Fragment
|
|
4601
|
+
return jsxs(Fragment, {
|
|
4588
4602
|
children: [loading && jsx(DotProgress, {
|
|
4589
4603
|
color: "inherit",
|
|
4590
4604
|
size: 20
|
|
@@ -4645,7 +4659,7 @@ const DotAutoComplete = ({
|
|
|
4645
4659
|
// at least pick up any styling that is used there. Should additional
|
|
4646
4660
|
// functionality be added to DotInputText we will have to make a
|
|
4647
4661
|
// decision about if/how to expose it here.
|
|
4648
|
-
jsxs(Fragment
|
|
4662
|
+
jsxs(Fragment, {
|
|
4649
4663
|
children: [persistentLabel && jsx(DotInputLabel, Object.assign({
|
|
4650
4664
|
"data-testid": dataTestId && `${dataTestId}-persistent-label`,
|
|
4651
4665
|
id: inputId
|
|
@@ -5109,7 +5123,7 @@ const DotButtonToggle = ({
|
|
|
5109
5123
|
key,
|
|
5110
5124
|
value: optionValue
|
|
5111
5125
|
};
|
|
5112
|
-
const children = jsxs(Fragment
|
|
5126
|
+
const children = jsxs(Fragment, {
|
|
5113
5127
|
children: [optionIconId && jsx(DotIcon, {
|
|
5114
5128
|
className: "dot-toggle-icon",
|
|
5115
5129
|
iconId: optionIconId
|
|
@@ -5125,6 +5139,8 @@ const DotButtonToggle = ({
|
|
|
5125
5139
|
}, {
|
|
5126
5140
|
children: children
|
|
5127
5141
|
}), void 0) : jsx(ToggleButton, Object.assign({}, commonProps, {
|
|
5142
|
+
role: "button"
|
|
5143
|
+
}, {
|
|
5128
5144
|
children: children
|
|
5129
5145
|
}), void 0);
|
|
5130
5146
|
};
|
|
@@ -5155,7 +5171,9 @@ const TooltipToggleButton = /*#__PURE__*/forwardRef((_a, ref) => {
|
|
|
5155
5171
|
return jsx(DotTooltip, Object.assign({}, CustomTooltipProps, {
|
|
5156
5172
|
children: jsx(ToggleButton, Object.assign({
|
|
5157
5173
|
ref: ref
|
|
5158
|
-
}, props
|
|
5174
|
+
}, props, {
|
|
5175
|
+
role: "button"
|
|
5176
|
+
}), void 0)
|
|
5159
5177
|
}), void 0);
|
|
5160
5178
|
});
|
|
5161
5179
|
|
|
@@ -5312,6 +5330,7 @@ function DotCheckbox({
|
|
|
5312
5330
|
onChange: handleChange,
|
|
5313
5331
|
required: required,
|
|
5314
5332
|
size: size,
|
|
5333
|
+
tabIndex: 0,
|
|
5315
5334
|
value: value
|
|
5316
5335
|
}, void 0);
|
|
5317
5336
|
return jsx(StyledFormControlLabel, {
|
|
@@ -6297,7 +6316,7 @@ const StyledRadioButton = styled(Radio).withConfig({
|
|
|
6297
6316
|
|
|
6298
6317
|
function DotRadioButton({
|
|
6299
6318
|
ariaLabel,
|
|
6300
|
-
checked,
|
|
6319
|
+
checked = false,
|
|
6301
6320
|
className,
|
|
6302
6321
|
'data-testid': dataTestId,
|
|
6303
6322
|
disabled,
|
|
@@ -6315,8 +6334,10 @@ function DotRadioButton({
|
|
|
6315
6334
|
const handleChange = event => {
|
|
6316
6335
|
onChange && onChange(event, event.target.value);
|
|
6317
6336
|
};
|
|
6337
|
+
// a11y: role doesn't need to be specified because it is done so automatically by the MUI component
|
|
6318
6338
|
const radioControl = jsx(StyledRadioButton, {
|
|
6319
|
-
"aria-
|
|
6339
|
+
"aria-checked": checked,
|
|
6340
|
+
"aria-label": ariaLabel || label,
|
|
6320
6341
|
checked: checked,
|
|
6321
6342
|
classes: {
|
|
6322
6343
|
root: rootClassName$r
|
|
@@ -6326,15 +6347,16 @@ function DotRadioButton({
|
|
|
6326
6347
|
disabled: disabled,
|
|
6327
6348
|
id: id,
|
|
6328
6349
|
inputRef: inputRef,
|
|
6329
|
-
name: name,
|
|
6350
|
+
name: name || value,
|
|
6330
6351
|
onChange: handleChange,
|
|
6331
6352
|
required: required,
|
|
6332
|
-
size: size
|
|
6353
|
+
size: size,
|
|
6354
|
+
tabIndex: 0
|
|
6333
6355
|
}, void 0);
|
|
6334
6356
|
return jsx(StyledFormControlLabel, {
|
|
6335
6357
|
className: rootClasses,
|
|
6336
6358
|
control: radioControl,
|
|
6337
|
-
"aria-label":
|
|
6359
|
+
"aria-label": ariaLabel || label,
|
|
6338
6360
|
label: label || radioControl,
|
|
6339
6361
|
labelPlacement: labelPlacement,
|
|
6340
6362
|
value: value
|
|
@@ -6416,7 +6438,7 @@ const DotRadioGroup = ({
|
|
|
6416
6438
|
children: endIcon
|
|
6417
6439
|
}), void 0)]
|
|
6418
6440
|
}), void 0), jsx(StyledRadioGroup, Object.assign({
|
|
6419
|
-
"aria-label": ariaLabel,
|
|
6441
|
+
"aria-label": ariaLabel || groupLabel,
|
|
6420
6442
|
className: groupClassName,
|
|
6421
6443
|
"data-testid": dataTestId,
|
|
6422
6444
|
defaultValue: defaultValue,
|
|
@@ -6474,7 +6496,8 @@ const DotSwitch = ({
|
|
|
6474
6496
|
},
|
|
6475
6497
|
inputRef: inputRef,
|
|
6476
6498
|
onChange: handleChange,
|
|
6477
|
-
size: _size
|
|
6499
|
+
size: _size,
|
|
6500
|
+
tabIndex: 0
|
|
6478
6501
|
}, void 0);
|
|
6479
6502
|
return jsx(StyledFormControlLabel, {
|
|
6480
6503
|
className: rootClassName$C,
|
|
@@ -7016,7 +7039,7 @@ const DotDynamicForm = ({
|
|
|
7016
7039
|
}
|
|
7017
7040
|
case 'custom-element':
|
|
7018
7041
|
{
|
|
7019
|
-
return jsx(Fragment, {
|
|
7042
|
+
return jsx(Fragment$1, {
|
|
7020
7043
|
children: customElement
|
|
7021
7044
|
}, elementIndex);
|
|
7022
7045
|
}
|
|
@@ -7051,6 +7074,7 @@ const DotDynamicForm = ({
|
|
|
7051
7074
|
const rootClassName$p = 'dot-inline-edit';
|
|
7052
7075
|
const editModeClassName = 'dot-edit-mode';
|
|
7053
7076
|
const viewModeClassName = 'dot-view-mode';
|
|
7077
|
+
const placeholderClassName = 'dot-placeholder';
|
|
7054
7078
|
const readOnlyClassName = 'dot-read-only';
|
|
7055
7079
|
const editActionsClassName = 'dot-edit-actions';
|
|
7056
7080
|
const editTextFieldClassName = 'dot-edit-text-field';
|
|
@@ -7060,7 +7084,7 @@ const StyledInlineEdit = styled.div.withConfig({
|
|
|
7060
7084
|
})(["", ""], ({
|
|
7061
7085
|
theme,
|
|
7062
7086
|
fullWidth
|
|
7063
|
-
}) => css(["&.", "{display:", ";align-items:center;color:", ";min-width:", ";&:not(.", "):focus-visible{border-radius:", ";background-color:", ";cursor:pointer;outline:0;.dot-edit-icon{display:block;}}.", "{display:flex;width:100%;position:relative;.dot-edit-icon{height:100%;position:absolute;right:0;width:40px;background-color:", ";border-radius:", ";display:none;.dot-i{margin:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);}}&:not(.", "):hover{border-radius:", ";background-color:", ";cursor:pointer;.dot-edit-icon{display:block;}}.dot-view-mode-typography{padding:", ";margin-bottom:0;}}.dot-empty-value fieldset{border-color:", ";}.dot-adornment-error{color:", ";}.MuiInputBase-input{height:auto;}.MuiInputBase-root{margin-bottom:", ";}", " .", " .dot-input{padding-left:", ";}.MuiOutlinedInput-input:focus{cursor:auto;}.dot-counter-adornment{.dot-counter-max-length{color:", ";}.dot-counter-length,.dot-counter-max-length{&.dot-counter-limit{color:", ";}&:hover{background:", ";}.editing-actions{display:flex;justify-content:flex-end;margin-top:", ";}.dot-icon-btn{background:", ";border:1px solid ", ";color:", ";margin-left:", ";padding:", ";}}}.dot-read-only-adornment{display:none;}.", "{display:flex;align-items:center;margin:", ";.dot-button{padding:", ";margin-top:", ";margin-bottom:", ";}}}"], rootClassName$p, fullWidth ? 'flex' : 'inline-flex', theme.palette.grey[700], theme.spacing(32), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, viewModeClassName, theme.palette.layer.n50, theme.spacing(0, 0.5, 0.5, 0), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, theme.spacing(1.3125, 1), theme.palette.error[500], theme.palette.error[500], theme.spacing(0), ({
|
|
7087
|
+
}) => css(["&.", "{display:", ";align-items:center;color:", ";min-width:", ";&:not(.", "):focus-visible{border-radius:", ";background-color:", ";cursor:pointer;outline:0;.dot-edit-icon{display:block;}}.", "{display:flex;width:100%;position:relative;.dot-edit-icon{height:100%;position:absolute;right:0;width:40px;background-color:", ";border-radius:", ";display:none;.dot-i{margin:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);}}&:not(.", "):hover{border-radius:", ";background-color:", ";cursor:pointer;.dot-edit-icon{display:block;}}.dot-view-mode-typography{padding:", ";margin-bottom:0;&.", "{color:", ";}}}.dot-empty-value fieldset{border-color:", ";}.dot-adornment-error{color:", ";}.MuiInputBase-input{height:auto;}.MuiInputBase-root{margin-bottom:", ";}", " .", " .dot-input{padding-left:", ";}.MuiOutlinedInput-input:focus{cursor:auto;}.dot-counter-adornment{.dot-counter-max-length{color:", ";}.dot-counter-length,.dot-counter-max-length{&.dot-counter-limit{color:", ";}&:hover{background:", ";}.editing-actions{display:flex;justify-content:flex-end;margin-top:", ";}.dot-icon-btn{background:", ";border:1px solid ", ";color:", ";margin-left:", ";padding:", ";}}}.dot-read-only-adornment{display:none;}.", "{display:flex;align-items:center;margin:", ";.dot-button{padding:", ";margin-top:", ";margin-bottom:", ";}}}"], rootClassName$p, fullWidth ? 'flex' : 'inline-flex', theme.palette.grey[700], theme.spacing(32), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, viewModeClassName, theme.palette.layer.n50, theme.spacing(0, 0.5, 0.5, 0), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, theme.spacing(1.3125, 1), placeholderClassName, theme.palette.grey[200], theme.palette.error[500], theme.palette.error[500], theme.spacing(0), ({
|
|
7064
7088
|
typography
|
|
7065
7089
|
}) => typography && `
|
|
7066
7090
|
.MuiInputBase-root {
|
|
@@ -7159,6 +7183,7 @@ const DotInlineEdit = ({
|
|
|
7159
7183
|
name,
|
|
7160
7184
|
onChange,
|
|
7161
7185
|
onEditStateChange,
|
|
7186
|
+
placeholder,
|
|
7162
7187
|
readOnly,
|
|
7163
7188
|
selectTextOnEdit,
|
|
7164
7189
|
startEditable: _startEditable = false,
|
|
@@ -7259,14 +7284,16 @@ const DotInlineEdit = ({
|
|
|
7259
7284
|
}
|
|
7260
7285
|
};
|
|
7261
7286
|
const renderViewMode = () => {
|
|
7262
|
-
const
|
|
7263
|
-
const
|
|
7287
|
+
const bindingsValue = bindings ? applyBindings(bindings, inputValue) : null;
|
|
7288
|
+
const typographyClasses = useStylesWithRootClass('dot-view-mode-typography', !inputValue && placeholderClassName);
|
|
7289
|
+
const viewModeClasses = useStylesWithRootClass(viewModeClassName, readOnly && readOnlyClassName);
|
|
7290
|
+
const viewModeChildren = jsxs(Fragment, {
|
|
7264
7291
|
children: [jsx(DotTypography, Object.assign({
|
|
7265
|
-
className:
|
|
7292
|
+
className: typographyClasses,
|
|
7266
7293
|
"data-testid": dataTestId && `${dataTestId}-view-mode-typography`,
|
|
7267
7294
|
variant: _typography
|
|
7268
7295
|
}, {
|
|
7269
|
-
children:
|
|
7296
|
+
children: bindingsValue || inputValue || placeholder
|
|
7270
7297
|
}), void 0), jsx(DotIcon, {
|
|
7271
7298
|
className: "dot-edit-icon",
|
|
7272
7299
|
"data-testid": dataTestId && `${dataTestId}-edit-icon`,
|
|
@@ -7290,7 +7317,7 @@ const DotInlineEdit = ({
|
|
|
7290
7317
|
};
|
|
7291
7318
|
const renderEditMode = () => {
|
|
7292
7319
|
const textFieldClasses = useStylesWithRootClass(editTextFieldClassName, isSaveDisabled ? 'dot-empty-value' : '');
|
|
7293
|
-
return jsxs(Fragment
|
|
7320
|
+
return jsxs(Fragment, {
|
|
7294
7321
|
children: [jsx(TextField, {
|
|
7295
7322
|
InputProps: {
|
|
7296
7323
|
endAdornment: renderEndAdornment()
|
|
@@ -7729,7 +7756,7 @@ const DotSplitButton = ({
|
|
|
7729
7756
|
setOpen(false);
|
|
7730
7757
|
onOptionClick(itemKey);
|
|
7731
7758
|
};
|
|
7732
|
-
return jsxs(Fragment
|
|
7759
|
+
return jsxs(Fragment, {
|
|
7733
7760
|
children: [jsxs(StyledSplitButtonGroup, Object.assign({
|
|
7734
7761
|
"aria-label": ariaLabel,
|
|
7735
7762
|
className: rootClasses,
|
|
@@ -7960,7 +7987,7 @@ const DotStepper = ({
|
|
|
7960
7987
|
span: 6
|
|
7961
7988
|
}
|
|
7962
7989
|
}, {
|
|
7963
|
-
children: jsxs(Fragment
|
|
7990
|
+
children: jsxs(Fragment, {
|
|
7964
7991
|
children: [displayCancelButton && jsx(DotButton, Object.assign({
|
|
7965
7992
|
className: "cancel-stepper",
|
|
7966
7993
|
onClick: onCancel,
|
|
@@ -8202,6 +8229,7 @@ const DotBodyCell = ({
|
|
|
8202
8229
|
'data-testid': dataTestId,
|
|
8203
8230
|
noWrap,
|
|
8204
8231
|
onActionMenuTrigger,
|
|
8232
|
+
style,
|
|
8205
8233
|
typography,
|
|
8206
8234
|
value
|
|
8207
8235
|
}) => {
|
|
@@ -8266,7 +8294,8 @@ const DotBodyCell = ({
|
|
|
8266
8294
|
root: rootClasses
|
|
8267
8295
|
},
|
|
8268
8296
|
colSpan: colspan,
|
|
8269
|
-
"data-testid": dataTestId
|
|
8297
|
+
"data-testid": dataTestId,
|
|
8298
|
+
style: style
|
|
8270
8299
|
}, {
|
|
8271
8300
|
children: getTableCellValue()
|
|
8272
8301
|
}), void 0);
|
|
@@ -8356,6 +8385,18 @@ const DotTableRow = ({
|
|
|
8356
8385
|
rowId: id
|
|
8357
8386
|
}, void 0);
|
|
8358
8387
|
};
|
|
8388
|
+
const parseMaxWidth = width => {
|
|
8389
|
+
if (!width) {
|
|
8390
|
+
return;
|
|
8391
|
+
}
|
|
8392
|
+
// if contains % then convert to % of viewport
|
|
8393
|
+
if (width.includes('%')) {
|
|
8394
|
+
const percent = Number.parseFloat(width) / 100;
|
|
8395
|
+
return `calc(100vw * ${percent})`;
|
|
8396
|
+
}
|
|
8397
|
+
// if contains 'px' or 'vw' then pass as is
|
|
8398
|
+
return `${width}`;
|
|
8399
|
+
};
|
|
8359
8400
|
return jsxs(StyledTableRowStyles, Object.assign({
|
|
8360
8401
|
classes: {
|
|
8361
8402
|
root: rootClasses
|
|
@@ -8371,6 +8412,9 @@ const DotTableRow = ({
|
|
|
8371
8412
|
className: rowData.className && `${rowData.className}-${column.id}`,
|
|
8372
8413
|
noWrap: column.truncate,
|
|
8373
8414
|
onActionMenuTrigger: (menuRef, menuItem) => onActionMenuTrigger(menuRef, menuItem),
|
|
8415
|
+
style: {
|
|
8416
|
+
maxWidth: parseMaxWidth(column.width)
|
|
8417
|
+
},
|
|
8374
8418
|
value: rowData[column.id]
|
|
8375
8419
|
}, index);
|
|
8376
8420
|
})]
|
|
@@ -8444,7 +8488,7 @@ const DotTableBody = ({
|
|
|
8444
8488
|
}, index);
|
|
8445
8489
|
});
|
|
8446
8490
|
};
|
|
8447
|
-
return jsxs(Fragment
|
|
8491
|
+
return jsxs(Fragment, {
|
|
8448
8492
|
children: [jsx(StyledTableBody, Object.assign({
|
|
8449
8493
|
classes: {
|
|
8450
8494
|
root: rootClassName$c
|
|
@@ -8673,7 +8717,7 @@ const DotTableSelectionToolbar = ({
|
|
|
8673
8717
|
variant: "h3"
|
|
8674
8718
|
}, {
|
|
8675
8719
|
children: [selectedRowsNumber, " selected"]
|
|
8676
|
-
}), void 0), onClearAll && jsxs(Fragment
|
|
8720
|
+
}), void 0), onClearAll && jsxs(Fragment, {
|
|
8677
8721
|
children: [jsx(DotTypography, Object.assign({
|
|
8678
8722
|
className: "dot-selected-rows-divider"
|
|
8679
8723
|
}, {
|
|
@@ -9005,7 +9049,7 @@ const DotTableActions = ({
|
|
|
9005
9049
|
onClick: action.onClick
|
|
9006
9050
|
}, `action-${index}`));
|
|
9007
9051
|
};
|
|
9008
|
-
return jsxs(Fragment
|
|
9052
|
+
return jsxs(Fragment, {
|
|
9009
9053
|
children: [jsxs(TableActionsContainer, Object.assign({
|
|
9010
9054
|
className: rootClassName$8,
|
|
9011
9055
|
ref: wrapperRef
|
|
@@ -9201,7 +9245,7 @@ const renderSelectFilesButton = (isUploadDisabled, onButtonClick) => jsx(DotButt
|
|
|
9201
9245
|
}, {
|
|
9202
9246
|
children: "Select file(s)"
|
|
9203
9247
|
}), void 0);
|
|
9204
|
-
const renderActiveDragArea = () => jsxs(Fragment
|
|
9248
|
+
const renderActiveDragArea = () => jsxs(Fragment, {
|
|
9205
9249
|
children: [jsx(DotIcon, {
|
|
9206
9250
|
iconId: "upload-file"
|
|
9207
9251
|
}, void 0), jsx(DotTypography, Object.assign({
|
|
@@ -9210,7 +9254,7 @@ const renderActiveDragArea = () => jsxs(Fragment$1, {
|
|
|
9210
9254
|
children: "Drop the file(s) here ..."
|
|
9211
9255
|
}), void 0)]
|
|
9212
9256
|
}, void 0);
|
|
9213
|
-
const renderDragAndDropArea = (isUploadDisabled, onSelectButtonClick) => jsxs(Fragment
|
|
9257
|
+
const renderDragAndDropArea = (isUploadDisabled, onSelectButtonClick) => jsxs(Fragment, {
|
|
9214
9258
|
children: [jsx(DotIcon, {
|
|
9215
9259
|
iconId: "upload-file"
|
|
9216
9260
|
}, void 0), jsxs(DotTypography, Object.assign({
|
|
@@ -9368,7 +9412,7 @@ const DotFileUpload = ({
|
|
|
9368
9412
|
isUploadDisabled,
|
|
9369
9413
|
open
|
|
9370
9414
|
})]
|
|
9371
|
-
}), void 0), maxSize && renderMaxSizeMessage(maxSize), maxFiles && renderMaxFilesMessage(maxFiles, maxFilesClasses), !hideFilesList
|
|
9415
|
+
}), void 0), !!maxSize && renderMaxSizeMessage(maxSize), !!maxFiles && renderMaxFilesMessage(maxFiles, maxFilesClasses), !hideFilesList || jsx(DotList, {
|
|
9372
9416
|
"data-testid": dataTestId && `${dataTestId}-file-list`,
|
|
9373
9417
|
items: uploadedFilesList,
|
|
9374
9418
|
width: "100%"
|
|
@@ -9766,7 +9810,7 @@ const DotDatePicker = ({
|
|
|
9766
9810
|
open: open,
|
|
9767
9811
|
showDaysOutsideCurrentMonth: showDaysOutsideCurrentMonth,
|
|
9768
9812
|
slots: {
|
|
9769
|
-
openPickerButton: pickerButtonProps => jsxs(Fragment
|
|
9813
|
+
openPickerButton: pickerButtonProps => jsxs(Fragment, {
|
|
9770
9814
|
children: [error && jsx(DotIcon, {
|
|
9771
9815
|
className: "dot-error-icon",
|
|
9772
9816
|
"data-testid": "dot-error-icon",
|
|
@@ -10197,7 +10241,7 @@ const DotTimePicker = ({
|
|
|
10197
10241
|
error,
|
|
10198
10242
|
focused: isComponentReadOnly ? false : undefined,
|
|
10199
10243
|
InputProps: {
|
|
10200
|
-
endAdornment: jsxs(Fragment
|
|
10244
|
+
endAdornment: jsxs(Fragment, {
|
|
10201
10245
|
children: [error && jsx(DotIcon, {
|
|
10202
10246
|
className: "dot-error-icon",
|
|
10203
10247
|
"data-testid": dataTestId && `${dataTestId}-input-error-icon`,
|
package/index.umd.js
CHANGED
|
@@ -163,6 +163,7 @@
|
|
|
163
163
|
title = _a.title;
|
|
164
164
|
var rootClasses = useStylesWithRootClass('dot-tooltip', className);
|
|
165
165
|
return title ? jsxRuntime.jsx(material.Tooltip, __assign({
|
|
166
|
+
"aria-hidden": open ? false : true,
|
|
166
167
|
"aria-label": ariaLabel,
|
|
167
168
|
className: rootClasses,
|
|
168
169
|
"data-testid": dataTestId,
|
|
@@ -204,7 +205,7 @@
|
|
|
204
205
|
}, {
|
|
205
206
|
children: jsxRuntime.jsx(StyledIcon, __assign({
|
|
206
207
|
"aria-hidden": "false",
|
|
207
|
-
"aria-label": ariaLabel,
|
|
208
|
+
"aria-label": ariaLabel || iconId + " icon",
|
|
208
209
|
classes: {
|
|
209
210
|
root: rootClasses
|
|
210
211
|
},
|
|
@@ -213,6 +214,7 @@
|
|
|
213
214
|
role: ariaRole
|
|
214
215
|
}, {
|
|
215
216
|
children: jsxRuntime.jsx("i", {
|
|
217
|
+
"aria-label": ariaLabel || iconId + " icon}",
|
|
216
218
|
className: "icon-" + iconId + " dot-i",
|
|
217
219
|
"data-testid": dataTestId && dataTestId + "-i",
|
|
218
220
|
role: ariaRole
|
|
@@ -312,13 +314,15 @@
|
|
|
312
314
|
square: square
|
|
313
315
|
}, {
|
|
314
316
|
children: [jsxRuntime.jsxs(material.AccordionSummary, __assign({
|
|
317
|
+
"aria-label": ariaLabel || summary,
|
|
315
318
|
classes: {
|
|
316
319
|
root: summaryClassName
|
|
317
320
|
},
|
|
318
321
|
"data-testid": dataTestId + "-summary",
|
|
319
322
|
expandIcon: jsxRuntime.jsx(DotIcon, {
|
|
320
323
|
iconId: "chevron-down"
|
|
321
|
-
}, void 0)
|
|
324
|
+
}, void 0),
|
|
325
|
+
role: "button"
|
|
322
326
|
}, {
|
|
323
327
|
children: [startIcon, jsxRuntime.jsx(DotTooltip, __assign({
|
|
324
328
|
"data-testid": "accordion-tooltip",
|
|
@@ -1933,7 +1937,7 @@
|
|
|
1933
1937
|
}, {
|
|
1934
1938
|
children: jsxRuntime.jsx(StyledAvatar, __assign({
|
|
1935
1939
|
alt: alt,
|
|
1936
|
-
"aria-label": ariaLabel,
|
|
1940
|
+
"aria-label": ariaLabel || alt,
|
|
1937
1941
|
className: size,
|
|
1938
1942
|
classes: {
|
|
1939
1943
|
root: rootClasses,
|
|
@@ -2185,6 +2189,7 @@
|
|
|
2185
2189
|
},
|
|
2186
2190
|
color: color,
|
|
2187
2191
|
"data-testid": dataTestId,
|
|
2192
|
+
role: "progressbar",
|
|
2188
2193
|
size: size,
|
|
2189
2194
|
thickness: thickness,
|
|
2190
2195
|
value: value,
|
|
@@ -2762,6 +2767,7 @@
|
|
|
2762
2767
|
return jsxRuntime.jsxs(StyledDrawer, __assign({
|
|
2763
2768
|
ModalProps: ModalProps,
|
|
2764
2769
|
PaperProps: __assign(__assign({}, PaperProps), {
|
|
2770
|
+
'aria-label': ariaLabel,
|
|
2765
2771
|
role: ariaRole
|
|
2766
2772
|
}),
|
|
2767
2773
|
anchor: anchor,
|
|
@@ -2819,7 +2825,8 @@
|
|
|
2819
2825
|
index = _a.index;
|
|
2820
2826
|
if (item.text) {
|
|
2821
2827
|
return jsxRuntime.jsx(material.ListSubheader, __assign({
|
|
2822
|
-
disableSticky: true
|
|
2828
|
+
disableSticky: true,
|
|
2829
|
+
role: "heading"
|
|
2823
2830
|
}, {
|
|
2824
2831
|
children: jsxRuntime.jsx(DotTypography, __assign({
|
|
2825
2832
|
variant: "overline"
|
|
@@ -2830,7 +2837,8 @@
|
|
|
2830
2837
|
}
|
|
2831
2838
|
return jsxRuntime.jsx(material.Divider, {
|
|
2832
2839
|
"aria-hidden": true,
|
|
2833
|
-
"data-testid": "divider-" + index
|
|
2840
|
+
"data-testid": "divider-" + index,
|
|
2841
|
+
role: "separator"
|
|
2834
2842
|
}, void 0);
|
|
2835
2843
|
};
|
|
2836
2844
|
var DotList = function DotList(_a) {
|
|
@@ -2895,9 +2903,11 @@
|
|
|
2895
2903
|
}
|
|
2896
2904
|
};
|
|
2897
2905
|
if (item.child) {
|
|
2898
|
-
return jsxRuntime.jsx(
|
|
2906
|
+
return jsxRuntime.jsx("div", __assign({
|
|
2907
|
+
role: "listitem"
|
|
2908
|
+
}, {
|
|
2899
2909
|
children: item.child
|
|
2900
|
-
}, "item-child-" + index);
|
|
2910
|
+
}), "item-child-" + index);
|
|
2901
2911
|
}
|
|
2902
2912
|
if (item.divider) {
|
|
2903
2913
|
return jsxRuntime.jsx(DotListDivider, {
|
|
@@ -3330,7 +3340,7 @@
|
|
|
3330
3340
|
startAdornment: startAdornmentIcon(),
|
|
3331
3341
|
endAdornment: endAdornmentIconOrText()
|
|
3332
3342
|
},
|
|
3333
|
-
"aria-label": name,
|
|
3343
|
+
"aria-label": name || label,
|
|
3334
3344
|
autoComplete: autoComplete,
|
|
3335
3345
|
autoFocus: autoFocus,
|
|
3336
3346
|
classes: {
|
|
@@ -3353,6 +3363,8 @@
|
|
|
3353
3363
|
},
|
|
3354
3364
|
inputRef: inputRef,
|
|
3355
3365
|
label: persistentLabel ? null : label,
|
|
3366
|
+
maxRows: multiline ? maxRows : null,
|
|
3367
|
+
minRows: multiline ? minRows : null,
|
|
3356
3368
|
multiline: multiline,
|
|
3357
3369
|
name: name,
|
|
3358
3370
|
onBlur: onBlur,
|
|
@@ -3362,9 +3374,9 @@
|
|
|
3362
3374
|
onMouseUp: onMouseUp,
|
|
3363
3375
|
placeholder: placeholder,
|
|
3364
3376
|
required: required,
|
|
3365
|
-
|
|
3366
|
-
maxRows: multiline ? maxRows : null,
|
|
3377
|
+
role: "textbox",
|
|
3367
3378
|
size: size,
|
|
3379
|
+
tabIndex: 0,
|
|
3368
3380
|
type: type,
|
|
3369
3381
|
value: inputTextValue,
|
|
3370
3382
|
variant: "outlined"
|
|
@@ -3989,7 +4001,7 @@
|
|
|
3989
4001
|
}, void 0)
|
|
3990
4002
|
}), void 0), jsxRuntime.jsx("div", __assign({
|
|
3991
4003
|
className: "product-applications",
|
|
3992
|
-
role: "
|
|
4004
|
+
role: "presentation"
|
|
3993
4005
|
}, {
|
|
3994
4006
|
children: filteredAppInstances()
|
|
3995
4007
|
}), void 0)]
|
|
@@ -4000,6 +4012,7 @@
|
|
|
4000
4012
|
role: "contentinfo"
|
|
4001
4013
|
}, {
|
|
4002
4014
|
children: [jsxRuntime.jsx(DotList, {
|
|
4015
|
+
ariaRole: "presentation",
|
|
4003
4016
|
items: appTypeMenuItems === null || appTypeMenuItems === void 0 ? void 0 : appTypeMenuItems.map(function (item) {
|
|
4004
4017
|
return {
|
|
4005
4018
|
child: item.children
|
|
@@ -4036,6 +4049,7 @@
|
|
|
4036
4049
|
}), void 0)
|
|
4037
4050
|
};
|
|
4038
4051
|
return jsxRuntime.jsx(StyledAppSwitcher, __assign({
|
|
4052
|
+
ariaLabel: "App Switcher",
|
|
4039
4053
|
className: rootClasses,
|
|
4040
4054
|
ModalProps: {
|
|
4041
4055
|
style: {
|
|
@@ -5622,6 +5636,8 @@
|
|
|
5622
5636
|
}, {
|
|
5623
5637
|
children: children
|
|
5624
5638
|
}), void 0) : jsxRuntime.jsx(material.ToggleButton, __assign({}, commonProps, {
|
|
5639
|
+
role: "button"
|
|
5640
|
+
}, {
|
|
5625
5641
|
children: children
|
|
5626
5642
|
}), void 0);
|
|
5627
5643
|
};
|
|
@@ -5650,7 +5666,9 @@
|
|
|
5650
5666
|
return jsxRuntime.jsx(DotTooltip, __assign({}, CustomTooltipProps, {
|
|
5651
5667
|
children: jsxRuntime.jsx(material.ToggleButton, __assign({
|
|
5652
5668
|
ref: ref
|
|
5653
|
-
}, props
|
|
5669
|
+
}, props, {
|
|
5670
|
+
role: "button"
|
|
5671
|
+
}), void 0)
|
|
5654
5672
|
}), void 0);
|
|
5655
5673
|
});
|
|
5656
5674
|
|
|
@@ -5810,6 +5828,7 @@
|
|
|
5810
5828
|
onChange: handleChange,
|
|
5811
5829
|
required: required,
|
|
5812
5830
|
size: size,
|
|
5831
|
+
tabIndex: 0,
|
|
5813
5832
|
value: value
|
|
5814
5833
|
}, void 0);
|
|
5815
5834
|
return jsxRuntime.jsx(StyledFormControlLabel, {
|
|
@@ -6857,27 +6876,30 @@
|
|
|
6857
6876
|
|
|
6858
6877
|
function DotRadioButton(_a) {
|
|
6859
6878
|
var ariaLabel = _a.ariaLabel,
|
|
6860
|
-
|
|
6879
|
+
_b = _a.checked,
|
|
6880
|
+
checked = _b === void 0 ? false : _b,
|
|
6861
6881
|
className = _a.className,
|
|
6862
6882
|
dataTestId = _a["data-testid"],
|
|
6863
6883
|
disabled = _a.disabled,
|
|
6864
6884
|
id = _a.id,
|
|
6865
6885
|
inputRef = _a.inputRef,
|
|
6866
6886
|
label = _a.label,
|
|
6867
|
-
|
|
6868
|
-
labelPlacement =
|
|
6887
|
+
_c = _a.labelPlacement,
|
|
6888
|
+
labelPlacement = _c === void 0 ? 'end' : _c,
|
|
6869
6889
|
name = _a.name,
|
|
6870
6890
|
onChange = _a.onChange,
|
|
6871
6891
|
required = _a.required,
|
|
6872
|
-
|
|
6873
|
-
size =
|
|
6892
|
+
_d = _a.size,
|
|
6893
|
+
size = _d === void 0 ? 'medium' : _d,
|
|
6874
6894
|
value = _a.value;
|
|
6875
6895
|
var rootClasses = useStylesWithRootClass(rootClassName$C, className);
|
|
6876
6896
|
var handleChange = function handleChange(event) {
|
|
6877
6897
|
onChange && onChange(event, event.target.value);
|
|
6878
6898
|
};
|
|
6899
|
+
// a11y: role doesn't need to be specified because it is done so automatically by the MUI component
|
|
6879
6900
|
var radioControl = jsxRuntime.jsx(StyledRadioButton, {
|
|
6880
|
-
"aria-
|
|
6901
|
+
"aria-checked": checked,
|
|
6902
|
+
"aria-label": ariaLabel || label,
|
|
6881
6903
|
checked: checked,
|
|
6882
6904
|
classes: {
|
|
6883
6905
|
root: rootClassName$r
|
|
@@ -6887,15 +6909,16 @@
|
|
|
6887
6909
|
disabled: disabled,
|
|
6888
6910
|
id: id,
|
|
6889
6911
|
inputRef: inputRef,
|
|
6890
|
-
name: name,
|
|
6912
|
+
name: name || value,
|
|
6891
6913
|
onChange: handleChange,
|
|
6892
6914
|
required: required,
|
|
6893
|
-
size: size
|
|
6915
|
+
size: size,
|
|
6916
|
+
tabIndex: 0
|
|
6894
6917
|
}, void 0);
|
|
6895
6918
|
return jsxRuntime.jsx(StyledFormControlLabel, {
|
|
6896
6919
|
className: rootClasses,
|
|
6897
6920
|
control: radioControl,
|
|
6898
|
-
"aria-label":
|
|
6921
|
+
"aria-label": ariaLabel || label,
|
|
6899
6922
|
label: label || radioControl,
|
|
6900
6923
|
labelPlacement: labelPlacement,
|
|
6901
6924
|
value: value
|
|
@@ -6980,7 +7003,7 @@
|
|
|
6980
7003
|
children: endIcon
|
|
6981
7004
|
}), void 0)]
|
|
6982
7005
|
}), void 0), jsxRuntime.jsx(StyledRadioGroup, __assign({
|
|
6983
|
-
"aria-label": ariaLabel,
|
|
7006
|
+
"aria-label": ariaLabel || groupLabel,
|
|
6984
7007
|
className: groupClassName,
|
|
6985
7008
|
"data-testid": dataTestId,
|
|
6986
7009
|
defaultValue: defaultValue,
|
|
@@ -7042,7 +7065,8 @@
|
|
|
7042
7065
|
},
|
|
7043
7066
|
inputRef: inputRef,
|
|
7044
7067
|
onChange: handleChange,
|
|
7045
|
-
size: size
|
|
7068
|
+
size: size,
|
|
7069
|
+
tabIndex: 0
|
|
7046
7070
|
}, void 0);
|
|
7047
7071
|
return jsxRuntime.jsx(StyledFormControlLabel, {
|
|
7048
7072
|
className: rootClassName$C,
|
|
@@ -7618,6 +7642,7 @@
|
|
|
7618
7642
|
var rootClassName$p = 'dot-inline-edit';
|
|
7619
7643
|
var editModeClassName = 'dot-edit-mode';
|
|
7620
7644
|
var viewModeClassName = 'dot-view-mode';
|
|
7645
|
+
var placeholderClassName = 'dot-placeholder';
|
|
7621
7646
|
var readOnlyClassName = 'dot-read-only';
|
|
7622
7647
|
var editActionsClassName = 'dot-edit-actions';
|
|
7623
7648
|
var editTextFieldClassName = 'dot-edit-text-field';
|
|
@@ -7627,7 +7652,7 @@
|
|
|
7627
7652
|
})(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
7628
7653
|
var theme = _a.theme,
|
|
7629
7654
|
fullWidth = _a.fullWidth;
|
|
7630
|
-
return styled.css(templateObject_1$p || (templateObject_1$p = __makeTemplateObject(["\n &.", " {\n display: ", ";\n align-items: center;\n color: ", ";\n min-width: ", ";\n\n &:not(.", "):focus-visible {\n border-radius: ", ";\n background-color: ", ";\n cursor: pointer;\n outline: 0;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .", " {\n display: flex;\n width: 100%;\n position: relative;\n\n .dot-edit-icon {\n height: 100%;\n position: absolute;\n right: 0;\n width: 40px;\n background-color: ", ";\n border-radius: ", ";\n display: none;\n\n .dot-i {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n\n // Display pointer and edit icon only when NOT in read only mode\n &:not(.", "):hover {\n border-radius: ", ";\n background-color: ", ";\n cursor: pointer;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .dot-view-mode-typography {\n padding: ", ";\n margin-bottom: 0;\n }\n }\n\n .dot-empty-value fieldset {\n border-color: ", ";\n }\n\n .dot-adornment-error {\n color: ", ";\n }\n\n .MuiInputBase-input {\n height: auto;\n }\n\n .MuiInputBase-root {\n margin-bottom: ", ";\n }\n\n /* Conditionally setting font related props */\n ", "\n\n .", " .dot-input {\n padding-left: ", ";\n }\n\n .MuiOutlinedInput-input:focus {\n cursor: auto;\n }\n\n .dot-counter-adornment {\n .dot-counter-max-length {\n color: ", ";\n }\n\n .dot-counter-length,\n .dot-counter-max-length {\n &.dot-counter-limit {\n color: ", ";\n }\n\n &:hover {\n background: ", ";\n }\n\n .editing-actions {\n display: flex;\n justify-content: flex-end;\n margin-top: ", ";\n }\n\n .dot-icon-btn {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n margin-left: ", ";\n padding: ", ";\n }\n }\n }\n\n .dot-read-only-adornment {\n display: none;\n }\n\n .", " {\n display: flex;\n align-items: center;\n margin: ", ";\n\n .dot-button {\n padding: ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n }\n }\n }\n "], ["\n &.", " {\n display: ", ";\n align-items: center;\n color: ", ";\n min-width: ", ";\n\n &:not(.", "):focus-visible {\n border-radius: ", ";\n background-color: ", ";\n cursor: pointer;\n outline: 0;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .", " {\n display: flex;\n width: 100%;\n position: relative;\n\n .dot-edit-icon {\n height: 100%;\n position: absolute;\n right: 0;\n width: 40px;\n background-color: ", ";\n border-radius: ", ";\n display: none;\n\n .dot-i {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n\n // Display pointer and edit icon only when NOT in read only mode\n &:not(.", "):hover {\n border-radius: ", ";\n background-color: ", ";\n cursor: pointer;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .dot-view-mode-typography {\n padding: ", ";\n margin-bottom: 0;\n }\n }\n\n .dot-empty-value fieldset {\n border-color: ", ";\n }\n\n .dot-adornment-error {\n color: ", ";\n }\n\n .MuiInputBase-input {\n height: auto;\n }\n\n .MuiInputBase-root {\n margin-bottom: ", ";\n }\n\n /* Conditionally setting font related props */\n ", "\n\n .", " .dot-input {\n padding-left: ", ";\n }\n\n .MuiOutlinedInput-input:focus {\n cursor: auto;\n }\n\n .dot-counter-adornment {\n .dot-counter-max-length {\n color: ", ";\n }\n\n .dot-counter-length,\n .dot-counter-max-length {\n &.dot-counter-limit {\n color: ", ";\n }\n\n &:hover {\n background: ", ";\n }\n\n .editing-actions {\n display: flex;\n justify-content: flex-end;\n margin-top: ", ";\n }\n\n .dot-icon-btn {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n margin-left: ", ";\n padding: ", ";\n }\n }\n }\n\n .dot-read-only-adornment {\n display: none;\n }\n\n .", " {\n display: flex;\n align-items: center;\n margin: ", ";\n\n .dot-button {\n padding: ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n }\n }\n }\n "])), rootClassName$p, fullWidth ? 'flex' : 'inline-flex', theme.palette.grey[700], theme.spacing(32), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, viewModeClassName, theme.palette.layer.n50, theme.spacing(0, 0.5, 0.5, 0), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, theme.spacing(1.3125, 1), theme.palette.error[500], theme.palette.error[500], theme.spacing(0), function (_a) {
|
|
7655
|
+
return styled.css(templateObject_1$p || (templateObject_1$p = __makeTemplateObject(["\n &.", " {\n display: ", ";\n align-items: center;\n color: ", ";\n min-width: ", ";\n\n &:not(.", "):focus-visible {\n border-radius: ", ";\n background-color: ", ";\n cursor: pointer;\n outline: 0;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .", " {\n display: flex;\n width: 100%;\n position: relative;\n\n .dot-edit-icon {\n height: 100%;\n position: absolute;\n right: 0;\n width: 40px;\n background-color: ", ";\n border-radius: ", ";\n display: none;\n\n .dot-i {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n\n // Display pointer and edit icon only when NOT in read only mode\n &:not(.", "):hover {\n border-radius: ", ";\n background-color: ", ";\n cursor: pointer;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .dot-view-mode-typography {\n padding: ", ";\n margin-bottom: 0;\n\n &.", " {\n color: ", ";\n }\n }\n }\n\n .dot-empty-value fieldset {\n border-color: ", ";\n }\n\n .dot-adornment-error {\n color: ", ";\n }\n\n .MuiInputBase-input {\n height: auto;\n }\n\n .MuiInputBase-root {\n margin-bottom: ", ";\n }\n\n /* Conditionally setting font related props */\n ", "\n\n .", " .dot-input {\n padding-left: ", ";\n }\n\n .MuiOutlinedInput-input:focus {\n cursor: auto;\n }\n\n .dot-counter-adornment {\n .dot-counter-max-length {\n color: ", ";\n }\n\n .dot-counter-length,\n .dot-counter-max-length {\n &.dot-counter-limit {\n color: ", ";\n }\n\n &:hover {\n background: ", ";\n }\n\n .editing-actions {\n display: flex;\n justify-content: flex-end;\n margin-top: ", ";\n }\n\n .dot-icon-btn {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n margin-left: ", ";\n padding: ", ";\n }\n }\n }\n\n .dot-read-only-adornment {\n display: none;\n }\n\n .", " {\n display: flex;\n align-items: center;\n margin: ", ";\n\n .dot-button {\n padding: ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n }\n }\n }\n "], ["\n &.", " {\n display: ", ";\n align-items: center;\n color: ", ";\n min-width: ", ";\n\n &:not(.", "):focus-visible {\n border-radius: ", ";\n background-color: ", ";\n cursor: pointer;\n outline: 0;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .", " {\n display: flex;\n width: 100%;\n position: relative;\n\n .dot-edit-icon {\n height: 100%;\n position: absolute;\n right: 0;\n width: 40px;\n background-color: ", ";\n border-radius: ", ";\n display: none;\n\n .dot-i {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n\n // Display pointer and edit icon only when NOT in read only mode\n &:not(.", "):hover {\n border-radius: ", ";\n background-color: ", ";\n cursor: pointer;\n\n .dot-edit-icon {\n display: block;\n }\n }\n\n .dot-view-mode-typography {\n padding: ", ";\n margin-bottom: 0;\n\n &.", " {\n color: ", ";\n }\n }\n }\n\n .dot-empty-value fieldset {\n border-color: ", ";\n }\n\n .dot-adornment-error {\n color: ", ";\n }\n\n .MuiInputBase-input {\n height: auto;\n }\n\n .MuiInputBase-root {\n margin-bottom: ", ";\n }\n\n /* Conditionally setting font related props */\n ", "\n\n .", " .dot-input {\n padding-left: ", ";\n }\n\n .MuiOutlinedInput-input:focus {\n cursor: auto;\n }\n\n .dot-counter-adornment {\n .dot-counter-max-length {\n color: ", ";\n }\n\n .dot-counter-length,\n .dot-counter-max-length {\n &.dot-counter-limit {\n color: ", ";\n }\n\n &:hover {\n background: ", ";\n }\n\n .editing-actions {\n display: flex;\n justify-content: flex-end;\n margin-top: ", ";\n }\n\n .dot-icon-btn {\n background: ", ";\n border: 1px solid ", ";\n color: ", ";\n margin-left: ", ";\n padding: ", ";\n }\n }\n }\n\n .dot-read-only-adornment {\n display: none;\n }\n\n .", " {\n display: flex;\n align-items: center;\n margin: ", ";\n\n .dot-button {\n padding: ", ";\n margin-top: ", ";\n margin-bottom: ", ";\n }\n }\n }\n "])), rootClassName$p, fullWidth ? 'flex' : 'inline-flex', theme.palette.grey[700], theme.spacing(32), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, viewModeClassName, theme.palette.layer.n50, theme.spacing(0, 0.5, 0.5, 0), readOnlyClassName, theme.spacing(0.5), theme.palette.layer.n50, theme.spacing(1.3125, 1), placeholderClassName, theme.palette.grey[200], theme.palette.error[500], theme.palette.error[500], theme.spacing(0), function (_a) {
|
|
7631
7656
|
var typography = _a.typography;
|
|
7632
7657
|
return typography && "\n .MuiInputBase-root {\n font-family: " + (theme.typography[typography].fontFamily || 'inherit') + ";\n font-size: " + theme.typography[typography].fontSize + ";\n line-height: " + (theme.typography[typography].lineHeight || 'normal') + ";\n letter-spacing: " + (theme.typography[typography].letterSpacing || 'normal') + ";\n text-transform: " + (theme.typography[typography].textTransform || 'none') + ";\n }\n ";
|
|
7633
7658
|
}, editTextFieldClassName, theme.spacing(1), theme.palette.layer.n400, theme.palette.error[500], theme.palette.grey[50], theme.spacing(0.5), theme.palette.grey[0], theme.palette.grey[300], theme.palette.grey[700], theme.spacing(1), theme.spacing(0.25), editActionsClassName, theme.spacing(0, 0, 0, 0.5), theme.spacing(0.75), theme.spacing(0), theme.spacing(0));
|
|
@@ -7724,6 +7749,7 @@
|
|
|
7724
7749
|
name = _a.name,
|
|
7725
7750
|
onChange = _a.onChange,
|
|
7726
7751
|
onEditStateChange = _a.onEditStateChange,
|
|
7752
|
+
placeholder = _a.placeholder,
|
|
7727
7753
|
readOnly = _a.readOnly,
|
|
7728
7754
|
selectTextOnEdit = _a.selectTextOnEdit,
|
|
7729
7755
|
_d = _a.startEditable,
|
|
@@ -7880,14 +7906,16 @@
|
|
|
7880
7906
|
}
|
|
7881
7907
|
};
|
|
7882
7908
|
var renderViewMode = function renderViewMode() {
|
|
7883
|
-
var
|
|
7909
|
+
var bindingsValue = bindings ? applyBindings(bindings, inputValue) : null;
|
|
7910
|
+
var typographyClasses = useStylesWithRootClass('dot-view-mode-typography', !inputValue && placeholderClassName);
|
|
7911
|
+
var viewModeClasses = useStylesWithRootClass(viewModeClassName, readOnly && readOnlyClassName);
|
|
7884
7912
|
var viewModeChildren = jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7885
7913
|
children: [jsxRuntime.jsx(DotTypography, __assign({
|
|
7886
|
-
className:
|
|
7914
|
+
className: typographyClasses,
|
|
7887
7915
|
"data-testid": dataTestId && dataTestId + "-view-mode-typography",
|
|
7888
7916
|
variant: typography
|
|
7889
7917
|
}, {
|
|
7890
|
-
children:
|
|
7918
|
+
children: bindingsValue || inputValue || placeholder
|
|
7891
7919
|
}), void 0), jsxRuntime.jsx(DotIcon, {
|
|
7892
7920
|
className: "dot-edit-icon",
|
|
7893
7921
|
"data-testid": dataTestId && dataTestId + "-edit-icon",
|
|
@@ -8918,6 +8946,7 @@
|
|
|
8918
8946
|
dataTestId = _a["data-testid"],
|
|
8919
8947
|
noWrap = _a.noWrap,
|
|
8920
8948
|
onActionMenuTrigger = _a.onActionMenuTrigger,
|
|
8949
|
+
style = _a.style,
|
|
8921
8950
|
typography = _a.typography,
|
|
8922
8951
|
value = _a.value;
|
|
8923
8952
|
var _b = React.useState(false),
|
|
@@ -8987,7 +9016,8 @@
|
|
|
8987
9016
|
root: rootClasses
|
|
8988
9017
|
},
|
|
8989
9018
|
colSpan: colspan,
|
|
8990
|
-
"data-testid": dataTestId
|
|
9019
|
+
"data-testid": dataTestId,
|
|
9020
|
+
style: style
|
|
8991
9021
|
}, {
|
|
8992
9022
|
children: getTableCellValue()
|
|
8993
9023
|
}), void 0);
|
|
@@ -9080,6 +9110,18 @@
|
|
|
9080
9110
|
rowId: id
|
|
9081
9111
|
}, void 0);
|
|
9082
9112
|
};
|
|
9113
|
+
var parseMaxWidth = function parseMaxWidth(width) {
|
|
9114
|
+
if (!width) {
|
|
9115
|
+
return;
|
|
9116
|
+
}
|
|
9117
|
+
// if contains % then convert to % of viewport
|
|
9118
|
+
if (width.includes('%')) {
|
|
9119
|
+
var percent = Number.parseFloat(width) / 100;
|
|
9120
|
+
return "calc(100vw * " + percent + ")";
|
|
9121
|
+
}
|
|
9122
|
+
// if contains 'px' or 'vw' then pass as is
|
|
9123
|
+
return "" + width;
|
|
9124
|
+
};
|
|
9083
9125
|
return jsxRuntime.jsxs(StyledTableRowStyles, __assign({
|
|
9084
9126
|
classes: {
|
|
9085
9127
|
root: rootClasses
|
|
@@ -9097,6 +9139,9 @@
|
|
|
9097
9139
|
onActionMenuTrigger: function (menuRef, menuItem) {
|
|
9098
9140
|
return onActionMenuTrigger(menuRef, menuItem);
|
|
9099
9141
|
},
|
|
9142
|
+
style: {
|
|
9143
|
+
maxWidth: parseMaxWidth(column.width)
|
|
9144
|
+
},
|
|
9100
9145
|
value: rowData[column.id]
|
|
9101
9146
|
}, index);
|
|
9102
9147
|
})]
|
|
@@ -10200,7 +10245,7 @@
|
|
|
10200
10245
|
isUploadDisabled: isUploadDisabled,
|
|
10201
10246
|
open: open
|
|
10202
10247
|
})]
|
|
10203
|
-
}), void 0), maxSize && renderMaxSizeMessage(maxSize), maxFiles && renderMaxFilesMessage(maxFiles, maxFilesClasses), !hideFilesList
|
|
10248
|
+
}), void 0), !!maxSize && renderMaxSizeMessage(maxSize), !!maxFiles && renderMaxFilesMessage(maxFiles, maxFilesClasses), !hideFilesList || jsxRuntime.jsx(DotList, {
|
|
10204
10249
|
"data-testid": dataTestId && dataTestId + "-file-list",
|
|
10205
10250
|
items: uploadedFilesList,
|
|
10206
10251
|
width: "100%"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Accordion } from '@mui/material';
|
|
2
1
|
export declare const rootClassName = "dot-accordion";
|
|
3
2
|
export declare const summaryClassName = "dot-accordion-summary";
|
|
4
3
|
export declare const detailClassName = "dot-accordion-details";
|
|
5
|
-
export declare const StyledAccordion: import("styled-components").StyledComponent<
|
|
4
|
+
export declare const StyledAccordion: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").AccordionTypeMap<{}, "div">>, any, {}, never>;
|
|
@@ -21,7 +21,7 @@ interface AppSwitcherViewProps extends CommonAppSwitcherProps {
|
|
|
21
21
|
selectedAppType: string;
|
|
22
22
|
}
|
|
23
23
|
export declare const DotAppSwitcherView: ({ activeApp, apps, className, maxRecentInstances, noAppTypeLabel, platformConsoleUrl, onClose, open, searchInstancesThreshold, selectedAppType, yOffset, zIndex, }: AppSwitcherViewProps) => JSX.Element;
|
|
24
|
-
interface AppSwitcherProps extends CommonAppSwitcherProps {
|
|
24
|
+
export interface AppSwitcherProps extends CommonAppSwitcherProps {
|
|
25
25
|
accountId?: string;
|
|
26
26
|
includePlatformConsole?: boolean;
|
|
27
27
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Story, ComponentMeta } from '@storybook/react';
|
|
2
|
+
import { AppSwitcherProps } from './AppSwitcher';
|
|
3
|
+
declare const _default: ComponentMeta<({ accountId, includePlatformConsole, onClose, ...commonProps }: AppSwitcherProps) => JSX.Element>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: Story<AppSwitcherProps>;
|
|
@@ -11,6 +11,12 @@ export declare const StyledFileListItem: ((props: {
|
|
|
11
11
|
componentsProps?: {
|
|
12
12
|
root?: import("react").HTMLAttributes<HTMLDivElement> & import("@mui/material").ListItemComponentsPropsOverrides;
|
|
13
13
|
};
|
|
14
|
+
slotProps?: {
|
|
15
|
+
root?: import("react").HTMLAttributes<HTMLDivElement> & import("@mui/material").ListItemComponentsPropsOverrides;
|
|
16
|
+
};
|
|
17
|
+
slots?: {
|
|
18
|
+
root?: import("react").ElementType<any>;
|
|
19
|
+
};
|
|
14
20
|
} & Omit<{
|
|
15
21
|
action?: import("react").Ref<import("@mui/material").ButtonBaseActions>;
|
|
16
22
|
centerRipple?: boolean;
|
|
@@ -29,7 +35,7 @@ export declare const StyledFileListItem: ((props: {
|
|
|
29
35
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions>;
|
|
30
36
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof import("react").AnchorHTMLAttributes<HTMLAnchorElement>> & {
|
|
31
37
|
ref?: import("react").Ref<HTMLAnchorElement>;
|
|
32
|
-
}, "button" | "style" | "className" | "classes" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "autoFocus" | "ContainerComponent" | "ContainerProps" | "dense" | "disableGutters" | "disablePadding" | "divider" | "secondaryAction" | "selected" | "components" | "componentsProps">) => JSX.Element) & import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").ExtendButtonBaseTypeMap<import("@mui/material").ListItemTypeMap<{
|
|
38
|
+
}, "button" | "style" | "className" | "classes" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "autoFocus" | "ContainerComponent" | "ContainerProps" | "dense" | "disableGutters" | "disablePadding" | "divider" | "secondaryAction" | "selected" | "components" | "componentsProps" | "slotProps" | "slots">) => JSX.Element) & import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").ExtendButtonBaseTypeMap<import("@mui/material").ListItemTypeMap<{
|
|
33
39
|
button: true;
|
|
34
40
|
}, "div">>> & import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").ListItemTypeMap<{
|
|
35
41
|
button?: false;
|
|
@@ -16,6 +16,8 @@ export interface InlineEditProps extends CommonProps {
|
|
|
16
16
|
onChange?: (value: string) => Promise<boolean>;
|
|
17
17
|
/** A function that informs the parent of current editing state */
|
|
18
18
|
onEditStateChange?: (editing: boolean) => void;
|
|
19
|
+
/** If provided will display placeholder text when field is empty */
|
|
20
|
+
placeholder?: string;
|
|
19
21
|
/** If true, component will behave like a regular text (editing functionality will be disabled). */
|
|
20
22
|
readOnly?: boolean;
|
|
21
23
|
/** If true, when starting edit it will select all text in the input */
|
|
@@ -34,4 +36,4 @@ export interface InlineEditProps extends CommonProps {
|
|
|
34
36
|
/**
|
|
35
37
|
* @experimental This component is still in development
|
|
36
38
|
*/
|
|
37
|
-
export declare const DotInlineEdit: ({ ariaLabel, ariaRole, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, startEditable, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element;
|
|
39
|
+
export declare const DotInlineEdit: ({ ariaLabel, ariaRole, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, placeholder, readOnly, selectTextOnEdit, startEditable, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ComponentMeta } from '@storybook/react';
|
|
2
2
|
import { InlineEditProps } from './InlineEdit';
|
|
3
|
-
declare const _default: ComponentMeta<({ ariaLabel, ariaRole, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, startEditable, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element>;
|
|
3
|
+
declare const _default: ComponentMeta<({ ariaLabel, ariaRole, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, placeholder, readOnly, selectTextOnEdit, startEditable, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: any;
|
|
6
6
|
export declare const WithCharactersLimit: any;
|
|
7
|
+
export declare const WithPlaceholder: any;
|
|
7
8
|
export declare const WithMultipleLines: any;
|
|
8
9
|
export declare const WithReadOnlyMode: any;
|
|
9
10
|
export declare const WithoutActionButtons: any;
|
|
@@ -2,6 +2,7 @@ import { TypographyVariant } from '../typography/Typography';
|
|
|
2
2
|
export declare const rootClassName = "dot-inline-edit";
|
|
3
3
|
export declare const editModeClassName = "dot-edit-mode";
|
|
4
4
|
export declare const viewModeClassName = "dot-view-mode";
|
|
5
|
+
export declare const placeholderClassName = "dot-placeholder";
|
|
5
6
|
export declare const readOnlyClassName = "dot-read-only";
|
|
6
7
|
export declare const editActionsClassName = "dot-edit-actions";
|
|
7
8
|
export declare const editTextFieldClassName = "dot-edit-text-field";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextField
|
|
1
|
+
import { TextField } from '@mui/material';
|
|
2
2
|
export declare const rootClassName = "dot-text-field";
|
|
3
3
|
export declare const rootSelectClassName = "dot-select-field";
|
|
4
4
|
export declare const labelClassName = "dot-input-label";
|
|
@@ -8,6 +8,6 @@ export declare const successClassName = "dot-success";
|
|
|
8
8
|
export declare const adornmentIconClassName = "dot-adornment-icon";
|
|
9
9
|
export declare const fieldsetClassName = "MuiOutlinedInput-notchedOutline";
|
|
10
10
|
export declare const StyledAdornment: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").InputAdornmentTypeMap<{}, "div">>, any, {}, never>;
|
|
11
|
-
export declare const StyledInputLabel: import("styled-components").StyledComponent<
|
|
11
|
+
export declare const StyledInputLabel: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").InputLabelTypeMap<{}, "label">>, any, {}, never>;
|
|
12
12
|
export declare const StyledTextFieldContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
13
13
|
export declare const StyledTextField: import("styled-components").StyledComponent<typeof TextField, any, {}, never>;
|
|
@@ -13,6 +13,12 @@ export declare const StyledListItem: ((props: {
|
|
|
13
13
|
componentsProps?: {
|
|
14
14
|
root?: import("react").HTMLAttributes<HTMLDivElement> & import("@mui/material").ListItemComponentsPropsOverrides;
|
|
15
15
|
};
|
|
16
|
+
slotProps?: {
|
|
17
|
+
root?: import("react").HTMLAttributes<HTMLDivElement> & import("@mui/material").ListItemComponentsPropsOverrides;
|
|
18
|
+
};
|
|
19
|
+
slots?: {
|
|
20
|
+
root?: import("react").ElementType<any>;
|
|
21
|
+
};
|
|
16
22
|
} & Omit<{
|
|
17
23
|
action?: import("react").Ref<import("@mui/material").ButtonBaseActions>;
|
|
18
24
|
centerRipple?: boolean;
|
|
@@ -31,7 +37,7 @@ export declare const StyledListItem: ((props: {
|
|
|
31
37
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions>;
|
|
32
38
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof import("react").AnchorHTMLAttributes<HTMLAnchorElement>> & {
|
|
33
39
|
ref?: import("react").Ref<HTMLAnchorElement>;
|
|
34
|
-
}, "button" | "style" | "className" | "classes" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "autoFocus" | "ContainerComponent" | "ContainerProps" | "dense" | "disableGutters" | "disablePadding" | "divider" | "secondaryAction" | "selected" | "components" | "componentsProps">) => JSX.Element) & import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").ExtendButtonBaseTypeMap<import("@mui/material").ListItemTypeMap<{
|
|
40
|
+
}, "button" | "style" | "className" | "classes" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "autoFocus" | "ContainerComponent" | "ContainerProps" | "dense" | "disableGutters" | "disablePadding" | "divider" | "secondaryAction" | "selected" | "components" | "componentsProps" | "slotProps" | "slots">) => JSX.Element) & import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").ExtendButtonBaseTypeMap<import("@mui/material").ListItemTypeMap<{
|
|
35
41
|
button: true;
|
|
36
42
|
}, "div">>> & import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").ListItemTypeMap<{
|
|
37
43
|
button?: false;
|
|
@@ -5,5 +5,14 @@ interface StyledPopperArgs {
|
|
|
5
5
|
$maxHeight?: number | string;
|
|
6
6
|
}
|
|
7
7
|
export declare const getListMaxHeight: (maxHeight: string | number) => string;
|
|
8
|
-
export declare const StyledPopper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
8
|
+
export declare const StyledPopper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("@mui/base").PopperProps<"div">, "direction"> & {
|
|
9
|
+
component?: import("react").ElementType<any>;
|
|
10
|
+
components?: {
|
|
11
|
+
Root?: import("react").ElementType<any>;
|
|
12
|
+
};
|
|
13
|
+
componentsProps?: {
|
|
14
|
+
root?: import("@mui/base").SlotComponentProps<"div", import("@mui/base").PopperRootSlotPropsOverrides, import("@mui/base").PopperOwnProps>;
|
|
15
|
+
};
|
|
16
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme>;
|
|
17
|
+
} & import("react").RefAttributes<HTMLDivElement>>, any, StyledPopperArgs, never>;
|
|
9
18
|
export {};
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const rootClassName = "dot-popper";
|
|
3
|
-
export declare const StyledPopper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
3
|
+
export declare const StyledPopper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("@mui/base").PopperProps<"div">, "direction"> & {
|
|
4
|
+
component?: import("react").ElementType<any>;
|
|
5
|
+
components?: {
|
|
6
|
+
Root?: import("react").ElementType<any>;
|
|
7
|
+
};
|
|
8
|
+
componentsProps?: {
|
|
9
|
+
root?: import("@mui/base").SlotComponentProps<"div", import("@mui/base").PopperRootSlotPropsOverrides, import("@mui/base").PopperOwnProps>;
|
|
10
|
+
};
|
|
11
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme>;
|
|
12
|
+
} & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
@@ -2,9 +2,9 @@ import { Story, ComponentMeta } from '@storybook/react';
|
|
|
2
2
|
import { TableProps } from './Table';
|
|
3
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>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Default: Story
|
|
6
|
-
export declare const LocallyPaginatedTable: Story
|
|
7
|
-
export declare const RemotelyPaginatedTable: Story
|
|
8
|
-
export declare const WithActionMenu: Story
|
|
9
|
-
export declare const WithCheckboxSelection: Story
|
|
10
|
-
export declare const EmptyTable: Story
|
|
5
|
+
export declare const Default: Story;
|
|
6
|
+
export declare const LocallyPaginatedTable: Story;
|
|
7
|
+
export declare const RemotelyPaginatedTable: Story;
|
|
8
|
+
export declare const WithActionMenu: Story;
|
|
9
|
+
export declare const WithCheckboxSelection: Story;
|
|
10
|
+
export declare const EmptyTable: Story;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
import { TypographyVariant } from '../typography/Typography';
|
|
4
4
|
export declare type TextAlignment = 'center' | 'inherit' | 'justify' | 'left' | 'right';
|
|
@@ -9,10 +9,11 @@ export interface CellProps extends CommonProps {
|
|
|
9
9
|
id?: string;
|
|
10
10
|
noWrap?: boolean;
|
|
11
11
|
onActionMenuTrigger?: (el: HTMLElement, menuItem: Array<ReactNode>) => void;
|
|
12
|
+
style?: CSSProperties;
|
|
12
13
|
typography: TypographyVariant;
|
|
13
14
|
value?: unknown;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* A wrapper component around the TableCell component from @material-ui.
|
|
17
18
|
*/
|
|
18
|
-
export declare const DotBodyCell: ({ ariaLabel, align, cellKey, className, colspan, "data-testid": dataTestId, noWrap, onActionMenuTrigger, typography, value, }: CellProps) => JSX.Element;
|
|
19
|
+
export declare const DotBodyCell: ({ ariaLabel, align, cellKey, className, colspan, "data-testid": dataTestId, noWrap, onActionMenuTrigger, style, typography, value, }: CellProps) => JSX.Element;
|