@justanarthur/modo-ui 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -16
- package/dist/blocks/sidebar-app/index.js +7 -7
- package/dist/components/{inputs → AI}/input-message/index.js +2 -2
- package/dist/components/AI/thinking-indicator/index.js +13 -0
- package/dist/components/accordion/index.js +28 -0
- package/dist/components/card/index.js +2 -2
- package/dist/components/{inputs/input-copy → copy}/index.d.ts +7 -7
- package/dist/components/copy/index.js +16 -0
- package/dist/components/inputs/checkbox/index.d.ts +62 -0
- package/dist/components/inputs/{checkbox-group → checkbox}/index.js +7 -6
- package/dist/components/inputs/color-picker/index.js +2 -2
- package/dist/components/inputs/combobox/index.d.ts +8 -7
- package/dist/components/inputs/combobox/index.js +3 -3
- package/dist/components/inputs/date-time/calendar/index.js +3 -3
- package/dist/components/inputs/date-time/date-picker/index.d.ts +7 -3
- package/dist/components/inputs/date-time/date-picker/index.js +8 -8
- package/dist/components/inputs/date-time/date-range-picker/index.d.ts +7 -3
- package/dist/components/inputs/date-time/date-range-picker/index.js +7 -7
- package/dist/components/inputs/date-time/duration-picker/index.d.ts +7 -3
- package/dist/components/inputs/date-time/duration-picker/index.js +7 -7
- package/dist/components/inputs/date-time/month-picker/index.d.ts +7 -3
- package/dist/components/inputs/date-time/month-picker/index.js +6 -6
- package/dist/components/inputs/date-time/time-picker/index.d.ts +7 -3
- package/dist/components/inputs/date-time/time-picker/index.js +7 -7
- package/dist/components/inputs/input/index.d.ts +5 -1
- package/dist/components/inputs/input/index.js +2 -2
- package/dist/components/inputs/{radio-group → radio}/index.d.ts +30 -30
- package/dist/components/inputs/{radio-group → radio}/index.js +7 -6
- package/dist/components/inputs/search/index.js +3 -3
- package/dist/components/inputs/select/index.js +2 -2
- package/dist/components/inputs/switch/index.d.ts +27 -6
- package/dist/components/inputs/switch/index.js +8 -1
- package/dist/components/inputs/textarea/index.d.ts +46 -0
- package/dist/components/inputs/textarea/index.js +13 -0
- package/dist/components/navigation/sidebar/index.js +4 -4
- package/dist/components/navigation/tabs/index.js +2 -2
- package/dist/components/navigation/tabs-subtle/index.js +2 -2
- package/dist/components/overlays/command/index.js +2 -2
- package/dist/components/overlays/context-menu/index.js +3 -3
- package/dist/components/overlays/dropdown/index.d.ts +2 -2
- package/dist/components/overlays/dropdown/index.js +2 -2
- package/dist/components/table/index.js +2 -2
- package/dist/index.d.ts +896 -808
- package/dist/index.js +57 -50
- package/dist/primitives/fluid-hover/index.js +2 -2
- package/dist/primitives/morph/index.d.ts +2 -2
- package/dist/primitives/sizes/index.d.ts +2 -2
- package/dist/shared/{components-1rfwbyyc.js → components-1z6tdadk.js} +1 -1
- package/dist/shared/{components-7x9kawxv.js → components-27nnvrwe.js} +1 -1
- package/dist/shared/{components-mhd39z7x.js → components-3myrw7ne.js} +36 -1
- package/dist/shared/{components-gvr9w41t.js → components-50m950y9.js} +19 -23
- package/dist/shared/{components-asr5pg50.js → components-8snj490h.js} +106 -9
- package/dist/shared/{components-1xekx2hx.js → components-ar66gnt0.js} +1 -1
- package/dist/shared/{components-3wk0w46f.js → components-b3c5et5b.js} +1 -1
- package/dist/shared/{components-yh3kwdhr.js → components-d6xtjht3.js} +3 -3
- package/dist/shared/{components-ytb2tefr.js → components-hyq23phv.js} +39 -20
- package/dist/shared/{components-q4daerx0.js → components-mjthm1kf.js} +1 -1
- package/dist/shared/{components-ca2c898n.js → components-mqyvvh8k.js} +1 -1
- package/dist/shared/{components-4cnjmgex.js → components-nsjec21k.js} +4 -2
- package/dist/shared/{components-7ans7ce5.js → components-nyq0rym2.js} +5 -3
- package/dist/shared/{components-ny774h8p.js → components-pbmqctfa.js} +15 -8
- package/dist/shared/{components-7btqt08d.js → components-qtqxgfrb.js} +17 -20
- package/dist/shared/components-rd9tbsqv.js +89 -0
- package/dist/shared/{components-1j9791sn.js → components-s083f38z.js} +5 -5
- package/dist/shared/components-ta7shw28.js +19 -0
- package/dist/shared/{components-3gae8nta.js → components-tcee5k0s.js} +22 -24
- package/dist/shared/{components-ez65vtbq.js → components-wshd8f3n.js} +5 -3
- package/dist/shared/{components-v7wtz8hk.js → components-wtbesgdp.js} +6 -4
- package/dist/shared/{components-66mv71kx.js → components-xxvdw7k1.js} +1 -1
- package/dist/shared/{components-njzgqdwy.js → components-ye0ze0h8.js} +2 -2
- package/dist/shared/{components-cbxjn9p8.js → components-zwhtxm15.js} +5 -3
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/components/inputs/checkbox-group/index.d.ts +0 -50
- package/dist/components/inputs/input-copy/index.js +0 -16
- package/dist/components/navigation/accordion/index.js +0 -28
- package/dist/components/thinking-indicator/index.js +0 -13
- /package/dist/components/{inputs → AI}/input-message/index.d.ts +0 -0
- /package/dist/components/{thinking-indicator → AI/thinking-indicator}/index.d.ts +0 -0
- /package/dist/components/{navigation/accordion → accordion}/index.d.ts +0 -0
- /package/dist/shared/{components-0ke6xada.js → components-1434p1mh.js} +0 -0
- /package/dist/shared/{components-h2dpcwgc.js → components-2dxkv6zm.js} +0 -0
- /package/dist/shared/{components-8fpr3s4p.js → components-39vmfq9s.js} +0 -0
- /package/dist/shared/{components-nh8tma1n.js → components-a86dytt0.js} +0 -0
- /package/dist/shared/{components-v6xp325t.js → components-dk0gjr5a.js} +0 -0
- /package/dist/shared/{components-62ybc7t2.js → components-frw34b65.js} +0 -0
- /package/dist/shared/{components-9jvzzvt1.js → components-gz8zf3ec.js} +0 -0
- /package/dist/shared/{components-tqvarbfv.js → components-hw9yk32z.js} +0 -0
- /package/dist/shared/{components-apdwtweq.js → components-jbbmdr74.js} +0 -0
- /package/dist/shared/{components-3k8xpnpq.js → components-jthe1pwb.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
} from "./shared/components-rr7a6ja9.js";
|
|
55
55
|
import {
|
|
56
56
|
fieldVariants
|
|
57
|
-
} from "./shared/components-
|
|
57
|
+
} from "./shared/components-3myrw7ne.js";
|
|
58
58
|
import"./shared/components-c6s6b43g.js";
|
|
59
59
|
import {
|
|
60
60
|
TooltipPortalContainer2,
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
SidebarMenuSubButton2,
|
|
99
99
|
Sidebar2,
|
|
100
100
|
SidebarContent2
|
|
101
|
-
} from "./shared/components-
|
|
101
|
+
} from "./shared/components-mqyvvh8k.js";
|
|
102
102
|
import"./shared/components-chacnk61.js";
|
|
103
103
|
import {
|
|
104
104
|
FluidHoverHighlight2
|
|
@@ -126,10 +126,24 @@ import {
|
|
|
126
126
|
DropdownContent2,
|
|
127
127
|
DropdownLabel2,
|
|
128
128
|
DropdownSeparator2
|
|
129
|
-
} from "./shared/components-
|
|
129
|
+
} from "./shared/components-a86dytt0.js";
|
|
130
130
|
import {
|
|
131
131
|
SidebarApp2
|
|
132
|
-
} from "./shared/components-
|
|
132
|
+
} from "./shared/components-ye0ze0h8.js";
|
|
133
|
+
import {
|
|
134
|
+
FileThumbnail2,
|
|
135
|
+
InputMessage2
|
|
136
|
+
} from "./shared/components-d6xtjht3.js";
|
|
137
|
+
import {
|
|
138
|
+
ThinkingIndicator2
|
|
139
|
+
} from "./shared/components-27nnvrwe.js";
|
|
140
|
+
import {
|
|
141
|
+
AccordionGroup2,
|
|
142
|
+
Accordion2,
|
|
143
|
+
AccordionItem2,
|
|
144
|
+
AccordionTrigger2,
|
|
145
|
+
AccordionContent2
|
|
146
|
+
} from "./shared/components-b3c5et5b.js";
|
|
133
147
|
import {
|
|
134
148
|
badgeColors2,
|
|
135
149
|
badgeVariants2,
|
|
@@ -149,11 +163,15 @@ import {
|
|
|
149
163
|
CardEyebrow2,
|
|
150
164
|
CardFeature2,
|
|
151
165
|
CardButton2
|
|
152
|
-
} from "./shared/components-
|
|
166
|
+
} from "./shared/components-jbbmdr74.js";
|
|
167
|
+
import {
|
|
168
|
+
Copy2
|
|
169
|
+
} from "./shared/components-s083f38z.js";
|
|
170
|
+
import"./shared/components-ta7shw28.js";
|
|
153
171
|
import {
|
|
154
172
|
CheckboxGroup2,
|
|
155
|
-
|
|
156
|
-
} from "./shared/components-
|
|
173
|
+
Checkbox2
|
|
174
|
+
} from "./shared/components-hyq23phv.js";
|
|
157
175
|
import {
|
|
158
176
|
Slider2,
|
|
159
177
|
SliderComfortable2
|
|
@@ -166,7 +184,7 @@ import {
|
|
|
166
184
|
ColorSwatch2,
|
|
167
185
|
ColorPicker2,
|
|
168
186
|
ColorPickerPopover2
|
|
169
|
-
} from "./shared/components-
|
|
187
|
+
} from "./shared/components-jthe1pwb.js";
|
|
170
188
|
import {
|
|
171
189
|
Combobox2,
|
|
172
190
|
ComboboxInput2,
|
|
@@ -175,44 +193,37 @@ import {
|
|
|
175
193
|
ComboboxList2,
|
|
176
194
|
ComboboxItem2,
|
|
177
195
|
ComboboxEmpty2
|
|
178
|
-
} from "./shared/components-
|
|
179
|
-
import"./shared/components-
|
|
196
|
+
} from "./shared/components-tcee5k0s.js";
|
|
197
|
+
import"./shared/components-gz8zf3ec.js";
|
|
180
198
|
import {
|
|
181
199
|
Calendar2
|
|
182
|
-
} from "./shared/components-
|
|
200
|
+
} from "./shared/components-1z6tdadk.js";
|
|
183
201
|
import {
|
|
184
202
|
Input2,
|
|
185
203
|
Label2,
|
|
186
204
|
InputGroup2
|
|
187
|
-
} from "./shared/components-
|
|
188
|
-
import"./shared/components-
|
|
189
|
-
import"./shared/components-
|
|
205
|
+
} from "./shared/components-50m950y9.js";
|
|
206
|
+
import"./shared/components-qtqxgfrb.js";
|
|
207
|
+
import"./shared/components-mjthm1kf.js";
|
|
190
208
|
import {
|
|
191
209
|
DatePicker2
|
|
192
|
-
} from "./shared/components-
|
|
210
|
+
} from "./shared/components-wtbesgdp.js";
|
|
193
211
|
import {
|
|
194
212
|
DateRangePicker2
|
|
195
|
-
} from "./shared/components-
|
|
213
|
+
} from "./shared/components-zwhtxm15.js";
|
|
196
214
|
import {
|
|
197
215
|
DurationPicker2
|
|
198
|
-
} from "./shared/components-
|
|
216
|
+
} from "./shared/components-nyq0rym2.js";
|
|
199
217
|
import {
|
|
200
218
|
MonthPicker2
|
|
201
|
-
} from "./shared/components-
|
|
219
|
+
} from "./shared/components-nsjec21k.js";
|
|
202
220
|
import {
|
|
203
221
|
TimePicker2
|
|
204
|
-
} from "./shared/components-
|
|
205
|
-
import {
|
|
206
|
-
InputCopy2
|
|
207
|
-
} from "./shared/components-1j9791sn.js";
|
|
208
|
-
import {
|
|
209
|
-
FileThumbnail2,
|
|
210
|
-
InputMessage2
|
|
211
|
-
} from "./shared/components-yh3kwdhr.js";
|
|
222
|
+
} from "./shared/components-wshd8f3n.js";
|
|
212
223
|
import {
|
|
213
224
|
RadioGroup2,
|
|
214
|
-
|
|
215
|
-
} from "./shared/components-
|
|
225
|
+
Radio2
|
|
226
|
+
} from "./shared/components-pbmqctfa.js";
|
|
216
227
|
import {
|
|
217
228
|
CommandListRoot2,
|
|
218
229
|
CommandShortcut2,
|
|
@@ -221,10 +232,10 @@ import {
|
|
|
221
232
|
CommandTrigger2,
|
|
222
233
|
CommandContent2,
|
|
223
234
|
Command2
|
|
224
|
-
} from "./shared/components-
|
|
235
|
+
} from "./shared/components-39vmfq9s.js";
|
|
225
236
|
import {
|
|
226
237
|
Search2
|
|
227
|
-
} from "./shared/components-
|
|
238
|
+
} from "./shared/components-xxvdw7k1.js";
|
|
228
239
|
import {
|
|
229
240
|
Select2,
|
|
230
241
|
triggerVariants2,
|
|
@@ -234,28 +245,25 @@ import {
|
|
|
234
245
|
SelectGroup2,
|
|
235
246
|
SelectLabel2,
|
|
236
247
|
SelectSeparator2
|
|
237
|
-
} from "./shared/components-
|
|
248
|
+
} from "./shared/components-frw34b65.js";
|
|
238
249
|
import {
|
|
239
|
-
Switch2
|
|
240
|
-
|
|
250
|
+
Switch2,
|
|
251
|
+
SwitchGroup2
|
|
252
|
+
} from "./shared/components-8snj490h.js";
|
|
241
253
|
import {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
AccordionItem2,
|
|
245
|
-
AccordionTrigger2,
|
|
246
|
-
AccordionContent2
|
|
247
|
-
} from "./shared/components-3wk0w46f.js";
|
|
254
|
+
Textarea2
|
|
255
|
+
} from "./shared/components-rd9tbsqv.js";
|
|
248
256
|
import {
|
|
249
257
|
Tabs2,
|
|
250
258
|
TabsList2,
|
|
251
259
|
TabItem2,
|
|
252
260
|
TabPanel2
|
|
253
|
-
} from "./shared/components-
|
|
261
|
+
} from "./shared/components-hw9yk32z.js";
|
|
254
262
|
import {
|
|
255
263
|
TabsSubtle2,
|
|
256
264
|
TabsSubtleItem2,
|
|
257
265
|
TabsSubtlePanel2
|
|
258
|
-
} from "./shared/components-
|
|
266
|
+
} from "./shared/components-dk0gjr5a.js";
|
|
259
267
|
import {
|
|
260
268
|
AlertDialogContent2,
|
|
261
269
|
AlertDialog2
|
|
@@ -264,7 +272,7 @@ import {
|
|
|
264
272
|
ContextMenuItem2,
|
|
265
273
|
ContextMenuContent2,
|
|
266
274
|
ContextMenu2
|
|
267
|
-
} from "./shared/components-
|
|
275
|
+
} from "./shared/components-ar66gnt0.js";
|
|
268
276
|
import {
|
|
269
277
|
PopoverTrigger2,
|
|
270
278
|
PopoverClose2,
|
|
@@ -290,10 +298,7 @@ import {
|
|
|
290
298
|
TableRow2,
|
|
291
299
|
TableHead2,
|
|
292
300
|
TableCell2
|
|
293
|
-
} from "./shared/components-
|
|
294
|
-
import {
|
|
295
|
-
ThinkingIndicator2
|
|
296
|
-
} from "./shared/components-7x9kawxv.js";
|
|
301
|
+
} from "./shared/components-1434p1mh.js";
|
|
297
302
|
import {
|
|
298
303
|
Code2
|
|
299
304
|
} from "./shared/components-s2bz1xpk.js";
|
|
@@ -301,7 +306,7 @@ import"./shared/components-vfbhxf5r.js";
|
|
|
301
306
|
import {
|
|
302
307
|
FluidHoverItem2,
|
|
303
308
|
FluidHover2
|
|
304
|
-
} from "./shared/components-
|
|
309
|
+
} from "./shared/components-2dxkv6zm.js";
|
|
305
310
|
import {
|
|
306
311
|
Morph2
|
|
307
312
|
} from "./shared/components-39jq9va1.js";
|
|
@@ -336,8 +341,8 @@ export {
|
|
|
336
341
|
CardImage2 as CardImage,
|
|
337
342
|
CardMedia2 as CardMedia,
|
|
338
343
|
CardTitle2 as CardTitle,
|
|
344
|
+
Checkbox2 as Checkbox,
|
|
339
345
|
CheckboxGroup2 as CheckboxGroup,
|
|
340
|
-
CheckboxItem2 as CheckboxItem,
|
|
341
346
|
Code2 as Code,
|
|
342
347
|
ColorPicker2 as ColorPicker,
|
|
343
348
|
ColorPickerPopover2 as ColorPickerPopover,
|
|
@@ -361,6 +366,7 @@ export {
|
|
|
361
366
|
ContextMenu2 as ContextMenu,
|
|
362
367
|
ContextMenuContent2 as ContextMenuContent,
|
|
363
368
|
ContextMenuItem2 as ContextMenuItem,
|
|
369
|
+
Copy2 as Copy,
|
|
364
370
|
DatePicker2 as DatePicker,
|
|
365
371
|
DateRangePicker2 as DateRangePicker,
|
|
366
372
|
Dialog2 as Dialog,
|
|
@@ -388,7 +394,6 @@ export {
|
|
|
388
394
|
FluidHoverItem2 as FluidHoverItem,
|
|
389
395
|
IconProvider2 as IconProvider,
|
|
390
396
|
Input2 as Input,
|
|
391
|
-
InputCopy2 as InputCopy,
|
|
392
397
|
InputGroup2 as InputGroup,
|
|
393
398
|
InputMessage2 as InputMessage,
|
|
394
399
|
Label2 as Label,
|
|
@@ -406,8 +411,8 @@ export {
|
|
|
406
411
|
PreviewCard2 as PreviewCard,
|
|
407
412
|
PreviewCardContent2 as PreviewCardContent,
|
|
408
413
|
PreviewCardTrigger2 as PreviewCardTrigger,
|
|
414
|
+
Radio2 as Radio,
|
|
409
415
|
RadioGroup2 as RadioGroup,
|
|
410
|
-
RadioItem2 as RadioItem,
|
|
411
416
|
SIDEBAR_COOKIE_MAX_AGE2 as SIDEBAR_COOKIE_MAX_AGE,
|
|
412
417
|
SIDEBAR_COOKIE_NAME2 as SIDEBAR_COOKIE_NAME,
|
|
413
418
|
SIDEBAR_KEYBOARD_SHORTCUT2 as SIDEBAR_KEYBOARD_SHORTCUT,
|
|
@@ -462,6 +467,7 @@ export {
|
|
|
462
467
|
SliderComfortable2 as SliderComfortable,
|
|
463
468
|
SurfaceProvider2 as SurfaceProvider,
|
|
464
469
|
Switch2 as Switch,
|
|
470
|
+
SwitchGroup2 as SwitchGroup,
|
|
465
471
|
TabItem2 as TabItem,
|
|
466
472
|
TabPanel2 as TabPanel,
|
|
467
473
|
Table2 as Table,
|
|
@@ -475,6 +481,7 @@ export {
|
|
|
475
481
|
TabsSubtle2 as TabsSubtle,
|
|
476
482
|
TabsSubtleItem2 as TabsSubtleItem,
|
|
477
483
|
TabsSubtlePanel2 as TabsSubtlePanel,
|
|
484
|
+
Textarea2 as Textarea,
|
|
478
485
|
ThinkingIndicator2 as ThinkingIndicator,
|
|
479
486
|
TimePicker2 as TimePicker,
|
|
480
487
|
Toast2 as Toast,
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
FluidHoverItem2,
|
|
3
3
|
FluidHover2,
|
|
4
4
|
fluid_hover_default
|
|
5
|
-
} from "../../shared/components-
|
|
5
|
+
} from "../../shared/components-2dxkv6zm.js";
|
|
6
6
|
import {
|
|
7
7
|
FluidHoverHighlight2
|
|
8
8
|
} from "../../shared/components-kvr7f9hy.js";
|
|
9
|
+
import"../../shared/components-chacnk61.js";
|
|
9
10
|
import {
|
|
10
11
|
useFluidHover2,
|
|
11
12
|
useRegisterFluidHoverItem2
|
|
12
13
|
} from "../../shared/components-59efxjd9.js";
|
|
13
|
-
import"../../shared/components-chacnk61.js";
|
|
14
14
|
import"../../shared/components-hqeq3w9q.js";
|
|
15
15
|
import"../../shared/components-men63rwj.js";
|
|
16
16
|
import"../../shared/components-cv16mryv.js";
|
|
@@ -85,7 +85,7 @@ type Element_12xgc2 = JSX_1kxb2["Element"];
|
|
|
85
85
|
* ## Liquid indicators
|
|
86
86
|
*
|
|
87
87
|
* The same goo moves everything that travels between items: the active tab
|
|
88
|
-
* of Tabs and TabsSubtle, the Switch thumb,
|
|
88
|
+
* of Tabs and TabsSubtle, the Switch thumb, Radio.Group's selection and the
|
|
89
89
|
* fluid hover highlight of every list (Select, Dropdown, Combobox, Card,
|
|
90
90
|
* Accordion, FluidHover). The indicator springs to its new item and leaves
|
|
91
91
|
* a blob behind. The blob lingers for a third of the spring, then follows
|
|
@@ -93,7 +93,7 @@ type Element_12xgc2 = JSX_1kxb2["Element"];
|
|
|
93
93
|
* stretched drop that lets go. A long move tears it into a drop and a
|
|
94
94
|
* droplet that catches up and is absorbed.
|
|
95
95
|
*
|
|
96
|
-
* Merged selections (
|
|
96
|
+
* Merged selections (Checkbox.Group, a multiple Dropdown) melt the same way:
|
|
97
97
|
* a checked row grows out of its center and flows into its checked
|
|
98
98
|
* neighbours, and an unchecked one pinches off and shrinks away.
|
|
99
99
|
*
|
|
@@ -104,8 +104,8 @@ type Element_12xgc = JSX_1kxb["Element"];
|
|
|
104
104
|
* `SizeProvider` and every sized component inside follows — menus included,
|
|
105
105
|
* since React context crosses portals. Precedence is explicit `size` prop on
|
|
106
106
|
* the component > nearest `SizeProvider` > `'default'`. Button, Badge,
|
|
107
|
-
* Select, Tabs, TabsSubtle, Dropdown,
|
|
108
|
-
* InputGroup,
|
|
107
|
+
* Select, Tabs, TabsSubtle, Dropdown, Checkbox, Radio, Input,
|
|
108
|
+
* InputGroup, Copy, InputMessage, Table, Switch, Slider, Accordion, Card,
|
|
109
109
|
* ColorPicker, ThinkingIndicator, Calendar and the date and time pickers all
|
|
110
110
|
* take that per-component `size`. Type follows the ladder too: compact drops
|
|
111
111
|
* each type role one notch.
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
spring2
|
|
18
18
|
} from "./components-1v7rxytx.js";
|
|
19
19
|
|
|
20
|
-
// components/thinking-indicator/index.tsx
|
|
20
|
+
// components/AI/thinking-indicator/index.tsx
|
|
21
21
|
import { AnimatePresence, motion } from "motion/react";
|
|
22
22
|
import { forwardRef, useEffect, useId, useState } from "react";
|
|
23
23
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useShape
|
|
3
|
+
} from "./components-cv16mryv.js";
|
|
4
|
+
import {
|
|
5
|
+
useSize2
|
|
6
|
+
} from "./components-0sn7ypjw.js";
|
|
7
|
+
import {
|
|
8
|
+
cn2
|
|
9
|
+
} from "./components-ezxhrmer.js";
|
|
10
|
+
|
|
1
11
|
// lib/field-classes.ts
|
|
2
12
|
import { cva } from "class-variance-authority";
|
|
3
13
|
var fieldVariants = cva([
|
|
@@ -18,5 +28,30 @@ var fieldVariants = cva([
|
|
|
18
28
|
}
|
|
19
29
|
});
|
|
20
30
|
var fieldIconClasses = "shrink-0 text-muted-foreground transition-[color,stroke-width] duration-fast group-hover/field:text-foreground group-hover/field:stroke-[2] group-data-[active]/field:text-foreground group-data-[active]/field:stroke-[2] group-focus-within/field:text-foreground group-focus-within/field:stroke-[2]";
|
|
31
|
+
var FIELD_PX = {
|
|
32
|
+
default: "px-2.5",
|
|
33
|
+
compact: "px-2"
|
|
34
|
+
};
|
|
35
|
+
function useFieldBox({ variant, invalid, disabled, active, size }) {
|
|
36
|
+
const shape = useShape();
|
|
37
|
+
const sizeClasses = useSize2(size);
|
|
38
|
+
return {
|
|
39
|
+
size: sizeClasses,
|
|
40
|
+
props: {
|
|
41
|
+
"data-active": active || undefined,
|
|
42
|
+
"data-invalid": invalid || undefined,
|
|
43
|
+
"data-disabled": disabled || undefined,
|
|
44
|
+
className: cn2(fieldVariants({ variant }), shape.input, FIELD_PX[sizeClasses.variant])
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function focusControlOnPress(control) {
|
|
49
|
+
return (e) => {
|
|
50
|
+
if (e.target === control.current)
|
|
51
|
+
return;
|
|
52
|
+
e.preventDefault();
|
|
53
|
+
control.current?.focus();
|
|
54
|
+
};
|
|
55
|
+
}
|
|
21
56
|
|
|
22
|
-
export { fieldVariants, fieldIconClasses };
|
|
57
|
+
export { fieldVariants, fieldIconClasses, useFieldBox, focusControlOnPress };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
fieldVariants,
|
|
3
|
-
fieldIconClasses
|
|
4
|
-
} from "./components-mhd39z7x.js";
|
|
5
|
-
import {
|
|
6
|
-
useShape
|
|
7
|
-
} from "./components-cv16mryv.js";
|
|
8
1
|
import {
|
|
9
2
|
useSize2
|
|
10
3
|
} from "./components-0sn7ypjw.js";
|
|
4
|
+
import {
|
|
5
|
+
cn2
|
|
6
|
+
} from "./components-ezxhrmer.js";
|
|
7
|
+
import {
|
|
8
|
+
fieldIconClasses,
|
|
9
|
+
useFieldBox,
|
|
10
|
+
focusControlOnPress
|
|
11
|
+
} from "./components-3myrw7ne.js";
|
|
11
12
|
import {
|
|
12
13
|
useControllableState
|
|
13
14
|
} from "./components-n7mjr357.js";
|
|
@@ -15,9 +16,6 @@ import {
|
|
|
15
16
|
useFluidHover2,
|
|
16
17
|
useRegisterFluidHoverItem2
|
|
17
18
|
} from "./components-59efxjd9.js";
|
|
18
|
-
import {
|
|
19
|
-
cn2
|
|
20
|
-
} from "./components-ezxhrmer.js";
|
|
21
19
|
import {
|
|
22
20
|
SizeProvider2
|
|
23
21
|
} from "./components-jjw69c4c.js";
|
|
@@ -45,6 +43,7 @@ var Input2 = forwardRef(({
|
|
|
45
43
|
value: valueProp,
|
|
46
44
|
defaultValue = "",
|
|
47
45
|
onChange: onChangeProp,
|
|
46
|
+
variant = "borderless",
|
|
48
47
|
invalid,
|
|
49
48
|
disabled,
|
|
50
49
|
size,
|
|
@@ -54,20 +53,17 @@ var Input2 = forwardRef(({
|
|
|
54
53
|
const [value, onChange] = useControllableState(valueProp, defaultValue, onChangeProp);
|
|
55
54
|
const inputRef = useRef(null);
|
|
56
55
|
const field = useContext(FieldStateContext);
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
const { size: sizeClasses, props: boxProps } = useFieldBox({
|
|
57
|
+
variant,
|
|
58
|
+
invalid,
|
|
59
|
+
disabled,
|
|
60
|
+
active: field?.active,
|
|
61
|
+
size
|
|
62
|
+
});
|
|
60
63
|
return /* @__PURE__ */ jsxs("div", {
|
|
61
|
-
onMouseDown: (
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
e.preventDefault();
|
|
65
|
-
inputRef.current?.focus();
|
|
66
|
-
},
|
|
67
|
-
"data-active": field?.active || undefined,
|
|
68
|
-
"data-invalid": invalid || undefined,
|
|
69
|
-
"data-disabled": disabled || undefined,
|
|
70
|
-
className: cn2(fieldVariants(), "flex items-center", sizeClasses.gap, shape.input, compact ? "px-2" : "px-2.5", sizeClasses.control, className),
|
|
64
|
+
onMouseDown: focusControlOnPress(inputRef),
|
|
65
|
+
...boxProps,
|
|
66
|
+
className: cn2(boxProps.className, "flex items-center", sizeClasses.gap, sizeClasses.control, className),
|
|
71
67
|
children: [
|
|
72
68
|
Icon && /* @__PURE__ */ jsx(Icon, {
|
|
73
69
|
size: sizeClasses.icon,
|
|
@@ -4,20 +4,48 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
GooIndicator
|
|
6
6
|
} from "./components-chacnk61.js";
|
|
7
|
+
import {
|
|
8
|
+
FluidHoverHighlight2
|
|
9
|
+
} from "./components-kvr7f9hy.js";
|
|
10
|
+
import {
|
|
11
|
+
IndexedRows,
|
|
12
|
+
useRowIndex
|
|
13
|
+
} from "./components-ta7shw28.js";
|
|
14
|
+
import {
|
|
15
|
+
useShape
|
|
16
|
+
} from "./components-cv16mryv.js";
|
|
7
17
|
import {
|
|
8
18
|
useSize2
|
|
9
19
|
} from "./components-0sn7ypjw.js";
|
|
10
20
|
import {
|
|
11
21
|
useControllableState
|
|
12
22
|
} from "./components-n7mjr357.js";
|
|
23
|
+
import {
|
|
24
|
+
useFluidHover2,
|
|
25
|
+
useRegisterFluidHoverItem2
|
|
26
|
+
} from "./components-59efxjd9.js";
|
|
27
|
+
import {
|
|
28
|
+
SizeProvider2
|
|
29
|
+
} from "./components-jjw69c4c.js";
|
|
13
30
|
import {
|
|
14
31
|
spring2
|
|
15
32
|
} from "./components-1v7rxytx.js";
|
|
16
33
|
|
|
17
34
|
// components/inputs/switch/index.tsx
|
|
18
35
|
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
19
|
-
import {
|
|
36
|
+
import {
|
|
37
|
+
Children,
|
|
38
|
+
createContext,
|
|
39
|
+
forwardRef,
|
|
40
|
+
isValidElement,
|
|
41
|
+
useCallback,
|
|
42
|
+
useContext,
|
|
43
|
+
useId,
|
|
44
|
+
useRef,
|
|
45
|
+
useState
|
|
46
|
+
} from "react";
|
|
20
47
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
48
|
+
var SwitchGroupContext = createContext(null);
|
|
21
49
|
var METRICS = {
|
|
22
50
|
default: {
|
|
23
51
|
trackWidth: 34,
|
|
@@ -40,6 +68,8 @@ var THUMB_OFFSET = 2;
|
|
|
40
68
|
var DRAG_DEAD_ZONE = 2;
|
|
41
69
|
var Switch2 = forwardRef(({
|
|
42
70
|
label,
|
|
71
|
+
description,
|
|
72
|
+
trackSide = "start",
|
|
43
73
|
checked,
|
|
44
74
|
defaultChecked = false,
|
|
45
75
|
onToggle,
|
|
@@ -56,6 +86,13 @@ var Switch2 = forwardRef(({
|
|
|
56
86
|
onToggle?.();
|
|
57
87
|
}, [setChecked, onToggle]);
|
|
58
88
|
const labelId = useId();
|
|
89
|
+
const descriptionId = useId();
|
|
90
|
+
const group = useContext(SwitchGroupContext);
|
|
91
|
+
const index = useRowIndex();
|
|
92
|
+
const rowRef = useRef(null);
|
|
93
|
+
useRegisterFluidHoverItem2(disabled ? undefined : group?.registerItem, index, rowRef);
|
|
94
|
+
const end = trackSide === "end" || !!group;
|
|
95
|
+
const divider = !!group && index < group.count - 1 && group.activeIndex !== index && group.activeIndex !== index + 1;
|
|
59
96
|
const [hovered, setHovered] = useState(false);
|
|
60
97
|
const [pressed, setPressed] = useState(false);
|
|
61
98
|
const sizeClasses = useSize2(size);
|
|
@@ -138,8 +175,14 @@ var Switch2 = forwardRef(({
|
|
|
138
175
|
pointerStart.current = null;
|
|
139
176
|
}, [setDragX]);
|
|
140
177
|
return /* @__PURE__ */ jsxs("div", {
|
|
141
|
-
ref
|
|
142
|
-
|
|
178
|
+
ref: (node) => {
|
|
179
|
+
rowRef.current = node;
|
|
180
|
+
if (typeof ref === "function")
|
|
181
|
+
ref(node);
|
|
182
|
+
else if (ref)
|
|
183
|
+
ref.current = node;
|
|
184
|
+
},
|
|
185
|
+
className: cn2("relative z-10 flex items-center cursor-pointer select-none touch-none", sizeClasses.gap, sizeClasses.px, sizeClasses.variant === "compact" ? "py-1" : "py-2", group && (sizeClasses.variant === "compact" ? "px-3 py-2.5" : "px-4 py-3.5"), disabled && "opacity-50 pointer-events-none", className),
|
|
143
186
|
onPointerEnter: (e) => {
|
|
144
187
|
if (e.pointerType === "mouse")
|
|
145
188
|
setHovered(true);
|
|
@@ -159,9 +202,10 @@ var Switch2 = forwardRef(({
|
|
|
159
202
|
/* @__PURE__ */ jsx(SwitchPrimitive.Root, {
|
|
160
203
|
checked: isChecked,
|
|
161
204
|
"aria-labelledby": labelId,
|
|
205
|
+
"aria-describedby": description ? descriptionId : undefined,
|
|
162
206
|
disabled,
|
|
163
207
|
tabIndex: 0,
|
|
164
|
-
className: cn2("relative shrink-0 rounded-full outline-none cursor-pointer", "transition-colors duration-fast", "focus-visible:ring-1 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", isChecked ? hovered ? "bg-brand-hover" : "bg-brand" : hovered ? "bg-accent-hover" : "bg-accent"),
|
|
208
|
+
className: cn2("relative shrink-0 rounded-full outline-none cursor-pointer", end && "order-last", "transition-colors duration-fast", "focus-visible:ring-1 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", isChecked ? hovered ? "bg-brand-hover" : "bg-brand" : hovered ? "bg-accent-hover" : "bg-accent"),
|
|
165
209
|
style: {
|
|
166
210
|
width: m.trackWidth,
|
|
167
211
|
height: m.trackHeight
|
|
@@ -177,15 +221,68 @@ var Switch2 = forwardRef(({
|
|
|
177
221
|
})
|
|
178
222
|
})
|
|
179
223
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
224
|
+
/* @__PURE__ */ jsxs("span", {
|
|
225
|
+
className: cn2("flex min-w-0 flex-col gap-1", end && "flex-1"),
|
|
226
|
+
children: [
|
|
227
|
+
/* @__PURE__ */ jsx("span", {
|
|
228
|
+
id: labelId,
|
|
229
|
+
className: cn2("[text-box:trim-both_cap_alphabetic] transition-[color] duration-fast", sizeClasses.text, description ? "text-foreground weight-medium" : isChecked ? "text-foreground" : "text-muted-foreground"),
|
|
230
|
+
children: label
|
|
231
|
+
}),
|
|
232
|
+
description && /* @__PURE__ */ jsx("span", {
|
|
233
|
+
id: descriptionId,
|
|
234
|
+
className: cn2("leading-relaxed text-muted-foreground", sizeClasses.variant === "compact" ? "text-caption-compact" : "text-caption"),
|
|
235
|
+
children: description
|
|
236
|
+
})
|
|
237
|
+
]
|
|
238
|
+
}),
|
|
239
|
+
divider && /* @__PURE__ */ jsx("span", {
|
|
240
|
+
"aria-hidden": true,
|
|
241
|
+
className: "pointer-events-none absolute inset-x-0 bottom-0 h-px bg-border/60"
|
|
184
242
|
})
|
|
185
243
|
]
|
|
186
244
|
});
|
|
187
245
|
});
|
|
188
246
|
Switch2.displayName = "Switch";
|
|
247
|
+
var SwitchGroup2 = forwardRef(({ children, size, className, ...props }, ref) => {
|
|
248
|
+
const containerRef = useRef(null);
|
|
249
|
+
const hover = useFluidHover2(containerRef, { gapClick: false });
|
|
250
|
+
const shape = useShape();
|
|
251
|
+
const count = Children.toArray(children).filter(isValidElement).length;
|
|
252
|
+
const group = /* @__PURE__ */ jsx(SwitchGroupContext.Provider, {
|
|
253
|
+
value: { registerItem: hover.registerItem, activeIndex: hover.activeIndex, count },
|
|
254
|
+
children: /* @__PURE__ */ jsxs("fieldset", {
|
|
255
|
+
ref: (node) => {
|
|
256
|
+
containerRef.current = node;
|
|
257
|
+
if (typeof ref === "function")
|
|
258
|
+
ref(node);
|
|
259
|
+
else if (ref)
|
|
260
|
+
ref.current = node;
|
|
261
|
+
},
|
|
262
|
+
onMouseEnter: hover.handlers.onMouseEnter,
|
|
263
|
+
onMouseMove: hover.handlers.onMouseMove,
|
|
264
|
+
onMouseLeave: hover.handlers.onMouseLeave,
|
|
265
|
+
onClick: hover.handlers.onClick,
|
|
266
|
+
className: cn2("relative flex min-w-0 flex-col overflow-hidden border border-border/60 select-none", shape.container, className),
|
|
267
|
+
...props,
|
|
268
|
+
children: [
|
|
269
|
+
/* @__PURE__ */ jsx(FluidHoverHighlight2, {
|
|
270
|
+
hover,
|
|
271
|
+
className: cn2("z-0", shape.container)
|
|
272
|
+
}),
|
|
273
|
+
/* @__PURE__ */ jsx(IndexedRows, {
|
|
274
|
+
children
|
|
275
|
+
})
|
|
276
|
+
]
|
|
277
|
+
})
|
|
278
|
+
});
|
|
279
|
+
return size ? /* @__PURE__ */ jsx(SizeProvider2, {
|
|
280
|
+
size,
|
|
281
|
+
children: group
|
|
282
|
+
}) : group;
|
|
283
|
+
});
|
|
284
|
+
SwitchGroup2.displayName = "SwitchGroup";
|
|
285
|
+
Object.assign(Switch2, { Group: SwitchGroup2 });
|
|
189
286
|
var switch_default = Switch2;
|
|
190
287
|
|
|
191
|
-
export { Switch2, switch_default };
|
|
288
|
+
export { Switch2, SwitchGroup2, switch_default };
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
spring2
|
|
37
37
|
} from "./components-1v7rxytx.js";
|
|
38
38
|
|
|
39
|
-
// components/
|
|
39
|
+
// components/accordion/index.tsx
|
|
40
40
|
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
|
|
41
41
|
import { AnimatePresence, animate, motion, useMotionValue, useTransform } from "motion/react";
|
|
42
42
|
import {
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
spring2
|
|
38
38
|
} from "./components-1v7rxytx.js";
|
|
39
39
|
|
|
40
|
-
// components/
|
|
40
|
+
// components/AI/input-message/index.tsx
|
|
41
41
|
import { AnimatePresence, motion, Reorder, useReducedMotion } from "motion/react";
|
|
42
42
|
import {
|
|
43
43
|
forwardRef,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
useState as useState2
|
|
51
51
|
} from "react";
|
|
52
52
|
|
|
53
|
-
// components/
|
|
53
|
+
// components/AI/input-message/file-thumbnail.tsx
|
|
54
54
|
import { useEffect, useState } from "react";
|
|
55
55
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
56
56
|
var pdfjsPromise = null;
|
|
@@ -156,7 +156,7 @@ function FileThumbnail2({ file, size, className }) {
|
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
// components/
|
|
159
|
+
// components/AI/input-message/index.tsx
|
|
160
160
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
161
161
|
var useIsoLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect2;
|
|
162
162
|
function useRegionHeight() {
|