@teseor/css 1.0.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 (298) hide show
  1. package/README.md +102 -0
  2. package/dist/compiled.css +4463 -0
  3. package/dist/index.css +4445 -0
  4. package/fonts/.gitkeep +9 -0
  5. package/package.json +38 -0
  6. package/src/00-config/layers/layers.scss +1 -0
  7. package/src/00-config/mixins/_border.scss +13 -0
  8. package/src/00-config/mixins/index.scss +1 -0
  9. package/src/00-config/tokens/_variables.scss +120 -0
  10. package/src/00-config/tokens/borders/index.scss +6 -0
  11. package/src/00-config/tokens/colors/colors.docs.json +168 -0
  12. package/src/00-config/tokens/colors/index.scss +25 -0
  13. package/src/00-config/tokens/grid/grid.docs.json +54 -0
  14. package/src/00-config/tokens/grid/index.scss +11 -0
  15. package/src/00-config/tokens/index.scss +15 -0
  16. package/src/00-config/tokens/input.scss +14 -0
  17. package/src/00-config/tokens/motion/index.scss +25 -0
  18. package/src/00-config/tokens/radius/index.scss +7 -0
  19. package/src/00-config/tokens/semantic/colors/index.scss +30 -0
  20. package/src/00-config/tokens/semantic/spacing/index.scss +10 -0
  21. package/src/00-config/tokens/shadows/index.scss +5 -0
  22. package/src/00-config/tokens/spacing/index.scss +15 -0
  23. package/src/00-config/tokens/spacing/spacing.docs.json +114 -0
  24. package/src/00-config/tokens/theming.docs.json +77 -0
  25. package/src/00-config/tokens/typography/index.scss +119 -0
  26. package/src/00-config/tokens/zindex/index.scss +14 -0
  27. package/src/01-reset/index.scss +1 -0
  28. package/src/01-reset/reset.scss +8 -0
  29. package/src/02-base/index.scss +2 -0
  30. package/src/02-base/root/root.scss +12 -0
  31. package/src/02-base/typography/typography.docs.json +94 -0
  32. package/src/02-base/typography/typography.scss +145 -0
  33. package/src/03-layout/app-shell/app-shell.api.json +26 -0
  34. package/src/03-layout/app-shell/app-shell.docs.json +119 -0
  35. package/src/03-layout/app-shell/index.scss +5 -0
  36. package/src/03-layout/box/box.api.json +15 -0
  37. package/src/03-layout/box/box.docs.json +57 -0
  38. package/src/03-layout/box/index.scss +34 -0
  39. package/src/03-layout/center/center.api.json +6 -0
  40. package/src/03-layout/center/center.docs.json +24 -0
  41. package/src/03-layout/center/index.scss +11 -0
  42. package/src/03-layout/cluster/cluster.api.json +10 -0
  43. package/src/03-layout/cluster/cluster.docs.json +129 -0
  44. package/src/03-layout/cluster/index.scss +18 -0
  45. package/src/03-layout/container/container.api.json +13 -0
  46. package/src/03-layout/container/index.scss +17 -0
  47. package/src/03-layout/flex/flex.api.json +15 -0
  48. package/src/03-layout/flex/flex.docs.json +56 -0
  49. package/src/03-layout/flex/index.scss +51 -0
  50. package/src/03-layout/grid/grid.api.json +10 -0
  51. package/src/03-layout/grid/grid.docs.json +116 -0
  52. package/src/03-layout/grid/index.scss +15 -0
  53. package/src/03-layout/index.scss +11 -0
  54. package/src/03-layout/main/index.scss +17 -0
  55. package/src/03-layout/main/main.api.json +13 -0
  56. package/src/03-layout/sidebar/index.scss +30 -0
  57. package/src/03-layout/sidebar/sidebar.api.json +13 -0
  58. package/src/03-layout/sidebar-nav/index.scss +209 -0
  59. package/src/03-layout/sidebar-nav/sidebar-nav-all.png +0 -0
  60. package/src/03-layout/sidebar-nav/sidebar-nav.api.json +115 -0
  61. package/src/03-layout/sidebar-nav/sidebar-nav.docs.json +100 -0
  62. package/src/03-layout/sidebar-nav/sidebar-nav.visual.spec.ts +14 -0
  63. package/src/03-layout/stack/index.scss +13 -0
  64. package/src/03-layout/stack/stack.api.json +10 -0
  65. package/src/03-layout/stack/stack.docs.json +131 -0
  66. package/src/04-components/accordion/accordion-visual.png +0 -0
  67. package/src/04-components/accordion/accordion.api.json +19 -0
  68. package/src/04-components/accordion/accordion.docs.json +51 -0
  69. package/src/04-components/accordion/accordion.visual.spec.ts +14 -0
  70. package/src/04-components/accordion/index.scss +78 -0
  71. package/src/04-components/alert/alert-visual.png +0 -0
  72. package/src/04-components/alert/alert.api.json +91 -0
  73. package/src/04-components/alert/alert.docs.json +79 -0
  74. package/src/04-components/alert/alert.visual.spec.ts +14 -0
  75. package/src/04-components/alert/index.scss +108 -0
  76. package/src/04-components/avatar/avatar-visual.png +0 -0
  77. package/src/04-components/avatar/avatar.api.json +70 -0
  78. package/src/04-components/avatar/avatar.docs.json +200 -0
  79. package/src/04-components/avatar/avatar.visual.spec.ts +14 -0
  80. package/src/04-components/avatar/index.scss +104 -0
  81. package/src/04-components/badge/badge-visual.png +0 -0
  82. package/src/04-components/badge/badge.api.json +86 -0
  83. package/src/04-components/badge/badge.docs.json +89 -0
  84. package/src/04-components/badge/badge.visual.spec.ts +14 -0
  85. package/src/04-components/badge/index.scss +64 -0
  86. package/src/04-components/breadcrumb/breadcrumb-visual.png +0 -0
  87. package/src/04-components/breadcrumb/breadcrumb.api.json +31 -0
  88. package/src/04-components/breadcrumb/breadcrumb.docs.json +59 -0
  89. package/src/04-components/breadcrumb/breadcrumb.visual.spec.ts +14 -0
  90. package/src/04-components/breadcrumb/index.scss +77 -0
  91. package/src/04-components/button/button-visual.png +0 -0
  92. package/src/04-components/button/button.api.json +138 -0
  93. package/src/04-components/button/button.docs.json +75 -0
  94. package/src/04-components/button/button.visual.spec.ts +14 -0
  95. package/src/04-components/button/index.scss +222 -0
  96. package/src/04-components/button-group/button-group-visual.png +0 -0
  97. package/src/04-components/button-group/button-group.api.json +11 -0
  98. package/src/04-components/button-group/button-group.docs.json +52 -0
  99. package/src/04-components/button-group/button-group.visual.spec.ts +14 -0
  100. package/src/04-components/button-group/index.scss +78 -0
  101. package/src/04-components/card/card-visual.png +0 -0
  102. package/src/04-components/card/card.api.json +53 -0
  103. package/src/04-components/card/card.docs.json +103 -0
  104. package/src/04-components/card/card.visual.spec.ts +14 -0
  105. package/src/04-components/card/index.scss +41 -0
  106. package/src/04-components/checkbox/checkbox-visual.png +0 -0
  107. package/src/04-components/checkbox/checkbox.api.json +50 -0
  108. package/src/04-components/checkbox/checkbox.docs.json +151 -0
  109. package/src/04-components/checkbox/checkbox.visual.spec.ts +14 -0
  110. package/src/04-components/checkbox/index.scss +104 -0
  111. package/src/04-components/code/code-visual.png +0 -0
  112. package/src/04-components/code/code.api.json +47 -0
  113. package/src/04-components/code/code.docs.json +84 -0
  114. package/src/04-components/code/code.visual.spec.ts +14 -0
  115. package/src/04-components/code/index.scss +64 -0
  116. package/src/04-components/data-list/data-list-visual.png +0 -0
  117. package/src/04-components/data-list/data-list.api.json +23 -0
  118. package/src/04-components/data-list/data-list.docs.json +79 -0
  119. package/src/04-components/data-list/data-list.visual.spec.ts +14 -0
  120. package/src/04-components/data-list/index.scss +98 -0
  121. package/src/04-components/dialog/dialog-visual.png +0 -0
  122. package/src/04-components/dialog/dialog.api.json +23 -0
  123. package/src/04-components/dialog/dialog.docs.json +58 -0
  124. package/src/04-components/dialog/dialog.visual.spec.ts +14 -0
  125. package/src/04-components/dialog/index.scss +74 -0
  126. package/src/04-components/disclosure/disclosure-visual.png +0 -0
  127. package/src/04-components/disclosure/disclosure.api.json +31 -0
  128. package/src/04-components/disclosure/disclosure.docs.json +73 -0
  129. package/src/04-components/disclosure/disclosure.visual.spec.ts +14 -0
  130. package/src/04-components/disclosure/index.scss +111 -0
  131. package/src/04-components/divider/divider-visual.png +0 -0
  132. package/src/04-components/divider/divider.api.json +30 -0
  133. package/src/04-components/divider/divider.docs.json +68 -0
  134. package/src/04-components/divider/divider.visual.spec.ts +14 -0
  135. package/src/04-components/divider/index.scss +115 -0
  136. package/src/04-components/drawer/drawer-visual.png +0 -0
  137. package/src/04-components/drawer/drawer.api.json +39 -0
  138. package/src/04-components/drawer/drawer.docs.json +78 -0
  139. package/src/04-components/drawer/drawer.visual.spec.ts +14 -0
  140. package/src/04-components/drawer/index.scss +251 -0
  141. package/src/04-components/field/field-visual.png +0 -0
  142. package/src/04-components/field/field.api.json +11 -0
  143. package/src/04-components/field/field.docs.json +59 -0
  144. package/src/04-components/field/field.visual.spec.ts +14 -0
  145. package/src/04-components/field/index.scss +44 -0
  146. package/src/04-components/form-error/form-error-visual.png +0 -0
  147. package/src/04-components/form-error/form-error.api.json +19 -0
  148. package/src/04-components/form-error/form-error.docs.json +40 -0
  149. package/src/04-components/form-error/form-error.visual.spec.ts +14 -0
  150. package/src/04-components/form-error/index.scss +31 -0
  151. package/src/04-components/form-helper/form-helper-visual.png +0 -0
  152. package/src/04-components/form-helper/form-helper.api.json +19 -0
  153. package/src/04-components/form-helper/form-helper.docs.json +31 -0
  154. package/src/04-components/form-helper/form-helper.visual.spec.ts +14 -0
  155. package/src/04-components/form-helper/index.scss +24 -0
  156. package/src/04-components/heading/heading-visual.png +0 -0
  157. package/src/04-components/heading/heading.api.json +83 -0
  158. package/src/04-components/heading/heading.docs.json +98 -0
  159. package/src/04-components/heading/heading.visual.spec.ts +14 -0
  160. package/src/04-components/heading/index.scss +61 -0
  161. package/src/04-components/icon/icon-visual.png +0 -0
  162. package/src/04-components/icon/icon.api.json +56 -0
  163. package/src/04-components/icon/icon.docs.json +155 -0
  164. package/src/04-components/icon/icon.visual.spec.ts +14 -0
  165. package/src/04-components/icon/index.scss +79 -0
  166. package/src/04-components/index.scss +41 -0
  167. package/src/04-components/input/index.scss +154 -0
  168. package/src/04-components/input/input-visual.png +0 -0
  169. package/src/04-components/input/input.api.json +85 -0
  170. package/src/04-components/input/input.docs.json +189 -0
  171. package/src/04-components/input/input.visual.spec.ts +14 -0
  172. package/src/04-components/label/index.scss +46 -0
  173. package/src/04-components/label/label-visual.png +0 -0
  174. package/src/04-components/label/label.api.json +27 -0
  175. package/src/04-components/label/label.docs.json +73 -0
  176. package/src/04-components/label/label.visual.spec.ts +14 -0
  177. package/src/04-components/link/index.scss +73 -0
  178. package/src/04-components/link/link-visual.png +0 -0
  179. package/src/04-components/link/link.api.json +39 -0
  180. package/src/04-components/link/link.docs.json +104 -0
  181. package/src/04-components/link/link.visual.spec.ts +14 -0
  182. package/src/04-components/menu/index.scss +145 -0
  183. package/src/04-components/menu/menu-visual.png +0 -0
  184. package/src/04-components/menu/menu.api.json +47 -0
  185. package/src/04-components/menu/menu.docs.json +81 -0
  186. package/src/04-components/menu/menu.visual.spec.ts +14 -0
  187. package/src/04-components/modal/index.scss +93 -0
  188. package/src/04-components/modal/modal-visual.png +0 -0
  189. package/src/04-components/modal/modal.api.json +43 -0
  190. package/src/04-components/modal/modal.docs.json +86 -0
  191. package/src/04-components/modal/modal.visual.spec.ts +14 -0
  192. package/src/04-components/overlay/index.scss +49 -0
  193. package/src/04-components/overlay/overlay-visual.png +0 -0
  194. package/src/04-components/overlay/overlay.api.json +23 -0
  195. package/src/04-components/overlay/overlay.docs.json +63 -0
  196. package/src/04-components/overlay/overlay.visual.spec.ts +14 -0
  197. package/src/04-components/pagination/index.scss +114 -0
  198. package/src/04-components/pagination/pagination-visual.png +0 -0
  199. package/src/04-components/pagination/pagination.api.json +39 -0
  200. package/src/04-components/pagination/pagination.docs.json +88 -0
  201. package/src/04-components/pagination/pagination.visual.spec.ts +14 -0
  202. package/src/04-components/popover/index.scss +114 -0
  203. package/src/04-components/popover/popover-visual.png +0 -0
  204. package/src/04-components/popover/popover.api.json +39 -0
  205. package/src/04-components/popover/popover.docs.json +70 -0
  206. package/src/04-components/popover/popover.visual.spec.ts +14 -0
  207. package/src/04-components/progress/index.scss +102 -0
  208. package/src/04-components/progress/progress-visual.png +0 -0
  209. package/src/04-components/progress/progress.api.json +23 -0
  210. package/src/04-components/progress/progress.docs.json +87 -0
  211. package/src/04-components/progress/progress.visual.spec.ts +14 -0
  212. package/src/04-components/radio/index.scss +96 -0
  213. package/src/04-components/radio/radio-visual.png +0 -0
  214. package/src/04-components/radio/radio.api.json +46 -0
  215. package/src/04-components/radio/radio.docs.json +159 -0
  216. package/src/04-components/radio/radio.visual.spec.ts +14 -0
  217. package/src/04-components/select/index.scss +113 -0
  218. package/src/04-components/select/select-visual.png +0 -0
  219. package/src/04-components/select/select.api.json +85 -0
  220. package/src/04-components/select/select.docs.json +162 -0
  221. package/src/04-components/select/select.visual.spec.ts +14 -0
  222. package/src/04-components/skeleton/index.scss +99 -0
  223. package/src/04-components/skeleton/skeleton-visual.png +0 -0
  224. package/src/04-components/skeleton/skeleton.api.json +19 -0
  225. package/src/04-components/skeleton/skeleton.docs.json +62 -0
  226. package/src/04-components/skeleton/skeleton.visual.spec.ts +14 -0
  227. package/src/04-components/spinner/index.scss +60 -0
  228. package/src/04-components/spinner/spinner-visual.png +0 -0
  229. package/src/04-components/spinner/spinner.api.json +63 -0
  230. package/src/04-components/spinner/spinner.docs.json +88 -0
  231. package/src/04-components/spinner/spinner.visual.spec.ts +15 -0
  232. package/src/04-components/status/index.scss +85 -0
  233. package/src/04-components/status/status-visual.png +0 -0
  234. package/src/04-components/status/status.api.json +19 -0
  235. package/src/04-components/status/status.docs.json +60 -0
  236. package/src/04-components/status/status.visual.spec.ts +14 -0
  237. package/src/04-components/table/index.scss +60 -0
  238. package/src/04-components/table/table-visual.png +0 -0
  239. package/src/04-components/table/table.api.json +27 -0
  240. package/src/04-components/table/table.docs.json +59 -0
  241. package/src/04-components/table/table.visual.spec.ts +14 -0
  242. package/src/04-components/tabs/index.scss +77 -0
  243. package/src/04-components/tabs/tabs-visual.png +0 -0
  244. package/src/04-components/tabs/tabs.api.json +31 -0
  245. package/src/04-components/tabs/tabs.docs.json +61 -0
  246. package/src/04-components/tabs/tabs.visual.spec.ts +14 -0
  247. package/src/04-components/tag/index.scss +98 -0
  248. package/src/04-components/tag/tag-visual.png +0 -0
  249. package/src/04-components/tag/tag.api.json +86 -0
  250. package/src/04-components/tag/tag.docs.json +108 -0
  251. package/src/04-components/tag/tag.visual.spec.ts +14 -0
  252. package/src/04-components/textarea/index.scss +124 -0
  253. package/src/04-components/textarea/textarea-visual.png +0 -0
  254. package/src/04-components/textarea/textarea.api.json +93 -0
  255. package/src/04-components/textarea/textarea.docs.json +191 -0
  256. package/src/04-components/textarea/textarea.visual.spec.ts +14 -0
  257. package/src/04-components/toast/index.scss +180 -0
  258. package/src/04-components/toast/toast-visual.png +0 -0
  259. package/src/04-components/toast/toast.api.json +43 -0
  260. package/src/04-components/toast/toast.docs.json +99 -0
  261. package/src/04-components/toast/toast.visual.spec.ts +14 -0
  262. package/src/04-components/toggle/index.scss +117 -0
  263. package/src/04-components/toggle/toggle-visual.png +0 -0
  264. package/src/04-components/toggle/toggle.api.json +43 -0
  265. package/src/04-components/toggle/toggle.docs.json +92 -0
  266. package/src/04-components/toggle/toggle.visual.spec.ts +14 -0
  267. package/src/04-components/tooltip/index.scss +102 -0
  268. package/src/04-components/tooltip/tooltip-visual.png +0 -0
  269. package/src/04-components/tooltip/tooltip.api.json +39 -0
  270. package/src/04-components/tooltip/tooltip.docs.json +63 -0
  271. package/src/04-components/tooltip/tooltip.visual.spec.ts +14 -0
  272. package/src/05-utilities/border/index.scss +21 -0
  273. package/src/05-utilities/display/display.api.json +6 -0
  274. package/src/05-utilities/display/display.docs.json +28 -0
  275. package/src/05-utilities/display/display.scss +195 -0
  276. package/src/05-utilities/index.scss +6 -0
  277. package/src/05-utilities/spacing/spacing.api.json +6 -0
  278. package/src/05-utilities/spacing/spacing.docs.json +43 -0
  279. package/src/05-utilities/spacing/spacing.scss +399 -0
  280. package/src/05-utilities/text/text.api.json +38 -0
  281. package/src/05-utilities/text/text.docs.json +132 -0
  282. package/src/05-utilities/text/text.scss +246 -0
  283. package/src/05-utilities/view-transition/index.scss +198 -0
  284. package/src/05-utilities/view-transition/view-transition.api.json +21 -0
  285. package/src/05-utilities/view-transition/view-transition.docs.json +63 -0
  286. package/src/05-utilities/visually-hidden/index.scss +38 -0
  287. package/src/05-utilities/visually-hidden/visually-hidden.api.json +8 -0
  288. package/src/05-utilities/visually-hidden/visually-hidden.docs.json +29 -0
  289. package/src/99-debug/grid-overlay.scss +79 -0
  290. package/src/99-debug/index.scss +1 -0
  291. package/src/index.scss +30 -0
  292. package/src/testing/api-types.ts +20 -0
  293. package/src/testing/grid-alignment.spec.ts +92 -0
  294. package/src/testing/html-generator.ts +151 -0
  295. package/src/testing/index.ts +15 -0
  296. package/src/testing/page-setup.ts +131 -0
  297. package/src/testing/rhythm.ts +146 -0
  298. package/src/testing/scaffold.ts +50 -0
