@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.
Files changed (46) hide show
  1. package/dist/MobileSearchAutocomplete.main.js +83 -83
  2. package/dist/MobileSearchAutocomplete.mjs +84 -84
  3. package/dist/MobileSearchAutocomplete.module.js +83 -83
  4. package/dist/SearchAutocomplete.main.js +34 -34
  5. package/dist/SearchAutocomplete.mjs +35 -35
  6. package/dist/SearchAutocomplete.module.js +34 -34
  7. package/dist/ar-AE.mjs +1 -1
  8. package/dist/bg-BG.mjs +1 -1
  9. package/dist/cs-CZ.mjs +1 -1
  10. package/dist/da-DK.mjs +1 -1
  11. package/dist/de-DE.mjs +1 -1
  12. package/dist/el-GR.mjs +1 -1
  13. package/dist/en-US.mjs +1 -1
  14. package/dist/es-ES.mjs +1 -1
  15. package/dist/et-EE.mjs +1 -1
  16. package/dist/fi-FI.mjs +1 -1
  17. package/dist/fr-FR.mjs +1 -1
  18. package/dist/he-IL.mjs +1 -1
  19. package/dist/hr-HR.mjs +1 -1
  20. package/dist/hu-HU.mjs +1 -1
  21. package/dist/inputgroup_vars_css.mjs +1 -1
  22. package/dist/intlStrings.mjs +1 -1
  23. package/dist/it-IT.mjs +1 -1
  24. package/dist/ja-JP.mjs +1 -1
  25. package/dist/ko-KR.mjs +1 -1
  26. package/dist/lt-LT.mjs +1 -1
  27. package/dist/lv-LV.mjs +1 -1
  28. package/dist/nb-NO.mjs +1 -1
  29. package/dist/nl-NL.mjs +1 -1
  30. package/dist/pl-PL.mjs +1 -1
  31. package/dist/pt-BR.mjs +1 -1
  32. package/dist/pt-PT.mjs +1 -1
  33. package/dist/ro-RO.mjs +1 -1
  34. package/dist/ru-RU.mjs +1 -1
  35. package/dist/search_vars_css.mjs +1 -1
  36. package/dist/searchautocomplete_css.mjs +1 -1
  37. package/dist/sk-SK.mjs +1 -1
  38. package/dist/sl-SI.mjs +1 -1
  39. package/dist/sr-SP.mjs +1 -1
  40. package/dist/sv-SE.mjs +1 -1
  41. package/dist/textfield_vars_css.mjs +1 -1
  42. package/dist/tr-TR.mjs +1 -1
  43. package/dist/uk-UA.mjs +1 -1
  44. package/dist/zh-CN.mjs +1 -1
  45. package/dist/zh-TW.mjs +1 -1
  46. package/package.json +26 -26
