@digital-ai/dot-components 2.28.0 → 3.1.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,11 +1,12 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import { useState, useRef, useEffect, createContext, useMemo, useContext, forwardRef, useCallback, createElement, Fragment as Fragment$1, useLayoutEffect } from 'react';
4
- import { Tooltip, Icon, Typography, Accordion, AccordionSummary, AccordionDetails, AccordionActions, InputAdornment, InputLabel, TextField, Toolbar, Alert, Fade, StyledEngineProvider, 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, RadioGroup, Radio, Switch, Skeleton, Snackbar, ButtonGroup, Stepper, Step, StepLabel, StepContent, TablePagination, TableContainer, TableBody, TableCell, TableRow, TableSortLabel, TableHead, Table, Tabs, Tab, LinearProgress, Slide } from '@mui/material';
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, RadioGroup, Radio, Switch, Skeleton, Snackbar, 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';
7
7
  import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';
8
8
  import jwt_decode from 'jwt-decode';
9
+ import '@digital-ai/dot-illustrations';
9
10
  import { useDropzone } from 'react-dropzone';
10
11
  import GridLayout, { WidthProvider } from 'react-grid-layout';
11
12
  import dayjs from 'dayjs';
@@ -101,12 +102,12 @@ const DotTooltip = ({
101
102
  }) : children;
102
103
  };
103
104
 
104
- const rootClassName$18 = 'dot-icon';
105
+ const rootClassName$19 = 'dot-icon';
105
106
  const StyledIcon = styled(Icon)`
106
107
  ${({
107
108
  theme
108
109
  }) => css`
