@alfalab/core-components-custom-picker-button 1.0.5 → 1.0.7

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 (47) hide show
  1. package/Component-2aef4eba.d.ts +50 -0
  2. package/Component-3885b0d7.d.ts +69 -4
  3. package/Component-3e68f8db.d.ts +3 -2
  4. package/Component-5e1b8383.d.ts +4 -14
  5. package/{Component.mobile-3e68f8db.d.ts → Component.mobile-ae13210f.d.ts} +1 -1
  6. package/Component.responsive-2aef4eba.d.ts +28 -0
  7. package/Component.responsive.d.ts +1 -1
  8. package/component-3885b0d7.d.ts +1 -1
  9. package/cssm/Component-3e68f8db.d.ts +3 -2
  10. package/cssm/Component-5e1b8383.d.ts +2 -1
  11. package/cssm/component-3885b0d7.d.ts +1 -1
  12. package/cssm/field/Component.d.ts +2 -1
  13. package/cssm/index-3e68f8db.d.ts +2 -2
  14. package/cssm/index-f12ee135.d.ts +1 -1
  15. package/{modern/types-fae20163.d.ts → cssm/types-3441be57.d.ts} +16 -0
  16. package/esm/Component-3e68f8db.d.ts +3 -2
  17. package/esm/Component-5e1b8383.d.ts +2 -1
  18. package/esm/component-3885b0d7.d.ts +1 -1
  19. package/esm/field/Component.d.ts +2 -1
  20. package/esm/field/Component.js +1 -1
  21. package/esm/field/index.css +5 -5
  22. package/esm/index-3e68f8db.d.ts +2 -2
  23. package/esm/index-f12ee135.d.ts +1 -1
  24. package/{cssm/types-fae20163.d.ts → esm/types-3441be57.d.ts} +16 -0
  25. package/field/Component.d.ts +3 -2
  26. package/field/Component.js +1 -1
  27. package/field/index.css +5 -5
  28. package/hook-3e68f8db.d.ts +1 -1
  29. package/index-2aef4eba.d.ts +5 -0
  30. package/index-3e68f8db.d.ts +3 -2
  31. package/index-3ebe4754.d.ts +1 -0
  32. package/index-701e77da.d.ts +4 -0
  33. package/index-ebda875c.d.ts +35 -1
  34. package/index-f12ee135.d.ts +1 -1
  35. package/modern/Component-3e68f8db.d.ts +3 -2
  36. package/modern/Component-5e1b8383.d.ts +2 -1
  37. package/modern/component-3885b0d7.d.ts +1 -1
  38. package/modern/field/Component.d.ts +2 -1
  39. package/modern/field/Component.js +1 -1
  40. package/modern/field/index.css +5 -5
  41. package/modern/index-3e68f8db.d.ts +2 -2
  42. package/modern/index-f12ee135.d.ts +1 -1
  43. package/{esm/types-fae20163.d.ts → modern/types-3441be57.d.ts} +16 -0
  44. package/package.json +4 -7
  45. package/{types-425c8522.d.ts → types-3441be57.d.ts} +16 -0
  46. package/index-63be8597.d.ts +0 -4
  47. package/send-stats.js +0 -82
