@alfalab/core-components-custom-picker-button 2.0.2 → 2.0.3

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 (35) hide show
  1. package/Component-63dec22f.d.ts +18 -1
  2. package/component-50136800.d.ts +1 -1
  3. package/cssm/Component-63dec22f.d.ts +18 -1
  4. package/cssm/component-50136800.d.ts +1 -1
  5. package/cssm/index-f12ee135.d.ts +1 -1
  6. package/cssm/shared-4cd3936b.d.ts +1 -29
  7. package/cssm/types-1b036d4b.d.ts +13 -0
  8. package/cssm/{types-d9f9bbcc.d.ts → types-92653002.d.ts} +9 -1
  9. package/cssm/useSkeleton-ebda875c.d.ts +12 -0
  10. package/esm/Component-63dec22f.d.ts +18 -1
  11. package/esm/component-50136800.d.ts +1 -1
  12. package/esm/field/Component.js +1 -1
  13. package/esm/field/index.css +5 -5
  14. package/esm/index-f12ee135.d.ts +1 -1
  15. package/esm/shared-4cd3936b.d.ts +1 -29
  16. package/esm/types-1b036d4b.d.ts +13 -0
  17. package/esm/{types-d9f9bbcc.d.ts → types-92653002.d.ts} +9 -1
  18. package/esm/useSkeleton-ebda875c.d.ts +12 -0
  19. package/field/Component.js +1 -1
  20. package/field/index.css +5 -5
  21. package/index-f12ee135.d.ts +1 -1
  22. package/modern/Component-63dec22f.d.ts +18 -1
  23. package/modern/component-50136800.d.ts +1 -1
  24. package/modern/field/Component.js +1 -1
  25. package/modern/field/index.css +5 -5
  26. package/modern/index-f12ee135.d.ts +1 -1
  27. package/modern/shared-4cd3936b.d.ts +1 -29
  28. package/modern/types-1b036d4b.d.ts +13 -0
  29. package/modern/{types-d9f9bbcc.d.ts → types-92653002.d.ts} +9 -1
  30. package/modern/useSkeleton-ebda875c.d.ts +12 -0
  31. package/package.json +3 -3
  32. package/shared-4cd3936b.d.ts +1 -29
  33. package/types-1b036d4b.d.ts +13 -0
  34. package/{types-d9f9bbcc.d.ts → types-92653002.d.ts} +9 -1
  35. package/useSkeleton-ebda875c.d.ts +12 -0
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
4
+ import { TextElementType, TextSkeletonProps } from "./types-1b036d4b";
4
5
  declare const colors: readonly [
5
6
  "tertiary",
6
7
  "disabled",
@@ -23,7 +24,6 @@ declare const colors: readonly [
23
24
  "static-accent"
24
25
  ];
25
26
  type Color = (typeof colors)[number];
26
- type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
27
27
  type NativeProps = HTMLAttributes<HTMLSpanElement>;
28
28
  type TextBaseProps = {
29
29
  /**
@@ -66,6 +66,14 @@ type TextBaseProps = {
66
66
  * Количество строк (не поддерживает IE)
67
67
  */
68
68
  rowLimit?: 1 | 2 | 3;
69
+ /**
70
+ * Показать скелетон
71
+ */
72
+ showSkeleton?: boolean;
73
+ /**
74
+ * Пропы для скелетона
75
+ */
76
+ skeletonProps?: TextSkeletonProps;
69
77
  };
70
78
  type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
71
79
  tag?: "p";
@@ -114,6 +122,14 @@ type TitleProps = Omit<NativeProps$0, "color"> & {
114
122
  * Количество строк (не поддерживает IE)
115
123
  */
116
124
  rowLimit?: 1 | 2 | 3;
125
+ /**
126
+ * Показать скелетон
127
+ */
128
+ showSkeleton?: boolean;
129
+ /**
130
+ * Пропы для скелетона
131
+ */
132
+ skeletonProps?: TextSkeletonProps;
117
133
  };
118
134
  type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
119
135
  declare const Typography: {
@@ -165,3 +181,4 @@ interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
165
181
  declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
166
182
  export { Typography, typographyPresets, TitleResponsive, BackArrowAddonProps, BackArrowAddon };
167
183
  export type { TitleProps, TextProps, Color };
184
+ export * from "./useSkeleton-ebda875c";
@@ -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-d9f9bbcc";
7
+ import { BottomSheetProps } from "./types-92653002";
8
8
  type FooterProps = {
9
9
  /**
10
10
  * Контент футера
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
4
+ import { TextElementType, TextSkeletonProps } from "./types-1b036d4b";
4
5
  declare const colors: readonly [
5
6
  "tertiary",
6
7
  "disabled",
@@ -23,7 +24,6 @@ declare const colors: readonly [
23
24
  "static-accent"
24
25
  ];
25
26
  type Color = (typeof colors)[number];
26
- type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
27
27
  type NativeProps = HTMLAttributes<HTMLSpanElement>;
28
28
  type TextBaseProps = {
29
29
  /**
@@ -66,6 +66,14 @@ type TextBaseProps = {
66
66
  * Количество строк (не поддерживает IE)
67
67
  */
68
68
  rowLimit?: 1 | 2 | 3;
69
+ /**
70
+ * Показать скелетон
71
+ */
72
+ showSkeleton?: boolean;
73
+ /**
74
+ * Пропы для скелетона
75
+ */
76
+ skeletonProps?: TextSkeletonProps;
69
77
  };
70
78
  type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
71
79
  tag?: "p";
@@ -114,6 +122,14 @@ type TitleProps = Omit<NativeProps$0, "color"> & {
114
122
  * Количество строк (не поддерживает IE)
115
123
  */
116
124
  rowLimit?: 1 | 2 | 3;
125
+ /**
126
+ * Показать скелетон
127
+ */
128
+ showSkeleton?: boolean;
129
+ /**
130
+ * Пропы для скелетона
131
+ */
132
+ skeletonProps?: TextSkeletonProps;
117
133
  };
118
134
  type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
119
135
  declare const Typography: {
@@ -165,3 +181,4 @@ interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
165
181
  declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
166
182
  export { Typography, typographyPresets, TitleResponsive, BackArrowAddonProps, BackArrowAddon };
167
183
  export type { TitleProps, TextProps, Color };
184
+ export * from "./useSkeleton-ebda875c";
@@ -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-d9f9bbcc";
7
+ import { BottomSheetProps } from "./types-92653002";
8
8
  type FooterProps = {
9
9
  /**
10
10
  * Контент футера
@@ -1,3 +1,3 @@
1
1
  export * from "./component-50136800";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-d9f9bbcc";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-92653002";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-49cc3c24";
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
- import { ReactNode } from "react";
4
3
  import { BaseSelectProps, OptionProps, OptionShape } from "./typings-5e1b8383";
5
4
  // eslint-disable-next-line @typescript-eslint/naming-convention
6
5
  type useSelectWithLoadingProps = {
@@ -57,37 +56,10 @@ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton
57
56
  };
58
57
  reset: () => void;
59
58
  };
60
- type SkeletonProps = {
61
- /**
62
- * Флаг, явно задающий состояние, при котором контент закрывается прелоадером
63
- */
64
- visible?: boolean;
65
- /**
66
- * Флаг явного включения анимации скелета
67
- */
68
- animate?: boolean;
69
- /**
70
- * Дополнительный класс
71
- */
72
- className?: string;
73
- /**
74
- * Дополнительные инлайн стили
75
- */
76
- style?: React.CSSProperties;
77
- /**
78
- * Идентификатор для систем автоматизированного тестирования
79
- */
80
- dataTestId?: string;
81
- /**
82
- * Дочерние элементы.
83
- */
84
- children?: ReactNode;
85
- };
86
- declare const Skeleton: React.FC<SkeletonProps>;
87
59
  export * from "./index-ebda875c";
88
60
  export * from "./Component-50136800";
89
61
  export * from "./Component-5e1b8383";
90
- export { useSelectWithLoading, useLazyLoading, SkeletonProps, Skeleton };
62
+ export { useSelectWithLoading, useLazyLoading };
91
63
  export * from "./hook-9ea9e32c";
92
64
  export * from "./typings-5e1b8383";
93
65
  export * from "./utils-5e1b8383";
@@ -0,0 +1,13 @@
1
+ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
2
+ type WidthUnit = number | string;
3
+ type TextSkeletonProps = {
4
+ /**
5
+ * Кол-во строк текста
6
+ */
7
+ rows?: number;
8
+ /**
9
+ * Ширина строки
10
+ */
11
+ width?: WidthUnit | WidthUnit[];
12
+ };
13
+ export { TextElementType, TextSkeletonProps };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react-transition-group" />
2
- import { HTMLAttributes, ReactNode, RefObject } from 'react';
2
+ import { HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
3
3
  import { TransitionProps } from 'react-transition-group/Transition';
4
4
  import { BaseModalProps } from "./index-bdb4c6b9";
5
5
  import { NavigationBarProps } from "./index-c76d6398";
@@ -88,6 +88,14 @@ type BottomSheetProps = {
88
88
  * Дополнительный класс для обертки модального окна
89
89
  */
90
90
  modalWrapperClassName?: string;
91
+ /**
92
+ * Дополнительный класс для маркера
93
+ */
94
+ swipeableMarkerClassName?: string;
95
+ /**
96
+ * Кастомный маркер
97
+ */
98
+ swipeableMarker?: ReactElement;
91
99
  /**
92
100
  * TransitionProps, прокидываются в компонент CSSTransitionProps.
93
101
  */
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { TextSkeletonProps } from "./types-1b036d4b";
4
+ type SkeletonProps = {
5
+ wrapperClassName?: string;
6
+ dataTestId?: string;
7
+ };
8
+ declare function useSkeleton(showSkeleton?: boolean, skeletonProps?: TextSkeletonProps): {
9
+ renderSkeleton: (props: SkeletonProps) => React.JSX.Element | null;
10
+ textRef: React.RefObject<HTMLElement>;
11
+ };
12
+ export { useSkeleton };
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
4
+ import { TextElementType, TextSkeletonProps } from "./types-1b036d4b";
4
5
  declare const colors: readonly [
5
6
  "tertiary",
6
7
  "disabled",
@@ -23,7 +24,6 @@ declare const colors: readonly [
23
24
  "static-accent"
24
25
  ];
25
26
  type Color = (typeof colors)[number];
26
- type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
27
27
  type NativeProps = HTMLAttributes<HTMLSpanElement>;
28
28
  type TextBaseProps = {
29
29
  /**
@@ -66,6 +66,14 @@ type TextBaseProps = {
66
66
  * Количество строк (не поддерживает IE)
67
67
  */
68
68
  rowLimit?: 1 | 2 | 3;
69
+ /**
70
+ * Показать скелетон
71
+ */
72
+ showSkeleton?: boolean;
73
+ /**
74
+ * Пропы для скелетона
75
+ */
76
+ skeletonProps?: TextSkeletonProps;
69
77
  };
70
78
  type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
71
79
  tag?: "p";
@@ -114,6 +122,14 @@ type TitleProps = Omit<NativeProps$0, "color"> & {
114
122
  * Количество строк (не поддерживает IE)
115
123
  */
116
124
  rowLimit?: 1 | 2 | 3;
125
+ /**
126
+ * Показать скелетон
127
+ */
128
+ showSkeleton?: boolean;
129
+ /**
130
+ * Пропы для скелетона
131
+ */
132
+ skeletonProps?: TextSkeletonProps;
117
133
  };
118
134
  type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
119
135
  declare const Typography: {
@@ -165,3 +181,4 @@ interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
165
181
  declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
166
182
  export { Typography, typographyPresets, TitleResponsive, BackArrowAddonProps, BackArrowAddon };
167
183
  export type { TitleProps, TextProps, Color };
184
+ export * from "./useSkeleton-ebda875c";
@@ -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-d9f9bbcc";
7
+ import { BottomSheetProps } from "./types-92653002";
8
8
  type FooterProps = {
9
9
  /**
10
10
  * Контент футера
@@ -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/shared';
6
6
 
7
- var styles = {"iconContainer":"custom-picker-button__iconContainer_1sbn5","addonsContainer":"custom-picker-button__addonsContainer_1sbn5","showControlIcon":"custom-picker-button__showControlIcon_1sbn5","open":"custom-picker-button__open_1sbn5"};
7
+ var styles = {"iconContainer":"custom-picker-button__iconContainer_vgvki","addonsContainer":"custom-picker-button__addonsContainer_vgvki","showControlIcon":"custom-picker-button__showControlIcon_vgvki","open":"custom-picker-button__open_vgvki"};
8
8
  require('./index.css')
9
9
 
10
10
  var Field = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1diq7 */
1
+ /* hash: zw1gk */
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_1sbn5 {
19
+ } .custom-picker-button__iconContainer_vgvki {
20
20
  display: flex;
21
21
  transition: transform 0.15s ease-in-out;
22
- } .custom-picker-button__addonsContainer_1sbn5 {
22
+ } .custom-picker-button__addonsContainer_vgvki {
23
23
  display: flex
24
- } .custom-picker-button__addonsContainer_1sbn5.custom-picker-button__showControlIcon_1sbn5 {
24
+ } .custom-picker-button__addonsContainer_vgvki.custom-picker-button__showControlIcon_vgvki {
25
25
  margin-right: var(--gap-2xs);
26
- } .custom-picker-button__open_1sbn5 {
26
+ } .custom-picker-button__open_vgvki {
27
27
  transform: var(--arrow-transform);
28
28
  }
@@ -1,3 +1,3 @@
1
1
  export * from "./component-50136800";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-d9f9bbcc";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-92653002";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-49cc3c24";
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
- import { ReactNode } from "react";
4
3
  import { BaseSelectProps, OptionProps, OptionShape } from "./typings-5e1b8383";
5
4
  // eslint-disable-next-line @typescript-eslint/naming-convention
6
5
  type useSelectWithLoadingProps = {
@@ -57,37 +56,10 @@ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton
57
56
  };
58
57
  reset: () => void;
59
58
  };
60
- type SkeletonProps = {
61
- /**
62
- * Флаг, явно задающий состояние, при котором контент закрывается прелоадером
63
- */
64
- visible?: boolean;
65
- /**
66
- * Флаг явного включения анимации скелета
67
- */
68
- animate?: boolean;
69
- /**
70
- * Дополнительный класс
71
- */
72
- className?: string;
73
- /**
74
- * Дополнительные инлайн стили
75
- */
76
- style?: React.CSSProperties;
77
- /**
78
- * Идентификатор для систем автоматизированного тестирования
79
- */
80
- dataTestId?: string;
81
- /**
82
- * Дочерние элементы.
83
- */
84
- children?: ReactNode;
85
- };
86
- declare const Skeleton: React.FC<SkeletonProps>;
87
59
  export * from "./index-ebda875c";
88
60
  export * from "./Component-50136800";
89
61
  export * from "./Component-5e1b8383";
90
- export { useSelectWithLoading, useLazyLoading, SkeletonProps, Skeleton };
62
+ export { useSelectWithLoading, useLazyLoading };
91
63
  export * from "./hook-9ea9e32c";
92
64
  export * from "./typings-5e1b8383";
93
65
  export * from "./utils-5e1b8383";
@@ -0,0 +1,13 @@
1
+ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
2
+ type WidthUnit = number | string;
3
+ type TextSkeletonProps = {
4
+ /**
5
+ * Кол-во строк текста
6
+ */
7
+ rows?: number;
8
+ /**
9
+ * Ширина строки
10
+ */
11
+ width?: WidthUnit | WidthUnit[];
12
+ };
13
+ export { TextElementType, TextSkeletonProps };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react-transition-group" />
2
- import { HTMLAttributes, ReactNode, RefObject } from 'react';
2
+ import { HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
3
3
  import { TransitionProps } from 'react-transition-group/Transition';
4
4
  import { BaseModalProps } from "./index-bdb4c6b9";
5
5
  import { NavigationBarProps } from "./index-c76d6398";
@@ -88,6 +88,14 @@ type BottomSheetProps = {
88
88
  * Дополнительный класс для обертки модального окна
89
89
  */
90
90
  modalWrapperClassName?: string;
91
+ /**
92
+ * Дополнительный класс для маркера
93
+ */
94
+ swipeableMarkerClassName?: string;
95
+ /**
96
+ * Кастомный маркер
97
+ */
98
+ swipeableMarker?: ReactElement;
91
99
  /**
92
100
  * TransitionProps, прокидываются в компонент CSSTransitionProps.
93
101
  */
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { TextSkeletonProps } from "./types-1b036d4b";
4
+ type SkeletonProps = {
5
+ wrapperClassName?: string;
6
+ dataTestId?: string;
7
+ };
8
+ declare function useSkeleton(showSkeleton?: boolean, skeletonProps?: TextSkeletonProps): {
9
+ renderSkeleton: (props: SkeletonProps) => React.JSX.Element | null;
10
+ textRef: React.RefObject<HTMLElement>;
11
+ };
12
+ export { useSkeleton };
@@ -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_1sbn5","addonsContainer":"custom-picker-button__addonsContainer_1sbn5","showControlIcon":"custom-picker-button__showControlIcon_1sbn5","open":"custom-picker-button__open_1sbn5"};
16
+ var styles = {"iconContainer":"custom-picker-button__iconContainer_vgvki","addonsContainer":"custom-picker-button__addonsContainer_vgvki","showControlIcon":"custom-picker-button__showControlIcon_vgvki","open":"custom-picker-button__open_vgvki"};
17
17
  require('./index.css')
18
18
 
19
19
  var Field = function (_a) {
package/field/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1diq7 */
1
+ /* hash: zw1gk */
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_1sbn5 {
19
+ } .custom-picker-button__iconContainer_vgvki {
20
20
  display: flex;
21
21
  transition: transform 0.15s ease-in-out;
22
- } .custom-picker-button__addonsContainer_1sbn5 {
22
+ } .custom-picker-button__addonsContainer_vgvki {
23
23
  display: flex
24
- } .custom-picker-button__addonsContainer_1sbn5.custom-picker-button__showControlIcon_1sbn5 {
24
+ } .custom-picker-button__addonsContainer_vgvki.custom-picker-button__showControlIcon_vgvki {
25
25
  margin-right: var(--gap-2xs);
26
- } .custom-picker-button__open_1sbn5 {
26
+ } .custom-picker-button__open_vgvki {
27
27
  transform: var(--arrow-transform);
28
28
  }
@@ -1,3 +1,3 @@
1
1
  export * from "./component-50136800";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-d9f9bbcc";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-92653002";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-49cc3c24";
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
4
+ import { TextElementType, TextSkeletonProps } from "./types-1b036d4b";
4
5
  declare const colors: readonly [
5
6
  "tertiary",
6
7
  "disabled",
@@ -23,7 +24,6 @@ declare const colors: readonly [
23
24
  "static-accent"
24
25
  ];
25
26
  type Color = (typeof colors)[number];
26
- type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
27
27
  type NativeProps = HTMLAttributes<HTMLSpanElement>;
28
28
  type TextBaseProps = {
29
29
  /**
@@ -66,6 +66,14 @@ type TextBaseProps = {
66
66
  * Количество строк (не поддерживает IE)
67
67
  */
68
68
  rowLimit?: 1 | 2 | 3;
69
+ /**
70
+ * Показать скелетон
71
+ */
72
+ showSkeleton?: boolean;
73
+ /**
74
+ * Пропы для скелетона
75
+ */
76
+ skeletonProps?: TextSkeletonProps;
69
77
  };
70
78
  type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
71
79
  tag?: "p";
@@ -114,6 +122,14 @@ type TitleProps = Omit<NativeProps$0, "color"> & {
114
122
  * Количество строк (не поддерживает IE)
115
123
  */
116
124
  rowLimit?: 1 | 2 | 3;
125
+ /**
126
+ * Показать скелетон
127
+ */
128
+ showSkeleton?: boolean;
129
+ /**
130
+ * Пропы для скелетона
131
+ */
132
+ skeletonProps?: TextSkeletonProps;
117
133
  };
118
134
  type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
119
135
  declare const Typography: {
@@ -165,3 +181,4 @@ interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
165
181
  declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
166
182
  export { Typography, typographyPresets, TitleResponsive, BackArrowAddonProps, BackArrowAddon };
167
183
  export type { TitleProps, TextProps, Color };
184
+ export * from "./useSkeleton-ebda875c";
@@ -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-d9f9bbcc";
7
+ import { BottomSheetProps } from "./types-92653002";
8
8
  type FooterProps = {
9
9
  /**
10
10
  * Контент футера
@@ -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/shared';
5
5
 
6
- const styles = {"iconContainer":"custom-picker-button__iconContainer_1sbn5","addonsContainer":"custom-picker-button__addonsContainer_1sbn5","showControlIcon":"custom-picker-button__showControlIcon_1sbn5","open":"custom-picker-button__open_1sbn5"};
6
+ const styles = {"iconContainer":"custom-picker-button__iconContainer_vgvki","addonsContainer":"custom-picker-button__addonsContainer_vgvki","showControlIcon":"custom-picker-button__showControlIcon_vgvki","open":"custom-picker-button__open_vgvki"};
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: 1diq7 */
1
+ /* hash: zw1gk */
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_1sbn5 {
19
+ } .custom-picker-button__iconContainer_vgvki {
20
20
  display: flex;
21
21
  transition: transform 0.15s ease-in-out;
22
- } .custom-picker-button__addonsContainer_1sbn5 {
22
+ } .custom-picker-button__addonsContainer_vgvki {
23
23
  display: flex
24
- } .custom-picker-button__addonsContainer_1sbn5.custom-picker-button__showControlIcon_1sbn5 {
24
+ } .custom-picker-button__addonsContainer_vgvki.custom-picker-button__showControlIcon_vgvki {
25
25
  margin-right: var(--gap-2xs);
26
- } .custom-picker-button__open_1sbn5 {
26
+ } .custom-picker-button__open_vgvki {
27
27
  transform: var(--arrow-transform);
28
28
  }
@@ -1,3 +1,3 @@
1
1
  export * from "./component-50136800";
2
- export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-d9f9bbcc";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-92653002";
3
3
  export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-49cc3c24";
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
- import { ReactNode } from "react";
4
3
  import { BaseSelectProps, OptionProps, OptionShape } from "./typings-5e1b8383";
5
4
  // eslint-disable-next-line @typescript-eslint/naming-convention
6
5
  type useSelectWithLoadingProps = {
@@ -57,37 +56,10 @@ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton
57
56
  };
58
57
  reset: () => void;
59
58
  };
60
- type SkeletonProps = {
61
- /**
62
- * Флаг, явно задающий состояние, при котором контент закрывается прелоадером
63
- */
64
- visible?: boolean;
65
- /**
66
- * Флаг явного включения анимации скелета
67
- */
68
- animate?: boolean;
69
- /**
70
- * Дополнительный класс
71
- */
72
- className?: string;
73
- /**
74
- * Дополнительные инлайн стили
75
- */
76
- style?: React.CSSProperties;
77
- /**
78
- * Идентификатор для систем автоматизированного тестирования
79
- */
80
- dataTestId?: string;
81
- /**
82
- * Дочерние элементы.
83
- */
84
- children?: ReactNode;
85
- };
86
- declare const Skeleton: React.FC<SkeletonProps>;
87
59
  export * from "./index-ebda875c";
88
60
  export * from "./Component-50136800";
89
61
  export * from "./Component-5e1b8383";
90
- export { useSelectWithLoading, useLazyLoading, SkeletonProps, Skeleton };
62
+ export { useSelectWithLoading, useLazyLoading };
91
63
  export * from "./hook-9ea9e32c";
92
64
  export * from "./typings-5e1b8383";
93
65
  export * from "./utils-5e1b8383";
@@ -0,0 +1,13 @@
1
+ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
2
+ type WidthUnit = number | string;
3
+ type TextSkeletonProps = {
4
+ /**
5
+ * Кол-во строк текста
6
+ */
7
+ rows?: number;
8
+ /**
9
+ * Ширина строки
10
+ */
11
+ width?: WidthUnit | WidthUnit[];
12
+ };
13
+ export { TextElementType, TextSkeletonProps };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react-transition-group" />
2
- import { HTMLAttributes, ReactNode, RefObject } from 'react';
2
+ import { HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
3
3
  import { TransitionProps } from 'react-transition-group/Transition';
4
4
  import { BaseModalProps } from "./index-bdb4c6b9";
5
5
  import { NavigationBarProps } from "./index-c76d6398";
@@ -88,6 +88,14 @@ type BottomSheetProps = {
88
88
  * Дополнительный класс для обертки модального окна
89
89
  */
90
90
  modalWrapperClassName?: string;
91
+ /**
92
+ * Дополнительный класс для маркера
93
+ */
94
+ swipeableMarkerClassName?: string;
95
+ /**
96
+ * Кастомный маркер
97
+ */
98
+ swipeableMarker?: ReactElement;
91
99
  /**
92
100
  * TransitionProps, прокидываются в компонент CSSTransitionProps.
93
101
  */
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { TextSkeletonProps } from "./types-1b036d4b";
4
+ type SkeletonProps = {
5
+ wrapperClassName?: string;
6
+ dataTestId?: string;
7
+ };
8
+ declare function useSkeleton(showSkeleton?: boolean, skeletonProps?: TextSkeletonProps): {
9
+ renderSkeleton: (props: SkeletonProps) => React.JSX.Element | null;
10
+ textRef: React.RefObject<HTMLElement>;
11
+ };
12
+ export { useSkeleton };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-custom-picker-button",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Custom picker button component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -35,10 +35,10 @@
35
35
  "react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@alfalab/core-components-picker-button": "^11.0.2",
38
+ "@alfalab/core-components-picker-button": "^11.0.3",
39
39
  "@alfalab/core-components-custom-button": "^3.3.2",
40
40
  "@alfalab/core-components-mq": "^4.2.0",
41
- "@alfalab/core-components-select": "^15.0.2",
41
+ "@alfalab/core-components-select": "^15.0.3",
42
42
  "classnames": "^2.3.1",
43
43
  "tslib": "^2.4.0"
44
44
  }
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
- import { ReactNode } from "react";
4
3
  import { BaseSelectProps, OptionProps, OptionShape } from "./typings-5e1b8383";
5
4
  // eslint-disable-next-line @typescript-eslint/naming-convention
6
5
  type useSelectWithLoadingProps = {
@@ -57,37 +56,10 @@ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton
57
56
  };
58
57
  reset: () => void;
59
58
  };
60
- type SkeletonProps = {
61
- /**
62
- * Флаг, явно задающий состояние, при котором контент закрывается прелоадером
63
- */
64
- visible?: boolean;
65
- /**
66
- * Флаг явного включения анимации скелета
67
- */
68
- animate?: boolean;
69
- /**
70
- * Дополнительный класс
71
- */
72
- className?: string;
73
- /**
74
- * Дополнительные инлайн стили
75
- */
76
- style?: React.CSSProperties;
77
- /**
78
- * Идентификатор для систем автоматизированного тестирования
79
- */
80
- dataTestId?: string;
81
- /**
82
- * Дочерние элементы.
83
- */
84
- children?: ReactNode;
85
- };
86
- declare const Skeleton: React.FC<SkeletonProps>;
87
59
  export * from "./index-ebda875c";
88
60
  export * from "./Component-50136800";
89
61
  export * from "./Component-5e1b8383";
90
- export { useSelectWithLoading, useLazyLoading, SkeletonProps, Skeleton };
62
+ export { useSelectWithLoading, useLazyLoading };
91
63
  export * from "./hook-9ea9e32c";
92
64
  export * from "./typings-5e1b8383";
93
65
  export * from "./utils-5e1b8383";
@@ -0,0 +1,13 @@
1
+ type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
2
+ type WidthUnit = number | string;
3
+ type TextSkeletonProps = {
4
+ /**
5
+ * Кол-во строк текста
6
+ */
7
+ rows?: number;
8
+ /**
9
+ * Ширина строки
10
+ */
11
+ width?: WidthUnit | WidthUnit[];
12
+ };
13
+ export { TextElementType, TextSkeletonProps };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react-transition-group" />
2
- import { HTMLAttributes, ReactNode, RefObject } from 'react';
2
+ import { HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
3
3
  import { TransitionProps } from 'react-transition-group/Transition';
4
4
  import { BaseModalProps } from "./index-bdb4c6b9";
5
5
  import { NavigationBarProps } from "./index-c76d6398";
@@ -88,6 +88,14 @@ type BottomSheetProps = {
88
88
  * Дополнительный класс для обертки модального окна
89
89
  */
90
90
  modalWrapperClassName?: string;
91
+ /**
92
+ * Дополнительный класс для маркера
93
+ */
94
+ swipeableMarkerClassName?: string;
95
+ /**
96
+ * Кастомный маркер
97
+ */
98
+ swipeableMarker?: ReactElement;
91
99
  /**
92
100
  * TransitionProps, прокидываются в компонент CSSTransitionProps.
93
101
  */
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { TextSkeletonProps } from "./types-1b036d4b";
4
+ type SkeletonProps = {
5
+ wrapperClassName?: string;
6
+ dataTestId?: string;
7
+ };
8
+ declare function useSkeleton(showSkeleton?: boolean, skeletonProps?: TextSkeletonProps): {
9
+ renderSkeleton: (props: SkeletonProps) => React.JSX.Element | null;
10
+ textRef: React.RefObject<HTMLElement>;
11
+ };
12
+ export { useSkeleton };