109
- &.${rootClassName$18} {
110
+ &.${rootClassName$19} {
110
111
  color: ${theme.palette.figma.icon.black};
111
112
  font-size: 20px;
112
113
 
@@ -143,7 +144,7 @@ const DotIcon = ({
143
144
  iconId,
144
145
  tooltip
145
146
  }) => {
146
- const rootClasses = useStylesWithRootClass(rootClassName$18, className);
147
+ const rootClasses = useStylesWithRootClass(rootClassName$19, className);
147
148
  return jsx(DotTooltip, {
148
149
  title: tooltip,
149
150
  children: jsx(StyledIcon, {
@@ -204,7 +205,7 @@ const DotTypography = ({
204
205
  });
205
206
  };
206
207
 
207
- const rootClassName$17 = 'dot-accordion';
208
+ const rootClassName$18 = 'dot-accordion';
208
209
  const summaryClassName = 'dot-accordion-summary';
209
210
  const detailClassName = 'dot-accordion-details';
210
211
  const StyledAccordion = styled(Accordion)`
@@ -215,7 +216,7 @@ const StyledAccordion = styled(Accordion)`
215
216
  background: ${theme.palette.figma.background.level1.white};
216
217
  }
217
218
 
218
- &.${rootClassName$17} .${summaryClassName} {
219
+ &.${rootClassName$18} .${summaryClassName} {
219
220
  align-items: center;
220
221
  background: ${theme.palette.figma.background.level1.white};
221
222
  color: ${theme.palette.figma.typography.black};
@@ -260,7 +261,7 @@ const DotAccordion = ({
260
261
  ariaLabel,
261
262
  children,
262
263
  className,
263
- 'data-pendoid': dataPendoId = rootClassName$17,
264
+ 'data-pendoid': dataPendoId = rootClassName$18,
264
265
  'data-testid': dataTestId = 'dot-accordion',
265
266
  disabled = false,
266
267
  expanded,
@@ -271,7 +272,7 @@ const DotAccordion = ({
271
272
  summary,
272
273
  noWrap = true
273
274
  }) => {
274
- const rootClasses = useStylesWithRootClass(rootClassName$17, className);
275
+ const rootClasses = useStylesWithRootClass(rootClassName$18, className);
275
276
  const [elevation, setElevation] = useState();
276
277
  useEffect(() => {
277
278
  if (onChange && expanded === undefined) {
@@ -387,7 +388,7 @@ const readOnlyStyles = theme => css`
387
388
  }
388
389
  `;
389
390
 
390
- const rootClassName$16 = 'dot-text-field';
391
+ const rootClassName$17 = 'dot-text-field';
391
392
  const rootSelectClassName = 'dot-select-field';
392
393
  const labelClassName = 'dot-input-label';
393
394
  const errorClassName = 'dot-error';
@@ -435,7 +436,7 @@ const StyledTextField = styled(TextField)`
435
436
  theme,
436
437
  InputProps
437
438
  }) => css`
438
- &.${rootClassName$16} {
439
+ &.${rootClassName$17} {
439
440
  .MuiInputBase-root {
440
441
  margin-bottom: 0;
441
442
  }
@@ -479,7 +480,7 @@ const StyledTextField = styled(TextField)`
479
480
  margin-right: ${theme.spacing(2)};
480
481
  }
481
482
 
482
- &.${rootSelectClassName}, &.${rootClassName$16} {
483
+ &.${rootSelectClassName}, &.${rootClassName$17} {
483
484
  .${adornmentIconClassName} {
484
485
  color: ${theme.palette.figma.icon.black};
485
486
  p {
@@ -570,15 +571,15 @@ const StyledTextField = styled(TextField)`
570
571
  `}
571
572
  `;
572
573
 
573
- const rootClassName$15 = 'dot-action-toolbar';
574
+ const rootClassName$16 = 'dot-action-toolbar';
574
575
  const StyledToolbar = styled(Toolbar)`
575
576
  ${({
576
577
  theme
577
578
  }) => css`
578
- &.${rootClassName$15} {
579
+ &.${rootClassName$16} {
579
580
  border-bottom: 1px solid ${theme.palette.figma.border.default};
580
581
 
581
- .${rootClassName$16} .MuiInputBase-root {
582
+ .${rootClassName$17} .MuiInputBase-root {
582
583
  margin-bottom: 0;
583
584
  }
584
585
  }
@@ -592,7 +593,7 @@ const DotActionToolbar = ({
592
593
  'data-testid': dataTestId,
593
594
  variant = 'dense'
594
595
  }) => {
595
- const rootClasses = useStylesWithRootClass(rootClassName$15, className);
596
+ const rootClasses = useStylesWithRootClass(rootClassName$16, className);
596
597
  return jsx(StyledToolbar, {
597
598
  "aria-label": ariaLabel,
598
599
  className: rootClasses,
@@ -602,73 +603,6 @@ const DotActionToolbar = ({
602
603
  });
603
604
  };
604
605
 
605
- const rootClassName$14 = 'dot-alert-banner';
606
- const StyledAlertBanner = styled(Alert)`
607
- ${({
608
- theme
609
- }) => css`
610
- &.${rootClassName$14} {
611
- align-items: center;
612
- border-radius: 8px;
613
- box-sizing: border-box;
614
- display: flex;
615
- min-height: 48px;
616
- overflow: hidden;
617
- padding: ${theme.spacing(0.75, 2)};
618
-
619
- svg,
620
- .dot-typography {
621
- color: ${theme.palette.figma.overlay.alerts.text.black};
622
- }
623
-
624
- .dot-icon,
625
- .MuiAlert-icon,
626
- .MuiAlert-message {
627
- padding: 0;
628
- .dot-typography {
629
- margin-bottom: 0;
630
- }
631
- }
632
-
633
- &.MuiAlert-standardSuccess {
634
- background: ${theme.palette.figma.overlay.alerts.success.background};
635
-
636
- .dot-icon,
637
- .MuiAlert-icon {
638
- color: ${theme.palette.figma.overlay.alerts.success.icon};
639
- }
640
- }
641
-
642
- &.MuiAlert-standardInfo {
643
- background: ${theme.palette.figma.overlay.alerts.info.background};
644
-
645
- .dot-icon,
646
- .MuiAlert-icon {
647
- color: ${theme.palette.figma.overlay.alerts.info.icon};
648
- }
649
- }
650
-
651
- &.MuiAlert-standardWarning {
652
- background: ${theme.palette.figma.overlay.alerts.warning.background};
653
-
654
- .dot-icon,
655
- .MuiAlert-icon {
656
- color: ${theme.palette.figma.overlay.alerts.warning.icon};
657
- }
658
- }
659
-
660
- &.MuiAlert-standardError {
661
- background: ${theme.palette.figma.overlay.alerts.error.background};
662
-
663
- .dot-icon,
664
- .MuiAlert-icon {
665
- color: ${theme.palette.figma.overlay.alerts.error.icon};
666
- }
667
- }
668
- }
669
- `}
670
- `;
671
-
672
606
  //Primary blue
673
607
  //https://zeroheight.com/4a9ac476a/p/22005a-color/t/6288e9
674
608
  const b50 = '#e8edf3';
@@ -1727,30 +1661,49 @@ const renderNodeOrTypography = (content, typographyVariant = 'body1') => {
1727
1661
  const checkIfArrowUpPressed = event => event.key === 'ArrowUp';
1728
1662
  const checkIfArrowDownPressed = event => event.key === 'ArrowDown';
1729
1663
 
1664
+ const rootClassName$15 = 'dot-alert-banner';
1665
+ const StyledAlertBanner = styled(Alert)`
1666
+ ${({
1667
+ theme
1668
+ }) => css`
1669
+ &.${rootClassName$15} {
1670
+ box-sizing: border-box;
1671
+ min-height: 48px;
1672
+ overflow: hidden;
1673
+
1674
+ &.MuiAlert-standardSuccess {
1675
+ background: ${theme.palette.figma.overlay.alerts.success.background};
1676
+ }
1677
+
1678
+ &.MuiAlert-standardInfo {
1679
+ background: ${theme.palette.figma.overlay.alerts.info.background};
1680
+ }
1681
+
1682
+ &.MuiAlert-standardWarning {
1683
+ background: ${theme.palette.figma.overlay.alerts.warning.background};
1684
+ }
1685
+
1686
+ &.MuiAlert-standardError {
1687
+ background: ${theme.palette.figma.overlay.alerts.error.background};
1688
+ }
1689
+ }
1690
+ `}
1691
+ `;
1692
+
1730
1693
  const DotAlertBanner = ({
1731
1694
  action,
1732
1695
  ariaLabel,
1733
1696
  children,
1734
1697
  className,
1735
- 'data-pendoid': dataPendoId = rootClassName$14,
1698
+ 'data-pendoid': dataPendoId = rootClassName$15,
1736
1699
  'data-testid': dataTestId,
1737
1700
  onClose,
1738
1701
  roundedCorners = true,
1739
1702
  severity,
1740
- textVariant = 'body1'
1703
+ textVariant = 'body1',
1704
+ width
1741
1705
  }) => {
1742
- const AlertBannerIcon = iconId => {
1743
- return jsx(DotIcon, {
1744
- iconId: iconId
1745
- });
1746
- };
1747
- const AlertBannerIconMapping = {
1748
- error: AlertBannerIcon('error-solid'),
1749
- info: AlertBannerIcon('info-solid'),
1750
- success: AlertBannerIcon('check-solid'),
1751
- warning: AlertBannerIcon('warning-solid')
1752
- };
1753
- const rootClasses = useStylesWithRootClass(rootClassName$14, severity, className);
1706
+ const rootClasses = useStylesWithRootClass(rootClassName$15, severity, className);
1754
1707
  /* For simple string use default component, for everything else use 'div' */
1755
1708
  const typographyComponent = isString$1(children) ? undefined : 'div';
1756
1709
  return jsx(StyledAlertBanner, {
@@ -1761,11 +1714,11 @@ const DotAlertBanner = ({
1761
1714
  },
1762
1715
  "data-pendoid": dataPendoId,
1763
1716
  "data-testid": dataTestId,
1764
- iconMapping: AlertBannerIconMapping,
1765
1717
  onClose: onClose,
1766
1718
  severity: severity,
1767
1719
  style: {
1768
- borderRadius: roundedCorners ? '8px' : undefined
1720
+ borderRadius: roundedCorners ? '8px' : undefined,
1721
+ width
1769
1722
  },
1770
1723
  children: jsx(DotTypography, {
1771
1724
  variant: textVariant,
@@ -2399,7 +2352,7 @@ const useDotCoreApiContext = () => {
2399
2352
  return useContext(DotCoreApiContext);
2400
2353
  };
2401
2354
 
2402
- const rootClassName$13 = 'dot-avatar';
2355
+ const rootClassName$14 = 'dot-avatar';
2403
2356
  const avatarSpacing = {
2404
2357
  small: 3,
2405
2358
  medium: 5,
@@ -2409,7 +2362,7 @@ const StyledAvatar = styled(Avatar)`
2409
2362
  ${({
2410
2363
  theme
2411
2364
  }) => css`
2412
- &.${rootClassName$13} {
2365
+ &.${rootClassName$14} {
2413
2366
  display: inline-flex;
2414
2367
  background-color: ${({
2415
2368
  color
@@ -2521,7 +2474,7 @@ const DotAvatar = ({
2521
2474
  variant = 'circular',
2522
2475
  style
2523
2476
  }) => {
2524
- const rootClasses = useStylesWithRootClass(rootClassName$13, className);
2477
+ const rootClasses = useStylesWithRootClass(rootClassName$14, className);
2525
2478
  const getAvatarColor = () => {
2526
2479
  if ((style === null || style === void 0 ? void 0 : style.color) !== undefined) return 'inherit';
2527
2480
  if (color) return color;
@@ -2560,12 +2513,12 @@ const DotAvatar = ({
2560
2513
  });
2561
2514
  };
2562
2515
 
2563
- const rootClassName$12 = 'dot-button';
2516
+ const rootClassName$13 = 'dot-button';
2564
2517
  const StyledButton = styled(Button)`
2565
2518
  ${({
2566
2519
  theme
2567
2520
  }) => css`
2568
- &.${rootClassName$12} {
2521
+ &.${rootClassName$13} {
2569
2522
  background-color: ${theme.palette.figma.primary.normal};
2570
2523
  margin: ${theme.spacing(0.5)};
2571
2524
  padding: ${theme.spacing(0.75, 2)};
@@ -2649,7 +2602,7 @@ const DotButton = forwardRef(({
2649
2602
  autoFocus = false,
2650
2603
  children,
2651
2604
  className,
2652
- 'data-pendoid': dataPendoId = rootClassName$12,
2605
+ 'data-pendoid': dataPendoId = rootClassName$13,
2653
2606
  'data-testid': dataTestId,
2654
2607
  disabled = false,
2655
2608
  disableRipple = false,
@@ -2665,7 +2618,7 @@ const DotButton = forwardRef(({
2665
2618
  tooltipPlacement,
2666
2619
  type = 'primary'
2667
2620
  }, ref) => {
2668
- const rootClasses = useStylesWithRootClass(rootClassName$12, className);
2621
+ const rootClasses = useStylesWithRootClass(rootClassName$13, className);
2669
2622
  let color;
2670
2623
  let variant;
2671
2624
  switch (type) {
@@ -2689,6 +2642,7 @@ const DotButton = forwardRef(({
2689
2642
  return jsx(DotTooltip, {
2690
2643
  placement: tooltipPlacement,
2691
2644
  title: tooltip,
2645
+ "data-testid": `${dataTestId || rootClassName$13}-tooltip`,
2692
2646
  children: jsx(StyledButton, {
2693
2647
  "aria-label": ariaLabel,
2694
2648
  autoFocus: autoFocus,
@@ -2697,7 +2651,7 @@ const DotButton = forwardRef(({
2697
2651
  },
2698
2652
  color: color,
2699
2653
  "data-pendoid": dataPendoId,
2700
- "data-testid": dataTestId,
2654
+ "data-testid": dataTestId || rootClassName$13,
2701
2655
  disableRipple: disableRipple,
2702
2656
  disabled: disabled,
2703
2657
  endIcon: endIcon,
@@ -2716,10 +2670,10 @@ const DotButton = forwardRef(({
2716
2670
  });
2717
2671
  });
2718
2672
 
2719
- const rootClassName$11 = 'dot-link';
2673
+ const rootClassName$12 = 'dot-link';
2720
2674
  const StyledLink = styled(Link)`
2721
2675
  ${() => css`
2722
- &.${rootClassName$11} {
2676
+ &.${rootClassName$12} {
2723
2677
  cursor: pointer;
2724
2678
 
2725
2679
  &:hover.MuiLink-underlineHover {
@@ -2735,7 +2689,7 @@ const DotLink = ({
2735
2689
  children,
2736
2690
  className,
2737
2691
  color = 'primary',
2738
- 'data-pendoid': dataPendoId = rootClassName$11,
2692
+ 'data-pendoid': dataPendoId = rootClassName$12,
2739
2693
  'data-testid': dataTestId,
2740
2694
  href,
2741
2695
  onClick,
@@ -2747,7 +2701,7 @@ const DotLink = ({
2747
2701
  tooltip,
2748
2702
  underline = 'always'
2749
2703
  }) => {
2750
- const rootClasses = useStylesWithRootClass(rootClassName$11, className);
2704
+ const rootClasses = useStylesWithRootClass(rootClassName$12, className);
2751
2705
  useEffect(() => {
2752
2706
  // Include a console warning if the link is not a string and no ariaLabel is provided
2753
2707
  if (!isString$1(children) && !ariaLabel) {
@@ -2797,7 +2751,7 @@ const CreateUUID = () => {
2797
2751
  });
2798
2752
  };
2799
2753
 
2800
- const rootClassName$10 = 'dot-list';
2754
+ const rootClassName$11 = 'dot-list';
2801
2755
  const listItemRootClass = 'dot-list-item';
2802
2756
  const nestedListClassName = 'dot-nested-list';
2803
2757
  const nestedDrawerClassName = 'dot-nested-drawer';
@@ -2805,7 +2759,7 @@ const StyledList = styled(List)`
2805
2759
  ${({
2806
2760
  theme
2807
2761
  }) => css`
2808
- &.${rootClassName$10} {
2762
+ &.${rootClassName$11} {
2809
2763
  background: ${theme.palette.figma.background.level0.componentsBackground};
2810
2764
 
2811
2765
  .dot-icon {
@@ -2888,12 +2842,12 @@ const DotListDivider = ({
2888
2842
  });
2889
2843
  };
2890
2844
 
2891
- const rootClassName$$ = 'dot-progress';
2845
+ const rootClassName$10 = 'dot-progress';
2892
2846
  const StyledCircularProgress = styled(CircularProgress)`
2893
2847
  ${({
2894
2848
  theme
2895
2849
  }) => css`
2896
- &.${rootClassName$$} {
2850
+ &.${rootClassName$10} {
2897
2851
  &.MuiCircularProgress-colorPrimary {
2898
2852
  color: ${theme.palette.figma.inProgress.normal};
2899
2853
  }
@@ -2915,7 +2869,7 @@ const DotProgress = ({
2915
2869
  value,
2916
2870
  variant = 'indeterminate'
2917
2871
  }) => {
2918
- const rootClasses = useStylesWithRootClass(rootClassName$$, className);
2872
+ const rootClasses = useStylesWithRootClass(rootClassName$10, className);
2919
2873
  useEffect(() => {
2920
2874
  if (!ariaLabel) {
2921
2875
  console.warn('a11y: DotProgress must have an ariaLabel to describe the progress component');
@@ -2956,35 +2910,35 @@ var variables = /*#__PURE__*/Object.freeze({
2956
2910
  levelTop: levelTop
2957
2911
  });
2958
2912
 
2959
- const rootClassName$_ = 'dot-popper';
2913
+ const rootClassName$$ = 'dot-popper';
2960
2914
  const StyledPopper$1 = styled(Popper)`
2961
2915
  ${({
2962
2916
  theme
2963
2917
  }) => css`
2964
- &.${rootClassName$_} {
2918
+ &.${rootClassName$$} {
2965
2919
  font-family: ${theme.typography.fontFamily};
2966
2920
  font-size: ${theme.typography.body1.fontSize}px;
2967
2921
  }
2968
2922
 
2969
- &.${rootClassName$_}, &.${rootClassName$_} > .dot-popper-paper {
2923
+ &.${rootClassName$$}, &.${rootClassName$$} > .dot-popper-paper {
2970
2924
  background-color: ${theme.palette.figma.background.level1.white};
2971
2925
  }
2972
2926
  `}
2973
2927
  `;
2974
2928
 
2975
2929
  const flyoutMenuClassName = 'dot-flyout-menu';
2976
- const rootClassName$Z = 'dot-menu';
2930
+ const rootClassName$_ = 'dot-menu';
2977
2931
  const getListMaxHeight = maxHeight => isString$1(maxHeight) ? maxHeight : `${maxHeight}px`;
2978
2932
  const StyledPopper = styled(Popper)`
2979
2933
  ${({
2980
2934
  theme
2981
2935
  }) => css`
2982
- &.${rootClassName$_} {
2936
+ &.${rootClassName$$} {
2983
2937
  font-family: ${theme.typography.fontFamily};
2984
2938
  font-size: ${theme.typography.body1.fontSize}px;
2985
2939
  z-index: ${levelSecond};
2986
2940
  }
2987
- &.${rootClassName$Z}, &.${rootClassName$_} {
2941
+ &.${rootClassName$_}, &.${rootClassName$$} {
2988
2942
  &.loading .MuiPaper-root {
2989
2943
  align-items: center;
2990
2944
  display: flex;
@@ -3059,14 +3013,14 @@ const MENU_ITEM_HEIGHT_NORMAL = 48;
3059
3013
  const MENU_ITEM_HEIGHT_DENSE = 36;
3060
3014
  const DEFAULT_MAX_VISIBLE_ITEMS = 7;
3061
3015
 
3062
- const rootClassName$Y = 'dot-ul';
3016
+ const rootClassName$Z = 'dot-ul';
3063
3017
  const listItemClassName$1 = 'dot-li';
3064
3018
  const listItemWithSubmenuClassName = 'dot-li-with-submenu';
3065
3019
  const StyledMenuList = styled(MenuList)`
3066
3020
  ${({
3067
3021
  theme
3068
3022
  }) => css`
3069
- &.${rootClassName$Y} {
3023
+ &.${rootClassName$Z} {
3070
3024
  background: ${theme.palette.figma.background.level1.white};
3071
3025
 
3072
3026
  .dot-li {
@@ -3162,7 +3116,7 @@ const DotMenuList = forwardRef(({
3162
3116
  onSubMenuCreate,
3163
3117
  selectedKey
3164
3118
  }, ref) => {
3165
- const rootClasses = useStylesWithRootClass(rootClassName$Y, className);
3119
+ const rootClasses = useStylesWithRootClass(rootClassName$Z, className);
3166
3120
  const [activeSubmenu, setActiveSubmenu] = useState(null);
3167
3121
  const [subItemAnchorEl, setSubItemAnchorEl] = useState(null);
3168
3122
  const openSubmenu = (target, itemKey) => {
@@ -3273,7 +3227,7 @@ const DotMenu = ({
3273
3227
  open = false,
3274
3228
  selectedKey
3275
3229
  }) => {
3276
- const rootClasses = useStylesWithRootClass(rootClassName$Z, className, loading ? 'loading' : '');
3230
+ const rootClasses = useStylesWithRootClass(rootClassName$_, className, loading ? 'loading' : '');
3277
3231
  const isSubmenu = checkIfSubmenu(anchorEl);
3278
3232
  const hasSubItems = checkForSubItems(menuItems);
3279
3233
  // Timeout object is customizable when Menu component is either submenu
@@ -3361,12 +3315,12 @@ const DotMenu = ({
3361
3315
  });
3362
3316
  };
3363
3317
 
3364
- const rootClassName$X = 'dot-drawer';
3318
+ const rootClassName$Y = 'dot-drawer';
3365
3319
  const StyledDrawer = styled(Drawer)`
3366
3320
  ${({
3367
3321
  theme
3368
3322
  }) => css`
3369
- &.${rootClassName$X} .MuiBackdrop-root {
3323
+ &.${rootClassName$Y} .MuiBackdrop-root {
3370
3324
  background-color: ${theme.palette.figma.overlay.default};
3371
3325
  }
3372
3326
 
@@ -3385,12 +3339,12 @@ const StyledDrawer = styled(Drawer)`
3385
3339
  `}
3386
3340
  `;
3387
3341
 
3388
- const rootClassName$W = 'dot-drawer-header';
3342
+ const rootClassName$X = 'dot-drawer-header';
3389
3343
  const StyleDrawerHeader = styled.div`
3390
3344
  ${({
3391
3345
  theme
3392
3346
  }) => css`
3393
- &.${rootClassName$W} {
3347
+ &.${rootClassName$X} {
3394
3348
  padding: ${theme.spacing(0, 0, 2)};
3395
3349
  display: flex;
3396
3350
  align-items: center;
@@ -3401,13 +3355,13 @@ const StyleDrawerHeader = styled.div`
3401
3355
  `}
3402
3356
  `;
3403
3357
 
3404
- const rootClassName$V = 'dot-icon-btn';
3358
+ const rootClassName$W = 'dot-icon-btn';
3405
3359
  const StyledIconButton = styled(IconButton)`
3406
3360
  ${({
3407
3361
  theme,
3408
3362
  color
3409
3363
  }) => css`
3410
- &.${rootClassName$V} {
3364
+ &.${rootClassName$W} {
3411
3365
  ${color === 'inherit' ? css`
3412
3366
  color: inherit;
3413
3367
  ` : ''}
@@ -3466,7 +3420,7 @@ const DotIconButton = ({
3466
3420
  ariaRole = 'button',
3467
3421
  className,
3468
3422
  color = 'inherit',
3469
- 'data-pendoid': dataPendoId = rootClassName$V,
3423
+ 'data-pendoid': dataPendoId = rootClassName$W,
3470
3424
  'data-testid': dataTestId,
3471
3425
  disableRipple = false,
3472
3426
  disabled = false,
@@ -3479,7 +3433,7 @@ const DotIconButton = ({
3479
3433
  tooltipPlacement
3480
3434
  }) => {
3481
3435
  const rippleClassName = disableRipple ? 'ripple-disabled' : '';
3482
- const rootClasses = useStylesWithRootClass(rootClassName$V, rippleClassName, `shape-${shape}`, className);
3436
+ const rootClasses = useStylesWithRootClass(rootClassName$W, rippleClassName, `shape-${shape}`, className);
3483
3437
  return jsx(DotTooltip, {
3484
3438
  "data-testid": "icon-button-tooltip",
3485
3439
  placement: tooltipPlacement,
@@ -3514,7 +3468,7 @@ const DotDrawerHeader = ({
3514
3468
  onClose,
3515
3469
  variant
3516
3470
  }) => {
3517
- const rootClasses = useStylesWithRootClass(rootClassName$W, className);
3471
+ const rootClasses = useStylesWithRootClass(rootClassName$X, className);
3518
3472
  return jsxs(StyleDrawerHeader, {
3519
3473
  "aria-label": ariaLabel,
3520
3474
  "aria-level": 2,
@@ -3531,10 +3485,10 @@ const DotDrawerHeader = ({
3531
3485
  });
3532
3486
  };
3533
3487
 
3534
- const rootClassName$U = 'dot-drawer-body';
3488
+ const rootClassName$V = 'dot-drawer-body';
3535
3489
  const StyleDrawerBody = styled.div`
3536
3490
  ${() => css`
3537
- &.${rootClassName$U} {
3491
+ &.${rootClassName$V} {
3538
3492
  display: flex;
3539
3493
  .dot-drawer-close-button {
3540
3494
  align-self: self-start;
@@ -3555,7 +3509,7 @@ const DotDrawerBody = ({
3555
3509
  onClose,
3556
3510
  variant
3557
3511
  }) => {
3558
- const rootClasses = useStylesWithRootClass(rootClassName$U, className);
3512
+ const rootClasses = useStylesWithRootClass(rootClassName$V, className);
3559
3513
  return jsxs(StyleDrawerBody, {
3560
3514
  "aria-label": ariaLabel,
3561
3515
  className: rootClasses,
@@ -3570,12 +3524,12 @@ const DotDrawerBody = ({
3570
3524
  });
3571
3525
  };
3572
3526
 
3573
- const rootClassName$T = 'dot-drawer-footer';
3527
+ const rootClassName$U = 'dot-drawer-footer';
3574
3528
  const StyleDrawerFooter = styled.div`
3575
3529
  ${({
3576
3530
  theme
3577
3531
  }) => css`
3578
- &.${rootClassName$T} {
3532
+ &.${rootClassName$U} {
3579
3533
  padding: ${theme.spacing(2, 0, 0)};
3580
3534
  }
3581
3535
  `}
@@ -3588,7 +3542,7 @@ const DotDrawerFooter = ({
3588
3542
  className,
3589
3543
  'data-testid': dataTestId
3590
3544
  }) => {
3591
- const rootClasses = useStylesWithRootClass(rootClassName$T, className);
3545
+ const rootClasses = useStylesWithRootClass(rootClassName$U, className);
3592
3546
  return jsx(StyleDrawerFooter, {
3593
3547
  "aria-label": ariaLabel,
3594
3548
  className: rootClasses,
@@ -3604,7 +3558,7 @@ const DotDrawer = ({
3604
3558
  ariaRole = 'dialog',
3605
3559
  className,
3606
3560
  children,
3607
- 'data-pendoid': dataPendoId = rootClassName$X,
3561
+ 'data-pendoid': dataPendoId = rootClassName$Y,
3608
3562
  'data-testid': dataTestId,
3609
3563
  drawerBodyProps,
3610
3564
  drawerFooterProps,
@@ -3627,7 +3581,7 @@ const DotDrawer = ({
3627
3581
  onClose(event);
3628
3582
  }
3629
3583
  };
3630
- const rootClasses = useStylesWithRootClass(rootClassName$X, className);
3584
+ const rootClasses = useStylesWithRootClass(rootClassName$Y, className);
3631
3585
  const backdropEnabled = variant === 'temporary' && !(ModalProps === null || ModalProps === void 0 ? void 0 : ModalProps.hideBackdrop);
3632
3586
  const headerExists = !!drawerHeaderProps;
3633
3587
  const bodyPendoId = drawerBodyProps ? drawerBodyProps['data-pendoid'] : 'drawer-body';
@@ -4011,7 +3965,7 @@ const DotList = ({
4011
3965
  nestedListType = 'expandable',
4012
3966
  width = 240
4013
3967
  }) => {
4014
- const rootClasses = useStylesWithRootClass(rootClassName$10, className);
3968
+ const rootClasses = useStylesWithRootClass(rootClassName$11, className);
4015
3969
  const listWidth = typeof width === 'number' ? `${width}px` : width;
4016
3970
  const listRef = useRef();
4017
3971
  const [listItemIndex, setListItemIndex] = useState(null);
@@ -4049,7 +4003,7 @@ const DotList = ({
4049
4003
  updateSelectedListItem(index);
4050
4004
  }
4051
4005
  };
4052
- const determineOnClick = item.href && !item.onClick ? null : handleListItemClick;
4006
+ const determineOnClick = item.onClick || item.items ? handleListItemClick : null;
4053
4007
  const handleMenuLeave = event => {
4054
4008
  // TODO: Need to apply animation to open/close
4055
4009
  var _a, _b;
@@ -4100,12 +4054,12 @@ const DotList = ({
4100
4054
  });
4101
4055
  };
4102
4056
 
4103
- const rootClassName$S = 'dot-copy-button';
4057
+ const rootClassName$T = 'dot-copy-button';
4104
4058
  const StyledCopyButton = styled.span`
4105
4059
  ${({
4106
4060
  theme
4107
4061
  }) => css`
4108
- &.${rootClassName$S} .copied-to-clipboard {
4062
+ &.${rootClassName$T} .copied-to-clipboard {
4109
4063
  color: ${theme.palette.figma.success.normal};
4110
4064
 
4111
4065
  &.MuiIcon-fontSizeSmall.button-size-small {
@@ -4131,7 +4085,7 @@ const DotCopyButton = ({
4131
4085
  color = 'inherit',
4132
4086
  copiedTooltip = 'Copied!',
4133
4087
  copyTooltip = 'Copy to clipboard',
4134
- 'data-pendoid': dataPendoId = rootClassName$S,
4088
+ 'data-pendoid': dataPendoId = rootClassName$T,
4135
4089
  'data-testid': dataTestId = 'dot-copy-button',
4136
4090
  disabled = false,
4137
4091
  disableRipple = false,
@@ -4179,7 +4133,7 @@ const DotCopyButton = ({
4179
4133
  return false;
4180
4134
  }, [value, showCopiedIcon, disabled, onClick]);
4181
4135
  return jsxs(StyledCopyButton, {
4182
- className: rootClassName$S,
4136
+ className: rootClassName$T,
4183
4137
  "data-testid": dataTestId,
4184
4138
  children: [!timedShowCopiedIcon && jsx(DotIconButton, {
4185
4139
  ariaLabel: ariaLabel,
@@ -4268,7 +4222,7 @@ const DotInputText = ({
4268
4222
  autoFocus,
4269
4223
  className,
4270
4224
  defaultValue,
4271
- 'data-pendoid': dataPendoId = rootClassName$16,
4225
+ 'data-pendoid': dataPendoId = rootClassName$17,
4272
4226
  'data-testid': dataTestId,
4273
4227
  disabled = false,
4274
4228
  error = false,
@@ -4314,7 +4268,7 @@ const DotInputText = ({
4314
4268
  const internalInputRef = useRef(null);
4315
4269
  const textFieldInputRef = inputRef || internalInputRef;
4316
4270
  const [inputTextState, setInputTextState] = useState(getInitialState(value));
4317
- const rootStyles = useStylesWithRootClass(rootClassName$16, hasError, hasWarning, hasSuccess, readOnly && readOnlyClassName$1);
4271
+ const rootStyles = useStylesWithRootClass(rootClassName$17, hasError, hasWarning, hasSuccess, readOnly && readOnlyClassName$1);
4318
4272
  useEffect(() => {
4319
4273
  if (value !== inputTextState.inputValue) {
4320
4274
  setInputTextState(getInitialState(value, defaultValue));
@@ -4450,10 +4404,10 @@ const DotInputText = ({
4450
4404
  });
4451
4405
  };
4452
4406
 
4453
- const rootClassName$R = 'dot-search-input';
4407
+ const rootClassName$S = 'dot-search-input';
4454
4408
  const StyledSearchInput = styled.span`
4455
4409
  ${() => css`
4456
- &.${rootClassName$R} {
4410
+ &.${rootClassName$S} {
4457
4411
  }
4458
4412
  `}
4459
4413
  `;
@@ -4470,7 +4424,7 @@ function SearchInput({
4470
4424
  tooltip = null,
4471
4425
  value
4472
4426
  }) {
4473
- const rootClasses = useStylesWithRootClass(rootClassName$R, className);
4427
+ const rootClasses = useStylesWithRootClass(rootClassName$S, className);
4474
4428
  const [searchText, setSearchText] = useState(value);
4475
4429
  let previousSearchText = '';
4476
4430
  const handleChange = useCallback(event => {
@@ -4726,12 +4680,12 @@ const recentAppInstancesSetter = (latestInstance, maxRecentItems
4726
4680
  };
4727
4681
  };
4728
4682
 
4729
- const rootClassName$Q = 'dot-app-switcher';
4683
+ const rootClassName$R = 'dot-app-switcher';
4730
4684
  const StyledAppSwitcher = styled(DotDrawer)`
4731
4685
  ${({
4732
4686
  theme
4733
4687
  }) => css`
4734
- &.${rootClassName$Q} {
4688
+ &.${rootClassName$R} {
4735
4689
  .dot-drawer-paper {
4736
4690
  padding: 0;
4737
4691
  width: 382px;
@@ -4841,7 +4795,7 @@ const DotAppSwitcherView = ({
4841
4795
  if (dotCoreApiContext !== null) {
4842
4796
  setSelectedAppType = dotCoreApiContext.setSelectedAppSwitcherAppType;
4843
4797
  }
4844
- const rootClasses = useStylesWithRootClass(rootClassName$Q, className);
4798
+ const rootClasses = useStylesWithRootClass(rootClassName$R, className);
4845
4799
  const [appTypeMap, setAppTypeMap] = useState();
4846
4800
  const [appTypeLabels, setAppTypeLabels] = useState();
4847
4801
  const [appTypeMenuItems, setAppTypeMenuItems] = useState();
@@ -5219,12 +5173,12 @@ var SvgLogoDigitalAiWhite = function SvgLogoDigitalAiWhite(_ref, ref) {
5219
5173
  };
5220
5174
  var ForwardRef = /*#__PURE__*/forwardRef(SvgLogoDigitalAiWhite);
5221
5175
 
5222
- const rootClassName$P = 'dot-sidebar';
5176
+ const rootClassName$Q = 'dot-sidebar';
5223
5177
  const StyledSidebar = styled.aside`
5224
5178
  ${({
5225
5179
  theme
5226
5180
  }) => css`
5227
- &.${rootClassName$P} {
5181
+ &.${rootClassName$Q} {
5228
5182
  align-items: stretch;
5229
5183
  background: ${theme.palette.figma.background.level1.white};
5230
5184
  border-width: 0 1px;
@@ -5500,10 +5454,10 @@ const StyledSidebar = styled.aside`
5500
5454
  `}
5501
5455
  `;
5502
5456
 
5503
- const rootClassName$O = 'dot-truncate-with-tooltip';
5457
+ const rootClassName$P = 'dot-truncate-with-tooltip';
5504
5458
  const StyledTruncateWithTooltip = styled(Tooltip)`
5505
5459
  ${() => css`
5506
- &.${rootClassName$O} {
5460
+ &.${rootClassName$P} {
5507
5461
  display: block;
5508
5462
  overflow: hidden;
5509
5463
  white-space: nowrap;
@@ -5534,7 +5488,7 @@ const DotTruncateWithTooltip = ({
5534
5488
  label,
5535
5489
  width
5536
5490
  }) => {
5537
- const rootClasses = useStylesWithRootClass(rootClassName$O, className, charactersLimit ? 'dot-characters-limit' : '');
5491
+ const rootClasses = useStylesWithRootClass(rootClassName$P, className, charactersLimit ? 'dot-characters-limit' : '');
5538
5492
  return jsx(StyledTruncateWithTooltip, {
5539
5493
  "aria-label": ariaLabel,
5540
5494
  arrow: arrow,
@@ -5644,7 +5598,7 @@ const DotSidebar = ({
5644
5598
  setIsOpen(!isOpen);
5645
5599
  };
5646
5600
  const sidebarClasses = useStylesWithRootClass('side-nav', openClass);
5647
- const rootClasses = useStylesWithRootClass(rootClassName$P, openClass, className);
5601
+ const rootClasses = useStylesWithRootClass(rootClassName$Q, openClass, className);
5648
5602
  return jsxs(StyledSidebar, {
5649
5603
  "aria-label": ariaLabel,
5650
5604
  className: rootClasses,
@@ -5711,12 +5665,12 @@ const DotSidebar = ({
5711
5665
  });
5712
5666
  };
5713
5667
 
5714
- const rootClassName$N = 'dot-badge';
5668
+ const rootClassName$O = 'dot-badge';
5715
5669
  const StyledBadge = styled(Badge)`
5716
5670
  ${({
5717
5671
  theme
5718
5672
  }) => css`
5719
- &.${rootClassName$N} {
5673
+ &.${rootClassName$O} {
5720
5674
  color: ${theme.palette.figma.typography.black};
5721
5675
  word-break: normal;
5722
5676
 
@@ -5751,7 +5705,7 @@ const DotBadge = ({
5751
5705
  overlap,
5752
5706
  variant = 'dot'
5753
5707
  }) => {
5754
- const rootClasses = useStylesWithRootClass(rootClassName$N, className);
5708
+ const rootClasses = useStylesWithRootClass(rootClassName$O, className);
5755
5709
  return jsx(StyledBadge, {
5756
5710
  "$badgeColor": badgeColor,
5757
5711
  anchorOrigin: {
@@ -5773,7 +5727,7 @@ const DotBadge = ({
5773
5727
  });
5774
5728
  };
5775
5729
 
5776
- const rootClassName$M = 'dot-app-toolbar';
5730
+ const rootClassName$N = 'dot-app-toolbar';
5777
5731
  const denseClassName = 'dense';
5778
5732
  const StyledMainMenu = styled(DotDrawer)`
5779
5733
  ${({
@@ -5813,7 +5767,7 @@ const StyledAppToolbar = styled.header`
5813
5767
  ${({
5814
5768
  theme
5815
5769
  }) => css`
5816
- &.${rootClassName$M} {
5770
+ &.${rootClassName$N} {
5817
5771
  align-items: center;
5818
5772
  background: ${theme.palette.figma.appToolbar.background};
5819
5773
  border-bottom: 4px solid ${theme.palette.figma.border.default};
@@ -5935,7 +5889,7 @@ const DotAppToolbar = ({
5935
5889
  const displayAppLogo = appLogo || appLogoSmall;
5936
5890
  const mainMenuRef = useRef(null);
5937
5891
  const denseClass = dense ? denseClassName : '';
5938
- const rootClasses = useStylesWithRootClass(rootClassName$M, className, denseClass, showMainMenu ? '' : 'without-menu-icon');
5892
+ const rootClasses = useStylesWithRootClass(rootClassName$N, className, denseClass, showMainMenu ? '' : 'without-menu-icon');
5939
5893
  const mainMenuClasses = useStylesWithRootClass('dot-main-menu', denseClass, menuOpen ? 'open' : '');
5940
5894
  const targetBreakpoint = useMediaQuery(theme => theme.breakpoints.up('lg'));
5941
5895
  useEffect(() => {
@@ -6065,14 +6019,14 @@ const DotAppToolbar = ({
6065
6019
  }) : appToolbar;
6066
6020
  };
6067
6021
 
6068
- const rootClassName$L = 'dot-autocomplete';
6022
+ const rootClassName$M = 'dot-autocomplete';
6069
6023
  const inputRootClassName = 'dot-input-root';
6070
6024
  const inputMediumClassName = 'dot-input-medium';
6071
6025
  const StyledAutocomplete = styled(Autocomplete)`
6072
6026
  ${({
6073
6027
  theme
6074
6028
  }) => css`
6075
- &.${rootClassName$L} {
6029
+ &.${rootClassName$M} {
6076
6030
  &.${inputMediumClassName} .dot-text-field .${inputRootClassName} {
6077
6031
  height: 56px;
6078
6032
  padding-left: ${theme.spacing(2)};
@@ -6109,12 +6063,12 @@ const StyledAutocomplete = styled(Autocomplete)`
6109
6063
  `}
6110
6064
  `;
6111
6065
 
6112
- const rootClassName$K = 'dot-chip';
6066
+ const rootClassName$L = 'dot-chip';
6113
6067
  const StyledChip = styled(Chip)`
6114
6068
  ${({
6115
6069
  theme
6116
6070
  }) => css`
6117
- &.${rootClassName$K} {
6071
+ &.${rootClassName$L} {
6118
6072
  background: ${theme.palette.figma.neutral.normal};
6119
6073
  border-color: ${theme.palette.figma.border.darker};
6120
6074
  color: ${theme.palette.figma.typography.black};
@@ -6220,7 +6174,7 @@ const DotChip = ({
6220
6174
  charactersLimit = DEFAULT_CHARACTERS_LIMIT,
6221
6175
  children,
6222
6176
  className,
6223
- 'data-pendoid': dataPendoId = rootClassName$K,
6177
+ 'data-pendoid': dataPendoId = rootClassName$L,
6224
6178
  'data-testid': dataTestId,
6225
6179
  disabled = false,
6226
6180
  error = false,
@@ -6232,7 +6186,7 @@ const DotChip = ({
6232
6186
  startIcon
6233
6187
  }) => {
6234
6188
  const errorClass = error ? 'Mui-error' : '';
6235
- const rootClasses = useStylesWithRootClass(rootClassName$K, className, errorClass);
6189
+ const rootClasses = useStylesWithRootClass(rootClassName$L, className, errorClass);
6236
6190
  const getChipLabel = () => {
6237
6191
  if (charactersLimit <= 0 || children.length < charactersLimit) return children;
6238
6192
  const label = `${children.substring(0, charactersLimit)}...`;
@@ -6330,7 +6284,7 @@ const DotAutoComplete = ({
6330
6284
  ariaLabel,
6331
6285
  autoFocus,
6332
6286
  className,
6333
- 'data-pendoid': dataPendoId = rootClassName$L,
6287
+ 'data-pendoid': dataPendoId = rootClassName$M,
6334
6288
  'data-testid': dataTestId,
6335
6289
  defaultValue,
6336
6290
  dense = true,
@@ -6381,8 +6335,8 @@ const DotAutoComplete = ({
6381
6335
  const popperOpen = !readOnly && (open || isOpened);
6382
6336
  const preventDuplicateInsertion = actionItem === null || actionItem === void 0 ? void 0 : actionItem.preventDuplicateInsertion;
6383
6337
  const textFieldWarningClassName = !error && warning && warningClassName;
6384
- const rootClasses = useStylesWithRootClass(rootClassName$L, size === 'medium' && inputMediumClassName, className);
6385
- const textFieldRootClasses = useStylesWithRootClass(rootClassName$16, readOnly && readOnlyClassName$1, textFieldWarningClassName);
6338
+ const rootClasses = useStylesWithRootClass(rootClassName$M, size === 'medium' && inputMediumClassName, className);
6339
+ const textFieldRootClasses = useStylesWithRootClass(rootClassName$17, readOnly && readOnlyClassName$1, textFieldWarningClassName);
6386
6340
  const inputRootClasses = useStylesWithRootClass(inputRootClassName, !dense && inputMediumClassName);
6387
6341
  let highlightedOption = null;
6388
6342
  let textFieldInput;
@@ -6427,7 +6381,7 @@ const DotAutoComplete = ({
6427
6381
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6428
6382
  const DotPopper = props => {
6429
6383
  if (!isActionItemDefined) return jsx(StyledPopper, Object.assign({}, props, {
6430
- className: rootClassName$_,
6384
+ className: rootClassName$$,
6431
6385
  disablePortal: disablePortal,
6432
6386
  "$maxHeight": maxHeight
6433
6387
  }));
@@ -6449,7 +6403,7 @@ const DotAutoComplete = ({
6449
6403
  const paperProps = props.children.props;
6450
6404
  const paperChildren = paperProps.children;
6451
6405
  return jsx(StyledPopper, Object.assign({}, props, {
6452
- className: rootClassName$_,
6406
+ className: rootClassName$$,
6453
6407
  disablePortal: disablePortal,
6454
6408
  "$maxHeight": maxHeight,
6455
6409
  children: jsxs(Paper, Object.assign({}, paperProps, {
@@ -6658,10 +6612,10 @@ const DotAutoComplete = ({
6658
6612
  });
6659
6613
  };
6660
6614
 
6661
- const rootClassName$J = 'dot-avatar-group';
6615
+ const rootClassName$K = 'dot-avatar-group';
6662
6616
  const StyledAvatarGroup = styled(AvatarGroup)`
6663
6617
  ${() => css`
6664
- &.${rootClassName$J} {
6618
+ &.${rootClassName$K} {
6665
6619
  justify-content: flex-end;
6666
6620
 
6667
6621
  .MuiAvatar-root {
@@ -6680,7 +6634,7 @@ const DotAvatarGroup = ({
6680
6634
  max = 3,
6681
6635
  spacing = 'medium'
6682
6636
  }) => {
6683
- const rootClasses = useStylesWithRootClass(rootClassName$J, className);
6637
+ const rootClasses = useStylesWithRootClass(rootClassName$K, className);
6684
6638
  return jsx(StyledAvatarGroup, {
6685
6639
  "aria-label": ariaLabel,
6686
6640
  classes: {
@@ -6695,13 +6649,13 @@ const DotAvatarGroup = ({
6695
6649
  });
6696
6650
  };
6697
6651
 
6698
- const rootClassName$I = 'dot-breadcrumbs';
6652
+ const rootClassName$J = 'dot-breadcrumbs';
6699
6653
  const breadcrumbsWrapperClass = 'dot-breadcrumbs-wrapper';
6700
6654
  const StyledBreadcrumbsWrapper = styled.div`
6701
6655
  ${({
6702
6656
  theme
6703
6657
  }) => css`
6704
- &.${rootClassName$I} {
6658
+ &.${rootClassName$J} {
6705
6659
  overflow: hidden;
6706
6660
 
6707
6661
  .dot-breadcrumbs-menu {
@@ -6721,7 +6675,7 @@ const StyledBreadcrumbs = styled(Breadcrumbs)`
6721
6675
  ${({
6722
6676
  theme
6723
6677
  }) => css`
6724
- &.${rootClassName$I} {
6678
+ &.${rootClassName$J} {
6725
6679
  margin-bottom: 0;
6726
6680
 
6727
6681
  .MuiBreadcrumbs-ol {
@@ -7049,7 +7003,7 @@ const DotBreadcrumbs = ({
7049
7003
  children: [jsx(StyledBreadcrumbs, {
7050
7004
  "aria-label": "breadcrumb",
7051
7005
  classes: {
7052
- root: rootClassName$I,
7006
+ root: rootClassName$J,
7053
7007
  ol: 'dot-ol',
7054
7008
  li: 'dot-li'
7055
7009
  },
@@ -7080,14 +7034,14 @@ const DotBreadcrumbs = ({
7080
7034
  });
7081
7035
  };
7082
7036
 
7083
- const rootClassName$H = 'dot-button-toggle';
7037
+ const rootClassName$I = 'dot-button-toggle';
7084
7038
  // TODO: need to update ripple color
7085
7039
  // https://github.com/mui/material-ui/issues/28543
7086
7040
  const StyledToggleButtonGroup = styled(ToggleButtonGroup)`
7087
7041
  ${({
7088
7042
  theme
7089
7043
  }) => css`
7090
- &.${rootClassName$H} {
7044
+ &.${rootClassName$I} {
7091
7045
  button:not(.MuiToggleButton-sizeLarge):not(.MuiToggleButton-sizeSmall) {
7092
7046
  /* Override height for medium size */
7093
7047
  height: ${theme.spacing(5)};
@@ -7203,7 +7157,7 @@ const DotButtonToggle = ({
7203
7157
  buttonOptions,
7204
7158
  className,
7205
7159
  color,
7206
- 'data-pendoid': dataPendoId = rootClassName$H,
7160
+ 'data-pendoid': dataPendoId = rootClassName$I,
7207
7161
  'data-testid': dataTestId = 'dot-toggle',
7208
7162
  disableFocusRipple = false,
7209
7163
  disableRipple = false,
@@ -7213,7 +7167,7 @@ const DotButtonToggle = ({
7213
7167
  size = 'medium',
7214
7168
  value
7215
7169
  }) => {
7216
- const rootClasses = useStylesWithRootClass(rootClassName$H, className);
7170
+ const rootClasses = useStylesWithRootClass(rootClassName$I, className);
7217
7171
  const renderToggleButton = ({
7218
7172
  ariaLabel: optionAriaLabel,
7219
7173
  badgeContent: optionBadgeContent,
@@ -7296,12 +7250,12 @@ const TooltipToggleButton = forwardRef((_a, ref) => {
7296
7250
  }));
7297
7251
  });
7298
7252
 
7299
- const rootClassName$G = 'dot-card';
7253
+ const rootClassName$H = 'dot-card';
7300
7254
  const StyledCard = styled(Card)`
7301
7255
  ${({
7302
7256
  theme
7303
7257
  }) => css`
7304
- &.${rootClassName$G} {
7258
+ &.${rootClassName$H} {
7305
7259
  background-color: ${theme.palette.figma.background.level1.white};
7306
7260
  }
7307
7261
  `}
@@ -7313,7 +7267,7 @@ const DotCard = ({
7313
7267
  className,
7314
7268
  'data-testid': dataTestId
7315
7269
  }) => {
7316
- const rootClasses = useStylesWithRootClass(rootClassName$G, className);
7270
+ const rootClasses = useStylesWithRootClass(rootClassName$H, className);
7317
7271
  return jsx(StyledCard, {
7318
7272
  "aria-label": ariaLabel,
7319
7273
  classes: {
@@ -7342,12 +7296,12 @@ const DotCardContent = ({
7342
7296
  });
7343
7297
  };
7344
7298
 
7345
- const rootClassName$F = 'dot-card-footer';
7299
+ const rootClassName$G = 'dot-card-footer';
7346
7300
  const StyledDiv = styled.div`
7347
7301
  ${({
7348
7302
  theme
7349
7303
  }) => css`
7350
- &.${rootClassName$F} {
7304
+ &.${rootClassName$G} {
7351
7305
  padding: ${theme.spacing(2)};
7352
7306
  }
7353
7307
  `}
@@ -7359,7 +7313,7 @@ const DotCardFooter = ({
7359
7313
  className,
7360
7314
  'data-testid': dataTestId
7361
7315
  }) => {
7362
- const rootClasses = useStylesWithRootClass(rootClassName$F, className);
7316
+ const rootClasses = useStylesWithRootClass(rootClassName$G, className);
7363
7317
  return jsx(StyledDiv, {
7364
7318
  "aria-label": ariaLabel,
7365
7319
  className: rootClasses,
@@ -7403,9 +7357,9 @@ const DotCardHeader = ({
7403
7357
  });
7404
7358
  };
7405
7359
 
7406
- const rootClassName$E = 'dot-form-control-label';
7360
+ const rootClassName$F = 'dot-form-control-label';
7407
7361
  const StyledFormControlLabel = styled(FormControlLabel)`
7408
- &.${rootClassName$E} {
7362
+ &.${rootClassName$F} {
7409
7363
  .MuiFormControlLabel-label {
7410
7364
  margin-bottom: 0;
7411
7365
  padding: 0 0 0 4px;
@@ -7428,12 +7382,12 @@ const StyledFormControlLabel = styled(FormControlLabel)`
7428
7382
  }
7429
7383
  `;
7430
7384
 
7431
- const rootClassName$D = 'dot-checkbox';
7385
+ const rootClassName$E = 'dot-checkbox';
7432
7386
  const StyledCheckbox = styled(Checkbox)`
7433
7387
  ${({
7434
7388
  theme
7435
7389
  }) => css`
7436
- &.${rootClassName$D} {
7390
+ &.${rootClassName$E} {
7437
7391
  padding: ${theme.spacing(1)};
7438
7392
 
7439
7393
  &.MuiCheckbox-indeterminate {
@@ -7452,7 +7406,7 @@ function DotCheckbox({
7452
7406
  ariaLabelledby,
7453
7407
  checked,
7454
7408
  className,
7455
- 'data-pendoid': dataPendoId = rootClassName$E,
7409
+ 'data-pendoid': dataPendoId = rootClassName$F,
7456
7410
  'data-testid': dataTestId,
7457
7411
  disabled,
7458
7412
  disableRipple,
@@ -7467,14 +7421,14 @@ function DotCheckbox({
7467
7421
  size = 'medium',
7468
7422
  value
7469
7423
  }) {
7470
- const rootClasses = useStylesWithRootClass(rootClassName$E, className);
7424
+ const rootClasses = useStylesWithRootClass(rootClassName$F, className);
7471
7425
  const handleChange = event => {
7472
7426
  onChange && onChange(event, event.target.value);
7473
7427
  };
7474
7428
  const checkboxControl = jsx(StyledCheckbox, {
7475
7429
  checked: checked,
7476
7430
  classes: {
7477
- root: rootClassName$D
7431
+ root: rootClassName$E
7478
7432
  },
7479
7433
  color: "primary",
7480
7434
  "data-pendoid": dataPendoId,
@@ -7503,13 +7457,13 @@ function DotCheckbox({
7503
7457
  });
7504
7458
  }
7505
7459
 
7506
- const rootClassName$C = 'dot-form-group';
7460
+ const rootClassName$D = 'dot-form-group';
7507
7461
  const groupLabelClassName = 'dot-form-group-label';
7508
7462
  const startAdornmentClassName = 'dot-start-adornment';
7509
7463
  const endAdornmentClassName = 'dot-end-adornment';
7510
7464
  const placementClassName = 'dot-';
7511
7465
  const StyledFormControl = styled(FormControl)`
7512
- &.${rootClassName$C} {
7466
+ &.${rootClassName$D} {
7513
7467
  .MuiFormLabel-root {
7514
7468
  width: 100%;
7515
7469
  line-height: 24px;
@@ -7540,7 +7494,7 @@ const StyledFormControl = styled(FormControl)`
7540
7494
  }
7541
7495
  `;
7542
7496
 
7543
- const rootClassName$B = 'dot-checkbox-group';
7497
+ const rootClassName$C = 'dot-checkbox-group';
7544
7498
  const wrapperClassName$1 = 'dot-checkbox-group-wrapper';
7545
7499
  const checkboxListClassName = 'dot-checkbox-list';
7546
7500
  const checkboxListItemClassName = 'dot-checkbox-list-item';
@@ -7549,7 +7503,7 @@ const StyledCheckboxGroup = styled.div`
7549
7503
  theme
7550
7504
  }) => css`{
7551
7505
  &.${wrapperClassName$1} {
7552
- .${rootClassName$B} {
7506
+ .${rootClassName$C} {
7553
7507
  width: 100%;
7554
7508
  }
7555
7509
 
@@ -7572,7 +7526,7 @@ const StyledCheckboxGroup = styled.div`
7572
7526
  margin-top: 0;
7573
7527
  padding-left: ${theme.spacing(2.5)};
7574
7528
 
7575
- .${rootClassName$E} {
7529
+ .${rootClassName$F} {
7576
7530
  margin: 0;
7577
7531
  }
7578
7532
  }
@@ -7580,13 +7534,13 @@ const StyledCheckboxGroup = styled.div`
7580
7534
  `}
7581
7535
  `;
7582
7536
 
7583
- const rootClassName$A = 'dot-form-group';
7537
+ const rootClassName$B = 'dot-form-group';
7584
7538
  const StyledFormGroup = styled(FormGroup)`
7585
7539
  ${({
7586
7540
  theme,
7587
7541
  row
7588
7542
  }) => css`
7589
- &.${rootClassName$A} > * {
7543
+ &.${rootClassName$B} > * {
7590
7544
  margin: ${row ? `${theme.spacing(0.5)}` : 0};
7591
7545
  }
7592
7546
  `}
@@ -7599,7 +7553,7 @@ function DotFormGroup({
7599
7553
  'data-testid': dataTestId,
7600
7554
  row
7601
7555
  }) {
7602
- const rootClasses = useStylesWithRootClass(rootClassName$C, className);
7556
+ const rootClasses = useStylesWithRootClass(rootClassName$D, className);
7603
7557
  return jsx(StyledFormGroup, {
7604
7558
  "aria-label": ariaLabel,
7605
7559
  classes: {
@@ -7638,7 +7592,7 @@ function DotCheckboxGroup({
7638
7592
  size = 'medium'
7639
7593
  }) {
7640
7594
  const placement = `${placementClassName}${labelPlacement}`;
7641
- const rootClasses = useStylesWithRootClass(rootClassName$C, rootClassName$B, className, placement);
7595
+ const rootClasses = useStylesWithRootClass(rootClassName$D, rootClassName$C, className, placement);
7642
7596
  const [selectedOptions, setSelectedOptions] = useState(defaultValues);
7643
7597
  const [allChecked, setAllChecked] = useState(false);
7644
7598
  /* This will ensure that state can be updated from the outside */
@@ -7723,12 +7677,12 @@ function DotCheckboxGroup({
7723
7677
  });
7724
7678
  }
7725
7679
 
7726
- const rootClassName$z = 'dot-dialog';
7680
+ const rootClassName$A = 'dot-dialog';
7727
7681
  const StyledDialog = styled(Dialog)`
7728
7682
  ${({
7729
7683
  theme
7730
7684
  }) => css`
7731
- &.${rootClassName$z} {
7685
+ &.${rootClassName$A} {
7732
7686
  .MuiDialog-paper {
7733
7687
  background: ${theme.palette.figma.background.level1.white};
7734
7688
  color: ${theme.palette.figma.typography.black};
@@ -7774,7 +7728,7 @@ const DotDialog = ({
7774
7728
  cancelButtonProps,
7775
7729
  cancelButtonVisible = true,
7776
7730
  className,
7777
- 'data-pendoid': dataPendoId = rootClassName$z,
7731
+ 'data-pendoid': dataPendoId = rootClassName$A,
7778
7732
  'data-testid': dataTestId,
7779
7733
  children,
7780
7734
  closeIconVisible,
@@ -7787,7 +7741,7 @@ const DotDialog = ({
7787
7741
  submitButtonProps,
7788
7742
  title
7789
7743
  }) => {
7790
- const rootClasses = useStylesWithRootClass(rootClassName$z, className);
7744
+ const rootClasses = useStylesWithRootClass(rootClassName$A, className);
7791
7745
  const cancelClasses = useStylesWithRootClass(cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.className, 'cancel-button');
7792
7746
  const [isOpen, setIsOpen] = useState(open);
7793
7747
  useEffect(() => {
@@ -7905,7 +7859,7 @@ const DotConfirmationDialog = ({
7905
7859
  });
7906
7860
  };
7907
7861
 
7908
- const rootClassName$y = 'dot-grid';
7862
+ const rootClassName$z = 'dot-grid';
7909
7863
  const frGetter = value => typeof value === 'number' ? `repeat(${value}, 1fr)` : value;
7910
7864
  const breakpointsGetter$1 = (theme, columnsBreakpoints, columnGap, rowGap) => `${theme.breakpoints.up('xs')} {
7911
7865
  column-gap: ${`${columnGap.xs}px`};
@@ -7957,7 +7911,7 @@ const Grid = ({
7957
7911
  className,
7958
7912
  children
7959
7913
  }) => {
7960
- const rootClasses = useStylesWithRootClass(rootClassName$y, className);
7914
+ const rootClasses = useStylesWithRootClass(rootClassName$z, className);
7961
7915
  return jsx("div", {
7962
7916
  className: rootClasses,
7963
7917
  children: children
@@ -7976,7 +7930,7 @@ const StyledGrid = styled(Grid)`
7976
7930
  theme,
7977
7931
  width
7978
7932
  }) => css`
7979
- &.${rootClassName$y} {
7933
+ &.${rootClassName$z} {
7980
7934
  display: grid;
7981
7935
  grid-template-rows: ${frGetter(rows)};
7982
7936
  ${columns ? `${columns && `grid-template-columns: ${frGetter(columns)}`};` : breakpointsGetter$1(theme, columnsBreakpoints, columnGap, rowGap)}
@@ -8182,7 +8136,7 @@ const CssGridDebug = ({
8182
8136
  });
8183
8137
  };
8184
8138
 
8185
- const rootClassName$x = 'dot-empty-state';
8139
+ const rootClassName$y = 'dot-empty-state';
8186
8140
  const StyledEmptyState = styled.div`
8187
8141
  ${({
8188
8142
  theme
@@ -8192,6 +8146,11 @@ const StyledEmptyState = styled.div`
8192
8146
  max-width: 600px;
8193
8147
  text-align: center;
8194
8148
 
8149
+ .empty-state-image-container {
8150
+ display: flex;
8151
+ justify-content: center;
8152
+ }
8153
+
8195
8154
  .empty-state-image {
8196
8155
  min-height: 239px;
8197
8156
  margin-bottom: ${theme.spacing(5)};
@@ -8212,26 +8171,77 @@ const StyledEmptyState = styled.div`
8212
8171
  `}
8213
8172
  `;
8214
8173
 
8174
+ const rootClassName$x = 'dot-illustration';
8175
+ const StyledIllustration = styled.span`
8176
+ &.${rootClassName$x} {
8177
+ display: inline-block;
8178
+ }
8179
+ `;
8180
+
8181
+ const DotIllustration = ({
8182
+ alt,
8183
+ ariaLabel,
8184
+ ariaRole = 'img',
8185
+ className,
8186
+ 'data-testid': dataTestId,
8187
+ illustrationId,
8188
+ theme = 'light',
8189
+ title,
8190
+ tooltip,
8191
+ tooltipPlacement = 'right-end'
8192
+ }) => {
8193
+ const rootClasses = useStylesWithRootClass(rootClassName$x, className);
8194
+ return jsx(DotTooltip, {
8195
+ title: tooltip,
8196
+ placement: tooltipPlacement,
8197
+ "data-testid": `${dataTestId || rootClassName$x}-tooltip`,
8198
+ children: jsx(StyledIllustration, {
8199
+ "aria-hidden": "false",
8200
+ "aria-label": ariaLabel || title || 'Illustration',
8201
+ className: rootClasses,
8202
+ "data-testid": dataTestId || rootClassName$x,
8203
+ role: ariaRole,
8204
+ children: jsx("img", {
8205
+ alt: alt || 'Illustration',
8206
+ "aria-label": ariaLabel || title || 'Illustration',
8207
+ className: `illustration-${illustrationId} dot-img ${theme}-theme`,
8208
+ "data-testid": dataTestId && `${dataTestId}-img`,
8209
+ role: ariaRole,
8210
+ title: title || 'Illustration'
8211
+ })
8212
+ })
8213
+ });
8214
+ };
8215
+
8215
8216
  const DotEmptyState = ({
8216
8217
  ariaLabel,
8217
8218
  buttonProps,
8218
8219
  className,
8219
8220
  'data-testid': dataTestId,
8221
+ illustrationId,
8220
8222
  imageAltText,
8221
8223
  imageSrc,
8222
8224
  subtitle,
8223
8225
  title
8224
8226
  }) => {
8225
- const rootClasses = useStylesWithRootClass(rootClassName$x, className);
8227
+ const rootClasses = useStylesWithRootClass(rootClassName$y, className);
8226
8228
  return jsxs(StyledEmptyState, {
8227
8229
  "aria-label": ariaLabel,
8228
8230
  className: rootClasses,
8229
8231
  "data-testid": dataTestId,
8230
- children: [imageSrc && jsx("img", {
8231
- alt: imageAltText || title,
8232
- className: "empty-state-image",
8233
- src: imageSrc,
8234
- title: imageAltText || title
8232
+ children: [jsxs("div", {
8233
+ className: "empty-state-image-container",
8234
+ children: [illustrationId && jsx(DotIllustration, {
8235
+ alt: imageAltText || title,
8236
+ className: "empty-state-image",
8237
+ illustrationId: illustrationId,
8238
+ title: imageAltText || title
8239
+ }), !illustrationId && imageSrc && jsx("img", {
8240
+ alt: imageAltText || title,
8241
+ className: "empty-state-image",
8242
+ src: imageSrc,
8243
+ title: imageAltText || title
8244
+ })]
8235
8245
  }), jsx(DotTypography, {
8236
8246
  variant: "h2",
8237
8247
  children: title
@@ -8296,7 +8306,7 @@ const StyledRadioGroup = styled(RadioGroup)`
8296
8306
  &.${groupClassName} {
8297
8307
  padding-left: ${theme.spacing(2.5)};
8298
8308
 
8299
- .${rootClassName$E} {
8309
+ .${rootClassName$F} {
8300
8310
  margin: 0;
8301
8311
  }
8302
8312
  }
@@ -8311,15 +8321,15 @@ const StyledFormContainer = styled.div`
8311
8321
  &.${rootClassName$w} {
8312
8322
  margin: ${theme.spacing(3, 0)};
8313
8323
 
8314
- .${rootClassName$C},
8315
- .${rootClassName$E},
8316
- .${rootClassName$16},
8324
+ .${rootClassName$D},
8325
+ .${rootClassName$F},
8326
+ .${rootClassName$17},
8317
8327
  .${rootSelectClassName} {
8318
8328
  margin: ${theme.spacing(1, 0)};
8319
8329
  }
8320
8330
 
8321
- .${rootClassName$B}, .${groupClassName} {
8322
- .${rootClassName$E} {
8331
+ .${rootClassName$C}, .${groupClassName} {
8332
+ .${rootClassName$F} {
8323
8333
  margin: 0;
8324
8334
  }
8325
8335
  }
@@ -8735,7 +8745,7 @@ function DotRadioButton({
8735
8745
  ariaLabel,
8736
8746
  checked,
8737
8747
  className,
8738
- 'data-pendoid': dataPendoId = rootClassName$E,
8748
+ 'data-pendoid': dataPendoId = rootClassName$F,
8739
8749
  'data-testid': dataTestId,
8740
8750
  disabled,
8741
8751
  id,
@@ -8748,7 +8758,7 @@ function DotRadioButton({
8748
8758
  size = 'medium',
8749
8759
  value
8750
8760
  }) {
8751
- const rootClasses = useStylesWithRootClass(rootClassName$E, className);
8761
+ const rootClasses = useStylesWithRootClass(rootClassName$F, className);
8752
8762
  const handleChange = event => {
8753
8763
  onChange && onChange(event, event.target.value);
8754
8764
  };
@@ -8802,7 +8812,7 @@ const DotRadioGroup = ({
8802
8812
  size = 'medium'
8803
8813
  }) => {
8804
8814
  const placement = `${placementClassName}${labelPlacement}`;
8805
- const rootClasses = useStylesWithRootClass(rootClassName$C, className, placement);
8815
+ const rootClasses = useStylesWithRootClass(rootClassName$D, className, placement);
8806
8816
  const radioValue = value || defaultValue;
8807
8817
  const [selectedValue, setSelectedValue] = useState(radioValue);
8808
8818
  /* This will ensure that value can be updated from the outside */
@@ -8936,7 +8946,7 @@ const DotSwitch = ({
8936
8946
  tabIndex: 0
8937
8947
  });
8938
8948
  return jsx(StyledFormControlLabel, {
8939
- className: rootClassName$E,
8949
+ className: rootClassName$F,
8940
8950
  control: switchControl,
8941
8951
  label: label,
8942
8952
  labelPlacement: labelPlacement
@@ -10222,83 +10232,71 @@ const DotSkeleton = ({
10222
10232
  });
10223
10233
  };
10224
10234
 
10235
+ function addAutoHideDuration(severity) {
10236
+ return severity === 'error' ? null : 10000;
10237
+ }
10238
+
10239
+ const getSnackbarTitleFromSeverity = severity => {
10240
+ switch (severity) {
10241
+ case 'success':
10242
+ return 'Success';
10243
+ case 'warning':
10244
+ return 'Warning';
10245
+ case 'error':
10246
+ return 'Error';
10247
+ case 'info':
10248
+ return 'Info';
10249
+ default:
10250
+ return 'Success';
10251
+ }
10252
+ };
10253
+
10225
10254
  const rootClassName$n = 'dot-snackbar';
10226
10255
  const StyledSnackbar = styled(Snackbar)`
10227
10256
  ${({
10228
- theme
10257
+ theme,
10258
+ width,
10259
+ $anchorOriginTop
10229
10260
  }) => css`
10230
- &.${rootClassName$n} {
10231
- .dot-icon-btn .dot-icon {
10232
- color: ${theme.palette.figma.icon.white};
10233
- }
10234
-
10235
- .dot-icon-btn:hover {
10236
- background: ${n900_20};
10237
- }
10261
+ &.${rootClassName$n} {
10262
+ .MuiAlert-message {
10263
+ word-break: break-word;
10264
+ }
10238
10265
 
10239
- .MuiAlert-icon {
10240
- color: ${theme.palette.figma.icon.white};
10241
- padding: 11px 0px;
10242
- }
10243
- .MuiAlert-message {
10244
- padding: 13px 0px;
10245
- word-break: break-word;
10246
- }
10247
- &.MuiSnackbar-anchorOriginTopRight{
10248
- top: 0px;
10249
- z-index: ${levelFourth};
10250
- }
10266
+ &.MuiSnackbar-anchorOriginTopLeft,
10267
+ &.MuiSnackbar-anchorOriginTopCenter,
10268
+ &.MuiSnackbar-anchorOriginTopRight {
10269
+ top: ${$anchorOriginTop}px;
10270
+ z-index: ${levelFourth};
10271
+ }
10251
10272
 
10252
- .MuiAlert-root {
10253
- color: ${theme.palette.figma.typography.white};
10254
- position: relative;
10255
- margin-top: 108px;
10256
- max-width: 500px;
10257
- min-width: 344px;
10258
- z-index: ${levelFourth};
10273
+ .dot-snackbar-actions {
10274
+ display: flex;
10275
+ align-items: center;
10276
+ margin-top: ${theme.spacing(1)};
10277
+ gap: ${theme.spacing(2)};
10259
10278
 
10260
- @media (min-width: 720px) {
10261
- .MuiAlert-root {
10262
- top: 112px;
10263
- position: relative;
10279
+ .primary-action-btn {
10280
+ background-color: transparent;
10264
10281
  }
10265
10282
  }
10266
10283
 
10267
- &.MuiAlert-standardSuccess {
10268
- background: ${theme.palette.figma.success.normal};
10269
- }
10270
- &.MuiAlert-standardInfo {
10271
- background: ${theme.palette.figma.inProgress.normal};
10272
- }
10273
- &.MuiAlert-standardWarning {
10274
- background: ${theme.palette.figma.warning.normal};
10275
- }
10276
- &.MuiAlert-standardError {
10277
- background: ${theme.palette.figma.destructive.normal};
10284
+ .MuiAlert-root {
10285
+ max-width: ${width ? 'unset' : '500px'};
10286
+ min-width: ${width ? 'unset' : '344px'};
10287
+ z-index: ${levelFourth};
10278
10288
  }
10279
10289
  }
10280
10290
  `}
10281
10291
  `;
10282
10292
 
10283
- function addAutoHideDuration(severity) {
10284
- return severity === 'error' ? null : 10000;
10285
- }
10286
-
10287
- function checkForConflictingEventHandlers({
10288
- action,
10289
- onClose
10290
- }) {
10291
- if (action && onClose) {
10292
- console.error('You have passed two event handlers for action buttons. Please pick one.');
10293
- }
10294
- }
10295
10293
  const DEFAULT_ANCHOR_ORIGIN = {
10296
10294
  vertical: 'top',
10297
10295
  horizontal: 'right'
10298
10296
  };
10299
10297
  const DotSnackbar = ({
10300
- action,
10301
10298
  anchorOrigin = DEFAULT_ANCHOR_ORIGIN,
10299
+ anchorOriginTop = 108,
10302
10300
  ariaLabel,
10303
10301
  autoHideDuration,
10304
10302
  children,
@@ -10307,22 +10305,22 @@ const DotSnackbar = ({
10307
10305
  hideOnClickAway = true,
10308
10306
  onClose,
10309
10307
  open,
10308
+ primaryAction,
10309
+ secondaryAction,
10310
10310
  severity,
10311
10311
  width
10312
10312
  }) => {
10313
+ const hasActions = !!(primaryAction || secondaryAction);
10313
10314
  const calculatedAutoHideDuration = autoHideDuration === null || autoHideDuration > 0 ? autoHideDuration : addAutoHideDuration(severity);
10314
- checkForConflictingEventHandlers({
10315
- onClose,
10316
- action
10317
- });
10318
10315
  const rootClasses = useStylesWithRootClass(rootClassName$n, className);
10319
10316
  const handleSnackbarClose = reason => {
10320
- if (hideOnClickAway || !hideOnClickAway && reason !== 'clickaway') {
10317
+ if (!reason || hideOnClickAway || !hideOnClickAway && reason !== 'clickaway') {
10321
10318
  onClose();
10322
10319
  }
10323
10320
  };
10324
10321
  return jsx(StyledSnackbar, {
10325
10322
  anchorOrigin: anchorOrigin,
10323
+ "$anchorOriginTop": anchorOriginTop,
10326
10324
  "aria-label": ariaLabel,
10327
10325
  autoHideDuration: calculatedAutoHideDuration,
10328
10326
  classes: {
@@ -10332,16 +10330,41 @@ const DotSnackbar = ({
10332
10330
  onClose: (_e, r) => handleSnackbarClose(r),
10333
10331
  open: open,
10334
10332
  severity: severity,
10335
- children: jsx(Alert, {
10336
- action: action,
10337
- onClose: onClose,
10338
- severity: severity,
10339
- style: {
10340
- width: width
10341
- },
10342
- children: jsx("span", {
10343
- "aria-label": severity,
10344
- children: children
10333
+ width: width,
10334
+ children: jsx("div", {
10335
+ children: jsx(DotAlertBanner, {
10336
+ severity: severity,
10337
+ width: width,
10338
+ onClose: _e => handleSnackbarClose(),
10339
+ children: jsxs("div", {
10340
+ children: [jsx(DotTypography, {
10341
+ variant: "subtitle2",
10342
+ noMarginBottom: false,
10343
+ children: getSnackbarTitleFromSeverity(severity)
10344
+ }), isString$1(children) ? jsx(DotTypography, {
10345
+ ariaLabel: severity,
10346
+ variant: "body1",
10347
+ children: children
10348
+ }) : jsx("span", {
10349
+ "aria-label": severity,
10350
+ children: children
10351
+ }), hasActions && jsxs("div", {
10352
+ className: "dot-snackbar-actions",
10353
+ children: [primaryAction && jsx(DotButton, {
10354
+ className: "primary-action-btn",
10355
+ "data-testid": "primary-action-btn",
10356
+ onClick: primaryAction.onClick,
10357
+ size: "small",
10358
+ type: "outlined",
10359
+ children: primaryAction.label
10360
+ }), secondaryAction && jsx(DotLink, {
10361
+ "data-testid": "secondary-action-link",
10362
+ href: secondaryAction.href,
10363
+ color: "inherit",
10364
+ children: secondaryAction.label
10365
+ })]
10366
+ })]
10367
+ })
10345
10368
  })
10346
10369
  })
10347
10370
  });
@@ -13169,7 +13192,7 @@ const DotPopper = ({
13169
13192
  open,
13170
13193
  placement
13171
13194
  }) => {
13172
- const rootClasses = useStylesWithRootClass(rootClassName$_, className);
13195
+ const rootClasses = useStylesWithRootClass(rootClassName$$, className);
13173
13196
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13174
13197
  const handleClickAway = event => {
13175
13198
  if (onClickAway && (!anchorEl || !anchorEl.contains(event.currentTarget))) {
@@ -14449,4 +14472,4 @@ const DotStickyWithBorder = ({
14449
14472
  });
14450
14473
  };
14451
14474
 
14452
- export { ApiError, Cell, CreateUUID, CssCell, CssGrid, CssGridDebug, DatePickerKeydownContext, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotBadge, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCarousel, DotCheckbox, DotCheckboxGroup, DotChip, DotClickAwayListener, DotConfirmationDialog, DotCopyButton, DotCoreApiProvider, DotDatePicker, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyFilterState, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotInlineEdit, DotInputSelect, DotInputText, DotLinearProgress, DotLink, DotList, DotMenu, 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, useDotCoreApiContext, useDotSnackbarContext };
14475
+ export { ApiError, Cell, CreateUUID, CssCell, CssGrid, CssGridDebug, DatePickerKeydownContext, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotBadge, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCarousel, DotCheckbox, DotCheckboxGroup, DotChip, DotClickAwayListener, DotConfirmationDialog, DotCopyButton, DotCoreApiProvider, DotDatePicker, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyFilterState, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotIllustration, DotInlineEdit, DotInputSelect, DotInputText, DotLinearProgress, DotLink, DotList, DotMenu, 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, useDotCoreApiContext, useDotSnackbarContext };