glchat-a2ui-react-renderer 0.0.5 → 0.0.6

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 (96) hide show
  1. package/README.md +216 -93
  2. package/dist/index.d.ts +2 -18
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +4 -17
  5. package/dist/src/a2ui/adapter.d.ts +3 -0
  6. package/dist/src/a2ui/adapter.d.ts.map +1 -0
  7. package/dist/src/a2ui/adapter.js +11 -0
  8. package/dist/src/a2ui/glchatStandardCatalog.d.ts +10 -0
  9. package/dist/src/a2ui/glchatStandardCatalog.d.ts.map +1 -0
  10. package/dist/src/a2ui/glchatStandardCatalog.js +14 -0
  11. package/dist/src/components/custom/Button.d.ts +3 -0
  12. package/dist/src/components/custom/Button.d.ts.map +1 -0
  13. package/dist/src/components/custom/Button.js +14 -0
  14. package/dist/src/components/custom/Card.d.ts +3 -0
  15. package/dist/src/components/custom/Card.d.ts.map +1 -0
  16. package/dist/src/components/custom/Card.js +7 -0
  17. package/dist/src/components/custom/Timeout.d.ts +3 -0
  18. package/dist/src/components/custom/Timeout.d.ts.map +1 -0
  19. package/dist/src/components/custom/Timeout.js +6 -0
  20. package/dist/src/components/{Button.d.ts → ui/Button.d.ts} +4 -4
  21. package/dist/src/components/ui/Button.d.ts.map +1 -0
  22. package/dist/src/components/ui/Button.js +38 -0
  23. package/dist/src/components/{Card.d.ts → ui/Card.d.ts} +1 -1
  24. package/dist/src/components/ui/Card.d.ts.map +1 -0
  25. package/dist/src/components/ui/Card.js +16 -0
  26. package/dist/src/components/ui/Timeout.d.ts +6 -0
  27. package/dist/src/components/ui/Timeout.d.ts.map +1 -0
  28. package/dist/src/components/{Timeout.js → ui/Timeout.js} +3 -4
  29. package/package.json +9 -5
  30. package/styles/globals.css +103 -0
  31. package/styles/theme-v4.css +86 -0
  32. package/tailwind.config.cjs +111 -0
  33. package/dist/src/components/Button.d.ts.map +0 -1
  34. package/dist/src/components/Button.js +0 -43
  35. package/dist/src/components/Card.d.ts.map +0 -1
  36. package/dist/src/components/Card.js +0 -16
  37. package/dist/src/components/Checkbox.d.ts +0 -5
  38. package/dist/src/components/Checkbox.d.ts.map +0 -1
  39. package/dist/src/components/Checkbox.js +0 -9
  40. package/dist/src/components/Column.d.ts +0 -13
  41. package/dist/src/components/Column.d.ts.map +0 -1
  42. package/dist/src/components/Column.js +0 -20
  43. package/dist/src/components/Image.d.ts +0 -9
  44. package/dist/src/components/Image.d.ts.map +0 -1
  45. package/dist/src/components/Image.js +0 -21
  46. package/dist/src/components/Input.d.ts +0 -8
  47. package/dist/src/components/Input.d.ts.map +0 -1
  48. package/dist/src/components/Input.js +0 -9
  49. package/dist/src/components/Label.d.ts +0 -5
  50. package/dist/src/components/Label.d.ts.map +0 -1
  51. package/dist/src/components/Label.js +0 -8
  52. package/dist/src/components/Row.d.ts +0 -13
  53. package/dist/src/components/Row.d.ts.map +0 -1
  54. package/dist/src/components/Row.js +0 -20
  55. package/dist/src/components/Separator.d.ts +0 -5
  56. package/dist/src/components/Separator.d.ts.map +0 -1
  57. package/dist/src/components/Separator.js +0 -11
  58. package/dist/src/components/Text.d.ts +0 -8
  59. package/dist/src/components/Text.d.ts.map +0 -1
  60. package/dist/src/components/Text.js +0 -19
  61. package/dist/src/components/TextField.d.ts +0 -13
  62. package/dist/src/components/TextField.d.ts.map +0 -1
  63. package/dist/src/components/TextField.js +0 -31
  64. package/dist/src/components/Timeout.d.ts +0 -8
  65. package/dist/src/components/Timeout.d.ts.map +0 -1
  66. package/dist/src/helpers/messageParser.d.ts +0 -10
  67. package/dist/src/helpers/messageParser.d.ts.map +0 -1
  68. package/dist/src/helpers/messageParser.js +0 -40
  69. package/dist/src/hooks/useA2UIProcessor.d.ts +0 -17
  70. package/dist/src/hooks/useA2UIProcessor.d.ts.map +0 -1
  71. package/dist/src/hooks/useA2UIProcessor.js +0 -16
  72. package/dist/src/rendering/Surface.d.ts +0 -26
  73. package/dist/src/rendering/Surface.d.ts.map +0 -1
  74. package/dist/src/rendering/Surface.js +0 -51
  75. package/dist/src/rendering/catalog.d.ts +0 -41
  76. package/dist/src/rendering/catalog.d.ts.map +0 -1
  77. package/dist/src/rendering/catalog.js +0 -160
  78. package/dist/src/rendering/componentRegistry.d.ts +0 -9
  79. package/dist/src/rendering/componentRegistry.d.ts.map +0 -1
  80. package/dist/src/rendering/componentRegistry.js +0 -10
  81. package/dist/src/runtime/bindingResolver.d.ts +0 -30
  82. package/dist/src/runtime/bindingResolver.d.ts.map +0 -1
  83. package/dist/src/runtime/bindingResolver.js +0 -129
  84. package/dist/src/runtime/dispatcher.d.ts +0 -15
  85. package/dist/src/runtime/dispatcher.d.ts.map +0 -1
  86. package/dist/src/runtime/dispatcher.js +0 -29
  87. package/dist/src/runtime/messageProcessor.d.ts +0 -54
  88. package/dist/src/runtime/messageProcessor.d.ts.map +0 -1
  89. package/dist/src/runtime/messageProcessor.js +0 -85
  90. package/dist/src/runtime/surfaceManager.d.ts +0 -48
  91. package/dist/src/runtime/surfaceManager.d.ts.map +0 -1
  92. package/dist/src/runtime/surfaceManager.js +0 -90
  93. package/dist/src/types.d.ts +0 -340
  94. package/dist/src/types.d.ts.map +0 -1
  95. package/dist/src/types.js +0 -3
  96. package/dist/styles.css +0 -395
