@astral/ui 4.101.0 → 4.102.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/components/Alert/styles.js +12 -2
- package/components/Autocomplete/styles.js +5 -2
- package/components/Breadcrumbs/styles.js +18 -13
- package/components/CheckableTag/styles.js +6 -3
- package/components/Checkbox/styles.js +10 -7
- package/components/Chip/styles.js +11 -6
- package/components/CodeField/styles.js +5 -2
- package/components/CopyTypography/styles.js +19 -5
- package/components/DashboardLayout/Header/styles.js +5 -2
- package/components/DashboardSidebarPopover/SidebarPopoverItem/styles.js +5 -2
- package/components/DataGrid/Row/styles.js +14 -19
- package/components/DataGrid/RowBase/styles.js +10 -17
- package/components/DataGridCollapsibleRow/styles.js +5 -2
- package/components/Description/Value/styles.js +5 -2
- package/components/ExpansionPanel/Summary/styles.js +5 -2
- package/components/Fab/styles.js +12 -3
- package/components/InfiniteDataList/styles.js +5 -2
- package/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +5 -2
- package/components/InputGroup/styles.js +8 -5
- package/components/JsonViewer/JsonNode/styles.js +5 -2
- package/components/Link/styles.js +11 -6
- package/components/ListItem/styles.js +5 -2
- package/components/MenuOrganization/OrganizationButton/styles.js +5 -6
- package/components/NavMenu/Item/ItemButton/styles.js +14 -7
- package/components/NewStepper/Step/styles.js +18 -15
- package/components/Notification/NotificationStackContainer/styles.js +5 -2
- package/components/PageAsideNavigation/PageAsideNavigationItem/styles.js +5 -6
- package/components/PageHeader/MobilePageActions/styles.js +0 -4
- package/components/Radio/styles.js +7 -4
- package/components/RadioCard/styles.js +5 -2
- package/components/StaticCalendar/StaticCalendarGridButton/styles.js +8 -5
- package/components/Tabs/Tab/styles.js +5 -2
- package/components/ToggleButton/styles.js +25 -10
- package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +3 -3
- package/components/Tree/TreeItem/styles.js +23 -10
- package/components/constants/index.d.ts +1 -0
- package/components/constants/index.js +1 -0
- package/components/constants/media.d.ts +8 -0
- package/components/constants/media.js +8 -0
- package/components/theme/components/MuiButton.js +46 -23
- package/components/theme/components/MuiListItemButton.js +10 -2
- package/components/theme/components/MuiMenuItem.js +5 -2
- package/components/theme/components/MuiOutlinedInput.js +15 -12
- package/components/theme/components/MuiSwitch.js +14 -9
- package/components/theme/components/MuiTableRow.js +11 -3
- package/node/components/Alert/styles.js +24 -14
- package/node/components/Autocomplete/styles.js +8 -5
- package/node/components/Breadcrumbs/styles.js +18 -13
- package/node/components/CheckableTag/styles.js +6 -3
- package/node/components/Checkbox/styles.js +26 -23
- package/node/components/Chip/styles.js +36 -31
- package/node/components/CodeField/styles.js +5 -2
- package/node/components/CopyTypography/styles.js +22 -8
- package/node/components/DashboardLayout/Header/styles.js +35 -32
- package/node/components/DashboardSidebarPopover/SidebarPopoverItem/styles.js +7 -4
- package/node/components/DataGrid/Row/styles.js +41 -46
- package/node/components/DataGrid/RowBase/styles.js +16 -23
- package/node/components/DataGridCollapsibleRow/styles.js +11 -8
- package/node/components/Description/Value/styles.js +5 -2
- package/node/components/ExpansionPanel/Summary/styles.js +5 -2
- package/node/components/Fab/styles.js +12 -3
- package/node/components/InfiniteDataList/styles.js +7 -4
- package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +11 -8
- package/node/components/InputGroup/styles.js +8 -5
- package/node/components/JsonViewer/JsonNode/styles.js +5 -2
- package/node/components/Link/styles.js +13 -8
- package/node/components/ListItem/styles.js +10 -7
- package/node/components/MenuOrganization/OrganizationButton/styles.js +5 -6
- package/node/components/NavMenu/Item/ItemButton/styles.js +16 -9
- package/node/components/NewStepper/Step/styles.js +68 -65
- package/node/components/Notification/NotificationStackContainer/styles.js +57 -54
- package/node/components/PageAsideNavigation/PageAsideNavigationItem/styles.js +12 -13
- package/node/components/PageHeader/MobilePageActions/styles.js +0 -4
- package/node/components/Radio/styles.js +20 -17
- package/node/components/RadioCard/styles.js +7 -4
- package/node/components/StaticCalendar/StaticCalendarGridButton/styles.js +8 -5
- package/node/components/Tabs/Tab/styles.js +5 -2
- package/node/components/ToggleButton/styles.js +27 -12
- package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +3 -3
- package/node/components/Tree/TreeItem/styles.js +44 -31
- package/node/components/constants/index.d.ts +1 -0
- package/node/components/constants/index.js +1 -0
- package/node/components/constants/media.d.ts +8 -0
- package/node/components/constants/media.js +11 -0
- package/node/components/theme/components/MuiButton.js +46 -23
- package/node/components/theme/components/MuiListItemButton.js +10 -2
- package/node/components/theme/components/MuiMenuItem.js +5 -2
- package/node/components/theme/components/MuiOutlinedInput.js +15 -12
- package/node/components/theme/components/MuiSwitch.js +14 -9
- package/node/components/theme/components/MuiTableRow.js +11 -3
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HOVER_MEDIA } from '../../constants';
|
|
1
2
|
const prepareColorToUrl = (color) => color.replace('#', '%23');
|
|
2
3
|
const getCheckBackgroundImage = (color) => {
|
|
3
4
|
const preparedColor = prepareColorToUrl(color);
|
|
@@ -30,13 +31,15 @@ export const MuiSwitch = {
|
|
|
30
31
|
opacity: 1,
|
|
31
32
|
},
|
|
32
33
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
[HOVER_MEDIA]: {
|
|
35
|
+
// CHECKED HOVER
|
|
36
|
+
'& .Mui-checked:hover + .MuiSwitch-track': {
|
|
37
|
+
backgroundColor: theme.palette.primary[700],
|
|
38
|
+
},
|
|
39
|
+
// NOT CHECKED HOVER
|
|
40
|
+
'& :not(.Mui-checked):hover + .MuiSwitch-track': {
|
|
41
|
+
backgroundColor: theme.palette.grey[600],
|
|
42
|
+
},
|
|
40
43
|
},
|
|
41
44
|
// DISABLED TRACK
|
|
42
45
|
'& .MuiButtonBase-root.MuiSwitch-switchBase.Mui-disabled': {
|
|
@@ -58,8 +61,10 @@ export const MuiSwitch = {
|
|
|
58
61
|
},
|
|
59
62
|
switchBase: {
|
|
60
63
|
padding: 0,
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
[HOVER_MEDIA]: {
|
|
65
|
+
'&:hover, &.Mui-checked:hover': {
|
|
66
|
+
backgroundColor: 'transparent',
|
|
67
|
+
},
|
|
63
68
|
},
|
|
64
69
|
},
|
|
65
70
|
track({ theme }) {
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
import { HOVER_MEDIA, HOVER_NONE_MEDIA } from '../../constants';
|
|
1
2
|
export const MuiTableRow = {
|
|
2
3
|
styleOverrides: {
|
|
3
4
|
root({ theme }) {
|
|
4
5
|
return {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
[HOVER_MEDIA]: {
|
|
7
|
+
'&.MuiTableRow-hover:hover': {
|
|
8
|
+
backgroundColor: theme.palette.background.elementHover,
|
|
9
|
+
cursor: 'pointer',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
[HOVER_NONE_MEDIA]: {
|
|
13
|
+
'&.MuiTableRow-hover:hover': {
|
|
14
|
+
backgroundColor: 'transparent',
|
|
15
|
+
},
|
|
8
16
|
},
|
|
9
17
|
'&.Mui-selected': {
|
|
10
18
|
backgroundColor: theme.palette.primary['100'],
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Title = exports.StyledTypography = exports.BodyWrapper = exports.IconWrapper = exports.Wrapper = exports.StyledIconButton = exports.StyledGrid = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
4
5
|
const Grid_1 = require("../Grid");
|
|
5
6
|
const IconButton_1 = require("../IconButton");
|
|
6
7
|
const SvgIcon_1 = require("../SvgIcon");
|
|
7
8
|
const styled_1 = require("../styled");
|
|
8
9
|
const Typography_1 = require("../Typography");
|
|
9
|
-
const
|
|
10
|
+
const constants_2 = require("./constants");
|
|
10
11
|
exports.StyledGrid = (0, styled_1.styled)(Grid_1.Grid) `
|
|
11
12
|
grid-auto-flow: column;
|
|
12
13
|
justify-content: flex-start;
|
|
@@ -23,8 +24,17 @@ exports.StyledIconButton = (0, styled_1.styled)(IconButton_1.IconButton) `
|
|
|
23
24
|
margin-top: ${({ theme }) => `calc(${theme.microSpacing(3)} + (20px - 40px) / 2)`};
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
${constants_1.HOVER_MEDIA} {
|
|
28
|
+
&:hover {
|
|
29
|
+
background-color: rgb(0 0 0 / 4%);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Переопределяем active на мобильных устройствах для сохранения исходной стилизации */
|
|
34
|
+
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
35
|
+
&:active {
|
|
36
|
+
background-color: rgb(0 0 0 / 4%);
|
|
37
|
+
}
|
|
28
38
|
}
|
|
29
39
|
`;
|
|
30
40
|
exports.Wrapper = styled_1.styled.div `
|
|
@@ -36,38 +46,38 @@ exports.Wrapper = styled_1.styled.div `
|
|
|
36
46
|
border: 1px solid transparent;
|
|
37
47
|
border-radius: ${({ theme }) => theme.shape.medium};
|
|
38
48
|
|
|
39
|
-
&.${
|
|
49
|
+
&.${constants_2.alertClassnames.severityInfo} {
|
|
40
50
|
background-color: ${({ theme }) => theme.palette.primary[100]};
|
|
41
51
|
border-color: ${({ theme }) => theme.palette.primary[300]};
|
|
42
52
|
|
|
43
|
-
.${
|
|
53
|
+
.${constants_2.alertClassnames.iconWrapper} {
|
|
44
54
|
color: ${({ theme }) => theme.palette.primary[800]};
|
|
45
55
|
}
|
|
46
56
|
}
|
|
47
57
|
|
|
48
|
-
&.${
|
|
58
|
+
&.${constants_2.alertClassnames.severitySuccess} {
|
|
49
59
|
background-color: ${({ theme }) => theme.palette.success[100]};
|
|
50
60
|
border-color: ${({ theme }) => theme.palette.success[300]};
|
|
51
61
|
|
|
52
|
-
.${
|
|
62
|
+
.${constants_2.alertClassnames.iconWrapper} {
|
|
53
63
|
color: ${({ theme }) => theme.palette.success[800]};
|
|
54
64
|
}
|
|
55
65
|
}
|
|
56
66
|
|
|
57
|
-
&.${
|
|
67
|
+
&.${constants_2.alertClassnames.severityError} {
|
|
58
68
|
background-color: ${({ theme }) => theme.palette.error[100]};
|
|
59
69
|
border-color: ${({ theme }) => theme.palette.error[300]};
|
|
60
70
|
|
|
61
|
-
.${
|
|
71
|
+
.${constants_2.alertClassnames.iconWrapper} {
|
|
62
72
|
color: ${({ theme }) => theme.palette.error[800]};
|
|
63
73
|
}
|
|
64
74
|
}
|
|
65
75
|
|
|
66
|
-
&.${
|
|
76
|
+
&.${constants_2.alertClassnames.severityWarning} {
|
|
67
77
|
background-color: ${({ theme }) => theme.palette.warning[100]};
|
|
68
78
|
border-color: ${({ theme }) => theme.palette.warning[300]};
|
|
69
79
|
|
|
70
|
-
.${
|
|
80
|
+
.${constants_2.alertClassnames.iconWrapper} {
|
|
71
81
|
color: ${({ theme }) => theme.palette.warning[800]};
|
|
72
82
|
}
|
|
73
83
|
}
|
|
@@ -102,15 +112,15 @@ exports.BodyWrapper = styled_1.styled.div `
|
|
|
102
112
|
min-width: 0;
|
|
103
113
|
margin-block: ${({ theme }) => theme.microSpacing(3)};
|
|
104
114
|
|
|
105
|
-
.${
|
|
115
|
+
.${constants_2.alertClassnames.hasCloseButton} & {
|
|
106
116
|
margin-right: ${({ theme }) => theme.spacing(1)};
|
|
107
117
|
}
|
|
108
118
|
|
|
109
|
-
& > .${
|
|
119
|
+
& > .${constants_2.alertClassnames.title} + .${constants_2.alertClassnames.content} {
|
|
110
120
|
margin-top: ${({ theme }) => theme.spacing(1)};
|
|
111
121
|
}
|
|
112
122
|
|
|
113
|
-
& > .${
|
|
123
|
+
& > .${constants_2.alertClassnames.actions} {
|
|
114
124
|
margin-top: ${({ theme }) => theme.spacing(2)};
|
|
115
125
|
}
|
|
116
126
|
`;
|
|
@@ -28,10 +28,11 @@ const Autocomplete_1 = __importStar(require("@mui/material/Autocomplete"));
|
|
|
28
28
|
const FormControl_1 = require("@mui/material/FormControl");
|
|
29
29
|
const IconButton_1 = require("@mui/material/IconButton");
|
|
30
30
|
const InputBase_1 = require("@mui/material/InputBase");
|
|
31
|
+
const constants_1 = require("../constants");
|
|
31
32
|
const MenuItem_1 = require("../MenuItem");
|
|
32
33
|
const SvgIcon_1 = require("../SvgIcon");
|
|
33
34
|
const styled_1 = require("../styled");
|
|
34
|
-
const
|
|
35
|
+
const constants_2 = require("./constants");
|
|
35
36
|
exports.StyledMenuItem = (0, styled_1.styled)(MenuItem_1.MenuItem) `
|
|
36
37
|
max-height: ${({ theme }) => theme.spacing(13)};
|
|
37
38
|
|
|
@@ -48,16 +49,18 @@ exports.StyledAutocomplete = (0, styled_1.styled)(Autocomplete_1.default) `
|
|
|
48
49
|
}`);
|
|
49
50
|
}}
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
${constants_1.HOVER_MEDIA} {
|
|
53
|
+
& .${Autocomplete_1.autocompleteClasses.endAdornment} .${IconButton_1.iconButtonClasses.root}:hover {
|
|
54
|
+
background-color: ${({ loading, theme }) => (loading ? 'transparent' : theme.palette.grey[100])};
|
|
55
|
+
}
|
|
53
56
|
}
|
|
54
57
|
|
|
55
|
-
&:not(.${
|
|
58
|
+
&:not(.${constants_2.autocompleteClassnames.emptyValue}) .${InputBase_1.inputBaseClasses.root} {
|
|
56
59
|
gap: ${({ theme }) => theme.spacing(3)};
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
& .${Autocomplete_1.autocompleteClasses.inputRoot} .${InputBase_1.inputBaseClasses.input} {
|
|
60
|
-
min-width: ${
|
|
63
|
+
min-width: ${constants_2.INPUT_MIN_WIDTH}px;
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
& .${Autocomplete_1.autocompleteClasses.inputRoot} {
|
|
@@ -7,6 +7,7 @@ exports.StyledBreadcrumbs = void 0;
|
|
|
7
7
|
const Breadcrumbs_1 = __importDefault(require("@mui/material/Breadcrumbs"));
|
|
8
8
|
const ButtonBase_1 = require("@mui/material/ButtonBase");
|
|
9
9
|
const Link_1 = require("@mui/material/Link");
|
|
10
|
+
const constants_1 = require("../constants");
|
|
10
11
|
const styled_1 = require("../styled");
|
|
11
12
|
exports.StyledBreadcrumbs = (0, styled_1.styled)(Breadcrumbs_1.default) `
|
|
12
13
|
.${ButtonBase_1.buttonBaseClasses.root} {
|
|
@@ -20,22 +21,24 @@ exports.StyledBreadcrumbs = (0, styled_1.styled)(Breadcrumbs_1.default) `
|
|
|
20
21
|
outline: 2px solid ${({ theme }) => theme.palette.components.focused};
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
${constants_1.HOVER_MEDIA} {
|
|
25
|
+
&:hover {
|
|
26
|
+
&::after {
|
|
27
|
+
content: '';
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
position: absolute;
|
|
30
|
+
bottom: 3px;
|
|
31
|
+
left: ${({ theme }) => theme.microSpacing(3)};
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
width: ${({ theme }) => theme.spacing(3)};
|
|
34
|
+
height: 1px;
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
background-color: currentColor;
|
|
37
|
+
}
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
|
-
|
|
41
|
+
|
|
39
42
|
.MuiTypography-body1 {
|
|
40
43
|
color: ${({ theme }) => theme.palette.primary[800]};
|
|
41
44
|
}
|
|
@@ -46,9 +49,11 @@ exports.StyledBreadcrumbs = (0, styled_1.styled)(Breadcrumbs_1.default) `
|
|
|
46
49
|
&:visited {
|
|
47
50
|
color: ${({ theme }) => theme.palette.grey[700]};
|
|
48
51
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
|
|
53
|
+
${constants_1.HOVER_MEDIA} {
|
|
54
|
+
&:hover {
|
|
55
|
+
color: ${({ theme }) => theme.palette.grey[800]};
|
|
56
|
+
}
|
|
52
57
|
}
|
|
53
58
|
}
|
|
54
59
|
`;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StyledTag = exports.HiddenInput = exports.Wrapper = void 0;
|
|
4
4
|
const Badge_1 = require("@mui/material/Badge");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
5
6
|
const styled_1 = require("../styled");
|
|
6
7
|
const Tag_1 = require("../Tag");
|
|
7
8
|
const getHoverBgColor = ({ theme, color, isChecked, variant, disabled, }) => {
|
|
@@ -118,21 +119,23 @@ exports.StyledTag = (0, styled_1.styled)(Tag_1.Tag, {
|
|
|
118
119
|
cursor: pointer;
|
|
119
120
|
}
|
|
120
121
|
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
${constants_1.HOVER_MEDIA} {
|
|
123
|
+
&:hover {
|
|
124
|
+
background-color: ${({ theme, color, variant, disabled, $isChecked }) => getHoverBgColor({
|
|
123
125
|
theme,
|
|
124
126
|
color,
|
|
125
127
|
variant,
|
|
126
128
|
disabled,
|
|
127
129
|
isChecked: $isChecked,
|
|
128
130
|
})};
|
|
129
|
-
|
|
131
|
+
border: ${({ theme, variant, $isChecked, color }) => getBorder({
|
|
130
132
|
theme,
|
|
131
133
|
variant,
|
|
132
134
|
isChecked: $isChecked,
|
|
133
135
|
tagState: 'hover',
|
|
134
136
|
color,
|
|
135
137
|
})};
|
|
138
|
+
}
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
&:active {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IconWrapper = exports.Input = exports.Wrapper = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
4
5
|
const styled_1 = require("../styled");
|
|
5
6
|
const mixins_1 = require("../styled/mixins");
|
|
6
|
-
const
|
|
7
|
+
const constants_2 = require("./constants");
|
|
7
8
|
const getOutlineColor = ({ theme, isHover, isDisabled, isError, isChecked, isIndeterminate, }) => {
|
|
8
9
|
if (isDisabled) {
|
|
9
10
|
return theme.palette.components.border.default;
|
|
@@ -24,17 +25,17 @@ exports.Wrapper = (0, styled_1.styled)('span', {
|
|
|
24
25
|
display: flex;
|
|
25
26
|
justify-content: center;
|
|
26
27
|
|
|
27
|
-
.${
|
|
28
|
+
.${constants_2.checkboxClassnames.icon} {
|
|
28
29
|
fill: ${({ $isDisabled, theme }) => $isDisabled && theme.palette.components.disabled};
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
.${
|
|
32
|
+
.${constants_2.checkboxClassnames.symbol} {
|
|
32
33
|
fill: ${({ $isDisabled, theme }) => $isDisabled ? theme.palette.grey[500] : 'white'};
|
|
33
34
|
|
|
34
35
|
${mixins_1.easeOutBackTransition};
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
.${
|
|
38
|
+
.${constants_2.checkboxClassnames.outline} {
|
|
38
39
|
fill: ${({ $isDisabled, $isChecked, $isIndeterminate }) => !$isDisabled && !$isChecked && !$isIndeterminate && 'white'};
|
|
39
40
|
stroke: ${({ theme, $isDisabled, $isError, $isChecked, $isIndeterminate, }) => getOutlineColor({
|
|
40
41
|
theme,
|
|
@@ -48,31 +49,32 @@ exports.Wrapper = (0, styled_1.styled)('span', {
|
|
|
48
49
|
${mixins_1.easeOutBackTransition};
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
.${
|
|
52
|
+
.${constants_2.checkboxClassnames.iconChecked} {
|
|
52
53
|
transform-origin: bottom;
|
|
53
54
|
transform: ${({ $isChecked, $isIndeterminate }) => $isChecked && !$isIndeterminate ? 'scale(1)' : 'scale(0)'};
|
|
54
55
|
|
|
55
56
|
opacity: ${({ $isChecked, $isIndeterminate }) => $isChecked && !$isIndeterminate ? 1 : 0};
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
.${
|
|
59
|
+
.${constants_2.checkboxClassnames.iconIndeterminate} {
|
|
59
60
|
transform-origin: bottom;
|
|
60
61
|
transform: ${({ $isIndeterminate }) => $isIndeterminate ? 'scale(1)' : 'scale(0)'};
|
|
61
62
|
|
|
62
63
|
opacity: ${({ $isIndeterminate }) => ($isIndeterminate ? 1 : 0)};
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
${constants_1.HOVER_MEDIA} {
|
|
67
|
+
&:hover {
|
|
68
|
+
.${constants_2.checkboxClassnames.icon} {
|
|
69
|
+
color: ${({ $isError, theme }) => $isError ? theme.palette.error[700] : theme.palette.primary[700]};
|
|
70
|
+
}
|
|
69
71
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
.${constants_2.checkboxClassnames.outline} {
|
|
73
|
+
fill: ${({ theme, $isDisabled, $isChecked, $isIndeterminate }) => !$isDisabled &&
|
|
72
74
|
!$isChecked &&
|
|
73
75
|
!$isIndeterminate &&
|
|
74
76
|
theme.palette.background.elementHover};
|
|
75
|
-
|
|
77
|
+
stroke: ${({ theme, $isDisabled, $isError, $isChecked, $isIndeterminate, }) => getOutlineColor({
|
|
76
78
|
theme,
|
|
77
79
|
isHover: true,
|
|
78
80
|
isDisabled: $isDisabled,
|
|
@@ -80,6 +82,7 @@ exports.Wrapper = (0, styled_1.styled)('span', {
|
|
|
80
82
|
isChecked: $isChecked,
|
|
81
83
|
isIndeterminate: $isIndeterminate,
|
|
82
84
|
})};
|
|
85
|
+
}
|
|
83
86
|
}
|
|
84
87
|
}
|
|
85
88
|
`;
|
|
@@ -88,19 +91,19 @@ exports.Input = styled_1.styled.input `
|
|
|
88
91
|
|
|
89
92
|
position: absolute;
|
|
90
93
|
|
|
91
|
-
width: ${
|
|
92
|
-
height: ${
|
|
94
|
+
width: ${constants_2.CHECKBOX_SIZE};
|
|
95
|
+
height: ${constants_2.CHECKBOX_SIZE};
|
|
93
96
|
margin: 0;
|
|
94
97
|
|
|
95
98
|
opacity: 0;
|
|
96
99
|
|
|
97
100
|
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
98
|
-
width: ${
|
|
99
|
-
height: ${
|
|
101
|
+
width: ${constants_2.MOBILE_CHECKBOX_SIZE};
|
|
102
|
+
height: ${constants_2.MOBILE_CHECKBOX_SIZE};
|
|
100
103
|
}
|
|
101
104
|
|
|
102
105
|
&:focus-visible {
|
|
103
|
-
~ .${
|
|
106
|
+
~ .${constants_2.checkboxClassnames.iconWrapper} > .${constants_2.checkboxClassnames.icon} {
|
|
104
107
|
border-radius: ${({ theme }) => theme.shape.small};
|
|
105
108
|
outline: 2px solid ${({ theme }) => theme.palette.components.focused};
|
|
106
109
|
outline-offset: -2px;
|
|
@@ -112,14 +115,14 @@ exports.IconWrapper = styled_1.styled.span `
|
|
|
112
115
|
align-items: center;
|
|
113
116
|
justify-content: center;
|
|
114
117
|
|
|
115
|
-
width: ${
|
|
116
|
-
height: ${
|
|
118
|
+
width: ${constants_2.CHECKBOX_SIZE};
|
|
119
|
+
height: ${constants_2.CHECKBOX_SIZE};
|
|
117
120
|
|
|
118
121
|
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
119
|
-
width: ${
|
|
120
|
-
height: ${
|
|
122
|
+
width: ${constants_2.MOBILE_CHECKBOX_SIZE};
|
|
123
|
+
height: ${constants_2.MOBILE_CHECKBOX_SIZE};
|
|
121
124
|
|
|
122
|
-
.${
|
|
125
|
+
.${constants_2.checkboxClassnames.icon} {
|
|
123
126
|
width: 20px;
|
|
124
127
|
height: 20px;
|
|
125
128
|
}
|
|
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Label = exports.AdornmentWrapper = exports.StyledCounter = exports.HiddenInput = exports.Wrapper = void 0;
|
|
4
4
|
const Badge_1 = require("@mui/material/Badge");
|
|
5
5
|
const Counter_1 = require("../Counter");
|
|
6
|
+
const constants_1 = require("../constants");
|
|
6
7
|
const styled_1 = require("../styled");
|
|
7
8
|
const Typography_1 = require("../Typography");
|
|
8
|
-
const
|
|
9
|
+
const constants_2 = require("./constants");
|
|
9
10
|
exports.Wrapper = styled_1.styled.div `
|
|
10
11
|
cursor: pointer;
|
|
11
12
|
user-select: none;
|
|
@@ -24,9 +25,11 @@ exports.Wrapper = styled_1.styled.div `
|
|
|
24
25
|
duration: theme.transitions.duration.shortest,
|
|
25
26
|
})};
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
${constants_1.HOVER_MEDIA} {
|
|
29
|
+
&:hover {
|
|
30
|
+
background-color: ${({ theme }) => theme.palette.background.elementHover};
|
|
31
|
+
border-color: ${({ theme }) => theme.palette.grey[400]};
|
|
32
|
+
}
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
&:active {
|
|
@@ -34,63 +37,65 @@ exports.Wrapper = styled_1.styled.div `
|
|
|
34
37
|
border-color: ${({ theme }) => theme.palette.grey[800]};
|
|
35
38
|
}
|
|
36
39
|
|
|
37
|
-
&.${
|
|
38
|
-
&.${
|
|
39
|
-
&.${
|
|
40
|
+
&.${constants_2.chipClassnames.hasIcon},
|
|
41
|
+
&.${constants_2.chipClassnames.hasEndAdornment}:not(.${constants_2.chipClassnames.hasStatusIcon}),
|
|
42
|
+
&.${constants_2.chipClassnames.hasCounter}:not(.${constants_2.chipClassnames.hasStatusIcon}) {
|
|
40
43
|
gap: ${({ theme }) => theme.spacing(1)};
|
|
41
44
|
}
|
|
42
45
|
|
|
43
|
-
&.${
|
|
44
|
-
& .${
|
|
46
|
+
&.${constants_2.chipClassnames.hasStatusIcon} {
|
|
47
|
+
& .${constants_2.chipClassnames.label} {
|
|
45
48
|
margin-left: ${({ theme }) => theme.microSpacing(1)};
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
&.${
|
|
49
|
-
&.${
|
|
51
|
+
&.${constants_2.chipClassnames.hasCounter} .${constants_2.chipClassnames.label},
|
|
52
|
+
&.${constants_2.chipClassnames.hasEndAdornment} .${constants_2.chipClassnames.label} {
|
|
50
53
|
margin-right: ${({ theme }) => theme.spacing(1)};
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
|
|
54
|
-
&.${
|
|
57
|
+
&.${constants_2.chipClassnames.hasStatusIcon} {
|
|
55
58
|
padding-left: ${({ theme }) => theme.microSpacing(1)};
|
|
56
59
|
}
|
|
57
60
|
|
|
58
|
-
&.${
|
|
59
|
-
height: ${
|
|
61
|
+
&.${constants_2.chipClassnames.sizeSmall} {
|
|
62
|
+
height: ${constants_2.chipSize.small.desktop};
|
|
60
63
|
|
|
61
64
|
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
62
|
-
height: ${
|
|
65
|
+
height: ${constants_2.chipSize.small.mobile};
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
68
|
|
|
66
|
-
&.${
|
|
67
|
-
height: ${
|
|
69
|
+
&.${constants_2.chipClassnames.sizeMedium} {
|
|
70
|
+
height: ${constants_2.chipSize.medium.desktop};
|
|
68
71
|
|
|
69
72
|
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
70
|
-
height: ${
|
|
73
|
+
height: ${constants_2.chipSize.medium.mobile};
|
|
71
74
|
}
|
|
72
75
|
}
|
|
73
76
|
|
|
74
|
-
&.${
|
|
75
|
-
height: ${
|
|
77
|
+
&.${constants_2.chipClassnames.sizeLarge} {
|
|
78
|
+
height: ${constants_2.chipSize.large.desktop};
|
|
76
79
|
padding: ${({ theme }) => theme.spacing(0, 3)};
|
|
77
80
|
|
|
78
|
-
&.${
|
|
81
|
+
&.${constants_2.chipClassnames.hasStatusIcon} {
|
|
79
82
|
padding-left: ${({ theme }) => theme.spacing(2)};
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
83
|
-
height: ${
|
|
86
|
+
height: ${constants_2.chipSize.large.mobile};
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
89
|
|
|
87
|
-
&.${
|
|
90
|
+
&.${constants_2.chipClassnames.selected} {
|
|
88
91
|
background-color: ${({ theme }) => theme.palette.grey[100]};
|
|
89
92
|
border-color: ${({ theme }) => theme.palette.grey[800]};
|
|
90
93
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
${constants_1.HOVER_MEDIA} {
|
|
95
|
+
&:hover {
|
|
96
|
+
background-color: ${({ theme }) => theme.palette.background.elementHover};
|
|
97
|
+
border-color: ${({ theme }) => theme.palette.grey[800]};
|
|
98
|
+
}
|
|
94
99
|
}
|
|
95
100
|
|
|
96
101
|
&:active {
|
|
@@ -99,7 +104,7 @@ exports.Wrapper = styled_1.styled.div `
|
|
|
99
104
|
}
|
|
100
105
|
}
|
|
101
106
|
|
|
102
|
-
&.${
|
|
107
|
+
&.${constants_2.chipClassnames.disabled} {
|
|
103
108
|
cursor: default;
|
|
104
109
|
|
|
105
110
|
background-color: ${({ theme }) => theme.palette.components.disabled};
|
|
@@ -107,9 +112,9 @@ exports.Wrapper = styled_1.styled.div `
|
|
|
107
112
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
108
113
|
mix-blend-mode: luminosity;
|
|
109
114
|
|
|
110
|
-
& .${
|
|
111
|
-
& .${
|
|
112
|
-
& .${
|
|
115
|
+
& .${constants_2.chipClassnames.startAdornment},
|
|
116
|
+
& .${constants_2.chipClassnames.endAdornment},
|
|
117
|
+
& .${constants_2.chipClassnames.label} {
|
|
113
118
|
opacity: 0.3;
|
|
114
119
|
}
|
|
115
120
|
}
|
|
@@ -162,7 +167,7 @@ exports.Label = styled_1.styled.label `
|
|
|
162
167
|
|
|
163
168
|
/* Причина игнора: Не критично для отображения */
|
|
164
169
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
165
|
-
&:has(> input:focus-visible) .${
|
|
170
|
+
&:has(> input:focus-visible) .${constants_2.chipClassnames.root} {
|
|
166
171
|
outline: 2px solid ${({ theme }) => theme.palette.components.focused};
|
|
167
172
|
outline-offset: 2px;
|
|
168
173
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StyledHelperText = exports.FieldLabel = exports.Digit = exports.DigitsItem = exports.DigitsWrapper = exports.Wrapper = void 0;
|
|
4
|
+
const constants_1 = require("../constants");
|
|
4
5
|
const FormHelperText_1 = require("../FormHelperText");
|
|
5
6
|
const styled_1 = require("../styled");
|
|
6
7
|
const Typography_1 = require("../Typography");
|
|
@@ -51,10 +52,12 @@ exports.Digit = styled_1.styled.input `
|
|
|
51
52
|
border-radius: ${({ theme }) => theme.shape.medium};
|
|
52
53
|
outline: none;
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
${constants_1.HOVER_MEDIA} {
|
|
56
|
+
&:hover {
|
|
57
|
+
background-color: ${({ theme, disabled }) => disabled
|
|
56
58
|
? theme.palette.components.disabled
|
|
57
59
|
: theme.palette.background.elementHover};
|
|
60
|
+
}
|
|
58
61
|
}
|
|
59
62
|
`;
|
|
60
63
|
exports.FieldLabel = (0, styled_1.styled)(Typography_1.Typography) `
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StyledCopyIcon = exports.TypographyWrapper = exports.Wrapper = void 0;
|
|
4
4
|
const CopyOutlineSm_1 = require("../../icons/CopyOutlineSm");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
5
6
|
const styled_1 = require("../styled");
|
|
6
7
|
const Typography_1 = require("../Typography");
|
|
7
|
-
const
|
|
8
|
+
const constants_2 = require("./constants");
|
|
8
9
|
exports.Wrapper = (0, styled_1.styled)(Typography_1.Typography) `
|
|
9
10
|
cursor: pointer;
|
|
10
11
|
|
|
@@ -12,19 +13,27 @@ exports.Wrapper = (0, styled_1.styled)(Typography_1.Typography) `
|
|
|
12
13
|
display: flex;
|
|
13
14
|
flex-wrap: nowrap;
|
|
14
15
|
align-items: center;
|
|
16
|
+
|
|
17
|
+
${constants_1.HOVER_MEDIA} {
|
|
18
|
+
&:hover {
|
|
19
|
+
text-decoration: underline;
|
|
20
|
+
|
|
21
|
+
.${constants_2.copyTypographyClassnames.showIconOnHover} {
|
|
22
|
+
display: unset;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
15
26
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.${constants_1.copyTypographyClassnames.showIconOnHover} {
|
|
20
|
-
display: unset;
|
|
27
|
+
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
28
|
+
&:active {
|
|
29
|
+
text-decoration: underline;
|
|
21
30
|
}
|
|
22
31
|
}
|
|
23
32
|
`;
|
|
24
33
|
exports.TypographyWrapper = styled_1.styled.div `
|
|
25
34
|
overflow: hidden;
|
|
26
35
|
|
|
27
|
-
&.${
|
|
36
|
+
&.${constants_2.copyTypographyClassnames.overflow} {
|
|
28
37
|
text-overflow: ellipsis;
|
|
29
38
|
white-space: nowrap;
|
|
30
39
|
}
|
|
@@ -35,7 +44,12 @@ exports.StyledCopyIcon = (0, styled_1.styled)(CopyOutlineSm_1.CopyOutlineSm, {
|
|
|
35
44
|
margin-right: ${({ $copyPosition, theme }) => $copyPosition === 'left' ? theme.spacing(1) : ''};
|
|
36
45
|
margin-left: ${({ $copyPosition, theme }) => $copyPosition === 'right' ? theme.spacing(1) : ''};
|
|
37
46
|
|
|
38
|
-
&.${
|
|
47
|
+
&.${constants_2.copyTypographyClassnames.showIconOnHover} {
|
|
39
48
|
display: none;
|
|
49
|
+
|
|
50
|
+
/* На тач-устройствах иконка копирования недостижима наведением — показываем постоянно */
|
|
51
|
+
${constants_1.HOVER_NONE_MEDIA} {
|
|
52
|
+
display: unset;
|
|
53
|
+
}
|
|
40
54
|
}
|
|
41
55
|
`;
|