skyloom-ui 0.1.0 → 0.1.1

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 (2) hide show
  1. package/README.md +63 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,60 @@
1
1
  # skyloom-ui
2
2
 
3
- The frontend's single shared UI package. All controls and compositions live in `src/components`, exported from `skyloom-ui`. There is no separate commoncomponents package or folder. These are locally authored shadcn-style wrappers, with Radix primitives providing interactive accessibility behavior.
3
+ Theme-token-based React components, layouts, data tables, and charts for React 19 and Tailwind CSS v4. Interactive components use Radix primitives for accessible behavior.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install skyloom-ui
9
+ ```
10
+
11
+ React and React DOM are peer dependencies and must be available in your application.
12
+
13
+ Import the package stylesheet after Tailwind in your global CSS:
14
+
15
+ ```css
16
+ @import "tailwindcss";
17
+ @import "skyloom-ui/styles.css";
18
+ ```
19
+
20
+ For Next.js, add the package to `transpilePackages` in `next.config.ts`:
21
+
22
+ ```ts
23
+ import type { NextConfig } from "next";
24
+
25
+ const nextConfig: NextConfig = {
26
+ transpilePackages: ["skyloom-ui"],
27
+ };
28
+
29
+ export default nextConfig;
30
+ ```
31
+
32
+ ## Quick start
33
+
34
+ ```tsx
35
+ import { Button, Card, CardContent, CardHeader, CardTitle } from "skyloom-ui";
36
+
37
+ export function WelcomeCard() {
38
+ return (
39
+ <Card>
40
+ <CardHeader>
41
+ <CardTitle>Welcome</CardTitle>
42
+ </CardHeader>
43
+ <CardContent>
44
+ <Button>Get started</Button>
45
+ </CardContent>
46
+ </Card>
47
+ );
48
+ }
49
+ ```
50
+
51
+ Set the theme and density on the document root:
52
+
53
+ ```html
54
+ <html lang="en" data-theme="light" data-density="comfortable">
55
+ ```
56
+
57
+ Available themes are `light` and `dark`; densities are `comfortable` (default) and `compact`.
4
58
 
5
59
  ```tsx
6
60
  import { Button, SelectField, MultiSelect, Card, Dialog, Sheet, ResponsiveGrid } from "skyloom-ui";
@@ -87,15 +141,15 @@ MultiSelect supports Select all, mixed state, disabled options, and empty option
87
141
 
88
142
  Supply DialogTitle/SheetTitle and descriptions in overlays. Label switches and icon-only buttons. Tooltips require TooltipProvider and must not hold essential information available only on hover. Button defaults to type="button"; pass type="submit" explicitly. Button asChild expects one appropriate interactive child, such as a link; native button disabled semantics do not automatically apply to links. Accordion accepts Radix single/multiple modes. Keep business logic out of these wrappers.
89
143
 
90
- ## Integration and checks
144
+ ## Styles and exports
91
145
 
92
- Install workspace dependencies from frontend with `npm install`. Add `skyloom-ui` to the Next.js `transpilePackages` array. In the consuming app's global stylesheet:
146
+ The package exports its components from `skyloom-ui` and provides two stylesheet entry points:
93
147
 
94
- ```css
95
- @import "tailwindcss";
96
- @import "skyloom-ui/styles.css";
97
- ```
148
+ - `skyloom-ui/styles.css` includes the theme, Tailwind utility mappings, responsive tokens, and shared state styles. Import this stylesheet for normal use.
149
+ - `skyloom-ui/tokens.css` contains the design-token CSS variables when you need tokens without the full stylesheet.
150
+
151
+ The stylesheet registers package component sources for Tailwind CSS v4 class scanning. Load it in your app's global stylesheet so the component styles and utilities are included.
98
152
 
99
- The stylesheet registers package sources for Tailwind class scanning. Run `npm run check` from frontend for TypeScript, compiled token/responsive checks, and component interaction tests. The optional Windows Rolldown binding is pinned to the runner's version to work around npm omitting it during install.
153
+ ## Development
100
154
 
101
- The skill source is `frontend/skills/sky-ui-tokens/SKILL.md`. Browse `/design-system` or `/design-system/analytics` in the Next.js app. The ecommerce app is still planned. Use the frontend Playwright tests for real viewport verification; jsdom tests do not replace it.
155
+ From the repository's `frontend` directory, install dependencies with `npm install`. Run `npm run check` to type-check the frontend, verify compiled token and responsive styles, and run component interaction tests.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skyloom-ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {