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

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
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Unstyled, accessible behavioral components (headless) for the Forge Design System.
4
4
 
5
- Primitives provide interaction logic, focus management, and accessibility without imposing any visual styling. They serve as the foundation for [`@cdx-ui/components`](../components/).
5
+ Primitives provide interaction logic, focus management, and accessibility without imposing any visual styling. They serve as the foundation for `@cdx-ui/components`.
6
6
 
7
7
  ## Installation
8
8
 
@@ -17,28 +17,28 @@ pnpm add @cdx-ui/primitives
17
17
  - `react-native-reanimated` >= 3.0.0
18
18
  - `react-native-web` >= 0.19.0 _(optional)_
19
19
 
20
- ## Factory functions
21
-
22
- Each `create*` factory accepts a map of base React Native components and returns a compound component with built-in interaction state tracking, accessibility (roles, ARIA props, keyboard handling), and context propagation.
23
-
24
- | Factory | Returns |
25
- | ---------------- | ------------------------------------------------------------------------------------------------------- |
26
- | `createButton` | `Button` + `.Text` `.Group` `.Spinner` `.Icon` |
27
- | `createChip` | `Chip` (root onlypressable / `asChild` behavior; sub-components live in `@cdx-ui/components`) |
28
- | `createInput` | `Input` + `.Slot` `.Field` |
29
- | `createSelect` | `Select` + `.Trigger` `.Value` `.Icon` `.Content` `.Item` `.ItemLabel` |
30
- | `createCheckbox` | `Checkbox` + `.Indicator` `.Icon` `.Label` `.Group` |
31
- | `createRadio` | `Radio` + `.Indicator` `.Label` `.Group` |
32
- | `createSwitch` | `Switch` |
33
- | `createLink` | `Link` |
34
- | `createAvatar` | `Avatar` + `.Image` `.Text` `.Icon` `.Badge` |
35
- | `createDialog` | `Dialog` + `.Root` `.Trigger` `.Popup` `.Header` `.Title` `.Description` `.Content` `.Footer` `.Close` |
36
- | `createField` | `Field` + `.Label` `.Helper` `.HelperText` `.Error` `.ErrorText` `.ErrorIcon` |
37
- | `createForm` | `Form` |
38
- | `createListItem` | `ListItem` + `.LeadingSlot` `.Content` `.Title` `.Description` `.Meta` `.TrailingSlot` `.SectionHeader` |
39
- | `createOtpInput` | `OtpInput` + `.Cell` `.Field` |
40
- | `createProgress` | `Progress` + `.Indicator` |
41
- | `createTile` | `Tile` + `.Group` `.LeadingSlot` `.Content` `.Title` `.Description` `.Indicator` `.TrailingSlot` |
20
+ ## Primitives
21
+
22
+ Concrete behavioral components with built-in interaction state tracking, accessibility (roles, ARIA props, keyboard handling), and context propagation. Each primitive owns behavior that the styled layer (`@cdx-ui/components`) cannot express with host elements alone.
23
+
24
+ | Export | Description |
25
+ | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
26
+ | `AvatarRoot` | Concrete root primitive (context provider for image load state; Image/Text/Icon/Badge live in `@cdx-ui/components`) |
27
+ | `ButtonRoot` | Concrete root primitive (no sub-slots Label/Icon/Spinner/Group live in `@cdx-ui/components`) |
28
+ | `CheckboxRoot`, `CheckboxGroup` | Concrete checkbox primitives (Root owns controlled state + ARIA + `.web` split; Group owns group context. Indicator/Icon/Label live in `@cdx-ui/components`) |
29
+ | `ChipRoot` | Concrete root primitive (View/Pressable union with interaction state + context; Label/Icon/Avatar live in `@cdx-ui/components`) |
30
+ | `DialogRoot`, `DialogTrigger`, `DialogPopup`, `DialogClose` | Concrete dialog primitives (Root owns open state + context; Trigger/Close use `Slot` for `asChild`; Popup owns portal/focus-scope. Header/Title/Description/Content/Footer live in `@cdx-ui/components`) |
31
+ | `FieldRoot`, `FieldLabel` | Concrete field primitives (Root provides `FormControlContext`; Label is platform-split: `Text` + focus-bridge on native, `<label htmlFor>` on web; Helper/Error/ErrorIcon live in `@cdx-ui/components`) |
32
+ | `FormRoot` | Concrete form primitive (platform-split: `<form>` on web, `View` on native) |
33
+ | `InputRoot`, `InputField` | Concrete input primitives (Root owns input context; Field is platform-split: `.tsx`/`.web.tsx`/`.android.tsx`. Slot lives in `@cdx-ui/components`) |
34
+ | `LinkRoot` | Concrete link primitive (`useLink` press behavior + ARIA + cross-platform routing) |
35
+ | `ListItemRoot` | Concrete root primitive (View/Pressable union with bespoke `asChild` merging interaction state + context; LeadingSlot/Content/Title/Description/Meta/TrailingSlot/SectionHeader live in `@cdx-ui/components`) |
36
+ | `useOtpInput`, `OtpInputField` | Headless hook for OTP state machine + concrete per-cell TextInput primitive (focus management, a11y, autofill; styled layer composes `Input`/`HStack` on top) |
37
+ | `ProgressBarRoot`, `ProgressBarIndicator` | Concrete progress primitives (Root owns percent context; Indicator maps percent to width) |
38
+ | `RadioRoot`, `RadioGroup` | Concrete radio primitives (Root owns interaction + checked state + `.web` split; Group owns selection contract + group context. Indicator/Label live in `@cdx-ui/components`) |
39
+ | `SelectRoot`, `SelectTrigger`, `SelectContent`, `SelectItem` | Concrete select primitives (Root owns controlled value/open state; Trigger is platform-split; Content owns FocusScope + keyboard nav; Item owns selection state. Value/Icon/ItemLabel live in `@cdx-ui/components`) |
40
+ | `useSwitch` | Headless hook for `Switch` (controlled state + ARIA + interaction tracking; styled layer renders the host element) |
41
+ | `TileRoot`, `TileGroup` | Concrete tile primitives (Root owns interaction + selection state + per-tile context; Group owns selection contract + group context. LeadingSlot/Content/Title/Description/Indicator/TrailingSlot live in `@cdx-ui/components`) |
42
42
 
43
43
  ### Utility exports
44
44
 
@@ -52,7 +52,7 @@ Each `create*` factory accepts a map of base React Native components and returns
52
52
 
53
53
  ### OTP input utilities
54
54
 
55
- Standalone helper functions re-exported from the `createOtpInput` module for custom OTP input implementations:
55
+ Standalone helper functions re-exported from the otp-input module for custom OTP input implementations:
56
56
 
57
57
  | Export | Description |
58
58
  | ---------------------------------------------- | ---------------------------------------------------------------------------- |
@@ -65,15 +65,14 @@ Standalone helper functions re-exported from the `createOtpInput` module for cus
65
65
 
66
66
  Several modules export context providers and hooks for reading component state from descendant sub-components or for integrating with external systems (e.g., routing).
67
67
 
68
- | Module | Provider(s) | Hook(s) | Context value type(s) |
69
- | --------- | ----------------------------------------- | -------------------------------------- | --------------------------------------------- |
70
- | dialog | `DialogProvider` | `useDialog` | `IDialogContextType` |
71
- | link | `LinkProvider`, `LinkInteractionProvider` | `useLink`, `useLinkInteractionContext` | `LinkConfig`, `LinkInteractionState` |
72
- | tile | `TileProvider` | `useTileContext` | `ITileContextValue`, `ITileGroupContextValue` |
73
- | list-item | `ListItemProvider` | `useListItemContext` | `IListItemContextValue` |
74
- | button | — | `useButtonContext` | |
75
- | progress | — | `useProgressContext` | `ProgressContextValue` |
76
-
77
- ## Further reading
78
-
79
- - [Definitions](../../docs/internal/practices/definitions.md) — artifact taxonomy (primitive vs component vs utility)
68
+ | Module | Provider(s) | Hook(s) | Context value type(s) |
69
+ | --------- | ------------------------------------------ | ---------------------------------------------- | ------------------------------------------------------- |
70
+ | dialog | `DialogProvider` | `useDialog` | `IDialogContextType` |
71
+ | link | `LinkProvider`, `LinkInteractionProvider` | `useLink`, `useLinkInteractionContext` | `LinkConfig`, `LinkInteractionState` |
72
+ | tile | `TileProvider` | `useTileContext` | `ITileContextValue`, `ITileGroupContextValue` |
73
+ | list-item | `ListItemProvider` | `useListItemContext` | `InteractionState` |
74
+ | button | — | `useButtonContext` | `InteractionState` |
75
+ | chip | — | `useChipContext` | `InteractionState` |
76
+ | otp-input | `OtpInputProvider`, `OtpCellIndexProvider` | `useOtpInputContext`, `useOtpCellIndexContext` | `OtpInputContextValue`, `OtpInputCellIndexContextValue` |
77
+ | progress | — | `useProgressContext` | `ProgressContextValue` |
78
+ | radio | `RadioProvider` | `useRadioContext` | `IRadioContextValue` |
@@ -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.
@@ -3,11 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createAvatarRoot = void 0;
6
+ exports.AvatarRoot = void 0;
7
7
  var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _slot = require("../slot");
