@digital-ai/dot-components 4.14.0 → 4.15.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 +1058 -1028
- package/package.json +1 -1
- package/src/lib/components/BaseButtonProps.d.ts +5 -3
- package/src/lib/components/app-toolbar/AppToolbar.d.ts +2 -2
- package/src/lib/components/avatar/Avatar.d.ts +3 -1
- package/src/lib/components/button/CopyButton.d.ts +2 -2
- package/src/lib/components/button/IconButton.d.ts +6 -4
- package/src/lib/components/button-toggle/utils/models.d.ts +3 -1
- package/src/lib/components/icon/Icon.d.ts +3 -1
- package/src/lib/components/progress-button/ProgressButton.d.ts +1 -1
- package/src/lib/components/split-button/SplitButton.d.ts +1 -1
package/index.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { useState, useRef,
|
|
4
|
-
import { Tooltip, InputAdornment, InputLabel, TextField, Icon,
|
|
5
|
-
import '@digital-ai/dot-icons';
|
|
6
|
-
import styled, { css, createGlobalStyle, ThemeProvider as ThemeProvider$1, keyframes } from 'styled-components';
|
|
3
|
+
import React__default, { useEffect, useState, useRef, createContext, useMemo, useContext, forwardRef, useCallback, createElement, Fragment as Fragment$1, useLayoutEffect } from 'react';
|
|
4
|
+
import { Typography, Fade, StyledEngineProvider, Tooltip, InputAdornment, InputLabel, TextField, Icon, Accordion, AccordionSummary, AccordionDetails, AccordionActions, Toolbar, Alert, Avatar, Button, Link, List, ListSubheader, Divider, CircularProgress, Popper, MenuList, MenuItem, Paper, ClickAwayListener, Drawer, IconButton, ListItem, ListItemButton, Collapse, ListItemIcon, ListItemText, Badge, useMediaQuery, Chip, Autocomplete, AvatarGroup, Breadcrumbs, ToggleButtonGroup, ToggleButton, Card, CardContent, CardHeader, FormControlLabel, Checkbox, FormControl, FormGroup, FormLabel, FormHelperText, Dialog, DialogContent, DialogActions, useTheme as useTheme$1, Snackbar, RadioGroup, Radio, Switch, Skeleton, ButtonGroup, Stepper, Step, StepLabel, TablePagination, TableContainer, TableBody, TableCell, TableRow, TableSortLabel, TableHead, Table, Tabs, Tab, LinearProgress, Slide } from '@mui/material';
|
|
7
5
|
import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';
|
|
6
|
+
import styled, { createGlobalStyle, ThemeProvider as ThemeProvider$1, css, keyframes } from 'styled-components';
|
|
7
|
+
import '@digital-ai/dot-icons';
|
|
8
8
|
import jwt_decode from 'jwt-decode';
|
|
9
9
|
import '@digital-ai/dot-illustrations';
|
|
10
10
|
import { DatePicker, PickersDay, TimePicker, LocalizationProvider } from '@mui/x-date-pickers';
|
|
@@ -42,756 +42,166 @@ const checkIfOverflowPresentInElementTree = element => {
|
|
|
42
42
|
return false;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
const
|
|
45
|
+
const DotTypography = ({
|
|
46
46
|
ariaLabel,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
children,
|
|
47
|
+
ariaLevel,
|
|
48
|
+
ariaRole,
|
|
50
49
|
className,
|
|
51
50
|
'data-testid': dataTestId,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
hoverVisibility = 'always',
|
|
58
|
-
leaveDelay,
|
|
59
|
-
onClose,
|
|
60
|
-
open,
|
|
61
|
-
placement = 'bottom',
|
|
62
|
-
popperClassName,
|
|
63
|
-
slotProps,
|
|
64
|
-
title,
|
|
65
|
-
childrenDisplayStyle
|
|
51
|
+
children,
|
|
52
|
+
component,
|
|
53
|
+
noMarginBottom,
|
|
54
|
+
noWrap,
|
|
55
|
+
variant
|
|
66
56
|
}) => {
|
|
67
|
-
const rootClasses = useStylesWithRootClass('dot-
|
|
68
|
-
const [hasTooltipOnHover, setHasTooltipOnHover] = useState(false);
|
|
69
|
-
const childrenWrapperRef = useRef();
|
|
57
|
+
const rootClasses = useStylesWithRootClass('dot-typography', className);
|
|
70
58
|
useEffect(() => {
|
|
71
|
-
if (
|
|
72
|
-
|
|
73
|
-
if (childrenWrapperRef.current) {
|
|
74
|
-
resizeObserver.observe(childrenWrapperRef.current);
|
|
59
|
+
if (ariaRole === 'heading' && !ariaLevel) {
|
|
60
|
+
console.warn('please include ariaLevel when using ariaRole="heading"');
|
|
75
61
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const isOverflowPresent = checkIfOverflowPresentInElementTree(childrenWrapperRef.current);
|
|
86
|
-
setHasTooltipOnHover(isOverflowPresent);
|
|
87
|
-
};
|
|
88
|
-
if (!title) {
|
|
89
|
-
return children;
|
|
90
|
-
}
|
|
91
|
-
return jsx(Tooltip, {
|
|
92
|
-
"aria-hidden": false,
|
|
93
|
-
"aria-label": ariaLabel || title.toString(),
|
|
94
|
-
arrow: arrow,
|
|
95
|
-
className: rootClasses,
|
|
96
|
-
"data-testid": dataTestId,
|
|
97
|
-
disableHoverListener: hoverVisibility === 'never' || hoverVisibility === 'overflow' && !hasTooltipOnHover,
|
|
98
|
-
disableInteractive: disableInteractive,
|
|
99
|
-
leaveDelay: leaveDelay,
|
|
100
|
-
enterDelay: enterDelay,
|
|
101
|
-
enterNextDelay: enterNextDelay,
|
|
102
|
-
onClose: onClose,
|
|
103
|
-
open: open,
|
|
104
|
-
placement: placement,
|
|
105
|
-
PopperProps: {
|
|
106
|
-
disablePortal,
|
|
107
|
-
className: popperClassName
|
|
62
|
+
if (noMarginBottom) {
|
|
63
|
+
console.warn('DEPRECATED: `noMarginBottom` on `DotTypography` is no longer included');
|
|
64
|
+
}
|
|
65
|
+
}, []);
|
|
66
|
+
return jsx(Typography, {
|
|
67
|
+
"aria-label": ariaLabel,
|
|
68
|
+
"aria-level": ariaLevel,
|
|
69
|
+
classes: {
|
|
70
|
+
root: rootClasses
|
|
108
71
|
},
|
|
109
|
-
|
|
72
|
+
component: component,
|
|
73
|
+
"data-testid": dataTestId,
|
|
74
|
+
noWrap: noWrap,
|
|
110
75
|
role: ariaRole,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
ref: childrenWrapperRef,
|
|
118
|
-
tabIndex: -1,
|
|
119
|
-
children: children
|
|
120
|
-
})
|
|
76
|
+
style: {
|
|
77
|
+
marginBottom: noMarginBottom ? 0 : undefined
|
|
78
|
+
},
|
|
79
|
+
variant: variant,
|
|
80
|
+
children: children
|
|
121
81
|
});
|
|
122
82
|
};
|
|
123
83
|
|
|
124
|
-
//
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
const
|
|
190
|
-
const
|
|
191
|
-
const
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
const
|
|
196
|
-
const
|
|
197
|
-
const
|
|
198
|
-
const
|
|
199
|
-
const
|
|
200
|
-
const
|
|
201
|
-
const
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
&:not(.MuiAutocomplete-inputRoot) {
|
|
247
|
-
&.MuiInputBase-adornedStart {
|
|
248
|
-
padding-left: ${theme.spacing(1.5)};
|
|
249
|
-
}
|
|
250
|
-
&.MuiInputBase-adornedEnd {
|
|
251
|
-
padding-right: ${theme.spacing(1)};
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
.MuiInputBase-input {
|
|
256
|
-
box-sizing: content-box;
|
|
257
|
-
}
|
|
258
|
-
.MuiOutlinedInput-input {
|
|
259
|
-
padding: 18px ${InputProps.endAdornment ? '0px' : '12px'} 18px
|
|
260
|
-
${InputProps.startAdornment ? '0px' : '12px'};
|
|
261
|
-
&::placeholder {
|
|
262
|
-
opacity: 1;
|
|
263
|
-
color: ${theme.palette.figma.typography.gray};
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
.MuiInputBase-inputSizeSmall {
|
|
267
|
-
padding-top: 10.5px;
|
|
268
|
-
padding-bottom: 10.5px;
|
|
269
|
-
|
|
270
|
-
&:not(textarea) {
|
|
271
|
-
/* padding above and below together is 21px, and total height should be 40px */
|
|
272
|
-
height: 19px;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.MuiInputBase-multiline {
|
|
277
|
-
.MuiInputBase-inputMultiline {
|
|
278
|
-
padding: 0;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
&.${resizerClassName} {
|
|
282
|
-
resize: both;
|
|
283
|
-
overflow: auto;
|
|
284
|
-
height: ${$minRows ? ROW_HEIGHT * $minRows : ROW_HEIGHT}px;
|
|
285
|
-
min-height: ${$minRows ? ROW_HEIGHT * $minRows : ROW_HEIGHT}px;
|
|
286
|
-
max-height: ${$maxRows ? `${ROW_HEIGHT * $maxRows}px` : 'unset'};
|
|
287
|
-
min-width: 170px;
|
|
288
|
-
|
|
289
|
-
#custom-text-input.MuiInputBase-inputMultiline {
|
|
290
|
-
height: 100% !important;
|
|
291
|
-
width: 100%;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
&.${readOnlyClassName$1} .MuiInputBase-root,
|
|
297
|
-
.MuiInputBase-root.Mui-disabled {
|
|
298
|
-
${readOnlyStyles(theme)};
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.MuiInputBase-adornedEnd .clear-icon-button.hidden {
|
|
302
|
-
visibility: hidden;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.${adornmentIconClassName}.MuiInputAdornment-positionStart {
|
|
306
|
-
margin-right: ${theme.spacing(0.5)};
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.${adornmentIconClassName}.MuiInputAdornment-positionEnd {
|
|
310
|
-
margin: ${theme.spacing(0)};
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.dot-select,
|
|
315
|
-
.dot-input {
|
|
316
|
-
&.${readOnlyClassName$1}, &.Mui-disabled {
|
|
317
|
-
${readOnlyStyles(theme)};
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
&.${rootSelectClassName} .${adornmentIconClassName} {
|
|
322
|
-
// inputSelect has an arrow so we need spacing for end adornment
|
|
323
|
-
margin-right: ${theme.spacing(2)};
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
&.${rootSelectClassName}, &.${rootClassName$1n} {
|
|
327
|
-
.${adornmentIconClassName} {
|
|
328
|
-
color: ${theme.palette.figma.icon.black};
|
|
329
|
-
p {
|
|
330
|
-
font-size: ${theme.typography.body2.fontSize}px;
|
|
331
|
-
margin: 0;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
.dot-icon i {
|
|
335
|
-
margin-top: -2px;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.MuiInputLabel-root,
|
|
340
|
-
.MuiInputLabel-root.Mui-error {
|
|
341
|
-
color: ${theme.palette.figma.typography.gray};
|
|
342
|
-
|
|
343
|
-
&.MuiInputLabel-shrink {
|
|
344
|
-
color: ${theme.palette.figma.typography.black};
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
.MuiInputBase-root {
|
|
349
|
-
background: ${theme.palette.figma.neutral.normal};
|
|
350
|
-
margin-bottom: 0;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.MuiInputBase-inputSizeSmall:not(textarea) {
|
|
354
|
-
height: 19px;
|
|
355
|
-
padding-top: 10.5px;
|
|
356
|
-
padding-bottom: 10.5px;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
select.dot-select {
|
|
360
|
-
padding-left: ${theme.spacing(1.5)};
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.MuiSelect-select:focus:not(.${readOnlyClassName$1}) {
|
|
364
|
-
background-color: transparent;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.MuiSelect-icon {
|
|
368
|
-
right: ${InputProps.endAdornment ? `44px` : `12px`};
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
&.${successClassName} {
|
|
372
|
-
.MuiOutlinedInput-notchedOutline {
|
|
373
|
-
border-color: ${theme.palette.figma.success.normal};
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.${adornmentIconClassName} .dot-icon {
|
|
377
|
-
color: ${theme.palette.figma.success.normal};
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
&.${errorClassName} {
|
|
382
|
-
.MuiOutlinedInput-notchedOutline {
|
|
383
|
-
border-color: ${theme.palette.figma.destructive.normal};
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.${adornmentIconClassName} .dot-icon {
|
|
387
|
-
color: ${theme.palette.figma.destructive.normal};
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
&.${warningClassName} {
|
|
392
|
-
.MuiOutlinedInput-notchedOutline {
|
|
393
|
-
border-color: ${theme.palette.figma.warning.normal};
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.${adornmentIconClassName} .dot-icon {
|
|
397
|
-
color: ${theme.palette.figma.warning.normal};
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
.MuiOutlinedInput-adornedStart {
|
|
402
|
-
padding-left: 12px;
|
|
403
|
-
|
|
404
|
-
&.${warningClassName} .${fieldsetClassName} {
|
|
405
|
-
border-color: ${theme.palette.figma.warning.normal};
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.MuiFormHelperText-root {
|
|
410
|
-
${formHelperTextRootStyles(theme)};
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
`}
|
|
414
|
-
`;
|
|
415
|
-
|
|
416
|
-
const rootClassName$1m = 'dot-icon';
|
|
417
|
-
const StyledIcon = styled(Icon)`
|
|
418
|
-
${({
|
|
419
|
-
theme
|
|
420
|
-
}) => css`
|
|
421
|
-
&.${rootClassName$1m} {
|
|
422
|
-
color: ${theme.palette.figma.icon.black};
|
|
423
|
-
font-size: 20px;
|
|
424
|
-
|
|
425
|
-
&.MuiIcon-fontSizeLarge {
|
|
426
|
-
font-size: 28px;
|
|
427
|
-
height: 35px;
|
|
428
|
-
width: 35px;
|
|
429
|
-
|
|
430
|
-
i {
|
|
431
|
-
height: 28px;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
&.MuiIcon-fontSizeSmall {
|
|
435
|
-
font-size: 18px;
|
|
436
|
-
|
|
437
|
-
i {
|
|
438
|
-
height: 18px;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
i {
|
|
443
|
-
height: 20px;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
&.${warningClassName} {
|
|
447
|
-
color: ${theme.palette.figma.warning.normal};
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
`}
|
|
451
|
-
`;
|
|
452
|
-
|
|
453
|
-
const DotIcon = ({
|
|
454
|
-
ariaLabel,
|
|
455
|
-
ariaRole = 'img',
|
|
456
|
-
className,
|
|
457
|
-
'data-testid': dataTestId,
|
|
458
|
-
fontSize = 'medium',
|
|
459
|
-
iconId,
|
|
460
|
-
tooltip
|
|
461
|
-
}) => {
|
|
462
|
-
const rootClasses = useStylesWithRootClass(rootClassName$1m, className);
|
|
463
|
-
return jsx(DotTooltip, {
|
|
464
|
-
childrenDisplayStyle: "inline-block",
|
|
465
|
-
title: tooltip,
|
|
466
|
-
children: jsx(StyledIcon, {
|
|
467
|
-
"aria-hidden": "false",
|
|
468
|
-
"aria-label": ariaLabel || `${iconId} icon`,
|
|
469
|
-
classes: {
|
|
470
|
-
root: rootClasses
|
|
471
|
-
},
|
|
472
|
-
"data-testid": dataTestId,
|
|
473
|
-
fontSize: fontSize,
|
|
474
|
-
role: ariaRole,
|
|
475
|
-
children: jsx("i", {
|
|
476
|
-
"aria-label": ariaLabel || `${iconId} icon`,
|
|
477
|
-
className: `icon-${iconId} dot-i`,
|
|
478
|
-
"data-testid": dataTestId && `${dataTestId}-i`,
|
|
479
|
-
role: ariaRole
|
|
480
|
-
})
|
|
481
|
-
})
|
|
482
|
-
});
|
|
483
|
-
};
|
|
484
|
-
|
|
485
|
-
const DotTypography = ({
|
|
486
|
-
ariaLabel,
|
|
487
|
-
ariaLevel,
|
|
488
|
-
ariaRole,
|
|
489
|
-
className,
|
|
490
|
-
'data-testid': dataTestId,
|
|
491
|
-
children,
|
|
492
|
-
component,
|
|
493
|
-
noMarginBottom,
|
|
494
|
-
noWrap,
|
|
495
|
-
variant
|
|
496
|
-
}) => {
|
|
497
|
-
const rootClasses = useStylesWithRootClass('dot-typography', className);
|
|
498
|
-
useEffect(() => {
|
|
499
|
-
if (ariaRole === 'heading' && !ariaLevel) {
|
|
500
|
-
console.warn('please include ariaLevel when using ariaRole="heading"');
|
|
501
|
-
}
|
|
502
|
-
if (noMarginBottom) {
|
|
503
|
-
console.warn('DEPRECATED: `noMarginBottom` on `DotTypography` is no longer included');
|
|
504
|
-
}
|
|
505
|
-
}, []);
|
|
506
|
-
return jsx(Typography, {
|
|
507
|
-
"aria-label": ariaLabel,
|
|
508
|
-
"aria-level": ariaLevel,
|
|
509
|
-
classes: {
|
|
510
|
-
root: rootClasses
|
|
511
|
-
},
|
|
512
|
-
component: component,
|
|
513
|
-
"data-testid": dataTestId,
|
|
514
|
-
noWrap: noWrap,
|
|
515
|
-
role: ariaRole,
|
|
516
|
-
style: {
|
|
517
|
-
marginBottom: noMarginBottom ? 0 : undefined
|
|
518
|
-
},
|
|
519
|
-
variant: variant,
|
|
520
|
-
children: children
|
|
521
|
-
});
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
const rootClassName$1l = 'dot-accordion';
|
|
525
|
-
const summaryClassName = 'dot-accordion-summary';
|
|
526
|
-
const detailClassName = 'dot-accordion-details';
|
|
527
|
-
const StyledAccordion = styled(Accordion)`
|
|
528
|
-
${({
|
|
529
|
-
theme
|
|
530
|
-
}) => css`
|
|
531
|
-
.${detailClassName} {
|
|
532
|
-
background: ${theme.palette.figma.background.level1.white};
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
&.${rootClassName$1l} .${summaryClassName} {
|
|
536
|
-
align-items: center;
|
|
537
|
-
background: ${theme.palette.figma.background.level1.white};
|
|
538
|
-
color: ${theme.palette.figma.typography.black};
|
|
539
|
-
display: flex;
|
|
540
|
-
|
|
541
|
-
&.Mui-expanded {
|
|
542
|
-
border-top: 1px solid ${theme.palette.figma.border.default};
|
|
543
|
-
margin: 0;
|
|
544
|
-
|
|
545
|
-
&:before {
|
|
546
|
-
opacity: 1;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
.MuiAccordionSummary-content {
|
|
551
|
-
align-items: center;
|
|
552
|
-
gap: ${theme.spacing(1)};
|
|
553
|
-
width: calc(100% - ${theme.spacing(5)});
|
|
554
|
-
|
|
555
|
-
.dot-tooltip {
|
|
556
|
-
overflow: hidden;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
.MuiAccordionSummary-expandIconWrapper {
|
|
561
|
-
padding: ${theme.spacing(1.5)};
|
|
562
|
-
margin-right: ${theme.spacing(-1.5)};
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
.MuiTypography-root {
|
|
566
|
-
margin-bottom: 0;
|
|
567
|
-
}
|
|
568
|
-
.MuiTypography-body1 {
|
|
569
|
-
padding: 2px 0;
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
`}
|
|
573
|
-
`;
|
|
574
|
-
|
|
575
|
-
const DotAccordion = ({
|
|
576
|
-
actions,
|
|
577
|
-
ariaLabel,
|
|
578
|
-
children,
|
|
579
|
-
className,
|
|
580
|
-
'data-pendoid': dataPendoId = rootClassName$1l,
|
|
581
|
-
'data-testid': dataTestId = 'dot-accordion',
|
|
582
|
-
disabled = false,
|
|
583
|
-
expanded,
|
|
584
|
-
hasElevation = false,
|
|
585
|
-
onChange,
|
|
586
|
-
square = false,
|
|
587
|
-
startIcon = null,
|
|
588
|
-
summary,
|
|
589
|
-
noWrap = true
|
|
590
|
-
}) => {
|
|
591
|
-
const rootClasses = useStylesWithRootClass(rootClassName$1l, className);
|
|
592
|
-
const [elevation, setElevation] = useState();
|
|
593
|
-
useEffect(() => {
|
|
594
|
-
if (onChange && expanded === undefined) {
|
|
595
|
-
console.warn('The use of an `onChange` callback makes this a controlled component but no `expanded` state has been provided. In effect, this makes the component disabled.');
|
|
596
|
-
}
|
|
597
|
-
}, []);
|
|
598
|
-
useEffect(() => {
|
|
599
|
-
setElevation(hasElevation ? 1 : 0);
|
|
600
|
-
}, [hasElevation]);
|
|
601
|
-
return jsxs(StyledAccordion, {
|
|
602
|
-
"aria-label": ariaLabel,
|
|
603
|
-
className: rootClasses,
|
|
604
|
-
"data-pendoid": dataPendoId,
|
|
605
|
-
"data-testid": dataTestId,
|
|
606
|
-
disabled: disabled,
|
|
607
|
-
elevation: elevation,
|
|
608
|
-
expanded: onChange ? expanded : undefined,
|
|
609
|
-
onChange: onChange,
|
|
610
|
-
square: square,
|
|
611
|
-
children: [jsxs(AccordionSummary, {
|
|
612
|
-
"aria-label": ariaLabel || summary,
|
|
613
|
-
classes: {
|
|
614
|
-
root: summaryClassName
|
|
615
|
-
},
|
|
616
|
-
"data-testid": `${dataTestId}-summary`,
|
|
617
|
-
expandIcon: jsx(DotIcon, {
|
|
618
|
-
iconId: "chevron-down"
|
|
619
|
-
}),
|
|
620
|
-
role: "button",
|
|
621
|
-
children: [startIcon, jsx(DotTooltip, {
|
|
622
|
-
"data-testid": "accordion-tooltip",
|
|
623
|
-
title: noWrap ? summary : '',
|
|
624
|
-
children: jsx(DotTypography, {
|
|
625
|
-
noWrap: noWrap,
|
|
626
|
-
variant: "body1",
|
|
627
|
-
children: summary
|
|
628
|
-
})
|
|
629
|
-
})]
|
|
630
|
-
}), jsx(AccordionDetails, {
|
|
631
|
-
classes: {
|
|
632
|
-
root: detailClassName
|
|
633
|
-
},
|
|
634
|
-
"data-testid": `${dataTestId}-details`,
|
|
635
|
-
children: children
|
|
636
|
-
}), actions && jsx(AccordionActions, {
|
|
637
|
-
children: actions
|
|
638
|
-
})]
|
|
639
|
-
});
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
const rootClassName$1k = 'dot-action-toolbar';
|
|
643
|
-
const StyledToolbar = styled(Toolbar)`
|
|
644
|
-
${({
|
|
645
|
-
theme
|
|
646
|
-
}) => css`
|
|
647
|
-
&.${rootClassName$1k} {
|
|
648
|
-
border-bottom: 1px solid ${theme.palette.figma.border.default};
|
|
649
|
-
|
|
650
|
-
.${rootClassName$1n} .MuiInputBase-root {
|
|
651
|
-
margin-bottom: 0;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
`}
|
|
655
|
-
`;
|
|
656
|
-
|
|
657
|
-
const DotActionToolbar = ({
|
|
658
|
-
ariaLabel,
|
|
659
|
-
children,
|
|
660
|
-
className,
|
|
661
|
-
'data-testid': dataTestId,
|
|
662
|
-
variant = 'dense'
|
|
663
|
-
}) => {
|
|
664
|
-
const rootClasses = useStylesWithRootClass(rootClassName$1k, className);
|
|
665
|
-
return jsx(StyledToolbar, {
|
|
666
|
-
"aria-label": ariaLabel,
|
|
667
|
-
className: rootClasses,
|
|
668
|
-
"data-testid": dataTestId,
|
|
669
|
-
variant: variant,
|
|
670
|
-
children: children
|
|
671
|
-
});
|
|
672
|
-
};
|
|
673
|
-
|
|
674
|
-
//Primary blue
|
|
675
|
-
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/6288e9
|
|
676
|
-
const b50 = '#e8edf3';
|
|
677
|
-
const b100 = '#c5d3e2';
|
|
678
|
-
const b200 = '#9eb6cf';
|
|
679
|
-
const b300 = '#7798bb';
|
|
680
|
-
const b400 = '#5a82ad';
|
|
681
|
-
const b500 = '#3d6c9e';
|
|
682
|
-
const b600 = '#376496';
|
|
683
|
-
const b700 = '#2f598c';
|
|
684
|
-
const b800 = '#274f82';
|
|
685
|
-
const b900 = '#1a3d70';
|
|
686
|
-
const bA100 = '#abcaff';
|
|
687
|
-
const bA200 = '#78aaff';
|
|
688
|
-
const bA400 = '#458aff';
|
|
689
|
-
const bA700 = '#2b7aff';
|
|
690
|
-
//Success green
|
|
691
|
-
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/653193
|
|
692
|
-
const g50 = '#e9f0e0';
|
|
693
|
-
const g100 = '#c8dab3';
|
|
694
|
-
const g200 = '#a4c280';
|
|
695
|
-
const g300 = '#80aa4d';
|
|
696
|
-
const g400 = '#649726';
|
|
697
|
-
const g500 = '#498500';
|
|
698
|
-
const g600 = '#427d00';
|
|
699
|
-
const g700 = '#397200';
|
|
700
|
-
const g800 = '#316800';
|
|
701
|
-
const g900 = '#215500';
|
|
702
|
-
const gA100 = '#aaff87';
|
|
703
|
-
const gA200 = '#86ff54';
|
|
704
|
-
const gA400 = '#61ff21';
|
|
705
|
-
const gA700 = '#4fff08';
|
|
706
|
-
//Neutral color
|
|
707
|
-
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/44d174
|
|
708
|
-
const n0 = '#ffffff';
|
|
709
|
-
const n50 = '#f3f5f6';
|
|
710
|
-
const n100 = '#e3e5e8';
|
|
711
|
-
const n200 = '#c1c6cd';
|
|
712
|
-
const n300 = '#a4acb6';
|
|
713
|
-
const n400 = '#667385';
|
|
714
|
-
const n500 = '#4b5a6f';
|
|
715
|
-
const n600 = '#445267';
|
|
716
|
-
const n700 = '#3b485c';
|
|
717
|
-
const n700_70 = 'rgba(59, 72, 92, 0.7)';
|
|
718
|
-
const n700_90 = 'rgba(59, 72, 92, 0.9)';
|
|
719
|
-
const n800 = '#333f52';
|
|
720
|
-
const n900 = '#232e40';
|
|
721
|
-
const n900_20 = 'rgba(35, 46, 64, 0.2)';
|
|
722
|
-
const n900_70 = 'rgba(35, 46, 64, 0.7)';
|
|
723
|
-
const nA100 = '#88b1ff';
|
|
724
|
-
const nA200 = '#5590ff';
|
|
725
|
-
const nA400 = '#226eff';
|
|
726
|
-
const nA700 = '#085eff';
|
|
727
|
-
//Warning orange
|
|
728
|
-
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/01bbd7
|
|
729
|
-
const o50 = '#fff3e9';
|
|
730
|
-
const o100 = '#ffe2c8';
|
|
731
|
-
const o200 = '#ffcfa4';
|
|
732
|
-
const o300 = '#ffbb80';
|
|
733
|
-
const o400 = '#ffad64';
|
|
734
|
-
const o500 = '#ff9e49';
|
|
735
|
-
const o600 = '#ff9642';
|
|
736
|
-
const o700 = '#ff8c39';
|
|
737
|
-
const o800 = '#ff8231';
|
|
738
|
-
const o900 = '#f05e1d';
|
|
739
|
-
const oA100 = '#ffffff';
|
|
740
|
-
const oA200 = '#ffffff';
|
|
741
|
-
const oA400 = '#ffe0d0';
|
|
742
|
-
const oA700 = '#ffceb7';
|
|
743
|
-
//Error red
|
|
744
|
-
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/941bd8
|
|
745
|
-
const r50 = '#fae4e4';
|
|
746
|
-
const r100 = '#f3bcbc';
|
|
747
|
-
const r200 = '#eb8f90';
|
|
748
|
-
const r300 = '#e26264';
|
|
749
|
-
const r400 = '#dc4142';
|
|
750
|
-
const r500 = '#d61f21';
|
|
751
|
-
const r600 = '#d11b1d';
|
|
752
|
-
const r700 = '#cc1718';
|
|
753
|
-
const r800 = '#c61214';
|
|
754
|
-
const r900 = '#bc0a0b';
|
|
755
|
-
const rA100 = '#ffe7e7';
|
|
756
|
-
const rA200 = '#ffb4b5';
|
|
757
|
-
const rA400 = '#ff8182';
|
|
758
|
-
const rA700 = '#ff6869';
|
|
759
|
-
//Graph color
|
|
760
|
-
//Yellow
|
|
761
|
-
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/48416f
|
|
762
|
-
const y50 = '#fdf8e2';
|
|
763
|
-
const y100 = '#faeeb8';
|
|
764
|
-
const y200 = '#f7e288';
|
|
765
|
-
const y300 = '#f3d658';
|
|
766
|
-
const y400 = '#f1ce35';
|
|
767
|
-
const y500 = '#eec511';
|
|
768
|
-
const y600 = '#ecbf0f';
|
|
769
|
-
const y700 = '#e9b80c';
|
|
770
|
-
const y800 = '#e7b00a';
|
|
771
|
-
const y900 = '#e2a305';
|
|
772
|
-
const yA100 = '#ffffff';
|
|
773
|
-
const yA200 = '#fff2d7';
|
|
774
|
-
const yA400 = '#ffe2a4';
|
|
775
|
-
const yA700 = '#ffda8b';
|
|
776
|
-
//Purple
|
|
777
|
-
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/48416f
|
|
778
|
-
const p50 = '#f3e4ee';
|
|
779
|
-
const p100 = '#e0bbd4';
|
|
780
|
-
const p200 = '#cc8eb8';
|
|
781
|
-
const p300 = '#b8609c';
|
|
782
|
-
const p400 = '#a83e86';
|
|
783
|
-
const p500 = '#991c71';
|
|
784
|
-
const p600 = '#911969';
|
|
785
|
-
const p700 = '#86145e';
|
|
786
|
-
const p800 = '#7c1154';
|
|
787
|
-
const p900 = '#6b0942';
|
|
788
|
-
const pA100 = '#ff9cd1';
|
|
789
|
-
const pA200 = '#ff69b9';
|
|
790
|
-
const pA400 = '#ff36a2';
|
|
791
|
-
const pA700 = '#ff1d96';
|
|
792
|
-
const selectedGray = 'rgba(0, 0, 0, 0.12)';
|
|
793
|
-
const lightSelectedGray = 'rgba(0, 0, 0, 0.08)';
|
|
794
|
-
const hoverGray = 'rgba(0, 0, 0, 0.04)';
|
|
84
|
+
//Primary blue
|
|
85
|
+
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/6288e9
|
|
86
|
+
const b50 = '#e8edf3';
|
|
87
|
+
const b100 = '#c5d3e2';
|
|
88
|
+
const b200 = '#9eb6cf';
|
|
89
|
+
const b300 = '#7798bb';
|
|
90
|
+
const b400 = '#5a82ad';
|
|
91
|
+
const b500 = '#3d6c9e';
|
|
92
|
+
const b600 = '#376496';
|
|
93
|
+
const b700 = '#2f598c';
|
|
94
|
+
const b800 = '#274f82';
|
|
95
|
+
const b900 = '#1a3d70';
|
|
96
|
+
const bA100 = '#abcaff';
|
|
97
|
+
const bA200 = '#78aaff';
|
|
98
|
+
const bA400 = '#458aff';
|
|
99
|
+
const bA700 = '#2b7aff';
|
|
100
|
+
//Success green
|
|
101
|
+
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/653193
|
|
102
|
+
const g50 = '#e9f0e0';
|
|
103
|
+
const g100 = '#c8dab3';
|
|
104
|
+
const g200 = '#a4c280';
|
|
105
|
+
const g300 = '#80aa4d';
|
|
106
|
+
const g400 = '#649726';
|
|
107
|
+
const g500 = '#498500';
|
|
108
|
+
const g600 = '#427d00';
|
|
109
|
+
const g700 = '#397200';
|
|
110
|
+
const g800 = '#316800';
|
|
111
|
+
const g900 = '#215500';
|
|
112
|
+
const gA100 = '#aaff87';
|
|
113
|
+
const gA200 = '#86ff54';
|
|
114
|
+
const gA400 = '#61ff21';
|
|
115
|
+
const gA700 = '#4fff08';
|
|
116
|
+
//Neutral color
|
|
117
|
+
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/44d174
|
|
118
|
+
const n0 = '#ffffff';
|
|
119
|
+
const n50 = '#f3f5f6';
|
|
120
|
+
const n100 = '#e3e5e8';
|
|
121
|
+
const n200 = '#c1c6cd';
|
|
122
|
+
const n300 = '#a4acb6';
|
|
123
|
+
const n400 = '#667385';
|
|
124
|
+
const n500 = '#4b5a6f';
|
|
125
|
+
const n600 = '#445267';
|
|
126
|
+
const n700 = '#3b485c';
|
|
127
|
+
const n700_70 = 'rgba(59, 72, 92, 0.7)';
|
|
128
|
+
const n700_90 = 'rgba(59, 72, 92, 0.9)';
|
|
129
|
+
const n800 = '#333f52';
|
|
130
|
+
const n900 = '#232e40';
|
|
131
|
+
const n900_20 = 'rgba(35, 46, 64, 0.2)';
|
|
132
|
+
const n900_70 = 'rgba(35, 46, 64, 0.7)';
|
|
133
|
+
const nA100 = '#88b1ff';
|
|
134
|
+
const nA200 = '#5590ff';
|
|
135
|
+
const nA400 = '#226eff';
|
|
136
|
+
const nA700 = '#085eff';
|
|
137
|
+
//Warning orange
|
|
138
|
+
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/01bbd7
|
|
139
|
+
const o50 = '#fff3e9';
|
|
140
|
+
const o100 = '#ffe2c8';
|
|
141
|
+
const o200 = '#ffcfa4';
|
|
142
|
+
const o300 = '#ffbb80';
|
|
143
|
+
const o400 = '#ffad64';
|
|
144
|
+
const o500 = '#ff9e49';
|
|
145
|
+
const o600 = '#ff9642';
|
|
146
|
+
const o700 = '#ff8c39';
|
|
147
|
+
const o800 = '#ff8231';
|
|
148
|
+
const o900 = '#f05e1d';
|
|
149
|
+
const oA100 = '#ffffff';
|
|
150
|
+
const oA200 = '#ffffff';
|
|
151
|
+
const oA400 = '#ffe0d0';
|
|
152
|
+
const oA700 = '#ffceb7';
|
|
153
|
+
//Error red
|
|
154
|
+
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/941bd8
|
|
155
|
+
const r50 = '#fae4e4';
|
|
156
|
+
const r100 = '#f3bcbc';
|
|
157
|
+
const r200 = '#eb8f90';
|
|
158
|
+
const r300 = '#e26264';
|
|
159
|
+
const r400 = '#dc4142';
|
|
160
|
+
const r500 = '#d61f21';
|
|
161
|
+
const r600 = '#d11b1d';
|
|
162
|
+
const r700 = '#cc1718';
|
|
163
|
+
const r800 = '#c61214';
|
|
164
|
+
const r900 = '#bc0a0b';
|
|
165
|
+
const rA100 = '#ffe7e7';
|
|
166
|
+
const rA200 = '#ffb4b5';
|
|
167
|
+
const rA400 = '#ff8182';
|
|
168
|
+
const rA700 = '#ff6869';
|
|
169
|
+
//Graph color
|
|
170
|
+
//Yellow
|
|
171
|
+
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/48416f
|
|
172
|
+
const y50 = '#fdf8e2';
|
|
173
|
+
const y100 = '#faeeb8';
|
|
174
|
+
const y200 = '#f7e288';
|
|
175
|
+
const y300 = '#f3d658';
|
|
176
|
+
const y400 = '#f1ce35';
|
|
177
|
+
const y500 = '#eec511';
|
|
178
|
+
const y600 = '#ecbf0f';
|
|
179
|
+
const y700 = '#e9b80c';
|
|
180
|
+
const y800 = '#e7b00a';
|
|
181
|
+
const y900 = '#e2a305';
|
|
182
|
+
const yA100 = '#ffffff';
|
|
183
|
+
const yA200 = '#fff2d7';
|
|
184
|
+
const yA400 = '#ffe2a4';
|
|
185
|
+
const yA700 = '#ffda8b';
|
|
186
|
+
//Purple
|
|
187
|
+
//https://zeroheight.com/4a9ac476a/p/22005a-color/t/48416f
|
|
188
|
+
const p50 = '#f3e4ee';
|
|
189
|
+
const p100 = '#e0bbd4';
|
|
190
|
+
const p200 = '#cc8eb8';
|
|
191
|
+
const p300 = '#b8609c';
|
|
192
|
+
const p400 = '#a83e86';
|
|
193
|
+
const p500 = '#991c71';
|
|
194
|
+
const p600 = '#911969';
|
|
195
|
+
const p700 = '#86145e';
|
|
196
|
+
const p800 = '#7c1154';
|
|
197
|
+
const p900 = '#6b0942';
|
|
198
|
+
const pA100 = '#ff9cd1';
|
|
199
|
+
const pA200 = '#ff69b9';
|
|
200
|
+
const pA400 = '#ff36a2';
|
|
201
|
+
const pA700 = '#ff1d96';
|
|
202
|
+
const selectedGray = 'rgba(0, 0, 0, 0.12)';
|
|
203
|
+
const lightSelectedGray = 'rgba(0, 0, 0, 0.08)';
|
|
204
|
+
const hoverGray = 'rgba(0, 0, 0, 0.04)';
|
|
795
205
|
|
|
796
206
|
var lightThemeColors = /*#__PURE__*/Object.freeze({
|
|
797
207
|
__proto__: null,
|
|
@@ -1434,302 +844,894 @@ const darkTheme = createTheme({
|
|
|
1434
844
|
unknown: n300,
|
|
1435
845
|
unknownHover: n100
|
|
1436
846
|
},
|
|
1437
|
-
layer: {
|
|
1438
|
-
n0: n900,
|
|
1439
|
-
n50: n800,
|
|
1440
|
-
n100: n700,
|
|
1441
|
-
n200: n600,
|
|
1442
|
-
n300: n500,
|
|
1443
|
-
n400: n400,
|
|
1444
|
-
n500: n300,
|
|
1445
|
-
n600: n200,
|
|
1446
|
-
n700: n100,
|
|
1447
|
-
n800: n50,
|
|
1448
|
-
n900: n0
|
|
1449
|
-
},
|
|
1450
|
-
primary: {
|
|
1451
|
-
main: b200,
|
|
1452
|
-
'50': b50,
|
|
1453
|
-
'100': b100,
|
|
1454
|
-
'500': b500
|
|
1455
|
-
},
|
|
1456
|
-
secondary: {
|
|
1457
|
-
main: g800,
|
|
1458
|
-
'50': g400,
|
|
1459
|
-
'100': g300,
|
|
1460
|
-
'500': g200,
|
|
1461
|
-
'700': g100
|
|
1462
|
-
},
|
|
1463
|
-
error: {
|
|
1464
|
-
main: r800,
|
|
1465
|
-
'50': r400,
|
|
1466
|
-
'100': r300,
|
|
1467
|
-
'500': r200,
|
|
1468
|
-
'700': r100
|
|
1469
|
-
},
|
|
1470
|
-
grey: {
|
|
1471
|
-
'50': n500,
|
|
1472
|
-
'100': n400,
|
|
1473
|
-
'200': n400,
|
|
1474
|
-
'300': n400,
|
|
1475
|
-
'400': n200,
|
|
1476
|
-
'500': n500,
|
|
1477
|
-
'700': n700,
|
|
1478
|
-
'900': n900
|
|
847
|
+
layer: {
|
|
848
|
+
n0: n900,
|
|
849
|
+
n50: n800,
|
|
850
|
+
n100: n700,
|
|
851
|
+
n200: n600,
|
|
852
|
+
n300: n500,
|
|
853
|
+
n400: n400,
|
|
854
|
+
n500: n300,
|
|
855
|
+
n600: n200,
|
|
856
|
+
n700: n100,
|
|
857
|
+
n800: n50,
|
|
858
|
+
n900: n0
|
|
859
|
+
},
|
|
860
|
+
primary: {
|
|
861
|
+
main: b200,
|
|
862
|
+
'50': b50,
|
|
863
|
+
'100': b100,
|
|
864
|
+
'500': b500
|
|
865
|
+
},
|
|
866
|
+
secondary: {
|
|
867
|
+
main: g800,
|
|
868
|
+
'50': g400,
|
|
869
|
+
'100': g300,
|
|
870
|
+
'500': g200,
|
|
871
|
+
'700': g100
|
|
872
|
+
},
|
|
873
|
+
error: {
|
|
874
|
+
main: r800,
|
|
875
|
+
'50': r400,
|
|
876
|
+
'100': r300,
|
|
877
|
+
'500': r200,
|
|
878
|
+
'700': r100
|
|
879
|
+
},
|
|
880
|
+
grey: {
|
|
881
|
+
'50': n500,
|
|
882
|
+
'100': n400,
|
|
883
|
+
'200': n400,
|
|
884
|
+
'300': n400,
|
|
885
|
+
'400': n200,
|
|
886
|
+
'500': n500,
|
|
887
|
+
'700': n700,
|
|
888
|
+
'900': n900
|
|
889
|
+
},
|
|
890
|
+
purple: {
|
|
891
|
+
main: p500
|
|
892
|
+
},
|
|
893
|
+
text: {
|
|
894
|
+
primary: n50
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
components: Object.assign(Object.assign({}, componentOverrides), {
|
|
898
|
+
MuiPaper: {
|
|
899
|
+
styleOverrides: {
|
|
900
|
+
root: {
|
|
901
|
+
backgroundColor: darkFigmaColors.background.level0.componentsBackground
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
}),
|
|
906
|
+
typography: Object.assign(Object.assign({}, typographyOptions), {
|
|
907
|
+
allVariants: Object.assign(Object.assign({}, typographyOptions.allVariants), {
|
|
908
|
+
color: darkFigmaColors.typography.black
|
|
909
|
+
}),
|
|
910
|
+
body2: Object.assign(Object.assign({}, typographyOptions.body2), {
|
|
911
|
+
color: darkFigmaColors.typography.gray
|
|
912
|
+
})
|
|
913
|
+
})
|
|
914
|
+
});
|
|
915
|
+
const lightTheme = createTheme({
|
|
916
|
+
breakpoints: Object.assign({}, breakpointOptions),
|
|
917
|
+
palette: {
|
|
918
|
+
mode: 'light',
|
|
919
|
+
avatarColors: Object.assign({}, avatarColors),
|
|
920
|
+
figma: lightFigmaColors,
|
|
921
|
+
background: {
|
|
922
|
+
default: n0
|
|
923
|
+
},
|
|
924
|
+
primary: {
|
|
925
|
+
main: b500,
|
|
926
|
+
'50': b50,
|
|
927
|
+
'100': b100,
|
|
928
|
+
'200': b200,
|
|
929
|
+
'300': b300,
|
|
930
|
+
'400': b400,
|
|
931
|
+
'500': b500,
|
|
932
|
+
'600': b600,
|
|
933
|
+
'700': b700,
|
|
934
|
+
'800': b800,
|
|
935
|
+
'900': b900,
|
|
936
|
+
A100: bA100,
|
|
937
|
+
A200: bA200,
|
|
938
|
+
A400: bA400,
|
|
939
|
+
A700: bA700
|
|
940
|
+
},
|
|
941
|
+
secondary: {
|
|
942
|
+
main: g500,
|
|
943
|
+
'50': g50,
|
|
944
|
+
'100': g100,
|
|
945
|
+
'200': g200,
|
|
946
|
+
'300': g300,
|
|
947
|
+
'400': g400,
|
|
948
|
+
'500': g500,
|
|
949
|
+
'600': g600,
|
|
950
|
+
'700': g700,
|
|
951
|
+
'800': g800,
|
|
952
|
+
'900': g900,
|
|
953
|
+
A100: gA100,
|
|
954
|
+
A200: gA200,
|
|
955
|
+
A400: gA400,
|
|
956
|
+
A700: gA700
|
|
957
|
+
},
|
|
958
|
+
error: {
|
|
959
|
+
main: r500,
|
|
960
|
+
'50': r50,
|
|
961
|
+
'100': r100,
|
|
962
|
+
'200': r200,
|
|
963
|
+
'300': r300,
|
|
964
|
+
'400': r400,
|
|
965
|
+
'500': r500,
|
|
966
|
+
'600': r600,
|
|
967
|
+
'700': r700,
|
|
968
|
+
'800': r800,
|
|
969
|
+
'900': r900,
|
|
970
|
+
A100: rA100,
|
|
971
|
+
A200: rA200,
|
|
972
|
+
A400: rA400,
|
|
973
|
+
A700: rA700
|
|
974
|
+
},
|
|
975
|
+
warning: {
|
|
976
|
+
main: o500,
|
|
977
|
+
'50': o50,
|
|
978
|
+
'100': o100,
|
|
979
|
+
'200': o200,
|
|
980
|
+
'300': o300,
|
|
981
|
+
'400': o400,
|
|
982
|
+
'500': o500,
|
|
983
|
+
'600': o600,
|
|
984
|
+
'700': o700,
|
|
985
|
+
'800': o800,
|
|
986
|
+
'900': o900,
|
|
987
|
+
A100: oA100,
|
|
988
|
+
A200: oA200,
|
|
989
|
+
A400: oA400,
|
|
990
|
+
A700: oA700
|
|
991
|
+
},
|
|
992
|
+
success: {
|
|
993
|
+
main: g500,
|
|
994
|
+
'50': g50,
|
|
995
|
+
'100': g100,
|
|
996
|
+
'200': g200,
|
|
997
|
+
'300': g300,
|
|
998
|
+
'400': g400,
|
|
999
|
+
'500': g500,
|
|
1000
|
+
'600': g600,
|
|
1001
|
+
'700': g700,
|
|
1002
|
+
'800': g800,
|
|
1003
|
+
'900': g900,
|
|
1004
|
+
A100: gA100,
|
|
1005
|
+
A200: gA200,
|
|
1006
|
+
A400: gA400,
|
|
1007
|
+
A700: gA700
|
|
1008
|
+
},
|
|
1009
|
+
grey: {
|
|
1010
|
+
'50': n50,
|
|
1011
|
+
'100': n100,
|
|
1012
|
+
'200': n200,
|
|
1013
|
+
'300': n300,
|
|
1014
|
+
'400': n400,
|
|
1015
|
+
'500': n500,
|
|
1016
|
+
'600': n600,
|
|
1017
|
+
'700': n700,
|
|
1018
|
+
'800': n800,
|
|
1019
|
+
'900': n900,
|
|
1020
|
+
A100: nA100,
|
|
1021
|
+
A200: nA200,
|
|
1022
|
+
A400: nA400,
|
|
1023
|
+
A700: nA700
|
|
1024
|
+
},
|
|
1025
|
+
purple: {
|
|
1026
|
+
main: p500,
|
|
1027
|
+
'50': p50,
|
|
1028
|
+
'100': p100,
|
|
1029
|
+
'200': p200,
|
|
1030
|
+
'300': p300,
|
|
1031
|
+
'400': p400,
|
|
1032
|
+
'500': p500,
|
|
1033
|
+
'600': p600,
|
|
1034
|
+
'700': p700,
|
|
1035
|
+
'800': p800,
|
|
1036
|
+
'900': p900,
|
|
1037
|
+
A100: pA100,
|
|
1038
|
+
A200: pA200,
|
|
1039
|
+
A400: pA400,
|
|
1040
|
+
A700: pA700
|
|
1041
|
+
},
|
|
1042
|
+
layer: {
|
|
1043
|
+
n0: n0,
|
|
1044
|
+
n50: n50,
|
|
1045
|
+
n100: n100,
|
|
1046
|
+
n200: n200,
|
|
1047
|
+
n300: n300,
|
|
1048
|
+
n400: n400,
|
|
1049
|
+
n500: n500,
|
|
1050
|
+
n600: n600,
|
|
1051
|
+
n700: n700,
|
|
1052
|
+
n800: n800,
|
|
1053
|
+
n900: n900
|
|
1054
|
+
},
|
|
1055
|
+
icon: {
|
|
1056
|
+
checkOutline: b500,
|
|
1057
|
+
emphasized: b300,
|
|
1058
|
+
fileDotted: b500,
|
|
1059
|
+
improve: g500,
|
|
1060
|
+
improveHover: g300,
|
|
1061
|
+
maintain: r500,
|
|
1062
|
+
maintainHover: r300,
|
|
1063
|
+
rogueCommits: o500,
|
|
1064
|
+
unknown: n300,
|
|
1065
|
+
unknownHover: n100
|
|
1066
|
+
},
|
|
1067
|
+
text: {
|
|
1068
|
+
primary: n700
|
|
1479
1069
|
},
|
|
1480
|
-
|
|
1481
|
-
|
|
1070
|
+
tonalOffset: 0.2
|
|
1071
|
+
},
|
|
1072
|
+
components: Object.assign(Object.assign({}, componentOverrides), {
|
|
1073
|
+
MuiPaper: {
|
|
1074
|
+
styleOverrides: {
|
|
1075
|
+
root: {
|
|
1076
|
+
backgroundColor: lightFigmaColors.background.level0.componentsBackground
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
}),
|
|
1081
|
+
typography: Object.assign(Object.assign({}, typographyOptions), {
|
|
1082
|
+
allVariants: Object.assign(Object.assign({}, typographyOptions.allVariants), {
|
|
1083
|
+
color: lightFigmaColors.typography.black
|
|
1084
|
+
}),
|
|
1085
|
+
body2: Object.assign(Object.assign({}, typographyOptions.body2), {
|
|
1086
|
+
color: lightFigmaColors.typography.gray
|
|
1087
|
+
})
|
|
1088
|
+
})
|
|
1089
|
+
});
|
|
1090
|
+
const getThemeFromString = themeOption => {
|
|
1091
|
+
if (themeOption === 'dark') {
|
|
1092
|
+
return darkTheme;
|
|
1093
|
+
}
|
|
1094
|
+
return lightTheme;
|
|
1095
|
+
};
|
|
1096
|
+
function DotThemeProvider({
|
|
1097
|
+
children,
|
|
1098
|
+
theme = lightTheme
|
|
1099
|
+
}) {
|
|
1100
|
+
const userTheme = typeof theme === 'string' ? getThemeFromString(theme) : theme;
|
|
1101
|
+
return jsx(StyledEngineProvider, {
|
|
1102
|
+
injectFirst: true,
|
|
1103
|
+
children: jsx(ThemeProvider, {
|
|
1104
|
+
theme: userTheme,
|
|
1105
|
+
children: jsxs(ThemeProvider$1, {
|
|
1106
|
+
theme: userTheme,
|
|
1107
|
+
children: [jsx(GlobalFonts, {}), children]
|
|
1108
|
+
})
|
|
1109
|
+
})
|
|
1110
|
+
});
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
const calculateNumberFromText = text => {
|
|
1114
|
+
const charCodes = text.split('') // => ["A", "A"]
|
|
1115
|
+
.map(char => char.charCodeAt(0)) // => [65, 65]
|
|
1116
|
+
.join(''); // => "6565"
|
|
1117
|
+
return parseInt(charCodes, 10);
|
|
1118
|
+
};
|
|
1119
|
+
const calculateWidth = width => {
|
|
1120
|
+
if (!width) return;
|
|
1121
|
+
return isString$2(width) ? width : `${width}px`;
|
|
1122
|
+
};
|
|
1123
|
+
const getAvatarColorForInputText = value => {
|
|
1124
|
+
const colorOptions = [...Object.keys(avatarColors)];
|
|
1125
|
+
if (!value || !colorOptions || colorOptions.length <= 0) return 'default';
|
|
1126
|
+
const numberFromValue = calculateNumberFromText(value);
|
|
1127
|
+
const index = numberFromValue % colorOptions.length;
|
|
1128
|
+
// if number is 9 (transparent), return default color
|
|
1129
|
+
if (index === 9) return 'default';
|
|
1130
|
+
return colorOptions[index];
|
|
1131
|
+
};
|
|
1132
|
+
const isString$2 = str => typeof str === 'string';
|
|
1133
|
+
const isLowerCase = str => str === str.toLowerCase();
|
|
1134
|
+
const isNumber = num => typeof num === 'number';
|
|
1135
|
+
const renderNodeOrTypography = (content, typographyVariant = 'body1') => {
|
|
1136
|
+
return isString$2(content) ? jsx(DotTypography, {
|
|
1137
|
+
variant: typographyVariant,
|
|
1138
|
+
children: content
|
|
1139
|
+
}) : content;
|
|
1140
|
+
};
|
|
1141
|
+
const checkIfArrowUpPressed = event => event.key === 'ArrowUp';
|
|
1142
|
+
const checkIfArrowDownPressed = event => event.key === 'ArrowDown';
|
|
1143
|
+
|
|
1144
|
+
const DotTooltip = ({
|
|
1145
|
+
ariaLabel,
|
|
1146
|
+
ariaRole = 'tooltip',
|
|
1147
|
+
arrow = true,
|
|
1148
|
+
children,
|
|
1149
|
+
className,
|
|
1150
|
+
'data-testid': dataTestId,
|
|
1151
|
+
disablePortal = false,
|
|
1152
|
+
disableInteractive = false,
|
|
1153
|
+
followCursor = false,
|
|
1154
|
+
enterDelay = 600,
|
|
1155
|
+
enterNextDelay = 0,
|
|
1156
|
+
hoverVisibility = 'always',
|
|
1157
|
+
leaveDelay,
|
|
1158
|
+
onClose,
|
|
1159
|
+
open,
|
|
1160
|
+
placement = 'bottom',
|
|
1161
|
+
popperClassName,
|
|
1162
|
+
slotProps,
|
|
1163
|
+
title,
|
|
1164
|
+
childrenDisplayStyle
|
|
1165
|
+
}) => {
|
|
1166
|
+
const rootClasses = useStylesWithRootClass('dot-tooltip', className);
|
|
1167
|
+
const [hasTooltipOnHover, setHasTooltipOnHover] = useState(false);
|
|
1168
|
+
const childrenWrapperRef = useRef();
|
|
1169
|
+
useEffect(() => {
|
|
1170
|
+
if (hoverVisibility !== 'overflow') return;
|
|
1171
|
+
const resizeObserver = new ResizeObserver(checkIfTooltipShouldBeRendered);
|
|
1172
|
+
if (childrenWrapperRef.current) {
|
|
1173
|
+
resizeObserver.observe(childrenWrapperRef.current);
|
|
1174
|
+
}
|
|
1175
|
+
checkIfTooltipShouldBeRendered();
|
|
1176
|
+
return () => {
|
|
1177
|
+
if (childrenWrapperRef.current) {
|
|
1178
|
+
resizeObserver.unobserve(childrenWrapperRef.current);
|
|
1179
|
+
}
|
|
1180
|
+
};
|
|
1181
|
+
}, [childrenWrapperRef.current, children, hoverVisibility]);
|
|
1182
|
+
const checkIfTooltipShouldBeRendered = () => {
|
|
1183
|
+
if (!childrenWrapperRef || !childrenWrapperRef.current) return;
|
|
1184
|
+
const isOverflowPresent = checkIfOverflowPresentInElementTree(childrenWrapperRef.current);
|
|
1185
|
+
setHasTooltipOnHover(isOverflowPresent);
|
|
1186
|
+
};
|
|
1187
|
+
if (!title) {
|
|
1188
|
+
return children;
|
|
1189
|
+
}
|
|
1190
|
+
return jsx(Tooltip, {
|
|
1191
|
+
"aria-hidden": false,
|
|
1192
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : isString$2(title) ? title.toString() : 'Information tooltip',
|
|
1193
|
+
arrow: arrow,
|
|
1194
|
+
className: rootClasses,
|
|
1195
|
+
"data-testid": dataTestId,
|
|
1196
|
+
disableHoverListener: hoverVisibility === 'never' || hoverVisibility === 'overflow' && !hasTooltipOnHover,
|
|
1197
|
+
disableInteractive: disableInteractive,
|
|
1198
|
+
leaveDelay: leaveDelay,
|
|
1199
|
+
enterDelay: enterDelay,
|
|
1200
|
+
enterNextDelay: enterNextDelay,
|
|
1201
|
+
onClose: onClose,
|
|
1202
|
+
open: open,
|
|
1203
|
+
placement: placement,
|
|
1204
|
+
PopperProps: {
|
|
1205
|
+
disablePortal,
|
|
1206
|
+
className: popperClassName
|
|
1482
1207
|
},
|
|
1483
|
-
|
|
1484
|
-
|
|
1208
|
+
slotProps: slotProps,
|
|
1209
|
+
role: ariaRole,
|
|
1210
|
+
title: title,
|
|
1211
|
+
followCursor: followCursor,
|
|
1212
|
+
children: jsx("span", {
|
|
1213
|
+
style: {
|
|
1214
|
+
display: childrenDisplayStyle
|
|
1215
|
+
},
|
|
1216
|
+
ref: childrenWrapperRef,
|
|
1217
|
+
tabIndex: -1,
|
|
1218
|
+
children: children
|
|
1219
|
+
})
|
|
1220
|
+
});
|
|
1221
|
+
};
|
|
1222
|
+
|
|
1223
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1224
|
+
const formHelperTextRootStyles = theme => css`
|
|
1225
|
+
align-items: flex-end;
|
|
1226
|
+
color: ${theme.palette.figma.typography.gray};
|
|
1227
|
+
display: flex;
|
|
1228
|
+
font-family: ${theme.typography.fontFamily};
|
|
1229
|
+
font-size: ${theme.typography.body2.fontSize}px;
|
|
1230
|
+
font-weight: 400;
|
|
1231
|
+
margin: ${theme.spacing(0.5, 0, 0, 1.5)};
|
|
1232
|
+
|
|
1233
|
+
&.read-only .MuiOutlinedInput-root:hover > fieldset {
|
|
1234
|
+
border-color: ${theme.palette.figma.typography.black};
|
|
1235
|
+
}
|
|
1236
|
+
`;
|
|
1237
|
+
const adornmentIconStyles = () => css`
|
|
1238
|
+
font-size: 24px;
|
|
1239
|
+
height: 24px;
|
|
1240
|
+
padding: 0;
|
|
1241
|
+
width: 24px;
|
|
1242
|
+
`;
|
|
1243
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1244
|
+
const pickerInputStyles = theme => css`
|
|
1245
|
+
label:not(.MuiInputLabel-shrink) {
|
|
1246
|
+
top: -5px;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
.MuiInputBase-root {
|
|
1250
|
+
margin-bottom: 0;
|
|
1251
|
+
|
|
1252
|
+
.dot-error-icon {
|
|
1253
|
+
margin-right: ${theme.spacing(0.5)};
|
|
1254
|
+
color: ${theme.palette.figma.destructive.normal};
|
|
1485
1255
|
}
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1256
|
+
|
|
1257
|
+
.dot-icon {
|
|
1258
|
+
${adornmentIconStyles()};
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
.MuiInputBase-input {
|
|
1263
|
+
height: ${theme.spacing(2)};
|
|
1264
|
+
padding: ${theme.spacing(1.5, 0, 1.5, 2)};
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
.MuiFormHelperText-root {
|
|
1268
|
+
${formHelperTextRootStyles(theme)};
|
|
1269
|
+
}
|
|
1270
|
+
`;
|
|
1271
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1272
|
+
const readOnlyStyles = theme => css`
|
|
1273
|
+
background: ${theme.palette.figma.disabled.normal};
|
|
1274
|
+
color: ${theme.palette.figma.typography.disabled};
|
|
1275
|
+
border-color: ${theme.palette.figma.border.defaultButton};
|
|
1276
|
+
-webkit-text-fill-color: ${theme.palette.figma.typography.disabled};
|
|
1277
|
+
|
|
1278
|
+
input.Mui-disabled {
|
|
1279
|
+
-webkit-text-fill-color: ${theme.palette.figma.typography.disabled};
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
.dot-chip {
|
|
1283
|
+
background: ${theme.palette.figma.disabled.normal};
|
|
1284
|
+
opacity: 1;
|
|
1285
|
+
}
|
|
1286
|
+
`;
|
|
1287
|
+
|
|
1288
|
+
const rootClassName$1n = 'dot-text-field';
|
|
1289
|
+
const rootSelectClassName = 'dot-select-field';
|
|
1290
|
+
const wrapperClassName$2 = 'dot-label-wrapper';
|
|
1291
|
+
const labelClassName = 'dot-input-label';
|
|
1292
|
+
const errorClassName = 'dot-error';
|
|
1293
|
+
const warningClassName = 'dot-warning';
|
|
1294
|
+
const successClassName = 'dot-success';
|
|
1295
|
+
const adornmentIconClassName = 'dot-adornment-icon';
|
|
1296
|
+
const fieldsetClassName = 'MuiOutlinedInput-notchedOutline';
|
|
1297
|
+
const readOnlyClassName$1 = 'read-only';
|
|
1298
|
+
const resizerClassName = 'with-resizer';
|
|
1299
|
+
const ROW_HEIGHT = 37;
|
|
1300
|
+
const StyledAdornment = styled(InputAdornment)`
|
|
1301
|
+
.dot-icon {
|
|
1302
|
+
${adornmentIconStyles()};
|
|
1303
|
+
}
|
|
1304
|
+
`;
|
|
1305
|
+
const StyledInputLabel = styled(InputLabel)`
|
|
1306
|
+
${({
|
|
1307
|
+
theme
|
|
1308
|
+
}) => css`
|
|
1309
|
+
&.${labelClassName} {
|
|
1310
|
+
margin-bottom: ${theme.spacing(0.5)};
|
|
1311
|
+
transform: none;
|
|
1312
|
+
|
|
1313
|
+
&.Mui-disabled .dot-typography {
|
|
1314
|
+
color: ${theme.palette.figma.typography.disabled};
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
&.Mui-error .dot-typography,
|
|
1318
|
+
&.MuiInputLabel-outlined.Mui-disabled,
|
|
1319
|
+
&.MuiInputLabel-outlined.Mui-disabled .dot-typography {
|
|
1320
|
+
color: ${theme.palette.figma.typography.black};
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
.dot-typography {
|
|
1324
|
+
display: inline;
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
`}
|
|
1328
|
+
`;
|
|
1329
|
+
const StyledTextFieldContainer = styled.div`
|
|
1330
|
+
&.dot-input-text--fullwidth {
|
|
1331
|
+
width: 100%;
|
|
1332
|
+
}
|
|
1333
|
+
`;
|
|
1334
|
+
const StyledTextField = styled(TextField)`
|
|
1335
|
+
${({
|
|
1336
|
+
theme,
|
|
1337
|
+
InputProps,
|
|
1338
|
+
$maxRows,
|
|
1339
|
+
$minRows
|
|
1340
|
+
}) => css`
|
|
1341
|
+
&.${rootClassName$1n} {
|
|
1342
|
+
.MuiInputBase-root {
|
|
1343
|
+
margin-bottom: 0;
|
|
1344
|
+
|
|
1345
|
+
&:not(.MuiAutocomplete-inputRoot) {
|
|
1346
|
+
&.MuiInputBase-adornedStart {
|
|
1347
|
+
padding-left: ${theme.spacing(1.5)};
|
|
1348
|
+
}
|
|
1349
|
+
&.MuiInputBase-adornedEnd {
|
|
1350
|
+
padding-right: ${theme.spacing(1)};
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
.MuiInputBase-input {
|
|
1355
|
+
box-sizing: content-box;
|
|
1356
|
+
}
|
|
1357
|
+
.MuiOutlinedInput-input {
|
|
1358
|
+
padding: 18px ${InputProps.endAdornment ? '0px' : '12px'} 18px
|
|
1359
|
+
${InputProps.startAdornment ? '0px' : '12px'};
|
|
1360
|
+
&::placeholder {
|
|
1361
|
+
opacity: 1;
|
|
1362
|
+
color: ${theme.palette.figma.typography.gray};
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
.MuiInputBase-inputSizeSmall {
|
|
1366
|
+
padding-top: 10.5px;
|
|
1367
|
+
padding-bottom: 10.5px;
|
|
1368
|
+
|
|
1369
|
+
&:not(textarea) {
|
|
1370
|
+
/* padding above and below together is 21px, and total height should be 40px */
|
|
1371
|
+
height: 19px;
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
.MuiInputBase-multiline {
|
|
1376
|
+
.MuiInputBase-inputMultiline {
|
|
1377
|
+
padding: 0;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
&.${resizerClassName} {
|
|
1381
|
+
resize: both;
|
|
1382
|
+
overflow: auto;
|
|
1383
|
+
height: ${$minRows ? ROW_HEIGHT * $minRows : ROW_HEIGHT}px;
|
|
1384
|
+
min-height: ${$minRows ? ROW_HEIGHT * $minRows : ROW_HEIGHT}px;
|
|
1385
|
+
max-height: ${$maxRows ? `${ROW_HEIGHT * $maxRows}px` : 'unset'};
|
|
1386
|
+
min-width: 170px;
|
|
1387
|
+
|
|
1388
|
+
#custom-text-input.MuiInputBase-inputMultiline {
|
|
1389
|
+
height: 100% !important;
|
|
1390
|
+
width: 100%;
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
&.${readOnlyClassName$1} .MuiInputBase-root,
|
|
1396
|
+
.MuiInputBase-root.Mui-disabled {
|
|
1397
|
+
${readOnlyStyles(theme)};
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
.MuiInputBase-adornedEnd .clear-icon-button.hidden {
|
|
1401
|
+
visibility: hidden;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
.${adornmentIconClassName}.MuiInputAdornment-positionStart {
|
|
1405
|
+
margin-right: ${theme.spacing(0.5)};
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
.${adornmentIconClassName}.MuiInputAdornment-positionEnd {
|
|
1409
|
+
margin: ${theme.spacing(0)};
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
.dot-select,
|
|
1414
|
+
.dot-input {
|
|
1415
|
+
&.${readOnlyClassName$1}, &.Mui-disabled {
|
|
1416
|
+
${readOnlyStyles(theme)};
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
&.${rootSelectClassName} .${adornmentIconClassName} {
|
|
1421
|
+
// inputSelect has an arrow so we need spacing for end adornment
|
|
1422
|
+
margin-right: ${theme.spacing(2)};
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
&.${rootSelectClassName}, &.${rootClassName$1n} {
|
|
1426
|
+
.${adornmentIconClassName} {
|
|
1427
|
+
color: ${theme.palette.figma.icon.black};
|
|
1428
|
+
p {
|
|
1429
|
+
font-size: ${theme.typography.body2.fontSize}px;
|
|
1430
|
+
margin: 0;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
.dot-icon i {
|
|
1434
|
+
margin-top: -2px;
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
.MuiInputLabel-root,
|
|
1439
|
+
.MuiInputLabel-root.Mui-error {
|
|
1440
|
+
color: ${theme.palette.figma.typography.gray};
|
|
1441
|
+
|
|
1442
|
+
&.MuiInputLabel-shrink {
|
|
1443
|
+
color: ${theme.palette.figma.typography.black};
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
.MuiInputBase-root {
|
|
1448
|
+
background: ${theme.palette.figma.neutral.normal};
|
|
1449
|
+
margin-bottom: 0;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
.MuiInputBase-inputSizeSmall:not(textarea) {
|
|
1453
|
+
height: 19px;
|
|
1454
|
+
padding-top: 10.5px;
|
|
1455
|
+
padding-bottom: 10.5px;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
select.dot-select {
|
|
1459
|
+
padding-left: ${theme.spacing(1.5)};
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
.MuiSelect-select:focus:not(.${readOnlyClassName$1}) {
|
|
1463
|
+
background-color: transparent;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
.MuiSelect-icon {
|
|
1467
|
+
right: ${InputProps.endAdornment ? `44px` : `12px`};
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
&.${successClassName} {
|
|
1471
|
+
.MuiOutlinedInput-notchedOutline {
|
|
1472
|
+
border-color: ${theme.palette.figma.success.normal};
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
.${adornmentIconClassName} .dot-icon {
|
|
1476
|
+
color: ${theme.palette.figma.success.normal};
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
&.${errorClassName} {
|
|
1481
|
+
.MuiOutlinedInput-notchedOutline {
|
|
1482
|
+
border-color: ${theme.palette.figma.destructive.normal};
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
.${adornmentIconClassName} .dot-icon {
|
|
1486
|
+
color: ${theme.palette.figma.destructive.normal};
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
&.${warningClassName} {
|
|
1491
|
+
.MuiOutlinedInput-notchedOutline {
|
|
1492
|
+
border-color: ${theme.palette.figma.warning.normal};
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
.${adornmentIconClassName} .dot-icon {
|
|
1496
|
+
color: ${theme.palette.figma.warning.normal};
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
.MuiOutlinedInput-adornedStart {
|
|
1501
|
+
padding-left: 12px;
|
|
1502
|
+
|
|
1503
|
+
&.${warningClassName} .${fieldsetClassName} {
|
|
1504
|
+
border-color: ${theme.palette.figma.warning.normal};
|
|
1492
1505
|
}
|
|
1493
1506
|
}
|
|
1507
|
+
|
|
1508
|
+
.MuiFormHelperText-root {
|
|
1509
|
+
${formHelperTextRootStyles(theme)};
|
|
1510
|
+
}
|
|
1494
1511
|
}
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
'500': b500,
|
|
1522
|
-
'600': b600,
|
|
1523
|
-
'700': b700,
|
|
1524
|
-
'800': b800,
|
|
1525
|
-
'900': b900,
|
|
1526
|
-
A100: bA100,
|
|
1527
|
-
A200: bA200,
|
|
1528
|
-
A400: bA400,
|
|
1529
|
-
A700: bA700
|
|
1530
|
-
},
|
|
1531
|
-
secondary: {
|
|
1532
|
-
main: g500,
|
|
1533
|
-
'50': g50,
|
|
1534
|
-
'100': g100,
|
|
1535
|
-
'200': g200,
|
|
1536
|
-
'300': g300,
|
|
1537
|
-
'400': g400,
|
|
1538
|
-
'500': g500,
|
|
1539
|
-
'600': g600,
|
|
1540
|
-
'700': g700,
|
|
1541
|
-
'800': g800,
|
|
1542
|
-
'900': g900,
|
|
1543
|
-
A100: gA100,
|
|
1544
|
-
A200: gA200,
|
|
1545
|
-
A400: gA400,
|
|
1546
|
-
A700: gA700
|
|
1547
|
-
},
|
|
1548
|
-
error: {
|
|
1549
|
-
main: r500,
|
|
1550
|
-
'50': r50,
|
|
1551
|
-
'100': r100,
|
|
1552
|
-
'200': r200,
|
|
1553
|
-
'300': r300,
|
|
1554
|
-
'400': r400,
|
|
1555
|
-
'500': r500,
|
|
1556
|
-
'600': r600,
|
|
1557
|
-
'700': r700,
|
|
1558
|
-
'800': r800,
|
|
1559
|
-
'900': r900,
|
|
1560
|
-
A100: rA100,
|
|
1561
|
-
A200: rA200,
|
|
1562
|
-
A400: rA400,
|
|
1563
|
-
A700: rA700
|
|
1564
|
-
},
|
|
1565
|
-
warning: {
|
|
1566
|
-
main: o500,
|
|
1567
|
-
'50': o50,
|
|
1568
|
-
'100': o100,
|
|
1569
|
-
'200': o200,
|
|
1570
|
-
'300': o300,
|
|
1571
|
-
'400': o400,
|
|
1572
|
-
'500': o500,
|
|
1573
|
-
'600': o600,
|
|
1574
|
-
'700': o700,
|
|
1575
|
-
'800': o800,
|
|
1576
|
-
'900': o900,
|
|
1577
|
-
A100: oA100,
|
|
1578
|
-
A200: oA200,
|
|
1579
|
-
A400: oA400,
|
|
1580
|
-
A700: oA700
|
|
1581
|
-
},
|
|
1582
|
-
success: {
|
|
1583
|
-
main: g500,
|
|
1584
|
-
'50': g50,
|
|
1585
|
-
'100': g100,
|
|
1586
|
-
'200': g200,
|
|
1587
|
-
'300': g300,
|
|
1588
|
-
'400': g400,
|
|
1589
|
-
'500': g500,
|
|
1590
|
-
'600': g600,
|
|
1591
|
-
'700': g700,
|
|
1592
|
-
'800': g800,
|
|
1593
|
-
'900': g900,
|
|
1594
|
-
A100: gA100,
|
|
1595
|
-
A200: gA200,
|
|
1596
|
-
A400: gA400,
|
|
1597
|
-
A700: gA700
|
|
1598
|
-
},
|
|
1599
|
-
grey: {
|
|
1600
|
-
'50': n50,
|
|
1601
|
-
'100': n100,
|
|
1602
|
-
'200': n200,
|
|
1603
|
-
'300': n300,
|
|
1604
|
-
'400': n400,
|
|
1605
|
-
'500': n500,
|
|
1606
|
-
'600': n600,
|
|
1607
|
-
'700': n700,
|
|
1608
|
-
'800': n800,
|
|
1609
|
-
'900': n900,
|
|
1610
|
-
A100: nA100,
|
|
1611
|
-
A200: nA200,
|
|
1612
|
-
A400: nA400,
|
|
1613
|
-
A700: nA700
|
|
1614
|
-
},
|
|
1615
|
-
purple: {
|
|
1616
|
-
main: p500,
|
|
1617
|
-
'50': p50,
|
|
1618
|
-
'100': p100,
|
|
1619
|
-
'200': p200,
|
|
1620
|
-
'300': p300,
|
|
1621
|
-
'400': p400,
|
|
1622
|
-
'500': p500,
|
|
1623
|
-
'600': p600,
|
|
1624
|
-
'700': p700,
|
|
1625
|
-
'800': p800,
|
|
1626
|
-
'900': p900,
|
|
1627
|
-
A100: pA100,
|
|
1628
|
-
A200: pA200,
|
|
1629
|
-
A400: pA400,
|
|
1630
|
-
A700: pA700
|
|
1631
|
-
},
|
|
1632
|
-
layer: {
|
|
1633
|
-
n0: n0,
|
|
1634
|
-
n50: n50,
|
|
1635
|
-
n100: n100,
|
|
1636
|
-
n200: n200,
|
|
1637
|
-
n300: n300,
|
|
1638
|
-
n400: n400,
|
|
1639
|
-
n500: n500,
|
|
1640
|
-
n600: n600,
|
|
1641
|
-
n700: n700,
|
|
1642
|
-
n800: n800,
|
|
1643
|
-
n900: n900
|
|
1644
|
-
},
|
|
1645
|
-
icon: {
|
|
1646
|
-
checkOutline: b500,
|
|
1647
|
-
emphasized: b300,
|
|
1648
|
-
fileDotted: b500,
|
|
1649
|
-
improve: g500,
|
|
1650
|
-
improveHover: g300,
|
|
1651
|
-
maintain: r500,
|
|
1652
|
-
maintainHover: r300,
|
|
1653
|
-
rogueCommits: o500,
|
|
1654
|
-
unknown: n300,
|
|
1655
|
-
unknownHover: n100
|
|
1656
|
-
},
|
|
1657
|
-
text: {
|
|
1658
|
-
primary: n700
|
|
1659
|
-
},
|
|
1660
|
-
tonalOffset: 0.2
|
|
1661
|
-
},
|
|
1662
|
-
components: Object.assign(Object.assign({}, componentOverrides), {
|
|
1663
|
-
MuiPaper: {
|
|
1664
|
-
styleOverrides: {
|
|
1665
|
-
root: {
|
|
1666
|
-
backgroundColor: lightFigmaColors.background.level0.componentsBackground
|
|
1512
|
+
`}
|
|
1513
|
+
`;
|
|
1514
|
+
|
|
1515
|
+
const rootClassName$1m = 'dot-icon';
|
|
1516
|
+
const StyledIcon = styled(Icon)`
|
|
1517
|
+
${({
|
|
1518
|
+
theme
|
|
1519
|
+
}) => css`
|
|
1520
|
+
&.${rootClassName$1m} {
|
|
1521
|
+
color: ${theme.palette.figma.icon.black};
|
|
1522
|
+
font-size: 20px;
|
|
1523
|
+
|
|
1524
|
+
&.MuiIcon-fontSizeLarge {
|
|
1525
|
+
font-size: 28px;
|
|
1526
|
+
height: 35px;
|
|
1527
|
+
width: 35px;
|
|
1528
|
+
|
|
1529
|
+
i {
|
|
1530
|
+
height: 28px;
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
&.MuiIcon-fontSizeSmall {
|
|
1534
|
+
font-size: 18px;
|
|
1535
|
+
|
|
1536
|
+
i {
|
|
1537
|
+
height: 18px;
|
|
1667
1538
|
}
|
|
1668
1539
|
}
|
|
1540
|
+
|
|
1541
|
+
i {
|
|
1542
|
+
height: 20px;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
&.${warningClassName} {
|
|
1546
|
+
color: ${theme.palette.figma.warning.normal};
|
|
1547
|
+
}
|
|
1669
1548
|
}
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
return
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1549
|
+
`}
|
|
1550
|
+
`;
|
|
1551
|
+
|
|
1552
|
+
const DotIcon = ({
|
|
1553
|
+
ariaLabel,
|
|
1554
|
+
ariaRole = 'img',
|
|
1555
|
+
className,
|
|
1556
|
+
'data-testid': dataTestId,
|
|
1557
|
+
disableInteractive,
|
|
1558
|
+
fontSize = 'medium',
|
|
1559
|
+
iconId,
|
|
1560
|
+
tooltip
|
|
1561
|
+
}) => {
|
|
1562
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1m, className);
|
|
1563
|
+
return jsx(DotTooltip, {
|
|
1564
|
+
disableInteractive: disableInteractive,
|
|
1565
|
+
childrenDisplayStyle: "inline-block",
|
|
1566
|
+
title: tooltip,
|
|
1567
|
+
children: jsx(StyledIcon, {
|
|
1568
|
+
"aria-hidden": "false",
|
|
1569
|
+
"aria-label": ariaLabel || `${iconId} icon`,
|
|
1570
|
+
classes: {
|
|
1571
|
+
root: rootClasses
|
|
1572
|
+
},
|
|
1573
|
+
"data-testid": dataTestId,
|
|
1574
|
+
fontSize: fontSize,
|
|
1575
|
+
role: ariaRole,
|
|
1576
|
+
children: jsx("i", {
|
|
1577
|
+
"aria-label": ariaLabel || `${iconId} icon`,
|
|
1578
|
+
className: `icon-${iconId} dot-i`,
|
|
1579
|
+
"data-testid": dataTestId && `${dataTestId}-i`,
|
|
1580
|
+
role: ariaRole
|
|
1698
1581
|
})
|
|
1699
1582
|
})
|
|
1700
1583
|
});
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
const calculateNumberFromText = text => {
|
|
1704
|
-
const charCodes = text.split('') // => ["A", "A"]
|
|
1705
|
-
.map(char => char.charCodeAt(0)) // => [65, 65]
|
|
1706
|
-
.join(''); // => "6565"
|
|
1707
|
-
return parseInt(charCodes, 10);
|
|
1708
|
-
};
|
|
1709
|
-
const calculateWidth = width => {
|
|
1710
|
-
if (!width) return;
|
|
1711
|
-
return isString$2(width) ? width : `${width}px`;
|
|
1712
1584
|
};
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1585
|
+
|
|
1586
|
+
const rootClassName$1l = 'dot-accordion';
|
|
1587
|
+
const summaryClassName = 'dot-accordion-summary';
|
|
1588
|
+
const detailClassName = 'dot-accordion-details';
|
|
1589
|
+
const StyledAccordion = styled(Accordion)`
|
|
1590
|
+
${({
|
|
1591
|
+
theme
|
|
1592
|
+
}) => css`
|
|
1593
|
+
.${detailClassName} {
|
|
1594
|
+
background: ${theme.palette.figma.background.level1.white};
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
&.${rootClassName$1l} .${summaryClassName} {
|
|
1598
|
+
align-items: center;
|
|
1599
|
+
background: ${theme.palette.figma.background.level1.white};
|
|
1600
|
+
color: ${theme.palette.figma.typography.black};
|
|
1601
|
+
display: flex;
|
|
1602
|
+
|
|
1603
|
+
&.Mui-expanded {
|
|
1604
|
+
border-top: 1px solid ${theme.palette.figma.border.default};
|
|
1605
|
+
margin: 0;
|
|
1606
|
+
|
|
1607
|
+
&:before {
|
|
1608
|
+
opacity: 1;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
.MuiAccordionSummary-content {
|
|
1613
|
+
align-items: center;
|
|
1614
|
+
gap: ${theme.spacing(1)};
|
|
1615
|
+
width: calc(100% - ${theme.spacing(5)});
|
|
1616
|
+
|
|
1617
|
+
.dot-tooltip {
|
|
1618
|
+
overflow: hidden;
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
.MuiAccordionSummary-expandIconWrapper {
|
|
1623
|
+
padding: ${theme.spacing(1.5)};
|
|
1624
|
+
margin-right: ${theme.spacing(-1.5)};
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
.MuiTypography-root {
|
|
1628
|
+
margin-bottom: 0;
|
|
1629
|
+
}
|
|
1630
|
+
.MuiTypography-body1 {
|
|
1631
|
+
padding: 2px 0;
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
`}
|
|
1635
|
+
`;
|
|
1636
|
+
|
|
1637
|
+
const DotAccordion = ({
|
|
1638
|
+
actions,
|
|
1639
|
+
ariaLabel,
|
|
1640
|
+
children,
|
|
1641
|
+
className,
|
|
1642
|
+
'data-pendoid': dataPendoId = rootClassName$1l,
|
|
1643
|
+
'data-testid': dataTestId = 'dot-accordion',
|
|
1644
|
+
disabled = false,
|
|
1645
|
+
expanded,
|
|
1646
|
+
hasElevation = false,
|
|
1647
|
+
onChange,
|
|
1648
|
+
square = false,
|
|
1649
|
+
startIcon = null,
|
|
1650
|
+
summary,
|
|
1651
|
+
noWrap = true
|
|
1652
|
+
}) => {
|
|
1653
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1l, className);
|
|
1654
|
+
const [elevation, setElevation] = useState();
|
|
1655
|
+
useEffect(() => {
|
|
1656
|
+
if (onChange && expanded === undefined) {
|
|
1657
|
+
console.warn('The use of an `onChange` callback makes this a controlled component but no `expanded` state has been provided. In effect, this makes the component disabled.');
|
|
1658
|
+
}
|
|
1659
|
+
}, []);
|
|
1660
|
+
useEffect(() => {
|
|
1661
|
+
setElevation(hasElevation ? 1 : 0);
|
|
1662
|
+
}, [hasElevation]);
|
|
1663
|
+
return jsxs(StyledAccordion, {
|
|
1664
|
+
"aria-label": ariaLabel,
|
|
1665
|
+
className: rootClasses,
|
|
1666
|
+
"data-pendoid": dataPendoId,
|
|
1667
|
+
"data-testid": dataTestId,
|
|
1668
|
+
disabled: disabled,
|
|
1669
|
+
elevation: elevation,
|
|
1670
|
+
expanded: onChange ? expanded : undefined,
|
|
1671
|
+
onChange: onChange,
|
|
1672
|
+
square: square,
|
|
1673
|
+
children: [jsxs(AccordionSummary, {
|
|
1674
|
+
"aria-label": ariaLabel || summary,
|
|
1675
|
+
classes: {
|
|
1676
|
+
root: summaryClassName
|
|
1677
|
+
},
|
|
1678
|
+
"data-testid": `${dataTestId}-summary`,
|
|
1679
|
+
expandIcon: jsx(DotIcon, {
|
|
1680
|
+
iconId: "chevron-down"
|
|
1681
|
+
}),
|
|
1682
|
+
role: "button",
|
|
1683
|
+
children: [startIcon, jsx(DotTooltip, {
|
|
1684
|
+
"data-testid": "accordion-tooltip",
|
|
1685
|
+
title: noWrap ? summary : '',
|
|
1686
|
+
children: jsx(DotTypography, {
|
|
1687
|
+
noWrap: noWrap,
|
|
1688
|
+
variant: "body1",
|
|
1689
|
+
children: summary
|
|
1690
|
+
})
|
|
1691
|
+
})]
|
|
1692
|
+
}), jsx(AccordionDetails, {
|
|
1693
|
+
classes: {
|
|
1694
|
+
root: detailClassName
|
|
1695
|
+
},
|
|
1696
|
+
"data-testid": `${dataTestId}-details`,
|
|
1697
|
+
children: children
|
|
1698
|
+
}), actions && jsx(AccordionActions, {
|
|
1699
|
+
children: actions
|
|
1700
|
+
})]
|
|
1701
|
+
});
|
|
1721
1702
|
};
|
|
1722
|
-
|
|
1723
|
-
const
|
|
1724
|
-
const
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1703
|
+
|
|
1704
|
+
const rootClassName$1k = 'dot-action-toolbar';
|
|
1705
|
+
const StyledToolbar = styled(Toolbar)`
|
|
1706
|
+
${({
|
|
1707
|
+
theme
|
|
1708
|
+
}) => css`
|
|
1709
|
+
&.${rootClassName$1k} {
|
|
1710
|
+
border-bottom: 1px solid ${theme.palette.figma.border.default};
|
|
1711
|
+
|
|
1712
|
+
.${rootClassName$1n} .MuiInputBase-root {
|
|
1713
|
+
margin-bottom: 0;
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
`}
|
|
1717
|
+
`;
|
|
1718
|
+
|
|
1719
|
+
const DotActionToolbar = ({
|
|
1720
|
+
ariaLabel,
|
|
1721
|
+
children,
|
|
1722
|
+
className,
|
|
1723
|
+
'data-testid': dataTestId,
|
|
1724
|
+
variant = 'dense'
|
|
1725
|
+
}) => {
|
|
1726
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1k, className);
|
|
1727
|
+
return jsx(StyledToolbar, {
|
|
1728
|
+
"aria-label": ariaLabel,
|
|
1729
|
+
className: rootClasses,
|
|
1730
|
+
"data-testid": dataTestId,
|
|
1731
|
+
variant: variant,
|
|
1732
|
+
children: children
|
|
1733
|
+
});
|
|
1730
1734
|
};
|
|
1731
|
-
const checkIfArrowUpPressed = event => event.key === 'ArrowUp';
|
|
1732
|
-
const checkIfArrowDownPressed = event => event.key === 'ArrowDown';
|
|
1733
1735
|
|
|
1734
1736
|
const rootClassName$1j = 'dot-alert-banner';
|
|
1735
1737
|
const StyledAlertBanner = styled(Alert)`
|
|
@@ -2612,6 +2614,7 @@ const DotAvatar = ({
|
|
|
2612
2614
|
ariaRole = 'img',
|
|
2613
2615
|
className,
|
|
2614
2616
|
component = 'div',
|
|
2617
|
+
disableInteractive,
|
|
2615
2618
|
color,
|
|
2616
2619
|
'data-testid': dataTestId,
|
|
2617
2620
|
iconId,
|
|
@@ -2634,6 +2637,7 @@ const DotAvatar = ({
|
|
|
2634
2637
|
return 'default';
|
|
2635
2638
|
};
|
|
2636
2639
|
return jsx(DotTooltip, {
|
|
2640
|
+
disableInteractive: disableInteractive,
|
|
2637
2641
|
childrenDisplayStyle: "inline-block",
|
|
2638
2642
|
title: tooltip,
|
|
2639
2643
|
children: jsx(StyledAvatar, {
|
|
@@ -2758,6 +2762,7 @@ const DotButton = forwardRef(({
|
|
|
2758
2762
|
'data-pendoid': dataPendoId = rootClassName$1g,
|
|
2759
2763
|
'data-testid': dataTestId,
|
|
2760
2764
|
disabled = false,
|
|
2765
|
+
disableInteractive,
|
|
2761
2766
|
disableRipple = false,
|
|
2762
2767
|
endIcon,
|
|
2763
2768
|
fullWidth = false,
|
|
@@ -2795,6 +2800,7 @@ const DotButton = forwardRef(({
|
|
|
2795
2800
|
return jsx(DotTooltip, {
|
|
2796
2801
|
childrenDisplayStyle: "inline-block",
|
|
2797
2802
|
"data-testid": `${dataTestId || rootClassName$1g}-tooltip`,
|
|
2803
|
+
disableInteractive: disableInteractive,
|
|
2798
2804
|
placement: tooltipPlacement,
|
|
2799
2805
|
title: tooltip,
|
|
2800
2806
|
children: jsx(StyledButton, {
|
|
@@ -3730,6 +3736,7 @@ const DotIconButton = ({
|
|
|
3730
3736
|
color = 'inherit',
|
|
3731
3737
|
'data-pendoid': dataPendoId = rootClassName$17,
|
|
3732
3738
|
'data-testid': dataTestId,
|
|
3739
|
+
disableInteractive,
|
|
3733
3740
|
disableRipple = false,
|
|
3734
3741
|
disabled = false,
|
|
3735
3742
|
iconId,
|
|
@@ -3745,10 +3752,11 @@ const DotIconButton = ({
|
|
|
3745
3752
|
return jsx(DotTooltip, {
|
|
3746
3753
|
childrenDisplayStyle: "inline-block",
|
|
3747
3754
|
"data-testid": "icon-button-tooltip",
|
|
3755
|
+
disableInteractive: disableInteractive,
|
|
3748
3756
|
placement: tooltipPlacement,
|
|
3749
3757
|
title: tooltip,
|
|
3750
3758
|
children: jsx(StyledIconButton, {
|
|
3751
|
-
"aria-label": ariaLabel
|
|
3759
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : isString$2(tooltip) ? tooltip.toString() : `${iconId} icon button`,
|
|
3752
3760
|
classes: {
|
|
3753
3761
|
root: rootClasses
|
|
3754
3762
|
},
|
|
@@ -4498,6 +4506,7 @@ const DotCopyButton = ({
|
|
|
4498
4506
|
copyTooltip = 'Copy to clipboard',
|
|
4499
4507
|
'data-pendoid': dataPendoId = rootClassName$14,
|
|
4500
4508
|
'data-testid': dataTestId = 'dot-copy-button',
|
|
4509
|
+
disableInteractive,
|
|
4501
4510
|
disabled = false,
|
|
4502
4511
|
disableRipple = false,
|
|
4503
4512
|
iconId = 'duplicate',
|
|
@@ -4554,6 +4563,7 @@ const DotCopyButton = ({
|
|
|
4554
4563
|
"data-pendoid": dataPendoId,
|
|
4555
4564
|
"data-testid": `${dataTestId}-button`,
|
|
4556
4565
|
disabled: disabled || timedDisabled,
|
|
4566
|
+
disableInteractive: disableInteractive,
|
|
4557
4567
|
disableRipple: disableRipple,
|
|
4558
4568
|
iconId: iconId,
|
|
4559
4569
|
iconSize: iconSize,
|
|
@@ -4564,6 +4574,7 @@ const DotCopyButton = ({
|
|
|
4564
4574
|
}), timedShowCopiedIcon && jsx(DotIcon, {
|
|
4565
4575
|
className: `copied-to-clipboard button-size-${size}`,
|
|
4566
4576
|
"data-testid": `${dataTestId}-icon`,
|
|
4577
|
+
disableInteractive: disableInteractive,
|
|
4567
4578
|
fontSize: iconSize,
|
|
4568
4579
|
iconId: "check-solid",
|
|
4569
4580
|
tooltip: copiedTooltip
|
|
@@ -6106,7 +6117,13 @@ const DotSidebar = ({
|
|
|
6106
6117
|
}), collapsable && jsx("div", {
|
|
6107
6118
|
className: "toggle-nav",
|
|
6108
6119
|
children: jsx(DotTooltip, {
|
|
6109
|
-
|
|
6120
|
+
ariaLabel: `${isOpen ? 'Collapse' : 'Expand'} ${collapseKeys[0].toUpperCase()}`,
|
|
6121
|
+
title: jsxs(Fragment, {
|
|
6122
|
+
children: [isOpen ? 'Collapse' : 'Expand', jsx(DotAnnotation, {
|
|
6123
|
+
content: collapseKeys[0].toUpperCase(),
|
|
6124
|
+
type: "secondary"
|
|
6125
|
+
})]
|
|
6126
|
+
}),
|
|
6110
6127
|
placement: "right",
|
|
6111
6128
|
children: jsx(DotIconButton, {
|
|
6112
6129
|
ariaLabel: "collapse sidebar navigation",
|
|
@@ -6386,6 +6403,7 @@ const DotAppToolbar = ({
|
|
|
6386
6403
|
variant: item.badgeVariant,
|
|
6387
6404
|
children: jsx(DotIconButton, {
|
|
6388
6405
|
className: item.className,
|
|
6406
|
+
disableInteractive: true,
|
|
6389
6407
|
"data-testid": "dot-app-toolbar-icon-button",
|
|
6390
6408
|
iconId: item.iconId,
|
|
6391
6409
|
iconSize: "medium",
|
|
@@ -6415,6 +6433,7 @@ const DotAppToolbar = ({
|
|
|
6415
6433
|
children: [jsx("div", {
|
|
6416
6434
|
className: "dot-main-menu-btn",
|
|
6417
6435
|
children: jsx(DotIconButton, {
|
|
6436
|
+
disableInteractive: true,
|
|
6418
6437
|
"data-testid": "main-menu-icon",
|
|
6419
6438
|
iconId: menuOpen ? 'close' : 'menu',
|
|
6420
6439
|
iconSize: "medium",
|
|
@@ -6456,6 +6475,7 @@ const DotAppToolbar = ({
|
|
|
6456
6475
|
// href
|
|
6457
6476
|
customLogo ? customLogo : jsx(DotTooltip, {
|
|
6458
6477
|
"data-testid": "logo-tooltip",
|
|
6478
|
+
disableInteractive: true,
|
|
6459
6479
|
title: primaryLogoHref ? 'digital.ai' : '',
|
|
6460
6480
|
children: jsx(ForwardRef, {
|
|
6461
6481
|
className: !primaryLogoHref ? 'primary-logo' : ''
|
|
@@ -7789,6 +7809,7 @@ const DotButtonToggle = ({
|
|
|
7789
7809
|
iconId: optionIconId,
|
|
7790
7810
|
text: optionText,
|
|
7791
7811
|
tooltip: optionTooltip,
|
|
7812
|
+
disableInteractive: optionDisableInteractive,
|
|
7792
7813
|
value: optionValue
|
|
7793
7814
|
}, key) => {
|
|
7794
7815
|
const commonProps = {
|
|
@@ -7821,7 +7842,8 @@ const DotButtonToggle = ({
|
|
|
7821
7842
|
const children = getChildren();
|
|
7822
7843
|
return optionTooltip ? jsx(TooltipToggleButton, Object.assign({}, commonProps, {
|
|
7823
7844
|
CustomTooltipProps: {
|
|
7824
|
-
title: optionTooltip
|
|
7845
|
+
title: optionTooltip,
|
|
7846
|
+
disableInteractive: optionDisableInteractive
|
|
7825
7847
|
},
|
|
7826
7848
|
value: optionValue,
|
|
7827
7849
|
children: children
|
|
@@ -8546,6 +8568,7 @@ const DotDialog = ({
|
|
|
8546
8568
|
className: cancelClasses,
|
|
8547
8569
|
"data-pendoid": cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps['data-pendoid'],
|
|
8548
8570
|
"data-testid": cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps['data-testid'],
|
|
8571
|
+
disableInteractive: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.disableInteractive,
|
|
8549
8572
|
disableRipple: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.disableRipple,
|
|
8550
8573
|
disabled: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.disabled,
|
|
8551
8574
|
endIcon: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.endIcon,
|
|
@@ -8559,6 +8582,7 @@ const DotDialog = ({
|
|
|
8559
8582
|
className: secondaryButtonProps === null || secondaryButtonProps === void 0 ? void 0 : secondaryButtonProps.className,
|
|
8560
8583
|
"data-pendoid": secondaryButtonProps === null || secondaryButtonProps === void 0 ? void 0 : secondaryButtonProps['data-pendoid'],
|
|
8561
8584
|
"data-testid": secondaryButtonProps === null || secondaryButtonProps === void 0 ? void 0 : secondaryButtonProps['data-testid'],
|
|
8585
|
+
disableInteractive: secondaryButtonProps === null || secondaryButtonProps === void 0 ? void 0 : secondaryButtonProps.disableInteractive,
|
|
8562
8586
|
disableRipple: secondaryButtonProps === null || secondaryButtonProps === void 0 ? void 0 : secondaryButtonProps.disableRipple,
|
|
8563
8587
|
disabled: secondaryButtonProps === null || secondaryButtonProps === void 0 ? void 0 : secondaryButtonProps.disabled,
|
|
8564
8588
|
endIcon: secondaryButtonProps === null || secondaryButtonProps === void 0 ? void 0 : secondaryButtonProps.endIcon,
|
|
@@ -8572,6 +8596,7 @@ const DotDialog = ({
|
|
|
8572
8596
|
className: submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps.className,
|
|
8573
8597
|
"data-pendoid": submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps['data-pendoid'],
|
|
8574
8598
|
"data-testid": submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps['data-testid'],
|
|
8599
|
+
disableInteractive: submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps.disableInteractive,
|
|
8575
8600
|
disableRipple: submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps.disableRipple,
|
|
8576
8601
|
disabled: submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps.disabled,
|
|
8577
8602
|
endIcon: submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps.endIcon,
|
|
@@ -13529,6 +13554,7 @@ const DotProgressButton = ({
|
|
|
13529
13554
|
'data-pendoid': dataPendoId = rootClassName$x,
|
|
13530
13555
|
'data-testid': dataTestId,
|
|
13531
13556
|
disabled = false,
|
|
13557
|
+
disableInteractive,
|
|
13532
13558
|
disableRipple = false,
|
|
13533
13559
|
fullWidth = false,
|
|
13534
13560
|
isLoading = false,
|
|
@@ -13544,10 +13570,11 @@ const DotProgressButton = ({
|
|
|
13544
13570
|
const titleClasses = useStylesWithRootClass(isLoading ? 'hidden' : '');
|
|
13545
13571
|
const progressCircleSize = size === 'large' ? SPINNER_LARGE_SIZE : SPINNER_DEFAULT_SIZE;
|
|
13546
13572
|
return jsxs(StyledProgressButton, {
|
|
13547
|
-
ariaLabel: ariaLabel
|
|
13573
|
+
ariaLabel: ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : isString$2(tooltip) ? `${tooltip}` : undefined,
|
|
13548
13574
|
className: rootClasses,
|
|
13549
13575
|
"data-pendoid": dataPendoId,
|
|
13550
13576
|
"data-testid": dataTestId,
|
|
13577
|
+
disableInteractive: disableInteractive,
|
|
13551
13578
|
disableRipple: disableRipple,
|
|
13552
13579
|
disabled: isButtonDisabled,
|
|
13553
13580
|
fullWidth: fullWidth,
|
|
@@ -15024,6 +15051,7 @@ const DotSplitButton = ({
|
|
|
15024
15051
|
'data-testid': dataTestId,
|
|
15025
15052
|
defaultMainOptionKey,
|
|
15026
15053
|
disabled = false,
|
|
15054
|
+
disableInteractive,
|
|
15027
15055
|
disablePortal,
|
|
15028
15056
|
disableRipple = false,
|
|
15029
15057
|
fullWidth = false,
|
|
@@ -15064,6 +15092,7 @@ const DotSplitButton = ({
|
|
|
15064
15092
|
className: "label-button",
|
|
15065
15093
|
"data-pendoid": dataPendoId,
|
|
15066
15094
|
"data-testid": dataTestId,
|
|
15095
|
+
disableInteractive: disableInteractive,
|
|
15067
15096
|
disableRipple: disableRipple,
|
|
15068
15097
|
disabled: isMainOptionDisabled,
|
|
15069
15098
|
isSubmit: isSubmit,
|
|
@@ -15077,6 +15106,7 @@ const DotSplitButton = ({
|
|
|
15077
15106
|
className: "expand-button",
|
|
15078
15107
|
"data-pendoid": dataPendoId && `${dataPendoId}-expand`,
|
|
15079
15108
|
"data-testid": dataTestId && `${dataTestId}-expand`,
|
|
15109
|
+
disableInteractive: disableInteractive,
|
|
15080
15110
|
disableRipple: disableRipple,
|
|
15081
15111
|
disabled: isMenuButtonDisabled,
|
|
15082
15112
|
onClick: () => setOpen(!open),
|