@digital-ai/dot-components 3.1.0 → 3.2.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
@@ -7,11 +7,11 @@ import styled, { css, createGlobalStyle, ThemeProvider as ThemeProvider$1, keyfr
7
7
  import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';
8
8
  import jwt_decode from 'jwt-decode';
9
9
  import '@digital-ai/dot-illustrations';
10
+ import { DatePicker, PickersDay, TimePicker, LocalizationProvider } from '@mui/x-date-pickers';
10
11
  import { useDropzone } from 'react-dropzone';
11
12
  import GridLayout, { WidthProvider } from 'react-grid-layout';
12
13
  import dayjs from 'dayjs';
13
14
  import updateLocale from 'dayjs/plugin/updateLocale';
14
- import { DatePicker, PickersDay, LocalizationProvider, TimePicker } from '@mui/x-date-pickers';
15
15
  import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
16
16
  import utc from 'dayjs/plugin/utc';
17
17
 
@@ -55,6 +55,7 @@ const DotTooltip = ({
55
55
  onClose,
56
56
  open,
57
57
  placement = 'bottom',
58
+ popperClassName,
58
59
  title
59
60
  }) => {
60
61
  const rootClasses = useStylesWithRootClass('dot-tooltip', className);
@@ -90,7 +91,8 @@ const DotTooltip = ({
90
91
  open: open,
91
92
  placement: placement,
92
93
  PopperProps: {
93
- disablePortal
94
+ disablePortal,
95
+ className: popperClassName
94
96
  },
95
97
  role: ariaRole,
96
98
  title: title,
@@ -1667,10 +1669,16 @@ const StyledAlertBanner = styled(Alert)`
1667
1669
  theme
1668
1670
  }) => css`
1669
1671
  &.${rootClassName$15} {
1672
+ align-items: center;
1670
1673
  box-sizing: border-box;
1671
1674
  min-height: 48px;
1672
1675
  overflow: hidden;
1673
1676
 
1677
+ .MuiAlert-message {
1678
+ margin: ${theme.spacing(1, 0)};
1679
+ padding: 0;
1680
+ }
1681
+
1674
1682
  &.MuiAlert-standardSuccess {
1675
1683
  background: ${theme.palette.figma.overlay.alerts.success.background};
1676
1684
  }
@@ -8313,21 +8321,179 @@ const StyledRadioGroup = styled(RadioGroup)`
8313
8321
  `}
8314
8322
  `;
8315
8323
 
8316
- const rootClassName$w = 'dot-form';
8317
- const StyledFormContainer = styled.div`
8324
+ const rootClassName$w = 'dot-date-picker';
8325
+ const popperClassName = 'dot-date-picker-popper';
8326
+ const containerClassName$2 = 'dot-date-picker-container';
8327
+ const rectanglePickersDayClassName = 'dot-rectangle-pickers-day';
8328
+ const StyledDatePickerContainer = styled.div`
8329
+ ${() => css`
8330
+ &.${rootClassName$w} .full-width {
8331
+ width: 100%;
8332
+ }
8333
+ `}
8334
+ `;
8335
+ const StyledDatePicker = styled(DatePicker)`
8318
8336
  ${({
8319
8337
  theme
8320
8338
  }) => css`
8321
8339
  &.${rootClassName$w} {
8340
+ ${pickerInputStyles(theme)};
8341
+
8342
+ .Mui-disabled.MuiInputBase-root,
8343
+ &.read-only .MuiInputBase-root {
8344
+ ${readOnlyStyles(theme)};
8345
+ }
8346
+
8347
+ .dot-icon-btn .dot-i {
8348
+ margin-top: -5px;
8349
+ }
8350
+
8351
+ .MuiFormLabel-root {
8352
+ color: ${theme.palette.figma.typography.black};
8353
+ }
8354
+ }
8355
+ `}
8356
+ `;
8357
+ const StyledPickersDay = styled(PickersDay)`
8358
+ ${({
8359
+ theme
8360
+ }) => css`
8361
+ &.${rectanglePickersDayClassName} {
8362
+ border-radius: ${theme.spacing(0.5)};
8363
+ &.MuiPickersDay-today:not(.Mui-selected) {
8364
+ background: ${theme.palette.figma.neutral.normal};
8365
+ border: 1px solid ${theme.palette.figma.primary.normal};
8366
+ &:hover {
8367
+ background: ${theme.palette.figma.primary.normal};
8368
+ }
8369
+ }
8370
+
8371
+ &:hover {
8372
+ background: ${theme.palette.figma.primary.normal};
8373
+ color: ${theme.palette.figma.typography.white};
8374
+ }
8375
+ }
8376
+ `}
8377
+ `;
8378
+
8379
+ const rootClassName$v = 'dot-time-picker';
8380
+ const containerClassName$1 = 'dot-time-picker-container';
8381
+ const TIME_SELECTION_HEIGHT_SPACING = 34.5;
8382
+ const TIME_SELECTION_WIDTH_SPACING = 14.5;
8383
+ const TIME_UNIT_WIDTH_SPACING = 4.5;
8384
+ const TIME_UNIT_HEIGHT_SPACING = 4.5;
8385
+ const StyledTimePickerContainer = styled.div`
8386
+ ${({
8387
+ theme
8388
+ }) => css`
8389
+ &.${containerClassName$1} {
8390
+ .full-width {
8391
+ width: 100%;
8392
+ }
8393
+
8394
+ .dot-time-picker-popper {
8395
+ z-index: ${levelTop};
8396
+
8397
+ .dot-time-picker-paper {
8398
+ display: flex;
8399
+ flex-direction: column;
8400
+ align-items: center;
8401
+
8402
+ .dot-time-picker-selection {
8403
+ max-height: ${theme.spacing(TIME_SELECTION_HEIGHT_SPACING)};
8404
+ width: ${theme.spacing(TIME_SELECTION_WIDTH_SPACING)};
8405
+ display: flex;
8406
+ margin: ${theme.spacing(1)};
8407
+ gap: ${theme.spacing(0.5)};
8408
+
8409
+ .dot-time-picker-hours,
8410
+ .dot-time-picker-minutes,
8411
+ .dot-time-picker-daytime {
8412
+ display: flex;
8413
+ flex-direction: column;
8414
+ overflow: auto;
8415
+ gap: ${theme.spacing(0.5)};
8416
+ padding-bottom: ${theme.spacing(TIME_SELECTION_HEIGHT_SPACING - TIME_UNIT_HEIGHT_SPACING)};
8417
+
8418
+ /* Hide scrollbar for Chrome, Safari and Opera */
8419
+ ::-webkit-scrollbar {
8420
+ display: none;
8421
+ }
8422
+
8423
+ /* Hide scrollbar for IE, Edge and Firefox */
8424
+ -ms-overflow-style: none; /* IE and Edge */
8425
+ scrollbar-width: none; /* Firefox */
8426
+ }
8427
+
8428
+ .dot-picker-button {
8429
+ width: ${theme.spacing(TIME_UNIT_WIDTH_SPACING)};
8430
+ height: ${theme.spacing(TIME_UNIT_HEIGHT_SPACING)};
8431
+ margin: 0;
8432
+ }
8433
+ }
8434
+
8435
+ .dot-time-picker-action-buttons {
8436
+ display: flex;
8437
+ align-items: center;
8438
+ justify-content: space-between;
8439
+ padding: ${theme.spacing(0.5)};
8440
+ }
8441
+ }
8442
+ }
8443
+ }
8444
+ `}
8445
+ `;
8446
+ const StyledTimePicker = styled(TimePicker)`
8447
+ ${({
8448
+ theme
8449
+ }) => css`
8450
+ &.${rootClassName$v} {
8451
+ ${pickerInputStyles(theme)};
8452
+
8453
+ .Mui-disabled.MuiInputBase-root,
8454
+ &.read-only .MuiInputBase-root {
8455
+ ${readOnlyStyles(theme)};
8456
+ }
8457
+
8458
+ .dot-icon-btn .dot-i {
8459
+ margin-top: -5px;
8460
+ }
8461
+
8462
+ .MuiFormLabel-root {
8463
+ color: ${theme.palette.figma.typography.black};
8464
+ }
8465
+ }
8466
+ `}
8467
+ `;
8468
+
8469
+ const rootClassName$u = 'dot-form';
8470
+ const StyledFormContainer = styled.div`
8471
+ ${({
8472
+ theme
8473
+ }) => css`
8474
+ &.${rootClassName$u} {
8322
8475
  margin: ${theme.spacing(3, 0)};
8323
8476
 
8324
8477
  .${rootClassName$D},
8325
8478
  .${rootClassName$F},
8326
8479
  .${rootClassName$17},
8327
- .${rootSelectClassName} {
8480
+ .${rootSelectClassName},
8481
+ .${rootClassName$w},
8482
+ .${rootClassName$v} {
8328
8483
  margin: ${theme.spacing(1, 0)};
8329
8484
  }
8330
8485
 
8486
+ label
8487
+ + .${rootClassName$17},
8488
+ label
8489
+ + .${rootSelectClassName},
8490
+ label
8491
+ + .${rootClassName$w},
8492
+ label
8493
+ + .${rootClassName$v} {
8494
+ margin: ${theme.spacing(0, 0, 1, 0)};
8495
+ }
8496
+
8331
8497
  .${rootClassName$C}, .${groupClassName} {
8332
8498
  .${rootClassName$F} {
8333
8499
  margin: 0;
@@ -8344,7 +8510,7 @@ const DotForm = ({
8344
8510
  'data-testid': dataTestId,
8345
8511
  onSubmit
8346
8512
  }) => {
8347
- const rootClasses = useStylesWithRootClass(rootClassName$w, className);
8513
+ const rootClasses = useStylesWithRootClass(rootClassName$u, className);
8348
8514
  return jsx("form", {
8349
8515
  "aria-label": ariaLabel,
8350
8516
  "data-testid": dataTestId,
@@ -8357,10 +8523,10 @@ const DotForm = ({
8357
8523
  });
8358
8524
  };
8359
8525
 
8360
- const rootClassName$v = 'dot-dynamic-form';
8526
+ const rootClassName$t = 'dot-dynamic-form';
8361
8527
  const StyledDynamicForm = styled(DotForm)`
8362
8528
  ${() => css`
8363
- &.${rootClassName$v} {
8529
+ &.${rootClassName$t} {
8364
8530
  }
8365
8531
  `}
8366
8532
  `;
@@ -8651,12 +8817,12 @@ const DotInputSelect = ({
8651
8817
  });
8652
8818
  };
8653
8819
 
8654
- const rootClassName$u = 'dot-progress-button';
8820
+ const rootClassName$s = 'dot-progress-button';
8655
8821
  const StyledProgressButton = styled(DotButton)`
8656
8822
  ${({
8657
8823
  theme
8658
8824
  }) => css`
8659
- &.${rootClassName$u} {
8825
+ &.${rootClassName$s} {
8660
8826
  .hidden {
8661
8827
  // hide children but preserve its space so that
8662
8828
  // button's dimensions don't change
@@ -8681,7 +8847,7 @@ const DotProgressButton = ({
8681
8847
  ariaLabel,
8682
8848
  children,
8683
8849
  className,
8684
- 'data-pendoid': dataPendoId = rootClassName$u,
8850
+ 'data-pendoid': dataPendoId = rootClassName$s,
8685
8851
  'data-testid': dataTestId,
8686
8852
  disabled = false,
8687
8853
  disableRipple = false,
@@ -8694,7 +8860,7 @@ const DotProgressButton = ({
8694
8860
  tooltip,
8695
8861
  type = 'primary'
8696
8862
  }) => {
8697
- const rootClasses = useStylesWithRootClass(rootClassName$u, className);
8863
+ const rootClasses = useStylesWithRootClass(rootClassName$s, className);
8698
8864
  const isButtonDisabled = disabled || isLoading;
8699
8865
  const titleClasses = useStylesWithRootClass(isLoading ? 'hidden' : '');
8700
8866
  const progressCircleSize = size === 'large' ? SPINNER_LARGE_SIZE : SPINNER_DEFAULT_SIZE;
@@ -8722,12 +8888,12 @@ const DotProgressButton = ({
8722
8888
  });
8723
8889
  };
8724
8890
 
8725
- const rootClassName$t = 'dot-radio';
8891
+ const rootClassName$r = 'dot-radio';
8726
8892
  const StyledRadioButton = styled(Radio)`
8727
8893
  ${({
8728
8894
  theme
8729
8895
  }) => css`
8730
- &.${rootClassName$t} {
8896
+ &.${rootClassName$r} {
8731
8897
  padding: 8px;
8732
8898
 
8733
8899
  svg {
@@ -8766,7 +8932,7 @@ function DotRadioButton({
8766
8932
  const radioControl = jsx(StyledRadioButton, {
8767
8933
  checked: checked,
8768
8934
  classes: {
8769
- root: rootClassName$t
8935
+ root: rootClassName$r
8770
8936
  },
8771
8937
  color: "primary",
8772
8938
  "data-pendoid": dataPendoId,
@@ -8877,7 +9043,7 @@ const DotRadioGroup = ({
8877
9043
  });
8878
9044
  };
8879
9045
 
8880
- const rootClassName$s = 'dot-switch';
9046
+ const rootClassName$q = 'dot-switch';
8881
9047
  const StyledSwitch = styled(Switch)`
8882
9048
  ${({
8883
9049
  theme
@@ -8906,7 +9072,7 @@ const DotSwitch = ({
8906
9072
  checked,
8907
9073
  className,
8908
9074
  color,
8909
- 'data-pendoid': dataPendoId = rootClassName$s,
9075
+ 'data-pendoid': dataPendoId = rootClassName$q,
8910
9076
  'data-testid': dataTestId,
8911
9077
  disabled = false,
8912
9078
  id,
@@ -8916,7 +9082,7 @@ const DotSwitch = ({
8916
9082
  onChange,
8917
9083
  size = 'medium'
8918
9084
  }) => {
8919
- const rootClasses = useStylesWithRootClass(rootClassName$s, className);
9085
+ const rootClasses = useStylesWithRootClass(rootClassName$q, className);
8920
9086
  const handleChange = event => {
8921
9087
  onChange && onChange(event);
8922
9088
  };
@@ -9267,7 +9433,7 @@ const DotDynamicForm = ({
9267
9433
  onChange,
9268
9434
  onSubmit
9269
9435
  }) => {
9270
- const rootClasses = useStylesWithRootClass(rootClassName$v, className);
9436
+ const rootClasses = useStylesWithRootClass(rootClassName$t, className);
9271
9437
  // Memoize this operation so that is doesn't get executed each time this
9272
9438
  // component re-renders
9273
9439
  const initialFormState = useMemo(() => getInitialFormState(config, liveValidation), [config, liveValidation, getInitialFormState]);
@@ -9513,7 +9679,7 @@ const DotDynamicForm = ({
9513
9679
  });
9514
9680
  };
9515
9681
 
9516
- const rootClassName$r = 'dot-inline-edit';
9682
+ const rootClassName$p = 'dot-inline-edit';
9517
9683
  const editModeClassName = 'dot-edit-mode';
9518
9684
  const viewModeClassName = 'dot-view-mode';
9519
9685
  const placeholderClassName = 'dot-placeholder';
@@ -9525,7 +9691,7 @@ const StyledInlineEdit = styled.div`
9525
9691
  theme,
9526
9692
  fullWidth
9527
9693
  }) => css`
9528
- &.${rootClassName$r} {
9694
+ &.${rootClassName$p} {
9529
9695
  align-items: center;
9530
9696
  color: ${theme.palette.figma.typography.black};
9531
9697
  display: ${fullWidth ? 'flex' : 'inline-flex'};
@@ -9737,7 +9903,7 @@ const DotInlineEdit = ({
9737
9903
  bindings,
9738
9904
  charactersLimit,
9739
9905
  className,
9740
- 'data-pendoid': dataPendoId = rootClassName$r,
9906
+ 'data-pendoid': dataPendoId = rootClassName$p,
9741
9907
  'data-testid': dataTestId,
9742
9908
  fullWidth = true,
9743
9909
  hideActionButtons,
@@ -9770,7 +9936,7 @@ const DotInlineEdit = ({
9770
9936
  }
9771
9937
  }, [value]);
9772
9938
  const isSaveDisabled = checkIfEmptyValue(inputValue);
9773
- const rootClasses = useStylesWithRootClass(rootClassName$r, className, editing ? editModeClassName : '');
9939
+ const rootClasses = useStylesWithRootClass(rootClassName$p, className, editing ? editModeClassName : '');
9774
9940
  const handleShowTooltip = visible => {
9775
9941
  if (!editing) {
9776
9942
  setShowTooltip(visible);
@@ -9949,13 +10115,13 @@ const DotInlineEdit = ({
9949
10115
  });
9950
10116
  };
9951
10117
 
9952
- const rootClassName$q = 'dot-navigation-rail';
10118
+ const rootClassName$o = 'dot-navigation-rail';
9953
10119
  const StyledNavigationRail = styled.div`
9954
10120
  ${({
9955
10121
  theme,
9956
10122
  railItemPosition
9957
10123
  }) => css`
9958
- &.${rootClassName$q} {
10124
+ &.${rootClassName$o} {
9959
10125
  background: ${theme.palette.figma.neutral.elevated};
9960
10126
  border-left: 1px solid ${theme.palette.figma.border.default};
9961
10127
  display: flex;
@@ -10002,7 +10168,7 @@ const DotNavigationRail = ({
10002
10168
  railItems,
10003
10169
  selectedIndex = 0
10004
10170
  }) => {
10005
- const rootClasses = useStylesWithRootClass(rootClassName$q, className);
10171
+ const rootClasses = useStylesWithRootClass(rootClassName$o, className);
10006
10172
  const [selectedItemIndex, setSelectedItemIndex] = useState(selectedIndex);
10007
10173
  /* Used to change selected index programmatically from the consumer component */
10008
10174
  useEffect(() => {
@@ -10053,12 +10219,12 @@ const DotNavigationRail = ({
10053
10219
  });
10054
10220
  };
10055
10221
 
10056
- const rootClassName$p = 'dot-pill';
10222
+ const rootClassName$n = 'dot-pill';
10057
10223
  const StyledPill = styled(Chip)`
10058
10224
  ${({
10059
10225
  theme
10060
10226
  }) => css`
10061
- &.${rootClassName$p} {
10227
+ &.${rootClassName$n} {
10062
10228
  background-color: ${({
10063
10229
  backgroundcolor
10064
10230
  }) => {
@@ -10089,7 +10255,7 @@ const StyledPill = styled(Chip)`
10089
10255
 
10090
10256
  &.MuiChip-outlined {
10091
10257
  &.error {
10092
- background-color: ${theme.palette.error[100]};
10258
+ background-color: ${theme.palette.error[50]};
10093
10259
  border-color: ${theme.palette.error.main};
10094
10260
  color: ${theme.palette.layer.n700};
10095
10261
  .dot-icon {
@@ -10097,8 +10263,17 @@ const StyledPill = styled(Chip)`
10097
10263
  }
10098
10264
  }
10099
10265
 
10266
+ &.default {
10267
+ background-color: ${theme.palette.grey[50]};
10268
+ border-color: ${theme.palette.grey[200]};
10269
+ color: ${theme.palette.layer.n700};
10270
+ .dot-icon {
10271
+ color: ${theme.palette.grey.main};
10272
+ }
10273
+ }
10274
+
10100
10275
  &.success {
10101
- background-color: ${theme.palette.success[100]};
10276
+ background-color: ${theme.palette.success[50]};
10102
10277
  border-color: ${theme.palette.success.main};
10103
10278
  color: ${theme.palette.layer.n700};
10104
10279
  .dot-icon {
@@ -10107,7 +10282,7 @@ const StyledPill = styled(Chip)`
10107
10282
  }
10108
10283
 
10109
10284
  &.warning {
10110
- background-color: ${theme.palette.warning[100]};
10285
+ background-color: ${theme.palette.warning[50]};
10111
10286
  border-color: ${theme.palette.warning.main};
10112
10287
  color: ${theme.palette.layer.n700};
10113
10288
  .dot-icon {
@@ -10116,7 +10291,7 @@ const StyledPill = styled(Chip)`
10116
10291
  }
10117
10292
 
10118
10293
  &.in-progress {
10119
- background-color: ${theme.palette.primary[100]};
10294
+ background-color: ${theme.palette.primary[50]};
10120
10295
  border-color: ${theme.palette.primary.main};
10121
10296
  color: ${theme.palette.layer.n700};
10122
10297
  .dot-icon {
@@ -10126,6 +10301,15 @@ const StyledPill = styled(Chip)`
10126
10301
  }
10127
10302
 
10128
10303
  &.MuiChip-filled {
10304
+ &.default {
10305
+ background-color: ${theme.palette.grey[200]};
10306
+ border-color: ${theme.palette.grey[200]};
10307
+ color: ${theme.palette.layer.n700};
10308
+ .dot-icon {
10309
+ color: ${theme.palette.grey.main};
10310
+ }
10311
+ }
10312
+
10129
10313
  &.error {
10130
10314
  background-color: ${theme.palette.error.main};
10131
10315
  border-color: ${theme.palette.error.main};
@@ -10179,7 +10363,7 @@ const DotPill = ({
10179
10363
  status = 'default',
10180
10364
  variant = 'filled'
10181
10365
  }) => {
10182
- const rootClasses = useStylesWithRootClass(rootClassName$p, className, status);
10366
+ const rootClasses = useStylesWithRootClass(rootClassName$n, className, status);
10183
10367
  return jsx(StyledPill, {
10184
10368
  "aria-label": ariaLabel,
10185
10369
  bordercolor: bordercolor,
@@ -10197,12 +10381,12 @@ const DotPill = ({
10197
10381
  });
10198
10382
  };
10199
10383
 
10200
- const rootClassName$o = 'dot-skeleton';
10384
+ const rootClassName$m = 'dot-skeleton';
10201
10385
  const StyledSkeleton = styled(Skeleton)`
10202
10386
  ${({
10203
10387
  theme
10204
10388
  }) => css`
10205
- &.${rootClassName$o} {
10389
+ &.${rootClassName$m} {
10206
10390
  background-color: ${theme.palette.figma.border.darker};
10207
10391
  }
10208
10392
  `}
@@ -10217,7 +10401,7 @@ const DotSkeleton = ({
10217
10401
  width,
10218
10402
  variant
10219
10403
  }) => {
10220
- const rootClasses = useStylesWithRootClass(rootClassName$o, className);
10404
+ const rootClasses = useStylesWithRootClass(rootClassName$m, className);
10221
10405
  return jsx(StyledSkeleton, {
10222
10406
  animation: "wave",
10223
10407
  "aria-label": ariaLabel,
@@ -10251,18 +10435,20 @@ const getSnackbarTitleFromSeverity = severity => {
10251
10435
  }
10252
10436
  };
10253
10437
 
10254
- const rootClassName$n = 'dot-snackbar';
10438
+ const rootClassName$l = 'dot-snackbar';
10255
10439
  const StyledSnackbar = styled(Snackbar)`
10256
10440
  ${({
10257
10441
  theme,
10258
10442
  width,
10259
10443
  $anchorOriginTop
10260
10444
  }) => css`
10261
- &.${rootClassName$n} {
10445
+ &.${rootClassName$l} {
10262
10446
  .MuiAlert-message {
10263
10447
  word-break: break-word;
10264
10448
  }
10265
-
10449
+ .${rootClassName$15} {
10450
+ align-items: flex-start;
10451
+ }
10266
10452
  &.MuiSnackbar-anchorOriginTopLeft,
10267
10453
  &.MuiSnackbar-anchorOriginTopCenter,
10268
10454
  &.MuiSnackbar-anchorOriginTopRight {
@@ -10312,7 +10498,7 @@ const DotSnackbar = ({
10312
10498
  }) => {
10313
10499
  const hasActions = !!(primaryAction || secondaryAction);
10314
10500
  const calculatedAutoHideDuration = autoHideDuration === null || autoHideDuration > 0 ? autoHideDuration : addAutoHideDuration(severity);
10315
- const rootClasses = useStylesWithRootClass(rootClassName$n, className);
10501
+ const rootClasses = useStylesWithRootClass(rootClassName$l, className);
10316
10502
  const handleSnackbarClose = reason => {
10317
10503
  if (!reason || hideOnClickAway || !hideOnClickAway && reason !== 'clickaway') {
10318
10504
  onClose();
@@ -10370,10 +10556,10 @@ const DotSnackbar = ({
10370
10556
  });
10371
10557
  };
10372
10558
 
10373
- const rootClassName$m = 'dot-snackbar-container';
10559
+ const rootClassName$k = 'dot-snackbar-container';
10374
10560
  const StyledSnackbarContainer = styled.div`
10375
10561
  ${() => css`
10376
- &.${rootClassName$m} {
10562
+ &.${rootClassName$k} {
10377
10563
  position: absolute;
10378
10564
  top: 0;
10379
10565
  width: 250px;
@@ -10388,7 +10574,7 @@ const StyledSnackbarContainer = styled.div`
10388
10574
 
10389
10575
  const DotSnackbarContext = createContext({
10390
10576
  alerts: [],
10391
- enqueueMessage: (_message, _severity, _autoHideDuration) => null,
10577
+ enqueueMessage: (_message, _severity, _autoHideDuration, _primaryAction, _secondaryAction) => null,
10392
10578
  removeMessage: _id => null
10393
10579
  });
10394
10580
  const DotSnackbarContainer = ({
@@ -10404,10 +10590,10 @@ const DotSnackbarContainer = ({
10404
10590
  };
10405
10591
  }
10406
10592
  return jsx(StyledSnackbarContainer, {
10407
- className: rootClassName$m,
10593
+ className: rootClassName$k,
10408
10594
  children: jsx("div", {
10409
- className: rootClassName$m,
10410
- "data-testid": rootClassName$m,
10595
+ className: rootClassName$k,
10596
+ "data-testid": rootClassName$k,
10411
10597
  children: alerts.slice().reverse().map(alert => {
10412
10598
  return jsx(DotSnackbar, {
10413
10599
  autoHideDuration: alert.autoHideDuration,
@@ -10415,6 +10601,8 @@ const DotSnackbarContainer = ({
10415
10601
  onClose: handleClose(alert.id),
10416
10602
  open: alert.open,
10417
10603
  severity: alert.severity,
10604
+ primaryAction: alert.primaryAction,
10605
+ secondaryAction: alert.secondaryAction,
10418
10606
  children: alert.message
10419
10607
  }, alert.id);
10420
10608
  })
@@ -10426,14 +10614,16 @@ const DotSnackbarProvider = ({
10426
10614
  hideOnClickAway = true
10427
10615
  }) => {
10428
10616
  const [alerts, setAlerts] = useState([]);
10429
- function enqueueMessage(message, severity, autoHideDuration) {
10617
+ function enqueueMessage(message, severity, autoHideDuration, primaryAction, secondaryAction) {
10430
10618
  const id = CreateUUID();
10431
10619
  const queue = {
10432
10620
  id,
10433
10621
  message,
10434
10622
  severity,
10435
10623
  open: true,
10436
- autoHideDuration
10624
+ autoHideDuration,
10625
+ primaryAction,
10626
+ secondaryAction
10437
10627
  };
10438
10628
  setAlerts(prevState => {
10439
10629
  return [...prevState, Object.assign({}, queue)];
@@ -10466,12 +10656,12 @@ const useDotSnackbarContext = () => {
10466
10656
  return useContext(DotSnackbarContext);
10467
10657
  };
10468
10658
 
10469
- const rootClassName$l = 'dot-split-button-group';
10659
+ const rootClassName$j = 'dot-split-button-group';
10470
10660
  const StyledSplitButtonGroup = styled(ButtonGroup)`
10471
10661
  ${({
10472
10662
  theme
10473
10663
  }) => css`
10474
- &.${rootClassName$l} {
10664
+ &.${rootClassName$j} {
10475
10665
  &.outlined,
10476
10666
  &.text {
10477
10667
  .expand-button {
@@ -10538,7 +10728,7 @@ const DotSplitButton = ({
10538
10728
  autoFocus = false,
10539
10729
  ariaLabel,
10540
10730
  className,
10541
- 'data-pendoid': dataPendoId = rootClassName$l,
10731
+ 'data-pendoid': dataPendoId = rootClassName$j,
10542
10732
  'data-testid': dataTestId,
10543
10733
  defaultMainOptionKey,
10544
10734
  disabled = false,
@@ -10553,7 +10743,7 @@ const DotSplitButton = ({
10553
10743
  tooltipPlacement,
10554
10744
  type = 'primary'
10555
10745
  }) => {
10556
- const rootClasses = useStylesWithRootClass(rootClassName$l, className, type, disabled ? 'disabled' : '');
10746
+ const rootClasses = useStylesWithRootClass(rootClassName$j, className, type, disabled ? 'disabled' : '');
10557
10747
  const [open, setOpen] = useState(false);
10558
10748
  const anchorRef = useRef(null);
10559
10749
  const hasEmptyOptions = options.length === 0;
@@ -10619,14 +10809,14 @@ const DotSplitButton = ({
10619
10809
  });
10620
10810
  };
10621
10811
 
10622
- const rootClassName$k = 'dot-stepper';
10812
+ const rootClassName$i = 'dot-stepper';
10623
10813
  const stepListClassName = 'dot-stepper-list';
10624
10814
  const contentClassName = 'dot-stepper-content';
10625
10815
  const StyledStepper = styled.div`
10626
10816
  ${({
10627
10817
  theme
10628
10818
  }) => css`
10629
- &.${rootClassName$k} {
10819
+ &.${rootClassName$i} {
10630
10820
  display: flex;
10631
10821
  align-items: flex-start;
10632
10822
  padding: 0;
@@ -10899,7 +11089,7 @@ const DotStepper = ({
10899
11089
  const displayFinalContent = finalContent && currentStep > steps.length;
10900
11090
  const displayCancelButton = !!(!displayInitialContent && !displayFinalContent && onCancel);
10901
11091
  const isLastStep = currentStep === steps.length && !finalContent || currentStep > steps.length && finalContent;
10902
- const rootClasses = useStylesWithRootClass(rootClassName$k, stepsPosition, className);
11092
+ const rootClasses = useStylesWithRootClass(rootClassName$i, stepsPosition, className);
10903
11093
  const stepContentClasses = displayInitialContent || displayFinalContent ? 'center-content' : '';
10904
11094
  const stickyBottomClasses = useStylesWithRootClass('actions-container', isStickyBottom ? 'with-top-border' : '');
10905
11095
  const actionsClasses = useStylesWithRootClass('actions', displayInitialContent || displayFinalContent ? 'center-actions' : '');
@@ -11098,7 +11288,7 @@ const DotStepper = ({
11098
11288
  });
11099
11289
  };
11100
11290
 
11101
- const rootClassName$j = 'dot-table-pagination';
11291
+ const rootClassName$h = 'dot-table-pagination';
11102
11292
  // TO-DO: Determine how to apply styles to standard popper element
11103
11293
  const paginationItemClassName = 'dot-pagination-menu-item';
11104
11294
  const StyledTablePagination = styled.div`
@@ -11106,7 +11296,7 @@ const StyledTablePagination = styled.div`
11106
11296
  theme,
11107
11297
  typography
11108
11298
  }) => css`
11109
- .${rootClassName$j} {
11299
+ .${rootClassName$h} {
11110
11300
  border-top: 1px solid ${theme.palette.figma.border.default};
11111
11301
 
11112
11302
  .dot-caption,
@@ -11144,7 +11334,7 @@ const DotTablePagination = ({
11144
11334
  rowsPerPageOptions = [...ROWS_PER_PAGE_OPTIONS],
11145
11335
  typography = 'subtitle2'
11146
11336
  }) => {
11147
- const rootClasses = useStylesWithRootClass(rootClassName$j, className);
11337
+ const rootClasses = useStylesWithRootClass(rootClassName$h, className);
11148
11338
  const handlePageChange = (event, newPage) => {
11149
11339
  onPageChange && onPageChange(newPage);
11150
11340
  };
@@ -11153,7 +11343,7 @@ const DotTablePagination = ({
11153
11343
  };
11154
11344
  return (/* Container is used to pass 'typography' prop to a styled component */
11155
11345
  jsx(StyledTablePagination, {
11156
- className: rootClassName$j,
11346
+ className: rootClassName$h,
11157
11347
  typography: typography,
11158
11348
  children: jsx(TablePagination, {
11159
11349
  "aria-label": ariaLabel,
@@ -11179,12 +11369,12 @@ const DotTablePagination = ({
11179
11369
  );
11180
11370
  };
11181
11371
 
11182
- const rootClassName$i = 'dot-table';
11372
+ const rootClassName$g = 'dot-table';
11183
11373
  const StyledPaper = styled(Paper)`
11184
11374
  ${({
11185
11375
  theme
11186
11376
  }) => css`
11187
- &.${rootClassName$i} {
11377
+ &.${rootClassName$g} {
11188
11378
  background: ${theme.palette.figma.background.level0.componentsBackground};
11189
11379
  border: 1px solid ${theme.palette.figma.border.default};
11190
11380
  overflow: hidden;
@@ -11253,10 +11443,10 @@ const StyledMenu$1 = styled(DotMenu)`
11253
11443
  }
11254
11444
  `;
11255
11445
 
11256
- const rootClassName$h = 'dot-tbody';
11446
+ const rootClassName$f = 'dot-tbody';
11257
11447
  const StyledTableBody = styled(TableBody)`
11258
11448
  ${() => css`
11259
- &.${rootClassName$h} {
11449
+ &.${rootClassName$f} {
11260
11450
  tr:last-child td {
11261
11451
  border-bottom: none;
11262
11452
  }
@@ -11404,12 +11594,12 @@ const parseCellMaxWidth = width => {
11404
11594
  return width;
11405
11595
  };
11406
11596
 
11407
- const rootClassName$g = 'dot-td';
11597
+ const rootClassName$e = 'dot-td';
11408
11598
  const StyledTableCell = styled(TableCell)`
11409
11599
  ${({
11410
11600
  theme
11411
11601
  }) => css`
11412
- &.${rootClassName$g} {
11602
+ &.${rootClassName$e} {
11413
11603
  padding-top: 0;
11414
11604
  padding-bottom: 0;
11415
11605
 
@@ -11504,7 +11694,7 @@ const DotBodyCell = ({
11504
11694
  const isOverflowing = actionTableCellWidth > (wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current.clientWidth);
11505
11695
  setShowMenu(isOverflowing);
11506
11696
  };
11507
- const rootClasses = useStylesWithRootClass(rootClassName$g, className, noWrap && 'noWrap', Array.isArray(value) && 'actionItems');
11697
+ const rootClasses = useStylesWithRootClass(rootClassName$e, className, noWrap && 'noWrap', Array.isArray(value) && 'actionItems');
11508
11698
  const getTableCellValue = () => {
11509
11699
  if (Array.isArray(value)) {
11510
11700
  return jsx("div", {
@@ -11569,12 +11759,12 @@ const EmptyDotRow = ({
11569
11759
  }, CreateUUID());
11570
11760
  };
11571
11761
 
11572
- const rootClassName$f = 'dot-tr';
11762
+ const rootClassName$d = 'dot-tr';
11573
11763
  const StyledTableRowStyles = styled(TableRow)`
11574
11764
  ${({
11575
11765
  theme
11576
11766
  }) => css`
11577
- &.${rootClassName$f} {
11767
+ &.${rootClassName$d} {
11578
11768
  &.selected {
11579
11769
  background: ${theme.palette.figma.overlay.table.highlights};
11580
11770
 
@@ -11603,12 +11793,12 @@ const StyledTableRowStyles = styled(TableRow)`
11603
11793
  const TABLE_TYPOGRAPHY_VARIANT = 'body1';
11604
11794
  const TABLE_DEFAULT_SKELETON_ROWS = 4;
11605
11795
 
11606
- const rootClassName$e = 'dot-th-checkbox';
11796
+ const rootClassName$c = 'dot-th-checkbox';
11607
11797
  const StyledTableHeaderCheckboxCell = styled(TableCell)`
11608
11798
  ${({
11609
11799
  theme
11610
11800
  }) => css`
11611
- &.${rootClassName$e} {
11801
+ &.${rootClassName$c} {
11612
11802
  background: ${theme.palette.figma.background.level0.componentsBackground};
11613
11803
  padding: ${theme.spacing(0, 1)};
11614
11804
  width: ${theme.spacing(5)};
@@ -11627,7 +11817,7 @@ const DotHeaderCheckboxCell = ({
11627
11817
  multiSelectState,
11628
11818
  onCheckAllChange
11629
11819
  }) => {
11630
- const rootClasses = useStylesWithRootClass(rootClassName$e, className);
11820
+ const rootClasses = useStylesWithRootClass(rootClassName$c, className);
11631
11821
  const [checkboxState, setCheckboxState] = useState('unchecked');
11632
11822
  useEffect(() => {
11633
11823
  setCheckboxState(multiSelectState);
@@ -11658,12 +11848,12 @@ const DotHeaderCheckboxCell = ({
11658
11848
  });
11659
11849
  };
11660
11850
 
11661
- const rootClassName$d = 'dot-th';
11851
+ const rootClassName$b = 'dot-th';
11662
11852
  const StyledTableHeaderCell = styled(TableCell)`
11663
11853
  ${({
11664
11854
  theme
11665
11855
  }) => css`
11666
- &.${rootClassName$d} {
11856
+ &.${rootClassName$b} {
11667
11857
  background: ${theme.palette.figma.background.level0.componentsBackground};
11668
11858
 
11669
11859
  &.MuiTableCell-alignCenter > span.MuiTableSortLabel-root {
@@ -11722,7 +11912,7 @@ const DotHeaderCell = ({
11722
11912
  return jsx(StyledTableHeaderCell, {
11723
11913
  align: align,
11724
11914
  classes: {
11725
- root: rootClassName$d
11915
+ root: rootClassName$b
11726
11916
  },
11727
11917
  sortDirection: sortable ? sortDirection : undefined,
11728
11918
  style: headerCellStyle,
@@ -11994,12 +12184,12 @@ const ExpandCollapseCell = ({
11994
12184
  });
11995
12185
  };
11996
12186
 
11997
- const rootClassName$c = 'dot-td-checkbox';
12187
+ const rootClassName$a = 'dot-td-checkbox';
11998
12188
  const StyledTableBodyCheckboxCell = styled(TableCell)`
11999
12189
  ${({
12000
12190
  theme
12001
12191
  }) => css`
12002
- &.${rootClassName$c} {
12192
+ &.${rootClassName$a} {
12003
12193
  padding: ${theme.spacing(0, 1)};
12004
12194
  width: ${theme.spacing(5)};
12005
12195
 
@@ -12018,7 +12208,7 @@ const DotBodyCheckboxCell = ({
12018
12208
  onChange,
12019
12209
  rowId
12020
12210
  }) => {
12021
- const rootClasses = useStylesWithRootClass(rootClassName$c, className);
12211
+ const rootClasses = useStylesWithRootClass(rootClassName$a, className);
12022
12212
  const [isCheckboxChecked, setIsCheckboxChecked] = useState(isChecked);
12023
12213
  /** This effect is used when 'checked' status is changed from the outside */
12024
12214
  useEffect(() => {
@@ -12070,7 +12260,7 @@ const DotTableRow = ({
12070
12260
  selectedTableRowIds
12071
12261
  } = multiSelectBody || {};
12072
12262
  const isCheckboxChecked = selectedTableRowIds && selectedTableRowIds.includes(id) || false;
12073
- const rootClasses = useStylesWithRootClass(rootClassName$f, isCheckboxChecked ? 'selected' : undefined, className);
12263
+ const rootClasses = useStylesWithRootClass(rootClassName$d, isCheckboxChecked ? 'selected' : undefined, className);
12074
12264
  const renderCheckboxCell = () => {
12075
12265
  return jsx(DotBodyCheckboxCell, {
12076
12266
  ariaLabel: "Click to select this row",
@@ -12187,7 +12377,7 @@ const DotTableBody = ({
12187
12377
  return jsxs(Fragment, {
12188
12378
  children: [jsx(StyledTableBody, {
12189
12379
  classes: {
12190
- root: rootClassName$h
12380
+ root: rootClassName$f
12191
12381
  },
12192
12382
  children: getTableBodyRows()
12193
12383
  }), jsx(StyledMenu$1, {
@@ -12202,12 +12392,12 @@ const DotTableBody = ({
12202
12392
  });
12203
12393
  };
12204
12394
 
12205
- const rootClassName$b = 'dot-table-selection-toolbar';
12395
+ const rootClassName$9 = 'dot-table-selection-toolbar';
12206
12396
  const StyledTableSelectionToolbar = styled(DotActionToolbar)`
12207
12397
  ${({
12208
12398
  theme
12209
12399
  }) => css`
12210
- &.${rootClassName$b} {
12400
+ &.${rootClassName$9} {
12211
12401
  display: flex;
12212
12402
  align-items: center;
12213
12403
  justify-content: space-between;
@@ -12265,7 +12455,7 @@ const DotTableSelectionToolbar = ({
12265
12455
  onClearAll,
12266
12456
  selectedRowsNumber
12267
12457
  }) => {
12268
- const rootClasses = useStylesWithRootClass(rootClassName$b, className);
12458
+ const rootClasses = useStylesWithRootClass(rootClassName$9, className);
12269
12459
  return jsxs(StyledTableSelectionToolbar, {
12270
12460
  ariaLabel: ariaLabel,
12271
12461
  className: rootClasses,
@@ -12359,7 +12549,7 @@ const DotTable = ({
12359
12549
  return onUpdateData ? data : stableSort(data, getComparator(order, orderBy));
12360
12550
  };
12361
12551
  const [pageData, setPageData] = useState(getSortedData().slice(0, rowsPerPage ? rowsPerPage : data.length));
12362
- const rootClasses = useStylesWithRootClass(rootClassName$i, className, loading ? 'loading' : '');
12552
+ const rootClasses = useStylesWithRootClass(rootClassName$g, className, loading ? 'loading' : '');
12363
12553
  const updateData = (newOrder, newOrderBy, newPage, newRowsPerPage) => {
12364
12554
  const newData = stableSort(data, getComparator(newOrder, newOrderBy));
12365
12555
  setPageData(newRowsPerPage ? newData.slice(newPage * newRowsPerPage, newPage * newRowsPerPage + newRowsPerPage) : newData);
@@ -12557,7 +12747,7 @@ const DotTableAction = ({
12557
12747
  });
12558
12748
  };
12559
12749
 
12560
- const rootClassName$a = 'dot-table-actions';
12750
+ const rootClassName$8 = 'dot-table-actions';
12561
12751
  const TableActionsContainer = styled.div`
12562
12752
  overflow: hidden;
12563
12753
  text-overflow: clip;
@@ -12639,7 +12829,7 @@ const DotTableActions = ({
12639
12829
  };
12640
12830
  return jsxs(Fragment, {
12641
12831
  children: [jsxs(TableActionsContainer, {
12642
- className: rootClassName$a,
12832
+ className: rootClassName$8,
12643
12833
  ref: wrapperRef,
12644
12834
  children: [!showMenu && renderTableActions(), (showMenu || actions.length > 2) && jsx(DotIconButton, {
12645
12835
  ariaLabel: "more options",
@@ -12663,12 +12853,12 @@ const DotTableActions = ({
12663
12853
  });
12664
12854
  };
12665
12855
 
12666
- const rootClassName$9 = 'dot-tabs';
12856
+ const rootClassName$7 = 'dot-tabs';
12667
12857
  const StyledTabs = styled(Tabs)`
12668
12858
  ${({
12669
12859
  theme
12670
12860
  }) => css`
12671
- &.${rootClassName$9} {
12861
+ &.${rootClassName$7} {
12672
12862
  &.MuiTabs-root {
12673
12863
  width: 100%;
12674
12864
  }
@@ -12713,7 +12903,7 @@ const DotTabs = ({
12713
12903
  centered = false,
12714
12904
  className,
12715
12905
  color,
12716
- 'data-pendoid': dataPendoId = rootClassName$9,
12906
+ 'data-pendoid': dataPendoId = rootClassName$7,
12717
12907
  'data-testid': dataTestId,
12718
12908
  initialValue = 0,
12719
12909
  onChange,
@@ -12722,7 +12912,7 @@ const DotTabs = ({
12722
12912
  variant = 'standard'
12723
12913
  }) => {
12724
12914
  const [value, setValue] = useState(initialValue);
12725
- const rootClasses = useStylesWithRootClass(rootClassName$9, className);
12915
+ const rootClasses = useStylesWithRootClass(rootClassName$7, className);
12726
12916
  useEffect(() => {
12727
12917
  if (color) {
12728
12918
  console.warn('DEPRECATED: `color` prop is deprecated in `<DotTabs>`, please remove any usage of it in your application.');
@@ -12776,14 +12966,14 @@ const DotTabs = ({
12776
12966
  });
12777
12967
  };
12778
12968
 
12779
- const rootClassName$8 = 'dot-file-upload';
12780
- const containerClassName$2 = `${rootClassName$8}-container`;
12781
- const dropZoneClassName = `${rootClassName$8}-drop-zone`;
12969
+ const rootClassName$6 = 'dot-file-upload';
12970
+ const containerClassName = `${rootClassName$6}-container`;
12971
+ const dropZoneClassName = `${rootClassName$6}-drop-zone`;
12782
12972
  const StyledFileUploadContainer = styled.div`
12783
12973
  ${({
12784
12974
  theme
12785
12975
  }) => css`
12786
- &.${containerClassName$2} {
12976
+ &.${containerClassName} {
12787
12977
  .dot-max-files-message.dot-max-files-reached {
12788
12978
  color: ${theme.palette.figma.destructive.normal};
12789
12979
  }
@@ -12798,7 +12988,7 @@ const StyledFileUpload = styled.div`
12798
12988
  ${({
12799
12989
  theme
12800
12990
  }) => css`
12801
- &.${rootClassName$8}.${dropZoneClassName} {
12991
+ &.${rootClassName$6}.${dropZoneClassName} {
12802
12992
  align-items: center;
12803
12993
  background: ${theme.palette.figma.background.level0.bckgGray};
12804
12994
  border: 2px dashed ${theme.palette.figma.border.defaultButton};
@@ -12829,12 +13019,12 @@ const StyledFileUpload = styled.div`
12829
13019
  `}
12830
13020
  `;
12831
13021
 
12832
- const rootClassName$7 = 'dot-file-list-item';
13022
+ const rootClassName$5 = 'dot-file-list-item';
12833
13023
  const StyledFileListItem = styled(StyledListItem)`
12834
13024
  ${({
12835
13025
  theme
12836
13026
  }) => css`
12837
- &.${rootClassName$7} {
13027
+ &.${rootClassName$5} {
12838
13028
  border-bottom: 1px solid ${theme.palette.figma.border.default};
12839
13029
  &:hover {
12840
13030
  cursor: pointer;
@@ -12846,7 +13036,7 @@ const StyledFileListItem = styled(StyledListItem)`
12846
13036
  outline: none;
12847
13037
  }
12848
13038
 
12849
- &.file-success:not(:hover, :focus-visible) .${rootClassName$7}-end-icon {
13039
+ &.file-success:not(:hover, :focus-visible) .${rootClassName$5}-end-icon {
12850
13040
  i:before {
12851
13041
  color: ${theme.palette.figma.success.normal};
12852
13042
  }
@@ -12856,7 +13046,7 @@ const StyledFileListItem = styled(StyledListItem)`
12856
13046
  }
12857
13047
  }
12858
13048
 
12859
- &.file-error:not(:hover, :focus-visible) .${rootClassName$7}-end-icon {
13049
+ &.file-error:not(:hover, :focus-visible) .${rootClassName$5}-end-icon {
12860
13050
  i:before,
12861
13051
  .MuiListItemText-secondary {
12862
13052
  color: ${theme.palette.figma.destructive.normal};
@@ -12898,7 +13088,7 @@ const DotFileListItem = ({
12898
13088
  onKeyPress,
12899
13089
  tabIndex = 0
12900
13090
  }) => {
12901
- const rootClasses = useStylesWithRootClass(rootClassName$7, className, error ? 'file-error' : 'file-success');
13091
+ const rootClasses = useStylesWithRootClass(rootClassName$5, className, error ? 'file-error' : 'file-success');
12902
13092
  const defaultIcon = error ? 'error-solid' : 'check-solid';
12903
13093
  const [endIcon, setEndIcon] = useState(defaultIcon);
12904
13094
  const handleItemClick = clickedFile => _event => onClick === null || onClick === void 0 ? void 0 : onClick(clickedFile);
@@ -12931,7 +13121,7 @@ const DotFileListItem = ({
12931
13121
  })]
12932
13122
  }), jsx(DotIconButton, {
12933
13123
  ariaLabel: "delete file",
12934
- className: `${rootClassName$7}-end-icon`,
13124
+ className: `${rootClassName$5}-end-icon`,
12935
13125
  "data-testid": dataTestId && `${dataTestId}-end-icon`,
12936
13126
  disabled: disableDelete,
12937
13127
  iconId: endIcon,
@@ -13055,7 +13245,7 @@ const DotFileUpload = ({
13055
13245
  buttonOnly = false,
13056
13246
  className,
13057
13247
  contentErrors,
13058
- 'data-pendoid': dataPendoId = rootClassName$8,
13248
+ 'data-pendoid': dataPendoId = rootClassName$6,
13059
13249
  'data-testid': dataTestId,
13060
13250
  disabled,
13061
13251
  hideFilesList,
@@ -13068,7 +13258,7 @@ const DotFileUpload = ({
13068
13258
  const [uploadedFiles, setUploadedFiles] = useState([]);
13069
13259
  const [hasMaxFilesError, setHasMaxFilesError] = useState(false);
13070
13260
  const isUploadDisabled = disabled || maxFiles && uploadedFiles.length >= maxFiles;
13071
- const rootClasses = useStylesWithRootClass(rootClassName$8, className, !buttonOnly ? dropZoneClassName : '', isUploadDisabled ? 'disabled' : '');
13261
+ const rootClasses = useStylesWithRootClass(rootClassName$6, className, !buttonOnly ? dropZoneClassName : '', isUploadDisabled ? 'disabled' : '');
13072
13262
  const maxFilesClasses = useStylesWithRootClass('dot-max-files-message', hasMaxFilesError ? 'dot-max-files-reached' : '');
13073
13263
  const allowMultiple = maxFiles === undefined || maxFiles > 1;
13074
13264
  const setNewlyUploadedFiles = (acceptedFiles, fileRejections) => {
@@ -13118,7 +13308,7 @@ const DotFileUpload = ({
13118
13308
  uploadedFiles
13119
13309
  });
13120
13310
  return jsxs(StyledFileUploadContainer, {
13121
- className: containerClassName$2,
13311
+ className: containerClassName,
13122
13312
  role: ariaRole,
13123
13313
  children: [jsxs(StyledFileUpload, Object.assign({}, getRootProps(), {
13124
13314
  "aria-label": ariaLabel,
@@ -13140,12 +13330,12 @@ const DotFileUpload = ({
13140
13330
  });
13141
13331
  };
13142
13332
 
13143
- const rootClassName$6 = 'dot-divider';
13333
+ const rootClassName$4 = 'dot-divider';
13144
13334
  const StyledDivider = styled(Divider)`
13145
13335
  ${({
13146
13336
  theme
13147
13337
  }) => css`
13148
- &.${rootClassName$6} {
13338
+ &.${rootClassName$4} {
13149
13339
  color: ${theme.palette.figma.border.darker};
13150
13340
 
13151
13341
  .MuiDivider-light {
@@ -13165,7 +13355,7 @@ const DotDivider = ({
13165
13355
  orientation,
13166
13356
  variant
13167
13357
  }) => {
13168
- const rootClasses = useStylesWithRootClass(rootClassName$6, className);
13358
+ const rootClasses = useStylesWithRootClass(rootClassName$4, className);
13169
13359
  return jsx(StyledDivider, {
13170
13360
  absolute: absolute,
13171
13361
  "aria-label": ariaLabel,
@@ -13246,14 +13436,14 @@ const getListItemLayout = listItems => {
13246
13436
  }));
13247
13437
  };
13248
13438
 
13249
- const rootClassName$5 = 'dot-draggable-list';
13439
+ const rootClassName$3 = 'dot-draggable-list';
13250
13440
  const listItemClassName = 'dot-draggable-list-item';
13251
13441
  const StyledDraggableList = styled.div`
13252
13442
  ${({
13253
13443
  theme,
13254
13444
  draggableHandle
13255
13445
  }) => css`
13256
- &.${rootClassName$5} {
13446
+ &.${rootClassName$3} {
13257
13447
  padding: ${theme.spacing(1, 0)};
13258
13448
  position: relative;
13259
13449
 
@@ -13288,7 +13478,7 @@ const ListGridLayout = WidthProvider(GridLayout);
13288
13478
  const DotDraggableList = ({
13289
13479
  ariaLabel,
13290
13480
  className,
13291
- 'data-pendoid': dataPendoId = rootClassName$5,
13481
+ 'data-pendoid': dataPendoId = rootClassName$3,
13292
13482
  'data-testid': dataTestId,
13293
13483
  disableDrag,
13294
13484
  draggableHandle,
@@ -13297,7 +13487,7 @@ const DotDraggableList = ({
13297
13487
  rowHeight = DEFAULT_LIST_ITEM_HEIGHT,
13298
13488
  width = DEFAULT_LIST_WIDTH
13299
13489
  }) => {
13300
- const rootClasses = useStylesWithRootClass(rootClassName$5, className, draggableHandle ? 'with-draggable-handle' : '');
13490
+ const rootClasses = useStylesWithRootClass(rootClassName$3, className, draggableHandle ? 'with-draggable-handle' : '');
13301
13491
  const listItemClasses = useStylesWithRootClass(listItemClassName, draggableHandle && !disableDrag ? 'with-handle-grab-cursor' : '', draggableHandle || disableDrag ? 'with-default-cursor' : '');
13302
13492
  const listWidth = isNumber(width) ? `${width}px` : width;
13303
13493
  const [orderedItems, setOrderedItems] = useState([]);
@@ -13344,12 +13534,12 @@ const DotDraggableList = ({
13344
13534
  });
13345
13535
  };
13346
13536
 
13347
- const rootClassName$4 = 'dot-linear-progress';
13537
+ const rootClassName$2 = 'dot-linear-progress';
13348
13538
  const StyledLinearProgress = styled(LinearProgress)`
13349
13539
  ${({
13350
13540
  theme
13351
13541
  }) => css`
13352
- &.${rootClassName$4} {
13542
+ &.${rootClassName$2} {
13353
13543
  &.MuiLinearProgress-colorError {
13354
13544
  color: ${theme.palette.figma.inProgress.error};
13355
13545
  }
@@ -13381,7 +13571,7 @@ const DotLinearProgress = ({
13381
13571
  valueBuffer,
13382
13572
  variant = 'indeterminate'
13383
13573
  }) => {
13384
- const rootClasses = useStylesWithRootClass(rootClassName$4, className);
13574
+ const rootClasses = useStylesWithRootClass(rootClassName$2, className);
13385
13575
  useEffect(() => {
13386
13576
  if (!ariaLabel) {
13387
13577
  console.warn('a11y: DotLinearProgress must have an ariaLabel to describe the progress bar');
@@ -13420,61 +13610,6 @@ const getContextEnumBasedOnTarget = (event, inputElement, contextEnum) => {
13420
13610
  return currentContextEnum;
13421
13611
  };
13422
13612
 
13423
- const rootClassName$3 = 'dot-date-picker';
13424
- const popperClassName = 'dot-date-picker-popper';
13425
- const containerClassName$1 = 'dot-date-picker-container';
13426
- const rectanglePickersDayClassName = 'dot-rectangle-pickers-day';
13427
- const StyledDatePickerContainer = styled.div`
13428
- ${() => css`
13429
- &.${rootClassName$3} .full-width {
13430
- width: 100%;
13431
- }
13432
- `}
13433
- `;
13434
- const StyledDatePicker = styled(DatePicker)`
13435
- ${({
13436
- theme
13437
- }) => css`
13438
- &.${rootClassName$3} {
13439
- ${pickerInputStyles(theme)};
13440
-
13441
- .Mui-disabled.MuiInputBase-root,
13442
- &.read-only .MuiInputBase-root {
13443
- ${readOnlyStyles(theme)};
13444
- }
13445
-
13446
- .dot-icon-btn .dot-i {
13447
- margin-top: -5px;
13448
- }
13449
-
13450
- .MuiFormLabel-root {
13451
- color: ${theme.palette.figma.typography.black};
13452
- }
13453
- }
13454
- `}
13455
- `;
13456
- const StyledPickersDay = styled(PickersDay)`
13457
- ${({
13458
- theme
13459
- }) => css`
13460
- &.${rectanglePickersDayClassName} {
13461
- border-radius: ${theme.spacing(0.5)};
13462
- &.MuiPickersDay-today:not(.Mui-selected) {
13463
- background: ${theme.palette.figma.neutral.normal};
13464
- border: 1px solid ${theme.palette.figma.primary.normal};
13465
- &:hover {
13466
- background: ${theme.palette.figma.primary.normal};
13467
- }
13468
- }
13469
-
13470
- &:hover {
13471
- background: ${theme.palette.figma.primary.normal};
13472
- color: ${theme.palette.figma.typography.white};
13473
- }
13474
- }
13475
- `}
13476
- `;
13477
-
13478
13613
  const RectanglePickersDay = pickersDayProps => {
13479
13614
  return jsx(StyledPickersDay, Object.assign({}, pickersDayProps, {
13480
13615
  className: rectanglePickersDayClassName,
@@ -13487,7 +13622,7 @@ const DotDatePicker = ({
13487
13622
  autoFocus = false,
13488
13623
  className,
13489
13624
  closeOnSelect = true,
13490
- 'data-pendoid': dataPendoId = rootClassName$3,
13625
+ 'data-pendoid': dataPendoId = rootClassName$w,
13491
13626
  'data-testid': dataTestId,
13492
13627
  defaultValue,
13493
13628
  disableOpenPicker,
@@ -13527,8 +13662,8 @@ const DotDatePicker = ({
13527
13662
  const hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
13528
13663
  const isInputReadOnly = readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
13529
13664
  const inputRef = useRef(null);
13530
- const rootClasses = useStylesWithRootClass(rootClassName$3, className, isInputReadOnly ? 'read-only' : '');
13531
- const containerClasses = useStylesWithRootClass(containerClassName$1, fullWidth ? 'full-width' : '', className);
13665
+ const rootClasses = useStylesWithRootClass(rootClassName$w, className, isInputReadOnly ? 'read-only' : '');
13666
+ const containerClasses = useStylesWithRootClass(containerClassName$2, fullWidth ? 'full-width' : '', className);
13532
13667
  const focusInput = ref => {
13533
13668
  setTimeout(() => {
13534
13669
  ref.current.focus();
@@ -13737,96 +13872,6 @@ const getTimePickerButtonType = selectedDaytime => selectedDaytime && selectedDa
13737
13872
  const checkIfOpenPropDefined = open => open !== null && open !== undefined;
13738
13873
  const getDaytimeButtonType = daytimeSelected => daytimeSelected && daytimeSelected === Daytime.AM ? 'primary' : 'text';
13739
13874
 
13740
- const rootClassName$2 = 'dot-time-picker';
13741
- const containerClassName = 'dot-time-picker-container';
13742
- const TIME_SELECTION_HEIGHT_SPACING = 34.5;
13743
- const TIME_SELECTION_WIDTH_SPACING = 14.5;
13744
- const TIME_UNIT_WIDTH_SPACING = 4.5;
13745
- const TIME_UNIT_HEIGHT_SPACING = 4.5;
13746
- const StyledTimePickerContainer = styled.div`
13747
- ${({
13748
- theme
13749
- }) => css`
13750
- &.${containerClassName} {
13751
- .full-width {
13752
- width: 100%;
13753
- }
13754
-
13755
- .dot-time-picker-popper {
13756
- z-index: ${levelTop};
13757
-
13758
- .dot-time-picker-paper {
13759
- display: flex;
13760
- flex-direction: column;
13761
- align-items: center;
13762
-
13763
- .dot-time-picker-selection {
13764
- max-height: ${theme.spacing(TIME_SELECTION_HEIGHT_SPACING)};
13765
- width: ${theme.spacing(TIME_SELECTION_WIDTH_SPACING)};
13766
- display: flex;
13767
- margin: ${theme.spacing(1)};
13768
- gap: ${theme.spacing(0.5)};
13769
-
13770
- .dot-time-picker-hours,
13771
- .dot-time-picker-minutes,
13772
- .dot-time-picker-daytime {
13773
- display: flex;
13774
- flex-direction: column;
13775
- overflow: auto;
13776
- gap: ${theme.spacing(0.5)};
13777
- padding-bottom: ${theme.spacing(TIME_SELECTION_HEIGHT_SPACING - TIME_UNIT_HEIGHT_SPACING)};
13778
-
13779
- /* Hide scrollbar for Chrome, Safari and Opera */
13780
- ::-webkit-scrollbar {
13781
- display: none;
13782
- }
13783
-
13784
- /* Hide scrollbar for IE, Edge and Firefox */
13785
- -ms-overflow-style: none; /* IE and Edge */
13786
- scrollbar-width: none; /* Firefox */
13787
- }
13788
-
13789
- .dot-picker-button {
13790
- width: ${theme.spacing(TIME_UNIT_WIDTH_SPACING)};
13791
- height: ${theme.spacing(TIME_UNIT_HEIGHT_SPACING)};
13792
- margin: 0;
13793
- }
13794
- }
13795
-
13796
- .dot-time-picker-action-buttons {
13797
- display: flex;
13798
- align-items: center;
13799
- justify-content: space-between;
13800
- padding: ${theme.spacing(0.5)};
13801
- }
13802
- }
13803
- }
13804
- }
13805
- `}
13806
- `;
13807
- const StyledTimePicker = styled(TimePicker)`
13808
- ${({
13809
- theme
13810
- }) => css`
13811
- &.${rootClassName$2} {
13812
- ${pickerInputStyles(theme)};
13813
-
13814
- .Mui-disabled.MuiInputBase-root,
13815
- &.read-only .MuiInputBase-root {
13816
- ${readOnlyStyles(theme)};
13817
- }
13818
-
13819
- .dot-icon-btn .dot-i {
13820
- margin-top: -5px;
13821
- }
13822
-
13823
- .MuiFormLabel-root {
13824
- color: ${theme.palette.figma.typography.black};
13825
- }
13826
- }
13827
- `}
13828
- `;
13829
-
13830
13875
  dayjs.extend(utc);
13831
13876
  const DEFAULT_PICKER_TIME_FORMAT = 'HH:mm';
13832
13877
  const DEFAULT_TIME_FORMAT = 'HH:mm';
@@ -13836,7 +13881,7 @@ const DotTimePicker = ({
13836
13881
  ariaLabel,
13837
13882
  autoFocus = false,
13838
13883
  className,
13839
- 'data-pendoid': dataPendoId = rootClassName$2,
13884
+ 'data-pendoid': dataPendoId = rootClassName$v,
13840
13885
  'data-testid': dataTestId,
13841
13886
  defaultValue,
13842
13887
  disableOpenPicker = false,
@@ -13868,8 +13913,8 @@ const DotTimePicker = ({
13868
13913
  const hasValueWithoutChangeHandler = value !== undefined && onChange === undefined;
13869
13914
  const hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
13870
13915
  const isComponentReadOnly = readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
13871
- const rootClasses = useStylesWithRootClass(rootClassName$2, className, isComponentReadOnly ? 'read-only' : '');
13872
- const containerClasses = useStylesWithRootClass(containerClassName, fullWidth ? 'full-width' : '', className);
13916
+ const rootClasses = useStylesWithRootClass(rootClassName$v, className, isComponentReadOnly ? 'read-only' : '');
13917
+ const containerClasses = useStylesWithRootClass(containerClassName$1, fullWidth ? 'full-width' : '', className);
13873
13918
  const inputRef = useRef(null);
13874
13919
  const [isPickerOpened, setIsPickerOpened] = useState(false);
13875
13920
  const [time, setTime] = useState(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -1,11 +1,13 @@
1
1
  import { ReactNode } from 'react';
2
- import { SnackbarSeverity } from './Snackbar';
2
+ import { SnackbarPrimaryAction, SnackbarSecondaryAction, SnackbarSeverity } from './Snackbar';
3
3
  declare const initialState: {
4
4
  message: string;
5
5
  open: boolean;
6
6
  severity: string;
7
7
  id: string;
8
8
  autoHideDuration: number;
9
+ primaryAction: SnackbarPrimaryAction;
10
+ secondaryAction: SnackbarSecondaryAction;
9
11
  }[];
10
12
  export interface SnackbarProviderProps {
11
13
  /** The components or string that load inside the snackbar provider. */
@@ -17,7 +19,7 @@ interface SnackbarContainerProps {
17
19
  }
18
20
  interface DotSnackbarProps {
19
21
  alerts: typeof initialState;
20
- enqueueMessage: (message: ReactNode, severity: SnackbarSeverity, autoHideDuration?: number | null) => string;
22
+ enqueueMessage: (message: ReactNode, severity: SnackbarSeverity, autoHideDuration?: number | null, primaryAction?: SnackbarPrimaryAction, secondaryAction?: SnackbarSecondaryAction) => string;
21
23
  removeMessage: (id: string) => void;
22
24
  }
23
25
  export declare const DotSnackbarContext: import("react").Context<DotSnackbarProps>;
@@ -13,6 +13,7 @@ export interface TooltipProps extends CommonProps {
13
13
  onClose?: (event: ChangeEvent) => void;
14
14
  open?: boolean;
15
15
  placement?: TooltipPlacement;
16
+ popperClassName?: string;
16
17
  title?: ReactNode | string | number;
17
18
  }
18
- export declare const DotTooltip: ({ ariaLabel, ariaRole, arrow, children, className, "data-testid": dataTestId, disablePortal, hoverVisibility, leaveDelay, onClose, open, placement, title, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const DotTooltip: ({ ariaLabel, ariaRole, arrow, children, className, "data-testid": dataTestId, disablePortal, hoverVisibility, leaveDelay, onClose, open, placement, popperClassName, title, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;