@popgrids/ui 0.0.20 → 0.0.22

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.
Files changed (58) hide show
  1. package/dist/banner-notification.cjs +54 -0
  2. package/dist/banner-notification.cjs.map +1 -0
  3. package/dist/banner-notification.d.cts +24 -0
  4. package/dist/banner-notification.d.ts +24 -0
  5. package/dist/banner-notification.js +52 -0
  6. package/dist/banner-notification.js.map +1 -0
  7. package/dist/button-link.cjs +35 -18
  8. package/dist/button-link.cjs.map +1 -1
  9. package/dist/button-link.d.cts +15 -3
  10. package/dist/button-link.d.ts +15 -3
  11. package/dist/button-link.js +36 -19
  12. package/dist/button-link.js.map +1 -1
  13. package/dist/button.cjs +1 -1
  14. package/dist/button.cjs.map +1 -1
  15. package/dist/button.js +1 -1
  16. package/dist/button.js.map +1 -1
  17. package/dist/dialog.cjs +439 -39
  18. package/dist/dialog.cjs.map +1 -1
  19. package/dist/dialog.d.cts +25 -11
  20. package/dist/dialog.d.ts +25 -11
  21. package/dist/dialog.js +439 -39
  22. package/dist/dialog.js.map +1 -1
  23. package/dist/dropdown-menu.cjs +126 -92
  24. package/dist/dropdown-menu.cjs.map +1 -1
  25. package/dist/dropdown-menu.d.cts +18 -20
  26. package/dist/dropdown-menu.d.ts +18 -20
  27. package/dist/dropdown-menu.js +127 -93
  28. package/dist/dropdown-menu.js.map +1 -1
  29. package/dist/index.cjs +329 -185
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.cts +5 -4
  32. package/dist/index.d.ts +5 -4
  33. package/dist/index.js +329 -186
  34. package/dist/index.js.map +1 -1
  35. package/dist/input.cjs +1 -1
  36. package/dist/input.cjs.map +1 -1
  37. package/dist/input.js +1 -1
  38. package/dist/input.js.map +1 -1
  39. package/dist/metafile-cjs.json +1 -1
  40. package/dist/metafile-esm.json +1 -1
  41. package/dist/section-header.cjs +30 -29
  42. package/dist/section-header.cjs.map +1 -1
  43. package/dist/section-header.js +30 -29
  44. package/dist/section-header.js.map +1 -1
  45. package/dist/tag.cjs +7 -5
  46. package/dist/tag.cjs.map +1 -1
  47. package/dist/tag.d.cts +5 -1
  48. package/dist/tag.d.ts +5 -1
  49. package/dist/tag.js +8 -6
  50. package/dist/tag.js.map +1 -1
  51. package/dist/theme.css +4 -4
  52. package/dist/tooltip.cjs +40 -18
  53. package/dist/tooltip.cjs.map +1 -1
  54. package/dist/tooltip.d.cts +1 -3
  55. package/dist/tooltip.d.ts +1 -3
  56. package/dist/tooltip.js +40 -18
  57. package/dist/tooltip.js.map +1 -1
  58. package/package.json +31 -21
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
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 { jsx, jsxs, Fragment } from 'react/jsx-runtime';
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
- import { XClose, CheckCircle, Circle, ChevronRight, Check, InfoCircle } from '@untitledui/icons';
7
+ import { XClose, ChevronRight, Check, InfoCircle } from '@untitledui/icons';
8
8
  import { Menu } from '@base-ui/react/menu';
9
9
  import { Input as Input$1 } from '@base-ui/react/input';
10
10
  import { mergeProps } from '@base-ui/react/merge-props';
