@ark-ui/react 0.13.1 → 0.15.0-beta.0

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 (519) hide show
  1. package/CHANGELOG.md +37 -2
  2. package/accordion/accordion-content.cjs +8 -8
  3. package/accordion/accordion-content.d.ts +7 -10
  4. package/accordion/accordion-content.mjs +8 -8
  5. package/accordion/accordion-context.d.ts +2 -9
  6. package/accordion/accordion-item-context.d.ts +3 -5
  7. package/accordion/accordion-item.d.ts +5 -8
  8. package/accordion/accordion-trigger.d.ts +6 -7
  9. package/accordion/accordion.cjs +3 -2
  10. package/accordion/accordion.d.ts +5 -11
  11. package/accordion/accordion.mjs +3 -2
  12. package/accordion/accordion.stories.d.ts +1 -1
  13. package/accordion/index.d.ts +13 -34
  14. package/accordion/use-accordion.d.ts +4 -9
  15. package/avatar/avatar-context.d.ts +2 -9
  16. package/avatar/avatar-fallback.d.ts +6 -7
  17. package/avatar/avatar-image.d.ts +6 -7
  18. package/avatar/avatar.d.ts +5 -9
  19. package/avatar/avatar.test.d.ts +1 -0
  20. package/avatar/index.d.ts +11 -22
  21. package/avatar/use-avatar.d.ts +4 -8
  22. package/carousel/carousel-context.d.ts +2 -9
  23. package/carousel/carousel-control.d.ts +6 -7
  24. package/carousel/carousel-indicator-group.d.ts +6 -7
  25. package/carousel/carousel-indicator.d.ts +5 -8
  26. package/carousel/carousel-next-slide-trigger.d.ts +6 -7
  27. package/carousel/carousel-prev-slide-trigger.d.ts +6 -7
  28. package/carousel/carousel-slide-group.d.ts +6 -7
  29. package/carousel/carousel-slide.d.ts +5 -8
  30. package/carousel/carousel-viewport.d.ts +6 -7
  31. package/carousel/carousel.d.ts +8 -11
  32. package/carousel/index.d.ts +25 -53
  33. package/carousel/use-carousel.d.ts +4 -8
  34. package/checkbox/checkbox-context.d.ts +2 -9
  35. package/checkbox/checkbox-control.cjs +3 -6
  36. package/checkbox/checkbox-control.d.ts +6 -7
  37. package/checkbox/checkbox-control.mjs +4 -7
  38. package/checkbox/checkbox-label.d.ts +6 -7
  39. package/checkbox/checkbox.cjs +7 -4
  40. package/checkbox/checkbox.d.ts +6 -10
  41. package/checkbox/checkbox.mjs +8 -5
  42. package/checkbox/checkbox.stories.d.ts +1 -1
  43. package/checkbox/index.d.ts +12 -29
  44. package/checkbox/use-checkbox.d.ts +5 -10
  45. package/color-picker/color-picker-area-gradient.d.ts +6 -7
  46. package/color-picker/color-picker-area-thumb.d.ts +6 -7
  47. package/color-picker/color-picker-area.d.ts +5 -8
  48. package/color-picker/color-picker-channel-input.d.ts +6 -7
  49. package/color-picker/color-picker-channel-slider-background.d.ts +6 -7
  50. package/color-picker/color-picker-channel-slider-thumb.d.ts +6 -7
  51. package/color-picker/color-picker-channel-slider-track.d.ts +5 -8
  52. package/color-picker/color-picker-content.d.ts +6 -7
  53. package/color-picker/color-picker-context.d.ts +2 -9
  54. package/color-picker/color-picker-eye-dropper-trigger.d.ts +6 -7
  55. package/color-picker/color-picker-swatch-background.d.ts +6 -7
  56. package/color-picker/color-picker-swatch-group.d.ts +6 -7
  57. package/color-picker/color-picker-swatch.d.ts +5 -8
  58. package/color-picker/index.d.ts +23 -52
  59. package/color-picker/use-color-picker.cjs +2 -7
  60. package/color-picker/use-color-picker.d.ts +4 -9
  61. package/color-picker/use-color-picker.mjs +3 -8
  62. package/combobox/combobox-clear-trigger.cjs +2 -2
  63. package/combobox/combobox-clear-trigger.d.ts +6 -7
  64. package/combobox/combobox-clear-trigger.mjs +2 -2
  65. package/combobox/combobox-content.cjs +8 -9
  66. package/combobox/combobox-content.d.ts +7 -10
  67. package/combobox/combobox-content.mjs +8 -9
  68. package/combobox/combobox-context.d.ts +4 -10
  69. package/combobox/combobox-control.cjs +2 -2
  70. package/combobox/combobox-control.d.ts +6 -7
  71. package/combobox/combobox-control.mjs +2 -2
  72. package/combobox/combobox-input.cjs +2 -2
  73. package/combobox/combobox-input.d.ts +6 -7
  74. package/combobox/combobox-input.mjs +2 -2
  75. package/combobox/combobox-item-context.cjs +15 -0
  76. package/combobox/combobox-item-context.d.ts +5 -0
  77. package/combobox/combobox-item-context.mjs +10 -0
  78. package/combobox/{combobox-option-group.cjs → combobox-item-group-label.cjs} +6 -6
  79. package/combobox/combobox-item-group-label.d.ts +7 -0
  80. package/combobox/{combobox-option-group.mjs → combobox-item-group-label.mjs} +6 -6
  81. package/combobox/{combobox-option-group-label.cjs → combobox-item-group.cjs} +6 -6
  82. package/combobox/combobox-item-group.d.ts +7 -0
  83. package/combobox/{combobox-option-group-label.mjs → combobox-item-group.mjs} +6 -6
  84. package/combobox/combobox-item-indicator.cjs +23 -0
  85. package/combobox/combobox-item-indicator.d.ts +7 -0
  86. package/combobox/combobox-item-indicator.mjs +19 -0
  87. package/combobox/combobox-item-text.cjs +21 -0
  88. package/combobox/combobox-item-text.d.ts +7 -0
  89. package/combobox/combobox-item-text.mjs +17 -0
  90. package/combobox/combobox-item.cjs +25 -0
  91. package/{select/select-option.d.ts → combobox/combobox-item.d.ts} +5 -5
  92. package/combobox/combobox-item.mjs +21 -0
  93. package/combobox/combobox-label.cjs +2 -2
  94. package/combobox/combobox-label.d.ts +6 -7
  95. package/combobox/combobox-label.mjs +2 -2
  96. package/combobox/combobox-positioner.cjs +2 -2
  97. package/combobox/combobox-positioner.d.ts +6 -7
  98. package/combobox/combobox-positioner.mjs +2 -2
  99. package/combobox/combobox-trigger.cjs +2 -2
  100. package/combobox/combobox-trigger.d.ts +6 -7
  101. package/combobox/combobox-trigger.mjs +2 -2
  102. package/combobox/combobox.cjs +20 -18
  103. package/combobox/combobox.d.ts +9 -13
  104. package/combobox/combobox.mjs +20 -18
  105. package/combobox/combobox.stories.d.ts +1 -0
  106. package/combobox/index.cjs +15 -9
  107. package/combobox/index.d.ts +35 -72
  108. package/combobox/index.mjs +11 -7
  109. package/combobox/use-combobox.cjs +24 -3
  110. package/combobox/use-combobox.d.ts +8 -9
  111. package/combobox/use-combobox.mjs +24 -3
  112. package/compose-refs.cjs +0 -1
  113. package/compose-refs.mjs +0 -1
  114. package/create-context.d.ts +3 -2
  115. package/date-picker/date-picker-clear-trigger.d.ts +6 -7
  116. package/date-picker/date-picker-column-header.d.ts +6 -7
  117. package/date-picker/date-picker-content.d.ts +6 -7
  118. package/date-picker/date-picker-context.d.ts +2 -9
  119. package/date-picker/date-picker-control.d.ts +6 -7
  120. package/date-picker/date-picker-day-cell-trigger.d.ts +6 -7
  121. package/date-picker/date-picker-day-cell.d.ts +5 -8
  122. package/date-picker/date-picker-grid.d.ts +5 -8
  123. package/date-picker/date-picker-input.d.ts +6 -7
  124. package/date-picker/date-picker-month-cell-trigger.d.ts +6 -7
  125. package/date-picker/date-picker-month-cell.d.ts +5 -8
  126. package/date-picker/date-picker-month-select.d.ts +6 -7
  127. package/date-picker/date-picker-next-trigger.d.ts +6 -7
  128. package/date-picker/date-picker-positioner.d.ts +6 -7
  129. package/date-picker/date-picker-prev-trigger.d.ts +5 -8
  130. package/date-picker/date-picker-row-group.d.ts +6 -7
  131. package/date-picker/date-picker-row-header.d.ts +6 -7
  132. package/date-picker/date-picker-row.d.ts +6 -7
  133. package/date-picker/date-picker-trigger.d.ts +6 -7
  134. package/date-picker/date-picker-view-trigger.d.ts +5 -8
  135. package/date-picker/date-picker-year-cell-trigger.d.ts +6 -7
  136. package/date-picker/date-picker-year-cell.d.ts +5 -8
  137. package/date-picker/date-picker-year-select.cjs +0 -1
  138. package/date-picker/date-picker-year-select.d.ts +6 -12
  139. package/date-picker/date-picker-year-select.mjs +1 -1
  140. package/date-picker/index.d.ts +56 -111
  141. package/date-picker/use-date-picker.d.ts +4 -8
  142. package/dialog/dialog-backdrop.cjs +14 -8
  143. package/dialog/dialog-backdrop.d.ts +7 -10
  144. package/dialog/dialog-backdrop.mjs +14 -8
  145. package/dialog/dialog-close-trigger.d.ts +6 -7
  146. package/dialog/dialog-container.d.ts +6 -7
  147. package/dialog/dialog-content.cjs +8 -9
  148. package/dialog/dialog-content.d.ts +7 -10
  149. package/dialog/dialog-content.mjs +8 -9
  150. package/dialog/dialog-context.d.ts +2 -9
  151. package/dialog/dialog-description.d.ts +6 -7
  152. package/dialog/dialog-title.d.ts +6 -7
  153. package/dialog/dialog-trigger.d.ts +6 -7
  154. package/dialog/index.d.ts +14 -32
  155. package/dialog/use-dialog.d.ts +4 -8
  156. package/editable/editable-area.d.ts +6 -7
  157. package/editable/editable-cancel-trigger.d.ts +6 -7
  158. package/editable/editable-context.d.ts +2 -9
  159. package/editable/editable-control.d.ts +6 -7
  160. package/editable/editable-edit-trigger.d.ts +6 -7
  161. package/editable/editable-input.d.ts +6 -7
  162. package/editable/editable-label.d.ts +6 -7
  163. package/editable/editable-preview.d.ts +6 -7
  164. package/editable/editable-submit-trigger.d.ts +6 -7
  165. package/editable/editable.d.ts +7 -14
  166. package/editable/index.d.ts +24 -57
  167. package/editable/use-editable.d.ts +4 -9
  168. package/factory.cjs +2 -2
  169. package/factory.d.ts +4 -1
  170. package/factory.mjs +1 -1
  171. package/hover-card/hover-card-arrow-tip.d.ts +6 -7
  172. package/hover-card/hover-card-arrow.d.ts +6 -7
  173. package/hover-card/hover-card-content.cjs +8 -9
  174. package/hover-card/hover-card-content.d.ts +7 -10
  175. package/hover-card/hover-card-content.mjs +8 -9
  176. package/hover-card/hover-card-context.d.ts +2 -9
  177. package/hover-card/hover-card-positioner.d.ts +6 -7
  178. package/hover-card/hover-card-trigger.d.ts +6 -7
  179. package/hover-card/hover-card.stories.d.ts +1 -1
  180. package/hover-card/index.d.ts +11 -23
  181. package/hover-card/use-hover-card.d.ts +4 -8
  182. package/index.cjs +36 -21
  183. package/index.d.ts +1 -0
  184. package/index.mjs +17 -8
  185. package/menu/index.d.ts +21 -54
  186. package/menu/menu-arrow-tip.d.ts +6 -7
  187. package/menu/menu-arrow.d.ts +6 -7
  188. package/menu/menu-content.cjs +11 -2
  189. package/menu/menu-content.d.ts +7 -8
  190. package/menu/menu-content.mjs +11 -2
  191. package/menu/menu-context-trigger.d.ts +6 -7
  192. package/menu/menu-context.d.ts +2 -3
  193. package/menu/menu-item-group-label.d.ts +5 -8
  194. package/menu/menu-item-group.d.ts +5 -8
  195. package/menu/menu-item.d.ts +6 -12
  196. package/menu/menu-option-item.d.ts +5 -10
  197. package/menu/menu-positioner.d.ts +6 -7
  198. package/menu/menu-separator.d.ts +6 -7
  199. package/menu/menu-trigger-item.d.ts +6 -7
  200. package/menu/menu-trigger.d.ts +6 -7
  201. package/menu/menu.d.ts +2 -1
  202. package/menu/menu.stories.d.ts +1 -1
  203. package/menu/use-menu.d.ts +3 -2
  204. package/number-input/index.d.ts +18 -41
  205. package/number-input/number-input-context.d.ts +2 -9
  206. package/number-input/number-input-control.d.ts +6 -7
  207. package/number-input/number-input-decrement-trigger.d.ts +6 -7
  208. package/number-input/number-input-field.d.ts +6 -7
  209. package/number-input/number-input-increment-trigger.d.ts +6 -7
  210. package/number-input/number-input-label.d.ts +6 -7
  211. package/number-input/number-input-scrubber.d.ts +6 -7
  212. package/number-input/number-input.d.ts +5 -11
  213. package/number-input/number-input.stories.d.ts +2 -0
  214. package/number-input/use-number-input.cjs +2 -7
  215. package/number-input/use-number-input.d.ts +4 -9
  216. package/number-input/use-number-input.mjs +3 -8
  217. package/package.json +61 -53
  218. package/pagination/index.d.ts +20 -49
  219. package/pagination/pagination-context.d.ts +2 -9
  220. package/pagination/pagination-ellipsis.d.ts +5 -8
  221. package/pagination/pagination-list-item.d.ts +6 -7
  222. package/pagination/pagination-list.d.ts +6 -7
  223. package/pagination/pagination-next-page-trigger.d.ts +6 -7
  224. package/pagination/pagination-page-trigger.d.ts +5 -8
  225. package/pagination/pagination-prev-page-trigger.d.ts +6 -7
  226. package/pagination/pagination.d.ts +6 -10
  227. package/pagination/use-pagination.d.ts +4 -9
  228. package/pin-input/index.d.ts +11 -30
  229. package/pin-input/pin-input-context.d.ts +2 -9
  230. package/pin-input/pin-input-control.cjs +3 -6
  231. package/pin-input/pin-input-control.d.ts +6 -7
  232. package/pin-input/pin-input-control.mjs +4 -7
  233. package/pin-input/pin-input-field.d.ts +5 -8
  234. package/pin-input/pin-input-label.d.ts +6 -7
  235. package/pin-input/pin-input.cjs +6 -3
  236. package/pin-input/pin-input.d.ts +5 -11
  237. package/pin-input/pin-input.mjs +7 -4
  238. package/pin-input/use-pin-input.d.ts +4 -9
  239. package/popover/index.d.ts +19 -39
  240. package/popover/popover-anchor.d.ts +6 -7
  241. package/popover/popover-arrow-tip.d.ts +6 -7
  242. package/popover/popover-arrow.d.ts +6 -7
  243. package/popover/popover-close-trigger.d.ts +6 -7
  244. package/popover/popover-content.cjs +8 -9
  245. package/popover/popover-content.d.ts +7 -10
  246. package/popover/popover-content.mjs +8 -9
  247. package/popover/popover-context.d.ts +2 -9
  248. package/popover/popover-description.d.ts +6 -7
  249. package/popover/popover-positioner.d.ts +6 -7
  250. package/popover/popover-title.d.ts +6 -7
  251. package/popover/popover-trigger.d.ts +6 -7
  252. package/popover/use-popover.d.ts +4 -8
  253. package/presence/presence.d.ts +2 -2
  254. package/presence/use-presence.d.ts +3 -2
  255. package/pressable/index.d.ts +4 -24
  256. package/pressable/pressable.d.ts +5 -15
  257. package/pressable/use-pressable.d.ts +4 -8
  258. package/radio-group/index.d.ts +15 -45
  259. package/radio-group/radio-context.d.ts +2 -12
  260. package/radio-group/radio-control.cjs +4 -7
  261. package/radio-group/radio-control.d.ts +6 -7
  262. package/radio-group/radio-control.mjs +5 -8
  263. package/radio-group/radio-group-context.d.ts +2 -9
  264. package/radio-group/radio-group-label.d.ts +6 -7
  265. package/radio-group/radio-group.cjs +0 -1
  266. package/radio-group/radio-group.d.ts +5 -11
  267. package/radio-group/radio-group.mjs +0 -1
  268. package/radio-group/radio-label.d.ts +6 -7
  269. package/radio-group/radio.cjs +12 -4
  270. package/radio-group/radio.d.ts +6 -18
  271. package/radio-group/radio.mjs +13 -5
  272. package/radio-group/use-radio-group.d.ts +4 -9
  273. package/range-slider/index.d.ts +23 -65
  274. package/range-slider/range-slider-context.d.ts +2 -9
  275. package/range-slider/range-slider-control.d.ts +6 -7
  276. package/range-slider/range-slider-label.d.ts +6 -7
  277. package/range-slider/range-slider-marker-group.d.ts +6 -7
  278. package/range-slider/range-slider-marker.d.ts +5 -8
  279. package/range-slider/range-slider-output.d.ts +4 -8
  280. package/range-slider/range-slider-range.d.ts +6 -7
  281. package/range-slider/range-slider-thumb.cjs +5 -5
  282. package/range-slider/range-slider-thumb.d.ts +5 -8
  283. package/range-slider/range-slider-thumb.mjs +5 -5
  284. package/range-slider/range-slider-track.d.ts +6 -7
  285. package/range-slider/range-slider.cjs +3 -0
  286. package/range-slider/range-slider.d.ts +4 -11
  287. package/range-slider/range-slider.mjs +3 -0
  288. package/range-slider/use-range-slider.cjs +3 -1
  289. package/range-slider/use-range-slider.d.ts +4 -9
  290. package/range-slider/use-range-slider.mjs +3 -1
  291. package/rating-group/index.d.ts +11 -34
  292. package/rating-group/rating-group-context.d.ts +2 -9
  293. package/rating-group/rating-group-control.cjs +4 -7
  294. package/rating-group/rating-group-control.d.ts +6 -10
  295. package/rating-group/rating-group-control.mjs +5 -8
  296. package/rating-group/rating-group-label.d.ts +6 -7
  297. package/rating-group/rating-group.cjs +6 -3
  298. package/rating-group/rating-group.d.ts +5 -11
  299. package/rating-group/rating-group.mjs +7 -4
  300. package/rating-group/rating-group.stories.d.ts +1 -1
  301. package/rating-group/rating.d.ts +4 -8
  302. package/rating-group/use-rating-group.d.ts +4 -9
  303. package/run-if-fn.d.ts +0 -1
  304. package/segment-group/index.d.ts +18 -50
  305. package/segment-group/segment-context.d.ts +2 -12
  306. package/segment-group/segment-control.cjs +4 -7
  307. package/segment-group/segment-control.d.ts +6 -7
  308. package/segment-group/segment-control.mjs +5 -8
  309. package/segment-group/segment-group-context.d.ts +2 -9
  310. package/segment-group/segment-group-indicator.d.ts +6 -7
  311. package/segment-group/segment-group-label.d.ts +6 -7
  312. package/segment-group/segment-group.cjs +0 -1
  313. package/segment-group/segment-group.d.ts +5 -11
  314. package/segment-group/segment-group.mjs +0 -1
  315. package/segment-group/segment-label.d.ts +6 -7
  316. package/segment-group/segment.cjs +12 -4
  317. package/segment-group/segment.d.ts +6 -18
  318. package/segment-group/segment.mjs +13 -5
  319. package/segment-group/use-segment-group.d.ts +4 -9
  320. package/select/index.cjs +30 -18
  321. package/select/index.d.ts +44 -46
  322. package/select/index.mjs +19 -9
  323. package/select/select-clear-trigger.cjs +21 -0
  324. package/select/select-clear-trigger.d.ts +7 -0
  325. package/select/select-clear-trigger.mjs +17 -0
  326. package/select/select-content.cjs +8 -9
  327. package/select/select-content.d.ts +7 -10
  328. package/select/select-content.mjs +8 -9
  329. package/select/select-context.d.ts +4 -10
  330. package/select/select-control.cjs +19 -0
  331. package/select/select-control.d.ts +7 -0
  332. package/select/select-control.mjs +15 -0
  333. package/select/select-item-context.cjs +15 -0
  334. package/select/select-item-context.d.ts +5 -0
  335. package/select/select-item-context.mjs +10 -0
  336. package/select/{select-option-group.cjs → select-item-group-label.cjs} +8 -6
  337. package/select/select-item-group-label.d.ts +7 -0
  338. package/select/{select-option-group.mjs → select-item-group-label.mjs} +8 -6
  339. package/select/select-item-group.cjs +21 -0
  340. package/select/select-item-group.d.ts +7 -0
  341. package/select/select-item-group.mjs +17 -0
  342. package/select/{select-option-group-label.cjs → select-item-indicator.cjs} +7 -6
  343. package/select/select-item-indicator.d.ts +7 -0
  344. package/select/select-item-indicator.mjs +19 -0
  345. package/select/select-item-text.cjs +21 -0
  346. package/select/select-item-text.d.ts +7 -0
  347. package/select/select-item-text.mjs +17 -0
  348. package/select/select-item.cjs +25 -0
  349. package/select/select-item.d.ts +11 -0
  350. package/select/select-item.mjs +21 -0
  351. package/select/select-label.cjs +2 -2
  352. package/select/select-label.d.ts +6 -7
  353. package/select/select-label.mjs +2 -2
  354. package/select/select-positioner.cjs +2 -2
  355. package/select/select-positioner.d.ts +6 -7
  356. package/select/select-positioner.mjs +2 -2
  357. package/select/select-trigger.cjs +2 -2
  358. package/select/select-trigger.d.ts +6 -7
  359. package/select/select-trigger.mjs +2 -2
  360. package/select/select-value.cjs +19 -0
  361. package/select/select-value.d.ts +7 -0
  362. package/select/select-value.mjs +15 -0
  363. package/select/select.anatomy.cjs +12 -0
  364. package/select/select.anatomy.d.ts +3 -1
  365. package/select/select.anatomy.mjs +7 -0
  366. package/select/select.cjs +43 -30
  367. package/select/select.d.ts +9 -6
  368. package/select/select.mjs +43 -30
  369. package/select/select.stories.d.ts +3 -0
  370. package/select/use-select.cjs +13 -3
  371. package/select/use-select.d.ts +8 -11
  372. package/select/use-select.mjs +13 -3
  373. package/slider/index.d.ts +22 -59
  374. package/slider/slider-context.d.ts +2 -9
  375. package/slider/slider-control.d.ts +6 -7
  376. package/slider/slider-label.d.ts +6 -7
  377. package/slider/slider-marker-group.d.ts +6 -7
  378. package/slider/slider-marker.d.ts +5 -8
  379. package/slider/slider-output.d.ts +5 -8
  380. package/slider/slider-range.d.ts +6 -7
  381. package/slider/slider-thumb.cjs +3 -6
  382. package/slider/slider-thumb.d.ts +6 -7
  383. package/slider/slider-thumb.mjs +4 -7
  384. package/slider/slider-track.d.ts +6 -7
  385. package/slider/slider.cjs +9 -4
  386. package/slider/slider.d.ts +4 -8
  387. package/slider/slider.mjs +10 -5
  388. package/slider/use-slider.cjs +2 -7
  389. package/slider/use-slider.d.ts +4 -9
  390. package/slider/use-slider.mjs +3 -8
  391. package/splitter/index.d.ts +12 -46
  392. package/splitter/splitter-context.d.ts +2 -9
  393. package/splitter/splitter-panel.d.ts +5 -8
  394. package/splitter/splitter-resize-trigger.d.ts +5 -8
  395. package/splitter/splitter.d.ts +4 -17
  396. package/splitter/splitter.stories.d.ts +1 -1
  397. package/splitter/use-splitter.d.ts +4 -9
  398. package/switch/index.cjs +0 -3
  399. package/switch/index.d.ts +16 -42
  400. package/switch/index.mjs +1 -3
  401. package/switch/switch-context.d.ts +2 -9
  402. package/switch/switch-control.cjs +2 -2
  403. package/switch/switch-control.d.ts +6 -7
  404. package/switch/switch-control.mjs +2 -2
  405. package/switch/switch-label.d.ts +6 -7
  406. package/switch/switch-thumb.d.ts +6 -7
  407. package/switch/switch.cjs +4 -2
  408. package/switch/switch.d.ts +6 -11
  409. package/switch/switch.mjs +5 -3
  410. package/switch/switch.stories.d.ts +1 -0
  411. package/switch/switch.test.d.ts +1 -0
  412. package/switch/use-switch.d.ts +5 -10
  413. package/tabs/index.d.ts +15 -35
  414. package/tabs/tab-content.d.ts +6 -7
  415. package/tabs/tab-indicator.d.ts +6 -7
  416. package/tabs/tab-list.d.ts +6 -7
  417. package/tabs/tab-trigger.d.ts +5 -8
  418. package/tabs/tabs-context.d.ts +2 -9
  419. package/tabs/tabs.cjs +0 -1
  420. package/tabs/tabs.d.ts +5 -11
  421. package/tabs/tabs.mjs +0 -1
  422. package/tabs/tabs.stories.d.ts +1 -1
  423. package/tabs/use-tabs.cjs +21 -2
  424. package/tabs/use-tabs.d.ts +6 -11
  425. package/tabs/use-tabs.mjs +3 -3
  426. package/tags-input/index.d.ts +19 -46
  427. package/tags-input/tag-delete-trigger.d.ts +5 -8
  428. package/tags-input/tag-input.d.ts +5 -8
  429. package/tags-input/tag.d.ts +5 -8
  430. package/tags-input/tags-input-clear-trigger.d.ts +6 -7
  431. package/tags-input/tags-input-context.d.ts +2 -9
  432. package/tags-input/tags-input-control.cjs +3 -6
  433. package/tags-input/tags-input-control.d.ts +6 -7
  434. package/tags-input/tags-input-control.mjs +4 -7
  435. package/tags-input/tags-input-field.d.ts +6 -7
  436. package/tags-input/tags-input-label.d.ts +6 -7
  437. package/tags-input/tags-input.cjs +8 -6
  438. package/tags-input/tags-input.d.ts +6 -10
  439. package/tags-input/tags-input.mjs +9 -7
  440. package/tags-input/use-tags-input.d.ts +4 -9
  441. package/toast/index.d.ts +14 -31
  442. package/toast/toast-close-trigger.d.ts +6 -7
  443. package/toast/toast-description.d.ts +6 -7
  444. package/toast/toast-group.d.ts +6 -10
  445. package/toast/toast-item-context.d.ts +2 -9
  446. package/toast/toast-provider.cjs +0 -1
  447. package/toast/toast-provider.d.ts +4 -60
  448. package/toast/toast-provider.mjs +1 -1
  449. package/toast/toast-title.d.ts +6 -7
  450. package/toast/toast.d.ts +5 -8
  451. package/toast/toast.stories.d.ts +1 -1
  452. package/toast/use-toast-item.d.ts +2 -7
  453. package/toggle-group/index.cjs +17 -0
  454. package/toggle-group/index.d.ts +19 -0
  455. package/toggle-group/index.mjs +11 -0
  456. package/toggle-group/toggle-group-context.cjs +15 -0
  457. package/toggle-group/toggle-group-context.d.ts +5 -0
  458. package/toggle-group/toggle-group-context.mjs +10 -0
  459. package/toggle-group/toggle-group.cjs +35 -0
  460. package/toggle-group/toggle-group.d.ts +7 -0
  461. package/toggle-group/toggle-group.mjs +31 -0
  462. package/toggle-group/toggle-group.stories.d.ts +9 -0
  463. package/toggle-group/toggle-group.test.d.ts +1 -0
  464. package/toggle-group/toggle.cjs +21 -0
  465. package/toggle-group/toggle.d.ts +11 -0
  466. package/toggle-group/toggle.mjs +17 -0
  467. package/toggle-group/use-toggle-group.cjs +49 -0
  468. package/toggle-group/use-toggle-group.d.ts +7 -0
  469. package/toggle-group/use-toggle-group.mjs +26 -0
  470. package/tooltip/index.d.ts +11 -23
  471. package/tooltip/tooltip-arrow-tip.d.ts +6 -7
  472. package/tooltip/tooltip-arrow.d.ts +6 -7
  473. package/tooltip/tooltip-content.cjs +5 -6
  474. package/tooltip/tooltip-content.d.ts +7 -10
  475. package/tooltip/tooltip-content.mjs +5 -6
  476. package/tooltip/tooltip-context.d.ts +2 -9
  477. package/tooltip/tooltip-positioner.d.ts +6 -7
  478. package/tooltip/tooltip-trigger.d.ts +6 -7
  479. package/tooltip/use-tooltip.d.ts +4 -8
  480. package/types.d.ts +1 -0
  481. package/use-event.cjs +23 -0
  482. package/use-event.d.ts +12 -0
  483. package/use-event.mjs +19 -0
  484. package/use-latest-ref.cjs +14 -0
  485. package/use-latest-ref.mjs +10 -0
  486. package/accordion/accordion-item-presence.cjs +0 -16
  487. package/accordion/accordion-item-presence.d.ts +0 -4
  488. package/accordion/accordion-item-presence.mjs +0 -12
  489. package/combobox/combobox-option-group-label.d.ts +0 -10
  490. package/combobox/combobox-option-group.d.ts +0 -10
  491. package/combobox/combobox-option.cjs +0 -27
  492. package/combobox/combobox-option.d.ts +0 -14
  493. package/combobox/combobox-option.mjs +0 -23
  494. package/combobox/combobox-presence.cjs +0 -16
  495. package/combobox/combobox-presence.d.ts +0 -4
  496. package/combobox/combobox-presence.mjs +0 -12
  497. package/dialog/dialog-presence.cjs +0 -16
  498. package/dialog/dialog-presence.d.ts +0 -4
  499. package/dialog/dialog-presence.mjs +0 -12
  500. package/hover-card/hover-card-presence.cjs +0 -16
  501. package/hover-card/hover-card-presence.d.ts +0 -4
  502. package/hover-card/hover-card-presence.mjs +0 -12
  503. package/popover/popover-presence.cjs +0 -16
  504. package/popover/popover-presence.d.ts +0 -4
  505. package/popover/popover-presence.mjs +0 -12
  506. package/select/select-option-group-label.d.ts +0 -13
  507. package/select/select-option-group-label.mjs +0 -18
  508. package/select/select-option-group.d.ts +0 -10
  509. package/select/select-option.cjs +0 -26
  510. package/select/select-option.mjs +0 -22
  511. package/select/select-presence.cjs +0 -16
  512. package/select/select-presence.d.ts +0 -4
  513. package/select/select-presence.mjs +0 -12
  514. package/switch/switch-input.cjs +0 -19
  515. package/switch/switch-input.d.ts +0 -8
  516. package/switch/switch-input.mjs +0 -15
  517. package/tooltip/tooltip-presence.cjs +0 -16
  518. package/tooltip/tooltip-presence.d.ts +0 -4
  519. package/tooltip/tooltip-presence.mjs +0 -12
