@yamada-ui/react 2.2.1-dev-20260429031055 → 2.2.1-dev-20260429052220

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 (218) hide show
  1. package/dist/cjs/components/infinite-scroll-area/infinite-scroll-area.cjs +1 -0
  2. package/dist/cjs/components/infinite-scroll-area/infinite-scroll-area.cjs.map +1 -1
  3. package/dist/cjs/components/scroll-area/use-scroll-area.cjs +18 -29
  4. package/dist/cjs/components/scroll-area/use-scroll-area.cjs.map +1 -1
  5. package/dist/esm/components/infinite-scroll-area/infinite-scroll-area.js +1 -0
  6. package/dist/esm/components/infinite-scroll-area/infinite-scroll-area.js.map +1 -1
  7. package/dist/esm/components/scroll-area/use-scroll-area.js +19 -30
  8. package/dist/esm/components/scroll-area/use-scroll-area.js.map +1 -1
  9. package/dist/types/components/accordion/accordion.d.ts +2 -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 +2 -2
  13. package/dist/types/components/airy/airy.d.ts +2 -2
  14. package/dist/types/components/alert/alert.d.ts +2 -2
  15. package/dist/types/components/alpha-slider/alpha-slider.d.ts +2 -2
  16. package/dist/types/components/aspect-ratio/aspect-ratio.d.ts +2 -2
  17. package/dist/types/components/autocomplete/autocomplete.d.ts +2 -2
  18. package/dist/types/components/autocomplete/autocomplete.style.d.ts +1 -1
  19. package/dist/types/components/autocomplete/use-autocomplete.d.ts +5 -5
  20. package/dist/types/components/avatar/avatar.d.ts +5 -5
  21. package/dist/types/components/avatar/use-avatar-group.d.ts +2 -2
  22. package/dist/types/components/badge/badge.d.ts +2 -2
  23. package/dist/types/components/bleed/bleed.d.ts +2 -2
  24. package/dist/types/components/blockquote/blockquote.d.ts +2 -2
  25. package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
  26. package/dist/types/components/breadcrumb/breadcrumb.style.d.ts +1 -1
  27. package/dist/types/components/breadcrumb/use-breadcrumb.d.ts +2 -2
  28. package/dist/types/components/button/button.d.ts +2 -2
  29. package/dist/types/components/button/icon-button.d.ts +2 -2
  30. package/dist/types/components/calendar/calendar.d.ts +2 -2
  31. package/dist/types/components/calendar/calendar.style.d.ts +2 -2
  32. package/dist/types/components/calendar/use-calendar.d.ts +8 -8
  33. package/dist/types/components/card/card.d.ts +2 -2
  34. package/dist/types/components/carousel/carousel.d.ts +2 -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/radar-chart.d.ts +2 -2
  42. package/dist/types/components/chart/radial-chart.d.ts +2 -2
  43. package/dist/types/components/chart/use-chart.d.ts +2 -2
  44. package/dist/types/components/checkbox/checkbox.d.ts +5 -5
  45. package/dist/types/components/checkbox/checkbox.style.d.ts +1 -1
  46. package/dist/types/components/checkbox/use-checkbox-group.d.ts +2 -2
  47. package/dist/types/components/checkbox-card/checkbox-card.d.ts +5 -5
  48. package/dist/types/components/checkbox-card/checkbox-card.style.d.ts +1 -1
  49. package/dist/types/components/circle-progress/circle-progress.d.ts +2 -2
  50. package/dist/types/components/close-button/close-button.d.ts +2 -2
  51. package/dist/types/components/code/code.d.ts +2 -2
  52. package/dist/types/components/collapse/collapse.d.ts +2 -2
  53. package/dist/types/components/color-picker/color-picker.d.ts +2 -2
  54. package/dist/types/components/color-picker/color-picker.style.d.ts +1 -1
  55. package/dist/types/components/color-picker/use-color-picker.d.ts +2 -2
  56. package/dist/types/components/color-selector/color-selector.d.ts +2 -2
  57. package/dist/types/components/color-selector/color-selector.style.d.ts +2 -2
  58. package/dist/types/components/color-selector/use-color-selector.d.ts +3 -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 +2 -2
  64. package/dist/types/components/date-picker/use-date-picker.d.ts +4 -4
  65. package/dist/types/components/drawer/drawer.d.ts +2 -2
  66. package/dist/types/components/drawer/drawer.style.d.ts +2 -2
  67. package/dist/types/components/dropzone/dropzone.d.ts +4 -4
  68. package/dist/types/components/editable/editable.d.ts +4 -4
  69. package/dist/types/components/editable/use-editable.d.ts +2 -2
  70. package/dist/types/components/em/em.d.ts +2 -2
  71. package/dist/types/components/empty-state/empty-state.d.ts +2 -2
  72. package/dist/types/components/empty-state/empty-state.style.d.ts +2 -2
  73. package/dist/types/components/fade/fade.d.ts +2 -2
  74. package/dist/types/components/field/field.d.ts +3 -3
  75. package/dist/types/components/field/use-field-props.d.ts +3 -3
  76. package/dist/types/components/fieldset/fieldset.d.ts +3 -3
  77. package/dist/types/components/file-button/file-button.d.ts +2 -2
  78. package/dist/types/components/file-button/use-file-button.d.ts +18 -18
  79. package/dist/types/components/file-input/file-input.d.ts +2 -2
  80. package/dist/types/components/file-input/file-input.style.d.ts +1 -1
  81. package/dist/types/components/file-input/use-file-input.d.ts +15 -15
  82. package/dist/types/components/flex/flex.d.ts +2 -2
  83. package/dist/types/components/flip/flip.d.ts +4 -4
  84. package/dist/types/components/flip/flip.style.d.ts +1 -1
  85. package/dist/types/components/float/float.d.ts +2 -2
  86. package/dist/types/components/form/form.d.ts +3 -3
  87. package/dist/types/components/format/format-byte.d.ts +4 -4
  88. package/dist/types/components/format/format-date-time.d.ts +4 -4
  89. package/dist/types/components/format/format-number.d.ts +2 -2
  90. package/dist/types/components/grid/grid-item.d.ts +2 -2
  91. package/dist/types/components/grid/grid.d.ts +2 -2
  92. package/dist/types/components/group/group.d.ts +2 -2
  93. package/dist/types/components/group/use-group.d.ts +2 -2
  94. package/dist/types/components/heading/heading.d.ts +2 -2
  95. package/dist/types/components/hue-slider/hue-slider.d.ts +3 -3
  96. package/dist/types/components/icon/icon.d.ts +5 -5
  97. package/dist/types/components/image/image.d.ts +2 -2
  98. package/dist/types/components/indicator/indicator.d.ts +4 -4
  99. package/dist/types/components/infinite-scroll-area/infinite-scroll-area.d.ts +2 -2
  100. package/dist/types/components/input/input-addon.d.ts +2 -2
  101. package/dist/types/components/input/input-element.d.ts +2 -2
  102. package/dist/types/components/input/input.d.ts +2 -2
  103. package/dist/types/components/kbd/kbd.d.ts +2 -2
  104. package/dist/types/components/link/link.d.ts +2 -2
  105. package/dist/types/components/link-box/link-box.d.ts +2 -2
  106. package/dist/types/components/list/list.d.ts +2 -2
  107. package/dist/types/components/list/list.style.d.ts +2 -2
  108. package/dist/types/components/loading/loading-provider.d.ts +2 -2
  109. package/dist/types/components/loading/loading.d.ts +3 -3
  110. package/dist/types/components/mark/mark.d.ts +2 -2
  111. package/dist/types/components/menu/menu.d.ts +2 -2
  112. package/dist/types/components/menu/menu.style.d.ts +2 -2
  113. package/dist/types/components/menu/use-menu.d.ts +11 -11
  114. package/dist/types/components/modal/modal.d.ts +2 -2
  115. package/dist/types/components/modal/modal.style.d.ts +2 -2
  116. package/dist/types/components/native-accordion/native-accordion.d.ts +2 -2
  117. package/dist/types/components/native-accordion/native-accordion.style.d.ts +2 -2
  118. package/dist/types/components/native-accordion/use-native-accordion.d.ts +2 -2
  119. package/dist/types/components/native-popover/native-popover.d.ts +2 -2
  120. package/dist/types/components/native-select/native-select.d.ts +2 -2
  121. package/dist/types/components/native-table/native-table.d.ts +4 -4
  122. package/dist/types/components/notice/notice.style.d.ts +1 -1
  123. package/dist/types/components/number-input/number-input.d.ts +2 -2
  124. package/dist/types/components/pagination/pagination.d.ts +2 -2
  125. package/dist/types/components/pagination/pagination.style.d.ts +1 -1
  126. package/dist/types/components/pagination/use-pagination.d.ts +2 -2
  127. package/dist/types/components/password-input/password-input.d.ts +2 -2
  128. package/dist/types/components/password-input/strength-meter.d.ts +2 -2
  129. package/dist/types/components/password-input/strength-meter.style.d.ts +1 -1
  130. package/dist/types/components/password-input/use-password-input.d.ts +2 -2
  131. package/dist/types/components/pin-input/pin-input.d.ts +2 -2
  132. package/dist/types/components/pin-input/use-pin-input.d.ts +7 -7
  133. package/dist/types/components/popover/popover.d.ts +2 -2
  134. package/dist/types/components/progress/progress.d.ts +4 -4
  135. package/dist/types/components/progress/use-progress.d.ts +706 -706
  136. package/dist/types/components/qr-code/qr-code.d.ts +2 -2
  137. package/dist/types/components/radio/radio.d.ts +5 -5
  138. package/dist/types/components/radio/radio.style.d.ts +1 -1
  139. package/dist/types/components/radio/use-radio-group.d.ts +2 -2
  140. package/dist/types/components/radio-card/radio-card.d.ts +5 -5
  141. package/dist/types/components/radio-card/radio-card.style.d.ts +1 -1
  142. package/dist/types/components/rating/rating.style.d.ts +2 -2
  143. package/dist/types/components/rating/use-rating.d.ts +7 -7
  144. package/dist/types/components/reorder/reorder.d.ts +2 -2
  145. package/dist/types/components/reorder/reorder.style.d.ts +1 -1
  146. package/dist/types/components/reorder/use-reorder.d.ts +4 -4
  147. package/dist/types/components/resizable/resizable.d.ts +2 -2
  148. package/dist/types/components/resizable/resizable.style.d.ts +2 -2
  149. package/dist/types/components/resizable/use-resizable.d.ts +2 -2
  150. package/dist/types/components/ripple/ripple.d.ts +2 -2
  151. package/dist/types/components/ripple/use-ripple.d.ts +2 -2
  152. package/dist/types/components/rotate/rotate.d.ts +2 -2
  153. package/dist/types/components/saturation-slider/saturation-slider.d.ts +2 -2
  154. package/dist/types/components/saturation-slider/use-saturation-slider.d.ts +2 -2
  155. package/dist/types/components/scroll-area/scroll-area.d.ts +2 -2
  156. package/dist/types/components/scroll-area/use-scroll-area.d.ts +0 -1
  157. package/dist/types/components/segmented-control/segmented-control.d.ts +2 -2
  158. package/dist/types/components/segmented-control/segmented-control.style.d.ts +2 -2
  159. package/dist/types/components/segmented-control/use-segmented-control.d.ts +9 -9
  160. package/dist/types/components/select/select.d.ts +2 -2
  161. package/dist/types/components/select/select.style.d.ts +1 -1
  162. package/dist/types/components/select/use-select.d.ts +4 -4
  163. package/dist/types/components/separator/separator.d.ts +2 -2
  164. package/dist/types/components/sidebar/sidebar.d.ts +2 -2
  165. package/dist/types/components/sidebar/use-sidebar.d.ts +9 -9
  166. package/dist/types/components/simple-grid/simple-grid.d.ts +2 -2
  167. package/dist/types/components/skeleton/skeleton.d.ts +2 -2
  168. package/dist/types/components/slide/slide.d.ts +2 -2
  169. package/dist/types/components/slide-fade/slide-fade.d.ts +2 -2
  170. package/dist/types/components/slider/slider.d.ts +2 -2
  171. package/dist/types/components/slider/use-slider.d.ts +2 -2
  172. package/dist/types/components/stack/h-stack.d.ts +2 -2
  173. package/dist/types/components/stack/stack.d.ts +2 -2
  174. package/dist/types/components/stack/v-stack.d.ts +2 -2
  175. package/dist/types/components/stack/z-stack.d.ts +2 -2
  176. package/dist/types/components/stat/stat.d.ts +2 -2
  177. package/dist/types/components/stat/stat.style.d.ts +2 -2
  178. package/dist/types/components/status/status.d.ts +2 -2
  179. package/dist/types/components/status/status.style.d.ts +2 -2
  180. package/dist/types/components/steps/steps.d.ts +2 -2
  181. package/dist/types/components/steps/steps.style.d.ts +1 -1
  182. package/dist/types/components/switch/switch.d.ts +2 -2
  183. package/dist/types/components/table/table.d.ts +2 -2
  184. package/dist/types/components/tabs/tabs.d.ts +2 -2
  185. package/dist/types/components/tabs/use-tabs.d.ts +16 -16
  186. package/dist/types/components/tag/tag.d.ts +2 -2
  187. package/dist/types/components/tag/tag.style.d.ts +1 -1
  188. package/dist/types/components/text/text.d.ts +2 -2
  189. package/dist/types/components/textarea/textarea.d.ts +2 -2
  190. package/dist/types/components/textarea/use-autosize.d.ts +2 -2
  191. package/dist/types/components/timeline/timeline.d.ts +5 -5
  192. package/dist/types/components/timeline/timeline.style.d.ts +1 -1
  193. package/dist/types/components/toggle/toggle.d.ts +5 -5
  194. package/dist/types/components/toggle/use-toggle-group.d.ts +2 -2
  195. package/dist/types/components/toggle/use-toggle.d.ts +2 -2
  196. package/dist/types/components/tooltip/tooltip.d.ts +2 -2
  197. package/dist/types/components/tree/tree.d.ts +2 -2
  198. package/dist/types/components/tree/tree.style.d.ts +1 -1
  199. package/dist/types/components/tree/use-tree.d.ts +182 -182
  200. package/dist/types/components/visually-hidden/visually-hidden.d.ts +2 -2
  201. package/dist/types/components/wrap/wrap.d.ts +2 -2
  202. package/dist/types/core/components/create-component.d.ts +7 -7
  203. package/dist/types/core/system/color-mode-provider.d.ts +2 -2
  204. package/dist/types/core/system/storage-script.d.ts +3 -3
  205. package/dist/types/core/system/styled.d.ts +2 -2
  206. package/dist/types/core/system/system-provider.d.ts +2 -2
  207. package/dist/types/hooks/use-breakpoint/use-breakpoint-state.d.ts +2 -2
  208. package/dist/types/hooks/use-clipboard/index.d.ts +2 -2
  209. package/dist/types/hooks/use-combobox/index.d.ts +12 -12
  210. package/dist/types/hooks/use-counter/index.d.ts +2 -2
  211. package/dist/types/hooks/use-descendants/index.d.ts +2 -2
  212. package/dist/types/hooks/use-field-sizing/index.d.ts +2 -2
  213. package/dist/types/hooks/use-hover/index.d.ts +2 -2
  214. package/dist/types/hooks/use-popper/index.d.ts +2 -2
  215. package/dist/types/hooks/use-resize-observer/index.d.ts +3 -3
  216. package/dist/types/providers/i18n-provider/i18n-provider.d.ts +3 -3
  217. package/dist/types/utils/children.d.ts +2 -2
  218. package/package.json +2 -2
