@alfalab/core-components-picker-button 11.0.1 → 11.0.2
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.desktop.js +1 -1
- package/cssm/field/Component.js +5 -3
- package/cssm/field/index.module.css +4 -1
- package/esm/Component.desktop.js +1 -1
- package/esm/field/Component.js +6 -4
- package/esm/field/index.css +9 -6
- package/esm/index.css +5 -5
- package/esm/option/Component.js +1 -1
- package/esm/option/index.css +4 -4
- package/field/Component.js +6 -4
- package/field/index.css +9 -6
- package/index.css +5 -5
- package/modern/Component.desktop.js +1 -1
- package/modern/field/Component.js +4 -2
- package/modern/field/index.css +9 -6
- package/modern/index.css +5 -5
- package/modern/option/Component.js +1 -1
- package/modern/option/index.css +4 -4
- package/option/Component.js +1 -1
- package/option/index.css +4 -4
- package/package.json +3 -3
- package/src/field/Component.tsx +3 -1
- package/src/field/index.module.css +4 -0
package/Component.desktop.js
CHANGED
|
@@ -20,7 +20,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
20
20
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
21
21
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
22
22
|
|
|
23
|
-
var styles = {"container":"picker-
|
|
23
|
+
var styles = {"container":"picker-button__container_6uojz","optionsPopover":"picker-button__optionsPopover_6uojz","sideGap":"picker-button__sideGap_6uojz","option":"picker-button__option_6uojz"};
|
|
24
24
|
require('./index.css')
|
|
25
25
|
|
|
26
26
|
var SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
|
package/cssm/field/Component.js
CHANGED
|
@@ -20,8 +20,8 @@ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
|
20
20
|
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
21
21
|
|
|
22
22
|
var Field = function (_a) {
|
|
23
|
-
var _b;
|
|
24
|
-
var
|
|
23
|
+
var _b, _c;
|
|
24
|
+
var _d = _a.buttonSize, buttonSize = _d === void 0 ? 'm' : _d, _e = _a.buttonVariant, buttonVariant = _e === void 0 ? 'default' : _e, view = _a.view, label = _a.label, open = _a.open; _a.multiple; var rightAddons = _a.rightAddons; _a.Arrow; var innerProps = _a.innerProps, className = _a.className; _a.selected; _a.selectedMultiple; _a.setSelectedItems; _a.toggleMenu; _a.valueRenderer; var _f = _a.showArrow, showArrow = _f === void 0 ? true : _f; _a.labelView; var restProps = tslib.__rest(_a, ["buttonSize", "buttonVariant", "view", "label", "open", "multiple", "rightAddons", "Arrow", "innerProps", "className", "selected", "selectedMultiple", "setSelectedItems", "toggleMenu", "valueRenderer", "showArrow", "labelView"]);
|
|
25
25
|
var Icon = utils_index.getIcon(buttonVariant, buttonSize);
|
|
26
26
|
var ref = innerProps.ref, restInnerProps = tslib.__rest(innerProps, ["ref"]);
|
|
27
27
|
var buttonProps = tslib.__assign(tslib.__assign({}, restProps), restInnerProps);
|
|
@@ -31,7 +31,9 @@ var Field = function (_a) {
|
|
|
31
31
|
_b[styles__default.default.showControlIcon] = showArrow || buttonVariant === 'compact',
|
|
32
32
|
_b)) }, rightAddons)),
|
|
33
33
|
(showArrow || buttonVariant === 'compact') && (React__default.default.createElement("span", { className: cn__default.default(styles__default.default.iconContainer, buttonVariant !== 'compact' && open && styles__default.default.open) },
|
|
34
|
-
React__default.default.createElement(Icon, { "data-test-id": 'picker-button-icon' })))), block: true, view: view, size: buttonSize, className: cn__default.default(
|
|
34
|
+
React__default.default.createElement(Icon, { "data-test-id": 'picker-button-icon' })))), block: true, view: view, size: buttonSize, className: cn__default.default(className, (_c = {},
|
|
35
|
+
_c[styles__default.default.linkOpen] = view === 'link' && open,
|
|
36
|
+
_c)) }), buttonVariant !== 'compact' && label)));
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
exports.Field = Field;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
} /* deprecated */ :root {
|
|
2
|
+
} /* deprecated */ :root {
|
|
3
|
+
--color-light-specialbg-secondary-transparent: rgba(11, 31, 53, 0.05); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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
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 */
|
|
4
5
|
} :root {
|
|
5
6
|
} :root {
|
|
@@ -24,4 +25,6 @@
|
|
|
24
25
|
margin-right: var(--gap-2xs);
|
|
25
26
|
} .open {
|
|
26
27
|
transform: var(--arrow-transform);
|
|
28
|
+
} .linkOpen:not(:hover) {
|
|
29
|
+
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
27
30
|
}
|
package/esm/Component.desktop.js
CHANGED
|
@@ -11,7 +11,7 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
|
11
11
|
import '@alfalab/icons-glyph/MoreMIcon';
|
|
12
12
|
import '@alfalab/icons-glyph/MoreSIcon';
|
|
13
13
|
|
|
14
|
-
var styles = {"container":"picker-
|
|
14
|
+
var styles = {"container":"picker-button__container_6uojz","optionsPopover":"picker-button__optionsPopover_6uojz","sideGap":"picker-button__sideGap_6uojz","option":"picker-button__option_6uojz"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
|
package/esm/field/Component.js
CHANGED
|
@@ -8,12 +8,12 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
|
8
8
|
import '@alfalab/icons-glyph/MoreMIcon';
|
|
9
9
|
import '@alfalab/icons-glyph/MoreSIcon';
|
|
10
10
|
|
|
11
|
-
var styles = {"iconContainer":"picker-
|
|
11
|
+
var styles = {"iconContainer":"picker-button__iconContainer_1gp9v","addonsContainer":"picker-button__addonsContainer_1gp9v","showControlIcon":"picker-button__showControlIcon_1gp9v","open":"picker-button__open_1gp9v","linkOpen":"picker-button__linkOpen_1gp9v"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
var Field = function (_a) {
|
|
15
|
-
var _b;
|
|
16
|
-
var
|
|
15
|
+
var _b, _c;
|
|
16
|
+
var _d = _a.buttonSize, buttonSize = _d === void 0 ? 'm' : _d, _e = _a.buttonVariant, buttonVariant = _e === void 0 ? 'default' : _e, view = _a.view, label = _a.label, open = _a.open; _a.multiple; var rightAddons = _a.rightAddons; _a.Arrow; var innerProps = _a.innerProps, className = _a.className; _a.selected; _a.selectedMultiple; _a.setSelectedItems; _a.toggleMenu; _a.valueRenderer; var _f = _a.showArrow, showArrow = _f === void 0 ? true : _f; _a.labelView; var restProps = __rest(_a, ["buttonSize", "buttonVariant", "view", "label", "open", "multiple", "rightAddons", "Arrow", "innerProps", "className", "selected", "selectedMultiple", "setSelectedItems", "toggleMenu", "valueRenderer", "showArrow", "labelView"]);
|
|
17
17
|
var Icon = getIcon(buttonVariant, buttonSize);
|
|
18
18
|
var ref = innerProps.ref, restInnerProps = __rest(innerProps, ["ref"]);
|
|
19
19
|
var buttonProps = __assign(__assign({}, restProps), restInnerProps);
|
|
@@ -23,7 +23,9 @@ var Field = function (_a) {
|
|
|
23
23
|
_b[styles.showControlIcon] = showArrow || buttonVariant === 'compact',
|
|
24
24
|
_b)) }, rightAddons)),
|
|
25
25
|
(showArrow || buttonVariant === 'compact') && (React.createElement("span", { className: cn(styles.iconContainer, buttonVariant !== 'compact' && open && styles.open) },
|
|
26
|
-
React.createElement(Icon, { "data-test-id": 'picker-button-icon' })))), block: true, view: view, size: buttonSize, className: cn(
|
|
26
|
+
React.createElement(Icon, { "data-test-id": 'picker-button-icon' })))), block: true, view: view, size: buttonSize, className: cn(className, (_c = {},
|
|
27
|
+
_c[styles.linkOpen] = view === 'link' && open,
|
|
28
|
+
_c)) }), buttonVariant !== 'compact' && label)));
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
export { Field };
|
package/esm/field/index.css
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: udizb */
|
|
2
2
|
:root {
|
|
3
|
-
} /* deprecated */ :root {
|
|
3
|
+
} /* deprecated */ :root {
|
|
4
|
+
--color-light-specialbg-secondary-transparent: rgba(11, 31, 53, 0.05); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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
5
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
6
|
} :root {
|
|
6
7
|
} :root {
|
|
@@ -16,13 +17,15 @@
|
|
|
16
17
|
} :root {
|
|
17
18
|
} :root {
|
|
18
19
|
--arrow-transform: rotate(180deg);
|
|
19
|
-
} .picker-
|
|
20
|
+
} .picker-button__iconContainer_1gp9v {
|
|
20
21
|
display: flex;
|
|
21
22
|
transition: transform 0.15s ease-in-out;
|
|
22
|
-
} .picker-
|
|
23
|
+
} .picker-button__addonsContainer_1gp9v {
|
|
23
24
|
display: flex
|
|
24
|
-
} .picker-
|
|
25
|
+
} .picker-button__addonsContainer_1gp9v.picker-button__showControlIcon_1gp9v {
|
|
25
26
|
margin-right: var(--gap-2xs);
|
|
26
|
-
} .picker-
|
|
27
|
+
} .picker-button__open_1gp9v {
|
|
27
28
|
transform: var(--arrow-transform);
|
|
29
|
+
} .picker-button__linkOpen_1gp9v:not(:hover) {
|
|
30
|
+
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
28
31
|
}
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 8vwun */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .picker-
|
|
19
|
+
} .picker-button__container_6uojz {
|
|
20
20
|
min-width: auto;
|
|
21
|
-
} .cc-picker-button.picker-
|
|
21
|
+
} .cc-picker-button.picker-button__optionsPopover_6uojz.picker-button__sideGap_6uojz {
|
|
22
22
|
padding: 0 var(--gap-xs);
|
|
23
|
-
} .cc-picker-button .picker-
|
|
23
|
+
} .cc-picker-button .picker-button__option_6uojz {
|
|
24
24
|
padding: 0 var(--gap-m)
|
|
25
|
-
} .cc-picker-button .picker-
|
|
25
|
+
} .cc-picker-button .picker-button__option_6uojz: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_1s66d","icon":"picker-button__icon_1s66d","content":"picker-button__content_1s66d"};
|
|
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: 1m2s8 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
--gap-s: 12px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .picker-
|
|
18
|
+
} .picker-button__container_1s66d {
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
|
-
} .picker-
|
|
21
|
+
} .picker-button__icon_1s66d {
|
|
22
22
|
display: flex;
|
|
23
23
|
margin-right: var(--gap-s);
|
|
24
|
-
} .picker-
|
|
24
|
+
} .picker-button__content_1s66d {
|
|
25
25
|
overflow: hidden;
|
|
26
26
|
flex: 1;
|
|
27
27
|
text-overflow: ellipsis;
|
package/field/Component.js
CHANGED
|
@@ -17,12 +17,12 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
18
18
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
19
|
|
|
20
|
-
var styles = {"iconContainer":"picker-
|
|
20
|
+
var styles = {"iconContainer":"picker-button__iconContainer_1gp9v","addonsContainer":"picker-button__addonsContainer_1gp9v","showControlIcon":"picker-button__showControlIcon_1gp9v","open":"picker-button__open_1gp9v","linkOpen":"picker-button__linkOpen_1gp9v"};
|
|
21
21
|
require('./index.css')
|
|
22
22
|
|
|
23
23
|
var Field = function (_a) {
|
|
24
|
-
var _b;
|
|
25
|
-
var
|
|
24
|
+
var _b, _c;
|
|
25
|
+
var _d = _a.buttonSize, buttonSize = _d === void 0 ? 'm' : _d, _e = _a.buttonVariant, buttonVariant = _e === void 0 ? 'default' : _e, view = _a.view, label = _a.label, open = _a.open; _a.multiple; var rightAddons = _a.rightAddons; _a.Arrow; var innerProps = _a.innerProps, className = _a.className; _a.selected; _a.selectedMultiple; _a.setSelectedItems; _a.toggleMenu; _a.valueRenderer; var _f = _a.showArrow, showArrow = _f === void 0 ? true : _f; _a.labelView; var restProps = tslib.__rest(_a, ["buttonSize", "buttonVariant", "view", "label", "open", "multiple", "rightAddons", "Arrow", "innerProps", "className", "selected", "selectedMultiple", "setSelectedItems", "toggleMenu", "valueRenderer", "showArrow", "labelView"]);
|
|
26
26
|
var Icon = utils_index.getIcon(buttonVariant, buttonSize);
|
|
27
27
|
var ref = innerProps.ref, restInnerProps = tslib.__rest(innerProps, ["ref"]);
|
|
28
28
|
var buttonProps = tslib.__assign(tslib.__assign({}, restProps), restInnerProps);
|
|
@@ -32,7 +32,9 @@ var Field = function (_a) {
|
|
|
32
32
|
_b[styles.showControlIcon] = showArrow || buttonVariant === 'compact',
|
|
33
33
|
_b)) }, rightAddons)),
|
|
34
34
|
(showArrow || buttonVariant === 'compact') && (React__default.default.createElement("span", { className: cn__default.default(styles.iconContainer, buttonVariant !== 'compact' && open && styles.open) },
|
|
35
|
-
React__default.default.createElement(Icon, { "data-test-id": 'picker-button-icon' })))), block: true, view: view, size: buttonSize, className: cn__default.default(
|
|
35
|
+
React__default.default.createElement(Icon, { "data-test-id": 'picker-button-icon' })))), block: true, view: view, size: buttonSize, className: cn__default.default(className, (_c = {},
|
|
36
|
+
_c[styles.linkOpen] = view === 'link' && open,
|
|
37
|
+
_c)) }), buttonVariant !== 'compact' && label)));
|
|
36
38
|
};
|
|
37
39
|
|
|
38
40
|
exports.Field = Field;
|
package/field/index.css
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: udizb */
|
|
2
2
|
:root {
|
|
3
|
-
} /* deprecated */ :root {
|
|
3
|
+
} /* deprecated */ :root {
|
|
4
|
+
--color-light-specialbg-secondary-transparent: rgba(11, 31, 53, 0.05); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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
5
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
6
|
} :root {
|
|
6
7
|
} :root {
|
|
@@ -16,13 +17,15 @@
|
|
|
16
17
|
} :root {
|
|
17
18
|
} :root {
|
|
18
19
|
--arrow-transform: rotate(180deg);
|
|
19
|
-
} .picker-
|
|
20
|
+
} .picker-button__iconContainer_1gp9v {
|
|
20
21
|
display: flex;
|
|
21
22
|
transition: transform 0.15s ease-in-out;
|
|
22
|
-
} .picker-
|
|
23
|
+
} .picker-button__addonsContainer_1gp9v {
|
|
23
24
|
display: flex
|
|
24
|
-
} .picker-
|
|
25
|
+
} .picker-button__addonsContainer_1gp9v.picker-button__showControlIcon_1gp9v {
|
|
25
26
|
margin-right: var(--gap-2xs);
|
|
26
|
-
} .picker-
|
|
27
|
+
} .picker-button__open_1gp9v {
|
|
27
28
|
transform: var(--arrow-transform);
|
|
29
|
+
} .picker-button__linkOpen_1gp9v:not(:hover) {
|
|
30
|
+
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
28
31
|
}
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 8vwun */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .picker-
|
|
19
|
+
} .picker-button__container_6uojz {
|
|
20
20
|
min-width: auto;
|
|
21
|
-
} .cc-picker-button.picker-
|
|
21
|
+
} .cc-picker-button.picker-button__optionsPopover_6uojz.picker-button__sideGap_6uojz {
|
|
22
22
|
padding: 0 var(--gap-xs);
|
|
23
|
-
} .cc-picker-button .picker-
|
|
23
|
+
} .cc-picker-button .picker-button__option_6uojz {
|
|
24
24
|
padding: 0 var(--gap-m)
|
|
25
|
-
} .cc-picker-button .picker-
|
|
25
|
+
} .cc-picker-button .picker-button__option_6uojz:before {
|
|
26
26
|
/* Удаляем разделители у опций выпадающего списка. */
|
|
27
27
|
display: none;
|
|
28
28
|
}
|
|
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
|
10
10
|
import '@alfalab/icons-glyph/MoreMIcon';
|
|
11
11
|
import '@alfalab/icons-glyph/MoreSIcon';
|
|
12
12
|
|
|
13
|
-
const styles = {"container":"picker-
|
|
13
|
+
const styles = {"container":"picker-button__container_6uojz","optionsPopover":"picker-button__optionsPopover_6uojz","sideGap":"picker-button__sideGap_6uojz","option":"picker-button__option_6uojz"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
const SIDE_POSITIONS = ['right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'];
|
|
@@ -7,7 +7,7 @@ import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
|
7
7
|
import '@alfalab/icons-glyph/MoreMIcon';
|
|
8
8
|
import '@alfalab/icons-glyph/MoreSIcon';
|
|
9
9
|
|
|
10
|
-
const styles = {"iconContainer":"picker-
|
|
10
|
+
const styles = {"iconContainer":"picker-button__iconContainer_1gp9v","addonsContainer":"picker-button__addonsContainer_1gp9v","showControlIcon":"picker-button__showControlIcon_1gp9v","open":"picker-button__open_1gp9v","linkOpen":"picker-button__linkOpen_1gp9v"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
const Field = ({ buttonSize = 'm', buttonVariant = 'default', view, label, open, multiple, rightAddons, Arrow, innerProps, className, selected, selectedMultiple, setSelectedItems, toggleMenu, valueRenderer, showArrow = true, labelView, ...restProps }) => {
|
|
@@ -23,7 +23,9 @@ const Field = ({ buttonSize = 'm', buttonVariant = 'default', view, label, open,
|
|
|
23
23
|
[styles.showControlIcon]: showArrow || buttonVariant === 'compact',
|
|
24
24
|
}) }, rightAddons)),
|
|
25
25
|
(showArrow || buttonVariant === 'compact') && (React.createElement("span", { className: cn(styles.iconContainer, buttonVariant !== 'compact' && open && styles.open) },
|
|
26
|
-
React.createElement(Icon, { "data-test-id": 'picker-button-icon' })))), block: true, view: view, size: buttonSize, className: cn(
|
|
26
|
+
React.createElement(Icon, { "data-test-id": 'picker-button-icon' })))), block: true, view: view, size: buttonSize, className: cn(className, {
|
|
27
|
+
[styles.linkOpen]: view === 'link' && open,
|
|
28
|
+
}) }, buttonVariant !== 'compact' && label)));
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
export { Field };
|
package/modern/field/index.css
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: udizb */
|
|
2
2
|
:root {
|
|
3
|
-
} /* deprecated */ :root {
|
|
3
|
+
} /* deprecated */ :root {
|
|
4
|
+
--color-light-specialbg-secondary-transparent: rgba(11, 31, 53, 0.05); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* 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
5
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
5
6
|
} :root {
|
|
6
7
|
} :root {
|
|
@@ -16,13 +17,15 @@
|
|
|
16
17
|
} :root {
|
|
17
18
|
} :root {
|
|
18
19
|
--arrow-transform: rotate(180deg);
|
|
19
|
-
} .picker-
|
|
20
|
+
} .picker-button__iconContainer_1gp9v {
|
|
20
21
|
display: flex;
|
|
21
22
|
transition: transform 0.15s ease-in-out;
|
|
22
|
-
} .picker-
|
|
23
|
+
} .picker-button__addonsContainer_1gp9v {
|
|
23
24
|
display: flex
|
|
24
|
-
} .picker-
|
|
25
|
+
} .picker-button__addonsContainer_1gp9v.picker-button__showControlIcon_1gp9v {
|
|
25
26
|
margin-right: var(--gap-2xs);
|
|
26
|
-
} .picker-
|
|
27
|
+
} .picker-button__open_1gp9v {
|
|
27
28
|
transform: var(--arrow-transform);
|
|
29
|
+
} .picker-button__linkOpen_1gp9v:not(:hover) {
|
|
30
|
+
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
28
31
|
}
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 8vwun */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .picker-
|
|
19
|
+
} .picker-button__container_6uojz {
|
|
20
20
|
min-width: auto;
|
|
21
|
-
} .cc-picker-button.picker-
|
|
21
|
+
} .cc-picker-button.picker-button__optionsPopover_6uojz.picker-button__sideGap_6uojz {
|
|
22
22
|
padding: 0 var(--gap-xs);
|
|
23
|
-
} .cc-picker-button .picker-
|
|
23
|
+
} .cc-picker-button .picker-button__option_6uojz {
|
|
24
24
|
padding: 0 var(--gap-m)
|
|
25
|
-
} .cc-picker-button .picker-
|
|
25
|
+
} .cc-picker-button .picker-button__option_6uojz: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_1s66d","icon":"picker-button__icon_1s66d","content":"picker-button__content_1s66d"};
|
|
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: 1m2s8 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
--gap-s: 12px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .picker-
|
|
18
|
+
} .picker-button__container_1s66d {
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
|
-
} .picker-
|
|
21
|
+
} .picker-button__icon_1s66d {
|
|
22
22
|
display: flex;
|
|
23
23
|
margin-right: var(--gap-s);
|
|
24
|
-
} .picker-
|
|
24
|
+
} .picker-button__content_1s66d {
|
|
25
25
|
overflow: hidden;
|
|
26
26
|
flex: 1;
|
|
27
27
|
text-overflow: ellipsis;
|
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_1s66d","icon":"picker-button__icon_1s66d","content":"picker-button__content_1s66d"};
|
|
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: 1m2s8 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
--gap-s: 12px;
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .picker-
|
|
18
|
+
} .picker-button__container_1s66d {
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
|
-
} .picker-
|
|
21
|
+
} .picker-button__icon_1s66d {
|
|
22
22
|
display: flex;
|
|
23
23
|
margin-right: var(--gap-s);
|
|
24
|
-
} .picker-
|
|
24
|
+
} .picker-button__content_1s66d {
|
|
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.0.
|
|
3
|
+
"version": "11.0.2",
|
|
4
4
|
"description": "Picker button component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@alfalab/core-components-button": "^9.0.
|
|
43
|
-
"@alfalab/core-components-select": "^15.0.
|
|
42
|
+
"@alfalab/core-components-button": "^9.0.2",
|
|
43
|
+
"@alfalab/core-components-select": "^15.0.2",
|
|
44
44
|
"@alfalab/hooks": "^1.13.0",
|
|
45
45
|
"@alfalab/icons-glyph": "^2.108.0",
|
|
46
46
|
"classnames": "^2.3.1",
|
package/src/field/Component.tsx
CHANGED
|
@@ -77,7 +77,9 @@ export const Field = ({
|
|
|
77
77
|
block={true}
|
|
78
78
|
view={view}
|
|
79
79
|
size={buttonSize}
|
|
80
|
-
className={cn(
|
|
80
|
+
className={cn(className, {
|
|
81
|
+
[styles.linkOpen]: view === 'link' && open,
|
|
82
|
+
})}
|
|
81
83
|
>
|
|
82
84
|
{buttonVariant !== 'compact' && label}
|
|
83
85
|
</Button>
|