@yamada-ui/react 2.2.1-dev-20260412142743 → 2.2.1-dev-20260412143439

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/dist/cjs/components/select/select.cjs +9 -19
  2. package/dist/cjs/components/select/select.cjs.map +1 -1
  3. package/dist/esm/components/select/select.js +9 -19
  4. package/dist/esm/components/select/select.js.map +1 -1
  5. package/dist/types/components/accordion/accordion.d.ts +2 -2
  6. package/dist/types/components/accordion/accordion.style.d.ts +1 -1
  7. package/dist/types/components/accordion/use-accordion.d.ts +11 -11
  8. package/dist/types/components/action-bar/action-bar.d.ts +2 -2
  9. package/dist/types/components/airy/airy.d.ts +2 -2
  10. package/dist/types/components/alert/alert.d.ts +2 -2
  11. package/dist/types/components/alert/alert.style.d.ts +1 -1
  12. package/dist/types/components/alpha-slider/alpha-slider.d.ts +2 -2
  13. package/dist/types/components/aspect-ratio/aspect-ratio.d.ts +2 -2
  14. package/dist/types/components/autocomplete/autocomplete.d.ts +2 -2
  15. package/dist/types/components/autocomplete/autocomplete.style.d.ts +1 -1
  16. package/dist/types/components/autocomplete/use-autocomplete.d.ts +5 -5
  17. package/dist/types/components/avatar/avatar.d.ts +5 -5
  18. package/dist/types/components/avatar/use-avatar-group.d.ts +2 -2
  19. package/dist/types/components/badge/badge.d.ts +2 -2
  20. package/dist/types/components/bleed/bleed.d.ts +2 -2
  21. package/dist/types/components/blockquote/blockquote.d.ts +2 -2
  22. package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
  23. package/dist/types/components/breadcrumb/breadcrumb.style.d.ts +1 -1
  24. package/dist/types/components/breadcrumb/use-breadcrumb.d.ts +2 -2
  25. package/dist/types/components/button/button.d.ts +2 -2
  26. package/dist/types/components/button/icon-button.d.ts +2 -2
  27. package/dist/types/components/calendar/calendar.d.ts +2 -2
  28. package/dist/types/components/calendar/calendar.style.d.ts +2 -2
  29. package/dist/types/components/calendar/use-calendar.d.ts +8 -8
  30. package/dist/types/components/card/card.d.ts +2 -2
  31. package/dist/types/components/carousel/carousel.d.ts +2 -2
  32. package/dist/types/components/carousel/carousel.style.d.ts +2 -2
  33. package/dist/types/components/carousel/use-carousel.d.ts +3 -3
  34. package/dist/types/components/center/center.d.ts +2 -2
  35. package/dist/types/components/chart/area-chart.d.ts +2 -2
  36. package/dist/types/components/chart/bar-chart.d.ts +2 -2
  37. package/dist/types/components/chart/chart.d.ts +5 -5
  38. package/dist/types/components/chart/composed-chart.d.ts +2 -2
  39. package/dist/types/components/chart/donut-chart.d.ts +2 -2
  40. package/dist/types/components/chart/line-chart.d.ts +2 -2
  41. package/dist/types/components/chart/pie-chart.d.ts +2 -2
  42. package/dist/types/components/chart/radar-chart.d.ts +2 -2
  43. package/dist/types/components/chart/use-chart.d.ts +2 -2
  44. package/dist/types/components/checkbox/checkbox.d.ts +4 -4
  45. package/dist/types/components/checkbox/use-checkbox-group.d.ts +2 -2
  46. package/dist/types/components/checkbox-card/checkbox-card.d.ts +5 -5
  47. package/dist/types/components/checkbox-card/checkbox-card.style.d.ts +1 -1
  48. package/dist/types/components/circle-progress/circle-progress.d.ts +2 -2
  49. package/dist/types/components/close-button/close-button.d.ts +2 -2
  50. package/dist/types/components/code/code.d.ts +2 -2
  51. package/dist/types/components/collapse/collapse.d.ts +2 -2
  52. package/dist/types/components/color-picker/color-picker.d.ts +2 -2
  53. package/dist/types/components/color-picker/use-color-picker.d.ts +2 -2
  54. package/dist/types/components/color-selector/color-selector.d.ts +2 -2
  55. package/dist/types/components/color-selector/use-color-selector.d.ts +3 -3
  56. package/dist/types/components/color-swatch/color-swatch.d.ts +2 -2
  57. package/dist/types/components/container/container.d.ts +2 -2
  58. package/dist/types/components/data-list/data-list.d.ts +2 -2
  59. package/dist/types/components/data-list/data-list.style.d.ts +1 -1
  60. package/dist/types/components/date-picker/date-picker.d.ts +2 -2
  61. package/dist/types/components/date-picker/use-date-picker.d.ts +4 -4
  62. package/dist/types/components/drawer/drawer.d.ts +2 -2
  63. package/dist/types/components/dropzone/dropzone.d.ts +5 -5
  64. package/dist/types/components/dropzone/dropzone.style.d.ts +1 -1
  65. package/dist/types/components/editable/editable.d.ts +4 -4
  66. package/dist/types/components/editable/use-editable.d.ts +2 -2
  67. package/dist/types/components/em/em.d.ts +2 -2
  68. package/dist/types/components/empty-state/empty-state.d.ts +2 -2
  69. package/dist/types/components/empty-state/empty-state.style.d.ts +2 -2
  70. package/dist/types/components/fade/fade.d.ts +2 -2
  71. package/dist/types/components/field/field.d.ts +3 -3
  72. package/dist/types/components/field/use-field-props.d.ts +3 -3
  73. package/dist/types/components/fieldset/fieldset.d.ts +3 -3
  74. package/dist/types/components/file-button/file-button.d.ts +2 -2
  75. package/dist/types/components/file-button/use-file-button.d.ts +18 -18
  76. package/dist/types/components/file-input/file-input.d.ts +2 -2
  77. package/dist/types/components/file-input/use-file-input.d.ts +15 -15
  78. package/dist/types/components/flex/flex.d.ts +2 -2
  79. package/dist/types/components/flip/flip.d.ts +4 -4
  80. package/dist/types/components/flip/flip.style.d.ts +1 -1
  81. package/dist/types/components/float/float.d.ts +2 -2
  82. package/dist/types/components/form/form.d.ts +3 -3
  83. package/dist/types/components/form/form.style.d.ts +1 -1
  84. package/dist/types/components/format/format-byte.d.ts +2 -2
  85. package/dist/types/components/format/format-date-time.d.ts +2 -2
  86. package/dist/types/components/format/format-number.d.ts +2 -2
  87. package/dist/types/components/grid/grid-item.d.ts +2 -2
  88. package/dist/types/components/grid/grid.d.ts +2 -2
  89. package/dist/types/components/group/group.d.ts +2 -2
  90. package/dist/types/components/group/use-group.d.ts +2 -2
  91. package/dist/types/components/heading/heading.d.ts +2 -2
  92. package/dist/types/components/hue-slider/hue-slider.d.ts +3 -3
  93. package/dist/types/components/icon/icon.d.ts +5 -5
  94. package/dist/types/components/image/image.d.ts +2 -2
  95. package/dist/types/components/indicator/indicator.d.ts +4 -4
  96. package/dist/types/components/infinite-scroll-area/infinite-scroll-area.d.ts +2 -2
  97. package/dist/types/components/input/input-addon.d.ts +2 -2
  98. package/dist/types/components/input/input-element.d.ts +2 -2
  99. package/dist/types/components/input/input.d.ts +2 -2
  100. package/dist/types/components/kbd/kbd.d.ts +2 -2
  101. package/dist/types/components/link/link.d.ts +2 -2
  102. package/dist/types/components/link-box/link-box.d.ts +2 -2
  103. package/dist/types/components/list/list.d.ts +2 -2
  104. package/dist/types/components/list/list.style.d.ts +2 -2
  105. package/dist/types/components/loading/loading-provider.d.ts +2 -2
  106. package/dist/types/components/loading/loading.d.ts +3 -3
  107. package/dist/types/components/mark/mark.d.ts +2 -2
  108. package/dist/types/components/menu/menu.d.ts +2 -2
  109. package/dist/types/components/menu/menu.style.d.ts +2 -2
  110. package/dist/types/components/menu/use-menu.d.ts +11 -11
  111. package/dist/types/components/modal/modal.d.ts +2 -2
  112. package/dist/types/components/native-accordion/native-accordion.d.ts +2 -2
  113. package/dist/types/components/native-accordion/native-accordion.style.d.ts +2 -2
  114. package/dist/types/components/native-accordion/use-native-accordion.d.ts +2 -2
  115. package/dist/types/components/native-popover/native-popover.d.ts +2 -2
  116. package/dist/types/components/native-select/native-select.d.ts +2 -2
  117. package/dist/types/components/native-table/native-table.d.ts +4 -4
  118. package/dist/types/components/notice/notice.style.d.ts +1 -1
  119. package/dist/types/components/number-input/number-input.d.ts +2 -2
  120. package/dist/types/components/number-input/number-input.style.d.ts +1 -1
  121. package/dist/types/components/pagination/pagination.d.ts +2 -2
  122. package/dist/types/components/pagination/pagination.style.d.ts +1 -1
  123. package/dist/types/components/pagination/use-pagination.d.ts +2 -2
  124. package/dist/types/components/password-input/password-input.d.ts +2 -2
  125. package/dist/types/components/password-input/strength-meter.d.ts +2 -2
  126. package/dist/types/components/password-input/use-password-input.d.ts +2 -2
  127. package/dist/types/components/pin-input/pin-input.d.ts +2 -2
  128. package/dist/types/components/pin-input/use-pin-input.d.ts +7 -7
  129. package/dist/types/components/popover/popover.d.ts +2 -2
  130. package/dist/types/components/progress/progress.d.ts +4 -4
  131. package/dist/types/components/progress/use-progress.d.ts +706 -706
  132. package/dist/types/components/qr-code/qr-code.d.ts +2 -2
  133. package/dist/types/components/radio/radio.d.ts +4 -4
  134. package/dist/types/components/radio/use-radio-group.d.ts +2 -2
  135. package/dist/types/components/radio-card/radio-card.d.ts +5 -5
  136. package/dist/types/components/radio-card/radio-card.style.d.ts +1 -1
  137. package/dist/types/components/rating/rating.style.d.ts +2 -2
  138. package/dist/types/components/rating/use-rating.d.ts +7 -7
  139. package/dist/types/components/reorder/reorder.d.ts +2 -2
  140. package/dist/types/components/reorder/reorder.style.d.ts +1 -1
  141. package/dist/types/components/reorder/use-reorder.d.ts +3 -3
  142. package/dist/types/components/resizable/resizable.d.ts +2 -2
  143. package/dist/types/components/resizable/resizable.style.d.ts +2 -2
  144. package/dist/types/components/resizable/use-resizable.d.ts +2 -2
  145. package/dist/types/components/ripple/ripple.d.ts +2 -2
  146. package/dist/types/components/ripple/use-ripple.d.ts +2 -2
  147. package/dist/types/components/rotate/rotate.d.ts +2 -2
  148. package/dist/types/components/saturation-slider/saturation-slider.d.ts +2 -2
  149. package/dist/types/components/saturation-slider/use-saturation-slider.d.ts +2 -2
  150. package/dist/types/components/scroll-area/scroll-area.d.ts +2 -2
  151. package/dist/types/components/segmented-control/segmented-control.d.ts +2 -2
  152. package/dist/types/components/segmented-control/segmented-control.style.d.ts +2 -2
  153. package/dist/types/components/segmented-control/use-segmented-control.d.ts +9 -9
  154. package/dist/types/components/select/select.d.ts +2 -2
  155. package/dist/types/components/select/select.style.d.ts +1 -1
  156. package/dist/types/components/select/use-select.d.ts +4 -4
  157. package/dist/types/components/separator/separator.d.ts +2 -2
  158. package/dist/types/components/sidebar/sidebar.d.ts +2 -2
  159. package/dist/types/components/sidebar/use-sidebar.d.ts +9 -9
  160. package/dist/types/components/simple-grid/simple-grid.d.ts +2 -2
  161. package/dist/types/components/skeleton/skeleton.d.ts +2 -2
  162. package/dist/types/components/slide/slide.d.ts +2 -2
  163. package/dist/types/components/slide-fade/slide-fade.d.ts +2 -2
  164. package/dist/types/components/slider/slider.d.ts +2 -2
  165. package/dist/types/components/slider/use-slider.d.ts +2 -2
  166. package/dist/types/components/stack/h-stack.d.ts +2 -2
  167. package/dist/types/components/stack/stack.d.ts +2 -2
  168. package/dist/types/components/stack/v-stack.d.ts +2 -2
  169. package/dist/types/components/stack/z-stack.d.ts +2 -2
  170. package/dist/types/components/stat/stat.d.ts +2 -2
  171. package/dist/types/components/status/status.d.ts +2 -2
  172. package/dist/types/components/steps/steps.d.ts +2 -2
  173. package/dist/types/components/steps/steps.style.d.ts +1 -1
  174. package/dist/types/components/steps/use-steps.d.ts +10 -10
  175. package/dist/types/components/switch/switch.d.ts +2 -2
  176. package/dist/types/components/table/table.d.ts +2 -2
  177. package/dist/types/components/tabs/tabs.d.ts +2 -2
  178. package/dist/types/components/tabs/use-tabs.d.ts +16 -16
  179. package/dist/types/components/tag/tag.d.ts +2 -2
  180. package/dist/types/components/tag/tag.style.d.ts +1 -1
  181. package/dist/types/components/text/text.d.ts +2 -2
  182. package/dist/types/components/textarea/textarea.d.ts +2 -2
  183. package/dist/types/components/textarea/use-autosize.d.ts +2 -2
  184. package/dist/types/components/timeline/timeline.d.ts +5 -5
  185. package/dist/types/components/timeline/timeline.style.d.ts +1 -1
  186. package/dist/types/components/toggle/toggle.d.ts +5 -5
  187. package/dist/types/components/toggle/use-toggle-group.d.ts +2 -2
  188. package/dist/types/components/toggle/use-toggle.d.ts +2 -2
  189. package/dist/types/components/tooltip/tooltip.d.ts +2 -2
  190. package/dist/types/components/tree/tree.d.ts +2 -2
  191. package/dist/types/components/tree/tree.style.d.ts +1 -1
  192. package/dist/types/components/tree/use-tree.d.ts +182 -182
  193. package/dist/types/components/visually-hidden/visually-hidden.d.ts +2 -2
  194. package/dist/types/components/wrap/wrap.d.ts +2 -2
  195. package/dist/types/core/components/create-component.d.ts +7 -7
  196. package/dist/types/core/system/color-mode-provider.d.ts +2 -2
  197. package/dist/types/core/system/storage-script.d.ts +3 -3
  198. package/dist/types/core/system/styled.d.ts +2 -2
  199. package/dist/types/core/system/system-provider.d.ts +2 -2
  200. package/dist/types/hooks/use-breakpoint/use-breakpoint-state.d.ts +2 -2
  201. package/dist/types/hooks/use-descendants/index.d.ts +2 -2
  202. package/dist/types/hooks/use-field-sizing/index.d.ts +2 -2
  203. package/dist/types/hooks/use-popper/index.d.ts +2 -2
  204. package/dist/types/hooks/use-resize-observer/index.d.ts +3 -3
  205. package/dist/types/providers/i18n-provider/i18n-provider.d.ts +3 -3
  206. package/dist/types/utils/children.d.ts +2 -2
  207. package/package.json +1 -1
