@yamada-ui/autocomplete 1.5.4-dev-20241005224505 → 1.5.4-dev-20241006032009

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. package/dist/autocomplete-context.d.mts +115 -115
  2. package/dist/autocomplete-context.d.ts +115 -115
  3. package/dist/autocomplete-context.js +2 -2
  4. package/dist/autocomplete-context.js.map +1 -1
  5. package/dist/autocomplete-context.mjs +1 -1
  6. package/dist/autocomplete-create.d.mts +4 -4
  7. package/dist/autocomplete-create.d.ts +4 -4
  8. package/dist/autocomplete-create.js +32 -32
  9. package/dist/autocomplete-create.js.map +1 -1
  10. package/dist/autocomplete-create.mjs +4 -4
  11. package/dist/autocomplete-empty.d.mts +4 -4
  12. package/dist/autocomplete-empty.d.ts +4 -4
  13. package/dist/autocomplete-empty.js +34 -34
  14. package/dist/autocomplete-empty.js.map +1 -1
  15. package/dist/autocomplete-empty.mjs +4 -4
  16. package/dist/autocomplete-icon.js +17 -17
  17. package/dist/autocomplete-icon.js.map +1 -1
  18. package/dist/autocomplete-icon.mjs +2 -2
  19. package/dist/autocomplete-list.d.mts +2 -2
  20. package/dist/autocomplete-list.d.ts +2 -2
  21. package/dist/autocomplete-list.js +18 -18
  22. package/dist/autocomplete-list.js.map +1 -1
  23. package/dist/autocomplete-list.mjs +3 -3
  24. package/dist/autocomplete-option-group.js +14 -14
  25. package/dist/autocomplete-option-group.js.map +1 -1
  26. package/dist/autocomplete-option-group.mjs +3 -3
  27. package/dist/autocomplete-option.d.mts +1 -1
  28. package/dist/autocomplete-option.d.ts +1 -1
  29. package/dist/autocomplete-option.js +47 -47
  30. package/dist/autocomplete-option.js.map +1 -1
  31. package/dist/autocomplete-option.mjs +4 -4
  32. package/dist/autocomplete.d.mts +31 -31
  33. package/dist/autocomplete.d.ts +31 -31
  34. package/dist/autocomplete.js +299 -297
  35. package/dist/autocomplete.js.map +1 -1
  36. package/dist/autocomplete.mjs +12 -12
  37. package/dist/{chunk-5GKGL6BL.mjs → chunk-2MVSDK7L.mjs} +16 -16
  38. package/dist/chunk-2MVSDK7L.mjs.map +1 -0
  39. package/dist/{chunk-JMX72TSD.mjs → chunk-2SISETLV.mjs} +11 -11
  40. package/dist/{chunk-JMX72TSD.mjs.map → chunk-2SISETLV.mjs.map} +1 -1
  41. package/dist/{chunk-OLOU5HFC.mjs → chunk-4APEPTYJ.mjs} +169 -167
  42. package/dist/chunk-4APEPTYJ.mjs.map +1 -0
  43. package/dist/{chunk-6F3LT7J6.mjs → chunk-EWV3Q3S4.mjs} +7 -7
  44. package/dist/{chunk-6F3LT7J6.mjs.map → chunk-EWV3Q3S4.mjs.map} +1 -1
  45. package/dist/{chunk-Q2HZVVOI.mjs → chunk-I4IW2CW7.mjs} +16 -16
  46. package/dist/chunk-I4IW2CW7.mjs.map +1 -0
  47. package/dist/{chunk-7SWSKLSA.mjs → chunk-I5X4WSCX.mjs} +18 -18
  48. package/dist/chunk-I5X4WSCX.mjs.map +1 -0
  49. package/dist/{chunk-HZECQUHV.mjs → chunk-PXQD7AV2.mjs} +40 -40
  50. package/dist/{chunk-HZECQUHV.mjs.map → chunk-PXQD7AV2.mjs.map} +1 -1
  51. package/dist/{chunk-QPIWG4ZF.mjs → chunk-TJGVRIGK.mjs} +62 -60
  52. package/dist/chunk-TJGVRIGK.mjs.map +1 -0
  53. package/dist/{chunk-R76HPAN4.mjs → chunk-TR4X4EEG.mjs} +7 -7
  54. package/dist/{chunk-R76HPAN4.mjs.map → chunk-TR4X4EEG.mjs.map} +1 -1
  55. package/dist/{chunk-S53LMDD7.mjs → chunk-VTBUO5SK.mjs} +15 -15
  56. package/dist/chunk-VTBUO5SK.mjs.map +1 -0
  57. package/dist/{chunk-JPUKYLBW.mjs → chunk-WDQYM4FP.mjs} +5 -5
  58. package/dist/chunk-WDQYM4FP.mjs.map +1 -0
  59. package/dist/{chunk-S2HFYJVI.mjs → chunk-ZEGANG5C.mjs} +13 -13
  60. package/dist/chunk-ZEGANG5C.mjs.map +1 -0
  61. package/dist/{chunk-5LPWFWE6.mjs → chunk-ZJFWWXQM.mjs} +34 -34
  62. package/dist/chunk-ZJFWWXQM.mjs.map +1 -0
  63. package/dist/index.d.mts +4 -4
  64. package/dist/index.d.ts +4 -4
  65. package/dist/index.js +351 -347
  66. package/dist/index.js.map +1 -1
  67. package/dist/index.mjs +13 -13
  68. package/dist/multi-autocomplete.d.mts +51 -51
  69. package/dist/multi-autocomplete.d.ts +51 -51
  70. package/dist/multi-autocomplete.js +321 -317
  71. package/dist/multi-autocomplete.js.map +1 -1
  72. package/dist/multi-autocomplete.mjs +12 -12
  73. package/dist/use-autocomplete-list.d.mts +1 -1
  74. package/dist/use-autocomplete-list.d.ts +1 -1
  75. package/dist/use-autocomplete-list.js +7 -7
  76. package/dist/use-autocomplete-list.js.map +1 -1
  77. package/dist/use-autocomplete-list.mjs +2 -2
  78. package/dist/use-autocomplete-option-group.js +11 -11
  79. package/dist/use-autocomplete-option-group.js.map +1 -1
  80. package/dist/use-autocomplete-option-group.mjs +2 -2
  81. package/dist/use-autocomplete-option.d.mts +12 -12
  82. package/dist/use-autocomplete-option.d.ts +12 -12
  83. package/dist/use-autocomplete-option.js +34 -34
  84. package/dist/use-autocomplete-option.js.map +1 -1
  85. package/dist/use-autocomplete-option.mjs +2 -2
  86. package/dist/use-autocomplete.d.mts +86 -86
  87. package/dist/use-autocomplete.d.ts +86 -86
  88. package/dist/use-autocomplete.js +221 -219
  89. package/dist/use-autocomplete.js.map +1 -1
  90. package/dist/use-autocomplete.mjs +7 -7
  91. package/package.json +13 -13
  92. package/dist/chunk-5GKGL6BL.mjs.map +0 -1
  93. package/dist/chunk-5LPWFWE6.mjs.map +0 -1
  94. package/dist/chunk-7SWSKLSA.mjs.map +0 -1
  95. package/dist/chunk-JPUKYLBW.mjs.map +0 -1
  96. package/dist/chunk-OLOU5HFC.mjs.map +0 -1
  97. package/dist/chunk-Q2HZVVOI.mjs.map +0 -1
  98. package/dist/chunk-QPIWG4ZF.mjs.map +0 -1
  99. package/dist/chunk-S2HFYJVI.mjs.map +0 -1
  100. package/dist/chunk-S53LMDD7.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { DOMAttributes, Dispatch, SetStateAction, RefObject } from 'react';
2
+ import { RefObject, Dispatch, SetStateAction, DOMAttributes } from 'react';
3
3
  import * as _yamada_ui_use_descendant from '@yamada-ui/use-descendant';
4
4
  import { CSSUIObject } from '@yamada-ui/core';
5
5
  import { UseAutocompleteProps, ChangeOptions } from './use-autocomplete.js';
@@ -13,196 +13,196 @@ import './autocomplete-option-group.js';
13
13
  import './use-autocomplete-option-group.js';
14
14
 
15
15
  declare const AutocompleteDescendantsContextProvider: react.Provider<{
16
- register: (nodeOrOptions: HTMLElement | {
17
- disabled?: boolean;
18
- id?: string;
19
- filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined;
20
- } | null) => void | ((node: HTMLElement | null) => void);
21
- unregister: (node: HTMLElement) => void;
22
- destroy: () => void;
23
16
  count: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
24
- values: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}>[];
25
- value: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
26
- indexOf: (node: HTMLElement | null) => number;
27
- firstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
28
- lastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
29
- prevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
30
- nextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
17
+ destroy: () => void;
31
18
  enabledCount: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
32
- enabledValues: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}>[];
33
- enabledValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
34
- enabledIndexOf: (node: HTMLElement | null, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
35
19
  enabledFirstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
20
+ enabledIndexOf: (node?: HTMLElement | null | undefined, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
36
21
  enabledLastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
37
- enabledPrevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
38
22
  enabledNextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
39
- }>;
40
- declare const useAutocompleteDescendantsContext: () => {
41
- register: (nodeOrOptions: HTMLElement | {
42
- disabled?: boolean;
43
- id?: string;
44
- filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined;
45
- } | null) => void | ((node: HTMLElement | null) => void);
46
- unregister: (node: HTMLElement) => void;
47
- destroy: () => void;
48
- count: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
49
- values: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}>[];
50
- value: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
51
- indexOf: (node: HTMLElement | null) => number;
23
+ enabledPrevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
24
+ enabledValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
25
+ enabledValues: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}>[];
52
26
  firstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