8
10
  var _context = require("./context");
9
11
  var _jsxRuntime = require("react/jsx-runtime");
10
- const createAvatarRoot = BaseAvatar => /*#__PURE__*/(0, _react.forwardRef)(({
12
+ const AvatarRoot = exports.AvatarRoot = /*#__PURE__*/(0, _react.forwardRef)(({
13
+ asChild,
11
14
  children,
12
15
  ...props
13
16
  }, ref) => {
@@ -19,16 +22,17 @@ const createAvatarRoot = BaseAvatar => /*#__PURE__*/(0, _react.forwardRef)(({
19
22
  setImageLoaded,
20
23
  setImageError
21
24
  }), [imageLoaded, imageError]);
25
+ const Comp = asChild ? _slot.Slot : _reactNative.View;
22
26
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.AvatarProvider, {
23
27
  value: contextValue,
24
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(BaseAvatar, {
28
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, {
25
29
  ref: ref,
26
- role: "img",
30
+ role: props.role || 'img',
27
31
  accessibilityRole: "image",
28
32
  ...props,
29
33
  children: children
30
34
  })
31
35
  });
32
36
  });
33
- exports.createAvatarRoot = createAvatarRoot;
34
- //# sourceMappingURL=createAvatarRoot.js.map
37
+ AvatarRoot.displayName = 'AvatarRoot';
38
+ //# sourceMappingURL=AvatarRoot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_slot","_context","_jsxRuntime","AvatarRoot","exports","forwardRef","asChild","children","props","ref","imageLoaded","setImageLoaded","useState","imageError","setImageError","contextValue","useMemo","Comp","Slot","View","jsx","AvatarProvider","value","role","accessibilityRole","displayName"],"sourceRoot":"../../../src","sources":["avatar/AvatarRoot.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAA2C,IAAAI,WAAA,GAAAJ,OAAA;AAOpC,MAAMK,UAAU,GAAAC,OAAA,CAAAD,UAAA,gBAAG,IAAAE,iBAAU,EAClC,CAAC;EAAEC,OAAO;EAAEC,QAAQ;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACxC,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EACrD,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG,IAAAF,eAAQ,EAAC,KAAK,CAAC;EAEnD,MAAMG,YAAY,GAAG,IAAAC,cAAO,EAC1B,OAAO;IAAEN,WAAW;IAAEG,UAAU;IAAEF,cAAc;IAAEG;EAAc,CAAC,CAAC,EAClE,CAACJ,WAAW,EAAEG,UAAU,CAC1B,CAAC;EAED,MAAMI,IAAI,GAAGX,OAAO,GAAGY,UAAI,GAAGC,iBAAI;EAElC,oBACE,IAAAjB,WAAA,CAAAkB,GAAA,EAACnB,QAAA,CAAAoB,cAAc;IAACC,KAAK,EAAEP,YAAa;IAAAR,QAAA,eAClC,IAAAL,WAAA,CAAAkB,GAAA,EAACH,IAAI;MACHR,GAAG,EAAEA,GAAI;MACTc,IAAI,EAAEf,KAAK,CAACe,IAAI,IAAI,KAAM;MAC1BC,iBAAiB,EAAC,OAAO;MAAA,GACpBhB,KAAK;MAAAD,QAAA,EAETA;IAAQ,CACL;EAAC,CACO,CAAC;AAErB,CACF,CAAC;AAEDJ,UAAU,CAACsB,WAAW,GAAG,YAAY","ignoreList":[]}
@@ -3,28 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createAvatar = createAvatar;
7
- var _createAvatarBadge = require("./createAvatarBadge");
8
- var _createAvatarIcon = require("./createAvatarIcon");
9
- var _createAvatarText = require("./createAvatarText");
10
- var _createAvatarImage = require("./createAvatarImage");
11
- var _createAvatarRoot = require("./createAvatarRoot");
12
- function createAvatar(BaseComponents) {
13
- const Avatar = (0, _createAvatarRoot.createAvatarRoot)(BaseComponents.Root);
14
- const AvatarImage = (0, _createAvatarImage.createAvatarImage)(BaseComponents.Image);
15
- const Text = (0, _createAvatarText.createAvatarText)(BaseComponents.Text);
16
- const AvatarIcon = (0, _createAvatarIcon.createAvatarIcon)(BaseComponents.Icon);
17
- const Badge = (0, _createAvatarBadge.createAvatarBadge)(BaseComponents.Badge);
18
- Avatar.displayName = 'AvatarPrimitive';
19
- AvatarImage.displayName = 'AvatarPrimitive.Image';
20
- Text.displayName = 'AvatarPrimitive.Text';
21
- AvatarIcon.displayName = 'AvatarPrimitive.Icon';
22
- Badge.displayName = 'AvatarPrimitive.Badge';
23
- return Object.assign(Avatar, {
24
- Image: AvatarImage,
25
- Text,
26
- Icon: AvatarIcon,
27
- Badge
28
- });
29
- }
6
+ Object.defineProperty(exports, "AvatarRoot", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _AvatarRoot.AvatarRoot;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "useAvatarContext", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _context.useAvatarContext;
16
+ }
17
+ });
18
+ var _context = require("./context");
19
+ var _AvatarRoot = require("./AvatarRoot");
30
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_createAvatarBadge","require","_createAvatarIcon","_createAvatarText","_createAvatarImage","_createAvatarRoot","createAvatar","BaseComponents","Avatar","createAvatarRoot","Root","AvatarImage","createAvatarImage","Image","Text","createAvatarText","AvatarIcon","createAvatarIcon","Icon","Badge","createAvatarBadge","displayName","Object","assign"],"sourceRoot":"../../../src","sources":["avatar/index.ts"],"mappings":";;;;;;AACA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAYO,SAASK,YAAYA,CAAiCC,cAM5D,EAAE;EACD,MAAMC,MAAM,GAAG,IAAAC,kCAAgB,EAACF,cAAc,CAACG,IAAI,CAAC;EACpD,MAAMC,WAAW,GAAG,IAAAC,oCAAiB,EAACL,cAAc,CAACM,KAAK,CAAC;EAC3D,MAAMC,IAAI,GAAG,IAAAC,kCAAgB,EAACR,cAAc,CAACO,IAAI,CAAC;EAClD,MAAME,UAAU,GAAG,IAAAC,kCAAgB,EAACV,cAAc,CAACW,IAAI,CAAC;EACxD,MAAMC,KAAK,GAAG,IAAAC,oCAAiB,EAACb,cAAc,CAACY,KAAK,CAAC;EAErDX,MAAM,CAACa,WAAW,GAAG,iBAAiB;EACtCV,WAAW,CAACU,WAAW,GAAG,uBAAuB;EACjDP,IAAI,CAACO,WAAW,GAAG,sBAAsB;EACzCL,UAAU,CAACK,WAAW,GAAG,sBAAsB;EAC/CF,KAAK,CAACE,WAAW,GAAG,uBAAuB;EAE3C,OAAOC,MAAM,CAACC,MAAM,CAACf,MAAM,EAAE;IAC3BK,KAAK,EAAEF,WAAW;IAClBG,IAAI;IACJI,IAAI,EAAEF,UAAU;IAChBG;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["_context","require","_AvatarRoot"],"sourceRoot":"../../../src","sources":["avatar/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA","ignoreList":[]}
@@ -3,15 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createButtonRoot = void 0;
6
+ exports.ButtonRoot = void 0;
7
7
  var _react = require("react");
8
+ var _reactNative = require("react-native");
8
9
  var _utils = require("@cdx-ui/utils");
9
10
  var _focus = require("@react-native-aria/focus");
10
11
  var _interactions = require("@react-native-aria/interactions");
12
+ var _slot = require("../slot");
11
13
  var _dataAttributes = require("../utils/dataAttributes");
12
14
  var _context = require("./context");
13
15
  var _jsxRuntime = require("react/jsx-runtime");
14
- const createButtonRoot = BaseButton => /*#__PURE__*/(0, _react.forwardRef)(({
16
+ const ButtonRoot = exports.ButtonRoot = /*#__PURE__*/(0, _react.forwardRef)(({
17
+ asChild,
15
18
  children,
16
19
  isDisabled,
17
20
  isHovered: isHoveredProp,
@@ -47,20 +50,21 @@ const createButtonRoot = BaseButton => /*#__PURE__*/(0, _react.forwardRef)(({
47
50
  focusVisible: isFocusVisibleProp || isFocusVisible
48
51
  };
49
52
  }, [isHovered, isHoveredProp, isFocused, isFocusedProp, isActive, isActiveProp, isDisabled, isFocusVisible, isFocusVisibleProp]);
53
+ const Comp = asChild ? _slot.Slot : _reactNative.Pressable;
50
54
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.ButtonProvider, {
51
55
  value: contextValue,
52
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(BaseButton, {
56
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, {
53
57
  ref: ref,
54
58
  role: props?.role || 'button',
55
- ...(0, _dataAttributes.dataAttributes)({
59
+ disabled: isDisabled,
60
+ ...props,
61
+ ...(0, _dataAttributes.mergeDataAttributes)(props, (0, _dataAttributes.dataAttributes)({
56
62
  hover: isHoveredProp || isHovered,
57
63
  focus: isFocusedProp || isFocused,
58
64
  active: isActiveProp || isActive,
59
65
  disabled: !!isDisabled,
60
66
  focusVisible: isFocusVisibleProp || isFocusVisible
61
- }),
62
- disabled: isDisabled,
63
- ...props,
67
+ })),
64
68
  onPressIn: (0, _utils.composeEventHandlers)(props?.onPressIn, pressableProps.onPressIn),
65
69
  onPressOut: (0, _utils.composeEventHandlers)(props?.onPressOut, pressableProps.onPressOut),
66
70
  onHoverIn: (0, _utils.composeEventHandlers)(props?.onHoverIn, hoverProps.onHoverIn),
@@ -77,5 +81,5 @@ const createButtonRoot = BaseButton => /*#__PURE__*/(0, _react.forwardRef)(({
77
81
  })
78
82
  });
79
83
  });
80
- exports.createButtonRoot = createButtonRoot;
81
- //# sourceMappingURL=createButtonRoot.js.map
84
+ ButtonRoot.displayName = 'ButtonRoot';
85
+ //# sourceMappingURL=ButtonRoot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_utils","_focus","_interactions","_slot","_dataAttributes","_context","_jsxRuntime","ButtonRoot","exports","forwardRef","asChild","children","isDisabled","isHovered","isHoveredProp","isActive","isActiveProp","isFocused","isFocusedProp","isFocusVisible","isFocusVisibleProp","props","ref","focusProps","useFocus","focusRingProps","useFocusRing","pressProps","pressableProps","isPressed","usePress","hoverProps","useHover","contextValue","useMemo","hover","focus","active","disabled","focusVisible","Comp","Slot","Pressable","jsx","ButtonProvider","value","role","mergeDataAttributes","dataAttributes","onPressIn","composeEventHandlers","onPressOut","onHoverIn","onHoverOut","onFocus","onBlur","displayName"],"sourceRoot":"../../../src","sources":["button/ButtonRoot.tsx"],"mappings":"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","ignoreList":[]}
@@ -3,35 +3,18 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createButton = createButton;
6
+ Object.defineProperty(exports, "ButtonRoot", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _ButtonRoot.ButtonRoot;
10
+ }
11
+ });
7
12
  Object.defineProperty(exports, "useButtonContext", {
8
13
  enumerable: true,
9
14
  get: function () {
10
15
  return _context.useButtonContext;
11
16
  }
12
17
  });
13
- var _createButtonGroup = require("./createButtonGroup");
14
- var _createButtonIcon = require("./createButtonIcon");
15
- var _createButtonRoot = require("./createButtonRoot");
16
- var _createButtonSpinner = require("./createButtonSpinner");
17
- var _createButtonText = require("./createButtonText");
18
18
  var _context = require("./context");
19
- function createButton(BaseComponents) {
20
- const Button = (0, _createButtonRoot.createButtonRoot)(BaseComponents.Root);
21
- const Text = (0, _createButtonText.createButtonText)(BaseComponents.Text);
22
- const Group = (0, _createButtonGroup.createButtonGroup)(BaseComponents.Group);
23
- const Spinner = (0, _createButtonSpinner.createButtonSpinner)(BaseComponents.Spinner);
24
- const Icon = (0, _createButtonIcon.createButtonIcon)(BaseComponents.Icon);
25
- Button.displayName = 'ButtonPrimitive';
26
- Text.displayName = 'ButtonPrimitive.Text';
27
- Group.displayName = 'ButtonPrimitive.Group';
28
- Spinner.displayName = 'ButtonPrimitive.Spinner';
29
- Icon.displayName = 'ButtonPrimitive.Icon';
30
- return Object.assign(Button, {
31
- Text,
32
- Group,
33
- Spinner,
34
- Icon
35
- });
36
- }
19
+ var _ButtonRoot = require("./ButtonRoot");
37
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_createButtonGroup","require","_createButtonIcon","_createButtonRoot","_createButtonSpinner","_createButtonText","_context","createButton","BaseComponents","Button","createButtonRoot","Root","Text","createButtonText","Group","createButtonGroup","Spinner","createButtonSpinner","Icon","createButtonIcon","displayName","Object","assign"],"sourceRoot":"../../../src","sources":["button/index.tsx"],"mappings":";;;;;;;;;;;;AACA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAIA,IAAAK,QAAA,GAAAL,OAAA;AAEO,SAASM,YAAYA,CAQ1BC,cAMD,EAAE;EACD,MAAMC,MAAM,GAAG,IAAAC,kCAAgB,EAACF,cAAc,CAACG,IAAI,CAAC;EACpD,MAAMC,IAAI,GAAG,IAAAC,kCAAgB,EAACL,cAAc,CAACI,IAAI,CAAC;EAClD,MAAME,KAAK,GAAG,IAAAC,oCAAiB,EAACP,cAAc,CAACM,KAAK,CAAC;EACrD,MAAME,OAAO,GAAG,IAAAC,wCAAmB,EAACT,cAAc,CAACQ,OAAO,CAAC;EAC3D,MAAME,IAAI,GAAG,IAAAC,kCAAgB,EAACX,cAAc,CAACU,IAAI,CAAC;EAElDT,MAAM,CAACW,WAAW,GAAG,iBAAiB;EACtCR,IAAI,CAACQ,WAAW,GAAG,sBAAsB;EACzCN,KAAK,CAACM,WAAW,GAAG,uBAAuB;EAC3CJ,OAAO,CAACI,WAAW,GAAG,yBAAyB;EAC/CF,IAAI,CAACE,WAAW,GAAG,sBAAsB;EAEzC,OAAOC,MAAM,CAACC,MAAM,CAACb,MAAM,EAAE;IAC3BG,IAAI;IACJE,KAAK;IACLE,OAAO;IACPE;EACF,CAAC,CAAC;AASJ","ignoreList":[]}
1
+ {"version":3,"names":["_context","require","_ButtonRoot"],"sourceRoot":"../../../src","sources":["button/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA","ignoreList":[]}
@@ -3,15 +3,20 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createCheckboxGroup = void 0;
6
+ exports.CheckboxGroup = void 0;
7
7
  var _react = require("react");
8
+ var _reactNative = require("react-native");
8
9
  var _utils = require("@cdx-ui/utils");
9
10
  var _checkbox = require("@react-native-aria/checkbox");
10
11
  var _checkbox2 = require("@react-stately/checkbox");
12
+ var _slot = require("../slot");
11
13
  var _context = require("./context");
12
14
  var _jsxRuntime = require("react/jsx-runtime");
13
- const createCheckboxGroup = BaseCheckboxGroup => /*#__PURE__*/(0, _react.forwardRef)(({
15
+ const CheckboxGroup = exports.CheckboxGroup = /*#__PURE__*/(0, _react.forwardRef)(({
16
+ asChild,
14
17
  children,
18
+ className,
19
+ style,
15
20
  ...props
16
21
  }, ref) => {
17
22
  const state = (0, _checkbox2.useCheckboxGroupState)({
@@ -25,20 +30,23 @@ const createCheckboxGroup = BaseCheckboxGroup => /*#__PURE__*/(0, _react.forward
25
30
  'aria-label': props['aria-label']
26
31
  }, state);
27
32
  const formControlContext = (0, _utils.useFormControlContext)();
33
+ const contextValue = (0, _react.useMemo)(() => ({
34
+ state: {
35
+ ...formControlContext,
36
+ ...state
37
+ }
38
+ }), [formControlContext, state]);
39
+ const Comp = asChild ? _slot.Slot : _reactNative.View;
28
40
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.CheckboxGroupContext.Provider, {
29
- value: {
30
- state: {
31
- ...formControlContext,
32
- ...state
33
- }
34
- },
35
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(BaseCheckboxGroup, {
41
+ value: contextValue,
42
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, {
36
43
  ...groupProps,
37
- ...props,
44
+ className: className,
45
+ style: style,
38
46
  ref: ref,
39
47
  children: children
40
48
  })
41
49
  });
42
50
  });
43
- exports.createCheckboxGroup = createCheckboxGroup;
44
- //# sourceMappingURL=createCheckboxGroup.js.map
51
+ CheckboxGroup.displayName = 'CheckboxGroup';
52
+ //# sourceMappingURL=CheckboxGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_utils","_checkbox","_checkbox2","_slot","_context","_jsxRuntime","CheckboxGroup","exports","forwardRef","asChild","children","className","style","props","ref","state","useCheckboxGroupState","validationState","isInvalid","groupProps","useCheckboxGroup","formControlContext","useFormControlContext","contextValue","useMemo","Comp","Slot","View","jsx","CheckboxGroupContext","Provider","value","displayName"],"sourceRoot":"../../../src","sources":["checkbox/CheckboxGroup.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAAiD,IAAAO,WAAA,GAAAP,OAAA;AAS1C,MAAMQ,aAAa,GAAAC,OAAA,CAAAD,aAAA,gBAAG,IAAAE,iBAAU,EACrC,CAAC;EAAEC,OAAO;EAAEC,QAAQ;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAC1D,MAAMC,KAAK,GAAG,IAAAC,gCAAqB,EAAC;IAClC,GAAGH,KAAK;IACRI,eAAe,EAAEJ,KAAK,CAACK,SAAS,GAAG,SAAS,GAAG;EACjD,CAAC,CAAC;EAEF,MAAM;IAAEC;EAAW,CAAC,GAAG,IAAAC,0BAAgB,EACrC;IACE,GAAGP,KAAK;IACR,YAAY,EAAEA,KAAK,CAAC,YAAY;EAClC,CAAC,EACDE,KACF,CAAC;EAED,MAAMM,kBAAkB,GAAG,IAAAC,4BAAqB,EAAC,CAAC;EAElD,MAAMC,YAAY,GAAG,IAAAC,cAAO,EAC1B,OAAO;IAAET,KAAK,EAAE;MAAE,GAAGM,kBAAkB;MAAE,GAAGN;IAAM;EAAE,CAAC,CAAC,EACtD,CAACM,kBAAkB,EAAEN,KAAK,CAC5B,CAAC;EAED,MAAMU,IAAI,GAAGhB,OAAO,GAAGiB,UAAI,GAAGC,iBAAI;EAElC,oBACE,IAAAtB,WAAA,CAAAuB,GAAA,EAACxB,QAAA,CAAAyB,oBAAoB,CAACC,QAAQ;IAACC,KAAK,EAAER,YAAa;IAAAb,QAAA,eACjD,IAAAL,WAAA,CAAAuB,GAAA,EAACH,IAAI;MAAA,GAAKN,UAAU;MAAER,SAAS,EAAEA,SAAU;MAACC,KAAK,EAAEA,KAAM;MAACE,GAAG,EAAEA,GAAI;MAAAJ,QAAA,EAChEA;IAAQ,CACL;EAAC,CACsB,CAAC;AAEpC,CACF,CAAC;AAEDJ,aAAa,CAAC0B,WAAW,GAAG,eAAe","ignoreList":[]}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CheckboxRoot = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _utils = require("@cdx-ui/utils");
10
+ var _focus = require("@react-native-aria/focus");
11
+ var _interactions = require("@react-native-aria/interactions");
12
+ var _slot = require("../slot");
13
+ var _dataAttributes = require("../utils/dataAttributes");
14
+ var _context = require("./context");
15
+ var _useCheckboxRoot = require("./useCheckboxRoot");
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ const CheckboxRoot = exports.CheckboxRoot = /*#__PURE__*/(0, _react.forwardRef)(({
18
+ asChild,
19
+ onPressIn,
20
+ onPressOut,
21
+ onHoverIn,
22
+ onHoverOut,
23
+ onFocus,
24
+ onBlur,
25
+ children,
26
+ ...props
27
+ }, ref) => {
28
+ const {
29
+ isHovered: isHoveredProp,
30
+ isChecked: isCheckedProp,
31
+ isDisabled: isDisabledProp,
32
+ isInvalid: isInvalidProp,
33
+ isReadOnly: isReadOnlyProp,
34
+ isPressed: isPressedProp,
35
+ isFocused: isFocusedProp,
36
+ isIndeterminate: isIndeterminateProp,
37
+ isFocusVisible: isFocusVisibleProp
38
+ } = props;
39
+ const {
40
+ combinedProps,
41
+ isInvalid,
42
+ isReadOnly,
43
+ isIndeterminate,
44
+ groupItemInputProps,
45
+ isChecked,
46
+ isDisabled,
47
+ isHovered,
48
+ hoverProps,
49
+ mergedRef
50
+ } = (0, _useCheckboxRoot.useCheckboxRoot)(props, ref);
51
+ const {
52
+ focusProps,
53
+ isFocused
54
+ } = (0, _focus.useFocus)();
55
+ const {
56
+ pressProps,
57
+ isPressed
58
+ } = (0, _interactions.usePress)({
59
+ isDisabled: isDisabled || isDisabledProp
60
+ });
61
+ const contextValue = {
62
+ isChecked: isChecked || isCheckedProp,
63
+ isDisabled: isDisabled || isDisabledProp,
64
+ isHovered: isHovered || isHoveredProp,
65
+ isInvalid: isInvalid || isInvalidProp,
66
+ isReadOnly: isReadOnly || isReadOnlyProp,
67
+ isPressed: isPressed || isPressedProp,
68
+ isFocused: isFocused || isFocusedProp,
69
+ isIndeterminate: isIndeterminate || isIndeterminateProp,
70
+ isFocusVisible: isFocusVisibleProp
71
+ };
72
+ const Comp = asChild ? _slot.Slot : _reactNative.Pressable;
73
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.CheckboxProvider, {
74
+ value: contextValue,
75
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Comp, {
76
+ disabled: isDisabled || isDisabledProp,
77
+ ...combinedProps,
78
+ ...groupItemInputProps,
79
+ ref: mergedRef,
80
+ role: "checkbox",
81
+ ...(0, _dataAttributes.mergeDataAttributes)(props, (0, _dataAttributes.dataAttributes)({
82
+ checked: isChecked || isCheckedProp,
83
+ disabled: isDisabled || isDisabledProp,
84
+ hover: isHovered || isHoveredProp,
85
+ invalid: isInvalid || isInvalidProp,
86
+ readonly: isReadOnly || isReadOnlyProp,
87
+ active: isPressed,
88
+ focus: isFocused,
89
+ indeterminate: isIndeterminate || isIndeterminateProp,
90
+ focusVisible: isFocusVisibleProp
91
+ })),
92
+ onPressIn: (0, _utils.composeEventHandlers)(onPressIn, pressProps.onPressIn),
93
+ onPressOut: (0, _utils.composeEventHandlers)(onPressOut, pressProps.onPressOut),
94
+ onHoverIn: (0, _utils.composeEventHandlers)(onHoverIn, hoverProps.onHoverIn),
95
+ onHoverOut: (0, _utils.composeEventHandlers)(onHoverOut, hoverProps.onHoverOut),
96
+ onFocus: (0, _utils.composeEventHandlers)((0, _utils.composeEventHandlers)(onFocus, focusProps.onFocus)),
97
+ onBlur: (0, _utils.composeEventHandlers)((0, _utils.composeEventHandlers)(onBlur, focusProps.onBlur)),
98
+ children: children
99
+ })
100
+ });
101
+ });
102
+ CheckboxRoot.displayName = 'CheckboxRoot';
103
+ //# sourceMappingURL=CheckboxRoot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_utils","_focus","_interactions","_slot","_dataAttributes","_context","_useCheckboxRoot","_jsxRuntime","CheckboxRoot","exports","forwardRef","asChild","onPressIn","onPressOut","onHoverIn","onHoverOut","onFocus","onBlur","children","props","ref","isHovered","isHoveredProp","isChecked","isCheckedProp","isDisabled","isDisabledProp","isInvalid","isInvalidProp","isReadOnly","isReadOnlyProp","isPressed","isPressedProp","isFocused","isFocusedProp","isIndeterminate","isIndeterminateProp","isFocusVisible","isFocusVisibleProp","combinedProps","groupItemInputProps","hoverProps","mergedRef","useCheckboxRoot","focusProps","useFocus","pressProps","usePress","contextValue","Comp","Slot","Pressable","jsx","CheckboxProvider","value","disabled","role","mergeDataAttributes","dataAttributes","checked","hover","invalid","readonly","active","focus","indeterminate","focusVisible","composeEventHandlers","displayName"],"sourceRoot":"../../../src","sources":["checkbox/CheckboxRoot.tsx"],"mappings":"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","ignoreList":[]}