@42-central/ui-react 0.17.1 → 0.18.1

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 (345) hide show
  1. package/biome/no-gray-color.grit +18 -0
  2. package/dist/{chunk-FD6P6PLQ.js → chunk-5JHDSVEZ.js} +3 -3
  3. package/dist/{chunk-FD6P6PLQ.js.map → chunk-5JHDSVEZ.js.map} +1 -1
  4. package/dist/{chunk-QMW7D5GU.js → chunk-5OQLFX47.js} +4 -3
  5. package/dist/chunk-5OQLFX47.js.map +1 -0
  6. package/dist/{chunk-VZ2TPU4B.js → chunk-6GDMSENK.js} +3 -2
  7. package/dist/chunk-6GDMSENK.js.map +1 -0
  8. package/dist/{chunk-TNNH3FVQ.js → chunk-6OLTJYSX.js} +24 -8
  9. package/dist/chunk-6OLTJYSX.js.map +1 -0
  10. package/dist/{chunk-POKDSVQT.js → chunk-AE7QTLJ5.js} +5 -4
  11. package/dist/chunk-AE7QTLJ5.js.map +1 -0
  12. package/dist/{chunk-44OV3PNH.js → chunk-B2YJKRNQ.js} +3 -3
  13. package/dist/{chunk-44OV3PNH.js.map → chunk-B2YJKRNQ.js.map} +1 -1
  14. package/dist/{chunk-YIQI2CF3.js → chunk-CTSO6V72.js} +3 -2
  15. package/dist/chunk-CTSO6V72.js.map +1 -0
  16. package/dist/{chunk-EVVMHTCL.js → chunk-EBREIC3L.js} +4 -3
  17. package/dist/chunk-EBREIC3L.js.map +1 -0
  18. package/dist/{chunk-UNSAA7YG.js → chunk-FHG54IT5.js} +3 -2
  19. package/dist/chunk-FHG54IT5.js.map +1 -0
  20. package/dist/{chunk-3GYOIQW7.js → chunk-FZIHZT5R.js} +5 -5
  21. package/dist/{chunk-3GYOIQW7.js.map → chunk-FZIHZT5R.js.map} +1 -1
  22. package/dist/{chunk-2H46IXW4.js → chunk-HAQJQFE6.js} +28 -8
  23. package/dist/chunk-HAQJQFE6.js.map +1 -0
  24. package/dist/{chunk-IHYFYMHJ.js → chunk-HT5JAHR3.js} +6 -6
  25. package/dist/{chunk-IHYFYMHJ.js.map → chunk-HT5JAHR3.js.map} +1 -1
  26. package/dist/chunk-I4SQQIP5.js +12 -0
  27. package/dist/chunk-I4SQQIP5.js.map +1 -0
  28. package/dist/{chunk-J3PELDH3.js → chunk-JITF6I7N.js} +22 -6
  29. package/dist/chunk-JITF6I7N.js.map +1 -0
  30. package/dist/{chunk-IFWCCAQV.js → chunk-KHMFNH3X.js} +3 -2
  31. package/dist/chunk-KHMFNH3X.js.map +1 -0
  32. package/dist/{chunk-SIG4DMNZ.js → chunk-MI2WZRK3.js} +4 -4
  33. package/dist/{chunk-SIG4DMNZ.js.map → chunk-MI2WZRK3.js.map} +1 -1
  34. package/dist/{chunk-YON5Y336.js → chunk-O23Y5ML4.js} +8 -8
  35. package/dist/{chunk-YON5Y336.js.map → chunk-O23Y5ML4.js.map} +1 -1
  36. package/dist/{chunk-P7A3BCAC.js → chunk-OWG4BCQR.js} +3 -3
  37. package/dist/{chunk-P7A3BCAC.js.map → chunk-OWG4BCQR.js.map} +1 -1
  38. package/dist/{chunk-FUWSTUDM.js → chunk-PH354ECN.js} +4 -4
  39. package/dist/{chunk-FUWSTUDM.js.map → chunk-PH354ECN.js.map} +1 -1
  40. package/dist/{chunk-U5GW5EBR.js → chunk-RAUOFTUH.js} +12 -20
  41. package/dist/chunk-RAUOFTUH.js.map +1 -0
  42. package/dist/{chunk-6I4R3HR6.js → chunk-RQL7FVCS.js} +3 -3
  43. package/dist/{chunk-6I4R3HR6.js.map → chunk-RQL7FVCS.js.map} +1 -1
  44. package/dist/{chunk-2762HZYX.js → chunk-S2HWWR2H.js} +47 -25
  45. package/dist/chunk-S2HWWR2H.js.map +1 -0
  46. package/dist/{chunk-VLUKI3HL.js → chunk-S7N4LGLZ.js} +6 -13
  47. package/dist/chunk-S7N4LGLZ.js.map +1 -0
  48. package/dist/{chunk-NSOA3GMZ.js → chunk-UHNRAI6V.js} +3 -3
  49. package/dist/{chunk-NSOA3GMZ.js.map → chunk-UHNRAI6V.js.map} +1 -1
  50. package/dist/{chunk-JBVFWSRQ.js → chunk-VIYVN4WF.js} +6 -4
  51. package/dist/chunk-VIYVN4WF.js.map +1 -0
  52. package/dist/{chunk-3NZXWCGF.js → chunk-WHKKN3ZK.js} +6 -6
  53. package/dist/{chunk-3NZXWCGF.js.map → chunk-WHKKN3ZK.js.map} +1 -1
  54. package/dist/{chunk-MOI7B3KH.js → chunk-WQN64ZHG.js} +5 -5
  55. package/dist/{chunk-MOI7B3KH.js.map → chunk-WQN64ZHG.js.map} +1 -1
  56. package/dist/chunk-WSIVRDRB.js +34 -0
  57. package/dist/chunk-WSIVRDRB.js.map +1 -0
  58. package/dist/{chunk-S53FHWNG.js → chunk-YWRBG23W.js} +3 -3
  59. package/dist/chunk-YWRBG23W.js.map +1 -0
  60. package/dist/{chunk-6SWK4XG5.js → chunk-YXE4B6X3.js} +2 -2
  61. package/dist/chunk-YXE4B6X3.js.map +1 -0
  62. package/dist/{chunk-NGAQITWP.js → chunk-Z2Z5EXVT.js} +10 -7
  63. package/dist/chunk-Z2Z5EXVT.js.map +1 -0
  64. package/dist/{chunk-IXKELBJA.js → chunk-ZDXQ64A7.js} +63 -44
  65. package/dist/chunk-ZDXQ64A7.js.map +1 -0
  66. package/dist/colors.css +12 -26
  67. package/dist/components/accordion/accordion-data.d.ts +3 -2
  68. package/dist/components/accordion/accordion-data.d.ts.map +1 -1
  69. package/dist/components/accordion/accordion.d.ts +2 -2
  70. package/dist/components/accordion/accordion.d.ts.map +1 -1
  71. package/dist/components/accordion/index.js +20 -8
  72. package/dist/components/accordion/index.js.map +1 -1
  73. package/dist/components/action-icon/action-icon.d.ts +3 -4
  74. package/dist/components/action-icon/action-icon.d.ts.map +1 -1
  75. package/dist/components/action-icon/index.js +2 -1
  76. package/dist/components/alert/alert.d.ts +1 -1
  77. package/dist/components/alert/alert.d.ts.map +1 -1
  78. package/dist/components/alert/index.js +16 -4
  79. package/dist/components/alert/index.js.map +1 -1
  80. package/dist/components/app-shell/app-shell.d.ts +3 -2
  81. package/dist/components/app-shell/app-shell.d.ts.map +1 -1
  82. package/dist/components/app-shell/index.js +4 -2
  83. package/dist/components/app-shell/index.js.map +1 -1
  84. package/dist/components/autocomplete/index.js +5 -4
  85. package/dist/components/autocomplete/index.js.map +1 -1
  86. package/dist/components/avatar/avatar.d.ts +3 -3
  87. package/dist/components/avatar/index.js.map +1 -1
  88. package/dist/components/breadcrumb/breadcrumb.d.ts +3 -2
  89. package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -1
  90. package/dist/components/breadcrumb/index.js +11 -5
  91. package/dist/components/breadcrumb/index.js.map +1 -1
  92. package/dist/components/button/button.d.ts +4 -4
  93. package/dist/components/button/button.d.ts.map +1 -1
  94. package/dist/components/button/index.js +2 -1
  95. package/dist/components/button-multi-select/index.js +4 -3
  96. package/dist/components/button-multi-select/index.js.map +1 -1
  97. package/dist/components/button-select/index.js +4 -3
  98. package/dist/components/button-select/index.js.map +1 -1
  99. package/dist/components/calendar/index.js +3 -2
  100. package/dist/components/chart/chart.d.ts +1 -1
  101. package/dist/components/chart/index.js +1 -1
  102. package/dist/components/chart/index.js.map +1 -1
  103. package/dist/components/checkbox/index.js +2 -2
  104. package/dist/components/choice-card-group/index.js +1 -1
  105. package/dist/components/circular-progress/circular-progress.d.ts +3 -2
  106. package/dist/components/circular-progress/circular-progress.d.ts.map +1 -1
  107. package/dist/components/circular-progress/index.js +1 -0
  108. package/dist/components/circular-progress/index.js.map +1 -1
  109. package/dist/components/clipboard/clipboard.d.ts +1 -1
  110. package/dist/components/clipboard/clipboard.d.ts.map +1 -1
  111. package/dist/components/clipboard/index.js +9 -5
  112. package/dist/components/clipboard/index.js.map +1 -1
  113. package/dist/components/code/index.js +1 -1
  114. package/dist/components/code-block/chrome.d.ts +4 -1
  115. package/dist/components/code-block/chrome.d.ts.map +1 -1
  116. package/dist/components/code-block/chrome.js +5 -4
  117. package/dist/components/code-block/code-block.d.ts +7 -1
  118. package/dist/components/code-block/code-block.d.ts.map +1 -1
  119. package/dist/components/code-block/index.d.ts +1 -1
  120. package/dist/components/code-block/index.js +12 -10
  121. package/dist/components/code-block/index.js.map +1 -1
  122. package/dist/components/code-block/notation.d.ts +5 -2
  123. package/dist/components/code-block/notation.d.ts.map +1 -1
  124. package/dist/components/code-block/static.d.ts +4 -1
  125. package/dist/components/code-block/static.d.ts.map +1 -1
  126. package/dist/components/code-block/static.js +5 -4
  127. package/dist/components/code-block/static.js.map +1 -1
  128. package/dist/components/collapse/collapse.d.ts +7 -3
  129. package/dist/components/collapse/collapse.d.ts.map +1 -1
  130. package/dist/components/collapse/index.js +2 -1
  131. package/dist/components/combobox/combobox.d.ts +11 -10
  132. package/dist/components/combobox/combobox.d.ts.map +1 -1
  133. package/dist/components/combobox/index.js +5 -4
  134. package/dist/components/combobox-list/index.js +6 -5
  135. package/dist/components/data-table/index.js +21 -20
  136. package/dist/components/data-table/index.js.map +1 -1
  137. package/dist/components/date-picker/index.js +12 -11
  138. package/dist/components/date-picker/index.js.map +1 -1
  139. package/dist/components/divider/divider.d.ts +3 -2
  140. package/dist/components/divider/divider.d.ts.map +1 -1
  141. package/dist/components/divider/index.js +1 -1
  142. package/dist/components/drawer/drawer.d.ts +6 -5
  143. package/dist/components/drawer/drawer.d.ts.map +1 -1
  144. package/dist/components/drawer/index.js +3 -2
  145. package/dist/components/field/field.d.ts +7 -4
  146. package/dist/components/field/field.d.ts.map +1 -1
  147. package/dist/components/field/index.js +1 -1
  148. package/dist/components/file-upload/index.js +3 -2
  149. package/dist/components/file-upload/index.js.map +1 -1
  150. package/dist/components/hover-card/index.js +1 -1
  151. package/dist/components/input/index.js +2 -2
  152. package/dist/components/input/input.d.ts +3 -2
  153. package/dist/components/input/input.d.ts.map +1 -1
  154. package/dist/components/mark/index.js +1 -1
  155. package/dist/components/mark/mark.d.ts +2 -2
  156. package/dist/components/menu/index.js +3 -2
  157. package/dist/components/menu/index.js.map +1 -1
  158. package/dist/components/menu/menu-data.d.ts +6 -1
  159. package/dist/components/menu/menu-data.d.ts.map +1 -1
  160. package/dist/components/menu/menu.d.ts +5 -5
  161. package/dist/components/menu/menu.d.ts.map +1 -1
  162. package/dist/components/modal/index.js +3 -2
  163. package/dist/components/modal/modal.d.ts +4 -3
  164. package/dist/components/modal/modal.d.ts.map +1 -1
  165. package/dist/components/multi-combobox-list/index.js +6 -5
  166. package/dist/components/multi-select/index.js +7 -6
  167. package/dist/components/multi-select/index.js.map +1 -1
  168. package/dist/components/nav-link/index.js +3 -2
  169. package/dist/components/nav-link/tanstack.js +3 -2
  170. package/dist/components/nav-link/tanstack.js.map +1 -1
  171. package/dist/components/notification/index.js +4 -3
  172. package/dist/components/notification/index.js.map +1 -1
  173. package/dist/components/notification/notification.d.ts +3 -2
  174. package/dist/components/notification/notification.d.ts.map +1 -1
  175. package/dist/components/number-input/index.js +4 -4
  176. package/dist/components/overlays/index.js +5 -4
  177. package/dist/components/overlays/index.js.map +1 -1
  178. package/dist/components/password-input/index.js +2 -2
  179. package/dist/components/pill/index.js +2 -1
  180. package/dist/components/pill/pill.d.ts +4 -2
  181. package/dist/components/pill/pill.d.ts.map +1 -1
  182. package/dist/components/pills-input/index.js +5 -4
  183. package/dist/components/pills-input/pills-input.d.ts +3 -2
  184. package/dist/components/pills-input/pills-input.d.ts.map +1 -1
  185. package/dist/components/pin-input/index.js +2 -2
  186. package/dist/components/popover/index.js +1 -1
  187. package/dist/components/popover/popover.d.ts +3 -2
  188. package/dist/components/popover/popover.d.ts.map +1 -1
  189. package/dist/components/progress/index.js +1 -0
  190. package/dist/components/progress/index.js.map +1 -1
  191. package/dist/components/progress/progress.d.ts +3 -2
  192. package/dist/components/progress/progress.d.ts.map +1 -1
  193. package/dist/components/radio-group/index.js +1 -1
  194. package/dist/components/rating/index.js +2 -1
  195. package/dist/components/rating/index.js.map +1 -1
  196. package/dist/components/rating/rating.d.ts +3 -2
  197. package/dist/components/rating/rating.d.ts.map +1 -1
  198. package/dist/components/schedule/index.d.ts +2 -2
  199. package/dist/components/schedule/index.js +50 -23
  200. package/dist/components/schedule/index.js.map +1 -1
  201. package/dist/components/schedule/schedule-agenda-list.d.ts +6 -7
  202. package/dist/components/schedule/schedule-agenda-list.d.ts.map +1 -1
  203. package/dist/components/schedule/schedule-agenda-view.d.ts +19 -16
  204. package/dist/components/schedule/schedule-agenda-view.d.ts.map +1 -1
  205. package/dist/components/schedule/schedule-dates.d.ts.map +1 -1
  206. package/dist/components/schedule/schedule-days-view.d.ts +3 -2
  207. package/dist/components/schedule/schedule-days-view.d.ts.map +1 -1
  208. package/dist/components/schedule/schedule-month-view.d.ts +3 -2
  209. package/dist/components/schedule/schedule-month-view.d.ts.map +1 -1
  210. package/dist/components/schedule/schedule-next-up.d.ts +4 -3
  211. package/dist/components/schedule/schedule-next-up.d.ts.map +1 -1
  212. package/dist/components/schedule/schedule-toolbar.d.ts +1 -1
  213. package/dist/components/schedule/schedule-toolbar.d.ts.map +1 -1
  214. package/dist/components/schedule/schedule-types.d.ts +6 -4
  215. package/dist/components/schedule/schedule-types.d.ts.map +1 -1
  216. package/dist/components/schedule/schedule-views.d.ts +2 -2
  217. package/dist/components/schedule/schedule-views.d.ts.map +1 -1
  218. package/dist/components/schedule/schedule-year-view.d.ts +3 -2
  219. package/dist/components/schedule/schedule-year-view.d.ts.map +1 -1
  220. package/dist/components/schedule/schedule.d.ts +9 -6
  221. package/dist/components/schedule/schedule.d.ts.map +1 -1
  222. package/dist/components/segment-group/index.js +2 -2
  223. package/dist/components/select/index.js +4 -4
  224. package/dist/components/slider/index.js +2 -1
  225. package/dist/components/slider/index.js.map +1 -1
  226. package/dist/components/slider/slider.d.ts +3 -2
  227. package/dist/components/slider/slider.d.ts.map +1 -1
  228. package/dist/components/switch/index.js +1 -1
  229. package/dist/components/tabs/index.js +1 -1
  230. package/dist/components/tabs/tabs-data.d.ts +3 -2
  231. package/dist/components/tabs/tabs-data.d.ts.map +1 -1
  232. package/dist/components/tags-input/index.js +6 -5
  233. package/dist/components/tags-input/index.js.map +1 -1
  234. package/dist/components/text-input/index.js +2 -2
  235. package/dist/components/textarea/index.js +2 -2
  236. package/dist/components/theme-icon/index.js +1 -1
  237. package/dist/components/time-input/index.js +6 -6
  238. package/dist/components/timeline/index.js +8 -5
  239. package/dist/components/timeline/index.js.map +1 -1
  240. package/dist/components/timeline/timeline.d.ts +1 -1
  241. package/dist/components/timeline/timeline.d.ts.map +1 -1
  242. package/dist/components/tooltip/index.js +1 -1
  243. package/dist/components/tooltip/tooltip.d.ts +2 -1
  244. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  245. package/dist/components/tree-multi-select/index.js +6 -5
  246. package/dist/components/tree-multi-select/index.js.map +1 -1
  247. package/dist/components/tree-select/index.js +3 -3
  248. package/dist/index.js +1 -1
  249. package/dist/lib/as-child.d.ts +104 -0
  250. package/dist/lib/as-child.d.ts.map +1 -0
  251. package/dist/lib/colors.d.ts +1 -1
  252. package/dist/lib/colors.d.ts.map +1 -1
  253. package/dist/theme.css +0 -33
  254. package/package.json +2 -1
  255. package/src/as-child.contract.test.tsx +809 -0
  256. package/src/biome-plugins.test.ts +61 -0
  257. package/src/colors.css +12 -26
  258. package/src/components/accordion/accordion-data.tsx +8 -5
  259. package/src/components/accordion/accordion.test.tsx +40 -0
  260. package/src/components/accordion/accordion.tsx +23 -6
  261. package/src/components/action-icon/action-icon.tsx +9 -24
  262. package/src/components/alert/alert.test.tsx +17 -0
  263. package/src/components/alert/alert.tsx +21 -2
  264. package/src/components/app-shell/app-shell.tsx +3 -1
  265. package/src/components/avatar/avatar.tsx +3 -3
  266. package/src/components/breadcrumb/breadcrumb.test.tsx +30 -0
  267. package/src/components/breadcrumb/breadcrumb.tsx +21 -12
  268. package/src/components/button/button.tsx +21 -50
  269. package/src/components/chart/chart.test.tsx +1 -2
  270. package/src/components/chart/chart.tsx +1 -1
  271. package/src/components/circular-progress/circular-progress.tsx +4 -1
  272. package/src/components/clipboard/clipboard.test.tsx +18 -0
  273. package/src/components/clipboard/clipboard.tsx +8 -2
  274. package/src/components/code-block/chrome.tsx +60 -36
  275. package/src/components/code-block/code-block.test.tsx +27 -0
  276. package/src/components/code-block/code-block.tsx +13 -3
  277. package/src/components/code-block/gutters.test.ts +2 -2
  278. package/src/components/code-block/notation.test.ts +8 -0
  279. package/src/components/code-block/notation.ts +6 -3
  280. package/src/components/code-block/static.tsx +8 -2
  281. package/src/components/collapse/collapse.tsx +33 -15
  282. package/src/components/combobox/combobox.test.tsx +38 -0
  283. package/src/components/combobox/combobox.tsx +24 -10
  284. package/src/components/divider/divider.tsx +3 -1
  285. package/src/components/drawer/drawer.tsx +37 -16
  286. package/src/components/field/field.tsx +7 -3
  287. package/src/components/input/input.tsx +3 -1
  288. package/src/components/mark/mark.test.tsx +4 -4
  289. package/src/components/mark/mark.tsx +3 -3
  290. package/src/components/menu/menu-data.tsx +8 -1
  291. package/src/components/menu/menu.test.tsx +52 -0
  292. package/src/components/menu/menu.tsx +83 -35
  293. package/src/components/modal/close-trigger.test.tsx +38 -0
  294. package/src/components/modal/modal.tsx +29 -13
  295. package/src/components/notification/notification.tsx +4 -1
  296. package/src/components/pill/pill.tsx +29 -20
  297. package/src/components/pills-input/pills-input.tsx +3 -1
  298. package/src/components/popover/popover.tsx +3 -1
  299. package/src/components/progress/progress.tsx +4 -1
  300. package/src/components/rating/rating.tsx +27 -23
  301. package/src/components/schedule/index.ts +1 -1
  302. package/src/components/schedule/schedule-agenda-list.tsx +6 -7
  303. package/src/components/schedule/schedule-agenda-view.test.tsx +105 -28
  304. package/src/components/schedule/schedule-agenda-view.tsx +41 -28
  305. package/src/components/schedule/schedule-dates.test.ts +37 -52
  306. package/src/components/schedule/schedule-dates.ts +22 -25
  307. package/src/components/schedule/schedule-days-view.tsx +3 -1
  308. package/src/components/schedule/schedule-month-view.tsx +3 -1
  309. package/src/components/schedule/schedule-next-up.tsx +6 -2
  310. package/src/components/schedule/schedule-toolbar.test.tsx +26 -0
  311. package/src/components/schedule/schedule-toolbar.tsx +13 -1
  312. package/src/components/schedule/schedule-types.ts +6 -4
  313. package/src/components/schedule/schedule-views.ts +4 -5
  314. package/src/components/schedule/schedule-year-view.tsx +3 -1
  315. package/src/components/schedule/schedule.test.tsx +66 -22
  316. package/src/components/schedule/schedule.tsx +22 -13
  317. package/src/components/slider/slider.tsx +4 -0
  318. package/src/components/tabs/tabs-data.tsx +17 -14
  319. package/src/components/theme-icon/theme-icon.tsx +1 -1
  320. package/src/components/timeline/timeline.tsx +102 -95
  321. package/src/components/tooltip/tooltip.tsx +2 -1
  322. package/src/lib/as-child.test.tsx +70 -0
  323. package/src/lib/as-child.ts +119 -0
  324. package/src/lib/colors.ts +4 -2
  325. package/src/theme.css +0 -33
  326. package/dist/chunk-2762HZYX.js.map +0 -1
  327. package/dist/chunk-2H46IXW4.js.map +0 -1
  328. package/dist/chunk-6SWK4XG5.js.map +0 -1
  329. package/dist/chunk-EVVMHTCL.js.map +0 -1
  330. package/dist/chunk-HWNPXAEN.js +0 -31
  331. package/dist/chunk-HWNPXAEN.js.map +0 -1
  332. package/dist/chunk-IFWCCAQV.js.map +0 -1
  333. package/dist/chunk-IXKELBJA.js.map +0 -1
  334. package/dist/chunk-J3PELDH3.js.map +0 -1
  335. package/dist/chunk-JBVFWSRQ.js.map +0 -1
  336. package/dist/chunk-NGAQITWP.js.map +0 -1
  337. package/dist/chunk-POKDSVQT.js.map +0 -1
  338. package/dist/chunk-QMW7D5GU.js.map +0 -1
  339. package/dist/chunk-S53FHWNG.js.map +0 -1
  340. package/dist/chunk-TNNH3FVQ.js.map +0 -1
  341. package/dist/chunk-U5GW5EBR.js.map +0 -1
  342. package/dist/chunk-UNSAA7YG.js.map +0 -1
  343. package/dist/chunk-VLUKI3HL.js.map +0 -1
  344. package/dist/chunk-VZ2TPU4B.js.map +0 -1
  345. package/dist/chunk-YIQI2CF3.js.map +0 -1