@@ -0,0 +1,50 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { FC, SVGProps } from "react";
4
+ import { ButtonProps } from "./index-ebda875c";
5
+ import { BaseSelectProps } from "./index-3e68f8db";
6
+ type PickerButtonSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
7
+ type PickerButtonVariant = 'default' | 'compact';
8
+ type PickerButtonDesktopProps = Omit<BaseSelectProps, 'placeholder' | 'Arrow' | 'autocomplete' | 'size' | 'onFocus' | 'selected' | 'closeOnSelect' | 'multiple' | 'hint' | 'allowUnselect' | 'options'> & Pick<ButtonProps, 'view' | 'loading' | 'leftAddons' | 'rightAddons'> & {
9
+ options: Array<BaseSelectProps['options'][0] & {
10
+ /**
11
+ * Иконка, отображающаяся слева от текстового представления пункта
12
+ */
13
+ icon?: FC<SVGProps<SVGSVGElement>>;
14
+ }>;
15
+ /**
16
+ * Размер кнопки
17
+ */
18
+ size?: PickerButtonSize;
19
+ /**
20
+ * Тип кнопки
21
+ */
22
+ variant?: PickerButtonVariant;
23
+ /**
24
+ * Показывать стрелку
25
+ * @default true
26
+ */
27
+ showArrow?: boolean;
28
+ };
29
+ declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "placeholder" | "onFocus" | "selected" | "multiple" | "hint" | "options" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
30
+ options: Array<BaseSelectProps['options'][0] & {
31
+ /**
32
+ * Иконка, отображающаяся слева от текстового представления пункта
33
+ */
34
+ icon?: FC<SVGProps<SVGSVGElement>>;
35
+ }>;
36
+ /**
37
+ * Размер кнопки
38
+ */
39
+ size?: PickerButtonSize | undefined;
40
+ /**
41
+ * Тип кнопки
42
+ */
43
+ variant?: PickerButtonVariant | undefined;
44
+ /**
45
+ * Показывать стрелку
46
+ * @default true
47
+ */
48
+ showArrow?: boolean | undefined;
49
+ } & React.RefAttributes<HTMLInputElement>>;
50
+ export { PickerButtonSize, PickerButtonVariant, PickerButtonDesktopProps, PickerButtonDesktop };
@@ -1,6 +1,71 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { NavigationBarProps } from "./types-ebda875c";
4
- declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
5
- export * from "./Component-ebda875c";
6
- export { NavigationBar };
3
+ import { ReactNode } from "react";
4
+ import { BottomSheetProps } from "./index-f12ee135";
5
+ import { BaseSelectProps } from "./typings-5e1b8383";
6
+ type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
7
+ /**
8
+ * Футер
9
+ * @deprecated Используйте bottomSheetProps.actionButton
10
+ */
11
+ footer?: ReactNode;
12
+ /**
13
+ * Будет ли свайпаться шторка
14
+ * @deprecated Используйте bottomSheetProps.swipeable
15
+ */
16
+ swipeable?: boolean;
17
+ /**
18
+ * Отображать в BottomSheet
19
+ */
20
+ isBottomSheet?: boolean;
21
+ /**
22
+ * Дополнительные пропсы шторки
23
+ */
24
+ bottomSheetProps?: Partial<BottomSheetProps>;
25
+ /**
26
+ * Дополнительные пропсы модалки
27
+ */
28
+ modalProps?: Partial<React.ComponentProps<typeof ModalMobile>>;
29
+ /**
30
+ * Дополнительные пропсы шапки модалки
31
+ */
32
+ modalHeaderProps?: Partial<React.ComponentProps<typeof ModalMobile.Header>>;
33
+ /**
34
+ * Дополнительные пропсы футера модалки
35
+ */
36
+ modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
37
+ };
38
+ declare const BaseSelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
39
+ /**
40
+ * Футер
41
+ * @deprecated Используйте bottomSheetProps.actionButton
42
+ */
43
+ footer?: ReactNode;
44
+ /**
45
+ * Будет ли свайпаться шторка
46
+ * @deprecated Используйте bottomSheetProps.swipeable
47
+ */
48
+ swipeable?: boolean | undefined;
49
+ /**
50
+ * Отображать в BottomSheet
51
+ */
52
+ isBottomSheet?: boolean | undefined;
53
+ /**
54
+ * Дополнительные пропсы шторки
55
+ */
56
+ bottomSheetProps?: Partial<BottomSheetProps> | undefined;
57
+ /**
58
+ * Дополнительные пропсы модалки
59
+ */
60
+ modalProps?: Partial<import("./typings-bdb4c6b9").ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
61
+ /**
62
+ * Дополнительные пропсы шапки модалки
63
+ */
64
+ modalHeaderProps?: Partial<import("./Component-5e1b8383").HeaderProps> | undefined;
65
+ /**
66
+ * Дополнительные пропсы футера модалки
67
+ */
68
+ modalFooterProps?: Partial<import("./Component.mobile-b2c0420d").FooterProps> | undefined;
69
+ } & React.RefAttributes<unknown>>;
70
+ export * from "./Component.mobile-b2c0420d";
71
+ export { SelectMobileProps, BaseSelectMobile };
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { FC, SVGProps } from 'react';
2
+ import React from 'react';
3
+ import { FC, SVGProps } from "react";
3
4
  import { OptionShape } from "./typings-5e1b8383";
4
5
  import { OptionProps as BaseOptionProps } from "./typings-5e1b8383";
5
6
  type OptionProps = Omit<BaseOptionProps, 'option'> & {
@@ -7,5 +8,5 @@ type OptionProps = Omit<BaseOptionProps, 'option'> & {
7
8
  icon?: FC<SVGProps<SVGSVGElement>>;
8
9
  };
9
10
  };
10
- declare const Option: ({ option, children, ...restProps }: OptionProps) => JSX.Element;
11
+ declare const Option: ({ option, children, ...restProps }: OptionProps) => React.JSX.Element;
11
12
  export { Option };
@@ -1,15 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { FC, SVGProps } from "react";
3
- import { PickerButtonSize, PickerButtonVariant } from "./index-63be8597";
4
- import { ButtonProps } from "./index-ebda875c";
5
- import { FieldProps as BaseFieldProps } from "./typings-5e1b8383";
6
- import { PickerButtonSize as PickerButtonSize$0 } from "./Component-3e68f8db";
7
- import { PickerButtonVariant as PickerButtonVariant$0 } from "./Component-3e68f8db";
8
- declare const getIcon: (variant: PickerButtonVariant, size: PickerButtonSize) => FC<SVGProps<SVGSVGElement>>;
9
- type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
10
- buttonSize?: PickerButtonSize$0;
11
- buttonVariant?: PickerButtonVariant$0;
12
- showArrow?: boolean;
13
- };
14
- declare const Field: ({ buttonSize, buttonVariant, view, label, open, multiple, rightAddons, Arrow, innerProps, className, selected, selectedMultiple, setSelectedItems, toggleMenu, valueRenderer, showArrow, labelView, ...restProps }: FieldProps) => JSX.Element;
15
- export { getIcon, Field };
2
+ import React from 'react';
3
+ import { CheckmarkProps } from "./typings-5e1b8383";
4
+ declare const BaseCheckmark: ({ selected, disabled, className, multiple, }: CheckmarkProps) => React.JSX.Element;
5
+ export { BaseCheckmark };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { AdditionalMobileProps } from "./index-3e68f8db";
4
- import { PickerButtonDesktopProps } from "./Component-3e68f8db";
4
+ import { PickerButtonDesktopProps } from "./Component-2aef4eba";
5
5
  type PickerButtonMobileProps = Omit<PickerButtonDesktopProps, 'OptionsList' | 'Checkmark' | 'onScroll'> & AdditionalMobileProps;
