@alfalab/core-components-custom-picker-button 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/Component-2aef4eba.d.ts +50 -0
  2. package/Component-3885b0d7.d.ts +71 -0
  3. package/Component-3e68f8db.d.ts +11 -0
  4. package/Component-3ebe4754.d.ts +176 -0
  5. package/Component-5e1b8383.d.ts +4 -0
  6. package/Component-bdb4c6b9.d.ts +12 -0
  7. package/Component-ebda875c.d.ts +142 -0
  8. package/Component.desktop.d.ts +6 -0
  9. package/Component.desktop.js +28 -0
  10. package/Component.mobile-ae13210f.d.ts +7 -0
  11. package/Component.mobile-b2c0420d.d.ts +35 -0
  12. package/Component.mobile.d.ts +6 -0
  13. package/Component.mobile.js +28 -0
  14. package/Component.responsive-2aef4eba.d.ts +28 -0
  15. package/Component.responsive.d.ts +22 -0
  16. package/Component.responsive.js +28 -0
  17. package/Context-bdb4c6b9.d.ts +4 -0
  18. package/ResponsiveContext-baf4875b.d.ts +5 -0
  19. package/component-3885b0d7.d.ts +43 -0
  20. package/consts-f777ba1a.d.ts +2 -0
  21. package/cssm/Component-2aef4eba.d.ts +50 -0
  22. package/cssm/Component-3885b0d7.d.ts +71 -0
  23. package/cssm/Component-3e68f8db.d.ts +11 -0
  24. package/cssm/Component-3ebe4754.d.ts +176 -0
  25. package/cssm/Component-5e1b8383.d.ts +4 -0
  26. package/cssm/Component-bdb4c6b9.d.ts +12 -0
  27. package/cssm/Component-ebda875c.d.ts +142 -0
  28. package/cssm/Component.desktop.d.ts +6 -0
  29. package/cssm/Component.desktop.js +29 -0
  30. package/cssm/Component.mobile-ae13210f.d.ts +7 -0
  31. package/cssm/Component.mobile-b2c0420d.d.ts +35 -0
  32. package/cssm/Component.mobile.d.ts +6 -0
  33. package/cssm/Component.mobile.js +29 -0
  34. package/cssm/Component.responsive-2aef4eba.d.ts +28 -0
  35. package/cssm/Component.responsive.d.ts +22 -0
  36. package/cssm/Component.responsive.js +29 -0
  37. package/cssm/Context-bdb4c6b9.d.ts +4 -0
  38. package/cssm/ResponsiveContext-baf4875b.d.ts +5 -0
  39. package/cssm/component-3885b0d7.d.ts +43 -0
  40. package/cssm/consts-f777ba1a.d.ts +2 -0
  41. package/cssm/desktop.d.ts +2 -0
  42. package/cssm/desktop.js +17 -0
  43. package/cssm/field/Component.d.ts +11 -0
  44. package/cssm/field/Component.js +31 -0
  45. package/cssm/field/index.d.ts +1 -0
  46. package/cssm/field/index.js +15 -0
  47. package/cssm/field/index.module.css +27 -0
  48. package/cssm/hook-3e68f8db.d.ts +62 -0
  49. package/cssm/index-136acbb1.d.ts +28 -0
  50. package/cssm/index-2aef4eba.d.ts +5 -0
  51. package/cssm/index-3885b0d7.d.ts +3 -0
  52. package/cssm/index-3e68f8db.d.ts +100 -0
  53. package/cssm/index-3ebe4754.d.ts +1 -0
  54. package/cssm/index-425c8522.d.ts +6 -0
  55. package/cssm/index-701e77da.d.ts +4 -0
  56. package/cssm/index-bdb4c6b9.d.ts +2 -0
  57. package/cssm/index-e81c389f.d.ts +3 -0
  58. package/cssm/index-ebda875c.d.ts +37 -0
  59. package/cssm/index-f12ee135.d.ts +3 -0
  60. package/cssm/index.d.ts +2 -0
  61. package/cssm/index.js +21 -0
  62. package/cssm/mobile.d.ts +2 -0
  63. package/cssm/mobile.js +17 -0
  64. package/cssm/responsive.d.ts +2 -0
  65. package/cssm/responsive.js +21 -0
  66. package/cssm/types-5e678ff2.d.ts +219 -0
  67. package/cssm/types-ebda875c.d.ts +113 -0
  68. package/cssm/typings-5e1b8383.d.ts +549 -0
  69. package/cssm/typings-bdb4c6b9.d.ts +52 -0
  70. package/cssm/utils-1574ad8b.d.ts +29 -0
  71. package/cssm/utils-5e1b8383.d.ts +38 -0
  72. package/cssm/utils-b64479aa.d.ts +8 -0
  73. package/desktop.d.ts +2 -0
  74. package/desktop.js +16 -0
  75. package/esm/Component-2aef4eba.d.ts +50 -0
  76. package/esm/Component-3885b0d7.d.ts +71 -0
  77. package/esm/Component-3e68f8db.d.ts +11 -0
  78. package/esm/Component-3ebe4754.d.ts +176 -0
  79. package/esm/Component-5e1b8383.d.ts +4 -0
  80. package/esm/Component-bdb4c6b9.d.ts +12 -0
  81. package/esm/Component-ebda875c.d.ts +142 -0
  82. package/esm/Component.desktop.d.ts +6 -0
  83. package/esm/Component.desktop.js +20 -0
  84. package/esm/Component.mobile-ae13210f.d.ts +7 -0
  85. package/esm/Component.mobile-b2c0420d.d.ts +35 -0
  86. package/esm/Component.mobile.d.ts +6 -0
  87. package/esm/Component.mobile.js +20 -0
  88. package/esm/Component.responsive-2aef4eba.d.ts +28 -0
  89. package/esm/Component.responsive.d.ts +22 -0
  90. package/esm/Component.responsive.js +20 -0
  91. package/esm/Context-bdb4c6b9.d.ts +4 -0
  92. package/esm/ResponsiveContext-baf4875b.d.ts +5 -0
  93. package/esm/component-3885b0d7.d.ts +43 -0
  94. package/esm/consts-f777ba1a.d.ts +2 -0
  95. package/esm/desktop.d.ts +2 -0
  96. package/esm/desktop.js +8 -0
  97. package/esm/field/Component.d.ts +11 -0
  98. package/esm/field/Component.js +23 -0
  99. package/esm/field/index.css +28 -0
  100. package/esm/field/index.d.ts +1 -0
  101. package/esm/field/index.js +6 -0
  102. package/esm/hook-3e68f8db.d.ts +62 -0
  103. package/esm/index-136acbb1.d.ts +28 -0
  104. package/esm/index-2aef4eba.d.ts +5 -0
  105. package/esm/index-3885b0d7.d.ts +3 -0
  106. package/esm/index-3e68f8db.d.ts +100 -0
  107. package/esm/index-3ebe4754.d.ts +1 -0
  108. package/esm/index-425c8522.d.ts +6 -0
  109. package/esm/index-701e77da.d.ts +4 -0
  110. package/esm/index-bdb4c6b9.d.ts +2 -0
  111. package/esm/index-e81c389f.d.ts +3 -0
  112. package/esm/index-ebda875c.d.ts +37 -0
  113. package/esm/index-f12ee135.d.ts +3 -0
  114. package/esm/index.d.ts +2 -0
  115. package/esm/index.js +12 -0
  116. package/esm/mobile.d.ts +2 -0
  117. package/esm/mobile.js +8 -0
  118. package/esm/responsive.d.ts +2 -0
  119. package/esm/responsive.js +12 -0
  120. package/esm/types-5e678ff2.d.ts +219 -0
  121. package/esm/types-ebda875c.d.ts +113 -0
  122. package/esm/typings-5e1b8383.d.ts +549 -0
  123. package/esm/typings-bdb4c6b9.d.ts +52 -0
  124. package/esm/utils-1574ad8b.d.ts +29 -0
  125. package/esm/utils-5e1b8383.d.ts +38 -0
  126. package/esm/utils-b64479aa.d.ts +8 -0
  127. package/field/Component.d.ts +11 -0
  128. package/field/Component.js +32 -0
  129. package/field/index.css +28 -0
  130. package/field/index.d.ts +1 -0
  131. package/field/index.js +14 -0
  132. package/hook-3e68f8db.d.ts +62 -0
  133. package/index-136acbb1.d.ts +28 -0
  134. package/index-2aef4eba.d.ts +5 -0
  135. package/index-3885b0d7.d.ts +3 -0
  136. package/index-3e68f8db.d.ts +100 -0
  137. package/index-3ebe4754.d.ts +1 -0
  138. package/index-425c8522.d.ts +6 -0
  139. package/index-701e77da.d.ts +4 -0
  140. package/index-bdb4c6b9.d.ts +2 -0
  141. package/index-e81c389f.d.ts +3 -0
  142. package/index-ebda875c.d.ts +37 -0
  143. package/index-f12ee135.d.ts +3 -0
  144. package/index.d.ts +2 -0
  145. package/index.js +20 -0
  146. package/mobile.d.ts +2 -0
  147. package/mobile.js +16 -0
  148. package/modern/Component-2aef4eba.d.ts +50 -0
  149. package/modern/Component-3885b0d7.d.ts +71 -0
  150. package/modern/Component-3e68f8db.d.ts +11 -0
  151. package/modern/Component-3ebe4754.d.ts +176 -0
  152. package/modern/Component-5e1b8383.d.ts +4 -0
  153. package/modern/Component-bdb4c6b9.d.ts +12 -0
  154. package/modern/Component-ebda875c.d.ts +142 -0
  155. package/modern/Component.desktop.d.ts +6 -0
  156. package/modern/Component.desktop.js +16 -0
  157. package/modern/Component.mobile-ae13210f.d.ts +7 -0
  158. package/modern/Component.mobile-b2c0420d.d.ts +35 -0
  159. package/modern/Component.mobile.d.ts +6 -0
  160. package/modern/Component.mobile.js +16 -0
  161. package/modern/Component.responsive-2aef4eba.d.ts +28 -0
  162. package/modern/Component.responsive.d.ts +22 -0
  163. package/modern/Component.responsive.js +18 -0
  164. package/modern/Context-bdb4c6b9.d.ts +4 -0
  165. package/modern/ResponsiveContext-baf4875b.d.ts +5 -0
  166. package/modern/component-3885b0d7.d.ts +43 -0
  167. package/modern/consts-f777ba1a.d.ts +2 -0
  168. package/modern/desktop.d.ts +2 -0
  169. package/modern/desktop.js +7 -0
  170. package/modern/field/Component.d.ts +11 -0
  171. package/modern/field/Component.js +23 -0
  172. package/modern/field/index.css +28 -0
  173. package/modern/field/index.d.ts +1 -0
  174. package/modern/field/index.js +5 -0
  175. package/modern/hook-3e68f8db.d.ts +62 -0
  176. package/modern/index-136acbb1.d.ts +28 -0
  177. package/modern/index-2aef4eba.d.ts +5 -0
  178. package/modern/index-3885b0d7.d.ts +3 -0
  179. package/modern/index-3e68f8db.d.ts +100 -0
  180. package/modern/index-3ebe4754.d.ts +1 -0
  181. package/modern/index-425c8522.d.ts +6 -0
  182. package/modern/index-701e77da.d.ts +4 -0
  183. package/modern/index-bdb4c6b9.d.ts +2 -0
  184. package/modern/index-e81c389f.d.ts +3 -0
  185. package/modern/index-ebda875c.d.ts +37 -0
  186. package/modern/index-f12ee135.d.ts +3 -0
  187. package/modern/index.d.ts +2 -0
  188. package/modern/index.js +11 -0
  189. package/modern/mobile.d.ts +2 -0
  190. package/modern/mobile.js +7 -0
  191. package/modern/responsive.d.ts +2 -0
  192. package/modern/responsive.js +11 -0
  193. package/modern/types-5e678ff2.d.ts +219 -0
  194. package/modern/types-ebda875c.d.ts +113 -0
  195. package/modern/typings-5e1b8383.d.ts +549 -0
  196. package/modern/typings-bdb4c6b9.d.ts +52 -0
  197. package/modern/utils-1574ad8b.d.ts +29 -0
  198. package/modern/utils-5e1b8383.d.ts +38 -0
  199. package/modern/utils-b64479aa.d.ts +8 -0
  200. package/package.json +27 -0
  201. package/responsive.d.ts +2 -0
  202. package/responsive.js +20 -0
  203. package/send-stats.js +82 -0
  204. package/types-5e678ff2.d.ts +219 -0
  205. package/types-ebda875c.d.ts +113 -0
  206. package/typings-5e1b8383.d.ts +549 -0
  207. package/typings-bdb4c6b9.d.ts +52 -0
  208. package/utils-1574ad8b.d.ts +29 -0
  209. package/utils-5e1b8383.d.ts +38 -0
  210. package/utils-b64479aa.d.ts +8 -0