@@ -1,8 +1,7 @@
1
- import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
2
- import { ark } from '../factory';
3
- export type TabIndicatorProps = ComponentPropsWithoutRef<typeof ark.div>;
4
- export declare const TabIndicator: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
5
- ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
6
- } & {
1
+ import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
4
+ export type TabIndicatorProps = HTMLArkProps<'div'>;
5
+ export declare const TabIndicator: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
6
  asChild?: boolean | undefined;
8
- }, "ref"> & RefAttributes<HTMLDivElement>>;
7
+ } & RefAttributes<HTMLDivElement>>;
@@ -1,8 +1,7 @@
1
- import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
2
- import { ark } from '../factory';
3
- export type TabListProps = ComponentPropsWithoutRef<typeof ark.div>;
4
- export declare const TabList: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
5
- ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
6
- } & {
1
+ import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
4
+ export type TabListProps = HTMLArkProps<'div'>;
5
+ export declare const TabList: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
6
  asChild?: boolean | undefined;
8
- }, "ref"> & RefAttributes<HTMLDivElement>>;
7
+ } & RefAttributes<HTMLDivElement>>;
@@ -1,10 +1,7 @@
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ /// <reference types="react" />
1
3
  import type { TriggerProps } from '@zag-js/tabs';
2
- import { ForwardRefExoticComponent, DetailedHTMLProps, ButtonHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
3
- import { ark } from '../factory';
4
+ import { type HTMLArkProps } from '../factory';
4
5
  import { type Assign } from '../types';
5
- export type TabTriggerProps = Assign<ComponentPropsWithoutRef<typeof ark.button>, TriggerProps>;
6
- export declare const TabTrigger: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
7
- ref?: ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement> | null | undefined;
8
- } & {
9
- asChild?: boolean | undefined;
10
- }, "ref">, keyof TriggerProps> & TriggerProps & RefAttributes<HTMLButtonElement>>;
6
+ export type TabTriggerProps = Assign<HTMLArkProps<'button'>, TriggerProps>;
7
+ export declare const TabTrigger: ForwardRefExoticComponent<Omit<HTMLArkProps<"button">, keyof TriggerProps> & TriggerProps & RefAttributes<HTMLButtonElement>>;
@@ -1,12 +1,5 @@
1
- import { PublicApi } from '@zag-js/tabs';
2
- import { Provider, HTMLAttributes, CSSProperties } from 'react';
1
+ import { Provider } from 'react';
3
2
  /// <reference types="react" />
