@a2v2ai/uikit 0.0.1
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/Alert/Alert.d.ts +11 -0
- package/Alert/Alert.js +64 -0
- package/AlertDialog/AlertDialog.d.ts +35 -0
- package/AlertDialog/AlertDialog.js +121 -0
- package/Avatar/Avatar.d.ts +12 -0
- package/Avatar/Avatar.js +64 -0
- package/Badge/Badge.d.ts +9 -0
- package/Badge/Badge.js +26 -0
- package/Breadcrumb/Breadcrumb.d.ts +19 -0
- package/Breadcrumb/Breadcrumb.js +65 -0
- package/Button/Button.d.ts +14 -0
- package/Button/Button.js +75 -0
- package/Calendar/Calendar.d.ts +16 -0
- package/Calendar/Calendar.js +113 -0
- package/Card/Card.d.ts +14 -0
- package/Card/Card.js +70 -0
- package/ChatBubble/ChatBubble.d.ts +29 -0
- package/ChatBubble/ChatBubble.js +133 -0
- package/Checkbox/Checkbox.d.ts +10 -0
- package/Checkbox/Checkbox.js +57 -0
- package/Dialog/Dialog.d.ts +35 -0
- package/Dialog/Dialog.js +130 -0
- package/Drawer/Drawer.d.ts +31 -0
- package/Drawer/Drawer.js +69 -0
- package/DropdownMenu/DropdownMenu.d.ts +27 -0
- package/DropdownMenu/DropdownMenu.js +85 -0
- package/ErrorMessage/ErrorMessage.d.ts +27 -0
- package/ErrorMessage/ErrorMessage.js +15 -0
- package/Flex/Flex.d.ts +23 -0
- package/Flex/Flex.js +101 -0
- package/IconButton/IconButton.d.ts +17 -0
- package/IconButton/IconButton.js +85 -0
- package/Input/Input.d.ts +16 -0
- package/Input/Input.js +75 -0
- package/InputOTP/InputOTP.d.ts +18 -0
- package/InputOTP/InputOTP.js +85 -0
- package/Label/Label.d.ts +10 -0
- package/Label/Label.js +57 -0
- package/Loader/Loader.d.ts +18 -0
- package/Loader/Loader.js +67 -0
- package/Popover/Popover.d.ts +7 -0
- package/Popover/Popover.js +49 -0
- package/Progress/Progress.d.ts +13 -0
- package/Progress/Progress.js +71 -0
- package/README.md +183 -0
- package/RadioGroup/RadioGroup.d.ts +11 -0
- package/RadioGroup/RadioGroup.js +64 -0
- package/ScrollArea/ScrollArea.d.ts +5 -0
- package/ScrollArea/ScrollArea.js +48 -0
- package/Select/Select.d.ts +19 -0
- package/Select/Select.js +85 -0
- package/Separator/Separator.d.ts +4 -0
- package/Separator/Separator.js +43 -0
- package/Skeleton/Skeleton.d.ts +4 -0
- package/Skeleton/Skeleton.js +8 -0
- package/Spinner/Spinner.d.ts +15 -0
- package/Spinner/Spinner.js +68 -0
- package/Switch/Switch.d.ts +10 -0
- package/Switch/Switch.js +67 -0
- package/Tabs/Tabs.d.ts +13 -0
- package/Tabs/Tabs.js +64 -0
- package/Textarea/Textarea.d.ts +10 -0
- package/Textarea/Textarea.js +64 -0
- package/Toast/Toast.d.ts +10 -0
- package/Toast/Toast.js +29 -0
- package/Tooltip/Tooltip.d.ts +15 -0
- package/Tooltip/Tooltip.js +68 -0
- package/Typography/Typography.d.ts +15 -0
- package/Typography/Typography.js +125 -0
- package/helpers.d.ts +4 -0
- package/helpers.js +13 -0
- package/icons.d.ts +1 -0
- package/icons.js +18 -0
- package/index.css +127 -0
- package/index.d.ts +35 -0
- package/index.js +183 -0
- package/lib/utils.d.ts +3 -0
- package/lib/utils.js +18 -0
- package/package.json +29 -0
package/Alert/Alert.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
10
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
11
|
+
export { Alert, AlertTitle, AlertDescription, alertVariants };
|
package/Alert/Alert.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.alertVariants = exports.AlertDescription = exports.AlertTitle = exports.Alert = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
40
|
+
const utils_1 = require("../lib/utils");
|
|
41
|
+
const alertVariants = (0, class_variance_authority_1.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-current [&>svg~*]:pl-7", {
|
|
42
|
+
variants: {
|
|
43
|
+
variant: {
|
|
44
|
+
default: "bg-white text-main-950 border-grey-200",
|
|
45
|
+
destructive: "border-error-200 bg-error-50 text-error-700 [&>svg]:text-error-600",
|
|
46
|
+
success: "border-success-200 bg-success-50 text-success-700 [&>svg]:text-success-600",
|
|
47
|
+
warning: "border-warning-200 bg-warning-50 text-warning-700 [&>svg]:text-warning-600",
|
|
48
|
+
info: "border-info-200 bg-info-50 text-info-700 [&>svg]:text-info-600",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
variant: "default",
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
exports.alertVariants = alertVariants;
|
|
56
|
+
const Alert = React.forwardRef(({ className, variant, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { ref: ref, role: "alert", className: (0, utils_1.cn)(alertVariants({ variant }), className), ...props })));
|
|
57
|
+
exports.Alert = Alert;
|
|
58
|
+
Alert.displayName = "Alert";
|
|
59
|
+
const AlertTitle = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("h5", { ref: ref, className: (0, utils_1.cn)("mb-1 font-medium leading-none tracking-tight", className), ...props })));
|
|
60
|
+
exports.AlertTitle = AlertTitle;
|
|
61
|
+
AlertTitle.displayName = "AlertTitle";
|
|
62
|
+
const AlertDescription = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: (0, utils_1.cn)("text-sm [&_p]:leading-relaxed", className), ...props })));
|
|
63
|
+
exports.AlertDescription = AlertDescription;
|
|
64
|
+
AlertDescription.displayName = "AlertDescription";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
5
|
+
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
7
|
+
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const alertDialogContentVariants: (props?: ({
|
|
9
|
+
type?: "desktop" | "mobile" | null | undefined;
|
|
10
|
+
scrollable?: boolean | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
12
|
+
export interface AlertDialogContentProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>, VariantProps<typeof alertDialogContentVariants> {
|
|
13
|
+
showCloseButton?: boolean;
|
|
14
|
+
closeButtonVariant?: "default" | "icon-button";
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const AlertDialogContent: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const alertDialogHeaderVariants: (props?: ({
|
|
19
|
+
type?: "header" | "close-only" | "icon-button-close" | null | undefined;
|
|
20
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
21
|
+
export interface AlertDialogHeaderProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertDialogHeaderVariants> {
|
|
22
|
+
}
|
|
23
|
+
declare const AlertDialogHeader: React.ForwardRefExoticComponent<AlertDialogHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const alertDialogFooterVariants: (props?: ({
|
|
25
|
+
type?: "buttons-right" | "full-width" | "single-full-width" | null | undefined;
|
|
26
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
27
|
+
export interface AlertDialogFooterProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertDialogFooterVariants> {
|
|
28
|
+
}
|
|
29
|
+
declare const AlertDialogFooter: React.ForwardRefExoticComponent<AlertDialogFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
31
|
+
declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
32
|
+
declare const AlertDialogBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
declare const AlertDialogAction: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
34
|
+
declare const AlertDialogCancel: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
|
|
35
|
+
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogBody, AlertDialogAction, AlertDialogCancel, alertDialogContentVariants, alertDialogHeaderVariants, alertDialogFooterVariants, };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.alertDialogFooterVariants = exports.alertDialogHeaderVariants = exports.alertDialogContentVariants = exports.AlertDialogCancel = exports.AlertDialogAction = exports.AlertDialogBody = exports.AlertDialogDescription = exports.AlertDialogTitle = exports.AlertDialogFooter = exports.AlertDialogHeader = exports.AlertDialogContent = exports.AlertDialogTrigger = exports.AlertDialogOverlay = exports.AlertDialogPortal = exports.AlertDialog = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const AlertDialogPrimitive = __importStar(require("@radix-ui/react-alert-dialog"));
|
|
40
|
+
const lucide_react_1 = require("lucide-react");
|
|
41
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
42
|
+
const Button_1 = require("../Button/Button");
|
|
43
|
+
const utils_1 = require("../lib/utils");
|
|
44
|
+
const AlertDialog = AlertDialogPrimitive.Root;
|
|
45
|
+
exports.AlertDialog = AlertDialog;
|
|
46
|
+
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
47
|
+
exports.AlertDialogTrigger = AlertDialogTrigger;
|
|
48
|
+
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
49
|
+
exports.AlertDialogPortal = AlertDialogPortal;
|
|
50
|
+
const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(AlertDialogPrimitive.Overlay, { ref: ref, className: (0, utils_1.cn)("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props })));
|
|
51
|
+
exports.AlertDialogOverlay = AlertDialogOverlay;
|
|
52
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
53
|
+
const alertDialogContentVariants = (0, class_variance_authority_1.cva)("fixed z-50 grid gap-4 bg-white border border-grey-200 shadow-lg duration-200 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", {
|
|
54
|
+
variants: {
|
|
55
|
+
type: {
|
|
56
|
+
desktop: "left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] w-full max-w-[640px] rounded-lg",
|
|
57
|
+
mobile: "left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] w-full max-w-[320px] rounded-lg",
|
|
58
|
+
},
|
|
59
|
+
scrollable: {
|
|
60
|
+
true: "max-h-[80vh] overflow-y-auto",
|
|
61
|
+
false: "",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
defaultVariants: {
|
|
65
|
+
type: "desktop",
|
|
66
|
+
scrollable: false,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
exports.alertDialogContentVariants = alertDialogContentVariants;
|
|
70
|
+
const AlertDialogContent = React.forwardRef(({ className, children, type, scrollable, showCloseButton = true, closeButtonVariant = "default", loading = false, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(AlertDialogPortal, { children: [(0, jsx_runtime_1.jsx)(AlertDialogOverlay, {}), (0, jsx_runtime_1.jsxs)(AlertDialogPrimitive.Content, { ref: ref, className: (0, utils_1.cn)(alertDialogContentVariants({ type, scrollable, className })), ...props, children: [loading && ((0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-white/80 rounded-lg", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: "size-8 text-main-600 animate-spin" }) })), children, showCloseButton && closeButtonVariant === "default" && !loading && ((0, jsx_runtime_1.jsxs)(AlertDialogPrimitive.Cancel, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:shadow-[0_0_0_3px_#d4d4d4] disabled:pointer-events-none cursor-pointer", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "size-4 text-grey-600" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Close" })] })), showCloseButton && closeButtonVariant === "icon-button" && !loading && ((0, jsx_runtime_1.jsx)(AlertDialogPrimitive.Cancel, { asChild: true, children: (0, jsx_runtime_1.jsxs)(Button_1.Button, { variant: "ghost", size: "small", className: "absolute right-2 top-2 size-9 p-0", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.X, { className: "size-4" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Close" })] }) }))] })] })));
|
|
71
|
+
exports.AlertDialogContent = AlertDialogContent;
|
|
72
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
73
|
+
const alertDialogHeaderVariants = (0, class_variance_authority_1.cva)("flex p-4", {
|
|
74
|
+
variants: {
|
|
75
|
+
type: {
|
|
76
|
+
header: "flex-row items-center justify-between",
|
|
77
|
+
"close-only": "flex-col items-end",
|
|
78
|
+
"icon-button-close": "flex-col items-end justify-center pr-0",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
defaultVariants: {
|
|
82
|
+
type: "header",
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
exports.alertDialogHeaderVariants = alertDialogHeaderVariants;
|
|
86
|
+
const AlertDialogHeader = React.forwardRef(({ className, type, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: (0, utils_1.cn)(alertDialogHeaderVariants({ type, className })), ...props })));
|
|
87
|
+
exports.AlertDialogHeader = AlertDialogHeader;
|
|
88
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
89
|
+
const alertDialogFooterVariants = (0, class_variance_authority_1.cva)("flex gap-2 p-4", {
|
|
90
|
+
variants: {
|
|
91
|
+
type: {
|
|
92
|
+
"buttons-right": "flex-row items-center justify-end",
|
|
93
|
+
"full-width": "flex-row items-start",
|
|
94
|
+
"single-full-width": "flex-row items-start",
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
defaultVariants: {
|
|
98
|
+
type: "buttons-right",
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
exports.alertDialogFooterVariants = alertDialogFooterVariants;
|
|
102
|
+
const AlertDialogFooter = React.forwardRef(({ className, type, children, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: (0, utils_1.cn)(alertDialogFooterVariants({ type, className })), ...props, children: type === "full-width" || type === "single-full-width" ? ((0, jsx_runtime_1.jsx)("div", { className: "flex gap-2 w-full", children: React.Children.map(children, (child) => React.isValidElement(child)
|
|
103
|
+
? React.cloneElement(child, {
|
|
104
|
+
className: (0, utils_1.cn)("flex-1", child.props.className),
|
|
105
|
+
})
|
|
106
|
+
: child) })) : (children) })));
|
|
107
|
+
exports.AlertDialogFooter = AlertDialogFooter;
|
|
108
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
109
|
+
const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(AlertDialogPrimitive.Title, { ref: ref, className: (0, utils_1.cn)("text-2xl font-bold leading-[1.2] tracking-tight text-main-950 font-display", className), ...props })));
|
|
110
|
+
exports.AlertDialogTitle = AlertDialogTitle;
|
|
111
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
112
|
+
const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(AlertDialogPrimitive.Description, { ref: ref, className: (0, utils_1.cn)("text-sm text-grey-600", className), ...props })));
|
|
113
|
+
exports.AlertDialogDescription = AlertDialogDescription;
|
|
114
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
115
|
+
const AlertDialogBody = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("div", { ref: ref, className: (0, utils_1.cn)("flex-1 px-4 py-2", className), ...props })));
|
|
116
|
+
exports.AlertDialogBody = AlertDialogBody;
|
|
117
|
+
AlertDialogBody.displayName = "AlertDialogBody";
|
|
118
|
+
const AlertDialogAction = AlertDialogPrimitive.Action;
|
|
119
|
+
exports.AlertDialogAction = AlertDialogAction;
|
|
120
|
+
const AlertDialogCancel = AlertDialogPrimitive.Cancel;
|
|
121
|
+
exports.AlertDialogCancel = AlertDialogCancel;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const avatarVariants: (props?: ({
|
|
5
|
+
size?: "small" | "regular" | "large" | "xlarge" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
|
|
8
|
+
}
|
|
9
|
+
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
11
|
+
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
export { Avatar, AvatarImage, AvatarFallback, avatarVariants };
|
package/Avatar/Avatar.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.avatarVariants = exports.AvatarFallback = exports.AvatarImage = exports.Avatar = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const AvatarPrimitive = __importStar(require("@radix-ui/react-avatar"));
|
|
40
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
41
|
+
const utils_1 = require("../lib/utils");
|
|
42
|
+
const avatarVariants = (0, class_variance_authority_1.cva)("relative flex shrink-0 overflow-hidden rounded-full", {
|
|
43
|
+
variants: {
|
|
44
|
+
size: {
|
|
45
|
+
small: "size-8",
|
|
46
|
+
regular: "size-10",
|
|
47
|
+
large: "size-12",
|
|
48
|
+
xlarge: "size-16",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
size: "regular",
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
exports.avatarVariants = avatarVariants;
|
|
56
|
+
const Avatar = React.forwardRef(({ className, size, ...props }, ref) => ((0, jsx_runtime_1.jsx)(AvatarPrimitive.Root, { ref: ref, className: (0, utils_1.cn)(avatarVariants({ size }), className), ...props })));
|
|
57
|
+
exports.Avatar = Avatar;
|
|
58
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
59
|
+
const AvatarImage = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(AvatarPrimitive.Image, { ref: ref, className: (0, utils_1.cn)("aspect-square h-full w-full", className), ...props })));
|
|
60
|
+
exports.AvatarImage = AvatarImage;
|
|
61
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
62
|
+
const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(AvatarPrimitive.Fallback, { ref: ref, className: (0, utils_1.cn)("flex h-full w-full items-center justify-center rounded-full bg-grey-100 text-grey-600 font-medium", className), ...props })));
|
|
63
|
+
exports.AvatarFallback = AvatarFallback;
|
|
64
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
package/Badge/Badge.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "success" | "warning" | "secondary" | "outline" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
package/Badge/Badge.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.badgeVariants = void 0;
|
|
4
|
+
exports.Badge = Badge;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
7
|
+
const utils_1 = require("../lib/utils");
|
|
8
|
+
const badgeVariants = (0, class_variance_authority_1.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-main-950 focus:ring-offset-2", {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "border-transparent bg-main-950 text-main-50",
|
|
12
|
+
secondary: "border-transparent bg-grey-100 text-main-950",
|
|
13
|
+
outline: "border-grey-300 text-main-950",
|
|
14
|
+
destructive: "border-transparent bg-error-600 text-white",
|
|
15
|
+
success: "border-transparent bg-success-600 text-white",
|
|
16
|
+
warning: "border-transparent bg-warning-500 text-white",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "default",
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
exports.badgeVariants = badgeVariants;
|
|
24
|
+
function Badge({ className, variant, ...props }) {
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)(badgeVariants({ variant }), className), ...props }));
|
|
26
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
3
|
+
separator?: React.ReactNode;
|
|
4
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
6
|
+
declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
7
|
+
declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
declare const BreadcrumbSeparator: {
|
|
12
|
+
({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
declare const BreadcrumbEllipsis: {
|
|
16
|
+
({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.BreadcrumbEllipsis = exports.BreadcrumbSeparator = exports.BreadcrumbPage = exports.BreadcrumbLink = exports.BreadcrumbItem = exports.BreadcrumbList = exports.Breadcrumb = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const react_slot_1 = require("@radix-ui/react-slot");
|
|
40
|
+
const lucide_react_1 = require("lucide-react");
|
|
41
|
+
const utils_1 = require("../lib/utils");
|
|
42
|
+
const Breadcrumb = React.forwardRef(({ ...props }, ref) => (0, jsx_runtime_1.jsx)("nav", { ref: ref, "aria-label": "breadcrumb", ...props }));
|
|
43
|
+
exports.Breadcrumb = Breadcrumb;
|
|
44
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
45
|
+
const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("ol", { ref: ref, className: (0, utils_1.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm text-grey-500 sm:gap-2.5", className), ...props })));
|
|
46
|
+
exports.BreadcrumbList = BreadcrumbList;
|
|
47
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
48
|
+
const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("li", { ref: ref, className: (0, utils_1.cn)("inline-flex items-center gap-1.5", className), ...props })));
|
|
49
|
+
exports.BreadcrumbItem = BreadcrumbItem;
|
|
50
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
51
|
+
const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
52
|
+
const Comp = asChild ? react_slot_1.Slot : "a";
|
|
53
|
+
return ((0, jsx_runtime_1.jsx)(Comp, { ref: ref, className: (0, utils_1.cn)("transition-colors hover:text-main-950", className), ...props }));
|
|
54
|
+
});
|
|
55
|
+
exports.BreadcrumbLink = BreadcrumbLink;
|
|
56
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
57
|
+
const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)("span", { ref: ref, role: "link", "aria-disabled": "true", "aria-current": "page", className: (0, utils_1.cn)("font-normal text-main-950", className), ...props })));
|
|
58
|
+
exports.BreadcrumbPage = BreadcrumbPage;
|
|
59
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
60
|
+
const BreadcrumbSeparator = ({ children, className, ...props }) => ((0, jsx_runtime_1.jsx)("li", { role: "presentation", "aria-hidden": "true", className: (0, utils_1.cn)("[&>svg]:size-3.5", className), ...props, children: children ?? (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, {}) }));
|
|
61
|
+
exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
62
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
63
|
+
const BreadcrumbEllipsis = ({ className, ...props }) => ((0, jsx_runtime_1.jsxs)("span", { role: "presentation", "aria-hidden": "true", className: (0, utils_1.cn)("flex h-9 w-9 items-center justify-center", className), ...props, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.MoreHorizontal, { className: "size-4" }), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "More" })] }));
|
|
64
|
+
exports.BreadcrumbEllipsis = BreadcrumbEllipsis;
|
|
65
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "destructive" | "secondary" | "outline" | "primary" | "ghost" | "ghost-muted" | null | undefined;
|
|
5
|
+
size?: "small" | "regular" | "large" | "mini" | null | undefined;
|
|
6
|
+
roundness?: "default" | "round" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
leftIcon?: React.ReactNode;
|
|
11
|
+
rightIcon?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
export { Button, buttonVariants };
|
package/Button/Button.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.buttonVariants = exports.Button = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const react_slot_1 = require("@radix-ui/react-slot");
|
|
40
|
+
const class_variance_authority_1 = require("class-variance-authority");
|
|
41
|
+
const utils_1 = require("../lib/utils");
|
|
42
|
+
const buttonVariants = (0, class_variance_authority_1.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap font-normal font-sans cursor-pointer transition-colors focus-visible:outline-none focus-visible:shadow-[0_0_0_3px_#d4d4d4] disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
43
|
+
variants: {
|
|
44
|
+
variant: {
|
|
45
|
+
primary: "bg-main-950 text-main-50 hover:bg-main-800",
|
|
46
|
+
secondary: "bg-main-100 text-main-950 hover:bg-main-200",
|
|
47
|
+
outline: "border border-main-300 bg-transparent text-main-950 hover:bg-main-100",
|
|
48
|
+
ghost: "bg-transparent text-main-600 hover:bg-main-100 hover:text-main-950",
|
|
49
|
+
"ghost-muted": "bg-transparent text-main-400 hover:bg-main-100 hover:text-main-600",
|
|
50
|
+
destructive: "bg-error-600 text-white hover:bg-error-700",
|
|
51
|
+
},
|
|
52
|
+
size: {
|
|
53
|
+
mini: "h-6 px-3 text-xs rounded-md [&_svg]:size-3",
|
|
54
|
+
small: "h-8 px-3 text-sm rounded-md [&_svg]:size-3.5",
|
|
55
|
+
regular: "h-9 px-4 text-sm rounded-lg [&_svg]:size-4",
|
|
56
|
+
large: "h-10 px-4 text-base rounded-lg [&_svg]:size-5",
|
|
57
|
+
},
|
|
58
|
+
roundness: {
|
|
59
|
+
default: "",
|
|
60
|
+
round: "!rounded-full",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
defaultVariants: {
|
|
64
|
+
variant: "primary",
|
|
65
|
+
size: "regular",
|
|
66
|
+
roundness: "default",
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
exports.buttonVariants = buttonVariants;
|
|
70
|
+
const Button = React.forwardRef(({ className, variant, size, roundness, asChild = false, leftIcon, rightIcon, children, ...props }, ref) => {
|
|
71
|
+
const Comp = asChild ? react_slot_1.Slot : "button";
|
|
72
|
+
return ((0, jsx_runtime_1.jsxs)(Comp, { className: (0, utils_1.cn)(buttonVariants({ variant, size, roundness, className })), ref: ref, ...props, children: [leftIcon && (0, jsx_runtime_1.jsx)("span", { className: "shrink-0", children: leftIcon }), children, rightIcon && (0, jsx_runtime_1.jsx)("span", { className: "shrink-0", children: rightIcon })] }));
|
|
73
|
+
});
|
|
74
|
+
exports.Button = Button;
|
|
75
|
+
Button.displayName = "Button";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { DayButton, DayPicker } from "react-day-picker";
|
|
3
|
+
import { Button } from "../Button/Button";
|
|
4
|
+
export type CalendarProps = React.ComponentProps<typeof DayPicker> & {
|
|
5
|
+
/**
|
|
6
|
+
* Variant for navigation buttons
|
|
7
|
+
* @default "ghost"
|
|
8
|
+
*/
|
|
9
|
+
buttonVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
10
|
+
};
|
|
11
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace Calendar {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { Calendar, CalendarDayButton };
|