@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
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/use-autocomplete.tsx"],"sourcesContent":["import type { HTMLUIProps, PropGetter } from \"@yamada-ui/core\"\nimport type { FormControlOptions } from \"@yamada-ui/form-control\"\nimport type { ComboBoxProps, PopoverProps } from \"@yamada-ui/popover\"\nimport type { Union } from \"@yamada-ui/utils\"\nimport type {\n ChangeEvent,\n DOMAttributes,\n FocusEvent,\n KeyboardEvent,\n MouseEvent,\n} from \"react\"\nimport type { AutocompleteOptionProps } from \"./autocomplete-option\"\nimport type { AutocompleteOptionGroupProps } from \"./autocomplete-option-group\"\nimport { layoutStyleProperties } from \"@yamada-ui/core\"\nimport {\n formControlProperties,\n useFormControlProps,\n} from \"@yamada-ui/form-control\"\nimport { useControllableState } from \"@yamada-ui/use-controllable-state\"\nimport { useDisclosure } from \"@yamada-ui/use-disclosure\"\nimport { useOutsideClick } from \"@yamada-ui/use-outside-click\"\nimport {\n dataAttr,\n funcAll,\n getEventRelatedTarget,\n getValidChildren,\n handlerAll,\n isArray,\n isContains,\n isUndefined,\n mergeRefs,\n pickObject,\n splitObject,\n useUnmountEffect,\n useUpdateEffect,\n} from \"@yamada-ui/utils\"\nimport { useCallback, useEffect, useMemo, useRef, useState } from \"react\"\nimport {\n useAutocompleteContext,\n useAutocompleteDescendants,\n useAutocompleteDescendantsContext,\n} from \"./autocomplete-context\"\nimport { AutocompleteOption } from \"./autocomplete-option\"\nimport { AutocompleteOptionGroup } from \"./autocomplete-option-group\"\n\nexport interface ChangeOptions {\n forceUpdate?: boolean\n runOmit?: boolean\n runRebirth?: boolean\n}\n\ninterface AutocompleteItemWithValue extends AutocompleteOptionProps {\n label?: string\n value?: string\n}\n\ninterface AutocompleteItemWithItems\n extends AutocompleteOptionGroupProps,\n Pick<AutocompleteOptionProps, \"isDisabled\" | \"isFocusable\"> {\n items?: AutocompleteItemWithValue[]\n}\n\nexport type AutocompleteItem =\n | AutocompleteItemWithItems\n | AutocompleteItemWithValue\n\nconst kanaMap: { [key: string]: string } = {\n \"。\": \"。\",\n \"「\": \"「\",\n \"」\": \"」\",\n \"、\": \"、\",\n \"・\": \"・\",\n ヲ: \"ヲ\",\n ヺ: \"ヺ\",\n ァ: \"ァ\",\n ィ: \"ィ\",\n ゥ: \"ゥ\",\n ェ: \"ェ\",\n ォ: \"ォ\",\n ャ: \"ャ\",\n ュ: \"ュ\",\n ョ: \"ョ\",\n ッ: \"ッ\",\n ー: \"ー\",\n ア: \"ア\",\n イ: \"イ\",\n ウ: \"ウ\",\n ヴ: \"ヴ\",\n エ: \"エ\",\n オ: \"オ\",\n カ: \"カ\",\n ガ: \"ガ\",\n キ: \"キ\",\n ギ: \"ギ\",\n ク: \"ク\",\n グ: \"グ\",\n ケ: \"ケ\",\n ゲ: \"ゲ\",\n コ: \"コ\",\n ゴ: \"ゴ\",\n サ: \"サ\",\n ザ: \"ザ\",\n シ: \"シ\",\n ジ: \"ジ\",\n ス: \"ス\",\n ズ: \"ズ\",\n セ: \"セ\",\n ゼ: \"ゼ\",\n ソ: \"ソ\",\n ゾ: \"ゾ\",\n タ: \"タ\",\n ダ: \"ダ\",\n チ: \"チ\",\n ヂ: \"ヂ\",\n ツ: \"ツ\",\n ヅ: \"ヅ\",\n テ: \"テ\",\n デ: \"デ\",\n ト: \"ト\",\n ド: \"ド\",\n ナ: \"ナ\",\n ニ: \"ニ\",\n ヌ: \"ヌ\",\n ネ: \"ネ\",\n ノ: \"ノ\",\n ハ: \"ハ\",\n バ: \"バ\",\n パ: \"パ\",\n ヒ: \"ヒ\",\n ビ: \"ビ\",\n ピ: \"ピ\",\n フ: \"フ\",\n ブ: \"ブ\",\n プ: \"プ\",\n ヘ: \"ヘ\",\n ベ: \"ベ\",\n ペ: \"ペ\",\n ホ: \"ホ\",\n ボ: \"ボ\",\n ポ: \"ポ\",\n マ: \"マ\",\n ミ: \"ミ\",\n ム: \"ム\",\n メ: \"メ\",\n モ: \"モ\",\n ヤ: \"ヤ\",\n ユ: \"ユ\",\n ヨ: \"ヨ\",\n ラ: \"ラ\",\n リ: \"リ\",\n ル: \"ル\",\n レ: \"レ\",\n ロ: \"ロ\",\n ワ: \"ワ\",\n ヷ: \"ヷ\",\n ン: \"ン\",\n}\n\nconst defaultFormat = (value: string) => {\n value = value.replace(/[!-~]/g, (v) =>\n String.fromCharCode(v.charCodeAt(0) - 0xfee0),\n )\n\n const reg = new RegExp(\"(\" + Object.keys(kanaMap).join(\"|\") + \")\", \"g\")\n\n value = value\n .replace(reg, (v) => kanaMap[v]!)\n .replace(/゙/g, \"゛\")\n .replace(/゚/g, \"゜\")\n\n value = value.toUpperCase()\n\n return value\n}\n\nconst flattenItems = (\n items: AutocompleteItem[],\n): AutocompleteItemWithValue[] => {\n const filterItems = (\n items: AutocompleteItem[] | AutocompleteItemWithValue[],\n ): (AutocompleteItemWithValue | AutocompleteItemWithValue[])[] =>\n items\n .map((item) => {\n const { isDisabled, isFocusable } = item\n const trulyDisabled = !!isDisabled && !isFocusable\n\n if (trulyDisabled) return\n\n if (\"items\" in item) {\n return filterItems(item.items ?? [])\n } else {\n return item as AutocompleteItemWithValue\n }\n })\n .filter(Boolean) as (\n | AutocompleteItemWithValue\n | AutocompleteItemWithValue[]\n )[]\n\n return filterItems(items).flat(Infinity) as AutocompleteItemWithValue[]\n}\n\ntype UseAutocompleteBaseProps<T extends string | string[] = string> = {\n /**\n * If `true`, enables the creation of autocomplete option.\n *\n * @default false\n */\n allowCreate?: boolean\n /**\n * If `true`, enables the free input.\n */\n allowFree?: boolean\n /**\n * If `true`, the list element will be closed when value is selected.\n *\n * @default true\n */\n closeOnSelect?: boolean\n /**\n * The initial value of the autocomplete.\n */\n defaultValue?: T\n /**\n * The message displayed when the search yields no hits.\n *\n * @default 'No results found'\n */\n emptyMessage?: string\n /**\n * Function to format text when search input.\n */\n format?: (value: string) => string\n /**\n * The position to be inserted when the autocomplete option is created.\n *\n * @default 'first'\n */\n insertPositionItem?: [string, \"first\" | \"last\"] | Union<\"first\" | \"last\">\n /**\n * If provided, generate options based on items.\n */\n items?: AutocompleteItem[]\n /**\n * The maximum selectable value.\n */\n maxSelectValues?: number\n /**\n * If `true`, the selected item(s) will be excluded from the list.\n *\n * @default false\n */\n omitSelectedValues?: boolean\n /**\n * The value of the autocomplete.\n */\n value?: T\n /**\n * Props for select option element.\n */\n optionProps?: Omit<AutocompleteOptionProps, \"children\" | \"value\">\n /**\n * The callback invoked when value state changes.\n */\n onChange?: (value: T) => void\n /**\n * The callback invoked when autocomplete option created.\n */\n onCreate?: (newItem: AutocompleteItem, newItems: AutocompleteItem[]) => void\n /**\n * The callback invoked when search input.\n */\n onSearch?: (ev: ChangeEvent<HTMLInputElement>) => void\n} & ComboBoxProps &\n FormControlOptions\n\nexport type UseAutocompleteProps<T extends string | string[] = string> = Omit<\n HTMLUIProps<\"input\">,\n | \"disabled\"\n | \"list\"\n | \"readOnly\"\n | \"required\"\n | \"size\"\n | keyof UseAutocompleteBaseProps\n> &\n UseAutocompleteBaseProps<T>\n\nexport const useAutocomplete = <T extends string | string[] = string>(\n props: UseAutocompleteProps<T>,\n) => {\n const {\n allowCreate = false,\n allowFree = false,\n animation,\n boundary,\n children,\n closeDelay,\n closeOnBlur = true,\n closeOnEsc = true,\n closeOnSelect = true,\n defaultIsOpen,\n defaultValue,\n duration = 0.2,\n emptyMessage = \"No results found\",\n eventListeners,\n flip,\n format = defaultFormat,\n gutter,\n insertPositionItem = \"first\",\n isLazy,\n isOpen: isOpenProp,\n items,\n lazyBehavior,\n matchWidth = true,\n maxSelectValues,\n modifiers,\n offset,\n omitSelectedValues = false,\n openDelay,\n placeholder,\n placement = \"bottom-start\",\n preventOverflow,\n strategy,\n value: valueProp,\n optionProps,\n onChange: onChangeProp,\n onClose: onCloseProp,\n onCreate: onCreateProp,\n onKeyDown: onKeyDownProp,\n onOpen: onOpenProp,\n onSearch: onSearchProp,\n ...rest\n } = useFormControlProps(props)\n const {\n \"aria-readonly\": _ariaReadonly,\n onFocus: onFocusProp,\n ...formControlProps\n } = pickObject(rest, formControlProperties)\n const [containerProps, inputProps] = splitObject(rest, layoutStyleProperties)\n const { id } = rest\n\n const descendants = useAutocompleteDescendants()\n\n const containerRef = useRef<HTMLDivElement>(null)\n const listRef = useRef<HTMLUListElement>(null)\n const inputRef = useRef<HTMLInputElement>(null)\n const timeoutIds = useRef<Set<any>>(new Set([]))\n const isComposition = useRef<boolean>(false)\n const prevValue = useRef<T | undefined>(undefined)\n\n const [resolvedItems, setResolvedItems] = useState<\n AutocompleteItem[] | undefined\n >(items ? JSON.parse(JSON.stringify(items)) : undefined)\n const [value, setValue] = useControllableState({\n defaultValue,\n value: valueProp,\n onChange: onChangeProp,\n })\n const [label, setLabel] = useState<T | undefined>(undefined)\n const [inputValue, setInputValue] = useState<string>(\"\")\n const [focusedIndex, setFocusedIndex] = useState<number>(-1)\n const [isAllSelected, setIsAllSelected] = useState<boolean>(false)\n const [isHit, setIsHit] = useState<boolean>(true)\n const {\n isOpen,\n onClose,\n onOpen: onInternalOpen,\n } = useDisclosure({\n defaultIsOpen,\n isOpen: isOpenProp,\n onClose: onCloseProp,\n onOpen: onOpenProp,\n })\n const isFocused = focusedIndex > -1\n const isCreate = focusedIndex === -2 && allowCreate\n const isMulti = isArray(value)\n const isEmptyValue = !isMulti ? !value : !value.length\n\n const [firstInsertPositionItem, secondInsertPositionItem] = useMemo(() => {\n if (isArray(insertPositionItem)) {\n return insertPositionItem\n } else {\n return [insertPositionItem, \"first\"]\n }\n }, [insertPositionItem])\n\n if (allowCreate && !isUndefined(children)) {\n console.warn(\n `${!isMulti ? \"Autocomplete\" : \"MultiAutocomplete\"}: ${\n !isMulti ? \"Autocomplete\" : \"MultiAutocomplete\"\n } internally prefers 'children'. If 'allowCreate' is true, it will not be reflected correctly. If want to reflect, please set 'items' in props.`,\n )\n }\n\n const selectedValues = descendants.enabledValues(\n ({ node }) => isMulti && value.includes(node.dataset.value ?? \"\"),\n )\n const selectedIndexes = selectedValues.map(({ index }) => index)\n const enabledValues = descendants.enabledValues(\n ({ index, node }) =>\n \"target\" in node.dataset && !selectedIndexes.includes(index),\n )\n\n const validChildren = getValidChildren(children)\n\n const computedChildren = useMemo(\n () =>\n resolvedItems?.map((item, i) => {\n if (\"value\" in item) {\n const { label, value, ...props } = item\n\n return (\n <AutocompleteOption key={i} value={value} {...props}>\n {label}\n </AutocompleteOption>\n )\n } else if (\"items\" in item) {\n const { items = [], label, ...props } = item\n\n return (\n <AutocompleteOptionGroup key={i} label={label as string} {...props}>\n {items.map(({ label, value, ...props }, i) => (\n <AutocompleteOption key={i} value={value} {...props}>\n {label}\n </AutocompleteOption>\n ))}\n </AutocompleteOptionGroup>\n )\n }\n }),\n [resolvedItems],\n )\n\n const isEmpty = !validChildren.length && !computedChildren?.length\n\n const onOpen = useCallback(() => {\n if (formControlProps.disabled || formControlProps.readOnly) return\n\n if (!allowCreate && (isEmpty || isAllSelected)) return\n\n onInternalOpen()\n\n if (inputRef.current) inputRef.current.focus()\n }, [allowCreate, formControlProps, isAllSelected, isEmpty, onInternalOpen])\n\n const onFocusFirst = useCallback(() => {\n const id = setTimeout(() => {\n if (isEmpty || isAllSelected) return\n\n const first = descendants.enabledFirstValue(\n ({ node }) => \"target\" in node.dataset,\n )\n\n if (!first) return\n\n if (!isMulti || !omitSelectedValues) {\n setFocusedIndex(first.index)\n } else {\n if (selectedIndexes.includes(first.index)) {\n const enabledFirst = enabledValues[0]\n\n setFocusedIndex(enabledFirst?.index ?? -1)\n } else {\n setFocusedIndex(first.index)\n }\n }\n })\n\n timeoutIds.current.add(id)\n }, [\n descendants,\n enabledValues,\n isAllSelected,\n isEmpty,\n isMulti,\n omitSelectedValues,\n selectedIndexes,\n ])\n\n const onFocusLast = useCallback(() => {\n const id = setTimeout(() => {\n if (isEmpty || isAllSelected) return\n\n const last = descendants.enabledLastValue(\n ({ node }) => \"target\" in node.dataset,\n )\n\n if (!last) return\n\n if (!isMulti || !omitSelectedValues) {\n setFocusedIndex(last.index)\n } else {\n if (selectedIndexes.includes(last.index)) {\n const enabledLast = enabledValues.reverse()[0]\n\n setFocusedIndex(enabledLast?.index ?? -1)\n } else {\n setFocusedIndex(last.index)\n }\n }\n })\n\n timeoutIds.current.add(id)\n }, [\n descendants,\n enabledValues,\n isAllSelected,\n isEmpty,\n isMulti,\n omitSelectedValues,\n selectedIndexes,\n ])\n\n const onFocusSelected = useCallback(() => {\n const id = setTimeout(() => {\n const values = descendants.enabledValues()\n\n const selected = values.find(({ node }) =>\n !isMulti\n ? node.dataset.value === value\n : value.includes(node.dataset.value ?? \"\"),\n )\n\n if (selected) setFocusedIndex(selected.index)\n })\n\n timeoutIds.current.add(id)\n }, [descendants, isMulti, value])\n\n const onFocusNext = useCallback(\n (index: number = focusedIndex) => {\n const id = setTimeout(() => {\n const next = descendants.enabledNextValue(\n index,\n ({ node }) => \"target\" in node.dataset,\n )\n\n if (!next) return\n\n if (!isMulti || !omitSelectedValues) {\n setFocusedIndex(next.index)\n } else {\n if (selectedIndexes.includes(next.index)) {\n const enabledNext =\n enabledValues.find(({ index }) => next.index < index) ??\n enabledValues[0]\n\n setFocusedIndex(enabledNext?.index ?? -1)\n } else {\n setFocusedIndex(next.index)\n }\n }\n })\n\n timeoutIds.current.add(id)\n },\n [\n descendants,\n enabledValues,\n focusedIndex,\n isMulti,\n omitSelectedValues,\n selectedIndexes,\n ],\n )\n\n const onFocusPrev = useCallback(\n (index: number = focusedIndex) => {\n const id = setTimeout(() => {\n const prev = descendants.enabledPrevValue(\n index,\n ({ node }) => \"target\" in node.dataset,\n )\n\n if (!prev) return\n\n if (!isMulti || !omitSelectedValues) {\n setFocusedIndex(prev.index)\n } else {\n if (selectedIndexes.includes(prev.index)) {\n const enabledPrev =\n enabledValues.reverse().find(({ index }) => index < prev.index) ??\n enabledValues[0]\n\n setFocusedIndex(enabledPrev?.index ?? -1)\n } else {\n setFocusedIndex(prev.index)\n }\n }\n })\n\n timeoutIds.current.add(id)\n },\n [\n descendants,\n enabledValues,\n focusedIndex,\n isMulti,\n omitSelectedValues,\n selectedIndexes,\n ],\n )\n\n const onFocusFirstOrSelected =\n isEmptyValue || omitSelectedValues ? onFocusFirst : onFocusSelected\n const onFocusLastOrSelected =\n isEmptyValue || omitSelectedValues ? onFocusLast : onFocusSelected\n\n const pickOptions = useCallback(\n (value: string) => {\n const values = descendants.values()\n\n let isHit = false\n let isFocused = false\n\n values.forEach(({ index, node }) => {\n if (format(node.textContent ?? \"\").includes(value)) {\n isHit = true\n\n const isDisabled = \"disabled\" in node.dataset\n\n node.dataset.target = \"\"\n\n if (!isFocused && !isDisabled) {\n isFocused = true\n\n setFocusedIndex(index)\n }\n } else {\n delete node.dataset.target\n }\n })\n\n setIsHit(isHit)\n },\n [descendants, format],\n )\n\n const rebirthOptions = useCallback(\n (runFocus = true) => {\n const values = descendants.values()\n\n values.forEach(({ node }) => {\n node.dataset.target = \"\"\n })\n\n if (runFocus) onFocusFirst()\n\n setIsHit(true)\n },\n [descendants, onFocusFirst],\n )\n\n const getSelectedValues = useCallback(\n (newValues: string | string[]) => {\n const enabledValues = descendants.enabledValues()\n\n const resolvedValues = isArray(newValues) ? newValues : [newValues]\n\n const selectedValues = resolvedValues\n .map((value) => {\n const { node } =\n enabledValues.find(({ node }) => node.dataset.value === value) ?? {}\n\n if (node) {\n const el = Array.from(node.children).find(\n (child) => child.getAttribute(\"data-label\") !== null,\n )\n\n return el?.textContent ?? undefined\n } else {\n return allowFree ? value : undefined\n }\n })\n .filter(Boolean) as string[]\n\n return selectedValues\n },\n [allowFree, descendants],\n )\n\n const onChangeLabel = useCallback(\n (newValue: string, { forceUpdate, runOmit = true }: ChangeOptions = {}) => {\n const selectedValues = getSelectedValues(newValue)\n\n if (!forceUpdate && !selectedValues.length) return\n\n setLabel((prev) => {\n if (!isMulti) {\n return selectedValues[0] as T\n } else {\n selectedValues.forEach((selectedValue) => {\n const isSelected = isArray(prev) && prev.includes(selectedValue)\n\n if (!isSelected) {\n prev = [...(isArray(prev) ? prev : []), selectedValue] as T\n } else if (runOmit) {\n prev = (\n isArray(prev)\n ? prev.filter((value) => value !== selectedValue)\n : undefined\n ) as T\n }\n })\n\n return prev\n }\n })\n },\n [getSelectedValues, isMulti],\n )\n\n const onChange = useCallback(\n (\n newValue: string,\n { forceUpdate, runRebirth = true }: ChangeOptions = {},\n ) => {\n setValue((prev) => {\n let next: T\n\n if (!isArray(prev)) {\n next = newValue as T\n } else {\n const isSelected = prev.includes(newValue)\n\n if (!isSelected) {\n next = [...prev, newValue] as T\n } else {\n next = prev.filter((value) => value !== newValue) as T\n }\n }\n\n prevValue.current = next\n return next\n })\n\n const isHit =\n descendants\n .values()\n .filter(({ node }) =>\n format(node.textContent ?? \"\").includes(newValue),\n ).length > 0\n\n onChangeLabel(newValue, { forceUpdate })\n\n if (allowFree || isHit) setInputValue(\"\")\n\n if (isMulti && runRebirth) rebirthOptions(false)\n },\n [\n allowFree,\n isMulti,\n onChangeLabel,\n rebirthOptions,\n setValue,\n descendants,\n format,\n ],\n )\n\n const onSelect = useCallback(() => {\n let enabledValue = descendants.value(focusedIndex)\n\n if (\"disabled\" in (enabledValue?.node.dataset ?? {}))\n enabledValue = undefined\n\n if (!enabledValue) return\n\n const value = enabledValue.node.dataset.value ?? \"\"\n\n onChange(value)\n\n if (closeOnSelect) onClose()\n\n if (omitSelectedValues) onFocusNext()\n }, [\n closeOnSelect,\n descendants,\n focusedIndex,\n omitSelectedValues,\n onChange,\n onClose,\n onFocusNext,\n ])\n\n const onSearch = useCallback(\n (ev: ChangeEvent<HTMLInputElement>) => {\n if (!isOpen) onOpen()\n\n onSearchProp?.(ev)\n\n const value = ev.target.value\n const computedValue = format(value)\n\n if (computedValue) {\n pickOptions(computedValue)\n } else {\n rebirthOptions()\n }\n\n setInputValue(value)\n },\n [isOpen, onOpen, format, onSearchProp, pickOptions, rebirthOptions],\n )\n\n const onCompositionStart = useCallback(() => {\n isComposition.current = true\n }, [])\n\n const onCompositionEnd = useCallback(() => {\n isComposition.current = false\n }, [])\n\n const onCreate = useCallback(() => {\n if (!listRef.current) return\n\n const newItem: AutocompleteItem = { label: inputValue, value: inputValue }\n\n let newItems: AutocompleteItem[] = []\n\n if (resolvedItems) newItems = [...resolvedItems]\n\n if (firstInsertPositionItem === \"first\") {\n newItems = [newItem, ...newItems]\n } else if (firstInsertPositionItem === \"last\") {\n newItems = [...newItems, newItem]\n } else {\n const i = newItems.findIndex(\n ({ label }) => label === firstInsertPositionItem,\n )\n\n const targetItem = newItems[i]\n\n if (i !== -1 && targetItem && \"items\" in targetItem) {\n if (secondInsertPositionItem === \"first\") {\n targetItem.items = [newItem, ...(targetItem.items ?? [])]\n } else {\n targetItem.items = [...(targetItem.items ?? []), newItem]\n }\n\n newItems[i] = targetItem\n } else {\n console.warn(\n `${\n !isMulti ? \"Autocomplete\" : \"MultiAutocomplete\"\n }: '${firstInsertPositionItem}' specified in insertPositionItem does not exist in the option group.`,\n )\n }\n }\n\n setResolvedItems(newItems)\n onChange(inputValue)\n rebirthOptions(false)\n\n const index = flattenItems(newItems).findIndex(\n ({ value }) => value === inputValue,\n )\n\n setFocusedIndex(index)\n\n onCreateProp?.(newItem, newItems)\n }, [\n inputValue,\n resolvedItems,\n firstInsertPositionItem,\n onChange,\n rebirthOptions,\n onCreateProp,\n secondInsertPositionItem,\n isMulti,\n ])\n\n const onClick = useCallback(() => {\n if (isOpen) {\n if (inputRef.current) inputRef.current.focus()\n } else {\n onOpen()\n\n onFocusFirstOrSelected()\n }\n }, [isOpen, onFocusFirstOrSelected, onOpen])\n\n const onFocus = useCallback(() => {\n if (isOpen) return\n\n onOpen()\n\n onFocusFirstOrSelected()\n }, [isOpen, onFocusFirstOrSelected, onOpen])\n\n const onBlur = useCallback(\n (ev: FocusEvent<HTMLDivElement>) => {\n const relatedTarget = getEventRelatedTarget(ev)\n\n if (isContains(containerRef.current, relatedTarget)) return\n\n if (!closeOnBlur && isHit) return\n\n if (allowFree && !!inputValue) onChange(inputValue, { runRebirth: false })\n\n setInputValue(\"\")\n\n if (isOpen) onClose()\n },\n [closeOnBlur, isHit, isOpen, inputValue, allowFree, onClose, onChange],\n )\n\n const onDelete = useCallback(() => {\n if (!isMulti) {\n onChange(\"\", { forceUpdate: true })\n } else {\n onChange(value[value.length - 1]!)\n }\n\n if (!isOpen) onFocus()\n }, [isMulti, isOpen, onChange, onFocus, value])\n\n const onClear = useCallback(\n (ev: MouseEvent<HTMLDivElement>) => {\n ev.stopPropagation()\n\n prevValue.current = [] as unknown as T\n setValue([] as unknown as T)\n setLabel(undefined)\n setInputValue(\"\")\n rebirthOptions()\n\n if (isOpen && inputRef.current) inputRef.current.focus()\n },\n [isOpen, setLabel, setInputValue, setValue, rebirthOptions],\n )\n\n const onKeyDown = useCallback(\n (ev: KeyboardEvent<HTMLDivElement>) => {\n if (ev.key === \" \") ev.key = ev.code\n\n if (formControlProps.disabled || formControlProps.readOnly) return\n if (isComposition.current) return\n\n const enabledDelete = label === inputValue || !inputValue.length\n\n const actions: { [key: string]: Function | undefined } = {\n ArrowDown: isFocused\n ? () => onFocusNext()\n : !isOpen\n ? funcAll(onOpen, onFocusFirstOrSelected)\n : undefined,\n ArrowUp: isFocused\n ? () => onFocusPrev()\n : !isOpen\n ? funcAll(onOpen, onFocusLastOrSelected)\n : undefined,\n Backspace: !isEmptyValue && enabledDelete ? onDelete : undefined,\n End: isOpen ? onFocusLast : undefined,\n Enter: isCreate\n ? onCreate\n : isFocused\n ? onSelect\n : !isOpen\n ? funcAll(onOpen, onFocusFirstOrSelected)\n : allowFree && isMulti\n ? () => {\n if (inputValue) onChange(inputValue)\n\n setFocusedIndex(0)\n }\n : undefined,\n Escape: closeOnEsc ? onClose : undefined,\n Home: isOpen ? onFocusFirst : undefined,\n Space: isCreate\n ? onCreate\n : isFocused\n ? onSelect\n : !isOpen\n ? funcAll(onOpen, onFocusFirstOrSelected)\n : undefined,\n }\n\n const action = actions[ev.key]\n\n if (!action) return\n\n ev.preventDefault()\n ev.stopPropagation()\n\n action(ev)\n },\n [\n allowFree,\n formControlProps,\n label,\n inputValue,\n onOpen,\n isFocused,\n isMulti,\n onFocusFirstOrSelected,\n onFocusNext,\n onFocusLastOrSelected,\n onFocusPrev,\n isCreate,\n onCreate,\n onSelect,\n isOpen,\n onFocusFirst,\n onFocusLast,\n closeOnEsc,\n onClose,\n isEmptyValue,\n onDelete,\n onChange,\n ],\n )\n\n useEffect(() => {\n if (!isMulti) return\n\n if (!omitSelectedValues && isUndefined(maxSelectValues)) return\n\n const isAll = value.length > 0 && value.length === descendants.count()\n const isMax = value.length === maxSelectValues\n\n if (isAll || isMax) {\n onClose()\n setIsAllSelected(true)\n } else {\n setIsAllSelected(false)\n }\n }, [\n omitSelectedValues,\n value,\n descendants,\n isMulti,\n onClose,\n maxSelectValues,\n ])\n\n useEffect(() => {\n if (isMulti) {\n if (JSON.stringify(prevValue.current ?? []) === JSON.stringify(value))\n return\n\n const label = getSelectedValues(value)\n\n setLabel(label as T)\n } else {\n if (prevValue.current === value) return\n\n onChangeLabel(value, { runOmit: false })\n }\n }, [isMulti, value, onChangeLabel, getSelectedValues])\n\n useUpdateEffect(() => {\n if (isOpen || allowFree) return\n\n setFocusedIndex(-1)\n setInputValue(\"\")\n }, [isOpen])\n\n useUpdateEffect(() => {\n if (!isHit) setFocusedIndex(-2)\n }, [isHit])\n\n useUpdateEffect(() => {\n setResolvedItems(items ? JSON.parse(JSON.stringify(items)) : undefined)\n }, [items])\n\n useUnmountEffect(() => {\n timeoutIds.current.forEach((id) => clearTimeout(id))\n timeoutIds.current.clear()\n })\n\n useOutsideClick({\n ref: containerRef,\n enabled: isOpen && (closeOnBlur || !isHit),\n handler: onClose,\n })\n\n const getPopoverProps = useCallback(\n (props?: PopoverProps): PopoverProps => ({\n animation,\n boundary,\n closeDelay,\n closeOnBlur,\n duration,\n eventListeners,\n flip,\n gutter,\n isLazy,\n lazyBehavior,\n matchWidth,\n modifiers,\n offset,\n openDelay,\n placement,\n preventOverflow,\n strategy,\n ...props,\n closeOnButton: false,\n isOpen,\n trigger: \"never\",\n onClose,\n onOpen,\n }),\n [\n closeOnBlur,\n openDelay,\n closeDelay,\n isLazy,\n lazyBehavior,\n animation,\n duration,\n offset,\n gutter,\n preventOverflow,\n flip,\n matchWidth,\n boundary,\n eventListeners,\n strategy,\n placement,\n modifiers,\n isOpen,\n onOpen,\n onClose,\n ],\n )\n\n const getContainerProps: PropGetter = useCallback(\n (props = {}, ref = null) => ({\n ref: mergeRefs(containerRef, ref),\n ...containerProps,\n ...props,\n ...formControlProps,\n onBlur: handlerAll(props.onBlur, rest.onBlur, onBlur),\n onClick: handlerAll(props.onClick, rest.onClick, onClick),\n }),\n\n [containerProps, formControlProps, onBlur, onClick, rest],\n )\n\n const getFieldProps: PropGetter = useCallback(\n (props = {}, ref = null) => ({\n ref,\n tabIndex: -1,\n ...props,\n ...formControlProps,\n placeholder,\n \"aria-expanded\": dataAttr(isOpen),\n \"data-active\": dataAttr(isOpen),\n onFocus: handlerAll(props.onFocus, onFocusProp, onFocus),\n onKeyDown: handlerAll(props.onKeyDown, onKeyDownProp, onKeyDown),\n }),\n [\n formControlProps,\n placeholder,\n isOpen,\n onFocusProp,\n onFocus,\n onKeyDownProp,\n onKeyDown,\n ],\n )\n\n return {\n id,\n allowCreate,\n allowFree,\n closeOnSelect,\n computedChildren,\n descendants,\n emptyMessage,\n focusedIndex,\n inputRef,\n inputValue,\n isAllSelected,\n isEmpty,\n isHit,\n isOpen,\n label,\n listRef,\n omitSelectedValues,\n pickOptions,\n rebirthOptions,\n setFocusedIndex,\n value,\n formControlProps,\n getContainerProps,\n getFieldProps,\n getPopoverProps,\n inputProps: inputProps as DOMAttributes<HTMLInputElement>,\n optionProps,\n onChange,\n onChangeLabel,\n onClear,\n onClose,\n onCompositionEnd,\n onCompositionStart,\n onCreate,\n onFocusFirst,\n onFocusLast,\n onFocusNext,\n onFocusPrev,\n onFocusSelected,\n onOpen,\n onSearch,\n }\n}\n\nexport type UseAutocompleteReturn = ReturnType<typeof useAutocomplete>\n\nexport const useAutocompleteInput = () => {\n const {\n id,\n focusedIndex,\n inputRef,\n isAllSelected,\n isOpen,\n listRef,\n formControlProps,\n inputProps,\n onCompositionEnd,\n onCompositionStart,\n onSearch,\n } = useAutocompleteContext()\n\n const { value } = useAutocompleteDescendantsContext()\n\n useUpdateEffect(() => {\n if (isAllSelected && inputRef.current) inputRef.current.blur()\n }, [isAllSelected])\n\n const getInputProps: PropGetter<\"input\"> = useCallback(\n (props = {}, ref = null) => ({\n ref: mergeRefs(inputRef, ref),\n ...formControlProps,\n autoCapitalize: \"none\",\n autoComplete: \"off\",\n role: \"combobox\",\n spellCheck: \"false\",\n \"aria-activedescendant\": value(focusedIndex)?.node.id,\n \"aria-autocomplete\": \"list\",\n \"aria-controls\": listRef.current?.id,\n \"aria-expanded\": isOpen,\n \"aria-haspopup\": \"listbox\",\n ...inputProps,\n ...props,\n id,\n cursor: formControlProps.readOnly ? \"default\" : \"text\",\n pointerEvents:\n formControlProps.disabled || isAllSelected ? \"none\" : \"auto\",\n tabIndex: isAllSelected ? -1 : 0,\n onChange: handlerAll(props.onChange, onSearch),\n onCompositionEnd: handlerAll(\n props.onCompositionEnd,\n inputProps.onCompositionEnd,\n onCompositionEnd,\n ),\n onCompositionStart: handlerAll(\n props.onCompositionStart,\n inputProps.onCompositionStart,\n onCompositionStart,\n ),\n }),\n [\n listRef,\n focusedIndex,\n isOpen,\n inputProps,\n inputRef,\n formControlProps,\n id,\n isAllSelected,\n value,\n onSearch,\n onCompositionStart,\n onCompositionEnd,\n ],\n )\n\n return {\n getInputProps,\n }\n}\n\nexport type UseAutocompleteInputReturn = ReturnType<typeof useAutocompleteInput>\n"],"mappings":";;;;;;;;;;;;;;AAaA,SAAS,6BAA6B;AACtC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,4BAA4B;AACrC,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC;AAAA,E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WAAW;AAAA,UACX;AAAA,QACF;AAAA,MACF;AAAA;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,EACF;AACF;","names":["items","label","value","props","i","id","index","isHit","isFocused","enabledValues","selectedValues","node"]}
@@ -1,24 +1,24 @@
1
1
  "use client"