4
3
  import { type UseTabsReturn } from './use-tabs';
5
4
  export type TabsContext = UseTabsReturn;
6
- export declare const TabsProvider: Provider<PublicApi<JSX.IntrinsicElements & {
7
- element: HTMLAttributes<HTMLElement>;
8
- style: CSSProperties;
9
- }>>, useTabsContext: () => PublicApi<JSX.IntrinsicElements & {
10
- element: HTMLAttributes<HTMLElement>;
11
- style: CSSProperties;
12
- }>;
5
+ export declare const TabsProvider: Provider<UseTabsReturn>, useTabsContext: () => UseTabsReturn;
package/tabs/tabs.cjs CHANGED
@@ -21,7 +21,6 @@ const Tabs = react.forwardRef((props, ref) => {
21
21
  "ids",
22
22
  "loop",
23
23
  "onChange",
24
- "onDelete",
25
24
  "onFocus",
26
25
  "orientation",
27
26
  "translations",
package/tabs/tabs.d.ts CHANGED
@@ -1,13 +1,7 @@
1
- import { Context } from '@zag-js/tabs';
2
- import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
3
- import { ark } from '../factory';
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
4
4
  import { type Assign } from '../types';
5
5
  import { type UseTabsProps } from './use-tabs';
6
- export type TabsProps = Assign<ComponentPropsWithoutRef<typeof ark.div>, UseTabsProps>;
7
- export declare const Tabs: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
- ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
9
- } & {
10
- asChild?: boolean | undefined;
11
- }, "ref">, "value" | "getRootNode" | "id" | "ids" | "orientation" | "onFocus" | "onChange" | "defaultValue" | "dir" | "loop" | "translations" | "activationMode" | "onDelete"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
12
- defaultValue?: string | null | undefined;
13
- } & RefAttributes<HTMLDivElement>>;
6
+ export type TabsProps = Assign<HTMLArkProps<'div'>, UseTabsProps>;
7
+ export declare const Tabs: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof UseTabsProps> & UseTabsProps & RefAttributes<HTMLDivElement>>;
package/tabs/tabs.mjs CHANGED
@@ -17,7 +17,6 @@ const Tabs = forwardRef((props, ref) => {
17
17
  "ids",
18
18
  "loop",
19
19
  "onChange",
20
- "onDelete",
21
20
  "onFocus",
22
21
  "orientation",
23
22
  "translations",
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
  import type { Meta } from '@storybook/react';
3
- import { Tabs } from '.';
3
+ import { Tabs } from './';
4
4
  type TabsType = typeof Tabs;
5
5
  declare const meta: Meta<TabsType>;
6
6
  export default meta;
package/tabs/use-tabs.cjs CHANGED
@@ -9,6 +9,25 @@ const react = require('react');
9
9
  require('../environment/index.cjs');
10
10
  const environmentContext = require('../environment/environment-context.cjs');
11
11
 
12
+ function _interopNamespaceDefault(e) {
13
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
14
+ if (e) {
15
+ for (const k in e) {
16
+ if (k !== 'default') {
17
+ const d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: () => e[k]
21
+ });
22
+ }
23
+ }
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ const tabs__namespace = /*#__PURE__*/_interopNamespaceDefault(tabs);
30
+
12
31
  const useTabs = (props) => {
13
32
  const getRootNode = environmentContext.useEnvironmentContext();
14
33
  const initialContext = {
@@ -21,8 +40,8 @@ const useTabs = (props) => {
21
40
  ...initialContext,
22
41
  value: props.value
23
42
  };
24
- const [state, send] = react$1.useMachine(tabs.machine(initialContext), { context });
25
- return tabs.connect(state, send, react$1.normalizeProps);
43
+ const [state, send] = react$1.useMachine(tabs__namespace.machine(initialContext), { context });
44
+ return tabs__namespace.connect(state, send, react$1.normalizeProps);
26
45
  };
27
46
 
28
47
  exports.useTabs = useTabs;
@@ -1,12 +1,7 @@
1
- import { HTMLAttributes, CSSProperties } from 'react';
2
- /// <reference types="react" />
3
- import { PublicApi, type Context } from '@zag-js/tabs';
1
+ import * as tabs from '@zag-js/tabs';
4
2
  import { type Optional } from '../types';
5
- export type UseTabsProps = Optional<Context, 'id'> & {
6
- defaultValue?: Context['value'];
7
- };
8
- export type UseTabsReturn = ReturnType<typeof useTabs>;
9
- export declare const useTabs: (props: UseTabsProps) => PublicApi<JSX.IntrinsicElements & {
10
- element: HTMLAttributes<HTMLElement>;
11
- style: CSSProperties;
12
- }>;
3
+ export interface UseTabsProps extends Optional<tabs.Context, 'id'> {
4
+ defaultValue?: tabs.Context['value'];
5
+ }
6
+ export type UseTabsReturn = tabs.Api;
7
+ export declare const useTabs: (props: UseTabsProps) => UseTabsReturn;
package/tabs/use-tabs.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { useMachine, normalizeProps } from '@zag-js/react';
3
- import { machine, connect } from '@zag-js/tabs';
3
+ import * as tabs from '@zag-js/tabs';
4
4
  import { useId } from 'react';
5
5
  import '../environment/index.mjs';
6
6
  import { useEnvironmentContext } from '../environment/environment-context.mjs';
@@ -17,8 +17,8 @@ const useTabs = (props) => {
17
17
  ...initialContext,
18
18
  value: props.value
19
19
  };
20
- const [state, send] = useMachine(machine(initialContext), { context });
21
- return connect(state, send, normalizeProps);
20
+ const [state, send] = useMachine(tabs.machine(initialContext), { context });
21
+ return tabs.connect(state, send, normalizeProps);
22
22
  };
23
23
 
24
24
  export { useTabs };
@@ -1,56 +1,37 @@
1
1
  import { UseTagsInputProps } from './use-tags-input';
2
+ import { HTMLArkProps } from '..';
2
3
  import { Assign } from '../types';
3
- import { ForwardRefExoticComponent, DetailedHTMLProps, InputHTMLAttributes, RefObject, ReactNode, RefAttributes, ButtonHTMLAttributes, HTMLAttributes, LabelHTMLAttributes } from 'react';
4
+ import { ForwardRefExoticComponent, ReactNode, RefAttributes, DetailedHTMLProps, ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes } from 'react';
4
5
  /// <reference types="react" />
5
6
  import { Tag, type TagProps } from './tag';
6
7
  import { TagDeleteTrigger, type TagDeleteTriggerProps } from './tag-delete-trigger';
7
8
  import { TagInput, type TagInputProps } from './tag-input';
8
9
  import { type TagsInputProps } from './tags-input';
9
10
  import { TagsInputClearTrigger, type TagsInputClearTriggerProps } from './tags-input-clear-trigger';
10
- import { useTagsInputContext } from './tags-input-context';
11
+ import { useTagsInputContext, type TagsInputContext } from './tags-input-context';
11
12
  import { TagsInputControl, type TagsInputControlProps } from './tags-input-control';
12
13
  import { TagsInputInput, type TagsInputInputProps } from './tags-input-field';
13
14
  import { TagsInputLabel, type TagsInputLabelProps } from './tags-input-label';
14
15
  import { tagsInputAnatomy } from './tags-input.anatomy';
15
- declare const TagsInput: ForwardRefExoticComponent<Omit<Assign<Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
16
- ref?: ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement> | null | undefined;
17
- } & {
18
- asChild?: boolean | undefined;
19
- }, "ref">, UseTagsInputProps>, "children"> & {
20
- children: ReactNode | ((pages: UseTagsInputProps) => ReactNode);
16
+ declare const TagsInput: ForwardRefExoticComponent<Omit<Assign<HTMLArkProps<"input">, UseTagsInputProps>, "children"> & {
17
+ children?: ReactNode | ((pages: UseTagsInputProps) => ReactNode);
21
18
  } & RefAttributes<HTMLInputElement>> & {
22
- Root: ForwardRefExoticComponent<Omit<Assign<Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
23
- ref?: ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement> | null | undefined;
24
- } & {
25
- asChild?: boolean | undefined;
26
- }, "ref">, UseTagsInputProps>, "children"> & {
27
- children: ReactNode | ((pages: UseTagsInputProps) => ReactNode);
19
+ Root: ForwardRefExoticComponent<Omit<Assign<HTMLArkProps<"input">, UseTagsInputProps>, "children"> & {
20
+ children?: ReactNode | ((pages: UseTagsInputProps) => ReactNode);
28
21
  } & RefAttributes<HTMLInputElement>>;
29
- ClearTrigger: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
30
- ref?: ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement> | null | undefined;
31
- } & {
32
- asChild?: boolean | undefined;
33
- }, "ref"> & RefAttributes<HTMLButtonElement>>;
34
- Control: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
35
- ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
36
- } & {
22
+ ClearTrigger: ForwardRefExoticComponent<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
37
23
  asChild?: boolean | undefined;
38
- }, "ref"> & RefAttributes<HTMLDivElement>>;
39
- Input: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
40
- ref?: ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement> | null | undefined;
41
- } & {
24
+ } & RefAttributes<HTMLButtonElement>>;
25
+ Control: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
42
26
  asChild?: boolean | undefined;
