@appica/ui-react 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (511) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +47 -5
  3. package/agent-rules.md +41 -0
  4. package/appica.css +7 -0
  5. package/dist/components/accordion/accordion.d.ts +24 -0
  6. package/dist/components/accordion/accordion.d.ts.map +1 -1
  7. package/dist/components/accordion/accordion.js +2 -1
  8. package/dist/components/accordion/accordion.js.map +1 -1
  9. package/dist/components/alert/alert.d.ts +30 -2
  10. package/dist/components/alert/alert.d.ts.map +1 -1
  11. package/dist/components/alert/alert.js +2 -1
  12. package/dist/components/alert/alert.js.map +1 -1
  13. package/dist/components/alert-dialog/alert-dialog.d.ts +12 -2
  14. package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -1
  15. package/dist/components/alert-dialog/alert-dialog.js +10 -5
  16. package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
  17. package/dist/components/autocomplete/autocomplete.d.ts +21 -1
  18. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  19. package/dist/components/autocomplete/autocomplete.js +3 -2
  20. package/dist/components/autocomplete/autocomplete.js.map +1 -1
  21. package/dist/components/avatar/avatar.d.ts +17 -1
  22. package/dist/components/avatar/avatar.d.ts.map +1 -1
  23. package/dist/components/avatar/avatar.js +2 -1
  24. package/dist/components/avatar/avatar.js.map +1 -1
  25. package/dist/components/background-pattern/background-pattern-interactive.d.ts +2 -1
  26. package/dist/components/background-pattern/background-pattern-interactive.d.ts.map +1 -1
  27. package/dist/components/background-pattern/background-pattern-interactive.js +4 -2
  28. package/dist/components/background-pattern/background-pattern-interactive.js.map +1 -1
  29. package/dist/components/background-pattern/background-pattern-shared.d.ts +3 -2
  30. package/dist/components/background-pattern/background-pattern-shared.d.ts.map +1 -1
  31. package/dist/components/background-pattern/background-pattern-shared.js +48 -16
  32. package/dist/components/background-pattern/background-pattern-shared.js.map +1 -1
  33. package/dist/components/background-pattern/background-pattern.d.ts +13 -5
  34. package/dist/components/background-pattern/background-pattern.d.ts.map +1 -1
  35. package/dist/components/background-pattern/background-pattern.js +13 -4
  36. package/dist/components/background-pattern/background-pattern.js.map +1 -1
  37. package/dist/components/background-pattern/index.js +1 -0
  38. package/dist/components/background-pattern/index.js.map +1 -1
  39. package/dist/components/badge/badge.d.ts +13 -3
  40. package/dist/components/badge/badge.d.ts.map +1 -1
  41. package/dist/components/badge/badge.js +2 -1
  42. package/dist/components/badge/badge.js.map +1 -1
  43. package/dist/components/border-beam/border-beam.d.ts +52 -0
  44. package/dist/components/border-beam/border-beam.d.ts.map +1 -0
  45. package/dist/components/border-beam/border-beam.js +68 -0
  46. package/dist/components/border-beam/border-beam.js.map +1 -0
  47. package/dist/components/breadcrumb/breadcrumb.d.ts +8 -0
  48. package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
  49. package/dist/components/breadcrumb/breadcrumb.js +2 -1
  50. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  51. package/dist/components/button/button-variants.d.ts +2 -2
  52. package/dist/components/button/button-variants.js +2 -1
  53. package/dist/components/button/button-variants.js.map +1 -1
  54. package/dist/components/button/button.d.ts +11 -1
  55. package/dist/components/button/button.d.ts.map +1 -1
  56. package/dist/components/button/button.js +2 -1
  57. package/dist/components/button/button.js.map +1 -1
  58. package/dist/components/button/index.js +1 -0
  59. package/dist/components/button/index.js.map +1 -1
  60. package/dist/components/button-group/button-group-context.js +1 -0
  61. package/dist/components/button-group/button-group-context.js.map +1 -1
  62. package/dist/components/button-group/button-group.d.ts +10 -0
  63. package/dist/components/button-group/button-group.d.ts.map +1 -1
  64. package/dist/components/button-group/button-group.js +2 -1
  65. package/dist/components/button-group/button-group.js.map +1 -1
  66. package/dist/components/calendar/calendar.d.ts +5 -0
  67. package/dist/components/calendar/calendar.d.ts.map +1 -1
  68. package/dist/components/calendar/calendar.js +2 -1
  69. package/dist/components/calendar/calendar.js.map +1 -1
  70. package/dist/components/card/card.d.ts +43 -0
  71. package/dist/components/card/card.d.ts.map +1 -0
  72. package/dist/components/card/card.js +104 -0
  73. package/dist/components/card/card.js.map +1 -0
  74. package/dist/components/carousel/carousel.d.ts +106 -6
  75. package/dist/components/carousel/carousel.d.ts.map +1 -1
  76. package/dist/components/carousel/carousel.js +180 -5
  77. package/dist/components/carousel/carousel.js.map +1 -1
  78. package/dist/components/checkbox/checkbox.js +2 -1
  79. package/dist/components/checkbox/checkbox.js.map +1 -1
  80. package/dist/components/checkbox-group/checkbox-group.d.ts +4 -0
  81. package/dist/components/checkbox-group/checkbox-group.d.ts.map +1 -1
  82. package/dist/components/checkbox-group/checkbox-group.js +2 -1
  83. package/dist/components/checkbox-group/checkbox-group.js.map +1 -1
  84. package/dist/components/chip/chip.d.ts +33 -1
  85. package/dist/components/chip/chip.d.ts.map +1 -1
  86. package/dist/components/chip/chip.js +2 -1
  87. package/dist/components/chip/chip.js.map +1 -1
  88. package/dist/components/collapsible/collapsible.js +2 -1
  89. package/dist/components/collapsible/collapsible.js.map +1 -1
  90. package/dist/components/color-area/color-area.d.ts +53 -0
  91. package/dist/components/color-area/color-area.d.ts.map +1 -0
  92. package/dist/components/color-area/color-area.js +246 -0
  93. package/dist/components/color-area/color-area.js.map +1 -0
  94. package/dist/components/color-picker/color-picker.d.ts +152 -0
  95. package/dist/components/color-picker/color-picker.d.ts.map +1 -0
  96. package/dist/components/color-picker/color-picker.js +328 -0
  97. package/dist/components/color-picker/color-picker.js.map +1 -0
  98. package/dist/components/color-slider/color-slider.d.ts +48 -0
  99. package/dist/components/color-slider/color-slider.d.ts.map +1 -0
  100. package/dist/components/color-slider/color-slider.js +217 -0
  101. package/dist/components/color-slider/color-slider.js.map +1 -0
  102. package/dist/components/color-swatch/color-swatch.d.ts +47 -0
  103. package/dist/components/color-swatch/color-swatch.d.ts.map +1 -0
  104. package/dist/components/color-swatch/color-swatch.js +67 -0
  105. package/dist/components/color-swatch/color-swatch.js.map +1 -0
  106. package/dist/components/color-swatch-picker/color-swatch-picker.d.ts +62 -0
  107. package/dist/components/color-swatch-picker/color-swatch-picker.d.ts.map +1 -0
  108. package/dist/components/color-swatch-picker/color-swatch-picker.js +203 -0
  109. package/dist/components/color-swatch-picker/color-swatch-picker.js.map +1 -0
  110. package/dist/components/combobox/combobox.d.ts +25 -1
  111. package/dist/components/combobox/combobox.d.ts.map +1 -1
  112. package/dist/components/combobox/combobox.js +3 -2
  113. package/dist/components/combobox/combobox.js.map +1 -1
  114. package/dist/components/context-menu/context-menu.d.ts +7 -1
  115. package/dist/components/context-menu/context-menu.d.ts.map +1 -1
  116. package/dist/components/context-menu/context-menu.js +11 -5
  117. package/dist/components/context-menu/context-menu.js.map +1 -1
  118. package/dist/components/copy-button/copy-button.d.ts +18 -1
  119. package/dist/components/copy-button/copy-button.d.ts.map +1 -1
  120. package/dist/components/copy-button/copy-button.js +6 -5
  121. package/dist/components/copy-button/copy-button.js.map +1 -1
  122. package/dist/components/countdown/countdown.d.ts +14 -0
  123. package/dist/components/countdown/countdown.d.ts.map +1 -1
  124. package/dist/components/countdown/countdown.js +2 -1
  125. package/dist/components/countdown/countdown.js.map +1 -1
  126. package/dist/components/date-field/date-field.d.ts +35 -0
  127. package/dist/components/date-field/date-field.d.ts.map +1 -1
  128. package/dist/components/date-field/date-field.js +2 -1
  129. package/dist/components/date-field/date-field.js.map +1 -1
  130. package/dist/components/date-picker/date-picker.d.ts +94 -0
  131. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  132. package/dist/components/date-picker/date-picker.js +2 -1
  133. package/dist/components/date-picker/date-picker.js.map +1 -1
  134. package/dist/components/dialog/dialog.d.ts +20 -2
  135. package/dist/components/dialog/dialog.d.ts.map +1 -1
  136. package/dist/components/dialog/dialog.js +9 -4
  137. package/dist/components/dialog/dialog.js.map +1 -1
  138. package/dist/components/drawer/drawer.d.ts +22 -2
  139. package/dist/components/drawer/drawer.d.ts.map +1 -1
  140. package/dist/components/drawer/drawer.js +14 -7
  141. package/dist/components/drawer/drawer.js.map +1 -1
  142. package/dist/components/dropdown-menu/dropdown-menu.d.ts +7 -1
  143. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  144. package/dist/components/dropdown-menu/dropdown-menu.js +11 -5
  145. package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
  146. package/dist/components/field/field.js +2 -1
  147. package/dist/components/field/field.js.map +1 -1
  148. package/dist/components/fieldset/fieldset.js +2 -1
  149. package/dist/components/fieldset/fieldset.js.map +1 -1
  150. package/dist/components/form/form.js +1 -0
  151. package/dist/components/form/form.js.map +1 -1
  152. package/dist/components/gradient-glow/gradient-glow.d.ts +51 -1
  153. package/dist/components/gradient-glow/gradient-glow.d.ts.map +1 -1
  154. package/dist/components/gradient-glow/gradient-glow.js +5 -3
  155. package/dist/components/gradient-glow/gradient-glow.js.map +1 -1
  156. package/dist/components/input/index.js +1 -0
  157. package/dist/components/input/index.js.map +1 -1
  158. package/dist/components/input/input-variants.d.ts +1 -1
  159. package/dist/components/input/input-variants.js +2 -1
  160. package/dist/components/input/input-variants.js.map +1 -1
  161. package/dist/components/input/input.d.ts +21 -1
  162. package/dist/components/input/input.d.ts.map +1 -1
  163. package/dist/components/input/input.js +4 -3
  164. package/dist/components/input/input.js.map +1 -1
  165. package/dist/components/kbd/kbd.d.ts +8 -0
  166. package/dist/components/kbd/kbd.d.ts.map +1 -1
  167. package/dist/components/kbd/kbd.js +2 -1
  168. package/dist/components/kbd/kbd.js.map +1 -1
  169. package/dist/components/loader/loader.d.ts +8 -0
  170. package/dist/components/loader/loader.d.ts.map +1 -1
  171. package/dist/components/loader/loader.js +2 -1
  172. package/dist/components/loader/loader.js.map +1 -1
  173. package/dist/components/menubar/menubar.d.ts +8 -0
  174. package/dist/components/menubar/menubar.d.ts.map +1 -1
  175. package/dist/components/menubar/menubar.js +2 -1
  176. package/dist/components/menubar/menubar.js.map +1 -1
  177. package/dist/components/meter/meter.d.ts +4 -0
  178. package/dist/components/meter/meter.d.ts.map +1 -1
  179. package/dist/components/meter/meter.js +2 -1
  180. package/dist/components/meter/meter.js.map +1 -1
  181. package/dist/components/navigation/index.js +1 -0
  182. package/dist/components/navigation/index.js.map +1 -1
  183. package/dist/components/navigation/navigation-context.js +1 -0
  184. package/dist/components/navigation/navigation-context.js.map +1 -1
  185. package/dist/components/navigation/navigation-link-variants.d.ts +2 -2
  186. package/dist/components/navigation/navigation-link-variants.js +2 -1
  187. package/dist/components/navigation/navigation-link-variants.js.map +1 -1
  188. package/dist/components/navigation/navigation-link.d.ts +22 -0
  189. package/dist/components/navigation/navigation-link.d.ts.map +1 -1
  190. package/dist/components/navigation/navigation-link.js +2 -1
  191. package/dist/components/navigation/navigation-link.js.map +1 -1
  192. package/dist/components/navigation/navigation.d.ts +12 -0
  193. package/dist/components/navigation/navigation.d.ts.map +1 -1
  194. package/dist/components/navigation/navigation.js +2 -1
  195. package/dist/components/navigation/navigation.js.map +1 -1
  196. package/dist/components/navigation-menu/navigation-menu.d.ts +33 -0
  197. package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -1
  198. package/dist/components/navigation-menu/navigation-menu.js +2 -1
  199. package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
  200. package/dist/components/number-field/number-field.d.ts +14 -0
  201. package/dist/components/number-field/number-field.d.ts.map +1 -1
  202. package/dist/components/number-field/number-field.js +2 -1
  203. package/dist/components/number-field/number-field.js.map +1 -1
  204. package/dist/components/otp-field/otp-field.d.ts +9 -0
  205. package/dist/components/otp-field/otp-field.d.ts.map +1 -1
  206. package/dist/components/otp-field/otp-field.js +2 -1
  207. package/dist/components/otp-field/otp-field.js.map +1 -1
  208. package/dist/components/pagination/pagination.d.ts +16 -0
  209. package/dist/components/pagination/pagination.d.ts.map +1 -1
  210. package/dist/components/pagination/pagination.js +2 -1
  211. package/dist/components/pagination/pagination.js.map +1 -1
  212. package/dist/components/popover/popover.d.ts +5 -1
  213. package/dist/components/popover/popover.d.ts.map +1 -1
  214. package/dist/components/popover/popover.js +3 -2
  215. package/dist/components/popover/popover.js.map +1 -1
  216. package/dist/components/preview-card/preview-card.d.ts +5 -1
  217. package/dist/components/preview-card/preview-card.d.ts.map +1 -1
  218. package/dist/components/preview-card/preview-card.js +3 -2
  219. package/dist/components/preview-card/preview-card.js.map +1 -1
  220. package/dist/components/progress/progress.d.ts +17 -0
  221. package/dist/components/progress/progress.d.ts.map +1 -1
  222. package/dist/components/progress/progress.js +2 -1
  223. package/dist/components/progress/progress.js.map +1 -1
  224. package/dist/components/radio/radio.js +2 -1
  225. package/dist/components/radio/radio.js.map +1 -1
  226. package/dist/components/radio-group/radio-group.d.ts +4 -0
  227. package/dist/components/radio-group/radio-group.d.ts.map +1 -1
  228. package/dist/components/radio-group/radio-group.js +2 -1
  229. package/dist/components/radio-group/radio-group.js.map +1 -1
  230. package/dist/components/rating/rating.d.ts +79 -0
  231. package/dist/components/rating/rating.d.ts.map +1 -0
  232. package/dist/components/rating/rating.js +302 -0
  233. package/dist/components/rating/rating.js.map +1 -0
  234. package/dist/components/scroll-area/scroll-area.d.ts +13 -0
  235. package/dist/components/scroll-area/scroll-area.d.ts.map +1 -1
  236. package/dist/components/scroll-area/scroll-area.js +2 -1
  237. package/dist/components/scroll-area/scroll-area.js.map +1 -1
  238. package/dist/components/select/select.d.ts +20 -1
  239. package/dist/components/select/select.d.ts.map +1 -1
  240. package/dist/components/select/select.js +3 -2
  241. package/dist/components/select/select.js.map +1 -1
  242. package/dist/components/separator/separator.d.ts +4 -0
  243. package/dist/components/separator/separator.d.ts.map +1 -1
  244. package/dist/components/separator/separator.js +2 -1
  245. package/dist/components/separator/separator.js.map +1 -1
  246. package/dist/components/skeleton/skeleton.d.ts +4 -0
  247. package/dist/components/skeleton/skeleton.d.ts.map +1 -1
  248. package/dist/components/skeleton/skeleton.js +2 -1
  249. package/dist/components/skeleton/skeleton.js.map +1 -1
  250. package/dist/components/slider/slider.d.ts +5 -0
  251. package/dist/components/slider/slider.d.ts.map +1 -1
  252. package/dist/components/slider/slider.js +2 -1
  253. package/dist/components/slider/slider.js.map +1 -1
  254. package/dist/components/sparkline/sparkline.d.ts +44 -0
  255. package/dist/components/sparkline/sparkline.d.ts.map +1 -1
  256. package/dist/components/sparkline/sparkline.js +2 -1
  257. package/dist/components/sparkline/sparkline.js.map +1 -1
  258. package/dist/components/spinner/spinner.d.ts +8 -0
  259. package/dist/components/spinner/spinner.d.ts.map +1 -1
  260. package/dist/components/spinner/spinner.js +2 -1
  261. package/dist/components/spinner/spinner.js.map +1 -1
  262. package/dist/components/switch/switch.d.ts +19 -15
  263. package/dist/components/switch/switch.d.ts.map +1 -1
  264. package/dist/components/switch/switch.js +2 -1
  265. package/dist/components/switch/switch.js.map +1 -1
  266. package/dist/components/table/table.d.ts +28 -0
  267. package/dist/components/table/table.d.ts.map +1 -1
  268. package/dist/components/table/table.js +2 -1
  269. package/dist/components/table/table.js.map +1 -1
  270. package/dist/components/tabs/tabs.d.ts +32 -2
  271. package/dist/components/tabs/tabs.d.ts.map +1 -1
  272. package/dist/components/tabs/tabs.js +2 -1
  273. package/dist/components/tabs/tabs.js.map +1 -1
  274. package/dist/components/text-animate/text-animate.d.ts +31 -0
  275. package/dist/components/text-animate/text-animate.d.ts.map +1 -1
  276. package/dist/components/text-animate/text-animate.js +27 -9
  277. package/dist/components/text-animate/text-animate.js.map +1 -1
  278. package/dist/components/textarea/textarea.d.ts +15 -0
  279. package/dist/components/textarea/textarea.d.ts.map +1 -1
  280. package/dist/components/textarea/textarea.js +2 -1
  281. package/dist/components/textarea/textarea.js.map +1 -1
  282. package/dist/components/thumbnail/thumbnail.d.ts +22 -2
  283. package/dist/components/thumbnail/thumbnail.d.ts.map +1 -1
  284. package/dist/components/thumbnail/thumbnail.js +2 -1
  285. package/dist/components/thumbnail/thumbnail.js.map +1 -1
  286. package/dist/components/time-field/time-field.d.ts +35 -0
  287. package/dist/components/time-field/time-field.d.ts.map +1 -1
  288. package/dist/components/time-field/time-field.js +2 -1
  289. package/dist/components/time-field/time-field.js.map +1 -1
  290. package/dist/components/toast/toast.d.ts +18 -0
  291. package/dist/components/toast/toast.d.ts.map +1 -1
  292. package/dist/components/toast/toast.js +2 -1
  293. package/dist/components/toast/toast.js.map +1 -1
  294. package/dist/components/toc/toc.d.ts +10 -0
  295. package/dist/components/toc/toc.d.ts.map +1 -1
  296. package/dist/components/toc/toc.js +2 -1
  297. package/dist/components/toc/toc.js.map +1 -1
  298. package/dist/components/toggle/toggle.js +1 -0
  299. package/dist/components/toggle/toggle.js.map +1 -1
  300. package/dist/components/toggle-group/toggle-group.js +2 -1
  301. package/dist/components/toggle-group/toggle-group.js.map +1 -1
  302. package/dist/components/toolbar/toolbar.js +2 -1
  303. package/dist/components/toolbar/toolbar.js.map +1 -1
  304. package/dist/components/tooltip/tooltip.d.ts +5 -1
  305. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  306. package/dist/components/tooltip/tooltip.js +3 -2
  307. package/dist/components/tooltip/tooltip.js.map +1 -1
  308. package/dist/hooks/use-direction.js +1 -0
  309. package/dist/hooks/use-direction.js.map +1 -1
  310. package/dist/hooks/use-dismissible.d.ts +4 -0
  311. package/dist/hooks/use-dismissible.d.ts.map +1 -1
  312. package/dist/hooks/use-dismissible.js +1 -0
  313. package/dist/hooks/use-dismissible.js.map +1 -1
  314. package/dist/hooks/use-local-storage.js +1 -0
  315. package/dist/hooks/use-local-storage.js.map +1 -1
  316. package/dist/hooks/use-media-query.js +1 -0
  317. package/dist/hooks/use-media-query.js.map +1 -1
  318. package/dist/hooks/use-reduced-motion.d.ts +1 -1
  319. package/dist/hooks/use-reduced-motion.js +1 -0
  320. package/dist/hooks/use-reduced-motion.js.map +1 -1
  321. package/dist/hooks/use-theme.d.ts +1 -1
  322. package/dist/hooks/use-theme.js +1 -0
  323. package/dist/hooks/use-theme.js.map +1 -1
  324. package/dist/index.d.ts +9 -0
  325. package/dist/index.d.ts.map +1 -1
  326. package/dist/index.js +11 -1
  327. package/dist/index.js.map +1 -1
  328. package/dist/internal/color-control.d.ts +75 -0
  329. package/dist/internal/color-control.d.ts.map +1 -0
  330. package/dist/internal/color-control.js +79 -0
  331. package/dist/internal/color-control.js.map +1 -0
  332. package/dist/internal/color-math.d.ts +9 -0
  333. package/dist/internal/color-math.d.ts.map +1 -0
  334. package/dist/internal/color-math.js +35 -0
  335. package/dist/internal/color-math.js.map +1 -0
  336. package/dist/internal/color-picker-context.d.ts +34 -0
  337. package/dist/internal/color-picker-context.d.ts.map +1 -0
  338. package/dist/internal/color-picker-context.js +42 -0
  339. package/dist/internal/color-picker-context.js.map +1 -0
  340. package/dist/{floating.d.ts → internal/floating.d.ts} +3 -3
  341. package/dist/internal/floating.d.ts.map +1 -0
  342. package/dist/{floating.js → internal/floating.js} +1 -0
  343. package/dist/internal/floating.js.map +1 -0
  344. package/dist/{modal.d.ts → internal/modal.d.ts} +2 -2
  345. package/dist/internal/modal.d.ts.map +1 -0
  346. package/dist/{modal.js → internal/modal.js} +1 -0
  347. package/dist/internal/modal.js.map +1 -0
  348. package/dist/{utils.d.ts → internal/utils.d.ts} +2 -2
  349. package/dist/internal/utils.d.ts.map +1 -0
  350. package/dist/{utils.js → internal/utils.js} +1 -0
  351. package/dist/internal/utils.js.map +1 -0
  352. package/dist/lib/color.d.ts +95 -0
  353. package/dist/lib/color.d.ts.map +1 -0
  354. package/dist/lib/color.js +329 -0
  355. package/dist/lib/color.js.map +1 -0
  356. package/dist/providers/direction-provider.d.ts +4 -4
  357. package/dist/providers/direction-provider.d.ts.map +1 -1
  358. package/dist/providers/direction-provider.js +1 -0
  359. package/dist/providers/direction-provider.js.map +1 -1
  360. package/dist/providers/reduced-motion-provider.d.ts +4 -8
  361. package/dist/providers/reduced-motion-provider.d.ts.map +1 -1
  362. package/dist/providers/reduced-motion-provider.js +1 -0
  363. package/dist/providers/reduced-motion-provider.js.map +1 -1
  364. package/dist/providers/theme-provider/index.js +1 -0
  365. package/dist/providers/theme-provider/index.js.map +1 -1
  366. package/dist/providers/theme-provider/theme-provider.d.ts +28 -12
  367. package/dist/providers/theme-provider/theme-provider.d.ts.map +1 -1
  368. package/dist/providers/theme-provider/theme-provider.js +1 -0
  369. package/dist/providers/theme-provider/theme-provider.js.map +1 -1
  370. package/dist/providers/theme-provider/theme-script.js +1 -0
  371. package/dist/providers/theme-provider/theme-script.js.map +1 -1
  372. package/package.json +91 -31
  373. package/src/components/accordion/accordion.tsx +25 -1
  374. package/src/components/alert/alert.tsx +30 -2
  375. package/src/components/alert-dialog/alert-dialog.test.tsx +34 -2
  376. package/src/components/alert-dialog/alert-dialog.tsx +21 -5
  377. package/src/components/autocomplete/autocomplete.test.tsx +1 -1
  378. package/src/components/autocomplete/autocomplete.tsx +22 -2
  379. package/src/components/avatar/avatar.test.tsx +2 -2
  380. package/src/components/avatar/avatar.tsx +17 -1
  381. package/src/components/background-pattern/background-pattern-interactive.tsx +4 -2
  382. package/src/components/background-pattern/background-pattern-shared.tsx +56 -19
  383. package/src/components/background-pattern/background-pattern.test.tsx +36 -1
  384. package/src/components/background-pattern/background-pattern.tsx +24 -9
  385. package/src/components/badge/badge.tsx +14 -2
  386. package/src/components/border-beam/border-beam.test.tsx +91 -0
  387. package/src/components/border-beam/border-beam.tsx +131 -0
  388. package/src/components/breadcrumb/breadcrumb.tsx +9 -1
  389. package/src/components/button/button-variants.ts +1 -1
  390. package/src/components/button/button.tsx +13 -2
  391. package/src/components/button-group/button-group.tsx +11 -1
  392. package/src/components/calendar/calendar.tsx +6 -1
  393. package/src/components/card/card.test.tsx +98 -0
  394. package/src/components/card/card.tsx +154 -0
  395. package/src/components/carousel/carousel.test.tsx +179 -0
  396. package/src/components/carousel/carousel.tsx +329 -6
  397. package/src/components/checkbox/checkbox.test.tsx +2 -2
  398. package/src/components/checkbox/checkbox.tsx +1 -1
  399. package/src/components/checkbox-group/checkbox-group.tsx +5 -1
  400. package/src/components/chip/chip.tsx +33 -1
  401. package/src/components/collapsible/collapsible.tsx +1 -1
  402. package/src/components/color-area/color-area.test.tsx +242 -0
  403. package/src/components/color-area/color-area.tsx +356 -0
  404. package/src/components/color-picker/color-picker.test.tsx +286 -0
  405. package/src/components/color-picker/color-picker.tsx +546 -0
  406. package/src/components/color-slider/color-slider.test.tsx +222 -0
  407. package/src/components/color-slider/color-slider.tsx +330 -0
  408. package/src/components/color-swatch/color-swatch.test.tsx +117 -0
  409. package/src/components/color-swatch/color-swatch.tsx +119 -0
  410. package/src/components/color-swatch-picker/color-swatch-picker.test.tsx +287 -0
  411. package/src/components/color-swatch-picker/color-swatch-picker.tsx +327 -0
  412. package/src/components/combobox/combobox.test.tsx +1 -1
  413. package/src/components/combobox/combobox.tsx +26 -2
  414. package/src/components/context-menu/context-menu.test.tsx +28 -0
  415. package/src/components/context-menu/context-menu.tsx +16 -5
  416. package/src/components/copy-button/copy-button.test.tsx +14 -1
  417. package/src/components/copy-button/copy-button.tsx +27 -6
  418. package/src/components/countdown/countdown.tsx +15 -1
  419. package/src/components/date-field/date-field.tsx +36 -1
  420. package/src/components/date-picker/date-picker.test.tsx +1 -1
  421. package/src/components/date-picker/date-picker.tsx +95 -1
  422. package/src/components/dialog/dialog.test.tsx +30 -1
  423. package/src/components/dialog/dialog.tsx +28 -6
  424. package/src/components/drawer/drawer.test.tsx +32 -1
  425. package/src/components/drawer/drawer.tsx +37 -7
  426. package/src/components/dropdown-menu/dropdown-menu.test.tsx +28 -0
  427. package/src/components/dropdown-menu/dropdown-menu.tsx +16 -5
  428. package/src/components/field/field.tsx +1 -1
  429. package/src/components/fieldset/fieldset.tsx +1 -1
  430. package/src/components/gradient-glow/gradient-glow.test.tsx +7 -1
  431. package/src/components/gradient-glow/gradient-glow.tsx +64 -11
  432. package/src/components/input/input-variants.ts +1 -1
  433. package/src/components/input/input.tsx +24 -4
  434. package/src/components/kbd/kbd.tsx +9 -1
  435. package/src/components/loader/loader.tsx +9 -1
  436. package/src/components/menubar/menubar.tsx +9 -1
  437. package/src/components/meter/meter.tsx +5 -1
  438. package/src/components/navigation/navigation-link-variants.ts +1 -1
  439. package/src/components/navigation/navigation-link.tsx +23 -1
  440. package/src/components/navigation/navigation.tsx +23 -3
  441. package/src/components/navigation-menu/navigation-menu.tsx +34 -1
  442. package/src/components/number-field/number-field.tsx +15 -1
  443. package/src/components/otp-field/otp-field.tsx +10 -1
  444. package/src/components/pagination/pagination.tsx +17 -1
  445. package/src/components/popover/popover.test.tsx +1 -1
  446. package/src/components/popover/popover.tsx +6 -2
  447. package/src/components/preview-card/preview-card.tsx +6 -2
  448. package/src/components/progress/progress.tsx +18 -1
  449. package/src/components/radio/radio.test.tsx +1 -1
  450. package/src/components/radio/radio.tsx +1 -1
  451. package/src/components/radio-group/radio-group.test.tsx +1 -1
  452. package/src/components/radio-group/radio-group.tsx +5 -1
  453. package/src/components/rating/rating.test.tsx +246 -0
  454. package/src/components/rating/rating.tsx +457 -0
  455. package/src/components/scroll-area/scroll-area.test.tsx +1 -1
  456. package/src/components/scroll-area/scroll-area.tsx +14 -1
  457. package/src/components/select/select.tsx +21 -2
  458. package/src/components/separator/separator.tsx +5 -1
  459. package/src/components/skeleton/skeleton.tsx +5 -1
  460. package/src/components/slider/slider.test.tsx +1 -1
  461. package/src/components/slider/slider.tsx +6 -1
  462. package/src/components/sparkline/sparkline.test.tsx +1 -1
  463. package/src/components/sparkline/sparkline.tsx +45 -1
  464. package/src/components/spinner/spinner.tsx +9 -1
  465. package/src/components/switch/switch.test.tsx +1 -1
  466. package/src/components/switch/switch.tsx +5 -1
  467. package/src/components/table/table.tsx +29 -1
  468. package/src/components/tabs/tabs.test.tsx +1 -1
  469. package/src/components/tabs/tabs.tsx +33 -2
  470. package/src/components/text-animate/text-animate.test.tsx +62 -0
  471. package/src/components/text-animate/text-animate.tsx +77 -9
  472. package/src/components/textarea/textarea.tsx +16 -1
  473. package/src/components/thumbnail/thumbnail.test.tsx +1 -1
  474. package/src/components/thumbnail/thumbnail.tsx +21 -1
  475. package/src/components/time-field/time-field.tsx +36 -1
  476. package/src/components/toast/toast.test.tsx +1 -1
  477. package/src/components/toast/toast.tsx +19 -1
  478. package/src/components/toc/toc.tsx +11 -1
  479. package/src/components/toggle/toggle.test.tsx +1 -1
  480. package/src/components/toggle-group/toggle-group.tsx +1 -1
  481. package/src/components/toolbar/toolbar.tsx +1 -1
  482. package/src/components/tooltip/tooltip.test.tsx +1 -1
  483. package/src/components/tooltip/tooltip.tsx +6 -2
  484. package/src/hooks/use-dismissible.ts +4 -0
  485. package/src/hooks/use-local-storage.ts +3 -3
  486. package/src/hooks/use-reduced-motion.ts +1 -1
  487. package/src/hooks/use-theme.ts +1 -1
  488. package/src/index.ts +11 -2
  489. package/src/internal/color-control.ts +178 -0
  490. package/src/internal/color-math.ts +44 -0
  491. package/src/internal/color-picker-context.ts +80 -0
  492. package/src/{floating.ts → internal/floating.ts} +3 -3
  493. package/src/{modal.ts → internal/modal.ts} +3 -3
  494. package/src/lib/color.test.ts +178 -0
  495. package/src/lib/color.ts +471 -0
  496. package/src/providers/direction-provider.tsx +4 -4
  497. package/src/providers/reduced-motion-provider.tsx +4 -8
  498. package/src/providers/theme-provider/theme-provider.tsx +28 -12
  499. package/src/providers/theme-provider/theme-script.tsx +2 -2
  500. package/src/test/setup.ts +1 -1
  501. package/styles.css +28 -4
  502. package/dist/floating.d.ts.map +0 -1
  503. package/dist/floating.js.map +0 -1
  504. package/dist/modal.d.ts.map +0 -1
  505. package/dist/modal.js.map +0 -1
  506. package/dist/utils.d.ts.map +0 -1
  507. package/dist/utils.js.map +0 -1
  508. /package/src/{floating.test.ts → internal/floating.test.ts} +0 -0
  509. /package/src/{modal.test.ts → internal/modal.test.ts} +0 -0
  510. /package/src/{utils.test.tsx → internal/utils.test.tsx} +0 -0
  511. /package/src/{utils.ts → internal/utils.ts} +0 -0
