@react-spectrum/autocomplete 3.0.0-alpha.31 → 3.0.0-alpha.32
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/dist/MobileSearchAutocomplete.main.js +83 -83
- package/dist/MobileSearchAutocomplete.mjs +84 -84
- package/dist/MobileSearchAutocomplete.module.js +83 -83
- package/dist/SearchAutocomplete.main.js +34 -34
- package/dist/SearchAutocomplete.mjs +35 -35
- package/dist/SearchAutocomplete.module.js +34 -34
- package/dist/ar-AE.mjs +1 -1
- package/dist/bg-BG.mjs +1 -1
- package/dist/cs-CZ.mjs +1 -1
- package/dist/da-DK.mjs +1 -1
- package/dist/de-DE.mjs +1 -1
- package/dist/el-GR.mjs +1 -1
- package/dist/en-US.mjs +1 -1
- package/dist/es-ES.mjs +1 -1
- package/dist/et-EE.mjs +1 -1
- package/dist/fi-FI.mjs +1 -1
- package/dist/fr-FR.mjs +1 -1
- package/dist/he-IL.mjs +1 -1
- package/dist/hr-HR.mjs +1 -1
- package/dist/hu-HU.mjs +1 -1
- package/dist/inputgroup_vars_css.mjs +1 -1
- package/dist/intlStrings.mjs +1 -1
- package/dist/it-IT.mjs +1 -1
- package/dist/ja-JP.mjs +1 -1
- package/dist/ko-KR.mjs +1 -1
- package/dist/lt-LT.mjs +1 -1
- package/dist/lv-LV.mjs +1 -1
- package/dist/nb-NO.mjs +1 -1
- package/dist/nl-NL.mjs +1 -1
- package/dist/pl-PL.mjs +1 -1
- package/dist/pt-BR.mjs +1 -1
- package/dist/pt-PT.mjs +1 -1
- package/dist/ro-RO.mjs +1 -1
- package/dist/ru-RU.mjs +1 -1
- package/dist/search_vars_css.mjs +1 -1
- package/dist/searchautocomplete_css.mjs +1 -1
- package/dist/sk-SK.mjs +1 -1
- package/dist/sl-SI.mjs +1 -1
- package/dist/sr-SP.mjs +1 -1
- package/dist/sv-SE.mjs +1 -1
- package/dist/textfield_vars_css.mjs +1 -1
- package/dist/tr-TR.mjs +1 -1
- package/dist/uk-UA.mjs +1 -1
- package/dist/zh-CN.mjs +1 -1
- package/dist/zh-TW.mjs +1 -1
- package/package.json +26 -26
|
@@ -66,7 +66,7 @@ function $parcel$interopDefault(a) {
|
|
|
66
66
|
function $f3f3b62273a2d260$var$SearchAutocomplete(props, ref) {
|
|
67
67
|
props = (0, $fLcex$useProviderProps)(props);
|
|
68
68
|
props = (0, $fLcex$useFormProps)(props);
|
|
69
|
-
if (props.placeholder) console.warn(
|
|
69
|
+
if (props.placeholder) console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead.');
|
|
70
70
|
let isMobile = (0, $fLcex$useIsMobileDevice)();
|
|
71
71
|
if (isMobile) // menuTrigger=focus/manual don't apply to mobile searchwithin
|
|
72
72
|
return /*#__PURE__*/ (0, $fLcex$react).createElement((0, $c940f54e16bafef5$export$e7a90f7d6b078162), {
|
|
@@ -81,8 +81,8 @@ function $f3f3b62273a2d260$var$SearchAutocomplete(props, ref) {
|
|
|
81
81
|
}
|
|
82
82
|
function $f3f3b62273a2d260$var$_SearchAutocompleteBase(props, ref) {
|
|
83
83
|
props = (0, $fLcex$useProviderProps)(props);
|
|
84
|
-
let { menuTrigger: menuTrigger =
|
|
85
|
-
let stringFormatter = (0, $fLcex$useLocalizedStringFormatter)((0, ($parcel$interopDefault($fLcex$intlStringsmodulejs))),
|
|
84
|
+
let { menuTrigger: menuTrigger = 'input', shouldFlip: shouldFlip = true, direction: direction = 'bottom', align: align = 'start', isQuiet: isQuiet, menuWidth: customMenuWidth, loadingState: loadingState, onLoadMore: onLoadMore, onSubmit: onSubmit = ()=>{}, validate: validate } = props;
|
|
85
|
+
let stringFormatter = (0, $fLcex$useLocalizedStringFormatter)((0, ($parcel$interopDefault($fLcex$intlStringsmodulejs))), '@react-spectrum/autocomplete');
|
|
86
86
|
let isAsync = loadingState != null;
|
|
87
87
|
let popoverRef = (0, $fLcex$useRef)(null);
|
|
88
88
|
let unwrappedPopoverRef = (0, $fLcex$useUnwrapDOMRef)(popoverRef);
|
|
@@ -90,7 +90,7 @@ function $f3f3b62273a2d260$var$_SearchAutocompleteBase(props, ref) {
|
|
|
90
90
|
let inputRef = (0, $fLcex$useRef)(null);
|
|
91
91
|
let domRef = (0, $fLcex$useFocusableRef)(ref, inputRef);
|
|
92
92
|
let { contains: contains } = (0, $fLcex$useFilter)({
|
|
93
|
-
sensitivity:
|
|
93
|
+
sensitivity: 'base'
|
|
94
94
|
});
|
|
95
95
|
let state = (0, $fLcex$useComboBoxState)({
|
|
96
96
|
...props,
|
|
@@ -104,7 +104,7 @@ function $f3f3b62273a2d260$var$_SearchAutocompleteBase(props, ref) {
|
|
|
104
104
|
validate
|
|
105
105
|
])
|
|
106
106
|
});
|
|
107
|
-
let layout = (0, $fLcex$useListBoxLayout)(state, loadingState ===
|
|
107
|
+
let layout = (0, $fLcex$useListBoxLayout)(state, loadingState === 'loadingMore');
|
|
108
108
|
let { inputProps: inputProps, listBoxProps: listBoxProps, labelProps: labelProps, clearButtonProps: clearButtonProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = (0, $fLcex$useSearchAutocomplete)({
|
|
109
109
|
...props,
|
|
110
110
|
keyboardDelegate: layout,
|
|
@@ -154,12 +154,12 @@ function $f3f3b62273a2d260$var$_SearchAutocompleteBase(props, ref) {
|
|
|
154
154
|
inputProps: inputProps,
|
|
155
155
|
inputRef: inputRef,
|
|
156
156
|
clearButtonProps: clearButtonProps,
|
|
157
|
-
validationState: props.validationState || (isInvalid ?
|
|
157
|
+
validationState: props.validationState || (isInvalid ? 'invalid' : undefined)
|
|
158
158
|
})), /*#__PURE__*/ (0, $fLcex$react).createElement((0, $fLcex$Popover), {
|
|
159
159
|
state: state,
|
|
160
160
|
UNSAFE_style: style,
|
|
161
|
-
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))),
|
|
162
|
-
|
|
161
|
+
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup-popover', {
|
|
162
|
+
'spectrum-InputGroup-popover--quiet': isQuiet
|
|
163
163
|
}),
|
|
164
164
|
ref: popoverRef,
|
|
165
165
|
triggerRef: inputRef,
|
|
@@ -177,11 +177,11 @@ function $f3f3b62273a2d260$var$_SearchAutocompleteBase(props, ref) {
|
|
|
177
177
|
layout: layout,
|
|
178
178
|
state: state,
|
|
179
179
|
shouldUseVirtualFocus: true,
|
|
180
|
-
isLoading: loadingState ===
|
|
180
|
+
isLoading: loadingState === 'loading' || loadingState === 'loadingMore',
|
|
181
181
|
onLoadMore: onLoadMore,
|
|
182
182
|
renderEmptyState: ()=>isAsync && /*#__PURE__*/ (0, $fLcex$react).createElement("span", {
|
|
183
|
-
className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$searchautocomplete_cssmodulejs))),
|
|
184
|
-
}, stringFormatter.format(
|
|
183
|
+
className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$searchautocomplete_cssmodulejs))), 'no-results')
|
|
184
|
+
}, stringFormatter.format('noResults'))
|
|
185
185
|
})));
|
|
186
186
|
}
|
|
187
187
|
let $f3f3b62273a2d260$var$SearchAutocompleteBase = /*#__PURE__*/ (0, $fLcex$react).forwardRef($f3f3b62273a2d260$var$_SearchAutocompleteBase);
|
|
@@ -193,23 +193,23 @@ function $f3f3b62273a2d260$var$_SearchAutocompleteInput(props, ref) {
|
|
|
193
193
|
});
|
|
194
194
|
let { icon: icon = searchIcon, isQuiet: isQuiet, isDisabled: isDisabled, isReadOnly: isReadOnly, validationState: validationState, inputProps: inputProps, inputRef: inputRef, autoFocus: autoFocus, style: style, className: className, loadingState: loadingState, isOpen: isOpen, menuTrigger: menuTrigger, clearButtonProps: clearButtonProps } = props;
|
|
195
195
|
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $fLcex$useHover)({});
|
|
196
|
-
let stringFormatter = (0, $fLcex$useLocalizedStringFormatter)((0, ($parcel$interopDefault($fLcex$intlStringsmodulejs))),
|
|
196
|
+
let stringFormatter = (0, $fLcex$useLocalizedStringFormatter)((0, ($parcel$interopDefault($fLcex$intlStringsmodulejs))), '@react-spectrum/autocomplete');
|
|
197
197
|
let domProps = (0, $fLcex$filterDOMProps)(props);
|
|
198
198
|
let timeout = (0, $fLcex$useRef)(null);
|
|
199
199
|
let [showLoading, setShowLoading] = (0, $fLcex$useState)(false);
|
|
200
200
|
let loadingCircle = /*#__PURE__*/ (0, $fLcex$react).createElement((0, $fLcex$ProgressCircle), {
|
|
201
|
-
"aria-label": stringFormatter.format(
|
|
201
|
+
"aria-label": stringFormatter.format('loading'),
|
|
202
202
|
size: "S",
|
|
203
203
|
isIndeterminate: true,
|
|
204
|
-
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$textfield_vars_cssmodulejs))),
|
|
204
|
+
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$textfield_vars_cssmodulejs))), 'spectrum-Textfield-circleLoader', (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup-input-circleLoader'), (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))), 'spectrum-Search-circleLoader'))
|
|
205
205
|
});
|
|
206
206
|
let clearButton = /*#__PURE__*/ (0, $fLcex$react).createElement((0, $fLcex$ClearButton), {
|
|
207
207
|
...clearButtonProps,
|
|
208
208
|
preventFocus: true,
|
|
209
|
-
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))),
|
|
209
|
+
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))), 'spectrum-ClearButton'),
|
|
210
210
|
isDisabled: isDisabled
|
|
211
211
|
});
|
|
212
|
-
let isLoading = loadingState ===
|
|
212
|
+
let isLoading = loadingState === 'loading' || loadingState === 'filtering';
|
|
213
213
|
let inputValue = inputProps.value;
|
|
214
214
|
let lastInputValue = (0, $fLcex$useRef)(inputValue);
|
|
215
215
|
(0, $fLcex$useEffect)(()=>{
|
|
@@ -241,38 +241,38 @@ function $f3f3b62273a2d260$var$_SearchAutocompleteInput(props, ref) {
|
|
|
241
241
|
return /*#__PURE__*/ (0, $fLcex$react).createElement((0, $fLcex$FocusRing), {
|
|
242
242
|
within: true,
|
|
243
243
|
isTextInput: true,
|
|
244
|
-
focusClass: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))),
|
|
245
|
-
focusRingClass: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))),
|
|
244
|
+
focusClass: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))), 'is-focused'),
|
|
245
|
+
focusRingClass: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))), 'focus-ring'),
|
|
246
246
|
autoFocus: autoFocus
|
|
247
247
|
}, /*#__PURE__*/ (0, $fLcex$react).createElement("div", {
|
|
248
248
|
...hoverProps,
|
|
249
249
|
ref: ref,
|
|
250
250
|
style: style,
|
|
251
|
-
className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))),
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}, (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$searchautocomplete_cssmodulejs))),
|
|
251
|
+
className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup', {
|
|
252
|
+
'spectrum-InputGroup--quiet': isQuiet,
|
|
253
|
+
'is-disabled': isDisabled,
|
|
254
|
+
'spectrum-InputGroup--invalid': validationState === 'invalid' && !isDisabled,
|
|
255
|
+
'is-hovered': isHovered
|
|
256
|
+
}, (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$searchautocomplete_cssmodulejs))), 'searchautocomplete'), className)
|
|
257
257
|
}, /*#__PURE__*/ (0, $fLcex$react).createElement((0, $fLcex$TextFieldBase), {
|
|
258
258
|
...domProps,
|
|
259
259
|
inputProps: inputProps,
|
|
260
260
|
inputRef: inputRef,
|
|
261
|
-
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))),
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}, (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))),
|
|
267
|
-
inputClassName: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))),
|
|
268
|
-
validationIconClassName: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))),
|
|
261
|
+
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))), 'spectrum-Search', 'spectrum-Search--loadable', 'spectrum-Textfield', {
|
|
262
|
+
'is-disabled': isDisabled,
|
|
263
|
+
'is-quiet': isQuiet,
|
|
264
|
+
'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,
|
|
265
|
+
'spectrum-Search--valid': validationState === 'valid' && !isDisabled
|
|
266
|
+
}, (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup-field')),
|
|
267
|
+
inputClassName: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))), 'spectrum-Search-input'),
|
|
268
|
+
validationIconClassName: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))), 'spectrum-Search-validationIcon'),
|
|
269
269
|
isDisabled: isDisabled,
|
|
270
270
|
isQuiet: isQuiet,
|
|
271
271
|
validationState: validationState,
|
|
272
|
-
isLoading: showLoading && (isOpen || menuTrigger ===
|
|
272
|
+
isLoading: showLoading && (isOpen || menuTrigger === 'manual' || loadingState === 'loading'),
|
|
273
273
|
loadingIndicator: loadingState != null ? loadingCircle : undefined,
|
|
274
274
|
icon: icon,
|
|
275
|
-
wrapperChildren: (inputValue !==
|
|
275
|
+
wrapperChildren: (inputValue !== '' || loadingState === 'filtering' || validationState != null) && !isReadOnly ? clearButton : undefined,
|
|
276
276
|
disableFocusRing: true
|
|
277
277
|
})));
|
|
278
278
|
}
|
|
@@ -283,4 +283,4 @@ let $f3f3b62273a2d260$var$SearchAutocompleteInput = /*#__PURE__*/ (0, $fLcex$rea
|
|
|
283
283
|
|
|
284
284
|
|
|
285
285
|
export {$f3f3b62273a2d260$export$dd65332a5b19fa63 as SearchAutocomplete};
|
|
286
|
-
//# sourceMappingURL=SearchAutocomplete.
|
|
286
|
+
//# sourceMappingURL=SearchAutocomplete.module.js.map
|
|
@@ -66,7 +66,7 @@ function $parcel$interopDefault(a) {
|
|
|
66
66
|
function $f3f3b62273a2d260$var$SearchAutocomplete(props, ref) {
|
|
67
67
|
props = (0, $fLcex$useProviderProps)(props);
|
|
68
68
|
props = (0, $fLcex$useFormProps)(props);
|
|
69
|
-
if (props.placeholder) console.warn(
|
|
69
|
+
if (props.placeholder) console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead.');
|
|
70
70
|
let isMobile = (0, $fLcex$useIsMobileDevice)();
|
|
71
71
|
if (isMobile) // menuTrigger=focus/manual don't apply to mobile searchwithin
|
|
72
72
|
return /*#__PURE__*/ (0, $fLcex$react).createElement((0, $c940f54e16bafef5$export$e7a90f7d6b078162), {
|
|
@@ -81,8 +81,8 @@ function $f3f3b62273a2d260$var$SearchAutocomplete(props, ref) {
|
|
|
81
81
|
}
|
|
82
82
|
function $f3f3b62273a2d260$var$_SearchAutocompleteBase(props, ref) {
|
|
83
83
|
props = (0, $fLcex$useProviderProps)(props);
|
|
84
|
-
let { menuTrigger: menuTrigger =
|
|
85
|
-
let stringFormatter = (0, $fLcex$useLocalizedStringFormatter)((0, ($parcel$interopDefault($fLcex$intlStringsmodulejs))),
|
|
84
|
+
let { menuTrigger: menuTrigger = 'input', shouldFlip: shouldFlip = true, direction: direction = 'bottom', align: align = 'start', isQuiet: isQuiet, menuWidth: customMenuWidth, loadingState: loadingState, onLoadMore: onLoadMore, onSubmit: onSubmit = ()=>{}, validate: validate } = props;
|
|
85
|
+
let stringFormatter = (0, $fLcex$useLocalizedStringFormatter)((0, ($parcel$interopDefault($fLcex$intlStringsmodulejs))), '@react-spectrum/autocomplete');
|
|
86
86
|
let isAsync = loadingState != null;
|
|
87
87
|
let popoverRef = (0, $fLcex$useRef)(null);
|
|
88
88
|
let unwrappedPopoverRef = (0, $fLcex$useUnwrapDOMRef)(popoverRef);
|
|
@@ -90,7 +90,7 @@ function $f3f3b62273a2d260$var$_SearchAutocompleteBase(props, ref) {
|
|
|
90
90
|
let inputRef = (0, $fLcex$useRef)(null);
|
|
91
91
|
let domRef = (0, $fLcex$useFocusableRef)(ref, inputRef);
|
|
92
92
|
let { contains: contains } = (0, $fLcex$useFilter)({
|
|
93
|
-
sensitivity:
|
|
93
|
+
sensitivity: 'base'
|
|
94
94
|
});
|
|
95
95
|
let state = (0, $fLcex$useComboBoxState)({
|
|
96
96
|
...props,
|
|
@@ -104,7 +104,7 @@ function $f3f3b62273a2d260$var$_SearchAutocompleteBase(props, ref) {
|
|
|
104
104
|
validate
|
|
105
105
|
])
|
|
106
106
|
});
|
|
107
|
-
let layout = (0, $fLcex$useListBoxLayout)(state, loadingState ===
|
|
107
|
+
let layout = (0, $fLcex$useListBoxLayout)(state, loadingState === 'loadingMore');
|
|
108
108
|
let { inputProps: inputProps, listBoxProps: listBoxProps, labelProps: labelProps, clearButtonProps: clearButtonProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = (0, $fLcex$useSearchAutocomplete)({
|
|
109
109
|
...props,
|
|
110
110
|
keyboardDelegate: layout,
|
|
@@ -154,12 +154,12 @@ function $f3f3b62273a2d260$var$_SearchAutocompleteBase(props, ref) {
|
|
|
154
154
|
inputProps: inputProps,
|
|
155
155
|
inputRef: inputRef,
|
|
156
156
|
clearButtonProps: clearButtonProps,
|
|
157
|
-
validationState: props.validationState || (isInvalid ?
|
|
157
|
+
validationState: props.validationState || (isInvalid ? 'invalid' : undefined)
|
|
158
158
|
})), /*#__PURE__*/ (0, $fLcex$react).createElement((0, $fLcex$Popover), {
|
|
159
159
|
state: state,
|
|
160
160
|
UNSAFE_style: style,
|
|
161
|
-
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))),
|
|
162
|
-
|
|
161
|
+
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup-popover', {
|
|
162
|
+
'spectrum-InputGroup-popover--quiet': isQuiet
|
|
163
163
|
}),
|
|
164
164
|
ref: popoverRef,
|
|
165
165
|
triggerRef: inputRef,
|
|
@@ -177,11 +177,11 @@ function $f3f3b62273a2d260$var$_SearchAutocompleteBase(props, ref) {
|
|
|
177
177
|
layout: layout,
|
|
178
178
|
state: state,
|
|
179
179
|
shouldUseVirtualFocus: true,
|
|
180
|
-
isLoading: loadingState ===
|
|
180
|
+
isLoading: loadingState === 'loading' || loadingState === 'loadingMore',
|
|
181
181
|
onLoadMore: onLoadMore,
|
|
182
182
|
renderEmptyState: ()=>isAsync && /*#__PURE__*/ (0, $fLcex$react).createElement("span", {
|
|
183
|
-
className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$searchautocomplete_cssmodulejs))),
|
|
184
|
-
}, stringFormatter.format(
|
|
183
|
+
className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$searchautocomplete_cssmodulejs))), 'no-results')
|
|
184
|
+
}, stringFormatter.format('noResults'))
|
|
185
185
|
})));
|
|
186
186
|
}
|
|
187
187
|
let $f3f3b62273a2d260$var$SearchAutocompleteBase = /*#__PURE__*/ (0, $fLcex$react).forwardRef($f3f3b62273a2d260$var$_SearchAutocompleteBase);
|
|
@@ -193,23 +193,23 @@ function $f3f3b62273a2d260$var$_SearchAutocompleteInput(props, ref) {
|
|
|
193
193
|
});
|
|
194
194
|
let { icon: icon = searchIcon, isQuiet: isQuiet, isDisabled: isDisabled, isReadOnly: isReadOnly, validationState: validationState, inputProps: inputProps, inputRef: inputRef, autoFocus: autoFocus, style: style, className: className, loadingState: loadingState, isOpen: isOpen, menuTrigger: menuTrigger, clearButtonProps: clearButtonProps } = props;
|
|
195
195
|
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $fLcex$useHover)({});
|
|
196
|
-
let stringFormatter = (0, $fLcex$useLocalizedStringFormatter)((0, ($parcel$interopDefault($fLcex$intlStringsmodulejs))),
|
|
196
|
+
let stringFormatter = (0, $fLcex$useLocalizedStringFormatter)((0, ($parcel$interopDefault($fLcex$intlStringsmodulejs))), '@react-spectrum/autocomplete');
|
|
197
197
|
let domProps = (0, $fLcex$filterDOMProps)(props);
|
|
198
198
|
let timeout = (0, $fLcex$useRef)(null);
|
|
199
199
|
let [showLoading, setShowLoading] = (0, $fLcex$useState)(false);
|
|
200
200
|
let loadingCircle = /*#__PURE__*/ (0, $fLcex$react).createElement((0, $fLcex$ProgressCircle), {
|
|
201
|
-
"aria-label": stringFormatter.format(
|
|
201
|
+
"aria-label": stringFormatter.format('loading'),
|
|
202
202
|
size: "S",
|
|
203
203
|
isIndeterminate: true,
|
|
204
|
-
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$textfield_vars_cssmodulejs))),
|
|
204
|
+
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$textfield_vars_cssmodulejs))), 'spectrum-Textfield-circleLoader', (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup-input-circleLoader'), (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))), 'spectrum-Search-circleLoader'))
|
|
205
205
|
});
|
|
206
206
|
let clearButton = /*#__PURE__*/ (0, $fLcex$react).createElement((0, $fLcex$ClearButton), {
|
|
207
207
|
...clearButtonProps,
|
|
208
208
|
preventFocus: true,
|
|
209
|
-
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))),
|
|
209
|
+
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))), 'spectrum-ClearButton'),
|
|
210
210
|
isDisabled: isDisabled
|
|
211
211
|
});
|
|
212
|
-
let isLoading = loadingState ===
|
|
212
|
+
let isLoading = loadingState === 'loading' || loadingState === 'filtering';
|
|
213
213
|
let inputValue = inputProps.value;
|
|
214
214
|
let lastInputValue = (0, $fLcex$useRef)(inputValue);
|
|
215
215
|
(0, $fLcex$useEffect)(()=>{
|
|
@@ -241,38 +241,38 @@ function $f3f3b62273a2d260$var$_SearchAutocompleteInput(props, ref) {
|
|
|
241
241
|
return /*#__PURE__*/ (0, $fLcex$react).createElement((0, $fLcex$FocusRing), {
|
|
242
242
|
within: true,
|
|
243
243
|
isTextInput: true,
|
|
244
|
-
focusClass: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))),
|
|
245
|
-
focusRingClass: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))),
|
|
244
|
+
focusClass: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))), 'is-focused'),
|
|
245
|
+
focusRingClass: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))), 'focus-ring'),
|
|
246
246
|
autoFocus: autoFocus
|
|
247
247
|
}, /*#__PURE__*/ (0, $fLcex$react).createElement("div", {
|
|
248
248
|
...hoverProps,
|
|
249
249
|
ref: ref,
|
|
250
250
|
style: style,
|
|
251
|
-
className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))),
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}, (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$searchautocomplete_cssmodulejs))),
|
|
251
|
+
className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup', {
|
|
252
|
+
'spectrum-InputGroup--quiet': isQuiet,
|
|
253
|
+
'is-disabled': isDisabled,
|
|
254
|
+
'spectrum-InputGroup--invalid': validationState === 'invalid' && !isDisabled,
|
|
255
|
+
'is-hovered': isHovered
|
|
256
|
+
}, (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$searchautocomplete_cssmodulejs))), 'searchautocomplete'), className)
|
|
257
257
|
}, /*#__PURE__*/ (0, $fLcex$react).createElement((0, $fLcex$TextFieldBase), {
|
|
258
258
|
...domProps,
|
|
259
259
|
inputProps: inputProps,
|
|
260
260
|
inputRef: inputRef,
|
|
261
|
-
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))),
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
}, (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))),
|
|
267
|
-
inputClassName: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))),
|
|
268
|
-
validationIconClassName: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))),
|
|
261
|
+
UNSAFE_className: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))), 'spectrum-Search', 'spectrum-Search--loadable', 'spectrum-Textfield', {
|
|
262
|
+
'is-disabled': isDisabled,
|
|
263
|
+
'is-quiet': isQuiet,
|
|
264
|
+
'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,
|
|
265
|
+
'spectrum-Search--valid': validationState === 'valid' && !isDisabled
|
|
266
|
+
}, (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup-field')),
|
|
267
|
+
inputClassName: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))), 'spectrum-Search-input'),
|
|
268
|
+
validationIconClassName: (0, $fLcex$classNames)((0, ($parcel$interopDefault($fLcex$search_vars_cssmodulejs))), 'spectrum-Search-validationIcon'),
|
|
269
269
|
isDisabled: isDisabled,
|
|
270
270
|
isQuiet: isQuiet,
|
|
271
271
|
validationState: validationState,
|
|
272
|
-
isLoading: showLoading && (isOpen || menuTrigger ===
|
|
272
|
+
isLoading: showLoading && (isOpen || menuTrigger === 'manual' || loadingState === 'loading'),
|
|
273
273
|
loadingIndicator: loadingState != null ? loadingCircle : undefined,
|
|
274
274
|
icon: icon,
|
|
275
|
-
wrapperChildren: (inputValue !==
|
|
275
|
+
wrapperChildren: (inputValue !== '' || loadingState === 'filtering' || validationState != null) && !isReadOnly ? clearButton : undefined,
|
|
276
276
|
disableFocusRing: true
|
|
277
277
|
})));
|
|
278
278
|
}
|
package/dist/ar-AE.mjs
CHANGED
package/dist/bg-BG.mjs
CHANGED
package/dist/cs-CZ.mjs
CHANGED
package/dist/da-DK.mjs
CHANGED
package/dist/de-DE.mjs
CHANGED
package/dist/el-GR.mjs
CHANGED
package/dist/en-US.mjs
CHANGED
package/dist/es-ES.mjs
CHANGED
package/dist/et-EE.mjs
CHANGED
package/dist/fi-FI.mjs
CHANGED
package/dist/fr-FR.mjs
CHANGED
package/dist/he-IL.mjs
CHANGED
package/dist/hr-HR.mjs
CHANGED
package/dist/hu-HU.mjs
CHANGED
package/dist/intlStrings.mjs
CHANGED
package/dist/it-IT.mjs
CHANGED
package/dist/ja-JP.mjs
CHANGED
package/dist/ko-KR.mjs
CHANGED
package/dist/lt-LT.mjs
CHANGED
package/dist/lv-LV.mjs
CHANGED
package/dist/nb-NO.mjs
CHANGED
package/dist/nl-NL.mjs
CHANGED
package/dist/pl-PL.mjs
CHANGED
package/dist/pt-BR.mjs
CHANGED
package/dist/pt-PT.mjs
CHANGED
package/dist/ro-RO.mjs
CHANGED
package/dist/ru-RU.mjs
CHANGED
package/dist/search_vars_css.mjs
CHANGED
package/dist/sk-SK.mjs
CHANGED
package/dist/sl-SI.mjs
CHANGED
package/dist/sr-SP.mjs
CHANGED
package/dist/sv-SE.mjs
CHANGED
package/dist/tr-TR.mjs
CHANGED
package/dist/uk-UA.mjs
CHANGED
package/dist/zh-CN.mjs
CHANGED
package/dist/zh-TW.mjs
CHANGED