43
- }, "ref"> & RefAttributes<HTMLInputElement>>;
44
- Label: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
45
- ref?: ((instance: HTMLLabelElement | null) => void) | RefObject<HTMLLabelElement> | null | undefined;
46
- } & {
27
+ } & RefAttributes<HTMLDivElement>>;
28
+ Input: ForwardRefExoticComponent<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
47
29
  asChild?: boolean | undefined;
48
- }, "ref"> & RefAttributes<HTMLLabelElement>>;
49
- Tag: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
50
- ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
51
- } & {
30
+ } & RefAttributes<HTMLInputElement>>;
31
+ Label: ForwardRefExoticComponent<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
52
32
  asChild?: boolean | undefined;
53
- }, "ref">, keyof {
33
+ } & RefAttributes<HTMLLabelElement>>;
34
+ Tag: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof {
54
35
  index: string | number;
55
36
  value: string;
56
37
  disabled?: boolean | undefined;
@@ -59,11 +40,7 @@ declare const TagsInput: ForwardRefExoticComponent<Omit<Assign<Omit<Omit<Detaile
59
40
  value: string;
60
41
  disabled?: boolean | undefined;
61
42
  } & RefAttributes<HTMLDivElement>>;
62
- TagInput: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
63
- ref?: ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement> | null | undefined;
64
- } & {
65
- asChild?: boolean | undefined;
66
- }, "ref">, keyof {
43
+ TagInput: ForwardRefExoticComponent<Omit<HTMLArkProps<"input">, keyof {
67
44
  index: string | number;
68
45
  value: string;
69
46
  disabled?: boolean | undefined;
@@ -72,11 +49,7 @@ declare const TagsInput: ForwardRefExoticComponent<Omit<Assign<Omit<Omit<Detaile
72
49
  value: string;
73
50
  disabled?: boolean | undefined;
74
51
  } & RefAttributes<HTMLInputElement>>;
75
- TagDeleteTrigger: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
76
- ref?: ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement> | null | undefined;
77
- } & {
78
- asChild?: boolean | undefined;
79
- }, "ref">, keyof {
52
+ TagDeleteTrigger: ForwardRefExoticComponent<Omit<HTMLArkProps<"button">, keyof {
80
53
  index: string | number;
81
54
  value: string;
82
55
  disabled?: boolean | undefined;
@@ -87,4 +60,4 @@ declare const TagsInput: ForwardRefExoticComponent<Omit<Assign<Omit<Omit<Detaile
87
60
  } & RefAttributes<HTMLButtonElement>>;
88
61
  };
