@cdx-ui/primitives 0.0.1-beta.65 → 0.0.1-beta.67

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 (988) hide show
  1. package/README.md +35 -36
  2. package/lib/commonjs/CLAUDE.md +64 -12
  3. package/lib/commonjs/avatar/{createAvatarRoot.js → AvatarRoot.js} +10 -6
  4. package/lib/commonjs/avatar/AvatarRoot.js.map +1 -0
  5. package/lib/commonjs/avatar/index.js +14 -24
  6. package/lib/commonjs/avatar/index.js.map +1 -1
  7. package/lib/commonjs/button/{createButtonRoot.js → ButtonRoot.js} +13 -9
  8. package/lib/commonjs/button/ButtonRoot.js.map +1 -0
  9. package/lib/commonjs/button/index.js +7 -24
  10. package/lib/commonjs/button/index.js.map +1 -1
  11. package/lib/commonjs/checkbox/{createCheckboxGroup.js → CheckboxGroup.js} +20 -12
  12. package/lib/commonjs/checkbox/CheckboxGroup.js.map +1 -0
  13. package/lib/commonjs/checkbox/CheckboxRoot.js +103 -0
  14. package/lib/commonjs/checkbox/CheckboxRoot.js.map +1 -0
  15. package/lib/commonjs/checkbox/CheckboxRoot.web.js +94 -0
  16. package/lib/commonjs/checkbox/CheckboxRoot.web.js.map +1 -0
  17. package/lib/commonjs/checkbox/index.js +21 -24
  18. package/lib/commonjs/checkbox/index.js.map +1 -1
  19. package/lib/commonjs/chip/ChipRoot.js +147 -0
  20. package/lib/commonjs/chip/ChipRoot.js.map +1 -0
  21. package/lib/commonjs/chip/context.js +11 -0
  22. package/lib/commonjs/chip/context.js.map +1 -0
  23. package/lib/commonjs/chip/index.js +14 -10
  24. package/lib/commonjs/chip/index.js.map +1 -1
  25. package/lib/commonjs/dialog/DialogClose.js +32 -0
  26. package/lib/commonjs/dialog/DialogClose.js.map +1 -0
  27. package/lib/commonjs/dialog/{createDialogPopup.js → DialogPopup.js} +18 -14
  28. package/lib/commonjs/dialog/DialogPopup.js.map +1 -0
  29. package/lib/commonjs/dialog/{createDialogRoot.js → DialogRoot.js} +11 -8
  30. package/lib/commonjs/dialog/DialogRoot.js.map +1 -0
  31. package/lib/commonjs/dialog/DialogTrigger.js +32 -0
  32. package/lib/commonjs/dialog/DialogTrigger.js.map +1 -0
  33. package/lib/commonjs/dialog/index.js +28 -41
  34. package/lib/commonjs/dialog/index.js.map +1 -1
  35. package/lib/commonjs/field/FieldLabel.js +48 -0
  36. package/lib/commonjs/field/FieldLabel.js.map +1 -0
  37. package/lib/commonjs/field/FieldLabel.web.js +60 -0
  38. package/lib/commonjs/field/FieldLabel.web.js.map +1 -0
  39. package/lib/commonjs/field/FieldRoot.js +38 -0
  40. package/lib/commonjs/field/FieldRoot.js.map +1 -0
  41. package/lib/commonjs/field/index.js +14 -40
  42. package/lib/commonjs/field/index.js.map +1 -1
  43. package/lib/commonjs/form/FormRoot.js +25 -0
  44. package/lib/commonjs/form/FormRoot.js.map +1 -0
  45. package/lib/commonjs/{dialog/createDialogFooter.js → form/FormRoot.web.js} +14 -8
  46. package/lib/commonjs/form/FormRoot.web.js.map +1 -0
  47. package/lib/commonjs/form/index.js +7 -9
  48. package/lib/commonjs/form/index.js.map +1 -1
  49. package/lib/commonjs/index.js +42 -5
  50. package/lib/commonjs/index.js.map +1 -1
  51. package/lib/commonjs/input/{createInputField.js → InputField.android.js} +36 -38
  52. package/lib/commonjs/input/InputField.android.js.map +1 -0
  53. package/lib/commonjs/input/InputField.js +92 -0
  54. package/lib/commonjs/input/InputField.js.map +1 -0
  55. package/lib/commonjs/input/InputField.web.js +131 -0
  56. package/lib/commonjs/input/InputField.web.js.map +1 -0
  57. package/lib/commonjs/input/{createInputRoot.js → InputRoot.js} +29 -27
  58. package/lib/commonjs/input/InputRoot.js.map +1 -0
  59. package/lib/commonjs/input/index.js +21 -16
  60. package/lib/commonjs/input/index.js.map +1 -1
  61. package/lib/commonjs/link/{createLink.js → LinkRoot.js} +20 -20
  62. package/lib/commonjs/link/LinkRoot.js.map +1 -0
  63. package/lib/commonjs/link/index.js +3 -3
  64. package/lib/commonjs/link/index.js.map +1 -1
  65. package/lib/commonjs/list-item/{createListItemRoot.js → ListItemRoot.js} +48 -68
  66. package/lib/commonjs/list-item/ListItemRoot.js.map +1 -0
  67. package/lib/commonjs/list-item/context.js.map +1 -1
  68. package/lib/commonjs/list-item/index.js +7 -36
  69. package/lib/commonjs/list-item/index.js.map +1 -1
  70. package/lib/commonjs/otp-input/{createOtpInputField.js → OtpInputField.js} +24 -8
  71. package/lib/commonjs/otp-input/OtpInputField.js.map +1 -0
  72. package/lib/commonjs/otp-input/index.js +39 -16
  73. package/lib/commonjs/otp-input/index.js.map +1 -1
  74. package/lib/commonjs/otp-input/{createOtpInputRoot.js → useOtpInput.js} +33 -49
  75. package/lib/commonjs/otp-input/useOtpInput.js.map +1 -0
  76. package/lib/commonjs/overlay/useDismissOverlay.js +0 -2
  77. package/lib/commonjs/overlay/useDismissOverlay.js.map +1 -1
  78. package/lib/commonjs/overlay/useEscapeKey.js +0 -2
  79. package/lib/commonjs/overlay/useEscapeKey.js.map +1 -1
  80. package/lib/commonjs/{progress/createProgressIndicator.js → progress-bar/ProgressBarIndicator.js} +12 -9
  81. package/lib/commonjs/progress-bar/ProgressBarIndicator.js.map +1 -0
  82. package/lib/commonjs/{progress/createProgressRoot.js → progress-bar/ProgressBarRoot.js} +9 -5
  83. package/lib/commonjs/progress-bar/ProgressBarRoot.js.map +1 -0
  84. package/lib/commonjs/progress-bar/context.js.map +1 -0
  85. package/lib/commonjs/progress-bar/index.js +27 -0
  86. package/lib/commonjs/progress-bar/index.js.map +1 -0
  87. package/lib/commonjs/{progress → progress-bar}/types.js.map +1 -1
  88. package/lib/commonjs/radio/{createRadioGroup.js → RadioGroup.js} +18 -10
  89. package/lib/commonjs/radio/RadioGroup.js.map +1 -0
  90. package/lib/commonjs/radio/RadioRoot.js +99 -0
  91. package/lib/commonjs/radio/RadioRoot.js.map +1 -0
  92. package/lib/commonjs/radio/RadioRoot.web.js +91 -0
  93. package/lib/commonjs/radio/RadioRoot.web.js.map +1 -0
  94. package/lib/commonjs/radio/index.js +21 -20
  95. package/lib/commonjs/radio/index.js.map +1 -1
  96. package/lib/commonjs/select/{createSelectContent.js → SelectContent.js} +14 -11
  97. package/lib/commonjs/select/SelectContent.js.map +1 -0
  98. package/lib/commonjs/select/{createSelectItem.js → SelectItem.js} +18 -15
  99. package/lib/commonjs/select/SelectItem.js.map +1 -0
  100. package/lib/commonjs/select/{createSelectRoot.js → SelectRoot.js} +11 -8
  101. package/lib/commonjs/select/SelectRoot.js.map +1 -0
  102. package/lib/commonjs/select/SelectTrigger.js +72 -0
  103. package/lib/commonjs/select/SelectTrigger.js.map +1 -0
  104. package/lib/commonjs/select/SelectTrigger.web.js +175 -0
  105. package/lib/commonjs/select/SelectTrigger.web.js.map +1 -0
  106. package/lib/commonjs/select/context.js +3 -12
  107. package/lib/commonjs/select/context.js.map +1 -1
  108. package/lib/commonjs/select/index.js +41 -32
  109. package/lib/commonjs/select/index.js.map +1 -1
  110. package/lib/commonjs/select/useContentFocus.js +1 -1
  111. package/lib/commonjs/select/useSelectTrigger.js +206 -0
  112. package/lib/commonjs/select/useSelectTrigger.js.map +1 -0
  113. package/lib/commonjs/select/useSelectTrigger.web.js +192 -0
  114. package/lib/commonjs/select/useSelectTrigger.web.js.map +1 -0
  115. package/lib/commonjs/slot/index.js +19 -0
  116. package/lib/commonjs/slot/index.js.map +1 -0
  117. package/lib/commonjs/switch/index.js +7 -9
  118. package/lib/commonjs/switch/index.js.map +1 -1
  119. package/lib/commonjs/switch/useSwitch.js +81 -0
  120. package/lib/commonjs/switch/useSwitch.js.map +1 -0
  121. package/lib/commonjs/tile/{createTileGroup.js → TileGroup.js} +11 -12
  122. package/lib/commonjs/tile/TileGroup.js.map +1 -0
  123. package/lib/commonjs/tile/TileRoot.js +129 -0
  124. package/lib/commonjs/tile/TileRoot.js.map +1 -0
  125. package/lib/commonjs/tile/index.js +14 -36
  126. package/lib/commonjs/tile/index.js.map +1 -1
  127. package/lib/commonjs/utils/dataAttributes.js +6 -0
  128. package/lib/commonjs/utils/dataAttributes.js.map +1 -1
  129. package/lib/commonjs/utils/dataAttributes.web.js +25 -0
  130. package/lib/commonjs/utils/dataAttributes.web.js.map +1 -1
  131. package/lib/commonjs/utils/domDataAttributes.js +30 -0
  132. package/lib/commonjs/utils/domDataAttributes.js.map +1 -1
  133. package/lib/module/CLAUDE.md +64 -12
  134. package/lib/module/avatar/{createAvatarRoot.js → AvatarRoot.js} +9 -4
  135. package/lib/module/avatar/AvatarRoot.js.map +1 -0
  136. package/lib/module/avatar/index.js +2 -23
  137. package/lib/module/avatar/index.js.map +1 -1
  138. package/lib/module/button/{createButtonRoot.js → ButtonRoot.js} +13 -8
  139. package/lib/module/button/ButtonRoot.js.map +1 -0
  140. package/lib/module/button/index.js +1 -23
  141. package/lib/module/button/index.js.map +1 -1
  142. package/lib/module/checkbox/{createCheckboxGroup.js → CheckboxGroup.js} +20 -11
  143. package/lib/module/checkbox/CheckboxGroup.js.map +1 -0
  144. package/lib/module/checkbox/CheckboxRoot.js +99 -0
  145. package/lib/module/checkbox/CheckboxRoot.js.map +1 -0
  146. package/lib/module/checkbox/CheckboxRoot.web.js +90 -0
  147. package/lib/module/checkbox/CheckboxRoot.web.js.map +1 -0
  148. package/lib/module/checkbox/index.js +3 -23
  149. package/lib/module/checkbox/index.js.map +1 -1
  150. package/lib/module/chip/ChipRoot.js +142 -0
  151. package/lib/module/chip/ChipRoot.js.map +1 -0
  152. package/lib/module/chip/context.js +5 -0
  153. package/lib/module/chip/context.js.map +1 -0
  154. package/lib/module/chip/index.js +2 -9
  155. package/lib/module/chip/index.js.map +1 -1
  156. package/lib/module/dialog/DialogClose.js +28 -0
  157. package/lib/module/dialog/DialogClose.js.map +1 -0
  158. package/lib/module/dialog/{createDialogPopup.js → DialogPopup.js} +19 -14
  159. package/lib/module/dialog/DialogPopup.js.map +1 -0
  160. package/lib/module/dialog/{createDialogRoot.js → DialogRoot.js} +11 -7
  161. package/lib/module/dialog/DialogRoot.js.map +1 -0
  162. package/lib/module/dialog/DialogTrigger.js +28 -0
  163. package/lib/module/dialog/DialogTrigger.js.map +1 -0
  164. package/lib/module/dialog/index.js +5 -42
  165. package/lib/module/dialog/index.js.map +1 -1
  166. package/lib/module/field/FieldLabel.js +44 -0
  167. package/lib/module/field/FieldLabel.js.map +1 -0
  168. package/lib/module/field/FieldLabel.web.js +55 -0
  169. package/lib/module/field/FieldLabel.web.js.map +1 -0
  170. package/lib/module/field/FieldRoot.js +34 -0
  171. package/lib/module/field/FieldRoot.js.map +1 -0
  172. package/lib/module/field/index.js +2 -39
  173. package/lib/module/field/index.js.map +1 -1
  174. package/lib/module/form/FormRoot.js +21 -0
  175. package/lib/module/form/FormRoot.js.map +1 -0
  176. package/lib/module/form/FormRoot.web.js +22 -0
  177. package/lib/module/form/FormRoot.web.js.map +1 -0
  178. package/lib/module/form/index.js +1 -8
  179. package/lib/module/form/index.js.map +1 -1
  180. package/lib/module/index.js +5 -3
  181. package/lib/module/index.js.map +1 -1
  182. package/lib/module/input/{createInputField.js → InputField.android.js} +36 -37
  183. package/lib/module/input/InputField.android.js.map +1 -0
  184. package/lib/module/input/InputField.js +88 -0
  185. package/lib/module/input/InputField.js.map +1 -0
  186. package/lib/module/input/InputField.web.js +126 -0
  187. package/lib/module/input/InputField.web.js.map +1 -0
  188. package/lib/module/input/{createInputRoot.js → InputRoot.js} +29 -25
  189. package/lib/module/input/InputRoot.js.map +1 -0
  190. package/lib/module/input/index.js +3 -15
  191. package/lib/module/input/index.js.map +1 -1
  192. package/lib/module/link/{createLink.js → LinkRoot.js} +21 -19
  193. package/lib/module/link/LinkRoot.js.map +1 -0
  194. package/lib/module/link/index.js +1 -1
  195. package/lib/module/link/index.js.map +1 -1
  196. package/lib/module/list-item/{createListItemRoot.js → ListItemRoot.js} +49 -68
  197. package/lib/module/list-item/ListItemRoot.js.map +1 -0
  198. package/lib/module/list-item/context.js.map +1 -1
  199. package/lib/module/list-item/index.js +1 -35
  200. package/lib/module/list-item/index.js.map +1 -1
  201. package/lib/module/otp-input/{createOtpInputField.js → OtpInputField.js} +24 -7
  202. package/lib/module/otp-input/OtpInputField.js.map +1 -0
  203. package/lib/module/otp-input/index.js +3 -15
  204. package/lib/module/otp-input/index.js.map +1 -1
  205. package/lib/module/otp-input/{createOtpInputRoot.js → useOtpInput.js} +33 -48
  206. package/lib/module/otp-input/useOtpInput.js.map +1 -0
  207. package/lib/module/overlay/useDismissOverlay.js +0 -2
  208. package/lib/module/overlay/useDismissOverlay.js.map +1 -1
  209. package/lib/module/overlay/useEscapeKey.js +0 -2
  210. package/lib/module/overlay/useEscapeKey.js.map +1 -1
  211. package/lib/module/{progress/createProgressIndicator.js → progress-bar/ProgressBarIndicator.js} +11 -7
  212. package/lib/module/progress-bar/ProgressBarIndicator.js.map +1 -0
  213. package/lib/module/{progress/createProgressRoot.js → progress-bar/ProgressBarRoot.js} +8 -3
  214. package/lib/module/progress-bar/ProgressBarRoot.js.map +1 -0
  215. package/lib/module/progress-bar/context.js.map +1 -0
  216. package/lib/module/progress-bar/index.js +6 -0
  217. package/lib/module/progress-bar/index.js.map +1 -0
  218. package/lib/module/{progress → progress-bar}/types.js.map +1 -1
  219. package/lib/module/radio/{createRadioGroup.js → RadioGroup.js} +18 -9
  220. package/lib/module/radio/RadioGroup.js.map +1 -0
  221. package/lib/module/radio/RadioRoot.js +95 -0
  222. package/lib/module/radio/RadioRoot.js.map +1 -0
  223. package/lib/module/radio/RadioRoot.web.js +87 -0
  224. package/lib/module/radio/RadioRoot.web.js.map +1 -0
  225. package/lib/module/radio/index.js +3 -19
  226. package/lib/module/radio/index.js.map +1 -1
  227. package/lib/module/select/{createSelectContent.js → SelectContent.js} +14 -11
  228. package/lib/module/select/SelectContent.js.map +1 -0
  229. package/lib/module/select/{createSelectItem.js → SelectItem.js} +18 -14
  230. package/lib/module/select/SelectItem.js.map +1 -0
  231. package/lib/module/select/{createSelectRoot.js → SelectRoot.js} +11 -7
  232. package/lib/module/select/SelectRoot.js.map +1 -0
  233. package/lib/module/select/SelectTrigger.js +67 -0
  234. package/lib/module/select/SelectTrigger.js.map +1 -0
  235. package/lib/module/select/SelectTrigger.web.js +170 -0
  236. package/lib/module/select/SelectTrigger.web.js.map +1 -0
  237. package/lib/module/select/context.js +1 -8
  238. package/lib/module/select/context.js.map +1 -1
  239. package/lib/module/select/index.js +5 -31
  240. package/lib/module/select/index.js.map +1 -1
  241. package/lib/module/select/useContentFocus.js +1 -1
  242. package/lib/module/select/useSelectTrigger.js +202 -0
  243. package/lib/module/select/useSelectTrigger.js.map +1 -0
  244. package/lib/module/select/useSelectTrigger.web.js +188 -0
  245. package/lib/module/select/useSelectTrigger.web.js.map +1 -0
  246. package/lib/module/slot/index.js +4 -0
  247. package/lib/module/slot/index.js.map +1 -0
  248. package/lib/module/switch/index.js +1 -8
  249. package/lib/module/switch/index.js.map +1 -1
  250. package/lib/module/switch/useSwitch.js +77 -0
  251. package/lib/module/switch/useSwitch.js.map +1 -0
  252. package/lib/module/tile/{createTileGroup.js → TileGroup.js} +10 -9
  253. package/lib/module/tile/TileGroup.js.map +1 -0
  254. package/lib/module/tile/{createTileRoot.js → TileRoot.js} +52 -54
  255. package/lib/module/tile/TileRoot.js.map +1 -0
  256. package/lib/module/tile/index.js +2 -35
  257. package/lib/module/tile/index.js.map +1 -1
  258. package/lib/module/utils/dataAttributes.js +1 -1
  259. package/lib/module/utils/dataAttributes.js.map +1 -1
  260. package/lib/module/utils/dataAttributes.web.js +24 -0
  261. package/lib/module/utils/dataAttributes.web.js.map +1 -1
  262. package/lib/module/utils/domDataAttributes.js +29 -0
  263. package/lib/module/utils/domDataAttributes.js.map +1 -1
  264. package/lib/typescript/avatar/AvatarRoot.d.ts +8 -0
  265. package/lib/typescript/avatar/AvatarRoot.d.ts.map +1 -0
  266. package/lib/typescript/avatar/index.d.ts +3 -10
  267. package/lib/typescript/avatar/index.d.ts.map +1 -1
  268. package/lib/typescript/avatar/types.d.ts +1 -17
  269. package/lib/typescript/avatar/types.d.ts.map +1 -1
  270. package/lib/typescript/button/ButtonRoot.d.ts +9 -0
  271. package/lib/typescript/button/ButtonRoot.d.ts.map +1 -0
  272. package/lib/typescript/button/index.d.ts +2 -10
  273. package/lib/typescript/button/index.d.ts.map +1 -1
  274. package/lib/typescript/button/types.d.ts +1 -34
  275. package/lib/typescript/button/types.d.ts.map +1 -1
  276. package/lib/typescript/checkbox/CheckboxGroup.d.ts +9 -0
  277. package/lib/typescript/checkbox/CheckboxGroup.d.ts.map +1 -0
  278. package/lib/typescript/checkbox/CheckboxRoot.d.ts +6 -0
  279. package/lib/typescript/checkbox/CheckboxRoot.d.ts.map +1 -0
  280. package/lib/typescript/checkbox/CheckboxRoot.web.d.ts +6 -0
  281. package/lib/typescript/checkbox/CheckboxRoot.web.d.ts.map +1 -0
  282. package/lib/typescript/checkbox/index.d.ts +4 -10
  283. package/lib/typescript/checkbox/index.d.ts.map +1 -1
  284. package/lib/typescript/checkbox/types.d.ts +0 -17
  285. package/lib/typescript/checkbox/types.d.ts.map +1 -1
  286. package/lib/typescript/checkbox/useCheckboxRoot.d.ts +1 -1
  287. package/lib/typescript/chip/ChipRoot.d.ts +7 -0
  288. package/lib/typescript/chip/ChipRoot.d.ts.map +1 -0
  289. package/lib/typescript/chip/context.d.ts +6 -0
  290. package/lib/typescript/chip/context.d.ts.map +1 -0
  291. package/lib/typescript/chip/index.d.ts +3 -8
  292. package/lib/typescript/chip/index.d.ts.map +1 -1
  293. package/lib/typescript/chip/types.d.ts +3 -4
  294. package/lib/typescript/chip/types.d.ts.map +1 -1
  295. package/lib/typescript/dialog/DialogClose.d.ts +5 -0
  296. package/lib/typescript/dialog/DialogClose.d.ts.map +1 -0
  297. package/lib/typescript/dialog/DialogPopup.d.ts +14 -0
  298. package/lib/typescript/dialog/DialogPopup.d.ts.map +1 -0
  299. package/lib/typescript/dialog/DialogRoot.d.ts +7 -0
  300. package/lib/typescript/dialog/DialogRoot.d.ts.map +1 -0
  301. package/lib/typescript/dialog/DialogTrigger.d.ts +5 -0
  302. package/lib/typescript/dialog/DialogTrigger.d.ts.map +1 -0
  303. package/lib/typescript/dialog/index.d.ts +6 -17
  304. package/lib/typescript/dialog/index.d.ts.map +1 -1
  305. package/lib/typescript/dialog/types.d.ts +2 -24
  306. package/lib/typescript/dialog/types.d.ts.map +1 -1
  307. package/lib/typescript/field/FieldLabel.d.ts +12 -0
  308. package/lib/typescript/field/FieldLabel.d.ts.map +1 -0
  309. package/lib/typescript/field/FieldLabel.web.d.ts +24 -0
  310. package/lib/typescript/field/FieldLabel.web.d.ts.map +1 -0
  311. package/lib/typescript/field/FieldRoot.d.ts +8 -0
  312. package/lib/typescript/field/FieldRoot.d.ts.map +1 -0
  313. package/lib/typescript/field/index.d.ts +3 -12
  314. package/lib/typescript/field/index.d.ts.map +1 -1
  315. package/lib/typescript/field/types.d.ts +0 -20
  316. package/lib/typescript/field/types.d.ts.map +1 -1
  317. package/lib/typescript/form/FormRoot.d.ts +8 -0
  318. package/lib/typescript/form/FormRoot.d.ts.map +1 -0
  319. package/lib/typescript/form/FormRoot.web.d.ts +8 -0
  320. package/lib/typescript/form/FormRoot.web.d.ts.map +1 -0
  321. package/lib/typescript/form/index.d.ts +2 -5
  322. package/lib/typescript/form/index.d.ts.map +1 -1
  323. package/lib/typescript/form/types.d.ts +8 -9
  324. package/lib/typescript/form/types.d.ts.map +1 -1
  325. package/lib/typescript/index.d.ts +5 -3
  326. package/lib/typescript/index.d.ts.map +1 -1
  327. package/lib/typescript/input/InputField.android.d.ts +5 -0
  328. package/lib/typescript/input/InputField.android.d.ts.map +1 -0
  329. package/lib/typescript/input/InputField.d.ts +5 -0
  330. package/lib/typescript/input/InputField.d.ts.map +1 -0
  331. package/lib/typescript/input/InputField.web.d.ts +6 -0
  332. package/lib/typescript/input/InputField.web.d.ts.map +1 -0
  333. package/lib/typescript/input/InputRoot.d.ts +5 -0
  334. package/lib/typescript/input/InputRoot.d.ts.map +1 -0
  335. package/lib/typescript/input/index.d.ts +4 -8
  336. package/lib/typescript/input/index.d.ts.map +1 -1
  337. package/lib/typescript/input/types.d.ts +20 -39
  338. package/lib/typescript/input/types.d.ts.map +1 -1
  339. package/lib/typescript/link/LinkRoot.d.ts +9 -0
  340. package/lib/typescript/link/LinkRoot.d.ts.map +1 -0
  341. package/lib/typescript/link/index.d.ts +1 -1
  342. package/lib/typescript/link/index.d.ts.map +1 -1
  343. package/lib/typescript/list-item/ListItemRoot.d.ts +7 -0
  344. package/lib/typescript/list-item/ListItemRoot.d.ts.map +1 -0
  345. package/lib/typescript/list-item/context.d.ts +3 -3
  346. package/lib/typescript/list-item/context.d.ts.map +1 -1
  347. package/lib/typescript/list-item/index.d.ts +2 -14
  348. package/lib/typescript/list-item/index.d.ts.map +1 -1
  349. package/lib/typescript/list-item/types.d.ts +4 -52
  350. package/lib/typescript/list-item/types.d.ts.map +1 -1
  351. package/lib/typescript/otp-input/OtpInputField.d.ts +19 -0
  352. package/lib/typescript/otp-input/OtpInputField.d.ts.map +1 -0
  353. package/lib/typescript/otp-input/index.d.ts +4 -8
  354. package/lib/typescript/otp-input/index.d.ts.map +1 -1
  355. package/lib/typescript/otp-input/types.d.ts +0 -9
  356. package/lib/typescript/otp-input/types.d.ts.map +1 -1
  357. package/lib/typescript/otp-input/useOtpInput.d.ts +19 -0
  358. package/lib/typescript/otp-input/useOtpInput.d.ts.map +1 -0
  359. package/lib/typescript/overlay/useDismissOverlay.d.ts.map +1 -1
  360. package/lib/typescript/overlay/useEscapeKey.d.ts.map +1 -1
  361. package/lib/typescript/progress-bar/ProgressBarIndicator.d.ts +6 -0
  362. package/lib/typescript/progress-bar/ProgressBarIndicator.d.ts.map +1 -0
  363. package/lib/typescript/progress-bar/ProgressBarRoot.d.ts +6 -0
  364. package/lib/typescript/progress-bar/ProgressBarRoot.d.ts.map +1 -0
  365. package/lib/typescript/progress-bar/context.d.ts.map +1 -0
  366. package/lib/typescript/progress-bar/index.d.ts +6 -0
  367. package/lib/typescript/progress-bar/index.d.ts.map +1 -0
  368. package/lib/typescript/{progress → progress-bar}/types.d.ts +1 -4
  369. package/lib/typescript/progress-bar/types.d.ts.map +1 -0
  370. package/lib/typescript/radio/RadioGroup.d.ts +9 -0
  371. package/lib/typescript/radio/RadioGroup.d.ts.map +1 -0
  372. package/lib/typescript/radio/RadioRoot.d.ts +6 -0
  373. package/lib/typescript/radio/RadioRoot.d.ts.map +1 -0
  374. package/lib/typescript/radio/RadioRoot.web.d.ts +6 -0
  375. package/lib/typescript/radio/RadioRoot.web.d.ts.map +1 -0
  376. package/lib/typescript/radio/index.d.ts +4 -9
  377. package/lib/typescript/radio/index.d.ts.map +1 -1
  378. package/lib/typescript/radio/types.d.ts +0 -11
  379. package/lib/typescript/radio/types.d.ts.map +1 -1
  380. package/lib/typescript/radio/useRadioRoot.d.ts +1 -1
  381. package/lib/typescript/select/SelectContent.d.ts +9 -0
  382. package/lib/typescript/select/SelectContent.d.ts.map +1 -0
  383. package/lib/typescript/select/SelectItem.d.ts +8 -0
  384. package/lib/typescript/select/SelectItem.d.ts.map +1 -0
  385. package/lib/typescript/select/SelectRoot.d.ts +8 -0
  386. package/lib/typescript/select/SelectRoot.d.ts.map +1 -0
  387. package/lib/typescript/select/SelectTrigger.d.ts +9 -0
  388. package/lib/typescript/select/SelectTrigger.d.ts.map +1 -0
  389. package/lib/typescript/select/SelectTrigger.web.d.ts +13 -0
  390. package/lib/typescript/select/SelectTrigger.web.d.ts.map +1 -0
  391. package/lib/typescript/select/context.d.ts +1 -11
  392. package/lib/typescript/select/context.d.ts.map +1 -1
  393. package/lib/typescript/select/index.d.ts +6 -12
  394. package/lib/typescript/select/index.d.ts.map +1 -1
  395. package/lib/typescript/select/types.d.ts +1 -9
  396. package/lib/typescript/select/types.d.ts.map +1 -1
  397. package/lib/typescript/select/useContentFocus.d.ts +1 -1
  398. package/lib/typescript/select/useSelectTrigger.d.ts +77 -0
  399. package/lib/typescript/select/useSelectTrigger.d.ts.map +1 -0
  400. package/lib/typescript/select/useSelectTrigger.web.d.ts +16 -0
  401. package/lib/typescript/select/useSelectTrigger.web.d.ts.map +1 -0
  402. package/lib/typescript/slot/index.d.ts +2 -0
  403. package/lib/typescript/slot/index.d.ts.map +1 -0
  404. package/lib/typescript/switch/index.d.ts +2 -6
  405. package/lib/typescript/switch/index.d.ts.map +1 -1
  406. package/lib/typescript/switch/types.d.ts +35 -6
  407. package/lib/typescript/switch/types.d.ts.map +1 -1
  408. package/lib/typescript/switch/useSwitch.d.ts +20 -0
  409. package/lib/typescript/switch/useSwitch.d.ts.map +1 -0
  410. package/lib/typescript/tile/TileGroup.d.ts +5 -0
  411. package/lib/typescript/tile/TileGroup.d.ts.map +1 -0
  412. package/lib/typescript/tile/TileRoot.d.ts +5 -0
  413. package/lib/typescript/tile/TileRoot.d.ts.map +1 -0
  414. package/lib/typescript/tile/index.d.ts +3 -13
  415. package/lib/typescript/tile/index.d.ts.map +1 -1
  416. package/lib/typescript/tile/types.d.ts +7 -18
  417. package/lib/typescript/tile/types.d.ts.map +1 -1
  418. package/lib/typescript/utils/dataAttributes.d.ts +1 -1
  419. package/lib/typescript/utils/dataAttributes.d.ts.map +1 -1
  420. package/lib/typescript/utils/dataAttributes.web.d.ts +16 -0
  421. package/lib/typescript/utils/dataAttributes.web.d.ts.map +1 -1
  422. package/lib/typescript/utils/domDataAttributes.d.ts +13 -0
  423. package/lib/typescript/utils/domDataAttributes.d.ts.map +1 -1
  424. package/package.json +3 -2
  425. package/src/CLAUDE.md +64 -12
  426. package/src/avatar/AvatarRoot.tsx +39 -0
  427. package/src/avatar/index.ts +3 -43
  428. package/src/avatar/types.ts +1 -47
  429. package/src/button/ButtonRoot.tsx +115 -0
  430. package/src/button/index.ts +3 -0
  431. package/src/button/types.ts +1 -52
  432. package/src/checkbox/CheckboxGroup.tsx +50 -0
  433. package/src/checkbox/CheckboxRoot.tsx +102 -0
  434. package/src/checkbox/CheckboxRoot.web.tsx +92 -0
  435. package/src/checkbox/index.ts +4 -42
  436. package/src/checkbox/types.ts +1 -32
  437. package/src/chip/ChipRoot.tsx +168 -0
  438. package/src/chip/context.tsx +4 -0
  439. package/src/chip/index.ts +3 -18
  440. package/src/chip/types.ts +3 -6
  441. package/src/dialog/DialogClose.tsx +26 -0
  442. package/src/dialog/DialogPopup.tsx +162 -0
  443. package/src/dialog/DialogRoot.tsx +72 -0
  444. package/src/dialog/DialogTrigger.tsx +26 -0
  445. package/src/dialog/index.tsx +5 -86
  446. package/src/dialog/types.ts +2 -56
  447. package/src/field/FieldLabel.tsx +43 -0
  448. package/src/field/FieldLabel.web.tsx +71 -0
  449. package/src/field/FieldRoot.tsx +39 -0
  450. package/src/field/index.tsx +3 -68
  451. package/src/field/types.tsx +0 -34
  452. package/src/form/FormRoot.tsx +18 -0
  453. package/src/form/FormRoot.web.tsx +17 -0
  454. package/src/form/index.tsx +2 -12
  455. package/src/form/types.tsx +9 -11
  456. package/src/index.ts +9 -3
  457. package/src/input/InputField.android.tsx +107 -0
  458. package/src/input/InputField.tsx +100 -0
  459. package/src/input/InputField.web.tsx +141 -0
  460. package/src/input/InputRoot.tsx +104 -0
  461. package/src/input/index.tsx +4 -38
  462. package/src/input/types.ts +21 -53
  463. package/src/link/LinkRoot.tsx +108 -0
  464. package/src/link/index.tsx +1 -1
  465. package/src/list-item/ListItemRoot.tsx +183 -0
  466. package/src/list-item/context.tsx +2 -2
  467. package/src/list-item/index.ts +2 -79
  468. package/src/list-item/types.ts +4 -81
  469. package/src/otp-input/OtpInputField.tsx +122 -0
  470. package/src/otp-input/index.ts +16 -0
  471. package/src/otp-input/types.ts +0 -23
  472. package/src/otp-input/useOtpInput.ts +156 -0
  473. package/src/overlay/useDismissOverlay.ts +0 -2
  474. package/src/overlay/useEscapeKey.ts +0 -2
  475. package/src/progress-bar/ProgressBarIndicator.tsx +34 -0
  476. package/src/{progress/createProgressRoot.tsx → progress-bar/ProgressBarRoot.tsx} +17 -9
  477. package/src/progress-bar/index.ts +5 -0
  478. package/src/{progress → progress-bar}/types.ts +1 -14
  479. package/src/radio/{createRadioGroup.tsx → RadioGroup.tsx} +31 -13
  480. package/src/radio/RadioRoot.tsx +98 -0
  481. package/src/radio/RadioRoot.web.tsx +90 -0
  482. package/src/radio/index.ts +4 -36
  483. package/src/radio/types.ts +0 -22
  484. package/src/select/SelectContent.tsx +120 -0
  485. package/src/select/SelectItem.tsx +139 -0
  486. package/src/select/SelectRoot.tsx +154 -0
  487. package/src/select/SelectTrigger.tsx +82 -0
  488. package/src/select/SelectTrigger.web.tsx +238 -0
  489. package/src/select/context.tsx +1 -10
  490. package/src/select/index.ts +17 -0
  491. package/src/select/types.ts +1 -32
  492. package/src/select/useContentFocus.ts +1 -1
  493. package/src/select/useSelectTrigger.ts +345 -0
  494. package/src/select/useSelectTrigger.web.ts +267 -0
  495. package/src/slot/index.ts +1 -0
  496. package/src/switch/index.ts +7 -16
  497. package/src/switch/types.ts +35 -10
  498. package/src/switch/useSwitch.ts +75 -0
  499. package/src/tile/TileGroup.tsx +137 -0
  500. package/src/tile/{createTileRoot.tsx → TileRoot.tsx} +58 -45
  501. package/src/tile/index.ts +2 -72
  502. package/src/tile/types.ts +7 -39
  503. package/src/utils/dataAttributes.ts +4 -1
  504. package/src/utils/dataAttributes.web.ts +24 -0
  505. package/src/utils/domDataAttributes.ts +31 -0
  506. package/lib/commonjs/avatar/createAvatarBadge.js +0 -20
  507. package/lib/commonjs/avatar/createAvatarBadge.js.map +0 -1
  508. package/lib/commonjs/avatar/createAvatarIcon.js +0 -30
  509. package/lib/commonjs/avatar/createAvatarIcon.js.map +0 -1
  510. package/lib/commonjs/avatar/createAvatarImage.js +0 -51
  511. package/lib/commonjs/avatar/createAvatarImage.js.map +0 -1
  512. package/lib/commonjs/avatar/createAvatarRoot.js.map +0 -1
  513. package/lib/commonjs/avatar/createAvatarText.js +0 -50
  514. package/lib/commonjs/avatar/createAvatarText.js.map +0 -1
  515. package/lib/commonjs/button/createButtonGroup.js +0 -80
  516. package/lib/commonjs/button/createButtonGroup.js.map +0 -1
  517. package/lib/commonjs/button/createButtonIcon.js +0 -18
  518. package/lib/commonjs/button/createButtonIcon.js.map +0 -1
  519. package/lib/commonjs/button/createButtonRoot.js.map +0 -1
  520. package/lib/commonjs/button/createButtonSpinner.js +0 -34
  521. package/lib/commonjs/button/createButtonSpinner.js.map +0 -1
  522. package/lib/commonjs/button/createButtonText.js +0 -39
  523. package/lib/commonjs/button/createButtonText.js.map +0 -1
  524. package/lib/commonjs/checkbox/createCheckboxGroup.js.map +0 -1
  525. package/lib/commonjs/checkbox/createCheckboxIcon.js +0 -29
  526. package/lib/commonjs/checkbox/createCheckboxIcon.js.map +0 -1
  527. package/lib/commonjs/checkbox/createCheckboxIndicator.js +0 -47
  528. package/lib/commonjs/checkbox/createCheckboxIndicator.js.map +0 -1
  529. package/lib/commonjs/checkbox/createCheckboxLabel.js +0 -46
  530. package/lib/commonjs/checkbox/createCheckboxLabel.js.map +0 -1
  531. package/lib/commonjs/checkbox/createCheckboxRoot.js +0 -99
  532. package/lib/commonjs/checkbox/createCheckboxRoot.js.map +0 -1
  533. package/lib/commonjs/checkbox/createCheckboxRoot.web.js +0 -95
  534. package/lib/commonjs/checkbox/createCheckboxRoot.web.js.map +0 -1
  535. package/lib/commonjs/chip/createChipRoot.js +0 -132
  536. package/lib/commonjs/chip/createChipRoot.js.map +0 -1
  537. package/lib/commonjs/dialog/createDialogClose.js +0 -37
  538. package/lib/commonjs/dialog/createDialogClose.js.map +0 -1
  539. package/lib/commonjs/dialog/createDialogContent.js +0 -21
  540. package/lib/commonjs/dialog/createDialogContent.js.map +0 -1
  541. package/lib/commonjs/dialog/createDialogDescription.js +0 -30
  542. package/lib/commonjs/dialog/createDialogDescription.js.map +0 -1
  543. package/lib/commonjs/dialog/createDialogFooter.js.map +0 -1
  544. package/lib/commonjs/dialog/createDialogHeader.js +0 -21
  545. package/lib/commonjs/dialog/createDialogHeader.js.map +0 -1
  546. package/lib/commonjs/dialog/createDialogPopup.js.map +0 -1
  547. package/lib/commonjs/dialog/createDialogRoot.js.map +0 -1
  548. package/lib/commonjs/dialog/createDialogTitle.js +0 -21
  549. package/lib/commonjs/dialog/createDialogTitle.js.map +0 -1
  550. package/lib/commonjs/dialog/createDialogTrigger.js +0 -37
  551. package/lib/commonjs/dialog/createDialogTrigger.js.map +0 -1
  552. package/lib/commonjs/field/createFieldError.js +0 -41
  553. package/lib/commonjs/field/createFieldError.js.map +0 -1
  554. package/lib/commonjs/field/createFieldErrorIcon.js +0 -18
  555. package/lib/commonjs/field/createFieldErrorIcon.js.map +0 -1
  556. package/lib/commonjs/field/createFieldErrorText.js +0 -18
  557. package/lib/commonjs/field/createFieldErrorText.js.map +0 -1
  558. package/lib/commonjs/field/createFieldHelper.js +0 -41
  559. package/lib/commonjs/field/createFieldHelper.js.map +0 -1
  560. package/lib/commonjs/field/createFieldHelperText.js +0 -18
  561. package/lib/commonjs/field/createFieldHelperText.js.map +0 -1
  562. package/lib/commonjs/field/createFieldLabel.js +0 -36
  563. package/lib/commonjs/field/createFieldLabel.js.map +0 -1
  564. package/lib/commonjs/field/createFieldRoot.js +0 -35
  565. package/lib/commonjs/field/createFieldRoot.js.map +0 -1
  566. package/lib/commonjs/form/createFormRoot.js +0 -21
  567. package/lib/commonjs/form/createFormRoot.js.map +0 -1
  568. package/lib/commonjs/input/createInputField.js.map +0 -1
  569. package/lib/commonjs/input/createInputRoot.js.map +0 -1
  570. package/lib/commonjs/input/createInputSlot.js +0 -44
  571. package/lib/commonjs/input/createInputSlot.js.map +0 -1
  572. package/lib/commonjs/link/createLink.js.map +0 -1
  573. package/lib/commonjs/list-item/createListItemContent.js +0 -30
  574. package/lib/commonjs/list-item/createListItemContent.js.map +0 -1
  575. package/lib/commonjs/list-item/createListItemDescription.js +0 -25
  576. package/lib/commonjs/list-item/createListItemDescription.js.map +0 -1
  577. package/lib/commonjs/list-item/createListItemLeadingSlot.js +0 -34
  578. package/lib/commonjs/list-item/createListItemLeadingSlot.js.map +0 -1
  579. package/lib/commonjs/list-item/createListItemMeta.js +0 -25
  580. package/lib/commonjs/list-item/createListItemMeta.js.map +0 -1
  581. package/lib/commonjs/list-item/createListItemRoot.js.map +0 -1
  582. package/lib/commonjs/list-item/createListItemSectionHeader.js +0 -54
  583. package/lib/commonjs/list-item/createListItemSectionHeader.js.map +0 -1
  584. package/lib/commonjs/list-item/createListItemTitle.js +0 -25
  585. package/lib/commonjs/list-item/createListItemTitle.js.map +0 -1
  586. package/lib/commonjs/list-item/createListItemTrailingSlot.js +0 -28
  587. package/lib/commonjs/list-item/createListItemTrailingSlot.js.map +0 -1
  588. package/lib/commonjs/otp-input/createOtpInputCell.js +0 -29
  589. package/lib/commonjs/otp-input/createOtpInputCell.js.map +0 -1
  590. package/lib/commonjs/otp-input/createOtpInputField.js.map +0 -1
  591. package/lib/commonjs/otp-input/createOtpInputRoot.js.map +0 -1
  592. package/lib/commonjs/progress/context.js.map +0 -1
  593. package/lib/commonjs/progress/createProgressIndicator.js.map +0 -1
  594. package/lib/commonjs/progress/createProgressRoot.js.map +0 -1
  595. package/lib/commonjs/progress/index.js +0 -25
  596. package/lib/commonjs/progress/index.js.map +0 -1
  597. package/lib/commonjs/radio/createRadioGroup.js.map +0 -1
  598. package/lib/commonjs/radio/createRadioIndicator.js +0 -43
  599. package/lib/commonjs/radio/createRadioIndicator.js.map +0 -1
  600. package/lib/commonjs/radio/createRadioLabel.js +0 -38
  601. package/lib/commonjs/radio/createRadioLabel.js.map +0 -1
  602. package/lib/commonjs/radio/createRadioRoot.js +0 -95
  603. package/lib/commonjs/radio/createRadioRoot.js.map +0 -1
  604. package/lib/commonjs/radio/createRadioRoot.web.js +0 -87
  605. package/lib/commonjs/radio/createRadioRoot.web.js.map +0 -1
  606. package/lib/commonjs/select/createSelectContent.js.map +0 -1
  607. package/lib/commonjs/select/createSelectIcon.js +0 -43
  608. package/lib/commonjs/select/createSelectIcon.js.map +0 -1
  609. package/lib/commonjs/select/createSelectItem.js.map +0 -1
  610. package/lib/commonjs/select/createSelectItemLabel.js +0 -41
  611. package/lib/commonjs/select/createSelectItemLabel.js.map +0 -1
  612. package/lib/commonjs/select/createSelectRoot.js.map +0 -1
  613. package/lib/commonjs/select/createSelectTrigger.js +0 -192
  614. package/lib/commonjs/select/createSelectTrigger.js.map +0 -1
  615. package/lib/commonjs/select/createSelectValue.js +0 -53
  616. package/lib/commonjs/select/createSelectValue.js.map +0 -1
  617. package/lib/commonjs/switch/createSwitchRoot.js +0 -73
  618. package/lib/commonjs/switch/createSwitchRoot.js.map +0 -1
  619. package/lib/commonjs/tile/createTileContent.js +0 -30
  620. package/lib/commonjs/tile/createTileContent.js.map +0 -1
  621. package/lib/commonjs/tile/createTileDescription.js +0 -28
  622. package/lib/commonjs/tile/createTileDescription.js.map +0 -1
  623. package/lib/commonjs/tile/createTileGroup.js.map +0 -1
  624. package/lib/commonjs/tile/createTileIndicator.js +0 -46
  625. package/lib/commonjs/tile/createTileIndicator.js.map +0 -1
  626. package/lib/commonjs/tile/createTileLeadingSlot.js +0 -34
  627. package/lib/commonjs/tile/createTileLeadingSlot.js.map +0 -1
  628. package/lib/commonjs/tile/createTileRoot.js +0 -133
  629. package/lib/commonjs/tile/createTileRoot.js.map +0 -1
  630. package/lib/commonjs/tile/createTileTitle.js +0 -28
  631. package/lib/commonjs/tile/createTileTitle.js.map +0 -1
  632. package/lib/commonjs/tile/createTileTrailingSlot.js +0 -35
  633. package/lib/commonjs/tile/createTileTrailingSlot.js.map +0 -1
  634. package/lib/module/avatar/createAvatarBadge.js +0 -15
  635. package/lib/module/avatar/createAvatarBadge.js.map +0 -1
  636. package/lib/module/avatar/createAvatarIcon.js +0 -25
  637. package/lib/module/avatar/createAvatarIcon.js.map +0 -1
  638. package/lib/module/avatar/createAvatarImage.js +0 -46
  639. package/lib/module/avatar/createAvatarImage.js.map +0 -1
  640. package/lib/module/avatar/createAvatarRoot.js.map +0 -1
  641. package/lib/module/avatar/createAvatarText.js +0 -45
  642. package/lib/module/avatar/createAvatarText.js.map +0 -1
  643. package/lib/module/button/createButtonGroup.js +0 -74
  644. package/lib/module/button/createButtonGroup.js.map +0 -1
  645. package/lib/module/button/createButtonIcon.js +0 -13
  646. package/lib/module/button/createButtonIcon.js.map +0 -1
  647. package/lib/module/button/createButtonRoot.js.map +0 -1
  648. package/lib/module/button/createButtonSpinner.js +0 -29
  649. package/lib/module/button/createButtonSpinner.js.map +0 -1
  650. package/lib/module/button/createButtonText.js +0 -34
  651. package/lib/module/button/createButtonText.js.map +0 -1
  652. package/lib/module/checkbox/createCheckboxGroup.js.map +0 -1
  653. package/lib/module/checkbox/createCheckboxIcon.js +0 -24
  654. package/lib/module/checkbox/createCheckboxIcon.js.map +0 -1
  655. package/lib/module/checkbox/createCheckboxIndicator.js +0 -42
  656. package/lib/module/checkbox/createCheckboxIndicator.js.map +0 -1
  657. package/lib/module/checkbox/createCheckboxLabel.js +0 -41
  658. package/lib/module/checkbox/createCheckboxLabel.js.map +0 -1
  659. package/lib/module/checkbox/createCheckboxRoot.js +0 -94
  660. package/lib/module/checkbox/createCheckboxRoot.js.map +0 -1
  661. package/lib/module/checkbox/createCheckboxRoot.web.js +0 -91
  662. package/lib/module/checkbox/createCheckboxRoot.web.js.map +0 -1
  663. package/lib/module/chip/createChipRoot.js +0 -126
  664. package/lib/module/chip/createChipRoot.js.map +0 -1
  665. package/lib/module/dialog/createDialogClose.js +0 -31
  666. package/lib/module/dialog/createDialogClose.js.map +0 -1
  667. package/lib/module/dialog/createDialogContent.js +0 -15
  668. package/lib/module/dialog/createDialogContent.js.map +0 -1
  669. package/lib/module/dialog/createDialogDescription.js +0 -24
  670. package/lib/module/dialog/createDialogDescription.js.map +0 -1
  671. package/lib/module/dialog/createDialogFooter.js +0 -15
  672. package/lib/module/dialog/createDialogFooter.js.map +0 -1
  673. package/lib/module/dialog/createDialogHeader.js +0 -15
  674. package/lib/module/dialog/createDialogHeader.js.map +0 -1
  675. package/lib/module/dialog/createDialogPopup.js.map +0 -1
  676. package/lib/module/dialog/createDialogRoot.js.map +0 -1
  677. package/lib/module/dialog/createDialogTitle.js +0 -15
  678. package/lib/module/dialog/createDialogTitle.js.map +0 -1
  679. package/lib/module/dialog/createDialogTrigger.js +0 -31
  680. package/lib/module/dialog/createDialogTrigger.js.map +0 -1
  681. package/lib/module/field/createFieldError.js +0 -35
  682. package/lib/module/field/createFieldError.js.map +0 -1
  683. package/lib/module/field/createFieldErrorIcon.js +0 -13
  684. package/lib/module/field/createFieldErrorIcon.js.map +0 -1
  685. package/lib/module/field/createFieldErrorText.js +0 -13
  686. package/lib/module/field/createFieldErrorText.js.map +0 -1
  687. package/lib/module/field/createFieldHelper.js +0 -35
  688. package/lib/module/field/createFieldHelper.js.map +0 -1
  689. package/lib/module/field/createFieldHelperText.js +0 -13
  690. package/lib/module/field/createFieldHelperText.js.map +0 -1
  691. package/lib/module/field/createFieldLabel.js +0 -31
  692. package/lib/module/field/createFieldLabel.js.map +0 -1
  693. package/lib/module/field/createFieldRoot.js +0 -29
  694. package/lib/module/field/createFieldRoot.js.map +0 -1
  695. package/lib/module/form/createFormRoot.js +0 -15
  696. package/lib/module/form/createFormRoot.js.map +0 -1
  697. package/lib/module/input/createInputField.js.map +0 -1
  698. package/lib/module/input/createInputRoot.js.map +0 -1
  699. package/lib/module/input/createInputSlot.js +0 -39
  700. package/lib/module/input/createInputSlot.js.map +0 -1
  701. package/lib/module/link/createLink.js.map +0 -1
  702. package/lib/module/list-item/createListItemContent.js +0 -24
  703. package/lib/module/list-item/createListItemContent.js.map +0 -1
  704. package/lib/module/list-item/createListItemDescription.js +0 -19
  705. package/lib/module/list-item/createListItemDescription.js.map +0 -1
  706. package/lib/module/list-item/createListItemLeadingSlot.js +0 -28
  707. package/lib/module/list-item/createListItemLeadingSlot.js.map +0 -1
  708. package/lib/module/list-item/createListItemMeta.js +0 -19
  709. package/lib/module/list-item/createListItemMeta.js.map +0 -1
  710. package/lib/module/list-item/createListItemRoot.js.map +0 -1
  711. package/lib/module/list-item/createListItemSectionHeader.js +0 -48
  712. package/lib/module/list-item/createListItemSectionHeader.js.map +0 -1
  713. package/lib/module/list-item/createListItemTitle.js +0 -19
  714. package/lib/module/list-item/createListItemTitle.js.map +0 -1
  715. package/lib/module/list-item/createListItemTrailingSlot.js +0 -22
  716. package/lib/module/list-item/createListItemTrailingSlot.js.map +0 -1
  717. package/lib/module/otp-input/createOtpInputCell.js +0 -24
  718. package/lib/module/otp-input/createOtpInputCell.js.map +0 -1
  719. package/lib/module/otp-input/createOtpInputField.js.map +0 -1
  720. package/lib/module/otp-input/createOtpInputRoot.js.map +0 -1
  721. package/lib/module/progress/context.js.map +0 -1
  722. package/lib/module/progress/createProgressIndicator.js.map +0 -1
  723. package/lib/module/progress/createProgressRoot.js.map +0 -1
  724. package/lib/module/progress/index.js +0 -15
  725. package/lib/module/progress/index.js.map +0 -1
  726. package/lib/module/radio/createRadioGroup.js.map +0 -1
  727. package/lib/module/radio/createRadioIndicator.js +0 -38
  728. package/lib/module/radio/createRadioIndicator.js.map +0 -1
  729. package/lib/module/radio/createRadioLabel.js +0 -33
  730. package/lib/module/radio/createRadioLabel.js.map +0 -1
  731. package/lib/module/radio/createRadioRoot.js +0 -90
  732. package/lib/module/radio/createRadioRoot.js.map +0 -1
  733. package/lib/module/radio/createRadioRoot.web.js +0 -82
  734. package/lib/module/radio/createRadioRoot.web.js.map +0 -1
  735. package/lib/module/select/createSelectContent.js.map +0 -1
  736. package/lib/module/select/createSelectIcon.js +0 -38
  737. package/lib/module/select/createSelectIcon.js.map +0 -1
  738. package/lib/module/select/createSelectItem.js.map +0 -1
  739. package/lib/module/select/createSelectItemLabel.js +0 -36
  740. package/lib/module/select/createSelectItemLabel.js.map +0 -1
  741. package/lib/module/select/createSelectRoot.js.map +0 -1
  742. package/lib/module/select/createSelectTrigger.js +0 -187
  743. package/lib/module/select/createSelectTrigger.js.map +0 -1
  744. package/lib/module/select/createSelectValue.js +0 -48
  745. package/lib/module/select/createSelectValue.js.map +0 -1
  746. package/lib/module/switch/createSwitchRoot.js +0 -67
  747. package/lib/module/switch/createSwitchRoot.js.map +0 -1
  748. package/lib/module/tile/createTileContent.js +0 -24
  749. package/lib/module/tile/createTileContent.js.map +0 -1
  750. package/lib/module/tile/createTileDescription.js +0 -22
  751. package/lib/module/tile/createTileDescription.js.map +0 -1
  752. package/lib/module/tile/createTileGroup.js.map +0 -1
  753. package/lib/module/tile/createTileIndicator.js +0 -40
  754. package/lib/module/tile/createTileIndicator.js.map +0 -1
  755. package/lib/module/tile/createTileLeadingSlot.js +0 -28
  756. package/lib/module/tile/createTileLeadingSlot.js.map +0 -1
  757. package/lib/module/tile/createTileRoot.js.map +0 -1
  758. package/lib/module/tile/createTileTitle.js +0 -22
  759. package/lib/module/tile/createTileTitle.js.map +0 -1
  760. package/lib/module/tile/createTileTrailingSlot.js +0 -29
  761. package/lib/module/tile/createTileTrailingSlot.js.map +0 -1
  762. package/lib/typescript/avatar/createAvatarBadge.d.ts +0 -4
  763. package/lib/typescript/avatar/createAvatarBadge.d.ts.map +0 -1
  764. package/lib/typescript/avatar/createAvatarIcon.d.ts +0 -4
  765. package/lib/typescript/avatar/createAvatarIcon.d.ts.map +0 -1
  766. package/lib/typescript/avatar/createAvatarImage.d.ts +0 -4
  767. package/lib/typescript/avatar/createAvatarImage.d.ts.map +0 -1
  768. package/lib/typescript/avatar/createAvatarRoot.d.ts +0 -4
  769. package/lib/typescript/avatar/createAvatarRoot.d.ts.map +0 -1
  770. package/lib/typescript/avatar/createAvatarText.d.ts +0 -4
  771. package/lib/typescript/avatar/createAvatarText.d.ts.map +0 -1
  772. package/lib/typescript/button/createButtonGroup.d.ts +0 -4
  773. package/lib/typescript/button/createButtonGroup.d.ts.map +0 -1
  774. package/lib/typescript/button/createButtonIcon.d.ts +0 -2
  775. package/lib/typescript/button/createButtonIcon.d.ts.map +0 -1
  776. package/lib/typescript/button/createButtonRoot.d.ts +0 -6
  777. package/lib/typescript/button/createButtonRoot.d.ts.map +0 -1
  778. package/lib/typescript/button/createButtonSpinner.d.ts +0 -4
  779. package/lib/typescript/button/createButtonSpinner.d.ts.map +0 -1
  780. package/lib/typescript/button/createButtonText.d.ts +0 -4
  781. package/lib/typescript/button/createButtonText.d.ts.map +0 -1
  782. package/lib/typescript/checkbox/createCheckboxGroup.d.ts +0 -3
  783. package/lib/typescript/checkbox/createCheckboxGroup.d.ts.map +0 -1
  784. package/lib/typescript/checkbox/createCheckboxIcon.d.ts +0 -3
  785. package/lib/typescript/checkbox/createCheckboxIcon.d.ts.map +0 -1
  786. package/lib/typescript/checkbox/createCheckboxIndicator.d.ts +0 -5
  787. package/lib/typescript/checkbox/createCheckboxIndicator.d.ts.map +0 -1
  788. package/lib/typescript/checkbox/createCheckboxLabel.d.ts +0 -5
  789. package/lib/typescript/checkbox/createCheckboxLabel.d.ts.map +0 -1
  790. package/lib/typescript/checkbox/createCheckboxRoot.d.ts +0 -2
  791. package/lib/typescript/checkbox/createCheckboxRoot.d.ts.map +0 -1
  792. package/lib/typescript/checkbox/createCheckboxRoot.web.d.ts +0 -6
  793. package/lib/typescript/checkbox/createCheckboxRoot.web.d.ts.map +0 -1
  794. package/lib/typescript/chip/createChipRoot.d.ts +0 -4
  795. package/lib/typescript/chip/createChipRoot.d.ts.map +0 -1
  796. package/lib/typescript/dialog/createDialogClose.d.ts +0 -4
  797. package/lib/typescript/dialog/createDialogClose.d.ts.map +0 -1
  798. package/lib/typescript/dialog/createDialogContent.d.ts +0 -4
  799. package/lib/typescript/dialog/createDialogContent.d.ts.map +0 -1
  800. package/lib/typescript/dialog/createDialogDescription.d.ts +0 -4
  801. package/lib/typescript/dialog/createDialogDescription.d.ts.map +0 -1
  802. package/lib/typescript/dialog/createDialogFooter.d.ts +0 -4
  803. package/lib/typescript/dialog/createDialogFooter.d.ts.map +0 -1
  804. package/lib/typescript/dialog/createDialogHeader.d.ts +0 -4
  805. package/lib/typescript/dialog/createDialogHeader.d.ts.map +0 -1
  806. package/lib/typescript/dialog/createDialogPopup.d.ts +0 -4
  807. package/lib/typescript/dialog/createDialogPopup.d.ts.map +0 -1
  808. package/lib/typescript/dialog/createDialogRoot.d.ts +0 -4
  809. package/lib/typescript/dialog/createDialogRoot.d.ts.map +0 -1
  810. package/lib/typescript/dialog/createDialogTitle.d.ts +0 -4
  811. package/lib/typescript/dialog/createDialogTitle.d.ts.map +0 -1
  812. package/lib/typescript/dialog/createDialogTrigger.d.ts +0 -4
  813. package/lib/typescript/dialog/createDialogTrigger.d.ts.map +0 -1
  814. package/lib/typescript/field/createFieldError.d.ts +0 -5
  815. package/lib/typescript/field/createFieldError.d.ts.map +0 -1
  816. package/lib/typescript/field/createFieldErrorIcon.d.ts +0 -5
  817. package/lib/typescript/field/createFieldErrorIcon.d.ts.map +0 -1
  818. package/lib/typescript/field/createFieldErrorText.d.ts +0 -5
  819. package/lib/typescript/field/createFieldErrorText.d.ts.map +0 -1
  820. package/lib/typescript/field/createFieldHelper.d.ts +0 -5
  821. package/lib/typescript/field/createFieldHelper.d.ts.map +0 -1
  822. package/lib/typescript/field/createFieldHelperText.d.ts +0 -5
  823. package/lib/typescript/field/createFieldHelperText.d.ts.map +0 -1
  824. package/lib/typescript/field/createFieldLabel.d.ts +0 -6
  825. package/lib/typescript/field/createFieldLabel.d.ts.map +0 -1
  826. package/lib/typescript/field/createFieldRoot.d.ts +0 -6
  827. package/lib/typescript/field/createFieldRoot.d.ts.map +0 -1
  828. package/lib/typescript/form/createFormRoot.d.ts +0 -4
  829. package/lib/typescript/form/createFormRoot.d.ts.map +0 -1
  830. package/lib/typescript/input/createInputField.d.ts +0 -4
  831. package/lib/typescript/input/createInputField.d.ts.map +0 -1
  832. package/lib/typescript/input/createInputRoot.d.ts +0 -4
  833. package/lib/typescript/input/createInputRoot.d.ts.map +0 -1
  834. package/lib/typescript/input/createInputSlot.d.ts +0 -4
  835. package/lib/typescript/input/createInputSlot.d.ts.map +0 -1
  836. package/lib/typescript/link/createLink.d.ts +0 -6
  837. package/lib/typescript/link/createLink.d.ts.map +0 -1
  838. package/lib/typescript/list-item/createListItemContent.d.ts +0 -3
  839. package/lib/typescript/list-item/createListItemContent.d.ts.map +0 -1
  840. package/lib/typescript/list-item/createListItemDescription.d.ts +0 -3
  841. package/lib/typescript/list-item/createListItemDescription.d.ts.map +0 -1
  842. package/lib/typescript/list-item/createListItemLeadingSlot.d.ts +0 -4
  843. package/lib/typescript/list-item/createListItemLeadingSlot.d.ts.map +0 -1
  844. package/lib/typescript/list-item/createListItemMeta.d.ts +0 -3
  845. package/lib/typescript/list-item/createListItemMeta.d.ts.map +0 -1
  846. package/lib/typescript/list-item/createListItemRoot.d.ts +0 -4
  847. package/lib/typescript/list-item/createListItemRoot.d.ts.map +0 -1
  848. package/lib/typescript/list-item/createListItemSectionHeader.d.ts +0 -4
  849. package/lib/typescript/list-item/createListItemSectionHeader.d.ts.map +0 -1
  850. package/lib/typescript/list-item/createListItemTitle.d.ts +0 -3
  851. package/lib/typescript/list-item/createListItemTitle.d.ts.map +0 -1
  852. package/lib/typescript/list-item/createListItemTrailingSlot.d.ts +0 -3
  853. package/lib/typescript/list-item/createListItemTrailingSlot.d.ts.map +0 -1
  854. package/lib/typescript/otp-input/createOtpInputCell.d.ts +0 -4
  855. package/lib/typescript/otp-input/createOtpInputCell.d.ts.map +0 -1
  856. package/lib/typescript/otp-input/createOtpInputField.d.ts +0 -4
  857. package/lib/typescript/otp-input/createOtpInputField.d.ts.map +0 -1
  858. package/lib/typescript/otp-input/createOtpInputRoot.d.ts +0 -4
  859. package/lib/typescript/otp-input/createOtpInputRoot.d.ts.map +0 -1
  860. package/lib/typescript/progress/context.d.ts.map +0 -1
  861. package/lib/typescript/progress/createProgressIndicator.d.ts +0 -3
  862. package/lib/typescript/progress/createProgressIndicator.d.ts.map +0 -1
  863. package/lib/typescript/progress/createProgressRoot.d.ts +0 -4
  864. package/lib/typescript/progress/createProgressRoot.d.ts.map +0 -1
  865. package/lib/typescript/progress/index.d.ts +0 -10
  866. package/lib/typescript/progress/index.d.ts.map +0 -1
  867. package/lib/typescript/progress/types.d.ts.map +0 -1
  868. package/lib/typescript/radio/createRadioGroup.d.ts +0 -3
  869. package/lib/typescript/radio/createRadioGroup.d.ts.map +0 -1
  870. package/lib/typescript/radio/createRadioIndicator.d.ts +0 -5
  871. package/lib/typescript/radio/createRadioIndicator.d.ts.map +0 -1
  872. package/lib/typescript/radio/createRadioLabel.d.ts +0 -5
  873. package/lib/typescript/radio/createRadioLabel.d.ts.map +0 -1
  874. package/lib/typescript/radio/createRadioRoot.d.ts +0 -3
  875. package/lib/typescript/radio/createRadioRoot.d.ts.map +0 -1
  876. package/lib/typescript/radio/createRadioRoot.web.d.ts +0 -3
  877. package/lib/typescript/radio/createRadioRoot.web.d.ts.map +0 -1
  878. package/lib/typescript/select/createSelectContent.d.ts +0 -4
  879. package/lib/typescript/select/createSelectContent.d.ts.map +0 -1
  880. package/lib/typescript/select/createSelectIcon.d.ts +0 -2
  881. package/lib/typescript/select/createSelectIcon.d.ts.map +0 -1
  882. package/lib/typescript/select/createSelectItem.d.ts +0 -6
  883. package/lib/typescript/select/createSelectItem.d.ts.map +0 -1
  884. package/lib/typescript/select/createSelectItemLabel.d.ts +0 -4
  885. package/lib/typescript/select/createSelectItemLabel.d.ts.map +0 -1
  886. package/lib/typescript/select/createSelectRoot.d.ts +0 -4
  887. package/lib/typescript/select/createSelectRoot.d.ts.map +0 -1
  888. package/lib/typescript/select/createSelectTrigger.d.ts +0 -7
  889. package/lib/typescript/select/createSelectTrigger.d.ts.map +0 -1
  890. package/lib/typescript/select/createSelectValue.d.ts +0 -4
  891. package/lib/typescript/select/createSelectValue.d.ts.map +0 -1
  892. package/lib/typescript/switch/createSwitchRoot.d.ts +0 -3
  893. package/lib/typescript/switch/createSwitchRoot.d.ts.map +0 -1
  894. package/lib/typescript/tile/createTileContent.d.ts +0 -3
  895. package/lib/typescript/tile/createTileContent.d.ts.map +0 -1
  896. package/lib/typescript/tile/createTileDescription.d.ts +0 -3
  897. package/lib/typescript/tile/createTileDescription.d.ts.map +0 -1
  898. package/lib/typescript/tile/createTileGroup.d.ts +0 -4
  899. package/lib/typescript/tile/createTileGroup.d.ts.map +0 -1
  900. package/lib/typescript/tile/createTileIndicator.d.ts +0 -4
  901. package/lib/typescript/tile/createTileIndicator.d.ts.map +0 -1
  902. package/lib/typescript/tile/createTileLeadingSlot.d.ts +0 -4
  903. package/lib/typescript/tile/createTileLeadingSlot.d.ts.map +0 -1
  904. package/lib/typescript/tile/createTileRoot.d.ts +0 -4
  905. package/lib/typescript/tile/createTileRoot.d.ts.map +0 -1
  906. package/lib/typescript/tile/createTileTitle.d.ts +0 -3
  907. package/lib/typescript/tile/createTileTitle.d.ts.map +0 -1
  908. package/lib/typescript/tile/createTileTrailingSlot.d.ts +0 -9
  909. package/lib/typescript/tile/createTileTrailingSlot.d.ts.map +0 -1
  910. package/src/avatar/createAvatarBadge.tsx +0 -12
  911. package/src/avatar/createAvatarIcon.tsx +0 -16
  912. package/src/avatar/createAvatarImage.tsx +0 -40
  913. package/src/avatar/createAvatarRoot.tsx +0 -23
  914. package/src/avatar/createAvatarText.tsx +0 -39
  915. package/src/button/createButtonGroup.tsx +0 -88
  916. package/src/button/createButtonIcon.tsx +0 -8
  917. package/src/button/createButtonRoot.tsx +0 -102
  918. package/src/button/createButtonSpinner.tsx +0 -20
  919. package/src/button/createButtonText.tsx +0 -23
  920. package/src/button/index.tsx +0 -53
  921. package/src/checkbox/createCheckboxGroup.tsx +0 -32
  922. package/src/checkbox/createCheckboxIcon.tsx +0 -18
  923. package/src/checkbox/createCheckboxIndicator.tsx +0 -43
  924. package/src/checkbox/createCheckboxLabel.tsx +0 -42
  925. package/src/checkbox/createCheckboxRoot.tsx +0 -100
  926. package/src/checkbox/createCheckboxRoot.web.tsx +0 -83
  927. package/src/chip/createChipRoot.tsx +0 -144
  928. package/src/dialog/createDialogClose.tsx +0 -27
  929. package/src/dialog/createDialogContent.tsx +0 -11
  930. package/src/dialog/createDialogDescription.tsx +0 -20
  931. package/src/dialog/createDialogFooter.tsx +0 -11
  932. package/src/dialog/createDialogHeader.tsx +0 -11
  933. package/src/dialog/createDialogPopup.tsx +0 -146
  934. package/src/dialog/createDialogRoot.tsx +0 -66
  935. package/src/dialog/createDialogTitle.tsx +0 -11
  936. package/src/dialog/createDialogTrigger.tsx +0 -27
  937. package/src/field/createFieldError.tsx +0 -32
  938. package/src/field/createFieldErrorIcon.tsx +0 -9
  939. package/src/field/createFieldErrorText.tsx +0 -9
  940. package/src/field/createFieldHelper.tsx +0 -28
  941. package/src/field/createFieldHelperText.tsx +0 -9
  942. package/src/field/createFieldLabel.tsx +0 -33
  943. package/src/field/createFieldRoot.tsx +0 -27
  944. package/src/form/createFormRoot.tsx +0 -13
  945. package/src/input/createInputField.tsx +0 -120
  946. package/src/input/createInputRoot.tsx +0 -92
  947. package/src/input/createInputSlot.tsx +0 -39
  948. package/src/link/createLink.tsx +0 -89
  949. package/src/list-item/createListItemContent.tsx +0 -23
  950. package/src/list-item/createListItemDescription.tsx +0 -19
  951. package/src/list-item/createListItemLeadingSlot.tsx +0 -30
  952. package/src/list-item/createListItemMeta.tsx +0 -17
  953. package/src/list-item/createListItemRoot.tsx +0 -195
  954. package/src/list-item/createListItemSectionHeader.tsx +0 -53
  955. package/src/list-item/createListItemTitle.tsx +0 -17
  956. package/src/list-item/createListItemTrailingSlot.tsx +0 -21
  957. package/src/otp-input/createOtpInputCell.tsx +0 -22
  958. package/src/otp-input/createOtpInputField.tsx +0 -98
  959. package/src/otp-input/createOtpInputRoot.tsx +0 -179
  960. package/src/otp-input/index.tsx +0 -34
  961. package/src/progress/createProgressIndicator.tsx +0 -35
  962. package/src/progress/index.ts +0 -28
  963. package/src/radio/createRadioIndicator.tsx +0 -32
  964. package/src/radio/createRadioLabel.tsx +0 -28
  965. package/src/radio/createRadioRoot.tsx +0 -100
  966. package/src/radio/createRadioRoot.web.tsx +0 -81
  967. package/src/select/createSelectContent.tsx +0 -115
  968. package/src/select/createSelectIcon.tsx +0 -28
  969. package/src/select/createSelectItem.tsx +0 -121
  970. package/src/select/createSelectItemLabel.tsx +0 -30
  971. package/src/select/createSelectRoot.tsx +0 -134
  972. package/src/select/createSelectTrigger.tsx +0 -241
  973. package/src/select/createSelectValue.tsx +0 -38
  974. package/src/select/index.tsx +0 -73
  975. package/src/switch/createSwitchRoot.tsx +0 -72
  976. package/src/tile/createTileContent.tsx +0 -23
  977. package/src/tile/createTileDescription.tsx +0 -19
  978. package/src/tile/createTileGroup.tsx +0 -134
  979. package/src/tile/createTileIndicator.tsx +0 -38
  980. package/src/tile/createTileLeadingSlot.tsx +0 -30
  981. package/src/tile/createTileTitle.tsx +0 -19
  982. package/src/tile/createTileTrailingSlot.tsx +0 -25
  983. /package/lib/commonjs/{progress → progress-bar}/context.js +0 -0
  984. /package/lib/commonjs/{progress → progress-bar}/types.js +0 -0
  985. /package/lib/module/{progress → progress-bar}/context.js +0 -0
  986. /package/lib/module/{progress → progress-bar}/types.js +0 -0
  987. /package/lib/typescript/{progress → progress-bar}/context.d.ts +0 -0
  988. /package/src/{progress → progress-bar}/context.tsx +0 -0
