ikoncomponents 1.1.8 → 1.1.9
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/ikoncomponents/alert-dialog/dialog-context.d.ts +21 -0
- package/dist/ikoncomponents/alert-dialog/dialog-context.js +30 -0
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.d.ts +16 -0
- package/dist/ikoncomponents/app-breadcrumb/BreadcrumbProvider.js +32 -0
- package/dist/ikoncomponents/app-breadcrumb/index.d.ts +5 -0
- package/dist/ikoncomponents/app-breadcrumb/index.js +57 -0
- package/dist/ikoncomponents/form-fields/combobox-input/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/combobox-input/index.js +21 -0
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.d.ts +18 -0
- package/dist/ikoncomponents/form-fields/combobox-input-value/index.js +25 -0
- package/dist/ikoncomponents/form-fields/date-input/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/date-input/index.js +15 -0
- package/dist/ikoncomponents/form-fields/file-input/index.d.ts +1 -0
- package/dist/ikoncomponents/form-fields/file-input/index.js +4 -0
- package/dist/ikoncomponents/form-fields/input/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/input/index.js +18 -0
- package/dist/ikoncomponents/form-fields/multi-combobox-input/index.d.ts +6 -0
- package/dist/ikoncomponents/form-fields/multi-combobox-input/index.js +381 -0
- package/dist/ikoncomponents/form-fields/otp-input/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/otp-input/index.js +18 -0
- package/dist/ikoncomponents/form-fields/phone-input/index.d.ts +1 -0
- package/dist/ikoncomponents/form-fields/phone-input/index.js +4 -0
- package/dist/ikoncomponents/form-fields/textarea/index.d.ts +2 -0
- package/dist/ikoncomponents/form-fields/textarea/index.js +18 -0
- package/dist/ikoncomponents/form-fields/types/index.d.ts +36 -0
- package/dist/ikoncomponents/form-fields/types/index.js +1 -0
- package/dist/ikoncomponents/main-layout/SidebarNavContext.d.ts +27 -0
- package/dist/ikoncomponents/main-layout/SidebarNavContext.js +40 -0
- package/dist/ikoncomponents/main-layout/app-sidebar.d.ts +3 -0
- package/dist/ikoncomponents/main-layout/app-sidebar.js +19 -0
- package/dist/ikoncomponents/main-layout/footer.d.ts +1 -0
- package/dist/ikoncomponents/main-layout/footer.js +4 -0
- package/dist/ikoncomponents/main-layout/header.d.ts +1 -0
- package/dist/ikoncomponents/main-layout/header.js +10 -0
- package/dist/ikoncomponents/main-layout/index.d.ts +5 -0
- package/dist/ikoncomponents/main-layout/index.js +11 -0
- package/dist/ikoncomponents/main-layout/main-sidebar.d.ts +27 -0
- package/dist/ikoncomponents/main-layout/main-sidebar.js +74 -0
- package/dist/ikoncomponents/main-layout/nav-main.d.ts +8 -0
- package/dist/ikoncomponents/main-layout/nav-main.js +31 -0
- package/dist/ikoncomponents/resource/index.d.ts +19 -0
- package/dist/ikoncomponents/resource/index.js +89 -0
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.d.ts +5 -0
- package/dist/ikoncomponents/skeleton-loader/skeleton-table.js +6 -0
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.d.ts +3 -0
- package/dist/ikoncomponents/skeleton-loader/skeleton-widget.js +5 -0
- package/dist/ikoncomponents/theme-toggle-btn/index.d.ts +1 -1
- package/dist/ikoncomponents/theme-toggle-btn/index.js +112 -4
- package/dist/ikoncomponents/upload-tab/index.d.ts +1 -0
- package/dist/ikoncomponents/upload-tab/index.js +92 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.js +33 -0
- package/dist/shadcn/aspect-ratio.d.ts +3 -0
- package/dist/shadcn/aspect-ratio.js +19 -0
- package/dist/shadcn/breadcrumb.d.ts +11 -0
- package/dist/shadcn/breadcrumb.js +45 -0
- package/dist/shadcn/button.d.ts +1 -1
- package/dist/shadcn/button.js +3 -2
- package/dist/shadcn/collapsible.d.ts +5 -0
- package/dist/shadcn/collapsible.js +27 -0
- package/dist/shadcn/drawer.d.ts +13 -0
- package/dist/shadcn/drawer.js +56 -0
- package/dist/shadcn/form.d.ts +24 -0
- package/dist/shadcn/form.js +70 -0
- package/dist/shadcn/input-otp.d.ts +34 -0
- package/dist/shadcn/input-otp.js +40 -0
- package/dist/shadcn/radio-group.js +2 -4
- package/dist/shadcn/table.js +1 -1
- package/dist/shadcn/tabs.js +1 -1
- package/dist/shadcn/toggle-group.d.ts +9 -0
- package/dist/shadcn/toggle-group.js +35 -0
- package/dist/shadcn/toggle.d.ts +9 -0
- package/dist/shadcn/toggle.js +38 -0
- package/dist/shadcn/tooltip.js +2 -2
- package/dist/styles.css +534 -41
- package/dist/utils/border-radius-provider.d.ts +11 -0
- package/dist/utils/border-radius-provider.js +35 -0
- package/dist/utils/font-provider.d.ts +11 -0
- package/dist/utils/font-provider.js +37 -0
- package/dist/utils/session/cookieSession.d.ts +8 -0
- package/dist/utils/session/cookieSession.js +33 -0
- package/dist/utils/token-management/index.d.ts +7 -0
- package/dist/utils/token-management/index.js +78 -0
- package/dist/utils/token-management/types.d.ts +6 -0
- package/dist/utils/token-management/types.js +1 -0
- package/package.json +98 -91
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
|
|
15
|
+
function AspectRatio(_a) {
|
|
16
|
+
var props = __rest(_a, []);
|
|
17
|
+
return _jsx(AspectRatioPrimitive.Root, Object.assign({ "data-slot": "aspect-ratio" }, props));
|
|
18
|
+
}
|
|
19
|
+
export { AspectRatio };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function BreadcrumbLink({ asChild, className, ...props }: React.ComponentProps<"a"> & {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
14
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
15
|
+
import { cn } from "../utils/cn";
|
|
16
|
+
function Breadcrumb(_a) {
|
|
17
|
+
var props = __rest(_a, []);
|
|
18
|
+
return _jsx("nav", Object.assign({ "aria-label": "breadcrumb", "data-slot": "breadcrumb" }, props));
|
|
19
|
+
}
|
|
20
|
+
function BreadcrumbList(_a) {
|
|
21
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22
|
+
return (_jsx("ol", Object.assign({ "data-slot": "breadcrumb-list", className: cn("text-muted-foreground blue-dark:text-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5", className) }, props)));
|
|
23
|
+
}
|
|
24
|
+
function BreadcrumbItem(_a) {
|
|
25
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
26
|
+
return (_jsx("li", Object.assign({ "data-slot": "breadcrumb-item", className: cn("inline-flex items-center gap-1.5", className) }, props)));
|
|
27
|
+
}
|
|
28
|
+
function BreadcrumbLink(_a) {
|
|
29
|
+
var { asChild, className } = _a, props = __rest(_a, ["asChild", "className"]);
|
|
30
|
+
const Comp = asChild ? Slot : "a";
|
|
31
|
+
return (_jsx(Comp, Object.assign({ "data-slot": "breadcrumb-link", className: cn("hover:text-foreground transition-colors", className) }, props)));
|
|
32
|
+
}
|
|
33
|
+
function BreadcrumbPage(_a) {
|
|
34
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
35
|
+
return (_jsx("span", Object.assign({ "data-slot": "breadcrumb-page", role: "link", "aria-disabled": "true", "aria-current": "page", className: cn("text-foreground font-normal", className) }, props)));
|
|
36
|
+
}
|
|
37
|
+
function BreadcrumbSeparator(_a) {
|
|
38
|
+
var { children, className } = _a, props = __rest(_a, ["children", "className"]);
|
|
39
|
+
return (_jsx("li", Object.assign({ "data-slot": "breadcrumb-separator", role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className) }, props, { children: children !== null && children !== void 0 ? children : _jsx(ChevronRight, {}) })));
|
|
40
|
+
}
|
|
41
|
+
function BreadcrumbEllipsis(_a) {
|
|
42
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
43
|
+
return (_jsxs("span", Object.assign({ "data-slot": "breadcrumb-ellipsis", role: "presentation", "aria-hidden": "true", className: cn("flex size-9 items-center justify-center", className) }, props, { children: [_jsx(MoreHorizontal, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More" })] })));
|
|
44
|
+
}
|
|
45
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
package/dist/shadcn/button.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "dashed" | null | undefined;
|
|
5
|
-
size?: "default" | "sm" | "lg" | "icon" | "smIcon" | "circular" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | "smIcon" | "circular" | "lgIcon" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
package/dist/shadcn/button.js
CHANGED
|
@@ -16,9 +16,9 @@ import { cn } from "../utils/cn";
|
|
|
16
16
|
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
|
|
17
17
|
variants: {
|
|
18
18
|
variant: {
|
|
19
|
-
default: "bg-[var(--
|
|
19
|
+
default: "bg-[var(--accent)] text-[var(--accent-foreground)] shadow-xs hover:bg-[var(--accent)]/60",
|
|
20
20
|
destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
21
|
-
outline: "border bg-
|
|
21
|
+
outline: "border! border-2! bg-background shadow-xs hover:bg-accent hover:text-accent-foreground ",
|
|
22
22
|
secondary: "bg-[var(--btn-secondary)] text-secondary-foreground shadow-xs hover:bg-[var(--btn-secondary)]/20 border border-input",
|
|
23
23
|
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
24
24
|
dashed: "border border-dashed bg-background shadow-sm hover:bg-accent hover:text-accent-foreground ",
|
|
@@ -31,6 +31,7 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
|
|
|
31
31
|
icon: "size-9",
|
|
32
32
|
smIcon: "h-8 w-8",
|
|
33
33
|
circular: "size-10 rounded-full p-0",
|
|
34
|
+
lgIcon: "size-10",
|
|
34
35
|
},
|
|
35
36
|
},
|
|
36
37
|
defaultVariants: {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
2
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
15
|
+
function Collapsible(_a) {
|
|
16
|
+
var props = __rest(_a, []);
|
|
17
|
+
return _jsx(CollapsiblePrimitive.Root, Object.assign({ "data-slot": "collapsible" }, props));
|
|
18
|
+
}
|
|
19
|
+
function CollapsibleTrigger(_a) {
|
|
20
|
+
var props = __rest(_a, []);
|
|
21
|
+
return (_jsx(CollapsiblePrimitive.CollapsibleTrigger, Object.assign({ "data-slot": "collapsible-trigger" }, props)));
|
|
22
|
+
}
|
|
23
|
+
function CollapsibleContent(_a) {
|
|
24
|
+
var props = __rest(_a, []);
|
|
25
|
+
return (_jsx(CollapsiblePrimitive.CollapsibleContent, Object.assign({ "data-slot": "collapsible-content" }, props)));
|
|
26
|
+
}
|
|
27
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
3
|
+
declare function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
15
|
+
import { cn } from "../utils/cn";
|
|
16
|
+
function Drawer(_a) {
|
|
17
|
+
var props = __rest(_a, []);
|
|
18
|
+
return _jsx(DrawerPrimitive.Root, Object.assign({ "data-slot": "drawer" }, props));
|
|
19
|
+
}
|
|
20
|
+
function DrawerTrigger(_a) {
|
|
21
|
+
var props = __rest(_a, []);
|
|
22
|
+
return _jsx(DrawerPrimitive.Trigger, Object.assign({ "data-slot": "drawer-trigger" }, props));
|
|
23
|
+
}
|
|
24
|
+
function DrawerPortal(_a) {
|
|
25
|
+
var props = __rest(_a, []);
|
|
26
|
+
return _jsx(DrawerPrimitive.Portal, Object.assign({ "data-slot": "drawer-portal" }, props));
|
|
27
|
+
}
|
|
28
|
+
function DrawerClose(_a) {
|
|
29
|
+
var props = __rest(_a, []);
|
|
30
|
+
return _jsx(DrawerPrimitive.Close, Object.assign({ "data-slot": "drawer-close" }, props));
|
|
31
|
+
}
|
|
32
|
+
function DrawerOverlay(_a) {
|
|
33
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
34
|
+
return (_jsx(DrawerPrimitive.Overlay, Object.assign({ "data-slot": "drawer-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className) }, props)));
|
|
35
|
+
}
|
|
36
|
+
function DrawerContent(_a) {
|
|
37
|
+
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
38
|
+
return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [_jsx(DrawerOverlay, {}), _jsxs(DrawerPrimitive.Content, Object.assign({ "data-slot": "drawer-content", className: cn("group/drawer-content bg-background fixed z-50 flex h-auto flex-col", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", className) }, props, { children: [_jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children] }))] }));
|
|
39
|
+
}
|
|
40
|
+
function DrawerHeader(_a) {
|
|
41
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
42
|
+
return (_jsx("div", Object.assign({ "data-slot": "drawer-header", className: cn("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left", className) }, props)));
|
|
43
|
+
}
|
|
44
|
+
function DrawerFooter(_a) {
|
|
45
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
46
|
+
return (_jsx("div", Object.assign({ "data-slot": "drawer-footer", className: cn("mt-auto flex flex-col gap-2 p-4", className) }, props)));
|
|
47
|
+
}
|
|
48
|
+
function DrawerTitle(_a) {
|
|
49
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
50
|
+
return (_jsx(DrawerPrimitive.Title, Object.assign({ "data-slot": "drawer-title", className: cn("text-foreground font-semibold", className) }, props)));
|
|
51
|
+
}
|
|
52
|
+
function DrawerDescription(_a) {
|
|
53
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
54
|
+
return (_jsx(DrawerPrimitive.Description, Object.assign({ "data-slot": "drawer-description", className: cn("text-muted-foreground text-sm", className) }, props)));
|
|
55
|
+
}
|
|
56
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
|
|
5
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
6
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const useFormField: () => {
|
|
8
|
+
invalid: boolean;
|
|
9
|
+
isDirty: boolean;
|
|
10
|
+
isTouched: boolean;
|
|
11
|
+
isValidating: boolean;
|
|
12
|
+
error?: import("react-hook-form").FieldError;
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
formItemId: string;
|
|
16
|
+
formDescriptionId: string;
|
|
17
|
+
formMessageId: string;
|
|
18
|
+
};
|
|
19
|
+
declare function FormItem({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
16
|
+
import { Controller, FormProvider, useFormContext, useFormState, } from "react-hook-form";
|
|
17
|
+
import { cn } from "../utils/cn";
|
|
18
|
+
import { Label } from "./label";
|
|
19
|
+
const Form = FormProvider;
|
|
20
|
+
const FormFieldContext = React.createContext({});
|
|
21
|
+
const FormField = (_a) => {
|
|
22
|
+
var props = __rest(_a, []);
|
|
23
|
+
return (_jsx(FormFieldContext.Provider, { value: { name: props.name }, children: _jsx(Controller, Object.assign({}, props)) }));
|
|
24
|
+
};
|
|
25
|
+
const useFormField = () => {
|
|
26
|
+
const fieldContext = React.useContext(FormFieldContext);
|
|
27
|
+
const itemContext = React.useContext(FormItemContext);
|
|
28
|
+
const { getFieldState } = useFormContext();
|
|
29
|
+
const formState = useFormState({ name: fieldContext.name });
|
|
30
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
31
|
+
if (!fieldContext) {
|
|
32
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
33
|
+
}
|
|
34
|
+
const { id } = itemContext;
|
|
35
|
+
return Object.assign({ id, name: fieldContext.name, formItemId: `${id}-form-item`, formDescriptionId: `${id}-form-item-description`, formMessageId: `${id}-form-item-message` }, fieldState);
|
|
36
|
+
};
|
|
37
|
+
const FormItemContext = React.createContext({});
|
|
38
|
+
function FormItem(_a) {
|
|
39
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
40
|
+
const id = React.useId();
|
|
41
|
+
return (_jsx(FormItemContext.Provider, { value: { id }, children: _jsx("div", Object.assign({ "data-slot": "form-item", className: cn("grid gap-2", className) }, props)) }));
|
|
42
|
+
}
|
|
43
|
+
function FormLabel(_a) {
|
|
44
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
45
|
+
const { error, formItemId } = useFormField();
|
|
46
|
+
return (_jsx(Label, Object.assign({ "data-slot": "form-label", "data-error": !!error, className: cn("data-[error=true]:text-destructive", className), htmlFor: formItemId }, props)));
|
|
47
|
+
}
|
|
48
|
+
function FormControl(_a) {
|
|
49
|
+
var props = __rest(_a, []);
|
|
50
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
51
|
+
return (_jsx(Slot, Object.assign({ "data-slot": "form-control", id: formItemId, "aria-describedby": !error
|
|
52
|
+
? `${formDescriptionId}`
|
|
53
|
+
: `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error }, props)));
|
|
54
|
+
}
|
|
55
|
+
function FormDescription(_a) {
|
|
56
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
57
|
+
const { formDescriptionId } = useFormField();
|
|
58
|
+
return (_jsx("p", Object.assign({ "data-slot": "form-description", id: formDescriptionId, className: cn("text-muted-foreground text-sm", className) }, props)));
|
|
59
|
+
}
|
|
60
|
+
function FormMessage(_a) {
|
|
61
|
+
var _b;
|
|
62
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
63
|
+
const { error, formMessageId } = useFormField();
|
|
64
|
+
const body = error ? String((_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : "") : props.children;
|
|
65
|
+
if (!body) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
return (_jsx("p", Object.assign({ "data-slot": "form-message", id: formMessageId, className: cn("text-destructive text-sm", className) }, props, { children: body })));
|
|
69
|
+
}
|
|
70
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (newValue: string) => unknown;
|
|
5
|
+
maxLength: number;
|
|
6
|
+
textAlign?: "left" | "center" | "right";
|
|
7
|
+
onComplete?: (...args: any[]) => unknown;
|
|
8
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
9
|
+
pasteTransformer?: (pasted: string) => string;
|
|
10
|
+
containerClassName?: string;
|
|
11
|
+
noScriptCSSFallback?: string | null;
|
|
12
|
+
} & {
|
|
13
|
+
render: (props: import("input-otp").RenderProps) => React.ReactNode;
|
|
14
|
+
children?: never;
|
|
15
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
16
|
+
value?: string;
|
|
17
|
+
onChange?: (newValue: string) => unknown;
|
|
18
|
+
maxLength: number;
|
|
19
|
+
textAlign?: "left" | "center" | "right";
|
|
20
|
+
onComplete?: (...args: any[]) => unknown;
|
|
21
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
22
|
+
pasteTransformer?: (pasted: string) => string;
|
|
23
|
+
containerClassName?: string;
|
|
24
|
+
noScriptCSSFallback?: string | null;
|
|
25
|
+
} & {
|
|
26
|
+
render?: never;
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
} & React.RefAttributes<HTMLInputElement>, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
declare const InputOTPSlot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
31
|
+
index: number;
|
|
32
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
declare const InputOTPSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
|
16
|
+
import { Minus } from "lucide-react";
|
|
17
|
+
import { cn } from "../utils/cn";
|
|
18
|
+
const InputOTP = React.forwardRef((_a, ref) => {
|
|
19
|
+
var { className, containerClassName } = _a, props = __rest(_a, ["className", "containerClassName"]);
|
|
20
|
+
return (_jsx(OTPInput, Object.assign({ ref: ref, containerClassName: cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName), className: cn("disabled:cursor-not-allowed", className) }, props)));
|
|
21
|
+
});
|
|
22
|
+
InputOTP.displayName = "InputOTP";
|
|
23
|
+
const InputOTPGroup = React.forwardRef((_a, ref) => {
|
|
24
|
+
var { className } = _a, props = __rest(_a, ["className"]);
|
|
25
|
+
return (_jsx("div", Object.assign({ ref: ref, className: cn("flex items-center", className) }, props)));
|
|
26
|
+
});
|
|
27
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
28
|
+
const InputOTPSlot = React.forwardRef((_a, ref) => {
|
|
29
|
+
var { index, className } = _a, props = __rest(_a, ["index", "className"]);
|
|
30
|
+
const inputOTPContext = React.useContext(OTPInputContext);
|
|
31
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
32
|
+
return (_jsxs("div", Object.assign({ ref: ref, className: cn("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md", isActive && "z-10 ring-1 ring-ring", className) }, props, { children: [char, hasFakeCaret && (_jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }))] })));
|
|
33
|
+
});
|
|
34
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
35
|
+
const InputOTPSeparator = React.forwardRef((_a, ref) => {
|
|
36
|
+
var props = __rest(_a, []);
|
|
37
|
+
return (_jsx("div", Object.assign({ ref: ref, role: "separator" }, props, { children: _jsx(Minus, {}) })));
|
|
38
|
+
});
|
|
39
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
40
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
@@ -16,12 +16,10 @@ import { CircleIcon } from "lucide-react";
|
|
|
16
16
|
import { cn } from "../utils/cn";
|
|
17
17
|
function RadioGroup(_a) {
|
|
18
18
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
19
|
-
return (_jsx(RadioGroupPrimitive.Root, Object.assign({ "data-slot": "radio-group", className: cn("grid gap-3
|
|
19
|
+
return (_jsx(RadioGroupPrimitive.Root, Object.assign({ "data-slot": "radio-group", className: cn("grid gap-3", className) }, props)));
|
|
20
20
|
}
|
|
21
|
-
// ... (imports)
|
|
22
21
|
function RadioGroupItem(_a) {
|
|
23
22
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
24
|
-
return (_jsx(RadioGroupPrimitive.Item, Object.assign({ "data-slot": "radio-group-item", className: cn("
|
|
23
|
+
return (_jsx(RadioGroupPrimitive.Item, Object.assign({ "data-slot": "radio-group-item", className: cn("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className) }, props, { children: _jsx(RadioGroupPrimitive.Indicator, { "data-slot": "radio-group-indicator", className: "relative flex items-center justify-center", children: _jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" }) }) })));
|
|
25
24
|
}
|
|
26
|
-
// ... (exports)
|
|
27
25
|
export { RadioGroup, RadioGroupItem };
|
package/dist/shadcn/table.js
CHANGED
|
@@ -30,7 +30,7 @@ function TableFooter(_a) {
|
|
|
30
30
|
}
|
|
31
31
|
function TableRow(_a) {
|
|
32
32
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
33
|
-
return (_jsx("tr", Object.assign({ "data-slot": "table-row", className: cn("hover:bg-
|
|
33
|
+
return (_jsx("tr", Object.assign({ "data-slot": "table-row", className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className) }, props)));
|
|
34
34
|
}
|
|
35
35
|
function TableHead(_a) {
|
|
36
36
|
var { className } = _a, props = __rest(_a, ["className"]);
|
package/dist/shadcn/tabs.js
CHANGED
|
@@ -23,7 +23,7 @@ function TabsList(_a) {
|
|
|
23
23
|
}
|
|
24
24
|
function TabsTrigger(_a) {
|
|
25
25
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
26
|
-
return (_jsx(TabsPrimitive.Trigger, Object.assign({ "data-slot": "tabs-trigger", className: cn("text-muted-foreground data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30
|
|
26
|
+
return (_jsx(TabsPrimitive.Trigger, Object.assign({ "data-slot": "tabs-trigger", className: cn("text-muted-foreground data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 blue-dark:data-[state=active]:border-input blue-dark:data-[state=active]:bg-input/30 dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props)));
|
|
27
27
|
}
|
|
28
28
|
function TabsContent(_a) {
|
|
29
29
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
import { toggleVariants } from "./toggle";
|
|
5
|
+
declare function ToggleGroup({ className, variant, size, spacing, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants> & {
|
|
6
|
+
spacing?: number;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import * as React from "react";
|
|
15
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
16
|
+
import { cn } from "../utils/cn";
|
|
17
|
+
import { toggleVariants } from "./toggle";
|
|
18
|
+
const ToggleGroupContext = React.createContext({
|
|
19
|
+
size: "default",
|
|
20
|
+
variant: "default",
|
|
21
|
+
spacing: 0,
|
|
22
|
+
});
|
|
23
|
+
function ToggleGroup(_a) {
|
|
24
|
+
var { className, variant, size, spacing = 0, children } = _a, props = __rest(_a, ["className", "variant", "size", "spacing", "children"]);
|
|
25
|
+
return (_jsx(ToggleGroupPrimitive.Root, Object.assign({ "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing, style: { "--gap": spacing }, className: cn("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs", className) }, props, { children: _jsx(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children: children }) })));
|
|
26
|
+
}
|
|
27
|
+
function ToggleGroupItem(_a) {
|
|
28
|
+
var { className, children, variant, size } = _a, props = __rest(_a, ["className", "children", "variant", "size"]);
|
|
29
|
+
const context = React.useContext(ToggleGroupContext);
|
|
30
|
+
return (_jsx(ToggleGroupPrimitive.Item, Object.assign({ "data-slot": "toggle-group-item", "data-variant": context.variant || variant, "data-size": context.size || size, "data-spacing": context.spacing, className: cn(toggleVariants({
|
|
31
|
+
variant: context.variant || variant,
|
|
32
|
+
size: context.size || size,
|
|
33
|
+
}), "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10", "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l", className) }, props, { children: children })));
|
|
34
|
+
}
|
|
35
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const toggleVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Toggle, toggleVariants };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
15
|
+
import { cva } from "class-variance-authority";
|
|
16
|
+
import { cn } from "../utils/cn";
|
|
17
|
+
const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
|
|
18
|
+
variants: {
|
|
19
|
+
variant: {
|
|
20
|
+
default: "bg-transparent",
|
|
21
|
+
outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground",
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
default: "h-9 px-2 min-w-9",
|
|
25
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
26
|
+
lg: "h-10 px-2.5 min-w-10",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default",
|
|
31
|
+
size: "default",
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
function Toggle(_a) {
|
|
35
|
+
var { className, variant, size } = _a, props = __rest(_a, ["className", "variant", "size"]);
|
|
36
|
+
return (_jsx(TogglePrimitive.Root, Object.assign({ "data-slot": "toggle", className: cn(toggleVariants({ variant, size, className })) }, props)));
|
|
37
|
+
}
|
|
38
|
+
export { Toggle, toggleVariants };
|
package/dist/shadcn/tooltip.js
CHANGED
|
@@ -23,10 +23,10 @@ function Tooltip(_a) {
|
|
|
23
23
|
}
|
|
24
24
|
function TooltipTrigger(_a) {
|
|
25
25
|
var props = __rest(_a, []);
|
|
26
|
-
return _jsx(TooltipPrimitive.Trigger, Object.assign({ "data-slot": "tooltip-trigger", className: cn("inline-flex w-[80px]
|
|
26
|
+
return _jsx(TooltipPrimitive.Trigger, Object.assign({ "data-slot": "tooltip-trigger", className: cn("inline-flex w-[80px] whitespace-nowrap rounded-md border-0 border-input py-2 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50") }, props));
|
|
27
27
|
}
|
|
28
28
|
function TooltipContent(_a) {
|
|
29
29
|
var { className, sideOffset = 0, children } = _a, props = __rest(_a, ["className", "sideOffset", "children"]);
|
|
30
|
-
return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, Object.assign({ "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn("bg-[var(--
|
|
30
|
+
return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, Object.assign({ "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn("bg-[var(--foreground)] text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", className) }, props, { children: [children, _jsx(TooltipPrimitive.Arrow, { className: "bg-[var(--foreground)] fill-[var(--foreground)] z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })] })) }));
|
|
31
31
|
}
|
|
32
32
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|