@@ -1,8 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { useEffect, useState } from 'react';
4
- import { A2UIText } from './Text.js';
5
- import { cn } from '../helpers/css.js';
4
+ import { cn } from '../../helpers/css.js';
6
5
  function getRemainingSeconds(targetTimeUtc) {
7
6
  const targetMs = Date.parse(targetTimeUtc);
8
7
  if (Number.isNaN(targetMs))
@@ -17,7 +16,7 @@ function formatAsHhMmSs(seconds) {
17
16
  const ss = s % 60;
18
17
  return `${String(h).padStart(2, '0')}:${String(mm).padStart(2, '0')}:${String(ss).padStart(2, '0')}`;
19
18
  }
20
- export function A2UITimeout({ targetTimeUtc, usageHint = 'body', className, }) {
19
+ export function Timeout({ targetTimeUtc, className, }) {
21
20
  const [remaining, setRemaining] = useState(() => getRemainingSeconds(targetTimeUtc));
22
21
  useEffect(() => {
23
22
  setRemaining(getRemainingSeconds(targetTimeUtc));
@@ -32,5 +31,5 @@ export function A2UITimeout({ targetTimeUtc, usageHint = 'body', className, }) {
32
31
  return () => clearInterval(t);
33
32
  }, [targetTimeUtc]);
34
33
  const display = formatAsHhMmSs(remaining);
35
- return (_jsx("div", { className: cn('a2ui-timeout', className), children: _jsx(A2UIText, { text: display, usageHint: usageHint }) }));
34
+ return (_jsx("div", { className: cn('text-foreground/50 text-sm', className), children: display }));
36
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glchat-a2ui-react-renderer",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
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",
@@ -22,7 +22,9 @@
22
22
  "types": "./dist/index.d.ts"
23
23
  }
24
24
  },
25
- "./styles.css": "./dist/styles.css"
25
+ "./tailwind-config.cjs": "./tailwind.config.cjs",
26
+ "./styles/globals.css": "./styles/globals.css",
27
+ "./styles/theme-v4.css": "./styles/theme-v4.css"
26
28
  },
27
29
  "sideEffects": [
28
30
  "**/*.css"
@@ -30,12 +32,13 @@
30
32
  "files": [
31
33
  "dist",
32
34
  "README.md",
33
- "LICENSE"
35
+ "LICENSE",
36
+ "tailwind.config.cjs",
37
+ "styles"
34
38
  ],
35
39
  "scripts": {
36
- "build": "npm run build:ts && npm run build:css",
40
+ "build": "npm run build:ts",
37
41
  "build:ts": "tsc -p tsconfig.build.json",
38
- "build:css": "cp src/styles.css dist/styles.css",
39
42
  "prepare": "npm run build",
40
43
  "lint": "npx publint",
41
44
  "test": "vitest run",
@@ -45,6 +48,7 @@
45
48
  "react": ">=18.0.0"
46
49
  },
47
50
  "dependencies": {
51
+ "@a2ui-sdk/react": "^0.4.0",
48
52
  "@radix-ui/react-checkbox": "^1.3.3",
49
53
  "@radix-ui/react-label": "^2.1.8",
50
54
  "@radix-ui/react-separator": "^1.1.8",
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Default design tokens for glchat-a2ui-react-renderer.
3
+ * Refer to glchat-ui design tokens.
4
+ */
5
+
6
+ :root {
7
+ /* Color tokens */
8
+ --background: 0 0% 100%;
9
+ --background-alternate: 0 0% 98%;
10
+
11
+ --foreground: 0 0% 11%;
12
+
13
+ --navbar: 0 0% 94%;
14
+
15
+ --muted: 0 0% 96.1%;
16
+ --muted-foreground: 0 0% 45.1%;
17
+
18
+ --popover: 0 0% 25%;
19
+ --popover-foreground: 0 0% 100%;
20
+
21
+ --border: 0 0% 86%;
22
+
23
+ --primary: 198 100% 31%;
24
+ --primary-foreground: 0 0% 100%;
25
+ --primary-subtle: 198 57% 85%;
26
+ --primary-subtle-foreground: 198 100% 28%;
27
+
28
+ --secondary: 0 0% 86%;
29
+ --secondary-foreground: 0 0% 11%;
30
+
31
+ --accent: 28 100% 53%;
32
+ --accent-foreground: 0 0% 100%;
33
+ --accent-alternate: 38 100% 95%;
34
+ --accent-alternate-foreground: 24 100% 35%;
35
+
36
+ --destructive: 0 97% 59%;
37
+ --destructive-alternate: 8 100% 97%;
38
+ --destructive-alternate-foreground: 356 83% 38%;
39
+ --destructive-foreground: 0 0% 100%;
40
+
41
+ --positive: 161 90% 33%;
42
+ --positive-foreground: 0 0% 100%;
43
+ --positive-alternate: 152 81% 96%;
44
+ --positive-alternate-foreground: 161 100% 22%;
45
+
46
+ --ring: 198 100% 31%;
47
+
48
+ --card: 0 0% 100%;
49
+ --card-foreground: 0 0% 11%;
50
+
51
+ --hover: 0 0% 0% / 5%;
52
+
53
+ /* Spacing tokens */
54
+ --radius: 0.5rem;
55
+ }
56
+
57
+ .dark {
58
+ /* Color tokens */
59
+ --background: 0 0% 11%;
60
+ --background-alternate: 0 0% 7%;
61
+
62
+ --foreground: 0 0% 100%;
63
+
64
+ --navbar: 240 10% 4%;
65
+
66
+ --muted: 0 0% 14.9%;
67
+ --muted-foreground: 0 0% 63.9%;
68
+
69
+ --popover: 0 0% 98%;
70
+ --popover-foreground: 0 0% 11%;
71
+
72
+ --border: 0 0% 25%;
73
+
74
+ --primary: 196 71% 39%;
75
+ --primary-foreground: 0 0% 100%;
76
+ --primary-subtle: 198 99% 17%;
77
+ --primary-subtle-foreground: 198 57% 85%;
78
+
79
+ --secondary: 0 0% 25%;
80
+ --secondary-foreground: 0 0% 100%;
81
+
82
+ --accent: 30 100% 62%;
83
+ --accent-foreground: 0 0% 100%;
84
+ --accent-alternate: 22 100% 27%;
85
+ --accent-alternate-foreground: 36 100% 85%;
86
+
87
+ --destructive: 4 100% 75%;
88
+ --destructive-alternate: 354 92% 28%;
89
+ --destructive-alternate-foreground: 8 100% 97%;
90
+ --destructive-foreground: 0 0% 100%;
91
+
92
+ --positive: 162 91% 33%;
93
+ --positive-foreground: 8 100% 97%;
94
+ --positive-alternate: 161 100% 22%;
95
+ --positive-alternate-foreground: 152 81% 96%;
96
+
97
+ --ring: 196 71% 39%;
98
+
99
+ --card: 0 0% 11%;
100
+ --card-foreground: 0 0% 100%;
101
+
102
+ --hover: 0 0% 100% / 5%;
103
+ }
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Tailwind v4 theme for glchat-a2ui-react-renderer.
3
+ * Refer to tailwind.config.cjs.
4
+ */
5
+
6
+ @theme {
7
+ /* Background images */
8
+ --background-image-card-hover:
9
+ linear-gradient(hsla(var(--hover)), hsla(var(--hover))),
10
+ linear-gradient(hsl(var(--card)), hsl(var(--card)));
11
+ --background-image-primary-hover:
12
+ linear-gradient(hsla(var(--hover)), hsla(var(--hover))),
13
+ linear-gradient(hsl(var(--primary)), hsl(var(--primary)));
14
+ --background-image-primary-subtle-hover:
15
+ linear-gradient(hsla(var(--hover)), hsla(var(--hover))),
16
+ linear-gradient(hsl(var(--primary-subtle)), hsl(var(--primary-subtle)));
17
+ --background-image-background-hover:
18
+ linear-gradient(hsla(var(--hover)), hsla(var(--hover))),
19
+ linear-gradient(hsl(var(--background)), hsl(var(--background)));
20
+ --background-image-destructive-hover:
21
+ linear-gradient(hsla(var(--hover)), hsla(var(--hover))),
22
+ linear-gradient(hsl(var(--destructive)), hsl(var(--destructive)));
23
+ --background-image-destructive-alternate-hover:
24
+ linear-gradient(hsla(var(--hover)), hsla(var(--hover))),
25
+ linear-gradient(hsl(var(--destructive-alternate)), hsl(var(--destructive-alternate)));
26
+
27
+ /* Colors */
28
+ --color-background: hsl(var(--background));
29
+ --color-background-alternate: hsl(var(--background-alternate));
30
+
31
+ --color-foreground: hsl(var(--foreground));
32
+
33
+ --color-navbar: hsl(var(--navbar));
34
+
35
+ --color-muted: hsl(var(--muted));
36
+ --color-muted-foreground: hsl(var(--muted-foreground));
37
+
38
+ --color-popover: hsl(var(--popover));
39
+ --color-popover-foreground: hsl(var(--popover-foreground));
40
+
41
+ --color-border: hsl(var(--border));
42
+
43
+ --color-primary: hsl(var(--primary));
44
+ --color-primary-foreground: hsl(var(--primary-foreground));
45
+ --color-primary-subtle: hsl(var(--primary-subtle));
46
+ --color-primary-subtle-foreground: hsl(var(--primary-subtle-foreground));
47
+
48
+ --color-secondary: hsl(var(--secondary));
49
+ --color-secondary-foreground: hsl(var(--secondary-foreground));
50
+
51
+ --color-accent: hsl(var(--accent));
52
+ --color-accent-foreground: hsl(var(--accent-foreground));
53
+ --color-accent-alternate: hsl(var(--accent-alternate));
54
+ --color-accent-alternate-foreground: hsl(var(--accent-alternate-foreground));
55
+
56
+ --color-destructive: hsl(var(--destructive));
57
+ --color-destructive-foreground: hsl(var(--destructive-foreground));
58
+ --color-destructive-alternate: hsl(var(--destructive-alternate));
59
+ --color-destructive-alternate-foreground: hsl(var(--destructive-alternate-foreground));
60
+
61
+ --color-positive: hsl(var(--positive));
62
+ --color-positive-foreground: hsl(var(--positive-foreground));
63
+ --color-positive-alternate: hsl(var(--positive-alternate));
64
+ --color-positive-alternate-foreground: hsl(var(--positive-alternate-foreground));
65
+
66
+ --color-ring: hsl(var(--ring));
67
+
68
+ --color-card: hsl(var(--card));
69
+ --color-card-foreground: hsl(var(--card-foreground));
70
+
71
+ --color-hover: hsla(var(--hover));
72
+
73
+ /* Radius */
74
+ --radius: var(--radius);
75
+ --radius-lg: var(--radius);
76
+ --radius-md: calc(var(--radius) - 2px);
77
+ --radius-sm: calc(var(--radius) - 4px);
78
+
79
+ /* Opacity */
80
+ --opacity-primary: 100%;
81
+ --opacity-secondary: 50%;
82
+ --opacity-tertiary: 25%;
83
+
84
+ /* Box shadow */
85
+ --box-shadow-chat-input: 0px 1px 33px 5px hsla(220, 82%, 15%, 0.09);
86
+ }
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Tailwind v3 preset for glchat-a2ui-react-renderer.
3
+ * Refer to glchat-ui values.
4
+ */
5
+
6
+ /** @type {import('tailwindcss').Config} */
7
+ module.exports = {
8
+ theme: {
9
+ extend: {
10
+ backgroundImage: {
11
+ /* Hover State Color */
12
+ 'card-hover':
13
+ 'linear-gradient(hsla(var(--hover)), hsla(var(--hover))), linear-gradient(hsl(var(--card)), hsl(var(--card)))',
14
+ 'primary-hover':
15
+ 'linear-gradient(hsla(var(--hover)), hsla(var(--hover))), linear-gradient(hsl(var(--primary)), hsl(var(--primary)))',
16
+ 'primary-subtle-hover':
17
+ 'linear-gradient(hsla(var(--hover)), hsla(var(--hover))), linear-gradient(hsl(var(--primary-subtle)), hsl(var(--primary-subtle)))',
18
+ 'background-hover':
19
+ 'linear-gradient(hsla(var(--hover)), hsla(var(--hover))), linear-gradient(hsl(var(--background)), hsl(var(--background)))',
20
+ 'destructive-hover':
21
+ 'linear-gradient(hsla(var(--hover)), hsla(var(--hover))), linear-gradient(hsl(var(--destructive)), hsl(var(--destructive)))',
22
+ 'destructive-alternate-hover':
23
+ 'linear-gradient(hsla(var(--hover)), hsla(var(--hover))), linear-gradient(hsl(var(--destructive-alternate)), hsl(var(--destructive-alternate)))',
24
+ },
25
+ colors: {
26
+ background: {
27
+ DEFAULT: 'hsl(var(--background))',
28
+ alternate: 'hsl(var(--background-alternate))',
29
+ },
30
+ foreground: 'hsl(var(--foreground))',
31
+
32
+ navbar: 'hsl(var(--navbar))',
33
+
34
+ muted: {
35
+ DEFAULT: 'hsl(var(--muted))',
36
+ foreground: 'hsl(var(--muted-foreground))',
37
+ },
38
+
39
+ popover: {
40
+ DEFAULT: 'hsl(var(--popover))',
41
+ foreground: 'hsl(var(--popover-foreground))',
42
+ },
43
+
44
+ border: 'hsl(var(--border))',
45
+
46
+ primary: {
47
+ DEFAULT: 'hsl(var(--primary))',
48
+ foreground: 'hsl(var(--primary-foreground))',
49
+ subtle: {
50
+ DEFAULT: 'hsl(var(--primary-subtle))',
51
+ foreground: 'hsl(var(--primary-subtle-foreground))',
52
+ },
53
+ },
54
+
55
+ secondary: {
56
+ DEFAULT: 'hsl(var(--secondary))',
57
+ foreground: 'hsl(var(--secondary-foreground))',
58
+ },
59
+
60
+ accent: {
61
+ DEFAULT: 'hsl(var(--accent))',
62
+ foreground: 'hsl(var(--accent-foreground))',
63
+ alternate: {
64
+ DEFAULT: 'hsl(var(--accent-alternate))',
65
+ foreground: 'hsl(var(--accent-alternate-foreground))',
66
+ },
67
+ },
68
+
69
+ destructive: {
70
+ DEFAULT: 'hsl(var(--destructive))',
71
+ alternate: {
72
+ DEFAULT: 'hsl(var(--destructive-alternate))',
73
+ foreground: 'hsl(var(--destructive-alternate-foreground))',
74
+ },
75
+ foreground: 'hsl(var(--destructive-foreground))',
76
+ },
77
+
78
+ positive: {
79
+ DEFAULT: 'hsl(var(--positive))',
80
+ foreground: 'hsl(var(--positive-foreground))',
81
+ alternate: {
82
+ DEFAULT: 'hsl(var(--positive-alternate))',
83
+ foreground: 'hsl(var(--positive-alternate-foreground))',
84
+ },
85
+ },
86
+
87
+ ring: 'hsl(var(--ring))',
88
+
89
+ card: {
90
+ DEFAULT: 'hsl(var(--card))',
91
+ foreground: 'hsl(var(--card-foreground))',
92
+ },
93
+
94
+ hover: 'hsla(var(--hover))',
95
+ },
96
+ borderRadius: {
97
+ lg: 'var(--radius)',
98
+ md: 'calc(var(--radius) - 2px)',
99
+ sm: 'calc(var(--radius) - 4px)',
100
+ },
101
+ opacity: {
102
+ primary: '100%',
103
+ secondary: '50%',
104
+ tertiary: '25%',
105
+ },
106
+ boxShadow: {
107
+ 'chat-input': '0px 1px 33px 5px hsla(220, 82%, 15%, 0.09)',
108
+ },
109
+ },
110
+ },
111
+ };
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAE7D,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,cAAc;;;;8EA+BlB,CAAC;AAEH,QAAA,MAAM,MAAM,2GAsBX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
@@ -1,43 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Slot } from '@radix-ui/react-slot';
3
- import { forwardRef } from 'react';
4
- import { cn } from '../helpers/css.js';
5
- import { cva } from 'class-variance-authority';
6
- const buttonVariants = cva('a2ui-button', {
7
- variants: {
8
- variant: {
9
- primary: 'a2ui-button--primary',
10
- secondary: 'a2ui-button--secondary',
11
- destructive: 'a2ui-button--destructive',
12
- 'destructive-subtle': 'a2ui-button--destructive-subtle',
13
- outline: 'a2ui-button--outline',
14
- 'ghost-primary': 'a2ui-button--ghost-primary',
15
- 'ghost-neutral': 'a2ui-button--ghost-neutral',
16
- 'ghost-destructive': 'a2ui-button--ghost-destructive',
17
- 'link-primary': 'a2ui-button--link-primary',
18
- 'link-neutral': 'a2ui-button--link-neutral',
19
- },
20
- size: {
21
- tiny: 'a2ui-button--tiny',
22
- small: 'a2ui-button--small',
23
- medium: 'a2ui-button--medium',
24
- large: 'a2ui-button--large',
25
- icon: 'a2ui-button--icon',
26
- },
27
- shape: {
28
- normal: '',
29
- pill: 'a2ui-button--pill',
30
- },
31
- },
32
- defaultVariants: {
33
- variant: 'primary',
34
- size: 'medium',
35
- shape: 'normal',
36
- },
37
- });
38
- const Button = forwardRef(({ className, variant = 'primary', size = 'medium', shape = 'normal', asChild = false, ...props }, ref) => {
39
- const Comp = asChild ? Slot : 'button';
40
- return (_jsx(Comp, { className: cn(buttonVariants({ variant, size, shape }), className), ref: ref, ...props }));
41
- });
42
- Button.displayName = 'Button';
43
- export { Button, buttonVariants };
@@ -1 +0,0 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,IAAI,6GAKR,CAAC;AAGH,QAAA,MAAM,UAAU,6GAKd,CAAC;AAGH,QAAA,MAAM,SAAS,uHAKb,CAAC;AAGH,QAAA,MAAM,eAAe,yHAKnB,CAAC;AAGH,QAAA,MAAM,WAAW,6GAKf,CAAC;AAGH,QAAA,MAAM,UAAU,6GAKd,CAAC;AAGH,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,GACV,CAAC"}
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { cn } from '../helpers/css.js';
4
- const Card = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('a2ui-card', className), ...props })));
5
- Card.displayName = 'Card';
6
- const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('a2ui-card-header', className), ...props })));
7
- CardHeader.displayName = 'CardHeader';
8
- const CardTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("h3", { ref: ref, className: cn('a2ui-card-title', className), ...props })));
9
- CardTitle.displayName = 'CardTitle';
10
- const CardDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("p", { ref: ref, className: cn('a2ui-card-description', className), ...props })));
11
- CardDescription.displayName = 'CardDescription';
12
- const CardContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('a2ui-card-content', className), ...props })));
13
- CardContent.displayName = 'CardContent';
14
- const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('a2ui-card-footer', className), ...props })));
15
- CardFooter.displayName = 'CardFooter';
16
- export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, };
@@ -1,5 +0,0 @@
1
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
2
- import * as React from 'react';
3
- declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
- export { Checkbox };
5
- //# sourceMappingURL=Checkbox.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,QAAQ,iKAaZ,CAAC;AAGH,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,9 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
4
- import { Check } from 'lucide-react';
5
- import * as React from 'react';
6
- import { cn } from '../helpers/css.js';
7
- const Checkbox = React.forwardRef(({ className, ...props }, ref) => (_jsx(CheckboxPrimitive.Root, { ref: ref, className: cn('a2ui-checkbox peer', className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { className: "a2ui-checkbox-indicator", children: _jsx(Check, { width: 16, height: 16, strokeWidth: 1.5 }) }) })));
8
- Checkbox.displayName = CheckboxPrimitive.Root.displayName;
9
- export { Checkbox };
@@ -1,13 +0,0 @@
1
- /**
2
- * A2UI Column component
3
- */
4
- import type { ReactNode } from 'react';
5
- interface ColumnProps {
6
- children: ReactNode;
7
- distribution?: 'start' | 'end' | 'center' | 'spaceBetween' | 'spaceAround' | 'spaceEvenly';
8
- alignment?: 'start' | 'end' | 'center' | 'stretch';
9
- className?: string;
10
- }
11
- export declare function A2UIColumn({ children, distribution, alignment, className, }: ColumnProps): import("react/jsx-runtime").JSX.Element;
12
- export {};
13
- //# sourceMappingURL=Column.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Column.d.ts","sourceRoot":"","sources":["../../../src/components/Column.tsx"],"names":[],"mappings":"AAEA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,UAAU,WAAW;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EACT,OAAO,GACP,KAAK,GACL,QAAQ,GACR,cAAc,GACd,aAAa,GACb,aAAa,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkBD,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,YAAsB,EACtB,SAAqB,EACrB,SAAS,GACV,EAAE,WAAW,2CAab"}
@@ -1,20 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { cn } from '../helpers/css.js';
4
- const distributionClasses = {
5
- start: 'a2ui-column--justify-start',
6
- end: 'a2ui-column--justify-end',
7
- center: 'a2ui-column--justify-center',
8
- spaceBetween: 'a2ui-column--justify-between',
9
- spaceAround: 'a2ui-column--justify-around',
10
- spaceEvenly: 'a2ui-column--justify-evenly',
11
- };
12
- const alignmentClasses = {
13
- start: 'a2ui-column--items-start',
14
- end: 'a2ui-column--items-end',
15
- center: 'a2ui-column--items-center',
16
- stretch: 'a2ui-column--items-stretch',
17
- };
18
- export function A2UIColumn({ children, distribution = 'start', alignment = 'stretch', className, }) {
19
- return (_jsx("div", { className: cn('a2ui-column', distributionClasses[distribution], alignmentClasses[alignment], className), children: children }));
20
- }
@@ -1,9 +0,0 @@
1
- interface A2UIImageProps {
2
- url: string;
3
- fit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
4
- usageHint?: 'icon' | 'avatar' | 'smallFeature' | 'mediumFeature' | 'largeFeature' | 'header';
5
- className?: string;
6
- }
7
- export declare function A2UIImage({ url, fit, usageHint, className, }: A2UIImageProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
9
- //# sourceMappingURL=Image.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/Image.tsx"],"names":[],"mappings":"AAIA,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,cAAc,GAAG,eAAe,GAAG,cAAc,GAAG,QAAQ,CAAC;IAC7F,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAmBD,wBAAgB,SAAS,CAAC,EACxB,GAAG,EACH,GAAa,EACb,SAAS,EACT,SAAS,GACV,EAAE,cAAc,2CAahB"}
@@ -1,21 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { cn } from '../helpers/css.js';
4
- const fitClasses = {
5
- contain: 'a2ui-image--contain',
6
- cover: 'a2ui-image--cover',
7
- fill: 'a2ui-image--fill',
8
- none: 'a2ui-image--none',
9
- 'scale-down': 'a2ui-image--scale-down',
10
- };
11
- const usageHintClasses = {
12
- icon: 'a2ui-image--icon',
13
- avatar: 'a2ui-image--avatar',
14
- smallFeature: 'a2ui-image--small-feature',
15
- mediumFeature: 'a2ui-image--medium-feature',
16
- largeFeature: 'a2ui-image--large-feature',
17
- header: 'a2ui-image--header',
18
- };
19
- export function A2UIImage({ url, fit = 'cover', usageHint, className, }) {
20
- return (_jsx("img", { src: url, alt: "a2ui image", className: cn('a2ui-image', fitClasses[fit], usageHint && usageHintClasses[usageHint], className) }));
21
- }
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
- actionElement?: React.ReactNode;
4
- error?: boolean;
5
- }
6
- declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
7
- export { Input };
8
- //# sourceMappingURL=Input.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IACnD,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,KAAK,qFAqBV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { cn } from '../helpers/css.js';
4
- const Input = React.forwardRef(({ actionElement, className, type, error, ...props }, ref) => {
5
- return (_jsxs("div", { className: "a2ui-input-wrap", children: [_jsx("input", { type: type, className: cn('a2ui-input', { 'invalid': error }, className), ref: ref, ...props }), actionElement &&
6
- (type === 'text' || type === 'password' || type === 'number') && (_jsx("span", { className: "a2ui-input-action", children: actionElement }))] }));
7
- });
8
- Input.displayName = 'Input';
9
- export { Input };
@@ -1,5 +0,0 @@
1
- import * as LabelPrimitive from '@radix-ui/react-label';
2
- import * as React from 'react';
3
- declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
4
- export { Label };
5
- //# sourceMappingURL=Label.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../src/components/Label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,KAAK,yJAST,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,8 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as LabelPrimitive from '@radix-ui/react-label';
4
- import * as React from 'react';
5
- import { cn } from '../helpers/css.js';
6
- const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx(LabelPrimitive.Root, { ref: ref, className: cn('a2ui-label', className), ...props })));
7
- Label.displayName = LabelPrimitive.Root.displayName;
8
- export { Label };
@@ -1,13 +0,0 @@
1
- /**
2
- * A2UI Row component
3
- */
4
- import type { ReactNode } from 'react';
5
- interface RowProps {
6
- children: ReactNode;
7
- distribution?: 'start' | 'end' | 'center' | 'spaceBetween' | 'spaceAround' | 'spaceEvenly';
8
- alignment?: 'start' | 'end' | 'center' | 'stretch';
9
- className?: string;
10
- }
11
- export declare function A2UIRow({ children, distribution, alignment, className, }: RowProps): import("react/jsx-runtime").JSX.Element;
12
- export {};
13
- //# sourceMappingURL=Row.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../src/components/Row.tsx"],"names":[],"mappings":"AAEA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,UAAU,QAAQ;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EACT,OAAO,GACP,KAAK,GACL,QAAQ,GACR,cAAc,GACd,aAAa,GACb,aAAa,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkBD,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,YAAsB,EACtB,SAAqB,EACrB,SAAS,GACV,EAAE,QAAQ,2CAaV"}
@@ -1,20 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { cn } from '../helpers/css.js';
4
- const distributionClasses = {
5
- start: 'a2ui-row--justify-start',
6
- end: 'a2ui-row--justify-end',
7
- center: 'a2ui-row--justify-center',
8
- spaceBetween: 'a2ui-row--justify-between',
9
- spaceAround: 'a2ui-row--justify-around',
10
- spaceEvenly: 'a2ui-row--justify-evenly',
11
- };
12
- const alignmentClasses = {
13
- start: 'a2ui-row--items-start',
14
- end: 'a2ui-row--items-end',
15
- center: 'a2ui-row--items-center',
16
- stretch: 'a2ui-row--items-stretch',
17
- };
18
- export function A2UIRow({ children, distribution = 'start', alignment = 'stretch', className, }) {
19
- return (_jsx("div", { className: cn('a2ui-row', distributionClasses[distribution], alignmentClasses[alignment], className), children: children }));
20
- }
@@ -1,5 +0,0 @@
1
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
2
- import * as React from 'react';
3
- declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
- export { Separator };
5
- //# sourceMappingURL=Separator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../src/components/Separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,SAAS,6JAuBd,CAAC;AAGF,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -1,11 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
4
- import * as React from 'react';
5
- import { cn } from '../helpers/css.js';
6
- const Separator = React.forwardRef(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (_jsx(SeparatorPrimitive.Root, { ref: ref, decorative: decorative, orientation: orientation, className: cn('a2ui-separator', {
7
- 'a2ui-separator--horizontal': orientation === 'horizontal',
8
- 'a2ui-separator--vertical': orientation === 'vertical',
9
- }, className), ...props })));
10
- Separator.displayName = SeparatorPrimitive.Root.displayName;
11
- export { Separator };