@eylulg/ui 0.0.0-stage → 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 (367) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +328 -2
  3. package/dist/chrome/Anchor.d.ts +3 -0
  4. package/dist/chrome/Anchor.js +14 -0
  5. package/dist/chrome/Anchor.js.map +1 -0
  6. package/dist/chrome/AppShell.d.ts +28 -0
  7. package/dist/chrome/AppShell.js +57 -0
  8. package/dist/chrome/AppShell.js.map +1 -0
  9. package/dist/chrome/BrandLogo.d.ts +13 -0
  10. package/dist/chrome/BrandLogo.js +33 -0
  11. package/dist/chrome/BrandLogo.js.map +1 -0
  12. package/dist/chrome/BrandMark.d.ts +12 -0
  13. package/dist/chrome/BrandMark.js +40 -0
  14. package/dist/chrome/BrandMark.js.map +1 -0
  15. package/dist/chrome/LinkRouter.d.ts +19 -0
  16. package/dist/chrome/LinkRouter.js +28 -0
  17. package/dist/chrome/LinkRouter.js.map +1 -0
  18. package/dist/chrome/MobileMenu.d.ts +19 -0
  19. package/dist/chrome/MobileMenu.js +52 -0
  20. package/dist/chrome/MobileMenu.js.map +1 -0
  21. package/dist/chrome/ProjectSwitcher.d.ts +30 -0
  22. package/dist/chrome/ProjectSwitcher.js +64 -0
  23. package/dist/chrome/ProjectSwitcher.js.map +1 -0
  24. package/dist/chrome/ProjectSwitcherMenu.d.ts +13 -0
  25. package/dist/chrome/ProjectSwitcherMenu.js +50 -0
  26. package/dist/chrome/ProjectSwitcherMenu.js.map +1 -0
  27. package/dist/chrome/SidebarNav.d.ts +34 -0
  28. package/dist/chrome/SidebarNav.js +106 -0
  29. package/dist/chrome/SidebarNav.js.map +1 -0
  30. package/dist/chrome/SiteFooter.d.ts +31 -0
  31. package/dist/chrome/SiteFooter.js +85 -0
  32. package/dist/chrome/SiteFooter.js.map +1 -0
  33. package/dist/chrome/TextSizeToggle.d.ts +11 -0
  34. package/dist/chrome/TextSizeToggle.js +38 -0
  35. package/dist/chrome/TextSizeToggle.js.map +1 -0
  36. package/dist/chrome/ThemeToggle.d.ts +26 -0
  37. package/dist/chrome/ThemeToggle.js +100 -0
  38. package/dist/chrome/ThemeToggle.js.map +1 -0
  39. package/dist/chrome/ThemeToggleMenu.d.ts +16 -0
  40. package/dist/chrome/ThemeToggleMenu.js +42 -0
  41. package/dist/chrome/ThemeToggleMenu.js.map +1 -0
  42. package/dist/chrome/TopNav.d.ts +42 -0
  43. package/dist/chrome/TopNav.js +117 -0
  44. package/dist/chrome/TopNav.js.map +1 -0
  45. package/dist/chrome/brandLogoPath.d.ts +2 -0
  46. package/dist/chrome/brandLogoPath.js +7 -0
  47. package/dist/chrome/brandLogoPath.js.map +1 -0
  48. package/dist/chrome/index.d.ts +28 -0
  49. package/dist/chrome/index.js +15 -0
  50. package/dist/chrome/projects.d.ts +28 -0
  51. package/dist/chrome/projects.js +107 -0
  52. package/dist/chrome/projects.js.map +1 -0
  53. package/dist/chrome/themeChoices.d.ts +6 -0
  54. package/dist/chrome/themeChoices.js +18 -0
  55. package/dist/chrome/themeChoices.js.map +1 -0
  56. package/dist/chrome/themeScript.d.ts +16 -0
  57. package/dist/chrome/themeScript.js +20 -0
  58. package/dist/chrome/themeScript.js.map +1 -0
  59. package/dist/chrome/types.d.ts +17 -0
  60. package/dist/chrome/useTextSize.d.ts +16 -0
  61. package/dist/chrome/useTextSize.js +64 -0
  62. package/dist/chrome/useTextSize.js.map +1 -0
  63. package/dist/chrome/useTheme.d.ts +19 -0
  64. package/dist/chrome/useTheme.js +86 -0
  65. package/dist/chrome/useTheme.js.map +1 -0
  66. package/dist/components/Avatar/Avatar.d.ts +39 -0
  67. package/dist/components/Avatar/Avatar.js +122 -0
  68. package/dist/components/Avatar/Avatar.js.map +1 -0
  69. package/dist/components/Avatar/index.d.ts +2 -0
  70. package/dist/components/Avatar/index.js +2 -0
  71. package/dist/components/Badge/Badge.d.ts +19 -0
  72. package/dist/components/Badge/Badge.js +77 -0
  73. package/dist/components/Badge/Badge.js.map +1 -0
  74. package/dist/components/Badge/index.d.ts +2 -0
  75. package/dist/components/Badge/index.js +2 -0
  76. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +18 -0
  77. package/dist/components/Breadcrumbs/Breadcrumbs.js +40 -0
  78. package/dist/components/Breadcrumbs/Breadcrumbs.js.map +1 -0
  79. package/dist/components/Breadcrumbs/index.d.ts +2 -0
  80. package/dist/components/Breadcrumbs/index.js +2 -0
  81. package/dist/components/Button/Button.d.ts +39 -0
  82. package/dist/components/Button/Button.js +73 -0
  83. package/dist/components/Button/Button.js.map +1 -0
  84. package/dist/components/Button/buttonStyles.d.ts +21 -0
  85. package/dist/components/Button/buttonStyles.js +32 -0
  86. package/dist/components/Button/buttonStyles.js.map +1 -0
  87. package/dist/components/Button/index.d.ts +2 -0
  88. package/dist/components/Button/index.js +4 -0
  89. package/dist/components/Card/Card.d.ts +47 -0
  90. package/dist/components/Card/Card.js +119 -0
  91. package/dist/components/Card/Card.js.map +1 -0
  92. package/dist/components/Card/index.d.ts +2 -0
  93. package/dist/components/Card/index.js +2 -0
  94. package/dist/components/Chart/BarChart.d.ts +24 -0
  95. package/dist/components/Chart/BarChart.js +327 -0
  96. package/dist/components/Chart/BarChart.js.map +1 -0
  97. package/dist/components/Chart/ChartFrame.d.ts +27 -0
  98. package/dist/components/Chart/ChartFrame.js +80 -0
  99. package/dist/components/Chart/ChartFrame.js.map +1 -0
  100. package/dist/components/Chart/ChartLegend.d.ts +28 -0
  101. package/dist/components/Chart/ChartLegend.js +53 -0
  102. package/dist/components/Chart/ChartLegend.js.map +1 -0
  103. package/dist/components/Chart/ChartTable.d.ts +11 -0
  104. package/dist/components/Chart/ChartTable.js +48 -0
  105. package/dist/components/Chart/ChartTable.js.map +1 -0
  106. package/dist/components/Chart/ChartTooltip.d.ts +33 -0
  107. package/dist/components/Chart/ChartTooltip.js +56 -0
  108. package/dist/components/Chart/ChartTooltip.js.map +1 -0
  109. package/dist/components/Chart/HeatGrid.d.ts +50 -0
  110. package/dist/components/Chart/HeatGrid.js +256 -0
  111. package/dist/components/Chart/HeatGrid.js.map +1 -0
  112. package/dist/components/Chart/LineChart.d.ts +23 -0
  113. package/dist/components/Chart/LineChart.js +248 -0
  114. package/dist/components/Chart/LineChart.js.map +1 -0
  115. package/dist/components/Chart/format.d.ts +24 -0
  116. package/dist/components/Chart/format.js +134 -0
  117. package/dist/components/Chart/format.js.map +1 -0
  118. package/dist/components/Chart/geometry.d.ts +11 -0
  119. package/dist/components/Chart/geometry.js +69 -0
  120. package/dist/components/Chart/geometry.js.map +1 -0
  121. package/dist/components/Chart/index.d.ts +9 -0
  122. package/dist/components/Chart/index.js +6 -0
  123. package/dist/components/Chart/interaction.d.ts +43 -0
  124. package/dist/components/Chart/interaction.js +106 -0
  125. package/dist/components/Chart/interaction.js.map +1 -0
  126. package/dist/components/Chart/labels.d.ts +3 -0
  127. package/dist/components/Chart/labels.js +23 -0
  128. package/dist/components/Chart/labels.js.map +1 -0
  129. package/dist/components/Chart/scale.d.ts +15 -0
  130. package/dist/components/Chart/scale.js +54 -0
  131. package/dist/components/Chart/scale.js.map +1 -0
  132. package/dist/components/Chart/series.d.ts +14 -0
  133. package/dist/components/Chart/series.js +72 -0
  134. package/dist/components/Chart/series.js.map +1 -0
  135. package/dist/components/Chart/summary.d.ts +8 -0
  136. package/dist/components/Chart/summary.js +56 -0
  137. package/dist/components/Chart/summary.js.map +1 -0
  138. package/dist/components/Chart/types.d.ts +50 -0
  139. package/dist/components/Chart/useElementWidth.d.ts +6 -0
  140. package/dist/components/Chart/useElementWidth.js +25 -0
  141. package/dist/components/Chart/useElementWidth.js.map +1 -0
  142. package/dist/components/Checkbox/Checkbox.d.ts +9 -0
  143. package/dist/components/Checkbox/Checkbox.js +36 -0
  144. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  145. package/dist/components/Checkbox/index.d.ts +2 -0
  146. package/dist/components/Checkbox/index.js +2 -0
  147. package/dist/components/CodeBlock/CodeBlock.d.ts +22 -0
  148. package/dist/components/CodeBlock/CodeBlock.js +56 -0
  149. package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
  150. package/dist/components/CodeBlock/index.d.ts +2 -0
  151. package/dist/components/CodeBlock/index.js +2 -0
  152. package/dist/components/Combobox/Combobox.d.ts +34 -0
  153. package/dist/components/Combobox/Combobox.js +106 -0
  154. package/dist/components/Combobox/Combobox.js.map +1 -0
  155. package/dist/components/Combobox/index.d.ts +2 -0
  156. package/dist/components/Combobox/index.js +2 -0
  157. package/dist/components/CommandPalette/CommandPalette.d.ts +74 -0
  158. package/dist/components/CommandPalette/CommandPalette.js +51 -0
  159. package/dist/components/CommandPalette/CommandPalette.js.map +1 -0
  160. package/dist/components/CommandPalette/CommandPaletteOverlay.d.ts +11 -0
  161. package/dist/components/CommandPalette/CommandPaletteOverlay.js +180 -0
  162. package/dist/components/CommandPalette/CommandPaletteOverlay.js.map +1 -0
  163. package/dist/components/CommandPalette/index.d.ts +2 -0
  164. package/dist/components/CommandPalette/index.js +2 -0
  165. package/dist/components/DatePicker/DatePicker.d.ts +25 -0
  166. package/dist/components/DatePicker/DatePicker.js +142 -0
  167. package/dist/components/DatePicker/DatePicker.js.map +1 -0
  168. package/dist/components/DatePicker/index.d.ts +2 -0
  169. package/dist/components/DatePicker/index.js +2 -0
  170. package/dist/components/Dialog/Dialog.d.ts +37 -0
  171. package/dist/components/Dialog/Dialog.js +33 -0
  172. package/dist/components/Dialog/Dialog.js.map +1 -0
  173. package/dist/components/Dialog/DialogOverlay.d.ts +3 -0
  174. package/dist/components/Dialog/DialogOverlay.js +72 -0
  175. package/dist/components/Dialog/DialogOverlay.js.map +1 -0
  176. package/dist/components/Dialog/index.d.ts +2 -0
  177. package/dist/components/Dialog/index.js +2 -0
  178. package/dist/components/Drawer/Drawer.d.ts +36 -0
  179. package/dist/components/Drawer/Drawer.js +33 -0
  180. package/dist/components/Drawer/Drawer.js.map +1 -0
  181. package/dist/components/Drawer/DrawerOverlay.d.ts +3 -0
  182. package/dist/components/Drawer/DrawerOverlay.js +71 -0
  183. package/dist/components/Drawer/DrawerOverlay.js.map +1 -0
  184. package/dist/components/Drawer/index.d.ts +2 -0
  185. package/dist/components/Drawer/index.js +2 -0
  186. package/dist/components/DropdownMenu/DropdownMenu.d.ts +49 -0
  187. package/dist/components/DropdownMenu/DropdownMenu.js +52 -0
  188. package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
  189. package/dist/components/DropdownMenu/DropdownMenuParts.d.ts +6 -0
  190. package/dist/components/DropdownMenu/DropdownMenuParts.js +76 -0
  191. package/dist/components/DropdownMenu/DropdownMenuParts.js.map +1 -0
  192. package/dist/components/DropdownMenu/index.d.ts +2 -0
  193. package/dist/components/DropdownMenu/index.js +2 -0
  194. package/dist/components/EmptyState/EmptyState.d.ts +19 -0
  195. package/dist/components/EmptyState/EmptyState.js +51 -0
  196. package/dist/components/EmptyState/EmptyState.js.map +1 -0
  197. package/dist/components/EmptyState/index.d.ts +2 -0
  198. package/dist/components/EmptyState/index.js +2 -0
  199. package/dist/components/FileDropZone/FileDropZone.d.ts +41 -0
  200. package/dist/components/FileDropZone/FileDropZone.js +94 -0
  201. package/dist/components/FileDropZone/FileDropZone.js.map +1 -0
  202. package/dist/components/FileDropZone/index.d.ts +2 -0
  203. package/dist/components/FileDropZone/index.js +2 -0
  204. package/dist/components/IconButton/IconButton.d.ts +17 -0
  205. package/dist/components/IconButton/IconButton.js +37 -0
  206. package/dist/components/IconButton/IconButton.js.map +1 -0
  207. package/dist/components/IconButton/index.d.ts +2 -0
  208. package/dist/components/IconButton/index.js +2 -0
  209. package/dist/components/Input/Input.d.ts +21 -0
  210. package/dist/components/Input/Input.js +43 -0
  211. package/dist/components/Input/Input.js.map +1 -0
  212. package/dist/components/Input/index.d.ts +2 -0
  213. package/dist/components/Input/index.js +2 -0
  214. package/dist/components/Kbd/Kbd.d.ts +16 -0
  215. package/dist/components/Kbd/Kbd.js +35 -0
  216. package/dist/components/Kbd/Kbd.js.map +1 -0
  217. package/dist/components/Kbd/index.d.ts +2 -0
  218. package/dist/components/Kbd/index.js +2 -0
  219. package/dist/components/PageHeader/PageHeader.d.ts +18 -0
  220. package/dist/components/PageHeader/PageHeader.js +45 -0
  221. package/dist/components/PageHeader/PageHeader.js.map +1 -0
  222. package/dist/components/PageHeader/index.d.ts +2 -0
  223. package/dist/components/PageHeader/index.js +2 -0
  224. package/dist/components/Pagination/Pagination.d.ts +32 -0
  225. package/dist/components/Pagination/Pagination.js +124 -0
  226. package/dist/components/Pagination/Pagination.js.map +1 -0
  227. package/dist/components/Pagination/index.d.ts +2 -0
  228. package/dist/components/Pagination/index.js +2 -0
  229. package/dist/components/Popover/Popover.d.ts +27 -0
  230. package/dist/components/Popover/Popover.js +33 -0
  231. package/dist/components/Popover/Popover.js.map +1 -0
  232. package/dist/components/Popover/PopoverOverlay.d.ts +3 -0
  233. package/dist/components/Popover/PopoverOverlay.js +39 -0
  234. package/dist/components/Popover/PopoverOverlay.js.map +1 -0
  235. package/dist/components/Popover/index.d.ts +2 -0
  236. package/dist/components/Popover/index.js +2 -0
  237. package/dist/components/ProgressBar/ProgressBar.d.ts +19 -0
  238. package/dist/components/ProgressBar/ProgressBar.js +52 -0
  239. package/dist/components/ProgressBar/ProgressBar.js.map +1 -0
  240. package/dist/components/ProgressBar/index.d.ts +2 -0
  241. package/dist/components/ProgressBar/index.js +2 -0
  242. package/dist/components/RadioGroup/RadioGroup.d.ts +14 -0
  243. package/dist/components/RadioGroup/RadioGroup.js +46 -0
  244. package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
  245. package/dist/components/RadioGroup/index.d.ts +2 -0
  246. package/dist/components/RadioGroup/index.js +2 -0
  247. package/dist/components/SegmentedControl/SegmentedControl.d.ts +32 -0
  248. package/dist/components/SegmentedControl/SegmentedControl.js +55 -0
  249. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -0
  250. package/dist/components/SegmentedControl/index.d.ts +2 -0
  251. package/dist/components/SegmentedControl/index.js +2 -0
  252. package/dist/components/Select/Select.d.ts +28 -0
  253. package/dist/components/Select/Select.js +64 -0
  254. package/dist/components/Select/Select.js.map +1 -0
  255. package/dist/components/Select/index.d.ts +2 -0
  256. package/dist/components/Select/index.js +2 -0
  257. package/dist/components/Skeleton/Skeleton.d.ts +13 -0
  258. package/dist/components/Skeleton/Skeleton.js +33 -0
  259. package/dist/components/Skeleton/Skeleton.js.map +1 -0
  260. package/dist/components/Skeleton/index.d.ts +2 -0
  261. package/dist/components/Skeleton/index.js +2 -0
  262. package/dist/components/Spinner/Spinner.d.ts +12 -0
  263. package/dist/components/Spinner/Spinner.js +29 -0
  264. package/dist/components/Spinner/Spinner.js.map +1 -0
  265. package/dist/components/Spinner/index.d.ts +2 -0
  266. package/dist/components/Spinner/index.js +2 -0
  267. package/dist/components/Stat/Stat.d.ts +49 -0
  268. package/dist/components/Stat/Stat.js +125 -0
  269. package/dist/components/Stat/Stat.js.map +1 -0
  270. package/dist/components/Stat/index.d.ts +2 -0
  271. package/dist/components/Stat/index.js +2 -0
  272. package/dist/components/Switch/Switch.d.ts +11 -0
  273. package/dist/components/Switch/Switch.js +39 -0
  274. package/dist/components/Switch/Switch.js.map +1 -0
  275. package/dist/components/Switch/index.d.ts +2 -0
  276. package/dist/components/Switch/index.js +2 -0
  277. package/dist/components/Table/Table.d.ts +41 -0
  278. package/dist/components/Table/Table.js +121 -0
  279. package/dist/components/Table/Table.js.map +1 -0
  280. package/dist/components/Table/index.d.ts +2 -0
  281. package/dist/components/Table/index.js +2 -0
  282. package/dist/components/Tabs/Tabs.d.ts +10 -0
  283. package/dist/components/Tabs/Tabs.js +34 -0
  284. package/dist/components/Tabs/Tabs.js.map +1 -0
  285. package/dist/components/Tabs/index.d.ts +2 -0
  286. package/dist/components/Tabs/index.js +2 -0
  287. package/dist/components/Tag/Tag.d.ts +16 -0
  288. package/dist/components/Tag/Tag.js +48 -0
  289. package/dist/components/Tag/Tag.js.map +1 -0
  290. package/dist/components/Tag/index.d.ts +2 -0
  291. package/dist/components/Tag/index.js +2 -0
  292. package/dist/components/Textarea/Textarea.d.ts +28 -0
  293. package/dist/components/Textarea/Textarea.js +30 -0
  294. package/dist/components/Textarea/Textarea.js.map +1 -0
  295. package/dist/components/Textarea/index.d.ts +2 -0
  296. package/dist/components/Textarea/index.js +2 -0
  297. package/dist/components/Toast/Toast.d.ts +52 -0
  298. package/dist/components/Toast/Toast.js +77 -0
  299. package/dist/components/Toast/Toast.js.map +1 -0
  300. package/dist/components/Toast/ToastItem.d.ts +6 -0
  301. package/dist/components/Toast/ToastItem.js +127 -0
  302. package/dist/components/Toast/ToastItem.js.map +1 -0
  303. package/dist/components/Toast/index.d.ts +2 -0
  304. package/dist/components/Toast/index.js +2 -0
  305. package/dist/components/Tooltip/Tooltip.d.ts +17 -0
  306. package/dist/components/Tooltip/Tooltip.js +38 -0
  307. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  308. package/dist/components/Tooltip/TooltipOverlay.d.ts +5 -0
  309. package/dist/components/Tooltip/TooltipOverlay.js +27 -0
  310. package/dist/components/Tooltip/TooltipOverlay.js.map +1 -0
  311. package/dist/components/Tooltip/index.d.ts +2 -0
  312. package/dist/components/Tooltip/index.js +2 -0
  313. package/dist/fonts.css +21 -0
  314. package/dist/index.d.ts +38 -0
  315. package/dist/index.js +43 -0
  316. package/dist/internal/Field.d.ts +13 -0
  317. package/dist/internal/Field.js +29 -0
  318. package/dist/internal/Field.js.map +1 -0
  319. package/dist/internal/LazyDialogTrigger.d.ts +8 -0
  320. package/dist/internal/LazyDialogTrigger.js +15 -0
  321. package/dist/internal/LazyDialogTrigger.js.map +1 -0
  322. package/dist/internal/PreloadOnIntent.d.ts +15 -0
  323. package/dist/internal/PreloadOnIntent.js +26 -0
  324. package/dist/internal/PreloadOnIntent.js.map +1 -0
  325. package/dist/internal/Spinner.d.ts +3 -0
  326. package/dist/internal/Spinner.js +14 -0
  327. package/dist/internal/Spinner.js.map +1 -0
  328. package/dist/internal/focusRing.d.ts +2 -0
  329. package/dist/internal/focusRing.js +7 -0
  330. package/dist/internal/focusRing.js.map +1 -0
  331. package/dist/internal/lazyModule.d.ts +15 -0
  332. package/dist/internal/lazyModule.js +54 -0
  333. package/dist/internal/lazyModule.js.map +1 -0
  334. package/dist/internal/surfaces.d.ts +8 -0
  335. package/dist/internal/surfaces.js +13 -0
  336. package/dist/internal/surfaces.js.map +1 -0
  337. package/dist/internal/types.d.ts +5 -0
  338. package/dist/internal/useLazyMenuTrigger.d.ts +23 -0
  339. package/dist/internal/useLazyMenuTrigger.js +47 -0
  340. package/dist/internal/useLazyMenuTrigger.js.map +1 -0
  341. package/dist/reset.css +52 -0
  342. package/dist/styles/themes/scales.d.ts +2 -0
  343. package/dist/styles/themes/scales.js +132 -0
  344. package/dist/styles/themes/scales.js.map +1 -0
  345. package/dist/styles/themes/variants.d.ts +41 -0
  346. package/dist/styles/themes/variants.js +180 -0
  347. package/dist/styles/themes/variants.js.map +1 -0
  348. package/dist/styles.css +2 -0
  349. package/dist/theme.css +528 -0
  350. package/dist/themes/all.css +158 -0
  351. package/dist/themes/assistant.css +25 -0
  352. package/dist/themes/control-room.css +25 -0
  353. package/dist/themes/plain-language.css +25 -0
  354. package/dist/themes/portfolio.css +25 -0
  355. package/dist/themes/review.css +25 -0
  356. package/dist/themes/sudoku.css +25 -0
  357. package/dist/themes/tokens.css +25 -0
  358. package/dist/themes/watchlist.css +25 -0
  359. package/dist/themes/workspace.css +25 -0
  360. package/dist/tokens.css +351 -0
  361. package/dist/utils/cx.d.ts +23 -0
  362. package/dist/utils/cx.js +25 -0
  363. package/dist/utils/cx.js.map +1 -0
  364. package/dist/utils/cxLite.d.ts +12 -0
  365. package/dist/utils/cxLite.js +23 -0
  366. package/dist/utils/cxLite.js.map +1 -0
  367. package/package.json +304 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Eylül Güneş
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,329 @@
1
- # Temporary Holding Version
1
+ # @eylulg/ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![CI](https://github.com/eylulg/ui/actions/workflows/ci.yml/badge.svg)](https://github.com/eylulg/ui/actions/workflows/ci.yml)
4
+ [![Storybook](https://img.shields.io/badge/storybook-live-ff4785)](https://eylulg.github.io/ui/)
5
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
6
+
7
+ The design system for all of [Eylül Güneş](https://github.com/eylulg)'s projects: an accessible
8
+ React 19 component library, nine project theme variants on one visual language, and the shared
9
+ app chrome (top nav, project switcher, theme toggle, footer) that makes moving between the
10
+ projects feel like one product family.
11
+
12
+ **Live docs:** https://eylulg.github.io/ui/
13
+
14
+ ## Why it is built this way
15
+
16
+ - **React Aria Components for behaviour.** Keyboard navigation, focus management, focus trapping,
17
+ ARIA wiring and screen reader announcements are the hardest parts of a component library to get
18
+ right and the easiest to regress. React Aria has them tested across browsers and assistive
19
+ technology, so this library spends its effort on API design and visuals instead of
20
+ reimplementing them.
21
+ - **Tailwind CSS 4 tokens for theming.** Every colour, radius, shadow and type size is a CSS
22
+ variable declared with `@theme`. Components only reference _semantic_ tokens (`text-primary`,
23
+ `bg-elevated`, `border-control`), which point at primitive scales (`brand`, `gray`, `success`,
24
+ `warning`, `error`). Dark mode and rebranding are a matter of redefining variables, with no
25
+ component changes and no runtime cost.
26
+ - **Small and tree shakeable.** ESM only, one module per source file, `sideEffects` limited to
27
+ CSS, and a dedicated entry point per component. Overlays (menus, dialogs, drawers, popovers, tooltips, the command palette) load on first open, so a route pays for triggers only. A bundle size budget runs in CI; numbers are in [docs/performance.md](./docs/performance.md).
28
+ - **One family, nine variants.** Each project imports one variant file that changes
29
+ colour only: the brand colour and its scale. Scales are generated in oklch with the
30
+ same lightness per step, so contrast is the same in every variant, and a test checks WCAG AA
31
+ for every text token in light and dark.
32
+ - **Accessibility is tested, not assumed.** Tests cover the behaviour this library adds on top of
33
+ React Aria, and every component has an axe audit in both themes. Storybook runs axe on every
34
+ story, including colour contrast.
35
+
36
+ ## Install
37
+
38
+ ```bash
39
+ npm install @eylulg/ui react-aria-components lucide-react
40
+ ```
41
+
42
+ `react`, `react-dom` 19 and `lucide-react` are peer dependencies. The fonts (Inter, Manrope,
43
+ JetBrains Mono) come with the library. Until the package is on npm, install it from a local checkout with
44
+ `npm install ../ui` (a `file:../ui` dependency). The full workflow, including how to keep a single
45
+ copy of React with a linked checkout, with Vite and Next.js examples, is in
46
+ [docs/consuming.md](./docs/consuming.md).
47
+
48
+ ## Usage
49
+
50
+ Pick one styles path. In an app that runs Tailwind 4, import the tokens and a variant into your
51
+ own Tailwind entry so they also become utilities in your markup:
52
+
53
+ ```css
54
+ @import 'tailwindcss';
55
+ @import '@eylulg/ui/theme.css';
56
+ @import '@eylulg/ui/themes/workspace.css';
57
+ @source '../node_modules/@eylulg/ui/dist';
58
+ ```
59
+
60
+ Without Tailwind, import the compiled stylesheet and a variant once, at the root of the app:
61
+
62
+ ```ts
63
+ import '@eylulg/ui/styles.css';
64
+ import '@eylulg/ui/themes/workspace.css';
65
+ ```
66
+
67
+ An app that styles itself and only wants the design tokens imports `@eylulg/ui/tokens.css` (custom
68
+ properties on `:root` and `.dark-mode`, no preflight, no component styles) and a variant. To load
69
+ the fonts, import `@eylulg/ui/fonts.css` first. A
70
+ browser downloads only the fonts a page uses; without the file every theme names its fonts and
71
+ falls back to the system font.
72
+
73
+ Then use components from a per component entry point (or the index):
74
+
75
+ ```tsx
76
+ import { Button } from '@eylulg/ui/button';
77
+ import { Dialog, DialogTrigger } from '@eylulg/ui/dialog';
78
+ import { Input } from '@eylulg/ui/input';
79
+
80
+ export function InviteDialog() {
81
+ return (
82
+ <DialogTrigger>
83
+ <Button>Invite teammate</Button>
84
+ <Dialog
85
+ title='Invite teammate'
86
+ footer={({ close }) => <Button onPress={close}>Send invite</Button>}
87
+ >
88
+ <Input label='Email' type='email' isRequired />
89
+ </Dialog>
90
+ </DialogTrigger>
91
+ );
92
+ }
93
+ ```
94
+
95
+ ### Dark mode
96
+
97
+ Dark mode is class based. `ThemeToggle` writes `dark-mode` on `<html>`; the theme also accepts
98
+ `dark`, on `<html>` or on any container. Put `themeInitScript` in `<head>` to avoid a flash of the
99
+ wrong theme (see [docs/consuming.md](./docs/consuming.md)).
100
+
101
+ ## Theme variants
102
+
103
+ Every variant shares the base theme: the warm frame (sand page and lighter cards in light mode,
104
+ warm brown in dark), the shape (14px buttons and inputs, 20px cards, 24px page panels), the
105
+ spacing, the fonts (Manrope for headings, Inter for text, JetBrains Mono for code only), the
106
+ default text size, the density, the status colours and the semantic tokens. A variant changes
107
+ colour only. Import exactly one, after `theme.css`.
108
+
109
+ | Variant | Import | Project | Colour | Light | Dark |
110
+ | ---------------- | -------------------------------------- | --------------------- | ---------- | --------- | --------- |
111
+ | `portfolio` | `@eylulg/ui/themes/portfolio.css` | Portfolio | Green | `#446c2b` | `#97bf82` |
112
+ | `workspace` | `@eylulg/ui/themes/workspace.css` | Workspace | Slate blue | `#3f6fb6` | `#8cb2eb` |
113
+ | `review` | `@eylulg/ui/themes/review.css` | Review Companion | Eucalyptus | `#177360` | `#8ad0bc` |
114
+ | `control-room` | `@eylulg/ui/themes/control-room.css` | Agent Workflows | Clay | `#b8583e` | `#e8a58c` |
115
+ | `watchlist` | `@eylulg/ui/themes/watchlist.css` | Watchlist | Rose | `#af5275` | `#ed99b6` |
116
+ | `tokens` | `@eylulg/ui/themes/tokens.css` | Tokens to Tailwind | Iris | `#7766b6` | `#b8aded` |
117
+ | `plain-language` | `@eylulg/ui/themes/plain-language.css` | Plain Language Add-in | Sea glass | `#2d7787` | `#81b6c3` |
118
+ | `sudoku` | `@eylulg/ui/themes/sudoku.css` | Sudoku | Ink | `#293647` | `#c4d2e5` |
119
+ | `assistant` | `@eylulg/ui/themes/assistant.css` | Assistant Studio | Plum | `#824d85` | `#deb0e0` |
120
+
121
+ - **Colour.** In light mode the seed is the solid fill and carries white text; the tinted fill is
122
+ the seed mixed 24% into warm paper. In dark mode the lighter dark seed is the solid and carries
123
+ the page colour as text; the tint is the seed mixed 32% into the dark page. The brand scale
124
+ (`--color-brand-25` to `950`) is generated from the seed in oklch with fixed lightness per
125
+ step. `npm run themes` regenerates the scales and CSS from `src/styles/themes/variants.ts`.
126
+ - **Contrast.** `npm run contrast` (also part of `npm test`) checks every text token at 4.5:1 and
127
+ every icon, solid fill, control border, focus ring, logo and chart series at 3:1, on the
128
+ card, the page and popovers, in light and dark, for the base theme and every variant.
129
+ - **Text size.** Default has a 16px body in every theme, compact a 14px body. `TextSizeToggle`
130
+ (or `useTextSize`) lets the visitor switch; the choice is written as `data-ui-text` on `<html>`, remembered, and
131
+ applied before first paint by `themeInitScript`.
132
+ - **Density.** Components size from `--density-*` through utilities such as `h-control-md`,
133
+ `px-control-x`, `py-item-y`, `px-cell-x` and `p-card`. The values are the same in every theme.
134
+ - **Live switching.** `@eylulg/ui/themes/all.css` holds every variant under
135
+ `[data-ui-variant="<name>"]` only, so a page can switch themes by changing one attribute, or show
136
+ several projects side by side. The portfolio's theme picker and Storybook use it.
137
+ - **Typed matrix.** `import { variants, variantNames } from '@eylulg/ui/themes'` gives tools the
138
+ same data, including seeds and the generated scales.
139
+
140
+ ## Overriding the brand
141
+
142
+ To change a single decision rather than switch variant, set `--color-brand-seed` and
143
+ `--color-brand-seed-dark` after the library CSS, or override one semantic variable such as
144
+ `--ui-bg-brand-solid`. Keep the light seed at 4.5:1 or more against white and the dark seed at
145
+ 4.5:1 against the dark page.
146
+
147
+ ## Components
148
+
149
+ | Component | Import | Built on (React Aria) | Highlights |
150
+ | ----------------------------- | ------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
151
+ | `Avatar` | `@eylulg/ui/avatar` | none (static, image fallback) | Image, initials fallback on error (drawn with CSS, so a labelled button's name stays valid), status, sizes, `AvatarGroup` |
152
+ | `Badge` | `@eylulg/ui/badge` | none (static) | gray, brand, success, warning, error, blue, purple, pink, orange, indigo (AA in every variant); dot; icon |
153
+ | `Breadcrumbs` | `@eylulg/ui/breadcrumbs` | `Breadcrumbs`, `Breadcrumb`, `Link` | Nav landmark, current page, router links |
154
+ | `Button` | `@eylulg/ui/button` | `Button`, `Link` | primary, secondary, tertiary, destructive, destructive-outline; sm, md, lg; loading; icons; `href` renders a link; `buttonStyles()`; `ref` |
155
+ | `Card` | `@eylulg/ui/card` | `Link`, `Button` | Header, body, footer slots; interactive card as one link or button; `padding="none"` for media; aria props reach the link |
156
+ | `Charts` | `@eylulg/ui/chart` | none (SVG, focus hooks only) | `LineChart`, `BarChart`, `HeatGrid`, `ChartLegend`; series colour tokens, tooltip on hover and focus, Show table toggle, arrow keys |
157
+ | `Checkbox` | `@eylulg/ui/checkbox` | `Checkbox` | Indeterminate, hint, invalid |
158
+ | `CodeBlock` | `@eylulg/ui/code-block` | none (static) | `pre` in the data font, labelled and keyboard scrollable, optional copy button with a status |
159
+ | `Combobox` | `@eylulg/ui/combobox` | `ComboBox`, `Popover`, `ListBox` | Async loading, sections, empty state, descriptions |
160
+ | `CommandPalette` | `@eylulg/ui/command-palette` | `Autocomplete`, `SearchField`, `Menu`, `Modal` | Search, groups, shortcuts, Cmd or Ctrl+K hook, nested pages (Backspace goes back), `onSearchChange`, `closeOnAction` |
161
+ | `DatePicker, DateRangePicker` | `@eylulg/ui/date-picker` | `DatePicker`, `DateRangePicker`, `Calendar`, `RangeCalendar` | Segmented input, calendar popover, hint, error |
162
+ | `Dialog` | `@eylulg/ui/dialog` | `Modal`, `Dialog` | Focus trap and restore, `alertdialog` role, three sizes, `headerActions` slot |
163
+ | `Drawer` | `@eylulg/ui/drawer` | `ModalOverlay`, `Modal`, `Dialog` | Left, right or bottom sheet; sticky footer; reduced motion |
164
+ | `DropdownMenu` | `@eylulg/ui/dropdown-menu` | `MenuTrigger`, `Menu`, `MenuSection`, `SubmenuTrigger` | Sections, checkbox and radio groups, shortcuts, danger items, submenus |
165
+ | `EmptyState` | `@eylulg/ui/empty-state` | none (static) | Icon, title, description, actions, two sizes, heading level 1 to 4 |
166
+ | `FileDropZone` | `@eylulg/ui/file-drop-zone` | `DropZone`, `FileTrigger` | Drop or pick files, accepted types checked on both paths, `onSelect` and `onReject` |
167
+ | `IconButton` | `@eylulg/ui/icon-button` | `Button` | Required `aria-label`, same variants, loading |
168
+ | `Input` | `@eylulg/ui/input` | `TextField`, `Input`, `Group` | Label, hint, error, icons, two sizes, `ref` to the input element |
169
+ | `Kbd` | `@eylulg/ui/kbd` | none (static) | Single keys or key combinations |
170
+ | `PageHeader` | `@eylulg/ui/page-header` | none (static) | Title, description, actions, breadcrumbs, eyebrow and meta slots |
171
+ | `Pagination` | `@eylulg/ui/pagination` | none (buttons or links) | Ellipses, sibling count, `getPageHref` for link pagination |
172
+ | `Popover` | `@eylulg/ui/popover` | `Popover`, `Dialog` | Non modal panel, optional arrow, title as name |
173
+ | `ProgressBar` | `@eylulg/ui/progress-bar` | `ProgressBar` | Tones, sizes, value label, indeterminate |
174
+ | `RadioGroup` | `@eylulg/ui/radio-group` | `RadioGroup`, `Radio` | Vertical or horizontal, hint, error |
175
+ | `SegmentedControl` | `@eylulg/ui/segmented-control` | `ToggleButtonGroup`, `ToggleButton` | One of a few views (list or board), icons, two sizes, controlled or not |
176
+ | `Select` | `@eylulg/ui/select` | `Select`, `Popover`, `ListBox` | Static or dynamic items, typeahead, hint, error, option `description`, `onKeyDown`, `ref` to the trigger |
177
+ | `Skeleton` | `@eylulg/ui/skeleton` | none (static) | text, circle, rect; multi line; reduced motion |
178
+ | `Spinner` | `@eylulg/ui/spinner` | none (static) | Decorative or announced with a label, three sizes |
179
+ | `Stat` | `@eylulg/ui/stat` | none (static) | `dl` semantics, `sm` and `md`, detail line, trend announced in words, `Sparkline` |
180
+ | `Switch` | `@eylulg/ui/switch` | `Switch` | Two sizes, hint, `ref` to the input |
181
+ | `Table` | `@eylulg/ui/table` | `Table`, `Column`, `Row`, `Cell` | Sortable columns, selection column, sticky header, empty state |
182
+ | `Tabs` | `@eylulg/ui/tabs` | `Tabs`, `TabList`, `Tab`, `TabPanel` | Horizontal or vertical |
183
+ | `Tag` | `@eylulg/ui/tag` | `TagGroup`, `TagList`, `Tag` | Removable, selectable |
184
+ | `Textarea` | `@eylulg/ui/textarea` | `TextField`, `TextArea` | Label, hint, error, optional resize, `font="data"`, `autoCapitalize`, `autoCorrect` |
185
+ | `Toast` | `@eylulg/ui/toast` | none (see note) | `ToastProvider` and `useToast`, four variants, `action` button, pause on hover and focus, Escape and focus return |
186
+ | `Tooltip` | `@eylulg/ui/tooltip` | `TooltipTrigger`, `Tooltip` | Hover and focus, Escape, four placements |
187
+ | `cx` | `@eylulg/ui/cx` | | `tailwind-merge` based class joiner; imports nothing else, so server components can use it |
188
+
189
+ Icons come from [`lucide-react`](https://lucide.dev), which is a peer dependency; the library
190
+ re-exports none. Components that take an icon accept a component such as `Plus`.
191
+
192
+ **A note on Toast.** React Aria's toast API is still exported as `UNSTABLE_`, so Toast is a small
193
+ in house implementation: an always present labelled region with a polite live list, and timers
194
+ that pause while a toast is hovered or focused. A toast can carry one `action` button, and when a
195
+ toast that holds focus closes (action, dismiss button or Escape), focus goes back to the control the
196
+ user tabbed in from.
197
+
198
+ **A note on Card.** An interactive card (`href` or `onPress`) stretches its title link over the
199
+ whole card. Actions in `CardHeader` and `CardFooter` stay separate tab stops above it; a control
200
+ inside `CardBody` needs `relative z-10` to be clickable.
201
+
202
+ ## Charts
203
+
204
+ `@eylulg/ui/chart` draws charts with plain SVG and no chart library. `LineChart` takes one or more
205
+ series over dates, numbers or names. `BarChart` is vertical or horizontal, grouped or stacked.
206
+ `HeatGrid` is a matrix of rows by columns, either states such as pass and fail (a fill and a
207
+ distinct icon per state) or numbers (five shades of one hue). `ChartLegend` is the legend the
208
+ charts use, exported for your own layouts.
209
+
210
+ ```tsx
211
+ import { HeatGrid, LineChart } from '@eylulg/ui/chart';
212
+
213
+ <LineChart
214
+ title='Requests per day'
215
+ x={days}
216
+ series={[
217
+ { id: 'chat', label: 'Chat', values: chat },
218
+ { id: 'search', label: 'Search', values: search },
219
+ ]}
220
+ locale='en-GB'
221
+ />;
222
+
223
+ <HeatGrid
224
+ title='Checks by case'
225
+ rowLabel='Case'
226
+ rows={[{ id: 'refund', label: 'Refund request' }]}
227
+ columns={[{ id: 'cites', label: 'Cites source' }]}
228
+ states={{
229
+ pass: { label: 'Pass', tone: 'success' },
230
+ fail: { label: 'Fail', tone: 'error' },
231
+ }}
232
+ cells={[{ row: 'refund', column: 'cites', state: 'fail', detail: 'No source cited.' }]}
233
+ />;
234
+ ```
235
+
236
+ - **Colour.** `--ui-chart-1` to `--ui-chart-6` are the series colours, the same hues in every
237
+ variant and tuned separately for light and dark. `npm run contrast` checks each at 3:1 or more
238
+ against every surface of every variant and keeps every pair of series apart under colour
239
+ vision deficiency. A series keeps its colour by `colorIndex`, not by its rank. Past six series the rest
240
+ share a muted colour and differ by marker shape and dash.
241
+ - **Keyboard and screen readers.** Each chart is a named figure with a generated summary. Tab
242
+ enters the plot once; arrow keys, Home and End move between points, bars or cells; Escape closes
243
+ the tooltip. Every point reads out its values, and the data is also a real table behind a
244
+ "Show table" button.
245
+ - **Layout.** Charts fill their container, follow it with a ResizeObserver and stay readable at
246
+ 320 px. Axis ticks thin out as space runs short. Numbers and dates go through `Intl` with the
247
+ `locale` prop.
248
+
249
+ ## App chrome
250
+
251
+ `@eylulg/ui/chrome` holds the parts every project shares:
252
+
253
+ | Export | What it does | Server safe |
254
+ | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
255
+ | `AppShell` | Skip link, header, optional sidebar, main landmark, footer; 16px gutter at 375px; `maxWidth` and `contentClassName` | yes |
256
+ | `TopNav` | Logo and product name, links via any `LinkComponent`, `center`, `actions` and `compactActions` slots, `labels`, mobile menu in a Drawer that loads on first press | client |
257
+ | `SidebarNav` | Sections, icons, collapsible groups, an optional action per item, arrow keys, Home and End, `aria-current` | client |
258
+ | `ThemeToggle` | Light, dark and system, or one icon button with `compact`; `labels`; writes `dark-mode` on `<html>`; persists in localStorage | client |
259
+ | `useTheme` | `{ theme, resolved, setTheme }` for a command palette or settings page; guards `matchMedia` | client |
260
+ | `themeInitScript` | Inline `<head>` script that applies the stored theme before first paint (also `@eylulg/ui/theme-script`) | yes |
261
+ | `ProjectSwitcher` | DropdownMenu of the projects, current one marked | client |
262
+ | `SiteFooter` | "Part of Eylül Güneş's projects", project links, GitHub, LinkedIn, Built with @eylulg/ui; `labels`, `children` for attributions | yes |
263
+ | `BrandLogo` | The EG horse logo in the brand green in every theme, a thinner outline at 48px and below. The default brand of TopNav and SiteFooter | yes |
264
+ | `BrandMark` | The "eg" monogram, filled with the active brand colour. Kept for compatibility | yes |
265
+
266
+ The project list lives in `@eylulg/ui/projects` (`id`, `name`, `description`, `url`,
267
+ `plannedUrl`, `variant`, `repoUrl`). Projects without a deployment have `url: null` and a
268
+ Vercel style `plannedUrl` placeholder, and link to their repository until they go live. **These
269
+ URLs change when the custom domain arrives.** Pass `projects` to `ProjectSwitcher` or
270
+ `SiteFooter` to override the list.
271
+
272
+ Every chrome part takes a `labels` object for translation, and `useTheme()` lets the app set the
273
+ theme from code. `TopNav` loads its mobile menu on first press, so a page that never opens it pays
274
+ about 1.6 kB gzip for the bar. In Next.js, server components can import the server safe parts directly. Render `TopNav` from a
275
+ small `'use client'` file when you pass `next/link` as `LinkComponent`, because a server component
276
+ cannot pass a function to a client component. See [docs/consuming.md](./docs/consuming.md).
277
+
278
+ ## Development
279
+
280
+ ```bash
281
+ npm install
282
+ npm run storybook # docs and playground on http://localhost:6006
283
+ npm test # Vitest, Testing Library, vitest-axe, theme contrast check
284
+ npm run typecheck
285
+ npm run lint # ESLint with jsx-a11y and import order, zero warnings
286
+ npm run format:check
287
+ npm run knip # unused files, exports and dependencies
288
+ npm run build # dist/ with ESM, type declarations, styles.css and theme files
289
+ npm run size # bundle size budget
290
+ npm run build-storybook # static Storybook in storybook-static/
291
+ npm run themes # regenerate variant scales and CSS from variants.ts
292
+ npm run contrast # print the contrast report for every variant
293
+ ```
294
+
295
+ ## Contributing
296
+
297
+ These rules follow the shared engineering standards for all of Eylül's projects.
298
+
299
+ 1. **Conventional Commits are required** and checked by commitlint in a Husky `commit-msg` hook
300
+ and in CI, because semantic-release reads them to choose the next version.
301
+ - `fix(button): keep width while loading` releases a patch.
302
+ - `feat(select): support sections` releases a minor.
303
+ - A `BREAKING CHANGE:` footer, or `!` after the type, releases a major.
304
+ - `docs`, `test`, `chore`, `refactor`, `build` and `ci` do not release.
305
+ 2. **One folder per component** in `src/components/<Name>/`: `<Name>.tsx`, `<Name>.stories.tsx`,
306
+ `index.ts` and `__tests__/<Name>.test.tsx`. Add the name to `scripts/components.ts`, export it
307
+ from `src/index.ts` and add an entry to `exports` in `package.json`. Shared test helpers live in
308
+ `src/test-utils/`.
309
+ 3. **Only tests worth having.** Test behaviour this library adds over React Aria (states, rules,
310
+ focus placement, logic), one behaviour per test, states folded into `it.each`, queries by role
311
+ and name. One `expectNoA11yViolations` run per component covers light and dark. No class name,
312
+ DOM structure or pass-through tests.
313
+ 4. **One story per variant**, so the a11y panel and visual review cover each of them.
314
+ 5. **Only tokens in components.** Semantic colours (`text-primary`, not `text-gray-900`), radius
315
+ utilities and density utilities, so every theme variant keeps working.
316
+ 6. A pre-commit hook runs ESLint and Prettier on staged files. CI runs typecheck, lint, format,
317
+ knip, commitlint, tests, both builds, the size budget and a gitleaks secret scan. Dependabot
318
+ opens grouped updates monthly.
319
+
320
+ ## Releases
321
+
322
+ Pushing to `main` runs `.github/workflows/release.yml`. semantic-release analyses the commits since
323
+ the last tag, publishes to npm with provenance, creates a GitHub release, and commits the updated
324
+ `CHANGELOG.md` and version back to `main`. The workflow needs an `NPM_TOKEN` repository secret; until
325
+ it is added the job skips the release step with a notice and nothing is published.
326
+
327
+ ## License
328
+
329
+ [MIT](./LICENSE) © Eylül Güneş
@@ -0,0 +1,3 @@
1
+ import type { LinkProps } from './types';
2
+ /** Default LinkComponent: a plain anchor. */
3
+ export declare function Anchor({ href, children, ...props }: LinkProps): import("react").JSX.Element;
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ // src/chrome/Anchor.tsx
4
+ /** Default LinkComponent: a plain anchor. */
5
+ function Anchor({ href, children, ...props }) {
6
+ return /* @__PURE__ */ jsx("a", {
7
+ href,
8
+ ...props,
9
+ children
10
+ });
11
+ }
12
+ export { Anchor };
13
+
14
+ //# sourceMappingURL=Anchor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Anchor.js","names":[],"sources":["../../src/chrome/Anchor.tsx"],"sourcesContent":["import type { LinkProps } from './types';\n\n/** Default LinkComponent: a plain anchor. */\nexport function Anchor({ href, children, ...props }: LinkProps) {\n return (\n <a href={href} {...props}>\n {children}\n </a>\n );\n}\n"],"mappings":";;;;AAGA,SAAgB,OAAO,EAAE,MAAM,UAAU,GAAG,SAAoB;CAC9D,OACE,oBAAC,KAAD;EAAS;EAAM,GAAI;EAChB;CACA,CAAA;AAEP"}
@@ -0,0 +1,28 @@
1
+ import type { ReactNode } from 'react';
2
+ export type AppShellMaxWidth = 'none' | '4xl' | '5xl' | '6xl' | '7xl';
3
+ export interface AppShellProps {
4
+ /** Usually a TopNav. */
5
+ header?: ReactNode;
6
+ /** Optional app sidebar, usually a SidebarNav. Shown from the md breakpoint. */
7
+ sidebar?: ReactNode;
8
+ /** Usually a SiteFooter. */
9
+ footer?: ReactNode;
10
+ children: ReactNode;
11
+ /** Text of the skip link, the first tab stop on the page. */
12
+ skipLinkLabel?: string;
13
+ /** id of the main landmark, the skip link's target. */
14
+ mainId?: string;
15
+ /**
16
+ * Widest the content gets, centred. `6xl` lines the content up with TopNav
17
+ * and SiteFooter, which are 6xl wide. The default `none` fills the page.
18
+ */
19
+ maxWidth?: AppShellMaxWidth;
20
+ /** Extra layout classes for the content wrapper inside main, such as `space-y-8`. They add to the default padding and do not replace it. */
21
+ contentClassName?: string;
22
+ }
23
+ /**
24
+ * Page frame shared by every project: a skip link, the header, an optional
25
+ * sidebar, the main landmark and the footer. It has no hooks, so it renders
26
+ * on the server. The 16px gutter keeps 375px screens free of sideways scroll.
27
+ */
28
+ export declare function AppShell({ header, sidebar, footer, children, skipLinkLabel, mainId, maxWidth, contentClassName, }: AppShellProps): import("react").JSX.Element;
@@ -0,0 +1,57 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ // src/chrome/AppShell.tsx
3
+ var root = "flex min-h-dvh flex-col bg-secondary font-sans text-primary";
4
+ var skipLink = "sr-only rounded-md bg-elevated px-4 py-2 text-sm font-semibold text-brand shadow-lg focus:not-sr-only focus:fixed focus:top-3 focus:left-4 focus:z-50 focus:outline-2 focus:outline-offset-2 focus:outline-focus";
5
+ var body = "flex min-h-0 w-full flex-1";
6
+ var sidebarColumn = "hidden w-64 shrink-0 border-r border-subtle md:block";
7
+ var main = "min-w-0 flex-1";
8
+ var content = "mx-auto w-full px-4 py-6 sm:px-6 lg:px-8";
9
+ var widths = {
10
+ none: void 0,
11
+ "4xl": "max-w-4xl",
12
+ "5xl": "max-w-5xl",
13
+ "6xl": "max-w-6xl",
14
+ "7xl": "max-w-7xl"
15
+ };
16
+ /**
17
+ * Page frame shared by every project: a skip link, the header, an optional
18
+ * sidebar, the main landmark and the footer. It has no hooks, so it renders
19
+ * on the server. The 16px gutter keeps 375px screens free of sideways scroll.
20
+ */
21
+ function AppShell({ header, sidebar, footer, children, skipLinkLabel = "Skip to content", mainId = "main", maxWidth = "none", contentClassName }) {
22
+ const contentClasses = [
23
+ content,
24
+ widths[maxWidth],
25
+ contentClassName
26
+ ].filter(Boolean).join(" ");
27
+ return /* @__PURE__ */ jsxs("div", {
28
+ className: root,
29
+ children: [
30
+ /* @__PURE__ */ jsx("a", {
31
+ href: `#${mainId}`,
32
+ className: skipLink,
33
+ children: skipLinkLabel
34
+ }),
35
+ header,
36
+ /* @__PURE__ */ jsxs("div", {
37
+ className: body,
38
+ children: [sidebar && /* @__PURE__ */ jsx("div", {
39
+ className: sidebarColumn,
40
+ children: sidebar
41
+ }), /* @__PURE__ */ jsx("main", {
42
+ id: mainId,
43
+ tabIndex: -1,
44
+ className: main,
45
+ children: /* @__PURE__ */ jsx("div", {
46
+ className: contentClasses,
47
+ children
48
+ })
49
+ })]
50
+ }),
51
+ footer
52
+ ]
53
+ });
54
+ }
55
+ export { AppShell };
56
+
57
+ //# sourceMappingURL=AppShell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppShell.js","names":[],"sources":["../../src/chrome/AppShell.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nexport type AppShellMaxWidth = 'none' | '4xl' | '5xl' | '6xl' | '7xl';\n\nexport interface AppShellProps {\n /** Usually a TopNav. */\n header?: ReactNode;\n /** Optional app sidebar, usually a SidebarNav. Shown from the md breakpoint. */\n sidebar?: ReactNode;\n /** Usually a SiteFooter. */\n footer?: ReactNode;\n children: ReactNode;\n /** Text of the skip link, the first tab stop on the page. */\n skipLinkLabel?: string;\n /** id of the main landmark, the skip link's target. */\n mainId?: string;\n /**\n * Widest the content gets, centred. `6xl` lines the content up with TopNav\n * and SiteFooter, which are 6xl wide. The default `none` fills the page.\n */\n maxWidth?: AppShellMaxWidth;\n /** Extra layout classes for the content wrapper inside main, such as `space-y-8`. They add to the default padding and do not replace it. */\n contentClassName?: string;\n}\n\nconst root = 'flex min-h-dvh flex-col bg-secondary font-sans text-primary';\nconst skipLink =\n 'sr-only rounded-md bg-elevated px-4 py-2 text-sm font-semibold text-brand shadow-lg focus:not-sr-only focus:fixed focus:top-3 focus:left-4 focus:z-50 focus:outline-2 focus:outline-offset-2 focus:outline-focus';\nconst body = 'flex min-h-0 w-full flex-1';\nconst sidebarColumn = 'hidden w-64 shrink-0 border-r border-subtle md:block';\nconst main = 'min-w-0 flex-1';\nconst content = 'mx-auto w-full px-4 py-6 sm:px-6 lg:px-8';\nconst widths: Record<AppShellMaxWidth, string | undefined> = {\n none: undefined,\n '4xl': 'max-w-4xl',\n '5xl': 'max-w-5xl',\n '6xl': 'max-w-6xl',\n '7xl': 'max-w-7xl',\n};\n\n/**\n * Page frame shared by every project: a skip link, the header, an optional\n * sidebar, the main landmark and the footer. It has no hooks, so it renders\n * on the server. The 16px gutter keeps 375px screens free of sideways scroll.\n */\nexport function AppShell({\n header,\n sidebar,\n footer,\n children,\n skipLinkLabel = 'Skip to content',\n mainId = 'main',\n maxWidth = 'none',\n contentClassName,\n}: AppShellProps) {\n const contentClasses = [content, widths[maxWidth], contentClassName].filter(Boolean).join(' ');\n return (\n <div className={root}>\n <a href={`#${mainId}`} className={skipLink}>\n {skipLinkLabel}\n </a>\n {header}\n <div className={body}>\n {sidebar && <div className={sidebarColumn}>{sidebar}</div>}\n <main id={mainId} tabIndex={-1} className={main}>\n <div className={contentClasses}>{children}</div>\n </main>\n </div>\n {footer}\n </div>\n );\n}\n"],"mappings":";;AAyBA,IAAM,OAAO;AACb,IAAM,WACJ;AACF,IAAM,OAAO;AACb,IAAM,gBAAgB;AACtB,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAM,SAAuD;CAC3D,MAAM,KAAA;CACN,OAAO;CACP,OAAO;CACP,OAAO;CACP,OAAO;AACT;;;;;;AAOA,SAAgB,SAAS,EACvB,QACA,SACA,QACA,UACA,gBAAgB,mBAChB,SAAS,QACT,WAAW,QACX,oBACgB;CAChB,MAAM,iBAAiB;EAAC;EAAS,OAAO;EAAW;CAAgB,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;CAC7F,OACE,qBAAC,OAAD;EAAK,WAAW;EAAhB,UAAA;GACE,oBAAC,KAAD;IAAG,MAAM,IAAI;IAAU,WAAW;IAC/B,UAAA;GACA,CAAA;GACF;GACD,qBAAC,OAAD;IAAK,WAAW;IAAhB,UAAA,CACG,WAAW,oBAAC,OAAD;KAAK,WAAW;KAAgB,UAAA;IAAa,CAAA,GACzD,oBAAC,QAAD;KAAM,IAAI;KAAQ,UAAU;KAAI,WAAW;KACzC,UAAA,oBAAC,OAAD;MAAK,WAAW;MAAiB;KAAc,CAAA;IAC3C,CAAA,CACH;;GACJ;EACE;;AAET"}
@@ -0,0 +1,13 @@
1
+ import type { SVGProps } from 'react';
2
+ export interface BrandLogoProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {
3
+ /** Accessible name. Without it the logo is decorative and hidden. */
4
+ title?: string;
5
+ /** Rendered width and height in pixels. At 48 and below it draws with a thin outline. */
6
+ size?: number;
7
+ }
8
+ /**
9
+ * Eylül Güneş's logo: a calligraphic E and G whose strokes form a horse's
10
+ * head. It is one path in the brand green, light green in dark mode, in every
11
+ * theme. At 48px and below a same-colour stroke of 2 thickens the thin strokes.
12
+ */
13
+ export declare function BrandLogo({ title, size, ...props }: BrandLogoProps): import("react").JSX.Element;
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { brandLogoPath } from "./brandLogoPath.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ // src/chrome/BrandLogo.tsx
5
+ /**
6
+ * Eylül Güneş's logo: a calligraphic E and G whose strokes form a horse's
7
+ * head. It is one path in the brand green, light green in dark mode, in every
8
+ * theme. At 48px and below a same-colour stroke of 2 thickens the thin strokes.
9
+ */
10
+ function BrandLogo({ title, size = 64, ...props }) {
11
+ const labelled = Boolean(title);
12
+ const small = size <= 48;
13
+ return /* @__PURE__ */ jsx("svg", {
14
+ viewBox: small ? "-1.5 -1.5 103 103" : "-0.5 -0.5 101 101",
15
+ width: size,
16
+ height: size,
17
+ role: labelled ? "img" : void 0,
18
+ "aria-label": title,
19
+ "aria-hidden": labelled ? void 0 : true,
20
+ focusable: "false",
21
+ ...props,
22
+ children: /* @__PURE__ */ jsx("path", {
23
+ className: "fill-(--ui-logo) stroke-(--ui-logo)",
24
+ strokeWidth: small ? 2 : 0,
25
+ strokeLinejoin: "round",
26
+ fillRule: "evenodd",
27
+ d: brandLogoPath
28
+ })
29
+ });
30
+ }
31
+ export { BrandLogo };
32
+
33
+ //# sourceMappingURL=BrandLogo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrandLogo.js","names":[],"sources":["../../src/chrome/BrandLogo.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\nimport { brandLogoPath } from './brandLogoPath';\n\nexport interface BrandLogoProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {\n /** Accessible name. Without it the logo is decorative and hidden. */\n title?: string;\n /** Rendered width and height in pixels. At 48 and below it draws with a thin outline. */\n size?: number;\n}\n\n/**\n * Eylül Güneş's logo: a calligraphic E and G whose strokes form a horse's\n * head. It is one path in the brand green, light green in dark mode, in every\n * theme. At 48px and below a same-colour stroke of 2 thickens the thin strokes.\n */\nexport function BrandLogo({ title, size = 64, ...props }: BrandLogoProps) {\n const labelled = Boolean(title);\n const small = size <= 48;\n return (\n <svg\n viewBox={small ? '-1.5 -1.5 103 103' : '-0.5 -0.5 101 101'}\n width={size}\n height={size}\n role={labelled ? 'img' : undefined}\n aria-label={title}\n aria-hidden={labelled ? undefined : true}\n focusable='false'\n {...props}\n >\n <path\n className='fill-(--ui-logo) stroke-(--ui-logo)'\n strokeWidth={small ? 2 : 0}\n strokeLinejoin='round'\n fillRule='evenodd'\n d={brandLogoPath}\n />\n </svg>\n );\n}\n"],"mappings":";;;;;;;;;AAeA,SAAgB,UAAU,EAAE,OAAO,OAAO,IAAI,GAAG,SAAyB;CACxE,MAAM,WAAW,QAAQ,KAAK;CAC9B,MAAM,QAAQ,QAAQ;CACtB,OACE,oBAAC,OAAD;EACE,SAAS,QAAQ,sBAAsB;EACvC,OAAO;EACP,QAAQ;EACR,MAAM,WAAW,QAAQ,KAAA;EACzB,cAAY;EACZ,eAAa,WAAW,KAAA,IAAY;EACpC,WAAU;EACV,GAAI;EAEJ,UAAA,oBAAC,QAAD;GACE,WAAU;GACV,aAAa,QAAQ,IAAI;GACzB,gBAAe;GACf,UAAS;GACT,GAAG;EACJ,CAAA;CACE,CAAA;AAET"}
@@ -0,0 +1,12 @@
1
+ import type { SVGProps } from 'react';
2
+ export interface BrandMarkProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {
3
+ /** Accessible name. Without it the mark is decorative and hidden. */
4
+ title?: string;
5
+ /** Rendered width and height in pixels. */
6
+ size?: number;
7
+ }
8
+ /**
9
+ * The shared "eg" monogram. It fills with the active brand colour, so each
10
+ * project's variant tints it while the shape stays the same everywhere.
11
+ */
12
+ export declare function BrandMark({ title, size, ...props }: BrandMarkProps): import("react").JSX.Element;
@@ -0,0 +1,40 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ // src/chrome/BrandMark.tsx
3
+ var tile = "fill-(--ui-bg-brand-solid)";
4
+ var letter = "fill-(--ui-text-on-solid)";
5
+ /**
6
+ * The shared "eg" monogram. It fills with the active brand colour, so each
7
+ * project's variant tints it while the shape stays the same everywhere.
8
+ */
9
+ function BrandMark({ title, size = 28, ...props }) {
10
+ const labelled = Boolean(title);
11
+ return /* @__PURE__ */ jsxs("svg", {
12
+ viewBox: "0 0 32 32",
13
+ width: size,
14
+ height: size,
15
+ role: labelled ? "img" : void 0,
16
+ "aria-label": title,
17
+ "aria-hidden": labelled ? void 0 : true,
18
+ focusable: "false",
19
+ ...props,
20
+ children: [
21
+ /* @__PURE__ */ jsx("rect", {
22
+ width: "32",
23
+ height: "32",
24
+ rx: "8",
25
+ className: tile
26
+ }),
27
+ /* @__PURE__ */ jsx("path", {
28
+ className: letter,
29
+ d: "M14.6 19.4h-6.5c.2 1.6 1.4 2.5 3 2.5 1.1 0 2-.4 2.6-1.2l.6.6c-.8 1-2 1.6-3.3 1.6-2.4 0-4.2-1.7-4.2-4.3s1.7-4.3 4-4.3c2.3 0 3.8 1.7 3.8 4.2v.9Zm-6.5-1h5.2c-.1-1.4-1.1-2.3-2.5-2.3s-2.5.9-2.7 2.3Z"
30
+ }),
31
+ /* @__PURE__ */ jsx("path", {
32
+ className: letter,
33
+ d: "M24.9 14.5v7.8c0 2.6-1.6 4-4 4-1.4 0-2.6-.4-3.5-1.2l.6-.8c.8.7 1.8 1 2.9 1 1.8 0 2.8-.9 2.8-2.9v-1.1c-.6.9-1.7 1.4-2.9 1.4-2.2 0-3.9-1.6-3.9-3.9s1.7-3.9 3.9-3.9c1.2 0 2.3.5 2.9 1.5v-1.4h1.2Zm-1.2 3.8c0-1.7-1.2-2.9-2.8-2.9s-2.8 1.2-2.8 2.9 1.2 2.9 2.8 2.9 2.8-1.2 2.8-2.9Z"
34
+ })
35
+ ]
36
+ });
37
+ }
38
+ export { BrandMark };
39
+
40
+ //# sourceMappingURL=BrandMark.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrandMark.js","names":[],"sources":["../../src/chrome/BrandMark.tsx"],"sourcesContent":["import type { SVGProps } from 'react';\n\nexport interface BrandMarkProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {\n /** Accessible name. Without it the mark is decorative and hidden. */\n title?: string;\n /** Rendered width and height in pixels. */\n size?: number;\n}\n\nconst tile = 'fill-(--ui-bg-brand-solid)';\nconst letter = 'fill-(--ui-text-on-solid)';\n\n/**\n * The shared \"eg\" monogram. It fills with the active brand colour, so each\n * project's variant tints it while the shape stays the same everywhere.\n */\nexport function BrandMark({ title, size = 28, ...props }: BrandMarkProps) {\n const labelled = Boolean(title);\n return (\n <svg\n viewBox='0 0 32 32'\n width={size}\n height={size}\n role={labelled ? 'img' : undefined}\n aria-label={title}\n aria-hidden={labelled ? undefined : true}\n focusable='false'\n {...props}\n >\n <rect width='32' height='32' rx='8' className={tile} />\n <path\n className={letter}\n d='M14.6 19.4h-6.5c.2 1.6 1.4 2.5 3 2.5 1.1 0 2-.4 2.6-1.2l.6.6c-.8 1-2 1.6-3.3 1.6-2.4 0-4.2-1.7-4.2-4.3s1.7-4.3 4-4.3c2.3 0 3.8 1.7 3.8 4.2v.9Zm-6.5-1h5.2c-.1-1.4-1.1-2.3-2.5-2.3s-2.5.9-2.7 2.3Z'\n />\n <path\n className={letter}\n d='M24.9 14.5v7.8c0 2.6-1.6 4-4 4-1.4 0-2.6-.4-3.5-1.2l.6-.8c.8.7 1.8 1 2.9 1 1.8 0 2.8-.9 2.8-2.9v-1.1c-.6.9-1.7 1.4-2.9 1.4-2.2 0-3.9-1.6-3.9-3.9s1.7-3.9 3.9-3.9c1.2 0 2.3.5 2.9 1.5v-1.4h1.2Zm-1.2 3.8c0-1.7-1.2-2.9-2.8-2.9s-2.8 1.2-2.8 2.9 1.2 2.9 2.8 2.9 2.8-1.2 2.8-2.9Z'\n />\n </svg>\n );\n}\n"],"mappings":";;AASA,IAAM,OAAO;AACb,IAAM,SAAS;;;;;AAMf,SAAgB,UAAU,EAAE,OAAO,OAAO,IAAI,GAAG,SAAyB;CACxE,MAAM,WAAW,QAAQ,KAAK;CAC9B,OACE,qBAAC,OAAD;EACE,SAAQ;EACR,OAAO;EACP,QAAQ;EACR,MAAM,WAAW,QAAQ,KAAA;EACzB,cAAY;EACZ,eAAa,WAAW,KAAA,IAAY;EACpC,WAAU;EACV,GAAI;EARN,UAAA;GAUE,oBAAC,QAAD;IAAM,OAAM;IAAK,QAAO;IAAK,IAAG;IAAI,WAAW;GAAO,CAAA;GACtD,oBAAC,QAAD;IACE,WAAW;IACX,GAAE;GACH,CAAA;GACD,oBAAC,QAAD;IACE,WAAW;IACX,GAAE;GACH,CAAA;EACE;;AAET"}
@@ -0,0 +1,19 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ import { RouterProvider } from 'react-aria-components';
3
+ type RouterProviderProps = ComponentProps<typeof RouterProvider>;
4
+ /** True for hrefs with a scheme, such as https: or mailto:, and for protocol-relative ones. */
5
+ export declare const isAbsoluteHref: (href: string) => boolean;
6
+ export interface LinkRouterProps {
7
+ /** The router's navigate function, for example React Router's `useNavigate()`. */
8
+ navigate: RouterProviderProps['navigate'];
9
+ /** The router's href hook, for example React Router's `useHref`. */
10
+ useHref?: RouterProviderProps['useHref'];
11
+ children: ReactNode;
12
+ }
13
+ /**
14
+ * Connects React Aria links to the app's router. Absolute URLs always load as a
15
+ * new page: the projects share one origin, so React Aria would otherwise hand a
16
+ * link to another project to this app's router.
17
+ */
18
+ export declare function LinkRouter({ navigate, useHref, children }: LinkRouterProps): import("react").JSX.Element;
19
+ export {};