@digigov/ui 2.0.0-cbc56209 → 2.0.0-fec6f1f7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/content/SafeHTML/index.js +5 -8
- package/cjs/form/AutoComplete/AutoComplete.stories/index.js +44 -8
- package/cjs/form/AutoComplete/AutoComplete.stories.playwright.json +33 -0
- package/cjs/form/AutoComplete/Status/index.js +12 -5
- package/cjs/form/AutoComplete/__stories__/Multiple/index.js +24 -0
- package/cjs/form/AutoComplete/__stories__/{WithInLine → MultipleShowingTwoSelected}/index.js +7 -6
- package/cjs/form/AutoComplete/__stories__/MultipleWithDefaultValues/index.js +23 -0
- package/cjs/form/AutoComplete/__stories__/MultipleWithMinLength/index.js +26 -0
- package/cjs/form/AutoComplete/__stories__/WithShowAllValues/index.js +0 -1
- package/cjs/form/AutoComplete/index.js +312 -202
- package/cjs/form/AutoComplete/index.mdx +0 -8
- package/cjs/form/AutoComplete/utils/index.js +2 -1
- package/cjs/govgr/Footer/index.mdx +0 -2
- package/cjs/i18n/locales/el/index.js +2 -2
- package/cjs/i18n/locales/en/index.js +2 -2
- package/cjs/lazy/index.js +26 -8
- package/cjs/navigation/Dropdown/Dropdown.stories/index.js +12 -0
- package/cjs/navigation/Dropdown/Dropdown.stories.playwright.json +16 -0
- package/cjs/navigation/Dropdown/__stories__/ScrollableContent/index.js +68 -0
- package/content/SafeHTML/index.d.ts +1 -1
- package/content/SafeHTML/index.js +5 -8
- package/form/AutoComplete/AutoComplete.stories/index.js +4 -1
- package/form/AutoComplete/AutoComplete.stories.d.ts +4 -1
- package/form/AutoComplete/AutoComplete.stories.playwright.json +33 -0
- package/form/AutoComplete/Status/index.d.ts +4 -2
- package/form/AutoComplete/Status/index.js +11 -4
- package/form/AutoComplete/__stories__/Multiple/index.js +17 -0
- package/form/AutoComplete/__stories__/{WithInLine → Multiple}/package.json +1 -1
- package/form/AutoComplete/__stories__/Multiple.d.ts +3 -0
- package/form/AutoComplete/__stories__/{WithInLine → MultipleShowingTwoSelected}/index.js +6 -5
- package/form/AutoComplete/__stories__/MultipleShowingTwoSelected/package.json +6 -0
- package/form/AutoComplete/__stories__/MultipleShowingTwoSelected.d.ts +3 -0
- package/form/AutoComplete/__stories__/MultipleWithDefaultValues/index.js +16 -0
- package/form/AutoComplete/__stories__/MultipleWithDefaultValues/package.json +6 -0
- package/form/AutoComplete/__stories__/MultipleWithDefaultValues.d.ts +3 -0
- package/form/AutoComplete/__stories__/MultipleWithMinLength/index.js +19 -0
- package/form/AutoComplete/__stories__/MultipleWithMinLength/package.json +6 -0
- package/form/AutoComplete/__stories__/MultipleWithMinLength.d.ts +3 -0
- package/form/AutoComplete/__stories__/WithShowAllValues/index.js +0 -1
- package/form/AutoComplete/index.d.ts +12 -18
- package/form/AutoComplete/index.js +295 -197
- package/form/AutoComplete/index.mdx +0 -8
- package/form/AutoComplete/utils/index.js +2 -1
- package/form/AutoComplete/utils.d.ts +1 -0
- package/govgr/Footer/index.mdx +0 -2
- package/i18n/locales/el/index.js +2 -2
- package/i18n/locales/en/index.js +2 -2
- package/index.js +1 -1
- package/lazy/index.js +22 -8
- package/lazy.d.ts +8 -6
- package/navigation/Dropdown/Dropdown.stories/index.js +1 -0
- package/navigation/Dropdown/Dropdown.stories.d.ts +1 -0
- package/navigation/Dropdown/Dropdown.stories.playwright.json +16 -0
- package/navigation/Dropdown/__stories__/ScrollableContent/index.js +61 -0
- package/navigation/Dropdown/__stories__/ScrollableContent/package.json +6 -0
- package/navigation/Dropdown/__stories__/ScrollableContent.d.ts +3 -0
- package/navigation/NavList/types.d.ts +1 -2
- package/package.json +4 -6
- package/src/content/SafeHTML/index.tsx +3 -4
- package/src/form/AutoComplete/AutoComplete.stories.js +4 -1
- package/src/form/AutoComplete/AutoComplete.stories.playwright.json +33 -0
- package/src/form/AutoComplete/Status/index.tsx +10 -6
- package/src/form/AutoComplete/__stories__/Multiple.tsx +18 -0
- package/src/form/AutoComplete/__stories__/{WithInLine.tsx → MultipleShowingTwoSelected.tsx} +3 -8
- package/src/form/AutoComplete/__stories__/MultipleWithDefaultValues.tsx +16 -0
- package/src/form/AutoComplete/__stories__/MultipleWithMinLength.tsx +29 -0
- package/src/form/AutoComplete/__stories__/WithShowAllValues.tsx +0 -1
- package/src/form/AutoComplete/index.mdx +0 -8
- package/src/form/AutoComplete/index.tsx +351 -213
- package/src/form/AutoComplete/utils.ts +3 -2
- package/src/govgr/Footer/index.mdx +0 -2
- package/src/i18n/locales/el.ts +2 -2
- package/src/i18n/locales/en.ts +2 -2
- package/src/lazy.js +4 -2
- package/src/navigation/Dropdown/Dropdown.stories.js +1 -0
- package/src/navigation/Dropdown/Dropdown.stories.playwright.json +16 -0
- package/src/navigation/Dropdown/__stories__/ScrollableContent.tsx +82 -0
- package/src/navigation/NavList/types.tsx +1 -2
- package/form/AutoComplete/__stories__/WithInLine.d.ts +0 -3
|
@@ -14,10 +14,24 @@ import AutoCompleteInput from '@digigov/react-core/AutoCompleteInput';
|
|
|
14
14
|
import AutoCompleteInputTypeahead from '@digigov/react-core/AutoCompleteInputTypeahead';
|
|
15
15
|
import AutoCompleteResultList from '@digigov/react-core/AutoCompleteResultList';
|
|
16
16
|
import AutoCompleteResultListItem from '@digigov/react-core/AutoCompleteResultListItem';
|
|
17
|
-
import
|
|
17
|
+
import AutoCompleteContainer from '@digigov/react-core/AutoCompleteContainer';
|
|
18
|
+
import AutoCompleteMultipleInputContainer from '@digigov/react-core/AutoCompleteMultipleInputContainer';
|
|
19
|
+
import AutoCompleteMultipleInput from '@digigov/react-core/AutoCompleteMultipleInput';
|
|
18
20
|
import { CaretIcon } from '@digigov/react-icons/CaretIcon';
|
|
19
21
|
import Status from '@digigov/ui/form/AutoComplete/Status';
|
|
20
22
|
import { isIosDevice, keyCodes, isPrintableKeyCode } from '@digigov/ui/form/AutoComplete/utils';
|
|
23
|
+
import Checkbox, { CheckboxItem } from "../Checkbox";
|
|
24
|
+
import { Chip, ChipContainer } from '@digigov/ui/content/Chip';
|
|
25
|
+
import Button from '@digigov/ui/form/Button';
|
|
26
|
+
import { NormalText } from '@digigov/ui/typography/NormalText';
|
|
27
|
+
var _ref2 = /*#__PURE__*/React.createElement(CaretIcon, {
|
|
28
|
+
direction: "down",
|
|
29
|
+
size: "md"
|
|
30
|
+
});
|
|
31
|
+
var _ref3 = /*#__PURE__*/React.createElement(CaretIcon, {
|
|
32
|
+
direction: "down",
|
|
33
|
+
size: "md"
|
|
34
|
+
});
|
|
21
35
|
var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
22
36
|
_inherits(AutoComplete, _Component);
|
|
23
37
|
function AutoComplete(props) {
|
|
@@ -26,32 +40,41 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
26
40
|
_this = _callSuper(this, AutoComplete, [props]);
|
|
27
41
|
_this.elementReferences = {};
|
|
28
42
|
_this.$pollInput = void 0;
|
|
29
|
-
|
|
43
|
+
var customState = {};
|
|
44
|
+
if (Array.isArray(props.defaultValue)) {
|
|
45
|
+
customState.selectedValues = props.defaultValue;
|
|
46
|
+
} else if (props.defaultValue) {
|
|
47
|
+
customState.selectedValues = [props.defaultValue];
|
|
48
|
+
}
|
|
49
|
+
_this.state = _extends({
|
|
30
50
|
focused: null,
|
|
31
51
|
hovered: null,
|
|
32
52
|
menuOpen: false,
|
|
33
|
-
options:
|
|
34
|
-
query: props.defaultValue,
|
|
53
|
+
options: [],
|
|
54
|
+
query: _this.props.multiple ? '' : props.defaultValue || '',
|
|
55
|
+
selectedValues: [],
|
|
35
56
|
validChoiceMade: false,
|
|
36
57
|
selected: null,
|
|
37
58
|
ariaHint: true
|
|
38
|
-
};
|
|
59
|
+
}, customState);
|
|
39
60
|
_this.handleComponentBlur = _this.handleComponentBlur.bind(_assertThisInitialized(_this));
|
|
61
|
+
_this.handleAutoCompleteBlur = _this.handleAutoCompleteBlur.bind(_assertThisInitialized(_this));
|
|
40
62
|
_this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized(_this));
|
|
41
63
|
_this.handleUpArrow = _this.handleUpArrow.bind(_assertThisInitialized(_this));
|
|
42
64
|
_this.handleDownArrow = _this.handleDownArrow.bind(_assertThisInitialized(_this));
|
|
43
65
|
_this.handleEnter = _this.handleEnter.bind(_assertThisInitialized(_this));
|
|
44
66
|
_this.handlePrintableKey = _this.handlePrintableKey.bind(_assertThisInitialized(_this));
|
|
45
67
|
_this.handleListMouseLeave = _this.handleListMouseLeave.bind(_assertThisInitialized(_this));
|
|
46
|
-
|
|
47
|
-
|
|
68
|
+
if (_this.props.multiple) {
|
|
69
|
+
_this.handleOptionClick = _this.handleOptionClickMultiple.bind(_assertThisInitialized(_this));
|
|
70
|
+
} else {
|
|
71
|
+
_this.handleOptionClick = _this.handleOptionClick.bind(_assertThisInitialized(_this));
|
|
72
|
+
}
|
|
48
73
|
_this.handleOptionFocus = _this.handleOptionFocus.bind(_assertThisInitialized(_this));
|
|
49
74
|
_this.handleOptionMouseDown = _this.handleOptionMouseDown.bind(_assertThisInitialized(_this));
|
|
50
75
|
_this.handleOptionMouseEnter = _this.handleOptionMouseEnter.bind(_assertThisInitialized(_this));
|
|
51
|
-
_this.handleInputBlur = _this.handleInputBlur.bind(_assertThisInitialized(_this));
|
|
52
76
|
_this.handleInputChange = _this.handleInputChange.bind(_assertThisInitialized(_this));
|
|
53
77
|
_this.handleInputFocus = _this.handleInputFocus.bind(_assertThisInitialized(_this));
|
|
54
|
-
_this.pollInputElement = _this.pollInputElement.bind(_assertThisInitialized(_this));
|
|
55
78
|
_this.getDirectInputChanges = _this.getDirectInputChanges.bind(_assertThisInitialized(_this));
|
|
56
79
|
return _this;
|
|
57
80
|
}
|
|
@@ -66,32 +89,14 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
66
89
|
}, {
|
|
67
90
|
key: "componentDidMount",
|
|
68
91
|
value: function componentDidMount() {
|
|
69
|
-
this.pollInputElement();
|
|
70
|
-
}
|
|
71
|
-
}, {
|
|
72
|
-
key: "componentWillUnmount",
|
|
73
|
-
value: function componentWillUnmount() {
|
|
74
|
-
clearTimeout(this.$pollInput);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Applications like Dragon NaturallySpeaking will modify the
|
|
78
|
-
// `input` field by directly changing its `.value`. These events
|
|
79
|
-
// don't trigger our JavaScript event listeners, so we need to poll
|
|
80
|
-
// to handle when and if they occur.
|
|
81
|
-
}, {
|
|
82
|
-
key: "pollInputElement",
|
|
83
|
-
value: function pollInputElement() {
|
|
84
|
-
var _this3 = this;
|
|
85
92
|
this.getDirectInputChanges();
|
|
86
|
-
this.$pollInput = setTimeout(function () {
|
|
87
|
-
_this3.pollInputElement();
|
|
88
|
-
}, 100);
|
|
89
93
|
}
|
|
90
94
|
}, {
|
|
91
95
|
key: "getDirectInputChanges",
|
|
92
96
|
value: function getDirectInputChanges() {
|
|
97
|
+
var _this$state$query;
|
|
93
98
|
var inputReference = this.elementReferences[-1];
|
|
94
|
-
var queryHasChanged = inputReference && inputReference.value !== this.state.query;
|
|
99
|
+
var queryHasChanged = inputReference && inputReference.value !== ((_this$state$query = this.state.query) !== null && _this$state$query !== void 0 ? _this$state$query : '');
|
|
95
100
|
if (queryHasChanged) {
|
|
96
101
|
this.handleInputChange({
|
|
97
102
|
target: {
|
|
@@ -137,7 +142,7 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
137
142
|
key: "templateSuggestion",
|
|
138
143
|
value: function templateSuggestion(value) {
|
|
139
144
|
var suggestionTemplate = this.props.templates && this.props.templates.suggestion;
|
|
140
|
-
return suggestionTemplate ? suggestionTemplate(value) : value;
|
|
145
|
+
return suggestionTemplate ? suggestionTemplate(value, this.state.query) : value;
|
|
141
146
|
}
|
|
142
147
|
}, {
|
|
143
148
|
key: "handleComponentBlur",
|
|
@@ -149,14 +154,14 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
149
154
|
var newQuery;
|
|
150
155
|
if (this.props.confirmOnBlur) {
|
|
151
156
|
var _this$props$onConfirm, _this$props;
|
|
152
|
-
newQuery = newState.query || query;
|
|
157
|
+
newQuery = (newState === null || newState === void 0 ? void 0 : newState.query) || query;
|
|
153
158
|
(_this$props$onConfirm = (_this$props = this.props).onConfirm) === null || _this$props$onConfirm === void 0 ? void 0 : _this$props$onConfirm.call(_this$props, options[selected]);
|
|
154
159
|
} else {
|
|
155
160
|
newQuery = query;
|
|
156
161
|
}
|
|
157
162
|
this.setState({
|
|
158
163
|
focused: null,
|
|
159
|
-
menuOpen: newState.menuOpen || false,
|
|
164
|
+
menuOpen: (newState === null || newState === void 0 ? void 0 : newState.menuOpen) || false,
|
|
160
165
|
query: newQuery,
|
|
161
166
|
selected: null,
|
|
162
167
|
validChoiceMade: this.isQueryAnOption(newQuery, options)
|
|
@@ -170,40 +175,33 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
170
175
|
});
|
|
171
176
|
}
|
|
172
177
|
}, {
|
|
173
|
-
key: "
|
|
174
|
-
value: function
|
|
178
|
+
key: "handleAutoCompleteBlur",
|
|
179
|
+
value: function handleAutoCompleteBlur(event, index) {
|
|
175
180
|
var _this$state2 = this.state,
|
|
176
181
|
focused = _this$state2.focused,
|
|
177
|
-
menuOpen = _this$state2.menuOpen,
|
|
178
182
|
options = _this$state2.options,
|
|
183
|
+
query = _this$state2.query,
|
|
179
184
|
selected = _this$state2.selected;
|
|
180
|
-
var focusingOutsideComponent =
|
|
185
|
+
var focusingOutsideComponent = false;
|
|
186
|
+
if (event.relatedTarget === null) {
|
|
187
|
+
focusingOutsideComponent = true;
|
|
188
|
+
} else {
|
|
189
|
+
// This affects if we have multiple autocompletes in same page and we click the first button-arrow and then another button-arrow
|
|
190
|
+
focusingOutsideComponent = this.elementReferences['button-arrow'] !== event.relatedTarget;
|
|
191
|
+
}
|
|
181
192
|
var focusingInput = event.relatedTarget === this.elementReferences[-1];
|
|
182
|
-
var
|
|
183
|
-
var
|
|
184
|
-
if (
|
|
185
|
-
|
|
186
|
-
this.handleComponentBlur({
|
|
187
|
-
menuOpen: keepMenuOpen,
|
|
188
|
-
query: this.templateInputValue(options[selected])
|
|
189
|
-
});
|
|
193
|
+
var focusingButtonArrow = this.elementReferences['button-arrow'] === event.relatedTarget || false;
|
|
194
|
+
var focusingAnotherOption = focused !== null && focused !== -1;
|
|
195
|
+
if (index !== undefined) {
|
|
196
|
+
focusingAnotherOption = focused !== index && focused !== -1;
|
|
190
197
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
var _this$state3 = this.state,
|
|
196
|
-
focused = _this$state3.focused,
|
|
197
|
-
menuOpen = _this$state3.menuOpen,
|
|
198
|
-
options = _this$state3.options,
|
|
199
|
-
query = _this$state3.query,
|
|
200
|
-
selected = _this$state3.selected;
|
|
201
|
-
var focusingAnOption = focused !== -1;
|
|
202
|
-
if (!focusingAnOption) {
|
|
203
|
-
var keepMenuOpen = menuOpen && isIosDevice();
|
|
198
|
+
// Check if the user clicks outside and not either on option, either on input or on button arrow
|
|
199
|
+
var blurComponent = focusingOutsideComponent && !(focusingAnotherOption || focusingInput || focusingButtonArrow);
|
|
200
|
+
if (blurComponent) {
|
|
201
|
+
// In handleInputBlur:
|
|
204
202
|
var newQuery = isIosDevice() ? query : this.templateInputValue(options[selected]);
|
|
205
203
|
this.handleComponentBlur({
|
|
206
|
-
menuOpen:
|
|
204
|
+
menuOpen: false,
|
|
207
205
|
query: newQuery
|
|
208
206
|
});
|
|
209
207
|
}
|
|
@@ -211,37 +209,27 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
211
209
|
}, {
|
|
212
210
|
key: "handleInputChange",
|
|
213
211
|
value: function handleInputChange(event) {
|
|
214
|
-
var
|
|
212
|
+
var _this3 = this;
|
|
215
213
|
var _this$props2 = this.props,
|
|
216
|
-
minLength = _this$props2.minLength,
|
|
217
214
|
source = _this$props2.source,
|
|
218
|
-
|
|
215
|
+
minLength = _this$props2.minLength;
|
|
219
216
|
var autoselect = this.hasAutoselect();
|
|
220
217
|
var query = event.target.value;
|
|
221
218
|
var queryEmpty = query.length === 0;
|
|
222
|
-
var queryChanged = this.state.query.length !== query.length;
|
|
223
|
-
var queryLongEnough = query.length >= minLength;
|
|
224
219
|
this.setState({
|
|
225
220
|
query: query,
|
|
226
221
|
ariaHint: queryEmpty
|
|
227
222
|
});
|
|
228
|
-
var
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
validChoiceMade: false
|
|
237
|
-
});
|
|
223
|
+
var minLengthQuery = minLength != undefined && minLength > query.length ? '' : query;
|
|
224
|
+
source(minLengthQuery, function (options) {
|
|
225
|
+
var optionsAvailable = options.length > 0;
|
|
226
|
+
_this3.setState({
|
|
227
|
+
menuOpen: optionsAvailable,
|
|
228
|
+
options: options,
|
|
229
|
+
selected: autoselect && optionsAvailable ? 0 : -1,
|
|
230
|
+
validChoiceMade: false
|
|
238
231
|
});
|
|
239
|
-
}
|
|
240
|
-
this.setState({
|
|
241
|
-
menuOpen: false,
|
|
242
|
-
options: []
|
|
243
|
-
});
|
|
244
|
-
}
|
|
232
|
+
});
|
|
245
233
|
}
|
|
246
234
|
}, {
|
|
247
235
|
key: "handleInputClick",
|
|
@@ -251,10 +239,12 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
251
239
|
}, {
|
|
252
240
|
key: "handleInputFocus",
|
|
253
241
|
value: function handleInputFocus() {
|
|
254
|
-
var
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
242
|
+
var _this4 = this;
|
|
243
|
+
var source = this.props.source;
|
|
244
|
+
var _this$state3 = this.state,
|
|
245
|
+
query = _this$state3.query,
|
|
246
|
+
validChoiceMade = _this$state3.validChoiceMade,
|
|
247
|
+
options = _this$state3.options;
|
|
258
248
|
var minLength = this.props.minLength;
|
|
259
249
|
var shouldReopenMenu = !validChoiceMade && query.length >= minLength && options.length > 0;
|
|
260
250
|
if (shouldReopenMenu) {
|
|
@@ -267,8 +257,11 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
267
257
|
};
|
|
268
258
|
});
|
|
269
259
|
} else {
|
|
270
|
-
|
|
271
|
-
|
|
260
|
+
source(query, function (options) {
|
|
261
|
+
_this4.setState({
|
|
262
|
+
focused: -1,
|
|
263
|
+
options: options
|
|
264
|
+
});
|
|
272
265
|
});
|
|
273
266
|
}
|
|
274
267
|
}
|
|
@@ -292,18 +285,43 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
292
285
|
});
|
|
293
286
|
}
|
|
294
287
|
}
|
|
288
|
+
}, {
|
|
289
|
+
key: "handleOptionClickMultiple",
|
|
290
|
+
value: function handleOptionClickMultiple(index) {
|
|
291
|
+
var _this$props$onConfirm2, _this$props3;
|
|
292
|
+
var selectedOption = this.state.options[index];
|
|
293
|
+
var selectedValues = this.state.selectedValues;
|
|
294
|
+
if (this.state.selectedValues.indexOf(selectedOption) === -1) {
|
|
295
|
+
selectedValues = selectedValues.concat([selectedOption]);
|
|
296
|
+
} else {
|
|
297
|
+
selectedValues.splice(this.state.selectedValues.indexOf(selectedOption), 1);
|
|
298
|
+
}
|
|
299
|
+
(_this$props$onConfirm2 = (_this$props3 = this.props).onConfirm) === null || _this$props$onConfirm2 === void 0 ? void 0 : _this$props$onConfirm2.call(_this$props3, selectedValues);
|
|
300
|
+
this.setState({
|
|
301
|
+
focused: index,
|
|
302
|
+
hovered: null,
|
|
303
|
+
menuOpen: true,
|
|
304
|
+
query: '',
|
|
305
|
+
selectedValues: selectedValues,
|
|
306
|
+
selected: index,
|
|
307
|
+
validChoiceMade: true
|
|
308
|
+
});
|
|
309
|
+
this.forceUpdate();
|
|
310
|
+
}
|
|
295
311
|
}, {
|
|
296
312
|
key: "handleOptionClick",
|
|
297
313
|
value: function handleOptionClick(index) {
|
|
298
|
-
var _this$props$
|
|
314
|
+
var _this$props$onConfirm3, _this$props4;
|
|
299
315
|
var selectedOption = this.state.options[index];
|
|
300
316
|
var newQuery = this.templateInputValue(selectedOption);
|
|
301
|
-
(_this$props$
|
|
317
|
+
(_this$props$onConfirm3 = (_this$props4 = this.props).onConfirm) === null || _this$props$onConfirm3 === void 0 ? void 0 : _this$props$onConfirm3.call(_this$props4, selectedOption);
|
|
318
|
+
var selectedValues = this.props.multiple ? this.state.selectedValues.concat(selectedOption) : [selectedOption];
|
|
302
319
|
this.setState({
|
|
303
320
|
focused: -1,
|
|
304
321
|
hovered: null,
|
|
305
322
|
menuOpen: false,
|
|
306
323
|
query: newQuery,
|
|
324
|
+
selectedValues: selectedValues,
|
|
307
325
|
selected: -1,
|
|
308
326
|
validChoiceMade: true
|
|
309
327
|
});
|
|
@@ -324,9 +342,9 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
324
342
|
key: "handleUpArrow",
|
|
325
343
|
value: function handleUpArrow(event) {
|
|
326
344
|
event.preventDefault();
|
|
327
|
-
var _this$
|
|
328
|
-
menuOpen = _this$
|
|
329
|
-
selected = _this$
|
|
345
|
+
var _this$state4 = this.state,
|
|
346
|
+
menuOpen = _this$state4.menuOpen,
|
|
347
|
+
selected = _this$state4.selected;
|
|
330
348
|
var isNotAtTop = selected !== -1;
|
|
331
349
|
var allowMoveUp = isNotAtTop && menuOpen;
|
|
332
350
|
if (allowMoveUp) {
|
|
@@ -339,7 +357,7 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
339
357
|
var _this5 = this;
|
|
340
358
|
event.preventDefault();
|
|
341
359
|
// if not open, open
|
|
342
|
-
if (this.
|
|
360
|
+
if (this.state.menuOpen === false) {
|
|
343
361
|
event.preventDefault();
|
|
344
362
|
this.props.source('', function (options) {
|
|
345
363
|
_this5.setState({
|
|
@@ -351,10 +369,10 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
351
369
|
});
|
|
352
370
|
});
|
|
353
371
|
} else if (this.state.menuOpen === true) {
|
|
354
|
-
var _this$
|
|
355
|
-
menuOpen = _this$
|
|
356
|
-
_options = _this$
|
|
357
|
-
selected = _this$
|
|
372
|
+
var _this$state5 = this.state,
|
|
373
|
+
menuOpen = _this$state5.menuOpen,
|
|
374
|
+
_options = _this$state5.options,
|
|
375
|
+
selected = _this$state5.selected;
|
|
358
376
|
var isNotAtBottom = selected !== _options.length - 1;
|
|
359
377
|
var allowMoveDown = isNotAtBottom && menuOpen;
|
|
360
378
|
if (allowMoveDown) {
|
|
@@ -367,7 +385,7 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
367
385
|
value: function handleSpace(event) {
|
|
368
386
|
var _this6 = this;
|
|
369
387
|
// if not open, open
|
|
370
|
-
if (this.
|
|
388
|
+
if (this.state.menuOpen === false && this.state.query === '') {
|
|
371
389
|
event.preventDefault();
|
|
372
390
|
this.props.source('', function (options) {
|
|
373
391
|
_this6.setState({
|
|
@@ -390,6 +408,12 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
390
408
|
var hasSelectedOption = this.state.selected >= 0;
|
|
391
409
|
if (hasSelectedOption) {
|
|
392
410
|
this.handleOptionClick(this.state.selected);
|
|
411
|
+
if (this.props.multiple) {
|
|
412
|
+
this.setState({
|
|
413
|
+
menuOpen: false,
|
|
414
|
+
focused: -1
|
|
415
|
+
});
|
|
416
|
+
}
|
|
393
417
|
}
|
|
394
418
|
}
|
|
395
419
|
}
|
|
@@ -426,6 +450,15 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
426
450
|
query: this.state.query
|
|
427
451
|
});
|
|
428
452
|
break;
|
|
453
|
+
case 'backspace':
|
|
454
|
+
if (this.props.multiple) {
|
|
455
|
+
if (this.state.query.length === 0) {
|
|
456
|
+
this.setState({
|
|
457
|
+
selectedValues: this.state.selectedValues.slice(0, -1)
|
|
458
|
+
});
|
|
459
|
+
break;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
429
462
|
default:
|
|
430
463
|
if (isPrintableKeyCode(event.keyCode)) {
|
|
431
464
|
this.handlePrintableKey(event);
|
|
@@ -436,40 +469,39 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
436
469
|
}, {
|
|
437
470
|
key: "render",
|
|
438
471
|
value: function render() {
|
|
439
|
-
var
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
minLength = _this$
|
|
445
|
-
name = _this$
|
|
446
|
-
placeholder = _this$
|
|
447
|
-
required = _this$
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
var _this$
|
|
457
|
-
focused = _this$
|
|
458
|
-
hovered = _this$
|
|
459
|
-
menuOpen = _this$
|
|
460
|
-
options = _this$
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
validChoiceMade = _this$state7.validChoiceMade;
|
|
472
|
+
var _this$state$query2,
|
|
473
|
+
_this7 = this;
|
|
474
|
+
var _this$props5 = this.props,
|
|
475
|
+
id = _this$props5.id,
|
|
476
|
+
width = _this$props5.width,
|
|
477
|
+
minLength = _this$props5.minLength,
|
|
478
|
+
name = _this$props5.name,
|
|
479
|
+
placeholder = _this$props5.placeholder,
|
|
480
|
+
required = _this$props5.required,
|
|
481
|
+
tNoResults = _this$props5.tNoResults,
|
|
482
|
+
tStatusQueryTooShort = _this$props5.tStatusQueryTooShort,
|
|
483
|
+
tStatusNoResults = _this$props5.tStatusNoResults,
|
|
484
|
+
tStatusSelectedOption = _this$props5.tStatusSelectedOption,
|
|
485
|
+
tStatusResults = _this$props5.tStatusResults,
|
|
486
|
+
tAssistiveHint = _this$props5.tAssistiveHint,
|
|
487
|
+
multiple = _this$props5.multiple,
|
|
488
|
+
source = _this$props5.source;
|
|
489
|
+
var _this$state6 = this.state,
|
|
490
|
+
focused = _this$state6.focused,
|
|
491
|
+
hovered = _this$state6.hovered,
|
|
492
|
+
menuOpen = _this$state6.menuOpen,
|
|
493
|
+
options = _this$state6.options,
|
|
494
|
+
selected = _this$state6.selected,
|
|
495
|
+
ariaHint = _this$state6.ariaHint,
|
|
496
|
+
validChoiceMade = _this$state6.validChoiceMade;
|
|
465
497
|
var autoselect = this.hasAutoselect();
|
|
498
|
+
var query = (_this$state$query2 = this.state.query) !== null && _this$state$query2 !== void 0 ? _this$state$query2 : '';
|
|
466
499
|
var inputFocused = focused === -1;
|
|
467
500
|
var noOptionsAvailable = options.length === 0;
|
|
468
501
|
var queryNotEmpty = query.length !== 0;
|
|
469
502
|
var queryLongEnough = query.length >= minLength;
|
|
470
|
-
var showNoOptionsFound =
|
|
503
|
+
var showNoOptionsFound = inputFocused && noOptionsAvailable && queryNotEmpty && queryLongEnough;
|
|
471
504
|
var componentIsFocused = focused !== null;
|
|
472
|
-
var dropdownArrowClassName = "ds-autocomplete__dropdown-arrow-down";
|
|
473
505
|
var optionFocused = focused !== -1 && focused !== null;
|
|
474
506
|
var menuIsVisible = menuOpen || showNoOptionsFound;
|
|
475
507
|
var selectedOptionText = this.templateInputValue(options[selected]);
|
|
@@ -479,7 +511,57 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
479
511
|
var ariaDescribedProp = ariaHint ? {
|
|
480
512
|
'aria-describedby': assistiveHintID
|
|
481
513
|
} : null;
|
|
482
|
-
|
|
514
|
+
var showAutoCompleteResultListItems = function showAutoCompleteResultListItems(options, multiple) {
|
|
515
|
+
{
|
|
516
|
+
return options.map(function (option, index) {
|
|
517
|
+
var showFocused = focused === -1 ? selected === index : focused === index;
|
|
518
|
+
var iosPosinsetHtml = isIosDevice() ? /*#__PURE__*/React.createElement("span", {
|
|
519
|
+
id: "".concat(id, "__option-suffix--").concat(index),
|
|
520
|
+
style: {
|
|
521
|
+
border: '0',
|
|
522
|
+
clip: 'rect(0 0 0 0)',
|
|
523
|
+
height: '1px',
|
|
524
|
+
marginBottom: '-1px',
|
|
525
|
+
marginRight: '-1px',
|
|
526
|
+
overflow: 'hidden',
|
|
527
|
+
padding: '0',
|
|
528
|
+
position: 'absolute',
|
|
529
|
+
whiteSpace: 'nowrap',
|
|
530
|
+
width: '1px'
|
|
531
|
+
}
|
|
532
|
+
}, index + 1, " \u03B1\u03C0\u03CC ", options.length) : '';
|
|
533
|
+
return /*#__PURE__*/React.createElement(AutoCompleteResultListItem, {
|
|
534
|
+
isFocused: showFocused,
|
|
535
|
+
isHovered: hovered,
|
|
536
|
+
index: index,
|
|
537
|
+
"aria-selected": focused === index ? 'true' : 'false',
|
|
538
|
+
key: index,
|
|
539
|
+
onBlur: function onBlur(event) {
|
|
540
|
+
return _this7.handleAutoCompleteBlur(event, index);
|
|
541
|
+
},
|
|
542
|
+
onClick: function onClick() {
|
|
543
|
+
return _this7.handleOptionClick(index);
|
|
544
|
+
},
|
|
545
|
+
onMouseDown: _this7.handleOptionMouseDown,
|
|
546
|
+
onMouseEnter: function onMouseEnter() {
|
|
547
|
+
return _this7.handleOptionMouseEnter(index);
|
|
548
|
+
},
|
|
549
|
+
ref: function ref(optionEl) {
|
|
550
|
+
_this7.elementReferences[index] = optionEl;
|
|
551
|
+
},
|
|
552
|
+
role: "option",
|
|
553
|
+
tabIndex: -1,
|
|
554
|
+
"aria-posinset": index + 1,
|
|
555
|
+
"aria-setsize": options.length
|
|
556
|
+
}, multiple ? /*#__PURE__*/React.createElement(CheckboxItem, {
|
|
557
|
+
value: option,
|
|
558
|
+
checked: _this7.state.selectedValues.includes(option),
|
|
559
|
+
onChange: function onChange() {}
|
|
560
|
+
}, _this7.templateSuggestion(option)) : _this7.templateSuggestion(option), iosPosinsetHtml);
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
return /*#__PURE__*/React.createElement(AutoCompleteContainer, {
|
|
483
565
|
onKeyDown: this.handleKeyDown,
|
|
484
566
|
width: width
|
|
485
567
|
}, /*#__PURE__*/React.createElement(Status, {
|
|
@@ -495,22 +577,41 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
495
577
|
tNoResults: tStatusNoResults,
|
|
496
578
|
tSelectedOption: tStatusSelectedOption,
|
|
497
579
|
tResults: tStatusResults
|
|
498
|
-
}), hintValue && /*#__PURE__*/React.createElement(AutoCompleteInputTypeahead, {
|
|
580
|
+
}), hintValue && (placeholder === '' || !placeholder) && /*#__PURE__*/React.createElement(AutoCompleteInputTypeahead, {
|
|
499
581
|
value: hintValue
|
|
500
|
-
}), /*#__PURE__*/React.createElement(
|
|
582
|
+
}), multiple ? /*#__PURE__*/React.createElement(AutoCompleteMultipleInputContainer, {
|
|
583
|
+
isFocused: componentIsFocused,
|
|
584
|
+
numberOfSelected: this.props.numberOfSelected
|
|
585
|
+
}, /*#__PURE__*/React.createElement(ChipContainer, null, this.state.selectedValues.map(function (value) {
|
|
586
|
+
return /*#__PURE__*/React.createElement(Chip, {
|
|
587
|
+
key: value,
|
|
588
|
+
onDelete: function onDelete() {
|
|
589
|
+
_this7.setState({
|
|
590
|
+
selectedValues: _this7.state.selectedValues.filter(function (v) {
|
|
591
|
+
return v !== value;
|
|
592
|
+
})
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
}, value);
|
|
596
|
+
}), !componentIsFocused && typeof this.props.numberOfSelected === 'number' && this.state.selectedValues.length > this.props.numberOfSelected && /*#__PURE__*/React.createElement(NormalText, {
|
|
597
|
+
fontWeight: "bold",
|
|
598
|
+
margin: 0
|
|
599
|
+
}, "+", this.state.selectedValues.length - this.props.numberOfSelected)), /*#__PURE__*/React.createElement(AutoCompleteMultipleInput, _extends({
|
|
501
600
|
"aria-expanded": menuOpen ? 'true' : 'false',
|
|
502
601
|
"aria-activedescendant": optionFocused ? "".concat(id, "__option--").concat(focused) : '',
|
|
503
602
|
"aria-owns": "".concat(id, "__listbox"),
|
|
504
603
|
"aria-autocomplete": this.hasAutoselect() ? 'both' : 'list'
|
|
505
604
|
}, ariaDescribedProp, {
|
|
506
|
-
autoComplete: "off"
|
|
507
|
-
isFocused
|
|
508
|
-
|
|
605
|
+
autoComplete: "off"
|
|
606
|
+
// isFocused={componentIsFocused}
|
|
607
|
+
,
|
|
509
608
|
id: id,
|
|
510
609
|
onClick: function onClick(event) {
|
|
511
610
|
return _this7.handleInputClick(event);
|
|
512
611
|
},
|
|
513
|
-
onBlur:
|
|
612
|
+
onBlur: function onBlur(event) {
|
|
613
|
+
return _this7.handleAutoCompleteBlur(event);
|
|
614
|
+
},
|
|
514
615
|
onChange: this.handleInputChange,
|
|
515
616
|
onFocus: this.handleInputFocus,
|
|
516
617
|
name: name,
|
|
@@ -521,80 +622,85 @@ var AutoComplete = /*#__PURE__*/function (_Component) {
|
|
|
521
622
|
role: "combobox",
|
|
522
623
|
required: required,
|
|
523
624
|
value: query
|
|
524
|
-
})),
|
|
525
|
-
|
|
625
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
626
|
+
ref: function ref(buttonElement) {
|
|
627
|
+
_this7.elementReferences['button-arrow'] = buttonElement;
|
|
628
|
+
},
|
|
629
|
+
variant: "link",
|
|
526
630
|
onClick: function onClick() {
|
|
527
|
-
_this7.
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
631
|
+
if (!_this7.state.menuOpen) {
|
|
632
|
+
source(query, function (options) {
|
|
633
|
+
var optionsAvailable = options.length > 0;
|
|
634
|
+
_this7.setState({
|
|
635
|
+
menuOpen: optionsAvailable,
|
|
636
|
+
options: options,
|
|
637
|
+
selected: autoselect && optionsAvailable ? 0 : -1,
|
|
638
|
+
validChoiceMade: false
|
|
639
|
+
});
|
|
640
|
+
});
|
|
641
|
+
} else {
|
|
642
|
+
_this7.setState({
|
|
643
|
+
menuOpen: false,
|
|
644
|
+
focused: null
|
|
645
|
+
});
|
|
646
|
+
}
|
|
533
647
|
},
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
648
|
+
onBlur: function onBlur(event) {
|
|
649
|
+
return _this7.handleAutoCompleteBlur(event);
|
|
650
|
+
}
|
|
651
|
+
}, _ref2), /*#__PURE__*/React.createElement(AutoCompleteResultList, {
|
|
537
652
|
isVisible: menuIsVisible,
|
|
538
653
|
onMouseLeave: function onMouseLeave() {
|
|
539
654
|
return _this7.handleListMouseLeave();
|
|
540
655
|
},
|
|
541
656
|
id: "".concat(id, "__listbox"),
|
|
542
657
|
role: "listbox"
|
|
543
|
-
},
|
|
544
|
-
var showFocused = focused === -1 ? selected === index : focused === index;
|
|
545
|
-
var iosPosinsetHtml = isIosDevice() ? /*#__PURE__*/React.createElement("span", {
|
|
546
|
-
id: "".concat(id, "__option-suffix--").concat(index),
|
|
547
|
-
style: {
|
|
548
|
-
border: '0',
|
|
549
|
-
clip: 'rect(0 0 0 0)',
|
|
550
|
-
height: '1px',
|
|
551
|
-
marginBottom: '-1px',
|
|
552
|
-
marginRight: '-1px',
|
|
553
|
-
overflow: 'hidden',
|
|
554
|
-
padding: '0',
|
|
555
|
-
position: 'absolute',
|
|
556
|
-
whiteSpace: 'nowrap',
|
|
557
|
-
width: '1px'
|
|
558
|
-
}
|
|
559
|
-
}, index + 1, " \u03B1\u03C0\u03CC ", options.length) : '';
|
|
560
|
-
return /*#__PURE__*/React.createElement(AutoCompleteResultListItem, {
|
|
561
|
-
isFocused: showFocused,
|
|
562
|
-
isHovered: hovered,
|
|
563
|
-
index: index,
|
|
564
|
-
"aria-selected": focused === index ? 'true' : 'false',
|
|
565
|
-
key: index,
|
|
566
|
-
onBlur: function onBlur(event) {
|
|
567
|
-
return _this7.handleOptionBlur(event, index);
|
|
568
|
-
},
|
|
569
|
-
onClick: function onClick() {
|
|
570
|
-
return _this7.handleOptionClick(index);
|
|
571
|
-
},
|
|
572
|
-
onMouseDown: _this7.handleOptionMouseDown,
|
|
573
|
-
onMouseEnter: function onMouseEnter() {
|
|
574
|
-
return _this7.handleOptionMouseEnter(index);
|
|
575
|
-
},
|
|
576
|
-
ref: function ref(optionEl) {
|
|
577
|
-
_this7.elementReferences[index] = optionEl;
|
|
578
|
-
},
|
|
579
|
-
role: "option",
|
|
580
|
-
tabIndex: -1,
|
|
581
|
-
"aria-posinset": index + 1,
|
|
582
|
-
"aria-setsize": options.length
|
|
583
|
-
}, _this7.templateSuggestion(option), " ", iosPosinsetHtml);
|
|
584
|
-
}), showNoOptionsFound && /*#__PURE__*/React.createElement(AutoCompleteResultListItem, {
|
|
658
|
+
}, /*#__PURE__*/React.createElement(Checkbox, null, showAutoCompleteResultListItems(options, multiple)), showNoOptionsFound && /*#__PURE__*/React.createElement(AutoCompleteResultListItem, {
|
|
585
659
|
empty: true
|
|
586
660
|
}, tNoResults === null || tNoResults === void 0 ? void 0 : tNoResults())), /*#__PURE__*/React.createElement(AutoCompleteAssistiveHint, {
|
|
587
661
|
id: assistiveHintID
|
|
588
|
-
}, tAssistiveHint === null || tAssistiveHint === void 0 ? void 0 : tAssistiveHint()))
|
|
662
|
+
}, tAssistiveHint === null || tAssistiveHint === void 0 ? void 0 : tAssistiveHint())) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AutoCompleteInput, _extends({
|
|
663
|
+
"aria-expanded": menuOpen ? 'true' : 'false',
|
|
664
|
+
"aria-activedescendant": optionFocused ? "".concat(id, "__option--").concat(focused) : '',
|
|
665
|
+
"aria-owns": "".concat(id, "__listbox"),
|
|
666
|
+
"aria-autocomplete": this.hasAutoselect() ? 'both' : 'list'
|
|
667
|
+
}, ariaDescribedProp, {
|
|
668
|
+
autoComplete: "off",
|
|
669
|
+
isFocused: componentIsFocused,
|
|
670
|
+
id: id,
|
|
671
|
+
onClick: function onClick(event) {
|
|
672
|
+
return _this7.handleInputClick(event);
|
|
673
|
+
},
|
|
674
|
+
onBlur: this.handleAutoCompleteBlur,
|
|
675
|
+
onChange: this.handleInputChange,
|
|
676
|
+
onFocus: this.handleInputFocus,
|
|
677
|
+
name: name,
|
|
678
|
+
placeholder: placeholder,
|
|
679
|
+
ref: function ref(inputElement) {
|
|
680
|
+
_this7.elementReferences[-1] = inputElement;
|
|
681
|
+
},
|
|
682
|
+
role: "combobox",
|
|
683
|
+
required: required,
|
|
684
|
+
value: query
|
|
685
|
+
})), _ref3, /*#__PURE__*/React.createElement(AutoCompleteResultList, {
|
|
686
|
+
isVisible: menuIsVisible,
|
|
687
|
+
onMouseLeave: function onMouseLeave() {
|
|
688
|
+
return _this7.handleListMouseLeave();
|
|
689
|
+
},
|
|
690
|
+
id: "".concat(id, "__listbox"),
|
|
691
|
+
role: "listbox"
|
|
692
|
+
}, showAutoCompleteResultListItems(options, false), showNoOptionsFound && /*#__PURE__*/React.createElement(AutoCompleteResultListItem, {
|
|
693
|
+
empty: true
|
|
694
|
+
}, tNoResults === null || tNoResults === void 0 ? void 0 : tNoResults())), /*#__PURE__*/React.createElement(AutoCompleteAssistiveHint, {
|
|
695
|
+
id: assistiveHintID
|
|
696
|
+
}, tAssistiveHint === null || tAssistiveHint === void 0 ? void 0 : tAssistiveHint())));
|
|
589
697
|
}
|
|
590
698
|
}]);
|
|
591
699
|
return AutoComplete;
|
|
592
700
|
}(Component);
|
|
593
701
|
AutoComplete.defaultProps = {
|
|
594
|
-
width: '
|
|
702
|
+
width: 'full',
|
|
595
703
|
autoselect: false,
|
|
596
|
-
defaultValue: '',
|
|
597
|
-
displayMenu: 'overlay',
|
|
598
704
|
minLength: 0,
|
|
599
705
|
name: 'ds-input-autocomplete',
|
|
600
706
|
placeholder: '',
|
|
@@ -602,21 +708,13 @@ AutoComplete.defaultProps = {
|
|
|
602
708
|
return;
|
|
603
709
|
},
|
|
604
710
|
confirmOnBlur: false,
|
|
605
|
-
showNoOptionsFound: true,
|
|
606
|
-
showAllValues: false,
|
|
607
711
|
required: false,
|
|
608
712
|
tNoResults: function tNoResults() {
|
|
609
713
|
return 'No results found';
|
|
610
714
|
},
|
|
611
715
|
tAssistiveHint: function tAssistiveHint() {
|
|
612
716
|
return 'When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.';
|
|
613
|
-
},
|
|
614
|
-
dropdownArrow: function dropdownArrow(props) {
|
|
615
|
-
return /*#__PURE__*/React.createElement(CaretIcon, _extends({
|
|
616
|
-
direction: "down",
|
|
617
|
-
size: "sm"
|
|
618
|
-
}, props));
|
|
619
717
|
}
|
|
620
718
|
};
|
|
621
719
|
export { AutoComplete as default };
|
|
622
|
-
export { AutoComplete, AutoCompleteInput, AutoCompleteInputTypeahead, AutoCompleteResultList, AutoCompleteResultListItem,
|
|
720
|
+
export { AutoComplete, AutoCompleteInput, AutoCompleteInputTypeahead, AutoCompleteResultList, AutoCompleteResultListItem, AutoCompleteContainer, AutoCompleteAssistiveHint, AutoCompleteMultipleInputContainer, AutoCompleteMultipleInput };
|