@geajs/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.
@@ -0,0 +1,51 @@
1
+ //#region src/tailwind-preset.d.ts
2
+ declare const _default: {
3
+ darkMode: string;
4
+ theme: {
5
+ extend: {
6
+ colors: {
7
+ border: string;
8
+ input: string;
9
+ ring: string;
10
+ background: string;
11
+ foreground: string;
12
+ primary: {
13
+ DEFAULT: string;
14
+ foreground: string;
15
+ };
16
+ secondary: {
17
+ DEFAULT: string;
18
+ foreground: string;
19
+ };
20
+ destructive: {
21
+ DEFAULT: string;
22
+ foreground: string;
23
+ };
24
+ muted: {
25
+ DEFAULT: string;
26
+ foreground: string;
27
+ };
28
+ accent: {
29
+ DEFAULT: string;
30
+ foreground: string;
31
+ };
32
+ popover: {
33
+ DEFAULT: string;
34
+ foreground: string;
35
+ };
36
+ card: {
37
+ DEFAULT: string;
38
+ foreground: string;
39
+ };
40
+ };
41
+ borderRadius: {
42
+ lg: string;
43
+ md: string;
44
+ sm: string;
45
+ };
46
+ };
47
+ };
48
+ };
49
+ //#endregion
50
+ export { _default as default };
51
+ //# sourceMappingURL=tailwind-preset.d.mts.map
@@ -0,0 +1,50 @@
1
+ //#region src/tailwind-preset.ts
2
+ var tailwind_preset_default = {
3
+ darkMode: "class",
4
+ theme: { extend: {
5
+ colors: {
6
+ border: "hsl(var(--border))",
7
+ input: "hsl(var(--input))",
8
+ ring: "hsl(var(--ring))",
9
+ background: "hsl(var(--background))",
10
+ foreground: "hsl(var(--foreground))",
11
+ primary: {
12
+ DEFAULT: "hsl(var(--primary))",
13
+ foreground: "hsl(var(--primary-foreground))"
14
+ },
15
+ secondary: {
16
+ DEFAULT: "hsl(var(--secondary))",
17
+ foreground: "hsl(var(--secondary-foreground))"
18
+ },
19
+ destructive: {
20
+ DEFAULT: "hsl(var(--destructive))",
21
+ foreground: "hsl(var(--destructive-foreground))"
22
+ },
23
+ muted: {
24
+ DEFAULT: "hsl(var(--muted))",
25
+ foreground: "hsl(var(--muted-foreground))"
26
+ },
27
+ accent: {
28
+ DEFAULT: "hsl(var(--accent))",
29
+ foreground: "hsl(var(--accent-foreground))"
30
+ },
31
+ popover: {
32
+ DEFAULT: "hsl(var(--popover))",
33
+ foreground: "hsl(var(--popover-foreground))"
34
+ },
35
+ card: {
36
+ DEFAULT: "hsl(var(--card))",
37
+ foreground: "hsl(var(--card-foreground))"
38
+ }
39
+ },
40
+ borderRadius: {
41
+ lg: "var(--radius)",
42
+ md: "calc(var(--radius) - 2px)",
43
+ sm: "calc(var(--radius) - 4px)"
44
+ }
45
+ } }
46
+ };
47
+ //#endregion
48
+ export { tailwind_preset_default as default };
49
+
50
+ //# sourceMappingURL=tailwind-preset.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tailwind-preset.mjs","names":[],"sources":["../src/tailwind-preset.ts"],"sourcesContent":["export default {\n darkMode: 'class',\n theme: {\n extend: {\n colors: {\n border: 'hsl(var(--border))',\n input: 'hsl(var(--input))',\n ring: 'hsl(var(--ring))',\n background: 'hsl(var(--background))',\n foreground: 'hsl(var(--foreground))',\n primary: {\n DEFAULT: 'hsl(var(--primary))',\n foreground: 'hsl(var(--primary-foreground))',\n },\n secondary: {\n DEFAULT: 'hsl(var(--secondary))',\n foreground: 'hsl(var(--secondary-foreground))',\n },\n destructive: {\n DEFAULT: 'hsl(var(--destructive))',\n foreground: 'hsl(var(--destructive-foreground))',\n },\n muted: {\n DEFAULT: 'hsl(var(--muted))',\n foreground: 'hsl(var(--muted-foreground))',\n },\n accent: {\n DEFAULT: 'hsl(var(--accent))',\n foreground: 'hsl(var(--accent-foreground))',\n },\n popover: {\n DEFAULT: 'hsl(var(--popover))',\n foreground: 'hsl(var(--popover-foreground))',\n },\n card: {\n DEFAULT: 'hsl(var(--card))',\n foreground: 'hsl(var(--card-foreground))',\n },\n },\n borderRadius: {\n lg: 'var(--radius)',\n md: 'calc(var(--radius) - 2px)',\n sm: 'calc(var(--radius) - 4px)',\n },\n },\n },\n}\n"],"mappings":";AAAA,IAAA,0BAAe;CACb,UAAU;CACV,OAAO,EACL,QAAQ;EACN,QAAQ;GACN,QAAQ;GACR,OAAO;GACP,MAAM;GACN,YAAY;GACZ,YAAY;GACZ,SAAS;IACP,SAAS;IACT,YAAY;IACb;GACD,WAAW;IACT,SAAS;IACT,YAAY;IACb;GACD,aAAa;IACX,SAAS;IACT,YAAY;IACb;GACD,OAAO;IACL,SAAS;IACT,YAAY;IACb;GACD,QAAQ;IACN,SAAS;IACT,YAAY;IACb;GACD,SAAS;IACP,SAAS;IACT,YAAY;IACb;GACD,MAAM;IACJ,SAAS;IACT,YAAY;IACb;GACF;EACD,cAAc;GACZ,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACF,EACF;CACF"}
package/dist/theme.css ADDED
@@ -0,0 +1,215 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @layer base {
6
+ :root {
7
+ --background: 0 0% 100%;
8
+ --foreground: 240 10% 3.9%;
9
+ --card: 0 0% 100%;
10
+ --card-foreground: 240 10% 3.9%;
11
+ --popover: 0 0% 100%;
12
+ --popover-foreground: 240 10% 3.9%;
13
+ --primary: 240 5.9% 10%;
14
+ --primary-foreground: 0 0% 98%;
15
+ --secondary: 240 4.8% 95.9%;
16
+ --secondary-foreground: 240 5.9% 10%;
17
+ --muted: 240 4.8% 95.9%;
18
+ --muted-foreground: 240 3.8% 46.1%;
19
+ --accent: 240 4.8% 95.9%;
20
+ --accent-foreground: 240 5.9% 10%;
21
+ --destructive: 0 84.2% 60.2%;
22
+ --destructive-foreground: 0 0% 98%;
23
+ --border: 240 5.9% 90%;
24
+ --input: 240 5.9% 90%;
25
+ --ring: 240 5.9% 10%;
26
+ --radius: 0.5rem;
27
+ }
28
+
29
+ .dark {
30
+ --background: 240 10% 3.9%;
31
+ --foreground: 0 0% 98%;
32
+ --card: 240 10% 3.9%;
33
+ --card-foreground: 0 0% 98%;
34
+ --popover: 240 10% 3.9%;
35
+ --popover-foreground: 0 0% 98%;
36
+ --primary: 0 0% 98%;
37
+ --primary-foreground: 240 5.9% 10%;
38
+ --secondary: 240 3.7% 15.9%;
39
+ --secondary-foreground: 0 0% 98%;
40
+ --muted: 240 3.7% 15.9%;
41
+ --muted-foreground: 240 5% 64.9%;
42
+ --accent: 240 3.7% 15.9%;
43
+ --accent-foreground: 0 0% 98%;
44
+ --destructive: 0 62.8% 30.6%;
45
+ --destructive-foreground: 0 0% 98%;
46
+ --border: 240 3.7% 15.9%;
47
+ --input: 240 3.7% 15.9%;
48
+ --ring: 240 4.9% 83.9%;
49
+ }
50
+ }
51
+
52
+ @layer base {
53
+ * {
54
+ border-color: hsl(var(--border));
55
+ }
56
+
57
+ body {
58
+ background-color: hsl(var(--background));
59
+ color: hsl(var(--foreground));
60
+ }
61
+ }
62
+
63
+ /* Checkbox: hide indicator when unchecked, show on checked */
64
+ .checkbox-control [data-part='indicator'] {
65
+ display: none;
66
+ }
67
+ .checkbox-control[data-state='checked'] [data-part='indicator'] {
68
+ display: flex;
69
+ }
70
+
71
+ /* Radio: dot hidden by default, visible when checked */
72
+ .radio-dot {
73
+ display: block;
74
+ width: 0.625rem;
75
+ height: 0.625rem;
76
+ border-radius: 9999px;
77
+ background: hsl(var(--primary));
78
+ transform: scale(0);
79
+ transition: transform 0.15s ease;
80
+ }
81
+ .radio-group-item-control[data-state='checked'] .radio-dot {
82
+ transform: scale(1);
83
+ }
84
+
85
+ /* Avatar: Zag uses hidden attribute to toggle image/fallback */
86
+ .avatar-root [data-part='image'][hidden] {
87
+ display: none;
88
+ }
89
+ .avatar-root [data-part='fallback'][hidden] {
90
+ display: none;
91
+ }
92
+
93
+ /* Overlay components: hidden while the hidden attribute is present */
94
+ .dialog-backdrop[hidden],
95
+ .dialog-positioner[hidden],
96
+ .dialog-content[hidden] {
97
+ display: none;
98
+ }
99
+
100
+ .dialog-backdrop {
101
+ position: fixed;
102
+ inset: 0;
103
+ background: hsl(0 0% 0% / 0.5);
104
+ z-index: 9998;
105
+ }
106
+
107
+ .dialog-positioner {
108
+ position: fixed;
109
+ inset: 0;
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: center;
113
+ padding: 1rem;
114
+ z-index: 9999;
115
+ }
116
+
117
+ .dialog-content {
118
+ position: relative;
119
+ width: min(100%, 28rem);
120
+ max-height: calc(100vh - 2rem);
121
+ overflow: auto;
122
+ margin: 0 auto;
123
+ padding: 1.5rem;
124
+ border-radius: var(--radius);
125
+ background: hsl(var(--background));
126
+ color: hsl(var(--foreground));
127
+ box-shadow:
128
+ 0 20px 25px -5px hsl(240 10% 3.9% / 0.12),
129
+ 0 8px 10px -6px hsl(240 10% 3.9% / 0.12);
130
+ pointer-events: auto;
131
+ }
132
+
133
+ /* Zag component animations */
134
+ @layer utilities {
135
+ [data-part='positioner'] > [data-part='content'][data-state='open'] {
136
+ animation: fadeIn 150ms ease-out;
137
+ }
138
+
139
+ [data-part='positioner'] > [data-part='content'][data-state='closed'] {
140
+ animation: fadeOut 100ms ease-in;
141
+ }
142
+
143
+ @keyframes fadeIn {
144
+ from {
145
+ opacity: 0;
146
+ transform: scale(0.95);
147
+ }
148
+ to {
149
+ opacity: 1;
150
+ transform: scale(1);
151
+ }
152
+ }
153
+
154
+ @keyframes fadeOut {
155
+ from {
156
+ opacity: 1;
157
+ transform: scale(1);
158
+ }
159
+ to {
160
+ opacity: 0;
161
+ transform: scale(0.95);
162
+ }
163
+ }
164
+
165
+ /* Accordion open/close animation */
166
+ [data-part='item-content'][data-state='open'] {
167
+ animation: slideDown 200ms ease-out;
168
+ }
169
+
170
+ [data-part='item-content'][data-state='closed'] {
171
+ animation: slideUp 200ms ease-in;
172
+ }
173
+
174
+ [data-part='item-indicator'][data-state='open'] {
175
+ transform: rotate(90deg);
176
+ }
177
+
178
+ @keyframes slideDown {
179
+ from {
180
+ height: 0;
181
+ opacity: 0;
182
+ }
183
+ to {
184
+ height: var(--height);
185
+ opacity: 1;
186
+ }
187
+ }
188
+
189
+ @keyframes slideUp {
190
+ from {
191
+ height: var(--height);
192
+ opacity: 1;
193
+ }
194
+ to {
195
+ height: 0;
196
+ opacity: 0;
197
+ }
198
+ }
199
+
200
+ /* Toast slide-in animation */
201
+ .toast-root {
202
+ animation: toastSlideIn 200ms ease-out;
203
+ }
204
+
205
+ @keyframes toastSlideIn {
206
+ from {
207
+ transform: translateX(100%);
208
+ opacity: 0;
209
+ }
210
+ to {
211
+ transform: translateX(0);
212
+ opacity: 1;
213
+ }
214
+ }
215
+ }
package/package.json ADDED
@@ -0,0 +1,99 @@
1
+ {
2
+ "name": "@geajs/ui",
3
+ "version": "0.1.0",
4
+ "description": "Accessible UI components for Gea, powered by Zag.js state machines and styled with Tailwind CSS",
5
+ "type": "module",
6
+ "main": "dist/index.mjs",
7
+ "module": "dist/index.mjs",
8
+ "types": "dist/index.d.mts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.mts",
15
+ "import": "./dist/index.mjs"
16
+ },
17
+ "./style.css": "./dist/theme.css",
18
+ "./tailwind-preset": {
19
+ "types": "./dist/tailwind-preset.d.mts",
20
+ "import": "./dist/tailwind-preset.mjs"
21
+ }
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/dashersw/gea.git"
26
+ },
27
+ "keywords": [
28
+ "gea",
29
+ "ui",
30
+ "components",
31
+ "accessible",
32
+ "zag",
33
+ "tailwind",
34
+ "dialog",
35
+ "tabs",
36
+ "menu",
37
+ "tooltip"
38
+ ],
39
+ "scripts": {
40
+ "build": "tsdown --config-loader unrun",
41
+ "dev:dashboard": "vite dev examples/dashboard",
42
+ "dev:docs": "vite dev examples/docs",
43
+ "dev:forms": "vite dev examples/forms",
44
+ "dev:showcase": "vite dev examples/showcase",
45
+ "dev:interactive": "vite dev examples/interactive",
46
+ "build:docs": "vite build --config examples/docs/vite.config.prod.ts"
47
+ },
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "author": "Armagan Amcalar <armagan@amcalar.com>",
52
+ "license": "MIT",
53
+ "sideEffects": [
54
+ "*.css"
55
+ ],
56
+ "peerDependencies": {
57
+ "@geajs/core": "^1.0.0"
58
+ },
59
+ "dependencies": {
60
+ "@zag-js/accordion": "^1.37.0",
61
+ "@zag-js/avatar": "^1.37.0",
62
+ "@zag-js/checkbox": "^1.37.0",
63
+ "@zag-js/clipboard": "^1.37.0",
64
+ "@zag-js/collapsible": "^1.37.0",
65
+ "@zag-js/combobox": "^1.37.0",
66
+ "@zag-js/dialog": "^1.37.0",
67
+ "@zag-js/file-upload": "^1.37.0",
68
+ "@zag-js/hover-card": "^1.37.0",
69
+ "@zag-js/menu": "^1.37.0",
70
+ "@zag-js/number-input": "^1.37.0",
71
+ "@zag-js/pagination": "^1.37.0",
72
+ "@zag-js/pin-input": "^1.37.0",
73
+ "@zag-js/popover": "^1.37.0",
74
+ "@zag-js/progress": "^1.37.0",
75
+ "@zag-js/radio-group": "^1.37.0",
76
+ "@zag-js/rating-group": "^1.37.0",
77
+ "@zag-js/select": "^1.37.0",
78
+ "@zag-js/slider": "^1.37.0",
79
+ "@zag-js/switch": "^1.37.0",
80
+ "@zag-js/tabs": "^1.37.0",
81
+ "@zag-js/tags-input": "^1.37.0",
82
+ "@zag-js/toast": "^1.37.0",
83
+ "@zag-js/toggle-group": "^1.37.0",
84
+ "@zag-js/tooltip": "^1.37.0",
85
+ "@zag-js/tree-view": "^1.37.0",
86
+ "@zag-js/vanilla": "^1.37.0",
87
+ "clsx": "^2.1.1",
88
+ "tailwind-merge": "^3.0.0"
89
+ },
90
+ "devDependencies": {
91
+ "autoprefixer": "^10.4.27",
92
+ "postcss": "^8.5.8",
93
+ "prismjs": "^1.30.0",
94
+ "tailwindcss": "^3.4.19",
95
+ "tsdown": "^0.21.2",
96
+ "tsup": "^8.5.1",
97
+ "typescript": "^5.9.3"
98
+ }
99
+ }