@@ -3,6 +3,7 @@
3
3
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
4
4
  const require_utils_index = require('../../utils/index.cjs');
5
5
  const require_factory = require('../../core/system/factory.cjs');
6
+ const require_props = require('../../core/components/props.cjs');
6
7
  const require_create_component = require('../../core/components/create-component.cjs');
7
8
  require('../../core/index.cjs');
8
9
  const require_check_icon = require('../icon/icons/check-icon.cjs');
@@ -119,13 +120,11 @@ const SelectRoot = withProvider((props) => {
119
120
  children: [
120
121
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.styled.input, { ...getInputProps() }),
121
122
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_input_group.InputGroupRoot, {
122
- className,
123
- css,
124
- colorScheme,
125
- ...getRootProps({
126
- ...groupItemProps,
127
- ...rootProps
128
- }),
123
+ ...require_props.mergeProps({
124
+ className,
125
+ css,
126
+ colorScheme
127
+ }, getRootProps(groupItemProps), rootProps)(),
129
128
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_popover.PopoverTrigger, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { ...getFieldProps(varProps) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_input_element.InputElement, {
130
129
  clickable: clearable && hasValue,
131
130
  ...elementProps,
@@ -149,10 +148,7 @@ const SelectRoot = withProvider((props) => {
149
148
  })
150
149
  });
151
150
  }, "root")((props) => {
152
- return {
153
- ...require_input.useInputPropsContext(),
154
- ...props
155
- };
151
+ return require_props.mergeProps(require_input.useInputPropsContext(), props)();
156
152
  });
157
153
  const SelectField = withContext("div", "field")({ "data-group-propagate": "" }, ({ children, ...rest }) => ({
158
154
  ...rest,
@@ -170,10 +166,7 @@ const SelectLabel = withContext("span", "label")(void 0, (props) => {
170
166
  });
171
167
  const SelectGroup = withContext(({ children, label, labelProps, ...rest }) => {
172
168
  const { groupProps } = useComponentContext();
173
- const { getGroupProps, getLabelProps } = require_hooks_use_combobox_index.useComboboxGroup({
174
- ...groupProps,
175
- ...rest
176
- });
169
+ const { getGroupProps, getLabelProps } = require_hooks_use_combobox_index.useComboboxGroup(require_props.mergeProps(groupProps, rest)());
177
170
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_hooks_use_combobox_index.ComboboxGroupContext, {
178
171
  value: (0, react.useMemo)(() => ({ getLabelProps }), [getLabelProps]),
179
172
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_factory.styled.div, {
@@ -187,10 +180,7 @@ const SelectGroup = withContext(({ children, label, labelProps, ...rest }) => {
187
180
  }, "group")();
188
181
  const SelectOption = withContext(({ children, icon: iconProp, ...rest }) => {
189
182
  const { optionProps: { icon, ...optionProps } = {} } = useComponentContext();
190
- const { getIndicatorProps, getOptionProps } = require_use_select.useSelectOption({
191
- ...optionProps,
192
- ...rest
193
- });
183
+ const { getIndicatorProps, getOptionProps } = require_use_select.useSelectOption(require_props.mergeProps(optionProps, rest)());
194
184
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_factory.styled.div, {
195
185
  ...getOptionProps(),
196
186
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectIndicator, {
@@ -1 +1 @@
1
- {"version":3,"file":"select.cjs","names":["createSlotComponent","selectStyle","XIcon","useGroupItemProps","usePopoverStyleProps","useSelect","createComboboxItem","createComboboxChildren","useInputBorder","ComboboxDescendantsContext","ComboboxContext","SelectContext","styled","useInputPropsContext","ChevronDownIcon","useComboboxGroupContext","useComboboxGroup","ComboboxGroupContext","useSelectOption","CheckIcon"],"sources":["../../../../src/components/select/select.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement, ReactNode } from \"react\"\nimport type {\n GenericsComponent,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n} from \"../../core\"\nimport type {\n ComboboxItem,\n UseComboboxGroupProps,\n} from \"../../hooks/use-combobox\"\nimport type { Merge } from \"../../utils\"\nimport type { UseInputBorderProps } from \"../input\"\nimport type { UsePopoverStyleProps, UsePopupAnimationProps } from \"../popover\"\nimport type { SelectStyle } from \"./select.style\"\nimport type {\n UseSelectOptionProps,\n UseSelectProps,\n UseSelectReturn,\n} from \"./use-select\"\nimport { useMemo } from \"react\"\nimport { createSlotComponent, styled } from \"../../core\"\nimport {\n ComboboxContext,\n ComboboxDescendantsContext,\n ComboboxGroupContext,\n createComboboxChildren,\n createComboboxItem,\n useComboboxGroup,\n useComboboxGroupContext,\n} from \"../../hooks/use-combobox\"\nimport { cast, isArray } from \"../../utils\"\nimport { useGroupItemProps } from \"../group\"\nimport { CheckIcon, ChevronDownIcon, XIcon } from \"../icon\"\nimport { InputGroup, useInputBorder, useInputPropsContext } from \"../input\"\nimport { Popover, usePopoverStyleProps } from \"../popover\"\nimport { selectStyle } from \"./select.style\"\nimport { SelectContext, useSelect, useSelectOption } from \"./use-select\"\n\ninterface ComponentContext\n extends\n Pick<UseSelectReturn, \"getSeparatorProps\">,\n Pick<SelectRootProps, \"groupProps\" | \"optionProps\"> {}\n\nexport interface SelectRootProps<Multiple extends boolean = false>\n extends\n Omit<HTMLStyledProps, \"defaultValue\" | \"offset\" | \"onChange\" | \"value\">,\n Merge<UseSelectProps<Multiple>, UsePopoverStyleProps>,\n UsePopupAnimationProps,\n ThemeProps<SelectStyle>,\n UseInputBorderProps {\n /**\n * If `true`, display the clear icon.\n *\n * @default false\n */\n clearable?: boolean\n /**\n * The icon to be used in the clear button.\n */\n clearIcon?: ReactNode\n /**\n * The icon to be used in the select.\n */\n icon?: ReactNode\n /**\n * Props for content element.\n */\n contentProps?: SelectContentProps\n /**\n * The props for the end element.\n */\n elementProps?: InputGroup.ElementProps\n /**\n * Props for group element.\n */\n groupProps?: Omit<SelectGroupProps, \"children\" | \"label\">\n /**\n * Props for icon element.\n */\n iconProps?: SelectIconProps\n /**\n * Props for option element.\n */\n optionProps?: Omit<SelectOptionProps, \"children\" | \"value\">\n /**\n * Props for placeholder element.\n */\n placeholderProps?: Omit<SelectOptionProps, \"children\" | \"value\">\n /**\n * Props for root element.\n */\n rootProps?: InputGroup.RootProps\n}\n\nconst {\n ComponentContext,\n PropsContext: SelectPropsContext,\n useComponentContext,\n usePropsContext: useSelectPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<SelectRootProps, SelectStyle, ComponentContext>(\n \"select\",\n selectStyle,\n)\n\nexport { SelectPropsContext, useSelectPropsContext }\n\n/**\n * `Select` is a component used for allowing a user to choose one option from a list.\n *\n * @see https://yamada-ui.com/docs/components/select\n */\nexport const SelectRoot = withProvider<\"div\", SelectRootProps>(\n <Multiple extends boolean = false>(props: SelectRootProps<Multiple>) => {\n const [\n groupItemProps,\n {\n className,\n css,\n colorScheme,\n animationScheme = \"block-start\",\n children,\n clearable,\n clearIcon = <XIcon />,\n duration,\n errorBorderColor,\n focusBorderColor,\n icon,\n items: itemsProp,\n contentProps,\n elementProps,\n groupProps,\n iconProps,\n optionProps,\n placeholderProps,\n rootProps,\n ...rest\n },\n ] = useGroupItemProps(props)\n const popoverStyleProps = usePopoverStyleProps(rest)\n const items = useMemo<ComboboxItem[]>(() => {\n if (itemsProp) return itemsProp\n\n return createComboboxItem(children, {\n Group: SelectGroup,\n Label: SelectLabel,\n Option: SelectOption,\n })\n }, [itemsProp, children])\n const {\n descendants,\n includePlaceholder,\n items: computedItems,\n max,\n placeholder,\n value,\n getClearIconProps,\n getContentProps,\n getFieldProps,\n getIconProps,\n getInputProps,\n getRootProps,\n getSeparatorProps,\n popoverProps,\n onActiveDescendant,\n onChange,\n onClose,\n onSelect,\n } = useSelect({ items, ...rest, ...popoverStyleProps })\n const mergedPopoverProps = useMemo<Popover.RootProps>(\n () => ({\n animationScheme,\n duration,\n ...popoverProps,\n }),\n [animationScheme, duration, popoverProps],\n )\n const computedChildren = useMemo(() => {\n if (children)\n return (\n <>\n {placeholder ? (\n <SelectOption\n {...placeholderProps}\n hidden={!includePlaceholder}\n value=\"\"\n >\n {placeholder}\n </SelectOption>\n ) : null}\n\n {children}\n </>\n )\n\n return createComboboxChildren(computedItems, {\n Group: SelectGroup,\n Option: SelectOption,\n })\n }, [\n children,\n computedItems,\n placeholder,\n includePlaceholder,\n placeholderProps,\n ])\n const varProps = useInputBorder({ errorBorderColor, focusBorderColor })\n const comboboxContext = useMemo(\n () => ({ max, value, onActiveDescendant, onChange, onClose, onSelect }),\n [max, onActiveDescendant, onChange, onClose, onSelect, value],\n )\n const selectContext = useMemo(() => ({ max, value }), [max, value])\n const componentContext = useMemo(\n () => ({ getSeparatorProps, groupProps, optionProps }),\n [getSeparatorProps, groupProps, optionProps],\n )\n const hasValue = isArray(value) ? !!value.length : !!value\n\n return (\n <ComboboxDescendantsContext value={descendants}>\n <ComboboxContext value={comboboxContext}>\n <SelectContext value={selectContext}>\n <ComponentContext value={componentContext}>\n <Popover.Root {...mergedPopoverProps}>\n <styled.input {...getInputProps()} />\n\n <InputGroup.Root\n className={className}\n css={css}\n colorScheme={colorScheme}\n {...getRootProps({ ...groupItemProps, ...rootProps })}\n >\n <Popover.Trigger>\n <SelectField {...getFieldProps(varProps)} />\n </Popover.Trigger>\n\n <InputGroup.Element\n {...{ clickable: clearable && hasValue, ...elementProps }}\n >\n {clearable && hasValue ? (\n <SelectIcon\n icon={clearIcon}\n {...getClearIconProps(iconProps)}\n />\n ) : (\n <SelectIcon icon={icon} {...getIconProps(iconProps)} />\n )}\n </InputGroup.Element>\n </InputGroup.Root>\n\n <SelectContent\n {...cast<SelectContentProps>(\n getContentProps(cast<HTMLProps>(contentProps)),\n )}\n >\n {computedChildren}\n </SelectContent>\n </Popover.Root>\n </ComponentContext>\n </SelectContext>\n </ComboboxContext>\n </ComboboxDescendantsContext>\n )\n },\n \"root\",\n)((props) => {\n const context = useInputPropsContext()\n\n return { ...context, ...props }\n}) as GenericsComponent<{\n <Multiple extends boolean = false>(\n props: SelectRootProps<Multiple>,\n ): ReactElement\n}>\n\ninterface SelectFieldProps extends HTMLStyledProps {}\n\nconst SelectField = withContext<\"div\", SelectFieldProps>(\"div\", \"field\")(\n { \"data-group-propagate\": \"\" },\n ({ children, ...rest }) => ({\n ...rest,\n children: <SelectValueText>{children}</SelectValueText>,\n }),\n)\n\ninterface SelectIconProps extends HTMLStyledProps {\n icon?: ReactNode\n}\n\nconst SelectIcon = withContext<\"div\", SelectIconProps>(\"div\", \"icon\")(\n undefined,\n ({ children, icon, ...rest }) => ({\n children: icon || children || <ChevronDownIcon />,\n ...rest,\n }),\n)\n\ninterface SelectValueTextProps extends HTMLProps<\"span\"> {}\n\nconst SelectValueText = withContext<\"span\", SelectValueTextProps>(\n \"span\",\n \"valueText\",\n)()\n\ninterface SelectContentProps extends Popover.ContentProps {}\n\nconst SelectContent = withContext<\"div\", SelectContentProps>(\n Popover.Content,\n \"content\",\n)()\n\nexport interface SelectLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const SelectLabel = withContext<\"span\", SelectLabelProps>(\n \"span\",\n \"label\",\n)(undefined, (props) => {\n const { getLabelProps } = useComboboxGroupContext()\n\n return getLabelProps(props)\n})\n\nexport interface SelectGroupProps\n extends UseComboboxGroupProps, HTMLStyledProps {\n /**\n * The label of the group.\n */\n label?: ReactNode\n /**\n * Props for the label component.\n */\n labelProps?: SelectLabelProps\n}\n\nexport const SelectGroup = withContext<\"div\", SelectGroupProps>(\n ({ children, label, labelProps, ...rest }) => {\n const { groupProps } = useComponentContext()\n const { getGroupProps, getLabelProps } = useComboboxGroup({\n ...groupProps,\n ...rest,\n })\n const context = useMemo(() => ({ getLabelProps }), [getLabelProps])\n\n return (\n <ComboboxGroupContext value={context}>\n <styled.div {...getGroupProps()}>\n {label ? <SelectLabel {...labelProps}>{label}</SelectLabel> : null}\n {children}\n </styled.div>\n </ComboboxGroupContext>\n )\n },\n \"group\",\n)()\n\nexport interface SelectOptionProps\n extends UseSelectOptionProps, HTMLStyledProps {\n /**\n * The icon to be used in the select option.\n */\n icon?: ReactNode\n}\n\nexport const SelectOption = withContext<\"div\", SelectOptionProps>(\n ({ children, icon: iconProp, ...rest }) => {\n const { optionProps: { icon, ...optionProps } = {} } = useComponentContext()\n const { getIndicatorProps, getOptionProps } = useSelectOption({\n ...optionProps,\n ...rest,\n })\n\n return (\n <styled.div {...getOptionProps()}>\n <SelectIndicator {...getIndicatorProps()}>\n {iconProp ?? icon ?? <CheckIcon />}\n </SelectIndicator>\n {children}\n </styled.div>\n )\n },\n \"option\",\n)()\n\ninterface SelectIndicatorProps extends HTMLStyledProps {}\n\nconst SelectIndicator = withContext<\"div\", SelectIndicatorProps>(\n \"div\",\n \"indicator\",\n)()\n\nexport interface SelectSeparatorProps extends HTMLStyledProps<\"hr\"> {}\n\nexport const SelectSeparator = withContext<\"hr\", SelectSeparatorProps>(\n \"hr\",\n \"separator\",\n)(undefined, (props) => {\n const { getSeparatorProps } = useComponentContext()\n\n return getSeparatorProps(props)\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,MAAM,EACJ,kBACA,cAAc,oBACd,qBACA,iBAAiB,uBACjB,aACA,iBACEA,6CACF,UACAC,iCACD;;;;;;AASD,MAAa,aAAa,cACW,UAAqC;CACtE,MAAM,CACJ,gBACA,EACE,WACA,KACA,aACA,kBAAkB,eAClB,UACA,WACA,YAAY,2CAACC,yBAAQ,EACrB,UACA,kBACA,kBACA,MACA,OAAO,WACP,cACA,cACA,YACA,WACA,aACA,kBACA,WACA,GAAG,UA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uBAAO;GAAI,GAAI,eAAe;cAC5B,QAAQ,2CAAC;IAAY,GAAI;cAAa;KAAoB,GAAG,MAC7D;IACU;GACQ;GAG3B,QACD,EAAE;AAUH,MAAa,eAAe,aACzB,EAAE,UAAU,MAAM,UAAU,GAAG,WAAW;CACzC,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,gBAAgB,EAAE,KAAK,qBAAqB;CAC5E,MAAM,EAAE,mBAAmB,mBAAmBM,mCAAgB;EAC5D,GAAG;EACH,GAAG;EACJ,CAAC;AAEF,QACE,4CAACN,uBAAO;EAAI,GAAI,gBAAgB;aAC9B,2CAAC;GAAgB,GAAI,mBAAmB;aACrC,YAAY,QAAQ,2CAACO,iCAAY;IAClB,EACjB;GACU;GAGjB,SACD,EAAE;AAIH,MAAM,kBAAkB,YACtB,OACA,YACD,EAAE;AAIH,MAAa,kBAAkB,YAC7B,MACA,YACD,CAAC,SAAY,UAAU;CACtB,MAAM,EAAE,sBAAsB,qBAAqB;AAEnD,QAAO,kBAAkB,MAAM;EAC/B"}
1
+ {"version":3,"file":"select.cjs","names":["createSlotComponent","selectStyle","XIcon","useGroupItemProps","usePopoverStyleProps","useSelect","createComboboxItem","createComboboxChildren","useInputBorder","ComboboxDescendantsContext","ComboboxContext","SelectContext","styled","mergeProps","useInputPropsContext","ChevronDownIcon","useComboboxGroupContext","useComboboxGroup","ComboboxGroupContext","useSelectOption","CheckIcon"],"sources":["../../../../src/components/select/select.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement, ReactNode } from \"react\"\nimport type {\n GenericsComponent,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n} from \"../../core\"\nimport type {\n ComboboxItem,\n UseComboboxGroupProps,\n} from \"../../hooks/use-combobox\"\nimport type { Merge } from \"../../utils\"\nimport type { UseInputBorderProps } from \"../input\"\nimport type { UsePopoverStyleProps, UsePopupAnimationProps } from \"../popover\"\nimport type { SelectStyle } from \"./select.style\"\nimport type {\n UseSelectOptionProps,\n UseSelectProps,\n UseSelectReturn,\n} from \"./use-select\"\nimport { useMemo } from \"react\"\nimport { createSlotComponent, mergeProps, styled } from \"../../core\"\nimport {\n ComboboxContext,\n ComboboxDescendantsContext,\n ComboboxGroupContext,\n createComboboxChildren,\n createComboboxItem,\n useComboboxGroup,\n useComboboxGroupContext,\n} from \"../../hooks/use-combobox\"\nimport { cast, isArray } from \"../../utils\"\nimport { useGroupItemProps } from \"../group\"\nimport { CheckIcon, ChevronDownIcon, XIcon } from \"../icon\"\nimport { InputGroup, useInputBorder, useInputPropsContext } from \"../input\"\nimport { Popover, usePopoverStyleProps } from \"../popover\"\nimport { selectStyle } from \"./select.style\"\nimport { SelectContext, useSelect, useSelectOption } from \"./use-select\"\n\ninterface ComponentContext\n extends\n Pick<UseSelectReturn, \"getSeparatorProps\">,\n Pick<SelectRootProps, \"groupProps\" | \"optionProps\"> {}\n\nexport interface SelectRootProps<Multiple extends boolean = false>\n extends\n Omit<HTMLStyledProps, \"defaultValue\" | \"offset\" | \"onChange\" | \"value\">,\n Merge<UseSelectProps<Multiple>, UsePopoverStyleProps>,\n UsePopupAnimationProps,\n ThemeProps<SelectStyle>,\n UseInputBorderProps {\n /**\n * If `true`, display the clear icon.\n *\n * @default false\n */\n clearable?: boolean\n /**\n * The icon to be used in the clear button.\n */\n clearIcon?: ReactNode\n /**\n * The icon to be used in the select.\n */\n icon?: ReactNode\n /**\n * Props for content element.\n */\n contentProps?: SelectContentProps\n /**\n * The props for the end element.\n */\n elementProps?: InputGroup.ElementProps\n /**\n * Props for group element.\n */\n groupProps?: Omit<SelectGroupProps, \"children\" | \"label\">\n /**\n * Props for icon element.\n */\n iconProps?: SelectIconProps\n /**\n * Props for option element.\n */\n optionProps?: Omit<SelectOptionProps, \"children\" | \"value\">\n /**\n * Props for placeholder element.\n */\n placeholderProps?: Omit<SelectOptionProps, \"children\" | \"value\">\n /**\n * Props for root element.\n */\n rootProps?: InputGroup.RootProps\n}\n\nconst {\n ComponentContext,\n PropsContext: SelectPropsContext,\n useComponentContext,\n usePropsContext: useSelectPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<SelectRootProps, SelectStyle, ComponentContext>(\n \"select\",\n selectStyle,\n)\n\nexport { SelectPropsContext, useSelectPropsContext }\n\n/**\n * `Select` is a component used for allowing a user to choose one option from a list.\n *\n * @see https://yamada-ui.com/docs/components/select\n */\nexport const SelectRoot = withProvider<\"div\", SelectRootProps>(\n <Multiple extends boolean = false>(props: SelectRootProps<Multiple>) => {\n const [\n groupItemProps,\n {\n className,\n css,\n colorScheme,\n animationScheme = \"block-start\",\n children,\n clearable,\n clearIcon = <XIcon />,\n duration,\n errorBorderColor,\n focusBorderColor,\n icon,\n items: itemsProp,\n contentProps,\n elementProps,\n groupProps,\n iconProps,\n optionProps,\n placeholderProps,\n rootProps,\n ...rest\n },\n ] = useGroupItemProps(props)\n const popoverStyleProps = usePopoverStyleProps(rest)\n const items = useMemo<ComboboxItem[]>(() => {\n if (itemsProp) return itemsProp\n\n return createComboboxItem(children, {\n Group: SelectGroup,\n Label: SelectLabel,\n Option: SelectOption,\n })\n }, [itemsProp, children])\n const {\n descendants,\n includePlaceholder,\n items: computedItems,\n max,\n placeholder,\n value,\n getClearIconProps,\n getContentProps,\n getFieldProps,\n getIconProps,\n getInputProps,\n getRootProps,\n getSeparatorProps,\n popoverProps,\n onActiveDescendant,\n onChange,\n onClose,\n onSelect,\n } = useSelect({ items, ...rest, ...popoverStyleProps })\n const mergedPopoverProps = useMemo<Popover.RootProps>(\n () => ({\n animationScheme,\n duration,\n ...popoverProps,\n }),\n [animationScheme, duration, popoverProps],\n )\n const computedChildren = useMemo(() => {\n if (children)\n return (\n <>\n {placeholder ? (\n <SelectOption\n {...placeholderProps}\n hidden={!includePlaceholder}\n value=\"\"\n >\n {placeholder}\n </SelectOption>\n ) : null}\n\n {children}\n </>\n )\n\n return createComboboxChildren(computedItems, {\n Group: SelectGroup,\n Option: SelectOption,\n })\n }, [\n children,\n computedItems,\n placeholder,\n includePlaceholder,\n placeholderProps,\n ])\n const varProps = useInputBorder({ errorBorderColor, focusBorderColor })\n const comboboxContext = useMemo(\n () => ({ max, value, onActiveDescendant, onChange, onClose, onSelect }),\n [max, onActiveDescendant, onChange, onClose, onSelect, value],\n )\n const selectContext = useMemo(() => ({ max, value }), [max, value])\n const componentContext = useMemo(\n () => ({ getSeparatorProps, groupProps, optionProps }),\n [getSeparatorProps, groupProps, optionProps],\n )\n const hasValue = isArray(value) ? !!value.length : !!value\n\n return (\n <ComboboxDescendantsContext value={descendants}>\n <ComboboxContext value={comboboxContext}>\n <SelectContext value={selectContext}>\n <ComponentContext value={componentContext}>\n <Popover.Root {...mergedPopoverProps}>\n <styled.input {...getInputProps()} />\n\n <InputGroup.Root\n {...mergeProps(\n { className, css, colorScheme },\n getRootProps(groupItemProps),\n rootProps,\n )()}\n >\n <Popover.Trigger>\n <SelectField {...getFieldProps(varProps)} />\n </Popover.Trigger>\n\n <InputGroup.Element\n {...{ clickable: clearable && hasValue, ...elementProps }}\n >\n {clearable && hasValue ? (\n <SelectIcon\n icon={clearIcon}\n {...getClearIconProps(iconProps)}\n />\n ) : (\n <SelectIcon icon={icon} {...getIconProps(iconProps)} />\n )}\n </InputGroup.Element>\n </InputGroup.Root>\n\n <SelectContent\n {...cast<SelectContentProps>(\n getContentProps(cast<HTMLProps>(contentProps)),\n )}\n >\n {computedChildren}\n </SelectContent>\n </Popover.Root>\n </ComponentContext>\n </SelectContext>\n </ComboboxContext>\n </ComboboxDescendantsContext>\n )\n },\n \"root\",\n)((props) => {\n const context = useInputPropsContext()\n\n return mergeProps(context, props)()\n}) as GenericsComponent<{\n <Multiple extends boolean = false>(\n props: SelectRootProps<Multiple>,\n ): ReactElement\n}>\n\ninterface SelectFieldProps extends HTMLStyledProps {}\n\nconst SelectField = withContext<\"div\", SelectFieldProps>(\"div\", \"field\")(\n { \"data-group-propagate\": \"\" },\n ({ children, ...rest }) => ({\n ...rest,\n children: <SelectValueText>{children}</SelectValueText>,\n }),\n)\n\ninterface SelectIconProps extends HTMLStyledProps {\n icon?: ReactNode\n}\n\nconst SelectIcon = withContext<\"div\", SelectIconProps>(\"div\", \"icon\")(\n undefined,\n ({ children, icon, ...rest }) => ({\n children: icon || children || <ChevronDownIcon />,\n ...rest,\n }),\n)\n\ninterface SelectValueTextProps extends HTMLProps<\"span\"> {}\n\nconst SelectValueText = withContext<\"span\", SelectValueTextProps>(\n \"span\",\n \"valueText\",\n)()\n\ninterface SelectContentProps extends Popover.ContentProps {}\n\nconst SelectContent = withContext<\"div\", SelectContentProps>(\n Popover.Content,\n \"content\",\n)()\n\nexport interface SelectLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const SelectLabel = withContext<\"span\", SelectLabelProps>(\n \"span\",\n \"label\",\n)(undefined, (props) => {\n const { getLabelProps } = useComboboxGroupContext()\n\n return getLabelProps(props)\n})\n\nexport interface SelectGroupProps\n extends UseComboboxGroupProps, HTMLStyledProps {\n /**\n * The label of the group.\n */\n label?: ReactNode\n /**\n * Props for the label component.\n */\n labelProps?: SelectLabelProps\n}\n\nexport const SelectGroup = withContext<\"div\", SelectGroupProps>(\n ({ children, label, labelProps, ...rest }) => {\n const { groupProps } = useComponentContext()\n const { getGroupProps, getLabelProps } = useComboboxGroup(\n mergeProps(groupProps, rest)(),\n )\n const context = useMemo(() => ({ getLabelProps }), [getLabelProps])\n\n return (\n <ComboboxGroupContext value={context}>\n <styled.div {...getGroupProps()}>\n {label ? <SelectLabel {...labelProps}>{label}</SelectLabel> : null}\n {children}\n </styled.div>\n </ComboboxGroupContext>\n )\n },\n \"group\",\n)()\n\nexport interface SelectOptionProps\n extends UseSelectOptionProps, HTMLStyledProps {\n /**\n * The icon to be used in the select option.\n */\n icon?: ReactNode\n}\n\nexport const SelectOption = withContext<\"div\", SelectOptionProps>(\n ({ children, icon: iconProp, ...rest }) => {\n const { optionProps: { icon, ...optionProps } = {} } = useComponentContext()\n const { getIndicatorProps, getOptionProps } = useSelectOption(\n mergeProps(optionProps, rest)(),\n )\n\n return (\n <styled.div {...getOptionProps()}>\n <SelectIndicator {...getIndicatorProps()}>\n {iconProp ?? icon ?? <CheckIcon />}\n </SelectIndicator>\n {children}\n </styled.div>\n )\n },\n \"option\",\n)()\n\ninterface SelectIndicatorProps extends HTMLStyledProps {}\n\nconst SelectIndicator = withContext<\"div\", SelectIndicatorProps>(\n \"div\",\n \"indicator\",\n)()\n\nexport interface SelectSeparatorProps extends HTMLStyledProps<\"hr\"> {}\n\nexport const SelectSeparator = withContext<\"hr\", SelectSeparatorProps>(\n \"hr\",\n \"separator\",\n)(undefined, (props) => {\n const { getSeparatorProps } = useComponentContext()\n\n return getSeparatorProps(props)\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,MAAM,EACJ,kBACA,cAAc,oBACd,qBACA,iBAAiB,uBACjB,aACA,iBACEA,6CACF,UACAC,iCACD;;;;;;AASD,MAAa,aAAa,cACW,UAAqC;CACtE,MAAM,CACJ,gBACA,EACE,WACA,KACA,aACA,kBAAkB,eAClB,UACA,WACA,YAAY,2CAACC,yBAAQ,EACrB,UACA,kBACA,kBACA,MACA,OAAO,WACP,cACA,cACA,YACA,WACA,aACA,kBACA,WACA,GAAG,UAEHC,oCAAkB,MAAM;CAC5B,MAAM,oBAAoBC,qCAAqB,KAAK;CAUpD,MAAM,EACJ,aACA,oBACA,OAAO,eACP,KACA,aACA,OACA,mBACA,iBACA,eACA,cACA,eACA,cACA,mBACA,cACA,oBACA,UACA,SACA,aACEC,6BAAU;EAAE,gCA5B4B;AAC1C,OAAI,UAAW,QAAO;AAEtB,UAAOC,oDAAmB,UAAU;IAClC,OAAO;IACP,OAAO;IACP,QAAQ;IACT,CAAC;KACD,CAAC,WAAW,SAAS,CAAC;EAoBF,GAAG;EAAM,GAAG;EAAmB,CAAC;CACvD,MAAM,+CACG;EACL;EACA;EACA,GAAG;EACJ,GACD;EAAC;EAAiB;EAAU;EAAa,CAC1C;CACD,MAAM,4CAAi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,SACD,EAAE;AAIH,MAAM,kBAAkB,YACtB,OACA,YACD,EAAE;AAIH,MAAa,kBAAkB,YAC7B,MACA,YACD,CAAC,SAAY,UAAU;CACtB,MAAM,EAAE,sBAAsB,qBAAqB;AAEnD,QAAO,kBAAkB,MAAM;EAC/B"}
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { utils_exports } from "../../utils/index.js";
4
4
  import { styled } from "../../core/system/factory.js";
5
+ import { mergeProps } from "../../core/components/props.js";
5
6
  import { createSlotComponent } from "../../core/components/create-component.js";
6
7
  import "../../core/index.js";
7
8
  import { CheckIcon } from "../icon/icons/check-icon.js";
@@ -118,13 +119,11 @@ const SelectRoot = withProvider((props) => {
118
119
  children: [
119
120
  /* @__PURE__ */ jsx(styled.input, { ...getInputProps() }),
120
121
  /* @__PURE__ */ jsxs(InputGroupRoot, {
121
- className,
122
- css,
123
- colorScheme,
124
- ...getRootProps({
125
- ...groupItemProps,
126
- ...rootProps
127
- }),
122
+ ...mergeProps({
123
+ className,
124
+ css,
125
+ colorScheme
126
+ }, getRootProps(groupItemProps), rootProps)(),
128
127
  children: [/* @__PURE__ */ jsx(PopoverTrigger, { children: /* @__PURE__ */ jsx(SelectField, { ...getFieldProps(varProps) }) }), /* @__PURE__ */ jsx(InputElement, {
129
128
  clickable: clearable && hasValue,
130
129
  ...elementProps,
@@ -148,10 +147,7 @@ const SelectRoot = withProvider((props) => {
148
147
  })
149
148
  });
150
149
  }, "root")((props) => {
151
- return {
152
- ...useInputPropsContext(),
153
- ...props
154
- };
150
+ return mergeProps(useInputPropsContext(), props)();
155
151
  });
156
152
  const SelectField = withContext("div", "field")({ "data-group-propagate": "" }, ({ children, ...rest }) => ({
157
153
  ...rest,
@@ -169,10 +165,7 @@ const SelectLabel = withContext("span", "label")(void 0, (props) => {
169
165
  });
170
166
  const SelectGroup = withContext(({ children, label, labelProps, ...rest }) => {
171
167
  const { groupProps } = useComponentContext();
172
- const { getGroupProps, getLabelProps } = useComboboxGroup({
173
- ...groupProps,
174
- ...rest
175
- });
168
+ const { getGroupProps, getLabelProps } = useComboboxGroup(mergeProps(groupProps, rest)());
176
169
  return /* @__PURE__ */ jsx(ComboboxGroupContext, {
177
170
  value: useMemo(() => ({ getLabelProps }), [getLabelProps]),
178
171
  children: /* @__PURE__ */ jsxs(styled.div, {
@@ -186,10 +179,7 @@ const SelectGroup = withContext(({ children, label, labelProps, ...rest }) => {
186
179
  }, "group")();
187
180
  const SelectOption = withContext(({ children, icon: iconProp, ...rest }) => {
188
181
  const { optionProps: { icon, ...optionProps } = {} } = useComponentContext();
189
- const { getIndicatorProps, getOptionProps } = useSelectOption({
190
- ...optionProps,
191
- ...rest
192
- });
182
+ const { getIndicatorProps, getOptionProps } = useSelectOption(mergeProps(optionProps, rest)());
193
183
  return /* @__PURE__ */ jsxs(styled.div, {
194
184
  ...getOptionProps(),
195
185
  children: [/* @__PURE__ */ jsx(SelectIndicator, {
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","names":["Popover.Root","InputGroup.Root","Popover.Trigger","InputGroup.Element","Popover.Content"],"sources":["../../../../src/components/select/select.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement, ReactNode } from \"react\"\nimport type {\n GenericsComponent,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n} from \"../../core\"\nimport type {\n ComboboxItem,\n UseComboboxGroupProps,\n} from \"../../hooks/use-combobox\"\nimport type { Merge } from \"../../utils\"\nimport type { UseInputBorderProps } from \"../input\"\nimport type { UsePopoverStyleProps, UsePopupAnimationProps } from \"../popover\"\nimport type { SelectStyle } from \"./select.style\"\nimport type {\n UseSelectOptionProps,\n UseSelectProps,\n UseSelectReturn,\n} from \"./use-select\"\nimport { useMemo } from \"react\"\nimport { createSlotComponent, styled } from \"../../core\"\nimport {\n ComboboxContext,\n ComboboxDescendantsContext,\n ComboboxGroupContext,\n createComboboxChildren,\n createComboboxItem,\n useComboboxGroup,\n useComboboxGroupContext,\n} from \"../../hooks/use-combobox\"\nimport { cast, isArray } from \"../../utils\"\nimport { useGroupItemProps } from \"../group\"\nimport { CheckIcon, ChevronDownIcon, XIcon } from \"../icon\"\nimport { InputGroup, useInputBorder, useInputPropsContext } from \"../input\"\nimport { Popover, usePopoverStyleProps } from \"../popover\"\nimport { selectStyle } from \"./select.style\"\nimport { SelectContext, useSelect, useSelectOption } from \"./use-select\"\n\ninterface ComponentContext\n extends\n Pick<UseSelectReturn, \"getSeparatorProps\">,\n Pick<SelectRootProps, \"groupProps\" | \"optionProps\"> {}\n\nexport interface SelectRootProps<Multiple extends boolean = false>\n extends\n Omit<HTMLStyledProps, \"defaultValue\" | \"offset\" | \"onChange\" | \"value\">,\n Merge<UseSelectProps<Multiple>, UsePopoverStyleProps>,\n UsePopupAnimationProps,\n ThemeProps<SelectStyle>,\n UseInputBorderProps {\n /**\n * If `true`, display the clear icon.\n *\n * @default false\n */\n clearable?: boolean\n /**\n * The icon to be used in the clear button.\n */\n clearIcon?: ReactNode\n /**\n * The icon to be used in the select.\n */\n icon?: ReactNode\n /**\n * Props for content element.\n */\n contentProps?: SelectContentProps\n /**\n * The props for the end element.\n */\n elementProps?: InputGroup.ElementProps\n /**\n * Props for group element.\n */\n groupProps?: Omit<SelectGroupProps, \"children\" | \"label\">\n /**\n * Props for icon element.\n */\n iconProps?: SelectIconProps\n /**\n * Props for option element.\n */\n optionProps?: Omit<SelectOptionProps, \"children\" | \"value\">\n /**\n * Props for placeholder element.\n */\n placeholderProps?: Omit<SelectOptionProps, \"children\" | \"value\">\n /**\n * Props for root element.\n */\n rootProps?: InputGroup.RootProps\n}\n\nconst {\n ComponentContext,\n PropsContext: SelectPropsContext,\n useComponentContext,\n usePropsContext: useSelectPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<SelectRootProps, SelectStyle, ComponentContext>(\n \"select\",\n selectStyle,\n)\n\nexport { SelectPropsContext, useSelectPropsContext }\n\n/**\n * `Select` is a component used for allowing a user to choose one option from a list.\n *\n * @see https://yamada-ui.com/docs/components/select\n */\nexport const SelectRoot = withProvider<\"div\", SelectRootProps>(\n <Multiple extends boolean = false>(props: SelectRootProps<Multiple>) => {\n const [\n groupItemProps,\n {\n className,\n css,\n colorScheme,\n animationScheme = \"block-start\",\n children,\n clearable,\n clearIcon = <XIcon />,\n duration,\n errorBorderColor,\n focusBorderColor,\n icon,\n items: itemsProp,\n contentProps,\n elementProps,\n groupProps,\n iconProps,\n optionProps,\n placeholderProps,\n rootProps,\n ...rest\n },\n ] = useGroupItemProps(props)\n const popoverStyleProps = usePopoverStyleProps(rest)\n const items = useMemo<ComboboxItem[]>(() => {\n if (itemsProp) return itemsProp\n\n return createComboboxItem(children, {\n Group: SelectGroup,\n Label: SelectLabel,\n Option: SelectOption,\n })\n }, [itemsProp, children])\n const {\n descendants,\n includePlaceholder,\n items: computedItems,\n max,\n placeholder,\n value,\n getClearIconProps,\n getContentProps,\n getFieldProps,\n getIconProps,\n getInputProps,\n getRootProps,\n getSeparatorProps,\n popoverProps,\n onActiveDescendant,\n onChange,\n onClose,\n onSelect,\n } = useSelect({ items, ...rest, ...popoverStyleProps })\n const mergedPopoverProps = useMemo<Popover.RootProps>(\n () => ({\n animationScheme,\n duration,\n ...popoverProps,\n }),\n [animationScheme, duration, popoverProps],\n )\n const computedChildren = useMemo(() => {\n if (children)\n return (\n <>\n {placeholder ? (\n <SelectOption\n {...placeholderProps}\n hidden={!includePlaceholder}\n value=\"\"\n >\n {placeholder}\n </SelectOption>\n ) : null}\n\n {children}\n </>\n )\n\n return createComboboxChildren(computedItems, {\n Group: SelectGroup,\n Option: SelectOption,\n })\n }, [\n children,\n computedItems,\n placeholder,\n includePlaceholder,\n placeholderProps,\n ])\n const varProps = useInputBorder({ errorBorderColor, focusBorderColor })\n const comboboxContext = useMemo(\n () => ({ max, value, onActiveDescendant, onChange, onClose, onSelect }),\n [max, onActiveDescendant, onChange, onClose, onSelect, value],\n )\n const selectContext = useMemo(() => ({ max, value }), [max, value])\n const componentContext = useMemo(\n () => ({ getSeparatorProps, groupProps, optionProps }),\n [getSeparatorProps, groupProps, optionProps],\n )\n const hasValue = isArray(value) ? !!value.length : !!value\n\n return (\n <ComboboxDescendantsContext value={descendants}>\n <ComboboxContext value={comboboxContext}>\n <SelectContext value={selectContext}>\n <ComponentContext value={componentContext}>\n <Popover.Root {...mergedPopoverProps}>\n <styled.input {...getInputProps()} />\n\n <InputGroup.Root\n className={className}\n css={css}\n colorScheme={colorScheme}\n {...getRootProps({ ...groupItemProps, ...rootProps })}\n >\n <Popover.Trigger>\n <SelectField {...getFieldProps(varProps)} />\n </Popover.Trigger>\n\n <InputGroup.Element\n {...{ clickable: clearable && hasValue, ...elementProps }}\n >\n {clearable && hasValue ? (\n <SelectIcon\n icon={clearIcon}\n {...getClearIconProps(iconProps)}\n />\n ) : (\n <SelectIcon icon={icon} {...getIconProps(iconProps)} />\n )}\n </InputGroup.Element>\n </InputGroup.Root>\n\n <SelectContent\n {...cast<SelectContentProps>(\n getContentProps(cast<HTMLProps>(contentProps)),\n )}\n >\n {computedChildren}\n </SelectContent>\n </Popover.Root>\n </ComponentContext>\n </SelectContext>\n </ComboboxContext>\n </ComboboxDescendantsContext>\n )\n },\n \"root\",\n)((props) => {\n const context = useInputPropsContext()\n\n return { ...context, ...props }\n}) as GenericsComponent<{\n <Multiple extends boolean = false>(\n props: SelectRootProps<Multiple>,\n ): ReactElement\n}>\n\ninterface SelectFieldProps extends HTMLStyledProps {}\n\nconst SelectField = withContext<\"div\", SelectFieldProps>(\"div\", \"field\")(\n { \"data-group-propagate\": \"\" },\n ({ children, ...rest }) => ({\n ...rest,\n children: <SelectValueText>{children}</SelectValueText>,\n }),\n)\n\ninterface SelectIconProps extends HTMLStyledProps {\n icon?: ReactNode\n}\n\nconst SelectIcon = withContext<\"div\", SelectIconProps>(\"div\", \"icon\")(\n undefined,\n ({ children, icon, ...rest }) => ({\n children: icon || children || <ChevronDownIcon />,\n ...rest,\n }),\n)\n\ninterface SelectValueTextProps extends HTMLProps<\"span\"> {}\n\nconst SelectValueText = withContext<\"span\", SelectValueTextProps>(\n \"span\",\n \"valueText\",\n)()\n\ninterface SelectContentProps extends Popover.ContentProps {}\n\nconst SelectContent = withContext<\"div\", SelectContentProps>(\n Popover.Content,\n \"content\",\n)()\n\nexport interface SelectLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const SelectLabel = withContext<\"span\", SelectLabelProps>(\n \"span\",\n \"label\",\n)(undefined, (props) => {\n const { getLabelProps } = useComboboxGroupContext()\n\n return getLabelProps(props)\n})\n\nexport interface SelectGroupProps\n extends UseComboboxGroupProps, HTMLStyledProps {\n /**\n * The label of the group.\n */\n label?: ReactNode\n /**\n * Props for the label component.\n */\n labelProps?: SelectLabelProps\n}\n\nexport const SelectGroup = withContext<\"div\", SelectGroupProps>(\n ({ children, label, labelProps, ...rest }) => {\n const { groupProps } = useComponentContext()\n const { getGroupProps, getLabelProps } = useComboboxGroup({\n ...groupProps,\n ...rest,\n })\n const context = useMemo(() => ({ getLabelProps }), [getLabelProps])\n\n return (\n <ComboboxGroupContext value={context}>\n <styled.div {...getGroupProps()}>\n {label ? <SelectLabel {...labelProps}>{label}</SelectLabel> : null}\n {children}\n </styled.div>\n </ComboboxGroupContext>\n )\n },\n \"group\",\n)()\n\nexport interface SelectOptionProps\n extends UseSelectOptionProps, HTMLStyledProps {\n /**\n * The icon to be used in the select option.\n */\n icon?: ReactNode\n}\n\nexport const SelectOption = withContext<\"div\", SelectOptionProps>(\n ({ children, icon: iconProp, ...rest }) => {\n const { optionProps: { icon, ...optionProps } = {} } = useComponentContext()\n const { getIndicatorProps, getOptionProps } = useSelectOption({\n ...optionProps,\n ...rest,\n })\n\n return (\n <styled.div {...getOptionProps()}>\n <SelectIndicator {...getIndicatorProps()}>\n {iconProp ?? icon ?? <CheckIcon />}\n </SelectIndicator>\n {children}\n </styled.div>\n )\n },\n \"option\",\n)()\n\ninterface SelectIndicatorProps extends HTMLStyledProps {}\n\nconst SelectIndicator = withContext<\"div\", SelectIndicatorProps>(\n \"div\",\n \"indicator\",\n)()\n\nexport interface SelectSeparatorProps extends HTMLStyledProps<\"hr\"> {}\n\nexport const SelectSeparator = withContext<\"hr\", SelectSeparatorProps>(\n \"hr\",\n \"separator\",\n)(undefined, (props) => {\n const { getSeparatorProps } = useComponentContext()\n\n return getSeparatorProps(props)\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,MAAM,EACJ,kBACA,cAAc,oBACd,qBACA,iBAAiB,uBACjB,aACA,iBACE,oBACF,UACA,YACD;;;;;;AASD,MAAa,aAAa,cACW,UAAqC;CACtE,MAAM,CACJ,gBACA,EACE,WACA,KACA,aACA,kBAAkB,eAClB,UACA,WACA,YAAY,oBAAC,UAAQ,EACrB,UACA,kBACA,kBACA,MACA,OAAO,WACP,cACA,cACA,YACA,WACA,aACA,kBACA,WACA,GAAG,UAEH,kBAAkB,MAAM;CAC5B,MAAM,oBAAoB,qBAAqB,KAAK;CAUpD,MAAM,EACJ,aACA,oBACA,OAAO,eACP,KACA,aACA,OACA,mBACA,iBACA,eACA,cACA,eACA,cACA,mBACA,cACA,oBACA,UACA,SACA,aACE,UAAU;EAAE,OA5BF,cAA8B;AAC1C,OAAI,UAAW,QAAO;AAEtB,UAAO,mBAAmB,UAAU;IAClC,OAAO;IACP,OAAO;IACP,QAAQ;IACT,CAAC;KACD,CAAC,WAAW,SAAS,CAAC;EAoBF,GAAG;EAAM,GAAG;EAAmB,CAAC;CACvD,MAAM,qBAAqB,eAClB;EACL;EACA;EACA,GAAG;EACJ,GACD;EAAC;EAAiB;EAAU;EAAa,CAC1C;CACD,MAAM,mBAAmB,cAAc;AACrC,MAAI,SACF,QACE,8CACG,cACC,oBAAC;GACC,GAAI;GACJ,QAAQ,CAAC;GACT,OAAM;aAEL;IACY,GACb,MAEH,YACA;AAGP,SAAO,uBAAuB,eAAe;GAC3C,OAAO;GACP,QAAQ;GACT,CAAC;IACD;EACD;EACA;EACA;EACA;EACA;EACD,CAAC;CACF,MAA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AC/B"}
1
+ {"version":3,"file":"select.js","names":["Popover.Root","InputGroup.Root","Popover.Trigger","InputGroup.Element","Popover.Content"],"sources":["../../../../src/components/select/select.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement, ReactNode } from \"react\"\nimport type {\n GenericsComponent,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n} from \"../../core\"\nimport type {\n ComboboxItem,\n UseComboboxGroupProps,\n} from \"../../hooks/use-combobox\"\nimport type { Merge } from \"../../utils\"\nimport type { UseInputBorderProps } from \"../input\"\nimport type { UsePopoverStyleProps, UsePopupAnimationProps } from \"../popover\"\nimport type { SelectStyle } from \"./select.style\"\nimport type {\n UseSelectOptionProps,\n UseSelectProps,\n UseSelectReturn,\n} from \"./use-select\"\nimport { useMemo } from \"react\"\nimport { createSlotComponent, mergeProps, styled } from \"../../core\"\nimport {\n ComboboxContext,\n ComboboxDescendantsContext,\n ComboboxGroupContext,\n createComboboxChildren,\n createComboboxItem,\n useComboboxGroup,\n useComboboxGroupContext,\n} from \"../../hooks/use-combobox\"\nimport { cast, isArray } from \"../../utils\"\nimport { useGroupItemProps } from \"../group\"\nimport { CheckIcon, ChevronDownIcon, XIcon } from \"../icon\"\nimport { InputGroup, useInputBorder, useInputPropsContext } from \"../input\"\nimport { Popover, usePopoverStyleProps } from \"../popover\"\nimport { selectStyle } from \"./select.style\"\nimport { SelectContext, useSelect, useSelectOption } from \"./use-select\"\n\ninterface ComponentContext\n extends\n Pick<UseSelectReturn, \"getSeparatorProps\">,\n Pick<SelectRootProps, \"groupProps\" | \"optionProps\"> {}\n\nexport interface SelectRootProps<Multiple extends boolean = false>\n extends\n Omit<HTMLStyledProps, \"defaultValue\" | \"offset\" | \"onChange\" | \"value\">,\n Merge<UseSelectProps<Multiple>, UsePopoverStyleProps>,\n UsePopupAnimationProps,\n ThemeProps<SelectStyle>,\n UseInputBorderProps {\n /**\n * If `true`, display the clear icon.\n *\n * @default false\n */\n clearable?: boolean\n /**\n * The icon to be used in the clear button.\n */\n clearIcon?: ReactNode\n /**\n * The icon to be used in the select.\n */\n icon?: ReactNode\n /**\n * Props for content element.\n */\n contentProps?: SelectContentProps\n /**\n * The props for the end element.\n */\n elementProps?: InputGroup.ElementProps\n /**\n * Props for group element.\n */\n groupProps?: Omit<SelectGroupProps, \"children\" | \"label\">\n /**\n * Props for icon element.\n */\n iconProps?: SelectIconProps\n /**\n * Props for option element.\n */\n optionProps?: Omit<SelectOptionProps, \"children\" | \"value\">\n /**\n * Props for placeholder element.\n */\n placeholderProps?: Omit<SelectOptionProps, \"children\" | \"value\">\n /**\n * Props for root element.\n */\n rootProps?: InputGroup.RootProps\n}\n\nconst {\n ComponentContext,\n PropsContext: SelectPropsContext,\n useComponentContext,\n usePropsContext: useSelectPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<SelectRootProps, SelectStyle, ComponentContext>(\n \"select\",\n selectStyle,\n)\n\nexport { SelectPropsContext, useSelectPropsContext }\n\n/**\n * `Select` is a component used for allowing a user to choose one option from a list.\n *\n * @see https://yamada-ui.com/docs/components/select\n */\nexport const SelectRoot = withProvider<\"div\", SelectRootProps>(\n <Multiple extends boolean = false>(props: SelectRootProps<Multiple>) => {\n const [\n groupItemProps,\n {\n className,\n css,\n colorScheme,\n animationScheme = \"block-start\",\n children,\n clearable,\n clearIcon = <XIcon />,\n duration,\n errorBorderColor,\n focusBorderColor,\n icon,\n items: itemsProp,\n contentProps,\n elementProps,\n groupProps,\n iconProps,\n optionProps,\n placeholderProps,\n rootProps,\n ...rest\n },\n ] = useGroupItemProps(props)\n const popoverStyleProps = usePopoverStyleProps(rest)\n const items = useMemo<ComboboxItem[]>(() => {\n if (itemsProp) return itemsProp\n\n return createComboboxItem(children, {\n Group: SelectGroup,\n Label: SelectLabel,\n Option: SelectOption,\n })\n }, [itemsProp, children])\n const {\n descendants,\n includePlaceholder,\n items: computedItems,\n max,\n placeholder,\n value,\n getClearIconProps,\n getContentProps,\n getFieldProps,\n getIconProps,\n getInputProps,\n getRootProps,\n getSeparatorProps,\n popoverProps,\n onActiveDescendant,\n onChange,\n onClose,\n onSelect,\n } = useSelect({ items, ...rest, ...popoverStyleProps })\n const mergedPopoverProps = useMemo<Popover.RootProps>(\n () => ({\n animationScheme,\n duration,\n ...popoverProps,\n }),\n [animationScheme, duration, popoverProps],\n )\n const computedChildren = useMemo(() => {\n if (children)\n return (\n <>\n {placeholder ? (\n <SelectOption\n {...placeholderProps}\n hidden={!includePlaceholder}\n value=\"\"\n >\n {placeholder}\n </SelectOption>\n ) : null}\n\n {children}\n </>\n )\n\n return createComboboxChildren(computedItems, {\n Group: SelectGroup,\n Option: SelectOption,\n })\n }, [\n children,\n computedItems,\n placeholder,\n includePlaceholder,\n placeholderProps,\n ])\n const varProps = useInputBorder({ errorBorderColor, focusBorderColor })\n const comboboxContext = useMemo(\n () => ({ max, value, onActiveDescendant, onChange, onClose, onSelect }),\n [max, onActiveDescendant, onChange, onClose, onSelect, value],\n )\n const selectContext = useMemo(() => ({ max, value }), [max, value])\n const componentContext = useMemo(\n () => ({ getSeparatorProps, groupProps, optionProps }),\n [getSeparatorProps, groupProps, optionProps],\n )\n const hasValue = isArray(value) ? !!value.length : !!value\n\n return (\n <ComboboxDescendantsContext value={descendants}>\n <ComboboxContext value={comboboxContext}>\n <SelectContext value={selectContext}>\n <ComponentContext value={componentContext}>\n <Popover.Root {...mergedPopoverProps}>\n <styled.input {...getInputProps()} />\n\n <InputGroup.Root\n {...mergeProps(\n { className, css, colorScheme },\n getRootProps(groupItemProps),\n rootProps,\n )()}\n >\n <Popover.Trigger>\n <SelectField {...getFieldProps(varProps)} />\n </Popover.Trigger>\n\n <InputGroup.Element\n {...{ clickable: clearable && hasValue, ...elementProps }}\n >\n {clearable && hasValue ? (\n <SelectIcon\n icon={clearIcon}\n {...getClearIconProps(iconProps)}\n />\n ) : (\n <SelectIcon icon={icon} {...getIconProps(iconProps)} />\n )}\n </InputGroup.Element>\n </InputGroup.Root>\n\n <SelectContent\n {...cast<SelectContentProps>(\n getContentProps(cast<HTMLProps>(contentProps)),\n )}\n >\n {computedChildren}\n </SelectContent>\n </Popover.Root>\n </ComponentContext>\n </SelectContext>\n </ComboboxContext>\n </ComboboxDescendantsContext>\n )\n },\n \"root\",\n)((props) => {\n const context = useInputPropsContext()\n\n return mergeProps(context, props)()\n}) as GenericsComponent<{\n <Multiple extends boolean = false>(\n props: SelectRootProps<Multiple>,\n ): ReactElement\n}>\n\ninterface SelectFieldProps extends HTMLStyledProps {}\n\nconst SelectField = withContext<\"div\", SelectFieldProps>(\"div\", \"field\")(\n { \"data-group-propagate\": \"\" },\n ({ children, ...rest }) => ({\n ...rest,\n children: <SelectValueText>{children}</SelectValueText>,\n }),\n)\n\ninterface SelectIconProps extends HTMLStyledProps {\n icon?: ReactNode\n}\n\nconst SelectIcon = withContext<\"div\", SelectIconProps>(\"div\", \"icon\")(\n undefined,\n ({ children, icon, ...rest }) => ({\n children: icon || children || <ChevronDownIcon />,\n ...rest,\n }),\n)\n\ninterface SelectValueTextProps extends HTMLProps<\"span\"> {}\n\nconst SelectValueText = withContext<\"span\", SelectValueTextProps>(\n \"span\",\n \"valueText\",\n)()\n\ninterface SelectContentProps extends Popover.ContentProps {}\n\nconst SelectContent = withContext<\"div\", SelectContentProps>(\n Popover.Content,\n \"content\",\n)()\n\nexport interface SelectLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const SelectLabel = withContext<\"span\", SelectLabelProps>(\n \"span\",\n \"label\",\n)(undefined, (props) => {\n const { getLabelProps } = useComboboxGroupContext()\n\n return getLabelProps(props)\n})\n\nexport interface SelectGroupProps\n extends UseComboboxGroupProps, HTMLStyledProps {\n /**\n * The label of the group.\n */\n label?: ReactNode\n /**\n * Props for the label component.\n */\n labelProps?: SelectLabelProps\n}\n\nexport const SelectGroup = withContext<\"div\", SelectGroupProps>(\n ({ children, label, labelProps, ...rest }) => {\n const { groupProps } = useComponentContext()\n const { getGroupProps, getLabelProps } = useComboboxGroup(\n mergeProps(groupProps, rest)(),\n )\n const context = useMemo(() => ({ getLabelProps }), [getLabelProps])\n\n return (\n <ComboboxGroupContext value={context}>\n <styled.div {...getGroupProps()}>\n {label ? <SelectLabel {...labelProps}>{label}</SelectLabel> : null}\n {children}\n </styled.div>\n </ComboboxGroupContext>\n )\n },\n \"group\",\n)()\n\nexport interface SelectOptionProps\n extends UseSelectOptionProps, HTMLStyledProps {\n /**\n * The icon to be used in the select option.\n */\n icon?: ReactNode\n}\n\nexport const SelectOption = withContext<\"div\", SelectOptionProps>(\n ({ children, icon: iconProp, ...rest }) => {\n const { optionProps: { icon, ...optionProps } = {} } = useComponentContext()\n const { getIndicatorProps, getOptionProps } = useSelectOption(\n mergeProps(optionProps, rest)(),\n )\n\n return (\n <styled.div {...getOptionProps()}>\n <SelectIndicator {...getIndicatorProps()}>\n {iconProp ?? icon ?? <CheckIcon />}\n </SelectIndicator>\n {children}\n </styled.div>\n )\n },\n \"option\",\n)()\n\ninterface SelectIndicatorProps extends HTMLStyledProps {}\n\nconst SelectIndicator = withContext<\"div\", SelectIndicatorProps>(\n \"div\",\n \"indicator\",\n)()\n\nexport interface SelectSeparatorProps extends HTMLStyledProps<\"hr\"> {}\n\nexport const SelectSeparator = withContext<\"hr\", SelectSeparatorProps>(\n \"hr\",\n \"separator\",\n)(undefined, (props) => {\n const { getSeparatorProps } = useComponentContext()\n\n return getSeparatorProps(props)\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,MAAM,EACJ,kBACA,cAAc,oBACd,qBACA,iBAAiB,uBACjB,aACA,iBACE,oBACF,UACA,YACD;;;;;;AASD,MAAa,aAAa,cACW,UAAqC;CACtE,MAAM,CACJ,gBACA,EACE,WACA,KACA,aACA,kBAAkB,eAClB,UACA,WACA,YAAY,oBAAC,UAAQ,EACrB,UACA,kBACA,kBACA,MACA,OAAO,WACP,cACA,cACA,YACA,WACA,aACA,kBACA,WACA,GAAG,UAEH,kBAAkB,MAAM;CAC5B,MAAM,o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AAc,CAAC;YAI/D,qBAAC,OAAO;GAAI,GAAI,eAAe;cAC5B,QAAQ,oBAAC;IAAY,GAAI;cAAa;KAAoB,GAAG,MAC7D;IACU;GACQ;GAG3B,QACD,EAAE;AAUH,MAAa,eAAe,aACzB,EAAE,UAAU,MAAM,UAAU,GAAG,WAAW;CACzC,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,gBAAgB,EAAE,KAAK,qBAAqB;CAC5E,MAAM,EAAE,mBAAmB,mBAAmB,gBAC5C,WAAW,aAAa,KAAK,EAAE,CAChC;AAED,QACE,qBAAC,OAAO;EAAI,GAAI,gBAAgB;aAC9B,oBAAC;GAAgB,GAAI,mBAAmB;aACrC,YAAY,QAAQ,oBAAC,cAAY;IAClB,EACjB;GACU;GAGjB,SACD,EAAE;AAIH,MAAM,kBAAkB,YACtB,OACA,YACD,EAAE;AAIH,MAAa,kBAAkB,YAC7B,MACA,YACD,CAAC,SAAY,UAAU;CACtB,MAAM,EAAE,sBAAsB,qBAAqB;AAEnD,QAAO,kBAAkB,MAAM;EAC/B"}
@@ -7,7 +7,7 @@ import { CollapseProps } from "../collapse/collapse.js";
7
7
  import "../../index.js";
8
8
  import { AccordionStyle } from "./accordion.style.js";
9
9
  import { UseAccordionItemProps, UseAccordionProps } from "./use-accordion.js";
10
- import * as react194 from "react";
10
+ import * as react1227 from "react";
11
11
 
12
12
  //#region src/components/accordion/accordion.d.ts
13
13
  interface AccordionCallBackProps {
@@ -31,7 +31,7 @@ interface AccordionRootProps extends Omit<HTMLStyledProps, "onChange">, ThemePro
31
31
  */
32
32
  items?: AccordionItem[];
33
33
  }
34
- declare const AccordionPropsContext: react194.Context<Partial<AccordionRootProps> | undefined>, useAccordionPropsContext: () => Partial<AccordionRootProps> | undefined;
34
+ declare const AccordionPropsContext: react1227.Context<Partial<AccordionRootProps> | undefined>, useAccordionPropsContext: () => Partial<AccordionRootProps> | undefined;
35
35
  /**
36
36
  * `Accordion` is a component for a list that displays information in an expandable or collapsible manner.
37
37
  *
@@ -3,7 +3,7 @@ import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/
3
3
  import "../../index.js";
4
4
 
5
5
  //#region src/components/accordion/accordion.style.d.ts
6
- declare const accordionStyle: ComponentSlotStyle<"button" | "panel" | "icon" | "item" | "root", CSSPropObject<CSSSlotObject<"button" | "panel" | "icon" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"button" | "panel" | "icon" | "item" | "root">>, {
6
+ declare const accordionStyle: ComponentSlotStyle<"button" | "panel" | "icon" | "root" | "item", CSSPropObject<CSSSlotObject<"button" | "panel" | "icon" | "root" | "item">>, CSSModifierObject<CSSSlotObject<"button" | "panel" | "icon" | "root" | "item">>, {
7
7
  panel: {
8
8
  button: {
9
9
  rounded: "l2";
@@ -2,10 +2,10 @@ import { HTMLProps, PropGetter } from "../../core/components/index.types.js";
2
2
  import "../../core/index.js";
3
3
  import { Descendant } from "../../hooks/use-descendants/index.js";
4
4
  import "../../index.js";
5
- import * as react182 from "react";
5
+ import * as react1215 from "react";
6
6
 
7
7
  //#region src/components/accordion/use-accordion.d.ts
8
- declare const AccordionDescendantsContext: react182.Context<{
8
+ declare const AccordionDescendantsContext: react1215.Context<{
9
9
  active: (target?: HTMLButtonElement | Descendant<HTMLButtonElement, {}> | null | undefined, options?: FocusOptions) => void;
10
10
  count: (props?: Partial<{}> | undefined) => number;
11
11
  destroy: () => void;
@@ -24,7 +24,7 @@ declare const AccordionDescendantsContext: react182.Context<{
24
24
  prevValue: (indexOrNode: number | HTMLButtonElement | Descendant<HTMLButtonElement, {}> | null, loop?: boolean, props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}> | undefined;
25
25
  register: (props?: {
26
26
  disabled?: boolean | ((node: HTMLButtonElement) => boolean) | undefined;
27
- } | undefined) => react182.RefCallback<HTMLButtonElement>;
27
+ } | undefined) => react1215.RefCallback<HTMLButtonElement>;
28
28
  unregister: (node?: HTMLButtonElement | null | undefined) => void;
29
29
  value: (indexOrNode: number | HTMLButtonElement | null) => Descendant<HTMLButtonElement, {}> | undefined;
30
30
  values: (props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}>[];
@@ -50,12 +50,12 @@ declare const AccordionDescendantsContext: react182.Context<{
50
50
  prevValue: (indexOrNode: number | HTMLButtonElement | Descendant<HTMLButtonElement, {}> | null, loop?: boolean, props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}> | undefined;
51
51
  register: (props?: {
52
52
  disabled?: boolean | ((node: HTMLButtonElement) => boolean) | undefined;
53
- } | undefined) => react182.RefCallback<HTMLButtonElement>;
53
+ } | undefined) => react1215.RefCallback<HTMLButtonElement>;
54
54
  unregister: (node?: HTMLButtonElement | null | undefined) => void;
55
55
  value: (indexOrNode: number | HTMLButtonElement | null) => Descendant<HTMLButtonElement, {}> | undefined;
56
56
  values: (props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}>[];
57
57
  };
58
- register: react182.RefCallback<HTMLButtonElement>;
58
+ register: react1215.RefCallback<HTMLButtonElement>;
59
59
  }, useAccordionDescendants: () => {
60
60
  active: (target?: HTMLButtonElement | Descendant<HTMLButtonElement, {}> | null | undefined, options?: FocusOptions) => void;
61
61
  count: (props?: Partial<{}> | undefined) => number;
@@ -75,15 +75,15 @@ declare const AccordionDescendantsContext: react182.Context<{
75
75
  prevValue: (indexOrNode: number | HTMLButtonElement | Descendant<HTMLButtonElement, {}> | null, loop?: boolean, props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}> | undefined;
76
76
  register: (props?: {
77
77
  disabled?: boolean | ((node: HTMLButtonElement) => boolean) | undefined;
78
- } | undefined) => react182.RefCallback<HTMLButtonElement>;
78
+ } | undefined) => react1215.RefCallback<HTMLButtonElement>;
79
79
  unregister: (node?: HTMLButtonElement | null | undefined) => void;
80
80
  value: (indexOrNode: number | HTMLButtonElement | null) => Descendant<HTMLButtonElement, {}> | undefined;
81
81
  values: (props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}>[];
82
82
  };
83
83
  interface AccordionContext extends Omit<UseAccordionReturn, "descendants" | "getRootProps"> {}
84
- declare const AccordionContext: react182.Context<AccordionContext>, useAccordionContext: () => AccordionContext;
84
+ declare const AccordionContext: react1215.Context<AccordionContext>, useAccordionContext: () => AccordionContext;
85
85
  interface AccordionItemContext extends Omit<UseAccordionItemReturn, "getItemProps"> {}
86
- declare const AccordionItemContext: react182.Context<AccordionItemContext>, useAccordionItemContext: () => AccordionItemContext;
86
+ declare const AccordionItemContext: react1215.Context<AccordionItemContext>, useAccordionItemContext: () => AccordionItemContext;
87
87
  interface UseAccordionProps extends Omit<HTMLProps, "onChange"> {
88
88
  /**
89
89
  * The initial index(es) of the accordion item to expand.
@@ -137,7 +137,7 @@ declare const useAccordion: ({
137
137
  prevValue: (indexOrNode: number | HTMLButtonElement | Descendant<HTMLButtonElement, {}> | null, loop?: boolean, props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}> | undefined;
138
138
  register: (props?: {
139
139
  disabled?: boolean | ((node: HTMLButtonElement) => boolean) | undefined;
140
- } | undefined) => react182.RefCallback<HTMLButtonElement>;
140
+ } | undefined) => react1215.RefCallback<HTMLButtonElement>;
141
141
  unregister: (node?: HTMLButtonElement | null | undefined) => void;
142
142
  value: (indexOrNode: number | HTMLButtonElement | null) => Descendant<HTMLButtonElement, {}> | undefined;
143
143
  values: (props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}>[];
@@ -145,8 +145,8 @@ declare const useAccordion: ({
145
145
  focusedIndex: number;
146
146
  index: number | number[];
147
147
  multiple: boolean | undefined;
148
- setFocusedIndex: react182.Dispatch<react182.SetStateAction<number>>;
149
- setIndex: react182.Dispatch<react182.SetStateAction<number | number[]>>;
148
+ setFocusedIndex: react1215.Dispatch<react1215.SetStateAction<number>>;
149
+ setIndex: react1215.Dispatch<react1215.SetStateAction<number | number[]>>;
150
150
  toggle: boolean | undefined;
151
151
  getRootProps: PropGetter<"div", undefined, undefined>;
152
152
  };
@@ -6,7 +6,7 @@ import { PortalProps } from "../portal/portal.js";
6
6
  import { UsePopupAnimationProps } from "../popover/popover.js";
7
7
  import { UseActionBarProps } from "./use-action-bar.js";
8
8
  import "../../index.js";
9
- import * as react181 from "react";
9
+ import * as react34 from "react";
10
10
  import { PropsWithChildren, ReactNode } from "react";
11
11
 
12
12
  //#region src/components/action-bar/action-bar.d.ts
@@ -28,7 +28,7 @@ interface ActionBarRootProps extends Omit<HTMLStyledProps, "content">, ThemeProp
28
28
  */
29
29
  onCloseComplete?: () => void;
30
30
  }
31
- declare const ActionBarPropsContext: react181.Context<Partial<ActionBarRootProps> | undefined>, useActionBarPropsContext: () => Partial<ActionBarRootProps> | undefined;
31
+ declare const ActionBarPropsContext: react34.Context<Partial<ActionBarRootProps> | undefined>, useActionBarPropsContext: () => Partial<ActionBarRootProps> | undefined;
32
32
  /**
33
33
  * `ActionBar` is a component that is used to display a bottom action bar with a set of actions.
34
34
  *
@@ -4,7 +4,7 @@ import "../../core/index.js";
4
4
  import { HTMLMotionProps } from "../motion/index.types.js";
5
5
  import { AiryStyle } from "./airy.style.js";
6
6
  import "../../index.js";
7
- import * as react180 from "react";
7
+ import * as react33 from "react";
8
8
  import { ReactNode } from "react";
9
9
 
10
10
  //#region src/components/airy/airy.d.ts
@@ -56,7 +56,7 @@ interface AiryProps extends Omit<HTMLMotionProps<"button">, "onChange">, ThemePr
56
56
  */
57
57
  onChange?: (value: KeyframeIdent) => void;
58
58
  }
59
- declare const AiryPropsContext: react180.Context<Partial<AiryProps> | undefined>, useAiryPropsContext: () => Partial<AiryProps> | undefined;
59
+ declare const AiryPropsContext: react33.Context<Partial<AiryProps> | undefined>, useAiryPropsContext: () => Partial<AiryProps> | undefined;
60
60
  /**
61
61
  * `Airy` is a component that creates an airy animation, switching between two elements when one is clicked.
62
62
  *
@@ -6,7 +6,7 @@ import { IconProps } from "../icon/icon.js";
6
6
  import { LoadingProps } from "../loading/loading.js";
7
7
  import { StatusScheme } from "../status/status.js";
8
8
  import "../../index.js";
9
- import * as react179 from "react";
9
+ import * as react32 from "react";
10
10
 
11
11
  //#region src/components/alert/alert.d.ts
12
12
  interface AlertRootProps extends HTMLStyledProps, ThemeProps<AlertStyle> {
@@ -17,7 +17,7 @@ interface AlertRootProps extends HTMLStyledProps, ThemeProps<AlertStyle> {
17
17
  */
18
18
  status?: StatusScheme;
19
19
  }
20
- declare const AlertPropsContext: react179.Context<Partial<AlertRootProps> | undefined>, useAlertPropsContext: () => Partial<AlertRootProps> | undefined;
20
+ declare const AlertPropsContext: react32.Context<Partial<AlertRootProps> | undefined>, useAlertPropsContext: () => Partial<AlertRootProps> | undefined;
21
21
  /**
22
22
  * `Alert` is a component that conveys information to the user.
23
23
  *
@@ -3,7 +3,7 @@ import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/
3
3
  import "../../index.js";
4
4
 
5
5
  //#region src/components/alert/alert.style.d.ts
6
- declare const alertStyle: ComponentSlotStyle<"title" | "loading" | "icon" | "root" | "description", CSSPropObject<CSSSlotObject<"title" | "loading" | "icon" | "root" | "description">>, CSSModifierObject<CSSSlotObject<"title" | "loading" | "icon" | "root" | "description">>, {
6
+ declare const alertStyle: ComponentSlotStyle<"title" | "loading" | "icon" | "description" | "root", CSSPropObject<CSSSlotObject<"title" | "loading" | "icon" | "description" | "root">>, CSSModifierObject<CSSSlotObject<"title" | "loading" | "icon" | "description" | "root">>, {
7
7
  island: {
8
8
  description: {
9
9
  color: "fg.muted";
@@ -4,7 +4,7 @@ import "../../core/index.js";
4
4
  import { AlphaSliderStyle } from "./alpha-slider.style.js";
5
5
  import { HueSliderOverlayProps, HueSliderRootProps, HueSliderThumbProps, HueSliderTrackProps } from "../hue-slider/hue-slider.js";
6
6
  import "../../index.js";
7
- import * as react86 from "react";
7
+ import * as react60 from "react";
8
8
 
9
9
  //#region src/components/alpha-slider/alpha-slider.d.ts
10
10
  interface AlphaSliderRootProps extends WithoutThemeProps<Omit<HueSliderRootProps, "color" | "max" | "step" | "thumbProps" | "trackProps">, AlphaSliderStyle> {
@@ -37,7 +37,7 @@ interface AlphaSliderRootProps extends WithoutThemeProps<Omit<HueSliderRootProps
37
37
  */
38
38
  trackProps?: AlphaSliderTrackProps;
39
39
  }
40
- declare const AlphaSliderPropsContext: react86.Context<Partial<AlphaSliderRootProps> | undefined>, useAlphaSliderPropsContext: () => Partial<AlphaSliderRootProps> | undefined;
40
+ declare const AlphaSliderPropsContext: react60.Context<Partial<AlphaSliderRootProps> | undefined>, useAlphaSliderPropsContext: () => Partial<AlphaSliderRootProps> | undefined;
41
41
  /**
42
42
  * `AlphaSlider` is a component used to allow the user to select color transparency.
43
43
  *
@@ -2,7 +2,7 @@ import { StyleValue } from "../../core/css/index.types.js";
2
2
  import { Component, HTMLStyledProps } from "../../core/components/index.types.js";
3
3
  import "../../core/index.js";
4
4
  import "../../index.js";
5
- import * as react85 from "react";
5
+ import * as react1236 from "react";
6
6
 
7
7
  //#region src/components/aspect-ratio/aspect-ratio.d.ts
8
8
  interface AspectRatioProps extends HTMLStyledProps {
@@ -13,7 +13,7 @@ interface AspectRatioProps extends HTMLStyledProps {
13
13
  */
14
14
  ratio?: StyleValue<number>;
15
15
  }
16
- declare const AspectRatioPropsContext: react85.Context<Partial<AspectRatioProps> | undefined>, useAspectRatioPropsContext: () => Partial<AspectRatioProps> | undefined;
16
+ declare const AspectRatioPropsContext: react1236.Context<Partial<AspectRatioProps> | undefined>, useAspectRatioPropsContext: () => Partial<AspectRatioProps> | undefined;
17
17
  /**
18
18
  * `AspectRatio` is a component for embedding things like videos and maps while maintaining the aspect ratio.
19
19
  *
@@ -10,7 +10,7 @@ import { InputElementProps } from "../input/input-element.js";
10
10
  import { InputGroupRootProps } from "../input/input-group.js";
11
11
  import { UseAutocompleteOptionProps, UseAutocompleteProps } from "./use-autocomplete.js";
12
12
  import "../../index.js";
13
- import * as react178 from "react";
13
+ import * as react59 from "react";
14
14
  import { ReactElement, ReactNode } from "react";
15
15
 
16
16
  //#region src/components/autocomplete/autocomplete.d.ts
@@ -66,7 +66,7 @@ interface AutocompleteRootProps<Multiple extends boolean = false> extends Omit<H
66
66
  */
67
67
  rootProps?: InputGroupRootProps;
68
68
  }
69
- declare const AutocompletePropsContext: react178.Context<Partial<AutocompleteRootProps<false>> | undefined>, useAutocompletePropsContext: () => Partial<AutocompleteRootProps<false>> | undefined;
69
+ declare const AutocompletePropsContext: react59.Context<Partial<AutocompleteRootProps<false>> | undefined>, useAutocompletePropsContext: () => Partial<AutocompleteRootProps<false>> | undefined;
70
70
  /**
71
71
  * `Autocomplete` is a component used to display suggestions in response to user text input.
72
72
  *
@@ -3,7 +3,7 @@ import { CSSPropObject, CSSSlotObject } from "../../core/css/index.types.js";
3
3
  import "../../index.js";
4
4
 
5
5
  //#region src/components/autocomplete/autocomplete.style.d.ts
6
- declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "field" | "empty" | "indicator" | "valueText", CSSPropObject<CSSSlotObject<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "field" | "empty" | "indicator" | "valueText">>, {
6
+ declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "indicator" | "field" | "valueText" | "empty", CSSPropObject<CSSSlotObject<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "indicator" | "field" | "valueText" | "empty">>, {
7
7
  xs: {
8
8
  empty: {
9
9
  gap: "1.5";
@@ -6,7 +6,7 @@ import { FieldProps } from "../field/field.js";
6
6
  import { Descendant, DescendantProps } from "../../hooks/use-descendants/index.js";
7
7
  import { ComboboxDescendant, ComboboxDescendantProps, ComboboxItem, ComboboxItemWithValue, UseComboboxItemProps, UseComboboxProps } from "../../hooks/use-combobox/index.js";
8
8
  import "../../index.js";
9
- import * as react172 from "react";
9
+ import * as react53 from "react";
10
10
  import { ChangeEvent, ReactNode } from "react";
11
11
 
12
12
  //#region src/components/autocomplete/use-autocomplete.d.ts
@@ -26,7 +26,7 @@ interface AutocompleteFilter {
26
26
  }
27
27
  type AutocompleteMatcher = typeof index_d_exports.match;
28
28
  interface AutocompleteContext extends Pick<UseAutocompleteReturn, "max" | "value"> {}
29
- declare const AutocompleteContext: react172.Context<AutocompleteContext>, useAutocompleteContext: () => AutocompleteContext;
29
+ declare const AutocompleteContext: react53.Context<AutocompleteContext>, useAutocompleteContext: () => AutocompleteContext;
30
30
  interface UseAutocompleteProps<Multiple extends boolean = false> extends Omit<HTMLProps, "defaultValue" | "onChange" | "ref" | "value">, Omit<UseComboboxProps, "defaultValue" | "initialFocusValue" | "onChange" | "ref" | "value">, HTMLRefAttributes<"input">, FieldProps {
31
31
  /**
32
32
  * If `true`, the autocomplete will allow custom value.
@@ -154,7 +154,7 @@ declare const useAutocomplete: <Multiple extends boolean = false>(props?: UseAut
154
154
  lastValue: (props?: Partial<ComboboxDescendantProps> | undefined) => Descendant<HTMLDivElement, ComboboxDescendantProps> | undefined;
155
155
  nextValue: (indexOrNode: number | HTMLDivElement | Descendant<HTMLDivElement, ComboboxDescendantProps> | null, loop?: boolean, props?: Partial<ComboboxDescendantProps> | undefined) => Descendant<HTMLDivElement, ComboboxDescendantProps> | undefined;
156
156
  prevValue: (indexOrNode: number | HTMLDivElement | Descendant<HTMLDivElement, ComboboxDescendantProps> | null, loop?: boolean, props?: Partial<ComboboxDescendantProps> | undefined) => Descendant<HTMLDivElement, ComboboxDescendantProps> | undefined;
157
- register: (props?: DescendantProps<HTMLDivElement, ComboboxDescendantProps> | undefined) => react172.RefCallback<HTMLDivElement>;
157
+ register: (props?: DescendantProps<HTMLDivElement, ComboboxDescendantProps> | undefined) => react53.RefCallback<HTMLDivElement>;
158
158
  unregister: (node?: HTMLDivElement | null | undefined) => void;
159
159
  value: (indexOrNode: number | HTMLDivElement | null) => Descendant<HTMLDivElement, ComboboxDescendantProps> | undefined;
160
160
  values: (props?: Partial<ComboboxDescendantProps> | undefined) => Descendant<HTMLDivElement, ComboboxDescendantProps>[];
@@ -164,8 +164,8 @@ declare const useAutocomplete: <Multiple extends boolean = false>(props?: UseAut
164
164
  items: ComboboxItem[];
165
165
  max: number | undefined;
166
166
  open: boolean;
167
- setInputValue: react172.Dispatch<react172.SetStateAction<string>>;
168
- setValue: react172.Dispatch<react172.SetStateAction<Multiple extends true ? string[] : string>>;
167
+ setInputValue: react53.Dispatch<react53.SetStateAction<string>>;
168
+ setValue: react53.Dispatch<react53.SetStateAction<Multiple extends true ? string[] : string>>;
169
169
  value: Multiple extends true ? string[] : string;
170
170
  valueMap: {
171
171
  [key: string]: ComboboxItemWithValue;
@@ -6,9 +6,9 @@ import "../../core/index.js";
6
6
  import { AvatarStyle } from "./avatar.style.js";
7
7
  import { UseAvatarProps } from "./use-avatar.js";
8
8
  import "../../index.js";
9
- import * as react108 from "react";
9
+ import * as react1233 from "react";
10
10
  import { ReactElement } from "react";
11
- import * as _yamada_ui_utils3 from "@yamada-ui/utils";
11
+ import * as _yamada_ui_utils19 from "@yamada-ui/utils";
12
12
 
13
13
  //#region src/components/avatar/avatar.d.ts
14
14
  interface AvatarProps extends HTMLStyledProps, ThemeProps<AvatarStyle>, UseAvatarProps {
@@ -25,7 +25,7 @@ interface AvatarProps extends HTMLStyledProps, ThemeProps<AvatarStyle>, UseAvata
25
25
  */
26
26
  imageProps?: AvatarImageProps;
27
27
  }
28
- declare const component: <H extends "fragment" | As = "div", R extends _yamada_ui_utils3.Dict = _yamada_ui_utils3.Dict<any>>(el: H | react108.FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
28
+ declare const component: <H extends "fragment" | As = "div", R extends _yamada_ui_utils19.Dict = _yamada_ui_utils19.Dict<any>>(el: H | react1233.FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
29
29
  shape: {
30
30
  circle: {
31
31
  root: {
@@ -148,7 +148,7 @@ declare const component: <H extends "fragment" | As = "div", R extends _yamada_u
148
148
  name,
149
149
  className,
150
150
  ...options
151
- }?: ComponentOptions) => (initialProps?: InitialProps<R>, ...superProps: SuperProps<R>[]) => H extends "fragment" ? react108.FunctionComponent<R> : Component<Exclude<H, "fragment">, R>, AvatarPropsContext: react108.Context<Partial<AvatarProps> | undefined>, useAvatarPropsContext: () => Partial<AvatarProps> | undefined, useRootComponentProps: <Y extends _yamada_ui_utils3.Dict = {}, R extends keyof Y = keyof Y>(props: Y, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
151
+ }?: ComponentOptions) => (initialProps?: InitialProps<R>, ...superProps: SuperProps<R>[]) => H extends "fragment" ? react1233.FunctionComponent<R> : Component<Exclude<H, "fragment">, R>, AvatarPropsContext: react1233.Context<Partial<AvatarProps> | undefined>, useAvatarPropsContext: () => Partial<AvatarProps> | undefined, useRootComponentProps: <Y extends _yamada_ui_utils19.Dict = {}, R extends keyof Y = keyof Y>(props: Y, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
152
152
  shape: {
153
153
  circle: {
154
154
  root: {
@@ -271,7 +271,7 @@ declare const component: <H extends "fragment" | As = "div", R extends _yamada_u
271
271
  className,
272
272
  withContext,
273
273
  transferProps
274
- }?: UseComponentPropsOptions<R>) => [CSSSlotObject, _yamada_ui_utils3.Merge<WithoutThemeProps<Y, ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
274
+ }?: UseComponentPropsOptions<R>) => [CSSSlotObject, _yamada_ui_utils19.Merge<WithoutThemeProps<Y, ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
275
275
  shape: {
276
276
  circle: {
277
277
  root: {