@@ -77,7 +77,7 @@ function $c940f54e16bafef5$var$_MobileSearchAutocomplete(props, ref) {
77
77
  props = (0, $9yRST$useProviderProps)(props);
78
78
  let { isQuiet: isQuiet, isDisabled: isDisabled, isRequired: isRequired, validationBehavior: validationBehavior, validate: validate, name: name, isReadOnly: isReadOnly, onSubmit: onSubmit = ()=>{} } = props;
79
79
  let { contains: contains } = (0, $9yRST$useFilter)({
80
- sensitivity: "base"
80
+ sensitivity: 'base'
81
81
  });
82
82
  let state = (0, $9yRST$useComboBoxState)({
83
83
  ...props,
@@ -98,7 +98,7 @@ function $c940f54e16bafef5$var$_MobileSearchAutocomplete(props, ref) {
98
98
  let buttonRef = (0, $9yRST$useRef)(null);
99
99
  let domRef = (0, $9yRST$useFocusableRef)(ref, buttonRef);
100
100
  let { triggerProps: triggerProps, overlayProps: overlayProps } = (0, $9yRST$useOverlayTrigger)({
101
- type: "listbox"
101
+ type: 'listbox'
102
102
  }, state, buttonRef);
103
103
  let inputRef = (0, $9yRST$useRef)(null);
104
104
  (0, $9yRST$useFormValidation)({
@@ -109,12 +109,12 @@ function $c940f54e16bafef5$var$_MobileSearchAutocomplete(props, ref) {
109
109
  }
110
110
  }, state, inputRef);
111
111
  let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation;
112
- let validationState = props.validationState || (isInvalid ? "invalid" : undefined);
112
+ let validationState = props.validationState || (isInvalid ? 'invalid' : undefined);
113
113
  var _props_errorMessage;
114
- let errorMessage = (_props_errorMessage = props.errorMessage) !== null && _props_errorMessage !== void 0 ? _props_errorMessage : validationErrors.join(" ");
114
+ let errorMessage = (_props_errorMessage = props.errorMessage) !== null && _props_errorMessage !== void 0 ? _props_errorMessage : validationErrors.join(' ');
115
115
  let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $9yRST$useField)({
116
116
  ...props,
117
- labelElementType: "span",
117
+ labelElementType: 'span',
118
118
  isInvalid: isInvalid,
119
119
  errorMessage: errorMessage
120
120
  });
@@ -122,18 +122,18 @@ function $c940f54e16bafef5$var$_MobileSearchAutocomplete(props, ref) {
122
122
  labelProps.onClick = ()=>{
123
123
  if (!props.isDisabled && buttonRef.current) {
124
124
  buttonRef.current.focus();
125
- (0, $9yRST$setInteractionModality)("keyboard");
125
+ (0, $9yRST$setInteractionModality)('keyboard');
126
126
  }
127
127
  };
128
128
  let inputProps = {
129
- type: "hidden",
129
+ type: 'hidden',
130
130
  name: name,
131
131
  value: state.inputValue
132
132
  };
133
- if (validationBehavior === "native") {
133
+ if (validationBehavior === 'native') {
134
134
  // Use a hidden <input type="text"> rather than <input type="hidden">
135
135
  // so that an empty value blocks HTML form submission when the field is required.
136
- inputProps.type = "text";
136
+ inputProps.type = 'text';
137
137
  inputProps.hidden = true;
138
138
  inputProps.required = isRequired;
139
139
  // Ignore react warning.
@@ -163,9 +163,9 @@ function $c940f54e16bafef5$var$_MobileSearchAutocomplete(props, ref) {
163
163
  isPlaceholder: !state.inputValue,
164
164
  validationState: validationState,
165
165
  inputValue: state.inputValue,
166
- clearInput: ()=>state.setInputValue(""),
167
- onPress: ()=>!isReadOnly && state.open(null, "manual")
168
- }, state.inputValue || props.placeholder || "")), /*#__PURE__*/ (0, $9yRST$react).createElement("input", {
166
+ clearInput: ()=>state.setInputValue(''),
167
+ onPress: ()=>!isReadOnly && state.open(null, 'manual')
168
+ }, state.inputValue || props.placeholder || '')), /*#__PURE__*/ (0, $9yRST$react).createElement("input", {
169
169
  ...inputProps,
170
170
  ref: inputRef
171
171
  }), /*#__PURE__*/ (0, $9yRST$react).createElement((0, $9yRST$Tray), {
@@ -187,16 +187,16 @@ const $c940f54e16bafef5$var$SearchAutocompleteButton = /*#__PURE__*/ (0, $9yRST$
187
187
  "data-testid": "searchicon"
188
188
  });
189
189
  let { icon: icon = searchIcon, isQuiet: isQuiet, isDisabled: isDisabled, isReadOnly: isReadOnly, isPlaceholder: isPlaceholder, validationState: validationState, inputValue: inputValue, clearInput: clearInput, children: children, style: style, className: className } = props;
190
- let stringFormatter = (0, $9yRST$useLocalizedStringFormatter)((0, ($parcel$interopDefault($9yRST$intlStringsmodulejs))), "@react-spectrum/autocomplete");
190
+ let stringFormatter = (0, $9yRST$useLocalizedStringFormatter)((0, ($parcel$interopDefault($9yRST$intlStringsmodulejs))), '@react-spectrum/autocomplete');
191
191
  let valueId = (0, $9yRST$useId)();
192
192
  let invalidId = (0, $9yRST$useId)();
193
- let validationIcon = validationState === "invalid" ? /*#__PURE__*/ (0, $9yRST$react).createElement((0, $9yRST$spectrumiconsuiAlertMedium), {
193
+ let validationIcon = validationState === 'invalid' ? /*#__PURE__*/ (0, $9yRST$react).createElement((0, $9yRST$spectrumiconsuiAlertMedium), {
194
194
  id: invalidId,
195
- "aria-label": stringFormatter.format("invalid")
195
+ "aria-label": stringFormatter.format('invalid')
196
196
  }) : /*#__PURE__*/ (0, $9yRST$react).createElement((0, $9yRST$spectrumiconsuiCheckmarkMedium), null);
197
197
  if (icon) icon = /*#__PURE__*/ (0, $9yRST$react).cloneElement(icon, {
198
- UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$textfield_vars_cssmodulejs))), "spectrum-Textfield-icon"),
199
- size: "S"
198
+ UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$textfield_vars_cssmodulejs))), 'spectrum-Textfield-icon'),
199
+ size: 'S'
200
200
  });
201
201
  let clearButton = /*#__PURE__*/ (0, $9yRST$react).createElement((0, $9yRST$ClearButton), {
202
202
  onPress: (e)=>{
@@ -205,25 +205,25 @@ const $c940f54e16bafef5$var$SearchAutocompleteButton = /*#__PURE__*/ (0, $9yRST$
205
205
  props === null || props === void 0 ? void 0 : (_props_onPress = props.onPress) === null || _props_onPress === void 0 ? void 0 : _props_onPress.call(props, e);
206
206
  },
207
207
  preventFocus: true,
208
- "aria-label": stringFormatter.format("clear"),
208
+ "aria-label": stringFormatter.format('clear'),
209
209
  excludeFromTabOrder: true,
210
- UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), "spectrum-ClearButton"),
210
+ UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), 'spectrum-ClearButton'),
211
211
  isDisabled: isDisabled
212
212
  });
213
213
  let validation = /*#__PURE__*/ (0, $9yRST$react).cloneElement(validationIcon, {
214
- UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$textfield_vars_cssmodulejs))), "spectrum-Textfield-validationIcon", (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$inputgroup_vars_cssmodulejs))), "spectrum-InputGroup-input-validationIcon"), (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), "spectrum-Search-validationIcon"))
214
+ UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$textfield_vars_cssmodulejs))), 'spectrum-Textfield-validationIcon', (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup-input-validationIcon'), (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), 'spectrum-Search-validationIcon'))
215
215
  });
216
216
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $9yRST$useHover)({});
217
217
  let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $9yRST$useFocusRing)();
218
218
  let { buttonProps: buttonProps } = (0, $9yRST$useButton)({
219
219
  ...props,
220
- "aria-labelledby": [
221
- props["aria-labelledby"],
222
- props["aria-label"] && !props["aria-labelledby"] ? props.id : null,
220
+ 'aria-labelledby': [
221
+ props['aria-labelledby'],
222
+ props['aria-label'] && !props['aria-labelledby'] ? props.id : null,
223
223
  valueId,
224
- validationState === "invalid" ? invalidId : null
225
- ].filter(Boolean).join(" "),
226
- elementType: "div"
224
+ validationState === 'invalid' ? invalidId : null
225
+ ].filter(Boolean).join(' '),
226
+ elementType: 'div'
227
227
  }, ref);
228
228
  return /*#__PURE__*/ (0, $9yRST$react).createElement("div", {
229
229
  ...(0, $9yRST$mergeProps)(hoverProps, focusProps, buttonProps),
@@ -231,40 +231,40 @@ const $c940f54e16bafef5$var$SearchAutocompleteButton = /*#__PURE__*/ (0, $9yRST$
231
231
  ref: ref,
232
232
  style: {
233
233
  ...style,
234
- outline: "none"
234
+ outline: 'none'
235
235
  },
236
- className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$inputgroup_vars_cssmodulejs))), "spectrum-InputGroup", {
237
- "spectrum-InputGroup--quiet": isQuiet,
238
- "is-disabled": isDisabled,
239
- "spectrum-InputGroup--invalid": validationState === "invalid" && !isDisabled,
240
- "is-hovered": isHovered,
241
- "is-focused": isFocused,
242
- "focus-ring": isFocusVisible
243
- }, (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), "searchautocomplete", "mobile-searchautocomplete"), className)
236
+ className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup', {
237
+ 'spectrum-InputGroup--quiet': isQuiet,
238
+ 'is-disabled': isDisabled,
239
+ 'spectrum-InputGroup--invalid': validationState === 'invalid' && !isDisabled,
240
+ 'is-hovered': isHovered,
241
+ 'is-focused': isFocused,
242
+ 'focus-ring': isFocusVisible
243
+ }, (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), 'searchautocomplete', 'mobile-searchautocomplete'), className)
244
244
  }, /*#__PURE__*/ (0, $9yRST$react).createElement("div", {
245
- className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$textfield_vars_cssmodulejs))), "spectrum-Textfield", {
246
- "spectrum-Textfield--invalid": validationState === "invalid" && !isDisabled,
247
- "spectrum-Textfield--valid": validationState === "valid" && !isDisabled,
248
- "spectrum-Textfield--quiet": isQuiet
249
- }, (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), "spectrum-Search", "spectrum-Search--loadable", {
250
- "is-disabled": isDisabled,
251
- "is-quiet": isQuiet,
252
- "spectrum-Search--invalid": validationState === "invalid" && !isDisabled,
253
- "spectrum-Search--valid": validationState === "valid" && !isDisabled
254
- }), (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$inputgroup_vars_cssmodulejs))), "spectrum-InputGroup-field"))
245
+ className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$textfield_vars_cssmodulejs))), 'spectrum-Textfield', {
246
+ 'spectrum-Textfield--invalid': validationState === 'invalid' && !isDisabled,
247
+ 'spectrum-Textfield--valid': validationState === 'valid' && !isDisabled,
248
+ 'spectrum-Textfield--quiet': isQuiet
249
+ }, (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), 'spectrum-Search', 'spectrum-Search--loadable', {
250
+ 'is-disabled': isDisabled,
251
+ 'is-quiet': isQuiet,
252
+ 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,
253
+ 'spectrum-Search--valid': validationState === 'valid' && !isDisabled
254
+ }), (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$inputgroup_vars_cssmodulejs))), 'spectrum-InputGroup-field'))
255
255
  }, /*#__PURE__*/ (0, $9yRST$react).createElement("div", {
256
- className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$textfield_vars_cssmodulejs))), "spectrum-Textfield-input", {
257
- "spectrum-Textfield-inputIcon": !!icon,
258
- "is-hovered": isHovered,
259
- "is-placeholder": isPlaceholder,
260
- "is-disabled": isDisabled,
261
- "is-quiet": isQuiet,
262
- "is-focused": isFocused
263
- }, (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), "spectrum-Search-input"), (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), "mobile-input"))
256
+ className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$textfield_vars_cssmodulejs))), 'spectrum-Textfield-input', {
257
+ 'spectrum-Textfield-inputIcon': !!icon,
258
+ 'is-hovered': isHovered,
259
+ 'is-placeholder': isPlaceholder,
260
+ 'is-disabled': isDisabled,
261
+ 'is-quiet': isQuiet,
262
+ 'is-focused': isFocused
263
+ }, (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), 'spectrum-Search-input'), (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), 'mobile-input'))
264
264
  }, icon, /*#__PURE__*/ (0, $9yRST$react).createElement("span", {
265
265
  id: valueId,
266
- className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), "mobile-value")
267
- }, children)), validationState && !isDisabled ? validation : null, (inputValue !== "" || validationState != null) && !isReadOnly && clearButton));
266
+ className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), 'mobile-value')
267
+ }, children)), validationState && !isDisabled ? validation : null, (inputValue !== '' || validationState != null) && !isReadOnly && clearButton));
268
268
  });
269
269
  function $c940f54e16bafef5$var$SearchAutocompleteTray(props) {
270
270
  let searchIcon = /*#__PURE__*/ (0, $9yRST$react).createElement((0, $9yRST$spectrumiconsuiMagnifier), {
@@ -277,9 +277,9 @@ function $c940f54e16bafef5$var$SearchAutocompleteTray(props) {
277
277
  let inputRef = (0, $9yRST$useRef)(null);
278
278
  let popoverRef = (0, $9yRST$useRef)(null);
279
279
  let listBoxRef = (0, $9yRST$useRef)(null);
280
- let isLoading = loadingState === "loading" || loadingState === "loadingMore";
280
+ let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';
281
281
  let layout = (0, $9yRST$useListBoxLayout)(state, isLoading);
282
- let stringFormatter = (0, $9yRST$useLocalizedStringFormatter)((0, ($parcel$interopDefault($9yRST$intlStringsmodulejs))), "@react-spectrum/autocomplete");
282
+ let stringFormatter = (0, $9yRST$useLocalizedStringFormatter)((0, ($parcel$interopDefault($9yRST$intlStringsmodulejs))), '@react-spectrum/autocomplete');
283
283
  let { inputProps: inputProps, listBoxProps: listBoxProps, labelProps: labelProps, clearButtonProps: clearButtonProps } = (0, $9yRST$useSearchAutocomplete)({
284
284
  ...props,
285
285
  keyboardDelegate: layout,
@@ -300,29 +300,29 @@ function $c940f54e16bafef5$var$SearchAutocompleteTray(props) {
300
300
  if (!state.isOpen && state.isFocused) state.setFocused(false);
301
301
  });
302
302
  let { dialogProps: dialogProps } = (0, $9yRST$useDialog)({
303
- "aria-labelledby": (0, $9yRST$useId)(labelProps.id)
303
+ 'aria-labelledby': (0, $9yRST$useId)(labelProps.id)
304
304
  }, popoverRef);
305
305
  // Override the role of the input to "searchbox" instead of "combobox".
306
306
  // Since the listbox is always visible, the combobox role doesn't really give us anything.
307
307
  // VoiceOver on iOS reads "double tap to collapse" when focused on the input rather than
308
308
  // "double tap to edit text", as with a textbox or searchbox. We'd like double tapping to
309
309
  // open the virtual keyboard rather than closing the tray.
310
- inputProps.role = "searchbox";
311
- inputProps["aria-haspopup"] = "listbox";
310
+ inputProps.role = 'searchbox';
311
+ inputProps['aria-haspopup'] = 'listbox';
312
312
  delete inputProps.onTouchEnd;
313
313
  let clearButton = /*#__PURE__*/ (0, $9yRST$react).createElement((0, $9yRST$ClearButton), {
314
314
  ...clearButtonProps,
315
315
  preventFocus: true,
316
- "aria-label": stringFormatter.format("clear"),
316
+ "aria-label": stringFormatter.format('clear'),
317
317
  excludeFromTabOrder: true,
318
- UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), "spectrum-ClearButton"),
318
+ UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), 'spectrum-ClearButton'),
319
319
  isDisabled: isDisabled
320
320
  });
321
321
  let loadingCircle = /*#__PURE__*/ (0, $9yRST$react).createElement((0, $9yRST$ProgressCircle), {
322
- "aria-label": stringFormatter.format("loading"),
322
+ "aria-label": stringFormatter.format('loading'),
323
323
  size: "S",
324
324
  isIndeterminate: true,
325
- UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), "spectrum-Search-circleLoader", (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$textfield_vars_cssmodulejs))), "spectrum-Textfield-circleLoader"))
325
+ UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), 'spectrum-Search-circleLoader', (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$textfield_vars_cssmodulejs))), 'spectrum-Textfield-circleLoader'))
326
326
  });
327
327
  // Close the software keyboard on scroll to give the user a bigger area to scroll.
328
328
  // But only do this if scrolling with touch, otherwise it can cause issues with touch
@@ -345,7 +345,7 @@ function $c940f54e16bafef5$var$SearchAutocompleteTray(props) {
345
345
  let inputValue = inputProps.value;
346
346
  let lastInputValue = (0, $9yRST$useRef)(inputValue);
347
347
  (0, $9yRST$useEffect)(()=>{
348
- if (loadingState === "filtering" && !showLoading) {
348
+ if (loadingState === 'filtering' && !showLoading) {
349
349
  if (timeout.current === null) timeout.current = setTimeout(()=>{
350
350
  setShowLoading(true);
351
351
  }, 500);
@@ -356,7 +356,7 @@ function $c940f54e16bafef5$var$SearchAutocompleteTray(props) {
356
356
  setShowLoading(true);
357
357
  }, 500);
358
358
  }
359
- } else if (loadingState !== "filtering") {
359
+ } else if (loadingState !== 'filtering') {
360
360
  // If loading is no longer happening, clear any timers and hide the loading circle
361
361
  setShowLoading(false);
362
362
  if (timeout.current !== null) {
@@ -372,7 +372,7 @@ function $c940f54e16bafef5$var$SearchAutocompleteTray(props) {
372
372
  ]);
373
373
  let onKeyDown = (e)=>{
374
374
  // Close virtual keyboard, close tray, and fire onSubmit if user hits Enter w/o any focused options
375
- if (e.key === "Enter" && state.selectionManager.focusedKey == null) {
375
+ if (e.key === 'Enter' && state.selectionManager.focusedKey == null) {
376
376
  var _popoverRef_current;
377
377
  (_popoverRef_current = popoverRef.current) === null || _popoverRef_current === void 0 ? void 0 : _popoverRef_current.focus();
378
378
  if (onClose) onClose();
@@ -380,8 +380,8 @@ function $c940f54e16bafef5$var$SearchAutocompleteTray(props) {
380
380
  } else if (inputProps.onKeyDown) inputProps.onKeyDown(e);
381
381
  };
382
382
  if (icon) icon = /*#__PURE__*/ (0, $9yRST$react).cloneElement(icon, {
383
- UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$textfield_vars_cssmodulejs))), "spectrum-Textfield-icon"),
384
- size: "S"
383
+ UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$textfield_vars_cssmodulejs))), 'spectrum-Textfield-icon'),
384
+ size: 'S'
385
385
  });
386
386
  return /*#__PURE__*/ (0, $9yRST$react).createElement((0, $9yRST$FocusScope), {
387
387
  restoreFocus: true,
@@ -389,7 +389,7 @@ function $c940f54e16bafef5$var$SearchAutocompleteTray(props) {
389
389
  }, /*#__PURE__*/ (0, $9yRST$react).createElement("div", {
390
390
  ...(0, $9yRST$mergeProps)(overlayProps, dialogProps),
391
391
  ref: popoverRef,
392
- className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), "tray-dialog")
392
+ className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), 'tray-dialog')
393
393
  }, /*#__PURE__*/ (0, $9yRST$react).createElement((0, $9yRST$DismissButton), {
394
394
  onDismiss: onClose
395
395
  }), /*#__PURE__*/ (0, $9yRST$react).createElement((0, $9yRST$TextFieldBase), {
@@ -401,19 +401,19 @@ function $c940f54e16bafef5$var$SearchAutocompleteTray(props) {
401
401
  },
402
402
  inputRef: inputRef,
403
403
  isDisabled: isDisabled,
404
- isLoading: showLoading && loadingState === "filtering",
404
+ isLoading: showLoading && loadingState === 'filtering',
405
405
  loadingIndicator: loadingState != null ? loadingCircle : undefined,
406
406
  validationState: validationState,
407
- wrapperChildren: (state.inputValue !== "" || loadingState === "filtering" || validationState != null) && !props.isReadOnly ? clearButton : undefined,
407
+ wrapperChildren: (state.inputValue !== '' || loadingState === 'filtering' || validationState != null) && !props.isReadOnly ? clearButton : undefined,
408
408
  icon: icon,
409
- UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), "spectrum-Search", "spectrum-Textfield", "spectrum-Search--loadable", {
410
- "spectrum-Search--invalid": validationState === "invalid" && !isDisabled,
411
- "spectrum-Search--valid": validationState === "valid" && !isDisabled
412
- }, (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), "tray-textfield", {
413
- "has-label": !!props.label
409
+ UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), 'spectrum-Search', 'spectrum-Textfield', 'spectrum-Search--loadable', {
410
+ 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,
411
+ 'spectrum-Search--valid': validationState === 'valid' && !isDisabled
412
+ }, (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), 'tray-textfield', {
413
+ 'has-label': !!props.label
414
414
  })),