6
6
  declare const PickerButtonMobile: React.ForwardRefExoticComponent<Omit<PickerButtonDesktopProps, "onScroll" | "OptionsList" | "Checkmark"> & AdditionalMobileProps & React.RefAttributes<HTMLInputElement>>;
7
7
  export { PickerButtonMobileProps, PickerButtonMobile };
@@ -0,0 +1,28 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { ButtonProps } from "./index-ebda875c";
4
+ import { AdditionalMobileProps } from "./index-3e68f8db";
5
+ import { PickerButtonDesktopProps } from "./Component-2aef4eba";
6
+ type PickerButtonMatchMedia = 'desktop' | 'mobile';
7
+ type PickerButtonResponsiveProps = PickerButtonDesktopProps & AdditionalMobileProps & {
8
+ /**
9
+ * Контрольная точка, с нее начинается desktop версия
10
+ * @default 1024
11
+ */
12
+ breakpoint?: number;
13
+ };
14
+ declare const PickerButtonResponsive: React.ForwardRefExoticComponent<Omit<import("./index-3e68f8db").BaseSelectProps, "size" | "placeholder" | "onFocus" | "selected" | "multiple" | "hint" | "options" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
15
+ options: ((import("./index-3e68f8db").OptionShape | import("./index-3e68f8db").GroupShape) & {
16
+ icon?: React.FC<React.SVGProps<SVGSVGElement>> | undefined;
17
+ })[];
18
+ size?: import("./Component-2aef4eba").PickerButtonSize | undefined;
19
+ variant?: import("./Component-2aef4eba").PickerButtonVariant | undefined;
20
+ showArrow?: boolean | undefined;
21
+ } & AdditionalMobileProps & {
22
+ /**
23
+ * Контрольная точка, с нее начинается desktop версия
24
+ * @default 1024
25
+ */
26
+ breakpoint?: number | undefined;
27
+ } & React.RefAttributes<HTMLInputElement>>;
28
+ export { PickerButtonMatchMedia, PickerButtonResponsiveProps, PickerButtonResponsive };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
3
  import { CustomButtonProps } from "@alfalab/core-components-custom-button";
4
- import { PickerButtonDesktopProps } from "./index-63be8597";
4
+ import { PickerButtonDesktopProps } from "./index-2aef4eba";
5
5
  import { AdditionalMobileProps } from "./index-3e68f8db";
6
6
  import { CustomPickerButtonDesktopProps } from "./Component.desktop";
7
7
  type PickerButtonMatchMedia = 'desktop' | 'mobile';
@@ -4,7 +4,7 @@ import { FC, RefObject, ReactNode } from "react";
4
4
  import { NavigationBarProps } from "./index-e81c389f";
5
5
  import { SwipeableHandlers } from "react-swipeable";
6
6
  import { BackdropProps } from "./index-ebda875c";
7
- import { BottomSheetProps } from "./types-425c8522";
7
+ import { BottomSheetProps } from "./types-3441be57";
8
8
  type HeaderProps = Omit<NavigationBarProps, "view" | "size"> & {
9
9
  headerRef: RefObject<HTMLDivElement>;
10
10
  };
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { FC, SVGProps } from 'react';
2
+ import React from 'react';
3
+ import { FC, SVGProps } from "react";
3
4
  import { OptionShape } from "./typings-5e1b8383";
4
5
  import { OptionProps as BaseOptionProps } from "./typings-5e1b8383";
5
6
  type OptionProps = Omit<BaseOptionProps, 'option'> & {
@@ -7,5 +8,5 @@ type OptionProps = Omit<BaseOptionProps, 'option'> & {
7
8
  icon?: FC<SVGProps<SVGSVGElement>>;
8
9
  };
9
10
  };
10
- declare const Option: ({ option, children, ...restProps }: OptionProps) => JSX.Element;
11
+ declare const Option: ({ option, children, ...restProps }: OptionProps) => React.JSX.Element;
11
12
  export { Option };
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import React from 'react';
2
3
  import { CheckmarkProps } from "./typings-5e1b8383";
3
- declare const BaseCheckmark: ({ selected, disabled, className, multiple, }: CheckmarkProps) => JSX.Element;
4
+ declare const BaseCheckmark: ({ selected, disabled, className, multiple, }: CheckmarkProps) => React.JSX.Element;
4
5
  export { BaseCheckmark };
@@ -4,7 +4,7 @@ import { FC, RefObject, ReactNode } from "react";
4
4
  import { NavigationBarProps } from "./index-e81c389f";
5
5
  import { SwipeableHandlers } from "react-swipeable";
6
6
  import { BackdropProps } from "./index-ebda875c";
7
- import { BottomSheetProps } from "./types-fae20163";
7
+ import { BottomSheetProps } from "./types-3441be57";
8
8
  type HeaderProps = Omit<NavigationBarProps, "view" | "size"> & {
9
9
  headerRef: RefObject<HTMLDivElement>;
10
10
  };
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import React from 'react';
2
3
  import { CustomButtonProps } from "@alfalab/core-components-custom-button";
3
4
  import { PickerButtonSize, PickerButtonVariant } from "../index-2aef4eba";
4
5
  import { FieldProps as BaseFieldProps } from "../typings-5e1b8383";