@@ -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/button/button.tsx
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",
@@ -432,28 +471,45 @@ function ButtonLink({
432
471
  size = "md",
433
472
  theme = "default",
434
473
  trailing,
474
+ href,
435
475
  ...props
436
476
  }) {
437
- return /* @__PURE__ */ jsxs(
438
- "a",
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",
439
507
  {
440
508
  "data-slot": "button-link",
441
- className: cn(
442
- buttonLinkVariants({
443
- hasLeading: !!leading,
444
- hasTrailing: !!trailing,
445
- primary,
446
- size,
447
- theme
448
- }),
449
- className
450
- ),
451
- ...props,
452
- children: [
453
- leading && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center text-inherit [&_svg]:size-inherit", children: leading }),
454
- children != null && /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate relative", children }),
455
- trailing && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center text-inherit [&_svg]:size-inherit", children: trailing })
456
- ]
509
+ className: sharedClassName,
510
+ type: type ?? "button",
511
+ ...buttonProps,
512
+ children: content
457
513
  }
458
514
  );
459
515
  }
@@ -470,24 +526,25 @@ function ContentBlock({ className, children, title, subhead, cta }) {
470
526
  ] });
471
527
  }
472
528
  function DialogRoot(props) {
473
- return /* @__PURE__ */ jsx(Dialog.Root, { ...props });
529
+ return /* @__PURE__ */ jsx(Dialog.Root, { "data-slot": "dialog", ...props });
474
530
  }
475
531
  function DialogPortal(props) {
476
- return /* @__PURE__ */ jsx(Dialog.Portal, { ...props });
532
+ return /* @__PURE__ */ jsx(Dialog.Portal, { "data-slot": "dialog-portal", ...props });
477
533
  }
478
534
  function DialogTrigger(props) {
479
- return /* @__PURE__ */ jsx(Dialog.Trigger, { ...props });
535
+ return /* @__PURE__ */ jsx(Dialog.Trigger, { "data-slot": "dialog-trigger", ...props });
480
536
  }
481
537
  function DialogClose(props) {
482
- return /* @__PURE__ */ jsx(Dialog.Close, { ...props });
538
+ return /* @__PURE__ */ jsx(Dialog.Close, { "data-slot": "dialog-close", ...props });
483
539
  }
