@alfalab/core-components-select 17.21.3 → 17.21.5

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 (244) hide show
  1. package/components/arrow/Component.js +1 -1
  2. package/components/arrow/index.css +5 -5
  3. package/components/base-checkmark/Component.js +1 -1
  4. package/components/base-checkmark/index.css +6 -6
  5. package/components/base-option/Component.js +4 -3
  6. package/components/base-option/index.css +20 -15
  7. package/components/base-select/Component.js +4 -3
  8. package/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
  9. package/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
  10. package/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
  11. package/components/base-select/index.css +17 -12
  12. package/components/base-select/mobile.css +12 -12
  13. package/components/checkmark/Component.js +1 -1
  14. package/components/checkmark/index.css +10 -10
  15. package/components/checkmark-mobile/Component.js +1 -1
  16. package/components/checkmark-mobile/index.css +6 -6
  17. package/components/clear-button/Component.js +1 -1
  18. package/components/clear-button/index.css +5 -5
  19. package/components/field/Component.js +1 -1
  20. package/components/field/index.css +14 -14
  21. package/components/footer/Component.js +1 -1
  22. package/components/footer/index.css +5 -5
  23. package/components/optgroup/Component.js +1 -1
  24. package/components/optgroup/index.css +5 -6
  25. package/components/option/desktop/Component.js +1 -1
  26. package/components/option/desktop/index.css +21 -22
  27. package/components/option/mobile/Component.js +1 -1
  28. package/components/option/mobile/index.css +18 -19
  29. package/components/options-list/Component.js +12 -5
  30. package/components/options-list/index.css +10 -11
  31. package/components/search/Component.js +1 -1
  32. package/components/search/index.css +2 -2
  33. package/components/virtual-options-list/Component.js +1 -1
  34. package/components/virtual-options-list/index.css +14 -15
  35. package/cssm/components/base-option/Component.js +3 -2
  36. package/cssm/components/base-option/index.module.css +7 -2
  37. package/cssm/components/base-select/Component.js +2 -1
  38. package/cssm/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.d.ts +1 -1
  39. package/cssm/components/base-select/index.module.css +7 -2
  40. package/cssm/components/optgroup/index.module.css +1 -2
  41. package/cssm/components/option/desktop/index.module.css +2 -3
  42. package/cssm/components/option/index.module.css +2 -3
  43. package/cssm/components/option/mobile/index.module.css +2 -3
  44. package/cssm/components/options-list/Component.js +11 -4
  45. package/cssm/components/options-list/index.module.css +1 -2
  46. package/cssm/components/virtual-options-list/index.module.css +1 -2
  47. package/{hook-970a83fc.js → cssm/hook-7f1b6f47.js} +3 -3
  48. package/cssm/mobile/Component.mobile.js +1 -1
  49. package/cssm/presets/index.js +1 -1
  50. package/cssm/presets/useSelectWithApply/hook.js +1 -1
  51. package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  52. package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +3 -2
  53. package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +5 -2
  54. package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +6 -2
  55. package/cssm/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +2 -0
  56. package/cssm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +6 -2
  57. package/cssm/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +7 -3
  58. package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  59. package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  60. package/cssm/shared/index.js +1 -1
  61. package/cssm/utils.d.ts +1 -1
  62. package/cssm/utils.js +12 -24
  63. package/esm/components/arrow/Component.js +1 -1
  64. package/esm/components/arrow/index.css +5 -5
  65. package/esm/components/base-checkmark/Component.js +1 -1
  66. package/esm/components/base-checkmark/index.css +6 -6
  67. package/esm/components/base-option/Component.js +4 -3
  68. package/esm/components/base-option/index.css +20 -15
  69. package/esm/components/base-select/Component.js +4 -3
  70. package/esm/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
  71. package/esm/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
  72. package/esm/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
  73. package/esm/components/base-select/index.css +17 -12
  74. package/esm/components/base-select/mobile.css +12 -12
  75. package/esm/components/checkmark/Component.js +1 -1
  76. package/esm/components/checkmark/index.css +10 -10
  77. package/esm/components/checkmark-mobile/Component.js +1 -1
  78. package/esm/components/checkmark-mobile/index.css +6 -6
  79. package/esm/components/clear-button/Component.js +1 -1
  80. package/esm/components/clear-button/index.css +5 -5
  81. package/esm/components/field/Component.js +1 -1
  82. package/esm/components/field/index.css +14 -14
  83. package/esm/components/footer/Component.js +1 -1
  84. package/esm/components/footer/index.css +5 -5
  85. package/esm/components/optgroup/Component.js +1 -1
  86. package/esm/components/optgroup/index.css +5 -6
  87. package/esm/components/option/desktop/Component.js +1 -1
  88. package/esm/components/option/desktop/index.css +21 -22
  89. package/esm/components/option/mobile/Component.js +1 -1
  90. package/esm/components/option/mobile/index.css +18 -19
  91. package/esm/components/options-list/Component.js +12 -5
  92. package/esm/components/options-list/index.css +10 -11
  93. package/esm/components/search/Component.js +1 -1
  94. package/esm/components/search/index.css +2 -2
  95. package/esm/components/virtual-options-list/Component.js +1 -1
  96. package/esm/components/virtual-options-list/index.css +14 -15
  97. package/esm/{hook-70428da3.js → hook-43e5c3e8.js} +3 -3
  98. package/esm/{list-popover-desktop-dcb3c083.js → list-popover-desktop-29a8ef3e.js} +1 -1
  99. package/esm/mobile/Component.mobile.js +1 -1
  100. package/esm/mobile.module-b5127fe2.js +4 -0
  101. package/esm/presets/index.js +1 -1
  102. package/esm/presets/useSelectWithApply/hook.js +1 -1
  103. package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  104. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +3 -2
  105. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +5 -3
  106. package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +8 -4
  107. package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +2 -0
  108. package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +7 -3
  109. package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +9 -5
  110. package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  111. package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  112. package/esm/presets/useSelectWithLoading/hook.js +1 -1
  113. package/esm/presets/useSelectWithLoading/index.css +2 -2
  114. package/esm/shared/index.js +1 -1
  115. package/esm/utils.d.ts +1 -1
  116. package/esm/utils.js +12 -24
  117. package/{cssm/hook-42ec365f.js → hook-71fac561.js} +3 -3
  118. package/{list-popover-desktop-049ab42d.js → list-popover-desktop-1eb72557.js} +1 -1
  119. package/mobile/Component.mobile.js +1 -1
  120. package/mobile.module-489259bb.js +6 -0
  121. package/modern/components/arrow/Component.js +1 -1
  122. package/modern/components/arrow/index.css +5 -5
  123. package/modern/components/base-checkmark/Component.js +1 -1
  124. package/modern/components/base-checkmark/index.css +6 -6
  125. package/modern/components/base-option/Component.js +4 -3
  126. package/modern/components/base-option/index.css +20 -15
  127. package/modern/components/base-select/Component.js +4 -3
  128. package/modern/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
  129. package/modern/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
  130. package/modern/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
  131. package/modern/components/base-select/index.css +17 -12
  132. package/modern/components/base-select/mobile.css +12 -12
  133. package/modern/components/checkmark/Component.js +1 -1
  134. package/modern/components/checkmark/index.css +10 -10
  135. package/modern/components/checkmark-mobile/Component.js +1 -1
  136. package/modern/components/checkmark-mobile/index.css +6 -6
  137. package/modern/components/clear-button/Component.js +1 -1
  138. package/modern/components/clear-button/index.css +5 -5
  139. package/modern/components/field/Component.js +1 -1
  140. package/modern/components/field/index.css +14 -14
  141. package/modern/components/footer/Component.js +1 -1
  142. package/modern/components/footer/index.css +5 -5
  143. package/modern/components/optgroup/Component.js +1 -1
  144. package/modern/components/optgroup/index.css +5 -6
  145. package/modern/components/option/desktop/Component.js +1 -1
  146. package/modern/components/option/desktop/index.css +21 -22
  147. package/modern/components/option/mobile/Component.js +1 -1
  148. package/modern/components/option/mobile/index.css +18 -19
  149. package/modern/components/options-list/Component.js +4 -5
  150. package/modern/components/options-list/index.css +10 -11
  151. package/modern/components/search/Component.js +1 -1
  152. package/modern/components/search/index.css +2 -2
  153. package/modern/components/virtual-options-list/Component.js +1 -1
  154. package/modern/components/virtual-options-list/index.css +14 -15
  155. package/{moderncssm/hook-54090d24.js → modern/hook-75b8be77.js} +3 -3
  156. package/modern/{list-popover-desktop-cb10303d.js → list-popover-desktop-7a9f6f97.js} +1 -1
  157. package/modern/mobile/Component.mobile.js +1 -1
  158. package/modern/mobile.module-7fdca573.js +4 -0
  159. package/modern/presets/index.js +1 -1
  160. package/modern/presets/useSelectWithApply/hook.js +1 -1
  161. package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  162. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +3 -2
  163. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +5 -3
  164. package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +8 -4
  165. package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +2 -0
  166. package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +6 -2
  167. package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +9 -5
  168. package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  169. package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  170. package/modern/presets/useSelectWithLoading/hook.js +1 -1
  171. package/modern/presets/useSelectWithLoading/index.css +2 -2
  172. package/modern/shared/index.js +1 -1
  173. package/modern/utils.d.ts +1 -1
  174. package/modern/utils.js +10 -22
  175. package/moderncssm/components/base-option/Component.js +3 -2
  176. package/moderncssm/components/base-option/index.module.css +7 -0
  177. package/moderncssm/components/base-select/Component.js +2 -1
  178. package/moderncssm/components/base-select/index.module.css +4 -0
  179. package/moderncssm/components/optgroup/index.module.css +0 -1
  180. package/moderncssm/components/option/desktop/index.module.css +1 -2
  181. package/moderncssm/components/option/index.module.css +1 -2
  182. package/moderncssm/components/option/mobile/index.module.css +1 -2
  183. package/moderncssm/components/options-list/Component.js +3 -4
  184. package/moderncssm/components/options-list/index.module.css +0 -1
  185. package/moderncssm/components/virtual-options-list/index.module.css +0 -1
  186. package/{modern/hook-51a2acc1.js → moderncssm/hook-4849257f.js} +3 -3
  187. package/moderncssm/mobile/Component.mobile.js +1 -1
  188. package/moderncssm/presets/index.js +1 -1
  189. package/moderncssm/presets/useSelectWithApply/hook.js +1 -1
  190. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  191. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +3 -2
  192. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +4 -2
  193. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +3 -0
  194. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +2 -0
  195. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +5 -1
  196. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +5 -1
  197. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  198. package/moderncssm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  199. package/moderncssm/shared/index.js +1 -1
  200. package/moderncssm/utils.d.ts +1 -1
  201. package/moderncssm/utils.js +10 -22
  202. package/package.json +13 -13
  203. package/presets/index.js +1 -1
  204. package/presets/useSelectWithApply/hook.js +1 -1
  205. package/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
  206. package/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +3 -2
  207. package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +6 -3
  208. package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +8 -4
  209. package/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +2 -0
  210. package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +7 -3
  211. package/presets/useSelectWithApply/options-list-with-apply/header/index.css +9 -5
  212. package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
  213. package/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
  214. package/presets/useSelectWithLoading/hook.js +1 -1
  215. package/presets/useSelectWithLoading/index.css +2 -2
  216. package/shared/index.js +1 -1
  217. package/src/components/base-option/Component.tsx +3 -1
  218. package/src/components/base-option/index.module.css +9 -0
  219. package/src/components/base-select/Component.tsx +9 -4
  220. package/src/components/base-select/index.module.css +5 -0
  221. package/src/components/optgroup/index.module.css +0 -1
  222. package/src/components/option/index.module.css +0 -1
  223. package/src/components/options-list/Component.tsx +3 -2
  224. package/src/components/options-list/index.module.css +0 -1
  225. package/src/components/virtual-options-list/index.module.css +0 -1
  226. package/src/presets/useSelectWithApply/options-list-with-apply/Component.tsx +4 -1
  227. package/src/presets/useSelectWithApply/options-list-with-apply/footer/Component.tsx +6 -2
  228. package/src/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +4 -0
  229. package/src/presets/useSelectWithApply/options-list-with-apply/header/Component.tsx +11 -1
  230. package/src/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +3 -0
  231. package/src/utils.ts +9 -24
  232. package/utils.d.ts +1 -1
  233. package/utils.js +12 -24
  234. package/esm/mobile.module-8b62acd9.js +0 -4
  235. package/mobile.module-2ddc6d6e.js +0 -6
  236. package/modern/mobile.module-2153870e.js +0 -4
  237. /package/cssm/{hook-42ec365f.d.ts → hook-7f1b6f47.d.ts} +0 -0
  238. /package/esm/{hook-70428da3.d.ts → hook-43e5c3e8.d.ts} +0 -0
  239. /package/esm/{list-popover-desktop-dcb3c083.d.ts → list-popover-desktop-29a8ef3e.d.ts} +0 -0
  240. /package/{hook-970a83fc.d.ts → hook-71fac561.d.ts} +0 -0
  241. /package/{list-popover-desktop-049ab42d.d.ts → list-popover-desktop-1eb72557.d.ts} +0 -0
  242. /package/modern/{hook-51a2acc1.d.ts → hook-75b8be77.d.ts} +0 -0
  243. /package/modern/{list-popover-desktop-cb10303d.d.ts → list-popover-desktop-7a9f6f97.d.ts} +0 -0
  244. /package/moderncssm/{hook-54090d24.d.ts → hook-4849257f.d.ts} +0 -0