package/fonts/.gitkeep ADDED
@@ -0,0 +1,9 @@
1
+ # Place WOFF2 font files here for self-hosted option
2
+ # Download from: https://fonts.google.com/noto/specimen/Noto+Sans
3
+ #
4
+ # Required files:
5
+ # - NotoSans-Regular.woff2
6
+ # - NotoSans-Medium.woff2
7
+ # - NotoSans-Bold.woff2
8
+ # - NotoSansMono-Regular.woff2
9
+ # - NotoSansMono-Medium.woff2
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@teseor/css",
3
+ "version": "1.0.0",
4
+ "description": "CSS library - reset, primitives, components, utilities",
5
+ "license": "MIT",
6
+ "author": "letanure",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/teseor/teseor.git",
10
+ "directory": "packages/css"
11
+ },
12
+ "homepage": "https://teseor.com",
13
+ "bugs": "https://github.com/teseor/teseor/issues",
14
+ "keywords": [
15
+ "css",
16
+ "components",
17
+ "design-system",
18
+ "ui",
19
+ "tokens",
20
+ "utilities"
21
+ ],
22
+ "main": "dist/index.css",
23
+ "exports": {
24
+ ".": "./dist/index.css",
25
+ "./fonts/*": "./src/fonts/*",
26
+ "./dist/*": "./dist/*"
27
+ },
28
+ "files": [
29
+ "dist",
30
+ "src",
31
+ "fonts"
32
+ ],
33
+ "scripts": {
34
+ "build": "pnpm --filter @teseor/source sync:components && sass src/index.scss dist/index.css --style=compressed",
35
+ "test:grid": "playwright test --config=playwright.config.ts src/testing/grid-alignment.spec.ts",
36
+ "test:visual": "playwright test --config=playwright.config.ts --grep visual"
37
+ }
38
+ }
@@ -0,0 +1 @@
1
+ @layer reset, tokens, base, primitives, components.styles, components.tokens, utilities, themes;
@@ -0,0 +1,13 @@
1
+ // Border and surface mixins - shared by components and utilities
2
+
3
+ @mixin border($width: var(--ui-border-width-sm), $color: var(--ui-color-border)) {
4
+ border: $width solid $color;
5
+ }
6
+
7
+ @mixin rounded($size: var(--ui-radius-md)) {
8
+ border-radius: $size;
9
+ }
10
+
11
+ @mixin surface($bg: var(--ui-color-bg)) {
12
+ background: $bg;
13
+ }
@@ -0,0 +1 @@
1
+ @forward './border';
@@ -0,0 +1,120 @@
1
+ // SCSS Variables - Source of truth for fallback values
2
+ // These are the computed values that CSS custom properties resolve to.
3
+ // Import this file in components that need standalone fallbacks.
4
+
5
+ // Grid - all derived from $unit
6
+ $unit: 0.5rem; // 8px
7
+ $row: $unit * 2; // 16px
8
+ $row-1: $row;
9
+ $row-2: $row * 2; // 32px
10
+ $row-3: $row * 3; // 48px
11
+ $row-4: $row * 4;
12
+ $row-5: $row * 5;
13
+ $row-6: $row * 6;
14
+
15
+ // Spacing - derived from $unit
16
+ $space-px: $unit * 0.125; // 1px - hairline
17
+ $space-quarter: $unit * 0.25; // 2px - micro spacing
18
+ $space-0: $unit * 0.5; // 4px
19
+ $space-1: $unit; // 8px
20
+ $space-2: $unit * 2; // 16px
21
+ $space-3: $unit * 3; // 24px
22
+ $space-4: $unit * 4;
23
+ $space-6: $unit * 6;
24
+ $space-8: $unit * 8;
25
+
26
+ // Typography - Font families
27
+ $font-sans: "Noto Sans", system-ui, -apple-system, sans-serif;
28
+ $font-mono: "Noto Sans Mono", ui-monospace, "Cascadia Code", monospace;
29
+
30
+ // Typography - Font sizes (1.2 modular scale)
31
+ $font-size-xs: 0.75rem; // 12px
32
+ $font-size-sm: 0.875rem; // 14px
33
+ $font-size-md: 1rem; // 16px (base)
34
+ $font-size-lg: 1.25rem; // 20px
35
+ $font-size-xl: 1.5rem; // 24px
36
+ $font-size-2xl: 1.75rem; // 28px
37
+ $font-size-3xl: 2rem; // 32px
38
+ $font-size-4xl: 2.5rem; // 40px
39
+
40
+ // Typography - Tight line heights (for compact UI elements)
41
+ $leading-tight-xs: $row;
42
+ $leading-tight-sm: $row;
43
+ $leading-tight-md: $unit * 3;
44
+ $leading-tight-lg: $unit * 3;
45
+
46
+ // Typography - Line heights (for body text)
47
+ $leading-xs: $row;
48
+ $leading-sm: $unit * 3;
49
+ $leading-md: $unit * 3;
50
+ $leading-lg: $row-2;
51
+ $leading-xl: $row-2;
52
+ $leading-2xl: $row-2;
53
+ $leading-3xl: $unit * 5;
54
+ $leading-4xl: $unit * 6;
55
+
56
+ // Typography - Font weights
57
+ $weight-normal: 400;
58
+ $weight-medium: 500;
59
+ $weight-semibold: 600;
60
+ $weight-bold: 700;
61
+
62
+ // Typography - Letter spacing
63
+ $tracking-display: -0.02em;
64
+ $tracking-body: 0;
65
+ $tracking-caps: 0.08em;
66
+
67
+
68
+ // Radius - derived from $unit (0.5rem = 8px)
69
+ $radius-sm: $unit * 0.5; // 4px
70
+ $radius-md: $unit; // 8px
71
+ $radius-lg: $unit * 2; // 16px
72
+ $radius-full: 9999px;
73
+
74
+ // Borders - derived from $unit (0.5rem = 8px)
75
+ $border-width-sm: $unit * 0.125; // 1px
76
+ $border-width-md: $unit * 0.25; // 2px
77
+ $border-width-lg: $unit * 0.5; // 4px
78
+
79
+ // Color primitives
80
+ $hue-primary: 220;
81
+ $hue-success: 142;
82
+ $hue-warning: 38;
83
+ $hue-danger: 0;
84
+
85
+ $color-neutral-50: hsl($hue-primary 10% 98%);
86
+ $color-neutral-100: hsl($hue-primary 10% 96%);
87
+ $color-neutral-200: hsl($hue-primary 10% 90%);
88
+ $color-neutral-300: hsl($hue-primary 10% 80%);
89
+ $color-neutral-400: hsl($hue-primary 10% 60%);
90
+ $color-neutral-500: hsl($hue-primary 10% 45%);
91
+ $color-neutral-600: hsl($hue-primary 10% 35%);
92
+ $color-neutral-700: hsl($hue-primary 10% 25%);
93
+ $color-neutral-800: hsl($hue-primary 10% 15%);
94
+ $color-neutral-900: hsl($hue-primary 10% 10%);
95
+
96
+ $color-primary-light: hsl($hue-primary 85% 65%);
97
+ $color-primary: hsl($hue-primary 85% 50%);
98
+ $color-primary-dark: hsl($hue-primary 85% 40%);
99
+
100
+ $color-success: hsl($hue-success 70% 45%);
101
+ $color-warning: hsl($hue-warning 90% 50%);
102
+ $color-danger: hsl($hue-danger 70% 50%);
103
+ $color-danger-dark: hsl($hue-danger 70% 40%);
104
+
105
+ // Semantic colors (light theme defaults)
106
+ $color-text: $color-neutral-900;
107
+ $color-text-muted: $color-neutral-500;
108
+ $color-text-inverse: $color-neutral-50;
109
+
110
+ $color-bg: $color-neutral-50;
111
+ $color-bg-subtle: $color-neutral-100;
112
+ $color-bg-muted: $color-neutral-200;
113
+
114
+ $color-border: $color-neutral-200;
115
+ $color-border-strong: $color-neutral-300;
116
+
117
+ $color-interactive: $color-primary;
118
+ $color-interactive-hover: $color-primary-dark;
119
+
120
+ $color-focus: $color-primary-light;
@@ -0,0 +1,6 @@
1
+ :root {
2
+ // Border widths - derived from unit (8px)
3
+ --ui-border-width-sm: calc(var(--unit) * 0.125); // 1px
4
+ --ui-border-width-md: calc(var(--unit) * 0.25); // 2px
5
+ --ui-border-width-lg: calc(var(--unit) * 0.5); // 4px
6
+ }
@@ -0,0 +1,168 @@
1
+ {
2
+ "id": "colors",
3
+ "type": "token",
4
+ "title": "Colors",
5
+ "description": "HSL-based color system with primitive and semantic tokens. Semantic tokens adapt to light/dark themes.",
6
+ "skipValidation": true,
7
+ "sections": [
8
+ {
9
+ "title": "Text Colors",
10
+ "description": "Use for typography and icons.",
11
+ "examples": [
12
+ {
13
+ "layout": "stack",
14
+ "items": [
15
+ {
16
+ "tag": "p",
17
+ "style": { "color": "var(--ui-color-text)" },
18
+ "text": "--ui-color-text: Default text"
19
+ },
20
+ {
21
+ "tag": "p",
22
+ "style": { "color": "var(--ui-color-text-muted)" },
23
+ "text": "--ui-color-text-muted: Secondary text, captions"
24
+ },
25
+ {
26
+ "tag": "p",
27
+ "class": "ui-p-1",
28
+ "style": {
29
+ "color": "var(--ui-color-text-inverse)",
30
+ "background": "var(--ui-color-neutral-900)",
31
+ "border-radius": "var(--ui-radius-sm)"
32
+ },
33
+ "text": "--ui-color-text-inverse: Text on dark backgrounds"
34
+ }
35
+ ]
36
+ }
37
+ ]
38
+ },
39
+ {
40
+ "title": "Background Colors",
41
+ "description": "Use for surfaces, cards, and containers.",
42
+ "examples": [
43
+ {
44
+ "layout": "stack",
45
+ "items": [
46
+ {
47
+ "tag": "div",
48
+ "class": "ui-p-2",
49
+ "style": {
50
+ "background": "var(--ui-color-bg)",
51
+ "border": "1px solid var(--ui-color-border)",
52
+ "border-radius": "var(--ui-radius-md)"
53
+ },
54
+ "text": "--ui-color-bg: Base background"
55
+ },
56
+ {
57
+ "tag": "div",
58
+ "class": "ui-p-2",
59
+ "style": {
60
+ "background": "var(--ui-color-bg-subtle)",
61
+ "border-radius": "var(--ui-radius-md)"
62
+ },
63
+ "text": "--ui-color-bg-subtle: Subtle emphasis"
64
+ },
65
+ {
66
+ "tag": "div",
67
+ "class": "ui-p-2",
68
+ "style": {
69
+ "background": "var(--ui-color-bg-muted)",
70
+ "border-radius": "var(--ui-radius-md)"
71
+ },
72
+ "text": "--ui-color-bg-muted: Stronger emphasis, code blocks"
73
+ }
74
+ ]
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ "title": "Border Colors",
80
+ "description": "Use for dividers, inputs, and card borders.",
81
+ "examples": [
82
+ {
83
+ "layout": "stack",
84
+ "items": [
85
+ {
86
+ "tag": "div",
87
+ "class": "ui-p-2",
88
+ "style": {
89
+ "border": "2px solid var(--ui-color-border)",
90
+ "border-radius": "var(--ui-radius-md)"
91
+ },
92
+ "text": "--ui-color-border: Default borders"
93
+ },
94
+ {
95
+ "tag": "div",
96
+ "class": "ui-p-2",
97
+ "style": {
98
+ "border": "2px solid var(--ui-color-border-strong)",
99
+ "border-radius": "var(--ui-radius-md)"
100
+ },
101
+ "text": "--ui-color-border-strong: Emphasized borders"
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ "title": "Interactive Colors",
109
+ "description": "Use for links, buttons, and interactive elements.",
110
+ "examples": [
111
+ {
112
+ "layout": "stack",
113
+ "items": [
114
+ {
115
+ "tag": "p",
116
+ "style": { "color": "var(--ui-color-interactive)" },
117
+ "text": "--ui-color-interactive: Links, primary actions"
118
+ },
119
+ {
120
+ "tag": "p",
121
+ "style": { "color": "var(--ui-color-interactive-hover)" },
122
+ "text": "--ui-color-interactive-hover: Hover state"
123
+ },
124
+ {
125
+ "tag": "div",
126
+ "class": "ui-p-1",
127
+ "style": {
128
+ "display": "inline-block",
129
+ "outline": "3px solid var(--ui-color-focus)",
130
+ "outline-offset": "2px",
131
+ "border-radius": "var(--ui-radius-sm)"
132
+ },
133
+ "text": "--ui-color-focus: Focus rings"
134
+ }
135
+ ]
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "title": "Status Colors",
141
+ "description": "Use for feedback, alerts, and validation.",
142
+ "examples": [
143
+ {
144
+ "html": "<div class=\"ui-cluster ui-cluster--sm\"><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-success); border-radius: var(--ui-radius-sm)\"></div><span>--ui-color-success</span></div><div class=\"ui-cluster ui-cluster--sm\"><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-warning); border-radius: var(--ui-radius-sm)\"></div><span>--ui-color-warning</span></div><div class=\"ui-cluster ui-cluster--sm\"><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-danger); border-radius: var(--ui-radius-sm)\"></div><span>--ui-color-danger</span></div>"
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ "title": "Primary Scale",
150
+ "description": "Brand color with light and dark variants.",
151
+ "examples": [
152
+ {
153
+ "html": "<div class=\"ui-cluster ui-cluster--sm\"><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-primary-light); border-radius: var(--ui-radius-sm)\"></div><span>--ui-color-primary-light</span></div><div class=\"ui-cluster ui-cluster--sm\"><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-primary); border-radius: var(--ui-radius-sm)\"></div><span>--ui-color-primary</span></div><div class=\"ui-cluster ui-cluster--sm\"><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-primary-dark); border-radius: var(--ui-radius-sm)\"></div><span>--ui-color-primary-dark</span></div>"
154
+ }
155
+ ]
156
+ },
157
+ {
158
+ "title": "Neutral Scale",
159
+ "description": "Gray scale for text, backgrounds, and borders. Derived from primary hue for subtle warmth.",
160
+ "examples": [
161
+ {
162
+ "html": "<div class=\"ui-cluster ui-cluster--sm\" style=\"flex-wrap: wrap\"><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-neutral-50); border: 1px solid var(--ui-color-border); border-radius: var(--ui-radius-sm)\"></div><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-neutral-100); border-radius: var(--ui-radius-sm)\"></div><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-neutral-200); border-radius: var(--ui-radius-sm)\"></div><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-neutral-300); border-radius: var(--ui-radius-sm)\"></div><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-neutral-400); border-radius: var(--ui-radius-sm)\"></div><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-neutral-500); border-radius: var(--ui-radius-sm)\"></div><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-neutral-600); border-radius: var(--ui-radius-sm)\"></div><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-neutral-700); border-radius: var(--ui-radius-sm)\"></div><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-neutral-800); border-radius: var(--ui-radius-sm)\"></div><div style=\"width: var(--ui-space-4); height: var(--ui-row-2); background: var(--ui-color-neutral-900); border-radius: var(--ui-radius-sm)\"></div></div>",
163
+ "code": "50 → 100 → 200 → 300 → 400 → 500 → 600 → 700 → 800 → 900"
164
+ }
165
+ ]
166
+ }
167
+ ]
168
+ }
@@ -0,0 +1,25 @@
1
+ :root {
2
+ --ui-hue-primary: 220;
3
+ --ui-hue-success: 142;
4
+ --ui-hue-warning: 38;
5
+ --ui-hue-danger: 0;
6
+
7
+ --ui-color-neutral-50: hsl(var(--ui-hue-primary) 10% 98%);
8
+ --ui-color-neutral-100: hsl(var(--ui-hue-primary) 10% 96%);
9
+ --ui-color-neutral-200: hsl(var(--ui-hue-primary) 10% 90%);
10
+ --ui-color-neutral-300: hsl(var(--ui-hue-primary) 10% 80%);
11
+ --ui-color-neutral-400: hsl(var(--ui-hue-primary) 10% 60%);
12
+ --ui-color-neutral-500: hsl(var(--ui-hue-primary) 10% 45%);
13
+ --ui-color-neutral-600: hsl(var(--ui-hue-primary) 10% 35%);
14
+ --ui-color-neutral-700: hsl(var(--ui-hue-primary) 10% 25%);
15
+ --ui-color-neutral-800: hsl(var(--ui-hue-primary) 10% 15%);
16
+ --ui-color-neutral-900: hsl(var(--ui-hue-primary) 10% 10%);
17
+
18
+ --ui-color-primary-light: hsl(var(--ui-hue-primary) 85% 65%);
19
+ --ui-color-primary: hsl(var(--ui-hue-primary) 85% 50%);
20
+ --ui-color-primary-dark: hsl(var(--ui-hue-primary) 85% 40%);
21
+
22
+ --ui-color-success: hsl(var(--ui-hue-success) 70% 45%);
23
+ --ui-color-warning: hsl(var(--ui-hue-warning) 90% 50%);
24
+ --ui-color-danger: hsl(var(--ui-hue-danger) 70% 50%);
25
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "id": "grid",
3
+ "type": "token",
4
+ "title": "Grid System",
5
+ "description": "All spacing and heights align to the 8px grid.",
6
+ "skipValidation": true,
7
+ "sections": [
8
+ {
9
+ "examples": [
10
+ {
11
+ "layout": "stack",
12
+ "items": [
13
+ {
14
+ "tag": "div",
15
+ "text": "row-1 (16px)",
16
+ "style": {
17
+ "background": "var(--ui-color-primary)",
18
+ "color": "var(--ui-color-text-inverse)",
19
+ "height": "var(--ui-row-1)",
20
+ "display": "flex",
21
+ "align-items": "center",
22
+ "padding": "0 var(--ui-space-2)"
23
+ }
24
+ },
25
+ {
26
+ "tag": "div",
27
+ "text": "row-2 (32px)",
28
+ "style": {
29
+ "background": "var(--ui-color-primary)",
30
+ "color": "var(--ui-color-text-inverse)",
31
+ "height": "var(--ui-row-2)",
32
+ "display": "flex",
33
+ "align-items": "center",
34
+ "padding": "0 var(--ui-space-2)"
35
+ }
36
+ },
37
+ {
38
+ "tag": "div",
39
+ "text": "row-3 (48px)",
40
+ "style": {
41
+ "background": "var(--ui-color-primary)",
42
+ "color": "var(--ui-color-text-inverse)",
43
+ "height": "var(--ui-row-3)",
44
+ "display": "flex",
45
+ "align-items": "center",
46
+ "padding": "0 var(--ui-space-2)"
47
+ }
48
+ }
49
+ ]
50
+ }
51
+ ]
52
+ }
53
+ ]
54
+ }
@@ -0,0 +1,11 @@
1
+ :root {
2
+ --unit: 8px; /* 8px */
3
+ --ui-row: calc(var(--unit) * 2);
4
+
5
+ --ui-row-1: var(--ui-row);
6
+ --ui-row-2: calc(var(--ui-row) * 2);
7
+ --ui-row-3: calc(var(--ui-row) * 3);
8
+ --ui-row-4: calc(var(--ui-row) * 4);
9
+ --ui-row-5: calc(var(--ui-row) * 5);
10
+ --ui-row-6: calc(var(--ui-row) * 6);
11
+ }
@@ -0,0 +1,15 @@
1
+ // Design tokens - colors, spacing, typography, grid, etc.
2
+ @use './colors/index' as *;
3
+ @use './spacing/index' as *;
4
+ @use './typography/index' as *;
5
+ @use './grid/index' as *;
6
+ @use './radius/index' as *;
7
+ @use './borders/index' as *;
8
+ @use './shadows/index' as *;
9
+ @use './zindex/index' as *;
10
+ @use './motion/index' as *;
11
+ @use './semantic/colors/index' as *;
12
+ @use './semantic/spacing/index' as *;
13
+
14
+ // Component tokens
15
+ @use './input' as *;
@@ -0,0 +1,14 @@
1
+ :root {
2
+ --ui-input-height: var(--ui-row-2);
3
+ --ui-input-padding-x: var(--ui-space-2);
4
+ --ui-input-padding-y: var(--ui-space-1);
5
+
6
+ --ui-input-radius: var(--ui-radius-md);
7
+ --ui-input-border-width: var(--ui-border-width-sm);
8
+
9
+ --ui-input-bg: var(--ui-color-bg);
10
+ --ui-input-border: var(--ui-color-border);
11
+ --ui-input-border-focus: var(--ui-color-interactive);
12
+ --ui-input-text: var(--ui-color-text);
13
+ --ui-input-placeholder: var(--ui-color-text-muted);
14
+ }
@@ -0,0 +1,25 @@
1
+ @layer tokens {
2
+ :root {
3
+ // Duration scale
4
+ --ui-duration-instant: 50ms;
5
+ --ui-duration-fast: 100ms;
6
+ --ui-duration-base: 150ms;
7
+ --ui-duration-slow: 250ms;
8
+ --ui-duration-slower: 400ms;
9
+
10
+ // Easing functions
11
+ --ui-ease-default: cubic-bezier(0.4, 0, 0.2, 1);
12
+ --ui-ease-in: cubic-bezier(0.4, 0, 1, 1);
13
+ --ui-ease-out: cubic-bezier(0, 0, 0.2, 1);
14
+ --ui-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
15
+
16
+ // Prefers reduced motion
17
+ @media (prefers-reduced-motion: reduce) {
18
+ --ui-duration-instant: 0ms;
19
+ --ui-duration-fast: 0ms;
20
+ --ui-duration-base: 0ms;
21
+ --ui-duration-slow: 0ms;
22
+ --ui-duration-slower: 0ms;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,7 @@
1
+ :root {
2
+ // Radius - derived from --unit (8px)
3
+ --ui-radius-sm: calc(var(--unit) * 0.5); // 4px
4
+ --ui-radius-md: var(--unit); // 8px
5
+ --ui-radius-lg: calc(var(--unit) * 2); // 16px
6
+ --ui-radius-full: 9999px;
7
+ }
@@ -0,0 +1,30 @@
1
+ :root {
2
+ --ui-color-text: var(--ui-color-neutral-900);
3
+ --ui-color-text-muted: var(--ui-color-neutral-500);
4
+ --ui-color-text-inverse: var(--ui-color-neutral-50);
5
+
6
+ --ui-color-bg: var(--ui-color-neutral-50);
7
+ --ui-color-bg-subtle: var(--ui-color-neutral-100);
8
+ --ui-color-bg-muted: var(--ui-color-neutral-200);
9
+
10
+ --ui-color-border: var(--ui-color-neutral-200);
11
+ --ui-color-border-strong: var(--ui-color-neutral-300);
12
+
13
+ --ui-color-interactive: var(--ui-color-primary);
14
+ --ui-color-interactive-hover: var(--ui-color-primary-dark);
15
+
16
+ --ui-color-focus: var(--ui-color-primary-light);
17
+ }
18
+
19
+ [data-theme="dark"] {
20
+ --ui-color-text: var(--ui-color-neutral-100);
21
+ --ui-color-text-muted: var(--ui-color-neutral-400);
22
+ --ui-color-text-inverse: var(--ui-color-neutral-900);
23
+
24
+ --ui-color-bg: var(--ui-color-neutral-900);
25
+ --ui-color-bg-subtle: var(--ui-color-neutral-800);
26
+ --ui-color-bg-muted: var(--ui-color-neutral-700);
27
+
28
+ --ui-color-border: var(--ui-color-neutral-700);
29
+ --ui-color-border-strong: var(--ui-color-neutral-600);
30
+ }
@@ -0,0 +1,10 @@
1
+ :root {
2
+ --spacing-xs: var(--ui-space-1);
3
+ --spacing-sm: var(--ui-space-2);
4
+ --spacing-md: var(--ui-space-4);
5
+ --spacing-lg: var(--ui-space-6);
6
+ --spacing-xl: var(--ui-space-8);
7
+
8
+ --spacing-gutter: var(--ui-space-4);
9
+ --spacing-section: var(--ui-space-8);
10
+ }
@@ -0,0 +1,5 @@
1
+ :root {
2
+ --shadow-sm: 0 1px 2px hsl(var(--ui-hue-primary) 10% 20% / 0.05);
3
+ --shadow-md: 0 4px 6px hsl(var(--ui-hue-primary) 10% 20% / 0.1);
4
+ --shadow-lg: 0 10px 15px hsl(var(--ui-hue-primary) 10% 20% / 0.15);
5
+ }
@@ -0,0 +1,15 @@
1
+ :root {
2
+ // Micro spacing
3
+ --ui-space-px: calc(var(--unit) * 0.125); // 1px
4
+ --ui-space-quarter: calc(var(--unit) * 0.25); // 2px
5
+ --ui-space-half: calc(var(--unit) * 0.5); // 4px
6
+ --ui-space-0: calc(var(--unit) * 0.5); // 4px (alias)
7
+
8
+ // Standard spacing
9
+ --ui-space-1: var(--unit); // 8px
10
+ --ui-space-2: calc(var(--unit) * 2); // 16px
11
+ --ui-space-3: calc(var(--unit) * 3); // 24px
12
+ --ui-space-4: calc(var(--unit) * 4); // 32px
13
+ --ui-space-6: calc(var(--unit) * 6); // 48px
14
+ --ui-space-8: calc(var(--unit) * 8); // 64px
15
+ }