@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.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Button as Button$1 } from '@base-ui/react/button';
|
|
2
1
|
import { cva } from 'class-variance-authority';
|
|
3
2
|
import { clsx } from 'clsx';
|
|
4
3
|
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import {
|
|
4
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
|
+
import { Button as Button$1 } from '@base-ui/react/button';
|
|
6
6
|
import { Dialog } from '@base-ui/react/dialog';
|
|
7
7
|
import { XClose, CheckCircle, Circle, ChevronRight, Check, InfoCircle } from '@untitledui/icons';
|
|
8
8
|
import { Menu } from '@base-ui/react/menu';
|
|
@@ -12,10 +12,49 @@ import { useRender } from '@base-ui/react/use-render';
|
|
|
12
12
|
import { useState, useCallback, useEffect } from 'react';
|
|
13
13
|
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
14
14
|
|
|
15
|
-
// src/components/
|
|
15
|
+
// src/components/banner-notification/banner-notification.tsx
|
|
16
16
|
function cn(...inputs) {
|
|
17
17
|
return twMerge(clsx(inputs));
|
|
18
18
|
}
|
|
19
|
+
var bannerNotificationVariants = cva(
|
|
20
|
+
"flex items-start gap-3 rounded-[6px] px-4 py-3 w-full w-[360px] border-border border",
|
|
21
|
+
{
|
|
22
|
+
variants: {
|
|
23
|
+
variant: {
|
|
24
|
+
info: ""
|
|
25
|
+
},
|
|
26
|
+
theme: {
|
|
27
|
+
error: "bg-warning-100 dark:bg-warning-200/16",
|
|
28
|
+
highlight: "bg-success-50 dark:bg-white/0"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "info",
|
|
33
|
+
theme: "highlight"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
function BannerNotification({
|
|
38
|
+
className,
|
|
39
|
+
children,
|
|
40
|
+
variant = "info",
|
|
41
|
+
theme = "highlight",
|
|
42
|
+
image,
|
|
43
|
+
...props
|
|
44
|
+
}) {
|
|
45
|
+
return /* @__PURE__ */ jsxs(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
"data-slot": "banner-notification",
|
|
49
|
+
className: cn(bannerNotificationVariants({ variant, theme }), className),
|
|
50
|
+
...props,
|
|
51
|
+
children: [
|
|
52
|
+
image && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 items-start [&>svg]:size-5", children: image }),
|
|
53
|
+
children != null && /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 text-sm", children })
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
19
58
|
var loaderVariants = cva("flex shrink-0 items-center justify-center", {
|
|
20
59
|
variants: {
|
|
21
60
|
theme: {
|
|
@@ -246,7 +285,7 @@ var buttonVariants = cva(
|
|
|
246
285
|
variant: "primary",
|
|
247
286
|
outline: true,
|
|
248
287
|
theme: "base",
|
|
249
|
-
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"
|
|
288
|
+
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"
|
|
250
289
|
},
|
|
251
290
|
{
|
|
252
291
|
variant: "primary",
|
|
@@ -378,6 +417,102 @@ function Button({
|
|
|
378
417
|
}
|
|
379
418
|
);
|
|
380
419
|
}
|
|
420
|
+
var buttonLinkVariants = cva(
|
|
421
|
+
"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",
|
|
422
|
+
{
|
|
423
|
+
variants: {
|
|
424
|
+
hasLeading: {
|
|
425
|
+
false: null,
|
|
426
|
+
true: null
|
|
427
|
+
},
|
|
428
|
+
hasTrailing: {
|
|
429
|
+
false: null,
|
|
430
|
+
true: null
|
|
431
|
+
},
|
|
432
|
+
primary: {
|
|
433
|
+
false: null,
|
|
434
|
+
true: null
|
|
435
|
+
},
|
|
436
|
+
size: {
|
|
437
|
+
sm: "text-sm [&_svg:not([class*='size-'])]:size-4",
|
|
438
|
+
md: "text-sm [&_svg:not([class*='size-'])]:size-[18px]",
|
|
439
|
+
lg: "text-base [&_svg:not([class*='size-'])]:size-5"
|
|
440
|
+
},
|
|
441
|
+
theme: {
|
|
442
|
+
default: "",
|
|
443
|
+
white: "text-white hover:bg-white/16 focus-visible:bg-blue-dark-600 focus-visible:text-white",
|
|
444
|
+
black: "text-black hover:bg-foreground/10 focus-visible:bg-blue-dark-600 focus-visible:text-black focus-visible:text-white"
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
defaultVariants: {
|
|
448
|
+
primary: false,
|
|
449
|
+
size: "md",
|
|
450
|
+
theme: "default"
|
|
451
|
+
},
|
|
452
|
+
compoundVariants: [
|
|
453
|
+
{
|
|
454
|
+
theme: "default",
|
|
455
|
+
primary: false,
|
|
456
|
+
class: "text-grayscale-500 hover:bg-foreground/10 focus-visible:bg-blue-dark-600 focus-visible:text-white"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
theme: "default",
|
|
460
|
+
primary: true,
|
|
461
|
+
class: "text-foreground hover:bg-foreground/10 focus-visible:bg-blue-dark-600 focus-visible:text-white"
|
|
462
|
+
}
|
|
463
|
+
]
|
|
464
|
+
}
|
|
465
|
+
);
|
|
466
|
+
function ButtonLink({
|
|
467
|
+
children,
|
|
468
|
+
className,
|
|
469
|
+
leading,
|
|
470
|
+
primary = false,
|
|
471
|
+
size = "md",
|
|
472
|
+
theme = "default",
|
|
473
|
+
trailing,
|
|
474
|
+
href,
|
|
475
|
+
...props
|
|
476
|
+
}) {
|
|
477
|
+
const sharedClassName = cn(
|
|
478
|
+
buttonLinkVariants({
|
|
479
|
+
hasLeading: !!leading,
|
|
480
|
+
hasTrailing: !!trailing,
|
|
481
|
+
primary,
|
|
482
|
+
size,
|
|
483
|
+
theme
|
|
484
|
+
}),
|
|
485
|
+
className
|
|
486
|
+
);
|
|
487
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
488
|
+
leading && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center text-inherit [&_svg]:size-inherit", children: leading }),
|
|
489
|
+
children != null && /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate relative", children }),
|
|
490
|
+
trailing && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center text-inherit [&_svg]:size-inherit", children: trailing })
|
|
491
|
+
] });
|
|
492
|
+
if (href != null) {
|
|
493
|
+
return /* @__PURE__ */ jsx(
|
|
494
|
+
"a",
|
|
495
|
+
{
|
|
496
|
+
"data-slot": "button-link",
|
|
497
|
+
className: sharedClassName,
|
|
498
|
+
href,
|
|
499
|
+
...props,
|
|
500
|
+
children: content
|
|
501
|
+
}
|
|
502
|
+
);
|
|
503
|
+
}
|
|
504
|
+
const { type, ...buttonProps } = props;
|
|
505
|
+
return /* @__PURE__ */ jsx(
|
|
506
|
+
"button",
|
|
507
|
+
{
|
|
508
|
+
"data-slot": "button-link",
|
|
509
|
+
className: sharedClassName,
|
|
510
|
+
type: type ?? "button",
|
|
511
|
+
...buttonProps,
|
|
512
|
+
children: content
|
|
513
|
+
}
|
|
514
|
+
);
|
|
515
|
+
}
|
|
381
516
|
function ContentBlock({ className, children, title, subhead, cta }) {
|
|
382
517
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex max-w-xl flex-col items-start gap-3 self-stretch", className), children: [
|
|
383
518
|
(title || subhead || cta) && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "flex min-h-10 items-start justify-between self-stretch", children: [
|
|
@@ -391,24 +526,25 @@ function ContentBlock({ className, children, title, subhead, cta }) {
|
|
|
391
526
|
] });
|
|
392
527
|
}
|
|
393
528
|
function DialogRoot(props) {
|
|
394
|
-
return /* @__PURE__ */ jsx(Dialog.Root, { ...props });
|
|
529
|
+
return /* @__PURE__ */ jsx(Dialog.Root, { "data-slot": "dialog", ...props });
|
|
395
530
|
}
|
|
396
531
|
function DialogPortal(props) {
|
|
397
|
-
return /* @__PURE__ */ jsx(Dialog.Portal, { ...props });
|
|
532
|
+
return /* @__PURE__ */ jsx(Dialog.Portal, { "data-slot": "dialog-portal", ...props });
|
|
398
533
|
}
|
|
399
534
|
function DialogTrigger(props) {
|
|
400
|
-
return /* @__PURE__ */ jsx(Dialog.Trigger, { ...props });
|
|
535
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
401
536
|
}
|
|
402
537
|
function DialogClose(props) {
|
|
403
|
-
return /* @__PURE__ */ jsx(Dialog.Close, { ...props });
|
|
538
|
+
return /* @__PURE__ */ jsx(Dialog.Close, { "data-slot": "dialog-close", ...props });
|
|
404
539
|
}
|
|
405
|
-
function
|
|
540
|
+
function DialogOverlay({
|
|
406
541
|
className,
|
|
407
542
|
...props
|
|
408
543
|
}) {
|
|
409
544
|
return /* @__PURE__ */ jsx(
|
|
410
545
|
Dialog.Backdrop,
|
|
411
546
|
{
|
|
547
|
+
"data-slot": "dialog-overlay",
|
|
412
548
|
className: cn(
|
|
413
549
|
"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",
|
|
414
550
|
"data-closed:opacity-0 data-open:opacity-100",
|
|
@@ -425,6 +561,7 @@ function DialogViewport({
|
|
|
425
561
|
return /* @__PURE__ */ jsx(
|
|
426
562
|
Dialog.Viewport,
|
|
427
563
|
{
|
|
564
|
+
"data-slot": "dialog-viewport",
|
|
428
565
|
className: cn(
|
|
429
566
|
"fixed inset-0 flex items-center justify-center overflow-hidden py-6 [@media(min-height:600px)]:pt-8 [@media(min-height:600px)]:pb-12",
|
|
430
567
|
className
|
|
@@ -433,55 +570,87 @@ function DialogViewport({
|
|
|
433
570
|
}
|
|
434
571
|
);
|
|
435
572
|
}
|
|
436
|
-
function
|
|
573
|
+
function DialogContent({
|
|
437
574
|
className,
|
|
438
575
|
children,
|
|
439
576
|
bottom = false,
|
|
440
577
|
showCloseButton = true,
|
|
578
|
+
closePosition = "top-left",
|
|
441
579
|
...props
|
|
442
580
|
}) {
|
|
443
|
-
return /* @__PURE__ */ jsxs(Dialog.Portal, { children: [
|
|
444
|
-
/* @__PURE__ */ jsx(
|
|
445
|
-
/* @__PURE__ */ jsxs(
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
/* @__PURE__ */ 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__ */ jsx("span", { className: "bg-primary-foreground text-background relative z-10 flex size-10 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx(XClose, { className: "size-[18px]" }) }) })
|
|
454
|
-
]
|
|
455
|
-
}
|
|
456
|
-
),
|
|
457
|
-
/* @__PURE__ */ jsx(
|
|
458
|
-
"div",
|
|
459
|
-
{
|
|
460
|
-
className: cn(
|
|
461
|
-
"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",
|
|
581
|
+
return /* @__PURE__ */ jsxs(Dialog.Portal, { "data-slot": "dialog-portal", children: [
|
|
582
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
583
|
+
/* @__PURE__ */ jsxs(
|
|
584
|
+
Dialog.Popup,
|
|
585
|
+
{
|
|
586
|
+
"data-slot": "dialog-content",
|
|
587
|
+
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",
|
|
588
|
+
children: [
|
|
589
|
+
showCloseButton && /* @__PURE__ */ jsxs(
|
|
590
|
+
DialogClose,
|
|
462
591
|
{
|
|
463
|
-
"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,
|
|
464
|
-
"
|
|
465
|
-
|
|
466
|
-
|
|
592
|
+
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 }),
|
|
593
|
+
"aria-label": "Close",
|
|
594
|
+
children: [
|
|
595
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" }),
|
|
596
|
+
/* @__PURE__ */ 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__ */ jsx("span", { className: "bg-primary-foreground text-background relative z-10 flex size-10 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx(XClose, { className: "size-[18px]" }) }) })
|
|
597
|
+
]
|
|
598
|
+
}
|
|
467
599
|
),
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
600
|
+
/* @__PURE__ */ jsx(
|
|
601
|
+
"div",
|
|
602
|
+
{
|
|
603
|
+
className: cn(
|
|
604
|
+
"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",
|
|
605
|
+
{
|
|
606
|
+
"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,
|
|
607
|
+
"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
|
|
608
|
+
},
|
|
609
|
+
className
|
|
610
|
+
),
|
|
611
|
+
...props,
|
|
612
|
+
children
|
|
613
|
+
}
|
|
614
|
+
)
|
|
615
|
+
]
|
|
616
|
+
}
|
|
617
|
+
)
|
|
473
618
|
] });
|
|
474
619
|
}
|
|
475
620
|
function DialogHeader({ className, ...props }) {
|
|
476
|
-
return /* @__PURE__ */ jsx(
|
|
621
|
+
return /* @__PURE__ */ jsx(
|
|
622
|
+
"div",
|
|
623
|
+
{
|
|
624
|
+
"data-slot": "dialog-header",
|
|
625
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
626
|
+
...props
|
|
627
|
+
}
|
|
628
|
+
);
|
|
477
629
|
}
|
|
478
|
-
function DialogFooter({
|
|
479
|
-
|
|
630
|
+
function DialogFooter({
|
|
631
|
+
className,
|
|
632
|
+
showCloseButton = false,
|
|
633
|
+
children,
|
|
634
|
+
...props
|
|
635
|
+
}) {
|
|
636
|
+
return /* @__PURE__ */ jsxs(
|
|
637
|
+
"div",
|
|
638
|
+
{
|
|
639
|
+
"data-slot": "dialog-footer",
|
|
640
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row", className),
|
|
641
|
+
...props,
|
|
642
|
+
children: [
|
|
643
|
+
children,
|
|
644
|
+
showCloseButton && /* @__PURE__ */ jsx(DialogClose, { render: /* @__PURE__ */ jsx(Button, { variant: "tertiary", theme: "base" }), children: "Close" })
|
|
645
|
+
]
|
|
646
|
+
}
|
|
647
|
+
);
|
|
480
648
|
}
|
|
481
649
|
function DialogTitle({ className, ...props }) {
|
|
482
650
|
return /* @__PURE__ */ jsx(
|
|
483
651
|
Dialog.Title,
|
|
484
652
|
{
|
|
653
|
+
"data-slot": "dialog-title",
|
|
485
654
|
className: cn("text-lg leading-none font-semibold", className),
|
|
486
655
|
...props
|
|
487
656
|
}
|
|
@@ -494,6 +663,7 @@ function DialogDescription({
|
|
|
494
663
|
return /* @__PURE__ */ jsx(
|
|
495
664
|
Dialog.Description,
|
|
496
665
|
{
|
|
666
|
+
"data-slot": "dialog-description",
|
|
497
667
|
className: cn("text-muted-foreground text-sm", className),
|
|
498
668
|
...props
|
|
499
669
|
}
|
|
@@ -503,6 +673,7 @@ function DialogBody({ className, children, ...props }) {
|
|
|
503
673
|
return /* @__PURE__ */ jsx(
|
|
504
674
|
"div",
|
|
505
675
|
{
|
|
676
|
+
"data-slot": "dialog-body",
|
|
506
677
|
className: cn("flex shrink-0 grow basis-0 flex-col items-start self-stretch", className),
|
|
507
678
|
...props,
|
|
508
679
|
children: /* @__PURE__ */ jsx("div", { className: "flex shrink-0 grow basis-0 flex-col items-start gap-10 self-stretch overflow-auto p-4", children })
|
|
@@ -899,7 +1070,7 @@ function Input({ className, type, ...props }) {
|
|
|
899
1070
|
"data-slot": "input",
|
|
900
1071
|
className: cn(
|
|
901
1072
|
"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",
|
|
902
|
-
"focus-visible:border-ring focus-visible:ring-ring
|
|
1073
|
+
"focus-visible:border-ring focus-visible:ring-ring focus-visible:ring-[3px]",
|
|
903
1074
|
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
904
1075
|
className
|
|
905
1076
|
),
|
|
@@ -1107,7 +1278,7 @@ function SectionHeader({
|
|
|
1107
1278
|
}
|
|
1108
1279
|
var tagVariants = cva(
|
|
1109
1280
|
// Base styles
|
|
1110
|
-
"inline-flex items-center justify-center rounded-full box-border relative
|
|
1281
|
+
"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",
|
|
1111
1282
|
{
|
|
1112
1283
|
variants: {
|
|
1113
1284
|
selected: {
|
|
@@ -1188,6 +1359,8 @@ function Tag({
|
|
|
1188
1359
|
children,
|
|
1189
1360
|
leading,
|
|
1190
1361
|
trailing,
|
|
1362
|
+
interactive,
|
|
1363
|
+
type,
|
|
1191
1364
|
onClick,
|
|
1192
1365
|
className = ""
|
|
1193
1366
|
}) {
|
|
@@ -1204,7 +1377,8 @@ function Tag({
|
|
|
1204
1377
|
};
|
|
1205
1378
|
const showLeading = leading && !collapsed;
|
|
1206
1379
|
const showTrailing = trailing && !collapsed;
|
|
1207
|
-
const
|
|
1380
|
+
const isInteractive = interactive ?? typeof onClick === "function";
|
|
1381
|
+
const TagElement = isInteractive ? "button" : "div";
|
|
1208
1382
|
return /* @__PURE__ */ jsxs(
|
|
1209
1383
|
TagElement,
|
|
1210
1384
|
{
|
|
@@ -1213,13 +1387,13 @@ function Tag({
|
|
|
1213
1387
|
size,
|
|
1214
1388
|
selected,
|
|
1215
1389
|
collapsed,
|
|
1216
|
-
interactive:
|
|
1390
|
+
interactive: isInteractive
|
|
1217
1391
|
}),
|
|
1218
1392
|
className
|
|
1219
1393
|
),
|
|
1220
1394
|
onClick: handleClick,
|
|
1221
1395
|
onKeyDown: handleKeyDown,
|
|
1222
|
-
type:
|
|
1396
|
+
type: isInteractive ? type ?? "button" : void 0,
|
|
1223
1397
|
children: [
|
|
1224
1398
|
!collapsed && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1225
1399
|
showLeading && /* @__PURE__ */ jsx("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center overflow-hidden text-inherit", children: leading }),
|
|
@@ -1232,6 +1406,6 @@ function Tag({
|
|
|
1232
1406
|
);
|
|
1233
1407
|
}
|
|
1234
1408
|
|
|
1235
|
-
export { Button, ContentBlock, DialogRoot as Dialog,
|
|
1409
|
+
export { BannerNotification, Button, ButtonLink, ContentBlock, DialogRoot as Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogViewport, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Footer, Input, Label, Loader, NotificationBadge, SectionFlourish, SectionHeader, Tag, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
1236
1410
|
//# sourceMappingURL=index.js.map
|
|
1237
1411
|
//# sourceMappingURL=index.js.map
|