@@ -40,6 +40,7 @@ const InfiniteScrollArea = withProvider(({ ref, children, disabled, finish: fini
40
40
  ref: require_ref.mergeRefs(rootRef, ref),
41
41
  "aria-busy": "false",
42
42
  role: "feed",
43
+ tabIndex: 0,
43
44
  ...rest,
44
45
  children: [
45
46
  reverse && showTrigger ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InfiniteScrollTrigger, {
@@ -1 +1 @@
1
- {"version":3,"file":"infinite-scroll-area.cjs","names":["createSlotComponent","infiniteScrollAreaStyle","useInfiniteScroll","useValue","styled","mergeRefs"],"sources":["../../../../src/components/infinite-scroll-area/infinite-scroll-area.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactNode } from \"react\"\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { InfiniteScrollAreaStyle } from \"./infinite-scroll-area.style\"\nimport type { UseInfiniteScrollProps } from \"./use-infinite-scroll\"\nimport { useRef } from \"react\"\nimport { createSlotComponent, styled } from \"../../core\"\nimport { useValue } from \"../../hooks/use-value\"\nimport { isNull, mergeRefs } from \"../../utils\"\nimport { infiniteScrollAreaStyle } from \"./infinite-scroll-area.style\"\nimport { useInfiniteScroll } from \"./use-infinite-scroll\"\n\nexport interface InfiniteScrollAreaProps\n extends\n Omit<HTMLStyledProps, keyof UseInfiniteScrollProps>,\n Omit<UseInfiniteScrollProps, \"orientation\">,\n ThemeProps<InfiniteScrollAreaStyle> {\n /**\n * The infinite scroll area finish to use.\n */\n finish?: ReactNode\n /**\n * The infinite scroll area loading to use.\n */\n loading?: ReactNode\n /**\n * Props for infinite scroll area trigger component.\n */\n triggerProps?: HTMLStyledProps\n}\n\nconst {\n PropsContext: InfiniteScrollAreaPropsContext,\n usePropsContext: useInfiniteScrollAreaPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<InfiniteScrollAreaProps, InfiniteScrollAreaStyle>(\n \"infinite-scroll-area\",\n infiniteScrollAreaStyle,\n)\n\nexport { InfiniteScrollAreaPropsContext, useInfiniteScrollAreaPropsContext }\n\n/**\n * `InfiniteScrollArea` is for providing infinite scroll functionality.\n * This feature provides a smooth scrolling experience by automatically loading and displaying the next dataset when the user reaches the end of the page.\n *\n * @see https://yamada-ui.com/docs/components/infinite-scroll-area\n */\nexport const InfiniteScrollArea = withProvider<\n \"div\",\n InfiniteScrollAreaProps,\n \"orientation\"\n>(\n ({\n ref,\n children,\n disabled,\n finish: finishProp,\n indexRef,\n initialLoad,\n loading,\n orientation: orientationProp,\n resetRef,\n reverse,\n rootMargin,\n rootRef: rootRefProp,\n startIndex,\n threshold,\n triggerProps,\n onLoad,\n ...rest\n }) => {\n const rootRef = useRef<HTMLDivElement>(null)\n const orientation = useValue(orientationProp)\n const { ref: triggerRef, finish } = useInfiniteScroll({\n disabled,\n indexRef,\n initialLoad,\n orientation,\n resetRef,\n reverse,\n rootMargin,\n rootRef: isNull(rootRefProp) ? null : (rootRefProp ?? rootRef),\n startIndex,\n threshold,\n onLoad,\n })\n const hasFinish = !!finishProp\n const showTrigger = !disabled && (hasFinish || !finish)\n\n return (\n <styled.div\n ref={mergeRefs(rootRef, ref)}\n aria-busy=\"false\"\n role=\"feed\"\n {...rest}\n >\n {reverse && showTrigger ? (\n <InfiniteScrollTrigger ref={triggerRef} {...triggerProps}>\n {finish ? finishProp : loading}\n </InfiniteScrollTrigger>\n ) : null}\n\n {children}\n\n {!reverse && showTrigger ? (\n <InfiniteScrollTrigger ref={triggerRef} {...triggerProps}>\n {finish ? finishProp : loading}\n </InfiniteScrollTrigger>\n ) : null}\n </styled.div>\n )\n },\n \"root\",\n { transferProps: [\"orientation\"] },\n)()\n\ninterface InfiniteScrollTriggerProps extends HTMLStyledProps {}\n\nconst InfiniteScrollTrigger = withContext<\"div\", InfiniteScrollTriggerProps>(\n \"div\",\n \"trigger\",\n)()\n"],"mappings":";;;;;;;;;;;;;;;AAgCA,MAAM,EACJ,cAAc,gCACd,iBAAiB,mCACjB,aACA,iBACEA,6CACF,wBACAC,2DACD;;;;;;;AAUD,MAAa,qBAAqB,cAK/B,EACC,KACA,UACA,UACA,QAAQ,YACR,UACA,aACA,SACA,aAAa,iBACb,UACA,SACA,YACA,SAAS,aACT,YACA,WACA,cACA,QACA,GAAG,WACC;CACJ,MAAM,4BAAiC,KAAK;CAE5C,MAAM,EAAE,KAAK,YAAY,WAAWC,8CAAkB;EACpD;EACA;EACA;EACA,aALkBC,uCAAS,gBAAgB;EAM3C;EACA;EACA;EACA,uDAAgB,YAAY,GAAG,OAAQ,eAAe;EACtD;EACA;EACA;EACD,CAAC;CAEF,MAAM,cAAc,CAAC,aADH,CAAC,CAAC,cAC2B,CAAC;AAEhD,QACE,4CAACC,uBAAO;EACN,KAAKC,sBAAU,SAAS,IAAI;EAC5B,aAAU;EACV,MAAK;EACL,GAAI;;GAEH,WAAW,cACV,2CAAC;IAAsB,KAAK;IAAY,GAAI;cACzC,SAAS,aAAa;KACD,GACtB;GAEH;GAEA,CAAC,WAAW,cACX,2CAAC;IAAsB,KAAK;IAAY,GAAI;cACzC,SAAS,aAAa;KACD,GACtB;;GACO;GAGjB,QACA,EAAE,eAAe,CAAC,cAAc,EAAE,CACnC,EAAE;AAIH,MAAM,wBAAwB,YAC5B,OACA,UACD,EAAE"}
1
+ {"version":3,"file":"infinite-scroll-area.cjs","names":["createSlotComponent","infiniteScrollAreaStyle","useInfiniteScroll","useValue","styled","mergeRefs"],"sources":["../../../../src/components/infinite-scroll-area/infinite-scroll-area.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactNode } from \"react\"\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { InfiniteScrollAreaStyle } from \"./infinite-scroll-area.style\"\nimport type { UseInfiniteScrollProps } from \"./use-infinite-scroll\"\nimport { useRef } from \"react\"\nimport { createSlotComponent, styled } from \"../../core\"\nimport { useValue } from \"../../hooks/use-value\"\nimport { isNull, mergeRefs } from \"../../utils\"\nimport { infiniteScrollAreaStyle } from \"./infinite-scroll-area.style\"\nimport { useInfiniteScroll } from \"./use-infinite-scroll\"\n\nexport interface InfiniteScrollAreaProps\n extends\n Omit<HTMLStyledProps, keyof UseInfiniteScrollProps>,\n Omit<UseInfiniteScrollProps, \"orientation\">,\n ThemeProps<InfiniteScrollAreaStyle> {\n /**\n * The infinite scroll area finish to use.\n */\n finish?: ReactNode\n /**\n * The infinite scroll area loading to use.\n */\n loading?: ReactNode\n /**\n * Props for infinite scroll area trigger component.\n */\n triggerProps?: HTMLStyledProps\n}\n\nconst {\n PropsContext: InfiniteScrollAreaPropsContext,\n usePropsContext: useInfiniteScrollAreaPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<InfiniteScrollAreaProps, InfiniteScrollAreaStyle>(\n \"infinite-scroll-area\",\n infiniteScrollAreaStyle,\n)\n\nexport { InfiniteScrollAreaPropsContext, useInfiniteScrollAreaPropsContext }\n\n/**\n * `InfiniteScrollArea` is for providing infinite scroll functionality.\n * This feature provides a smooth scrolling experience by automatically loading and displaying the next dataset when the user reaches the end of the page.\n *\n * @see https://yamada-ui.com/docs/components/infinite-scroll-area\n */\nexport const InfiniteScrollArea = withProvider<\n \"div\",\n InfiniteScrollAreaProps,\n \"orientation\"\n>(\n ({\n ref,\n children,\n disabled,\n finish: finishProp,\n indexRef,\n initialLoad,\n loading,\n orientation: orientationProp,\n resetRef,\n reverse,\n rootMargin,\n rootRef: rootRefProp,\n startIndex,\n threshold,\n triggerProps,\n onLoad,\n ...rest\n }) => {\n const rootRef = useRef<HTMLDivElement>(null)\n const orientation = useValue(orientationProp)\n const { ref: triggerRef, finish } = useInfiniteScroll({\n disabled,\n indexRef,\n initialLoad,\n orientation,\n resetRef,\n reverse,\n rootMargin,\n rootRef: isNull(rootRefProp) ? null : (rootRefProp ?? rootRef),\n startIndex,\n threshold,\n onLoad,\n })\n const hasFinish = !!finishProp\n const showTrigger = !disabled && (hasFinish || !finish)\n\n return (\n <styled.div\n ref={mergeRefs(rootRef, ref)}\n aria-busy=\"false\"\n role=\"feed\"\n tabIndex={0}\n {...rest}\n >\n {reverse && showTrigger ? (\n <InfiniteScrollTrigger ref={triggerRef} {...triggerProps}>\n {finish ? finishProp : loading}\n </InfiniteScrollTrigger>\n ) : null}\n\n {children}\n\n {!reverse && showTrigger ? (\n <InfiniteScrollTrigger ref={triggerRef} {...triggerProps}>\n {finish ? finishProp : loading}\n </InfiniteScrollTrigger>\n ) : null}\n </styled.div>\n )\n },\n \"root\",\n { transferProps: [\"orientation\"] },\n)()\n\ninterface InfiniteScrollTriggerProps extends HTMLStyledProps {}\n\nconst InfiniteScrollTrigger = withContext<\"div\", InfiniteScrollTriggerProps>(\n \"div\",\n \"trigger\",\n)()\n"],"mappings":";;;;;;;;;;;;;;;AAgCA,MAAM,EACJ,cAAc,gCACd,iBAAiB,mCACjB,aACA,iBACEA,6CACF,wBACAC,2DACD;;;;;;;AAUD,MAAa,qBAAqB,cAK/B,EACC,KACA,UACA,UACA,QAAQ,YACR,UACA,aACA,SACA,aAAa,iBACb,UACA,SACA,YACA,SAAS,aACT,YACA,WACA,cACA,QACA,GAAG,WACC;CACJ,MAAM,4BAAiC,KAAK;CAE5C,MAAM,EAAE,KAAK,YAAY,WAAWC,8CAAkB;EACpD;EACA;EACA;EACA,aALkBC,uCAAS,gBAAgB;EAM3C;EACA;EACA;EACA,uDAAgB,YAAY,GAAG,OAAQ,eAAe;EACtD;EACA;EACA;EACD,CAAC;CAEF,MAAM,cAAc,CAAC,aADH,CAAC,CAAC,cAC2B,CAAC;AAEhD,QACE,4CAACC,uBAAO;EACN,KAAKC,sBAAU,SAAS,IAAI;EAC5B,aAAU;EACV,MAAK;EACL,UAAU;EACV,GAAI;;GAEH,WAAW,cACV,2CAAC;IAAsB,KAAK;IAAY,GAAI;cACzC,SAAS,aAAa;KACD,GACtB;GAEH;GAEA,CAAC,WAAW,cACX,2CAAC;IAAsB,KAAK;IAAY,GAAI;cACzC,SAAS,aAAa;KACD,GACtB;;GACO;GAGjB,QACA,EAAE,eAAe,CAAC,cAAc,EAAE,CACnC,EAAE;AAIH,MAAM,wBAAwB,YAC5B,OACA,UACD,EAAE"}
@@ -2,12 +2,13 @@
2
2
 
3
3
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
4
4
  const require_effect = require('../../utils/effect.cjs');
5
- const require_ref = require('../../utils/ref.cjs');
6
5
  const require_utils_index = require('../../utils/index.cjs');
6
+ const require_props = require('../../core/components/props.cjs');
7
+ require('../../core/index.cjs');
7
8
  let react = require("react");
8
9
 
9
10
  //#region src/components/scroll-area/use-scroll-area.ts
10
- const useScrollArea = ({ id, ref, type = "hover", scrollHideDelay = 1e3, onScrollPositionChange, ...rest } = {}) => {
11
+ const useScrollArea = ({ id, type = "hover", scrollHideDelay = 1e3, onScrollPositionChange, ...rest } = {}) => {
11
12
  const [isHovered, setIsHovered] = (0, react.useState)(false);
12
13
  const [isScrolling, setIsScrolling] = (0, react.useState)(false);
13
14
  const isAlways = type === "always";
@@ -65,48 +66,36 @@ const useScrollArea = ({ id, ref, type = "hover", scrollHideDelay = 1e3, onScrol
65
66
  if (scrollTimeout.current) clearTimeout(scrollTimeout.current);
66
67
  };
67
68
  }, []);
68
- const safariProps = (0, react.useMemo)(() => ({
69
- key,
70
- ref: require_ref.mergeRefs(ref, scrollAreaRef),
71
- "data-key": key
72
- }), [
73
- key,
74
- ref,
75
- scrollAreaRef
76
- ]);
77
69
  return {
78
70
  isAlways,
79
71
  isHidden,
80
72
  isHovered,
81
73
  isNever,
82
74
  isScrolling,
83
- getRootProps: (0, react.useCallback)(({ style, ...props } = {}) => ({
84
- ref,
85
- style: {
86
- overflow: "auto",
87
- ...style
88
- },
89
- ...rest,
90
- ...isSafari ? safariProps : {},
91
- ...props,
75
+ getRootProps: (0, react.useCallback)((props = {}) => require_props.mergeProps({
76
+ style: { overflow: "auto" },
92
77
  "data-hidden": (0, require_utils_index.utils_exports.dataAttr)(isHidden),
93
78
  "data-hover": (0, require_utils_index.utils_exports.dataAttr)(isHovered),
94
79
  "data-never": (0, require_utils_index.utils_exports.dataAttr)(isNever),
95
80
  "data-scroll": (0, require_utils_index.utils_exports.dataAttr)(isScrolling),
96
- tabIndex: 0,
97
- onMouseEnter: (0, require_utils_index.utils_exports.handlerAll)(props.onMouseEnter, rest.onMouseEnter, onMouseEnter),
98
- onMouseLeave: (0, require_utils_index.utils_exports.handlerAll)(props.onMouseLeave, rest.onMouseLeave, onMouseLeave),
99
- onPointerEnter: (0, require_utils_index.utils_exports.handlerAll)(props.onPointerEnter, rest.onPointerEnter, onMouseEnter),
100
- onPointerLeave: (0, require_utils_index.utils_exports.handlerAll)(props.onPointerLeave, rest.onPointerLeave, onMouseLeave),
101
- onScroll: (0, require_utils_index.utils_exports.handlerAll)(props.onScroll, rest.onScroll, onScroll)
102
- }), [
81
+ tabIndex: 0
82
+ }, isSafari ? {
83
+ key,
84
+ ref: scrollAreaRef,
85
+ "data-key": key
86
+ } : {}, rest, props, {
87
+ onMouseEnter,
88
+ onMouseLeave,
89
+ onPointerEnter: onMouseEnter,
90
+ onPointerLeave: onMouseLeave,
91
+ onScroll
92
+ })(), [
103
93
  isNever,
104
- ref,
105
94
  isHidden,
106
95
  isHovered,
107
96
  isScrolling,
108
97
  isSafari,
109
- safariProps,
98
+ key,
110
99
  rest,
111
100
  onMouseEnter,
112
101
  onMouseLeave,
@@ -1 +1 @@
1
- {"version":3,"file":"use-scroll-area.cjs","names":["mergeRefs"],"sources":["../../../../src/components/scroll-area/use-scroll-area.ts"],"sourcesContent":["\"use client\"\n\nimport type { UIEvent } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport { useCallback, useEffect, useId, useMemo, useRef, useState } from \"react\"\nimport {\n dataAttr,\n handlerAll,\n isMac,\n mergeRefs,\n useSafeLayoutEffect,\n vendor,\n} from \"../../utils\"\n\nexport interface UseScrollAreaProps extends HTMLProps {\n /**\n * Delay in milliseconds before scrollbars are hidden.\n *\n * @default 1000\n */\n scrollHideDelay?: number\n /**\n * Scrollbar visibility type.\n *\n * @default 'hover'\n */\n type?: \"always\" | \"hover\" | \"never\" | \"scroll\"\n /**\n * Callback function for when the scroll position changes.\n */\n onScrollPositionChange?: ({ x, y }: { x: number; y: number }) => void\n}\n\nexport const useScrollArea = ({\n id,\n ref,\n type = \"hover\",\n scrollHideDelay = 1000,\n onScrollPositionChange,\n ...rest\n}: UseScrollAreaProps = {}) => {\n const [isHovered, setIsHovered] = useState<boolean>(false)\n const [isScrolling, setIsScrolling] = useState<boolean>(false)\n const isAlways = type === \"always\"\n const isNever = type === \"never\"\n const isHidden = !isAlways && !isHovered && !isScrolling\n const isSafari = isMac() && vendor(/apple/i)\n const uuid = useId()\n const key = `${id ?? uuid}-${isHovered}-${isScrolling}`\n\n const hoverTimeout = useRef<any>(undefined)\n const scrollTimeout = useRef<any>(undefined)\n const scrollAreaRef = useRef<HTMLDivElement>(null)\n const scrollPosition = useRef({ x: 0, y: 0 })\n\n useSafeLayoutEffect(() => {\n if (!scrollAreaRef.current || !isSafari) return\n\n scrollAreaRef.current.scrollLeft = scrollPosition.current.x\n scrollAreaRef.current.scrollTop = scrollPosition.current.y\n })\n\n const onMouseEnter = useCallback(() => {\n if (type !== \"hover\") return\n\n clearTimeout(hoverTimeout.current)\n\n setIsHovered(true)\n }, [type])\n\n const onMouseLeave = useCallback(() => {\n if (type !== \"hover\") return\n\n hoverTimeout.current = setTimeout(\n () => setIsHovered(false),\n scrollHideDelay,\n )\n }, [scrollHideDelay, type])\n\n const onScroll = useCallback(\n (ev: UIEvent<HTMLDivElement>) => {\n const el = ev.target as HTMLDivElement\n\n const { scrollLeft: x, scrollTop: y } = el\n const { x: prevX, y: prevY } = scrollPosition.current\n const isEqual = Math.abs(x - prevX) <= 5 && Math.abs(y - prevY) <= 5\n\n onScrollPositionChange?.({ x, y })\n scrollPosition.current = { x, y }\n\n if (type !== \"scroll\" || isEqual) return\n\n if (!isScrolling) setIsScrolling(true)\n\n clearTimeout(scrollTimeout.current)\n\n scrollTimeout.current = setTimeout(\n () => setIsScrolling(false),\n scrollHideDelay,\n )\n },\n [isScrolling, onScrollPositionChange, scrollHideDelay, type],\n )\n\n useEffect(() => {\n return () => {\n if (hoverTimeout.current) clearTimeout(hoverTimeout.current)\n if (scrollTimeout.current) clearTimeout(scrollTimeout.current)\n }\n }, [])\n\n const safariProps = useMemo(\n () => ({\n key,\n ref: mergeRefs(ref, scrollAreaRef),\n \"data-key\": key,\n }),\n [key, ref, scrollAreaRef],\n )\n\n const getRootProps: PropGetter = useCallback(\n ({ style, ...props } = {}) => ({\n ref,\n style: { overflow: \"auto\", ...style },\n ...rest,\n ...(isSafari ? safariProps : {}),\n ...props,\n \"data-hidden\": dataAttr(isHidden),\n \"data-hover\": dataAttr(isHovered),\n \"data-never\": dataAttr(isNever),\n \"data-scroll\": dataAttr(isScrolling),\n tabIndex: 0,\n onMouseEnter: handlerAll(\n props.onMouseEnter,\n rest.onMouseEnter,\n onMouseEnter,\n ),\n onMouseLeave: handlerAll(\n props.onMouseLeave,\n rest.onMouseLeave,\n onMouseLeave,\n ),\n onPointerEnter: handlerAll(\n props.onPointerEnter,\n rest.onPointerEnter,\n onMouseEnter,\n ),\n onPointerLeave: handlerAll(\n props.onPointerLeave,\n rest.onPointerLeave,\n onMouseLeave,\n ),\n onScroll: handlerAll(props.onScroll, rest.onScroll, onScroll),\n }),\n [\n isNever,\n ref,\n isHidden,\n isHovered,\n isScrolling,\n isSafari,\n safariProps,\n rest,\n onMouseEnter,\n onMouseLeave,\n onScroll,\n ],\n )\n\n return {\n isAlways,\n isHidden,\n isHovered,\n isNever,\n isScrolling,\n getRootProps,\n }\n}\n\nexport type UseScrollAreaReturn = ReturnType<typeof useScrollArea>\n"],"mappings":";;;;;;;;;AAiCA,MAAa,iBAAiB,EAC5B,IACA,KACA,OAAO,SACP,kBAAkB,KAClB,wBACA,GAAG,SACmB,EAAE,KAAK;CAC7B,MAAM,CAAC,WAAW,oCAAkC,MAAM;CAC1D,MAAM,CAAC,aAAa,sCAAoC,MAAM;CAC9D,MAAM,WAAW,SAAS;CAC1B,MAAM,UAAU,SAAS;CACzB,MAAM,WAAW,CAAC,YAAY,CAAC,aAAa,CAAC;CAC7C,MAAM,yDAAkB,kDAAW,SAAS;CAC5C,MAAM,yBAAc;CACpB,MAAM,MAAM,GAAG,MAAM,KAAK,GAAG,UAAU,GAAG;CAE1C,MAAM,iCAA2B,OAAU;CAC3C,MAAM,kCAA4B,OAAU;CAC5C,MAAM,kCAAuC,KAAK;CAClD,MAAM,mCAAwB;EAAE,GAAG;EAAG,GAAG;EAAG,CAAC;AAE7C,0CAA0B;AACxB,MAAI,CAAC,cAAc,WAAW,CAAC,SAAU;AAEzC,gBAAc,QAAQ,aAAa,eAAe,QAAQ;AAC1D,gBAAc,QAAQ,YAAY,eAAe,QAAQ;GACzD;CAEF,MAAM,4CAAiC;AACrC,MAAI,SAAS,QAAS;AAEtB,eAAa,aAAa,QAAQ;AAElC,eAAa,KAAK;IACjB,CAAC,KAAK,CAAC;CAEV,MAAM,4CAAiC;AACrC,MAAI,SAAS,QAAS;AAEtB,eAAa,UAAU,iBACf,aAAa,MAAM,EACzB,gBACD;IACA,CAAC,iBAAiB,KAAK,CAAC;CAE3B,MAAM,mCACH,OAAgC;EAG/B,MAAM,EAAE,YAAY,GAAG,WAAW,MAFvB,GAAG;EAGd,MAAM,EAAE,GAAG,OAAO,GAAG,UAAU,eAAe;EAC9C,MAAM,UAAU,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI;AAEnE,2BAAyB;GAAE;GAAG;GAAG,CAAC;AAClC,iBAAe,UAAU;GAAE;GAAG;GAAG;AAEjC,MAAI,SAAS,YAAY,QAAS;AAElC,MAAI,CAAC,YAAa,gBAAe,KAAK;AAEtC,eAAa,cAAc,QAAQ;AAEnC,gBAAc,UAAU,iBAChB,eAAe,MAAM,EAC3B,gBACD;IAEH;EAAC;EAAa;EAAwB;EAAiB;EAAK,CAC7D;AAED,4BAAgB;AACd,eAAa;AACX,OAAI,aAAa,QAAS,cAAa,aAAa,QAAQ;AAC5D,OAAI,cAAc,QAAS,cAAa,cAAc,QAAQ;;IAE/D,EAAE,CAAC;CAEN,MAAM,wCACG;EACL;EACA,KAAKA,sBAAU,KAAK,cAAc;EAClC,YAAY;EACb,GACD;EAAC;EAAK;EAAK;EAAc,CAC1B;AAmDD,QAAO;EACL;EACA;EACA;EACA;EACA;EACA,sCAtDC,EAAE,OAAO,GAAG,UAAU,EAAE,MAAM;GAC7B;GACA,OAAO;IAAE,UAAU;IAAQ,GAAG;IAAO;GACrC,GAAG;GACH,GAAI,WAAW,cAAc,EAAE;GAC/B,GAAG;GACH,+DAAwB,SAAS;GACjC,8DAAuB,UAAU;GACjC,8DAAuB,QAAQ;GAC/B,+DAAwB,YAAY;GACpC,UAAU;GACV,gEACE,MAAM,cACN,KAAK,cACL,aACD;GACD,gEACE,MAAM,cACN,KAAK,cACL,aACD;GACD,kEACE,MAAM,gBACN,KAAK,gBACL,aACD;GACD,kEACE,MAAM,gBACN,KAAK,gBACL,aACD;GACD,4DAAqB,MAAM,UAAU,KAAK,UAAU,SAAS;GAC9D,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EASA"}
1
+ {"version":3,"file":"use-scroll-area.cjs","names":["mergeProps"],"sources":["../../../../src/components/scroll-area/use-scroll-area.ts"],"sourcesContent":["\"use client\"\n\nimport type { UIEvent } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport { useCallback, useEffect, useId, useRef, useState } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { dataAttr, isMac, useSafeLayoutEffect, vendor } from \"../../utils\"\n\nexport interface UseScrollAreaProps extends HTMLProps {\n /**\n * Delay in milliseconds before scrollbars are hidden.\n *\n * @default 1000\n */\n scrollHideDelay?: number\n /**\n * Scrollbar visibility type.\n *\n * @default 'hover'\n */\n type?: \"always\" | \"hover\" | \"never\" | \"scroll\"\n /**\n * Callback function for when the scroll position changes.\n */\n onScrollPositionChange?: ({ x, y }: { x: number; y: number }) => void\n}\n\nexport const useScrollArea = ({\n id,\n type = \"hover\",\n scrollHideDelay = 1000,\n onScrollPositionChange,\n ...rest\n}: UseScrollAreaProps = {}) => {\n const [isHovered, setIsHovered] = useState<boolean>(false)\n const [isScrolling, setIsScrolling] = useState<boolean>(false)\n const isAlways = type === \"always\"\n const isNever = type === \"never\"\n const isHidden = !isAlways && !isHovered && !isScrolling\n const isSafari = isMac() && vendor(/apple/i)\n const uuid = useId()\n const key = `${id ?? uuid}-${isHovered}-${isScrolling}`\n\n const hoverTimeout = useRef<any>(undefined)\n const scrollTimeout = useRef<any>(undefined)\n const scrollAreaRef = useRef<HTMLDivElement>(null)\n const scrollPosition = useRef({ x: 0, y: 0 })\n\n useSafeLayoutEffect(() => {\n if (!scrollAreaRef.current || !isSafari) return\n\n scrollAreaRef.current.scrollLeft = scrollPosition.current.x\n scrollAreaRef.current.scrollTop = scrollPosition.current.y\n })\n\n const onMouseEnter = useCallback(() => {\n if (type !== \"hover\") return\n\n clearTimeout(hoverTimeout.current)\n\n setIsHovered(true)\n }, [type])\n\n const onMouseLeave = useCallback(() => {\n if (type !== \"hover\") return\n\n hoverTimeout.current = setTimeout(\n () => setIsHovered(false),\n scrollHideDelay,\n )\n }, [scrollHideDelay, type])\n\n const onScroll = useCallback(\n (ev: UIEvent<HTMLDivElement>) => {\n const el = ev.target as HTMLDivElement\n\n const { scrollLeft: x, scrollTop: y } = el\n const { x: prevX, y: prevY } = scrollPosition.current\n const isEqual = Math.abs(x - prevX) <= 5 && Math.abs(y - prevY) <= 5\n\n onScrollPositionChange?.({ x, y })\n scrollPosition.current = { x, y }\n\n if (type !== \"scroll\" || isEqual) return\n\n if (!isScrolling) setIsScrolling(true)\n\n clearTimeout(scrollTimeout.current)\n\n scrollTimeout.current = setTimeout(\n () => setIsScrolling(false),\n scrollHideDelay,\n )\n },\n [isScrolling, onScrollPositionChange, scrollHideDelay, type],\n )\n\n useEffect(() => {\n return () => {\n if (hoverTimeout.current) clearTimeout(hoverTimeout.current)\n if (scrollTimeout.current) clearTimeout(scrollTimeout.current)\n }\n }, [])\n\n const getRootProps: PropGetter = useCallback(\n (props = {}) =>\n mergeProps(\n {\n style: { overflow: \"auto\" },\n \"data-hidden\": dataAttr(isHidden),\n \"data-hover\": dataAttr(isHovered),\n \"data-never\": dataAttr(isNever),\n \"data-scroll\": dataAttr(isScrolling),\n tabIndex: 0,\n },\n isSafari ? { key, ref: scrollAreaRef, \"data-key\": key } : {},\n rest,\n props,\n {\n onMouseEnter,\n onMouseLeave,\n onPointerEnter: onMouseEnter,\n onPointerLeave: onMouseLeave,\n onScroll,\n },\n )(),\n [\n isNever,\n isHidden,\n isHovered,\n isScrolling,\n isSafari,\n key,\n rest,\n onMouseEnter,\n onMouseLeave,\n onScroll,\n ],\n )\n\n return {\n isAlways,\n isHidden,\n isHovered,\n isNever,\n isScrolling,\n getRootProps,\n }\n}\n\nexport type UseScrollAreaReturn = ReturnType<typeof useScrollArea>\n"],"mappings":";;;;;;;;;;AA2BA,MAAa,iBAAiB,EAC5B,IACA,OAAO,SACP,kBAAkB,KAClB,wBACA,GAAG,SACmB,EAAE,KAAK;CAC7B,MAAM,CAAC,WAAW,oCAAkC,MAAM;CAC1D,MAAM,CAAC,aAAa,sCAAoC,MAAM;CAC9D,MAAM,WAAW,SAAS;CAC1B,MAAM,UAAU,SAAS;CACzB,MAAM,WAAW,CAAC,YAAY,CAAC,aAAa,CAAC;CAC7C,MAAM,yDAAkB,kDAAW,SAAS;CAC5C,MAAM,yBAAc;CACpB,MAAM,MAAM,GAAG,MAAM,KAAK,GAAG,UAAU,GAAG;CAE1C,MAAM,iCAA2B,OAAU;CAC3C,MAAM,kCAA4B,OAAU;CAC5C,MAAM,kCAAuC,KAAK;CAClD,MAAM,mCAAwB;EAAE,GAAG;EAAG,GAAG;EAAG,CAAC;AAE7C,0CAA0B;AACxB,MAAI,CAAC,cAAc,WAAW,CAAC,SAAU;AAEzC,gBAAc,QAAQ,aAAa,eAAe,QAAQ;AAC1D,gBAAc,QAAQ,YAAY,eAAe,QAAQ;GACzD;CAEF,MAAM,4CAAiC;AACrC,MAAI,SAAS,QAAS;AAEtB,eAAa,aAAa,QAAQ;AAElC,eAAa,KAAK;IACjB,CAAC,KAAK,CAAC;CAEV,MAAM,4CAAiC;AACrC,MAAI,SAAS,QAAS;AAEtB,eAAa,UAAU,iBACf,aAAa,MAAM,EACzB,gBACD;IACA,CAAC,iBAAiB,KAAK,CAAC;CAE3B,MAAM,mCACH,OAAgC;EAG/B,MAAM,EAAE,YAAY,GAAG,WAAW,MAFvB,GAAG;EAGd,MAAM,EAAE,GAAG,OAAO,GAAG,UAAU,eAAe;EAC9C,MAAM,UAAU,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI;AAEnE,2BAAyB;GAAE;GAAG;GAAG,CAAC;AAClC,iBAAe,UAAU;GAAE;GAAG;GAAG;AAEjC,MAAI,SAAS,YAAY,QAAS;AAElC,MAAI,CAAC,YAAa,gBAAe,KAAK;AAEtC,eAAa,cAAc,QAAQ;AAEnC,gBAAc,UAAU,iBAChB,eAAe,MAAM,EAC3B,gBACD;IAEH;EAAC;EAAa;EAAwB;EAAiB;EAAK,CAC7D;AAED,4BAAgB;AACd,eAAa;AACX,OAAI,aAAa,QAAS,cAAa,aAAa,QAAQ;AAC5D,OAAI,cAAc,QAAS,cAAa,cAAc,QAAQ;;IAE/D,EAAE,CAAC;AAsCN,QAAO;EACL;EACA;EACA;EACA;EACA;EACA,sCAzCC,QAAQ,EAAE,KACTA,yBACE;GACE,OAAO,EAAE,UAAU,QAAQ;GAC3B,+DAAwB,SAAS;GACjC,8DAAuB,UAAU;GACjC,8DAAuB,QAAQ;GAC/B,+DAAwB,YAAY;GACpC,UAAU;GACX,EACD,WAAW;GAAE;GAAK,KAAK;GAAe,YAAY;GAAK,GAAG,EAAE,EAC5D,MACA,OACA;GACE;GACA;GACA,gBAAgB;GAChB,gBAAgB;GAChB;GACD,CACF,EAAE,EACL;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EASA"}
@@ -39,6 +39,7 @@ const InfiniteScrollArea = withProvider(({ ref, children, disabled, finish: fini
39
39
  ref: mergeRefs(rootRef, ref),
40
40
  "aria-busy": "false",
41
41
  role: "feed",
42
+ tabIndex: 0,
42
43
  ...rest,
43
44
  children: [
44
45
  reverse && showTrigger ? /* @__PURE__ */ jsx(InfiniteScrollTrigger, {
@@ -1 +1 @@
1
- {"version":3,"file":"infinite-scroll-area.js","names":[],"sources":["../../../../src/components/infinite-scroll-area/infinite-scroll-area.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactNode } from \"react\"\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { InfiniteScrollAreaStyle } from \"./infinite-scroll-area.style\"\nimport type { UseInfiniteScrollProps } from \"./use-infinite-scroll\"\nimport { useRef } from \"react\"\nimport { createSlotComponent, styled } from \"../../core\"\nimport { useValue } from \"../../hooks/use-value\"\nimport { isNull, mergeRefs } from \"../../utils\"\nimport { infiniteScrollAreaStyle } from \"./infinite-scroll-area.style\"\nimport { useInfiniteScroll } from \"./use-infinite-scroll\"\n\nexport interface InfiniteScrollAreaProps\n extends\n Omit<HTMLStyledProps, keyof UseInfiniteScrollProps>,\n Omit<UseInfiniteScrollProps, \"orientation\">,\n ThemeProps<InfiniteScrollAreaStyle> {\n /**\n * The infinite scroll area finish to use.\n */\n finish?: ReactNode\n /**\n * The infinite scroll area loading to use.\n */\n loading?: ReactNode\n /**\n * Props for infinite scroll area trigger component.\n */\n triggerProps?: HTMLStyledProps\n}\n\nconst {\n PropsContext: InfiniteScrollAreaPropsContext,\n usePropsContext: useInfiniteScrollAreaPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<InfiniteScrollAreaProps, InfiniteScrollAreaStyle>(\n \"infinite-scroll-area\",\n infiniteScrollAreaStyle,\n)\n\nexport { InfiniteScrollAreaPropsContext, useInfiniteScrollAreaPropsContext }\n\n/**\n * `InfiniteScrollArea` is for providing infinite scroll functionality.\n * This feature provides a smooth scrolling experience by automatically loading and displaying the next dataset when the user reaches the end of the page.\n *\n * @see https://yamada-ui.com/docs/components/infinite-scroll-area\n */\nexport const InfiniteScrollArea = withProvider<\n \"div\",\n InfiniteScrollAreaProps,\n \"orientation\"\n>(\n ({\n ref,\n children,\n disabled,\n finish: finishProp,\n indexRef,\n initialLoad,\n loading,\n orientation: orientationProp,\n resetRef,\n reverse,\n rootMargin,\n rootRef: rootRefProp,\n startIndex,\n threshold,\n triggerProps,\n onLoad,\n ...rest\n }) => {\n const rootRef = useRef<HTMLDivElement>(null)\n const orientation = useValue(orientationProp)\n const { ref: triggerRef, finish } = useInfiniteScroll({\n disabled,\n indexRef,\n initialLoad,\n orientation,\n resetRef,\n reverse,\n rootMargin,\n rootRef: isNull(rootRefProp) ? null : (rootRefProp ?? rootRef),\n startIndex,\n threshold,\n onLoad,\n })\n const hasFinish = !!finishProp\n const showTrigger = !disabled && (hasFinish || !finish)\n\n return (\n <styled.div\n ref={mergeRefs(rootRef, ref)}\n aria-busy=\"false\"\n role=\"feed\"\n {...rest}\n >\n {reverse && showTrigger ? (\n <InfiniteScrollTrigger ref={triggerRef} {...triggerProps}>\n {finish ? finishProp : loading}\n </InfiniteScrollTrigger>\n ) : null}\n\n {children}\n\n {!reverse && showTrigger ? (\n <InfiniteScrollTrigger ref={triggerRef} {...triggerProps}>\n {finish ? finishProp : loading}\n </InfiniteScrollTrigger>\n ) : null}\n </styled.div>\n )\n },\n \"root\",\n { transferProps: [\"orientation\"] },\n)()\n\ninterface InfiniteScrollTriggerProps extends HTMLStyledProps {}\n\nconst InfiniteScrollTrigger = withContext<\"div\", InfiniteScrollTriggerProps>(\n \"div\",\n \"trigger\",\n)()\n"],"mappings":";;;;;;;;;;;;;;AAgCA,MAAM,EACJ,cAAc,gCACd,iBAAiB,mCACjB,aACA,iBACE,oBACF,wBACA,wBACD;;;;;;;AAUD,MAAa,qBAAqB,cAK/B,EACC,KACA,UACA,UACA,QAAQ,YACR,UACA,aACA,SACA,aAAa,iBACb,UACA,SACA,YACA,SAAS,aACT,YACA,WACA,cACA,QACA,GAAG,WACC;CACJ,MAAM,UAAU,OAAuB,KAAK;CAE5C,MAAM,EAAE,KAAK,YAAY,WAAW,kBAAkB;EACpD;EACA;EACA;EACA,aALkB,SAAS,gBAAgB;EAM3C;EACA;EACA;EACA,mCAAgB,YAAY,GAAG,OAAQ,eAAe;EACtD;EACA;EACA;EACD,CAAC;CAEF,MAAM,cAAc,CAAC,aADH,CAAC,CAAC,cAC2B,CAAC;AAEhD,QACE,qBAAC,OAAO;EACN,KAAK,UAAU,SAAS,IAAI;EAC5B,aAAU;EACV,MAAK;EACL,GAAI;;GAEH,WAAW,cACV,oBAAC;IAAsB,KAAK;IAAY,GAAI;cACzC,SAAS,aAAa;KACD,GACtB;GAEH;GAEA,CAAC,WAAW,cACX,oBAAC;IAAsB,KAAK;IAAY,GAAI;cACzC,SAAS,aAAa;KACD,GACtB;;GACO;GAGjB,QACA,EAAE,eAAe,CAAC,cAAc,EAAE,CACnC,EAAE;AAIH,MAAM,wBAAwB,YAC5B,OACA,UACD,EAAE"}
1
+ {"version":3,"file":"infinite-scroll-area.js","names":[],"sources":["../../../../src/components/infinite-scroll-area/infinite-scroll-area.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactNode } from \"react\"\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { InfiniteScrollAreaStyle } from \"./infinite-scroll-area.style\"\nimport type { UseInfiniteScrollProps } from \"./use-infinite-scroll\"\nimport { useRef } from \"react\"\nimport { createSlotComponent, styled } from \"../../core\"\nimport { useValue } from \"../../hooks/use-value\"\nimport { isNull, mergeRefs } from \"../../utils\"\nimport { infiniteScrollAreaStyle } from \"./infinite-scroll-area.style\"\nimport { useInfiniteScroll } from \"./use-infinite-scroll\"\n\nexport interface InfiniteScrollAreaProps\n extends\n Omit<HTMLStyledProps, keyof UseInfiniteScrollProps>,\n Omit<UseInfiniteScrollProps, \"orientation\">,\n ThemeProps<InfiniteScrollAreaStyle> {\n /**\n * The infinite scroll area finish to use.\n */\n finish?: ReactNode\n /**\n * The infinite scroll area loading to use.\n */\n loading?: ReactNode\n /**\n * Props for infinite scroll area trigger component.\n */\n triggerProps?: HTMLStyledProps\n}\n\nconst {\n PropsContext: InfiniteScrollAreaPropsContext,\n usePropsContext: useInfiniteScrollAreaPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<InfiniteScrollAreaProps, InfiniteScrollAreaStyle>(\n \"infinite-scroll-area\",\n infiniteScrollAreaStyle,\n)\n\nexport { InfiniteScrollAreaPropsContext, useInfiniteScrollAreaPropsContext }\n\n/**\n * `InfiniteScrollArea` is for providing infinite scroll functionality.\n * This feature provides a smooth scrolling experience by automatically loading and displaying the next dataset when the user reaches the end of the page.\n *\n * @see https://yamada-ui.com/docs/components/infinite-scroll-area\n */\nexport const InfiniteScrollArea = withProvider<\n \"div\",\n InfiniteScrollAreaProps,\n \"orientation\"\n>(\n ({\n ref,\n children,\n disabled,\n finish: finishProp,\n indexRef,\n initialLoad,\n loading,\n orientation: orientationProp,\n resetRef,\n reverse,\n rootMargin,\n rootRef: rootRefProp,\n startIndex,\n threshold,\n triggerProps,\n onLoad,\n ...rest\n }) => {\n const rootRef = useRef<HTMLDivElement>(null)\n const orientation = useValue(orientationProp)\n const { ref: triggerRef, finish } = useInfiniteScroll({\n disabled,\n indexRef,\n initialLoad,\n orientation,\n resetRef,\n reverse,\n rootMargin,\n rootRef: isNull(rootRefProp) ? null : (rootRefProp ?? rootRef),\n startIndex,\n threshold,\n onLoad,\n })\n const hasFinish = !!finishProp\n const showTrigger = !disabled && (hasFinish || !finish)\n\n return (\n <styled.div\n ref={mergeRefs(rootRef, ref)}\n aria-busy=\"false\"\n role=\"feed\"\n tabIndex={0}\n {...rest}\n >\n {reverse && showTrigger ? (\n <InfiniteScrollTrigger ref={triggerRef} {...triggerProps}>\n {finish ? finishProp : loading}\n </InfiniteScrollTrigger>\n ) : null}\n\n {children}\n\n {!reverse && showTrigger ? (\n <InfiniteScrollTrigger ref={triggerRef} {...triggerProps}>\n {finish ? finishProp : loading}\n </InfiniteScrollTrigger>\n ) : null}\n </styled.div>\n )\n },\n \"root\",\n { transferProps: [\"orientation\"] },\n)()\n\ninterface InfiniteScrollTriggerProps extends HTMLStyledProps {}\n\nconst InfiniteScrollTrigger = withContext<\"div\", InfiniteScrollTriggerProps>(\n \"div\",\n \"trigger\",\n)()\n"],"mappings":";;;;;;;;;;;;;;AAgCA,MAAM,EACJ,cAAc,gCACd,iBAAiB,mCACjB,aACA,iBACE,oBACF,wBACA,wBACD;;;;;;;AAUD,MAAa,qBAAqB,cAK/B,EACC,KACA,UACA,UACA,QAAQ,YACR,UACA,aACA,SACA,aAAa,iBACb,UACA,SACA,YACA,SAAS,aACT,YACA,WACA,cACA,QACA,GAAG,WACC;CACJ,MAAM,UAAU,OAAuB,KAAK;CAE5C,MAAM,EAAE,KAAK,YAAY,WAAW,kBAAkB;EACpD;EACA;EACA;EACA,aALkB,SAAS,gBAAgB;EAM3C;EACA;EACA;EACA,mCAAgB,YAAY,GAAG,OAAQ,eAAe;EACtD;EACA;EACA;EACD,CAAC;CAEF,MAAM,cAAc,CAAC,aADH,CAAC,CAAC,cAC2B,CAAC;AAEhD,QACE,qBAAC,OAAO;EACN,KAAK,UAAU,SAAS,IAAI;EAC5B,aAAU;EACV,MAAK;EACL,UAAU;EACV,GAAI;;GAEH,WAAW,cACV,oBAAC;IAAsB,KAAK;IAAY,GAAI;cACzC,SAAS,aAAa;KACD,GACtB;GAEH;GAEA,CAAC,WAAW,cACX,oBAAC;IAAsB,KAAK;IAAY,GAAI;cACzC,SAAS,aAAa;KACD,GACtB;;GACO;GAGjB,QACA,EAAE,eAAe,CAAC,cAAc,EAAE,CACnC,EAAE;AAIH,MAAM,wBAAwB,YAC5B,OACA,UACD,EAAE"}
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
 
3
3
  import { useSafeLayoutEffect } from "../../utils/effect.js";
4
- import { mergeRefs } from "../../utils/ref.js";
5
4
  import { utils_exports } from "../../utils/index.js";
6
- import { useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
5
+ import { mergeProps } from "../../core/components/props.js";
6
+ import "../../core/index.js";
7
+ import { useCallback, useEffect, useId, useRef, useState } from "react";
7
8
 
8
9
  //#region src/components/scroll-area/use-scroll-area.ts
9
- const useScrollArea = ({ id, ref, type = "hover", scrollHideDelay = 1e3, onScrollPositionChange, ...rest } = {}) => {
10
+ const useScrollArea = ({ id, type = "hover", scrollHideDelay = 1e3, onScrollPositionChange, ...rest } = {}) => {
10
11
  const [isHovered, setIsHovered] = useState(false);
11
12
  const [isScrolling, setIsScrolling] = useState(false);
12
13
  const isAlways = type === "always";
@@ -64,48 +65,36 @@ const useScrollArea = ({ id, ref, type = "hover", scrollHideDelay = 1e3, onScrol
64
65
  if (scrollTimeout.current) clearTimeout(scrollTimeout.current);
65
66
  };
66
67
  }, []);
67
- const safariProps = useMemo(() => ({
68
- key,
69
- ref: mergeRefs(ref, scrollAreaRef),
70
- "data-key": key
71
- }), [
72
- key,
73
- ref,
74
- scrollAreaRef
75
- ]);
76
68
  return {
77
69
  isAlways,
78
70
  isHidden,
79
71
  isHovered,
80
72
  isNever,
81
73
  isScrolling,
82
- getRootProps: useCallback(({ style, ...props } = {}) => ({
83
- ref,
84
- style: {
85
- overflow: "auto",
86
- ...style
87
- },
88
- ...rest,
89
- ...isSafari ? safariProps : {},
90
- ...props,
74
+ getRootProps: useCallback((props = {}) => mergeProps({
75
+ style: { overflow: "auto" },
91
76
  "data-hidden": (0, utils_exports.dataAttr)(isHidden),
92
77
  "data-hover": (0, utils_exports.dataAttr)(isHovered),
93
78
  "data-never": (0, utils_exports.dataAttr)(isNever),
94
79
  "data-scroll": (0, utils_exports.dataAttr)(isScrolling),
95
- tabIndex: 0,
96
- onMouseEnter: (0, utils_exports.handlerAll)(props.onMouseEnter, rest.onMouseEnter, onMouseEnter),
97
- onMouseLeave: (0, utils_exports.handlerAll)(props.onMouseLeave, rest.onMouseLeave, onMouseLeave),
98
- onPointerEnter: (0, utils_exports.handlerAll)(props.onPointerEnter, rest.onPointerEnter, onMouseEnter),
99
- onPointerLeave: (0, utils_exports.handlerAll)(props.onPointerLeave, rest.onPointerLeave, onMouseLeave),
100
- onScroll: (0, utils_exports.handlerAll)(props.onScroll, rest.onScroll, onScroll)
101
- }), [
80
+ tabIndex: 0
81
+ }, isSafari ? {
82
+ key,
83
+ ref: scrollAreaRef,
84
+ "data-key": key
85
+ } : {}, rest, props, {
86
+ onMouseEnter,
87
+ onMouseLeave,
88
+ onPointerEnter: onMouseEnter,
89
+ onPointerLeave: onMouseLeave,
90
+ onScroll
91
+ })(), [
102
92
  isNever,
103
- ref,
104
93
  isHidden,
105
94
  isHovered,
106
95
  isScrolling,
107
96
  isSafari,
108
- safariProps,
97
+ key,
109
98
  rest,
110
99
  onMouseEnter,
111
100
  onMouseLeave,
@@ -1 +1 @@
1
- {"version":3,"file":"use-scroll-area.js","names":[],"sources":["../../../../src/components/scroll-area/use-scroll-area.ts"],"sourcesContent":["\"use client\"\n\nimport type { UIEvent } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport { useCallback, useEffect, useId, useMemo, useRef, useState } from \"react\"\nimport {\n dataAttr,\n handlerAll,\n isMac,\n mergeRefs,\n useSafeLayoutEffect,\n vendor,\n} from \"../../utils\"\n\nexport interface UseScrollAreaProps extends HTMLProps {\n /**\n * Delay in milliseconds before scrollbars are hidden.\n *\n * @default 1000\n */\n scrollHideDelay?: number\n /**\n * Scrollbar visibility type.\n *\n * @default 'hover'\n */\n type?: \"always\" | \"hover\" | \"never\" | \"scroll\"\n /**\n * Callback function for when the scroll position changes.\n */\n onScrollPositionChange?: ({ x, y }: { x: number; y: number }) => void\n}\n\nexport const useScrollArea = ({\n id,\n ref,\n type = \"hover\",\n scrollHideDelay = 1000,\n onScrollPositionChange,\n ...rest\n}: UseScrollAreaProps = {}) => {\n const [isHovered, setIsHovered] = useState<boolean>(false)\n const [isScrolling, setIsScrolling] = useState<boolean>(false)\n const isAlways = type === \"always\"\n const isNever = type === \"never\"\n const isHidden = !isAlways && !isHovered && !isScrolling\n const isSafari = isMac() && vendor(/apple/i)\n const uuid = useId()\n const key = `${id ?? uuid}-${isHovered}-${isScrolling}`\n\n const hoverTimeout = useRef<any>(undefined)\n const scrollTimeout = useRef<any>(undefined)\n const scrollAreaRef = useRef<HTMLDivElement>(null)\n const scrollPosition = useRef({ x: 0, y: 0 })\n\n useSafeLayoutEffect(() => {\n if (!scrollAreaRef.current || !isSafari) return\n\n scrollAreaRef.current.scrollLeft = scrollPosition.current.x\n scrollAreaRef.current.scrollTop = scrollPosition.current.y\n })\n\n const onMouseEnter = useCallback(() => {\n if (type !== \"hover\") return\n\n clearTimeout(hoverTimeout.current)\n\n setIsHovered(true)\n }, [type])\n\n const onMouseLeave = useCallback(() => {\n if (type !== \"hover\") return\n\n hoverTimeout.current = setTimeout(\n () => setIsHovered(false),\n scrollHideDelay,\n )\n }, [scrollHideDelay, type])\n\n const onScroll = useCallback(\n (ev: UIEvent<HTMLDivElement>) => {\n const el = ev.target as HTMLDivElement\n\n const { scrollLeft: x, scrollTop: y } = el\n const { x: prevX, y: prevY } = scrollPosition.current\n const isEqual = Math.abs(x - prevX) <= 5 && Math.abs(y - prevY) <= 5\n\n onScrollPositionChange?.({ x, y })\n scrollPosition.current = { x, y }\n\n if (type !== \"scroll\" || isEqual) return\n\n if (!isScrolling) setIsScrolling(true)\n\n clearTimeout(scrollTimeout.current)\n\n scrollTimeout.current = setTimeout(\n () => setIsScrolling(false),\n scrollHideDelay,\n )\n },\n [isScrolling, onScrollPositionChange, scrollHideDelay, type],\n )\n\n useEffect(() => {\n return () => {\n if (hoverTimeout.current) clearTimeout(hoverTimeout.current)\n if (scrollTimeout.current) clearTimeout(scrollTimeout.current)\n }\n }, [])\n\n const safariProps = useMemo(\n () => ({\n key,\n ref: mergeRefs(ref, scrollAreaRef),\n \"data-key\": key,\n }),\n [key, ref, scrollAreaRef],\n )\n\n const getRootProps: PropGetter = useCallback(\n ({ style, ...props } = {}) => ({\n ref,\n style: { overflow: \"auto\", ...style },\n ...rest,\n ...(isSafari ? safariProps : {}),\n ...props,\n \"data-hidden\": dataAttr(isHidden),\n \"data-hover\": dataAttr(isHovered),\n \"data-never\": dataAttr(isNever),\n \"data-scroll\": dataAttr(isScrolling),\n tabIndex: 0,\n onMouseEnter: handlerAll(\n props.onMouseEnter,\n rest.onMouseEnter,\n onMouseEnter,\n ),\n onMouseLeave: handlerAll(\n props.onMouseLeave,\n rest.onMouseLeave,\n onMouseLeave,\n ),\n onPointerEnter: handlerAll(\n props.onPointerEnter,\n rest.onPointerEnter,\n onMouseEnter,\n ),\n onPointerLeave: handlerAll(\n props.onPointerLeave,\n rest.onPointerLeave,\n onMouseLeave,\n ),\n onScroll: handlerAll(props.onScroll, rest.onScroll, onScroll),\n }),\n [\n isNever,\n ref,\n isHidden,\n isHovered,\n isScrolling,\n isSafari,\n safariProps,\n rest,\n onMouseEnter,\n onMouseLeave,\n onScroll,\n ],\n )\n\n return {\n isAlways,\n isHidden,\n isHovered,\n isNever,\n isScrolling,\n getRootProps,\n }\n}\n\nexport type UseScrollAreaReturn = ReturnType<typeof useScrollArea>\n"],"mappings":";;;;;;;;AAiCA,MAAa,iBAAiB,EAC5B,IACA,KACA,OAAO,SACP,kBAAkB,KAClB,wBACA,GAAG,SACmB,EAAE,KAAK;CAC7B,MAAM,CAAC,WAAW,gBAAgB,SAAkB,MAAM;CAC1D,MAAM,CAAC,aAAa,kBAAkB,SAAkB,MAAM;CAC9D,MAAM,WAAW,SAAS;CAC1B,MAAM,UAAU,SAAS;CACzB,MAAM,WAAW,CAAC,YAAY,CAAC,aAAa,CAAC;CAC7C,MAAM,qCAAkB,8BAAW,SAAS;CAC5C,MAAM,OAAO,OAAO;CACpB,MAAM,MAAM,GAAG,MAAM,KAAK,GAAG,UAAU,GAAG;CAE1C,MAAM,eAAe,OAAY,OAAU;CAC3C,MAAM,gBAAgB,OAAY,OAAU;CAC5C,MAAM,gBAAgB,OAAuB,KAAK;CAClD,MAAM,iBAAiB,OAAO;EAAE,GAAG;EAAG,GAAG;EAAG,CAAC;AAE7C,2BAA0B;AACxB,MAAI,CAAC,cAAc,WAAW,CAAC,SAAU;AAEzC,gBAAc,QAAQ,aAAa,eAAe,QAAQ;AAC1D,gBAAc,QAAQ,YAAY,eAAe,QAAQ;GACzD;CAEF,MAAM,eAAe,kBAAkB;AACrC,MAAI,SAAS,QAAS;AAEtB,eAAa,aAAa,QAAQ;AAElC,eAAa,KAAK;IACjB,CAAC,KAAK,CAAC;CAEV,MAAM,eAAe,kBAAkB;AACrC,MAAI,SAAS,QAAS;AAEtB,eAAa,UAAU,iBACf,aAAa,MAAM,EACzB,gBACD;IACA,CAAC,iBAAiB,KAAK,CAAC;CAE3B,MAAM,WAAW,aACd,OAAgC;EAG/B,MAAM,EAAE,YAAY,GAAG,WAAW,MAFvB,GAAG;EAGd,MAAM,EAAE,GAAG,OAAO,GAAG,UAAU,eAAe;EAC9C,MAAM,UAAU,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI;AAEnE,2BAAyB;GAAE;GAAG;GAAG,CAAC;AAClC,iBAAe,UAAU;GAAE;GAAG;GAAG;AAEjC,MAAI,SAAS,YAAY,QAAS;AAElC,MAAI,CAAC,YAAa,gBAAe,KAAK;AAEtC,eAAa,cAAc,QAAQ;AAEnC,gBAAc,UAAU,iBAChB,eAAe,MAAM,EAC3B,gBACD;IAEH;EAAC;EAAa;EAAwB;EAAiB;EAAK,CAC7D;AAED,iBAAgB;AACd,eAAa;AACX,OAAI,aAAa,QAAS,cAAa,aAAa,QAAQ;AAC5D,OAAI,cAAc,QAAS,cAAa,cAAc,QAAQ;;IAE/D,EAAE,CAAC;CAEN,MAAM,cAAc,eACX;EACL;EACA,KAAK,UAAU,KAAK,cAAc;EAClC,YAAY;EACb,GACD;EAAC;EAAK;EAAK;EAAc,CAC1B;AAmDD,QAAO;EACL;EACA;EACA;EACA;EACA;EACA,cAvD+B,aAC9B,EAAE,OAAO,GAAG,UAAU,EAAE,MAAM;GAC7B;GACA,OAAO;IAAE,UAAU;IAAQ,GAAG;IAAO;GACrC,GAAG;GACH,GAAI,WAAW,cAAc,EAAE;GAC/B,GAAG;GACH,2CAAwB,SAAS;GACjC,0CAAuB,UAAU;GACjC,0CAAuB,QAAQ;GAC/B,2CAAwB,YAAY;GACpC,UAAU;GACV,4CACE,MAAM,cACN,KAAK,cACL,aACD;GACD,4CACE,MAAM,cACN,KAAK,cACL,aACD;GACD,8CACE,MAAM,gBACN,KAAK,gBACL,aACD;GACD,8CACE,MAAM,gBACN,KAAK,gBACL,aACD;GACD,wCAAqB,MAAM,UAAU,KAAK,UAAU,SAAS;GAC9D,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EASA"}
1
+ {"version":3,"file":"use-scroll-area.js","names":[],"sources":["../../../../src/components/scroll-area/use-scroll-area.ts"],"sourcesContent":["\"use client\"\n\nimport type { UIEvent } from \"react\"\nimport type { HTMLProps, PropGetter } from \"../../core\"\nimport { useCallback, useEffect, useId, useRef, useState } from \"react\"\nimport { mergeProps } from \"../../core\"\nimport { dataAttr, isMac, useSafeLayoutEffect, vendor } from \"../../utils\"\n\nexport interface UseScrollAreaProps extends HTMLProps {\n /**\n * Delay in milliseconds before scrollbars are hidden.\n *\n * @default 1000\n */\n scrollHideDelay?: number\n /**\n * Scrollbar visibility type.\n *\n * @default 'hover'\n */\n type?: \"always\" | \"hover\" | \"never\" | \"scroll\"\n /**\n * Callback function for when the scroll position changes.\n */\n onScrollPositionChange?: ({ x, y }: { x: number; y: number }) => void\n}\n\nexport const useScrollArea = ({\n id,\n type = \"hover\",\n scrollHideDelay = 1000,\n onScrollPositionChange,\n ...rest\n}: UseScrollAreaProps = {}) => {\n const [isHovered, setIsHovered] = useState<boolean>(false)\n const [isScrolling, setIsScrolling] = useState<boolean>(false)\n const isAlways = type === \"always\"\n const isNever = type === \"never\"\n const isHidden = !isAlways && !isHovered && !isScrolling\n const isSafari = isMac() && vendor(/apple/i)\n const uuid = useId()\n const key = `${id ?? uuid}-${isHovered}-${isScrolling}`\n\n const hoverTimeout = useRef<any>(undefined)\n const scrollTimeout = useRef<any>(undefined)\n const scrollAreaRef = useRef<HTMLDivElement>(null)\n const scrollPosition = useRef({ x: 0, y: 0 })\n\n useSafeLayoutEffect(() => {\n if (!scrollAreaRef.current || !isSafari) return\n\n scrollAreaRef.current.scrollLeft = scrollPosition.current.x\n scrollAreaRef.current.scrollTop = scrollPosition.current.y\n })\n\n const onMouseEnter = useCallback(() => {\n if (type !== \"hover\") return\n\n clearTimeout(hoverTimeout.current)\n\n setIsHovered(true)\n }, [type])\n\n const onMouseLeave = useCallback(() => {\n if (type !== \"hover\") return\n\n hoverTimeout.current = setTimeout(\n () => setIsHovered(false),\n scrollHideDelay,\n )\n }, [scrollHideDelay, type])\n\n const onScroll = useCallback(\n (ev: UIEvent<HTMLDivElement>) => {\n const el = ev.target as HTMLDivElement\n\n const { scrollLeft: x, scrollTop: y } = el\n const { x: prevX, y: prevY } = scrollPosition.current\n const isEqual = Math.abs(x - prevX) <= 5 && Math.abs(y - prevY) <= 5\n\n onScrollPositionChange?.({ x, y })\n scrollPosition.current = { x, y }\n\n if (type !== \"scroll\" || isEqual) return\n\n if (!isScrolling) setIsScrolling(true)\n\n clearTimeout(scrollTimeout.current)\n\n scrollTimeout.current = setTimeout(\n () => setIsScrolling(false),\n scrollHideDelay,\n )\n },\n [isScrolling, onScrollPositionChange, scrollHideDelay, type],\n )\n\n useEffect(() => {\n return () => {\n if (hoverTimeout.current) clearTimeout(hoverTimeout.current)\n if (scrollTimeout.current) clearTimeout(scrollTimeout.current)\n }\n }, [])\n\n const getRootProps: PropGetter = useCallback(\n (props = {}) =>\n mergeProps(\n {\n style: { overflow: \"auto\" },\n \"data-hidden\": dataAttr(isHidden),\n \"data-hover\": dataAttr(isHovered),\n \"data-never\": dataAttr(isNever),\n \"data-scroll\": dataAttr(isScrolling),\n tabIndex: 0,\n },\n isSafari ? { key, ref: scrollAreaRef, \"data-key\": key } : {},\n rest,\n props,\n {\n onMouseEnter,\n onMouseLeave,\n onPointerEnter: onMouseEnter,\n onPointerLeave: onMouseLeave,\n onScroll,\n },\n )(),\n [\n isNever,\n isHidden,\n isHovered,\n isScrolling,\n isSafari,\n key,\n rest,\n onMouseEnter,\n onMouseLeave,\n onScroll,\n ],\n )\n\n return {\n isAlways,\n isHidden,\n isHovered,\n isNever,\n isScrolling,\n getRootProps,\n }\n}\n\nexport type UseScrollAreaReturn = ReturnType<typeof useScrollArea>\n"],"mappings":";;;;;;;;;AA2BA,MAAa,iBAAiB,EAC5B,IACA,OAAO,SACP,kBAAkB,KAClB,wBACA,GAAG,SACmB,EAAE,KAAK;CAC7B,MAAM,CAAC,WAAW,gBAAgB,SAAkB,MAAM;CAC1D,MAAM,CAAC,aAAa,kBAAkB,SAAkB,MAAM;CAC9D,MAAM,WAAW,SAAS;CAC1B,MAAM,UAAU,SAAS;CACzB,MAAM,WAAW,CAAC,YAAY,CAAC,aAAa,CAAC;CAC7C,MAAM,qCAAkB,8BAAW,SAAS;CAC5C,MAAM,OAAO,OAAO;CACpB,MAAM,MAAM,GAAG,MAAM,KAAK,GAAG,UAAU,GAAG;CAE1C,MAAM,eAAe,OAAY,OAAU;CAC3C,MAAM,gBAAgB,OAAY,OAAU;CAC5C,MAAM,gBAAgB,OAAuB,KAAK;CAClD,MAAM,iBAAiB,OAAO;EAAE,GAAG;EAAG,GAAG;EAAG,CAAC;AAE7C,2BAA0B;AACxB,MAAI,CAAC,cAAc,WAAW,CAAC,SAAU;AAEzC,gBAAc,QAAQ,aAAa,eAAe,QAAQ;AAC1D,gBAAc,QAAQ,YAAY,eAAe,QAAQ;GACzD;CAEF,MAAM,eAAe,kBAAkB;AACrC,MAAI,SAAS,QAAS;AAEtB,eAAa,aAAa,QAAQ;AAElC,eAAa,KAAK;IACjB,CAAC,KAAK,CAAC;CAEV,MAAM,eAAe,kBAAkB;AACrC,MAAI,SAAS,QAAS;AAEtB,eAAa,UAAU,iBACf,aAAa,MAAM,EACzB,gBACD;IACA,CAAC,iBAAiB,KAAK,CAAC;CAE3B,MAAM,WAAW,aACd,OAAgC;EAG/B,MAAM,EAAE,YAAY,GAAG,WAAW,MAFvB,GAAG;EAGd,MAAM,EAAE,GAAG,OAAO,GAAG,UAAU,eAAe;EAC9C,MAAM,UAAU,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI;AAEnE,2BAAyB;GAAE;GAAG;GAAG,CAAC;AAClC,iBAAe,UAAU;GAAE;GAAG;GAAG;AAEjC,MAAI,SAAS,YAAY,QAAS;AAElC,MAAI,CAAC,YAAa,gBAAe,KAAK;AAEtC,eAAa,cAAc,QAAQ;AAEnC,gBAAc,UAAU,iBAChB,eAAe,MAAM,EAC3B,gBACD;IAEH;EAAC;EAAa;EAAwB;EAAiB;EAAK,CAC7D;AAED,iBAAgB;AACd,eAAa;AACX,OAAI,aAAa,QAAS,cAAa,aAAa,QAAQ;AAC5D,OAAI,cAAc,QAAS,cAAa,cAAc,QAAQ;;IAE/D,EAAE,CAAC;AAsCN,QAAO;EACL;EACA;EACA;EACA;EACA;EACA,cA1C+B,aAC9B,QAAQ,EAAE,KACT,WACE;GACE,OAAO,EAAE,UAAU,QAAQ;GAC3B,2CAAwB,SAAS;GACjC,0CAAuB,UAAU;GACjC,0CAAuB,QAAQ;GAC/B,2CAAwB,YAAY;GACpC,UAAU;GACX,EACD,WAAW;GAAE;GAAK,KAAK;GAAe,YAAY;GAAK,GAAG,EAAE,EAC5D,MACA,OACA;GACE;GACA;GACA,gBAAgB;GAChB,gBAAgB;GAChB;GACD,CACF,EAAE,EACL;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CACF;EASA"}
@@ -9,7 +9,7 @@ import "../collapse/index.js";
9
9
  import "../../index.js";
10
10
  import { AccordionStyle } from "./accordion.style.js";
11
11
  import { UseAccordionItemProps, UseAccordionProps } from "./use-accordion.js";
12
- import * as react1226 from "react";
12
+ import * as react207 from "react";
13
13
 
14
14
  //#region src/components/accordion/accordion.d.ts
15
15
  interface AccordionCallBackProps {
@@ -33,7 +33,7 @@ interface AccordionRootProps extends Omit<HTMLStyledProps, "onChange">, ThemePro
33
33
  */
34
34
  items?: AccordionItem[];
35
35
  }
36
- declare const AccordionPropsContext: react1226.Context<Partial<AccordionRootProps> | undefined>, useAccordionPropsContext: () => Partial<AccordionRootProps> | undefined;
36
+ declare const AccordionPropsContext: react207.Context<Partial<AccordionRootProps> | undefined>, useAccordionPropsContext: () => Partial<AccordionRootProps> | undefined;
37
37
  /**
38
38
  * `Accordion` is a component for a list that displays information in an expandable or collapsible manner.
39
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 react1214 from "react";
5
+ import * as react194 from "react";
6
6
 
7
7
  //#region src/components/accordion/use-accordion.d.ts
8
- declare const AccordionDescendantsContext: react1214.Context<{
8
+ declare const AccordionDescendantsContext: react194.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: react1214.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) => react1214.RefCallback<HTMLButtonElement>;
27
+ } | undefined) => react194.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: react1214.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) => react1214.RefCallback<HTMLButtonElement>;
53
+ } | undefined) => react194.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: react1214.RefCallback<HTMLButtonElement>;
58
+ register: react194.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: react1214.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) => react1214.RefCallback<HTMLButtonElement>;
78
+ } | undefined) => react194.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: react1214.Context<AccordionContext>, useAccordionContext: () => AccordionContext;
84
+ declare const AccordionContext: react194.Context<AccordionContext>, useAccordionContext: () => AccordionContext;
85
85
  interface AccordionItemContext extends Omit<UseAccordionItemReturn, "getItemProps"> {}
86
- declare const AccordionItemContext: react1214.Context<AccordionItemContext>, useAccordionItemContext: () => AccordionItemContext;
86
+ declare const AccordionItemContext: react194.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) => react1214.RefCallback<HTMLButtonElement>;
140
+ } | undefined) => react194.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: react1214.Dispatch<react1214.SetStateAction<number>>;
149
- setIndex: react1214.Dispatch<react1214.SetStateAction<number | number[]>>;
148
+ setFocusedIndex: react194.Dispatch<react194.SetStateAction<number>>;
149
+ setIndex: react194.Dispatch<react194.SetStateAction<number | number[]>>;
150
150
  toggle: boolean | undefined;
151
151
  getRootProps: PropGetter<"div", undefined, undefined>;
152
152
  };
@@ -7,7 +7,7 @@ import { UsePopupAnimationProps } from "../popover/popover.js";
7
7
  import "../popover/index.js";
8
8
  import { UseActionBarProps } from "./use-action-bar.js";
9
9
  import "../../index.js";
10
- import * as react1213 from "react";
10
+ import * as react206 from "react";
11
11
  import { PropsWithChildren, ReactNode } from "react";
12
12
 
13
13
  //#region src/components/action-bar/action-bar.d.ts
@@ -29,7 +29,7 @@ interface ActionBarRootProps extends Omit<HTMLStyledProps, "content">, ThemeProp
29
29
  */
30
30
  onCloseComplete?: () => void;
31
31
  }
32
- declare const ActionBarPropsContext: react1213.Context<Partial<ActionBarRootProps> | undefined>, useActionBarPropsContext: () => Partial<ActionBarRootProps> | undefined;
32
+ declare const ActionBarPropsContext: react206.Context<Partial<ActionBarRootProps> | undefined>, useActionBarPropsContext: () => Partial<ActionBarRootProps> | undefined;
33
33
  /**
34
34
  * `ActionBar` is a component that is used to display a bottom action bar with a set of actions.
35
35
  *
@@ -5,7 +5,7 @@ import { HTMLMotionProps } from "../motion/index.types.js";
5
5
  import "../motion/index.js";
6
6
  import { AiryStyle } from "./airy.style.js";
7
7
  import "../../index.js";
8
- import * as react1212 from "react";
8
+ import * as react192 from "react";
9
9
  import { ReactNode } from "react";
10
10
 
11
11
  //#region src/components/airy/airy.d.ts
@@ -57,7 +57,7 @@ interface AiryProps extends Omit<HTMLMotionProps<"button">, "onChange">, ThemePr
57
57
  */
58
58
  onChange?: (value: KeyframeIdent) => void;
59
59
  }
60
- declare const AiryPropsContext: react1212.Context<Partial<AiryProps> | undefined>, useAiryPropsContext: () => Partial<AiryProps> | undefined;
60
+ declare const AiryPropsContext: react192.Context<Partial<AiryProps> | undefined>, useAiryPropsContext: () => Partial<AiryProps> | undefined;
61
61
  /**
62
62
  * `Airy` is a component that creates an airy animation, switching between two elements when one is clicked.
63
63
  *
@@ -9,7 +9,7 @@ import "../loading/index.js";
9
9
  import { StatusScheme } from "../status/status.js";
10
10
  import "../status/index.js";
11
11
  import "../../index.js";
12
- import * as react1211 from "react";
12
+ import * as react193 from "react";
13
13
 
14
14
  //#region src/components/alert/alert.d.ts
15
15
  interface AlertRootProps extends HTMLStyledProps, ThemeProps<AlertStyle> {
@@ -20,7 +20,7 @@ interface AlertRootProps extends HTMLStyledProps, ThemeProps<AlertStyle> {
20
20
  */
21
21
  status?: StatusScheme;
22
22
  }
23
- declare const AlertPropsContext: react1211.Context<Partial<AlertRootProps> | undefined>, useAlertPropsContext: () => Partial<AlertRootProps> | undefined;
23
+ declare const AlertPropsContext: react193.Context<Partial<AlertRootProps> | undefined>, useAlertPropsContext: () => Partial<AlertRootProps> | undefined;
24
24
  /**
25
25
  * `Alert` is a component that conveys information to the user.
26
26
  *
@@ -5,7 +5,7 @@ import { AlphaSliderStyle } from "./alpha-slider.style.js";
5
5
  import { HueSliderOverlayProps, HueSliderRootProps, HueSliderThumbProps, HueSliderTrackProps } from "../hue-slider/hue-slider.js";
6
6
  import "../hue-slider/index.js";
7
7
  import "../../index.js";
8
- import * as react1206 from "react";
8
+ import * as react43 from "react";
9
9
 
10
10
  //#region src/components/alpha-slider/alpha-slider.d.ts
11
11
  interface AlphaSliderRootProps extends WithoutThemeProps<Omit<HueSliderRootProps, "color" | "max" | "step" | "thumbProps" | "trackProps">, AlphaSliderStyle> {
@@ -38,7 +38,7 @@ interface AlphaSliderRootProps extends WithoutThemeProps<Omit<HueSliderRootProps
38
38
  */
39
39
  trackProps?: AlphaSliderTrackProps;
40
40
  }
41
- declare const AlphaSliderPropsContext: react1206.Context<Partial<AlphaSliderRootProps> | undefined>, useAlphaSliderPropsContext: () => Partial<AlphaSliderRootProps> | undefined;
41
+ declare const AlphaSliderPropsContext: react43.Context<Partial<AlphaSliderRootProps> | undefined>, useAlphaSliderPropsContext: () => Partial<AlphaSliderRootProps> | undefined;
42
42
  /**
43
43
  * `AlphaSlider` is a component used to allow the user to select color transparency.
44
44
  *
@@ -2,7 +2,7 @@ import { StyleValue } from "../../core/css/index.types.js";
2
2
  import { Component, HTMLStyledProps } from "../../core/components/index.types.js";
3
3
  import "../../core/index.js";
4
4
  import "../../index.js";
5
- import * as react1205 from "react";
5
+ import * as react52 from "react";
6
6
 
7
7
  //#region src/components/aspect-ratio/aspect-ratio.d.ts
8
8
  interface AspectRatioProps extends HTMLStyledProps {
@@ -13,7 +13,7 @@ interface AspectRatioProps extends HTMLStyledProps {
13
13
  */
14
14
  ratio?: StyleValue<number>;
15
15
  }
16
- declare const AspectRatioPropsContext: react1205.Context<Partial<AspectRatioProps> | undefined>, useAspectRatioPropsContext: () => Partial<AspectRatioProps> | undefined;
16
+ declare const AspectRatioPropsContext: react52.Context<Partial<AspectRatioProps> | undefined>, useAspectRatioPropsContext: () => Partial<AspectRatioProps> | undefined;
17
17
  /**
18
18
  * `AspectRatio` is a component for embedding things like videos and maps while maintaining the aspect ratio.
19
19
  *
@@ -12,7 +12,7 @@ import { InputGroupRootProps } from "../input/input-group.js";
12
12
  import "../input/index.js";
13
13
  import { UseAutocompleteOptionProps, UseAutocompleteProps } from "./use-autocomplete.js";
14
14
  import "../../index.js";
15
- import * as react1204 from "react";
15
+ import * as react53 from "react";
16
16
  import { ReactElement, ReactNode } from "react";
17
17
 
18
18
  //#region src/components/autocomplete/autocomplete.d.ts
@@ -68,7 +68,7 @@ interface AutocompleteRootProps<Multiple extends boolean = false> extends Omit<H
68
68
  */
69
69
  rootProps?: InputGroupRootProps;
70
70
  }
71
- declare const AutocompletePropsContext: react1204.Context<Partial<AutocompleteRootProps<false>> | undefined>, useAutocompletePropsContext: () => Partial<AutocompleteRootProps<false>> | undefined;
71
+ declare const AutocompletePropsContext: react53.Context<Partial<AutocompleteRootProps<false>> | undefined>, useAutocompletePropsContext: () => Partial<AutocompleteRootProps<false>> | undefined;
72
72
  /**
73
73
  * `Autocomplete` is a component used to display suggestions in response to user text input.
74
74
  *
@@ -3,7 +3,7 @@ import { CSSPropObject, CSSSlotObject } from "../../core/css/index.types.js";
3
3
  import "../../index.js";
4
4
 
5
5
  //#region src/components/autocomplete/autocomplete.style.d.ts
6
- declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "indicator" | "root" | "field" | "valueText" | "empty", CSSPropObject<CSSSlotObject<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "indicator" | "root" | "field" | "valueText" | "empty">>, {
6
+ declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "empty" | "indicator" | "field" | "valueText", CSSPropObject<CSSSlotObject<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "empty" | "indicator" | "field" | "valueText">>, {
7
7
  xs: {
8
8
  empty: {
9
9
  gap: "1.5";
@@ -8,7 +8,7 @@ import "../field/index.js";
8
8
  import { Descendant, DescendantProps } from "../../hooks/use-descendants/index.js";
9
9
  import { ComboboxDescendant, ComboboxDescendantProps, ComboboxItem, ComboboxItemWithValue, UseComboboxItemProps, UseComboboxProps } from "../../hooks/use-combobox/index.js";
10
10
  import "../../index.js";
11
- import * as react1198 from "react";
11
+ import * as react54 from "react";
12
12
  import { ChangeEvent, ReactNode } from "react";
13
13
 
14
14
  //#region src/components/autocomplete/use-autocomplete.d.ts
@@ -28,7 +28,7 @@ interface AutocompleteFilter {
28
28
  }
29
29
  type AutocompleteMatcher = typeof index_d_exports.match;
30
30
  interface AutocompleteContext extends Pick<UseAutocompleteReturn, "max" | "value"> {}
31
- declare const AutocompleteContext: react1198.Context<AutocompleteContext>, useAutocompleteContext: () => AutocompleteContext;
31
+ declare const AutocompleteContext: react54.Context<AutocompleteContext>, useAutocompleteContext: () => AutocompleteContext;
32
32
  interface UseAutocompleteProps<Multiple extends boolean = false> extends Omit<HTMLProps, "defaultValue" | "onChange" | "ref" | "value">, Omit<UseComboboxProps, "defaultValue" | "initialFocusValue" | "onChange" | "ref" | "value">, HTMLRefAttributes<"input">, FieldProps {
33
33
  /**
34
34
  * If `true`, the autocomplete will allow custom value.
@@ -156,7 +156,7 @@ declare const useAutocomplete: <Multiple extends boolean = false>(props?: UseAut
156
156
  lastValue: (props?: Partial<ComboboxDescendantProps> | undefined) => Descendant<HTMLDivElement, ComboboxDescendantProps> | undefined;
157
157
  nextValue: (indexOrNode: number | HTMLDivElement | Descendant<HTMLDivElement, ComboboxDescendantProps> | null, loop?: boolean, props?: Partial<ComboboxDescendantProps> | undefined) => Descendant<HTMLDivElement, ComboboxDescendantProps> | undefined;
158
158
  prevValue: (indexOrNode: number | HTMLDivElement | Descendant<HTMLDivElement, ComboboxDescendantProps> | null, loop?: boolean, props?: Partial<ComboboxDescendantProps> | undefined) => Descendant<HTMLDivElement, ComboboxDescendantProps> | undefined;
159
- register: (props?: DescendantProps<HTMLDivElement, ComboboxDescendantProps> | undefined) => react1198.RefCallback<HTMLDivElement>;
159
+ register: (props?: DescendantProps<HTMLDivElement, ComboboxDescendantProps> | undefined) => react54.RefCallback<HTMLDivElement>;
160
160
  unregister: (node?: HTMLDivElement | null | undefined) => void;
161
161
  value: (indexOrNode: number | HTMLDivElement | null) => Descendant<HTMLDivElement, ComboboxDescendantProps> | undefined;
162
162
  values: (props?: Partial<ComboboxDescendantProps> | undefined) => Descendant<HTMLDivElement, ComboboxDescendantProps>[];
@@ -166,8 +166,8 @@ declare const useAutocomplete: <Multiple extends boolean = false>(props?: UseAut
166
166
  items: ComboboxItem[];
167
167
  max: number | undefined;
168
168
  open: boolean;
169
- setInputValue: react1198.Dispatch<react1198.SetStateAction<string>>;
170
- setValue: react1198.Dispatch<react1198.SetStateAction<Multiple extends true ? string[] : string>>;
169
+ setInputValue: react54.Dispatch<react54.SetStateAction<string>>;
170
+ setValue: react54.Dispatch<react54.SetStateAction<Multiple extends true ? string[] : string>>;
171
171
  value: Multiple extends true ? string[] : string;
172
172
  valueMap: {
173
173
  [key: string]: ComboboxItemWithValue;
@@ -6,9 +6,9 @@ import "../../core/index.js";
6
6
  import { AvatarStyle } from "./avatar.style.js";
7
7
  import { UseAvatarProps } from "./use-avatar.js";
8
8
  import "../../index.js";
9
- import * as react1195 from "react";
9
+ import * as react181 from "react";
10
10
  import { ReactElement } from "react";
11
- import * as _yamada_ui_utils15 from "@yamada-ui/utils";
11
+ import * as _yamada_ui_utils8 from "@yamada-ui/utils";
12
12
 
13
13
  //#region src/components/avatar/avatar.d.ts
14
14
  interface AvatarProps extends HTMLStyledProps, ThemeProps<AvatarStyle>, UseAvatarProps {
@@ -25,7 +25,7 @@ interface AvatarProps extends HTMLStyledProps, ThemeProps<AvatarStyle>, UseAvata
25
25
  */
26
26
  imageProps?: AvatarImageProps;
27
27
  }
28
- declare const component: <H extends "fragment" | As = "div", R extends _yamada_ui_utils15.Dict = _yamada_ui_utils15.Dict<any>>(el: H | react1195.FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
28
+ declare const component: <H extends "fragment" | As = "div", R extends _yamada_ui_utils8.Dict = _yamada_ui_utils8.Dict<any>>(el: H | react181.FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
29
29
  shape: {
30
30
  circle: {
31
31
  root: {
@@ -148,7 +148,7 @@ declare const component: <H extends "fragment" | As = "div", R extends _yamada_u
148
148
  name,
149
149
  className,
150
150
  ...options
151
- }?: ComponentOptions) => (initialProps?: InitialProps<R>, ...superProps: SuperProps<R>[]) => H extends "fragment" ? react1195.FunctionComponent<R> : Component<Exclude<H, "fragment">, R>, AvatarPropsContext: react1195.Context<Partial<AvatarProps> | undefined>, useAvatarPropsContext: () => Partial<AvatarProps> | undefined, useRootComponentProps: <Y extends _yamada_ui_utils15.Dict = {}, R extends keyof Y = keyof Y>(props: Y, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
151
+ }?: ComponentOptions) => (initialProps?: InitialProps<R>, ...superProps: SuperProps<R>[]) => H extends "fragment" ? react181.FunctionComponent<R> : Component<Exclude<H, "fragment">, R>, AvatarPropsContext: react181.Context<Partial<AvatarProps> | undefined>, useAvatarPropsContext: () => Partial<AvatarProps> | undefined, useRootComponentProps: <Y extends _yamada_ui_utils8.Dict = {}, R extends keyof Y = keyof Y>(props: Y, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
152
152
  shape: {
153
153
  circle: {
154
154
  root: {
@@ -271,7 +271,7 @@ declare const component: <H extends "fragment" | As = "div", R extends _yamada_u
271
271
  className,
272
272
  withContext,
273
273
  transferProps
274
- }?: UseComponentPropsOptions<R>) => [CSSSlotObject, _yamada_ui_utils15.Merge<WithoutThemeProps<Y, ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
274
+ }?: UseComponentPropsOptions<R>) => [CSSSlotObject, _yamada_ui_utils8.Merge<WithoutThemeProps<Y, ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
275
275
  shape: {
276
276
  circle: {
277
277
  root: {