@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
@@ -2,24 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GroupedColumnLabel = exports.BottomDrawerContent = exports.ChevronIcon = exports.CollapseButton = exports.CollapseCell = exports.CheckboxCell = exports.CellStyled = exports.ContentWrapper = exports.Wrapper = void 0;
4
4
  const ChevronROutlineMd_1 = require("../../../icons/ChevronROutlineMd");
5
+ const constants_1 = require("../../constants");
5
6
  const IconButton_1 = require("../../IconButton");
6
7
  const styled_1 = require("../../styled");
7
8
  const Typography_1 = require("../../Typography");
8
9
  const Cell_1 = require("../Cell");
9
- const constants_1 = require("../constants");
10
- const constants_2 = require("./constants");
10
+ const constants_2 = require("../constants");
11
+ const constants_3 = require("./constants");
11
12
  exports.Wrapper = styled_1.styled.li `
12
13
  --level: 0;
13
14
  position: relative;
14
15
 
15
16
  &:not(:last-of-type)::before,
16
- &.${constants_2.dataGridRowClassnames.hidden}::before {
17
+ &.${constants_3.dataGridRowClassnames.hidden}::before {
17
18
  content: '';
18
19
 
19
20
  position: absolute;
20
21
  z-index: 1;
21
22
  top: 0;
22
- transform: translateX(calc(${constants_1.ROOT_ACTION_CELL_WIDTH}px * var(--level) - ${constants_1.TREE_LINE_WIDTH}px));
23
+ transform: translateX(calc(${constants_2.ROOT_ACTION_CELL_WIDTH}px * var(--level) - ${constants_2.TREE_LINE_WIDTH}px));
23
24
 
24
25
  display: none;
25
26
 
@@ -30,8 +31,8 @@ exports.Wrapper = styled_1.styled.li `
30
31
  }
31
32
 
32
33
  ${({ theme }) => theme.breakpoints.up('mobile')} {
33
- &.${constants_2.dataGridRowClassnames.showConnector}::before,
34
- & .${constants_2.dataGridRowContentClassnames.root}::before {
34
+ &.${constants_3.dataGridRowClassnames.showConnector}::before,
35
+ & .${constants_3.dataGridRowContentClassnames.root}::before {
35
36
  display: block;
36
37
  }
37
38
  }
@@ -49,10 +50,10 @@ exports.Wrapper = styled_1.styled.li `
49
50
  padding-top: ${({ theme }) => theme.spacing(1)};
50
51
  }
51
52
 
52
- &.${constants_2.dataGridRowClassnames.mobileVariantCards} {
53
+ &.${constants_3.dataGridRowClassnames.mobileVariantCards} {
53
54
  border-bottom: none;
54
55
 
55
- &:not(.${constants_2.dataGridRowClassnames.nestedChildren}) {
56
+ &:not(.${constants_3.dataGridRowClassnames.nestedChildren}) {
56
57
  padding: ${({ theme }) => theme.spacing(5, 4, 4)};
57
58
 
58
59
  background-color: ${({ theme }) => theme.palette.background.default};
@@ -61,13 +62,13 @@ exports.Wrapper = styled_1.styled.li `
61
62
  }
62
63
  }
63
64
 
64
- &.${constants_2.dataGridRowClassnames.hasNestedChildren} {
65
- :not(.${constants_2.dataGridRowClassnames.nestedChildren}) .${Cell_1.dataGridCellClassnames.root}:last-of-type {
65
+ &.${constants_3.dataGridRowClassnames.hasNestedChildren} {
66
+ :not(.${constants_3.dataGridRowClassnames.nestedChildren}) .${Cell_1.dataGridCellClassnames.root}:last-of-type {
66
67
  padding-bottom: ${({ theme }) => theme.spacing(3)};
67
68
  }
68
69
 
69
70
  /* Ко всем ячейкам кроме первой применяем декоративный элемент слева и добавляем отступы для выравнивания с NestedChildren */
70
- &:not(.${constants_2.dataGridRowClassnames.nestedChildren}) > .${constants_2.dataGridRowContentClassnames.root} .${Cell_1.dataGridCellClassnames.root}:not(.${constants_2.dataGridRowCellClassnames.firstCell}) {
71
+ &:not(.${constants_3.dataGridRowClassnames.nestedChildren}) > .${constants_3.dataGridRowContentClassnames.root} .${Cell_1.dataGridCellClassnames.root}:not(.${constants_3.dataGridRowCellClassnames.firstCell}) {
71
72
  position: relative;
72
73
 
73
74
  margin-top: 0;
@@ -89,8 +90,8 @@ exports.Wrapper = styled_1.styled.li `
89
90
  }
90
91
 
91
92
  /* L-коннектор применяем ко 2 ячейки основной строки */
92
- &:not(.${constants_2.dataGridRowClassnames.nestedChildren})
93
- > .${constants_2.dataGridRowContentClassnames.root} .${Cell_1.dataGridCellClassnames.root}.${constants_2.dataGridRowCellClassnames.firstCell}
93
+ &:not(.${constants_3.dataGridRowClassnames.nestedChildren})
94
+ > .${constants_3.dataGridRowContentClassnames.root} .${Cell_1.dataGridCellClassnames.root}.${constants_3.dataGridRowCellClassnames.firstCell}
94
95
  + .${Cell_1.dataGridCellClassnames.root} {
95
96
  &::after {
96
97
  content: '';
@@ -99,7 +100,7 @@ exports.Wrapper = styled_1.styled.li `
99
100
  top: ${({ theme }) => theme.spacing(3)};
100
101
  left: 0;
101
102
 
102
- width: ${constants_1.MOBILE_TREE_LINE_WIDTH}px;
103
+ width: ${constants_2.MOBILE_TREE_LINE_WIDTH}px;
103
104
  height: ${({ theme }) => theme.spacing(2)};
104
105
 
105
106
  border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
@@ -109,7 +110,7 @@ exports.Wrapper = styled_1.styled.li `
109
110
  }
110
111
  }
111
112
 
112
- &.${constants_2.dataGridRowClassnames.nestedChildren} {
113
+ &.${constants_3.dataGridRowClassnames.nestedChildren} {
113
114
  padding: ${({ theme }) => theme.spacing(3, 0, 3, 5)};
114
115
 
115
116
  &::before {
@@ -147,9 +148,9 @@ exports.ContentWrapper = styled_1.styled.div `
147
148
 
148
149
  position: absolute;
149
150
  top: 0;
150
- transform: translateX(calc(${constants_1.ROOT_ACTION_CELL_WIDTH}px * var(--level) - ${constants_1.TREE_LINE_WIDTH}px));
151
+ transform: translateX(calc(${constants_2.ROOT_ACTION_CELL_WIDTH}px * var(--level) - ${constants_2.TREE_LINE_WIDTH}px));
151
152
 
152
- width: ${constants_1.TREE_LINE_WIDTH}px;
153
+ width: ${constants_2.TREE_LINE_WIDTH}px;
153
154
  height: 50%;
154
155
 
155
156
  border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
@@ -162,41 +163,43 @@ exports.ContentWrapper = styled_1.styled.div `
162
163
  }
163
164
 
164
165
  /* L-коннектор для nestedChildren на мобильных устройствах */
165
- .${constants_2.dataGridRowClassnames.nestedChildren} &::before {
166
+ .${constants_3.dataGridRowClassnames.nestedChildren} &::before {
166
167
  ${({ theme }) => theme.breakpoints.down('mobile')} {
167
168
  left: -20px;
168
169
  transform: none;
169
170
 
170
171
  display: block;
171
172
 
172
- width: ${constants_1.MOBILE_TREE_LINE_WIDTH}px;
173
+ width: ${constants_2.MOBILE_TREE_LINE_WIDTH}px;
173
174
 
174
175
  /* Высота 8px для выравнивания с названием колонки первой ячейки */
175
176
  height: ${({ theme }) => theme.spacing(2)};
176
177
  }
177
178
  }
178
179
 
179
- &.${constants_2.dataGridRowContentClassnames.active} {
180
+ &.${constants_3.dataGridRowContentClassnames.active} {
180
181
  background-color: ${({ theme }) => theme.palette.primary[100]};
181
182
  }
182
183
 
183
- &:hover {
184
- background-color: ${({ theme }) => theme.palette.background.elementHover};
184
+ ${constants_1.HOVER_MEDIA} {
185
+ &:hover {
186
+ background-color: ${({ theme }) => theme.palette.background.elementHover};
185
187
 
186
- &.${constants_2.dataGridRowContentClassnames.active} {
187
- background-color: ${({ theme }) => theme.palette.primary[100]};
188
- }
188
+ &.${constants_3.dataGridRowContentClassnames.active} {
189
+ background-color: ${({ theme }) => theme.palette.primary[100]};
190
+ }
189
191
 
190
- &.${constants_2.dataGridRowContentClassnames.hovered} {
191
- cursor: pointer;
192
+ &.${constants_3.dataGridRowContentClassnames.hovered} {
193
+ cursor: pointer;
194
+ }
192
195
  }
193
196
  }
194
197
 
195
198
 
196
- &.${constants_2.dataGridRowClassnames.hover} {
199
+ &.${constants_3.dataGridRowClassnames.hover} {
197
200
  background-color: ${({ theme }) => theme.palette.background.elementHover};
198
201
 
199
- &.${constants_2.dataGridRowContentClassnames.hovered} {
202
+ &.${constants_3.dataGridRowContentClassnames.hovered} {
200
203
  cursor: pointer;
201
204
  }
202
205
  }
@@ -204,24 +207,14 @@ exports.ContentWrapper = styled_1.styled.div `
204
207
  ${({ theme }) => theme.breakpoints.down('mobile')} {
205
208
  grid-template-columns: 1fr;
206
209
 
207
- &.${constants_2.dataGridRowContentClassnames.active} {
208
- background-color: transparent;
209
- }
210
-
211
- &:hover, &.${constants_2.dataGridRowClassnames.hover} {
212
- cursor: initial;
213
-
210
+ &.${constants_3.dataGridRowContentClassnames.active} {
214
211
  background-color: transparent;
215
-
216
- &.${constants_2.dataGridRowContentClassnames.active} {
217
- background-color: transparent;
218
- }
219
212
  }
220
213
  }
221
214
  `;
222
215
  exports.CellStyled = (0, styled_1.styled)(Cell_1.Cell) `
223
216
  &:first-of-type {
224
- margin-left: calc(var(--level) * ${constants_1.ROOT_ACTION_CELL_WIDTH}px);
217
+ margin-left: calc(var(--level) * ${constants_2.ROOT_ACTION_CELL_WIDTH}px);
225
218
  }
226
219
  `;
227
220
  exports.CheckboxCell = styled_1.styled.div `
@@ -230,14 +223,14 @@ exports.CheckboxCell = styled_1.styled.div `
230
223
  align-self: center;
231
224
  justify-content: center;
232
225
 
233
- width: ${constants_1.ROOT_ACTION_CELL_WIDTH}px;
226
+ width: ${constants_2.ROOT_ACTION_CELL_WIDTH}px;
234
227
  `;
235
228
  exports.CollapseCell = styled_1.styled.div `
236
229
  display: flex;
237
230
  align-items: center;
238
231
  justify-content: center;
239
232
 
240
- width: ${constants_1.ROOT_ACTION_CELL_WIDTH}px;
233
+ width: ${constants_2.ROOT_ACTION_CELL_WIDTH}px;
241
234
 
242
235
  ${({ theme }) => theme.breakpoints.down('mobile')} {
243
236
  display: none;
@@ -249,8 +242,10 @@ exports.CollapseButton = (0, styled_1.styled)(IconButton_1.IconButton) `
249
242
 
250
243
  color: inherit;
251
244
 
252
- &:hover {
253
- background-color: ${({ theme }) => theme.palette.grey[300]};
245
+ ${constants_1.HOVER_MEDIA} {
246
+ &:hover {
247
+ background-color: ${({ theme }) => theme.palette.grey[300]};
248
+ }
254
249
  }
255
250
  `;
256
251
  exports.ChevronIcon = (0, styled_1.styled)(ChevronROutlineMd_1.ChevronROutlineMd, {
@@ -276,7 +271,7 @@ exports.GroupedColumnLabel = (0, styled_1.styled)(Typography_1.Typography) `
276
271
 
277
272
  margin-top: ${({ theme }) => theme.spacing(3)};
278
273
 
279
- &.${constants_2.dataGridGroupedColumnLabelClassnames.hidden} {
274
+ &.${constants_3.dataGridGroupedColumnLabelClassnames.hidden} {
280
275
  display: none;
281
276
  }
282
277
  }
@@ -1,16 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BottomDrawerContent = exports.ContentWrapper = exports.Wrapper = exports.CheckboxCell = void 0;
4
+ const constants_1 = require("../../constants");
4
5
  const styled_1 = require("../../styled");
5
- const constants_1 = require("../constants");
6
- const constants_2 = require("./constants");
6
+ const constants_2 = require("../constants");
7
+ const constants_3 = require("./constants");
7
8
  exports.CheckboxCell = styled_1.styled.div `
8
9
  display: flex;
9
10
  align-items: center;
10
11
  align-self: center;
11
12
  justify-content: center;
12
13
 
13
- width: ${constants_1.ROOT_ACTION_CELL_WIDTH}px;
14
+ width: ${constants_2.ROOT_ACTION_CELL_WIDTH}px;
14
15
  `;
15
16
  exports.Wrapper = styled_1.styled.li `
16
17
  --row-base-grid-columns: 1fr;
@@ -30,7 +31,7 @@ exports.Wrapper = styled_1.styled.li `
30
31
  padding-top: ${({ theme }) => theme.spacing(1)};
31
32
  }
32
33
 
33
- &.${constants_2.dataGridRowBaseClassnames.mobileVariantCards} {
34
+ &.${constants_3.dataGridRowBaseClassnames.mobileVariantCards} {
34
35
  padding: ${({ theme }) => theme.spacing(5, 4, 4)};
35
36
 
36
37
  background-color: ${({ theme }) => theme.palette.background.default};
@@ -49,38 +50,30 @@ exports.ContentWrapper = styled_1.styled.div `
49
50
 
50
51
  background-color: transparent;
51
52
 
52
- &.${constants_2.dataGridRowBaseClassnames.active} {
53
+ &.${constants_3.dataGridRowBaseClassnames.active} {
53
54
  background-color: ${({ theme }) => theme.palette.primary[100]};
54
55
  }
55
56
 
56
- &:hover {
57
- background-color: ${({ theme }) => theme.palette.background.elementHover};
57
+ ${constants_1.HOVER_MEDIA} {
58
+ &:hover {
59
+ background-color: ${({ theme }) => theme.palette.background.elementHover};
58
60
 
59
- &.${constants_2.dataGridRowBaseClassnames.active} {
60
- background-color: ${({ theme }) => theme.palette.primary[100]};
61
- }
61
+ &.${constants_3.dataGridRowBaseClassnames.active} {
62
+ background-color: ${({ theme }) => theme.palette.primary[100]};
63
+ }
62
64
 
63
- &.${constants_2.dataGridRowBaseClassnames.hovered} {
64
- cursor: pointer;
65
+ &.${constants_3.dataGridRowBaseClassnames.hovered} {
66
+ cursor: pointer;
67
+ }
65
68
  }
66
69
  }
67
70
 
68
71
  ${({ theme }) => theme.breakpoints.down('mobile')} {
69
72
  grid-template-columns: 1fr;
70
73
 
71
- &.${constants_2.dataGridRowBaseClassnames.active} {
74
+ &.${constants_3.dataGridRowBaseClassnames.active} {
72
75
  background-color: transparent;
73
76
  }
74
-
75
- &:hover, &.${constants_2.dataGridRowBaseClassnames.hovered} {
76
- cursor: initial;
77
-
78
- background-color: transparent;
79
-
80
- &.${constants_2.dataGridRowBaseClassnames.active} {
81
- background-color: transparent;
82
- }
83
- }
84
77
  }
85
78
  `;
86
79
  exports.BottomDrawerContent = styled_1.styled.div `
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StyledRowBase = exports.ChevronIcon = exports.CollapseCell = exports.CollapseButton = exports.MobileExpandButtonWrapper = exports.ChildrenWrapper = exports.CollapseContent = exports.CollapseContainer = void 0;
4
4
  const ChevronROutlineMd_1 = require("../../icons/ChevronROutlineMd");
5
5
  const Button_1 = require("../Button");
6
- const constants_1 = require("../DataGrid/constants");
6
+ const constants_1 = require("../constants");
7
+ const constants_2 = require("../DataGrid/constants");
7
8
  const RowBase_1 = require("../DataGrid/RowBase");
8
9
  const IconButton_1 = require("../IconButton");
9
10
  const styled_1 = require("../styled");
10
- const constants_2 = require("./constants");
11
+ const constants_3 = require("./constants");
11
12
  exports.CollapseContainer = styled_1.styled.div `
12
13
  width: 100%;
13
14
  margin-bottom: ${({ theme }) => theme.spacing(4)};
@@ -47,8 +48,10 @@ exports.CollapseButton = (0, styled_1.styled)(IconButton_1.IconButton) `
47
48
 
48
49
  color: inherit;
49
50
 
50
- &:hover {
51
- background-color: ${({ theme }) => theme.palette.grey[300]};
51
+ ${constants_1.HOVER_MEDIA} {
52
+ &:hover {
53
+ background-color: ${({ theme }) => theme.palette.grey[300]};
54
+ }
52
55
  }
53
56
  `;
54
57
  exports.CollapseCell = styled_1.styled.div `
@@ -56,7 +59,7 @@ exports.CollapseCell = styled_1.styled.div `
56
59
  align-items: center;
57
60
  justify-content: center;
58
61
 
59
- width: ${constants_1.ROOT_ACTION_CELL_WIDTH}px;
62
+ width: ${constants_2.ROOT_ACTION_CELL_WIDTH}px;
60
63
 
61
64
  ${({ theme }) => theme.breakpoints.down('mobile')} {
62
65
  display: none;
@@ -70,7 +73,7 @@ exports.ChevronIcon = (0, styled_1.styled)(ChevronROutlineMd_1.ChevronROutlineMd
70
73
  duration: theme.transitions.duration.short,
71
74
  })};
72
75
 
73
- &.${constants_2.collapsibleRowClassnames.chevronIconActive} {
76
+ &.${constants_3.collapsibleRowClassnames.chevronIconActive} {
74
77
  transform: rotateZ(90deg);
75
78
  }
76
79
  `;
@@ -90,11 +93,11 @@ exports.StyledRowBase = (0, styled_1.styled)(RowBase_1.RowBase) `
90
93
  outline: 1px solid ${({ theme }) => theme.palette.grey[300]};
91
94
  }
92
95
 
93
- & .${constants_2.collapsibleRowClassnames.collapseButton} {
96
+ & .${constants_3.collapsibleRowClassnames.collapseButton} {
94
97
  padding-left: ${({ theme }) => theme.spacing(4)};
95
98
  }
96
99
 
97
- & .${constants_2.collapsibleRowClassnames.collapsibleContent} {
100
+ & .${constants_3.collapsibleRowClassnames.collapsibleContent} {
98
101
  background-color: transparent;
99
102
  }
100
103
  }
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Wrapper = exports.StyledCopyTypography = exports.StyledTypography = void 0;
4
4
  const CopyTypography_1 = require("../../CopyTypography");
5
+ const constants_1 = require("../../constants");
5
6
  const styled_1 = require("../../styled");
6
7
  const Typography_1 = require("../../Typography");
7
8
  exports.StyledTypography = (0, styled_1.styled)(Typography_1.Typography, {
@@ -19,8 +20,10 @@ exports.StyledTypography = (0, styled_1.styled)(Typography_1.Typography, {
19
20
  text-align: ${({ $direction }) => $direction !== 'row' ? 'left' : 'right'};
20
21
  }
21
22
 
22
- &:hover {
23
- text-decoration: ${({ $canCopy }) => ($canCopy ? 'underline' : 'none')};
23
+ ${constants_1.HOVER_MEDIA} {
24
+ &:hover {
25
+ text-decoration: ${({ $canCopy }) => ($canCopy ? 'underline' : 'none')};
26
+ }
24
27
  }
25
28
  `;
26
29
  exports.StyledCopyTypography = (0, styled_1.styled)(CopyTypography_1.CopyTypography, {
@@ -1,2 +1,2 @@
1
1
  import type { DialogProps } from './types';
2
- export declare const Dialog: ({ children, title, disableBackdropClick, onClose, size, headerContent, className, classes, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Dialog: ({ children, title, disableBackdropClick, onClose, size, headerContent, className, classes, disableMobileDrawer, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
@@ -16,14 +16,15 @@ const dialogCva = (0, cva_1.cva)(constants_1.dialogClassnames.root, {
16
16
  },
17
17
  },
18
18
  });
19
- const Dialog = ({ children, title, disableBackdropClick, onClose, size = 'md', headerContent, className, classes, ...props }) => {
20
- const { handleClose, isMobile, dialogClasses } = (0, useLogic_1.useLogic)({
19
+ const Dialog = ({ children, title, disableBackdropClick, onClose, size = 'md', headerContent, className, classes, disableMobileDrawer, ...props }) => {
20
+ const { handleClose, shouldRenderDrawer, dialogClasses } = (0, useLogic_1.useLogic)({
21
21
  onClose,
22
22
  disableBackdropClick,
23
23
  classes,
24
+ disableMobileDrawer,
24
25
  });
25
- if (isMobile) {
26
- return ((0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { onClose: handleClose, title: title, headerContent: headerContent, ...props, children: children }));
26
+ if (shouldRenderDrawer) {
27
+ return ((0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { onClose: handleClose, title: title, headerContent: headerContent, className: className, ...props, children: children }));
27
28
  }
28
29
  return ((0, jsx_runtime_1.jsxs)(styles_1.StyledDialog, { "$size": size, onClose: handleClose, className: (0, cn_1.cn)(dialogCva({ withoutTitle: !title }), className), classes: dialogClasses, ...props, children: [title && ((0, jsx_runtime_1.jsx)(DialogTitle_1.DialogTitle, { onClose: onClose, headerContent: headerContent, children: title })), children] }));
29
30
  };
@@ -34,6 +34,14 @@ exports.StyledDialog = (0, styled_1.styled)(Dialog_1.default, {
34
34
  box-shadow: ${({ theme }) => theme.elevation[300]};
35
35
  }
36
36
 
37
+ ${({ theme }) => theme.breakpoints.down('mobile')} {
38
+ .${constants_1.dialogClassnames.paper} {
39
+ width: calc(100% - ${({ theme }) => theme.spacing(8)});
40
+ min-width: auto;
41
+ margin: ${({ theme }) => theme.spacing(4)};
42
+ }
43
+ }
44
+
37
45
  /* Причина игнора: Не критично для отображения */
38
46
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
39
47
  &:not(:has(.${DialogActions_1.dialogActionsClassnames.root})) .${DialogContent_1.dialogContentClassnames.root} {
@@ -20,4 +20,9 @@ export type DialogProps = WithoutEmotionSpecific<Omit<MuiDialogProps, 'title' |
20
20
  * Дополнительный контент хедера
21
21
  */
22
22
  headerContent?: ReactNode;
23
+ /**
24
+ * Отключить BottomDrawer на mobile: диалог остаётся центрированным модальным окном.
25
+ * @default false
26
+ */
27
+ disableMobileDrawer?: boolean;
23
28
  };
@@ -1,9 +1,9 @@
1
1
  import { type MouseEvent } from 'react';
2
2
  import { type DialogProps } from '../types';
3
- type UseLogicParams = Pick<DialogProps, 'onClose' | 'disableBackdropClick' | 'classes'>;
4
- export declare const useLogic: ({ onClose, disableBackdropClick, classes, }: UseLogicParams) => {
3
+ type UseLogicParams = Pick<DialogProps, 'onClose' | 'disableBackdropClick' | 'classes' | 'disableMobileDrawer'>;
4
+ export declare const useLogic: ({ onClose, disableBackdropClick, classes, disableMobileDrawer, }: UseLogicParams) => {
5
5
  handleClose: ((event: MouseEvent<HTMLButtonElement>, reason: 'backdropClick' | 'escapeKeyDown') => void) | undefined;
6
- isMobile: boolean;
6
+ shouldRenderDrawer: boolean;
7
7
  dialogClasses: {
8
8
  root?: string | undefined;
9
9
  scrollPaper?: string | undefined;
@@ -4,7 +4,7 @@ exports.useLogic = void 0;
4
4
  const useViewportType_1 = require("../../useViewportType");
5
5
  const cn_1 = require("../../utils/cn");
6
6
  const constants_1 = require("../constants");
7
- const useLogic = ({ onClose, disableBackdropClick, classes, }) => {
7
+ const useLogic = ({ onClose, disableBackdropClick, classes, disableMobileDrawer, }) => {
8
8
  const { isMobile } = (0, useViewportType_1.useViewportType)();
9
9
  const handleClose = onClose &&
10
10
  ((event, reason) => {
@@ -18,6 +18,10 @@ const useLogic = ({ onClose, disableBackdropClick, classes, }) => {
18
18
  paper: (0, cn_1.cn)(constants_1.dialogClassnames.paper, paper),
19
19
  ...restClasses,
20
20
  };
21
- return { handleClose, isMobile, dialogClasses };
21
+ return {
22
+ handleClose,
23
+ shouldRenderDrawer: isMobile && !disableMobileDrawer,
24
+ dialogClasses,
25
+ };
22
26
  };
23
27
  exports.useLogic = useLogic;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StyledChevron = exports.Title = exports.Wrapper = void 0;
4
4
  const Chevron_1 = require("../../Chevron");
5
+ const constants_1 = require("../../constants");
5
6
  const styled_1 = require("../../styled");
6
7
  const getBackgroundColor = (theme, isDisabled, isSelected) => {
7
8
  if (isDisabled) {
@@ -31,8 +32,10 @@ exports.Wrapper = (0, styled_1.styled)('summary', {
31
32
  duration: theme.transitions.duration.standard,
32
33
  })};
33
34
 
34
- &:hover {
35
- background-color: ${({ theme }) => theme.palette.background.elementHover};
35
+ ${constants_1.HOVER_MEDIA} {
36
+ &:hover {
37
+ background-color: ${({ theme }) => theme.palette.background.elementHover};
38
+ }
36
39
  }
37
40
 
38
41
  &:focus-visible {
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.StyledFab = void 0;
7
7
  const ButtonBase_1 = require("@mui/material/ButtonBase");
8
8
  const Fab_1 = __importDefault(require("@mui/material/Fab"));
9
+ const constants_1 = require("../constants");
9
10
  const styled_1 = require("../styled");
10
11
  const enums_1 = require("./enums");
11
12
  const getBgColor = ({ theme, color, fabState, }) => {
@@ -76,10 +77,18 @@ exports.StyledFab = (0, styled_1.styled)(Fab_1.default, {
76
77
  border-radius: ${({ theme, isSquare }) => isSquare ? theme.shape.medium : '50%'};
77
78
  box-shadow: ${({ theme }) => theme.elevation[200]};
78
79
 
79
- :hover {
80
- color: ${(props) => getColor({ ...props })};
80
+ ${constants_1.HOVER_MEDIA} {
81
+ :hover {
82
+ color: ${(props) => getColor({ ...props })};
81
83
 
82
- background: ${(props) => getBgColor({ ...props, fabState: enums_1.FabStates.Hover })};
84
+ background: ${(props) => getBgColor({ ...props, fabState: enums_1.FabStates.Hover })};
85
+ }
86
+ }
87
+
88
+ ${constants_1.HOVER_NONE_MEDIA} {
89
+ &:hover {
90
+ background-color: ${(props) => getBgColor({ ...props, fabState: enums_1.FabStates.Default })};
91
+ }
83
92
  }
84
93
 
85
94
  :active {
@@ -25,7 +25,8 @@ exports.Body = styled_1.styled.div `
25
25
  display: flex;
26
26
  flex-direction: column;
27
27
 
28
- width: min(400px, calc(100vw - ${({ theme }) => theme.spacing(8)}));
28
+ /* Отступ popover от края вьюпорта — иначе поля по краям разъедутся. */
29
+ width: min(400px, calc(100vw - var(--popover-viewport-padding, 16px) * 2));
29
30
  padding: ${({ theme }) => theme.spacing(6)};
30
31
 
31
32
  ${({ theme }) => theme.breakpoints.down('mobile')} {
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Item = void 0;
4
+ const constants_1 = require("../constants");
4
5
  const styled_1 = require("../styled");
5
- const constants_1 = require("./constants");
6
+ const constants_2 = require("./constants");
6
7
  exports.Item = styled_1.styled.li `
7
8
  list-style-type: none;
8
9
 
9
- ${`.${constants_1.infiniteDataListClassnames.item}`} {
10
+ ${`.${constants_2.infiniteDataListClassnames.item}`} {
10
11
  cursor: pointer;
11
12
 
12
13
  padding: ${({ theme }) => theme.spacing(3, 4)};
@@ -18,8 +19,10 @@ exports.Item = styled_1.styled.li `
18
19
  duration: theme.transitions.duration.shortest,
19
20
  })};
20
21
 
21
- &:hover {
22
- background-color: ${({ theme }) => theme.palette.background.element};
22
+ ${constants_1.HOVER_MEDIA} {
23
+ &:hover {
24
+ background-color: ${({ theme }) => theme.palette.background.element};
25
+ }
23
26
  }
24
27
 
25
28
  ${({ theme }) => theme.breakpoints.down('mobile')} {
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LoaderWrapper = exports.ActionsWrapper = exports.Wrapper = void 0;
4
+ const constants_1 = require("../../constants");
4
5
  const styled_1 = require("../../styled");
5
- const constants_1 = require("./constants");
6
+ const constants_2 = require("./constants");
6
7
  exports.Wrapper = styled_1.styled.div `
7
8
  cursor: default;
8
9
 
@@ -21,26 +22,28 @@ exports.Wrapper = styled_1.styled.div `
21
22
  duration: theme.transitions.duration.shortest,
22
23
  })};
23
24
 
24
- &:hover {
25
- background-color: ${({ theme }) => theme.palette.background.elementHover};
25
+ ${constants_1.HOVER_MEDIA} {
26
+ &:hover {
27
+ background-color: ${({ theme }) => theme.palette.background.elementHover};
28
+ }
26
29
  }
27
30
 
28
- &.${constants_1.infiniteTreeListItemClassnames.hasNested} {
31
+ &.${constants_2.infiniteTreeListItemClassnames.hasNested} {
29
32
  cursor: pointer;
30
33
  }
31
34
 
32
- &.${constants_1.infiniteTreeListItemClassnames.loading} {
35
+ &.${constants_2.infiniteTreeListItemClassnames.loading} {
33
36
  cursor: default;
34
37
  }
35
38
 
36
- &.${constants_1.infiniteTreeListItemClassnames.disabled} {
39
+ &.${constants_2.infiniteTreeListItemClassnames.disabled} {
37
40
  cursor: default;
38
41
 
39
42
  opacity: 0.5;
40
43
  }
41
44
 
42
- &.${constants_1.infiniteTreeListItemClassnames.loading}:hover,
43
- &.${constants_1.infiniteTreeListItemClassnames.disabled}:hover {
45
+ &.${constants_2.infiniteTreeListItemClassnames.loading}:hover,
46
+ &.${constants_2.infiniteTreeListItemClassnames.disabled}:hover {
44
47
  background-color: ${({ theme }) => theme.palette.background.default};
45
48
  }
46
49
  `;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InputsWrapper = void 0;
4
4
  const FormControl_1 = require("@mui/material/FormControl");
5
5
  const InputBase_1 = require("@mui/material/InputBase");
6
+ const constants_1 = require("../constants");
6
7
  const styled_1 = require("../styled");
7
8
  exports.InputsWrapper = styled_1.styled.fieldset `
8
9
  display: grid;
@@ -79,11 +80,13 @@ exports.InputsWrapper = styled_1.styled.fieldset `
79
80
  width: auto;
80
81
  margin-right: -2px;
81
82
 
82
- &:hover {
83
- z-index: 3;
84
-
85
- &.${InputBase_1.inputBaseClasses.disabled} {
86
- z-index: 1;
83
+ ${constants_1.HOVER_MEDIA} {
84
+ &:hover {
85
+ z-index: 3;
86
+
87
+ &.${InputBase_1.inputBaseClasses.disabled} {
88
+ z-index: 1;
89
+ }
87
90
  }
88
91
  }
89
92
  }