@isahaq/kosh-ui 0.0.0-stage → 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.
Files changed (68) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +21 -2
  3. package/dist/api.d.ts +158 -0
  4. package/dist/api.d.ts.map +1 -0
  5. package/dist/api.js +216 -0
  6. package/dist/api.js.map +1 -0
  7. package/dist/app.d.ts +14 -0
  8. package/dist/app.d.ts.map +1 -0
  9. package/dist/app.js +355 -0
  10. package/dist/app.js.map +1 -0
  11. package/dist/components/primitives.d.ts +60 -0
  12. package/dist/components/primitives.d.ts.map +1 -0
  13. package/dist/components/primitives.js +105 -0
  14. package/dist/components/primitives.js.map +1 -0
  15. package/dist/context.d.ts +34 -0
  16. package/dist/context.d.ts.map +1 -0
  17. package/dist/context.js +58 -0
  18. package/dist/context.js.map +1 -0
  19. package/dist/i18n/index.d.ts +14 -0
  20. package/dist/i18n/index.d.ts.map +1 -0
  21. package/dist/i18n/index.js +43 -0
  22. package/dist/i18n/index.js.map +1 -0
  23. package/dist/i18n/messages.d.ts +104 -0
  24. package/dist/i18n/messages.d.ts.map +1 -0
  25. package/dist/i18n/messages.js +194 -0
  26. package/dist/i18n/messages.js.map +1 -0
  27. package/dist/index.d.ts +31 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +42 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/lib/cn.d.ts +4 -0
  32. package/dist/lib/cn.d.ts.map +1 -0
  33. package/dist/lib/cn.js +7 -0
  34. package/dist/lib/cn.js.map +1 -0
  35. package/dist/lib/format.d.ts +18 -0
  36. package/dist/lib/format.d.ts.map +1 -0
  37. package/dist/lib/format.js +48 -0
  38. package/dist/lib/format.js.map +1 -0
  39. package/dist/registry.d.ts +80 -0
  40. package/dist/registry.d.ts.map +1 -0
  41. package/dist/registry.js +57 -0
  42. package/dist/registry.js.map +1 -0
  43. package/dist/search/SearchBar.d.ts +19 -0
  44. package/dist/search/SearchBar.d.ts.map +1 -0
  45. package/dist/search/SearchBar.js +84 -0
  46. package/dist/search/SearchBar.js.map +1 -0
  47. package/dist/shell/Login.d.ts +7 -0
  48. package/dist/shell/Login.d.ts.map +1 -0
  49. package/dist/shell/Login.js +41 -0
  50. package/dist/shell/Login.js.map +1 -0
  51. package/dist/views/FormView.d.ts +5 -0
  52. package/dist/views/FormView.d.ts.map +1 -0
  53. package/dist/views/FormView.js +276 -0
  54. package/dist/views/FormView.js.map +1 -0
  55. package/dist/views/KanbanView.d.ts +11 -0
  56. package/dist/views/KanbanView.d.ts.map +1 -0
  57. package/dist/views/KanbanView.js +156 -0
  58. package/dist/views/KanbanView.js.map +1 -0
  59. package/dist/views/ListView.d.ts +5 -0
  60. package/dist/views/ListView.d.ts.map +1 -0
  61. package/dist/views/ListView.js +227 -0
  62. package/dist/views/ListView.js.map +1 -0
  63. package/dist/views/widgets.d.ts +15 -0
  64. package/dist/views/widgets.d.ts.map +1 -0
  65. package/dist/views/widgets.js +253 -0
  66. package/dist/views/widgets.js.map +1 -0
  67. package/package.json +75 -3
  68. package/src/styles.css +101 -0
package/package.json CHANGED
@@ -1,6 +1,78 @@
1
1
  {
2
2
  "name": "@isahaq/kosh-ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.0",
4
+ "description": "React app shell, design system and view renderers (RFC 0007)",
5
+ "keywords": [
6
+ "kosh",
7
+ "erp",
8
+ "typescript",
9
+ "postgresql",
10
+ "shutro"
11
+ ],
12
+ "author": "Isahaq <hmisahaq01@gmail.com>",
13
+ "license": "MIT",
14
+ "homepage": "https://github.com/isahaq1/kosh/tree/main/packages/ui#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/isahaq1/kosh/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/isahaq1/kosh.git",
21
+ "directory": "packages/ui"
22
+ },
23
+ "type": "module",
24
+ "sideEffects": [
25
+ "*.css"
26
+ ],
27
+ "exports": {
28
+ ".": {
29
+ "@kosh/source": "./src/index.ts",
30
+ "types": "./dist/index.d.ts",
31
+ "default": "./dist/index.js"
32
+ },
33
+ "./styles.css": "./src/styles.css"
34
+ },
35
+ "files": [
36
+ "dist",
37
+ "src/styles.css"
38
+ ],
39
+ "engines": {
40
+ "node": ">=24"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
45
+ "dependencies": {
46
+ "@dnd-kit/core": "^6.3.1",
47
+ "@tanstack/react-router": "^1.170.45",
48
+ "@tanstack/react-table": "^9.3.1",
49
+ "@tanstack/react-virtual": "^3.14.21",
50
+ "class-variance-authority": "^0.7.1",
51
+ "clsx": "^2.1.1",
52
+ "lucide-react": "^1.59.0",
53
+ "radix-ui": "^1.8.1",
54
+ "tailwind-merge": "^3.7.0",
55
+ "@isahaq/kosh-search": "0.1.0",
56
+ "@isahaq/kosh-views": "0.1.0"
57
+ },
58
+ "peerDependencies": {
59
+ "react": "^19.3.1",
60
+ "react-dom": "^19.3.1",
61
+ "@tanstack/react-query": "^5.104.3",
62
+ "i18next": "^26.4.7",
63
+ "react-i18next": "^17.0.21"
64
+ },
65
+ "devDependencies": {
66
+ "@types/react": "^19.3.0",
67
+ "@types/react-dom": "^19.3.0",
68
+ "react": "^19.3.1",
69
+ "react-dom": "^19.3.1",
70
+ "@tanstack/react-query": "^5.104.3",
71
+ "i18next": "^26.4.7",
72
+ "react-i18next": "^17.0.21"
73
+ },
74
+ "scripts": {
75
+ "build": "tsc -p tsconfig.build.json",
76
+ "typecheck": "tsc -p tsconfig.json --noEmit"
77
+ }
6
78
  }
