@digital-ai/dot-components 3.10.0 → 3.11.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
@@ -104,12 +104,12 @@ const DotTooltip = ({
104
104
  }) : children;
105
105
  };
106
106
 
107
- const rootClassName$1g = 'dot-icon';
107
+ const rootClassName$1i = 'dot-icon';
108
108
  const StyledIcon = styled(Icon)`
109
109
  ${({
110
110
  theme
111
111
  }) => css`
112
- &.${rootClassName$1g} {
112
+ &.${rootClassName$1i} {
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$1g, className);
149
+ const rootClasses = useStylesWithRootClass(rootClassName$1i, 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$1f = 'dot-accordion';
210
+ const rootClassName$1h = '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$1f} .${summaryClassName} {
221
+ &.${rootClassName$1h} .${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$1f,
266
+ 'data-pendoid': dataPendoId = rootClassName$1h,
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$1f, className);
277
+ const rootClasses = useStylesWithRootClass(rootClassName$1h, 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$1e = 'dot-text-field';
393
+ const rootClassName$1g = '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$1e} {
441
+ &.${rootClassName$1g} {
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$1e} {
485
+ &.${rootSelectClassName}, &.${rootClassName$1g} {
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$1d = 'dot-action-toolbar';
576
+ const rootClassName$1f = 'dot-action-toolbar';
577
577
  const StyledToolbar = styled(Toolbar)`
578
578
  ${({
579
579
  theme
580
580
  }) => css`
581
- &.${rootClassName$1d} {
581
+ &.${rootClassName$1f} {
582
582
  border-bottom: 1px solid ${theme.palette.figma.border.default};
583
583
 
584
- .${rootClassName$1e} .MuiInputBase-root {
584
+ .${rootClassName$1g} .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$1d, className);
598
+ const rootClasses = useStylesWithRootClass(rootClassName$1f, className);
599
599
  return jsx(StyledToolbar, {
600
600
  "aria-label": ariaLabel,
601
601
  className: rootClasses,
@@ -1665,12 +1665,12 @@ const renderNodeOrTypography = (content, typographyVariant = 'body1') => {
1665
1665
  const checkIfArrowUpPressed = event => event.key === 'ArrowUp';
1666
1666
  const checkIfArrowDownPressed = event => event.key === 'ArrowDown';
1667
1667
 
1668
- const rootClassName$1c = 'dot-alert-banner';
1668
+ const rootClassName$1e = 'dot-alert-banner';
1669
1669
  const StyledAlertBanner = styled(Alert)`
1670
1670
  ${({
1671
1671
  theme
1672
1672
  }) => css`
1673
- &.${rootClassName$1c} {
1673
+ &.${rootClassName$1e} {
1674
1674
  align-items: center;
1675
1675
  box-sizing: border-box;
1676
1676
  min-height: 48px;
@@ -1705,7 +1705,7 @@ const DotAlertBanner = ({
1705
1705
  ariaLabel,
1706
1706
  children,
1707
1707
  className,
1708
- 'data-pendoid': dataPendoId = rootClassName$1c,
1708
+ 'data-pendoid': dataPendoId = rootClassName$1e,
1709
1709
  'data-testid': dataTestId,
1710
1710
  onClose,
1711
1711
  roundedCorners = true,
@@ -1713,7 +1713,7 @@ const DotAlertBanner = ({
1713
1713
  textVariant = 'body1',
1714
1714
  width
1715
1715
  }) => {
1716
- const rootClasses = useStylesWithRootClass(rootClassName$1c, severity, className);
1716
+ const rootClasses = useStylesWithRootClass(rootClassName$1e, severity, className);
1717
1717
  /* For simple string use default component, for everything else use 'div' */
1718
1718
  const typographyComponent = isString$2(children) ? undefined : 'div';
1719
1719
  return jsx(StyledAlertBanner, {
@@ -2391,7 +2391,7 @@ const useDotCoreApiContext = () => {
2391
2391
  return useContext(DotCoreApiContext);
2392
2392
  };
2393
2393
 
2394
- const rootClassName$1b = 'dot-avatar';
2394
+ const rootClassName$1d = 'dot-avatar';
2395
2395
  const avatarSpacing = {
2396
2396
  small: 3,
2397
2397
  medium: 5,
@@ -2401,7 +2401,7 @@ const StyledAvatar = styled(Avatar)`
2401
2401
  ${({
2402
2402
  theme
2403
2403
  }) => css`
2404
- &.${rootClassName$1b} {
2404
+ &.${rootClassName$1d} {
2405
2405
  display: inline-flex;
2406
2406
  background-color: ${({
2407
2407
  color
@@ -2513,7 +2513,7 @@ const DotAvatar = ({
2513
2513
  variant = 'circular',
2514
2514
  style
2515
2515
  }) => {
2516
- const rootClasses = useStylesWithRootClass(rootClassName$1b, className);
2516
+ const rootClasses = useStylesWithRootClass(rootClassName$1d, className);
2517
2517
  const getAvatarColor = () => {
2518
2518
  if ((style === null || style === void 0 ? void 0 : style.color) !== undefined) return 'inherit';
2519
2519
  if (color) return color;
@@ -2552,12 +2552,12 @@ const DotAvatar = ({
2552
2552
  });
2553
2553
  };
2554
2554
 
2555
- const rootClassName$1a = 'dot-button';
2555
+ const rootClassName$1c = 'dot-button';
2556
2556
  const StyledButton = styled(Button)`
2557
2557
  ${({
2558
2558
  theme
2559
2559
  }) => css`
2560
- &.${rootClassName$1a} {
2560
+ &.${rootClassName$1c} {
2561
2561
  background-color: ${theme.palette.figma.primary.normal};
2562
2562
  margin: ${theme.spacing(0.5)};
2563
2563
  padding: ${theme.spacing(0.75, 2)};
@@ -2641,7 +2641,7 @@ const DotButton = forwardRef(({
2641
2641
  autoFocus = false,
2642
2642
  children,
2643
2643
  className,
2644
- 'data-pendoid': dataPendoId = rootClassName$1a,
2644
+ 'data-pendoid': dataPendoId = rootClassName$1c,
2645
2645
  'data-testid': dataTestId,
2646
2646
  disabled = false,
2647
2647
  disableRipple = false,
@@ -2657,7 +2657,7 @@ const DotButton = forwardRef(({
2657
2657
  tooltipPlacement,
2658
2658
  type = 'primary'
2659
2659
  }, ref) => {
2660
- const rootClasses = useStylesWithRootClass(rootClassName$1a, className);
2660
+ const rootClasses = useStylesWithRootClass(rootClassName$1c, className);
2661
2661
  let color;
2662
2662
  let variant;
2663
2663
  switch (type) {
@@ -2681,7 +2681,7 @@ const DotButton = forwardRef(({
2681
2681
  return jsx(DotTooltip, {
2682
2682
  placement: tooltipPlacement,
2683
2683
  title: tooltip,
2684
- "data-testid": `${dataTestId || rootClassName$1a}-tooltip`,
2684
+ "data-testid": `${dataTestId || rootClassName$1c}-tooltip`,
2685
2685
  children: jsx(StyledButton, {
2686
2686
  "aria-label": ariaLabel,
2687
2687
  autoFocus: autoFocus,
@@ -2690,7 +2690,7 @@ const DotButton = forwardRef(({
2690
2690
  },
2691
2691
  color: color,
2692
2692
  "data-pendoid": dataPendoId,
2693
- "data-testid": dataTestId || rootClassName$1a,
2693
+ "data-testid": dataTestId || rootClassName$1c,
2694
2694
  disableRipple: disableRipple,
2695
2695
  disabled: disabled,
2696
2696
  endIcon: endIcon,
@@ -2709,10 +2709,10 @@ const DotButton = forwardRef(({
2709
2709
  });
2710
2710
  });
2711
2711
 
2712
- const rootClassName$19 = 'dot-link';
2712
+ const rootClassName$1b = 'dot-link';
2713
2713
  const StyledLink = styled(Link)`
2714
2714
  ${() => css`
2715
- &.${rootClassName$19} {
2715
+ &.${rootClassName$1b} {
2716
2716
  cursor: pointer;
2717
2717
 
2718
2718
  &:hover.MuiLink-underlineHover {
@@ -2728,7 +2728,7 @@ const DotLink = ({
2728
2728
  children,
2729
2729
  className,
2730
2730
  color = 'primary',
2731
- 'data-pendoid': dataPendoId = rootClassName$19,
2731
+ 'data-pendoid': dataPendoId = rootClassName$1b,
2732
2732
  'data-testid': dataTestId,
2733
2733
  href,
2734
2734
  onClick,
@@ -2740,7 +2740,7 @@ const DotLink = ({
2740
2740
  tooltip,
2741
2741
  underline = 'always'
2742
2742
  }) => {
2743
- const rootClasses = useStylesWithRootClass(rootClassName$19, className);
2743
+ const rootClasses = useStylesWithRootClass(rootClassName$1b, className);
2744
2744
  useEffect(() => {
2745
2745
  // Include a console warning if the link is not a string and no ariaLabel is provided
2746
2746
  if (!isString$2(children) && !ariaLabel) {
@@ -2790,7 +2790,7 @@ const CreateUUID = () => {
2790
2790
  });
2791
2791
  };
2792
2792
 
2793
- const rootClassName$18 = 'dot-list';
2793
+ const rootClassName$1a = 'dot-list';
2794
2794
  const listItemRootClass = 'dot-list-item';
2795
2795
  const nestedListClassName = 'dot-nested-list';
2796
2796
  const nestedDrawerClassName = 'dot-nested-drawer';
@@ -2798,7 +2798,7 @@ const StyledList = styled(List)`
2798
2798
  ${({
2799
2799
  theme
2800
2800
  }) => css`
2801
- &.${rootClassName$18} {
2801
+ &.${rootClassName$1a} {
2802
2802
  background: ${theme.palette.figma.background.level0.componentsBackground};
2803
2803
 
2804
2804
  .dot-icon {
@@ -2881,12 +2881,12 @@ const DotListDivider = ({
2881
2881
  });
2882
2882
  };
2883
2883
 
2884
- const rootClassName$17 = 'dot-progress';
2884
+ const rootClassName$19 = 'dot-progress';
2885
2885
  const StyledProgress = styled.div`
2886
2886
  ${({
2887
2887
  theme
2888
2888
  }) => css`
2889
- &.${rootClassName$17} {
2889
+ &.${rootClassName$19} {
2890
2890
  line-height: 0;
2891
2891
 
2892
2892
  .dot-progress-with-label-wrapper {
@@ -2937,7 +2937,7 @@ const DotProgress = ({
2937
2937
  value,
2938
2938
  variant = 'indeterminate'
2939
2939
  }) => {
2940
- const rootClasses = useStylesWithRootClass(rootClassName$17, className);
2940
+ const rootClasses = useStylesWithRootClass(rootClassName$19, className);
2941
2941
  useEffect(() => {
2942
2942
  if (!ariaLabel) {
2943
2943
  console.warn('a11y: DotProgress must have an ariaLabel to describe the progress component');
@@ -3003,34 +3003,34 @@ var variables = /*#__PURE__*/Object.freeze({
3003
3003
  levelTop: levelTop
3004
3004
  });
3005
3005
 
3006
- const rootClassName$16 = 'dot-popper';
3006
+ const rootClassName$18 = 'dot-popper';
3007
3007
  const StyledPopper$1 = styled(Popper)`
3008
3008
  ${({
3009
3009
  theme
3010
3010
  }) => css`
3011
- &.${rootClassName$16} {
3011
+ &.${rootClassName$18} {
3012
3012
  font-family: ${theme.typography.fontFamily};
3013
3013
  font-size: ${theme.typography.body1.fontSize}px;
3014
3014
  }
3015
3015
 
3016
- &.${rootClassName$16}, &.${rootClassName$16} > .dot-popper-paper {
3016
+ &.${rootClassName$18}, &.${rootClassName$18} > .dot-popper-paper {
3017
3017
  background-color: ${theme.palette.figma.background.level1.white};
3018
3018
  }
3019
3019
  `}
3020
3020
  `;
3021
3021
 
3022
3022
  const flyoutMenuClassName = 'dot-flyout-menu';
3023
- const rootClassName$15 = 'dot-menu';
3023
+ const rootClassName$17 = 'dot-menu';
3024
3024
  const StyledPopper = styled(Popper)`
3025
3025
  ${({
3026
3026
  theme
3027
3027
  }) => css`
3028
- &.${rootClassName$16} {
3028
+ &.${rootClassName$18} {
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$15}, &.${rootClassName$16} {
3033
+ &.${rootClassName$17}, &.${rootClassName$18} {
3034
3034
  .MuiPaper-root {
3035
3035
  border: 1px solid ${theme.palette.layer.n100};
3036
3036
  }
@@ -3110,14 +3110,14 @@ const MENU_ITEM_HEIGHT_NORMAL = 48;
3110
3110
  const MENU_ITEM_HEIGHT_DENSE = 36;
3111
3111
  const DEFAULT_MAX_VISIBLE_ITEMS = 7;
3112
3112
 
3113
- const rootClassName$14 = 'dot-ul';
3113
+ const rootClassName$16 = 'dot-ul';
3114
3114
  const listItemClassName$1 = 'dot-li';
3115
3115
  const listItemWithSubmenuClassName = 'dot-li-with-submenu';
3116
3116
  const StyledMenuList = styled(MenuList)`
3117
3117
  ${({
3118
3118
  theme
3119
3119
  }) => css`
3120
- &.${rootClassName$14} {
3120
+ &.${rootClassName$16} {
3121
3121
  background: ${theme.palette.figma.background.level1.white};
3122
3122
 
3123
3123
  .dot-li {
@@ -3213,7 +3213,7 @@ const DotMenuList = forwardRef(({
3213
3213
  onSubMenuCreate,
3214
3214
  selectedKey
3215
3215
  }, ref) => {
3216
- const rootClasses = useStylesWithRootClass(rootClassName$14, className);
3216
+ const rootClasses = useStylesWithRootClass(rootClassName$16, className);
3217
3217
  const [activeSubmenu, setActiveSubmenu] = useState(null);
3218
3218
  const [subItemAnchorEl, setSubItemAnchorEl] = useState(null);
3219
3219
  const openSubmenu = (target, itemKey) => {
@@ -3324,7 +3324,7 @@ const DotMenu = ({
3324
3324
  open = false,
3325
3325
  selectedKey
3326
3326
  }) => {
3327
- const rootClasses = useStylesWithRootClass(rootClassName$15, className, loading ? 'loading' : '');
3327
+ const rootClasses = useStylesWithRootClass(rootClassName$17, className, loading ? 'loading' : '');
3328
3328
  const isSubmenu = checkIfSubmenu(anchorEl);
3329
3329
  const hasSubItems = checkForSubItems(menuItems);
3330
3330
  // Timeout object is customizable when Menu component is either submenu
@@ -3412,12 +3412,12 @@ const DotMenu = ({
3412
3412
  });
3413
3413
  };
3414
3414
 
3415
- const rootClassName$13 = 'dot-drawer';
3415
+ const rootClassName$15 = 'dot-drawer';
3416
3416
  const StyledDrawer = styled(Drawer)`
3417
3417
  ${({
3418
3418
  theme
3419
3419
  }) => css`
3420
- &.${rootClassName$13} .MuiBackdrop-root {
3420
+ &.${rootClassName$15} .MuiBackdrop-root {
3421
3421
  background-color: ${theme.palette.figma.overlay.default};
3422
3422
  }
3423
3423
 
@@ -3436,12 +3436,12 @@ const StyledDrawer = styled(Drawer)`
3436
3436
  `}
3437
3437
  `;
3438
3438
 
3439
- const rootClassName$12 = 'dot-drawer-header';
3439
+ const rootClassName$14 = 'dot-drawer-header';
3440
3440
  const StyleDrawerHeader = styled.div`
3441
3441
  ${({
3442
3442
  theme
3443
3443
  }) => css`
3444
- &.${rootClassName$12} {
3444
+ &.${rootClassName$14} {
3445
3445
  padding: ${theme.spacing(0, 0, 2)};
3446
3446
  display: flex;
3447
3447
  align-items: center;
@@ -3452,13 +3452,13 @@ const StyleDrawerHeader = styled.div`
3452
3452
  `}
3453
3453
  `;
3454
3454
 
3455
- const rootClassName$11 = 'dot-icon-btn';
3455
+ const rootClassName$13 = 'dot-icon-btn';
3456
3456
  const StyledIconButton = styled(IconButton)`
3457
3457
  ${({
3458
3458
  theme,
3459
3459
  color
3460
3460
  }) => css`
3461
- &.${rootClassName$11} {
3461
+ &.${rootClassName$13} {
3462
3462
  ${color === 'inherit' ? css`
3463
3463
  color: inherit;
3464
3464
  ` : ''}
@@ -3517,7 +3517,7 @@ const DotIconButton = ({
3517
3517
  ariaRole = 'button',
3518
3518
  className,
3519
3519
  color = 'inherit',
3520
- 'data-pendoid': dataPendoId = rootClassName$11,
3520
+ 'data-pendoid': dataPendoId = rootClassName$13,
3521
3521
  'data-testid': dataTestId,
3522
3522
  disableRipple = false,
3523
3523
  disabled = false,
@@ -3530,7 +3530,7 @@ const DotIconButton = ({
3530
3530
  tooltipPlacement
3531
3531
  }) => {
3532
3532
  const rippleClassName = disableRipple ? 'ripple-disabled' : '';
3533
- const rootClasses = useStylesWithRootClass(rootClassName$11, rippleClassName, `shape-${shape}`, className);
3533
+ const rootClasses = useStylesWithRootClass(rootClassName$13, rippleClassName, `shape-${shape}`, className);
3534
3534
  return jsx(DotTooltip, {
3535
3535
  "data-testid": "icon-button-tooltip",
3536
3536
  placement: tooltipPlacement,
@@ -3565,7 +3565,7 @@ const DotDrawerHeader = ({
3565
3565
  onClose,
3566
3566
  variant
3567
3567
  }) => {
3568
- const rootClasses = useStylesWithRootClass(rootClassName$12, className);
3568
+ const rootClasses = useStylesWithRootClass(rootClassName$14, className);
3569
3569
  return jsxs(StyleDrawerHeader, {
3570
3570
  "aria-label": ariaLabel,
3571
3571
  "aria-level": 2,
@@ -3582,10 +3582,10 @@ const DotDrawerHeader = ({
3582
3582
  });
3583
3583
  };
3584
3584
 
3585
- const rootClassName$10 = 'dot-drawer-body';
3585
+ const rootClassName$12 = 'dot-drawer-body';
3586
3586
  const StyleDrawerBody = styled.div`
3587
3587
  ${() => css`
3588
- &.${rootClassName$10} {
3588
+ &.${rootClassName$12} {
3589
3589
  display: flex;
3590
3590
  .dot-drawer-close-button {
3591
3591
  align-self: self-start;
@@ -3606,7 +3606,7 @@ const DotDrawerBody = ({
3606
3606
  onClose,
3607
3607
  variant
3608
3608
  }) => {
3609
- const rootClasses = useStylesWithRootClass(rootClassName$10, className);
3609
+ const rootClasses = useStylesWithRootClass(rootClassName$12, className);
3610
3610
  return jsxs(StyleDrawerBody, {
3611
3611
  "aria-label": ariaLabel,
3612
3612
  className: rootClasses,
@@ -3621,12 +3621,12 @@ const DotDrawerBody = ({
3621
3621
  });
3622
3622
  };
3623
3623
 
3624
- const rootClassName$$ = 'dot-drawer-footer';
3624
+ const rootClassName$11 = 'dot-drawer-footer';
3625
3625
  const StyleDrawerFooter = styled.div`
3626
3626
  ${({
3627
3627
  theme
3628
3628
  }) => css`
3629
- &.${rootClassName$$} {
3629
+ &.${rootClassName$11} {
3630
3630
  padding: ${theme.spacing(2, 0, 0)};
3631
3631
  }
3632
3632
  `}
@@ -3639,7 +3639,7 @@ const DotDrawerFooter = ({
3639
3639
  className,
3640
3640
  'data-testid': dataTestId
3641
3641
  }) => {
3642
- const rootClasses = useStylesWithRootClass(rootClassName$$, className);
3642
+ const rootClasses = useStylesWithRootClass(rootClassName$11, className);
3643
3643
  return jsx(StyleDrawerFooter, {
3644
3644
  "aria-label": ariaLabel,
3645
3645
  className: rootClasses,
@@ -3655,7 +3655,7 @@ const DotDrawer = ({
3655
3655
  ariaRole = 'dialog',
3656
3656
  className,
3657
3657
  children,
3658
- 'data-pendoid': dataPendoId = rootClassName$13,
3658
+ 'data-pendoid': dataPendoId = rootClassName$15,
3659
3659
  'data-testid': dataTestId,
3660
3660
  drawerBodyProps,
3661
3661
  drawerFooterProps,
@@ -3678,7 +3678,7 @@ const DotDrawer = ({
3678
3678
  onClose(event);
3679
3679
  }
3680
3680
  };
3681
- const rootClasses = useStylesWithRootClass(rootClassName$13, className);
3681
+ const rootClasses = useStylesWithRootClass(rootClassName$15, className);
3682
3682
  const backdropEnabled = variant === 'temporary' && !(ModalProps === null || ModalProps === void 0 ? void 0 : ModalProps.hideBackdrop);
3683
3683
  const headerExists = !!drawerHeaderProps;
3684
3684
  const bodyPendoId = drawerBodyProps ? drawerBodyProps['data-pendoid'] : 'drawer-body';
@@ -4076,7 +4076,7 @@ const DotList = ({
4076
4076
  nestedListType = 'expandable',
4077
4077
  width = 240
4078
4078
  }) => {
4079
- const rootClasses = useStylesWithRootClass(rootClassName$18, className);
4079
+ const rootClasses = useStylesWithRootClass(rootClassName$1a, className);
4080
4080
  const listWidth = typeof width === 'number' ? `${width}px` : width;
4081
4081
  const listRef = useRef();
4082
4082
  const [listItemIndex, setListItemIndex] = useState(null);
@@ -4170,12 +4170,12 @@ const DotList = ({
4170
4170
  });
4171
4171
  };
4172
4172
 
4173
- const rootClassName$_ = 'dot-copy-button';
4173
+ const rootClassName$10 = 'dot-copy-button';
4174
4174
  const StyledCopyButton = styled.span`
4175
4175
  ${({
4176
4176
  theme
4177
4177
  }) => css`
4178
- &.${rootClassName$_} .copied-to-clipboard {
4178
+ &.${rootClassName$10} .copied-to-clipboard {
4179
4179
  color: ${theme.palette.figma.success.normal};
4180
4180
 
4181
4181
  &.MuiIcon-fontSizeSmall.button-size-small {
@@ -4201,7 +4201,7 @@ const DotCopyButton = ({
4201
4201
  color = 'inherit',
4202
4202
  copiedTooltip = 'Copied!',
4203
4203
  copyTooltip = 'Copy to clipboard',
4204
- 'data-pendoid': dataPendoId = rootClassName$_,
4204
+ 'data-pendoid': dataPendoId = rootClassName$10,
4205
4205
  'data-testid': dataTestId = 'dot-copy-button',
4206
4206
  disabled = false,
4207
4207
  disableRipple = false,
@@ -4249,7 +4249,7 @@ const DotCopyButton = ({
4249
4249
  return false;
4250
4250
  }, [value, showCopiedIcon, disabled, onClick]);
4251
4251
  return jsxs(StyledCopyButton, {
4252
- className: rootClassName$_,
4252
+ className: rootClassName$10,
4253
4253
  "data-testid": dataTestId,
4254
4254
  children: [!timedShowCopiedIcon && jsx(DotIconButton, {
4255
4255
  ariaLabel: ariaLabel,
@@ -4338,7 +4338,7 @@ const DotInputText = ({
4338
4338
  autoFocus,
4339
4339
  className,
4340
4340
  defaultValue,
4341
- 'data-pendoid': dataPendoId = rootClassName$1e,
4341
+ 'data-pendoid': dataPendoId = rootClassName$1g,
4342
4342
  'data-testid': dataTestId,
4343
4343
  disabled = false,
4344
4344
  error = false,
@@ -4384,7 +4384,7 @@ const DotInputText = ({
4384
4384
  const internalInputRef = useRef(null);
4385
4385
  const textFieldInputRef = inputRef || internalInputRef;
4386
4386
  const [inputTextState, setInputTextState] = useState(getInitialState(value));
4387
- const rootStyles = useStylesWithRootClass(rootClassName$1e, hasError, hasWarning, hasSuccess, readOnly && readOnlyClassName$1);
4387
+ const rootStyles = useStylesWithRootClass(rootClassName$1g, hasError, hasWarning, hasSuccess, readOnly && readOnlyClassName$1);
4388
4388
  useEffect(() => {
4389
4389
  if (value !== inputTextState.inputValue) {
4390
4390
  setInputTextState(getInitialState(value, defaultValue));
@@ -4520,10 +4520,10 @@ const DotInputText = ({
4520
4520
  });
4521
4521
  };
4522
4522
 
4523
- const rootClassName$Z = 'dot-search-input';
4523
+ const rootClassName$$ = 'dot-search-input';
4524
4524
  const StyledSearchInput = styled.span`
4525
4525
  ${() => css`
4526
- &.${rootClassName$Z} {
4526
+ &.${rootClassName$$} {
4527
4527
  }
4528
4528
  `}
4529
4529
  `;
@@ -4540,7 +4540,7 @@ function SearchInput({
4540
4540
  tooltip = null,
4541
4541
  value
4542
4542
  }) {
4543
- const rootClasses = useStylesWithRootClass(rootClassName$Z, className);
4543
+ const rootClasses = useStylesWithRootClass(rootClassName$$, className);
4544
4544
  const [searchText, setSearchText] = useState(value);
4545
4545
  let previousSearchText = '';
4546
4546
  const handleChange = useCallback(event => {
@@ -4796,12 +4796,12 @@ const recentAppInstancesSetter = (latestInstance, maxRecentItems
4796
4796
  };
4797
4797
  };
4798
4798
 
4799
- const rootClassName$Y = 'dot-app-switcher';
4799
+ const rootClassName$_ = 'dot-app-switcher';
4800
4800
  const StyledAppSwitcher = styled(DotDrawer)`
4801
4801
  ${({
4802
4802
  theme
4803
4803
  }) => css`
4804
- &.${rootClassName$Y} {
4804
+ &.${rootClassName$_} {
4805
4805
  .dot-drawer-paper {
4806
4806
  padding: 0;
4807
4807
  width: 382px;
@@ -4911,7 +4911,7 @@ const DotAppSwitcherView = ({
4911
4911
  if (dotCoreApiContext !== null) {
4912
4912
  setSelectedAppType = dotCoreApiContext.setSelectedAppSwitcherAppType;
4913
4913
  }
4914
- const rootClasses = useStylesWithRootClass(rootClassName$Y, className);
4914
+ const rootClasses = useStylesWithRootClass(rootClassName$_, className);
4915
4915
  const [appTypeMap, setAppTypeMap] = useState();
4916
4916
  const [appTypeLabels, setAppTypeLabels] = useState();
4917
4917
  const [appTypeMenuItems, setAppTypeMenuItems] = useState();
@@ -5289,12 +5289,12 @@ var SvgLogoDigitalAiWhite = function SvgLogoDigitalAiWhite(_ref, ref) {
5289
5289
  };
5290
5290
  var ForwardRef = /*#__PURE__*/forwardRef(SvgLogoDigitalAiWhite);
5291
5291
 
5292
- const rootClassName$X = 'dot-sidebar';
5292
+ const rootClassName$Z = 'dot-sidebar';
5293
5293
  const StyledSidebar = styled.aside`
5294
5294
  ${({
5295
5295
  theme
5296
5296
  }) => css`
5297
- &.${rootClassName$X} {
5297
+ &.${rootClassName$Z} {
5298
5298
  align-items: stretch;
5299
5299
  background: ${theme.palette.figma.background.level1.white};
5300
5300
  border-width: 0 1px;
@@ -5588,10 +5588,10 @@ const StyledSidebar = styled.aside`
5588
5588
  `}
5589
5589
  `;
5590
5590
 
5591
- const rootClassName$W = 'dot-truncate-with-tooltip';
5591
+ const rootClassName$Y = 'dot-truncate-with-tooltip';
5592
5592
  const StyledTruncateWithTooltip = styled(Tooltip)`
5593
5593
  ${() => css`
5594
- &.${rootClassName$W} {
5594
+ &.${rootClassName$Y} {
5595
5595
  display: block;
5596
5596
  overflow: hidden;
5597
5597
  white-space: nowrap;
@@ -5622,7 +5622,7 @@ const DotTruncateWithTooltip = ({
5622
5622
  label,
5623
5623
  width
5624
5624
  }) => {
5625
- const rootClasses = useStylesWithRootClass(rootClassName$W, className, charactersLimit ? 'dot-characters-limit' : '');
5625
+ const rootClasses = useStylesWithRootClass(rootClassName$Y, className, charactersLimit ? 'dot-characters-limit' : '');
5626
5626
  return jsx(StyledTruncateWithTooltip, {
5627
5627
  "aria-label": ariaLabel,
5628
5628
  arrow: arrow,
@@ -5733,6 +5733,7 @@ const DotSidebar = ({
5733
5733
  setIsOpen(!isOpen);
5734
5734
  };
5735
5735
  useEffect(() => {
5736
+ if (!collapsable) return;
5736
5737
  const handleKeyPress = event => {
5737
5738
  const element = event.target;
5738
5739
  if (event.key === collapseKey && !['INPUT', 'TEXTAREA'].includes(element.nodeName) && !element.isContentEditable) {
@@ -5743,9 +5744,9 @@ const DotSidebar = ({
5743
5744
  return () => {
5744
5745
  window.removeEventListener('keydown', handleKeyPress);
5745
5746
  };
5746
- }, [isOpen]);
5747
+ }, [isOpen, collapsable]);
5747
5748
  const sidebarClasses = useStylesWithRootClass('side-nav', openClass);
5748
- const rootClasses = useStylesWithRootClass(rootClassName$X, openClass, className);
5749
+ const rootClasses = useStylesWithRootClass(rootClassName$Z, openClass, className);
5749
5750
  return jsxs(StyledSidebar, {
5750
5751
  "aria-label": ariaLabel,
5751
5752
  className: rootClasses,
@@ -5796,7 +5797,7 @@ const DotSidebar = ({
5796
5797
  }), collapsable && jsx("div", {
5797
5798
  className: "toggle-nav",
5798
5799
  children: jsx(DotTooltip, {
5799
- title: (isOpen ? 'Collapse' : 'Expand') + ` ${collapseKey}`,
5800
+ title: (isOpen ? 'Collapse' : 'Expand') + ` ${collapseKey.toUpperCase()}`,
5800
5801
  placement: "right",
5801
5802
  children: jsx(DotIconButton, {
5802
5803
  ariaLabel: "collapse sidebar navigation",
@@ -5813,12 +5814,12 @@ const DotSidebar = ({
5813
5814
  });
5814
5815
  };
5815
5816
 
5816
- const rootClassName$V = 'dot-badge';
5817
+ const rootClassName$X = 'dot-badge';
5817
5818
  const StyledBadge = styled(Badge)`
5818
5819
  ${({
5819
5820
  theme
5820
5821
  }) => css`
5821
- &.${rootClassName$V} {
5822
+ &.${rootClassName$X} {
5822
5823
  color: ${theme.palette.figma.typography.black};
5823
5824
  word-break: normal;
5824
5825
 
@@ -5853,7 +5854,7 @@ const DotBadge = ({
5853
5854
  overlap,
5854
5855
  variant = 'dot'
5855
5856
  }) => {
5856
- const rootClasses = useStylesWithRootClass(rootClassName$V, className);
5857
+ const rootClasses = useStylesWithRootClass(rootClassName$X, className);
5857
5858
  return jsx(StyledBadge, {
5858
5859
  "$badgeColor": badgeColor,
5859
5860
  anchorOrigin: {
@@ -5875,7 +5876,7 @@ const DotBadge = ({
5875
5876
  });
5876
5877
  };
5877
5878
 
5878
- const rootClassName$U = 'dot-app-toolbar';
5879
+ const rootClassName$W = 'dot-app-toolbar';
5879
5880
  const denseClassName = 'dense';
5880
5881
  const StyledMainMenu = styled(DotDrawer)`
5881
5882
  ${({
@@ -5915,7 +5916,7 @@ const StyledAppToolbar = styled.header`
5915
5916
  ${({
5916
5917
  theme
5917
5918
  }) => css`
5918
- &.${rootClassName$U} {
5919
+ &.${rootClassName$W} {
5919
5920
  align-items: center;
5920
5921
  background: ${theme.palette.figma.appToolbar.background};
5921
5922
  border-bottom: 4px solid ${theme.palette.figma.border.default};
@@ -6037,7 +6038,7 @@ const DotAppToolbar = ({
6037
6038
  const displayAppLogo = appLogo || appLogoSmall;
6038
6039
  const mainMenuRef = useRef(null);
6039
6040
  const denseClass = dense ? denseClassName : '';
6040
- const rootClasses = useStylesWithRootClass(rootClassName$U, className, denseClass, showMainMenu ? '' : 'without-menu-icon');
6041
+ const rootClasses = useStylesWithRootClass(rootClassName$W, className, denseClass, showMainMenu ? '' : 'without-menu-icon');
6041
6042
  const mainMenuClasses = useStylesWithRootClass('dot-main-menu', denseClass, menuOpen ? 'open' : '');
6042
6043
  const targetBreakpoint = useMediaQuery(theme => theme.breakpoints.up('lg'));
6043
6044
  useEffect(() => {
@@ -6167,14 +6168,14 @@ const DotAppToolbar = ({
6167
6168
  }) : appToolbar;
6168
6169
  };
6169
6170
 
6170
- const rootClassName$T = 'dot-autocomplete';
6171
+ const rootClassName$V = 'dot-autocomplete';
6171
6172
  const inputRootClassName = 'dot-input-root';
6172
6173
  const inputMediumClassName = 'dot-input-medium';
6173
6174
  const StyledAutocomplete = styled(Autocomplete)`
6174
6175
  ${({
6175
6176
  theme
6176
6177
  }) => css`
6177
- &.${rootClassName$T} {
6178
+ &.${rootClassName$V} {
6178
6179
  &.${inputMediumClassName} .dot-text-field .${inputRootClassName} {
6179
6180
  height: 56px;
6180
6181
  padding-left: ${theme.spacing(2)};
@@ -6211,12 +6212,12 @@ const StyledAutocomplete = styled(Autocomplete)`
6211
6212
  `}
6212
6213
  `;
6213
6214
 
6214
- const rootClassName$S = 'dot-chip';
6215
+ const rootClassName$U = 'dot-chip';
6215
6216
  const StyledChip = styled(Chip)`
6216
6217
  ${({
6217
6218
  theme
6218
6219
  }) => css`
6219
- &.${rootClassName$S} {
6220
+ &.${rootClassName$U} {
6220
6221
  background: ${theme.palette.figma.neutral.normal};
6221
6222
  border-color: ${theme.palette.figma.border.darker};
6222
6223
  color: ${theme.palette.figma.typography.black};
@@ -6322,7 +6323,7 @@ const DotChip = ({
6322
6323
  charactersLimit = DEFAULT_CHARACTERS_LIMIT,
6323
6324
  children,
6324
6325
  className,
6325
- 'data-pendoid': dataPendoId = rootClassName$S,
6326
+ 'data-pendoid': dataPendoId = rootClassName$U,
6326
6327
  'data-testid': dataTestId,
6327
6328
  disabled = false,
6328
6329
  error = false,
@@ -6335,7 +6336,7 @@ const DotChip = ({
6335
6336
  tabIndex
6336
6337
  }) => {
6337
6338
  const errorClass = error ? 'Mui-error' : '';
6338
- const rootClasses = useStylesWithRootClass(rootClassName$S, className, errorClass);
6339
+ const rootClasses = useStylesWithRootClass(rootClassName$U, className, errorClass);
6339
6340
  const getChipLabel = () => {
6340
6341
  if (charactersLimit <= 0 || children.length < charactersLimit) return children;
6341
6342
  const label = `${children.substring(0, charactersLimit)}...`;
@@ -6435,7 +6436,7 @@ const DotAutoComplete = ({
6435
6436
  autoFocus,
6436
6437
  autoHighlight,
6437
6438
  className,
6438
- 'data-pendoid': dataPendoId = rootClassName$T,
6439
+ 'data-pendoid': dataPendoId = rootClassName$V,
6439
6440
  'data-testid': dataTestId,
6440
6441
  defaultValue,
6441
6442
  dense = true,
@@ -6487,10 +6488,10 @@ const DotAutoComplete = ({
6487
6488
  const popperOpen = !readOnly && (open || isOpened);
6488
6489
  const preventDuplicateInsertion = actionItem === null || actionItem === void 0 ? void 0 : actionItem.preventDuplicateInsertion;
6489
6490
  const textFieldWarningClassName = !error && warning && warningClassName;
6490
- const rootClasses = useStylesWithRootClass(rootClassName$T, size === 'medium' && inputMediumClassName, className);
6491
- const textFieldRootClasses = useStylesWithRootClass(rootClassName$1e, readOnly && readOnlyClassName$1, textFieldWarningClassName);
6491
+ const rootClasses = useStylesWithRootClass(rootClassName$V, size === 'medium' && inputMediumClassName, className);
6492
+ const textFieldRootClasses = useStylesWithRootClass(rootClassName$1g, readOnly && readOnlyClassName$1, textFieldWarningClassName);
6492
6493
  const inputRootClasses = useStylesWithRootClass(inputRootClassName, !dense && inputMediumClassName);
6493
- const popperClasses = useStylesWithRootClass(rootClassName$16, popperClassName);
6494
+ const popperClasses = useStylesWithRootClass(rootClassName$18, popperClassName);
6494
6495
  let highlightedOption = null;
6495
6496
  let textFieldInput;
6496
6497
  const textFieldRef = element => {
@@ -6767,10 +6768,10 @@ const DotAutoComplete = ({
6767
6768
  });
6768
6769
  };
6769
6770
 
6770
- const rootClassName$R = 'dot-avatar-group';
6771
+ const rootClassName$T = 'dot-avatar-group';
6771
6772
  const StyledAvatarGroup = styled(AvatarGroup)`
6772
6773
  ${() => css`
6773
- &.${rootClassName$R} {
6774
+ &.${rootClassName$T} {
6774
6775
  justify-content: flex-end;
6775
6776
 
6776
6777
  .MuiAvatar-root {
@@ -6789,7 +6790,7 @@ const DotAvatarGroup = ({
6789
6790
  max = 3,
6790
6791
  spacing = 'medium'
6791
6792
  }) => {
6792
- const rootClasses = useStylesWithRootClass(rootClassName$R, className);
6793
+ const rootClasses = useStylesWithRootClass(rootClassName$T, className);
6793
6794
  return jsx(StyledAvatarGroup, {
6794
6795
  "aria-label": ariaLabel,
6795
6796
  classes: {
@@ -6804,13 +6805,13 @@ const DotAvatarGroup = ({
6804
6805
  });
6805
6806
  };
6806
6807
 
6807
- const rootClassName$Q = 'dot-breadcrumbs';
6808
+ const rootClassName$S = 'dot-breadcrumbs';
6808
6809
  const breadcrumbsWrapperClass = 'dot-breadcrumbs-wrapper';
6809
6810
  const StyledBreadcrumbsWrapper = styled.div`
6810
6811
  ${({
6811
6812
  theme
6812
6813
  }) => css`
6813
- &.${rootClassName$Q} {
6814
+ &.${rootClassName$S} {
6814
6815
  overflow: hidden;
6815
6816
 
6816
6817
  .dot-breadcrumbs-menu {
@@ -6830,7 +6831,7 @@ const StyledBreadcrumbs = styled(Breadcrumbs)`
6830
6831
  ${({
6831
6832
  theme
6832
6833
  }) => css`
6833
- &.${rootClassName$Q} {
6834
+ &.${rootClassName$S} {
6834
6835
  margin-bottom: 0;
6835
6836
 
6836
6837
  .MuiBreadcrumbs-ol {
@@ -7158,7 +7159,7 @@ const DotBreadcrumbs = ({
7158
7159
  children: [jsx(StyledBreadcrumbs, {
7159
7160
  "aria-label": "breadcrumb",
7160
7161
  classes: {
7161
- root: rootClassName$Q,
7162
+ root: rootClassName$S,
7162
7163
  ol: 'dot-ol',
7163
7164
  li: 'dot-li'
7164
7165
  },
@@ -7189,14 +7190,14 @@ const DotBreadcrumbs = ({
7189
7190
  });
7190
7191
  };
7191
7192
 
7192
- const rootClassName$P = 'dot-button-toggle';
7193
+ const rootClassName$R = 'dot-button-toggle';
7193
7194
  // TODO: need to update ripple color
7194
7195
  // https://github.com/mui/material-ui/issues/28543
7195
7196
  const StyledToggleButtonGroup = styled(ToggleButtonGroup)`
7196
7197
  ${({
7197
7198
  theme
7198
7199
  }) => css`
7199
- &.${rootClassName$P} {
7200
+ &.${rootClassName$R} {
7200
7201
  button:not(.MuiToggleButton-sizeLarge):not(.MuiToggleButton-sizeSmall) {
7201
7202
  /* Override height for medium size */
7202
7203
  height: ${theme.spacing(5)};
@@ -7312,7 +7313,7 @@ const DotButtonToggle = ({
7312
7313
  buttonOptions,
7313
7314
  className,
7314
7315
  color,
7315
- 'data-pendoid': dataPendoId = rootClassName$P,
7316
+ 'data-pendoid': dataPendoId = rootClassName$R,
7316
7317
  'data-testid': dataTestId = 'dot-toggle',
7317
7318
  disableFocusRipple = false,
7318
7319
  disableRipple = false,
@@ -7322,7 +7323,7 @@ const DotButtonToggle = ({
7322
7323
  size = 'medium',
7323
7324
  value
7324
7325
  }) => {
7325
- const rootClasses = useStylesWithRootClass(rootClassName$P, className);
7326
+ const rootClasses = useStylesWithRootClass(rootClassName$R, className);
7326
7327
  const renderToggleButton = ({
7327
7328
  ariaLabel: optionAriaLabel,
7328
7329
  badgeContent: optionBadgeContent,
@@ -7405,12 +7406,12 @@ const TooltipToggleButton = forwardRef((_a, ref) => {
7405
7406
  }));
7406
7407
  });
7407
7408
 
7408
- const rootClassName$O = 'dot-card';
7409
+ const rootClassName$Q = 'dot-card';
7409
7410
  const StyledCard = styled(Card)`
7410
7411
  ${({
7411
7412
  theme
7412
7413
  }) => css`
7413
- &.${rootClassName$O} {
7414
+ &.${rootClassName$Q} {
7414
7415
  background-color: ${theme.palette.figma.background.level1.white};
7415
7416
  }
7416
7417
  `}
@@ -7422,7 +7423,7 @@ const DotCard = ({
7422
7423
  className,
7423
7424
  'data-testid': dataTestId
7424
7425
  }) => {
7425
- const rootClasses = useStylesWithRootClass(rootClassName$O, className);
7426
+ const rootClasses = useStylesWithRootClass(rootClassName$Q, className);
7426
7427
  return jsx(StyledCard, {
7427
7428
  "aria-label": ariaLabel,
7428
7429
  classes: {
@@ -7451,12 +7452,12 @@ const DotCardContent = ({
7451
7452
  });
7452
7453
  };
7453
7454
 
7454
- const rootClassName$N = 'dot-card-footer';
7455
+ const rootClassName$P = 'dot-card-footer';
7455
7456
  const StyledDiv = styled.div`
7456
7457
  ${({
7457
7458
  theme
7458
7459
  }) => css`
7459
- &.${rootClassName$N} {
7460
+ &.${rootClassName$P} {
7460
7461
  padding: ${theme.spacing(2)};
7461
7462
  }
7462
7463
  `}
@@ -7468,7 +7469,7 @@ const DotCardFooter = ({
7468
7469
  className,
7469
7470
  'data-testid': dataTestId
7470
7471
  }) => {
7471
- const rootClasses = useStylesWithRootClass(rootClassName$N, className);
7472
+ const rootClasses = useStylesWithRootClass(rootClassName$P, className);
7472
7473
  return jsx(StyledDiv, {
7473
7474
  "aria-label": ariaLabel,
7474
7475
  className: rootClasses,
@@ -7512,9 +7513,9 @@ const DotCardHeader = ({
7512
7513
  });
7513
7514
  };
7514
7515
 
7515
- const rootClassName$M = 'dot-form-control-label';
7516
+ const rootClassName$O = 'dot-form-control-label';
7516
7517
  const StyledFormControlLabel = styled(FormControlLabel)`
7517
- &.${rootClassName$M} {
7518
+ &.${rootClassName$O} {
7518
7519
  .MuiFormControlLabel-label {
7519
7520
  margin-bottom: 0;
7520
7521
  padding: 0 0 0 4px;
@@ -7537,12 +7538,12 @@ const StyledFormControlLabel = styled(FormControlLabel)`
7537
7538
  }
7538
7539
  `;
7539
7540
 
7540
- const rootClassName$L = 'dot-checkbox';
7541
+ const rootClassName$N = 'dot-checkbox';
7541
7542
  const StyledCheckbox = styled(Checkbox)`
7542
7543
  ${({
7543
7544
  theme
7544
7545
  }) => css`
7545
- &.${rootClassName$L} {
7546
+ &.${rootClassName$N} {
7546
7547
  padding: ${theme.spacing(1)};
7547
7548
 
7548
7549
  &.MuiCheckbox-indeterminate {
@@ -7561,7 +7562,7 @@ function DotCheckbox({
7561
7562
  ariaLabelledby,
7562
7563
  checked,
7563
7564
  className,
7564
- 'data-pendoid': dataPendoId = rootClassName$M,
7565
+ 'data-pendoid': dataPendoId = rootClassName$O,
7565
7566
  'data-testid': dataTestId,
7566
7567
  disabled,
7567
7568
  disableRipple,
@@ -7576,14 +7577,14 @@ function DotCheckbox({
7576
7577
  size = 'medium',
7577
7578
  value
7578
7579
  }) {
7579
- const rootClasses = useStylesWithRootClass(rootClassName$M, className);
7580
+ const rootClasses = useStylesWithRootClass(rootClassName$O, className);
7580
7581
  const handleChange = event => {
7581
7582
  onChange && onChange(event, event.target.value);
7582
7583
  };
7583
7584
  const checkboxControl = jsx(StyledCheckbox, {
7584
7585
  checked: checked,
7585
7586
  classes: {
7586
- root: rootClassName$L
7587
+ root: rootClassName$N
7587
7588
  },
7588
7589
  color: "primary",
7589
7590
  "data-pendoid": dataPendoId,
@@ -7612,13 +7613,13 @@ function DotCheckbox({
7612
7613
  });
7613
7614
  }
7614
7615
 
7615
- const rootClassName$K = 'dot-form-group';
7616
+ const rootClassName$M = 'dot-form-group';
7616
7617
  const groupLabelClassName = 'dot-form-group-label';
7617
7618
  const startAdornmentClassName = 'dot-start-adornment';
7618
7619
  const endAdornmentClassName = 'dot-end-adornment';
7619
7620
  const placementClassName = 'dot-';
7620
7621
  const StyledFormControl = styled(FormControl)`
7621
- &.${rootClassName$K} {
7622
+ &.${rootClassName$M} {
7622
7623
  .MuiFormLabel-root {
7623
7624
  width: 100%;
7624
7625
  line-height: 24px;
@@ -7649,7 +7650,7 @@ const StyledFormControl = styled(FormControl)`
7649
7650
  }
7650
7651
  `;
7651
7652
 
7652
- const rootClassName$J = 'dot-checkbox-group';
7653
+ const rootClassName$L = 'dot-checkbox-group';
7653
7654
  const wrapperClassName$1 = 'dot-checkbox-group-wrapper';
7654
7655
  const checkboxListClassName = 'dot-checkbox-list';
7655
7656
  const checkboxListItemClassName = 'dot-checkbox-list-item';
@@ -7658,7 +7659,7 @@ const StyledCheckboxGroup = styled.div`
7658
7659
  theme
7659
7660
  }) => css`{
7660
7661
  &.${wrapperClassName$1} {
7661
- .${rootClassName$J} {
7662
+ .${rootClassName$L} {
7662
7663
  width: 100%;
7663
7664
  }
7664
7665
 
@@ -7685,7 +7686,7 @@ const StyledCheckboxGroup = styled.div`
7685
7686
  margin-top: 0;
7686
7687
  padding-left: ${theme.spacing(2.5)};
7687
7688
 
7688
- .${rootClassName$M} {
7689
+ .${rootClassName$O} {
7689
7690
  margin: 0;
7690
7691
  }
7691
7692
  }
@@ -7693,13 +7694,13 @@ const StyledCheckboxGroup = styled.div`
7693
7694
  `}
7694
7695
  `;
7695
7696
 
7696
- const rootClassName$I = 'dot-form-group';
7697
+ const rootClassName$K = 'dot-form-group';
7697
7698
  const StyledFormGroup = styled(FormGroup)`
7698
7699
  ${({
7699
7700
  theme,
7700
7701
  row
7701
7702
  }) => css`
7702
- &.${rootClassName$I} > * {
7703
+ &.${rootClassName$K} > * {
7703
7704
  margin: ${row ? `${theme.spacing(0.5)}` : 0};
7704
7705
  }
7705
7706
  `}
@@ -7712,7 +7713,7 @@ function DotFormGroup({
7712
7713
  'data-testid': dataTestId,
7713
7714
  row
7714
7715
  }) {
7715
- const rootClasses = useStylesWithRootClass(rootClassName$K, className);
7716
+ const rootClasses = useStylesWithRootClass(rootClassName$M, className);
7716
7717
  return jsx(StyledFormGroup, {
7717
7718
  "aria-label": ariaLabel,
7718
7719
  classes: {
@@ -7751,7 +7752,7 @@ function DotCheckboxGroup({
7751
7752
  size = 'medium'
7752
7753
  }) {
7753
7754
  const placement = `${placementClassName}${labelPlacement}`;
7754
- const rootClasses = useStylesWithRootClass(rootClassName$K, rootClassName$J, className, placement);
7755
+ const rootClasses = useStylesWithRootClass(rootClassName$M, rootClassName$L, className, placement);
7755
7756
  const [selectedOptions, setSelectedOptions] = useState(defaultValues);
7756
7757
  const [allChecked, setAllChecked] = useState(false);
7757
7758
  /* This will ensure that state can be updated from the outside */
@@ -7836,12 +7837,99 @@ function DotCheckboxGroup({
7836
7837
  });
7837
7838
  }
7838
7839
 
7839
- const rootClassName$H = 'dot-dialog';
7840
+ const rootClassName$J = 'chip-list';
7841
+ const StyledChipList = styled.div`
7842
+ ${({
7843
+ theme
7844
+ }) => css`
7845
+ &.${rootClassName$J} {
7846
+ display: flex;
7847
+ gap: ${theme.spacing(1)};
7848
+ }
7849
+ `}
7850
+ `;
7851
+
7852
+ const formatListForTooltip = words => {
7853
+ const elements = [];
7854
+ if (words.length > 1) {
7855
+ words.forEach(word => {
7856
+ elements.push(jsx("div", {
7857
+ children: word
7858
+ }));
7859
+ });
7860
+ return jsx("div", {
7861
+ children: elements
7862
+ });
7863
+ }
7864
+ return '';
7865
+ };
7866
+ function DotChipList({
7867
+ dataTestId,
7868
+ items,
7869
+ maxChars = -1,
7870
+ size = 'small',
7871
+ style = {}
7872
+ }) {
7873
+ const [chips, setChips] = useState([]);
7874
+ useEffect(() => {
7875
+ const extraItems = [];
7876
+ let itemElements = [];
7877
+ if (items && maxChars > 0) {
7878
+ let chars = 0;
7879
+ for (let i = 0; i < items.length; i++) {
7880
+ const item = items[i];
7881
+ const label = item.label;
7882
+ if (chars + label.length <= maxChars && extraItems.length === 0) {
7883
+ chars += label.length;
7884
+ itemElements.push(jsx(DotChip, {
7885
+ size: size,
7886
+ children: label
7887
+ }, item.key));
7888
+ } else if (i === 0) {
7889
+ // With first item, truncate if item is too long rather than pushing to extraItems.
7890
+ const truncatedItem = label.substring(0, maxChars - 3) + '...';
7891
+ chars = truncatedItem.length;
7892
+ itemElements.push(jsx(DotTooltip, {
7893
+ title: label,
7894
+ children: jsx(DotChip, {
7895
+ size: size,
7896
+ children: truncatedItem
7897
+ }, item.key)
7898
+ }, item.key));
7899
+ } else {
7900
+ extraItems.push(label);
7901
+ }
7902
+ }
7903
+ if (extraItems.length > 0) {
7904
+ itemElements.push(jsx(DotTooltip, {
7905
+ title: formatListForTooltip(items === null || items === void 0 ? void 0 : items.map(item => item.label)),
7906
+ children: jsxs(DotTypography, {
7907
+ children: ["+", extraItems.length]
7908
+ })
7909
+ }));
7910
+ }
7911
+ } else {
7912
+ itemElements = items === null || items === void 0 ? void 0 : items.map(item => jsx(DotChip, {
7913
+ size: size,
7914
+ children: item.label
7915
+ }, item.key));
7916
+ }
7917
+ setChips(itemElements);
7918
+ }, [items, maxChars]);
7919
+ return jsx(StyledChipList, {
7920
+ className: rootClassName$J,
7921
+ "data-testid": dataTestId,
7922
+ style: style,
7923
+ children: chips
7924
+ });
7925
+ }
7926
+
7927
+ const rootClassName$I = 'dot-dialog';
7840
7928
  const StyledDialog = styled(Dialog)`
7841
7929
  ${({
7842
7930
  theme
7843
7931
  }) => css`
7844
- &.${rootClassName$H} {
7932
+ &.${rootClassName$I} {
7845
7933
  .MuiDialog-paper {
7846
7934
  background: ${theme.palette.figma.background.level1.white};
7847
7935
  color: ${theme.palette.figma.typography.black};
@@ -7887,7 +7975,7 @@ const DotDialog = ({
7887
7975
  cancelButtonProps,
7888
7976
  cancelButtonVisible = true,
7889
7977
  className,
7890
- 'data-pendoid': dataPendoId = rootClassName$H,
7978
+ 'data-pendoid': dataPendoId = rootClassName$I,
7891
7979
  'data-testid': dataTestId,
7892
7980
  children,
7893
7981
  closeIconVisible,
@@ -7900,7 +7988,7 @@ const DotDialog = ({
7900
7988
  submitButtonProps,
7901
7989
  title
7902
7990
  }) => {
7903
- const rootClasses = useStylesWithRootClass(rootClassName$H, className);
7991
+ const rootClasses = useStylesWithRootClass(rootClassName$I, className);
7904
7992
  const cancelClasses = useStylesWithRootClass(cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.className, 'cancel-button');
7905
7993
  const [isOpen, setIsOpen] = useState(open);
7906
7994
  useEffect(() => {
@@ -8018,7 +8106,7 @@ const DotConfirmationDialog = ({
8018
8106
  });
8019
8107
  };
8020
8108
 
8021
- const rootClassName$G = 'dot-grid';
8109
+ const rootClassName$H = 'dot-grid';
8022
8110
  const frGetter = value => typeof value === 'number' ? `repeat(${value}, 1fr)` : value;
8023
8111
  const breakpointsGetter$1 = (theme, columnsBreakpoints, columnGap, rowGap) => `${theme.breakpoints.up('xs')} {
8024
8112
  column-gap: ${`${columnGap.xs}px`};
@@ -8070,7 +8158,7 @@ const Grid = ({
8070
8158
  className,
8071
8159
  children
8072
8160
  }) => {
8073
- const rootClasses = useStylesWithRootClass(rootClassName$G, className);
8161
+ const rootClasses = useStylesWithRootClass(rootClassName$H, className);
8074
8162
  return jsx("div", {
8075
8163
  className: rootClasses,
8076
8164
  children: children
@@ -8089,7 +8177,7 @@ const StyledGrid = styled(Grid)`
8089
8177
  theme,
8090
8178
  width
8091
8179
  }) => css`
8092
- &.${rootClassName$G} {
8180
+ &.${rootClassName$H} {
8093
8181
  display: grid;
8094
8182
  grid-template-rows: ${frGetter(rows)};
8095
8183
  ${columns ? `${columns && `grid-template-columns: ${frGetter(columns)}`};` : breakpointsGetter$1(theme, columnsBreakpoints, columnGap, rowGap)}
@@ -8295,114 +8383,151 @@ const CssGridDebug = ({
8295
8383
  });
8296
8384
  };
8297
8385
 
8298
- const DotInputSelect = ({
8386
+ const rootClassName$G = 'dot-pill';
8387
+ const StyledPill = styled(Chip)`
8388
+ ${({
8389
+ theme
8390
+ }) => css`
8391
+ &.${rootClassName$G} {
8392
+ background-color: ${({
8393
+ backgroundcolor,
8394
+ variant
8395
+ }) => {
8396
+ const defaultBackground = variant === 'filled' ? theme.palette.grey[200] : theme.palette.grey[50];
8397
+ return backgroundcolor !== null && backgroundcolor !== void 0 ? backgroundcolor : defaultBackground;
8398
+ }};
8399
+ border-color: ${({
8400
+ bordercolor
8401
+ }) => {
8402
+ return bordercolor ? bordercolor : theme.palette.grey[200];
8403
+ }};
8404
+ color: ${({
8405
+ labelcolor
8406
+ }) => {
8407
+ return labelcolor ? labelcolor : theme.palette.layer.n700;
8408
+ }};
8409
+ .dot-icon {
8410
+ color: ${({
8411
+ labelcolor
8412
+ }) => {
8413
+ return labelcolor ? labelcolor : theme.palette.grey.main;
8414
+ }};
8415
+ margin: ${theme.spacing(0, -0.5, 0, 1)};
8416
+ }
8417
+
8418
+ &.MuiChip-sizeSmall .dot-icon {
8419
+ margin-left: 5px;
8420
+ }
8421
+
8422
+ &.MuiChip-outlined {
8423
+ &.error {
8424
+ background-color: ${theme.palette.error[50]};
8425
+ border-color: ${theme.palette.error.main};
8426
+ color: ${theme.palette.layer.n700};
8427
+ .dot-icon {
8428
+ color: ${theme.palette.error.main};
8429
+ }
8430
+ }
8431
+
8432
+ &.success {
8433
+ background-color: ${theme.palette.figma.success.light};
8434
+ border-color: ${theme.palette.figma.success.normal};
8435
+ color: ${theme.palette.layer.n700};
8436
+ .dot-icon {
8437
+ color: ${theme.palette.success.main};
8438
+ }
8439
+ }
8440
+
8441
+ &.warning {
8442
+ background-color: ${theme.palette.figma.warning.light};
8443
+ border-color: ${theme.palette.figma.warning.normal};
8444
+ color: ${theme.palette.layer.n700};
8445
+ .dot-icon {
8446
+ color: ${theme.palette.warning.main};
8447
+ }
8448
+ }
8449
+
8450
+ &.in-progress {
8451
+ background-color: ${theme.palette.figma.primary.light};
8452
+ border-color: ${theme.palette.figma.primary.normal};
8453
+ color: ${theme.palette.layer.n700};
8454
+ .dot-icon {
8455
+ color: ${theme.palette.primary.main};
8456
+ }
8457
+ }
8458
+ }
8459
+
8460
+ &.MuiChip-filled {
8461
+ &.error {
8462
+ background-color: ${theme.palette.error.main};
8463
+ border-color: ${theme.palette.error.main};
8464
+ color: ${theme.palette.layer.n0};
8465
+ .dot-icon {
8466
+ color: ${theme.palette.layer.n0};
8467
+ }
8468
+ }
8469
+
8470
+ &.success {
8471
+ background-color: ${theme.palette.success.main};
8472
+ border-color: ${theme.palette.success.main};
8473
+ color: ${theme.palette.layer.n0};
8474
+ .dot-icon {
8475
+ color: ${theme.palette.layer.n0};
8476
+ }
8477
+ }
8478
+
8479
+ &.warning {
8480
+ background-color: ${theme.palette.warning.main};
8481
+ border-color: ${theme.palette.warning.main};
8482
+ color: ${theme.palette.layer.n700};
8483
+ .dot-icon {
8484
+ color: ${theme.palette.layer.n700};
8485
+ }
8486
+ }
8487
+
8488
+ &.in-progress {
8489
+ background-color: ${theme.palette.primary.main};
8490
+ border-color: ${theme.palette.primary.main};
8491
+ color: ${theme.palette.layer.n0};
8492
+ .dot-icon {
8493
+ color: ${theme.palette.layer.n0};
8494
+ }
8495
+ }
8496
+ }
8497
+ }
8498
+ `}
8499
+ `;
8500
+
8501
+ const DotPill = ({
8299
8502
  ariaLabel,
8300
- autoFocus,
8503
+ backgroundcolor,
8504
+ bordercolor,
8301
8505
  className,
8302
- 'data-pendoid': dataPendoId = rootSelectClassName,
8303
8506
  'data-testid': dataTestId,
8304
- defaultValue,
8305
- disabled = false,
8306
- endIcon,
8307
- endText,
8308
- error = false,
8309
- fullWidth = true,
8310
- helperText,
8311
- id,
8312
- inputRef,
8507
+ icon,
8313
8508
  label,
8314
- name,
8315
- onBlur,
8316
- onChange,
8317
- onFocus,
8318
- onKeyDown,
8319
- options = [],
8320
- persistentLabel,
8321
- readOnly = false,
8322
- required,
8323
- shrink,
8324
- size = 'small',
8325
- startIcon,
8326
- success,
8327
- value,
8328
- warning = false
8509
+ labelcolor,
8510
+ onClick,
8511
+ size = 'medium',
8512
+ status = 'default',
8513
+ variant = 'filled'
8329
8514
  }) => {
8330
- const hasWarning = !error && warning && warningClassName;
8331
- const hasSuccess = !error && !warning && success && successClassName;
8332
- const endAdornment = endIcon || endText;
8333
- const inputStyles = useStylesWithRootClass('dot-select', readOnly && readOnlyClassName$1);
8334
- const rootStyles = useStylesWithRootClass(rootSelectClassName, hasSuccess, hasWarning);
8335
- const getOption = option => {
8336
- return typeof option === 'string' ? option : option.option;
8337
- };
8338
- const getValue = option => {
8339
- return typeof option === 'string' ? option : (option === null || option === void 0 ? void 0 : option.value) || option.option;
8340
- };
8341
- return jsxs("div", {
8342
- className: className,
8343
- children: [persistentLabel && jsx(DotInputLabel, {
8344
- disabled,
8345
- error,
8346
- id,
8347
- label,
8348
- required
8349
- }), jsx(StyledTextField, {
8350
- InputProps: {
8351
- startAdornment: startIcon && jsx(StyledAdornment, {
8352
- className: `${adornmentIconClassName} start`,
8353
- position: "start",
8354
- children: startIcon
8355
- }),
8356
- endAdornment: endAdornment && jsx(StyledAdornment, {
8357
- className: `${adornmentIconClassName} end`,
8358
- position: "end",
8359
- children: endAdornment
8360
- })
8361
- },
8362
- SelectProps: {
8363
- native: !readOnly,
8364
- readOnly,
8365
- open: readOnly ? false : undefined
8366
- },
8367
- "aria-label": ariaLabel || label,
8368
- autoFocus: autoFocus,
8369
- className: rootStyles,
8370
- defaultValue: defaultValue,
8371
- disabled: disabled,
8372
- error: error,
8373
- fullWidth: fullWidth,
8374
- helperText: helperText,
8375
- id: id,
8376
- InputLabelProps: {
8377
- shrink: shrink
8378
- },
8379
- inputProps: {
8380
- 'aria-label': ariaLabel,
8381
- 'data-pendoid': dataPendoId,
8382
- 'data-testid': dataTestId,
8383
- className: inputStyles,
8384
- readOnly
8385
- },
8386
- inputRef: inputRef,
8387
- label: persistentLabel ? null : label,
8388
- multiline: false,
8389
- name: name,
8390
- onBlur: onBlur,
8391
- onChange: onChange,
8392
- onFocus: onFocus,
8393
- onKeyDown: onKeyDown,
8394
- required: required,
8395
- role: "textbox",
8396
- select: true,
8397
- size: size,
8398
- value: value,
8399
- variant: "outlined",
8400
- children: options.map(option => jsx("option", {
8401
- className: "dot-option",
8402
- value: getValue(option),
8403
- children: getOption(option)
8404
- }, getValue(option)))
8405
- })]
8515
+ const rootClasses = useStylesWithRootClass(rootClassName$G, className, status);
8516
+ return jsx(StyledPill, {
8517
+ "aria-label": ariaLabel,
8518
+ bordercolor: bordercolor,
8519
+ backgroundcolor: backgroundcolor,
8520
+ classes: {
8521
+ root: rootClasses
8522
+ },
8523
+ clickable: !!onClick,
8524
+ "data-testid": dataTestId,
8525
+ icon: icon,
8526
+ label: label,
8527
+ labelcolor: labelcolor,
8528
+ onClick: onClick,
8529
+ size: size,
8530
+ variant: variant
8406
8531
  });
8407
8532
  };
8408
8533
 
@@ -9120,6 +9245,26 @@ class HelpContentService {
9120
9245
  }
9121
9246
  }
9122
9247
 
9248
+ function DotDashboardStatusPill({
9249
+ status
9250
+ }) {
9251
+ if (status === DashboardView.lifecycle_state.DRAFT) {
9252
+ return jsx(DotPill, {
9253
+ label: "Draft",
9254
+ size: "small",
9255
+ variant: "outlined",
9256
+ status: "in-progress"
9257
+ });
9258
+ } else {
9259
+ return jsx(DotPill, {
9260
+ status: "success",
9261
+ label: "Published",
9262
+ size: "small",
9263
+ variant: "outlined"
9264
+ });
9265
+ }
9266
+ }
9267
+
9123
9268
  const helpContent = {
9124
9269
  id: 'test-help-content-1',
9125
9270
  content: '<html><h1>Test</h1></html>'
@@ -9142,7 +9287,9 @@ const helpContent = {
9142
9287
  bi_type: DashboardView.bi_type.SUPERSET,
9143
9288
  is_ootb_dashboard: false,
9144
9289
  thumbnail: '',
9145
- external_object: {},
9290
+ external_object: {
9291
+ page_count: 3
9292
+ },
9146
9293
  embed_config: {},
9147
9294
  help_content_id: helpContent.id,
9148
9295
  filter_configuration: [],
@@ -9298,17 +9445,19 @@ const DotMetadataApiProvider = ({
9298
9445
  const [dashboards, setDashboards] = useState();
9299
9446
  const [dashboardsLoading, setDashboardsLoading] = useState(true);
9300
9447
  const [helpContentLoading, setHelpContentLoading] = useState(true);
9448
+ const [openedDashboardDetails, setOpenedDashboardDetails] = useState(null);
9301
9449
  const [dashboardsError, setDashboardsError] = useState(null);
9302
9450
  const [platformConsoleUrl, setPlatformConsoleUrl] = useState(null);
9303
9451
  const MOCK_API_URL = 'https://demo-mock-api';
9304
9452
  const memoizedValues = useMemo(() => ({
9305
9453
  categories,
9306
9454
  categoriesLoading,
9307
- dashboards,
9308
9455
  dashboardsError,
9309
9456
  dashboardsLoading,
9310
9457
  helpContentLoading,
9458
+ openedDashboardDetails,
9311
9459
  platformConsoleUrl,
9460
+ setOpenedDashboardDetails,
9312
9461
  setOverrideAccountId: id => {
9313
9462
  setAccountId(id);
9314
9463
  },
@@ -9435,7 +9584,7 @@ const DotMetadataApiProvider = ({
9435
9584
  });
9436
9585
  }
9437
9586
  })
9438
- }), [categories, categoriesLoading, dashboards, dashboardsError, dashboardsLoading, platformConsoleUrl]);
9587
+ }), [categories, categoriesLoading, dashboardsError, dashboardsLoading, openedDashboardDetails, platformConsoleUrl]);
9439
9588
  if (apiUrl && OpenAPI.BASE !== apiUrl) {
9440
9589
  OpenAPI.BASE = apiUrl;
9441
9590
  }
@@ -9455,73 +9604,728 @@ const useDotMetadataApiContext = () => {
9455
9604
  return useContext(DotMetadataApiContext);
9456
9605
  };
9457
9606
 
9458
- const StyledDashboardDialog = styled(DotDialog)`
9607
+ const getSnackbarTitleFromSeverity = severity => {
9608
+ switch (severity) {
9609
+ case 'success':
9610
+ return 'Success';
9611
+ case 'warning':
9612
+ return 'Warning';
9613
+ case 'error':
9614
+ return 'Error';
9615
+ case 'info':
9616
+ return 'Info';
9617
+ default:
9618
+ return 'Success';
9619
+ }
9620
+ };
9621
+ function getErrorText(error) {
9622
+ var _a, _b;
9623
+ if ('status' in error && error.status === 304) {
9624
+ return 'No changes made';
9625
+ } else if ('body' in error) {
9626
+ return ((_b = (_a = error.body) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) ? error.body.error.message : 'Unexpected API error';
9627
+ } else if ('message' in error) {
9628
+ return error.message;
9629
+ }
9630
+ return 'Unexpected API error';
9631
+ }
9632
+
9633
+ function addAutoHideDuration(severity) {
9634
+ return severity === 'error' ? null : 10000;
9635
+ }
9636
+
9637
+ const rootClassName$F = 'dot-snackbar';
9638
+ const StyledSnackbar = styled(Snackbar)`
9459
9639
  ${({
9460
- theme
9640
+ theme,
9641
+ width,
9642
+ $anchorOriginTop
9461
9643
  }) => css`
9462
- .dot-text-field {
9463
- margin-bottom: ${theme.spacing(2)};
9464
- width: 40vw;
9465
- }
9466
- .dot-autocomplete {
9467
- margin-top: ${theme.spacing(1.5)};
9468
- }
9469
- .dot-input-select {
9470
- margin-bottom: ${theme.spacing(2)};
9644
+ &.${rootClassName$F} {
9645
+ .MuiAlert-message {
9646
+ word-break: break-word;
9647
+ }
9648
+ .${rootClassName$1e} {
9649
+ align-items: flex-start;
9650
+ }
9651
+ &.MuiSnackbar-anchorOriginTopLeft,
9652
+ &.MuiSnackbar-anchorOriginTopCenter,
9653
+ &.MuiSnackbar-anchorOriginTopRight {
9654
+ top: ${$anchorOriginTop}px;
9655
+ z-index: ${levelFourth};
9656
+ }
9657
+
9658
+ .dot-snackbar-actions {
9659
+ display: flex;
9660
+ align-items: center;
9661
+ margin-top: ${theme.spacing(1)};
9662
+ gap: ${theme.spacing(2)};
9663
+
9664
+ .primary-action-btn {
9665
+ background-color: transparent;
9666
+ }
9667
+ }
9668
+
9669
+ .MuiAlert-root {
9670
+ max-width: ${width ? 'unset' : '500px'};
9671
+ min-width: ${width ? 'unset' : '344px'};
9672
+ z-index: ${levelFourth};
9673
+ }
9471
9674
  }
9472
9675
  `}
9473
9676
  `;
9474
- const StyledDialogActions = styled(DialogActions)`
9475
- padding-right: 0;
9476
- `;
9477
9677
 
9478
- const DashboardAppTypeOptions = [
9479
- // Matches target_app values in Dashboard model
9480
- {
9481
- option: 'Agility',
9482
- value: 'AGILITY'
9483
- }, {
9484
- option: 'Release',
9485
- value: 'RELEASE'
9486
- }, {
9487
- option: 'Deploy',
9488
- value: 'DEPLOY'
9489
- }, {
9490
- option: 'Continuous Testing',
9491
- value: 'CONTINUOUSTEST'
9492
- }, {
9493
- option: 'TeamForge',
9494
- value: 'TEAMFORGE'
9495
- }];
9496
- const initialFormState = {
9497
- categories: [],
9498
- description: '',
9499
- name: ''
9678
+ const DEFAULT_ANCHOR_ORIGIN = {
9679
+ vertical: 'top',
9680
+ horizontal: 'right'
9500
9681
  };
9501
- const DASHBOARD_NAME_MAX_LENGTH = 250;
9502
- const DASHBOARD_DESCRIPTION_MAX_LENGTH = 250;
9503
- function DotDashboardDialog({
9504
- availableCategories,
9505
- copyDashboard,
9506
- editDashboard,
9507
- open,
9682
+ const DotSnackbar = ({
9683
+ anchorOrigin = DEFAULT_ANCHOR_ORIGIN,
9684
+ anchorOriginTop = 108,
9685
+ ariaLabel,
9686
+ autoHideDuration,
9687
+ children,
9688
+ className,
9689
+ 'data-testid': dataTestId,
9690
+ hideOnClickAway = true,
9508
9691
  onClose,
9509
- onSubmit,
9510
- onContinue,
9511
- title
9512
- }) {
9513
- const [isDirty, setIsDirty] = useState(false);
9514
- const [isLoadingSubmit, setIsLoadingSubmit] = useState(false);
9515
- const [nameError, setNameError] = useState(null);
9516
- const [formValues, setFormValues] = useState(initialFormState);
9517
- const {
9518
- categories,
9519
- description,
9520
- name
9521
- } = formValues;
9522
- const {
9523
- searchDashboards
9524
- } = useDotMetadataApiContext();
9692
+ open,
9693
+ primaryAction,
9694
+ secondaryAction,
9695
+ severity,
9696
+ width
9697
+ }) => {
9698
+ const hasActions = !!(primaryAction || secondaryAction);
9699
+ const calculatedAutoHideDuration = autoHideDuration === null || autoHideDuration > 0 ? autoHideDuration : addAutoHideDuration(severity);
9700
+ const rootClasses = useStylesWithRootClass(rootClassName$F, className);
9701
+ const handleSnackbarClose = reason => {
9702
+ if (!reason || hideOnClickAway || !hideOnClickAway && reason !== 'clickaway') {
9703
+ onClose();
9704
+ }
9705
+ };
9706
+ return jsx(StyledSnackbar, {
9707
+ anchorOrigin: anchorOrigin,
9708
+ "$anchorOriginTop": anchorOriginTop,
9709
+ "aria-label": ariaLabel,
9710
+ autoHideDuration: calculatedAutoHideDuration,
9711
+ classes: {
9712
+ root: rootClasses
9713
+ },
9714
+ "data-testid": dataTestId,
9715
+ onClose: (_e, r) => handleSnackbarClose(r),
9716
+ open: open,
9717
+ severity: severity,
9718
+ width: width,
9719
+ children: jsx("div", {
9720
+ children: jsx(DotAlertBanner, {
9721
+ severity: severity,
9722
+ width: width,
9723
+ onClose: _e => handleSnackbarClose(),
9724
+ children: jsxs("div", {
9725
+ children: [jsx(DotTypography, {
9726
+ variant: "subtitle2",
9727
+ noMarginBottom: false,
9728
+ children: getSnackbarTitleFromSeverity(severity)
9729
+ }), isString$2(children) ? jsx(DotTypography, {
9730
+ ariaLabel: severity,
9731
+ variant: "body1",
9732
+ children: children
9733
+ }) : jsx("span", {
9734
+ "aria-label": severity,
9735
+ children: children
9736
+ }), hasActions && jsxs("div", {
9737
+ className: "dot-snackbar-actions",
9738
+ children: [primaryAction && jsx(DotButton, {
9739
+ className: "primary-action-btn",
9740
+ "data-testid": "primary-action-btn",
9741
+ onClick: primaryAction.onClick,
9742
+ size: "small",
9743
+ type: "outlined",
9744
+ children: primaryAction.label
9745
+ }), secondaryAction && jsx(DotLink, {
9746
+ "data-testid": "secondary-action-link",
9747
+ href: secondaryAction.href,
9748
+ color: "inherit",
9749
+ children: secondaryAction.label
9750
+ })]
9751
+ })]
9752
+ })
9753
+ })
9754
+ })
9755
+ });
9756
+ };
9757
+
9758
+ const rootClassName$E = 'dot-snackbar-container';
9759
+ const StyledSnackbarContainer = styled.div`
9760
+ ${() => css`
9761
+ &.${rootClassName$E} {
9762
+ position: absolute;
9763
+ top: 0;
9764
+ width: 250px;
9765
+ height: auto;
9766
+ right: 0;
9767
+ & > div {
9768
+ position: relative;
9769
+ }
9770
+ }
9771
+ `}
9772
+ `;
9773
+
9774
+ const DotSnackbarContext = createContext({
9775
+ alerts: [],
9776
+ enqueueMessage: (_message, _severity, _autoHideDuration, _primaryAction, _secondaryAction) => null,
9777
+ removeMessage: _id => null
9778
+ });
9779
+ const DotSnackbarContainer = ({
9780
+ hideOnClickAway
9781
+ }) => {
9782
+ const {
9783
+ alerts,
9784
+ removeMessage
9785
+ } = useDotSnackbarContext();
9786
+ function handleClose(id) {
9787
+ return () => {
9788
+ removeMessage(id);
9789
+ };
9790
+ }
9791
+ return jsx(StyledSnackbarContainer, {
9792
+ className: rootClassName$E,
9793
+ children: jsx("div", {
9794
+ className: rootClassName$E,
9795
+ "data-testid": rootClassName$E,
9796
+ children: alerts.slice().reverse().map(alert => {
9797
+ return jsx(DotSnackbar, {
9798
+ autoHideDuration: alert.autoHideDuration,
9799
+ hideOnClickAway: hideOnClickAway,
9800
+ onClose: handleClose(alert.id),
9801
+ open: alert.open,
9802
+ severity: alert.severity,
9803
+ primaryAction: alert.primaryAction,
9804
+ secondaryAction: alert.secondaryAction,
9805
+ children: alert.message
9806
+ }, alert.id);
9807
+ })
9808
+ })
9809
+ });
9810
+ };
9811
+ const DotSnackbarProvider = ({
9812
+ children,
9813
+ hideOnClickAway = true
9814
+ }) => {
9815
+ const [alerts, setAlerts] = useState([]);
9816
+ function enqueueMessage(message, severity, autoHideDuration, primaryAction, secondaryAction) {
9817
+ const id = CreateUUID();
9818
+ const queue = {
9819
+ id,
9820
+ message,
9821
+ severity,
9822
+ open: true,
9823
+ autoHideDuration,
9824
+ primaryAction,
9825
+ secondaryAction
9826
+ };
9827
+ setAlerts(prevState => {
9828
+ return [...prevState, Object.assign({}, queue)];
9829
+ });
9830
+ return id;
9831
+ }
9832
+ const removeMessage = id => {
9833
+ setAlerts(prev => {
9834
+ return prev.map(a => {
9835
+ return a.id === id ? Object.assign(Object.assign({}, a), {
9836
+ open: false
9837
+ }) : a;
9838
+ });
9839
+ });
9840
+ };
9841
+ const DotSnackbarValues = {
9842
+ alerts,
9843
+ enqueueMessage,
9844
+ removeMessage
9845
+ };
9846
+ const memoizedValues = useMemo(() => DotSnackbarValues, [alerts]);
9847
+ return jsxs(DotSnackbarContext.Provider, {
9848
+ value: memoizedValues,
9849
+ children: [jsx(DotSnackbarContainer, {
9850
+ hideOnClickAway: hideOnClickAway
9851
+ }), children]
9852
+ });
9853
+ };
9854
+ const useDotSnackbarContext = () => {
9855
+ return useContext(DotSnackbarContext);
9856
+ };
9857
+ const useEnqueueErrorMessage = error => {
9858
+ const {
9859
+ enqueueMessage
9860
+ } = useDotSnackbarContext();
9861
+ useEffect(() => {
9862
+ error && enqueueMessage(getErrorText(error), 'error');
9863
+ }, [error]);
9864
+ };
9865
+
9866
+ const rootClassName$D = 'dot-dashboard-details';
9867
+ const StyledDashboardDetails = styled(DotDrawer)`
9868
+ ${({
9869
+ theme
9870
+ }) => css`
9871
+ &.${rootClassName$D} {
9872
+ .dot-drawer-paper {
9873
+ padding: 0;
9874
+ width: 382px;
9875
+ }
9876
+ .dot-card {
9877
+ border: none;
9878
+
9879
+ .dot-card-header {
9880
+ padding: ${theme.spacing(2, 1, 0, 0)};
9881
+ }
9882
+ .dot-card-content {
9883
+ padding: ${theme.spacing(0, 2, 3, 2)};
9884
+ }
9885
+ }
9886
+ .content {
9887
+ padding: ${theme.spacing(0, 2, 1, 2)};
9888
+ overflow-y: auto;
9889
+ }
9890
+ .dot-avatar {
9891
+ flex-basis: 40px;
9892
+ }
9893
+ .section-title {
9894
+ display: flex;
9895
+ align-items: center;
9896
+ padding: ${theme.spacing(2, 0, 2, 2)};
9897
+ margin: ${theme.spacing(2, -2, 0)};
9898
+ border-bottom: 1px solid ${theme.palette.figma.border.default};
9899
+ font-weight: normal;
9900
+ }
9901
+ .dot-icon {
9902
+ flex-basis: content;
9903
+ }
9904
+ .field-value {
9905
+ margin-top: ${theme.spacing(2)};
9906
+ .dashboard-details-label {
9907
+ margin-bottom: ${theme.spacing(0.5)};
9908
+ }
9909
+ }
9910
+ .dashboard-details-header {
9911
+ align-items: end;
9912
+ border-bottom: 1px solid ${theme.palette.figma.border.default};
9913
+ display: flex;
9914
+ justify-content: space-between;
9915
+ padding: ${theme.spacing(0, 2, 1, 2)};
9916
+
9917
+ .dashboard-details-header-title {
9918
+ display: flex;
9919
+ align-items: center;
9920
+ gap: ${theme.spacing(2)};
9921
+ }
9922
+ }
9923
+ }
9924
+ `}
9925
+ `;
9926
+
9927
+ const DashboardDetailsField = ({
9928
+ children,
9929
+ className,
9930
+ label,
9931
+ value
9932
+ }) => {
9933
+ let c = 'field-value';
9934
+ if (className) {
9935
+ c += ` ${className}`;
9936
+ }
9937
+ return jsxs("div", {
9938
+ className: c,
9939
+ children: [jsx(DotTypography, {
9940
+ ariaRole: "heading",
9941
+ className: "dashboard-details-label",
9942
+ component: "h4",
9943
+ variant: "h4",
9944
+ children: label
9945
+ }), value && jsx(DotTypography, {
9946
+ className: "dashboard-details-value",
9947
+ children: value
9948
+ }), children]
9949
+ });
9950
+ };
9951
+ const DashboardDetailsSectionHeading = ({
9952
+ className,
9953
+ label
9954
+ }) => {
9955
+ let c = 'section-title';
9956
+ if (className) {
9957
+ c += ` ${className}`;
9958
+ }
9959
+ return jsx(DotTypography, {
9960
+ ariaRole: "heading",
9961
+ className: c,
9962
+ component: "div",
9963
+ variant: "subtitle1",
9964
+ children: label
9965
+ });
9966
+ };
9967
+ const DotDashboardDetailsView = ({
9968
+ className,
9969
+ dashboard,
9970
+ onClose,
9971
+ onFavorite,
9972
+ open,
9973
+ yOffset = 56,
9974
+ zIndex = 990
9975
+ }) => {
9976
+ var _a, _b;
9977
+ const rootClasses = useStylesWithRootClass(rootClassName$D, className);
9978
+ const closeHandler = useCallback(event => {
9979
+ onClose && onClose(event);
9980
+ }, [onClose]);
9981
+ const favoriteHandler = useCallback(() => {
9982
+ const favoriteValue = !dashboard.favorite;
9983
+ onFavorite && onFavorite(dashboard.id, favoriteValue);
9984
+ }, [dashboard]);
9985
+ const header = useMemo(() => ({
9986
+ className: 'dashboard-details-header',
9987
+ children: jsxs("div", {
9988
+ "aria-level": 1,
9989
+ className: "dashboard-details-header-title",
9990
+ role: "heading",
9991
+ style: {
9992
+ marginTop: yOffset + 'px',
9993
+ width: '80%'
9994
+ },
9995
+ children: [jsx(DotAvatar, {
9996
+ iconId: "file-lines",
9997
+ alt: "dashboard details image",
9998
+ type: "image",
9999
+ variant: "circular"
10000
+ }), jsx(DotTypography, {
10001
+ ariaRole: "heading",
10002
+ ariaLevel: 1,
10003
+ className: "dashboard-details-label",
10004
+ children: "Details"
10005
+ })]
10006
+ })
10007
+ }), [yOffset]);
10008
+ return jsx(StyledDashboardDetails, {
10009
+ ariaLabel: "Dashboard details",
10010
+ ariaRole: "dialog",
10011
+ "aria-modal": "true",
10012
+ className: rootClasses,
10013
+ drawerHeaderProps: header,
10014
+ ModalProps: {
10015
+ style: {
10016
+ zIndex
10017
+ }
10018
+ },
10019
+ open: open,
10020
+ onClose: closeHandler,
10021
+ width: "340px",
10022
+ variant: "temporary",
10023
+ children: jsx("div", {
10024
+ className: "content",
10025
+ role: "contentinfo",
10026
+ children: jsxs(DotCard, {
10027
+ "data-testid": "dashboard-details-card",
10028
+ children: [jsx(DotCardHeader, {
10029
+ action: jsx("div", {
10030
+ children: jsx(DotIconButton, {
10031
+ iconId: `star-favorites-${dashboard.favorite ? 'active' : 'default'}`,
10032
+ "data-testid": `dashboard-favorite-icon-${dashboard.id}`,
10033
+ tooltip: dashboard.favorite ? 'Remove from favorites' : 'Add to favorites',
10034
+ onClick: favoriteHandler
10035
+ })
10036
+ }),
10037
+ avatar: jsx(DotAvatar, {
10038
+ alt: "dashboard avatar",
10039
+ iconId: dashboard.is_ootb_dashboard ? 'lock' : 'dashboard',
10040
+ type: "icon"
10041
+ }),
10042
+ title: dashboard.name,
10043
+ subheader: `by ${dashboard.is_ootb_dashboard ? 'Digital.ai' : dashboard.author_fullname}`
10044
+ }), jsxs(DotCardContent, {
10045
+ children: [jsx(DashboardDetailsSectionHeading, {
10046
+ label: "GENERAL"
10047
+ }), jsx(DashboardDetailsField, {
10048
+ className: "dashboard-details-description",
10049
+ label: "Description",
10050
+ value: dashboard.description
10051
+ }), jsx(DashboardDetailsField, {
10052
+ className: "dashboard-details-author",
10053
+ label: "Created by",
10054
+ value: dashboard.author_fullname
10055
+ }), jsx(DashboardDetailsField, {
10056
+ className: "dashboard-details-status",
10057
+ label: "Status",
10058
+ children: jsx(DotDashboardStatusPill, {
10059
+ status: dashboard.lifecycle_state
10060
+ })
10061
+ }), jsx(DashboardDetailsField, {
10062
+ className: "dashboard-details-category",
10063
+ label: "Category",
10064
+ children: jsx(DotChipList, {
10065
+ items: (_a = dashboard.categories) === null || _a === void 0 ? void 0 : _a.map(c => ({
10066
+ key: c,
10067
+ label: c
10068
+ })),
10069
+ maxChars: 30
10070
+ })
10071
+ }), ((_b = dashboard.external_object) === null || _b === void 0 ? void 0 : _b.page_count) && jsxs(Fragment, {
10072
+ children: [jsx(DashboardDetailsSectionHeading, {
10073
+ label: "DASHBOARD PAGE SUMMARY"
10074
+ }), jsx(DashboardDetailsField, {
10075
+ className: "dashboard-details-pages",
10076
+ label: "Pages",
10077
+ value: dashboard.external_object.page_count
10078
+ })]
10079
+ }), jsx(DashboardDetailsSectionHeading, {
10080
+ label: "ADDITIONAL DETAILS"
10081
+ }), jsx(DashboardDetailsField, {
10082
+ className: "dashboard-details-created-dt",
10083
+ label: "Created on",
10084
+ value: dashboard.created_dt
10085
+ }), dashboard.updated_dt && jsx(DashboardDetailsField, {
10086
+ className: "dashboard-details-updated-dt",
10087
+ label: "Modified on",
10088
+ value: dashboard.updated_dt
10089
+ }), dashboard.updated_by_fullname && jsx(DashboardDetailsField, {
10090
+ className: "dashboard-details-updated-by",
10091
+ label: "Modified by",
10092
+ value: dashboard.updated_by_fullname
10093
+ })]
10094
+ })]
10095
+ })
10096
+ })
10097
+ });
10098
+ };
10099
+ const DotDashboardDetails = _a => {
10100
+ var {
10101
+ dashboard,
10102
+ onClose,
10103
+ onFavorite
10104
+ } = _a,
10105
+ commonProps = __rest(_a, ["dashboard", "onClose", "onFavorite"]);
10106
+ const [_openedDashboard, _setOpenedDashboard] = useState(dashboard);
10107
+ const metadataApiContext = useDotMetadataApiContext();
10108
+ const {
10109
+ openedDashboardDetails: openedDashboard,
10110
+ setOpenedDashboardDetails: setOpenedDashboard
10111
+ } = metadataApiContext ? metadataApiContext : {
10112
+ openedDashboardDetails: _openedDashboard,
10113
+ setOpenedDashboardDetails: _setOpenedDashboard
10114
+ };
10115
+ const {
10116
+ dashboardsError,
10117
+ favoriteDashboard,
10118
+ setOpenedDashboardDetails
10119
+ } = useDotMetadataApiContext();
10120
+ const {
10121
+ enqueueMessage
10122
+ } = useDotSnackbarContext();
10123
+ useEnqueueErrorMessage(dashboardsError);
10124
+ const closeHandler = useCallback(event => {
10125
+ setOpenedDashboard(null);
10126
+ onClose && onClose(event);
10127
+ }, [onClose]);
10128
+ const favoriteHandler = useCallback((dashboardId, favoriteValue) => {
10129
+ // being optimistic; if the api call fails, there will be an error message
10130
+ enqueueMessage(`Dashboard has been ${favoriteValue ? '' : 'un-'}favorited.`, 'success');
10131
+ onFavorite && onFavorite(dashboardId, favoriteValue);
10132
+ setOpenedDashboardDetails(Object.assign(Object.assign({}, openedDashboard), {
10133
+ favorite: favoriteValue
10134
+ }));
10135
+ favoriteDashboard(openedDashboard.id, favoriteValue).then(response => {
10136
+ setOpenedDashboardDetails(response);
10137
+ });
10138
+ }, [openedDashboard]);
10139
+ const viewProps = Object.assign({}, commonProps);
10140
+ if (openedDashboard) {
10141
+ return jsx(DotDashboardDetailsView, Object.assign({}, viewProps, {
10142
+ dashboard: openedDashboard,
10143
+ open: true,
10144
+ onFavorite: favoriteHandler,
10145
+ onClose: closeHandler
10146
+ }));
10147
+ }
10148
+ return null;
10149
+ };
10150
+
10151
+ const DotInputSelect = ({
10152
+ ariaLabel,
10153
+ autoFocus,
10154
+ className,
10155
+ 'data-pendoid': dataPendoId = rootSelectClassName,
10156
+ 'data-testid': dataTestId,
10157
+ defaultValue,
10158
+ disabled = false,
10159
+ endIcon,
10160
+ endText,
10161
+ error = false,
10162
+ fullWidth = true,
10163
+ helperText,
10164
+ id,
10165
+ inputRef,
10166
+ label,
10167
+ name,
10168
+ onBlur,
10169
+ onChange,
10170
+ onFocus,
10171
+ onKeyDown,
10172
+ options = [],
10173
+ persistentLabel,
10174
+ readOnly = false,
10175
+ required,
10176
+ shrink,
10177
+ size = 'small',
10178
+ startIcon,
10179
+ success,
10180
+ value,
10181
+ warning = false
10182
+ }) => {
10183
+ const hasWarning = !error && warning && warningClassName;
10184
+ const hasSuccess = !error && !warning && success && successClassName;
10185
+ const endAdornment = endIcon || endText;
10186
+ const inputStyles = useStylesWithRootClass('dot-select', readOnly && readOnlyClassName$1);
10187
+ const rootStyles = useStylesWithRootClass(rootSelectClassName, hasSuccess, hasWarning);
10188
+ const getOption = option => {
10189
+ return typeof option === 'string' ? option : option.option;
10190
+ };
10191
+ const getValue = option => {
10192
+ return typeof option === 'string' ? option : (option === null || option === void 0 ? void 0 : option.value) || option.option;
10193
+ };
10194
+ return jsxs("div", {
10195
+ className: className,
10196
+ children: [persistentLabel && jsx(DotInputLabel, {
10197
+ disabled,
10198
+ error,
10199
+ id,
10200
+ label,
10201
+ required
10202
+ }), jsx(StyledTextField, {
10203
+ InputProps: {
10204
+ startAdornment: startIcon && jsx(StyledAdornment, {
10205
+ className: `${adornmentIconClassName} start`,
10206
+ position: "start",
10207
+ children: startIcon
10208
+ }),
10209
+ endAdornment: endAdornment && jsx(StyledAdornment, {
10210
+ className: `${adornmentIconClassName} end`,
10211
+ position: "end",
10212
+ children: endAdornment
10213
+ })
10214
+ },
10215
+ SelectProps: {
10216
+ native: !readOnly,
10217
+ readOnly,
10218
+ open: readOnly ? false : undefined
10219
+ },
10220
+ "aria-label": ariaLabel || label,
10221
+ autoFocus: autoFocus,
10222
+ className: rootStyles,
10223
+ defaultValue: defaultValue,
10224
+ disabled: disabled,
10225
+ error: error,
10226
+ fullWidth: fullWidth,
10227
+ helperText: helperText,
10228
+ id: id,
10229
+ InputLabelProps: {
10230
+ shrink: shrink
10231
+ },
10232
+ inputProps: {
10233
+ 'aria-label': ariaLabel,
10234
+ 'data-pendoid': dataPendoId,
10235
+ 'data-testid': dataTestId,
10236
+ className: inputStyles,
10237
+ readOnly
10238
+ },
10239
+ inputRef: inputRef,
10240
+ label: persistentLabel ? null : label,
10241
+ multiline: false,
10242
+ name: name,
10243
+ onBlur: onBlur,
10244
+ onChange: onChange,
10245
+ onFocus: onFocus,
10246
+ onKeyDown: onKeyDown,
10247
+ required: required,
10248
+ role: "textbox",
10249
+ select: true,
10250
+ size: size,
10251
+ value: value,
10252
+ variant: "outlined",
10253
+ children: options.map(option => jsx("option", {
10254
+ className: "dot-option",
10255
+ value: getValue(option),
10256
+ children: getOption(option)
10257
+ }, getValue(option)))
10258
+ })]
10259
+ });
10260
+ };
10261
+
10262
+ const StyledDashboardDialog = styled(DotDialog)`
10263
+ ${({
10264
+ theme
10265
+ }) => css`
10266
+ .dot-text-field {
10267
+ margin-bottom: ${theme.spacing(2)};
10268
+ width: 40vw;
10269
+ }
10270
+ .dot-autocomplete {
10271
+ margin-top: ${theme.spacing(1.5)};
10272
+ }
10273
+ .dot-input-select {
10274
+ margin-bottom: ${theme.spacing(2)};
10275
+ }
10276
+ `}
10277
+ `;
10278
+ const StyledDialogActions = styled(DialogActions)`
10279
+ padding-right: 0;
10280
+ `;
10281
+
10282
+ const DashboardAppTypeOptions = [
10283
+ // Matches target_app values in Dashboard model
10284
+ {
10285
+ option: 'Agility',
10286
+ value: 'AGILITY'
10287
+ }, {
10288
+ option: 'Release',
10289
+ value: 'RELEASE'
10290
+ }, {
10291
+ option: 'Deploy',
10292
+ value: 'DEPLOY'
10293
+ }, {
10294
+ option: 'Continuous Testing',
10295
+ value: 'CONTINUOUSTEST'
10296
+ }, {
10297
+ option: 'TeamForge',
10298
+ value: 'TEAMFORGE'
10299
+ }];
10300
+ const initialFormState = {
10301
+ categories: [],
10302
+ description: '',
10303
+ name: ''
10304
+ };
10305
+ const DASHBOARD_NAME_MAX_LENGTH = 250;
10306
+ const DASHBOARD_DESCRIPTION_MAX_LENGTH = 250;
10307
+ function DotDashboardDialog({
10308
+ availableCategories,
10309
+ copyDashboard,
10310
+ editDashboard,
10311
+ open,
10312
+ onClose,
10313
+ onSubmit,
10314
+ onContinue,
10315
+ title
10316
+ }) {
10317
+ const [isDirty, setIsDirty] = useState(false);
10318
+ const [isLoadingSubmit, setIsLoadingSubmit] = useState(false);
10319
+ const [nameError, setNameError] = useState(null);
10320
+ const [formValues, setFormValues] = useState(initialFormState);
10321
+ const {
10322
+ categories,
10323
+ description,
10324
+ name
10325
+ } = formValues;
10326
+ const {
10327
+ searchDashboards
10328
+ } = useDotMetadataApiContext();
9525
10329
  const {
9526
10330
  cancelablePromise
9527
10331
  } = useCancelablePromise();
@@ -9706,277 +10510,18 @@ function DotDashboardDialog({
9706
10510
  disabled: isLoadingSubmit || !isDirty,
9707
10511
  onClick: handleSubmitEditExit,
9708
10512
  type: "outlined",
9709
- children: "Save and exit"
9710
- }), jsx(DotButton, {
9711
- "data-testid": "save-edit-continue-dashboard-button",
9712
- disabled: isLoadingSubmit,
9713
- onClick: handleSubmitEditContinue,
9714
- type: "primary",
9715
- children: isDirty ? 'Save and continue' : 'Continue'
9716
- })]
9717
- })
9718
- })]
9719
- });
9720
- }
9721
-
9722
- const getSnackbarTitleFromSeverity = severity => {
9723
- switch (severity) {
9724
- case 'success':
9725
- return 'Success';
9726
- case 'warning':
9727
- return 'Warning';
9728
- case 'error':
9729
- return 'Error';
9730
- case 'info':
9731
- return 'Info';
9732
- default:
9733
- return 'Success';
9734
- }
9735
- };
9736
- function getErrorText(error) {
9737
- var _a, _b;
9738
- if ('status' in error && error.status === 304) {
9739
- return 'No changes made';
9740
- } else if ('body' in error) {
9741
- return ((_b = (_a = error.body) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) ? error.body.error.message : 'Unexpected API error';
9742
- } else if ('message' in error) {
9743
- return error.message;
9744
- }
9745
- return 'Unexpected API error';
9746
- }
9747
-
9748
- function addAutoHideDuration(severity) {
9749
- return severity === 'error' ? null : 10000;
9750
- }
9751
-
9752
- const rootClassName$F = 'dot-snackbar';
9753
- const StyledSnackbar = styled(Snackbar)`
9754
- ${({
9755
- theme,
9756
- width,
9757
- $anchorOriginTop
9758
- }) => css`
9759
- &.${rootClassName$F} {
9760
- .MuiAlert-message {
9761
- word-break: break-word;
9762
- }
9763
- .${rootClassName$1c} {
9764
- align-items: flex-start;
9765
- }
9766
- &.MuiSnackbar-anchorOriginTopLeft,
9767
- &.MuiSnackbar-anchorOriginTopCenter,
9768
- &.MuiSnackbar-anchorOriginTopRight {
9769
- top: ${$anchorOriginTop}px;
9770
- z-index: ${levelFourth};
9771
- }
9772
-
9773
- .dot-snackbar-actions {
9774
- display: flex;
9775
- align-items: center;
9776
- margin-top: ${theme.spacing(1)};
9777
- gap: ${theme.spacing(2)};
9778
-
9779
- .primary-action-btn {
9780
- background-color: transparent;
9781
- }
9782
- }
9783
-
9784
- .MuiAlert-root {
9785
- max-width: ${width ? 'unset' : '500px'};
9786
- min-width: ${width ? 'unset' : '344px'};
9787
- z-index: ${levelFourth};
9788
- }
9789
- }
9790
- `}
9791
- `;
9792
-
9793
- const DEFAULT_ANCHOR_ORIGIN = {
9794
- vertical: 'top',
9795
- horizontal: 'right'
9796
- };
9797
- const DotSnackbar = ({
9798
- anchorOrigin = DEFAULT_ANCHOR_ORIGIN,
9799
- anchorOriginTop = 108,
9800
- ariaLabel,
9801
- autoHideDuration,
9802
- children,
9803
- className,
9804
- 'data-testid': dataTestId,
9805
- hideOnClickAway = true,
9806
- onClose,
9807
- open,
9808
- primaryAction,
9809
- secondaryAction,
9810
- severity,
9811
- width
9812
- }) => {
9813
- const hasActions = !!(primaryAction || secondaryAction);
9814
- const calculatedAutoHideDuration = autoHideDuration === null || autoHideDuration > 0 ? autoHideDuration : addAutoHideDuration(severity);
9815
- const rootClasses = useStylesWithRootClass(rootClassName$F, className);
9816
- const handleSnackbarClose = reason => {
9817
- if (!reason || hideOnClickAway || !hideOnClickAway && reason !== 'clickaway') {
9818
- onClose();
9819
- }
9820
- };
9821
- return jsx(StyledSnackbar, {
9822
- anchorOrigin: anchorOrigin,
9823
- "$anchorOriginTop": anchorOriginTop,
9824
- "aria-label": ariaLabel,
9825
- autoHideDuration: calculatedAutoHideDuration,
9826
- classes: {
9827
- root: rootClasses
9828
- },
9829
- "data-testid": dataTestId,
9830
- onClose: (_e, r) => handleSnackbarClose(r),
9831
- open: open,
9832
- severity: severity,
9833
- width: width,
9834
- children: jsx("div", {
9835
- children: jsx(DotAlertBanner, {
9836
- severity: severity,
9837
- width: width,
9838
- onClose: _e => handleSnackbarClose(),
9839
- children: jsxs("div", {
9840
- children: [jsx(DotTypography, {
9841
- variant: "subtitle2",
9842
- noMarginBottom: false,
9843
- children: getSnackbarTitleFromSeverity(severity)
9844
- }), isString$2(children) ? jsx(DotTypography, {
9845
- ariaLabel: severity,
9846
- variant: "body1",
9847
- children: children
9848
- }) : jsx("span", {
9849
- "aria-label": severity,
9850
- children: children
9851
- }), hasActions && jsxs("div", {
9852
- className: "dot-snackbar-actions",
9853
- children: [primaryAction && jsx(DotButton, {
9854
- className: "primary-action-btn",
9855
- "data-testid": "primary-action-btn",
9856
- onClick: primaryAction.onClick,
9857
- size: "small",
9858
- type: "outlined",
9859
- children: primaryAction.label
9860
- }), secondaryAction && jsx(DotLink, {
9861
- "data-testid": "secondary-action-link",
9862
- href: secondaryAction.href,
9863
- color: "inherit",
9864
- children: secondaryAction.label
9865
- })]
9866
- })]
9867
- })
9868
- })
9869
- })
9870
- });
9871
- };
9872
-
9873
- const rootClassName$E = 'dot-snackbar-container';
9874
- const StyledSnackbarContainer = styled.div`
9875
- ${() => css`
9876
- &.${rootClassName$E} {
9877
- position: absolute;
9878
- top: 0;
9879
- width: 250px;
9880
- height: auto;
9881
- right: 0;
9882
- & > div {
9883
- position: relative;
9884
- }
9885
- }
9886
- `}
9887
- `;
9888
-
9889
- const DotSnackbarContext = createContext({
9890
- alerts: [],
9891
- enqueueMessage: (_message, _severity, _autoHideDuration, _primaryAction, _secondaryAction) => null,
9892
- removeMessage: _id => null
9893
- });
9894
- const DotSnackbarContainer = ({
9895
- hideOnClickAway
9896
- }) => {
9897
- const {
9898
- alerts,
9899
- removeMessage
9900
- } = useDotSnackbarContext();
9901
- function handleClose(id) {
9902
- return () => {
9903
- removeMessage(id);
9904
- };
9905
- }
9906
- return jsx(StyledSnackbarContainer, {
9907
- className: rootClassName$E,
9908
- children: jsx("div", {
9909
- className: rootClassName$E,
9910
- "data-testid": rootClassName$E,
9911
- children: alerts.slice().reverse().map(alert => {
9912
- return jsx(DotSnackbar, {
9913
- autoHideDuration: alert.autoHideDuration,
9914
- hideOnClickAway: hideOnClickAway,
9915
- onClose: handleClose(alert.id),
9916
- open: alert.open,
9917
- severity: alert.severity,
9918
- primaryAction: alert.primaryAction,
9919
- secondaryAction: alert.secondaryAction,
9920
- children: alert.message
9921
- }, alert.id);
10513
+ children: "Save and exit"
10514
+ }), jsx(DotButton, {
10515
+ "data-testid": "save-edit-continue-dashboard-button",
10516
+ disabled: isLoadingSubmit,
10517
+ onClick: handleSubmitEditContinue,
10518
+ type: "primary",
10519
+ children: isDirty ? 'Save and continue' : 'Continue'
10520
+ })]
9922
10521
  })
9923
- })
9924
- });
9925
- };
9926
- const DotSnackbarProvider = ({
9927
- children,
9928
- hideOnClickAway = true
9929
- }) => {
9930
- const [alerts, setAlerts] = useState([]);
9931
- function enqueueMessage(message, severity, autoHideDuration, primaryAction, secondaryAction) {
9932
- const id = CreateUUID();
9933
- const queue = {
9934
- id,
9935
- message,
9936
- severity,
9937
- open: true,
9938
- autoHideDuration,
9939
- primaryAction,
9940
- secondaryAction
9941
- };
9942
- setAlerts(prevState => {
9943
- return [...prevState, Object.assign({}, queue)];
9944
- });
9945
- return id;
9946
- }
9947
- const removeMessage = id => {
9948
- setAlerts(prev => {
9949
- return prev.map(a => {
9950
- return a.id === id ? Object.assign(Object.assign({}, a), {
9951
- open: false
9952
- }) : a;
9953
- });
9954
- });
9955
- };
9956
- const DotSnackbarValues = {
9957
- alerts,
9958
- enqueueMessage,
9959
- removeMessage
9960
- };
9961
- const memoizedValues = useMemo(() => DotSnackbarValues, [alerts]);
9962
- return jsxs(DotSnackbarContext.Provider, {
9963
- value: memoizedValues,
9964
- children: [jsx(DotSnackbarContainer, {
9965
- hideOnClickAway: hideOnClickAway
9966
- }), children]
10522
+ })]
9967
10523
  });
9968
- };
9969
- const useDotSnackbarContext = () => {
9970
- return useContext(DotSnackbarContext);
9971
- };
9972
- const useEnqueueErrorMessage = error => {
9973
- const {
9974
- enqueueMessage
9975
- } = useDotSnackbarContext();
9976
- useEffect(() => {
9977
- error && enqueueMessage(getErrorText(error), 'error');
9978
- }, [error]);
9979
- };
10524
+ }
9980
10525
 
9981
10526
  const InlineMessage = styled(DotTypography)`
9982
10527
  ${({
@@ -10373,8 +10918,14 @@ function DotDashboardPublishConfirm({
10373
10918
  }
10374
10919
 
10375
10920
  const StyledDotMenu = styled(DotMenu)`
10376
- ${() => css`
10921
+ ${({
10922
+ theme
10923
+ }) => css`
10377
10924
  z-index: 9999;
10925
+
10926
+ .dot-link .dot-icon {
10927
+ margin-right: ${theme.spacing(1)};
10928
+ }
10378
10929
  `}
10379
10930
  `;
10380
10931
 
@@ -10383,7 +10934,8 @@ function DotDashboardOptionsMenu({
10383
10934
  isEdit = false,
10384
10935
  onStartDuplicate,
10385
10936
  onStartStatusChange,
10386
- onViewMode
10937
+ onViewMode,
10938
+ onDetails
10387
10939
  }) {
10388
10940
  const [anchorEl, setAnchorEl] = useState(null);
10389
10941
  const [open, setOpen] = useState(false);
@@ -10457,6 +11009,21 @@ function DotDashboardOptionsMenu({
10457
11009
  onclick: handleDuplicateClick
10458
11010
  });
10459
11011
  }
11012
+ if (onDetails) {
11013
+ menuItems.push({
11014
+ children: jsxs(DotLink, {
11015
+ ariaLabel: "Dashboard details",
11016
+ color: "inherit",
11017
+ onClick: () => onDetails(dashboard),
11018
+ underline: "none",
11019
+ children: [jsx(DotIcon, {
11020
+ iconId: "file-lines"
11021
+ }), " Details"]
11022
+ }),
11023
+ key: 'dashboard-details',
11024
+ onClick: () => onDetails(dashboard)
11025
+ });
11026
+ }
10460
11027
  return menuItems.length > 0 ? jsxs(Fragment, {
10461
11028
  children: [jsx(DotIconButton, {
10462
11029
  className: "expand-button",
@@ -10563,7 +11130,8 @@ function DotDashboardActions({
10563
11130
  onFavorite,
10564
11131
  onStatusChanged,
10565
11132
  onDuplicated,
10566
- onViewMode
11133
+ onViewMode,
11134
+ onDetails
10567
11135
  }) {
10568
11136
  // NOTE: useState functions need to stay at the top of the file so that
10569
11137
  // they are evaluated before any context imports. If they are evaluated
@@ -10572,7 +11140,8 @@ function DotDashboardActions({
10572
11140
  const [dashboardToPublish, setDashboardToPublish] = useState(null);
10573
11141
  const [dashboardToUnpublish, setDashboardToUnpublish] = useState(null);
10574
11142
  const {
10575
- duplicateDashboard
11143
+ duplicateDashboard,
11144
+ setOpenedDashboardDetails
10576
11145
  } = useDotMetadataApiContext();
10577
11146
  const handlePublishConfirm = useCallback(publishedDashboard => {
10578
11147
  setDashboardToPublish(null);
@@ -10634,7 +11203,8 @@ function DotDashboardActions({
10634
11203
  isEdit: isEdit,
10635
11204
  onViewMode: onViewMode,
10636
11205
  onStartStatusChange: handleStartStatusChangeIfConfig,
10637
- onStartDuplicate: handleStartDuplicateIfConfig
11206
+ onStartDuplicate: handleStartDuplicateIfConfig,
11207
+ onDetails: () => setOpenedDashboardDetails(dashboard)
10638
11208
  }), jsx(CloseButton, {
10639
11209
  dashboard: dashboard,
10640
11210
  onClose: onClose
@@ -10702,7 +11272,7 @@ function DotDashboardHeader({
10702
11272
  });
10703
11273
  }
10704
11274
 
10705
- const rootClassName$D = 'dot-empty-state';
11275
+ const rootClassName$C = 'dot-empty-state';
10706
11276
  const StyledEmptyState = styled.div`
10707
11277
  ${({
10708
11278
  theme
@@ -10737,9 +11307,9 @@ const StyledEmptyState = styled.div`
10737
11307
  `}
10738
11308
  `;
10739
11309
 
10740
- const rootClassName$C = 'dot-illustration';
11310
+ const rootClassName$B = 'dot-illustration';
10741
11311
  const StyledIllustration = styled.span`
10742
- &.${rootClassName$C} {
11312
+ &.${rootClassName$B} {
10743
11313
  display: inline-block;
10744
11314
  }
10745
11315
  `;
@@ -10756,16 +11326,16 @@ const DotIllustration = ({
10756
11326
  tooltip,
10757
11327
  tooltipPlacement = 'right-end'
10758
11328
  }) => {
10759
- const rootClasses = useStylesWithRootClass(rootClassName$C, className);
11329
+ const rootClasses = useStylesWithRootClass(rootClassName$B, className);
10760
11330
  return jsx(DotTooltip, {
10761
11331
  title: tooltip,
10762
11332
  placement: tooltipPlacement,
10763
- "data-testid": `${dataTestId || rootClassName$C}-tooltip`,
11333
+ "data-testid": `${dataTestId || rootClassName$B}-tooltip`,
10764
11334
  children: jsx(StyledIllustration, {
10765
11335
  "aria-hidden": "false",
10766
11336
  "aria-label": ariaLabel || title || 'Illustration',
10767
11337
  className: rootClasses,
10768
- "data-testid": dataTestId || rootClassName$C,
11338
+ "data-testid": dataTestId || rootClassName$B,
10769
11339
  role: ariaRole,
10770
11340
  children: jsx("img", {
10771
11341
  alt: alt || 'Illustration',
@@ -10790,7 +11360,7 @@ const DotEmptyState = ({
10790
11360
  subtitle,
10791
11361
  title
10792
11362
  }) => {
10793
- const rootClasses = useStylesWithRootClass(rootClassName$D, className);
11363
+ const rootClasses = useStylesWithRootClass(rootClassName$C, className);
10794
11364
  return jsxs(StyledEmptyState, {
10795
11365
  "aria-label": ariaLabel,
10796
11366
  className: rootClasses,
@@ -10871,20 +11441,20 @@ const StyledRadioGroup = styled(RadioGroup)`
10871
11441
  &.${groupClassName} {
10872
11442
  padding-left: ${theme.spacing(2.5)};
10873
11443
 
10874
- .${rootClassName$M} {
11444
+ .${rootClassName$O} {
10875
11445
  margin: 0;
10876
11446
  }
10877
11447
  }
10878
11448
  `}
10879
11449
  `;
10880
11450
 
10881
- const rootClassName$B = 'dot-date-picker';
11451
+ const rootClassName$A = 'dot-date-picker';
10882
11452
  const popperClassName = 'dot-date-picker-popper';
10883
11453
  const containerClassName$2 = 'dot-date-picker-container';
10884
11454
  const rectanglePickersDayClassName = 'dot-rectangle-pickers-day';
10885
11455
  const StyledDatePickerContainer = styled.div`
10886
11456
  ${() => css`
10887
- &.${rootClassName$B} .full-width {
11457
+ &.${rootClassName$A} .full-width {
10888
11458
  width: 100%;
10889
11459
  }
10890
11460
  `}
@@ -10893,7 +11463,7 @@ const StyledDatePicker = styled(DatePicker)`
10893
11463
  ${({
10894
11464
  theme
10895
11465
  }) => css`
10896
- &.${rootClassName$B} {
11466
+ &.${rootClassName$A} {
10897
11467
  ${pickerInputStyles(theme)};
10898
11468
 
10899
11469
  .Mui-disabled.MuiInputBase-root,
@@ -10933,7 +11503,7 @@ const StyledPickersDay = styled(PickersDay)`
10933
11503
  `}
10934
11504
  `;
10935
11505
 
10936
- const rootClassName$A = 'dot-time-picker';
11506
+ const rootClassName$z = 'dot-time-picker';
10937
11507
  const containerClassName$1 = 'dot-time-picker-container';
10938
11508
  const TIME_SELECTION_HEIGHT_SPACING = 34.5;
10939
11509
  const TIME_SELECTION_WIDTH_SPACING = 14.5;
@@ -11004,7 +11574,7 @@ const StyledTimePicker = styled(TimePicker)`
11004
11574
  ${({
11005
11575
  theme
11006
11576
  }) => css`
11007
- &.${rootClassName$A} {
11577
+ &.${rootClassName$z} {
11008
11578
  ${pickerInputStyles(theme)};
11009
11579
 
11010
11580
  .Mui-disabled.MuiInputBase-root,
@@ -11023,36 +11593,36 @@ const StyledTimePicker = styled(TimePicker)`
11023
11593
  `}
11024
11594
  `;
11025
11595
 
11026
- const rootClassName$z = 'dot-form';
11596
+ const rootClassName$y = 'dot-form';
11027
11597
  const StyledFormContainer = styled.div`
11028
11598
  ${({
11029
11599
  theme
11030
11600
  }) => css`
11031
- &.${rootClassName$z} {
11601
+ &.${rootClassName$y} {
11032
11602
  margin: ${theme.spacing(3, 0)};
11033
11603
 
11034
- .${rootClassName$K},
11035
- .${rootClassName$M},
11036
- .${rootClassName$1e},
11604
+ .${rootClassName$M},
11605
+ .${rootClassName$O},
11606
+ .${rootClassName$1g},
11037
11607
  .${rootSelectClassName},
11038
- .${rootClassName$B},
11039
- .${rootClassName$A} {
11608
+ .${rootClassName$A},
11609
+ .${rootClassName$z} {
11040
11610
  margin: ${theme.spacing(1, 0)};
11041
11611
  }
11042
11612
 
11043
11613
  label
11044
- + .${rootClassName$1e},
11614
+ + .${rootClassName$1g},
11045
11615
  label
11046
11616
  + .${rootSelectClassName},
11047
11617
  label
11048
- + .${rootClassName$B},
11618
+ + .${rootClassName$A},
11049
11619
  label
11050
- + .${rootClassName$A} {
11620
+ + .${rootClassName$z} {
11051
11621
  margin: ${theme.spacing(0, 0, 1, 0)};
11052
11622
  }
11053
11623
 
11054
- .${rootClassName$J}, .${groupClassName} {
11055
- .${rootClassName$M} {
11624
+ .${rootClassName$L}, .${groupClassName} {
11625
+ .${rootClassName$O} {
11056
11626
  margin: 0;
11057
11627
  }
11058
11628
  }
@@ -11067,7 +11637,7 @@ const DotForm = ({
11067
11637
  'data-testid': dataTestId,
11068
11638
  onSubmit
11069
11639
  }) => {
11070
- const rootClasses = useStylesWithRootClass(rootClassName$z, className);
11640
+ const rootClasses = useStylesWithRootClass(rootClassName$y, className);
11071
11641
  return jsx("form", {
11072
11642
  "aria-label": ariaLabel,
11073
11643
  "data-testid": dataTestId,
@@ -11080,10 +11650,10 @@ const DotForm = ({
11080
11650
  });
11081
11651
  };
11082
11652
 
11083
- const rootClassName$y = 'dot-dynamic-form';
11653
+ const rootClassName$x = 'dot-dynamic-form';
11084
11654
  const StyledDynamicForm = styled(DotForm)`
11085
11655
  ${() => css`
11086
- &.${rootClassName$y} {
11656
+ &.${rootClassName$x} {
11087
11657
  }
11088
11658
  `}
11089
11659
  `;
@@ -11263,12 +11833,12 @@ const checkIfFormDataValid = formState => {
11263
11833
  return true;
11264
11834
  };
11265
11835
 
11266
- const rootClassName$x = 'dot-progress-button';
11836
+ const rootClassName$w = 'dot-progress-button';
11267
11837
  const StyledProgressButton = styled(DotButton)`
11268
11838
  ${({
11269
11839
  theme
11270
11840
  }) => css`
11271
- &.${rootClassName$x} {
11841
+ &.${rootClassName$w} {
11272
11842
  .hidden {
11273
11843
  // hide children but preserve its space so that
11274
11844
  // button's dimensions don't change
@@ -11293,7 +11863,7 @@ const DotProgressButton = ({
11293
11863
  ariaLabel,
11294
11864
  children,
11295
11865
  className,
11296
- 'data-pendoid': dataPendoId = rootClassName$x,
11866
+ 'data-pendoid': dataPendoId = rootClassName$w,
11297
11867
  'data-testid': dataTestId,
11298
11868
  disabled = false,
11299
11869
  disableRipple = false,
@@ -11306,7 +11876,7 @@ const DotProgressButton = ({
11306
11876
  tooltip,
11307
11877
  type = 'primary'
11308
11878
  }) => {
11309
- const rootClasses = useStylesWithRootClass(rootClassName$x, className);
11879
+ const rootClasses = useStylesWithRootClass(rootClassName$w, className);
11310
11880
  const isButtonDisabled = disabled || isLoading;
11311
11881
  const titleClasses = useStylesWithRootClass(isLoading ? 'hidden' : '');
11312
11882
  const progressCircleSize = size === 'large' ? SPINNER_LARGE_SIZE : SPINNER_DEFAULT_SIZE;
@@ -11335,12 +11905,12 @@ const DotProgressButton = ({
11335
11905
  });
11336
11906
  };
11337
11907
 
11338
- const rootClassName$w = 'dot-radio';
11908
+ const rootClassName$v = 'dot-radio';
11339
11909
  const StyledRadioButton = styled(Radio)`
11340
11910
  ${({
11341
11911
  theme
11342
11912
  }) => css`
11343
- &.${rootClassName$w} {
11913
+ &.${rootClassName$v} {
11344
11914
  padding: 8px;
11345
11915
 
11346
11916
  svg {
@@ -11358,7 +11928,7 @@ function DotRadioButton({
11358
11928
  ariaLabel,
11359
11929
  checked,
11360
11930
  className,
11361
- 'data-pendoid': dataPendoId = rootClassName$M,
11931
+ 'data-pendoid': dataPendoId = rootClassName$O,
11362
11932
  'data-testid': dataTestId,
11363
11933
  disabled,
11364
11934
  id,
@@ -11371,7 +11941,7 @@ function DotRadioButton({
11371
11941
  size = 'medium',
11372
11942
  value
11373
11943
  }) {
11374
- const rootClasses = useStylesWithRootClass(rootClassName$M, className);
11944
+ const rootClasses = useStylesWithRootClass(rootClassName$O, className);
11375
11945
  const handleChange = event => {
11376
11946
  onChange && onChange(event, event.target.value);
11377
11947
  };
@@ -11379,7 +11949,7 @@ function DotRadioButton({
11379
11949
  const radioControl = jsx(StyledRadioButton, {
11380
11950
  checked: checked,
11381
11951
  classes: {
11382
- root: rootClassName$w
11952
+ root: rootClassName$v
11383
11953
  },
11384
11954
  color: "primary",
11385
11955
  "data-pendoid": dataPendoId,
@@ -11425,7 +11995,7 @@ const DotRadioGroup = ({
11425
11995
  size = 'medium'
11426
11996
  }) => {
11427
11997
  const placement = `${placementClassName}${labelPlacement}`;
11428
- const rootClasses = useStylesWithRootClass(rootClassName$K, className, placement);
11998
+ const rootClasses = useStylesWithRootClass(rootClassName$M, className, placement);
11429
11999
  const radioValue = value || defaultValue;
11430
12000
  const [selectedValue, setSelectedValue] = useState(radioValue);
11431
12001
  /* This will ensure that value can be updated from the outside */
@@ -11490,7 +12060,7 @@ const DotRadioGroup = ({
11490
12060
  });
11491
12061
  };
11492
12062
 
11493
- const rootClassName$v = 'dot-switch';
12063
+ const rootClassName$u = 'dot-switch';
11494
12064
  const StyledSwitch = styled(Switch)`
11495
12065
  ${({
11496
12066
  theme
@@ -11519,7 +12089,7 @@ const DotSwitch = ({
11519
12089
  checked,
11520
12090
  className,
11521
12091
  color,
11522
- 'data-pendoid': dataPendoId = rootClassName$v,
12092
+ 'data-pendoid': dataPendoId = rootClassName$u,
11523
12093
  'data-testid': dataTestId,
11524
12094
  disabled = false,
11525
12095
  id,
@@ -11529,7 +12099,7 @@ const DotSwitch = ({
11529
12099
  onChange,
11530
12100
  size = 'medium'
11531
12101
  }) => {
11532
- const rootClasses = useStylesWithRootClass(rootClassName$v, className);
12102
+ const rootClasses = useStylesWithRootClass(rootClassName$u, className);
11533
12103
  const handleChange = event => {
11534
12104
  onChange && onChange(event);
11535
12105
  };
@@ -11559,7 +12129,7 @@ const DotSwitch = ({
11559
12129
  tabIndex: 0
11560
12130
  });
11561
12131
  return jsx(StyledFormControlLabel, {
11562
- className: rootClassName$M,
12132
+ className: rootClassName$O,
11563
12133
  control: switchControl,
11564
12134
  label: label,
11565
12135
  labelPlacement: labelPlacement
@@ -11880,7 +12450,7 @@ const DotDynamicForm = ({
11880
12450
  onChange,
11881
12451
  onSubmit
11882
12452
  }) => {
11883
- const rootClasses = useStylesWithRootClass(rootClassName$y, className);
12453
+ const rootClasses = useStylesWithRootClass(rootClassName$x, className);
11884
12454
  // Memoize this operation so that is doesn't get executed each time this
11885
12455
  // component re-renders
11886
12456
  const initialFormState = useMemo(() => getInitialFormState(config, liveValidation), [config, liveValidation, getInitialFormState]);
@@ -12126,7 +12696,7 @@ const DotDynamicForm = ({
12126
12696
  });
12127
12697
  };
12128
12698
 
12129
- const rootClassName$u = 'dot-inline-edit';
12699
+ const rootClassName$t = 'dot-inline-edit';
12130
12700
  const editModeClassName = 'dot-edit-mode';
12131
12701
  const viewModeClassName = 'dot-view-mode';
12132
12702
  const placeholderClassName = 'dot-placeholder';
@@ -12138,7 +12708,7 @@ const StyledInlineEdit = styled.div`
12138
12708
  theme,
12139
12709
  fullWidth
12140
12710
  }) => css`
12141
- &.${rootClassName$u} {
12711
+ &.${rootClassName$t} {
12142
12712
  align-items: center;
12143
12713
  color: ${theme.palette.figma.typography.black};
12144
12714
  display: ${fullWidth ? 'flex' : 'inline-flex'};
@@ -12350,7 +12920,7 @@ const DotInlineEdit = ({
12350
12920
  bindings,
12351
12921
  charactersLimit,
12352
12922
  className,
12353
- 'data-pendoid': dataPendoId = rootClassName$u,
12923
+ 'data-pendoid': dataPendoId = rootClassName$t,
12354
12924
  'data-testid': dataTestId,
12355
12925
  fullWidth = true,
12356
12926
  hideActionButtons,
@@ -12383,7 +12953,7 @@ const DotInlineEdit = ({
12383
12953
  }
12384
12954
  }, [value]);
12385
12955
  const isSaveDisabled = checkIfEmptyValue(inputValue);
12386
- const rootClasses = useStylesWithRootClass(rootClassName$u, className, editing ? editModeClassName : '');
12956
+ const rootClasses = useStylesWithRootClass(rootClassName$t, className, editing ? editModeClassName : '');
12387
12957
  const handleShowTooltip = visible => {
12388
12958
  if (!editing) {
12389
12959
  setShowTooltip(visible);
@@ -12562,13 +13132,13 @@ const DotInlineEdit = ({
12562
13132
  });
12563
13133
  };
12564
13134
 
12565
- const rootClassName$t = 'dot-navigation-rail';
13135
+ const rootClassName$s = 'dot-navigation-rail';
12566
13136
  const StyledNavigationRail = styled.div`
12567
13137
  ${({
12568
13138
  theme,
12569
13139
  railItemPosition
12570
13140
  }) => css`
12571
- &.${rootClassName$t} {
13141
+ &.${rootClassName$s} {
12572
13142
  background: ${theme.palette.figma.neutral.elevated};
12573
13143
  border-left: 1px solid ${theme.palette.figma.border.default};
12574
13144
  display: flex;
@@ -12615,7 +13185,7 @@ const DotNavigationRail = ({
12615
13185
  railItems,
12616
13186
  selectedIndex = 0
12617
13187
  }) => {
12618
- const rootClasses = useStylesWithRootClass(rootClassName$t, className);
13188
+ const rootClasses = useStylesWithRootClass(rootClassName$s, className);
12619
13189
  const [selectedItemIndex, setSelectedItemIndex] = useState(selectedIndex);
12620
13190
  /* Used to change selected index programmatically from the consumer component */
12621
13191
  useEffect(() => {
@@ -12666,154 +13236,6 @@ const DotNavigationRail = ({
12666
13236
  });
12667
13237
  };
12668
13238
 
12669
- const rootClassName$s = 'dot-pill';
12670
- const StyledPill = styled(Chip)`
12671
- ${({
12672
- theme
12673
- }) => css`
12674
- &.${rootClassName$s} {
12675
- background-color: ${({
12676
- backgroundcolor,
12677
- variant
12678
- }) => {
12679
- const defaultBackground = variant === 'filled' ? theme.palette.grey[200] : theme.palette.grey[50];
12680
- return backgroundcolor !== null && backgroundcolor !== void 0 ? backgroundcolor : defaultBackground;
12681
- }};
12682
- border-color: ${({
12683
- bordercolor
12684
- }) => {
12685
- return bordercolor ? bordercolor : theme.palette.grey[200];
12686
- }};
12687
- color: ${({
12688
- labelcolor
12689
- }) => {
12690
- return labelcolor ? labelcolor : theme.palette.layer.n700;
12691
- }};
12692
- .dot-icon {
12693
- color: ${({
12694
- labelcolor
12695
- }) => {
12696
- return labelcolor ? labelcolor : theme.palette.grey.main;
12697
- }};
12698
- margin: ${theme.spacing(0, -0.5, 0, 1)};
12699
- }
12700
-
12701
- &.MuiChip-sizeSmall .dot-icon {
12702
- margin-left: 5px;
12703
- }
12704
-
12705
- &.MuiChip-outlined {
12706
- &.error {
12707
- background-color: ${theme.palette.error[50]};
12708
- border-color: ${theme.palette.error.main};
12709
- color: ${theme.palette.layer.n700};
12710
- .dot-icon {
12711
- color: ${theme.palette.error.main};
12712
- }
12713
- }
12714
-
12715
- &.success {
12716
- background-color: ${theme.palette.figma.success.light};
12717
- border-color: ${theme.palette.figma.success.normal};
12718
- color: ${theme.palette.layer.n700};
12719
- .dot-icon {
12720
- color: ${theme.palette.success.main};
12721
- }
12722
- }
12723
-
12724
- &.warning {
12725
- background-color: ${theme.palette.figma.warning.light};
12726
- border-color: ${theme.palette.figma.warning.normal};
12727
- color: ${theme.palette.layer.n700};
12728
- .dot-icon {
12729
- color: ${theme.palette.warning.main};
12730
- }
12731
- }
12732
-
12733
- &.in-progress {
12734
- background-color: ${theme.palette.figma.primary.light};
12735
- border-color: ${theme.palette.figma.primary.normal};
12736
- color: ${theme.palette.layer.n700};
12737
- .dot-icon {
12738
- color: ${theme.palette.primary.main};
12739
- }
12740
- }
12741
- }
12742
-
12743
- &.MuiChip-filled {
12744
- &.error {
12745
- background-color: ${theme.palette.error.main};
12746
- border-color: ${theme.palette.error.main};
12747
- color: ${theme.palette.layer.n0};
12748
- .dot-icon {
12749
- color: ${theme.palette.layer.n0};
12750
- }
12751
- }
12752
-
12753
- &.success {
12754
- background-color: ${theme.palette.success.main};
12755
- border-color: ${theme.palette.success.main};
12756
- color: ${theme.palette.layer.n0};
12757
- .dot-icon {
12758
- color: ${theme.palette.layer.n0};
12759
- }
12760
- }
12761
-
12762
- &.warning {
12763
- background-color: ${theme.palette.warning.main};
12764
- border-color: ${theme.palette.warning.main};
12765
- color: ${theme.palette.layer.n700};
12766
- .dot-icon {
12767
- color: ${theme.palette.layer.n700};
12768
- }
12769
- }
12770
-
12771
- &.in-progress {
12772
- background-color: ${theme.palette.primary.main};
12773
- border-color: ${theme.palette.primary.main};
12774
- color: ${theme.palette.layer.n0};
12775
- .dot-icon {
12776
- color: ${theme.palette.layer.n0};
12777
- }
12778
- }
12779
- }
12780
- }
12781
- `}
12782
- `;
12783
-
12784
- const DotPill = ({
12785
- ariaLabel,
12786
- backgroundcolor,
12787
- bordercolor,
12788
- className,
12789
- 'data-testid': dataTestId,
12790
- icon,
12791
- label,
12792
- labelcolor,
12793
- onClick,
12794
- size = 'medium',
12795
- status = 'default',
12796
- variant = 'filled'
12797
- }) => {
12798
- const rootClasses = useStylesWithRootClass(rootClassName$s, className, status);
12799
- return jsx(StyledPill, {
12800
- "aria-label": ariaLabel,
12801
- bordercolor: bordercolor,
12802
- backgroundcolor: backgroundcolor,
12803
- classes: {
12804
- root: rootClasses
12805
- },
12806
- clickable: !!onClick,
12807
- "data-testid": dataTestId,
12808
- icon: icon,
12809
- label: label,
12810
- labelcolor: labelcolor,
12811
- onClick: onClick,
12812
- size: size,
12813
- variant: variant
12814
- });
12815
- };
12816
-
12817
13239
  const rootClassName$r = 'dot-skeleton';
12818
13240
  const StyledSkeleton = styled(Skeleton)`
12819
13241
  ${({
@@ -15758,7 +16180,7 @@ const DotPopper = ({
15758
16180
  open,
15759
16181
  placement
15760
16182
  }) => {
15761
- const rootClasses = useStylesWithRootClass(rootClassName$16, className);
16183
+ const rootClasses = useStylesWithRootClass(rootClassName$18, className);
15762
16184
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15763
16185
  const handleClickAway = event => {
15764
16186
  if (onClickAway && (!anchorEl || !anchorEl.contains(event.currentTarget))) {
@@ -15998,7 +16420,7 @@ const DotDatePicker = ({
15998
16420
  autoFocus = false,
15999
16421
  className,
16000
16422
  closeOnSelect = true,
16001
- 'data-pendoid': dataPendoId = rootClassName$B,
16423
+ 'data-pendoid': dataPendoId = rootClassName$A,
16002
16424
  'data-testid': dataTestId,
16003
16425
  defaultValue,
16004
16426
  disableOpenPicker,
@@ -16038,7 +16460,7 @@ const DotDatePicker = ({
16038
16460
  const hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
16039
16461
  const isInputReadOnly = readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
16040
16462
  const inputRef = useRef(null);
16041
- const rootClasses = useStylesWithRootClass(rootClassName$B, className, isInputReadOnly ? 'read-only' : '');
16463
+ const rootClasses = useStylesWithRootClass(rootClassName$A, className, isInputReadOnly ? 'read-only' : '');
16042
16464
  const containerClasses = useStylesWithRootClass(containerClassName$2, fullWidth ? 'full-width' : '', className);
16043
16465
  const focusInput = ref => {
16044
16466
  setTimeout(() => {
@@ -16257,7 +16679,7 @@ const DotTimePicker = ({
16257
16679
  ariaLabel,
16258
16680
  autoFocus = false,
16259
16681
  className,
16260
- 'data-pendoid': dataPendoId = rootClassName$A,
16682
+ 'data-pendoid': dataPendoId = rootClassName$z,
16261
16683
  'data-testid': dataTestId,
16262
16684
  defaultValue,
16263
16685
  disableOpenPicker = false,
@@ -16289,7 +16711,7 @@ const DotTimePicker = ({
16289
16711
  const hasValueWithoutChangeHandler = value !== undefined && onChange === undefined;
16290
16712
  const hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
16291
16713
  const isComponentReadOnly = readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
16292
- const rootClasses = useStylesWithRootClass(rootClassName$A, className, isComponentReadOnly ? 'read-only' : '');
16714
+ const rootClasses = useStylesWithRootClass(rootClassName$z, className, isComponentReadOnly ? 'read-only' : '');
16293
16715
  const containerClasses = useStylesWithRootClass(containerClassName$1, fullWidth ? 'full-width' : '', className);
16294
16716
  const inputRef = useRef(null);
16295
16717
  const [isPickerOpened, setIsPickerOpened] = useState(false);
@@ -17388,4 +17810,4 @@ const BoardColumnSummary = ({
17388
17810
  });
17389
17811
  };
17390
17812
 
17391
- 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 };
17813
+ 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, DotChipList, DotClickAwayListener, DotConfirmationDialog, DotCopyButton, DotCoreApiProvider, DotDashboardActions, DotDashboardDetails, DotDashboardDialog, DotDashboardHeader, DotDashboardOptionsMenu, DotDashboardPublishConfirm, DotDashboardStatusPill, 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 };