@eluan/core 0.5.1 → 0.7.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 (417) hide show
  1. package/README.md +41 -3
  2. package/bin/eluan.mjs +75 -0
  3. package/bin/lib/check.mjs +271 -0
  4. package/bin/lib/skill.mjs +123 -0
  5. package/dist/{action-popover-D6K9aVFk.cjs → action-popover-Bt7U0g8y.cjs} +1 -1
  6. package/dist/{action-popover-BVJQBuky.js → action-popover-jEeycwXM.js} +2 -2
  7. package/dist/action-popover.cjs +1 -1
  8. package/dist/action-popover.js +1 -1
  9. package/dist/{avatar-CS5f1irF.js → avatar-C1LUOzjw.js} +1 -1
  10. package/dist/{avatar-Co-k8KqV.cjs → avatar-SwIO4oyt.cjs} +1 -1
  11. package/dist/avatar.cjs +1 -1
  12. package/dist/avatar.js +1 -1
  13. package/dist/badge-BLInSFM-.cjs +1 -0
  14. package/dist/{badge-D9NYZFWH.js → badge-Bj7i1Xf5.js} +20 -18
  15. package/dist/badge.cjs +1 -1
  16. package/dist/badge.js +1 -1
  17. package/dist/{banner-CyYFLZXw.js → banner-BqEziMp4.js} +11 -12
  18. package/dist/banner-C8OECYHz.cjs +1 -0
  19. package/dist/banner.cjs +1 -1
  20. package/dist/banner.js +1 -1
  21. package/dist/box-DG-tkaYi.cjs +1 -0
  22. package/dist/box-DKbNgGGG.js +17 -0
  23. package/dist/box.cjs +1 -0
  24. package/dist/box.d.ts +1 -0
  25. package/dist/box.js +5 -0
  26. package/dist/{breadcrumb-NWXeCH5q.cjs → breadcrumb-BGH_YhOZ.cjs} +1 -1
  27. package/dist/{breadcrumb-Cm1nb9Xj.js → breadcrumb-BVXSOA4Z.js} +2 -2
  28. package/dist/breadcrumb.cjs +1 -1
  29. package/dist/breadcrumb.js +1 -1
  30. package/dist/button-BUHQOcAo.cjs +1 -0
  31. package/dist/{button-ANAPDrvs.js → button-fCYiYUPE.js} +69 -60
  32. package/dist/button.cjs +1 -1
  33. package/dist/button.js +1 -1
  34. package/dist/calendar-2s_jGUBa.cjs +76 -0
  35. package/dist/{calendar-BpBsomy5.js → calendar-BN9BkjO_.js} +22 -22
  36. package/dist/calendar.cjs +1 -1
  37. package/dist/calendar.js +1 -1
  38. package/dist/card-CfSvhkGH.js +81 -0
  39. package/dist/card-DlP39QSZ.cjs +1 -0
  40. package/dist/card.cjs +1 -1
  41. package/dist/card.js +1 -1
  42. package/dist/{carousel-DuP0hvF-.js → carousel-BO6KUdP8.js} +1 -1
  43. package/dist/{carousel-BfL7oy_q.cjs → carousel-dypuabh8.cjs} +1 -1
  44. package/dist/carousel.cjs +1 -1
  45. package/dist/carousel.js +1 -1
  46. package/dist/{checkbox-Bi0Kmuut.js → checkbox-CGUTGery.js} +1 -1
  47. package/dist/{checkbox-M8DmWKiC.cjs → checkbox-Cq9sHU_S.cjs} +1 -1
  48. package/dist/{checkbox-group-KBwPhjmW.cjs → checkbox-group-DGXZ4o2-.cjs} +1 -1
  49. package/dist/{checkbox-group-CQMEJnhD.js → checkbox-group-Tkio3IhK.js} +1 -1
  50. package/dist/checkbox-group.cjs +1 -1
  51. package/dist/checkbox-group.js +1 -1
  52. package/dist/checkbox.cjs +1 -1
  53. package/dist/checkbox.js +1 -1
  54. package/dist/{code-block-C9u140Ob.js → code-block-CAXUOKNI.js} +10 -10
  55. package/dist/{code-block-_dFw7Su1.cjs → code-block-Co8uGXiG.cjs} +2 -2
  56. package/dist/code-block.cjs +1 -1
  57. package/dist/code-block.js +1 -1
  58. package/dist/command-C50Jkuv7.js +132 -0
  59. package/dist/command-DqNgPVsf.cjs +9 -0
  60. package/dist/command.cjs +1 -1
  61. package/dist/command.js +1 -1
  62. package/dist/components/box.d.ts +12 -0
  63. package/dist/components/card.d.ts +7 -2
  64. package/dist/components/grid.d.ts +35 -0
  65. package/dist/components/icon.d.ts +26 -0
  66. package/dist/components/input.d.ts +1 -1
  67. package/dist/components/layout-shared.d.ts +307 -0
  68. package/dist/components/navigation-drawer.d.ts +25 -5
  69. package/dist/components/row.d.ts +18 -0
  70. package/dist/components/stack.d.ts +14 -0
  71. package/dist/components/table.d.ts +8 -4
  72. package/dist/components/tone-shared.d.ts +39 -0
  73. package/dist/components/typography.d.ts +22 -2
  74. package/dist/components/visually-hidden.d.ts +11 -0
  75. package/dist/{context-menu-Bd6m1RYU.js → context-menu-CTyczUjx.js} +34 -34
  76. package/dist/context-menu-oQ6xMN6t.cjs +1 -0
  77. package/dist/context-menu.cjs +1 -1
  78. package/dist/context-menu.js +1 -1
  79. package/dist/{credit-card-input-CUqA9CX3.cjs → credit-card-input-C6oNQBAl.cjs} +1 -1
  80. package/dist/{credit-card-input-DN-8vaFj.js → credit-card-input-aYftFdRo.js} +1 -1
  81. package/dist/credit-card-input.cjs +1 -1
  82. package/dist/credit-card-input.js +1 -1
  83. package/dist/{date-picker-ni8td8Ru.js → date-picker-DK-G61Nn.js} +3 -3
  84. package/dist/{date-picker-DGBsfZXx.cjs → date-picker-D_aU_P3A.cjs} +1 -1
  85. package/dist/date-picker.cjs +1 -1
  86. package/dist/date-picker.js +1 -1
  87. package/dist/{datetime-picker-C1d63MaA.cjs → datetime-picker-897BvwxW.cjs} +1 -1
  88. package/dist/{datetime-picker-DsnHYRK-.js → datetime-picker-CECtSobs.js} +4 -4
  89. package/dist/datetime-picker.cjs +1 -1
  90. package/dist/datetime-picker.js +1 -1
  91. package/dist/decimal-input-B7IHYVXP.cjs +1 -0
  92. package/dist/decimal-input-ohejnbQg.js +177 -0
  93. package/dist/decimal-input.cjs +1 -1
  94. package/dist/decimal-input.js +1 -1
  95. package/dist/dialog-DIGW7qln.cjs +1 -0
  96. package/dist/dialog-DVhnZFqE.js +64 -0
  97. package/dist/dialog.cjs +1 -1
  98. package/dist/dialog.js +1 -1
  99. package/dist/dropdown-menu-BV2rX_ow.cjs +1 -0
  100. package/dist/dropdown-menu-C6NPtU9J.js +115 -0
  101. package/dist/dropdown-menu.cjs +1 -1
  102. package/dist/dropdown-menu.js +1 -1
  103. package/dist/{email-input-pX0hlYV3.js → email-input-CRd87a_c.js} +1 -1
  104. package/dist/{email-input-DFI4h_KN.cjs → email-input-Dvj1xSzJ.cjs} +1 -1
  105. package/dist/email-input.cjs +1 -1
  106. package/dist/email-input.js +1 -1
  107. package/dist/{fieldset-5V8wx-KE.js → fieldset-BxINrO_H.js} +6 -6
  108. package/dist/fieldset-C6cahGeV.cjs +1 -0
  109. package/dist/fieldset.cjs +1 -1
  110. package/dist/fieldset.js +1 -1
  111. package/dist/file-input-BzYcnore.cjs +1 -0
  112. package/dist/{file-input-B_aBgxmT.js → file-input-Ch16hNA1.js} +55 -55
  113. package/dist/file-input.cjs +1 -1
  114. package/dist/file-input.js +1 -1
  115. package/dist/{footer-DB0_-IwN.cjs → footer-B-fRLhqP.cjs} +1 -1
  116. package/dist/{footer-B3KUIwXW.js → footer-BiiV6-ZD.js} +9 -9
  117. package/dist/footer.cjs +1 -1
  118. package/dist/footer.js +1 -1
  119. package/dist/grid-BDz4Xs6M.cjs +1 -0
  120. package/dist/grid-BX5vZjDo.js +612 -0
  121. package/dist/grid.cjs +1 -0
  122. package/dist/grid.d.ts +1 -0
  123. package/dist/grid.js +5 -0
  124. package/dist/header-CvhqGcuo.cjs +1 -0
  125. package/dist/{header-CDOWlOAR.js → header-DwvyTpRi.js} +22 -22
  126. package/dist/header.cjs +1 -1
  127. package/dist/header.js +1 -1
  128. package/dist/hover-card-BQpzaazK.js +21 -0
  129. package/dist/{hover-card-C5KsTSZR.cjs → hover-card-V5A1HzEu.cjs} +1 -1
  130. package/dist/hover-card.cjs +1 -1
  131. package/dist/hover-card.js +1 -1
  132. package/dist/icon-BmLOodCQ.cjs +1 -0
  133. package/dist/icon-BwDfkIdR.js +153 -0
  134. package/dist/icon.cjs +1 -0
  135. package/dist/icon.d.ts +1 -0
  136. package/dist/icon.js +5 -0
  137. package/dist/index.cjs +10 -5
  138. package/dist/index.d.ts +6 -0
  139. package/dist/index.js +593 -516
  140. package/dist/input-Dtr0tlf7.cjs +1 -0
  141. package/dist/input-Zs45H33i.js +131 -0
  142. package/dist/input-otp-D-T32R3O.cjs +1 -0
  143. package/dist/{input-otp-DmEGB1nu.js → input-otp-DwdX6VlR.js} +33 -33
  144. package/dist/input-otp.cjs +1 -1
  145. package/dist/input-otp.js +1 -1
  146. package/dist/input.cjs +1 -1
  147. package/dist/input.js +1 -1
  148. package/dist/layout-shared-B_1iX4Hj.js +319 -0
  149. package/dist/layout-shared-CsBZcT4V.cjs +1 -0
  150. package/dist/{menubar-F1_bhmku.js → menubar-CodcV4b7.js} +28 -28
  151. package/dist/menubar-bOYi1jKo.cjs +1 -0
  152. package/dist/menubar.cjs +1 -1
  153. package/dist/menubar.js +1 -1
  154. package/dist/multi-select-ChfbxrG3.js +85 -0
  155. package/dist/multi-select-D573XqUT.cjs +1 -0
  156. package/dist/multi-select.cjs +1 -1
  157. package/dist/multi-select.js +1 -1
  158. package/dist/navigation-drawer-C7YYtBXz.js +198 -0
  159. package/dist/navigation-drawer-Cu2q1NMn.cjs +1 -0
  160. package/dist/navigation-drawer.cjs +1 -1
  161. package/dist/navigation-drawer.js +1 -1
  162. package/dist/{navigation-menu-BjA-PdMY.js → navigation-menu-BEp603xA.js} +16 -16
  163. package/dist/{navigation-menu-BtpLfxHN.cjs → navigation-menu-tw5cD7mL.cjs} +2 -2
  164. package/dist/navigation-menu.cjs +1 -1
  165. package/dist/navigation-menu.js +1 -1
  166. package/dist/number-input-C1RS-p2C.js +66 -0
  167. package/dist/number-input-N3-IvxZT.cjs +1 -0
  168. package/dist/number-input.cjs +1 -1
  169. package/dist/number-input.js +1 -1
  170. package/dist/{pagination-4IuE_APs.cjs → pagination-C6e9oVes.cjs} +1 -1
  171. package/dist/{pagination-DTWRjiOm.js → pagination-XlaE-Plb.js} +32 -32
  172. package/dist/pagination.cjs +1 -1
  173. package/dist/pagination.js +1 -1
  174. package/dist/{password-input-B9V45d3Q.js → password-input-CR6FT6Rh.js} +2 -2
  175. package/dist/{password-input-BwnlHPbX.cjs → password-input-CZ19HPZd.cjs} +1 -1
  176. package/dist/password-input.cjs +1 -1
  177. package/dist/password-input.js +1 -1
  178. package/dist/{phone-input-BQjZj5jI.cjs → phone-input-BZhkLmI6.cjs} +1 -1
  179. package/dist/{phone-input-CSBpGHvI.js → phone-input-CT9W87M7.js} +2 -2
  180. package/dist/phone-input.cjs +1 -1
  181. package/dist/phone-input.js +1 -1
  182. package/dist/popover-CE0n5BQv.cjs +1 -0
  183. package/dist/popover-CguR4kP7.js +70 -0
  184. package/dist/popover.cjs +1 -1
  185. package/dist/popover.js +1 -1
  186. package/dist/{progress-Dz_it5I-.js → progress-BpUNvswZ.js} +8 -7
  187. package/dist/progress-DSy_jRee.cjs +1 -0
  188. package/dist/progress.cjs +1 -1
  189. package/dist/progress.js +1 -1
  190. package/dist/providers/create-theme.d.ts +11 -2
  191. package/dist/providers/eluan-provider.d.ts +8 -6
  192. package/dist/{radio-group-C--1neiq.cjs → radio-group-9gozRouT.cjs} +1 -1
  193. package/dist/{radio-group-CNMPZx_2.js → radio-group-Bs9933bk.js} +6 -6
  194. package/dist/radio-group.cjs +1 -1
  195. package/dist/radio-group.js +1 -1
  196. package/dist/{rich-text-BZSyuYSo.js → rich-text-CuAa5WkV.js} +21 -21
  197. package/dist/{rich-text-DerWxzdn.cjs → rich-text-p7H-0qE7.cjs} +2 -2
  198. package/dist/rich-text.cjs +1 -1
  199. package/dist/rich-text.js +1 -1
  200. package/dist/row-BYAk7G5d.js +37 -0
  201. package/dist/row-Bjn-GQAC.cjs +1 -0
  202. package/dist/row.cjs +1 -0
  203. package/dist/row.d.ts +1 -0
  204. package/dist/row.js +5 -0
  205. package/dist/{search-input-bFNW6oiE.js → search-input-CxKLBmii.js} +53 -53
  206. package/dist/{search-input-Dmmo-BEL.cjs → search-input-XmoL2YjY.cjs} +1 -1
  207. package/dist/search-input.cjs +1 -1
  208. package/dist/search-input.js +1 -1
  209. package/dist/select-BCDam7PR.cjs +1 -0
  210. package/dist/select-QgjG43ye.js +119 -0
  211. package/dist/select.cjs +1 -1
  212. package/dist/select.js +1 -1
  213. package/dist/sheet-BxNmBMti.cjs +1 -0
  214. package/dist/{sheet-D5HWF66e.js → sheet-D0hVuH9a.js} +7 -7
  215. package/dist/sheet.cjs +1 -1
  216. package/dist/sheet.js +1 -1
  217. package/dist/slider-Cv7uIp4z.js +16 -0
  218. package/dist/slider-Dci7KGjg.cjs +1 -0
  219. package/dist/slider.cjs +1 -1
  220. package/dist/slider.js +1 -1
  221. package/dist/stack-Ck1w2iJu.cjs +1 -0
  222. package/dist/stack-D2btWM1t.js +27 -0
  223. package/dist/stack.cjs +1 -0
  224. package/dist/stack.d.ts +1 -0
  225. package/dist/stack.js +5 -0
  226. package/dist/{stepper-D5nDwJUz.cjs → stepper-ByYKX7qw.cjs} +1 -1
  227. package/dist/{stepper-BtlKiHtd.js → stepper-Copsj87A.js} +4 -4
  228. package/dist/stepper.cjs +1 -1
  229. package/dist/stepper.js +1 -1
  230. package/dist/styles.css +1205 -189
  231. package/dist/switch-DQ4R-gjR.cjs +1 -0
  232. package/dist/switch-WaESqUuN.js +9 -0
  233. package/dist/switch.cjs +1 -1
  234. package/dist/switch.js +1 -1
  235. package/dist/table-YKEWGYnI.js +149 -0
  236. package/dist/table-zbkgP43L.cjs +1 -0
  237. package/dist/table.cjs +1 -1
  238. package/dist/table.js +1 -1
  239. package/dist/tabs-BwNIi7Dl.js +22 -0
  240. package/dist/tabs-DItFd2o9.cjs +1 -0
  241. package/dist/tabs.cjs +1 -1
  242. package/dist/tabs.js +1 -1
  243. package/dist/textarea-BWAPWDRt.js +8 -0
  244. package/dist/textarea-CniUTipL.cjs +1 -0
  245. package/dist/textarea.cjs +1 -1
  246. package/dist/textarea.js +1 -1
  247. package/dist/{time-input-BPoFvoeM.js → time-input-CeJVQKWO.js} +68 -68
  248. package/dist/time-input-eVFFYo10.cjs +1 -0
  249. package/dist/time-input.cjs +1 -1
  250. package/dist/time-input.js +1 -1
  251. package/dist/{toast-BK0ulAzi.cjs → toast-84RpQJtn.cjs} +1 -1
  252. package/dist/{toast-hI3pdZ2X.js → toast-BGKaAZwf.js} +1 -1
  253. package/dist/toast.cjs +1 -1
  254. package/dist/toast.js +1 -1
  255. package/dist/{toggle-Dv1VZ5Le.js → toggle-CxHqX2-V.js} +11 -11
  256. package/dist/toggle-DrJJAflI.cjs +1 -0
  257. package/dist/toggle-group-DvoxSJMq.cjs +1 -0
  258. package/dist/{toggle-group-DE8BPZih.js → toggle-group-k-kiBnEe.js} +21 -21
  259. package/dist/toggle-group.cjs +1 -1
  260. package/dist/toggle-group.js +1 -1
  261. package/dist/toggle.cjs +1 -1
  262. package/dist/toggle.js +1 -1
  263. package/dist/{tooltip-DZqn4wKl.js → tooltip-1Biy6A0m.js} +3 -3
  264. package/dist/{tooltip-faf1dIXp.cjs → tooltip-DIerl2vz.cjs} +1 -1
  265. package/dist/tooltip.cjs +1 -1
  266. package/dist/tooltip.js +1 -1
  267. package/dist/{tree-view-CyeJR7cW.js → tree-view-Bswh2RGr.js} +37 -37
  268. package/dist/tree-view-DDX9QjzF.cjs +1 -0
  269. package/dist/tree-view.cjs +1 -1
  270. package/dist/tree-view.js +1 -1
  271. package/dist/visually-hidden-BQMRYGxP.js +14 -0
  272. package/dist/visually-hidden-DzxxOswl.cjs +1 -0
  273. package/dist/visually-hidden.cjs +1 -0
  274. package/dist/visually-hidden.d.ts +1 -0
  275. package/dist/visually-hidden.js +5 -0
  276. package/package.json +12 -8
  277. package/skills/eluan/DESIGN.md +411 -0
  278. package/skills/eluan/SKILL.md +202 -0
  279. package/skills/eluan/components/accordion.md +212 -0
  280. package/skills/eluan/components/action-popover.md +266 -0
  281. package/skills/eluan/components/aspect-ratio.md +169 -0
  282. package/skills/eluan/components/avatar.md +277 -0
  283. package/skills/eluan/components/badge.md +190 -0
  284. package/skills/eluan/components/banner.md +247 -0
  285. package/skills/eluan/components/box.md +166 -0
  286. package/skills/eluan/components/breadcrumb.md +240 -0
  287. package/skills/eluan/components/button.md +214 -0
  288. package/skills/eluan/components/calendar.md +192 -0
  289. package/skills/eluan/components/card.md +271 -0
  290. package/skills/eluan/components/carousel.md +274 -0
  291. package/skills/eluan/components/checkbox-group.md +228 -0
  292. package/skills/eluan/components/checkbox.md +226 -0
  293. package/skills/eluan/components/code-block.md +193 -0
  294. package/skills/eluan/components/collapsible.md +240 -0
  295. package/skills/eluan/components/command.md +359 -0
  296. package/skills/eluan/components/context-menu.md +296 -0
  297. package/skills/eluan/components/credit-card-input.md +217 -0
  298. package/skills/eluan/components/date-picker.md +255 -0
  299. package/skills/eluan/components/date-time-picker.md +196 -0
  300. package/skills/eluan/components/decimal-input.md +232 -0
  301. package/skills/eluan/components/dialog.md +322 -0
  302. package/skills/eluan/components/drawer.md +292 -0
  303. package/skills/eluan/components/dropdown-menu.md +450 -0
  304. package/skills/eluan/components/email-input.md +200 -0
  305. package/skills/eluan/components/fieldset.md +219 -0
  306. package/skills/eluan/components/file-input.md +249 -0
  307. package/skills/eluan/components/footer.md +290 -0
  308. package/skills/eluan/components/form-label.md +254 -0
  309. package/skills/eluan/components/grid.md +192 -0
  310. package/skills/eluan/components/header.md +242 -0
  311. package/skills/eluan/components/hover-card.md +215 -0
  312. package/skills/eluan/components/icon.md +161 -0
  313. package/skills/eluan/components/input-otp.md +227 -0
  314. package/skills/eluan/components/input.md +249 -0
  315. package/skills/eluan/components/kbd.md +216 -0
  316. package/skills/eluan/components/media.md +244 -0
  317. package/skills/eluan/components/menubar.md +300 -0
  318. package/skills/eluan/components/multi-select.md +221 -0
  319. package/skills/eluan/components/navigation-drawer.md +297 -0
  320. package/skills/eluan/components/navigation-menu.md +291 -0
  321. package/skills/eluan/components/number-input.md +190 -0
  322. package/skills/eluan/components/pagination.md +262 -0
  323. package/skills/eluan/components/password-input.md +218 -0
  324. package/skills/eluan/components/phone-input.md +205 -0
  325. package/skills/eluan/components/popover.md +250 -0
  326. package/skills/eluan/components/progress.md +185 -0
  327. package/skills/eluan/components/radio-group.md +232 -0
  328. package/skills/eluan/components/rich-text.md +195 -0
  329. package/skills/eluan/components/row.md +174 -0
  330. package/skills/eluan/components/scroll-area.md +203 -0
  331. package/skills/eluan/components/search-input.md +281 -0
  332. package/skills/eluan/components/segmented-control.md +201 -0
  333. package/skills/eluan/components/select.md +296 -0
  334. package/skills/eluan/components/separator.md +179 -0
  335. package/skills/eluan/components/sheet.md +326 -0
  336. package/skills/eluan/components/skeleton.md +202 -0
  337. package/skills/eluan/components/slider.md +195 -0
  338. package/skills/eluan/components/spinner.md +187 -0
  339. package/skills/eluan/components/stack.md +158 -0
  340. package/skills/eluan/components/stepper.md +236 -0
  341. package/skills/eluan/components/switch.md +218 -0
  342. package/skills/eluan/components/table.md +348 -0
  343. package/skills/eluan/components/tabs.md +277 -0
  344. package/skills/eluan/components/textarea.md +202 -0
  345. package/skills/eluan/components/time-input.md +181 -0
  346. package/skills/eluan/components/toast.md +251 -0
  347. package/skills/eluan/components/toggle-group.md +241 -0
  348. package/skills/eluan/components/toggle.md +198 -0
  349. package/skills/eluan/components/tooltip.md +222 -0
  350. package/skills/eluan/components/tree-view.md +213 -0
  351. package/skills/eluan/components/typography.md +210 -0
  352. package/skills/eluan/components/visually-hidden.md +132 -0
  353. package/skills/eluan/foundations/colour.md +257 -0
  354. package/skills/eluan/foundations/elevation.md +86 -0
  355. package/skills/eluan/foundations/iconography.md +70 -0
  356. package/skills/eluan/foundations/look.md +135 -0
  357. package/skills/eluan/foundations/motion.md +60 -0
  358. package/skills/eluan/foundations/radius.md +73 -0
  359. package/skills/eluan/foundations/spacing.md +98 -0
  360. package/skills/eluan/foundations/theming.md +212 -0
  361. package/skills/eluan/foundations/typography.md +169 -0
  362. package/skills/eluan/patterns/app-shell.md +222 -0
  363. package/skills/eluan/patterns/dashboard.md +249 -0
  364. package/skills/eluan/patterns/empty-states.md +78 -0
  365. package/skills/eluan/patterns/feedback.md +95 -0
  366. package/skills/eluan/patterns/forms.md +138 -0
  367. package/skills/eluan/patterns/navigation.md +96 -0
  368. package/skills/eluan/patterns/page-layout.md +185 -0
  369. package/dist/badge-DXKWztL-.cjs +0 -1
  370. package/dist/banner-COlEFRuK.cjs +0 -1
  371. package/dist/button-Ny6OF8Un.cjs +0 -1
  372. package/dist/calendar-7LX5YGGT.cjs +0 -76
  373. package/dist/card-BC_4C3ns.js +0 -70
  374. package/dist/card-C88--zB4.cjs +0 -1
  375. package/dist/command-BCl0seLL.cjs +0 -9
  376. package/dist/command-Chs5VlBL.js +0 -132
  377. package/dist/context-menu-1WehRCpR.cjs +0 -1
  378. package/dist/decimal-input-BLmifKF2.cjs +0 -1
  379. package/dist/decimal-input-yTk35W_5.js +0 -177
  380. package/dist/dialog-B8eWKqzS.js +0 -64
  381. package/dist/dialog-DWYtFhZl.cjs +0 -1
  382. package/dist/dropdown-menu-_h_fqgvS.cjs +0 -1
  383. package/dist/dropdown-menu-p0NkOoTP.js +0 -115
  384. package/dist/fieldset-C3aAINhi.cjs +0 -1
  385. package/dist/file-input-D62FEnKg.cjs +0 -1
  386. package/dist/header-CiZQY_7S.cjs +0 -1
  387. package/dist/hover-card-C_FCzE41.js +0 -21
  388. package/dist/input-BrGJn-D9.cjs +0 -1
  389. package/dist/input-Cccufiqn.js +0 -128
  390. package/dist/input-otp-DcZ7wyjs.cjs +0 -1
  391. package/dist/menubar-CKWQEl7c.cjs +0 -1
  392. package/dist/multi-select-B6NBbDCW.js +0 -85
  393. package/dist/multi-select-kcoUbSwE.cjs +0 -1
  394. package/dist/navigation-drawer-BbeDYPhu.js +0 -171
  395. package/dist/navigation-drawer-DOOHfbY3.cjs +0 -1
  396. package/dist/number-input-Bc7jUsu-.cjs +0 -1
  397. package/dist/number-input-vICbRc2y.js +0 -66
  398. package/dist/popover-DPc4rRsR.js +0 -70
  399. package/dist/popover-Db6VOysz.cjs +0 -1
  400. package/dist/progress-DpQjGEyn.cjs +0 -1
  401. package/dist/select-1Eb3NSrR.cjs +0 -1
  402. package/dist/select-DDSYjKtj.js +0 -119
  403. package/dist/sheet-7NP1LuHy.cjs +0 -1
  404. package/dist/slider-CZQBAXup.js +0 -16
  405. package/dist/slider-DdEOapYP.cjs +0 -1
  406. package/dist/switch-C7EBLT5H.js +0 -9
  407. package/dist/switch-KzBijHMJ.cjs +0 -1
  408. package/dist/table-DopzfXYj.js +0 -101
  409. package/dist/table-xNu_KUaU.cjs +0 -1
  410. package/dist/tabs-C9NKBmH0.js +0 -22
  411. package/dist/tabs-DztJ2iVc.cjs +0 -1
  412. package/dist/textarea-DXUk1b_-.js +0 -8
  413. package/dist/textarea-Dl-daLHR.cjs +0 -1
  414. package/dist/time-input-DR2snTgB.cjs +0 -1
  415. package/dist/toggle-Bvh1v32T.cjs +0 -1
  416. package/dist/toggle-group-SyHMwO90.cjs +0 -1
  417. package/dist/tree-view-CNvEc1TT.cjs +0 -1
