@digital-ai/dot-components 3.8.2 → 3.9.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { useState, useRef, useEffect, createContext, useMemo, useContext, forwardRef, useCallback, createElement, Fragment as Fragment$1, useLayoutEffect } from 'react';
|
|
3
|
+
import React__default, { useState, useRef, useEffect, createContext, useMemo, useContext, forwardRef, useCallback, createElement, Fragment as Fragment$1, useLayoutEffect } from 'react';
|
|
4
4
|
import { Tooltip, Icon, Typography, Accordion, AccordionSummary, AccordionDetails, AccordionActions, InputAdornment, InputLabel, TextField, Toolbar, Fade, StyledEngineProvider, Alert, Avatar, Button, Link, List, ListSubheader, Divider, CircularProgress, Popper, MenuList, MenuItem, Paper, ClickAwayListener, Drawer, IconButton, ListItem, ListItemButton, Collapse, ListItemIcon, ListItemText, Badge, useMediaQuery, Autocomplete, Chip, AvatarGroup, Breadcrumbs, ToggleButtonGroup, ToggleButton, Card, CardContent, CardHeader, FormControlLabel, Checkbox, FormControl, FormGroup, FormLabel, FormHelperText, Dialog, DialogContent, DialogActions, useTheme as useTheme$1, Snackbar, RadioGroup, Radio, Switch, Skeleton, ButtonGroup, Stepper, Step, StepLabel, StepContent, TablePagination, TableContainer, TableBody, TableCell, TableRow, TableSortLabel, TableHead, Table, Tabs, Tab, LinearProgress, Slide } from '@mui/material';
|
|
5
5
|
import '@digital-ai/dot-icons';
|
|
6
6
|
import styled, { css, createGlobalStyle, ThemeProvider as ThemeProvider$1, keyframes } from 'styled-components';
|
|
@@ -104,12 +104,12 @@ const DotTooltip = ({
|
|
|
104
104
|
}) : children;
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
const rootClassName$
|
|
107
|
+
const rootClassName$1g = 'dot-icon';
|
|
108
108
|
const StyledIcon = styled(Icon)`
|
|
109
109
|
${({
|
|
110
110
|
theme
|
|
111
111
|
}) => css`
|
|
112
|
-
&.${rootClassName$
|
|
112
|
+
&.${rootClassName$1g} {
|
|
113
113
|
color: ${theme.palette.figma.icon.black};
|
|
114
114
|
font-size: 20px;
|
|
115
115
|
|
|
@@ -146,7 +146,7 @@ const DotIcon = ({
|
|
|
146
146
|
iconId,
|
|
147
147
|
tooltip
|
|
148
148
|
}) => {
|
|
149
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
149
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1g, className);
|
|
150
150
|
return jsx(DotTooltip, {
|
|
151
151
|
title: tooltip,
|
|
152
152
|
children: jsx(StyledIcon, {
|
|
@@ -207,7 +207,7 @@ const DotTypography = ({
|
|
|
207
207
|
});
|
|
208
208
|
};
|
|
209
209
|
|
|
210
|
-
const rootClassName$
|
|
210
|
+
const rootClassName$1f = 'dot-accordion';
|
|
211
211
|
const summaryClassName = 'dot-accordion-summary';
|
|
212
212
|
const detailClassName = 'dot-accordion-details';
|
|
213
213
|
const StyledAccordion = styled(Accordion)`
|
|
@@ -218,7 +218,7 @@ const StyledAccordion = styled(Accordion)`
|
|
|
218
218
|
background: ${theme.palette.figma.background.level1.white};
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
&.${rootClassName$
|
|
221
|
+
&.${rootClassName$1f} .${summaryClassName} {
|
|
222
222
|
align-items: center;
|
|
223
223
|
background: ${theme.palette.figma.background.level1.white};
|
|
224
224
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -263,7 +263,7 @@ const DotAccordion = ({
|
|
|
263
263
|
ariaLabel,
|
|
264
264
|
children,
|
|
265
265
|
className,
|
|
266
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
266
|
+
'data-pendoid': dataPendoId = rootClassName$1f,
|
|
267
267
|
'data-testid': dataTestId = 'dot-accordion',
|
|
268
268
|
disabled = false,
|
|
269
269
|
expanded,
|
|
@@ -274,7 +274,7 @@ const DotAccordion = ({
|
|
|
274
274
|
summary,
|
|
275
275
|
noWrap = true
|
|
276
276
|
}) => {
|
|
277
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
277
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1f, className);
|
|
278
278
|
const [elevation, setElevation] = useState();
|
|
279
279
|
useEffect(() => {
|
|
280
280
|
if (onChange && expanded === undefined) {
|
|
@@ -390,7 +390,7 @@ const readOnlyStyles = theme => css`
|
|
|
390
390
|
}
|
|
391
391
|
`;
|
|
392
392
|
|
|
393
|
-
const rootClassName$
|
|
393
|
+
const rootClassName$1e = 'dot-text-field';
|
|
394
394
|
const rootSelectClassName = 'dot-select-field';
|
|
395
395
|
const labelClassName = 'dot-input-label';
|
|
396
396
|
const errorClassName = 'dot-error';
|
|
@@ -438,7 +438,7 @@ const StyledTextField = styled(TextField)`
|
|
|
438
438
|
theme,
|
|
439
439
|
InputProps
|
|
440
440
|
}) => css`
|
|
441
|
-
&.${rootClassName$
|
|
441
|
+
&.${rootClassName$1e} {
|
|
442
442
|
.MuiInputBase-root {
|
|
443
443
|
margin-bottom: 0;
|
|
444
444
|
}
|
|
@@ -482,7 +482,7 @@ const StyledTextField = styled(TextField)`
|
|
|
482
482
|
margin-right: ${theme.spacing(2)};
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
-
&.${rootSelectClassName}, &.${rootClassName$
|
|
485
|
+
&.${rootSelectClassName}, &.${rootClassName$1e} {
|
|
486
486
|
.${adornmentIconClassName} {
|
|
487
487
|
color: ${theme.palette.figma.icon.black};
|
|
488
488
|
p {
|
|
@@ -573,15 +573,15 @@ const StyledTextField = styled(TextField)`
|
|
|
573
573
|
`}
|
|
574
574
|
`;
|
|
575
575
|
|
|
576
|
-
const rootClassName$
|
|
576
|
+
const rootClassName$1d = 'dot-action-toolbar';
|
|
577
577
|
const StyledToolbar = styled(Toolbar)`
|
|
578
578
|
${({
|
|
579
579
|
theme
|
|
580
580
|
}) => css`
|
|
581
|
-
&.${rootClassName$
|
|
581
|
+
&.${rootClassName$1d} {
|
|
582
582
|
border-bottom: 1px solid ${theme.palette.figma.border.default};
|
|
583
583
|
|
|
584
|
-
.${rootClassName$
|
|
584
|
+
.${rootClassName$1e} .MuiInputBase-root {
|
|
585
585
|
margin-bottom: 0;
|
|
586
586
|
}
|
|
587
587
|
}
|
|
@@ -595,7 +595,7 @@ const DotActionToolbar = ({
|
|
|
595
595
|
'data-testid': dataTestId,
|
|
596
596
|
variant = 'dense'
|
|
597
597
|
}) => {
|
|
598
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
598
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1d, className);
|
|
599
599
|
return jsx(StyledToolbar, {
|
|
600
600
|
"aria-label": ariaLabel,
|
|
601
601
|
className: rootClasses,
|
|
@@ -1226,7 +1226,8 @@ const typographyOptions = {
|
|
|
1226
1226
|
fontFamily: 'LatoBold, sans-serif',
|
|
1227
1227
|
fontSize: 14,
|
|
1228
1228
|
lineHeight: '20px',
|
|
1229
|
-
letterSpacing: '0.03em'
|
|
1229
|
+
letterSpacing: '0.03em',
|
|
1230
|
+
fontWeight: 700
|
|
1230
1231
|
},
|
|
1231
1232
|
body1: {
|
|
1232
1233
|
fontSize: 14,
|
|
@@ -1664,12 +1665,12 @@ const renderNodeOrTypography = (content, typographyVariant = 'body1') => {
|
|
|
1664
1665
|
const checkIfArrowUpPressed = event => event.key === 'ArrowUp';
|
|
1665
1666
|
const checkIfArrowDownPressed = event => event.key === 'ArrowDown';
|
|
1666
1667
|
|
|
1667
|
-
const rootClassName$
|
|
1668
|
+
const rootClassName$1c = 'dot-alert-banner';
|
|
1668
1669
|
const StyledAlertBanner = styled(Alert)`
|
|
1669
1670
|
${({
|
|
1670
1671
|
theme
|
|
1671
1672
|
}) => css`
|
|
1672
|
-
&.${rootClassName$
|
|
1673
|
+
&.${rootClassName$1c} {
|
|
1673
1674
|
align-items: center;
|
|
1674
1675
|
box-sizing: border-box;
|
|
1675
1676
|
min-height: 48px;
|
|
@@ -1704,7 +1705,7 @@ const DotAlertBanner = ({
|
|
|
1704
1705
|
ariaLabel,
|
|
1705
1706
|
children,
|
|
1706
1707
|
className,
|
|
1707
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
1708
|
+
'data-pendoid': dataPendoId = rootClassName$1c,
|
|
1708
1709
|
'data-testid': dataTestId,
|
|
1709
1710
|
onClose,
|
|
1710
1711
|
roundedCorners = true,
|
|
@@ -1712,7 +1713,7 @@ const DotAlertBanner = ({
|
|
|
1712
1713
|
textVariant = 'body1',
|
|
1713
1714
|
width
|
|
1714
1715
|
}) => {
|
|
1715
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
1716
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1c, severity, className);
|
|
1716
1717
|
/* For simple string use default component, for everything else use 'div' */
|
|
1717
1718
|
const typographyComponent = isString$2(children) ? undefined : 'div';
|
|
1718
1719
|
return jsx(StyledAlertBanner, {
|
|
@@ -2390,7 +2391,7 @@ const useDotCoreApiContext = () => {
|
|
|
2390
2391
|
return useContext(DotCoreApiContext);
|
|
2391
2392
|
};
|
|
2392
2393
|
|
|
2393
|
-
const rootClassName$
|
|
2394
|
+
const rootClassName$1b = 'dot-avatar';
|
|
2394
2395
|
const avatarSpacing = {
|
|
2395
2396
|
small: 3,
|
|
2396
2397
|
medium: 5,
|
|
@@ -2400,7 +2401,7 @@ const StyledAvatar = styled(Avatar)`
|
|
|
2400
2401
|
${({
|
|
2401
2402
|
theme
|
|
2402
2403
|
}) => css`
|
|
2403
|
-
&.${rootClassName$
|
|
2404
|
+
&.${rootClassName$1b} {
|
|
2404
2405
|
display: inline-flex;
|
|
2405
2406
|
background-color: ${({
|
|
2406
2407
|
color
|
|
@@ -2512,7 +2513,7 @@ const DotAvatar = ({
|
|
|
2512
2513
|
variant = 'circular',
|
|
2513
2514
|
style
|
|
2514
2515
|
}) => {
|
|
2515
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2516
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1b, className);
|
|
2516
2517
|
const getAvatarColor = () => {
|
|
2517
2518
|
if ((style === null || style === void 0 ? void 0 : style.color) !== undefined) return 'inherit';
|
|
2518
2519
|
if (color) return color;
|
|
@@ -2551,12 +2552,12 @@ const DotAvatar = ({
|
|
|
2551
2552
|
});
|
|
2552
2553
|
};
|
|
2553
2554
|
|
|
2554
|
-
const rootClassName$
|
|
2555
|
+
const rootClassName$1a = 'dot-button';
|
|
2555
2556
|
const StyledButton = styled(Button)`
|
|
2556
2557
|
${({
|
|
2557
2558
|
theme
|
|
2558
2559
|
}) => css`
|
|
2559
|
-
&.${rootClassName$
|
|
2560
|
+
&.${rootClassName$1a} {
|
|
2560
2561
|
background-color: ${theme.palette.figma.primary.normal};
|
|
2561
2562
|
margin: ${theme.spacing(0.5)};
|
|
2562
2563
|
padding: ${theme.spacing(0.75, 2)};
|
|
@@ -2640,7 +2641,7 @@ const DotButton = forwardRef(({
|
|
|
2640
2641
|
autoFocus = false,
|
|
2641
2642
|
children,
|
|
2642
2643
|
className,
|
|
2643
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
2644
|
+
'data-pendoid': dataPendoId = rootClassName$1a,
|
|
2644
2645
|
'data-testid': dataTestId,
|
|
2645
2646
|
disabled = false,
|
|
2646
2647
|
disableRipple = false,
|
|
@@ -2656,7 +2657,7 @@ const DotButton = forwardRef(({
|
|
|
2656
2657
|
tooltipPlacement,
|
|
2657
2658
|
type = 'primary'
|
|
2658
2659
|
}, ref) => {
|
|
2659
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2660
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1a, className);
|
|
2660
2661
|
let color;
|
|
2661
2662
|
let variant;
|
|
2662
2663
|
switch (type) {
|
|
@@ -2680,7 +2681,7 @@ const DotButton = forwardRef(({
|
|
|
2680
2681
|
return jsx(DotTooltip, {
|
|
2681
2682
|
placement: tooltipPlacement,
|
|
2682
2683
|
title: tooltip,
|
|
2683
|
-
"data-testid": `${dataTestId || rootClassName$
|
|
2684
|
+
"data-testid": `${dataTestId || rootClassName$1a}-tooltip`,
|
|
2684
2685
|
children: jsx(StyledButton, {
|
|
2685
2686
|
"aria-label": ariaLabel,
|
|
2686
2687
|
autoFocus: autoFocus,
|
|
@@ -2689,7 +2690,7 @@ const DotButton = forwardRef(({
|
|
|
2689
2690
|
},
|
|
2690
2691
|
color: color,
|
|
2691
2692
|
"data-pendoid": dataPendoId,
|
|
2692
|
-
"data-testid": dataTestId || rootClassName$
|
|
2693
|
+
"data-testid": dataTestId || rootClassName$1a,
|
|
2693
2694
|
disableRipple: disableRipple,
|
|
2694
2695
|
disabled: disabled,
|
|
2695
2696
|
endIcon: endIcon,
|
|
@@ -2708,10 +2709,10 @@ const DotButton = forwardRef(({
|
|
|
2708
2709
|
});
|
|
2709
2710
|
});
|
|
2710
2711
|
|
|
2711
|
-
const rootClassName$
|
|
2712
|
+
const rootClassName$19 = 'dot-link';
|
|
2712
2713
|
const StyledLink = styled(Link)`
|
|
2713
2714
|
${() => css`
|
|
2714
|
-
&.${rootClassName$
|
|
2715
|
+
&.${rootClassName$19} {
|
|
2715
2716
|
cursor: pointer;
|
|
2716
2717
|
|
|
2717
2718
|
&:hover.MuiLink-underlineHover {
|
|
@@ -2727,7 +2728,7 @@ const DotLink = ({
|
|
|
2727
2728
|
children,
|
|
2728
2729
|
className,
|
|
2729
2730
|
color = 'primary',
|
|
2730
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
2731
|
+
'data-pendoid': dataPendoId = rootClassName$19,
|
|
2731
2732
|
'data-testid': dataTestId,
|
|
2732
2733
|
href,
|
|
2733
2734
|
onClick,
|
|
@@ -2739,7 +2740,7 @@ const DotLink = ({
|
|
|
2739
2740
|
tooltip,
|
|
2740
2741
|
underline = 'always'
|
|
2741
2742
|
}) => {
|
|
2742
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2743
|
+
const rootClasses = useStylesWithRootClass(rootClassName$19, className);
|
|
2743
2744
|
useEffect(() => {
|
|
2744
2745
|
// Include a console warning if the link is not a string and no ariaLabel is provided
|
|
2745
2746
|
if (!isString$2(children) && !ariaLabel) {
|
|
@@ -2789,7 +2790,7 @@ const CreateUUID = () => {
|
|
|
2789
2790
|
});
|
|
2790
2791
|
};
|
|
2791
2792
|
|
|
2792
|
-
const rootClassName$
|
|
2793
|
+
const rootClassName$18 = 'dot-list';
|
|
2793
2794
|
const listItemRootClass = 'dot-list-item';
|
|
2794
2795
|
const nestedListClassName = 'dot-nested-list';
|
|
2795
2796
|
const nestedDrawerClassName = 'dot-nested-drawer';
|
|
@@ -2797,7 +2798,7 @@ const StyledList = styled(List)`
|
|
|
2797
2798
|
${({
|
|
2798
2799
|
theme
|
|
2799
2800
|
}) => css`
|
|
2800
|
-
&.${rootClassName$
|
|
2801
|
+
&.${rootClassName$18} {
|
|
2801
2802
|
background: ${theme.palette.figma.background.level0.componentsBackground};
|
|
2802
2803
|
|
|
2803
2804
|
.dot-icon {
|
|
@@ -2880,12 +2881,12 @@ const DotListDivider = ({
|
|
|
2880
2881
|
});
|
|
2881
2882
|
};
|
|
2882
2883
|
|
|
2883
|
-
const rootClassName$
|
|
2884
|
+
const rootClassName$17 = 'dot-progress';
|
|
2884
2885
|
const StyledProgress = styled.div`
|
|
2885
2886
|
${({
|
|
2886
2887
|
theme
|
|
2887
2888
|
}) => css`
|
|
2888
|
-
&.${rootClassName$
|
|
2889
|
+
&.${rootClassName$17} {
|
|
2889
2890
|
line-height: 0;
|
|
2890
2891
|
|
|
2891
2892
|
.dot-progress-with-label-wrapper {
|
|
@@ -2936,7 +2937,7 @@ const DotProgress = ({
|
|
|
2936
2937
|
value,
|
|
2937
2938
|
variant = 'indeterminate'
|
|
2938
2939
|
}) => {
|
|
2939
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2940
|
+
const rootClasses = useStylesWithRootClass(rootClassName$17, className);
|
|
2940
2941
|
useEffect(() => {
|
|
2941
2942
|
if (!ariaLabel) {
|
|
2942
2943
|
console.warn('a11y: DotProgress must have an ariaLabel to describe the progress component');
|
|
@@ -3002,35 +3003,38 @@ var variables = /*#__PURE__*/Object.freeze({
|
|
|
3002
3003
|
levelTop: levelTop
|
|
3003
3004
|
});
|
|
3004
3005
|
|
|
3005
|
-
const rootClassName$
|
|
3006
|
+
const rootClassName$16 = 'dot-popper';
|
|
3006
3007
|
const StyledPopper$1 = styled(Popper)`
|
|
3007
3008
|
${({
|
|
3008
3009
|
theme
|
|
3009
3010
|
}) => css`
|
|
3010
|
-
&.${rootClassName$
|
|
3011
|
+
&.${rootClassName$16} {
|
|
3011
3012
|
font-family: ${theme.typography.fontFamily};
|
|
3012
3013
|
font-size: ${theme.typography.body1.fontSize}px;
|
|
3013
3014
|
}
|
|
3014
3015
|
|
|
3015
|
-
&.${rootClassName$
|
|
3016
|
+
&.${rootClassName$16}, &.${rootClassName$16} > .dot-popper-paper {
|
|
3016
3017
|
background-color: ${theme.palette.figma.background.level1.white};
|
|
3017
3018
|
}
|
|
3018
3019
|
`}
|
|
3019
3020
|
`;
|
|
3020
3021
|
|
|
3021
3022
|
const flyoutMenuClassName = 'dot-flyout-menu';
|
|
3022
|
-
const rootClassName
|
|
3023
|
-
const getListMaxHeight = maxHeight => isString$2(maxHeight) ? maxHeight : `${maxHeight}px`;
|
|
3023
|
+
const rootClassName$15 = 'dot-menu';
|
|
3024
3024
|
const StyledPopper = styled(Popper)`
|
|
3025
3025
|
${({
|
|
3026
3026
|
theme
|
|
3027
3027
|
}) => css`
|
|
3028
|
-
&.${rootClassName$
|
|
3028
|
+
&.${rootClassName$16} {
|
|
3029
3029
|
font-family: ${theme.typography.fontFamily};
|
|
3030
3030
|
font-size: ${theme.typography.body1.fontSize}px;
|
|
3031
3031
|
z-index: ${levelSecond};
|
|
3032
3032
|
}
|
|
3033
|
-
&.${rootClassName
|
|
3033
|
+
&.${rootClassName$15}, &.${rootClassName$16} {
|
|
3034
|
+
.MuiPaper-root {
|
|
3035
|
+
border: 1px solid ${theme.palette.layer.n100};
|
|
3036
|
+
}
|
|
3037
|
+
|
|
3034
3038
|
&.loading .MuiPaper-root {
|
|
3035
3039
|
align-items: center;
|
|
3036
3040
|
display: flex;
|
|
@@ -3100,19 +3104,20 @@ const StyledPopper = styled(Popper)`
|
|
|
3100
3104
|
}
|
|
3101
3105
|
`}
|
|
3102
3106
|
`;
|
|
3107
|
+
const getListMaxHeight = maxHeight => isString$2(maxHeight) ? maxHeight : `${maxHeight}px`;
|
|
3103
3108
|
|
|
3104
3109
|
const MENU_ITEM_HEIGHT_NORMAL = 48;
|
|
3105
3110
|
const MENU_ITEM_HEIGHT_DENSE = 36;
|
|
3106
3111
|
const DEFAULT_MAX_VISIBLE_ITEMS = 7;
|
|
3107
3112
|
|
|
3108
|
-
const rootClassName$
|
|
3113
|
+
const rootClassName$14 = 'dot-ul';
|
|
3109
3114
|
const listItemClassName$1 = 'dot-li';
|
|
3110
3115
|
const listItemWithSubmenuClassName = 'dot-li-with-submenu';
|
|
3111
3116
|
const StyledMenuList = styled(MenuList)`
|
|
3112
3117
|
${({
|
|
3113
3118
|
theme
|
|
3114
3119
|
}) => css`
|
|
3115
|
-
&.${rootClassName$
|
|
3120
|
+
&.${rootClassName$14} {
|
|
3116
3121
|
background: ${theme.palette.figma.background.level1.white};
|
|
3117
3122
|
|
|
3118
3123
|
.dot-li {
|
|
@@ -3208,7 +3213,7 @@ const DotMenuList = forwardRef(({
|
|
|
3208
3213
|
onSubMenuCreate,
|
|
3209
3214
|
selectedKey
|
|
3210
3215
|
}, ref) => {
|
|
3211
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3216
|
+
const rootClasses = useStylesWithRootClass(rootClassName$14, className);
|
|
3212
3217
|
const [activeSubmenu, setActiveSubmenu] = useState(null);
|
|
3213
3218
|
const [subItemAnchorEl, setSubItemAnchorEl] = useState(null);
|
|
3214
3219
|
const openSubmenu = (target, itemKey) => {
|
|
@@ -3319,7 +3324,7 @@ const DotMenu = ({
|
|
|
3319
3324
|
open = false,
|
|
3320
3325
|
selectedKey
|
|
3321
3326
|
}) => {
|
|
3322
|
-
const rootClasses = useStylesWithRootClass(rootClassName
|
|
3327
|
+
const rootClasses = useStylesWithRootClass(rootClassName$15, className, loading ? 'loading' : '');
|
|
3323
3328
|
const isSubmenu = checkIfSubmenu(anchorEl);
|
|
3324
3329
|
const hasSubItems = checkForSubItems(menuItems);
|
|
3325
3330
|
// Timeout object is customizable when Menu component is either submenu
|
|
@@ -3407,12 +3412,12 @@ const DotMenu = ({
|
|
|
3407
3412
|
});
|
|
3408
3413
|
};
|
|
3409
3414
|
|
|
3410
|
-
const rootClassName$
|
|
3415
|
+
const rootClassName$13 = 'dot-drawer';
|
|
3411
3416
|
const StyledDrawer = styled(Drawer)`
|
|
3412
3417
|
${({
|
|
3413
3418
|
theme
|
|
3414
3419
|
}) => css`
|
|
3415
|
-
&.${rootClassName$
|
|
3420
|
+
&.${rootClassName$13} .MuiBackdrop-root {
|
|
3416
3421
|
background-color: ${theme.palette.figma.overlay.default};
|
|
3417
3422
|
}
|
|
3418
3423
|
|
|
@@ -3431,12 +3436,12 @@ const StyledDrawer = styled(Drawer)`
|
|
|
3431
3436
|
`}
|
|
3432
3437
|
`;
|
|
3433
3438
|
|
|
3434
|
-
const rootClassName$
|
|
3439
|
+
const rootClassName$12 = 'dot-drawer-header';
|
|
3435
3440
|
const StyleDrawerHeader = styled.div`
|
|
3436
3441
|
${({
|
|
3437
3442
|
theme
|
|
3438
3443
|
}) => css`
|
|
3439
|
-
&.${rootClassName$
|
|
3444
|
+
&.${rootClassName$12} {
|
|
3440
3445
|
padding: ${theme.spacing(0, 0, 2)};
|
|
3441
3446
|
display: flex;
|
|
3442
3447
|
align-items: center;
|
|
@@ -3447,13 +3452,13 @@ const StyleDrawerHeader = styled.div`
|
|
|
3447
3452
|
`}
|
|
3448
3453
|
`;
|
|
3449
3454
|
|
|
3450
|
-
const rootClassName$
|
|
3455
|
+
const rootClassName$11 = 'dot-icon-btn';
|
|
3451
3456
|
const StyledIconButton = styled(IconButton)`
|
|
3452
3457
|
${({
|
|
3453
3458
|
theme,
|
|
3454
3459
|
color
|
|
3455
3460
|
}) => css`
|
|
3456
|
-
&.${rootClassName$
|
|
3461
|
+
&.${rootClassName$11} {
|
|
3457
3462
|
${color === 'inherit' ? css`
|
|
3458
3463
|
color: inherit;
|
|
3459
3464
|
` : ''}
|
|
@@ -3512,7 +3517,7 @@ const DotIconButton = ({
|
|
|
3512
3517
|
ariaRole = 'button',
|
|
3513
3518
|
className,
|
|
3514
3519
|
color = 'inherit',
|
|
3515
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
3520
|
+
'data-pendoid': dataPendoId = rootClassName$11,
|
|
3516
3521
|
'data-testid': dataTestId,
|
|
3517
3522
|
disableRipple = false,
|
|
3518
3523
|
disabled = false,
|
|
@@ -3525,7 +3530,7 @@ const DotIconButton = ({
|
|
|
3525
3530
|
tooltipPlacement
|
|
3526
3531
|
}) => {
|
|
3527
3532
|
const rippleClassName = disableRipple ? 'ripple-disabled' : '';
|
|
3528
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3533
|
+
const rootClasses = useStylesWithRootClass(rootClassName$11, rippleClassName, `shape-${shape}`, className);
|
|
3529
3534
|
return jsx(DotTooltip, {
|
|
3530
3535
|
"data-testid": "icon-button-tooltip",
|
|
3531
3536
|
placement: tooltipPlacement,
|
|
@@ -3560,7 +3565,7 @@ const DotDrawerHeader = ({
|
|
|
3560
3565
|
onClose,
|
|
3561
3566
|
variant
|
|
3562
3567
|
}) => {
|
|
3563
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3568
|
+
const rootClasses = useStylesWithRootClass(rootClassName$12, className);
|
|
3564
3569
|
return jsxs(StyleDrawerHeader, {
|
|
3565
3570
|
"aria-label": ariaLabel,
|
|
3566
3571
|
"aria-level": 2,
|
|
@@ -3577,10 +3582,10 @@ const DotDrawerHeader = ({
|
|
|
3577
3582
|
});
|
|
3578
3583
|
};
|
|
3579
3584
|
|
|
3580
|
-
const rootClassName$
|
|
3585
|
+
const rootClassName$10 = 'dot-drawer-body';
|
|
3581
3586
|
const StyleDrawerBody = styled.div`
|
|
3582
3587
|
${() => css`
|
|
3583
|
-
&.${rootClassName$
|
|
3588
|
+
&.${rootClassName$10} {
|
|
3584
3589
|
display: flex;
|
|
3585
3590
|
.dot-drawer-close-button {
|
|
3586
3591
|
align-self: self-start;
|
|
@@ -3601,7 +3606,7 @@ const DotDrawerBody = ({
|
|
|
3601
3606
|
onClose,
|
|
3602
3607
|
variant
|
|
3603
3608
|
}) => {
|
|
3604
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3609
|
+
const rootClasses = useStylesWithRootClass(rootClassName$10, className);
|
|
3605
3610
|
return jsxs(StyleDrawerBody, {
|
|
3606
3611
|
"aria-label": ariaLabel,
|
|
3607
3612
|
className: rootClasses,
|
|
@@ -3616,12 +3621,12 @@ const DotDrawerBody = ({
|
|
|
3616
3621
|
});
|
|
3617
3622
|
};
|
|
3618
3623
|
|
|
3619
|
-
const rootClassName
|
|
3624
|
+
const rootClassName$$ = 'dot-drawer-footer';
|
|
3620
3625
|
const StyleDrawerFooter = styled.div`
|
|
3621
3626
|
${({
|
|
3622
3627
|
theme
|
|
3623
3628
|
}) => css`
|
|
3624
|
-
&.${rootClassName
|
|
3629
|
+
&.${rootClassName$$} {
|
|
3625
3630
|
padding: ${theme.spacing(2, 0, 0)};
|
|
3626
3631
|
}
|
|
3627
3632
|
`}
|
|
@@ -3634,7 +3639,7 @@ const DotDrawerFooter = ({
|
|
|
3634
3639
|
className,
|
|
3635
3640
|
'data-testid': dataTestId
|
|
3636
3641
|
}) => {
|
|
3637
|
-
const rootClasses = useStylesWithRootClass(rootClassName
|
|
3642
|
+
const rootClasses = useStylesWithRootClass(rootClassName$$, className);
|
|
3638
3643
|
return jsx(StyleDrawerFooter, {
|
|
3639
3644
|
"aria-label": ariaLabel,
|
|
3640
3645
|
className: rootClasses,
|
|
@@ -3650,7 +3655,7 @@ const DotDrawer = ({
|
|
|
3650
3655
|
ariaRole = 'dialog',
|
|
3651
3656
|
className,
|
|
3652
3657
|
children,
|
|
3653
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
3658
|
+
'data-pendoid': dataPendoId = rootClassName$13,
|
|
3654
3659
|
'data-testid': dataTestId,
|
|
3655
3660
|
drawerBodyProps,
|
|
3656
3661
|
drawerFooterProps,
|
|
@@ -3673,7 +3678,7 @@ const DotDrawer = ({
|
|
|
3673
3678
|
onClose(event);
|
|
3674
3679
|
}
|
|
3675
3680
|
};
|
|
3676
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3681
|
+
const rootClasses = useStylesWithRootClass(rootClassName$13, className);
|
|
3677
3682
|
const backdropEnabled = variant === 'temporary' && !(ModalProps === null || ModalProps === void 0 ? void 0 : ModalProps.hideBackdrop);
|
|
3678
3683
|
const headerExists = !!drawerHeaderProps;
|
|
3679
3684
|
const bodyPendoId = drawerBodyProps ? drawerBodyProps['data-pendoid'] : 'drawer-body';
|
|
@@ -3755,6 +3760,14 @@ const styledListItemElement = elementType => {
|
|
|
3755
3760
|
theme
|
|
3756
3761
|
}) => css`
|
|
3757
3762
|
&.${listItemRootClass} {
|
|
3763
|
+
&.open {
|
|
3764
|
+
.dot-typography {
|
|
3765
|
+
font-weight: bold;
|
|
3766
|
+
}
|
|
3767
|
+
|
|
3768
|
+
background-color: ${theme.palette.figma.primary.light};
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3758
3771
|
& > span:first-of-type {
|
|
3759
3772
|
display: flex;
|
|
3760
3773
|
width: 100%;
|
|
@@ -3926,6 +3939,7 @@ const DotListItem = ({
|
|
|
3926
3939
|
isOpened = false,
|
|
3927
3940
|
onClick,
|
|
3928
3941
|
onKeyDown,
|
|
3942
|
+
onHrefClick,
|
|
3929
3943
|
onMenuLeave,
|
|
3930
3944
|
items = [],
|
|
3931
3945
|
menuPlacement,
|
|
@@ -3974,9 +3988,9 @@ const DotListItem = ({
|
|
|
3974
3988
|
children: text
|
|
3975
3989
|
});
|
|
3976
3990
|
const renderListItemEndIcon = () => {
|
|
3977
|
-
if (hasChildren
|
|
3991
|
+
if (hasChildren && !endIcon) {
|
|
3978
3992
|
return jsx(DotIcon, {
|
|
3979
|
-
iconId:
|
|
3993
|
+
iconId: getChevronIcon(nestedListType, navIsOpened)
|
|
3980
3994
|
});
|
|
3981
3995
|
}
|
|
3982
3996
|
return endIcon;
|
|
@@ -3985,6 +3999,7 @@ const DotListItem = ({
|
|
|
3985
3999
|
ariaLabel: ariaLabel || tooltip,
|
|
3986
4000
|
className: listItemLinkClassName,
|
|
3987
4001
|
href: href,
|
|
4002
|
+
onClick: onHrefClick,
|
|
3988
4003
|
target: target,
|
|
3989
4004
|
underline: "none",
|
|
3990
4005
|
children: [startIcon && jsx(ListItemIcon, {
|
|
@@ -4007,7 +4022,7 @@ const DotListItem = ({
|
|
|
4007
4022
|
onClick: !isLink ? handleClick : null,
|
|
4008
4023
|
onKeyDown: onKeyDown,
|
|
4009
4024
|
role: ariaRole,
|
|
4010
|
-
selected: isFlyout ?
|
|
4025
|
+
selected: isFlyout ? false : selected,
|
|
4011
4026
|
tabIndex: isLink ? -1 : 0,
|
|
4012
4027
|
target: target,
|
|
4013
4028
|
children: jsx(DotTooltip, {
|
|
@@ -4061,7 +4076,7 @@ const DotList = ({
|
|
|
4061
4076
|
nestedListType = 'expandable',
|
|
4062
4077
|
width = 240
|
|
4063
4078
|
}) => {
|
|
4064
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
4079
|
+
const rootClasses = useStylesWithRootClass(rootClassName$18, className);
|
|
4065
4080
|
const listWidth = typeof width === 'number' ? `${width}px` : width;
|
|
4066
4081
|
const listRef = useRef();
|
|
4067
4082
|
const [listItemIndex, setListItemIndex] = useState(null);
|
|
@@ -4071,6 +4086,9 @@ const DotList = ({
|
|
|
4071
4086
|
const handleClickAway = () => {
|
|
4072
4087
|
setListItemIndex(null);
|
|
4073
4088
|
};
|
|
4089
|
+
const handleHrefClick = index => () => {
|
|
4090
|
+
updateSelectedListItem(index);
|
|
4091
|
+
};
|
|
4074
4092
|
return jsx(DotClickAwayListener, {
|
|
4075
4093
|
onClickAway: handleClickAway,
|
|
4076
4094
|
children: jsxs(StyledList, {
|
|
@@ -4136,6 +4154,7 @@ const DotList = ({
|
|
|
4136
4154
|
nestedDrawerLeftSpacing: nestedDrawerLeftSpacing,
|
|
4137
4155
|
nestedListType: nestedListType,
|
|
4138
4156
|
onClick: determineOnClick,
|
|
4157
|
+
onHrefClick: item.href ? handleHrefClick(index) : undefined,
|
|
4139
4158
|
onMenuLeave: handleMenuLeave,
|
|
4140
4159
|
primaryText: item.primaryText,
|
|
4141
4160
|
secondaryText: item.secondaryText,
|
|
@@ -4151,12 +4170,12 @@ const DotList = ({
|
|
|
4151
4170
|
});
|
|
4152
4171
|
};
|
|
4153
4172
|
|
|
4154
|
-
const rootClassName$
|
|
4173
|
+
const rootClassName$_ = 'dot-copy-button';
|
|
4155
4174
|
const StyledCopyButton = styled.span`
|
|
4156
4175
|
${({
|
|
4157
4176
|
theme
|
|
4158
4177
|
}) => css`
|
|
4159
|
-
&.${rootClassName$
|
|
4178
|
+
&.${rootClassName$_} .copied-to-clipboard {
|
|
4160
4179
|
color: ${theme.palette.figma.success.normal};
|
|
4161
4180
|
|
|
4162
4181
|
&.MuiIcon-fontSizeSmall.button-size-small {
|
|
@@ -4182,7 +4201,7 @@ const DotCopyButton = ({
|
|
|
4182
4201
|
color = 'inherit',
|
|
4183
4202
|
copiedTooltip = 'Copied!',
|
|
4184
4203
|
copyTooltip = 'Copy to clipboard',
|
|
4185
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
4204
|
+
'data-pendoid': dataPendoId = rootClassName$_,
|
|
4186
4205
|
'data-testid': dataTestId = 'dot-copy-button',
|
|
4187
4206
|
disabled = false,
|
|
4188
4207
|
disableRipple = false,
|
|
@@ -4230,7 +4249,7 @@ const DotCopyButton = ({
|
|
|
4230
4249
|
return false;
|
|
4231
4250
|
}, [value, showCopiedIcon, disabled, onClick]);
|
|
4232
4251
|
return jsxs(StyledCopyButton, {
|
|
4233
|
-
className: rootClassName$
|
|
4252
|
+
className: rootClassName$_,
|
|
4234
4253
|
"data-testid": dataTestId,
|
|
4235
4254
|
children: [!timedShowCopiedIcon && jsx(DotIconButton, {
|
|
4236
4255
|
ariaLabel: ariaLabel,
|
|
@@ -4319,7 +4338,7 @@ const DotInputText = ({
|
|
|
4319
4338
|
autoFocus,
|
|
4320
4339
|
className,
|
|
4321
4340
|
defaultValue,
|
|
4322
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
4341
|
+
'data-pendoid': dataPendoId = rootClassName$1e,
|
|
4323
4342
|
'data-testid': dataTestId,
|
|
4324
4343
|
disabled = false,
|
|
4325
4344
|
error = false,
|
|
@@ -4365,7 +4384,7 @@ const DotInputText = ({
|
|
|
4365
4384
|
const internalInputRef = useRef(null);
|
|
4366
4385
|
const textFieldInputRef = inputRef || internalInputRef;
|
|
4367
4386
|
const [inputTextState, setInputTextState] = useState(getInitialState(value));
|
|
4368
|
-
const rootStyles = useStylesWithRootClass(rootClassName$
|
|
4387
|
+
const rootStyles = useStylesWithRootClass(rootClassName$1e, hasError, hasWarning, hasSuccess, readOnly && readOnlyClassName$1);
|
|
4369
4388
|
useEffect(() => {
|
|
4370
4389
|
if (value !== inputTextState.inputValue) {
|
|
4371
4390
|
setInputTextState(getInitialState(value, defaultValue));
|
|
@@ -4501,10 +4520,10 @@ const DotInputText = ({
|
|
|
4501
4520
|
});
|
|
4502
4521
|
};
|
|
4503
4522
|
|
|
4504
|
-
const rootClassName$
|
|
4523
|
+
const rootClassName$Z = 'dot-search-input';
|
|
4505
4524
|
const StyledSearchInput = styled.span`
|
|
4506
4525
|
${() => css`
|
|
4507
|
-
&.${rootClassName$
|
|
4526
|
+
&.${rootClassName$Z} {
|
|
4508
4527
|
}
|
|
4509
4528
|
`}
|
|
4510
4529
|
`;
|
|
@@ -4521,7 +4540,7 @@ function SearchInput({
|
|
|
4521
4540
|
tooltip = null,
|
|
4522
4541
|
value
|
|
4523
4542
|
}) {
|
|
4524
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
4543
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Z, className);
|
|
4525
4544
|
const [searchText, setSearchText] = useState(value);
|
|
4526
4545
|
let previousSearchText = '';
|
|
4527
4546
|
const handleChange = useCallback(event => {
|
|
@@ -4777,12 +4796,12 @@ const recentAppInstancesSetter = (latestInstance, maxRecentItems
|
|
|
4777
4796
|
};
|
|
4778
4797
|
};
|
|
4779
4798
|
|
|
4780
|
-
const rootClassName$
|
|
4799
|
+
const rootClassName$Y = 'dot-app-switcher';
|
|
4781
4800
|
const StyledAppSwitcher = styled(DotDrawer)`
|
|
4782
4801
|
${({
|
|
4783
4802
|
theme
|
|
4784
4803
|
}) => css`
|
|
4785
|
-
&.${rootClassName$
|
|
4804
|
+
&.${rootClassName$Y} {
|
|
4786
4805
|
.dot-drawer-paper {
|
|
4787
4806
|
padding: 0;
|
|
4788
4807
|
width: 382px;
|
|
@@ -4892,7 +4911,7 @@ const DotAppSwitcherView = ({
|
|
|
4892
4911
|
if (dotCoreApiContext !== null) {
|
|
4893
4912
|
setSelectedAppType = dotCoreApiContext.setSelectedAppSwitcherAppType;
|
|
4894
4913
|
}
|
|
4895
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
4914
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Y, className);
|
|
4896
4915
|
const [appTypeMap, setAppTypeMap] = useState();
|
|
4897
4916
|
const [appTypeLabels, setAppTypeLabels] = useState();
|
|
4898
4917
|
const [appTypeMenuItems, setAppTypeMenuItems] = useState();
|
|
@@ -5270,12 +5289,12 @@ var SvgLogoDigitalAiWhite = function SvgLogoDigitalAiWhite(_ref, ref) {
|
|
|
5270
5289
|
};
|
|
5271
5290
|
var ForwardRef = /*#__PURE__*/forwardRef(SvgLogoDigitalAiWhite);
|
|
5272
5291
|
|
|
5273
|
-
const rootClassName$
|
|
5292
|
+
const rootClassName$X = 'dot-sidebar';
|
|
5274
5293
|
const StyledSidebar = styled.aside`
|
|
5275
5294
|
${({
|
|
5276
5295
|
theme
|
|
5277
5296
|
}) => css`
|
|
5278
|
-
&.${rootClassName$
|
|
5297
|
+
&.${rootClassName$X} {
|
|
5279
5298
|
align-items: stretch;
|
|
5280
5299
|
background: ${theme.palette.figma.background.level1.white};
|
|
5281
5300
|
border-width: 0 1px;
|
|
@@ -5428,7 +5447,7 @@ const StyledSidebar = styled.aside`
|
|
|
5428
5447
|
}
|
|
5429
5448
|
|
|
5430
5449
|
&:hover {
|
|
5431
|
-
background-color: ${theme.palette.figma.overlay.table.
|
|
5450
|
+
background-color: ${theme.palette.figma.overlay.table.hoverRow};
|
|
5432
5451
|
color: ${theme.palette.figma.toggleTabs.text};
|
|
5433
5452
|
|
|
5434
5453
|
.dot-typography,
|
|
@@ -5569,10 +5588,10 @@ const StyledSidebar = styled.aside`
|
|
|
5569
5588
|
`}
|
|
5570
5589
|
`;
|
|
5571
5590
|
|
|
5572
|
-
const rootClassName$
|
|
5591
|
+
const rootClassName$W = 'dot-truncate-with-tooltip';
|
|
5573
5592
|
const StyledTruncateWithTooltip = styled(Tooltip)`
|
|
5574
5593
|
${() => css`
|
|
5575
|
-
&.${rootClassName$
|
|
5594
|
+
&.${rootClassName$W} {
|
|
5576
5595
|
display: block;
|
|
5577
5596
|
overflow: hidden;
|
|
5578
5597
|
white-space: nowrap;
|
|
@@ -5603,7 +5622,7 @@ const DotTruncateWithTooltip = ({
|
|
|
5603
5622
|
label,
|
|
5604
5623
|
width
|
|
5605
5624
|
}) => {
|
|
5606
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
5625
|
+
const rootClasses = useStylesWithRootClass(rootClassName$W, className, charactersLimit ? 'dot-characters-limit' : '');
|
|
5607
5626
|
return jsx(StyledTruncateWithTooltip, {
|
|
5608
5627
|
"aria-label": ariaLabel,
|
|
5609
5628
|
arrow: arrow,
|
|
@@ -5726,7 +5745,7 @@ const DotSidebar = ({
|
|
|
5726
5745
|
};
|
|
5727
5746
|
}, [isOpen]);
|
|
5728
5747
|
const sidebarClasses = useStylesWithRootClass('side-nav', openClass);
|
|
5729
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
5748
|
+
const rootClasses = useStylesWithRootClass(rootClassName$X, openClass, className);
|
|
5730
5749
|
return jsxs(StyledSidebar, {
|
|
5731
5750
|
"aria-label": ariaLabel,
|
|
5732
5751
|
className: rootClasses,
|
|
@@ -5794,12 +5813,12 @@ const DotSidebar = ({
|
|
|
5794
5813
|
});
|
|
5795
5814
|
};
|
|
5796
5815
|
|
|
5797
|
-
const rootClassName$
|
|
5816
|
+
const rootClassName$V = 'dot-badge';
|
|
5798
5817
|
const StyledBadge = styled(Badge)`
|
|
5799
5818
|
${({
|
|
5800
5819
|
theme
|
|
5801
5820
|
}) => css`
|
|
5802
|
-
&.${rootClassName$
|
|
5821
|
+
&.${rootClassName$V} {
|
|
5803
5822
|
color: ${theme.palette.figma.typography.black};
|
|
5804
5823
|
word-break: normal;
|
|
5805
5824
|
|
|
@@ -5834,7 +5853,7 @@ const DotBadge = ({
|
|
|
5834
5853
|
overlap,
|
|
5835
5854
|
variant = 'dot'
|
|
5836
5855
|
}) => {
|
|
5837
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
5856
|
+
const rootClasses = useStylesWithRootClass(rootClassName$V, className);
|
|
5838
5857
|
return jsx(StyledBadge, {
|
|
5839
5858
|
"$badgeColor": badgeColor,
|
|
5840
5859
|
anchorOrigin: {
|
|
@@ -5856,7 +5875,7 @@ const DotBadge = ({
|
|
|
5856
5875
|
});
|
|
5857
5876
|
};
|
|
5858
5877
|
|
|
5859
|
-
const rootClassName$
|
|
5878
|
+
const rootClassName$U = 'dot-app-toolbar';
|
|
5860
5879
|
const denseClassName = 'dense';
|
|
5861
5880
|
const StyledMainMenu = styled(DotDrawer)`
|
|
5862
5881
|
${({
|
|
@@ -5896,7 +5915,7 @@ const StyledAppToolbar = styled.header`
|
|
|
5896
5915
|
${({
|
|
5897
5916
|
theme
|
|
5898
5917
|
}) => css`
|
|
5899
|
-
&.${rootClassName$
|
|
5918
|
+
&.${rootClassName$U} {
|
|
5900
5919
|
align-items: center;
|
|
5901
5920
|
background: ${theme.palette.figma.appToolbar.background};
|
|
5902
5921
|
border-bottom: 4px solid ${theme.palette.figma.border.default};
|
|
@@ -6018,7 +6037,7 @@ const DotAppToolbar = ({
|
|
|
6018
6037
|
const displayAppLogo = appLogo || appLogoSmall;
|
|
6019
6038
|
const mainMenuRef = useRef(null);
|
|
6020
6039
|
const denseClass = dense ? denseClassName : '';
|
|
6021
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6040
|
+
const rootClasses = useStylesWithRootClass(rootClassName$U, className, denseClass, showMainMenu ? '' : 'without-menu-icon');
|
|
6022
6041
|
const mainMenuClasses = useStylesWithRootClass('dot-main-menu', denseClass, menuOpen ? 'open' : '');
|
|
6023
6042
|
const targetBreakpoint = useMediaQuery(theme => theme.breakpoints.up('lg'));
|
|
6024
6043
|
useEffect(() => {
|
|
@@ -6148,14 +6167,14 @@ const DotAppToolbar = ({
|
|
|
6148
6167
|
}) : appToolbar;
|
|
6149
6168
|
};
|
|
6150
6169
|
|
|
6151
|
-
const rootClassName$
|
|
6170
|
+
const rootClassName$T = 'dot-autocomplete';
|
|
6152
6171
|
const inputRootClassName = 'dot-input-root';
|
|
6153
6172
|
const inputMediumClassName = 'dot-input-medium';
|
|
6154
6173
|
const StyledAutocomplete = styled(Autocomplete)`
|
|
6155
6174
|
${({
|
|
6156
6175
|
theme
|
|
6157
6176
|
}) => css`
|
|
6158
|
-
&.${rootClassName$
|
|
6177
|
+
&.${rootClassName$T} {
|
|
6159
6178
|
&.${inputMediumClassName} .dot-text-field .${inputRootClassName} {
|
|
6160
6179
|
height: 56px;
|
|
6161
6180
|
padding-left: ${theme.spacing(2)};
|
|
@@ -6168,8 +6187,8 @@ const StyledAutocomplete = styled(Autocomplete)`
|
|
|
6168
6187
|
|
|
6169
6188
|
.${inputRootClassName} {
|
|
6170
6189
|
/* Override only top/bottom, but preserve left/right padding */
|
|
6171
|
-
padding-top: ${theme.spacing(
|
|
6172
|
-
padding-bottom: ${theme.spacing(
|
|
6190
|
+
padding-top: ${theme.spacing(1)};
|
|
6191
|
+
padding-bottom: ${theme.spacing(1)};
|
|
6173
6192
|
}
|
|
6174
6193
|
|
|
6175
6194
|
.dot-chip:first-child {
|
|
@@ -6192,12 +6211,12 @@ const StyledAutocomplete = styled(Autocomplete)`
|
|
|
6192
6211
|
`}
|
|
6193
6212
|
`;
|
|
6194
6213
|
|
|
6195
|
-
const rootClassName$
|
|
6214
|
+
const rootClassName$S = 'dot-chip';
|
|
6196
6215
|
const StyledChip = styled(Chip)`
|
|
6197
6216
|
${({
|
|
6198
6217
|
theme
|
|
6199
6218
|
}) => css`
|
|
6200
|
-
&.${rootClassName$
|
|
6219
|
+
&.${rootClassName$S} {
|
|
6201
6220
|
background: ${theme.palette.figma.neutral.normal};
|
|
6202
6221
|
border-color: ${theme.palette.figma.border.darker};
|
|
6203
6222
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -6303,7 +6322,7 @@ const DotChip = ({
|
|
|
6303
6322
|
charactersLimit = DEFAULT_CHARACTERS_LIMIT,
|
|
6304
6323
|
children,
|
|
6305
6324
|
className,
|
|
6306
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
6325
|
+
'data-pendoid': dataPendoId = rootClassName$S,
|
|
6307
6326
|
'data-testid': dataTestId,
|
|
6308
6327
|
disabled = false,
|
|
6309
6328
|
error = false,
|
|
@@ -6316,7 +6335,7 @@ const DotChip = ({
|
|
|
6316
6335
|
tabIndex
|
|
6317
6336
|
}) => {
|
|
6318
6337
|
const errorClass = error ? 'Mui-error' : '';
|
|
6319
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6338
|
+
const rootClasses = useStylesWithRootClass(rootClassName$S, className, errorClass);
|
|
6320
6339
|
const getChipLabel = () => {
|
|
6321
6340
|
if (charactersLimit <= 0 || children.length < charactersLimit) return children;
|
|
6322
6341
|
const label = `${children.substring(0, charactersLimit)}...`;
|
|
@@ -6416,7 +6435,7 @@ const DotAutoComplete = ({
|
|
|
6416
6435
|
autoFocus,
|
|
6417
6436
|
autoHighlight,
|
|
6418
6437
|
className,
|
|
6419
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
6438
|
+
'data-pendoid': dataPendoId = rootClassName$T,
|
|
6420
6439
|
'data-testid': dataTestId,
|
|
6421
6440
|
defaultValue,
|
|
6422
6441
|
dense = true,
|
|
@@ -6468,10 +6487,10 @@ const DotAutoComplete = ({
|
|
|
6468
6487
|
const popperOpen = !readOnly && (open || isOpened);
|
|
6469
6488
|
const preventDuplicateInsertion = actionItem === null || actionItem === void 0 ? void 0 : actionItem.preventDuplicateInsertion;
|
|
6470
6489
|
const textFieldWarningClassName = !error && warning && warningClassName;
|
|
6471
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6472
|
-
const textFieldRootClasses = useStylesWithRootClass(rootClassName$
|
|
6490
|
+
const rootClasses = useStylesWithRootClass(rootClassName$T, size === 'medium' && inputMediumClassName, className);
|
|
6491
|
+
const textFieldRootClasses = useStylesWithRootClass(rootClassName$1e, readOnly && readOnlyClassName$1, textFieldWarningClassName);
|
|
6473
6492
|
const inputRootClasses = useStylesWithRootClass(inputRootClassName, !dense && inputMediumClassName);
|
|
6474
|
-
const popperClasses = useStylesWithRootClass(rootClassName$
|
|
6493
|
+
const popperClasses = useStylesWithRootClass(rootClassName$16, popperClassName);
|
|
6475
6494
|
let highlightedOption = null;
|
|
6476
6495
|
let textFieldInput;
|
|
6477
6496
|
const textFieldRef = element => {
|
|
@@ -6748,10 +6767,10 @@ const DotAutoComplete = ({
|
|
|
6748
6767
|
});
|
|
6749
6768
|
};
|
|
6750
6769
|
|
|
6751
|
-
const rootClassName$
|
|
6770
|
+
const rootClassName$R = 'dot-avatar-group';
|
|
6752
6771
|
const StyledAvatarGroup = styled(AvatarGroup)`
|
|
6753
6772
|
${() => css`
|
|
6754
|
-
&.${rootClassName$
|
|
6773
|
+
&.${rootClassName$R} {
|
|
6755
6774
|
justify-content: flex-end;
|
|
6756
6775
|
|
|
6757
6776
|
.MuiAvatar-root {
|
|
@@ -6770,7 +6789,7 @@ const DotAvatarGroup = ({
|
|
|
6770
6789
|
max = 3,
|
|
6771
6790
|
spacing = 'medium'
|
|
6772
6791
|
}) => {
|
|
6773
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6792
|
+
const rootClasses = useStylesWithRootClass(rootClassName$R, className);
|
|
6774
6793
|
return jsx(StyledAvatarGroup, {
|
|
6775
6794
|
"aria-label": ariaLabel,
|
|
6776
6795
|
classes: {
|
|
@@ -6785,13 +6804,13 @@ const DotAvatarGroup = ({
|
|
|
6785
6804
|
});
|
|
6786
6805
|
};
|
|
6787
6806
|
|
|
6788
|
-
const rootClassName$
|
|
6807
|
+
const rootClassName$Q = 'dot-breadcrumbs';
|
|
6789
6808
|
const breadcrumbsWrapperClass = 'dot-breadcrumbs-wrapper';
|
|
6790
6809
|
const StyledBreadcrumbsWrapper = styled.div`
|
|
6791
6810
|
${({
|
|
6792
6811
|
theme
|
|
6793
6812
|
}) => css`
|
|
6794
|
-
&.${rootClassName$
|
|
6813
|
+
&.${rootClassName$Q} {
|
|
6795
6814
|
overflow: hidden;
|
|
6796
6815
|
|
|
6797
6816
|
.dot-breadcrumbs-menu {
|
|
@@ -6811,7 +6830,7 @@ const StyledBreadcrumbs = styled(Breadcrumbs)`
|
|
|
6811
6830
|
${({
|
|
6812
6831
|
theme
|
|
6813
6832
|
}) => css`
|
|
6814
|
-
&.${rootClassName$
|
|
6833
|
+
&.${rootClassName$Q} {
|
|
6815
6834
|
margin-bottom: 0;
|
|
6816
6835
|
|
|
6817
6836
|
.MuiBreadcrumbs-ol {
|
|
@@ -7139,7 +7158,7 @@ const DotBreadcrumbs = ({
|
|
|
7139
7158
|
children: [jsx(StyledBreadcrumbs, {
|
|
7140
7159
|
"aria-label": "breadcrumb",
|
|
7141
7160
|
classes: {
|
|
7142
|
-
root: rootClassName$
|
|
7161
|
+
root: rootClassName$Q,
|
|
7143
7162
|
ol: 'dot-ol',
|
|
7144
7163
|
li: 'dot-li'
|
|
7145
7164
|
},
|
|
@@ -7170,14 +7189,14 @@ const DotBreadcrumbs = ({
|
|
|
7170
7189
|
});
|
|
7171
7190
|
};
|
|
7172
7191
|
|
|
7173
|
-
const rootClassName$
|
|
7192
|
+
const rootClassName$P = 'dot-button-toggle';
|
|
7174
7193
|
// TODO: need to update ripple color
|
|
7175
7194
|
// https://github.com/mui/material-ui/issues/28543
|
|
7176
7195
|
const StyledToggleButtonGroup = styled(ToggleButtonGroup)`
|
|
7177
7196
|
${({
|
|
7178
7197
|
theme
|
|
7179
7198
|
}) => css`
|
|
7180
|
-
&.${rootClassName$
|
|
7199
|
+
&.${rootClassName$P} {
|
|
7181
7200
|
button:not(.MuiToggleButton-sizeLarge):not(.MuiToggleButton-sizeSmall) {
|
|
7182
7201
|
/* Override height for medium size */
|
|
7183
7202
|
height: ${theme.spacing(5)};
|
|
@@ -7293,7 +7312,7 @@ const DotButtonToggle = ({
|
|
|
7293
7312
|
buttonOptions,
|
|
7294
7313
|
className,
|
|
7295
7314
|
color,
|
|
7296
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
7315
|
+
'data-pendoid': dataPendoId = rootClassName$P,
|
|
7297
7316
|
'data-testid': dataTestId = 'dot-toggle',
|
|
7298
7317
|
disableFocusRipple = false,
|
|
7299
7318
|
disableRipple = false,
|
|
@@ -7303,7 +7322,7 @@ const DotButtonToggle = ({
|
|
|
7303
7322
|
size = 'medium',
|
|
7304
7323
|
value
|
|
7305
7324
|
}) => {
|
|
7306
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7325
|
+
const rootClasses = useStylesWithRootClass(rootClassName$P, className);
|
|
7307
7326
|
const renderToggleButton = ({
|
|
7308
7327
|
ariaLabel: optionAriaLabel,
|
|
7309
7328
|
badgeContent: optionBadgeContent,
|
|
@@ -7386,12 +7405,12 @@ const TooltipToggleButton = forwardRef((_a, ref) => {
|
|
|
7386
7405
|
}));
|
|
7387
7406
|
});
|
|
7388
7407
|
|
|
7389
|
-
const rootClassName$
|
|
7408
|
+
const rootClassName$O = 'dot-card';
|
|
7390
7409
|
const StyledCard = styled(Card)`
|
|
7391
7410
|
${({
|
|
7392
7411
|
theme
|
|
7393
7412
|
}) => css`
|
|
7394
|
-
&.${rootClassName$
|
|
7413
|
+
&.${rootClassName$O} {
|
|
7395
7414
|
background-color: ${theme.palette.figma.background.level1.white};
|
|
7396
7415
|
}
|
|
7397
7416
|
`}
|
|
@@ -7403,7 +7422,7 @@ const DotCard = ({
|
|
|
7403
7422
|
className,
|
|
7404
7423
|
'data-testid': dataTestId
|
|
7405
7424
|
}) => {
|
|
7406
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7425
|
+
const rootClasses = useStylesWithRootClass(rootClassName$O, className);
|
|
7407
7426
|
return jsx(StyledCard, {
|
|
7408
7427
|
"aria-label": ariaLabel,
|
|
7409
7428
|
classes: {
|
|
@@ -7432,12 +7451,12 @@ const DotCardContent = ({
|
|
|
7432
7451
|
});
|
|
7433
7452
|
};
|
|
7434
7453
|
|
|
7435
|
-
const rootClassName$
|
|
7454
|
+
const rootClassName$N = 'dot-card-footer';
|
|
7436
7455
|
const StyledDiv = styled.div`
|
|
7437
7456
|
${({
|
|
7438
7457
|
theme
|
|
7439
7458
|
}) => css`
|
|
7440
|
-
&.${rootClassName$
|
|
7459
|
+
&.${rootClassName$N} {
|
|
7441
7460
|
padding: ${theme.spacing(2)};
|
|
7442
7461
|
}
|
|
7443
7462
|
`}
|
|
@@ -7449,7 +7468,7 @@ const DotCardFooter = ({
|
|
|
7449
7468
|
className,
|
|
7450
7469
|
'data-testid': dataTestId
|
|
7451
7470
|
}) => {
|
|
7452
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7471
|
+
const rootClasses = useStylesWithRootClass(rootClassName$N, className);
|
|
7453
7472
|
return jsx(StyledDiv, {
|
|
7454
7473
|
"aria-label": ariaLabel,
|
|
7455
7474
|
className: rootClasses,
|
|
@@ -7493,9 +7512,9 @@ const DotCardHeader = ({
|
|
|
7493
7512
|
});
|
|
7494
7513
|
};
|
|
7495
7514
|
|
|
7496
|
-
const rootClassName$
|
|
7515
|
+
const rootClassName$M = 'dot-form-control-label';
|
|
7497
7516
|
const StyledFormControlLabel = styled(FormControlLabel)`
|
|
7498
|
-
&.${rootClassName$
|
|
7517
|
+
&.${rootClassName$M} {
|
|
7499
7518
|
.MuiFormControlLabel-label {
|
|
7500
7519
|
margin-bottom: 0;
|
|
7501
7520
|
padding: 0 0 0 4px;
|
|
@@ -7518,12 +7537,12 @@ const StyledFormControlLabel = styled(FormControlLabel)`
|
|
|
7518
7537
|
}
|
|
7519
7538
|
`;
|
|
7520
7539
|
|
|
7521
|
-
const rootClassName$
|
|
7540
|
+
const rootClassName$L = 'dot-checkbox';
|
|
7522
7541
|
const StyledCheckbox = styled(Checkbox)`
|
|
7523
7542
|
${({
|
|
7524
7543
|
theme
|
|
7525
7544
|
}) => css`
|
|
7526
|
-
&.${rootClassName$
|
|
7545
|
+
&.${rootClassName$L} {
|
|
7527
7546
|
padding: ${theme.spacing(1)};
|
|
7528
7547
|
|
|
7529
7548
|
&.MuiCheckbox-indeterminate {
|
|
@@ -7542,7 +7561,7 @@ function DotCheckbox({
|
|
|
7542
7561
|
ariaLabelledby,
|
|
7543
7562
|
checked,
|
|
7544
7563
|
className,
|
|
7545
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
7564
|
+
'data-pendoid': dataPendoId = rootClassName$M,
|
|
7546
7565
|
'data-testid': dataTestId,
|
|
7547
7566
|
disabled,
|
|
7548
7567
|
disableRipple,
|
|
@@ -7557,14 +7576,14 @@ function DotCheckbox({
|
|
|
7557
7576
|
size = 'medium',
|
|
7558
7577
|
value
|
|
7559
7578
|
}) {
|
|
7560
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7579
|
+
const rootClasses = useStylesWithRootClass(rootClassName$M, className);
|
|
7561
7580
|
const handleChange = event => {
|
|
7562
7581
|
onChange && onChange(event, event.target.value);
|
|
7563
7582
|
};
|
|
7564
7583
|
const checkboxControl = jsx(StyledCheckbox, {
|
|
7565
7584
|
checked: checked,
|
|
7566
7585
|
classes: {
|
|
7567
|
-
root: rootClassName$
|
|
7586
|
+
root: rootClassName$L
|
|
7568
7587
|
},
|
|
7569
7588
|
color: "primary",
|
|
7570
7589
|
"data-pendoid": dataPendoId,
|
|
@@ -7593,13 +7612,13 @@ function DotCheckbox({
|
|
|
7593
7612
|
});
|
|
7594
7613
|
}
|
|
7595
7614
|
|
|
7596
|
-
const rootClassName$
|
|
7615
|
+
const rootClassName$K = 'dot-form-group';
|
|
7597
7616
|
const groupLabelClassName = 'dot-form-group-label';
|
|
7598
7617
|
const startAdornmentClassName = 'dot-start-adornment';
|
|
7599
7618
|
const endAdornmentClassName = 'dot-end-adornment';
|
|
7600
7619
|
const placementClassName = 'dot-';
|
|
7601
7620
|
const StyledFormControl = styled(FormControl)`
|
|
7602
|
-
&.${rootClassName$
|
|
7621
|
+
&.${rootClassName$K} {
|
|
7603
7622
|
.MuiFormLabel-root {
|
|
7604
7623
|
width: 100%;
|
|
7605
7624
|
line-height: 24px;
|
|
@@ -7630,7 +7649,7 @@ const StyledFormControl = styled(FormControl)`
|
|
|
7630
7649
|
}
|
|
7631
7650
|
`;
|
|
7632
7651
|
|
|
7633
|
-
const rootClassName$
|
|
7652
|
+
const rootClassName$J = 'dot-checkbox-group';
|
|
7634
7653
|
const wrapperClassName$1 = 'dot-checkbox-group-wrapper';
|
|
7635
7654
|
const checkboxListClassName = 'dot-checkbox-list';
|
|
7636
7655
|
const checkboxListItemClassName = 'dot-checkbox-list-item';
|
|
@@ -7639,13 +7658,17 @@ const StyledCheckboxGroup = styled.div`
|
|
|
7639
7658
|
theme
|
|
7640
7659
|
}) => css`{
|
|
7641
7660
|
&.${wrapperClassName$1} {
|
|
7642
|
-
.${rootClassName$
|
|
7661
|
+
.${rootClassName$J} {
|
|
7643
7662
|
width: 100%;
|
|
7644
7663
|
}
|
|
7645
7664
|
|
|
7646
7665
|
.MuiFormLabel-root {
|
|
7647
7666
|
display: inline;
|
|
7648
7667
|
width: 100%;
|
|
7668
|
+
font-weight: ${theme.typography.subtitle2.fontWeight};
|
|
7669
|
+
&:not(.Mui-error) {
|
|
7670
|
+
color: ${theme.palette.figma.typography.black};
|
|
7671
|
+
}
|
|
7649
7672
|
}
|
|
7650
7673
|
|
|
7651
7674
|
.MuiFormHelperText-root {
|
|
@@ -7662,7 +7685,7 @@ const StyledCheckboxGroup = styled.div`
|
|
|
7662
7685
|
margin-top: 0;
|
|
7663
7686
|
padding-left: ${theme.spacing(2.5)};
|
|
7664
7687
|
|
|
7665
|
-
.${rootClassName$
|
|
7688
|
+
.${rootClassName$M} {
|
|
7666
7689
|
margin: 0;
|
|
7667
7690
|
}
|
|
7668
7691
|
}
|
|
@@ -7670,13 +7693,13 @@ const StyledCheckboxGroup = styled.div`
|
|
|
7670
7693
|
`}
|
|
7671
7694
|
`;
|
|
7672
7695
|
|
|
7673
|
-
const rootClassName$
|
|
7696
|
+
const rootClassName$I = 'dot-form-group';
|
|
7674
7697
|
const StyledFormGroup = styled(FormGroup)`
|
|
7675
7698
|
${({
|
|
7676
7699
|
theme,
|
|
7677
7700
|
row
|
|
7678
7701
|
}) => css`
|
|
7679
|
-
&.${rootClassName$
|
|
7702
|
+
&.${rootClassName$I} > * {
|
|
7680
7703
|
margin: ${row ? `${theme.spacing(0.5)}` : 0};
|
|
7681
7704
|
}
|
|
7682
7705
|
`}
|
|
@@ -7689,7 +7712,7 @@ function DotFormGroup({
|
|
|
7689
7712
|
'data-testid': dataTestId,
|
|
7690
7713
|
row
|
|
7691
7714
|
}) {
|
|
7692
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7715
|
+
const rootClasses = useStylesWithRootClass(rootClassName$K, className);
|
|
7693
7716
|
return jsx(StyledFormGroup, {
|
|
7694
7717
|
"aria-label": ariaLabel,
|
|
7695
7718
|
classes: {
|
|
@@ -7728,7 +7751,7 @@ function DotCheckboxGroup({
|
|
|
7728
7751
|
size = 'medium'
|
|
7729
7752
|
}) {
|
|
7730
7753
|
const placement = `${placementClassName}${labelPlacement}`;
|
|
7731
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7754
|
+
const rootClasses = useStylesWithRootClass(rootClassName$K, rootClassName$J, className, placement);
|
|
7732
7755
|
const [selectedOptions, setSelectedOptions] = useState(defaultValues);
|
|
7733
7756
|
const [allChecked, setAllChecked] = useState(false);
|
|
7734
7757
|
/* This will ensure that state can be updated from the outside */
|
|
@@ -7813,12 +7836,12 @@ function DotCheckboxGroup({
|
|
|
7813
7836
|
});
|
|
7814
7837
|
}
|
|
7815
7838
|
|
|
7816
|
-
const rootClassName$
|
|
7839
|
+
const rootClassName$H = 'dot-dialog';
|
|
7817
7840
|
const StyledDialog = styled(Dialog)`
|
|
7818
7841
|
${({
|
|
7819
7842
|
theme
|
|
7820
7843
|
}) => css`
|
|
7821
|
-
&.${rootClassName$
|
|
7844
|
+
&.${rootClassName$H} {
|
|
7822
7845
|
.MuiDialog-paper {
|
|
7823
7846
|
background: ${theme.palette.figma.background.level1.white};
|
|
7824
7847
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -7864,7 +7887,7 @@ const DotDialog = ({
|
|
|
7864
7887
|
cancelButtonProps,
|
|
7865
7888
|
cancelButtonVisible = true,
|
|
7866
7889
|
className,
|
|
7867
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
7890
|
+
'data-pendoid': dataPendoId = rootClassName$H,
|
|
7868
7891
|
'data-testid': dataTestId,
|
|
7869
7892
|
children,
|
|
7870
7893
|
closeIconVisible,
|
|
@@ -7877,7 +7900,7 @@ const DotDialog = ({
|
|
|
7877
7900
|
submitButtonProps,
|
|
7878
7901
|
title
|
|
7879
7902
|
}) => {
|
|
7880
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7903
|
+
const rootClasses = useStylesWithRootClass(rootClassName$H, className);
|
|
7881
7904
|
const cancelClasses = useStylesWithRootClass(cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.className, 'cancel-button');
|
|
7882
7905
|
const [isOpen, setIsOpen] = useState(open);
|
|
7883
7906
|
useEffect(() => {
|
|
@@ -7995,7 +8018,7 @@ const DotConfirmationDialog = ({
|
|
|
7995
8018
|
});
|
|
7996
8019
|
};
|
|
7997
8020
|
|
|
7998
|
-
const rootClassName$
|
|
8021
|
+
const rootClassName$G = 'dot-grid';
|
|
7999
8022
|
const frGetter = value => typeof value === 'number' ? `repeat(${value}, 1fr)` : value;
|
|
8000
8023
|
const breakpointsGetter$1 = (theme, columnsBreakpoints, columnGap, rowGap) => `${theme.breakpoints.up('xs')} {
|
|
8001
8024
|
column-gap: ${`${columnGap.xs}px`};
|
|
@@ -8047,7 +8070,7 @@ const Grid = ({
|
|
|
8047
8070
|
className,
|
|
8048
8071
|
children
|
|
8049
8072
|
}) => {
|
|
8050
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8073
|
+
const rootClasses = useStylesWithRootClass(rootClassName$G, className);
|
|
8051
8074
|
return jsx("div", {
|
|
8052
8075
|
className: rootClasses,
|
|
8053
8076
|
children: children
|
|
@@ -8066,7 +8089,7 @@ const StyledGrid = styled(Grid)`
|
|
|
8066
8089
|
theme,
|
|
8067
8090
|
width
|
|
8068
8091
|
}) => css`
|
|
8069
|
-
&.${rootClassName$
|
|
8092
|
+
&.${rootClassName$G} {
|
|
8070
8093
|
display: grid;
|
|
8071
8094
|
grid-template-rows: ${frGetter(rows)};
|
|
8072
8095
|
${columns ? `${columns && `grid-template-columns: ${frGetter(columns)}`};` : breakpointsGetter$1(theme, columnsBreakpoints, columnGap, rowGap)}
|
|
@@ -9726,18 +9749,18 @@ function addAutoHideDuration(severity) {
|
|
|
9726
9749
|
return severity === 'error' ? null : 10000;
|
|
9727
9750
|
}
|
|
9728
9751
|
|
|
9729
|
-
const rootClassName$
|
|
9752
|
+
const rootClassName$F = 'dot-snackbar';
|
|
9730
9753
|
const StyledSnackbar = styled(Snackbar)`
|
|
9731
9754
|
${({
|
|
9732
9755
|
theme,
|
|
9733
9756
|
width,
|
|
9734
9757
|
$anchorOriginTop
|
|
9735
9758
|
}) => css`
|
|
9736
|
-
&.${rootClassName$
|
|
9759
|
+
&.${rootClassName$F} {
|
|
9737
9760
|
.MuiAlert-message {
|
|
9738
9761
|
word-break: break-word;
|
|
9739
9762
|
}
|
|
9740
|
-
.${rootClassName$
|
|
9763
|
+
.${rootClassName$1c} {
|
|
9741
9764
|
align-items: flex-start;
|
|
9742
9765
|
}
|
|
9743
9766
|
&.MuiSnackbar-anchorOriginTopLeft,
|
|
@@ -9789,7 +9812,7 @@ const DotSnackbar = ({
|
|
|
9789
9812
|
}) => {
|
|
9790
9813
|
const hasActions = !!(primaryAction || secondaryAction);
|
|
9791
9814
|
const calculatedAutoHideDuration = autoHideDuration === null || autoHideDuration > 0 ? autoHideDuration : addAutoHideDuration(severity);
|
|
9792
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
9815
|
+
const rootClasses = useStylesWithRootClass(rootClassName$F, className);
|
|
9793
9816
|
const handleSnackbarClose = reason => {
|
|
9794
9817
|
if (!reason || hideOnClickAway || !hideOnClickAway && reason !== 'clickaway') {
|
|
9795
9818
|
onClose();
|
|
@@ -9847,10 +9870,10 @@ const DotSnackbar = ({
|
|
|
9847
9870
|
});
|
|
9848
9871
|
};
|
|
9849
9872
|
|
|
9850
|
-
const rootClassName$
|
|
9873
|
+
const rootClassName$E = 'dot-snackbar-container';
|
|
9851
9874
|
const StyledSnackbarContainer = styled.div`
|
|
9852
9875
|
${() => css`
|
|
9853
|
-
&.${rootClassName$
|
|
9876
|
+
&.${rootClassName$E} {
|
|
9854
9877
|
position: absolute;
|
|
9855
9878
|
top: 0;
|
|
9856
9879
|
width: 250px;
|
|
@@ -9881,10 +9904,10 @@ const DotSnackbarContainer = ({
|
|
|
9881
9904
|
};
|
|
9882
9905
|
}
|
|
9883
9906
|
return jsx(StyledSnackbarContainer, {
|
|
9884
|
-
className: rootClassName$
|
|
9907
|
+
className: rootClassName$E,
|
|
9885
9908
|
children: jsx("div", {
|
|
9886
|
-
className: rootClassName$
|
|
9887
|
-
"data-testid": rootClassName$
|
|
9909
|
+
className: rootClassName$E,
|
|
9910
|
+
"data-testid": rootClassName$E,
|
|
9888
9911
|
children: alerts.slice().reverse().map(alert => {
|
|
9889
9912
|
return jsx(DotSnackbar, {
|
|
9890
9913
|
autoHideDuration: alert.autoHideDuration,
|
|
@@ -10679,7 +10702,7 @@ function DotDashboardHeader({
|
|
|
10679
10702
|
});
|
|
10680
10703
|
}
|
|
10681
10704
|
|
|
10682
|
-
const rootClassName$
|
|
10705
|
+
const rootClassName$D = 'dot-empty-state';
|
|
10683
10706
|
const StyledEmptyState = styled.div`
|
|
10684
10707
|
${({
|
|
10685
10708
|
theme
|
|
@@ -10714,9 +10737,9 @@ const StyledEmptyState = styled.div`
|
|
|
10714
10737
|
`}
|
|
10715
10738
|
`;
|
|
10716
10739
|
|
|
10717
|
-
const rootClassName$
|
|
10740
|
+
const rootClassName$C = 'dot-illustration';
|
|
10718
10741
|
const StyledIllustration = styled.span`
|
|
10719
|
-
&.${rootClassName$
|
|
10742
|
+
&.${rootClassName$C} {
|
|
10720
10743
|
display: inline-block;
|
|
10721
10744
|
}
|
|
10722
10745
|
`;
|
|
@@ -10733,16 +10756,16 @@ const DotIllustration = ({
|
|
|
10733
10756
|
tooltip,
|
|
10734
10757
|
tooltipPlacement = 'right-end'
|
|
10735
10758
|
}) => {
|
|
10736
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
10759
|
+
const rootClasses = useStylesWithRootClass(rootClassName$C, className);
|
|
10737
10760
|
return jsx(DotTooltip, {
|
|
10738
10761
|
title: tooltip,
|
|
10739
10762
|
placement: tooltipPlacement,
|
|
10740
|
-
"data-testid": `${dataTestId || rootClassName$
|
|
10763
|
+
"data-testid": `${dataTestId || rootClassName$C}-tooltip`,
|
|
10741
10764
|
children: jsx(StyledIllustration, {
|
|
10742
10765
|
"aria-hidden": "false",
|
|
10743
10766
|
"aria-label": ariaLabel || title || 'Illustration',
|
|
10744
10767
|
className: rootClasses,
|
|
10745
|
-
"data-testid": dataTestId || rootClassName$
|
|
10768
|
+
"data-testid": dataTestId || rootClassName$C,
|
|
10746
10769
|
role: ariaRole,
|
|
10747
10770
|
children: jsx("img", {
|
|
10748
10771
|
alt: alt || 'Illustration',
|
|
@@ -10767,7 +10790,7 @@ const DotEmptyState = ({
|
|
|
10767
10790
|
subtitle,
|
|
10768
10791
|
title
|
|
10769
10792
|
}) => {
|
|
10770
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
10793
|
+
const rootClasses = useStylesWithRootClass(rootClassName$D, className);
|
|
10771
10794
|
return jsxs(StyledEmptyState, {
|
|
10772
10795
|
"aria-label": ariaLabel,
|
|
10773
10796
|
className: rootClasses,
|
|
@@ -10848,20 +10871,20 @@ const StyledRadioGroup = styled(RadioGroup)`
|
|
|
10848
10871
|
&.${groupClassName} {
|
|
10849
10872
|
padding-left: ${theme.spacing(2.5)};
|
|
10850
10873
|
|
|
10851
|
-
.${rootClassName$
|
|
10874
|
+
.${rootClassName$M} {
|
|
10852
10875
|
margin: 0;
|
|
10853
10876
|
}
|
|
10854
10877
|
}
|
|
10855
10878
|
`}
|
|
10856
10879
|
`;
|
|
10857
10880
|
|
|
10858
|
-
const rootClassName$
|
|
10881
|
+
const rootClassName$B = 'dot-date-picker';
|
|
10859
10882
|
const popperClassName = 'dot-date-picker-popper';
|
|
10860
10883
|
const containerClassName$2 = 'dot-date-picker-container';
|
|
10861
10884
|
const rectanglePickersDayClassName = 'dot-rectangle-pickers-day';
|
|
10862
10885
|
const StyledDatePickerContainer = styled.div`
|
|
10863
10886
|
${() => css`
|
|
10864
|
-
&.${rootClassName$
|
|
10887
|
+
&.${rootClassName$B} .full-width {
|
|
10865
10888
|
width: 100%;
|
|
10866
10889
|
}
|
|
10867
10890
|
`}
|
|
@@ -10870,7 +10893,7 @@ const StyledDatePicker = styled(DatePicker)`
|
|
|
10870
10893
|
${({
|
|
10871
10894
|
theme
|
|
10872
10895
|
}) => css`
|
|
10873
|
-
&.${rootClassName$
|
|
10896
|
+
&.${rootClassName$B} {
|
|
10874
10897
|
${pickerInputStyles(theme)};
|
|
10875
10898
|
|
|
10876
10899
|
.Mui-disabled.MuiInputBase-root,
|
|
@@ -10910,7 +10933,7 @@ const StyledPickersDay = styled(PickersDay)`
|
|
|
10910
10933
|
`}
|
|
10911
10934
|
`;
|
|
10912
10935
|
|
|
10913
|
-
const rootClassName$
|
|
10936
|
+
const rootClassName$A = 'dot-time-picker';
|
|
10914
10937
|
const containerClassName$1 = 'dot-time-picker-container';
|
|
10915
10938
|
const TIME_SELECTION_HEIGHT_SPACING = 34.5;
|
|
10916
10939
|
const TIME_SELECTION_WIDTH_SPACING = 14.5;
|
|
@@ -10981,7 +11004,7 @@ const StyledTimePicker = styled(TimePicker)`
|
|
|
10981
11004
|
${({
|
|
10982
11005
|
theme
|
|
10983
11006
|
}) => css`
|
|
10984
|
-
&.${rootClassName$
|
|
11007
|
+
&.${rootClassName$A} {
|
|
10985
11008
|
${pickerInputStyles(theme)};
|
|
10986
11009
|
|
|
10987
11010
|
.Mui-disabled.MuiInputBase-root,
|
|
@@ -11000,36 +11023,36 @@ const StyledTimePicker = styled(TimePicker)`
|
|
|
11000
11023
|
`}
|
|
11001
11024
|
`;
|
|
11002
11025
|
|
|
11003
|
-
const rootClassName$
|
|
11026
|
+
const rootClassName$z = 'dot-form';
|
|
11004
11027
|
const StyledFormContainer = styled.div`
|
|
11005
11028
|
${({
|
|
11006
11029
|
theme
|
|
11007
11030
|
}) => css`
|
|
11008
|
-
&.${rootClassName$
|
|
11031
|
+
&.${rootClassName$z} {
|
|
11009
11032
|
margin: ${theme.spacing(3, 0)};
|
|
11010
11033
|
|
|
11011
|
-
.${rootClassName$
|
|
11012
|
-
.${rootClassName$
|
|
11013
|
-
.${rootClassName$
|
|
11034
|
+
.${rootClassName$K},
|
|
11035
|
+
.${rootClassName$M},
|
|
11036
|
+
.${rootClassName$1e},
|
|
11014
11037
|
.${rootSelectClassName},
|
|
11015
|
-
.${rootClassName$
|
|
11016
|
-
.${rootClassName$
|
|
11038
|
+
.${rootClassName$B},
|
|
11039
|
+
.${rootClassName$A} {
|
|
11017
11040
|
margin: ${theme.spacing(1, 0)};
|
|
11018
11041
|
}
|
|
11019
11042
|
|
|
11020
11043
|
label
|
|
11021
|
-
+ .${rootClassName$
|
|
11044
|
+
+ .${rootClassName$1e},
|
|
11022
11045
|
label
|
|
11023
11046
|
+ .${rootSelectClassName},
|
|
11024
11047
|
label
|
|
11025
|
-
+ .${rootClassName$
|
|
11048
|
+
+ .${rootClassName$B},
|
|
11026
11049
|
label
|
|
11027
|
-
+ .${rootClassName$
|
|
11050
|
+
+ .${rootClassName$A} {
|
|
11028
11051
|
margin: ${theme.spacing(0, 0, 1, 0)};
|
|
11029
11052
|
}
|
|
11030
11053
|
|
|
11031
|
-
.${rootClassName$
|
|
11032
|
-
.${rootClassName$
|
|
11054
|
+
.${rootClassName$J}, .${groupClassName} {
|
|
11055
|
+
.${rootClassName$M} {
|
|
11033
11056
|
margin: 0;
|
|
11034
11057
|
}
|
|
11035
11058
|
}
|
|
@@ -11044,7 +11067,7 @@ const DotForm = ({
|
|
|
11044
11067
|
'data-testid': dataTestId,
|
|
11045
11068
|
onSubmit
|
|
11046
11069
|
}) => {
|
|
11047
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11070
|
+
const rootClasses = useStylesWithRootClass(rootClassName$z, className);
|
|
11048
11071
|
return jsx("form", {
|
|
11049
11072
|
"aria-label": ariaLabel,
|
|
11050
11073
|
"data-testid": dataTestId,
|
|
@@ -11057,10 +11080,10 @@ const DotForm = ({
|
|
|
11057
11080
|
});
|
|
11058
11081
|
};
|
|
11059
11082
|
|
|
11060
|
-
const rootClassName$
|
|
11083
|
+
const rootClassName$y = 'dot-dynamic-form';
|
|
11061
11084
|
const StyledDynamicForm = styled(DotForm)`
|
|
11062
11085
|
${() => css`
|
|
11063
|
-
&.${rootClassName$
|
|
11086
|
+
&.${rootClassName$y} {
|
|
11064
11087
|
}
|
|
11065
11088
|
`}
|
|
11066
11089
|
`;
|
|
@@ -11240,12 +11263,12 @@ const checkIfFormDataValid = formState => {
|
|
|
11240
11263
|
return true;
|
|
11241
11264
|
};
|
|
11242
11265
|
|
|
11243
|
-
const rootClassName$
|
|
11266
|
+
const rootClassName$x = 'dot-progress-button';
|
|
11244
11267
|
const StyledProgressButton = styled(DotButton)`
|
|
11245
11268
|
${({
|
|
11246
11269
|
theme
|
|
11247
11270
|
}) => css`
|
|
11248
|
-
&.${rootClassName$
|
|
11271
|
+
&.${rootClassName$x} {
|
|
11249
11272
|
.hidden {
|
|
11250
11273
|
// hide children but preserve its space so that
|
|
11251
11274
|
// button's dimensions don't change
|
|
@@ -11270,7 +11293,7 @@ const DotProgressButton = ({
|
|
|
11270
11293
|
ariaLabel,
|
|
11271
11294
|
children,
|
|
11272
11295
|
className,
|
|
11273
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
11296
|
+
'data-pendoid': dataPendoId = rootClassName$x,
|
|
11274
11297
|
'data-testid': dataTestId,
|
|
11275
11298
|
disabled = false,
|
|
11276
11299
|
disableRipple = false,
|
|
@@ -11283,7 +11306,7 @@ const DotProgressButton = ({
|
|
|
11283
11306
|
tooltip,
|
|
11284
11307
|
type = 'primary'
|
|
11285
11308
|
}) => {
|
|
11286
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11309
|
+
const rootClasses = useStylesWithRootClass(rootClassName$x, className);
|
|
11287
11310
|
const isButtonDisabled = disabled || isLoading;
|
|
11288
11311
|
const titleClasses = useStylesWithRootClass(isLoading ? 'hidden' : '');
|
|
11289
11312
|
const progressCircleSize = size === 'large' ? SPINNER_LARGE_SIZE : SPINNER_DEFAULT_SIZE;
|
|
@@ -11312,12 +11335,12 @@ const DotProgressButton = ({
|
|
|
11312
11335
|
});
|
|
11313
11336
|
};
|
|
11314
11337
|
|
|
11315
|
-
const rootClassName$
|
|
11338
|
+
const rootClassName$w = 'dot-radio';
|
|
11316
11339
|
const StyledRadioButton = styled(Radio)`
|
|
11317
11340
|
${({
|
|
11318
11341
|
theme
|
|
11319
11342
|
}) => css`
|
|
11320
|
-
&.${rootClassName$
|
|
11343
|
+
&.${rootClassName$w} {
|
|
11321
11344
|
padding: 8px;
|
|
11322
11345
|
|
|
11323
11346
|
svg {
|
|
@@ -11335,7 +11358,7 @@ function DotRadioButton({
|
|
|
11335
11358
|
ariaLabel,
|
|
11336
11359
|
checked,
|
|
11337
11360
|
className,
|
|
11338
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
11361
|
+
'data-pendoid': dataPendoId = rootClassName$M,
|
|
11339
11362
|
'data-testid': dataTestId,
|
|
11340
11363
|
disabled,
|
|
11341
11364
|
id,
|
|
@@ -11348,7 +11371,7 @@ function DotRadioButton({
|
|
|
11348
11371
|
size = 'medium',
|
|
11349
11372
|
value
|
|
11350
11373
|
}) {
|
|
11351
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11374
|
+
const rootClasses = useStylesWithRootClass(rootClassName$M, className);
|
|
11352
11375
|
const handleChange = event => {
|
|
11353
11376
|
onChange && onChange(event, event.target.value);
|
|
11354
11377
|
};
|
|
@@ -11356,7 +11379,7 @@ function DotRadioButton({
|
|
|
11356
11379
|
const radioControl = jsx(StyledRadioButton, {
|
|
11357
11380
|
checked: checked,
|
|
11358
11381
|
classes: {
|
|
11359
|
-
root: rootClassName$
|
|
11382
|
+
root: rootClassName$w
|
|
11360
11383
|
},
|
|
11361
11384
|
color: "primary",
|
|
11362
11385
|
"data-pendoid": dataPendoId,
|
|
@@ -11402,7 +11425,7 @@ const DotRadioGroup = ({
|
|
|
11402
11425
|
size = 'medium'
|
|
11403
11426
|
}) => {
|
|
11404
11427
|
const placement = `${placementClassName}${labelPlacement}`;
|
|
11405
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11428
|
+
const rootClasses = useStylesWithRootClass(rootClassName$K, className, placement);
|
|
11406
11429
|
const radioValue = value || defaultValue;
|
|
11407
11430
|
const [selectedValue, setSelectedValue] = useState(radioValue);
|
|
11408
11431
|
/* This will ensure that value can be updated from the outside */
|
|
@@ -11467,7 +11490,7 @@ const DotRadioGroup = ({
|
|
|
11467
11490
|
});
|
|
11468
11491
|
};
|
|
11469
11492
|
|
|
11470
|
-
const rootClassName$
|
|
11493
|
+
const rootClassName$v = 'dot-switch';
|
|
11471
11494
|
const StyledSwitch = styled(Switch)`
|
|
11472
11495
|
${({
|
|
11473
11496
|
theme
|
|
@@ -11496,7 +11519,7 @@ const DotSwitch = ({
|
|
|
11496
11519
|
checked,
|
|
11497
11520
|
className,
|
|
11498
11521
|
color,
|
|
11499
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
11522
|
+
'data-pendoid': dataPendoId = rootClassName$v,
|
|
11500
11523
|
'data-testid': dataTestId,
|
|
11501
11524
|
disabled = false,
|
|
11502
11525
|
id,
|
|
@@ -11506,7 +11529,7 @@ const DotSwitch = ({
|
|
|
11506
11529
|
onChange,
|
|
11507
11530
|
size = 'medium'
|
|
11508
11531
|
}) => {
|
|
11509
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11532
|
+
const rootClasses = useStylesWithRootClass(rootClassName$v, className);
|
|
11510
11533
|
const handleChange = event => {
|
|
11511
11534
|
onChange && onChange(event);
|
|
11512
11535
|
};
|
|
@@ -11536,7 +11559,7 @@ const DotSwitch = ({
|
|
|
11536
11559
|
tabIndex: 0
|
|
11537
11560
|
});
|
|
11538
11561
|
return jsx(StyledFormControlLabel, {
|
|
11539
|
-
className: rootClassName$
|
|
11562
|
+
className: rootClassName$M,
|
|
11540
11563
|
control: switchControl,
|
|
11541
11564
|
label: label,
|
|
11542
11565
|
labelPlacement: labelPlacement
|
|
@@ -11857,7 +11880,7 @@ const DotDynamicForm = ({
|
|
|
11857
11880
|
onChange,
|
|
11858
11881
|
onSubmit
|
|
11859
11882
|
}) => {
|
|
11860
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11883
|
+
const rootClasses = useStylesWithRootClass(rootClassName$y, className);
|
|
11861
11884
|
// Memoize this operation so that is doesn't get executed each time this
|
|
11862
11885
|
// component re-renders
|
|
11863
11886
|
const initialFormState = useMemo(() => getInitialFormState(config, liveValidation), [config, liveValidation, getInitialFormState]);
|
|
@@ -12103,7 +12126,7 @@ const DotDynamicForm = ({
|
|
|
12103
12126
|
});
|
|
12104
12127
|
};
|
|
12105
12128
|
|
|
12106
|
-
const rootClassName$
|
|
12129
|
+
const rootClassName$u = 'dot-inline-edit';
|
|
12107
12130
|
const editModeClassName = 'dot-edit-mode';
|
|
12108
12131
|
const viewModeClassName = 'dot-view-mode';
|
|
12109
12132
|
const placeholderClassName = 'dot-placeholder';
|
|
@@ -12115,7 +12138,7 @@ const StyledInlineEdit = styled.div`
|
|
|
12115
12138
|
theme,
|
|
12116
12139
|
fullWidth
|
|
12117
12140
|
}) => css`
|
|
12118
|
-
&.${rootClassName$
|
|
12141
|
+
&.${rootClassName$u} {
|
|
12119
12142
|
align-items: center;
|
|
12120
12143
|
color: ${theme.palette.figma.typography.black};
|
|
12121
12144
|
display: ${fullWidth ? 'flex' : 'inline-flex'};
|
|
@@ -12327,7 +12350,7 @@ const DotInlineEdit = ({
|
|
|
12327
12350
|
bindings,
|
|
12328
12351
|
charactersLimit,
|
|
12329
12352
|
className,
|
|
12330
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
12353
|
+
'data-pendoid': dataPendoId = rootClassName$u,
|
|
12331
12354
|
'data-testid': dataTestId,
|
|
12332
12355
|
fullWidth = true,
|
|
12333
12356
|
hideActionButtons,
|
|
@@ -12360,7 +12383,7 @@ const DotInlineEdit = ({
|
|
|
12360
12383
|
}
|
|
12361
12384
|
}, [value]);
|
|
12362
12385
|
const isSaveDisabled = checkIfEmptyValue(inputValue);
|
|
12363
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12386
|
+
const rootClasses = useStylesWithRootClass(rootClassName$u, className, editing ? editModeClassName : '');
|
|
12364
12387
|
const handleShowTooltip = visible => {
|
|
12365
12388
|
if (!editing) {
|
|
12366
12389
|
setShowTooltip(visible);
|
|
@@ -12539,13 +12562,13 @@ const DotInlineEdit = ({
|
|
|
12539
12562
|
});
|
|
12540
12563
|
};
|
|
12541
12564
|
|
|
12542
|
-
const rootClassName$
|
|
12565
|
+
const rootClassName$t = 'dot-navigation-rail';
|
|
12543
12566
|
const StyledNavigationRail = styled.div`
|
|
12544
12567
|
${({
|
|
12545
12568
|
theme,
|
|
12546
12569
|
railItemPosition
|
|
12547
12570
|
}) => css`
|
|
12548
|
-
&.${rootClassName$
|
|
12571
|
+
&.${rootClassName$t} {
|
|
12549
12572
|
background: ${theme.palette.figma.neutral.elevated};
|
|
12550
12573
|
border-left: 1px solid ${theme.palette.figma.border.default};
|
|
12551
12574
|
display: flex;
|
|
@@ -12592,7 +12615,7 @@ const DotNavigationRail = ({
|
|
|
12592
12615
|
railItems,
|
|
12593
12616
|
selectedIndex = 0
|
|
12594
12617
|
}) => {
|
|
12595
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12618
|
+
const rootClasses = useStylesWithRootClass(rootClassName$t, className);
|
|
12596
12619
|
const [selectedItemIndex, setSelectedItemIndex] = useState(selectedIndex);
|
|
12597
12620
|
/* Used to change selected index programmatically from the consumer component */
|
|
12598
12621
|
useEffect(() => {
|
|
@@ -12643,12 +12666,12 @@ const DotNavigationRail = ({
|
|
|
12643
12666
|
});
|
|
12644
12667
|
};
|
|
12645
12668
|
|
|
12646
|
-
const rootClassName$
|
|
12669
|
+
const rootClassName$s = 'dot-pill';
|
|
12647
12670
|
const StyledPill = styled(Chip)`
|
|
12648
12671
|
${({
|
|
12649
12672
|
theme
|
|
12650
12673
|
}) => css`
|
|
12651
|
-
&.${rootClassName$
|
|
12674
|
+
&.${rootClassName$s} {
|
|
12652
12675
|
background-color: ${({
|
|
12653
12676
|
backgroundcolor,
|
|
12654
12677
|
variant
|
|
@@ -12771,7 +12794,7 @@ const DotPill = ({
|
|
|
12771
12794
|
status = 'default',
|
|
12772
12795
|
variant = 'filled'
|
|
12773
12796
|
}) => {
|
|
12774
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12797
|
+
const rootClasses = useStylesWithRootClass(rootClassName$s, className, status);
|
|
12775
12798
|
return jsx(StyledPill, {
|
|
12776
12799
|
"aria-label": ariaLabel,
|
|
12777
12800
|
bordercolor: bordercolor,
|
|
@@ -12789,12 +12812,12 @@ const DotPill = ({
|
|
|
12789
12812
|
});
|
|
12790
12813
|
};
|
|
12791
12814
|
|
|
12792
|
-
const rootClassName$
|
|
12815
|
+
const rootClassName$r = 'dot-skeleton';
|
|
12793
12816
|
const StyledSkeleton = styled(Skeleton)`
|
|
12794
12817
|
${({
|
|
12795
12818
|
theme
|
|
12796
12819
|
}) => css`
|
|
12797
|
-
&.${rootClassName$
|
|
12820
|
+
&.${rootClassName$r} {
|
|
12798
12821
|
background-color: ${theme.palette.figma.border.darker};
|
|
12799
12822
|
}
|
|
12800
12823
|
`}
|
|
@@ -12809,7 +12832,7 @@ const DotSkeleton = ({
|
|
|
12809
12832
|
width,
|
|
12810
12833
|
variant
|
|
12811
12834
|
}) => {
|
|
12812
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12835
|
+
const rootClasses = useStylesWithRootClass(rootClassName$r, className);
|
|
12813
12836
|
return jsx(StyledSkeleton, {
|
|
12814
12837
|
animation: "wave",
|
|
12815
12838
|
"aria-label": ariaLabel,
|
|
@@ -12824,12 +12847,12 @@ const DotSkeleton = ({
|
|
|
12824
12847
|
});
|
|
12825
12848
|
};
|
|
12826
12849
|
|
|
12827
|
-
const rootClassName$
|
|
12850
|
+
const rootClassName$q = 'dot-split-button-group';
|
|
12828
12851
|
const StyledSplitButtonGroup = styled(ButtonGroup)`
|
|
12829
12852
|
${({
|
|
12830
12853
|
theme
|
|
12831
12854
|
}) => css`
|
|
12832
|
-
&.${rootClassName$
|
|
12855
|
+
&.${rootClassName$q} {
|
|
12833
12856
|
&.outlined,
|
|
12834
12857
|
&.text {
|
|
12835
12858
|
.expand-button {
|
|
@@ -12896,7 +12919,7 @@ const DotSplitButton = ({
|
|
|
12896
12919
|
autoFocus = false,
|
|
12897
12920
|
ariaLabel,
|
|
12898
12921
|
className,
|
|
12899
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
12922
|
+
'data-pendoid': dataPendoId = rootClassName$q,
|
|
12900
12923
|
'data-testid': dataTestId,
|
|
12901
12924
|
defaultMainOptionKey,
|
|
12902
12925
|
disabled = false,
|
|
@@ -12911,7 +12934,7 @@ const DotSplitButton = ({
|
|
|
12911
12934
|
tooltipPlacement,
|
|
12912
12935
|
type = 'primary'
|
|
12913
12936
|
}) => {
|
|
12914
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12937
|
+
const rootClasses = useStylesWithRootClass(rootClassName$q, className, type, disabled ? 'disabled' : '');
|
|
12915
12938
|
const [open, setOpen] = useState(false);
|
|
12916
12939
|
const anchorRef = useRef(null);
|
|
12917
12940
|
const hasEmptyOptions = options.length === 0;
|
|
@@ -12977,14 +13000,14 @@ const DotSplitButton = ({
|
|
|
12977
13000
|
});
|
|
12978
13001
|
};
|
|
12979
13002
|
|
|
12980
|
-
const rootClassName$
|
|
13003
|
+
const rootClassName$p = 'dot-stepper';
|
|
12981
13004
|
const stepListClassName = 'dot-stepper-list';
|
|
12982
13005
|
const contentClassName = 'dot-stepper-content';
|
|
12983
13006
|
const StyledStepper = styled.div`
|
|
12984
13007
|
${({
|
|
12985
13008
|
theme
|
|
12986
13009
|
}) => css`
|
|
12987
|
-
&.${rootClassName$
|
|
13010
|
+
&.${rootClassName$p} {
|
|
12988
13011
|
display: flex;
|
|
12989
13012
|
align-items: flex-start;
|
|
12990
13013
|
padding: 0;
|
|
@@ -13257,7 +13280,7 @@ const DotStepper = ({
|
|
|
13257
13280
|
const displayFinalContent = finalContent && currentStep > steps.length;
|
|
13258
13281
|
const displayCancelButton = !!(!displayInitialContent && !displayFinalContent && onCancel);
|
|
13259
13282
|
const isLastStep = currentStep === steps.length && !finalContent || currentStep > steps.length && finalContent;
|
|
13260
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
13283
|
+
const rootClasses = useStylesWithRootClass(rootClassName$p, stepsPosition, className);
|
|
13261
13284
|
const stepContentClasses = displayInitialContent || displayFinalContent ? 'center-content' : '';
|
|
13262
13285
|
const stickyBottomClasses = useStylesWithRootClass('actions-container', isStickyBottom ? 'with-top-border' : '');
|
|
13263
13286
|
const actionsClasses = useStylesWithRootClass('actions', displayInitialContent || displayFinalContent ? 'center-actions' : '');
|
|
@@ -13456,12 +13479,12 @@ const DotStepper = ({
|
|
|
13456
13479
|
});
|
|
13457
13480
|
};
|
|
13458
13481
|
|
|
13459
|
-
const rootClassName$
|
|
13482
|
+
const rootClassName$o = 'dot-table-pagination-custom-actions';
|
|
13460
13483
|
const StyledTablePaginationCustomActions = styled.div`
|
|
13461
13484
|
${({
|
|
13462
13485
|
theme
|
|
13463
13486
|
}) => css`
|
|
13464
|
-
&.${rootClassName$
|
|
13487
|
+
&.${rootClassName$o} {
|
|
13465
13488
|
margin-left: ${theme.spacing(2.5)};
|
|
13466
13489
|
display: flex;
|
|
13467
13490
|
align-items: center;
|
|
@@ -13585,7 +13608,7 @@ const DotTablePaginationCustomActions = props => {
|
|
|
13585
13608
|
});
|
|
13586
13609
|
};
|
|
13587
13610
|
return jsxs(StyledTablePaginationCustomActions, {
|
|
13588
|
-
className: rootClassName$
|
|
13611
|
+
className: rootClassName$o,
|
|
13589
13612
|
children: [jsx(DotIconButton, {
|
|
13590
13613
|
ariaLabel: "previous page",
|
|
13591
13614
|
className: "page-control-button",
|
|
@@ -13632,7 +13655,7 @@ const DotTablePaginationCustomActions = props => {
|
|
|
13632
13655
|
});
|
|
13633
13656
|
};
|
|
13634
13657
|
|
|
13635
|
-
const rootClassName$
|
|
13658
|
+
const rootClassName$n = 'dot-table-pagination';
|
|
13636
13659
|
// TO-DO: Determine how to apply styles to standard popper element
|
|
13637
13660
|
const paginationItemClassName = 'dot-pagination-menu-item';
|
|
13638
13661
|
const StyledTablePagination = styled.div`
|
|
@@ -13640,7 +13663,7 @@ const StyledTablePagination = styled.div`
|
|
|
13640
13663
|
theme,
|
|
13641
13664
|
typography
|
|
13642
13665
|
}) => css`
|
|
13643
|
-
.${rootClassName$
|
|
13666
|
+
.${rootClassName$n} {
|
|
13644
13667
|
border-top: 1px solid ${theme.palette.figma.border.default};
|
|
13645
13668
|
|
|
13646
13669
|
.dot-caption,
|
|
@@ -13683,7 +13706,7 @@ const DotTablePagination = ({
|
|
|
13683
13706
|
showJumpToPageActionButton = false,
|
|
13684
13707
|
typography = 'subtitle2'
|
|
13685
13708
|
}) => {
|
|
13686
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
13709
|
+
const rootClasses = useStylesWithRootClass(rootClassName$n, className, showJumpToPageActionButton ? 'with-custom-actions' : '');
|
|
13687
13710
|
const handlePageChange = (event, newPage) => {
|
|
13688
13711
|
onPageChange && onPageChange(newPage);
|
|
13689
13712
|
};
|
|
@@ -13692,7 +13715,7 @@ const DotTablePagination = ({
|
|
|
13692
13715
|
};
|
|
13693
13716
|
return (/* Container is used to pass 'typography' prop to a styled component */
|
|
13694
13717
|
jsx(StyledTablePagination, {
|
|
13695
|
-
className: rootClassName$
|
|
13718
|
+
className: rootClassName$n,
|
|
13696
13719
|
typography: typography,
|
|
13697
13720
|
children: jsx(TablePagination, {
|
|
13698
13721
|
ActionsComponent: showJumpToPageActionButton ? DotTablePaginationCustomActions : undefined,
|
|
@@ -13719,12 +13742,12 @@ const DotTablePagination = ({
|
|
|
13719
13742
|
);
|
|
13720
13743
|
};
|
|
13721
13744
|
|
|
13722
|
-
const rootClassName$
|
|
13745
|
+
const rootClassName$m = 'dot-table';
|
|
13723
13746
|
const StyledPaper = styled(Paper)`
|
|
13724
13747
|
${({
|
|
13725
13748
|
theme
|
|
13726
13749
|
}) => css`
|
|
13727
|
-
&.${rootClassName$
|
|
13750
|
+
&.${rootClassName$m} {
|
|
13728
13751
|
background: ${theme.palette.figma.background.level0.componentsBackground};
|
|
13729
13752
|
border: 1px solid ${theme.palette.figma.border.default};
|
|
13730
13753
|
overflow: hidden;
|
|
@@ -13793,10 +13816,10 @@ const StyledMenu$1 = styled(DotMenu)`
|
|
|
13793
13816
|
}
|
|
13794
13817
|
`;
|
|
13795
13818
|
|
|
13796
|
-
const rootClassName$
|
|
13819
|
+
const rootClassName$l = 'dot-tbody';
|
|
13797
13820
|
const StyledTableBody = styled(TableBody)`
|
|
13798
13821
|
${() => css`
|
|
13799
|
-
&.${rootClassName$
|
|
13822
|
+
&.${rootClassName$l} {
|
|
13800
13823
|
tr:last-child td {
|
|
13801
13824
|
border-bottom: none;
|
|
13802
13825
|
}
|
|
@@ -13944,12 +13967,12 @@ const parseCellMaxWidth = width => {
|
|
|
13944
13967
|
return width;
|
|
13945
13968
|
};
|
|
13946
13969
|
|
|
13947
|
-
const rootClassName$
|
|
13970
|
+
const rootClassName$k = 'dot-td';
|
|
13948
13971
|
const StyledTableCell = styled(TableCell)`
|
|
13949
13972
|
${({
|
|
13950
13973
|
theme
|
|
13951
13974
|
}) => css`
|
|
13952
|
-
&.${rootClassName$
|
|
13975
|
+
&.${rootClassName$k} {
|
|
13953
13976
|
padding-top: 0;
|
|
13954
13977
|
padding-bottom: 0;
|
|
13955
13978
|
|
|
@@ -14044,7 +14067,7 @@ const DotBodyCell = ({
|
|
|
14044
14067
|
const isOverflowing = actionTableCellWidth > (wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current.clientWidth);
|
|
14045
14068
|
setShowMenu(isOverflowing);
|
|
14046
14069
|
};
|
|
14047
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
14070
|
+
const rootClasses = useStylesWithRootClass(rootClassName$k, className, noWrap && 'noWrap', Array.isArray(value) && 'actionItems');
|
|
14048
14071
|
const getTableCellValue = () => {
|
|
14049
14072
|
if (Array.isArray(value)) {
|
|
14050
14073
|
return jsx("div", {
|
|
@@ -14109,12 +14132,12 @@ const EmptyDotRow = ({
|
|
|
14109
14132
|
}, CreateUUID());
|
|
14110
14133
|
};
|
|
14111
14134
|
|
|
14112
|
-
const rootClassName$
|
|
14135
|
+
const rootClassName$j = 'dot-tr';
|
|
14113
14136
|
const StyledTableRowStyles = styled(TableRow)`
|
|
14114
14137
|
${({
|
|
14115
14138
|
theme
|
|
14116
14139
|
}) => css`
|
|
14117
|
-
&.${rootClassName$
|
|
14140
|
+
&.${rootClassName$j} {
|
|
14118
14141
|
&.selected {
|
|
14119
14142
|
background: ${theme.palette.figma.overlay.table.highlights};
|
|
14120
14143
|
|
|
@@ -14143,12 +14166,12 @@ const StyledTableRowStyles = styled(TableRow)`
|
|
|
14143
14166
|
const TABLE_TYPOGRAPHY_VARIANT = 'body1';
|
|
14144
14167
|
const TABLE_DEFAULT_SKELETON_ROWS = 4;
|
|
14145
14168
|
|
|
14146
|
-
const rootClassName$
|
|
14169
|
+
const rootClassName$i = 'dot-th-checkbox';
|
|
14147
14170
|
const StyledTableHeaderCheckboxCell = styled(TableCell)`
|
|
14148
14171
|
${({
|
|
14149
14172
|
theme
|
|
14150
14173
|
}) => css`
|
|
14151
|
-
&.${rootClassName$
|
|
14174
|
+
&.${rootClassName$i} {
|
|
14152
14175
|
background: ${theme.palette.figma.background.level0.componentsBackground};
|
|
14153
14176
|
padding: ${theme.spacing(0, 1)};
|
|
14154
14177
|
width: ${theme.spacing(5)};
|
|
@@ -14167,7 +14190,7 @@ const DotHeaderCheckboxCell = ({
|
|
|
14167
14190
|
multiSelectState,
|
|
14168
14191
|
onCheckAllChange
|
|
14169
14192
|
}) => {
|
|
14170
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
14193
|
+
const rootClasses = useStylesWithRootClass(rootClassName$i, className);
|
|
14171
14194
|
const [checkboxState, setCheckboxState] = useState('unchecked');
|
|
14172
14195
|
useEffect(() => {
|
|
14173
14196
|
setCheckboxState(multiSelectState);
|
|
@@ -14198,12 +14221,12 @@ const DotHeaderCheckboxCell = ({
|
|
|
14198
14221
|
});
|
|
14199
14222
|
};
|
|
14200
14223
|
|
|
14201
|
-
const rootClassName$
|
|
14224
|
+
const rootClassName$h = 'dot-th';
|
|
14202
14225
|
const StyledTableHeaderCell = styled(TableCell)`
|
|
14203
14226
|
${({
|
|
14204
14227
|
theme
|
|
14205
14228
|
}) => css`
|
|
14206
|
-
&.${rootClassName$
|
|
14229
|
+
&.${rootClassName$h} {
|
|
14207
14230
|
background: ${theme.palette.figma.background.level0.componentsBackground};
|
|
14208
14231
|
|
|
14209
14232
|
&.MuiTableCell-alignCenter > span.MuiTableSortLabel-root {
|
|
@@ -14262,7 +14285,7 @@ const DotHeaderCell = ({
|
|
|
14262
14285
|
return jsx(StyledTableHeaderCell, {
|
|
14263
14286
|
align: align,
|
|
14264
14287
|
classes: {
|
|
14265
|
-
root: rootClassName$
|
|
14288
|
+
root: rootClassName$h
|
|
14266
14289
|
},
|
|
14267
14290
|
sortDirection: sortable ? sortDirection : undefined,
|
|
14268
14291
|
style: headerCellStyle,
|
|
@@ -14534,12 +14557,12 @@ const ExpandCollapseCell = ({
|
|
|
14534
14557
|
});
|
|
14535
14558
|
};
|
|
14536
14559
|
|
|
14537
|
-
const rootClassName$
|
|
14560
|
+
const rootClassName$g = 'dot-td-checkbox';
|
|
14538
14561
|
const StyledTableBodyCheckboxCell = styled(TableCell)`
|
|
14539
14562
|
${({
|
|
14540
14563
|
theme
|
|
14541
14564
|
}) => css`
|
|
14542
|
-
&.${rootClassName$
|
|
14565
|
+
&.${rootClassName$g} {
|
|
14543
14566
|
padding: ${theme.spacing(0, 1)};
|
|
14544
14567
|
width: ${theme.spacing(5)};
|
|
14545
14568
|
|
|
@@ -14558,7 +14581,7 @@ const DotBodyCheckboxCell = ({
|
|
|
14558
14581
|
onChange,
|
|
14559
14582
|
rowId
|
|
14560
14583
|
}) => {
|
|
14561
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
14584
|
+
const rootClasses = useStylesWithRootClass(rootClassName$g, className);
|
|
14562
14585
|
const [isCheckboxChecked, setIsCheckboxChecked] = useState(isChecked);
|
|
14563
14586
|
/** This effect is used when 'checked' status is changed from the outside */
|
|
14564
14587
|
useEffect(() => {
|
|
@@ -14610,7 +14633,7 @@ const DotTableRow = ({
|
|
|
14610
14633
|
selectedTableRowIds
|
|
14611
14634
|
} = multiSelectBody || {};
|
|
14612
14635
|
const isCheckboxChecked = selectedTableRowIds && selectedTableRowIds.includes(id) || false;
|
|
14613
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
14636
|
+
const rootClasses = useStylesWithRootClass(rootClassName$j, isCheckboxChecked ? 'selected' : undefined, className);
|
|
14614
14637
|
const renderCheckboxCell = () => {
|
|
14615
14638
|
return jsx(DotBodyCheckboxCell, {
|
|
14616
14639
|
ariaLabel: "Click to select this row",
|
|
@@ -14727,7 +14750,7 @@ const DotTableBody = ({
|
|
|
14727
14750
|
return jsxs(Fragment, {
|
|
14728
14751
|
children: [jsx(StyledTableBody, {
|
|
14729
14752
|
classes: {
|
|
14730
|
-
root: rootClassName$
|
|
14753
|
+
root: rootClassName$l
|
|
14731
14754
|
},
|
|
14732
14755
|
children: getTableBodyRows()
|
|
14733
14756
|
}), jsx(StyledMenu$1, {
|
|
@@ -14742,12 +14765,12 @@ const DotTableBody = ({
|
|
|
14742
14765
|
});
|
|
14743
14766
|
};
|
|
14744
14767
|
|
|
14745
|
-
const rootClassName$
|
|
14768
|
+
const rootClassName$f = 'dot-table-selection-toolbar';
|
|
14746
14769
|
const StyledTableSelectionToolbar = styled(DotActionToolbar)`
|
|
14747
14770
|
${({
|
|
14748
14771
|
theme
|
|
14749
14772
|
}) => css`
|
|
14750
|
-
&.${rootClassName$
|
|
14773
|
+
&.${rootClassName$f} {
|
|
14751
14774
|
display: flex;
|
|
14752
14775
|
align-items: center;
|
|
14753
14776
|
justify-content: space-between;
|
|
@@ -14805,7 +14828,7 @@ const DotTableSelectionToolbar = ({
|
|
|
14805
14828
|
onClearAll,
|
|
14806
14829
|
selectedRowsNumber
|
|
14807
14830
|
}) => {
|
|
14808
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
14831
|
+
const rootClasses = useStylesWithRootClass(rootClassName$f, className);
|
|
14809
14832
|
return jsxs(StyledTableSelectionToolbar, {
|
|
14810
14833
|
ariaLabel: ariaLabel,
|
|
14811
14834
|
className: rootClasses,
|
|
@@ -14899,7 +14922,7 @@ const DotTable = ({
|
|
|
14899
14922
|
return onUpdateData ? data : stableSort(data, getComparator(order, orderBy));
|
|
14900
14923
|
};
|
|
14901
14924
|
const [pageData, setPageData] = useState(getSortedData().slice(0, rowsPerPage ? rowsPerPage : data.length));
|
|
14902
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
14925
|
+
const rootClasses = useStylesWithRootClass(rootClassName$m, className, loading ? 'loading' : '');
|
|
14903
14926
|
const updateData = (newOrder, newOrderBy, newPage, newRowsPerPage) => {
|
|
14904
14927
|
const newData = stableSort(data, getComparator(newOrder, newOrderBy));
|
|
14905
14928
|
setPageData(newRowsPerPage ? newData.slice(newPage * newRowsPerPage, newPage * newRowsPerPage + newRowsPerPage) : newData);
|
|
@@ -15097,7 +15120,7 @@ const DotTableAction = ({
|
|
|
15097
15120
|
});
|
|
15098
15121
|
};
|
|
15099
15122
|
|
|
15100
|
-
const rootClassName$
|
|
15123
|
+
const rootClassName$e = 'dot-table-actions';
|
|
15101
15124
|
const TableActionsContainer = styled.div`
|
|
15102
15125
|
overflow: hidden;
|
|
15103
15126
|
text-overflow: clip;
|
|
@@ -15180,7 +15203,7 @@ const DotTableActions = ({
|
|
|
15180
15203
|
};
|
|
15181
15204
|
return jsxs(Fragment, {
|
|
15182
15205
|
children: [jsxs(TableActionsContainer, {
|
|
15183
|
-
className: rootClassName$
|
|
15206
|
+
className: rootClassName$e,
|
|
15184
15207
|
ref: wrapperRef,
|
|
15185
15208
|
children: [!showMenu && renderTableActions(), (showMenu || actions.length > 2) && jsx(DotIconButton, {
|
|
15186
15209
|
ariaLabel: "more options",
|
|
@@ -15204,12 +15227,12 @@ const DotTableActions = ({
|
|
|
15204
15227
|
});
|
|
15205
15228
|
};
|
|
15206
15229
|
|
|
15207
|
-
const rootClassName$
|
|
15230
|
+
const rootClassName$d = 'dot-tabs';
|
|
15208
15231
|
const StyledTabs = styled(Tabs)`
|
|
15209
15232
|
${({
|
|
15210
15233
|
theme
|
|
15211
15234
|
}) => css`
|
|
15212
|
-
&.${rootClassName$
|
|
15235
|
+
&.${rootClassName$d} {
|
|
15213
15236
|
&.MuiTabs-root {
|
|
15214
15237
|
width: 100%;
|
|
15215
15238
|
}
|
|
@@ -15254,7 +15277,7 @@ const DotTabs = ({
|
|
|
15254
15277
|
centered = false,
|
|
15255
15278
|
className,
|
|
15256
15279
|
color,
|
|
15257
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
15280
|
+
'data-pendoid': dataPendoId = rootClassName$d,
|
|
15258
15281
|
'data-testid': dataTestId,
|
|
15259
15282
|
initialValue = 0,
|
|
15260
15283
|
onChange,
|
|
@@ -15263,7 +15286,7 @@ const DotTabs = ({
|
|
|
15263
15286
|
variant = 'standard'
|
|
15264
15287
|
}) => {
|
|
15265
15288
|
const [value, setValue] = useState(initialValue);
|
|
15266
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
15289
|
+
const rootClasses = useStylesWithRootClass(rootClassName$d, className);
|
|
15267
15290
|
useEffect(() => {
|
|
15268
15291
|
if (color) {
|
|
15269
15292
|
console.warn('DEPRECATED: `color` prop is deprecated in `<DotTabs>`, please remove any usage of it in your application.');
|
|
@@ -15317,9 +15340,9 @@ const DotTabs = ({
|
|
|
15317
15340
|
});
|
|
15318
15341
|
};
|
|
15319
15342
|
|
|
15320
|
-
const rootClassName$
|
|
15321
|
-
const containerClassName = `${rootClassName$
|
|
15322
|
-
const dropZoneClassName = `${rootClassName$
|
|
15343
|
+
const rootClassName$c = 'dot-file-upload';
|
|
15344
|
+
const containerClassName = `${rootClassName$c}-container`;
|
|
15345
|
+
const dropZoneClassName = `${rootClassName$c}-drop-zone`;
|
|
15323
15346
|
const StyledFileUploadContainer = styled.div`
|
|
15324
15347
|
${({
|
|
15325
15348
|
theme
|
|
@@ -15339,7 +15362,7 @@ const StyledFileUpload = styled.div`
|
|
|
15339
15362
|
${({
|
|
15340
15363
|
theme
|
|
15341
15364
|
}) => css`
|
|
15342
|
-
&.${rootClassName$
|
|
15365
|
+
&.${rootClassName$c}.${dropZoneClassName} {
|
|
15343
15366
|
align-items: center;
|
|
15344
15367
|
background: ${theme.palette.figma.background.level0.bckgGray};
|
|
15345
15368
|
border: 2px dashed ${theme.palette.figma.border.defaultButton};
|
|
@@ -15370,12 +15393,12 @@ const StyledFileUpload = styled.div`
|
|
|
15370
15393
|
`}
|
|
15371
15394
|
`;
|
|
15372
15395
|
|
|
15373
|
-
const rootClassName$
|
|
15396
|
+
const rootClassName$b = 'dot-file-list-item';
|
|
15374
15397
|
const StyledFileListItem = styled(StyledListItem)`
|
|
15375
15398
|
${({
|
|
15376
15399
|
theme
|
|
15377
15400
|
}) => css`
|
|
15378
|
-
&.${rootClassName$
|
|
15401
|
+
&.${rootClassName$b} {
|
|
15379
15402
|
border-bottom: 1px solid ${theme.palette.figma.border.default};
|
|
15380
15403
|
&:hover {
|
|
15381
15404
|
cursor: pointer;
|
|
@@ -15387,7 +15410,7 @@ const StyledFileListItem = styled(StyledListItem)`
|
|
|
15387
15410
|
outline: none;
|
|
15388
15411
|
}
|
|
15389
15412
|
|
|
15390
|
-
&.file-success:not(:hover, :focus-visible) .${rootClassName$
|
|
15413
|
+
&.file-success:not(:hover, :focus-visible) .${rootClassName$b}-end-icon {
|
|
15391
15414
|
i:before {
|
|
15392
15415
|
color: ${theme.palette.figma.success.normal};
|
|
15393
15416
|
}
|
|
@@ -15397,7 +15420,7 @@ const StyledFileListItem = styled(StyledListItem)`
|
|
|
15397
15420
|
}
|
|
15398
15421
|
}
|
|
15399
15422
|
|
|
15400
|
-
&.file-error:not(:hover, :focus-visible) .${rootClassName$
|
|
15423
|
+
&.file-error:not(:hover, :focus-visible) .${rootClassName$b}-end-icon {
|
|
15401
15424
|
i:before,
|
|
15402
15425
|
.MuiListItemText-secondary {
|
|
15403
15426
|
color: ${theme.palette.figma.destructive.normal};
|
|
@@ -15439,7 +15462,7 @@ const DotFileListItem = ({
|
|
|
15439
15462
|
onKeyPress,
|
|
15440
15463
|
tabIndex = 0
|
|
15441
15464
|
}) => {
|
|
15442
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
15465
|
+
const rootClasses = useStylesWithRootClass(rootClassName$b, className, error ? 'file-error' : 'file-success');
|
|
15443
15466
|
const defaultIcon = error ? 'error-solid' : 'check-solid';
|
|
15444
15467
|
const [endIcon, setEndIcon] = useState(defaultIcon);
|
|
15445
15468
|
const handleItemClick = clickedFile => _event => onClick === null || onClick === void 0 ? void 0 : onClick(clickedFile);
|
|
@@ -15472,7 +15495,7 @@ const DotFileListItem = ({
|
|
|
15472
15495
|
})]
|
|
15473
15496
|
}), jsx(DotIconButton, {
|
|
15474
15497
|
ariaLabel: "delete file",
|
|
15475
|
-
className: `${rootClassName$
|
|
15498
|
+
className: `${rootClassName$b}-end-icon`,
|
|
15476
15499
|
"data-testid": dataTestId && `${dataTestId}-end-icon`,
|
|
15477
15500
|
disabled: disableDelete,
|
|
15478
15501
|
iconId: endIcon,
|
|
@@ -15596,7 +15619,7 @@ const DotFileUpload = ({
|
|
|
15596
15619
|
buttonOnly = false,
|
|
15597
15620
|
className,
|
|
15598
15621
|
contentErrors,
|
|
15599
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
15622
|
+
'data-pendoid': dataPendoId = rootClassName$c,
|
|
15600
15623
|
'data-testid': dataTestId,
|
|
15601
15624
|
disabled,
|
|
15602
15625
|
hideFilesList,
|
|
@@ -15609,7 +15632,7 @@ const DotFileUpload = ({
|
|
|
15609
15632
|
const [uploadedFiles, setUploadedFiles] = useState([]);
|
|
15610
15633
|
const [hasMaxFilesError, setHasMaxFilesError] = useState(false);
|
|
15611
15634
|
const isUploadDisabled = disabled || maxFiles && uploadedFiles.length >= maxFiles;
|
|
15612
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
15635
|
+
const rootClasses = useStylesWithRootClass(rootClassName$c, className, !buttonOnly ? dropZoneClassName : '', isUploadDisabled ? 'disabled' : '');
|
|
15613
15636
|
const maxFilesClasses = useStylesWithRootClass('dot-max-files-message', hasMaxFilesError ? 'dot-max-files-reached' : '');
|
|
15614
15637
|
const allowMultiple = maxFiles === undefined || maxFiles > 1;
|
|
15615
15638
|
const setNewlyUploadedFiles = (acceptedFiles, fileRejections) => {
|
|
@@ -15681,12 +15704,12 @@ const DotFileUpload = ({
|
|
|
15681
15704
|
});
|
|
15682
15705
|
};
|
|
15683
15706
|
|
|
15684
|
-
const rootClassName$
|
|
15707
|
+
const rootClassName$a = 'dot-divider';
|
|
15685
15708
|
const StyledDivider = styled(Divider)`
|
|
15686
15709
|
${({
|
|
15687
15710
|
theme
|
|
15688
15711
|
}) => css`
|
|
15689
|
-
&.${rootClassName$
|
|
15712
|
+
&.${rootClassName$a} {
|
|
15690
15713
|
color: ${theme.palette.figma.border.darker};
|
|
15691
15714
|
|
|
15692
15715
|
.MuiDivider-light {
|
|
@@ -15706,7 +15729,7 @@ const DotDivider = ({
|
|
|
15706
15729
|
orientation,
|
|
15707
15730
|
variant
|
|
15708
15731
|
}) => {
|
|
15709
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
15732
|
+
const rootClasses = useStylesWithRootClass(rootClassName$a, className);
|
|
15710
15733
|
return jsx(StyledDivider, {
|
|
15711
15734
|
absolute: absolute,
|
|
15712
15735
|
"aria-label": ariaLabel,
|
|
@@ -15733,7 +15756,7 @@ const DotPopper = ({
|
|
|
15733
15756
|
open,
|
|
15734
15757
|
placement
|
|
15735
15758
|
}) => {
|
|
15736
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
15759
|
+
const rootClasses = useStylesWithRootClass(rootClassName$16, className);
|
|
15737
15760
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15738
15761
|
const handleClickAway = event => {
|
|
15739
15762
|
if (onClickAway && (!anchorEl || !anchorEl.contains(event.currentTarget))) {
|
|
@@ -15787,14 +15810,14 @@ const getListItemLayout = listItems => {
|
|
|
15787
15810
|
}));
|
|
15788
15811
|
};
|
|
15789
15812
|
|
|
15790
|
-
const rootClassName$
|
|
15813
|
+
const rootClassName$9 = 'dot-draggable-list';
|
|
15791
15814
|
const listItemClassName = 'dot-draggable-list-item';
|
|
15792
15815
|
const StyledDraggableList = styled.div`
|
|
15793
15816
|
${({
|
|
15794
15817
|
theme,
|
|
15795
15818
|
draggableHandle
|
|
15796
15819
|
}) => css`
|
|
15797
|
-
&.${rootClassName$
|
|
15820
|
+
&.${rootClassName$9} {
|
|
15798
15821
|
padding: ${theme.spacing(1, 0)};
|
|
15799
15822
|
position: relative;
|
|
15800
15823
|
|
|
@@ -15829,7 +15852,7 @@ const ListGridLayout = WidthProvider(GridLayout);
|
|
|
15829
15852
|
const DotDraggableList = ({
|
|
15830
15853
|
ariaLabel,
|
|
15831
15854
|
className,
|
|
15832
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
15855
|
+
'data-pendoid': dataPendoId = rootClassName$9,
|
|
15833
15856
|
'data-testid': dataTestId,
|
|
15834
15857
|
disableDrag,
|
|
15835
15858
|
draggableHandle,
|
|
@@ -15838,7 +15861,7 @@ const DotDraggableList = ({
|
|
|
15838
15861
|
rowHeight = DEFAULT_LIST_ITEM_HEIGHT,
|
|
15839
15862
|
width = DEFAULT_LIST_WIDTH
|
|
15840
15863
|
}) => {
|
|
15841
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
15864
|
+
const rootClasses = useStylesWithRootClass(rootClassName$9, className, draggableHandle ? 'with-draggable-handle' : '');
|
|
15842
15865
|
const listItemClasses = useStylesWithRootClass(listItemClassName, draggableHandle && !disableDrag ? 'with-handle-grab-cursor' : '', draggableHandle || disableDrag ? 'with-default-cursor' : '');
|
|
15843
15866
|
const listWidth = isNumber(width) ? `${width}px` : width;
|
|
15844
15867
|
const [orderedItems, setOrderedItems] = useState([]);
|
|
@@ -15885,12 +15908,12 @@ const DotDraggableList = ({
|
|
|
15885
15908
|
});
|
|
15886
15909
|
};
|
|
15887
15910
|
|
|
15888
|
-
const rootClassName$
|
|
15911
|
+
const rootClassName$8 = 'dot-linear-progress';
|
|
15889
15912
|
const StyledLinearProgress = styled(LinearProgress)`
|
|
15890
15913
|
${({
|
|
15891
15914
|
theme
|
|
15892
15915
|
}) => css`
|
|
15893
|
-
&.${rootClassName$
|
|
15916
|
+
&.${rootClassName$8} {
|
|
15894
15917
|
&.MuiLinearProgress-colorError {
|
|
15895
15918
|
color: ${theme.palette.figma.inProgress.error};
|
|
15896
15919
|
}
|
|
@@ -15922,7 +15945,7 @@ const DotLinearProgress = ({
|
|
|
15922
15945
|
valueBuffer,
|
|
15923
15946
|
variant = 'indeterminate'
|
|
15924
15947
|
}) => {
|
|
15925
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
15948
|
+
const rootClasses = useStylesWithRootClass(rootClassName$8, className);
|
|
15926
15949
|
useEffect(() => {
|
|
15927
15950
|
if (!ariaLabel) {
|
|
15928
15951
|
console.warn('a11y: DotLinearProgress must have an ariaLabel to describe the progress bar');
|
|
@@ -15973,7 +15996,7 @@ const DotDatePicker = ({
|
|
|
15973
15996
|
autoFocus = false,
|
|
15974
15997
|
className,
|
|
15975
15998
|
closeOnSelect = true,
|
|
15976
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
15999
|
+
'data-pendoid': dataPendoId = rootClassName$B,
|
|
15977
16000
|
'data-testid': dataTestId,
|
|
15978
16001
|
defaultValue,
|
|
15979
16002
|
disableOpenPicker,
|
|
@@ -16013,7 +16036,7 @@ const DotDatePicker = ({
|
|
|
16013
16036
|
const hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
|
|
16014
16037
|
const isInputReadOnly = readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
|
|
16015
16038
|
const inputRef = useRef(null);
|
|
16016
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
16039
|
+
const rootClasses = useStylesWithRootClass(rootClassName$B, className, isInputReadOnly ? 'read-only' : '');
|
|
16017
16040
|
const containerClasses = useStylesWithRootClass(containerClassName$2, fullWidth ? 'full-width' : '', className);
|
|
16018
16041
|
const focusInput = ref => {
|
|
16019
16042
|
setTimeout(() => {
|
|
@@ -16232,7 +16255,7 @@ const DotTimePicker = ({
|
|
|
16232
16255
|
ariaLabel,
|
|
16233
16256
|
autoFocus = false,
|
|
16234
16257
|
className,
|
|
16235
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
16258
|
+
'data-pendoid': dataPendoId = rootClassName$A,
|
|
16236
16259
|
'data-testid': dataTestId,
|
|
16237
16260
|
defaultValue,
|
|
16238
16261
|
disableOpenPicker = false,
|
|
@@ -16264,7 +16287,7 @@ const DotTimePicker = ({
|
|
|
16264
16287
|
const hasValueWithoutChangeHandler = value !== undefined && onChange === undefined;
|
|
16265
16288
|
const hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
|
|
16266
16289
|
const isComponentReadOnly = readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
|
|
16267
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
16290
|
+
const rootClasses = useStylesWithRootClass(rootClassName$A, className, isComponentReadOnly ? 'read-only' : '');
|
|
16268
16291
|
const containerClasses = useStylesWithRootClass(containerClassName$1, fullWidth ? 'full-width' : '', className);
|
|
16269
16292
|
const inputRef = useRef(null);
|
|
16270
16293
|
const [isPickerOpened, setIsPickerOpened] = useState(false);
|
|
@@ -16556,13 +16579,13 @@ const DotTimePicker = ({
|
|
|
16556
16579
|
});
|
|
16557
16580
|
};
|
|
16558
16581
|
|
|
16559
|
-
const rootClassName$
|
|
16582
|
+
const rootClassName$7 = 'dot-carousel';
|
|
16560
16583
|
const StyledCarousel = styled.div`
|
|
16561
16584
|
${({
|
|
16562
16585
|
backgroundColor,
|
|
16563
16586
|
theme
|
|
16564
16587
|
}) => css`
|
|
16565
|
-
&.${rootClassName$
|
|
16588
|
+
&.${rootClassName$7} {
|
|
16566
16589
|
display: flex;
|
|
16567
16590
|
flex-direction: column;
|
|
16568
16591
|
justify-content: space-between;
|
|
@@ -16661,7 +16684,7 @@ const DotCarousel = ({
|
|
|
16661
16684
|
progressIndicator,
|
|
16662
16685
|
showPagesButtons = true
|
|
16663
16686
|
}) => {
|
|
16664
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
16687
|
+
const rootClasses = useStylesWithRootClass(rootClassName$7, className, backgroundColor ? 'with-background-color' : '');
|
|
16665
16688
|
const rightNavigationButtonClasses = useStylesWithRootClass('carousel-right-arrow', displayNavigationButtons);
|
|
16666
16689
|
const leftNavigationButtonClasses = useStylesWithRootClass('carousel-left-arrow', displayNavigationButtons);
|
|
16667
16690
|
const createUuids = () => {
|
|
@@ -16812,13 +16835,13 @@ const DotCarousel = ({
|
|
|
16812
16835
|
});
|
|
16813
16836
|
};
|
|
16814
16837
|
|
|
16815
|
-
const rootClassName = 'dot-sticky-with-border';
|
|
16838
|
+
const rootClassName$6 = 'dot-sticky-with-border';
|
|
16816
16839
|
const StyledStickyWithBorder = styled.div`
|
|
16817
16840
|
${({
|
|
16818
16841
|
pinnedStickyBorder,
|
|
16819
16842
|
unpinnedStickyBorder
|
|
16820
16843
|
}) => css`
|
|
16821
|
-
&.${rootClassName} {
|
|
16844
|
+
&.${rootClassName$6} {
|
|
16822
16845
|
position: sticky;
|
|
16823
16846
|
top: -1px;
|
|
16824
16847
|
|
|
@@ -16846,7 +16869,7 @@ const DotStickyWithBorder = ({
|
|
|
16846
16869
|
}) => {
|
|
16847
16870
|
const [isPinned, setIsPinned] = useState(false);
|
|
16848
16871
|
const ref = useRef();
|
|
16849
|
-
const rootClasses = useStylesWithRootClass(rootClassName, className, isPinned ? 'pinned' : 'unpinned');
|
|
16872
|
+
const rootClasses = useStylesWithRootClass(rootClassName$6, className, isPinned ? 'pinned' : 'unpinned');
|
|
16850
16873
|
useEffect(() => {
|
|
16851
16874
|
const element = ref.current;
|
|
16852
16875
|
const observer = new IntersectionObserver(([e]) => setIsPinned(e.intersectionRatio < 1), {
|
|
@@ -16868,4 +16891,499 @@ const DotStickyWithBorder = ({
|
|
|
16868
16891
|
});
|
|
16869
16892
|
};
|
|
16870
16893
|
|
|
16871
|
-
|
|
16894
|
+
const rootClassName$5 = 'dot--board';
|
|
16895
|
+
const classNames$5 = {
|
|
16896
|
+
root: rootClassName$5,
|
|
16897
|
+
spacingNormal: `${rootClassName$5}-normal`,
|
|
16898
|
+
spacingDense: `${rootClassName$5}-dense`,
|
|
16899
|
+
loading: `${rootClassName$5}-loading`
|
|
16900
|
+
};
|
|
16901
|
+
const StyledBoard = styled.div`
|
|
16902
|
+
${({
|
|
16903
|
+
theme
|
|
16904
|
+
}) => css`
|
|
16905
|
+
&.${rootClassName$5} {
|
|
16906
|
+
display: flex;
|
|
16907
|
+
overflow-x: auto;
|
|
16908
|
+
flex: 1;
|
|
16909
|
+
max-height: calc(100vh - ${theme.spacing(4)});
|
|
16910
|
+
}
|
|
16911
|
+
|
|
16912
|
+
@media (max-width: 650px) {
|
|
16913
|
+
&.${rootClassName$5} {
|
|
16914
|
+
justify-content: center;
|
|
16915
|
+
}
|
|
16916
|
+
}
|
|
16917
|
+
|
|
16918
|
+
&.${classNames$5.spacingNormal} {
|
|
16919
|
+
gap: ${theme.spacing(1)};
|
|
16920
|
+
}
|
|
16921
|
+
|
|
16922
|
+
&.${classNames$5.spacingDense} {
|
|
16923
|
+
gap: ${theme.spacing(0.5)};
|
|
16924
|
+
}
|
|
16925
|
+
`}
|
|
16926
|
+
`;
|
|
16927
|
+
const StyledLoadingIndicator = styled.div`
|
|
16928
|
+
${({
|
|
16929
|
+
theme
|
|
16930
|
+
}) => css`
|
|
16931
|
+
&.${classNames$5.loading} {
|
|
16932
|
+
position: absolute;
|
|
16933
|
+
background-color: rgba(255, 255, 255, 0.644);
|
|
16934
|
+
/*dim the background*/
|
|
16935
|
+
width: 100%;
|
|
16936
|
+
height: 100%;
|
|
16937
|
+
color: black;
|
|
16938
|
+
text-align: center;
|
|
16939
|
+
z-index: 1000;
|
|
16940
|
+
|
|
16941
|
+
> span {
|
|
16942
|
+
position: 'absolute'
|
|
16943
|
+
top: 30%;
|
|
16944
|
+
left: 50%;
|
|
16945
|
+
-webkit-transform: translate(-30%, -50%);
|
|
16946
|
+
transform: translate(-30%, -50%);
|
|
16947
|
+
}
|
|
16948
|
+
}
|
|
16949
|
+
`}
|
|
16950
|
+
`;
|
|
16951
|
+
|
|
16952
|
+
const BoardStatusContext = createContext({
|
|
16953
|
+
spacing: 'normal'
|
|
16954
|
+
});
|
|
16955
|
+
const useBoardStatus = () => useContext(BoardStatusContext);
|
|
16956
|
+
const BoardStatusProvider = ({
|
|
16957
|
+
children,
|
|
16958
|
+
spacing
|
|
16959
|
+
}) => {
|
|
16960
|
+
return jsx(BoardStatusContext.Provider, {
|
|
16961
|
+
value: {
|
|
16962
|
+
spacing: spacing
|
|
16963
|
+
},
|
|
16964
|
+
children: children
|
|
16965
|
+
});
|
|
16966
|
+
};
|
|
16967
|
+
|
|
16968
|
+
/**
|
|
16969
|
+
* A flexible framework component for creating a board.
|
|
16970
|
+
* Subcomponents may be used or omitted as desired
|
|
16971
|
+
* `useBoardStatus` can be used to get state information about the board
|
|
16972
|
+
*/
|
|
16973
|
+
const Board = React__default.forwardRef(({
|
|
16974
|
+
ariaLabel,
|
|
16975
|
+
'data-testid': dataTestId,
|
|
16976
|
+
children,
|
|
16977
|
+
className,
|
|
16978
|
+
loading = false,
|
|
16979
|
+
spacing = 'normal',
|
|
16980
|
+
style
|
|
16981
|
+
}, ref) => {
|
|
16982
|
+
const classNameBySpacing = {
|
|
16983
|
+
normal: classNames$5.spacingNormal,
|
|
16984
|
+
dense: classNames$5.spacingDense
|
|
16985
|
+
};
|
|
16986
|
+
const spacingClassName = classNameBySpacing[spacing];
|
|
16987
|
+
const rootClasses = useStylesWithRootClass(classNames$5.root, spacingClassName, className);
|
|
16988
|
+
const loadingIndicator = jsx(StyledLoadingIndicator, {
|
|
16989
|
+
"data-testid": `${dataTestId}-loading`,
|
|
16990
|
+
className: classNames$5.loading,
|
|
16991
|
+
children: jsx("span", {
|
|
16992
|
+
children: jsx(DotProgress, {
|
|
16993
|
+
tooltip: "Loading Data...",
|
|
16994
|
+
color: "primary",
|
|
16995
|
+
variant: "indeterminate",
|
|
16996
|
+
ariaLabel: "Loading..."
|
|
16997
|
+
})
|
|
16998
|
+
})
|
|
16999
|
+
});
|
|
17000
|
+
if (loading) return loadingIndicator;
|
|
17001
|
+
return jsx(StyledBoard, {
|
|
17002
|
+
"aria-label": ariaLabel,
|
|
17003
|
+
style: style,
|
|
17004
|
+
"data-testid": dataTestId,
|
|
17005
|
+
className: rootClasses,
|
|
17006
|
+
ref: ref,
|
|
17007
|
+
children: jsx(BoardStatusProvider, {
|
|
17008
|
+
spacing: spacing,
|
|
17009
|
+
children: children
|
|
17010
|
+
})
|
|
17011
|
+
});
|
|
17012
|
+
});
|
|
17013
|
+
|
|
17014
|
+
const rootClassName$4 = 'dot--board-column';
|
|
17015
|
+
const classNames$4 = {
|
|
17016
|
+
root: rootClassName$4,
|
|
17017
|
+
spacingNormal: `${rootClassName$4}-normal`,
|
|
17018
|
+
spacingDense: `${rootClassName$4}-dense`,
|
|
17019
|
+
collapse: `${rootClassName$4}-collapse`
|
|
17020
|
+
};
|
|
17021
|
+
const StyledBoardColumn = styled.div`
|
|
17022
|
+
${({
|
|
17023
|
+
theme
|
|
17024
|
+
}) => css`
|
|
17025
|
+
&.${rootClassName$4} {
|
|
17026
|
+
display: flex;
|
|
17027
|
+
flex-direction: column;
|
|
17028
|
+
overflow: hidden;
|
|
17029
|
+
min-height: ${theme.spacing(31)};
|
|
17030
|
+
background-color: ${theme.palette.figma.background.level0.bckgGray};
|
|
17031
|
+
border-radius: ${theme.spacing(0.5)};
|
|
17032
|
+
margin-bottom: ${theme.spacing(0.5)}
|
|
17033
|
+
flex: 1;
|
|
17034
|
+
}
|
|
17035
|
+
|
|
17036
|
+
&.${classNames$4.collapse} {
|
|
17037
|
+
width: fit-content;
|
|
17038
|
+
min-width: fit-content;
|
|
17039
|
+
max-width: ${theme.spacing(2)};
|
|
17040
|
+
}
|
|
17041
|
+
|
|
17042
|
+
&.${classNames$4.spacingNormal} {
|
|
17043
|
+
width: ${theme.spacing(42)};
|
|
17044
|
+
min-width: ${theme.spacing(42)};
|
|
17045
|
+
}
|
|
17046
|
+
|
|
17047
|
+
&.${classNames$4.spacingDense} {
|
|
17048
|
+
min-width: ${theme.spacing(31)};
|
|
17049
|
+
max-width: ${theme.spacing(42)};
|
|
17050
|
+
width: auto;
|
|
17051
|
+
}
|
|
17052
|
+
`}
|
|
17053
|
+
`;
|
|
17054
|
+
|
|
17055
|
+
const BoardColumnStatusContext = createContext({
|
|
17056
|
+
collapsed: false,
|
|
17057
|
+
setCollapsed: () => {
|
|
17058
|
+
return;
|
|
17059
|
+
}
|
|
17060
|
+
});
|
|
17061
|
+
const useColumnStatus = () => useContext(BoardColumnStatusContext);
|
|
17062
|
+
const ColumnStatusProvider = ({
|
|
17063
|
+
children,
|
|
17064
|
+
onCollapseToggle
|
|
17065
|
+
}) => {
|
|
17066
|
+
const [isCollapsed, setIsCollapsed] = useState(false);
|
|
17067
|
+
useEffect(() => {
|
|
17068
|
+
if (onCollapseToggle) onCollapseToggle(isCollapsed);
|
|
17069
|
+
}, [isCollapsed]);
|
|
17070
|
+
return jsx(BoardColumnStatusContext.Provider, {
|
|
17071
|
+
value: {
|
|
17072
|
+
collapsed: isCollapsed,
|
|
17073
|
+
setCollapsed: setIsCollapsed
|
|
17074
|
+
},
|
|
17075
|
+
children: children
|
|
17076
|
+
});
|
|
17077
|
+
};
|
|
17078
|
+
|
|
17079
|
+
/**
|
|
17080
|
+
* Represents a single column in the board.
|
|
17081
|
+
* useColumnStatus can be used to get state information about the column
|
|
17082
|
+
*/
|
|
17083
|
+
const BoardColumn = React__default.forwardRef(({
|
|
17084
|
+
ariaLabel,
|
|
17085
|
+
'data-testid': dataTestId,
|
|
17086
|
+
children,
|
|
17087
|
+
className,
|
|
17088
|
+
style
|
|
17089
|
+
}, ref) => {
|
|
17090
|
+
const classNameBySpacing = {
|
|
17091
|
+
normal: classNames$4.spacingNormal,
|
|
17092
|
+
dense: classNames$4.spacingDense
|
|
17093
|
+
};
|
|
17094
|
+
const {
|
|
17095
|
+
spacing
|
|
17096
|
+
} = useBoardStatus();
|
|
17097
|
+
const [spacingClassName, setSpacingClassName] = useState(classNameBySpacing[spacing]);
|
|
17098
|
+
const rootClasses = useStylesWithRootClass(classNames$4.root, spacingClassName, className);
|
|
17099
|
+
const handleCollapseToggle = isCollapsed => {
|
|
17100
|
+
const className = isCollapsed ? classNames$4.collapse : classNameBySpacing[spacing];
|
|
17101
|
+
setSpacingClassName(className);
|
|
17102
|
+
};
|
|
17103
|
+
return jsx(StyledBoardColumn, {
|
|
17104
|
+
"aria-label": ariaLabel,
|
|
17105
|
+
"data-testid": dataTestId,
|
|
17106
|
+
className: rootClasses,
|
|
17107
|
+
style: style,
|
|
17108
|
+
ref: ref,
|
|
17109
|
+
children: jsx(ColumnStatusProvider, {
|
|
17110
|
+
onCollapseToggle: handleCollapseToggle,
|
|
17111
|
+
children: children
|
|
17112
|
+
})
|
|
17113
|
+
});
|
|
17114
|
+
});
|
|
17115
|
+
|
|
17116
|
+
const rootClassName$3 = 'dot--board-column-header';
|
|
17117
|
+
const classNames$3 = {
|
|
17118
|
+
root: rootClassName$3,
|
|
17119
|
+
spacingNormal: `${rootClassName$3}-normal`,
|
|
17120
|
+
spacingDense: `${rootClassName$3}-dense`,
|
|
17121
|
+
colorBar: `${rootClassName$3}-color-bar`,
|
|
17122
|
+
title: `${rootClassName$3}-title`
|
|
17123
|
+
};
|
|
17124
|
+
const StyledBoardColumnHeader = styled.div`
|
|
17125
|
+
${({
|
|
17126
|
+
theme
|
|
17127
|
+
}) => css`
|
|
17128
|
+
&.${classNames$3.root} {
|
|
17129
|
+
display: flex;
|
|
17130
|
+
flex-direction: column;
|
|
17131
|
+
}
|
|
17132
|
+
|
|
17133
|
+
> .${classNames$3.colorBar} {
|
|
17134
|
+
height: ${theme.spacing(0.5)};
|
|
17135
|
+
width: 100%;
|
|
17136
|
+
}
|
|
17137
|
+
|
|
17138
|
+
> .${classNames$3.title} {
|
|
17139
|
+
display: flex;
|
|
17140
|
+
justify-content: space-between;
|
|
17141
|
+
}
|
|
17142
|
+
|
|
17143
|
+
&.${classNames$3.spacingNormal} > .${classNames$3.title} {
|
|
17144
|
+
padding: ${theme.spacing(1)};
|
|
17145
|
+
}
|
|
17146
|
+
|
|
17147
|
+
&.${classNames$3.spacingDense} > .${classNames$3.title} {
|
|
17148
|
+
padding: ${theme.spacing(0.5)};
|
|
17149
|
+
}
|
|
17150
|
+
`}
|
|
17151
|
+
`;
|
|
17152
|
+
|
|
17153
|
+
/**
|
|
17154
|
+
* Header for the column. Expects lineBarHexColor to have the form: "#XXXXXX"
|
|
17155
|
+
*/
|
|
17156
|
+
const BoardColumnHeader = ({
|
|
17157
|
+
ariaLabel,
|
|
17158
|
+
'data-testid': dataTestId,
|
|
17159
|
+
children,
|
|
17160
|
+
className,
|
|
17161
|
+
lineBarHexColor,
|
|
17162
|
+
style
|
|
17163
|
+
}) => {
|
|
17164
|
+
const classNameBySpacing = {
|
|
17165
|
+
normal: classNames$3.spacingNormal,
|
|
17166
|
+
dense: classNames$3.spacingDense
|
|
17167
|
+
};
|
|
17168
|
+
const {
|
|
17169
|
+
spacing
|
|
17170
|
+
} = useBoardStatus();
|
|
17171
|
+
const spacingClassName = classNameBySpacing[spacing];
|
|
17172
|
+
const rootClasses = useStylesWithRootClass(classNames$3.root, spacingClassName, className);
|
|
17173
|
+
return jsxs(StyledBoardColumnHeader, {
|
|
17174
|
+
"aria-label": ariaLabel,
|
|
17175
|
+
"data-testid": dataTestId,
|
|
17176
|
+
className: rootClasses,
|
|
17177
|
+
style: style,
|
|
17178
|
+
children: [jsx("div", {
|
|
17179
|
+
className: classNames$3.colorBar,
|
|
17180
|
+
style: {
|
|
17181
|
+
background: lineBarHexColor || 'inherit'
|
|
17182
|
+
}
|
|
17183
|
+
}), jsx("div", {
|
|
17184
|
+
className: classNames$3.title,
|
|
17185
|
+
children: children
|
|
17186
|
+
})]
|
|
17187
|
+
});
|
|
17188
|
+
};
|
|
17189
|
+
|
|
17190
|
+
const rootClassName$2 = 'dot--board-column-items';
|
|
17191
|
+
const classNames$2 = {
|
|
17192
|
+
root: rootClassName$2,
|
|
17193
|
+
spacingNormal: `${rootClassName$2}-normal`,
|
|
17194
|
+
spacingDense: `${rootClassName$2}-dense`
|
|
17195
|
+
};
|
|
17196
|
+
const StyledBoardColumnItems = styled.div`
|
|
17197
|
+
${({
|
|
17198
|
+
theme
|
|
17199
|
+
}) => css`
|
|
17200
|
+
&.${classNames$2.root} {
|
|
17201
|
+
overflow-y: auto;
|
|
17202
|
+
height: 100%;
|
|
17203
|
+
display: flex;
|
|
17204
|
+
gap: ${theme.spacing(0.5)};
|
|
17205
|
+
flex-direction: column;
|
|
17206
|
+
}
|
|
17207
|
+
|
|
17208
|
+
&.${classNames$2.spacingNormal} {
|
|
17209
|
+
padding: 0 ${theme.spacing(1)};
|
|
17210
|
+
}
|
|
17211
|
+
|
|
17212
|
+
&.${classNames$2.spacingDense} {
|
|
17213
|
+
padding: 0 ${theme.spacing(0.5)};
|
|
17214
|
+
}
|
|
17215
|
+
`}
|
|
17216
|
+
`;
|
|
17217
|
+
|
|
17218
|
+
/**
|
|
17219
|
+
* Container for items within a column
|
|
17220
|
+
*/
|
|
17221
|
+
const BoardColumnItems = ({
|
|
17222
|
+
ariaLabel,
|
|
17223
|
+
'data-testid': dataTestId,
|
|
17224
|
+
children,
|
|
17225
|
+
className,
|
|
17226
|
+
style
|
|
17227
|
+
}) => {
|
|
17228
|
+
const classNameBySpacing = {
|
|
17229
|
+
normal: classNames$2.spacingNormal,
|
|
17230
|
+
dense: classNames$2.spacingDense
|
|
17231
|
+
};
|
|
17232
|
+
const {
|
|
17233
|
+
spacing
|
|
17234
|
+
} = useBoardStatus();
|
|
17235
|
+
const spacingClassName = classNameBySpacing[spacing];
|
|
17236
|
+
const rootClasses = useStylesWithRootClass(classNames$2.root, spacingClassName, className);
|
|
17237
|
+
return jsx(StyledBoardColumnItems, {
|
|
17238
|
+
"aria-label": ariaLabel,
|
|
17239
|
+
"data-testid": dataTestId,
|
|
17240
|
+
className: rootClasses,
|
|
17241
|
+
style: style,
|
|
17242
|
+
children: children
|
|
17243
|
+
});
|
|
17244
|
+
};
|
|
17245
|
+
|
|
17246
|
+
const rootClassName$1 = 'dot--board-column-action-bar';
|
|
17247
|
+
const classNames$1 = {
|
|
17248
|
+
root: rootClassName$1,
|
|
17249
|
+
spacingNormal: `${rootClassName$1}-normal`,
|
|
17250
|
+
spacingDense: `${rootClassName$1}-dense`
|
|
17251
|
+
};
|
|
17252
|
+
const StyledBoardColumnActionBar = styled(DotActionToolbar)`
|
|
17253
|
+
${({
|
|
17254
|
+
theme
|
|
17255
|
+
}) => css`
|
|
17256
|
+
&.${classNames$1.root} {
|
|
17257
|
+
display: flex;
|
|
17258
|
+
justify-content: space-around;
|
|
17259
|
+
}
|
|
17260
|
+
|
|
17261
|
+
&.${classNames$1.spacingNormal} {
|
|
17262
|
+
padding: 0 ${theme.spacing(1)};
|
|
17263
|
+
}
|
|
17264
|
+
|
|
17265
|
+
&.${classNames$1.spacingDense} {
|
|
17266
|
+
padding: 0;
|
|
17267
|
+
}
|
|
17268
|
+
`}
|
|
17269
|
+
`;
|
|
17270
|
+
|
|
17271
|
+
/*
|
|
17272
|
+
Represents an action bar within the column.
|
|
17273
|
+
*/
|
|
17274
|
+
const BoardColumnActionBar = ({
|
|
17275
|
+
ariaLabel,
|
|
17276
|
+
'data-testid': dataTestId,
|
|
17277
|
+
children,
|
|
17278
|
+
className
|
|
17279
|
+
}) => {
|
|
17280
|
+
const classNameBySpacing = {
|
|
17281
|
+
normal: classNames$1.spacingNormal,
|
|
17282
|
+
dense: classNames$1.spacingDense
|
|
17283
|
+
};
|
|
17284
|
+
const {
|
|
17285
|
+
spacing
|
|
17286
|
+
} = useBoardStatus();
|
|
17287
|
+
const spacingClassName = classNameBySpacing[spacing];
|
|
17288
|
+
const rootClasses = useStylesWithRootClass(classNames$1.root, spacingClassName, className);
|
|
17289
|
+
return jsx(StyledBoardColumnActionBar, {
|
|
17290
|
+
ariaLabel: ariaLabel,
|
|
17291
|
+
"data-testid": dataTestId,
|
|
17292
|
+
className: rootClasses,
|
|
17293
|
+
children: children
|
|
17294
|
+
});
|
|
17295
|
+
};
|
|
17296
|
+
|
|
17297
|
+
/**
|
|
17298
|
+
* Optional component. Displays any children when the column is expanded.
|
|
17299
|
+
*/
|
|
17300
|
+
const BoardColumnExpand = ({
|
|
17301
|
+
children
|
|
17302
|
+
}) => {
|
|
17303
|
+
const {
|
|
17304
|
+
collapsed
|
|
17305
|
+
} = useColumnStatus();
|
|
17306
|
+
return useMemo(() => collapsed ? null : children, [children, collapsed]);
|
|
17307
|
+
};
|
|
17308
|
+
|
|
17309
|
+
/**
|
|
17310
|
+
* Optional component. Displays any children when the column is collapsed.
|
|
17311
|
+
*/
|
|
17312
|
+
const BoardColumnCollapse = ({
|
|
17313
|
+
children
|
|
17314
|
+
}) => {
|
|
17315
|
+
const {
|
|
17316
|
+
collapsed
|
|
17317
|
+
} = useColumnStatus();
|
|
17318
|
+
return useMemo(() => collapsed ? children : null, [children, collapsed]);
|
|
17319
|
+
};
|
|
17320
|
+
|
|
17321
|
+
const rootClassName = 'dot--board-column-header';
|
|
17322
|
+
const classNames = {
|
|
17323
|
+
root: rootClassName,
|
|
17324
|
+
spacingNormal: `${rootClassName}-normal`,
|
|
17325
|
+
spacingDense: `${rootClassName}-dense`,
|
|
17326
|
+
title: `${rootClassName}-title`,
|
|
17327
|
+
text: `${rootClassName}-text`
|
|
17328
|
+
};
|
|
17329
|
+
const StyledBoardColumnSummary = styled.div`
|
|
17330
|
+
${({
|
|
17331
|
+
theme
|
|
17332
|
+
}) => css`
|
|
17333
|
+
&.${classNames.root} {
|
|
17334
|
+
height: 100%;
|
|
17335
|
+
padding: 0 ${theme.spacing(1)};
|
|
17336
|
+
writing-mode: vertical-lr;
|
|
17337
|
+
text-orientation: sideways;
|
|
17338
|
+
overflow-y: hidden;
|
|
17339
|
+
}
|
|
17340
|
+
|
|
17341
|
+
> .${classNames.title} {
|
|
17342
|
+
display: inline-block;
|
|
17343
|
+
margin-bottom: ${theme.spacing(1)};
|
|
17344
|
+
}
|
|
17345
|
+
|
|
17346
|
+
> .${classNames.text} {
|
|
17347
|
+
font-weight: 600;
|
|
17348
|
+
color: #667385
|
|
17349
|
+
}
|
|
17350
|
+
`}
|
|
17351
|
+
`;
|
|
17352
|
+
|
|
17353
|
+
/**
|
|
17354
|
+
* A summary component for a a column. Displays test verticially instead of horizonally.
|
|
17355
|
+
*/
|
|
17356
|
+
const BoardColumnSummary = ({
|
|
17357
|
+
ariaLabel,
|
|
17358
|
+
'data-testid': dataTestId,
|
|
17359
|
+
className,
|
|
17360
|
+
style,
|
|
17361
|
+
text,
|
|
17362
|
+
title
|
|
17363
|
+
}) => {
|
|
17364
|
+
const classNameBySpacing = {
|
|
17365
|
+
normal: classNames.spacingNormal,
|
|
17366
|
+
dense: classNames.spacingDense
|
|
17367
|
+
};
|
|
17368
|
+
const {
|
|
17369
|
+
spacing
|
|
17370
|
+
} = useBoardStatus();
|
|
17371
|
+
const spacingClassName = classNameBySpacing[spacing];
|
|
17372
|
+
const rootClasses = useStylesWithRootClass(classNames.root, spacingClassName, className);
|
|
17373
|
+
return jsxs(StyledBoardColumnSummary, {
|
|
17374
|
+
"aria-label": ariaLabel,
|
|
17375
|
+
"data-testid": dataTestId,
|
|
17376
|
+
className: rootClasses,
|
|
17377
|
+
style: style,
|
|
17378
|
+
children: [jsx(DotTypography, {
|
|
17379
|
+
className: classNames.title,
|
|
17380
|
+
variant: "h4",
|
|
17381
|
+
children: title
|
|
17382
|
+
}), jsx("span", {
|
|
17383
|
+
className: classNames.text,
|
|
17384
|
+
children: text
|
|
17385
|
+
})]
|
|
17386
|
+
});
|
|
17387
|
+
};
|
|
17388
|
+
|
|
17389
|
+
export { ApiError$1 as ApiError, BoardStatusProvider, Cell, ColumnStatusProvider, CreateUUID, CssCell, CssGrid, CssGridDebug, DashboardAppTypeOptions, DatePickerKeydownContext, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, 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, DotClickAwayListener, DotConfirmationDialog, DotCopyButton, DotCoreApiProvider, DotDashboardActions, DotDashboardDialog, DotDashboardHeader, DotDashboardOptionsMenu, DotDashboardPublishConfirm, DotDatePicker, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyFilterState, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotIllustration, DotInlineEdit, DotInputSelect, DotInputText, DotLinearProgress, DotLink, DotList, DotMenu, DotMetadataApiProvider, DotNavigationRail, DotPill, DotPopper, DotProgress, DotProgressButton, DotRadioButton, DotRadioGroup, DotSidebar, DotSkeleton, DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, DotSplitButton, DotStepper, DotStickyWithBorder, DotSwitch, DotTable, DotTableAction, DotTableActions, DotTablePagination, DotTabs, DotThemeProvider, DotTimePicker, DotTooltip, DotTruncateWithTooltip, DotTypography, avatarColors, breakpointOptions, checkIfValidDate, darkFigmaColors, lightThemeColors as lightColors, lightFigmaColors, mockScrollIntoView, parseAutoCompleteValue, variables as themeVariables, typographyOptions, useBoardStatus, useColumnStatus, useDotCoreApiContext, useDotMetadataApiContext, useDotSnackbarContext, useEnqueueErrorMessage };
|