@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,222 @@
1
+ ---
2
+ name: app-shell
3
+ ---
4
+
5
+ # App shell
6
+
7
+ ## When this applies
8
+
9
+ Scaffolding an app, or adding a screen to one that exists. The shell is the frame every screen shares: the navigation, the content column, and the small pieces each screen is built from. The router sends "Scaffold an app or add a screen to one" here.
10
+
11
+ Every screen inside a shell is an app screen: take its text from the app-screen ramp in [page-layout.md](./page-layout.md).
12
+
13
+ Eluan ships the navigation and the layout primitives. The page header, section and region states below are app-level: compose them once in your app and reuse them. Mark each `// eluan: composed, no component for {intent}`.
14
+
15
+ ## Choosing components
16
+
17
+ | Situation | Use | Not |
18
+ | --- | --- | --- |
19
+ | An app with several sections the user moves between all day | [NavigationDrawer](../components/navigation-drawer.md) inside `NavigationDrawerLayout` | a sidebar built from Sheet, Drawer or your own `aside` |
20
+ | A small app with two to four destinations | [Header](../components/header.md) with `items` | NavigationDrawer: a rail for three links wastes the width |
21
+ | The scrolling column that holds each screen | `<Stack as="main" pad="xl" gap="3xl">` | a `div` with padding you wrote |
22
+ | A screen's title, description and actions | a page header you compose once (see Structure) | a different title block on each screen |
23
+ | A titled block of a screen | a section you compose once: `Stack as="section"` with a section heading | Cards used only to draw boxes round sections |
24
+ | A region is loading | [Skeleton](../components/skeleton.md) shaped like the content | a Spinner centred in the page, or an empty state that flashes first |
25
+ | A region failed to load | [Banner](../components/banner.md) `variant="destructive"` `position="inline"` with a retry Button | a Toast, or nothing |
26
+ | A region has nothing yet | [empty-states.md](./empty-states.md) | an empty Table |
27
+ | Views of one thing inside a screen | [Tabs](../components/tabs.md) | more NavigationDrawer items |
28
+
29
+ ## Structure
30
+
31
+ **The shell**, outside in:
32
+
33
+ 0. `<EluanProvider defaultTypeset="app">` at the app's root, which pins the whole-pixel app type scale for every screen.
34
+ 1. A full-height wrapper: `<Box height="screen">`. NavigationDrawerLayout fills its parent, so the parent needs a bounded height.
35
+ 2. `NavigationDrawerLayout` with your sidebar: a NavigationDrawerHeader for the app name, NavigationDrawerContent with the items, and a NavigationDrawerFooter for the account, help and sign out.
36
+ 3. One `<Stack as="main" pad="xl" gap="3xl">` as the layout's child. Every screen renders inside it, so no screen sets its own page padding or section spacing.
37
+
38
+ NavigationDrawerLayout draws the shell as a page and a panel: the sidebar sits on the page colour, and the content lifts off it as a raised panel (elevation level 1). Cards inside lift one level further by themselves. Don't add a background, border or shadow to any of it; see [elevation.md](../foundations/elevation.md).
39
+
40
+ **A screen**, top to bottom, as direct children of that `main`:
41
+
42
+ 1. Page header: the title (`variant="title" as="h1" size="xl"`), an optional one-line description (`size="sm" tone="muted"`), and page actions at the end of the row.
43
+ 2. Optional page Banner, for something wrong with the whole screen.
44
+ 3. Controls that scope the whole screen, if any (see [dashboard.md](./dashboard.md)).
45
+ 4. Sections: each a `Stack as="section" gap="md"` with a section heading (`variant="heading" as="h2" size="lg"`), tied to the section by `aria-labelledby`.
46
+
47
+ **A region's states.** Any region that loads data shows exactly one of four things, checked in this order: the error, the skeleton, the empty state, the content. Decide all four when you build the region, not when a bug report arrives.
48
+
49
+ **Where the pieces live.** Put the composed pieces (page header, section, region states, and anything else two screens share) in one module of your app. A screen imports them; it never re-declares them.
50
+
51
+ ### Adding a screen to an existing app
52
+
53
+ 1. Read the shell and one existing screen first. Find the module with the shared pieces.
54
+ 2. Build the new screen from those pieces. If a second screen needs something only one screen has, move it to the shared module rather than copying it.
55
+ 3. Check the shared pieces against this skill before you rely on them: the type ramp, tokens, no `className` on Eluan components. If one breaks a rule, fix the shared piece so every screen gets the fix. Don't copy the mistake into a new screen, and don't fork a corrected copy for yours.
56
+ 4. Add the screen to the navigation with its own icon, and mark it current.
57
+
58
+ ## Rules
59
+
60
+ 1. Use one primary navigation: NavigationDrawer or Header, never both.
61
+ 2. Put page padding and section spacing on the shell's `main`, once. Screens add none.
62
+ 3. Give every screen exactly one page header, built from the same composed piece.
63
+ 4. Take all text from the app-screen ramp. Don't use `display` or `lead`, and don't use `title` or `heading` without `size`.
64
+ 5. Give every region that loads data all four states: error, loading, empty, content.
65
+ 6. Navigate with real links: `NavigationDrawerItem asChild` around your router's link, with `active` and `aria-current="page"` on the current one, and an `aria-label` so the collapsed rail has names.
66
+ 7. Keep shared composed pieces in one module. Don't declare a page header, a tile or a table helper inside a screen file.
67
+ 8. Don't draw a Card round a whole section just to separate it. The section heading and the spacing do that.
68
+ 9. Leave surfaces on their default elevation. Don't pass `elevation="none"` to make cards "cleaner"; a flat card on a raised panel reads as an outline, not a surface.
69
+
70
+ ## Example
71
+
72
+ A shell, its shared pieces and one screen. `pathname` comes from your router; the links are plain anchors here so the example stands alone.
73
+
74
+ ```tsx
75
+ // eluan: composed, no component for page header, section or region states
76
+ import {
77
+ Banner,
78
+ Box,
79
+ Button,
80
+ NavigationDrawerContent,
81
+ NavigationDrawerGroup,
82
+ NavigationDrawerHeader,
83
+ NavigationDrawerItem,
84
+ NavigationDrawerLayout,
85
+ Row,
86
+ Skeleton,
87
+ Stack,
88
+ Typography,
89
+ VisuallyHidden,
90
+ } from "@eluan/core";
91
+ import { FileText, LayoutDashboard, Settings, Users } from "lucide-react";
92
+ import type { ReactNode } from "react";
93
+
94
+ const destinations = [
95
+ { href: "/", label: "Overview", icon: <LayoutDashboard aria-hidden="true" /> },
96
+ { href: "/invoices", label: "Invoices", icon: <FileText aria-hidden="true" /> },
97
+ { href: "/customers", label: "Customers", icon: <Users aria-hidden="true" /> },
98
+ { href: "/settings", label: "Settings", icon: <Settings aria-hidden="true" /> },
99
+ ];
100
+
101
+ function Sidebar({ pathname }: { pathname: string }) {
102
+ return (
103
+ <>
104
+ <NavigationDrawerHeader>
105
+ <Typography variant="label" weight="semibold">Ledger</Typography>
106
+ </NavigationDrawerHeader>
107
+ <NavigationDrawerContent>
108
+ <NavigationDrawerGroup>
109
+ {destinations.map(({ href, label, icon }) => {
110
+ const current = pathname === href;
111
+ return (
112
+ <NavigationDrawerItem
113
+ key={href}
114
+ asChild
115
+ icon={icon}
116
+ active={current}
117
+ aria-current={current ? "page" : undefined}
118
+ aria-label={label}
119
+ >
120
+ <a href={href}>{label}</a>
121
+ </NavigationDrawerItem>
122
+ );
123
+ })}
124
+ </NavigationDrawerGroup>
125
+ </NavigationDrawerContent>
126
+ </>
127
+ );
128
+ }
129
+
130
+ export function AppShell({ pathname, children }: { pathname: string; children: ReactNode }) {
131
+ return (
132
+ <Box height="screen">
133
+ <NavigationDrawerLayout sidebar={<Sidebar pathname={pathname} />}>
134
+ <Stack as="main" pad="xl" gap="3xl">
135
+ {children}
136
+ </Stack>
137
+ </NavigationDrawerLayout>
138
+ </Box>
139
+ );
140
+ }
141
+
142
+ export function PageHeader({ title, description, actions }: { title: string; description?: string; actions?: ReactNode }) {
143
+ return (
144
+ <Row as="header" justify="between" align="start" wrap gap="lg">
145
+ <Stack gap="xs">
146
+ <Typography variant="title" as="h1" size="xl">{title}</Typography>
147
+ {description && <Typography size="sm" tone="muted">{description}</Typography>}
148
+ </Stack>
149
+ {actions}
150
+ </Row>
151
+ );
152
+ }
153
+
154
+ export function Section({ id, title, children }: { id: string; title: string; children: ReactNode }) {
155
+ return (
156
+ <Stack as="section" gap="md" aria-labelledby={id}>
157
+ <Typography variant="heading" as="h2" size="lg" id={id}>{title}</Typography>
158
+ {children}
159
+ </Stack>
160
+ );
161
+ }
162
+
163
+ export function RegionLoading() {
164
+ return (
165
+ <Stack gap="sm" aria-busy="true">
166
+ <VisuallyHidden>Loading</VisuallyHidden>
167
+ <Skeleton width="40%" />
168
+ <Skeleton width="90%" />
169
+ <Skeleton width="75%" />
170
+ </Stack>
171
+ );
172
+ }
173
+
174
+ export function RegionError({ message, onRetry }: { message: string; onRetry: () => void }) {
175
+ return (
176
+ <Banner
177
+ variant="destructive"
178
+ position="inline"
179
+ role="alert"
180
+ action={<Button type="button" size="sm" variant="outline" onClick={onRetry}>Try again</Button>}
181
+ >
182
+ {message}
183
+ </Banner>
184
+ );
185
+ }
186
+
187
+ export function CustomersScreen({ pathname }: { pathname: string }) {
188
+ return (
189
+ <AppShell pathname={pathname}>
190
+ <PageHeader
191
+ title="Customers"
192
+ description="Everyone you have invoiced this year."
193
+ actions={<Button type="button">Add customer</Button>}
194
+ />
195
+ <Section id="recent-heading" title="Recently active">
196
+ <RegionLoading />
197
+ </Section>
198
+ </AppShell>
199
+ );
200
+ }
201
+ ```
202
+
203
+ ## Dos and don'ts
204
+
205
+ **Do:** let the shell own the page padding and the gap between sections.
206
+
207
+ **Don't:** wrap each screen in its own padded `div`, so screens drift apart by a few pixels.
208
+
209
+ **Do:** give a failed region a Banner with a retry, and keep the rest of the screen working.
210
+
211
+ **Don't:** replace the whole screen with an error, or leave a skeleton up forever when the request failed.
212
+
213
+ **Do:** fix a shared piece that breaks a rule, once, for every screen.
214
+
215
+ **Don't:** copy an existing screen's markup into a new file and carry its mistakes along.
216
+
217
+ ## Common agent mistakes
218
+
219
+ - Building a new screen by copying the nearest existing one without reading this skill, so the copy inherits every drift in the original.
220
+ - Declaring `Tile`, `Numeric` or `PageHeader` again inside each screen file instead of importing the shared one.
221
+ - Forgetting the bounded height round NavigationDrawerLayout, so the sidebar collapses to the height of its content.
222
+ - Shipping only the content state of a region, with no skeleton, error or empty state.
@@ -0,0 +1,249 @@
1
+ ---
2
+ name: dashboard
3
+ ---
4
+
5
+ # Dashboard
6
+
7
+ ## When this applies
8
+
9
+ A screen that reports on data: headline figures, trends over time, and the rows behind them. Analytics, reporting, monitoring and admin overviews. The router sends "Build a dashboard or data screen" here.
10
+
11
+ A dashboard is an app screen inside an app shell. Read [app-shell.md](./app-shell.md) for the shell, the page header, sections and region states, and take all text from the app-screen ramp in [page-layout.md](./page-layout.md).
12
+
13
+ Eluan has no stat tile and no chart. Compose them as below, once, in your app's shared module, and mark each `// eluan: composed, no component for {intent}`.
14
+
15
+ ## Choosing components
16
+
17
+ | Situation | Use | Not |
18
+ | --- | --- | --- |
19
+ | Three or four headline figures | stat tiles: [Card](../components/card.md) in a [Grid](../components/grid.md) | a Table with one row, or figures set in `display` type |
20
+ | A value over time | a chart in a frame you own (see Charts) | a Table of dates the user has to read as a trend |
21
+ | Rows the user compares or looks up | [Table](../components/table.md), numeric columns with `align="right"` | a grid of Cards |
22
+ | A filter that scopes the whole screen, two to five options (site, period) | [SegmentedControl](../components/segmented-control.md) `size="sm"` with a visible label | Tabs: there are no panels; a Select for three options |
23
+ | A scope with more options, or a date range | [Select](../components/select.md), [DatePicker](../components/date-picker.md)'s DateRangePicker | a row of Buttons with a selected style |
24
+ | A filter on one table only | the same controls, in a Row directly above that table | putting it in the screen's scope bar |
25
+ | The state of a row or a source | [Badge](../components/badge.md), one variant per state everywhere | coloured text, or a different Badge variant per screen |
26
+ | A share of a known total | [Progress](../components/progress.md) | a hand-drawn bar |
27
+ | When something last changed | a `time` element with relative text ("3 hours ago") and the full date in `title` | a raw timestamp |
28
+ | A source behind the data is failing or stale | [Banner](../components/banner.md) `variant="caution"` under the page header | a Toast, or silently old numbers |
29
+
30
+ ## Structure
31
+
32
+ Top to bottom, most summarised first:
33
+
34
+ 1. **Page header**, from the shell's shared piece.
35
+ 2. **Scope bar**: the controls that change what every section shows. `<Row wrap gap="xl">` of labelled controls, each a `<Row gap="sm">` holding a `Typography variant="label" size="sm"` and the control it names through `aria-labelledby`.
36
+ 3. **Figures**: `<Grid cols={{ base: 2, l: 4 }} gap="lg">` of stat tiles. One line above the grid may say what period or sample the figures cover.
37
+ 4. **Trend**: one chart per section, under a section heading that names the measure.
38
+ 5. **Detail**: the tables behind the figures, each in its own section.
39
+
40
+ **Stat tile.** A Card on its default elevation with only a CardHeader, holding in order: CardDescription for the label, CardTitle for the figure, and an optional `Typography variant="caption" tone="muted"` for the comparison or the sample ("12% up on last month", "5 of 8 pages"). Format the figure before you render it: thousands separators, a unit, at most four significant digits ("48,210", "3.2%", "1.4M").
41
+
42
+ **Numeric columns.** Pass `align="right"` to the column's TableHead and to every TableCell in it. Table sets its text in tabular figures, so the digits line up without anything more. Put the row's name in the first column with `weight="medium"`.
43
+
44
+ **Charts.** Use the charting library your app already has; Eluan styles none of it, so pass it tokens:
45
+
46
+ | Part | Token |
47
+ | --- | --- |
48
+ | Series colour, in order | `--dataviz-1-main` to `--dataviz-8-main` |
49
+ | Area fill under a line | the series' `-tint`, or its `-main` at low opacity |
50
+ | Grid lines and axis lines | `--container-border` |
51
+ | Axis and legend text | `--container-fg-alt`, at `--font-size-xs` |
52
+ | Tooltip surface | `--container-bg` with a `--container-border` border and `--curves-md` corners |
53
+ | Text in the tooltip | Typography, never the series colour |
54
+
55
+ Hold the chart in an [AspectRatio](../components/aspect-ratio.md) (`ratio={16 / 5}` across the full column, `16 / 9` in half of it) so its height needs no raw value. Give the frame `role="img"` and an `aria-label` that says what it shows, and keep the same numbers reachable in a table on the screen. Turn the library's animation off: Eluan has no motion tokens.
56
+
57
+ **States.** Each section loads on its own and shows one of four states, as in [app-shell.md](./app-shell.md). When the whole screen has no data yet (nothing synced, nothing connected), replace the figures and everything under them with one [empty state](./empty-states.md) that says how to get data; keep the page header and the scope bar.
58
+
59
+ ## Rules
60
+
61
+ 1. Order the screen from summary to detail: figures, then trends, then tables.
62
+ 2. Show at most four stat tiles in a row, all the same kind. More than eight figures belong in a Table.
63
+ 3. Use CardTitle for the figure in a stat tile and nowhere else on the screen. Name other cards with `Typography variant="subheading" as="h3" size="base"`.
64
+ 4. Right-align numeric columns with `align="right"`, on the heading and the cells alike.
65
+ 5. Colour chart series only with `--dataviz-*`, in order from 1. Never colour a series with a status or action token, and never use `--dataviz-*` for status.
66
+ 6. Say what every figure covers: the period, the unit and, when it isn't everything, the sample.
67
+ 7. Label every scope control visibly, and put screen-wide scope in one bar under the page header.
68
+ 8. Use the same Badge variant for the same state on every screen. Keep the mapping in one place in your shared module.
69
+ 9. Don't multiply size or spacing tokens with `calc()` to size a chart or a column. Use AspectRatio, Grid `cols` or a `--size-*` step.
70
+ 10. Never show a figure without saying when its data was last refreshed, on the screen or in the section.
71
+
72
+ ## Example
73
+
74
+ ```tsx
75
+ // eluan: composed, no component for stat tile or chart frame
76
+ import {
77
+ AspectRatio,
78
+ Badge,
79
+ Card,
80
+ CardDescription,
81
+ CardHeader,
82
+ CardTitle,
83
+ Grid,
84
+ Row,
85
+ SegmentedControl,
86
+ SegmentedControlItem,
87
+ Stack,
88
+ Table,
89
+ TableBody,
90
+ TableCell,
91
+ TableHead,
92
+ TableHeader,
93
+ TableRow,
94
+ Typography,
95
+ } from "@eluan/core";
96
+ import { useState, type ReactNode } from "react";
97
+
98
+ // In an app, PageHeader and Section come from the shared module (app-shell.md).
99
+ function PageHeader({ title, description }: { title: string; description: string }) {
100
+ return (
101
+ <Stack as="header" gap="xs">
102
+ <Typography variant="title" as="h1" size="xl">{title}</Typography>
103
+ <Typography size="sm" tone="muted">{description}</Typography>
104
+ </Stack>
105
+ );
106
+ }
107
+
108
+ function Section({ id, title, children }: { id: string; title: string; children: ReactNode }) {
109
+ return (
110
+ <Stack as="section" gap="md" aria-labelledby={id}>
111
+ <Typography variant="heading" as="h2" size="lg" id={id}>{title}</Typography>
112
+ {children}
113
+ </Stack>
114
+ );
115
+ }
116
+
117
+ function StatTile({ label, value, note }: { label: string; value: string; note?: string }) {
118
+ return (
119
+ <Card>
120
+ <CardHeader>
121
+ <CardDescription>{label}</CardDescription>
122
+ <CardTitle>{value}</CardTitle>
123
+ {note && <Typography variant="caption" tone="muted">{note}</Typography>}
124
+ </CardHeader>
125
+ </Card>
126
+ );
127
+ }
128
+
129
+ function ChartFrame({ label, children }: { label: string; children?: ReactNode }) {
130
+ return (
131
+ <AspectRatio ratio={16 / 5} role="img" aria-label={label}>
132
+ {children}
133
+ </AspectRatio>
134
+ );
135
+ }
136
+
137
+ const periods = [
138
+ { value: "7", label: "7 days" },
139
+ { value: "28", label: "28 days" },
140
+ { value: "90", label: "90 days" },
141
+ ];
142
+
143
+ const pages = [
144
+ { path: "/pricing", visits: "4,120", signups: "212", rate: "5.1%", state: "healthy" },
145
+ { path: "/docs/setup", visits: "2,884", signups: "61", rate: "2.1%", state: "healthy" },
146
+ { path: "/blog/friday-billing", visits: "1,306", signups: "9", rate: "0.7%", state: "falling" },
147
+ ] as const;
148
+
149
+ const stateBadge = {
150
+ healthy: { variant: "positive", label: "Healthy" },
151
+ falling: { variant: "caution", label: "Falling" },
152
+ } as const;
153
+
154
+ export function TrafficScreen() {
155
+ const [period, setPeriod] = useState("28");
156
+
157
+ return (
158
+ <>
159
+ <PageHeader title="Traffic" description="Visits and signups across the site." />
160
+
161
+ <Row wrap gap="xl">
162
+ <Row gap="sm">
163
+ <Typography variant="label" size="sm" id="period-label">Period</Typography>
164
+ <SegmentedControl size="sm" value={period} onValueChange={setPeriod} aria-labelledby="period-label">
165
+ {periods.map((option) => (
166
+ <SegmentedControlItem key={option.value} value={option.value}>
167
+ {option.label}
168
+ </SegmentedControlItem>
169
+ ))}
170
+ </SegmentedControl>
171
+ </Row>
172
+ </Row>
173
+
174
+ <Stack gap="md">
175
+ <Typography size="sm" tone="muted">
176
+ The last {period} days, refreshed <time dateTime="2026-03-02T09:00">3 hours ago</time>.
177
+ </Typography>
178
+ <Grid cols={{ base: 2, l: 4 }} gap="lg">
179
+ <StatTile label="Visits" value="18,240" note="12% up on the period before" />
180
+ <StatTile label="Signups" value="412" note="4% down on the period before" />
181
+ <StatTile label="Signup rate" value="2.3%" />
182
+ <StatTile label="Pages visited" value="96" note="Of 140 published" />
183
+ </Grid>
184
+ </Stack>
185
+
186
+ <Section id="visits-heading" title="Visits per day">
187
+ <ChartFrame label="Visits per day over the period">{/* your charting library renders here */}</ChartFrame>
188
+ </Section>
189
+
190
+ <Section id="pages-heading" title="Top pages">
191
+ <Table aria-label="Top pages">
192
+ <TableHeader>
193
+ <TableRow>
194
+ <TableHead scope="col">Page</TableHead>
195
+ <TableHead scope="col">State</TableHead>
196
+ <TableHead scope="col" align="right">Visits</TableHead>
197
+ <TableHead scope="col" align="right">Signups</TableHead>
198
+ <TableHead scope="col" align="right">Rate</TableHead>
199
+ </TableRow>
200
+ </TableHeader>
201
+ <TableBody>
202
+ {pages.map((page) => (
203
+ <TableRow key={page.path}>
204
+ <TableCell weight="medium">{page.path}</TableCell>
205
+ <TableCell>
206
+ <Badge variant={stateBadge[page.state].variant}>{stateBadge[page.state].label}</Badge>
207
+ </TableCell>
208
+ <TableCell align="right">{page.visits}</TableCell>
209
+ <TableCell align="right">{page.signups}</TableCell>
210
+ <TableCell align="right">{page.rate}</TableCell>
211
+ </TableRow>
212
+ ))}
213
+ </TableBody>
214
+ </Table>
215
+ </Section>
216
+ </>
217
+ );
218
+ }
219
+ ```
220
+
221
+ `TrafficScreen` returns a fragment because it renders inside the shell's `<Stack as="main" pad="xl" gap="3xl">`, which spaces its parts.
222
+
223
+ ## Dos and don'ts
224
+
225
+ **Do:** keep a stat tile to a label, a figure and one short note.
226
+
227
+ **Don't:** put a chart, a button and a menu in every tile; a tile that needs them is a section.
228
+
229
+ **Do:** colour a single series with `--dataviz-1-main`.
230
+
231
+ **Don't:** colour it with `--action-primary-bg` so it "matches the brand". Series colours and action colours are checked for different jobs.
232
+
233
+ **Do:** right-align numbers with `align="right"`, in the heading and the cells alike.
234
+
235
+ **Don't:** leave numbers left-aligned, or wrap them in an element of your own to push them right.
236
+
237
+ **Do:** size a chart with AspectRatio.
238
+
239
+ **Don't:** write `height: calc(var(--size-4xl) * 2.5)` or a pixel height on the chart's wrapper.
240
+
241
+ ## Common agent mistakes
242
+
243
+ - Setting the page title, lead and section headings at content-page sizes above tiles and tables set at control size.
244
+ - Colouring a chart with the primary action colour or a status colour instead of `--dataviz-*`.
245
+ - Sizing a chart with `calc()` on a size token.
246
+ - Left-aligned numeric columns, or a wrapper with a CSS class where `align="right"` does the job.
247
+ - `elevation="none"` on every stat tile, which flattens the screen.
248
+ - Figures with no period, unit or refresh time.
249
+ - A different tile or empty state declared in each screen file.
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: empty-states
3
+ ---
4
+
5
+ # Empty states
6
+
7
+ ## When this applies
8
+
9
+ A view has nothing to show: no projects yet, no search results, a cleared inbox, a filter that matches nothing. The router sends "Show that there's nothing yet" here.
10
+
11
+ Eluan has no EmptyState component. Compose one from Stack, Typography, an optional Lucide icon in Icon and one Button, once in your app's shared module, and mark it `// eluan: composed, no component for empty state`.
12
+
13
+ ## Choosing components
14
+
15
+ | Situation | Use | Not |
16
+ | --- | --- | --- |
17
+ | First use: nothing created yet | heading, one line of explanation, one primary [Button](../components/button.md) that creates the first item | an empty Table with headers |
18
+ | No results for a search or filter | heading, a line naming the query, an `outline` Button to clear filters | a Toast saying "No results" |
19
+ | Everything done (cleared inbox) | heading and one line; no action needed | a primary Button with nothing to do |
20
+ | Still loading | [Skeleton](../components/skeleton.md), not an empty state | "No items" flashing before data arrives |
21
+ | Failed to load | [Banner](../components/banner.md) `variant="destructive"` with a retry action | an empty state that hides the error |
22
+
23
+ ## Structure
24
+
25
+ A centred column inside the area that would hold the content: `<Stack align="center" gap="sm" pad="3xl">`, with `align="center"` on each line of text.
26
+
27
+ 1. Optional icon, decorative: a Lucide icon in `<Icon size="md" tone="muted">`.
28
+ 2. Heading: `Typography variant="subheading"` with the right heading level for the page. On an app screen add `size="base"` (see the type ramp in [page-layout.md](./page-layout.md)).
29
+ 3. One line of text: `Typography tone="muted"`, with `size="sm"` on an app screen.
30
+ 4. One action, or none, in a `<Box padY="sm">` so it sits a little apart from the text.
31
+
32
+ ## Rules
33
+
34
+ 1. Say what's missing and what to do next, in plain words: "No projects yet", "Create a project to get started."
35
+ 2. Offer one action at most. Make it primary only on first use; use `outline` for "Clear filters".
36
+ 3. Keep the empty state inside the region it replaces, so the page's header and navigation stay.
37
+ 4. Don't use an empty state while data is loading; show Skeleton.
38
+ 5. Don't add illustrations, colours or fonts that aren't in the theme. A Lucide icon is enough.
39
+
40
+ ## Example
41
+
42
+ ```tsx
43
+ // eluan: composed, no component for empty state
44
+ import { Box, Button, Icon, Stack, Typography } from "@eluan/core";
45
+ import { FolderPlus } from "lucide-react";
46
+
47
+ export function ProjectsEmptyState({ onCreate }: { onCreate: () => void }) {
48
+ return (
49
+ <Stack align="center" gap="sm" pad="3xl">
50
+ <Icon size="md" tone="muted">
51
+ <FolderPlus aria-hidden="true" />
52
+ </Icon>
53
+ <Typography variant="subheading" as="h2" size="base" align="center">No projects yet</Typography>
54
+ <Typography size="sm" tone="muted" align="center">Create a project to start tracking work.</Typography>
55
+ <Box padY="sm">
56
+ <Button type="button" onClick={onCreate}>Create project</Button>
57
+ </Box>
58
+ </Stack>
59
+ );
60
+ }
61
+ ```
62
+
63
+ This one sits on an app screen, so its text takes `size`. On a content page, drop `size` from both lines.
64
+
65
+ ## Dos and don'ts
66
+
67
+ **Do:** give a first-use empty state one clear primary action.
68
+
69
+ **Don't:** offer three buttons ("Import", "Create", "Learn more") of equal weight.
70
+
71
+ **Do:** show Skeleton while loading, then the empty state only if the result is empty.
72
+
73
+ **Don't:** render an empty Table with column headers and no rows.
74
+
75
+ ## Common agent mistakes
76
+
77
+ - Laying the empty state out with a CSS class or an inline-styled `div` where `Stack align="center"` does it.
78
+ - Declaring a separate empty state in each screen instead of one shared piece that takes the icon, text and action.
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: feedback
3
+ ---
4
+
5
+ # Feedback
6
+
7
+ ## When this applies
8
+
9
+ Telling the user that something happened, is happening, or needs their attention: a save succeeded, a request failed, a trial is ending, a page is loading. The router sends "Tell the user something happened" here.
10
+
11
+ ## Choosing components
12
+
13
+ | Situation | Use | Not |
14
+ | --- | --- | --- |
15
+ | An action succeeded and the result may not be visible (settings saved, invite sent) | [Toast](../components/toast.md) via `toast()` from `sonner` | Banner: stays on screen after it stops being news |
16
+ | A field is invalid | FormMessage from [form-label.md](../components/form-label.md), under the field | Toast or Banner: not tied to the field |
17
+ | The whole form failed (server rejected it) | [Banner](../components/banner.md) `variant="destructive"` `position="inline"` `role="alert"`, at the top of the form | Toast: disappears before the user can act |
18
+ | Something persistent about the account or page (trial ends in 3 days, maintenance tonight) | Banner `position="top"` with `variant="caution"` or `"informative"` and `role="status"` | Toast: transient; Dialog: blocks for no reason |
19
+ | A blocking problem the user must resolve before continuing | Banner `variant="destructive"` with an `action` Button | Toast |
20
+ | The user must decide before an irreversible action | [Dialog](../components/dialog.md) | a Banner or Toast asking for confirmation |
21
+ | Status of an item (Active, Draft, Failed) | [Badge](../components/badge.md) | Banner: it isn't a message |
22
+ | Work in progress, short and in place | [Spinner](../components/spinner.md) | a custom animation |
23
+ | Content loading into a known layout | [Skeleton](../components/skeleton.md) | Spinner in the middle of an empty page |
24
+ | Progress with a known amount | [Progress](../components/progress.md) | Spinner |
25
+ | Progress through a multi-step flow | [Stepper](../components/stepper.md) | Progress |
26
+
27
+ Eluan has no Alert component: inline Banner fills that role.
28
+
29
+ ## Structure
30
+
31
+ - Toasts appear wherever the single `<Toast />` toaster is mounted; mount it once near the app root, inside `EluanProvider`.
32
+ - Inline Banners go at the top of the region they describe: the top of a form, or the top of a section.
33
+ - Page Banners (`position="top"`) go above the page header, full width.
34
+ - Field messages go directly under their control, inside the field stack.
35
+
36
+ ## Rules
37
+
38
+ 1. Use a Toast only for transient, non-blocking confirmation. Never for errors the user must act on.
39
+ 2. Keep toast copy to a short past-tense headline ("Settings saved"), with an optional one-line `description`.
40
+ 3. Use an inline Banner for a form-level error and a top Banner for an account- or page-level notice.
41
+ 4. Set the Banner role yourself: `role="alert"` for errors and blocking messages, `role="status"` for everything else. Banner defaults to `role="banner"`, a page landmark, which is wrong for a message.
42
+ 5. Match the Banner `variant` to the meaning: `destructive` errors, `caution` warnings, `positive` success, `informative` and `neutral` information.
43
+ 6. If a Banner is `dismissible`, handle `onDismiss` and stop rendering it; the built-in button only calls your handler.
44
+ 7. Never show the same message in two places (a Toast and a Banner for one event).
45
+ 8. Install `sonner` as a direct dependency to call `toast()`. `@eluan/core` styles the toaster but doesn't re-export `toast()`.
46
+ 9. Mount `<Toast />` once, with no `className`, `style` or `toastOptions`; those replace Eluan's toast styling.
47
+
48
+ ## Example
49
+
50
+ ```tsx
51
+ import { Banner, Button, Toast } from "@eluan/core";
52
+ import { toast } from "sonner";
53
+
54
+ // Once, near the root:
55
+ export function AppShell({ children }: { children: React.ReactNode }) {
56
+ return (
57
+ <>
58
+ <Banner variant="caution" position="top" role="status" action={<Button size="sm" variant="outline">Upgrade</Button>}>
59
+ Your trial ends in 3 days.
60
+ </Banner>
61
+ {children}
62
+ <Toast />
63
+ </>
64
+ );
65
+ }
66
+
67
+ // Anywhere:
68
+ export function SaveSettingsButton({ save }: { save: () => Promise<void> }) {
69
+ return (
70
+ <Button
71
+ type="button"
72
+ onClick={async () => {
73
+ await save();
74
+ toast("Settings saved");
75
+ }}
76
+ >
77
+ Save changes
78
+ </Button>
79
+ );
80
+ }
81
+ ```
82
+
83
+ ## Dos and don'ts
84
+
85
+ **Do:** confirm a successful save with a short Toast.
86
+
87
+ **Don't:** use a Toast for a failed save the user has to fix; use an inline destructive Banner with `role="alert"`.
88
+
89
+ **Do:** put persistent account notices in a top Banner.
90
+
91
+ **Don't:** open a Dialog to deliver information that needs no decision.
92
+
93
+ ## Common agent mistakes
94
+
95
+ _Filled from evals._