@yamada-ui/autocomplete 1.5.3-dev-20240927170756 → 1.5.3-dev-20240927172557

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/dist/autocomplete-create.js.map +1 -1
  2. package/dist/autocomplete-create.mjs +2 -2
  3. package/dist/autocomplete-empty.js.map +1 -1
  4. package/dist/autocomplete-empty.mjs +2 -2
  5. package/dist/autocomplete-list.js +14 -10
  6. package/dist/autocomplete-list.js.map +1 -1
  7. package/dist/autocomplete-list.mjs +2 -2
  8. package/dist/autocomplete-option.js +3 -1
  9. package/dist/autocomplete-option.js.map +1 -1
  10. package/dist/autocomplete-option.mjs +2 -2
  11. package/dist/autocomplete.js +17 -11
  12. package/dist/autocomplete.js.map +1 -1
  13. package/dist/autocomplete.mjs +8 -8
  14. package/dist/{chunk-OTVG42AD.mjs → chunk-2WVIW6HR.mjs} +2 -2
  15. package/dist/{chunk-2JAGPELI.mjs → chunk-5LPWFWE6.mjs} +4 -2
  16. package/dist/chunk-5LPWFWE6.mjs.map +1 -0
  17. package/dist/{chunk-K42L5QVM.mjs → chunk-7OWUOQZD.mjs} +5 -5
  18. package/dist/{chunk-ZTDA3B2B.mjs → chunk-CCOWDDFS.mjs} +2 -2
  19. package/dist/{chunk-2GOTGBRK.mjs → chunk-E3Y2E2TK.mjs} +2 -2
  20. package/dist/{chunk-YEFQMSJM.mjs → chunk-PCQMCEHL.mjs} +2 -2
  21. package/dist/{chunk-QGOCVO2C.mjs → chunk-R76HPAN4.mjs} +15 -11
  22. package/dist/chunk-R76HPAN4.mjs.map +1 -0
  23. package/dist/{chunk-5MMUZ2XQ.mjs → chunk-S53LMDD7.mjs} +2 -2
  24. package/dist/{chunk-ZZSGPNV3.mjs → chunk-UNGOVJSY.mjs} +5 -5
  25. package/dist/index.js +17 -11
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +9 -9
  28. package/dist/multi-autocomplete.js +17 -11
  29. package/dist/multi-autocomplete.js.map +1 -1
  30. package/dist/multi-autocomplete.mjs +8 -8
  31. package/dist/use-autocomplete-list.js +14 -10
  32. package/dist/use-autocomplete-list.js.map +1 -1
  33. package/dist/use-autocomplete-list.mjs +1 -1
  34. package/dist/use-autocomplete-option.js +3 -1
  35. package/dist/use-autocomplete-option.js.map +1 -1
  36. package/dist/use-autocomplete-option.mjs +1 -1
  37. package/dist/use-autocomplete.js +3 -1
  38. package/dist/use-autocomplete.js.map +1 -1
  39. package/dist/use-autocomplete.mjs +3 -3
  40. package/package.json +13 -13
  41. package/dist/chunk-2JAGPELI.mjs.map +0 -1
  42. package/dist/chunk-QGOCVO2C.mjs.map +0 -1
  43. /package/dist/{chunk-OTVG42AD.mjs.map → chunk-2WVIW6HR.mjs.map} +0 -0
  44. /package/dist/{chunk-K42L5QVM.mjs.map → chunk-7OWUOQZD.mjs.map} +0 -0
  45. /package/dist/{chunk-ZTDA3B2B.mjs.map → chunk-CCOWDDFS.mjs.map} +0 -0
  46. /package/dist/{chunk-2GOTGBRK.mjs.map → chunk-E3Y2E2TK.mjs.map} +0 -0
  47. /package/dist/{chunk-YEFQMSJM.mjs.map → chunk-PCQMCEHL.mjs.map} +0 -0
  48. /package/dist/{chunk-5MMUZ2XQ.mjs.map → chunk-S53LMDD7.mjs.map} +0 -0
  49. /package/dist/{chunk-ZZSGPNV3.mjs.map → chunk-UNGOVJSY.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -1,27 +1,27 @@
1
1
  "use client"
2
2
  import {
3
3
  MultiAutocomplete
4
- } from "./chunk-K42L5QVM.mjs";
4
+ } from "./chunk-7OWUOQZD.mjs";
5
5
  import {
6
6
  Autocomplete
7
- } from "./chunk-ZZSGPNV3.mjs";
8
- import "./chunk-YEFQMSJM.mjs";
7
+ } from "./chunk-UNGOVJSY.mjs";
8
+ import "./chunk-PCQMCEHL.mjs";
9
9
  import {
10
10
  AutocompleteCreate
11
- } from "./chunk-2GOTGBRK.mjs";
11
+ } from "./chunk-E3Y2E2TK.mjs";
12
12
  import {
13
13
  AutocompleteEmpty
14
- } from "./chunk-ZTDA3B2B.mjs";
15
- import "./chunk-5MMUZ2XQ.mjs";
16
- import "./chunk-QGOCVO2C.mjs";
14
+ } from "./chunk-CCOWDDFS.mjs";
15
+ import "./chunk-S53LMDD7.mjs";
16
+ import "./chunk-R76HPAN4.mjs";
17
17
  import {
18
18
  AutocompleteOptionGroup
19
19
  } from "./chunk-6F3LT7J6.mjs";
