@alfalab/core-components-picker-button 7.1.1 → 7.2.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.
- package/CHANGELOG.md +38 -0
- package/dist/{Component-9a3d00b9.d.ts → Component-2d26cd3f.d.ts} +16 -0
- package/dist/{Component-9a3d00b9.js → Component-2d26cd3f.js} +6 -4
- package/dist/Component.d.ts +1 -1
- package/dist/Component.js +2 -2
- package/dist/{esm/Component-472f5680.d.ts → cssm/Component-34f0d762.d.ts} +16 -0
- package/dist/cssm/{Component-c7d52094.js → Component-34f0d762.js} +5 -3
- package/dist/cssm/Component.js +1 -1
- package/dist/cssm/field/Component.js +1 -1
- package/dist/cssm/field/index.d.ts +1 -1
- package/dist/cssm/field/index.js +1 -1
- package/dist/cssm/index.js +1 -1
- package/dist/{cssm/Component-c7d52094.d.ts → esm/Component-003da863.d.ts} +16 -0
- package/dist/esm/{Component-472f5680.js → Component-003da863.js} +6 -4
- package/dist/esm/Component.js +2 -2
- package/dist/esm/field/Component.js +1 -1
- package/dist/esm/field/index.css +3 -3
- package/dist/esm/field/index.d.ts +1 -1
- package/dist/esm/field/index.js +1 -1
- package/dist/esm/index.css +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/field/Component.js +1 -1
- package/dist/field/index.css +3 -3
- package/dist/field/index.d.ts +1 -1
- package/dist/field/index.js +1 -1
- package/dist/index.css +2 -2
- package/dist/index.js +1 -1
- package/dist/modern/Component.js +1 -1
- package/dist/modern/field/Component.d.ts +16 -0
- package/dist/modern/field/Component.js +6 -4
- package/dist/modern/field/index.css +3 -3
- package/dist/modern/index.css +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [7.2.0](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-picker-button@7.1.4...@alfalab/core-components-picker-button@7.2.0) (2021-12-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **select:** чекбоксы в выпадашке множественного выбора [#903](https://github.com/alfa-laboratory/core-components/issues/903)) ([f5638ef](https://github.com/alfa-laboratory/core-components/commit/f5638ef589468de0dc0473d30871035d8c4efab5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [7.1.4](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-picker-button@7.1.3...@alfalab/core-components-picker-button@7.1.4) (2021-12-14)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **picker-button:** wrap field with div ([b51bce8](https://github.com/alfa-laboratory/core-components/commit/b51bce85b39583e7bb1107f56c6e64a6f2b96d5c)), closes [#914](https://github.com/alfa-laboratory/core-components/issues/914)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [7.1.3](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-picker-button@7.1.2...@alfalab/core-components-picker-button@7.1.3) (2021-12-08)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package @alfalab/core-components-picker-button
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [7.1.2](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-picker-button@7.1.1...@alfalab/core-components-picker-button@7.1.2) (2021-12-08)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @alfalab/core-components-picker-button
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
## [7.1.1](https://github.com/alfa-laboratory/core-components/compare/@alfalab/core-components-picker-button@7.1.0...@alfalab/core-components-picker-button@7.1.1) (2021-12-08)
|
|
7
45
|
|
|
8
46
|
**Note:** Version bump only for package @alfalab/core-components-picker-button
|
|
@@ -660,6 +660,10 @@ type OptionProps = {
|
|
|
660
660
|
* Флаг, заблокирован ли данный пункт
|
|
661
661
|
*/
|
|
662
662
|
disabled?: boolean;
|
|
663
|
+
/**
|
|
664
|
+
* Флаг множественного выбора
|
|
665
|
+
*/
|
|
666
|
+
multiple?: boolean;
|
|
663
667
|
/**
|
|
664
668
|
* Компонент пункта меню
|
|
665
669
|
*/
|
|
@@ -684,6 +688,18 @@ type CheckmarkProps = {
|
|
|
684
688
|
* Флаг, данный пункт выбран
|
|
685
689
|
*/
|
|
686
690
|
selected?: boolean;
|
|
691
|
+
/**
|
|
692
|
+
* Дополнительный класс
|
|
693
|
+
*/
|
|
694
|
+
className?: string;
|
|
695
|
+
/**
|
|
696
|
+
* Флаг множественного выбора
|
|
697
|
+
*/
|
|
698
|
+
multiple?: boolean;
|
|
699
|
+
/**
|
|
700
|
+
* Расположение отметки
|
|
701
|
+
*/
|
|
702
|
+
position?: "before" | "after";
|
|
687
703
|
};
|
|
688
704
|
/**
|
|
689
705
|
* Набор констант для z-index соответствующих классов компонентов.
|
|
@@ -50,15 +50,17 @@ function __rest(s, e) {
|
|
|
50
50
|
return t;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
var styles = {"iconContainer":"picker-
|
|
53
|
+
var styles = {"iconContainer":"picker-button__iconContainer_1wgjf","open":"picker-button__open_1wgjf"};
|
|
54
54
|
require('./field/index.css')
|
|
55
55
|
|
|
56
56
|
var Field = function (_a) {
|
|
57
57
|
var _b = _a.buttonSize, buttonSize = _b === void 0 ? 'm' : _b, view = _a.view, label = _a.label, open = _a.open, multiple = _a.multiple, rightAddons = _a.rightAddons, Arrow = _a.Arrow, innerProps = _a.innerProps, className = _a.className, selected = _a.selected, selectedMultiple = _a.selectedMultiple, valueRenderer = _a.valueRenderer, restProps = __rest(_a, ["buttonSize", "view", "label", "open", "multiple", "rightAddons", "Arrow", "innerProps", "className", "selected", "selectedMultiple", "valueRenderer"]);
|
|
58
58
|
var Icon = buttonSize === 'xs' ? ArrowDownSIcon.ArrowDownSIcon : ArrowDownMIcon.ArrowDownMIcon;
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
var ref = innerProps.ref, restInnerProps = __rest(innerProps, ["ref"]);
|
|
60
|
+
var buttonProps = exports.__assign(exports.__assign({}, restProps), restInnerProps);
|
|
61
|
+
return (React__default['default'].createElement("div", { ref: ref },
|
|
62
|
+
React__default['default'].createElement(coreComponentsButton.Button, exports.__assign({}, buttonProps, { rightAddons: React__default['default'].createElement("span", { className: cn__default['default'](styles.iconContainer, open && styles.open) },
|
|
63
|
+
React__default['default'].createElement(Icon, { "data-test-id": 'picker-button-icon' })), block: true, view: view, size: buttonSize, className: cn__default['default'](styles.component, view === 'primary' && styles.primary, className) }), label)));
|
|
62
64
|
};
|
|
63
65
|
|
|
64
66
|
exports.Field = Field;
|
package/dist/Component.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ type PickerButtonProps = Omit<BaseSelectProps, 'Field' | 'placeholder' | 'Arrow'
|
|
|
9
9
|
*/
|
|
10
10
|
size?: PickerButtonSize;
|
|
11
11
|
};
|
|
12
|
-
declare const PickerButton: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "className" | "dataTestId" | "label" | "block" | "id" | "onBlur" | "onChange" | "onScroll" | "disabled" | "name" | "
|
|
12
|
+
declare const PickerButton: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "className" | "dataTestId" | "label" | "block" | "id" | "onBlur" | "onChange" | "onScroll" | "disabled" | "name" | "fieldClassName" | "error" | "preventFlip" | "open" | "options" | "valueRenderer" | "Optgroup" | "visibleOptions" | "Option" | "optionsListClassName" | "optionClassName" | "circularNavigation" | "nativeSelect" | "defaultOpen" | "popoverPosition" | "optionsListWidth" | "optionsSize" | "optionsListProps" | "optionProps" | "onOpen" | "OptionsList" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & Pick<Partial<import("@alfalab/core-components-button").ComponentProps & React.AnchorHTMLAttributes<HTMLAnchorElement>> | Partial<import("@alfalab/core-components-button").ComponentProps & React.ButtonHTMLAttributes<HTMLButtonElement>>, "view" | "leftAddons" | "loading"> & {
|
|
13
13
|
/**
|
|
14
14
|
* Размер кнопки
|
|
15
15
|
*/
|
package/dist/Component.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var field_Component = require('./Component-
|
|
5
|
+
var field_Component = require('./Component-2d26cd3f.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var coreComponentsSelect = require('@alfalab/core-components-select');
|
|
@@ -15,7 +15,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
16
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
17
17
|
|
|
18
|
-
var styles = {"container":"picker-
|
|
18
|
+
var styles = {"container":"picker-button__container_1xbj0"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
var PickerButton = React.forwardRef(function (_a, ref) {
|
|
@@ -660,6 +660,10 @@ type OptionProps = {
|
|
|
660
660
|
* Флаг, заблокирован ли данный пункт
|
|
661
661
|
*/
|
|
662
662
|
disabled?: boolean;
|
|
663
|
+
/**
|
|
664
|
+
* Флаг множественного выбора
|
|
665
|
+
*/
|
|
666
|
+
multiple?: boolean;
|
|
663
667
|
/**
|
|
664
668
|
* Компонент пункта меню
|
|
665
669
|
*/
|
|
@@ -684,6 +688,18 @@ type CheckmarkProps = {
|
|
|
684
688
|
* Флаг, данный пункт выбран
|
|
685
689
|
*/
|
|
686
690
|
selected?: boolean;
|
|
691
|
+
/**
|
|
692
|
+
* Дополнительный класс
|
|
693
|
+
*/
|
|
694
|
+
className?: string;
|
|
695
|
+
/**
|
|
696
|
+
* Флаг множественного выбора
|
|
697
|
+
*/
|
|
698
|
+
multiple?: boolean;
|
|
699
|
+
/**
|
|
700
|
+
* Расположение отметки
|
|
701
|
+
*/
|
|
702
|
+
position?: "before" | "after";
|
|
687
703
|
};
|
|
688
704
|
/**
|
|
689
705
|
* Набор констант для z-index соответствующих классов компонентов.
|
|
@@ -55,9 +55,11 @@ function __rest(s, e) {
|
|
|
55
55
|
var Field = function (_a) {
|
|
56
56
|
var _b = _a.buttonSize, buttonSize = _b === void 0 ? 'm' : _b, view = _a.view, label = _a.label, open = _a.open, multiple = _a.multiple, rightAddons = _a.rightAddons, Arrow = _a.Arrow, innerProps = _a.innerProps, className = _a.className, selected = _a.selected, selectedMultiple = _a.selectedMultiple, valueRenderer = _a.valueRenderer, restProps = __rest(_a, ["buttonSize", "view", "label", "open", "multiple", "rightAddons", "Arrow", "innerProps", "className", "selected", "selectedMultiple", "valueRenderer"]);
|
|
57
57
|
var Icon = buttonSize === 'xs' ? ArrowDownSIcon.ArrowDownSIcon : ArrowDownMIcon.ArrowDownMIcon;
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
var ref = innerProps.ref, restInnerProps = __rest(innerProps, ["ref"]);
|
|
59
|
+
var buttonProps = exports.__assign(exports.__assign({}, restProps), restInnerProps);
|
|
60
|
+
return (React__default['default'].createElement("div", { ref: ref },
|
|
61
|
+
React__default['default'].createElement(coreComponentsButton.Button, exports.__assign({}, buttonProps, { rightAddons: React__default['default'].createElement("span", { className: cn__default['default'](styles__default['default'].iconContainer, open && styles__default['default'].open) },
|
|
62
|
+
React__default['default'].createElement(Icon, { "data-test-id": 'picker-button-icon' })), block: true, view: view, size: buttonSize, className: cn__default['default'](styles__default['default'].component, view === 'primary' && styles__default['default'].primary, className) }), label)));
|
|
61
63
|
};
|
|
62
64
|
|
|
63
65
|
exports.Field = Field;
|
package/dist/cssm/Component.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var field_Component = require('./Component-
|
|
5
|
+
var field_Component = require('./Component-34f0d762.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var coreComponentsSelect = require('@alfalab/core-components-select/dist/cssm');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var field_Component = require('../Component-
|
|
5
|
+
var field_Component = require('../Component-34f0d762.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('@alfalab/core-components-button/dist/cssm');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../Component-
|
|
1
|
+
export * from "../Component-34f0d762";
|
package/dist/cssm/field/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var field_Component = require('../Component-
|
|
5
|
+
var field_Component = require('../Component-34f0d762.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('@alfalab/core-components-button/dist/cssm');
|
package/dist/cssm/index.js
CHANGED
|
@@ -660,6 +660,10 @@ type OptionProps = {
|
|
|
660
660
|
* Флаг, заблокирован ли данный пункт
|
|
661
661
|
*/
|
|
662
662
|
disabled?: boolean;
|
|
663
|
+
/**
|
|
664
|
+
* Флаг множественного выбора
|
|
665
|
+
*/
|
|
666
|
+
multiple?: boolean;
|
|
663
667
|
/**
|
|
664
668
|
* Компонент пункта меню
|
|
665
669
|
*/
|
|
@@ -684,6 +688,18 @@ type CheckmarkProps = {
|
|
|
684
688
|
* Флаг, данный пункт выбран
|
|
685
689
|
*/
|
|
686
690
|
selected?: boolean;
|
|
691
|
+
/**
|
|
692
|
+
* Дополнительный класс
|
|
693
|
+
*/
|
|
694
|
+
className?: string;
|
|
695
|
+
/**
|
|
696
|
+
* Флаг множественного выбора
|
|
697
|
+
*/
|
|
698
|
+
multiple?: boolean;
|
|
699
|
+
/**
|
|
700
|
+
* Расположение отметки
|
|
701
|
+
*/
|
|
702
|
+
position?: "before" | "after";
|
|
687
703
|
};
|
|
688
704
|
/**
|
|
689
705
|
* Набор констант для z-index соответствующих классов компонентов.
|
|
@@ -43,15 +43,17 @@ function __rest(s, e) {
|
|
|
43
43
|
return t;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
var styles = {"iconContainer":"picker-
|
|
46
|
+
var styles = {"iconContainer":"picker-button__iconContainer_1wgjf","open":"picker-button__open_1wgjf"};
|
|
47
47
|
require('./field/index.css')
|
|
48
48
|
|
|
49
49
|
var Field = function (_a) {
|
|
50
50
|
var _b = _a.buttonSize, buttonSize = _b === void 0 ? 'm' : _b, view = _a.view, label = _a.label, open = _a.open, multiple = _a.multiple, rightAddons = _a.rightAddons, Arrow = _a.Arrow, innerProps = _a.innerProps, className = _a.className, selected = _a.selected, selectedMultiple = _a.selectedMultiple, valueRenderer = _a.valueRenderer, restProps = __rest(_a, ["buttonSize", "view", "label", "open", "multiple", "rightAddons", "Arrow", "innerProps", "className", "selected", "selectedMultiple", "valueRenderer"]);
|
|
51
51
|
var Icon = buttonSize === 'xs' ? ArrowDownSIcon : ArrowDownMIcon;
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
var ref = innerProps.ref, restInnerProps = __rest(innerProps, ["ref"]);
|
|
53
|
+
var buttonProps = __assign(__assign({}, restProps), restInnerProps);
|
|
54
|
+
return (React.createElement("div", { ref: ref },
|
|
55
|
+
React.createElement(Button, __assign({}, buttonProps, { rightAddons: React.createElement("span", { className: cn(styles.iconContainer, open && styles.open) },
|
|
56
|
+
React.createElement(Icon, { "data-test-id": 'picker-button-icon' })), block: true, view: view, size: buttonSize, className: cn(styles.component, view === 'primary' && styles.primary, className) }), label)));
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
export { Field as F, __rest as _, __assign as a };
|
package/dist/esm/Component.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign, F as Field } from './Component-
|
|
1
|
+
import { _ as __rest, a as __assign, F as Field } from './Component-003da863.js';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { BaseSelect, OptionsList, Optgroup, Option } from '@alfalab/core-components-select/dist/esm';
|
|
@@ -6,7 +6,7 @@ import '@alfalab/core-components-button/dist/esm';
|
|
|
6
6
|
import '@alfalab/icons-classic/ArrowDownMIcon';
|
|
7
7
|
import '@alfalab/icons-classic/ArrowDownSIcon';
|
|
8
8
|
|
|
9
|
-
var styles = {"container":"picker-
|
|
9
|
+
var styles = {"container":"picker-button__container_1xbj0"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
var PickerButton = forwardRef(function (_a, ref) {
|
package/dist/esm/field/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 4ucab */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
:root {
|
|
11
11
|
--arrow-transform: rotate(180deg);
|
|
12
12
|
}
|
|
13
|
-
.picker-
|
|
13
|
+
.picker-button__iconContainer_1wgjf {
|
|
14
14
|
display: flex;
|
|
15
15
|
transition: transform 0.15s ease-in-out;
|
|
16
16
|
}
|
|
17
|
-
.picker-
|
|
17
|
+
.picker-button__open_1wgjf {
|
|
18
18
|
transform: var(--arrow-transform);
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../Component-
|
|
1
|
+
export * from "../Component-003da863";
|
package/dist/esm/field/index.js
CHANGED
package/dist/esm/index.css
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/field/Component.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var field_Component = require('../Component-
|
|
5
|
+
var field_Component = require('../Component-2d26cd3f.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('@alfalab/core-components-button');
|
package/dist/field/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 4ucab */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
:root {
|
|
11
11
|
--arrow-transform: rotate(180deg);
|
|
12
12
|
}
|
|
13
|
-
.picker-
|
|
13
|
+
.picker-button__iconContainer_1wgjf {
|
|
14
14
|
display: flex;
|
|
15
15
|
transition: transform 0.15s ease-in-out;
|
|
16
16
|
}
|
|
17
|
-
.picker-
|
|
17
|
+
.picker-button__open_1wgjf {
|
|
18
18
|
transform: var(--arrow-transform);
|
|
19
19
|
}
|
package/dist/field/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../Component-
|
|
1
|
+
export * from "../Component-2d26cd3f";
|
package/dist/field/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var field_Component = require('../Component-
|
|
5
|
+
var field_Component = require('../Component-2d26cd3f.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('@alfalab/core-components-button');
|
package/dist/index.css
CHANGED
package/dist/index.js
CHANGED
package/dist/modern/Component.js
CHANGED
|
@@ -6,7 +6,7 @@ import '@alfalab/icons-classic/ArrowDownMIcon';
|
|
|
6
6
|
import '@alfalab/icons-classic/ArrowDownSIcon';
|
|
7
7
|
import { Field } from './field/Component.js';
|
|
8
8
|
|
|
9
|
-
var styles = {"container":"picker-
|
|
9
|
+
var styles = {"container":"picker-button__container_1xbj0"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
const PickerButton = forwardRef(({ OptionsList: OptionsList$1 = OptionsList, Optgroup: Optgroup$1 = Optgroup, Option: Option$1 = Option, view, loading, size = 'm', className, leftAddons, ...restProps }, ref) => (React.createElement(BaseSelect, Object.assign({}, restProps, { ref: ref, Option: Option$1, Field: Field, size: size === 'm' ? 'm' : 's', fieldProps: {
|
|
@@ -629,6 +629,10 @@ type OptionProps = {
|
|
|
629
629
|
* Флаг, заблокирован ли данный пункт
|
|
630
630
|
*/
|
|
631
631
|
disabled?: boolean;
|
|
632
|
+
/**
|
|
633
|
+
* Флаг множественного выбора
|
|
634
|
+
*/
|
|
635
|
+
multiple?: boolean;
|
|
632
636
|
/**
|
|
633
637
|
* Компонент пункта меню
|
|
634
638
|
*/
|
|
@@ -653,6 +657,18 @@ type CheckmarkProps = {
|
|
|
653
657
|
* Флаг, данный пункт выбран
|
|
654
658
|
*/
|
|
655
659
|
selected?: boolean;
|
|
660
|
+
/**
|
|
661
|
+
* Дополнительный класс
|
|
662
|
+
*/
|
|
663
|
+
className?: string;
|
|
664
|
+
/**
|
|
665
|
+
* Флаг множественного выбора
|
|
666
|
+
*/
|
|
667
|
+
multiple?: boolean;
|
|
668
|
+
/**
|
|
669
|
+
* Расположение отметки
|
|
670
|
+
*/
|
|
671
|
+
position?: "before" | "after";
|
|
656
672
|
};
|
|
657
673
|
type BaseFieldProps = FieldProps;
|
|
658
674
|
type FieldProps$0 = Omit<BaseFieldProps, 'size' | 'hint' | 'success' | 'error' | 'placeholder'> & ButtonProps & {
|
|
@@ -4,17 +4,19 @@ import { Button } from '@alfalab/core-components-button/dist/modern';
|
|
|
4
4
|
import { ArrowDownMIcon } from '@alfalab/icons-classic/ArrowDownMIcon';
|
|
5
5
|
import { ArrowDownSIcon } from '@alfalab/icons-classic/ArrowDownSIcon';
|
|
6
6
|
|
|
7
|
-
var styles = {"iconContainer":"picker-
|
|
7
|
+
var styles = {"iconContainer":"picker-button__iconContainer_1wgjf","open":"picker-button__open_1wgjf"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
const Field = ({ buttonSize = 'm', view, label, open, multiple, rightAddons, Arrow, innerProps, className, selected, selectedMultiple, valueRenderer, ...restProps }) => {
|
|
11
11
|
const Icon = buttonSize === 'xs' ? ArrowDownSIcon : ArrowDownMIcon;
|
|
12
|
+
const { ref, ...restInnerProps } = innerProps;
|
|
12
13
|
const buttonProps = {
|
|
13
14
|
...restProps,
|
|
14
|
-
...
|
|
15
|
+
...restInnerProps,
|
|
15
16
|
};
|
|
16
|
-
return (React.createElement(
|
|
17
|
-
|
|
17
|
+
return (React.createElement("div", { ref: ref },
|
|
18
|
+
React.createElement(Button, Object.assign({}, buttonProps, { rightAddons: React.createElement("span", { className: cn(styles.iconContainer, open && styles.open) },
|
|
19
|
+
React.createElement(Icon, { "data-test-id": 'picker-button-icon' })), block: true, view: view, size: buttonSize, className: cn(styles.component, view === 'primary' && styles.primary, className) }), label)));
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
export { Field };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 4ucab */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
:root {
|
|
11
11
|
--arrow-transform: rotate(180deg);
|
|
12
12
|
}
|
|
13
|
-
.picker-
|
|
13
|
+
.picker-button__iconContainer_1wgjf {
|
|
14
14
|
display: flex;
|
|
15
15
|
transition: transform 0.15s ease-in-out;
|
|
16
16
|
}
|
|
17
|
-
.picker-
|
|
17
|
+
.picker-button__open_1wgjf {
|
|
18
18
|
transform: var(--arrow-transform);
|
|
19
19
|
}
|
package/dist/modern/index.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-picker-button",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Picker button component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"react-dom": "^16.9.0 || ^17.0.1"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@alfalab/core-components-button": "^5.0.
|
|
23
|
-
"@alfalab/core-components-select": "^10.
|
|
22
|
+
"@alfalab/core-components-button": "^5.0.3",
|
|
23
|
+
"@alfalab/core-components-select": "^10.3.0",
|
|
24
24
|
"@alfalab/icons-classic": "^1.76.0",
|
|
25
25
|
"@alfalab/icons-glyph": "^1.190.0",
|
|
26
26
|
"classnames": "^2.2.6"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "94999e533968aa575e92106dffa8bbbb8e7ac71d"
|
|
29
29
|
}
|