@@ -0,0 +1,104 @@
1
+ import { type ReactNode } from "react";
2
+ import type { UnavailableProps } from "./available-if";
3
+ /**
4
+ * The two sanctioned ways for a kit part to meet Ark's `asChild`.
5
+ *
6
+ * Ark's factory clones **exactly one** valid element under `asChild` and
7
+ * renders `null` otherwise (`isValidElement(children) ? clone : null`). So a
8
+ * part that renders anything besides a bare `{children}` — an icon, a
9
+ * section, an indicator, a default fallback — breaks in one of two ways:
10
+ *
11
+ * - **It renders nothing.** Two or more JSX child expressions become an
12
+ * array, even when some of them evaluate to `false`
13
+ * (`{start && <Start/>}{children}{end && <End/>}`), and an array is not an
14
+ * element.
15
+ * - **Its own content is lost or misplaced.** Under `asChild`, `children`
16
+ * *is* the consumer's element, so `children ?? <DefaultIcon/>` never
17
+ * reaches the fallback, and a wrapper (`<Provider>{children}</Provider>`)
18
+ * is what gets cloned instead of the consumer's element.
19
+ *
20
+ * Every such part must pick one of these:
21
+ *
22
+ * - **`withAsChildContent`** — the part can sensibly *become* the consumer's
23
+ * element (a menu item rendered as a router `<Link>`, a crumb, an alert
24
+ * that links somewhere). The kit's content is folded into the child's own
25
+ * children, so Ark still receives a single element.
26
+ * - **`NoAsChild`** — the part renders structure that cannot live inside an
27
+ * arbitrary element (a slider's track and thumbs, a scheduler grid). The
28
+ * prop becomes a compile error that says why.
29
+ *
30
+ * `as-child.contract.test.tsx` enforces the choice: it derives every public
31
+ * part that accepts `asChild` from the component entries, renders each one
32
+ * with an `<a>` child, and fails the typecheck when a part is in neither its
33
+ * render table nor `NoAsChild`.
34
+ */
35
+ /**
36
+ * Rebuilds the single `asChild` child's own children through `render`, so
37
+ * kit content (sections, icons, spinners) lands *inside* the element Ark
38
+ * clones instead of beside it. `extra` is merged onto the child too, for the
39
+ * odd prop the kit has to own (a click guard while loading).
40
+ *
41
+ * A child that isn't a single element falls through unchanged, leaving
42
+ * Ark's own handling of the misuse as it is.
43
+ *
44
+ * ```tsx
45
+ * <ArkMenu.Item asChild {...rest}>
46
+ * {withAsChildContent(children, (own) => (
47
+ * <>
48
+ * <StartSection>{startSection}</StartSection>
49
+ * {own}
50
+ * </>
51
+ * ))}
52
+ * </ArkMenu.Item>
53
+ * ```
54
+ */
55
+ export declare const withAsChildContent: (child: ReactNode, render: (own: ReactNode) => ReactNode, extra?: Record<string, unknown>) => ReactNode;
56
+ /**
57
+ * The usual call site: `render` wraps the part's `children` with its own
58
+ * content either way, around `children` normally and inside the consumer's
59
+ * element under `asChild`. One `render` serves both branches, so the two
60
+ * can't drift apart.
61
+ *
62
+ * ```tsx
63
+ * <ArkMenu.Item asChild={asChild} {...rest}>
64
+ * {composeChildren(asChild, children, (own) => <>{icon}{own}</>)}
65
+ * </ArkMenu.Item>
66
+ * ```
67
+ */
68
+ export declare const composeChildren: (asChild: boolean | undefined, children: ReactNode, render: (own: ReactNode) => ReactNode) => ReactNode;
69
+ /** The sentence a caller reads when passing `asChild` to a `NoAsChild` part. */
70
+ export type NoAsChildReason = "renders its own structure around its children, so asChild is not supported";
71
+ /**
72
+ * The forbid shape on its own: `asChild` typed as a branded `Unavailable`.
73
+ * Intersect it beside a props type (`Omit<RootProps, "children"> &
74
+ * ForbidAsChild & { data }`); `NoAsChild<P>` is the same thing as a wrapper.
75
+ *
76
+ * Uses the brand rather than omitting the key, because omission is silent
77
+ * on a JSX spread (`<Slider {...props} />`), which is exactly how prop bags
78
+ * get forwarded. Either way the error names the reason:
79
+ *
80
+ * Type 'boolean' is not assignable to type 'Unavailable<"renders its own
81
+ * structure around its children, so asChild is not supported">'
82
+ */
83
+ export type ForbidAsChild = UnavailableProps<{
84
+ asChild?: boolean;
85
+ }, NoAsChildReason>;
86
+ /**
87
+ * `P` with `asChild` forbidden: `P & ForbidAsChild`, so `asChild` resolves
88
+ * to `(boolean & Unavailable<…>) | undefined`, which nothing but `undefined`
89
+ * satisfies.
90
+ *
91
+ * An intersection, not `Omit<P, "asChild"> & …`. `Omit` re-maps every key of
92
+ * a large HTML/Ark props type, and measured on the forbidden parts that cost
93
+ * each importing file about 38k extra type instantiations (+8.6%); the
94
+ * intersection costs nothing measurable. It also leaves a union in `P` (a
95
+ * discriminated `type` / `color` pair, a slot-size union) and any generic
96
+ * untouched, where `Omit` would flatten the one and hide the other from
97
+ * inference.
98
+ *
99
+ * The component destructures `asChild` out before spreading the rest onto
100
+ * its Ark part (`({ asChild: _asChild, ...rest })`), so a JS caller that
101
+ * passes it anyway gets the normal render rather than Ark's `null`.
102
+ */
103
+ export type NoAsChild<P> = P & ForbidAsChild;
104
+ //# sourceMappingURL=as-child.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"as-child.d.ts","sourceRoot":"","sources":["../../src/lib/as-child.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,kBAAkB,UACtB,SAAS,UACR,CAAC,GAAG,EAAE,SAAS,KAAK,SAAS,UAC7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC9B,SAGF,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,YACjB,OAAO,GAAG,SAAS,YAClB,SAAS,UACX,CAAC,GAAG,EAAE,SAAS,KAAK,SAAS,KACpC,SAAgF,CAAA;AAEnF,gFAAgF;AAChF,MAAM,MAAM,eAAe,GACzB,4EAA4E,CAAA;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,aAAa,GAAG,gBAAgB,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,eAAe,CAAC,CAAA;AAEpF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,aAAa,CAAA"}
@@ -9,6 +9,6 @@
9
9
  * 3. Add a `[data-color="<name>"]` block in `colors.css` with the slot vars
10
10
  * (and a dark-mode override if the shade should shift).
11
11
  */
12
- export declare const COLORS: readonly ["brand", "gray", "neutral", "red", "orange", "yellow", "green", "teal", "cyan", "blue", "purple", "pink"];
12
+ export declare const COLORS: readonly ["brand", "neutral", "red", "orange", "yellow", "green", "teal", "cyan", "blue", "purple", "pink"];
13
13
  export type Color = (typeof COLORS)[number] | (string & {});
14
14
  //# sourceMappingURL=colors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/lib/colors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM,YACjB,OAAO,EACP,MAAM,EAGN,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,CACE,CAAA;AAIV,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA"}
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/lib/colors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM,YACjB,OAAO,EAMP,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,MAAM,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,CACE,CAAA;AAIV,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA"}
package/dist/theme.css CHANGED
@@ -48,34 +48,6 @@
48
48
  --color-gray-dark-900: #13161b;
49
49
  --color-gray-dark-950: #0c0e12;
50
50
 
51
- /* Gray Modern */
52
- --color-gray-modern-25: #fcfcfd;
53
- --color-gray-modern-50: #f8fafc;
54
- --color-gray-modern-100: #eef2f6;
55
- --color-gray-modern-200: #e3e8ef;
56
- --color-gray-modern-300: #cdd5df;
57
- --color-gray-modern-400: #9aa4b2;
58
- --color-gray-modern-500: #697586;
59
- --color-gray-modern-600: #4b5565;
60
- --color-gray-modern-700: #364152;
61
- --color-gray-modern-800: #202939;
62
- --color-gray-modern-900: #121926;
63
- --color-gray-modern-950: #0d121c;
64
-
65
- /* Gray Blue */
66
- --color-gray-blue-25: #fcfcfd;
67
- --color-gray-blue-50: #f8f9fc;
68
- --color-gray-blue-100: #eaecf5;
69
- --color-gray-blue-200: #d5d9eb;
70
- --color-gray-blue-300: #b3b8db;
71
- --color-gray-blue-400: #717bbc;
72
- --color-gray-blue-500: #4e5ba6;
73
- --color-gray-blue-600: #3e4784;
74
- --color-gray-blue-700: #363f72;
75
- --color-gray-blue-800: #293056;
76
- --color-gray-blue-900: #101323;
77
- --color-gray-blue-950: #0d0f1c;
78
-
79
51
  /* Gray True */
80
52
  --color-gray-true-25: #fcfcfc;
81
53
  --color-gray-true-50: #f7f7f7;
@@ -1274,8 +1246,3 @@ body {
1274
1246
 
1275
1247
  /* Variants to use with slider's values */
1276
1248
  @custom-variant state-under-or-at (&:is([data-state="under-value"], [data-state="at-value"]));
1277
-
1278
- *,
1279
- :root {
1280
- @apply scrollbar-thumb-gray-300/60 hover:scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-500/60 dark:hover:scrollbar-thumb-gray-500 scrollbar-track-transparent;
1281
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@42-central/ui-react",
3
- "version": "0.17.1",
3
+ "version": "0.18.1",
4
4
  "description": "React UI kit for 42 tools",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -10,6 +10,7 @@
10
10
  "files": [
11
11
  "dist",
12
12
  "src",
13
+ "biome",
13
14
  "README.md"
14
15
  ],
15
16
  "exports": {