@@ -20,7 +20,7 @@ import { OptionResponsive } from '../components/option/Component.responsive.js';
20
20
  import { OptionsList } from '../components/options-list/Component.js';
21
21
  import { Search } from '../components/search/Component.js';
22
22
  import { VirtualOptionsList } from '../components/virtual-options-list/Component.js';
23
- import { u as useSelectWithApply } from '../hook-54090d24.js';
23
+ import { u as useSelectWithApply } from '../hook-4849257f.js';
24
24
  import { Header } from '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
25
25
 
26
26
  const VIRTUAL_OPTIONS_LIST_THRESHOLD = 30;
@@ -1,3 +1,3 @@
1
1
  export { useSelectWithLoading } from './useSelectWithLoading/hook.js';
2
2
  export { useLazyLoading } from './useLazyLoading/hook.js';
3
- export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-54090d24.js';
3
+ export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-4849257f.js';
@@ -1,4 +1,4 @@
1
1
  import 'react';
2
2
  import 'react-fast-compare';
3
3
  import '../../utils.js';
4
- export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-54090d24.js';
4
+ export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-4849257f.js';
@@ -1,6 +1,6 @@
1
1
  import 'react';
2
2
  import '../../../components/options-list/Component.js';
3
3
  import '../../../consts.js';
