glchat-a2ui-react-renderer 0.2.3 → 0.2.5
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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/src/Provider.d.ts +2 -0
- package/dist/src/Provider.d.ts.map +1 -1
- package/dist/src/Provider.js +15 -4
- package/dist/src/components/a2ui/Button/Button.d.ts.map +1 -0
- package/dist/src/components/{Button → a2ui/Button}/Button.js +1 -1
- package/dist/src/components/a2ui/Button/theme.d.ts.map +1 -0
- package/dist/src/components/a2ui/Card/Card.d.ts.map +1 -0
- package/dist/src/components/a2ui/Card/theme.d.ts.map +1 -0
- package/dist/src/components/a2ui/CheckBox/CheckBox.d.ts +4 -0
- package/dist/src/components/a2ui/CheckBox/CheckBox.d.ts.map +1 -0
- package/dist/src/components/a2ui/CheckBox/CheckBox.js +26 -0
- package/dist/src/components/a2ui/CheckBox/theme.d.ts +11 -0
- package/dist/src/components/a2ui/CheckBox/theme.d.ts.map +1 -0
- package/dist/src/components/a2ui/CheckBox/theme.js +17 -0
- package/dist/src/components/a2ui/DateTimeInput/theme.d.ts +8 -0
- package/dist/src/components/a2ui/DateTimeInput/theme.d.ts.map +1 -0
- package/dist/src/components/a2ui/DateTimeInput/theme.js +11 -0
- package/dist/src/components/a2ui/MultipleChoice/CheckboxList.d.ts +12 -0
- package/dist/src/components/a2ui/MultipleChoice/CheckboxList.d.ts.map +1 -0
- package/dist/src/components/a2ui/MultipleChoice/CheckboxList.js +45 -0
- package/dist/src/components/a2ui/MultipleChoice/MultipleChoice.d.ts +4 -0
- package/dist/src/components/a2ui/MultipleChoice/MultipleChoice.d.ts.map +1 -0
- package/dist/src/components/a2ui/MultipleChoice/MultipleChoice.js +72 -0
- package/dist/src/components/a2ui/MultipleChoice/theme.d.ts +13 -0
- package/dist/src/components/a2ui/MultipleChoice/theme.d.ts.map +1 -0
- package/dist/src/components/a2ui/MultipleChoice/theme.js +35 -0
- package/dist/src/components/a2ui/TextField/TextField.d.ts +4 -0
- package/dist/src/components/a2ui/TextField/TextField.d.ts.map +1 -0
- package/dist/src/components/a2ui/TextField/TextField.js +54 -0
- package/dist/src/components/a2ui/TextField/theme.d.ts +28 -0
- package/dist/src/components/a2ui/TextField/theme.d.ts.map +1 -0
- package/dist/src/components/a2ui/TextField/theme.js +82 -0
- package/dist/src/components/a2ui/Timeout/Timeout.d.ts.map +1 -0
- package/dist/src/components/{Timeout → a2ui/Timeout}/Timeout.js +1 -1
- package/dist/src/components/a2ui/Timeout/theme.d.ts.map +1 -0
- package/dist/src/components/ui/Checkbox/Checkbox.d.ts +8 -0
- package/dist/src/components/ui/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/src/components/ui/Checkbox/Checkbox.js +9 -0
- package/dist/src/components/ui/Checkbox/theme.d.ts +5 -0
- package/dist/src/components/ui/Checkbox/theme.d.ts.map +1 -0
- package/dist/src/components/ui/Checkbox/theme.js +26 -0
- package/dist/src/components/ui/MultiSelect/MultiSelect.d.ts +15 -0
- package/dist/src/components/ui/MultiSelect/MultiSelect.d.ts.map +1 -0
- package/dist/src/components/ui/MultiSelect/MultiSelect.js +137 -0
- package/dist/src/components/ui/MultiSelect/theme.d.ts +18 -0
- package/dist/src/components/ui/MultiSelect/theme.d.ts.map +1 -0
- package/dist/src/components/ui/MultiSelect/theme.js +130 -0
- package/dist/src/components/ui/Select/Select.d.ts +19 -0
- package/dist/src/components/ui/Select/Select.d.ts.map +1 -0
- package/dist/src/components/ui/Select/Select.js +27 -0
- package/dist/src/components/ui/Select/theme.d.ts +29 -0
- package/dist/src/components/ui/Select/theme.d.ts.map +1 -0
- package/dist/src/components/ui/Select/theme.js +99 -0
- package/dist/src/utils/catalog.d.ts +1 -1
- package/dist/src/utils/catalog.d.ts.map +1 -1
- package/dist/src/utils/catalog.js +13 -4
- package/dist/src/utils/theme.d.ts.map +1 -1
- package/dist/src/utils/theme.js +27 -2
- package/package.json +5 -3
- package/styles/globals.css +122 -0
- package/dist/src/components/Button/Button.d.ts.map +0 -1
- package/dist/src/components/Button/theme.d.ts.map +0 -1
- package/dist/src/components/Card/Card.d.ts.map +0 -1
- package/dist/src/components/Card/theme.d.ts.map +0 -1
- package/dist/src/components/Timeout/Timeout.d.ts.map +0 -1
- package/dist/src/components/Timeout/theme.d.ts.map +0 -1
- /package/dist/src/components/{Button → a2ui/Button}/Button.d.ts +0 -0
- /package/dist/src/components/{Button → a2ui/Button}/theme.d.ts +0 -0
- /package/dist/src/components/{Button → a2ui/Button}/theme.js +0 -0
- /package/dist/src/components/{Card → a2ui/Card}/Card.d.ts +0 -0
- /package/dist/src/components/{Card → a2ui/Card}/Card.js +0 -0
- /package/dist/src/components/{Card → a2ui/Card}/theme.d.ts +0 -0
- /package/dist/src/components/{Card → a2ui/Card}/theme.js +0 -0
- /package/dist/src/components/{Timeout → a2ui/Timeout}/Timeout.d.ts +0 -0
- /package/dist/src/components/{Timeout → a2ui/Timeout}/theme.d.ts +0 -0
- /package/dist/src/components/{Timeout → a2ui/Timeout}/theme.js +0 -0
package/dist/src/utils/theme.js
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import { litTheme } from '@a2ui/react';
|
|
2
|
-
import { glchatButtonAdditionalStyles, glchatButtonComponents, } from '../components/Button/theme.js';
|
|
3
|
-
import { glchatCardAdditionalStyles, glchatCardComponents } from '../components/Card/theme.js';
|
|
2
|
+
import { glchatButtonAdditionalStyles, glchatButtonComponents, } from '../components/a2ui/Button/theme.js';
|
|
3
|
+
import { glchatCardAdditionalStyles, glchatCardComponents } from '../components/a2ui/Card/theme.js';
|
|
4
|
+
import { glchatCheckBoxComponents } from '../components/a2ui/CheckBox/theme.js';
|
|
5
|
+
import { glchatMultipleChoiceComponents } from '../components/a2ui/MultipleChoice/theme.js';
|
|
6
|
+
import { glchatDateTimeInputAdditionalStyles, glchatDateTimeInputComponents, } from '../components/a2ui/DateTimeInput/theme.js';
|
|
7
|
+
import { glchatTextFieldComponents } from '../components/a2ui/TextField/theme.js';
|
|
4
8
|
export const glchatDefaultTheme = {
|
|
5
9
|
...litTheme,
|
|
6
10
|
components: {
|
|
7
11
|
...litTheme.components,
|
|
8
12
|
Card: glchatCardComponents,
|
|
9
13
|
Button: glchatButtonComponents,
|
|
14
|
+
CheckBox: glchatCheckBoxComponents,
|
|
15
|
+
TextField: glchatTextFieldComponents,
|
|
16
|
+
DateTimeInput: glchatDateTimeInputComponents,
|
|
17
|
+
MultipleChoice: glchatMultipleChoiceComponents,
|
|
10
18
|
},
|
|
11
19
|
additionalStyles: {
|
|
12
20
|
...litTheme.additionalStyles,
|
|
13
21
|
Card: { ...glchatCardAdditionalStyles },
|
|
14
22
|
Button: { ...glchatButtonAdditionalStyles },
|
|
23
|
+
DateTimeInput: { ...glchatDateTimeInputAdditionalStyles },
|
|
15
24
|
},
|
|
16
25
|
};
|
|
17
26
|
export function mergeGlchatTheme(override) {
|
|
@@ -34,6 +43,22 @@ export function mergeGlchatTheme(override) {
|
|
|
34
43
|
...glchatDefaultTheme.components.Button,
|
|
35
44
|
...patchComponents.Button,
|
|
36
45
|
},
|
|
46
|
+
CheckBox: {
|
|
47
|
+
...glchatDefaultTheme.components.CheckBox,
|
|
48
|
+
...patchComponents.CheckBox,
|
|
49
|
+
},
|
|
50
|
+
TextField: {
|
|
51
|
+
...glchatDefaultTheme.components.TextField,
|
|
52
|
+
...patchComponents.TextField,
|
|
53
|
+
},
|
|
54
|
+
MultipleChoice: {
|
|
55
|
+
...glchatDefaultTheme.components.MultipleChoice,
|
|
56
|
+
...patchComponents.MultipleChoice,
|
|
57
|
+
},
|
|
58
|
+
DateTimeInput: {
|
|
59
|
+
...glchatDefaultTheme.components.DateTimeInput,
|
|
60
|
+
...patchComponents.DateTimeInput,
|
|
61
|
+
},
|
|
37
62
|
}
|
|
38
63
|
: glchatDefaultTheme.components;
|
|
39
64
|
const elements = patchElements
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glchat-a2ui-react-renderer",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "A2UI (Agent-to-UI) React renderer for GLChat — render declarative UI from AI agent messages",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "GDP Labs",
|
|
@@ -55,15 +55,17 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@a2ui/react": "^0.10.0",
|
|
58
|
-
"patch-package": "^8.0.1",
|
|
59
58
|
"@a2ui/web_core": "^0.10.0",
|
|
60
59
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
61
60
|
"@radix-ui/react-label": "^2.1.8",
|
|
61
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
62
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
62
63
|
"@radix-ui/react-separator": "^1.1.8",
|
|
63
64
|
"@radix-ui/react-slot": "^1.2.4",
|
|
64
65
|
"class-variance-authority": "^0.7.1",
|
|
65
66
|
"clsx": "^2.1.1",
|
|
66
|
-
"lucide-react": "^0.563.0"
|
|
67
|
+
"lucide-react": "^0.563.0",
|
|
68
|
+
"patch-package": "^8.0.1"
|
|
67
69
|
},
|
|
68
70
|
"devDependencies": {
|
|
69
71
|
"@testing-library/react": "^16.0.1",
|
package/styles/globals.css
CHANGED
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
|
|
53
53
|
/* Spacing tokens */
|
|
54
54
|
--radius: 0.5rem;
|
|
55
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
56
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
.dark {
|
|
@@ -136,3 +138,123 @@
|
|
|
136
138
|
cursor: default !important;
|
|
137
139
|
pointer-events: none !important;
|
|
138
140
|
}
|
|
141
|
+
|
|
142
|
+
/* TextField */
|
|
143
|
+
.a2ui-surface .a2ui-text-field input.glchat-a2ui-text-field,
|
|
144
|
+
.a2ui-surface .a2ui-text-field textarea.glchat-a2ui-text-field {
|
|
145
|
+
font-family: inherit !important;
|
|
146
|
+
line-height: 1.5 !important;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.a2ui-surface .a2ui-text-field input.glchat-a2ui-text-field:focus,
|
|
150
|
+
.a2ui-surface .a2ui-text-field input.glchat-a2ui-text-field:focus-visible,
|
|
151
|
+
.a2ui-surface .a2ui-text-field textarea.glchat-a2ui-text-field:focus,
|
|
152
|
+
.a2ui-surface .a2ui-text-field textarea.glchat-a2ui-text-field:focus-visible {
|
|
153
|
+
border-color: hsl(var(--primary)) !important;
|
|
154
|
+
outline: none !important;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.a2ui-surface .a2ui-text-field input.glchat-a2ui-text-field:disabled,
|
|
158
|
+
.a2ui-surface .a2ui-text-field textarea.glchat-a2ui-text-field:disabled {
|
|
159
|
+
cursor: not-allowed !important;
|
|
160
|
+
opacity: 0.5 !important;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.a2ui-surface .a2ui-text-field input.glchat-a2ui-text-field::placeholder,
|
|
164
|
+
.a2ui-surface .a2ui-text-field textarea.glchat-a2ui-text-field::placeholder {
|
|
165
|
+
color: hsl(var(--foreground) / 0.5);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* DateTimeInput (stock @a2ui/react — theme additionalStyles + globals) */
|
|
169
|
+
.a2ui-surface .a2ui-datetime-input > section {
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-direction: column;
|
|
172
|
+
gap: 0.5rem;
|
|
173
|
+
width: 100%;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.a2ui-surface .a2ui-datetime-input label {
|
|
177
|
+
font-size: 0.875rem;
|
|
178
|
+
font-weight: 600;
|
|
179
|
+
color: hsl(var(--card-foreground));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.a2ui-surface .a2ui-datetime-input input.glchat-a2ui-datetime-input {
|
|
183
|
+
font-family: inherit !important;
|
|
184
|
+
line-height: 1.5 !important;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.a2ui-surface .a2ui-datetime-input input.glchat-a2ui-datetime-input:focus,
|
|
188
|
+
.a2ui-surface .a2ui-datetime-input input.glchat-a2ui-datetime-input:focus-visible {
|
|
189
|
+
border-color: hsl(var(--primary)) !important;
|
|
190
|
+
outline: none !important;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.a2ui-surface .a2ui-datetime-input input.glchat-a2ui-datetime-input:disabled {
|
|
194
|
+
cursor: not-allowed !important;
|
|
195
|
+
opacity: 0.5 !important;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* MultipleChoice */
|
|
199
|
+
.a2ui-surface .a2ui-multiplechoice button.glchat-a2ui-select-trigger:focus,
|
|
200
|
+
.a2ui-surface .a2ui-multiplechoice button.glchat-a2ui-select-trigger:focus-visible {
|
|
201
|
+
border-color: hsl(var(--primary)) !important;
|
|
202
|
+
outline: none !important;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.a2ui-surface .a2ui-multiplechoice button.glchat-a2ui-select-trigger:disabled {
|
|
206
|
+
cursor: not-allowed !important;
|
|
207
|
+
opacity: 0.5 !important;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.a2ui-surface .a2ui-multiplechoice button.glchat-a2ui-select-trigger [data-placeholder] {
|
|
211
|
+
color: hsl(var(--foreground) / 0.5);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* Single-select dropdown */
|
|
215
|
+
.glchat-a2ui-select-content .glchat-a2ui-select-item[data-highlighted],
|
|
216
|
+
.glchat-a2ui-select-content .glchat-a2ui-select-item:hover {
|
|
217
|
+
background-color: hsl(var(--foreground) / 0.1) !important;
|
|
218
|
+
color: hsl(var(--foreground)) !important;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.glchat-a2ui-select-content .glchat-a2ui-select-item:focus-visible {
|
|
222
|
+
background-color: hsl(var(--foreground) / 0.1) !important;
|
|
223
|
+
outline: none !important;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.a2ui-surface .a2ui-multiplechoice button.glchat-a2ui-multiselect-trigger:focus,
|
|
227
|
+
.a2ui-surface .a2ui-multiplechoice button.glchat-a2ui-multiselect-trigger:focus-visible {
|
|
228
|
+
border-color: hsl(var(--primary)) !important;
|
|
229
|
+
outline: none !important;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.a2ui-surface .a2ui-multiplechoice button.glchat-a2ui-multiselect-trigger:disabled {
|
|
233
|
+
cursor: not-allowed !important;
|
|
234
|
+
opacity: 0.5 !important;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.glchat-a2ui-multiselect-content .glchat-a2ui-multiselect-option:hover:not(:disabled),
|
|
238
|
+
.glchat-a2ui-multiselect-content .glchat-a2ui-multiselect-option:focus-visible {
|
|
239
|
+
background-color: hsl(var(--foreground) / 0.1) !important;
|
|
240
|
+
outline: none !important;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* Checkbox (Radix) — A2UI CheckBox + MultipleChoice checkbox variant */
|
|
244
|
+
.a2ui-surface .a2ui-checkbox .glchat-a2ui-checkbox[data-state='checked'],
|
|
245
|
+
.a2ui-surface .glchat-a2ui-checkbox[data-state='checked'] {
|
|
246
|
+
background-color: hsl(var(--primary)) !important;
|
|
247
|
+
color: hsl(var(--primary-foreground)) !important;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.a2ui-surface .a2ui-checkbox .glchat-a2ui-checkbox:focus-visible,
|
|
251
|
+
.a2ui-surface .glchat-a2ui-checkbox:focus-visible {
|
|
252
|
+
outline: none !important;
|
|
253
|
+
box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--ring)) !important;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.a2ui-surface .a2ui-checkbox .glchat-a2ui-checkbox:disabled,
|
|
257
|
+
.a2ui-surface .glchat-a2ui-checkbox:disabled {
|
|
258
|
+
cursor: not-allowed !important;
|
|
259
|
+
opacity: 0.5 !important;
|
|
260
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAM7D,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,SAAS,GACV,EAAE,QAAQ,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,2CAwC1C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAM,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,QAAQ,CAiB/D,CAAC;AAE5B,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,mBAAmB,GAAG,aAAa,CAwCxF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAG3D,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,2CA2B9F"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,MAAM,CAE5D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,WAAW,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAWrF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Timeout.d.ts","sourceRoot":"","sources":["../../../../src/components/Timeout/Timeout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EAExB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAM7D,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,SAAS,GACV,EAAE,QAAQ,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,2CAwC1C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/components/Timeout/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,aAAa,CAMzD"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|