@olwiba/cn 0.1.14

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/package.json ADDED
@@ -0,0 +1,126 @@
1
+ {
2
+ "name": "@olwiba/cn",
3
+ "version": "0.1.14",
4
+ "private": false,
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "description": "Shared UI primitives, styling foundations, and shadcn registry components for the Olwiba ecosystem",
8
+ "main": "./dist/index.js",
9
+ "module": "./dist/index.js",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js"
14
+ },
15
+ "./styles": "./src/styles/preset.css",
16
+ "./theme": "./src/styles/theme.css",
17
+ "./preset": "./src/styles/preset.css"
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "src/styles/theme.css",
22
+ "src/styles/preset.css"
23
+ ],
24
+ "scripts": {
25
+ "dev": "tsup --watch",
26
+ "build": "tsup",
27
+ "web:dev": "fumadocs-mdx && vite dev",
28
+ "web:build": "fumadocs-mdx && bun run registry:build && vite build",
29
+ "start": "bun run server.ts",
30
+ "registry:build": "npx shadcn@latest build",
31
+ "tsc": "tsc",
32
+ "types:check": "fumadocs-mdx && tsc --noEmit",
33
+ "iso:generate": "bun scripts/generate-iso-previews.ts"
34
+ },
35
+ "dependencies": {
36
+ "@hookform/resolvers": "^5.2.2",
37
+ "@radix-ui/react-accordion": "^1.2.12",
38
+ "@radix-ui/react-alert-dialog": "^1.1.15",
39
+ "@radix-ui/react-aspect-ratio": "^1.1.8",
40
+ "@radix-ui/react-avatar": "^1.1.11",
41
+ "@radix-ui/react-checkbox": "^1.3.3",
42
+ "@radix-ui/react-collapsible": "^1.1.12",
43
+ "@radix-ui/react-context-menu": "^2.2.16",
44
+ "@radix-ui/react-dialog": "^1.1.15",
45
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
46
+ "@radix-ui/react-hover-card": "^1.1.15",
47
+ "@radix-ui/react-label": "^2.1.8",
48
+ "@radix-ui/react-menubar": "^1.1.16",
49
+ "@radix-ui/react-navigation-menu": "^1.2.14",
50
+ "@radix-ui/react-popover": "^1.1.15",
51
+ "@radix-ui/react-progress": "^1.1.8",
52
+ "@radix-ui/react-radio-group": "^1.3.8",
53
+ "@radix-ui/react-scroll-area": "^1.2.10",
54
+ "@radix-ui/react-select": "^2.2.6",
55
+ "@radix-ui/react-separator": "^1.1.8",
56
+ "@radix-ui/react-slider": "^1.3.6",
57
+ "@radix-ui/react-slot": "^1.2.4",
58
+ "@radix-ui/react-switch": "^1.2.6",
59
+ "@radix-ui/react-tabs": "^1.1.13",
60
+ "@radix-ui/react-toggle": "^1.1.10",
61
+ "@radix-ui/react-toggle-group": "^1.1.11",
62
+ "@radix-ui/react-tooltip": "^1.2.8",
63
+ "canvas-confetti": "^1.9.3",
64
+ "class-variance-authority": "^0.7.1",
65
+ "clsx": "^2.1.1",
66
+ "cmdk": "^1.1.1",
67
+ "date-fns": "^4.1.0",
68
+ "embla-carousel-react": "^8.6.0",
69
+ "input-otp": "^1.4.2",
70
+ "lucide-react": "^0.562.0",
71
+ "next-themes": "^0.4.6",
72
+ "react": "^19.0.0",
73
+ "react-day-picker": "^9.13.0",
74
+ "react-dom": "^19.0.0",
75
+ "react-hook-form": "^7.71.1",
76
+ "react-resizable-panels": "^4.4.1",
77
+ "recharts": "2.15.4",
78
+ "sonner": "^2.0.7",
79
+ "tailwind-merge": "^3.4.0",
80
+ "vaul": "^1.1.2",
81
+ "zod": "^4.3.5"
82
+ },
83
+ "peerDependencies": {
84
+ "react": ">=18.0.0",
85
+ "react-dom": ">=18.0.0",
86
+ "tailwindcss": ">=4.0.0"
87
+ },
88
+ "devDependencies": {
89
+ "@olwiba/dx": "0.0.10",
90
+ "@tailwindcss/postcss": "^4.1.18",
91
+ "@tanstack/react-router": "^1.151.6",
92
+ "@tanstack/react-router-devtools": "^1.151.6",
93
+ "@tanstack/react-start": "^1.153.0",
94
+ "@types/canvas-confetti": "^1.9.0",
95
+ "@types/mdx": "^2.0.13",
96
+ "@types/node": "^22.5.4",
97
+ "@types/react": "^19.0.8",
98
+ "@types/react-dom": "^19.0.3",
99
+ "@vitejs/plugin-react": "^4.6.0",
100
+ "fumadocs-core": "^16.4.7",
101
+ "fumadocs-mdx": "^14.2.6",
102
+ "fumadocs-ui": "^16.4.7",
103
+ "hono": "^4.7.0",
104
+ "puppeteer-core": "^24.43.0",
105
+ "rehype-pretty-code": "^0.14.0",
106
+ "shiki": "^3.0.0",
107
+ "tailwindcss": "^4.1.18",
108
+ "tsup": "^8.5.1",
109
+ "tw-animate-css": "^1.4.0",
110
+ "typescript": "^5.7.2",
111
+ "vite": "^7.3.1",
112
+ "vite-tsconfig-paths": "^5.1.4"
113
+ },
114
+ "homepage": "https://cn.olwiba.com",
115
+ "repository": {
116
+ "type": "git",
117
+ "url": "https://github.com/Olwiba/olwibaCN"
118
+ },
119
+ "publishConfig": {
120
+ "registry": "https://registry.npmjs.org/",
121
+ "access": "public"
122
+ },
123
+ "author": "Olwiba",
124
+ "license": "MIT",
125
+ "types": "./dist/index.d.ts"
126
+ }
@@ -0,0 +1,107 @@
1
+ /**
2
+ * @olwiba/cn — default preset
3
+ *
4
+ * Drop-in CSS for consumers who want everything working immediately.
5
+ * Includes the @theme inline mapping layer + Emerald default values
6
+ * for both light and dark mode.
7
+ *
8
+ * Override any variable in your own CSS after this import to customise.
9
+ *
10
+ * Usage:
11
+ * @import 'tailwindcss';
12
+ * @import '@olwiba/cn/preset';
13
+ *
14
+ * (optional overrides)
15
+ * :root {
16
+ * --primary: oklch(0.546 0.245 262.881);
17
+ * }
18
+ */
19
+
20
+ @import './theme.css';
21
+
22
+ :root {
23
+ --radius: 0.25rem;
24
+
25
+ --background: oklch(1 0 0);
26
+ --foreground: oklch(0.145 0 0);
27
+ --card: oklch(1 0 0);
28
+ --card-foreground: oklch(0.145 0 0);
29
+ --popover: oklch(1 0 0);
30
+ --popover-foreground: oklch(0.145 0 0);
31
+
32
+ --primary: oklch(0.596 0.145 163.225);
33
+ --primary-foreground: oklch(0.985 0 0);
34
+ --secondary: oklch(0.97 0 0);
35
+ --secondary-foreground: oklch(0.205 0 0);
36
+ --muted: oklch(0.97 0 0);
37
+ --muted-foreground: oklch(0.556 0 0);
38
+ --accent: oklch(0.97 0 0);
39
+ --accent-foreground: oklch(0.205 0 0);
40
+ --destructive: oklch(0.577 0.245 27.325);
41
+ --border: oklch(0.922 0 0);
42
+ --input: oklch(0.922 0 0);
43
+ --ring: oklch(0.596 0.145 163.225);
44
+
45
+ --chart-1: oklch(0.765 0.177 163.223);
46
+ --chart-2: oklch(0.696 0.17 162.48);
47
+ --chart-3: oklch(0.596 0.145 163.225);
48
+ --chart-4: oklch(0.508 0.118 165.612);
49
+ --chart-5: oklch(0.432 0.095 166.913);
50
+
51
+ --sidebar: oklch(0.985 0 0);
52
+ --sidebar-foreground: oklch(0.145 0 0);
53
+ --sidebar-primary: oklch(0.596 0.145 163.225);
54
+ --sidebar-primary-foreground: oklch(0.985 0 0);
55
+ --sidebar-accent: oklch(0.97 0 0);
56
+ --sidebar-accent-foreground: oklch(0.205 0 0);
57
+ --sidebar-border: oklch(0.922 0 0);
58
+ --sidebar-ring: oklch(0.596 0.145 163.225);
59
+ }
60
+
61
+ .dark {
62
+ --background: oklch(0.145 0 0);
63
+ --foreground: oklch(0.985 0 0);
64
+ --card: oklch(0.205 0 0);
65
+ --card-foreground: oklch(0.985 0 0);
66
+ --popover: oklch(0.269 0 0);
67
+ --popover-foreground: oklch(0.985 0 0);
68
+
69
+ --primary: oklch(0.765 0.177 163.223);
70
+ --primary-foreground: oklch(0.145 0 0);
71
+ --secondary: oklch(0.269 0 0);
72
+ --secondary-foreground: oklch(0.985 0 0);
73
+ --muted: oklch(0.269 0 0);
74
+ --muted-foreground: oklch(0.708 0 0);
75
+ --accent: oklch(0.371 0 0);
76
+ --accent-foreground: oklch(0.985 0 0);
77
+ --destructive: oklch(0.704 0.191 22.216);
78
+ --border: oklch(1 0 0 / 10%);
79
+ --input: oklch(1 0 0 / 15%);
80
+ --ring: oklch(0.765 0.177 163.223);
81
+
82
+ --chart-1: oklch(0.765 0.177 163.223);
83
+ --chart-2: oklch(0.696 0.17 162.48);
84
+ --chart-3: oklch(0.596 0.145 163.225);
85
+ --chart-4: oklch(0.508 0.118 165.612);
86
+ --chart-5: oklch(0.432 0.095 166.913);
87
+
88
+ --sidebar: oklch(0.205 0 0);
89
+ --sidebar-foreground: oklch(0.985 0 0);
90
+ --sidebar-primary: oklch(0.765 0.177 163.223);
91
+ --sidebar-primary-foreground: oklch(0.145 0 0);
92
+ --sidebar-accent: oklch(0.269 0 0);
93
+ --sidebar-accent-foreground: oklch(0.985 0 0);
94
+ --sidebar-border: oklch(1 0 0 / 10%);
95
+ --sidebar-ring: oklch(0.765 0.177 163.223);
96
+ }
97
+
98
+ @layer base {
99
+ * {
100
+ @apply border-border outline-ring/50;
101
+ }
102
+ body {
103
+ @apply bg-background text-foreground;
104
+ font-synthesis-weight: none;
105
+ text-rendering: optimizeLegibility;
106
+ }
107
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * @olwiba/cn — theme mapping layer
3
+ *
4
+ * Maps --color-* Tailwind v4 utilities to CSS custom properties so
5
+ * components can use bg-sidebar, text-foreground, border-border etc.
6
+ *
7
+ * Import this if you want to define your own :root values from scratch.
8
+ * If you just want everything to work out of the box, import preset.css instead.
9
+ *
10
+ * Usage:
11
+ * @import 'tailwindcss';
12
+ * @import '@olwiba/cn/theme';
13
+ * :root { --background: ...; --sidebar: ...; }
14
+ */
15
+
16
+ @theme inline {
17
+ --radius-sm: calc(var(--radius) - 4px);
18
+ --radius-md: calc(var(--radius) - 2px);
19
+ --radius-lg: var(--radius);
20
+ --radius-xl: calc(var(--radius) + 4px);
21
+ --radius-2xl: calc(var(--radius) + 8px);
22
+ --radius-3xl: calc(var(--radius) + 12px);
23
+ --radius-4xl: calc(var(--radius) + 16px);
24
+
25
+ --color-background: var(--background);
26
+ --color-foreground: var(--foreground);
27
+ --color-card: var(--card);
28
+ --color-card-foreground: var(--card-foreground);
29
+ --color-popover: var(--popover);
30
+ --color-popover-foreground: var(--popover-foreground);
31
+ --color-primary: var(--primary);
32
+ --color-primary-foreground: var(--primary-foreground);
33
+ --color-secondary: var(--secondary);
34
+ --color-secondary-foreground: var(--secondary-foreground);
35
+ --color-muted: var(--muted);
36
+ --color-muted-foreground: var(--muted-foreground);
37
+ --color-accent: var(--accent);
38
+ --color-accent-foreground: var(--accent-foreground);
39
+ --color-destructive: var(--destructive);
40
+ --color-border: var(--border);
41
+ --color-input: var(--input);
42
+ --color-ring: var(--ring);
43
+ --color-chart-1: var(--chart-1);
44
+ --color-chart-2: var(--chart-2);
45
+ --color-chart-3: var(--chart-3);
46
+ --color-chart-4: var(--chart-4);
47
+ --color-chart-5: var(--chart-5);
48
+ --color-sidebar: var(--sidebar);
49
+ --color-sidebar-foreground: var(--sidebar-foreground);
50
+ --color-sidebar-primary: var(--sidebar-primary);
51
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
52
+ --color-sidebar-accent: var(--sidebar-accent);
53
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
54
+ --color-sidebar-border: var(--sidebar-border);
55
+ --color-sidebar-ring: var(--sidebar-ring);
56
+
57
+ --animate-accordion-down: accordion-down 0.2s ease-out;
58
+ --animate-accordion-up: accordion-up 0.2s ease-out;
59
+
60
+ @keyframes accordion-down {
61
+ from { height: 0; }
62
+ to { height: var(--radix-accordion-content-height); }
63
+ }
64
+
65
+ @keyframes accordion-up {
66
+ from { height: var(--radix-accordion-content-height); }
67
+ to { height: 0; }
68
+ }
69
+ }