4
- export { O as OptionsListWithApply } from '../../../hook-54090d24.js';
4
+ export { O as OptionsListWithApply } from '../../../hook-4849257f.js';
5
5
  import './footer/Component.js';
6
6
  import './header/Component.js';
@@ -1,12 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { OptionShape } from "../../../../typings";
3
+ import { OptionShape, OptionsListProps } from "../../../../typings";
4
4
  type FooterProps = {
5
5
  handleClear?: () => void;
6
6
  handleApply?: () => void;
7
7
  showClear?: boolean;
8
8
  selectedDraft?: OptionShape[];
9
9
  dataTestId?: string;
10
+ size?: OptionsListProps['size'];
10
11
  };
11
- declare const Footer: ({ handleApply, handleClear, showClear, selectedDraft, dataTestId, }: FooterProps) => React.JSX.Element;
12
+ declare const Footer: ({ handleApply, handleClear, showClear, selectedDraft, dataTestId, size, }: FooterProps) => React.JSX.Element;
12
13
  export { FooterProps, Footer };
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
+ import cn from 'classnames';
2
3
  import { ButtonDesktop } from '@alfalab/core-components-button/moderncssm/desktop';
3
4
  import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
5
+ import { SIZE_TO_CLASSNAME_MAP } from '../../../../consts.js';
4
6
  import styles from './index.module.css';
