@digital-ai/dot-components 5.1.0 → 5.3.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 +78 -62
- package/package.json +1 -1
- package/src/lib/components/analytics/dashboard-actions/DashboardPublishConfirm.styles.d.ts +1 -1
- package/src/lib/components/avatar/Avatar.d.ts +3 -1
- package/src/lib/components/typography/Typography.d.ts +3 -1
- package/src/lib/components/typography/Typography.styles.d.ts +3 -0
- package/src/lib/theme-provider/interfaces.d.ts +1 -1
package/index.esm.js
CHANGED
|
@@ -2,8 +2,8 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default, { useEffect, useState, useRef, createContext, useMemo, useContext, forwardRef, useCallback, createElement, Fragment as Fragment$1, useLayoutEffect } from 'react';
|
|
4
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, Stack } from '@mui/material';
|
|
5
|
+
import styled, { css, createGlobalStyle, ThemeProvider as ThemeProvider$1, keyframes } from 'styled-components';
|
|
5
6
|
import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';
|
|
6
|
-
import styled, { createGlobalStyle, ThemeProvider as ThemeProvider$1, css, keyframes } from 'styled-components';
|
|
7
7
|
import '@digital-ai/dot-icons';
|
|
8
8
|
import jwt_decode from 'jwt-decode';
|
|
9
9
|
import '@digital-ai/dot-illustrations';
|
|
@@ -42,7 +42,26 @@ const checkIfOverflowPresentInElementTree = element => {
|
|
|
42
42
|
return false;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
const rootClassName$1r = 'dot-typography';
|
|
46
|
+
const StyledTypography = styled(Typography)`
|
|
47
|
+
${({
|
|
48
|
+
theme
|
|
49
|
+
}) => css`
|
|
50
|
+
&.${rootClassName$1r} {
|
|
51
|
+
&.dot-typography-ai {
|
|
52
|
+
background: ${theme.palette.figma.gradient.ai};
|
|
53
|
+
background-clip: text;
|
|
54
|
+
-webkit-background-clip: text;
|
|
55
|
+
color: transparent;
|
|
56
|
+
-webkit-text-fill-color: transparent;
|
|
57
|
+
width: fit-content;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`}
|
|
61
|
+
`;
|
|
62
|
+
|
|
45
63
|
const DotTypography = ({
|
|
64
|
+
ai,
|
|
46
65
|
ariaLabel,
|
|
47
66
|
ariaLevel,
|
|
48
67
|
ariaRole,
|
|
@@ -54,7 +73,7 @@ const DotTypography = ({
|
|
|
54
73
|
noWrap,
|
|
55
74
|
variant
|
|
56
75
|
}) => {
|
|
57
|
-
const rootClasses = useStylesWithRootClass('dot-typography', className);
|
|
76
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1r, ai ? 'dot-typography-ai' : '', className);
|
|
58
77
|
useEffect(() => {
|
|
59
78
|
if (ariaRole === 'heading' && !ariaLevel) {
|
|
60
79
|
console.warn('please include ariaLevel when using ariaRole="heading"');
|
|
@@ -63,7 +82,7 @@ const DotTypography = ({
|
|
|
63
82
|
console.warn('DEPRECATED: `noMarginBottom` on `DotTypography` is no longer included');
|
|
64
83
|
}
|
|
65
84
|
}, []);
|
|
66
|
-
return jsx(
|
|
85
|
+
return jsx(StyledTypography, {
|
|
67
86
|
"aria-label": ariaLabel,
|
|
68
87
|
"aria-level": ariaLevel,
|
|
69
88
|
classes: {
|
|
@@ -447,7 +466,7 @@ const lightFigmaColors = {
|
|
|
447
466
|
}
|
|
448
467
|
},
|
|
449
468
|
icon: {
|
|
450
|
-
|
|
469
|
+
gray: n400,
|
|
451
470
|
disabled: n300,
|
|
452
471
|
white: n0
|
|
453
472
|
},
|
|
@@ -609,7 +628,7 @@ const darkFigmaColors = {
|
|
|
609
628
|
}
|
|
610
629
|
},
|
|
611
630
|
icon: {
|
|
612
|
-
|
|
631
|
+
gray: n100,
|
|
613
632
|
disabled: n400,
|
|
614
633
|
white: n700
|
|
615
634
|
},
|
|
@@ -852,7 +871,7 @@ const avatarColors = {
|
|
|
852
871
|
backgroundColor: lightFigmaColors.typography.gray
|
|
853
872
|
},
|
|
854
873
|
default: {
|
|
855
|
-
color: lightFigmaColors.icon.
|
|
874
|
+
color: lightFigmaColors.icon.gray,
|
|
856
875
|
backgroundColor: lightFigmaColors.background.level1.deep
|
|
857
876
|
},
|
|
858
877
|
green: {
|
|
@@ -907,7 +926,7 @@ const darkTheme = createTheme({
|
|
|
907
926
|
backgroundColor: darkFigmaColors.typography.gray
|
|
908
927
|
},
|
|
909
928
|
default: {
|
|
910
|
-
color: darkFigmaColors.icon.
|
|
929
|
+
color: darkFigmaColors.icon.gray,
|
|
911
930
|
backgroundColor: darkFigmaColors.background.level1.deep
|
|
912
931
|
},
|
|
913
932
|
green: {
|
|
@@ -1474,22 +1493,27 @@ const StyledTextField = styled(TextField)`
|
|
|
1474
1493
|
&.MuiInputBase-adornedStart {
|
|
1475
1494
|
padding-left: ${theme.spacing(1.5)};
|
|
1476
1495
|
}
|
|
1496
|
+
|
|
1477
1497
|
&.MuiInputBase-adornedEnd {
|
|
1478
1498
|
padding-right: ${theme.spacing(1)};
|
|
1479
1499
|
}
|
|
1480
1500
|
}
|
|
1481
1501
|
}
|
|
1502
|
+
|
|
1482
1503
|
.MuiInputBase-input {
|
|
1483
1504
|
box-sizing: content-box;
|
|
1484
1505
|
}
|
|
1506
|
+
|
|
1485
1507
|
.MuiOutlinedInput-input {
|
|
1486
1508
|
padding: 18px ${InputProps.endAdornment ? '0px' : '12px'} 18px
|
|
1487
1509
|
${InputProps.startAdornment ? '0px' : '12px'};
|
|
1510
|
+
|
|
1488
1511
|
&::placeholder {
|
|
1489
1512
|
opacity: 1;
|
|
1490
1513
|
color: ${theme.palette.figma.typography.gray};
|
|
1491
1514
|
}
|
|
1492
1515
|
}
|
|
1516
|
+
|
|
1493
1517
|
.MuiInputBase-inputSizeSmall {
|
|
1494
1518
|
padding-top: 10.5px;
|
|
1495
1519
|
padding-bottom: 10.5px;
|
|
@@ -1552,7 +1576,8 @@ const StyledTextField = styled(TextField)`
|
|
|
1552
1576
|
|
|
1553
1577
|
&.${rootSelectClassName}, &.${rootClassName$1q} {
|
|
1554
1578
|
.${adornmentIconClassName} {
|
|
1555
|
-
color: ${theme.palette.figma.icon.
|
|
1579
|
+
color: ${theme.palette.figma.icon.gray};
|
|
1580
|
+
|
|
1556
1581
|
p {
|
|
1557
1582
|
font-size: ${theme.typography.body2.fontSize}px;
|
|
1558
1583
|
margin: 0;
|
|
@@ -1595,8 +1620,12 @@ const StyledTextField = styled(TextField)`
|
|
|
1595
1620
|
right: ${InputProps.endAdornment ? `44px` : `12px`};
|
|
1596
1621
|
}
|
|
1597
1622
|
|
|
1623
|
+
&.${inputAiClassName$1} .${fieldsetClassName} {
|
|
1624
|
+
border-color: ${theme.palette.figma.aiPink.elevated};
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1598
1627
|
&.${successClassName} {
|
|
1599
|
-
|
|
1628
|
+
.${fieldsetClassName} {
|
|
1600
1629
|
border-color: ${theme.palette.figma.success.normal};
|
|
1601
1630
|
}
|
|
1602
1631
|
|
|
@@ -1606,7 +1635,7 @@ const StyledTextField = styled(TextField)`
|
|
|
1606
1635
|
}
|
|
1607
1636
|
|
|
1608
1637
|
&.${errorClassName} {
|
|
1609
|
-
|
|
1638
|
+
.${fieldsetClassName} {
|
|
1610
1639
|
border-color: ${theme.palette.figma.destructive.normal};
|
|
1611
1640
|
}
|
|
1612
1641
|
|
|
@@ -1616,7 +1645,7 @@ const StyledTextField = styled(TextField)`
|
|
|
1616
1645
|
}
|
|
1617
1646
|
|
|
1618
1647
|
&.${warningClassName} {
|
|
1619
|
-
|
|
1648
|
+
.${fieldsetClassName} {
|
|
1620
1649
|
border-color: ${theme.palette.figma.warning.normal};
|
|
1621
1650
|
}
|
|
1622
1651
|
|
|
@@ -1625,21 +1654,6 @@ const StyledTextField = styled(TextField)`
|
|
|
1625
1654
|
}
|
|
1626
1655
|
}
|
|
1627
1656
|
|
|
1628
|
-
&.${inputAiClassName$1} {
|
|
1629
|
-
color: ${theme.palette.figma.typography.white};
|
|
1630
|
-
background: ${theme.palette.figma.gradient.normal};
|
|
1631
|
-
border: 1px solid transparent;
|
|
1632
|
-
border-radius: 4px;
|
|
1633
|
-
|
|
1634
|
-
.MuiOutlinedInput-root .${fieldsetClassName} {
|
|
1635
|
-
border: none;
|
|
1636
|
-
}
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
.ai-text-clear-icon {
|
|
1640
|
-
right: 36px;
|
|
1641
|
-
position: relative;
|
|
1642
|
-
}
|
|
1643
1657
|
.MuiOutlinedInput-adornedStart {
|
|
1644
1658
|
padding-left: 12px;
|
|
1645
1659
|
|
|
@@ -1662,7 +1676,7 @@ const StyledIcon = styled(Icon)`
|
|
|
1662
1676
|
theme
|
|
1663
1677
|
}) => css`
|
|
1664
1678
|
&.${rootClassName$1p} {
|
|
1665
|
-
color: ${theme.palette.figma.icon.
|
|
1679
|
+
color: ${theme.palette.figma.icon.gray};
|
|
1666
1680
|
font-size: 20px;
|
|
1667
1681
|
|
|
1668
1682
|
i {
|
|
@@ -2670,7 +2684,7 @@ const StyledAvatar = styled(Avatar)`
|
|
|
2670
2684
|
border: 0px;
|
|
2671
2685
|
&:focus-visible {
|
|
2672
2686
|
box-shadow: 0px 0px 0px 3px ${theme.palette.figma.icon.white},
|
|
2673
|
-
0px 0px 0px 5px ${theme.palette.figma.icon.
|
|
2687
|
+
0px 0px 0px 5px ${theme.palette.figma.icon.gray};
|
|
2674
2688
|
outline: 0;
|
|
2675
2689
|
}
|
|
2676
2690
|
|
|
@@ -2679,12 +2693,13 @@ const StyledAvatar = styled(Avatar)`
|
|
|
2679
2693
|
height: 105%;
|
|
2680
2694
|
}
|
|
2681
2695
|
|
|
2682
|
-
.dot-
|
|
2683
|
-
.dot-
|
|
2696
|
+
.dot-typography:not(.dot-typography-ai),
|
|
2697
|
+
.dot-icon:not(.dot-icon-ai) .dot-i {
|
|
2684
2698
|
color: ${({
|
|
2685
|
-
color
|
|
2699
|
+
color,
|
|
2700
|
+
style
|
|
2686
2701
|
}) => {
|
|
2687
|
-
return color ? theme.palette.avatarColors[color].color : theme.palette.avatarColors['default'].color;
|
|
2702
|
+
return (style === null || style === void 0 ? void 0 : style.color) !== undefined ? style.color : color ? theme.palette.avatarColors[color].color : theme.palette.avatarColors['default'].color;
|
|
2688
2703
|
}};
|
|
2689
2704
|
margin-bottom: 0;
|
|
2690
2705
|
}
|
|
@@ -2708,6 +2723,7 @@ const StyledAvatar = styled(Avatar)`
|
|
|
2708
2723
|
`;
|
|
2709
2724
|
|
|
2710
2725
|
const AvatarContent = ({
|
|
2726
|
+
ai,
|
|
2711
2727
|
'data-testid': dataTestId,
|
|
2712
2728
|
iconId,
|
|
2713
2729
|
imageSrc,
|
|
@@ -2739,6 +2755,7 @@ const AvatarContent = ({
|
|
|
2739
2755
|
const getIconFontSizeFromAvatarSize = () => size === 'small' ? size : 'medium';
|
|
2740
2756
|
if (type === 'icon' || type === 'image' && !imageSrc) {
|
|
2741
2757
|
return jsx(DotIcon, {
|
|
2758
|
+
ai: ai,
|
|
2742
2759
|
"data-testid": `${dataTestId}-icon`,
|
|
2743
2760
|
fontSize: getIconFontSizeFromAvatarSize(),
|
|
2744
2761
|
iconId: iconId || 'user'
|
|
@@ -2746,6 +2763,7 @@ const AvatarContent = ({
|
|
|
2746
2763
|
}
|
|
2747
2764
|
if (type === 'text') {
|
|
2748
2765
|
return jsx(DotTypography, {
|
|
2766
|
+
ai: ai,
|
|
2749
2767
|
variant: size === 'small' ? 'caption' : getHeadingFromAvatarSize(),
|
|
2750
2768
|
children: parsedNumber() || parsedText()
|
|
2751
2769
|
});
|
|
@@ -2753,6 +2771,7 @@ const AvatarContent = ({
|
|
|
2753
2771
|
return null;
|
|
2754
2772
|
};
|
|
2755
2773
|
const DotAvatar = ({
|
|
2774
|
+
ai = false,
|
|
2756
2775
|
alt,
|
|
2757
2776
|
ariaLabel,
|
|
2758
2777
|
ariaRole = 'img',
|
|
@@ -2802,6 +2821,7 @@ const DotAvatar = ({
|
|
|
2802
2821
|
tabIndex: tooltip ? tabIndex : undefined,
|
|
2803
2822
|
variant: variant,
|
|
2804
2823
|
children: jsx(AvatarContent, {
|
|
2824
|
+
ai: ai,
|
|
2805
2825
|
"data-testid": dataTestId,
|
|
2806
2826
|
iconId: iconId,
|
|
2807
2827
|
imageSrc: imageSrc,
|
|
@@ -2856,7 +2876,7 @@ const StyledButton = styled(Button)`
|
|
|
2856
2876
|
}
|
|
2857
2877
|
|
|
2858
2878
|
.dot-icon {
|
|
2859
|
-
color: ${theme.palette.figma.icon.
|
|
2879
|
+
color: ${theme.palette.figma.icon.gray};
|
|
2860
2880
|
}
|
|
2861
2881
|
}
|
|
2862
2882
|
|
|
@@ -3148,7 +3168,7 @@ const StyledList = styled(List)`
|
|
|
3148
3168
|
background: ${theme.palette.figma.background.level0.componentsBackground};
|
|
3149
3169
|
|
|
3150
3170
|
.dot-icon {
|
|
3151
|
-
color: ${theme.palette.figma.icon.
|
|
3171
|
+
color: ${theme.palette.figma.icon.gray};
|
|
3152
3172
|
}
|
|
3153
3173
|
|
|
3154
3174
|
&.${nestedListClassName} .${listItemRootClass} {
|
|
@@ -3910,13 +3930,13 @@ const StyledIconButton = styled(IconButton)`
|
|
|
3910
3930
|
color: inherit;
|
|
3911
3931
|
` : ''}
|
|
3912
3932
|
${color === 'default' ? css`
|
|
3913
|
-
color: ${theme.palette.figma.icon.
|
|
3933
|
+
color: ${theme.palette.figma.icon.gray};
|
|
3914
3934
|
` : ''}
|
|
3915
3935
|
|
|
3916
3936
|
&.MuiIconButton-colorAi{
|
|
3917
3937
|
color: ${theme.palette.figma.icon.white};
|
|
3918
3938
|
background: ${theme.palette.figma.gradient.normal};
|
|
3919
|
-
|
|
3939
|
+
|
|
3920
3940
|
&:hover {
|
|
3921
3941
|
background: ${theme.palette.figma.gradient.elevated};
|
|
3922
3942
|
}
|
|
@@ -3968,7 +3988,7 @@ const StyledIconButton = styled(IconButton)`
|
|
|
3968
3988
|
&:active {
|
|
3969
3989
|
${color !== 'ai' ? css`
|
|
3970
3990
|
background: ${theme.palette.figma.toggleTabs.bckg};
|
|
3971
|
-
` : ''}
|
|
3991
|
+
` : ''}
|
|
3972
3992
|
}
|
|
3973
3993
|
}
|
|
3974
3994
|
|
|
@@ -4292,7 +4312,7 @@ const styledListItemElement = elementType => {
|
|
|
4292
4312
|
}
|
|
4293
4313
|
|
|
4294
4314
|
.dot-icon i:before {
|
|
4295
|
-
color: ${theme.palette.figma.icon.
|
|
4315
|
+
color: ${theme.palette.figma.icon.gray};
|
|
4296
4316
|
}
|
|
4297
4317
|
|
|
4298
4318
|
.left-border-with-arrow {
|
|
@@ -4961,7 +4981,7 @@ const DotInputText = ({
|
|
|
4961
4981
|
const hasError = error && errorClassName;
|
|
4962
4982
|
const hasWarning = !error && warning && warningClassName;
|
|
4963
4983
|
const hasSuccess = !error && !warning && success && successClassName;
|
|
4964
|
-
const isAiEnabled = ai && inputAiClassName$1;
|
|
4984
|
+
const isAiEnabled = !error && !warning && !success && ai && inputAiClassName$1;
|
|
4965
4985
|
const hasEndAdornmentIcon = endIcon || error || hasWarning || hasSuccess;
|
|
4966
4986
|
const internalInputRef = useRef(null);
|
|
4967
4987
|
const textFieldInputRef = inputRef || internalInputRef;
|
|
@@ -5940,7 +5960,7 @@ const StyledSidebar = styled.aside`
|
|
|
5940
5960
|
|
|
5941
5961
|
&:focus-visible {
|
|
5942
5962
|
box-shadow: 0 0 0 2px ${theme.palette.figma.icon.white},
|
|
5943
|
-
0 0 0 4px ${theme.palette.figma.icon.
|
|
5963
|
+
0 0 0 4px ${theme.palette.figma.icon.gray};
|
|
5944
5964
|
}
|
|
5945
5965
|
}
|
|
5946
5966
|
|
|
@@ -6018,7 +6038,7 @@ const StyledSidebar = styled.aside`
|
|
|
6018
6038
|
margin: 0;
|
|
6019
6039
|
|
|
6020
6040
|
i:before {
|
|
6021
|
-
color: ${theme.palette.figma.
|
|
6041
|
+
color: ${theme.palette.figma.icon.gray};
|
|
6022
6042
|
}
|
|
6023
6043
|
}
|
|
6024
6044
|
}
|
|
@@ -6387,6 +6407,7 @@ const DotSidebar = ({
|
|
|
6387
6407
|
placement: "right",
|
|
6388
6408
|
children: jsx(DotIconButton, {
|
|
6389
6409
|
ariaLabel: "collapse sidebar navigation",
|
|
6410
|
+
color: "default",
|
|
6390
6411
|
"data-testid": "toggle-nav",
|
|
6391
6412
|
iconId: isOpen ? 'push-left' : 'push-right',
|
|
6392
6413
|
iconSize: "small",
|
|
@@ -6597,7 +6618,7 @@ const StyledAppToolbar = styled.header`
|
|
|
6597
6618
|
height: 40px;
|
|
6598
6619
|
button.dot-avatar:focus-visible {
|
|
6599
6620
|
box-shadow: 0px 0px 0px 3px ${theme.palette.figma.icon.white},
|
|
6600
|
-
0px 0px 0px 5px ${theme.palette.figma.icon.
|
|
6621
|
+
0px 0px 0px 5px ${theme.palette.figma.icon.gray};
|
|
6601
6622
|
}
|
|
6602
6623
|
}
|
|
6603
6624
|
}
|
|
@@ -6794,7 +6815,7 @@ const StyledChip = styled(Chip)`
|
|
|
6794
6815
|
color: ${theme.palette.figma.typography.black};
|
|
6795
6816
|
|
|
6796
6817
|
.dot-icon i {
|
|
6797
|
-
color: ${theme.palette.figma.icon.
|
|
6818
|
+
color: ${theme.palette.figma.icon.gray};
|
|
6798
6819
|
height: auto;
|
|
6799
6820
|
}
|
|
6800
6821
|
|
|
@@ -6866,7 +6887,7 @@ const StyledChip = styled(Chip)`
|
|
|
6866
6887
|
}
|
|
6867
6888
|
|
|
6868
6889
|
.MuiChip-deleteIcon:hover {
|
|
6869
|
-
color: ${theme.palette.figma.icon.
|
|
6890
|
+
color: ${theme.palette.figma.icon.gray};
|
|
6870
6891
|
}
|
|
6871
6892
|
}
|
|
6872
6893
|
|
|
@@ -6988,15 +7009,8 @@ const StyledAutocomplete = styled(Autocomplete)`
|
|
|
6988
7009
|
}
|
|
6989
7010
|
|
|
6990
7011
|
&.${inputAiClassName} {
|
|
6991
|
-
color: ${theme.palette.figma.typography.white};
|
|
6992
|
-
background: ${theme.palette.figma.gradient.ai};
|
|
6993
|
-
border: 2px solid transparent;
|
|
6994
|
-
border-radius: 4px;
|
|
6995
|
-
.MuiOutlinedInput-root {
|
|
6996
|
-
padding: 8px;
|
|
6997
|
-
}
|
|
6998
7012
|
.MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline {
|
|
6999
|
-
border:
|
|
7013
|
+
border-color: ${theme.palette.figma.aiPink.elevated};
|
|
7000
7014
|
}
|
|
7001
7015
|
}
|
|
7002
7016
|
`}
|
|
@@ -7147,7 +7161,8 @@ const DotAutoComplete = ({
|
|
|
7147
7161
|
const isActionItemDefined = onActionItemClick !== undefined;
|
|
7148
7162
|
const popperOpen = !readOnly && (open || isOpened);
|
|
7149
7163
|
const textFieldWarningClassName = !error && warning && warningClassName;
|
|
7150
|
-
const
|
|
7164
|
+
const isAiEnabled = !error && !warning && ai;
|
|
7165
|
+
const rootClasses = useStylesWithRootClass(getRootClassNames(className, size), isAiEnabled ? inputAiClassName : '');
|
|
7151
7166
|
const textFieldRootClasses = getTextFieldRootClassNames(textFieldWarningClassName, readOnly);
|
|
7152
7167
|
const inputRootClasses = getInputRootClassNames(dense);
|
|
7153
7168
|
const popperClasses = useStylesWithRootClass(rootClassName$1f, popperClassName);
|
|
@@ -7273,7 +7288,7 @@ const DotAutoComplete = ({
|
|
|
7273
7288
|
// Create handler only if 'onInputChange' or 'actionItem' prop is defined
|
|
7274
7289
|
// Custom input change handler for AI mode
|
|
7275
7290
|
const handleInputChange = (event, currentInputValue, reason) => {
|
|
7276
|
-
if (isActionItemDefined ||
|
|
7291
|
+
if (isActionItemDefined || isAiEnabled) {
|
|
7277
7292
|
setInputText(currentInputValue); // fallback for action item
|
|
7278
7293
|
}
|
|
7279
7294
|
onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(event, currentInputValue, reason);
|
|
@@ -7364,7 +7379,7 @@ const DotAutoComplete = ({
|
|
|
7364
7379
|
return renderOption ? renderOption(props, option, state) : renderTrimmedLongOptions(props, option);
|
|
7365
7380
|
};
|
|
7366
7381
|
const getEndAdornment = params => {
|
|
7367
|
-
if (
|
|
7382
|
+
if (isAiEnabled) {
|
|
7368
7383
|
return renderAISendAdornment;
|
|
7369
7384
|
}
|
|
7370
7385
|
if (!readOnly) {
|
|
@@ -7385,6 +7400,7 @@ const DotAutoComplete = ({
|
|
|
7385
7400
|
defaultValue: getDefaultAutoCompleteValue(multiple, defaultValue),
|
|
7386
7401
|
disableCloseOnSelect: disableCloseOnSelect,
|
|
7387
7402
|
disabled: disabled,
|
|
7403
|
+
disableClearable: isAiEnabled,
|
|
7388
7404
|
filterOptions: filterOptions,
|
|
7389
7405
|
filterSelectedOptions: filterSelectedOptions,
|
|
7390
7406
|
freeSolo: freesolo,
|
|
@@ -7457,7 +7473,7 @@ const DotAutoComplete = ({
|
|
|
7457
7473
|
id: inputId,
|
|
7458
7474
|
className: useStylesWithRootClass(inputProps.className, 'dot-input'),
|
|
7459
7475
|
readOnly,
|
|
7460
|
-
value:
|
|
7476
|
+
value: isAiEnabled ? inputText : inputProps.value
|
|
7461
7477
|
}),
|
|
7462
7478
|
InputLabelProps: {
|
|
7463
7479
|
htmlFor: inputId
|
|
@@ -7475,7 +7491,7 @@ const DotAutoComplete = ({
|
|
|
7475
7491
|
event.preventDefault();
|
|
7476
7492
|
(_a = actionItemRef === null || actionItemRef === void 0 ? void 0 : actionItemRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
7477
7493
|
}
|
|
7478
|
-
if (event.key === 'Enter' &&
|
|
7494
|
+
if (event.key === 'Enter' && isAiEnabled) {
|
|
7479
7495
|
event.stopPropagation();
|
|
7480
7496
|
event.preventDefault();
|
|
7481
7497
|
handleAiAction(inputText);
|
|
@@ -7653,7 +7669,7 @@ const StyledBreadcrumbs = styled(Breadcrumbs)`
|
|
|
7653
7669
|
}
|
|
7654
7670
|
.MuiBreadcrumbs-li,
|
|
7655
7671
|
.separator {
|
|
7656
|
-
color: ${theme.palette.figma.
|
|
7672
|
+
color: ${theme.palette.figma.typography.black};
|
|
7657
7673
|
margin: 0;
|
|
7658
7674
|
white-space: nowrap;
|
|
7659
7675
|
}
|
|
@@ -8023,7 +8039,7 @@ const StyledToggleButtonGroup = styled(ToggleButtonGroup)`
|
|
|
8023
8039
|
}
|
|
8024
8040
|
|
|
8025
8041
|
.dot-icon {
|
|
8026
|
-
color: ${theme.palette.figma.icon.
|
|
8042
|
+
color: ${theme.palette.figma.icon.gray};
|
|
8027
8043
|
display: flex;
|
|
8028
8044
|
|
|
8029
8045
|
+ p {
|
|
@@ -15544,7 +15560,7 @@ const StyledNavigationRail = styled.div`
|
|
|
15544
15560
|
border-right: 3px solid transparent;
|
|
15545
15561
|
|
|
15546
15562
|
.dot-icon {
|
|
15547
|
-
color: ${theme.palette.figma.icon.
|
|
15563
|
+
color: ${theme.palette.figma.icon.gray};
|
|
15548
15564
|
}
|
|
15549
15565
|
|
|
15550
15566
|
&.selected,
|
|
@@ -15679,7 +15695,7 @@ const StyledSplitButtonGroup = styled(ButtonGroup)`
|
|
|
15679
15695
|
border-left: none;
|
|
15680
15696
|
|
|
15681
15697
|
.dot-icon {
|
|
15682
|
-
color: ${theme.palette.figma.icon.
|
|
15698
|
+
color: ${theme.palette.figma.icon.gray};
|
|
15683
15699
|
}
|
|
15684
15700
|
}
|
|
15685
15701
|
}
|
|
@@ -15899,7 +15915,7 @@ const StyledStepper = styled.div`
|
|
|
15899
15915
|
|
|
15900
15916
|
&.active:not(&.completed):not(&.in-progress) {
|
|
15901
15917
|
.dot-avatar i:before {
|
|
15902
|
-
color: ${theme.palette.figma.icon.
|
|
15918
|
+
color: ${theme.palette.figma.icon.gray};
|
|
15903
15919
|
}
|
|
15904
15920
|
}
|
|
15905
15921
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const dashboardCategoriesContainerClassName = "dashboard-categories-container";
|
|
2
|
-
export declare const InlineMessage: import("styled-components").StyledComponent<({ ariaLabel, ariaLevel, ariaRole, className, "data-testid": dataTestId, children, component, noMarginBottom, noWrap, variant, }: import("../../typography/Typography").TypographyProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|
|
2
|
+
export declare const InlineMessage: import("styled-components").StyledComponent<({ ai, ariaLabel, ariaLevel, ariaRole, className, "data-testid": dataTestId, children, component, noMarginBottom, noWrap, variant, }: import("../../typography/Typography").TypographyProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
|
|
3
3
|
export declare const StyledPublishConfirmDiv: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const StyledAppSelectDiv: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
5
|
export declare const StyledAppSelectDotAutoComplete: import("styled-components").StyledComponent<(<T extends import("../..").AutoCompleteOption>({ ListboxComponent, additionalLabelContent, actionItem, ai, aiAction, ariaLabel, autoFocus, autoHighlight, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, defaultValue, dense, disableCloseOnSelect, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, informationToolTip, inputId, inputRef, inputValue, isOptionEqualToValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, popperClassName, popperPlacement, popperZIndex, preserveGroupOrder, readOnly, renderGroup, renderOption, renderTags, required, size, trimLongOptions, value, warning, }: import("../../auto-complete/AutoComplete").AutoCompleteProps<T>) => import("react/jsx-runtime").JSX.Element), any, {}, never>;
|
|
@@ -5,6 +5,8 @@ export type AvatarType = 'image' | 'text' | 'icon';
|
|
|
5
5
|
export type AvatarVariant = 'circular' | 'square';
|
|
6
6
|
export type AvatarColor = 'default' | 'inherit' | 'green' | 'blue' | 'orange' | 'purple' | 'yellow' | 'red' | 'darkGrey' | 'lightGrey' | 'transparent' | 'white';
|
|
7
7
|
export interface AvatarProps extends CommonProps {
|
|
8
|
+
/** Apply gradient color to inner content (icon / typography) */
|
|
9
|
+
ai?: boolean;
|
|
8
10
|
/** Text displayed on hover */
|
|
9
11
|
alt: string;
|
|
10
12
|
/** Color for avatar */
|
|
@@ -36,4 +38,4 @@ export interface AvatarProps extends CommonProps {
|
|
|
36
38
|
/** The shape of the avatar */
|
|
37
39
|
variant?: AvatarVariant;
|
|
38
40
|
}
|
|
39
|
-
export declare const DotAvatar: ({ alt, ariaLabel, ariaRole, className, component, disableInteractive, color, "data-testid": dataTestId, iconId, imageSrc, onClick, number, size, tabIndex, text, type, tooltip, variant, style, }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare const DotAvatar: ({ ai, alt, ariaLabel, ariaRole, className, component, disableInteractive, color, "data-testid": dataTestId, iconId, imageSrc, onClick, number, size, tabIndex, text, type, tooltip, variant, style, }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,8 @@ import { ElementType, ReactNode } from 'react';
|
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
export type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'button' | 'overline' | 'inherit';
|
|
4
4
|
export interface TypographyProps extends CommonProps {
|
|
5
|
+
/** If true, applies a gradient color */
|
|
6
|
+
ai?: boolean;
|
|
5
7
|
/** When `ariaRole` is `heading` then set a level */
|
|
6
8
|
ariaLevel?: number;
|
|
7
9
|
/** The content of the component. */
|
|
@@ -15,4 +17,4 @@ export interface TypographyProps extends CommonProps {
|
|
|
15
17
|
/** Applies the theme typography styles. */
|
|
16
18
|
variant?: TypographyVariant;
|
|
17
19
|
}
|
|
18
|
-
export declare const DotTypography: ({ ariaLabel, ariaLevel, ariaRole, className, "data-testid": dataTestId, children, component, noMarginBottom, noWrap, variant, }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const DotTypography: ({ ai, ariaLabel, ariaLevel, ariaRole, className, "data-testid": dataTestId, children, component, noMarginBottom, noWrap, variant, }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TypographyProps } from '@mui/material/Typography';
|
|
2
|
+
export declare const rootClassName = "dot-typography";
|
|
3
|
+
export declare const StyledTypography: import("styled-components").StyledComponent<import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").TypographyTypeMap<{}, "span">>, any, TypographyProps, never>;
|