89
62
  export { Tag, TagDeleteTrigger, TagInput, TagsInput, TagsInputClearTrigger, TagsInputControl, TagsInputInput, TagsInputLabel, tagsInputAnatomy, useTagsInputContext, };
90
- export type { TagDeleteTriggerProps, TagInputProps, TagProps, TagsInputClearTriggerProps, TagsInputControlProps, TagsInputInputProps, TagsInputLabelProps, TagsInputProps, };
63
+ export type { TagDeleteTriggerProps, TagInputProps, TagProps, TagsInputClearTriggerProps, TagsInputContext, TagsInputControlProps, TagsInputInputProps, TagsInputLabelProps, TagsInputProps, };
@@ -1,15 +1,12 @@
1
- import { ForwardRefExoticComponent, DetailedHTMLProps, ButtonHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
2
- import { ark } from '../factory';
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
3
4
  import { type Assign } from '../types';
4
5
  type _TagProps = {
5
6
  index: string | number;
6
7
  value: string;
7
8
  disabled?: boolean;
8
9
  };
9
- export type TagDeleteTriggerProps = Assign<ComponentPropsWithoutRef<typeof ark.button>, _TagProps>;
10
- export declare const TagDeleteTrigger: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
11
- ref?: ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement> | null | undefined;
12
- } & {
13
- asChild?: boolean | undefined;
14
- }, "ref">, keyof _TagProps> & _TagProps & RefAttributes<HTMLButtonElement>>;
10
+ export type TagDeleteTriggerProps = Assign<HTMLArkProps<'button'>, _TagProps>;
11
+ export declare const TagDeleteTrigger: ForwardRefExoticComponent<Omit<HTMLArkProps<"button">, keyof _TagProps> & _TagProps & RefAttributes<HTMLButtonElement>>;
15
12
  export {};
