@patternfly/react-templates 1.1.0-prerelease.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/CHANGELOG.md +150 -0
  2. package/components/package.json +1 -1
  3. package/dist/dynamic/components/Dropdown/package.json +1 -1
  4. package/dist/dynamic/components/Select/package.json +1 -1
  5. package/dist/dynamic-modules.json +14 -10
  6. package/dist/esm/components/Dropdown/{DropdownSimple.d.ts → SimpleDropdown.d.ts} +11 -6
  7. package/dist/esm/components/Dropdown/SimpleDropdown.d.ts.map +1 -0
  8. package/dist/esm/components/Dropdown/{DropdownSimple.js → SimpleDropdown.js} +13 -7
  9. package/dist/esm/components/Dropdown/SimpleDropdown.js.map +1 -0
  10. package/dist/esm/components/Dropdown/index.d.ts +1 -1
  11. package/dist/esm/components/Dropdown/index.js +1 -1
  12. package/dist/esm/components/Select/CheckboxSelect.d.ts +7 -3
  13. package/dist/esm/components/Select/CheckboxSelect.d.ts.map +1 -1
  14. package/dist/esm/components/Select/CheckboxSelect.js +14 -6
  15. package/dist/esm/components/Select/CheckboxSelect.js.map +1 -1
  16. package/dist/esm/components/Select/MultiTypeaheadSelect.d.ts +33 -0
  17. package/dist/esm/components/Select/MultiTypeaheadSelect.d.ts.map +1 -0
  18. package/dist/esm/components/Select/{SelectTypeahead.js → MultiTypeaheadSelect.js} +52 -45
  19. package/dist/esm/components/Select/MultiTypeaheadSelect.js.map +1 -0
  20. package/dist/{js/components/Select/SelectSimple.d.ts → esm/components/Select/SimpleSelect.d.ts} +12 -7
  21. package/dist/esm/components/Select/SimpleSelect.d.ts.map +1 -0
  22. package/dist/esm/components/Select/SimpleSelect.js +39 -0
  23. package/dist/esm/components/Select/SimpleSelect.js.map +1 -0
  24. package/dist/esm/components/Select/TypeaheadSelect.d.ts +47 -0
  25. package/dist/esm/components/Select/TypeaheadSelect.d.ts.map +1 -0
  26. package/dist/esm/components/Select/TypeaheadSelect.js +228 -0
  27. package/dist/esm/components/Select/TypeaheadSelect.js.map +1 -0
  28. package/dist/esm/components/Select/index.d.ts +3 -2
  29. package/dist/esm/components/Select/index.d.ts.map +1 -1
  30. package/dist/esm/components/Select/index.js +3 -2
  31. package/dist/esm/components/Select/index.js.map +1 -1
  32. package/dist/js/components/Dropdown/{DropdownSimple.d.ts → SimpleDropdown.d.ts} +11 -6
  33. package/dist/js/components/Dropdown/SimpleDropdown.d.ts.map +1 -0
  34. package/dist/js/components/Dropdown/{DropdownSimple.js → SimpleDropdown.js} +14 -9
  35. package/dist/js/components/Dropdown/SimpleDropdown.js.map +1 -0
  36. package/dist/js/components/Dropdown/index.d.ts +1 -1
  37. package/dist/js/components/Dropdown/index.js +1 -1
  38. package/dist/js/components/Select/CheckboxSelect.d.ts +7 -3
  39. package/dist/js/components/Select/CheckboxSelect.d.ts.map +1 -1
  40. package/dist/js/components/Select/CheckboxSelect.js +14 -6
  41. package/dist/js/components/Select/CheckboxSelect.js.map +1 -1
  42. package/dist/js/components/Select/MultiTypeaheadSelect.d.ts +33 -0
  43. package/dist/js/components/Select/MultiTypeaheadSelect.d.ts.map +1 -0
  44. package/dist/js/components/Select/{SelectTypeahead.js → MultiTypeaheadSelect.js} +53 -46
  45. package/dist/js/components/Select/MultiTypeaheadSelect.js.map +1 -0
  46. package/dist/{esm/components/Select/SelectSimple.d.ts → js/components/Select/SimpleSelect.d.ts} +12 -7
  47. package/dist/js/components/Select/SimpleSelect.d.ts.map +1 -0
  48. package/dist/js/components/Select/SimpleSelect.js +42 -0
  49. package/dist/js/components/Select/SimpleSelect.js.map +1 -0
  50. package/dist/js/components/Select/TypeaheadSelect.d.ts +47 -0
  51. package/dist/js/components/Select/TypeaheadSelect.d.ts.map +1 -0
  52. package/dist/js/components/Select/TypeaheadSelect.js +232 -0
  53. package/dist/js/components/Select/TypeaheadSelect.js.map +1 -0
  54. package/dist/js/components/Select/index.d.ts +3 -2
  55. package/dist/js/components/Select/index.d.ts.map +1 -1
  56. package/dist/js/components/Select/index.js +3 -2
  57. package/dist/js/components/Select/index.js.map +1 -1
  58. package/dist/umd/assets/output-D8cue3c6.css +26066 -0
  59. package/dist/umd/react-templates.min.js +1 -1
  60. package/package.json +7 -10
  61. package/rollup.config.mjs +8 -0
  62. package/src/components/Dropdown/{DropdownSimple.tsx → SimpleDropdown.tsx} +28 -11
  63. package/src/components/Dropdown/__tests__/{DropdownSimple.test.tsx → SimpleDropdown.test.tsx} +35 -23
  64. package/src/components/Dropdown/__tests__/__snapshots__/{DropdownSimple.test.tsx.snap → SimpleDropdown.test.tsx.snap} +6 -0
  65. package/src/components/Dropdown/examples/DropdownTemplates.md +4 -16
  66. package/src/components/Dropdown/examples/{DropdownSimpleExample.tsx → SimpleDropdownExample.tsx} +7 -7
  67. package/src/components/Dropdown/index.ts +1 -1
  68. package/src/components/Select/CheckboxSelect.tsx +23 -7
  69. package/src/components/Select/{SelectTypeahead.tsx → MultiTypeaheadSelect.tsx} +91 -64
  70. package/src/components/Select/{SelectSimple.tsx → SimpleSelect.tsx} +39 -18
  71. package/src/components/Select/TypeaheadSelect.tsx +393 -0
  72. package/src/components/Select/{CheckboxSelect.test.tsx → __tests__/CheckboxSelect.test.tsx} +32 -3
  73. package/src/components/Select/{CheckboxSelectSnapshots.test.tsx → __tests__/CheckboxSelectSnapshots.test.tsx} +1 -1
  74. package/src/components/Select/__tests__/MultiTypeaheadSelect.test.tsx +412 -0
  75. package/src/components/Select/__tests__/SimpleSelect.test.tsx +242 -0
  76. package/src/components/Select/__tests__/TypeaheadSelect.test.tsx +372 -0
  77. package/src/components/Select/{__snapshots__ → __tests__/__snapshots__}/CheckboxSelectSnapshots.test.tsx.snap +7 -2
  78. package/src/components/Select/__tests__/__snapshots__/MultiTypeaheadSelect.test.tsx.snap +180 -0
  79. package/src/components/Select/__tests__/__snapshots__/SimpleSelect.test.tsx.snap +170 -0
  80. package/src/components/Select/__tests__/__snapshots__/TypeaheadSelect.test.tsx.snap +180 -0
  81. package/src/components/Select/examples/CheckboxSelectDemo.tsx +25 -8
  82. package/src/components/Select/examples/MultiTypeaheadSelectDemo.tsx +35 -0
  83. package/src/components/Select/examples/SelectTemplates.md +14 -5
  84. package/src/components/Select/examples/SimpleSelectDemo.tsx +36 -0
  85. package/src/components/Select/examples/TypeaheadSelectDemo.tsx +67 -0
  86. package/src/components/Select/index.ts +3 -2
  87. package/dist/esm/components/Dropdown/DropdownSimple.d.ts.map +0 -1
  88. package/dist/esm/components/Dropdown/DropdownSimple.js.map +0 -1
  89. package/dist/esm/components/Select/SelectSimple.d.ts.map +0 -1
  90. package/dist/esm/components/Select/SelectSimple.js +0 -31
  91. package/dist/esm/components/Select/SelectSimple.js.map +0 -1
  92. package/dist/esm/components/Select/SelectTypeahead.d.ts +0 -29
  93. package/dist/esm/components/Select/SelectTypeahead.d.ts.map +0 -1
  94. package/dist/esm/components/Select/SelectTypeahead.js.map +0 -1
  95. package/dist/js/components/Dropdown/DropdownSimple.d.ts.map +0 -1
  96. package/dist/js/components/Dropdown/DropdownSimple.js.map +0 -1
  97. package/dist/js/components/Select/SelectSimple.d.ts.map +0 -1
  98. package/dist/js/components/Select/SelectSimple.js +0 -34
  99. package/dist/js/components/Select/SelectSimple.js.map +0 -1
  100. package/dist/js/components/Select/SelectTypeahead.d.ts +0 -29
  101. package/dist/js/components/Select/SelectTypeahead.d.ts.map +0 -1
  102. package/dist/js/components/Select/SelectTypeahead.js.map +0 -1
  103. package/rollup.config.js +0 -7
  104. package/src/components/Select/examples/SelectSimpleDemo.tsx +0 -26
  105. package/src/components/Select/examples/SelectTypeaheadDemo.tsx +0 -21
@@ -0,0 +1,232 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TypeaheadSelect = exports.TypeaheadSelectBase = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ const react_core_1 = require("@patternfly/react-core");
7
+ const times_icon_1 = tslib_1.__importDefault(require('@patternfly/react-icons/dist/js/icons/times-icon'));
8
+ const defaultNoOptionsFoundMessage = (filter) => `No results found for "${filter}"`;
9
+ const defaultCreateOptionMessage = (newValue) => `Create "${newValue}"`;
10
+ const defaultFilterFunction = (filterValue, options) => options.filter((o) => String(o.content).toLowerCase().includes(filterValue.toLowerCase()));
11
+ const TypeaheadSelectBase = (_a) => {
12
+ var { innerRef, selectOptions, onSelect, onToggle, onInputChange, filterFunction = defaultFilterFunction, onClearSelection, placeholder = 'Select an option', noOptionsAvailableMessage = 'No options are available', noOptionsFoundMessage = defaultNoOptionsFoundMessage, isCreatable = false, isCreateOptionOnTop = false, createOptionMessage = defaultCreateOptionMessage, isDisabled, toggleWidth, toggleProps } = _a, props = tslib_1.__rest(_a, ["innerRef", "selectOptions", "onSelect", "onToggle", "onInputChange", "filterFunction", "onClearSelection", "placeholder", "noOptionsAvailableMessage", "noOptionsFoundMessage", "isCreatable", "isCreateOptionOnTop", "createOptionMessage", "isDisabled", "toggleWidth", "toggleProps"]);
13
+ const [isOpen, setIsOpen] = react_1.default.useState(false);
14
+ const [filterValue, setFilterValue] = react_1.default.useState('');
15
+ const [isFiltering, setIsFiltering] = react_1.default.useState(false);
16
+ const [focusedItemIndex, setFocusedItemIndex] = react_1.default.useState(null);
17
+ const [activeItemId, setActiveItemId] = react_1.default.useState(null);
18
+ const textInputRef = react_1.default.useRef();
19
+ const NO_RESULTS = 'no results';
20
+ const selected = react_1.default.useMemo(() => selectOptions === null || selectOptions === void 0 ? void 0 : selectOptions.find((option) => option.value === props.selected || option.isSelected), [props.selected, selectOptions]);
21
+ const filteredSelections = react_1.default.useMemo(() => {
22
+ let newSelectOptions = selectOptions;
23
+ // Filter menu items based on the text input value when one exists
24
+ if (isFiltering && filterValue) {
25
+ newSelectOptions = filterFunction(filterValue, selectOptions);
26
+ if (isCreatable &&
27
+ filterValue.trim() &&
28
+ !newSelectOptions.find((o) => String(o.content).toLowerCase() === filterValue.toLowerCase())) {
29
+ const createOption = {
30
+ content: typeof createOptionMessage === 'string' ? createOptionMessage : createOptionMessage(filterValue),
31
+ value: filterValue
32
+ };
33
+ newSelectOptions = isCreateOptionOnTop
34
+ ? [createOption, ...newSelectOptions]
35
+ : [...newSelectOptions, createOption];
36
+ }
37
+ // When no options are found after filtering, display 'No results found'
38
+ if (!newSelectOptions.length) {
39
+ newSelectOptions = [
40
+ {
41
+ isAriaDisabled: true,
42
+ content: typeof noOptionsFoundMessage === 'string' ? noOptionsFoundMessage : noOptionsFoundMessage(filterValue),
43
+ value: NO_RESULTS
44
+ }
45
+ ];
46
+ }
47
+ }
48
+ // When no options are available, display 'No options available'
49
+ if (!newSelectOptions.length) {
50
+ newSelectOptions = [
51
+ {
52
+ isAriaDisabled: true,
53
+ content: noOptionsAvailableMessage,
54
+ value: NO_RESULTS
55
+ }
56
+ ];
57
+ }
58
+ return newSelectOptions;
59
+ }, [
60
+ isFiltering,
61
+ filterValue,
62
+ filterFunction,
63
+ selectOptions,
64
+ noOptionsFoundMessage,
65
+ isCreatable,
66
+ isCreateOptionOnTop,
67
+ createOptionMessage,
68
+ noOptionsAvailableMessage
69
+ ]);
70
+ react_1.default.useEffect(() => {
71
+ if (isFiltering) {
72
+ openMenu();
73
+ }
74
+ // Don't update on openMenu changes
75
+ // eslint-disable-next-line react-hooks/exhaustive-deps
76
+ }, [isFiltering]);
77
+ const setActiveAndFocusedItem = (itemIndex) => {
78
+ setFocusedItemIndex(itemIndex);
79
+ const focusedItem = selectOptions[itemIndex];
80
+ setActiveItemId(String(focusedItem.value));
81
+ };
82
+ const resetActiveAndFocusedItem = () => {
83
+ setFocusedItemIndex(null);
84
+ setActiveItemId(null);
85
+ };
86
+ const openMenu = () => {
87
+ if (!isOpen) {
88
+ onToggle && onToggle(true);
89
+ setIsOpen(true);
90
+ setTimeout(() => {
91
+ var _a;
92
+ (_a = textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
93
+ }, 100);
94
+ }
95
+ };
96
+ const closeMenu = () => {
97
+ var _a;
98
+ onToggle && onToggle(false);
99
+ setIsOpen(false);
100
+ resetActiveAndFocusedItem();
101
+ setIsFiltering(false);
102
+ setFilterValue(String((_a = selected === null || selected === void 0 ? void 0 : selected.content) !== null && _a !== void 0 ? _a : ''));
103
+ };
104
+ const onInputClick = () => {
105
+ if (!isOpen) {
106
+ openMenu();
107
+ }
108
+ else if (isFiltering) {
109
+ closeMenu();
110
+ }
111
+ };
112
+ const selectOption = (_event, option) => {
113
+ onSelect && onSelect(_event, option.value);
114
+ closeMenu();
115
+ };
116
+ const _onSelect = (_event, value) => {
117
+ if (value && value !== NO_RESULTS) {
118
+ const optionToSelect = selectOptions.find((option) => option.value === value);
119
+ if (optionToSelect) {
120
+ selectOption(_event, optionToSelect);
121
+ }
122
+ else if (isCreatable) {
123
+ selectOption(_event, { value, content: value });
124
+ }
125
+ }
126
+ };
127
+ const onTextInputChange = (_event, value) => {
128
+ setIsFiltering(true);
129
+ setFilterValue(value || '');
130
+ onInputChange && onInputChange(value);
131
+ resetActiveAndFocusedItem();
132
+ };
133
+ const handleMenuArrowKeys = (key) => {
134
+ let indexToFocus = 0;
135
+ openMenu();
136
+ if (filteredSelections.every((option) => option.isDisabled)) {
137
+ return;
138
+ }
139
+ if (key === 'ArrowUp') {
140
+ // When no index is set or at the first index, focus to the last, otherwise decrement focus index
141
+ if (focusedItemIndex === null || focusedItemIndex === 0) {
142
+ indexToFocus = filteredSelections.length - 1;
143
+ }
144
+ else {
145
+ indexToFocus = focusedItemIndex - 1;
146
+ }
147
+ // Skip disabled options
148
+ while (filteredSelections[indexToFocus].isDisabled) {
149
+ indexToFocus--;
150
+ if (indexToFocus === -1) {
151
+ indexToFocus = filteredSelections.length - 1;
152
+ }
153
+ }
154
+ }
155
+ if (key === 'ArrowDown') {
156
+ // When no index is set or at the last index, focus to the first, otherwise increment focus index
157
+ if (focusedItemIndex === null || focusedItemIndex === filteredSelections.length - 1) {
158
+ indexToFocus = 0;
159
+ }
160
+ else {
161
+ indexToFocus = focusedItemIndex + 1;
162
+ }
163
+ // Skip disabled options
164
+ while (filteredSelections[indexToFocus].isDisabled) {
165
+ indexToFocus++;
166
+ if (indexToFocus === filteredSelections.length) {
167
+ indexToFocus = 0;
168
+ }
169
+ }
170
+ }
171
+ setActiveAndFocusedItem(indexToFocus);
172
+ };
173
+ const onInputKeyDown = (event) => {
174
+ const focusedItem = focusedItemIndex !== null ? filteredSelections[focusedItemIndex] : null;
175
+ switch (event.key) {
176
+ case 'Enter':
177
+ if (isOpen && focusedItem && focusedItem.value !== NO_RESULTS && !focusedItem.isAriaDisabled) {
178
+ selectOption(event, focusedItem);
179
+ }
180
+ openMenu();
181
+ break;
182
+ case 'ArrowUp':
183
+ case 'ArrowDown':
184
+ event.preventDefault();
185
+ handleMenuArrowKeys(event.key);
186
+ break;
187
+ }
188
+ };
189
+ const onToggleClick = () => {
190
+ var _a;
191
+ if (!isOpen) {
192
+ openMenu();
193
+ }
194
+ else {
195
+ closeMenu();
196
+ }
197
+ (_a = textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
198
+ };
199
+ const onClearButtonClick = () => {
200
+ var _a;
201
+ if (selected && onSelect) {
202
+ onSelect(undefined, selected.value);
203
+ }
204
+ setFilterValue('');
205
+ onInputChange && onInputChange('');
206
+ setIsFiltering(false);
207
+ resetActiveAndFocusedItem();
208
+ (_a = textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
209
+ onClearSelection && onClearSelection();
210
+ };
211
+ const toggle = (toggleRef) => {
212
+ var _a;
213
+ return (react_1.default.createElement(react_core_1.MenuToggle, Object.assign({ ref: toggleRef, variant: "typeahead", "aria-label": "Typeahead menu toggle", onClick: onToggleClick, isExpanded: isOpen, isDisabled: isDisabled, isFullWidth: true, style: {
214
+ width: toggleWidth
215
+ } }, toggleProps),
216
+ react_1.default.createElement(react_core_1.TextInputGroup, { isPlain: true },
217
+ react_1.default.createElement(react_core_1.TextInputGroupMain, Object.assign({ value: isFiltering ? filterValue : ((_a = selected === null || selected === void 0 ? void 0 : selected.content) !== null && _a !== void 0 ? _a : ''), onClick: onInputClick, onChange: onTextInputChange, onKeyDown: onInputKeyDown, autoComplete: "off", innerRef: textInputRef, placeholder: placeholder }, (activeItemId && { 'aria-activedescendant': activeItemId }), { role: "combobox", isExpanded: isOpen, "aria-controls": "select-typeahead-listbox" })),
218
+ react_1.default.createElement(react_core_1.TextInputGroupUtilities, Object.assign({}, (!(isFiltering && filterValue) && !selected ? { style: { display: 'none' } } : {})),
219
+ react_1.default.createElement(react_core_1.Button, { variant: "plain", onClick: onClearButtonClick, "aria-label": "Clear input value" },
220
+ react_1.default.createElement(times_icon_1.default, { "aria-hidden": true }))))));
221
+ };
222
+ return (react_1.default.createElement(react_core_1.Select, Object.assign({ isOpen: isOpen, selected: selected, onSelect: _onSelect, onOpenChange: (isOpen) => !isOpen && closeMenu(), toggle: toggle, shouldFocusFirstItemOnOpen: false, ref: innerRef }, props),
223
+ react_1.default.createElement(react_core_1.SelectList, null, filteredSelections.map((option, index) => {
224
+ const { content, value } = option, props = tslib_1.__rest(option, ["content", "value"]);
225
+ return (react_1.default.createElement(react_core_1.SelectOption, Object.assign({ key: value, value: value, isFocused: focusedItemIndex === index }, props), content));
226
+ }))));
227
+ };
228
+ exports.TypeaheadSelectBase = TypeaheadSelectBase;
229
+ exports.TypeaheadSelectBase.displayName = 'TypeaheadSelectBase';
230
+ exports.TypeaheadSelect = react_1.default.forwardRef((props, ref) => (react_1.default.createElement(exports.TypeaheadSelectBase, Object.assign({}, props, { innerRef: ref }))));
231
+ exports.TypeaheadSelect.displayName = 'TypeaheadSelect';
232
+ //# sourceMappingURL=TypeaheadSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypeaheadSelect.js","sourceRoot":"","sources":["../../../../src/components/Select/TypeaheadSelect.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,uDAagC;;AAkDhC,MAAM,4BAA4B,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,yBAAy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AE,EAAE,CAAC,CACpG,8BAAC,2BAAmB,oBAAK,KAAK,IAAE,QAAQ,EAAE,GAAG,IAAI,CAClD,CAAC,CAAC;AAEH,uBAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC"}
@@ -1,4 +1,5 @@
1
- export * from './SelectSimple';
1
+ export * from './SimpleSelect';
2
2
  export * from './CheckboxSelect';
3
- export * from './SelectTypeahead';
3
+ export * from './TypeaheadSelect';
4
+ export * from './MultiTypeaheadSelect';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC"}
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./SelectSimple"), exports);
4
+ tslib_1.__exportStar(require("./SimpleSelect"), exports);
5
5
  tslib_1.__exportStar(require("./CheckboxSelect"), exports);
6
- tslib_1.__exportStar(require("./SelectTypeahead"), exports);
6
+ tslib_1.__exportStar(require("./TypeaheadSelect"), exports);
7
+ tslib_1.__exportStar(require("./MultiTypeaheadSelect"), exports);
7
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Select/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,2DAAiC;AACjC,4DAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Select/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,2DAAiC;AACjC,4DAAkC;AAClC,iEAAuC"}