linkedunion-design-kit 1.10.5-beta.2 → 1.10.6-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/src/components/Alerts/Alert/alert.js +0 -1
- package/dist/src/components/Button/Button/Button.module.css +1 -1
- package/dist/src/components/Card/contactProfile/ContactProfile.js +1 -1
- package/dist/src/components/Modal/Modal.d.ts +10 -20
- package/dist/src/components/Modal/Modal.js +28 -32
- package/dist/src/components/Modal/Modal.stories.d.ts +4 -78
- package/dist/src/components/Modal/Modal.stories.js +6 -76
- package/dist/src/components/Title/Title.module.css +1 -1
- package/dist/src/components/Typography/Heading/heading.module.css +1 -1
- package/dist/styles/global.css +44 -44
- package/dist/tailwind.config.js +0 -1
- package/package.json +1 -1
- package/dist/build/types/app/layout.d.ts +0 -12
- package/dist/build/types/app/layout.js +0 -22
- package/dist/build/types/app/page.d.ts +0 -12
- package/dist/build/types/app/page.js +0 -22
- package/dist/build/types/validator.d.ts +0 -1
- package/dist/build/types/validator.js +0 -12
- package/dist/src/components/Avatar/Avatar/Avatar1.stories.d.ts +0 -17
- package/dist/src/components/Avatar/Avatar/Avatar1.stories.js +0 -68
- package/dist/src/components/Avatar/Avatar/type.d.ts +0 -12
- package/dist/src/components/Avatar/Avatar/type.js +0 -1
- package/dist/src/components/Modal/Dialog/Dialog.stories.d.ts +0 -8
- package/dist/src/components/Modal/Dialog/Dialog.stories.js +0 -21
- package/dist/src/components/Modal/index.d.ts +0 -45
- package/dist/src/components/Modal/index.js +0 -54
- package/dist/src/components/ui/avatar.d.ts +0 -13
- package/dist/src/components/ui/avatar.js +0 -53
- package/dist/src/components/ui/dialog.d.ts +0 -15
- package/dist/src/components/ui/dialog.js +0 -68
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,6 @@ export { AppIcon } from "./src/components/AppIcons";
|
|
|
23
23
|
export { Tabs, TabsList, TabsTrigger, TabsContent, } from "./src/components/Tabs/tabs";
|
|
24
24
|
export { Select, SelectTrigger, SelectContent, SelectItem, SelectGroup, SelectLabel, SelectSeparator, SelectValue, } from "./src/components/Dropdown/select";
|
|
25
25
|
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from "./src/components/Alerts/AlertDialog";
|
|
26
|
-
export { Alert, AlertAction, AlertCancel, AlertHeader, AlertTitle, AlertDescription, AlertFooter, } from "./src/components/Alerts/Alert/alert";
|
|
27
26
|
export { Avatar, AvatarImage, AvatarFallback, } from "./src/components/Avatar/Avatar/Avatar";
|
|
28
27
|
export { Table, TableHeader, TableBody, TableRow, TableHead, TableCell, TableCaption, TableButton, TableCellPadded, TableFooter, } from "./src/components/Table/Table";
|
|
29
28
|
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuCheckboxItem, DropdownMenuLabel, DropdownMenuSubTrigger, DropdownMenuSub, DropdownMenuSubContent, } from "./src/components/Dropdown/DropdownMenu/DropdownMenu";
|
|
@@ -32,6 +31,6 @@ export { default as Combobox } from "./src/components/Dropdown/Combobox/Combobox
|
|
|
32
31
|
export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from "./src/components/Pagination/pagination";
|
|
33
32
|
export { Skeleton } from "./src/components/Skeleton/skeleton";
|
|
34
33
|
export { Tabs as VerticalTabs, TabsContent as VerticalTabsContent, TabsList as VerticalTabsList, tabSizes as verticalTabsSize, TabsTrigger as VerticalTabsTrigger, TabsHeading as VerticalTabsHeading, } from "./src/components/VerticalTabs/VerticalTabs";
|
|
35
|
-
export { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle,
|
|
34
|
+
export { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogClose, sizes, } from "./src/components/Modal/Modal";
|
|
36
35
|
export { DatePicker } from "./src/components/DatePicker/DatePicker";
|
|
37
36
|
export { TimePicker } from "./src/components/TimePicker/TimePicker";
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,6 @@ export { AppIcon } from "./src/components/AppIcons";
|
|
|
23
23
|
export { Tabs, TabsList, TabsTrigger, TabsContent, } from "./src/components/Tabs/tabs";
|
|
24
24
|
export { Select, SelectTrigger, SelectContent, SelectItem, SelectGroup, SelectLabel, SelectSeparator, SelectValue, } from "./src/components/Dropdown/select";
|
|
25
25
|
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from "./src/components/Alerts/AlertDialog";
|
|
26
|
-
export { Alert, AlertAction, AlertCancel, AlertHeader, AlertTitle, AlertDescription, AlertFooter, } from "./src/components/Alerts/Alert/alert";
|
|
27
26
|
export { Avatar, AvatarImage, AvatarFallback, } from "./src/components/Avatar/Avatar/Avatar";
|
|
28
27
|
export { Table, TableHeader, TableBody, TableRow, TableHead, TableCell, TableCaption, TableButton, TableCellPadded, TableFooter, } from "./src/components/Table/Table";
|
|
29
28
|
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuCheckboxItem, DropdownMenuLabel, DropdownMenuSubTrigger, DropdownMenuSub, DropdownMenuSubContent, } from "./src/components/Dropdown/DropdownMenu/DropdownMenu";
|
|
@@ -32,6 +31,6 @@ export { default as Combobox } from "./src/components/Dropdown/Combobox/Combobox
|
|
|
32
31
|
export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from "./src/components/Pagination/pagination";
|
|
33
32
|
export { Skeleton } from "./src/components/Skeleton/skeleton";
|
|
34
33
|
export { Tabs as VerticalTabs, TabsContent as VerticalTabsContent, TabsList as VerticalTabsList, tabSizes as verticalTabsSize, TabsTrigger as VerticalTabsTrigger, TabsHeading as VerticalTabsHeading, } from "./src/components/VerticalTabs/VerticalTabs";
|
|
35
|
-
export { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle,
|
|
34
|
+
export { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogClose, sizes, } from "./src/components/Modal/Modal";
|
|
36
35
|
export { DatePicker } from "./src/components/DatePicker/DatePicker";
|
|
37
36
|
export { TimePicker } from "./src/components/TimePicker/TimePicker";
|
|
@@ -32,7 +32,7 @@ export var ContactProfile = function (_a) {
|
|
|
32
32
|
};
|
|
33
33
|
// Horizontal layout
|
|
34
34
|
if (orientation === "horizontal") {
|
|
35
|
-
return (_jsxs("div", { className: "!p-5 bg-white rounded-xl flex ".concat(safeMediaPosition === "left" ? "sm:flex-row" : "sm:flex-row-reverse", " max-w-5xl !gap-5 items-center shadow-lg ").concat(editor === null || editor === void 0 ? void 0 : editor.card), children: [_jsx(CardMedia, { className: "".concat(safeMediaPosition === "right" ? "order-3" : "order-1", " w-full max-w-40 aspect-square object-cover") }), _jsxs("div", { className: "flex-1 flex flex-col !gap-1 md:!gap-2.5 sm:!text-left h-full justify-center min-w-0 ".concat(safeMediaPosition === "right" ? "order-1" : "order-2"), children: [_jsx(CardContent, {}), _jsx(CardButton, {})] })] }));
|
|
35
|
+
return (_jsxs("div", { className: "!p-5 bg-white rounded-xl flex ".concat(safeMediaPosition === "left" ? "sm:flex-row" : "sm:flex-row-reverse", " max-w-5xl !gap-5 items-center shadow-lg ").concat(editor === null || editor === void 0 ? void 0 : editor.card), children: [_jsx(CardMedia, { className: "".concat(safeMediaPosition === "right" ? "order-3" : "order-1", " w-full max-w-40 aspect-square object-cover") }), _jsxs("div", { className: "flex-1 flex flex-col !gap-1 md:!gap-2.5 text-center sm:!text-left h-full justify-center min-w-0 ".concat(safeMediaPosition === "right" ? "order-1" : "order-2"), children: [_jsx(CardContent, {}), _jsx(CardButton, {})] })] }));
|
|
36
36
|
}
|
|
37
37
|
// Vertical layout
|
|
38
38
|
return (_jsxs("div", { className: "p-8 bg-white rounded-xl flex flex-col gap-6 max-w-md items-center shadow-lg ".concat(editor === null || editor === void 0 ? void 0 : editor.card), children: [_jsxs("div", { className: "flex w-full ".concat(safeMediaPosition === "top" ? "flex-col" : "flex-col-reverse", " items-center !gap-5 text-center"), children: [_jsx(CardMedia, { className: "w-full h-full aspect-5/4 object-cover" }), _jsx(CardContent, { className: "h-20" })] }), _jsx(CardButton, {})] }));
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
-
|
|
3
|
+
export declare const sizes: {
|
|
4
|
+
sm: string;
|
|
5
|
+
md: string;
|
|
6
|
+
lg: string;
|
|
7
|
+
xl: string;
|
|
8
|
+
full: string;
|
|
9
|
+
};
|
|
4
10
|
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
5
11
|
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
12
|
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
@@ -9,33 +15,17 @@ declare const DialogAction: React.ForwardRefExoticComponent<DialogPrimitive.Dial
|
|
|
9
15
|
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
16
|
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
11
17
|
size?: keyof typeof sizes;
|
|
12
|
-
shadow?: boolean;
|
|
13
|
-
showCloseIcon?: boolean;
|
|
14
18
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
type DialogHeaderProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
16
|
-
variant?: keyof typeof headerVariants;
|
|
17
|
-
size?: keyof typeof sizes;
|
|
18
|
-
};
|
|
19
19
|
declare const DialogHeader: {
|
|
20
|
-
({ className, variant, size, ...props }: DialogHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
displayName: string;
|
|
22
|
-
};
|
|
23
|
-
declare const DialogBody: {
|
|
24
20
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
25
21
|
displayName: string;
|
|
26
22
|
};
|
|
27
|
-
type DialogFooterProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
28
|
-
size?: keyof typeof sizes;
|
|
29
|
-
variant?: keyof typeof footerVariants;
|
|
30
|
-
};
|
|
31
23
|
declare const DialogFooter: {
|
|
32
|
-
({ className,
|
|
24
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
33
25
|
displayName: string;
|
|
34
26
|
};
|
|
35
27
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & {
|
|
36
28
|
size?: keyof typeof sizes;
|
|
37
29
|
} & React.RefAttributes<HTMLHeadingElement>>;
|
|
38
|
-
declare const
|
|
39
|
-
|
|
40
|
-
} & React.RefAttributes<HTMLParagraphElement>>;
|
|
41
|
-
export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogAction, DialogContent, DialogHeader, DialogBody, DialogFooter, DialogTitle, DialogSubTitle, };
|
|
30
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
31
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogAction, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -25,8 +25,14 @@ import * as React from "react";
|
|
|
25
25
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
26
26
|
import { cn } from "../../lib/utils";
|
|
27
27
|
import LUIcon from "../Icons/LUIcon";
|
|
28
|
-
import {
|
|
29
|
-
var
|
|
28
|
+
import { variant } from "../Typography/Heading/heading";
|
|
29
|
+
export var sizes = {
|
|
30
|
+
sm: "max-w-xs",
|
|
31
|
+
md: "max-w-lg",
|
|
32
|
+
lg: "max-w-4xl",
|
|
33
|
+
xl: "max-w-6xl",
|
|
34
|
+
full: "w-full",
|
|
35
|
+
};
|
|
30
36
|
var Dialog = DialogPrimitive.Root;
|
|
31
37
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
32
38
|
var DialogPortal = DialogPrimitive.Portal;
|
|
@@ -38,45 +44,35 @@ var DialogOverlay = React.forwardRef(function (_a, ref) {
|
|
|
38
44
|
});
|
|
39
45
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
40
46
|
var DialogContent = React.forwardRef(function (_a, ref) {
|
|
41
|
-
var className = _a.className, children = _a.children, _b = _a.size, size = _b === void 0 ? "md" : _b,
|
|
42
|
-
return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}),
|
|
47
|
+
var className = _a.className, children = _a.children, _b = _a.size, size = _b === void 0 ? "md" : _b, props = __rest(_a, ["className", "children", "size"]);
|
|
48
|
+
return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, __assign({ ref: ref, className: cn("fixed left-[50%] top-[50%] z-50 grid translate-x-[-50%] translate-y-[-50%] gap-0 border bg-background !py-4 px-6 rounded-lg shadow-lg", "transition-all duration-300 ease-in-out", "data-[state=open]:opacity-100 data-[state=open]:scale-100", "data-[state=closed]:opacity-0 data-[state=closed]:scale-95", sizes[size], className) }, props, { children: [children, _jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-offset-2 hover:cursor-pointer disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [_jsx(LUIcon, { icon: "xMark", size: "md" }), _jsx("span", { className: "sr-only", children: "Close" })] })] }))] }));
|
|
43
49
|
});
|
|
44
50
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
45
51
|
var DialogHeader = function (_a) {
|
|
46
|
-
var _b;
|
|
47
|
-
var className = _a.className, _c = _a.variant, variant = _c === void 0 ? "none" : _c, size = _a.size, props = __rest(_a, ["className", "variant", "size"]);
|
|
48
|
-
var contextSize = React.useContext(ModalSizeContext);
|
|
49
|
-
var effectiveSize = (_b = size !== null && size !== void 0 ? size : contextSize) !== null && _b !== void 0 ? _b : "md";
|
|
50
|
-
return (_jsx("div", __assign({ className: cn("flex flex-col text-center sm:text-left", headerVariants[variant], className), "data-size": effectiveSize }, props)));
|
|
51
|
-
};
|
|
52
|
-
DialogHeader.displayName = "DialogHeader";
|
|
53
|
-
var DialogBody = function (_a) {
|
|
54
52
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
55
|
-
return (_jsx("div", __assign({ className: cn("
|
|
53
|
+
return (_jsx("div", __assign({ className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className) }, props)));
|
|
56
54
|
};
|
|
57
|
-
|
|
55
|
+
DialogHeader.displayName = "DialogHeader";
|
|
58
56
|
var DialogFooter = function (_a) {
|
|
59
|
-
var
|
|
60
|
-
|
|
61
|
-
var contextSize = React.useContext(ModalSizeContext);
|
|
62
|
-
var effectiveSize = (_b = size !== null && size !== void 0 ? size : contextSize) !== null && _b !== void 0 ? _b : "md";
|
|
63
|
-
return (_jsx("div", __assign({ className: cn("flex", footerSizeClasses[effectiveSize], footerVariants[variant], className), "data-size": effectiveSize }, props)));
|
|
57
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
58
|
+
return (_jsx("div", __assign({ className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className) }, props)));
|
|
64
59
|
};
|
|
65
60
|
DialogFooter.displayName = "DialogFooter";
|
|
61
|
+
var titleSizeClasses = {
|
|
62
|
+
sm: variant["h5-600"],
|
|
63
|
+
md: variant["h5-600"],
|
|
64
|
+
lg: variant["h4-500"],
|
|
65
|
+
xl: variant["h4-500"],
|
|
66
|
+
full: variant["h4-500"],
|
|
67
|
+
};
|
|
66
68
|
var DialogTitle = React.forwardRef(function (_a, ref) {
|
|
67
|
-
var _b;
|
|
68
|
-
|
|
69
|
-
var contextSize = React.useContext(ModalSizeContext);
|
|
70
|
-
var effectiveSize = (_b = size !== null && size !== void 0 ? size : contextSize) !== null && _b !== void 0 ? _b : "md";
|
|
71
|
-
return (_jsx(DialogPrimitive.Title, __assign({ ref: ref, className: cn("leading-normal text-gray-950", titleSizeClasses[effectiveSize], className), "data-size": effectiveSize }, props, { children: children })));
|
|
69
|
+
var className = _a.className, _b = _a.size, size = _b === void 0 ? "md" : _b, props = __rest(_a, ["className", "size"]);
|
|
70
|
+
return (_jsx(DialogPrimitive.Title, __assign({ ref: ref, className: cn(titleSizeClasses[size], "leading-normal tracking-tight text-gray-950", className) }, props)));
|
|
72
71
|
});
|
|
73
72
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
var contextSize = React.useContext(ModalSizeContext);
|
|
78
|
-
var effectiveSize = (_b = size !== null && size !== void 0 ? size : contextSize) !== null && _b !== void 0 ? _b : "md";
|
|
79
|
-
return (_jsx(DialogPrimitive.Description, __assign({ ref: ref, className: cn(subTitleSizeClasses[effectiveSize], "text-gray-950", className), "data-size": effectiveSize }, props)));
|
|
73
|
+
var DialogDescription = React.forwardRef(function (_a, ref) {
|
|
74
|
+
var className = _a.className, props = __rest(_a, ["className"]);
|
|
75
|
+
return (_jsx(DialogPrimitive.Description, __assign({ ref: ref, className: cn("text-sm text-muted-foreground", className) }, props)));
|
|
80
76
|
});
|
|
81
|
-
|
|
82
|
-
export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogAction, DialogContent, DialogHeader,
|
|
77
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
78
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogAction, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { sizes } from "./Modal";
|
|
2
3
|
declare const _default: {
|
|
3
4
|
title: string;
|
|
4
5
|
component: React.FC<import("@radix-ui/react-dialog").DialogProps>;
|
|
@@ -19,88 +20,13 @@ declare const _default: {
|
|
|
19
20
|
};
|
|
20
21
|
};
|
|
21
22
|
};
|
|
22
|
-
headerVariants: {
|
|
23
|
-
control: {
|
|
24
|
-
type: string;
|
|
25
|
-
};
|
|
26
|
-
options: string[];
|
|
27
|
-
description: string;
|
|
28
|
-
table: {
|
|
29
|
-
type: {
|
|
30
|
-
summary: string;
|
|
31
|
-
};
|
|
32
|
-
defaultValue: {
|
|
33
|
-
summary: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
footerVariants: {
|
|
38
|
-
control: {
|
|
39
|
-
type: string;
|
|
40
|
-
};
|
|
41
|
-
options: string[];
|
|
42
|
-
description: string;
|
|
43
|
-
table: {
|
|
44
|
-
type: {
|
|
45
|
-
summary: string;
|
|
46
|
-
};
|
|
47
|
-
defaultValue: {
|
|
48
|
-
summary: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
shadow: {
|
|
53
|
-
control: {
|
|
54
|
-
type: string;
|
|
55
|
-
};
|
|
56
|
-
description: string;
|
|
57
|
-
table: {
|
|
58
|
-
type: {
|
|
59
|
-
summary: string;
|
|
60
|
-
};
|
|
61
|
-
defaultValue: {
|
|
62
|
-
summary: boolean;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
showCloseIcon: {
|
|
67
|
-
control: {
|
|
68
|
-
type: string;
|
|
69
|
-
};
|
|
70
|
-
description: string;
|
|
71
|
-
table: {
|
|
72
|
-
type: {
|
|
73
|
-
summary: string;
|
|
74
|
-
};
|
|
75
|
-
defaultValue: {
|
|
76
|
-
summary: boolean;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
23
|
};
|
|
81
24
|
};
|
|
82
25
|
export default _default;
|
|
83
|
-
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer,
|
|
26
|
+
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<import("@radix-ui/react-dialog").DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
27
|
+
size?: keyof typeof sizes;
|
|
28
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
84
29
|
export declare const SimpleModal: () => import("react/jsx-runtime").JSX.Element;
|
|
85
30
|
export declare const ModalSizes: () => import("react/jsx-runtime").JSX.Element;
|
|
86
|
-
export declare const HeaderVariants: () => import("react/jsx-runtime").JSX.Element;
|
|
87
|
-
export declare const FooterVariants: () => import("react/jsx-runtime").JSX.Element;
|
|
88
|
-
export declare const FooterButtonsLeftPosition: {
|
|
89
|
-
(): import("react/jsx-runtime").JSX.Element;
|
|
90
|
-
parameters: {
|
|
91
|
-
docs: {
|
|
92
|
-
description: {
|
|
93
|
-
story: string;
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
export declare const FooterButtonsRightPosition: () => import("react/jsx-runtime").JSX.Element;
|
|
99
|
-
export declare const FooterButtonsMiddlePosition: () => import("react/jsx-runtime").JSX.Element;
|
|
100
|
-
export declare const ShadowVariations: () => import("react/jsx-runtime").JSX.Element;
|
|
101
31
|
export declare const InformationModalWithoutFooter: () => import("react/jsx-runtime").JSX.Element;
|
|
102
32
|
export declare const ModalWithActionButtons: () => import("react/jsx-runtime").JSX.Element;
|
|
103
|
-
export declare const OutlineModal: () => import("react/jsx-runtime").JSX.Element;
|
|
104
|
-
export declare const FullWidthButtonsModal: () => import("react/jsx-runtime").JSX.Element;
|
|
105
|
-
export declare const BlockButtonModal: () => import("react/jsx-runtime").JSX.Element;
|
|
106
|
-
export declare const NoCloseIconModal: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,26 +9,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle,
|
|
13
|
+
import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogClose, DialogAction, sizes, } from "./Modal";
|
|
25
14
|
import { Button } from "../Button/Button/Button";
|
|
26
15
|
import { Body } from "../Typography/Body/body";
|
|
27
16
|
import { Heading } from "../Typography/Heading/heading";
|
|
28
17
|
import LUIcon from "../Icons/LUIcon";
|
|
29
18
|
import { Avatar, AvatarFallback, AvatarImage } from "../Avatar/Avatar/Avatar";
|
|
30
19
|
import { Dummy_Para } from "../../utils/constants";
|
|
31
|
-
import { footerVariants, headerVariants, sizes } from ".";
|
|
32
20
|
export default {
|
|
33
21
|
title: "Components/Modal",
|
|
34
22
|
component: Dialog,
|
|
@@ -43,72 +31,14 @@ export default {
|
|
|
43
31
|
defaultValue: { summary: "md" },
|
|
44
32
|
},
|
|
45
33
|
},
|
|
46
|
-
headerVariants: {
|
|
47
|
-
control: { type: "select" },
|
|
48
|
-
options: Object.keys(headerVariants),
|
|
49
|
-
description: "Defines the variant style of the modal header.",
|
|
50
|
-
table: {
|
|
51
|
-
type: { summary: "string" },
|
|
52
|
-
defaultValue: { summary: "none" },
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
footerVariants: {
|
|
56
|
-
control: { type: "select" },
|
|
57
|
-
options: Object.keys(footerVariants),
|
|
58
|
-
description: "Defines the variant style of the modal footer.",
|
|
59
|
-
table: {
|
|
60
|
-
type: { summary: "string" },
|
|
61
|
-
defaultValue: { summary: "none" },
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
shadow: {
|
|
65
|
-
control: { type: "boolean" },
|
|
66
|
-
description: "Enable or disable modal shadow.",
|
|
67
|
-
table: {
|
|
68
|
-
type: { summary: "boolean" },
|
|
69
|
-
defaultValue: { summary: true },
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
showCloseIcon: {
|
|
73
|
-
control: { type: "boolean" },
|
|
74
|
-
description: "Show or hide the close icon in the modal.",
|
|
75
|
-
table: {
|
|
76
|
-
type: { summary: "boolean" },
|
|
77
|
-
defaultValue: { summary: true },
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
34
|
},
|
|
81
35
|
};
|
|
82
|
-
var Template = function (args) {
|
|
83
|
-
var headerVariantProp = args.headerVariants, footerVariantProp = args.footerVariants, shadow = args.shadow, contentProps = __rest(args, ["headerVariants", "footerVariants", "shadow"]);
|
|
84
|
-
return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Open Modal" }) }), _jsxs(DialogContent, __assign({}, contentProps, { shadow: shadow, children: [_jsxs(DialogHeader, { variant: headerVariantProp, children: [_jsx(DialogTitle, { children: "Modal Title" }), _jsx(DialogSubTitle, { children: "Subtitle" })] }), _jsx(DialogBody, { children: "You can put any content here." }), _jsx(DialogFooter, { variant: footerVariantProp, children: _jsx(DialogClose, { asChild: true, children: _jsx(Button, { children: "Close" }) }) })] }))] }));
|
|
85
|
-
};
|
|
36
|
+
var Template = function (args) { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Open Modal" }) }), _jsxs(DialogContent, __assign({}, args, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Modal Title" }), _jsx(DialogDescription, { children: "This is a modal rendered using the Template story." })] }), _jsx("div", { children: "You can put any content here." }), _jsx(DialogFooter, { children: _jsx(DialogClose, { asChild: true, children: _jsx(Button, { children: "Close" }) }) })] }))] })); };
|
|
86
37
|
export var Default = Template.bind({});
|
|
87
38
|
Default.args = {
|
|
88
39
|
size: "md",
|
|
89
|
-
headerVariants: "none",
|
|
90
|
-
footerVariants: "none",
|
|
91
|
-
shadow: true,
|
|
92
|
-
showCloseIcon: true,
|
|
93
|
-
};
|
|
94
|
-
export var SimpleModal = function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Open Modal" }) }), _jsxs(DialogContent, { size: "sm", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Simple Modal" }), _jsx(DialogSubTitle, { children: "Subtitle" })] }), _jsx(DialogBody, { children: "You can put any content here." }), _jsx(DialogFooter, { children: _jsx(DialogClose, { asChild: true, children: _jsx(Button, { children: "Close" }) }) })] })] })); };
|
|
95
|
-
export var ModalSizes = function () { return (_jsx("div", { className: "flex flex-row gap-4", children: Object.keys(sizes).map(function (size) { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsxs(Button, { children: ["Open ", size, " Modal"] }) }), _jsxs(DialogContent, { size: size, children: [_jsxs(DialogHeader, { children: [_jsxs(DialogTitle, { children: [size, " Modal"] }), _jsxs(DialogSubTitle, { children: ["This is a ", size, " modal example using the Modal component."] })] }), _jsx(DialogBody, { children: "You can put any content here." }), _jsx(DialogFooter, { children: _jsx(DialogClose, { asChild: true, children: _jsx(Button, { children: "Close" }) }) })] })] }, size)); }) })); };
|
|
96
|
-
export var HeaderVariants = function () { return (_jsx("div", { className: "flex flex-row gap-4", children: Object.keys(headerVariants).map(function (variant) { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsxs(Button, { children: ["Open ", variant, " Header"] }) }), _jsxs(DialogContent, { size: "md", children: [_jsxs(DialogHeader, { variant: variant, children: [_jsxs(DialogTitle, { children: [variant, " Header"] }), _jsxs(DialogSubTitle, { children: ["This modal uses the \"", variant, "\" header variant."] })] }), _jsx(DialogBody, { children: _jsxs(Body, { variant: "body-md", children: ["This demonstrates the ", variant, " header style."] }) }), _jsx(DialogFooter, { children: _jsx(DialogClose, { asChild: true, children: _jsx(Button, { children: "Close" }) }) })] })] }, variant)); }) })); };
|
|
97
|
-
export var FooterVariants = function () { return (_jsx("div", { className: "flex flex-row gap-4", children: Object.keys(footerVariants).map(function (variant) { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsxs(Button, { children: ["Open ", variant, " Footer"] }) }), _jsxs(DialogContent, { size: "md", children: [_jsxs(DialogHeader, { children: [_jsxs(DialogTitle, { children: [variant, " Footer"] }), _jsxs(DialogSubTitle, { children: ["This modal uses the \"", variant, "\" footer variant."] })] }), _jsx(DialogBody, { children: _jsxs(Body, { variant: "body-md", children: ["This demonstrates the ", variant, " footer style."] }) }), _jsx(DialogFooter, { variant: variant, children: _jsx(DialogClose, { asChild: true, children: _jsx(Button, { children: "Close" }) }) })] })] }, variant)); }) })); };
|
|
98
|
-
export var FooterButtonsLeftPosition = function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Open Modal" }) }), _jsxs(DialogContent, { size: "md", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Confirm Action" }), _jsx(DialogSubTitle, { children: "SubTitle" })] }), _jsx(DialogBody, { children: _jsx(Body, { variant: "body-md", children: Dummy_Para }) }), _jsxs(DialogFooter, { className: "gap-2", children: [_jsx(Button, { onClick: function () { return alert("Action confirmed!"); }, children: "Confirm" }), _jsx(Button, { variant: "outline", onClick: function () { return alert("Action cancelled!"); }, children: "Cancel" }), _jsx(Button, { className: "ms-auto", children: "Help" })] })] })] })); };
|
|
99
|
-
FooterButtonsLeftPosition.parameters = {
|
|
100
|
-
docs: {
|
|
101
|
-
description: {
|
|
102
|
-
story: "On lg, footer buttons will be lg; on md, footer buttons will be md; and so on. The button size matches the modal size.",
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
40
|
};
|
|
106
|
-
export var
|
|
107
|
-
export var
|
|
108
|
-
export var
|
|
109
|
-
export var
|
|
110
|
-
export var ModalWithActionButtons = function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Open Modal" }) }), _jsxs(DialogContent, { size: "md", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Confirm Action" }), _jsx(DialogSubTitle, { children: "Are you sure you want to proceed with this action? This cannot be undone." })] }), _jsx(DialogBody, { children: _jsx(Body, { variant: "body-md", children: Dummy_Para }) }), _jsxs(DialogFooter, { children: [_jsx(DialogAction, { asChild: true, children: _jsx(Button, { variant: "fill", className: "mr-2", onClick: function () { return alert("Action confirmed!"); }, children: "Confirm" }) }), _jsx(DialogClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Cancel" }) })] })] })] })); };
|
|
111
|
-
export var OutlineModal = function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Open Outline Modal" }) }), _jsxs(DialogContent, { size: "md", children: [_jsxs(DialogHeader, { variant: "outline", children: [_jsx(DialogTitle, { children: "Outline Modal" }), _jsx(DialogSubTitle, { children: "This modal uses the \"outline\" header variant." })] }), _jsx(DialogBody, { children: _jsx(Body, { variant: "body-md", children: Dummy_Para }) }), _jsx(DialogFooter, { variant: "outline", children: _jsx(DialogClose, { asChild: true, children: _jsx(Button, { children: "Close" }) }) })] })] })); };
|
|
112
|
-
export var FullWidthButtonsModal = function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Open Full Width Modal" }) }), _jsxs(DialogContent, { size: "lg", children: [_jsxs(DialogHeader, { variant: "outline", children: [_jsx(DialogTitle, { children: "Outline Modal" }), _jsx(DialogSubTitle, { children: "This modal uses the \"outline\" shadow variant." })] }), _jsx(DialogBody, { children: _jsx(Body, { variant: "body-md", children: Dummy_Para }) }), _jsxs(DialogFooter, { variant: "outline", children: [_jsx(DialogAction, { asChild: true, children: _jsx(Button, { variant: "fill", size: "lg", className: "w-1/2 mr-2", onClick: function () { return alert("Action confirmed!"); }, children: "Confirm" }) }), _jsx(DialogClose, { asChild: true, children: _jsx(Button, { variant: "outline", size: "lg", className: "w-1/2", onClick: function () { return alert("Action cancelled!"); }, children: "Close" }) })] })] })] })); };
|
|
113
|
-
export var BlockButtonModal = function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Open Block Modal" }) }), _jsxs(DialogContent, { size: "lg", children: [_jsxs(DialogHeader, { variant: "outline", children: [_jsx(DialogTitle, { children: "Outline Modal" }), _jsx(DialogSubTitle, { children: "This modal uses the \"outline\" shadow variant." })] }), _jsx(DialogBody, { children: _jsx(Body, { variant: "body-md", children: Dummy_Para }) }), _jsx(DialogFooter, { variant: "outline", children: _jsx(DialogAction, { asChild: true, children: _jsx(Button, { variant: "fill", size: "lg", className: "w-full", onClick: function () { return alert("Action confirmed!"); }, children: "Confirm" }) }) })] })] })); };
|
|
114
|
-
export var NoCloseIconModal = function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Open Modal Without Close Icon" }) }), _jsxs(DialogContent, { size: "md", showCloseIcon: false, children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "No Close Icon" }), _jsx(DialogSubTitle, { children: "This modal does not show the close icon." })] }), _jsx(DialogBody, { children: "You can put any content here. Use the footer button to close." }), _jsx(DialogFooter, { children: _jsx(DialogClose, { asChild: true, children: _jsx(Button, { children: "Close" }) }) })] })] })); };
|
|
41
|
+
export var SimpleModal = function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Open Modal" }) }), _jsxs(DialogContent, { size: "sm", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Simple Modal" }), _jsx(DialogDescription, { children: "This is a simple modal example using the Modal component." })] }), _jsx("div", { className: "py-4", children: "You can put any content here." }), _jsx(DialogFooter, { children: _jsx(DialogClose, { asChild: true, children: _jsx(Button, { children: "Close" }) }) })] })] })); };
|
|
42
|
+
export var ModalSizes = function () { return (_jsx("div", { className: "flex flex-row gap-4", children: Object.keys(sizes).map(function (size) { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsxs(Button, { children: ["Open ", size, " Modal"] }) }), _jsxs(DialogContent, { size: size, children: [_jsxs(DialogHeader, { children: [_jsxs(DialogTitle, { children: [size, " Modal"] }), _jsxs(DialogDescription, { children: ["This is a ", size, " modal example using the Modal component."] })] }), _jsx("div", { className: "py-4", children: "You can put any content here." }), _jsx(DialogFooter, { children: _jsx(DialogClose, { asChild: true, children: _jsx(Button, { children: "Close" }) }) })] })] }, size)); }) })); };
|
|
43
|
+
export var InformationModalWithoutFooter = function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Open Info Modal" }) }), _jsxs(DialogContent, { size: "lg", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { size: "lg", className: "text-center", children: "Contact Profile" }) }), _jsxs("div", { className: "flex flex-col items-center justify-center gap-7", children: [_jsxs(Avatar, { size: "huge", children: [_jsx(AvatarImage, { alt: "Avatar", src: "/images/avatar.png" }), _jsx(AvatarFallback, { children: "AB" })] }), _jsxs("div", { className: "flex flex-col items-center", children: [_jsx(Body, { variant: "body-md", children: "Designation" }), _jsx(Heading, { variant: "heading-md", children: "Heading" })] }), _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [_jsx(LUIcon, { icon: "envelope", size: "lg" }), _jsx(Body, { variant: "body-md", className: "text-gray-600 truncate min-w-0", children: "testing@gmail.com" })] }), _jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [_jsx(LUIcon, { icon: "phone", size: "lg" }), _jsx(Body, { variant: "body-md", className: "text-gray-600 truncate min-w-0", children: "03764734829" })] })] }), _jsx(Body, { variant: "body-md", children: Dummy_Para })] })] })] })); };
|
|
44
|
+
export var ModalWithActionButtons = function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { children: "Open Modal" }) }), _jsxs(DialogContent, { size: "md", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Confirm Action" }), _jsx(DialogDescription, { children: "Are you sure you want to proceed with this action? This cannot be undone." })] }), _jsx("div", { className: "py-4", children: _jsx(Body, { variant: "body-md", children: Dummy_Para }) }), _jsxs(DialogFooter, { children: [_jsx(DialogClose, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Cancel" }) }), _jsx(DialogAction, { asChild: true, children: _jsx(Button, { variant: "fill", onClick: function () { return alert("Action confirmed!"); }, children: "Confirm" }) })] })] })] })); };
|
package/dist/styles/global.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer theme {
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
--container-xs: 20rem;
|
|
12
12
|
--container-md: 28rem;
|
|
13
13
|
--container-lg: 32rem;
|
|
14
|
+
--container-4xl: 56rem;
|
|
14
15
|
--container-5xl: 64rem;
|
|
16
|
+
--container-6xl: 72rem;
|
|
15
17
|
--text-xs: 0.75rem;
|
|
16
18
|
--text-xs--line-height: calc(1 / 0.75);
|
|
17
19
|
--text-sm: 0.875rem;
|
|
@@ -42,6 +44,7 @@
|
|
|
42
44
|
--font-weight-medium: 500;
|
|
43
45
|
--font-weight-semibold: 600;
|
|
44
46
|
--font-weight-bold: 700;
|
|
47
|
+
--tracking-tight: -0.025em;
|
|
45
48
|
--tracking-widest: 0.1em;
|
|
46
49
|
--leading-normal: 1.5;
|
|
47
50
|
--radius-xs: 0.125rem;
|
|
@@ -193,9 +196,6 @@
|
|
|
193
196
|
::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
|
|
194
197
|
padding-block: 0;
|
|
195
198
|
}
|
|
196
|
-
::-webkit-calendar-picker-indicator {
|
|
197
|
-
line-height: 1;
|
|
198
|
-
}
|
|
199
199
|
:-moz-ui-invalid {
|
|
200
200
|
box-shadow: none;
|
|
201
201
|
}
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
padding: 0;
|
|
230
230
|
margin: -1px;
|
|
231
231
|
overflow: hidden;
|
|
232
|
-
clip
|
|
232
|
+
clip: rect(0, 0, 0, 0);
|
|
233
233
|
white-space: nowrap;
|
|
234
234
|
border-width: 0;
|
|
235
235
|
}
|
|
@@ -865,9 +865,15 @@
|
|
|
865
865
|
.w-xs {
|
|
866
866
|
width: var(--container-xs);
|
|
867
867
|
}
|
|
868
|
+
.max-w-4xl {
|
|
869
|
+
max-width: var(--container-4xl);
|
|
870
|
+
}
|
|
868
871
|
.max-w-5xl {
|
|
869
872
|
max-width: var(--container-5xl);
|
|
870
873
|
}
|
|
874
|
+
.max-w-6xl {
|
|
875
|
+
max-width: var(--container-6xl);
|
|
876
|
+
}
|
|
871
877
|
.max-w-40 {
|
|
872
878
|
max-width: calc(var(--spacing) * 40);
|
|
873
879
|
}
|
|
@@ -883,24 +889,18 @@
|
|
|
883
889
|
.max-w-\[calc\(100\%-2rem\)\] {
|
|
884
890
|
max-width: calc(100% - 2rem);
|
|
885
891
|
}
|
|
886
|
-
.max-w-\[min\(20rem\,calc\(100\%-2rem\)\)\] {
|
|
887
|
-
max-width: min(20rem, calc(100% - 2rem));
|
|
888
|
-
}
|
|
889
|
-
.max-w-\[min\(32rem\,calc\(100\%-2rem\)\)\] {
|
|
890
|
-
max-width: min(32rem, calc(100% - 2rem));
|
|
891
|
-
}
|
|
892
|
-
.max-w-\[min\(56rem\,calc\(100\%-2rem\)\)\] {
|
|
893
|
-
max-width: min(56rem, calc(100% - 2rem));
|
|
894
|
-
}
|
|
895
|
-
.max-w-\[min\(72rem\,calc\(100\%-2rem\)\)\] {
|
|
896
|
-
max-width: min(72rem, calc(100% - 2rem));
|
|
897
|
-
}
|
|
898
892
|
.max-w-fit {
|
|
899
893
|
max-width: fit-content;
|
|
900
894
|
}
|
|
895
|
+
.max-w-lg {
|
|
896
|
+
max-width: var(--container-lg);
|
|
897
|
+
}
|
|
901
898
|
.max-w-md {
|
|
902
899
|
max-width: var(--container-md);
|
|
903
900
|
}
|
|
901
|
+
.max-w-xs {
|
|
902
|
+
max-width: var(--container-xs);
|
|
903
|
+
}
|
|
904
904
|
.min-w-0 {
|
|
905
905
|
min-width: calc(var(--spacing) * 0);
|
|
906
906
|
}
|
|
@@ -1128,6 +1128,13 @@
|
|
|
1128
1128
|
margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));
|
|
1129
1129
|
}
|
|
1130
1130
|
}
|
|
1131
|
+
.space-y-1\.5 {
|
|
1132
|
+
:where(& > :not(:last-child)) {
|
|
1133
|
+
--tw-space-y-reverse: 0;
|
|
1134
|
+
margin-block-start: calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));
|
|
1135
|
+
margin-block-end: calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)));
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1131
1138
|
.space-y-2 {
|
|
1132
1139
|
:where(& > :not(:last-child)) {
|
|
1133
1140
|
--tw-space-y-reverse: 0;
|
|
@@ -1783,6 +1790,9 @@
|
|
|
1783
1790
|
.px-4 {
|
|
1784
1791
|
padding-inline: calc(var(--spacing) * 4);
|
|
1785
1792
|
}
|
|
1793
|
+
.px-6 {
|
|
1794
|
+
padding-inline: calc(var(--spacing) * 6);
|
|
1795
|
+
}
|
|
1786
1796
|
.px-9 {
|
|
1787
1797
|
padding-inline: calc(var(--spacing) * 9);
|
|
1788
1798
|
}
|
|
@@ -1828,6 +1838,9 @@
|
|
|
1828
1838
|
.py-3 {
|
|
1829
1839
|
padding-block: calc(var(--spacing) * 3);
|
|
1830
1840
|
}
|
|
1841
|
+
.py-4 {
|
|
1842
|
+
padding-block: calc(var(--spacing) * 4);
|
|
1843
|
+
}
|
|
1831
1844
|
.py-6 {
|
|
1832
1845
|
padding-block: calc(var(--spacing) * 6);
|
|
1833
1846
|
}
|
|
@@ -1840,15 +1853,6 @@
|
|
|
1840
1853
|
.\!ps-12 {
|
|
1841
1854
|
padding-inline-start: calc(var(--spacing) * 12) !important;
|
|
1842
1855
|
}
|
|
1843
|
-
.\!pt-0 {
|
|
1844
|
-
padding-top: calc(var(--spacing) * 0) !important;
|
|
1845
|
-
}
|
|
1846
|
-
.\!pt-3 {
|
|
1847
|
-
padding-top: calc(var(--spacing) * 3) !important;
|
|
1848
|
-
}
|
|
1849
|
-
.\!pt-4 {
|
|
1850
|
-
padding-top: calc(var(--spacing) * 4) !important;
|
|
1851
|
-
}
|
|
1852
1856
|
.pr-2 {
|
|
1853
1857
|
padding-right: calc(var(--spacing) * 2);
|
|
1854
1858
|
}
|
|
@@ -1867,15 +1871,6 @@
|
|
|
1867
1871
|
.pr-11 {
|
|
1868
1872
|
padding-right: calc(var(--spacing) * 11);
|
|
1869
1873
|
}
|
|
1870
|
-
.\!pb-0 {
|
|
1871
|
-
padding-bottom: calc(var(--spacing) * 0) !important;
|
|
1872
|
-
}
|
|
1873
|
-
.\!pb-3 {
|
|
1874
|
-
padding-bottom: calc(var(--spacing) * 3) !important;
|
|
1875
|
-
}
|
|
1876
|
-
.\!pb-4 {
|
|
1877
|
-
padding-bottom: calc(var(--spacing) * 4) !important;
|
|
1878
|
-
}
|
|
1879
1874
|
.pl-2 {
|
|
1880
1875
|
padding-left: calc(var(--spacing) * 2);
|
|
1881
1876
|
}
|
|
@@ -2035,6 +2030,10 @@
|
|
|
2035
2030
|
--tw-font-weight: var(--font-weight-semibold);
|
|
2036
2031
|
font-weight: var(--font-weight-semibold);
|
|
2037
2032
|
}
|
|
2033
|
+
.tracking-tight {
|
|
2034
|
+
--tw-tracking: var(--tracking-tight);
|
|
2035
|
+
letter-spacing: var(--tracking-tight);
|
|
2036
|
+
}
|
|
2038
2037
|
.tracking-widest {
|
|
2039
2038
|
--tw-tracking: var(--tracking-widest);
|
|
2040
2039
|
letter-spacing: var(--tracking-widest);
|
|
@@ -2323,10 +2322,6 @@
|
|
|
2323
2322
|
--tw-shadow: 0px 0px 15px -3px var(--tw-shadow-color, #0F0F0F1A), 0px 4px 6px -4px var(--tw-shadow-color, #0F0F0F1A);
|
|
2324
2323
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2325
2324
|
}
|
|
2326
|
-
.shadow-backdrop-shadow-xl {
|
|
2327
|
-
--tw-shadow: 0px 0px 25px -5px var(--tw-shadow-color, #0304041A), 0px 8px 10px -6px var(--tw-shadow-color, #0304041A);
|
|
2328
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2329
|
-
}
|
|
2330
2325
|
.shadow-lg {
|
|
2331
2326
|
--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
2332
2327
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -2335,10 +2330,6 @@
|
|
|
2335
2330
|
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
2336
2331
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2337
2332
|
}
|
|
2338
|
-
.shadow-none {
|
|
2339
|
-
--tw-shadow: 0 0 #0000;
|
|
2340
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
2341
|
-
}
|
|
2342
2333
|
.shadow-sm {
|
|
2343
2334
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
2344
2335
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -2387,7 +2378,7 @@
|
|
|
2387
2378
|
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
|
2388
2379
|
}
|
|
2389
2380
|
.transition {
|
|
2390
|
-
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
|
|
2381
|
+
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events;
|
|
2391
2382
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
2392
2383
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
2393
2384
|
}
|
|
@@ -4655,6 +4646,15 @@
|
|
|
4655
4646
|
gap: calc(var(--spacing) * 2);
|
|
4656
4647
|
}
|
|
4657
4648
|
}
|
|
4649
|
+
.sm\:space-x-2 {
|
|
4650
|
+
@media (width >= 40rem) {
|
|
4651
|
+
:where(& > :not(:last-child)) {
|
|
4652
|
+
--tw-space-x-reverse: 0;
|
|
4653
|
+
margin-inline-start: calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));
|
|
4654
|
+
margin-inline-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)));
|
|
4655
|
+
}
|
|
4656
|
+
}
|
|
4657
|
+
}
|
|
4658
4658
|
.sm\:p-2 {
|
|
4659
4659
|
@media (width >= 40rem) {
|
|
4660
4660
|
padding: calc(var(--spacing) * 2);
|
package/dist/tailwind.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
|
|
2
|
-
[K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
|
|
3
|
-
} : T;
|
|
4
|
-
export interface PageProps {
|
|
5
|
-
params?: Promise<SegmentParams>;
|
|
6
|
-
searchParams?: Promise<any>;
|
|
7
|
-
}
|
|
8
|
-
export interface LayoutProps {
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
params?: Promise<SegmentParams>;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// File: /Users/avialdosolutions/linkedunion-design-kit/linkedunion-design-kit/app/layout.tsx
|
|
2
|
-
import * as entry from '../../../app/layout.js';
|
|
3
|
-
// Check that the entry is a valid entry
|
|
4
|
-
checkFields();
|
|
5
|
-
// Check the prop type of the entry function
|
|
6
|
-
checkFields();
|
|
7
|
-
// Check the arguments and return type of the generateMetadata function
|
|
8
|
-
if ('generateMetadata' in entry) {
|
|
9
|
-
checkFields();
|
|
10
|
-
checkFields();
|
|
11
|
-
}
|
|
12
|
-
// Check the arguments and return type of the generateViewport function
|
|
13
|
-
if ('generateViewport' in entry) {
|
|
14
|
-
checkFields();
|
|
15
|
-
checkFields();
|
|
16
|
-
}
|
|
17
|
-
// Check the arguments and return type of the generateStaticParams function
|
|
18
|
-
if ('generateStaticParams' in entry) {
|
|
19
|
-
checkFields();
|
|
20
|
-
checkFields();
|
|
21
|
-
}
|
|
22
|
-
function checkFields() { }
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type SegmentParams<T extends Object = any> = T extends Record<string, any> ? {
|
|
2
|
-
[K in keyof T]: T[K] extends string ? string | string[] | undefined : never;
|
|
3
|
-
} : T;
|
|
4
|
-
export interface PageProps {
|
|
5
|
-
params?: Promise<SegmentParams>;
|
|
6
|
-
searchParams?: Promise<any>;
|
|
7
|
-
}
|
|
8
|
-
export interface LayoutProps {
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
params?: Promise<SegmentParams>;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// File: /Users/avialdosolutions/linkedunion-design-kit/linkedunion-design-kit/app/page.tsx
|
|
2
|
-
import * as entry from '../../../app/page.js';
|
|
3
|
-
// Check that the entry is a valid entry
|
|
4
|
-
checkFields();
|
|
5
|
-
// Check the prop type of the entry function
|
|
6
|
-
checkFields();
|
|
7
|
-
// Check the arguments and return type of the generateMetadata function
|
|
8
|
-
if ('generateMetadata' in entry) {
|
|
9
|
-
checkFields();
|
|
10
|
-
checkFields();
|
|
11
|
-
}
|
|
12
|
-
// Check the arguments and return type of the generateViewport function
|
|
13
|
-
if ('generateViewport' in entry) {
|
|
14
|
-
checkFields();
|
|
15
|
-
checkFields();
|
|
16
|
-
}
|
|
17
|
-
// Check the arguments and return type of the generateStaticParams function
|
|
18
|
-
if ('generateStaticParams' in entry) {
|
|
19
|
-
checkFields();
|
|
20
|
-
checkFields();
|
|
21
|
-
}
|
|
22
|
-
function checkFields() { }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// This file is generated automatically by Next.js
|
|
2
|
-
// Do not edit this file manually
|
|
3
|
-
// This file validates that all pages and layouts export the correct types
|
|
4
|
-
// Validate ../../app/page.tsx
|
|
5
|
-
{
|
|
6
|
-
var handler = {};
|
|
7
|
-
}
|
|
8
|
-
// Validate ../../app/layout.tsx
|
|
9
|
-
{
|
|
10
|
-
var handler = {};
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Avatar } from "../../../components/ui/avatar";
|
|
2
|
-
import { Meta } from "@storybook/react";
|
|
3
|
-
import { avatar1Shape, avatar1Size } from ".";
|
|
4
|
-
declare const _default: Meta<typeof Avatar>;
|
|
5
|
-
export default _default;
|
|
6
|
-
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<import("@radix-ui/react-avatar").AvatarProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
7
|
-
size?: keyof typeof avatar1Size;
|
|
8
|
-
shape?: keyof typeof avatar1Shape;
|
|
9
|
-
status?: "online" | "offline" | "busy" | "away";
|
|
10
|
-
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
11
|
-
export declare const AvatarSize: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export declare const AvatarFallBackValue: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare const AvatarShape: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare const AvatarWithNoImageAndFallBackValue: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare const AvatarShapeSizeCombination: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export declare const AvatarStatusIndicator: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export declare const RoundedAvatarStatusIndicatorSize: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { Avatar, AvatarImage, AvatarFallback } from "../../../components/ui/avatar";
|
|
14
|
-
import { avatar1Shape, avatar1Size } from ".";
|
|
15
|
-
export default {
|
|
16
|
-
title: "Components/Avatar/Avatar1",
|
|
17
|
-
component: Avatar,
|
|
18
|
-
argTypes: {
|
|
19
|
-
size: {
|
|
20
|
-
control: {
|
|
21
|
-
type: "select",
|
|
22
|
-
options: Object.keys(avatar1Size),
|
|
23
|
-
},
|
|
24
|
-
description: "The size of the avatar.",
|
|
25
|
-
table: {
|
|
26
|
-
type: { summary: "string" },
|
|
27
|
-
defaultValue: { summary: "md" },
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
shape: {
|
|
31
|
-
control: {
|
|
32
|
-
type: "select",
|
|
33
|
-
options: Object.keys(avatar1Shape),
|
|
34
|
-
},
|
|
35
|
-
description: "The shape of the avatar.",
|
|
36
|
-
table: {
|
|
37
|
-
type: { summary: "string" },
|
|
38
|
-
defaultValue: { summary: "rounded" },
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
status: {
|
|
42
|
-
control: {
|
|
43
|
-
type: "select",
|
|
44
|
-
options: ["online", "offline", "busy", "away"],
|
|
45
|
-
},
|
|
46
|
-
description: "The status of the avatar.",
|
|
47
|
-
table: {
|
|
48
|
-
type: { summary: "string" },
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
var Template = function (args) {
|
|
54
|
-
return (_jsxs(Avatar, __assign({}, args, { children: [_jsx(AvatarImage, { src: "https://www.w3schools.com/howto/img_avatar2.png", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] })));
|
|
55
|
-
};
|
|
56
|
-
export var Default = Template.bind({});
|
|
57
|
-
export var AvatarSize = function () { return (_jsx("div", { className: "flex flex-row space-x-2", children: Object.keys(avatar1Size).map(function (size) { return (_jsxs(Avatar, { size: size, children: [_jsx(AvatarImage, { src: "https://www.w3schools.com/howto/img_avatar2.png", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] }, size)); }) })); };
|
|
58
|
-
export var AvatarFallBackValue = function () { return (_jsx("div", { className: "flex flex-row space-x-2", children: Object.keys(avatar1Size).map(function (size) { return (_jsxs(Avatar, { size: size, children: [_jsx(AvatarImage, { src: "", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] }, size)); }) })); };
|
|
59
|
-
export var AvatarShape = function () { return (_jsx("div", { className: "flex flex-row space-x-2", children: Object.keys(avatar1Shape).map(function (shape) { return (_jsxs(Avatar, { shape: shape, size: "massive", status: "online", children: [_jsx(AvatarImage, { src: "https://www.w3schools.com/howto/img_avatar2.png", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] }, shape)); }) })); };
|
|
60
|
-
export var AvatarWithNoImageAndFallBackValue = function () {
|
|
61
|
-
var user = { name: "", image: null };
|
|
62
|
-
return (_jsx("div", { className: "flex flex-row space-x-2", children: _jsxs(Avatar, { size: "md", children: [_jsx(AvatarImage, { src: "", alt: "User avatar" }), _jsx(AvatarFallback, { children: (user === null || user === void 0 ? void 0 : user.name) ? user.name.charAt(0) : null })] }) }));
|
|
63
|
-
};
|
|
64
|
-
export var AvatarShapeSizeCombination = function () { return (_jsx("div", { className: "flex flex-col space-y-2", children: Object.keys(avatar1Shape).map(function (shape) {
|
|
65
|
-
return Object.keys(avatar1Size).map(function (size) { return (_jsxs(Avatar, { shape: shape, size: size, children: [_jsx(AvatarImage, { src: "https://www.w3schools.com/howto/img_avatar2.png", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] }, "".concat(shape, "-").concat(size))); });
|
|
66
|
-
}) })); };
|
|
67
|
-
export var AvatarStatusIndicator = function () { return (_jsx("div", { className: "flex flex-row space-x-2", children: ["online", "offline", "busy", "away"].map(function (status) { return (_jsxs(Avatar, { size: "massive", shape: "square", status: status, children: [_jsx(AvatarImage, { src: "https://www.w3schools.com/howto/img_avatar2.png", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] }, status)); }) })); };
|
|
68
|
-
export var RoundedAvatarStatusIndicatorSize = function () { return (_jsx("div", { className: "flex flex-row space-x-2", children: Object.keys(avatar1Size).map(function (size) { return (_jsxs(Avatar, { size: size, shape: "rounded", status: "online", children: [_jsx(AvatarImage, { src: "https://www.w3schools.com/howto/img_avatar2.png", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] }, size)); }) })); };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { avatarShape, avatarSize } from ".";
|
|
2
|
-
import { iconList } from "../../../utils/iconList";
|
|
3
|
-
type avatarSize = keyof typeof avatarSize;
|
|
4
|
-
type avatarShape = keyof typeof avatarShape;
|
|
5
|
-
export interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
image?: string;
|
|
7
|
-
icon?: keyof typeof iconList;
|
|
8
|
-
shape?: avatarShape;
|
|
9
|
-
size?: avatarSize;
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
12
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { Dialog } from "../../../components/ui/dialog";
|
|
3
|
-
declare const meta: Meta<typeof Dialog>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Dialog>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const WithoutCloseButton: Story;
|
|
8
|
-
export declare const LongContent: Story;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "../../../components/ui/dialog";
|
|
3
|
-
import { Button } from "../../../components/Button/Button/Button";
|
|
4
|
-
var meta = {
|
|
5
|
-
title: "Components/Dialog",
|
|
6
|
-
component: Dialog,
|
|
7
|
-
tags: ["autodocs"],
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: "centered",
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
export var Default = {
|
|
14
|
-
render: function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Dialog" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Dialog Title" }), _jsx(DialogDescription, { children: "This is a simple dialog component. You can use it to display important information or get user confirmation." })] }), _jsx("div", { className: "py-4", children: _jsx("p", { className: "text-sm", children: "Dialog content goes here." }) }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", children: "Cancel" }), _jsx(Button, { children: "Confirm" })] })] })] })); },
|
|
15
|
-
};
|
|
16
|
-
export var WithoutCloseButton = {
|
|
17
|
-
render: function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Dialog" }) }), _jsxs(DialogContent, { showCloseButton: false, children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Confirmation Required" }), _jsx(DialogDescription, { children: "This dialog doesn't have a close button. You must use one of the action buttons below." })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", children: "Cancel" }), _jsx(Button, { children: "Confirm" })] })] })] })); },
|
|
18
|
-
};
|
|
19
|
-
export var LongContent = {
|
|
20
|
-
render: function () { return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", children: "Open Dialog" }) }), _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Terms and Conditions" }), _jsx(DialogDescription, { children: "Please read the following terms carefully." })] }), _jsxs("div", { className: "py-4 max-h-[400px] overflow-y-auto", children: [_jsx("p", { className: "text-sm mb-4", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." }), _jsx("p", { className: "text-sm mb-4", children: "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." }), _jsx("p", { className: "text-sm mb-4", children: "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." }), _jsx("p", { className: "text-sm", children: "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "outline", children: "Decline" }), _jsx(Button, { children: "Accept" })] })] })] })); },
|
|
21
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export declare const sizes: {
|
|
2
|
-
sm: string;
|
|
3
|
-
md: string;
|
|
4
|
-
lg: string;
|
|
5
|
-
xl: string;
|
|
6
|
-
full: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const iconSizes: {
|
|
9
|
-
readonly sm: "sm";
|
|
10
|
-
readonly md: "md";
|
|
11
|
-
readonly lg: "lg";
|
|
12
|
-
readonly xl: "lg";
|
|
13
|
-
readonly full: "lg";
|
|
14
|
-
};
|
|
15
|
-
export declare const headerVariants: {
|
|
16
|
-
fill: string;
|
|
17
|
-
outline: string;
|
|
18
|
-
none: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const footerVariants: {
|
|
21
|
-
fill: string;
|
|
22
|
-
outline: string;
|
|
23
|
-
none: string;
|
|
24
|
-
};
|
|
25
|
-
export declare const footerSizeClasses: {
|
|
26
|
-
sm: string;
|
|
27
|
-
md: string;
|
|
28
|
-
lg: string;
|
|
29
|
-
xl: string;
|
|
30
|
-
full: string;
|
|
31
|
-
};
|
|
32
|
-
export declare const titleSizeClasses: {
|
|
33
|
-
sm: string;
|
|
34
|
-
md: string;
|
|
35
|
-
lg: string;
|
|
36
|
-
xl: string;
|
|
37
|
-
full: string;
|
|
38
|
-
};
|
|
39
|
-
export declare const subTitleSizeClasses: {
|
|
40
|
-
readonly sm: `!pt-0 !px-4 !pb-3 ${string}`;
|
|
41
|
-
readonly md: `!pt-0 !px-4 !pb-3 ${string}`;
|
|
42
|
-
readonly lg: `!pt-0 !px-4 !pb-4 ${string}`;
|
|
43
|
-
readonly xl: `!pt-0 !px-4 !pb-4 ${string}`;
|
|
44
|
-
readonly full: `!pt-0 !px-4 !pb-4 ${string}`;
|
|
45
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { variant } from "../Typography/Heading/heading";
|
|
2
|
-
import { variant as bodyVariant } from "../Typography/Body/body";
|
|
3
|
-
export var sizes = {
|
|
4
|
-
sm: "max-w-[min(20rem,calc(100%-2rem))]",
|
|
5
|
-
md: "max-w-[min(32rem,calc(100%-2rem))]",
|
|
6
|
-
lg: "max-w-[min(56rem,calc(100%-2rem))]",
|
|
7
|
-
xl: "max-w-[min(72rem,calc(100%-2rem))]",
|
|
8
|
-
full: "max-w-[calc(100%-2rem)]",
|
|
9
|
-
};
|
|
10
|
-
export var iconSizes = {
|
|
11
|
-
sm: "sm",
|
|
12
|
-
md: "md",
|
|
13
|
-
lg: "lg",
|
|
14
|
-
xl: "lg",
|
|
15
|
-
full: "lg",
|
|
16
|
-
};
|
|
17
|
-
export var headerVariants = {
|
|
18
|
-
fill: "bg-gray-50",
|
|
19
|
-
outline: "border-b border-gray-200",
|
|
20
|
-
none: "",
|
|
21
|
-
};
|
|
22
|
-
export var footerVariants = {
|
|
23
|
-
fill: "bg-gray-50",
|
|
24
|
-
outline: "border-t border-gray-200",
|
|
25
|
-
none: "",
|
|
26
|
-
};
|
|
27
|
-
export var footerSizeClasses = {
|
|
28
|
-
sm: "!px-4 !py-3",
|
|
29
|
-
md: "!px-4 !py-3",
|
|
30
|
-
lg: "!px-4 !py-4",
|
|
31
|
-
xl: "!px-4 !py-4",
|
|
32
|
-
full: "!px-4 !py-4",
|
|
33
|
-
};
|
|
34
|
-
export var titleSizeClasses = {
|
|
35
|
-
sm: "!pt-3 !px-4 !pb-0 ".concat(variant["h5-600"]),
|
|
36
|
-
md: "!pt-3 !px-4 !pb-0 ".concat(variant["h5-600"]),
|
|
37
|
-
lg: "!pt-4 !px-4 !pb-0 ".concat(variant["h4-600"]),
|
|
38
|
-
xl: "!pt-4 !px-4 !pb-0 ".concat(variant["h4-600"]),
|
|
39
|
-
full: "!pt-4 !px-4 !pb-0 ".concat(variant["h4-600"]),
|
|
40
|
-
};
|
|
41
|
-
// export const titleSizeClasses = {
|
|
42
|
-
// sm: `h5-600`,
|
|
43
|
-
// md: `h5-600`,
|
|
44
|
-
// lg: `h4-600`,
|
|
45
|
-
// xl: `h4-600`,
|
|
46
|
-
// full: `h4-600`,
|
|
47
|
-
// } as const;
|
|
48
|
-
export var subTitleSizeClasses = {
|
|
49
|
-
sm: "!pt-0 !px-4 !pb-3 ".concat(bodyVariant["body-sm"]),
|
|
50
|
-
md: "!pt-0 !px-4 !pb-3 ".concat(bodyVariant["body-md"]),
|
|
51
|
-
lg: "!pt-0 !px-4 !pb-4 ".concat(bodyVariant["body-lg"]),
|
|
52
|
-
xl: "!pt-0 !px-4 !pb-4 ".concat(bodyVariant["body-lg"]),
|
|
53
|
-
full: "!pt-0 !px-4 !pb-4 ".concat(bodyVariant["body-lg"]),
|
|
54
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
3
|
-
import { avatar1Size, avatar1Shape, avatarFallbackSize } from "../Avatar/Avatar";
|
|
4
|
-
declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
5
|
-
size?: keyof typeof avatar1Size;
|
|
6
|
-
shape?: keyof typeof avatar1Shape;
|
|
7
|
-
status?: "online" | "offline" | "busy" | "away";
|
|
8
|
-
} & React.RefAttributes<HTMLSpanElement>>;
|
|
9
|
-
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
10
|
-
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
11
|
-
size?: keyof typeof avatarFallbackSize;
|
|
12
|
-
} & React.RefAttributes<HTMLSpanElement>>;
|
|
13
|
-
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import * as React from "react";
|
|
25
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
26
|
-
import { cn } from "../../lib/utils";
|
|
27
|
-
import { avatar1Size, avatar1Shape, avatarFallbackSize, iconSizeMap, statusIndicatorSize, statusIndicatorOffset, roundedStatusIndicatorOffset, } from "../Avatar/Avatar";
|
|
28
|
-
import LUIcon from "../Icons/LUIcon";
|
|
29
|
-
import { StatusIndicator } from "../Avatar/StatusIndicator/StatusIndicator";
|
|
30
|
-
var AvatarContext = React.createContext({ size: "md", shape: "rounded" });
|
|
31
|
-
var Avatar = React.forwardRef(function (_a, ref) {
|
|
32
|
-
var _b;
|
|
33
|
-
var className = _a.className, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.shape, shape = _d === void 0 ? "rounded" : _d, status = _a.status, children = _a.children, props = __rest(_a, ["className", "size", "shape", "status", "children"]);
|
|
34
|
-
return (_jsx(AvatarPrimitive.Root, __assign({ ref: ref, className: cn("relative flex shrink-0", className, avatar1Size[size], typeof avatar1Shape[shape] === "string"
|
|
35
|
-
? avatar1Shape[shape]
|
|
36
|
-
: (_b = avatar1Shape[shape]) === null || _b === void 0 ? void 0 : _b[size]), "data-size": size, "data-shape": shape }, props, { children: _jsxs(AvatarContext.Provider, { value: { size: size, shape: shape }, children: [children, status &&
|
|
37
|
-
(shape === "rounded" ? (_jsx(StatusIndicator, { status: status, size: statusIndicatorSize[size], className: cn("absolute", roundedStatusIndicatorOffset[size]) })) : (_jsx(StatusIndicator, { status: status, size: statusIndicatorSize[size], className: cn("absolute", statusIndicatorOffset[size]) })))] }) })));
|
|
38
|
-
});
|
|
39
|
-
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
40
|
-
var AvatarImage = React.forwardRef(function (_a, ref) {
|
|
41
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
42
|
-
return (_jsx(AvatarPrimitive.Image, __assign({ ref: ref, className: cn("aspect-square h-full w-full bg-blue-100 rounded-[inherit]", className) }, props)));
|
|
43
|
-
});
|
|
44
|
-
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
45
|
-
var AvatarFallback = React.forwardRef(function (_a, ref) {
|
|
46
|
-
var className = _a.className, size = _a.size, children = _a.children, props = __rest(_a, ["className", "size", "children"]);
|
|
47
|
-
var ctx = React.useContext(AvatarContext);
|
|
48
|
-
var finalSize = (size !== null && size !== void 0 ? size : ctx.size);
|
|
49
|
-
return (_jsx(AvatarPrimitive.Fallback, __assign({ ref: ref, className: cn("flex h-full w-full items-center justify-center bg-blue-100 font-medium leading-normal rounded-[inherit]", className, avatarFallbackSize[finalSize]) }, props, { children: children ? (children) : (_jsx(LUIcon, { icon: "user", size: iconSizeMap[finalSize] }) // fallback LUIcon
|
|
50
|
-
) })));
|
|
51
|
-
});
|
|
52
|
-
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
53
|
-
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
-
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
|
-
showCloseButton?: boolean;
|
|
10
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
26
|
-
import { XIcon } from "lucide-react";
|
|
27
|
-
import { cn } from "../../lib/utils";
|
|
28
|
-
function Dialog(_a) {
|
|
29
|
-
var props = __rest(_a, []);
|
|
30
|
-
return _jsx(DialogPrimitive.Root, __assign({ "data-slot": "dialog" }, props));
|
|
31
|
-
}
|
|
32
|
-
function DialogTrigger(_a) {
|
|
33
|
-
var props = __rest(_a, []);
|
|
34
|
-
return _jsx(DialogPrimitive.Trigger, __assign({ "data-slot": "dialog-trigger" }, props));
|
|
35
|
-
}
|
|
36
|
-
function DialogPortal(_a) {
|
|
37
|
-
var props = __rest(_a, []);
|
|
38
|
-
return _jsx(DialogPrimitive.Portal, __assign({ "data-slot": "dialog-portal" }, props));
|
|
39
|
-
}
|
|
40
|
-
function DialogClose(_a) {
|
|
41
|
-
var props = __rest(_a, []);
|
|
42
|
-
return _jsx(DialogPrimitive.Close, __assign({ "data-slot": "dialog-close" }, props));
|
|
43
|
-
}
|
|
44
|
-
function DialogOverlay(_a) {
|
|
45
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
46
|
-
return (_jsx(DialogPrimitive.Overlay, __assign({ "data-slot": "dialog-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)));
|
|
47
|
-
}
|
|
48
|
-
function DialogContent(_a) {
|
|
49
|
-
var className = _a.className, children = _a.children, _b = _a.showCloseButton, showCloseButton = _b === void 0 ? true : _b, props = __rest(_a, ["className", "children", "showCloseButton"]);
|
|
50
|
-
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, __assign({ "data-slot": "dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className) }, props, { children: [children, showCloseButton && (_jsxs(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] }))] }))] }));
|
|
51
|
-
}
|
|
52
|
-
function DialogHeader(_a) {
|
|
53
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
54
|
-
return (_jsx("div", __assign({ "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className) }, props)));
|
|
55
|
-
}
|
|
56
|
-
function DialogFooter(_a) {
|
|
57
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
58
|
-
return (_jsx("div", __assign({ "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className) }, props)));
|
|
59
|
-
}
|
|
60
|
-
function DialogTitle(_a) {
|
|
61
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
62
|
-
return (_jsx(DialogPrimitive.Title, __assign({ "data-slot": "dialog-title", className: cn("text-lg leading-none font-semibold", className) }, props)));
|
|
63
|
-
}
|
|
64
|
-
function DialogDescription(_a) {
|
|
65
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
66
|
-
return (_jsx(DialogPrimitive.Description, __assign({ "data-slot": "dialog-description", className: cn("text-muted-foreground text-sm", className) }, props)));
|
|
67
|
-
}
|
|
68
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|