@@ -7,5 +8,5 @@ type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & Custom
7
8
  buttonVariant?: PickerButtonVariant;
8
9
  showArrow?: boolean;
9
10
  };
10
- declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, ...restProps }: FieldProps) => JSX.Element;
11
+ declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, ...restProps }: FieldProps) => React.JSX.Element;
11
12
  export { Field };
@@ -20,7 +20,7 @@ type useSelectWithLoadingProps = {
20
20
  Option?: React.FC<OptionProps>;
21
21
  };
22
22
  declare function useSelectWithLoading({ loading, visibleOptions, Option }: useSelectWithLoadingProps): {
23
- Option: (props: OptionProps) => JSX.Element;
23
+ Option: (props: OptionProps) => React.JSX.Element;
24
24
  options: OptionShape[];
25
25
  } | null;
26
26
  type OptionsFetcherResponse = {
@@ -51,7 +51,7 @@ type useLazyLoadingProps = {
51
51
  };
52
52
  declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, Option }: useLazyLoadingProps): {
53
53
  optionsProps: {
54
- Option: (props: OptionProps) => JSX.Element;
54
+ Option: (props: OptionProps) => React.JSX.Element;
55
55
  options: OptionShape[];
56
56
  optionsListProps: {
57
57
  ref: React.RefObject<HTMLDivElement>;
@@ -1,3 +1,3 @@
1
1
  export * from "./component-3885b0d7";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-fae20163";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-3441be57";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-b64479aa";
@@ -219,5 +219,21 @@ type BottomSheetProps = {
219
219
  * Вызывается после притягивания к одной из `magneticAreas`
220
220
  */
221
221
  onMagnetize?: (index: number) => void;
222
+ /**
223
+ * Содержимое bottom-sheet всегда в DOM
224
+ */
225
+ keepMounted?: boolean;
226
+ /**
227
+ * Отключает автоматический перевод фокуса на bottom-sheet при открытии
228
+ */
229
+ disableAutoFocus?: boolean;
230
+ /**
231
+ * Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
232
+ */
233
+ disableRestoreFocus?: boolean;
234
+ /**
235
+ * Отключает вызов `onClose` при нажатии Escape
236
+ */
237
+ disableEscapeKeyDown?: boolean;
222
238
  };
223
239
  export { BottomSheetTitleAlign, BottomSheetProps };
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { FC, SVGProps } from 'react';
2
+ import React from 'react';
3
+ import { FC, SVGProps } from "react";
3
4
  import { OptionShape } from "./typings-5e1b8383";
4
5
  import { OptionProps as BaseOptionProps } from "./typings-5e1b8383";
5
6
  type OptionProps = Omit<BaseOptionProps, 'option'> & {
@@ -7,5 +8,5 @@ type OptionProps = Omit<BaseOptionProps, 'option'> & {
7
8
  icon?: FC<SVGProps<SVGSVGElement>>;
8
9
  };
9
10
  };
10
- declare const Option: ({ option, children, ...restProps }: OptionProps) => JSX.Element;
11
+ declare const Option: ({ option, children, ...restProps }: OptionProps) => React.JSX.Element;
11
12
  export { Option };
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import React from 'react';
2
3
  import { CheckmarkProps } from "./typings-5e1b8383";
3
- declare const BaseCheckmark: ({ selected, disabled, className, multiple, }: CheckmarkProps) => JSX.Element;
4
+ declare const BaseCheckmark: ({ selected, disabled, className, multiple, }: CheckmarkProps) => React.JSX.Element;
4
5
  export { BaseCheckmark };
@@ -4,7 +4,7 @@ import { FC, RefObject, ReactNode } from "react";
4
4
  import { NavigationBarProps } from "./index-e81c389f";
5
5
  import { SwipeableHandlers } from "react-swipeable";
6
6
  import { BackdropProps } from "./index-ebda875c";
7
- import { BottomSheetProps } from "./types-fae20163";
7
+ import { BottomSheetProps } from "./types-3441be57";
8
8
  type HeaderProps = Omit<NavigationBarProps, "view" | "size"> & {
9
9
  headerRef: RefObject<HTMLDivElement>;
10
10
  };
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import React from 'react';
2
3
  import { CustomButtonProps } from "@alfalab/core-components-custom-button";
3
4
  import { PickerButtonSize, PickerButtonVariant } from "../index-2aef4eba";
4
5
  import { FieldProps as BaseFieldProps } from "../typings-5e1b8383";
@@ -7,5 +8,5 @@ type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & Custom
7
8
  buttonVariant?: PickerButtonVariant;
8
9
  showArrow?: boolean;
9
10
  };
10
- declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, ...restProps }: FieldProps) => JSX.Element;
11
+ declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, ...restProps }: FieldProps) => React.JSX.Element;
11
12
  export { Field };
@@ -4,7 +4,7 @@ import cn from 'classnames';
4
4
  import { CustomButton } from '@alfalab/core-components-custom-button/esm';
5
5
  import { getIcon } from '@alfalab/core-components-picker-button/esm';
6
6
 
7
- var styles = {"iconContainer":"custom-picker-button__iconContainer_o94x9","addonsContainer":"custom-picker-button__addonsContainer_o94x9","showControlIcon":"custom-picker-button__showControlIcon_o94x9","open":"custom-picker-button__open_o94x9"};
7
+ var styles = {"iconContainer":"custom-picker-button__iconContainer_1otdn","addonsContainer":"custom-picker-button__addonsContainer_1otdn","showControlIcon":"custom-picker-button__showControlIcon_1otdn","open":"custom-picker-button__open_1otdn"};
8
8
  require('./index.css')
9
9
 
10
10
  var Field = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1207y */
1
+ /* hash: tncvo */
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
  } :root {
17
17
  } :root {
18
18
  --arrow-transform: rotate(180deg);
19
- } .custom-picker-button__iconContainer_o94x9 {
19
+ } .custom-picker-button__iconContainer_1otdn {
20
20
  display: flex;
21
21
  transition: transform 0.15s ease-in-out;
22
- } .custom-picker-button__addonsContainer_o94x9 {
22
+ } .custom-picker-button__addonsContainer_1otdn {
23
23
  display: flex
24
- } .custom-picker-button__addonsContainer_o94x9.custom-picker-button__showControlIcon_o94x9 {
24
+ } .custom-picker-button__addonsContainer_1otdn.custom-picker-button__showControlIcon_1otdn {
25
25
  margin-right: var(--gap-2xs);
26
- } .custom-picker-button__open_o94x9 {
26
+ } .custom-picker-button__open_1otdn {
27
27
  transform: var(--arrow-transform);
28
28
  }
@@ -20,7 +20,7 @@ type useSelectWithLoadingProps = {
20
20
  Option?: React.FC<OptionProps>;
21
21
  };
22
22
  declare function useSelectWithLoading({ loading, visibleOptions, Option }: useSelectWithLoadingProps): {
23
- Option: (props: OptionProps) => JSX.Element;
23
+ Option: (props: OptionProps) => React.JSX.Element;
24
24
  options: OptionShape[];
25
25
  } | null;
26
26
  type OptionsFetcherResponse = {
@@ -51,7 +51,7 @@ type useLazyLoadingProps = {
51
51
  };
52
52
  declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, Option }: useLazyLoadingProps): {
53
53
  optionsProps: {
54
- Option: (props: OptionProps) => JSX.Element;
54
+ Option: (props: OptionProps) => React.JSX.Element;
55
55
  options: OptionShape[];
56
56
  optionsListProps: {
57
57
  ref: React.RefObject<HTMLDivElement>;
@@ -1,3 +1,3 @@
1
1
  export * from "./component-3885b0d7";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-fae20163";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-3441be57";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-b64479aa";
@@ -219,5 +219,21 @@ type BottomSheetProps = {
219
219
  * Вызывается после притягивания к одной из `magneticAreas`
220
220
  */
221
221
  onMagnetize?: (index: number) => void;
222
+ /**
223
+ * Содержимое bottom-sheet всегда в DOM
224
+ */
225
+ keepMounted?: boolean;
226
+ /**
227
+ * Отключает автоматический перевод фокуса на bottom-sheet при открытии
228
+ */
229
+ disableAutoFocus?: boolean;
230
+ /**
231
+ * Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
232
+ */
233
+ disableRestoreFocus?: boolean;
234
+ /**
235
+ * Отключает вызов `onClose` при нажатии Escape
236
+ */
237
+ disableEscapeKeyDown?: boolean;
222
238
  };
223
239
  export { BottomSheetTitleAlign, BottomSheetProps };
@@ -1,11 +1,12 @@
1
1
  /// <reference types="react" />
2
+ import React from 'react';
2
3
  import { CustomButtonProps } from "@alfalab/core-components-custom-button";
3
- import { PickerButtonSize, PickerButtonVariant } from "../index-63be8597";
4
+ import { PickerButtonSize, PickerButtonVariant } from "../index-2aef4eba";
4
5
  import { FieldProps as BaseFieldProps } from "../typings-5e1b8383";
5
6
  type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & CustomButtonProps & {
6
7
  buttonSize?: PickerButtonSize;
7
8
  buttonVariant?: PickerButtonVariant;
8
9
  showArrow?: boolean;
9
10
  };
10
- declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, ...restProps }: FieldProps) => JSX.Element;
11
+ declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, ...restProps }: FieldProps) => React.JSX.Element;
11
12
  export { Field };
@@ -13,7 +13,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
13
13
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
14
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
15
15
 
16
- var styles = {"iconContainer":"custom-picker-button__iconContainer_o94x9","addonsContainer":"custom-picker-button__addonsContainer_o94x9","showControlIcon":"custom-picker-button__showControlIcon_o94x9","open":"custom-picker-button__open_o94x9"};
16
+ var styles = {"iconContainer":"custom-picker-button__iconContainer_1otdn","addonsContainer":"custom-picker-button__addonsContainer_1otdn","showControlIcon":"custom-picker-button__showControlIcon_1otdn","open":"custom-picker-button__open_1otdn"};
17
17
  require('./index.css')
18
18
 
19
19
  var Field = function (_a) {
package/field/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1207y */
1
+ /* hash: tncvo */
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
  } :root {
17
17
  } :root {
18
18
  --arrow-transform: rotate(180deg);
19
- } .custom-picker-button__iconContainer_o94x9 {
19
+ } .custom-picker-button__iconContainer_1otdn {
20
20
  display: flex;
21
21
  transition: transform 0.15s ease-in-out;
22
- } .custom-picker-button__addonsContainer_o94x9 {
22
+ } .custom-picker-button__addonsContainer_1otdn {
23
23
  display: flex
24
- } .custom-picker-button__addonsContainer_o94x9.custom-picker-button__showControlIcon_o94x9 {
24
+ } .custom-picker-button__addonsContainer_1otdn.custom-picker-button__showControlIcon_1otdn {
25
25
  margin-right: var(--gap-2xs);
26
- } .custom-picker-button__open_o94x9 {
26
+ } .custom-picker-button__open_1otdn {
27
27
  transform: var(--arrow-transform);
28
28
  }
