@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.
- package/README.md +41 -3
- package/bin/eluan.mjs +75 -0
- package/bin/lib/check.mjs +271 -0
- package/bin/lib/skill.mjs +123 -0
- package/dist/{action-popover-D6K9aVFk.cjs → action-popover-Bt7U0g8y.cjs} +1 -1
- package/dist/{action-popover-BVJQBuky.js → action-popover-jEeycwXM.js} +2 -2
- package/dist/action-popover.cjs +1 -1
- package/dist/action-popover.js +1 -1
- package/dist/{avatar-CS5f1irF.js → avatar-C1LUOzjw.js} +1 -1
- package/dist/{avatar-Co-k8KqV.cjs → avatar-SwIO4oyt.cjs} +1 -1
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge-BLInSFM-.cjs +1 -0
- package/dist/{badge-D9NYZFWH.js → badge-Bj7i1Xf5.js} +20 -18
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{banner-CyYFLZXw.js → banner-BqEziMp4.js} +11 -12
- package/dist/banner-C8OECYHz.cjs +1 -0
- package/dist/banner.cjs +1 -1
- package/dist/banner.js +1 -1
- package/dist/box-DG-tkaYi.cjs +1 -0
- package/dist/box-DKbNgGGG.js +17 -0
- package/dist/box.cjs +1 -0
- package/dist/box.d.ts +1 -0
- package/dist/box.js +5 -0
- package/dist/{breadcrumb-NWXeCH5q.cjs → breadcrumb-BGH_YhOZ.cjs} +1 -1
- package/dist/{breadcrumb-Cm1nb9Xj.js → breadcrumb-BVXSOA4Z.js} +2 -2
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/button-BUHQOcAo.cjs +1 -0
- package/dist/{button-ANAPDrvs.js → button-fCYiYUPE.js} +69 -60
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar-2s_jGUBa.cjs +76 -0
- package/dist/{calendar-BpBsomy5.js → calendar-BN9BkjO_.js} +22 -22
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card-CfSvhkGH.js +81 -0
- package/dist/card-DlP39QSZ.cjs +1 -0
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{carousel-DuP0hvF-.js → carousel-BO6KUdP8.js} +1 -1
- package/dist/{carousel-BfL7oy_q.cjs → carousel-dypuabh8.cjs} +1 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.js +1 -1
- package/dist/{checkbox-Bi0Kmuut.js → checkbox-CGUTGery.js} +1 -1
- package/dist/{checkbox-M8DmWKiC.cjs → checkbox-Cq9sHU_S.cjs} +1 -1
- package/dist/{checkbox-group-KBwPhjmW.cjs → checkbox-group-DGXZ4o2-.cjs} +1 -1
- package/dist/{checkbox-group-CQMEJnhD.js → checkbox-group-Tkio3IhK.js} +1 -1
- package/dist/checkbox-group.cjs +1 -1
- package/dist/checkbox-group.js +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{code-block-C9u140Ob.js → code-block-CAXUOKNI.js} +10 -10
- package/dist/{code-block-_dFw7Su1.cjs → code-block-Co8uGXiG.cjs} +2 -2
- package/dist/code-block.cjs +1 -1
- package/dist/code-block.js +1 -1
- package/dist/command-C50Jkuv7.js +132 -0
- package/dist/command-DqNgPVsf.cjs +9 -0
- package/dist/command.cjs +1 -1
- package/dist/command.js +1 -1
- package/dist/components/box.d.ts +12 -0
- package/dist/components/card.d.ts +7 -2
- package/dist/components/grid.d.ts +35 -0
- package/dist/components/icon.d.ts +26 -0
- package/dist/components/input.d.ts +1 -1
- package/dist/components/layout-shared.d.ts +307 -0
- package/dist/components/navigation-drawer.d.ts +25 -5
- package/dist/components/row.d.ts +18 -0
- package/dist/components/stack.d.ts +14 -0
- package/dist/components/table.d.ts +8 -4
- package/dist/components/tone-shared.d.ts +39 -0
- package/dist/components/typography.d.ts +22 -2
- package/dist/components/visually-hidden.d.ts +11 -0
- package/dist/{context-menu-Bd6m1RYU.js → context-menu-CTyczUjx.js} +34 -34
- package/dist/context-menu-oQ6xMN6t.cjs +1 -0
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{credit-card-input-CUqA9CX3.cjs → credit-card-input-C6oNQBAl.cjs} +1 -1
- package/dist/{credit-card-input-DN-8vaFj.js → credit-card-input-aYftFdRo.js} +1 -1
- package/dist/credit-card-input.cjs +1 -1
- package/dist/credit-card-input.js +1 -1
- package/dist/{date-picker-ni8td8Ru.js → date-picker-DK-G61Nn.js} +3 -3
- package/dist/{date-picker-DGBsfZXx.cjs → date-picker-D_aU_P3A.cjs} +1 -1
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/{datetime-picker-C1d63MaA.cjs → datetime-picker-897BvwxW.cjs} +1 -1
- package/dist/{datetime-picker-DsnHYRK-.js → datetime-picker-CECtSobs.js} +4 -4
- package/dist/datetime-picker.cjs +1 -1
- package/dist/datetime-picker.js +1 -1
- package/dist/decimal-input-B7IHYVXP.cjs +1 -0
- package/dist/decimal-input-ohejnbQg.js +177 -0
- package/dist/decimal-input.cjs +1 -1
- package/dist/decimal-input.js +1 -1
- package/dist/dialog-DIGW7qln.cjs +1 -0
- package/dist/dialog-DVhnZFqE.js +64 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-BV2rX_ow.cjs +1 -0
- package/dist/dropdown-menu-C6NPtU9J.js +115 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/{email-input-pX0hlYV3.js → email-input-CRd87a_c.js} +1 -1
- package/dist/{email-input-DFI4h_KN.cjs → email-input-Dvj1xSzJ.cjs} +1 -1
- package/dist/email-input.cjs +1 -1
- package/dist/email-input.js +1 -1
- package/dist/{fieldset-5V8wx-KE.js → fieldset-BxINrO_H.js} +6 -6
- package/dist/fieldset-C6cahGeV.cjs +1 -0
- package/dist/fieldset.cjs +1 -1
- package/dist/fieldset.js +1 -1
- package/dist/file-input-BzYcnore.cjs +1 -0
- package/dist/{file-input-B_aBgxmT.js → file-input-Ch16hNA1.js} +55 -55
- package/dist/file-input.cjs +1 -1
- package/dist/file-input.js +1 -1
- package/dist/{footer-DB0_-IwN.cjs → footer-B-fRLhqP.cjs} +1 -1
- package/dist/{footer-B3KUIwXW.js → footer-BiiV6-ZD.js} +9 -9
- package/dist/footer.cjs +1 -1
- package/dist/footer.js +1 -1
- package/dist/grid-BDz4Xs6M.cjs +1 -0
- package/dist/grid-BX5vZjDo.js +612 -0
- package/dist/grid.cjs +1 -0
- package/dist/grid.d.ts +1 -0
- package/dist/grid.js +5 -0
- package/dist/header-CvhqGcuo.cjs +1 -0
- package/dist/{header-CDOWlOAR.js → header-DwvyTpRi.js} +22 -22
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/hover-card-BQpzaazK.js +21 -0
- package/dist/{hover-card-C5KsTSZR.cjs → hover-card-V5A1HzEu.cjs} +1 -1
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/icon-BmLOodCQ.cjs +1 -0
- package/dist/icon-BwDfkIdR.js +153 -0
- package/dist/icon.cjs +1 -0
- package/dist/icon.d.ts +1 -0
- package/dist/icon.js +5 -0
- package/dist/index.cjs +10 -5
- package/dist/index.d.ts +6 -0
- package/dist/index.js +593 -516
- package/dist/input-Dtr0tlf7.cjs +1 -0
- package/dist/input-Zs45H33i.js +131 -0
- package/dist/input-otp-D-T32R3O.cjs +1 -0
- package/dist/{input-otp-DmEGB1nu.js → input-otp-DwdX6VlR.js} +33 -33
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout-shared-B_1iX4Hj.js +319 -0
- package/dist/layout-shared-CsBZcT4V.cjs +1 -0
- package/dist/{menubar-F1_bhmku.js → menubar-CodcV4b7.js} +28 -28
- package/dist/menubar-bOYi1jKo.cjs +1 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.js +1 -1
- package/dist/multi-select-ChfbxrG3.js +85 -0
- package/dist/multi-select-D573XqUT.cjs +1 -0
- package/dist/multi-select.cjs +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/navigation-drawer-C7YYtBXz.js +198 -0
- package/dist/navigation-drawer-Cu2q1NMn.cjs +1 -0
- package/dist/navigation-drawer.cjs +1 -1
- package/dist/navigation-drawer.js +1 -1
- package/dist/{navigation-menu-BjA-PdMY.js → navigation-menu-BEp603xA.js} +16 -16
- package/dist/{navigation-menu-BtpLfxHN.cjs → navigation-menu-tw5cD7mL.cjs} +2 -2
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.js +1 -1
- package/dist/number-input-C1RS-p2C.js +66 -0
- package/dist/number-input-N3-IvxZT.cjs +1 -0
- package/dist/number-input.cjs +1 -1
- package/dist/number-input.js +1 -1
- package/dist/{pagination-4IuE_APs.cjs → pagination-C6e9oVes.cjs} +1 -1
- package/dist/{pagination-DTWRjiOm.js → pagination-XlaE-Plb.js} +32 -32
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.js +1 -1
- package/dist/{password-input-B9V45d3Q.js → password-input-CR6FT6Rh.js} +2 -2
- package/dist/{password-input-BwnlHPbX.cjs → password-input-CZ19HPZd.cjs} +1 -1
- package/dist/password-input.cjs +1 -1
- package/dist/password-input.js +1 -1
- package/dist/{phone-input-BQjZj5jI.cjs → phone-input-BZhkLmI6.cjs} +1 -1
- package/dist/{phone-input-CSBpGHvI.js → phone-input-CT9W87M7.js} +2 -2
- package/dist/phone-input.cjs +1 -1
- package/dist/phone-input.js +1 -1
- package/dist/popover-CE0n5BQv.cjs +1 -0
- package/dist/popover-CguR4kP7.js +70 -0
- package/dist/popover.cjs +1 -1
- package/dist/popover.js +1 -1
- package/dist/{progress-Dz_it5I-.js → progress-BpUNvswZ.js} +8 -7
- package/dist/progress-DSy_jRee.cjs +1 -0
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/providers/create-theme.d.ts +11 -2
- package/dist/providers/eluan-provider.d.ts +8 -6
- package/dist/{radio-group-C--1neiq.cjs → radio-group-9gozRouT.cjs} +1 -1
- package/dist/{radio-group-CNMPZx_2.js → radio-group-Bs9933bk.js} +6 -6
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{rich-text-BZSyuYSo.js → rich-text-CuAa5WkV.js} +21 -21
- package/dist/{rich-text-DerWxzdn.cjs → rich-text-p7H-0qE7.cjs} +2 -2
- package/dist/rich-text.cjs +1 -1
- package/dist/rich-text.js +1 -1
- package/dist/row-BYAk7G5d.js +37 -0
- package/dist/row-Bjn-GQAC.cjs +1 -0
- package/dist/row.cjs +1 -0
- package/dist/row.d.ts +1 -0
- package/dist/row.js +5 -0
- package/dist/{search-input-bFNW6oiE.js → search-input-CxKLBmii.js} +53 -53
- package/dist/{search-input-Dmmo-BEL.cjs → search-input-XmoL2YjY.cjs} +1 -1
- package/dist/search-input.cjs +1 -1
- package/dist/search-input.js +1 -1
- package/dist/select-BCDam7PR.cjs +1 -0
- package/dist/select-QgjG43ye.js +119 -0
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/sheet-BxNmBMti.cjs +1 -0
- package/dist/{sheet-D5HWF66e.js → sheet-D0hVuH9a.js} +7 -7
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/slider-Cv7uIp4z.js +16 -0
- package/dist/slider-Dci7KGjg.cjs +1 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/stack-Ck1w2iJu.cjs +1 -0
- package/dist/stack-D2btWM1t.js +27 -0
- package/dist/stack.cjs +1 -0
- package/dist/stack.d.ts +1 -0
- package/dist/stack.js +5 -0
- package/dist/{stepper-D5nDwJUz.cjs → stepper-ByYKX7qw.cjs} +1 -1
- package/dist/{stepper-BtlKiHtd.js → stepper-Copsj87A.js} +4 -4
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.js +1 -1
- package/dist/styles.css +1205 -189
- package/dist/switch-DQ4R-gjR.cjs +1 -0
- package/dist/switch-WaESqUuN.js +9 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +1 -1
- package/dist/table-YKEWGYnI.js +149 -0
- package/dist/table-zbkgP43L.cjs +1 -0
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs-BwNIi7Dl.js +22 -0
- package/dist/tabs-DItFd2o9.cjs +1 -0
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/textarea-BWAPWDRt.js +8 -0
- package/dist/textarea-CniUTipL.cjs +1 -0
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{time-input-BPoFvoeM.js → time-input-CeJVQKWO.js} +68 -68
- package/dist/time-input-eVFFYo10.cjs +1 -0
- package/dist/time-input.cjs +1 -1
- package/dist/time-input.js +1 -1
- package/dist/{toast-BK0ulAzi.cjs → toast-84RpQJtn.cjs} +1 -1
- package/dist/{toast-hI3pdZ2X.js → toast-BGKaAZwf.js} +1 -1
- package/dist/toast.cjs +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-Dv1VZ5Le.js → toggle-CxHqX2-V.js} +11 -11
- package/dist/toggle-DrJJAflI.cjs +1 -0
- package/dist/toggle-group-DvoxSJMq.cjs +1 -0
- package/dist/{toggle-group-DE8BPZih.js → toggle-group-k-kiBnEe.js} +21 -21
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +1 -1
- package/dist/{tooltip-DZqn4wKl.js → tooltip-1Biy6A0m.js} +3 -3
- package/dist/{tooltip-faf1dIXp.cjs → tooltip-DIerl2vz.cjs} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-view-CyeJR7cW.js → tree-view-Bswh2RGr.js} +37 -37
- package/dist/tree-view-DDX9QjzF.cjs +1 -0
- package/dist/tree-view.cjs +1 -1
- package/dist/tree-view.js +1 -1
- package/dist/visually-hidden-BQMRYGxP.js +14 -0
- package/dist/visually-hidden-DzxxOswl.cjs +1 -0
- package/dist/visually-hidden.cjs +1 -0
- package/dist/visually-hidden.d.ts +1 -0
- package/dist/visually-hidden.js +5 -0
- package/package.json +12 -8
- package/skills/eluan/DESIGN.md +411 -0
- package/skills/eluan/SKILL.md +202 -0
- package/skills/eluan/components/accordion.md +212 -0
- package/skills/eluan/components/action-popover.md +266 -0
- package/skills/eluan/components/aspect-ratio.md +169 -0
- package/skills/eluan/components/avatar.md +277 -0
- package/skills/eluan/components/badge.md +190 -0
- package/skills/eluan/components/banner.md +247 -0
- package/skills/eluan/components/box.md +166 -0
- package/skills/eluan/components/breadcrumb.md +240 -0
- package/skills/eluan/components/button.md +214 -0
- package/skills/eluan/components/calendar.md +192 -0
- package/skills/eluan/components/card.md +271 -0
- package/skills/eluan/components/carousel.md +274 -0
- package/skills/eluan/components/checkbox-group.md +228 -0
- package/skills/eluan/components/checkbox.md +226 -0
- package/skills/eluan/components/code-block.md +193 -0
- package/skills/eluan/components/collapsible.md +240 -0
- package/skills/eluan/components/command.md +359 -0
- package/skills/eluan/components/context-menu.md +296 -0
- package/skills/eluan/components/credit-card-input.md +217 -0
- package/skills/eluan/components/date-picker.md +255 -0
- package/skills/eluan/components/date-time-picker.md +196 -0
- package/skills/eluan/components/decimal-input.md +232 -0
- package/skills/eluan/components/dialog.md +322 -0
- package/skills/eluan/components/drawer.md +292 -0
- package/skills/eluan/components/dropdown-menu.md +450 -0
- package/skills/eluan/components/email-input.md +200 -0
- package/skills/eluan/components/fieldset.md +219 -0
- package/skills/eluan/components/file-input.md +249 -0
- package/skills/eluan/components/footer.md +290 -0
- package/skills/eluan/components/form-label.md +254 -0
- package/skills/eluan/components/grid.md +192 -0
- package/skills/eluan/components/header.md +242 -0
- package/skills/eluan/components/hover-card.md +215 -0
- package/skills/eluan/components/icon.md +161 -0
- package/skills/eluan/components/input-otp.md +227 -0
- package/skills/eluan/components/input.md +249 -0
- package/skills/eluan/components/kbd.md +216 -0
- package/skills/eluan/components/media.md +244 -0
- package/skills/eluan/components/menubar.md +300 -0
- package/skills/eluan/components/multi-select.md +221 -0
- package/skills/eluan/components/navigation-drawer.md +297 -0
- package/skills/eluan/components/navigation-menu.md +291 -0
- package/skills/eluan/components/number-input.md +190 -0
- package/skills/eluan/components/pagination.md +262 -0
- package/skills/eluan/components/password-input.md +218 -0
- package/skills/eluan/components/phone-input.md +205 -0
- package/skills/eluan/components/popover.md +250 -0
- package/skills/eluan/components/progress.md +185 -0
- package/skills/eluan/components/radio-group.md +232 -0
- package/skills/eluan/components/rich-text.md +195 -0
- package/skills/eluan/components/row.md +174 -0
- package/skills/eluan/components/scroll-area.md +203 -0
- package/skills/eluan/components/search-input.md +281 -0
- package/skills/eluan/components/segmented-control.md +201 -0
- package/skills/eluan/components/select.md +296 -0
- package/skills/eluan/components/separator.md +179 -0
- package/skills/eluan/components/sheet.md +326 -0
- package/skills/eluan/components/skeleton.md +202 -0
- package/skills/eluan/components/slider.md +195 -0
- package/skills/eluan/components/spinner.md +187 -0
- package/skills/eluan/components/stack.md +158 -0
- package/skills/eluan/components/stepper.md +236 -0
- package/skills/eluan/components/switch.md +218 -0
- package/skills/eluan/components/table.md +348 -0
- package/skills/eluan/components/tabs.md +277 -0
- package/skills/eluan/components/textarea.md +202 -0
- package/skills/eluan/components/time-input.md +181 -0
- package/skills/eluan/components/toast.md +251 -0
- package/skills/eluan/components/toggle-group.md +241 -0
- package/skills/eluan/components/toggle.md +198 -0
- package/skills/eluan/components/tooltip.md +222 -0
- package/skills/eluan/components/tree-view.md +213 -0
- package/skills/eluan/components/typography.md +210 -0
- package/skills/eluan/components/visually-hidden.md +132 -0
- package/skills/eluan/foundations/colour.md +257 -0
- package/skills/eluan/foundations/elevation.md +86 -0
- package/skills/eluan/foundations/iconography.md +70 -0
- package/skills/eluan/foundations/look.md +135 -0
- package/skills/eluan/foundations/motion.md +60 -0
- package/skills/eluan/foundations/radius.md +73 -0
- package/skills/eluan/foundations/spacing.md +98 -0
- package/skills/eluan/foundations/theming.md +212 -0
- package/skills/eluan/foundations/typography.md +169 -0
- package/skills/eluan/patterns/app-shell.md +222 -0
- package/skills/eluan/patterns/dashboard.md +249 -0
- package/skills/eluan/patterns/empty-states.md +78 -0
- package/skills/eluan/patterns/feedback.md +95 -0
- package/skills/eluan/patterns/forms.md +138 -0
- package/skills/eluan/patterns/navigation.md +96 -0
- package/skills/eluan/patterns/page-layout.md +185 -0
- package/dist/badge-DXKWztL-.cjs +0 -1
- package/dist/banner-COlEFRuK.cjs +0 -1
- package/dist/button-Ny6OF8Un.cjs +0 -1
- package/dist/calendar-7LX5YGGT.cjs +0 -76
- package/dist/card-BC_4C3ns.js +0 -70
- package/dist/card-C88--zB4.cjs +0 -1
- package/dist/command-BCl0seLL.cjs +0 -9
- package/dist/command-Chs5VlBL.js +0 -132
- package/dist/context-menu-1WehRCpR.cjs +0 -1
- package/dist/decimal-input-BLmifKF2.cjs +0 -1
- package/dist/decimal-input-yTk35W_5.js +0 -177
- package/dist/dialog-B8eWKqzS.js +0 -64
- package/dist/dialog-DWYtFhZl.cjs +0 -1
- package/dist/dropdown-menu-_h_fqgvS.cjs +0 -1
- package/dist/dropdown-menu-p0NkOoTP.js +0 -115
- package/dist/fieldset-C3aAINhi.cjs +0 -1
- package/dist/file-input-D62FEnKg.cjs +0 -1
- package/dist/header-CiZQY_7S.cjs +0 -1
- package/dist/hover-card-C_FCzE41.js +0 -21
- package/dist/input-BrGJn-D9.cjs +0 -1
- package/dist/input-Cccufiqn.js +0 -128
- package/dist/input-otp-DcZ7wyjs.cjs +0 -1
- package/dist/menubar-CKWQEl7c.cjs +0 -1
- package/dist/multi-select-B6NBbDCW.js +0 -85
- package/dist/multi-select-kcoUbSwE.cjs +0 -1
- package/dist/navigation-drawer-BbeDYPhu.js +0 -171
- package/dist/navigation-drawer-DOOHfbY3.cjs +0 -1
- package/dist/number-input-Bc7jUsu-.cjs +0 -1
- package/dist/number-input-vICbRc2y.js +0 -66
- package/dist/popover-DPc4rRsR.js +0 -70
- package/dist/popover-Db6VOysz.cjs +0 -1
- package/dist/progress-DpQjGEyn.cjs +0 -1
- package/dist/select-1Eb3NSrR.cjs +0 -1
- package/dist/select-DDSYjKtj.js +0 -119
- package/dist/sheet-7NP1LuHy.cjs +0 -1
- package/dist/slider-CZQBAXup.js +0 -16
- package/dist/slider-DdEOapYP.cjs +0 -1
- package/dist/switch-C7EBLT5H.js +0 -9
- package/dist/switch-KzBijHMJ.cjs +0 -1
- package/dist/table-DopzfXYj.js +0 -101
- package/dist/table-xNu_KUaU.cjs +0 -1
- package/dist/tabs-C9NKBmH0.js +0 -22
- package/dist/tabs-DztJ2iVc.cjs +0 -1
- package/dist/textarea-DXUk1b_-.js +0 -8
- package/dist/textarea-Dl-daLHR.cjs +0 -1
- package/dist/time-input-DR2snTgB.cjs +0 -1
- package/dist/toggle-Bvh1v32T.cjs +0 -1
- package/dist/toggle-group-SyHMwO90.cjs +0 -1
- package/dist/tree-view-CNvEc1TT.cjs +0 -1
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: colour
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Colour
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Every colour in Eluan is a semantic token set by the theme and resolved against the active mode (light, dim, dark). Token names say what a colour is for, not what it looks like: `--container-bg` is a surface, `--action-primary-bg` is the main call to action. A custom theme or the theme generator changes the values; the names stay the same. See [theming.md](./theming.md).
|
|
10
|
+
|
|
11
|
+
Tokens come in families, and each family has matching background, foreground and border tokens per state:
|
|
12
|
+
|
|
13
|
+
| Family | For |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `--container-*` | surfaces: cards, panels, popovers, table rows |
|
|
16
|
+
| `--interactive-*` | inputs, selectable rows, hoverable items |
|
|
17
|
+
| `--focus-ring` | the keyboard focus outline; components draw it, so you rarely need it |
|
|
18
|
+
| `--action-primary-*` | the main action (Button `default`) |
|
|
19
|
+
| `--action-secondary-*` | outline actions (Button `outline`) |
|
|
20
|
+
| `--action-tertiary-*` | ghost actions (Button `ghost`) |
|
|
21
|
+
| `--action-neutral-*` | the grey filled action (Button `secondary`) |
|
|
22
|
+
| `--destructive-*` | errors and destructive actions |
|
|
23
|
+
| `--cautionary-*` | warnings; the `caution` tone in component props |
|
|
24
|
+
| `--positive-*` | success |
|
|
25
|
+
| `--informative-*` | neutral information |
|
|
26
|
+
| `--important-*` | emphasis that isn't a warning |
|
|
27
|
+
| `--dataviz-*` | chart series only |
|
|
28
|
+
|
|
29
|
+
## Rules
|
|
30
|
+
|
|
31
|
+
1. Use semantic tokens for every colour. Never write hex, rgb, hsl or oklch values.
|
|
32
|
+
2. Pair a background with the foreground from the same family and state: `--container-bg` with `--container-fg`, `--action-primary-bg-active` with `--action-primary-fg-active`.
|
|
33
|
+
3. Use a tone component prop (`variant="destructive"`, `variant="caution"`) before reaching for tone tokens yourself.
|
|
34
|
+
4. The `caution` tone reads the `--cautionary-*` tokens. There is no separate caution token family.
|
|
35
|
+
5. Use `--dataviz-*` only for chart series, never for status or decoration.
|
|
36
|
+
6. Never use primitives (`--color-*`, `--blazeorange-*`) or the mode layer (`--backgrounds-*`, `--foregrounds-*`) in app code.
|
|
37
|
+
7. Never override one side of a pair. Contrast is checked at theme generation; change the theme instead.
|
|
38
|
+
8. Never mix states: don't put a `-hover` background behind a resting foreground.
|
|
39
|
+
9. The accent (`--action-primary-bg`) is for the primary action. Don't use it as a text colour on a surface, a border or a decoration; white on it is held to 3:1, not the 4.5:1 of body text.
|
|
40
|
+
10. For the page ground, a surface, a divider or a selected row, read the look's tokens (`--shell-ground`, `--surface-bg`, `--surface-border`, `--item-selected-bg`; see [look.md](./look.md)) rather than picking a container step yourself.
|
|
41
|
+
|
|
42
|
+
## Tokens
|
|
43
|
+
|
|
44
|
+
Values show the mode alias each token points to, then the resolved value in light mode (and dark mode where it differs).
|
|
45
|
+
|
|
46
|
+
<!-- tokens:start -->
|
|
47
|
+
| Token | Value (default theme) | Use for |
|
|
48
|
+
| --- | --- | --- |
|
|
49
|
+
| `--container-bg` | `--backgrounds-primary` → oklch(1.0000 0.0000 0.00) / dark oklch(0.2982 0.0213 119.11) | Surfaces (cards, panels, popovers): background |
|
|
50
|
+
| `--container-bg-alt` | `--borders-primary` → oklch(0.9522 0.0070 124.45) / dark color-mix(in oklch, oklch(0.2982 0.0213 119.11), oklch(0.3738 0.0284 118.54)) | A quiet fill inside a surface: table foot, skeleton, avatar, neutral chip, menu separator |
|
|
51
|
+
| `--container-bg-inverse` | `--foregrounds-secondary` → oklch(0.4767 0.0377 119.25) / dark oklch(0.8111 0.0267 118.99) | Surfaces (cards, panels, popovers): background on an inverse surface |
|
|
52
|
+
| `--container-border` | `--borders-primary` → oklch(0.9522 0.0070 124.45) / dark color-mix(in oklch, oklch(0.2982 0.0213 119.11), oklch(0.3738 0.0284 118.54)) | Surfaces (cards, panels, popovers): border |
|
|
53
|
+
| `--container-border-alt` | `--borders-secondary` → oklch(0.8827 0.0165 118.16) / dark color-mix(in oklch, oklch(0.3738 0.0284 118.54), oklch(0.4767 0.0377 119.25)) | Surfaces (cards, panels, popovers): subtle border |
|
|
54
|
+
| `--container-border-inverse` | `--foregrounds-tertiary` → color-mix(in oklch, oklch(0.5744 0.0466 119.64) 65%, oklch(0.4767 0.0377 119.25)) / dark oklch(0.7378 0.0385 119.16) | Surfaces (cards, panels, popovers): border on an inverse surface |
|
|
55
|
+
| `--container-fg` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Surfaces (cards, panels, popovers): text and icons |
|
|
56
|
+
| `--container-fg-alt` | `--foregrounds-secondary` → oklch(0.4767 0.0377 119.25) / dark oklch(0.8111 0.0267 118.99) | Surfaces (cards, panels, popovers): muted text and icons |
|
|
57
|
+
| `--container-fg-inverse` | `--backgrounds-primary` → oklch(1.0000 0.0000 0.00) / dark oklch(0.2982 0.0213 119.11) | Surfaces (cards, panels, popovers): text on an inverse surface |
|
|
58
|
+
| `--interactive-bg` | `--backgrounds-primary` → oklch(1.0000 0.0000 0.00) / dark oklch(0.2982 0.0213 119.11) | Inputs and selectable items: background |
|
|
59
|
+
| `--interactive-bg-alt` | `--backgrounds-secondary` → oklch(0.9868 0.0028 128.49) / dark oklch(0.2257 0.0152 119.03) | Inputs and selectable items: subtle alternate background |
|
|
60
|
+
| `--interactive-bg-alt2` | `--borders-primary` → oklch(0.9522 0.0070 124.45) / dark color-mix(in oklch, oklch(0.2982 0.0213 119.11), oklch(0.3738 0.0284 118.54)) | Inputs and selectable items: second alternate background |
|
|
61
|
+
| `--interactive-bg-disabled` | `--backgrounds-tertiary` → oklch(0.9522 0.0070 124.45) / dark oklch(0.3738 0.0284 118.54) | Inputs and selectable items: background when disabled |
|
|
62
|
+
| `--interactive-bg-hover` | `--backgrounds-tertiary` → oklch(0.9522 0.0070 124.45) / dark oklch(0.3738 0.0284 118.54) | Inputs and selectable items: background on hover |
|
|
63
|
+
| `--interactive-bg-active` | `--action-primary-bg` → oklch(0.6717 0.2205 37.86) | The accent, for a switch, check, radio, slider or progress that is on |
|
|
64
|
+
| `--interactive-bg-selected` | `--action-primary-bg` → oklch(0.6717 0.2205 37.86) | The accent, for a checked control or the chosen day. Rows use `--item-selected-bg` |
|
|
65
|
+
| `--interactive-bg-inverse` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Inputs and selectable items: background on an inverse surface |
|
|
66
|
+
| `--interactive-border` | `--borders-primary` → oklch(0.9522 0.0070 124.45) / dark color-mix(in oklch, oklch(0.2982 0.0213 119.11), oklch(0.3738 0.0284 118.54)) | Inputs and selectable items: border |
|
|
67
|
+
| `--interactive-border-alt` | `--borders-secondary` → oklch(0.8827 0.0165 118.16) / dark color-mix(in oklch, oklch(0.3738 0.0284 118.54), oklch(0.4767 0.0377 119.25)) | Inputs and selectable items: subtle border |
|
|
68
|
+
| `--interactive-border-disabled` | `--borders-primary` → oklch(0.9522 0.0070 124.45) / dark color-mix(in oklch, oklch(0.2982 0.0213 119.11), oklch(0.3738 0.0284 118.54)) | Inputs and selectable items: border when disabled |
|
|
69
|
+
| `--interactive-fg` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Inputs and selectable items: text and icons |
|
|
70
|
+
| `--interactive-fg-alt` | `--foregrounds-tertiary` → color-mix(in oklch, oklch(0.5744 0.0466 119.64) 65%, oklch(0.4767 0.0377 119.25)) / dark oklch(0.7378 0.0385 119.16) | Inputs and selectable items: muted text and icons |
|
|
71
|
+
| `--interactive-fg-readonly` | `--foregrounds-secondary` → oklch(0.4767 0.0377 119.25) / dark oklch(0.8111 0.0267 118.99) | Inputs and selectable items: text when read-only |
|
|
72
|
+
| `--interactive-fg-disabled` | `--foregrounds-quinary` → oklch(0.7378 0.0385 119.16) / dark oklch(0.5744 0.0466 119.64) | Inputs and selectable items: text when disabled |
|
|
73
|
+
| `--interactive-fg-active` | `--action-primary-fg` → oklch(1.0000 0.0000 0.00) | Text and icons on the accent |
|
|
74
|
+
| `--interactive-fg-selected` | `--action-primary-fg` → oklch(1.0000 0.0000 0.00) | Text and icons on the accent |
|
|
75
|
+
| `--interactive-fg-inverse` | `--backgrounds-primary` → oklch(1.0000 0.0000 0.00) / dark oklch(0.2982 0.0213 119.11) | Inputs and selectable items: text on an inverse surface |
|
|
76
|
+
| `--action-primary-bg` | `--color-blazeorange-500` → oklch(0.6717 0.2205 37.86) | Primary actions: the accent as picked, the same in every mode |
|
|
77
|
+
| `--action-primary-bg-hover` | `--color-blazeorange-600` → oklch(0.6368 0.2445 31.53) | Primary actions: background on hover |
|
|
78
|
+
| `--action-primary-bg-active` | `--color-blazeorange-600` → oklch(0.6368 0.2445 31.53) | Primary actions: background while pressed |
|
|
79
|
+
| `--action-primary-bg-selected` | `--color-blazeorange-600` → oklch(0.6368 0.2445 31.53) | Primary actions: background when selected |
|
|
80
|
+
| `--action-primary-bg-disabled` | `--blazeorange-tint` → oklch(0.9479 0.0381 69.88) / dark oklch(0.4063 0.1389 34.11) | Primary actions: background when disabled |
|
|
81
|
+
| `--action-primary-bg-inverse` | `--backgrounds-primary` → oklch(1.0000 0.0000 0.00) / dark oklch(0.2982 0.0213 119.11) | Primary actions: background on an inverse surface |
|
|
82
|
+
| `--action-primary-fg` | `--color-neutral-0` → oklch(1.0000 0.0000 0.00) | Primary actions: text on the accent, white (held to 3:1) |
|
|
83
|
+
| `--action-primary-fg-disabled` | `--foregrounds-quinary` → oklch(0.7378 0.0385 119.16) / dark oklch(0.5744 0.0466 119.64) | Primary actions: text when disabled |
|
|
84
|
+
| `--action-primary-fg-active` | `--color-neutral-0` → oklch(1.0000 0.0000 0.00) | Primary actions: text while pressed |
|
|
85
|
+
| `--action-primary-fg-selected` | `--color-neutral-0` → oklch(1.0000 0.0000 0.00) | Primary actions: text when selected |
|
|
86
|
+
| `--action-primary-fg-inverse` | `--blazeorange-foreground` → oklch(0.6368 0.2445 31.53) / dark oklch(0.8904 0.0756 64.01) | Primary actions: text on an inverse surface |
|
|
87
|
+
| `--action-secondary-bg-hover` | `--backgrounds-tertiary` → oklch(0.9522 0.0070 124.45) / dark oklch(0.3738 0.0284 118.54) | Secondary (outline) actions: background on hover |
|
|
88
|
+
| `--action-secondary-bg-active` | `--backgrounds-quaternary` → oklch(0.8827 0.0165 118.16) / dark oklch(0.4767 0.0377 119.25) | Secondary (outline) actions: background while pressed |
|
|
89
|
+
| `--action-secondary-bg-selected` | `--backgrounds-quaternary` → oklch(0.8827 0.0165 118.16) / dark oklch(0.4767 0.0377 119.25) | Secondary (outline) actions: background when selected |
|
|
90
|
+
| `--action-secondary-bg-disabled` | `--backgrounds-tertiary` → oklch(0.9522 0.0070 124.45) / dark oklch(0.3738 0.0284 118.54) | Secondary (outline) actions: background when disabled |
|
|
91
|
+
| `--action-secondary-border` | `--borders-secondary` → oklch(0.8827 0.0165 118.16) / dark color-mix(in oklch, oklch(0.3738 0.0284 118.54), oklch(0.4767 0.0377 119.25)) | Secondary (outline) actions: border |
|
|
92
|
+
| `--action-secondary-border-alt` | `--foregrounds-quaternary` → color-mix(in oklch, oklch(0.6639 0.0492 118.51) 65%, oklch(0.5744 0.0466 119.64)) / dark oklch(0.6639 0.0492 118.51) | Secondary (outline) actions: subtle border |
|
|
93
|
+
| `--action-secondary-border-disabled` | `--borders-primary` → oklch(0.9522 0.0070 124.45) / dark color-mix(in oklch, oklch(0.2982 0.0213 119.11), oklch(0.3738 0.0284 118.54)) | Secondary (outline) actions: border when disabled |
|
|
94
|
+
| `--action-secondary-border-inverse` | `--backgrounds-secondary` → oklch(0.9868 0.0028 128.49) / dark oklch(0.2257 0.0152 119.03) | Secondary (outline) actions: border on an inverse surface |
|
|
95
|
+
| `--action-secondary-fg-alt` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Secondary (outline) actions: muted text and icons |
|
|
96
|
+
| `--action-secondary-fg-disabled` | `--foregrounds-quinary` → oklch(0.7378 0.0385 119.16) / dark oklch(0.5744 0.0466 119.64) | Secondary (outline) actions: text when disabled |
|
|
97
|
+
| `--action-secondary-fg-active` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Secondary (outline) actions: text while pressed |
|
|
98
|
+
| `--action-secondary-fg-selected` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Secondary (outline) actions: text when selected |
|
|
99
|
+
| `--action-secondary-fg-inverse` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Secondary (outline) actions: text on an inverse surface |
|
|
100
|
+
| `--action-secondary-fg` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Secondary (outline) actions: text and icons |
|
|
101
|
+
| `--action-tertiary-bg` | `--backgrounds-primary` → oklch(1.0000 0.0000 0.00) / dark oklch(0.2982 0.0213 119.11) | Tertiary (ghost) actions: background |
|
|
102
|
+
| `--action-tertiary-bg-alt` | `--backgrounds-secondary` → oklch(0.9868 0.0028 128.49) / dark oklch(0.2257 0.0152 119.03) | Tertiary (ghost) actions: subtle alternate background |
|
|
103
|
+
| `--action-tertiary-bg-hover` | `--backgrounds-secondary` → oklch(0.9868 0.0028 128.49) / dark oklch(0.2257 0.0152 119.03) | Tertiary (ghost) actions: background on hover |
|
|
104
|
+
| `--action-tertiary-bg-active` | `--backgrounds-tertiary` → oklch(0.9522 0.0070 124.45) / dark oklch(0.3738 0.0284 118.54) | Tertiary (ghost) actions: background while pressed |
|
|
105
|
+
| `--action-tertiary-bg-selected` | `--backgrounds-tertiary` → oklch(0.9522 0.0070 124.45) / dark oklch(0.3738 0.0284 118.54) | Tertiary (ghost) actions: background when selected |
|
|
106
|
+
| `--action-tertiary-bg-disabled` | `--backgrounds-primary` → oklch(1.0000 0.0000 0.00) / dark oklch(0.2982 0.0213 119.11) | Tertiary (ghost) actions: background when disabled |
|
|
107
|
+
| `--action-tertiary-bg-inverse` | `--backgrounds-primary` → oklch(1.0000 0.0000 0.00) / dark oklch(0.2982 0.0213 119.11) | Tertiary (ghost) actions: background on an inverse surface |
|
|
108
|
+
| `--action-tertiary-border` | `--borders-secondary` → oklch(0.8827 0.0165 118.16) / dark color-mix(in oklch, oklch(0.3738 0.0284 118.54), oklch(0.4767 0.0377 119.25)) | Tertiary (ghost) actions: border |
|
|
109
|
+
| `--action-tertiary-border-alt` | `--borders-primary` → oklch(0.9522 0.0070 124.45) / dark color-mix(in oklch, oklch(0.2982 0.0213 119.11), oklch(0.3738 0.0284 118.54)) | Tertiary (ghost) actions: subtle border |
|
|
110
|
+
| `--action-tertiary-border-disabled` | `--borders-primary` → oklch(0.9522 0.0070 124.45) / dark color-mix(in oklch, oklch(0.2982 0.0213 119.11), oklch(0.3738 0.0284 118.54)) | Tertiary (ghost) actions: border when disabled |
|
|
111
|
+
| `--action-tertiary-border-inverse` | `--backgrounds-secondary` → oklch(0.9868 0.0028 128.49) / dark oklch(0.2257 0.0152 119.03) | Tertiary (ghost) actions: border on an inverse surface |
|
|
112
|
+
| `--action-tertiary-fg-alt` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Tertiary (ghost) actions: muted text and icons |
|
|
113
|
+
| `--action-tertiary-fg-disabled` | `--foregrounds-quinary` → oklch(0.7378 0.0385 119.16) / dark oklch(0.5744 0.0466 119.64) | Tertiary (ghost) actions: text when disabled |
|
|
114
|
+
| `--action-tertiary-fg-active` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Tertiary (ghost) actions: text while pressed |
|
|
115
|
+
| `--action-tertiary-fg-selected` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Tertiary (ghost) actions: text when selected |
|
|
116
|
+
| `--action-tertiary-fg-inverse` | `--backgrounds-primary` → oklch(1.0000 0.0000 0.00) / dark oklch(0.2982 0.0213 119.11) | Tertiary (ghost) actions: text on an inverse surface |
|
|
117
|
+
| `--action-tertiary-fg` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Tertiary (ghost) actions: text and icons |
|
|
118
|
+
| `--action-neutral-bg` | `--backgrounds-tertiary` → oklch(0.9522 0.0070 124.45) / dark oklch(0.3738 0.0284 118.54) | Neutral actions (the `secondary` button): background |
|
|
119
|
+
| `--action-neutral-bg-hover` | `--backgrounds-quaternary` → oklch(0.8827 0.0165 118.16) / dark oklch(0.4767 0.0377 119.25) | Neutral actions (the `secondary` button): background on hover |
|
|
120
|
+
| `--action-neutral-fg` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Neutral actions (the `secondary` button): text and icons |
|
|
121
|
+
| `--destructive-bg` | `--torchred-background` → oklch(0.9691 0.0151 17.42) / dark oklch(0.2639 0.1083 29.23) | Destructive status and actions: background |
|
|
122
|
+
| `--destructive-bg-alt` | `--torchred-tint` → oklch(0.9322 0.0343 17.78) / dark oklch(0.4062 0.1665 28.83) | Destructive status and actions: subtle alternate background |
|
|
123
|
+
| `--destructive-bg-hover` | `--torchred-tint` → oklch(0.9322 0.0343 17.78) / dark oklch(0.4062 0.1665 28.83) | Destructive status and actions: background on hover |
|
|
124
|
+
| `--destructive-bg-active` | `--torchred-shade` → oklch(0.4695 0.1927 29.23) / dark oklch(0.8751 0.0665 18.51) | Destructive status and actions: background while pressed |
|
|
125
|
+
| `--destructive-bg-selected` | `--torchred-shade` → oklch(0.4695 0.1927 29.23) / dark oklch(0.8751 0.0665 18.51) | Destructive status and actions: background when selected |
|
|
126
|
+
| `--destructive-bg-disabled` | `--backgrounds-tertiary` → oklch(0.9522 0.0070 124.45) / dark oklch(0.3738 0.0284 118.54) | Destructive status and actions: background when disabled |
|
|
127
|
+
| `--destructive-bg-inverse` | `--torchred-shade` → oklch(0.4695 0.1927 29.23) / dark oklch(0.8751 0.0665 18.51) | Destructive status and actions: background on an inverse surface |
|
|
128
|
+
| `--destructive-border` | `--torchred-main` → oklch(0.6280 0.2577 29.23) / dark oklch(0.6695 0.2182 21.71) | Destructive status and actions: border |
|
|
129
|
+
| `--destructive-border-alt` | `--torchred-shade` → oklch(0.4695 0.1927 29.23) / dark oklch(0.8751 0.0665 18.51) | Destructive status and actions: subtle border |
|
|
130
|
+
| `--destructive-border-disabled` | `--torchred-tint` → oklch(0.9322 0.0343 17.78) / dark oklch(0.4062 0.1665 28.83) | Destructive status and actions: border when disabled |
|
|
131
|
+
| `--destructive-border-inverse` | `--torchred-background` → oklch(0.9691 0.0151 17.42) / dark oklch(0.2639 0.1083 29.23) | Destructive status and actions: border on an inverse surface |
|
|
132
|
+
| `--destructive-fg` | `--torchred-foreground` → oklch(0.5444 0.2234 29.23) / dark oklch(0.8751 0.0665 18.51) | Destructive status and actions: text and icons |
|
|
133
|
+
| `--destructive-fg-alt` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Destructive status and actions: muted text and icons |
|
|
134
|
+
| `--destructive-fg-disabled` | `--foregrounds-quinary` → oklch(0.7378 0.0385 119.16) / dark oklch(0.5744 0.0466 119.64) | Destructive status and actions: text when disabled |
|
|
135
|
+
| `--destructive-fg-active` | `--backgrounds-primary` → oklch(1.0000 0.0000 0.00) / dark oklch(0.2982 0.0213 119.11) | Destructive status and actions: text while pressed |
|
|
136
|
+
| `--destructive-fg-selected` | `--backgrounds-primary` → oklch(1.0000 0.0000 0.00) / dark oklch(0.2982 0.0213 119.11) | Destructive status and actions: text when selected |
|
|
137
|
+
| `--destructive-fg-inverse` | `--torchred-background` → oklch(0.9691 0.0151 17.42) / dark oklch(0.2639 0.1083 29.23) | Destructive status and actions: text on an inverse surface |
|
|
138
|
+
| `--cautionary-bg` | `--maitai-background` → oklch(0.9852 0.0151 90.23) / dark oklch(0.2758 0.0580 42.34) | Caution status (the `caution` tone): background |
|
|
139
|
+
| `--cautionary-bg-alt` | `--maitai-tint` → oklch(0.9601 0.0401 88.20) / dark oklch(0.4118 0.0860 41.58) | Caution status (the `caution` tone): subtle alternate background |
|
|
140
|
+
| `--cautionary-bg-inverse` | `--maitai-shade` → oklch(0.4724 0.1071 42.23) / dark oklch(0.8686 0.1177 83.38) | Caution status (the `caution` tone): background on an inverse surface |
|
|
141
|
+
| `--cautionary-border` | `--maitai-main` → oklch(0.7516 0.1455 61.95) | Caution status (the `caution` tone): border |
|
|
142
|
+
| `--cautionary-border-alt` | `--maitai-shade` → oklch(0.4724 0.1071 42.23) / dark oklch(0.8686 0.1177 83.38) | Caution status (the `caution` tone): subtle border |
|
|
143
|
+
| `--cautionary-border-inverse` | `--maitai-background` → oklch(0.9852 0.0151 90.23) / dark oklch(0.2758 0.0580 42.34) | Caution status (the `caution` tone): border on an inverse surface |
|
|
144
|
+
| `--cautionary-fg` | `--maitai-foreground` → oklch(0.5534 0.1277 44.34) / dark oklch(0.9173 0.0805 86.91) | Caution status (the `caution` tone): text and icons |
|
|
145
|
+
| `--cautionary-fg-alt` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Caution status (the `caution` tone): muted text and icons |
|
|
146
|
+
| `--cautionary-fg-inverse` | `--maitai-background` → oklch(0.9852 0.0151 90.23) / dark oklch(0.2758 0.0580 42.34) | Caution status (the `caution` tone): text on an inverse surface |
|
|
147
|
+
| `--positive-bg` | `--seagreen-background` → oklch(0.9796 0.0247 164.47) / dark oklch(0.2646 0.0515 171.60) | Positive status: background |
|
|
148
|
+
| `--positive-bg-alt` | `--seagreen-tint` → oklch(0.9488 0.0579 162.90) / dark oklch(0.3827 0.0785 166.91) | Positive status: subtle alternate background |
|
|
149
|
+
| `--positive-bg-inverse` | `--seagreen-shade` → oklch(0.4389 0.0946 163.18) / dark oklch(0.9488 0.0579 162.90) | Positive status: background on an inverse surface |
|
|
150
|
+
| `--positive-border` | `--seagreen-main` → oklch(0.7780 0.1777 159.41) | Positive status: border |
|
|
151
|
+
| `--positive-border-alt` | `--seagreen-shade` → oklch(0.4389 0.0946 163.18) / dark oklch(0.9488 0.0579 162.90) | Positive status: subtle border |
|
|
152
|
+
| `--positive-border-inverse` | `--seagreen-background` → oklch(0.9796 0.0247 164.47) / dark oklch(0.2646 0.0515 171.60) | Positive status: border on an inverse surface |
|
|
153
|
+
| `--positive-fg` | `--seagreen-foreground` → oklch(0.5180 0.1144 161.56) / dark oklch(0.9052 0.1042 163.78) | Positive status: text and icons |
|
|
154
|
+
| `--positive-fg-alt` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Positive status: muted text and icons |
|
|
155
|
+
| `--positive-fg-inverse` | `--seagreen-background` → oklch(0.9796 0.0247 164.47) / dark oklch(0.2646 0.0515 171.60) | Positive status: text on an inverse surface |
|
|
156
|
+
| `--informative-bg` | `--blueribbon-background` → oklch(0.9705 0.0142 254.60) / dark oklch(0.2795 0.0978 270.78) | Informative status: background |
|
|
157
|
+
| `--informative-bg-alt` | `--blueribbon-tint` → oklch(0.9322 0.0328 256.76) / dark oklch(0.3775 0.1564 267.71) | Informative status: subtle alternate background |
|
|
158
|
+
| `--informative-bg-inverse` | `--blueribbon-shade` → oklch(0.4225 0.2126 267.93) / dark oklch(0.9322 0.0328 256.76) | Informative status: background on an inverse surface |
|
|
159
|
+
| `--informative-border` | `--blueribbon-main` → oklch(0.6102 0.2112 261.20) | Informative status: border |
|
|
160
|
+
| `--informative-border-alt` | `--blueribbon-shade` → oklch(0.4225 0.2126 267.93) / dark oklch(0.9322 0.0328 256.76) | Informative status: subtle border |
|
|
161
|
+
| `--informative-border-inverse` | `--blueribbon-background` → oklch(0.9705 0.0142 254.60) / dark oklch(0.2795 0.0978 270.78) | Informative status: border on an inverse surface |
|
|
162
|
+
| `--informative-fg` | `--blueribbon-foreground` → oklch(0.4867 0.2603 266.61) / dark oklch(0.8800 0.0595 255.47) | Informative status: text and icons |
|
|
163
|
+
| `--informative-fg-alt` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Informative status: muted text and icons |
|
|
164
|
+
| `--informative-fg-inverse` | `--blueribbon-background` → oklch(0.9705 0.0142 254.60) / dark oklch(0.2795 0.0978 270.78) | Informative status: text on an inverse surface |
|
|
165
|
+
| `--important-bg` | `--electricviolet-background` → oklch(0.9761 0.0139 304.14) / dark oklch(0.2898 0.1386 301.20) | Important status: background |
|
|
166
|
+
| `--important-bg-alt` | `--electricviolet-tint` → oklch(0.9453 0.0311 306.20) / dark oklch(0.3800 0.1656 303.37) | Important status: subtle alternate background |
|
|
167
|
+
| `--important-bg-inverse` | `--electricviolet-shade` → oklch(0.4379 0.2047 302.40) / dark oklch(0.9453 0.0311 306.20) | Important status: background on an inverse surface |
|
|
168
|
+
| `--important-border` | `--electricviolet-main` → oklch(0.6255 0.2466 302.49) / dark oklch(0.7125 0.1872 304.45) | Important status: border |
|
|
169
|
+
| `--important-border-alt` | `--electricviolet-shade` → oklch(0.4379 0.2047 302.40) / dark oklch(0.9453 0.0311 306.20) | Important status: subtle border |
|
|
170
|
+
| `--important-border-inverse` | `--electricviolet-background` → oklch(0.9761 0.0139 304.14) / dark oklch(0.2898 0.1386 301.20) | Important status: border on an inverse surface |
|
|
171
|
+
| `--important-fg` | `--electricviolet-foreground` → oklch(0.4955 0.2482 300.40) / dark oklch(0.9007 0.0598 304.65) | Important status: text and icons |
|
|
172
|
+
| `--important-fg-alt` | `--foregrounds-primary` → oklch(0.3738 0.0284 118.54) / dark oklch(0.9522 0.0070 124.45) | Important status: muted text and icons |
|
|
173
|
+
| `--important-fg-inverse` | `--electricviolet-background` → oklch(0.9761 0.0139 304.14) / dark oklch(0.2898 0.1386 301.20) | Important status: text on an inverse surface |
|
|
174
|
+
| `--tooltip-bg` | `--backgrounds-primary` → oklch(1.0000 0.0000 0.00) / dark oklch(0.3738 0.0284 118.54) | Tooltip background |
|
|
175
|
+
| `--overlay-bg` | `--color-neutral-950` → oklch(0.2257 0.0152 119.03) / dark color-mix(in oklch, oklch(0.2257 0.0152 119.03) 40%, black) | Scrim behind modal overlays |
|
|
176
|
+
| `--focus-ring` | `--action-primary-bg` → oklch(0.6717 0.2205 37.86) | Keyboard focus outline; components draw it, don't restyle it |
|
|
177
|
+
| `--dataviz-1-main` | `--blazeorange-main` → oklch(0.6717 0.2205 37.86) | Charts only: series colour |
|
|
178
|
+
| `--dataviz-1-tint` | `--blazeorange-tint` → oklch(0.9479 0.0381 69.88) / dark oklch(0.4063 0.1389 34.11) | Charts only: series colour |
|
|
179
|
+
| `--dataviz-1-shade` | `--blazeorange-shade` → oklch(0.4663 0.1768 31.99) / dark oklch(0.9479 0.0381 69.88) | Charts only: series colour |
|
|
180
|
+
| `--dataviz-2-main` | `--blueribbon-main` → oklch(0.6102 0.2112 261.20) | Charts only: series colour |
|
|
181
|
+
| `--dataviz-2-tint` | `--blueribbon-tint` → oklch(0.9322 0.0328 256.76) / dark oklch(0.3775 0.1564 267.71) | Charts only: series colour |
|
|
182
|
+
| `--dataviz-2-shade` | `--blueribbon-shade` → oklch(0.4225 0.2126 267.93) / dark oklch(0.9322 0.0328 256.76) | Charts only: series colour |
|
|
183
|
+
| `--dataviz-3-main` | `--seagreen-main` → oklch(0.7780 0.1777 159.41) | Charts only: series colour |
|
|
184
|
+
| `--dataviz-3-tint` | `--seagreen-tint` → oklch(0.9488 0.0579 162.90) / dark oklch(0.3827 0.0785 166.91) | Charts only: series colour |
|
|
185
|
+
| `--dataviz-3-shade` | `--seagreen-shade` → oklch(0.4389 0.0946 163.18) / dark oklch(0.9488 0.0579 162.90) | Charts only: series colour |
|
|
186
|
+
| `--dataviz-4-main` | `--electricviolet-main` → oklch(0.6255 0.2466 302.49) / dark oklch(0.7125 0.1872 304.45) | Charts only: series colour |
|
|
187
|
+
| `--dataviz-4-tint` | `--electricviolet-tint` → oklch(0.9453 0.0311 306.20) / dark oklch(0.3800 0.1656 303.37) | Charts only: series colour |
|
|
188
|
+
| `--dataviz-4-shade` | `--electricviolet-shade` → oklch(0.4379 0.2047 302.40) / dark oklch(0.9453 0.0311 306.20) | Charts only: series colour |
|
|
189
|
+
| `--dataviz-5-main` | `--maitai-main` → oklch(0.7516 0.1455 61.95) | Charts only: series colour |
|
|
190
|
+
| `--dataviz-5-tint` | `--maitai-tint` → oklch(0.9601 0.0401 88.20) / dark oklch(0.4118 0.0860 41.58) | Charts only: series colour |
|
|
191
|
+
| `--dataviz-5-shade` | `--maitai-shade` → oklch(0.4724 0.1071 42.23) / dark oklch(0.8686 0.1177 83.38) | Charts only: series colour |
|
|
192
|
+
| `--dataviz-6-main` | `--cerise-main` → oklch(0.6521 0.2154 2.21) | Charts only: series colour |
|
|
193
|
+
| `--dataviz-6-tint` | `--cerise-tint` → oklch(0.9470 0.0251 352.47) / dark oklch(0.4086 0.1369 6.37) | Charts only: series colour |
|
|
194
|
+
| `--dataviz-6-shade` | `--cerise-shade` → oklch(0.4577 0.1664 8.23) / dark oklch(0.9470 0.0251 352.47) | Charts only: series colour |
|
|
195
|
+
| `--dataviz-7-main` | `--electriclime-main` → oklch(0.8485 0.2093 123.47) | Charts only: series colour |
|
|
196
|
+
| `--dataviz-7-tint` | `--electriclime-tint` → oklch(0.9681 0.0792 116.21) / dark oklch(0.4073 0.0978 121.11) | Charts only: series colour |
|
|
197
|
+
| `--dataviz-7-shade` | `--electriclime-shade` → oklch(0.4593 0.1121 122.51) / dark oklch(0.9681 0.0792 116.21) | Charts only: series colour |
|
|
198
|
+
| `--dataviz-8-main` | `--lochmara-main` → oklch(0.6823 0.1723 245.16) | Charts only: series colour |
|
|
199
|
+
| `--dataviz-8-tint` | `--lochmara-tint` → oklch(0.9483 0.0276 239.65) / dark oklch(0.3898 0.1005 246.39) | Charts only: series colour |
|
|
200
|
+
| `--dataviz-8-shade` | `--lochmara-shade` → oklch(0.4439 0.1218 248.78) / dark oklch(0.9483 0.0276 239.65) | Charts only: series colour |
|
|
201
|
+
<!-- tokens:end -->
|
|
202
|
+
|
|
203
|
+
## Choosing a value
|
|
204
|
+
|
|
205
|
+
| If you need… | Use |
|
|
206
|
+
| --- | --- |
|
|
207
|
+
| the page behind everything | `--shell-ground`; NavigationDrawerLayout sets it |
|
|
208
|
+
| a card or panel background | `--surface-bg` (it is `--container-bg`) with `--container-fg` |
|
|
209
|
+
| a quiet fill inside a surface: a table foot, a skeleton, a neutral chip | `--container-bg-alt` |
|
|
210
|
+
| a selected row or item | `--item-selected-bg` with `--item-selected-fg` |
|
|
211
|
+
| secondary or helper text | `--container-fg-alt` |
|
|
212
|
+
| a divider or panel border | `--container-border`; or the Separator component |
|
|
213
|
+
| an input-like or hoverable surface you compose | `--interactive-bg`, `--interactive-bg-hover`, `--interactive-fg` |
|
|
214
|
+
| an error message colour | `--destructive-fg`; or FormMessage / Banner `destructive` |
|
|
215
|
+
| a success, warning or info surface | Banner or Badge with the matching `variant` |
|
|
216
|
+
| a scrim behind an overlay | Dialog or Sheet, which set `--overlay-bg` for you |
|
|
217
|
+
| chart series colours | `--dataviz-1-main` to `--dataviz-8-main`, with `-tint` and `-shade` |
|
|
218
|
+
|
|
219
|
+
## Dos and don'ts
|
|
220
|
+
|
|
221
|
+
**Do:** pair tokens from one family.
|
|
222
|
+
|
|
223
|
+
```tsx
|
|
224
|
+
<section style={{ backgroundColor: "var(--surface-bg)", color: "var(--container-fg)" }}>
|
|
225
|
+
<p style={{ color: "var(--container-fg-alt)" }}>Last updated 2 hours ago</p>
|
|
226
|
+
</section>
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Don't:** hardcode colours or mix families.
|
|
230
|
+
|
|
231
|
+
```tsx
|
|
232
|
+
<section style={{ backgroundColor: "#f5f5f5", color: "var(--action-primary-fg)" }}>
|
|
233
|
+
<p style={{ color: "gray" }}>Last updated 2 hours ago</p>
|
|
234
|
+
</section>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Do:** use the component's tone.
|
|
238
|
+
|
|
239
|
+
```tsx
|
|
240
|
+
<Badge variant="positive">Active</Badge>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**Don't:** recolour a component with tone tokens.
|
|
244
|
+
|
|
245
|
+
```tsx
|
|
246
|
+
<div style={{ "--action-primary-bg": "var(--positive-bg)" } as React.CSSProperties}>
|
|
247
|
+
<Badge>Active</Badge>
|
|
248
|
+
</div>
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Known issues
|
|
252
|
+
|
|
253
|
+
- `--interactive-bg-selected` and `--interactive-bg-active` are the accent: right for a checkbox, a switch or a slider, wrong across a table row. Rows and items use `--item-selected-bg`.
|
|
254
|
+
|
|
255
|
+
## Common agent mistakes
|
|
256
|
+
|
|
257
|
+
_Filled from evals._
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: elevation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Elevation
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Depth in Eluan comes from one light, above the page. What is in the page flow barely uses it: cards and tables are flat, with a hairline and no shadow. Depth belongs to two things.
|
|
10
|
+
|
|
11
|
+
**Controls.** A raised control (a button, a select trigger, the selected segment) carries a hairline ring, a contact shadow and a soft drop. A recessed one (an input, the track of a switch or slider) carries an inset shadow instead. The primary button adds a glow of the accent. Components draw all of this; see [look.md](./look.md).
|
|
12
|
+
|
|
13
|
+
**What floats.** Four levels, each a hairline ring for the edge, a tight shadow under the surface, and wider, softer shadows as it lifts:
|
|
14
|
+
|
|
15
|
+
| Level | What uses it |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| 1 to 2 | A card you raise on purpose with `elevation="sm"` or `"md"`; a clickable card on hover |
|
|
18
|
+
| 3 | Menus, popovers and toasts |
|
|
19
|
+
| 4 | Dialogs, sheets and anything over a scrim |
|
|
20
|
+
|
|
21
|
+
The shadows are cast in the theme's own darkest neutral (`--elevation-shade`), so a generated theme's tint carries into them. Dark mode swaps the ring for a hairline in the foreground colour, because a shadow barely reads on a dark page, and gives recessed tracks a ring so an empty one stays visible.
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
1. Never write a `box-shadow` value in app code. If an element you own must float, give it `--elevation-3` or `--elevation-4` and `--surface-bg` behind.
|
|
26
|
+
2. Leave Card on its default elevation: flat. Pin `elevation="sm"` or `"md"` only to make one card stand out among others.
|
|
27
|
+
3. Use `elevation="none"` for a card that should read as an outline, not a surface: a dashed drop zone, a placeholder.
|
|
28
|
+
4. Don't nest more than two cards, and don't use shadows to separate things in the page flow. Use the hairline.
|
|
29
|
+
5. Never stack z-index values to layer things yourself. Overlay components portal and layer correctly; for scoped themes pass `portalContainer` (see [theming.md](./theming.md)).
|
|
30
|
+
6. Never set `--elevation-shade` or the shadow colours yourself. They follow the theme.
|
|
31
|
+
7. Don't put the control shadows (`--elevation-control`, `-thumb`, `-well`, `-field`) on your own elements to imitate a control. Use the component.
|
|
32
|
+
|
|
33
|
+
## Tokens
|
|
34
|
+
|
|
35
|
+
<!-- tokens:start -->
|
|
36
|
+
| Token | Value (default theme) | Use for |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `--elevation-1` | ring, contact shadow, one soft shadow | A card you raise on purpose with `elevation="sm"` |
|
|
39
|
+
| `--elevation-2` | ring, contact shadow, two soft shadows | A card raised further, or a clickable card on hover |
|
|
40
|
+
| `--elevation-3` | ring and three shadows, the widest 40px | Menus, popovers and toasts |
|
|
41
|
+
| `--elevation-4` | ring and three shadows, the widest 72px | Dialogs, sheets and anything over a scrim |
|
|
42
|
+
| `--elevation-control` | ring, contact shadow, a soft drop | A raised control: buttons, select triggers, the selected segment |
|
|
43
|
+
| `--elevation-control-solid` | light on the top edge, contact shadow, a soft drop | A filled control: the destructive button |
|
|
44
|
+
| `--elevation-thumb` | ring, a tight contact shadow and drop | The knob of a switch or slider |
|
|
45
|
+
| `--elevation-well` | inset contact shadow; an inset ring in dark | A sunken track: segmented control, slider, switch |
|
|
46
|
+
| `--elevation-field` | a light inset contact shadow | A sunken field you type into |
|
|
47
|
+
| `--elevation-shade` | `--foregrounds-primary` / dark: `--color-neutral-950`, darkened | The colour every shadow is cast in; follows the theme's neutral ramp |
|
|
48
|
+
<!-- tokens:end -->
|
|
49
|
+
|
|
50
|
+
## Choosing a value
|
|
51
|
+
|
|
52
|
+
| If you need… | Use |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| a grouped surface on a screen | Card, default elevation (flat) |
|
|
55
|
+
| the frame of an app | NavigationDrawerLayout, which draws the ground and the divider |
|
|
56
|
+
| one card to stand out in a row | Card with `elevation="md"` |
|
|
57
|
+
| an outlined, empty region | Card with `elevation="none"` |
|
|
58
|
+
| a clickable card | Card with `clickable` (lifts on hover) |
|
|
59
|
+
| content floating over the page | Popover, HoverCard, DropdownMenu or Tooltip |
|
|
60
|
+
| a blocking layer | Dialog; a side layer: Sheet |
|
|
61
|
+
| a floating element you own | `box-shadow: var(--elevation-3)` on it, and `--surface-bg` behind |
|
|
62
|
+
|
|
63
|
+
## Dos and don'ts
|
|
64
|
+
|
|
65
|
+
**Do:** leave cards flat.
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
<Card>
|
|
69
|
+
<CardHeader>
|
|
70
|
+
<CardDescription>Quarterly revenue</CardDescription>
|
|
71
|
+
<CardTitle>$48,210</CardTitle>
|
|
72
|
+
</CardHeader>
|
|
73
|
+
</Card>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Don't:** raise every card, or add your own shadow.
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
<Card elevation="md">…</Card>
|
|
80
|
+
<div style={{ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)" }}>Quarterly revenue</div>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Common agent mistakes
|
|
84
|
+
|
|
85
|
+
- Passing `elevation="sm"` or `"md"` to every Card "for depth". Cards are flat here.
|
|
86
|
+
- Drawing a border and a shadow on an element you own. The elevation tokens include the edge; drop the border.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: iconography
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Iconography
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Eluan uses [Lucide](https://lucide.dev) icons (`lucide-react`, a dependency of `@eluan/core`). Components that need icons already render them: Input picks a leading icon from its `type`, PasswordInput has the show/hide eye, Select and Accordion have their chevrons. Icons draw with `currentColor`, so they take the colour of the text around them.
|
|
10
|
+
|
|
11
|
+
Icon boxes are sized with `--size-*` tokens, so they scale with density. Components use `--size-xxs` for icons inside controls.
|
|
12
|
+
|
|
13
|
+
## Rules
|
|
14
|
+
|
|
15
|
+
1. Use `lucide-react` icons. Don't mix in other icon sets or inline SVGs, except brand logos.
|
|
16
|
+
2. Size icons with `--size-*` tokens through the [Icon](../components/icon.md) component (`<Icon size="xxs"><Check /></Icon>`): `xxs` inside controls and text, `xs` or `sm` for standalone icons. Never use Lucide's numeric `size` prop or px values.
|
|
17
|
+
3. Let icons inherit colour. If an icon must differ from the text beside it, wrap it in `Icon` and set `tone`.
|
|
18
|
+
4. Mark decorative icons `aria-hidden="true"`.
|
|
19
|
+
5. Give every icon-only control an accessible name: `aria-label` on the Button, not on the icon.
|
|
20
|
+
6. Use Button with an `icon`, `iconSm`, `iconXs` or `iconInline` size for icon-only actions. There is no IconButton.
|
|
21
|
+
7. Don't add an icon to Input for `type="search"`, `email`, `password`, `tel` or `url`; it already shows one. Pass `icon` for a custom one or `icon={false}` to remove it; `icon={null}` keeps the automatic icon.
|
|
22
|
+
8. Brand logos: inline the SVG with `fill="currentColor"` and `fillRule="evenodd"` so cutouts stay transparent.
|
|
23
|
+
|
|
24
|
+
## Tokens
|
|
25
|
+
|
|
26
|
+
<!-- tokens:start -->
|
|
27
|
+
| Token | Value (default theme) | Use for |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| `--size-xxs` | 14px (compact 12px, wide 16px) | Control height, icon size |
|
|
30
|
+
| `--size-xs` | 18px (compact 16px, wide 20px) | Control height, icon size |
|
|
31
|
+
| `--size-sm` | 22px (compact 18px, wide 28px) | Control height, icon size |
|
|
32
|
+
| `--size-md` | 28px (compact 22px, wide 36px) | Control height, icon size |
|
|
33
|
+
<!-- tokens:end -->
|
|
34
|
+
|
|
35
|
+
## Choosing a value
|
|
36
|
+
|
|
37
|
+
| If you need… | Use |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| an icon next to button or input text | `--size-xxs` |
|
|
40
|
+
| an icon-only button | Button `size="icon"` with the icon at `--size-xxs` |
|
|
41
|
+
| a small icon-only button in a dense row | Button `size="iconSm"` or `"iconXs"` |
|
|
42
|
+
| an icon inline with body text | Button `size="iconInline"` for actions; `--size-xxs` for decoration |
|
|
43
|
+
| a standalone illustrative icon (empty state) | `--size-sm` to `--size-md` |
|
|
44
|
+
|
|
45
|
+
## Dos and don'ts
|
|
46
|
+
|
|
47
|
+
**Do:** name the button and hide the icon.
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
import { X } from "lucide-react";
|
|
51
|
+
import { Button, Icon } from "@eluan/core";
|
|
52
|
+
|
|
53
|
+
<Button variant="ghost" size="icon" aria-label="Close panel">
|
|
54
|
+
<Icon size="xxs">
|
|
55
|
+
<X />
|
|
56
|
+
</Icon>
|
|
57
|
+
</Button>;
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Don't:** leave an icon-only control unnamed or sized in px.
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
<button onClick={close}>
|
|
64
|
+
<X size={24} color="#666" />
|
|
65
|
+
</button>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Common agent mistakes
|
|
69
|
+
|
|
70
|
+
_Filled from evals._
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: look
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# The look
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Eluan has one look. There is no style to choose and nothing to configure: the tokens are the look, and every component reads them. A theme changes the colours (the grey ramp and the accent); the look stays the same.
|
|
10
|
+
|
|
11
|
+
Everything on a screen is one of six things, and you can tell which by how it sits on the page:
|
|
12
|
+
|
|
13
|
+
| Role | What it is | How it looks |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| Ground | The page itself. Navigation sits straight on it, with no border | Paper: a tinted off-white, near-black in dark (`--shell-ground`) |
|
|
16
|
+
| Flat | Things you read: cards, tables, chips, the sidebar and its items | The surface fill and a hairline border. No shadow |
|
|
17
|
+
| Raised | Things you press: buttons, select triggers, the selected segment, thumbs | The surface colour with a soft shadow, as a capsule |
|
|
18
|
+
| Lit | The primary action, and only that | Raised, in the accent, with a light on its top edge and a glow of its own colour |
|
|
19
|
+
| Recessed | Things you fill or slide: inputs, and the tracks of segmented controls, switches and sliders | Cut into the page: an inset shadow |
|
|
20
|
+
| Floating | Things over the page: menus, popovers, toasts, dialogs | The surface fill, a hairline and an elevation level (see [elevation.md](./elevation.md)) |
|
|
21
|
+
|
|
22
|
+
Shape follows the same split. Controls are capsules in every corner style (`--control-radius`); surfaces take `--surface-radius`, which the corner style and the density set. See [radius.md](./radius.md).
|
|
23
|
+
|
|
24
|
+
The accent is spent in few places: the primary action, switches, checks, radios, sliders, progress, the chosen day in a calendar and the focus ring. A chosen row, tree node, page or pressed toggle is quiet instead (`--item-selected-bg`).
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
1. Don't restyle a component to change its role. A Button is raised, an Input is recessed, a Card is flat. If you want a different role, use a different component.
|
|
29
|
+
2. One primary Button per view or region. It is the only lit thing on the screen; two of them cancel each other.
|
|
30
|
+
3. Put content on the ground or in a Card. Don't wrap the whole content area in one big card, and don't nest more than two cards.
|
|
31
|
+
4. Leave Card flat. Raise one (`elevation="sm"` or `"md"`) only to make a single card stand out among others, never every card.
|
|
32
|
+
5. Divide with the hairline: `--surface-border` around a surface, or the Separator component. Never a shadow to separate things in the page flow. Navigation takes no line at all: the sidebar and the top bar sit on the ground, and the cards beside them mark where content starts.
|
|
33
|
+
6. Never use the accent for a selected row, a current navigation item or a pressed toggle. Components already use `--item-selected-bg` and `--nav-active-bg`.
|
|
34
|
+
7. Never write a `box-shadow`, a gradient or an inset by hand to imitate a raised, lit or recessed control. Use the component.
|
|
35
|
+
8. When you build an element of your own, give it one role and read that role's tokens: a surface reads `--surface-bg` and `--surface-border`; a field reads `--control-field-bg`, `--control-field-border` and `--control-field-shadow`.
|
|
36
|
+
9. Never set the look's tokens yourself, and never set them per component. They follow the theme and the mode.
|
|
37
|
+
|
|
38
|
+
## Tokens
|
|
39
|
+
|
|
40
|
+
<!-- tokens:start -->
|
|
41
|
+
| Token | Value (default theme) | Use for |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| `--shell-ground` | `--backgrounds-secondary` | The page behind everything: paper |
|
|
44
|
+
| `--surface-bg` | `--container-bg` | Flat surfaces: cards, tables, panels |
|
|
45
|
+
| `--surface-border` | `--container-border` | The hairline around a flat surface |
|
|
46
|
+
| `--surface-shadow` | none | None: flat surfaces carry no shadow |
|
|
47
|
+
| `--nav-active-bg` | `--surface-border` | The current navigation item |
|
|
48
|
+
| `--item-selected-bg` | between `--backgrounds-tertiary` and `--backgrounds-quaternary` | A chosen row, tree node, page or pressed toggle |
|
|
49
|
+
| `--item-selected-fg` | `--foregrounds-primary` | Text on a chosen row or item |
|
|
50
|
+
| `--control-bg` | `--backgrounds-primary` / dark `--backgrounds-tertiary` | Raised controls: buttons, select triggers, the selected segment |
|
|
51
|
+
| `--control-bg-hover` | `--backgrounds-secondary` / dark `--backgrounds-quaternary` | A raised control on hover |
|
|
52
|
+
| `--control-shadow` | `--elevation-control` | The soft shadow under a raised control |
|
|
53
|
+
| `--control-thumb-bg` | `--color-neutral-0` / dark `--foregrounds-primary` | Switch and slider thumbs |
|
|
54
|
+
| `--control-thumb-shadow` | `--elevation-thumb` | The shadow under a thumb |
|
|
55
|
+
| `--control-solid-sheen` | a faint light from the top edge down | The primary button only |
|
|
56
|
+
| `--control-solid-shadow` | top-edge light, a dark lip and a glow, all in the accent | The primary button only |
|
|
57
|
+
| `--control-well-bg` | `--backgrounds-tertiary` / dark: the ground, darkened | Recessed tracks: segmented control, switch, slider |
|
|
58
|
+
| `--control-well-fg` | `--foregrounds-secondary` / dim and dark `--interactive-fg-alt` | Labels in a track that are not selected: tabs, segments |
|
|
59
|
+
| `--control-well-shadow` | `--elevation-well` | The inset shadow of a track |
|
|
60
|
+
| `--control-field-bg` | `--backgrounds-primary` / dark: the ground, darkened | Recessed fields: inputs, textareas, search |
|
|
61
|
+
| `--control-field-border` | `--interactive-border-alt` | A field's border at rest |
|
|
62
|
+
| `--control-field-shadow` | `--elevation-field` | The inset shadow of a field |
|
|
63
|
+
| `--control-focus-border` | `--action-primary-bg` | A focused field's border: the accent |
|
|
64
|
+
| `--control-focus-ring` | a 3px ring of the accent at 18% | The soft ring around a focused field |
|
|
65
|
+
| `--focus-ring` | `--action-primary-bg` | Keyboard focus outline; components draw it, don't restyle it |
|
|
66
|
+
<!-- tokens:end -->
|
|
67
|
+
|
|
68
|
+
## Choosing a value
|
|
69
|
+
|
|
70
|
+
| If you need… | Use |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| the app's frame: navigation on the ground, content beside it | NavigationDrawerLayout |
|
|
73
|
+
| a group of related content | Card, left flat |
|
|
74
|
+
| figures or rows to compare | Table inside a Card, or directly on the ground |
|
|
75
|
+
| the main action of a view | Button (the default variant), once |
|
|
76
|
+
| any other action | Button `outline` or `secondary` (raised), `ghost` (flat until hovered) |
|
|
77
|
+
| a choice between a few views | SegmentedControl or Tabs: a recessed track with a raised selected segment |
|
|
78
|
+
| an on or off setting | Switch: a recessed track that takes the accent when on |
|
|
79
|
+
| a value to type | Input, Textarea, Select and the other fields: recessed |
|
|
80
|
+
| a row that is selected | the component's own selected state, which is quiet |
|
|
81
|
+
| a surface of your own | `--surface-bg`, `--surface-border` and `--surface-radius` |
|
|
82
|
+
| a field of your own | `--control-field-bg`, `--control-field-border`, `--control-field-shadow` and `--control-radius` |
|
|
83
|
+
|
|
84
|
+
## Dos and don'ts
|
|
85
|
+
|
|
86
|
+
**Do:** one lit action, the rest raised or flat.
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
<Row gap="sm" justify="end">
|
|
90
|
+
<Button variant="ghost">Cancel</Button>
|
|
91
|
+
<Button variant="outline">Save draft</Button>
|
|
92
|
+
<Button>Publish</Button>
|
|
93
|
+
</Row>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Don't:** light every action.
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
<Row gap="sm" justify="end">
|
|
100
|
+
<Button>Cancel</Button>
|
|
101
|
+
<Button>Save draft</Button>
|
|
102
|
+
<Button>Publish</Button>
|
|
103
|
+
</Row>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Do:** build your own surface from the surface tokens.
|
|
107
|
+
|
|
108
|
+
```tsx
|
|
109
|
+
<div
|
|
110
|
+
style={{
|
|
111
|
+
backgroundColor: "var(--surface-bg)",
|
|
112
|
+
border: "1px solid var(--surface-border)",
|
|
113
|
+
borderRadius: "var(--surface-radius)",
|
|
114
|
+
padding: "var(--spacing-xl)",
|
|
115
|
+
}}
|
|
116
|
+
>
|
|
117
|
+
<Typography size="sm">Nothing scheduled this week.</Typography>
|
|
118
|
+
</div>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Don't:** give a flat surface a shadow, or a control a square corner.
|
|
122
|
+
|
|
123
|
+
```tsx
|
|
124
|
+
<div style={{ boxShadow: "0 2px 8px rgba(0, 0, 0, 0.1)", borderRadius: 8 }}>
|
|
125
|
+
<Typography size="sm">Nothing scheduled this week.</Typography>
|
|
126
|
+
</div>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Common agent mistakes
|
|
130
|
+
|
|
131
|
+
- Putting the whole content area in one big rounded card instead of on the ground.
|
|
132
|
+
- Several primary Buttons in one view.
|
|
133
|
+
- Shadows on cards "for depth". Depth here belongs to controls and to what floats.
|
|
134
|
+
- Colouring a selected row or the current navigation item with the accent.
|
|
135
|
+
- Rebuilding an input as a white box with a border; a field is recessed and a capsule.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: motion
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Motion
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Eluan has no duration or easing tokens yet. Components own their motion: state transitions (hover, press) and loading animations are built in, and some components open and close without any animation (Accordion and Collapsible content). App code shouldn't animate Eluan components, and new motion must respect `prefers-reduced-motion`.
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
|
|
13
|
+
1. Don't add transitions or animations to Eluan components or around them. Their motion is built in.
|
|
14
|
+
2. If you must animate your own element, gate it on reduced motion: under `prefers-reduced-motion: reduce`, remove the movement or shorten it to near zero.
|
|
15
|
+
3. Never animate layout properties (width, height, top, left) on content. Animate opacity or transform.
|
|
16
|
+
4. Use Spinner or Skeleton for loading. Never build your own loading animation.
|
|
17
|
+
5. Never autoplay looping motion that the user can't pause. Carousel doesn't autoplay; keep it that way.
|
|
18
|
+
|
|
19
|
+
## Tokens
|
|
20
|
+
|
|
21
|
+
<!-- tokens:start -->
|
|
22
|
+
| Token | Value (default theme) | Use for |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| _No tokens yet_ | | Follow the rules above |
|
|
25
|
+
<!-- tokens:end -->
|
|
26
|
+
|
|
27
|
+
## Choosing a value
|
|
28
|
+
|
|
29
|
+
| If you need… | Use |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| loading feedback in place | Spinner |
|
|
32
|
+
| a loading placeholder for layout | Skeleton |
|
|
33
|
+
| content that opens and closes | Accordion or Collapsible (they don't animate; don't add one) |
|
|
34
|
+
| a panel that slides in | Sheet (overlay) or Drawer (pushes content) |
|
|
35
|
+
| your own reveal animation | opacity or transform only, gated on reduced motion |
|
|
36
|
+
|
|
37
|
+
## Dos and don'ts
|
|
38
|
+
|
|
39
|
+
**Do:** open and close content with the component, as it ships.
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
<Collapsible>
|
|
43
|
+
<CollapsibleTrigger asChild>
|
|
44
|
+
<Button variant="ghost">Show details</Button>
|
|
45
|
+
</CollapsibleTrigger>
|
|
46
|
+
<CollapsibleContent>Order #4821 shipped on 12 March.</CollapsibleContent>
|
|
47
|
+
</Collapsible>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Don't:** hand-roll a height animation.
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
<div style={{ height: open ? 120 : 0, transition: "height 0.3s ease", overflow: "hidden" }}>
|
|
54
|
+
Order #4821 shipped on 12 March.
|
|
55
|
+
</div>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Common agent mistakes
|
|
59
|
+
|
|
60
|
+
_Filled from evals._
|