@web-my-money/primitives 1.0.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.
- package/dist/accordion/index.d.mts +9 -0
- package/dist/accordion/index.d.ts +9 -0
- package/dist/accordion/index.js +99 -0
- package/dist/accordion/index.mjs +14 -0
- package/dist/alert-dialog/index.d.mts +22 -0
- package/dist/alert-dialog/index.d.ts +22 -0
- package/dist/alert-dialog/index.js +206 -0
- package/dist/alert-dialog/index.mjs +29 -0
- package/dist/avatar/index.d.mts +23 -0
- package/dist/avatar/index.d.ts +23 -0
- package/dist/avatar/index.js +133 -0
- package/dist/avatar/index.mjs +10 -0
- package/dist/badge/index.d.mts +15 -0
- package/dist/badge/index.d.ts +15 -0
- package/dist/badge/index.js +96 -0
- package/dist/badge/index.mjs +10 -0
- package/dist/breadcrumb/index.d.mts +20 -0
- package/dist/breadcrumb/index.d.ts +20 -0
- package/dist/breadcrumb/index.js +126 -0
- package/dist/breadcrumb/index.mjs +20 -0
- package/dist/button/index.d.mts +12 -0
- package/dist/button/index.d.ts +12 -0
- package/dist/button/index.js +88 -0
- package/dist/button/index.mjs +10 -0
- package/dist/calendar/index.d.mts +29 -0
- package/dist/calendar/index.d.ts +29 -0
- package/dist/calendar/index.js +191 -0
- package/dist/calendar/index.mjs +9 -0
- package/dist/card/index.d.mts +13 -0
- package/dist/card/index.d.ts +13 -0
- package/dist/card/index.js +141 -0
- package/dist/card/index.mjs +19 -0
- package/dist/carousel/index.d.mts +20 -0
- package/dist/carousel/index.d.ts +20 -0
- package/dist/carousel/index.js +236 -0
- package/dist/carousel/index.mjs +19 -0
- package/dist/checkbox/index.d.mts +6 -0
- package/dist/checkbox/index.d.ts +6 -0
- package/dist/checkbox/index.js +63 -0
- package/dist/checkbox/index.mjs +8 -0
- package/dist/chunk-32LEHNCH.mjs +155 -0
- package/dist/chunk-3ZJ4L43B.mjs +92 -0
- package/dist/chunk-4KQNZMKT.mjs +47 -0
- package/dist/chunk-4W6U222X.mjs +113 -0
- package/dist/chunk-556SM2PJ.mjs +40 -0
- package/dist/chunk-5LYTCNI6.mjs +127 -0
- package/dist/chunk-5N7LGYZK.mjs +137 -0
- package/dist/chunk-6OG237U6.mjs +54 -0
- package/dist/chunk-7TMIJ7HZ.mjs +149 -0
- package/dist/chunk-DTENOVQN.mjs +44 -0
- package/dist/chunk-DUGW62XX.mjs +143 -0
- package/dist/chunk-DWLKKYIU.mjs +156 -0
- package/dist/chunk-DYCSGLM5.mjs +32 -0
- package/dist/chunk-DZPJV6MN.mjs +66 -0
- package/dist/chunk-FT72MNAV.mjs +25 -0
- package/dist/chunk-FV6JTZAK.mjs +30 -0
- package/dist/chunk-GLD4KQD3.mjs +90 -0
- package/dist/chunk-GWVW5OI6.mjs +106 -0
- package/dist/chunk-JWCA4M7E.mjs +160 -0
- package/dist/chunk-K4UYYX45.mjs +199 -0
- package/dist/chunk-KVQKOJNU.mjs +52 -0
- package/dist/chunk-LPMRBQLR.mjs +120 -0
- package/dist/chunk-M6HSM6GV.mjs +68 -0
- package/dist/chunk-NE5LEVMC.mjs +201 -0
- package/dist/chunk-NGWDLZ6E.mjs +33 -0
- package/dist/chunk-NH5ZVHAV.mjs +36 -0
- package/dist/chunk-PFXSPRVI.mjs +65 -0
- package/dist/chunk-PJO7WJ4G.mjs +10 -0
- package/dist/chunk-PTXZWR7Y.mjs +76 -0
- package/dist/chunk-SG747CBC.mjs +34 -0
- package/dist/chunk-UDQDW22Y.mjs +71 -0
- package/dist/chunk-UGOA6M4S.mjs +120 -0
- package/dist/chunk-UXU54FBX.mjs +63 -0
- package/dist/chunk-WYBX5VJ4.mjs +49 -0
- package/dist/chunk-Y7DNVOKO.mjs +57 -0
- package/dist/chunk-YNOS3JA2.mjs +29 -0
- package/dist/chunk-YPTARV3T.mjs +57 -0
- package/dist/chunk-YYFQVSPV.mjs +17 -0
- package/dist/chunk-ZR3J34NX.mjs +85 -0
- package/dist/collapsible/index.d.mts +8 -0
- package/dist/collapsible/index.d.ts +8 -0
- package/dist/collapsible/index.js +64 -0
- package/dist/collapsible/index.mjs +12 -0
- package/dist/combobox/index.d.mts +18 -0
- package/dist/combobox/index.d.ts +18 -0
- package/dist/combobox/index.js +198 -0
- package/dist/combobox/index.mjs +32 -0
- package/dist/context-menu/index.d.mts +16 -0
- package/dist/context-menu/index.d.ts +16 -0
- package/dist/context-menu/index.js +177 -0
- package/dist/context-menu/index.mjs +28 -0
- package/dist/date-range-input/index.d.mts +17 -0
- package/dist/date-range-input/index.d.ts +17 -0
- package/dist/date-range-input/index.js +284 -0
- package/dist/date-range-input/index.mjs +11 -0
- package/dist/dialog/index.d.mts +19 -0
- package/dist/dialog/index.d.ts +19 -0
- package/dist/dialog/index.js +240 -0
- package/dist/dialog/index.mjs +27 -0
- package/dist/dropdown-menu/index.d.mts +16 -0
- package/dist/dropdown-menu/index.d.ts +16 -0
- package/dist/dropdown-menu/index.js +189 -0
- package/dist/dropdown-menu/index.mjs +28 -0
- package/dist/field/index.d.mts +24 -0
- package/dist/field/index.d.ts +24 -0
- package/dist/field/index.js +88 -0
- package/dist/field/index.mjs +16 -0
- package/dist/hover-card/index.d.mts +8 -0
- package/dist/hover-card/index.d.ts +8 -0
- package/dist/hover-card/index.js +79 -0
- package/dist/hover-card/index.mjs +12 -0
- package/dist/index.d.mts +73 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.js +3167 -0
- package/dist/index.mjs +452 -0
- package/dist/input/index.d.mts +5 -0
- package/dist/input/index.d.ts +5 -0
- package/dist/input/index.js +54 -0
- package/dist/input/index.mjs +7 -0
- package/dist/kbd/index.d.mts +8 -0
- package/dist/kbd/index.d.ts +8 -0
- package/dist/kbd/index.js +64 -0
- package/dist/kbd/index.mjs +9 -0
- package/dist/lightbox/index.d.mts +17 -0
- package/dist/lightbox/index.d.ts +17 -0
- package/dist/lightbox/index.js +151 -0
- package/dist/lightbox/index.mjs +24 -0
- package/dist/pagination/index.d.mts +33 -0
- package/dist/pagination/index.d.ts +33 -0
- package/dist/pagination/index.js +212 -0
- package/dist/pagination/index.mjs +25 -0
- package/dist/popover/index.d.mts +11 -0
- package/dist/popover/index.d.ts +11 -0
- package/dist/popover/index.js +120 -0
- package/dist/popover/index.mjs +18 -0
- package/dist/progress/index.d.mts +6 -0
- package/dist/progress/index.d.ts +6 -0
- package/dist/progress/index.js +60 -0
- package/dist/progress/index.mjs +8 -0
- package/dist/radio-group/index.d.mts +8 -0
- package/dist/radio-group/index.d.ts +8 -0
- package/dist/radio-group/index.js +71 -0
- package/dist/radio-group/index.mjs +10 -0
- package/dist/resizable/index.d.mts +10 -0
- package/dist/resizable/index.d.ts +10 -0
- package/dist/resizable/index.js +80 -0
- package/dist/resizable/index.mjs +12 -0
- package/dist/scroll-area/index.d.mts +6 -0
- package/dist/scroll-area/index.d.ts +6 -0
- package/dist/scroll-area/index.js +74 -0
- package/dist/scroll-area/index.mjs +8 -0
- package/dist/select/index.d.mts +17 -0
- package/dist/select/index.d.ts +17 -0
- package/dist/select/index.js +238 -0
- package/dist/select/index.mjs +26 -0
- package/dist/separator/index.d.mts +6 -0
- package/dist/separator/index.d.ts +6 -0
- package/dist/separator/index.js +59 -0
- package/dist/separator/index.mjs +8 -0
- package/dist/sheet/index.d.mts +38 -0
- package/dist/sheet/index.d.ts +38 -0
- package/dist/sheet/index.js +212 -0
- package/dist/sheet/index.mjs +27 -0
- package/dist/skeleton/index.d.mts +17 -0
- package/dist/skeleton/index.d.ts +17 -0
- package/dist/skeleton/index.js +80 -0
- package/dist/skeleton/index.mjs +11 -0
- package/dist/slide-over/index.d.mts +92 -0
- package/dist/slide-over/index.d.ts +92 -0
- package/dist/slide-over/index.js +298 -0
- package/dist/slide-over/index.mjs +31 -0
- package/dist/slider/index.d.mts +6 -0
- package/dist/slider/index.d.ts +6 -0
- package/dist/slider/index.js +47 -0
- package/dist/slider/index.mjs +8 -0
- package/dist/switch/index.d.mts +8 -0
- package/dist/switch/index.d.ts +8 -0
- package/dist/switch/index.js +66 -0
- package/dist/switch/index.mjs +8 -0
- package/dist/tabs/index.d.mts +9 -0
- package/dist/tabs/index.d.ts +9 -0
- package/dist/tabs/index.js +96 -0
- package/dist/tabs/index.mjs +14 -0
- package/dist/toast/index.d.mts +19 -0
- package/dist/toast/index.d.ts +19 -0
- package/dist/toast/index.js +107 -0
- package/dist/toast/index.mjs +10 -0
- package/dist/toggle/index.d.mts +14 -0
- package/dist/toggle/index.d.ts +14 -0
- package/dist/toggle/index.js +89 -0
- package/dist/toggle/index.mjs +12 -0
- package/dist/tooltip/index.d.mts +9 -0
- package/dist/tooltip/index.d.ts +9 -0
- package/dist/tooltip/index.js +101 -0
- package/dist/tooltip/index.mjs +14 -0
- package/package.json +235 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/lightbox/index.tsx
|
|
22
|
+
var lightbox_exports = {};
|
|
23
|
+
__export(lightbox_exports, {
|
|
24
|
+
Lightbox: () => Lightbox,
|
|
25
|
+
LightboxCaption: () => LightboxCaption,
|
|
26
|
+
LightboxClose: () => LightboxClose,
|
|
27
|
+
LightboxContent: () => LightboxContent,
|
|
28
|
+
LightboxImage: () => LightboxImage,
|
|
29
|
+
LightboxNavButton: () => LightboxNavButton,
|
|
30
|
+
LightboxOverlay: () => LightboxOverlay,
|
|
31
|
+
LightboxPortal: () => LightboxPortal,
|
|
32
|
+
LightboxTrigger: () => LightboxTrigger
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(lightbox_exports);
|
|
35
|
+
var import_dialog = require("@base-ui/react/dialog");
|
|
36
|
+
var import_lucide_react = require("lucide-react");
|
|
37
|
+
|
|
38
|
+
// src/utils.ts
|
|
39
|
+
var import_clsx = require("clsx");
|
|
40
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
41
|
+
function cn(...inputs) {
|
|
42
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// src/lightbox/index.tsx
|
|
46
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
47
|
+
function Lightbox({ ...props }) {
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Root, { "data-slot": "lightbox", ...props });
|
|
49
|
+
}
|
|
50
|
+
function LightboxTrigger({ ...props }) {
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "lightbox-trigger", ...props });
|
|
52
|
+
}
|
|
53
|
+
function LightboxPortal({ ...props }) {
|
|
54
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Portal, { "data-slot": "lightbox-portal", ...props });
|
|
55
|
+
}
|
|
56
|
+
function LightboxClose({ ...props }) {
|
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Close, { "data-slot": "lightbox-close", ...props });
|
|
58
|
+
}
|
|
59
|
+
function LightboxOverlay({ className, ...props }) {
|
|
60
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
|
+
import_dialog.Dialog.Backdrop,
|
|
62
|
+
{
|
|
63
|
+
"data-slot": "lightbox-overlay",
|
|
64
|
+
className: cn(
|
|
65
|
+
"fixed inset-0 z-50 bg-black/90 duration-150 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
66
|
+
className
|
|
67
|
+
),
|
|
68
|
+
...props
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
function LightboxContent({ className, children, ...props }) {
|
|
73
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LightboxPortal, { children: [
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(LightboxOverlay, {}),
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
76
|
+
import_dialog.Dialog.Popup,
|
|
77
|
+
{
|
|
78
|
+
"data-slot": "lightbox-content",
|
|
79
|
+
className: cn(
|
|
80
|
+
"fixed inset-0 z-50 flex flex-col items-center justify-center gap-4 p-4 outline-none duration-150 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",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
...props,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
86
|
+
LightboxClose,
|
|
87
|
+
{
|
|
88
|
+
"aria-label": "Close",
|
|
89
|
+
className: "absolute right-4 top-4 z-10 inline-flex size-9 items-center justify-center rounded-full bg-white/10 text-white outline-none transition-colors hover:bg-white/20",
|
|
90
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "size-5" })
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
children
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
] });
|
|
98
|
+
}
|
|
99
|
+
function LightboxImage({ className, alt = "", ...props }) {
|
|
100
|
+
return (
|
|
101
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
102
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
103
|
+
"img",
|
|
104
|
+
{
|
|
105
|
+
"data-slot": "lightbox-image",
|
|
106
|
+
alt,
|
|
107
|
+
className: cn("max-h-[85vh] max-w-full rounded-md object-contain", className),
|
|
108
|
+
...props
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
function LightboxNavButton({ direction, className, ...props }) {
|
|
114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
115
|
+
"button",
|
|
116
|
+
{
|
|
117
|
+
type: "button",
|
|
118
|
+
"data-slot": `lightbox-${direction}`,
|
|
119
|
+
"aria-label": direction === "prev" ? "Previous image" : "Next image",
|
|
120
|
+
className: cn(
|
|
121
|
+
"absolute top-1/2 z-10 inline-flex size-10 -translate-y-1/2 items-center justify-center rounded-full bg-white/10 text-white outline-none transition-colors hover:bg-white/20 disabled:pointer-events-none disabled:opacity-30",
|
|
122
|
+
direction === "prev" ? "left-2 sm:left-4" : "right-2 sm:right-4",
|
|
123
|
+
className
|
|
124
|
+
),
|
|
125
|
+
...props,
|
|
126
|
+
children: direction === "prev" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronLeft, { className: "size-5" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronRight, { className: "size-5" })
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
function LightboxCaption({ className, ...props }) {
|
|
131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
132
|
+
"p",
|
|
133
|
+
{
|
|
134
|
+
"data-slot": "lightbox-caption",
|
|
135
|
+
className: cn("text-center text-sm text-white/80", className),
|
|
136
|
+
...props
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
141
|
+
0 && (module.exports = {
|
|
142
|
+
Lightbox,
|
|
143
|
+
LightboxCaption,
|
|
144
|
+
LightboxClose,
|
|
145
|
+
LightboxContent,
|
|
146
|
+
LightboxImage,
|
|
147
|
+
LightboxNavButton,
|
|
148
|
+
LightboxOverlay,
|
|
149
|
+
LightboxPortal,
|
|
150
|
+
LightboxTrigger
|
|
151
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Lightbox,
|
|
4
|
+
LightboxCaption,
|
|
5
|
+
LightboxClose,
|
|
6
|
+
LightboxContent,
|
|
7
|
+
LightboxImage,
|
|
8
|
+
LightboxNavButton,
|
|
9
|
+
LightboxOverlay,
|
|
10
|
+
LightboxPortal,
|
|
11
|
+
LightboxTrigger
|
|
12
|
+
} from "../chunk-4W6U222X.mjs";
|
|
13
|
+
import "../chunk-PJO7WJ4G.mjs";
|
|
14
|
+
export {
|
|
15
|
+
Lightbox,
|
|
16
|
+
LightboxCaption,
|
|
17
|
+
LightboxClose,
|
|
18
|
+
LightboxContent,
|
|
19
|
+
LightboxImage,
|
|
20
|
+
LightboxNavButton,
|
|
21
|
+
LightboxOverlay,
|
|
22
|
+
LightboxPortal,
|
|
23
|
+
LightboxTrigger
|
|
24
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { buttonVariants } from '../button/index.mjs';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import 'class-variance-authority/types';
|
|
5
|
+
import '@base-ui/react/button';
|
|
6
|
+
|
|
7
|
+
declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
8
|
+
declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
9
|
+
declare function PaginationItem({ ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
10
|
+
interface PaginationLinkProps extends React.ComponentProps<"button"> {
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
size?: VariantProps<typeof buttonVariants>["size"];
|
|
13
|
+
}
|
|
14
|
+
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): React.JSX.Element;
|
|
15
|
+
declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
|
|
16
|
+
declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
|
|
17
|
+
declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
18
|
+
/** Computes which page numbers/ellipses to render for a given page count, mirroring the common
|
|
19
|
+
* shadcn/ui recipe: always show first, last, current, and one neighbor on each side. */
|
|
20
|
+
declare function getPaginationRange(page: number, pageCount: number, siblingCount?: number): (number | "ellipsis")[];
|
|
21
|
+
interface PaginationBarProps {
|
|
22
|
+
/** 1-indexed current page. */
|
|
23
|
+
page: number;
|
|
24
|
+
pageCount: number;
|
|
25
|
+
onPageChange: (page: number) => void;
|
|
26
|
+
siblingCount?: number;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Batteries-included pager built from the parts above — pass page/pageCount/onPageChange and get
|
|
30
|
+
* prev/next + numbered pages with ellipses. Use the individual parts directly for a custom layout. */
|
|
31
|
+
declare function PaginationBar({ page, pageCount, onPageChange, siblingCount, className }: PaginationBarProps): React.JSX.Element | null;
|
|
32
|
+
|
|
33
|
+
export { Pagination, PaginationBar, type PaginationBarProps, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, getPaginationRange };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { buttonVariants } from '../button/index.js';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import 'class-variance-authority/types';
|
|
5
|
+
import '@base-ui/react/button';
|
|
6
|
+
|
|
7
|
+
declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
8
|
+
declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
9
|
+
declare function PaginationItem({ ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
10
|
+
interface PaginationLinkProps extends React.ComponentProps<"button"> {
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
size?: VariantProps<typeof buttonVariants>["size"];
|
|
13
|
+
}
|
|
14
|
+
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): React.JSX.Element;
|
|
15
|
+
declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
|
|
16
|
+
declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
|
|
17
|
+
declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
18
|
+
/** Computes which page numbers/ellipses to render for a given page count, mirroring the common
|
|
19
|
+
* shadcn/ui recipe: always show first, last, current, and one neighbor on each side. */
|
|
20
|
+
declare function getPaginationRange(page: number, pageCount: number, siblingCount?: number): (number | "ellipsis")[];
|
|
21
|
+
interface PaginationBarProps {
|
|
22
|
+
/** 1-indexed current page. */
|
|
23
|
+
page: number;
|
|
24
|
+
pageCount: number;
|
|
25
|
+
onPageChange: (page: number) => void;
|
|
26
|
+
siblingCount?: number;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Batteries-included pager built from the parts above — pass page/pageCount/onPageChange and get
|
|
30
|
+
* prev/next + numbered pages with ellipses. Use the individual parts directly for a custom layout. */
|
|
31
|
+
declare function PaginationBar({ page, pageCount, onPageChange, siblingCount, className }: PaginationBarProps): React.JSX.Element | null;
|
|
32
|
+
|
|
33
|
+
export { Pagination, PaginationBar, type PaginationBarProps, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, getPaginationRange };
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/pagination/index.tsx
|
|
22
|
+
var pagination_exports = {};
|
|
23
|
+
__export(pagination_exports, {
|
|
24
|
+
Pagination: () => Pagination,
|
|
25
|
+
PaginationBar: () => PaginationBar,
|
|
26
|
+
PaginationContent: () => PaginationContent,
|
|
27
|
+
PaginationEllipsis: () => PaginationEllipsis,
|
|
28
|
+
PaginationItem: () => PaginationItem,
|
|
29
|
+
PaginationLink: () => PaginationLink,
|
|
30
|
+
PaginationNext: () => PaginationNext,
|
|
31
|
+
PaginationPrevious: () => PaginationPrevious,
|
|
32
|
+
getPaginationRange: () => getPaginationRange
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pagination_exports);
|
|
35
|
+
var import_lucide_react = require("lucide-react");
|
|
36
|
+
|
|
37
|
+
// src/utils.ts
|
|
38
|
+
var import_clsx = require("clsx");
|
|
39
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
40
|
+
function cn(...inputs) {
|
|
41
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// src/button/index.tsx
|
|
45
|
+
var import_button = require("@base-ui/react/button");
|
|
46
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
47
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
48
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
49
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg 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",
|
|
50
|
+
{
|
|
51
|
+
variants: {
|
|
52
|
+
variant: {
|
|
53
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
54
|
+
outline: "border-border bg-background 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",
|
|
55
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
56
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
57
|
+
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",
|
|
58
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
59
|
+
},
|
|
60
|
+
size: {
|
|
61
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
62
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
63
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
64
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
65
|
+
icon: "size-8",
|
|
66
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
67
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
68
|
+
"icon-lg": "size-9"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
defaultVariants: {
|
|
72
|
+
variant: "default",
|
|
73
|
+
size: "default"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
// src/pagination/index.tsx
|
|
79
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
80
|
+
function Pagination({ className, ...props }) {
|
|
81
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
82
|
+
"nav",
|
|
83
|
+
{
|
|
84
|
+
"aria-label": "pagination",
|
|
85
|
+
"data-slot": "pagination",
|
|
86
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
87
|
+
...props
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
function PaginationContent({ className, ...props }) {
|
|
92
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
93
|
+
"ul",
|
|
94
|
+
{
|
|
95
|
+
"data-slot": "pagination-content",
|
|
96
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
97
|
+
...props
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
function PaginationItem({ ...props }) {
|
|
102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
103
|
+
}
|
|
104
|
+
function PaginationLink({ className, isActive, size = "icon-sm", ...props }) {
|
|
105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
106
|
+
"button",
|
|
107
|
+
{
|
|
108
|
+
type: "button",
|
|
109
|
+
"data-slot": "pagination-link",
|
|
110
|
+
"data-active": isActive,
|
|
111
|
+
"aria-current": isActive ? "page" : void 0,
|
|
112
|
+
className: cn(buttonVariants({ variant: isActive ? "outline" : "ghost", size }), className),
|
|
113
|
+
...props
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
function PaginationPrevious({ className, ...props }) {
|
|
118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
119
|
+
PaginationLink,
|
|
120
|
+
{
|
|
121
|
+
"aria-label": "Go to previous page",
|
|
122
|
+
size: "default",
|
|
123
|
+
className: cn("gap-1 px-2.5", className),
|
|
124
|
+
...props,
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.ChevronLeft, { className: "size-4" }),
|
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "hidden sm:inline", children: "Previous" })
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
function PaginationNext({ className, ...props }) {
|
|
133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
134
|
+
PaginationLink,
|
|
135
|
+
{
|
|
136
|
+
"aria-label": "Go to next page",
|
|
137
|
+
size: "default",
|
|
138
|
+
className: cn("gap-1 px-2.5", className),
|
|
139
|
+
...props,
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "hidden sm:inline", children: "Next" }),
|
|
142
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.ChevronRight, { className: "size-4" })
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
function PaginationEllipsis({ className, ...props }) {
|
|
148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
149
|
+
"span",
|
|
150
|
+
{
|
|
151
|
+
"aria-hidden": true,
|
|
152
|
+
"data-slot": "pagination-ellipsis",
|
|
153
|
+
className: cn("flex size-8 items-center justify-center", className),
|
|
154
|
+
...props,
|
|
155
|
+
children: [
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.MoreHorizontal, { className: "size-4" }),
|
|
157
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
function getPaginationRange(page, pageCount, siblingCount = 1) {
|
|
163
|
+
const totalSlots = siblingCount * 2 + 5;
|
|
164
|
+
if (pageCount <= totalSlots) return Array.from({ length: pageCount }, (_, i) => i + 1);
|
|
165
|
+
const leftSibling = Math.max(page - siblingCount, 1);
|
|
166
|
+
const rightSibling = Math.min(page + siblingCount, pageCount);
|
|
167
|
+
const showLeftEllipsis = leftSibling > 2;
|
|
168
|
+
const showRightEllipsis = rightSibling < pageCount - 1;
|
|
169
|
+
const range = [1];
|
|
170
|
+
if (showLeftEllipsis) range.push("ellipsis");
|
|
171
|
+
for (let i = leftSibling === 1 ? 2 : leftSibling; i <= (rightSibling === pageCount ? pageCount - 1 : rightSibling); i++) {
|
|
172
|
+
if (i > 1 && i < pageCount) range.push(i);
|
|
173
|
+
}
|
|
174
|
+
if (showRightEllipsis) range.push("ellipsis");
|
|
175
|
+
range.push(pageCount);
|
|
176
|
+
return range;
|
|
177
|
+
}
|
|
178
|
+
function PaginationBar({ page, pageCount, onPageChange, siblingCount, className }) {
|
|
179
|
+
if (pageCount <= 1) return null;
|
|
180
|
+
const range = getPaginationRange(page, pageCount, siblingCount);
|
|
181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Pagination, { className, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(PaginationContent, { children: [
|
|
182
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
183
|
+
PaginationPrevious,
|
|
184
|
+
{
|
|
185
|
+
disabled: page <= 1,
|
|
186
|
+
onClick: () => onPageChange(page - 1)
|
|
187
|
+
}
|
|
188
|
+
) }),
|
|
189
|
+
range.map(
|
|
190
|
+
(p, i) => p === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationEllipsis, {}) }, `ellipsis-${i}`) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationLink, { isActive: p === page, onClick: () => onPageChange(p), children: p }) }, p)
|
|
191
|
+
),
|
|
192
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
193
|
+
PaginationNext,
|
|
194
|
+
{
|
|
195
|
+
disabled: page >= pageCount,
|
|
196
|
+
onClick: () => onPageChange(page + 1)
|
|
197
|
+
}
|
|
198
|
+
) })
|
|
199
|
+
] }) });
|
|
200
|
+
}
|
|
201
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
202
|
+
0 && (module.exports = {
|
|
203
|
+
Pagination,
|
|
204
|
+
PaginationBar,
|
|
205
|
+
PaginationContent,
|
|
206
|
+
PaginationEllipsis,
|
|
207
|
+
PaginationItem,
|
|
208
|
+
PaginationLink,
|
|
209
|
+
PaginationNext,
|
|
210
|
+
PaginationPrevious,
|
|
211
|
+
getPaginationRange
|
|
212
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Pagination,
|
|
4
|
+
PaginationBar,
|
|
5
|
+
PaginationContent,
|
|
6
|
+
PaginationEllipsis,
|
|
7
|
+
PaginationItem,
|
|
8
|
+
PaginationLink,
|
|
9
|
+
PaginationNext,
|
|
10
|
+
PaginationPrevious,
|
|
11
|
+
getPaginationRange
|
|
12
|
+
} from "../chunk-DUGW62XX.mjs";
|
|
13
|
+
import "../chunk-YPTARV3T.mjs";
|
|
14
|
+
import "../chunk-PJO7WJ4G.mjs";
|
|
15
|
+
export {
|
|
16
|
+
Pagination,
|
|
17
|
+
PaginationBar,
|
|
18
|
+
PaginationContent,
|
|
19
|
+
PaginationEllipsis,
|
|
20
|
+
PaginationItem,
|
|
21
|
+
PaginationLink,
|
|
22
|
+
PaginationNext,
|
|
23
|
+
PaginationPrevious,
|
|
24
|
+
getPaginationRange
|
|
25
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
3
|
+
|
|
4
|
+
declare function Popover({ ...props }: Popover$1.Root.Props): React.JSX.Element;
|
|
5
|
+
declare function PopoverTrigger({ ...props }: Popover$1.Trigger.Props): React.JSX.Element;
|
|
6
|
+
declare function PopoverContent({ className, align, alignOffset, side, sideOffset, ...props }: Popover$1.Popup.Props & Pick<Popover$1.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
|
|
7
|
+
declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function PopoverTitle({ className, ...props }: Popover$1.Title.Props): React.JSX.Element;
|
|
9
|
+
declare function PopoverDescription({ className, ...props }: Popover$1.Description.Props): React.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Popover as Popover$1 } from '@base-ui/react/popover';
|
|
3
|
+
|
|
4
|
+
declare function Popover({ ...props }: Popover$1.Root.Props): React.JSX.Element;
|
|
5
|
+
declare function PopoverTrigger({ ...props }: Popover$1.Trigger.Props): React.JSX.Element;
|
|
6
|
+
declare function PopoverContent({ className, align, alignOffset, side, sideOffset, ...props }: Popover$1.Popup.Props & Pick<Popover$1.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
|
|
7
|
+
declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function PopoverTitle({ className, ...props }: Popover$1.Title.Props): React.JSX.Element;
|
|
9
|
+
declare function PopoverDescription({ className, ...props }: Popover$1.Description.Props): React.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/popover/index.tsx
|
|
22
|
+
var popover_exports = {};
|
|
23
|
+
__export(popover_exports, {
|
|
24
|
+
Popover: () => Popover,
|
|
25
|
+
PopoverContent: () => PopoverContent,
|
|
26
|
+
PopoverDescription: () => PopoverDescription,
|
|
27
|
+
PopoverHeader: () => PopoverHeader,
|
|
28
|
+
PopoverTitle: () => PopoverTitle,
|
|
29
|
+
PopoverTrigger: () => PopoverTrigger
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(popover_exports);
|
|
32
|
+
var import_popover = require("@base-ui/react/popover");
|
|
33
|
+
|
|
34
|
+
// src/utils.ts
|
|
35
|
+
var import_clsx = require("clsx");
|
|
36
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
37
|
+
function cn(...inputs) {
|
|
38
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// src/popover/index.tsx
|
|
42
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
+
function Popover({ ...props }) {
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popover.Popover.Root, { "data-slot": "popover", ...props });
|
|
45
|
+
}
|
|
46
|
+
function PopoverTrigger({ ...props }) {
|
|
47
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popover.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
48
|
+
}
|
|
49
|
+
function PopoverContent({
|
|
50
|
+
className,
|
|
51
|
+
align = "center",
|
|
52
|
+
alignOffset = 0,
|
|
53
|
+
side = "bottom",
|
|
54
|
+
sideOffset = 4,
|
|
55
|
+
...props
|
|
56
|
+
}) {
|
|
57
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
+
import_popover.Popover.Positioner,
|
|
59
|
+
{
|
|
60
|
+
align,
|
|
61
|
+
alignOffset,
|
|
62
|
+
side,
|
|
63
|
+
sideOffset,
|
|
64
|
+
className: "isolate z-50",
|
|
65
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
|
+
import_popover.Popover.Popup,
|
|
67
|
+
{
|
|
68
|
+
"data-slot": "popover-content",
|
|
69
|
+
className: cn(
|
|
70
|
+
"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-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",
|
|
71
|
+
className
|
|
72
|
+
),
|
|
73
|
+
...props
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
) });
|
|
78
|
+
}
|
|
79
|
+
function PopoverHeader({ className, ...props }) {
|
|
80
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
"data-slot": "popover-header",
|
|
84
|
+
className: cn("flex flex-col gap-0.5 text-sm", className),
|
|
85
|
+
...props
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
function PopoverTitle({ className, ...props }) {
|
|
90
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
91
|
+
import_popover.Popover.Title,
|
|
92
|
+
{
|
|
93
|
+
"data-slot": "popover-title",
|
|
94
|
+
className: cn("font-heading font-medium", className),
|
|
95
|
+
...props
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function PopoverDescription({
|
|
100
|
+
className,
|
|
101
|
+
...props
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
104
|
+
import_popover.Popover.Description,
|
|
105
|
+
{
|
|
106
|
+
"data-slot": "popover-description",
|
|
107
|
+
className: cn("text-muted-foreground", className),
|
|
108
|
+
...props
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
113
|
+
0 && (module.exports = {
|
|
114
|
+
Popover,
|
|
115
|
+
PopoverContent,
|
|
116
|
+
PopoverDescription,
|
|
117
|
+
PopoverHeader,
|
|
118
|
+
PopoverTitle,
|
|
119
|
+
PopoverTrigger
|
|
120
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Popover,
|
|
4
|
+
PopoverContent,
|
|
5
|
+
PopoverDescription,
|
|
6
|
+
PopoverHeader,
|
|
7
|
+
PopoverTitle,
|
|
8
|
+
PopoverTrigger
|
|
9
|
+
} from "../chunk-ZR3J34NX.mjs";
|
|
10
|
+
import "../chunk-PJO7WJ4G.mjs";
|
|
11
|
+
export {
|
|
12
|
+
Popover,
|
|
13
|
+
PopoverContent,
|
|
14
|
+
PopoverDescription,
|
|
15
|
+
PopoverHeader,
|
|
16
|
+
PopoverTitle,
|
|
17
|
+
PopoverTrigger
|
|
18
|
+
};
|