@@ -41,7 +41,7 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
41
41
  onClose?: (() => void) | undefined;
42
42
  selectedDraft?: OptionShape[] | undefined;
43
43
  OptionsList?: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
44
- Footer?: import("react").FC<import("./Component-5e1b8383").FooterProps> | undefined;
44
+ Footer?: import("react").FC<import("./Component-ebda875c").FooterProps> | undefined;
45
45
  Header?: import("react").FC<import("./Component-ebda875c").HeaderProps> | undefined;
46
46
  headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
47
47
  showHeaderWithSelectAll?: boolean | undefined;
@@ -0,0 +1,5 @@
1
+ export * from "./Component.responsive-2aef4eba";
2
+ export { PickerButtonResponsive as PickerButton };
3
+ export type { PickerButtonResponsiveProps as PickerButtonProps };
4
+ export type { PickerButtonDesktopProps, PickerButtonSize, PickerButtonVariant } from "./Component-2aef4eba";
5
+ export { getIcon } from "./index-701e77da";
@@ -20,7 +20,7 @@ type useSelectWithLoadingProps = {
20
20
  Option?: React.FC<OptionProps>;
21
21
  };
22
22
  declare function useSelectWithLoading({ loading, visibleOptions, Option }: useSelectWithLoadingProps): {
23
- Option: (props: OptionProps) => JSX.Element;
23
+ Option: (props: OptionProps) => React.JSX.Element;
24
24
  options: OptionShape[];
25
25
  } | null;
26
26
  type OptionsFetcherResponse = {
@@ -51,7 +51,7 @@ type useLazyLoadingProps = {
51
51
  };
52
52
  declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, Option }: useLazyLoadingProps): {
53
53
  optionsProps: {
54
- Option: (props: OptionProps) => JSX.Element;
54
+ Option: (props: OptionProps) => React.JSX.Element;
55
55
  options: OptionShape[];
56
56
  optionsListProps: {
57
57
  ref: React.RefObject<HTMLDivElement>;
@@ -93,6 +93,7 @@ type SkeletonProps = {
93
93
  declare const Skeleton: React.FC<SkeletonProps>;
94
94
  export { SelectFieldProps, SelectProps, Select, useSelectWithLoading, useLazyLoading, SkeletonProps, Skeleton };
95
95
  export * from "./index-ebda875c";
96
+ export * from "./Component-3885b0d7";
96
97
  export * from "./Component-5e1b8383";
97
98
  export * from "./hook-3e68f8db";
98
99
  export * from "./typings-5e1b8383";
@@ -0,0 +1 @@
1
+ export * from "./Component-3ebe4754";
@@ -0,0 +1,4 @@
1
+ import { FC, SVGProps } from 'react';
2
+ import { PickerButtonSize, PickerButtonVariant } from "./index-2aef4eba";
3
+ declare const getIcon: (variant: PickerButtonVariant, size: PickerButtonSize) => FC<SVGProps<SVGSVGElement>>;
4
+ export { getIcon };
@@ -1,3 +1,37 @@
1
1
  /// <reference types="react" />
2
2
  /// <reference types="react-transition-group" />
3
- export * from "./Component-3e68f8db";
3
+ import React from "react";
4
+ import { ButtonHTMLAttributes, ElementType, FC } from "react";
5
+ interface CloserProps extends ButtonHTMLAttributes<HTMLButtonElement> {
6
+ /**
7
+ * Вид компонента
8
+ */
9
+ view: "desktop" | "mobile";
10
+ /**
11
+ * Дополнительный класс
12
+ */
13
+ className?: string;
14
+ /**
15
+ * Позиция крестика
16
+ */
17
+ align?: "left" | "right";
18
+ /**
19
+ * Фиксирует крестик
20
+ */
21
+ sticky?: boolean;
22
+ /**
23
+ * Иконка
24
+ */
25
+ icon?: ElementType;
26
+ /**
27
+ * Идентификатор для систем автоматизированного тестирования
28
+ */
29
+ dataTestId?: string;
30
+ /**
31
+ * Коллбэк закрытия.
32
+ */
33
+ onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
34
+ }
35
+ declare const Closer: FC<CloserProps>;
36
+ export { CloserProps, Closer };
37
+ export * from "./Component-ebda875c";
@@ -1,3 +1,3 @@
1
1
  export * from "./component-3885b0d7";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-425c8522";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-3441be57";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-b64479aa";
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { FC, SVGProps } from 'react';
2
+ import React from 'react';
3
+ import { FC, SVGProps } from "react";
3
4
  import { OptionShape } from "./typings-5e1b8383";
4
5
  import { OptionProps as BaseOptionProps } from "./typings-5e1b8383";
5
6
  type OptionProps = Omit<BaseOptionProps, 'option'> & {
@@ -7,5 +8,5 @@ type OptionProps = Omit<BaseOptionProps, 'option'> & {
7
8
  icon?: FC<SVGProps<SVGSVGElement>>;
8
9
  };
9
10
  };
10
- declare const Option: ({ option, children, ...restProps }: OptionProps) => JSX.Element;
11
+ declare const Option: ({ option, children, ...restProps }: OptionProps) => React.JSX.Element;
11
12
  export { Option };
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import React from 'react';
2
3
  import { CheckmarkProps } from "./typings-5e1b8383";
3
- declare const BaseCheckmark: ({ selected, disabled, className, multiple, }: CheckmarkProps) => JSX.Element;
4
+ declare const BaseCheckmark: ({ selected, disabled, className, multiple, }: CheckmarkProps) => React.JSX.Element;
4
5
  export { BaseCheckmark };
@@ -4,7 +4,7 @@ import { FC, RefObject, ReactNode } from "react";
4
4
  import { NavigationBarProps } from "./index-e81c389f";
5
5
  import { SwipeableHandlers } from "react-swipeable";
6
6
  import { BackdropProps } from "./index-ebda875c";
7
- import { BottomSheetProps } from "./types-fae20163";
7
+ import { BottomSheetProps } from "./types-3441be57";
8
8
  type HeaderProps = Omit<NavigationBarProps, "view" | "size"> & {
9
9
  headerRef: RefObject<HTMLDivElement>;
10
10
  };
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import React from 'react';
2
3
  import { CustomButtonProps } from "@alfalab/core-components-custom-button";
3
4
  import { PickerButtonSize, PickerButtonVariant } from "../index-2aef4eba";
4
5
  import { FieldProps as BaseFieldProps } from "../typings-5e1b8383";
@@ -7,5 +8,5 @@ type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & Custom
7
8
  buttonVariant?: PickerButtonVariant;
8
9
  showArrow?: boolean;
9
10
  };
10
- declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, ...restProps }: FieldProps) => JSX.Element;
11
+ declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, ...restProps }: FieldProps) => React.JSX.Element;
11
12
  export { Field };
