@alfalab/core-components-picker-button 11.12.3 → 11.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@alfalab/icons-glyph/package.json +14 -0
- package/Component-11f20b2e.d.ts +1 -1
- package/{Component-4bf4de6f.d.ts → Component-7f86a3f9.d.ts} +1 -1
- package/Component-c44170fe.d.ts +1 -0
- package/Component.responsive.d.ts +9 -1
- package/Component.responsive.js +4 -8
- package/{esm/ResponsiveContext-d6bfd5b7.d.ts → ResponsiveContext-4b7234ef.d.ts} +1 -1
- package/component-03d088c4.d.ts +10 -2
- package/component-8bdd19d3.d.ts +2 -2
- package/cssm/Component-11f20b2e.d.ts +1 -1
- package/{esm/Component-4bf4de6f.d.ts → cssm/Component-7f86a3f9.d.ts} +1 -1
- package/cssm/Component-c44170fe.d.ts +1 -0
- package/cssm/Component.responsive.d.ts +9 -1
- package/cssm/Component.responsive.js +4 -8
- package/{ResponsiveContext-d6bfd5b7.d.ts → cssm/ResponsiveContext-4b7234ef.d.ts} +1 -1
- package/cssm/component-03d088c4.d.ts +10 -2
- package/cssm/component-8bdd19d3.d.ts +2 -2
- package/cssm/desktop/Component.desktop.d.ts +1 -1
- package/cssm/field/Component.d.ts +1 -1
- package/cssm/index-03d088c4.d.ts +2 -2
- package/cssm/index-281accb7.d.ts +2 -2
- package/cssm/index-c44170fe.d.ts +6 -0
- package/cssm/mobile/Component.mobile.js +1 -2
- package/cssm/transformSize-ebda875c.d.ts +1 -1
- package/{modern/typings-d6bfd5b7.d.ts → cssm/typings-4b7234ef.d.ts} +5 -0
- package/cssm/{typings-4bf4de6f.d.ts → typings-7f86a3f9.d.ts} +17 -5
- package/cssm/utils-34f6b81b.d.ts +1 -1
- package/desktop/Component.desktop.d.ts +1 -1
- package/desktop/Component.desktop.js +1 -1
- package/esm/Component-11f20b2e.d.ts +1 -1
- package/{cssm/Component-4bf4de6f.d.ts → esm/Component-7f86a3f9.d.ts} +1 -1
- package/esm/Component-c44170fe.d.ts +1 -0
- package/esm/Component.responsive.d.ts +9 -1
- package/esm/Component.responsive.js +4 -8
- package/{modern/ResponsiveContext-d6bfd5b7.d.ts → esm/ResponsiveContext-4b7234ef.d.ts} +1 -1
- package/esm/component-03d088c4.d.ts +10 -2
- package/esm/component-8bdd19d3.d.ts +2 -2
- package/esm/desktop/Component.desktop.d.ts +1 -1
- package/esm/desktop/Component.desktop.js +1 -1
- package/esm/field/Component.d.ts +1 -1
- package/esm/field/Component.js +1 -1
- package/esm/field/index.css +6 -6
- package/esm/index-03d088c4.d.ts +2 -2
- package/esm/index-281accb7.d.ts +2 -2
- package/esm/index-c44170fe.d.ts +6 -0
- package/esm/index.css +5 -5
- package/esm/mobile/Component.mobile.js +1 -2
- package/esm/option/Component.js +1 -1
- package/esm/option/index.css +4 -4
- package/esm/transformSize-ebda875c.d.ts +1 -1
- package/{cssm/typings-d6bfd5b7.d.ts → esm/typings-4b7234ef.d.ts} +5 -0
- package/esm/{typings-4bf4de6f.d.ts → typings-7f86a3f9.d.ts} +17 -5
- package/esm/utils-34f6b81b.d.ts +1 -1
- package/field/Component.d.ts +1 -1
- package/field/Component.js +1 -1
- package/field/index.css +6 -6
- package/index-03d088c4.d.ts +2 -2
- package/index-281accb7.d.ts +2 -2
- package/index-c44170fe.d.ts +6 -0
- package/index.css +5 -5
- package/mobile/Component.mobile.js +1 -2
- package/modern/Component-11f20b2e.d.ts +1 -1
- package/modern/{Component-4bf4de6f.d.ts → Component-7f86a3f9.d.ts} +1 -1
- package/modern/Component-c44170fe.d.ts +1 -0
- package/modern/Component.responsive.d.ts +9 -1
- package/modern/Component.responsive.js +4 -8
- package/{cssm/ResponsiveContext-d6bfd5b7.d.ts → modern/ResponsiveContext-4b7234ef.d.ts} +1 -1
- package/modern/component-03d088c4.d.ts +10 -2
- package/modern/component-8bdd19d3.d.ts +2 -2
- package/modern/desktop/Component.desktop.d.ts +1 -1
- package/modern/desktop/Component.desktop.js +1 -1
- package/modern/field/Component.d.ts +1 -1
- package/modern/field/Component.js +1 -1
- package/modern/field/index.css +6 -6
- package/modern/index-03d088c4.d.ts +2 -2
- package/modern/index-281accb7.d.ts +2 -2
- package/modern/index-c44170fe.d.ts +6 -0
- package/modern/index.css +5 -5
- package/modern/mobile/Component.mobile.js +1 -2
- package/modern/option/Component.js +1 -1
- package/modern/option/index.css +4 -4
- package/modern/transformSize-ebda875c.d.ts +1 -1
- package/{moderncssm/typings-d6bfd5b7.d.ts → modern/typings-4b7234ef.d.ts} +5 -0
- package/modern/{typings-4bf4de6f.d.ts → typings-7f86a3f9.d.ts} +17 -5
- package/modern/utils-34f6b81b.d.ts +1 -1
- package/moderncssm/Component-11f20b2e.d.ts +1 -1
- package/moderncssm/Component-7f86a3f9.d.ts +5 -0
- package/moderncssm/Component-c44170fe.d.ts +1 -0
- package/moderncssm/Component.responsive.d.ts +9 -1
- package/moderncssm/Component.responsive.js +4 -8
- package/moderncssm/ResponsiveContext-4b7234ef.d.ts +5 -0
- package/moderncssm/component-03d088c4.d.ts +10 -2
- package/moderncssm/component-8bdd19d3.d.ts +2 -2
- package/moderncssm/desktop/Component.desktop.d.ts +1 -1
- package/moderncssm/field/Component.d.ts +1 -1
- package/moderncssm/index-03d088c4.d.ts +2 -2
- package/moderncssm/index-281accb7.d.ts +2 -2
- package/moderncssm/index-c44170fe.d.ts +6 -0
- package/moderncssm/mobile/Component.mobile.js +1 -2
- package/moderncssm/transformSize-ebda875c.d.ts +1 -1
- package/{esm/typings-d6bfd5b7.d.ts → moderncssm/typings-4b7234ef.d.ts} +5 -0
- package/moderncssm/{typings-4bf4de6f.d.ts → typings-7f86a3f9.d.ts} +17 -5
- package/moderncssm/utils-34f6b81b.d.ts +1 -1
- package/option/Component.js +1 -1
- package/option/index.css +4 -4
- package/package.json +6 -5
- package/src/Component.responsive.tsx +10 -11
- package/src/mobile/Component.mobile.tsx +1 -2
- package/transformSize-ebda875c.d.ts +1 -1
- package/typings-4b7234ef.d.ts +67 -0
- package/typings-7f86a3f9.d.ts +1445 -0
- package/utils-34f6b81b.d.ts +1 -1
- package/cssm/index-3109f463.d.ts +0 -66
- package/esm/index-3109f463.d.ts +0 -66
- package/index-3109f463.d.ts +0 -66
- package/modern/index-3109f463.d.ts +0 -66
- package/moderncssm/Component-4bf4de6f.d.ts +0 -5
- package/moderncssm/ResponsiveContext-d6bfd5b7.d.ts +0 -5
- package/moderncssm/index-3109f463.d.ts +0 -66
- package/typings-4bf4de6f.d.ts +0 -1433
- package/typings-d6bfd5b7.d.ts +0 -62
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@alfalab/icons-glyph",
|
|
3
|
+
"version": "2.140.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"react": ">=16.8.0",
|
|
7
|
+
"react-dom": ">=16.8.0"
|
|
8
|
+
},
|
|
9
|
+
"main": "./index.js",
|
|
10
|
+
"module": "./esm/index.js",
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
}
|
|
14
|
+
}
|
package/Component-11f20b2e.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { View } from "./typings-
|
|
3
|
+
import { View } from "./typings-4b7234ef";
|
|
4
4
|
declare const Modal: React.ForwardRefExoticComponent<import("./index-11f20b2e").BaseModalProps & {
|
|
5
5
|
size?: "s" | "m" | "l" | "xl" | 500 | "fullscreen" | 600 | 800 | 1140 | undefined;
|
|
6
6
|
fullscreen?: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { OptgroupProps } from "./typings-
|
|
3
|
+
import { OptgroupProps } from "./typings-7f86a3f9";
|
|
4
4
|
declare const Optgroup: ({ children, className, label, size }: OptgroupProps) => React.JSX.Element;
|
|
5
5
|
export { Optgroup };
|
package/Component-c44170fe.d.ts
CHANGED
|
@@ -276,6 +276,7 @@ declare const BaseInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAtt
|
|
|
276
276
|
*/
|
|
277
277
|
FormControlComponent?: React.ElementType<Omit<import("./index-ebda875c").BaseFormControlProps, "styles" | "colorStyles"> & {
|
|
278
278
|
breakpoint?: number | undefined;
|
|
279
|
+
client?: "desktop" | "mobile" | undefined;
|
|
279
280
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
280
281
|
} & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
281
282
|
/**
|
|
@@ -8,8 +8,12 @@ type PickerButtonResponsiveProps = PickerButtonDesktopProps & AdditionalMobilePr
|
|
|
8
8
|
* @default 1024
|
|
9
9
|
*/
|
|
10
10
|
breakpoint?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
13
|
+
*/
|
|
14
|
+
client?: 'desktop' | 'mobile';
|
|
11
15
|
};
|
|
12
|
-
declare const PickerButtonResponsive: React.ForwardRefExoticComponent<Omit<import("@alfalab/core-components-select/shared").BaseSelectProps, "size" | "
|
|
16
|
+
declare const PickerButtonResponsive: React.ForwardRefExoticComponent<Omit<import("@alfalab/core-components-select/shared").BaseSelectProps, "size" | "multiple" | "hint" | "placeholder" | "onFocus" | "selected" | "options" | "showSearch" | "searchProps" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow" | "Search"> & Pick<import("@alfalab/core-components-button").ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
|
|
13
17
|
options: ((import("@alfalab/core-components-select/shared").OptionShape | import("@alfalab/core-components-select/shared").GroupShape) & {
|
|
14
18
|
icon?: React.ComponentType<React.SVGProps<SVGSVGElement>> | undefined;
|
|
15
19
|
})[];
|
|
@@ -23,5 +27,9 @@ declare const PickerButtonResponsive: React.ForwardRefExoticComponent<Omit<impor
|
|
|
23
27
|
* @default 1024
|
|
24
28
|
*/
|
|
25
29
|
breakpoint?: number | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
32
|
+
*/
|
|
33
|
+
client?: "desktop" | "mobile" | undefined;
|
|
26
34
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
27
35
|
export { PickerButtonResponsiveProps, PickerButtonResponsive };
|
package/Component.responsive.js
CHANGED
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
8
|
-
var hooks = require('@alfalab/hooks');
|
|
7
|
+
var coreComponentsMq = require('@alfalab/core-components-mq');
|
|
9
8
|
var desktop_Component_desktop = require('./desktop/Component.desktop.js');
|
|
10
9
|
var mobile_Component_mobile = require('./mobile/Component.mobile.js');
|
|
11
10
|
|
|
@@ -14,12 +13,9 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
14
|
|
|
16
15
|
var PickerButtonResponsive = React.forwardRef(function (_a, ref) {
|
|
17
|
-
var OptionsList = _a.OptionsList, onScroll = _a.onScroll, footer = _a.footer, swipeable = _a.swipeable, bottomSheetProps = _a.bottomSheetProps,
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
['desktop', "(min-width: ".concat(breakpoint, "px)")],
|
|
21
|
-
], 'desktop')[0];
|
|
22
|
-
return view === 'desktop' ? (React__default.default.createElement(desktop_Component_desktop.PickerButtonDesktop, tslib.__assign({ ref: ref, OptionsList: OptionsList, onScroll: onScroll }, restProps))) : (React__default.default.createElement(mobile_Component_mobile.PickerButtonMobile, tslib.__assign({ ref: ref, footer: footer, swipeable: swipeable, bottomSheetProps: bottomSheetProps, breakpoint: breakpoint }, restProps)));
|
|
16
|
+
var OptionsList = _a.OptionsList, onScroll = _a.onScroll, footer = _a.footer, swipeable = _a.swipeable, bottomSheetProps = _a.bottomSheetProps, breakpoint = _a.breakpoint, client = _a.client, restProps = tslib.__rest(_a, ["OptionsList", "onScroll", "footer", "swipeable", "bottomSheetProps", "breakpoint", "client"]);
|
|
17
|
+
var isDesktop = coreComponentsMq.useIsDesktop(breakpoint, client === 'desktop');
|
|
18
|
+
return isDesktop ? (React__default.default.createElement(desktop_Component_desktop.PickerButtonDesktop, tslib.__assign({ ref: ref, OptionsList: OptionsList, onScroll: onScroll }, restProps))) : (React__default.default.createElement(mobile_Component_mobile.PickerButtonMobile, tslib.__assign({ ref: ref, footer: footer, swipeable: swipeable, bottomSheetProps: bottomSheetProps, breakpoint: breakpoint }, restProps)));
|
|
23
19
|
});
|
|
24
20
|
PickerButtonResponsive.displayName = 'PickerButtonResponsive';
|
|
25
21
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { TResponsiveModalContext } from "./typings-
|
|
3
|
+
import { TResponsiveModalContext } from "./typings-4b7234ef";
|
|
4
4
|
declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
|
|
5
5
|
export { ResponsiveContext };
|
package/component-03d088c4.d.ts
CHANGED
|
@@ -7,12 +7,16 @@ type TitleResponsiveProps = TitleProps & {
|
|
|
7
7
|
* @default 1024
|
|
8
8
|
*/
|
|
9
9
|
breakpoint?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
12
|
+
*/
|
|
13
|
+
client?: 'desktop' | 'mobile';
|
|
10
14
|
};
|
|
11
15
|
declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
|
|
12
16
|
tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
13
|
-
view?: "small" | "medium" | "
|
|
17
|
+
view?: "small" | "medium" | "large" | "xlarge" | "xsmall" | undefined;
|
|
14
18
|
color?: "link" | "accent" | "primary" | "primary-inverted" | "secondary" | "secondary-inverted" | "tertiary" | "tertiary-inverted" | "attention" | "positive" | "negative" | "static-accent" | "disabled" | "static-primary-light" | "static-secondary-light" | "static-tertiary-light" | "static-primary-dark" | "static-secondary-dark" | "static-tertiary-dark" | undefined;
|
|
15
|
-
weight?: "bold" | "
|
|
19
|
+
weight?: "bold" | "medium" | "regular" | "semibold" | undefined;
|
|
16
20
|
font?: "styrene" | "system" | undefined;
|
|
17
21
|
defaultMargins?: boolean | undefined;
|
|
18
22
|
className?: string | undefined;
|
|
@@ -28,5 +32,9 @@ declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAt
|
|
|
28
32
|
* @default 1024
|
|
29
33
|
*/
|
|
30
34
|
breakpoint?: number | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
37
|
+
*/
|
|
38
|
+
client?: "desktop" | "mobile" | undefined;
|
|
31
39
|
} & React.RefAttributes<HTMLDivElement | HTMLHeadingElement>>;
|
|
32
40
|
export { TitleResponsiveProps, TitleResponsive };
|
package/component-8bdd19d3.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "colo
|
|
|
74
74
|
/**
|
|
75
75
|
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
|
|
76
76
|
*/
|
|
77
|
-
view?: "small" | "medium" | "
|
|
77
|
+
view?: "small" | "medium" | "large" | "xlarge" | "xsmall" | undefined;
|
|
78
78
|
/**
|
|
79
79
|
* Цвет текста
|
|
80
80
|
*/
|
|
@@ -82,7 +82,7 @@ declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "colo
|
|
|
82
82
|
/**
|
|
83
83
|
* Толщина шрифта
|
|
84
84
|
*/
|
|
85
|
-
weight?: "bold" | "
|
|
85
|
+
weight?: "bold" | "medium" | "regular" | "semibold" | undefined;
|
|
86
86
|
/**
|
|
87
87
|
* Шрифт текста
|
|
88
88
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { View } from "./typings-
|
|
3
|
+
import { View } from "./typings-4b7234ef";
|
|
4
4
|
declare const Modal: React.ForwardRefExoticComponent<import("./index-11f20b2e").BaseModalProps & {
|
|
5
5
|
size?: "s" | "m" | "l" | "xl" | 500 | "fullscreen" | 600 | 800 | 1140 | undefined;
|
|
6
6
|
fullscreen?: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { OptgroupProps } from "./typings-
|
|
3
|
+
import { OptgroupProps } from "./typings-7f86a3f9";
|
|
4
4
|
declare const Optgroup: ({ children, className, label, size }: OptgroupProps) => React.JSX.Element;
|
|
5
5
|
export { Optgroup };
|
|
@@ -276,6 +276,7 @@ declare const BaseInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAtt
|
|
|
276
276
|
*/
|
|
277
277
|
FormControlComponent?: React.ElementType<Omit<import("./index-ebda875c").BaseFormControlProps, "styles" | "colorStyles"> & {
|
|
278
278
|
breakpoint?: number | undefined;
|
|
279
|
+
client?: "desktop" | "mobile" | undefined;
|
|
279
280
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
280
281
|
} & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
281
282
|
/**
|
|
@@ -8,8 +8,12 @@ type PickerButtonResponsiveProps = PickerButtonDesktopProps & AdditionalMobilePr
|
|
|
8
8
|
* @default 1024
|
|
9
9
|
*/
|
|
10
10
|
breakpoint?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
13
|
+
*/
|
|
14
|
+
client?: 'desktop' | 'mobile';
|
|
11
15
|
};
|
|
12
|
-
declare const PickerButtonResponsive: React.ForwardRefExoticComponent<Omit<import("@alfalab/core-components-select/shared").BaseSelectProps, "size" | "
|
|
16
|
+
declare const PickerButtonResponsive: React.ForwardRefExoticComponent<Omit<import("@alfalab/core-components-select/shared").BaseSelectProps, "size" | "multiple" | "hint" | "placeholder" | "onFocus" | "selected" | "options" | "showSearch" | "searchProps" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow" | "Search"> & Pick<import("@alfalab/core-components-button").ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
|
|
13
17
|
options: ((import("@alfalab/core-components-select/shared").OptionShape | import("@alfalab/core-components-select/shared").GroupShape) & {
|
|
14
18
|
icon?: React.ComponentType<React.SVGProps<SVGSVGElement>> | undefined;
|
|
15
19
|
})[];
|
|
@@ -23,5 +27,9 @@ declare const PickerButtonResponsive: React.ForwardRefExoticComponent<Omit<impor
|
|
|
23
27
|
* @default 1024
|
|
24
28
|
*/
|
|
25
29
|
breakpoint?: number | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
32
|
+
*/
|
|
33
|
+
client?: "desktop" | "mobile" | undefined;
|
|
26
34
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
27
35
|
export { PickerButtonResponsiveProps, PickerButtonResponsive };
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
8
|
-
var hooks = require('@alfalab/hooks');
|
|
7
|
+
var coreComponentsMq = require('@alfalab/core-components-mq/cssm');
|
|
9
8
|
var desktop_Component_desktop = require('./desktop/Component.desktop.js');
|
|
10
9
|
var mobile_Component_mobile = require('./mobile/Component.mobile.js');
|
|
11
10
|
|
|
@@ -14,12 +13,9 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
14
|
|
|
16
15
|
var PickerButtonResponsive = React.forwardRef(function (_a, ref) {
|
|
17
|
-
var OptionsList = _a.OptionsList, onScroll = _a.onScroll, footer = _a.footer, swipeable = _a.swipeable, bottomSheetProps = _a.bottomSheetProps,
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
['desktop', "(min-width: ".concat(breakpoint, "px)")],
|
|
21
|
-
], 'desktop')[0];
|
|
22
|
-
return view === 'desktop' ? (React__default.default.createElement(desktop_Component_desktop.PickerButtonDesktop, tslib.__assign({ ref: ref, OptionsList: OptionsList, onScroll: onScroll }, restProps))) : (React__default.default.createElement(mobile_Component_mobile.PickerButtonMobile, tslib.__assign({ ref: ref, footer: footer, swipeable: swipeable, bottomSheetProps: bottomSheetProps, breakpoint: breakpoint }, restProps)));
|
|
16
|
+
var OptionsList = _a.OptionsList, onScroll = _a.onScroll, footer = _a.footer, swipeable = _a.swipeable, bottomSheetProps = _a.bottomSheetProps, breakpoint = _a.breakpoint, client = _a.client, restProps = tslib.__rest(_a, ["OptionsList", "onScroll", "footer", "swipeable", "bottomSheetProps", "breakpoint", "client"]);
|
|
17
|
+
var isDesktop = coreComponentsMq.useIsDesktop(breakpoint, client === 'desktop');
|
|
18
|
+
return isDesktop ? (React__default.default.createElement(desktop_Component_desktop.PickerButtonDesktop, tslib.__assign({ ref: ref, OptionsList: OptionsList, onScroll: onScroll }, restProps))) : (React__default.default.createElement(mobile_Component_mobile.PickerButtonMobile, tslib.__assign({ ref: ref, footer: footer, swipeable: swipeable, bottomSheetProps: bottomSheetProps, breakpoint: breakpoint }, restProps)));
|
|
23
19
|
});
|
|
24
20
|
PickerButtonResponsive.displayName = 'PickerButtonResponsive';
|
|
25
21
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { TResponsiveModalContext } from "./typings-
|
|
3
|
+
import { TResponsiveModalContext } from "./typings-4b7234ef";
|
|
4
4
|
declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
|
|
5
5
|
export { ResponsiveContext };
|
|
@@ -7,12 +7,16 @@ type TitleResponsiveProps = TitleProps & {
|
|
|
7
7
|
* @default 1024
|
|
8
8
|
*/
|
|
9
9
|
breakpoint?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
12
|
+
*/
|
|
13
|
+
client?: 'desktop' | 'mobile';
|
|
10
14
|
};
|
|
11
15
|
declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
|
|
12
16
|
tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
13
|
-
view?: "small" | "medium" | "
|
|
17
|
+
view?: "small" | "medium" | "large" | "xlarge" | "xsmall" | undefined;
|
|
14
18
|
color?: "link" | "accent" | "primary" | "primary-inverted" | "secondary" | "secondary-inverted" | "tertiary" | "tertiary-inverted" | "attention" | "positive" | "negative" | "static-accent" | "disabled" | "static-primary-light" | "static-secondary-light" | "static-tertiary-light" | "static-primary-dark" | "static-secondary-dark" | "static-tertiary-dark" | undefined;
|
|
15
|
-
weight?: "bold" | "
|
|
19
|
+
weight?: "bold" | "medium" | "regular" | "semibold" | undefined;
|
|
16
20
|
font?: "styrene" | "system" | undefined;
|
|
17
21
|
defaultMargins?: boolean | undefined;
|
|
18
22
|
className?: string | undefined;
|
|
@@ -28,5 +32,9 @@ declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAt
|
|
|
28
32
|
* @default 1024
|
|
29
33
|
*/
|
|
30
34
|
breakpoint?: number | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
37
|
+
*/
|
|
38
|
+
client?: "desktop" | "mobile" | undefined;
|
|
31
39
|
} & React.RefAttributes<HTMLDivElement | HTMLHeadingElement>>;
|
|
32
40
|
export { TitleResponsiveProps, TitleResponsive };
|
|
@@ -74,7 +74,7 @@ declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "colo
|
|
|
74
74
|
/**
|
|
75
75
|
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
|
|
76
76
|
*/
|
|
77
|
-
view?: "small" | "medium" | "
|
|
77
|
+
view?: "small" | "medium" | "large" | "xlarge" | "xsmall" | undefined;
|
|
78
78
|
/**
|
|
79
79
|
* Цвет текста
|
|
80
80
|
*/
|
|
@@ -82,7 +82,7 @@ declare const TitleBase: React.ForwardRefExoticComponent<Omit<NativeProps, "colo
|
|
|
82
82
|
/**
|
|
83
83
|
* Толщина шрифта
|
|
84
84
|
*/
|
|
85
|
-
weight?: "bold" | "
|
|
85
|
+
weight?: "bold" | "medium" | "regular" | "semibold" | undefined;
|
|
86
86
|
/**
|
|
87
87
|
* Шрифт текста
|
|
88
88
|
*/
|
|
@@ -30,7 +30,7 @@ type PickerButtonDesktopProps = Omit<BaseSelectProps, 'placeholder' | 'Arrow' |
|
|
|
30
30
|
*/
|
|
31
31
|
icon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
32
32
|
};
|
|
33
|
-
declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "
|
|
33
|
+
declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "multiple" | "hint" | "placeholder" | "onFocus" | "selected" | "options" | "showSearch" | "searchProps" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow" | "Search"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
|
|
34
34
|
options: Array<BaseSelectProps['options'][0] & {
|
|
35
35
|
/**
|
|
36
36
|
* Иконка, отображающаяся слева от текстового представления пункта
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ComponentType, SVGProps } from "react";
|
|
4
4
|
import { ButtonProps } from "@alfalab/core-components-button";
|
|
5
|
-
import { FieldProps as BaseFieldProps } from "../typings-
|
|
5
|
+
import { FieldProps as BaseFieldProps } from "../typings-7f86a3f9";
|
|
6
6
|
import { PickerButtonSize, PickerButtonVariant } from "../types";
|
|
7
7
|
type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
8
8
|
buttonSize?: PickerButtonSize;
|
package/cssm/index-03d088c4.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import React from 'react';
|
|
|
3
3
|
import { TitleProps } from "./component-8bdd19d3";
|
|
4
4
|
declare const Title: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
|
|
5
5
|
tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
6
|
-
view?: "small" | "medium" | "
|
|
6
|
+
view?: "small" | "medium" | "large" | "xlarge" | "xsmall" | undefined;
|
|
7
7
|
color?: "link" | "accent" | "primary" | "primary-inverted" | "secondary" | "secondary-inverted" | "tertiary" | "tertiary-inverted" | "attention" | "positive" | "negative" | "static-accent" | "disabled" | "static-primary-light" | "static-secondary-light" | "static-tertiary-light" | "static-primary-dark" | "static-secondary-dark" | "static-tertiary-dark" | undefined;
|
|
8
|
-
weight?: "bold" | "
|
|
8
|
+
weight?: "bold" | "medium" | "regular" | "semibold" | undefined;
|
|
9
9
|
font?: "styrene" | "system" | undefined;
|
|
10
10
|
defaultMargins?: boolean | undefined;
|
|
11
11
|
className?: string | undefined;
|
package/cssm/index-281accb7.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
declare const TitleMobile: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLHeadingElement>, "color"> & {
|
|
4
4
|
tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
5
|
-
view?: "small" | "medium" | "
|
|
5
|
+
view?: "small" | "medium" | "large" | "xlarge" | "xsmall" | undefined;
|
|
6
6
|
color?: "link" | "accent" | "primary" | "primary-inverted" | "secondary" | "secondary-inverted" | "tertiary" | "tertiary-inverted" | "attention" | "positive" | "negative" | "static-accent" | "disabled" | "static-primary-light" | "static-secondary-light" | "static-tertiary-light" | "static-primary-dark" | "static-secondary-dark" | "static-tertiary-dark" | undefined;
|
|
7
|
-
weight?: "bold" | "
|
|
7
|
+
weight?: "bold" | "medium" | "regular" | "semibold" | undefined;
|
|
8
8
|
font?: "styrene" | "system" | undefined;
|
|
9
9
|
defaultMargins?: boolean | undefined;
|
|
10
10
|
className?: string | undefined;
|
package/cssm/index-c44170fe.d.ts
CHANGED
|
@@ -7,13 +7,19 @@ type FormControlProps = Omit<BaseFormControlProps, "styles" | "colorStyles"> & {
|
|
|
7
7
|
* @default 1024
|
|
8
8
|
*/
|
|
9
9
|
breakpoint?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
12
|
+
*/
|
|
13
|
+
client?: "desktop" | "mobile";
|
|
10
14
|
/**
|
|
11
15
|
* Значение по-умолчанию для хука useMatchMedia
|
|
16
|
+
* @deprecated Используйте client
|
|
12
17
|
*/
|
|
13
18
|
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
14
19
|
};
|
|
15
20
|
declare const FormControl: React.ForwardRefExoticComponent<Omit<BaseFormControlProps, "styles" | "colorStyles"> & {
|
|
16
21
|
breakpoint?: number | undefined;
|
|
22
|
+
client?: "desktop" | "mobile" | undefined;
|
|
17
23
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
18
24
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
19
25
|
export { FormControlProps, FormControl };
|
|
@@ -6,7 +6,6 @@ var tslib = require('tslib');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var mobile = require('@alfalab/core-components-select/cssm/mobile');
|
|
8
8
|
var shared = require('@alfalab/core-components-select/cssm/shared');
|
|
9
|
-
var coreComponentsShared = require('@alfalab/core-components-shared/cssm');
|
|
10
9
|
var field_Component = require('../field/Component.js');
|
|
11
10
|
var option_Component = require('../option/Component.js');
|
|
12
11
|
|
|
@@ -15,7 +14,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
14
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
15
|
|
|
17
16
|
var PickerButtonMobile = React.forwardRef(function (_a, ref) {
|
|
18
|
-
var options = _a.options, label = _a.label, _b = _a.Option, Option = _b === void 0 ? option_Component.Option : _b, _c = _a.Optgroup, Optgroup = _c === void 0 ? shared.Optgroup : _c, view = _a.view, loading = _a.loading, _d = _a.variant, variant = _d === void 0 ? 'default' : _d, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, size = _a.size, bottomSheetProps = _a.bottomSheetProps, showArrow = _a.showArrow, _e = _a.Field, Field = _e === void 0 ? field_Component.Field : _e, _f = _a.fieldProps, fieldProps = _f === void 0 ? {} : _f, icon = _a.icon,
|
|
17
|
+
var options = _a.options, label = _a.label, _b = _a.Option, Option = _b === void 0 ? option_Component.Option : _b, _c = _a.Optgroup, Optgroup = _c === void 0 ? shared.Optgroup : _c, view = _a.view, loading = _a.loading, _d = _a.variant, variant = _d === void 0 ? 'default' : _d, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, size = _a.size, bottomSheetProps = _a.bottomSheetProps, showArrow = _a.showArrow, _e = _a.Field, Field = _e === void 0 ? field_Component.Field : _e, _f = _a.fieldProps, fieldProps = _f === void 0 ? {} : _f, icon = _a.icon, breakpoint = _a.breakpoint, restProps = tslib.__rest(_a, ["options", "label", "Option", "Optgroup", "view", "loading", "variant", "leftAddons", "rightAddons", "size", "bottomSheetProps", "showArrow", "Field", "fieldProps", "icon", "breakpoint"]);
|
|
19
18
|
var fieldDefaultProps = {
|
|
20
19
|
view: view,
|
|
21
20
|
loading: loading,
|
|
@@ -34,8 +34,13 @@ type ModalResponsiveProps = ModalDesktopProps & {
|
|
|
34
34
|
* @default 1024
|
|
35
35
|
*/
|
|
36
36
|
breakpoint?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
39
|
+
*/
|
|
40
|
+
client?: 'desktop' | 'mobile';
|
|
37
41
|
/**
|
|
38
42
|
* Значение по-умолчанию для хука useMatchMedia
|
|
43
|
+
* @deprecated Используйте client
|
|
39
44
|
*/
|
|
40
45
|
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
41
46
|
};
|
|
@@ -11,8 +11,8 @@ import { Color } from "./colors-facf1d2a";
|
|
|
11
11
|
import { TextElementType, TextSkeletonProps } from "./types-1328ead9";
|
|
12
12
|
import { TitleProps } from "./index-03d088c4";
|
|
13
13
|
import { TitleMobileProps } from "./index-281accb7";
|
|
14
|
-
import { ContentProps } from "./typings-
|
|
15
|
-
import { ModalResponsiveProps as ModalProps } from "./typings-
|
|
14
|
+
import { ContentProps } from "./typings-4b7234ef";
|
|
15
|
+
import { ModalResponsiveProps as ModalProps } from "./typings-4b7234ef";
|
|
16
16
|
import { FormControlProps } from "./index-c44170fe";
|
|
17
17
|
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
18
18
|
import { UseSelectWithApplyProps } from "./field/Component";
|
|
@@ -466,13 +466,19 @@ type InputProps = Omit<BaseInputProps, "FormControlComponent"> & {
|
|
|
466
466
|
* @default 1024
|
|
467
467
|
*/
|
|
468
468
|
breakpoint?: number;
|
|
469
|
+
/**
|
|
470
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
471
|
+
*/
|
|
472
|
+
client?: "desktop" | "mobile";
|
|
469
473
|
/**
|
|
470
474
|
* Значение по-умолчанию для хука useMatchMedia
|
|
475
|
+
* @deprecated Используйте client
|
|
471
476
|
*/
|
|
472
477
|
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
473
478
|
};
|
|
474
479
|
declare const Input: React.ForwardRefExoticComponent<Omit<BaseInputProps, "FormControlComponent"> & {
|
|
475
480
|
breakpoint?: number | undefined;
|
|
481
|
+
client?: "desktop" | "mobile" | undefined;
|
|
476
482
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
477
483
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
478
484
|
type HeaderProps = Omit<NavigationBarPrivateProps, "size" | "view" | "parentRef">;
|
|
@@ -530,10 +536,11 @@ declare const ModalResponsive: React.ForwardRefExoticComponent<import("./index-1
|
|
|
530
536
|
iOSLock?: boolean | undefined;
|
|
531
537
|
} & {
|
|
532
538
|
breakpoint?: number | undefined;
|
|
539
|
+
client?: "desktop" | "mobile" | undefined;
|
|
533
540
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
534
541
|
} & React.RefAttributes<HTMLDivElement>> & {
|
|
535
542
|
Header: React.FC<HeaderProps>;
|
|
536
|
-
Content: React.FC<import("./typings-
|
|
543
|
+
Content: React.FC<import("./typings-4b7234ef").ContentProps>;
|
|
537
544
|
Footer: React.FC<FooterProps>;
|
|
538
545
|
Controls: React.FC<ControlsProps>;
|
|
539
546
|
};
|
|
@@ -1404,8 +1411,13 @@ type SelectProps = BaseSelectProps & AdditionalMobileProps & ConditionalMobilePr
|
|
|
1404
1411
|
* @default 1024
|
|
1405
1412
|
*/
|
|
1406
1413
|
breakpoint?: number;
|
|
1414
|
+
/**
|
|
1415
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
1416
|
+
*/
|
|
1417
|
+
client?: 'desktop' | 'mobile';
|
|
1407
1418
|
/**
|
|
1408
1419
|
* Значение по-умолчанию для хука useMatchMedia
|
|
1420
|
+
* @deprecated Используйте client
|
|
1409
1421
|
*/
|
|
1410
1422
|
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
1411
1423
|
};
|
|
@@ -1425,8 +1437,8 @@ type ClearButtonProps = {
|
|
|
1425
1437
|
};
|
|
1426
1438
|
export { BottomSheet, CLOSE_OFFSET, HEADER_OFFSET, InputProps, Input, ModalResponsive as Modal, ModalContext, getModalTestIds, FooterProps$0 as FooterProps, Footer$0 as Footer, HeaderProps$0 as HeaderProps, Header$0 as Header, SwipeableBackdropProps, SwipeableBackdrop, horizontalDirections, ShouldSkipSwipingParams, useVisibleViewportSize, Typography, typographyPresets, SwipeDirection, Content, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps, ClearButtonProps };
|
|
1427
1439
|
export type { BottomSheetProps, BottomSheetTitleAlign, HeaderProps as ModalHeaderProps, FooterProps as ModalFooterProps, TextProps };
|
|
1428
|
-
export { ModalResponsiveProps as ModalProps } from "./typings-
|
|
1429
|
-
export type { ContentProps as ModalContentProps } from "./typings-
|
|
1440
|
+
export { ModalResponsiveProps as ModalProps } from "./typings-4b7234ef";
|
|
1441
|
+
export type { ContentProps as ModalContentProps } from "./typings-4b7234ef";
|
|
1430
1442
|
export type { TitleProps } from "./index-03d088c4";
|
|
1431
1443
|
export type { Color } from "./colors-facf1d2a";
|
|
1432
1444
|
export * from "./Component.desktop-63dec22f";
|
package/cssm/utils-34f6b81b.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BaseSelectProps, GroupShape, OptionShape, OptionsListProps } from "./typings-
|
|
2
|
+
import { BaseSelectProps, GroupShape, OptionShape, OptionsListProps } from "./typings-7f86a3f9";
|
|
3
3
|
declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
|
|
4
4
|
declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
|
|
5
5
|
declare const joinOptions: ({ selected, selectedMultiple, }: {
|
|
@@ -30,7 +30,7 @@ type PickerButtonDesktopProps = Omit<BaseSelectProps, 'placeholder' | 'Arrow' |
|
|
|
30
30
|
*/
|
|
31
31
|
icon?: ComponentType<SVGProps<SVGSVGElement>>;
|
|
32
32
|
};
|
|
33
|
-
declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "
|
|
33
|
+
declare const PickerButtonDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "size" | "multiple" | "hint" | "placeholder" | "onFocus" | "selected" | "options" | "showSearch" | "searchProps" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow" | "Search"> & Pick<ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
|
|
34
34
|
options: Array<BaseSelectProps['options'][0] & {
|
|
35
35
|
/**
|
|
36
36
|
* Иконка, отображающаяся слева от текстового представления пункта
|
|
@@ -15,7 +15,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
16
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
17
17
|
|
|
18
|
-
var styles = {"container":"picker-
|
|
18
|
+
var styles = {"container":"picker-button__container_dcpbn","optionsPopover":"picker-button__optionsPopover_dcpbn","sideGap":"picker-button__sideGap_dcpbn","option":"picker-button__option_dcpbn"};
|
|
19
19
|
require('./../index.css')
|
|
20
20
|
|
|
21
21
|
var SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { View } from "./typings-
|
|
3
|
+
import { View } from "./typings-4b7234ef";
|
|
4
4
|
declare const Modal: React.ForwardRefExoticComponent<import("./index-11f20b2e").BaseModalProps & {
|
|
5
5
|
size?: "s" | "m" | "l" | "xl" | 500 | "fullscreen" | 600 | 800 | 1140 | undefined;
|
|
6
6
|
fullscreen?: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { OptgroupProps } from "./typings-
|
|
3
|
+
import { OptgroupProps } from "./typings-7f86a3f9";
|
|
4
4
|
declare const Optgroup: ({ children, className, label, size }: OptgroupProps) => React.JSX.Element;
|
|
5
5
|
export { Optgroup };
|
|
@@ -276,6 +276,7 @@ declare const BaseInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAtt
|
|
|
276
276
|
*/
|
|
277
277
|
FormControlComponent?: React.ElementType<Omit<import("./index-ebda875c").BaseFormControlProps, "styles" | "colorStyles"> & {
|
|
278
278
|
breakpoint?: number | undefined;
|
|
279
|
+
client?: "desktop" | "mobile" | undefined;
|
|
279
280
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
280
281
|
} & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
281
282
|
/**
|
|
@@ -8,8 +8,12 @@ type PickerButtonResponsiveProps = PickerButtonDesktopProps & AdditionalMobilePr
|
|
|
8
8
|
* @default 1024
|
|
9
9
|
*/
|
|
10
10
|
breakpoint?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
13
|
+
*/
|
|
14
|
+
client?: 'desktop' | 'mobile';
|
|
11
15
|
};
|
|
12
|
-
declare const PickerButtonResponsive: React.ForwardRefExoticComponent<Omit<import("@alfalab/core-components-select/shared").BaseSelectProps, "size" | "
|
|
16
|
+
declare const PickerButtonResponsive: React.ForwardRefExoticComponent<Omit<import("@alfalab/core-components-select/shared").BaseSelectProps, "size" | "multiple" | "hint" | "placeholder" | "onFocus" | "selected" | "options" | "showSearch" | "searchProps" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "Arrow" | "Search"> & Pick<import("@alfalab/core-components-button").ButtonProps, "view" | "leftAddons" | "rightAddons" | "loading"> & {
|
|
13
17
|
options: ((import("@alfalab/core-components-select/shared").OptionShape | import("@alfalab/core-components-select/shared").GroupShape) & {
|
|
14
18
|
icon?: React.ComponentType<React.SVGProps<SVGSVGElement>> | undefined;
|
|
15
19
|
})[];
|
|
@@ -23,5 +27,9 @@ declare const PickerButtonResponsive: React.ForwardRefExoticComponent<Omit<impor
|
|
|
23
27
|
* @default 1024
|
|
24
28
|
*/
|
|
25
29
|
breakpoint?: number | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
32
|
+
*/
|
|
33
|
+
client?: "desktop" | "mobile" | undefined;
|
|
26
34
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
27
35
|
export { PickerButtonResponsiveProps, PickerButtonResponsive };
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { useMedia } from '@alfalab/hooks';
|
|
3
|
+
import { useIsDesktop } from '@alfalab/core-components-mq/esm';
|
|
5
4
|
import { PickerButtonDesktop } from './desktop/Component.desktop.js';
|
|
6
5
|
import { PickerButtonMobile } from './mobile/Component.mobile.js';
|
|
7
6
|
|
|
8
7
|
var PickerButtonResponsive = forwardRef(function (_a, ref) {
|
|
9
|
-
var OptionsList = _a.OptionsList, onScroll = _a.onScroll, footer = _a.footer, swipeable = _a.swipeable, bottomSheetProps = _a.bottomSheetProps,
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
['desktop', "(min-width: ".concat(breakpoint, "px)")],
|
|
13
|
-
], 'desktop')[0];
|
|
14
|
-
return view === 'desktop' ? (React.createElement(PickerButtonDesktop, __assign({ ref: ref, OptionsList: OptionsList, onScroll: onScroll }, restProps))) : (React.createElement(PickerButtonMobile, __assign({ ref: ref, footer: footer, swipeable: swipeable, bottomSheetProps: bottomSheetProps, breakpoint: breakpoint }, restProps)));
|
|
8
|
+
var OptionsList = _a.OptionsList, onScroll = _a.onScroll, footer = _a.footer, swipeable = _a.swipeable, bottomSheetProps = _a.bottomSheetProps, breakpoint = _a.breakpoint, client = _a.client, restProps = __rest(_a, ["OptionsList", "onScroll", "footer", "swipeable", "bottomSheetProps", "breakpoint", "client"]);
|
|
9
|
+
var isDesktop = useIsDesktop(breakpoint, client === 'desktop');
|
|
10
|
+
return isDesktop ? (React.createElement(PickerButtonDesktop, __assign({ ref: ref, OptionsList: OptionsList, onScroll: onScroll }, restProps))) : (React.createElement(PickerButtonMobile, __assign({ ref: ref, footer: footer, swipeable: swipeable, bottomSheetProps: bottomSheetProps, breakpoint: breakpoint }, restProps)));
|
|
15
11
|
});
|
|
16
12
|
PickerButtonResponsive.displayName = 'PickerButtonResponsive';
|
|
17
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { TResponsiveModalContext } from "./typings-
|
|
3
|
+
import { TResponsiveModalContext } from "./typings-4b7234ef";
|
|
4
4
|
declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
|
|
5
5
|
export { ResponsiveContext };
|