5
7
 
6
- const Footer = ({ handleApply, handleClear, showClear, selectedDraft = [], dataTestId, }) => (React.createElement("div", {
8
+ const Footer = ({ handleApply, handleClear, showClear, selectedDraft = [], dataTestId, size, }) => (React.createElement("div", {
7
9
  // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
8
- tabIndex: 0, className: styles.footer },
10
+ tabIndex: 0, className: cn(styles.footer, size && styles[SIZE_TO_CLASSNAME_MAP[size]]) },
9
11
  React.createElement(ButtonDesktop, { size: 32, view: 'primary', onClick: handleApply, dataTestId: getDataTestId(dataTestId, 'apply'), className: styles.button }, "\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C"),
10
12
  showClear && selectedDraft.length > 0 && (React.createElement(ButtonDesktop, { size: 32, view: 'secondary', onClick: handleClear, dataTestId: getDataTestId(dataTestId, 'clear'), className: styles.button }, "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C"))));
11
13
 
@@ -7,6 +7,9 @@
7
7
  padding: var(--gap-12);
8
8
  outline: none
9
9
  }
10
+ .footer.size-72 {
11
+ padding: var(--gap-12) var(--gap-16);
12
+ }
10
13
  .footer > .button + .button {
11
14
  margin-left: var(--select-option-list-footer-button-gap);
12
15
  }
@@ -1,12 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { CheckboxProps } from "@alfalab/core-components-checkbox";
4
+ import { OptionsListProps } from "../../../../typings";
4
5
  type HeaderProps = {
5
6
  checked?: boolean;
6
7
  indeterminate?: boolean;
7
8
  onChange?: CheckboxProps['onChange'];
8
9
  mobile?: boolean;
9
10
  dataTestId?: string;
11
+ size?: OptionsListProps['size'];
10
12
  };
11
13
  declare const Header: React.FC<HeaderProps>;
12
14
  export { HeaderProps, Header };
@@ -1,9 +1,13 @@
1
1
  import React from 'react';
2
2
  import cn from 'classnames';
3
3
  import { Checkbox } from '@alfalab/core-components-checkbox/moderncssm';
4
+ import { SIZE_TO_CLASSNAME_MAP } from '../../../../consts.js';
4
5
  import styles from './index.module.css';
5
6
 
6
- const Header = ({ onChange, checked, indeterminate, mobile, dataTestId, }) => (React.createElement("div", { className: cn({ [styles.desktop]: !mobile, [styles.mobile]: mobile }) },
7
+ const Header = ({ onChange, checked, indeterminate, mobile, dataTestId, size, }) => (React.createElement("div", { className: cn(size && styles[SIZE_TO_CLASSNAME_MAP[size]], {
8
+ [styles.desktop]: !mobile,
9
+ [styles.mobile]: mobile,
10
+ }) },
7
11
  React.createElement(Checkbox, { block: true, indeterminate: indeterminate, size: 'm', onChange: onChange, checked: checked, label: '\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435', dataTestId: dataTestId })));
8
12
 
9
13
  export { Header };
@@ -1,9 +1,13 @@
1
1
  /* */
2
2
 
3
3
  .desktop {
4
- padding: var(--gap-12);
4
+ padding: var(--gap-12)
5
5
  }
6
6
 
7
+ .desktop.size-72 {
8
+ padding-left: var(--gap-16);
9
+ }
10
+
7
11
  .mobile {
8
12
  padding: var(--gap-12) var(--gap-8);
9
13
  }
@@ -1 +1 @@
1
- export * from "../../../hook-54090d24";
1
+ export * from "../../../hook-4849257f";
@@ -1 +1 @@
1
- export { O as OptionsListWithApply } from '../../../hook-54090d24.js';
1
+ export { O as OptionsListWithApply } from '../../../hook-4849257f.js';
@@ -1,6 +1,6 @@
1
1
  export { useSelectWithLoading } from '../presets/useSelectWithLoading/hook.js';
2
2
  export { useLazyLoading } from '../presets/useLazyLoading/hook.js';
3
- export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-54090d24.js';
3
+ export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-4849257f.js';
4
4
  export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVirtualVisibleOptions, useVisibleOptions } from '../utils.js';
5
5
  export { OptionDesktop } from '../components/option/desktop/Component.js';
6
6
  export { OptionMobile } from '../components/option/mobile/Component.js';
@@ -46,7 +46,7 @@ type useVisibleOptionsArgs = {
46
46
  actualOptionsCount?: boolean;
47
47
  };
48
48
  declare function useVirtualVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): void;
49
- declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): boolean;
49
+ declare function useVisibleOptions({ visibleOptions, listRef, open, options, size, actualOptionsCount, }: useVisibleOptionsArgs): readonly [boolean, number | undefined];
50
50
  declare function defaultFilterFn(optionText: string, search: string): boolean;
