@krak-stack/notifications-admin 0.0.0-stage → 0.2.0

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.
@@ -0,0 +1,134 @@
1
+ // ../../src/components/ui/button.tsx
2
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
3
+ import { cva } from "class-variance-authority";
4
+
5
+ // ../../src/lib/utils.ts
6
+ import { cn } from "cn";
7
+
8
+ // ../../src/components/ui/button.tsx
9
+ import { jsx } from "react/jsx-runtime";
10
+ var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
11
+ variants: {
12
+ variant: {
13
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
14
+ outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
15
+ secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
16
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
17
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
18
+ link: "text-primary underline-offset-4 hover:underline"
19
+ },
20
+ size: {
21
+ default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
22
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
23
+ sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
24
+ lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
25
+ icon: "size-9",
26
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
27
+ "icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
28
+ "icon-lg": "size-10"
29
+ }
30
+ },
31
+ defaultVariants: {
32
+ variant: "default",
33
+ size: "default"
34
+ }
35
+ });
36
+ function Button({
37
+ className,
38
+ variant = "default",
39
+ size = "default",
40
+ ...props
41
+ }) {
42
+ return /* @__PURE__ */ jsx(ButtonPrimitive, {
43
+ "data-slot": "button",
44
+ className: cn(buttonVariants({ variant, size, className })),
45
+ ...props
46
+ });
47
+ }
48
+
49
+ // ../../src/components/ui/dialog.tsx
50
+ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
51
+ import { XIcon } from "lucide-react";
52
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
53
+ function Dialog({ ...props }) {
54
+ return /* @__PURE__ */ jsx2(DialogPrimitive.Root, {
55
+ "data-slot": "dialog",
56
+ ...props
57
+ });
58
+ }
59
+ function DialogPortal({ ...props }) {
60
+ return /* @__PURE__ */ jsx2(DialogPrimitive.Portal, {
61
+ "data-slot": "dialog-portal",
62
+ ...props
63
+ });
64
+ }
65
+ function DialogOverlay({
66
+ className,
67
+ ...props
68
+ }) {
69
+ return /* @__PURE__ */ jsx2(DialogPrimitive.Backdrop, {
70
+ "data-slot": "dialog-overlay",
71
+ className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
72
+ ...props
73
+ });
74
+ }
75
+ function DialogContent({
76
+ className,
77
+ children,
78
+ ...props
79
+ }) {
80
+ return /* @__PURE__ */ jsxs(DialogPortal, {
81
+ children: [
82
+ /* @__PURE__ */ jsx2(DialogOverlay, {}),
83
+ /* @__PURE__ */ jsxs(DialogPrimitive.Popup, {
84
+ "data-slot": "dialog-content",
85
+ className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
86
+ ...props,
87
+ children: [
88
+ children,
89
+ /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
90
+ className: "focus-visible:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:outline-none disabled:pointer-events-none",
91
+ children: [
92
+ /* @__PURE__ */ jsx2(XIcon, {
93
+ className: "size-4"
94
+ }),
95
+ /* @__PURE__ */ jsx2("span", {
96
+ className: "sr-only",
97
+ children: "Close"
98
+ })
99
+ ]
100
+ })
101
+ ]
102
+ })
103
+ ]
104
+ });
105
+ }
106
+ function DialogHeader({ className, ...props }) {
107
+ return /* @__PURE__ */ jsx2("div", {
108
+ "data-slot": "dialog-header",
109
+ className: cn("grid gap-1.5", className),
110
+ ...props
111
+ });
112
+ }
113
+ function DialogTitle({
114
+ className,
115
+ ...props
116
+ }) {
117
+ return /* @__PURE__ */ jsx2(DialogPrimitive.Title, {
118
+ "data-slot": "dialog-title",
119
+ className: cn("text-lg font-medium", className),
120
+ ...props
121
+ });
122
+ }
123
+ function DialogDescription({
124
+ className,
125
+ ...props
126
+ }) {
127
+ return /* @__PURE__ */ jsx2(DialogPrimitive.Description, {
128
+ "data-slot": "dialog-description",
129
+ className: cn("text-sm text-muted-foreground", className),
130
+ ...props
131
+ });
132
+ }
133
+
134
+ export { cn, Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription };