@yamada-ui/autocomplete 1.6.5-next-20241119123334 → 1.6.5-next-20241123062048

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) 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-option.js +6 -10
  6. package/dist/autocomplete-option.js.map +1 -1
  7. package/dist/autocomplete-option.mjs +2 -2
  8. package/dist/autocomplete.js +8 -12
  9. package/dist/autocomplete.js.map +1 -1
  10. package/dist/autocomplete.mjs +6 -6
  11. package/dist/{chunk-7GVG5MVF.mjs → chunk-2UKLSSUA.mjs} +2 -2
  12. package/dist/{chunk-LCC3VNZV.mjs → chunk-3A2HEULI.mjs} +7 -11
  13. package/dist/chunk-3A2HEULI.mjs.map +1 -0
  14. package/dist/{chunk-6QAH2ARG.mjs → chunk-6II6KCIJ.mjs} +2 -2
  15. package/dist/{chunk-YWUT56L3.mjs → chunk-75VF5Q5W.mjs} +4 -4
  16. package/dist/chunk-75VF5Q5W.mjs.map +1 -0
  17. package/dist/{chunk-ZFWB5LCD.mjs → chunk-G6SC44LI.mjs} +2 -2
  18. package/dist/{chunk-7YDPBPBY.mjs → chunk-JYPMXZG4.mjs} +4 -4
  19. package/dist/{chunk-J3GHHVSC.mjs → chunk-NOSATNDY.mjs} +5 -7
  20. package/dist/chunk-NOSATNDY.mjs.map +1 -0
  21. package/dist/index.js +9 -15
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +7 -7
  24. package/dist/multi-autocomplete.d.mts +0 -8
  25. package/dist/multi-autocomplete.d.ts +0 -8
  26. package/dist/multi-autocomplete.js +9 -15
  27. package/dist/multi-autocomplete.js.map +1 -1
  28. package/dist/multi-autocomplete.mjs +6 -6
  29. package/dist/use-autocomplete-option.d.mts +0 -16
  30. package/dist/use-autocomplete-option.d.ts +0 -16
  31. package/dist/use-autocomplete-option.js +6 -10
  32. package/dist/use-autocomplete-option.js.map +1 -1
  33. package/dist/use-autocomplete-option.mjs +1 -1
  34. package/dist/use-autocomplete.d.mts +3 -3
  35. package/dist/use-autocomplete.d.ts +3 -3
  36. package/dist/use-autocomplete.js +8 -12
  37. package/dist/use-autocomplete.js.map +1 -1
  38. package/dist/use-autocomplete.mjs +3 -3
  39. package/package.json +4 -4
  40. package/dist/chunk-J3GHHVSC.mjs.map +0 -1
  41. package/dist/chunk-LCC3VNZV.mjs.map +0 -1
  42. package/dist/chunk-YWUT56L3.mjs.map +0 -1
  43. /package/dist/{chunk-7GVG5MVF.mjs.map → chunk-2UKLSSUA.mjs.map} +0 -0
  44. /package/dist/{chunk-6QAH2ARG.mjs.map → chunk-6II6KCIJ.mjs.map} +0 -0
  45. /package/dist/{chunk-ZFWB5LCD.mjs.map → chunk-G6SC44LI.mjs.map} +0 -0
  46. /package/dist/{chunk-7YDPBPBY.mjs.map → chunk-JYPMXZG4.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -1,17 +1,17 @@
1
1
  "use client"
2
2
  import {
3
3
  MultiAutocomplete
4
- } from "./chunk-J3GHHVSC.mjs";
4
+ } from "./chunk-NOSATNDY.mjs";
5
5
  import {
6
6
  Autocomplete
7
- } from "./chunk-7YDPBPBY.mjs";
8
- import "./chunk-YWUT56L3.mjs";
7
+ } from "./chunk-JYPMXZG4.mjs";
8
+ import "./chunk-75VF5Q5W.mjs";
9
9
  import {
10
10
  AutocompleteCreate
11
- } from "./chunk-ZFWB5LCD.mjs";
11
+ } from "./chunk-G6SC44LI.mjs";
12
12
  import {
13
13
  AutocompleteEmpty
14
- } from "./chunk-6QAH2ARG.mjs";
14
+ } from "./chunk-6II6KCIJ.mjs";
15
15
  import "./chunk-REPBXBG3.mjs";
16
16
  import "./chunk-PTPJFYGI.mjs";