@@ -1,15 +1,12 @@
1
- import { ForwardRefExoticComponent, DetailedHTMLProps, InputHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
2
- import { ark } from '../factory';
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
3
4
  import { type Assign } from '../types';
4
5
  type _TagProps = {
5
6
  index: string | number;
6
7
  value: string;
7
8
  disabled?: boolean;
8
9
  };
9
- export type TagInputProps = Assign<ComponentPropsWithoutRef<typeof ark.input>, _TagProps>;
10
- export declare const TagInput: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
11
- ref?: ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement> | null | undefined;
12
- } & {
13
- asChild?: boolean | undefined;
14
- }, "ref">, keyof _TagProps> & _TagProps & RefAttributes<HTMLInputElement>>;
10
+ export type TagInputProps = Assign<HTMLArkProps<'input'>, _TagProps>;
11
+ export declare const TagInput: ForwardRefExoticComponent<Omit<HTMLArkProps<"input">, keyof _TagProps> & _TagProps & RefAttributes<HTMLInputElement>>;
15
12
  export {};
@@ -1,15 +1,12 @@
1
- import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
2
- import { ark } from '../factory';
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
3
4
  import { type Assign } from '../types';
4
5
  type _TagProps = {
5
6
  index: string | number;
6
7
  value: string;
7
8
  disabled?: boolean;
8
9
  };