484
- function DialogBackdrop({
540
+ function DialogOverlay({
485
541
  className,
486
542
  ...props
487
543
  }) {
488
544
  return /* @__PURE__ */ jsx(
489
545
  Dialog.Backdrop,
490
546
  {
547
+ "data-slot": "dialog-overlay",
491
548
  className: cn(
492
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",
493
550
  "data-closed:opacity-0 data-open:opacity-100",
@@ -504,6 +561,7 @@ function DialogViewport({
504
561
  return /* @__PURE__ */ jsx(
505
562
  Dialog.Viewport,
506
563
  {
564
+ "data-slot": "dialog-viewport",
507
565
  className: cn(
508
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",
509
567
  className
@@ -512,55 +570,87 @@ function DialogViewport({
512
570
  }
513
571
  );
514
572
  }
515
- function DialogPopup({
573
+ function DialogContent({
516
574
  className,
517
575
  children,
518
576
  bottom = false,
519
577
  showCloseButton = true,
578
+ closePosition = "top-left",
520
579
  ...props
521
580
  }) {
522
- return /* @__PURE__ */ jsxs(Dialog.Portal, { children: [
523
- /* @__PURE__ */ jsx(DialogBackdrop, {}),
524
- /* @__PURE__ */ jsxs(Dialog.Popup, { 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", children: [
525
- showCloseButton && /* @__PURE__ */ jsxs(
526
- DialogClose,
527
- {
528
- className: "pointer-events-auto fixed top-[15px] left-5 z-50",
529
- "aria-label": "Close",
530
- children: [
531
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" }),
532
- /* @__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]" }) }) })
533
- ]
534
- }
535
- ),
536
- /* @__PURE__ */ jsx(
537
- "div",
538
- {
539
- className: cn(
540
- "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,
541
591
  {
542
- "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,
543
- "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
544
- },
545
- className
592
+ className: cn("pointer-events-auto fixed top-[7px] z-50 transition-all", { "left-4": closePosition === "top-left", "right-4": 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
+ }
546
599
  ),
547
- ...props,
548
- children
549
- }
550
- )
551
- ] })
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-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-closed/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
+ )
552
618
  ] });
553
619
  }
554
620
  function DialogHeader({ className, ...props }) {
555
- return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props });
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
+ );
556
629
  }
557
- function DialogFooter({ className, ...props }) {
558
- return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse gap-2 sm:flex-row", className), ...props });
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
+ );
559
648
  }
560
649
  function DialogTitle({ className, ...props }) {
561
650
  return /* @__PURE__ */ jsx(
562
651
  Dialog.Title,
563
652
  {
653
+ "data-slot": "dialog-title",
564
654
  className: cn("text-lg leading-none font-semibold", className),
565
655
  ...props
566
656
  }
@@ -573,6 +663,7 @@ function DialogDescription({
573
663
  return /* @__PURE__ */ jsx(
574
664
  Dialog.Description,
575
665
  {
666
+ "data-slot": "dialog-description",
576
667
  className: cn("text-muted-foreground text-sm", className),
577
668
  ...props
578
669
  }
@@ -582,6 +673,7 @@ function DialogBody({ className, children, ...props }) {
582
673
  return /* @__PURE__ */ jsx(
583
674
  "div",
584
675
  {
676
+ "data-slot": "dialog-body",
585
677
  className: cn("flex shrink-0 grow basis-0 flex-col items-start self-stretch", className),
586
678
  ...props,
587
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 })
@@ -598,28 +690,53 @@ function DropdownMenuTrigger({ ...props }) {
598
690
  return /* @__PURE__ */ jsx(Menu.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
599
691
  }
600
692
  function DropdownMenuContent({
601
- className,
693
+ align = "start",
694
+ alignOffset = 0,
695
+ side = "bottom",
602
696
  sideOffset = 4,
603
- positionerProps,
604
- children,
697
+ className,
605
698
  ...props
606
699
  }) {
607
- return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { sideOffset, ...positionerProps, children: /* @__PURE__ */ jsx(
608
- Menu.Popup,
700
+ return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(
701
+ Menu.Positioner,
609
702
  {
610
- "data-slot": "dropdown-menu-content",
611
- className: cn(
612
- "bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-border-border-edge-light z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl border p-1.5 shadow-xl",
613
- className
614
- ),
615
- ...props,
616
- children
703
+ className: "isolate z-50 outline-none",
704
+ align,
705
+ alignOffset,
706
+ side,
707
+ sideOffset,
708
+ children: /* @__PURE__ */ jsx(
709
+ Menu.Popup,
710
+ {
711
+ "data-slot": "dropdown-menu-content",
712
+ className: cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-white dark:ring-gray-700 bg-popover text-popover-foreground data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-xs p-1 shadow-xl ring-1 duration-100 outline-none data-closed:overflow-hidden", className),
713
+ ...props
714
+ }
715
+ )
617
716
  }
618
- ) }) });
717
+ ) });
619
718
  }
620
719
  function DropdownMenuGroup({ ...props }) {
621
720
  return /* @__PURE__ */ jsx(Menu.Group, { "data-slot": "dropdown-menu-group", ...props });
622
721
  }
722
+ function DropdownMenuLabel({
723
+ className,
724
+ inset,
725
+ ...props
726
+ }) {
727
+ return /* @__PURE__ */ jsx(
728
+ Menu.GroupLabel,
729
+ {
730
+ "data-slot": "dropdown-menu-label",
731
+ "data-inset": inset,
732
+ className: cn(
733
+ "text-muted-foreground px-2 py-1.5 text-xs font-medium data-inset:pl-8",
734
+ className
735
+ ),
736
+ ...props
737
+ }
738
+ );
739
+ }
623
740
  function DropdownMenuItem({
624
741
  className,
625
742
  inset,
@@ -633,9 +750,59 @@ function DropdownMenuItem({
633
750
  "data-inset": inset,
634
751
  "data-variant": variant,
635
752
  className: cn(
636
- "data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:text-destructive! [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-1.5 rounded-xs px-2 py-1.5 text-sm font-medium outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
753
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-xs px-2 py-1.5 text-sm font-medium outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
754
+ className
755
+ ),
756
+ ...props
757
+ }
758
+ );
759
+ }
760
+ function DropdownMenuSub({ ...props }) {
761
+ return /* @__PURE__ */ jsx(Menu.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
762
+ }
763
+ function DropdownMenuSubTrigger({
764
+ className,
765
+ inset,
766
+ children,
767
+ ...props
768
+ }) {
769
+ return /* @__PURE__ */ jsxs(
770
+ Menu.SubmenuTrigger,
771
+ {
772
+ "data-slot": "dropdown-menu-sub-trigger",
773
+ "data-inset": inset,
774
+ className: cn(
775
+ "focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-popup-open:bg-accent data-popup-open:text-accent-foreground flex cursor-default items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
637
776
  className
638
777
  ),
778
+ ...props,
779
+ children: [
780
+ children,
781
+ /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto" })
782
+ ]
783
+ }
784
+ );
785
+ }
786
+ function DropdownMenuSubContent({
787
+ align = "start",
788
+ alignOffset = -3,
789
+ side = "right",
790
+ sideOffset = 0,
791
+ className,
792
+ ...props
793
+ }) {
794
+ return /* @__PURE__ */ jsx(
795
+ DropdownMenuContent,
796
+ {
797
+ "data-slot": "dropdown-menu-sub-content",
798
+ className: cn(
799
+ "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-white dark:ring-gray-700 bg-popover text-popover-foreground w-auto min-w-[96px] rounded-sm p-1 shadow-lg ring-1 duration-100",
800
+ className
801
+ ),
802
+ align,
803
+ alignOffset,
804
+ side,
805
+ sideOffset,
639
806
  ...props
640
807
  }
641
808
  );
@@ -644,80 +811,79 @@ function DropdownMenuCheckboxItem({
644
811
  className,
645
812
  children,
646
813
  checked,
814
+ inset,
647
815
  ...props
648
816
  }) {
649
817
  return /* @__PURE__ */ jsxs(
650
818
  Menu.CheckboxItem,
651
819
  {
652
820
  "data-slot": "dropdown-menu-checkbox-item",
821
+ "data-inset": inset,
653
822
  className: cn(
654
- "data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
823
+ "focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
655
824
  className
656
825
  ),
657
826
  checked,
658
827
  ...props,
659
828
  children: [
660
- /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(
661
- Menu.CheckboxItemIndicator,
829
+ /* @__PURE__ */ jsx(
830
+ "span",
662
831
  {
663
- keepMounted: true,
664
- className: "transition data-checked:scale-100 data-checked:opacity-100 data-unchecked:scale-75 data-unchecked:opacity-0",
665
- children: /* @__PURE__ */ jsx(CheckCircle, { className: "size-4" })
832
+ className: "pointer-events-none absolute right-2 flex items-center justify-center",
833
+ "data-slot": "dropdown-menu-checkbox-item-indicator",
834
+ children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(
835
+ Check,
836
+ {}
837
+ ) })
666
838
  }
667
- ) }),
839
+ ),
668
840
  children
669
841
  ]
670
842
  }
671
843
  );
672
844
  }
673
845
  function DropdownMenuRadioGroup({ ...props }) {
674
- return /* @__PURE__ */ jsx(Menu.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props });
846
+ return /* @__PURE__ */ jsx(
847
+ Menu.RadioGroup,
848
+ {
849
+ "data-slot": "dropdown-menu-radio-group",
850
+ ...props
851
+ }
852
+ );
675
853
  }
676
854
  function DropdownMenuRadioItem({
677
855
  className,
678
856
  children,
857
+ inset,
679
858
  ...props
680
859
  }) {
681
860
  return /* @__PURE__ */ jsxs(
682
861
  Menu.RadioItem,
683
862
  {
684
863
  "data-slot": "dropdown-menu-radio-item",
864
+ "data-inset": inset,
685
865
  className: cn(
686
- "data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
866
+ "focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
687
867
  className
688
868
  ),
689
869
  ...props,
690
870
  children: [
691
- /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(
692
- Menu.RadioItemIndicator,
871
+ /* @__PURE__ */ jsx(
872
+ "span",
693
873
  {
694
- keepMounted: true,
695
- className: "transition data-checked:scale-100 data-checked:opacity-100 data-unchecked:scale-75 data-unchecked:opacity-0",
696
- children: /* @__PURE__ */ jsx(Circle, { className: "size-2 fill-current" })
874
+ className: "pointer-events-none absolute right-2 flex items-center justify-center",
875
+ "data-slot": "dropdown-menu-radio-item-indicator",
876
+ children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(
877
+ Check,
878
+ {}
879
+ ) })
697
880
  }
698
- ) }),
881
+ ),
699
882
  children
700
883
  ]
701
884
  }
702
885
  );
703
886
  }
704
- function DropdownMenuLabel({
705
- className,
706
- inset,
707
- children,
708
- ...props
709
- }) {
710
- return /* @__PURE__ */ jsx(
711
- Menu.GroupLabel,
712
- {
713
- "data-slot": "dropdown-menu-label",
714
- "data-inset": inset,
715
- className: cn("px-2 py-1.5 text-sm font-medium data-inset:pl-8", className),
716
- ...props,
717
- children
718
- }
719
- );
720
- }
721
887
  function DropdownMenuSeparator({
722
888
  className,
723
889
  ...props
@@ -731,62 +897,22 @@ function DropdownMenuSeparator({
731
897
  }
732
898
  );
733
899
  }
734
- function DropdownMenuShortcut({ className, ...props }) {
735
- return /* @__PURE__ */ jsx(
736
- "span",
737
- {
738
- "data-slot": "dropdown-menu-shortcut",
739
- className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
740
- ...props
741
- }
742
- );
743
- }
744
- function DropdownMenuSub({ ...props }) {
745
- return /* @__PURE__ */ jsx(Menu.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
746
- }
747
- function DropdownMenuSubTrigger({
900
+ function DropdownMenuShortcut({
748
901
  className,
749
- inset,
750
- children,
751
902
  ...props
752
903
  }) {
753
- return /* @__PURE__ */ jsxs(
754
- Menu.SubmenuTrigger,
904
+ return /* @__PURE__ */ jsx(
905
+ "span",
755
906
  {
756
- "data-slot": "dropdown-menu-sub-trigger",
757
- "data-inset": inset,
907
+ "data-slot": "dropdown-menu-shortcut",
758
908
  className: cn(
759
- "data-highlighted:bg-accent data-highlighted:text-accent-foreground data-popup-open:bg-accent data-popup-open:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-1.5 rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
909
+ "text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest",
760
910
  className
761
911
  ),
762
- ...props,
763
- children: [
764
- children,
765
- /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto size-4" })
766
- ]
912
+ ...props
767
913
  }
768
914
  );
769
915
  }
770
- function DropdownMenuSubContent({
771
- className,
772
- sideOffset = 4,
773
- positionerProps,
774
- children,
775
- ...props
776
- }) {
777
- return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, { sideOffset, ...positionerProps, children: /* @__PURE__ */ jsx(
778
- Menu.Popup,
779
- {
780
- "data-slot": "dropdown-menu-sub-content",
781
- className: cn(
782
- "bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 origin-(--transform-origin) overflow-hidden rounded-2xl border p-1 shadow-lg",
783
- className
784
- ),
785
- ...props,
786
- children
787
- }
788
- ) }) });
789
- }
790
916
  function Footer({
791
917
  theme = "template",
792
918
  logo,
@@ -978,7 +1104,7 @@ function Input({ className, type, ...props }) {
978
1104
  "data-slot": "input",
979
1105
  className: cn(
980
1106
  "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",
981
- "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
1107
+ "focus-visible:border-ring focus-visible:ring-ring focus-visible:ring-[3px]",
982
1108
  "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
983
1109
  className
984
1110
  ),
@@ -1050,37 +1176,59 @@ function NotificationBadge({
1050
1176
  });
1051
1177
  }
1052
1178
  var SectionFlourish = () => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center self-stretch py-8 text-xl", children: "\u2726" });
1053
- function TooltipProvider({ delay = 0, ...props }) {
1054
- return /* @__PURE__ */ jsx(Tooltip$1.Provider, { "data-slot": "tooltip-provider", delay, ...props });
1179
+ function TooltipProvider({
1180
+ delay = 0,
1181
+ ...props
1182
+ }) {
1183
+ return /* @__PURE__ */ jsx(
1184
+ Tooltip$1.Provider,
1185
+ {
1186
+ "data-slot": "tooltip-provider",
1187
+ delay,
1188
+ ...props
1189
+ }
1190
+ );
1055
1191
  }
1056
1192
  function Tooltip({ ...props }) {
1057
- return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(Tooltip$1.Root, { "data-slot": "tooltip", ...props }) });
1193
+ return /* @__PURE__ */ jsx(Tooltip$1.Root, { "data-slot": "tooltip", ...props });
1058
1194
  }
1059
1195
  function TooltipTrigger({ ...props }) {
1060
1196
  return /* @__PURE__ */ jsx(Tooltip$1.Trigger, { "data-slot": "tooltip-trigger", ...props });
1061
1197
  }
1062
1198
  function TooltipContent({
1063
1199
  className,
1200
+ side = "top",
1201
+ sideOffset = 4,
1202
+ align = "center",
1203
+ alignOffset = 0,
1064
1204
  children,
1065
- positionerProps,
1066
1205
  ...props
1067
1206
  }) {
1068
- return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, { ...positionerProps, className: "isolate z-50", children: /* @__PURE__ */ jsxs(
1069
- Tooltip$1.Popup,
1207
+ return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(
1208
+ Tooltip$1.Positioner,
1070
1209
  {
1071
- "data-slot": "tooltip-content",
1072
- className: cn(
1073
- "bg-foreground text-background z-50 w-fit max-w-xs origin-(--transform-origin) rounded-[8px] px-3 py-2 text-xs font-medium",
1074
- className
1075
- ),
1076
- ...props,
1077
- children: [
1078
- /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "flex data-[side=bottom]:-top-[6px] data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:rotate-0 data-[side=left]:right-[-13px] data-[side=left]:-translate-y-1/2 data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-translate-y-1/2 data-[side=right]:-rotate-90 data-[side=top]:-bottom-[6px] data-[side=top]:-translate-x-1/2 data-[side=top]:rotate-180", children: /* @__PURE__ */ jsx(TooltipArrow, {}) }),
1079
- children,
1080
- /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "cn-tooltip-arrow bg-foreground fill-foreground z-50 data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
1081
- ]
1210
+ align,
1211
+ alignOffset,
1212
+ side,
1213
+ sideOffset,
1214
+ className: "isolate z-50",
1215
+ children: /* @__PURE__ */ jsxs(
1216
+ Tooltip$1.Popup,
1217
+ {
1218
+ "data-slot": "tooltip-content",
1219
+ className: cn(
1220
+ "data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 bg-foreground text-background z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md px-3 py-1.5 text-xs",
1221
+ className
1222
+ ),
1223
+ ...props,
1224
+ children: [
1225
+ children,
1226
+ /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "flex data-[side=bottom]:-top-[6px] data-[side=bottom]:rotate-0 data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:-bottom-[6px] data-[side=top]:rotate-180", children: /* @__PURE__ */ jsx(TooltipArrow, {}) })
1227
+ ]
1228
+ }
1229
+ )
1082
1230
  }
1083
- ) }) });
1231
+ ) });
1084
1232
  }