17
17
  import {
@@ -20,8 +20,8 @@ import {
20
20
  import "./chunk-CMFJUJJW.mjs";
21
21
  import {
22
22
  AutocompleteOption
23
- } from "./chunk-7GVG5MVF.mjs";
24
- import "./chunk-LCC3VNZV.mjs";
23
+ } from "./chunk-2UKLSSUA.mjs";
24
+ import "./chunk-3A2HEULI.mjs";
25
25
  import "./chunk-6OTUOEYS.mjs";
26
26
  import "./chunk-ZNO5RUVT.mjs";
27
27
  export {
@@ -18,12 +18,6 @@ import './autocomplete-option-group.mjs';
18
18
  import './use-autocomplete-option-group.mjs';
19
19
 
20
20
  interface MultiAutocompleteOptions {
21
- /**
22
- * If `true`, display the select clear icon.
23
- *
24
- * @default true
25
- */
26
- clearable?: boolean;
27
21
  /**
28
22
  * If `true`, the list element will be closed when value is selected.
29
23
  *
@@ -65,8 +59,6 @@ interface MultiAutocompleteOptions {
65
59
  * If `true`, display the select clear icon.
66
60
  *
67
61
  * @default true
68
- *
69
- * @deprecated Use `clearable` instead.
70
62
  */
71
63
  isClearable?: boolean;
72
64
  /**
@@ -18,12 +18,6 @@ import './autocomplete-option-group.js';
18
18
  import './use-autocomplete-option-group.js';
19
19
 
20
20
  interface MultiAutocompleteOptions {
21
- /**
22
- * If `true`, display the select clear icon.
23
- *
24
- * @default true
25
- */
26
- clearable?: boolean;
27
21
  /**
28
22
  * If `true`, the list element will be closed when value is selected.
29
23
  *
@@ -65,8 +59,6 @@ interface MultiAutocompleteOptions {
65
59
  * If `true`, display the select clear icon.
66
60
  *
67
61
  * @default true
68
- *
69
- * @deprecated Use `clearable` instead.
70
62
  */
71
63
  isClearable?: boolean;
72
64
  /**
@@ -172,17 +172,13 @@ var useAutocompleteOption = (props) => {
172
172
  id,
173
173
  children,
174
174
  closeOnSelect: customCloseOnSelect,
175
- disabled,
176
- focusable,
177
175
  icon: customIcon,
178
176
  isDisabled,
179
177
  isFocusable,
180
178
  value: optionValue,
181
179
  ...computedProps
182
180
  } = { ...optionProps, ...props };
183
- disabled != null ? disabled : disabled = isDisabled;
184
- focusable != null ? focusable : focusable = isFocusable;
185
- const trulyDisabled = !!disabled && !focusable;
181
+ const trulyDisabled = !!isDisabled && !isFocusable;
186
182
  const { descendants, index, register } = useAutocompleteDescendant({
187
183
  disabled: trulyDisabled
188
184
  });
@@ -208,7 +204,7 @@ var useAutocompleteOption = (props) => {
208
204
  const onClick = (0, import_react2.useCallback)(
209
205
  (ev) => {
210
206
  ev.stopPropagation();
211
- if (disabled || !isTargetOption(ev.currentTarget)) {
207
+ if (isDisabled || !isTargetOption(ev.currentTarget)) {
212
208
  if (inputRef.current) inputRef.current.focus();
213
209
  return;
214
210
  }
@@ -222,7 +218,7 @@ var useAutocompleteOption = (props) => {
222
218
  isDuplicated,
223
219
  onFocusNext,
224
220
  omitSelectedValues,
225
- disabled,
221
+ isDisabled,
226
222
  optionValue,
227
223
  setFocusedIndex,
228
224
  index,
@@ -254,10 +250,10 @@ var useAutocompleteOption = (props) => {
254
250
  ...props2,
255
251
  id,
256
252
  style: isHidden ? style : void 0,
257
- "aria-disabled": (0, import_utils3.ariaAttr)(disabled),
253
+ "aria-disabled": (0, import_utils3.ariaAttr)(isDisabled),
258
254
  "aria-hidden": (0, import_utils3.ariaAttr)(isHidden),
259
255
  "aria-selected": isSelected,
260
- "data-disabled": (0, import_utils3.dataAttr)(disabled),
256
+ "data-disabled": (0, import_utils3.dataAttr)(isDisabled),
261
257
  "data-duplicated": (0, import_utils3.dataAttr)(isDuplicated),
262
258
  "data-focus": (0, import_utils3.dataAttr)(isFocused),
263
259
  "data-target": (0, import_utils3.dataAttr)(true),
@@ -271,7 +267,7 @@ var useAutocompleteOption = (props) => {
271
267
  isDuplicated,
272
268
  optionValue,
273
269
  computedProps,
274
- disabled,
270
+ isDisabled,
275
271
  isFocused,
276
272
  isSelected,
277
273
  isTarget,
@@ -888,8 +884,8 @@ var defaultFormat = (value) => {
888
884
  var flattenItems = (items) => {
889
885
  const filterItems = (items2) => items2.map((item) => {
890
886
  var _a;
891
- const { disabled, focusable } = item;
892
- const trulyDisabled = !!disabled && !focusable;
887
+ const { isDisabled, isFocusable } = item;
888
+ const trulyDisabled = !!isDisabled && !isFocusable;
893
889
  if (trulyDisabled) return;
894
890
  if ("items" in item) {
895
891
  return filterItems((_a = item.items) != null ? _a : []);
@@ -1673,7 +1669,6 @@ var MultiAutocomplete = (0, import_core9.forwardRef)(
1673
1669
  );
1674
1670
  let {
1675
1671
  className,
1676
- clearable,
1677
1672
  closeOnSelect = false,
1678
1673
  color,
1679
1674
  component,
@@ -1720,7 +1715,6 @@ var MultiAutocomplete = (0, import_core9.forwardRef)(
1720
1715
  });
1721
1716
  h != null ? h : h = height;
1722
1717
  minH != null ? minH : minH = minHeight;
1723
- clearable != null ? clearable : clearable = isClearable;
1724
1718
  const css = {
1725
1719
  color,
1726
1720
  h: "fit-content",
@@ -1765,7 +1759,7 @@ var MultiAutocomplete = (0, import_core9.forwardRef)(
1765
1759
  ...getFieldProps(fieldProps, ref)
1766
1760
  }
1767
1761
  ),
1768
- clearable && value.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1762
+ isClearable && value.length ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1769
1763
  AutocompleteClearIcon,
1770
1764
  {
1771
1765
  ...clearIconProps,