@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,73 @@
1
+ ---
2
+ name: radius
3
+ ---
4
+
5
+ # Radius
6
+
7
+ ## Overview
8
+
9
+ Two roles carry almost every corner:
10
+
11
+ - **Controls are capsules.** Buttons, inputs, selects, segmented controls, navigation items, chips and switches all take `--control-radius`, fully round, in every corner style. A control is recognised by its shape.
12
+ - **Surfaces take `--surface-radius`.** Cards, tables, dialogs and panels. This is what the `data-curves` axis sets: `sharp`, `slight` or `sweeping` (the default). It also steps down in compact density and up in wide, so a tight layout doesn't carry big soft corners.
13
+
14
+ The `--curves-*` scale is for the small parts inside those two: a checkbox corner, a menu item, a tag in a table cell, a focus outline. See [theming.md](./theming.md) for the axis and [look.md](./look.md) for the roles.
15
+
16
+ ## Rules
17
+
18
+ 1. A control you build takes `--control-radius`; one that grows past a single line (a textarea, a tall dropzone) takes `--control-radius-multiline`, so it doesn't turn into an ellipse.
19
+ 2. A surface you build takes `--surface-radius`.
20
+ 3. Use `--curves-*` only for small inner parts. Never write a radius in px, rem or %.
21
+ 4. To make surfaces rounder or sharper everywhere, change `defaultCurves` on `EluanProvider`. Never override `--surface-radius` or `--curves-*`, and never try to square off controls: the corner style doesn't touch them.
22
+ 5. Nest smaller inside larger: an element inside a card uses `--curves-md` or smaller.
23
+ 6. Use `--radius-radius-full` only for circles (avatars, status dots). For a pill-shaped control use `--control-radius`.
24
+ 7. Don't restyle a component's corners. Components already use the right role.
25
+
26
+ ## Tokens
27
+
28
+ <!-- tokens:start -->
29
+ | Token | Value (default theme) | Use for |
30
+ | --- | --- | --- |
31
+ | `--control-radius` | `--radius-radius-full`: a capsule in every corner style | Every control: buttons, inputs, selects, chips, nav items |
32
+ | `--control-radius-multiline` | half of `--size-lg`: the capsule's corner at one line's height | A control taller than one line: textarea, dropzone |
33
+ | `--surface-radius` | 20px (sharp 6px, slight 12px; compact 16px, wide 24px) | Cards, tables, dialogs, panels |
34
+ | `--curves-xxs` | 2px (sharp 1px, slight 1px) | Corner radius |
35
+ | `--curves-xs` | 4px (sharp 2px, slight 2px) | Corner radius |
36
+ | `--curves-sm` | 8px (sharp 2px, slight 4px) | Corner radius |
37
+ | `--curves-md` | 12px (sharp 4px, slight 6px) | Corner radius |
38
+ | `--curves-lg` | 16px (sharp 6px, slight 10px) | Corner radius |
39
+ | `--curves-xl` | 24px (sharp 8px, slight 14px) | Corner radius |
40
+ | `--radius-radius-full` | 999px | Pills and circles only |
41
+ <!-- tokens:end -->
42
+
43
+ ## Choosing a value
44
+
45
+ | If you need… | Use |
46
+ | --- | --- |
47
+ | a card, panel or table container you compose | `--surface-radius`, as Card and Dialog use |
48
+ | a button-like or input-like element | `--control-radius` |
49
+ | a multi-line field or a tall drop target | `--control-radius-multiline` |
50
+ | a menu item, or an image inside a card | `--curves-md` |
51
+ | a small inner element (tag, inline code, checkbox) | `--curves-sm` |
52
+ | a circle | `--radius-radius-full` |
53
+ | sharper surfaces everywhere | `defaultCurves="slight"` or `"sharp"` |
54
+
55
+ ## Dos and don'ts
56
+
57
+ **Do:** use the role's token and nest down a step.
58
+
59
+ ```tsx
60
+ <div style={{ borderRadius: "var(--surface-radius)", padding: "var(--spacing-xl)" }}>
61
+ <img src="/cover.png" alt="" style={{ borderRadius: "var(--curves-md)", width: "100%" }} />
62
+ </div>
63
+ ```
64
+
65
+ **Don't:** hardcode a radius or override the axis.
66
+
67
+ ```tsx
68
+ <div style={{ borderRadius: 12, "--surface-radius": "20px" } as React.CSSProperties} />
69
+ ```
70
+
71
+ ## Common agent mistakes
72
+
73
+ _Filled from evals._
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: spacing
3
+ ---
4
+
5
+ # Spacing
6
+
7
+ ## Overview
8
+
9
+ Two density-aware scales control space and size. `--spacing-*` is for gaps, padding and margins. `--size-*` is for fixed dimensions: control heights, icon boxes, avatars. Both change with the `data-spacing` axis (`compact`, `standard`, `wide`), so a layout built on them re-densifies with one Provider setting. Density moves space and control size only: text stays the same size in all three, so a dense table stays readable. A standard control is 28, 36 or 44px tall; the surface radius steps with density too (see [radius.md](./radius.md)). See [theming.md](./theming.md).
10
+
11
+ Steps run `xxs`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `4xl`.
12
+
13
+ ## Rules
14
+
15
+ 1. Use `--spacing-*` for every margin, padding and gap.
16
+ 2. Use `--size-*` for fixed widths and heights of small things: icons, avatars, control heights.
17
+ 3. Never write px, rem or em for space or size.
18
+ 4. Prefer `gap` on a parent over margins on children. [Stack](../components/stack.md), [Row](../components/row.md) and [Grid](../components/grid.md) take these steps by name: `gap="md"`, `pad="xl"`.
19
+ 5. Never use `--spacing-xxs` for a border or line: it is 0 in compact density. Use a border token or the Separator component.
20
+ 6. Never divide or multiply spacing or size tokens with `calc()` to invent a new step. Pick the nearest step; for a height no step covers, such as a chart, use AspectRatio.
21
+ 7. Don't pad inside components. Card, Dialog, Fieldset and Popover already pad their content.
22
+
23
+ ## Tokens
24
+
25
+ <!-- tokens:start -->
26
+ | Token | Value (default theme) | Use for |
27
+ | --- | --- | --- |
28
+ | `--spacing-xxs` | 2px (compact 0px, wide 4px) | Gap, padding, margin |
29
+ | `--spacing-xs` | 4px (compact 2px, wide 8px) | Gap, padding, margin |
30
+ | `--spacing-sm` | 6px (compact 4px, wide 12px) | Gap, padding, margin |
31
+ | `--spacing-md` | 10px (compact 8px, wide 16px) | Gap, padding, margin |
32
+ | `--spacing-lg` | 14px (compact 10px, wide 20px) | Gap, padding, margin |
33
+ | `--spacing-xl` | 18px (compact 14px, wide 24px) | Gap, padding, margin |
34
+ | `--spacing-2xl` | 20px (compact 16px, wide 32px) | Gap, padding, margin |
35
+ | `--spacing-3xl` | 32px (compact 24px, wide 40px) | Gap, padding, margin |
36
+ | `--spacing-4xl` | 64px (compact 32px, wide 80px) | Gap, padding, margin |
37
+ | `--size-xxs` | 14px (compact 12px, wide 16px) | Control height, icon size |
38
+ | `--size-xs` | 18px (compact 16px, wide 20px) | Control height, icon size |
39
+ | `--size-sm` | 22px (compact 18px, wide 28px) | Control height, icon size |
40
+ | `--size-md` | 28px (compact 22px, wide 36px) | Control height, icon size |
41
+ | `--size-lg` | 36px (compact 28px, wide 44px) | Control height, icon size |
42
+ | `--size-xl` | 44px (compact 36px, wide 56px) | Control height, icon size |
43
+ | `--size-2xl` | 56px (compact 44px, wide 64px) | Control height, icon size |
44
+ | `--size-3xl` | 80px (compact 64px, wide 96px) | Control height, icon size |
45
+ | `--size-4xl` | 120px (compact 96px, wide 160px) | Control height, icon size |
46
+ <!-- tokens:end -->
47
+
48
+ ## Choosing a value
49
+
50
+ Component values come from the component source; page-level values are drafts.
51
+
52
+ | If you need… | Use |
53
+ | --- | --- |
54
+ | space between a label, its input and its message | `--spacing-sm` on your field stack |
55
+ | space between fields in a group | `--spacing-lg`, as Fieldset uses |
56
+ | padding inside a card | Card handles it (`--spacing-2xl`) |
57
+ | padding inside a dialog or sheet | Dialog and Sheet handle it (`--spacing-lg`) |
58
+ | space between inline items (icon and text, buttons in a row) | `--spacing-xs` to `--spacing-sm` |
59
+ | space between sections of a page | `--spacing-3xl` |
60
+ | page gutter | `--spacing-xl`: `pad="xl"` on the page's `main`, as the Dashboard example in docs/layout.md does |
61
+ | an icon box inside a control | `--size-xxs` |
62
+ | a standard control height | the component sets it (`--size-lg` default, `--size-md` small, `--size-xl` large) |
63
+
64
+ ## Dos and don'ts
65
+
66
+ **Do:** space with gap and tokens.
67
+
68
+ ```tsx
69
+ <Stack gap="lg">
70
+ <Input aria-label="Email" type="email" />
71
+ <Input aria-label="Password" type="password" />
72
+ </Stack>
73
+ ```
74
+
75
+ **Don't:** use raw values or margins on each child.
76
+
77
+ ```tsx
78
+ <div>
79
+ <div style={{ marginBottom: 16 }}><Input aria-label="Email" type="email" /></div>
80
+ <div style={{ marginBottom: "1rem" }}><Input aria-label="Password" type="password" /></div>
81
+ </div>
82
+ ```
83
+
84
+ **Do:** draw a divider with the Separator component.
85
+
86
+ ```tsx
87
+ <Separator />
88
+ ```
89
+
90
+ **Don't:** make a line out of a spacing token.
91
+
92
+ ```tsx
93
+ <div style={{ height: "var(--spacing-xxs)", backgroundColor: "var(--container-border)" }} />
94
+ ```
95
+
96
+ ## Common agent mistakes
97
+
98
+ _Filled from evals._
@@ -0,0 +1,212 @@
1
+ ---
2
+ name: theming
3
+ ---
4
+
5
+ # Theming
6
+
7
+ ## Overview
8
+
9
+ Eluan's look comes from CSS custom properties in three layers: primitives (raw values), modes (light, dim, dark aliases) and themes (the semantic tokens components read). `EluanProvider` activates them with attributes on `<html>`:
10
+
11
+ | Attribute | Values | Set with | Controls |
12
+ | --- | --- | --- | --- |
13
+ | `data-theme` | `eluan` or a custom theme name | `defaultTheme`, `setTheme` | the grey ramp, the accent, the status colours and the font families |
14
+ | `data-mode` | `light`, `dim`, `dark` | `defaultMode`, `setMode` | which mode aliases the theme resolves against |
15
+ | `data-spacing` | `compact`, `standard`, `wide` | `defaultSpacing`, `setSpacing` | every `--spacing-*` and `--size-*`: the room around text, never the text |
16
+ | `data-curves` | `sharp`, `slight`, `sweeping` (default) | `defaultCurves`, `setCurves` | `--surface-radius` and the `--curves-*` scale. Controls stay capsules |
17
+ | `data-typeset` | `app`, `small`, `medium`, `large`, or absent | `defaultTypeset`, `setTypeset` | absent keeps type fluid; `app` pins the whole-pixel scale for app screens; the others pin one column of the fluid scale |
18
+
19
+ `eluan` is the only built-in theme: concrete greys (a warm, faintly green grey) with blaze orange as the accent. A brand theme is a custom theme made with `createTheme()`, usually from `@eluan/theme-generator` output. It changes colour only. The look (what is flat, raised, lit and recessed; see [look.md](./look.md)) is the same in every theme.
20
+
21
+ A theme is two decisions: the grey and the accent.
22
+
23
+ - **The grey ramp**, `--color-neutral-0` to `--color-neutral-950`. Every mode builds its surfaces, text and borders from it: paper at 50, the hairline at 100, ink at 800, the dark ground at 950. The generator tints it toward a colour you name (`neutral`, a hex or `"none"`; the first accent if you name none) and by how much (`neutralTint`, 0 to 1).
24
+ - **The accent.** The primary action is the colour exactly as picked, in light, dim and dark, with white text on it. Switches, checks, sliders, progress and the focus ring take it from there.
25
+
26
+ The generator also derives status and chart colours and takes a minimum contrast ratio (default 4.5). Corner style, density and type scale are Provider axes, not generator output.
27
+
28
+ Contrast is checked when the theme is generated. The generator auto-corrects any foreground and background pair that falls below the minimum, moving the foreground the fewest steps along its own ramp that pass, and lists the corrections in its report. That's why you never override colour pairs by hand. One pair is held to 3:1 instead: white on the accent, which is part of the look (about 3.3:1 on the built-in orange). An accent too light for white gets dark text automatically; the report says when the primary button's text is under the configured minimum.
29
+
30
+ ## Rules
31
+
32
+ 1. Change the look through the theme or a Provider axis. Never restyle a single component.
33
+ 2. Get brand colours from the theme generator. Never hand-pick hex values for semantic tokens.
34
+ 3. Never override one token of a foreground and background pair. Regenerate the theme instead, so contrast stays checked.
35
+ 4. Use `defaultCurves` for corner style and `defaultSpacing` for density. Don't override `--surface-radius`, `--curves-*` or `--spacing-*` values.
36
+ 5. Let `EluanProvider` own the `data-*` attributes. Never set them in your own effects.
37
+ 6. Use `useEluanTheme()` to read or change theme, mode, spacing, curves and typeset at runtime.
38
+ 7. Never add a second built-in theme to the library. Custom themes live in the app.
39
+ 8. Give custom themes a unique name that starts with a letter. `eluan` is taken.
40
+ 9. A theme sets colour and fonts. Never use one to change the look: don't override `--control-*`, `--surface-*`, `--shell-*` or `--elevation-*` in a theme.
41
+
42
+ ## Tokens
43
+
44
+ These are the tokens a custom theme sets: the grey ramp and the fonts, plus the accent (`--action-primary-*`) and the status colours listed in [colour.md](./colour.md).
45
+
46
+ <!-- tokens:start -->
47
+ | Token | Value (default theme) | Use for |
48
+ | --- | --- | --- |
49
+ | `--color-neutral-0` | `--color-concrete-0` → oklch(1.0000 0.0000 0.00) | Theme's neutral ramp; modes derive backgrounds and foregrounds from it |
50
+ | `--color-neutral-50` | `--color-concrete-50` → oklch(0.9868 0.0028 128.49) | Theme's neutral ramp; modes derive backgrounds and foregrounds from it |
51
+ | `--color-neutral-100` | `--color-concrete-100` → oklch(0.9522 0.0070 124.45) | Theme's neutral ramp; modes derive backgrounds and foregrounds from it |
52
+ | `--color-neutral-200` | `--color-concrete-200` → oklch(0.8827 0.0165 118.16) | Theme's neutral ramp; modes derive backgrounds and foregrounds from it |
53
+ | `--color-neutral-300` | `--color-concrete-300` → oklch(0.8111 0.0267 118.99) | Theme's neutral ramp; modes derive backgrounds and foregrounds from it |
54
+ | `--color-neutral-400` | `--color-concrete-400` → oklch(0.7378 0.0385 119.16) | Theme's neutral ramp; modes derive backgrounds and foregrounds from it |
55
+ | `--color-neutral-500` | `--color-concrete-500` → oklch(0.6639 0.0492 118.51) | Theme's neutral ramp; modes derive backgrounds and foregrounds from it |
56
+ | `--color-neutral-600` | `--color-concrete-600` → oklch(0.5744 0.0466 119.64) | Theme's neutral ramp; modes derive backgrounds and foregrounds from it |
57
+ | `--color-neutral-700` | `--color-concrete-700` → oklch(0.4767 0.0377 119.25) | Theme's neutral ramp; modes derive backgrounds and foregrounds from it |
58
+ | `--color-neutral-800` | `--color-concrete-800` → oklch(0.3738 0.0284 118.54) | Theme's neutral ramp; modes derive backgrounds and foregrounds from it |
59
+ | `--color-neutral-900` | `--color-concrete-900` → oklch(0.2982 0.0213 119.11) | Theme's neutral ramp; modes derive backgrounds and foregrounds from it |
60
+ | `--color-neutral-950` | `--color-concrete-950` → oklch(0.2257 0.0152 119.03) | Theme's neutral ramp; modes derive backgrounds and foregrounds from it |
61
+ | `--font-heading` | "Inter Variable" | Headings |
62
+ | `--font-body` | "Inter Variable" | Body text and UI |
63
+ | `--font-mono` | "Paper Mono" | Code and tabular figures |
64
+ <!-- tokens:end -->
65
+
66
+ ## Generating a theme
67
+
68
+ From the CLI (writes `custom-theme.css` and `create-theme.json` for applying the theme, plus `primitives.json`, `semantic.json`, `theme.css`, `preview.html` and `report.md`, to the output directory):
69
+
70
+ ```bash
71
+ pnpm dlx @eluan/theme-generator generate --accent "#2F6F5E" --neutral "#7A8C82" --name forest --out ./src/theme
72
+ ```
73
+
74
+ From code (pure colour maths, runs in Node and the browser):
75
+
76
+ ```ts
77
+ import { generateTheme } from "@eluan/theme-generator";
78
+
79
+ const result = generateTheme({
80
+ accents: ["#2F6F5E"],
81
+ themeName: "forest",
82
+ minContrast: 4.5,
83
+ neutralTintRatio: 0.04,
84
+ });
85
+
86
+ result.customTheme; // ready for EluanProvider's customThemes: light, dim and dark, layered on eluan
87
+ result.createThemeOptions; // { tokens, modes: { dim, dark } } for createTheme()
88
+ result.report; // markdown: warnings and contrast corrections
89
+ ```
90
+
91
+ The output is small on purpose: the grey ramp, the primary action and the status and chart colours. Surface, text and border tokens are not in it, because the base theme builds them from the ramp in every mode. Don't add them back by hand.
92
+
93
+ To tint the greys toward a colour other than the accent, pass `neutral` (and `neutralTint` for strength):
94
+
95
+ ```ts
96
+ generateTheme({ accents: ["#FF5100"], neutral: "#909876", themeName: "brand", minContrast: 4.5, neutralTintRatio: 0.04 });
97
+ ```
98
+
99
+ Status and chart colours come out brighter in dark mode (`darkLift`, 0.08 by default) and quieter in dim (`dimChroma`, 0.8), with contrast still checked for every pair. The primary action is not adjusted: it is the picked colour in every mode. Don't brighten or tone colours by hand.
100
+
101
+ The accent hex is the one place a raw colour belongs: it's generator input, not a token value. Keep the generator call or its output in the app's source, next to the code that registers the theme.
102
+
103
+ ## Applying and switching a theme
104
+
105
+ ```tsx
106
+ import "@eluan/core/styles.css";
107
+ import { EluanProvider, useEluanTheme } from "@eluan/core";
108
+ import { generateTheme } from "@eluan/theme-generator";
109
+
110
+ const { customTheme: forest } = generateTheme({ accents: ["#2F6F5E"], themeName: "forest", minContrast: 4.5, neutralTintRatio: 0.04 });
111
+
112
+ export function App({ children }: { children: React.ReactNode }) {
113
+ return (
114
+ <EluanProvider customThemes={[forest]} defaultTheme="forest">
115
+ {children}
116
+ </EluanProvider>
117
+ );
118
+ }
119
+
120
+ export function ThemeSwitch() {
121
+ const { theme, setTheme } = useEluanTheme();
122
+ return (
123
+ <button type="button" onClick={() => setTheme(theme === "forest" ? "eluan" : "forest")}>
124
+ Switch theme
125
+ </button>
126
+ );
127
+ }
128
+ ```
129
+
130
+ The Provider sets `data-theme="eluan"` plus `data-theme-custom="forest"`, injects the theme's CSS once, and applies its dim and dark values with `data-mode`.
131
+
132
+ To mix generated colours with tokens of your own (fonts, say), use `createTheme`, which extends `eluan` and takes per-mode overrides under `modes`:
133
+
134
+ ```tsx
135
+ import { createTheme } from "@eluan/core";
136
+ import { generateTheme } from "@eluan/theme-generator";
137
+
138
+ const { createThemeOptions } = generateTheme({ accents: ["#2F6F5E"], themeName: "forest", minContrast: 4.5, neutralTintRatio: 0.04 });
139
+
140
+ export const forest = createTheme({
141
+ name: "forest",
142
+ ...createThemeOptions,
143
+ tokens: { ...createThemeOptions.tokens, "--font-heading": '"Fraunces", serif' },
144
+ });
145
+ ```
146
+
147
+ Don't apply `createThemeTokens` alone: it has no dim or dark values. `result.css.theme` is for pages without `EluanProvider`; it needs `data-theme` and `data-mode` on the same element.
148
+
149
+ Dark mode, density and corner style are separate axes:
150
+
151
+ ```tsx
152
+ const { setMode, setSpacing, setCurves } = useEluanTheme();
153
+ setMode("dark"); // light | dim | dark
154
+ setSpacing("compact"); // compact | standard | wide
155
+ setCurves("sharp"); // sharp | slight | sweeping
156
+ ```
157
+
158
+ The Provider persists these choices to `localStorage` and follows the OS colour scheme until the user picks a mode.
159
+
160
+ ## Scoped themes
161
+
162
+ To theme one region, point an `EluanProvider` at that element with `target`, and pass the same element to `portalContainer` so its overlays (Dialog, Popover, Select, menus, Tooltip) render inside the scope. Without `portalContainer`, overlays mount in `document.body` and show the default theme.
163
+
164
+ ## Choosing a value
165
+
166
+ | If you need… | Use |
167
+ | --- | --- |
168
+ | a brand colour | the theme generator's `customTheme`, registered with `customThemes` |
169
+ | sharper surfaces everywhere | `defaultCurves="slight"` or `"sharp"` |
170
+ | greys that lean toward a brand colour | the generator's `neutral` and `neutralTint` |
171
+ | a denser or roomier UI | `defaultSpacing="compact"` or `"wide"` |
172
+ | a dark mode toggle | a Switch that calls `setMode` from `useEluanTheme()` |
173
+ | a different font | override `--font-heading` and `--font-body` in `createTheme` |
174
+ | one region in another theme | a scoped `EluanProvider` with `target` and `portalContainer` |
175
+ | one-off change to a single region | wrap it in an element with an inline token override, as a last resort |
176
+
177
+ ## Dos and don'ts
178
+
179
+ **Do:** change the look at the theme level.
180
+
181
+ ```tsx
182
+ const { customTheme: brand } = generateTheme({ accents: ["#2F6F5E"], themeName: "brand", minContrast: 4.5, neutralTintRatio: 0.04 });
183
+
184
+ <EluanProvider customThemes={[brand]} defaultTheme="brand">
185
+ <App />
186
+ </EluanProvider>;
187
+ ```
188
+
189
+ **Don't:** restyle components one by one or hardcode a brand colour.
190
+
191
+ ```tsx
192
+ <div style={{ "--action-primary-bg": "#2F6F5E", borderRadius: 16 } as React.CSSProperties}>
193
+ <Button>Save</Button>
194
+ </div>
195
+ ```
196
+
197
+ **Do:** toggle dark mode through the Provider.
198
+
199
+ ```tsx
200
+ const { mode, setMode } = useEluanTheme();
201
+ <Switch checked={mode === "dark"} onCheckedChange={(on) => setMode(on ? "dark" : "light")} aria-label="Dark mode" />;
202
+ ```
203
+
204
+ **Don't:** set the attribute yourself.
205
+
206
+ ```tsx
207
+ useEffect(() => document.documentElement.setAttribute("data-mode", "dark"), []);
208
+ ```
209
+
210
+ ## Common agent mistakes
211
+
212
+ _Filled from evals._
@@ -0,0 +1,169 @@
1
+ ---
2
+ name: typography
3
+ ---
4
+
5
+ # Typography
6
+
7
+ ## Overview
8
+
9
+ Eluan's type scale is fluid: ten steps (`step-6` down to `step-neg3`) that interpolate with the viewport between 480px and 1024px, so text resizes with no media queries in app code. Each step has a size, a line height and a letter spacing, and they always travel together. `data-typeset` on any element pins the scale to its small, medium or large column; leave it off to stay fluid.
10
+
11
+ There is a second scale for app screens. `data-typeset="app"` (set it with `<EluanProvider defaultTypeset="app">`) pins every step to a whole-pixel size, 11, 12, 13, 14, 16, 20, 24, 28, 32 and 40, with line heights on a 4px grid, tracking set per size, and headings a weight heavier. Dashboards, tables and settings screens use it; marketing pages, docs and articles stay on the fluid scale. The token names are the same on both, so nothing else in your code changes.
12
+
13
+ The `Typography` component is the front door to the scale. Its `variant` picks a step, a family, a weight and a default element in one prop:
14
+
15
+ | Variant | Step | Family | Default element |
16
+ | --- | --- | --- | --- |
17
+ | `display` | 5 | heading | `h1` |
18
+ | `title` | 4 | heading | `h2` |
19
+ | `heading` | 3 | heading | `h3` |
20
+ | `subheading` | 2 | heading | `h4` |
21
+ | `lead` | 1 | body | `p` |
22
+ | `body` | 0 | body | `p` |
23
+ | `label` | neg1 | body | `span` |
24
+ | `caption` | neg2 | body | `span` |
25
+
26
+ `tone` is `default`, `muted` (`--container-fg-alt`) or `inverse`; `positive` and `destructive` for status text; `interactive` and `interactive-muted` for text on a control you build; `inherit` for the parent's colour.
27
+
28
+ The `--font-size-xs` to `--font-size-5xl` aliases map onto steps, the same step in every density: `data-spacing` changes the room around text, never the text. To change text size, pin a typeset. Components use the aliases; app text should use `Typography`.
29
+
30
+ ## Rules
31
+
32
+ 1. Set text with `Typography`. Pick the `variant` for the role of the text, not its size.
33
+ 2. Use `as` to fix the heading level for the document outline; keep the variant for the look.
34
+ 3. If you style text yourself, apply all three tokens of one step together, for example `--font-size-step-1`, `--line-height-step-1` and `--letter-spacing-step-1`.
35
+ 4. Never write a font size, line height or letter spacing in px, rem or em.
36
+ 5. Use `--font-heading`, `--font-body` and `--font-mono` for families. Change fonts only in the theme.
37
+ 6. Use one `title` or `display` per page. `display` and `lead` belong to content pages; on an app screen, set `title` and `heading` with `size` (see Choosing a value).
38
+ 7. Pin `data-typeset="app"` for an app of app screens. Don't pin `small`, `medium` or `large` unless a region must not resize (for example a fixed-size canvas).
39
+
40
+ ## Tokens
41
+
42
+ <!-- tokens:start -->
43
+ | Token | Value (default theme) | Use for |
44
+ | --- | --- | --- |
45
+ | `--font-heading` | "Inter Variable" | Headings |
46
+ | `--font-body` | "Inter Variable" | Body text and UI |
47
+ | `--font-mono` | "Paper Mono" | Code and tabular figures |
48
+ | `--font-size-xs` | `--font-size-step-neg2` | Type size alias components use; the same in every density |
49
+ | `--font-size-sm` | `--font-size-step-neg1` | Type size alias components use; the same in every density |
50
+ | `--font-size-base` | `--font-size-step-0` | Type size alias components use; the same in every density |
51
+ | `--font-size-lg` | `--font-size-step-1` | Type size alias components use; the same in every density |
52
+ | `--font-size-xl` | `--font-size-step-2` | Type size alias components use; the same in every density |
53
+ | `--font-size-2xl` | `--font-size-step-3` | Type size alias components use; the same in every density |
54
+ | `--font-size-3xl` | `--font-size-step-4` | Type size alias components use; the same in every density |
55
+ | `--font-size-4xl` | `--font-size-step-5` | Type size alias components use; the same in every density |
56
+ | `--font-size-5xl` | `--font-size-step-6` | Type size alias components use; the same in every density |
57
+ | `--line-height-xs` | `--line-height-step-neg2` | Line height for the same-named --font-size-* alias |
58
+ | `--line-height-sm` | `--line-height-step-neg1` | Line height for the same-named --font-size-* alias |
59
+ | `--line-height-base` | `--line-height-step-0` | Line height for the same-named --font-size-* alias |
60
+ | `--line-height-lg` | `--line-height-step-1` | Line height for the same-named --font-size-* alias |
61
+ | `--line-height-xl` | `--line-height-step-2` | Line height for the same-named --font-size-* alias |
62
+ | `--line-height-2xl` | `--line-height-step-3` | Line height for the same-named --font-size-* alias |
63
+ | `--line-height-3xl` | `--line-height-step-4` | Line height for the same-named --font-size-* alias |
64
+ | `--line-height-4xl` | `--line-height-step-5` | Line height for the same-named --font-size-* alias |
65
+ | `--line-height-5xl` | `--line-height-step-6` | Line height for the same-named --font-size-* alias |
66
+ | `--letter-spacing-xs` | `--letter-spacing-step-neg2` | Tracking for the same-named --font-size-* alias |
67
+ | `--letter-spacing-sm` | `--letter-spacing-step-neg1` | Tracking for the same-named --font-size-* alias |
68
+ | `--letter-spacing-base` | `--letter-spacing-step-0` | Tracking for the same-named --font-size-* alias |
69
+ | `--letter-spacing-lg` | `--letter-spacing-step-1` | Tracking for the same-named --font-size-* alias |
70
+ | `--letter-spacing-xl` | `--letter-spacing-step-2` | Tracking for the same-named --font-size-* alias |
71
+ | `--letter-spacing-2xl` | `--letter-spacing-step-3` | Tracking for the same-named --font-size-* alias |
72
+ | `--letter-spacing-3xl` | `--letter-spacing-step-4` | Tracking for the same-named --font-size-* alias |
73
+ | `--letter-spacing-4xl` | `--letter-spacing-step-5` | Tracking for the same-named --font-size-* alias |
74
+ | `--letter-spacing-5xl` | `--letter-spacing-step-6` | Tracking for the same-named --font-size-* alias |
75
+ | `--font-size-step-6` | 41.81px → 68.66px, fluid | Type step; apply with its line-height and letter-spacing |
76
+ | `--font-size-step-5` | 34.84px → 54.93px, fluid | Type step; apply with its line-height and letter-spacing |
77
+ | `--font-size-step-4` | 29.03px → 43.95px, fluid | Type step; apply with its line-height and letter-spacing |
78
+ | `--font-size-step-3` | 24.19px → 35.16px, fluid | Type step; apply with its line-height and letter-spacing |
79
+ | `--font-size-step-2` | 20.16px → 28.13px, fluid | Type step; apply with its line-height and letter-spacing |
80
+ | `--font-size-step-1` | 16.8px → 22.5px, fluid | Type step; apply with its line-height and letter-spacing |
81
+ | `--font-size-step-0` | 14px → 18px, fluid | Type step; apply with its line-height and letter-spacing |
82
+ | `--font-size-step-neg1` | 11.67px → 14.4px, fluid | Type step; apply with its line-height and letter-spacing |
83
+ | `--font-size-step-neg2` | 9.72px → 11.52px, fluid | Type step; apply with its line-height and letter-spacing |
84
+ | `--font-size-step-neg3` | 8.1px → 9.22px, fluid | Type step; apply with its line-height and letter-spacing |
85
+ | `--line-height-step-6` | 1.2 | Line height paired with the same step |
86
+ | `--line-height-step-5` | 1.2 | Line height paired with the same step |
87
+ | `--line-height-step-4` | 1.2 | Line height paired with the same step |
88
+ | `--line-height-step-3` | 1.2 | Line height paired with the same step |
89
+ | `--line-height-step-2` | 1.375 | Line height paired with the same step |
90
+ | `--line-height-step-1` | 1.375 | Line height paired with the same step |
91
+ | `--line-height-step-0` | 1.5 | Line height paired with the same step |
92
+ | `--line-height-step-neg1` | 1.5 | Line height paired with the same step |
93
+ | `--line-height-step-neg2` | 1.5 | Line height paired with the same step |
94
+ | `--line-height-step-neg3` | 1.5 | Line height paired with the same step |
95
+ | `--letter-spacing-step-6` | -0.03em | Tracking paired with the same step |
96
+ | `--letter-spacing-step-5` | -0.025em | Tracking paired with the same step |
97
+ | `--letter-spacing-step-4` | -0.02em | Tracking paired with the same step |
98
+ | `--letter-spacing-step-3` | -0.015em | Tracking paired with the same step |
99
+ | `--letter-spacing-step-2` | -0.01em | Tracking paired with the same step |
100
+ | `--letter-spacing-step-1` | 0em | Tracking paired with the same step |
101
+ | `--letter-spacing-step-0` | 0em | Tracking paired with the same step |
102
+ | `--letter-spacing-step-neg1` | 0em | Tracking paired with the same step |
103
+ | `--letter-spacing-step-neg2` | 0em | Tracking paired with the same step |
104
+ | `--letter-spacing-step-neg3` | 0em | Tracking paired with the same step |
105
+ <!-- tokens:end -->
106
+
107
+ ## Choosing a value
108
+
109
+ First decide whether the page is a content page (read: marketing, docs, articles) or an app screen (work: dashboards, tables, settings, anything inside an app shell). [page-layout.md](../patterns/page-layout.md) explains the split. An app screen keeps the variant for the role and adds `size`, so headings sit on the same scale as the controls and tables beside them.
110
+
111
+ | If you need… | Content page | App screen |
112
+ | --- | --- | --- |
113
+ | a page title | `<Typography variant="title" as="h1">` | `<Typography variant="title" as="h1" size="xl">` |
114
+ | a line under the title | `<Typography variant="lead">` | `<Typography size="sm" tone="muted">` |
115
+ | a section heading | `<Typography variant="heading" as="h2">` | `<Typography variant="heading" as="h2" size="lg">` |
116
+ | a card or group heading | `<Typography variant="subheading" as="h3">`, or CardTitle inside a Card | `<Typography variant="subheading" as="h3" size="base">` |
117
+ | body copy | `<Typography variant="body">` | `<Typography size="sm">` |
118
+ | helper or meta text | `<Typography variant="caption" tone="muted">` | the same |
119
+ | a number in a column | `tabular` on either | `<Typography as="span" size="sm" tabular>` |
120
+ | a form label | Label (from `components/form-label.md`), not Typography | the same |
121
+ | code | CodeBlock or Kbd; `--font-mono` if composing | the same |
122
+
123
+ ## Dos and don'ts
124
+
125
+ **Do:** pick variants by role.
126
+
127
+ ```tsx
128
+ import { Typography } from "@eluan/core";
129
+
130
+ export function SettingsHeading() {
131
+ return (
132
+ <>
133
+ <Typography variant="title" size="xl" as="h1">Account settings</Typography>
134
+ <Typography size="sm" tone="muted">Manage your profile, notifications and billing.</Typography>
135
+ </>
136
+ );
137
+ }
138
+ ```
139
+
140
+ **Don't:** size text by hand.
141
+
142
+ ```tsx
143
+ <h1 style={{ fontSize: "32px", lineHeight: 1.1 }}>Account settings</h1>
144
+ ```
145
+
146
+ **Do:** keep a step's three tokens together when you must compose.
147
+
148
+ ```tsx
149
+ <span
150
+ style={{
151
+ fontSize: "var(--font-size-step-neg1)",
152
+ lineHeight: "var(--line-height-step-neg1)",
153
+ letterSpacing: "var(--letter-spacing-step-neg1)",
154
+ }}
155
+ >
156
+ 3 items
157
+ </span>
158
+ ```
159
+
160
+ **Don't:** mix a step's size with another step's line height.
161
+
162
+ ```tsx
163
+ <span style={{ fontSize: "var(--font-size-step-3)", lineHeight: "var(--line-height-step-0)" }}>3 items</span>
164
+ ```
165
+
166
+ ## Common agent mistakes
167
+
168
+ - Setting a dashboard's title, lead and section headings at content-page sizes, several steps above the controls and tables they introduce.
169
+ - Reaching for `step` to shrink a heading on an app screen. Use `size`: the aliases the controls beside it read.