@@ -1,4 +1,4 @@
1
- import type { PropsWithoutRef, ReactNode, RefAttributes, RefObject } from 'react';
1
+ import type { ReactNode, RefObject } from 'react';
2
2
  import type { PressableProps, ViewProps } from 'react-native';
3
3
  import type { EntryOrExitLayoutType } from 'react-native-reanimated';
4
4
  import type { InteractionState } from '../types';
@@ -83,12 +83,4 @@ export interface SelectContextValue {
83
83
  /** From `Form.Field` via `useFormControl` on the select root (helper/error `aria-describedby`). */
84
84
  ariaDescribedBy?: string;
85
85
  }
86
- export type ISelectComponentType<RootProps, TriggerProps, ValueProps, IconProps, ContentProps, ItemProps, ItemLabelProps, TriggerRef = unknown, ValueRef = unknown> = React.ForwardRefExoticComponent<PropsWithoutRef<RootProps & ISelectProps> & RefAttributes<unknown>> & {
87
- Trigger: React.ForwardRefExoticComponent<PropsWithoutRef<TriggerProps & ISelectTriggerProps> & RefAttributes<TriggerRef>>;
88
- Value: React.ForwardRefExoticComponent<PropsWithoutRef<ValueProps & ISelectValueProps> & RefAttributes<ValueRef>>;
89
- Icon: React.ForwardRefExoticComponent<PropsWithoutRef<IconProps> & RefAttributes<unknown>>;
90
- Content: React.ForwardRefExoticComponent<PropsWithoutRef<ContentProps & ISelectContentProps> & RefAttributes<unknown>>;
91
- Item: React.ForwardRefExoticComponent<PropsWithoutRef<ItemProps & ISelectItemProps> & RefAttributes<unknown>>;
92
- ItemLabel: React.ForwardRefExoticComponent<PropsWithoutRef<ItemLabelProps & ISelectItemLabelProps> & RefAttributes<unknown>>;
93
- };
94
86
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;IAClE,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CA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K,IAAI,CAAC;IACpD,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,mGAAmG;IACnG,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -12,7 +12,7 @@ export interface UseContentFocusOptions {
12
12
  * - Restores focus to the trigger when the overlay closes (web)
13
13
  * - Initializes `activeValue` to the current value or first enabled item
14
14
  *
15
- * Initial focus on open is handled via a ref callback in createSelectContent
15
+ * Initial focus on open is handled via a ref callback in SelectContent
16
16
  * to avoid timing issues with deferred portal rendering.
17
17
  */
18
18
  export declare function useContentFocus({ open, triggerRef, items, value, setActiveValue, }: UseContentFocusOptions): void;
@@ -0,0 +1,77 @@
1
+ import { type ForwardedRef, type RefCallback } from 'react';
2
+ import { type GestureResponderEvent, type PressableProps } from 'react-native';
3
+ import { type Focusable } from '@cdx-ui/utils';
4
+ import type { InteractionState } from '../types';
5
+ export interface UseSelectTriggerOptions {
6
+ asChild?: boolean;
7
+ isHovered?: boolean;
8
+ isActive?: boolean;
9
+ isFocused?: boolean;
10
+ isFocusVisible?: boolean;
11
+ isDisabled?: boolean;
12
+ ariaDescribedBy?: string;
13
+ onPress?: PressableProps['onPress'];
14
+ onPressIn?: PressableProps['onPressIn'];
15
+ onPressOut?: PressableProps['onPressOut'];
16
+ onHoverIn?: PressableProps['onHoverIn'];
17
+ onHoverOut?: PressableProps['onHoverOut'];
18
+ onFocus?: (...args: unknown[]) => unknown;
19
+ onBlur?: (...args: unknown[]) => unknown;
20
+ onKeyDown?: (e: KeyboardEvent) => void;
21
+ }
22
+ export interface SelectTriggerAriaProps {
23
+ role: 'combobox';
24
+ 'aria-label'?: string;
25
+ 'aria-haspopup': 'listbox';
26
+ 'aria-expanded': boolean;
27
+ 'aria-controls': string;
28
+ 'aria-activedescendant'?: string;
29
+ 'aria-required'?: boolean;
30
+ 'aria-invalid'?: boolean;
31
+ 'aria-readonly'?: boolean;
32
+ 'aria-describedby'?: string;
33
+ id: string;
34
+ disabled: boolean;
35
+ }
36
+ export interface SelectTriggerDataAttrValues {
37
+ hover?: boolean;
38
+ focus: boolean;
39
+ active: boolean;
40
+ disabled: boolean;
41
+ focusVisible?: boolean;
42
+ required: boolean;
43
+ invalid: boolean;
44
+ readonly: boolean;
45
+ state: 'open' | 'closed';
46
+ }
47
+ export interface SelectTriggerHandlers {
48
+ onPress: (e: GestureResponderEvent) => void;
49
+ onPressIn: NonNullable<PressableProps['onPressIn']>;
50
+ onPressOut: NonNullable<PressableProps['onPressOut']>;
51
+ onHoverIn: NonNullable<PressableProps['onHoverIn']>;
52
+ onHoverOut: NonNullable<PressableProps['onHoverOut']>;
53
+ onFocus: (...args: unknown[]) => unknown;
54
+ onBlur: (...args: unknown[]) => unknown;
55
+ onKeyDown: (e: KeyboardEvent) => void;
56
+ }
57
+ export interface UseSelectTriggerReturn {
58
+ ariaProps: SelectTriggerAriaProps;
59
+ dataAttrValues: SelectTriggerDataAttrValues;
60
+ interactionState: InteractionState;
61
+ mergedRef: RefCallback<unknown>;
62
+ handlers: SelectTriggerHandlers;
63
+ isLabelActive: boolean;
64
+ open: boolean;
65
+ labelFocusBridge: Focusable;
66
+ }
67
+ /**
68
+ * Shared logic for `Select.Trigger` across native and web. Each platform file is
69
+ * a thin host-element wrapper that spreads this hook's output. The hook composes
70
+ * interaction-state hooks, ARIA props, keyboard intent, press-to-toggle, the
71
+ * merged ref, and (where appropriate) the label-focus bridge.
72
+ *
73
+ * Native variant — Pressable is not natively labelable, so the label-focus
74
+ * bridge is always registered on `field.inputRef`.
75
+ */
76
+ export declare function useSelectTrigger(forwardedRef: ForwardedRef<unknown>, options: UseSelectTriggerOptions): UseSelectTriggerReturn;
77
+ //# sourceMappingURL=useSelectTrigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSelectTrigger.d.ts","sourceRoot":"","sources":["../../../src/select/useSelectTrigger.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,OAAO,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C,OAAO,CAAC,CAAC;IAChC,QAAQ,EAAE,qBAAqB,CAAC;IAChC,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,gBAAgB,EAAE,SAAS,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,YAAY,CAAC,OAAO,CAAC,EACnC,OAAO,EAAE,uBAAuB,GAC/B,sBAAsB,CAmPxB"}
@@ -0,0 +1,16 @@
1
+ import { type ForwardedRef } from 'react';
2
+ import type { SelectTriggerAriaProps, SelectTriggerDataAttrValues, SelectTriggerHandlers, UseSelectTriggerOptions, UseSelectTriggerReturn } from './useSelectTrigger';
3
+ /**
4
+ * Web variant — drops `useHover` and `useFocusRing` per the trigger-prune todo:
5
+ * neither emitted attribute has a consumer in `selectTriggerVariants`, and the
6
+ * web `useHover` re-renders on every pointer enter/leave. Hover is expressed via
7
+ * CSS `:hover` chains in CVA, not a JS tracker.
8
+ *
9
+ * The label-focus bridge is only registered when the host loses native
10
+ * label association — i.e. when `asChild` substitutes the rendered `<button>`
11
+ * with a non-labelable element. Otherwise `<label htmlFor>` handles the focus
12
+ * relationship natively.
13
+ */
14
+ export declare function useSelectTrigger(forwardedRef: ForwardedRef<unknown>, options: UseSelectTriggerOptions): UseSelectTriggerReturn;
15
+ export type { SelectTriggerAriaProps, SelectTriggerDataAttrValues, SelectTriggerHandlers, UseSelectTriggerOptions, UseSelectTriggerReturn, };
16
+ //# sourceMappingURL=useSelectTrigger.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSelectTrigger.web.d.ts","sourceRoot":"","sources":["../../../src/select/useSelectTrigger.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAaf,OAAO,KAAK,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,YAAY,CAAC,OAAO,CAAC,EACnC,OAAO,EAAE,uBAAuB,GAC/B,sBAAsB,CAuNxB;AAED,YAAY,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,GACvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Slot, isTextChildren } from '@rn-primitives/slot';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/slot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,7 +1,3 @@
1
- import type React from 'react';
2
- import type { ISwitchComponentType } from './types';
3
- export type { ISwitchProps, ISwitchComponentType, IInterfaceSwitchProps } from './types';
4
- export declare function createSwitch<T, R = unknown>({ Root, }: {
5
- Root: React.ComponentType<T>;
6
- }): ISwitchComponentType<T, R>;
1
+ export type { ISwitchProps, IInterfaceSwitchProps, IUseSwitchReturn, IUseSwitchState, } from './types';
2
+ export { useSwitch } from './useSwitch';
7
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,YAAY,EAAE,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEzF,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,EAC3C,IAAI,GACL,EAAE;IACD,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAC9B,GAAG,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAK7B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/switch/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -1,4 +1,5 @@
1
- import type React from 'react';
1
+ import type { RefObject } from 'react';
2
+ import type { useHover } from '@react-native-aria/interactions';
2
3
  export interface IInterfaceSwitchProps {
3
4
  /**
4
5
  * Callback invoked when the switch value changes.
@@ -21,18 +22,46 @@ export interface IInterfaceSwitchProps {
21
22
  */
22
23
  disabled?: boolean;
23
24
  /**
24
- * If true, the checkbox will be initially checked.
25
+ * If true, the switch will be initially checked.
25
26
  */
26
27
  defaultValue?: boolean;
27
28
  /**
28
29
  * If true, set the switch to the invalid state.
29
30
  */
30
31
  isInvalid?: boolean;
32
+ }
33
+ export type ISwitchProps = IInterfaceSwitchProps;
34
+ export interface IUseSwitchState {
35
+ /** Resolved checked state (controlled value, falls back to internal toggle state). */
36
+ checked: boolean;
37
+ /** Resolved disabled state (prop, FormControl context, or `disabled` alias). */
38
+ isDisabled: boolean;
39
+ /** Resolved invalid state (prop or FormControl context). */
40
+ isInvalid: boolean;
41
+ /** True while a pointer is hovering the host element (web only). */
42
+ isHovered: boolean;
43
+ /** True when the host element has visible keyboard focus. */
44
+ isFocusVisible: boolean;
45
+ }
46
+ export interface IUseSwitchReturn extends IUseSwitchState {
47
+ /** Toggle the checked state. Pass to the host element's change/press handler. */
48
+ setChecked: (value: boolean) => void;
49
+ /** Hover interaction handlers from `@react-native-aria/interactions`. */
50
+ hoverProps: ReturnType<typeof useHover>['hoverProps'];
31
51
  /**
32
- * If true, the switch will be hovered.
52
+ * Focus-ring interaction handlers from `@react-native-aria/focus`.
53
+ *
54
+ * The native `useFocusRing` declares `focusProps: {}` in its types, but the
55
+ * runtime (and the web variant) emit `onFocus`/`onBlur`, so we widen the
56
+ * shape here for the styled-layer host to wire them safely.
33
57
  */
34
- isHovered?: boolean;
58
+ focusProps: {
59
+ onFocus?: () => void;
60
+ onBlur?: () => void;
61
+ };
62
+ /** Platform-aware `data-*` attributes for interaction state (Standard 1). */
63
+ dataAttrs: Record<string, unknown>;
64
+ /** Ref to attach to the host element so the hover tracker can observe it. */
65
+ hostRef: RefObject<unknown>;
35
66
  }
36
- export type ISwitchComponentType<T, R = unknown> = React.ForwardRefExoticComponent<React.PropsWithoutRef<T & IInterfaceSwitchProps> & React.RefAttributes<R>>;
37
- export type ISwitchProps = IInterfaceSwitchProps;
38
67
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/switch/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,oBAAoB,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,IAAI,KAAK,CAAC,yBAAyB,CAChF,KAAK,CAAC,eAAe,CAAC,CAAC,GAAG,qBAAqB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAC1E,CAAC;AAEF,MAAM,MAAM,YA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KAAE,CAAC;IAC1D,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,6EAA6E;IAC7E,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC7B"}
@@ -0,0 +1,20 @@
1
+ import type { ISwitchProps, IUseSwitchReturn } from './types';
2
+ /**
3
+ * Headless behavioral primitive for `Switch`.
4
+ *
5
+ * Owns the controlled/uncontrolled toggle state, ARIA `role="switch"` semantics
6
+ * (consumers must wire `aria-checked`/`accessibilityRole` to the host element they
7
+ * render), and interaction tracking (hover, focus-visible). Surfaces a
8
+ * platform-aware `dataAttrs` object so the styled layer can emit interaction-state
9
+ * `data-*` attributes (Standard 1) without re-implementing the toggle machinery.
10
+ *
11
+ * Standards mapping (per `.cursor/plans/primitive_design_standards_0d0ca4b1.plan.md`):
12
+ * - Standard 3 #1 — controlled state via `useToggleState`.
13
+ * - Standard 3 #2 — `role="switch"` semantics (consumer wires to host).
14
+ *
15
+ * The styled layer renders the host element (`RNSwitch` on native, a custom
16
+ * `Pressable` + `View` toggle on web) and is the sole owner of className/styling
17
+ * machinery — primitives never carry Uniwind className passthrough.
18
+ */
19
+ export declare function useSwitch(props?: ISwitchProps): IUseSwitchReturn;
20
+ //# sourceMappingURL=useSwitch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSwitch.d.ts","sourceRoot":"","sources":["../../../src/switch/useSwitch.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE9D;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,KAAK,GAAE,YAAiB,GAAG,gBAAgB,CAiDpE"}
@@ -0,0 +1,5 @@
1
+ import { View } from 'react-native';
2
+ import type { ITileGroupProps } from './types';
3
+ export type TileGroupProps = ITileGroupProps;
4
+ export declare const TileGroup: import("react").ForwardRefExoticComponent<ITileGroupProps & import("react").RefAttributes<View>>;
5
+ //# sourceMappingURL=TileGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TileGroup.d.ts","sourceRoot":"","sources":["../../../src/tile/TileGroup.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAIpD,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,SAAS,CAAC;AAiB9D,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC;AAE7C,eAAO,MAAM,SAAS,kGA8GpB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { ITileProps } from './types';
2
+ export interface TileRootProps extends ITileProps {
3
+ }
4
+ export declare const TileRoot: import("react").ForwardRefExoticComponent<TileRootProps & import("react").RefAttributes<import("react-native").View>>;
5
+ //# sourceMappingURL=TileRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TileRoot.d.ts","sourceRoot":"","sources":["../../../src/tile/TileRoot.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAA6B,MAAM,SAAS,CAAC;AAQrE,MAAM,WAAW,aAAc,SAAQ,UAAU;CAAG;AAEpD,eAAO,MAAM,QAAQ,uHAoHpB,CAAC"}
@@ -1,15 +1,5 @@
1
- import type React from 'react';
2
- import type { ITileComponentType } from './types';
3
- export type { ITileComponentType, ITileContentProps, ITileContextValue, ITileDescriptionProps, ITileGroupMultipleProps, ITileGroupProps, ITileGroupSingleProps, ITileGroupContextValue, ITileIndicatorProps, ITileLeadingSlotProps, ITilePressablePassthrough, ITileProps, ITileTitleProps, ITileTrailingSlotProps, TileGroupType, TileGroupValue, } from './types';
1
+ export type { ITileContextValue, ITileGroupMultipleProps, ITileGroupProps, ITileGroupSingleProps, ITileGroupContextValue, ITileIndicatorProps, ITileLeadingSlotProps, ITilePressablePassthrough, ITileProps, ITileTrailingSlotProps, TileGroupType, TileGroupValue, } from './types';
4
2
  export { TileProvider, useTileContext } from './context';
5
- export declare function createTile<Pressable, Leading, Content, Title, Description, Indicator, TrailingSlot, Group>(BaseComponents: {
6
- Pressable: React.ComponentType<Pressable>;
7
- LeadingSlot: React.ComponentType<Leading>;
8
- Content: React.ComponentType<Content>;
9
- Title: React.ComponentType<Title>;
10
- Description: React.ComponentType<Description>;
11
- Indicator: React.ComponentType<Indicator>;
12
- TrailingSlot: React.ComponentType<TrailingSlot>;
13
- Group: React.ComponentType<Group>;
14
- }): ITileComponentType<Pressable, Leading, Content, Title, Description, Indicator, TrailingSlot, Group>;
3
+ export { TileRoot, type TileRootProps } from './TileRoot';
4
+ export { TileGroup, type TileGroupProps } from './TileGroup';
15
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tile/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,aAAa,EACb,cAAc,GACf,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEzD,wBAAgB,UAAU,CACxB,SAAS,EACT,OAAO,EACP,OAAO,EACP,KAAK,EACL,WAAW,EACX,SAAS,EACT,YAAY,EACZ,KAAK,EACL,cAAc,EAAE;IAChB,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAC1C,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1C,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACtC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAClC,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAC9C,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAC1C,YAAY,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAChD,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;CACnC,GA2BO,kBAAkB,CACtB,SAAS,EACT,OAAO,EACP,OAAO,EACP,KAAK,EACL,WAAW,EACX,SAAS,EACT,YAAY,EACZ,KAAK,CACN,CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tile/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,UAAU,EACV,sBAAsB,EACtB,aAAa,EACb,cAAc,GACf,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC"}
@@ -1,9 +1,9 @@
1
- import type { ForwardRefExoticComponent, PropsWithoutRef, ReactNode, RefAttributes } from 'react';
2
- import type { PressableProps, TextProps, ViewProps } from 'react-native';
3
- import type { WithStyleContextProps } from '@cdx-ui/utils';
1
+ import type { PressableProps, ViewProps } from 'react-native';
4
2
  export type TileGroupType = 'single' | 'multiple';
5
3
  export type TileGroupValue = string | string[] | undefined;
6
- interface ITileGroupBaseProps extends ViewProps, WithStyleContextProps {
4
+ interface ITileGroupBaseProps extends ViewProps {
5
+ /** Merge group props onto a single child instead of rendering the default View. */
6
+ asChild?: boolean;
7
7
  /** Disables the whole group. */
8
8
  isDisabled?: boolean;
9
9
  /** Accessible name for the group (radiogroup / group). */
@@ -56,7 +56,9 @@ export interface ITileContextValue {
56
56
  selectionType: TileGroupType;
57
57
  }
58
58
  export type ITilePressablePassthrough = Partial<Pick<PressableProps, 'onPressIn' | 'onPressOut' | 'onHoverIn' | 'onHoverOut'>>;
59
- export interface ITileProps extends PressableProps, ITilePressablePassthrough, WithStyleContextProps {
59
+ export interface ITileProps extends PressableProps, ITilePressablePassthrough {
60
+ /** Merge tile props onto a single child instead of rendering the default Pressable. */
61
+ asChild?: boolean;
60
62
  /**
61
63
  * Identifies this tile within `Tile.Group`. Must be unique within the group.
62
64
  * Standalone tiles still require a value (useful for form submission, analytics, etc.).
@@ -88,9 +90,6 @@ export interface ITileLeadingSlotProps extends ViewProps {
88
90
  */
89
91
  'aria-hidden'?: boolean;
90
92
  }
91
- export type ITileContentProps = ViewProps;
92
- export type ITileTitleProps = TextProps;
93
- export type ITileDescriptionProps = TextProps;
94
93
  export interface ITileIndicatorProps extends ViewProps {
95
94
  /**
96
95
  * Explicit indicator visual. When inside a `Tile.Group`, auto-infers from `type`
@@ -99,21 +98,11 @@ export interface ITileIndicatorProps extends ViewProps {
99
98
  * a radio-style visual is needed.
100
99
  */
101
100
  indicatorType?: 'radio' | 'checkbox';
102
- children?: ReactNode;
103
101
  }
104
102
  /**
105
103
  * Generic trailing content slot. Use for chevrons, amounts, chips, status text — anything that
106
104
  * is **not** the radio/checkbox selection affordance. For that, use `Tile.Indicator`.
107
105
  */
108
106
  export type ITileTrailingSlotProps = ViewProps;
109
- export type ITileComponentType<RootRef, LeadingSlot, Content, Title, Description, Indicator, TrailingSlot, Group> = ForwardRefExoticComponent<RefAttributes<RootRef> & ITileProps> & {
110
- Group: ForwardRefExoticComponent<RefAttributes<Group> & PropsWithoutRef<Group> & ITileGroupProps>;
111
- LeadingSlot: ForwardRefExoticComponent<RefAttributes<LeadingSlot> & PropsWithoutRef<LeadingSlot> & ITileLeadingSlotProps>;
112
- Content: ForwardRefExoticComponent<RefAttributes<Content> & PropsWithoutRef<Content> & ITileContentProps>;
113
- Title: ForwardRefExoticComponent<RefAttributes<Title> & PropsWithoutRef<Title> & ITileTitleProps>;
114
- Description: ForwardRefExoticComponent<RefAttributes<Description> & PropsWithoutRef<Description> & ITileDescriptionProps>;
115
- Indicator: ForwardRefExoticComponent<RefAttributes<Indicator> & PropsWithoutRef<Indicator> & ITileIndicatorProps>;
116
- TrailingSlot: ForwardRefExoticComponent<RefAttributes<TrailingSlot> & PropsWithoutRef<TrailingSlot> & ITileTrailingSlotProps>;
117
- };
118
107
  export {};
119
108
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/tile/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,eAAe,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAClG,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;AAE3D,UAAU,mBAAoB,SAAQ,SAAS,EAAE,qBAAqB;IACpE,gCAAgC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,4DAA4D;IAC5D,IAAI,EAAE,QAAQ,CAAC;IACf,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,CAA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;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD;AAED,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC"}
@@ -4,5 +4,5 @@
4
4
  *
5
5
  * Delegates to `domDataAttributes` so the conversion logic has a single source of truth.
6
6
  */
7
- export { domDataAttributes as dataAttributes } from './domDataAttributes';
7
+ export { domDataAttributes as dataAttributes, mergeDomDataAttributes as mergeDataAttributes, } from './domDataAttributes';
8
8
  //# sourceMappingURL=dataAttributes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataAttributes.d.ts","sourceRoot":"","sources":["../../../src/utils/dataAttributes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,iBAAiB,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"dataAttributes.d.ts","sourceRoot":"","sources":["../../../src/utils/dataAttributes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,iBAAiB,IAAI,cAAc,EACnC,sBAAsB,IAAI,mBAAmB,GAC9C,MAAM,qBAAqB,CAAC"}
@@ -12,5 +12,21 @@ type DataAttributeValue = boolean | string | undefined;
12
12
  export declare function dataAttributes(attrs: Record<string, DataAttributeValue>): {
13
13
  dataSet: Record<string, boolean | string>;
14
14
  };
15
+ /**
16
+ * Merges multiple sources of data attributes into a single `{ dataSet }` prop
17
+ * on web. Each source may be a `dataAttributes()` output (`{ dataSet: {...} }`)
18
+ * or any props object that contains a `dataSet` key — other keys are ignored.
19
+ * Later sources override earlier sources on inner-key conflicts.
20
+ *
21
+ * Required when an element receives data attributes from more than one source:
22
+ * a plain prop spread merges by replacing the `dataSet` key entirely, so e.g.
23
+ * `{...dataAttributes({ slot })} {...dataAttributes({ hover })}` keeps only the
24
+ * second `dataSet`. Use `mergeDataAttributes(...)` to combine them safely.
25
+ */
26
+ export declare function mergeDataAttributes(...sources: ({
27
+ dataSet?: Record<string, unknown>;
28
+ } | Record<string, unknown> | undefined)[]): {
29
+ dataSet: Record<string, unknown>;
30
+ };
15
31
  export {};
16
32
  //# sourceMappingURL=dataAttributes.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataAttributes.web.d.ts","sourceRoot":"","sources":["../../../src/utils/dataAttributes.web.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,KAAK,kBAAkB,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEvD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,GAAG;IACzE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;CAC3C,CAQA"}
1
+ {"version":3,"file":"dataAttributes.web.d.ts","sourceRoot":"","sources":["../../../src/utils/dataAttributes.web.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,KAAK,kBAAkB,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEvD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,GAAG;IACzE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;CAC3C,CAQA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,OAAO,EAAE,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,EAAE,GAC1F;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAStC"}
@@ -12,4 +12,17 @@
12
12
  */
13
13
  export type DomDataAttributeValue = boolean | string | undefined;
14
14
  export declare function domDataAttributes(attrs: Record<string, DomDataAttributeValue>): Record<string, string>;
15
+ /**
16
+ * Merges multiple sources of DOM data attributes into a single flat object of
17
+ * `data-*` keys. Each source can be a `domDataAttributes()` output or any props
18
+ * object — non-`data-*` keys are ignored. Later sources override earlier sources
19
+ * on key conflicts.
20
+ *
21
+ * Use this when an element receives `data-*` attributes from more than one
22
+ * source (e.g. a styled layer's `data-slot` and a primitive's interaction-state
23
+ * `data-hover`/`data-focus` etc.) and a plain prop spread would otherwise be
24
+ * fine on native but lose attributes on web (where `dataAttributes()` returns
25
+ * `{ dataSet }` — see the `.web.ts` sibling for the web merge).
26
+ */
27
+ export declare function mergeDomDataAttributes(...sources: (Record<string, unknown> | undefined)[]): Record<string, string>;
15
28
  //# sourceMappingURL=domDataAttributes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"domDataAttributes.d.ts","sourceRoot":"","sources":["../../../src/utils/domDataAttributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAMjE,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,GAC3C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUxB"}
1
+ {"version":3,"file":"domDataAttributes.d.ts","sourceRoot":"","sources":["../../../src/utils/domDataAttributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAMjE,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,GAC3C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUxB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,OAAO,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,EAAE,GAClD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAexB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdx-ui/primitives",
3
- "version": "0.0.1-beta.65",
3
+ "version": "0.0.1-beta.67",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "module": "lib/module/index.js",
6
6
  "react-native": "src/index.ts",
@@ -60,7 +60,8 @@
60
60
  "@react-stately/checkbox": "3.7.4",
61
61
  "@react-stately/radio": "3.12.0",
62
62
  "@react-stately/toggle": "3.9.4",
63
- "@cdx-ui/utils": "0.0.1-beta.65"
63
+ "@rn-primitives/slot": "1.4.0",
64
+ "@cdx-ui/utils": "0.0.1-beta.67"
64
65
  },
65
66
  "devDependencies": {
66
67
  "@types/react": "*",
package/src/CLAUDE.md CHANGED
@@ -8,25 +8,77 @@ Primitives in `@cdx-ui/primitives` are unstyled behavioral components that handl
8
8
  - `docs/internal/practices/types.md` — `I*Props` convention, extending RN base types
9
9
  - `docs/internal/practices/accessibility.md` — ARIA roles, keyboard nav, screen reader support
10
10
  - `docs/internal/practices/as-child.md` — `asChild` prop pattern
11
+ - `docs/internal/practices/data-attributes.md` — `data-state` and `data-slot` conventions
12
+
13
+ ## Six standards
14
+
15
+ Forge UI primitives and their styled counterparts follow six standards. The first three govern primitive-layer authoring; the last three govern the styled layer (see `packages/components/src/components/CLAUDE.md`).
16
+
17
+ ### Standard 1 — Data attributes for interaction states
18
+
19
+ Root primitives emit `data-*` attributes for the interaction state they own and expose that state via context. Sub-slots **do not** subscribe to context and **do not** emit interaction `data-*` attributes — they opt in only when their own styling or behavior reacts to that state.
20
+
21
+ - **Root** — emits + provides context. Always.
22
+ - **Sub-slot** — does not subscribe, does not emit. Opt in only when the styled layer (or the slot's own behavior) demonstrably reacts to the state.
23
+
24
+ Pointlessly emitting on every sub-slot multiplies bridge writes (native) and DOM attribute writes (web) for no consumer benefit. A sub-slot that calls `useButtonContext()` becomes a subscriber — every interaction re-renders it even when nothing visually changes.
25
+
26
+ `useButtonContext()` stays exported so styled-layer slots and external consumers can opt in when they actually need it.
27
+
28
+ ### Standard 2 — `asChild` support
29
+
30
+ Every public primitive supports `asChild` via `Slot` (re-exported from `packages/primitives/src/slot`). The runtime cost when `asChild` is `false` is a single boolean check; consumers who opt in pay the merge cost themselves.
31
+
32
+ ```tsx
33
+ const Comp = asChild ? Slot : DefaultElement;
34
+ ```
35
+
36
+ ### Standard 3 — When to create a primitive (the primitive-existence test)
37
+
38
+ Create a primitive **only** when the slot owns behavior. A slot earns a primitive if it has at least one of:
39
+
40
+ 1. **Behavioral state machinery** — interaction hooks (`useFocus`, `useFocusRing`, `useHover`, `usePress`), controlled/uncontrolled state, open/closed/checked/value management.
41
+ 2. **Non-host accessibility semantics** — ARIA role/state beyond what the host element provides natively, custom keyboard handling, screen-reader announcements, focus traps.
42
+ 3. **Cross-platform host abstraction** — different host element per platform (e.g., a `.web.tsx` / `.native.tsx` split).
43
+ 4. **Compound contract ownership** — defines the compound's state surface and is the context provider (i.e., the Root).
44
+
45
+ A slot does **not** earn a primitive if it only:
46
+
47
+ - Wraps a host element with `className`/`style`.
48
+ - Reads context for styling (the styled layer reads it directly via `useButtonContext`, `useStyleContext`, etc.).
49
+ - Wants `asChild` (the styled layer uses `Slot` directly — it is re-exported from `@cdx-ui/primitives`).
50
+
51
+ This eliminates the "factory pass-through" anti-pattern (e.g., a `ButtonIcon` primitive whose body is `<View {...props} ref={ref} />`). Such wrappers add nothing and force every consumer through a useless layer.
52
+
53
+ ## Canonical reference
54
+
55
+ `packages/primitives/src/button/ButtonRoot.tsx` is the canonical concrete primitive. It demonstrates every Standard 1–3 requirement: concrete `forwardRef` component over `Pressable`, `asChild` via `Slot`, `dataAttributes()` for interaction state, `ButtonProvider` for context, function-as-children, ARIA defaults, and composed event handlers.
56
+
57
+ `packages/primitives/src/button/` only ships `ButtonRoot` + `useButtonContext` + types. There is intentionally no `ButtonLabel`/`ButtonIcon`/`ButtonSpinner`/`ButtonGroup` primitive — those slots fail the primitive-existence test, so they live in `@cdx-ui/components` only.
58
+
59
+ The styled-layer glyph inside `packages/components/src/components/IconButton/index.tsx` is the canonical example of a sub-slot that legitimately opts into interaction state. When (and only when) its own styling reacts to hover/focus/press, it reads `useButtonContext()` and emits `data-*` via `dataAttributes()` — the same pattern external consumers use.
11
60
 
12
61
  ## Pattern summary
13
62
 
14
- Each primitive follows the factory function pattern (see `createButtonRoot.tsx` as the canonical example):
63
+ Each concrete primitive is a `forwardRef` component that hardcodes its default RN base element and supports `asChild` via `Slot`:
15
64
 
16
- 1. **Factory function** — `export const createComponentPart = <T,>(BaseComponent: ComponentType<T>) => forwardRef(...)` accepts a host element type, returns a wrapped component with behavior
65
+ 1. **Concrete component** — `export const ComponentRoot = forwardRef<View, Props>(...)` hardcodes `View`/`Pressable`/`Text` as the default; uses `const Comp = asChild ? Slot : View` for the escape hatch
17
66
  2. **Interaction hooks** — `useFocus`, `useFocusRing`, `useHover`, `usePress` from `@react-native-aria/*`
18
67
  3. **Data attributes** — `dataAttributes({ hover, focus, active, disabled, focusVisible })` emitted on the rendered element for Uniwind `data-[state]` selectors
19
- 4. **Context provider** — interaction state exposed via context so child primitives can react to parent state
20
- 5. **Barrel export** — `index.tsx` re-exports the factory, context, and types
68
+ 4. **Context provider** — interaction state exposed via context so sub-slots and external consumers can opt in
69
+ 5. **Barrel export** — `index.ts` re-exports the concrete components, context, and types
70
+ 6. **`displayName`** — set on every exported component
21
71
 
22
72
  ## Key rules
23
73
 
24
74
  - **Unstyled** — no visual styling (no `className`, no color/spacing classes). Only behavioral and a11y concerns.
25
- - **`I*Props` convention**public prop types are aliased with `I` prefix (e.g., `IButtonProps`, `ICheckboxProps`), exported from `types.ts`
26
- - **`Interface*Props` pattern** — the full interface (e.g., `InterfaceButtonProps`, `InterfaceCheckbox`) extends the appropriate RN base type (`PressableProps`, `ViewProps`, etc.) with interaction state booleans (`isHovered`, `isActive`, `isFocused`, `isFocusVisible`, `isDisabled`); re-exported as `I*Props` (e.g., `export type IButtonProps = InterfaceButtonProps`)
27
- - **`dataAttributes()` helper** — always use the helper from `../utils/dataAttributes` to emit `data-*` props; it handles platform differences (native vs web)
28
- - **`composeEventHandlers`** from `@cdx-ui/utils` merge consumer handlers with internal handlers; never silently override
29
- - **`forwardRef`** on every component refs forwarded to the underlying host element
30
- - **ARIA roles**set `role` with a sensible default (e.g., `role={props?.role || 'button'}`)
31
- - **Render children as function**support `children` as `(state: InteractionState) => ReactNode` for state-driven rendering
32
- - **Consumable independently** of `@cdx-ui/components` no imports from the styled layer
75
+ - **`asChild` via `Slot`** import `Slot` from `../slot`; use `const Comp = asChild ? Slot : DefaultElement`.
76
+ - **`I*Props` convention** — public prop types are aliased with `I` prefix (e.g., `IButtonProps`), exported from `types.ts`.
77
+ - **`Interface*Props` pattern** — the full interface (e.g., `InterfaceButtonProps`) extends the appropriate RN base type (`PressableProps`, `ViewProps`, etc.) with interaction state booleans (`isHovered`, `isActive`, `isFocused`, `isFocusVisible`, `isDisabled`); re-exported as `I*Props`.
78
+ - **`dataAttributes()` helper** — always use the helper from `../utils/dataAttributes` to emit `data-*` props; it handles platform differences (native vs web).
79
+ - **`mergeDataAttributes(...sources)` helper** — when a primitive Root receives data attrs through `props` from its styled layer (e.g. `data-slot`) AND emits its own data attrs (e.g. interaction state), combine them via `mergeDataAttributes(props, dataAttributes({...}))`. A plain `{...dataAttributes({...})} {...props}` spread chain wipes out one side on web`dataAttributes` returns `{ dataSet }`, so back-to-back spreads replace each other. The merge helper preserves both. `ButtonRoot.tsx` shows the canonical pattern.
80
+ - **`composeEventHandlers`** from `@cdx-ui/utils` merge consumer handlers with internal handlers; never silently override.
81
+ - **`forwardRef`** on every componentrefs forwarded to the underlying host element.
82
+ - **ARIA roles** set `role` with a sensible default (e.g., `role={props?.role || 'button'}`).
83
+ - **Render children as function** — support `children` as `(state: InteractionState) => ReactNode` for state-driven rendering where the Root exposes interaction state.
84
+ - **Consumable independently** of `@cdx-ui/components` — no imports from the styled layer.