@popgrids/ui 0.0.19 → 0.0.21
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/banner-notification.cjs +54 -0
- package/dist/banner-notification.cjs.map +1 -0
- package/dist/banner-notification.d.cts +24 -0
- package/dist/banner-notification.d.ts +24 -0
- package/dist/banner-notification.js +52 -0
- package/dist/banner-notification.js.map +1 -0
- package/dist/button-link.cjs +110 -0
- package/dist/button-link.cjs.map +1 -0
- package/dist/button-link.d.cts +28 -0
- package/dist/button-link.d.ts +28 -0
- package/dist/button-link.js +108 -0
- package/dist/button-link.js.map +1 -0
- package/dist/button.cjs +1 -1
- package/dist/button.cjs.map +1 -1
- package/dist/button.js +1 -1
- package/dist/button.js.map +1 -1
- package/dist/dialog.cjs +439 -39
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.d.cts +25 -11
- package/dist/dialog.d.ts +25 -11
- package/dist/dialog.js +439 -39
- package/dist/dialog.js.map +1 -1
- package/dist/index.cjs +223 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +221 -47
- package/dist/index.js.map +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.cjs.map +1 -1
- package/dist/input.js +1 -1
- package/dist/input.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/tag.cjs +7 -4
- package/dist/tag.cjs.map +1 -1
- package/dist/tag.d.cts +5 -1
- package/dist/tag.d.ts +5 -1
- package/dist/tag.js +8 -5
- package/dist/tag.js.map +1 -1
- package/dist/theme.css +8 -4
- package/package.json +41 -21
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var button = require('@base-ui/react/button');
|
|
4
3
|
var classVarianceAuthority = require('class-variance-authority');
|
|
5
4
|
var clsx = require('clsx');
|
|
6
5
|
var tailwindMerge = require('tailwind-merge');
|
|
7
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var button = require('@base-ui/react/button');
|
|
8
8
|
var dialog = require('@base-ui/react/dialog');
|
|
9
9
|
var icons = require('@untitledui/icons');
|
|
10
10
|
var menu = require('@base-ui/react/menu');
|
|
@@ -14,10 +14,49 @@ var useRender = require('@base-ui/react/use-render');
|
|
|
14
14
|
var react = require('react');
|
|
15
15
|
var tooltip = require('@base-ui/react/tooltip');
|
|
16
16
|
|
|
17
|
-
// src/components/
|
|
17
|
+
// src/components/banner-notification/banner-notification.tsx
|
|
18
18
|
function cn(...inputs) {
|
|
19
19
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
20
20
|
}
|
|
21
|
+
var bannerNotificationVariants = classVarianceAuthority.cva(
|
|
22
|
+
"flex items-start gap-3 rounded-[6px] px-4 py-3 w-full w-[360px] border-border border",
|
|
23
|
+
{
|
|
24
|
+
variants: {
|
|
25
|
+
variant: {
|
|
26
|
+
info: ""
|
|
27
|
+
},
|
|
28
|
+
theme: {
|
|
29
|
+
error: "bg-warning-100 dark:bg-warning-200/16",
|
|
30
|
+
highlight: "bg-success-50 dark:bg-white/0"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
variant: "info",
|
|
35
|
+
theme: "highlight"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
function BannerNotification({
|
|
40
|
+
className,
|
|
41
|
+
children,
|
|
42
|
+
variant = "info",
|
|
43
|
+
theme = "highlight",
|
|
44
|
+
image,
|
|
45
|
+
...props
|
|
46
|
+
}) {
|
|
47
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "banner-notification",
|
|
51
|
+
className: cn(bannerNotificationVariants({ variant, theme }), className),
|
|
52
|
+
...props,
|
|
53
|
+
children: [
|
|
54
|
+
image && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-start [&>svg]:size-5", children: image }),
|
|
55
|
+
children != null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1 text-sm", children })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
21
60
|
var loaderVariants = classVarianceAuthority.cva("flex shrink-0 items-center justify-center", {
|
|
22
61
|
variants: {
|
|
23
62
|
theme: {
|
|
@@ -248,7 +287,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
248
287
|
variant: "primary",
|
|
249
288
|
outline: true,
|
|
250
289
|
theme: "base",
|
|
251
|
-
class: "ring ring-foreground bg-background/0 text-foreground hover:ring-2 active:ring active:bg-background/1 disabled:outline-none disabled:bg-background/0 focus-visible:ring focus-visible:ring-ring focus-visible:outline-background focus-visible:bg-background/1"
|
|
290
|
+
class: "ring ring-foreground bg-background/0 text-foreground hover:ring-2 active:ring active:bg-background/1 disabled:outline-none disabled:bg-background/0 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-background focus-visible:bg-background/1"
|
|
252
291
|
},
|
|
253
292
|
{
|
|
254
293
|
variant: "primary",
|
|
@@ -380,6 +419,102 @@ function Button({
|
|
|
380
419
|
}
|
|
381
420
|
);
|
|
382
421
|
}
|
|
422
|
+
var buttonLinkVariants = classVarianceAuthority.cva(
|
|
423
|
+
"inline-flex relative items-center gap-1.5 whitespace-nowrap font-medium transition-all rounded-xs -translate-y-px border-y border-x-4 border-transparent [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none no-underline cursor-pointer",
|
|
424
|
+
{
|
|
425
|
+
variants: {
|
|
426
|
+
hasLeading: {
|
|
427
|
+
false: null,
|
|
428
|
+
true: null
|
|
429
|
+
},
|
|
430
|
+
hasTrailing: {
|
|
431
|
+
false: null,
|
|
432
|
+
true: null
|
|
433
|
+
},
|
|
434
|
+
primary: {
|
|
435
|
+
false: null,
|
|
436
|
+
true: null
|
|
437
|
+
},
|
|
438
|
+
size: {
|
|
439
|
+
sm: "text-sm [&_svg:not([class*='size-'])]:size-4",
|
|
440
|
+
md: "text-sm [&_svg:not([class*='size-'])]:size-[18px]",
|
|
441
|
+
lg: "text-base [&_svg:not([class*='size-'])]:size-5"
|
|
442
|
+
},
|
|
443
|
+
theme: {
|
|
444
|
+
default: "",
|
|
445
|
+
white: "text-white hover:bg-white/16 focus-visible:bg-blue-dark-600 focus-visible:text-white",
|
|
446
|
+
black: "text-black hover:bg-foreground/10 focus-visible:bg-blue-dark-600 focus-visible:text-black focus-visible:text-white"
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
defaultVariants: {
|
|
450
|
+
primary: false,
|
|
451
|
+
size: "md",
|
|
452
|
+
theme: "default"
|
|
453
|
+
},
|
|
454
|
+
compoundVariants: [
|
|
455
|
+
{
|
|
456
|
+
theme: "default",
|
|
457
|
+
primary: false,
|
|
458
|
+
class: "text-grayscale-500 hover:bg-foreground/10 focus-visible:bg-blue-dark-600 focus-visible:text-white"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
theme: "default",
|
|
462
|
+
primary: true,
|
|
463
|
+
class: "text-foreground hover:bg-foreground/10 focus-visible:bg-blue-dark-600 focus-visible:text-white"
|
|
464
|
+
}
|
|
465
|
+
]
|
|
466
|
+
}
|
|
467
|
+
);
|
|
468
|
+
function ButtonLink({
|
|
469
|
+
children,
|
|
470
|
+
className,
|
|
471
|
+
leading,
|
|
472
|
+
primary = false,
|
|
473
|
+
size = "md",
|
|
474
|
+
theme = "default",
|
|
475
|
+
trailing,
|
|
476
|
+
href,
|
|
477
|
+
...props
|
|
478
|
+
}) {
|
|
479
|
+
const sharedClassName = cn(
|
|
480
|
+
buttonLinkVariants({
|
|
481
|
+
hasLeading: !!leading,
|
|
482
|
+
hasTrailing: !!trailing,
|
|
483
|
+
primary,
|
|
484
|
+
size,
|
|
485
|
+
theme
|
|
486
|
+
}),
|
|
487
|
+
className
|
|
488
|
+
);
|
|
489
|
+
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
490
|
+
leading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center text-inherit [&_svg]:size-inherit", children: leading }),
|
|
491
|
+
children != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate relative", children }),
|
|
492
|
+
trailing && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center text-inherit [&_svg]:size-inherit", children: trailing })
|
|
493
|
+
] });
|
|
494
|
+
if (href != null) {
|
|
495
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
496
|
+
"a",
|
|
497
|
+
{
|
|
498
|
+
"data-slot": "button-link",
|
|
499
|
+
className: sharedClassName,
|
|
500
|
+
href,
|
|
501
|
+
...props,
|
|
502
|
+
children: content
|
|
503
|
+
}
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
const { type, ...buttonProps } = props;
|
|
507
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
508
|
+
"button",
|
|
509
|
+
{
|
|
510
|
+
"data-slot": "button-link",
|
|
511
|
+
className: sharedClassName,
|
|
512
|
+
type: type ?? "button",
|
|
513
|
+
...buttonProps,
|
|
514
|
+
children: content
|
|
515
|
+
}
|
|
516
|
+
);
|
|
517
|
+
}
|
|
383
518
|
function ContentBlock({ className, children, title, subhead, cta }) {
|
|
384
519
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex max-w-xl flex-col items-start gap-3 self-stretch", className), children: [
|
|
385
520
|
(title || subhead || cta) && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-10 items-start justify-between self-stretch", children: [
|
|
@@ -393,24 +528,25 @@ function ContentBlock({ className, children, title, subhead, cta }) {
|
|
|
393
528
|
] });
|
|
394
529
|
}
|
|
395
530
|
function DialogRoot(props) {
|
|
396
|
-
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Root, { ...props });
|
|
531
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Root, { "data-slot": "dialog", ...props });
|
|
397
532
|
}
|
|
398
533
|
function DialogPortal(props) {
|
|
399
|
-
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Portal, { ...props });
|
|
534
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
|
|
400
535
|
}
|
|
401
536
|
function DialogTrigger(props) {
|
|
402
|
-
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Trigger, { ...props });
|
|
537
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
403
538
|
}
|
|
404
539
|
function DialogClose(props) {
|
|
405
|
-
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Close, { ...props });
|
|
540
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Close, { "data-slot": "dialog-close", ...props });
|
|
406
541
|
}
|
|
407
|
-
function
|
|
542
|
+
function DialogOverlay({
|
|
408
543
|
className,
|
|
409
544
|
...props
|
|
410
545
|
}) {
|
|
411
546
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
412
547
|
dialog.Dialog.Backdrop,
|
|
413
548
|
{
|
|
549
|
+
"data-slot": "dialog-overlay",
|
|
414
550
|
className: cn(
|
|
415
551
|
"fixed inset-0 min-h-dvh bg-[rgb(0_0_32/0.01)] opacity-0 backdrop-blur-sm transition-[opacity,backdrop-filter] duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-[-webkit-touch-callout:none]:absolute dark:bg-[rgb(255_255_255/0.01)] dark:opacity-70",
|
|
416
552
|
"data-closed:opacity-0 data-open:opacity-100",
|
|
@@ -427,6 +563,7 @@ function DialogViewport({
|
|
|
427
563
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
428
564
|
dialog.Dialog.Viewport,
|
|
429
565
|
{
|
|
566
|
+
"data-slot": "dialog-viewport",
|
|
430
567
|
className: cn(
|
|
431
568
|
"fixed inset-0 flex items-center justify-center overflow-hidden py-6 [@media(min-height:600px)]:pt-8 [@media(min-height:600px)]:pb-12",
|
|
432
569
|
className
|
|
@@ -435,55 +572,87 @@ function DialogViewport({
|
|
|
435
572
|
}
|
|
436
573
|
);
|
|
437
574
|
}
|
|
438
|
-
function
|
|
575
|
+
function DialogContent({
|
|
439
576
|
className,
|
|
440
577
|
children,
|
|
441
578
|
bottom = false,
|
|
442
579
|
showCloseButton = true,
|
|
580
|
+
closePosition = "top-left",
|
|
443
581
|
...props
|
|
444
582
|
}) {
|
|
445
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(dialog.Dialog.Portal, { children: [
|
|
446
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
447
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "before:bg-tint-700-reversed relative block before:absolute before:-inset-1.5 before:rounded-full before:backdrop-blur-sm", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-primary-foreground text-background relative z-10 flex size-10 items-center justify-center rounded-full", children: /* @__PURE__ */ jsxRuntime.jsx(icons.XClose, { className: "size-[18px]" }) }) })
|
|
456
|
-
]
|
|
457
|
-
}
|
|
458
|
-
),
|
|
459
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
460
|
-
"div",
|
|
461
|
-
{
|
|
462
|
-
className: cn(
|
|
463
|
-
"bg-background pointer-events-auto fixed top-1/2 left-1/2 flex h-full max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col rounded-xl shadow-2xl transition-all",
|
|
583
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(dialog.Dialog.Portal, { "data-slot": "dialog-portal", children: [
|
|
584
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
585
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
586
|
+
dialog.Dialog.Popup,
|
|
587
|
+
{
|
|
588
|
+
"data-slot": "dialog-content",
|
|
589
|
+
className: "group/popup pointer-events-none flex h-full max-h-full min-h-0 w-full max-w-full justify-center overflow-hidden transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0",
|
|
590
|
+
children: [
|
|
591
|
+
showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
592
|
+
DialogClose,
|
|
464
593
|
{
|
|
465
|
-
"group-data-closed/popup:duration-pop-hover group-data-open/popup:duration-pop-hover group-data-open/popup:ease-pop-hover group-data-closed/popup:ease-out group-data-ending-style/popup:scale-[0.96] group-data-ending-style/popup:opacity-0 group-data-starting-style/popup:scale-[0.96] group-data-starting-style/popup:opacity-0": !bottom,
|
|
466
|
-
"
|
|
467
|
-
|
|
468
|
-
|
|
594
|
+
className: cn("pointer-events-auto fixed top-[15px] z-50 transition-all", { "left-5": closePosition === "top-left", "right-5": closePosition === "top-right", "group-data-closed/popup:duration-pop-hover group-data-open/popup:duration-pop-hover group-data-open/popup:ease-pop-hover group-data-closed/popup:ease-out group-data-ending-style/popup:scale-[0.96] group-data-ending-style/popup:opacity-0 group-data-starting-style/popup:scale-[0.96] group-data-starting-style/popup:opacity-0": !bottom, " group-data-starting-style/popup-scale-[0.96] group-data-ending-style/popup-scale-100 group-data-open/popup:animate-in group-data-closed/popup:animate-out group-data-closed/popup:duration-200 group-data-closed/popup:ease-[cubic-bezier(1,0,0.72,0.32)] group-data-ending-style/popup:translate-y-1/2 group-data-open/popup:duration-pop-hover group-data-open/popup:ease-[cubic-bezier(0.32,0.72,0,1)] group-data-starting-style/popup:translate-y-1/2": bottom }),
|
|
595
|
+
"aria-label": "Close",
|
|
596
|
+
children: [
|
|
597
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" }),
|
|
598
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "before:bg-tint-700-reversed relative block before:absolute before:-inset-1.5 before:rounded-full before:backdrop-blur-sm", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-primary-foreground text-background relative z-10 flex size-10 items-center justify-center rounded-full", children: /* @__PURE__ */ jsxRuntime.jsx(icons.XClose, { className: "size-[18px]" }) }) })
|
|
599
|
+
]
|
|
600
|
+
}
|
|
469
601
|
),
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
602
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
603
|
+
"div",
|
|
604
|
+
{
|
|
605
|
+
className: cn(
|
|
606
|
+
"bg-background pointer-events-auto fixed top-1/2 left-1/2 flex h-full max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col rounded-xl shadow-2xl transition-all",
|
|
607
|
+
{
|
|
608
|
+
"group-data-closed/popup:duration-pop-hover group-data-open/popup:duration-pop-hover group-data-open/popup:ease-pop-hover group-data-closed/popup:ease-out group-data-ending-style/popup:scale-[0.96] group-data-ending-style/popup:opacity-0 group-data-starting-style/popup:scale-[0.96] group-data-starting-style/popup:opacity-0": !bottom,
|
|
609
|
+
"group-data-open/popup:slide-in-from-bottom group-data-closed/popup:slide-out-to-bottom group-data-starting-style/popup-scale-100 group-data-ending-style/popup-scale-100 group-data-open/popup:animate-in group-data-closed/popup:animate-out top-auto bottom-0 h-full translate-y-0 rounded-b-none group-data-closed/popup:duration-200 group-data-closed/popup:ease-[cubic-bezier(1,0,0.72,0.32)] group-data-ending-style/popup:translate-y-full group-data-open/popup:duration-300 group-data-open/popup:ease-[cubic-bezier(0.32,0.72,0,1)] group-data-starting-style/popup:translate-y-full": bottom
|
|
610
|
+
},
|
|
611
|
+
className
|
|
612
|
+
),
|
|
613
|
+
...props,
|
|
614
|
+
children
|
|
615
|
+
}
|
|
616
|
+
)
|
|
617
|
+
]
|
|
618
|
+
}
|
|
619
|
+
)
|
|
475
620
|
] });
|
|
476
621
|
}
|
|
477
622
|
function DialogHeader({ className, ...props }) {
|
|
478
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
623
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
624
|
+
"div",
|
|
625
|
+
{
|
|
626
|
+
"data-slot": "dialog-header",
|
|
627
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
628
|
+
...props
|
|
629
|
+
}
|
|
630
|
+
);
|
|
479
631
|
}
|
|
480
|
-
function DialogFooter({
|
|
481
|
-
|
|
632
|
+
function DialogFooter({
|
|
633
|
+
className,
|
|
634
|
+
showCloseButton = false,
|
|
635
|
+
children,
|
|
636
|
+
...props
|
|
637
|
+
}) {
|
|
638
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
639
|
+
"div",
|
|
640
|
+
{
|
|
641
|
+
"data-slot": "dialog-footer",
|
|
642
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row", className),
|
|
643
|
+
...props,
|
|
644
|
+
children: [
|
|
645
|
+
children,
|
|
646
|
+
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(DialogClose, { render: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "tertiary", theme: "base" }), children: "Close" })
|
|
647
|
+
]
|
|
648
|
+
}
|
|
649
|
+
);
|
|
482
650
|
}
|
|
483
651
|
function DialogTitle({ className, ...props }) {
|
|
484
652
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
485
653
|
dialog.Dialog.Title,
|
|
486
654
|
{
|
|
655
|
+
"data-slot": "dialog-title",
|
|
487
656
|
className: cn("text-lg leading-none font-semibold", className),
|
|
488
657
|
...props
|
|
489
658
|
}
|
|
@@ -496,6 +665,7 @@ function DialogDescription({
|
|
|
496
665
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
497
666
|
dialog.Dialog.Description,
|
|
498
667
|
{
|
|
668
|
+
"data-slot": "dialog-description",
|
|
499
669
|
className: cn("text-muted-foreground text-sm", className),
|
|
500
670
|
...props
|
|
501
671
|
}
|
|
@@ -505,6 +675,7 @@ function DialogBody({ className, children, ...props }) {
|
|
|
505
675
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
506
676
|
"div",
|
|
507
677
|
{
|
|
678
|
+
"data-slot": "dialog-body",
|
|
508
679
|
className: cn("flex shrink-0 grow basis-0 flex-col items-start self-stretch", className),
|
|
509
680
|
...props,
|
|
510
681
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 grow basis-0 flex-col items-start gap-10 self-stretch overflow-auto p-4", children })
|
|
@@ -901,7 +1072,7 @@ function Input({ className, type, ...props }) {
|
|
|
901
1072
|
"data-slot": "input",
|
|
902
1073
|
className: cn(
|
|
903
1074
|
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
904
|
-
"focus-visible:border-ring focus-visible:ring-ring
|
|
1075
|
+
"focus-visible:border-ring focus-visible:ring-ring focus-visible:ring-[3px]",
|
|
905
1076
|
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
906
1077
|
className
|
|
907
1078
|
),
|
|
@@ -1109,7 +1280,7 @@ function SectionHeader({
|
|
|
1109
1280
|
}
|
|
1110
1281
|
var tagVariants = classVarianceAuthority.cva(
|
|
1111
1282
|
// Base styles
|
|
1112
|
-
"inline-flex items-center justify-center rounded-full box-border relative
|
|
1283
|
+
"inline-flex items-center justify-center rounded-full box-border relative font-medium text-sm leading-5 text-center whitespace-nowrap appearance-none focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/60 focus-visible:ring-offset-0",
|
|
1113
1284
|
{
|
|
1114
1285
|
variants: {
|
|
1115
1286
|
selected: {
|
|
@@ -1190,6 +1361,8 @@ function Tag({
|
|
|
1190
1361
|
children,
|
|
1191
1362
|
leading,
|
|
1192
1363
|
trailing,
|
|
1364
|
+
interactive,
|
|
1365
|
+
type,
|
|
1193
1366
|
onClick,
|
|
1194
1367
|
className = ""
|
|
1195
1368
|
}) {
|
|
@@ -1206,7 +1379,8 @@ function Tag({
|
|
|
1206
1379
|
};
|
|
1207
1380
|
const showLeading = leading && !collapsed;
|
|
1208
1381
|
const showTrailing = trailing && !collapsed;
|
|
1209
|
-
const
|
|
1382
|
+
const isInteractive = interactive ?? typeof onClick === "function";
|
|
1383
|
+
const TagElement = isInteractive ? "button" : "div";
|
|
1210
1384
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1211
1385
|
TagElement,
|
|
1212
1386
|
{
|
|
@@ -1215,13 +1389,13 @@ function Tag({
|
|
|
1215
1389
|
size,
|
|
1216
1390
|
selected,
|
|
1217
1391
|
collapsed,
|
|
1218
|
-
interactive:
|
|
1392
|
+
interactive: isInteractive
|
|
1219
1393
|
}),
|
|
1220
1394
|
className
|
|
1221
1395
|
),
|
|
1222
1396
|
onClick: handleClick,
|
|
1223
1397
|
onKeyDown: handleKeyDown,
|
|
1224
|
-
type:
|
|
1398
|
+
type: isInteractive ? type ?? "button" : void 0,
|
|
1225
1399
|
children: [
|
|
1226
1400
|
!collapsed && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1227
1401
|
showLeading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center overflow-hidden text-inherit", children: leading }),
|
|
@@ -1234,16 +1408,18 @@ function Tag({
|
|
|
1234
1408
|
);
|
|
1235
1409
|
}
|
|
1236
1410
|
|
|
1411
|
+
exports.BannerNotification = BannerNotification;
|
|
1237
1412
|
exports.Button = Button;
|
|
1413
|
+
exports.ButtonLink = ButtonLink;
|
|
1238
1414
|
exports.ContentBlock = ContentBlock;
|
|
1239
1415
|
exports.Dialog = DialogRoot;
|
|
1240
|
-
exports.DialogBackdrop = DialogBackdrop;
|
|
1241
1416
|
exports.DialogBody = DialogBody;
|
|
1242
1417
|
exports.DialogClose = DialogClose;
|
|
1418
|
+
exports.DialogContent = DialogContent;
|
|
1243
1419
|
exports.DialogDescription = DialogDescription;
|
|
1244
1420
|
exports.DialogFooter = DialogFooter;
|
|
1245
1421
|
exports.DialogHeader = DialogHeader;
|
|
1246
|
-
exports.
|
|
1422
|
+
exports.DialogOverlay = DialogOverlay;
|
|
1247
1423
|
exports.DialogPortal = DialogPortal;
|
|
1248
1424
|
exports.DialogTitle = DialogTitle;
|
|
1249
1425
|
exports.DialogTrigger = DialogTrigger;
|