@@ -0,0 +1,43 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { FC, RefObject, ReactNode } from "react";
4
+ import { NavigationBarProps } from "./index-e81c389f";
5
+ import { SwipeableHandlers } from "react-swipeable";
6
+ import { BackdropProps } from "./index-ebda875c";
7
+ import { BottomSheetProps } from "./types-5e678ff2";
8
+ type HeaderProps = Omit<NavigationBarProps, "view" | "size"> & {
9
+ headerRef: RefObject<HTMLDivElement>;
10
+ };
11
+ declare const Header: FC<HeaderProps>;
12
+ type FooterProps = {
13
+ /**
14
+ * ΠšΠΎΠ½Ρ‚Π΅Π½Ρ‚ Ρ„ΡƒΡ‚Π΅Ρ€Π°
15
+ */
16
+ children?: ReactNode;
17
+ /**
18
+ * ЀиксируСт Ρ„ΡƒΡ‚Π΅Ρ€
19
+ */
20
+ sticky?: boolean;
21
+ /**
22
+ * Π”ΠΎΠΏΠΎΠ»Π½ΠΈΡ‚Π΅Π»ΡŒΠ½Ρ‹ΠΉ класс
23
+ */
24
+ className?: string;
25
+ };
26
+ declare const Footer: FC<FooterProps>;
27
+ type SwipeableBackdropProps = BackdropProps & {
28
+ /**
29
+ * ΠŸΡ€ΠΎΠ·Ρ€Π°Ρ‡Π½ΠΎΡΡ‚ΡŒ бэкдропа
30
+ */
31
+ opacity?: number;
32
+ /**
33
+ * ΠžΠ±Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊΠΈ свайпа
34
+ */
35
+ handlers?: SwipeableHandlers;
36
+ /**
37
+ * ВрСмя Π°Π½ΠΈΠΌΠ°Ρ†ΠΈΠΈ opacity
38
+ */
39
+ opacityTimeout?: number;
40
+ };
41
+ declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
42
+ declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
43
+ export { HeaderProps, Header, FooterProps, Footer, SwipeableBackdropProps, SwipeableBackdrop, BottomSheet };
@@ -0,0 +1,2 @@
1
+ declare const DEFAULT_VISIBLE_OPTIONS = 5;
2
+ export { DEFAULT_VISIBLE_OPTIONS };
@@ -0,0 +1,2 @@
1
+ export * from "./Component.desktop";
2
+ export {};
package/esm/desktop.js ADDED
@@ -0,0 +1,8 @@
1
+ export { CustomPickerButtonDesktop } from './Component.desktop.js';
2
+ import 'tslib';
3
+ import 'react';
4
+ import '@alfalab/core-components-picker-button/esm/desktop';
5
+ import './field/Component.js';
6
+ import 'classnames';
7
+ import '@alfalab/core-components-custom-button/esm';
8
+ import '@alfalab/core-components-picker-button/esm';
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { CustomButtonProps } from "@alfalab/core-components-custom-button";
3
+ import { PickerButtonSize, PickerButtonVariant } from "../index-2aef4eba";
4
+ import { FieldProps as BaseFieldProps } from "../typings-5e1b8383";
5
+ type FieldProps = Pick<BaseFieldProps, 'open' | 'label' | 'innerProps'> & CustomButtonProps & {
6
+ buttonSize?: PickerButtonSize;
7
+ buttonVariant?: PickerButtonVariant;
8
+ showArrow?: boolean;
9
+ };
10
+ declare const Field: ({ buttonSize, buttonVariant, backgroundColor, contentColor, stateType, label, open, rightAddons, innerProps, className, showArrow, ...restProps }: FieldProps) => JSX.Element;
11
+ export { Field };
@@ -0,0 +1,23 @@
1
+ import { __rest, __assign } from 'tslib';
2
+ import React, { Fragment } from 'react';
3
+ import cn from 'classnames';
4
+ import { CustomButton } from '@alfalab/core-components-custom-button/esm';
5
+ import { getIcon } from '@alfalab/core-components-picker-button/esm';
6
+
7
+ var styles = {"iconContainer":"custom-picker-button__iconContainer_z6y60","addonsContainer":"custom-picker-button__addonsContainer_z6y60","showControlIcon":"custom-picker-button__showControlIcon_z6y60","open":"custom-picker-button__open_z6y60"};
8
+ require('./index.css')
9
+
10
+ var Field = function (_a) {
11
+ var _b;
12
+ var _c = _a.buttonSize, buttonSize = _c === void 0 ? 'm' : _c, _d = _a.buttonVariant, buttonVariant = _d === void 0 ? 'default' : _d, backgroundColor = _a.backgroundColor, contentColor = _a.contentColor, stateType = _a.stateType, label = _a.label, open = _a.open, rightAddons = _a.rightAddons, innerProps = _a.innerProps, className = _a.className, _e = _a.showArrow, showArrow = _e === void 0 ? true : _e, restProps = __rest(_a, ["buttonSize", "buttonVariant", "backgroundColor", "contentColor", "stateType", "label", "open", "rightAddons", "innerProps", "className", "showArrow"]);
13
+ var Icon = getIcon(buttonVariant, buttonSize);
14
+ var buttonProps = __assign(__assign({}, restProps), innerProps);
15
+ return (React.createElement(CustomButton, __assign({}, buttonProps, { rightAddons: React.createElement(Fragment, null,
16
+ rightAddons && (React.createElement("span", { className: cn(styles.addonsContainer, (_b = {},
17
+ _b[styles.showControlIcon] = showArrow || buttonVariant === 'compact',
18
+ _b)) }, rightAddons)),
19
+ (showArrow || buttonVariant === 'compact') && (React.createElement("span", { className: cn(styles.iconContainer, buttonVariant !== 'compact' && open && styles.open) },
20
+ React.createElement(Icon, { "data-test-id": 'custom-picker-button-icon' })))), block: true, size: buttonSize, backgroundColor: backgroundColor, contentColor: contentColor, stateType: stateType, className: className }), buttonVariant !== 'compact' && label));
21
+ };
22
+
23
+ export { Field };
@@ -0,0 +1,28 @@
1
+ /* hash: 81i0w */
2
+ :root {
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
+ } :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 */
5
+ } :root {
6
+ } :root {
7
+
8
+ /* Hard */
9
+
10
+ /* Up */
11
+
12
+ /* Hard up */
13
+ } :root {
14
+ } :root {
15
+ --gap-2xs: 4px;
16
+ } :root {
17
+ } :root {
18
+ --arrow-transform: rotate(180deg);
19
+ } .custom-picker-button__iconContainer_z6y60 {
20
+ display: flex;
21
+ transition: transform 0.15s ease-in-out;
22
+ } .custom-picker-button__addonsContainer_z6y60 {
23
+ display: flex
24
+ } .custom-picker-button__addonsContainer_z6y60.custom-picker-button__showControlIcon_z6y60 {
25
+ margin-right: var(--gap-2xs);
26
+ } .custom-picker-button__open_z6y60 {
27
+ transform: var(--arrow-transform);
28
+ }
@@ -0,0 +1 @@
1
+ export * from "./Component";
@@ -0,0 +1,6 @@
1
+ export { Field } from './Component.js';
2
+ import 'tslib';
3
+ import 'react';
4
+ import 'classnames';
5
+ import '@alfalab/core-components-custom-button/esm';
6
+ import '@alfalab/core-components-picker-button/esm';
@@ -0,0 +1,62 @@
1
+ /// <reference types="react" />
2
+ import { BaseSelectProps, OptionShape } from "./index-3e68f8db";
3
+ type UseSelectWithApplyProps = {
4
+ /**
5
+ * Бписок Π²Ρ‹Π±Ρ€Π°Π½Π½Ρ‹Ρ… ΠΏΡƒΠ½ΠΊΡ‚ΠΎΠ²
6
+ */
7
+ selected: BaseSelectProps['selected'];
8
+ /**
9
+ * Бписок Π²Π°Ρ€ΠΈΠ°Π½Ρ‚ΠΎΠ² Π²Ρ‹Π±ΠΎΡ€Π°
10
+ */
11
+ options: BaseSelectProps['options'];
12
+ /**
13
+ * ΠžΠ±Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊ Π²Ρ‹Π±ΠΎΡ€Π°
14
+ */
15
+ onChange: BaseSelectProps['onChange'];
16
+ /**
17
+ * ΠšΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚ Π²Ρ‹ΠΏΠ°Π΄Π°ΡŽΡ‰Π΅Π³ΠΎ мСню
18
+ */
19
+ OptionsList?: BaseSelectProps['OptionsList'];
20
+ /**
21
+ * ΠŸΡ€ΠΎΠΏΡΡ‹, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ Π±ΡƒΠ΄ΡƒΡ‚ ΠΏΡ€ΠΎΠΊΠΈΠ½ΡƒΡ‚Ρ‹ Π² ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚ списка
22
+ */
23
+ optionsListProps?: BaseSelectProps['optionsListProps'];
24
+ /**
25
+ * ΠŸΠΎΠΊΠ°Π·Ρ‹Π²Π°Ρ‚ΡŒ ΠΊΠ½ΠΎΠΏΠΊΡƒ очистки
26
+ */
27
+ showClear?: boolean;
28
+ /**
29
+ * ΠŸΠΎΠΊΠ°Π·Ρ‹Π²Π°Ρ‚ΡŒ ΠΏΡƒΠ½ΠΊΡ‚ "Π’Ρ‹Π±Ρ€Π°Ρ‚ΡŒ всС"
30
+ */
31
+ showSelectAll?: boolean;
32
+ };
33
+ declare const SELECT_ALL_KEY = "select_all";
34
+ declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, }: UseSelectWithApplyProps): {
35
+ OptionsList: import("react").ForwardRefExoticComponent<import("./index-3e68f8db").OptionsListProps & {
36
+ showClear?: boolean | undefined;
37
+ onClose?: (() => void) | undefined;
38
+ selectedDraft?: OptionShape[] | undefined;
39
+ OptionsList?: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined; /**
40
+ * ΠŸΡ€ΠΎΠΏΡΡ‹, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ Π±ΡƒΠ΄ΡƒΡ‚ ΠΏΡ€ΠΎΠΊΠΈΠ½ΡƒΡ‚Ρ‹ Π² ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚ списка
41
+ */
42
+ Footer?: import("react").FC<import("./Component-ebda875c").FooterProps> | undefined;
43
+ } & import("react").RefAttributes<HTMLDivElement>>;
44
+ optionsListProps: {
45
+ OptionsList: import("react").FC<import("./index-3e68f8db").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
46
+ showClear: boolean;
47
+ onClear: () => void;
48
+ onApply: () => void;
49
+ onClose: () => void;
50
+ selectedDraft: OptionShape[];
51
+ };
52
+ allowUnselect: boolean;
53
+ multiple: boolean;
54
+ options: (OptionShape | import("./index-3e68f8db").GroupShape | {
55
+ key: string;
56
+ content: string;
57
+ })[];
58
+ onChange: (payload: import("./index-3e68f8db").BaseSelectChangePayload) => void;
59
+ selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
60
+ };
61
+ export * from "./Component-5e1b8383";
62
+ export { UseSelectWithApplyProps, SELECT_ALL_KEY, useSelectWithApply };
@@ -0,0 +1,28 @@
1
+ /// <reference types="react" />
2
+ import { FC, ReactNode } from "react";
3
+ /**
4
+ * Набор констант для z-index ΡΠΎΠΎΡ‚Π²Π΅Ρ‚ΡΡ‚Π²ΡƒΡŽΡ‰ΠΈΡ… классов ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚ΠΎΠ².
5
+ * ЗначСния Π²Ρ‹Π±Ρ€Π°Π½Ρ‹ ΠΏΠΎ ΠΏΡ€ΠΈΠΎΡ€ΠΈΡ‚Π΅Ρ‚Ρƒ.
6
+ */
7
+ declare const stackingOrder: {
8
+ FOCUSED: number;
9
+ DEFAULT: number;
10
+ POPOVER: number;
11
+ MODAL: number;
12
+ TOAST: number;
13
+ };
14
+ declare const StackingContext: import("react").Context<number>;
15
+ type StackProps = {
16
+ /**
17
+ * Render prop, Π² ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ пСрСдаСтся функция.
18
+ * Ѐункция ΠΏΡ€ΠΈΠ½ΠΈΠΌΠ°Π΅Ρ‚ Π°Ρ€Π³ΡƒΠΌΠ΅Π½Ρ‚ со Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ΠΌ z-index ΠΈΠ· Ρ‚Π΅ΠΊΡƒΡ‰Π΅Π³ΠΎ контСкста.
19
+ */
20
+ children: (value: number) => ReactNode;
21
+ /**
22
+ * Π˜ΡΡ…ΠΎΠ΄Π½ΠΎΠ΅ Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ для z-index.
23
+ * @default 5
24
+ */
25
+ value?: number;
26
+ };
27
+ declare const Stack: FC<StackProps>;
28
+ export { stackingOrder, StackingContext, StackProps, Stack };
@@ -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";
@@ -0,0 +1,3 @@
1
+ declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
2
+ declare const isClient: () => boolean;
3
+ export { getDataTestId, isClient };
@@ -0,0 +1,100 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { ReactNode } from "react";
4
+ import { FormControlProps } from "./Component-3ebe4754";
5
+ import { BaseSelectProps, OptionProps, OptionShape } from "./typings-5e1b8383";
6
+ type SelectFieldProps = Omit<FormControlProps, "size"> & Record<string, unknown>;
7
+ type SelectProps = Omit<BaseSelectProps, "fieldProps"> & {
8
+ /**
9
+ * ΠŸΡ€ΠΎΠΏΡΡ‹, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ Π±ΡƒΠ΄ΡƒΡ‚ ΠΏΡ€ΠΎΠΊΠΈΠ½ΡƒΡ‚Ρ‹ Π² ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚ поля
10
+ */
11
+ fieldProps?: SelectFieldProps;
12
+ };
13
+ declare const Select: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "fieldProps"> & {
14
+ fieldProps?: SelectFieldProps | undefined;
15
+ } & React.RefAttributes<HTMLDivElement>>;
16
+ // eslint-disable-next-line @typescript-eslint/naming-convention
17
+ type useSelectWithLoadingProps = {
18
+ loading?: boolean;
19
+ visibleOptions?: BaseSelectProps["visibleOptions"];
20
+ Option?: React.FC<OptionProps>;
21
+ };
22
+ declare function useSelectWithLoading({ loading, visibleOptions, Option }: useSelectWithLoadingProps): {
23
+ Option: (props: OptionProps) => JSX.Element;
24
+ options: OptionShape[];
25
+ } | null;
26
+ type OptionsFetcherResponse = {
27
+ options: OptionShape[];
28
+ hasMore: boolean;
29
+ };
30
+ // eslint-disable-next-line @typescript-eslint/naming-convention
31
+ type useLazyLoadingProps = {
32
+ /** ΠšΠΎΠ»ΠΈΡ‡Π΅ΡΡ‚Π²ΠΎ элСмСнтов Π½Π° "страницС" */
33
+ limit?: number;
34
+ /** ΠΠ°Ρ‡Π°Π»ΡŒΠ½Ρ‹ΠΉ Π½ΠΎΠΌΠ΅Ρ€ "страницы" */
35
+ initialOffset?: number;
36
+ /** Π‘ΠΊΠ΅Π»Π΅Ρ‚ΠΎΠ½ Π·Π°Π³Ρ€ΡƒΠΆΠ°Π΅ΠΌΡ‹Ρ… элСмСнтов */
37
+ skeleton?: React.ReactNode;
38
+ /** ΠšΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚ ΠΏΡƒΠ½ΠΊΡ‚Π° мСню */
39
+ Option?: React.FC<OptionProps>;
40
+ /**
41
+ * Ѐункция-Π·Π°Π³Ρ€ΡƒΠ·Ρ‡ΠΈΠΊ ΠΎΠΏΡ†ΠΈΠΉ.
42
+ * @param offset - тСкущая страница
43
+ * @param limit - количСство элСмСнтов Π½Π° страницС
44
+ * @param queryString - строчныС Π΄Π°Π½Π½Ρ‹Π΅, пробрасываСмыС для поиска ΠΈΠ· кастомного ΠΈΠ½ΠΏΡƒΡ‚Π°, располоТСнного Π² Π·Π°Π³ΠΎΠ»ΠΎΠ²ΠΊΠ΅ OptionsList
45
+ * @returns Promise<{
46
+ * options - список ΠΎΠΏΡ†ΠΈΠΉ ΡΠ»Π΅Π΄ΡƒΡŽΡ‰Π΅ΠΉ "страницы". Они аппСндятся ΠΊ ΠΏΡ€Π΅Π΄Ρ‹Π΄ΡƒΡ‰ΠΈΠΌ
47
+ * hasMore - ΡƒΠΊΠ°Π·Ρ‹Π²Π°Π΅Ρ‚, Π΅ΡΡ‚ΡŒ Π»ΠΈ Π΅Ρ‰Π΅ Π½Π΅Π·Π°Π³Ρ€ΡƒΠΆΠ΅Π½Π½Ρ‹Π΅ элСмСнты (Π² случаС false пСрСстаСт Π·Π°Π³Ρ€ΡƒΠΆΠ°Ρ‚ΡŒ "ΡΠ»Π΅Π΄ΡƒΡŽΡ‰ΡƒΡŽ страницу")
48
+ * }>
49
+ */
50
+ optionsFetcher(offset: number, limit: number, queryString?: string): Promise<OptionsFetcherResponse>;
51
+ };
52
+ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, Option }: useLazyLoadingProps): {
53
+ optionsProps: {
54
+ Option: (props: OptionProps) => JSX.Element;
55
+ options: OptionShape[];
56
+ optionsListProps: {
57
+ ref: React.RefObject<HTMLDivElement>;
58
+ inputProps: {
59
+ onChange: (event: React.ChangeEvent<HTMLInputElement>, payload: {
60
+ value: string;
61
+ }) => void;
62
+ value: string;
63
+ };
64
+ };
65
+ onOpen: (payload: {
66
+ open?: boolean;
67
+ }) => void;
68
+ };
69
+ reset: () => void;
70
+ };
71
+ type SkeletonProps = {
72
+ /**
73
+ * Π€Π»Π°Π³, явно Π·Π°Π΄Π°ΡŽΡ‰ΠΈΠΉ состояниС, ΠΏΡ€ΠΈ ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠΌ ΠΊΠΎΠ½Ρ‚Π΅Π½Ρ‚ закрываСтся ΠΏΡ€Π΅Π»ΠΎΠ°Π΄Π΅Ρ€ΠΎΠΌ
74
+ */
75
+ visible?: boolean;
76
+ /**
77
+ * Π€Π»Π°Π³ явного Π²ΠΊΠ»ΡŽΡ‡Π΅Π½ΠΈΡ Π°Π½ΠΈΠΌΠ°Ρ†ΠΈΠΈ скСлСта
78
+ */
79
+ animate?: boolean;
80
+ /**
81
+ * Π”ΠΎΠΏΠΎΠ»Π½ΠΈΡ‚Π΅Π»ΡŒΠ½Ρ‹ΠΉ класс
82
+ */
83
+ className?: string;
84
+ /**
85
+ * Π˜Π΄Π΅Π½Ρ‚ΠΈΡ„ΠΈΠΊΠ°Ρ‚ΠΎΡ€ для систСм Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΠ·ΠΈΡ€ΠΎΠ²Π°Π½Π½ΠΎΠ³ΠΎ тСстирования
86
+ */
87
+ dataTestId?: string;
88
+ /**
89
+ * Π”ΠΎΡ‡Π΅Ρ€Π½ΠΈΠ΅ элСмСнты.
90
+ */
91
+ children?: ReactNode;
92
+ };
93
+ declare const Skeleton: React.FC<SkeletonProps>;
94
+ export { SelectFieldProps, SelectProps, Select, useSelectWithLoading, useLazyLoading, SkeletonProps, Skeleton };
95
+ export * from "./index-ebda875c";
96
+ export * from "./Component-3885b0d7";
97
+ export * from "./Component-5e1b8383";
98
+ export * from "./hook-3e68f8db";
99
+ export * from "./typings-5e1b8383";
100
+ export * from "./utils-5e1b8383";
@@ -0,0 +1 @@
1
+ export * from "./Component-3ebe4754";
@@ -0,0 +1,6 @@
1
+ type BackgroundColorType = 'accent' | 'info' | 'attention-muted' | 'positive-muted' | 'negative-muted' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'specialbg-component' | 'specialbg-component-inverted' | 'specialbg-primary-grouped' | 'specialbg-secondary-grouped' | 'specialbg-tertiary-grouped' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
2
+ type BorderColorType = 'accent' | 'key' | 'key-inverted' | 'link' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'underline' | 'underline-inverted' | 'graphic-attention' | 'graphic-link' | 'graphic-negative' | 'graphic-positive' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
3
+ type GraphicColorType = 'accent' | 'link' | 'attention' | 'positive' | 'negative' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'static-light' | 'static-accent' | 'static-dark';
4
+ type ShadowType = 'shadow-xs' | 'shadow-s' | 'shadow-m' | 'shadow-l' | 'shadow-xl' | 'shadow-xs-hard' | 'shadow-s-hard' | 'shadow-m-hard' | 'shadow-l-hard' | 'shadow-xl-hard' | 'shadow-xs-up' | 'shadow-s-up' | 'shadow-m-up' | 'shadow-l-up' | 'shadow-xl-up' | 'shadow-xs-hard-up' | 'shadow-s-hard-up' | 'shadow-m-hard-up' | 'shadow-l-hard-up' | 'shadow-xl-hard-up';
5
+ type GapType = '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl';
6
+ export { BackgroundColorType, BorderColorType, GraphicColorType, ShadowType, GapType };
@@ -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 };
@@ -0,0 +1,2 @@
1
+ export * from "./Component-ebda875c";
2
+ export * from "./utils-1574ad8b";
@@ -0,0 +1,3 @@
1
+ export * from "./Component-3885b0d7";
2
+ export * from "./index-ebda875c";
3
+ export type { NavigationBarProps } from "./types-ebda875c";
@@ -0,0 +1,37 @@
1
+ /// <reference types="react" />
2
+ /// <reference types="react-transition-group" />
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";
@@ -0,0 +1,3 @@
1
+ export * from "./component-3885b0d7";
2
+ export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-5e678ff2";
3
+ export { CLOSE_OFFSET, HEADER_OFFSET } from "./utils-b64479aa";
package/esm/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { CustomPickerButtonResponsive as CustomPickerButton } from "./responsive";
2
+ export type { CustomPickerButtonResponsiveProps as CustomPickerButtonProps } from "./responsive";
package/esm/index.js ADDED
@@ -0,0 +1,12 @@
1
+ export { CustomPickerButtonResponsive as CustomPickerButton } from './Component.responsive.js';
2
+ import 'tslib';
3
+ import 'react';
4
+ import '@alfalab/core-components-mq/esm';
5
+ import './Component.desktop.js';
6
+ import '@alfalab/core-components-picker-button/esm/desktop';
7
+ import './field/Component.js';
8
+ import 'classnames';
9
+ import '@alfalab/core-components-custom-button/esm';
10
+ import '@alfalab/core-components-picker-button/esm';
11
+ import './Component.mobile.js';
12
+ import '@alfalab/core-components-picker-button/esm/mobile';
@@ -0,0 +1,2 @@
1
+ export * from "./Component.mobile";
2
+ export {};
package/esm/mobile.js ADDED
@@ -0,0 +1,8 @@
1
+ export { CustomPickerButtonMobile } from './Component.mobile.js';
2
+ import 'tslib';
3
+ import 'react';
4
+ import '@alfalab/core-components-picker-button/esm/mobile';
5
+ import './field/Component.js';
6
+ import 'classnames';
7
+ import '@alfalab/core-components-custom-button/esm';
8
+ import '@alfalab/core-components-picker-button/esm';
@@ -0,0 +1,2 @@
1
+ export * from "./Component.responsive";
2
+ export {};
@@ -0,0 +1,12 @@
1
+ export { CustomPickerButtonResponsive } from './Component.responsive.js';
2
+ import 'tslib';
3
+ import 'react';
4
+ import '@alfalab/core-components-mq/esm';
5
+ import './Component.desktop.js';
6
+ import '@alfalab/core-components-picker-button/esm/desktop';
7
+ import './field/Component.js';
8
+ import 'classnames';
9
+ import '@alfalab/core-components-custom-button/esm';
10
+ import '@alfalab/core-components-picker-button/esm';
11
+ import './Component.mobile.js';
12
+ import '@alfalab/core-components-picker-button/esm/mobile';