@astral/ui 4.101.0 → 4.103.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/Dialog/Dialog.d.ts +1 -1
- package/components/Dialog/Dialog.js +5 -4
- package/components/Dialog/styles.js +8 -0
- package/components/Dialog/types.d.ts +5 -0
- package/components/Dialog/useLogic/useLogic.d.ts +3 -3
- package/components/Dialog/useLogic/useLogic.js +6 -2
- package/components/ExpansionPanel/Summary/styles.js +5 -2
- package/components/Fab/styles.js +12 -3
- package/components/HintPopover/styles.js +2 -1
- 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/NewPopover/NewPopover.js +1 -0
- package/components/NewPopover/constants.d.ts +5 -0
- package/components/NewPopover/constants.js +6 -1
- package/components/NewPopover/styles.js +2 -1
- package/components/NewPopover/types.d.ts +1 -1
- package/components/NewPopover/useLogic/useLogic.d.ts +2 -2
- package/components/NewPopover/useLogic/useLogic.js +12 -12
- package/components/NewPopover/useLogic/utils/getFallbackPlacements/getFallbackPlacements.d.ts +7 -0
- package/components/NewPopover/useLogic/utils/getFallbackPlacements/getFallbackPlacements.js +19 -0
- package/components/NewPopover/useLogic/utils/getFallbackPlacements/index.d.ts +1 -0
- package/components/NewPopover/useLogic/utils/getFallbackPlacements/index.js +1 -0
- package/components/NewPopover/useLogic/utils/index.d.ts +4 -0
- package/components/NewPopover/useLogic/utils/index.js +4 -0
- package/components/NewStepper/Step/styles.js +18 -15
- package/components/Notification/NotificationStackContainer/styles.js +5 -2
- package/components/Onboarding/types/step.d.ts +1 -1
- package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.d.ts +1 -1
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.js +1 -1
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.d.ts +1 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/constants.d.ts +6 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/constants.js +6 -0
- package/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.js +34 -12
- 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/hook-form/FormFilters/FormFiltersDialog/styles.d.ts +1 -0
- 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/Dialog/Dialog.d.ts +1 -1
- package/node/components/Dialog/Dialog.js +5 -4
- package/node/components/Dialog/styles.js +8 -0
- package/node/components/Dialog/types.d.ts +5 -0
- package/node/components/Dialog/useLogic/useLogic.d.ts +3 -3
- package/node/components/Dialog/useLogic/useLogic.js +6 -2
- package/node/components/ExpansionPanel/Summary/styles.js +5 -2
- package/node/components/Fab/styles.js +12 -3
- package/node/components/HintPopover/styles.js +2 -1
- 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/NewPopover/NewPopover.js +1 -0
- package/node/components/NewPopover/constants.d.ts +5 -0
- package/node/components/NewPopover/constants.js +7 -2
- package/node/components/NewPopover/styles.js +1 -0
- package/node/components/NewPopover/types.d.ts +1 -1
- package/node/components/NewPopover/useLogic/useLogic.d.ts +2 -2
- package/node/components/NewPopover/useLogic/useLogic.js +15 -15
- package/node/components/NewPopover/useLogic/utils/getFallbackPlacements/getFallbackPlacements.d.ts +7 -0
- package/node/components/NewPopover/useLogic/utils/getFallbackPlacements/getFallbackPlacements.js +23 -0
- package/node/components/NewPopover/useLogic/utils/getFallbackPlacements/index.d.ts +1 -0
- package/node/components/NewPopover/useLogic/utils/getFallbackPlacements/index.js +17 -0
- package/node/components/NewPopover/useLogic/utils/index.d.ts +4 -0
- package/node/components/NewPopover/useLogic/utils/index.js +20 -0
- package/node/components/NewStepper/Step/styles.js +68 -65
- package/node/components/Notification/NotificationStackContainer/styles.js +57 -54
- package/node/components/Onboarding/types/step.d.ts +1 -1
- package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.d.ts +1 -1
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.js +1 -1
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.d.ts +1 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/constants.d.ts +6 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/constants.js +9 -0
- package/node/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.js +34 -12
- 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/node/hook-form/FormFilters/FormFiltersDialog/styles.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buttonClasses } from '@mui/material/Button';
|
|
2
|
+
import { HOVER_MEDIA } from '../../constants';
|
|
2
3
|
import { styled } from '../../styled';
|
|
3
4
|
import { StaticCalendarButton } from '../StaticCalendarButton';
|
|
4
5
|
import { getBgColor, getLeftBorderRadius, getRightBorderRadius, getTextColor, } from './utils';
|
|
@@ -53,11 +54,13 @@ export const StaticCalendarGridButton = styled(StaticCalendarButton, {
|
|
|
53
54
|
background-color: currentColor;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
${HOVER_MEDIA} {
|
|
58
|
+
&:hover {
|
|
59
|
+
border-radius: ${(props) => getLeftBorderRadius({ isHovered: true, ...props })}
|
|
60
|
+
${(props) => getRightBorderRadius({ isHovered: true, ...props })}
|
|
61
|
+
${(props) => getRightBorderRadius({ isHovered: true, ...props })}
|
|
62
|
+
${(props) => getLeftBorderRadius({ isHovered: true, ...props })};
|
|
63
|
+
}
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
&,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Tab from '@mui/material/Tab';
|
|
2
|
+
import { HOVER_MEDIA } from '../../constants';
|
|
2
3
|
import { styled } from '../../styled';
|
|
3
4
|
export const StyledTab = styled(Tab) `
|
|
4
5
|
min-height: 36px;
|
|
@@ -13,8 +14,10 @@ export const StyledTab = styled(Tab) `
|
|
|
13
14
|
margin-right: 0;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
${HOVER_MEDIA} {
|
|
18
|
+
&:hover {
|
|
19
|
+
color: ${({ theme }) => theme.palette.primary[800]};
|
|
20
|
+
}
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
&:active {
|
|
@@ -2,6 +2,7 @@ import { buttonBaseClasses } from '@mui/material/ButtonBase';
|
|
|
2
2
|
import MuiToggleButton, { toggleButtonClasses, } from '@mui/material/ToggleButton';
|
|
3
3
|
import { toggleButtonGroupClasses } from '@mui/material/ToggleButtonGroup';
|
|
4
4
|
import { buttonClasses } from '../Button';
|
|
5
|
+
import { HOVER_MEDIA, HOVER_NONE_MEDIA } from '../constants';
|
|
5
6
|
import { css, styled } from '../styled';
|
|
6
7
|
import { SIZES } from './constants';
|
|
7
8
|
const getSize = (size) => {
|
|
@@ -64,23 +65,33 @@ export const StyledToggleButton = styled(MuiToggleButton, {
|
|
|
64
65
|
|
|
65
66
|
${({ theme, $color, disabled, $variant }) => toggleButtonColorStyle({ theme, color: $color, disabled, variant: $variant })}
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
${HOVER_MEDIA} {
|
|
69
|
+
&:hover {
|
|
70
|
+
${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, disabled, state: 'hover' })};
|
|
71
|
+
}
|
|
69
72
|
}
|
|
70
|
-
|
|
73
|
+
|
|
71
74
|
&:active {
|
|
72
75
|
z-index: 3;
|
|
73
76
|
|
|
74
77
|
${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, disabled, state: 'active' })};
|
|
75
78
|
}
|
|
76
|
-
|
|
79
|
+
|
|
77
80
|
&.${toggleButtonClasses.selected} {
|
|
78
81
|
z-index: 2;
|
|
79
82
|
|
|
80
83
|
${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, disabled, selected: true })}
|
|
81
84
|
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
${HOVER_MEDIA} {
|
|
86
|
+
&:hover {
|
|
87
|
+
${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, selected: true, disabled, state: 'hover' })};
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
${HOVER_NONE_MEDIA} {
|
|
92
|
+
&:hover {
|
|
93
|
+
${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, selected: true, disabled, state: 'default' })};
|
|
94
|
+
}
|
|
84
95
|
}
|
|
85
96
|
|
|
86
97
|
&:active {
|
|
@@ -97,8 +108,10 @@ export const StyledToggleButton = styled(MuiToggleButton, {
|
|
|
97
108
|
&.${buttonBaseClasses.root}.${toggleButtonGroupClasses.grouped}:not(:first-of-type) {
|
|
98
109
|
border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color })};
|
|
99
110
|
|
|
100
|
-
|
|
101
|
-
|
|
111
|
+
${HOVER_MEDIA} {
|
|
112
|
+
&:hover {
|
|
113
|
+
border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color, state: 'hover' })};
|
|
114
|
+
}
|
|
102
115
|
}
|
|
103
116
|
|
|
104
117
|
&:active {
|
|
@@ -108,13 +121,15 @@ export const StyledToggleButton = styled(MuiToggleButton, {
|
|
|
108
121
|
&.${toggleButtonClasses.selected} {
|
|
109
122
|
border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color, isSelected: true })};
|
|
110
123
|
|
|
111
|
-
|
|
112
|
-
|
|
124
|
+
${HOVER_MEDIA} {
|
|
125
|
+
&:hover {
|
|
126
|
+
border-left-color: ${({ theme, $color }) => getBorderColor({
|
|
113
127
|
theme,
|
|
114
128
|
color: $color,
|
|
115
129
|
isSelected: true,
|
|
116
130
|
state: 'hover',
|
|
117
131
|
})};
|
|
132
|
+
}
|
|
118
133
|
}
|
|
119
134
|
|
|
120
135
|
&:active {
|
|
@@ -106,10 +106,10 @@ export const BackButton = styled(IconButton) `
|
|
|
106
106
|
width: ${COLLAPSE_BUTTON_WIDTH};
|
|
107
107
|
height: ${COLLAPSE_BUTTON_WIDTH};
|
|
108
108
|
}
|
|
109
|
-
|
|
110
|
-
&:
|
|
109
|
+
|
|
110
|
+
&:active {
|
|
111
111
|
background-color: transparent;
|
|
112
|
-
}
|
|
112
|
+
}
|
|
113
113
|
}
|
|
114
114
|
`;
|
|
115
115
|
export const ParentContent = styled.div `
|
|
@@ -2,6 +2,7 @@ import { typographyClasses } from '@mui/material/Typography';
|
|
|
2
2
|
import { ChevronROutlineMd } from '../../../icons/ChevronROutlineMd';
|
|
3
3
|
import { buttonClasses } from '../../Button';
|
|
4
4
|
import { Collapse } from '../../Collapse';
|
|
5
|
+
import { HOVER_MEDIA } from '../../constants';
|
|
5
6
|
import { descriptionClassnames } from '../../Description';
|
|
6
7
|
import { IconButton } from '../../IconButton';
|
|
7
8
|
import { OverflowTypography } from '../../OverflowTypography';
|
|
@@ -66,14 +67,22 @@ export const ItemContent = styled('div') `
|
|
|
66
67
|
duration: theme.transitions.duration.shortest,
|
|
67
68
|
})};
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
${HOVER_MEDIA} {
|
|
71
|
+
&:hover {
|
|
72
|
+
background-color: ${({ theme }) => theme.palette.background.elementHover};
|
|
73
|
+
}
|
|
71
74
|
}
|
|
72
75
|
|
|
73
76
|
&.${treeClassnames.selected} {
|
|
74
77
|
background-color: ${({ theme }) => theme.palette.primary[100]};
|
|
75
78
|
|
|
76
|
-
|
|
79
|
+
${HOVER_MEDIA} {
|
|
80
|
+
&:hover {
|
|
81
|
+
background-color: ${({ theme }) => theme.palette.primary[100]};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:focus {
|
|
77
86
|
background-color: ${({ theme }) => theme.palette.primary[100]};
|
|
78
87
|
}
|
|
79
88
|
}
|
|
@@ -83,7 +92,13 @@ export const ItemContent = styled('div') `
|
|
|
83
92
|
|
|
84
93
|
color: ${({ theme }) => theme.palette.text.disabled};
|
|
85
94
|
|
|
86
|
-
|
|
95
|
+
${HOVER_MEDIA} {
|
|
96
|
+
&:hover {
|
|
97
|
+
background-color: transparent;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&:focus {
|
|
87
102
|
background-color: transparent;
|
|
88
103
|
}
|
|
89
104
|
}
|
|
@@ -137,8 +152,10 @@ export const CollapseButton = styled(IconButton) `
|
|
|
137
152
|
height: ${COLLAPSE_BUTTON_WIDTH};
|
|
138
153
|
}
|
|
139
154
|
|
|
140
|
-
|
|
141
|
-
|
|
155
|
+
${HOVER_MEDIA} {
|
|
156
|
+
&:hover {
|
|
157
|
+
background-color: ${({ theme }) => theme.palette.grey[300]};
|
|
158
|
+
}
|
|
142
159
|
}
|
|
143
160
|
|
|
144
161
|
&.${treeClassnames.open} .${svgIconClassnames.root} {
|
|
@@ -167,10 +184,6 @@ export const CollapseButton = styled(IconButton) `
|
|
|
167
184
|
width: ${MOBILE_COLLAPSE_BUTTON_WIDTH};
|
|
168
185
|
height: auto;
|
|
169
186
|
}
|
|
170
|
-
|
|
171
|
-
&:hover {
|
|
172
|
-
background-color: transparent;
|
|
173
|
-
}
|
|
174
187
|
}
|
|
175
188
|
`;
|
|
176
189
|
export const ChevronIcon = styled(ChevronROutlineMd) `
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Медиа-выражение проверяющее что устройство поддерживает hover и является точным указателем
|
|
3
|
+
*/
|
|
4
|
+
export declare const HOVER_MEDIA = "@media (hover: hover) and (pointer: fine)";
|
|
5
|
+
/**
|
|
6
|
+
* Медиа-выражение проверяющее что устройство не поддерживает hover
|
|
7
|
+
*/
|
|
8
|
+
export declare const HOVER_NONE_MEDIA = "@media (hover: none)";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Медиа-выражение проверяющее что устройство поддерживает hover и является точным указателем
|
|
3
|
+
*/
|
|
4
|
+
export const HOVER_MEDIA = '@media (hover: hover) and (pointer: fine)';
|
|
5
|
+
/**
|
|
6
|
+
* Медиа-выражение проверяющее что устройство не поддерживает hover
|
|
7
|
+
*/
|
|
8
|
+
export const HOVER_NONE_MEDIA = '@media (hover: none)';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { buttonClasses } from '@mui/material/Button';
|
|
2
2
|
import { ButtonSizes, ButtonStates, ButtonVariants, buttonClassnames, } from '../../Button';
|
|
3
|
+
import { HOVER_MEDIA, HOVER_NONE_MEDIA } from '../../constants';
|
|
3
4
|
import { svgIconClassnames } from '../../SvgIcon';
|
|
4
5
|
/**
|
|
5
6
|
* Вспомогательная утилита для получения значения из values
|
|
@@ -366,29 +367,51 @@ export const MuiButton = {
|
|
|
366
367
|
buttonState: ButtonStates.Default,
|
|
367
368
|
}),
|
|
368
369
|
borderRadius: theme.shape.medium,
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
370
|
+
// Переопределяем media наследованное от Mui
|
|
371
|
+
[HOVER_NONE_MEDIA]: {
|
|
372
|
+
'&:hover': {
|
|
373
|
+
backgroundColor: getButtonBackgroundColor({
|
|
374
|
+
selected,
|
|
375
|
+
color,
|
|
376
|
+
variant,
|
|
377
|
+
theme,
|
|
378
|
+
buttonState: ButtonStates.Default,
|
|
379
|
+
}),
|
|
380
|
+
boxShadow: 'unset',
|
|
381
|
+
border: getBorder({
|
|
382
|
+
theme,
|
|
383
|
+
variant,
|
|
384
|
+
color,
|
|
385
|
+
buttonState: ButtonStates.Default,
|
|
386
|
+
selected,
|
|
387
|
+
}),
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
[HOVER_MEDIA]: {
|
|
391
|
+
'&:hover': {
|
|
392
|
+
color: getButtonColor({
|
|
393
|
+
selected,
|
|
394
|
+
theme,
|
|
395
|
+
variant,
|
|
396
|
+
color,
|
|
397
|
+
buttonState: ButtonStates.Hover,
|
|
398
|
+
}),
|
|
399
|
+
backgroundColor: getButtonBackgroundColor({
|
|
400
|
+
selected,
|
|
401
|
+
color,
|
|
402
|
+
variant,
|
|
403
|
+
theme,
|
|
404
|
+
buttonState: ButtonStates.Hover,
|
|
405
|
+
}),
|
|
406
|
+
boxShadow: 'none',
|
|
407
|
+
border: getBorder({
|
|
408
|
+
theme,
|
|
409
|
+
variant,
|
|
410
|
+
color,
|
|
411
|
+
buttonState: ButtonStates.Hover,
|
|
412
|
+
selected,
|
|
413
|
+
}),
|
|
414
|
+
},
|
|
392
415
|
},
|
|
393
416
|
'&:active': {
|
|
394
417
|
color: getButtonColor({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HOVER_MEDIA, HOVER_NONE_MEDIA } from '../../constants';
|
|
1
2
|
export const MuiListItemButton = {
|
|
2
3
|
styleOverrides: {
|
|
3
4
|
root({ theme }) {
|
|
@@ -6,9 +7,16 @@ export const MuiListItemButton = {
|
|
|
6
7
|
'&.Mui-selected': {
|
|
7
8
|
color: theme.palette.primary[800],
|
|
8
9
|
backgroundColor: theme.palette.grey[200],
|
|
10
|
+
[HOVER_NONE_MEDIA]: {
|
|
11
|
+
'&:hover': {
|
|
12
|
+
backgroundColor: theme.palette.grey[200],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
9
15
|
},
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
[HOVER_MEDIA]: {
|
|
17
|
+
'&:hover': {
|
|
18
|
+
backgroundColor: theme.palette.background.elementHover,
|
|
19
|
+
},
|
|
12
20
|
},
|
|
13
21
|
};
|
|
14
22
|
},
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { menuItemClasses } from '@mui/material/MenuItem';
|
|
2
|
+
import { HOVER_MEDIA } from '../../constants';
|
|
2
3
|
export const MuiMenuItem = {
|
|
3
4
|
styleOverrides: {
|
|
4
5
|
root({ theme }) {
|
|
5
6
|
return {
|
|
6
7
|
padding: theme.spacing(2, 2, 2, 3),
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
[HOVER_MEDIA]: {
|
|
9
|
+
'&:hover': {
|
|
10
|
+
backgroundColor: theme.palette.background.elementHover,
|
|
11
|
+
},
|
|
9
12
|
},
|
|
10
13
|
[`&.${menuItemClasses.selected}`]: {
|
|
11
14
|
background: `linear-gradient(90deg, ${theme.palette.primary.main} 0, ${theme.palette.primary.main} 3px, ${theme.palette.primary['100']} 3px)`,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HOVER_MEDIA } from '../../constants';
|
|
1
2
|
export const MuiOutlinedInput = {
|
|
2
3
|
defaultProps: {
|
|
3
4
|
notched: false,
|
|
@@ -10,28 +11,30 @@ export const MuiOutlinedInput = {
|
|
|
10
11
|
color: theme.palette.grey[900],
|
|
11
12
|
background: theme.palette.background.element,
|
|
12
13
|
padding: theme.microSpacing(1, 0),
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
[HOVER_MEDIA]: {
|
|
15
|
+
'&:hover': {
|
|
16
|
+
background: theme.palette.background.elementHover,
|
|
17
|
+
},
|
|
18
|
+
'&:hover .MuiOutlinedInput-notchedOutline': {
|
|
19
|
+
borderColor: theme.palette.grey[800],
|
|
20
|
+
transition: theme.transitions.create(['border-color'], {
|
|
21
|
+
easing: theme.transitions.easing.easeIn,
|
|
22
|
+
duration: theme.transitions.duration.shortest,
|
|
23
|
+
}),
|
|
24
|
+
},
|
|
25
|
+
'&.Mui-error:hover:not(.Mui-focused) .MuiOutlinedInput-notchedOutline': {
|
|
26
|
+
borderColor: theme.palette.error[900],
|
|
27
|
+
},
|
|
15
28
|
},
|
|
16
29
|
'&.Mui-disabled': {
|
|
17
30
|
backgroundColor: theme.palette.components.disabled,
|
|
18
31
|
},
|
|
19
|
-
'&:hover .MuiOutlinedInput-notchedOutline': {
|
|
20
|
-
borderColor: theme.palette.grey[800],
|
|
21
|
-
transition: theme.transitions.create(['border-color'], {
|
|
22
|
-
easing: theme.transitions.easing.easeIn,
|
|
23
|
-
duration: theme.transitions.duration.shortest,
|
|
24
|
-
}),
|
|
25
|
-
},
|
|
26
32
|
'&.Mui-disabled .MuiOutlinedInput-notchedOutline': {
|
|
27
33
|
border: 'none',
|
|
28
34
|
},
|
|
29
35
|
'&.Mui-error .MuiOutlinedInput-notchedOutline': {
|
|
30
36
|
borderColor: theme.palette.error.dark,
|
|
31
37
|
},
|
|
32
|
-
'&.Mui-error:hover:not(.Mui-focused) .MuiOutlinedInput-notchedOutline': {
|
|
33
|
-
borderColor: theme.palette.error[900],
|
|
34
|
-
},
|
|
35
38
|
'&.Mui-focused .MuiOutlinedInput-notchedOutline': {
|
|
36
39
|
borderColor: theme.palette.primary[700],
|
|
37
40
|
transition: 'none',
|
|
@@ -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'],
|
|
@@ -12,6 +12,7 @@ export declare const StyledDialog: import("../../../components/styled").StyledCo
|
|
|
12
12
|
disableBackdropClick?: boolean | undefined;
|
|
13
13
|
size?: import("../../../components/Dialog").DialogSize | undefined;
|
|
14
14
|
headerContent?: import("react").ReactNode;
|
|
15
|
+
disableMobileDrawer?: boolean | undefined;
|
|
15
16
|
} & {
|
|
16
17
|
theme?: import("@emotion/react").Theme | undefined;
|
|
17
18
|
}, {}, {}>;
|
|
@@ -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} {
|