@jacshuo/onyx 0.2.1 → 1.1.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 (203) hide show
  1. package/README.md +154 -33
  2. package/README.zh-CN.md +745 -0
  3. package/dist/Accordion.cjs +1 -1
  4. package/dist/Accordion.d.cts +3 -1
  5. package/dist/Accordion.d.ts +3 -1
  6. package/dist/Accordion.js +1 -1
  7. package/dist/Alert.cjs +1 -1
  8. package/dist/Alert.js +1 -1
  9. package/dist/Badge.cjs +1 -1
  10. package/dist/Badge.d.cts +1 -1
  11. package/dist/Badge.d.ts +1 -1
  12. package/dist/Badge.js +1 -1
  13. package/dist/Button.cjs +1 -1
  14. package/dist/Button.js +1 -1
  15. package/dist/Card.cjs +1 -1
  16. package/dist/Card.d.cts +3 -1
  17. package/dist/Card.d.ts +3 -1
  18. package/dist/Card.js +1 -1
  19. package/dist/Checkbox.cjs +1 -1
  20. package/dist/Checkbox.js +1 -1
  21. package/dist/CodeBlock.cjs +1 -1
  22. package/dist/CodeBlock.js +1 -1
  23. package/dist/Dialog.cjs +1 -1
  24. package/dist/Dialog.d.cts +5 -2
  25. package/dist/Dialog.d.ts +5 -2
  26. package/dist/Dialog.js +1 -1
  27. package/dist/Dropdown.cjs +1 -1
  28. package/dist/Dropdown.d.cts +4 -0
  29. package/dist/Dropdown.d.ts +4 -0
  30. package/dist/Dropdown.js +1 -1
  31. package/dist/DropdownButton.cjs +1 -1
  32. package/dist/DropdownButton.d.cts +3 -1
  33. package/dist/DropdownButton.d.ts +3 -1
  34. package/dist/DropdownButton.js +1 -1
  35. package/dist/FileExplorer.cjs +1 -1
  36. package/dist/FileExplorer.js +1 -1
  37. package/dist/Form.cjs +1 -0
  38. package/dist/Form.d.cts +101 -0
  39. package/dist/Form.d.ts +101 -0
  40. package/dist/Form.js +1 -0
  41. package/dist/Header.cjs +1 -1
  42. package/dist/Header.d.cts +7 -1
  43. package/dist/Header.d.ts +7 -1
  44. package/dist/Header.js +1 -1
  45. package/dist/Indicator.cjs +1 -0
  46. package/dist/Indicator.d.cts +19 -0
  47. package/dist/Indicator.d.ts +19 -0
  48. package/dist/Indicator.js +1 -0
  49. package/dist/Input.cjs +1 -1
  50. package/dist/Input.js +1 -1
  51. package/dist/Label.cjs +1 -1
  52. package/dist/Label.js +1 -1
  53. package/dist/List.cjs +1 -1
  54. package/dist/List.d.cts +5 -2
  55. package/dist/List.d.ts +5 -2
  56. package/dist/List.js +1 -1
  57. package/dist/Masonry.cjs +1 -0
  58. package/dist/Masonry.d.cts +41 -0
  59. package/dist/Masonry.d.ts +41 -0
  60. package/dist/Masonry.js +1 -0
  61. package/dist/NavLink.cjs +1 -1
  62. package/dist/NavLink.js +1 -1
  63. package/dist/Panel.cjs +1 -1
  64. package/dist/Panel.js +1 -1
  65. package/dist/ProgressBar.cjs +1 -1
  66. package/dist/ProgressBar.js +1 -1
  67. package/dist/Radio.cjs +1 -1
  68. package/dist/Radio.d.cts +3 -1
  69. package/dist/Radio.d.ts +3 -1
  70. package/dist/Radio.js +1 -1
  71. package/dist/SideNav.cjs +1 -1
  72. package/dist/SideNav.d.cts +14 -1
  73. package/dist/SideNav.d.ts +14 -1
  74. package/dist/SideNav.js +1 -1
  75. package/dist/Spin.cjs +1 -1
  76. package/dist/Spin.js +1 -1
  77. package/dist/Switch.cjs +1 -1
  78. package/dist/Switch.js +1 -1
  79. package/dist/Table.cjs +1 -1
  80. package/dist/Table.d.cts +7 -3
  81. package/dist/Table.d.ts +7 -3
  82. package/dist/Table.js +1 -1
  83. package/dist/Tabs.cjs +1 -1
  84. package/dist/Tabs.d.cts +3 -1
  85. package/dist/Tabs.d.ts +3 -1
  86. package/dist/Tabs.js +1 -1
  87. package/dist/Tooltip.cjs +1 -1
  88. package/dist/Tooltip.d.cts +3 -1
  89. package/dist/Tooltip.d.ts +3 -1
  90. package/dist/Tooltip.js +1 -1
  91. package/dist/Tree.cjs +1 -1
  92. package/dist/Tree.d.cts +3 -1
  93. package/dist/Tree.d.ts +3 -1
  94. package/dist/Tree.js +1 -1
  95. package/dist/chunks/chunk-2JLNRAXS.cjs +1 -0
  96. package/dist/chunks/{chunk-GT56J65P.cjs → chunk-2KVAFCQI.cjs} +1 -1
  97. package/dist/chunks/chunk-3I7Y6FUJ.js +1 -0
  98. package/dist/chunks/chunk-47UMFXDG.js +1 -0
  99. package/dist/chunks/{chunk-GW4C7AV6.cjs → chunk-4D3XBPZX.cjs} +2 -2
  100. package/dist/chunks/{chunk-DCWKY33F.js → chunk-4VFV5U3S.js} +1 -1
  101. package/dist/chunks/{chunk-7DM4FEFY.js → chunk-5FUEJFGY.js} +1 -1
  102. package/dist/chunks/chunk-5XT6TJGF.js +1 -0
  103. package/dist/chunks/{chunk-SJ2HIDEM.cjs → chunk-6BI4QL37.cjs} +1 -1
  104. package/dist/chunks/{chunk-LCLJVRKK.cjs → chunk-6E5ARQBB.cjs} +1 -1
  105. package/dist/chunks/chunk-7CEOIZXK.js +1 -0
  106. package/dist/chunks/chunk-7XPIY2SQ.cjs +1 -0
  107. package/dist/chunks/chunk-A6HIQADJ.cjs +1 -0
  108. package/dist/chunks/{chunk-NFRGBE42.cjs → chunk-AEBULFON.cjs} +1 -1
  109. package/dist/chunks/chunk-AK5IK7ZD.js +1 -0
  110. package/dist/chunks/chunk-AN2R5URJ.js +1 -0
  111. package/dist/chunks/{chunk-3B5OL3PD.cjs → chunk-BTR2N5MO.cjs} +2 -2
  112. package/dist/chunks/{chunk-24YBOQFV.cjs → chunk-BUNOVZ23.cjs} +1 -1
  113. package/dist/chunks/chunk-CEEQE7SY.js +1 -0
  114. package/dist/chunks/chunk-CMHBPMXE.js +1 -0
  115. package/dist/chunks/chunk-DWYAPPDB.cjs +1 -0
  116. package/dist/chunks/chunk-E3DST3QD.cjs +1 -0
  117. package/dist/chunks/{chunk-PC4PVKTK.js → chunk-E4EMAZ6V.js} +2 -2
  118. package/dist/chunks/chunk-E5UKEXJE.js +1 -0
  119. package/dist/chunks/{chunk-A7SZGBY2.cjs → chunk-FDTREGBQ.cjs} +1 -1
  120. package/dist/chunks/chunk-FGUFBTKI.cjs +1 -0
  121. package/dist/chunks/{chunk-K4UGTWDR.js → chunk-FQZX67Z7.js} +1 -1
  122. package/dist/chunks/chunk-G2VO67XY.js +1 -0
  123. package/dist/chunks/{chunk-6DR7FZ4Y.js → chunk-GYFFUCBT.js} +1 -1
  124. package/dist/chunks/chunk-I425OSJL.js +1 -0
  125. package/dist/chunks/chunk-ICDAUJ2G.cjs +1 -0
  126. package/dist/chunks/chunk-IFRKP7M2.js +1 -0
  127. package/dist/chunks/chunk-IHBP6FI4.js +1 -0
  128. package/dist/chunks/{chunk-XOZYC6XB.cjs → chunk-IL5XDMUA.cjs} +1 -1
  129. package/dist/chunks/chunk-IRSGPS7D.cjs +1 -0
  130. package/dist/chunks/chunk-ITWFMFVO.js +1 -0
  131. package/dist/chunks/chunk-JJP23IOG.cjs +1 -0
  132. package/dist/chunks/chunk-JRYYWYGV.cjs +1 -0
  133. package/dist/chunks/chunk-KCIICUZN.cjs +1 -0
  134. package/dist/chunks/chunk-KGRBVUVK.cjs +1 -0
  135. package/dist/chunks/chunk-KY4NDB23.cjs +1 -0
  136. package/dist/chunks/chunk-KZBYFKOH.js +1 -0
  137. package/dist/chunks/chunk-LFJEIO3X.cjs +1 -0
  138. package/dist/chunks/chunk-NY27TTWN.js +1 -0
  139. package/dist/chunks/chunk-OEXZGLB4.js +1 -0
  140. package/dist/chunks/chunk-QC67HOC2.cjs +1 -0
  141. package/dist/chunks/chunk-QLFCH4TD.js +1 -0
  142. package/dist/chunks/chunk-RPBESM5F.cjs +1 -0
  143. package/dist/chunks/{chunk-KG3IXPCM.js → chunk-SC4PNYQT.js} +1 -1
  144. package/dist/chunks/chunk-SLHD7PST.cjs +1 -0
  145. package/dist/chunks/chunk-UEGTVAFV.cjs +1 -0
  146. package/dist/chunks/chunk-V34PT6H4.cjs +1 -0
  147. package/dist/chunks/chunk-VUWT3NFR.js +1 -0
  148. package/dist/chunks/{chunk-A7BECCRP.cjs → chunk-W5UXZVLS.cjs} +1 -1
  149. package/dist/chunks/chunk-WQOSJM7L.js +2 -0
  150. package/dist/chunks/chunk-WRPPKNRG.js +1 -0
  151. package/dist/chunks/chunk-XAOBJSFW.js +1 -0
  152. package/dist/chunks/{chunk-EQXC34N2.cjs → chunk-XK7SMEDO.cjs} +1 -1
  153. package/dist/chunks/chunk-XO6CNALX.js +1 -0
  154. package/dist/chunks/chunk-ZY7GZOBS.js +1 -0
  155. package/dist/index.cjs +1 -1
  156. package/dist/index.d.cts +4 -1
  157. package/dist/index.d.ts +4 -1
  158. package/dist/index.js +1 -1
  159. package/dist/styles/base.css +513 -8
  160. package/dist/styles/tokens.css +159 -0
  161. package/dist/styles.css +607 -8
  162. package/dist/theme.cjs +1 -1
  163. package/dist/theme.d.cts +32 -1
  164. package/dist/theme.d.ts +32 -1
  165. package/dist/theme.js +1 -1
  166. package/package.json +4 -4
  167. package/dist/chunks/chunk-2TTIBHQ3.js +0 -1
  168. package/dist/chunks/chunk-64BRBJ5M.js +0 -1
  169. package/dist/chunks/chunk-7PD2UMAG.cjs +0 -1
  170. package/dist/chunks/chunk-7QV2AV32.cjs +0 -1
  171. package/dist/chunks/chunk-BGUKKSPF.js +0 -1
  172. package/dist/chunks/chunk-GQDGQUKK.js +0 -1
  173. package/dist/chunks/chunk-H35HQKON.js +0 -2
  174. package/dist/chunks/chunk-H6MHL66N.js +0 -1
  175. package/dist/chunks/chunk-HFHOE2PH.cjs +0 -1
  176. package/dist/chunks/chunk-HR4MRHSX.js +0 -1
  177. package/dist/chunks/chunk-HSLG4VVI.cjs +0 -1
  178. package/dist/chunks/chunk-HSWWY3SE.cjs +0 -1
  179. package/dist/chunks/chunk-I327TE7P.js +0 -1
  180. package/dist/chunks/chunk-IPPWOV6D.js +0 -1
  181. package/dist/chunks/chunk-KVV5ZEYV.cjs +0 -1
  182. package/dist/chunks/chunk-LZZTFSBF.js +0 -1
  183. package/dist/chunks/chunk-MSBDCLPM.cjs +0 -1
  184. package/dist/chunks/chunk-MVGDKSBE.js +0 -1
  185. package/dist/chunks/chunk-NI2HVXR2.js +0 -1
  186. package/dist/chunks/chunk-NXWDOFPX.cjs +0 -1
  187. package/dist/chunks/chunk-NYTZZ5ZX.cjs +0 -1
  188. package/dist/chunks/chunk-OMBYGQJE.cjs +0 -1
  189. package/dist/chunks/chunk-P652JDOU.cjs +0 -1
  190. package/dist/chunks/chunk-Q53OOZJ3.cjs +0 -1
  191. package/dist/chunks/chunk-R7ZKMSZ3.js +0 -1
  192. package/dist/chunks/chunk-SCSMM2J4.js +0 -1
  193. package/dist/chunks/chunk-SKZIAHHY.cjs +0 -1
  194. package/dist/chunks/chunk-T3WU6A7R.js +0 -1
  195. package/dist/chunks/chunk-VHOOZBWZ.js +0 -1
  196. package/dist/chunks/chunk-W2JIAB3E.js +0 -1
  197. package/dist/chunks/chunk-WL4AMFUA.cjs +0 -1
  198. package/dist/chunks/chunk-WQA7PVJO.js +0 -1
  199. package/dist/chunks/chunk-X3PUHNVJ.js +0 -1
  200. package/dist/chunks/chunk-X4OS5ODF.cjs +0 -1
  201. package/dist/chunks/chunk-XOO3AGIT.js +0 -1
  202. package/dist/chunks/chunk-YWD2VK35.js +0 -1
  203. package/dist/chunks/chunk-ZEHGTD6Y.cjs +0 -1
