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