@vvedantb/ui 0.69.0 → 0.75.3
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/src/composer/input-area/ComposerSlashMenu.js +1 -1
- package/dist/src/ui/_field-classes.js +1 -0
- package/dist/src/ui/_menu-classes.alt.js +1 -1
- package/dist/src/ui/_menu-classes.js +1 -1
- package/dist/src/ui/badge.js +1 -1
- package/dist/src/ui/button.js +6 -4
- package/dist/src/ui/card.js +1 -1
- package/dist/src/ui/checkbox.js +2 -2
- package/dist/src/ui/clear-input.js +3 -3
- package/dist/src/ui/command.js +3 -3
- package/dist/src/ui/input.js +2 -2
- package/dist/src/ui/popover.js +1 -1
- package/dist/src/ui/progress.js +28 -25
- package/dist/src/ui/radix-select.js +1 -1
- package/dist/src/ui/search-input.js +2 -2
- package/dist/src/ui/select.js +3 -3
- package/dist/src/ui/slider.js +4 -2
- package/dist/src/ui/switch.js +72 -63
- package/dist/src/ui/textarea.js +2 -2
- package/dist/tokens/src/css/tabs-pills.css +41 -0
- package/package.json +1 -1
- package/src/ai-elements/__snapshots__/queue.test.tsx.snap +4 -4
- package/src/composer/input-area/ComposerSlashMenu.tsx +1 -1
- package/src/ui/__snapshots__/alt-wrappers.test.tsx.snap +1 -1
- package/src/ui/_field-classes.ts +3 -0
- package/src/ui/_menu-classes.alt.ts +1 -1
- package/src/ui/_menu-classes.ts +1 -1
- package/src/ui/badge.tsx +1 -1
- package/src/ui/button.tsx +9 -4
- package/src/ui/card.tsx +1 -1
- package/src/ui/checkbox.tsx +2 -2
- package/src/ui/clear-input.tsx +3 -3
- package/src/ui/command.tsx +3 -3
- package/src/ui/input.tsx +2 -1
- package/src/ui/popover.tsx +1 -0
- package/src/ui/progress.tsx +3 -3
- package/src/ui/radix-select.tsx +1 -1
- package/src/ui/search-input.tsx +2 -2
- package/src/ui/select.tsx +3 -2
- package/src/ui/slider.tsx +7 -2
- package/src/ui/switch.tsx +15 -4
- package/src/ui/textarea.tsx +2 -1
- package/tokens/src/css/tabs-pills.css +41 -0
package/dist/src/ui/switch.js
CHANGED
|
@@ -6,10 +6,12 @@ import { useCn, useUiConfig } from "./ui-config.js";
|
|
|
6
6
|
|
|
7
7
|
/** `UiConfig.Switch`: `classes` replace the built-in part classes. */
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
const PRESSED_THUMB_PX =
|
|
9
|
+
const PRESSED_THUMB_PX = 34;
|
|
10
10
|
const DRAG_THRESHOLD_PX = 3;
|
|
11
|
+
const THUMB_BASE = "pointer-events-none relative block h-4 w-4 rounded-full bg-background shadow-sm ring-0 [transition-property:transform,translate,width,height,background-color,box-shadow,backdrop-filter] duration-200 ease-smooth motion-reduce:transition-none data-[state=checked]:translate-x-[30px] data-[state=checked]:bg-primary-foreground data-[state=unchecked]:translate-x-0 dark:data-[state=unchecked]:bg-foreground group-disabled:group-active:h-4 group-disabled:group-active:w-4 group-disabled:group-active:data-[state=checked]:translate-x-[30px] data-[dragging]:translate-x-(--switch-x)! data-[dragging]:[transition-property:width,height,background-color,box-shadow,backdrop-filter]";
|
|
12
|
+
const THUMB_CLEAR = "group-active:h-7 group-active:w-[34px] group-active:data-[state=checked]:translate-x-3 group-active:bg-[rgb(255_255_255/0.12)] group-active:backdrop-blur-[1.8px] group-active:backdrop-saturate-[1.24] group-active:shadow-[inset_0_0_0_0.75px_rgb(255_255_255/0.7),inset_1.5px_1.5px_1px_-1px_white,inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.6),0_6px_14px_rgb(0_0_0/0.14),0_1px_2px_rgb(0_0_0/0.18)] group-active:data-[state=checked]:bg-[rgb(255_255_255/0.12)] group-active:data-[state=unchecked]:bg-[rgb(0_0_0/0.096)] dark:data-[state=unchecked]:group-active:bg-[rgb(255_255_255/0.14)] group-active:data-[state=unchecked]:shadow-[inset_0_0_0_0.75px_rgb(255_255_255/0.9),inset_0_0_0_1.75px_rgb(0_0_0/0.1),inset_1.5px_1.5px_1px_-1px_white,inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.6),0_6px_14px_rgb(0_0_0/0.18),0_1px_2px_rgb(0_0_0/0.22)] after:absolute after:inset-x-2 after:top-0.5 after:h-1 after:rounded-full after:bg-white/40 after:opacity-0 group-active:after:opacity-100";
|
|
11
13
|
const Switch = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
12
|
-
const $ = _c(
|
|
14
|
+
const $ = _c(45);
|
|
13
15
|
let className;
|
|
14
16
|
let onClick;
|
|
15
17
|
let onPointerCancel;
|
|
@@ -17,9 +19,11 @@ const Switch = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
17
19
|
let onPointerMove;
|
|
18
20
|
let onPointerUp;
|
|
19
21
|
let props;
|
|
22
|
+
let style;
|
|
20
23
|
if ($[0] !== t0) {
|
|
21
24
|
({
|
|
22
25
|
className,
|
|
26
|
+
style,
|
|
23
27
|
onPointerDown,
|
|
24
28
|
onPointerMove,
|
|
25
29
|
onPointerUp,
|
|
@@ -35,6 +39,7 @@ const Switch = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
35
39
|
$[5] = onPointerMove;
|
|
36
40
|
$[6] = onPointerUp;
|
|
37
41
|
$[7] = props;
|
|
42
|
+
$[8] = style;
|
|
38
43
|
} else {
|
|
39
44
|
className = $[1];
|
|
40
45
|
onClick = $[2];
|
|
@@ -43,21 +48,23 @@ const Switch = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
43
48
|
onPointerMove = $[5];
|
|
44
49
|
onPointerUp = $[6];
|
|
45
50
|
props = $[7];
|
|
51
|
+
style = $[8];
|
|
46
52
|
}
|
|
47
|
-
const
|
|
53
|
+
const config = useUiConfig("Switch");
|
|
54
|
+
const classes = config?.classes;
|
|
48
55
|
const merge = useCn();
|
|
49
56
|
const [dragX, setDragX] = React.useState(null);
|
|
50
57
|
let t1;
|
|
51
|
-
if ($[
|
|
58
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
52
59
|
t1 = {
|
|
53
60
|
startClientX: 0,
|
|
54
61
|
startX: 0,
|
|
55
62
|
active: false,
|
|
56
63
|
moved: false
|
|
57
64
|
};
|
|
58
|
-
$[
|
|
65
|
+
$[9] = t1;
|
|
59
66
|
} else {
|
|
60
|
-
t1 = $[
|
|
67
|
+
t1 = $[9];
|
|
61
68
|
}
|
|
62
69
|
const drag = React.useRef(t1);
|
|
63
70
|
const swallowClick = React.useRef(false);
|
|
@@ -65,7 +72,7 @@ const Switch = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
65
72
|
const range = _temp;
|
|
66
73
|
const wantsChecked = _temp2;
|
|
67
74
|
let t2;
|
|
68
|
-
if ($[
|
|
75
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
69
76
|
t2 = event => {
|
|
70
77
|
const state = drag.current;
|
|
71
78
|
if (!state.active) {
|
|
@@ -84,24 +91,24 @@ const Switch = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
84
91
|
}
|
|
85
92
|
setDragX(null);
|
|
86
93
|
};
|
|
87
|
-
$[
|
|
94
|
+
$[10] = t2;
|
|
88
95
|
} else {
|
|
89
|
-
t2 = $[
|
|
96
|
+
t2 = $[10];
|
|
90
97
|
}
|
|
91
98
|
const finish = t2;
|
|
92
99
|
const t3 = classes?.root ?? "peer group relative inline-flex h-5 w-12 shrink-0 cursor-pointer touch-pan-y select-none items-center rounded-full border border-border bg-default transition-[background-color,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=unchecked]:bg-default dark:data-[state=unchecked]:border-muted/60 dark:data-[state=unchecked]:bg-muted/40 before:absolute before:inset-[-8px] before:content-['']";
|
|
93
100
|
let t4;
|
|
94
|
-
if ($[
|
|
101
|
+
if ($[11] !== className || $[12] !== merge || $[13] !== t3) {
|
|
95
102
|
t4 = merge(t3, className);
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
$[
|
|
103
|
+
$[11] = className;
|
|
104
|
+
$[12] = merge;
|
|
105
|
+
$[13] = t3;
|
|
106
|
+
$[14] = t4;
|
|
100
107
|
} else {
|
|
101
|
-
t4 = $[
|
|
108
|
+
t4 = $[14];
|
|
102
109
|
}
|
|
103
110
|
let t5;
|
|
104
|
-
if ($[
|
|
111
|
+
if ($[15] !== onClick) {
|
|
105
112
|
t5 = event_0 => {
|
|
106
113
|
onClick?.(event_0);
|
|
107
114
|
if (swallowClick.current && !programmatic.current) {
|
|
@@ -109,13 +116,13 @@ const Switch = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
109
116
|
event_0.preventDefault();
|
|
110
117
|
}
|
|
111
118
|
};
|
|
112
|
-
$[
|
|
113
|
-
$[
|
|
119
|
+
$[15] = onClick;
|
|
120
|
+
$[16] = t5;
|
|
114
121
|
} else {
|
|
115
|
-
t5 = $[
|
|
122
|
+
t5 = $[16];
|
|
116
123
|
}
|
|
117
124
|
let t6;
|
|
118
|
-
if ($[
|
|
125
|
+
if ($[17] !== onPointerDown || $[18] !== props.disabled) {
|
|
119
126
|
t6 = event_1 => {
|
|
120
127
|
onPointerDown?.(event_1);
|
|
121
128
|
if (props.disabled || event_1.button !== 0) {
|
|
@@ -131,14 +138,14 @@ const Switch = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
131
138
|
};
|
|
132
139
|
el_2.setPointerCapture(event_1.pointerId);
|
|
133
140
|
};
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
141
|
+
$[17] = onPointerDown;
|
|
142
|
+
$[18] = props.disabled;
|
|
143
|
+
$[19] = t6;
|
|
137
144
|
} else {
|
|
138
|
-
t6 = $[
|
|
145
|
+
t6 = $[19];
|
|
139
146
|
}
|
|
140
147
|
let t7;
|
|
141
|
-
if ($[
|
|
148
|
+
if ($[20] !== onPointerMove) {
|
|
142
149
|
t7 = event_2 => {
|
|
143
150
|
onPointerMove?.(event_2);
|
|
144
151
|
const state_0 = drag.current;
|
|
@@ -152,73 +159,74 @@ const Switch = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
152
159
|
state_0.moved = true;
|
|
153
160
|
setDragX(Math.min(Math.max(state_0.startX + dx, 0), range(event_2.currentTarget)));
|
|
154
161
|
};
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
162
|
+
$[20] = onPointerMove;
|
|
163
|
+
$[21] = t7;
|
|
157
164
|
} else {
|
|
158
|
-
t7 = $[
|
|
165
|
+
t7 = $[21];
|
|
159
166
|
}
|
|
160
167
|
let t8;
|
|
161
|
-
if ($[
|
|
168
|
+
if ($[22] !== onPointerUp) {
|
|
162
169
|
t8 = event_3 => {
|
|
163
170
|
onPointerUp?.(event_3);
|
|
164
171
|
finish(event_3);
|
|
165
172
|
};
|
|
166
|
-
$[
|
|
167
|
-
$[
|
|
173
|
+
$[22] = onPointerUp;
|
|
174
|
+
$[23] = t8;
|
|
168
175
|
} else {
|
|
169
|
-
t8 = $[
|
|
176
|
+
t8 = $[23];
|
|
170
177
|
}
|
|
171
178
|
let t9;
|
|
172
|
-
if ($[
|
|
179
|
+
if ($[24] !== onPointerCancel) {
|
|
173
180
|
t9 = event_4 => {
|
|
174
181
|
onPointerCancel?.(event_4);
|
|
175
182
|
drag.current.active = false;
|
|
176
183
|
drag.current.moved = false;
|
|
177
184
|
setDragX(null);
|
|
178
185
|
};
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
186
|
+
$[24] = onPointerCancel;
|
|
187
|
+
$[25] = t9;
|
|
181
188
|
} else {
|
|
182
|
-
t9 = $[
|
|
189
|
+
t9 = $[25];
|
|
183
190
|
}
|
|
184
191
|
const t10 = dragX === null ? undefined : "";
|
|
185
192
|
let t11;
|
|
186
|
-
if ($[
|
|
193
|
+
if ($[26] !== dragX) {
|
|
187
194
|
t11 = dragX === null ? undefined : {
|
|
188
195
|
"--switch-x": `${dragX}px`
|
|
189
196
|
};
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
197
|
+
$[26] = dragX;
|
|
198
|
+
$[27] = t11;
|
|
192
199
|
} else {
|
|
193
|
-
t11 = $[
|
|
200
|
+
t11 = $[27];
|
|
194
201
|
}
|
|
195
202
|
let t12;
|
|
196
|
-
if ($[
|
|
197
|
-
t12 = classes?.thumb ?? cn(
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
203
|
+
if ($[28] !== classes?.thumb) {
|
|
204
|
+
t12 = classes?.thumb ?? cn(THUMB_BASE, THUMB_CLEAR);
|
|
205
|
+
$[28] = classes?.thumb;
|
|
206
|
+
$[29] = t12;
|
|
200
207
|
} else {
|
|
201
|
-
t12 = $[
|
|
208
|
+
t12 = $[29];
|
|
202
209
|
}
|
|
203
210
|
let t13;
|
|
204
|
-
if ($[
|
|
211
|
+
if ($[30] !== t10 || $[31] !== t11 || $[32] !== t12) {
|
|
205
212
|
t13 = /*#__PURE__*/_jsx(SwitchPrimitive.Thumb, {
|
|
206
213
|
"data-dragging": t10,
|
|
207
214
|
style: t11,
|
|
208
215
|
className: t12
|
|
209
216
|
});
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
217
|
+
$[30] = t10;
|
|
218
|
+
$[31] = t11;
|
|
219
|
+
$[32] = t12;
|
|
220
|
+
$[33] = t13;
|
|
214
221
|
} else {
|
|
215
|
-
t13 = $[
|
|
222
|
+
t13 = $[33];
|
|
216
223
|
}
|
|
217
224
|
let t14;
|
|
218
|
-
if ($[
|
|
225
|
+
if ($[34] !== props || $[35] !== ref || $[36] !== style || $[37] !== t13 || $[38] !== t4 || $[39] !== t5 || $[40] !== t6 || $[41] !== t7 || $[42] !== t8 || $[43] !== t9) {
|
|
219
226
|
t14 = /*#__PURE__*/_jsx(SwitchPrimitive.Root, {
|
|
220
227
|
className: t4,
|
|
221
228
|
...props,
|
|
229
|
+
style: style,
|
|
222
230
|
ref: ref,
|
|
223
231
|
onClick: t5,
|
|
224
232
|
onPointerDown: t6,
|
|
@@ -227,18 +235,19 @@ const Switch = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
227
235
|
onPointerCancel: t9,
|
|
228
236
|
children: t13
|
|
229
237
|
});
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
238
|
+
$[34] = props;
|
|
239
|
+
$[35] = ref;
|
|
240
|
+
$[36] = style;
|
|
241
|
+
$[37] = t13;
|
|
242
|
+
$[38] = t4;
|
|
243
|
+
$[39] = t5;
|
|
244
|
+
$[40] = t6;
|
|
245
|
+
$[41] = t7;
|
|
246
|
+
$[42] = t8;
|
|
247
|
+
$[43] = t9;
|
|
248
|
+
$[44] = t14;
|
|
240
249
|
} else {
|
|
241
|
-
t14 = $[
|
|
250
|
+
t14 = $[44];
|
|
242
251
|
}
|
|
243
252
|
return t14;
|
|
244
253
|
});
|
package/dist/src/ui/textarea.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { fieldFocusClass } from "./_field-classes.js";
|
|
3
|
+
import { fieldFocusClass, fieldGlassClass } from "./_field-classes.js";
|
|
4
4
|
import { useCn, useUiConfig } from "./ui-config.js";
|
|
5
5
|
|
|
6
6
|
/** `UiConfig.Textarea`: `classes.base` replaces the built-in field classes. */
|
|
@@ -25,7 +25,7 @@ const Textarea = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
25
25
|
const merge = useCn();
|
|
26
26
|
let t1;
|
|
27
27
|
if ($[3] !== base) {
|
|
28
|
-
t1 = base ?? ["flex min-h-20 w-full max-sm:min-w-0 rounded-field border border-border bg-field-background px-3.5 py-2.5 text-base sm:pointer-fine:text-sm placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50", fieldFocusClass];
|
|
28
|
+
t1 = base ?? ["flex min-h-20 w-full max-sm:min-w-0 rounded-field border border-border bg-field-background px-3.5 py-2.5 text-base sm:pointer-fine:text-sm placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50", fieldGlassClass, fieldFocusClass];
|
|
29
29
|
$[3] = base;
|
|
30
30
|
$[4] = t1;
|
|
31
31
|
} else {
|
|
@@ -37,6 +37,47 @@
|
|
|
37
37
|
border-radius: 48px;
|
|
38
38
|
background: var(--tabs-bar-bg);
|
|
39
39
|
}
|
|
40
|
+
/* The sliding pill is a thin frosted glass lens: translucent fill, rim, top-left highlight, streak. */
|
|
41
|
+
.t-tabs--segmented .t-tabs-pill {
|
|
42
|
+
background: color-mix(in srgb, var(--tabs-pill-bg) 55%, transparent);
|
|
43
|
+
backdrop-filter: blur(0.8px) saturate(1.24);
|
|
44
|
+
box-shadow:
|
|
45
|
+
inset 0 0 0 0.75px rgb(255 255 255 / 0.9),
|
|
46
|
+
inset 0 0 0 1.75px rgb(0 0 0 / 0.06),
|
|
47
|
+
inset 1.5px 1.5px 1px -1px white,
|
|
48
|
+
inset -1.5px -1.5px 1px -1px rgb(255 255 255 / 0.6),
|
|
49
|
+
0 3px 8px rgb(0 0 0 / 0.12),
|
|
50
|
+
0 1px 2px rgb(0 0 0 / 0.14);
|
|
51
|
+
}
|
|
52
|
+
.t-tabs--segmented .t-tabs-pill::after {
|
|
53
|
+
content: "";
|
|
54
|
+
position: absolute;
|
|
55
|
+
inset: 2px 10px auto;
|
|
56
|
+
height: 4px;
|
|
57
|
+
border-radius: 48px;
|
|
58
|
+
background: rgb(255 255 255 / 0.4);
|
|
59
|
+
}
|
|
60
|
+
.dark .t-tabs--segmented .t-tabs-pill,
|
|
61
|
+
[data-theme="dark"] .t-tabs--segmented .t-tabs-pill {
|
|
62
|
+
background: rgb(255 255 255 / 0.16);
|
|
63
|
+
box-shadow:
|
|
64
|
+
inset 0 0 0 0.75px rgb(255 255 255 / 0.1),
|
|
65
|
+
inset 1.5px 1.5px 1px -1px rgb(255 255 255 / 0.45),
|
|
66
|
+
inset -1.5px -1.5px 1px -1px rgb(255 255 255 / 0.15),
|
|
67
|
+
0 3px 8px rgb(0 0 0 / 0.35);
|
|
68
|
+
}
|
|
69
|
+
.dark .t-tabs--segmented .t-tabs-pill::after,
|
|
70
|
+
[data-theme="dark"] .t-tabs--segmented .t-tabs-pill::after {
|
|
71
|
+
background: rgb(255 255 255 / 0.12);
|
|
72
|
+
}
|
|
73
|
+
.dark.neutral .t-tabs--segmented .t-tabs-pill {
|
|
74
|
+
background: rgb(255 255 255 / 0.14);
|
|
75
|
+
box-shadow:
|
|
76
|
+
inset 0 0 0 0.75px rgb(255 255 255 / 0.1),
|
|
77
|
+
inset 1.5px 1.5px 1px -1px rgb(255 255 255 / 0.4),
|
|
78
|
+
inset -1.5px -1.5px 1px -1px rgb(255 255 255 / 0.12),
|
|
79
|
+
0 3px 8px rgb(0 0 0 / 0.22);
|
|
80
|
+
}
|
|
40
81
|
/* Isolated pills. Each tab owns its outline; the selected tab is filled. */
|
|
41
82
|
.t-tabs--pills {
|
|
42
83
|
gap: 6px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vvedantb/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Shared React 19 UI for web apps: one main JavaScript entry (primitives, shell pieces, app helpers including the Convex and Clerk provider, VITE env parsing and ensure-user, artifact viewers over the @vvedantb/server artifacts core, native tokens), third-party brand logos (also @vvedantb/ui/logos), motion-driven animated SVG icons (@vvedantb/ui/icons/animated), a client entry without @vvedantb/server, convex or Clerk for Chrome extensions, design-token CSS, shared Tailwind v4 CSS, a Tailwind preset and packaged Instrument Sans fonts.",
|
|
6
6
|
"type": "module",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`vibot Queue widget DOM > renders the closed widget 1`] = `"<div class="w-full overflow-hidden" style="height: auto; opacity: 1;"><button type="button" class="flex items-center justify-between w-full px-4 py-2.5 bg-surface-secondary text-foreground border-0 shadow-none backdrop-blur-none transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-tertiary rounded-t-2xl group"><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-stack-2 text-muted-foreground"><path d="M12 4l-8 4l8 4l8 -4l-8 -4"></path><path d="M4 12l8 4l8 -4"></path><path d="M4 16l8 4l8 -4"></path></svg><span class="text-sm font-medium text-foreground">Queued Messages</span><div class="inline-flex items-center gap-1 rounded-full border px-2.5 py-1 font-medium tracking-normal transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-default text-default-foreground text-xs">3</div></div><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-chevron-down text-muted-foreground transition-transform duration-200 ease-out"><path d="M6 9l6 6l6 -6"></path></svg></button></div>"`;
|
|
3
|
+
exports[`vibot Queue widget DOM > renders the closed widget 1`] = `"<div class="w-full overflow-hidden" style="height: auto; opacity: 1;"><button type="button" class="flex items-center justify-between w-full px-4 py-2.5 bg-surface-secondary text-foreground border-0 shadow-none backdrop-blur-none transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-tertiary rounded-t-2xl group"><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-stack-2 text-muted-foreground"><path d="M12 4l-8 4l8 4l8 -4l-8 -4"></path><path d="M4 12l8 4l8 -4"></path><path d="M4 16l8 4l8 -4"></path></svg><span class="text-sm font-medium text-foreground">Queued Messages</span><div class="inline-flex items-center gap-1 rounded-full border px-2.5 py-1 font-medium tracking-normal shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.7),inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.3),0_1px_2px_rgb(0_0_0/0.06)] backdrop-blur-[0.8px] backdrop-saturate-[1.24] transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-default text-default-foreground text-xs">3</div></div><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-chevron-down text-muted-foreground transition-transform duration-200 ease-out"><path d="M6 9l6 6l6 -6"></path></svg></button></div>"`;
|
|
4
4
|
|
|
5
|
-
exports[`vibot Queue widget DOM > renders the editing state, then saves the trimmed text 1`] = `"<div class="group relative p-2.5 rounded-lg transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-secondary"><div class="flex flex-col gap-2"><textarea class="flex w-full max-sm:min-w-0 rounded-field border border-border bg-field-background px-3.5 py-2.5 text-base sm:pointer-fine:text-sm placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-1 focus-visible:ring-focus-ring min-h-[60px]">Draft</textarea><div class="flex justify-end gap-2"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground text-xs max-sm:hit-target rounded-full h-7 px-2"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-x"><path d="M18 6l-12 12"></path><path d="M6 6l12 12"></path></svg><span class="ml-1 text-xs">Cancel</span></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover
|
|
5
|
+
exports[`vibot Queue widget DOM > renders the editing state, then saves the trimmed text 1`] = `"<div class="group relative p-2.5 rounded-lg transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-secondary"><div class="flex flex-col gap-2"><textarea class="flex w-full max-sm:min-w-0 rounded-field border border-border bg-field-background px-3.5 py-2.5 text-base sm:pointer-fine:text-sm placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50 shadow-[inset_0_1px_2px_rgb(0_0_0/0.08),inset_0_0_0_0.5px_rgb(0_0_0/0.04),0_1px_0_rgb(255_255_255/0.25)] focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-1 focus-visible:ring-focus-ring min-h-[60px]">Draft</textarea><div class="flex justify-end gap-2"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground text-xs max-sm:hit-target rounded-full h-7 px-2"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-x"><path d="M18 6l-12 12"></path><path d="M6 6l12 12"></path></svg><span class="ml-1 text-xs">Cancel</span></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:opacity-90shadow-[inset_0_0_0_0.75px_color-mix(in_srgb,var(--color-primary-foreground)_30%,transparent),inset_1.5px_1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_60%,transparent),inset_-1.5px_-1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_22%,transparent),0_1px_2px_rgb(0_0_0/0.16)] text-xs max-sm:hit-target rounded-full h-7 px-2"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-check"><path d="M5 12l5 5l10 -10"></path></svg><span class="ml-1 text-xs">Save</span></button></div></div></div>"`;
|
|
6
6
|
|
|
7
7
|
exports[`vibot Queue widget DOM > renders the editing state, then saves the trimmed text 2`] = `"<div class="group relative p-2.5 rounded-lg transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-secondary"><div class="flex items-center gap-2"><p class="text-sm text-foreground/90 flex-1 truncate">Draft</p><div class="flex items-center gap-1.5 shrink-0"></div><div class="flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground text-xs max-sm:hit-target rounded-full h-6 w-6 p-0"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-edit"><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"></path><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415"></path><path d="M16 5l3 3"></path></svg></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-xs max-sm:hit-target rounded-full h-6 w-6 p-0 text-danger hover:bg-danger/10 hover:text-danger"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-trash"><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path></svg></button></div></div></div>"`;
|
|
8
8
|
|
|
9
|
-
exports[`vibot Queue widget DOM > renders the header with a custom class 1`] = `"<button type="button" class="flex items-center justify-between w-full px-4 py-2.5 bg-surface-secondary text-foreground border-0 shadow-none backdrop-blur-none transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-tertiary rounded-t-2xl group x"><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-stack-2 text-muted-foreground"><path d="M12 4l-8 4l8 4l8 -4l-8 -4"></path><path d="M4 12l8 4l8 -4"></path><path d="M4 16l8 4l8 -4"></path></svg><span class="text-sm font-medium text-foreground">Queued Messages</span><div class="inline-flex items-center gap-1 rounded-full border px-2.5 py-1 font-medium tracking-normal transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-default text-default-foreground text-xs">1</div></div><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-chevron-down text-muted-foreground transition-transform duration-200 ease-out"><path d="M6 9l6 6l6 -6"></path></svg></button>"`;
|
|
9
|
+
exports[`vibot Queue widget DOM > renders the header with a custom class 1`] = `"<button type="button" class="flex items-center justify-between w-full px-4 py-2.5 bg-surface-secondary text-foreground border-0 shadow-none backdrop-blur-none transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-tertiary rounded-t-2xl group x"><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-stack-2 text-muted-foreground"><path d="M12 4l-8 4l8 4l8 -4l-8 -4"></path><path d="M4 12l8 4l8 -4"></path><path d="M4 16l8 4l8 -4"></path></svg><span class="text-sm font-medium text-foreground">Queued Messages</span><div class="inline-flex items-center gap-1 rounded-full border px-2.5 py-1 font-medium tracking-normal shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.7),inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.3),0_1px_2px_rgb(0_0_0/0.06)] backdrop-blur-[0.8px] backdrop-saturate-[1.24] transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-default text-default-foreground text-xs">1</div></div><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-chevron-down text-muted-foreground transition-transform duration-200 ease-out"><path d="M6 9l6 6l6 -6"></path></svg></button>"`;
|
|
10
10
|
|
|
11
|
-
exports[`vibot Queue widget DOM > renders the open widget 1`] = `"<div class="w-full overflow-hidden mb-2" style="height: auto; opacity: 1;"><button type="button" class="flex items-center justify-between w-full px-4 py-2.5 bg-surface-secondary text-foreground border-0 shadow-none backdrop-blur-none transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-tertiary rounded-t-2xl group"><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-stack-2 text-muted-foreground"><path d="M12 4l-8 4l8 4l8 -4l-8 -4"></path><path d="M4 12l8 4l8 -4"></path><path d="M4 16l8 4l8 -4"></path></svg><span class="text-sm font-medium text-foreground">Queued Messages</span><div class="inline-flex items-center gap-1 rounded-full border px-2.5 py-1 font-medium tracking-normal transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-default text-default-foreground text-xs">3</div></div><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-chevron-down text-muted-foreground transition-transform duration-200 ease-out rotate-180"><path d="M6 9l6 6l6 -6"></path></svg></button><div class="overflow-hidden" style="height: auto; opacity: 1;"><div class="bg-surface-secondary text-foreground border-0 shadow-none backdrop-blur-none rounded-b-2xl"><div dir="ltr" data-slot="scroll-area" class="relative max-h-[240px]" style="position: relative; --radix-scroll-area-corner-width: 0px; --radix-scroll-area-corner-height: 0px;"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" data-slot="scroll-area-viewport" class="size-full rounded-[inherit] outline-hidden" style="overflow-x: hidden; overflow-y: scroll;"><div style="min-width: 100%; display: table;"><div class="p-2 space-y-1.5"><div class="group relative p-2.5 rounded-lg transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-secondary"><div class="flex items-center gap-2"><img alt="Ada" class="size-5 rounded-full shrink-0" src="https://example.com/ada.png"><p class="text-sm text-foreground/90 flex-1 truncate">Fix the build</p><div class="flex items-center gap-1.5 shrink-0"><div class="inline-flex items-center gap-1 rounded-full border py-1 font-medium tracking-normal transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-transparent text-muted-foreground text-xs h-5 px-1.5">claude-sonnet</div><div class="inline-flex items-center gap-1 rounded-full border py-1 font-medium tracking-normal transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-transparent text-muted-foreground text-xs h-5 px-1.5">Terse</div></div><div class="flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground text-xs max-sm:hit-target rounded-full h-6 w-6 p-0"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-edit"><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"></path><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415"></path><path d="M16 5l3 3"></path></svg></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-xs max-sm:hit-target rounded-full h-6 w-6 p-0 text-danger hover:bg-danger/10 hover:text-danger"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-trash"><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path></svg></button></div></div></div><div class="group relative p-2.5 rounded-lg transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-secondary extra"><div class="flex items-center gap-2"><p class="text-sm text-foreground/90 flex-1 truncate">Plain</p><div class="flex items-center gap-1.5 shrink-0"><div class="inline-flex items-center gap-1 rounded-full border py-1 font-medium tracking-normal transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-transparent text-muted-foreground text-xs h-5 px-1.5">Bob</div></div><div class="flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground text-xs max-sm:hit-target rounded-full h-6 w-6 p-0"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-edit"><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"></path><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415"></path><path d="M16 5l3 3"></path></svg></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-xs max-sm:hit-target rounded-full h-6 w-6 p-0 text-danger hover:bg-danger/10 hover:text-danger"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-trash"><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path></svg></button></div></div></div><div class="group relative p-2.5 rounded-lg transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-secondary"><div class="flex items-center gap-2"><p class="text-sm text-foreground/90 flex-1 truncate">Bare</p><div class="flex items-center gap-1.5 shrink-0"></div><div class="flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground text-xs max-sm:hit-target rounded-full h-6 w-6 p-0"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-edit"><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"></path><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415"></path><path d="M16 5l3 3"></path></svg></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-xs max-sm:hit-target rounded-full h-6 w-6 p-0 text-danger hover:bg-danger/10 hover:text-danger"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-trash"><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path></svg></button></div></div></div></div></div></div></div></div></div></div>"`;
|
|
11
|
+
exports[`vibot Queue widget DOM > renders the open widget 1`] = `"<div class="w-full overflow-hidden mb-2" style="height: auto; opacity: 1;"><button type="button" class="flex items-center justify-between w-full px-4 py-2.5 bg-surface-secondary text-foreground border-0 shadow-none backdrop-blur-none transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-tertiary rounded-t-2xl group"><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-stack-2 text-muted-foreground"><path d="M12 4l-8 4l8 4l8 -4l-8 -4"></path><path d="M4 12l8 4l8 -4"></path><path d="M4 16l8 4l8 -4"></path></svg><span class="text-sm font-medium text-foreground">Queued Messages</span><div class="inline-flex items-center gap-1 rounded-full border px-2.5 py-1 font-medium tracking-normal shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.7),inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.3),0_1px_2px_rgb(0_0_0/0.06)] backdrop-blur-[0.8px] backdrop-saturate-[1.24] transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-default text-default-foreground text-xs">3</div></div><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-chevron-down text-muted-foreground transition-transform duration-200 ease-out rotate-180"><path d="M6 9l6 6l6 -6"></path></svg></button><div class="overflow-hidden" style="height: auto; opacity: 1;"><div class="bg-surface-secondary text-foreground border-0 shadow-none backdrop-blur-none rounded-b-2xl"><div dir="ltr" data-slot="scroll-area" class="relative max-h-[240px]" style="position: relative; --radix-scroll-area-corner-width: 0px; --radix-scroll-area-corner-height: 0px;"><style>[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}</style><div data-radix-scroll-area-viewport="" data-slot="scroll-area-viewport" class="size-full rounded-[inherit] outline-hidden" style="overflow-x: hidden; overflow-y: scroll;"><div style="min-width: 100%; display: table;"><div class="p-2 space-y-1.5"><div class="group relative p-2.5 rounded-lg transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-secondary"><div class="flex items-center gap-2"><img alt="Ada" class="size-5 rounded-full shrink-0" src="https://example.com/ada.png"><p class="text-sm text-foreground/90 flex-1 truncate">Fix the build</p><div class="flex items-center gap-1.5 shrink-0"><div class="inline-flex items-center gap-1 rounded-full border py-1 font-medium tracking-normal shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.7),inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.3),0_1px_2px_rgb(0_0_0/0.06)] backdrop-blur-[0.8px] backdrop-saturate-[1.24] transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-transparent text-muted-foreground text-xs h-5 px-1.5">claude-sonnet</div><div class="inline-flex items-center gap-1 rounded-full border py-1 font-medium tracking-normal shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.7),inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.3),0_1px_2px_rgb(0_0_0/0.06)] backdrop-blur-[0.8px] backdrop-saturate-[1.24] transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-transparent text-muted-foreground text-xs h-5 px-1.5">Terse</div></div><div class="flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground text-xs max-sm:hit-target rounded-full h-6 w-6 p-0"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-edit"><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"></path><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415"></path><path d="M16 5l3 3"></path></svg></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-xs max-sm:hit-target rounded-full h-6 w-6 p-0 text-danger hover:bg-danger/10 hover:text-danger"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-trash"><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path></svg></button></div></div></div><div class="group relative p-2.5 rounded-lg transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-secondary extra"><div class="flex items-center gap-2"><p class="text-sm text-foreground/90 flex-1 truncate">Plain</p><div class="flex items-center gap-1.5 shrink-0"><div class="inline-flex items-center gap-1 rounded-full border py-1 font-medium tracking-normal shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.7),inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.3),0_1px_2px_rgb(0_0_0/0.06)] backdrop-blur-[0.8px] backdrop-saturate-[1.24] transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background border-separator bg-transparent text-muted-foreground text-xs h-5 px-1.5">Bob</div></div><div class="flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground text-xs max-sm:hit-target rounded-full h-6 w-6 p-0"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-edit"><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"></path><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415"></path><path d="M16 5l3 3"></path></svg></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-xs max-sm:hit-target rounded-full h-6 w-6 p-0 text-danger hover:bg-danger/10 hover:text-danger"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-trash"><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path></svg></button></div></div></div><div class="group relative p-2.5 rounded-lg transition-[background-color,transform] duration-150 ease-out active:scale-[0.99] hover:bg-surface-secondary"><div class="flex items-center gap-2"><p class="text-sm text-foreground/90 flex-1 truncate">Bare</p><div class="flex items-center gap-1.5 shrink-0"></div><div class="flex items-center gap-1 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground text-xs max-sm:hit-target rounded-full h-6 w-6 p-0"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-edit"><path d="M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1"></path><path d="M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415"></path><path d="M16 5l3 3"></path></svg></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-xs max-sm:hit-target rounded-full h-6 w-6 p-0 text-danger hover:bg-danger/10 hover:text-danger"><svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-trash"><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path></svg></button></div></div></div></div></div></div></div></div></div></div>"`;
|
|
@@ -70,7 +70,7 @@ export function ComposerSlashMenu({
|
|
|
70
70
|
>
|
|
71
71
|
{groups.map((group) => (
|
|
72
72
|
<div key={group.group}>
|
|
73
|
-
<div className="px-3 pb-1 pt-2 text-
|
|
73
|
+
<div className="px-3 pb-1 pt-2 text-xs font-semibold text-muted-foreground">
|
|
74
74
|
{group.group}
|
|
75
75
|
</div>
|
|
76
76
|
{group.items.map((item) => {
|
|
@@ -14,6 +14,6 @@ exports[`ClearInputAlt markup > filled 1`] = `"<div class="relative"><input clas
|
|
|
14
14
|
|
|
15
15
|
exports[`InputGroupAlt markup > input className and props 1`] = `"<div data-input-group="" class="flex h-10 flex-wrap rounded-field border border-border bg-field-background text-sm transition-[border-color,box-shadow] duration-200 ease-smooth has-[textarea]:h-auto has-data-[slot=input-group-control]:h-auto has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-focus-visible:outline-hidden has-focus-visible:border-focus-border has-focus-visible:ring-1 has-focus-visible:ring-focus-ring"><input class="flex w-full max-sm:min-w-0 border-border text-base sm:pointer-fine:text-sm transition-[border-color,box-shadow,background-color] duration-200 ease-smooth file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-focus-ring h-full flex-1 rounded-none border-0 bg-transparent px-3 py-2 shadow-none focus-visible:border-0 focus-visible:ring-0 in-x" id="i" disabled=""></div>"`;
|
|
16
16
|
|
|
17
|
-
exports[`InputGroupAlt markup > input with every addon align and button size 1`] = `"<div data-input-group="" class="flex h-10 flex-wrap rounded-field border border-border bg-field-background text-sm transition-[border-color,box-shadow] duration-200 ease-smooth has-[textarea]:h-auto has-data-[slot=input-group-control]:h-auto has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-focus-visible:outline-hidden has-focus-visible:border-focus-border has-focus-visible:ring-1 has-focus-visible:ring-focus-ring"><div class="flex items-center flex-row ps-3"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-search"><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path><path d="M21 21l-6 -6"></path></svg></div><div data-align="inline-start" class="flex items-center flex-row ps-3"><span class="flex items-center text-sm text-muted-foreground/95">https://</span></div><input class="flex w-full max-sm:min-w-0 border-border text-base sm:pointer-fine:text-sm transition-[border-color,box-shadow,background-color] duration-200 ease-smooth file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-focus-ring h-full flex-1 rounded-none border-0 bg-transparent px-3 py-2 shadow-none focus-visible:border-0 focus-visible:ring-0" placeholder="Search"><div data-align="inline-end" class="flex items-center flex-row pe-3"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground py-2 shrink-0 shadow-none h-7 rounded-lg px-2 text-xs">Go</button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground py-2 shrink-0 shadow-none h-8 rounded-lg px-2.5 text-xs">Small</button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground px-4 py-2 shrink-0 shadow-none h-7 w-7 rounded-lg" aria-label="A"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-search"><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path><path d="M21 21l-6 -6"></path></svg></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover
|
|
17
|
+
exports[`InputGroupAlt markup > input with every addon align and button size 1`] = `"<div data-input-group="" class="flex h-10 flex-wrap rounded-field border border-border bg-field-background text-sm transition-[border-color,box-shadow] duration-200 ease-smooth has-[textarea]:h-auto has-data-[slot=input-group-control]:h-auto has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-focus-visible:outline-hidden has-focus-visible:border-focus-border has-focus-visible:ring-1 has-focus-visible:ring-focus-ring"><div class="flex items-center flex-row ps-3"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-search"><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path><path d="M21 21l-6 -6"></path></svg></div><div data-align="inline-start" class="flex items-center flex-row ps-3"><span class="flex items-center text-sm text-muted-foreground/95">https://</span></div><input class="flex w-full max-sm:min-w-0 border-border text-base sm:pointer-fine:text-sm transition-[border-color,box-shadow,background-color] duration-200 ease-smooth file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-focus-ring h-full flex-1 rounded-none border-0 bg-transparent px-3 py-2 shadow-none focus-visible:border-0 focus-visible:ring-0" placeholder="Search"><div data-align="inline-end" class="flex items-center flex-row pe-3"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground py-2 shrink-0 shadow-none h-7 rounded-lg px-2 text-xs">Go</button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground py-2 shrink-0 shadow-none h-8 rounded-lg px-2.5 text-xs">Small</button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground px-4 py-2 shrink-0 shadow-none h-7 w-7 rounded-lg" aria-label="A"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-search"><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path><path d="M21 21l-6 -6"></path></svg></button><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:opacity-90shadow-[inset_0_0_0_0.75px_color-mix(in_srgb,var(--color-primary-foreground)_30%,transparent),inset_1.5px_1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_60%,transparent),inset_-1.5px_-1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_22%,transparent),0_1px_2px_rgb(0_0_0/0.16)] px-4 py-2 shrink-0 shadow-none h-8 w-8 rounded-lg" type="submit" aria-label="B"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-search"><path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"></path><path d="M21 21l-6 -6"></path></svg></button></div></div>"`;
|
|
18
18
|
|
|
19
19
|
exports[`InputGroupAlt markup > textarea with block addons, error and classNames 1`] = `"<div data-input-group="" class="flex h-10 flex-wrap rounded-field border bg-field-background text-sm transition-[border-color,box-shadow] duration-200 ease-smooth has-[textarea]:h-auto has-data-[slot=input-group-control]:h-auto has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-focus-visible:outline-hidden has-focus-visible:ring-1 border-danger-border has-focus-visible:border-danger has-focus-visible:ring-danger-ring root-x" id="g"><div data-align="block-start" class="flex items-center w-full flex-row border-b border-separator px-3 py-2 addon-x"><span class="flex items-center text-sm text-x">Title</span></div><textarea class="flex min-h-20 w-full max-sm:min-w-0 border-border text-base sm:pointer-fine:text-sm placeholder:text-field-placeholder disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-focus-ring flex-1 resize-none rounded-none border-0 bg-transparent px-3 py-2.5 shadow-none focus-visible:border-0 focus-visible:ring-0 field-sizing-content ta-x" rows="2">v</textarea><div data-align="block-end" class="flex items-center w-full flex-row px-3 py-2"><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 text-muted-foreground hover:bg-surface-tertiary hover:text-foreground py-2 shrink-0 shadow-none h-7 rounded-lg px-2 text-xs btn-x" disabled="" data-loading="true"><svg class="h-4 w-4 animate-spin" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>Send</button></div></div>"`;
|
package/src/ui/_field-classes.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export const fieldFocusClass =
|
|
2
2
|
"focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:ring-1 focus-visible:ring-focus-ring";
|
|
3
3
|
|
|
4
|
+
export const fieldGlassClass =
|
|
5
|
+
"shadow-[inset_0_1px_2px_rgb(0_0_0/0.08),inset_0_0_0_0.5px_rgb(0_0_0/0.04),0_1px_0_rgb(255_255_255/0.25)]";
|
|
6
|
+
|
|
4
7
|
export const fieldFocusWithinClass =
|
|
5
8
|
"has-focus-visible:outline-hidden has-focus-visible:border-focus-border has-focus-visible:ring-1 has-focus-visible:ring-focus-ring";
|
|
@@ -26,7 +26,7 @@ export const menuCheckboxRadioItemClass =
|
|
|
26
26
|
"relative flex cursor-pointer select-none items-center rounded-menu-item py-2 pl-8 pr-2.5 text-sm outline-hidden transition-[background-color,color,transform] duration-150 ease-out active:scale-[0.99] focus:bg-default focus:text-foreground data-highlighted:bg-default data-highlighted:text-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50";
|
|
27
27
|
|
|
28
28
|
export const menuLabelClass =
|
|
29
|
-
"px-2.5 py-1
|
|
29
|
+
"px-2.5 py-1 text-xs font-semibold text-muted-foreground";
|
|
30
30
|
|
|
31
31
|
export const menuSeparatorClass = "-mx-1.5 my-1 h-px bg-separator";
|
|
32
32
|
|
package/src/ui/_menu-classes.ts
CHANGED
|
@@ -43,7 +43,7 @@ export const menuCheckboxRadioItemClass =
|
|
|
43
43
|
"relative flex cursor-pointer select-none items-center rounded-menu-item py-1.5 max-sm:min-h-10 pl-8 pr-2.5 text-sm outline-none transition-[background-color,color] focus:bg-default focus:text-foreground data-[highlighted]:bg-default data-[highlighted]:text-foreground data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50";
|
|
44
44
|
|
|
45
45
|
export const menuLabelClass =
|
|
46
|
-
"px-2.5 py-1
|
|
46
|
+
"px-2.5 py-1 text-xs font-semibold text-muted-foreground";
|
|
47
47
|
|
|
48
48
|
export const menuSeparatorClass = "-mx-1 my-1 h-px bg-separator";
|
|
49
49
|
|
package/src/ui/badge.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { cva, type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { useCn, useUiConfig } from "./ui-config";
|
|
3
3
|
|
|
4
4
|
const badgeBaseClasses =
|
|
5
|
-
"inline-flex items-center gap-1 rounded-full border border-transparent px-2.5 py-1 text-xs font-medium tracking-normal transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background";
|
|
5
|
+
"inline-flex items-center gap-1 rounded-full border border-transparent px-2.5 py-1 text-xs font-medium tracking-normal shadow-[inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.7),inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.3),0_1px_2px_rgb(0_0_0/0.06)] backdrop-blur-[0.8px] backdrop-saturate-[1.24] transition-colors focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:ring-offset-background";
|
|
6
6
|
|
|
7
7
|
const badgeVariantClasses = {
|
|
8
8
|
default: "border-border bg-default text-foreground",
|
package/src/ui/button.tsx
CHANGED
|
@@ -10,10 +10,15 @@ const ghostClass =
|
|
|
10
10
|
const buttonBaseClasses =
|
|
11
11
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium tracking-normal transition-[transform,background-color,box-shadow,opacity,border-color] duration-200 ease-smooth focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 active:scale-[0.96] active:duration-[var(--motion-fast,150ms)] [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0";
|
|
12
12
|
|
|
13
|
+
const GLASS_RIM =
|
|
14
|
+
"shadow-[inset_0_0_0_0.75px_rgb(255_255_255/0.3),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.6),inset_-1.5px_-1.5px_1px_-1px_rgb(255_255_255/0.22),0_1px_2px_rgb(0_0_0/0.16)]";
|
|
15
|
+
const GLASS_RIM_ON_PRIMARY =
|
|
16
|
+
"shadow-[inset_0_0_0_0.75px_color-mix(in_srgb,var(--color-primary-foreground)_30%,transparent),inset_1.5px_1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_60%,transparent),inset_-1.5px_-1.5px_1px_-1px_color-mix(in_srgb,var(--color-primary-foreground)_22%,transparent),0_1px_2px_rgb(0_0_0/0.16)]";
|
|
17
|
+
|
|
13
18
|
const defaultVariantClass =
|
|
14
|
-
"bg-primary text-primary-foreground hover
|
|
19
|
+
"bg-primary text-primary-foreground hover:opacity-90" + GLASS_RIM_ON_PRIMARY;
|
|
15
20
|
const destructiveVariantClass =
|
|
16
|
-
"bg-[oklch(47.2%_0.195_25.7)] text-white hover:bg-[oklch(42.5%_0.185_25.7)]";
|
|
21
|
+
"bg-[oklch(47.2%_0.195_25.7)] text-white hover:bg-[oklch(42.5%_0.185_25.7)] " + GLASS_RIM;
|
|
17
22
|
|
|
18
23
|
const buttonVariantClasses = {
|
|
19
24
|
default: defaultVariantClass,
|
|
@@ -27,8 +32,8 @@ const buttonVariantClasses = {
|
|
|
27
32
|
tertiary: ghostClass,
|
|
28
33
|
link: "text-primary underline-offset-4 hover:underline active:scale-100",
|
|
29
34
|
flat: `${ghostClass} bg-transparent text-muted hover:bg-surface-tertiary hover:text-foreground`, // check-tokens-allow: text-muted
|
|
30
|
-
success: `${ghostClass} bg-success text-success-foreground hover:bg-success/90`,
|
|
31
|
-
warning: `${ghostClass} bg-warning text-warning-foreground hover:bg-warning/90`,
|
|
35
|
+
success: `${ghostClass} bg-success text-success-foreground hover:bg-success/90 ${GLASS_RIM}`,
|
|
36
|
+
warning: `${ghostClass} bg-warning text-warning-foreground hover:bg-warning/90 ${GLASS_RIM}`,
|
|
32
37
|
};
|
|
33
38
|
|
|
34
39
|
const buttonSizeClasses = {
|
package/src/ui/card.tsx
CHANGED
|
@@ -28,7 +28,7 @@ const Card = React.forwardRef<
|
|
|
28
28
|
>(({ className, ...props }, ref) => (
|
|
29
29
|
<div
|
|
30
30
|
ref={ref}
|
|
31
|
-
className={useCardClass("root", "rounded-lg bg-surface-card text-surface-foreground", className)}
|
|
31
|
+
className={useCardClass("root", "rounded-lg bg-surface-card text-surface-foreground shadow-[inset_0_0_0_0.5px_rgb(0_0_0/0.06),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.5),0_1px_2px_rgb(0_0_0/0.06)] dark:shadow-[inset_0_0_0_0.5px_rgb(255_255_255/0.08),inset_1.5px_1.5px_1px_-1px_rgb(255_255_255/0.12),0_1px_2px_rgb(0_0_0/0.3)]", className)}
|
|
32
32
|
{...props}
|
|
33
33
|
/>
|
|
34
34
|
));
|
package/src/ui/checkbox.tsx
CHANGED
|
@@ -25,7 +25,7 @@ const Checkbox = React.forwardRef<
|
|
|
25
25
|
ref={ref}
|
|
26
26
|
className={merge(
|
|
27
27
|
config?.classes?.root ??
|
|
28
|
-
"peer relative h-
|
|
28
|
+
"peer relative h-5 w-5 shrink-0 rounded-[6px] border border-border bg-field-background transition-[transform,background-color,border-color,box-shadow] duration-200 ease-smooth motion-reduce:transition-none active:scale-90 data-[state=checked]:shadow-[inset_0_0_0_0.75px_color-mix(in_srgb,var(--color-primary-foreground)_30%,transparent),inset_1px_1px_1px_-0.5px_color-mix(in_srgb,var(--color-primary-foreground)_60%,transparent),inset_-1px_-1px_1px_-0.5px_color-mix(in_srgb,var(--color-primary-foreground)_22%,transparent),0_1px_2px_rgb(0_0_0/0.16)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground before:absolute before:inset-[-12px] before:content-['']",
|
|
29
29
|
className,
|
|
30
30
|
)}
|
|
31
31
|
{...props}
|
|
@@ -33,7 +33,7 @@ const Checkbox = React.forwardRef<
|
|
|
33
33
|
<CheckboxPrimitive.Indicator
|
|
34
34
|
className={config?.classes?.indicator ?? cn("flex items-center justify-center text-current")}
|
|
35
35
|
>
|
|
36
|
-
{icon ?? config?.icon ?? <IconCheck className="h-
|
|
36
|
+
{icon ?? config?.icon ?? <IconCheck className="h-4 w-4" />}
|
|
37
37
|
</CheckboxPrimitive.Indicator>
|
|
38
38
|
</CheckboxPrimitive.Root>
|
|
39
39
|
);
|