package/README.md CHANGED
@@ -1,40 +1,47 @@
1
1
  <p align="center">
2
2
  <img src="https://img.shields.io/npm/v/@jacshuo/onyx?color=8b5cf6&style=flat-square" alt="npm version" />
3
3
  <img src="https://img.shields.io/npm/l/@jacshuo/onyx?style=flat-square" alt="license" />
4
- <img src="https://img.shields.io/github/actions/workflow/status/jacshuo/jac-ui/ci.yml?branch=main&style=flat-square&label=CI" alt="CI" />
4
+ <img src="https://img.shields.io/github/actions/workflow/status/jacshuo/OnyxUI/ci.yml?branch=main&style=flat-square&label=CI" alt="CI" />
5
5
  <img src="https://img.shields.io/npm/dm/@jacshuo/onyx?color=10b981&style=flat-square" alt="downloads" />
6
6
  </p>
7
7
 
8
+ <p align="right">
9
+ <strong>English</strong> | <a href="./README.zh-CN.md">中文</a>
10
+ </p>
11
+
8
12
  # @jacshuo/onyx
9
13
 
10
- A cross-platform **React UI component library** built with Tailwind CSS v4 — designed for web browsers and Electron desktop apps. Ships tree-shakeable ESM + CJS bundles with per-component subpath exports, modular CSS, and full TypeScript declarations.
14
+ A **React UI component library** built with Tailwind CSS v4 — crafted for responsive web apps and Electron desktop applications alike. Ships tree-shakeable ESM + CJS bundles with per-component subpath exports, modular CSS, and full TypeScript declarations.
11
15
 
