@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.
Files changed (91) 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/ExpansionPanel/Summary/styles.js +5 -2
  16. package/components/Fab/styles.js +12 -3
  17. package/components/InfiniteDataList/styles.js +5 -2
  18. package/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +5 -2
  19. package/components/InputGroup/styles.js +8 -5
  20. package/components/JsonViewer/JsonNode/styles.js +5 -2
  21. package/components/Link/styles.js +11 -6
  22. package/components/ListItem/styles.js +5 -2
  23. package/components/MenuOrganization/OrganizationButton/styles.js +5 -6
  24. package/components/NavMenu/Item/ItemButton/styles.js +14 -7
  25. package/components/NewStepper/Step/styles.js +18 -15
  26. package/components/Notification/NotificationStackContainer/styles.js +5 -2
  27. package/components/PageAsideNavigation/PageAsideNavigationItem/styles.js +5 -6
  28. package/components/PageHeader/MobilePageActions/styles.js +0 -4
  29. package/components/Radio/styles.js +7 -4
  30. package/components/RadioCard/styles.js +5 -2
  31. package/components/StaticCalendar/StaticCalendarGridButton/styles.js +8 -5
  32. package/components/Tabs/Tab/styles.js +5 -2
  33. package/components/ToggleButton/styles.js +25 -10
  34. package/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +3 -3
  35. package/components/Tree/TreeItem/styles.js +23 -10
  36. package/components/constants/index.d.ts +1 -0
  37. package/components/constants/index.js +1 -0
  38. package/components/constants/media.d.ts +8 -0
  39. package/components/constants/media.js +8 -0
  40. package/components/theme/components/MuiButton.js +46 -23
  41. package/components/theme/components/MuiListItemButton.js +10 -2
  42. package/components/theme/components/MuiMenuItem.js +5 -2
  43. package/components/theme/components/MuiOutlinedInput.js +15 -12
  44. package/components/theme/components/MuiSwitch.js +14 -9
  45. package/components/theme/components/MuiTableRow.js +11 -3
  46. package/node/components/Alert/styles.js +24 -14
  47. package/node/components/Autocomplete/styles.js +8 -5
  48. package/node/components/Breadcrumbs/styles.js +18 -13
  49. package/node/components/CheckableTag/styles.js +6 -3
  50. package/node/components/Checkbox/styles.js +26 -23
  51. package/node/components/Chip/styles.js +36 -31
  52. package/node/components/CodeField/styles.js +5 -2
  53. package/node/components/CopyTypography/styles.js +22 -8
  54. package/node/components/DashboardLayout/Header/styles.js +35 -32
  55. package/node/components/DashboardSidebarPopover/SidebarPopoverItem/styles.js +7 -4
  56. package/node/components/DataGrid/Row/styles.js +41 -46
  57. package/node/components/DataGrid/RowBase/styles.js +16 -23
  58. package/node/components/DataGridCollapsibleRow/styles.js +11 -8
  59. package/node/components/Description/Value/styles.js +5 -2
  60. package/node/components/ExpansionPanel/Summary/styles.js +5 -2
  61. package/node/components/Fab/styles.js +12 -3
  62. package/node/components/InfiniteDataList/styles.js +7 -4
  63. package/node/components/InfiniteTreeList/InfiniteTreeListItem/styles.js +11 -8
  64. package/node/components/InputGroup/styles.js +8 -5
  65. package/node/components/JsonViewer/JsonNode/styles.js +5 -2
  66. package/node/components/Link/styles.js +13 -8
  67. package/node/components/ListItem/styles.js +10 -7
  68. package/node/components/MenuOrganization/OrganizationButton/styles.js +5 -6
  69. package/node/components/NavMenu/Item/ItemButton/styles.js +16 -9
  70. package/node/components/NewStepper/Step/styles.js +68 -65
  71. package/node/components/Notification/NotificationStackContainer/styles.js +57 -54
  72. package/node/components/PageAsideNavigation/PageAsideNavigationItem/styles.js +12 -13
  73. package/node/components/PageHeader/MobilePageActions/styles.js +0 -4
  74. package/node/components/Radio/styles.js +20 -17
  75. package/node/components/RadioCard/styles.js +7 -4
  76. package/node/components/StaticCalendar/StaticCalendarGridButton/styles.js +8 -5
  77. package/node/components/Tabs/Tab/styles.js +5 -2
  78. package/node/components/ToggleButton/styles.js +27 -12
  79. package/node/components/Tree/TreeItem/MobileSlidePanel/MobileSlidePanelContent/styles.js +3 -3
  80. package/node/components/Tree/TreeItem/styles.js +44 -31
  81. package/node/components/constants/index.d.ts +1 -0
  82. package/node/components/constants/index.js +1 -0
  83. package/node/components/constants/media.d.ts +8 -0
  84. package/node/components/constants/media.js +11 -0
  85. package/node/components/theme/components/MuiButton.js +46 -23
  86. package/node/components/theme/components/MuiListItemButton.js +10 -2
  87. package/node/components/theme/components/MuiMenuItem.js +5 -2
  88. package/node/components/theme/components/MuiOutlinedInput.js +15 -12
  89. package/node/components/theme/components/MuiSwitch.js +14 -9
  90. package/node/components/theme/components/MuiTableRow.js +11 -3
  91. package/package.json +1 -1
