@alfalab/core-components-picker-button 11.7.1 → 11.7.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.
- package/{Component-1fe708ea.d.ts → Component-cc406ff0.d.ts} +1 -1
- package/Component.responsive.js +1 -0
- package/cssm/{Component-1fe708ea.d.ts → Component-cc406ff0.d.ts} +1 -1
- package/cssm/Component.responsive.js +1 -0
- package/cssm/field/Component.d.ts +1 -1
- package/{esm/typings-1fe708ea.d.ts → cssm/typings-cc406ff0.d.ts} +28 -0
- package/cssm/utils-89376c31.d.ts +1 -1
- package/desktop/Component.desktop.js +1 -1
- package/{modern/Component-1fe708ea.d.ts → esm/Component-cc406ff0.d.ts} +1 -1
- package/esm/Component.responsive.js +1 -0
- 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.css +5 -5
- package/esm/option/Component.js +1 -1
- package/esm/option/index.css +4 -4
- package/{modern/typings-1fe708ea.d.ts → esm/typings-cc406ff0.d.ts} +28 -0
- package/esm/utils-89376c31.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.css +5 -5
- package/{esm/Component-1fe708ea.d.ts → modern/Component-cc406ff0.d.ts} +1 -1
- package/modern/Component.responsive.js +1 -0
- 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.css +5 -5
- package/modern/option/Component.js +1 -1
- package/modern/option/index.css +4 -4
- package/{cssm/typings-1fe708ea.d.ts → modern/typings-cc406ff0.d.ts} +28 -0
- package/modern/utils-89376c31.d.ts +1 -1
- package/option/Component.js +1 -1
- package/option/index.css +4 -4
- package/package.json +4 -4
- package/src/Component.responsive.tsx +2 -0
- package/{typings-1fe708ea.d.ts → typings-cc406ff0.d.ts} +28 -0
- package/utils-89376c31.d.ts +1 -1
|
@@ -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-cc406ff0";
|
|
4
4
|
declare const Optgroup: ({ children, className, label, size }: OptgroupProps) => React.JSX.Element;
|
|
5
5
|
export { Optgroup };
|
package/Component.responsive.js
CHANGED
|
@@ -20,5 +20,6 @@ var PickerButtonResponsive = React.forwardRef(function (_a, ref) {
|
|
|
20
20
|
], 'desktop')[0];
|
|
21
21
|
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)));
|
|
22
22
|
});
|
|
23
|
+
PickerButtonResponsive.displayName = 'PickerButtonResponsive';
|
|
23
24
|
|
|
24
25
|
exports.PickerButtonResponsive = PickerButtonResponsive;
|
|
@@ -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-cc406ff0";
|
|
4
4
|
declare const Optgroup: ({ children, className, label, size }: OptgroupProps) => React.JSX.Element;
|
|
5
5
|
export { Optgroup };
|
|
@@ -20,5 +20,6 @@ var PickerButtonResponsive = React.forwardRef(function (_a, ref) {
|
|
|
20
20
|
], 'desktop')[0];
|
|
21
21
|
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)));
|
|
22
22
|
});
|
|
23
|
+
PickerButtonResponsive.displayName = 'PickerButtonResponsive';
|
|
23
24
|
|
|
24
25
|
exports.PickerButtonResponsive = PickerButtonResponsive;
|
|
@@ -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-cc406ff0";
|
|
6
6
|
import { PickerButtonSize, PickerButtonVariant } from "../types";
|
|
7
7
|
type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
8
8
|
buttonSize?: PickerButtonSize;
|
|
@@ -881,6 +881,14 @@ type OptionsListProps = {
|
|
|
881
881
|
* Указать индекс пункта для hover состояния
|
|
882
882
|
*/
|
|
883
883
|
setHighlightedIndex?: (index: number) => void;
|
|
884
|
+
/**
|
|
885
|
+
* Значение поиска
|
|
886
|
+
*/
|
|
887
|
+
search?: string;
|
|
888
|
+
/**
|
|
889
|
+
* Возможность выбрать несколько значений
|
|
890
|
+
*/
|
|
891
|
+
multiple?: boolean;
|
|
884
892
|
};
|
|
885
893
|
type OptgroupProps = {
|
|
886
894
|
/**
|
|
@@ -900,6 +908,26 @@ type OptgroupProps = {
|
|
|
900
908
|
* Дочерние элементы
|
|
901
909
|
*/
|
|
902
910
|
children?: ReactNode;
|
|
911
|
+
/**
|
|
912
|
+
* Список вариантов выбора в группе
|
|
913
|
+
*/
|
|
914
|
+
options?: OptionShape[];
|
|
915
|
+
/**
|
|
916
|
+
* Список выбранных вариантов в группе
|
|
917
|
+
*/
|
|
918
|
+
selectedItems?: OptionShape[];
|
|
919
|
+
/**
|
|
920
|
+
* Обработчик выбранных вариантов
|
|
921
|
+
*/
|
|
922
|
+
setSelectedItems?: (items: OptionShape[]) => void;
|
|
923
|
+
/**
|
|
924
|
+
* Значение поиска
|
|
925
|
+
*/
|
|
926
|
+
search?: string;
|
|
927
|
+
/**
|
|
928
|
+
* Возможность выбрать несколько значений
|
|
929
|
+
*/
|
|
930
|
+
multiple?: boolean;
|
|
903
931
|
};
|
|
904
932
|
type OptionProps = {
|
|
905
933
|
/**
|
package/cssm/utils-89376c31.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-
|
|
2
|
+
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-cc406ff0";
|
|
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, }: {
|
|
@@ -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_v95f5","optionsPopover":"picker-button__optionsPopover_v95f5","sideGap":"picker-button__sideGap_v95f5","option":"picker-button__option_v95f5"};
|
|
19
19
|
require('./../index.css')
|
|
20
20
|
|
|
21
21
|
var SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
|
|
@@ -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-cc406ff0";
|
|
4
4
|
declare const Optgroup: ({ children, className, label, size }: OptgroupProps) => React.JSX.Element;
|
|
5
5
|
export { Optgroup };
|
|
@@ -12,5 +12,6 @@ var PickerButtonResponsive = forwardRef(function (_a, ref) {
|
|
|
12
12
|
], 'desktop')[0];
|
|
13
13
|
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)));
|
|
14
14
|
});
|
|
15
|
+
PickerButtonResponsive.displayName = 'PickerButtonResponsive';
|
|
15
16
|
|
|
16
17
|
export { PickerButtonResponsive };
|
|
@@ -6,7 +6,7 @@ import { BaseSelect, OptionsList, Optgroup } from '@alfalab/core-components-sele
|
|
|
6
6
|
import { Field } from '../field/Component.js';
|
|
7
7
|
import { Option } from '../option/Component.js';
|
|
8
8
|
|
|
9
|
-
var styles = {"container":"picker-
|
|
9
|
+
var styles = {"container":"picker-button__container_v95f5","optionsPopover":"picker-button__optionsPopover_v95f5","sideGap":"picker-button__sideGap_v95f5","option":"picker-button__option_v95f5"};
|
|
10
10
|
require('./../index.css')
|
|
11
11
|
|
|
12
12
|
var SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
|
package/esm/field/Component.d.ts
CHANGED
|
@@ -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-cc406ff0";
|
|
6
6
|
import { PickerButtonSize, PickerButtonVariant } from "../types";
|
|
7
7
|
type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
8
8
|
buttonSize?: PickerButtonSize;
|
package/esm/field/Component.js
CHANGED
|
@@ -4,7 +4,7 @@ import cn from 'classnames';
|
|
|
4
4
|
import { Button } from '@alfalab/core-components-button/esm';
|
|
5
5
|
import { getIcon } from '../utils/index.js';
|
|
6
6
|
|
|
7
|
-
var styles = {"iconContainer":"picker-
|
|
7
|
+
var styles = {"iconContainer":"picker-button__iconContainer_bkz5o","addonsContainer":"picker-button__addonsContainer_bkz5o","showControlIcon":"picker-button__showControlIcon_bkz5o","open":"picker-button__open_bkz5o","linkOpen":"picker-button__linkOpen_bkz5o"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
var SIZE_TO_CLASSNAME_MAP = {
|
package/esm/field/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1pg5i */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-transparent-default-hover: rgba(38, 55, 88, 0.06); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
19
|
--arrow-transform: rotate(180deg);
|
|
20
|
-
} .picker-
|
|
20
|
+
} .picker-button__iconContainer_bkz5o {
|
|
21
21
|
display: flex;
|
|
22
22
|
transition: transform 0.15s ease-in-out;
|
|
23
|
-
} .picker-
|
|
23
|
+
} .picker-button__addonsContainer_bkz5o {
|
|
24
24
|
display: flex
|
|
25
|
-
} .picker-
|
|
25
|
+
} .picker-button__addonsContainer_bkz5o.picker-button__showControlIcon_bkz5o {
|
|
26
26
|
margin-right: var(--gap-2xs);
|
|
27
|
-
} .picker-
|
|
27
|
+
} .picker-button__open_bkz5o {
|
|
28
28
|
transform: var(--arrow-transform);
|
|
29
|
-
} .picker-
|
|
29
|
+
} .picker-button__linkOpen_bkz5o:not(:hover) {
|
|
30
30
|
background-color: var(--color-light-transparent-default-hover);
|
|
31
31
|
}
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 6sboy */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .picker-
|
|
19
|
+
} .picker-button__container_v95f5 {
|
|
20
20
|
min-width: auto;
|
|
21
|
-
} .cc-picker-button.picker-
|
|
21
|
+
} .cc-picker-button.picker-button__optionsPopover_v95f5.picker-button__sideGap_v95f5 {
|
|
22
22
|
padding: 0 var(--gap-xs);
|
|
23
|
-
} .cc-picker-button .picker-
|
|
23
|
+
} .cc-picker-button .picker-button__option_v95f5 {
|
|
24
24
|
padding: 0 var(--gap-m)
|
|
25
|
-
} .cc-picker-button .picker-
|
|
25
|
+
} .cc-picker-button .picker-button__option_v95f5:before {
|
|
26
26
|
/* Удаляем разделители у опций выпадающего списка. */
|
|
27
27
|
display: none;
|
|
28
28
|
}
|
package/esm/option/Component.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __rest, __assign } from 'tslib';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Option as Option$1 } from '@alfalab/core-components-select/esm/shared';
|
|
4
4
|
|
|
5
|
-
var styles = {"container":"picker-
|
|
5
|
+
var styles = {"container":"picker-button__container_1es76","icon":"picker-button__icon_1es76","content":"picker-button__content_1es76"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Option = function (_a) {
|
package/esm/option/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: wlteo */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
--gap-s: 12px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .picker-
|
|
18
|
+
} .picker-button__container_1es76 {
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
|
-
} .picker-
|
|
21
|
+
} .picker-button__icon_1es76 {
|
|
22
22
|
display: flex;
|
|
23
23
|
margin-right: var(--gap-s);
|
|
24
|
-
} .picker-
|
|
24
|
+
} .picker-button__content_1es76 {
|
|
25
25
|
overflow: hidden;
|
|
26
26
|
flex: 1;
|
|
27
27
|
text-overflow: ellipsis;
|
|
@@ -881,6 +881,14 @@ type OptionsListProps = {
|
|
|
881
881
|
* Указать индекс пункта для hover состояния
|
|
882
882
|
*/
|
|
883
883
|
setHighlightedIndex?: (index: number) => void;
|
|
884
|
+
/**
|
|
885
|
+
* Значение поиска
|
|
886
|
+
*/
|
|
887
|
+
search?: string;
|
|
888
|
+
/**
|
|
889
|
+
* Возможность выбрать несколько значений
|
|
890
|
+
*/
|
|
891
|
+
multiple?: boolean;
|
|
884
892
|
};
|
|
885
893
|
type OptgroupProps = {
|
|
886
894
|
/**
|
|
@@ -900,6 +908,26 @@ type OptgroupProps = {
|
|
|
900
908
|
* Дочерние элементы
|
|
901
909
|
*/
|
|
902
910
|
children?: ReactNode;
|
|
911
|
+
/**
|
|
912
|
+
* Список вариантов выбора в группе
|
|
913
|
+
*/
|
|
914
|
+
options?: OptionShape[];
|
|
915
|
+
/**
|
|
916
|
+
* Список выбранных вариантов в группе
|
|
917
|
+
*/
|
|
918
|
+
selectedItems?: OptionShape[];
|
|
919
|
+
/**
|
|
920
|
+
* Обработчик выбранных вариантов
|
|
921
|
+
*/
|
|
922
|
+
setSelectedItems?: (items: OptionShape[]) => void;
|
|
923
|
+
/**
|
|
924
|
+
* Значение поиска
|
|
925
|
+
*/
|
|
926
|
+
search?: string;
|
|
927
|
+
/**
|
|
928
|
+
* Возможность выбрать несколько значений
|
|
929
|
+
*/
|
|
930
|
+
multiple?: boolean;
|
|
903
931
|
};
|
|
904
932
|
type OptionProps = {
|
|
905
933
|
/**
|
package/esm/utils-89376c31.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-
|
|
2
|
+
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-cc406ff0";
|
|
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, }: {
|
package/field/Component.d.ts
CHANGED
|
@@ -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-cc406ff0";
|
|
6
6
|
import { PickerButtonSize, PickerButtonVariant } from "../types";
|
|
7
7
|
type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
8
8
|
buttonSize?: PickerButtonSize;
|
package/field/Component.js
CHANGED
|
@@ -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":"picker-
|
|
16
|
+
var styles = {"iconContainer":"picker-button__iconContainer_bkz5o","addonsContainer":"picker-button__addonsContainer_bkz5o","showControlIcon":"picker-button__showControlIcon_bkz5o","open":"picker-button__open_bkz5o","linkOpen":"picker-button__linkOpen_bkz5o"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var SIZE_TO_CLASSNAME_MAP = {
|
package/field/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1pg5i */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-transparent-default-hover: rgba(38, 55, 88, 0.06); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
19
|
--arrow-transform: rotate(180deg);
|
|
20
|
-
} .picker-
|
|
20
|
+
} .picker-button__iconContainer_bkz5o {
|
|
21
21
|
display: flex;
|
|
22
22
|
transition: transform 0.15s ease-in-out;
|
|
23
|
-
} .picker-
|
|
23
|
+
} .picker-button__addonsContainer_bkz5o {
|
|
24
24
|
display: flex
|
|
25
|
-
} .picker-
|
|
25
|
+
} .picker-button__addonsContainer_bkz5o.picker-button__showControlIcon_bkz5o {
|
|
26
26
|
margin-right: var(--gap-2xs);
|
|
27
|
-
} .picker-
|
|
27
|
+
} .picker-button__open_bkz5o {
|
|
28
28
|
transform: var(--arrow-transform);
|
|
29
|
-
} .picker-
|
|
29
|
+
} .picker-button__linkOpen_bkz5o:not(:hover) {
|
|
30
30
|
background-color: var(--color-light-transparent-default-hover);
|
|
31
31
|
}
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 6sboy */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .picker-
|
|
19
|
+
} .picker-button__container_v95f5 {
|
|
20
20
|
min-width: auto;
|
|
21
|
-
} .cc-picker-button.picker-
|
|
21
|
+
} .cc-picker-button.picker-button__optionsPopover_v95f5.picker-button__sideGap_v95f5 {
|
|
22
22
|
padding: 0 var(--gap-xs);
|
|
23
|
-
} .cc-picker-button .picker-
|
|
23
|
+
} .cc-picker-button .picker-button__option_v95f5 {
|
|
24
24
|
padding: 0 var(--gap-m)
|
|
25
|
-
} .cc-picker-button .picker-
|
|
25
|
+
} .cc-picker-button .picker-button__option_v95f5:before {
|
|
26
26
|
/* Удаляем разделители у опций выпадающего списка. */
|
|
27
27
|
display: none;
|
|
28
28
|
}
|
|
@@ -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-cc406ff0";
|
|
4
4
|
declare const Optgroup: ({ children, className, label, size }: OptgroupProps) => React.JSX.Element;
|
|
5
5
|
export { Optgroup };
|
|
@@ -10,5 +10,6 @@ const PickerButtonResponsive = forwardRef(({ OptionsList, onScroll, footer, swip
|
|
|
10
10
|
], 'desktop');
|
|
11
11
|
return view === 'desktop' ? (React.createElement(PickerButtonDesktop, { ref: ref, OptionsList: OptionsList, onScroll: onScroll, ...restProps })) : (React.createElement(PickerButtonMobile, { ref: ref, footer: footer, swipeable: swipeable, bottomSheetProps: bottomSheetProps, breakpoint: breakpoint, ...restProps }));
|
|
12
12
|
});
|
|
13
|
+
PickerButtonResponsive.displayName = 'PickerButtonResponsive';
|
|
13
14
|
|
|
14
15
|
export { PickerButtonResponsive };
|
|
@@ -5,7 +5,7 @@ import { BaseSelect, OptionsList, Optgroup } from '@alfalab/core-components-sele
|
|
|
5
5
|
import { Field } from '../field/Component.js';
|
|
6
6
|
import { Option } from '../option/Component.js';
|
|
7
7
|
|
|
8
|
-
const styles = {"container":"picker-
|
|
8
|
+
const styles = {"container":"picker-button__container_v95f5","optionsPopover":"picker-button__optionsPopover_v95f5","sideGap":"picker-button__sideGap_v95f5","option":"picker-button__option_v95f5"};
|
|
9
9
|
require('./../index.css')
|
|
10
10
|
|
|
11
11
|
const SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
|
|
@@ -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-cc406ff0";
|
|
6
6
|
import { PickerButtonSize, PickerButtonVariant } from "../types";
|
|
7
7
|
type FieldProps = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
8
8
|
buttonSize?: PickerButtonSize;
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { Button } from '@alfalab/core-components-button/modern';
|
|
4
4
|
import { getIcon } from '../utils/index.js';
|
|
5
5
|
|
|
6
|
-
const styles = {"iconContainer":"picker-
|
|
6
|
+
const styles = {"iconContainer":"picker-button__iconContainer_bkz5o","addonsContainer":"picker-button__addonsContainer_bkz5o","showControlIcon":"picker-button__showControlIcon_bkz5o","open":"picker-button__open_bkz5o","linkOpen":"picker-button__linkOpen_bkz5o"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const SIZE_TO_CLASSNAME_MAP = {
|
package/modern/field/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1pg5i */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-transparent-default-hover: rgba(38, 55, 88, 0.06); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
19
|
--arrow-transform: rotate(180deg);
|
|
20
|
-
} .picker-
|
|
20
|
+
} .picker-button__iconContainer_bkz5o {
|
|
21
21
|
display: flex;
|
|
22
22
|
transition: transform 0.15s ease-in-out;
|
|
23
|
-
} .picker-
|
|
23
|
+
} .picker-button__addonsContainer_bkz5o {
|
|
24
24
|
display: flex
|
|
25
|
-
} .picker-
|
|
25
|
+
} .picker-button__addonsContainer_bkz5o.picker-button__showControlIcon_bkz5o {
|
|
26
26
|
margin-right: var(--gap-2xs);
|
|
27
|
-
} .picker-
|
|
27
|
+
} .picker-button__open_bkz5o {
|
|
28
28
|
transform: var(--arrow-transform);
|
|
29
|
-
} .picker-
|
|
29
|
+
} .picker-button__linkOpen_bkz5o:not(:hover) {
|
|
30
30
|
background-color: var(--color-light-transparent-default-hover);
|
|
31
31
|
}
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 6sboy */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .picker-
|
|
19
|
+
} .picker-button__container_v95f5 {
|
|
20
20
|
min-width: auto;
|
|
21
|
-
} .cc-picker-button.picker-
|
|
21
|
+
} .cc-picker-button.picker-button__optionsPopover_v95f5.picker-button__sideGap_v95f5 {
|
|
22
22
|
padding: 0 var(--gap-xs);
|
|
23
|
-
} .cc-picker-button .picker-
|
|
23
|
+
} .cc-picker-button .picker-button__option_v95f5 {
|
|
24
24
|
padding: 0 var(--gap-m)
|
|
25
|
-
} .cc-picker-button .picker-
|
|
25
|
+
} .cc-picker-button .picker-button__option_v95f5:before {
|
|
26
26
|
/* Удаляем разделители у опций выпадающего списка. */
|
|
27
27
|
display: none;
|
|
28
28
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Option as Option$1 } from '@alfalab/core-components-select/modern/shared';
|
|
3
3
|
|
|
4
|
-
const styles = {"container":"picker-
|
|
4
|
+
const styles = {"container":"picker-button__container_1es76","icon":"picker-button__icon_1es76","content":"picker-button__content_1es76"};
|
|
5
5
|
require('./index.css')
|
|
6
6
|
|
|
7
7
|
const Option = ({ option, children, ...restProps }) => {
|
package/modern/option/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: wlteo */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
--gap-s: 12px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .picker-
|
|
18
|
+
} .picker-button__container_1es76 {
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
|
-
} .picker-
|
|
21
|
+
} .picker-button__icon_1es76 {
|
|
22
22
|
display: flex;
|
|
23
23
|
margin-right: var(--gap-s);
|
|
24
|
-
} .picker-
|
|
24
|
+
} .picker-button__content_1es76 {
|
|
25
25
|
overflow: hidden;
|
|
26
26
|
flex: 1;
|
|
27
27
|
text-overflow: ellipsis;
|
|
@@ -881,6 +881,14 @@ type OptionsListProps = {
|
|
|
881
881
|
* Указать индекс пункта для hover состояния
|
|
882
882
|
*/
|
|
883
883
|
setHighlightedIndex?: (index: number) => void;
|
|
884
|
+
/**
|
|
885
|
+
* Значение поиска
|
|
886
|
+
*/
|
|
887
|
+
search?: string;
|
|
888
|
+
/**
|
|
889
|
+
* Возможность выбрать несколько значений
|
|
890
|
+
*/
|
|
891
|
+
multiple?: boolean;
|
|
884
892
|
};
|
|
885
893
|
type OptgroupProps = {
|
|
886
894
|
/**
|
|
@@ -900,6 +908,26 @@ type OptgroupProps = {
|
|
|
900
908
|
* Дочерние элементы
|
|
901
909
|
*/
|
|
902
910
|
children?: ReactNode;
|
|
911
|
+
/**
|
|
912
|
+
* Список вариантов выбора в группе
|
|
913
|
+
*/
|
|
914
|
+
options?: OptionShape[];
|
|
915
|
+
/**
|
|
916
|
+
* Список выбранных вариантов в группе
|
|
917
|
+
*/
|
|
918
|
+
selectedItems?: OptionShape[];
|
|
919
|
+
/**
|
|
920
|
+
* Обработчик выбранных вариантов
|
|
921
|
+
*/
|
|
922
|
+
setSelectedItems?: (items: OptionShape[]) => void;
|
|
923
|
+
/**
|
|
924
|
+
* Значение поиска
|
|
925
|
+
*/
|
|
926
|
+
search?: string;
|
|
927
|
+
/**
|
|
928
|
+
* Возможность выбрать несколько значений
|
|
929
|
+
*/
|
|
930
|
+
multiple?: boolean;
|
|
903
931
|
};
|
|
904
932
|
type OptionProps = {
|
|
905
933
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-
|
|
2
|
+
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-cc406ff0";
|
|
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, }: {
|
package/option/Component.js
CHANGED
|
@@ -10,7 +10,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
12
|
|
|
13
|
-
var styles = {"container":"picker-
|
|
13
|
+
var styles = {"container":"picker-button__container_1es76","icon":"picker-button__icon_1es76","content":"picker-button__content_1es76"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
var Option = function (_a) {
|
package/option/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: wlteo */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
--gap-s: 12px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .picker-
|
|
18
|
+
} .picker-button__container_1es76 {
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
|
-
} .picker-
|
|
21
|
+
} .picker-button__icon_1es76 {
|
|
22
22
|
display: flex;
|
|
23
23
|
margin-right: var(--gap-s);
|
|
24
|
-
} .picker-
|
|
24
|
+
} .picker-button__content_1es76 {
|
|
25
25
|
overflow: hidden;
|
|
26
26
|
flex: 1;
|
|
27
27
|
text-overflow: ellipsis;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-picker-button",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.3",
|
|
4
4
|
"description": "Picker button component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@alfalab/core-components-button": "^11.4.
|
|
19
|
-
"@alfalab/core-components-select": "^17.
|
|
20
|
-
"@alfalab/core-components-popover": "^6.2.
|
|
18
|
+
"@alfalab/core-components-button": "^11.4.5",
|
|
19
|
+
"@alfalab/core-components-select": "^17.5.0",
|
|
20
|
+
"@alfalab/core-components-popover": "^6.2.2",
|
|
21
21
|
"@alfalab/hooks": "^1.13.0",
|
|
22
22
|
"@alfalab/icons-glyph": "^2.139.0",
|
|
23
23
|
"classnames": "^2.3.1",
|
|
@@ -881,6 +881,14 @@ type OptionsListProps = {
|
|
|
881
881
|
* Указать индекс пункта для hover состояния
|
|
882
882
|
*/
|
|
883
883
|
setHighlightedIndex?: (index: number) => void;
|
|
884
|
+
/**
|
|
885
|
+
* Значение поиска
|
|
886
|
+
*/
|
|
887
|
+
search?: string;
|
|
888
|
+
/**
|
|
889
|
+
* Возможность выбрать несколько значений
|
|
890
|
+
*/
|
|
891
|
+
multiple?: boolean;
|
|
884
892
|
};
|
|
885
893
|
type OptgroupProps = {
|
|
886
894
|
/**
|
|
@@ -900,6 +908,26 @@ type OptgroupProps = {
|
|
|
900
908
|
* Дочерние элементы
|
|
901
909
|
*/
|
|
902
910
|
children?: ReactNode;
|
|
911
|
+
/**
|
|
912
|
+
* Список вариантов выбора в группе
|
|
913
|
+
*/
|
|
914
|
+
options?: OptionShape[];
|
|
915
|
+
/**
|
|
916
|
+
* Список выбранных вариантов в группе
|
|
917
|
+
*/
|
|
918
|
+
selectedItems?: OptionShape[];
|
|
919
|
+
/**
|
|
920
|
+
* Обработчик выбранных вариантов
|
|
921
|
+
*/
|
|
922
|
+
setSelectedItems?: (items: OptionShape[]) => void;
|
|
923
|
+
/**
|
|
924
|
+
* Значение поиска
|
|
925
|
+
*/
|
|
926
|
+
search?: string;
|
|
927
|
+
/**
|
|
928
|
+
* Возможность выбрать несколько значений
|
|
929
|
+
*/
|
|
930
|
+
multiple?: boolean;
|
|
903
931
|
};
|
|
904
932
|
type OptionProps = {
|
|
905
933
|
/**
|
package/utils-89376c31.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-
|
|
2
|
+
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-cc406ff0";
|
|
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, }: {
|