415
- inputClassName: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), "spectrum-Search-input"),
416
- validationIconClassName: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), "spectrum-Search-validationIcon")
415
+ inputClassName: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), 'spectrum-Search-input'),
416
+ validationIconClassName: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$search_vars_cssmodulejs))), 'spectrum-Search-validationIcon')
417
417
  }), /*#__PURE__*/ (0, $9yRST$react).createElement((0, $9yRST$ListBoxBase), {
418
418
  ...listBoxProps,
419
419
  domProps: {
@@ -426,10 +426,10 @@ function $c940f54e16bafef5$var$SearchAutocompleteTray(props) {
426
426
  layout: layout,
427
427
  state: state,
428
428
  shouldUseVirtualFocus: true,
429
- renderEmptyState: ()=>loadingState !== "loading" && /*#__PURE__*/ (0, $9yRST$react).createElement("span", {
430
- className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), "no-results")
431
- }, stringFormatter.format("noResults")),
432
- UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), "tray-listbox"),
429
+ renderEmptyState: ()=>loadingState !== 'loading' && /*#__PURE__*/ (0, $9yRST$react).createElement("span", {
430
+ className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), 'no-results')
431
+ }, stringFormatter.format('noResults')),
432
+ UNSAFE_className: (0, $9yRST$classNames)((0, ($parcel$interopDefault($9yRST$searchautocomplete_cssmodulejs))), 'tray-listbox'),
433
433
  ref: listBoxRef,
434
434
  onScroll: onScroll,
435
435
  onLoadMore: onLoadMore,