@@ -3,7 +3,7 @@ import cn from 'classnames';
3
3
  import { CustomButton } from '@alfalab/core-components-custom-button/modern';
4
4
  import { getIcon } from '@alfalab/core-components-picker-button/modern';
5
5
 
6
- const styles = {"iconContainer":"custom-picker-button__iconContainer_o94x9","addonsContainer":"custom-picker-button__addonsContainer_o94x9","showControlIcon":"custom-picker-button__showControlIcon_o94x9","open":"custom-picker-button__open_o94x9"};
6
+ const styles = {"iconContainer":"custom-picker-button__iconContainer_1otdn","addonsContainer":"custom-picker-button__addonsContainer_1otdn","showControlIcon":"custom-picker-button__showControlIcon_1otdn","open":"custom-picker-button__open_1otdn"};
7
7
  require('./index.css')
8
8
 
9
9
  const Field = ({ buttonSize = 'm', buttonVariant = 'default', backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow = true, ...restProps }) => {
@@ -1,4 +1,4 @@
1
- /* hash: 1207y */
1
+ /* hash: tncvo */
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
  } :root {
17
17
  } :root {
18
18
  --arrow-transform: rotate(180deg);
19
- } .custom-picker-button__iconContainer_o94x9 {
19
+ } .custom-picker-button__iconContainer_1otdn {
20
20
  display: flex;
21
21
  transition: transform 0.15s ease-in-out;
22
- } .custom-picker-button__addonsContainer_o94x9 {
22
+ } .custom-picker-button__addonsContainer_1otdn {
23
23
  display: flex
24
- } .custom-picker-button__addonsContainer_o94x9.custom-picker-button__showControlIcon_o94x9 {
24
+ } .custom-picker-button__addonsContainer_1otdn.custom-picker-button__showControlIcon_1otdn {
25
25
  margin-right: var(--gap-2xs);
26
- } .custom-picker-button__open_o94x9 {
26
+ } .custom-picker-button__open_1otdn {
27
27
  transform: var(--arrow-transform);
28
28
  }
@@ -20,7 +20,7 @@ type useSelectWithLoadingProps = {
20
20
  Option?: React.FC<OptionProps>;
21
21
  };
22
22
  declare function useSelectWithLoading({ loading, visibleOptions, Option }: useSelectWithLoadingProps): {
23
- Option: (props: OptionProps) => JSX.Element;
23
+ Option: (props: OptionProps) => React.JSX.Element;
24
24
  options: OptionShape[];
25
25
  } | null;
