@sckyzo/cosmos-react 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,26 @@ All notable changes to `@sckyzo/cosmos-react` are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.0.3](https://github.com/SckyzO/cosmos/compare/@sckyzo/cosmos-react@0.0.2...@sckyzo/cosmos-react@0.0.3) (2026-07-17)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **react:** accessibility of overlay components ([d9ca403](https://github.com/SckyzO/cosmos/commit/d9ca40360bd7e7d7f61a6a23d406018996b6dee5))
14
+ * **react:** add menu semantics and keyboard nav to Dropdown ([f60d06f](https://github.com/SckyzO/cosmos/commit/f60d06fe451af570967824d970a359001d9ba0a1))
15
+ * **react:** export the 7 unreachable page components ([1b7d60c](https://github.com/SckyzO/cosmos/commit/1b7d60c647d609b02ea704374fca56aa3a7018b5))
16
+ * **react:** give ConfirmationModal a unique title id and focus trap ([0a703c4](https://github.com/SckyzO/cosmos/commit/0a703c43e13a514b061d31dc8aeda2cbd9ee5b86))
17
+ * **react:** trap focus and name Modal and Drawer dialogs ([53564d1](https://github.com/SckyzO/cosmos/commit/53564d1a65e96c29849e8581b1b22c25d04545bd))
18
+
19
+ ## [0.0.2] - 2026-05-21
20
+
21
+ Packaging/metadata only — no component or API changes.
22
+
23
+ ### Changed
24
+
25
+ - Sharper npm package description.
26
+ - First release published via npm OIDC trusted publishing (provenance attached).
27
+
8
28
  ## [0.0.1] - 2026-05-20
9
29
 
10
30
  First test release.
package/README.md CHANGED
@@ -1,33 +1,72 @@
1
1
  # @sckyzo/cosmos-react
2
2
 
3
- React 19 component library — Cosmos design system.
3
+ [![npm](https://img.shields.io/npm/v/@sckyzo/cosmos-react)](https://www.npmjs.com/package/@sckyzo/cosmos-react)
4
4
 
5
- **Status: Phase 1 (extraction in progress)** — components are being extracted from
6
- [rackscope](https://github.com/SckyzO/rackscope) `EmptyPage.tsx` and
7
- `TemplateDefaultPage.tsx`. See parent repo [`cosmos`](https://github.com/SckyzO/cosmos)
8
- for the roadmap.
5
+ React 19 component library for the Cosmos design system. 135+ themeable,
6
+ accessible components, built with Tailwind 4 and shipped as ESM + CJS + types.
7
+
8
+ Browse the full catalog in the [live Storybook](https://sckyzo.github.io/cosmos/).
9
9
 
10
10
  ## Install
11
11
 
12
12
  ```bash
13
13
  pnpm add @sckyzo/cosmos-react @sckyzo/cosmos-theme
14
- # Required peers (likely already in your app):
15
- pnpm add react react-dom
14
+ pnpm add react react-dom # peers, react 19+
16
15
  ```
17
16
 
18
- ## Usage
17
+ `@sckyzo/cosmos-theme` carries the CSS (tokens, fonts, light/dark vars). The
18
+ components render unstyled without it.
19
+
20
+ ## Set up the styles
21
+
22
+ Components are styled with Tailwind 4 utility classes, so your app's Tailwind
23
+ build has to generate those classes. Tailwind only scans your own source by
24
+ default, so you **must** point `@source` at the installed package. Without it no
25
+ Cosmos utility classes are generated and every component renders unstyled.
26
+
27
+ In your main CSS file:
28
+
29
+ ```css
30
+ @import 'tailwindcss';
31
+
32
+ /* Required: let Tailwind scan the compiled components for class names.
33
+ The path is relative to this CSS file; adjust the depth to your layout. */
34
+ @source '../node_modules/@sckyzo/cosmos-react/dist/**/*.{js,cjs}';
35
+
36
+ /* Cosmos tokens (the @theme block) then the light/dark CSS vars. */
37
+ @import '@sckyzo/cosmos-theme/tailwind';
38
+ @import '@sckyzo/cosmos-theme/vars';
39
+
40
+ /* Optional: the Outfit + JetBrains Mono webfonts. */
41
+ @import '@sckyzo/cosmos-theme/fonts';
42
+ ```
43
+
44
+ If you also use `@sckyzo/cosmos-charts`, add a second `@source` line for its
45
+ `dist` the same way.
46
+
47
+ ## Use
19
48
 
20
49
  ```tsx
21
- // Apps must import the theme CSS once:
22
- import '@sckyzo/cosmos-theme/fonts';
23
- import '@sckyzo/cosmos-theme/tailwind';
24
- import 'tailwindcss';
25
- import '@sckyzo/cosmos-theme/vars';
26
-
27
- // Then use components:
28
- import {} from /* coming in Phase 1 */ '@sckyzo/cosmos-react';
50
+ import { useState } from 'react';
51
+ import { Button, Modal } from '@sckyzo/cosmos-react';
52
+
53
+ function Example() {
54
+ const [open, setOpen] = useState(false);
55
+ return (
56
+ <>
57
+ <Button onClick={() => setOpen(true)}>Open</Button>
58
+ <Modal open={open} onClose={() => setOpen(false)}>
59
+ <Modal.Header title="Hello from Cosmos" onClose={() => setOpen(false)} />
60
+ <Modal.Body>A themed, focus-trapped dialog.</Modal.Body>
61
+ </Modal>
62
+ </>
63
+ );
64
+ }
29
65
  ```
30
66
 
67
+ Charts live in a separate package, [`@sckyzo/cosmos-charts`](../charts), so apps
68
+ that don't render charts don't ship the ApexCharts bundle.
69
+
31
70
  ## License
32
71
 
33
72
  MIT — see [LICENSE](../../LICENSE).