@@ -72,7 +72,7 @@ $parcel$export(module.exports, "SearchAutocomplete", () => $dcf500d58a031ca6$exp
72
72
  function $dcf500d58a031ca6$var$SearchAutocomplete(props, ref) {
73
73
  props = (0, $k6PeR$reactspectrumprovider.useProviderProps)(props);
74
74
  props = (0, $k6PeR$reactspectrumform.useFormProps)(props);
75
- if (props.placeholder) console.warn("Placeholders are deprecated due to accessibility issues. Please use help text instead.");
75
+ if (props.placeholder) console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead.');
76
76
  let isMobile = (0, $k6PeR$reactspectrumutils.useIsMobileDevice)();
77
77
  if (isMobile) // menuTrigger=focus/manual don't apply to mobile searchwithin
78
78
  return /*#__PURE__*/ (0, ($parcel$interopDefault($k6PeR$react))).createElement((0, $a9f98e219df0b64d$exports.MobileSearchAutocomplete), {
@@ -87,8 +87,8 @@ function $dcf500d58a031ca6$var$SearchAutocomplete(props, ref) {
87
87
  }
88
88
  function $dcf500d58a031ca6$var$_SearchAutocompleteBase(props, ref) {
89
89
  props = (0, $k6PeR$reactspectrumprovider.useProviderProps)(props);
90
- 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;
91
- let stringFormatter = (0, $k6PeR$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($e32120882142a69f$exports))), "@react-spectrum/autocomplete");
90
+ 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;
91
+ let stringFormatter = (0, $k6PeR$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($e32120882142a69f$exports))), '@react-spectrum/autocomplete');
92
92
  let isAsync = loadingState != null;
93
93
  let popoverRef = (0, $k6PeR$react.useRef)(null);
94
94
  let unwrappedPopoverRef = (0, $k6PeR$reactspectrumutils.useUnwrapDOMRef)(popoverRef);
@@ -96,7 +96,7 @@ function $dcf500d58a031ca6$var$_SearchAutocompleteBase(props, ref) {
96
96
  let inputRef = (0, $k6PeR$react.useRef)(null);
97
97
  let domRef = (0, $k6PeR$reactspectrumutils.useFocusableRef)(ref, inputRef);
98
98
  let { contains: contains } = (0, $k6PeR$reactariai18n.useFilter)({
99
- sensitivity: "base"
99
+ sensitivity: 'base'
100
100
  });
101
101
  let state = (0, $k6PeR$reactstatelycombobox.useComboBoxState)({
102
102
  ...props,
@@ -110,7 +110,7 @@ function $dcf500d58a031ca6$var$_SearchAutocompleteBase(props, ref) {
110
110
  validate
111
111
  ])
112
112
  });
113
- let layout = (0, $k6PeR$reactspectrumlistbox.useListBoxLayout)(state, loadingState === "loadingMore");
113
+ let layout = (0, $k6PeR$reactspectrumlistbox.useListBoxLayout)(state, loadingState === 'loadingMore');
114
114
  let { inputProps: inputProps, listBoxProps: listBoxProps, labelProps: labelProps, clearButtonProps: clearButtonProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = (0, $k6PeR$reactariaautocomplete.useSearchAutocomplete)({
115
115
  ...props,
116
116
  keyboardDelegate: layout,
@@ -160,12 +160,12 @@ function $dcf500d58a031ca6$var$_SearchAutocompleteBase(props, ref) {
160
160
  inputProps: inputProps,
161
161
  inputRef: inputRef,
162
162
  clearButtonProps: clearButtonProps,
163
- validationState: props.validationState || (isInvalid ? "invalid" : undefined)
163
+ validationState: props.validationState || (isInvalid ? 'invalid' : undefined)
164
164
  })), /*#__PURE__*/ (0, ($parcel$interopDefault($k6PeR$react))).createElement((0, $k6PeR$reactspectrumoverlays.Popover), {
165
165
  state: state,
166
166
  UNSAFE_style: style,
167
- UNSAFE_className: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-InputGroup-popover", {
168
- "spectrum-InputGroup-popover--quiet": isQuiet
167
+ UNSAFE_className: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), 'spectrum-InputGroup-popover', {
168
+ 'spectrum-InputGroup-popover--quiet': isQuiet
169
169
  }),
170
170
  ref: popoverRef,
171
171
  triggerRef: inputRef,
@@ -183,11 +183,11 @@ function $dcf500d58a031ca6$var$_SearchAutocompleteBase(props, ref) {
183
183
  layout: layout,
184
184
  state: state,
185
185
  shouldUseVirtualFocus: true,
186
- isLoading: loadingState === "loading" || loadingState === "loadingMore",
186
+ isLoading: loadingState === 'loading' || loadingState === 'loadingMore',
187
187
  onLoadMore: onLoadMore,
188
188
  renderEmptyState: ()=>isAsync && /*#__PURE__*/ (0, ($parcel$interopDefault($k6PeR$react))).createElement("span", {
189
- className: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($83da5c2df967875d$exports))), "no-results")
190
- }, stringFormatter.format("noResults"))
189
+ className: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($83da5c2df967875d$exports))), 'no-results')
190
+ }, stringFormatter.format('noResults'))
191
191
  })));
192
192
  }
193
193
  let $dcf500d58a031ca6$var$SearchAutocompleteBase = /*#__PURE__*/ (0, ($parcel$interopDefault($k6PeR$react))).forwardRef($dcf500d58a031ca6$var$_SearchAutocompleteBase);
@@ -199,23 +199,23 @@ function $dcf500d58a031ca6$var$_SearchAutocompleteInput(props, ref) {
199
199
  });
200
200
  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;
201
201
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $k6PeR$reactariainteractions.useHover)({});
202
- let stringFormatter = (0, $k6PeR$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($e32120882142a69f$exports))), "@react-spectrum/autocomplete");
202
+ let stringFormatter = (0, $k6PeR$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($e32120882142a69f$exports))), '@react-spectrum/autocomplete');
203
203
  let domProps = (0, $k6PeR$reactariautils.filterDOMProps)(props);
204
204
  let timeout = (0, $k6PeR$react.useRef)(null);
205
205
  let [showLoading, setShowLoading] = (0, $k6PeR$react.useState)(false);
206
206
  let loadingCircle = /*#__PURE__*/ (0, ($parcel$interopDefault($k6PeR$react))).createElement((0, $k6PeR$reactspectrumprogress.ProgressCircle), {
207
- "aria-label": stringFormatter.format("loading"),
207
+ "aria-label": stringFormatter.format('loading'),
208
208
  size: "S",
209
209
  isIndeterminate: true,
210
- UNSAFE_className: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($40cb3a00c193680f$exports))), "spectrum-Textfield-circleLoader", (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-InputGroup-input-circleLoader"), (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), "spectrum-Search-circleLoader"))
210
+ UNSAFE_className: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($40cb3a00c193680f$exports))), 'spectrum-Textfield-circleLoader', (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), 'spectrum-InputGroup-input-circleLoader'), (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), 'spectrum-Search-circleLoader'))
211
211
  });