2
2
  import {
3
3
  useAutocompleteOptionGroup
4
- } from "./chunk-JMX72TSD.mjs";
4
+ } from "./chunk-2SISETLV.mjs";
5
5
  import {
6
6
  useAutocompleteContext
7
- } from "./chunk-JPUKYLBW.mjs";
7
+ } from "./chunk-WDQYM4FP.mjs";
8
8
 
9
9
  // src/autocomplete-option-group.tsx
10
- import { ui, forwardRef } from "@yamada-ui/core";
10
+ import { forwardRef, ui } from "@yamada-ui/core";
11
11
  import { cx } from "@yamada-ui/utils";
12
12
  import { jsx, jsxs } from "react/jsx-runtime";
13
13
  var AutocompleteOptionGroup = forwardRef(
14
14
  ({
15
15
  className,
16
+ children,
16
17
  color,
17
18
  h,
18
19
  height,
19
20
  minH,
20
21
  minHeight,
21
- children,
22
22
  labelProps,
23
23
  ...rest
24
24
  }, ref) => {
@@ -34,15 +34,15 @@ var AutocompleteOptionGroup = forwardRef(
34
34
  "ui-autocomplete__item--group",
35
35
  className
36
36
  ),
37
- __css: { w: "100%", h: "fit-content", color },
37
+ __css: { color, h: "fit-content", w: "100%" },
38
38
  ...getContainerProps(),
39
39
  children: [
40
40
  /* @__PURE__ */ jsx(
41
41
  ui.span,
42
42
  {
43
43
  className: "ui-autocomplete__item__group-label",
44
- __css: styles.groupLabel,
45
44
  lineClamp: 1,
45
+ __css: styles.groupLabel,
46
46
  ...labelProps,
47
47
  children: label
48
48
  }
@@ -67,4 +67,4 @@ AutocompleteOptionGroup.__ui__ = "AutocompleteOptionGroup";
67
67
  export {
68
68
  AutocompleteOptionGroup
69
69
  };
70
- //# sourceMappingURL=chunk-6F3LT7J6.mjs.map
70
+ //# sourceMappingURL=chunk-EWV3Q3S4.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/autocomplete-option-group.tsx"],"sourcesContent":["import type { HTMLUIProps } from \"@yamada-ui/core\"\nimport { ui, forwardRef } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useAutocompleteContext } from \"./autocomplete-context\"\nimport type { UseAutocompleteOptionGroupProps } from \"./use-autocomplete-option-group\"\nimport { useAutocompleteOptionGroup } from \"./use-autocomplete-option-group\"\n\ninterface AutocompleteOptionGroupOptions\n extends UseAutocompleteOptionGroupProps {\n /**\n * Props for autocomplete option group element.\n */\n labelProps?: HTMLUIProps<\"span\">\n}\n\nexport interface AutocompleteOptionGroupProps\n extends HTMLUIProps<\"ul\">,\n AutocompleteOptionGroupOptions {}\n\nexport const AutocompleteOptionGroup = forwardRef<\n AutocompleteOptionGroupProps,\n \"ul\"\n>(\n (\n {\n className,\n color,\n h,\n height,\n minH,\n minHeight,\n children,\n labelProps,\n ...rest\n },\n ref,\n ) => {\n const { styles } = useAutocompleteContext()\n const { label, getContainerProps, getGroupProps } =\n useAutocompleteOptionGroup(rest)\n\n h ??= height\n minH ??= minHeight\n\n return (\n <ui.li\n className={cx(\n \"ui-autocomplete__item\",\n \"ui-autocomplete__item--group\",\n className,\n )}\n __css={{ w: \"100%\", h: \"fit-content\", color }}\n {...getContainerProps()}\n >\n <ui.span\n className=\"ui-autocomplete__item__group-label\"\n __css={styles.groupLabel}\n lineClamp={1}\n {...labelProps}\n >\n {label}\n </ui.span>\n\n <ui.ul\n {...getGroupProps({}, ref)}\n className=\"ui-autocomplete__item__group\"\n __css={{ h, minH, ...styles.group }}\n >\n {children}\n </ui.ul>\n </ui.li>\n )\n },\n)\n\nAutocompleteOptionGroup.displayName = \"AutocompleteOptionGroup\"\nAutocompleteOptionGroup.__ui__ = \"AutocompleteOptionGroup\"\n"],"mappings":";;;;;;;;;AACA,SAAS,IAAI,kBAAkB;AAC/B,SAAS,UAAU;AA2Cb,SASE,KATF;AA1BC,IAAM,0BAA0B;AAAA,EAIrC,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,EAAE,OAAO,IAAI,uBAAuB;AAC1C,UAAM,EAAE,OAAO,mBAAmB,cAAc,IAC9C,2BAA2B,IAAI;AAEjC,wBAAM;AACN,iCAAS;AAET,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,OAAO,EAAE,GAAG,QAAQ,GAAG,eAAe,MAAM;AAAA,QAC3C,GAAG,kBAAkB;AAAA,QAEtB;AAAA;AAAA,YAAC,GAAG;AAAA,YAAH;AAAA,cACC,WAAU;AAAA,cACV,OAAO,OAAO;AAAA,cACd,WAAW;AAAA,cACV,GAAG;AAAA,cAEH;AAAA;AAAA,UACH;AAAA,UAEA;AAAA,YAAC,GAAG;AAAA,YAAH;AAAA,cACE,GAAG,cAAc,CAAC,GAAG,GAAG;AAAA,cACzB,WAAU;AAAA,cACV,OAAO,EAAE,GAAG,MAAM,GAAG,OAAO,MAAM;AAAA,cAEjC;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,wBAAwB,cAAc;AACtC,wBAAwB,SAAS;","names":[]}
1
+ {"version":3,"sources":["../src/autocomplete-option-group.tsx"],"sourcesContent":["import type { HTMLUIProps } from \"@yamada-ui/core\"\nimport type { UseAutocompleteOptionGroupProps } from \"./use-autocomplete-option-group\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx } from \"@yamada-ui/utils\"\nimport { useAutocompleteContext } from \"./autocomplete-context\"\nimport { useAutocompleteOptionGroup } from \"./use-autocomplete-option-group\"\n\ninterface AutocompleteOptionGroupOptions\n extends UseAutocompleteOptionGroupProps {\n /**\n * Props for autocomplete option group element.\n */\n labelProps?: HTMLUIProps<\"span\">\n}\n\nexport interface AutocompleteOptionGroupProps\n extends HTMLUIProps<\"ul\">,\n AutocompleteOptionGroupOptions {}\n\nexport const AutocompleteOptionGroup = forwardRef<\n AutocompleteOptionGroupProps,\n \"ul\"\n>(\n (\n {\n className,\n children,\n color,\n h,\n height,\n minH,\n minHeight,\n labelProps,\n ...rest\n },\n ref,\n ) => {\n const { styles } = useAutocompleteContext()\n const { label, getContainerProps, getGroupProps } =\n useAutocompleteOptionGroup(rest)\n\n h ??= height\n minH ??= minHeight\n\n return (\n <ui.li\n className={cx(\n \"ui-autocomplete__item\",\n \"ui-autocomplete__item--group\",\n className,\n )}\n __css={{ color, h: \"fit-content\", w: \"100%\" }}\n {...getContainerProps()}\n >\n <ui.span\n className=\"ui-autocomplete__item__group-label\"\n lineClamp={1}\n __css={styles.groupLabel}\n {...labelProps}\n >\n {label}\n </ui.span>\n\n <ui.ul\n {...getGroupProps({}, ref)}\n className=\"ui-autocomplete__item__group\"\n __css={{ h, minH, ...styles.group }}\n >\n {children}\n </ui.ul>\n </ui.li>\n )\n },\n)\n\nAutocompleteOptionGroup.displayName = \"AutocompleteOptionGroup\"\nAutocompleteOptionGroup.__ui__ = \"AutocompleteOptionGroup\"\n"],"mappings":";;;;;;;;;AAEA,SAAS,YAAY,UAAU;AAC/B,SAAS,UAAU;AA0Cb,SASE,KATF;AA1BC,IAAM,0BAA0B;AAAA,EAIrC,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,EAAE,OAAO,IAAI,uBAAuB;AAC1C,UAAM,EAAE,OAAO,mBAAmB,cAAc,IAC9C,2BAA2B,IAAI;AAEjC,wBAAM;AACN,iCAAS;AAET,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,OAAO,EAAE,OAAO,GAAG,eAAe,GAAG,OAAO;AAAA,QAC3C,GAAG,kBAAkB;AAAA,QAEtB;AAAA;AAAA,YAAC,GAAG;AAAA,YAAH;AAAA,cACC,WAAU;AAAA,cACV,WAAW;AAAA,cACX,OAAO,OAAO;AAAA,cACb,GAAG;AAAA,cAEH;AAAA;AAAA,UACH;AAAA,UAEA;AAAA,YAAC,GAAG;AAAA,YAAH;AAAA,cACE,GAAG,cAAc,CAAC,GAAG,GAAG;AAAA,cACzB,WAAU;AAAA,cACV,OAAO,EAAE,GAAG,MAAM,GAAG,OAAO,MAAM;AAAA,cAEjC;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,wBAAwB,cAAc;AACtC,wBAAwB,SAAS;","names":[]}
@@ -1,34 +1,34 @@
1
1
  "use client"
2
2
  import {
3
3
  useAutocompleteCreate
4
- } from "./chunk-5LPWFWE6.mjs";
4
+ } from "./chunk-ZJFWWXQM.mjs";
5
5
  import {
6
6
  AutocompleteItemIcon
7
- } from "./chunk-7SWSKLSA.mjs";
7
+ } from "./chunk-I5X4WSCX.mjs";
8
8
  import {
9
9
  useAutocompleteContext
10
- } from "./chunk-JPUKYLBW.mjs";
10
+ } from "./chunk-WDQYM4FP.mjs";
11
11
 
12
12
  // src/autocomplete-create.tsx
13
- import { ui, forwardRef } from "@yamada-ui/core";
13
+ import { forwardRef, ui } from "@yamada-ui/core";
14
14
  import { cx, runIfFunc } from "@yamada-ui/utils";
15
15
  import { jsx, jsxs } from "react/jsx-runtime";
16
16
  var AutocompleteCreate = forwardRef(
17
- ({ className, icon, children, ...rest }, ref) => {
17
+ ({ className, children, icon, ...rest }, ref) => {
18
18
  const { inputValue, styles } = useAutocompleteContext();
19
19
  const { getCreateProps } = useAutocompleteCreate();
20
20
  children != null ? children : children = inputValue;
21
21
  const css = {
22
- textDecoration: "none",
22
+ alignItems: "center",
23
23
  color: "inherit",
24
- userSelect: "none",
25
24
  display: "flex",
26
- width: "100%",
27
- alignItems: "center",
28
- textAlign: "start",
29
25
  flex: "0 0 auto",
30
- outline: 0,
31
26
  gap: "0.75rem",
27
+ outline: 0,
28
+ textAlign: "start",
29
+ textDecoration: "none",
30
+ userSelect: "none",
31
+ width: "100%",
32
32
  ...styles.item
33
33
  };
34
34
  return /* @__PURE__ */ jsxs(
@@ -39,7 +39,7 @@ var AutocompleteCreate = forwardRef(
39
39
  ...getCreateProps(rest, ref),
40
40
  children: [
41
41
  icon !== null ? /* @__PURE__ */ jsx(AutocompleteItemIcon, { children: icon || /* @__PURE__ */ jsx(AutocompletePlusIcon, {}) }) : null,
42
- icon ? /* @__PURE__ */ jsx(ui.span, { style: { pointerEvents: "none", flex: 1 }, lineClamp: 1, children: runIfFunc(children, inputValue) }) : runIfFunc(children, inputValue)
42
+ icon ? /* @__PURE__ */ jsx(ui.span, { style: { flex: 1, pointerEvents: "none" }, lineClamp: 1, children: runIfFunc(children, inputValue) }) : runIfFunc(children, inputValue)
43
43
  ]
44
44
  }
45
45
  );
@@ -47,11 +47,11 @@ var AutocompleteCreate = forwardRef(
47
47
  );
48
48
  AutocompleteCreate.displayName = "AutocompleteCreate";
49
49
  AutocompleteCreate.__ui__ = "AutocompleteCreate";
50
- var AutocompletePlusIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 45.402 45.402", width: "1em", height: "1em", children: /* @__PURE__ */ jsx(
50
+ var AutocompletePlusIcon = () => /* @__PURE__ */ jsx("svg", { height: "1em", viewBox: "0 0 45.402 45.402", width: "1em", children: /* @__PURE__ */ jsx(
51
51
  "path",
52
52
  {
53
- fill: "currentColor",
54
- 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"
53
+ 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",
54
+ fill: "currentColor"
55
55
  }
56
56
  ) });
57
57
  AutocompletePlusIcon.displayName = "AutocompletePlusIcon";
@@ -60,4 +60,4 @@ AutocompletePlusIcon.__ui__ = "AutocompletePlusIcon";
60
60
  export {
61
61
  AutocompleteCreate
62
62
  };
63
- //# sourceMappingURL=chunk-Q2HZVVOI.mjs.map
63
+ //# sourceMappingURL=chunk-I4IW2CW7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/autocomplete-create.tsx"],"sourcesContent":["import type { CSSUIObject, FC, HTMLUIProps } from \"@yamada-ui/core\"\nimport type { ReactElement } from \"react\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { cx, runIfFunc } from \"@yamada-ui/utils\"\nimport { useAutocompleteContext } from \"./autocomplete-context\"\nimport { AutocompleteItemIcon } from \"./autocomplete-icon\"\nimport { useAutocompleteCreate } from \"./use-autocomplete-option\"\n\ninterface AutocompleteCreateOptions {\n /**\n * The label of the autocomplete create option.\n */\n children?: ((inputValue: string) => string) | string\n /**\n * The autocomplete create option icon to use.\n */\n icon?: null | ReactElement\n}\n\nexport interface AutocompleteCreateProps\n extends Omit<HTMLUIProps<\"li\">, \"children\">,\n AutocompleteCreateOptions {}\n\nexport const AutocompleteCreate = forwardRef<AutocompleteCreateProps, \"li\">(\n ({ className, children, icon, ...rest }, ref) => {\n const { inputValue, styles } = useAutocompleteContext()\n const { getCreateProps } = useAutocompleteCreate()\n\n children ??= inputValue\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n color: \"inherit\",\n display: \"flex\",\n flex: \"0 0 auto\",\n gap: \"0.75rem\",\n outline: 0,\n textAlign: \"start\",\n textDecoration: \"none\",\n userSelect: \"none\",\n width: \"100%\",\n ...styles.item,\n }\n\n return (\n <ui.li\n className={cx(\"ui-autocomplete__item--create\", className)}\n __css={css}\n {...getCreateProps(rest, ref)}\n >\n {icon !== null ? (\n <AutocompleteItemIcon>\n {icon || <AutocompletePlusIcon />}\n </AutocompleteItemIcon>\n ) : null}\n {icon ? (\n <ui.span style={{ flex: 1, pointerEvents: \"none\" }} lineClamp={1}>\n {runIfFunc(children, inputValue)}\n </ui.span>\n ) : (\n runIfFunc(children, inputValue)\n )}\n </ui.li>\n )\n },\n)\n\nAutocompleteCreate.displayName = \"AutocompleteCreate\"\nAutocompleteCreate.__ui__ = \"AutocompleteCreate\"\n\nconst AutocompletePlusIcon: FC = () => (\n <svg height=\"1em\" viewBox=\"0 0 45.402 45.402\" width=\"1em\">\n <path\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n)\n\nAutocompletePlusIcon.displayName = \"AutocompletePlusIcon\"\nAutocompletePlusIcon.__ui__ = \"AutocompletePlusIcon\"\n"],"mappings":";;;;;;;;;;;;AAEA,SAAS,YAAY,UAAU;AAC/B,SAAS,IAAI,iBAAiB;AA0CxB,SAOe,KAPf;AAtBC,IAAM,qBAAqB;AAAA,EAChC,CAAC,EAAE,WAAW,UAAU,MAAM,GAAG,KAAK,GAAG,QAAQ;AAC/C,UAAM,EAAE,YAAY,OAAO,IAAI,uBAAuB;AACtD,UAAM,EAAE,eAAe,IAAI,sBAAsB;AAEjD,6CAAa;AAEb,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,SAAS;AAAA,MACT,MAAM;AAAA,MACN,KAAK;AAAA,MACL,SAAS;AAAA,MACT,WAAW;AAAA,MACX,gBAAgB;AAAA,MAChB,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,GAAG,OAAO;AAAA,IACZ;AAEA,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC,WAAW,GAAG,iCAAiC,SAAS;AAAA,QACxD,OAAO;AAAA,QACN,GAAG,eAAe,MAAM,GAAG;AAAA,QAE3B;AAAA,mBAAS,OACR,oBAAC,wBACE,kBAAQ,oBAAC,wBAAqB,GACjC,IACE;AAAA,UACH,OACC,oBAAC,GAAG,MAAH,EAAQ,OAAO,EAAE,MAAM,GAAG,eAAe,OAAO,GAAG,WAAW,GAC5D,oBAAU,UAAU,UAAU,GACjC,IAEA,UAAU,UAAU,UAAU;AAAA;AAAA;AAAA,IAElC;AAAA,EAEJ;AACF;AAEA,mBAAmB,cAAc;AACjC,mBAAmB,SAAS;AAE5B,IAAM,uBAA2B,MAC/B,oBAAC,SAAI,QAAO,OAAM,SAAQ,qBAAoB,OAAM,OAClD;AAAA,EAAC;AAAA;AAAA,IACC,GAAE;AAAA,IACF,MAAK;AAAA;AACP,GACF;AAGF,qBAAqB,cAAc;AACnC,qBAAqB,SAAS;","names":[]}
@@ -1,10 +1,10 @@
1
1
  "use client"
2
2
  import {
3
3
  useAutocompleteContext
4
- } from "./chunk-JPUKYLBW.mjs";
4
+ } from "./chunk-WDQYM4FP.mjs";
5
5
 
6
6
  // src/autocomplete-icon.tsx
7
- import { ui, forwardRef } from "@yamada-ui/core";
7
+ import { forwardRef, ui } from "@yamada-ui/core";
8
8
  import { ChevronIcon, CloseIcon } from "@yamada-ui/icon";
9
9
  import { useClickable } from "@yamada-ui/use-clickable";
10
10
  import { cx, getValidChildren, isValidElement } from "@yamada-ui/utils";
@@ -14,27 +14,27 @@ var AutocompleteIcon = forwardRef(
14
14
  ({ className, children, __css, ...rest }, ref) => {
15
15
  const { styles } = useAutocompleteContext();
16
16
  const css = {
17
- position: "absolute",
18
- top: "50%",
19
- transform: "translateY(-50%)",
20
- display: "inline-flex",
21
17
  alignItems: "center",
18
+ cursor: "pointer",
19
+ display: "inline-flex",
22
20
  justifyContent: "center",
23
21
  pointerEvents: "none",
24
- cursor: "pointer",
22
+ position: "absolute",
23
+ top: "50%",
24
+ transform: "translateY(-50%)",
25
25
  ...styles.icon,
26
26
  ...__css
27
27
  };
28
28
  const validChildren = getValidChildren(children);
29
29
  const cloneChildren = validChildren.map(
30
30
  (child) => cloneElement(child, {
31
- focusable: false,
32
- "aria-hidden": true,
33
31
  style: {
34
- maxWidth: "1em",
32
+ color: "currentColor",
35
33
  maxHeight: "1em",
36
- color: "currentColor"
37
- }
34
+ maxWidth: "1em"
35
+ },
36
+ focusable: false,
37
+ "aria-hidden": true
38
38
  })
39
39
  );
40
40
  return /* @__PURE__ */ jsx(
@@ -67,11 +67,11 @@ var AutocompleteClearIcon = ({
67
67
  return /* @__PURE__ */ jsx(
68
68
  AutocompleteIcon,
69
69
  {
70
- "aria-label": "Clear value",
71
70
  className: cx("ui-autocomplete__icon--clear", className),
71
+ "aria-label": "Clear value",
72
72
  __css: styles.clearIcon,
73
73
  ...rest,
74
- children: children != null ? children : /* @__PURE__ */ jsx(CloseIcon, { w: "0.5em", h: "0.5em" })
74
+ children: children != null ? children : /* @__PURE__ */ jsx(CloseIcon, { h: "0.5em", w: "0.5em" })
75
75
  }
76
76
  );
77
77
  };
@@ -80,11 +80,11 @@ AutocompleteClearIcon.__ui__ = "AutocompleteClearIcon";
80
80
  var AutocompleteItemIcon = forwardRef(({ className, ...rest }, ref) => {
81
81
  const { styles } = useAutocompleteContext();
82
82
  const css = {
83
- flexShrink: 0,
84
- display: "inline-flex",
85
- justifyContent: "center",
86
83
  alignItems: "center",
84
+ display: "inline-flex",
85
+ flexShrink: 0,
87
86
  fontSize: "0.85em",
87
+ justifyContent: "center",
88
88
  ...styles.itemIcon
89
89
  };
90
90
  return /* @__PURE__ */ jsx(
@@ -105,4 +105,4 @@ export {
105
105
  AutocompleteClearIcon,
106
106
  AutocompleteItemIcon
107
107
  };
108
- //# sourceMappingURL=chunk-7SWSKLSA.mjs.map
108
+ //# sourceMappingURL=chunk-I5X4WSCX.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/autocomplete-icon.tsx"],"sourcesContent":["import type { CSSUIObject, FC, HTMLUIProps } from \"@yamada-ui/core\"\nimport type { HTMLAttributes } from \"react\"\nimport { forwardRef, ui } from \"@yamada-ui/core\"\nimport { ChevronIcon, CloseIcon } from \"@yamada-ui/icon\"\nimport { useClickable } from \"@yamada-ui/use-clickable\"\nimport { cx, getValidChildren, isValidElement } from \"@yamada-ui/utils\"\nimport { cloneElement, useRef } from \"react\"\nimport { useAutocompleteContext } from \"./autocomplete-context\"\n\nexport interface AutocompleteIconProps extends HTMLUIProps {}\n\nexport const AutocompleteIcon = forwardRef<AutocompleteIconProps, \"div\">(\n ({ className, children, __css, ...rest }, ref) => {\n const { styles } = useAutocompleteContext()\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n cursor: \"pointer\",\n display: \"inline-flex\",\n justifyContent: \"center\",\n pointerEvents: \"none\",\n position: \"absolute\",\n top: \"50%\",\n transform: \"translateY(-50%)\",\n ...styles.icon,\n ...__css,\n }\n\n const validChildren = getValidChildren(children)\n\n const cloneChildren = validChildren.map((child) =>\n cloneElement(child, {\n style: {\n color: \"currentColor\",\n maxHeight: \"1em\",\n maxWidth: \"1em\",\n },\n focusable: false,\n \"aria-hidden\": true,\n }),\n )\n\n return (\n <ui.div\n ref={ref}\n className={cx(\"ui-autocomplete__icon\", className)}\n __css={css}\n {...rest}\n >\n {isValidElement(children) ? cloneChildren : <ChevronIcon />}\n </ui.div>\n )\n },\n)\n\nAutocompleteIcon.displayName = \"AutocompleteIcon\"\nAutocompleteIcon.__ui__ = \"AutocompleteIcon\"\n\nexport interface AutocompleteClearIconProps extends AutocompleteIconProps {\n disabled?: boolean\n}\n\nexport const AutocompleteClearIcon: FC<AutocompleteClearIconProps> = ({\n className,\n children,\n ...props\n}) => {\n const ref = useRef<HTMLDivElement>(null)\n const { styles } = useAutocompleteContext()\n\n const isDisabled = props.disabled\n\n const rest = useClickable({\n ref,\n isDisabled,\n ...(props as HTMLAttributes<HTMLElement>),\n })\n\n return (\n <AutocompleteIcon\n className={cx(\"ui-autocomplete__icon--clear\", className)}\n aria-label=\"Clear value\"\n __css={styles.clearIcon}\n {...rest}\n >\n {children ?? <CloseIcon h=\"0.5em\" w=\"0.5em\" />}\n </AutocompleteIcon>\n )\n}\n\nAutocompleteClearIcon.displayName = \"AutocompleteClearIcon\"\nAutocompleteClearIcon.__ui__ = \"AutocompleteClearIcon\"\n\nexport interface AutocompleteItemIconProps extends HTMLUIProps<\"span\"> {}\n\nexport const AutocompleteItemIcon = forwardRef<\n AutocompleteItemIconProps,\n \"span\"\n>(({ className, ...rest }, ref) => {\n const { styles } = useAutocompleteContext()\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"inline-flex\",\n flexShrink: 0,\n fontSize: \"0.85em\",\n justifyContent: \"center\",\n ...styles.itemIcon,\n }\n\n return (\n <ui.span\n ref={ref}\n className={cx(\"ui-autocomplete__item__icon\", className)}\n __css={css}\n {...rest}\n />\n )\n})\n\nAutocompleteItemIcon.displayName = \"AutocompleteItemIcon\"\nAutocompleteItemIcon.__ui__ = \"AutocompleteItemIcon\"\n"],"mappings":";;;;;;AAEA,SAAS,YAAY,UAAU;AAC/B,SAAS,aAAa,iBAAiB;AACvC,SAAS,oBAAoB;AAC7B,SAAS,IAAI,kBAAkB,sBAAsB;AACrD,SAAS,cAAc,cAAc;AA2Ce;AAtC7C,IAAM,mBAAmB;AAAA,EAC9B,CAAC,EAAE,WAAW,UAAU,OAAO,GAAG,KAAK,GAAG,QAAQ;AAChD,UAAM,EAAE,OAAO,IAAI,uBAAuB;AAE1C,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,gBAAgB;AAAA,MAChB,eAAe;AAAA,MACf,UAAU;AAAA,MACV,KAAK;AAAA,MACL,WAAW;AAAA,MACX,GAAG,OAAO;AAAA,MACV,GAAG;AAAA,IACL;AAEA,UAAM,gBAAgB,iBAAiB,QAAQ;AAE/C,UAAM,gBAAgB,cAAc;AAAA,MAAI,CAAC,UACvC,aAAa,OAAO;AAAA,QAClB,OAAO;AAAA,UACL,OAAO;AAAA,UACP,WAAW;AAAA,UACX,UAAU;AAAA,QACZ;AAAA,QACA,WAAW;AAAA,QACX,eAAe;AAAA,MACjB,CAAC;AAAA,IACH;AAEA,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,WAAW,GAAG,yBAAyB,SAAS;AAAA,QAChD,OAAO;AAAA,QACN,GAAG;AAAA,QAEH,yBAAe,QAAQ,IAAI,gBAAgB,oBAAC,eAAY;AAAA;AAAA,IAC3D;AAAA,EAEJ;AACF;AAEA,iBAAiB,cAAc;AAC/B,iBAAiB,SAAS;AAMnB,IAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,MAAM,OAAuB,IAAI;AACvC,QAAM,EAAE,OAAO,IAAI,uBAAuB;AAE1C,QAAM,aAAa,MAAM;AAEzB,QAAM,OAAO,aAAa;AAAA,IACxB;AAAA,IACA;AAAA,IACA,GAAI;AAAA,EACN,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,gCAAgC,SAAS;AAAA,MACvD,cAAW;AAAA,MACX,OAAO,OAAO;AAAA,MACb,GAAG;AAAA,MAEH,wCAAY,oBAAC,aAAU,GAAE,SAAQ,GAAE,SAAQ;AAAA;AAAA,EAC9C;AAEJ;AAEA,sBAAsB,cAAc;AACpC,sBAAsB,SAAS;AAIxB,IAAM,uBAAuB,WAGlC,CAAC,EAAE,WAAW,GAAG,KAAK,GAAG,QAAQ;AACjC,QAAM,EAAE,OAAO,IAAI,uBAAuB;AAE1C,QAAM,MAAmB;AAAA,IACvB,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,GAAG,OAAO;AAAA,EACZ;AAEA,SACE;AAAA,IAAC,GAAG;AAAA,IAAH;AAAA,MACC;AAAA,MACA,WAAW,GAAG,+BAA+B,SAAS;AAAA,MACtD,OAAO;AAAA,MACN,GAAG;AAAA;AAAA,EACN;AAEJ,CAAC;AAED,qBAAqB,cAAc;AACnC,qBAAqB,SAAS;","names":[]}
@@ -2,31 +2,31 @@
2
2
  import {
3
3
  useAutocomplete,
4
4
  useAutocompleteInput
5
- } from "./chunk-OLOU5HFC.mjs";
5
+ } from "./chunk-4APEPTYJ.mjs";
6
6
  import {
7
7
  AutocompleteCreate
8
- } from "./chunk-Q2HZVVOI.mjs";
8
+ } from "./chunk-I4IW2CW7.mjs";
9
9
  import {
10
10
  AutocompleteEmpty
11
- } from "./chunk-5GKGL6BL.mjs";
11
+ } from "./chunk-2MVSDK7L.mjs";
12
12
  import {
13
13
  AutocompleteList
14
- } from "./chunk-S53LMDD7.mjs";
14
+ } from "./chunk-VTBUO5SK.mjs";
15
15
  import {
16
16
  AutocompleteIcon
17
- } from "./chunk-7SWSKLSA.mjs";
17
+ } from "./chunk-I5X4WSCX.mjs";
18
18
  import {
19
19
  AutocompleteDescendantsContextProvider,
20
20
  AutocompleteProvider,
21
21
  useAutocompleteContext
22
- } from "./chunk-JPUKYLBW.mjs";
22
+ } from "./chunk-WDQYM4FP.mjs";
23
23
 
24
24
  // src/autocomplete.tsx
25
25
  import {
26
- ui,
27
26
  forwardRef,
28
- useComponentMultiStyle,
29
- omitThemeProps
27
+ omitThemeProps,
28
+ ui,
29
+ useComponentMultiStyle
30
30
  } from "@yamada-ui/core";
31
31
  import { Popover, PopoverTrigger } from "@yamada-ui/popover";
32
32
  import { Portal } from "@yamada-ui/portal";
@@ -37,46 +37,46 @@ var Autocomplete = forwardRef(
37
37
  const [styles, mergedProps] = useComponentMultiStyle("Autocomplete", props);
38
38
  let {
39
39
  className,
40
- defaultValue = "",
40
+ children,
41
41
  color,
42
+ defaultValue = "",
43
+ footer,
42
44
  h,
45
+ header,
43
46
  height,
44
47
  minH,
45
48
  minHeight,
46
49
  containerProps,
47
50
  contentProps,
48
- listProps,
51
+ createProps,
52
+ emptyProps,
49
53
  fieldProps,
50
- inputProps,
51
54
  iconProps,
55
+ inputProps,
56
+ listProps,
52
57
  portalProps = { isDisabled: true },
53
- createProps,
54
- emptyProps,
55
- header,
56
- footer,
57
- children,
58
58
  ...computedProps
59
59
  } = omitThemeProps(mergedProps);
60
60
  const {
61
- value,
62
- onClose,
61
+ allowCreate,
62
+ computedChildren,
63
63
  descendants,
64
+ inputValue,
65
+ isEmpty,
66
+ value,
64
67
  formControlProps,
65
- getPopoverProps,
66
68
  getContainerProps,
67
69
  getFieldProps,
68
- allowCreate,
69
- isEmpty,
70
- inputValue,
71
- computedChildren,
70
+ getPopoverProps,
71
+ onClose,
72
72
  ...rest
73
- } = useAutocomplete({ ...computedProps, defaultValue, children });
73
+ } = useAutocomplete({ ...computedProps, children, defaultValue });
74
74
  h != null ? h : h = height;
75
75
  minH != null ? minH : minH = minHeight;
76
76
  const css = {
77
- w: "100%",
78
- h: "fit-content",
79
77
  color,
78
+ h: "fit-content",
79
+ w: "100%",
80
80
  ...styles.container
81
81
  };
82
82
  return /* @__PURE__ */ jsx(AutocompleteDescendantsContextProvider, { value: descendants, children: /* @__PURE__ */ jsx(
@@ -84,13 +84,13 @@ var Autocomplete = forwardRef(
84
84
  {
85
85
  value: {
86
86
  ...rest,
87
- value,
88
- onClose,
89
- formControlProps,
90
- inputValue,
91
87
  allowCreate,
88
+ inputValue,
92
89
  isEmpty,
93
- styles
90
+ styles,
91
+ value,
92
+ formControlProps,
93
+ onClose
94
94
  },
95
95
  children: /* @__PURE__ */ jsx(Popover, { ...getPopoverProps(), children: /* @__PURE__ */ jsxs(
96
96
  ui.div,
@@ -121,8 +121,8 @@ var Autocomplete = forwardRef(
121
121
  !isEmpty ? /* @__PURE__ */ jsx(Portal, { ...portalProps, children: /* @__PURE__ */ jsxs(
122
122
  AutocompleteList,
123
123
  {
124
- header: runIfFunc(header, { value, onClose }),
125
124
  footer: runIfFunc(footer, { value, onClose }),
125
+ header: runIfFunc(header, { value, onClose }),
126
126
  contentProps,
127
127
  ...listProps,
128
128
  children: [
@@ -133,8 +133,8 @@ var Autocomplete = forwardRef(
133
133
  ) }) : /* @__PURE__ */ jsx(Portal, { ...portalProps, children: /* @__PURE__ */ jsx(
134
134
  AutocompleteList,
135
135
  {
136
- header: runIfFunc(header, { value, onClose }),
137
136
  footer: runIfFunc(footer, { value, onClose }),
137
+ header: runIfFunc(header, { value, onClose }),
138
138
  contentProps,
139
139
  ...listProps,
140
140
  children: allowCreate && inputValue ? /* @__PURE__ */ jsx(AutocompleteCreate, { ...createProps }) : /* @__PURE__ */ jsx(AutocompleteEmpty, { ...emptyProps })
@@ -151,14 +151,14 @@ Autocomplete.displayName = "Autocomplete";
151
151
  Autocomplete.__ui__ = "Autocomplete";
152
152
  var AutocompleteField = forwardRef(
153
153
  ({ className, h, minH, placeholder, inputProps, ...rest }, ref) => {
154
- const { label, inputValue, styles } = useAutocompleteContext();
154
+ const { inputValue, label, styles } = useAutocompleteContext();
155
155
  const { getInputProps } = useAutocompleteInput();
156
156
  const css = {
157
- pe: "2rem",
157
+ alignItems: "center",
158
+ display: "flex",
158
159
  h,
159
160
  minH,
160
- display: "flex",
161
- alignItems: "center",
161
+ pe: "2rem",
162
162
  ...styles.field,
163
163
  cursor: "text"
164
164
  };
@@ -173,8 +173,8 @@ var AutocompleteField = forwardRef(
173
173
  {
174
174
  className: "ui-autocomplete__field__input",
175
175
  display: "inline-block",
176
- w: "100%",
177
176
  placeholder,
177
+ w: "100%",
178
178
  ...getInputProps(
179
179
  { ...inputProps, value: inputValue || label || "" },
180
180
  ref
@@ -191,4 +191,4 @@ AutocompleteField.__ui__ = "AutocompleteField";
191
191
  export {
192
192
  Autocomplete
193
193
  };
194
- //# sourceMappingURL=chunk-HZECQUHV.mjs.map
194
+ //# sourceMappingURL=chunk-PXQD7AV2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/autocomplete.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport {\n ui,\n forwardRef,\n useComponentMultiStyle,\n omitThemeProps,\n} from \"@yamada-ui/core\"\nimport type { MotionProps } from \"@yamada-ui/motion\"\nimport { Popover, PopoverTrigger } from \"@yamada-ui/popover\"\nimport { Portal } from \"@yamada-ui/portal\"\nimport type { PortalProps } from \"@yamada-ui/portal\"\nimport { cx, runIfFunc } from \"@yamada-ui/utils\"\nimport type { FC, ReactNode } from \"react\"\nimport {\n AutocompleteDescendantsContextProvider,\n AutocompleteProvider,\n useAutocompleteContext,\n} from \"./autocomplete-context\"\nimport { AutocompleteCreate } from \"./autocomplete-create\"\nimport type { AutocompleteCreateProps } from \"./autocomplete-create\"\nimport { AutocompleteEmpty } from \"./autocomplete-empty\"\nimport type { AutocompleteEmptyProps } from \"./autocomplete-empty\"\nimport type { AutocompleteIconProps } from \"./autocomplete-icon\"\nimport { AutocompleteIcon } from \"./autocomplete-icon\"\nimport type { AutocompleteListProps } from \"./autocomplete-list\"\nimport { AutocompleteList } from \"./autocomplete-list\"\nimport type { UseAutocompleteProps } from \"./use-autocomplete\"\nimport { useAutocomplete, useAutocompleteInput } from \"./use-autocomplete\"\n\ninterface AutocompleteOptions {\n /**\n * The border color when the input is focused.\n */\n focusBorderColor?: string\n /**\n * The border color when the input is invalid.\n */\n errorBorderColor?: string\n /**\n * Props for autocomplete container element.\n */\n containerProps?: Omit<HTMLUIProps, \"children\">\n /**\n * Props for autocomplete content element.\n */\n contentProps?: Omit<MotionProps, \"children\">\n /**\n * Props for autocomplete list element.\n */\n listProps?: Omit<AutocompleteListProps, \"children\">\n /**\n * Props for autocomplete field element.\n */\n fieldProps?: Omit<AutocompleteFieldProps, \"inputProps\" | \"children\">\n /**\n * Props for autocomplete input element.\n */\n inputProps?: HTMLUIProps<\"input\">\n /**\n * Props for autocomplete icon element.\n */\n iconProps?: AutocompleteIconProps\n /**\n * Props to be forwarded to the portal component.\n *\n * @default '{ isDisabled: true }'\n */\n portalProps?: Omit<PortalProps, \"children\">\n /**\n * Props for autocomplete create element.\n */\n createProps?: Omit<AutocompleteCreateProps, \"children\">\n /**\n * Props for autocomplete empty element.\n */\n emptyProps?: Omit<AutocompleteEmptyProps, \"children\">\n /**\n * The header of the autocomplete content element.\n */\n header?: ReactNode | FC<{ value: string | undefined; onClose: () => void }>\n /**\n * The footer of the autocomplete content element.\n */\n footer?: ReactNode | FC<{ value: string | undefined; onClose: () => void }>\n}\n\nexport interface AutocompleteProps\n extends ThemeProps<\"Autocomplete\">,\n Omit<UseAutocompleteProps, \"maxSelectValues\" | \"omitSelectedValues\">,\n AutocompleteOptions {}\n\n/**\n * `Autocomplete` is a component used to display suggestions in response to user text input.\n *\n * @see Docs https://yamada-ui.com/components/forms/autocomplete\n */\nexport const Autocomplete = forwardRef<AutocompleteProps, \"input\">(\n (props, ref) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"Autocomplete\", props)\n let {\n className,\n defaultValue = \"\",\n color,\n h,\n height,\n minH,\n minHeight,\n containerProps,\n contentProps,\n listProps,\n fieldProps,\n inputProps,\n iconProps,\n portalProps = { isDisabled: true },\n createProps,\n emptyProps,\n header,\n footer,\n children,\n ...computedProps\n } = omitThemeProps(mergedProps)\n\n const {\n value,\n onClose,\n descendants,\n formControlProps,\n getPopoverProps,\n getContainerProps,\n getFieldProps,\n allowCreate,\n isEmpty,\n inputValue,\n computedChildren,\n ...rest\n } = useAutocomplete({ ...computedProps, defaultValue, children })\n\n h ??= height\n minH ??= minHeight\n\n const css: CSSUIObject = {\n w: \"100%\",\n h: \"fit-content\",\n color,\n ...styles.container,\n }\n\n return (\n <AutocompleteDescendantsContextProvider value={descendants}>\n <AutocompleteProvider\n value={{\n ...rest,\n value,\n onClose,\n formControlProps,\n inputValue,\n allowCreate,\n isEmpty,\n styles,\n }}\n >\n <Popover {...getPopoverProps()}>\n <ui.div\n className={cx(\"ui-autocomplete\", className)}\n __css={css}\n {...getContainerProps(containerProps)}\n >\n <ui.div\n className=\"ui-autocomplete__inner\"\n __css={{ position: \"relative\", ...styles.inner }}\n >\n <AutocompleteField\n h={h}\n minH={minH}\n inputProps={inputProps}\n {...getFieldProps(fieldProps, ref)}\n />\n\n <AutocompleteIcon {...iconProps} {...formControlProps} />\n </ui.div>\n\n {!isEmpty ? (\n <Portal {...portalProps}>\n <AutocompleteList\n header={runIfFunc(header, { value, onClose })}\n footer={runIfFunc(footer, { value, onClose })}\n contentProps={contentProps}\n {...listProps}\n >\n {allowCreate ? (\n <AutocompleteCreate {...createProps} />\n ) : (\n <AutocompleteEmpty {...emptyProps} />\n )}\n\n {children ?? computedChildren}\n </AutocompleteList>\n </Portal>\n ) : (\n <Portal {...portalProps}>\n <AutocompleteList\n header={runIfFunc(header, { value, onClose })}\n footer={runIfFunc(footer, { value, onClose })}\n contentProps={contentProps}\n {...listProps}\n >\n {allowCreate && inputValue ? (\n <AutocompleteCreate {...createProps} />\n ) : (\n <AutocompleteEmpty {...emptyProps} />\n )}\n </AutocompleteList>\n </Portal>\n )}\n </ui.div>\n </Popover>\n </AutocompleteProvider>\n </AutocompleteDescendantsContextProvider>\n )\n },\n)\n\nAutocomplete.displayName = \"Autocomplete\"\nAutocomplete.__ui__ = \"Autocomplete\"\n\ninterface AutocompleteFieldProps\n extends HTMLUIProps,\n Pick<AutocompleteProps, \"inputProps\"> {}\n\nconst AutocompleteField = forwardRef<AutocompleteFieldProps, \"input\">(\n ({ className, h, minH, placeholder, inputProps, ...rest }, ref) => {\n const { label, inputValue, styles } = useAutocompleteContext()\n const { getInputProps } = useAutocompleteInput()\n\n const css: CSSUIObject = {\n pe: \"2rem\",\n h,\n minH,\n display: \"flex\",\n alignItems: \"center\",\n ...styles.field,\n cursor: \"text\",\n }\n\n return (\n <PopoverTrigger>\n <ui.div\n className={cx(\"ui-autocomplete__field\", className)}\n __css={css}\n {...rest}\n >\n <ui.input\n className=\"ui-autocomplete__field__input\"\n display=\"inline-block\"\n w=\"100%\"\n placeholder={placeholder}\n {...getInputProps(\n { ...inputProps, value: inputValue || label || \"\" },\n ref,\n )}\n />\n </ui.div>\n </PopoverTrigger>\n )\n },\n)\n\nAutocompleteField.displayName = \"AutocompleteField\"\nAutocompleteField.__ui__ = \"AutocompleteField\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,SAAS,sBAAsB;AACxC,SAAS,cAAc;AAEvB,SAAS,IAAI,iBAAiB;AA4JhB,SAIE,KAJF;AAvEP,IAAM,eAAe;AAAA,EAC1B,CAAC,OAAO,QAAQ;AACd,UAAM,CAAC,QAAQ,WAAW,IAAI,uBAAuB,gBAAgB,KAAK;AAC1E,QAAI;AAAA,MACF;AAAA,MACA,eAAe;AAAA,M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;AAAA,QACjD,OAAO;AAAA,QACN,GAAG;AAAA,QAEJ;AAAA,UAAC,GAAG;AAAA,UAAH;AAAA,YACC,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,GAAE;AAAA,YACF;AAAA,YACC,GAAG;AAAA,cACF,EAAE,GAAG,YAAY,OAAO,cAAc,SAAS,GAAG;AAAA,cAClD;AAAA,YACF;AAAA;AAAA,QACF;AAAA;AAAA,IACF,GACF;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;AAChC,kBAAkB,SAAS;","names":[]}
1
+ {"version":3,"sources":["../src/autocomplete.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport type { MotionProps } from \"@yamada-ui/motion\"\nimport type { PortalProps } from \"@yamada-ui/portal\"\nimport type { FC, ReactNode } from \"react\"\nimport type { AutocompleteCreateProps } from \"./autocomplete-create\"\nimport type { AutocompleteEmptyProps } from \"./autocomplete-empty\"\nimport type { AutocompleteIconProps } from \"./autocomplete-icon\"\nimport type { AutocompleteListProps } from \"./autocomplete-list\"\nimport type { UseAutocompleteProps } from \"./use-autocomplete\"\nimport {\n forwardRef,\n omitThemeProps,\n ui,\n useComponentMultiStyle,\n} from \"@yamada-ui/core\"\nimport { Popover, PopoverTrigger } from \"@yamada-ui/popover\"\nimport { Portal } from \"@yamada-ui/portal\"\nimport { cx, runIfFunc } from \"@yamada-ui/utils\"\nimport {\n AutocompleteDescendantsContextProvider,\n AutocompleteProvider,\n useAutocompleteContext,\n} from \"./autocomplete-context\"\nimport { AutocompleteCreate } from \"./autocomplete-create\"\nimport { AutocompleteEmpty } from \"./autocomplete-empty\"\nimport { AutocompleteIcon } from \"./autocomplete-icon\"\nimport { AutocompleteList } from \"./autocomplete-list\"\nimport { useAutocomplete, useAutocompleteInput } from \"./use-autocomplete\"\n\ninterface AutocompleteOptions {\n /**\n * The border color when the input is invalid.\n */\n errorBorderColor?: string\n /**\n * The border color when the input is focused.\n */\n focusBorderColor?: string\n /**\n * The footer of the autocomplete content element.\n */\n footer?: FC<{ value: string | undefined; onClose: () => void }> | ReactNode\n /**\n * The header of the autocomplete content element.\n */\n header?: FC<{ value: string | undefined; onClose: () => void }> | ReactNode\n /**\n * Props for autocomplete container element.\n */\n containerProps?: Omit<HTMLUIProps, \"children\">\n /**\n * Props for autocomplete content element.\n */\n contentProps?: Omit<MotionProps, \"children\">\n /**\n * Props for autocomplete create element.\n */\n createProps?: Omit<AutocompleteCreateProps, \"children\">\n /**\n * Props for autocomplete empty element.\n */\n emptyProps?: Omit<AutocompleteEmptyProps, \"children\">\n /**\n * Props for autocomplete field element.\n */\n fieldProps?: Omit<AutocompleteFieldProps, \"children\" | \"inputProps\">\n /**\n * Props for autocomplete icon element.\n */\n iconProps?: AutocompleteIconProps\n /**\n * Props for autocomplete input element.\n */\n inputProps?: HTMLUIProps<\"input\">\n /**\n * Props for autocomplete list element.\n */\n listProps?: Omit<AutocompleteListProps, \"children\">\n /**\n * Props to be forwarded to the portal component.\n *\n * @default '{ isDisabled: true }'\n */\n portalProps?: Omit<PortalProps, \"children\">\n}\n\nexport interface AutocompleteProps\n extends ThemeProps<\"Autocomplete\">,\n Omit<UseAutocompleteProps, \"maxSelectValues\" | \"omitSelectedValues\">,\n AutocompleteOptions {}\n\n/**\n * `Autocomplete` is a component used to display suggestions in response to user text input.\n *\n * @see Docs https://yamada-ui.com/components/forms/autocomplete\n */\nexport const Autocomplete = forwardRef<AutocompleteProps, \"input\">(\n (props, ref) => {\n const [styles, mergedProps] = useComponentMultiStyle(\"Autocomplete\", props)\n let {\n className,\n children,\n color,\n defaultValue = \"\",\n footer,\n h,\n header,\n height,\n minH,\n minHeight,\n containerProps,\n contentProps,\n createProps,\n emptyProps,\n fieldProps,\n iconProps,\n inputProps,\n listProps,\n portalProps = { isDisabled: true },\n ...computedProps\n } = omitThemeProps(mergedProps)\n\n const {\n allowCreate,\n computedChildren,\n descendants,\n inputValue,\n isEmpty,\n value,\n formControlProps,\n getContainerProps,\n getFieldProps,\n getPopoverProps,\n onClose,\n ...rest\n } = useAutocomplete({ ...computedProps, children, defaultValue })\n\n h ??= height\n minH ??= minHeight\n\n const css: CSSUIObject = {\n color,\n h: \"fit-content\",\n w: \"100%\",\n ...styles.container,\n }\n\n return (\n <AutocompleteDescendantsContextProvider value={descendants}>\n <AutocompleteProvider\n value={{\n ...rest,\n allowCreate,\n inputValue,\n isEmpty,\n styles,\n value,\n formControlProps,\n onClose,\n }}\n >\n <Popover {...getPopoverProps()}>\n <ui.div\n className={cx(\"ui-autocomplete\", className)}\n __css={css}\n {...getContainerProps(containerProps)}\n >\n <ui.div\n className=\"ui-autocomplete__inner\"\n __css={{ position: \"relative\", ...styles.inner }}\n >\n <AutocompleteField\n h={h}\n minH={minH}\n inputProps={inputProps}\n {...getFieldProps(fieldProps, ref)}\n />\n\n <AutocompleteIcon {...iconProps} {...formControlProps} />\n </ui.div>\n\n {!isEmpty ? (\n <Portal {...portalProps}>\n <AutocompleteList\n footer={runIfFunc(footer, { value, onClose })}\n header={runIfFunc(header, { value, onClose })}\n contentProps={contentProps}\n {...listProps}\n >\n {allowCreate ? (\n <AutocompleteCreate {...createProps} />\n ) : (\n <AutocompleteEmpty {...emptyProps} />\n )}\n\n {children ?? computedChildren}\n </AutocompleteList>\n </Portal>\n ) : (\n <Portal {...portalProps}>\n <AutocompleteList\n footer={runIfFunc(footer, { value, onClose })}\n header={runIfFunc(header, { value, onClose })}\n contentProps={contentProps}\n {...listProps}\n >\n {allowCreate && inputValue ? (\n <AutocompleteCreate {...createProps} />\n ) : (\n <AutocompleteEmpty {...emptyProps} />\n )}\n </AutocompleteList>\n </Portal>\n )}\n </ui.div>\n </Popover>\n </AutocompleteProvider>\n </AutocompleteDescendantsContextProvider>\n )\n },\n)\n\nAutocomplete.displayName = \"Autocomplete\"\nAutocomplete.__ui__ = \"Autocomplete\"\n\ninterface AutocompleteFieldProps\n extends HTMLUIProps,\n Pick<AutocompleteProps, \"inputProps\"> {}\n\nconst AutocompleteField = forwardRef<AutocompleteFieldProps, \"input\">(\n ({ className, h, minH, placeholder, inputProps, ...rest }, ref) => {\n const { inputValue, label, styles } = useAutocompleteContext()\n const { getInputProps } = useAutocompleteInput()\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n h,\n minH,\n pe: \"2rem\",\n ...styles.field,\n cursor: \"text\",\n }\n\n return (\n <PopoverTrigger>\n <ui.div\n className={cx(\"ui-autocomplete__field\", className)}\n __css={css}\n {...rest}\n >\n <ui.input\n className=\"ui-autocomplete__field__input\"\n display=\"inline-block\"\n placeholder={placeholder}\n w=\"100%\"\n {...getInputProps(\n { ...inputProps, value: inputValue || label || \"\" },\n ref,\n )}\n />\n </ui.div>\n </PopoverTrigger>\n )\n },\n)\n\nAutocompleteField.displayName = \"AutocompleteField\"\nAutocompleteField.__ui__ = \"AutocompleteField\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AASA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,SAAS,sBAAsB;AACxC,SAAS,cAAc;AACvB,SAAS,IAAI,iBAAiB;AAsJhB,SAIE,KAJF;AAvEP,IAAM,eAAe;AAAA,EAC1B,CAAC,OAAO,QAAQ;AACd,UAAM,CAAC,QAAQ,WAAW,IAAI,uBAAuB,gBAAgB,KAAK;AAC1E,QAAI;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,MACA,eAAe;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAc,EAAE,YAAY,KAAK;AAAA,MACjC,GAAG;AAAA,IACL,IAAI,eAAe,WAAW;AAE9B,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,M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