@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
@@ -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'],
@@ -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} {
@@ -7,6 +7,7 @@ exports.StyledBreadcrumbs = void 0;
7
7
  const Breadcrumbs_1 = __importDefault(require("@mui/material/Breadcrumbs"));
8
8
  const ButtonBase_1 = require("@mui/material/ButtonBase");
9
9
  const Link_1 = require("@mui/material/Link");
10
+ const constants_1 = require("../constants");
10
11
  const styled_1 = require("../styled");
11
12
  exports.StyledBreadcrumbs = (0, styled_1.styled)(Breadcrumbs_1.default) `
12
13
  .${ButtonBase_1.buttonBaseClasses.root} {
@@ -20,22 +21,24 @@ exports.StyledBreadcrumbs = (0, styled_1.styled)(Breadcrumbs_1.default) `
20
21
  outline: 2px solid ${({ theme }) => theme.palette.components.focused};
21
22
  }
22
23
 
23
- &:hover {
24
- &::after {
25
- content: '';
24
+ ${constants_1.HOVER_MEDIA} {
25
+ &:hover {
26
+ &::after {
27
+ content: '';
26
28
 
27
- position: absolute;
28
- bottom: 3px;
29
- left: ${({ theme }) => theme.microSpacing(3)};
29
+ position: absolute;
30
+ bottom: 3px;
31
+ left: ${({ theme }) => theme.microSpacing(3)};
30
32
 
31
- width: ${({ theme }) => theme.spacing(3)};
32
- height: 1px;
33
+ width: ${({ theme }) => theme.spacing(3)};
34
+ height: 1px;
33
35
 
34
- background-color: currentColor;
36
+ background-color: currentColor;
37
+ }
35
38
  }
36
39
  }
37
40
  }
38
-
41
+
39
42
  .MuiTypography-body1 {
40
43
  color: ${({ theme }) => theme.palette.primary[800]};
41
44
  }
@@ -46,9 +49,11 @@ exports.StyledBreadcrumbs = (0, styled_1.styled)(Breadcrumbs_1.default) `
46
49
  &:visited {
47
50
  color: ${({ theme }) => theme.palette.grey[700]};
48
51
  }
49
-
50
- &:hover {
51
- color: ${({ theme }) => theme.palette.grey[800]};
52
+
53
+ ${constants_1.HOVER_MEDIA} {
54
+ &:hover {
55
+ color: ${({ theme }) => theme.palette.grey[800]};
56
+ }
52
57
  }
53
58
  }
54
59
  `;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StyledTag = exports.HiddenInput = exports.Wrapper = void 0;
4
4
  const Badge_1 = require("@mui/material/Badge");
5
+ const constants_1 = require("../constants");
5
6
  const styled_1 = require("../styled");
6
7
  const Tag_1 = require("../Tag");
7
8
  const getHoverBgColor = ({ theme, color, isChecked, variant, disabled, }) => {
@@ -118,21 +119,23 @@ exports.StyledTag = (0, styled_1.styled)(Tag_1.Tag, {
118
119
  cursor: pointer;
119
120
  }
120
121
 
121
- &:hover {
122
- background-color: ${({ theme, color, variant, disabled, $isChecked }) => getHoverBgColor({
122
+ ${constants_1.HOVER_MEDIA} {
123
+ &:hover {
124
+ background-color: ${({ theme, color, variant, disabled, $isChecked }) => getHoverBgColor({
123
125
  theme,
124
126
  color,
125
127
  variant,
126
128
  disabled,
127
129
  isChecked: $isChecked,
128
130
  })};
129
- border: ${({ theme, variant, $isChecked, color }) => getBorder({
131
+ border: ${({ theme, variant, $isChecked, color }) => getBorder({
130
132
  theme,
131
133
  variant,
132
134
  isChecked: $isChecked,
133
135
  tagState: 'hover',
134
136
  color,
135
137
  })};
138
+ }
136
139
  }
137
140
 
138
141
  &:active {
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IconWrapper = exports.Input = exports.Wrapper = void 0;
4
+ const constants_1 = require("../constants");
4
5
  const styled_1 = require("../styled");
5
6
  const mixins_1 = require("../styled/mixins");
6
- const constants_1 = require("./constants");
7
+ const constants_2 = require("./constants");
7
8
  const getOutlineColor = ({ theme, isHover, isDisabled, isError, isChecked, isIndeterminate, }) => {
8
9
  if (isDisabled) {
9
10
  return theme.palette.components.border.default;
@@ -24,17 +25,17 @@ exports.Wrapper = (0, styled_1.styled)('span', {
24
25
  display: flex;
25
26
  justify-content: center;
26
27
 
27
- .${constants_1.checkboxClassnames.icon} {
28
+ .${constants_2.checkboxClassnames.icon} {
28
29
  fill: ${({ $isDisabled, theme }) => $isDisabled && theme.palette.components.disabled};
29
30
  }
30
31
 
31
- .${constants_1.checkboxClassnames.symbol} {
32
+ .${constants_2.checkboxClassnames.symbol} {
32
33
  fill: ${({ $isDisabled, theme }) => $isDisabled ? theme.palette.grey[500] : 'white'};
33
34
 
34
35
  ${mixins_1.easeOutBackTransition};
35
36
  }
36
37
 
37
- .${constants_1.checkboxClassnames.outline} {
38
+ .${constants_2.checkboxClassnames.outline} {
38
39
  fill: ${({ $isDisabled, $isChecked, $isIndeterminate }) => !$isDisabled && !$isChecked && !$isIndeterminate && 'white'};
39
40
  stroke: ${({ theme, $isDisabled, $isError, $isChecked, $isIndeterminate, }) => getOutlineColor({
40
41
  theme,
@@ -48,31 +49,32 @@ exports.Wrapper = (0, styled_1.styled)('span', {
48
49
  ${mixins_1.easeOutBackTransition};
49
50
  }
50
51
 
51
- .${constants_1.checkboxClassnames.iconChecked} {
52
+ .${constants_2.checkboxClassnames.iconChecked} {
52
53
  transform-origin: bottom;
53
54
  transform: ${({ $isChecked, $isIndeterminate }) => $isChecked && !$isIndeterminate ? 'scale(1)' : 'scale(0)'};
54
55
 
55
56
  opacity: ${({ $isChecked, $isIndeterminate }) => $isChecked && !$isIndeterminate ? 1 : 0};
56
57
  }
57
58
 
58
- .${constants_1.checkboxClassnames.iconIndeterminate} {
59
+ .${constants_2.checkboxClassnames.iconIndeterminate} {
59
60
  transform-origin: bottom;
60
61
  transform: ${({ $isIndeterminate }) => $isIndeterminate ? 'scale(1)' : 'scale(0)'};
61
62
 
62
63
  opacity: ${({ $isIndeterminate }) => ($isIndeterminate ? 1 : 0)};
63
64
  }
64
65
 
65
- &:hover {
66
- .${constants_1.checkboxClassnames.icon} {
67
- color: ${({ $isError, theme }) => $isError ? theme.palette.error[700] : theme.palette.primary[700]};
68
- }
66
+ ${constants_1.HOVER_MEDIA} {
67
+ &:hover {
68
+ .${constants_2.checkboxClassnames.icon} {
69
+ color: ${({ $isError, theme }) => $isError ? theme.palette.error[700] : theme.palette.primary[700]};
70
+ }
69
71
 
70
- .${constants_1.checkboxClassnames.outline} {
71
- fill: ${({ theme, $isDisabled, $isChecked, $isIndeterminate }) => !$isDisabled &&
72
+ .${constants_2.checkboxClassnames.outline} {
73
+ fill: ${({ theme, $isDisabled, $isChecked, $isIndeterminate }) => !$isDisabled &&
72
74
  !$isChecked &&
73
75
  !$isIndeterminate &&
74
76
  theme.palette.background.elementHover};
75
- stroke: ${({ theme, $isDisabled, $isError, $isChecked, $isIndeterminate, }) => getOutlineColor({
77
+ stroke: ${({ theme, $isDisabled, $isError, $isChecked, $isIndeterminate, }) => getOutlineColor({
76
78
  theme,
77
79
  isHover: true,
78
80
  isDisabled: $isDisabled,
@@ -80,6 +82,7 @@ exports.Wrapper = (0, styled_1.styled)('span', {
80
82
  isChecked: $isChecked,
81
83
  isIndeterminate: $isIndeterminate,
82
84
  })};
85
+ }
83
86
  }
84
87
  }
85
88
  `;
@@ -88,19 +91,19 @@ exports.Input = styled_1.styled.input `
88
91
 
89
92
  position: absolute;
90
93
 
91
- width: ${constants_1.CHECKBOX_SIZE};
92
- height: ${constants_1.CHECKBOX_SIZE};
94
+ width: ${constants_2.CHECKBOX_SIZE};
95
+ height: ${constants_2.CHECKBOX_SIZE};
93
96
  margin: 0;
94
97
 
95
98
  opacity: 0;
96
99
 
97
100
  ${({ theme }) => theme.breakpoints.down('mobile')} {
98
- width: ${constants_1.MOBILE_CHECKBOX_SIZE};
99
- height: ${constants_1.MOBILE_CHECKBOX_SIZE};
101
+ width: ${constants_2.MOBILE_CHECKBOX_SIZE};
102
+ height: ${constants_2.MOBILE_CHECKBOX_SIZE};
100
103
  }
101
104
 
102
105
  &:focus-visible {
103
- ~ .${constants_1.checkboxClassnames.iconWrapper} > .${constants_1.checkboxClassnames.icon} {
106
+ ~ .${constants_2.checkboxClassnames.iconWrapper} > .${constants_2.checkboxClassnames.icon} {
104
107
  border-radius: ${({ theme }) => theme.shape.small};
105
108
  outline: 2px solid ${({ theme }) => theme.palette.components.focused};
106
109
  outline-offset: -2px;
@@ -112,14 +115,14 @@ exports.IconWrapper = styled_1.styled.span `
112
115
  align-items: center;
113
116
  justify-content: center;
114
117
 
115
- width: ${constants_1.CHECKBOX_SIZE};
116
- height: ${constants_1.CHECKBOX_SIZE};
118
+ width: ${constants_2.CHECKBOX_SIZE};
119
+ height: ${constants_2.CHECKBOX_SIZE};
117
120
 
118
121
  ${({ theme }) => theme.breakpoints.down('mobile')} {
119
- width: ${constants_1.MOBILE_CHECKBOX_SIZE};
120
- height: ${constants_1.MOBILE_CHECKBOX_SIZE};
122
+ width: ${constants_2.MOBILE_CHECKBOX_SIZE};
123
+ height: ${constants_2.MOBILE_CHECKBOX_SIZE};
121
124
 
122
- .${constants_1.checkboxClassnames.icon} {
125
+ .${constants_2.checkboxClassnames.icon} {
123
126
  width: 20px;
124
127
  height: 20px;
125
128
  }
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Label = exports.AdornmentWrapper = exports.StyledCounter = exports.HiddenInput = exports.Wrapper = void 0;
4
4
  const Badge_1 = require("@mui/material/Badge");
5
5
  const Counter_1 = require("../Counter");
6
+ const constants_1 = require("../constants");
6
7
  const styled_1 = require("../styled");
7
8
  const Typography_1 = require("../Typography");
8
- const constants_1 = require("./constants");
9
+ const constants_2 = require("./constants");
9
10
  exports.Wrapper = styled_1.styled.div `
10
11
  cursor: pointer;
11
12
  user-select: none;
@@ -24,9 +25,11 @@ exports.Wrapper = styled_1.styled.div `
24
25
  duration: theme.transitions.duration.shortest,
25
26
  })};
26
27
 
27
- &:hover {
28
- background-color: ${({ theme }) => theme.palette.background.elementHover};
29
- border-color: ${({ theme }) => theme.palette.grey[400]};
28
+ ${constants_1.HOVER_MEDIA} {
29
+ &:hover {
30
+ background-color: ${({ theme }) => theme.palette.background.elementHover};
31
+ border-color: ${({ theme }) => theme.palette.grey[400]};
32
+ }
30
33
  }
31
34
 
32
35
  &:active {
@@ -34,63 +37,65 @@ exports.Wrapper = styled_1.styled.div `
34
37
  border-color: ${({ theme }) => theme.palette.grey[800]};
35
38
  }
36
39
 
37
- &.${constants_1.chipClassnames.hasIcon},
38
- &.${constants_1.chipClassnames.hasEndAdornment}:not(.${constants_1.chipClassnames.hasStatusIcon}),
39
- &.${constants_1.chipClassnames.hasCounter}:not(.${constants_1.chipClassnames.hasStatusIcon}) {
40
+ &.${constants_2.chipClassnames.hasIcon},
41
+ &.${constants_2.chipClassnames.hasEndAdornment}:not(.${constants_2.chipClassnames.hasStatusIcon}),
42
+ &.${constants_2.chipClassnames.hasCounter}:not(.${constants_2.chipClassnames.hasStatusIcon}) {
40
43
  gap: ${({ theme }) => theme.spacing(1)};
41
44
  }
42
45
 
43
- &.${constants_1.chipClassnames.hasStatusIcon} {
44
- & .${constants_1.chipClassnames.label} {
46
+ &.${constants_2.chipClassnames.hasStatusIcon} {
47
+ & .${constants_2.chipClassnames.label} {
45
48
  margin-left: ${({ theme }) => theme.microSpacing(1)};
46
49
  }
47
50
 
48
- &.${constants_1.chipClassnames.hasCounter} .${constants_1.chipClassnames.label},
49
- &.${constants_1.chipClassnames.hasEndAdornment} .${constants_1.chipClassnames.label} {
51
+ &.${constants_2.chipClassnames.hasCounter} .${constants_2.chipClassnames.label},
52
+ &.${constants_2.chipClassnames.hasEndAdornment} .${constants_2.chipClassnames.label} {
50
53
  margin-right: ${({ theme }) => theme.spacing(1)};
51
54
  }
52
55
  }
53
56
 
54
- &.${constants_1.chipClassnames.hasStatusIcon} {
57
+ &.${constants_2.chipClassnames.hasStatusIcon} {
55
58
  padding-left: ${({ theme }) => theme.microSpacing(1)};
56
59
  }
57
60
 
58
- &.${constants_1.chipClassnames.sizeSmall} {
59
- height: ${constants_1.chipSize.small.desktop};
61
+ &.${constants_2.chipClassnames.sizeSmall} {
62
+ height: ${constants_2.chipSize.small.desktop};
60
63
 
61
64
  ${({ theme }) => theme.breakpoints.down('mobile')} {
62
- height: ${constants_1.chipSize.small.mobile};
65
+ height: ${constants_2.chipSize.small.mobile};
63
66
  }
64
67
  }
65
68
 
66
- &.${constants_1.chipClassnames.sizeMedium} {
67
- height: ${constants_1.chipSize.medium.desktop};
69
+ &.${constants_2.chipClassnames.sizeMedium} {
70
+ height: ${constants_2.chipSize.medium.desktop};
68
71
 
69
72
  ${({ theme }) => theme.breakpoints.down('mobile')} {
70
- height: ${constants_1.chipSize.medium.mobile};
73
+ height: ${constants_2.chipSize.medium.mobile};
71
74
  }
72
75
  }
73
76
 
74
- &.${constants_1.chipClassnames.sizeLarge} {
75
- height: ${constants_1.chipSize.large.desktop};
77
+ &.${constants_2.chipClassnames.sizeLarge} {
78
+ height: ${constants_2.chipSize.large.desktop};
76
79
  padding: ${({ theme }) => theme.spacing(0, 3)};
77
80
 
78
- &.${constants_1.chipClassnames.hasStatusIcon} {
81
+ &.${constants_2.chipClassnames.hasStatusIcon} {
79
82
  padding-left: ${({ theme }) => theme.spacing(2)};
80
83
  }
81
84
 
82
85
  ${({ theme }) => theme.breakpoints.down('mobile')} {
83
- height: ${constants_1.chipSize.large.mobile};
86
+ height: ${constants_2.chipSize.large.mobile};
84
87
  }
85
88
  }
86
89
 
87
- &.${constants_1.chipClassnames.selected} {
90
+ &.${constants_2.chipClassnames.selected} {
88
91
  background-color: ${({ theme }) => theme.palette.grey[100]};
89
92
  border-color: ${({ theme }) => theme.palette.grey[800]};
90
93
 
91
- &:hover {
92
- background-color: ${({ theme }) => theme.palette.background.elementHover};
93
- border-color: ${({ theme }) => theme.palette.grey[800]};
94
+ ${constants_1.HOVER_MEDIA} {
95
+ &:hover {
96
+ background-color: ${({ theme }) => theme.palette.background.elementHover};
97
+ border-color: ${({ theme }) => theme.palette.grey[800]};
98
+ }
94
99
  }
95
100
 
96
101
  &:active {
@@ -99,7 +104,7 @@ exports.Wrapper = styled_1.styled.div `
99
104
  }
100
105
  }
101
106
 
102
- &.${constants_1.chipClassnames.disabled} {
107
+ &.${constants_2.chipClassnames.disabled} {
103
108
  cursor: default;
104
109
 
105
110
  background-color: ${({ theme }) => theme.palette.components.disabled};
@@ -107,9 +112,9 @@ exports.Wrapper = styled_1.styled.div `
107
112
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
108
113
  mix-blend-mode: luminosity;
109
114
 
110
- & .${constants_1.chipClassnames.startAdornment},
111
- & .${constants_1.chipClassnames.endAdornment},
112
- & .${constants_1.chipClassnames.label} {
115
+ & .${constants_2.chipClassnames.startAdornment},
116
+ & .${constants_2.chipClassnames.endAdornment},
117
+ & .${constants_2.chipClassnames.label} {
113
118
  opacity: 0.3;
114
119
  }
115
120
  }
@@ -162,7 +167,7 @@ exports.Label = styled_1.styled.label `
162
167
 
163
168
  /* Причина игнора: Не критично для отображения */
164
169
  /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
165
- &:has(> input:focus-visible) .${constants_1.chipClassnames.root} {
170
+ &:has(> input:focus-visible) .${constants_2.chipClassnames.root} {
166
171
  outline: 2px solid ${({ theme }) => theme.palette.components.focused};
167
172
  outline-offset: 2px;
168
173
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StyledHelperText = exports.FieldLabel = exports.Digit = exports.DigitsItem = exports.DigitsWrapper = exports.Wrapper = void 0;
4
+ const constants_1 = require("../constants");
4
5
  const FormHelperText_1 = require("../FormHelperText");
5
6
  const styled_1 = require("../styled");
6
7
  const Typography_1 = require("../Typography");
@@ -51,10 +52,12 @@ exports.Digit = styled_1.styled.input `
51
52
  border-radius: ${({ theme }) => theme.shape.medium};
52
53
  outline: none;
53
54
 
54
- &:hover {
55
- background-color: ${({ theme, disabled }) => disabled
55
+ ${constants_1.HOVER_MEDIA} {
56
+ &:hover {
57
+ background-color: ${({ theme, disabled }) => disabled
56
58
  ? theme.palette.components.disabled
57
59
  : theme.palette.background.elementHover};
60
+ }
58
61
  }
59
62
  `;
60
63
  exports.FieldLabel = (0, styled_1.styled)(Typography_1.Typography) `
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StyledCopyIcon = exports.TypographyWrapper = exports.Wrapper = void 0;
4
4
  const CopyOutlineSm_1 = require("../../icons/CopyOutlineSm");
5
+ const constants_1 = require("../constants");
5
6
  const styled_1 = require("../styled");
6
7
  const Typography_1 = require("../Typography");
7
- const constants_1 = require("./constants");
8
+ const constants_2 = require("./constants");
8
9
  exports.Wrapper = (0, styled_1.styled)(Typography_1.Typography) `
9
10
  cursor: pointer;
10
11
 
@@ -12,19 +13,27 @@ exports.Wrapper = (0, styled_1.styled)(Typography_1.Typography) `
12
13
  display: flex;
13
14
  flex-wrap: nowrap;
14
15
  align-items: center;
16
+
17
+ ${constants_1.HOVER_MEDIA} {
18
+ &:hover {
19
+ text-decoration: underline;
20
+
21
+ .${constants_2.copyTypographyClassnames.showIconOnHover} {
22
+ display: unset;
23
+ }
24
+ }
25
+ }
15
26
 
16
- &:hover {
17
- text-decoration: underline;
18
-
19
- .${constants_1.copyTypographyClassnames.showIconOnHover} {
20
- display: unset;
27
+ ${({ theme }) => theme.breakpoints.down('mobile')} {
28
+ &:active {
29
+ text-decoration: underline;
21
30
  }
22
31
  }
23
32
  `;
24
33
  exports.TypographyWrapper = styled_1.styled.div `
25
34
  overflow: hidden;
26
35
 
27
- &.${constants_1.copyTypographyClassnames.overflow} {
36
+ &.${constants_2.copyTypographyClassnames.overflow} {
28
37
  text-overflow: ellipsis;
29
38
  white-space: nowrap;
30
39
  }
@@ -35,7 +44,12 @@ exports.StyledCopyIcon = (0, styled_1.styled)(CopyOutlineSm_1.CopyOutlineSm, {
35
44
  margin-right: ${({ $copyPosition, theme }) => $copyPosition === 'left' ? theme.spacing(1) : ''};
36
45
  margin-left: ${({ $copyPosition, theme }) => $copyPosition === 'right' ? theme.spacing(1) : ''};
37
46
 
38
- &.${constants_1.copyTypographyClassnames.showIconOnHover} {
47
+ &.${constants_2.copyTypographyClassnames.showIconOnHover} {
39
48
  display: none;
49
+
50
+ /* На тач-устройствах иконка копирования недостижима наведением — показываем постоянно */
51
+ ${constants_1.HOVER_NONE_MEDIA} {
52
+ display: unset;
53
+ }
40
54
  }
41
55
  `;