1085
1233
  var TooltipArrow = (props) => {
1086
1234
  return /* @__PURE__ */ jsxs(
@@ -1165,16 +1313,8 @@ function SectionHeader({
1165
1313
  /* @__PURE__ */ jsx(
1166
1314
  TooltipContent,
1167
1315
  {
1168
- positionerProps: {
1169
- sideOffset: 2,
1170
- alignOffset: 5,
1171
- collisionAvoidance: {
1172
- side: "shift",
1173
- align: "shift",
1174
- fallbackAxisSide: "none"
1175
- },
1176
- collisionPadding: 16
1177
- },
1316
+ sideOffset: 2,
1317
+ alignOffset: 5,
1178
1318
  children: /* @__PURE__ */ jsx("p", { children: description })
1179
1319
  }
1180
1320
  )
@@ -1186,7 +1326,7 @@ function SectionHeader({
1186
1326
  }
1187
1327
  var tagVariants = cva(
1188
1328
  // Base styles
1189
- "inline-flex items-center justify-center rounded-full box-border relative transition-all duration-150 ease-in-out font-medium text-sm leading-5 text-center whitespace-nowrap appearance-none focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[rgba(21,94,239,0.6)] focus-visible:ring-offset-0",
1329
+ "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",
1190
1330
  {
1191
1331
  variants: {
1192
1332
  selected: {
@@ -1267,6 +1407,8 @@ function Tag({
1267
1407
  children,
1268
1408
  leading,
1269
1409
  trailing,
1410
+ interactive,
1411
+ type,
1270
1412
  onClick,
1271
1413
  className = ""
1272
1414
  }) {
@@ -1283,7 +1425,8 @@ function Tag({
1283
1425
  };
1284
1426
  const showLeading = leading && !collapsed;
1285
1427
  const showTrailing = trailing && !collapsed;
1286
- const TagElement = onClick ? "button" : "div";
1428
+ const isInteractive = interactive ?? typeof onClick === "function";
1429
+ const TagElement = isInteractive ? "button" : "div";
1287
1430
  return /* @__PURE__ */ jsxs(
1288
1431
  TagElement,
1289
1432
  {
@@ -1292,13 +1435,13 @@ function Tag({
1292
1435
  size,
1293
1436
  selected,
1294
1437
  collapsed,
1295
- interactive: !!onClick
1438
+ interactive: isInteractive
1296
1439
  }),
1297
1440
  className
1298
1441
  ),
1299
1442
  onClick: handleClick,
1300
1443
  onKeyDown: handleKeyDown,
1301
- type: onClick ? "button" : void 0,
1444
+ type: isInteractive ? type ?? "button" : void 0,
1302
1445
  children: [
1303
1446
  !collapsed && /* @__PURE__ */ jsxs(Fragment, { children: [
1304
1447
  showLeading && /* @__PURE__ */ jsx("div", { className: "flex h-5 w-5 shrink-0 items-center justify-center overflow-hidden text-inherit", children: leading }),
@@ -1311,6 +1454,6 @@ function Tag({
1311
1454
  );
1312
1455
  }
1313
1456
 
1314
- export { Button, ButtonLink, ContentBlock, DialogRoot as Dialog, DialogBackdrop, DialogBody, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, 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 };
1457
+ 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 };
1315
1458
  //# sourceMappingURL=index.js.map
1316
1459
  //# sourceMappingURL=index.js.map