51
51
  declare function defaultGroupAccessor(option: GroupShape): string | undefined;
52
52
  declare function defaultAccessor(option: OptionShape): string;
@@ -110,23 +110,23 @@ function useVirtualVisibleOptions({ visibleOptions, listRef, styleTargetRef = li
110
110
  invalidate,
111
111
  ]);
112
112
  }
113
- function useVisibleOptions({ visibleOptions, listRef, styleTargetRef = listRef, open, invalidate, options, size, actualOptionsCount, }) {
113
+ function useVisibleOptions({ visibleOptions, listRef, open, options, size, actualOptionsCount, }) {
114
114
  const [, runIfMounted] = useIsMounted();
115
115
  const [measured, setMeasured] = useState(false);
116
+ const [height, setHeight] = useState();
116
117
  useEffect(() => {
117
118
  const measureOptionHeight = (element) => typeof size === 'number' ? Math.min(element.clientHeight, size) : element.clientHeight;
118
119
  const list = listRef.current;
119
- const styleTarget = styleTargetRef.current;
120
- if (open && list && styleTarget && visibleOptions > 0) {
120
+ if (open && list && visibleOptions > 0) {
121
121
  const childCount = list.children.length;
122
122
  const optionsNodes = [].slice.call(list.children, 0, visibleOptions + 1);
123
- let height = optionsNodes
123
+ let measuredHeight = optionsNodes
124
124
  .slice(0, visibleOptions)
125
125
  .reduce((acc, child) => acc + measureOptionHeight(child), 0);
126
126
  if (visibleOptions < childCount) {
127
127
  const lastVisibleOptionHeight = measureOptionHeight(optionsNodes[optionsNodes.length - 1]);
128
128
  // Если кол-во опций больше visibleOptions на 1, то показываем все опции, иначе добавляем половинку
129
- height += Math.round(childCount - visibleOptions === 1
129
+ measuredHeight += Math.round(childCount - visibleOptions === 1
130
130
  ? lastVisibleOptionHeight
131
131
  : lastVisibleOptionHeight / 2);
132
132
  }
@@ -134,33 +134,21 @@ function useVisibleOptions({ visibleOptions, listRef, styleTargetRef = listRef,
134
134
  actualOptionsCount &&
135
135
  typeof size === 'number') {
136
136
  const actualCount = (options ?? []).reduce((sum, option) => sum + 1 + (isGroup(option) ? option.options.length : 0), 0);
137
- height =
137
+ measuredHeight =
138
138
  Math.min(actualCount === 0 ? /** empty placeholder */ 1 : actualCount, visibleOptions) * size;
139
139
  if (visibleOptions < actualCount) {
140
- height += size / 2;
140
+ measuredHeight += size / 2;
141
141
  }
142
142
  }
143
- const prevHeight = styleTarget.style.height;
144
- styleTarget.style.height = `${height}px`;
143
+ setHeight(measuredHeight);
145
144
  setMeasured(true);
146
145
  return () => {
147
- styleTarget.style.height = prevHeight;
148
146
  runIfMounted(() => setMeasured(false));
149
147
  };
150
148
  }
151
149
  return fnUtils.noop;
152
- }, [
153
- actualOptionsCount,
154
- listRef,
155
- open,
156
- options,
157
- size,
158
- styleTargetRef,
159
- visibleOptions,
160
- invalidate,
161
- runIfMounted,
162
- ]);
163
- return measured;
150
+ }, [actualOptionsCount, listRef, open, options, size, visibleOptions, runIfMounted]);
151
+ return [measured, height];
164
152
  }
165
153
  function defaultFilterFn(optionText, search) {
166
154
  if (!search)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-select",
3
- "version": "17.21.3",
3
+ "version": "17.21.5",
4
4
  "description": "Select component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -17,18 +17,18 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@alfalab/core-components-badge": "^5.6.4",
20
- "@alfalab/core-components-base-modal": "^5.9.3",
21
- "@alfalab/core-components-bottom-sheet": "^6.18.13",
22
- "@alfalab/core-components-button": "^11.11.9",
23
- "@alfalab/core-components-checkbox": "^4.9.3",
24
- "@alfalab/core-components-form-control": "^12.8.5",
25
- "@alfalab/core-components-input": "^15.6.1",
26
- "@alfalab/core-components-modal": "^9.9.17",
20
+ "@alfalab/core-components-base-modal": "^5.9.4",
21
+ "@alfalab/core-components-bottom-sheet": "^6.18.14",
22
+ "@alfalab/core-components-button": "^11.11.10",
23
+ "@alfalab/core-components-checkbox": "^4.9.4",
24
+ "@alfalab/core-components-form-control": "^12.8.6",
25
+ "@alfalab/core-components-input": "^15.6.2",
26
+ "@alfalab/core-components-modal": "^9.9.19",
27
27
  "@alfalab/core-components-mq": "^4.4.1",
28
- "@alfalab/core-components-popover": "^6.3.10",
29
- "@alfalab/core-components-scrollbar": "^3.3.0",
28
+ "@alfalab/core-components-popover": "^6.3.11",
29
+ "@alfalab/core-components-scrollbar": "^3.4.0",
30
30
  "@alfalab/core-components-skeleton": "^5.4.0",
31
- "@alfalab/core-components-shared": "^0.17.1",
31
+ "@alfalab/core-components-shared": "^0.18.0",
32
32
  "@alfalab/hooks": "^1.13.1",
33
33
  "@alfalab/icons-glyph": "^2.210.0",
34
34
  "@juggle/resize-observer": "^3.3.1",
@@ -41,6 +41,6 @@
41
41
  "react-virtual": "^2.3.2",
42
42
  "tslib": "^2.4.0"
43
43
  },
44
- "themesVersion": "13.7.3",
45
- "varsVersion": "9.20.0"
44
+ "themesVersion": "13.7.4",
45
+ "varsVersion": "9.20.1"
46
46
  }
package/presets/index.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var presets_useSelectWithLoading_hook = require('./useSelectWithLoading/hook.js');
6
6
  var presets_useLazyLoading_hook = require('./useLazyLoading/hook.js');
7
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-970a83fc.js');
7
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-71fac561.js');
8
8
 
9
9
 
10
10
 
@@ -6,7 +6,7 @@ require('tslib');
6
6
  require('react');
7
7
  require('react-fast-compare');
8
8
  require('../../utils.js');
9
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-970a83fc.js');
9
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../../hook-71fac561.js');
10
10
 
11
11
 
12
12
 
@@ -6,7 +6,7 @@ require('tslib');
6
6
  require('react');
7
7
  require('../../../components/options-list/Component.js');
8
8
  require('../../../consts.js');
9
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-970a83fc.js');
9
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-71fac561.js');
10
10
  require('./footer/Component.js');
11
11
  require('./header/Component.js');
12
12
 
@@ -1,12 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { OptionShape } from "../../../../typings";
3
+ import { OptionShape, OptionsListProps } from "../../../../typings";
4
4
  type FooterProps = {
5
5
  handleClear?: () => void;
6
6
  handleApply?: () => void;
7
7
  showClear?: boolean;
8
8
  selectedDraft?: OptionShape[];
9
9
  dataTestId?: string;
10
+ size?: OptionsListProps['size'];
10
11
  };
11
- declare const Footer: ({ handleApply, handleClear, showClear, selectedDraft, dataTestId, }: FooterProps) => React.JSX.Element;
12
+ declare const Footer: ({ handleApply, handleClear, showClear, selectedDraft, dataTestId, size, }: FooterProps) => React.JSX.Element;
12
13
  export { FooterProps, Footer };
@@ -3,21 +3,24 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
+ var cn = require('classnames');
6
7
  var desktop = require('@alfalab/core-components-button/desktop');
7
8
  var coreComponentsShared = require('@alfalab/core-components-shared');
9
+ var consts = require('../../../../consts.js');
8
10
 
9
11
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
10
12
 
11
13
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
+ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
12
15
 
13
- var styles = {"footer":"select__footer_1ofvh","button":"select__button_1ofvh"};
16
+ var styles = {"footer":"select__footer_1996f","size-72":"select__size-72_1996f","button":"select__button_1996f"};
14
17
  require('./index.css')
15
18
 
16
19
  var Footer = function (_a) {
17
- var handleApply = _a.handleApply, handleClear = _a.handleClear, showClear = _a.showClear, _b = _a.selectedDraft, selectedDraft = _b === void 0 ? [] : _b, dataTestId = _a.dataTestId;
20
+ var handleApply = _a.handleApply, handleClear = _a.handleClear, showClear = _a.showClear, _b = _a.selectedDraft, selectedDraft = _b === void 0 ? [] : _b, dataTestId = _a.dataTestId, size = _a.size;
18
21
  return (React__default.default.createElement("div", {
19
22
  // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
20
- tabIndex: 0, className: styles.footer },
23
+ tabIndex: 0, className: cn__default.default(styles.footer, size && styles[consts.SIZE_TO_CLASSNAME_MAP[size]]) },
21
24
  React__default.default.createElement(desktop.ButtonDesktop, { size: 32, view: 'primary', onClick: handleApply, dataTestId: coreComponentsShared.getDataTestId(dataTestId, 'apply'), className: styles.button }, "\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C"),
22
25
  showClear && selectedDraft.length > 0 && (React__default.default.createElement(desktop.ButtonDesktop, { size: 32, view: 'secondary', onClick: handleClear, dataTestId: coreComponentsShared.getDataTestId(dataTestId, 'clear'), className: styles.button }, "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C"))));
23
26
  };
@@ -1,4 +1,4 @@
1
- /* hash: 1xok5 */
1
+ /* hash: 15t5e */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root {
4
4
  --color-light-base-bg-primary: #fff; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -16,7 +16,8 @@
16
16
  /* новые значения, используйте их */
17
17
  } :root { /* deprecated */ /* deprecated */
18
18
  --gap-xs: 8px; /* deprecated */
19
- --gap-s: 12px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
19
+ --gap-s: 12px; /* deprecated */ /* deprecated */
20
+ --gap-m: 16px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
20
21
 
21
22
  /* новые значения, используйте их */
22
23
 
@@ -24,14 +25,17 @@
24
25
  /* stylelint-disable-next-line length-zero-no-unit */
25
26
  --gap-8: var(--gap-xs);
26
27
  --gap-12: var(--gap-s);
28
+ --gap-16: var(--gap-m);
27
29
  } :root {
28
30
  } /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ :root {
29
31
  } /* сбрасывает синюю подсветку при нажатии */ :root {
30
32
  --select-option-list-footer-button-gap: var(--gap-8);
31
- } .select__footer_1ofvh {
33
+ } .select__footer_1996f {
32
34
  background-color: var(--color-light-base-bg-primary);
33
35
  padding: var(--gap-12);
34
36
  outline: none
35
- } .select__footer_1ofvh > .select__button_1ofvh + .select__button_1ofvh {
37
+ } .select__footer_1996f.select__size-72_1996f {
38
+ padding: var(--gap-12) var(--gap-16);
39
+ } .select__footer_1996f > .select__button_1996f + .select__button_1996f {
36
40
  margin-left: var(--select-option-list-footer-button-gap);
37
41
  }
@@ -1,12 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { CheckboxProps } from "@alfalab/core-components-checkbox";
4
+ import { OptionsListProps } from "../../../../typings";
4
5
  type HeaderProps = {
5
6
  checked?: boolean;
6
7
  indeterminate?: boolean;
7
8
  onChange?: CheckboxProps['onChange'];
8
9
  mobile?: boolean;
9
10
  dataTestId?: string;
11
+ size?: OptionsListProps['size'];
10
12
  };
11
13
  declare const Header: React.FC<HeaderProps>;
12
14
  export { HeaderProps, Header };
@@ -5,19 +5,23 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
  var cn = require('classnames');
7
7
  var coreComponentsCheckbox = require('@alfalab/core-components-checkbox');
8
+ var consts = require('../../../../consts.js');
8
9
 
9
10
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
10
11
 
11
12
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
13
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
13
14
 
14
- var styles = {"desktop":"select__desktop_1a5gw","mobile":"select__mobile_1a5gw"};
15
+ var styles = {"desktop":"select__desktop_1p34v","size-72":"select__size-72_1p34v","mobile":"select__mobile_1p34v"};
15
16
  require('./index.css')
16
17
 
17
18
  var Header = function (_a) {
18
19
  var _b;
19
- var onChange = _a.onChange, checked = _a.checked, indeterminate = _a.indeterminate, mobile = _a.mobile, dataTestId = _a.dataTestId;
20
- return (React__default.default.createElement("div", { className: cn__default.default((_b = {}, _b[styles.desktop] = !mobile, _b[styles.mobile] = mobile, _b)) },
20
+ var onChange = _a.onChange, checked = _a.checked, indeterminate = _a.indeterminate, mobile = _a.mobile, dataTestId = _a.dataTestId, size = _a.size;
21
+ return (React__default.default.createElement("div", { className: cn__default.default(size && styles[consts.SIZE_TO_CLASSNAME_MAP[size]], (_b = {},
22
+ _b[styles.desktop] = !mobile,
23
+ _b[styles.mobile] = mobile,
24
+ _b)) },
21
25
  React__default.default.createElement(coreComponentsCheckbox.Checkbox, { block: true, indeterminate: indeterminate, size: 'm', onChange: onChange, checked: checked, label: '\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435', dataTestId: dataTestId })));
22
26
  };
23
27
 
@@ -1,4 +1,4 @@
1
- /* hash: 12qn1 */
1
+ /* hash: 5v5dc */
2
2
  :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,7 +15,8 @@
15
15
  /* новые значения, используйте их */
16
16
  } :root { /* deprecated */ /* deprecated */
17
17
  --gap-xs: 8px; /* deprecated */
18
- --gap-s: 12px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
18
+ --gap-s: 12px; /* deprecated */ /* deprecated */
19
+ --gap-m: 16px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
19
20
 
20
21
  /* новые значения, используйте их */
21
22
 
@@ -23,10 +24,13 @@
23
24
  /* stylelint-disable-next-line length-zero-no-unit */
24
25
  --gap-8: var(--gap-xs);
25
26
  --gap-12: var(--gap-s);
27
+ --gap-16: var(--gap-m);
26
28
  } :root {
27
29
  } /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ :root {
28
- } /* сбрасывает синюю подсветку при нажатии */ .select__desktop_1a5gw {
29
- padding: var(--gap-12);
30
- } .select__mobile_1a5gw {
30
+ } /* сбрасывает синюю подсветку при нажатии */ .select__desktop_1p34v {
31
+ padding: var(--gap-12)
32
+ } .select__desktop_1p34v.select__size-72_1p34v {
33
+ padding-left: var(--gap-16);
34
+ } .select__mobile_1p34v {
31
35
  padding: var(--gap-12) var(--gap-8);
32
36
  }
@@ -1 +1 @@
1
- export * from "../../../hook-970a83fc";
1
+ export * from "../../../hook-71fac561";
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-970a83fc.js');
5
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../hook-71fac561.js');
6
6
 
7
7
 
8
8
 
@@ -16,7 +16,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
16
16
 
17
17
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
18
18
 
19
- var styles = {"skeleton":"select__skeleton_bru4q"};
19
+ var styles = {"skeleton":"select__skeleton_b3wqv"};
20
20
  require('./index.css')
21
21
 
22
22
  function useSelectWithLoading(_a) {
@@ -1,5 +1,5 @@
1
- /* hash: 10ndv */
2
- .select__skeleton_bru4q {
1
+ /* hash: 19mib */
2
+ .select__skeleton_b3wqv {
3
3
  position: absolute;
4
4
  top: 50%;
5
5
  transform: translateY(-50%);
package/shared/index.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var presets_useSelectWithLoading_hook = require('../presets/useSelectWithLoading/hook.js');
6
6
  var presets_useLazyLoading_hook = require('../presets/useLazyLoading/hook.js');
7
- var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-970a83fc.js');
7
+ var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-71fac561.js');
8
8
  var utils = require('../utils.js');
9
9
  var components_option_desktop_Component = require('../components/option/desktop/Component.js');
10
10
  var components_option_mobile_Component = require('../components/option/mobile/Component.js');
@@ -1,6 +1,7 @@
1
1
  import React, { FC, isValidElement } from 'react';
2
2
  import cn from 'classnames';
3
3
 
4
+ import { SIZE_TO_CLASSNAME_MAP } from '../../consts';
4
5
  import { OptionProps } from '../../typings';
5
6
  import { BaseCheckmark } from '../base-checkmark';
6
7
 
@@ -20,6 +21,7 @@ export const BaseOption: FC<OptionProps> = ({
20
21
  innerProps,
21
22
  dataTestId,
22
23
  mobile = false,
24
+ size,
23
25
  }) => {
24
26
  const content = children || option.content || option.key;
25
27
  const { showCheckMark = true } = option;
@@ -48,7 +50,7 @@ export const BaseOption: FC<OptionProps> = ({
48
50
  return (
49
51
  <div
50
52
  {...innerProps}
51
- className={cn(styles.option, className, {
53
+ className={cn(styles.option, size && styles[SIZE_TO_CLASSNAME_MAP[size]], className, {
52
54
  [styles.highlighted]: !mobile && highlighted,
53
55
  [styles.selected]: selected,
54
56
  [styles.disabled]: disabled,