@salutejs/plasma-new-hope 0.88.0-canary.1233.9420319803.0 → 0.88.0-canary.1233.9437372350.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Chip/Chip.css +5 -5
- package/cjs/components/Chip/Chip.styles.js +1 -1
- package/cjs/components/Chip/Chip.styles.js.map +1 -1
- package/cjs/components/Chip/{Chip.styles_1l2rsrr.css → Chip.styles_1mwwhiw.css} +1 -1
- package/cjs/components/Combobox/Combobox.css +5 -5
- package/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.css +5 -5
- package/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.css +5 -5
- package/cjs/components/Pagination/Pagination.css +10 -11
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +10 -11
- package/cjs/components/Range/Range.css +5 -5
- package/cjs/components/Select/Select.css +10 -11
- package/cjs/components/Select/Select.js +10 -6
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/Select.styles.js +2 -0
- package/cjs/components/Select/Select.styles.js.map +1 -1
- package/cjs/components/Select/elements/Inner/Inner.css +10 -11
- package/cjs/components/Select/elements/Inner/Inner.js +7 -2
- package/cjs/components/Select/elements/Inner/Inner.js.map +1 -1
- package/cjs/components/Select/elements/Inner/elements/Item/Item.css +10 -11
- package/cjs/components/Select/elements/Inner/elements/Item/Item.js +17 -6
- package/cjs/components/Select/elements/Inner/elements/Item/Item.js.map +1 -1
- package/cjs/components/Select/elements/Target/Target.css +10 -11
- package/cjs/components/Select/elements/Target/Target.js +9 -3
- package/cjs/components/Select/elements/Target/Target.js.map +1 -1
- package/cjs/components/Select/elements/Target/elements/Button/Button.css +5 -6
- package/cjs/components/Select/elements/Target/elements/Button/Button.js +28 -32
- package/cjs/components/Select/elements/Target/elements/Button/Button.js.map +1 -1
- package/cjs/components/Select/elements/Target/elements/Button/Button.styles.js +2 -8
- package/cjs/components/Select/elements/Target/elements/Button/Button.styles.js.map +1 -1
- package/cjs/components/Select/elements/Target/elements/Button/{Button.styles_1bweq1y.css → Button.styles_1r519o1.css} +1 -2
- package/cjs/components/Select/elements/Target/elements/Textfield/Textfield.css +5 -5
- package/cjs/components/Select/elements/Target/elements/Textfield/Textfield.js +25 -7
- package/cjs/components/Select/elements/Target/elements/Textfield/Textfield.js.map +1 -1
- package/cjs/components/Select/elements/Target/elements/Textfield/elements/Chip/Chip.css +5 -5
- package/cjs/components/Select/hooks/useKeyboardNavigation.js +2 -2
- package/cjs/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
- package/cjs/components/Select/utils/getButtonLabel.js +47 -0
- package/cjs/components/Select/utils/getButtonLabel.js.map +1 -0
- package/cjs/components/Slider/Slider.css +5 -5
- package/cjs/components/Slider/components/Double/Double.css +5 -5
- package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.css +5 -5
- package/cjs/index.css +10 -11
- package/es/components/Chip/Chip.css +5 -5
- package/es/components/Chip/Chip.styles.js +1 -1
- package/es/components/Chip/Chip.styles.js.map +1 -1
- package/es/components/Chip/{Chip.styles_1l2rsrr.css → Chip.styles_1mwwhiw.css} +1 -1
- package/es/components/Combobox/Combobox.css +5 -5
- package/es/components/Combobox/ui/ComboboxChip/ComboboxChip.css +5 -5
- package/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.css +5 -5
- package/es/components/Pagination/Pagination.css +10 -11
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +10 -11
- package/es/components/Range/Range.css +5 -5
- package/es/components/Select/Select.css +10 -11
- package/es/components/Select/Select.js +10 -6
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/Select.styles.js +2 -0
- package/es/components/Select/Select.styles.js.map +1 -1
- package/es/components/Select/elements/Inner/Inner.css +10 -11
- package/es/components/Select/elements/Inner/Inner.js +7 -2
- package/es/components/Select/elements/Inner/Inner.js.map +1 -1
- package/es/components/Select/elements/Inner/elements/Item/Item.css +10 -11
- package/es/components/Select/elements/Inner/elements/Item/Item.js +17 -6
- package/es/components/Select/elements/Inner/elements/Item/Item.js.map +1 -1
- package/es/components/Select/elements/Target/Target.css +10 -11
- package/es/components/Select/elements/Target/Target.js +9 -3
- package/es/components/Select/elements/Target/Target.js.map +1 -1
- package/es/components/Select/elements/Target/elements/Button/Button.css +5 -6
- package/es/components/Select/elements/Target/elements/Button/Button.js +29 -33
- package/es/components/Select/elements/Target/elements/Button/Button.js.map +1 -1
- package/es/components/Select/elements/Target/elements/Button/Button.styles.js +3 -8
- package/es/components/Select/elements/Target/elements/Button/Button.styles.js.map +1 -1
- package/es/components/Select/elements/Target/elements/Button/{Button.styles_1bweq1y.css → Button.styles_1r519o1.css} +1 -2
- package/es/components/Select/elements/Target/elements/Textfield/Textfield.css +5 -5
- package/es/components/Select/elements/Target/elements/Textfield/Textfield.js +25 -7
- package/es/components/Select/elements/Target/elements/Textfield/Textfield.js.map +1 -1
- package/es/components/Select/elements/Target/elements/Textfield/elements/Chip/Chip.css +5 -5
- package/es/components/Select/hooks/useKeyboardNavigation.js +2 -2
- package/es/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
- package/es/components/Select/utils/getButtonLabel.js +43 -0
- package/es/components/Select/utils/getButtonLabel.js.map +1 -0
- package/es/components/Slider/Slider.css +5 -5
- package/es/components/Slider/components/Double/Double.css +5 -5
- package/es/components/TextField/ui/TextFieldChip/TextFieldChip.css +5 -5
- package/es/index.css +10 -11
- package/package.json +2 -2
- package/styled-components/cjs/components/Chip/Chip.styles.js +1 -1
- package/styled-components/cjs/components/Select/Select.js +20 -16
- package/styled-components/cjs/components/Select/elements/Inner/Inner.js +7 -2
- package/styled-components/cjs/components/Select/elements/Inner/elements/Item/Item.js +16 -5
- package/styled-components/cjs/components/Select/elements/Target/Target.js +9 -3
- package/styled-components/cjs/components/Select/elements/Target/elements/Button/Button.js +28 -31
- package/styled-components/cjs/components/Select/elements/Target/elements/Button/Button.styles.js +3 -6
- package/styled-components/cjs/components/Select/elements/Target/elements/Textfield/Textfield.js +25 -7
- package/styled-components/cjs/components/Select/hooks/useKeyboardNavigation.js +2 -2
- package/styled-components/cjs/components/Select/utils/getButtonLabel.js +43 -0
- package/styled-components/cjs/components/Select/utils/index.js +8 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Select/Select.stories.tsx +2 -2
- package/styled-components/es/components/Chip/Chip.styles.js +1 -1
- package/styled-components/es/components/Select/Select.js +10 -6
- package/styled-components/es/components/Select/elements/Inner/Inner.js +7 -2
- package/styled-components/es/components/Select/elements/Inner/elements/Item/Item.js +16 -5
- package/styled-components/es/components/Select/elements/Target/Target.js +9 -3
- package/styled-components/es/components/Select/elements/Target/elements/Button/Button.js +30 -33
- package/styled-components/es/components/Select/elements/Target/elements/Button/Button.styles.js +2 -5
- package/styled-components/es/components/Select/elements/Target/elements/Textfield/Textfield.js +25 -7
- package/styled-components/es/components/Select/hooks/useKeyboardNavigation.js +2 -2
- package/styled-components/es/components/Select/utils/getButtonLabel.js +37 -0
- package/styled-components/es/components/Select/utils/index.js +2 -1
- package/styled-components/es/examples/plasma_b2c/components/Select/Select.stories.tsx +2 -2
- package/types/components/Chip/Chip.styles.d.ts.map +1 -1
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +12 -8
- package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/Select.types.d.ts +20 -8
- package/types/components/Select/Select.types.d.ts.map +1 -1
- package/types/components/Select/elements/Inner/Inner.d.ts.map +1 -1
- package/types/components/Select/elements/Inner/elements/Item/Item.d.ts.map +1 -1
- package/types/components/Select/elements/Inner/elements/Item/Item.types.d.ts +37 -1
- package/types/components/Select/elements/Inner/elements/Item/Item.types.d.ts.map +1 -1
- package/types/components/Select/elements/Target/Target.d.ts.map +1 -1
- package/types/components/Select/elements/Target/Target.types.d.ts +5 -3
- package/types/components/Select/elements/Target/Target.types.d.ts.map +1 -1
- package/types/components/Select/elements/Target/elements/Button/Button.d.ts.map +1 -1
- package/types/components/Select/elements/Target/elements/Button/Button.styles.d.ts +0 -1
- package/types/components/Select/elements/Target/elements/Button/Button.styles.d.ts.map +1 -1
- package/types/components/Select/elements/Target/elements/Button/Button.types.d.ts +1 -1
- package/types/components/Select/elements/Target/elements/Button/Button.types.d.ts.map +1 -1
- package/types/components/Select/elements/Target/elements/Textfield/Textfield.d.ts.map +1 -1
- package/types/components/Select/elements/Target/elements/Textfield/Textfield.types.d.ts +1 -1
- package/types/components/Select/elements/Target/elements/Textfield/Textfield.types.d.ts.map +1 -1
- package/types/components/Select/utils/getButtonLabel.d.ts +3 -0
- package/types/components/Select/utils/getButtonLabel.d.ts.map +1 -0
- package/types/components/Select/utils/index.d.ts +1 -0
- package/types/components/Select/utils/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Select/Select.d.ts +12 -8
- package/types/examples/plasma_b2c/components/Select/Select.d.ts.map +1 -1
package/styled-components/es/components/Select/elements/Target/elements/Textfield/Textfield.js
CHANGED
@@ -12,7 +12,8 @@ var getLabel = function getLabel(_ref) {
|
|
12
12
|
placeholder = _ref.placeholder,
|
13
13
|
focusedChipIndex = _ref.focusedChipIndex,
|
14
14
|
labelPlacement = _ref.labelPlacement,
|
15
|
-
size = _ref.size
|
15
|
+
size = _ref.size,
|
16
|
+
renderValue = _ref.renderValue;
|
16
17
|
if (isEmpty(value)) {
|
17
18
|
if (!label || labelPlacement === 'outer') {
|
18
19
|
return /*#__PURE__*/React.createElement(Placeholder, null, placeholder);
|
@@ -27,8 +28,9 @@ var getLabel = function getLabel(_ref) {
|
|
27
28
|
}
|
28
29
|
if (Array.isArray(value)) {
|
29
30
|
return value.map(function (currentValue, index) {
|
31
|
+
var itemLabel = valueToItemMap.get(currentValue).label;
|
30
32
|
return /*#__PURE__*/React.createElement(Chip, {
|
31
|
-
text:
|
33
|
+
text: renderValue ? renderValue(currentValue, itemLabel) : itemLabel,
|
32
34
|
onClick: function onClick(e) {
|
33
35
|
e.stopPropagation();
|
34
36
|
onChipClick(currentValue);
|
@@ -37,10 +39,11 @@ var getLabel = function getLabel(_ref) {
|
|
37
39
|
});
|
38
40
|
});
|
39
41
|
}
|
42
|
+
var itemLabel = valueToItemMap.get(value).label;
|
40
43
|
if (!label || labelPlacement === 'outer') {
|
41
|
-
return /*#__PURE__*/React.createElement(Value, null,
|
44
|
+
return /*#__PURE__*/React.createElement(Value, null, renderValue ? renderValue(value, itemLabel) : itemLabel);
|
42
45
|
}
|
43
|
-
return /*#__PURE__*/React.createElement(InnerLabelWrapper, null, size !== 'xs' && /*#__PURE__*/React.createElement(InnerLabel, null, label), /*#__PURE__*/React.createElement(Value, null,
|
46
|
+
return /*#__PURE__*/React.createElement(InnerLabelWrapper, null, size !== 'xs' && /*#__PURE__*/React.createElement(InnerLabel, null, label), /*#__PURE__*/React.createElement(Value, null, renderValue ? renderValue(value, itemLabel) : itemLabel));
|
44
47
|
};
|
45
48
|
export var Textfield = function Textfield(_ref2) {
|
46
49
|
var opened = _ref2.opened,
|
@@ -56,9 +59,19 @@ export var Textfield = function Textfield(_ref2) {
|
|
56
59
|
labelPlacement = _ref2.labelPlacement,
|
57
60
|
size = _ref2.size,
|
58
61
|
contentLeft = _ref2.contentLeft,
|
59
|
-
disabled = _ref2.disabled
|
62
|
+
disabled = _ref2.disabled,
|
63
|
+
renderValue = _ref2.renderValue,
|
64
|
+
focusedPath = _ref2.focusedPath,
|
65
|
+
focusedToValueMap = _ref2.focusedToValueMap;
|
60
66
|
var withArrowInverse = opened ? classes.arrowInverse : undefined;
|
61
67
|
var iconSize = size === 'xs' ? 'xs' : 's';
|
68
|
+
var getActiveDescendant = function getActiveDescendant() {
|
69
|
+
var _focusedToValueMap$ge;
|
70
|
+
var focusedPathAsString = focusedPath.reduce(function (acc, n) {
|
71
|
+
return "".concat(acc, "/").concat(n);
|
72
|
+
}, '').replace(/^(\/)/, '');
|
73
|
+
return focusedToValueMap === null || focusedToValueMap === void 0 || (_focusedToValueMap$ge = focusedToValueMap.get(focusedPathAsString)) === null || _focusedToValueMap$ge === void 0 ? void 0 : _focusedToValueMap$ge.value.toString();
|
74
|
+
};
|
62
75
|
return /*#__PURE__*/React.createElement(TextfieldWrapper, {
|
63
76
|
opened: opened,
|
64
77
|
value: value
|
@@ -66,7 +79,11 @@ export var Textfield = function Textfield(_ref2) {
|
|
66
79
|
stretching: "filled",
|
67
80
|
className: cx(classes.textfieldTarget, opened || focusedChipIndex !== null ? classes.selectWithoutBoxShadow : undefined),
|
68
81
|
onKeyDown: onKeyDown,
|
69
|
-
disabled: disabled
|
82
|
+
disabled: disabled,
|
83
|
+
role: "combobox",
|
84
|
+
"aria-controls": "tree_level_1",
|
85
|
+
"aria-expanded": opened,
|
86
|
+
"aria-activedescendant": getActiveDescendant()
|
70
87
|
}, /*#__PURE__*/React.createElement(Wrapper, null, contentLeft && (!multiselect || isEmpty(value)) && /*#__PURE__*/React.createElement(ContentLeftWrapper, null, contentLeft), /*#__PURE__*/React.createElement(ChipWrapper, null, getLabel({
|
71
88
|
value: value,
|
72
89
|
isTargetAmount: isTargetAmount,
|
@@ -76,7 +93,8 @@ export var Textfield = function Textfield(_ref2) {
|
|
76
93
|
placeholder: placeholder,
|
77
94
|
focusedChipIndex: focusedChipIndex,
|
78
95
|
labelPlacement: labelPlacement,
|
79
|
-
size: size
|
96
|
+
size: size,
|
97
|
+
renderValue: renderValue
|
80
98
|
})), /*#__PURE__*/React.createElement(IconArrowWrapper, null, /*#__PURE__*/React.createElement(StyledArrow, {
|
81
99
|
size: iconSize,
|
82
100
|
color: "inherit",
|
@@ -160,7 +160,7 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
|
|
160
160
|
{
|
161
161
|
event.preventDefault();
|
162
162
|
var _currentItem2 = getFurtherPath(focusedPath, focusedToValueMap);
|
163
|
-
if (!_currentItem2 || _currentItem2 !== null && _currentItem2 !== void 0 && _currentItem2.isDisabled) {
|
163
|
+
if (!_currentItem2 || _currentItem2 !== null && _currentItem2 !== void 0 && _currentItem2.isDisabled || _currentItem2 !== null && _currentItem2 !== void 0 && _currentItem2.disabled) {
|
164
164
|
break;
|
165
165
|
}
|
166
166
|
handlePressDown(_currentItem2);
|
@@ -175,7 +175,7 @@ export var useKeyNavigation = function useKeyNavigation(_ref) {
|
|
175
175
|
});
|
176
176
|
}
|
177
177
|
var _currentItem3 = getFurtherPath(focusedPath, focusedToValueMap);
|
178
|
-
if (_currentItem3 !== null && _currentItem3 !== void 0 && _currentItem3.isDisabled) {
|
178
|
+
if (_currentItem3 !== null && _currentItem3 !== void 0 && _currentItem3.isDisabled || _currentItem3 !== null && _currentItem3 !== void 0 && _currentItem3.disabled) {
|
179
179
|
break;
|
180
180
|
}
|
181
181
|
if (!path[0]) {
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { isEmpty } from '../../../utils';
|
2
|
+
var getLabel = function getLabel(_ref) {
|
3
|
+
var renderValue = _ref.renderValue,
|
4
|
+
value = _ref.value,
|
5
|
+
valueToItemMap = _ref.valueToItemMap;
|
6
|
+
var _ref2 = valueToItemMap.get(value.toString()),
|
7
|
+
label = _ref2.label;
|
8
|
+
return renderValue ? renderValue(value, label) : label;
|
9
|
+
};
|
10
|
+
export var getButtonLabel = function getButtonLabel(_ref3) {
|
11
|
+
var value = _ref3.value,
|
12
|
+
label = _ref3.label,
|
13
|
+
isTargetAmount = _ref3.isTargetAmount,
|
14
|
+
multiselect = _ref3.multiselect,
|
15
|
+
valueToItemMap = _ref3.valueToItemMap,
|
16
|
+
renderValue = _ref3.renderValue;
|
17
|
+
if (isEmpty(value)) {
|
18
|
+
return label;
|
19
|
+
}
|
20
|
+
if (multiselect && isTargetAmount) {
|
21
|
+
return "\u0412\u044B\u0431\u0440\u0430\u043D\u043E: ".concat(value.length);
|
22
|
+
}
|
23
|
+
if (multiselect && Array.isArray(value)) {
|
24
|
+
return value.map(function (itemValue) {
|
25
|
+
return getLabel({
|
26
|
+
renderValue: renderValue,
|
27
|
+
value: itemValue,
|
28
|
+
valueToItemMap: valueToItemMap
|
29
|
+
});
|
30
|
+
}).join(', ');
|
31
|
+
}
|
32
|
+
return getLabel({
|
33
|
+
renderValue: renderValue,
|
34
|
+
value: value,
|
35
|
+
valueToItemMap: valueToItemMap
|
36
|
+
});
|
37
|
+
};
|
@@ -4,4 +4,5 @@ export { updateAncestors } from './updateAncestors';
|
|
4
4
|
export { updateSingleAncestors } from './updateSingleAncestors';
|
5
5
|
export { sizeToIconSize } from './sizeToIconSize';
|
6
6
|
export { getCorrectHeight } from './getCorrectHeight';
|
7
|
-
export { getView } from './getView';
|
7
|
+
export { getView } from './getView';
|
8
|
+
export { getButtonLabel } from './getButtonLabel';
|
@@ -517,7 +517,7 @@ const CommonStory = (args: StorySelectProps) => {
|
|
517
517
|
<td>Clear</td>
|
518
518
|
|
519
519
|
<td>
|
520
|
-
<div style={{
|
520
|
+
<div style={{ width: '200px' }}>
|
521
521
|
<Select
|
522
522
|
{...args}
|
523
523
|
multiselect={false}
|
@@ -529,7 +529,7 @@ const CommonStory = (args: StorySelectProps) => {
|
|
529
529
|
</div>
|
530
530
|
</td>
|
531
531
|
<td>
|
532
|
-
<div style={{
|
532
|
+
<div style={{ width: '200px' }}>
|
533
533
|
<Select
|
534
534
|
{...args}
|
535
535
|
multiselect
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Chip.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.styles.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,IAAI,0CAUhB,CAAC;AAEF,eAAO,MAAM,iBAAiB,qKAI7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,qKAE7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,qKAI9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,
|
1
|
+
{"version":3,"file":"Chip.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.styles.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,IAAI,0CAUhB,CAAC;AAEF,eAAO,MAAM,iBAAiB,qKAI7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,qKAE7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,qKAI9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,qKAK9B,CAAC"}
|
package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
export declare const SelectPerPageRoot: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
3
3
|
export declare const SelectPerPageSelect: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("../../../../engines/types").PropsType<import("../../../../engines/types").Variants> & (({
|
4
4
|
items: import("../../../Select/elements/Inner/elements/Item/Item.types").ItemOption[];
|
5
|
+
placement?: import("../../../Select/Select.types").SelectPlacement | import("../../../Select/Select.types").SelectPlacementBasic[] | undefined;
|
5
6
|
label?: string | undefined;
|
6
7
|
labelPlacement?: "inner" | "outer" | undefined;
|
7
8
|
placeholder?: string | undefined;
|
@@ -15,16 +16,16 @@ export declare const SelectPerPageSelect: import("@linaria/react").StyledMeta &
|
|
15
16
|
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
16
17
|
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
17
18
|
portal?: string | import("react").RefObject<HTMLElement> | undefined;
|
18
|
-
|
19
|
+
renderValue?: ((value: string, label: string) => string) | undefined;
|
19
20
|
size?: string | undefined;
|
20
21
|
view?: string | undefined;
|
21
22
|
chipView?: string | undefined;
|
23
|
+
multiselect?: boolean | undefined;
|
22
24
|
isOpen?: boolean | undefined;
|
23
25
|
status?: "error" | "success" | "warning" | undefined;
|
24
26
|
} & {
|
25
27
|
value: string;
|
26
28
|
onChange: (value: string) => void;
|
27
|
-
multiselect?: false | undefined;
|
28
29
|
separator?: undefined;
|
29
30
|
isTargetAmount?: false | undefined;
|
30
31
|
} & {
|
@@ -33,6 +34,7 @@ export declare const SelectPerPageSelect: import("@linaria/react").StyledMeta &
|
|
33
34
|
contentLeft?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
34
35
|
} & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "onResize" | "onResizeCapture" | "nonce" | "value"> & import("react").RefAttributes<HTMLButtonElement>) | ({
|
35
36
|
items: import("../../../Select/elements/Inner/elements/Item/Item.types").ItemOption[];
|
37
|
+
placement?: import("../../../Select/Select.types").SelectPlacement | import("../../../Select/Select.types").SelectPlacementBasic[] | undefined;
|
36
38
|
label?: string | undefined;
|
37
39
|
labelPlacement?: "inner" | "outer" | undefined;
|
38
40
|
placeholder?: string | undefined;
|
@@ -46,16 +48,16 @@ export declare const SelectPerPageSelect: import("@linaria/react").StyledMeta &
|
|
46
48
|
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
47
49
|
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
48
50
|
portal?: string | import("react").RefObject<HTMLElement> | undefined;
|
49
|
-
|
51
|
+
renderValue?: ((value: string, label: string) => string) | undefined;
|
50
52
|
size?: string | undefined;
|
51
53
|
view?: string | undefined;
|
52
54
|
chipView?: string | undefined;
|
55
|
+
multiselect?: boolean | undefined;
|
53
56
|
isOpen?: boolean | undefined;
|
54
57
|
status?: "error" | "success" | "warning" | undefined;
|
55
58
|
} & {
|
56
59
|
value: string;
|
57
60
|
onChange: (value: string) => void;
|
58
|
-
multiselect?: false | undefined;
|
59
61
|
separator?: undefined;
|
60
62
|
isTargetAmount?: false | undefined;
|
61
63
|
} & {
|
@@ -64,6 +66,7 @@ export declare const SelectPerPageSelect: import("@linaria/react").StyledMeta &
|
|
64
66
|
contentLeft?: undefined;
|
65
67
|
} & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "onResize" | "onResizeCapture" | "nonce" | "value"> & import("react").RefAttributes<HTMLButtonElement>) | ({
|
66
68
|
items: import("../../../Select/elements/Inner/elements/Item/Item.types").ItemOption[];
|
69
|
+
placement?: import("../../../Select/Select.types").SelectPlacement | import("../../../Select/Select.types").SelectPlacementBasic[] | undefined;
|
67
70
|
label?: string | undefined;
|
68
71
|
labelPlacement?: "inner" | "outer" | undefined;
|
69
72
|
placeholder?: string | undefined;
|
@@ -77,16 +80,16 @@ export declare const SelectPerPageSelect: import("@linaria/react").StyledMeta &
|
|
77
80
|
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
78
81
|
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
79
82
|
portal?: string | import("react").RefObject<HTMLElement> | undefined;
|
80
|
-
|
83
|
+
renderValue?: ((value: string, label: string) => string) | undefined;
|
81
84
|
size?: string | undefined;
|
82
85
|
view?: string | undefined;
|
83
86
|
chipView?: string | undefined;
|
87
|
+
multiselect?: boolean | undefined;
|
84
88
|
isOpen?: boolean | undefined;
|
85
89
|
status?: "error" | "success" | "warning" | undefined;
|
86
90
|
} & {
|
87
91
|
value: string[];
|
88
92
|
onChange: (value: string[]) => void;
|
89
|
-
multiselect?: true | undefined;
|
90
93
|
separator?: string | undefined;
|
91
94
|
isTargetAmount?: boolean | undefined;
|
92
95
|
} & {
|
@@ -95,6 +98,7 @@ export declare const SelectPerPageSelect: import("@linaria/react").StyledMeta &
|
|
95
98
|
contentLeft?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
96
99
|
} & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "onResize" | "onResizeCapture" | "nonce" | "value"> & import("react").RefAttributes<HTMLButtonElement>) | ({
|
97
100
|
items: import("../../../Select/elements/Inner/elements/Item/Item.types").ItemOption[];
|
101
|
+
placement?: import("../../../Select/Select.types").SelectPlacement | import("../../../Select/Select.types").SelectPlacementBasic[] | undefined;
|
98
102
|
label?: string | undefined;
|
99
103
|
labelPlacement?: "inner" | "outer" | undefined;
|
100
104
|
placeholder?: string | undefined;
|
@@ -108,16 +112,16 @@ export declare const SelectPerPageSelect: import("@linaria/react").StyledMeta &
|
|
108
112
|
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
109
113
|
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
110
114
|
portal?: string | import("react").RefObject<HTMLElement> | undefined;
|
111
|
-
|
115
|
+
renderValue?: ((value: string, label: string) => string) | undefined;
|
112
116
|
size?: string | undefined;
|
113
117
|
view?: string | undefined;
|
114
118
|
chipView?: string | undefined;
|
119
|
+
multiselect?: boolean | undefined;
|
115
120
|
isOpen?: boolean | undefined;
|
116
121
|
status?: "error" | "success" | "warning" | undefined;
|
117
122
|
} & {
|
118
123
|
value: string[];
|
119
124
|
onChange: (value: string[]) => void;
|
120
|
-
multiselect?: true | undefined;
|
121
125
|
separator?: string | undefined;
|
122
126
|
isTargetAmount?: boolean | undefined;
|
123
127
|
} & {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PaginationSelectPerPage.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.ts"],"names":[],"mappings":";AASA,eAAO,MAAM,iBAAiB,qKAI7B,CAAC;AAEF,eAAO,MAAM,mBAAmB
|
1
|
+
{"version":3,"file":"PaginationSelectPerPage.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.ts"],"names":[],"mappings":";AASA,eAAO,MAAM,iBAAiB,qKAI7B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wLAsB/B,CAAC;AAEF,eAAO,MAAM,uBAAuB,qKAOnC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAC;AAEzG,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoF,MAAM,OAAO,CAAC;AAEzG,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAa1C,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK/D,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,UAAU,iBAAiB,EAAE,WAAW,CAAC,0FAwQpE,CAAC;AAEP,eAAO,MAAM,YAAY;;;mBA1QQ,UAAU,iBAAiB,EAAE,WAAW,CAAC;;;;;;;;;;;;;;CA2RzE,CAAC"}
|
@@ -3,6 +3,8 @@ import React from 'react';
|
|
3
3
|
import { FocusedPathState } from './reducers';
|
4
4
|
import { ItemOption, ItemOptionTransformed } from './elements/Inner/elements/Item/Item.types';
|
5
5
|
import type { ValueToCheckedMapType } from './hooks/usePathMaps';
|
6
|
+
export declare type SelectPlacementBasic = 'top' | 'bottom' | 'right' | 'left';
|
7
|
+
export declare type SelectPlacement = SelectPlacementBasic | 'auto';
|
6
8
|
declare type Target = {
|
7
9
|
/**
|
8
10
|
* Стиль селекта: button или textfield.
|
@@ -22,11 +24,6 @@ declare type Target = {
|
|
22
24
|
declare type IsMultiselect = {
|
23
25
|
value: string;
|
24
26
|
onChange: (value: string) => void;
|
25
|
-
/**
|
26
|
-
* Выбор нескольких значений.
|
27
|
-
* @default false
|
28
|
-
*/
|
29
|
-
multiselect?: false;
|
30
27
|
/**
|
31
28
|
* Разделитель выбранных значений.
|
32
29
|
*/
|
@@ -39,12 +36,19 @@ declare type IsMultiselect = {
|
|
39
36
|
} | {
|
40
37
|
value: Array<string>;
|
41
38
|
onChange: (value: Array<string>) => void;
|
42
|
-
multiselect?: true;
|
43
39
|
separator?: string;
|
44
40
|
isTargetAmount?: boolean;
|
45
41
|
};
|
46
42
|
declare type BasicProps = {
|
43
|
+
/**
|
44
|
+
* Список элементов.
|
45
|
+
*/
|
47
46
|
items: Array<ItemOption>;
|
47
|
+
/**
|
48
|
+
* Сторона открытия дропдауна относительно target элемента.
|
49
|
+
* @default bottom
|
50
|
+
*/
|
51
|
+
placement?: SelectPlacement | Array<SelectPlacementBasic>;
|
48
52
|
/**
|
49
53
|
* Метка-подпись к элементу.
|
50
54
|
*/
|
@@ -105,7 +109,10 @@ declare type BasicProps = {
|
|
105
109
|
* Портал для выпадающего списка. Принимает id контейнера или ref.
|
106
110
|
*/
|
107
111
|
portal?: string | React.RefObject<HTMLElement>;
|
108
|
-
|
112
|
+
/**
|
113
|
+
* Callback для кастомной настройки значения в селекте
|
114
|
+
*/
|
115
|
+
renderValue?: (value: ItemOption['value'], label: ItemOption['label']) => string;
|
109
116
|
/**
|
110
117
|
* Размер компонента.
|
111
118
|
*/
|
@@ -118,6 +125,11 @@ declare type BasicProps = {
|
|
118
125
|
* Внешний вид чипа в варианте textfield multiselect.
|
119
126
|
*/
|
120
127
|
chipView?: string;
|
128
|
+
/**
|
129
|
+
* Выбор нескольких значений.
|
130
|
+
* @deprecated Множественны выбор зависит от типа value и onChange.
|
131
|
+
*/
|
132
|
+
multiselect?: boolean;
|
121
133
|
/**
|
122
134
|
* @default false
|
123
135
|
* @deprecated
|
@@ -133,7 +145,7 @@ export declare type SelectProps = BasicProps & IsMultiselect & Target & Omit<But
|
|
133
145
|
export declare type ItemContext = {
|
134
146
|
focusedPath: FocusedPathState;
|
135
147
|
checked: ValueToCheckedMapType;
|
136
|
-
multiselect:
|
148
|
+
multiselect: boolean;
|
137
149
|
size: SelectProps['size'];
|
138
150
|
handleCheckboxChange: (item: ItemOptionTransformed) => void;
|
139
151
|
handleItemClick: (item: ItemOptionTransformed, e: React.MouseEvent<HTMLElement>) => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.types.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAC9F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,aAAK,MAAM,GACL;IACI;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,KAAK,CAAC;IAC7B,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;IACvD;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CACpC,GACD;IACI,MAAM,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC1B,IAAI,CAAC,EACC,SAAS,GACT,QAAQ,GACR,WAAW,GACX,OAAO,GACP,UAAU,GACV,SAAS,GACT,UAAU,GACV,MAAM,GACN,OAAO,GACP,OAAO,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC;CACvB,CAAC;AAER,aAAK,aAAa,GACZ;IACI,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC
|
1
|
+
{"version":3,"file":"Select.types.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.types.ts"],"names":[],"mappings":"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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Inner.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/elements/Inner/Inner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,
|
1
|
+
{"version":3,"file":"Inner.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/elements/Inner/Inner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAOhC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAuDhC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Inner/elements/Item/Item.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAqB,EAAE,EAAc,MAAM,OAAO,CAAC;AAQjE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAYzC,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Inner/elements/Item/Item.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAqB,EAAE,EAAc,MAAM,OAAO,CAAC;AAQjE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAYzC,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CA8F9B,CAAC"}
|
@@ -1,13 +1,44 @@
|
|
1
1
|
import type { ReactNode } from 'react';
|
2
2
|
import type { PathState } from '../../../../reducers';
|
3
3
|
export declare type ItemOption = {
|
4
|
-
|
4
|
+
/**
|
5
|
+
* Значение у item
|
6
|
+
*/
|
7
|
+
value: string;
|
8
|
+
/**
|
9
|
+
* Метка-подпись к item
|
10
|
+
*/
|
5
11
|
label: string;
|
12
|
+
/**
|
13
|
+
* Список дочерних items.
|
14
|
+
*/
|
6
15
|
items?: Array<ItemOption>;
|
16
|
+
/**
|
17
|
+
* Item не активен
|
18
|
+
*/
|
19
|
+
disabled?: boolean;
|
20
|
+
/**
|
21
|
+
* Слот для контента слева
|
22
|
+
*/
|
7
23
|
contentLeft?: ReactNode;
|
24
|
+
/**
|
25
|
+
* Слот для контента справа
|
26
|
+
*/
|
8
27
|
contentRight?: ReactNode;
|
28
|
+
/**
|
29
|
+
* Выбранный item.
|
30
|
+
* @deprecated
|
31
|
+
*/
|
9
32
|
isActive?: boolean;
|
33
|
+
/**
|
34
|
+
* Кастомный цвет текста
|
35
|
+
* @deprecated
|
36
|
+
*/
|
10
37
|
color?: string;
|
38
|
+
/**
|
39
|
+
* Айтем не активен
|
40
|
+
* @deprecated использовать disabled
|
41
|
+
*/
|
11
42
|
isDisabled?: boolean;
|
12
43
|
};
|
13
44
|
export declare type ItemOptionTransformed = ItemOption & {
|
@@ -18,5 +49,10 @@ export interface ItemProps {
|
|
18
49
|
currentLevel: number;
|
19
50
|
index: number;
|
20
51
|
path: PathState;
|
52
|
+
ariaControls?: string;
|
53
|
+
ariaExpanded?: boolean;
|
54
|
+
ariaLevel?: React.AriaAttributes['aria-level'];
|
55
|
+
ariaLabel?: React.AriaAttributes['aria-label'];
|
56
|
+
itemRole?: string;
|
21
57
|
}
|
22
58
|
//# sourceMappingURL=Item.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Item.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Inner/elements/Item/Item.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,oBAAY,UAAU,GAAG;IACrB,KAAK,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"Item.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Inner/elements/Item/Item.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,oBAAY,UAAU,GAAG;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,oBAAY,qBAAqB,GAAG,UAAU,GAAG;IAAE,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAA;CAAE,CAAC;AAEhF,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAC/C,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Target.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/elements/Target/Target.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,
|
1
|
+
{"version":3,"file":"Target.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/elements/Target/Target.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAwDxC,CAAC"}
|
@@ -1,12 +1,14 @@
|
|
1
1
|
import type { KeyboardEvent } from 'react';
|
2
|
-
import type { ValueToItemMapType } from '../../hooks/usePathMaps';
|
2
|
+
import type { ValueToItemMapType, FocusedToValueMapType } from '../../hooks/usePathMaps';
|
3
3
|
import type { SelectProps } from '../../Select.types';
|
4
|
-
import { FocusedChipIndexState } from '../../reducers';
|
5
|
-
export declare type TargetProps = Pick<SelectProps, 'value' | 'size' | 'multiselect' | 'isTargetAmount' | 'target' | 'label' | 'labelPlacement' | 'placeholder' | 'contentLeft' | 'disabled' | '
|
4
|
+
import { FocusedChipIndexState, FocusedPathState } from '../../reducers';
|
5
|
+
export declare type TargetProps = Pick<SelectProps, 'value' | 'size' | 'multiselect' | 'isTargetAmount' | 'target' | 'label' | 'labelPlacement' | 'placeholder' | 'contentLeft' | 'disabled' | 'renderValue'> & {
|
6
6
|
opened: boolean;
|
7
7
|
valueToItemMap: ValueToItemMapType;
|
8
8
|
onChipClick: (value: string) => void;
|
9
9
|
onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
10
10
|
focusedChipIndex: FocusedChipIndexState;
|
11
|
+
focusedPath: FocusedPathState;
|
12
|
+
focusedToValueMap: FocusedToValueMapType;
|
11
13
|
};
|
12
14
|
//# sourceMappingURL=Target.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Target.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/elements/Target/Target.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;
|
1
|
+
{"version":3,"file":"Target.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/elements/Target/Target.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACzF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEzE,oBAAY,WAAW,GAAG,IAAI,CAC1B,WAAW,EACT,OAAO,GACP,MAAM,GACN,aAAa,GACb,gBAAgB,GAChB,QAAQ,GACR,OAAO,GACP,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,UAAU,GACV,aAAa,CAClB,GAAG;IACA,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,kBAAkB,CAAC;IACnC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACvD,gBAAgB,EAAE,qBAAqB,CAAC;IACxC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,iBAAiB,EAAE,qBAAqB,CAAC;CAC5C,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Target/elements/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Target/elements/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAyDxC,CAAC"}
|
@@ -45,6 +45,5 @@ export declare const StyledButton: import("@linaria/react").StyledMeta & import(
|
|
45
45
|
export declare const IconArrowWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
46
46
|
export declare const StyledArrow: import("@linaria/react").StyledMeta & import("react").FC<import("../../../../../_Icon/IconRoot").IconProps>;
|
47
47
|
export declare const ButtonWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
48
|
-
export declare const InnerWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
49
48
|
export declare const Label: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
50
49
|
//# sourceMappingURL=Button.styles.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Target/elements/Button/Button.styles.tsx"],"names":[],"mappings":";AAWA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAoBxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,qKAW5B,CAAC;AAEF,eAAO,MAAM,WAAW,6GAIvB,CAAC;AAEF,eAAO,MAAM,aAAa,qKAMzB,CAAC;AAEF,eAAO,MAAM,
|
1
|
+
{"version":3,"file":"Button.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Target/elements/Button/Button.styles.tsx"],"names":[],"mappings":";AAWA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAoBxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,qKAW5B,CAAC;AAEF,eAAO,MAAM,WAAW,6GAIvB,CAAC;AAEF,eAAO,MAAM,aAAa,qKAMzB,CAAC;AAEF,eAAO,MAAM,KAAK,qKAUjB,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { TargetProps } from '../../Target.types';
|
2
2
|
export declare type ButtonProps = Omit<TargetProps, 'target' | 'onChipClick' | 'labelPlacement' | 'helperText' | 'focusedChipIndex' | 'contentLeft'>;
|
3
|
-
export declare type
|
3
|
+
export declare type GetButtonLabelProps = Omit<ButtonProps, 'opened' | 'onKeyDown' | 'size' | 'focusedToValueMap' | 'focusedPath'>;
|
4
4
|
//# sourceMappingURL=Button.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Target/elements/Button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,oBAAY,WAAW,GAAG,IAAI,CAC1B,WAAW,EACX,QAAQ,GAAG,aAAa,GAAG,gBAAgB,GAAG,YAAY,GAAG,kBAAkB,GAAG,aAAa,CAClG,CAAC;AAEF,oBAAY,
|
1
|
+
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Target/elements/Button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,oBAAY,WAAW,GAAG,IAAI,CAC1B,WAAW,EACX,QAAQ,GAAG,aAAa,GAAG,gBAAgB,GAAG,YAAY,GAAG,kBAAkB,GAAG,aAAa,CAClG,CAAC;AAEF,oBAAY,mBAAmB,GAAG,IAAI,CAClC,WAAW,EACX,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,mBAAmB,GAAG,aAAa,CACxE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Textfield.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Target/elements/Textfield/Textfield.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,cAAc,
|
1
|
+
{"version":3,"file":"Textfield.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Target/elements/Textfield/Textfield.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,cAAc,EAA0B,MAAM,mBAAmB,CAAC;AAwE3E,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA0E9C,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { TargetProps } from '../../Target.types';
|
2
2
|
export declare type TextfieldProps = Omit<TargetProps, 'target'>;
|
3
|
-
export declare type
|
3
|
+
export declare type GetTextfieldLabelProps = Omit<TextfieldProps, 'opened' | 'onKeyDown' | 'focusedPath' | 'focusedToValueMap'>;
|
4
4
|
//# sourceMappingURL=Textfield.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Textfield.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Target/elements/Textfield/Textfield.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,oBAAY,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAEzD,oBAAY,
|
1
|
+
{"version":3,"file":"Textfield.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/elements/Target/elements/Textfield/Textfield.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,oBAAY,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AAEzD,oBAAY,sBAAsB,GAAG,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,WAAW,GAAG,aAAa,GAAG,mBAAmB,CAAC,CAAC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { GetButtonLabelProps } from '../elements/Target/elements/Button/Button.types';
|
2
|
+
export declare const getButtonLabel: ({ value, label, isTargetAmount, multiselect, valueToItemMap, renderValue, }: GetButtonLabelProps) => string | undefined;
|
3
|
+
//# sourceMappingURL=getButtonLabel.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getButtonLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/utils/getButtonLabel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAStF,eAAO,MAAM,cAAc,gFAOxB,mBAAmB,uBA0BrB,CAAC"}
|
@@ -5,4 +5,5 @@ export { updateSingleAncestors } from './updateSingleAncestors';
|
|
5
5
|
export { sizeToIconSize } from './sizeToIconSize';
|
6
6
|
export { getCorrectHeight } from './getCorrectHeight';
|
7
7
|
export { getView } from './getView';
|
8
|
+
export { getButtonLabel } from './getButtonLabel';
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|