@salutejs/plasma-new-hope 0.193.1-canary.1562.11858039838.0 → 0.194.0-canary.1552.11858023676.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Combobox/ComboboxNew/Combobox.css +2 -0
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +42 -24
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +2 -0
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +2 -0
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.css +1 -0
- package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +39 -0
- package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js.map +1 -0
- package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +15 -0
- package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js.map +1 -0
- package/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles_18yw2bf.css +1 -0
- package/cjs/components/Combobox/ComboboxOld/Combobox.css +4 -5
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +4 -5
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +4 -5
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +4 -5
- package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +4 -5
- package/cjs/components/Dropdown/Dropdown.css +4 -5
- package/cjs/components/Dropdown/Dropdown.js +2 -4
- package/cjs/components/Dropdown/Dropdown.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +4 -5
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -3
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -7
- package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/cjs/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_14yih1y.css → DropdownItem.styles_1b439rx.css} +0 -1
- package/cjs/components/Select/Select.js +1 -0
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js +2 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -18
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/cjs/index.css +6 -5
- package/cjs/index.js +2 -0
- package/cjs/index.js.map +1 -1
- package/cjs/utils/createEvent.js +54 -0
- package/cjs/utils/createEvent.js.map +1 -0
- package/cjs/utils/index.js.map +1 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +43 -29
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +40 -0
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +13 -0
- package/emotion/cjs/components/Dropdown/Dropdown.js +2 -4
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -3
- package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +11 -15
- package/emotion/cjs/components/Select/Select.js +1 -0
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +2 -1
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -24
- package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
- package/emotion/cjs/utils/createEvent.js +53 -0
- package/emotion/cjs/utils/index.js +10 -1
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +44 -29
- package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
- package/emotion/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +31 -0
- package/emotion/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +6 -0
- package/emotion/es/components/Dropdown/Dropdown.js +2 -4
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -4
- package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +11 -15
- package/emotion/es/components/Select/Select.js +1 -0
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +2 -1
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -24
- package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
- package/emotion/es/utils/createEvent.js +47 -0
- package/emotion/es/utils/index.js +1 -0
- package/es/components/Combobox/ComboboxNew/Combobox.css +2 -0
- package/es/components/Combobox/ComboboxNew/Combobox.js +44 -26
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +2 -0
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +2 -0
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.css +1 -0
- package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +35 -0
- package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js.map +1 -0
- package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +11 -0
- package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js.map +1 -0
- package/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles_18yw2bf.css +1 -0
- package/es/components/Combobox/ComboboxOld/Combobox.css +4 -5
- package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +4 -5
- package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +4 -5
- package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +4 -5
- package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +4 -5
- package/es/components/Dropdown/Dropdown.css +4 -5
- package/es/components/Dropdown/Dropdown.js +2 -4
- package/es/components/Dropdown/Dropdown.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +4 -5
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -4
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +2 -7
- package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
- package/es/components/Dropdown/ui/DropdownItem/{DropdownItem.styles_14yih1y.css → DropdownItem.styles_1b439rx.css} +0 -1
- package/es/components/Select/Select.js +1 -0
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.js +2 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js +4 -19
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.js.map +1 -1
- package/es/index.css +6 -5
- package/es/index.js +1 -0
- package/es/index.js.map +1 -1
- package/es/utils/createEvent.js +50 -0
- package/es/utils/createEvent.js.map +1 -0
- package/es/utils/index.js.map +1 -1
- package/package.json +2 -3
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +43 -29
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +40 -0
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +12 -0
- package/styled-components/cjs/components/Dropdown/Dropdown.js +2 -4
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -3
- package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +2 -5
- package/styled-components/cjs/components/Select/Select.js +1 -0
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +2 -1
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -24
- package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
- package/styled-components/cjs/utils/createEvent.js +53 -0
- package/styled-components/cjs/utils/index.js +10 -1
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +44 -29
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -1
- package/styled-components/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.js +31 -0
- package/styled-components/es/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.js +5 -0
- package/styled-components/es/components/Dropdown/Dropdown.js +2 -4
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -4
- package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +2 -5
- package/styled-components/es/components/Select/Select.js +1 -0
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +2 -1
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.js +3 -24
- package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
- package/styled-components/es/utils/createEvent.js +47 -0
- package/styled-components/es/utils/index.js +1 -0
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +26 -3
- package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.d.ts +6 -0
- package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.d.ts.map +1 -0
- package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.d.ts +3 -0
- package/types/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.d.ts.map +1 -0
- package/types/components/Dropdown/Dropdown.d.ts +2 -50
- package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/components/Dropdown/Dropdown.types.d.ts +6 -11
- package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/types/components/Dropdown/index.d.ts +0 -1
- package/types/components/Dropdown/index.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +0 -1
- package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/Select.types.d.ts +2 -1
- package/types/components/Select/Select.types.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/ui/Item/Item.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +1076 -116
- package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +1 -25
- package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +1076 -116
- package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +1 -25
- package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/types/utils/createEvent.d.ts +3 -0
- package/types/utils/createEvent.d.ts.map +1 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/index.d.ts.map +1 -1
@@ -31,6 +31,7 @@ export var Item = function Item(_ref) {
|
|
31
31
|
handleItemClick = _useContext.handleItemClick,
|
32
32
|
variant = _useContext.variant,
|
33
33
|
renderItem = _useContext.renderItem,
|
34
|
+
valueToItemMap = _useContext.valueToItemMap,
|
34
35
|
treeId = _useContext.treeId;
|
35
36
|
var disabledClassName = disabled ? classes.dropdownItemIsDisabled : undefined;
|
36
37
|
var focusedClass = currentLevel === focusedPath.length - 1 && index === (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[currentLevel]) ? classes.dropdownItemIsFocused : undefined;
|
@@ -84,7 +85,7 @@ export var Item = function Item(_ref) {
|
|
84
85
|
}))), !multiple && checked.get(item.value) === 'done' && /*#__PURE__*/React.createElement(IconDone, {
|
85
86
|
size: sizeToIconSize(size, variant),
|
86
87
|
color: "inherit"
|
87
|
-
})), renderItem ? /*#__PURE__*/React.createElement(StyledText, null, renderItem(
|
88
|
+
})), renderItem ? /*#__PURE__*/React.createElement(StyledText, null, renderItem(valueToItemMap.get(value))) : /*#__PURE__*/React.createElement(StyledWrapper, null, /*#__PURE__*/React.createElement(StyledCell, {
|
88
89
|
view: "default",
|
89
90
|
size: "l",
|
90
91
|
contentLeft: contentLeft,
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import React, { forwardRef, useEffect, useRef } from 'react';
|
2
|
+
import { useForkRef } from '@salutejs/plasma-core';
|
3
|
+
import { createEvent } from '../../../../../utils';
|
4
|
+
import { SelectHidden } from './SelectNative.styles';
|
5
|
+
export var SelectNative = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
6
|
+
var name = _ref.name,
|
7
|
+
multiple = _ref.multiple,
|
8
|
+
value = _ref.value,
|
9
|
+
onChange = _ref.onChange;
|
10
|
+
var values = multiple ? value : [value];
|
11
|
+
var selectRef = useRef(null);
|
12
|
+
var forkRef = useForkRef(selectRef, ref);
|
13
|
+
useEffect(function () {
|
14
|
+
var event = createEvent(selectRef);
|
15
|
+
if (onChange) {
|
16
|
+
onChange(event);
|
17
|
+
}
|
18
|
+
}, [values]);
|
19
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SelectHidden, {
|
20
|
+
ref: forkRef,
|
21
|
+
multiple: multiple,
|
22
|
+
name: name,
|
23
|
+
hidden: true,
|
24
|
+
value: multiple ? values : values[0]
|
25
|
+
}, values.map(function (v) {
|
26
|
+
return /*#__PURE__*/React.createElement("option", {
|
27
|
+
key: v,
|
28
|
+
value: v
|
29
|
+
}, v);
|
30
|
+
})));
|
31
|
+
});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal"
|
1
|
+
var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal"];
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -60,7 +60,6 @@ export var dropdownRoot = function dropdownRoot(Root) {
|
|
60
60
|
_ref$alwaysOpened = _ref.alwaysOpened,
|
61
61
|
alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
|
62
62
|
portal = _ref.portal,
|
63
|
-
renderItem = _ref.renderItem,
|
64
63
|
rest = _objectWithoutProperties(_ref, _excluded);
|
65
64
|
var _useReducer = useReducer(pathReducer, []),
|
66
65
|
_useReducer2 = _slicedToArray(_useReducer, 2),
|
@@ -136,8 +135,7 @@ export var dropdownRoot = function dropdownRoot(Root) {
|
|
136
135
|
onItemClick: onItemClick,
|
137
136
|
onItemSelect: onItemSelect,
|
138
137
|
hasArrow: hasArrow,
|
139
|
-
treeId: treeId
|
140
|
-
renderItem: renderItem
|
138
|
+
treeId: treeId
|
141
139
|
}
|
142
140
|
}, /*#__PURE__*/React.createElement(FloatingPopover, {
|
143
141
|
ref: floatingPopoverRef,
|
@@ -4,7 +4,7 @@ import { cx } from '../../../../utils';
|
|
4
4
|
import { IconDisclosureRight } from '../../../_Icon';
|
5
5
|
import { Context } from '../../Dropdown';
|
6
6
|
import { getItemId } from '../../utils';
|
7
|
-
import { Wrapper, DisclosureIconWrapper, Divider, CellWrapper, StyledCell
|
7
|
+
import { Wrapper, DisclosureIconWrapper, Divider, CellWrapper, StyledCell } from './DropdownItem.styles';
|
8
8
|
export var DropdownItem = function DropdownItem(_ref) {
|
9
9
|
var item = _ref.item,
|
10
10
|
path = _ref.path,
|
@@ -34,8 +34,7 @@ export var DropdownItem = function DropdownItem(_ref) {
|
|
34
34
|
onItemSelect = _useContext.onItemSelect,
|
35
35
|
onItemClick = _useContext.onItemClick,
|
36
36
|
hasArrow = _useContext.hasArrow,
|
37
|
-
treeId = _useContext.treeId
|
38
|
-
renderItem = _useContext.renderItem;
|
37
|
+
treeId = _useContext.treeId;
|
39
38
|
var hasDescendants = Boolean(item.items);
|
40
39
|
var disclosureIconSize = size === 'xs' ? 'xs' : 's';
|
41
40
|
var isDisabledClassName = disabled || isDisabled ? classes.dropdownItemIsDisabled : undefined;
|
@@ -86,7 +85,7 @@ export var DropdownItem = function DropdownItem(_ref) {
|
|
86
85
|
"aria-expanded": ariaExpanded,
|
87
86
|
"aria-level": ariaLevel,
|
88
87
|
"aria-label": ariaLabel
|
89
|
-
},
|
88
|
+
}, /*#__PURE__*/React.createElement(CellWrapper, null, /*#__PURE__*/React.createElement(StyledCell, {
|
90
89
|
contentLeft: contentLeft,
|
91
90
|
contentRight: contentRight,
|
92
91
|
alignContentLeft: "center",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
2
|
import { classes, tokens, constants } from '../../Dropdown.tokens';
|
3
|
-
import { addFocus
|
3
|
+
import { addFocus } from '../../../../mixins';
|
4
4
|
import { cellConfig, cellTokens } from '../../../Cell';
|
5
5
|
import { component, mergeConfig } from '../../../../engines';
|
6
6
|
var mergedCellConfig = /*#__PURE__*/mergeConfig(cellConfig);
|
@@ -35,7 +35,4 @@ export var Wrapper = /*#__PURE__*/styled.li.withConfig({
|
|
35
35
|
outlineRadius: /*#__PURE__*/"var(".concat(tokens.itemBorderRadius, ")"),
|
36
36
|
hasTransition: false,
|
37
37
|
customFocusRules: /*#__PURE__*/"\n &.".concat(classes.dropdownItemIsFocused, ":before {\n outline: none;\n box-shadow: 0 0 0 0.0625rem var(").concat(constants.focusColor, ");\n }\n ")
|
38
|
-
}));
|
39
|
-
export var RenderItemWrapper = /*#__PURE__*/styled.div.withConfig({
|
40
|
-
componentId: "plasma-new-hope__sc-hs0ek1-5"
|
41
|
-
})(["", ";flex:1;"], /*#__PURE__*/applyEllipsis());
|
38
|
+
}));
|
@@ -272,6 +272,7 @@ export var selectRoot = function selectRoot(Root) {
|
|
272
272
|
handleItemClick: handleItemClick,
|
273
273
|
variant: variant,
|
274
274
|
renderItem: renderItem,
|
275
|
+
valueToItemMap: valueToItemMap,
|
275
276
|
treeId: treeId
|
276
277
|
}
|
277
278
|
}, /*#__PURE__*/React.createElement(FloatingPopover, {
|
@@ -32,6 +32,7 @@ export var Item = function Item(_ref) {
|
|
32
32
|
handleItemClick = _useContext.handleItemClick,
|
33
33
|
variant = _useContext.variant,
|
34
34
|
renderItem = _useContext.renderItem,
|
35
|
+
valueToItemMap = _useContext.valueToItemMap,
|
35
36
|
treeId = _useContext.treeId;
|
36
37
|
var itemDisabled = Boolean(disabled || isDisabled);
|
37
38
|
var disabledClassName = itemDisabled ? classes.dropdownItemIsDisabled : undefined;
|
@@ -86,7 +87,7 @@ export var Item = function Item(_ref) {
|
|
86
87
|
}))), !multiselect && checked.get(item.value) === 'done' && /*#__PURE__*/React.createElement(IconDone, {
|
87
88
|
size: sizeToIconSize(size, variant),
|
88
89
|
color: "inherit"
|
89
|
-
})), renderItem ? /*#__PURE__*/React.createElement(StyledText, null, renderItem(
|
90
|
+
})), renderItem ? /*#__PURE__*/React.createElement(StyledText, null, renderItem(valueToItemMap.get(value))) : /*#__PURE__*/React.createElement(StyledWrapper, null, /*#__PURE__*/React.createElement(StyledCell, {
|
90
91
|
contentLeft: contentLeft,
|
91
92
|
contentRight: contentRight
|
92
93
|
// TODO: #1548
|
@@ -1,10 +1,4 @@
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
2
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
3
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
4
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
5
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
6
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
7
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
8
2
|
import React, { forwardRef } from 'react';
|
9
3
|
import { sizeToIconSize, getItemId } from '../../../../utils';
|
10
4
|
import { classes } from '../../../../Select.tokens';
|
@@ -53,24 +47,9 @@ export var Textfield = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
53
47
|
|
54
48
|
// Обработчик чипов
|
55
49
|
var handleChipsChange = function handleChipsChange(chipLabels) {
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
// Из лейблов чипов получаем value у item и далее прокидываем его в onChange.
|
60
|
-
if (renderValue && !isTargetAmount) {
|
61
|
-
var resultValues = _toConsumableArray(value);
|
62
|
-
value.forEach(function (_, index) {
|
63
|
-
var labelAfterRenderValue = renderValue(labelToItemMap.get(valueToItemMap.get(value[index]).label));
|
64
|
-
if (!chipLabels.includes(labelAfterRenderValue)) {
|
65
|
-
resultValues.splice(index, 1);
|
66
|
-
}
|
67
|
-
});
|
68
|
-
onChange(resultValues);
|
69
|
-
} else {
|
70
|
-
onChange(chipLabels.map(function (chipLabel) {
|
71
|
-
return labelToItemMap.get(chipLabel).value;
|
72
|
-
}));
|
73
|
-
}
|
50
|
+
onChange(chipLabels.map(function (chipLabel) {
|
51
|
+
return labelToItemMap.get(chipLabel).value;
|
52
|
+
}));
|
74
53
|
};
|
75
54
|
return /*#__PURE__*/React.createElement(StyledTextField, _extends({
|
76
55
|
ref: ref,
|
@@ -353,11 +353,11 @@ const items = [
|
|
353
353
|
|
354
354
|
const SingleStory = (args: StorySelectProps) => {
|
355
355
|
const [value, setValue] = useState('');
|
356
|
-
|
357
356
|
return (
|
358
357
|
<div style={{ width: '400px' }}>
|
359
358
|
<Combobox
|
360
359
|
{...args}
|
360
|
+
name="mau"
|
361
361
|
items={items}
|
362
362
|
value={value}
|
363
363
|
onChange={setValue}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
export var createEvent = function createEvent(ref) {
|
2
|
+
if (ref.current) {
|
3
|
+
var event = new Event('change', {
|
4
|
+
bubbles: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(event, 'target', {
|
7
|
+
writable: false,
|
8
|
+
value: ref.current
|
9
|
+
});
|
10
|
+
var syntheticEvent = createSyntheticEvent(event);
|
11
|
+
return syntheticEvent;
|
12
|
+
}
|
13
|
+
return null;
|
14
|
+
};
|
15
|
+
var createSyntheticEvent = function createSyntheticEvent(event) {
|
16
|
+
var _isDefaultPrevented = false;
|
17
|
+
var _isPropagationStopped = false;
|
18
|
+
var preventDefault = function preventDefault() {
|
19
|
+
_isDefaultPrevented = true;
|
20
|
+
event.preventDefault();
|
21
|
+
};
|
22
|
+
var stopPropagation = function stopPropagation() {
|
23
|
+
_isPropagationStopped = true;
|
24
|
+
event.stopPropagation();
|
25
|
+
};
|
26
|
+
return {
|
27
|
+
nativeEvent: event,
|
28
|
+
currentTarget: event.currentTarget,
|
29
|
+
target: event.target,
|
30
|
+
bubbles: event.bubbles,
|
31
|
+
cancelable: event.cancelable,
|
32
|
+
defaultPrevented: event.defaultPrevented,
|
33
|
+
eventPhase: event.eventPhase,
|
34
|
+
isTrusted: event.isTrusted,
|
35
|
+
preventDefault: preventDefault,
|
36
|
+
isDefaultPrevented: function isDefaultPrevented() {
|
37
|
+
return _isDefaultPrevented;
|
38
|
+
},
|
39
|
+
stopPropagation: stopPropagation,
|
40
|
+
isPropagationStopped: function isPropagationStopped() {
|
41
|
+
return _isPropagationStopped;
|
42
|
+
},
|
43
|
+
persist: function persist() {},
|
44
|
+
timeStamp: event.timeStamp,
|
45
|
+
type: event.type
|
46
|
+
};
|
47
|
+
};
|
@@ -5,6 +5,7 @@ export { IS_REACT_18, safeUseId } from './react';
|
|
5
5
|
export { isNumber } from './isNumber';
|
6
6
|
export { mergeRefs, setRefList } from './setRefList';
|
7
7
|
export { isEmpty } from './isEmpty';
|
8
|
+
export { createEvent } from './createEvent';
|
8
9
|
import * as _constants from './constants';
|
9
10
|
export { _constants as constants };
|
10
11
|
export * from './getPopoverPlacement';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAqB7C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMnE,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AAEH,eAAO,MAAM,YAAY,SAAU,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC,+IA2atF,CAAC;AAEP,eAAO,MAAM,cAAc;;;mBA7aQ,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;CAkc3F,CAAC"}
|
@@ -1,13 +1,15 @@
|
|
1
|
-
import type { CSSProperties, ButtonHTMLAttributes } from 'react';
|
1
|
+
import type { CSSProperties, ButtonHTMLAttributes, ChangeEventHandler } from 'react';
|
2
2
|
import React from 'react';
|
3
3
|
import { RequiredProps } from '../../TextField/TextField.types';
|
4
4
|
import { FocusedPathState } from './reducers';
|
5
5
|
import { ItemOption, ItemOptionTransformed } from './ui/Inner/ui/Item/Item.types';
|
6
|
-
import type { ValueToCheckedMapType } from './hooks/getPathMaps';
|
6
|
+
import type { ValueToCheckedMapType, ValueToItemMapType } from './hooks/getPathMaps';
|
7
7
|
declare type Placement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
8
8
|
declare type IsMultiselect<T extends ItemOption = ItemOption> = {
|
9
|
+
name?: never;
|
9
10
|
multiple?: false;
|
10
11
|
value?: string;
|
12
|
+
defaultValue?: never;
|
11
13
|
onChange?: (value: string) => void;
|
12
14
|
/**
|
13
15
|
* Если включено - будет выведено общее количество выбранных элементов вместо перечисления.
|
@@ -23,6 +25,7 @@ declare type IsMultiselect<T extends ItemOption = ItemOption> = {
|
|
23
25
|
} | {
|
24
26
|
multiple: true;
|
25
27
|
value?: Array<string>;
|
28
|
+
defaultValue?: never;
|
26
29
|
onChange?: (value: Array<string>) => void;
|
27
30
|
isTargetAmount?: true;
|
28
31
|
targetAmount?: number;
|
@@ -30,6 +33,25 @@ declare type IsMultiselect<T extends ItemOption = ItemOption> = {
|
|
30
33
|
* Callback для кастомной настройки значения в селекте.
|
31
34
|
*/
|
32
35
|
renderValue?: (item: T) => string;
|
36
|
+
name?: never;
|
37
|
+
} | {
|
38
|
+
multiple: true;
|
39
|
+
value?: string[];
|
40
|
+
defaultValue?: string[];
|
41
|
+
onChange?: ChangeEventHandler;
|
42
|
+
isTargetAmount?: never | false;
|
43
|
+
targetAmount?: never;
|
44
|
+
renderValue?: never;
|
45
|
+
name: string;
|
46
|
+
} | {
|
47
|
+
multiple?: false;
|
48
|
+
value?: string;
|
49
|
+
defaultValue?: string;
|
50
|
+
onChange?: ChangeEventHandler;
|
51
|
+
isTargetAmount?: never | false;
|
52
|
+
targetAmount?: never;
|
53
|
+
renderValue?: never;
|
54
|
+
name: string;
|
33
55
|
};
|
34
56
|
declare type ViewStateProps = {
|
35
57
|
/**
|
@@ -155,7 +177,7 @@ declare type BasicProps<T extends ItemOption = ItemOption> = {
|
|
155
177
|
*/
|
156
178
|
labelPlacement?: 'outer' | 'inner';
|
157
179
|
};
|
158
|
-
export declare type ComboboxProps<T extends ItemOption = ItemOption> = BasicProps<T> & ViewStateProps & IsMultiselect<T> & RequiredProps & Omit<ButtonHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'>;
|
180
|
+
export declare type ComboboxProps<T extends ItemOption = ItemOption> = BasicProps<T> & ViewStateProps & IsMultiselect<T> & RequiredProps & Omit<ButtonHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'name' | 'defaultValue'>;
|
159
181
|
export declare type FloatingPopoverProps = {
|
160
182
|
target: React.ReactNode | ((ref: React.MutableRefObject<HTMLElement | null>) => React.ReactNode);
|
161
183
|
children: React.ReactNode;
|
@@ -175,6 +197,7 @@ export declare type ItemContext = {
|
|
175
197
|
handleItemClick: (item: ItemOptionTransformed, e: React.MouseEvent<HTMLElement>) => void;
|
176
198
|
variant: ComboboxProps['variant'];
|
177
199
|
renderItem: ComboboxProps['renderItem'];
|
200
|
+
valueToItemMap: ValueToItemMapType;
|
178
201
|
treeId: string;
|
179
202
|
};
|
180
203
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Combobox.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"Combobox.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,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EAAc,MAAM,OAAO,CAAC;AAStD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAazC,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,
|
1
|
+
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAU,EAAE,EAAc,MAAM,OAAO,CAAC;AAStD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAazC,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAqH9B,CAAC"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import React, { ChangeEvent } from 'react';
|
2
|
+
import { ComboboxProps } from '../../Combobox.types';
|
3
|
+
export declare const SelectNative: React.ForwardRefExoticComponent<Pick<ComboboxProps<import("../..").ItemOption>, "name" | "value" | "multiple"> & {
|
4
|
+
onChange: (value: ChangeEvent<HTMLSelectElement> | null) => void;
|
5
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
6
|
+
//# sourceMappingURL=SelectNative.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SelectNative.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAiC,MAAM,OAAO,CAAC;AAI1E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAQrD,eAAO,MAAM,YAAY;sBAHH,YAAY,iBAAiB,CAAC,GAAG,IAAI,KAAK,IAAI;0CA0BlE,CAAC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const SelectHidden: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSelectElement> & import("react").SelectHTMLAttributes<HTMLSelectElement> & Record<never, unknown>>;
|
3
|
+
//# sourceMappingURL=SelectNative.styles.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SelectNative.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Combobox/ComboboxNew/ui/SelectNative/SelectNative.styles.ts"],"names":[],"mappings":";AAIA,eAAO,MAAM,YAAY,iLAExB,CAAC"}
|
@@ -5,59 +5,11 @@ export declare const Context: React.Context<ItemContext>;
|
|
5
5
|
/**
|
6
6
|
* Выпадающий список.
|
7
7
|
*/
|
8
|
-
export declare const dropdownRoot: (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) => React.ForwardRefExoticComponent<
|
9
|
-
items: import(".").DropdownItemOption[];
|
10
|
-
alwaysOpened?: boolean | undefined;
|
11
|
-
children?: React.ReactNode;
|
12
|
-
itemRole?: string | undefined;
|
13
|
-
onHover?: ((index: number) => void) | undefined;
|
14
|
-
onItemSelect?: ((item: import(".").DropdownItemOption, event: React.SyntheticEvent<Element, Event>) => void) | undefined;
|
15
|
-
trigger?: import("./Dropdown.types").DropdownTrigger | undefined;
|
16
|
-
placement?: import("./Dropdown.types").DropdownPlacement | undefined;
|
17
|
-
offset?: [number, number] | undefined;
|
18
|
-
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
19
|
-
hasArrow?: boolean | undefined;
|
20
|
-
closeOnSelect?: boolean | undefined;
|
21
|
-
closeOnOverlayClick?: boolean | undefined;
|
22
|
-
onToggle?: ((isOpen: boolean, event: Event | React.SyntheticEvent<Element, Event>) => void) | undefined;
|
23
|
-
size?: string | undefined;
|
24
|
-
view?: string | undefined;
|
25
|
-
variant?: "normal" | "tight" | undefined;
|
26
|
-
portal?: string | React.RefObject<HTMLElement> | undefined;
|
27
|
-
renderItem?: ((item: import(".").DropdownItemOption) => React.ReactNode) | undefined;
|
28
|
-
onItemClick?: ((item: import(".").DropdownItemOption, event: React.SyntheticEvent<Element, Event>) => void) | undefined;
|
29
|
-
listOverflow?: import("csstype").Property.Overflow | undefined;
|
30
|
-
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
31
|
-
hoverIndex?: number | undefined;
|
32
|
-
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
8
|
+
export declare const dropdownRoot: (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) => React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLDivElement>>;
|
33
9
|
export declare const dropdownConfig: {
|
34
10
|
name: string;
|
35
11
|
tag: string;
|
36
|
-
layout: (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) => React.ForwardRefExoticComponent<
|
37
|
-
items: import(".").DropdownItemOption[];
|
38
|
-
alwaysOpened?: boolean | undefined;
|
39
|
-
children?: React.ReactNode;
|
40
|
-
itemRole?: string | undefined;
|
41
|
-
onHover?: ((index: number) => void) | undefined;
|
42
|
-
onItemSelect?: ((item: import(".").DropdownItemOption, event: React.SyntheticEvent<Element, Event>) => void) | undefined;
|
43
|
-
trigger?: import("./Dropdown.types").DropdownTrigger | undefined;
|
44
|
-
placement?: import("./Dropdown.types").DropdownPlacement | undefined;
|
45
|
-
offset?: [number, number] | undefined;
|
46
|
-
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
47
|
-
hasArrow?: boolean | undefined;
|
48
|
-
closeOnSelect?: boolean | undefined;
|
49
|
-
closeOnOverlayClick?: boolean | undefined;
|
50
|
-
onToggle?: ((isOpen: boolean, event: Event | React.SyntheticEvent<Element, Event>) => void) | undefined;
|
51
|
-
size?: string | undefined;
|
52
|
-
view?: string | undefined;
|
53
|
-
variant?: "normal" | "tight" | undefined;
|
54
|
-
portal?: string | React.RefObject<HTMLElement> | undefined;
|
55
|
-
renderItem?: ((item: import(".").DropdownItemOption) => React.ReactNode) | undefined;
|
56
|
-
onItemClick?: ((item: import(".").DropdownItemOption, event: React.SyntheticEvent<Element, Event>) => void) | undefined;
|
57
|
-
listOverflow?: import("csstype").Property.Overflow | undefined;
|
58
|
-
listHeight?: import("csstype").Property.Height<string | number> | undefined;
|
59
|
-
hoverIndex?: number | undefined;
|
60
|
-
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
12
|
+
layout: (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) => React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLDivElement>>;
|
61
13
|
base: import("@linaria/core").LinariaClassName;
|
62
14
|
variations: {
|
63
15
|
view: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAG7E,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAW1C,OAAO,KAAK,EAAE,aAAa,EAA0B,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM3F,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,cAAc,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC
|
1
|
+
{"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAG7E,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAW1C,OAAO,KAAK,EAAE,aAAa,EAA0B,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM3F,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,cAAc,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC,yFAyJrF,CAAC;AAEN,eAAO,MAAM,cAAc;;;mBA3JQ,UAAU,cAAc,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;CA4KzF,CAAC"}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import type { HTMLAttributes, ReactNode, SyntheticEvent
|
1
|
+
import type { CSSProperties, HTMLAttributes, ReactNode, SyntheticEvent } from 'react';
|
2
2
|
import React from 'react';
|
3
3
|
import { FocusedPathState } from './reducers/focusedPathReducer';
|
4
4
|
import { DropdownItemOption } from './ui/DropdownItem/DropdownItem.type';
|
5
5
|
export declare type DropdownPlacement = 'auto' | 'top' | 'right' | 'bottom' | 'left';
|
6
6
|
export declare type DropdownTrigger = 'hover' | 'click';
|
7
|
-
export
|
7
|
+
export interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
|
8
8
|
/**
|
9
9
|
* Список элементов.
|
10
10
|
*/
|
11
|
-
items:
|
11
|
+
items: Array<DropdownItemOption>;
|
12
12
|
/**
|
13
13
|
* Дропдаун открыт всегда.
|
14
14
|
*/
|
@@ -29,7 +29,7 @@ export declare type DropdownProps<T extends DropdownItemOption = DropdownItemOpt
|
|
29
29
|
/**
|
30
30
|
* Обработчик выбора item.
|
31
31
|
*/
|
32
|
-
onItemSelect?: (item:
|
32
|
+
onItemSelect?: (item: DropdownItemOption, event: SyntheticEvent) => void;
|
33
33
|
/**
|
34
34
|
* Способ открытия дропдауна окна - наведение или клик мышью.
|
35
35
|
* @default click
|
@@ -80,15 +80,11 @@ export declare type DropdownProps<T extends DropdownItemOption = DropdownItemOpt
|
|
80
80
|
* Портал для выпадающего списка. Принимает id контейнера или ref.
|
81
81
|
*/
|
82
82
|
portal?: string | React.RefObject<HTMLElement>;
|
83
|
-
/**
|
84
|
-
* Callback для кастомной настройки айтема в выпадающем списке.
|
85
|
-
*/
|
86
|
-
renderItem?: (item: T) => React.ReactNode;
|
87
83
|
/**
|
88
84
|
* Обработчик клика по item.
|
89
85
|
* @deprecated использовать onItemSelect.
|
90
86
|
*/
|
91
|
-
onItemClick?: (item:
|
87
|
+
onItemClick?: (item: DropdownItemOption, event: SyntheticEvent) => void;
|
92
88
|
/**
|
93
89
|
* Значение css overflow для выпадающего меню.
|
94
90
|
* @default initial
|
@@ -108,7 +104,7 @@ export declare type DropdownProps<T extends DropdownItemOption = DropdownItemOpt
|
|
108
104
|
* @deprecated использовать onHover
|
109
105
|
*/
|
110
106
|
hoverIndex?: number;
|
111
|
-
}
|
107
|
+
}
|
112
108
|
export declare type HandleGlobalToggleType = (opened: boolean, event: SyntheticEvent | Event) => void;
|
113
109
|
export declare type PlacementType = 'auto' | 'top-start' | 'right-start' | 'bottom-start' | 'left-start';
|
114
110
|
export declare type FloatingPopoverProps = {
|
@@ -134,6 +130,5 @@ export declare type ItemContext = {
|
|
134
130
|
onItemClick: DropdownProps['onItemClick'];
|
135
131
|
hasArrow: DropdownProps['hasArrow'];
|
136
132
|
treeId: string;
|
137
|
-
renderItem: DropdownProps['renderItem'];
|
138
133
|
};
|
139
134
|
//# sourceMappingURL=Dropdown.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dropdown.types.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,
|
1
|
+
{"version":3,"file":"Dropdown.types.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACtF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,oBAAY,iBAAiB,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE7E,oBAAY,eAAe,GAAG,OAAO,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;I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IAClC,YAAY,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC5C,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAC1C,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
@@ -4,5 +4,4 @@ export { useKeyNavigation as useDropdownKeyNavigation } from './hooks/useKeyboar
|
|
4
4
|
export type { DropdownProps, DropdownPlacementBasic, DropdownPlacement, DropdownTrigger, } from './ui/DropdownOld/Dropdown.types';
|
5
5
|
export type { DropdownItemProps, DropdownItemOption } from './ui/DropdownItem/DropdownItem.type';
|
6
6
|
export * from './ui';
|
7
|
-
export type { DropdownProps as DropdownNewProps } from './Dropdown.types';
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,gBAAgB,IAAI,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC7F,YAAY,EACR,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,GAClB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACjG,cAAc,MAAM,CAAC
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,gBAAgB,IAAI,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC7F,YAAY,EACR,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,GAClB,MAAM,iCAAiC,CAAC;AACzC,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACjG,cAAc,MAAM,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DropdownItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAqB,EAAE,EAAc,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"DropdownItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAqB,EAAE,EAAc,MAAM,OAAO,CAAC;AASjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA8G9C,CAAC"}
|
@@ -39,5 +39,4 @@ export declare const Divider: import("@linaria/react").StyledComponent<import("r
|
|
39
39
|
export declare const Wrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & {
|
40
40
|
variant: DropdownProps['variant'];
|
41
41
|
}>;
|
42
|
-
export declare const RenderItemWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
43
42
|
//# sourceMappingURL=DropdownItem.styles.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DropdownItem.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.styles.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAOrD,eAAO,MAAM,WAAW,qKAgBvB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qGAAiB,CAAC;AAEzC,eAAO,MAAM,qBAAqB,qKAGjC,CAAC;AAEF,eAAO,MAAM,OAAO;aAAyB,aAAa,CAAC,SAAS,CAAC;EASpE,CAAC;AAEF,eAAO,MAAM,OAAO;aAAwB,aAAa,CAAC,SAAS,CAAC;EAmDnE,CAAC
|
1
|
+
{"version":3,"file":"DropdownItem.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.styles.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAOrD,eAAO,MAAM,WAAW,qKAgBvB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qGAAiB,CAAC;AAEzC,eAAO,MAAM,qBAAqB,qKAGjC,CAAC;AAEF,eAAO,MAAM,OAAO;aAAyB,aAAa,CAAC,SAAS,CAAC;EASpE,CAAC;AAEF,eAAO,MAAM,OAAO;aAAwB,aAAa,CAAC,SAAS,CAAC;EAmDnE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4F,MAAM,OAAO,CAAC;AAGjH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAiB1C,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIrE,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,UAAU,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,OAAO,CAAC,CAAC,
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4F,MAAM,OAAO,CAAC;AAGjH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAiB1C,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAIrE,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,UAAU,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,OAAO,CAAC,CAAC,kJAuUzF,CAAC;AAEP,eAAO,MAAM,YAAY;;;mBAzUQ,UAAU,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,OAAO,CAAC,CAAC;;;;;;;;;CAqV9F,CAAC"}
|
@@ -2,7 +2,7 @@ import type { CSSProperties, ButtonHTMLAttributes, SyntheticEvent } from 'react'
|
|
2
2
|
import React from 'react';
|
3
3
|
import { FocusedPathState } from './reducers';
|
4
4
|
import { ItemOption, MergedDropdownNode as DropdownNode, MergedDropdownNodeTransformed } from './ui/Inner/ui/Item/Item.types';
|
5
|
-
import type { ValueToCheckedMapType } from './hooks/usePathMaps';
|
5
|
+
import type { ValueToCheckedMapType, ValueToItemMapType } from './hooks/usePathMaps';
|
6
6
|
declare type SelectPlacementBasic = 'top' | 'bottom' | 'right' | 'left';
|
7
7
|
declare type SelectPlacement = 'top' | 'bottom' | 'right' | 'left' | 'auto';
|
8
8
|
declare type Target = {
|
@@ -141,6 +141,7 @@ export declare type ItemContext = {
|
|
141
141
|
handleItemClick: (item: MergedDropdownNodeTransformed, e: React.MouseEvent<HTMLElement>) => void;
|
142
142
|
variant: MergedSelectProps['variant'];
|
143
143
|
renderItem: MergedSelectProps['renderItem'];
|
144
|
+
valueToItemMap: ValueToItemMapType;
|
144
145
|
treeId: string;
|
145
146
|
};
|
146
147
|
export declare type SelectPropsOld<T = any> = ({
|