20
20
  import "./chunk-JMX72TSD.mjs";
21
21
  import {
22
22
  AutocompleteOption
23
- } from "./chunk-OTVG42AD.mjs";
24
- import "./chunk-2JAGPELI.mjs";
23
+ } from "./chunk-2WVIW6HR.mjs";
24
+ import "./chunk-5LPWFWE6.mjs";
25
25
  import "./chunk-7SWSKLSA.mjs";
26
26
  import "./chunk-JPUKYLBW.mjs";
27
27
  export {
@@ -167,6 +167,7 @@ var useAutocompleteOption = (props) => {
167
167
  inputRef,
168
168
  onFocusNext
169
169
  } = useAutocompleteContext();
170
+ const id = (0, import_react2.useId)();
170
171
  let {
171
172
  icon: customIcon,
172
173
  isDisabled,
@@ -237,7 +238,7 @@ var useAutocompleteOption = (props) => {
237
238
  };
238
239
  return {
239
240
  ref: (0, import_utils3.mergeRefs)(itemRef, ref, register),
240
- id: (0, import_react2.useId)(),
241
+ id,
241
242
  role: "option",
242
243
  ...computedProps,
243
244
  ...props2,
@@ -253,6 +254,7 @@ var useAutocompleteOption = (props) => {
253
254
  };
254
255
  },
255
256
  [
257
+ id,
256
258
  optionValue,
257
259
  computedProps,
258
260
  isDisabled,
@@ -431,6 +433,7 @@ var import_utils7 = require("@yamada-ui/utils");
431
433
  var import_utils6 = require("@yamada-ui/utils");
432
434
  var import_react3 = require("react");
433
435
  var useAutocompleteList = () => {
436
+ const uuid = (0, import_react3.useId)();
434
437
  const { focusedIndex, isOpen, listRef, rebirthOptions } = useAutocompleteContext();
435
438
  const descendants = useAutocompleteDescendantsContext();
436
439
  const beforeFocusedIndex = (0, import_react3.useRef)(-1);
@@ -468,16 +471,19 @@ var useAutocompleteList = () => {
468
471
  if (!isOpen) beforeFocusedIndex.current = -1;
469
472
  }, [isOpen]);
470
473
  const getListProps = (0, import_react3.useCallback)(
471
- (props = {}, ref = null) => ({
472
- as: "ul",
473
- ref: (0, import_utils6.mergeRefs)(listRef, ref),
474
- role: "listbox",
475
- tabIndex: -1,
476
- position: "relative",
477
- id: props.id || (0, import_react3.useId)(),
478
- ...props
479
- }),
480
- [listRef]
474
+ (props = {}, ref = null) => {
475
+ var _a;
476
+ return {
477
+ as: "ul",
478
+ ref: (0, import_utils6.mergeRefs)(listRef, ref),
479
+ role: "listbox",
480
+ tabIndex: -1,
481
+ position: "relative",
482
+ id: (_a = props.id) != null ? _a : uuid,
483
+ ...props
484
+ };
485
+ },
486
+ [listRef, uuid]
481
487
  );
482
488
  return {
483
489
  onAnimationComplete,