@@ -3,8 +3,8 @@
3
3
  import * as React from 'react'
4
4
  import { Menu as BaseMenu } from '@base-ui/react/menu'
5
5
  import { useReducedMotion } from '../../hooks/use-reduced-motion'
6
- import { cn } from '../../utils'
7
- import { type FloatingContentProps, splitFloatingProps } from '../../floating'
6
+ import { cn } from '../../internal/utils'
7
+ import { type FloatingContentProps, splitFloatingProps } from '../../internal/floating'
8
8
  import { navigationLinkVariants } from '../navigation/navigation-link-variants'
9
9
 
10
10
  type DropdownMenuSize = 'sm' | 'md' | 'lg'
@@ -27,6 +27,10 @@ function useDropdownMenuContext() {
27
27
  type BaseRootProps = React.ComponentProps<typeof BaseMenu.Root>
28
28
 
29
29
  interface DropdownMenuProps extends BaseRootProps {
30
+ /**
31
+ * Scales the popup radius, item padding, and icon size.
32
+ * @default 'md'
33
+ */
30
34
  size?: DropdownMenuSize
31
35
  }
32
36
 
@@ -60,7 +64,7 @@ const ICON_SIZE: Record<DropdownMenuSize, string> = {
60
64
 
61
65
  function popupClassName(size: DropdownMenuSize, className?: string) {
62
66
  return cn(
63
- 'max-h-(--available-height) w-(--anchor-width) bg-background border-border-overlay flex flex-col border shadow-2xl outline-none py-2',
67
+ 'max-h-(--available-height) w-(--anchor-width) bg-background border-border-overlay flex flex-col border shadow-2xl outline-none',
64
68
  POPUP_SIZE[size],
65
69
  'origin-(--transform-origin)',
66
70
  'motion-safe:transition-[opacity,scale] motion-safe:duration-200 motion-safe:ease-[cubic-bezier(0.175,0.885,0.32,1.5)]',
@@ -77,6 +81,7 @@ type DropdownMenuFloatingProps = FloatingContentProps<
77
81
 
78
82
  type DropdownMenuContentProps = Omit<React.ComponentProps<typeof BaseMenu.Popup>, 'className'> &
79
83
  DropdownMenuFloatingProps & {
84
+ /** Extra classes on the popup. */
80
85
  className?: string
81
86
  }
82
87
 
@@ -92,7 +97,7 @@ function DropdownMenuContent({ className, children, ...props }: DropdownMenuCont
92
97
  className={cn('isolate z-50', positioner.className as string | undefined)}
93
98
  >
94
99
  <BaseMenu.Popup data-slot="dropdown-menu-content" className={popupClassName(size, className)} {...popup}>
95
- <div className="flex flex-col gap-0.5 overflow-x-hidden overflow-y-auto px-2">{children}</div>
100
+ <div className="flex flex-col gap-0.5 overflow-x-hidden overflow-y-auto p-2">{children}</div>
96
101
  </BaseMenu.Popup>
97
102
  </BaseMenu.Positioner>
98
103
  </BaseMenu.Portal>
@@ -114,6 +119,7 @@ function DropdownMenuItem({ className, ...props }: DropdownMenuItemProps) {
114
119
  return (
115
120
  <BaseMenu.Item
116
121
  data-slot="dropdown-menu-item"
122
+ data-orientation="vertical"
117
123
  className={cn(navigationLinkVariants({ variant: 'pill', size }), ITEM_BASE, className)}
118
124
  {...props}
119
125
  />
@@ -127,6 +133,7 @@ function DropdownMenuLinkItem({ className, ...props }: DropdownMenuLinkItemProps
127
133
  return (
128
134
  <BaseMenu.LinkItem
129
135
  data-slot="dropdown-menu-link-item"
136
+ data-orientation="vertical"
130
137
  className={cn(navigationLinkVariants({ variant: 'pill', size }), ITEM_BASE, className)}
131
138
  {...props}
132
139
  />
@@ -183,6 +190,7 @@ function DropdownMenuRadioItem({ className, children, ...props }: DropdownMenuRa
183
190
  return (
184
191
  <BaseMenu.RadioItem
185
192
  data-slot="dropdown-menu-radio-item"
193
+ data-orientation="vertical"
186
194
  className={cn(navigationLinkVariants({ variant: 'pill', size }), ITEM_BASE, 'justify-between', className)}
187
195
  {...props}
188
196
  >
@@ -205,6 +213,7 @@ function DropdownMenuCheckboxItem({ className, children, ...props }: DropdownMen
205
213
  return (
206
214
  <BaseMenu.CheckboxItem
207
215
  data-slot="dropdown-menu-checkbox-item"
216
+ data-orientation="vertical"
208
217
  className={cn(navigationLinkVariants({ variant: 'pill', size }), ITEM_BASE, 'justify-between', className)}
209
218
  {...props}
210
219
  >
@@ -234,6 +243,7 @@ function DropdownMenuSubTrigger({ className, children, ...props }: DropdownMenuS
234
243
  <BaseMenu.SubmenuTrigger className="group/submenu-trigger outline-hidden" {...props}>
235
244
  <span
236
245
  data-slot="dropdown-menu-sub-trigger"
246
+ data-orientation="vertical"
237
247
  className={cn(navigationLinkVariants({ variant: 'pill', size }), ITEM_BASE, 'justify-between', className)}
238
248
  >
239
249
  <span className={cn('flex flex-1 items-center', ITEM_TEXT[size])}>{children}</span>
@@ -245,6 +255,7 @@ function DropdownMenuSubTrigger({ className, children, ...props }: DropdownMenuS
245
255
 
246
256
  type DropdownMenuSubContentProps = Omit<React.ComponentProps<typeof BaseMenu.Popup>, 'className'> &
247
257
  DropdownMenuFloatingProps & {
258
+ /** Extra classes on the submenu popup. */
248
259
  className?: string
249
260
  }
250
261
 
@@ -261,7 +272,7 @@ function DropdownMenuSubContent({ className, children, ...props }: DropdownMenuS
261
272
  className={cn('isolate z-50', positioner.className as string | undefined)}
262
273
  >
263
274
  <BaseMenu.Popup data-slot="dropdown-menu-sub-content" className={popupClassName(size, className)} {...popup}>
264
- <div className="flex flex-col gap-0.5 overflow-x-hidden overflow-y-auto px-2">{children}</div>
275
+ <div className="flex flex-col gap-0.5 overflow-x-hidden overflow-y-auto p-2">{children}</div>
265
276
  </BaseMenu.Popup>
266
277
  </BaseMenu.Positioner>
267
278
  </BaseMenu.Portal>
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react'
2
2
  import { Field as BaseField } from '@base-ui/react/field'
3
- import { cn } from '../../utils'
3
+ import { cn } from '../../internal/utils'
4
4
 
5
5
  type FieldProps = React.ComponentProps<typeof BaseField.Root>
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react'
2
2
  import { Fieldset as BaseFieldset } from '@base-ui/react/fieldset'
3
- import { cn } from '../../utils'
3
+ import { cn } from '../../internal/utils'
4
4
 
5
5
  type FieldsetProps = React.ComponentProps<typeof BaseFieldset.Root>
6
6
 
@@ -4,7 +4,7 @@ import { axe } from 'vitest-axe'
4
4
  import { GradientGlow } from './gradient-glow'
5
5
 
6
6
  describe('GradientGlow', () => {
7
- it('renders its children inside a labelled wrapper', () => {
7
+ it('renders its children inside a labeled wrapper', () => {
8
8
  render(
9
9
  <GradientGlow>
10
10
  <span>Content</span>
@@ -33,6 +33,12 @@ describe('GradientGlow', () => {
33
33
  expect(ring).toHaveAttribute('aria-hidden')
34
34
  })
35
35
 
36
+ it('drops the aura but keeps the border ring when glow is off', () => {
37
+ const { container } = render(<GradientGlow glow={false} border />)
38
+ expect(container.querySelector('[data-slot="gradient-glow-aura"]')).toBeNull()
39
+ expect(container.querySelector('[data-slot="gradient-glow-border"]')).not.toBeNull()
40
+ })
41
+
36
42
  it('maps the blur prop to a Tailwind utility', () => {
37
43
  const { container } = render(<GradientGlow blur="2xl" />)
38
44
  const aura = container.querySelector('[data-slot="gradient-glow-aura"]')!
@@ -1,21 +1,71 @@
1
1
  import * as React from 'react'
2
- import { cn } from '../../utils'
2
+ import { cn } from '../../internal/utils'
3
3
 
4
4
  type GradientGlowBlur = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'
5
5
  type GradientGlowTrigger = 'hover' | 'press'
6
6
 
7
7
  interface GradientGlowProps extends React.ComponentProps<'div'> {
8
+ /**
9
+ * First gradient stop.
10
+ * @default '#8EC5FF'
11
+ */
8
12
  from?: string
13
+ /**
14
+ * Middle gradient stop.
15
+ * @default '#EFADF7'
16
+ */
9
17
  via?: string
18
+ /**
19
+ * Last gradient stop.
20
+ * @default '#FFD69B'
21
+ */
10
22
  to?: string
23
+ /**
24
+ * Resting gradient direction in degrees; the animation rotates a full turn around it.
25
+ * @default 95
26
+ */
11
27
  angle?: number
28
+ /**
29
+ * Softness of the glow, mapped to a Tailwind `blur-*` utility.
30
+ * @default 'lg'
31
+ */
12
32
  blur?: GradientGlowBlur
33
+ /**
34
+ * Paint the blurred aura behind the content. Set `false` with `border` for a gradient stroke alone.
35
+ * @default true
36
+ */
37
+ glow?: boolean
38
+ /**
39
+ * Add a 1px stroke that follows the same animated gradient.
40
+ * @default false
41
+ */
13
42
  border?: boolean
43
+ /**
44
+ * Stroke thickness in px when `border` is on.
45
+ * @default 1
46
+ */
14
47
  borderWidth?: number
48
+ /**
49
+ * Seconds for one full rotation (and one breath) of the gradient.
50
+ * @default 4
51
+ */
15
52
  speed?: number
53
+ /**
54
+ * Reveal only on interaction. `'hover'` is pointer-only; `'press'` works on touch. Combine via an array. Omit for
55
+ * always-on.
56
+ */
16
57
  revealOn?: GradientGlowTrigger | GradientGlowTrigger[]
58
+ /** Controlled visibility for programmatic states (loading, etc.); OR-ed with `revealOn`. */
17
59
  reveal?: boolean
60
+ /**
61
+ * With `revealOn="hover"`, keep the glow visible on touch devices (which have no hover) instead of hidden.
62
+ * @default false
63
+ */
18
64
  showOnTouch?: boolean
65
+ /**
66
+ * Scale the glow down while pressed, to track a child `Button`'s own active-press scale.
67
+ * @default false
68
+ */
19
69
  pressScale?: boolean
20
70
  }
21
71
 
@@ -36,6 +86,7 @@ function GradientGlow({
36
86
  to = '#FFD69B',
37
87
  angle = 95,
38
88
  blur = 'lg',
89
+ glow = true,
39
90
  border = false,
40
91
  borderWidth = 1,
41
92
  speed = 4,
@@ -95,16 +146,18 @@ function GradientGlow({
95
146
  style={{ '--gradient-glow-duration': `${speed}s`, ...style } as React.CSSProperties}
96
147
  {...props}
97
148
  >
98
- <span
99
- aria-hidden
100
- data-slot="gradient-glow-aura"
101
- className={cn(
102
- 'motion-safe:animate-gradient-glow-aura pointer-events-none absolute inset-0 -z-10 rounded-[inherit] opacity-(--gradient-glow-opacity)',
103
- BLUR_CLASS[blur],
104
- layerClasses,
105
- )}
106
- style={{ background: gradient }}
107
- />
149
+ {glow ? (
150
+ <span
151
+ aria-hidden
152
+ data-slot="gradient-glow-aura"
153
+ className={cn(
154
+ 'motion-safe:animate-gradient-glow-aura pointer-events-none absolute inset-0 -z-10 rounded-[inherit] opacity-(--gradient-glow-opacity)',
155
+ BLUR_CLASS[blur],
156
+ layerClasses,
157
+ )}
158
+ style={{ background: gradient }}
159
+ />
160
+ ) : null}
108
161
  {children}
109
162
  {border ? (
110
163
  <span
@@ -1,5 +1,5 @@
1
1
  import { cva } from 'class-variance-authority'
2
- import { cn } from '../../utils'
2
+ import { cn } from '../../internal/utils'
3
3
 
4
4
  const inputVariants = cva(
5
5
  'w-full border text-foreground outline-none transition-[background-color,border-color,box-shadow] duration-200 motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:shrink-0',
@@ -3,20 +3,40 @@
3
3
  import * as React from 'react'
4
4
  import { Input as BaseInput } from '@base-ui/react/input'
5
5
  import { type VariantProps } from 'class-variance-authority'
6
- import { cn, useComposedRefs } from '../../utils'
6
+ import { cn, useComposedRefs } from '../../internal/utils'
7
7
  import { inputVariants } from './input-variants'
8
8
 
9
9
  type InputVariant = NonNullable<VariantProps<typeof inputVariants>['variant']>
10
10
  type InputSize = NonNullable<VariantProps<typeof inputVariants>['size']>
11
11
 
12
12
  interface InputProps extends Omit<React.ComponentProps<typeof BaseInput>, 'size'> {
13
+ /**
14
+ * Field appearance - bordered or filled.
15
+ * @default 'outline'
16
+ */
13
17
  variant?: InputVariant
18
+ /**
19
+ * Scales height, padding, and text. Named `inputSize` to avoid the native `size` attribute.
20
+ * @default 'md'
21
+ */
14
22
  inputSize?: InputSize
23
+ /**
24
+ * Show a clear (✕) button once the field has a value.
25
+ * @default false
26
+ */
15
27
  clearable?: boolean
28
+ /** Adornment rendered before the field, inside the frame. */
16
29
  startSlot?: React.ReactNode
30
+ /** Adornment rendered after the field, inside the frame. */
17
31
  endSlot?: React.ReactNode
32
+ /** Called when the clear button is pressed. */
18
33
  onClear?: () => void
19
- inputProps?: Omit<React.ComponentProps<typeof BaseInput>, 'size'>
34
+ /**
35
+ * Props for the inner `<input>` (its own `className`, handlers, the native `size`
36
+ * attribute, …). `size` here is the character count the control is intrinsically wide,
37
+ * not the scale - that is `inputSize`.
38
+ */
39
+ inputProps?: React.ComponentProps<typeof BaseInput>
20
40
  }
21
41
 
22
42
  function setNativeValue(input: HTMLInputElement, value: string) {
@@ -78,7 +98,7 @@ function Input({
78
98
  {...(invalid ? { 'data-invalid': '' } : {})}
79
99
  >
80
100
  {startSlot && (
81
- <div data-slot="input-start" className="-ms-1 shrink-0">
101
+ <div data-slot="input-start" className="-ms-1 flex shrink-0 items-center">
82
102
  {startSlot}
83
103
  </div>
84
104
  )}
@@ -108,7 +128,7 @@ function Input({
108
128
  </button>
109
129
  )}
110
130
  {endSlot && (
111
- <div data-slot="input-end" className="-me-1 shrink-0">
131
+ <div data-slot="input-end" className="-me-1 flex shrink-0 items-center">
112
132
  {endSlot}
113
133
  </div>
114
134
  )}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react'
2
- import { cn } from '../../utils'
2
+ import { cn } from '../../internal/utils'
3
3
 
4
4
  type KbdSize = 'sm' | 'md' | 'lg'
5
5
 
@@ -10,6 +10,10 @@ const SIZE_CLASSES: Record<KbdSize, string> = {
10
10
  }
11
11
 
12
12
  interface KbdProps extends React.ComponentProps<'kbd'> {
13
+ /**
14
+ * Height, padding, and text scale. Inherited from a `KbdGroup`.
15
+ * @default 'md'
16
+ */
13
17
  size?: KbdSize
14
18
  }
15
19
 
@@ -29,6 +33,10 @@ function Kbd({ className, size = 'md', ...props }: KbdProps) {
29
33
  }
30
34
 
31
35
  interface KbdGroupProps extends React.ComponentProps<'span'> {
36
+ /**
37
+ * Default size applied to each child `Kbd` that doesn't set its own.
38
+ * @default 'md'
39
+ */
32
40
  size?: KbdSize
33
41
  }
34
42
 
@@ -3,12 +3,20 @@
3
3
  import * as React from 'react'
4
4
  import { LazyMotion, domAnimation, m } from 'motion/react'
5
5
  import { useReducedMotion } from '../../hooks/use-reduced-motion'
6
- import { cn } from '../../utils'
6
+ import { cn } from '../../internal/utils'
7
7
 
8
8
  type LoaderVariant = 'bar' | 'dots'
9
9
 
10
10
  interface LoaderProps extends Omit<React.ComponentProps<'span'>, 'children'> {
11
+ /**
12
+ * The animated shape.
13
+ * @default 'bar'
14
+ */
11
15
  variant?: LoaderVariant
16
+ /**
17
+ * Inherit the surrounding text color (`currentColor`) instead of the primary accent.
18
+ * @default false
19
+ */
12
20
  currentColor?: boolean
13
21
  }
14
22
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as React from 'react'
4
4
  import { Menubar as BaseMenubar } from '@base-ui/react/menubar'
5
- import { cn } from '../../utils'
5
+ import { cn } from '../../internal/utils'
6
6
  import { navigationLinkVariants } from '../navigation/navigation-link-variants'
7
7
  import {
8
8
  DropdownMenu,
@@ -44,7 +44,15 @@ function useMenubarContext() {
44
44
  type BaseMenubarRootProps = React.ComponentProps<typeof BaseMenubar>
45
45
 
46
46
  interface MenubarProps extends BaseMenubarRootProps {
47
+ /**
48
+ * Trigger appearance - hover/active pill, or an animated underline.
49
+ * @default 'pill'
50
+ */
47
51
  variant?: MenubarVariant
52
+ /**
53
+ * Scales the triggers, popups, and items together.
54
+ * @default 'md'
55
+ */
48
56
  size?: MenubarSize
49
57
  }
50
58
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as React from 'react'
4
4
  import { Meter as BaseMeter } from '@base-ui/react/meter'
5
- import { cn } from '../../utils'
5
+ import { cn } from '../../internal/utils'
6
6
 
7
7
  type MeterStatus = 'optimum' | 'suboptimum' | 'invalid'
8
8
 
@@ -31,9 +31,13 @@ function useMeterContext() {
31
31
  }
32
32
 
33
33
  interface MeterProps extends BaseMeter.Root.Props {
34
+ /** Upper edge of the "low" zone. Enables status coloring. */
34
35
  low?: number
36
+ /** Lower edge of the "high" zone. Enables status coloring. */
35
37
  high?: number
38
+ /** The ideal value; the zone it lands in becomes the green "optimum" zone. Enables status coloring. */
36
39
  optimum?: number
40
+ /** Override the indicator background class per status (and the no-threshold `default`). */
37
41
  statusClassNames?: MeterStatusClassNames
38
42
  }
39
43
 
@@ -1,5 +1,5 @@
1
1
  import { cva, type VariantProps } from 'class-variance-authority'
2
- import { cn } from '../../utils'
2
+ import { cn } from '../../internal/utils'
3
3
 
4
4
  const base = [
5
5
  'relative inline-flex items-center gap-1.5 transform-gpu cursor-pointer font-medium outline-none',
@@ -3,7 +3,7 @@
3
3
  import * as React from 'react'
4
4
  import { mergeProps } from '@base-ui/react/merge-props'
5
5
  import { useRender } from '@base-ui/react/use-render'
6
- import { cn, focusableProps } from '../../utils'
6
+ import { cn, focusableProps } from '../../internal/utils'
7
7
  import { navigationLinkVariants } from './navigation-link-variants'
8
8
  import {
9
9
  useNavigationContext,
@@ -19,12 +19,34 @@ type NavigationLinkState = {
19
19
  }
20
20
 
21
21
  interface NavigationLinkProps extends useRender.ComponentProps<'a', NavigationLinkState> {
22
+ /**
23
+ * Override the root's variant for this link.
24
+ * @default root
25
+ */
22
26
  variant?: NavigationVariant
27
+ /**
28
+ * Override the root's size for this link.
29
+ * @default root
30
+ */
23
31
  size?: NavigationSize
32
+ /**
33
+ * Override the root's orientation for this link.
34
+ * @default root
35
+ */
24
36
  orientation?: NavigationOrientation
37
+ /** Force the active state, overriding `activeLink`. */
25
38
  active?: boolean
39
+ /**
40
+ * Dim the link and remove it from the tab order.
41
+ * @default false
42
+ */
26
43
  disabled?: boolean
44
+ /** Matched against the root's `activeLink` to mark this link current. */
27
45
  value?: Exclude<NavigationActiveLink, null>
46
+ /**
47
+ * Custom marker for the `indicator` variant.
48
+ * @default chevron
49
+ */
28
50
  indicator?: React.ReactNode
29
51
  }
30
52
 
@@ -1,7 +1,7 @@
1
1
  'use client'
2
2
 
3
3
  import * as React from 'react'
4
- import { cn } from '../../utils'
4
+ import { cn } from '../../internal/utils'
5
5
  import {
6
6
  NavigationContext,
7
7
  useNavigationContext,
@@ -12,14 +12,34 @@ import {
12
12
  } from './navigation-context'
13
13
 
14
14
  type NavigationBaseProps = Omit<React.ComponentPropsWithoutRef<'nav'>, 'aria-orientation'> & {
15
+ /**
16
+ * Scales link text, padding, and icons.
17
+ * @default 'md'
18
+ */
15
19
  size?: NavigationSize
20
+ /**
21
+ * The `value` of the current link. Stamps the match with `aria-current="page"`.
22
+ * @default null
23
+ */
16
24
  activeLink?: NavigationActiveLink
17
25
  }
18
26
 
27
+ // `orientation` discriminates the union, so both branches repeat the same prop
28
+ // docs - TypeScript surfaces whichever branch the consumer's usage narrows to.
19
29
  type NavigationProps = NavigationBaseProps &
20
30
  (
21
- | { orientation?: 'horizontal'; variant?: Extract<NavigationVariant, 'pill' | 'line'> }
22
- | { orientation: 'vertical'; variant?: Extract<NavigationVariant, 'pill' | 'line' | 'indicator'> }
31
+ | {
32
+ /** Lay the links out as a row or a column. @default 'horizontal' */
33
+ orientation?: 'horizontal'
34
+ /** Active/hover styling. `indicator` is vertical-only. @default 'pill' */
35
+ variant?: Extract<NavigationVariant, 'pill' | 'line'>
36
+ }
37
+ | {
38
+ /** Lay the links out as a row or a column. @default 'horizontal' */
39
+ orientation: 'vertical'
40
+ /** Active/hover styling. `indicator` is vertical-only. @default 'pill' */
41
+ variant?: Extract<NavigationVariant, 'pill' | 'line' | 'indicator'>
42
+ }
23
43
  )
24
44
 
25
45
  function Navigation({
@@ -3,7 +3,7 @@
3
3
  import * as React from 'react'
4
4
  import { NavigationMenu as BaseNavigationMenu } from '@base-ui/react/navigation-menu'
5
5
  import { useDirection } from '../../hooks/use-direction'
6
- import { cn } from '../../utils'
6
+ import { cn } from '../../internal/utils'
7
7
  import { navigationLinkVariants } from '../navigation/navigation-link-variants'
8
8
 
9
9
  type NavigationMenuVariant = 'pill' | 'line'
@@ -35,12 +35,40 @@ const NavigationMenuContentContext = React.createContext(false)
35
35
  type BaseRootProps = React.ComponentProps<typeof BaseNavigationMenu.Root>
36
36
 
37
37
  interface NavigationMenuProps extends BaseRootProps {
38
+ /**
39
+ * Trigger appearance - hover/active pill, or an animated underline.
40
+ * @default 'pill'
41
+ */
38
42
  variant?: NavigationMenuVariant
43
+ /**
44
+ * Scales triggers, popup radius, and link padding.
45
+ * @default 'md'
46
+ */
39
47
  size?: NavigationMenuSize
48
+ /**
49
+ * The open/close indicator shown by each `NavigationMenuIcon`.
50
+ * @default 'chevron'
51
+ */
40
52
  icon?: NavigationMenuIconKind
53
+ /**
54
+ * Render a dimmed, blurred backdrop behind the open panel.
55
+ * @default false
56
+ */
41
57
  backdrop?: boolean
58
+ /**
59
+ * Auto-render the portalled positioner + popup. Set `false` to render your own.
60
+ * @default true
61
+ */
42
62
  viewport?: boolean
63
+ /**
64
+ * Animate the popup's size and position between items.
65
+ * @default true
66
+ */
43
67
  morph?: boolean
68
+ /**
69
+ * Gap between the trigger and the auto-rendered popup.
70
+ * @default 6
71
+ */
44
72
  sideOffset?: number
45
73
  }
46
74
 
@@ -138,6 +166,10 @@ const ICON_SIZE: Record<NavigationMenuSize, string> = {
138
166
  }
139
167
 
140
168
  type NavigationMenuIconProps = Omit<React.ComponentProps<typeof BaseNavigationMenu.Icon>, 'children'> & {
169
+ /**
170
+ * Override the indicator for this trigger.
171
+ * @default root
172
+ */
141
173
  icon?: NavigationMenuIconKind
142
174
  }
143
175
 
@@ -241,6 +273,7 @@ type PositionerPicks = Pick<
241
273
  type PortalPicks = Pick<React.ComponentProps<typeof BaseNavigationMenu.Portal>, 'container'>
242
274
 
243
275
  interface NavigationMenuPositionerProps extends PositionerPicks, PortalPicks {
276
+ /** Extra classes, merged via `tailwind-merge`. */
244
277
  className?: string
245
278
  }
246
279
 
@@ -4,7 +4,7 @@ import * as React from 'react'
4
4
  import { NumberField as BaseNumberField, type NumberFieldRoot } from '@base-ui/react/number-field'
5
5
  import { type VariantProps } from 'class-variance-authority'
6
6
  import { AnimatePresence, LazyMotion, domAnimation, m } from 'motion/react'
7
- import { cn } from '../../utils'
7
+ import { cn } from '../../internal/utils'
8
8
  import { useReducedMotion } from '../../hooks/use-reduced-motion'
9
9
  import { buttonVariants } from '../button/button-variants'
10
10
  import { inputVariants } from '../input/input-variants'
@@ -84,10 +84,24 @@ function AnimatedNumber({ value, direction }: { value: string; direction: AnimDi
84
84
  }
85
85
 
86
86
  interface NumberFieldProps extends Omit<React.ComponentProps<typeof BaseNumberField.Root>, 'className'> {
87
+ /**
88
+ * Field appearance - bordered or filled.
89
+ * @default 'outline'
90
+ */
87
91
  variant?: NumberFieldVariant
92
+ /**
93
+ * Scales field width, steppers, and text.
94
+ * @default 'md'
95
+ */
88
96
  size?: NumberFieldSize
97
+ /** Extra classes on the field root, merged via `tailwind-merge`. */
89
98
  className?: string
99
+ /**
100
+ * Placeholder text shown when empty.
101
+ * @default ' '
102
+ */
90
103
  placeholder?: string
104
+ /** Props forwarded to the inner `<input>` (`name`, `onChange`, `aria-*`, `className`, …). */
91
105
  inputProps?: React.ComponentProps<typeof BaseNumberField.Input>
92
106
  }
93
107
 
@@ -3,7 +3,7 @@
3
3
  import * as React from 'react'
4
4
  import { OTPField as BaseOTPField } from '@base-ui/react/otp-field'
5
5
  import { type VariantProps } from 'class-variance-authority'
6
- import { cn } from '../../utils'
6
+ import { cn } from '../../internal/utils'
7
7
  import { inputVariants } from '../input/input-variants'
8
8
 
9
9
  type OTPFieldVariant = NonNullable<VariantProps<typeof inputVariants>['variant']>
@@ -37,8 +37,17 @@ const SEPARATOR_SIZE: Record<OTPFieldSize, string> = {
37
37
  }
38
38
 
39
39
  interface OTPFieldProps extends Omit<React.ComponentProps<typeof BaseOTPField.Root>, 'className'> {
40
+ /**
41
+ * Slot appearance - bordered or filled.
42
+ * @default 'outline'
43
+ */
40
44
  variant?: OTPFieldVariant
45
+ /**
46
+ * Scales every slot.
47
+ * @default 'md'
48
+ */
41
49
  size?: OTPFieldSize
50
+ /** Extra classes on the root, merged via `tailwind-merge`. */
42
51
  className?: string
43
52
  }
44
53