@@ -28,10 +28,11 @@ const ButtonBase_1 = require("@mui/material/ButtonBase");
28
28
  const ToggleButton_1 = __importStar(require("@mui/material/ToggleButton"));
29
29
  const ToggleButtonGroup_1 = require("@mui/material/ToggleButtonGroup");
30
30
  const Button_1 = require("../Button");
31
+ const constants_1 = require("../constants");
31
32
  const styled_1 = require("../styled");
32
- const constants_1 = require("./constants");
33
+ const constants_2 = require("./constants");
33
34
  const getSize = (size) => {
34
- return constants_1.SIZES[size || 'medium'];
35
+ return constants_2.SIZES[size || 'medium'];
35
36
  };
36
37
  const getColor = ({ color = 'primary', isSelected, state = 'default', theme, isDisabled, }) => {
37
38
  if (isDisabled) {
@@ -90,23 +91,33 @@ exports.StyledToggleButton = (0, styled_1.styled)(ToggleButton_1.default, {
90
91
 
91
92
  ${({ theme, $color, disabled, $variant }) => toggleButtonColorStyle({ theme, color: $color, disabled, variant: $variant })}
92
93
 
93
- &:hover {
94
- ${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, disabled, state: 'hover' })};
94
+ ${constants_1.HOVER_MEDIA} {
95
+ &:hover {
96
+ ${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, disabled, state: 'hover' })};
97
+ }
95
98
  }
96
-
99
+
97
100
  &:active {
98
101
  z-index: 3;
99
102
 
100
103
  ${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, disabled, state: 'active' })};
101
104
  }
102
-
105
+
103
106
  &.${ToggleButton_1.toggleButtonClasses.selected} {
104
107
  z-index: 2;
105
108
 
106
109
  ${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, disabled, selected: true })}
107
110
 
108
- &:hover {
109
- ${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, selected: true, disabled, state: 'hover' })};
111
+ ${constants_1.HOVER_MEDIA} {
112
+ &:hover {
113
+ ${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, selected: true, disabled, state: 'hover' })};
114
+ }
115
+ }
116
+
117
+ ${constants_1.HOVER_NONE_MEDIA} {
118
+ &:hover {
119
+ ${({ theme, $color, disabled }) => toggleButtonColorStyle({ theme, color: $color, selected: true, disabled, state: 'default' })};
120
+ }
110
121
  }
111
122
 
112
123
  &:active {
@@ -123,8 +134,10 @@ exports.StyledToggleButton = (0, styled_1.styled)(ToggleButton_1.default, {
123
134
  &.${ButtonBase_1.buttonBaseClasses.root}.${ToggleButtonGroup_1.toggleButtonGroupClasses.grouped}:not(:first-of-type) {
124
135
  border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color })};
125
136
 
126
- &:hover {
127
- border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color, state: 'hover' })};
137
+ ${constants_1.HOVER_MEDIA} {
138
+ &:hover {
139
+ border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color, state: 'hover' })};
140
+ }
128
141
  }
129
142
 
