@popgrids/ui 0.0.22 → 0.0.24

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/index.cjs CHANGED
@@ -5,8 +5,9 @@ var clsx = require('clsx');
5
5
  var tailwindMerge = require('tailwind-merge');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var button = require('@base-ui/react/button');
8
- var dialog = require('@base-ui/react/dialog');
8
+ var checkbox = require('@base-ui/react/checkbox');
9
9
  var icons = require('@untitledui/icons');
10
+ var dialog = require('@base-ui/react/dialog');
10
11
  var menu = require('@base-ui/react/menu');
11
12
  var input = require('@base-ui/react/input');
12
13
  var mergeProps = require('@base-ui/react/merge-props');
@@ -527,6 +528,27 @@ function ContentBlock({ className, children, title, subhead, cta }) {
527
528
  children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose prose-base max-w-(--width-xl) pb-3", children })
528
529
  ] });
529
530
  }
531
+ function Checkbox({ className, ...props }) {
532
+ return /* @__PURE__ */ jsxRuntime.jsx(
533
+ checkbox.Checkbox.Root,
534
+ {
535
+ "data-slot": "checkbox",
536
+ className: cn(
537
+ "border-foreground dark:bg-input/30 dark:data-checked:bg-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 data-disabled:cursor-not-allowed data-disabled:opacity-50 aria-invalid:ring-3 data-checked:border-foreground data-checked:bg-foreground data-checked:text-background",
538
+ className
539
+ ),
540
+ ...props,
541
+ children: /* @__PURE__ */ jsxRuntime.jsx(
542
+ checkbox.Checkbox.Indicator,
543
+ {
544
+ "data-slot": "checkbox-indicator",
545
+ className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
546
+ children: /* @__PURE__ */ jsxRuntime.jsx(icons.Check, {})
547
+ }
548
+ )
549
+ }
550
+ );
551
+ }
530
552
  function DialogRoot(props) {
531
553
  return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Root, { "data-slot": "dialog", ...props });
532
554
  }
@@ -588,17 +610,6 @@ function DialogContent({
588
610
  "data-slot": "dialog-content",
589
611
  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
612
  children: [
591
- showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
592
- DialogClose,
593
- {
594
- 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 }),
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
- }
601
- ),
602
613
  /* @__PURE__ */ jsxRuntime.jsx(
603
614
  "div",
604
615
  {
@@ -613,6 +624,17 @@ function DialogContent({
613
624
  ...props,
614
625
  children
615
626
  }
627
+ ),
628
+ showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
629
+ DialogClose,
630
+ {
631
+ 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 }),
632
+ "aria-label": "Close",
633
+ children: [
634
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" }),
635
+ /* @__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]" }) }) })
636
+ ]
637
+ }
616
638
  )
617
639
  ]
618
640
  }
@@ -1459,6 +1481,7 @@ function Tag({
1459
1481
  exports.BannerNotification = BannerNotification;
1460
1482
  exports.Button = Button;
1461
1483
  exports.ButtonLink = ButtonLink;
1484
+ exports.Checkbox = Checkbox;
1462
1485
  exports.ContentBlock = ContentBlock;
1463
1486
  exports.Dialog = DialogRoot;
1464
1487
  exports.DialogBody = DialogBody;