26
26
  type OptionsFetcherResponse = {
@@ -51,7 +51,7 @@ type useLazyLoadingProps = {
51
51
  };
52
52
  declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, Option }: useLazyLoadingProps): {
53
53
  optionsProps: {
54
- Option: (props: OptionProps) => JSX.Element;
54
+ Option: (props: OptionProps) => React.JSX.Element;
55
55
  options: OptionShape[];
56
56
  optionsListProps: {
57
57
  ref: React.RefObject<HTMLDivElement>;
@@ -1,3 +1,3 @@
1
1
  export * from "./component-3885b0d7";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-fae20163";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-3441be57";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-b64479aa";
@@ -219,5 +219,21 @@ type BottomSheetProps = {
219
219
  * Вызывается после притягивания к одной из `magneticAreas`
220
220
  */
221
221
  onMagnetize?: (index: number) => void;
222
+ /**
223
+ * Содержимое bottom-sheet всегда в DOM
224
+ */
225
+ keepMounted?: boolean;
226
+ /**
227
+ * Отключает автоматический перевод фокуса на bottom-sheet при открытии
228
+ */
229
+ disableAutoFocus?: boolean;
230
+ /**
231
+ * Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
232
+ */
233
+ disableRestoreFocus?: boolean;
234
+ /**
235
+ * Отключает вызов `onClose` при нажатии Escape
236
+ */
237
+ disableEscapeKeyDown?: boolean;
222
238
  };
223
239
  export { BottomSheetTitleAlign, BottomSheetProps };
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-custom-picker-button",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Custom picker button component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
7
7
  "main": "index.js",
8
8
  "module": "./esm/index.js",
9
- "scripts": {
10
- "postinstall": "node -e \"if (require('fs').existsSync('./send-stats.js')){require('./send-stats.js')} \""
11
- },
12
9
  "publishConfig": {
13
10
  "access": "public",
14
11
  "directory": "dist"
@@ -18,9 +15,9 @@
18
15
  "react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
19
16
  },
20
17
  "dependencies": {
21
- "@alfalab/core-components-picker-button": "^10.3.28",
22
- "@alfalab/core-components-custom-button": "^3.2.1",
23
- "@alfalab/core-components-mq": "^4.1.4",
18
+ "@alfalab/core-components-picker-button": "^10.3.30",
19
+ "@alfalab/core-components-custom-button": "^3.2.2",
20
+ "@alfalab/core-components-mq": "^4.1.5",
24
21
  "classnames": "^2.3.1",
25
22
  "tslib": "^2.4.0"
26
23
  }
@@ -219,5 +219,21 @@ type BottomSheetProps = {
219
219
  * Вызывается после притягивания к одной из `magneticAreas`
220
220
  */
221
221
  onMagnetize?: (index: number) => void;
222
+ /**
223
+ * Содержимое bottom-sheet всегда в DOM
224
+ */
225
+ keepMounted?: boolean;
226
+ /**
227
+ * Отключает автоматический перевод фокуса на bottom-sheet при открытии
228
+ */
229
+ disableAutoFocus?: boolean;
230
+ /**
231
+ * Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
232
+ */
233
+ disableRestoreFocus?: boolean;
234
+ /**
235
+ * Отключает вызов `onClose` при нажатии Escape
236
+ */
237
+ disableEscapeKeyDown?: boolean;
222
238
  };
223
239
  export { BottomSheetTitleAlign, BottomSheetProps };
@@ -1,4 +0,0 @@
1
- export { PickerButtonResponsive as PickerButton } from "packages/picker-button/src/responsive";
2
- export type { PickerButtonResponsiveProps as PickerButtonProps } from "packages/picker-button/src/responsive";
3
- export type { PickerButtonDesktopProps, PickerButtonSize, PickerButtonVariant } from "./Component-3e68f8db";
4
- export { getIcon } from "./Component-5e1b8383";
package/send-stats.js DELETED
@@ -1,82 +0,0 @@
1
- const http = require('http');
2
- const fs = require('fs');
3
- const { promisify } = require('util');
4
- const path = require('path');
5
-
6
- const readFile = promisify(fs.readFile);
7
-
8
- async function main() {
9
- const remoteHost = process.env.NIS_HOST || 'digital';
10
- const remotePort = process.env.NIS_PORT || 80;
11
- const remotePath = process.env.NIS_PATH || '/npm-install-stats/api/install-stats';
12
-
13
- try {
14
- const [_, node, os, arch] =
15
- /node\/v(\d+\.\d+\.\d+) (\w+) (\w+)/.exec(process.env.npm_config_user_agent) || [];
16
- const [__, npm] = /npm\/(\d+\.\d+\.\d+)/.exec(process.env.npm_config_user_agent) || [];
17
- const [___, yarn] = /yarn\/(\d+\.\d+\.\d+)/.exec(process.env.npm_config_user_agent) || [];
18
-
19
- let ownPackageJson, packageJson;
20
-
21
- try {
22
- const result = await Promise.all([
23
- readFile(path.join(process.cwd(), 'package.json'), 'utf-8'),
24
- readFile(path.join(process.cwd(), '../../../package.json'), 'utf-8'),
25
- ]);
26
-
27
- ownPackageJson = JSON.parse(result[0]);
28
- packageJson = JSON.parse(result[1]);
29
- } catch (err) {
30
- ownPackageJson = '';
31
- packageJson = '';
32
- }
33
-
34
- const data = {
35
- node,
36
- npm,
37
- yarn,
38
- os,
39
- arch,
40
- ownPackageJson: JSON.stringify(ownPackageJson),
41
- packageJson: JSON.stringify(packageJson),
42
- };
43
-
44
- const body = JSON.stringify(data);
45
-
46
- const options = {
47
- host: remoteHost,
48
- port: remotePort,
49
- path: remotePath,
50
- method: 'POST',
51
- headers: {
52
- 'Content-Type': 'application/json',
53
- 'Content-Length': body.length,
54
- },
55
- };
56
-
57
- return new Promise((resolve, reject) => {
58
- const req = http.request(options, (res) => {
59
- res.on('end', () => {
60
- resolve();
61
- });
62
- });
63
-
64
- req.on('error', () => {
65
- reject();
66
- });
67
-
68
- req.write(body);
69
- req.end();
70
- });
71
- } catch (error) {
72
- throw error;
73
- }
74
- }
75
-
76
- main()
77
- .then(() => {
78
- process.exit(0);
79
- })
80
- .catch(() => {
81
- process.exit(0);
82
- });