130
143
  &:active {
@@ -134,13 +147,15 @@ exports.StyledToggleButton = (0, styled_1.styled)(ToggleButton_1.default, {
134
147
  &.${ToggleButton_1.toggleButtonClasses.selected} {
135
148
  border-left-color: ${({ theme, $color }) => getBorderColor({ theme, color: $color, isSelected: true })};
136
149
 
137
- &:hover {
138
- border-left-color: ${({ theme, $color }) => getBorderColor({
150
+ ${constants_1.HOVER_MEDIA} {
151
+ &:hover {
152
+ border-left-color: ${({ theme, $color }) => getBorderColor({
139
153
  theme,
140
154
  color: $color,
141
155
  isSelected: true,
142
156
  state: 'hover',
143
157
  })};
158
+ }
144
159
  }
145
160
 
146
161
  &:active {
@@ -109,10 +109,10 @@ exports.BackButton = (0, styled_1.styled)(IconButton_1.IconButton) `
109
109
  width: ${constants_1.COLLAPSE_BUTTON_WIDTH};
110
110
  height: ${constants_1.COLLAPSE_BUTTON_WIDTH};
111
111
  }
112
-
113
- &:hover {
112
+
113
+ &:active {
114
114
  background-color: transparent;
115
- }
115
+ }
116
116
  }
117
117
  `;
118
118
  exports.ParentContent = styled_1.styled.div `
@@ -5,6 +5,7 @@ const Typography_1 = require("@mui/material/Typography");
5
5
  const ChevronROutlineMd_1 = require("../../../icons/ChevronROutlineMd");
6
6
  const Button_1 = require("../../Button");
7
7
  const Collapse_1 = require("../../Collapse");
8
+ const constants_1 = require("../../constants");
8
9
  const Description_1 = require("../../Description");
9
10
  const IconButton_1 = require("../../IconButton");
10
11
  const OverflowTypography_1 = require("../../OverflowTypography");
@@ -12,7 +13,7 @@ const SvgIcon_1 = require("../../SvgIcon");
12
13
  const styled_1 = require("../../styled");
13
14
  const Tooltip_1 = require("../../Tooltip");
14
15
  const Typography_2 = require("../../Typography");
15
- const constants_1 = require("./constants");
16
+ const constants_2 = require("./constants");
16
17
  exports.Item = (0, styled_1.styled)('li', {
17
18
  shouldForwardProp: (prop) => !['as'].includes(prop),
18
19
  }) `
@@ -28,8 +29,8 @@ exports.Item = (0, styled_1.styled)('li', {
28
29
  top: 0;
29
30
  transform: translateX(
30
31
  calc(
31
- ((${constants_1.COLLAPSE_BUTTON_WIDTH} + ${constants_1.GAP_WIDTH}) * var(--tree-item-level)) -
32
- ${constants_1.HALF_PADDING_COLLAPSE_BUTTON_WIDTH}
32
+ ((${constants_2.COLLAPSE_BUTTON_WIDTH} + ${constants_2.GAP_WIDTH}) * var(--tree-item-level)) -
33
+ ${constants_2.HALF_PADDING_COLLAPSE_BUTTON_WIDTH}
33
34
  )
34
35
  );
35
36
 
@@ -69,24 +70,38 @@ exports.ItemContent = (0, styled_1.styled)('div') `
69
70
  duration: theme.transitions.duration.shortest,
70
71
  })};
71
72
 
72
- &:hover {
73
- background-color: ${({ theme }) => theme.palette.background.elementHover};
73
+ ${constants_1.HOVER_MEDIA} {
74
+ &:hover {
75
+ background-color: ${({ theme }) => theme.palette.background.elementHover};
76
+ }
74
77
  }
75
78
 
76
- &.${constants_1.treeClassnames.selected} {
79
+ &.${constants_2.treeClassnames.selected} {
77
80
  background-color: ${({ theme }) => theme.palette.primary[100]};
78
81
 
79
- &:hover, &:focus {
82
+ ${constants_1.HOVER_MEDIA} {
83
+ &:hover {
84
+ background-color: ${({ theme }) => theme.palette.primary[100]};
85
+ }
86
+ }
87
+
88
+ &:focus {
80
89
  background-color: ${({ theme }) => theme.palette.primary[100]};
81
90
  }
82
91
  }
83
92
 
84
- &.${constants_1.treeClassnames.disabled} {
93
+ &.${constants_2.treeClassnames.disabled} {
85
94
  cursor: default;
86
95
 
87
96
  color: ${({ theme }) => theme.palette.text.disabled};
88
97
 
89
- &:hover, &:focus {
98
+ ${constants_1.HOVER_MEDIA} {
99
+ &:hover {
100
+ background-color: transparent;
101
+ }
102
+ }
103
+
104
+ &:focus {
90
105
  background-color: transparent;
91
106
  }
92
107
  }
@@ -103,7 +118,7 @@ exports.ItemContent = (0, styled_1.styled)('div') `
103
118
  border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
104
119
 
105
120
 
106
- &.${constants_1.treeClassnames.hasNested} {
121
+ &.${constants_2.treeClassnames.hasNested} {
107
122
  padding-right: ${({ theme }) => theme.spacing(11)};
108
123
  }
109
124
 
@@ -120,31 +135,33 @@ exports.CollapseButton = (0, styled_1.styled)(IconButton_1.IconButton) `
120
135
  position: relative;
121
136
  z-index: 1;
122
137
 
123
- width: ${constants_1.COLLAPSE_BUTTON_WIDTH};
124
- height: ${constants_1.COLLAPSE_BUTTON_WIDTH};
125
- margin-left: -${constants_1.COLLAPSE_BUTTON_WIDTH};
138
+ width: ${constants_2.COLLAPSE_BUTTON_WIDTH};
139
+ height: ${constants_2.COLLAPSE_BUTTON_WIDTH};
140
+ margin-left: -${constants_2.COLLAPSE_BUTTON_WIDTH};
126
141
 
127
142
  color: inherit;
128
143
 
129
- &.${constants_1.treeClassnames.notBlockingExpandList} {
144
+ &.${constants_2.treeClassnames.notBlockingExpandList} {
130
145
  color: ${({ theme }) => theme.palette.text.primary};
131
146
  }
132
147
 
133
148
  &.${Button_1.buttonClasses.root} {
134
- width: ${constants_1.COLLAPSE_BUTTON_WIDTH};
135
- height: ${constants_1.COLLAPSE_BUTTON_WIDTH};
149
+ width: ${constants_2.COLLAPSE_BUTTON_WIDTH};
150
+ height: ${constants_2.COLLAPSE_BUTTON_WIDTH};
136
151
  }
137
152
 
138
153
  &.${Button_1.buttonClasses.root} .${SvgIcon_1.svgIconClassnames.root} {
139
- width: ${constants_1.COLLAPSE_BUTTON_WIDTH};
140
- height: ${constants_1.COLLAPSE_BUTTON_WIDTH};
154
+ width: ${constants_2.COLLAPSE_BUTTON_WIDTH};
155
+ height: ${constants_2.COLLAPSE_BUTTON_WIDTH};
141
156
  }
142
157
 
143
- &:hover {
144
- background-color: ${({ theme }) => theme.palette.grey[300]};
158
+ ${constants_1.HOVER_MEDIA} {
159
+ &:hover {
160
+ background-color: ${({ theme }) => theme.palette.grey[300]};
161
+ }
145
162
  }
146
163
 
147
- &.${constants_1.treeClassnames.open} .${SvgIcon_1.svgIconClassnames.root} {
164
+ &.${constants_2.treeClassnames.open} .${SvgIcon_1.svgIconClassnames.root} {
148
165
  transform: rotateZ(90deg);
149
166
  }
150
167
 
@@ -155,25 +172,21 @@ exports.CollapseButton = (0, styled_1.styled)(IconButton_1.IconButton) `
155
172
  right: 0;
156
173
  bottom: 0;
157
174
 
158
- width: ${constants_1.MOBILE_COLLAPSE_BUTTON_WIDTH};
175
+ width: ${constants_2.MOBILE_COLLAPSE_BUTTON_WIDTH};
159
176
  height: auto;
160
177
  margin-left: 0;
161
178
  padding: ${({ theme }) => theme.spacing(0, 4, 0, 8)};
162
179
 
163
180
  border-radius: 0;
164
181
 
165
- &.${constants_1.treeClassnames.open} .${SvgIcon_1.svgIconClassnames.root} {
182
+ &.${constants_2.treeClassnames.open} .${SvgIcon_1.svgIconClassnames.root} {
166
183
  transform: rotateZ(0deg);
167
184
  }
168
185
 
169
186
  &.${Button_1.buttonClasses.root} {
170
- width: ${constants_1.MOBILE_COLLAPSE_BUTTON_WIDTH};
187
+ width: ${constants_2.MOBILE_COLLAPSE_BUTTON_WIDTH};
171
188
  height: auto;
172
189
  }
173
-
174
- &:hover {
175
- background-color: transparent;
176
- }
177
190
  }
178
191
  `;
179
192
  exports.ChevronIcon = (0, styled_1.styled)(ChevronROutlineMd_1.ChevronROutlineMd) `
@@ -204,11 +217,11 @@ exports.LabelWrapper = styled_1.styled.div `
204
217
  z-index: 1;
205
218
  top: 0;
206
219
  left: calc(
207
- ${constants_1.HALF_PADDING_COLLAPSE_BUTTON_WIDTH} -
208
- (${constants_1.COLLAPSE_BUTTON_WIDTH} + ${constants_1.GAP_WIDTH}) * 2
220
+ ${constants_2.HALF_PADDING_COLLAPSE_BUTTON_WIDTH} -
221
+ (${constants_2.COLLAPSE_BUTTON_WIDTH} + ${constants_2.GAP_WIDTH}) * 2
209
222
  );
210
223
 
211
- width: ${constants_1.TREE_LINE_WIDTH};
224
+ width: ${constants_2.TREE_LINE_WIDTH};
212
225
 
213
226
  /* Добавляем к высоте половину нижнего отступа, который не входит в высоту текущего элемента */
214
227
  height: ${({ theme }) => `calc(50% + ${theme.spacing(1)}/2)`};
@@ -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';
@@ -18,3 +18,4 @@ __exportStar(require("./date"), exports);
18
18
  __exportStar(require("./scrollbar"), exports);
19
19
  __exportStar(require("./footer"), exports);
20
20
  __exportStar(require("./classnames"), exports);
21
+ __exportStar(require("./media"), exports);
@@ -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,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HOVER_NONE_MEDIA = exports.HOVER_MEDIA = void 0;
4
+ /**
5
+ * Медиа-выражение проверяющее что устройство поддерживает hover и является точным указателем
6
+ */
7
+ exports.HOVER_MEDIA = '@media (hover: hover) and (pointer: fine)';
8
+ /**
9
+ * Медиа-выражение проверяющее что устройство не поддерживает hover
10
+ */
11
+ exports.HOVER_NONE_MEDIA = '@media (hover: none)';
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MuiButton = exports.getButtonDisabledBackgroundColor = exports.getButtonBackgroundColor = exports.getButtonPaddingMobile = exports.getButtonPadding = exports.getButtonHeightMobile = exports.getButtonHeight = void 0;
4
4
  const Button_1 = require("@mui/material/Button");
5
5
  const Button_2 = require("../../Button");
6
+ const constants_1 = require("../../constants");
6
7
  const SvgIcon_1 = require("../../SvgIcon");
7
8
  /**
8
9
  * Вспомогательная утилита для получения значения из values
@@ -375,29 +376,51 @@ exports.MuiButton = {
375
376
  buttonState: Button_2.ButtonStates.Default,
376
377
  }),
377
378
  borderRadius: theme.shape.medium,
378
- '&:hover': {
379
- color: getButtonColor({
380
- selected,
381
- theme,
382
- variant,
383
- color,
384
- buttonState: Button_2.ButtonStates.Hover,
385
- }),
386
- backgroundColor: (0, exports.getButtonBackgroundColor)({
387
- selected,
388
- color,
389
- variant,
390
- theme,
391
- buttonState: Button_2.ButtonStates.Hover,
392
- }),
393
- boxShadow: 'none',
394
- border: getBorder({
395
- theme,
396
- variant,
397
- color,
398
- buttonState: Button_2.ButtonStates.Hover,
399
- selected,
400
- }),
379
+ // Переопределяем media наследованное от Mui
380
+ [constants_1.HOVER_NONE_MEDIA]: {
381
+ '&:hover': {
382
+ backgroundColor: (0, exports.getButtonBackgroundColor)({
383
+ selected,
384
+ color,
385
+ variant,
386
+ theme,
387
+ buttonState: Button_2.ButtonStates.Default,
388
+ }),
389
+ boxShadow: 'unset',
390
+ border: getBorder({
391
+ theme,
392
+ variant,
393
+ color,
394
+ buttonState: Button_2.ButtonStates.Default,
395
+ selected,
396
+ }),
397
+ },
398
+ },
399
+ [constants_1.HOVER_MEDIA]: {
400
+ '&:hover': {
401
+ color: getButtonColor({
402
+ selected,
403
+ theme,
404
+ variant,
405
+ color,
406
+ buttonState: Button_2.ButtonStates.Hover,
407
+ }),
408
+ backgroundColor: (0, exports.getButtonBackgroundColor)({
409
+ selected,
410
+ color,
411
+ variant,
412
+ theme,
413
+ buttonState: Button_2.ButtonStates.Hover,
414
+ }),
415
+ boxShadow: 'none',
416
+ border: getBorder({
417
+ theme,
418
+ variant,
419
+ color,
420
+ buttonState: Button_2.ButtonStates.Hover,
421
+ selected,
422
+ }),
423
+ },
401
424
  },
402
425
  '&:active': {
403
426
  color: getButtonColor({
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MuiListItemButton = void 0;
4
+ const constants_1 = require("../../constants");
4
5
  exports.MuiListItemButton = {
5
6
  styleOverrides: {
6
7
  root({ theme }) {
@@ -9,9 +10,16 @@ exports.MuiListItemButton = {
9
10
  '&.Mui-selected': {
10
11
  color: theme.palette.primary[800],
11
12
  backgroundColor: theme.palette.grey[200],
13
+ [constants_1.HOVER_NONE_MEDIA]: {
14
+ '&:hover': {
15
+ backgroundColor: theme.palette.grey[200],
16
+ },
17
+ },
12
18
  },
13
- '&:hover': {
14
- backgroundColor: theme.palette.background.elementHover,
19
+ [constants_1.HOVER_MEDIA]: {
20
+ '&:hover': {
21
+ backgroundColor: theme.palette.background.elementHover,
22
+ },
15
23
  },
16
24
  };
17
25
  },
@@ -2,13 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MuiMenuItem = void 0;
4
4
  const MenuItem_1 = require("@mui/material/MenuItem");
5
+ const constants_1 = require("../../constants");
5
6
  exports.MuiMenuItem = {
6
7
  styleOverrides: {
7
8
  root({ theme }) {
8
9
  return {
9
10
  padding: theme.spacing(2, 2, 2, 3),
10
- '&:hover': {
11
- backgroundColor: theme.palette.background.elementHover,
11
+ [constants_1.HOVER_MEDIA]: {
12
+ '&:hover': {
13
+ backgroundColor: theme.palette.background.elementHover,
14
+ },
12
15
  },
13
16
  [`&.${MenuItem_1.menuItemClasses.selected}`]: {
14
17
  background: `linear-gradient(90deg, ${theme.palette.primary.main} 0, ${theme.palette.primary.main} 3px, ${theme.palette.primary['100']} 3px)`,
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MuiOutlinedInput = void 0;
4
+ const constants_1 = require("../../constants");
4
5
  exports.MuiOutlinedInput = {
5
6
  defaultProps: {
6
7
  notched: false,
@@ -13,28 +14,30 @@ exports.MuiOutlinedInput = {
13
14
  color: theme.palette.grey[900],
14
15
  background: theme.palette.background.element,
15
16
  padding: theme.microSpacing(1, 0),
16
- '&:hover': {
17
- background: theme.palette.background.elementHover,
17
+ [constants_1.HOVER_MEDIA]: {
18
+ '&:hover': {
19
+ background: theme.palette.background.elementHover,
20
+ },
21
+ '&:hover .MuiOutlinedInput-notchedOutline': {
22
+ borderColor: theme.palette.grey[800],
23
+ transition: theme.transitions.create(['border-color'], {
24
+ easing: theme.transitions.easing.easeIn,
25
+ duration: theme.transitions.duration.shortest,
26
+ }),
27
+ },
28
+ '&.Mui-error:hover:not(.Mui-focused) .MuiOutlinedInput-notchedOutline': {
29
+ borderColor: theme.palette.error[900],
30
+ },
18
31
  },
19
32
  '&.Mui-disabled': {
20
33
  backgroundColor: theme.palette.components.disabled,
21
34
  },
22
- '&:hover .MuiOutlinedInput-notchedOutline': {
23
- borderColor: theme.palette.grey[800],
24
- transition: theme.transitions.create(['border-color'], {
25
- easing: theme.transitions.easing.easeIn,
26
- duration: theme.transitions.duration.shortest,
27
- }),
28
- },
29
35
  '&.Mui-disabled .MuiOutlinedInput-notchedOutline': {
30
36
  border: 'none',
31
37
  },
32
38
  '&.Mui-error .MuiOutlinedInput-notchedOutline': {
33
39
  borderColor: theme.palette.error.dark,
34
40
  },
35
- '&.Mui-error:hover:not(.Mui-focused) .MuiOutlinedInput-notchedOutline': {
36
- borderColor: theme.palette.error[900],
37
- },
38
41
  '&.Mui-focused .MuiOutlinedInput-notchedOutline': {
39
42
  borderColor: theme.palette.primary[700],
40
43
  transition: 'none',
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MuiSwitch = void 0;
4
+ const constants_1 = require("../../constants");
4
5
  const prepareColorToUrl = (color) => color.replace('#', '%23');
5
6
  const getCheckBackgroundImage = (color) => {
6
7
  const preparedColor = prepareColorToUrl(color);
@@ -33,13 +34,15 @@ exports.MuiSwitch = {
33
34
  opacity: 1,
34
35
  },
35
36
  },
36
- // CHECKED HOVER
37
- '& .Mui-checked:hover + .MuiSwitch-track': {
38
- backgroundColor: theme.palette.primary[700],
39
- },
40
- // NOT CHECKED HOVER
41
- '& :not(.Mui-checked):hover + .MuiSwitch-track': {
42
- backgroundColor: theme.palette.grey[600],
37
+ [constants_1.HOVER_MEDIA]: {
38
+ // CHECKED HOVER
39
+ '& .Mui-checked:hover + .MuiSwitch-track': {
40
+ backgroundColor: theme.palette.primary[700],
41
+ },
42
+ // NOT CHECKED HOVER
43
+ '& :not(.Mui-checked):hover + .MuiSwitch-track': {
44
+ backgroundColor: theme.palette.grey[600],
45
+ },
43
46
  },
44
47
  // DISABLED TRACK
45
48
  '& .MuiButtonBase-root.MuiSwitch-switchBase.Mui-disabled': {
@@ -61,8 +64,10 @@ exports.MuiSwitch = {
61
64
  },
62
65
  switchBase: {
63
66
  padding: 0,
64
- '&:hover, &.Mui-checked:hover': {
65
- backgroundColor: 'transparent',
67
+ [constants_1.HOVER_MEDIA]: {
68
+ '&:hover, &.Mui-checked:hover': {
69
+ backgroundColor: 'transparent',
70
+ },
66
71
  },
67
72
  },
68
73
  track({ theme }) {
@@ -1,13 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MuiTableRow = void 0;
4
+ const constants_1 = require("../../constants");
4
5
  exports.MuiTableRow = {
5
6
  styleOverrides: {
6
7
  root({ theme }) {
7
8
  return {
8
- '&.MuiTableRow-hover:hover': {
9
- backgroundColor: theme.palette.background.elementHover,
10
- cursor: 'pointer',
9
+ [constants_1.HOVER_MEDIA]: {
10
+ '&.MuiTableRow-hover:hover': {
11
+ backgroundColor: theme.palette.background.elementHover,
12
+ cursor: 'pointer',
13
+ },
14
+ },
15
+ [constants_1.HOVER_NONE_MEDIA]: {
16
+ '&.MuiTableRow-hover:hover': {
17
+ backgroundColor: 'transparent',
18
+ },
11
19
  },
12
20
  '&.Mui-selected': {
13
21
  backgroundColor: theme.palette.primary['100'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.101.0",
3
+ "version": "4.102.0",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {