@alfalab/core-components-picker-button 11.0.4 → 11.1.1

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 (87) hide show
  1. package/{cssm/Component-5e1b8383.d.ts → Component-dd8ca091.d.ts} +1 -1
  2. package/Component.desktop.js +1 -1
  3. package/{esm/Component.mobile-06ffd24b.d.ts → Component.mobile-ade26e99.d.ts} +2 -2
  4. package/{esm/Component.modal.mobile-5e1b8383.d.ts → Component.modal.mobile-dd8ca091.d.ts} +2 -2
  5. package/{component-50136800.d.ts → component-2abb571d.d.ts} +1 -1
  6. package/{Component-5e1b8383.d.ts → cssm/Component-dd8ca091.d.ts} +1 -1
  7. package/{modern/Component.mobile-06ffd24b.d.ts → cssm/Component.mobile-ade26e99.d.ts} +2 -2
  8. package/{modern/Component.modal.mobile-5e1b8383.d.ts → cssm/Component.modal.mobile-dd8ca091.d.ts} +2 -2
  9. package/{esm/component-50136800.d.ts → cssm/component-2abb571d.d.ts} +1 -1
  10. package/cssm/field/Component.d.ts +1 -1
  11. package/cssm/{hook-9ea9e32c.d.ts → hook-8abfea97.d.ts} +28 -13
  12. package/cssm/index-2abb571d.d.ts +15 -0
  13. package/cssm/index-c44170fe.d.ts +4 -0
  14. package/cssm/index-c76d6398.d.ts +1 -1
  15. package/cssm/index-f12ee135.d.ts +2 -2
  16. package/cssm/shared-4cd3936b.d.ts +6 -6
  17. package/{modern/typings-5e1b8383.d.ts → cssm/typings-dd8ca091.d.ts} +23 -1
  18. package/{esm/utils-5e1b8383.d.ts → cssm/utils-dd8ca091.d.ts} +6 -3
  19. package/esm/{Component-5e1b8383.d.ts → Component-dd8ca091.d.ts} +1 -1
  20. package/esm/Component.desktop.js +1 -1
  21. package/{Component.mobile-06ffd24b.d.ts → esm/Component.mobile-ade26e99.d.ts} +2 -2
  22. package/{cssm/Component.modal.mobile-5e1b8383.d.ts → esm/Component.modal.mobile-dd8ca091.d.ts} +2 -2
  23. package/{modern/component-50136800.d.ts → esm/component-2abb571d.d.ts} +1 -1
  24. package/esm/field/Component.d.ts +1 -1
  25. package/esm/field/Component.js +1 -1
  26. package/esm/field/index.css +6 -6
  27. package/esm/{hook-9ea9e32c.d.ts → hook-8abfea97.d.ts} +28 -13
  28. package/esm/index-2abb571d.d.ts +15 -0
  29. package/esm/index-c44170fe.d.ts +4 -0
  30. package/esm/index-c76d6398.d.ts +1 -1
  31. package/esm/index-f12ee135.d.ts +2 -2
  32. package/esm/index.css +5 -5
  33. package/esm/option/Component.js +1 -1
  34. package/esm/option/index.css +4 -4
  35. package/esm/shared-4cd3936b.d.ts +6 -6
  36. package/{cssm/typings-5e1b8383.d.ts → esm/typings-dd8ca091.d.ts} +23 -1
  37. package/{cssm/utils-5e1b8383.d.ts → esm/utils-dd8ca091.d.ts} +6 -3
  38. package/field/Component.d.ts +1 -1
  39. package/field/Component.js +1 -1
  40. package/field/index.css +6 -6
  41. package/{hook-9ea9e32c.d.ts → hook-8abfea97.d.ts} +28 -13
  42. package/index-2abb571d.d.ts +15 -0
  43. package/index-c44170fe.d.ts +4 -0
  44. package/index-c76d6398.d.ts +1 -1
  45. package/index-f12ee135.d.ts +2 -2
  46. package/index.css +5 -5
  47. package/modern/{Component-5e1b8383.d.ts → Component-dd8ca091.d.ts} +1 -1
  48. package/modern/Component.desktop.js +1 -1
  49. package/{cssm/Component.mobile-06ffd24b.d.ts → modern/Component.mobile-ade26e99.d.ts} +2 -2
  50. package/{Component.modal.mobile-5e1b8383.d.ts → modern/Component.modal.mobile-dd8ca091.d.ts} +2 -2
  51. package/{cssm/component-50136800.d.ts → modern/component-2abb571d.d.ts} +1 -1
  52. package/modern/field/Component.d.ts +1 -1
  53. package/modern/field/Component.js +1 -1
  54. package/modern/field/index.css +6 -6
  55. package/modern/{hook-9ea9e32c.d.ts → hook-8abfea97.d.ts} +28 -13
  56. package/modern/index-2abb571d.d.ts +15 -0
  57. package/modern/index-c44170fe.d.ts +4 -0
  58. package/modern/index-c76d6398.d.ts +1 -1
  59. package/modern/index-f12ee135.d.ts +2 -2
  60. package/modern/index.css +5 -5
  61. package/modern/option/Component.js +1 -1
  62. package/modern/option/index.css +4 -4
  63. package/modern/shared-4cd3936b.d.ts +6 -6
  64. package/{typings-5e1b8383.d.ts → modern/typings-dd8ca091.d.ts} +23 -1
  65. package/modern/{utils-5e1b8383.d.ts → utils-dd8ca091.d.ts} +6 -3
  66. package/option/Component.js +1 -1
  67. package/option/index.css +4 -4
  68. package/package.json +3 -3
  69. package/shared-4cd3936b.d.ts +6 -6
  70. package/{esm/typings-5e1b8383.d.ts → typings-dd8ca091.d.ts} +23 -1
  71. package/{utils-5e1b8383.d.ts → utils-dd8ca091.d.ts} +6 -3
  72. package/createPaddingStyle-72dda473.d.ts +0 -5
  73. package/cssm/createPaddingStyle-72dda473.d.ts +0 -5
  74. package/cssm/index-50136800.d.ts +0 -8
  75. package/esm/createPaddingStyle-72dda473.d.ts +0 -5
  76. package/esm/index-50136800.d.ts +0 -8
  77. package/index-50136800.d.ts +0 -8
  78. package/modern/createPaddingStyle-72dda473.d.ts +0 -5
  79. package/modern/index-50136800.d.ts +0 -8
  80. /package/{Component-50136800.d.ts → Component-2abb571d.d.ts} +0 -0
  81. /package/cssm/{Component-50136800.d.ts → Component-2abb571d.d.ts} +0 -0
  82. /package/cssm/{types-72dda473.d.ts → types-92653002.d.ts} +0 -0
  83. /package/esm/{Component-50136800.d.ts → Component-2abb571d.d.ts} +0 -0
  84. /package/esm/{types-72dda473.d.ts → types-92653002.d.ts} +0 -0
  85. /package/modern/{Component-50136800.d.ts → Component-2abb571d.d.ts} +0 -0
  86. /package/modern/{types-72dda473.d.ts → types-92653002.d.ts} +0 -0
  87. /package/{types-72dda473.d.ts → types-92653002.d.ts} +0 -0
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import { ReactNode } from "react";
4
4
  import { BottomSheetProps } from "./index-f12ee135";
5
- import { BaseSelectProps } from "./typings-5e1b8383";
5
+ import { BaseSelectProps } from "./typings-dd8ca091";
6
6
  type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
7
7
  /**
8
8
  * Футер
@@ -20,7 +20,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
20
20
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
21
21
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
22
22
 
23
- var styles = {"container":"picker-button__container_z4h8h","optionsPopover":"picker-button__optionsPopover_z4h8h","sideGap":"picker-button__sideGap_z4h8h","option":"picker-button__option_z4h8h"};
23
+ var styles = {"container":"picker-button__container_1voso","optionsPopover":"picker-button__optionsPopover_1voso","sideGap":"picker-button__sideGap_1voso","option":"picker-button__option_1voso"};
24
24
  require('./index.css')
25
25
 
26
26
  var SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
@@ -2,8 +2,8 @@
2
2
  import React from 'react';
3
3
  import { ReactNode } from "react";
4
4
  import { BottomSheetProps } from "./index-f12ee135";
5
- import { UseSelectWithApplyProps } from "./hook-9ea9e32c";
6
- import { BaseSelectProps } from "./typings-5e1b8383";
5
+ import { UseSelectWithApplyProps } from "./hook-8abfea97";
6
+ import { BaseSelectProps } from "./typings-dd8ca091";
7
7
  type AdditionalMobileProps = {
8
8
  /**
9
9
  * Футер
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { ModalMobile } from "./Component.mobile-f1f15074";
4
- import { UseSelectWithApplyProps } from "./hook-9ea9e32c";
5
- import { BaseSelectProps } from "./typings-5e1b8383";
4
+ import { UseSelectWithApplyProps } from "./hook-8abfea97";
5
+ import { BaseSelectProps } from "./typings-dd8ca091";
6
6
  type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
7
7
  /**
8
8
  * Показывать кнопку очистки
@@ -4,7 +4,7 @@ import { FC, ReactNode, RefObject } from "react";
4
4
  import { NavigationBarProps } from "./index-c76d6398";
5
5
  import { SwipeableHandlers } from "react-swipeable";
6
6
  import { BackdropProps } from "./index-ebda875c";
7
- import { BottomSheetProps } from "./types-72dda473";
7
+ import { BottomSheetProps } from "./types-92653002";
8
8
  type FooterProps = {
9
9
  /**
10
10
  * Контент футера
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import { ReactNode } from "react";
4
4
  import { BottomSheetProps } from "./index-f12ee135";
5
- import { BaseSelectProps } from "./typings-5e1b8383";
5
+ import { BaseSelectProps } from "./typings-dd8ca091";
6
6
  type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
7
7
  /**
8
8
  * Футер
@@ -2,8 +2,8 @@
2
2
  import React from 'react';
3
3
  import { ReactNode } from "react";
4
4
  import { BottomSheetProps } from "./index-f12ee135";
5
- import { UseSelectWithApplyProps } from "./hook-9ea9e32c";
6
- import { BaseSelectProps } from "./typings-5e1b8383";
5
+ import { UseSelectWithApplyProps } from "./hook-8abfea97";
6
+ import { BaseSelectProps } from "./typings-dd8ca091";
7
7
  type AdditionalMobileProps = {
8
8
  /**
9
9
  * Футер
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { ModalMobile } from "./Component.mobile-f1f15074";
4
- import { UseSelectWithApplyProps } from "./hook-9ea9e32c";
5
- import { BaseSelectProps } from "./typings-5e1b8383";
4
+ import { UseSelectWithApplyProps } from "./hook-8abfea97";
5
+ import { BaseSelectProps } from "./typings-dd8ca091";
6
6
  type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
7
7
  /**
8
8
  * Показывать кнопку очистки
@@ -4,7 +4,7 @@ import { FC, ReactNode, RefObject } from "react";
4
4
  import { NavigationBarProps } from "./index-c76d6398";
5
5
  import { SwipeableHandlers } from "react-swipeable";
6
6
  import { BackdropProps } from "./index-ebda875c";
7
- import { BottomSheetProps } from "./types-72dda473";
7
+ import { BottomSheetProps } from "./types-92653002";
8
8
  type FooterProps = {
9
9
  /**
10
10
  * Контент футера
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { ButtonProps } from "@alfalab/core-components-button";
4
- import { FieldProps as BaseFieldProps } from "../typings-5e1b8383";
4
+ import { FieldProps as BaseFieldProps } from "../typings-dd8ca091";
5
5
  import { PickerButtonSize, PickerButtonVariant } from "../types";
6
6
  type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
7
7
  buttonSize?: PickerButtonSize;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { BaseSelectProps, OptionShape } from "./typings-5e1b8383";
2
+ import { BaseSelectProps, OptionShape } from "./typings-dd8ca091";
3
3
  type UseSelectWithApplyProps = {
4
4
  /**
5
5
  * Список выбранных пунктов
@@ -21,6 +21,14 @@ type UseSelectWithApplyProps = {
21
21
  * Пропсы, которые будут прокинуты в компонент списка
22
22
  */
23
23
  optionsListProps?: BaseSelectProps['optionsListProps'];
24
+ /**
25
+ * Включает отображение поиска
26
+ */
27
+ showSearch?: BaseSelectProps['showSearch'];
28
+ /**
29
+ * Настройки поиска
30
+ */
31
+ searchProps?: BaseSelectProps['searchProps'];
24
32
  /**
25
33
  * Показывать кнопку очистки
26
34
  */
@@ -35,21 +43,21 @@ type UseSelectWithApplyProps = {
35
43
  showHeaderWithSelectAll?: boolean;
36
44
  };
37
45
  declare const SELECT_ALL_KEY = "select_all";
38
- declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, }: UseSelectWithApplyProps): {
39
- OptionsList: import("react").ForwardRefExoticComponent<import("./typings-5e1b8383").OptionsListProps & {
46
+ declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, showSearch, searchProps, }: UseSelectWithApplyProps): {
47
+ OptionsList: import("react").ForwardRefExoticComponent<import("./typings-dd8ca091").OptionsListProps & {
40
48
  showClear?: boolean | undefined;
41
- onClose?: (() => void) | undefined;
49
+ onClose?: (() => void) | undefined; /**
50
+ * Компонент выпадающего меню
51
+ */
42
52
  selectedDraft?: OptionShape[] | undefined;
43
- OptionsList?: import("react").FC<import("./typings-5e1b8383").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
44
- Footer?: import("react").FC<import("./Component-5e1b8383").FooterProps> | undefined;
53
+ OptionsList?: import("react").FC<import("./typings-dd8ca091").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
54
+ Footer?: import("react").FC<import("./Component-dd8ca091").FooterProps> | undefined;
45
55
  Header?: import("react").FC<import("./Component-ebda875c").HeaderProps> | undefined;
46
- headerProps?: import("./Component-ebda875c").HeaderProps | undefined; /**
47
- * Показывать кнопку очистки
48
- */
56
+ headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
49
57
  showHeaderWithSelectAll?: boolean | undefined;
50
58
  } & import("react").RefAttributes<HTMLDivElement>>;
51
59
  optionsListProps: {
52
- OptionsList: import("react").FC<import("./typings-5e1b8383").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
60
+ OptionsList: import("react").FC<import("./typings-dd8ca091").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
53
61
  showClear: boolean;
54
62
  onClear: () => void;
55
63
  onApply: () => void;
@@ -64,12 +72,19 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
64
72
  };
65
73
  allowUnselect: boolean;
66
74
  multiple: boolean;
67
- options: (OptionShape | import("./typings-5e1b8383").GroupShape | {
75
+ options: (OptionShape | import("./typings-dd8ca091").GroupShape | {
68
76
  key: string;
69
77
  content: string;
70
78
  })[];
71
- onChange: (payload: import("./typings-5e1b8383").BaseSelectChangePayload) => void;
79
+ onChange: (payload: import("./typings-dd8ca091").BaseSelectChangePayload) => void;
72
80
  selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
81
+ showSearch: boolean | undefined;
82
+ searchProps: {
83
+ value: string;
84
+ onChange: import("react").Dispatch<import("react").SetStateAction<string>>;
85
+ componentProps?: import("./index-c44170fe").InputProps | undefined;
86
+ accessor?: ((option: OptionShape) => string) | undefined;
87
+ } | undefined;
73
88
  };
74
- export * from "./Component-5e1b8383";
89
+ export * from "./Component-dd8ca091";
75
90
  export { UseSelectWithApplyProps, SELECT_ALL_KEY, useSelectWithApply };
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { PaddingType } from "./index-72dda473";
4
+ declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
5
+ declare const isClient: () => boolean;
6
+ declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
7
+ declare function easeInOutQuad(x: number): number;
8
+ declare const easingFns: {
9
+ easeInOutQuad: typeof easeInOutQuad;
10
+ };
11
+ declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
12
+ declare const inputUtils: {
13
+ disableUserInput: typeof disableUserInput;
14
+ };
15
+ export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils };
@@ -136,6 +136,10 @@ type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type
136
136
  * Стили компонента для default и inverted режима.
137
137
  */
138
138
  colorStyles?: StyleColors;
139
+ /**
140
+ * Запрещает ввод с клавиатуры
141
+ */
142
+ disableUserInput?: boolean;
139
143
  };
140
144
  type InputProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles"> & {
141
145
  /**
@@ -1,2 +1,2 @@
1
- export * from "./Component-50136800";
1
+ export * from "./Component-2abb571d";
2
2
  export type { NavigationBarProps } from "./types-83e2bd9e";
@@ -1,3 +1,3 @@
1
- export * from "./component-50136800";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-72dda473";
1
+ export * from "./component-2abb571d";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-92653002";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-49cc3c24";
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
- import { BaseSelectProps, OptionProps, OptionShape } from "./typings-5e1b8383";
3
+ import { BaseSelectProps, OptionProps, OptionShape } from "./typings-dd8ca091";
4
4
  // eslint-disable-next-line @typescript-eslint/naming-convention
5
5
  type useSelectWithLoadingProps = {
6
6
  loading?: boolean;
@@ -57,9 +57,9 @@ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton
57
57
  reset: () => void;
58
58
  };
59
59
  export * from "./index-ebda875c";
60
- export * from "./Component-5e1b8383";
60
+ export * from "./Component-dd8ca091";
61
61
  export { useSelectWithLoading, useLazyLoading };
62
- export * from "./hook-9ea9e32c";
63
- export * from "./typings-5e1b8383";
64
- export * from "./utils-5e1b8383";
65
- export type { AdditionalMobileProps } from "./Component.mobile-06ffd24b";
62
+ export * from "./hook-8abfea97";
63
+ export * from "./typings-dd8ca091";
64
+ export * from "./utils-dd8ca091";
65
+ export type { AdditionalMobileProps } from "./Component.mobile-ade26e99";
@@ -210,6 +210,23 @@ type BaseSelectProps = {
210
210
  * Компонент пункта меню
211
211
  */
212
212
  Option?: FC<OptionProps>;
213
+ /**
214
+ * Включает отображение поиска
215
+ */
216
+ showSearch?: boolean;
217
+ /**
218
+ * Компонент поиска
219
+ */
220
+ Search?: FC<SearchProps & RefAttributes<HTMLInputElement>>;
221
+ /**
222
+ * Настройки поиска
223
+ */
224
+ searchProps?: {
225
+ componentProps?: SearchProps;
226
+ accessor?: (option: OptionShape) => string;
227
+ value?: string;
228
+ onChange?: (value: string) => void;
229
+ };
213
230
  /**
214
231
  * Обработчик выбора
215
232
  */
@@ -345,6 +362,10 @@ type OptionsListProps = {
345
362
  * Дополнительный класс для компонента группы пунктов
346
363
  */
347
364
  optionGroupClassName?: string;
365
+ /**
366
+ * Дополнительный класс для скроллбара
367
+ */
368
+ scrollbarClassName?: string;
348
369
  /**
349
370
  * Размер компонента
350
371
  */
@@ -547,4 +568,5 @@ type CheckmarkProps = {
547
568
  */
548
569
  icon?: FC<SVGProps<SVGSVGElement>>;
549
570
  };
550
- export { AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps };
571
+ type SearchProps = InputProps;
572
+ export { AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps };
@@ -1,12 +1,13 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
- import { BaseSelectProps, GroupShape, OptionShape } from "./typings-5e1b8383";
2
+ import { BaseSelectProps, GroupShape, OptionShape } from "./typings-dd8ca091";
3
3
  declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
4
4
  declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
5
5
  declare const joinOptions: ({ selected, selectedMultiple, }: {
6
6
  selected?: OptionShape | undefined;
7
7
  selectedMultiple?: OptionShape[] | undefined;
8
8
  }) => ReactNode[] | null;
9
- declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected']): {
9
+ declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected'], filterFn?: (option: OptionShape) => boolean): {
10
+ filteredOptions: (OptionShape | GroupShape)[];
10
11
  flatOptions: OptionShape[];
11
12
  selectedOptions: OptionShape[];
12
13
  };
@@ -33,6 +34,8 @@ type useVisibleOptionsArgs = {
33
34
  invalidate?: unknown;
34
35
  };
35
36
  declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, }: useVisibleOptionsArgs): void;
37
+ declare function defaultFilterFn(optionText: string, search: string): boolean;
38
+ declare function defaultAccessor(option: OptionShape): string;
36
39
  declare function usePrevious<T>(value: T): T | undefined;
37
40
  declare const lastIndexOf: <T>(array: T[], predicate: (item: T) => boolean) => number;
38
- export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, usePrevious, lastIndexOf };
41
+ export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultAccessor, usePrevious, lastIndexOf };
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import { ReactNode } from "react";
4
4
  import { BottomSheetProps } from "./index-f12ee135";
5
- import { BaseSelectProps } from "./typings-5e1b8383";
5
+ import { BaseSelectProps } from "./typings-dd8ca091";
6
6
  type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
7
7
  /**
8
8
  * Футер
@@ -11,7 +11,7 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
11
11
  import '@alfalab/icons-glyph/MoreMIcon';
12
12
  import '@alfalab/icons-glyph/MoreSIcon';
13
13
 
14
- var styles = {"container":"picker-button__container_z4h8h","optionsPopover":"picker-button__optionsPopover_z4h8h","sideGap":"picker-button__sideGap_z4h8h","option":"picker-button__option_z4h8h"};
14
+ var styles = {"container":"picker-button__container_1voso","optionsPopover":"picker-button__optionsPopover_1voso","sideGap":"picker-button__sideGap_1voso","option":"picker-button__option_1voso"};
15
15
  require('./index.css')
16
16
 
17
17
  var SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
@@ -2,8 +2,8 @@
2
2
  import React from 'react';
3
3
  import { ReactNode } from "react";
4
4
  import { BottomSheetProps } from "./index-f12ee135";
5
- import { UseSelectWithApplyProps } from "./hook-9ea9e32c";
6
- import { BaseSelectProps } from "./typings-5e1b8383";
5
+ import { UseSelectWithApplyProps } from "./hook-8abfea97";
6
+ import { BaseSelectProps } from "./typings-dd8ca091";
7
7
  type AdditionalMobileProps = {
8
8
  /**
9
9
  * Футер
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { ModalMobile } from "./Component.mobile-f1f15074";
4
- import { UseSelectWithApplyProps } from "./hook-9ea9e32c";
5
- import { BaseSelectProps } from "./typings-5e1b8383";
4
+ import { UseSelectWithApplyProps } from "./hook-8abfea97";
5
+ import { BaseSelectProps } from "./typings-dd8ca091";
6
6
  type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
7
7
  /**
8
8
  * Показывать кнопку очистки
@@ -4,7 +4,7 @@ import { FC, ReactNode, RefObject } from "react";
4
4
  import { NavigationBarProps } from "./index-c76d6398";
5
5
  import { SwipeableHandlers } from "react-swipeable";
6
6
  import { BackdropProps } from "./index-ebda875c";
7
- import { BottomSheetProps } from "./types-72dda473";
7
+ import { BottomSheetProps } from "./types-92653002";
8
8
  type FooterProps = {
9
9
  /**
10
10
  * Контент футера
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { ButtonProps } from "@alfalab/core-components-button";
4
- import { FieldProps as BaseFieldProps } from "../typings-5e1b8383";
4
+ import { FieldProps as BaseFieldProps } from "../typings-dd8ca091";
5
5
  import { PickerButtonSize, PickerButtonVariant } from "../types";
6
6
  type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
7
7
  buttonSize?: PickerButtonSize;
@@ -8,7 +8,7 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
8
8
  import '@alfalab/icons-glyph/MoreMIcon';
9
9
  import '@alfalab/icons-glyph/MoreSIcon';
10
10
 
11
- var styles = {"iconContainer":"picker-button__iconContainer_ofh6i","addonsContainer":"picker-button__addonsContainer_ofh6i","showControlIcon":"picker-button__showControlIcon_ofh6i","open":"picker-button__open_ofh6i","linkOpen":"picker-button__linkOpen_ofh6i"};
11
+ var styles = {"iconContainer":"picker-button__iconContainer_1a6fx","addonsContainer":"picker-button__addonsContainer_1a6fx","showControlIcon":"picker-button__showControlIcon_1a6fx","open":"picker-button__open_1a6fx","linkOpen":"picker-button__linkOpen_1a6fx"};
12
12
  require('./index.css')
13
13
 
14
14
  var Field = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1vwl8 */
1
+ /* hash: 1mnbn */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-specialbg-secondary-transparent: rgba(11, 31, 53, 0.05); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -17,15 +17,15 @@
17
17
  } :root {
18
18
  } :root {
19
19
  --arrow-transform: rotate(180deg);
20
- } .picker-button__iconContainer_ofh6i {
20
+ } .picker-button__iconContainer_1a6fx {
21
21
  display: flex;
22
22
  transition: transform 0.15s ease-in-out;
23
- } .picker-button__addonsContainer_ofh6i {
23
+ } .picker-button__addonsContainer_1a6fx {
24
24
  display: flex
25
- } .picker-button__addonsContainer_ofh6i.picker-button__showControlIcon_ofh6i {
25
+ } .picker-button__addonsContainer_1a6fx.picker-button__showControlIcon_1a6fx {
26
26
  margin-right: var(--gap-2xs);
27
- } .picker-button__open_ofh6i {
27
+ } .picker-button__open_1a6fx {
28
28
  transform: var(--arrow-transform);
29
- } .picker-button__linkOpen_ofh6i:not(:hover) {
29
+ } .picker-button__linkOpen_1a6fx:not(:hover) {
30
30
  background-color: var(--color-light-specialbg-secondary-transparent);
31
31
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { BaseSelectProps, OptionShape } from "./typings-5e1b8383";
2
+ import { BaseSelectProps, OptionShape } from "./typings-dd8ca091";
3
3
  type UseSelectWithApplyProps = {
4
4
  /**
5
5
  * Список выбранных пунктов
@@ -21,6 +21,14 @@ type UseSelectWithApplyProps = {
21
21
  * Пропсы, которые будут прокинуты в компонент списка
22
22
  */
23
23
  optionsListProps?: BaseSelectProps['optionsListProps'];
24
+ /**
25
+ * Включает отображение поиска
26
+ */
27
+ showSearch?: BaseSelectProps['showSearch'];
28
+ /**
29
+ * Настройки поиска
30
+ */
31
+ searchProps?: BaseSelectProps['searchProps'];
24
32
  /**
25
33
  * Показывать кнопку очистки
26
34
  */
@@ -35,21 +43,21 @@ type UseSelectWithApplyProps = {
35
43
  showHeaderWithSelectAll?: boolean;
36
44
  };
37
45
  declare const SELECT_ALL_KEY = "select_all";
38
- declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, }: UseSelectWithApplyProps): {
39
- OptionsList: import("react").ForwardRefExoticComponent<import("./typings-5e1b8383").OptionsListProps & {
46
+ declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, showSearch, searchProps, }: UseSelectWithApplyProps): {
47
+ OptionsList: import("react").ForwardRefExoticComponent<import("./typings-dd8ca091").OptionsListProps & {
40
48
  showClear?: boolean | undefined;
41
- onClose?: (() => void) | undefined;
49
+ onClose?: (() => void) | undefined; /**
50
+ * Компонент выпадающего меню
51
+ */
42
52
  selectedDraft?: OptionShape[] | undefined;
43
- OptionsList?: import("react").FC<import("./typings-5e1b8383").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
44
- Footer?: import("react").FC<import("./Component-5e1b8383").FooterProps> | undefined;
53
+ OptionsList?: import("react").FC<import("./typings-dd8ca091").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
54
+ Footer?: import("react").FC<import("./Component-dd8ca091").FooterProps> | undefined;
45
55
  Header?: import("react").FC<import("./Component-ebda875c").HeaderProps> | undefined;
46
- headerProps?: import("./Component-ebda875c").HeaderProps | undefined; /**
47
- * Показывать кнопку очистки
48
- */
56
+ headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
49
57
  showHeaderWithSelectAll?: boolean | undefined;
50
58
  } & import("react").RefAttributes<HTMLDivElement>>;
51
59
  optionsListProps: {
52
- OptionsList: import("react").FC<import("./typings-5e1b8383").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
60
+ OptionsList: import("react").FC<import("./typings-dd8ca091").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
53
61
  showClear: boolean;
54
62
  onClear: () => void;
55
63
  onApply: () => void;
@@ -64,12 +72,19 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
64
72
  };
65
73
  allowUnselect: boolean;
66
74
  multiple: boolean;
67
- options: (OptionShape | import("./typings-5e1b8383").GroupShape | {
75
+ options: (OptionShape | import("./typings-dd8ca091").GroupShape | {
68
76
  key: string;
69
77
  content: string;
70
78
  })[];
71
- onChange: (payload: import("./typings-5e1b8383").BaseSelectChangePayload) => void;
79
+ onChange: (payload: import("./typings-dd8ca091").BaseSelectChangePayload) => void;
72
80
  selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
81
+ showSearch: boolean | undefined;
82
+ searchProps: {
83
+ value: string;
84
+ onChange: import("react").Dispatch<import("react").SetStateAction<string>>;
85
+ componentProps?: import("./index-c44170fe").InputProps | undefined;
86
+ accessor?: ((option: OptionShape) => string) | undefined;
87
+ } | undefined;
73
88
  };
74
- export * from "./Component-5e1b8383";
89
+ export * from "./Component-dd8ca091";
75
90
  export { UseSelectWithApplyProps, SELECT_ALL_KEY, useSelectWithApply };
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { PaddingType } from "./index-72dda473";
4
+ declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
5
+ declare const isClient: () => boolean;
6
+ declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
7
+ declare function easeInOutQuad(x: number): number;
8
+ declare const easingFns: {
9
+ easeInOutQuad: typeof easeInOutQuad;
10
+ };
11
+ declare function disableUserInput<T>(disabled: boolean | undefined, event: React.KeyboardEvent<T>): void;
12
+ declare const inputUtils: {
13
+ disableUserInput: typeof disableUserInput;
14
+ };
15
+ export { createPaddingStyle, isClient, getDataTestId, easingFns, inputUtils };
@@ -136,6 +136,10 @@ type BaseInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type
136
136
  * Стили компонента для default и inverted режима.
137
137
  */
138
138
  colorStyles?: StyleColors;
139
+ /**
140
+ * Запрещает ввод с клавиатуры
141
+ */
142
+ disableUserInput?: boolean;
139
143
  };
140
144
  type InputProps = Omit<BaseInputProps, "FormControlComponent" | "colorStyles"> & {
141
145
  /**
@@ -1,2 +1,2 @@
1
- export * from "./Component-50136800";
1
+ export * from "./Component-2abb571d";
2
2
  export type { NavigationBarProps } from "./types-83e2bd9e";
@@ -1,3 +1,3 @@
1
- export * from "./component-50136800";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-72dda473";
1
+ export * from "./component-2abb571d";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-92653002";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-49cc3c24";
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1aez3 */
1
+ /* hash: 1fn88 */
2
2
  :root {
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 */
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 */
@@ -16,13 +16,13 @@
16
16
  --gap-m: 16px;
17
17
  } :root {
18
18
  } :root {
19
- } .picker-button__container_z4h8h {
19
+ } .picker-button__container_1voso {
20
20
  min-width: auto;
21
- } .cc-picker-button.picker-button__optionsPopover_z4h8h.picker-button__sideGap_z4h8h {
21
+ } .cc-picker-button.picker-button__optionsPopover_1voso.picker-button__sideGap_1voso {
22
22
  padding: 0 var(--gap-xs);
23
- } .cc-picker-button .picker-button__option_z4h8h {
23
+ } .cc-picker-button .picker-button__option_1voso {
24
24
  padding: 0 var(--gap-m)
25
- } .cc-picker-button .picker-button__option_z4h8h:before {
25
+ } .cc-picker-button .picker-button__option_1voso:before {
26
26
  /* Удаляем разделители у опций выпадающего списка. */
27
27
  display: none;
28
28
  }
@@ -2,7 +2,7 @@ import { __rest, __assign } from 'tslib';
2
2
  import React from 'react';
3
3
  import { Option as Option$1 } from '@alfalab/core-components-select/esm/shared';
4
4
 
5
- var styles = {"container":"picker-button__container_leuzl","icon":"picker-button__icon_leuzl","content":"picker-button__content_leuzl"};
5
+ var styles = {"container":"picker-button__container_ecjwx","icon":"picker-button__icon_ecjwx","content":"picker-button__content_ecjwx"};
6
6
  require('./index.css')
7
7
 
8
8
  var Option = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: okqex */
1
+ /* hash: tszji */
2
2
  :root {
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 */
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 */
@@ -15,13 +15,13 @@
15
15
  --gap-s: 12px;
16
16
  } :root {
17
17
  } :root {
18
- } .picker-button__container_leuzl {
18
+ } .picker-button__container_ecjwx {
19
19
  display: flex;
20
20
  align-items: center;
21
- } .picker-button__icon_leuzl {
21
+ } .picker-button__icon_ecjwx {
22
22
  display: flex;
23
23
  margin-right: var(--gap-s);
24
- } .picker-button__content_leuzl {
24
+ } .picker-button__content_ecjwx {
25
25
  overflow: hidden;
26
26
  flex: 1;
27
27
  text-overflow: ellipsis;