@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,96 @@
|
|
|
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/badge/index.tsx
|
|
22
|
+
var badge_exports = {};
|
|
23
|
+
__export(badge_exports, {
|
|
24
|
+
Badge: () => Badge,
|
|
25
|
+
badgeVariants: () => badgeVariants
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(badge_exports);
|
|
28
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
29
|
+
|
|
30
|
+
// src/utils.ts
|
|
31
|
+
var import_clsx = require("clsx");
|
|
32
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
33
|
+
function cn(...inputs) {
|
|
34
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// src/badge/index.tsx
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
+
var badgeVariants = (0, import_class_variance_authority.cva)(
|
|
40
|
+
"inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors border select-none",
|
|
41
|
+
{
|
|
42
|
+
variants: {
|
|
43
|
+
variant: {
|
|
44
|
+
default: "border-transparent bg-primary/15 text-primary",
|
|
45
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
46
|
+
outline: "border-border text-foreground bg-transparent",
|
|
47
|
+
success: "border-transparent bg-emerald-500/15 text-emerald-500",
|
|
48
|
+
warning: "border-transparent bg-amber-500/15 text-amber-500",
|
|
49
|
+
destructive: "border-transparent bg-red-500/15 text-red-500",
|
|
50
|
+
info: "border-transparent bg-sky-500/15 text-sky-500"
|
|
51
|
+
},
|
|
52
|
+
size: {
|
|
53
|
+
sm: "px-2 py-px text-[10px]",
|
|
54
|
+
default: "px-2.5 py-0.5 text-xs",
|
|
55
|
+
lg: "px-3 py-1 text-sm"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
variant: "default",
|
|
60
|
+
size: "default"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
var dotColors = {
|
|
65
|
+
default: "bg-primary",
|
|
66
|
+
secondary: "bg-secondary-foreground",
|
|
67
|
+
outline: "bg-foreground",
|
|
68
|
+
success: "bg-emerald-500",
|
|
69
|
+
warning: "bg-amber-500",
|
|
70
|
+
destructive: "bg-red-500",
|
|
71
|
+
info: "bg-sky-500"
|
|
72
|
+
};
|
|
73
|
+
function Badge({
|
|
74
|
+
className,
|
|
75
|
+
variant = "default",
|
|
76
|
+
size,
|
|
77
|
+
dot,
|
|
78
|
+
children,
|
|
79
|
+
...props
|
|
80
|
+
}) {
|
|
81
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: cn(badgeVariants({ variant, size }), className), ...props, children: [
|
|
82
|
+
dot && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
|
+
"span",
|
|
84
|
+
{
|
|
85
|
+
"aria-hidden": true,
|
|
86
|
+
className: cn("inline-block size-1.5 rounded-full shrink-0", dotColors[variant ?? "default"])
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
children
|
|
90
|
+
] });
|
|
91
|
+
}
|
|
92
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
93
|
+
0 && (module.exports = {
|
|
94
|
+
Badge,
|
|
95
|
+
badgeVariants
|
|
96
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
4
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): React.JSX.Element;
|
|
5
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
6
|
+
interface BreadcrumbLinkProps extends React.ComponentProps<"a"> {
|
|
7
|
+
href: string;
|
|
8
|
+
/** Render via the consuming app's own link component (e.g. Next.js `Link`), same shape as AppShell's `renderLink`. */
|
|
9
|
+
renderLink?: (props: {
|
|
10
|
+
href: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}) => React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
declare function BreadcrumbLink({ className, href, renderLink, children, ...props }: BreadcrumbLinkProps): React.JSX.Element;
|
|
16
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
17
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
18
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">): React.JSX.Element;
|
|
4
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): React.JSX.Element;
|
|
5
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
6
|
+
interface BreadcrumbLinkProps extends React.ComponentProps<"a"> {
|
|
7
|
+
href: string;
|
|
8
|
+
/** Render via the consuming app's own link component (e.g. Next.js `Link`), same shape as AppShell's `renderLink`. */
|
|
9
|
+
renderLink?: (props: {
|
|
10
|
+
href: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}) => React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
declare function BreadcrumbLink({ className, href, renderLink, children, ...props }: BreadcrumbLinkProps): React.JSX.Element;
|
|
16
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
17
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
18
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -0,0 +1,126 @@
|
|
|
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/breadcrumb/index.tsx
|
|
22
|
+
var breadcrumb_exports = {};
|
|
23
|
+
__export(breadcrumb_exports, {
|
|
24
|
+
Breadcrumb: () => Breadcrumb,
|
|
25
|
+
BreadcrumbEllipsis: () => BreadcrumbEllipsis,
|
|
26
|
+
BreadcrumbItem: () => BreadcrumbItem,
|
|
27
|
+
BreadcrumbLink: () => BreadcrumbLink,
|
|
28
|
+
BreadcrumbList: () => BreadcrumbList,
|
|
29
|
+
BreadcrumbPage: () => BreadcrumbPage,
|
|
30
|
+
BreadcrumbSeparator: () => BreadcrumbSeparator
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(breadcrumb_exports);
|
|
33
|
+
var import_lucide_react = require("lucide-react");
|
|
34
|
+
|
|
35
|
+
// src/utils.ts
|
|
36
|
+
var import_clsx = require("clsx");
|
|
37
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
38
|
+
function cn(...inputs) {
|
|
39
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// src/breadcrumb/index.tsx
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
+
function Breadcrumb({ ...props }) {
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
46
|
+
}
|
|
47
|
+
function BreadcrumbList({ className, ...props }) {
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
49
|
+
"ol",
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "breadcrumb-list",
|
|
52
|
+
className: cn(
|
|
53
|
+
"flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground sm:gap-2.5",
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
62
|
+
"li",
|
|
63
|
+
{
|
|
64
|
+
"data-slot": "breadcrumb-item",
|
|
65
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
66
|
+
...props
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
function BreadcrumbLink({ className, href, renderLink, children, ...props }) {
|
|
71
|
+
const cls = cn("transition-colors hover:text-foreground", className);
|
|
72
|
+
if (renderLink) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: renderLink({ href, className: cls, children }) });
|
|
73
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { "data-slot": "breadcrumb-link", href, className: cls, ...props, children });
|
|
74
|
+
}
|
|
75
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
|
+
"span",
|
|
78
|
+
{
|
|
79
|
+
"data-slot": "breadcrumb-page",
|
|
80
|
+
role: "link",
|
|
81
|
+
"aria-disabled": "true",
|
|
82
|
+
"aria-current": "page",
|
|
83
|
+
className: cn("font-medium text-foreground", className),
|
|
84
|
+
...props
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
89
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
90
|
+
"li",
|
|
91
|
+
{
|
|
92
|
+
"data-slot": "breadcrumb-separator",
|
|
93
|
+
role: "presentation",
|
|
94
|
+
"aria-hidden": "true",
|
|
95
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
96
|
+
...props,
|
|
97
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronRight, {})
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
function BreadcrumbEllipsis({ className, ...props }) {
|
|
102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
103
|
+
"span",
|
|
104
|
+
{
|
|
105
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
106
|
+
role: "presentation",
|
|
107
|
+
"aria-hidden": "true",
|
|
108
|
+
className: cn("flex size-6 items-center justify-center", className),
|
|
109
|
+
...props,
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.MoreHorizontal, { className: "size-4" }),
|
|
112
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "More" })
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
118
|
+
0 && (module.exports = {
|
|
119
|
+
Breadcrumb,
|
|
120
|
+
BreadcrumbEllipsis,
|
|
121
|
+
BreadcrumbItem,
|
|
122
|
+
BreadcrumbLink,
|
|
123
|
+
BreadcrumbList,
|
|
124
|
+
BreadcrumbPage,
|
|
125
|
+
BreadcrumbSeparator
|
|
126
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Breadcrumb,
|
|
4
|
+
BreadcrumbEllipsis,
|
|
5
|
+
BreadcrumbItem,
|
|
6
|
+
BreadcrumbLink,
|
|
7
|
+
BreadcrumbList,
|
|
8
|
+
BreadcrumbPage,
|
|
9
|
+
BreadcrumbSeparator
|
|
10
|
+
} from "../chunk-GLD4KQD3.mjs";
|
|
11
|
+
import "../chunk-PJO7WJ4G.mjs";
|
|
12
|
+
export {
|
|
13
|
+
Breadcrumb,
|
|
14
|
+
BreadcrumbEllipsis,
|
|
15
|
+
BreadcrumbItem,
|
|
16
|
+
BreadcrumbLink,
|
|
17
|
+
BreadcrumbList,
|
|
18
|
+
BreadcrumbPage,
|
|
19
|
+
BreadcrumbSeparator
|
|
20
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import { Button as Button$1 } from '@base-ui/react/button';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const buttonVariants: (props?: ({
|
|
7
|
+
variant?: "link" | "default" | "secondary" | "outline" | "destructive" | "ghost" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | "lg" | "xs" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
declare function Button({ className, variant, size, ...props }: Button$1.Props & VariantProps<typeof buttonVariants>): React.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import { Button as Button$1 } from '@base-ui/react/button';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const buttonVariants: (props?: ({
|
|
7
|
+
variant?: "link" | "default" | "secondary" | "outline" | "destructive" | "ghost" | null | undefined;
|
|
8
|
+
size?: "default" | "sm" | "lg" | "xs" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
declare function Button({ className, variant, size, ...props }: Button$1.Props & VariantProps<typeof buttonVariants>): React.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,88 @@
|
|
|
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/button/index.tsx
|
|
22
|
+
var button_exports = {};
|
|
23
|
+
__export(button_exports, {
|
|
24
|
+
Button: () => Button,
|
|
25
|
+
buttonVariants: () => buttonVariants
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(button_exports);
|
|
28
|
+
var import_button = require("@base-ui/react/button");
|
|
29
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
30
|
+
|
|
31
|
+
// src/utils.ts
|
|
32
|
+
var import_clsx = require("clsx");
|
|
33
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
34
|
+
function cn(...inputs) {
|
|
35
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// src/button/index.tsx
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
41
|
+
"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",
|
|
42
|
+
{
|
|
43
|
+
variants: {
|
|
44
|
+
variant: {
|
|
45
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
46
|
+
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",
|
|
47
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
48
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
49
|
+
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",
|
|
50
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
51
|
+
},
|
|
52
|
+
size: {
|
|
53
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
54
|
+
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",
|
|
55
|
+
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",
|
|
56
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
57
|
+
icon: "size-8",
|
|
58
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
59
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
60
|
+
"icon-lg": "size-9"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
defaultVariants: {
|
|
64
|
+
variant: "default",
|
|
65
|
+
size: "default"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
function Button({
|
|
70
|
+
className,
|
|
71
|
+
variant = "default",
|
|
72
|
+
size = "default",
|
|
73
|
+
...props
|
|
74
|
+
}) {
|
|
75
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
76
|
+
import_button.Button,
|
|
77
|
+
{
|
|
78
|
+
"data-slot": "button",
|
|
79
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
80
|
+
...props
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
85
|
+
0 && (module.exports = {
|
|
86
|
+
Button,
|
|
87
|
+
buttonVariants
|
|
88
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type DateRange = {
|
|
4
|
+
from: Date | undefined;
|
|
5
|
+
to: Date | undefined;
|
|
6
|
+
};
|
|
7
|
+
interface CalendarBaseProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
month?: Date;
|
|
10
|
+
defaultMonth?: Date;
|
|
11
|
+
onMonthChange?: (month: Date) => void;
|
|
12
|
+
minDate?: Date;
|
|
13
|
+
maxDate?: Date;
|
|
14
|
+
disabled?: (date: Date) => boolean;
|
|
15
|
+
}
|
|
16
|
+
interface CalendarSingleProps extends CalendarBaseProps {
|
|
17
|
+
mode?: "single";
|
|
18
|
+
selected?: Date;
|
|
19
|
+
onSelect?: (date: Date | undefined) => void;
|
|
20
|
+
}
|
|
21
|
+
interface CalendarRangeProps extends CalendarBaseProps {
|
|
22
|
+
mode: "range";
|
|
23
|
+
selected?: DateRange;
|
|
24
|
+
onSelect?: (range: DateRange) => void;
|
|
25
|
+
}
|
|
26
|
+
type CalendarProps = CalendarSingleProps | CalendarRangeProps;
|
|
27
|
+
declare function Calendar(props: CalendarProps): React.JSX.Element;
|
|
28
|
+
|
|
29
|
+
export { Calendar, type CalendarProps, type CalendarRangeProps, type CalendarSingleProps, type DateRange };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type DateRange = {
|
|
4
|
+
from: Date | undefined;
|
|
5
|
+
to: Date | undefined;
|
|
6
|
+
};
|
|
7
|
+
interface CalendarBaseProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
month?: Date;
|
|
10
|
+
defaultMonth?: Date;
|
|
11
|
+
onMonthChange?: (month: Date) => void;
|
|
12
|
+
minDate?: Date;
|
|
13
|
+
maxDate?: Date;
|
|
14
|
+
disabled?: (date: Date) => boolean;
|
|
15
|
+
}
|
|
16
|
+
interface CalendarSingleProps extends CalendarBaseProps {
|
|
17
|
+
mode?: "single";
|
|
18
|
+
selected?: Date;
|
|
19
|
+
onSelect?: (date: Date | undefined) => void;
|
|
20
|
+
}
|
|
21
|
+
interface CalendarRangeProps extends CalendarBaseProps {
|
|
22
|
+
mode: "range";
|
|
23
|
+
selected?: DateRange;
|
|
24
|
+
onSelect?: (range: DateRange) => void;
|
|
25
|
+
}
|
|
26
|
+
type CalendarProps = CalendarSingleProps | CalendarRangeProps;
|
|
27
|
+
declare function Calendar(props: CalendarProps): React.JSX.Element;
|
|
28
|
+
|
|
29
|
+
export { Calendar, type CalendarProps, type CalendarRangeProps, type CalendarSingleProps, type DateRange };
|