9
- export type TagProps = Assign<ComponentPropsWithoutRef<typeof ark.div>, _TagProps>;
10
- export declare const Tag: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
11
- ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
12
- } & {
13
- asChild?: boolean | undefined;
14
- }, "ref">, keyof _TagProps> & _TagProps & RefAttributes<HTMLDivElement>>;
10
+ export type TagProps = Assign<HTMLArkProps<'div'>, _TagProps>;
11
+ export declare const Tag: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof _TagProps> & _TagProps & RefAttributes<HTMLDivElement>>;
15
12
  export {};
@@ -1,8 +1,7 @@
1
- import { ForwardRefExoticComponent, DetailedHTMLProps, ButtonHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
2
- import { ark } from '../factory';
3
- export type TagsInputClearTriggerProps = ComponentPropsWithoutRef<typeof ark.button>;
4
- export declare const TagsInputClearTrigger: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
5
- ref?: ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement> | null | undefined;
6
- } & {
1
+ import { ForwardRefExoticComponent, DetailedHTMLProps, ButtonHTMLAttributes, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
4
+ export type TagsInputClearTriggerProps = HTMLArkProps<'button'>;
5
+ export declare const TagsInputClearTrigger: ForwardRefExoticComponent<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
7
6
  asChild?: boolean | undefined;
8
- }, "ref"> & RefAttributes<HTMLButtonElement>>;
7
+ } & RefAttributes<HTMLButtonElement>>;
@@ -1,12 +1,5 @@
1
- import { PublicApi } from '@zag-js/tags-input';
2
- import { Provider, HTMLAttributes, CSSProperties } from 'react';
1
+ import { Provider } from 'react';
3
2
  /// <reference types="react" />
4
3
  import { type UseTagsInputReturn } from './use-tags-input';
5
4
  export type TagsInputContext = UseTagsInputReturn;
6
- export declare const TagsInputProvider: Provider<PublicApi<JSX.IntrinsicElements & {
7
- element: HTMLAttributes<HTMLElement>;
8
- style: CSSProperties;
9
- }>>, useTagsInputContext: () => PublicApi<JSX.IntrinsicElements & {
10
- element: HTMLAttributes<HTMLElement>;
11
- style: CSSProperties;
12
- }>;
5
+ export declare const TagsInputProvider: Provider<UseTagsInputReturn>, useTagsInputContext: () => UseTagsInputReturn;
@@ -10,12 +10,9 @@ const factory = require('../factory.cjs');
10
10
  const tagsInputContext = require('./tags-input-context.cjs');
11
11
 
12
12
  const TagsInputControl = react.forwardRef((props, ref) => {
13
- const { controlProps, hiddenInputProps } = tagsInputContext.useTagsInputContext();
14
- const mergedProps = react$1.mergeProps(controlProps, props);
15
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16
- /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: props.children }),
17
- /* @__PURE__ */ jsxRuntime.jsx("input", { ...hiddenInputProps })
18
- ] });
13
+ const api = tagsInputContext.useTagsInputContext();
14
+ const mergedProps = react$1.mergeProps(api.controlProps, props);
15
+ return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
19
16
  });
20
17
  TagsInputControl.displayName = "TagsInputControl";
21
18
 
@@ -1,8 +1,7 @@
1
- import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
2
- import { ark } from '../factory';
3
- export type TagsInputControlProps = ComponentPropsWithoutRef<typeof ark.div>;
4
- export declare const TagsInputControl: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
5
- ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
6
- } & {
1
+ import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
4
+ export type TagsInputControlProps = HTMLArkProps<'div'>;
5
+ export declare const TagsInputControl: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
6
  asChild?: boolean | undefined;
8
- }, "ref"> & RefAttributes<HTMLDivElement>>;
7
+ } & RefAttributes<HTMLDivElement>>;
@@ -1,17 +1,14 @@
1
1
  'use client';
2
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { jsx } from 'react/jsx-runtime';
3
3
  import { mergeProps } from '@zag-js/react';
4
4
  import { forwardRef } from 'react';
5
5
  import { ark } from '../factory.mjs';
6
6
  import { useTagsInputContext } from './tags-input-context.mjs';
7
7
 
8
8
  const TagsInputControl = forwardRef((props, ref) => {
9
- const { controlProps, hiddenInputProps } = useTagsInputContext();
10
- const mergedProps = mergeProps(controlProps, props);
11
- return /* @__PURE__ */ jsxs(Fragment, { children: [
12
- /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: props.children }),
13
- /* @__PURE__ */ jsx("input", { ...hiddenInputProps })
14
- ] });
9
+ const api = useTagsInputContext();
10
+ const mergedProps = mergeProps(api.controlProps, props);
11
+ return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
15
12
  });
