@digital-ai/dot-components 4.20.2 → 4.21.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/index.esm.js +498 -359
- package/package.json +1 -1
- package/src/lib/components/auto-complete/utils/helpers.d.ts +1 -0
- package/src/lib/components/file-upload/FileUpload.styles.d.ts +0 -1
- package/src/lib/components/index.d.ts +2 -0
- package/src/lib/components/toggle-switch/ToggleSwitch.d.ts +15 -0
- package/src/lib/components/toggle-switch/ToggleSwitch.styles.d.ts +2 -0
- package/src/lib/components/toggle-switch/index.d.ts +3 -0
- package/src/lib/components/toggle-switch/utils/models.d.ts +7 -0
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { useEffect, useState, useRef, createContext, useMemo, useContext, forwardRef, useCallback, createElement, Fragment as Fragment$1, useLayoutEffect } from 'react';
|
|
4
|
-
import { Typography, Fade, StyledEngineProvider, Tooltip, InputAdornment, InputLabel, TextField, Icon, Accordion, AccordionSummary, AccordionDetails, AccordionActions, Toolbar, Alert, Avatar, Button, Link, List, ListSubheader, Divider, CircularProgress, Popper, MenuList, MenuItem, Paper, ClickAwayListener, Drawer, IconButton, ListItem, ListItemButton, Collapse, ListItemIcon, ListItemText, Badge, useMediaQuery, Chip, Autocomplete, AvatarGroup, Breadcrumbs, ToggleButtonGroup, ToggleButton, Card, CardContent, CardHeader, FormControlLabel, Checkbox, FormControl, FormGroup, FormLabel, FormHelperText, Dialog, DialogContent, DialogActions, useTheme as useTheme$1, Snackbar, RadioGroup, Radio, Switch, Skeleton, ButtonGroup, Stepper, Step, StepLabel, TablePagination, TableContainer, TableBody, TableCell, TableRow, TableSortLabel, TableHead, Table, Tabs, Tab, LinearProgress, Slide } from '@mui/material';
|
|
4
|
+
import { Typography, Fade, StyledEngineProvider, Tooltip, InputAdornment, InputLabel, TextField, Icon, Accordion, AccordionSummary, AccordionDetails, AccordionActions, Toolbar, Alert, Avatar, Button, Link, List, ListSubheader, Divider, CircularProgress, Popper, MenuList, MenuItem, Paper, ClickAwayListener, Drawer, IconButton, ListItem, ListItemButton, Collapse, ListItemIcon, ListItemText, Badge, useMediaQuery, Chip, Autocomplete, AvatarGroup, Breadcrumbs, ToggleButtonGroup, ToggleButton, Card, CardContent, CardHeader, FormControlLabel, Checkbox, FormControl, FormGroup, FormLabel, FormHelperText, Dialog, DialogContent, DialogActions, useTheme as useTheme$1, Snackbar, RadioGroup, Radio, Switch, Skeleton, ButtonGroup, Stepper, Step, StepLabel, TablePagination, TableContainer, TableBody, TableCell, TableRow, TableSortLabel, TableHead, Table, Tabs, Tab, LinearProgress, Slide, Stack } from '@mui/material';
|
|
5
5
|
import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';
|
|
6
6
|
import styled, { createGlobalStyle, ThemeProvider as ThemeProvider$1, css, keyframes } from 'styled-components';
|
|
7
7
|
import '@digital-ai/dot-icons';
|
|
@@ -1382,7 +1382,7 @@ const readOnlyStyles = theme => css`
|
|
|
1382
1382
|
}
|
|
1383
1383
|
`;
|
|
1384
1384
|
|
|
1385
|
-
const rootClassName$
|
|
1385
|
+
const rootClassName$1p = 'dot-text-field';
|
|
1386
1386
|
const rootSelectClassName = 'dot-select-field';
|
|
1387
1387
|
const wrapperClassName$2 = 'dot-label-wrapper';
|
|
1388
1388
|
const labelClassName = 'dot-input-label';
|
|
@@ -1436,7 +1436,7 @@ const StyledTextField = styled(TextField)`
|
|
|
1436
1436
|
$maxRows,
|
|
1437
1437
|
$minRows
|
|
1438
1438
|
}) => css`
|
|
1439
|
-
&.${rootClassName$
|
|
1439
|
+
&.${rootClassName$1p} {
|
|
1440
1440
|
.MuiInputBase-root {
|
|
1441
1441
|
margin-bottom: 0;
|
|
1442
1442
|
|
|
@@ -1520,7 +1520,7 @@ const StyledTextField = styled(TextField)`
|
|
|
1520
1520
|
margin-right: ${theme.spacing(2)};
|
|
1521
1521
|
}
|
|
1522
1522
|
|
|
1523
|
-
&.${rootSelectClassName}, &.${rootClassName$
|
|
1523
|
+
&.${rootSelectClassName}, &.${rootClassName$1p} {
|
|
1524
1524
|
.${adornmentIconClassName} {
|
|
1525
1525
|
color: ${theme.palette.figma.icon.black};
|
|
1526
1526
|
p {
|
|
@@ -1621,13 +1621,13 @@ const StyledTextField = styled(TextField)`
|
|
|
1621
1621
|
`}
|
|
1622
1622
|
`;
|
|
1623
1623
|
|
|
1624
|
-
const rootClassName$
|
|
1624
|
+
const rootClassName$1o = 'dot-icon';
|
|
1625
1625
|
const aiIconClassName = 'dot-icon-ai';
|
|
1626
1626
|
const StyledIcon = styled(Icon)`
|
|
1627
1627
|
${({
|
|
1628
1628
|
theme
|
|
1629
1629
|
}) => css`
|
|
1630
|
-
&.${rootClassName$
|
|
1630
|
+
&.${rootClassName$1o} {
|
|
1631
1631
|
color: ${theme.palette.figma.icon.black};
|
|
1632
1632
|
font-size: 20px;
|
|
1633
1633
|
|
|
@@ -1677,7 +1677,7 @@ const DotIcon = ({
|
|
|
1677
1677
|
tooltip,
|
|
1678
1678
|
ai = false
|
|
1679
1679
|
}) => {
|
|
1680
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
1680
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1o, className, ai ? aiIconClassName : '');
|
|
1681
1681
|
return jsx(DotTooltip, {
|
|
1682
1682
|
disableInteractive: disableInteractive,
|
|
1683
1683
|
childrenDisplayStyle: "inline-block",
|
|
@@ -1701,7 +1701,7 @@ const DotIcon = ({
|
|
|
1701
1701
|
});
|
|
1702
1702
|
};
|
|
1703
1703
|
|
|
1704
|
-
const rootClassName$
|
|
1704
|
+
const rootClassName$1n = 'dot-accordion';
|
|
1705
1705
|
const summaryClassName = 'dot-accordion-summary';
|
|
1706
1706
|
const detailClassName = 'dot-accordion-details';
|
|
1707
1707
|
const StyledAccordion = styled(Accordion)`
|
|
@@ -1712,7 +1712,7 @@ const StyledAccordion = styled(Accordion)`
|
|
|
1712
1712
|
background: ${theme.palette.figma.background.level1.white};
|
|
1713
1713
|
}
|
|
1714
1714
|
|
|
1715
|
-
&.${rootClassName$
|
|
1715
|
+
&.${rootClassName$1n} .${summaryClassName} {
|
|
1716
1716
|
align-items: center;
|
|
1717
1717
|
background: ${theme.palette.figma.background.level1.white};
|
|
1718
1718
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -1757,7 +1757,7 @@ const DotAccordion = ({
|
|
|
1757
1757
|
ariaLabel,
|
|
1758
1758
|
children,
|
|
1759
1759
|
className,
|
|
1760
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
1760
|
+
'data-pendoid': dataPendoId = rootClassName$1n,
|
|
1761
1761
|
'data-testid': dataTestId = 'dot-accordion',
|
|
1762
1762
|
disabled = false,
|
|
1763
1763
|
expanded,
|
|
@@ -1768,7 +1768,7 @@ const DotAccordion = ({
|
|
|
1768
1768
|
summary,
|
|
1769
1769
|
noWrap = true
|
|
1770
1770
|
}) => {
|
|
1771
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
1771
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1n, className);
|
|
1772
1772
|
const [elevation, setElevation] = useState();
|
|
1773
1773
|
useEffect(() => {
|
|
1774
1774
|
if (onChange && expanded === undefined) {
|
|
@@ -1819,15 +1819,15 @@ const DotAccordion = ({
|
|
|
1819
1819
|
});
|
|
1820
1820
|
};
|
|
1821
1821
|
|
|
1822
|
-
const rootClassName$
|
|
1822
|
+
const rootClassName$1m = 'dot-action-toolbar';
|
|
1823
1823
|
const StyledToolbar = styled(Toolbar)`
|
|
1824
1824
|
${({
|
|
1825
1825
|
theme
|
|
1826
1826
|
}) => css`
|
|
1827
|
-
&.${rootClassName$
|
|
1827
|
+
&.${rootClassName$1m} {
|
|
1828
1828
|
border-bottom: 1px solid ${theme.palette.figma.border.default};
|
|
1829
1829
|
|
|
1830
|
-
.${rootClassName$
|
|
1830
|
+
.${rootClassName$1p} .MuiInputBase-root {
|
|
1831
1831
|
margin-bottom: 0;
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
@@ -1841,7 +1841,7 @@ const DotActionToolbar = ({
|
|
|
1841
1841
|
'data-testid': dataTestId,
|
|
1842
1842
|
variant = 'dense'
|
|
1843
1843
|
}) => {
|
|
1844
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
1844
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1m, className);
|
|
1845
1845
|
return jsx(StyledToolbar, {
|
|
1846
1846
|
"aria-label": ariaLabel,
|
|
1847
1847
|
className: rootClasses,
|
|
@@ -1851,12 +1851,12 @@ const DotActionToolbar = ({
|
|
|
1851
1851
|
});
|
|
1852
1852
|
};
|
|
1853
1853
|
|
|
1854
|
-
const rootClassName$
|
|
1854
|
+
const rootClassName$1l = 'dot-alert-banner';
|
|
1855
1855
|
const StyledAlertBanner = styled(Alert)`
|
|
1856
1856
|
${({
|
|
1857
1857
|
theme
|
|
1858
1858
|
}) => css`
|
|
1859
|
-
&.${rootClassName$
|
|
1859
|
+
&.${rootClassName$1l} {
|
|
1860
1860
|
align-items: center;
|
|
1861
1861
|
box-sizing: border-box;
|
|
1862
1862
|
min-height: 48px;
|
|
@@ -1891,7 +1891,7 @@ const DotAlertBanner = ({
|
|
|
1891
1891
|
ariaLabel,
|
|
1892
1892
|
children,
|
|
1893
1893
|
className,
|
|
1894
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
1894
|
+
'data-pendoid': dataPendoId = rootClassName$1l,
|
|
1895
1895
|
'data-testid': dataTestId,
|
|
1896
1896
|
onClose,
|
|
1897
1897
|
roundedCorners = true,
|
|
@@ -1899,7 +1899,7 @@ const DotAlertBanner = ({
|
|
|
1899
1899
|
textVariant = 'body1',
|
|
1900
1900
|
width
|
|
1901
1901
|
}) => {
|
|
1902
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
1902
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1l, severity, className);
|
|
1903
1903
|
/* For simple string use default component, for everything else use 'div' */
|
|
1904
1904
|
const typographyComponent = isString$2(children) ? undefined : 'div';
|
|
1905
1905
|
return jsx(StyledAlertBanner, {
|
|
@@ -1942,12 +1942,12 @@ const DotAppLogo = ({
|
|
|
1942
1942
|
});
|
|
1943
1943
|
};
|
|
1944
1944
|
|
|
1945
|
-
const rootClassName$
|
|
1945
|
+
const rootClassName$1k = 'dot-annotation';
|
|
1946
1946
|
const StyledAnnotation = styled.kbd`
|
|
1947
1947
|
${({
|
|
1948
1948
|
theme
|
|
1949
1949
|
}) => css`
|
|
1950
|
-
&.${rootClassName$
|
|
1950
|
+
&.${rootClassName$1k} {
|
|
1951
1951
|
font-family: inherit;
|
|
1952
1952
|
background-color: ${theme.palette.figma.background.level0.bckgGray};
|
|
1953
1953
|
color: ${theme.palette.figma.typography.disabled};
|
|
@@ -1973,13 +1973,13 @@ const StyledAnnotation = styled.kbd`
|
|
|
1973
1973
|
|
|
1974
1974
|
const DotAnnotation = ({
|
|
1975
1975
|
ariaLabel,
|
|
1976
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
1976
|
+
'data-pendoid': dataPendoId = rootClassName$1k,
|
|
1977
1977
|
'data-testid': dataTestId,
|
|
1978
1978
|
className,
|
|
1979
1979
|
content,
|
|
1980
1980
|
type = 'primary'
|
|
1981
1981
|
}) => {
|
|
1982
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
1982
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1k, className, type === 'secondary' ? 'secondary' : '');
|
|
1983
1983
|
return jsx(StyledAnnotation, {
|
|
1984
1984
|
"aria-label": ariaLabel,
|
|
1985
1985
|
className: rootClasses,
|
|
@@ -2624,7 +2624,7 @@ const useDotCoreApiContext = () => {
|
|
|
2624
2624
|
return useContext(DotCoreApiContext);
|
|
2625
2625
|
};
|
|
2626
2626
|
|
|
2627
|
-
const rootClassName$
|
|
2627
|
+
const rootClassName$1j = 'dot-avatar';
|
|
2628
2628
|
const avatarSpacing = {
|
|
2629
2629
|
small: 3,
|
|
2630
2630
|
medium: 5,
|
|
@@ -2634,7 +2634,7 @@ const StyledAvatar = styled(Avatar)`
|
|
|
2634
2634
|
${({
|
|
2635
2635
|
theme
|
|
2636
2636
|
}) => css`
|
|
2637
|
-
&.${rootClassName$
|
|
2637
|
+
&.${rootClassName$1j} {
|
|
2638
2638
|
display: inline-flex;
|
|
2639
2639
|
background-color: ${({
|
|
2640
2640
|
color
|
|
@@ -2747,7 +2747,7 @@ const DotAvatar = ({
|
|
|
2747
2747
|
variant = 'circular',
|
|
2748
2748
|
style
|
|
2749
2749
|
}) => {
|
|
2750
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2750
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1j, className);
|
|
2751
2751
|
const getAvatarColor = () => {
|
|
2752
2752
|
if ((style === null || style === void 0 ? void 0 : style.color) !== undefined) return 'inherit';
|
|
2753
2753
|
if (color) return color;
|
|
@@ -2788,12 +2788,12 @@ const DotAvatar = ({
|
|
|
2788
2788
|
});
|
|
2789
2789
|
};
|
|
2790
2790
|
|
|
2791
|
-
const rootClassName$
|
|
2791
|
+
const rootClassName$1i = 'dot-button';
|
|
2792
2792
|
const StyledButton = styled(Button)`
|
|
2793
2793
|
${({
|
|
2794
2794
|
theme
|
|
2795
2795
|
}) => css`
|
|
2796
|
-
&.${rootClassName$
|
|
2796
|
+
&.${rootClassName$1i} {
|
|
2797
2797
|
background-color: ${theme.palette.figma.primary.normal};
|
|
2798
2798
|
margin: ${theme.spacing(0.5)};
|
|
2799
2799
|
padding: ${theme.spacing(0.75, 2)};
|
|
@@ -2946,7 +2946,7 @@ const DotButton = forwardRef(({
|
|
|
2946
2946
|
autoFocus = false,
|
|
2947
2947
|
children,
|
|
2948
2948
|
className,
|
|
2949
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
2949
|
+
'data-pendoid': dataPendoId = rootClassName$1i,
|
|
2950
2950
|
'data-testid': dataTestId,
|
|
2951
2951
|
disabled = false,
|
|
2952
2952
|
disableInteractive,
|
|
@@ -2964,7 +2964,7 @@ const DotButton = forwardRef(({
|
|
|
2964
2964
|
tooltipPlacement,
|
|
2965
2965
|
type = 'primary'
|
|
2966
2966
|
}, ref) => {
|
|
2967
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2967
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1i, className);
|
|
2968
2968
|
let color;
|
|
2969
2969
|
let variant;
|
|
2970
2970
|
switch (type) {
|
|
@@ -2995,7 +2995,7 @@ const DotButton = forwardRef(({
|
|
|
2995
2995
|
}
|
|
2996
2996
|
return jsx(DotTooltip, {
|
|
2997
2997
|
childrenDisplayStyle: "inline-block",
|
|
2998
|
-
"data-testid": `${dataTestId || rootClassName$
|
|
2998
|
+
"data-testid": `${dataTestId || rootClassName$1i}-tooltip`,
|
|
2999
2999
|
disableInteractive: disableInteractive,
|
|
3000
3000
|
placement: tooltipPlacement,
|
|
3001
3001
|
title: tooltip,
|
|
@@ -3007,7 +3007,7 @@ const DotButton = forwardRef(({
|
|
|
3007
3007
|
},
|
|
3008
3008
|
color: color,
|
|
3009
3009
|
"data-pendoid": dataPendoId,
|
|
3010
|
-
"data-testid": dataTestId || rootClassName$
|
|
3010
|
+
"data-testid": dataTestId || rootClassName$1i,
|
|
3011
3011
|
disableRipple: disableRipple,
|
|
3012
3012
|
disabled: disabled,
|
|
3013
3013
|
endIcon: endIcon,
|
|
@@ -3027,10 +3027,10 @@ const DotButton = forwardRef(({
|
|
|
3027
3027
|
});
|
|
3028
3028
|
});
|
|
3029
3029
|
|
|
3030
|
-
const rootClassName$
|
|
3030
|
+
const rootClassName$1h = 'dot-link';
|
|
3031
3031
|
const StyledLink = styled(Link)`
|
|
3032
3032
|
${() => css`
|
|
3033
|
-
&.${rootClassName$
|
|
3033
|
+
&.${rootClassName$1h} {
|
|
3034
3034
|
cursor: pointer;
|
|
3035
3035
|
|
|
3036
3036
|
&:hover.MuiLink-underlineHover {
|
|
@@ -3046,7 +3046,7 @@ const DotLink = ({
|
|
|
3046
3046
|
children,
|
|
3047
3047
|
className,
|
|
3048
3048
|
color = 'primary',
|
|
3049
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
3049
|
+
'data-pendoid': dataPendoId = rootClassName$1h,
|
|
3050
3050
|
'data-testid': dataTestId,
|
|
3051
3051
|
href,
|
|
3052
3052
|
onClick,
|
|
@@ -3059,7 +3059,7 @@ const DotLink = ({
|
|
|
3059
3059
|
underline = 'always',
|
|
3060
3060
|
variant = 'body1'
|
|
3061
3061
|
}) => {
|
|
3062
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3062
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1h, className);
|
|
3063
3063
|
useEffect(() => {
|
|
3064
3064
|
// Include a console warning if the link is not a string and no ariaLabel is provided
|
|
3065
3065
|
if (!isString$2(children) && !ariaLabel) {
|
|
@@ -3110,7 +3110,7 @@ const CreateUUID = () => {
|
|
|
3110
3110
|
});
|
|
3111
3111
|
};
|
|
3112
3112
|
|
|
3113
|
-
const rootClassName$
|
|
3113
|
+
const rootClassName$1g = 'dot-list';
|
|
3114
3114
|
const listItemRootClass = 'dot-list-item';
|
|
3115
3115
|
const nestedListClassName = 'dot-nested-list';
|
|
3116
3116
|
const nestedDrawerClassName = 'dot-nested-drawer';
|
|
@@ -3118,7 +3118,7 @@ const StyledList = styled(List)`
|
|
|
3118
3118
|
${({
|
|
3119
3119
|
theme
|
|
3120
3120
|
}) => css`
|
|
3121
|
-
&.${rootClassName$
|
|
3121
|
+
&.${rootClassName$1g} {
|
|
3122
3122
|
background: ${theme.palette.figma.background.level0.componentsBackground};
|
|
3123
3123
|
|
|
3124
3124
|
.dot-icon {
|
|
@@ -3182,6 +3182,7 @@ const getChevronIcon = (nestedListType, isOpened) => {
|
|
|
3182
3182
|
// if the sidebar should be open or closed based on what target the user clicks
|
|
3183
3183
|
const excludedClassNames = ['MuiPaper-root', 'MuiTypography-overline'];
|
|
3184
3184
|
const shouldToggleOpen = classNames => {
|
|
3185
|
+
if (!isString$2(classNames)) return false;
|
|
3185
3186
|
return !excludedClassNames.some(className => classNames.includes(className));
|
|
3186
3187
|
};
|
|
3187
3188
|
|
|
@@ -3211,12 +3212,12 @@ const DotListDivider = ({
|
|
|
3211
3212
|
});
|
|
3212
3213
|
};
|
|
3213
3214
|
|
|
3214
|
-
const rootClassName$
|
|
3215
|
+
const rootClassName$1f = 'dot-progress';
|
|
3215
3216
|
const StyledProgress = styled.div`
|
|
3216
3217
|
${({
|
|
3217
3218
|
theme
|
|
3218
3219
|
}) => css`
|
|
3219
|
-
&.${rootClassName$
|
|
3220
|
+
&.${rootClassName$1f} {
|
|
3220
3221
|
line-height: 0;
|
|
3221
3222
|
|
|
3222
3223
|
.dot-progress-with-label-wrapper {
|
|
@@ -3267,7 +3268,7 @@ const DotProgress = ({
|
|
|
3267
3268
|
value,
|
|
3268
3269
|
variant = 'indeterminate'
|
|
3269
3270
|
}) => {
|
|
3270
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3271
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1f, className);
|
|
3271
3272
|
useEffect(() => {
|
|
3272
3273
|
if (!ariaLabel) {
|
|
3273
3274
|
console.warn('a11y: DotProgress must have an ariaLabel to describe the progress component');
|
|
@@ -3333,13 +3334,13 @@ var variables = /*#__PURE__*/Object.freeze({
|
|
|
3333
3334
|
levelTop: levelTop
|
|
3334
3335
|
});
|
|
3335
3336
|
|
|
3336
|
-
const rootClassName$
|
|
3337
|
+
const rootClassName$1e = 'dot-popper';
|
|
3337
3338
|
const arrowClassName = 'MuiPopper-arrow';
|
|
3338
3339
|
const StyledPopper$1 = styled(Popper)`
|
|
3339
3340
|
${({
|
|
3340
3341
|
theme
|
|
3341
3342
|
}) => css`
|
|
3342
|
-
&.${rootClassName$
|
|
3343
|
+
&.${rootClassName$1e} {
|
|
3343
3344
|
font-family: ${theme.typography.fontFamily};
|
|
3344
3345
|
font-size: ${theme.typography.body1.fontSize}px;
|
|
3345
3346
|
|
|
@@ -3398,7 +3399,7 @@ const StyledPopper$1 = styled(Popper)`
|
|
|
3398
3399
|
}
|
|
3399
3400
|
}
|
|
3400
3401
|
|
|
3401
|
-
&.${rootClassName$
|
|
3402
|
+
&.${rootClassName$1e}, &.${rootClassName$1e} > .dot-popper-paper {
|
|
3402
3403
|
background-color: ${theme.palette.figma.background.level1.white};
|
|
3403
3404
|
}
|
|
3404
3405
|
`}
|
|
@@ -3428,12 +3429,12 @@ const StyledArrow = styled('span')`
|
|
|
3428
3429
|
`;
|
|
3429
3430
|
|
|
3430
3431
|
const flyoutMenuClassName = 'dot-flyout-menu';
|
|
3431
|
-
const rootClassName$
|
|
3432
|
+
const rootClassName$1d = 'dot-menu';
|
|
3432
3433
|
const StyledPopper = styled(Popper)`
|
|
3433
3434
|
${({
|
|
3434
3435
|
theme
|
|
3435
3436
|
}) => css`
|
|
3436
|
-
&.${rootClassName$
|
|
3437
|
+
&.${rootClassName$1e} {
|
|
3437
3438
|
font-family: ${theme.typography.fontFamily};
|
|
3438
3439
|
font-size: ${theme.typography.body1.fontSize}px;
|
|
3439
3440
|
|
|
@@ -3443,7 +3444,7 @@ const StyledPopper = styled(Popper)`
|
|
|
3443
3444
|
}) => $zIndex === undefined ? `z-index: ${levelSecond};` : `z-index: ${$zIndex};`}
|
|
3444
3445
|
}
|
|
3445
3446
|
}
|
|
3446
|
-
&.${rootClassName$
|
|
3447
|
+
&.${rootClassName$1d}, &.${rootClassName$1e} {
|
|
3447
3448
|
.MuiPaper-root:not(:empty) {
|
|
3448
3449
|
border: 1px solid ${theme.palette.layer.n100};
|
|
3449
3450
|
}
|
|
@@ -3523,14 +3524,14 @@ const MENU_ITEM_HEIGHT_NORMAL = 48;
|
|
|
3523
3524
|
const MENU_ITEM_HEIGHT_DENSE = 36;
|
|
3524
3525
|
const DEFAULT_MAX_VISIBLE_ITEMS = 7;
|
|
3525
3526
|
|
|
3526
|
-
const rootClassName$
|
|
3527
|
+
const rootClassName$1c = 'dot-ul';
|
|
3527
3528
|
const listItemClassName$1 = 'dot-li';
|
|
3528
3529
|
const listItemWithSubmenuClassName = 'dot-li-with-submenu';
|
|
3529
3530
|
const StyledMenuList = styled(MenuList)`
|
|
3530
3531
|
${({
|
|
3531
3532
|
theme
|
|
3532
3533
|
}) => css`
|
|
3533
|
-
&.${rootClassName$
|
|
3534
|
+
&.${rootClassName$1c} {
|
|
3534
3535
|
background: ${theme.palette.figma.background.level1.white};
|
|
3535
3536
|
|
|
3536
3537
|
.dot-li {
|
|
@@ -3632,7 +3633,7 @@ const DotMenuList = forwardRef(({
|
|
|
3632
3633
|
onSubMenuCreate,
|
|
3633
3634
|
selectedKey
|
|
3634
3635
|
}, ref) => {
|
|
3635
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3636
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1c, className);
|
|
3636
3637
|
const [activeSubmenu, setActiveSubmenu] = useState(null);
|
|
3637
3638
|
const [subItemAnchorEl, setSubItemAnchorEl] = useState(null);
|
|
3638
3639
|
const openSubmenu = (target, itemKey) => {
|
|
@@ -3744,7 +3745,7 @@ const DotMenu = ({
|
|
|
3744
3745
|
open = false,
|
|
3745
3746
|
selectedKey
|
|
3746
3747
|
}) => {
|
|
3747
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3748
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1d, className, loading ? 'loading' : '');
|
|
3748
3749
|
const isSubmenu = checkIfSubmenu(anchorEl);
|
|
3749
3750
|
const hasSubItems = checkForSubItems(menuItems);
|
|
3750
3751
|
// Timeout object is customizable when Menu component is either submenu
|
|
@@ -3832,12 +3833,12 @@ const DotMenu = ({
|
|
|
3832
3833
|
});
|
|
3833
3834
|
};
|
|
3834
3835
|
|
|
3835
|
-
const rootClassName$
|
|
3836
|
+
const rootClassName$1b = 'dot-drawer';
|
|
3836
3837
|
const StyledDrawer = styled(Drawer)`
|
|
3837
3838
|
${({
|
|
3838
3839
|
theme
|
|
3839
3840
|
}) => css`
|
|
3840
|
-
&.${rootClassName$
|
|
3841
|
+
&.${rootClassName$1b} .MuiBackdrop-root {
|
|
3841
3842
|
background-color: ${theme.palette.figma.overlay.default};
|
|
3842
3843
|
}
|
|
3843
3844
|
|
|
@@ -3856,12 +3857,12 @@ const StyledDrawer = styled(Drawer)`
|
|
|
3856
3857
|
`}
|
|
3857
3858
|
`;
|
|
3858
3859
|
|
|
3859
|
-
const rootClassName$
|
|
3860
|
+
const rootClassName$1a = 'dot-drawer-header';
|
|
3860
3861
|
const StyleDrawerHeader = styled.div`
|
|
3861
3862
|
${({
|
|
3862
3863
|
theme
|
|
3863
3864
|
}) => css`
|
|
3864
|
-
&.${rootClassName$
|
|
3865
|
+
&.${rootClassName$1a} {
|
|
3865
3866
|
padding: ${theme.spacing(0, 0, 2)};
|
|
3866
3867
|
display: flex;
|
|
3867
3868
|
align-items: center;
|
|
@@ -3872,13 +3873,13 @@ const StyleDrawerHeader = styled.div`
|
|
|
3872
3873
|
`}
|
|
3873
3874
|
`;
|
|
3874
3875
|
|
|
3875
|
-
const rootClassName$
|
|
3876
|
+
const rootClassName$19 = 'dot-icon-btn';
|
|
3876
3877
|
const StyledIconButton = styled(IconButton)`
|
|
3877
3878
|
${({
|
|
3878
3879
|
theme,
|
|
3879
3880
|
color
|
|
3880
3881
|
}) => css`
|
|
3881
|
-
&.${rootClassName$
|
|
3882
|
+
&.${rootClassName$19} {
|
|
3882
3883
|
${color === 'inherit' ? css`
|
|
3883
3884
|
color: inherit;
|
|
3884
3885
|
` : ''}
|
|
@@ -3964,7 +3965,7 @@ const DotIconButton = ({
|
|
|
3964
3965
|
ariaRole = 'button',
|
|
3965
3966
|
className,
|
|
3966
3967
|
color = 'inherit',
|
|
3967
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
3968
|
+
'data-pendoid': dataPendoId = rootClassName$19,
|
|
3968
3969
|
'data-testid': dataTestId,
|
|
3969
3970
|
disableInteractive,
|
|
3970
3971
|
disableRipple = false,
|
|
@@ -3978,7 +3979,7 @@ const DotIconButton = ({
|
|
|
3978
3979
|
tooltipPlacement
|
|
3979
3980
|
}) => {
|
|
3980
3981
|
const rippleClassName = disableRipple ? 'ripple-disabled' : '';
|
|
3981
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3982
|
+
const rootClasses = useStylesWithRootClass(rootClassName$19, rippleClassName, `shape-${shape}`, className);
|
|
3982
3983
|
return jsx(DotTooltip, {
|
|
3983
3984
|
childrenDisplayStyle: "inline-block",
|
|
3984
3985
|
"data-testid": "icon-button-tooltip",
|
|
@@ -4015,7 +4016,7 @@ const DotDrawerHeader = ({
|
|
|
4015
4016
|
onClose,
|
|
4016
4017
|
variant
|
|
4017
4018
|
}) => {
|
|
4018
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
4019
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1a, className);
|
|
4019
4020
|
return jsxs(StyleDrawerHeader, {
|
|
4020
4021
|
"aria-label": ariaLabel,
|
|
4021
4022
|
"aria-level": 2,
|
|
@@ -4032,10 +4033,10 @@ const DotDrawerHeader = ({
|
|
|
4032
4033
|
});
|
|
4033
4034
|
};
|
|
4034
4035
|
|
|
4035
|
-
const rootClassName$
|
|
4036
|
+
const rootClassName$18 = 'dot-drawer-body';
|
|
4036
4037
|
const StyleDrawerBody = styled.div`
|
|
4037
4038
|
${() => css`
|
|
4038
|
-
&.${rootClassName$
|
|
4039
|
+
&.${rootClassName$18} {
|
|
4039
4040
|
display: flex;
|
|
4040
4041
|
.dot-drawer-close-button {
|
|
4041
4042
|
align-self: self-start;
|
|
@@ -4056,7 +4057,7 @@ const DotDrawerBody = ({
|
|
|
4056
4057
|
onClose,
|
|
4057
4058
|
variant
|
|
4058
4059
|
}) => {
|
|
4059
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
4060
|
+
const rootClasses = useStylesWithRootClass(rootClassName$18, className);
|
|
4060
4061
|
return jsxs(StyleDrawerBody, {
|
|
4061
4062
|
"aria-label": ariaLabel,
|
|
4062
4063
|
className: rootClasses,
|
|
@@ -4071,12 +4072,12 @@ const DotDrawerBody = ({
|
|
|
4071
4072
|
});
|
|
4072
4073
|
};
|
|
4073
4074
|
|
|
4074
|
-
const rootClassName$
|
|
4075
|
+
const rootClassName$17 = 'dot-drawer-footer';
|
|
4075
4076
|
const StyleDrawerFooter = styled.div`
|
|
4076
4077
|
${({
|
|
4077
4078
|
theme
|
|
4078
4079
|
}) => css`
|
|
4079
|
-
&.${rootClassName$
|
|
4080
|
+
&.${rootClassName$17} {
|
|
4080
4081
|
padding: ${theme.spacing(2, 0, 0)};
|
|
4081
4082
|
}
|
|
4082
4083
|
`}
|
|
@@ -4089,7 +4090,7 @@ const DotDrawerFooter = ({
|
|
|
4089
4090
|
className,
|
|
4090
4091
|
'data-testid': dataTestId
|
|
4091
4092
|
}) => {
|
|
4092
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
4093
|
+
const rootClasses = useStylesWithRootClass(rootClassName$17, className);
|
|
4093
4094
|
return jsx(StyleDrawerFooter, {
|
|
4094
4095
|
"aria-label": ariaLabel,
|
|
4095
4096
|
className: rootClasses,
|
|
@@ -4105,7 +4106,7 @@ const DotDrawer = ({
|
|
|
4105
4106
|
ariaRole = 'dialog',
|
|
4106
4107
|
className,
|
|
4107
4108
|
children,
|
|
4108
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
4109
|
+
'data-pendoid': dataPendoId = rootClassName$1b,
|
|
4109
4110
|
'data-testid': dataTestId,
|
|
4110
4111
|
drawerBodyProps,
|
|
4111
4112
|
drawerFooterProps,
|
|
@@ -4128,7 +4129,7 @@ const DotDrawer = ({
|
|
|
4128
4129
|
onClose(event);
|
|
4129
4130
|
}
|
|
4130
4131
|
};
|
|
4131
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
4132
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1b, className);
|
|
4132
4133
|
const backdropEnabled = variant === 'temporary' && !(ModalProps === null || ModalProps === void 0 ? void 0 : ModalProps.hideBackdrop);
|
|
4133
4134
|
const headerExists = !!drawerHeaderProps;
|
|
4134
4135
|
const bodyPendoId = drawerBodyProps ? drawerBodyProps['data-pendoid'] : 'drawer-body';
|
|
@@ -4603,7 +4604,7 @@ const DotList = ({
|
|
|
4603
4604
|
nestedListType = 'expandable',
|
|
4604
4605
|
width = 240
|
|
4605
4606
|
}) => {
|
|
4606
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
4607
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1g, className);
|
|
4607
4608
|
const listWidth = typeof width === 'number' ? `${width}px` : width;
|
|
4608
4609
|
const listRef = useRef();
|
|
4609
4610
|
const disableCloseOnClickAway = !nestedListCloseOnClickAway && nestedListType === 'expandable';
|
|
@@ -4703,12 +4704,12 @@ const DotList = ({
|
|
|
4703
4704
|
});
|
|
4704
4705
|
};
|
|
4705
4706
|
|
|
4706
|
-
const rootClassName$
|
|
4707
|
+
const rootClassName$16 = 'dot-copy-button';
|
|
4707
4708
|
const StyledCopyButton = styled.span`
|
|
4708
4709
|
${({
|
|
4709
4710
|
theme
|
|
4710
4711
|
}) => css`
|
|
4711
|
-
&.${rootClassName$
|
|
4712
|
+
&.${rootClassName$16} .copied-to-clipboard {
|
|
4712
4713
|
color: ${theme.palette.figma.success.normal};
|
|
4713
4714
|
|
|
4714
4715
|
&.MuiIcon-fontSizeSmall.button-size-small {
|
|
@@ -4734,7 +4735,7 @@ const DotCopyButton = ({
|
|
|
4734
4735
|
color = 'inherit',
|
|
4735
4736
|
copiedTooltip = 'Copied!',
|
|
4736
4737
|
copyTooltip = 'Copy to clipboard',
|
|
4737
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
4738
|
+
'data-pendoid': dataPendoId = rootClassName$16,
|
|
4738
4739
|
'data-testid': dataTestId = 'dot-copy-button',
|
|
4739
4740
|
disableInteractive,
|
|
4740
4741
|
disabled = false,
|
|
@@ -4783,7 +4784,7 @@ const DotCopyButton = ({
|
|
|
4783
4784
|
return false;
|
|
4784
4785
|
}, [value, showCopiedIcon, disabled, onClick]);
|
|
4785
4786
|
return jsxs(StyledCopyButton, {
|
|
4786
|
-
className: rootClassName$
|
|
4787
|
+
className: rootClassName$16,
|
|
4787
4788
|
"data-testid": dataTestId,
|
|
4788
4789
|
children: [!timedShowCopiedIcon && jsx(DotIconButton, {
|
|
4789
4790
|
ariaLabel: ariaLabel,
|
|
@@ -4890,7 +4891,7 @@ const DotInputText = ({
|
|
|
4890
4891
|
autoFocus,
|
|
4891
4892
|
className,
|
|
4892
4893
|
defaultValue,
|
|
4893
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
4894
|
+
'data-pendoid': dataPendoId = rootClassName$1p,
|
|
4894
4895
|
'data-testid': dataTestId,
|
|
4895
4896
|
disabled = false,
|
|
4896
4897
|
error = false,
|
|
@@ -4939,7 +4940,7 @@ const DotInputText = ({
|
|
|
4939
4940
|
const internalInputRef = useRef(null);
|
|
4940
4941
|
const textFieldInputRef = inputRef || internalInputRef;
|
|
4941
4942
|
const [inputTextState, setInputTextState] = useState(getInitialState(value));
|
|
4942
|
-
const rootStyles = useStylesWithRootClass(rootClassName$
|
|
4943
|
+
const rootStyles = useStylesWithRootClass(rootClassName$1p, hasError, hasWarning, hasSuccess, isAiEnabled, readOnly && readOnlyClassName$1);
|
|
4943
4944
|
useEffect(() => {
|
|
4944
4945
|
if (value !== inputTextState.inputValue) {
|
|
4945
4946
|
setInputTextState(getInitialState(value, defaultValue));
|
|
@@ -5081,10 +5082,10 @@ const DotInputText = ({
|
|
|
5081
5082
|
});
|
|
5082
5083
|
};
|
|
5083
5084
|
|
|
5084
|
-
const rootClassName$
|
|
5085
|
+
const rootClassName$15 = 'dot-search-input';
|
|
5085
5086
|
const StyledSearchInput = styled.span`
|
|
5086
5087
|
${() => css`
|
|
5087
|
-
&.${rootClassName$
|
|
5088
|
+
&.${rootClassName$15} {
|
|
5088
5089
|
}
|
|
5089
5090
|
`}
|
|
5090
5091
|
`;
|
|
@@ -5101,7 +5102,7 @@ function SearchInput({
|
|
|
5101
5102
|
tooltip = null,
|
|
5102
5103
|
value
|
|
5103
5104
|
}) {
|
|
5104
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
5105
|
+
const rootClasses = useStylesWithRootClass(rootClassName$15, className);
|
|
5105
5106
|
const [searchText, setSearchText] = useState(value);
|
|
5106
5107
|
let previousSearchText = '';
|
|
5107
5108
|
const handleChange = useCallback(event => {
|
|
@@ -5357,12 +5358,12 @@ const recentAppInstancesSetter = (latestInstance, maxRecentItems
|
|
|
5357
5358
|
};
|
|
5358
5359
|
};
|
|
5359
5360
|
|
|
5360
|
-
const rootClassName$
|
|
5361
|
+
const rootClassName$14 = 'dot-app-switcher';
|
|
5361
5362
|
const StyledAppSwitcher = styled(DotDrawer)`
|
|
5362
5363
|
${({
|
|
5363
5364
|
theme
|
|
5364
5365
|
}) => css`
|
|
5365
|
-
&.${rootClassName$
|
|
5366
|
+
&.${rootClassName$14} {
|
|
5366
5367
|
.dot-drawer-paper {
|
|
5367
5368
|
padding: 0;
|
|
5368
5369
|
width: 382px;
|
|
@@ -5472,7 +5473,7 @@ const DotAppSwitcherView = ({
|
|
|
5472
5473
|
if (dotCoreApiContext !== null) {
|
|
5473
5474
|
setSelectedAppType = dotCoreApiContext.setSelectedAppSwitcherAppType;
|
|
5474
5475
|
}
|
|
5475
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
5476
|
+
const rootClasses = useStylesWithRootClass(rootClassName$14, className);
|
|
5476
5477
|
const [appTypeMap, setAppTypeMap] = useState();
|
|
5477
5478
|
const [appTypeLabels, setAppTypeLabels] = useState();
|
|
5478
5479
|
const [appTypeMenuItems, setAppTypeMenuItems] = useState();
|
|
@@ -5850,12 +5851,12 @@ var SvgLogoDigitalAiWhite = function SvgLogoDigitalAiWhite(_ref, ref) {
|
|
|
5850
5851
|
};
|
|
5851
5852
|
var ForwardRef = /*#__PURE__*/forwardRef(SvgLogoDigitalAiWhite);
|
|
5852
5853
|
|
|
5853
|
-
const rootClassName$
|
|
5854
|
+
const rootClassName$13 = 'dot-sidebar';
|
|
5854
5855
|
const StyledSidebar = styled.aside`
|
|
5855
5856
|
${({
|
|
5856
5857
|
theme
|
|
5857
5858
|
}) => css`
|
|
5858
|
-
&.${rootClassName$
|
|
5859
|
+
&.${rootClassName$13} {
|
|
5859
5860
|
align-items: stretch;
|
|
5860
5861
|
background: ${theme.palette.figma.background.level1.white};
|
|
5861
5862
|
border-width: 0 1px;
|
|
@@ -6149,10 +6150,10 @@ const StyledSidebar = styled.aside`
|
|
|
6149
6150
|
`}
|
|
6150
6151
|
`;
|
|
6151
6152
|
|
|
6152
|
-
const rootClassName$
|
|
6153
|
+
const rootClassName$12 = 'dot-truncate-with-tooltip';
|
|
6153
6154
|
const StyledTruncateWithTooltip = styled(Tooltip)`
|
|
6154
6155
|
${() => css`
|
|
6155
|
-
&.${rootClassName$
|
|
6156
|
+
&.${rootClassName$12} {
|
|
6156
6157
|
display: block;
|
|
6157
6158
|
overflow: hidden;
|
|
6158
6159
|
white-space: nowrap;
|
|
@@ -6183,7 +6184,7 @@ const DotTruncateWithTooltip = ({
|
|
|
6183
6184
|
label,
|
|
6184
6185
|
width
|
|
6185
6186
|
}) => {
|
|
6186
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6187
|
+
const rootClasses = useStylesWithRootClass(rootClassName$12, className, charactersLimit ? 'dot-characters-limit' : '');
|
|
6187
6188
|
return jsx(StyledTruncateWithTooltip, {
|
|
6188
6189
|
"aria-label": ariaLabel,
|
|
6189
6190
|
arrow: arrow,
|
|
@@ -6297,7 +6298,7 @@ const DotSidebar = ({
|
|
|
6297
6298
|
keys: collapseKeys
|
|
6298
6299
|
}, toggleNavCollapseState, [isOpen, collapsable]);
|
|
6299
6300
|
const sidebarClasses = useStylesWithRootClass('side-nav', openClass);
|
|
6300
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6301
|
+
const rootClasses = useStylesWithRootClass(rootClassName$13, openClass, className);
|
|
6301
6302
|
return jsxs(StyledSidebar, {
|
|
6302
6303
|
"aria-label": ariaLabel,
|
|
6303
6304
|
className: rootClasses,
|
|
@@ -6372,12 +6373,12 @@ const DotSidebar = ({
|
|
|
6372
6373
|
});
|
|
6373
6374
|
};
|
|
6374
6375
|
|
|
6375
|
-
const rootClassName$
|
|
6376
|
+
const rootClassName$11 = 'dot-badge';
|
|
6376
6377
|
const StyledBadge = styled(Badge)`
|
|
6377
6378
|
${({
|
|
6378
6379
|
theme
|
|
6379
6380
|
}) => css`
|
|
6380
|
-
&.${rootClassName$
|
|
6381
|
+
&.${rootClassName$11} {
|
|
6381
6382
|
color: ${theme.palette.figma.typography.black};
|
|
6382
6383
|
word-break: normal;
|
|
6383
6384
|
|
|
@@ -6412,7 +6413,7 @@ const DotBadge = ({
|
|
|
6412
6413
|
overlap,
|
|
6413
6414
|
variant = 'dot'
|
|
6414
6415
|
}) => {
|
|
6415
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6416
|
+
const rootClasses = useStylesWithRootClass(rootClassName$11, className);
|
|
6416
6417
|
return jsx(StyledBadge, {
|
|
6417
6418
|
"$badgeColor": badgeColor,
|
|
6418
6419
|
anchorOrigin: {
|
|
@@ -6434,7 +6435,7 @@ const DotBadge = ({
|
|
|
6434
6435
|
});
|
|
6435
6436
|
};
|
|
6436
6437
|
|
|
6437
|
-
const rootClassName
|
|
6438
|
+
const rootClassName$10 = 'dot-app-toolbar';
|
|
6438
6439
|
const denseClassName = 'dense';
|
|
6439
6440
|
const StyledMainMenu = styled(DotDrawer)`
|
|
6440
6441
|
${({
|
|
@@ -6474,7 +6475,7 @@ const StyledAppToolbar = styled.header`
|
|
|
6474
6475
|
${({
|
|
6475
6476
|
theme
|
|
6476
6477
|
}) => css`
|
|
6477
|
-
&.${rootClassName
|
|
6478
|
+
&.${rootClassName$10} {
|
|
6478
6479
|
align-items: center;
|
|
6479
6480
|
background: ${theme.palette.figma.appToolbar.background};
|
|
6480
6481
|
border-bottom: 4px solid ${theme.palette.figma.border.default};
|
|
@@ -6603,7 +6604,7 @@ const DotAppToolbar = ({
|
|
|
6603
6604
|
const displayAppLogo = appLogo || appLogoSmall;
|
|
6604
6605
|
const mainMenuRef = useRef(null);
|
|
6605
6606
|
const denseClass = dense ? denseClassName : '';
|
|
6606
|
-
const rootClasses = useStylesWithRootClass(rootClassName
|
|
6607
|
+
const rootClasses = useStylesWithRootClass(rootClassName$10, className, denseClass, showMainMenu ? '' : 'without-menu-icon');
|
|
6607
6608
|
const mainMenuClasses = useStylesWithRootClass('dot-main-menu', denseClass, menuOpen ? 'open' : '');
|
|
6608
6609
|
const targetBreakpoint = useMediaQuery(theme => theme.breakpoints.up('lg'));
|
|
6609
6610
|
useEffect(() => {
|
|
@@ -6755,12 +6756,12 @@ const DotAppToolbar = ({
|
|
|
6755
6756
|
}) : appToolbar;
|
|
6756
6757
|
};
|
|
6757
6758
|
|
|
6758
|
-
const rootClassName
|
|
6759
|
+
const rootClassName$$ = 'dot-chip';
|
|
6759
6760
|
const StyledChip = styled(Chip)`
|
|
6760
6761
|
${({
|
|
6761
6762
|
theme
|
|
6762
6763
|
}) => css`
|
|
6763
|
-
&.${rootClassName
|
|
6764
|
+
&.${rootClassName$$} {
|
|
6764
6765
|
background: ${theme.palette.figma.neutral.normal};
|
|
6765
6766
|
border-color: ${theme.palette.figma.border.darker};
|
|
6766
6767
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -6866,7 +6867,7 @@ const DotChip = ({
|
|
|
6866
6867
|
charactersLimit = DEFAULT_CHARACTERS_LIMIT,
|
|
6867
6868
|
children,
|
|
6868
6869
|
className,
|
|
6869
|
-
'data-pendoid': dataPendoId = rootClassName
|
|
6870
|
+
'data-pendoid': dataPendoId = rootClassName$$,
|
|
6870
6871
|
'data-testid': dataTestId,
|
|
6871
6872
|
disabled = false,
|
|
6872
6873
|
error = false,
|
|
@@ -6880,7 +6881,7 @@ const DotChip = ({
|
|
|
6880
6881
|
tooltipProps
|
|
6881
6882
|
}) => {
|
|
6882
6883
|
const errorClass = error ? 'Mui-error' : '';
|
|
6883
|
-
const rootClasses = useStylesWithRootClass(rootClassName
|
|
6884
|
+
const rootClasses = useStylesWithRootClass(rootClassName$$, className, errorClass);
|
|
6884
6885
|
const isTruncated = charactersLimit > 0 && children.length > charactersLimit;
|
|
6885
6886
|
const getChipLabelWithTooltip = label => jsx(DotTooltip, Object.assign({}, tooltipProps, {
|
|
6886
6887
|
hoverVisibility: "always",
|
|
@@ -6916,7 +6917,7 @@ const DotChip = ({
|
|
|
6916
6917
|
});
|
|
6917
6918
|
};
|
|
6918
6919
|
|
|
6919
|
-
const rootClassName$
|
|
6920
|
+
const rootClassName$_ = 'dot-autocomplete';
|
|
6920
6921
|
const inputRootClassName = 'dot-input-root';
|
|
6921
6922
|
const inputMediumClassName = 'dot-input-medium';
|
|
6922
6923
|
const inputAiClassName = 'dot-input-ai';
|
|
@@ -6924,7 +6925,7 @@ const StyledAutocomplete = styled(Autocomplete)`
|
|
|
6924
6925
|
${({
|
|
6925
6926
|
theme
|
|
6926
6927
|
}) => css`
|
|
6927
|
-
&.${rootClassName$
|
|
6928
|
+
&.${rootClassName$_} {
|
|
6928
6929
|
&.${inputMediumClassName} .dot-text-field .${inputRootClassName} {
|
|
6929
6930
|
height: 56px;
|
|
6930
6931
|
padding-left: ${theme.spacing(2)};
|
|
@@ -7030,11 +7031,14 @@ const isEmptyValue = value => {
|
|
|
7030
7031
|
return !value;
|
|
7031
7032
|
}
|
|
7032
7033
|
};
|
|
7033
|
-
const getRootClassNames = (className, size) => useStylesWithRootClass(rootClassName$
|
|
7034
|
-
const getTextFieldRootClassNames = (textFieldWarningClassName, isReadOnly) => useStylesWithRootClass(rootClassName$
|
|
7034
|
+
const getRootClassNames = (className, size) => useStylesWithRootClass(rootClassName$_, size === 'medium' && inputMediumClassName, className);
|
|
7035
|
+
const getTextFieldRootClassNames = (textFieldWarningClassName, isReadOnly) => useStylesWithRootClass(rootClassName$1p, isReadOnly && readOnlyClassName$1, textFieldWarningClassName);
|
|
7035
7036
|
const getInputRootClassNames = isDense => useStylesWithRootClass(inputRootClassName, !isDense && inputMediumClassName);
|
|
7036
7037
|
const getDefaultAutoCompleteValue = (hasMultiple, defaultValue) => hasMultiple && isString$2(defaultValue) ? [defaultValue] : defaultValue;
|
|
7037
7038
|
const getAutoCompleteGroupBy = group => group ? option => option.group : undefined;
|
|
7039
|
+
const isTitleEqual = (option, value) => {
|
|
7040
|
+
return typeof value === 'string' ? option.title === value : option.title === (value === null || value === void 0 ? void 0 : value.title);
|
|
7041
|
+
};
|
|
7038
7042
|
|
|
7039
7043
|
function ariaLabelOrAlternates(ariaLabel, label, placeholder) {
|
|
7040
7044
|
return ariaLabel || label || placeholder;
|
|
@@ -7049,7 +7053,7 @@ const DotAutoComplete = ({
|
|
|
7049
7053
|
autoFocus,
|
|
7050
7054
|
autoHighlight,
|
|
7051
7055
|
className,
|
|
7052
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
7056
|
+
'data-pendoid': dataPendoId = rootClassName$_,
|
|
7053
7057
|
'data-testid': dataTestId,
|
|
7054
7058
|
defaultValue,
|
|
7055
7059
|
dense = true,
|
|
@@ -7067,7 +7071,7 @@ const DotAutoComplete = ({
|
|
|
7067
7071
|
inputId,
|
|
7068
7072
|
inputRef,
|
|
7069
7073
|
inputValue,
|
|
7070
|
-
isOptionEqualToValue,
|
|
7074
|
+
isOptionEqualToValue = isTitleEqual,
|
|
7071
7075
|
label,
|
|
7072
7076
|
loading,
|
|
7073
7077
|
maxHeight,
|
|
@@ -7114,7 +7118,7 @@ const DotAutoComplete = ({
|
|
|
7114
7118
|
const rootClasses = useStylesWithRootClass(getRootClassNames(className, size), ai ? inputAiClassName : '');
|
|
7115
7119
|
const textFieldRootClasses = getTextFieldRootClassNames(textFieldWarningClassName, readOnly);
|
|
7116
7120
|
const inputRootClasses = getInputRootClassNames(dense);
|
|
7117
|
-
const popperClasses = useStylesWithRootClass(rootClassName$
|
|
7121
|
+
const popperClasses = useStylesWithRootClass(rootClassName$1e, popperClassName);
|
|
7118
7122
|
let highlightedOption = null;
|
|
7119
7123
|
let textFieldInput;
|
|
7120
7124
|
const textFieldRef = element => {
|
|
@@ -7441,10 +7445,10 @@ const DotAutoComplete = ({
|
|
|
7441
7445
|
});
|
|
7442
7446
|
};
|
|
7443
7447
|
|
|
7444
|
-
const rootClassName$
|
|
7448
|
+
const rootClassName$Z = 'dot-avatar-group';
|
|
7445
7449
|
const StyledAvatarGroup = styled(AvatarGroup)`
|
|
7446
7450
|
${() => css`
|
|
7447
|
-
&.${rootClassName$
|
|
7451
|
+
&.${rootClassName$Z} {
|
|
7448
7452
|
justify-content: flex-end;
|
|
7449
7453
|
|
|
7450
7454
|
.MuiAvatar-root {
|
|
@@ -7463,7 +7467,7 @@ const DotAvatarGroup = ({
|
|
|
7463
7467
|
max = 3,
|
|
7464
7468
|
spacing = 'medium'
|
|
7465
7469
|
}) => {
|
|
7466
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7470
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Z, className);
|
|
7467
7471
|
return jsx(StyledAvatarGroup, {
|
|
7468
7472
|
"aria-label": ariaLabel,
|
|
7469
7473
|
classes: {
|
|
@@ -7478,14 +7482,14 @@ const DotAvatarGroup = ({
|
|
|
7478
7482
|
});
|
|
7479
7483
|
};
|
|
7480
7484
|
|
|
7481
|
-
const rootClassName$
|
|
7485
|
+
const rootClassName$Y = 'dot-avatar-with-details';
|
|
7482
7486
|
const StyledAvatarWithDetails = styled.div`
|
|
7483
7487
|
${({
|
|
7484
7488
|
theme,
|
|
7485
7489
|
$maxSubtitleLines,
|
|
7486
7490
|
$maxTitleLines
|
|
7487
7491
|
}) => css`
|
|
7488
|
-
&.${rootClassName$
|
|
7492
|
+
&.${rootClassName$Y} {
|
|
7489
7493
|
gap: ${theme.spacing(2)};
|
|
7490
7494
|
display: flex;
|
|
7491
7495
|
align-items: center;
|
|
@@ -7521,12 +7525,12 @@ const DotAvatarWithDetails = ({
|
|
|
7521
7525
|
ariaLabel,
|
|
7522
7526
|
avatar,
|
|
7523
7527
|
className,
|
|
7524
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
7528
|
+
'data-pendoid': dataPendoId = rootClassName$Y,
|
|
7525
7529
|
'data-testid': dataTestId,
|
|
7526
7530
|
subtitle,
|
|
7527
7531
|
title
|
|
7528
7532
|
}) => {
|
|
7529
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7533
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Y, className);
|
|
7530
7534
|
const titleClasses = useStylesWithRootClass('dot-avatar-with-details-title', title.maxLines ? 'max-lines-clamp' : '');
|
|
7531
7535
|
const subtitleClasses = useStylesWithRootClass('dot-avatar-with-details-subtitle', (subtitle === null || subtitle === void 0 ? void 0 : subtitle.maxLines) ? 'max-lines-clamp' : '');
|
|
7532
7536
|
return jsxs(StyledAvatarWithDetails, {
|
|
@@ -7561,13 +7565,13 @@ const DotAvatarWithDetails = ({
|
|
|
7561
7565
|
});
|
|
7562
7566
|
};
|
|
7563
7567
|
|
|
7564
|
-
const rootClassName$
|
|
7568
|
+
const rootClassName$X = 'dot-breadcrumbs';
|
|
7565
7569
|
const breadcrumbsWrapperClass = 'dot-breadcrumbs-wrapper';
|
|
7566
7570
|
const StyledBreadcrumbsWrapper = styled.div`
|
|
7567
7571
|
${({
|
|
7568
7572
|
theme
|
|
7569
7573
|
}) => css`
|
|
7570
|
-
&.${rootClassName$
|
|
7574
|
+
&.${rootClassName$X} {
|
|
7571
7575
|
overflow: hidden;
|
|
7572
7576
|
|
|
7573
7577
|
.dot-breadcrumbs-menu {
|
|
@@ -7587,7 +7591,7 @@ const StyledBreadcrumbs = styled(Breadcrumbs)`
|
|
|
7587
7591
|
${({
|
|
7588
7592
|
theme
|
|
7589
7593
|
}) => css`
|
|
7590
|
-
&.${rootClassName$
|
|
7594
|
+
&.${rootClassName$X} {
|
|
7591
7595
|
margin-bottom: 0;
|
|
7592
7596
|
|
|
7593
7597
|
.MuiBreadcrumbs-ol {
|
|
@@ -7915,7 +7919,7 @@ const DotBreadcrumbs = ({
|
|
|
7915
7919
|
children: [jsx(StyledBreadcrumbs, {
|
|
7916
7920
|
"aria-label": "breadcrumb",
|
|
7917
7921
|
classes: {
|
|
7918
|
-
root: rootClassName$
|
|
7922
|
+
root: rootClassName$X,
|
|
7919
7923
|
ol: 'dot-ol',
|
|
7920
7924
|
li: 'dot-li'
|
|
7921
7925
|
},
|
|
@@ -7946,14 +7950,14 @@ const DotBreadcrumbs = ({
|
|
|
7946
7950
|
});
|
|
7947
7951
|
};
|
|
7948
7952
|
|
|
7949
|
-
const rootClassName$
|
|
7953
|
+
const rootClassName$W = 'dot-button-toggle';
|
|
7950
7954
|
// TODO: need to update ripple color
|
|
7951
7955
|
// https://github.com/mui/material-ui/issues/28543
|
|
7952
7956
|
const StyledToggleButtonGroup = styled(ToggleButtonGroup)`
|
|
7953
7957
|
${({
|
|
7954
7958
|
theme
|
|
7955
7959
|
}) => css`
|
|
7956
|
-
&.${rootClassName$
|
|
7960
|
+
&.${rootClassName$W} {
|
|
7957
7961
|
button:not(.MuiToggleButton-sizeLarge):not(.MuiToggleButton-sizeSmall) {
|
|
7958
7962
|
/* Override height for medium size */
|
|
7959
7963
|
height: ${theme.spacing(5)};
|
|
@@ -8076,7 +8080,7 @@ const DotButtonToggle = ({
|
|
|
8076
8080
|
buttonOptions,
|
|
8077
8081
|
className,
|
|
8078
8082
|
color,
|
|
8079
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
8083
|
+
'data-pendoid': dataPendoId = rootClassName$W,
|
|
8080
8084
|
'data-testid': dataTestId = 'dot-toggle',
|
|
8081
8085
|
disableFocusRipple = false,
|
|
8082
8086
|
disableRipple = false,
|
|
@@ -8086,7 +8090,7 @@ const DotButtonToggle = ({
|
|
|
8086
8090
|
size = 'medium',
|
|
8087
8091
|
value
|
|
8088
8092
|
}) => {
|
|
8089
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8093
|
+
const rootClasses = useStylesWithRootClass(rootClassName$W, className);
|
|
8090
8094
|
const renderToggleButton = ({
|
|
8091
8095
|
ariaLabel: optionAriaLabel,
|
|
8092
8096
|
badgeContent: optionBadgeContent,
|
|
@@ -8171,12 +8175,12 @@ const TooltipToggleButton = forwardRef((_a, ref) => {
|
|
|
8171
8175
|
}));
|
|
8172
8176
|
});
|
|
8173
8177
|
|
|
8174
|
-
const rootClassName$
|
|
8178
|
+
const rootClassName$V = 'dot-card';
|
|
8175
8179
|
const StyledCard = styled(Card)`
|
|
8176
8180
|
${({
|
|
8177
8181
|
theme
|
|
8178
8182
|
}) => css`
|
|
8179
|
-
&.${rootClassName$
|
|
8183
|
+
&.${rootClassName$V} {
|
|
8180
8184
|
background-color: ${theme.palette.figma.background.level1.white};
|
|
8181
8185
|
}
|
|
8182
8186
|
`}
|
|
@@ -8188,7 +8192,7 @@ const DotCard = ({
|
|
|
8188
8192
|
className,
|
|
8189
8193
|
'data-testid': dataTestId
|
|
8190
8194
|
}) => {
|
|
8191
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8195
|
+
const rootClasses = useStylesWithRootClass(rootClassName$V, className);
|
|
8192
8196
|
return jsx(StyledCard, {
|
|
8193
8197
|
"aria-label": ariaLabel,
|
|
8194
8198
|
classes: {
|
|
@@ -8217,12 +8221,12 @@ const DotCardContent = ({
|
|
|
8217
8221
|
});
|
|
8218
8222
|
};
|
|
8219
8223
|
|
|
8220
|
-
const rootClassName$
|
|
8224
|
+
const rootClassName$U = 'dot-card-footer';
|
|
8221
8225
|
const StyledDiv = styled.div`
|
|
8222
8226
|
${({
|
|
8223
8227
|
theme
|
|
8224
8228
|
}) => css`
|
|
8225
|
-
&.${rootClassName$
|
|
8229
|
+
&.${rootClassName$U} {
|
|
8226
8230
|
padding: ${theme.spacing(2)};
|
|
8227
8231
|
}
|
|
8228
8232
|
`}
|
|
@@ -8234,7 +8238,7 @@ const DotCardFooter = ({
|
|
|
8234
8238
|
className,
|
|
8235
8239
|
'data-testid': dataTestId
|
|
8236
8240
|
}) => {
|
|
8237
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8241
|
+
const rootClasses = useStylesWithRootClass(rootClassName$U, className);
|
|
8238
8242
|
return jsx(StyledDiv, {
|
|
8239
8243
|
"aria-label": ariaLabel,
|
|
8240
8244
|
className: rootClasses,
|
|
@@ -8243,13 +8247,13 @@ const DotCardFooter = ({
|
|
|
8243
8247
|
});
|
|
8244
8248
|
};
|
|
8245
8249
|
|
|
8246
|
-
const rootClassName$
|
|
8250
|
+
const rootClassName$T = 'dot-card-header';
|
|
8247
8251
|
const StyledCardHeader = styled(CardHeader)`
|
|
8248
8252
|
${({
|
|
8249
8253
|
theme,
|
|
8250
8254
|
$maxTitleLines
|
|
8251
8255
|
}) => css`
|
|
8252
|
-
&.${rootClassName$
|
|
8256
|
+
&.${rootClassName$T} {
|
|
8253
8257
|
.MuiCardHeader-content {
|
|
8254
8258
|
overflow-x: hidden;
|
|
8255
8259
|
|
|
@@ -8281,7 +8285,7 @@ const DotCardHeader = ({
|
|
|
8281
8285
|
titleMaxLines = 1,
|
|
8282
8286
|
titleSize = 'large'
|
|
8283
8287
|
}) => {
|
|
8284
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8288
|
+
const rootClasses = useStylesWithRootClass(rootClassName$T, className);
|
|
8285
8289
|
const nonSmallTitleSize = titleSize === 'medium' ? 'h3' : 'h2';
|
|
8286
8290
|
const titleVariant = titleSize === 'small' ? 'h4' : nonSmallTitleSize;
|
|
8287
8291
|
const subheaderVariant = subheaderSize === 'small' ? 'body2' : 'body1';
|
|
@@ -8317,9 +8321,9 @@ const DotCardHeader = ({
|
|
|
8317
8321
|
});
|
|
8318
8322
|
};
|
|
8319
8323
|
|
|
8320
|
-
const rootClassName$
|
|
8324
|
+
const rootClassName$S = 'dot-form-control-label';
|
|
8321
8325
|
const StyledFormControlLabel = styled(FormControlLabel)`
|
|
8322
|
-
&.${rootClassName$
|
|
8326
|
+
&.${rootClassName$S} {
|
|
8323
8327
|
.MuiFormControlLabel-label {
|
|
8324
8328
|
margin-bottom: 0;
|
|
8325
8329
|
padding: 0 0 0 4px;
|
|
@@ -8342,12 +8346,12 @@ const StyledFormControlLabel = styled(FormControlLabel)`
|
|
|
8342
8346
|
}
|
|
8343
8347
|
`;
|
|
8344
8348
|
|
|
8345
|
-
const rootClassName$
|
|
8349
|
+
const rootClassName$R = 'dot-checkbox';
|
|
8346
8350
|
const StyledCheckbox = styled(Checkbox)`
|
|
8347
8351
|
${({
|
|
8348
8352
|
theme
|
|
8349
8353
|
}) => css`
|
|
8350
|
-
&.${rootClassName$
|
|
8354
|
+
&.${rootClassName$R} {
|
|
8351
8355
|
padding: ${theme.spacing(1)};
|
|
8352
8356
|
|
|
8353
8357
|
&.MuiCheckbox-indeterminate {
|
|
@@ -8366,7 +8370,7 @@ function DotCheckbox({
|
|
|
8366
8370
|
ariaLabelledby,
|
|
8367
8371
|
checked,
|
|
8368
8372
|
className,
|
|
8369
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
8373
|
+
'data-pendoid': dataPendoId = rootClassName$S,
|
|
8370
8374
|
'data-testid': dataTestId,
|
|
8371
8375
|
disabled,
|
|
8372
8376
|
disableRipple,
|
|
@@ -8381,14 +8385,14 @@ function DotCheckbox({
|
|
|
8381
8385
|
size = 'medium',
|
|
8382
8386
|
value
|
|
8383
8387
|
}) {
|
|
8384
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8388
|
+
const rootClasses = useStylesWithRootClass(rootClassName$S, className);
|
|
8385
8389
|
const handleChange = event => {
|
|
8386
8390
|
onChange && onChange(event, event.target.value);
|
|
8387
8391
|
};
|
|
8388
8392
|
const checkboxControl = jsx(StyledCheckbox, {
|
|
8389
8393
|
checked: checked,
|
|
8390
8394
|
classes: {
|
|
8391
|
-
root: rootClassName$
|
|
8395
|
+
root: rootClassName$R
|
|
8392
8396
|
},
|
|
8393
8397
|
color: "primary",
|
|
8394
8398
|
"data-pendoid": dataPendoId,
|
|
@@ -8417,13 +8421,13 @@ function DotCheckbox({
|
|
|
8417
8421
|
});
|
|
8418
8422
|
}
|
|
8419
8423
|
|
|
8420
|
-
const rootClassName$
|
|
8424
|
+
const rootClassName$Q = 'dot-form-group';
|
|
8421
8425
|
const groupLabelClassName = 'dot-form-group-label';
|
|
8422
8426
|
const startAdornmentClassName = 'dot-start-adornment';
|
|
8423
8427
|
const endAdornmentClassName = 'dot-end-adornment';
|
|
8424
8428
|
const placementClassName = 'dot-';
|
|
8425
8429
|
const StyledFormControl = styled(FormControl)`
|
|
8426
|
-
&.${rootClassName$
|
|
8430
|
+
&.${rootClassName$Q} {
|
|
8427
8431
|
.MuiFormLabel-root {
|
|
8428
8432
|
width: 100%;
|
|
8429
8433
|
line-height: 24px;
|
|
@@ -8454,7 +8458,7 @@ const StyledFormControl = styled(FormControl)`
|
|
|
8454
8458
|
}
|
|
8455
8459
|
`;
|
|
8456
8460
|
|
|
8457
|
-
const rootClassName$
|
|
8461
|
+
const rootClassName$P = 'dot-checkbox-group';
|
|
8458
8462
|
const wrapperClassName$1 = 'dot-checkbox-group-wrapper';
|
|
8459
8463
|
const checkboxListClassName = 'dot-checkbox-list';
|
|
8460
8464
|
const checkboxListItemClassName = 'dot-checkbox-list-item';
|
|
@@ -8463,7 +8467,7 @@ const StyledCheckboxGroup = styled.div`
|
|
|
8463
8467
|
theme
|
|
8464
8468
|
}) => css`{
|
|
8465
8469
|
&.${wrapperClassName$1} {
|
|
8466
|
-
.${rootClassName$
|
|
8470
|
+
.${rootClassName$P} {
|
|
8467
8471
|
width: 100%;
|
|
8468
8472
|
}
|
|
8469
8473
|
|
|
@@ -8490,7 +8494,7 @@ const StyledCheckboxGroup = styled.div`
|
|
|
8490
8494
|
margin-top: 0;
|
|
8491
8495
|
padding-left: ${theme.spacing(2.5)};
|
|
8492
8496
|
|
|
8493
|
-
.${rootClassName$
|
|
8497
|
+
.${rootClassName$S} {
|
|
8494
8498
|
margin: 0;
|
|
8495
8499
|
}
|
|
8496
8500
|
}
|
|
@@ -8498,13 +8502,13 @@ const StyledCheckboxGroup = styled.div`
|
|
|
8498
8502
|
`}
|
|
8499
8503
|
`;
|
|
8500
8504
|
|
|
8501
|
-
const rootClassName$
|
|
8505
|
+
const rootClassName$O = 'dot-form-group';
|
|
8502
8506
|
const StyledFormGroup = styled(FormGroup)`
|
|
8503
8507
|
${({
|
|
8504
8508
|
theme,
|
|
8505
8509
|
row
|
|
8506
8510
|
}) => css`
|
|
8507
|
-
&.${rootClassName$
|
|
8511
|
+
&.${rootClassName$O} > * {
|
|
8508
8512
|
margin: ${row ? `${theme.spacing(0.5)}` : 0};
|
|
8509
8513
|
}
|
|
8510
8514
|
`}
|
|
@@ -8517,7 +8521,7 @@ function DotFormGroup({
|
|
|
8517
8521
|
'data-testid': dataTestId,
|
|
8518
8522
|
row
|
|
8519
8523
|
}) {
|
|
8520
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8524
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Q, className);
|
|
8521
8525
|
return jsx(StyledFormGroup, {
|
|
8522
8526
|
"aria-label": ariaLabel,
|
|
8523
8527
|
classes: {
|
|
@@ -8556,7 +8560,7 @@ function DotCheckboxGroup({
|
|
|
8556
8560
|
size = 'medium'
|
|
8557
8561
|
}) {
|
|
8558
8562
|
const placement = `${placementClassName}${labelPlacement}`;
|
|
8559
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8563
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Q, rootClassName$P, className, placement);
|
|
8560
8564
|
const [selectedOptions, setSelectedOptions] = useState(defaultValues);
|
|
8561
8565
|
const [allChecked, setAllChecked] = useState(false);
|
|
8562
8566
|
/* This will ensure that state can be updated from the outside */
|
|
@@ -8641,12 +8645,12 @@ function DotCheckboxGroup({
|
|
|
8641
8645
|
});
|
|
8642
8646
|
}
|
|
8643
8647
|
|
|
8644
|
-
const rootClassName$
|
|
8648
|
+
const rootClassName$N = 'chip-list';
|
|
8645
8649
|
const StyledChipList = styled.div`
|
|
8646
8650
|
${({
|
|
8647
8651
|
theme
|
|
8648
8652
|
}) => css`
|
|
8649
|
-
&.${rootClassName$
|
|
8653
|
+
&.${rootClassName$N} {
|
|
8650
8654
|
display: flex;
|
|
8651
8655
|
gap: ${theme.spacing(1)};
|
|
8652
8656
|
}
|
|
@@ -8721,19 +8725,19 @@ function DotChipList({
|
|
|
8721
8725
|
setChips(itemElements);
|
|
8722
8726
|
}, [items, maxChars]);
|
|
8723
8727
|
return jsx(StyledChipList, {
|
|
8724
|
-
className: rootClassName$
|
|
8728
|
+
className: rootClassName$N,
|
|
8725
8729
|
"data-testid": dataTestId,
|
|
8726
8730
|
style: style,
|
|
8727
8731
|
children: chips
|
|
8728
8732
|
});
|
|
8729
8733
|
}
|
|
8730
8734
|
|
|
8731
|
-
const rootClassName$
|
|
8735
|
+
const rootClassName$M = 'dot-dialog';
|
|
8732
8736
|
const StyledDialog = styled(Dialog)`
|
|
8733
8737
|
${({
|
|
8734
8738
|
theme
|
|
8735
8739
|
}) => css`
|
|
8736
|
-
&.${rootClassName$
|
|
8740
|
+
&.${rootClassName$M} {
|
|
8737
8741
|
.MuiDialog-paper {
|
|
8738
8742
|
background: ${theme.palette.figma.background.level1.white};
|
|
8739
8743
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -8779,7 +8783,7 @@ const DotDialog = ({
|
|
|
8779
8783
|
cancelButtonProps,
|
|
8780
8784
|
cancelButtonVisible = true,
|
|
8781
8785
|
className,
|
|
8782
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
8786
|
+
'data-pendoid': dataPendoId = rootClassName$M,
|
|
8783
8787
|
'data-testid': dataTestId,
|
|
8784
8788
|
children,
|
|
8785
8789
|
closeIconVisible,
|
|
@@ -8793,7 +8797,7 @@ const DotDialog = ({
|
|
|
8793
8797
|
submitButtonProps,
|
|
8794
8798
|
title
|
|
8795
8799
|
}) => {
|
|
8796
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8800
|
+
const rootClasses = useStylesWithRootClass(rootClassName$M, className);
|
|
8797
8801
|
const cancelClasses = useStylesWithRootClass(cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.className, 'cancel-button');
|
|
8798
8802
|
const [isOpen, setIsOpen] = useState(open);
|
|
8799
8803
|
const hasSecondaryAction = !!secondaryButtonProps;
|
|
@@ -8930,7 +8934,7 @@ const DotConfirmationDialog = ({
|
|
|
8930
8934
|
});
|
|
8931
8935
|
};
|
|
8932
8936
|
|
|
8933
|
-
const rootClassName$
|
|
8937
|
+
const rootClassName$L = 'dot-grid';
|
|
8934
8938
|
const frGetter = value => typeof value === 'number' ? `repeat(${value}, 1fr)` : value;
|
|
8935
8939
|
const breakpointsGetter$1 = (theme, columnsBreakpoints, columnGap, rowGap) => `${theme.breakpoints.up('xs')} {
|
|
8936
8940
|
column-gap: ${`${columnGap.xs}px`};
|
|
@@ -8990,10 +8994,11 @@ const Grid = ({
|
|
|
8990
8994
|
children,
|
|
8991
8995
|
isLoading
|
|
8992
8996
|
}) => {
|
|
8993
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8997
|
+
const rootClasses = useStylesWithRootClass(rootClassName$L, className);
|
|
8994
8998
|
return jsxs("div", {
|
|
8995
8999
|
className: rootClasses,
|
|
8996
9000
|
children: [children, isLoading && jsx(DotProgress, {
|
|
9001
|
+
ariaLabel: "Loading more data",
|
|
8997
9002
|
className: "loading-more-data",
|
|
8998
9003
|
color: "inherit",
|
|
8999
9004
|
size: 20
|
|
@@ -9013,7 +9018,7 @@ const StyledGrid = styled(Grid)`
|
|
|
9013
9018
|
theme,
|
|
9014
9019
|
width
|
|
9015
9020
|
}) => css`
|
|
9016
|
-
&.${rootClassName$
|
|
9021
|
+
&.${rootClassName$L} {
|
|
9017
9022
|
display: grid;
|
|
9018
9023
|
grid-template-rows: ${frGetter(rows)};
|
|
9019
9024
|
${columns ? `${columns && `grid-template-columns: ${frGetter(columns)}`};` : breakpointsGetter$1(theme, columnsBreakpoints, columnGap, rowGap)}
|
|
@@ -9284,12 +9289,12 @@ const CssGridDebug = ({
|
|
|
9284
9289
|
});
|
|
9285
9290
|
};
|
|
9286
9291
|
|
|
9287
|
-
const rootClassName$
|
|
9292
|
+
const rootClassName$K = 'dot-pill';
|
|
9288
9293
|
const StyledPill = styled(Chip)`
|
|
9289
9294
|
${({
|
|
9290
9295
|
theme
|
|
9291
9296
|
}) => css`
|
|
9292
|
-
&.${rootClassName$
|
|
9297
|
+
&.${rootClassName$K} {
|
|
9293
9298
|
background-color: ${({
|
|
9294
9299
|
backgroundcolor,
|
|
9295
9300
|
variant
|
|
@@ -9413,7 +9418,7 @@ const DotPill = ({
|
|
|
9413
9418
|
status = 'default',
|
|
9414
9419
|
variant = 'filled'
|
|
9415
9420
|
}) => {
|
|
9416
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
9421
|
+
const rootClasses = useStylesWithRootClass(rootClassName$K, className, status);
|
|
9417
9422
|
return jsx(StyledPill, {
|
|
9418
9423
|
"aria-label": ariaLabel,
|
|
9419
9424
|
bordercolor: bordercolor,
|
|
@@ -10989,18 +10994,18 @@ function addAutoHideDuration(severity) {
|
|
|
10989
10994
|
return severity === 'error' ? null : 10000;
|
|
10990
10995
|
}
|
|
10991
10996
|
|
|
10992
|
-
const rootClassName$
|
|
10997
|
+
const rootClassName$J = 'dot-snackbar';
|
|
10993
10998
|
const StyledSnackbar = styled(Snackbar)`
|
|
10994
10999
|
${({
|
|
10995
11000
|
theme,
|
|
10996
11001
|
width,
|
|
10997
11002
|
$anchorOriginTop
|
|
10998
11003
|
}) => css`
|
|
10999
|
-
&.${rootClassName$
|
|
11004
|
+
&.${rootClassName$J} {
|
|
11000
11005
|
.MuiAlert-message {
|
|
11001
11006
|
word-break: break-word;
|
|
11002
11007
|
}
|
|
11003
|
-
.${rootClassName$
|
|
11008
|
+
.${rootClassName$1l} {
|
|
11004
11009
|
align-items: flex-start;
|
|
11005
11010
|
}
|
|
11006
11011
|
&.MuiSnackbar-anchorOriginTopLeft,
|
|
@@ -11053,7 +11058,7 @@ const DotSnackbar = ({
|
|
|
11053
11058
|
}) => {
|
|
11054
11059
|
const hasActions = !!(primaryAction || secondaryAction);
|
|
11055
11060
|
const calculatedAutoHideDuration = autoHideDuration === null || autoHideDuration > 0 ? autoHideDuration : addAutoHideDuration(severity);
|
|
11056
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11061
|
+
const rootClasses = useStylesWithRootClass(rootClassName$J, className);
|
|
11057
11062
|
const handleSnackbarClose = reason => {
|
|
11058
11063
|
if (!reason || hideOnClickAway || !hideOnClickAway && reason !== 'clickaway') {
|
|
11059
11064
|
onClose();
|
|
@@ -11123,10 +11128,10 @@ const DotSnackbar = ({
|
|
|
11123
11128
|
});
|
|
11124
11129
|
};
|
|
11125
11130
|
|
|
11126
|
-
const rootClassName$
|
|
11131
|
+
const rootClassName$I = 'dot-snackbar-container';
|
|
11127
11132
|
const StyledSnackbarContainer = styled.div`
|
|
11128
11133
|
${() => css`
|
|
11129
|
-
&.${rootClassName$
|
|
11134
|
+
&.${rootClassName$I} {
|
|
11130
11135
|
position: absolute;
|
|
11131
11136
|
top: 0;
|
|
11132
11137
|
width: 250px;
|
|
@@ -11158,10 +11163,10 @@ const DotSnackbarContainer = ({
|
|
|
11158
11163
|
};
|
|
11159
11164
|
}
|
|
11160
11165
|
return jsx(StyledSnackbarContainer, {
|
|
11161
|
-
className: rootClassName$
|
|
11166
|
+
className: rootClassName$I,
|
|
11162
11167
|
children: jsx("div", {
|
|
11163
|
-
className: rootClassName$
|
|
11164
|
-
"data-testid": rootClassName$
|
|
11168
|
+
className: rootClassName$I,
|
|
11169
|
+
"data-testid": rootClassName$I,
|
|
11165
11170
|
children: alerts.slice().reverse().map(alert => {
|
|
11166
11171
|
return jsx(DotSnackbar, {
|
|
11167
11172
|
autoCloseOnAction: autoCloseOnAction,
|
|
@@ -11235,12 +11240,12 @@ const useEnqueueErrorMessage = error => {
|
|
|
11235
11240
|
}, [error]);
|
|
11236
11241
|
};
|
|
11237
11242
|
|
|
11238
|
-
const rootClassName$
|
|
11243
|
+
const rootClassName$H = 'dot-dashboard-details';
|
|
11239
11244
|
const StyledDashboardDetails = styled(DotDrawer)`
|
|
11240
11245
|
${({
|
|
11241
11246
|
theme
|
|
11242
11247
|
}) => css`
|
|
11243
|
-
&.${rootClassName$
|
|
11248
|
+
&.${rootClassName$H} {
|
|
11244
11249
|
.dot-drawer-paper {
|
|
11245
11250
|
padding: 0;
|
|
11246
11251
|
width: 382px;
|
|
@@ -11366,7 +11371,7 @@ const DotDashboardDetailsView = ({
|
|
|
11366
11371
|
modifiedAuthorUser
|
|
11367
11372
|
}) => {
|
|
11368
11373
|
var _a, _b;
|
|
11369
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11374
|
+
const rootClasses = useStylesWithRootClass(rootClassName$H, className);
|
|
11370
11375
|
const closeHandler = useCallback(event => {
|
|
11371
11376
|
onClose && onClose(event);
|
|
11372
11377
|
}, [onClose]);
|
|
@@ -11782,6 +11787,7 @@ function DotDashboardDialog({
|
|
|
11782
11787
|
onContinue,
|
|
11783
11788
|
title
|
|
11784
11789
|
}) {
|
|
11790
|
+
var _a;
|
|
11785
11791
|
const [isDirty, setIsDirty] = useState(false);
|
|
11786
11792
|
const [isLoadingSubmit, setIsLoadingSubmit] = useState(false);
|
|
11787
11793
|
const [nameError, setNameError] = useState(null);
|
|
@@ -11858,13 +11864,19 @@ function DotDashboardDialog({
|
|
|
11858
11864
|
const useFormValues = Object.assign(Object.assign({}, formValues), {
|
|
11859
11865
|
id: (editDashboard === null || editDashboard === void 0 ? void 0 : editDashboard.parent_id) ? editDashboard === null || editDashboard === void 0 ? void 0 : editDashboard.parent_id : editDashboard === null || editDashboard === void 0 ? void 0 : editDashboard.id
|
|
11860
11866
|
});
|
|
11861
|
-
|
|
11862
|
-
|
|
11863
|
-
|
|
11864
|
-
|
|
11865
|
-
|
|
11866
|
-
|
|
11867
|
-
|
|
11867
|
+
yield cancelablePromise(validateName(useFormValues.name)).then(validName => {
|
|
11868
|
+
// If we fail name validation, set the nameError and don't call
|
|
11869
|
+
// the submit function because it will fail.
|
|
11870
|
+
if (validName) {
|
|
11871
|
+
cancelablePromise(onSubmit(useFormValues, isDone)).then(() => {
|
|
11872
|
+
isSubmittingRef.current = false;
|
|
11873
|
+
setIsLoadingSubmit(false);
|
|
11874
|
+
});
|
|
11875
|
+
} else {
|
|
11876
|
+
isSubmittingRef.current = false;
|
|
11877
|
+
setIsLoadingSubmit(false);
|
|
11878
|
+
}
|
|
11879
|
+
});
|
|
11868
11880
|
}), [formValues, editDashboard, validateName]);
|
|
11869
11881
|
const handleMouseDown = () => {
|
|
11870
11882
|
isSubmittingRef.current = true;
|
|
@@ -11904,11 +11916,9 @@ function DotDashboardDialog({
|
|
|
11904
11916
|
const availableCategoryOptions = [];
|
|
11905
11917
|
if (availableCategories) {
|
|
11906
11918
|
availableCategories.forEach(category => {
|
|
11907
|
-
|
|
11908
|
-
|
|
11909
|
-
|
|
11910
|
-
});
|
|
11911
|
-
}
|
|
11919
|
+
availableCategoryOptions.push({
|
|
11920
|
+
title: category
|
|
11921
|
+
});
|
|
11912
11922
|
});
|
|
11913
11923
|
}
|
|
11914
11924
|
return availableCategoryOptions;
|
|
@@ -11953,7 +11963,7 @@ function DotDashboardDialog({
|
|
|
11953
11963
|
}, message)), jsx(DotInputText, {
|
|
11954
11964
|
autoFocus: true,
|
|
11955
11965
|
"data-testid": "dashboard-dialog-name-input",
|
|
11956
|
-
error: nameError || name.length > DASHBOARD_NAME_MAX_LENGTH,
|
|
11966
|
+
error: !!nameError || name.length > DASHBOARD_NAME_MAX_LENGTH,
|
|
11957
11967
|
helperText: nameError || name.length > DASHBOARD_NAME_MAX_LENGTH && `Name must be ${DASHBOARD_NAME_MAX_LENGTH} characters or less`,
|
|
11958
11968
|
id: "name",
|
|
11959
11969
|
label: "Dashboard name",
|
|
@@ -11987,7 +11997,7 @@ function DotDashboardDialog({
|
|
|
11987
11997
|
"data-testid": "dashboard-dialog-apptype-input",
|
|
11988
11998
|
name: "Select application",
|
|
11989
11999
|
disabled: isDisabled('apptype'),
|
|
11990
|
-
value: editDashboard.target_apps[0]
|
|
12000
|
+
value: ((_a = editDashboard.target_apps) === null || _a === void 0 ? void 0 : _a.length) > 0 ? editDashboard.target_apps[0] : undefined
|
|
11991
12001
|
})]
|
|
11992
12002
|
}), jsx(DotTypography, {
|
|
11993
12003
|
variant: "h3",
|
|
@@ -12028,12 +12038,12 @@ function DotDashboardDialog({
|
|
|
12028
12038
|
});
|
|
12029
12039
|
}
|
|
12030
12040
|
|
|
12031
|
-
const rootClassName$
|
|
12041
|
+
const rootClassName$G = 'dot-impact-dialog';
|
|
12032
12042
|
const StyledImpactDialog = styled(DotDialog)`
|
|
12033
12043
|
${({
|
|
12034
12044
|
theme
|
|
12035
12045
|
}) => css`
|
|
12036
|
-
&.${rootClassName$
|
|
12046
|
+
&.${rootClassName$G} {
|
|
12037
12047
|
.high-impact-default-content {
|
|
12038
12048
|
margin-top: ${theme.spacing(2)};
|
|
12039
12049
|
margin-bottom: ${theme.spacing(3)};
|
|
@@ -12139,7 +12149,7 @@ const DotImpactDialog = ({
|
|
|
12139
12149
|
}
|
|
12140
12150
|
return '';
|
|
12141
12151
|
}, [action, capitalize, impact, record]);
|
|
12142
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12152
|
+
const rootClasses = useStylesWithRootClass(rootClassName$G, className);
|
|
12143
12153
|
return jsx(StyledImpactDialog, {
|
|
12144
12154
|
"data-testid": dataTestId,
|
|
12145
12155
|
className: rootClasses,
|
|
@@ -12751,8 +12761,7 @@ function DotDashboardOptionsMenu({
|
|
|
12751
12761
|
return updateDashboard(dashboard, {
|
|
12752
12762
|
name: data.name,
|
|
12753
12763
|
description: data.description,
|
|
12754
|
-
categories: data.categories
|
|
12755
|
-
target_apps: data.target_apps
|
|
12764
|
+
categories: data.categories
|
|
12756
12765
|
}).then(result => {
|
|
12757
12766
|
if (result && 'id' in result) {
|
|
12758
12767
|
setIsEditPropertiesDialogOpen(false);
|
|
@@ -13482,7 +13491,7 @@ function DotDashboardHeader({
|
|
|
13482
13491
|
});
|
|
13483
13492
|
}
|
|
13484
13493
|
|
|
13485
|
-
const rootClassName$
|
|
13494
|
+
const rootClassName$F = 'dot-empty-state';
|
|
13486
13495
|
const emptyStateImageSizing = {
|
|
13487
13496
|
xsmall: 9,
|
|
13488
13497
|
dense: 15,
|
|
@@ -13553,9 +13562,9 @@ const StyledEmptyState = styled.div`
|
|
|
13553
13562
|
`}
|
|
13554
13563
|
`;
|
|
13555
13564
|
|
|
13556
|
-
const rootClassName$
|
|
13565
|
+
const rootClassName$E = 'dot-illustration';
|
|
13557
13566
|
const StyledIllustration = styled.span`
|
|
13558
|
-
&.${rootClassName$
|
|
13567
|
+
&.${rootClassName$E} {
|
|
13559
13568
|
display: inline-block;
|
|
13560
13569
|
}
|
|
13561
13570
|
`;
|
|
@@ -13572,17 +13581,17 @@ const DotIllustration = ({
|
|
|
13572
13581
|
tooltip,
|
|
13573
13582
|
tooltipPlacement = 'right-end'
|
|
13574
13583
|
}) => {
|
|
13575
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
13584
|
+
const rootClasses = useStylesWithRootClass(rootClassName$E, className);
|
|
13576
13585
|
return jsx(DotTooltip, {
|
|
13577
13586
|
childrenDisplayStyle: "inline-block",
|
|
13578
13587
|
title: tooltip,
|
|
13579
13588
|
placement: tooltipPlacement,
|
|
13580
|
-
"data-testid": `${dataTestId || rootClassName$
|
|
13589
|
+
"data-testid": `${dataTestId || rootClassName$E}-tooltip`,
|
|
13581
13590
|
children: jsx(StyledIllustration, {
|
|
13582
13591
|
"aria-hidden": "false",
|
|
13583
13592
|
"aria-label": ariaLabel || title || 'Illustration',
|
|
13584
13593
|
className: rootClasses,
|
|
13585
|
-
"data-testid": dataTestId || rootClassName$
|
|
13594
|
+
"data-testid": dataTestId || rootClassName$E,
|
|
13586
13595
|
role: ariaRole,
|
|
13587
13596
|
children: jsx("img", {
|
|
13588
13597
|
alt: alt || 'Illustration',
|
|
@@ -13608,7 +13617,7 @@ const DotEmptyState = ({
|
|
|
13608
13617
|
subtitle,
|
|
13609
13618
|
title
|
|
13610
13619
|
}) => {
|
|
13611
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
13620
|
+
const rootClasses = useStylesWithRootClass(rootClassName$F, className);
|
|
13612
13621
|
return jsxs(StyledEmptyState, {
|
|
13613
13622
|
"aria-label": ariaLabel,
|
|
13614
13623
|
className: `${rootClasses} ${size}`,
|
|
@@ -13689,20 +13698,20 @@ const StyledRadioGroup = styled(RadioGroup)`
|
|
|
13689
13698
|
&.${groupClassName} {
|
|
13690
13699
|
padding-left: ${theme.spacing(2.5)};
|
|
13691
13700
|
|
|
13692
|
-
.${rootClassName$
|
|
13701
|
+
.${rootClassName$S} {
|
|
13693
13702
|
margin: 0;
|
|
13694
13703
|
}
|
|
13695
13704
|
}
|
|
13696
13705
|
`}
|
|
13697
13706
|
`;
|
|
13698
13707
|
|
|
13699
|
-
const rootClassName$
|
|
13708
|
+
const rootClassName$D = 'dot-date-picker';
|
|
13700
13709
|
const popperClassName = 'dot-date-picker-popper';
|
|
13701
13710
|
const containerClassName$2 = 'dot-date-picker-container';
|
|
13702
13711
|
const rectanglePickersDayClassName = 'dot-rectangle-pickers-day';
|
|
13703
13712
|
const StyledDatePickerContainer = styled.div`
|
|
13704
13713
|
${() => css`
|
|
13705
|
-
&.${rootClassName$
|
|
13714
|
+
&.${rootClassName$D} .full-width {
|
|
13706
13715
|
width: 100%;
|
|
13707
13716
|
}
|
|
13708
13717
|
`}
|
|
@@ -13711,7 +13720,7 @@ const StyledDatePicker = styled(DatePicker)`
|
|
|
13711
13720
|
${({
|
|
13712
13721
|
theme
|
|
13713
13722
|
}) => css`
|
|
13714
|
-
&.${rootClassName$
|
|
13723
|
+
&.${rootClassName$D} {
|
|
13715
13724
|
${pickerInputStyles(theme)};
|
|
13716
13725
|
|
|
13717
13726
|
.Mui-disabled.MuiInputBase-root,
|
|
@@ -13751,7 +13760,7 @@ const StyledPickersDay = styled(PickersDay)`
|
|
|
13751
13760
|
`}
|
|
13752
13761
|
`;
|
|
13753
13762
|
|
|
13754
|
-
const rootClassName$
|
|
13763
|
+
const rootClassName$C = 'dot-time-picker';
|
|
13755
13764
|
const containerClassName$1 = 'dot-time-picker-container';
|
|
13756
13765
|
const TIME_SELECTION_HEIGHT_SPACING = 34.5;
|
|
13757
13766
|
const TIME_SELECTION_WIDTH_SPACING = 14.5;
|
|
@@ -13822,7 +13831,7 @@ const StyledTimePicker = styled(TimePicker)`
|
|
|
13822
13831
|
${({
|
|
13823
13832
|
theme
|
|
13824
13833
|
}) => css`
|
|
13825
|
-
&.${rootClassName$
|
|
13834
|
+
&.${rootClassName$C} {
|
|
13826
13835
|
${pickerInputStyles(theme)};
|
|
13827
13836
|
|
|
13828
13837
|
.Mui-disabled.MuiInputBase-root,
|
|
@@ -13841,36 +13850,36 @@ const StyledTimePicker = styled(TimePicker)`
|
|
|
13841
13850
|
`}
|
|
13842
13851
|
`;
|
|
13843
13852
|
|
|
13844
|
-
const rootClassName$
|
|
13853
|
+
const rootClassName$B = 'dot-form';
|
|
13845
13854
|
const StyledFormContainer = styled.div`
|
|
13846
13855
|
${({
|
|
13847
13856
|
theme
|
|
13848
13857
|
}) => css`
|
|
13849
|
-
&.${rootClassName$
|
|
13858
|
+
&.${rootClassName$B} {
|
|
13850
13859
|
margin: ${theme.spacing(3, 0)};
|
|
13851
13860
|
|
|
13852
|
-
.${rootClassName$
|
|
13853
|
-
.${rootClassName$
|
|
13854
|
-
.${rootClassName$
|
|
13861
|
+
.${rootClassName$Q},
|
|
13862
|
+
.${rootClassName$S},
|
|
13863
|
+
.${rootClassName$1p},
|
|
13855
13864
|
.${rootSelectClassName},
|
|
13856
|
-
.${rootClassName$
|
|
13857
|
-
.${rootClassName$
|
|
13865
|
+
.${rootClassName$D},
|
|
13866
|
+
.${rootClassName$C} {
|
|
13858
13867
|
margin: ${theme.spacing(1, 0)};
|
|
13859
13868
|
}
|
|
13860
13869
|
|
|
13861
13870
|
.${wrapperClassName$2} {
|
|
13862
|
-
+ .${rootClassName$
|
|
13871
|
+
+ .${rootClassName$1p},
|
|
13863
13872
|
.${wrapperClassName$2}
|
|
13864
13873
|
+ .${rootSelectClassName},
|
|
13865
13874
|
.${wrapperClassName$2}
|
|
13866
|
-
+ .${rootClassName$
|
|
13875
|
+
+ .${rootClassName$D},
|
|
13867
13876
|
.${wrapperClassName$2}
|
|
13868
|
-
+ .${rootClassName$
|
|
13877
|
+
+ .${rootClassName$C} {
|
|
13869
13878
|
margin: ${theme.spacing(0, 0, 1, 0)};
|
|
13870
13879
|
}
|
|
13871
13880
|
|
|
13872
|
-
.${rootClassName$
|
|
13873
|
-
.${rootClassName$
|
|
13881
|
+
.${rootClassName$P}, .${groupClassName} {
|
|
13882
|
+
.${rootClassName$S} {
|
|
13874
13883
|
margin: 0;
|
|
13875
13884
|
}
|
|
13876
13885
|
}
|
|
@@ -13885,7 +13894,7 @@ const DotForm = ({
|
|
|
13885
13894
|
'data-testid': dataTestId,
|
|
13886
13895
|
onSubmit
|
|
13887
13896
|
}) => {
|
|
13888
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
13897
|
+
const rootClasses = useStylesWithRootClass(rootClassName$B, className);
|
|
13889
13898
|
return jsx("form", {
|
|
13890
13899
|
"aria-label": ariaLabel,
|
|
13891
13900
|
"data-testid": dataTestId,
|
|
@@ -13898,10 +13907,10 @@ const DotForm = ({
|
|
|
13898
13907
|
});
|
|
13899
13908
|
};
|
|
13900
13909
|
|
|
13901
|
-
const rootClassName$
|
|
13910
|
+
const rootClassName$A = 'dot-dynamic-form';
|
|
13902
13911
|
const StyledDynamicForm = styled(DotForm)`
|
|
13903
13912
|
${() => css`
|
|
13904
|
-
&.${rootClassName$
|
|
13913
|
+
&.${rootClassName$A} {
|
|
13905
13914
|
}
|
|
13906
13915
|
`}
|
|
13907
13916
|
`;
|
|
@@ -14081,12 +14090,12 @@ const checkIfFormDataValid = formState => {
|
|
|
14081
14090
|
return true;
|
|
14082
14091
|
};
|
|
14083
14092
|
|
|
14084
|
-
const rootClassName$
|
|
14093
|
+
const rootClassName$z = 'dot-progress-button';
|
|
14085
14094
|
const StyledProgressButton = styled(DotButton)`
|
|
14086
14095
|
${({
|
|
14087
14096
|
theme
|
|
14088
14097
|
}) => css`
|
|
14089
|
-
&.${rootClassName$
|
|
14098
|
+
&.${rootClassName$z} {
|
|
14090
14099
|
.hidden {
|
|
14091
14100
|
// hide children but preserve its space so that
|
|
14092
14101
|
// button's dimensions don't change
|
|
@@ -14111,7 +14120,7 @@ const DotProgressButton = ({
|
|
|
14111
14120
|
ariaLabel,
|
|
14112
14121
|
children,
|
|
14113
14122
|
className,
|
|
14114
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
14123
|
+
'data-pendoid': dataPendoId = rootClassName$z,
|
|
14115
14124
|
'data-testid': dataTestId,
|
|
14116
14125
|
disabled = false,
|
|
14117
14126
|
disableInteractive,
|
|
@@ -14125,7 +14134,7 @@ const DotProgressButton = ({
|
|
|
14125
14134
|
tooltip,
|
|
14126
14135
|
type = 'primary'
|
|
14127
14136
|
}) => {
|
|
14128
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
14137
|
+
const rootClasses = useStylesWithRootClass(rootClassName$z, className);
|
|
14129
14138
|
const isButtonDisabled = disabled || isLoading;
|
|
14130
14139
|
const titleClasses = useStylesWithRootClass(isLoading ? 'hidden' : '');
|
|
14131
14140
|
const progressCircleSize = size === 'large' ? SPINNER_LARGE_SIZE : SPINNER_DEFAULT_SIZE;
|
|
@@ -14155,12 +14164,12 @@ const DotProgressButton = ({
|
|
|
14155
14164
|
});
|
|
14156
14165
|
};
|
|
14157
14166
|
|
|
14158
|
-
const rootClassName$
|
|
14167
|
+
const rootClassName$y = 'dot-radio';
|
|
14159
14168
|
const StyledRadioButton = styled(Radio)`
|
|
14160
14169
|
${({
|
|
14161
14170
|
theme
|
|
14162
14171
|
}) => css`
|
|
14163
|
-
&.${rootClassName$
|
|
14172
|
+
&.${rootClassName$y} {
|
|
14164
14173
|
padding: 8px;
|
|
14165
14174
|
|
|
14166
14175
|
svg {
|
|
@@ -14178,7 +14187,7 @@ function DotRadioButton({
|
|
|
14178
14187
|
ariaLabel,
|
|
14179
14188
|
checked,
|
|
14180
14189
|
className,
|
|
14181
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
14190
|
+
'data-pendoid': dataPendoId = rootClassName$S,
|
|
14182
14191
|
'data-testid': dataTestId,
|
|
14183
14192
|
disabled,
|
|
14184
14193
|
id,
|
|
@@ -14191,7 +14200,7 @@ function DotRadioButton({
|
|
|
14191
14200
|
size = 'medium',
|
|
14192
14201
|
value
|
|
14193
14202
|
}) {
|
|
14194
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
14203
|
+
const rootClasses = useStylesWithRootClass(rootClassName$S, className);
|
|
14195
14204
|
const handleChange = event => {
|
|
14196
14205
|
onChange && onChange(event, event.target.value);
|
|
14197
14206
|
};
|
|
@@ -14199,7 +14208,7 @@ function DotRadioButton({
|
|
|
14199
14208
|
const radioControl = jsx(StyledRadioButton, {
|
|
14200
14209
|
checked: checked,
|
|
14201
14210
|
classes: {
|
|
14202
|
-
root: rootClassName$
|
|
14211
|
+
root: rootClassName$y
|
|
14203
14212
|
},
|
|
14204
14213
|
color: "primary",
|
|
14205
14214
|
"data-pendoid": dataPendoId,
|
|
@@ -14245,7 +14254,7 @@ const DotRadioGroup = ({
|
|
|
14245
14254
|
size = 'medium'
|
|
14246
14255
|
}) => {
|
|
14247
14256
|
const placement = `${placementClassName}${labelPlacement}`;
|
|
14248
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
14257
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Q, className, placement);
|
|
14249
14258
|
const radioValue = value || defaultValue;
|
|
14250
14259
|
const [selectedValue, setSelectedValue] = useState(radioValue);
|
|
14251
14260
|
/* This will ensure that value can be updated from the outside */
|
|
@@ -14310,7 +14319,7 @@ const DotRadioGroup = ({
|
|
|
14310
14319
|
});
|
|
14311
14320
|
};
|
|
14312
14321
|
|
|
14313
|
-
const rootClassName$
|
|
14322
|
+
const rootClassName$x = 'dot-switch';
|
|
14314
14323
|
const StyledSwitch = styled(Switch)`
|
|
14315
14324
|
${({
|
|
14316
14325
|
theme
|
|
@@ -14339,7 +14348,7 @@ const DotSwitch = ({
|
|
|
14339
14348
|
checked,
|
|
14340
14349
|
className,
|
|
14341
14350
|
color,
|
|
14342
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
14351
|
+
'data-pendoid': dataPendoId = rootClassName$x,
|
|
14343
14352
|
'data-testid': dataTestId,
|
|
14344
14353
|
disabled = false,
|
|
14345
14354
|
id,
|
|
@@ -14349,7 +14358,7 @@ const DotSwitch = ({
|
|
|
14349
14358
|
onChange,
|
|
14350
14359
|
size = 'medium'
|
|
14351
14360
|
}) => {
|
|
14352
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
14361
|
+
const rootClasses = useStylesWithRootClass(rootClassName$x, className);
|
|
14353
14362
|
const handleChange = event => {
|
|
14354
14363
|
onChange && onChange(event);
|
|
14355
14364
|
};
|
|
@@ -14379,7 +14388,7 @@ const DotSwitch = ({
|
|
|
14379
14388
|
tabIndex: 0
|
|
14380
14389
|
});
|
|
14381
14390
|
return jsx(StyledFormControlLabel, {
|
|
14382
|
-
className: rootClassName$
|
|
14391
|
+
className: rootClassName$S,
|
|
14383
14392
|
control: switchControl,
|
|
14384
14393
|
label: label,
|
|
14385
14394
|
labelPlacement: labelPlacement
|
|
@@ -14700,7 +14709,7 @@ const DotDynamicForm = ({
|
|
|
14700
14709
|
onChange,
|
|
14701
14710
|
onSubmit
|
|
14702
14711
|
}) => {
|
|
14703
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
14712
|
+
const rootClasses = useStylesWithRootClass(rootClassName$A, className);
|
|
14704
14713
|
// Memoize this operation so that is doesn't get executed each time this
|
|
14705
14714
|
// component re-renders
|
|
14706
14715
|
const initialFormState = useMemo(() => getInitialFormState(config, liveValidation), [config, liveValidation, getInitialFormState]);
|
|
@@ -14946,7 +14955,7 @@ const DotDynamicForm = ({
|
|
|
14946
14955
|
});
|
|
14947
14956
|
};
|
|
14948
14957
|
|
|
14949
|
-
const rootClassName$
|
|
14958
|
+
const rootClassName$w = 'dot-inline-edit';
|
|
14950
14959
|
const editModeClassName = 'dot-edit-mode';
|
|
14951
14960
|
const viewModeClassName = 'dot-view-mode';
|
|
14952
14961
|
const placeholderClassName = 'dot-placeholder';
|
|
@@ -14958,7 +14967,7 @@ const StyledInlineEdit = styled.div`
|
|
|
14958
14967
|
theme,
|
|
14959
14968
|
fullWidth
|
|
14960
14969
|
}) => css`
|
|
14961
|
-
&.${rootClassName$
|
|
14970
|
+
&.${rootClassName$w} {
|
|
14962
14971
|
align-items: center;
|
|
14963
14972
|
color: ${theme.palette.figma.typography.black};
|
|
14964
14973
|
display: ${fullWidth ? 'flex' : 'inline-flex'};
|
|
@@ -15172,7 +15181,7 @@ const DotInlineEdit = ({
|
|
|
15172
15181
|
bindings,
|
|
15173
15182
|
charactersLimit,
|
|
15174
15183
|
className,
|
|
15175
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
15184
|
+
'data-pendoid': dataPendoId = rootClassName$w,
|
|
15176
15185
|
'data-testid': dataTestId,
|
|
15177
15186
|
fullWidth = true,
|
|
15178
15187
|
hideActionButtons,
|
|
@@ -15208,7 +15217,7 @@ const DotInlineEdit = ({
|
|
|
15208
15217
|
}
|
|
15209
15218
|
}, [value]);
|
|
15210
15219
|
const isSaveDisabled = checkIfEmptyValue(inputValue);
|
|
15211
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
15220
|
+
const rootClasses = useStylesWithRootClass(rootClassName$w, className, editing ? editModeClassName : '');
|
|
15212
15221
|
const handleShowTooltip = visible => {
|
|
15213
15222
|
if (!editing) {
|
|
15214
15223
|
setShowTooltip(visible);
|
|
@@ -15396,13 +15405,13 @@ const DotInlineEdit = ({
|
|
|
15396
15405
|
});
|
|
15397
15406
|
};
|
|
15398
15407
|
|
|
15399
|
-
const rootClassName$
|
|
15408
|
+
const rootClassName$v = 'dot-navigation-rail';
|
|
15400
15409
|
const StyledNavigationRail = styled.div`
|
|
15401
15410
|
${({
|
|
15402
15411
|
theme,
|
|
15403
15412
|
railItemPosition
|
|
15404
15413
|
}) => css`
|
|
15405
|
-
&.${rootClassName$
|
|
15414
|
+
&.${rootClassName$v} {
|
|
15406
15415
|
background: ${theme.palette.figma.neutral.elevated};
|
|
15407
15416
|
border-left: 1px solid ${theme.palette.figma.border.default};
|
|
15408
15417
|
display: flex;
|
|
@@ -15461,7 +15470,7 @@ const DotNavigationRail = ({
|
|
|
15461
15470
|
railItems,
|
|
15462
15471
|
selectedIndex = 0
|
|
15463
15472
|
}) => {
|
|
15464
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
15473
|
+
const rootClasses = useStylesWithRootClass(rootClassName$v, className);
|
|
15465
15474
|
const [selectedItemIndex, setSelectedItemIndex] = useState(selectedIndex);
|
|
15466
15475
|
/* Used to change selected index programmatically from the consumer component */
|
|
15467
15476
|
useEffect(() => {
|
|
@@ -15512,12 +15521,12 @@ const DotNavigationRail = ({
|
|
|
15512
15521
|
});
|
|
15513
15522
|
};
|
|
15514
15523
|
|
|
15515
|
-
const rootClassName$
|
|
15524
|
+
const rootClassName$u = 'dot-skeleton';
|
|
15516
15525
|
const StyledSkeleton = styled(Skeleton)`
|
|
15517
15526
|
${({
|
|
15518
15527
|
theme
|
|
15519
15528
|
}) => css`
|
|
15520
|
-
&.${rootClassName$
|
|
15529
|
+
&.${rootClassName$u} {
|
|
15521
15530
|
background-color: ${theme.palette.figma.border.darker};
|
|
15522
15531
|
}
|
|
15523
15532
|
`}
|
|
@@ -15532,7 +15541,7 @@ const DotSkeleton = ({
|
|
|
15532
15541
|
width,
|
|
15533
15542
|
variant
|
|
15534
15543
|
}) => {
|
|
15535
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
15544
|
+
const rootClasses = useStylesWithRootClass(rootClassName$u, className);
|
|
15536
15545
|
return jsx(StyledSkeleton, {
|
|
15537
15546
|
animation: "wave",
|
|
15538
15547
|
"aria-label": ariaLabel,
|
|
@@ -15547,12 +15556,12 @@ const DotSkeleton = ({
|
|
|
15547
15556
|
});
|
|
15548
15557
|
};
|
|
15549
15558
|
|
|
15550
|
-
const rootClassName$
|
|
15559
|
+
const rootClassName$t = 'dot-split-button-group';
|
|
15551
15560
|
const StyledSplitButtonGroup = styled(ButtonGroup)`
|
|
15552
15561
|
${({
|
|
15553
15562
|
theme
|
|
15554
15563
|
}) => css`
|
|
15555
|
-
&.${rootClassName$
|
|
15564
|
+
&.${rootClassName$t} {
|
|
15556
15565
|
&.outlined,
|
|
15557
15566
|
&.text {
|
|
15558
15567
|
.expand-button {
|
|
@@ -15618,7 +15627,7 @@ const DotSplitButton = ({
|
|
|
15618
15627
|
autoFocus = false,
|
|
15619
15628
|
ariaLabel,
|
|
15620
15629
|
className,
|
|
15621
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
15630
|
+
'data-pendoid': dataPendoId = rootClassName$t,
|
|
15622
15631
|
'data-testid': dataTestId,
|
|
15623
15632
|
defaultMainOptionKey,
|
|
15624
15633
|
disabled = false,
|
|
@@ -15634,7 +15643,7 @@ const DotSplitButton = ({
|
|
|
15634
15643
|
tooltipPlacement,
|
|
15635
15644
|
type = 'primary'
|
|
15636
15645
|
}) => {
|
|
15637
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
15646
|
+
const rootClasses = useStylesWithRootClass(rootClassName$t, className, type, disabled ? 'disabled' : '');
|
|
15638
15647
|
const [open, setOpen] = useState(false);
|
|
15639
15648
|
const anchorRef = useRef(null);
|
|
15640
15649
|
const hasEmptyOptions = options.length === 0;
|
|
@@ -15702,7 +15711,7 @@ const DotSplitButton = ({
|
|
|
15702
15711
|
});
|
|
15703
15712
|
};
|
|
15704
15713
|
|
|
15705
|
-
const rootClassName$
|
|
15714
|
+
const rootClassName$s = 'dot-stepper';
|
|
15706
15715
|
const stepListClassName = 'dot-stepper-list';
|
|
15707
15716
|
const contentClassName = 'dot-stepper-content';
|
|
15708
15717
|
const StyledStepper = styled.div`
|
|
@@ -15710,7 +15719,7 @@ const StyledStepper = styled.div`
|
|
|
15710
15719
|
theme,
|
|
15711
15720
|
offset
|
|
15712
15721
|
}) => css`
|
|
15713
|
-
&.${rootClassName$
|
|
15722
|
+
&.${rootClassName$s} {
|
|
15714
15723
|
display: flex;
|
|
15715
15724
|
align-items: flex-start;
|
|
15716
15725
|
padding: 0;
|
|
@@ -16025,7 +16034,7 @@ const DotStepper = ({
|
|
|
16025
16034
|
return ['left', 'right'].includes(stepsPosition) ? stepsPosition : 'left';
|
|
16026
16035
|
}
|
|
16027
16036
|
};
|
|
16028
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
16037
|
+
const rootClasses = useStylesWithRootClass(rootClassName$s, getStepsPosition(), className);
|
|
16029
16038
|
const stepContentClasses = displayInitialContent || displayFinalContent ? 'center-content' : '';
|
|
16030
16039
|
const stickyBottomClasses = useStylesWithRootClass('actions-container', isStickyBottom ? 'with-top-border' : '');
|
|
16031
16040
|
const actionsClasses = useStylesWithRootClass('actions', displayInitialContent || displayFinalContent ? 'center-actions' : '');
|
|
@@ -16243,12 +16252,12 @@ const DotStepper = ({
|
|
|
16243
16252
|
});
|
|
16244
16253
|
};
|
|
16245
16254
|
|
|
16246
|
-
const rootClassName$
|
|
16255
|
+
const rootClassName$r = 'dot-table-pagination-custom-actions';
|
|
16247
16256
|
const StyledTablePaginationCustomActions = styled.div`
|
|
16248
16257
|
${({
|
|
16249
16258
|
theme
|
|
16250
16259
|
}) => css`
|
|
16251
|
-
&.${rootClassName$
|
|
16260
|
+
&.${rootClassName$r} {
|
|
16252
16261
|
margin-left: ${theme.spacing(2.5)};
|
|
16253
16262
|
display: flex;
|
|
16254
16263
|
align-items: center;
|
|
@@ -16372,7 +16381,7 @@ const DotTablePaginationCustomActions = props => {
|
|
|
16372
16381
|
});
|
|
16373
16382
|
};
|
|
16374
16383
|
return jsxs(StyledTablePaginationCustomActions, {
|
|
16375
|
-
className: rootClassName$
|
|
16384
|
+
className: rootClassName$r,
|
|
16376
16385
|
children: [jsx(DotIconButton, {
|
|
16377
16386
|
ariaLabel: "previous page",
|
|
16378
16387
|
className: "page-control-button",
|
|
@@ -16419,7 +16428,7 @@ const DotTablePaginationCustomActions = props => {
|
|
|
16419
16428
|
});
|
|
16420
16429
|
};
|
|
16421
16430
|
|
|
16422
|
-
const rootClassName$
|
|
16431
|
+
const rootClassName$q = 'dot-table-pagination';
|
|
16423
16432
|
// TO-DO: Determine how to apply styles to standard popper element
|
|
16424
16433
|
const paginationItemClassName = 'dot-pagination-menu-item';
|
|
16425
16434
|
const StyledTablePagination = styled.div`
|
|
@@ -16427,7 +16436,7 @@ const StyledTablePagination = styled.div`
|
|
|
16427
16436
|
theme,
|
|
16428
16437
|
typography
|
|
16429
16438
|
}) => css`
|
|
16430
|
-
.${rootClassName$
|
|
16439
|
+
.${rootClassName$q} {
|
|
16431
16440
|
border-top: 1px solid ${theme.palette.figma.border.default};
|
|
16432
16441
|
|
|
16433
16442
|
.dot-caption,
|
|
@@ -16470,7 +16479,7 @@ const DotTablePagination = ({
|
|
|
16470
16479
|
showJumpToPageActionButton = false,
|
|
16471
16480
|
typography = 'subtitle2'
|
|
16472
16481
|
}) => {
|
|
16473
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
16482
|
+
const rootClasses = useStylesWithRootClass(rootClassName$q, className, showJumpToPageActionButton ? 'with-custom-actions' : '');
|
|
16474
16483
|
const handlePageChange = (event, newPage) => {
|
|
16475
16484
|
onPageChange && onPageChange(newPage);
|
|
16476
16485
|
};
|
|
@@ -16479,7 +16488,7 @@ const DotTablePagination = ({
|
|
|
16479
16488
|
};
|
|
16480
16489
|
return (/* Container is used to pass 'typography' prop to a styled component */
|
|
16481
16490
|
jsx(StyledTablePagination, {
|
|
16482
|
-
className: rootClassName$
|
|
16491
|
+
className: rootClassName$q,
|
|
16483
16492
|
typography: typography,
|
|
16484
16493
|
children: jsx(TablePagination, {
|
|
16485
16494
|
ActionsComponent: showJumpToPageActionButton ? DotTablePaginationCustomActions : undefined,
|
|
@@ -16506,14 +16515,14 @@ const DotTablePagination = ({
|
|
|
16506
16515
|
);
|
|
16507
16516
|
};
|
|
16508
16517
|
|
|
16509
|
-
const rootClassName$
|
|
16518
|
+
const rootClassName$p = 'dot-table';
|
|
16510
16519
|
const MULTISELECT_COLUMN_WIDTH = 52;
|
|
16511
16520
|
const COLLAPSIBLE_COLUMN_WIDTH = 42;
|
|
16512
16521
|
const StyledPaper$1 = styled(Paper)`
|
|
16513
16522
|
${({
|
|
16514
16523
|
theme
|
|
16515
16524
|
}) => css`
|
|
16516
|
-
&.${rootClassName$
|
|
16525
|
+
&.${rootClassName$p} {
|
|
16517
16526
|
background: ${theme.palette.figma.background.level0.componentsBackground};
|
|
16518
16527
|
border: 1px solid ${theme.palette.figma.border.default};
|
|
16519
16528
|
overflow: hidden;
|
|
@@ -16656,10 +16665,10 @@ const StyledMenu$1 = styled(DotMenu)`
|
|
|
16656
16665
|
}
|
|
16657
16666
|
`;
|
|
16658
16667
|
|
|
16659
|
-
const rootClassName$
|
|
16668
|
+
const rootClassName$o = 'dot-tbody';
|
|
16660
16669
|
const StyledTableBody = styled(TableBody)`
|
|
16661
16670
|
${() => css`
|
|
16662
|
-
&.${rootClassName$
|
|
16671
|
+
&.${rootClassName$o} {
|
|
16663
16672
|
tr:last-child td {
|
|
16664
16673
|
border-bottom: none;
|
|
16665
16674
|
}
|
|
@@ -16854,12 +16863,12 @@ function stableSort(array, comparator) {
|
|
|
16854
16863
|
return stabilizedThis.map(el => el[0]);
|
|
16855
16864
|
}
|
|
16856
16865
|
|
|
16857
|
-
const rootClassName$
|
|
16866
|
+
const rootClassName$n = 'dot-td';
|
|
16858
16867
|
const StyledTableCell = styled(TableCell)`
|
|
16859
16868
|
${({
|
|
16860
16869
|
theme
|
|
16861
16870
|
}) => css`
|
|
16862
|
-
&.${rootClassName$
|
|
16871
|
+
&.${rootClassName$n} {
|
|
16863
16872
|
padding-top: 0;
|
|
16864
16873
|
padding-bottom: 0;
|
|
16865
16874
|
|
|
@@ -16954,7 +16963,7 @@ const DotBodyCell = ({
|
|
|
16954
16963
|
const isOverflowing = actionTableCellWidth > (wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current.clientWidth);
|
|
16955
16964
|
setShowMenu(isOverflowing);
|
|
16956
16965
|
};
|
|
16957
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
16966
|
+
const rootClasses = useStylesWithRootClass(rootClassName$n, className, noWrap && 'noWrap', Array.isArray(value) && 'actionItems');
|
|
16958
16967
|
const getTableCellValue = () => {
|
|
16959
16968
|
if (Array.isArray(value)) {
|
|
16960
16969
|
return jsx("div", {
|
|
@@ -17022,13 +17031,13 @@ const EmptyDotRow = ({
|
|
|
17022
17031
|
const TABLE_TYPOGRAPHY_VARIANT = 'body1';
|
|
17023
17032
|
const TABLE_DEFAULT_SKELETON_ROWS = 4;
|
|
17024
17033
|
|
|
17025
|
-
const rootClassName$
|
|
17034
|
+
const rootClassName$m = 'dot-th-checkbox';
|
|
17026
17035
|
const styledTableHeaderCheckboxElement = (isCell = true) => {
|
|
17027
17036
|
return styled(isCell ? TableCell : 'div')`
|
|
17028
17037
|
${({
|
|
17029
17038
|
theme
|
|
17030
17039
|
}) => css`
|
|
17031
|
-
&.${rootClassName$
|
|
17040
|
+
&.${rootClassName$m} {
|
|
17032
17041
|
background: ${theme.palette.figma.background.level0.componentsBackground};
|
|
17033
17042
|
padding: ${theme.spacing(0, 1)};
|
|
17034
17043
|
width: ${theme.spacing(5)};
|
|
@@ -17056,7 +17065,7 @@ const DotHeaderCheckboxCell = ({
|
|
|
17056
17065
|
isFromTableSelectionToolbar,
|
|
17057
17066
|
multiSelectHeader
|
|
17058
17067
|
}) => {
|
|
17059
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
17068
|
+
const rootClasses = useStylesWithRootClass(rootClassName$m, className, isFromTableSelectionToolbar ? 'table-selection-toolbar-checkbox' : '');
|
|
17060
17069
|
const [multiSelectState, setMultiSelectState] = useState('unchecked');
|
|
17061
17070
|
const {
|
|
17062
17071
|
onCheckAllChange,
|
|
@@ -17106,12 +17115,12 @@ const DotHeaderCheckboxCell = ({
|
|
|
17106
17115
|
});
|
|
17107
17116
|
};
|
|
17108
17117
|
|
|
17109
|
-
const rootClassName$
|
|
17118
|
+
const rootClassName$l = 'dot-th';
|
|
17110
17119
|
const StyledTableHeaderCell = styled(TableCell)`
|
|
17111
17120
|
${({
|
|
17112
17121
|
theme
|
|
17113
17122
|
}) => css`
|
|
17114
|
-
&.${rootClassName$
|
|
17123
|
+
&.${rootClassName$l} {
|
|
17115
17124
|
background: ${theme.palette.figma.background.level0.componentsBackground};
|
|
17116
17125
|
|
|
17117
17126
|
&.MuiTableCell-alignCenter > span.MuiTableSortLabel-root {
|
|
@@ -17151,7 +17160,7 @@ const DotHeaderCell = ({
|
|
|
17151
17160
|
value,
|
|
17152
17161
|
width
|
|
17153
17162
|
}) => {
|
|
17154
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
17163
|
+
const rootClasses = useStylesWithRootClass(rootClassName$l, pinned ? 'dot-pinned-cell' : '', className);
|
|
17155
17164
|
const headerTitle = isString$2(value) ? value : null;
|
|
17156
17165
|
const formattedValue = getFormattedTableCellValue(value, typography);
|
|
17157
17166
|
const getCellValue = () => {
|
|
@@ -17242,12 +17251,12 @@ const DotHeaderRow = ({
|
|
|
17242
17251
|
});
|
|
17243
17252
|
};
|
|
17244
17253
|
|
|
17245
|
-
const rootClassName$
|
|
17254
|
+
const rootClassName$k = 'dot-tr';
|
|
17246
17255
|
const StyledTableRowStyles = styled(TableRow)`
|
|
17247
17256
|
${({
|
|
17248
17257
|
theme
|
|
17249
17258
|
}) => css`
|
|
17250
|
-
&.${rootClassName$
|
|
17259
|
+
&.${rootClassName$k} {
|
|
17251
17260
|
&.selected {
|
|
17252
17261
|
&,
|
|
17253
17262
|
.dot-td.dot-pinned-cell,
|
|
@@ -17473,12 +17482,12 @@ const ExpandCollapseCell = ({
|
|
|
17473
17482
|
});
|
|
17474
17483
|
};
|
|
17475
17484
|
|
|
17476
|
-
const rootClassName$
|
|
17485
|
+
const rootClassName$j = 'dot-td-checkbox';
|
|
17477
17486
|
const StyledTableBodyCheckboxCell = styled(TableCell)`
|
|
17478
17487
|
${({
|
|
17479
17488
|
theme
|
|
17480
17489
|
}) => css`
|
|
17481
|
-
&.${rootClassName$
|
|
17490
|
+
&.${rootClassName$j} {
|
|
17482
17491
|
padding: ${theme.spacing(0, 1)};
|
|
17483
17492
|
width: ${theme.spacing(5)};
|
|
17484
17493
|
|
|
@@ -17497,7 +17506,7 @@ const DotBodyCheckboxCell = ({
|
|
|
17497
17506
|
onChange,
|
|
17498
17507
|
rowId
|
|
17499
17508
|
}) => {
|
|
17500
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
17509
|
+
const rootClasses = useStylesWithRootClass(rootClassName$j, className);
|
|
17501
17510
|
const [isCheckboxChecked, setIsCheckboxChecked] = useState(isChecked);
|
|
17502
17511
|
/** This effect is used when 'checked' status is changed from the outside */
|
|
17503
17512
|
useEffect(() => {
|
|
@@ -17550,7 +17559,7 @@ const DotTableRow = ({
|
|
|
17550
17559
|
selectedTableRowIds
|
|
17551
17560
|
} = multiSelectBody || {};
|
|
17552
17561
|
const isCheckboxChecked = selectedTableRowIds && selectedTableRowIds.includes(id) || false;
|
|
17553
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
17562
|
+
const rootClasses = useStylesWithRootClass(rootClassName$k, isCheckboxChecked ? 'selected' : undefined, className);
|
|
17554
17563
|
const renderCheckboxCell = () => {
|
|
17555
17564
|
return jsx(DotBodyCheckboxCell, {
|
|
17556
17565
|
ariaLabel: "Click to select this row",
|
|
@@ -17671,7 +17680,7 @@ const DotTableBody = ({
|
|
|
17671
17680
|
return jsxs(Fragment, {
|
|
17672
17681
|
children: [jsx(StyledTableBody, {
|
|
17673
17682
|
classes: {
|
|
17674
|
-
root: rootClassName$
|
|
17683
|
+
root: rootClassName$o
|
|
17675
17684
|
},
|
|
17676
17685
|
children: getTableBodyRows()
|
|
17677
17686
|
}), jsx(StyledMenu$1, {
|
|
@@ -17686,12 +17695,12 @@ const DotTableBody = ({
|
|
|
17686
17695
|
});
|
|
17687
17696
|
};
|
|
17688
17697
|
|
|
17689
|
-
const rootClassName$
|
|
17698
|
+
const rootClassName$i = 'dot-table-selection-toolbar';
|
|
17690
17699
|
const StyledTableSelectionToolbar = styled(DotActionToolbar)`
|
|
17691
17700
|
${({
|
|
17692
17701
|
theme
|
|
17693
17702
|
}) => css`
|
|
17694
|
-
&.${rootClassName$
|
|
17703
|
+
&.${rootClassName$i} {
|
|
17695
17704
|
display: flex;
|
|
17696
17705
|
align-items: center;
|
|
17697
17706
|
justify-content: space-between;
|
|
@@ -17746,7 +17755,7 @@ const DotTableSelectionToolbar = ({
|
|
|
17746
17755
|
multiSelectHeader,
|
|
17747
17756
|
selectedRowsNumber
|
|
17748
17757
|
}) => {
|
|
17749
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
17758
|
+
const rootClasses = useStylesWithRootClass(rootClassName$i, className);
|
|
17750
17759
|
return jsxs(StyledTableSelectionToolbar, {
|
|
17751
17760
|
ariaLabel: ariaLabel,
|
|
17752
17761
|
className: rootClasses,
|
|
@@ -17825,7 +17834,14 @@ const DotTable = ({
|
|
|
17825
17834
|
order,
|
|
17826
17835
|
rowsPerPage
|
|
17827
17836
|
}));
|
|
17828
|
-
|
|
17837
|
+
// If the 'page' prop provided has changed since initial render, we need to update
|
|
17838
|
+
// the `tablePage` state so that it's passed to the TablePagination component.
|
|
17839
|
+
useEffect(() => {
|
|
17840
|
+
if (page !== tablePage) {
|
|
17841
|
+
setPage(page);
|
|
17842
|
+
}
|
|
17843
|
+
}, [page]);
|
|
17844
|
+
const rootClasses = useStylesWithRootClass(rootClassName$p, className, loading ? 'loading' : '', showMultiselectOverTableHeaderRow ? 'with-multiselect-over-table-header' : '', showMultiselectOverTableHeaderRow && !selectedRowsNumber ? 'hidden-multiselect' : '');
|
|
17829
17845
|
const updateData = (newOrder, newOrderBy, newPage, newRowsPerPage) => {
|
|
17830
17846
|
const newData = stableSort(data, getComparator(newOrder, newOrderBy));
|
|
17831
17847
|
setPageData(newRowsPerPage ? newData.slice(newPage * newRowsPerPage, newPage * newRowsPerPage + newRowsPerPage) : newData);
|
|
@@ -18028,7 +18044,7 @@ const DotTableAction = ({
|
|
|
18028
18044
|
});
|
|
18029
18045
|
};
|
|
18030
18046
|
|
|
18031
|
-
const rootClassName$
|
|
18047
|
+
const rootClassName$h = 'dot-table-actions';
|
|
18032
18048
|
const TableActionsContainer = styled.div`
|
|
18033
18049
|
overflow: hidden;
|
|
18034
18050
|
text-overflow: clip;
|
|
@@ -18118,7 +18134,7 @@ const DotTableActions = ({
|
|
|
18118
18134
|
};
|
|
18119
18135
|
return jsxs(Fragment, {
|
|
18120
18136
|
children: [jsxs(TableActionsContainer, {
|
|
18121
|
-
className: rootClassName$
|
|
18137
|
+
className: rootClassName$h,
|
|
18122
18138
|
ref: wrapperRef,
|
|
18123
18139
|
children: [!showMenu && renderTableActions(), (showMenu || actions.length > 2) && jsx(DotIconButton, {
|
|
18124
18140
|
ariaLabel: "more options",
|
|
@@ -18142,12 +18158,12 @@ const DotTableActions = ({
|
|
|
18142
18158
|
});
|
|
18143
18159
|
};
|
|
18144
18160
|
|
|
18145
|
-
const rootClassName$
|
|
18161
|
+
const rootClassName$g = 'dot-tabs';
|
|
18146
18162
|
const StyledTabs = styled(Tabs)`
|
|
18147
18163
|
${({
|
|
18148
18164
|
theme
|
|
18149
18165
|
}) => css`
|
|
18150
|
-
&.${rootClassName$
|
|
18166
|
+
&.${rootClassName$g} {
|
|
18151
18167
|
&.MuiTabs-root {
|
|
18152
18168
|
width: 100%;
|
|
18153
18169
|
}
|
|
@@ -18200,7 +18216,7 @@ const DotTabs = ({
|
|
|
18200
18216
|
centered = false,
|
|
18201
18217
|
className,
|
|
18202
18218
|
color,
|
|
18203
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
18219
|
+
'data-pendoid': dataPendoId = rootClassName$g,
|
|
18204
18220
|
'data-testid': dataTestId,
|
|
18205
18221
|
initialValue = 0,
|
|
18206
18222
|
onChange,
|
|
@@ -18209,7 +18225,7 @@ const DotTabs = ({
|
|
|
18209
18225
|
variant = 'standard'
|
|
18210
18226
|
}) => {
|
|
18211
18227
|
const [value, setValue] = useState(initialValue);
|
|
18212
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
18228
|
+
const rootClasses = useStylesWithRootClass(rootClassName$g, className);
|
|
18213
18229
|
useEffect(() => {
|
|
18214
18230
|
if (color) {
|
|
18215
18231
|
console.warn('DEPRECATED: `color` prop is deprecated in `<DotTabs>`, please remove any usage of it in your application.');
|
|
@@ -18263,9 +18279,9 @@ const DotTabs = ({
|
|
|
18263
18279
|
});
|
|
18264
18280
|
};
|
|
18265
18281
|
|
|
18266
|
-
const rootClassName$
|
|
18267
|
-
const containerClassName = `${rootClassName$
|
|
18268
|
-
const dropZoneClassName = `${rootClassName$
|
|
18282
|
+
const rootClassName$f = 'dot-file-upload';
|
|
18283
|
+
const containerClassName = `${rootClassName$f}-container`;
|
|
18284
|
+
const dropZoneClassName = `${rootClassName$f}-drop-zone`;
|
|
18269
18285
|
const StyledFileUploadContainer = styled.div`
|
|
18270
18286
|
${({
|
|
18271
18287
|
theme
|
|
@@ -18285,7 +18301,7 @@ const StyledFileUpload = styled.div`
|
|
|
18285
18301
|
${({
|
|
18286
18302
|
theme
|
|
18287
18303
|
}) => css`
|
|
18288
|
-
&.${rootClassName$
|
|
18304
|
+
&.${rootClassName$f}.${dropZoneClassName} {
|
|
18289
18305
|
align-items: center;
|
|
18290
18306
|
background: ${theme.palette.figma.background.level0.bckgGray};
|
|
18291
18307
|
border: 2px dashed ${theme.palette.figma.border.defaultButton};
|
|
@@ -18310,18 +18326,19 @@ const StyledFileUpload = styled.div`
|
|
|
18310
18326
|
|
|
18311
18327
|
i.dot-i {
|
|
18312
18328
|
height: 100px;
|
|
18329
|
+
width: 100px;
|
|
18313
18330
|
}
|
|
18314
18331
|
}
|
|
18315
18332
|
}
|
|
18316
18333
|
`}
|
|
18317
18334
|
`;
|
|
18318
18335
|
|
|
18319
|
-
const rootClassName$
|
|
18336
|
+
const rootClassName$e = 'dot-file-list-item';
|
|
18320
18337
|
const StyledFileListItem = styled(StyledListItem)`
|
|
18321
18338
|
${({
|
|
18322
18339
|
theme
|
|
18323
18340
|
}) => css`
|
|
18324
|
-
&.${rootClassName$
|
|
18341
|
+
&.${rootClassName$e} {
|
|
18325
18342
|
border-bottom: 1px solid ${theme.palette.figma.border.default};
|
|
18326
18343
|
&:hover {
|
|
18327
18344
|
cursor: pointer;
|
|
@@ -18333,7 +18350,7 @@ const StyledFileListItem = styled(StyledListItem)`
|
|
|
18333
18350
|
outline: none;
|
|
18334
18351
|
}
|
|
18335
18352
|
|
|
18336
|
-
&.file-success:not(:hover, :focus-visible) .${rootClassName$
|
|
18353
|
+
&.file-success:not(:hover, :focus-visible) .${rootClassName$e}-end-icon {
|
|
18337
18354
|
i:before {
|
|
18338
18355
|
color: ${theme.palette.figma.success.normal};
|
|
18339
18356
|
}
|
|
@@ -18343,7 +18360,7 @@ const StyledFileListItem = styled(StyledListItem)`
|
|
|
18343
18360
|
}
|
|
18344
18361
|
}
|
|
18345
18362
|
|
|
18346
|
-
&.file-error:not(:hover, :focus-visible) .${rootClassName$
|
|
18363
|
+
&.file-error:not(:hover, :focus-visible) .${rootClassName$e}-end-icon {
|
|
18347
18364
|
i:before,
|
|
18348
18365
|
.MuiListItemText-secondary {
|
|
18349
18366
|
color: ${theme.palette.figma.destructive.normal};
|
|
@@ -18385,7 +18402,7 @@ const DotFileListItem = ({
|
|
|
18385
18402
|
onKeyPress,
|
|
18386
18403
|
tabIndex = 0
|
|
18387
18404
|
}) => {
|
|
18388
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
18405
|
+
const rootClasses = useStylesWithRootClass(rootClassName$e, className, error ? 'file-error' : 'file-success');
|
|
18389
18406
|
const defaultIcon = error ? 'error-solid' : 'check-solid';
|
|
18390
18407
|
const [endIcon, setEndIcon] = useState(defaultIcon);
|
|
18391
18408
|
const handleItemClick = clickedFile => _event => onClick === null || onClick === void 0 ? void 0 : onClick(clickedFile);
|
|
@@ -18418,7 +18435,7 @@ const DotFileListItem = ({
|
|
|
18418
18435
|
})]
|
|
18419
18436
|
}), jsx(DotIconButton, {
|
|
18420
18437
|
ariaLabel: "delete file",
|
|
18421
|
-
className: `${rootClassName$
|
|
18438
|
+
className: `${rootClassName$e}-end-icon`,
|
|
18422
18439
|
"data-testid": dataTestId && `${dataTestId}-end-icon`,
|
|
18423
18440
|
disabled: disableDelete,
|
|
18424
18441
|
iconId: endIcon,
|
|
@@ -18542,7 +18559,7 @@ const DotFileUpload = ({
|
|
|
18542
18559
|
buttonOnly = false,
|
|
18543
18560
|
className,
|
|
18544
18561
|
contentErrors,
|
|
18545
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
18562
|
+
'data-pendoid': dataPendoId = rootClassName$f,
|
|
18546
18563
|
'data-testid': dataTestId,
|
|
18547
18564
|
disabled,
|
|
18548
18565
|
hideFilesList,
|
|
@@ -18555,7 +18572,7 @@ const DotFileUpload = ({
|
|
|
18555
18572
|
const [uploadedFiles, setUploadedFiles] = useState([]);
|
|
18556
18573
|
const [hasMaxFilesError, setHasMaxFilesError] = useState(false);
|
|
18557
18574
|
const isUploadDisabled = disabled || maxFiles && uploadedFiles.length >= maxFiles;
|
|
18558
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
18575
|
+
const rootClasses = useStylesWithRootClass(rootClassName$f, className, !buttonOnly ? dropZoneClassName : '', isUploadDisabled ? 'disabled' : '');
|
|
18559
18576
|
const maxFilesClasses = useStylesWithRootClass('dot-max-files-message', hasMaxFilesError ? 'dot-max-files-reached' : '');
|
|
18560
18577
|
const allowMultiple = maxFiles === undefined || maxFiles > 1;
|
|
18561
18578
|
const setNewlyUploadedFiles = (acceptedFiles, fileRejections) => {
|
|
@@ -18627,12 +18644,12 @@ const DotFileUpload = ({
|
|
|
18627
18644
|
});
|
|
18628
18645
|
};
|
|
18629
18646
|
|
|
18630
|
-
const rootClassName$
|
|
18647
|
+
const rootClassName$d = 'dot-divider';
|
|
18631
18648
|
const StyledDivider = styled(Divider)`
|
|
18632
18649
|
${({
|
|
18633
18650
|
theme
|
|
18634
18651
|
}) => css`
|
|
18635
|
-
&.${rootClassName$
|
|
18652
|
+
&.${rootClassName$d} {
|
|
18636
18653
|
color: ${theme.palette.figma.border.darker};
|
|
18637
18654
|
|
|
18638
18655
|
.MuiDivider-light {
|
|
@@ -18652,7 +18669,7 @@ const DotDivider = ({
|
|
|
18652
18669
|
orientation,
|
|
18653
18670
|
variant
|
|
18654
18671
|
}) => {
|
|
18655
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
18672
|
+
const rootClasses = useStylesWithRootClass(rootClassName$d, className);
|
|
18656
18673
|
return jsx(StyledDivider, {
|
|
18657
18674
|
absolute: absolute,
|
|
18658
18675
|
"aria-label": ariaLabel,
|
|
@@ -18681,7 +18698,7 @@ const DotPopper = ({
|
|
|
18681
18698
|
placement
|
|
18682
18699
|
}) => {
|
|
18683
18700
|
const [arrowRef, setArrowRef] = useState(null);
|
|
18684
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
18701
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1e, className);
|
|
18685
18702
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18686
18703
|
const handleClickAway = event => {
|
|
18687
18704
|
if (onClickAway && (!anchorEl || !anchorEl.contains(event.currentTarget))) {
|
|
@@ -18746,14 +18763,14 @@ const getListItemLayout = listItems => {
|
|
|
18746
18763
|
}));
|
|
18747
18764
|
};
|
|
18748
18765
|
|
|
18749
|
-
const rootClassName$
|
|
18766
|
+
const rootClassName$c = 'dot-draggable-list';
|
|
18750
18767
|
const listItemClassName = 'dot-draggable-list-item';
|
|
18751
18768
|
const StyledDraggableList = styled.div`
|
|
18752
18769
|
${({
|
|
18753
18770
|
theme,
|
|
18754
18771
|
draggableHandle
|
|
18755
18772
|
}) => css`
|
|
18756
|
-
&.${rootClassName$
|
|
18773
|
+
&.${rootClassName$c} {
|
|
18757
18774
|
padding: ${theme.spacing(1, 0)};
|
|
18758
18775
|
position: relative;
|
|
18759
18776
|
|
|
@@ -18788,7 +18805,7 @@ const ListGridLayout = WidthProvider(GridLayout);
|
|
|
18788
18805
|
const DotDraggableList = ({
|
|
18789
18806
|
ariaLabel,
|
|
18790
18807
|
className,
|
|
18791
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
18808
|
+
'data-pendoid': dataPendoId = rootClassName$c,
|
|
18792
18809
|
'data-testid': dataTestId,
|
|
18793
18810
|
disableDrag,
|
|
18794
18811
|
draggableHandle,
|
|
@@ -18797,7 +18814,7 @@ const DotDraggableList = ({
|
|
|
18797
18814
|
rowHeight = DEFAULT_LIST_ITEM_HEIGHT,
|
|
18798
18815
|
width = DEFAULT_LIST_WIDTH
|
|
18799
18816
|
}) => {
|
|
18800
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
18817
|
+
const rootClasses = useStylesWithRootClass(rootClassName$c, className, draggableHandle ? 'with-draggable-handle' : '');
|
|
18801
18818
|
const listItemClasses = useStylesWithRootClass(listItemClassName, draggableHandle && !disableDrag ? 'with-handle-grab-cursor' : '', draggableHandle || disableDrag ? 'with-default-cursor' : '');
|
|
18802
18819
|
const listWidth = isNumber(width) ? `${width}px` : width;
|
|
18803
18820
|
const [orderedItems, setOrderedItems] = useState([]);
|
|
@@ -52147,7 +52164,7 @@ cjs.exports.DraggableCore = DraggableCore;
|
|
|
52147
52164
|
|
|
52148
52165
|
var Draggable$1 = cjs.exports;
|
|
52149
52166
|
|
|
52150
|
-
const rootClassName$
|
|
52167
|
+
const rootClassName$b = 'dot-draggable-window';
|
|
52151
52168
|
const defaultWidth = '600px';
|
|
52152
52169
|
const defaultHeight = '324px';
|
|
52153
52170
|
const StyledPaper = styled(Paper)`
|
|
@@ -52156,7 +52173,7 @@ const StyledPaper = styled(Paper)`
|
|
|
52156
52173
|
$maxHeight,
|
|
52157
52174
|
$maxWidth
|
|
52158
52175
|
}) => css`
|
|
52159
|
-
&.${rootClassName$
|
|
52176
|
+
&.${rootClassName$b} {
|
|
52160
52177
|
max-width: ${$maxWidth !== null && $maxWidth !== void 0 ? $maxWidth : defaultWidth};
|
|
52161
52178
|
max-height: ${$maxHeight !== null && $maxHeight !== void 0 ? $maxHeight : defaultHeight};
|
|
52162
52179
|
${$maxWidth ? '' : `width: ${defaultWidth};`}
|
|
@@ -52194,7 +52211,7 @@ const StyledPaper = styled(Paper)`
|
|
|
52194
52211
|
const DotDraggableWindow = ({
|
|
52195
52212
|
ariaLabel,
|
|
52196
52213
|
anchorEl,
|
|
52197
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
52214
|
+
'data-pendoid': dataPendoId = rootClassName$b,
|
|
52198
52215
|
'data-testid': dataTestId,
|
|
52199
52216
|
className,
|
|
52200
52217
|
children,
|
|
@@ -52203,7 +52220,7 @@ const DotDraggableWindow = ({
|
|
|
52203
52220
|
onClose,
|
|
52204
52221
|
title
|
|
52205
52222
|
}) => {
|
|
52206
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
52223
|
+
const rootClasses = useStylesWithRootClass(rootClassName$b, className);
|
|
52207
52224
|
const nodeRef = useRef(null);
|
|
52208
52225
|
return jsx(Draggable$1, {
|
|
52209
52226
|
bounds: "body",
|
|
@@ -52245,12 +52262,12 @@ const DotDraggableWindow = ({
|
|
|
52245
52262
|
});
|
|
52246
52263
|
};
|
|
52247
52264
|
|
|
52248
|
-
const rootClassName$
|
|
52265
|
+
const rootClassName$a = 'dot-linear-progress';
|
|
52249
52266
|
const StyledLinearProgress = styled(LinearProgress)`
|
|
52250
52267
|
${({
|
|
52251
52268
|
theme
|
|
52252
52269
|
}) => css`
|
|
52253
|
-
&.${rootClassName$
|
|
52270
|
+
&.${rootClassName$a} {
|
|
52254
52271
|
&.MuiLinearProgress-colorError {
|
|
52255
52272
|
color: ${theme.palette.figma.inProgress.error};
|
|
52256
52273
|
}
|
|
@@ -52282,7 +52299,7 @@ const DotLinearProgress = ({
|
|
|
52282
52299
|
valueBuffer,
|
|
52283
52300
|
variant = 'indeterminate'
|
|
52284
52301
|
}) => {
|
|
52285
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
52302
|
+
const rootClasses = useStylesWithRootClass(rootClassName$a, className);
|
|
52286
52303
|
useEffect(() => {
|
|
52287
52304
|
if (!ariaLabel) {
|
|
52288
52305
|
console.warn('a11y: DotLinearProgress must have an ariaLabel to describe the progress bar');
|
|
@@ -52333,7 +52350,7 @@ const DotDatePicker = ({
|
|
|
52333
52350
|
autoFocus = false,
|
|
52334
52351
|
className,
|
|
52335
52352
|
closeOnSelect = true,
|
|
52336
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
52353
|
+
'data-pendoid': dataPendoId = rootClassName$D,
|
|
52337
52354
|
'data-testid': dataTestId,
|
|
52338
52355
|
defaultValue,
|
|
52339
52356
|
disableOpenPicker,
|
|
@@ -52374,7 +52391,7 @@ const DotDatePicker = ({
|
|
|
52374
52391
|
const hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
|
|
52375
52392
|
const isInputReadOnly = readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
|
|
52376
52393
|
const inputRef = useRef(null);
|
|
52377
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
52394
|
+
const rootClasses = useStylesWithRootClass(rootClassName$D, className, isInputReadOnly ? 'read-only' : '');
|
|
52378
52395
|
const containerClasses = useStylesWithRootClass(containerClassName$2, fullWidth ? 'full-width' : '', className);
|
|
52379
52396
|
const focusInput = ref => {
|
|
52380
52397
|
setTimeout(() => {
|
|
@@ -52594,7 +52611,7 @@ const DotTimePicker = ({
|
|
|
52594
52611
|
ariaLabel,
|
|
52595
52612
|
autoFocus = false,
|
|
52596
52613
|
className,
|
|
52597
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
52614
|
+
'data-pendoid': dataPendoId = rootClassName$C,
|
|
52598
52615
|
'data-testid': dataTestId,
|
|
52599
52616
|
defaultValue,
|
|
52600
52617
|
disableOpenPicker = false,
|
|
@@ -52626,7 +52643,7 @@ const DotTimePicker = ({
|
|
|
52626
52643
|
const hasValueWithoutChangeHandler = value !== undefined && onChange === undefined;
|
|
52627
52644
|
const hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
|
|
52628
52645
|
const isComponentReadOnly = readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
|
|
52629
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
52646
|
+
const rootClasses = useStylesWithRootClass(rootClassName$C, className, isComponentReadOnly ? 'read-only' : '');
|
|
52630
52647
|
const containerClasses = useStylesWithRootClass(containerClassName$1, fullWidth ? 'full-width' : '', className);
|
|
52631
52648
|
const inputRef = useRef(null);
|
|
52632
52649
|
const [isPickerOpened, setIsPickerOpened] = useState(false);
|
|
@@ -52918,13 +52935,13 @@ const DotTimePicker = ({
|
|
|
52918
52935
|
});
|
|
52919
52936
|
};
|
|
52920
52937
|
|
|
52921
|
-
const rootClassName$
|
|
52938
|
+
const rootClassName$9 = 'dot-carousel';
|
|
52922
52939
|
const StyledCarousel = styled.div`
|
|
52923
52940
|
${({
|
|
52924
52941
|
backgroundColor,
|
|
52925
52942
|
theme
|
|
52926
52943
|
}) => css`
|
|
52927
|
-
&.${rootClassName$
|
|
52944
|
+
&.${rootClassName$9} {
|
|
52928
52945
|
display: flex;
|
|
52929
52946
|
flex-direction: column;
|
|
52930
52947
|
justify-content: space-between;
|
|
@@ -53024,7 +53041,7 @@ const DotCarousel = ({
|
|
|
53024
53041
|
progressIndicator,
|
|
53025
53042
|
showPagesButtons = true
|
|
53026
53043
|
}) => {
|
|
53027
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
53044
|
+
const rootClasses = useStylesWithRootClass(rootClassName$9, className, backgroundColor ? 'with-background-color' : '');
|
|
53028
53045
|
const rightNavigationButtonClasses = useStylesWithRootClass('carousel-right-arrow', displayNavigationButtons);
|
|
53029
53046
|
const leftNavigationButtonClasses = useStylesWithRootClass('carousel-left-arrow', displayNavigationButtons);
|
|
53030
53047
|
const createUuids = () => {
|
|
@@ -53175,13 +53192,13 @@ const DotCarousel = ({
|
|
|
53175
53192
|
});
|
|
53176
53193
|
};
|
|
53177
53194
|
|
|
53178
|
-
const rootClassName$
|
|
53195
|
+
const rootClassName$8 = 'dot-sticky-with-border';
|
|
53179
53196
|
const StyledStickyWithBorder = styled.div`
|
|
53180
53197
|
${({
|
|
53181
53198
|
pinnedStickyBorder,
|
|
53182
53199
|
unpinnedStickyBorder
|
|
53183
53200
|
}) => css`
|
|
53184
|
-
&.${rootClassName$
|
|
53201
|
+
&.${rootClassName$8} {
|
|
53185
53202
|
position: sticky;
|
|
53186
53203
|
top: -1px;
|
|
53187
53204
|
|
|
@@ -53209,7 +53226,7 @@ const DotStickyWithBorder = ({
|
|
|
53209
53226
|
}) => {
|
|
53210
53227
|
const [isPinned, setIsPinned] = useState(false);
|
|
53211
53228
|
const ref = useRef();
|
|
53212
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
53229
|
+
const rootClasses = useStylesWithRootClass(rootClassName$8, className, isPinned ? 'pinned' : 'unpinned');
|
|
53213
53230
|
useEffect(() => {
|
|
53214
53231
|
const element = ref.current;
|
|
53215
53232
|
const observer = new IntersectionObserver(([e]) => setIsPinned(e.intersectionRatio < 1), {
|
|
@@ -53231,18 +53248,18 @@ const DotStickyWithBorder = ({
|
|
|
53231
53248
|
});
|
|
53232
53249
|
};
|
|
53233
53250
|
|
|
53234
|
-
const rootClassName$
|
|
53251
|
+
const rootClassName$7 = 'dot--board';
|
|
53235
53252
|
const classNames$5 = {
|
|
53236
|
-
root: rootClassName$
|
|
53237
|
-
spacingNormal: `${rootClassName$
|
|
53238
|
-
spacingDense: `${rootClassName$
|
|
53239
|
-
loading: `${rootClassName$
|
|
53253
|
+
root: rootClassName$7,
|
|
53254
|
+
spacingNormal: `${rootClassName$7}-normal`,
|
|
53255
|
+
spacingDense: `${rootClassName$7}-dense`,
|
|
53256
|
+
loading: `${rootClassName$7}-loading`
|
|
53240
53257
|
};
|
|
53241
53258
|
const StyledBoard = styled.div`
|
|
53242
53259
|
${({
|
|
53243
53260
|
theme
|
|
53244
53261
|
}) => css`
|
|
53245
|
-
&.${rootClassName$
|
|
53262
|
+
&.${rootClassName$7} {
|
|
53246
53263
|
display: flex;
|
|
53247
53264
|
overflow-x: auto;
|
|
53248
53265
|
flex: 1;
|
|
@@ -53250,7 +53267,7 @@ const StyledBoard = styled.div`
|
|
|
53250
53267
|
}
|
|
53251
53268
|
|
|
53252
53269
|
@media (max-width: 650px) {
|
|
53253
|
-
&.${rootClassName$
|
|
53270
|
+
&.${rootClassName$7} {
|
|
53254
53271
|
justify-content: center;
|
|
53255
53272
|
}
|
|
53256
53273
|
}
|
|
@@ -53351,18 +53368,18 @@ const Board = React__default.forwardRef(({
|
|
|
53351
53368
|
});
|
|
53352
53369
|
});
|
|
53353
53370
|
|
|
53354
|
-
const rootClassName$
|
|
53371
|
+
const rootClassName$6 = 'dot--board-column';
|
|
53355
53372
|
const classNames$4 = {
|
|
53356
|
-
root: rootClassName$
|
|
53357
|
-
spacingNormal: `${rootClassName$
|
|
53358
|
-
spacingDense: `${rootClassName$
|
|
53359
|
-
collapse: `${rootClassName$
|
|
53373
|
+
root: rootClassName$6,
|
|
53374
|
+
spacingNormal: `${rootClassName$6}-normal`,
|
|
53375
|
+
spacingDense: `${rootClassName$6}-dense`,
|
|
53376
|
+
collapse: `${rootClassName$6}-collapse`
|
|
53360
53377
|
};
|
|
53361
53378
|
const StyledBoardColumn = styled.div`
|
|
53362
53379
|
${({
|
|
53363
53380
|
theme
|
|
53364
53381
|
}) => css`
|
|
53365
|
-
&.${rootClassName$
|
|
53382
|
+
&.${rootClassName$6} {
|
|
53366
53383
|
display: flex;
|
|
53367
53384
|
flex-direction: column;
|
|
53368
53385
|
overflow: hidden;
|
|
@@ -53453,13 +53470,13 @@ const BoardColumn = React__default.forwardRef(({
|
|
|
53453
53470
|
});
|
|
53454
53471
|
});
|
|
53455
53472
|
|
|
53456
|
-
const rootClassName$
|
|
53473
|
+
const rootClassName$5 = 'dot--board-column-header';
|
|
53457
53474
|
const classNames$3 = {
|
|
53458
|
-
root: rootClassName$
|
|
53459
|
-
spacingNormal: `${rootClassName$
|
|
53460
|
-
spacingDense: `${rootClassName$
|
|
53461
|
-
colorBar: `${rootClassName$
|
|
53462
|
-
title: `${rootClassName$
|
|
53475
|
+
root: rootClassName$5,
|
|
53476
|
+
spacingNormal: `${rootClassName$5}-normal`,
|
|
53477
|
+
spacingDense: `${rootClassName$5}-dense`,
|
|
53478
|
+
colorBar: `${rootClassName$5}-color-bar`,
|
|
53479
|
+
title: `${rootClassName$5}-title`
|
|
53463
53480
|
};
|
|
53464
53481
|
const StyledBoardColumnHeader = styled.div`
|
|
53465
53482
|
${({
|
|
@@ -53527,11 +53544,11 @@ const BoardColumnHeader = ({
|
|
|
53527
53544
|
});
|
|
53528
53545
|
};
|
|
53529
53546
|
|
|
53530
|
-
const rootClassName$
|
|
53547
|
+
const rootClassName$4 = 'dot--board-column-items';
|
|
53531
53548
|
const classNames$2 = {
|
|
53532
|
-
root: rootClassName$
|
|
53533
|
-
spacingNormal: `${rootClassName$
|
|
53534
|
-
spacingDense: `${rootClassName$
|
|
53549
|
+
root: rootClassName$4,
|
|
53550
|
+
spacingNormal: `${rootClassName$4}-normal`,
|
|
53551
|
+
spacingDense: `${rootClassName$4}-dense`
|
|
53535
53552
|
};
|
|
53536
53553
|
const StyledBoardColumnItems = styled.div`
|
|
53537
53554
|
${({
|
|
@@ -53583,11 +53600,11 @@ const BoardColumnItems = ({
|
|
|
53583
53600
|
});
|
|
53584
53601
|
};
|
|
53585
53602
|
|
|
53586
|
-
const rootClassName$
|
|
53603
|
+
const rootClassName$3 = 'dot--board-column-action-bar';
|
|
53587
53604
|
const classNames$1 = {
|
|
53588
|
-
root: rootClassName$
|
|
53589
|
-
spacingNormal: `${rootClassName$
|
|
53590
|
-
spacingDense: `${rootClassName$
|
|
53605
|
+
root: rootClassName$3,
|
|
53606
|
+
spacingNormal: `${rootClassName$3}-normal`,
|
|
53607
|
+
spacingDense: `${rootClassName$3}-dense`
|
|
53591
53608
|
};
|
|
53592
53609
|
const StyledBoardColumnActionBar = styled(DotActionToolbar)`
|
|
53593
53610
|
${({
|
|
@@ -53658,13 +53675,13 @@ const BoardColumnCollapse = ({
|
|
|
53658
53675
|
return useMemo(() => collapsed ? children : null, [children, collapsed]);
|
|
53659
53676
|
};
|
|
53660
53677
|
|
|
53661
|
-
const rootClassName$
|
|
53678
|
+
const rootClassName$2 = 'dot--board-column-header';
|
|
53662
53679
|
const classNames = {
|
|
53663
|
-
root: rootClassName$
|
|
53664
|
-
spacingNormal: `${rootClassName$
|
|
53665
|
-
spacingDense: `${rootClassName$
|
|
53666
|
-
title: `${rootClassName$
|
|
53667
|
-
text: `${rootClassName$
|
|
53680
|
+
root: rootClassName$2,
|
|
53681
|
+
spacingNormal: `${rootClassName$2}-normal`,
|
|
53682
|
+
spacingDense: `${rootClassName$2}-dense`,
|
|
53683
|
+
title: `${rootClassName$2}-title`,
|
|
53684
|
+
text: `${rootClassName$2}-text`
|
|
53668
53685
|
};
|
|
53669
53686
|
const StyledBoardColumnSummary = styled.div`
|
|
53670
53687
|
${({
|
|
@@ -53726,12 +53743,12 @@ const BoardColumnSummary = ({
|
|
|
53726
53743
|
});
|
|
53727
53744
|
};
|
|
53728
53745
|
|
|
53729
|
-
const rootClassName = 'dot-search';
|
|
53746
|
+
const rootClassName$1 = 'dot-search';
|
|
53730
53747
|
const StyledSearch = styled(DotInputText)`
|
|
53731
53748
|
${({
|
|
53732
53749
|
theme
|
|
53733
53750
|
}) => css`
|
|
53734
|
-
&.${rootClassName} {
|
|
53751
|
+
&.${rootClassName$1} {
|
|
53735
53752
|
&.with-value .MuiInputBase-root {
|
|
53736
53753
|
background-color: ${theme.palette.figma.primary.light};
|
|
53737
53754
|
|
|
@@ -53774,7 +53791,7 @@ const DotSearch = _a => {
|
|
|
53774
53791
|
value
|
|
53775
53792
|
} = _a,
|
|
53776
53793
|
rest = __rest(_a, ["ariaLabel", "className", 'data-testid', "disabled", "hasDebounce", "id", "name", "onSearch", "onClear", "placeholder", "value"]);
|
|
53777
|
-
const rootClasses = useStylesWithRootClass(rootClassName, className, value ? 'with-value' : '');
|
|
53794
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1, className, value ? 'with-value' : '');
|
|
53778
53795
|
return jsx(StyledSearch, Object.assign({}, rest, {
|
|
53779
53796
|
"aria-label": ariaLabel,
|
|
53780
53797
|
className: rootClasses,
|
|
@@ -53793,4 +53810,126 @@ const DotSearch = _a => {
|
|
|
53793
53810
|
}));
|
|
53794
53811
|
};
|
|
53795
53812
|
|
|
53796
|
-
|
|
53813
|
+
const rootClassName = 'dot-toggle-switch';
|
|
53814
|
+
const StyledToggleSwitch = styled(Stack)`
|
|
53815
|
+
${({
|
|
53816
|
+
theme
|
|
53817
|
+
}) => css`
|
|
53818
|
+
&.${rootClassName} {
|
|
53819
|
+
gap: ${theme.spacing(2)};
|
|
53820
|
+
cursor: pointer;
|
|
53821
|
+
|
|
53822
|
+
.dot-options {
|
|
53823
|
+
height: ${theme.spacing(3.5)};
|
|
53824
|
+
border-radius: 999px;
|
|
53825
|
+
background-color: ${theme.palette.figma.background.level1.deep};
|
|
53826
|
+
|
|
53827
|
+
&:focus-visible {
|
|
53828
|
+
outline: none;
|
|
53829
|
+
box-shadow: 0 0 0 2px
|
|
53830
|
+
${theme.palette.figma.background.level0.bckgWhite},
|
|
53831
|
+
0 0 0 4px ${theme.palette.figma.primary.normal};
|
|
53832
|
+
}
|
|
53833
|
+
|
|
53834
|
+
.dot-chip-container {
|
|
53835
|
+
display: flex;
|
|
53836
|
+
gap: ${theme.spacing(0.25)};
|
|
53837
|
+
margin: ${theme.spacing(0.25)};
|
|
53838
|
+
|
|
53839
|
+
.dot-toggle-switch-chip {
|
|
53840
|
+
height: ${theme.spacing(3)};
|
|
53841
|
+
user-select: none;
|
|
53842
|
+
cursor: pointer;
|
|
53843
|
+
|
|
53844
|
+
.MuiChip-label {
|
|
53845
|
+
padding: ${theme.spacing(0, 1)};
|
|
53846
|
+
}
|
|
53847
|
+
|
|
53848
|
+
&:not(.selected) {
|
|
53849
|
+
background-color: transparent;
|
|
53850
|
+
}
|
|
53851
|
+
}
|
|
53852
|
+
}
|
|
53853
|
+
}
|
|
53854
|
+
|
|
53855
|
+
&.dot-disabled {
|
|
53856
|
+
&,
|
|
53857
|
+
.dot-toggle-switch-chip {
|
|
53858
|
+
cursor: default !important;
|
|
53859
|
+
}
|
|
53860
|
+
|
|
53861
|
+
.dot-toggle-switch-label {
|
|
53862
|
+
color: ${theme.palette.figma.typography.disabled};
|
|
53863
|
+
}
|
|
53864
|
+
}
|
|
53865
|
+
}
|
|
53866
|
+
`}
|
|
53867
|
+
`;
|
|
53868
|
+
|
|
53869
|
+
const DotToggleSwitch = ({
|
|
53870
|
+
ariaLabel,
|
|
53871
|
+
className,
|
|
53872
|
+
'data-pendoid': dataPendoId = rootClassName,
|
|
53873
|
+
'data-testid': dataTestId,
|
|
53874
|
+
disabled = false,
|
|
53875
|
+
label,
|
|
53876
|
+
onChange,
|
|
53877
|
+
options,
|
|
53878
|
+
value
|
|
53879
|
+
}) => {
|
|
53880
|
+
const toggleOptions = options.slice(0, 2);
|
|
53881
|
+
const isChecked = toggleOptions[1].value === value;
|
|
53882
|
+
const rootClasses = useStylesWithRootClass(rootClassName, className, disabled ? 'dot-disabled' : '');
|
|
53883
|
+
const toggleValue = () => {
|
|
53884
|
+
const [firstOption, secondOption] = toggleOptions;
|
|
53885
|
+
const newValue = value === firstOption.value ? secondOption.value : firstOption.value;
|
|
53886
|
+
onChange(newValue);
|
|
53887
|
+
};
|
|
53888
|
+
const handleKeyDown = event => {
|
|
53889
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
53890
|
+
event.preventDefault();
|
|
53891
|
+
toggleValue();
|
|
53892
|
+
}
|
|
53893
|
+
};
|
|
53894
|
+
return jsxs(StyledToggleSwitch, {
|
|
53895
|
+
className: rootClasses,
|
|
53896
|
+
"data-testid": dataTestId,
|
|
53897
|
+
"data-pendoid": dataPendoId,
|
|
53898
|
+
direction: "row",
|
|
53899
|
+
alignItems: "center",
|
|
53900
|
+
display: "inline-flex",
|
|
53901
|
+
onClick: disabled ? undefined : toggleValue,
|
|
53902
|
+
onKeyDown: handleKeyDown,
|
|
53903
|
+
children: [jsx("div", {
|
|
53904
|
+
"aria-label": ariaLabel,
|
|
53905
|
+
"aria-checked": isChecked,
|
|
53906
|
+
className: "dot-options",
|
|
53907
|
+
role: "switch",
|
|
53908
|
+
tabIndex: disabled ? -1 : 0,
|
|
53909
|
+
children: jsx("div", {
|
|
53910
|
+
className: "dot-chip-container",
|
|
53911
|
+
children: toggleOptions.map(({
|
|
53912
|
+
text: optionText,
|
|
53913
|
+
value: optionValue
|
|
53914
|
+
}) => {
|
|
53915
|
+
const isSelected = value === optionValue;
|
|
53916
|
+
const chipClasses = useStylesWithRootClass('dot-toggle-switch-chip', isSelected ? 'selected' : '');
|
|
53917
|
+
return jsx(Chip, {
|
|
53918
|
+
className: chipClasses,
|
|
53919
|
+
color: isSelected && !disabled ? 'primary' : 'default',
|
|
53920
|
+
"data-testid": dataTestId ? `${dataTestId}-chip-${optionValue}` : undefined,
|
|
53921
|
+
label: optionText,
|
|
53922
|
+
tabIndex: -1,
|
|
53923
|
+
variant: "filled"
|
|
53924
|
+
}, optionValue.toString());
|
|
53925
|
+
})
|
|
53926
|
+
})
|
|
53927
|
+
}), label && jsx(DotTypography, {
|
|
53928
|
+
className: "dot-toggle-switch-label",
|
|
53929
|
+
variant: "body1",
|
|
53930
|
+
children: label
|
|
53931
|
+
})]
|
|
53932
|
+
});
|
|
53933
|
+
};
|
|
53934
|
+
|
|
53935
|
+
export { ApiError$1 as ApiError, BoardStatusProvider, Cell, ColumnStatusProvider, CreateUUID, CssCell, CssGrid, CssGridDebug, DashboardAppTypeOptions, DashboardView, DatePickerKeydownContext, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAnnotation, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotAvatarWithDetails, DotBadge, Board as DotBoard, BoardColumn as DotBoardColumn, BoardColumnActionBar as DotBoardColumnActionBar, BoardColumnCollapse as DotBoardColumnCollapse, BoardColumnExpand as DotBoardColumnExpand, BoardColumnHeader as DotBoardColumnHeader, BoardColumnItems as DotBoardColumnItems, BoardColumnSummary as DotBoardColumnSummary, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCarousel, DotCheckbox, DotCheckboxGroup, DotChip, DotChipList, DotClickAwayListener, DotConfirmationDialog, DotCopyButton, DotCoreApiProvider, DotDashboardActions, DotDashboardDetails, DotDashboardDialog, DotDashboardHeader, DotDashboardOptionsMenu, DotDashboardPublishConfirm, DotDashboardStatusPill, DotDatePicker, DotDialog, DotDivider, DotDraggableList, DotDraggableWindow, DotDrawer, DotDynamicForm, DotEmptyFilterState, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotIllustration, DotImpactDialog, DotInlineEdit, DotInputLabel, DotInputSelect, DotInputText, DotLinearProgress, DotLink, DotList, DotMenu, DotMenuList, DotMetadataApiProvider, DotNavigationRail, DotPill, DotPopper, DotProgress, DotProgressButton, DotRadioButton, DotRadioGroup, DotSearch, DotSidebar, DotSkeleton, DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, DotSplitButton, DotStepper, DotStickyWithBorder, DotSwitch, DotTable, DotTableAction, DotTableActions, DotTablePagination, DotTabs, DotThemeProvider, DotTimePicker, DotToggleSwitch, DotTooltip, DotTruncateWithTooltip, DotTypography, avatarColors, breakpointOptions, checkIfValidDate, darkFigmaColors, lightThemeColors as lightColors, lightFigmaColors, mockScrollIntoView, parseAutoCompleteValue, variables as themeVariables, typographyOptions, useBoardStatus, useColumnStatus, useDotCoreApiContext, useDotMetadataApiContext, useDotSnackbarContext, useEnqueueErrorMessage, useKeyPress };
|