27
+ indexOf: (node?: HTMLElement | null | undefined) => number;
53
28
  lastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
54
- prevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
55
29
  nextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
56
- enabledCount: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
57
- enabledValues: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}>[];
58
- enabledValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
59
- enabledIndexOf: (node: HTMLElement | null, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
60
- enabledFirstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
61
- enabledLastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
62
- enabledPrevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
63
- enabledNextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
64
- };
65
- declare const useAutocompleteDescendants: () => {
66
- register: (nodeOrOptions: HTMLElement | {
67
- disabled?: boolean;
30
+ prevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
31
+ register: (nodeOrOptions?: HTMLElement | {
68
32
  id?: string;
33
+ disabled?: boolean;
69
34
  filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined;
70
- } | null) => void | ((node: HTMLElement | null) => void);
71
- unregister: (node: HTMLElement) => void;
72
- destroy: () => void;
73
- count: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
74
- values: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}>[];
35
+ } | null | undefined) => void | ((node: HTMLElement | null) => void);
36
+ unregister: (node?: HTMLElement | undefined) => void;
75
37
  value: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
76
- indexOf: (node: HTMLElement | null) => number;
77
- firstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
78
- lastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
79
- prevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
80
- nextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
81
- enabledCount: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
82
- enabledValues: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}>[];
83
- enabledValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
84
- enabledIndexOf: (node: HTMLElement | null, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
85
- enabledFirstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
86
- enabledLastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
87
- enabledPrevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
88
- enabledNextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
89
- };
38
+ values: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}>[];
39
+ }>;
90
40
  declare const useAutocompleteDescendant: (options?: {
91
- disabled?: boolean;
92
41
  id?: string;
42
+ disabled?: boolean;
93
43
  filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined;
94
44
  } | undefined) => {
95
45
  descendants: {
96
- register: (nodeOrOptions: HTMLElement | _yamada_ui_use_descendant.DescendantOptions<HTMLElement, {
97
- [key: string]: any;
98
- }> | null) => void | ((node: HTMLElement | null) => void);
99
- unregister: (node: HTMLElement) => void;
100
- destroy: () => void;
101
46
  count: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
102
47
  [key: string]: any;
103
48
  }> | undefined) => number;
104
- values: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
105
- [key: string]: any;
106
- }> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
49
+ destroy: () => void;
50
+ enabledCount: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
107
51
  [key: string]: any;
108
- }>[];
109
- value: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
52
+ }> | undefined) => number;
53
+ enabledFirstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
110
54
  [key: string]: any;
111
55
  }> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
112
56
  [key: string]: any;
113
57
  }> | undefined;
114
- indexOf: (node: HTMLElement | null) => number;
115
- firstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
116
- [key: string]: any;
117
- }> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
58
+ enabledIndexOf: (node?: HTMLElement | null | undefined, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
118
59
  [key: string]: any;
119
- }> | undefined;
120
- lastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
60
+ }> | undefined) => number;
61
+ enabledLastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
121
62
  [key: string]: any;
122
63
  }> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
123
64
  [key: string]: any;
124
65
  }> | undefined;
125
- prevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
66
+ enabledNextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
126
67
  [key: string]: any;
127
68
  }> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
128
69
  [key: string]: any;
129
70
  }> | undefined;
130
- nextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
71
+ enabledPrevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
131
72
  [key: string]: any;
132
73
  }> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
133
74
  [key: string]: any;
134
75
  }> | undefined;
135
- enabledCount: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
76
+ enabledValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
136
77
  [key: string]: any;
137
- }> | undefined) => number;
78
+ }> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
79
+ [key: string]: any;
80
+ }> | undefined;
138
81
  enabledValues: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
139
82
  [key: string]: any;
140
83
  }> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
141
84
  [key: string]: any;
142
85
  }>[];
143
- enabledValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
86
+ firstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
144
87
  [key: string]: any;
145
88
  }> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
