@kaloma-ai/framework-web 0.0.0-stage → 0.6.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/dist/theme.css ADDED
@@ -0,0 +1,167 @@
1
+ /*
2
+ * Brand and design tokens. Every framework component uses these CSS variables only,
3
+ * so a company's brand profile (logo, colors, font) re-themes the whole app, in light and dark mode.
4
+ * Light is the default; dark applies via the user's system preference or a `.dark` class on <html>.
5
+ *
6
+ * The `@theme inline` block at the end exposes the tokens as Tailwind utilities:
7
+ * bg-page bg-surface bg-surface-muted text-fg text-muted border-line
8
+ * bg-brand text-brand-fg bg-brand-soft text-brand text-ok/bg-ok-soft text-warn/bg-warn-soft text-danger/bg-danger-soft
9
+ */
10
+ :root {
11
+ --brand-primary: #2563eb;
12
+ --brand-primary-contrast: #ffffff;
13
+ --brand-secondary: #0f766e;
14
+
15
+ --page: #f5f6f8;
16
+ --surface: #ffffff;
17
+ --surface-muted: #f1f2f5;
18
+ --text: #16181d;
19
+ --text-muted: #5b6270;
20
+ --border: #e3e6ec;
21
+ --border-strong: #cfd4de;
22
+ --ok: #15803d;
23
+ --warning: #b45309;
24
+ --danger: #b91c1c;
25
+
26
+ --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
27
+ --radius: 0.75rem;
28
+ --shadow-card: 0 1px 2px rgb(16 24 40 / 0.05), 0 1px 3px rgb(16 24 40 / 0.06);
29
+ --shadow-pop: 0 12px 32px rgb(16 24 40 / 0.16), 0 2px 6px rgb(16 24 40 / 0.08);
30
+ --overlay: rgb(16 24 40 / 0.45);
31
+ }
32
+
33
+ /* Soft tints (badges, highlights) are mixed from the tokens above, so they follow the brand and the mode. */
34
+ :root,
35
+ :root.dark,
36
+ :root.light {
37
+ --brand-soft: color-mix(in srgb, var(--brand-primary) 11%, var(--surface));
38
+ --ok-soft: color-mix(in srgb, var(--ok) 13%, var(--surface));
39
+ --warning-soft: color-mix(in srgb, var(--warning) 14%, var(--surface));
40
+ --danger-soft: color-mix(in srgb, var(--danger) 12%, var(--surface));
41
+ }
42
+
43
+ @media (prefers-color-scheme: dark) {
44
+ :root:not(.light) {
45
+ --page: #0f1115;
46
+ --surface: #171a21;
47
+ --surface-muted: #20242d;
48
+ --text: #f2f4f8;
49
+ --text-muted: #9aa3b2;
50
+ --border: #2a2f3a;
51
+ --border-strong: #3a4150;
52
+ --ok: #4ade80;
53
+ --warning: #fbbf24;
54
+ --danger: #f87171;
55
+ --shadow-card: 0 1px 2px rgb(0 0 0 / 0.4);
56
+ --shadow-pop: 0 12px 32px rgb(0 0 0 / 0.55);
57
+ --overlay: rgb(0 0 0 / 0.6);
58
+ }
59
+ }
60
+
61
+ :root.dark {
62
+ --page: #0f1115;
63
+ --surface: #171a21;
64
+ --surface-muted: #20242d;
65
+ --text: #f2f4f8;
66
+ --text-muted: #9aa3b2;
67
+ --border: #2a2f3a;
68
+ --border-strong: #3a4150;
69
+ --ok: #4ade80;
70
+ --warning: #fbbf24;
71
+ --danger: #f87171;
72
+ --shadow-card: 0 1px 2px rgb(0 0 0 / 0.4);
73
+ --shadow-pop: 0 12px 32px rgb(0 0 0 / 0.55);
74
+ --overlay: rgb(0 0 0 / 0.6);
75
+ }
76
+
77
+ /* Native controls (checkboxes, radios, date inputs) follow the brand color too. */
78
+ :root {
79
+ accent-color: var(--brand-primary);
80
+ color-scheme: light;
81
+ }
82
+ :root.dark {
83
+ color-scheme: dark;
84
+ }
85
+ @media (prefers-color-scheme: dark) {
86
+ :root:not(.light) {
87
+ color-scheme: dark;
88
+ }
89
+ }
90
+
91
+ body {
92
+ margin: 0;
93
+ background: var(--page);
94
+ color: var(--text);
95
+ font-family: var(--font-sans);
96
+ font-size: 15px;
97
+ line-height: 1.5;
98
+ -webkit-font-smoothing: antialiased;
99
+ }
100
+
101
+ ::selection {
102
+ background: color-mix(in srgb, var(--brand-primary) 28%, transparent);
103
+ }
104
+
105
+ @theme inline {
106
+ --color-page: var(--page);
107
+ --color-surface: var(--surface);
108
+ --color-surface-muted: var(--surface-muted);
109
+ --color-fg: var(--text);
110
+ --color-muted: var(--text-muted);
111
+ --color-line: var(--border);
112
+ --color-line-strong: var(--border-strong);
113
+ --color-brand: var(--brand-primary);
114
+ --color-brand-fg: var(--brand-primary-contrast);
115
+ --color-brand-soft: var(--brand-soft);
116
+ --color-ok: var(--ok);
117
+ --color-ok-soft: var(--ok-soft);
118
+ --color-warn: var(--warning);
119
+ --color-warn-soft: var(--warning-soft);
120
+ --color-danger: var(--danger);
121
+ --color-danger-soft: var(--danger-soft);
122
+ --shadow-card: var(--shadow-card);
123
+ --shadow-pop: var(--shadow-pop);
124
+ --radius-card: var(--radius);
125
+ --font-sans: var(--font-sans);
126
+ }
127
+
128
+ /* Small entrance animations for dialogs, popovers and toasts. */
129
+ @keyframes ui-fade {
130
+ from { opacity: 0; }
131
+ to { opacity: 1; }
132
+ }
133
+ @keyframes ui-pop {
134
+ from { opacity: 0; transform: translateY(6px) scale(0.98); }
135
+ to { opacity: 1; transform: none; }
136
+ }
137
+ .ui-fade { animation: ui-fade 120ms ease-out; }
138
+ .ui-pop { animation: ui-pop 140ms ease-out; }
139
+ @media (prefers-reduced-motion: reduce) {
140
+ .ui-fade, .ui-pop { animation: none; }
141
+ }
142
+
143
+ /* The calendar (@daypicker/react) uses the brand tokens. */
144
+ .ui-calendar {
145
+ --rdp-accent-color: var(--brand-primary);
146
+ --rdp-accent-background-color: var(--brand-soft);
147
+ --rdp-today-color: var(--brand-primary);
148
+ --rdp-day-height: 2.4rem;
149
+ --rdp-day-width: 2.4rem;
150
+ --rdp-selected-border: 2px solid var(--brand-primary);
151
+ color: var(--text);
152
+ font-size: 0.875rem;
153
+ }
154
+ .ui-calendar .rdp-selected .rdp-day_button {
155
+ background: var(--brand-primary);
156
+ color: var(--brand-primary-contrast);
157
+ border-color: var(--brand-primary);
158
+ }
159
+ .ui-calendar .rdp-day_button:hover:not([disabled]) {
160
+ background: var(--surface-muted);
161
+ }
162
+ .ui-calendar .rdp-chevron {
163
+ fill: var(--text-muted);
164
+ }
165
+ .ui-calendar .rdp-month_caption {
166
+ font-weight: 600;
167
+ }
package/package.json CHANGED
@@ -1,6 +1,56 @@
1
1
  {
2
2
  "name": "@kaloma-ai/framework-web",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.6.0",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": {
7
+ "types": "./dist/index.d.ts",
8
+ "import": "./dist/index.js"
9
+ },
10
+ "./theme.css": "./dist/theme.css"
11
+ },
12
+ "devDependencies": {
13
+ "@types/react": "^19.3.0",
14
+ "@types/react-dom": "^19.3.0",
15
+ "lucide-react": "^1.62.0",
16
+ "react": "^19.3.1",
17
+ "react-dom": "^19.3.1",
18
+ "react-router-dom": "^7.18.4",
19
+ "tsup": "^9.0.0",
20
+ "typescript": "^6.0.3",
21
+ "vitest": "^5.0.5"
22
+ },
23
+ "dependencies": {
24
+ "@daypicker/react": "^10.0.2",
25
+ "@radix-ui/react-dialog": "^1.3.1",
26
+ "@radix-ui/react-popover": "^1.3.1",
27
+ "better-auth": "^1.7.14"
28
+ },
29
+ "description": "appai framework: web side (app shell, admin pages, UI kit, theme)",
30
+ "license": "UNLICENSED",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/kaloma-ai/kaloma-appai.git",
34
+ "directory": "packages/framework-web"
35
+ },
36
+ "files": [
37
+ "dist"
38
+ ],
39
+ "publishConfig": {
40
+ "registry": "https://registry.npmjs.org",
41
+ "access": "public"
42
+ },
43
+ "peerDependencies": {
44
+ "react": "^19.3.1",
45
+ "react-dom": "^19.3.1",
46
+ "react-router-dom": "^7.18.4",
47
+ "lucide-react": "^1.62.0"
48
+ },
49
+ "scripts": {
50
+ "build": "tsup",
51
+ "typecheck": "tsc --noEmit",
52
+ "test": "vitest run --passWithNoTests"
53
+ },
54
+ "main": "./dist/index.js",
55
+ "types": "./dist/index.d.ts"
6
56
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.