212
212
  let clearButton = /*#__PURE__*/ (0, ($parcel$interopDefault($k6PeR$react))).createElement((0, $k6PeR$reactspectrumbutton.ClearButton), {
213
213
  ...clearButtonProps,
214
214
  preventFocus: true,
215
- UNSAFE_className: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), "spectrum-ClearButton"),
215
+ UNSAFE_className: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), 'spectrum-ClearButton'),
216
216
  isDisabled: isDisabled
217
217
  });
218
- let isLoading = loadingState === "loading" || loadingState === "filtering";
218
+ let isLoading = loadingState === 'loading' || loadingState === 'filtering';
219
219
  let inputValue = inputProps.value;
220
220
  let lastInputValue = (0, $k6PeR$react.useRef)(inputValue);
221
221
  (0, $k6PeR$react.useEffect)(()=>{
@@ -247,38 +247,38 @@ function $dcf500d58a031ca6$var$_SearchAutocompleteInput(props, ref) {
247
247
  return /*#__PURE__*/ (0, ($parcel$interopDefault($k6PeR$react))).createElement((0, $k6PeR$reactariafocus.FocusRing), {
248
248
  within: true,
249
249
  isTextInput: true,
250
- focusClass: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), "is-focused"),
251
- focusRingClass: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), "focus-ring"),
250
+ focusClass: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), 'is-focused'),
251
+ focusRingClass: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), 'focus-ring'),
252
252
  autoFocus: autoFocus
253
253
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($k6PeR$react))).createElement("div", {
254
254
  ...hoverProps,
255
255
  ref: ref,
256
256
  style: style,
257
- className: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-InputGroup", {
258
- "spectrum-InputGroup--quiet": isQuiet,
259
- "is-disabled": isDisabled,
260
- "spectrum-InputGroup--invalid": validationState === "invalid" && !isDisabled,
261
- "is-hovered": isHovered
262
- }, (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($83da5c2df967875d$exports))), "searchautocomplete"), className)
257
+ className: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), 'spectrum-InputGroup', {
258
+ 'spectrum-InputGroup--quiet': isQuiet,
259
+ 'is-disabled': isDisabled,
260
+ 'spectrum-InputGroup--invalid': validationState === 'invalid' && !isDisabled,
261
+ 'is-hovered': isHovered
262
+ }, (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($83da5c2df967875d$exports))), 'searchautocomplete'), className)
263
263
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($k6PeR$react))).createElement((0, $k6PeR$reactspectrumtextfield.TextFieldBase), {
264
264
  ...domProps,
265
265
  inputProps: inputProps,
266
266
  inputRef: inputRef,
267
- UNSAFE_className: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), "spectrum-Search", "spectrum-Search--loadable", "spectrum-Textfield", {
268
- "is-disabled": isDisabled,
269
- "is-quiet": isQuiet,
270
- "spectrum-Search--invalid": validationState === "invalid" && !isDisabled,
271
- "spectrum-Search--valid": validationState === "valid" && !isDisabled
272
- }, (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), "spectrum-InputGroup-field")),
273
- inputClassName: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), "spectrum-Search-input"),
274
- validationIconClassName: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), "spectrum-Search-validationIcon"),
267
+ UNSAFE_className: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), 'spectrum-Search', 'spectrum-Search--loadable', 'spectrum-Textfield', {
268
+ 'is-disabled': isDisabled,
269
+ 'is-quiet': isQuiet,
270
+ 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,
271
+ 'spectrum-Search--valid': validationState === 'valid' && !isDisabled
272
+ }, (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($2f86633ce5b04f1e$exports))), 'spectrum-InputGroup-field')),
273
+ inputClassName: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), 'spectrum-Search-input'),
274
+ validationIconClassName: (0, $k6PeR$reactspectrumutils.classNames)((0, ($parcel$interopDefault($1e139f06a0a4b696$exports))), 'spectrum-Search-validationIcon'),
275
275
  isDisabled: isDisabled,
276
276
  isQuiet: isQuiet,
277
277
  validationState: validationState,
278
- isLoading: showLoading && (isOpen || menuTrigger === "manual" || loadingState === "loading"),
278
+ isLoading: showLoading && (isOpen || menuTrigger === 'manual' || loadingState === 'loading'),
279
279
  loadingIndicator: loadingState != null ? loadingCircle : undefined,
280
280
  icon: icon,
281
- wrapperChildren: (inputValue !== "" || loadingState === "filtering" || validationState != null) && !isReadOnly ? clearButton : undefined,
281
+ wrapperChildren: (inputValue !== '' || loadingState === 'filtering' || validationState != null) && !isReadOnly ? clearButton : undefined,
282
282
  disableFocusRing: true
283
283
  })));
284
284
  }