package/src/styles.css ADDED
@@ -0,0 +1,101 @@
1
+ /*
2
+ * Kosh design tokens (RFC 0007): colors, radius and typography as CSS variables, light and dark themes, Tailwind v4
3
+ * utilities mapped onto them. Components use logical properties only (ms/me, ps/pe, start/end), so RTL needs no
4
+ * overrides. Import once from the app: `@import '@isahaq/kosh-ui/styles.css';` after `@import 'tailwindcss';`.
5
+ */
6
+ @custom-variant dark (&:where(.dark, .dark *));
7
+
8
+ @theme inline {
9
+ --color-background: var(--background);
10
+ --color-foreground: var(--foreground);
11
+ --color-surface: var(--surface);
12
+ --color-surface-foreground: var(--surface-foreground);
13
+ --color-muted: var(--muted);
14
+ --color-muted-foreground: var(--muted-foreground);
15
+ --color-border: var(--border);
16
+ --color-input: var(--input);
17
+ --color-ring: var(--ring);
18
+ --color-primary: var(--primary);
19
+ --color-primary-foreground: var(--primary-foreground);
20
+ --color-accent: var(--accent);
21
+ --color-accent-foreground: var(--accent-foreground);
22
+ --color-danger: var(--danger);
23
+ --color-danger-foreground: var(--danger-foreground);
24
+ --color-success: var(--success);
25
+ --color-warning: var(--warning);
26
+ --radius-sm: calc(var(--radius) - 2px);
27
+ --radius-md: var(--radius);
28
+ --radius-lg: calc(var(--radius) + 4px);
29
+ --font-sans: var(--font-family);
30
+ }
31
+
32
+ :root {
33
+ --radius: 0.5rem;
34
+ --font-family: "Inter", "Noto Sans Bengali", "Noto Sans Arabic", system-ui, sans-serif;
35
+ /* Light: contrast ratios ≥ 4.5:1 for text on background and surface (WCAG AA). */
36
+ --background: oklch(0.985 0.002 250);
37
+ --foreground: oklch(0.21 0.02 260);
38
+ --surface: oklch(1 0 0);
39
+ --surface-foreground: oklch(0.21 0.02 260);
40
+ --muted: oklch(0.955 0.005 250);
41
+ --muted-foreground: oklch(0.45 0.02 260);
42
+ --border: oklch(0.9 0.008 250);
43
+ --input: oklch(0.86 0.01 250);
44
+ --ring: oklch(0.55 0.17 255);
45
+ --primary: oklch(0.5 0.17 255);
46
+ --primary-foreground: oklch(0.99 0 0);
47
+ --accent: oklch(0.94 0.03 255);
48
+ --accent-foreground: oklch(0.3 0.1 255);
49
+ --danger: oklch(0.52 0.2 25);
50
+ --danger-foreground: oklch(0.99 0 0);
51
+ --success: oklch(0.5 0.13 150);
52
+ --warning: oklch(0.6 0.14 75);
53
+ color-scheme: light;
54
+ }
55
+
56
+ .dark {
57
+ --background: oklch(0.17 0.015 260);
58
+ --foreground: oklch(0.94 0.01 250);
59
+ --surface: oklch(0.21 0.017 260);
60
+ --surface-foreground: oklch(0.94 0.01 250);
61
+ --muted: oklch(0.25 0.017 260);
62
+ --muted-foreground: oklch(0.72 0.02 255);
63
+ --border: oklch(0.3 0.02 260);
64
+ --input: oklch(0.36 0.02 260);
65
+ --ring: oklch(0.7 0.14 255);
66
+ --primary: oklch(0.68 0.15 255);
67
+ --primary-foreground: oklch(0.16 0.02 260);
68
+ --accent: oklch(0.3 0.05 255);
69
+ --accent-foreground: oklch(0.92 0.04 255);
70
+ --danger: oklch(0.65 0.19 25);
71
+ --danger-foreground: oklch(0.16 0.02 260);
72
+ --success: oklch(0.7 0.14 150);
73
+ --warning: oklch(0.78 0.14 75);
74
+ color-scheme: dark;
75
+ }
76
+
77
+ @layer base {
78
+ * {
79
+ border-color: var(--border);
80
+ }
81
+ html,
82
+ body {
83
+ background: var(--background);
84
+ color: var(--foreground);
85
+ font-family: var(--font-family);
86
+ }
87
+ :focus-visible {
88
+ outline: 2px solid var(--ring);
89
+ outline-offset: 2px;
90
+ }
91
+ @media (prefers-reduced-motion: reduce) {
92
+ *,
93
+ *::before,
94
+ *::after {
95
+ /* biome-ignore lint/complexity/noImportantStyles: reduced motion must win over every component transition */
96
+ animation-duration: 0.01ms !important;
97
+ /* biome-ignore lint/complexity/noImportantStyles: as above */
98
+ transition-duration: 0.01ms !important;
99
+ }
100
+ }
101
+ }