16
13
  TagsInputControl.displayName = "TagsInputControl";
17
14
 
@@ -1,8 +1,7 @@
1
- import { ForwardRefExoticComponent, DetailedHTMLProps, InputHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
2
- import { ark } from '../factory';
3
- export type TagsInputInputProps = ComponentPropsWithoutRef<typeof ark.input>;
4
- export declare const TagsInputInput: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
5
- ref?: ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement> | null | undefined;
6
- } & {
1
+ import { ForwardRefExoticComponent, DetailedHTMLProps, InputHTMLAttributes, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
4
+ export type TagsInputInputProps = HTMLArkProps<'input'>;
5
+ export declare const TagsInputInput: ForwardRefExoticComponent<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
7
6
  asChild?: boolean | undefined;
8
- }, "ref"> & RefAttributes<HTMLInputElement>>;
7
+ } & RefAttributes<HTMLInputElement>>;
@@ -1,8 +1,7 @@
1
- import { ForwardRefExoticComponent, DetailedHTMLProps, LabelHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
2
- import { ark } from '../factory';
3
- export type TagsInputLabelProps = ComponentPropsWithoutRef<typeof ark.label>;
4
- export declare const TagsInputLabel: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
5
- ref?: ((instance: HTMLLabelElement | null) => void) | RefObject<HTMLLabelElement> | null | undefined;
6
- } & {
1
+ import { ForwardRefExoticComponent, DetailedHTMLProps, LabelHTMLAttributes, RefAttributes } from 'react';
2
+ /// <reference types="react" />
3
+ import { type HTMLArkProps } from '../factory';
4
+ export type TagsInputLabelProps = HTMLArkProps<'label'>;
5
+ export declare const TagsInputLabel: ForwardRefExoticComponent<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
7
6
  asChild?: boolean | undefined;
8
- }, "ref"> & RefAttributes<HTMLLabelElement>>;
7
+ } & RefAttributes<HTMLLabelElement>>;
@@ -35,22 +35,24 @@ const TagsInput = react.forwardRef((props, ref) => {
35
35
  "maxLength",
36
36
  "name",
37
37
  "onChange",
38
+ "onFocusChange",
38
39
  "onFocusOutside",
39
- "onHighlight",
40
40
  "onInteractOutside",
41
41
  "onInvalid",
42
42
  "onPointerDownOutside",
43
- "onTagUpdate",
44
43
  "readOnly",
45
44
  "translations",
46
45
  "validate",
47
46
  "value"
48
47
  ]
49
48
  );
50
- const tagsInput = useTagsInput.useTagsInput(useTagsInputProps);
51
- const mergedProps = react$1.mergeProps(tagsInput.rootProps, inputProps);
52
- const view = runIfFn.runIfFn(children, tagsInput);
53
- return /* @__PURE__ */ jsxRuntime.jsx(tagsInputContext.TagsInputProvider, { value: tagsInput, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: view }) });
49
+ const api = useTagsInput.useTagsInput(useTagsInputProps);
50
+ const mergedProps = react$1.mergeProps(api.rootProps, inputProps);
51
+ const view = runIfFn.runIfFn(children, api);
52
+ return /* @__PURE__ */ jsxRuntime.jsxs(tagsInputContext.TagsInputProvider, { value: api, children: [
53
+ /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: view }),
54
+ /* @__PURE__ */ jsxRuntime.jsx("input", { ...api.hiddenInputProps })
55
+ ] });
54
56
  });
55
57
  TagsInput.displayName = "TagsInput";
56
58
 
@@ -1,14 +1,10 @@
1
- import { ForwardRefExoticComponent, DetailedHTMLProps, InputHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
- import { ark } from '../factory';
1
+ import { ForwardRefExoticComponent, RefAttributes, type ReactNode } from 'react';
2
+ import { type HTMLArkProps } from '../factory';
3
3
  import { type Assign } from '../types';
4
4
  import { type UseTagsInputProps } from './use-tags-input';
5
- export type TagsInputProps = Assign<Assign<ComponentPropsWithoutRef<typeof ark.input>, UseTagsInputProps>, {
6
- children: ReactNode | ((pages: UseTagsInputProps) => ReactNode);
5
+ export type TagsInputProps = Assign<Assign<HTMLArkProps<'input'>, UseTagsInputProps>, {
6
+ children?: ReactNode | ((pages: UseTagsInputProps) => ReactNode);
7
7
  }>;
8
- export declare const TagsInput: ForwardRefExoticComponent<Omit<Assign<Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
9
- ref?: ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement> | null | undefined;
10
- } & {
11
- asChild?: boolean | undefined;
12
- }, "ref">, UseTagsInputProps>, "children"> & {
13
- children: ReactNode | ((pages: UseTagsInputProps) => ReactNode);
8
+ export declare const TagsInput: ForwardRefExoticComponent<Omit<Assign<HTMLArkProps<"input">, UseTagsInputProps>, "children"> & {
9
+ children?: ReactNode | ((pages: UseTagsInputProps) => ReactNode);
14
10
  } & RefAttributes<HTMLInputElement>>;
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsx } from 'react/jsx-runtime';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { mergeProps } from '@zag-js/react';
4
4
  import { forwardRef } from 'react';
5
5
  import { createSplitProps } from '../create-split-props.mjs';
@@ -31,22 +31,24 @@ const TagsInput = forwardRef((props, ref) => {
31
31
  "maxLength",
32
32
  "name",
33
33
  "onChange",
34
+ "onFocusChange",
34
35
  "onFocusOutside",
35
- "onHighlight",
36
36
  "onInteractOutside",
37
37
  "onInvalid",
38
38
  "onPointerDownOutside",
39
- "onTagUpdate",
40
39
  "readOnly",
41
40
  "translations",
42
41
  "validate",
43
42
  "value"
44
43
  ]
45
44
  );
46
- const tagsInput = useTagsInput(useTagsInputProps);
47
- const mergedProps = mergeProps(tagsInput.rootProps, inputProps);
48
- const view = runIfFn(children, tagsInput);
49
- return /* @__PURE__ */ jsx(TagsInputProvider, { value: tagsInput, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: view }) });
45
+ const api = useTagsInput(useTagsInputProps);
46
+ const mergedProps = mergeProps(api.rootProps, inputProps);
47
+ const view = runIfFn(children, api);
48
+ return /* @__PURE__ */ jsxs(TagsInputProvider, { value: api, children: [
49
+ /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: view }),
50
+ /* @__PURE__ */ jsx("input", { ...api.hiddenInputProps })
51
+ ] });
50
52
  });
51
53
  TagsInput.displayName = "TagsInput";
52
54
 
@@ -1,12 +1,7 @@
1
- import { HTMLAttributes, CSSProperties } from 'react';
2
- /// <reference types="react" />
3
1
  import * as tagsInput from '@zag-js/tags-input';
4
2
  import { type Optional } from '../types';
5
- export type UseTagsInputProps = Optional<tagsInput.Context, 'id'> & {
3
+ export interface UseTagsInputProps extends Optional<tagsInput.Context, 'id'> {
6
4
  defaultValue?: tagsInput.Context['value'];
7
- };
8
- export declare const useTagsInput: (props: UseTagsInputProps) => tagsInput.PublicApi<JSX.IntrinsicElements & {
9
- element: HTMLAttributes<HTMLElement>;
10
- style: CSSProperties;
11
- }>;
12
- export type UseTagsInputReturn = ReturnType<typeof useTagsInput>;
5
+ }
6
+ export type UseTagsInputReturn = tagsInput.Api;
7
+ export declare const useTagsInput: (props: UseTagsInputProps) => UseTagsInputReturn;