@kumix/ui 0.1.2 → 0.1.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/README.md CHANGED
@@ -57,17 +57,27 @@ import { useMediaQuery, useViewport } from "@kumix/ui/hooks";
57
57
 
58
58
  ## Package Entries
59
59
 
60
- | Entry | Description |
61
- | ----------------- | ------------------------------------- |
62
- | `@kumix/ui` | React components |
63
- | `@kumix/ui/hooks` | Standalone hooks |
64
- | `@kumix/ui/css` | CSS entry emitted as `dist/style.css` |
60
+ | Entry | Description |
61
+ | ---------------------- | --------------------------------------------------------------- |
62
+ | `@kumix/ui` | React components |
63
+ | `@kumix/ui/hooks` | Standalone hooks |
64
+ | `@kumix/ui/css` | Full stylesheet (theme + tokens), emitted as `dist/style.css` |
65
+ | `@kumix/ui/css/source` | Tailwind `@source` directive only, emitted as `dist/source.css` |
65
66
 
66
67
  ## Styling
67
68
 
68
69
  Components use Tailwind utility classes and semantic CSS variables, such as `--color-background`, `--color-foreground`, `--color-primary`, `--color-border`, and related tokens.
69
70
 
70
- 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.
71
+ There are two CSS entries depending on your setup:
72
+
73
+ - `@kumix/ui/css` emits the full package stylesheet from `src/style.css`. It bundles the theme tokens (`:root`/`.dark` variables), the `@theme inline` mappings, animations, and base styles. Import it once in your app if you want the complete Kumix theme out of the box.
74
+ - `@kumix/ui/css/source` emits `src/source.css`, which contains only the Tailwind `@source "."` directive. Import it in your own Tailwind v4 stylesheet when you already define your own theme and just need Tailwind to scan the compiled component classes shipped in `dist`.
75
+
76
+ ```css
77
+ /* Your app stylesheet, Tailwind v4 */
78
+ @import "tailwindcss";
79
+ @import "@kumix/ui/css/source";
80
+ ```
71
81
 
72
82
  Every component exposes `data-slot` attributes for targeted styling, for example `data-slot="button"` and `data-slot="card"`.
73
83
 
package/dist/index.d.ts CHANGED
@@ -459,8 +459,8 @@ declare function AccordionMenuIndicator({ className, ...props }: AccordionMenuIn
459
459
  //#endregion
460
460
  //#region src/ui/alert.d.ts
461
461
  declare const alertVariants: (props?: ({
462
- variant?: "destructive" | "secondary" | "primary" | "success" | "info" | "mono" | "warning" | null | undefined;
463
- icon?: "destructive" | "primary" | "success" | "info" | "warning" | null | undefined;
462
+ variant?: "primary" | "mono" | "destructive" | "secondary" | "success" | "warning" | "info" | null | undefined;
463
+ icon?: "primary" | "destructive" | "success" | "warning" | "info" | null | undefined;
464
464
  appearance?: "light" | "outline" | "solid" | "stroke" | null | undefined;
465
465
  size?: "sm" | "lg" | "md" | null | undefined;
466
466
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -478,14 +478,14 @@ declare function AlertContent({ className, ...props }: React$2.HTMLAttributes<HT
478
478
  //#endregion
479
479
  //#region src/ui/button.d.ts
480
480
  declare const buttonVariants: (props?: ({
481
- variant?: "outline" | "destructive" | "secondary" | "primary" | "mono" | "ghost" | "dashed" | "dim" | "foreground" | "inverse" | null | undefined;
481
+ variant?: "outline" | "primary" | "mono" | "destructive" | "secondary" | "dashed" | "ghost" | "dim" | "foreground" | "inverse" | null | undefined;
482
482
  appearance?: "default" | "ghost" | null | undefined;
483
- underline?: "solid" | "dashed" | null | undefined;
484
- underlined?: "solid" | "dashed" | null | undefined;
485
- size?: "sm" | "lg" | "icon" | "md" | "xs" | null | undefined;
483
+ underline?: "dashed" | "solid" | null | undefined;
484
+ underlined?: "dashed" | "solid" | null | undefined;
485
+ size?: "sm" | "lg" | "md" | "xs" | "icon" | null | undefined;
486
486
  autoHeight?: boolean | null | undefined;
487
487
  radius?: "md" | "full" | null | undefined;
488
- mode?: "default" | "icon" | "input" | "link" | null | undefined;
488
+ mode?: "default" | "icon" | "link" | "input" | null | undefined;
489
489
  placeholder?: boolean | null | undefined;
490
490
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
491
491
  declare function Button({ className, selected, variant, radius, appearance, mode, size, autoHeight, underlined, underline, asChild, placeholder, ...props }: React$2.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
@@ -547,7 +547,7 @@ declare function AvatarStatus({ className, variant, ...props }: React$2.HTMLAttr
547
547
  //#endregion
548
548
  //#region src/ui/badge.d.ts
549
549
  declare const badgeVariants: (props?: ({
550
- variant?: "outline" | "destructive" | "secondary" | "primary" | "success" | "info" | "warning" | null | undefined;
550
+ variant?: "outline" | "primary" | "destructive" | "secondary" | "success" | "warning" | "info" | null | undefined;
551
551
  appearance?: "light" | "default" | "outline" | "ghost" | null | undefined;
552
552
  disabled?: boolean | null | undefined;
553
553
  size?: "sm" | "lg" | "md" | "xs" | null | undefined;
@@ -1097,7 +1097,7 @@ declare class ErrorBoundary extends React$2.Component<ErrorBoundaryProps, ErrorB
1097
1097
  //#endregion
1098
1098
  //#region src/ui/label.d.ts
1099
1099
  declare const labelVariants: (props?: ({
1100
- variant?: "secondary" | "primary" | null | undefined;
1100
+ variant?: "primary" | "secondary" | null | undefined;
1101
1101
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
1102
1102
  declare function Label({ className, variant, ...props }: React$2.ComponentProps<typeof Label$1.Root> & VariantProps<typeof labelVariants>): React$2.JSX.Element;
1103
1103
  //#endregion
@@ -0,0 +1 @@
1
+ @source ".";
@@ -0,0 +1,3 @@
1
+ declare const sourcetylesheet: string;
2
+
3
+ export default sourcetylesheet;
package/dist/style.css CHANGED
@@ -1 +1,248 @@
1
+ @import "tw-animate-css";
2
+
1
3
  @source ".";
4
+
5
+ @custom-variant dark (&:is(.dark *));
6
+
7
+ :root {
8
+ /** Base Colors **/
9
+ --background: oklch(1 0 0);
10
+ --foreground: oklch(0.145 0 0);
11
+
12
+ --card: oklch(1 0 0);
13
+ --card-foreground: oklch(0.145 0 0);
14
+
15
+ --popover: oklch(1 0 0);
16
+ --popover-foreground: oklch(0.145 0 0);
17
+
18
+ --primary: oklch(0.205 0 0);
19
+ --primary-foreground: oklch(0.985 0 0);
20
+
21
+ --secondary: oklch(0.97 0 0);
22
+ --secondary-foreground: oklch(0.205 0 0);
23
+
24
+ --muted: oklch(0.97 0 0);
25
+ --muted-foreground: oklch(0.556 0 0);
26
+
27
+ --accent: oklch(0.97 0 0);
28
+ --accent-foreground: oklch(0.205 0 0);
29
+
30
+ --destructive: oklch(0.577 0.245 27.325);
31
+ --destructive-foreground: oklch(0.97 0 0);
32
+
33
+ --chart-1: oklch(0.646 0.222 41.116);
34
+ --chart-2: oklch(0.6 0.118 184.704);
35
+ --chart-3: oklch(0.398 0.07 227.392);
36
+ --chart-4: oklch(0.828 0.189 84.429);
37
+ --chart-5: oklch(0.769 0.188 70.08);
38
+
39
+ --sidebar: oklch(0.985 0 0);
40
+ --sidebar-foreground: oklch(0.145 0 0);
41
+ --sidebar-primary: oklch(0.205 0 0);
42
+ --sidebar-primary-foreground: oklch(0.985 0 0);
43
+ --sidebar-accent: oklch(0.97 0 0);
44
+ --sidebar-accent-foreground: oklch(0.205 0 0);
45
+ --sidebar-border: oklch(0.922 0 0);
46
+ --sidebar-ring: oklch(0.708 0 0);
47
+
48
+ /** Base Styles **/
49
+ --border: oklch(0.922 0 0);
50
+ --input: oklch(0.922 0 0);
51
+ --ring: oklch(0.708 0 0);
52
+ --radius: 0.5rem;
53
+
54
+ /* Extended colors */
55
+ --success: var(--color-emerald-500);
56
+ --success-foreground: var(--color-emerald-900);
57
+ --info: var(--color-violet-500);
58
+ --info-foreground: var(--color-violet-900);
59
+ --warning: var(--color-yellow-500);
60
+ --warning-foreground: var(--color-yellow-900);
61
+ --invert: var(--color-zinc-900);
62
+ --invert-foreground: var(--color-zinc-50);
63
+
64
+ /** Dashboard **/
65
+ --sidebar-width: 280px;
66
+ --header-height: 60px;
67
+ }
68
+
69
+ .dark {
70
+ /** Base Colors **/
71
+ --background: oklch(0.145 0 0);
72
+ --foreground: oklch(0.985 0 0);
73
+
74
+ --card: oklch(0.205 0 0);
75
+ --card-foreground: oklch(0.985 0 0);
76
+
77
+ --popover: oklch(0.269 0 0);
78
+ --popover-foreground: oklch(0.985 0 0);
79
+
80
+ --primary: oklch(0.922 0 0);
81
+ --primary-foreground: oklch(0.205 0 0);
82
+
83
+ --secondary: oklch(0.269 0 0);
84
+ --secondary-foreground: oklch(0.985 0 0);
85
+
86
+ --muted: oklch(0.269 0 0);
87
+ --muted-foreground: oklch(0.708 0 0);
88
+
89
+ --accent: oklch(0.371 0 0);
90
+ --accent-foreground: oklch(0.985 0 0);
91
+
92
+ --destructive: oklch(0.704 0.191 22.216);
93
+ --destructive-foreground: oklch(0.985 0 0);
94
+
95
+ --chart-1: oklch(0.488 0.243 264.376);
96
+ --chart-2: oklch(0.696 0.17 162.48);
97
+ --chart-3: oklch(0.769 0.188 70.08);
98
+ --chart-4: oklch(0.627 0.265 303.9);
99
+ --chart-5: oklch(0.645 0.246 16.439);
100
+
101
+ --sidebar: oklch(0.205 0 0);
102
+ --sidebar-foreground: oklch(0.985 0 0);
103
+ --sidebar-primary: oklch(0.488 0.243 264.376);
104
+ --sidebar-primary-foreground: oklch(0.985 0 0);
105
+ --sidebar-accent: oklch(0.269 0 0);
106
+ --sidebar-accent-foreground: oklch(0.985 0 0);
107
+ --sidebar-border: oklch(1 0 0 / 10%);
108
+ --sidebar-ring: oklch(0.439 0 0);
109
+
110
+ /** Base Styles **/
111
+ --border: oklch(1 0 0 / 10%);
112
+ --input: oklch(1 0 0 / 15%);
113
+ --ring: oklch(0.556 0 0);
114
+
115
+ /* Extended colors */
116
+ --success: var(--color-emerald-500);
117
+ --success-foreground: var(--color-emerald-600);
118
+ --info: var(--color-violet-500);
119
+ --info-foreground: var(--color-violet-600);
120
+ --warning: var(--color-yellow-500);
121
+ --warning-foreground: var(--color-yellow-600);
122
+ --invert: var(--color-zinc-700);
123
+ --invert-foreground: var(--color-zinc-50);
124
+ }
125
+
126
+ /** Theme Setup **/
127
+ @theme inline {
128
+ /** Base Colors **/
129
+ --color-background: var(--background);
130
+ --color-foreground: var(--foreground);
131
+
132
+ --color-card: var(--card);
133
+ --color-card-foreground: var(--card-foreground);
134
+
135
+ --color-popover: var(--popover);
136
+ --color-popover-foreground: var(--popover-foreground);
137
+
138
+ --color-primary: var(--primary);
139
+ --color-primary-foreground: var(--primary-foreground);
140
+
141
+ --color-secondary: var(--secondary);
142
+ --color-secondary-foreground: var(--secondary-foreground);
143
+
144
+ --color-muted: var(--muted);
145
+ --color-muted-foreground: var(--muted-foreground);
146
+
147
+ --color-accent: var(--accent);
148
+ --color-accent-foreground: var(--accent-foreground);
149
+
150
+ --color-destructive: var(--destructive);
151
+ --color-destructive-foreground: var(--destructive-foreground);
152
+
153
+ --color-chart-1: var(--chart-1);
154
+ --color-chart-2: var(--chart-2);
155
+ --color-chart-3: var(--chart-3);
156
+ --color-chart-4: var(--chart-4);
157
+ --color-chart-5: var(--chart-5);
158
+
159
+ --color-sidebar-ring: var(--sidebar-ring);
160
+ --color-sidebar-border: var(--sidebar-border);
161
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
162
+ --color-sidebar-accent: var(--sidebar-accent);
163
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
164
+ --color-sidebar-primary: var(--sidebar-primary);
165
+ --color-sidebar-foreground: var(--sidebar-foreground);
166
+ --color-sidebar: var(--sidebar);
167
+
168
+ /** Base Styles **/
169
+ --color-border: var(--border);
170
+ --color-input: var(--input);
171
+ --color-ring: var(--ring);
172
+
173
+ /* Extended colors */
174
+ --color-success: var(--success);
175
+ --color-success-foreground: var(--success-foreground);
176
+ --color-info: var(--info);
177
+ --color-info-foreground: var(--info-foreground);
178
+ --color-warning: var(--warning);
179
+ --color-warning-foreground: var(--warning-foreground);
180
+ --color-invert: var(--invert);
181
+ --color-invert-foreground: var(--invert-foreground);
182
+
183
+ --radius-xl: calc(var(--radius) + 4px);
184
+ --radius-lg: var(--radius);
185
+ --radius-md: calc(var(--radius) - 2px);
186
+ --radius-sm: calc(var(--radius) - 4px);
187
+
188
+ --animate-marquee: marquee var(--duration) infinite linear;
189
+ --animate-marquee-vertical: marquee-vertical var(--duration) linear infinite;
190
+
191
+ @keyframes marquee {
192
+ from {
193
+ transform: translateX(0);
194
+ }
195
+ to {
196
+ transform: translateX(calc(-100% - var(--gap)));
197
+ }
198
+ }
199
+
200
+ @keyframes marquee-vertical {
201
+ from {
202
+ transform: translateY(0);
203
+ }
204
+ to {
205
+ transform: translateY(calc(-100% - var(--gap)));
206
+ }
207
+ }
208
+
209
+ @keyframes move {
210
+ to {
211
+ transform: translateX(0);
212
+ }
213
+ }
214
+ }
215
+
216
+ /** Custom Scrollbar **/
217
+ @layer base {
218
+ ::-webkit-scrollbar {
219
+ width: 5px;
220
+ }
221
+
222
+ ::-webkit-scrollbar-track {
223
+ background: transparent;
224
+ }
225
+
226
+ ::-webkit-scrollbar-thumb {
227
+ background: var(--input);
228
+ border-radius: 5px;
229
+ }
230
+
231
+ * {
232
+ scrollbar-width: thin;
233
+ scrollbar-color: var(--input) transparent;
234
+ }
235
+
236
+ ::selection {
237
+ color: var(--primary-foreground);
238
+ background: var(--primary);
239
+ }
240
+
241
+ * {
242
+ @apply border-border outline-ring/50;
243
+ }
244
+
245
+ body {
246
+ @apply bg-background text-foreground;
247
+ }
248
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumix/ui",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Headless, accessible React component library built on Radix UI, Tailwind, and more.",
5
5
  "author": "Kumix Labs <hai@kumix.io>",
6
6
  "license": "MIT",
@@ -13,6 +13,10 @@
13
13
  "types": "./dist/style.css.d.ts",
14
14
  "default": "./dist/style.css"
15
15
  },
16
+ "./css/source": {
17
+ "types": "./dist/source.css.d.ts",
18
+ "default": "./dist/source.css"
19
+ },
16
20
  ".": {
17
21
  "types": "./dist/index.d.ts",
18
22
  "default": "./dist/index.js"
@@ -26,7 +30,8 @@
26
30
  "clean": "rimraf dist",
27
31
  "clean:all": "rimraf .turbo coverage dist node_modules",
28
32
  "dev": "tsdown --watch",
29
- "build": "rimraf dist && mkdir -p dist && cp src/style.css.d.ts dist/style.css.d.ts && tsdown && publint",
33
+ "build:css": "cp src/style.css dist/style.css && cp src/source.css dist/source.css && cp src/style.css.d.ts dist/style.css.d.ts && cp src/source.css.d.ts dist/source.css.d.ts",
34
+ "build": "rimraf dist && mkdir -p dist && bun run build:css && tsdown && publint",
30
35
  "types:check": "tsc --noEmit",
31
36
  "test": "vitest run",
32
37
  "test:watch": "vitest",
@@ -51,6 +56,9 @@
51
56
  "react",
52
57
  "ui"
53
58
  ],
59
+ "dependencies": {
60
+ "tw-animate-css": "^1.4.0"
61
+ },
54
62
  "devDependencies": {
55
63
  "@base-ui/react": "^1.6.0",
56
64
  "@dnd-kit/core": "^6.3.1",
@@ -58,7 +66,7 @@
58
66
  "@dnd-kit/sortable": "^10.0.0",
59
67
  "@dnd-kit/utilities": "^3.2.2",
60
68
  "@headless-tree/core": "^1.7.0",
61
- "@kumix/tsconfig": "^0.1.0",
69
+ "@kumix/tsconfig": "0.1.0",
62
70
  "@kumix/utils": "^0.1.2",
63
71
  "@shadcn/react": "^0.2.1",
64
72
  "@tanstack/react-table": "^8.21.3",
@@ -78,8 +86,8 @@
78
86
  "react-resizable-panels": "^4.12.1",
79
87
  "recharts": "^3.9.2",
80
88
  "sonner": "^2.0.7",
81
- "tsdown": "^0.22.4",
82
- "typescript": "^6.0.3",
89
+ "tsdown": "0.22.4",
90
+ "typescript": "6.0.3",
83
91
  "vaul": "^1.1.2"
84
92
  },
85
93
  "peerDependencies": {