146
89
  [key: string]: any;
147
90
  }> | undefined;
148
- enabledIndexOf: (node: HTMLElement | null, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
149
- [key: string]: any;
150
- }> | undefined) => number;
151
- enabledFirstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
91
+ indexOf: (node?: HTMLElement | null | undefined) => number;
92
+ lastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
152
93
  [key: string]: any;
153
94
  }> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
154
95
  [key: string]: any;
155
96
  }> | undefined;
156
- enabledLastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
97
+ nextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
157
98
  [key: string]: any;
158
- }> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
99
+ }> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
159
100
  [key: string]: any;
160
101
  }> | undefined;
161
- enabledPrevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
102
+ prevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
162
103
  [key: string]: any;
163
104
  }> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
164
105
  [key: string]: any;
165
106
  }> | undefined;
166
- enabledNextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
107
+ register: (nodeOrOptions?: HTMLElement | _yamada_ui_use_descendant.DescendantOptions<HTMLElement, {
167
108
  [key: string]: any;
168
- }> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
109
+ }> | null | undefined) => void | ((node: HTMLElement | null) => void);
110
+ unregister: (node?: HTMLElement | undefined) => void;
111
+ value: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
112
+ [key: string]: any;
113
+ }> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
169
114
  [key: string]: any;
170
115
  }> | undefined;
116
+ values: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {
117
+ [key: string]: any;
118
+ }> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {
119
+ [key: string]: any;
120
+ }>[];
171
121
  };
172
- index: number;
173
122
  enabledIndex: number;
123
+ index: number;
174
124
  register: (node: HTMLElement | null) => void;
175
125
  };
176
- interface AutocompleteContext extends Omit<UseAutocompleteProps, "value" | "defaultValue" | "onChange" | "onCreate"> {
177
- value: string | string[];
178
- label: string | string[] | undefined;
126
+ declare const useAutocompleteDescendants: () => {
127
+ count: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
128
+ destroy: () => void;
129
+ enabledCount: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
130
+ enabledFirstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
131
+ enabledIndexOf: (node?: HTMLElement | null | undefined, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
132
+ enabledLastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
133
+ enabledNextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
134
+ enabledPrevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
135
+ enabledValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
136
+ enabledValues: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}>[];
137
+ firstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
138
+ indexOf: (node?: HTMLElement | null | undefined) => number;
139
+ lastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
140
+ nextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
141
+ prevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
142
+ register: (nodeOrOptions?: HTMLElement | {
143
+ id?: string;
144
+ disabled?: boolean;
145
+ filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined;
146
+ } | null | undefined) => void | ((node: HTMLElement | null) => void);
147
+ unregister: (node?: HTMLElement | undefined) => void;
148
+ value: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
149
+ values: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}>[];
150
+ };
151
+ declare const useAutocompleteDescendantsContext: () => {
152
+ count: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
153
+ destroy: () => void;
154
+ enabledCount: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
155
+ enabledFirstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
156
+ enabledIndexOf: (node?: HTMLElement | null | undefined, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => number;
157
+ enabledLastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
158
+ enabledNextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
159
+ enabledPrevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
160
+ enabledValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
161
+ enabledValues: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}>[];
162
+ firstValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
163
+ indexOf: (node?: HTMLElement | null | undefined) => number;
164
+ lastValue: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
165
+ nextValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
166
+ prevValue: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined, loop?: boolean) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
167
+ register: (nodeOrOptions?: HTMLElement | {
168
+ id?: string;
169
+ disabled?: boolean;
170
+ filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined;
171
+ } | null | undefined) => void | ((node: HTMLElement | null) => void);
172
+ unregister: (node?: HTMLElement | undefined) => void;
173
+ value: (index: number, filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}> | undefined;
174
+ values: (filter?: _yamada_ui_use_descendant.FilterDescendant<HTMLElement, {}> | undefined) => _yamada_ui_use_descendant.Descendant<HTMLElement, {}>[];
175
+ };
176
+ interface AutocompleteContext extends Omit<UseAutocompleteProps, "defaultValue" | "onChange" | "onCreate" | "value"> {
177
+ focusedIndex: number;
178
+ inputRef: RefObject<HTMLInputElement>;
179
179
  inputValue: string;
180
- isHit: boolean;
181
- isEmpty: boolean;
182
180
  isAllSelected: boolean;
183
- onChange: (newValue: string, options?: ChangeOptions) => void;
184
- onChangeLabel: (newValue: string, options?: ChangeOptions) => void;
181
+ isEmpty: boolean;
182
+ isHit: boolean;
183
+ isOpen: boolean;
184
+ label: string | string[] | undefined;
185
+ listRef: RefObject<HTMLUListElement>;
185
186
  pickOptions: (value: string) => void;
186
187
  rebirthOptions: (runFocus?: boolean) => void;
188
+ setFocusedIndex: Dispatch<SetStateAction<number>>;
189
+ styles: {
190
+ [key: string]: CSSUIObject | undefined;
191
+ };
192
+ value: string | string[];
193
+ formControlProps: {
194
+ [key: string]: any;
195
+ };
187
196
  inputProps: DOMAttributes<HTMLInputElement>;
188
- isOpen: boolean;
189
- onOpen: () => void;
197
+ onChange: (newValue: string, options?: ChangeOptions) => void;
198
+ onChangeLabel: (newValue: string, options?: ChangeOptions) => void;
190
199
  onClose: () => void;
191
200
  onCreate: () => void;
192
201
  onFocusFirst: () => void;
193
202
  onFocusLast: () => void;
194
203
  onFocusNext: (index?: number) => void;
195
204
  onFocusPrev: (index?: number) => void;
196
- focusedIndex: number;
197
- setFocusedIndex: Dispatch<SetStateAction<number>>;
198
- listRef: RefObject<HTMLUListElement>;
199
- inputRef: RefObject<HTMLInputElement>;
200
- formControlProps: {
201
- [key: string]: any;
202
- };
203
- styles: {
204
- [key: string]: CSSUIObject;
205
- };
205
+ onOpen: () => void;
206
206
  }
207
207
  declare const AutocompleteProvider: react.Provider<AutocompleteContext>;
208
208
  declare const useAutocompleteContext: () => AutocompleteContext;
@@ -33,9 +33,9 @@ var import_use_descendant = require("@yamada-ui/use-descendant");
33
33
  var import_utils = require("@yamada-ui/utils");
34
34
  var {
35
35
  DescendantsContextProvider: AutocompleteDescendantsContextProvider,
36
- useDescendantsContext: useAutocompleteDescendantsContext,
36
+ useDescendant: useAutocompleteDescendant,
37
37
  useDescendants: useAutocompleteDescendants,
38
- useDescendant: useAutocompleteDescendant
38
+ useDescendantsContext: useAutocompleteDescendantsContext
39
39
  } = (0, import_use_descendant.createDescendant)();
40
40
  var [AutocompleteProvider, useAutocompleteContext] = (0, import_utils.createContext)({
41
41
  name: "AutocompleteContext",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/autocomplete-context.ts"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport { createDescendant } from \"@yamada-ui/use-descendant\"\nimport { createContext } from \"@yamada-ui/utils\"\nimport type { Dispatch, DOMAttributes, RefObject, SetStateAction } from \"react\"\nimport type { ChangeOptions, UseAutocompleteProps } from \"./use-autocomplete\"\n\nexport const {\n DescendantsContextProvider: AutocompleteDescendantsContextProvider,\n useDescendantsContext: useAutocompleteDescendantsContext,\n useDescendants: useAutocompleteDescendants,\n useDescendant: useAutocompleteDescendant,\n} = createDescendant()\n\ninterface AutocompleteContext\n extends Omit<\n UseAutocompleteProps,\n \"value\" | \"defaultValue\" | \"onChange\" | \"onCreate\"\n > {\n value: string | string[]\n label: string | string[] | undefined\n inputValue: string\n isHit: boolean\n isEmpty: boolean\n isAllSelected: boolean\n onChange: (newValue: string, options?: ChangeOptions) => void\n onChangeLabel: (newValue: string, options?: ChangeOptions) => void\n pickOptions: (value: string) => void\n rebirthOptions: (runFocus?: boolean) => void\n inputProps: DOMAttributes<HTMLInputElement>\n isOpen: boolean\n onOpen: () => void\n onClose: () => void\n onCreate: () => void\n onFocusFirst: () => void\n onFocusLast: () => void\n onFocusNext: (index?: number) => void\n onFocusPrev: (index?: number) => void\n focusedIndex: number\n setFocusedIndex: Dispatch<SetStateAction<number>>\n listRef: RefObject<HTMLUListElement>\n inputRef: RefObject<HTMLInputElement>\n formControlProps: { [key: string]: any }\n styles: { [key: string]: CSSUIObject }\n}\n\nexport const [AutocompleteProvider, useAutocompleteContext] =\n createContext<AutocompleteContext>({\n name: \"AutocompleteContext\",\n errorMessage: `useAutocompleteContext returned is 'undefined'. Seems you forgot to wrap the components in \"<Autocomplete />\" or \"<MultiAutocomplete />\"`,\n })\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,4BAAiC;AACjC,mBAA8B;AAIvB,IAAM;AAAA,EACX,4BAA4B;AAAA,EAC5B,uBAAuB;AAAA,EACvB,gBAAgB;AAAA,EAChB,eAAe;AACjB,QAAI,wCAAiB;AAkCd,IAAM,CAAC,sBAAsB,sBAAsB,QACxD,4BAAmC;AAAA,EACjC,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;","names":[]}
1
+ {"version":3,"sources":["../src/autocomplete-context.ts"],"sourcesContent":["import type { CSSUIObject } from \"@yamada-ui/core\"\nimport type { Dispatch, DOMAttributes, RefObject, SetStateAction } from \"react\"\nimport type { ChangeOptions, UseAutocompleteProps } from \"./use-autocomplete\"\nimport { createDescendant } from \"@yamada-ui/use-descendant\"\nimport { createContext } from \"@yamada-ui/utils\"\n\nexport const {\n DescendantsContextProvider: AutocompleteDescendantsContextProvider,\n useDescendant: useAutocompleteDescendant,\n useDescendants: useAutocompleteDescendants,\n useDescendantsContext: useAutocompleteDescendantsContext,\n} = createDescendant()\n\ninterface AutocompleteContext\n extends Omit<\n UseAutocompleteProps,\n \"defaultValue\" | \"onChange\" | \"onCreate\" | \"value\"\n > {\n focusedIndex: number\n inputRef: RefObject<HTMLInputElement>\n inputValue: string\n isAllSelected: boolean\n isEmpty: boolean\n isHit: boolean\n isOpen: boolean\n label: string | string[] | undefined\n listRef: RefObject<HTMLUListElement>\n pickOptions: (value: string) => void\n rebirthOptions: (runFocus?: boolean) => void\n setFocusedIndex: Dispatch<SetStateAction<number>>\n styles: { [key: string]: CSSUIObject | undefined }\n value: string | string[]\n formControlProps: { [key: string]: any }\n inputProps: DOMAttributes<HTMLInputElement>\n onChange: (newValue: string, options?: ChangeOptions) => void\n onChangeLabel: (newValue: string, options?: ChangeOptions) => void\n onClose: () => void\n onCreate: () => void\n onFocusFirst: () => void\n onFocusLast: () => void\n onFocusNext: (index?: number) => void\n onFocusPrev: (index?: number) => void\n onOpen: () => void\n}\n\nexport const [AutocompleteProvider, useAutocompleteContext] =\n createContext<AutocompleteContext>({\n name: \"AutocompleteContext\",\n errorMessage: `useAutocompleteContext returned is 'undefined'. Seems you forgot to wrap the components in \"<Autocomplete />\" or \"<MultiAutocomplete />\"`,\n })\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,4BAAiC;AACjC,mBAA8B;AAEvB,IAAM;AAAA,EACX,4BAA4B;AAAA,EAC5B,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,uBAAuB;AACzB,QAAI,wCAAiB;AAkCd,IAAM,CAAC,sBAAsB,sBAAsB,QACxD,4BAAmC;AAAA,EACjC,MAAM;AAAA,EACN,cAAc;AAChB,CAAC;","names":[]}
@@ -6,7 +6,7 @@ import {
6
6
  useAutocompleteDescendant,
7
7
  useAutocompleteDescendants,
8
8
  useAutocompleteDescendantsContext
9
- } from "./chunk-JPUKYLBW.mjs";
9
+ } from "./chunk-WDQYM4FP.mjs";
10
10
  export {
11
11
  AutocompleteDescendantsContextProvider,
12
12
  AutocompleteProvider,
@@ -4,13 +4,13 @@ import { ReactElement } from 'react';
4
4
 
5
5
  interface AutocompleteCreateOptions {
6
6
  /**
7
- * The autocomplete create option icon to use.
7
+ * The label of the autocomplete create option.
8
8
  */
9
- icon?: ReactElement;
9
+ children?: ((inputValue: string) => string) | string;
10
10
  /**
11
- * The label of the autocomplete create option.
11
+ * The autocomplete create option icon to use.
12
12
  */
13
- children?: string | ((inputValue: string) => string);
13
+ icon?: null | ReactElement;
14
14
  }
15
15
  interface AutocompleteCreateProps extends Omit<HTMLUIProps<"li">, "children">, AutocompleteCreateOptions {
16
16
  }
@@ -4,13 +4,13 @@ import { ReactElement } from 'react';
4
4
 
5
5
  interface AutocompleteCreateOptions {
6
6
  /**
7
- * The autocomplete create option icon to use.
7
+ * The label of the autocomplete create option.
8
8
  */
9
- icon?: ReactElement;
9
+ children?: ((inputValue: string) => string) | string;
10
10
  /**
11
- * The label of the autocomplete create option.
11
+ * The autocomplete create option icon to use.
12
12
  */
13
- children?: string | ((inputValue: string) => string);
13
+ icon?: null | ReactElement;
14
14
  }
15
15
  interface AutocompleteCreateProps extends Omit<HTMLUIProps<"li">, "children">, AutocompleteCreateOptions {
16
16
  }
@@ -32,9 +32,9 @@ var import_use_descendant = require("@yamada-ui/use-descendant");
32
32
  var import_utils = require("@yamada-ui/utils");
33
33
  var {
34
34
  DescendantsContextProvider: AutocompleteDescendantsContextProvider,
35
- useDescendantsContext: useAutocompleteDescendantsContext,
35
+ useDescendant: useAutocompleteDescendant,
36
36
  useDescendants: useAutocompleteDescendants,
37
- useDescendant: useAutocompleteDescendant
37
+ useDescendantsContext: useAutocompleteDescendantsContext
38
38
  } = (0, import_use_descendant.createDescendant)();
39
39
  var [AutocompleteProvider, useAutocompleteContext] = (0, import_utils.createContext)({
40
40
  name: "AutocompleteContext",
@@ -52,27 +52,27 @@ var AutocompleteIcon = (0, import_core.forwardRef)(
52
52
  ({ className, children, __css, ...rest }, ref) => {
53
53
  const { styles } = useAutocompleteContext();
54
54
  const css = {
55
- position: "absolute",
56
- top: "50%",
57
- transform: "translateY(-50%)",
58
- display: "inline-flex",
59
55
  alignItems: "center",
56
+ cursor: "pointer",
57
+ display: "inline-flex",
60
58
  justifyContent: "center",
61
59
  pointerEvents: "none",
62
- cursor: "pointer",
60
+ position: "absolute",
61
+ top: "50%",
62
+ transform: "translateY(-50%)",
63
63
  ...styles.icon,
64
64
  ...__css
65
65
  };
66
66
  const validChildren = (0, import_utils2.getValidChildren)(children);
67
67
  const cloneChildren = validChildren.map(
68
68
  (child) => (0, import_react.cloneElement)(child, {
69
- focusable: false,
70
- "aria-hidden": true,
71
69
  style: {
72
- maxWidth: "1em",
70
+ color: "currentColor",
73
71
  maxHeight: "1em",
74
- color: "currentColor"
75
- }
72
+ maxWidth: "1em"
73
+ },
74
+ focusable: false,
75
+ "aria-hidden": true
76
76
  })
77
77
  );
78
78
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -105,11 +105,11 @@ var AutocompleteClearIcon = ({
105
105
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
106
106
  AutocompleteIcon,
107
107
  {
108
- "aria-label": "Clear value",
109
108
  className: (0, import_utils2.cx)("ui-autocomplete__icon--clear", className),
109
+ "aria-label": "Clear value",
110
110
  __css: styles.clearIcon,
111
111
  ...rest,
112
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.CloseIcon, { w: "0.5em", h: "0.5em" })
112
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.CloseIcon, { h: "0.5em", w: "0.5em" })
113
113
  }
114
114
  );
115
115
  };
@@ -118,11 +118,11 @@ AutocompleteClearIcon.__ui__ = "AutocompleteClearIcon";
118
118
  var AutocompleteItemIcon = (0, import_core.forwardRef)(({ className, ...rest }, ref) => {
119
119
  const { styles } = useAutocompleteContext();
120
120
  const css = {
121
- flexShrink: 0,
122
- display: "inline-flex",
123
- justifyContent: "center",
124
121
  alignItems: "center",
122
+ display: "inline-flex",
123
+ flexShrink: 0,
125
124
  fontSize: "0.85em",
125
+ justifyContent: "center",
126
126
  ...styles.itemIcon
127
127
  };
128
128
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -149,18 +149,18 @@ var useAutocompleteCreate = () => {
149
149
  border: "0px",
150
150
  clip: "rect(0px, 0px, 0px, 0px)",
151
151
  height: "1px",
152
- width: "1px",
153
152
  margin: "-1px",
154
- padding: "0px",
155
153
  overflow: "hidden",
154
+ padding: "0px",
155
+ position: "absolute",
156
156
  whiteSpace: "nowrap",
157
- position: "absolute"
157
+ width: "1px"
158
158
  };
159
159
  return {
160
160
  ref,
161
161
  ...props,
162
- tabIndex: -1,
163
162
  style: isHit ? style : void 0,
163
+ tabIndex: -1,
164
164
  "data-focus": (0, import_utils3.dataAttr)(!isHit),
165
165
  onClick: (0, import_utils3.handlerAll)(props.onClick, onCreate)
166
166
  };
@@ -173,21 +173,21 @@ var useAutocompleteCreate = () => {
173
173
  // src/autocomplete-create.tsx
174
174
  var import_jsx_runtime2 = require("react/jsx-runtime");
175
175
  var AutocompleteCreate = (0, import_core2.forwardRef)(
176
- ({ className, icon, children, ...rest }, ref) => {
176
+ ({ className, children, icon, ...rest }, ref) => {
177
177
  const { inputValue, styles } = useAutocompleteContext();
178
178
  const { getCreateProps } = useAutocompleteCreate();
179
179
  children != null ? children : children = inputValue;
180
180
  const css = {
181
- textDecoration: "none",
181
+ alignItems: "center",
182
182
  color: "inherit",
183
- userSelect: "none",
184
183
  display: "flex",
185
- width: "100%",
186
- alignItems: "center",
187
- textAlign: "start",
188
184
  flex: "0 0 auto",
189
- outline: 0,
190
185
  gap: "0.75rem",
186
+ outline: 0,
187
+ textAlign: "start",
188
+ textDecoration: "none",
189
+ userSelect: "none",
190
+ width: "100%",
191
191
  ...styles.item
192
192
  };
193
193
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
@@ -198,7 +198,7 @@ var AutocompleteCreate = (0, import_core2.forwardRef)(
198
198
  ...getCreateProps(rest, ref),
199
199
  children: [
200
200
  icon !== null ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AutocompleteItemIcon, { children: icon || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AutocompletePlusIcon, {}) }) : null,
201
- icon ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.ui.span, { style: { pointerEvents: "none", flex: 1 }, lineClamp: 1, children: (0, import_utils4.runIfFunc)(children, inputValue) }) : (0, import_utils4.runIfFunc)(children, inputValue)
201
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.ui.span, { style: { flex: 1, pointerEvents: "none" }, lineClamp: 1, children: (0, import_utils4.runIfFunc)(children, inputValue) }) : (0, import_utils4.runIfFunc)(children, inputValue)
202
202
  ]
203
203
  }
204
204
  );
@@ -206,11 +206,11 @@ var AutocompleteCreate = (0, import_core2.forwardRef)(
206
206
  );
207
207
  AutocompleteCreate.displayName = "AutocompleteCreate";
208
208
  AutocompleteCreate.__ui__ = "AutocompleteCreate";
209
- var AutocompletePlusIcon = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { viewBox: "0 0 45.402 45.402", width: "1em", height: "1em", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
209
+ var AutocompletePlusIcon = () => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { height: "1em", viewBox: "0 0 45.402 45.402", width: "1em", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
210
210
  "path",
211
211
  {
212
- fill: "currentColor",
213
- d: "M41.267,18.557H26.832V4.134C26.832,1.851,24.99,0,22.707,0c-2.283,0-4.124,1.851-4.124,4.135v14.432H4.141 c-2.283,0-4.139,1.851-4.138,4.135c-0.001,1.141,0.46,2.187,1.207,2.934c0.748,0.749,1.78,1.222,2.92,1.222h14.453V41.27 c0,1.142,0.453,2.176,1.201,2.922c0.748,0.748,1.777,1.211,2.919,1.211c2.282,0,4.129-1.851,4.129-4.133V26.857h14.435 c2.283,0,4.134-1.867,4.133-4.15C45.399,20.425,43.548,18.557,41.267,18.557z"
212
+ d: "M41.267,18.557H26.832V4.134C26.832,1.851,24.99,0,22.707,0c-2.283,0-4.124,1.851-4.124,4.135v14.432H4.141 c-2.283,0-4.139,1.851-4.138,4.135c-0.001,1.141,0.46,2.187,1.207,2.934c0.748,0.749,1.78,1.222,2.92,1.222h14.453V41.27 c0,1.142,0.453,2.176,1.201,2.922c0.748,0.748,1.777,1.211,2.919,1.211c2.282,0,4.129-1.851,4.129-4.133V26.857h14.435 c2.283,0,4.134-1.867,4.133-4.15C45.399,20.425,43.548,18.557,41.267,18.557z",
213
+ fill: "currentColor"
214
214
  }
215
215
  ) });
216
216
  AutocompletePlusIcon.displayName = "AutocompletePlusIcon";