@krak-stack/registry 0.10.14 → 0.10.15
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/CHANGELOG.md +7 -0
- package/dist/components/support-dialog.js +215 -173
- package/dist/components/ui/dialog.d.ts +8 -4
- package/dist/components/ui/map-menu.js +23 -11
- package/dist/components/ui/search-menu.js +16 -14
- package/dist/lib/docs.integrations.server.js +1 -0
- package/dist/lib/docs.js +16 -14
- package/dist/lib/docs.server.js +1 -0
- package/dist/lib/documentation-toolkit.js +1 -0
- package/dist/services/agent/client/index.js +21 -23
- package/dist/services/clamav/index.d.ts +31 -0
- package/dist/services/clamav/index.js +124 -0
- package/dist/services/events/client/tracking-notice.js +34 -18
- package/dist/services/speech/api.js +18 -0
- package/dist/services/speech/index.js +37 -11
- package/dist/services/speech/schema.d.ts +25 -0
- package/dist/services/speech/schema.js +20 -0
- package/dist/services/webhooks/client/delivery-table.js +15 -13
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @krak-stack/registry
|
|
2
2
|
|
|
3
|
+
## 0.10.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Export a standalone Effect ClamAV client at `@krak-stack/registry/clamav` and add opt-in durable malware scanning to Assets. Scanned uploads stay private until their verified bytes pass scanning.
|
|
8
|
+
- Replace deprecated MeloTTS synthesis with ElevenLabs Flash v2.5 through Cloudflare AI Gateway. The six supported languages and MP3 response are unchanged. Synthesis requires Cloudflare AI Gateway Unified Billing credits; transcription still uses Whisper.
|
|
9
|
+
|
|
3
10
|
## 0.10.14
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// ../../src/components/support-dialog.tsx
|
|
2
|
-
import { Dialog as DialogPrimitive2 } from "@base-ui/react/dialog";
|
|
3
2
|
import { Effect, FileSystem, Result, Schema } from "effect";
|
|
4
3
|
import { Multipart } from "effect/http";
|
|
5
4
|
import { HttpApiSchema } from "effect/http-api";
|
|
@@ -162,6 +161,7 @@ function AttachmentAction({
|
|
|
162
161
|
|
|
163
162
|
// ../../src/components/ui/dialog.tsx
|
|
164
163
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
164
|
+
import { cn as cn2 } from "cn";
|
|
165
165
|
import { XIcon } from "lucide-react";
|
|
166
166
|
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
167
167
|
function Dialog({ ...props }) {
|
|
@@ -194,31 +194,77 @@ function DialogOverlay({
|
|
|
194
194
|
}) {
|
|
195
195
|
return /* @__PURE__ */ jsx3(DialogPrimitive.Backdrop, {
|
|
196
196
|
"data-slot": "dialog-overlay",
|
|
197
|
-
className:
|
|
197
|
+
className: cn2("data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs", className),
|
|
198
198
|
...props
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
201
|
+
function DialogContent({
|
|
202
|
+
className,
|
|
203
|
+
children,
|
|
204
|
+
showCloseButton = true,
|
|
205
|
+
...props
|
|
206
|
+
}) {
|
|
207
|
+
return /* @__PURE__ */ jsxs(DialogPortal, {
|
|
208
|
+
children: [
|
|
209
|
+
/* @__PURE__ */ jsx3(DialogOverlay, {}),
|
|
210
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Popup, {
|
|
211
|
+
"data-slot": "dialog-content",
|
|
212
|
+
className: cn2("bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl p-6 text-sm ring-1 duration-100 outline-none sm:max-w-md", className),
|
|
213
|
+
...props,
|
|
214
|
+
children: [
|
|
215
|
+
children,
|
|
216
|
+
showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
217
|
+
"data-slot": "dialog-close",
|
|
218
|
+
render: /* @__PURE__ */ jsx3(Button, {
|
|
219
|
+
variant: "ghost",
|
|
220
|
+
className: "absolute top-4 right-4",
|
|
221
|
+
size: "icon-sm"
|
|
222
|
+
}),
|
|
223
|
+
children: [
|
|
224
|
+
/* @__PURE__ */ jsx3(XIcon, {}),
|
|
225
|
+
/* @__PURE__ */ jsx3("span", {
|
|
226
|
+
className: "sr-only",
|
|
227
|
+
children: "Close"
|
|
228
|
+
})
|
|
229
|
+
]
|
|
230
|
+
})
|
|
231
|
+
]
|
|
232
|
+
})
|
|
233
|
+
]
|
|
206
234
|
});
|
|
207
235
|
}
|
|
208
|
-
function
|
|
236
|
+
function DialogHeader({ className, ...props }) {
|
|
209
237
|
return /* @__PURE__ */ jsx3("div", {
|
|
210
|
-
"data-slot": "dialog-
|
|
211
|
-
className:
|
|
238
|
+
"data-slot": "dialog-header",
|
|
239
|
+
className: cn2("flex flex-col gap-2", className),
|
|
212
240
|
...props
|
|
213
241
|
});
|
|
214
242
|
}
|
|
215
|
-
function
|
|
243
|
+
function DialogFooter({
|
|
216
244
|
className,
|
|
245
|
+
showCloseButton = false,
|
|
246
|
+
children,
|
|
217
247
|
...props
|
|
218
248
|
}) {
|
|
249
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
250
|
+
"data-slot": "dialog-footer",
|
|
251
|
+
className: cn2("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
252
|
+
...props,
|
|
253
|
+
children: [
|
|
254
|
+
children,
|
|
255
|
+
showCloseButton && /* @__PURE__ */ jsx3(DialogPrimitive.Close, {
|
|
256
|
+
render: /* @__PURE__ */ jsx3(Button, {
|
|
257
|
+
variant: "outline"
|
|
258
|
+
}),
|
|
259
|
+
children: "Close"
|
|
260
|
+
})
|
|
261
|
+
]
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
function DialogTitle({ className, ...props }) {
|
|
219
265
|
return /* @__PURE__ */ jsx3(DialogPrimitive.Title, {
|
|
220
266
|
"data-slot": "dialog-title",
|
|
221
|
-
className:
|
|
267
|
+
className: cn2("leading-none font-medium", className),
|
|
222
268
|
...props
|
|
223
269
|
});
|
|
224
270
|
}
|
|
@@ -228,7 +274,7 @@ function DialogDescription({
|
|
|
228
274
|
}) {
|
|
229
275
|
return /* @__PURE__ */ jsx3(DialogPrimitive.Description, {
|
|
230
276
|
"data-slot": "dialog-description",
|
|
231
|
-
className:
|
|
277
|
+
className: cn2("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3", className),
|
|
232
278
|
...props
|
|
233
279
|
});
|
|
234
280
|
}
|
|
@@ -452,185 +498,181 @@ var SupportDialog = ({
|
|
|
452
498
|
children: copy.title
|
|
453
499
|
})
|
|
454
500
|
}),
|
|
455
|
-
/* @__PURE__ */ jsxs2(
|
|
501
|
+
/* @__PURE__ */ jsxs2(DialogContent, {
|
|
502
|
+
showCloseButton: false,
|
|
503
|
+
className: "max-h-[calc(100dvh-2rem)] gap-4 overflow-auto text-base sm:max-w-lg",
|
|
456
504
|
children: [
|
|
457
|
-
/* @__PURE__ */
|
|
458
|
-
|
|
459
|
-
className: "bg-popover text-popover-foreground ring-foreground/10 fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 overflow-auto rounded-xl p-6 ring-1 outline-none",
|
|
505
|
+
/* @__PURE__ */ jsxs2(DialogHeader, {
|
|
506
|
+
className: status === "success" ? undefined : "pe-8",
|
|
460
507
|
children: [
|
|
461
|
-
/* @__PURE__ */
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
children: /* @__PURE__ */ jsx7("span", {
|
|
466
|
-
id: `${id}-title`,
|
|
467
|
-
children: copy.title
|
|
468
|
-
})
|
|
469
|
-
}),
|
|
470
|
-
copy.description && /* @__PURE__ */ jsx7(DialogDescription, {
|
|
471
|
-
children: copy.description
|
|
472
|
-
})
|
|
473
|
-
]
|
|
474
|
-
}),
|
|
475
|
-
status !== "success" && /* @__PURE__ */ jsx7(DialogClose, {
|
|
476
|
-
render: /* @__PURE__ */ jsx7(Button, {
|
|
477
|
-
className: "absolute end-4 top-4",
|
|
478
|
-
variant: "ghost",
|
|
479
|
-
size: "icon-sm",
|
|
480
|
-
"aria-label": copy.close,
|
|
481
|
-
disabled: pending
|
|
482
|
-
}),
|
|
483
|
-
children: /* @__PURE__ */ jsx7(XIcon2, {
|
|
484
|
-
"aria-hidden": "true"
|
|
508
|
+
/* @__PURE__ */ jsx7(DialogTitle, {
|
|
509
|
+
children: /* @__PURE__ */ jsx7("span", {
|
|
510
|
+
id: `${id}-title`,
|
|
511
|
+
children: copy.title
|
|
485
512
|
})
|
|
486
513
|
}),
|
|
487
|
-
|
|
488
|
-
children:
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
514
|
+
copy.description && /* @__PURE__ */ jsx7(DialogDescription, {
|
|
515
|
+
children: copy.description
|
|
516
|
+
})
|
|
517
|
+
]
|
|
518
|
+
}),
|
|
519
|
+
status !== "success" && /* @__PURE__ */ jsx7(DialogClose, {
|
|
520
|
+
render: /* @__PURE__ */ jsx7(Button, {
|
|
521
|
+
className: "absolute end-4 top-4",
|
|
522
|
+
variant: "ghost",
|
|
523
|
+
size: "icon-sm",
|
|
524
|
+
"aria-label": copy.close,
|
|
525
|
+
disabled: pending
|
|
526
|
+
}),
|
|
527
|
+
children: /* @__PURE__ */ jsx7(XIcon2, {
|
|
528
|
+
"aria-hidden": "true"
|
|
529
|
+
})
|
|
530
|
+
}),
|
|
531
|
+
status === "success" ? /* @__PURE__ */ jsxs2(Fragment, {
|
|
532
|
+
children: [
|
|
533
|
+
/* @__PURE__ */ jsx7("p", {
|
|
534
|
+
role: "status",
|
|
535
|
+
className: "text-sm",
|
|
536
|
+
children: copy.success
|
|
537
|
+
}),
|
|
538
|
+
/* @__PURE__ */ jsx7(DialogFooter, {
|
|
539
|
+
children: /* @__PURE__ */ jsx7(DialogClose, {
|
|
540
|
+
render: /* @__PURE__ */ jsx7(Button, {
|
|
541
|
+
autoFocus: true
|
|
493
542
|
}),
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
"aria-busy": pending,
|
|
543
|
+
children: copy.close
|
|
544
|
+
})
|
|
545
|
+
})
|
|
546
|
+
]
|
|
547
|
+
}) : /* @__PURE__ */ jsxs2("form", {
|
|
548
|
+
className: "grid gap-4",
|
|
549
|
+
onSubmit: submit,
|
|
550
|
+
"aria-busy": pending,
|
|
551
|
+
children: [
|
|
552
|
+
/* @__PURE__ */ jsxs2("fieldset", {
|
|
553
|
+
disabled: pending,
|
|
554
|
+
className: "grid min-w-0 gap-4",
|
|
507
555
|
children: [
|
|
508
|
-
/* @__PURE__ */ jsxs2("
|
|
509
|
-
|
|
510
|
-
className: "grid min-w-0 gap-4",
|
|
556
|
+
askForReplyEmail && /* @__PURE__ */ jsxs2("div", {
|
|
557
|
+
className: "grid gap-2",
|
|
511
558
|
children: [
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
children:
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
559
|
+
/* @__PURE__ */ jsx7(Label, {
|
|
560
|
+
htmlFor: `${id}-email`,
|
|
561
|
+
children: copy.replyEmail
|
|
562
|
+
}),
|
|
563
|
+
/* @__PURE__ */ jsx7(Input, {
|
|
564
|
+
id: `${id}-email`,
|
|
565
|
+
name: "replyEmail",
|
|
566
|
+
type: "email",
|
|
567
|
+
autoComplete: "email",
|
|
568
|
+
maxLength: supportReplyEmailLimit,
|
|
569
|
+
required: true
|
|
570
|
+
})
|
|
571
|
+
]
|
|
572
|
+
}),
|
|
573
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
574
|
+
className: "grid gap-2",
|
|
575
|
+
children: [
|
|
576
|
+
/* @__PURE__ */ jsx7(Textarea, {
|
|
577
|
+
id: `${id}-message`,
|
|
578
|
+
"aria-labelledby": `${id}-title`,
|
|
579
|
+
name: "message",
|
|
580
|
+
rows: 8,
|
|
581
|
+
className: "min-h-44",
|
|
582
|
+
placeholder: copy.placeholder,
|
|
583
|
+
required: true,
|
|
584
|
+
maxLength: supportMessageLimit,
|
|
585
|
+
onPaste: pasteScreenshot
|
|
586
|
+
}),
|
|
587
|
+
/* @__PURE__ */ jsx7("input", {
|
|
588
|
+
ref: fileInput,
|
|
589
|
+
type: "file",
|
|
590
|
+
"aria-label": copy.attach,
|
|
591
|
+
accept: screenshotAccept,
|
|
592
|
+
multiple: true,
|
|
593
|
+
hidden: true,
|
|
594
|
+
onChange: (event) => {
|
|
595
|
+
addAttachments(Array.from(event.currentTarget.files ?? []));
|
|
596
|
+
event.currentTarget.value = "";
|
|
597
|
+
}
|
|
528
598
|
}),
|
|
529
|
-
/* @__PURE__ */
|
|
530
|
-
className: "
|
|
531
|
-
children:
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
"
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
required: true,
|
|
540
|
-
maxLength: supportMessageLimit,
|
|
541
|
-
onPaste: pasteScreenshot
|
|
542
|
-
}),
|
|
543
|
-
/* @__PURE__ */ jsx7("input", {
|
|
544
|
-
ref: fileInput,
|
|
545
|
-
type: "file",
|
|
546
|
-
"aria-label": copy.attach,
|
|
547
|
-
accept: screenshotAccept,
|
|
548
|
-
multiple: true,
|
|
549
|
-
hidden: true,
|
|
550
|
-
onChange: (event) => {
|
|
551
|
-
addAttachments(Array.from(event.currentTarget.files ?? []));
|
|
552
|
-
event.currentTarget.value = "";
|
|
553
|
-
}
|
|
554
|
-
}),
|
|
555
|
-
attachments.length > 0 && /* @__PURE__ */ jsx7("ul", {
|
|
556
|
-
className: "flex min-w-0 flex-wrap gap-2",
|
|
557
|
-
children: attachments.map((file, index) => /* @__PURE__ */ jsx7("li", {
|
|
558
|
-
className: "max-w-full min-w-0",
|
|
559
|
-
children: /* @__PURE__ */ jsxs2(Attachment, {
|
|
560
|
-
size: "xs",
|
|
561
|
-
className: "min-w-0 flex-nowrap",
|
|
599
|
+
attachments.length > 0 && /* @__PURE__ */ jsx7("ul", {
|
|
600
|
+
className: "flex min-w-0 flex-wrap gap-2",
|
|
601
|
+
children: attachments.map((file, index) => /* @__PURE__ */ jsx7("li", {
|
|
602
|
+
className: "max-w-full min-w-0",
|
|
603
|
+
children: /* @__PURE__ */ jsxs2(Attachment, {
|
|
604
|
+
size: "xs",
|
|
605
|
+
className: "min-w-0 flex-nowrap",
|
|
606
|
+
children: [
|
|
607
|
+
/* @__PURE__ */ jsxs2(AttachmentContent, {
|
|
608
|
+
className: "flex items-center gap-1.5",
|
|
562
609
|
children: [
|
|
563
|
-
/* @__PURE__ */
|
|
564
|
-
className: "
|
|
565
|
-
children:
|
|
566
|
-
|
|
567
|
-
className: "shrink-0",
|
|
568
|
-
children: /* @__PURE__ */ jsx7(ImageIcon, {
|
|
569
|
-
"aria-hidden": "true"
|
|
570
|
-
})
|
|
571
|
-
}),
|
|
572
|
-
/* @__PURE__ */ jsx7(AttachmentTitle, {
|
|
573
|
-
title: file.name,
|
|
574
|
-
children: file.name
|
|
575
|
-
})
|
|
576
|
-
]
|
|
577
|
-
}),
|
|
578
|
-
/* @__PURE__ */ jsx7(AttachmentActions, {
|
|
579
|
-
className: "pe-1",
|
|
580
|
-
children: /* @__PURE__ */ jsx7(AttachmentAction, {
|
|
581
|
-
type: "button",
|
|
582
|
-
"aria-label": `${copy.removeAttachment}: ${file.name}`,
|
|
583
|
-
onClick: () => {
|
|
584
|
-
setAttachments(attachments.filter((_, position) => position !== index));
|
|
585
|
-
setInvalidAttachments(false);
|
|
586
|
-
},
|
|
587
|
-
children: /* @__PURE__ */ jsx7(XIcon2, {
|
|
588
|
-
"aria-hidden": "true"
|
|
589
|
-
})
|
|
610
|
+
/* @__PURE__ */ jsx7(AttachmentMedia, {
|
|
611
|
+
className: "shrink-0",
|
|
612
|
+
children: /* @__PURE__ */ jsx7(ImageIcon, {
|
|
613
|
+
"aria-hidden": "true"
|
|
590
614
|
})
|
|
615
|
+
}),
|
|
616
|
+
/* @__PURE__ */ jsx7(AttachmentTitle, {
|
|
617
|
+
title: file.name,
|
|
618
|
+
children: file.name
|
|
591
619
|
})
|
|
592
620
|
]
|
|
621
|
+
}),
|
|
622
|
+
/* @__PURE__ */ jsx7(AttachmentActions, {
|
|
623
|
+
className: "pe-1",
|
|
624
|
+
children: /* @__PURE__ */ jsx7(AttachmentAction, {
|
|
625
|
+
type: "button",
|
|
626
|
+
"aria-label": `${copy.removeAttachment}: ${file.name}`,
|
|
627
|
+
onClick: () => {
|
|
628
|
+
setAttachments(attachments.filter((_, position) => position !== index));
|
|
629
|
+
setInvalidAttachments(false);
|
|
630
|
+
},
|
|
631
|
+
children: /* @__PURE__ */ jsx7(XIcon2, {
|
|
632
|
+
"aria-hidden": "true"
|
|
633
|
+
})
|
|
634
|
+
})
|
|
593
635
|
})
|
|
594
|
-
|
|
595
|
-
}),
|
|
596
|
-
invalidAttachments && /* @__PURE__ */ jsx7("p", {
|
|
597
|
-
role: "alert",
|
|
598
|
-
className: "text-destructive text-sm",
|
|
599
|
-
children: copy.invalidAttachments
|
|
636
|
+
]
|
|
600
637
|
})
|
|
601
|
-
|
|
638
|
+
}, index))
|
|
639
|
+
}),
|
|
640
|
+
invalidAttachments && /* @__PURE__ */ jsx7("p", {
|
|
641
|
+
role: "alert",
|
|
642
|
+
className: "text-destructive text-sm",
|
|
643
|
+
children: copy.invalidAttachments
|
|
602
644
|
})
|
|
603
645
|
]
|
|
604
|
-
})
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
646
|
+
})
|
|
647
|
+
]
|
|
648
|
+
}),
|
|
649
|
+
(status === "failed" || status === "invalid") && /* @__PURE__ */ jsx7("p", {
|
|
650
|
+
role: "alert",
|
|
651
|
+
className: "text-destructive text-sm",
|
|
652
|
+
children: status === "invalid" ? copy.invalid : copy.failed
|
|
653
|
+
}),
|
|
654
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
655
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
656
|
+
children: [
|
|
657
|
+
/* @__PURE__ */ jsxs2(Button, {
|
|
658
|
+
type: "button",
|
|
659
|
+
variant: "ghost",
|
|
660
|
+
size: "sm",
|
|
661
|
+
disabled: pending,
|
|
662
|
+
onClick: () => fileInput.current?.click(),
|
|
612
663
|
children: [
|
|
613
|
-
/* @__PURE__ */
|
|
614
|
-
|
|
615
|
-
variant: "ghost",
|
|
616
|
-
size: "sm",
|
|
617
|
-
disabled: pending,
|
|
618
|
-
onClick: () => fileInput.current?.click(),
|
|
619
|
-
children: [
|
|
620
|
-
/* @__PURE__ */ jsx7(Paperclip, {
|
|
621
|
-
"aria-hidden": "true"
|
|
622
|
-
}),
|
|
623
|
-
copy.attach
|
|
624
|
-
]
|
|
664
|
+
/* @__PURE__ */ jsx7(Paperclip, {
|
|
665
|
+
"aria-hidden": "true"
|
|
625
666
|
}),
|
|
626
|
-
|
|
627
|
-
type: "submit",
|
|
628
|
-
size: "sm",
|
|
629
|
-
className: "ms-auto",
|
|
630
|
-
disabled: pending,
|
|
631
|
-
children: pending ? copy.pending : copy.submit
|
|
632
|
-
})
|
|
667
|
+
copy.attach
|
|
633
668
|
]
|
|
669
|
+
}),
|
|
670
|
+
/* @__PURE__ */ jsx7(Button, {
|
|
671
|
+
type: "submit",
|
|
672
|
+
size: "sm",
|
|
673
|
+
className: "ms-auto",
|
|
674
|
+
disabled: pending,
|
|
675
|
+
children: pending ? copy.pending : copy.submit
|
|
634
676
|
})
|
|
635
677
|
]
|
|
636
678
|
})
|
|
@@ -5,9 +5,13 @@ declare function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props): Rea
|
|
|
5
5
|
declare function DialogPortal({ ...props }: DialogPrimitive.Portal.Props): React.JSX.Element;
|
|
6
6
|
declare function DialogClose({ ...props }: DialogPrimitive.Close.Props): React.JSX.Element;
|
|
7
7
|
declare function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props): React.JSX.Element;
|
|
8
|
-
declare function DialogContent({ className, children, ...props }: DialogPrimitive.Popup.Props
|
|
8
|
+
declare function DialogContent({ className, children, showCloseButton, ...props }: DialogPrimitive.Popup.Props & {
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
9
11
|
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
-
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
|
|
13
|
+
showCloseButton?: boolean;
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
declare function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props): React.JSX.Element;
|
|
16
|
+
declare function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props): React.JSX.Element;
|
|
13
17
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -53,6 +53,7 @@ function Button({
|
|
|
53
53
|
|
|
54
54
|
// ../../src/components/ui/dialog.tsx
|
|
55
55
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
56
|
+
import { cn as cn2 } from "cn";
|
|
56
57
|
import { XIcon } from "lucide-react";
|
|
57
58
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
58
59
|
function Dialog({ ...props }) {
|
|
@@ -73,31 +74,42 @@ function DialogOverlay({
|
|
|
73
74
|
}) {
|
|
74
75
|
return /* @__PURE__ */ jsx2(DialogPrimitive.Backdrop, {
|
|
75
76
|
"data-slot": "dialog-overlay",
|
|
76
|
-
className:
|
|
77
|
+
className: cn2("data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs", className),
|
|
77
78
|
...props
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
81
|
function DialogHeader({ className, ...props }) {
|
|
81
82
|
return /* @__PURE__ */ jsx2("div", {
|
|
82
83
|
"data-slot": "dialog-header",
|
|
83
|
-
className:
|
|
84
|
+
className: cn2("flex flex-col gap-2", className),
|
|
84
85
|
...props
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
|
-
function DialogFooter({
|
|
88
|
-
return /* @__PURE__ */ jsx2("div", {
|
|
89
|
-
"data-slot": "dialog-footer",
|
|
90
|
-
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
91
|
-
...props
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
function DialogTitle({
|
|
88
|
+
function DialogFooter({
|
|
95
89
|
className,
|
|
90
|
+
showCloseButton = false,
|
|
91
|
+
children,
|
|
96
92
|
...props
|
|
97
93
|
}) {
|
|
94
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
95
|
+
"data-slot": "dialog-footer",
|
|
96
|
+
className: cn2("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
97
|
+
...props,
|
|
98
|
+
children: [
|
|
99
|
+
children,
|
|
100
|
+
showCloseButton && /* @__PURE__ */ jsx2(DialogPrimitive.Close, {
|
|
101
|
+
render: /* @__PURE__ */ jsx2(Button, {
|
|
102
|
+
variant: "outline"
|
|
103
|
+
}),
|
|
104
|
+
children: "Close"
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
function DialogTitle({ className, ...props }) {
|
|
98
110
|
return /* @__PURE__ */ jsx2(DialogPrimitive.Title, {
|
|
99
111
|
"data-slot": "dialog-title",
|
|
100
|
-
className:
|
|
112
|
+
className: cn2("leading-none font-medium", className),
|
|
101
113
|
...props
|
|
102
114
|
});
|
|
103
115
|
}
|
|
@@ -56,6 +56,7 @@ import { SearchIcon } from "lucide-react";
|
|
|
56
56
|
|
|
57
57
|
// ../../src/components/ui/dialog.tsx
|
|
58
58
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
59
|
+
import { cn as cn2 } from "cn";
|
|
59
60
|
import { XIcon } from "lucide-react";
|
|
60
61
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
61
62
|
function Dialog({ ...props }) {
|
|
@@ -76,13 +77,14 @@ function DialogOverlay({
|
|
|
76
77
|
}) {
|
|
77
78
|
return /* @__PURE__ */ jsx2(DialogPrimitive.Backdrop, {
|
|
78
79
|
"data-slot": "dialog-overlay",
|
|
79
|
-
className:
|
|
80
|
+
className: cn2("data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs", className),
|
|
80
81
|
...props
|
|
81
82
|
});
|
|
82
83
|
}
|
|
83
84
|
function DialogContent({
|
|
84
85
|
className,
|
|
85
86
|
children,
|
|
87
|
+
showCloseButton = true,
|
|
86
88
|
...props
|
|
87
89
|
}) {
|
|
88
90
|
return /* @__PURE__ */ jsxs(DialogPortal, {
|
|
@@ -90,16 +92,19 @@ function DialogContent({
|
|
|
90
92
|
/* @__PURE__ */ jsx2(DialogOverlay, {}),
|
|
91
93
|
/* @__PURE__ */ jsxs(DialogPrimitive.Popup, {
|
|
92
94
|
"data-slot": "dialog-content",
|
|
93
|
-
className:
|
|
95
|
+
className: cn2("bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl p-6 text-sm ring-1 duration-100 outline-none sm:max-w-md", className),
|
|
94
96
|
...props,
|
|
95
97
|
children: [
|
|
96
98
|
children,
|
|
97
|
-
/* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
98
|
-
|
|
99
|
+
showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
100
|
+
"data-slot": "dialog-close",
|
|
101
|
+
render: /* @__PURE__ */ jsx2(Button, {
|
|
102
|
+
variant: "ghost",
|
|
103
|
+
className: "absolute top-4 right-4",
|
|
104
|
+
size: "icon-sm"
|
|
105
|
+
}),
|
|
99
106
|
children: [
|
|
100
|
-
/* @__PURE__ */ jsx2(XIcon, {
|
|
101
|
-
className: "size-4"
|
|
102
|
-
}),
|
|
107
|
+
/* @__PURE__ */ jsx2(XIcon, {}),
|
|
103
108
|
/* @__PURE__ */ jsx2("span", {
|
|
104
109
|
className: "sr-only",
|
|
105
110
|
children: "Close"
|
|
@@ -114,17 +119,14 @@ function DialogContent({
|
|
|
114
119
|
function DialogHeader({ className, ...props }) {
|
|
115
120
|
return /* @__PURE__ */ jsx2("div", {
|
|
116
121
|
"data-slot": "dialog-header",
|
|
117
|
-
className:
|
|
122
|
+
className: cn2("flex flex-col gap-2", className),
|
|
118
123
|
...props
|
|
119
124
|
});
|
|
120
125
|
}
|
|
121
|
-
function DialogTitle({
|
|
122
|
-
className,
|
|
123
|
-
...props
|
|
124
|
-
}) {
|
|
126
|
+
function DialogTitle({ className, ...props }) {
|
|
125
127
|
return /* @__PURE__ */ jsx2(DialogPrimitive.Title, {
|
|
126
128
|
"data-slot": "dialog-title",
|
|
127
|
-
className:
|
|
129
|
+
className: cn2("leading-none font-medium", className),
|
|
128
130
|
...props
|
|
129
131
|
});
|
|
130
132
|
}
|
|
@@ -134,7 +136,7 @@ function DialogDescription({
|
|
|
134
136
|
}) {
|
|
135
137
|
return /* @__PURE__ */ jsx2(DialogPrimitive.Description, {
|
|
136
138
|
"data-slot": "dialog-description",
|
|
137
|
-
className:
|
|
139
|
+
className: cn2("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3", className),
|
|
138
140
|
...props
|
|
139
141
|
});
|
|
140
142
|
}
|
|
@@ -111,6 +111,7 @@ import { SearchIcon } from "lucide-react";
|
|
|
111
111
|
|
|
112
112
|
// ../../src/components/ui/dialog.tsx
|
|
113
113
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
114
|
+
import { cn as cn2 } from "cn";
|
|
114
115
|
import { XIcon } from "lucide-react";
|
|
115
116
|
|
|
116
117
|
// ../../src/components/ui/search-menu.tsx
|