@@ -0,0 +1,161 @@
1
+ ---
2
+ name: Icon
3
+ use_when: A lucide icon (or inline svg) sits next to text, in a list row or inside a Button, and needs sizing to a --size-* token.
4
+ instead_of: Button with an icon size for an icon-only action; Avatar for a person's picture; Spinner for loading; Lucide's numeric size prop or a px width.
5
+ source: packages/core/src/components/icon.tsx
6
+ ---
7
+
8
+ # Icon
9
+
10
+ ## 1. Overview
11
+
12
+ Icon sizes an svg child to a `--size-*` token, so icons follow the spacing density like the controls around them. It wraps the svg in an `inline-flex` span that doesn't shrink, sets the span's width and height from `size`, and makes the svg fill it, overriding Lucide's 24px default. `tone` colours it from the same tones as Typography; by default it inherits the text colour. It's decorative by default (`aria-hidden`). `after` adds a trailing gap for an icon followed by text outside a gapped Row; `asChild` puts the sizing on the svg itself with no wrapping span. It drops `className` and `style`.
13
+
14
+ ## 2. When to use
15
+
16
+ - An icon beside a label: in a Button, a list row, a Badge or a line of text.
17
+ - A standalone decorative icon in an empty state or a Card header.
18
+ - Any lucide icon you'd otherwise size with `size={16}` or a width style.
19
+
20
+ ### When not to use
21
+
22
+ - An icon-only action → [Button](./button.md) with `size="icon"` (or `iconSm`, `iconXs`, `iconInline`) and an `aria-label`; put the Icon inside it.
23
+ - A person or brand image → [Avatar](./avatar.md) or [Media](./media.md).
24
+ - Something loading → [Spinner](./spinner.md).
25
+ - Inputs with `type="search"`, `email`, `password`, `tel` or `url` → [Input](./input.md) already shows an icon.
26
+
27
+ ## 3. Anatomy
28
+
29
+ 1. **Box**: a `span` sized to the token, `inline-flex` and centred, that never shrinks in a flex row.
30
+ 2. **Glyph**: the svg child, filling the box. It inherits `currentColor`.
31
+
32
+ With `asChild` there is no span: the svg is the box.
33
+
34
+ ## 4. Variants
35
+
36
+ Icon has no `variant`. Colour comes from the surrounding text unless `tone` sets one: `default`, `muted`, `inverse`, `positive`, `destructive`, `interactive` or `interactive-muted`, the same tones as Typography.
37
+
38
+ ## 5. Sizes
39
+
40
+ `size` is a `--size-*` step from `"xxs"` to `"4xl"`, default `"xs"`:
41
+
42
+ | Size | Use for |
43
+ | --- | --- |
44
+ | `xxs` | Inside text, Badges and dense controls |
45
+ | `xs` | Beside a label in a Button or list row (the default) |
46
+ | `sm`, `md` | Standalone icons in a Card header or toolbar |
47
+ | `xl` and up | Empty-state illustrations |
48
+
49
+ See [iconography](../foundations/iconography.md) for the token values per density.
50
+
51
+ ## 6. States
52
+
53
+ | State | Looks like | Notes |
54
+ | --- | --- | --- |
55
+ | Default | The glyph at the token size | Static. Icon has no interactive states; the control around it does. |
56
+
57
+ ## 7. Content guidelines
58
+
59
+ - Pair an icon with a label wherever space allows; an icon alone is ambiguous.
60
+ - Use one icon style throughout: lucide-react. Don't mix sets.
61
+
62
+ ## 8. Rules
63
+
64
+ 1. Size every icon with Icon or a `--size-*` token. Never use Lucide's numeric `size` prop or a px width.
65
+ 2. Let the icon inherit colour. When it must differ from the text beside it, set `tone`; never a colour value.
66
+ 3. Leave it decorative (`aria-hidden`, the default) when a visible label or the control's `aria-label` already says what it means.
67
+ 4. In a Row, space the icon with the Row's `gap`. Use `after` only when the icon sits in running text or another element without a gap.
68
+ 5. Give it exactly one svg child.
69
+ 6. Don't pass `className` or `style`; they're dropped.
70
+
71
+ ## 9. Dos and don'ts
72
+
73
+ **Do:** size the icon with a token and let the Button lay it out.
74
+
75
+ ```tsx
76
+ <Button>
77
+ <Icon size="xs">
78
+ <Plus />
79
+ </Icon>
80
+ New project
81
+ </Button>
82
+ ```
83
+
84
+ **Don't:** size it with numbers or colour it by hand.
85
+
86
+ ```tsx
87
+ <Button>
88
+ <Plus size={16} color="#666" style={{ marginRight: 8 }} />
89
+ New project
90
+ </Button>
91
+ ```
92
+
93
+ ## 10. Accessibility
94
+
95
+ - Role: none; the span is `aria-hidden` by default, so screen readers skip the icon.
96
+ - Label: an icon-only control gets `aria-label` on the control (the Button), not on the Icon.
97
+ - Meaningful icon: when the icon alone carries meaning outside a control (a status mark with no text), pass `aria-hidden={false}`, `role="img"` and `aria-label`.
98
+ - Contrast: the icon takes the text colour, or a theme tone, so it meets the same contrast as text in that tone. Don't let colour alone carry meaning: pair a `positive` or `destructive` icon with words.
99
+
100
+ ## 11. Behaviour
101
+
102
+ - Density: `size` and `after` follow `data-spacing`, so icons grow and shrink with the controls they sit in.
103
+ - Shrinking: the box never shrinks in a flex row, so the icon keeps its size when the label is long.
104
+ - Motion: none. Animate a spinner with [Spinner](./spinner.md), not by rotating an Icon.
105
+
106
+ ## 12. API
107
+
108
+ <!-- api:start -->
109
+ | Prop | Type | Default | Description |
110
+ | --- | --- | --- | --- |
111
+ | `size` | `"xxs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl" \| "3xl" \| "4xl"` | `"xs"` | Width and height, as a `--size-*` step. |
112
+ | `after` | `"none" \| "xxs" \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl" \| "3xl" \| "4xl"` | | Trailing gap, for an icon followed by a label outside a gapped Row. |
113
+ | `asChild` | `boolean` | `false` | Size the child svg itself instead of wrapping it in a span (Radix Slot). |
114
+ | `tone` | `"default" \| "muted" \| "inverse" \| "inherit" \| "positive" \| "destructive" \| "interactive" \| "interactive-muted"` | `"inherit"` | Colour, from the same tones as Typography. Defaults to `"inherit"` (the text colour around it). |
115
+ | `...props` | `HTMLAttributes<HTMLSpanElement>` without `className`, `style` | | Native attributes: `aria-*`, `role`, `data-*`. |
116
+ <!-- api:end -->
117
+
118
+ ## 13. Examples
119
+
120
+ ```tsx
121
+ import { Calendar, Check, Clock } from "lucide-react";
122
+ import { Button, Icon, Row, Stack, Typography } from "@eluan/core";
123
+
124
+ export function PaymentSummary() {
125
+ return (
126
+ <Stack gap="md" align="start">
127
+ <Typography>
128
+ <Icon size="xxs" after="xs">
129
+ <Check />
130
+ </Icon>
131
+ Payment received
132
+ </Typography>
133
+
134
+ <Row gap="sm">
135
+ <Icon size="xs">
136
+ <Clock />
137
+ </Icon>
138
+ <Typography variant="label">Last synced 09:41</Typography>
139
+ </Row>
140
+
141
+ <Button variant="outline">
142
+ <Icon size="xs">
143
+ <Calendar />
144
+ </Icon>
145
+ Add to calendar
146
+ </Button>
147
+ </Stack>
148
+ );
149
+ }
150
+ ```
151
+
152
+ ## 14. Related components
153
+
154
+ - [Button](./button.md): icon sizes for icon-only actions; put the Icon inside.
155
+ - [Row](./row.md): spaces an icon and its label with `gap`.
156
+ - [VisuallyHidden](./visually-hidden.md): text for screen readers beside a decorative icon.
157
+ - [Spinner](./spinner.md): the animated loading icon.
158
+
159
+ ## 15. Common agent mistakes
160
+
161
+ _Filled from evals._
@@ -0,0 +1,227 @@
1
+ ---
2
+ name: InputOTP
3
+ use_when: The user enters a short numeric one-time code from an email, text message or authenticator app.
4
+ instead_of: Input for codes with letters; PasswordInput for a password or chosen PIN; NumberInput for quantities.
5
+ source: packages/core/src/components/input-otp.tsx
6
+ ---
7
+
8
+ # InputOTP
9
+
10
+ ## 1. Overview
11
+
12
+ InputOTP renders a row of single-digit inputs for a numeric one-time code. It moves focus forward as the user types and back on Backspace, fills every slot from a paste, and calls `onComplete` once all slots hold a digit. It draws its own slots: you pass `length`, not children.
13
+
14
+ ## 2. When to use
15
+
16
+ - Two-factor and sign-in verification codes.
17
+ - Confirming an email address or phone number with a code.
18
+ - Any numeric code of a fixed length, most often 4 or 6 digits (the default is 6).
19
+
20
+ ### When not to use
21
+
22
+ - Codes with letters (recovery codes, invite codes, coupons) → use [Input](./input.md). InputOTP accepts digits only.
23
+ - A password or a PIN the user chooses → use [PasswordInput](./password-input.md).
24
+ - Long structured numbers (card, phone) → use [CreditCardInput](./credit-card-input.md) or [PhoneInput](./phone-input.md).
25
+ - A number that's a quantity → use [NumberInput](./number-input.md).
26
+
27
+ ## 3. Anatomy
28
+
29
+ 1. **Root**: a `<div role="group">` named "One-time passcode" unless you name it. Slots sit in a row with a `--spacing-sm` gap.
30
+ 2. **Slot**: one `<input>` per digit, `--size-lg` wide and `--size-xl` tall, with centred `--font-size-lg` text at weight 600. Each is named "Digit N of M".
31
+ 3. **Divider**: a hyphen InputOTP adds in the middle when `length` is more than 3 (after slot 3 of 6, slot 2 of 4).
32
+ 4. **InputOTPGroup**, **InputOTPSlot**, **InputOTPSeparator**: separate presentational parts. InputOTP drops any children, so these parts never connect to its state. Using them means writing every value change, focus move and paste yourself.
33
+
34
+ ## 4. Variants
35
+
36
+ InputOTP has no variants. `mask` renders every slot as a password field.
37
+
38
+ ## 5. Sizes
39
+
40
+ InputOTP has no size prop. Slots are fixed at `--size-lg` by `--size-xl` and follow density; `length` sets how many there are.
41
+
42
+ ## 6. States
43
+
44
+ | State | Looks like | Notes |
45
+ | --- | --- | --- |
46
+ | Default | Each slot: `--interactive-bg` fill, 1px `--interactive-border-alt` border | |
47
+ | Focus | 1px outline in `--focus-ring`, 1px offset; the border switches to `--focus-ring`; the slot's digit is selected | Never remove or restyle the focus ring. |
48
+ | Filled | The slot fills with `--interactive-bg-alt` | |
49
+ | Masked | Dots instead of digits | Set `mask`. |
50
+ | Disabled | `--interactive-bg-disabled` fill, `--interactive-fg-disabled` text, not-allowed cursor | `disabled` disables every slot. |
51
+ | Error | No built-in error style | Show a [FormMessage](./form-label.md) under the slots and point `aria-describedby` on InputOTP at it. |
52
+
53
+ ## 7. Content guidelines
54
+
55
+ - Label the field "Verification code" or "Sign-in code".
56
+ - Under it, say where the code went and how long it is: "Enter the 6-digit code we sent to your email."
57
+ - Offer a way to get a new code next to the field ("Resend code"), as a link-style Button.
58
+
59
+ | Do | Don't |
60
+ | --- | --- |
61
+ | Verification code | OTP |
62
+ | Enter the 6-digit code we sent to your email. | Enter code |
63
+ | Resend code | Didn't get it? Click here! |
64
+
65
+ ## 8. Rules
66
+
67
+ 1. Set the slot count with `length`. Never pass children or `maxLength`; InputOTP ignores both.
68
+ 2. Name the group after your visible label: give the label an `id` and pass it as `aria-labelledby`. `htmlFor` can't target a group.
69
+ 3. Read the code from `onComplete` (fires when every slot is filled) or `onValueChange` (fires on every change).
70
+ 4. InputOTP is uncontrolled. `value` and `defaultValue` don't set the slots. To clear the slots after a wrong code, remount it with a new `key`.
71
+ 5. Submit the code yourself. The slots have no `name`, and a `name` on InputOTP lands on the group `<div>`, so a native form receives nothing.
72
+ 6. Use the InputOTPGroup, InputOTPSlot and InputOTPSeparator parts only for a layout InputOTP can't draw, and own all state when you do.
73
+ 7. Never pass `className` or `style`. Put layout on a wrapper.
74
+
75
+ ## 9. Dos and don'ts
76
+
77
+ **Do:** set `length`, name the group from a visible label, and verify on completion.
78
+
79
+ ```tsx
80
+ <div style={{ display: "flex", flexDirection: "column", gap: "var(--spacing-sm)" }}>
81
+ <Label id="code-label">Verification code</Label>
82
+ <InputOTP length={6} aria-labelledby="code-label" onComplete={verify} />
83
+ </div>
84
+ ```
85
+
86
+ **Don't:** compose slots as children or use `maxLength`; they're ignored and six default slots render.
87
+
88
+ ```tsx
89
+ <InputOTP maxLength={4}>
90
+ <InputOTPGroup>
91
+ <InputOTPSlot index={0} />
92
+ <InputOTPSlot index={1} />
93
+ <InputOTPSlot index={2} />
94
+ <InputOTPSlot index={3} />
95
+ </InputOTPGroup>
96
+ </InputOTP>
97
+ ```
98
+
99
+ **Do:** reset after a wrong code by remounting.
100
+
101
+ ```tsx
102
+ <InputOTP key={attempt} length={6} aria-labelledby="code-label" onComplete={verify} />
103
+ ```
104
+
105
+ **Don't:** try to clear it through `value`.
106
+
107
+ ```tsx
108
+ <InputOTP value={code} length={6} onComplete={verify} />
109
+ ```
110
+
111
+ ## 10. Accessibility
112
+
113
+ - Role: the root is a `group`, named "One-time passcode" unless you pass `aria-label` or `aria-labelledby`. Each slot is a text input with `inputMode="numeric"` and `autoComplete="one-time-code"`, named "Digit N of M".
114
+ - Label: `aria-labelledby` on InputOTP pointing at your visible label, or `aria-label`.
115
+ - Keyboard: typing a digit fills the slot and moves to the next; other characters are ignored. Backspace clears the slot, or the previous one when the slot is empty, and moves back. Left and Right arrows move between slots. Tab and Shift+Tab also step through every slot.
116
+ - Paste: pasting fills from the first slot, whichever slot has focus, ignoring non-digits, then focuses the slot after the last pasted digit (or the last slot when the code fills them all).
117
+ - Focus: `autoFocus` focuses the first slot on mount. Focusing a slot selects its digit, so typing replaces it. Disabled slots use the native `disabled` attribute and are skipped.
118
+ - Contrast: handled by the theme. Don't override colours.
119
+
120
+ ## 11. Behaviour
121
+
122
+ - Responsive: slots sit in one row and don't wrap. Six slots and the divider fit a phone width.
123
+ - Value: `onValueChange` sends the digits joined with nothing between them. Empty slots are skipped, so check the length before using it.
124
+ - Length changes: growing `length` keeps the digits already entered; shrinking it drops the tail.
125
+ - Motion: slot colours transition over 150ms. InputOTPSlot's optional fake caret blinks and stops under reduced motion. Don't add your own.
126
+
127
+ ## 12. API
128
+
129
+ <!-- api:start -->
130
+ ### InputOTP
131
+
132
+ | Prop | Type | Default | Description |
133
+ | --- | --- | --- | --- |
134
+ | `length` | `number` | `6` | Number of digit slots. |
135
+ | `onValueChange` | `(value: string) => void` | | Called on every change with the entered digits. |
136
+ | `onComplete` | `(value: string) => void` | | Called when every slot holds a digit. |
137
+ | `mask` | `boolean` | `false` | Renders slots as password fields. |
138
+ | `autoFocus` | `boolean` | `false` | Focuses the first slot on mount. |
139
+ | `disabled` | `boolean` | | Disables every slot. |
140
+ | `...props` | `InputHTMLAttributes` without `className`, `style`, `onChange` | | Spread onto the root group `<div>`: `aria-label`, `aria-labelledby`, `aria-describedby` and `id` work; `value`, `defaultValue`, `name`, `maxLength` and `placeholder` do nothing. |
141
+
142
+ ### InputOTPSlot
143
+
144
+ | Prop | Type | Default | Description |
145
+ | --- | --- | --- | --- |
146
+ | `index` | `number` | | Required by the type but unused. |
147
+ | `char` | `string` | | Character drawn in the slot. |
148
+ | `isActive` | `boolean` | | Draws the focused outline. |
149
+ | `hasFakeCaret` | `boolean` | | Draws a blinking caret. |
150
+ | `...props` | `InputHTMLAttributes` without `className`, `style` | | Spread onto the slot's transparent `<input>`. |
151
+
152
+ ### InputOTPGroup
153
+
154
+ | Prop | Type | Default | Description |
155
+ | --- | --- | --- | --- |
156
+ | `...props` | `HTMLAttributes<HTMLDivElement>` without `className`, `style` | | A row wrapper for slots. |
157
+
158
+ ### InputOTPSeparator
159
+
160
+ | Prop | Type | Default | Description |
161
+ | --- | --- | --- | --- |
162
+ | `...props` | `HTMLAttributes<HTMLDivElement>` | | Renders `role="separator"` with a dot icon. Its type doesn't omit `className` and `style`; don't pass them anyway. |
163
+ <!-- api:end -->
164
+
165
+ `className` and `style` are omitted from InputOTP, InputOTPSlot and InputOTPGroup; Eluan components are styling-closed.
166
+
167
+ ## 13. Examples
168
+
169
+ ```tsx
170
+ import { useState } from "react";
171
+ import { Button, FormDescription, FormMessage, InputOTP, Label } from "@eluan/core";
172
+
173
+ export function VerifyEmailCode({
174
+ email,
175
+ verify,
176
+ resend,
177
+ }: {
178
+ email: string;
179
+ verify: (code: string) => Promise<boolean>;
180
+ resend: () => void;
181
+ }) {
182
+ const [attempt, setAttempt] = useState(0);
183
+ const [error, setError] = useState(false);
184
+
185
+ async function handleComplete(code: string) {
186
+ const ok = await verify(code);
187
+ setError(!ok);
188
+ if (!ok) setAttempt((n) => n + 1);
189
+ }
190
+
191
+ return (
192
+ <div style={{ display: "flex", flexDirection: "column", gap: "var(--spacing-sm)" }}>
193
+ <Label id="verify-code-label">Verification code</Label>
194
+ <InputOTP
195
+ key={attempt}
196
+ length={6}
197
+ autoFocus
198
+ aria-labelledby="verify-code-label"
199
+ aria-describedby={error ? "verify-code-error" : "verify-code-hint"}
200
+ onComplete={handleComplete}
201
+ />
202
+ {error ? (
203
+ <FormMessage id="verify-code-error">That code didn't match. Try again.</FormMessage>
204
+ ) : (
205
+ <FormDescription id="verify-code-hint">Enter the 6-digit code we sent to {email}.</FormDescription>
206
+ )}
207
+ <div>
208
+ <Button type="button" variant="link" onClick={resend}>
209
+ Resend code
210
+ </Button>
211
+ </div>
212
+ </div>
213
+ );
214
+ }
215
+ ```
216
+
217
+ ## 14. Related components
218
+
219
+ - [Input](./input.md): codes with letters, and any free text.
220
+ - [PasswordInput](./password-input.md): passwords and chosen PINs.
221
+ - [Label](./form-label.md): `Label`, `FormDescription` and `FormMessage` around the slots.
222
+ - [Button](./button.md): the resend action, `variant="link"`.
223
+ - See [forms](../patterns/forms.md) for field structure and errors.
224
+
225
+ ## 15. Common agent mistakes
226
+
227
+ _Filled from evals._
@@ -0,0 +1,249 @@
1
+ ---
2
+ name: Input
3
+ use_when: The user types a single line of free text: a name, title, URL, code or short answer.
4
+ instead_of: Textarea for more than one line; EmailInput, PasswordInput, SearchInput, PhoneInput or NumberInput when the value has that shape; Select or RadioGroup to pick from known options.
5
+ source: packages/core/src/components/input.tsx
6
+ ---
7
+
8
+ # Input
9
+
10
+ ## 1. Overview
11
+
12
+ Input is a single-line text field. It renders a native `<input>` inside a full-width wrapper, picks a leading icon from `type` (search, email, password, tel, url), takes an optional trailing element, and adds a show/hide toggle for `type="password"`.
13
+
14
+ ## 2. When to use
15
+
16
+ - Free single-line text: names, titles, URLs, IDs, short answers.
17
+ - Codes, keys and tokens, with `textStyle="mono"`.
18
+ - A field that needs a custom leading icon or one trailing action that no specialised input covers.
19
+
20
+ ### When not to use
21
+
22
+ - More than one line of text → use [Textarea](./textarea.md).
23
+ - An email address with validation feedback → use [EmailInput](./email-input.md).
24
+ - A new password with a strength meter → use [PasswordInput](./password-input.md).
25
+ - Search with a clear button, loading state or suggestions → use [SearchInput](./search-input.md).
26
+ - A phone number with a country code → use [PhoneInput](./phone-input.md).
27
+ - Whole numbers with steppers → use [NumberInput](./number-input.md); decimals and amounts → use [DecimalInput](./decimal-input.md).
28
+ - One value from a known list → use [Select](./select.md), or [RadioGroup](./radio-group.md) when the options should stay visible.
29
+ - Dates and times → use [DatePicker](./date-picker.md) or [TimeInput](./time-input.md).
30
+ - One-time codes → use [InputOTP](./input-otp.md). Files → use [FileInput](./file-input.md).
31
+
32
+ ## 3. Anatomy
33
+
34
+ 1. **Wrapper**: a full-width flex row (`position: relative`) around the parts below. It always fills its container.
35
+ 2. **Leading icon** (optional): picked from `type`, or your `icon`. Sits `--spacing-md` from the left in `--interactive-fg-alt` and ignores pointer events.
36
+ 3. **Field**: the native `<input>`. Carries the border, `--curves-md` radius, `--font-size-sm` text and the placeholder in `--interactive-fg-alt`.
37
+ 4. **Trailing element** (optional): your `trailing` node, pinned to the right. The field reserves room for one `--size-sm` element.
38
+ 5. **Password toggle**: for `type="password"` only. An eye button that swaps the field between hidden and visible text. It takes the trailing slot.
39
+
40
+ ## 4. Variants
41
+
42
+ Input has no `variant` prop. These props change its look:
43
+
44
+ | Prop value | Use for |
45
+ | --- | --- |
46
+ | `validationTone="none"` | The default. |
47
+ | `validationTone="positive"` | A value that was checked and accepted (`--positive-fg` border). EmailInput sets it once a valid address is typed. |
48
+ | `validationTone="destructive"` | A value that was checked and rejected (`--destructive-fg` border). Visual only: pair it with `aria-invalid` and a FormMessage. |
49
+ | `textStyle="mono"` | Codes, keys, IDs (`--font-mono`). |
50
+ | `attachment="start"` | Drops the left border and corners so the field sits flush after a control on its left. PhoneInput uses it after its country Select. |
51
+ | `attachment="middle"` | Drops both side borders and all corners. NumberInput uses it between its stepper buttons. |
52
+
53
+ ## 5. Sizes
54
+
55
+ | Size | Use in |
56
+ | --- | --- |
57
+ | `default` | Most forms (`--size-lg` tall, the same height as a default Button). |
58
+ | `lg` | Next to a `size="lg"` Button, or a single prominent field (`--size-xl` tall). Text stays `--font-size-sm`. |
59
+
60
+ ## 6. States
61
+
62
+ | State | Looks like | Notes |
63
+ | --- | --- | --- |
64
+ | Default | `--interactive-bg` fill, `--interactive-border-alt` border | |
65
+ | Focus | Border switches to `--focus-ring`, plus a 1px outline in `--focus-ring`, 1px offset | Never remove or restyle the focus ring. |
66
+ | Disabled | `--interactive-bg-disabled` fill, `--interactive-fg-disabled` text, not-allowed cursor | Set `disabled` on the Label too so it greys out. |
67
+ | Read-only | No distinct style | `readOnly` passes through, but nothing marks it visually. |
68
+ | Error | `aria-invalid` gives a `--destructive-border` border. With the boolean `aria-invalid={true}`, the focus border and outline stay destructive too | Pass the boolean, not the string `"true"`: the focus style checks `=== true`. Show the message in a FormMessage. |
69
+ | Valid | `validationTone="positive"`: `--positive-fg` border and focus outline. `validationTone="destructive"` does the same in `--destructive-fg` | |
70
+
71
+ There's no hover style.
72
+
73
+ ## 7. Content guidelines
74
+
75
+ - Always show a visible Label. Use the placeholder for an example of the expected value ("Jane Cooper"), never as the label.
76
+ - Put format help in a FormDescription under the field ("Enter your full name."), not in the placeholder.
77
+ - Write labels as short nouns in sentence case, with no colon.
78
+ - Write errors that say what to fix: "Enter a project name", not "Invalid input".
79
+
80
+ | Do | Don't |
81
+ | --- | --- |
82
+ | Label "Full name", placeholder "Jane Cooper" | Placeholder "Enter your name" with no label |
83
+ | Label "Website", placeholder "https://example.com" | Label "URL:" |
84
+ | Message "Use lowercase letters, numbers and hyphens" | Message "Invalid input" |
85
+
86
+ ## 8. Rules
87
+
88
+ 1. Give every Input an accessible name: a Label whose `htmlFor` matches the Input's `id`, or `aria-label` when there's no visible label.
89
+ 2. Don't add an icon for `type` search, email, password, tel or url; it's automatic. Pass `icon` to replace it and `icon={false}` to remove it. `icon={null}` does not remove it.
90
+ 3. Read the value with the native `onChange` event. Input has no `onValueChange`.
91
+ 4. Mark errors with `aria-invalid={true}` and a FormMessage the Input points to with `aria-describedby`. `validationTone` alone changes only the colour.
92
+ 5. Don't size a custom `icon`: Input fits it to the field's icon size (`--size-xxs`). Give it `aria-hidden="true"`.
93
+ 6. Keep `trailing` to one small element: an icon, or a Button with `size="iconXs"` and an `aria-label`. It's ignored when `type="password"`.
94
+ 7. Never pass `className` or `style`; they're dropped. Input fills its container, so set width on a wrapper.
95
+
96
+ ## 9. Dos and don'ts
97
+
98
+ **Do:** label the field and use the placeholder as an example.
99
+
100
+ ```tsx
101
+ <div style={{ display: "flex", flexDirection: "column", gap: "var(--spacing-sm)" }}>
102
+ <Label htmlFor="full-name">Full name</Label>
103
+ <Input id="full-name" name="fullName" autoComplete="name" placeholder="Jane Cooper" />
104
+ </div>
105
+ ```
106
+
107
+ **Don't:** use the placeholder as the only label.
108
+
109
+ ```tsx
110
+ <Input placeholder="Enter your full name" />
111
+ ```
112
+
113
+ **Do:** let `type` pick the icon, and remove it with `false` when you don't want it.
114
+
115
+ ```tsx
116
+ <Input id="work-email" type="email" placeholder="jane@acme.com" />
117
+ <Input id="callback-number" type="tel" icon={false} placeholder="+1 415 555 0132" />
118
+ ```
119
+
120
+ **Don't:** add a duplicate icon, or expect `null` to remove the automatic one.
121
+
122
+ ```tsx
123
+ <Input type="email" icon={<Mail size={16} />} />
124
+ <Input type="tel" icon={null} />
125
+ ```
126
+
127
+ **Do:** mark an error with the boolean and link the message.
128
+
129
+ ```tsx
130
+ <Input id="project-name" aria-invalid={true} aria-describedby="project-name-error" />
131
+ <FormMessage id="project-name-error">Enter a project name</FormMessage>
132
+ ```
133
+
134
+ **Don't:** rely on colour alone.
135
+
136
+ ```tsx
137
+ <Input validationTone="destructive" />
138
+ <p style={{ color: "red" }}>Invalid input</p>
139
+ ```
140
+
141
+ ## 10. Accessibility
142
+
143
+ - Role: `textbox` for text, email, tel and url (native `<input>`); `searchbox` for `type="search"`. Password fields have no role.
144
+ - Label: a Label with `htmlFor` matching the Input `id`, or `aria-label`. The placeholder is not a label. Leading icons are `aria-hidden`.
145
+ - Description and errors: FormDescription and FormMessage are plain `<p>` elements with no wiring. Give them ids and list them in the Input's `aria-describedby`.
146
+ - Keyboard: native text editing. The password toggle is its own Tab stop: a button labelled "Show password" or "Hide password" with `aria-pressed`.
147
+ - Focus: visible outline on `:focus-visible`. Disabled fields use the native `disabled` attribute and are skipped by Tab.
148
+ - Contrast: handled by the theme. Don't override colours.
149
+
150
+ ## 11. Behaviour
151
+
152
+ - Responsive: the wrapper is `width: 100%`. Constrain the field with a wrapper you own. Height comes from `--size-*` and follows density.
153
+ - Overflow and truncation: single line; long values scroll inside the field. Leading and trailing elements reserve padding, so text never runs under them.
154
+ - Motion: colour and border transitions over 150ms. Don't add your own.
155
+ - `type="search"` hides the browser's own clear button and decoration.
156
+ - The password toggle keeps its state inside Input; you can't control it.
157
+
158
+ ## 12. API
159
+
160
+ <!-- api:start -->
161
+ | Prop | Type | Default | Description |
162
+ | --- | --- | --- | --- |
163
+ | `type` | `string` | browser default (`text`) | Native input type. `search`, `email`, `password`, `tel` and `url` add a leading icon; `password` adds the show/hide toggle. |
164
+ | `icon` | `ReactNode` | automatic from `type` | Leading icon. Replaces the automatic icon; `false` removes it. `null` and `undefined` fall back to the automatic icon. |
165
+ | `trailing` | `ReactNode` | | One small element at the right end. Ignored when `type="password"`. |
166
+ | `validationTone` | `"none" \| "positive" \| "destructive"` | `"none"` | Border and focus colour for validation feedback. Doesn't set `aria-invalid`. |
167
+ | `size` | `"default" \| "lg"` | `"default"` | Height: `--size-lg` or `--size-xl`. Replaces the native `size` attribute. |
168
+ | `attachment` | `"none" \| "start" \| "middle"` | `"none"` | Flattens the left edge (`start`) or both side edges (`middle`) to join adjacent controls. |
169
+ | `textAlign` | `"left" \| "center"` | `"left"` | Alignment of the value. |
170
+ | `textStyle` | `"default" \| "mono"` | `"default"` | `mono` sets the value in `--font-mono`. |
171
+ | `...props` | `InputHTMLAttributes` without `className`, `size`, `style` | | Native attributes: `id`, `name`, `value`, `defaultValue`, `onChange`, `onBlur`, `placeholder`, `disabled`, `readOnly`, `required`, `autoComplete`, `aria-*`. `ref` goes to the `<input>`. |
172
+ <!-- api:end -->
173
+
174
+ ## 13. Examples
175
+
176
+ ```tsx
177
+ import { Button, FormDescription, FormMessage, Input, Label } from "@eluan/core";
178
+ import { Copy, Globe } from "lucide-react";
179
+ import * as React from "react";
180
+
181
+ const iconSize = { width: "var(--size-xxs)", height: "var(--size-xxs)" };
182
+
183
+ export function WorkspaceFields({ apiKey }: { apiKey: string }) {
184
+ const [slug, setSlug] = React.useState("");
185
+ const [error, setError] = React.useState<string | null>(null);
186
+
187
+ function validate(value: string) {
188
+ setError(/^[a-z0-9-]+$/.test(value) ? null : "Use lowercase letters, numbers and hyphens");
189
+ }
190
+
191
+ return (
192
+ <div style={{ display: "flex", flexDirection: "column", gap: "var(--spacing-lg)" }}>
193
+ <div style={{ display: "flex", flexDirection: "column", gap: "var(--spacing-sm)" }}>
194
+ <Label htmlFor="workspace-slug" required>Workspace URL</Label>
195
+ <Input
196
+ id="workspace-slug"
197
+ name="slug"
198
+ required
199
+ textStyle="mono"
200
+ icon={<Globe aria-hidden="true" />}
201
+ placeholder="acme-design"
202
+ value={slug}
203
+ onChange={(event) => setSlug(event.target.value)}
204
+ onBlur={(event) => validate(event.target.value)}
205
+ aria-invalid={error ? true : undefined}
206
+ aria-describedby={error ? "workspace-slug-hint workspace-slug-error" : "workspace-slug-hint"}
207
+ />
208
+ <FormDescription id="workspace-slug-hint">
209
+ Your workspace will live at app.acme.com/{slug || "your-team"}.
210
+ </FormDescription>
211
+ {error && <FormMessage id="workspace-slug-error">{error}</FormMessage>}
212
+ </div>
213
+
214
+ <div style={{ display: "flex", flexDirection: "column", gap: "var(--spacing-sm)" }}>
215
+ <Label htmlFor="api-key">API key</Label>
216
+ <Input
217
+ id="api-key"
218
+ readOnly
219
+ textStyle="mono"
220
+ value={apiKey}
221
+ trailing={
222
+ <Button
223
+ type="button"
224
+ variant="ghost"
225
+ size="iconXs"
226
+ aria-label="Copy API key"
227
+ onClick={() => navigator.clipboard.writeText(apiKey)}
228
+ >
229
+ <Copy aria-hidden="true" style={iconSize} />
230
+ </Button>
231
+ }
232
+ />
233
+ </div>
234
+ </div>
235
+ );
236
+ }
237
+ ```
238
+
239
+ ## 14. Related components
240
+
241
+ - [Label](./form-label.md): Label, FormDescription and FormMessage for every field.
242
+ - [Textarea](./textarea.md): the multi-line field.
243
+ - [EmailInput](./email-input.md), [PasswordInput](./password-input.md), [SearchInput](./search-input.md), [PhoneInput](./phone-input.md), [NumberInput](./number-input.md): Input with behaviour for one kind of value.
244
+ - [Fieldset](./fieldset.md): groups related fields under a legend.
245
+ - See [../patterns/forms.md](../patterns/forms.md) for laying out and validating whole forms.
246
+
247
+ ## 15. Common agent mistakes
248
+
249
+ _Filled from evals._