12
- Born out of a personal passion for **cross-platform desktop development**, Onyx focuses on delivering a polished, consistent look and feel across Electron and web the kind of UI toolkit I always wished existed when building desktop apps with web technologies.
16
+ Born from a passion for **polished cross-platform experiences**, Onyx delivers a consistent look and feel from mobile screens to 4K displays with dark mode, keyboard navigation, and touch interactions built in from day one.
13
17
 
14
- > **Live Demo →** [jacshuo.github.io/jac-ui](https://jacshuo.github.io/jac-ui)
18
+ > **Live Demo →** [jacshuo.github.io/OnyxUI](https://jacshuo.github.io/OnyxUI)
15
19
 
16
20
  ---
17
21
 
18
22
  ## Why Onyx?
19
23
 
20
- - **Desktop-first philosophy** — Unlike most React UI libraries that target mobile or generic web, Onyx is crafted with desktop and Electron apps as a first-class concern. Components are optimized for pointer interactions, keyboard navigation, and desktop-sized viewports.
21
- - **Production-ready out of the box** — Dark mode, design tokens, accessibility, and keyboard shortcuts are built in from day one not bolted on as an afterthought.
24
+ - **Responsive by design** — Every component adapts from a phone screen to a 4K display without a single extra media query from you. Headers fold to hamburger menus, sidebars slide to icon-only or drawer modes, dialogs become bottom sheets — all built in. Size variants (`sm` / `md` / `lg`) and semantic CSS tokens make density adjustments trivial.
25
+ - **Desktop & Electron first-class support** — Onyx is crafted with Electron and desktop apps as a primary use case. Components are optimized for keyboard navigation, pointer interactions, and content-dense layouts that most mobile-first libraries struggle to deliver.
26
+ - **Production-ready out of the box** — Dark mode, design tokens, accessibility, touch gestures, and keyboard shortcuts are built in from day one — not bolted on as an afterthought.
22
27
  - **Minimal footprint, maximum control** — No runtime CSS-in-JS. Just Tailwind CSS v4 utility classes and CSS custom properties. Override any token without ejecting or fighting specificity wars.
23
- - **Rich, specialized components** — Beyond the usual buttons and inputs, Onyx includes `CinePlayer`, `MiniPlayer`, `FileExplorer`, and `DataTable` — components that are hard to find in general-purpose libraries but essential for desktop-class applications.
28
+ - **Rich, specialized components** — Beyond the usual buttons and inputs, Onyx includes `CinePlayer`, `MiniPlayer`, `FileExplorer`, and `DataTable` — components that are hard to find in general-purpose libraries but essential for media-rich and desktop-class applications.
24
29
 
25
30
  ---
26
31
 
27
32
  ## Features
28
33
 
29
34
  - 🎨 **30+ components** — from Button → DataTable → CinePlayer → CodeBlock
35
+ - 📱 **Responsive by default** — built-in breakpoint layouts, touch-friendly tap targets, and adaptive component modes (hamburger nav, drawer sidebar, bottom-sheet dialog)
30
36
  - 🌗 **Dark / Light mode** — class-based, works out of the box
31
- - 🎯 **CSS variable design tokens** — override any color via `--cp-*`, `--mp-*`, `--fe-*` custom properties
37
+ - 🎯 **CSS variable design tokens** — override any design decision via CSS custom properties, including at media query breakpoints
32
38
  - ⚡ **Tailwind CSS v4** — zero config, `@theme` tokens, `color-mix()` accent support
33
39
  - 📦 **Tree-shakeable** — Per-component ESM entries with code splitting; import only what you use
34
40
  - 🗂️ **On-demand imports** — Subpath exports (`@jacshuo/onyx/Button`) for maximum control
35
41
  - 🎨 **Modular CSS** — Full bundle, base-only, or per-component CSS — pick exactly what you need
36
42
  - 🖥️ **Cross-platform** — built for web & Electron desktop apps
37
43
  - ⌨️ **Keyboard-first** — comprehensive keyboard shortcuts for CinePlayer, FileExplorer, and more
44
+ - 👆 **Touch & gesture support** — tap-to-reveal, focus-visible states, and touch-optimized interactions across all interactive components
38
45
  - 🔤 **Full TypeScript** — every prop, event, and variant is typed
39
46
  - 🧩 **Composable API** — compound component patterns (e.g., `Dialog` → `DialogContent` + `DialogHeader` + `DialogFooter`) let you assemble exactly what you need
40
47
 
@@ -230,7 +237,7 @@ The library uses Tailwind's **class-based** dark mode. Add `class="dark"` to you
230
237
 
231
238
  ```html
232
239
  <html class="dark">
233
- <!-- all jac-ui components render in dark mode -->
240
+ <!-- all OnyxUI components render in dark mode -->
234
241
  </html>
235
242
  ```
236
243
 
@@ -317,6 +324,137 @@ All component colors are defined as CSS custom properties in `:root` and `.dark`
317
324
 
318
325
  ---
319
326
 
327
+ ## Responsive Design
328
+
329
+ Onyx components handle responsive behavior internally — you get adaptive layouts without writing media queries yourself.
330
+
331
+ ### Responsive Header
332
+
333
+ `Header` automatically collapses nav items into a hamburger drawer on mobile. No extra config needed:
334
+
335
+ ```tsx
336
+ import { Header } from '@jacshuo/onyx';
337
+
338
+ // On ≥md screens: full nav bar + action buttons
339
+ // On <md screens: hamburger menu (nav) + overflow menu (actions) — automatic
340
+ <Header
341
+ title="My App"
342
+ navItems={[
343
+ { label: 'Home', href: '/' },
344
+ { label: 'Docs', href: '/docs' },
345
+ { label: 'Changelog', href: '/changelog' },
346
+ ]}
347
+ actions={[
348
+ <Button size="sm" intent="primary">Sign In</Button>,
349
+ ]}
350
+ />
351
+ ```
352
+
353
+ ### Responsive Sidebar
354
+
355
+ `SideNav` ships with three collapse modes. Wire them to a responsive state to get a desktop-to-mobile transition with one state variable:
356
+
357
+ ```tsx
358
+ import { useState } from 'react';
359
+ import { SideNav, type SideNavCollapseMode } from '@jacshuo/onyx';
360
+
361
+ function AppShell() {
362
+ const [mode, setMode] = useState<SideNavCollapseMode>('expanded');
363
+
364
+ return (
365
+ <div className="flex h-screen">
366
+ {/* Hidden on mobile; collapsible on desktop */}
367
+ <aside className="hidden md:block shrink-0">
368
+ <SideNav
369
+ items={navItems}
370
+ collapsible
371
+ collapseMode={mode}
372
+ onCollapseModeChange={setMode}
373
+ />
374
+ </aside>
375
+
376
+ {/* Slide-over drawer on mobile */}
377
+ <aside className="md:hidden">
378
+ <SideNav items={navItems} />
379
+ </aside>
380
+
381
+ <main className="flex-1 overflow-y-auto p-4 md:p-8">
382
+ {/* page content */}
383
+ </main>
384
+ </div>
385
+ );
386
+ }
387
+ ```
388
+
389
+ ### Dialog — Bottom Sheet on Mobile
390
+
391
+ `Dialog` automatically renders as a bottom sheet on small screens, keeping the dismiss-by-swipe pattern users expect on mobile:
392
+
393
+ ```tsx
394
+ import { Dialog, DialogContent, DialogHeader, DialogTitle, Button } from '@jacshuo/onyx';
395
+
396
+ // On ≥md screens: centered modal dialog
397
+ // On <md screens: slides up from bottom as a full-width sheet — no extra props
398
+ <Dialog open={open} onOpenChange={setOpen}>
399
+ <DialogContent size="sm">
400
+ <DialogHeader>
401
+ <DialogTitle>Confirm Action</DialogTitle>
402
+ </DialogHeader>
403
+ <p>Are you sure you want to proceed?</p>
404
+ <div className="flex justify-end gap-2">
405
+ <Button intent="ghost" onClick={() => setOpen(false)}>Cancel</Button>
406
+ <Button intent="primary" onClick={() => setOpen(false)}>Confirm</Button>
407
+ </div>
408
+ </DialogContent>
409
+ </Dialog>
410
+ ```
411
+
412
+ ### Size Variants for Density Control
413
+
414
+ All components expose a `size` prop (`sm` / `md` / `lg`) for adapting density to the target context — tight mobile layouts or spacious desktop dashboards:
415
+
416
+ ```tsx
417
+ import { DataTable, Button, Tabs, TabList, TabTrigger } from '@jacshuo/onyx';
418
+
419
+ // Compact for mobile
420
+ <DataTable columns={columns} data={rows} size="sm" />
421
+
422
+ // Comfortable for desktop
423
+ <DataTable columns={columns} data={rows} size="lg" />
424
+
425
+ // Mix sizes to match your layout density
426
+ <Tabs defaultValue="a">
427
+ <TabList size="sm"> {/* compact tabs */}
428
+ <TabTrigger value="a">Tab A</TabTrigger>
429
+ <TabTrigger value="b">Tab B</TabTrigger>
430
+ </TabList>
431
+ </Tabs>
432
+ ```
433
+
434
+ ### Token Overrides at Breakpoints
435
+
436
+ All sizing and spacing values are CSS custom properties. Override them at any breakpoint for precisely tuned responsive behavior:
437
+
438
+ ```css
439
+ /* Default (mobile-first) form layout */
440
+ :root {
441
+ --form-label-w-md: 5rem;
442
+ --form-item-gap-md: 0.5rem;
443
+ --form-row-gap-md: 0.75rem;
444
+ }
445
+
446
+ /* Wider label column and increased spacing on desktop */
447
+ @media (min-width: 768px) {
448
+ :root {
449
+ --form-label-w-md: 7rem;
450
+ --form-item-gap-md: 0.75rem;
451
+ --form-row-gap-md: 1.25rem;
452
+ }
453
+ }
454
+ ```
455
+
456
+ ---
457
+
320
458
  ## Usage Examples
321
459
 
322
460
  ### Button
@@ -560,7 +698,7 @@ npm run typecheck
560
698
  ## Project Structure
561
699
 
562
700
  ```
563
- jac-ui/
701
+ OnyxUI/
564
702
  ├── src/
565
703
  │ ├── components/ # All React components
566
704
  │ ├── lib/utils.ts # cn() utility (clsx + tailwind-merge)
@@ -591,29 +729,6 @@ jac-ui/
591
729
 
592
730
  ---
593
731
 
594
- ## Roadmap
595
-
596
- ### Responsiveness & Mobile Support
597
-
598
- > **Current status: not supported**
599
-
600
- Onyx is a **desktop-first** library. All components are currently designed for desktop-sized viewports and pointer-based interactions. Responsive / mobile layouts are **not yet available**.
601
-
602
- This is a personal side project, and my day job keeps me quite busy. My primary interest lies in **cross-platform desktop application development** (Electron + web), which is where I spend most of my limited spare time. As a result, responsive design and mobile device support have not been prioritized — and there is **no concrete timeline** for adding them.
603
-
604
- That said, responsiveness is absolutely a worthwhile direction. If this is something you need, **pull requests are very welcome!** The rough areas that would benefit from community contributions include:
605
-
606
- - **Fluid layouts** — Making `Card`, `DataTable`, `Dialog`, etc. adapt to narrow viewports via container queries or relative units.
607
- - **Responsive typography** — Auto-scaling font sizes and spacing based on viewport width.
608
- - **Touch-friendly interactions** — Larger tap targets, swipe gestures for `CinePlayer` / `MiniPlayer`, touch-optimized drag handles.
609
- - **Adaptive component variants** — `DataTable` → card list on mobile, `SideNav` → slide-over drawer, `Header` → hamburger menu.
610
- - **Breakpoint-aware props** — e.g., `<Button size={{ base: 'sm', md: 'lg' }}>` aligned with Tailwind CSS v4 breakpoints.
611
- - **Mobile-first CSS refactor** — Layering complexity at wider breakpoints instead of overriding desktop defaults.
612
-
613
- If you're interested in contributing any of these, check out the [Contributing](#contributing) section — I'd love the help! 🙌
614
-
615
- ---
616
-
617
732
  ## Contributing
618
733
 
619
734
  1. Fork the repository
@@ -622,6 +737,12 @@ If you're interested in contributing any of these, check out the [Contributing](
622
737
  4. Push to the branch (`git push origin feature/my-feature`)
623
738
  5. Open a Pull Request
624
739
 
740
+ ### Community & Security
741
+
742
+ - Contribution guide: [CONTRIBUTING.md](./CONTRIBUTING.md)
743
+ - Code of conduct: [CODE_OF_CONDUCT.md](./.github/CODE_OF_CONDUCT.md)
744
+ - Security policy: [SECURITY.md](./.github/SECURITY.md)
745
+
625
746
  ---
626
747
 
627
748
  ## License