@digital-ai/dot-components 3.15.2 → 3.16.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
@@ -50,6 +50,8 @@ const DotTooltip = ({
50
50
  className,
51
51
  'data-testid': dataTestId,
52
52
  disablePortal = false,
53
+ followCursor = false,
54
+ enterDelay = 0,
53
55
  hoverVisibility = 'always',
54
56
  leaveDelay,
55
57
  onClose,
@@ -87,6 +89,7 @@ const DotTooltip = ({
87
89
  "data-testid": dataTestId,
88
90
  disableHoverListener: hoverVisibility === 'never' || hoverVisibility === 'overflow' && !hasTooltipOnHover,
89
91
  leaveDelay: leaveDelay,
92
+ enterDelay: enterDelay,
90
93
  onClose: onClose,
91
94
  open: open,
92
95
  placement: placement,
@@ -96,6 +99,7 @@ const DotTooltip = ({
96
99
  },
97
100
  role: ariaRole,
98
101
  title: title,
102
+ followCursor: followCursor,
99
103
  children: jsx("span", {
100
104
  ref: childrenWrapperRef,
101
105
  tabIndex: -1,
@@ -104,12 +108,12 @@ const DotTooltip = ({
104
108
  }) : children;
105
109
  };
106
110
 
107
- const rootClassName$1j = 'dot-icon';
111
+ const rootClassName$1k = 'dot-icon';
108
112
  const StyledIcon = styled(Icon)`
109
113
  ${({
110
114
  theme
111
115
  }) => css`
112
- &.${rootClassName$1j} {
116
+ &.${rootClassName$1k} {
113
117
  color: ${theme.palette.figma.icon.black};
114
118
  font-size: 20px;
115
119
 
@@ -146,7 +150,7 @@ const DotIcon = ({
146
150
  iconId,
147
151
  tooltip
148
152
  }) => {
149
- const rootClasses = useStylesWithRootClass(rootClassName$1j, className);
153
+ const rootClasses = useStylesWithRootClass(rootClassName$1k, className);
150
154
  return jsx(DotTooltip, {
151
155
  title: tooltip,
152
156
  children: jsx(StyledIcon, {
@@ -207,7 +211,7 @@ const DotTypography = ({
207
211
  });
208
212
  };
209
213
 
210
- const rootClassName$1i = 'dot-accordion';
214
+ const rootClassName$1j = 'dot-accordion';
211
215
  const summaryClassName = 'dot-accordion-summary';
212
216
  const detailClassName = 'dot-accordion-details';
213
217
  const StyledAccordion = styled(Accordion)`
@@ -218,7 +222,7 @@ const StyledAccordion = styled(Accordion)`
218
222
  background: ${theme.palette.figma.background.level1.white};
219
223
  }
220
224
 
221
- &.${rootClassName$1i} .${summaryClassName} {
225
+ &.${rootClassName$1j} .${summaryClassName} {
222
226
  align-items: center;
223
227
  background: ${theme.palette.figma.background.level1.white};
224
228
  color: ${theme.palette.figma.typography.black};
@@ -263,7 +267,7 @@ const DotAccordion = ({
263
267
  ariaLabel,
264
268
  children,
265
269
  className,
266
- 'data-pendoid': dataPendoId = rootClassName$1i,
270
+ 'data-pendoid': dataPendoId = rootClassName$1j,
267
271
  'data-testid': dataTestId = 'dot-accordion',
268
272
  disabled = false,
269
273
  expanded,
@@ -274,7 +278,7 @@ const DotAccordion = ({
274
278
  summary,
275
279
  noWrap = true
276
280
  }) => {
277
- const rootClasses = useStylesWithRootClass(rootClassName$1i, className);
281
+ const rootClasses = useStylesWithRootClass(rootClassName$1j, className);
278
282
  const [elevation, setElevation] = useState();
279
283
  useEffect(() => {
280
284
  if (onChange && expanded === undefined) {
@@ -390,7 +394,7 @@ const readOnlyStyles = theme => css`
390
394
  }
391
395
  `;
392
396
 
393
- const rootClassName$1h = 'dot-text-field';
397
+ const rootClassName$1i = 'dot-text-field';
394
398
  const rootSelectClassName = 'dot-select-field';
395
399
  const labelClassName = 'dot-input-label';
396
400
  const errorClassName = 'dot-error';
@@ -399,6 +403,8 @@ const successClassName = 'dot-success';
399
403
  const adornmentIconClassName = 'dot-adornment-icon';
400
404
  const fieldsetClassName = 'MuiOutlinedInput-notchedOutline';
401
405
  const readOnlyClassName$1 = 'read-only';
406
+ const resizerClassName = 'with-resizer';
407
+ const ROW_HEIGHT = 37;
402
408
  const StyledAdornment = styled(InputAdornment)`
403
409
  .dot-icon {
404
410
  ${adornmentIconStyles()};
@@ -436,9 +442,11 @@ const StyledTextFieldContainer = styled.div`
436
442
  const StyledTextField = styled(TextField)`
437
443
  ${({
438
444
  theme,
439
- InputProps
445
+ InputProps,
446
+ $maxRows,
447
+ $minRows
440
448
  }) => css`
441
- &.${rootClassName$1h} {
449
+ &.${rootClassName$1i} {
442
450
  .MuiInputBase-root {
443
451
  margin-bottom: 0;
444
452
  }
@@ -457,9 +465,27 @@ const StyledTextField = styled(TextField)`
457
465
  height: 19px;
458
466
  }
459
467
  }
460
- .MuiInputBase-inputMultiline {
461
- padding: 0;
468
+
469
+ .MuiInputBase-multiline {
470
+ .MuiInputBase-inputMultiline {
471
+ padding: 0;
472
+ }
473
+
474
+ &.${resizerClassName} {
475
+ resize: both;
476
+ overflow: auto;
477
+ height: ${$minRows ? ROW_HEIGHT * $minRows : ROW_HEIGHT}px;
478
+ min-height: ${$minRows ? ROW_HEIGHT * $minRows : ROW_HEIGHT}px;
479
+ max-height: ${$maxRows ? `${ROW_HEIGHT * $maxRows}px` : 'unset'};
480
+ min-width: 170px;
481
+
482
+ #custom-text-input.MuiInputBase-inputMultiline {
483
+ height: 100% !important;
484
+ width: 100%;
485
+ }
486
+ }
462
487
  }
488
+
463
489
  &.${readOnlyClassName$1} .MuiInputBase-root,
464
490
  .MuiInputBase-root.Mui-disabled {
465
491
  ${readOnlyStyles(theme)};
@@ -482,7 +508,7 @@ const StyledTextField = styled(TextField)`
482
508
  margin-right: ${theme.spacing(2)};
483
509
  }
484
510
 
485
- &.${rootSelectClassName}, &.${rootClassName$1h} {
511
+ &.${rootSelectClassName}, &.${rootClassName$1i} {
486
512
  .${adornmentIconClassName} {
487
513
  color: ${theme.palette.figma.icon.black};
488
514
  p {
@@ -573,15 +599,15 @@ const StyledTextField = styled(TextField)`
573
599
  `}
574
600
  `;
575
601
 
576
- const rootClassName$1g = 'dot-action-toolbar';
602
+ const rootClassName$1h = 'dot-action-toolbar';
577
603
  const StyledToolbar = styled(Toolbar)`
578
604
  ${({
579
605
  theme
580
606
  }) => css`
581
- &.${rootClassName$1g} {
607
+ &.${rootClassName$1h} {
582
608
  border-bottom: 1px solid ${theme.palette.figma.border.default};
583
609
 
584
- .${rootClassName$1h} .MuiInputBase-root {
610
+ .${rootClassName$1i} .MuiInputBase-root {
585
611
  margin-bottom: 0;
586
612
  }
587
613
  }
@@ -595,7 +621,7 @@ const DotActionToolbar = ({
595
621
  'data-testid': dataTestId,
596
622
  variant = 'dense'
597
623
  }) => {
598
- const rootClasses = useStylesWithRootClass(rootClassName$1g, className);
624
+ const rootClasses = useStylesWithRootClass(rootClassName$1h, className);
599
625
  return jsx(StyledToolbar, {
600
626
  "aria-label": ariaLabel,
601
627
  className: rootClasses,
@@ -1665,12 +1691,12 @@ const renderNodeOrTypography = (content, typographyVariant = 'body1') => {
1665
1691
  const checkIfArrowUpPressed = event => event.key === 'ArrowUp';
1666
1692
  const checkIfArrowDownPressed = event => event.key === 'ArrowDown';
1667
1693
 
1668
- const rootClassName$1f = 'dot-alert-banner';
1694
+ const rootClassName$1g = 'dot-alert-banner';
1669
1695
  const StyledAlertBanner = styled(Alert)`
1670
1696
  ${({
1671
1697
  theme
1672
1698
  }) => css`
1673
- &.${rootClassName$1f} {
1699
+ &.${rootClassName$1g} {
1674
1700
  align-items: center;
1675
1701
  box-sizing: border-box;
1676
1702
  min-height: 48px;
@@ -1705,7 +1731,7 @@ const DotAlertBanner = ({
1705
1731
  ariaLabel,
1706
1732
  children,
1707
1733
  className,
1708
- 'data-pendoid': dataPendoId = rootClassName$1f,
1734
+ 'data-pendoid': dataPendoId = rootClassName$1g,
1709
1735
  'data-testid': dataTestId,
1710
1736
  onClose,
1711
1737
  roundedCorners = true,
@@ -1713,7 +1739,7 @@ const DotAlertBanner = ({
1713
1739
  textVariant = 'body1',
1714
1740
  width
1715
1741
  }) => {
1716
- const rootClasses = useStylesWithRootClass(rootClassName$1f, severity, className);
1742
+ const rootClasses = useStylesWithRootClass(rootClassName$1g, severity, className);
1717
1743
  /* For simple string use default component, for everything else use 'div' */
1718
1744
  const typographyComponent = isString$2(children) ? undefined : 'div';
1719
1745
  return jsx(StyledAlertBanner, {
@@ -2391,7 +2417,7 @@ const useDotCoreApiContext = () => {
2391
2417
  return useContext(DotCoreApiContext);
2392
2418
  };
2393
2419
 
2394
- const rootClassName$1e = 'dot-avatar';
2420
+ const rootClassName$1f = 'dot-avatar';
2395
2421
  const avatarSpacing = {
2396
2422
  small: 3,
2397
2423
  medium: 5,
@@ -2401,7 +2427,7 @@ const StyledAvatar = styled(Avatar)`
2401
2427
  ${({
2402
2428
  theme
2403
2429
  }) => css`
2404
- &.${rootClassName$1e} {
2430
+ &.${rootClassName$1f} {
2405
2431
  display: inline-flex;
2406
2432
  background-color: ${({
2407
2433
  color
@@ -2513,7 +2539,7 @@ const DotAvatar = ({
2513
2539
  variant = 'circular',
2514
2540
  style
2515
2541
  }) => {
2516
- const rootClasses = useStylesWithRootClass(rootClassName$1e, className);
2542
+ const rootClasses = useStylesWithRootClass(rootClassName$1f, className);
2517
2543
  const getAvatarColor = () => {
2518
2544
  if ((style === null || style === void 0 ? void 0 : style.color) !== undefined) return 'inherit';
2519
2545
  if (color) return color;
@@ -2552,12 +2578,12 @@ const DotAvatar = ({
2552
2578
  });
2553
2579
  };
2554
2580
 
2555
- const rootClassName$1d = 'dot-button';
2581
+ const rootClassName$1e = 'dot-button';
2556
2582
  const StyledButton = styled(Button)`
2557
2583
  ${({
2558
2584
  theme
2559
2585
  }) => css`
2560
- &.${rootClassName$1d} {
2586
+ &.${rootClassName$1e} {
2561
2587
  background-color: ${theme.palette.figma.primary.normal};
2562
2588
  margin: ${theme.spacing(0.5)};
2563
2589
  padding: ${theme.spacing(0.75, 2)};
@@ -2641,7 +2667,7 @@ const DotButton = forwardRef(({
2641
2667
  autoFocus = false,
2642
2668
  children,
2643
2669
  className,
2644
- 'data-pendoid': dataPendoId = rootClassName$1d,
2670
+ 'data-pendoid': dataPendoId = rootClassName$1e,
2645
2671
  'data-testid': dataTestId,
2646
2672
  disabled = false,
2647
2673
  disableRipple = false,
@@ -2657,7 +2683,7 @@ const DotButton = forwardRef(({
2657
2683
  tooltipPlacement,
2658
2684
  type = 'primary'
2659
2685
  }, ref) => {
2660
- const rootClasses = useStylesWithRootClass(rootClassName$1d, className);
2686
+ const rootClasses = useStylesWithRootClass(rootClassName$1e, className);
2661
2687
  let color;
2662
2688
  let variant;
2663
2689
  switch (type) {
@@ -2681,7 +2707,7 @@ const DotButton = forwardRef(({
2681
2707
  return jsx(DotTooltip, {
2682
2708
  placement: tooltipPlacement,
2683
2709
  title: tooltip,
2684
- "data-testid": `${dataTestId || rootClassName$1d}-tooltip`,
2710
+ "data-testid": `${dataTestId || rootClassName$1e}-tooltip`,
2685
2711
  children: jsx(StyledButton, {
2686
2712
  "aria-label": ariaLabel,
2687
2713
  autoFocus: autoFocus,
@@ -2690,7 +2716,7 @@ const DotButton = forwardRef(({
2690
2716
  },
2691
2717
  color: color,
2692
2718
  "data-pendoid": dataPendoId,
2693
- "data-testid": dataTestId || rootClassName$1d,
2719
+ "data-testid": dataTestId || rootClassName$1e,
2694
2720
  disableRipple: disableRipple,
2695
2721
  disabled: disabled,
2696
2722
  endIcon: endIcon,
@@ -2709,10 +2735,10 @@ const DotButton = forwardRef(({
2709
2735
  });
2710
2736
  });
2711
2737
 
2712
- const rootClassName$1c = 'dot-link';
2738
+ const rootClassName$1d = 'dot-link';
2713
2739
  const StyledLink = styled(Link)`
2714
2740
  ${() => css`
2715
- &.${rootClassName$1c} {
2741
+ &.${rootClassName$1d} {
2716
2742
  cursor: pointer;
2717
2743
 
2718
2744
  &:hover.MuiLink-underlineHover {
@@ -2728,7 +2754,7 @@ const DotLink = ({
2728
2754
  children,
2729
2755
  className,
2730
2756
  color = 'primary',
2731
- 'data-pendoid': dataPendoId = rootClassName$1c,
2757
+ 'data-pendoid': dataPendoId = rootClassName$1d,
2732
2758
  'data-testid': dataTestId,
2733
2759
  href,
2734
2760
  onClick,
@@ -2741,7 +2767,7 @@ const DotLink = ({
2741
2767
  underline = 'always',
2742
2768
  variant = 'body1'
2743
2769
  }) => {
2744
- const rootClasses = useStylesWithRootClass(rootClassName$1c, className);
2770
+ const rootClasses = useStylesWithRootClass(rootClassName$1d, className);
2745
2771
  useEffect(() => {
2746
2772
  // Include a console warning if the link is not a string and no ariaLabel is provided
2747
2773
  if (!isString$2(children) && !ariaLabel) {
@@ -2792,7 +2818,7 @@ const CreateUUID = () => {
2792
2818
  });
2793
2819
  };
2794
2820
 
2795
- const rootClassName$1b = 'dot-list';
2821
+ const rootClassName$1c = 'dot-list';
2796
2822
  const listItemRootClass = 'dot-list-item';
2797
2823
  const nestedListClassName = 'dot-nested-list';
2798
2824
  const nestedDrawerClassName = 'dot-nested-drawer';
@@ -2800,7 +2826,7 @@ const StyledList = styled(List)`
2800
2826
  ${({
2801
2827
  theme
2802
2828
  }) => css`
2803
- &.${rootClassName$1b} {
2829
+ &.${rootClassName$1c} {
2804
2830
  background: ${theme.palette.figma.background.level0.componentsBackground};
2805
2831
 
2806
2832
  .dot-icon {
@@ -2893,12 +2919,12 @@ const DotListDivider = ({
2893
2919
  });
2894
2920
  };
2895
2921
 
2896
- const rootClassName$1a = 'dot-progress';
2922
+ const rootClassName$1b = 'dot-progress';
2897
2923
  const StyledProgress = styled.div`
2898
2924
  ${({
2899
2925
  theme
2900
2926
  }) => css`
2901
- &.${rootClassName$1a} {
2927
+ &.${rootClassName$1b} {
2902
2928
  line-height: 0;
2903
2929
 
2904
2930
  .dot-progress-with-label-wrapper {
@@ -2949,7 +2975,7 @@ const DotProgress = ({
2949
2975
  value,
2950
2976
  variant = 'indeterminate'
2951
2977
  }) => {
2952
- const rootClasses = useStylesWithRootClass(rootClassName$1a, className);
2978
+ const rootClasses = useStylesWithRootClass(rootClassName$1b, className);
2953
2979
  useEffect(() => {
2954
2980
  if (!ariaLabel) {
2955
2981
  console.warn('a11y: DotProgress must have an ariaLabel to describe the progress component');
@@ -3015,13 +3041,13 @@ var variables = /*#__PURE__*/Object.freeze({
3015
3041
  levelTop: levelTop
3016
3042
  });
3017
3043
 
3018
- const rootClassName$19 = 'dot-popper';
3044
+ const rootClassName$1a = 'dot-popper';
3019
3045
  const arrowClassName = 'MuiPopper-arrow';
3020
3046
  const StyledPopper$1 = styled(Popper)`
3021
3047
  ${({
3022
3048
  theme
3023
3049
  }) => css`
3024
- &.${rootClassName$19} {
3050
+ &.${rootClassName$1a} {
3025
3051
  font-family: ${theme.typography.fontFamily};
3026
3052
  font-size: ${theme.typography.body1.fontSize}px;
3027
3053
 
@@ -3080,7 +3106,7 @@ const StyledPopper$1 = styled(Popper)`
3080
3106
  }
3081
3107
  }
3082
3108
 
3083
- &.${rootClassName$19}, &.${rootClassName$19} > .dot-popper-paper {
3109
+ &.${rootClassName$1a}, &.${rootClassName$1a} > .dot-popper-paper {
3084
3110
  background-color: ${theme.palette.figma.background.level1.white};
3085
3111
  }
3086
3112
  `}
@@ -3110,18 +3136,18 @@ const StyledArrow = styled('span')`
3110
3136
  `;
3111
3137
 
3112
3138
  const flyoutMenuClassName = 'dot-flyout-menu';
3113
- const rootClassName$18 = 'dot-menu';
3139
+ const rootClassName$19 = 'dot-menu';
3114
3140
  const StyledPopper = styled(Popper)`
3115
3141
  ${({
3116
3142
  theme
3117
3143
  }) => css`
3118
- &.${rootClassName$19} {
3144
+ &.${rootClassName$1a} {
3119
3145
  font-family: ${theme.typography.fontFamily};
3120
3146
  font-size: ${theme.typography.body1.fontSize}px;
3121
3147
  z-index: ${levelSecond};
3122
3148
  }
3123
- &.${rootClassName$18}, &.${rootClassName$19} {
3124
- .MuiPaper-root {
3149
+ &.${rootClassName$19}, &.${rootClassName$1a} {
3150
+ .MuiPaper-root:not(:empty) {
3125
3151
  border: 1px solid ${theme.palette.layer.n100};
3126
3152
  }
3127
3153
 
@@ -3200,14 +3226,14 @@ const MENU_ITEM_HEIGHT_NORMAL = 48;
3200
3226
  const MENU_ITEM_HEIGHT_DENSE = 36;
3201
3227
  const DEFAULT_MAX_VISIBLE_ITEMS = 7;
3202
3228
 
3203
- const rootClassName$17 = 'dot-ul';
3229
+ const rootClassName$18 = 'dot-ul';
3204
3230
  const listItemClassName$1 = 'dot-li';
3205
3231
  const listItemWithSubmenuClassName = 'dot-li-with-submenu';
3206
3232
  const StyledMenuList = styled(MenuList)`
3207
3233
  ${({
3208
3234
  theme
3209
3235
  }) => css`
3210
- &.${rootClassName$17} {
3236
+ &.${rootClassName$18} {
3211
3237
  background: ${theme.palette.figma.background.level1.white};
3212
3238
 
3213
3239
  .dot-li {
@@ -3303,7 +3329,7 @@ const DotMenuList = forwardRef(({
3303
3329
  onSubMenuCreate,
3304
3330
  selectedKey
3305
3331
  }, ref) => {
3306
- const rootClasses = useStylesWithRootClass(rootClassName$17, className);
3332
+ const rootClasses = useStylesWithRootClass(rootClassName$18, className);
3307
3333
  const [activeSubmenu, setActiveSubmenu] = useState(null);
3308
3334
  const [subItemAnchorEl, setSubItemAnchorEl] = useState(null);
3309
3335
  const openSubmenu = (target, itemKey) => {
@@ -3414,7 +3440,7 @@ const DotMenu = ({
3414
3440
  open = false,
3415
3441
  selectedKey
3416
3442
  }) => {
3417
- const rootClasses = useStylesWithRootClass(rootClassName$18, className, loading ? 'loading' : '');
3443
+ const rootClasses = useStylesWithRootClass(rootClassName$19, className, loading ? 'loading' : '');
3418
3444
  const isSubmenu = checkIfSubmenu(anchorEl);
3419
3445
  const hasSubItems = checkForSubItems(menuItems);
3420
3446
  // Timeout object is customizable when Menu component is either submenu
@@ -3502,12 +3528,12 @@ const DotMenu = ({
3502
3528
  });
3503
3529
  };
3504
3530
 
3505
- const rootClassName$16 = 'dot-drawer';
3531
+ const rootClassName$17 = 'dot-drawer';
3506
3532
  const StyledDrawer = styled(Drawer)`
3507
3533
  ${({
3508
3534
  theme
3509
3535
  }) => css`
3510
- &.${rootClassName$16} .MuiBackdrop-root {
3536
+ &.${rootClassName$17} .MuiBackdrop-root {
3511
3537
  background-color: ${theme.palette.figma.overlay.default};
3512
3538
  }
3513
3539
 
@@ -3526,12 +3552,12 @@ const StyledDrawer = styled(Drawer)`
3526
3552
  `}
3527
3553
  `;
3528
3554
 
3529
- const rootClassName$15 = 'dot-drawer-header';
3555
+ const rootClassName$16 = 'dot-drawer-header';
3530
3556
  const StyleDrawerHeader = styled.div`
3531
3557
  ${({
3532
3558
  theme
3533
3559
  }) => css`
3534
- &.${rootClassName$15} {
3560
+ &.${rootClassName$16} {
3535
3561
  padding: ${theme.spacing(0, 0, 2)};
3536
3562
  display: flex;
3537
3563
  align-items: center;
@@ -3542,13 +3568,13 @@ const StyleDrawerHeader = styled.div`
3542
3568
  `}
3543
3569
  `;
3544
3570
 
3545
- const rootClassName$14 = 'dot-icon-btn';
3571
+ const rootClassName$15 = 'dot-icon-btn';
3546
3572
  const StyledIconButton = styled(IconButton)`
3547
3573
  ${({
3548
3574
  theme,
3549
3575
  color
3550
3576
  }) => css`
3551
- &.${rootClassName$14} {
3577
+ &.${rootClassName$15} {
3552
3578
  ${color === 'inherit' ? css`
3553
3579
  color: inherit;
3554
3580
  ` : ''}
@@ -3607,7 +3633,7 @@ const DotIconButton = ({
3607
3633
  ariaRole = 'button',
3608
3634
  className,
3609
3635
  color = 'inherit',
3610
- 'data-pendoid': dataPendoId = rootClassName$14,
3636
+ 'data-pendoid': dataPendoId = rootClassName$15,
3611
3637
  'data-testid': dataTestId,
3612
3638
  disableRipple = false,
3613
3639
  disabled = false,
@@ -3620,7 +3646,7 @@ const DotIconButton = ({
3620
3646
  tooltipPlacement
3621
3647
  }) => {
3622
3648
  const rippleClassName = disableRipple ? 'ripple-disabled' : '';
3623
- const rootClasses = useStylesWithRootClass(rootClassName$14, rippleClassName, `shape-${shape}`, className);
3649
+ const rootClasses = useStylesWithRootClass(rootClassName$15, rippleClassName, `shape-${shape}`, className);
3624
3650
  return jsx(DotTooltip, {
3625
3651
  "data-testid": "icon-button-tooltip",
3626
3652
  placement: tooltipPlacement,
@@ -3655,7 +3681,7 @@ const DotDrawerHeader = ({
3655
3681
  onClose,
3656
3682
  variant
3657
3683
  }) => {
3658
- const rootClasses = useStylesWithRootClass(rootClassName$15, className);
3684
+ const rootClasses = useStylesWithRootClass(rootClassName$16, className);
3659
3685
  return jsxs(StyleDrawerHeader, {
3660
3686
  "aria-label": ariaLabel,
3661
3687
  "aria-level": 2,
@@ -3672,10 +3698,10 @@ const DotDrawerHeader = ({
3672
3698
  });
3673
3699
  };
3674
3700
 
3675
- const rootClassName$13 = 'dot-drawer-body';
3701
+ const rootClassName$14 = 'dot-drawer-body';
3676
3702
  const StyleDrawerBody = styled.div`
3677
3703
  ${() => css`
3678
- &.${rootClassName$13} {
3704
+ &.${rootClassName$14} {
3679
3705
  display: flex;
3680
3706
  .dot-drawer-close-button {
3681
3707
  align-self: self-start;
@@ -3696,7 +3722,7 @@ const DotDrawerBody = ({
3696
3722
  onClose,
3697
3723
  variant
3698
3724
  }) => {
3699
- const rootClasses = useStylesWithRootClass(rootClassName$13, className);
3725
+ const rootClasses = useStylesWithRootClass(rootClassName$14, className);
3700
3726
  return jsxs(StyleDrawerBody, {
3701
3727
  "aria-label": ariaLabel,
3702
3728
  className: rootClasses,
@@ -3711,12 +3737,12 @@ const DotDrawerBody = ({
3711
3737
  });
3712
3738
  };
3713
3739
 
3714
- const rootClassName$12 = 'dot-drawer-footer';
3740
+ const rootClassName$13 = 'dot-drawer-footer';
3715
3741
  const StyleDrawerFooter = styled.div`
3716
3742
  ${({
3717
3743
  theme
3718
3744
  }) => css`
3719
- &.${rootClassName$12} {
3745
+ &.${rootClassName$13} {
3720
3746
  padding: ${theme.spacing(2, 0, 0)};
3721
3747
  }
3722
3748
  `}
@@ -3729,7 +3755,7 @@ const DotDrawerFooter = ({
3729
3755
  className,
3730
3756
  'data-testid': dataTestId
3731
3757
  }) => {
3732
- const rootClasses = useStylesWithRootClass(rootClassName$12, className);
3758
+ const rootClasses = useStylesWithRootClass(rootClassName$13, className);
3733
3759
  return jsx(StyleDrawerFooter, {
3734
3760
  "aria-label": ariaLabel,
3735
3761
  className: rootClasses,
@@ -3745,7 +3771,7 @@ const DotDrawer = ({
3745
3771
  ariaRole = 'dialog',
3746
3772
  className,
3747
3773
  children,
3748
- 'data-pendoid': dataPendoId = rootClassName$16,
3774
+ 'data-pendoid': dataPendoId = rootClassName$17,
3749
3775
  'data-testid': dataTestId,
3750
3776
  drawerBodyProps,
3751
3777
  drawerFooterProps,
@@ -3768,7 +3794,7 @@ const DotDrawer = ({
3768
3794
  onClose(event);
3769
3795
  }
3770
3796
  };
3771
- const rootClasses = useStylesWithRootClass(rootClassName$16, className);
3797
+ const rootClasses = useStylesWithRootClass(rootClassName$17, className);
3772
3798
  const backdropEnabled = variant === 'temporary' && !(ModalProps === null || ModalProps === void 0 ? void 0 : ModalProps.hideBackdrop);
3773
3799
  const headerExists = !!drawerHeaderProps;
3774
3800
  const bodyPendoId = drawerBodyProps ? drawerBodyProps['data-pendoid'] : 'drawer-body';
@@ -4168,7 +4194,7 @@ const DotList = ({
4168
4194
  nestedListType = 'expandable',
4169
4195
  width = 240
4170
4196
  }) => {
4171
- const rootClasses = useStylesWithRootClass(rootClassName$1b, className);
4197
+ const rootClasses = useStylesWithRootClass(rootClassName$1c, className);
4172
4198
  const listWidth = typeof width === 'number' ? `${width}px` : width;
4173
4199
  const listRef = useRef();
4174
4200
  const disableCloseOnClickAway = !nestedListCloseOnClickAway && nestedListType === 'expandable';
@@ -4264,12 +4290,12 @@ const DotList = ({
4264
4290
  });
4265
4291
  };
4266
4292
 
4267
- const rootClassName$11 = 'dot-copy-button';
4293
+ const rootClassName$12 = 'dot-copy-button';
4268
4294
  const StyledCopyButton = styled.span`
4269
4295
  ${({
4270
4296
  theme
4271
4297
  }) => css`
4272
- &.${rootClassName$11} .copied-to-clipboard {
4298
+ &.${rootClassName$12} .copied-to-clipboard {
4273
4299
  color: ${theme.palette.figma.success.normal};
4274
4300
 
4275
4301
  &.MuiIcon-fontSizeSmall.button-size-small {
@@ -4295,7 +4321,7 @@ const DotCopyButton = ({
4295
4321
  color = 'inherit',
4296
4322
  copiedTooltip = 'Copied!',
4297
4323
  copyTooltip = 'Copy to clipboard',
4298
- 'data-pendoid': dataPendoId = rootClassName$11,
4324
+ 'data-pendoid': dataPendoId = rootClassName$12,
4299
4325
  'data-testid': dataTestId = 'dot-copy-button',
4300
4326
  disabled = false,
4301
4327
  disableRipple = false,
@@ -4343,7 +4369,7 @@ const DotCopyButton = ({
4343
4369
  return false;
4344
4370
  }, [value, showCopiedIcon, disabled, onClick]);
4345
4371
  return jsxs(StyledCopyButton, {
4346
- className: rootClassName$11,
4372
+ className: rootClassName$12,
4347
4373
  "data-testid": dataTestId,
4348
4374
  children: [!timedShowCopiedIcon && jsx(DotIconButton, {
4349
4375
  ariaLabel: ariaLabel,
@@ -4432,13 +4458,14 @@ const DotInputText = ({
4432
4458
  autoFocus,
4433
4459
  className,
4434
4460
  defaultValue,
4435
- 'data-pendoid': dataPendoId = rootClassName$1h,
4461
+ 'data-pendoid': dataPendoId = rootClassName$1i,
4436
4462
  'data-testid': dataTestId,
4437
4463
  disabled = false,
4438
4464
  error = false,
4439
4465
  endAdornmentTooltip,
4440
4466
  fullWidth = true,
4441
4467
  hasDebounce,
4468
+ hasResizer = false,
4442
4469
  helperText,
4443
4470
  endIcon,
4444
4471
  endText,
@@ -4478,7 +4505,7 @@ const DotInputText = ({
4478
4505
  const internalInputRef = useRef(null);
4479
4506
  const textFieldInputRef = inputRef || internalInputRef;
4480
4507
  const [inputTextState, setInputTextState] = useState(getInitialState(value));
4481
- const rootStyles = useStylesWithRootClass(rootClassName$1h, hasError, hasWarning, hasSuccess, readOnly && readOnlyClassName$1);
4508
+ const rootStyles = useStylesWithRootClass(rootClassName$1i, hasError, hasWarning, hasSuccess, readOnly && readOnlyClassName$1);
4482
4509
  useEffect(() => {
4483
4510
  if (value !== inputTextState.inputValue) {
4484
4511
  setInputTextState(getInitialState(value, defaultValue));
@@ -4552,6 +4579,8 @@ const DotInputText = ({
4552
4579
  }
4553
4580
  return null;
4554
4581
  };
4582
+ const getMinRows = () => multiline && !hasResizer ? minRows : null;
4583
+ const getMaxRows = () => multiline && !hasResizer ? maxRows : null;
4555
4584
  const wrapperClassName = useStylesWithRootClass(fullWidth !== false ? 'dot-input-text--fullwidth' : '', className);
4556
4585
  const inputClassName = useStylesWithRootClass('dot-input', readOnly && readOnlyClassName$1);
4557
4586
  return jsxs(StyledTextFieldContainer, {
@@ -4563,7 +4592,10 @@ const DotInputText = ({
4563
4592
  label,
4564
4593
  required
4565
4594
  }), jsx(StyledTextField, {
4595
+ "$maxRows": maxRows,
4596
+ "$minRows": minRows,
4566
4597
  InputProps: {
4598
+ className: multiline && hasResizer && resizerClassName || undefined,
4567
4599
  startAdornment: startAdornmentIcon(),
4568
4600
  endAdornment: getEndAdornment()
4569
4601
  },
@@ -4594,8 +4626,8 @@ const DotInputText = ({
4594
4626
  },
4595
4627
  inputRef: textFieldInputRef,
4596
4628
  label: persistentLabel ? null : label,
4597
- maxRows: multiline ? maxRows : null,
4598
- minRows: multiline ? minRows : null,
4629
+ maxRows: getMaxRows(),
4630
+ minRows: getMinRows(),
4599
4631
  multiline: multiline,
4600
4632
  name: name,
4601
4633
  onBlur: onBlur,
@@ -4614,10 +4646,10 @@ const DotInputText = ({
4614
4646
  });
4615
4647
  };
4616
4648
 
4617
- const rootClassName$10 = 'dot-search-input';
4649
+ const rootClassName$11 = 'dot-search-input';
4618
4650
  const StyledSearchInput = styled.span`
4619
4651
  ${() => css`
4620
- &.${rootClassName$10} {
4652
+ &.${rootClassName$11} {
4621
4653
  }
4622
4654
  `}
4623
4655
  `;
@@ -4634,7 +4666,7 @@ function SearchInput({
4634
4666
  tooltip = null,
4635
4667
  value
4636
4668
  }) {
4637
- const rootClasses = useStylesWithRootClass(rootClassName$10, className);
4669
+ const rootClasses = useStylesWithRootClass(rootClassName$11, className);
4638
4670
  const [searchText, setSearchText] = useState(value);
4639
4671
  let previousSearchText = '';
4640
4672
  const handleChange = useCallback(event => {
@@ -4890,12 +4922,12 @@ const recentAppInstancesSetter = (latestInstance, maxRecentItems
4890
4922
  };
4891
4923
  };
4892
4924
 
4893
- const rootClassName$$ = 'dot-app-switcher';
4925
+ const rootClassName$10 = 'dot-app-switcher';
4894
4926
  const StyledAppSwitcher = styled(DotDrawer)`
4895
4927
  ${({
4896
4928
  theme
4897
4929
  }) => css`
4898
- &.${rootClassName$$} {
4930
+ &.${rootClassName$10} {
4899
4931
  .dot-drawer-paper {
4900
4932
  padding: 0;
4901
4933
  width: 382px;
@@ -5005,7 +5037,7 @@ const DotAppSwitcherView = ({
5005
5037
  if (dotCoreApiContext !== null) {
5006
5038
  setSelectedAppType = dotCoreApiContext.setSelectedAppSwitcherAppType;
5007
5039
  }
5008
- const rootClasses = useStylesWithRootClass(rootClassName$$, className);
5040
+ const rootClasses = useStylesWithRootClass(rootClassName$10, className);
5009
5041
  const [appTypeMap, setAppTypeMap] = useState();
5010
5042
  const [appTypeLabels, setAppTypeLabels] = useState();
5011
5043
  const [appTypeMenuItems, setAppTypeMenuItems] = useState();
@@ -5383,12 +5415,12 @@ var SvgLogoDigitalAiWhite = function SvgLogoDigitalAiWhite(_ref, ref) {
5383
5415
  };
5384
5416
  var ForwardRef = /*#__PURE__*/forwardRef(SvgLogoDigitalAiWhite);
5385
5417
 
5386
- const rootClassName$_ = 'dot-sidebar';
5418
+ const rootClassName$$ = 'dot-sidebar';
5387
5419
  const StyledSidebar = styled.aside`
5388
5420
  ${({
5389
5421
  theme
5390
5422
  }) => css`
5391
- &.${rootClassName$_} {
5423
+ &.${rootClassName$$} {
5392
5424
  align-items: stretch;
5393
5425
  background: ${theme.palette.figma.background.level1.white};
5394
5426
  border-width: 0 1px;
@@ -5682,10 +5714,10 @@ const StyledSidebar = styled.aside`
5682
5714
  `}
5683
5715
  `;
5684
5716
 
5685
- const rootClassName$Z = 'dot-truncate-with-tooltip';
5717
+ const rootClassName$_ = 'dot-truncate-with-tooltip';
5686
5718
  const StyledTruncateWithTooltip = styled(Tooltip)`
5687
5719
  ${() => css`
5688
- &.${rootClassName$Z} {
5720
+ &.${rootClassName$_} {
5689
5721
  display: block;
5690
5722
  overflow: hidden;
5691
5723
  white-space: nowrap;
@@ -5716,7 +5748,7 @@ const DotTruncateWithTooltip = ({
5716
5748
  label,
5717
5749
  width
5718
5750
  }) => {
5719
- const rootClasses = useStylesWithRootClass(rootClassName$Z, className, charactersLimit ? 'dot-characters-limit' : '');
5751
+ const rootClasses = useStylesWithRootClass(rootClassName$_, className, charactersLimit ? 'dot-characters-limit' : '');
5720
5752
  return jsx(StyledTruncateWithTooltip, {
5721
5753
  "aria-label": ariaLabel,
5722
5754
  arrow: arrow,
@@ -5840,7 +5872,7 @@ const DotSidebar = ({
5840
5872
  };
5841
5873
  }, [isOpen, collapsable]);
5842
5874
  const sidebarClasses = useStylesWithRootClass('side-nav', openClass);
5843
- const rootClasses = useStylesWithRootClass(rootClassName$_, openClass, className);
5875
+ const rootClasses = useStylesWithRootClass(rootClassName$$, openClass, className);
5844
5876
  return jsxs(StyledSidebar, {
5845
5877
  "aria-label": ariaLabel,
5846
5878
  className: rootClasses,
@@ -5908,12 +5940,12 @@ const DotSidebar = ({
5908
5940
  });
5909
5941
  };
5910
5942
 
5911
- const rootClassName$Y = 'dot-badge';
5943
+ const rootClassName$Z = 'dot-badge';
5912
5944
  const StyledBadge = styled(Badge)`
5913
5945
  ${({
5914
5946
  theme
5915
5947
  }) => css`
5916
- &.${rootClassName$Y} {
5948
+ &.${rootClassName$Z} {
5917
5949
  color: ${theme.palette.figma.typography.black};
5918
5950
  word-break: normal;
5919
5951
 
@@ -5948,7 +5980,7 @@ const DotBadge = ({
5948
5980
  overlap,
5949
5981
  variant = 'dot'
5950
5982
  }) => {
5951
- const rootClasses = useStylesWithRootClass(rootClassName$Y, className);
5983
+ const rootClasses = useStylesWithRootClass(rootClassName$Z, className);
5952
5984
  return jsx(StyledBadge, {
5953
5985
  "$badgeColor": badgeColor,
5954
5986
  anchorOrigin: {
@@ -5970,7 +6002,7 @@ const DotBadge = ({
5970
6002
  });
5971
6003
  };
5972
6004
 
5973
- const rootClassName$X = 'dot-app-toolbar';
6005
+ const rootClassName$Y = 'dot-app-toolbar';
5974
6006
  const denseClassName = 'dense';
5975
6007
  const StyledMainMenu = styled(DotDrawer)`
5976
6008
  ${({
@@ -6010,7 +6042,7 @@ const StyledAppToolbar = styled.header`
6010
6042
  ${({
6011
6043
  theme
6012
6044
  }) => css`
6013
- &.${rootClassName$X} {
6045
+ &.${rootClassName$Y} {
6014
6046
  align-items: center;
6015
6047
  background: ${theme.palette.figma.appToolbar.background};
6016
6048
  border-bottom: 4px solid ${theme.palette.figma.border.default};
@@ -6132,7 +6164,7 @@ const DotAppToolbar = ({
6132
6164
  const displayAppLogo = appLogo || appLogoSmall;
6133
6165
  const mainMenuRef = useRef(null);
6134
6166
  const denseClass = dense ? denseClassName : '';
6135
- const rootClasses = useStylesWithRootClass(rootClassName$X, className, denseClass, showMainMenu ? '' : 'without-menu-icon');
6167
+ const rootClasses = useStylesWithRootClass(rootClassName$Y, className, denseClass, showMainMenu ? '' : 'without-menu-icon');
6136
6168
  const mainMenuClasses = useStylesWithRootClass('dot-main-menu', denseClass, menuOpen ? 'open' : '');
6137
6169
  const targetBreakpoint = useMediaQuery(theme => theme.breakpoints.up('lg'));
6138
6170
  useEffect(() => {
@@ -6262,14 +6294,14 @@ const DotAppToolbar = ({
6262
6294
  }) : appToolbar;
6263
6295
  };
6264
6296
 
6265
- const rootClassName$W = 'dot-autocomplete';
6297
+ const rootClassName$X = 'dot-autocomplete';
6266
6298
  const inputRootClassName = 'dot-input-root';
6267
6299
  const inputMediumClassName = 'dot-input-medium';
6268
6300
  const StyledAutocomplete = styled(Autocomplete)`
6269
6301
  ${({
6270
6302
  theme
6271
6303
  }) => css`
6272
- &.${rootClassName$W} {
6304
+ &.${rootClassName$X} {
6273
6305
  &.${inputMediumClassName} .dot-text-field .${inputRootClassName} {
6274
6306
  height: 56px;
6275
6307
  padding-left: ${theme.spacing(2)};
@@ -6306,12 +6338,12 @@ const StyledAutocomplete = styled(Autocomplete)`
6306
6338
  `}
6307
6339
  `;
6308
6340
 
6309
- const rootClassName$V = 'dot-chip';
6341
+ const rootClassName$W = 'dot-chip';
6310
6342
  const StyledChip = styled(Chip)`
6311
6343
  ${({
6312
6344
  theme
6313
6345
  }) => css`
6314
- &.${rootClassName$V} {
6346
+ &.${rootClassName$W} {
6315
6347
  background: ${theme.palette.figma.neutral.normal};
6316
6348
  border-color: ${theme.palette.figma.border.darker};
6317
6349
  color: ${theme.palette.figma.typography.black};
@@ -6417,7 +6449,7 @@ const DotChip = ({
6417
6449
  charactersLimit = DEFAULT_CHARACTERS_LIMIT,
6418
6450
  children,
6419
6451
  className,
6420
- 'data-pendoid': dataPendoId = rootClassName$V,
6452
+ 'data-pendoid': dataPendoId = rootClassName$W,
6421
6453
  'data-testid': dataTestId,
6422
6454
  disabled = false,
6423
6455
  error = false,
@@ -6430,7 +6462,7 @@ const DotChip = ({
6430
6462
  tabIndex
6431
6463
  }) => {
6432
6464
  const errorClass = error ? 'Mui-error' : '';
6433
- const rootClasses = useStylesWithRootClass(rootClassName$V, className, errorClass);
6465
+ const rootClasses = useStylesWithRootClass(rootClassName$W, className, errorClass);
6434
6466
  const getChipLabel = () => {
6435
6467
  if (charactersLimit <= 0 || children.length < charactersLimit) return children;
6436
6468
  const label = `${children.substring(0, charactersLimit)}...`;
@@ -6530,7 +6562,7 @@ const DotAutoComplete = ({
6530
6562
  autoFocus,
6531
6563
  autoHighlight,
6532
6564
  className,
6533
- 'data-pendoid': dataPendoId = rootClassName$W,
6565
+ 'data-pendoid': dataPendoId = rootClassName$X,
6534
6566
  'data-testid': dataTestId,
6535
6567
  defaultValue,
6536
6568
  dense = true,
@@ -6583,10 +6615,10 @@ const DotAutoComplete = ({
6583
6615
  const popperOpen = !readOnly && (open || isOpened);
6584
6616
  const preventDuplicateInsertion = actionItem === null || actionItem === void 0 ? void 0 : actionItem.preventDuplicateInsertion;
6585
6617
  const textFieldWarningClassName = !error && warning && warningClassName;
6586
- const rootClasses = useStylesWithRootClass(rootClassName$W, size === 'medium' && inputMediumClassName, className);
6587
- const textFieldRootClasses = useStylesWithRootClass(rootClassName$1h, readOnly && readOnlyClassName$1, textFieldWarningClassName);
6618
+ const rootClasses = useStylesWithRootClass(rootClassName$X, size === 'medium' && inputMediumClassName, className);
6619
+ const textFieldRootClasses = useStylesWithRootClass(rootClassName$1i, readOnly && readOnlyClassName$1, textFieldWarningClassName);
6588
6620
  const inputRootClasses = useStylesWithRootClass(inputRootClassName, !dense && inputMediumClassName);
6589
- const popperClasses = useStylesWithRootClass(rootClassName$19, popperClassName);
6621
+ const popperClasses = useStylesWithRootClass(rootClassName$1a, popperClassName);
6590
6622
  let highlightedOption = null;
6591
6623
  let textFieldInput;
6592
6624
  const textFieldRef = element => {
@@ -6745,6 +6777,7 @@ const DotAutoComplete = ({
6745
6777
  };
6746
6778
  return jsxs(Fragment, {
6747
6779
  children: [loading && jsx(DotProgress, {
6780
+ ariaLabel: "loading autocomplete data",
6748
6781
  color: "inherit",
6749
6782
  size: 20
6750
6783
  }), getInputAdornment(), nativeEndAdornment]
@@ -6864,10 +6897,10 @@ const DotAutoComplete = ({
6864
6897
  });
6865
6898
  };
6866
6899
 
6867
- const rootClassName$U = 'dot-avatar-group';
6900
+ const rootClassName$V = 'dot-avatar-group';
6868
6901
  const StyledAvatarGroup = styled(AvatarGroup)`
6869
6902
  ${() => css`
6870
- &.${rootClassName$U} {
6903
+ &.${rootClassName$V} {
6871
6904
  justify-content: flex-end;
6872
6905
 
6873
6906
  .MuiAvatar-root {
@@ -6886,7 +6919,7 @@ const DotAvatarGroup = ({
6886
6919
  max = 3,
6887
6920
  spacing = 'medium'
6888
6921
  }) => {
6889
- const rootClasses = useStylesWithRootClass(rootClassName$U, className);
6922
+ const rootClasses = useStylesWithRootClass(rootClassName$V, className);
6890
6923
  return jsx(StyledAvatarGroup, {
6891
6924
  "aria-label": ariaLabel,
6892
6925
  classes: {
@@ -6901,13 +6934,13 @@ const DotAvatarGroup = ({
6901
6934
  });
6902
6935
  };
6903
6936
 
6904
- const rootClassName$T = 'dot-breadcrumbs';
6937
+ const rootClassName$U = 'dot-breadcrumbs';
6905
6938
  const breadcrumbsWrapperClass = 'dot-breadcrumbs-wrapper';
6906
6939
  const StyledBreadcrumbsWrapper = styled.div`
6907
6940
  ${({
6908
6941
  theme
6909
6942
  }) => css`
6910
- &.${rootClassName$T} {
6943
+ &.${rootClassName$U} {
6911
6944
  overflow: hidden;
6912
6945
 
6913
6946
  .dot-breadcrumbs-menu {
@@ -6927,7 +6960,7 @@ const StyledBreadcrumbs = styled(Breadcrumbs)`
6927
6960
  ${({
6928
6961
  theme
6929
6962
  }) => css`
6930
- &.${rootClassName$T} {
6963
+ &.${rootClassName$U} {
6931
6964
  margin-bottom: 0;
6932
6965
 
6933
6966
  .MuiBreadcrumbs-ol {
@@ -7255,7 +7288,7 @@ const DotBreadcrumbs = ({
7255
7288
  children: [jsx(StyledBreadcrumbs, {
7256
7289
  "aria-label": "breadcrumb",
7257
7290
  classes: {
7258
- root: rootClassName$T,
7291
+ root: rootClassName$U,
7259
7292
  ol: 'dot-ol',
7260
7293
  li: 'dot-li'
7261
7294
  },
@@ -7286,14 +7319,14 @@ const DotBreadcrumbs = ({
7286
7319
  });
7287
7320
  };
7288
7321
 
7289
- const rootClassName$S = 'dot-button-toggle';
7322
+ const rootClassName$T = 'dot-button-toggle';
7290
7323
  // TODO: need to update ripple color
7291
7324
  // https://github.com/mui/material-ui/issues/28543
7292
7325
  const StyledToggleButtonGroup = styled(ToggleButtonGroup)`
7293
7326
  ${({
7294
7327
  theme
7295
7328
  }) => css`
7296
- &.${rootClassName$S} {
7329
+ &.${rootClassName$T} {
7297
7330
  button:not(.MuiToggleButton-sizeLarge):not(.MuiToggleButton-sizeSmall) {
7298
7331
  /* Override height for medium size */
7299
7332
  height: ${theme.spacing(5)};
@@ -7409,7 +7442,7 @@ const DotButtonToggle = ({
7409
7442
  buttonOptions,
7410
7443
  className,
7411
7444
  color,
7412
- 'data-pendoid': dataPendoId = rootClassName$S,
7445
+ 'data-pendoid': dataPendoId = rootClassName$T,
7413
7446
  'data-testid': dataTestId = 'dot-toggle',
7414
7447
  disableFocusRipple = false,
7415
7448
  disableRipple = false,
@@ -7419,7 +7452,7 @@ const DotButtonToggle = ({
7419
7452
  size = 'medium',
7420
7453
  value
7421
7454
  }) => {
7422
- const rootClasses = useStylesWithRootClass(rootClassName$S, className);
7455
+ const rootClasses = useStylesWithRootClass(rootClassName$T, className);
7423
7456
  const renderToggleButton = ({
7424
7457
  ariaLabel: optionAriaLabel,
7425
7458
  badgeContent: optionBadgeContent,
@@ -7502,12 +7535,12 @@ const TooltipToggleButton = forwardRef((_a, ref) => {
7502
7535
  }));
7503
7536
  });
7504
7537
 
7505
- const rootClassName$R = 'dot-card';
7538
+ const rootClassName$S = 'dot-card';
7506
7539
  const StyledCard = styled(Card)`
7507
7540
  ${({
7508
7541
  theme
7509
7542
  }) => css`
7510
- &.${rootClassName$R} {
7543
+ &.${rootClassName$S} {
7511
7544
  background-color: ${theme.palette.figma.background.level1.white};
7512
7545
  }
7513
7546
  `}
@@ -7519,7 +7552,7 @@ const DotCard = ({
7519
7552
  className,
7520
7553
  'data-testid': dataTestId
7521
7554
  }) => {
7522
- const rootClasses = useStylesWithRootClass(rootClassName$R, className);
7555
+ const rootClasses = useStylesWithRootClass(rootClassName$S, className);
7523
7556
  return jsx(StyledCard, {
7524
7557
  "aria-label": ariaLabel,
7525
7558
  classes: {
@@ -7548,12 +7581,12 @@ const DotCardContent = ({
7548
7581
  });
7549
7582
  };
7550
7583
 
7551
- const rootClassName$Q = 'dot-card-footer';
7584
+ const rootClassName$R = 'dot-card-footer';
7552
7585
  const StyledDiv = styled.div`
7553
7586
  ${({
7554
7587
  theme
7555
7588
  }) => css`
7556
- &.${rootClassName$Q} {
7589
+ &.${rootClassName$R} {
7557
7590
  padding: ${theme.spacing(2)};
7558
7591
  }
7559
7592
  `}
@@ -7565,7 +7598,7 @@ const DotCardFooter = ({
7565
7598
  className,
7566
7599
  'data-testid': dataTestId
7567
7600
  }) => {
7568
- const rootClasses = useStylesWithRootClass(rootClassName$Q, className);
7601
+ const rootClasses = useStylesWithRootClass(rootClassName$R, className);
7569
7602
  return jsx(StyledDiv, {
7570
7603
  "aria-label": ariaLabel,
7571
7604
  className: rootClasses,
@@ -7574,12 +7607,12 @@ const DotCardFooter = ({
7574
7607
  });
7575
7608
  };
7576
7609
 
7577
- const rootClassName$P = 'dot-card-header';
7610
+ const rootClassName$Q = 'dot-card-header';
7578
7611
  const StyledCardHeader = styled(CardHeader)`
7579
7612
  ${({
7580
7613
  theme
7581
7614
  }) => css`
7582
- &.${rootClassName$P} {
7615
+ &.${rootClassName$Q} {
7583
7616
  .MuiCardHeader-content {
7584
7617
  overflow-x: hidden;
7585
7618
 
@@ -7602,7 +7635,7 @@ const DotCardHeader = ({
7602
7635
  title,
7603
7636
  titleSize = 'large'
7604
7637
  }) => {
7605
- const rootClasses = useStylesWithRootClass(rootClassName$P, className);
7638
+ const rootClasses = useStylesWithRootClass(rootClassName$Q, className);
7606
7639
  const nonSmallTitleSize = titleSize === 'medium' ? 'h3' : 'h2';
7607
7640
  const titleVariant = titleSize === 'small' ? 'h4' : nonSmallTitleSize;
7608
7641
  const subheaderVariant = subheaderSize === 'small' ? 'body2' : 'body1';
@@ -7637,9 +7670,9 @@ const DotCardHeader = ({
7637
7670
  });
7638
7671
  };
7639
7672
 
7640
- const rootClassName$O = 'dot-form-control-label';
7673
+ const rootClassName$P = 'dot-form-control-label';
7641
7674
  const StyledFormControlLabel = styled(FormControlLabel)`
7642
- &.${rootClassName$O} {
7675
+ &.${rootClassName$P} {
7643
7676
  .MuiFormControlLabel-label {
7644
7677
  margin-bottom: 0;
7645
7678
  padding: 0 0 0 4px;
@@ -7662,12 +7695,12 @@ const StyledFormControlLabel = styled(FormControlLabel)`
7662
7695
  }
7663
7696
  `;
7664
7697
 
7665
- const rootClassName$N = 'dot-checkbox';
7698
+ const rootClassName$O = 'dot-checkbox';
7666
7699
  const StyledCheckbox = styled(Checkbox)`
7667
7700
  ${({
7668
7701
  theme
7669
7702
  }) => css`
7670
- &.${rootClassName$N} {
7703
+ &.${rootClassName$O} {
7671
7704
  padding: ${theme.spacing(1)};
7672
7705
 
7673
7706
  &.MuiCheckbox-indeterminate {
@@ -7686,7 +7719,7 @@ function DotCheckbox({
7686
7719
  ariaLabelledby,
7687
7720
  checked,
7688
7721
  className,
7689
- 'data-pendoid': dataPendoId = rootClassName$O,
7722
+ 'data-pendoid': dataPendoId = rootClassName$P,
7690
7723
  'data-testid': dataTestId,
7691
7724
  disabled,
7692
7725
  disableRipple,
@@ -7701,14 +7734,14 @@ function DotCheckbox({
7701
7734
  size = 'medium',
7702
7735
  value
7703
7736
  }) {
7704
- const rootClasses = useStylesWithRootClass(rootClassName$O, className);
7737
+ const rootClasses = useStylesWithRootClass(rootClassName$P, className);
7705
7738
  const handleChange = event => {
7706
7739
  onChange && onChange(event, event.target.value);
7707
7740
  };
7708
7741
  const checkboxControl = jsx(StyledCheckbox, {
7709
7742
  checked: checked,
7710
7743
  classes: {
7711
- root: rootClassName$N
7744
+ root: rootClassName$O
7712
7745
  },
7713
7746
  color: "primary",
7714
7747
  "data-pendoid": dataPendoId,
@@ -7737,13 +7770,13 @@ function DotCheckbox({
7737
7770
  });
7738
7771
  }
7739
7772
 
7740
- const rootClassName$M = 'dot-form-group';
7773
+ const rootClassName$N = 'dot-form-group';
7741
7774
  const groupLabelClassName = 'dot-form-group-label';
7742
7775
  const startAdornmentClassName = 'dot-start-adornment';
7743
7776
  const endAdornmentClassName = 'dot-end-adornment';
7744
7777
  const placementClassName = 'dot-';
7745
7778
  const StyledFormControl = styled(FormControl)`
7746
- &.${rootClassName$M} {
7779
+ &.${rootClassName$N} {
7747
7780
  .MuiFormLabel-root {
7748
7781
  width: 100%;
7749
7782
  line-height: 24px;
@@ -7774,7 +7807,7 @@ const StyledFormControl = styled(FormControl)`
7774
7807
  }
7775
7808
  `;
7776
7809
 
7777
- const rootClassName$L = 'dot-checkbox-group';
7810
+ const rootClassName$M = 'dot-checkbox-group';
7778
7811
  const wrapperClassName$1 = 'dot-checkbox-group-wrapper';
7779
7812
  const checkboxListClassName = 'dot-checkbox-list';
7780
7813
  const checkboxListItemClassName = 'dot-checkbox-list-item';
@@ -7783,7 +7816,7 @@ const StyledCheckboxGroup = styled.div`
7783
7816
  theme
7784
7817
  }) => css`{
7785
7818
  &.${wrapperClassName$1} {
7786
- .${rootClassName$L} {
7819
+ .${rootClassName$M} {
7787
7820
  width: 100%;
7788
7821
  }
7789
7822
 
@@ -7810,7 +7843,7 @@ const StyledCheckboxGroup = styled.div`
7810
7843
  margin-top: 0;
7811
7844
  padding-left: ${theme.spacing(2.5)};
7812
7845
 
7813
- .${rootClassName$O} {
7846
+ .${rootClassName$P} {
7814
7847
  margin: 0;
7815
7848
  }
7816
7849
  }
@@ -7818,13 +7851,13 @@ const StyledCheckboxGroup = styled.div`
7818
7851
  `}
7819
7852
  `;
7820
7853
 
7821
- const rootClassName$K = 'dot-form-group';
7854
+ const rootClassName$L = 'dot-form-group';
7822
7855
  const StyledFormGroup = styled(FormGroup)`
7823
7856
  ${({
7824
7857
  theme,
7825
7858
  row
7826
7859
  }) => css`
7827
- &.${rootClassName$K} > * {
7860
+ &.${rootClassName$L} > * {
7828
7861
  margin: ${row ? `${theme.spacing(0.5)}` : 0};
7829
7862
  }
7830
7863
  `}
@@ -7837,7 +7870,7 @@ function DotFormGroup({
7837
7870
  'data-testid': dataTestId,
7838
7871
  row
7839
7872
  }) {
7840
- const rootClasses = useStylesWithRootClass(rootClassName$M, className);
7873
+ const rootClasses = useStylesWithRootClass(rootClassName$N, className);
7841
7874
  return jsx(StyledFormGroup, {
7842
7875
  "aria-label": ariaLabel,
7843
7876
  classes: {
@@ -7876,7 +7909,7 @@ function DotCheckboxGroup({
7876
7909
  size = 'medium'
7877
7910
  }) {
7878
7911
  const placement = `${placementClassName}${labelPlacement}`;
7879
- const rootClasses = useStylesWithRootClass(rootClassName$M, rootClassName$L, className, placement);
7912
+ const rootClasses = useStylesWithRootClass(rootClassName$N, rootClassName$M, className, placement);
7880
7913
  const [selectedOptions, setSelectedOptions] = useState(defaultValues);
7881
7914
  const [allChecked, setAllChecked] = useState(false);
7882
7915
  /* This will ensure that state can be updated from the outside */
@@ -7961,12 +7994,12 @@ function DotCheckboxGroup({
7961
7994
  });
7962
7995
  }
7963
7996
 
7964
- const rootClassName$J = 'chip-list';
7997
+ const rootClassName$K = 'chip-list';
7965
7998
  const StyledChipList = styled.div`
7966
7999
  ${({
7967
8000
  theme
7968
8001
  }) => css`
7969
- &.${rootClassName$J} {
8002
+ &.${rootClassName$K} {
7970
8003
  display: flex;
7971
8004
  gap: ${theme.spacing(1)};
7972
8005
  }
@@ -8041,19 +8074,19 @@ function DotChipList({
8041
8074
  setChips(itemElements);
8042
8075
  }, [items, maxChars]);
8043
8076
  return jsx(StyledChipList, {
8044
- className: rootClassName$J,
8077
+ className: rootClassName$K,
8045
8078
  "data-testid": dataTestId,
8046
8079
  style: style,
8047
8080
  children: chips
8048
8081
  });
8049
8082
  }
8050
8083
 
8051
- const rootClassName$I = 'dot-dialog';
8084
+ const rootClassName$J = 'dot-dialog';
8052
8085
  const StyledDialog = styled(Dialog)`
8053
8086
  ${({
8054
8087
  theme
8055
8088
  }) => css`
8056
- &.${rootClassName$I} {
8089
+ &.${rootClassName$J} {
8057
8090
  .MuiDialog-paper {
8058
8091
  background: ${theme.palette.figma.background.level1.white};
8059
8092
  color: ${theme.palette.figma.typography.black};
@@ -8099,7 +8132,7 @@ const DotDialog = ({
8099
8132
  cancelButtonProps,
8100
8133
  cancelButtonVisible = true,
8101
8134
  className,
8102
- 'data-pendoid': dataPendoId = rootClassName$I,
8135
+ 'data-pendoid': dataPendoId = rootClassName$J,
8103
8136
  'data-testid': dataTestId,
8104
8137
  children,
8105
8138
  closeIconVisible,
@@ -8112,7 +8145,7 @@ const DotDialog = ({
8112
8145
  submitButtonProps,
8113
8146
  title
8114
8147
  }) => {
8115
- const rootClasses = useStylesWithRootClass(rootClassName$I, className);
8148
+ const rootClasses = useStylesWithRootClass(rootClassName$J, className);
8116
8149
  const cancelClasses = useStylesWithRootClass(cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.className, 'cancel-button');
8117
8150
  const [isOpen, setIsOpen] = useState(open);
8118
8151
  useEffect(() => {
@@ -8230,7 +8263,7 @@ const DotConfirmationDialog = ({
8230
8263
  });
8231
8264
  };
8232
8265
 
8233
- const rootClassName$H = 'dot-grid';
8266
+ const rootClassName$I = 'dot-grid';
8234
8267
  const frGetter = value => typeof value === 'number' ? `repeat(${value}, 1fr)` : value;
8235
8268
  const breakpointsGetter$1 = (theme, columnsBreakpoints, columnGap, rowGap) => `${theme.breakpoints.up('xs')} {
8236
8269
  column-gap: ${`${columnGap.xs}px`};
@@ -8282,7 +8315,7 @@ const Grid = ({
8282
8315
  className,
8283
8316
  children
8284
8317
  }) => {
8285
- const rootClasses = useStylesWithRootClass(rootClassName$H, className);
8318
+ const rootClasses = useStylesWithRootClass(rootClassName$I, className);
8286
8319
  return jsx("div", {
8287
8320
  className: rootClasses,
8288
8321
  children: children
@@ -8301,7 +8334,7 @@ const StyledGrid = styled(Grid)`
8301
8334
  theme,
8302
8335
  width
8303
8336
  }) => css`
8304
- &.${rootClassName$H} {
8337
+ &.${rootClassName$I} {
8305
8338
  display: grid;
8306
8339
  grid-template-rows: ${frGetter(rows)};
8307
8340
  ${columns ? `${columns && `grid-template-columns: ${frGetter(columns)}`};` : breakpointsGetter$1(theme, columnsBreakpoints, columnGap, rowGap)}
@@ -8507,12 +8540,12 @@ const CssGridDebug = ({
8507
8540
  });
8508
8541
  };
8509
8542
 
8510
- const rootClassName$G = 'dot-pill';
8543
+ const rootClassName$H = 'dot-pill';
8511
8544
  const StyledPill = styled(Chip)`
8512
8545
  ${({
8513
8546
  theme
8514
8547
  }) => css`
8515
- &.${rootClassName$G} {
8548
+ &.${rootClassName$H} {
8516
8549
  background-color: ${({
8517
8550
  backgroundcolor,
8518
8551
  variant
@@ -8636,7 +8669,7 @@ const DotPill = ({
8636
8669
  status = 'default',
8637
8670
  variant = 'filled'
8638
8671
  }) => {
8639
- const rootClasses = useStylesWithRootClass(rootClassName$G, className, status);
8672
+ const rootClasses = useStylesWithRootClass(rootClassName$H, className, status);
8640
8673
  return jsx(StyledPill, {
8641
8674
  "aria-label": ariaLabel,
8642
8675
  bordercolor: bordercolor,
@@ -9678,6 +9711,17 @@ const DotMetadataApiProvider = ({
9678
9711
  }
9679
9712
  });
9680
9713
  },
9714
+ deleteDashboard: dashboardId => {
9715
+ setAccountIdHeader(accountId);
9716
+ return cancelablePromise(DashboardsService.deleteDashboardsService(dashboardId)).then(() => {
9717
+ setDashboardsError(null);
9718
+ setDashboards(dashboards.filter(dashboard => dashboard.id !== dashboardId));
9719
+ return true;
9720
+ }).catch(error => {
9721
+ setDashboardsError(error);
9722
+ return false;
9723
+ });
9724
+ },
9681
9725
  duplicateDashboard: (dashboardId, dashboard) => {
9682
9726
  setAccountIdHeader(accountId);
9683
9727
  return cancelablePromise(DashboardsService.postDashboardsService1(dashboardId, dashboard)).then(response => {
@@ -9830,18 +9874,18 @@ function addAutoHideDuration(severity) {
9830
9874
  return severity === 'error' ? null : 10000;
9831
9875
  }
9832
9876
 
9833
- const rootClassName$F = 'dot-snackbar';
9877
+ const rootClassName$G = 'dot-snackbar';
9834
9878
  const StyledSnackbar = styled(Snackbar)`
9835
9879
  ${({
9836
9880
  theme,
9837
9881
  width,
9838
9882
  $anchorOriginTop
9839
9883
  }) => css`
9840
- &.${rootClassName$F} {
9884
+ &.${rootClassName$G} {
9841
9885
  .MuiAlert-message {
9842
9886
  word-break: break-word;
9843
9887
  }
9844
- .${rootClassName$1f} {
9888
+ .${rootClassName$1g} {
9845
9889
  align-items: flex-start;
9846
9890
  }
9847
9891
  &.MuiSnackbar-anchorOriginTopLeft,
@@ -9893,7 +9937,7 @@ const DotSnackbar = ({
9893
9937
  }) => {
9894
9938
  const hasActions = !!(primaryAction || secondaryAction);
9895
9939
  const calculatedAutoHideDuration = autoHideDuration === null || autoHideDuration > 0 ? autoHideDuration : addAutoHideDuration(severity);
9896
- const rootClasses = useStylesWithRootClass(rootClassName$F, className);
9940
+ const rootClasses = useStylesWithRootClass(rootClassName$G, className);
9897
9941
  const handleSnackbarClose = reason => {
9898
9942
  if (!reason || hideOnClickAway || !hideOnClickAway && reason !== 'clickaway') {
9899
9943
  onClose();
@@ -9951,10 +9995,10 @@ const DotSnackbar = ({
9951
9995
  });
9952
9996
  };
9953
9997
 
9954
- const rootClassName$E = 'dot-snackbar-container';
9998
+ const rootClassName$F = 'dot-snackbar-container';
9955
9999
  const StyledSnackbarContainer = styled.div`
9956
10000
  ${() => css`
9957
- &.${rootClassName$E} {
10001
+ &.${rootClassName$F} {
9958
10002
  position: absolute;
9959
10003
  top: 0;
9960
10004
  width: 250px;
@@ -9985,10 +10029,10 @@ const DotSnackbarContainer = ({
9985
10029
  };
9986
10030
  }
9987
10031
  return jsx(StyledSnackbarContainer, {
9988
- className: rootClassName$E,
10032
+ className: rootClassName$F,
9989
10033
  children: jsx("div", {
9990
- className: rootClassName$E,
9991
- "data-testid": rootClassName$E,
10034
+ className: rootClassName$F,
10035
+ "data-testid": rootClassName$F,
9992
10036
  children: alerts.slice().reverse().map(alert => {
9993
10037
  return jsx(DotSnackbar, {
9994
10038
  autoHideDuration: alert.autoHideDuration,
@@ -10059,12 +10103,12 @@ const useEnqueueErrorMessage = error => {
10059
10103
  }, [error]);
10060
10104
  };
10061
10105
 
10062
- const rootClassName$D = 'dot-dashboard-details';
10106
+ const rootClassName$E = 'dot-dashboard-details';
10063
10107
  const StyledDashboardDetails = styled(DotDrawer)`
10064
10108
  ${({
10065
10109
  theme
10066
10110
  }) => css`
10067
- &.${rootClassName$D} {
10111
+ &.${rootClassName$E} {
10068
10112
  .dot-drawer-paper {
10069
10113
  padding: 0;
10070
10114
  width: 382px;
@@ -10187,7 +10231,7 @@ const DotDashboardDetailsView = ({
10187
10231
  zIndex = 990
10188
10232
  }) => {
10189
10233
  var _a, _b;
10190
- const rootClasses = useStylesWithRootClass(rootClassName$D, className);
10234
+ const rootClasses = useStylesWithRootClass(rootClassName$E, className);
10191
10235
  const closeHandler = useCallback(event => {
10192
10236
  onClose && onClose(event);
10193
10237
  }, [onClose]);
@@ -10799,6 +10843,151 @@ function DotDashboardDialog({
10799
10843
  });
10800
10844
  }
10801
10845
 
10846
+ const rootClassName$D = 'dot-impact-dialog';
10847
+ const StyledImpactDialog = styled(DotDialog)`
10848
+ ${({
10849
+ theme
10850
+ }) => css`
10851
+ &.${rootClassName$D} {
10852
+ .high-impact-default-content {
10853
+ margin-top: ${theme.spacing(2)};
10854
+ margin-bottom: ${theme.spacing(3)};
10855
+ }
10856
+ .item-name {
10857
+ font-weight: bold;
10858
+ white-space: pre;
10859
+ }
10860
+ }
10861
+ `}
10862
+ `;
10863
+
10864
+ function capitalize(word) {
10865
+ return word[0].toUpperCase() + word.slice(1);
10866
+ }
10867
+ function HighImpact({
10868
+ message,
10869
+ record,
10870
+ action,
10871
+ objectType,
10872
+ inputValue,
10873
+ handleUpdate
10874
+ }) {
10875
+ const defaultMessage = useMemo(() => jsxs(DotTypography, {
10876
+ className: "high-impact-default-content",
10877
+ variant: "body1",
10878
+ children: ["This action cannot be undone. This will permanently", ' ', action.toUpperCase(), objectType && ' the ', jsx("span", {
10879
+ className: "item-name",
10880
+ children: record
10881
+ }), objectType && ` ${objectType}`, ". Some data may be lost."]
10882
+ }), [action, objectType, record]);
10883
+ return jsxs(Fragment, {
10884
+ children: [message ? message : defaultMessage, jsxs(DotTypography, {
10885
+ variant: "body1",
10886
+ children: ["Please type ", jsx("span", {
10887
+ className: "item-name",
10888
+ children: record
10889
+ }), " to confirm."]
10890
+ }), jsx(DotInputText, {
10891
+ autoFocus: true,
10892
+ onChange: handleUpdate,
10893
+ value: inputValue,
10894
+ type: "text",
10895
+ name: "record-name",
10896
+ id: "record-name"
10897
+ })]
10898
+ });
10899
+ }
10900
+ function MediumImpact({
10901
+ message,
10902
+ record,
10903
+ action
10904
+ }) {
10905
+ const defaultMessage = useMemo(() => jsxs(DotTypography, {
10906
+ children: ["You are about to ", action.toUpperCase(), jsxs("strong", {
10907
+ children: [" ", record]
10908
+ }), ". This action cannot be undone."]
10909
+ }), [action, record]);
10910
+ if (message) {
10911
+ return jsx(DotTypography, {
10912
+ children: message
10913
+ });
10914
+ }
10915
+ return defaultMessage;
10916
+ }
10917
+ const DotImpactDialog = ({
10918
+ 'data-testid': dataTestId,
10919
+ className,
10920
+ record = '',
10921
+ action = 'delete',
10922
+ actionIcon = 'delete',
10923
+ objectType,
10924
+ impact = 'medium',
10925
+ message = null,
10926
+ open,
10927
+ onSubmit,
10928
+ onCancel
10929
+ }) => {
10930
+ const [inputValue, setInputField] = useState('');
10931
+ const [buttonDisabled, setButtonDisabled] = useState(true);
10932
+ const handleUpdate = useCallback(e => {
10933
+ setInputField(e.target.value);
10934
+ }, []);
10935
+ useEffect(() => {
10936
+ if (impact === 'high' && !objectType) {
10937
+ console.warn("The 'objectType' property should be passed to DotImpactDialog when 'impact' property value is 'high'.");
10938
+ }
10939
+ }, [impact, objectType]);
10940
+ useEffect(() => {
10941
+ if (impact === 'medium') return setButtonDisabled(false);
10942
+ if (record && record === inputValue) {
10943
+ return setButtonDisabled(false);
10944
+ } else if (record !== inputValue) {
10945
+ return setButtonDisabled(true);
10946
+ }
10947
+ }, [impact, inputValue, record]);
10948
+ const submitButtonLabel = useMemo(() => {
10949
+ switch (impact) {
10950
+ case 'high':
10951
+ return `I understand the risks, ${capitalize(action)} ${record}.`;
10952
+ case 'medium':
10953
+ return `${capitalize(action)}`;
10954
+ }
10955
+ return '';
10956
+ }, [action, capitalize, impact, record]);
10957
+ const rootClasses = useStylesWithRootClass(rootClassName$D, className);
10958
+ return jsx(StyledImpactDialog, {
10959
+ "data-testid": dataTestId,
10960
+ className: rootClasses,
10961
+ open: open,
10962
+ title: "Are you sure?",
10963
+ ariaLabel: `${impact}-impact-dialog`,
10964
+ closeIconVisible: false,
10965
+ onSubmit: onSubmit,
10966
+ onCancel: onCancel,
10967
+ submitButtonProps: {
10968
+ disabled: buttonDisabled,
10969
+ type: 'destructive',
10970
+ label: submitButtonLabel,
10971
+ 'data-testid': `${impact}-impact-button`,
10972
+ startIcon: jsx(DotIcon, {
10973
+ iconId: actionIcon
10974
+ })
10975
+ },
10976
+ children: impact === 'high' ? jsx(HighImpact, {
10977
+ inputValue: inputValue,
10978
+ action: action,
10979
+ handleUpdate: handleUpdate,
10980
+ record: record,
10981
+ objectType: objectType,
10982
+ message: message
10983
+ }) : jsx(MediumImpact, {
10984
+ record: record,
10985
+ action: action,
10986
+ message: message
10987
+ })
10988
+ });
10989
+ };
10990
+
10802
10991
  const InlineMessage = styled(DotTypography)`
10803
10992
  ${({
10804
10993
  theme
@@ -11224,8 +11413,26 @@ const StyledDotMenu = styled(DotMenu)`
11224
11413
  }) => css`
11225
11414
  z-index: 9999;
11226
11415
 
11227
- .dot-link .dot-icon {
11228
- margin-right: ${theme.spacing(1)};
11416
+ &.dot-menu {
11417
+ width: 200px;
11418
+
11419
+ .dot-ul .dot-li {
11420
+ padding: 0;
11421
+
11422
+ .dot-link {
11423
+ padding: ${theme.spacing(0.5, 2)};
11424
+
11425
+ .dot-icon {
11426
+ margin-right: ${theme.spacing(2)};
11427
+ }
11428
+ }
11429
+ .dashboard-details-border {
11430
+ border-top: 1px solid #999;
11431
+ width: 100%;
11432
+ margin-bottom: ${theme.spacing(1)};
11433
+ margin-top: ${theme.spacing(1)};
11434
+ }
11435
+ }
11229
11436
  }
11230
11437
  `}
11231
11438
  `;
@@ -11233,6 +11440,7 @@ const StyledDotMenu = styled(DotMenu)`
11233
11440
  function DotDashboardOptionsMenu({
11234
11441
  dashboard,
11235
11442
  isEdit = false,
11443
+ onStartDelete,
11236
11444
  onStartDuplicate,
11237
11445
  onStartStatusChange,
11238
11446
  onViewMode,
@@ -11310,7 +11518,33 @@ function DotDashboardOptionsMenu({
11310
11518
  onclick: handleDuplicateClick
11311
11519
  });
11312
11520
  }
11521
+ if (onStartDelete && !dashboard.is_ootb_dashboard) {
11522
+ const handleDeleteClick = () => {
11523
+ handleMenuClose();
11524
+ onStartDelete(dashboard);
11525
+ };
11526
+ menuItems.push({
11527
+ children: jsxs(DotLink, {
11528
+ ariaLabel: "Delete dashboard",
11529
+ color: "inherit",
11530
+ onClick: handleDeleteClick,
11531
+ underline: "none",
11532
+ children: [jsx(DotIcon, {
11533
+ iconId: "delete"
11534
+ }), " Delete"]
11535
+ }),
11536
+ key: 'delete',
11537
+ onclick: handleDeleteClick
11538
+ });
11539
+ }
11313
11540
  if (onDetails) {
11541
+ menuItems.push({
11542
+ children: jsx("div", {
11543
+ className: "dashboard-details-border"
11544
+ }),
11545
+ disabled: true,
11546
+ key: 'dashboard-details-border'
11547
+ });
11314
11548
  menuItems.push({
11315
11549
  children: jsxs(DotLink, {
11316
11550
  ariaLabel: "Dashboard details",
@@ -11321,6 +11555,7 @@ function DotDashboardOptionsMenu({
11321
11555
  iconId: "file-lines"
11322
11556
  }), " Details"]
11323
11557
  }),
11558
+ classes: 'dashboard-details',
11324
11559
  key: 'dashboard-details',
11325
11560
  onClick: () => onDetails(dashboard)
11326
11561
  });
@@ -11337,6 +11572,7 @@ function DotDashboardOptionsMenu({
11337
11572
  className: "card-header-action-menu",
11338
11573
  disablePortal: true,
11339
11574
  id: "card-header-action-menu",
11575
+ menuItemHeight: "auto",
11340
11576
  menuItems: menuItems,
11341
11577
  open: open,
11342
11578
  onLeave: handleMenuClose
@@ -11429,6 +11665,7 @@ function DotDashboardActions({
11429
11665
  onClose,
11430
11666
  onFavorite,
11431
11667
  onStatusChanged,
11668
+ onDeleted,
11432
11669
  onDuplicated,
11433
11670
  onViewMode
11434
11671
  }) {
@@ -11436,14 +11673,19 @@ function DotDashboardActions({
11436
11673
  // they are evaluated before any context imports. If they are evaluated
11437
11674
  // after they can cause React state issues when rendering.
11438
11675
  const [dashboardToCopy, setDashboardToCopy] = useState(null);
11676
+ const [dashboardToDelete, setDashboardToDelete] = useState(null);
11439
11677
  const [dashboardToPublish, setDashboardToPublish] = useState(null);
11440
11678
  const [dashboardToUnpublish, setDashboardToUnpublish] = useState(null);
11441
11679
  const [appCategories, setAppCategories] = useState(null);
11442
11680
  const {
11681
+ deleteDashboard,
11443
11682
  duplicateDashboard,
11444
11683
  getCategories,
11445
11684
  setOpenedDashboardDetails
11446
11685
  } = useDotMetadataApiContext();
11686
+ const {
11687
+ cancelablePromise
11688
+ } = useCancelablePromise();
11447
11689
  useEffect(() => {
11448
11690
  var _a;
11449
11691
  if (dashboard && ((_a = dashboard.target_apps) === null || _a === void 0 ? void 0 : _a.length) > 0) {
@@ -11465,6 +11707,16 @@ function DotDashboardActions({
11465
11707
  setDashboardToUnpublish(null);
11466
11708
  setDashboardToPublish(dashboard);
11467
11709
  }, [dashboard]);
11710
+ const handleDeleteClose = useCallback(() => {
11711
+ setDashboardToDelete(null);
11712
+ }, []);
11713
+ const handleDeleteSubmit = useCallback(() => __awaiter(this, void 0, void 0, function* () {
11714
+ const dashboardId = dashboardToDelete.id;
11715
+ return cancelablePromise(deleteDashboard(dashboardId)).then(deleted => {
11716
+ setDashboardToDelete(null);
11717
+ onDeleted(dashboardId, deleted);
11718
+ });
11719
+ }), [dashboardToDelete, onDeleted]);
11468
11720
  const handleDuplicateClose = useCallback(() => {
11469
11721
  setDashboardToCopy(null);
11470
11722
  }, []);
@@ -11477,15 +11729,19 @@ function DotDashboardActions({
11477
11729
  };
11478
11730
  return duplicateDashboard(dashboard.id, copyData).then(result => {
11479
11731
  if (result && 'id' in result) {
11480
- onDuplicated(result, isDone);
11732
+ onDuplicated && onDuplicated(result, isDone);
11481
11733
  }
11482
11734
  });
11483
- }, [dashboard]);
11735
+ }, [dashboard, onDuplicated]);
11736
+ const handleStartDelete = useCallback(dashboardToDel => {
11737
+ setDashboardToDelete(dashboardToDel);
11738
+ }, []);
11484
11739
  const handleStartDuplicate = useCallback(dashboardToDupe => {
11485
11740
  setDashboardToCopy(dashboardToDupe);
11486
11741
  }, []);
11487
11742
  const handleStartDuplicateIfConfig = onDuplicated ? handleStartDuplicate : undefined;
11488
11743
  const handleStartStatusChangeIfConfig = onStatusChanged ? handleStartStatusChange : undefined;
11744
+ const handleStartDeleteIfConfig = onDeleted ? handleStartDelete : undefined;
11489
11745
  return jsxs(StyledDashboardActions, {
11490
11746
  "data-testid": "dot-dashboard-actions",
11491
11747
  children: [jsx(DotDashboardPublishConfirm, {
@@ -11501,6 +11757,11 @@ function DotDashboardActions({
11501
11757
  open: true,
11502
11758
  onClose: handleDuplicateClose,
11503
11759
  onSubmit: handleDuplicateSubmit
11760
+ }), dashboardToDelete && jsx(DotImpactDialog, {
11761
+ onCancel: handleDeleteClose,
11762
+ onSubmit: handleDeleteSubmit,
11763
+ record: dashboardToDelete === null || dashboardToDelete === void 0 ? void 0 : dashboardToDelete.name,
11764
+ open: true
11504
11765
  }), jsx(HelpButton, {
11505
11766
  dashboard: dashboard
11506
11767
  }), onFavorite && jsx(FavoriteButton, {
@@ -11512,8 +11773,9 @@ function DotDashboardActions({
11512
11773
  onViewMode: onViewMode,
11513
11774
  onStartStatusChange: handleStartStatusChangeIfConfig,
11514
11775
  onStartDuplicate: handleStartDuplicateIfConfig,
11776
+ onStartDelete: handleStartDeleteIfConfig,
11515
11777
  onDetails: () => setOpenedDashboardDetails(dashboard)
11516
- }), jsx(CloseButton, {
11778
+ }), onClose && jsx(CloseButton, {
11517
11779
  dashboard: dashboard,
11518
11780
  onClose: onClose
11519
11781
  })]
@@ -11539,6 +11801,7 @@ function DotDashboardHeader({
11539
11801
  onClose,
11540
11802
  onFavorite,
11541
11803
  onStatusChanged,
11804
+ onDeleted,
11542
11805
  onDuplicated,
11543
11806
  onViewMode
11544
11807
  }) {
@@ -11564,12 +11827,13 @@ function DotDashboardHeader({
11564
11827
  children: dashboard === null || dashboard === void 0 ? void 0 : dashboard.name
11565
11828
  }), jsx(DotDashboardActions, {
11566
11829
  applications: applications,
11830
+ canEdit: canEdit,
11567
11831
  dashboard: dashboard,
11568
11832
  isEdit: isEdit,
11569
- canEdit: canEdit,
11570
11833
  onClose: onClose,
11571
11834
  onFavorite: onFavorite,
11572
11835
  onStatusChanged: onStatusChanged,
11836
+ onDeleted: onDeleted,
11573
11837
  onDuplicated: onDuplicated,
11574
11838
  onViewMode: onViewMode
11575
11839
  })]
@@ -11745,7 +12009,7 @@ const StyledRadioGroup = styled(RadioGroup)`
11745
12009
  &.${groupClassName} {
11746
12010
  padding-left: ${theme.spacing(2.5)};
11747
12011
 
11748
- .${rootClassName$O} {
12012
+ .${rootClassName$P} {
11749
12013
  margin: 0;
11750
12014
  }
11751
12015
  }
@@ -11905,9 +12169,9 @@ const StyledFormContainer = styled.div`
11905
12169
  &.${rootClassName$y} {
11906
12170
  margin: ${theme.spacing(3, 0)};
11907
12171
 
11908
- .${rootClassName$M},
11909
- .${rootClassName$O},
11910
- .${rootClassName$1h},
12172
+ .${rootClassName$N},
12173
+ .${rootClassName$P},
12174
+ .${rootClassName$1i},
11911
12175
  .${rootSelectClassName},
11912
12176
  .${rootClassName$A},
11913
12177
  .${rootClassName$z} {
@@ -11915,7 +12179,7 @@ const StyledFormContainer = styled.div`
11915
12179
  }
11916
12180
 
11917
12181
  label
11918
- + .${rootClassName$1h},
12182
+ + .${rootClassName$1i},
11919
12183
  label
11920
12184
  + .${rootSelectClassName},
11921
12185
  label
@@ -11925,8 +12189,8 @@ const StyledFormContainer = styled.div`
11925
12189
  margin: ${theme.spacing(0, 0, 1, 0)};
11926
12190
  }
11927
12191
 
11928
- .${rootClassName$L}, .${groupClassName} {
11929
- .${rootClassName$O} {
12192
+ .${rootClassName$M}, .${groupClassName} {
12193
+ .${rootClassName$P} {
11930
12194
  margin: 0;
11931
12195
  }
11932
12196
  }
@@ -12232,7 +12496,7 @@ function DotRadioButton({
12232
12496
  ariaLabel,
12233
12497
  checked,
12234
12498
  className,
12235
- 'data-pendoid': dataPendoId = rootClassName$O,
12499
+ 'data-pendoid': dataPendoId = rootClassName$P,
12236
12500
  'data-testid': dataTestId,
12237
12501
  disabled,
12238
12502
  id,
@@ -12245,7 +12509,7 @@ function DotRadioButton({
12245
12509
  size = 'medium',
12246
12510
  value
12247
12511
  }) {
12248
- const rootClasses = useStylesWithRootClass(rootClassName$O, className);
12512
+ const rootClasses = useStylesWithRootClass(rootClassName$P, className);
12249
12513
  const handleChange = event => {
12250
12514
  onChange && onChange(event, event.target.value);
12251
12515
  };
@@ -12299,7 +12563,7 @@ const DotRadioGroup = ({
12299
12563
  size = 'medium'
12300
12564
  }) => {
12301
12565
  const placement = `${placementClassName}${labelPlacement}`;
12302
- const rootClasses = useStylesWithRootClass(rootClassName$M, className, placement);
12566
+ const rootClasses = useStylesWithRootClass(rootClassName$N, className, placement);
12303
12567
  const radioValue = value || defaultValue;
12304
12568
  const [selectedValue, setSelectedValue] = useState(radioValue);
12305
12569
  /* This will ensure that value can be updated from the outside */
@@ -12433,7 +12697,7 @@ const DotSwitch = ({
12433
12697
  tabIndex: 0
12434
12698
  });
12435
12699
  return jsx(StyledFormControlLabel, {
12436
- className: rootClassName$O,
12700
+ className: rootClassName$P,
12437
12701
  control: switchControl,
12438
12702
  label: label,
12439
12703
  labelPlacement: labelPlacement
@@ -15965,18 +16229,24 @@ const StyledTabs = styled(Tabs)`
15965
16229
  width: 100%;
15966
16230
  }
15967
16231
 
15968
- .dot-tab-label-container {
15969
- display: flex;
15970
- .dot-tab-label {
15971
- padding-top: ${theme.spacing(0.5)};
15972
- }
15973
- }
15974
-
15975
16232
  .MuiTab-root {
15976
- box-shadow: inset 0px -1px 0px ${theme.palette.figma.border.default};
15977
- color: ${theme.palette.figma.primary.elevated};
16233
+ box-shadow: inset 0 -1px 0 ${theme.palette.figma.border.default};
15978
16234
  max-width: 360px;
15979
16235
  min-width: 0;
16236
+ color: ${theme.palette.figma.typography.black};
16237
+
16238
+ .dot-icon {
16239
+ color: ${theme.palette.figma.typography.black};
16240
+ display: inline;
16241
+ padding-right: ${theme.spacing(0.5)};
16242
+ }
16243
+
16244
+ &.Mui-selected {
16245
+ &,
16246
+ .dot-icon {
16247
+ color: ${theme.palette.figma.primary.elevated};
16248
+ }
16249
+ }
15980
16250
 
15981
16251
  &.Mui-disabled {
15982
16252
  color: ${theme.palette.figma.typography.disabled};
@@ -15985,18 +16255,20 @@ const StyledTabs = styled(Tabs)`
15985
16255
  color: ${theme.palette.figma.typography.disabled};
15986
16256
  }
15987
16257
  }
16258
+
16259
+ .dot-tab-label-container {
16260
+ display: flex;
16261
+
16262
+ .dot-tab-label {
16263
+ padding-top: ${theme.spacing(0.5)};
16264
+ }
16265
+ }
15988
16266
  }
15989
16267
 
15990
16268
  .MuiTabs-indicator {
15991
16269
  background: ${theme.palette.figma.border.inputActive};
15992
16270
  height: 3px;
15993
16271
  }
15994
-
15995
- .dot-icon {
15996
- color: ${theme.palette.figma.primary.elevated};
15997
- display: inline;
15998
- padding-right: ${theme.spacing(0.5)};
15999
- }
16000
16272
  }
16001
16273
  `}
16002
16274
  `;
@@ -16486,7 +16758,7 @@ const DotPopper = ({
16486
16758
  placement
16487
16759
  }) => {
16488
16760
  const [arrowRef, setArrowRef] = useState(null);
16489
- const rootClasses = useStylesWithRootClass(rootClassName$19, className);
16761
+ const rootClasses = useStylesWithRootClass(rootClassName$1a, className);
16490
16762
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
16491
16763
  const handleClickAway = event => {
16492
16764
  if (onClickAway && (!anchorEl || !anchorEl.contains(event.currentTarget))) {
@@ -18127,4 +18399,4 @@ const BoardColumnSummary = ({
18127
18399
  });
18128
18400
  };
18129
18401
 
18130
- export { ApiError$1 as ApiError, BoardStatusProvider, Cell, ColumnStatusProvider, CreateUUID, CssCell, CssGrid, CssGridDebug, DashboardAppTypeOptions, DashboardView, 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 };
18402
+ export { ApiError$1 as ApiError, BoardStatusProvider, Cell, ColumnStatusProvider, CreateUUID, CssCell, CssGrid, CssGridDebug, DashboardAppTypeOptions, DashboardView, 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, DotImpactDialog, 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 };