@kumix/ui 0.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.
package/README.md ADDED
@@ -0,0 +1,121 @@
1
+ # @kumix/ui
2
+
3
+ Headless, accessible React component library for Kumix products. Built on Radix UI, Tailwind CSS utilities, CVA, and related headless UI primitives.
4
+
5
+ ## What's Inside
6
+
7
+ - 80+ UI components: form controls, overlays, navigation, data display, DataGrid, Kanban, Sortable, and more.
8
+ - Hooks entry: viewport, media query, copy-to-clipboard, file upload, intersection observer, mutation observer, and related utilities.
9
+ - Animation components: marquee, text effects, counting/sliding numbers, animated backgrounds, avatar groups, and more.
10
+ - Tailwind-friendly styling via utility classes, semantic CSS variables, and `data-slot` attributes.
11
+ - ESM-only build with generated TypeScript declarations.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ bun add @kumix/ui
17
+ ```
18
+
19
+ Install peer dependencies required by the components you use. Common peers include:
20
+
21
+ ```bash
22
+ bun add @kumix/utils class-variance-authority lucide-react radix-ui react
23
+ ```
24
+
25
+ Feature-specific components may also require `@tanstack/react-table`, `@dnd-kit/*`, `cmdk`, `motion`, `react-day-picker`, `react-aria-components`, `react-hook-form`, `react-resizable-panels`, `sonner`, `vaul`, `input-otp`, `embla-carousel-react`, `next-themes`, or `@headless-tree/core`.
26
+
27
+ See `package.json` for exact peer dependency ranges.
28
+
29
+ ## Usage
30
+
31
+ ```tsx
32
+ import { Button, Card, CardContent, CardHeader, CardTitle } from "@kumix/ui";
33
+ import "@kumix/ui/css";
34
+
35
+ export function Example() {
36
+ return (
37
+ <Card>
38
+ <CardHeader>
39
+ <CardTitle>Kumix UI</CardTitle>
40
+ </CardHeader>
41
+ <CardContent>
42
+ <Button>Continue</Button>
43
+ </CardContent>
44
+ </Card>
45
+ );
46
+ }
47
+ ```
48
+
49
+ Hooks are available from the hooks entry:
50
+
51
+ ```tsx
52
+ import { useMediaQuery, useViewport } from "@kumix/ui/hooks";
53
+ ```
54
+
55
+ ## Package Entries
56
+
57
+ | Entry | Description |
58
+ | ----------------- | ------------------------------------- |
59
+ | `@kumix/ui` | React components |
60
+ | `@kumix/ui/hooks` | Standalone hooks |
61
+ | `@kumix/ui/css` | CSS entry emitted as `dist/style.css` |
62
+
63
+ ## Styling
64
+
65
+ Components use Tailwind utility classes and semantic CSS variables, such as `--color-background`, `--color-foreground`, `--color-primary`, `--color-border`, and related tokens.
66
+
67
+ The CSS entry currently emits the package stylesheet from `src/style.css`, which contains the Tailwind source directive for this package. Consumers should include `@kumix/ui/css` once in their app and ensure their Tailwind setup scans the package source/classes as needed.
68
+
69
+ Every component exposes `data-slot` attributes for targeted styling, for example `data-slot="button"` and `data-slot="card"`.
70
+
71
+ ## DataGrid Example
72
+
73
+ ```tsx
74
+ import {
75
+ DataGrid,
76
+ DataGridColumnHeader,
77
+ DataGridContainer,
78
+ DataGridPagination,
79
+ DataGridTable,
80
+ } from "@kumix/ui";
81
+ import {
82
+ getCoreRowModel,
83
+ getPaginationRowModel,
84
+ useReactTable,
85
+ } from "@tanstack/react-table";
86
+
87
+ const table = useReactTable({
88
+ columns,
89
+ data,
90
+ getCoreRowModel: getCoreRowModel(),
91
+ getPaginationRowModel: getPaginationRowModel(),
92
+ });
93
+
94
+ export function UsersTable() {
95
+ return (
96
+ <DataGrid table={table} recordCount={data.length}>
97
+ <DataGridContainer>
98
+ <DataGridTable />
99
+ <DataGridPagination />
100
+ </DataGridContainer>
101
+ </DataGrid>
102
+ );
103
+ }
104
+ ```
105
+
106
+ DataGrid supports TanStack Table composition, pagination, column visibility, column pinning, resizing, skeleton/spinner loading modes, expandable rows, and optional drag-and-drop table variants.
107
+
108
+ ## Development
109
+
110
+ ```bash
111
+ bun run build --filter=@kumix/ui
112
+ bun run types:check --filter=@kumix/ui
113
+ bun run test --filter=@kumix/ui
114
+ bun run test:coverage --filter=@kumix/ui
115
+ ```
116
+
117
+ The build emits ESM JavaScript, TypeScript declarations, and CSS output. Package validation uses Are The Types Wrong and `publint`.
118
+
119
+ ## License
120
+
121
+ MIT - see [LICENSE](../../LICENSE).