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

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 (251) hide show
  1. package/dist/cjs/components/native-select/native-select.cjs +7 -11
  2. package/dist/cjs/components/native-select/native-select.cjs.map +1 -1
  3. package/dist/cjs/components/select/select.cjs +9 -19
  4. package/dist/cjs/components/select/select.cjs.map +1 -1
  5. package/dist/esm/components/native-select/native-select.js +7 -11
  6. package/dist/esm/components/native-select/native-select.js.map +1 -1
  7. package/dist/esm/components/select/select.js +9 -19
  8. package/dist/esm/components/select/select.js.map +1 -1
  9. package/dist/types/components/accordion/accordion.d.ts +4 -2
  10. package/dist/types/components/accordion/accordion.style.d.ts +1 -1
  11. package/dist/types/components/accordion/use-accordion.d.ts +11 -11
  12. package/dist/types/components/action-bar/action-bar.d.ts +3 -2
  13. package/dist/types/components/airy/airy.d.ts +3 -2
  14. package/dist/types/components/alert/alert.d.ts +5 -2
  15. package/dist/types/components/alpha-slider/alpha-slider.d.ts +3 -2
  16. package/dist/types/components/aspect-ratio/aspect-ratio.d.ts +2 -2
  17. package/dist/types/components/autocomplete/autocomplete.d.ts +4 -2
  18. package/dist/types/components/autocomplete/use-autocomplete.d.ts +7 -5
  19. package/dist/types/components/avatar/avatar.d.ts +5 -5
  20. package/dist/types/components/avatar/use-avatar-group.d.ts +2 -2
  21. package/dist/types/components/badge/badge.d.ts +2 -2
  22. package/dist/types/components/bleed/bleed.d.ts +2 -2
  23. package/dist/types/components/blockquote/blockquote.d.ts +2 -2
  24. package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
  25. package/dist/types/components/breadcrumb/breadcrumb.style.d.ts +1 -1
  26. package/dist/types/components/breadcrumb/use-breadcrumb.d.ts +2 -2
  27. package/dist/types/components/button/button-group.d.ts +1 -0
  28. package/dist/types/components/button/button.d.ts +3 -2
  29. package/dist/types/components/button/icon-button.d.ts +2 -2
  30. package/dist/types/components/calendar/calendar.d.ts +3 -2
  31. package/dist/types/components/calendar/calendar.style.d.ts +2 -2
  32. package/dist/types/components/calendar/use-calendar.d.ts +9 -8
  33. package/dist/types/components/card/card.d.ts +2 -2
  34. package/dist/types/components/carousel/carousel.d.ts +3 -2
  35. package/dist/types/components/carousel/carousel.style.d.ts +2 -2
  36. package/dist/types/components/carousel/use-carousel.d.ts +3 -3
  37. package/dist/types/components/center/center.d.ts +2 -2
  38. package/dist/types/components/chart/chart.d.ts +5 -5
  39. package/dist/types/components/chart/composed-chart.d.ts +2 -2
  40. package/dist/types/components/chart/donut-chart.d.ts +2 -2
  41. package/dist/types/components/chart/line-chart.d.ts +2 -2
  42. package/dist/types/components/chart/pie-chart.d.ts +2 -2
  43. package/dist/types/components/chart/use-chart.d.ts +2 -2
  44. package/dist/types/components/checkbox/checkbox-group.d.ts +2 -0
  45. package/dist/types/components/checkbox/checkbox.d.ts +5 -4
  46. package/dist/types/components/checkbox/use-checkbox-group.d.ts +3 -2
  47. package/dist/types/components/checkbox/use-checkbox.d.ts +1 -0
  48. package/dist/types/components/checkbox-card/checkbox-card-group.d.ts +3 -0
  49. package/dist/types/components/checkbox-card/checkbox-card.d.ts +6 -4
  50. package/dist/types/components/circle-progress/circle-progress.d.ts +3 -2
  51. package/dist/types/components/close-button/close-button.d.ts +3 -2
  52. package/dist/types/components/code/code.d.ts +2 -2
  53. package/dist/types/components/collapse/collapse.d.ts +3 -2
  54. package/dist/types/components/color-picker/color-picker.d.ts +6 -2
  55. package/dist/types/components/color-picker/color-picker.style.d.ts +1 -1
  56. package/dist/types/components/color-picker/use-color-picker.d.ts +5 -2
  57. package/dist/types/components/color-selector/color-selector.d.ts +6 -2
  58. package/dist/types/components/color-selector/use-color-selector.d.ts +5 -3
  59. package/dist/types/components/color-swatch/color-swatch.d.ts +2 -2
  60. package/dist/types/components/container/container.d.ts +2 -2
  61. package/dist/types/components/data-list/data-list.d.ts +2 -2
  62. package/dist/types/components/data-list/data-list.style.d.ts +1 -1
  63. package/dist/types/components/date-picker/date-picker.d.ts +5 -2
  64. package/dist/types/components/date-picker/use-date-picker.d.ts +7 -4
  65. package/dist/types/components/drawer/drawer.d.ts +5 -2
  66. package/dist/types/components/drawer/use-drawer.d.ts +2 -0
  67. package/dist/types/components/dropzone/dropzone.d.ts +7 -4
  68. package/dist/types/components/dropzone/use-dropzone.d.ts +1 -0
  69. package/dist/types/components/editable/editable.d.ts +5 -4
  70. package/dist/types/components/editable/editable.style.d.ts +1 -1
  71. package/dist/types/components/editable/use-editable.d.ts +3 -2
  72. package/dist/types/components/em/em.d.ts +2 -2
  73. package/dist/types/components/empty-state/empty-state.d.ts +2 -2
  74. package/dist/types/components/fade/fade.d.ts +3 -2
  75. package/dist/types/components/fade-scale/fade-scale.d.ts +1 -0
  76. package/dist/types/components/field/field.d.ts +3 -3
  77. package/dist/types/components/field/use-field-props.d.ts +4 -4
  78. package/dist/types/components/fieldset/fieldset.d.ts +4 -3
  79. package/dist/types/components/file-button/file-button.d.ts +4 -2
  80. package/dist/types/components/file-button/use-file-button.d.ts +20 -18
  81. package/dist/types/components/file-input/file-input.d.ts +4 -2
  82. package/dist/types/components/file-input/use-file-input.d.ts +16 -15
  83. package/dist/types/components/flex/flex.d.ts +2 -2
  84. package/dist/types/components/flip/flip.d.ts +5 -4
  85. package/dist/types/components/flip/flip.style.d.ts +1 -1
  86. package/dist/types/components/float/float.d.ts +2 -2
  87. package/dist/types/components/form/form.d.ts +4 -3
  88. package/dist/types/components/format/format-byte.d.ts +4 -4
  89. package/dist/types/components/format/format-date-time.d.ts +4 -4
  90. package/dist/types/components/format/format-number.d.ts +2 -2
  91. package/dist/types/components/format/use-format-byte.d.ts +1 -0
  92. package/dist/types/components/format/use-format-date-time.d.ts +1 -0
  93. package/dist/types/components/format/use-format-number.d.ts +1 -0
  94. package/dist/types/components/grid/grid-item.d.ts +2 -2
  95. package/dist/types/components/grid/grid.d.ts +2 -2
  96. package/dist/types/components/group/group.d.ts +3 -2
  97. package/dist/types/components/group/use-group.d.ts +2 -2
  98. package/dist/types/components/heading/heading.d.ts +2 -2
  99. package/dist/types/components/highlight/highlight.d.ts +2 -0
  100. package/dist/types/components/hue-slider/hue-slider.d.ts +4 -3
  101. package/dist/types/components/icon/icon.d.ts +5 -5
  102. package/dist/types/components/image/image.d.ts +2 -2
  103. package/dist/types/components/indicator/indicator.d.ts +5 -4
  104. package/dist/types/components/infinite-scroll-area/infinite-scroll-area.d.ts +2 -2
  105. package/dist/types/components/input/input-addon.d.ts +2 -2
  106. package/dist/types/components/input/input-element.d.ts +2 -2
  107. package/dist/types/components/input/input-group.d.ts +2 -0
  108. package/dist/types/components/input/input.d.ts +3 -2
  109. package/dist/types/components/kbd/kbd.d.ts +2 -2
  110. package/dist/types/components/link/link.d.ts +2 -2
  111. package/dist/types/components/link-box/link-box.d.ts +2 -2
  112. package/dist/types/components/list/list.d.ts +2 -2
  113. package/dist/types/components/list/list.style.d.ts +2 -2
  114. package/dist/types/components/loading/loading-provider.d.ts +2 -2
  115. package/dist/types/components/loading/loading.d.ts +4 -3
  116. package/dist/types/components/loading/use-loading-component.d.ts +1 -0
  117. package/dist/types/components/mark/mark.d.ts +2 -2
  118. package/dist/types/components/menu/menu.d.ts +3 -2
  119. package/dist/types/components/menu/menu.style.d.ts +2 -2
  120. package/dist/types/components/menu/use-menu.d.ts +11 -11
  121. package/dist/types/components/modal/modal.d.ts +6 -2
  122. package/dist/types/components/native-accordion/native-accordion.d.ts +2 -2
  123. package/dist/types/components/native-accordion/native-accordion.style.d.ts +2 -2
  124. package/dist/types/components/native-accordion/use-native-accordion.d.ts +2 -2
  125. package/dist/types/components/native-popover/native-popover.d.ts +2 -2
  126. package/dist/types/components/native-select/native-select.d.ts +4 -2
  127. package/dist/types/components/native-select/use-native-select.d.ts +1 -0
  128. package/dist/types/components/native-table/native-table.d.ts +4 -4
  129. package/dist/types/components/notice/notice.style.d.ts +1 -1
  130. package/dist/types/components/notice/use-notice.d.ts +3 -0
  131. package/dist/types/components/number-input/number-input.d.ts +3 -2
  132. package/dist/types/components/number-input/number-input.style.d.ts +1 -1
  133. package/dist/types/components/number-input/use-number-input.d.ts +1 -0
  134. package/dist/types/components/pagination/pagination.d.ts +3 -2
  135. package/dist/types/components/pagination/pagination.style.d.ts +1 -1
  136. package/dist/types/components/pagination/use-pagination.d.ts +2 -2
  137. package/dist/types/components/password-input/password-input.d.ts +3 -2
  138. package/dist/types/components/password-input/strength-meter.d.ts +2 -2
  139. package/dist/types/components/password-input/use-password-input.d.ts +3 -2
  140. package/dist/types/components/picture/picture.d.ts +1 -0
  141. package/dist/types/components/pin-input/pin-input.d.ts +4 -2
  142. package/dist/types/components/pin-input/use-pin-input.d.ts +8 -7
  143. package/dist/types/components/popover/popover.d.ts +3 -2
  144. package/dist/types/components/progress/progress.d.ts +2 -2
  145. package/dist/types/components/progress/use-progress.d.ts +706 -706
  146. package/dist/types/components/qr-code/qr-code.d.ts +2 -2
  147. package/dist/types/components/radio/radio-group.d.ts +2 -0
  148. package/dist/types/components/radio/radio.d.ts +5 -4
  149. package/dist/types/components/radio/use-radio-group.d.ts +3 -2
  150. package/dist/types/components/radio/use-radio.d.ts +1 -0
  151. package/dist/types/components/radio-card/radio-card-group.d.ts +3 -0
  152. package/dist/types/components/radio-card/radio-card.d.ts +6 -4
  153. package/dist/types/components/rating/rating.style.d.ts +2 -2
  154. package/dist/types/components/rating/use-rating.d.ts +8 -7
  155. package/dist/types/components/reorder/reorder.d.ts +3 -2
  156. package/dist/types/components/reorder/reorder.style.d.ts +1 -1
  157. package/dist/types/components/reorder/use-reorder.d.ts +3 -3
  158. package/dist/types/components/resizable/resizable.d.ts +2 -2
  159. package/dist/types/components/resizable/resizable.style.d.ts +2 -2
  160. package/dist/types/components/resizable/use-resizable.d.ts +2 -2
  161. package/dist/types/components/ripple/ripple.d.ts +3 -2
  162. package/dist/types/components/ripple/use-ripple.d.ts +2 -2
  163. package/dist/types/components/rotate/rotate.d.ts +3 -2
  164. package/dist/types/components/saturation-slider/saturation-slider.d.ts +2 -2
  165. package/dist/types/components/saturation-slider/use-saturation-slider.d.ts +3 -2
  166. package/dist/types/components/scroll-area/scroll-area.d.ts +2 -2
  167. package/dist/types/components/segmented-control/segmented-control.d.ts +3 -2
  168. package/dist/types/components/segmented-control/segmented-control.style.d.ts +2 -2
  169. package/dist/types/components/segmented-control/use-segmented-control.d.ts +10 -9
  170. package/dist/types/components/select/select.d.ts +4 -2
  171. package/dist/types/components/select/use-select.d.ts +6 -4
  172. package/dist/types/components/separator/separator.d.ts +2 -2
  173. package/dist/types/components/sidebar/sidebar.d.ts +7 -2
  174. package/dist/types/components/sidebar/use-sidebar.d.ts +9 -9
  175. package/dist/types/components/simple-grid/simple-grid.d.ts +3 -2
  176. package/dist/types/components/skeleton/skeleton.d.ts +2 -2
  177. package/dist/types/components/slide/slide.d.ts +3 -2
  178. package/dist/types/components/slide-fade/slide-fade.d.ts +3 -2
  179. package/dist/types/components/slider/slider.d.ts +2 -2
  180. package/dist/types/components/slider/use-slider.d.ts +3 -2
  181. package/dist/types/components/snacks/snacks.d.ts +2 -0
  182. package/dist/types/components/snacks/use-snacks.d.ts +1 -0
  183. package/dist/types/components/stack/h-stack.d.ts +2 -2
  184. package/dist/types/components/stack/stack.d.ts +2 -2
  185. package/dist/types/components/stack/v-stack.d.ts +2 -2
  186. package/dist/types/components/stack/z-stack.d.ts +2 -2
  187. package/dist/types/components/stat/stat.d.ts +2 -2
  188. package/dist/types/components/status/status.d.ts +2 -2
  189. package/dist/types/components/steps/steps.d.ts +2 -2
  190. package/dist/types/components/steps/steps.style.d.ts +1 -1
  191. package/dist/types/components/steps/use-steps.d.ts +10 -10
  192. package/dist/types/components/switch/switch.d.ts +2 -2
  193. package/dist/types/components/switch/use-switch.d.ts +1 -0
  194. package/dist/types/components/table/table.d.ts +4 -2
  195. package/dist/types/components/tabs/tabs.d.ts +2 -2
  196. package/dist/types/components/tabs/use-tabs.d.ts +16 -16
  197. package/dist/types/components/tag/tag.d.ts +2 -2
  198. package/dist/types/components/text/text.d.ts +2 -2
  199. package/dist/types/components/textarea/textarea.d.ts +4 -2
  200. package/dist/types/components/textarea/use-autosize.d.ts +2 -2
  201. package/dist/types/components/timeline/timeline.d.ts +5 -5
  202. package/dist/types/components/timeline/timeline.style.d.ts +1 -1
  203. package/dist/types/components/tip/tip.d.ts +3 -0
  204. package/dist/types/components/toggle/toggle-group.d.ts +1 -1
  205. package/dist/types/components/toggle/toggle.d.ts +5 -3
  206. package/dist/types/components/toggle/use-toggle-group.d.ts +2 -2
  207. package/dist/types/components/toggle/use-toggle.d.ts +3 -2
  208. package/dist/types/components/tooltip/tooltip.d.ts +4 -2
  209. package/dist/types/components/tree/tree.d.ts +6 -2
  210. package/dist/types/components/tree/tree.style.d.ts +1 -1
  211. package/dist/types/components/tree/use-tree.d.ts +183 -182
  212. package/dist/types/components/visually-hidden/visually-hidden.d.ts +2 -2
  213. package/dist/types/components/wrap/wrap.d.ts +3 -2
  214. package/dist/types/core/components/create-component.d.ts +7 -9
  215. package/dist/types/core/components/index.types.d.ts +0 -1
  216. package/dist/types/core/components/use-component-style.d.ts +0 -2
  217. package/dist/types/core/components/utils.d.ts +0 -1
  218. package/dist/types/core/constant.d.ts +0 -1
  219. package/dist/types/core/css/calc.d.ts +0 -1
  220. package/dist/types/core/css/config.d.ts +0 -1
  221. package/dist/types/core/css/css.d.ts +0 -1
  222. package/dist/types/core/css/index.types.d.ts +0 -1
  223. package/dist/types/core/css/styles.d.ts +0 -1
  224. package/dist/types/core/css/token.d.ts +0 -1
  225. package/dist/types/core/css/use-css.d.ts +0 -1
  226. package/dist/types/core/css/utils.d.ts +0 -2
  227. package/dist/types/core/generated-theme-tokens.types.d.ts +0 -1
  228. package/dist/types/core/index.d.ts +0 -2
  229. package/dist/types/core/system/color-mode-provider.d.ts +2 -2
  230. package/dist/types/core/system/config.d.ts +0 -1
  231. package/dist/types/core/system/create-system.d.ts +0 -1
  232. package/dist/types/core/system/factory.d.ts +0 -1
  233. package/dist/types/core/system/index.types.d.ts +0 -1
  234. package/dist/types/core/system/storage-script.d.ts +3 -3
  235. package/dist/types/core/system/styled.d.ts +2 -3
  236. package/dist/types/core/system/system-provider.d.ts +2 -2
  237. package/dist/types/core/system/var.d.ts +0 -2
  238. package/dist/types/hooks/use-async-callback/index.d.ts +1 -0
  239. package/dist/types/hooks/use-breakpoint/use-breakpoint-state.d.ts +2 -2
  240. package/dist/types/hooks/use-clickable/index.d.ts +7 -7
  241. package/dist/types/hooks/use-clipboard/index.d.ts +2 -2
  242. package/dist/types/hooks/use-combobox/index.d.ts +13 -12
  243. package/dist/types/hooks/use-counter/index.d.ts +2 -2
  244. package/dist/types/hooks/use-descendants/index.d.ts +2 -2
  245. package/dist/types/hooks/use-field-sizing/index.d.ts +2 -2
  246. package/dist/types/hooks/use-popper/index.d.ts +2 -2
  247. package/dist/types/hooks/use-resize-observer/index.d.ts +3 -3
  248. package/dist/types/index.d.ts +106 -0
  249. package/dist/types/providers/i18n-provider/i18n-provider.d.ts +3 -3
  250. package/dist/types/providers/ui-provider/ui-provider.d.ts +3 -2
  251. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
4
+ const require_props = require('../../core/components/props.cjs');
4
5
  const require_create_component = require('../../core/components/create-component.cjs');
5
6
  require('../../core/index.cjs');
6
7
  const require_chevron_down_icon = require('../icon/icons/chevron-down-icon.cjs');
@@ -31,13 +32,11 @@ const NativeSelectRoot = withProvider((props) => {
31
32
  focusBorderColor
32
33
  });
33
34
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_input_group.InputGroupRoot, {
34
- className,
35
- css,
36
- colorScheme,
37
- ...getRootProps({
38
- ...groupItemProps,
39
- ...rootProps
40
- }),
35
+ ...require_props.mergeProps({
36
+ className,
37
+ css,
38
+ colorScheme
39
+ }, getRootProps(groupItemProps), rootProps)(),
41
40
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(NativeSelectField, { ...getFieldProps(varProps) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_input_element.InputElement, {
42
41
  ...elementProps,
43
42
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NativeSelectIcon, {
@@ -47,10 +46,7 @@ const NativeSelectRoot = withProvider((props) => {
47
46
  })]
48
47
  });
49
48
  }, "root")((props) => {
50
- return {
51
- ...require_input.useInputPropsContext(),
52
- ...props
53
- };
49
+ return require_props.mergeProps(require_input.useInputPropsContext(), props)();
54
50
  });
55
51
  const NativeSelectField = withContext("select", "field")({ "data-group-propagate": "" });
56
52
  const NativeSelectIcon = withContext("div", "icon")(void 0, ({ children, icon, ...rest }) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"native-select.cjs","names":["createSlotComponent","nativeSelectStyle","useGroupItemProps","useNativeSelect","useInputBorder","useInputPropsContext","ChevronDownIcon"],"sources":["../../../../src/components/native-select/native-select.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactNode } from \"react\"\nimport type { HTMLProps, HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport type { UseInputBorderProps } from \"../input\"\nimport type { NativeSelectStyle } from \"./native-select.style\"\nimport type { UseNativeSelectProps } from \"./use-native-select\"\nimport { createSlotComponent } from \"../../core\"\nimport { useGroupItemProps } from \"../group\"\nimport { ChevronDownIcon } from \"../icon\"\nimport { InputGroup, useInputBorder, useInputPropsContext } from \"../input\"\nimport { nativeSelectStyle } from \"./native-select.style\"\nimport { useNativeSelect } from \"./use-native-select\"\n\nexport interface NativeSelectRootProps\n extends\n Omit<HTMLStyledProps<\"select\">, \"size\">,\n UseNativeSelectProps,\n ThemeProps<NativeSelectStyle>,\n FieldProps,\n UseInputBorderProps {\n /**\n * The icon to be used in the select.\n */\n icon?: ReactNode\n /**\n * The props for the end element.\n */\n elementProps?: InputGroup.ElementProps\n /**\n * Props for icon element.\n */\n iconProps?: NativeSelectIconProps\n /**\n * Props for root element.\n */\n rootProps?: InputGroup.RootProps\n}\n\nconst {\n component,\n PropsContext: NativeSelectPropsContext,\n usePropsContext: useNativeSelectPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<NativeSelectRootProps, NativeSelectStyle>(\n \"native-select\",\n nativeSelectStyle,\n)\n\nexport { NativeSelectPropsContext, useNativeSelectPropsContext }\n\n/**\n * `NativeSelect` is a component used for allowing users to select one option from a list. It displays a native dropdown list provided by the browser (user agent).\n *\n * @see https://yamada-ui.com/docs/components/native-select\n */\nexport const NativeSelectRoot = withProvider<\"select\", NativeSelectRootProps>(\n (props) => {\n const [\n groupItemProps,\n {\n className,\n css,\n colorScheme,\n errorBorderColor,\n focusBorderColor,\n icon,\n elementProps,\n iconProps,\n rootProps,\n ...rest\n },\n ] = useGroupItemProps(props)\n const { getFieldProps, getIconProps, getRootProps } = useNativeSelect(rest)\n const varProps = useInputBorder({\n errorBorderColor,\n focusBorderColor,\n })\n\n return (\n <InputGroup.Root\n className={className}\n css={css}\n colorScheme={colorScheme}\n {...getRootProps({ ...groupItemProps, ...rootProps })}\n >\n <NativeSelectField {...getFieldProps(varProps)} />\n\n <InputGroup.Element {...elementProps}>\n <NativeSelectIcon icon={icon} {...getIconProps(iconProps)} />\n </InputGroup.Element>\n </InputGroup.Root>\n )\n },\n \"root\",\n)((props) => {\n const context = useInputPropsContext()\n\n return { ...context, ...props }\n})\n\ninterface NativeSelectFieldProps extends HTMLStyledProps<\"select\"> {}\n\nconst NativeSelectField = withContext<\"select\", NativeSelectFieldProps>(\n \"select\",\n \"field\",\n)({ \"data-group-propagate\": \"\" })\n\ninterface NativeSelectIconProps extends HTMLStyledProps {\n icon?: ReactNode\n}\n\nconst NativeSelectIcon = withContext<\"div\", NativeSelectIconProps>(\n \"div\",\n \"icon\",\n)(undefined, ({ children, icon, ...rest }) => ({\n children: icon || children || <ChevronDownIcon />,\n ...rest,\n}))\n\nexport interface NativeSelectGroupProps extends HTMLProps<\"optgroup\"> {}\n\nexport const NativeSelectGroup = component<\"optgroup\", NativeSelectGroupProps>(\n \"optgroup\",\n \"group\",\n)()\n\nexport interface NativeSelectOptionProps extends HTMLProps<\"option\"> {}\n\nexport const NativeSelectOption = component<\"option\", NativeSelectOptionProps>(\n \"option\",\n \"option\",\n)()\n\nexport interface NativeSelectSeparatorProps extends HTMLProps<\"hr\"> {}\n\nexport const NativeSelectSeparator = component<\n \"hr\",\n NativeSelectSeparatorProps\n>(\"hr\", \"separator\")()\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAwCA,MAAM,EACJ,WACA,cAAc,0BACd,iBAAiB,6BACjB,aACA,iBACEA,6CACF,iBACAC,8CACD;;;;;;AASD,MAAa,mBAAmB,cAC7B,UAAU;CACT,MAAM,CACJ,gBACA,EACE,WACA,KACA,aACA,kBACA,kBACA,MACA,cACA,WACA,WACA,GAAG,UAEHC,oCAAkB,MAAM;CAC5B,MAAM,EAAE,eAAe,cAAc,iBAAiBC,0CAAgB,KAAK;CAC3E,MAAM,WAAWC,wCAAe;EAC9B;EACA;EACD,CAAC;AAEF,QACE;EACa;EACN;EACQ;EACb,GAAI,aAAa;GAAE,GAAG;GAAgB,GAAG;GAAW,CAAC;aAErD,2CAAC,qBAAkB,GAAI,cAAc,SAAS,GAAI,EAElD;GAAoB,GAAI;aACtB,2CAAC;IAAuB;IAAM,GAAI,aAAa,UAAU;KAAI;IAC1C;GACL;GAGtB,OACD,EAAE,UAAU;AAGX,QAAO;EAAE,GAFOC,oCAAsB;EAEjB,GAAG;EAAO;EAC/B;AAIF,MAAM,oBAAoB,YACxB,UACA,QACD,CAAC,EAAE,wBAAwB,IAAI,CAAC;AAMjC,MAAM,mBAAmB,YACvB,OACA,OACD,CAAC,SAAY,EAAE,UAAU,MAAM,GAAG,YAAY;CAC7C,UAAU,QAAQ,YAAY,2CAACC,8CAAkB;CACjD,GAAG;CACJ,EAAE;AAIH,MAAa,oBAAoB,UAC/B,YACA,QACD,EAAE;AAIH,MAAa,qBAAqB,UAChC,UACA,SACD,EAAE;AAIH,MAAa,wBAAwB,UAGnC,MAAM,YAAY,EAAE"}
1
+ {"version":3,"file":"native-select.cjs","names":["createSlotComponent","nativeSelectStyle","useGroupItemProps","useNativeSelect","useInputBorder","mergeProps","useInputPropsContext","ChevronDownIcon"],"sources":["../../../../src/components/native-select/native-select.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactNode } from \"react\"\nimport type { HTMLProps, HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport type { UseInputBorderProps } from \"../input\"\nimport type { NativeSelectStyle } from \"./native-select.style\"\nimport type { UseNativeSelectProps } from \"./use-native-select\"\nimport { createSlotComponent, mergeProps } from \"../../core\"\nimport { useGroupItemProps } from \"../group\"\nimport { ChevronDownIcon } from \"../icon\"\nimport { InputGroup, useInputBorder, useInputPropsContext } from \"../input\"\nimport { nativeSelectStyle } from \"./native-select.style\"\nimport { useNativeSelect } from \"./use-native-select\"\n\nexport interface NativeSelectRootProps\n extends\n Omit<HTMLStyledProps<\"select\">, \"size\">,\n UseNativeSelectProps,\n ThemeProps<NativeSelectStyle>,\n FieldProps,\n UseInputBorderProps {\n /**\n * The icon to be used in the select.\n */\n icon?: ReactNode\n /**\n * The props for the end element.\n */\n elementProps?: InputGroup.ElementProps\n /**\n * Props for icon element.\n */\n iconProps?: NativeSelectIconProps\n /**\n * Props for root element.\n */\n rootProps?: InputGroup.RootProps\n}\n\nconst {\n component,\n PropsContext: NativeSelectPropsContext,\n usePropsContext: useNativeSelectPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<NativeSelectRootProps, NativeSelectStyle>(\n \"native-select\",\n nativeSelectStyle,\n)\n\nexport { NativeSelectPropsContext, useNativeSelectPropsContext }\n\n/**\n * `NativeSelect` is a component used for allowing users to select one option from a list. It displays a native dropdown list provided by the browser (user agent).\n *\n * @see https://yamada-ui.com/docs/components/native-select\n */\nexport const NativeSelectRoot = withProvider<\"select\", NativeSelectRootProps>(\n (props) => {\n const [\n groupItemProps,\n {\n className,\n css,\n colorScheme,\n errorBorderColor,\n focusBorderColor,\n icon,\n elementProps,\n iconProps,\n rootProps,\n ...rest\n },\n ] = useGroupItemProps(props)\n const { getFieldProps, getIconProps, getRootProps } = useNativeSelect(rest)\n const varProps = useInputBorder({\n errorBorderColor,\n focusBorderColor,\n })\n\n return (\n <InputGroup.Root\n {...mergeProps(\n { className, css, colorScheme },\n getRootProps(groupItemProps),\n rootProps,\n )()}\n >\n <NativeSelectField {...getFieldProps(varProps)} />\n\n <InputGroup.Element {...elementProps}>\n <NativeSelectIcon icon={icon} {...getIconProps(iconProps)} />\n </InputGroup.Element>\n </InputGroup.Root>\n )\n },\n \"root\",\n)((props) => {\n const context = useInputPropsContext()\n\n return mergeProps(context, props)()\n})\n\ninterface NativeSelectFieldProps extends HTMLStyledProps<\"select\"> {}\n\nconst NativeSelectField = withContext<\"select\", NativeSelectFieldProps>(\n \"select\",\n \"field\",\n)({ \"data-group-propagate\": \"\" })\n\ninterface NativeSelectIconProps extends HTMLStyledProps {\n icon?: ReactNode\n}\n\nconst NativeSelectIcon = withContext<\"div\", NativeSelectIconProps>(\n \"div\",\n \"icon\",\n)(undefined, ({ children, icon, ...rest }) => ({\n children: icon || children || <ChevronDownIcon />,\n ...rest,\n}))\n\nexport interface NativeSelectGroupProps extends HTMLProps<\"optgroup\"> {}\n\nexport const NativeSelectGroup = component<\"optgroup\", NativeSelectGroupProps>(\n \"optgroup\",\n \"group\",\n)()\n\nexport interface NativeSelectOptionProps extends HTMLProps<\"option\"> {}\n\nexport const NativeSelectOption = component<\"option\", NativeSelectOptionProps>(\n \"option\",\n \"option\",\n)()\n\nexport interface NativeSelectSeparatorProps extends HTMLProps<\"hr\"> {}\n\nexport const NativeSelectSeparator = component<\n \"hr\",\n NativeSelectSeparatorProps\n>(\"hr\", \"separator\")()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwCA,MAAM,EACJ,WACA,cAAc,0BACd,iBAAiB,6BACjB,aACA,iBACEA,6CACF,iBACAC,8CACD;;;;;;AASD,MAAa,mBAAmB,cAC7B,UAAU;CACT,MAAM,CACJ,gBACA,EACE,WACA,KACA,aACA,kBACA,kBACA,MACA,cACA,WACA,WACA,GAAG,UAEHC,oCAAkB,MAAM;CAC5B,MAAM,EAAE,eAAe,cAAc,iBAAiBC,0CAAgB,KAAK;CAC3E,MAAM,WAAWC,wCAAe;EAC9B;EACA;EACD,CAAC;AAEF,QACE;EACE,GAAIC,yBACF;GAAE;GAAW;GAAK;GAAa,EAC/B,aAAa,eAAe,EAC5B,UACD,EAAE;aAEH,2CAAC,qBAAkB,GAAI,cAAc,SAAS,GAAI,EAElD;GAAoB,GAAI;aACtB,2CAAC;IAAuB;IAAM,GAAI,aAAa,UAAU;KAAI;IAC1C;GACL;GAGtB,OACD,EAAE,UAAU;AAGX,QAAOA,yBAFSC,oCAAsB,EAEX,MAAM,EAAE;EACnC;AAIF,MAAM,oBAAoB,YACxB,UACA,QACD,CAAC,EAAE,wBAAwB,IAAI,CAAC;AAMjC,MAAM,mBAAmB,YACvB,OACA,OACD,CAAC,SAAY,EAAE,UAAU,MAAM,GAAG,YAAY;CAC7C,UAAU,QAAQ,YAAY,2CAACC,8CAAkB;CACjD,GAAG;CACJ,EAAE;AAIH,MAAa,oBAAoB,UAC/B,YACA,QACD,EAAE;AAIH,MAAa,qBAAqB,UAChC,UACA,SACD,EAAE;AAIH,MAAa,wBAAwB,UAGnC,MAAM,YAAY,EAAE"}
@@ -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,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,4CAAiC;AACrC,MAAI,SACF,QACE,qFACG,cACC,2CAAC;GACC,GAAI;GACJ,QAAQ,CAAC;GACT,OAAM;aAEL;IACY,GACb,MAEH,YACA;AAGP,SAAOC,wDAAuB,eAAe;GAC3C,OAAO;GACP,QAAQ;GACT,CAAC;IACD;EACD;EACA;EACA;EACA;EACA;EAC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s","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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AAK,EAAE,CAC/B;AAGD,QACE,2CAACK;EAAqB,iCAHO,EAAE,eAAe,GAAG,CAAC,cAAc,CAAC;YAI/D,4CAACN,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,mBAAmBO,mCAC5CN,yBAAW,aAAa,KAAK,EAAE,CAChC;AAED,QACE,4CAACD,uBAAO;EAAI,GAAI,gBAAgB;aAC9B,2CAAC;GAAgB,GAAI,mBAAmB;aACrC,YAAY,QAAQ,2CAACQ,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,5 +1,6 @@
1
1
  "use client";
2
2
 
3
+ import { mergeProps } from "../../core/components/props.js";
3
4
  import { createSlotComponent } from "../../core/components/create-component.js";
4
5
  import "../../core/index.js";
5
6
  import { ChevronDownIcon } from "../icon/icons/chevron-down-icon.js";
@@ -30,13 +31,11 @@ const NativeSelectRoot = withProvider((props) => {
30
31
  focusBorderColor
31
32
  });
32
33
  return /* @__PURE__ */ jsxs(InputGroupRoot, {
33
- className,
34
- css,
35
- colorScheme,
36
- ...getRootProps({
37
- ...groupItemProps,
38
- ...rootProps
39
- }),
34
+ ...mergeProps({
35
+ className,
36
+ css,
37
+ colorScheme
38
+ }, getRootProps(groupItemProps), rootProps)(),
40
39
  children: [/* @__PURE__ */ jsx(NativeSelectField, { ...getFieldProps(varProps) }), /* @__PURE__ */ jsx(InputElement, {
41
40
  ...elementProps,
42
41
  children: /* @__PURE__ */ jsx(NativeSelectIcon, {
@@ -46,10 +45,7 @@ const NativeSelectRoot = withProvider((props) => {
46
45
  })]
47
46
  });
48
47
  }, "root")((props) => {
49
- return {
50
- ...useInputPropsContext(),
51
- ...props
52
- };
48
+ return mergeProps(useInputPropsContext(), props)();
53
49
  });
54
50
  const NativeSelectField = withContext("select", "field")({ "data-group-propagate": "" });
55
51
  const NativeSelectIcon = withContext("div", "icon")(void 0, ({ children, icon, ...rest }) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"native-select.js","names":["InputGroup.Root","InputGroup.Element"],"sources":["../../../../src/components/native-select/native-select.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactNode } from \"react\"\nimport type { HTMLProps, HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport type { UseInputBorderProps } from \"../input\"\nimport type { NativeSelectStyle } from \"./native-select.style\"\nimport type { UseNativeSelectProps } from \"./use-native-select\"\nimport { createSlotComponent } from \"../../core\"\nimport { useGroupItemProps } from \"../group\"\nimport { ChevronDownIcon } from \"../icon\"\nimport { InputGroup, useInputBorder, useInputPropsContext } from \"../input\"\nimport { nativeSelectStyle } from \"./native-select.style\"\nimport { useNativeSelect } from \"./use-native-select\"\n\nexport interface NativeSelectRootProps\n extends\n Omit<HTMLStyledProps<\"select\">, \"size\">,\n UseNativeSelectProps,\n ThemeProps<NativeSelectStyle>,\n FieldProps,\n UseInputBorderProps {\n /**\n * The icon to be used in the select.\n */\n icon?: ReactNode\n /**\n * The props for the end element.\n */\n elementProps?: InputGroup.ElementProps\n /**\n * Props for icon element.\n */\n iconProps?: NativeSelectIconProps\n /**\n * Props for root element.\n */\n rootProps?: InputGroup.RootProps\n}\n\nconst {\n component,\n PropsContext: NativeSelectPropsContext,\n usePropsContext: useNativeSelectPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<NativeSelectRootProps, NativeSelectStyle>(\n \"native-select\",\n nativeSelectStyle,\n)\n\nexport { NativeSelectPropsContext, useNativeSelectPropsContext }\n\n/**\n * `NativeSelect` is a component used for allowing users to select one option from a list. It displays a native dropdown list provided by the browser (user agent).\n *\n * @see https://yamada-ui.com/docs/components/native-select\n */\nexport const NativeSelectRoot = withProvider<\"select\", NativeSelectRootProps>(\n (props) => {\n const [\n groupItemProps,\n {\n className,\n css,\n colorScheme,\n errorBorderColor,\n focusBorderColor,\n icon,\n elementProps,\n iconProps,\n rootProps,\n ...rest\n },\n ] = useGroupItemProps(props)\n const { getFieldProps, getIconProps, getRootProps } = useNativeSelect(rest)\n const varProps = useInputBorder({\n errorBorderColor,\n focusBorderColor,\n })\n\n return (\n <InputGroup.Root\n className={className}\n css={css}\n colorScheme={colorScheme}\n {...getRootProps({ ...groupItemProps, ...rootProps })}\n >\n <NativeSelectField {...getFieldProps(varProps)} />\n\n <InputGroup.Element {...elementProps}>\n <NativeSelectIcon icon={icon} {...getIconProps(iconProps)} />\n </InputGroup.Element>\n </InputGroup.Root>\n )\n },\n \"root\",\n)((props) => {\n const context = useInputPropsContext()\n\n return { ...context, ...props }\n})\n\ninterface NativeSelectFieldProps extends HTMLStyledProps<\"select\"> {}\n\nconst NativeSelectField = withContext<\"select\", NativeSelectFieldProps>(\n \"select\",\n \"field\",\n)({ \"data-group-propagate\": \"\" })\n\ninterface NativeSelectIconProps extends HTMLStyledProps {\n icon?: ReactNode\n}\n\nconst NativeSelectIcon = withContext<\"div\", NativeSelectIconProps>(\n \"div\",\n \"icon\",\n)(undefined, ({ children, icon, ...rest }) => ({\n children: icon || children || <ChevronDownIcon />,\n ...rest,\n}))\n\nexport interface NativeSelectGroupProps extends HTMLProps<\"optgroup\"> {}\n\nexport const NativeSelectGroup = component<\"optgroup\", NativeSelectGroupProps>(\n \"optgroup\",\n \"group\",\n)()\n\nexport interface NativeSelectOptionProps extends HTMLProps<\"option\"> {}\n\nexport const NativeSelectOption = component<\"option\", NativeSelectOptionProps>(\n \"option\",\n \"option\",\n)()\n\nexport interface NativeSelectSeparatorProps extends HTMLProps<\"hr\"> {}\n\nexport const NativeSelectSeparator = component<\n \"hr\",\n NativeSelectSeparatorProps\n>(\"hr\", \"separator\")()\n"],"mappings":";;;;;;;;;;;;;;;;;;AAwCA,MAAM,EACJ,WACA,cAAc,0BACd,iBAAiB,6BACjB,aACA,iBACE,oBACF,iBACA,kBACD;;;;;;AASD,MAAa,mBAAmB,cAC7B,UAAU;CACT,MAAM,CACJ,gBACA,EACE,WACA,KACA,aACA,kBACA,kBACA,MACA,cACA,WACA,WACA,GAAG,UAEH,kBAAkB,MAAM;CAC5B,MAAM,EAAE,eAAe,cAAc,iBAAiB,gBAAgB,KAAK;CAC3E,MAAM,WAAW,eAAe;EAC9B;EACA;EACD,CAAC;AAEF,QACE,qBAACA;EACY;EACN;EACQ;EACb,GAAI,aAAa;GAAE,GAAG;GAAgB,GAAG;GAAW,CAAC;aAErD,oBAAC,qBAAkB,GAAI,cAAc,SAAS,GAAI,EAElD,oBAACC;GAAmB,GAAI;aACtB,oBAAC;IAAuB;IAAM,GAAI,aAAa,UAAU;KAAI;IAC1C;GACL;GAGtB,OACD,EAAE,UAAU;AAGX,QAAO;EAAE,GAFO,sBAAsB;EAEjB,GAAG;EAAO;EAC/B;AAIF,MAAM,oBAAoB,YACxB,UACA,QACD,CAAC,EAAE,wBAAwB,IAAI,CAAC;AAMjC,MAAM,mBAAmB,YACvB,OACA,OACD,CAAC,SAAY,EAAE,UAAU,MAAM,GAAG,YAAY;CAC7C,UAAU,QAAQ,YAAY,oBAAC,oBAAkB;CACjD,GAAG;CACJ,EAAE;AAIH,MAAa,oBAAoB,UAC/B,YACA,QACD,EAAE;AAIH,MAAa,qBAAqB,UAChC,UACA,SACD,EAAE;AAIH,MAAa,wBAAwB,UAGnC,MAAM,YAAY,EAAE"}
1
+ {"version":3,"file":"native-select.js","names":["InputGroup.Root","InputGroup.Element"],"sources":["../../../../src/components/native-select/native-select.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactNode } from \"react\"\nimport type { HTMLProps, HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { FieldProps } from \"../field\"\nimport type { UseInputBorderProps } from \"../input\"\nimport type { NativeSelectStyle } from \"./native-select.style\"\nimport type { UseNativeSelectProps } from \"./use-native-select\"\nimport { createSlotComponent, mergeProps } from \"../../core\"\nimport { useGroupItemProps } from \"../group\"\nimport { ChevronDownIcon } from \"../icon\"\nimport { InputGroup, useInputBorder, useInputPropsContext } from \"../input\"\nimport { nativeSelectStyle } from \"./native-select.style\"\nimport { useNativeSelect } from \"./use-native-select\"\n\nexport interface NativeSelectRootProps\n extends\n Omit<HTMLStyledProps<\"select\">, \"size\">,\n UseNativeSelectProps,\n ThemeProps<NativeSelectStyle>,\n FieldProps,\n UseInputBorderProps {\n /**\n * The icon to be used in the select.\n */\n icon?: ReactNode\n /**\n * The props for the end element.\n */\n elementProps?: InputGroup.ElementProps\n /**\n * Props for icon element.\n */\n iconProps?: NativeSelectIconProps\n /**\n * Props for root element.\n */\n rootProps?: InputGroup.RootProps\n}\n\nconst {\n component,\n PropsContext: NativeSelectPropsContext,\n usePropsContext: useNativeSelectPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<NativeSelectRootProps, NativeSelectStyle>(\n \"native-select\",\n nativeSelectStyle,\n)\n\nexport { NativeSelectPropsContext, useNativeSelectPropsContext }\n\n/**\n * `NativeSelect` is a component used for allowing users to select one option from a list. It displays a native dropdown list provided by the browser (user agent).\n *\n * @see https://yamada-ui.com/docs/components/native-select\n */\nexport const NativeSelectRoot = withProvider<\"select\", NativeSelectRootProps>(\n (props) => {\n const [\n groupItemProps,\n {\n className,\n css,\n colorScheme,\n errorBorderColor,\n focusBorderColor,\n icon,\n elementProps,\n iconProps,\n rootProps,\n ...rest\n },\n ] = useGroupItemProps(props)\n const { getFieldProps, getIconProps, getRootProps } = useNativeSelect(rest)\n const varProps = useInputBorder({\n errorBorderColor,\n focusBorderColor,\n })\n\n return (\n <InputGroup.Root\n {...mergeProps(\n { className, css, colorScheme },\n getRootProps(groupItemProps),\n rootProps,\n )()}\n >\n <NativeSelectField {...getFieldProps(varProps)} />\n\n <InputGroup.Element {...elementProps}>\n <NativeSelectIcon icon={icon} {...getIconProps(iconProps)} />\n </InputGroup.Element>\n </InputGroup.Root>\n )\n },\n \"root\",\n)((props) => {\n const context = useInputPropsContext()\n\n return mergeProps(context, props)()\n})\n\ninterface NativeSelectFieldProps extends HTMLStyledProps<\"select\"> {}\n\nconst NativeSelectField = withContext<\"select\", NativeSelectFieldProps>(\n \"select\",\n \"field\",\n)({ \"data-group-propagate\": \"\" })\n\ninterface NativeSelectIconProps extends HTMLStyledProps {\n icon?: ReactNode\n}\n\nconst NativeSelectIcon = withContext<\"div\", NativeSelectIconProps>(\n \"div\",\n \"icon\",\n)(undefined, ({ children, icon, ...rest }) => ({\n children: icon || children || <ChevronDownIcon />,\n ...rest,\n}))\n\nexport interface NativeSelectGroupProps extends HTMLProps<\"optgroup\"> {}\n\nexport const NativeSelectGroup = component<\"optgroup\", NativeSelectGroupProps>(\n \"optgroup\",\n \"group\",\n)()\n\nexport interface NativeSelectOptionProps extends HTMLProps<\"option\"> {}\n\nexport const NativeSelectOption = component<\"option\", NativeSelectOptionProps>(\n \"option\",\n \"option\",\n)()\n\nexport interface NativeSelectSeparatorProps extends HTMLProps<\"hr\"> {}\n\nexport const NativeSelectSeparator = component<\n \"hr\",\n NativeSelectSeparatorProps\n>(\"hr\", \"separator\")()\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAwCA,MAAM,EACJ,WACA,cAAc,0BACd,iBAAiB,6BACjB,aACA,iBACE,oBACF,iBACA,kBACD;;;;;;AASD,MAAa,mBAAmB,cAC7B,UAAU;CACT,MAAM,CACJ,gBACA,EACE,WACA,KACA,aACA,kBACA,kBACA,MACA,cACA,WACA,WACA,GAAG,UAEH,kBAAkB,MAAM;CAC5B,MAAM,EAAE,eAAe,cAAc,iBAAiB,gBAAgB,KAAK;CAC3E,MAAM,WAAW,eAAe;EAC9B;EACA;EACD,CAAC;AAEF,QACE,qBAACA;EACC,GAAI,WACF;GAAE;GAAW;GAAK;GAAa,EAC/B,aAAa,eAAe,EAC5B,UACD,EAAE;aAEH,oBAAC,qBAAkB,GAAI,cAAc,SAAS,GAAI,EAElD,oBAACC;GAAmB,GAAI;aACtB,oBAAC;IAAuB;IAAM,GAAI,aAAa,UAAU;KAAI;IAC1C;GACL;GAGtB,OACD,EAAE,UAAU;AAGX,QAAO,WAFS,sBAAsB,EAEX,MAAM,EAAE;EACnC;AAIF,MAAM,oBAAoB,YACxB,UACA,QACD,CAAC,EAAE,wBAAwB,IAAI,CAAC;AAMjC,MAAM,mBAAmB,YACvB,OACA,OACD,CAAC,SAAY,EAAE,UAAU,MAAM,GAAG,YAAY;CAC7C,UAAU,QAAQ,YAAY,oBAAC,oBAAkB;CACjD,GAAG;CACJ,EAAE;AAIH,MAAa,oBAAoB,UAC/B,YACA,QACD,EAAE;AAIH,MAAa,qBAAqB,UAChC,UACA,SACD,EAAE;AAIH,MAAa,wBAAwB,UAGnC,MAAM,YAAY,EAAE"}
@@ -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,S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B,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,gBAAgB;EAC5D,GAAG;EACH,GAAG;EACJ,CAAC;AAEF,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"}
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,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,MAAM,WAAW,eAAe;EAAE;EAAkB;EAAk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system/index.types.js";
3
3
  import { Component, HTMLStyledProps } from "../../core/components/index.types.js";
4
4
  import "../../core/index.js";
5
5
  import { WithTransitionProps } from "../motion/index.types.js";
6
+ import "../motion/index.js";
6
7
  import { CollapseProps } from "../collapse/collapse.js";
8
+ import "../collapse/index.js";
7
9
  import "../../index.js";
8
10
  import { AccordionStyle } from "./accordion.style.js";
9
11
  import { UseAccordionItemProps, UseAccordionProps } from "./use-accordion.js";
10
- import * as react194 from "react";
12
+ import * as react73 from "react";
11
13
 
12
14
  //#region src/components/accordion/accordion.d.ts
13
15
  interface AccordionCallBackProps {
@@ -31,7 +33,7 @@ interface AccordionRootProps extends Omit<HTMLStyledProps, "onChange">, ThemePro
31
33
  */
32
34
  items?: AccordionItem[];
33
35
  }
34
- declare const AccordionPropsContext: react194.Context<Partial<AccordionRootProps> | undefined>, useAccordionPropsContext: () => Partial<AccordionRootProps> | undefined;
36
+ declare const AccordionPropsContext: react73.Context<Partial<AccordionRootProps> | undefined>, useAccordionPropsContext: () => Partial<AccordionRootProps> | undefined;
35
37
  /**
36
38
  * `Accordion` is a component for a list that displays information in an expandable or collapsible manner.
37
39
  *
@@ -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 react74 from "react";
6
6
 
7
7
  //#region src/components/accordion/use-accordion.d.ts
8
- declare const AccordionDescendantsContext: react182.Context<{
8
+ declare const AccordionDescendantsContext: react74.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) => react74.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) => react74.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: react74.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) => react74.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: react74.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: react74.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) => react74.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: react74.Dispatch<react74.SetStateAction<number>>;
149
+ setIndex: react74.Dispatch<react74.SetStateAction<number | number[]>>;
150
150
  toggle: boolean | undefined;
151
151
  getRootProps: PropGetter<"div", undefined, undefined>;
152
152
  };
@@ -4,9 +4,10 @@ import "../../core/index.js";
4
4
  import { ActionBarStyle } from "./action-bar.style.js";
5
5
  import { PortalProps } from "../portal/portal.js";
6
6
  import { UsePopupAnimationProps } from "../popover/popover.js";
7
+ import "../popover/index.js";
7
8
  import { UseActionBarProps } from "./use-action-bar.js";
8
9
  import "../../index.js";
9
- import * as react181 from "react";
10
+ import * as react72 from "react";
10
11
  import { PropsWithChildren, ReactNode } from "react";
11
12
 
12
13
  //#region src/components/action-bar/action-bar.d.ts
@@ -28,7 +29,7 @@ interface ActionBarRootProps extends Omit<HTMLStyledProps, "content">, ThemeProp
28
29
  */
29
30
  onCloseComplete?: () => void;
30
31
  }
31
- declare const ActionBarPropsContext: react181.Context<Partial<ActionBarRootProps> | undefined>, useActionBarPropsContext: () => Partial<ActionBarRootProps> | undefined;
32
+ declare const ActionBarPropsContext: react72.Context<Partial<ActionBarRootProps> | undefined>, useActionBarPropsContext: () => Partial<ActionBarRootProps> | undefined;
32
33
  /**
33
34
  * `ActionBar` is a component that is used to display a bottom action bar with a set of actions.
34
35
  *
@@ -2,9 +2,10 @@ import { KeyframeIdent, ThemeProps } from "../../core/system/index.types.js";
2
2
  import { Component } from "../../core/components/index.types.js";
3
3
  import "../../core/index.js";
4
4
  import { HTMLMotionProps } from "../motion/index.types.js";
5
+ import "../motion/index.js";
5
6
  import { AiryStyle } from "./airy.style.js";
6
7
  import "../../index.js";
7
- import * as react180 from "react";
8
+ import * as react67 from "react";
8
9
  import { ReactNode } from "react";
9
10
 
10
11
  //#region src/components/airy/airy.d.ts
@@ -56,7 +57,7 @@ interface AiryProps extends Omit<HTMLMotionProps<"button">, "onChange">, ThemePr
56
57
  */
57
58
  onChange?: (value: KeyframeIdent) => void;
58
59
  }
59
- declare const AiryPropsContext: react180.Context<Partial<AiryProps> | undefined>, useAiryPropsContext: () => Partial<AiryProps> | undefined;
60
+ declare const AiryPropsContext: react67.Context<Partial<AiryProps> | undefined>, useAiryPropsContext: () => Partial<AiryProps> | undefined;
60
61
  /**
61
62
  * `Airy` is a component that creates an airy animation, switching between two elements when one is clicked.
62
63
  *
@@ -3,10 +3,13 @@ import { Component, HTMLStyledProps } from "../../core/components/index.types.js
3
3
  import "../../core/index.js";
4
4
  import { AlertStyle } from "./alert.style.js";
5
5
  import { IconProps } from "../icon/icon.js";
6
+ import "../icon/index.js";
6
7
  import { LoadingProps } from "../loading/loading.js";
8
+ import "../loading/index.js";
7
9
  import { StatusScheme } from "../status/status.js";
10
+ import "../status/index.js";
8
11
  import "../../index.js";
9
- import * as react179 from "react";
12
+ import * as react66 from "react";
10
13
 
11
14
  //#region src/components/alert/alert.d.ts
12
15
  interface AlertRootProps extends HTMLStyledProps, ThemeProps<AlertStyle> {
@@ -17,7 +20,7 @@ interface AlertRootProps extends HTMLStyledProps, ThemeProps<AlertStyle> {
17
20
  */
18
21
  status?: StatusScheme;
19
22
  }
20
- declare const AlertPropsContext: react179.Context<Partial<AlertRootProps> | undefined>, useAlertPropsContext: () => Partial<AlertRootProps> | undefined;
23
+ declare const AlertPropsContext: react66.Context<Partial<AlertRootProps> | undefined>, useAlertPropsContext: () => Partial<AlertRootProps> | undefined;
21
24
  /**
22
25
  * `Alert` is a component that conveys information to the user.
23
26
  *