@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.
Files changed (147) hide show
  1. package/components/Alert/styles.js +12 -2
  2. package/components/Autocomplete/styles.js +5 -2
  3. package/components/Breadcrumbs/styles.js +18 -13
  4. package/components/CheckableTag/styles.js +6 -3
  5. package/components/Checkbox/styles.js +10 -7
  6. package/components/Chip/styles.js +11 -6
  7. package/components/CodeField/styles.js +5 -2
  8. package/components/CopyTypography/styles.js +19 -5
  9. package/components/DashboardLayout/Header/styles.js +5 -2
  10. package/components/DashboardSidebarPopover/SidebarPopoverItem/styles.js +5 -2
  11. package/components/DataGrid/Row/styles.js +14 -19
  12. package/components/DataGrid/RowBase/styles.js +10 -17
  13. package/components/DataGridCollapsibleRow/styles.js +5 -2
  14. package/components/Description/Value/styles.js +5 -2
  15. package/components/Dialog/Dialog.d.ts +1 -1
  16. package/components/Dialog/Dialog.js +5 -4
  17. package/components/Dialog/styles.js +8 -0
  18. package/components/Dialog/types.d.ts +5 -0
  19. package/components/Dialog/useLogic/useLogic.d.ts +3 -3
  20. package/components/Dialog/useLogic/useLogic.js +6 -2
  21. package/components/ExpansionPanel/Summary/styles.js +5 -2
  22. package/components/Fab/styles.js +12 -3
  23. package/components/HintPopover/styles.js +2 -1
  24. package/components/InfiniteDataList/styles.js +5 -2
  25. package/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +5 -2
  26. package/components/InputGroup/styles.js +8 -5
  27. package/components/JsonViewer/JsonNode/styles.js +5 -2
  28. package/components/Link/styles.js +11 -6
  29. package/components/ListItem/styles.js +5 -2
  30. package/components/MenuOrganization/OrganizationButton/styles.js +5 -6
  31. package/components/NavMenu/Item/ItemButton/styles.js +14 -7
  32. package/components/NewPopover/NewPopover.js +1 -0
  33. package/components/NewPopover/constants.d.ts +5 -0
  34. package/components/NewPopover/constants.js +6 -1
  35. package/components/NewPopover/styles.js +2 -1
  36. package/components/NewPopover/types.d.ts +1 -1
  37. package/components/NewPopover/useLogic/useLogic.d.ts +2 -2
  38. package/components/NewPopover/useLogic/useLogic.js +12 -12
  39. package/components/NewPopover/useLogic/utils/getFallbackPlacements/getFallbackPlacements.d.ts +7 -0
  40. package/components/NewPopover/useLogic/utils/getFallbackPlacements/getFallbackPlacements.js +19 -0
  41. package/components/NewPopover/useLogic/utils/getFallbackPlacements/index.d.ts +1 -0
  42. package/components/NewPopover/useLogic/utils/getFallbackPlacements/index.js +1 -0
  43. package/components/NewPopover/useLogic/utils/index.d.ts +4 -0
  44. package/components/NewPopover/useLogic/utils/index.js +4 -0
  45. package/components/NewStepper/Step/styles.js +18 -15
  46. package/components/Notification/NotificationStackContainer/styles.js +5 -2
  47. package/components/Onboarding/types/step.d.ts +1 -1
  48. package/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.d.ts +1 -1
  49. package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.js +1 -1
  50. package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.d.ts +1 -0
  51. package/components/Onboarding/ui/hooks/useTrackedRect/constants.d.ts +6 -0
  52. package/components/Onboarding/ui/hooks/useTrackedRect/constants.js +6 -0
  53. package/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.js +34 -12
  54. package/components/PageAsideNavigation/PageAsideNavigationItem/styles.js +5 -6
  55. package/components/PageHeader/MobilePageActions/styles.js +0 -4
  56. package/components/Radio/styles.js +7 -4
  57. package/components/RadioCard/styles.js +5 -2
  58. package/components/StaticCalendar/StaticCalendarGridButton/styles.js +8 -5
  59. package/components/Tabs/Tab/styles.js +5 -2
  60. package/components/ToggleButton/styles.js +25 -10
  61. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +3 -3
  62. package/components/Tree/TreeItem/styles.js +23 -10
  63. package/components/constants/index.d.ts +1 -0
  64. package/components/constants/index.js +1 -0
  65. package/components/constants/media.d.ts +8 -0
  66. package/components/constants/media.js +8 -0
  67. package/components/theme/components/MuiButton.js +46 -23
  68. package/components/theme/components/MuiListItemButton.js +10 -2
  69. package/components/theme/components/MuiMenuItem.js +5 -2
  70. package/components/theme/components/MuiOutlinedInput.js +15 -12
  71. package/components/theme/components/MuiSwitch.js +14 -9
  72. package/components/theme/components/MuiTableRow.js +11 -3
  73. package/hook-form/FormFilters/FormFiltersDialog/styles.d.ts +1 -0
  74. package/node/components/Alert/styles.js +24 -14
  75. package/node/components/Autocomplete/styles.js +8 -5
  76. package/node/components/Breadcrumbs/styles.js +18 -13
  77. package/node/components/CheckableTag/styles.js +6 -3
  78. package/node/components/Checkbox/styles.js +26 -23
  79. package/node/components/Chip/styles.js +36 -31
  80. package/node/components/CodeField/styles.js +5 -2
  81. package/node/components/CopyTypography/styles.js +22 -8
  82. package/node/components/DashboardLayout/Header/styles.js +35 -32
  83. package/node/components/DashboardSidebarPopover/SidebarPopoverItem/styles.js +7 -4
  84. package/node/components/DataGrid/Row/styles.js +41 -46
  85. package/node/components/DataGrid/RowBase/styles.js +16 -23
  86. package/node/components/DataGridCollapsibleRow/styles.js +11 -8
  87. package/node/components/Description/Value/styles.js +5 -2
  88. package/node/components/Dialog/Dialog.d.ts +1 -1
  89. package/node/components/Dialog/Dialog.js +5 -4
  90. package/node/components/Dialog/styles.js +8 -0
  91. package/node/components/Dialog/types.d.ts +5 -0
  92. package/node/components/Dialog/useLogic/useLogic.d.ts +3 -3
  93. package/node/components/Dialog/useLogic/useLogic.js +6 -2
  94. package/node/components/ExpansionPanel/Summary/styles.js +5 -2
  95. package/node/components/Fab/styles.js +12 -3
  96. package/node/components/HintPopover/styles.js +2 -1
  97. package/node/components/InfiniteDataList/styles.js +7 -4
  98. package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +11 -8
  99. package/node/components/InputGroup/styles.js +8 -5
  100. package/node/components/JsonViewer/JsonNode/styles.js +5 -2
  101. package/node/components/Link/styles.js +13 -8
  102. package/node/components/ListItem/styles.js +10 -7
  103. package/node/components/MenuOrganization/OrganizationButton/styles.js +5 -6
  104. package/node/components/NavMenu/Item/ItemButton/styles.js +16 -9
  105. package/node/components/NewPopover/NewPopover.js +1 -0
  106. package/node/components/NewPopover/constants.d.ts +5 -0
  107. package/node/components/NewPopover/constants.js +7 -2
  108. package/node/components/NewPopover/styles.js +1 -0
  109. package/node/components/NewPopover/types.d.ts +1 -1
  110. package/node/components/NewPopover/useLogic/useLogic.d.ts +2 -2
  111. package/node/components/NewPopover/useLogic/useLogic.js +15 -15
  112. package/node/components/NewPopover/useLogic/utils/getFallbackPlacements/getFallbackPlacements.d.ts +7 -0
  113. package/node/components/NewPopover/useLogic/utils/getFallbackPlacements/getFallbackPlacements.js +23 -0
  114. package/node/components/NewPopover/useLogic/utils/getFallbackPlacements/index.d.ts +1 -0
  115. package/node/components/NewPopover/useLogic/utils/getFallbackPlacements/index.js +17 -0
  116. package/node/components/NewPopover/useLogic/utils/index.d.ts +4 -0
  117. package/node/components/NewPopover/useLogic/utils/index.js +20 -0
  118. package/node/components/NewStepper/Step/styles.js +68 -65
  119. package/node/components/Notification/NotificationStackContainer/styles.js +57 -54
  120. package/node/components/Onboarding/types/step.d.ts +1 -1
  121. package/node/components/Onboarding/ui/StepStrategy/steps/HighlightStep/styles.d.ts +1 -1
  122. package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/StandaloneStep.js +1 -1
  123. package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.d.ts +1 -0
  124. package/node/components/Onboarding/ui/hooks/useTrackedRect/constants.d.ts +6 -0
  125. package/node/components/Onboarding/ui/hooks/useTrackedRect/constants.js +9 -0
  126. package/node/components/Onboarding/ui/hooks/useTrackedRect/useTrackedRect.js +34 -12
  127. package/node/components/PageAsideNavigation/PageAsideNavigationItem/styles.js +12 -13
  128. package/node/components/PageHeader/MobilePageActions/styles.js +0 -4
  129. package/node/components/Radio/styles.js +20 -17
  130. package/node/components/RadioCard/styles.js +7 -4
  131. package/node/components/StaticCalendar/StaticCalendarGridButton/styles.js +8 -5
  132. package/node/components/Tabs/Tab/styles.js +5 -2
  133. package/node/components/ToggleButton/styles.js +27 -12
  134. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +3 -3
  135. package/node/components/Tree/TreeItem/styles.js +44 -31
  136. package/node/components/constants/index.d.ts +1 -0
  137. package/node/components/constants/index.js +1 -0
  138. package/node/components/constants/media.d.ts +8 -0
  139. package/node/components/constants/media.js +11 -0
  140. package/node/components/theme/components/MuiButton.js +46 -23
  141. package/node/components/theme/components/MuiListItemButton.js +10 -2
  142. package/node/components/theme/components/MuiMenuItem.js +5 -2
  143. package/node/components/theme/components/MuiOutlinedInput.js +15 -12
  144. package/node/components/theme/components/MuiSwitch.js +14 -9
  145. package/node/components/theme/components/MuiTableRow.js +11 -3
  146. package/node/hook-form/FormFilters/FormFiltersDialog/styles.d.ts +1 -0
  147. 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
- &:hover {
57
- border-radius: ${(props) => getLeftBorderRadius({ isHovered: true, ...props })}
58
- ${(props) => getRightBorderRadius({ isHovered: true, ...props })}
59
- ${(props) => getRightBorderRadius({ isHovered: true, ...props })}
60
- ${(props) => getLeftBorderRadius({ isHovered: true, ...props })};
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
- &:hover {
17
- color: ${({ theme }) => theme.palette.primary[800]};
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
- &:hover {
68
- ${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, disabled, state: 'hover' })};
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
- &:hover {
83
- ${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, selected: true, disabled, state: 'hover' })};
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
- &:hover {
101
- border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color, state: 'hover' })};
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
- &:hover {
112
- border-left-color: ${({ theme, $color }) => getBorderColor({
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
- &:hover {
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
- &:hover {
70
- background-color: ${({ theme }) => theme.palette.background.elementHover};
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
- &:hover, &:focus {
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
- &:hover, &:focus {
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
- &:hover {
141
- background-color: ${({ theme }) => theme.palette.grey[300]};
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) `
@@ -2,3 +2,4 @@ export * from './date';
2
2
  export * from './scrollbar';
3
3
  export * from './footer';
4
4
  export * from './classnames';
5
+ export * from './media';
@@ -2,3 +2,4 @@ export * from './date';
2
2
  export * from './scrollbar';
3
3
  export * from './footer';
4
4
  export * from './classnames';
5
+ export * from './media';
@@ -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
- '&:hover': {
370
- color: getButtonColor({
371
- selected,
372
- theme,
373
- variant,
374
- color,
375
- buttonState: ButtonStates.Hover,
376
- }),
377
- backgroundColor: getButtonBackgroundColor({
378
- selected,
379
- color,
380
- variant,
381
- theme,
382
- buttonState: ButtonStates.Hover,
383
- }),
384
- boxShadow: 'none',
385
- border: getBorder({
386
- theme,
387
- variant,
388
- color,
389
- buttonState: ButtonStates.Hover,
390
- selected,
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
- '&:hover': {
11
- backgroundColor: theme.palette.background.elementHover,
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
- '&:hover': {
8
- backgroundColor: theme.palette.background.elementHover,
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
- '&:hover': {
14
- background: theme.palette.background.elementHover,
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
- // CHECKED HOVER
34
- '& .Mui-checked:hover + .MuiSwitch-track': {
35
- backgroundColor: theme.palette.primary[700],
36
- },
37
- // NOT CHECKED HOVER
38
- '& :not(.Mui-checked):hover + .MuiSwitch-track': {
39
- backgroundColor: theme.palette.grey[600],
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
- '&:hover, &.Mui-checked:hover': {
62
- backgroundColor: 'transparent',
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
- '&.MuiTableRow-hover:hover': {
6
- backgroundColor: theme.palette.background.elementHover,
7
- cursor: 'pointer',
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 constants_1 = require("./constants");
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
- &:hover {
27
- background-color: rgb(0 0 0 / 4%);
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
- &.${constants_1.alertClassnames.severityInfo} {
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
- .${constants_1.alertClassnames.iconWrapper} {
53
+ .${constants_2.alertClassnames.iconWrapper} {
44
54
  color: ${({ theme }) => theme.palette.primary[800]};
45
55
  }
46
56
  }
47
57
 
48
- &.${constants_1.alertClassnames.severitySuccess} {
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
- .${constants_1.alertClassnames.iconWrapper} {
62
+ .${constants_2.alertClassnames.iconWrapper} {
53
63
  color: ${({ theme }) => theme.palette.success[800]};
54
64
  }
55
65
  }
56
66
 
57
- &.${constants_1.alertClassnames.severityError} {
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
- .${constants_1.alertClassnames.iconWrapper} {
71
+ .${constants_2.alertClassnames.iconWrapper} {
62
72
  color: ${({ theme }) => theme.palette.error[800]};
63
73
  }
64
74
  }
65
75
 
66
- &.${constants_1.alertClassnames.severityWarning} {
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
- .${constants_1.alertClassnames.iconWrapper} {
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
- .${constants_1.alertClassnames.hasCloseButton} & {
115
+ .${constants_2.alertClassnames.hasCloseButton} & {
106
116
  margin-right: ${({ theme }) => theme.spacing(1)};
107
117
  }
108
118
 
109
- & > .${constants_1.alertClassnames.title} + .${constants_1.alertClassnames.content} {
119
+ & > .${constants_2.alertClassnames.title} + .${constants_2.alertClassnames.content} {
110
120
  margin-top: ${({ theme }) => theme.spacing(1)};
111
121
  }
112
122
 
113
- & > .${constants_1.alertClassnames.actions} {
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 constants_1 = require("./constants");
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
- & .${Autocomplete_1.autocompleteClasses.endAdornment} .${IconButton_1.iconButtonClasses.root}:hover {
52
- background-color: ${({ loading, theme }) => (loading ? 'transparent' : theme.palette.grey[100])};
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(.${constants_1.autocompleteClassnames.emptyValue}) .${InputBase_1.inputBaseClasses.root} {
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: ${constants_1.INPUT_MIN_WIDTH}px;
63
+ min-width: ${constants_2.INPUT_MIN_WIDTH}px;
61
64
  }
62
65
 
63
66
  & .${Autocomplete_1.autocompleteClasses.inputRoot} {