@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.
Files changed (79) hide show
  1. package/Alert/Alert.d.ts +11 -0
  2. package/Alert/Alert.js +64 -0
  3. package/AlertDialog/AlertDialog.d.ts +35 -0
  4. package/AlertDialog/AlertDialog.js +121 -0
  5. package/Avatar/Avatar.d.ts +12 -0
  6. package/Avatar/Avatar.js +64 -0
  7. package/Badge/Badge.d.ts +9 -0
  8. package/Badge/Badge.js +26 -0
  9. package/Breadcrumb/Breadcrumb.d.ts +19 -0
  10. package/Breadcrumb/Breadcrumb.js +65 -0
  11. package/Button/Button.d.ts +14 -0
  12. package/Button/Button.js +75 -0
  13. package/Calendar/Calendar.d.ts +16 -0
  14. package/Calendar/Calendar.js +113 -0
  15. package/Card/Card.d.ts +14 -0
  16. package/Card/Card.js +70 -0
  17. package/ChatBubble/ChatBubble.d.ts +29 -0
  18. package/ChatBubble/ChatBubble.js +133 -0
  19. package/Checkbox/Checkbox.d.ts +10 -0
  20. package/Checkbox/Checkbox.js +57 -0
  21. package/Dialog/Dialog.d.ts +35 -0
  22. package/Dialog/Dialog.js +130 -0
  23. package/Drawer/Drawer.d.ts +31 -0
  24. package/Drawer/Drawer.js +69 -0
  25. package/DropdownMenu/DropdownMenu.d.ts +27 -0
  26. package/DropdownMenu/DropdownMenu.js +85 -0
  27. package/ErrorMessage/ErrorMessage.d.ts +27 -0
  28. package/ErrorMessage/ErrorMessage.js +15 -0
  29. package/Flex/Flex.d.ts +23 -0
  30. package/Flex/Flex.js +101 -0
  31. package/IconButton/IconButton.d.ts +17 -0
  32. package/IconButton/IconButton.js +85 -0
  33. package/Input/Input.d.ts +16 -0
  34. package/Input/Input.js +75 -0
  35. package/InputOTP/InputOTP.d.ts +18 -0
  36. package/InputOTP/InputOTP.js +85 -0
  37. package/Label/Label.d.ts +10 -0
  38. package/Label/Label.js +57 -0
  39. package/Loader/Loader.d.ts +18 -0
  40. package/Loader/Loader.js +67 -0
  41. package/Popover/Popover.d.ts +7 -0
  42. package/Popover/Popover.js +49 -0
  43. package/Progress/Progress.d.ts +13 -0
  44. package/Progress/Progress.js +71 -0
  45. package/README.md +183 -0
  46. package/RadioGroup/RadioGroup.d.ts +11 -0
  47. package/RadioGroup/RadioGroup.js +64 -0
  48. package/ScrollArea/ScrollArea.d.ts +5 -0
  49. package/ScrollArea/ScrollArea.js +48 -0
  50. package/Select/Select.d.ts +19 -0
  51. package/Select/Select.js +85 -0
  52. package/Separator/Separator.d.ts +4 -0
  53. package/Separator/Separator.js +43 -0
  54. package/Skeleton/Skeleton.d.ts +4 -0
  55. package/Skeleton/Skeleton.js +8 -0
  56. package/Spinner/Spinner.d.ts +15 -0
  57. package/Spinner/Spinner.js +68 -0
  58. package/Switch/Switch.d.ts +10 -0
  59. package/Switch/Switch.js +67 -0
  60. package/Tabs/Tabs.d.ts +13 -0
  61. package/Tabs/Tabs.js +64 -0
  62. package/Textarea/Textarea.d.ts +10 -0
  63. package/Textarea/Textarea.js +64 -0
  64. package/Toast/Toast.d.ts +10 -0
  65. package/Toast/Toast.js +29 -0
  66. package/Tooltip/Tooltip.d.ts +15 -0
  67. package/Tooltip/Tooltip.js +68 -0
  68. package/Typography/Typography.d.ts +15 -0
  69. package/Typography/Typography.js +125 -0
  70. package/helpers.d.ts +4 -0
  71. package/helpers.js +13 -0
  72. package/icons.d.ts +1 -0
  73. package/icons.js +18 -0
  74. package/index.css +127 -0
  75. package/index.d.ts +35 -0
  76. package/index.js +183 -0
  77. package/lib/utils.d.ts +3 -0
  78. package/lib/utils.js +18 -0
  79. package/package.json +29 -0
@@ -0,0 +1,48 @@
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.ScrollBar = exports.ScrollArea = void 0;
37
+ const jsx_runtime_1 = require("react/jsx-runtime");
38
+ const React = __importStar(require("react"));
39
+ const ScrollAreaPrimitive = __importStar(require("@radix-ui/react-scroll-area"));
40
+ const utils_1 = require("../lib/utils");
41
+ const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(ScrollAreaPrimitive.Root, { ref: ref, className: (0, utils_1.cn)("relative overflow-hidden", className), ...props, children: [(0, jsx_runtime_1.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children: children }), (0, jsx_runtime_1.jsx)(ScrollBar, {}), (0, jsx_runtime_1.jsx)(ScrollAreaPrimitive.Corner, {})] })));
42
+ exports.ScrollArea = ScrollArea;
43
+ ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
44
+ const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => ((0, jsx_runtime_1.jsx)(ScrollAreaPrimitive.ScrollAreaScrollbar, { ref: ref, orientation: orientation, className: (0, utils_1.cn)("flex touch-none select-none transition-colors", orientation === "vertical" &&
45
+ "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" &&
46
+ "h-2.5 flex-col border-t border-t-transparent p-[1px]", className), ...props, children: (0, jsx_runtime_1.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-grey-300" }) })));
47
+ exports.ScrollBar = ScrollBar;
48
+ ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import * as SelectPrimitive from "@radix-ui/react-select";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const Select: React.FC<SelectPrimitive.SelectProps>;
5
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
7
+ declare const selectTriggerVariants: (props?: ({
8
+ size?: "small" | "regular" | "large" | null | undefined;
9
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
+ export interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, VariantProps<typeof selectTriggerVariants> {
11
+ }
12
+ declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
13
+ declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
17
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, selectTriggerVariants, };
@@ -0,0 +1,85 @@
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.selectTriggerVariants = exports.SelectScrollDownButton = exports.SelectScrollUpButton = exports.SelectSeparator = exports.SelectItem = exports.SelectLabel = exports.SelectContent = exports.SelectTrigger = exports.SelectValue = exports.SelectGroup = exports.Select = void 0;
37
+ const jsx_runtime_1 = require("react/jsx-runtime");
38
+ const React = __importStar(require("react"));
39
+ const SelectPrimitive = __importStar(require("@radix-ui/react-select"));
40
+ const lucide_react_1 = require("lucide-react");
41
+ const class_variance_authority_1 = require("class-variance-authority");
42
+ const utils_1 = require("../lib/utils");
43
+ const Select = SelectPrimitive.Root;
44
+ exports.Select = Select;
45
+ const SelectGroup = SelectPrimitive.Group;
46
+ exports.SelectGroup = SelectGroup;
47
+ const SelectValue = SelectPrimitive.Value;
48
+ exports.SelectValue = SelectValue;
49
+ const selectTriggerVariants = (0, class_variance_authority_1.cva)("flex w-full items-center justify-between whitespace-nowrap border border-grey-300 bg-white text-main-950 ring-offset-white placeholder:text-grey-400 focus:outline-none focus:ring-2 focus:ring-main-950 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", {
50
+ variants: {
51
+ size: {
52
+ small: "h-8 px-3 text-sm rounded-md",
53
+ regular: "h-9 px-3 text-sm rounded-lg",
54
+ large: "h-10 px-3 text-base rounded-lg",
55
+ },
56
+ },
57
+ defaultVariants: {
58
+ size: "regular",
59
+ },
60
+ });
61
+ exports.selectTriggerVariants = selectTriggerVariants;
62
+ const SelectTrigger = React.forwardRef(({ className, size, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, className: (0, utils_1.cn)(selectTriggerVariants({ size }), className), ...props, children: [children, (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "size-4 opacity-50" }) })] })));
63
+ exports.SelectTrigger = SelectTrigger;
64
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
65
+ const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.ScrollUpButton, { ref: ref, className: (0, utils_1.cn)("flex cursor-default items-center justify-center py-1", className), ...props, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { className: "size-4" }) })));
66
+ exports.SelectScrollUpButton = SelectScrollUpButton;
67
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
68
+ const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.ScrollDownButton, { ref: ref, className: (0, utils_1.cn)("flex cursor-default items-center justify-center py-1", className), ...props, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "size-4" }) })));
69
+ exports.SelectScrollDownButton = SelectScrollDownButton;
70
+ SelectScrollDownButton.displayName =
71
+ SelectPrimitive.ScrollDownButton.displayName;
72
+ const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.Portal, { children: (0, jsx_runtime_1.jsxs)(SelectPrimitive.Content, { ref: ref, className: (0, utils_1.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-lg border border-grey-200 bg-white text-main-950 shadow-md 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" &&
73
+ "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [(0, jsx_runtime_1.jsx)(SelectScrollUpButton, {}), (0, jsx_runtime_1.jsx)(SelectPrimitive.Viewport, { className: (0, utils_1.cn)("p-1", position === "popper" &&
74
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), (0, jsx_runtime_1.jsx)(SelectScrollDownButton, {})] }) })));
75
+ exports.SelectContent = SelectContent;
76
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
77
+ const SelectLabel = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.Label, { ref: ref, className: (0, utils_1.cn)("px-2 py-1.5 text-sm font-semibold text-grey-500", className), ...props })));
78
+ exports.SelectLabel = SelectLabel;
79
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
80
+ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Item, { ref: ref, className: (0, utils_1.cn)("relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-grey-100 focus:text-main-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [(0, jsx_runtime_1.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: (0, jsx_runtime_1.jsx)(SelectPrimitive.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { className: "size-4" }) }) }), (0, jsx_runtime_1.jsx)(SelectPrimitive.ItemText, { children: children })] })));
81
+ exports.SelectItem = SelectItem;
82
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
83
+ const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.Separator, { ref: ref, className: (0, utils_1.cn)("-mx-1 my-1 h-px bg-grey-100", className), ...props })));
84
+ exports.SelectSeparator = SelectSeparator;
85
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
3
+ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export { Separator };
@@ -0,0 +1,43 @@
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.Separator = void 0;
37
+ const jsx_runtime_1 = require("react/jsx-runtime");
38
+ const React = __importStar(require("react"));
39
+ const SeparatorPrimitive = __importStar(require("@radix-ui/react-separator"));
40
+ const utils_1 = require("../lib/utils");
41
+ const Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SeparatorPrimitive.Root, { ref: ref, decorative: decorative, orientation: orientation, className: (0, utils_1.cn)("shrink-0 bg-grey-200", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className), ...props })));
42
+ exports.Separator = Separator;
43
+ Separator.displayName = SeparatorPrimitive.Root.displayName;
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ export type SkeletonProps = React.HTMLAttributes<HTMLDivElement>;
3
+ declare function Skeleton({ className, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
4
+ export { Skeleton };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Skeleton = Skeleton;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const utils_1 = require("../lib/utils");
6
+ function Skeleton({ className, ...props }) {
7
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("animate-pulse rounded-md bg-grey-100", className), ...props }));
8
+ }
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const spinnerVariants: (props?: ({
4
+ size?: "default" | "sm" | "lg" | "md" | "xl" | null | undefined;
5
+ variant?: "default" | "secondary" | "primary" | "white" | "muted" | null | undefined;
6
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
+ export interface SpinnerProps extends React.SVGAttributes<SVGSVGElement>, VariantProps<typeof spinnerVariants> {
8
+ /**
9
+ * Screen reader label for accessibility
10
+ * @default "Loading"
11
+ */
12
+ label?: string;
13
+ }
14
+ declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<SVGSVGElement>>;
15
+ export { Spinner, spinnerVariants };
@@ -0,0 +1,68 @@
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.spinnerVariants = exports.Spinner = 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 spinnerVariants = (0, class_variance_authority_1.cva)("animate-spin", {
42
+ variants: {
43
+ size: {
44
+ sm: "size-4",
45
+ default: "size-6",
46
+ md: "size-8",
47
+ lg: "size-12",
48
+ xl: "size-16",
49
+ },
50
+ variant: {
51
+ default: "text-brand-500",
52
+ primary: "text-brand-500",
53
+ secondary: "text-grey-500",
54
+ muted: "text-grey-400",
55
+ white: "text-white",
56
+ },
57
+ },
58
+ defaultVariants: {
59
+ size: "default",
60
+ variant: "default",
61
+ },
62
+ });
63
+ exports.spinnerVariants = spinnerVariants;
64
+ const Spinner = React.forwardRef(({ className, size, variant, label = "Loading", ...props }, ref) => {
65
+ return ((0, jsx_runtime_1.jsxs)("svg", { ref: ref, className: (0, utils_1.cn)(spinnerVariants({ size, variant, className })), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", role: "status", "aria-label": label, ...props, children: [(0, jsx_runtime_1.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), (0, jsx_runtime_1.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] }));
66
+ });
67
+ exports.Spinner = Spinner;
68
+ Spinner.displayName = "Spinner";
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const switchVariants: (props?: ({
5
+ size?: "small" | "regular" | null | undefined;
6
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
+ export interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>, VariantProps<typeof switchVariants> {
8
+ }
9
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
10
+ export { Switch, switchVariants };
@@ -0,0 +1,67 @@
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.switchVariants = exports.Switch = void 0;
37
+ const jsx_runtime_1 = require("react/jsx-runtime");
38
+ const React = __importStar(require("react"));
39
+ const SwitchPrimitive = __importStar(require("@radix-ui/react-switch"));
40
+ const class_variance_authority_1 = require("class-variance-authority");
41
+ const utils_1 = require("../lib/utils");
42
+ const switchVariants = (0, class_variance_authority_1.cva)("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-main-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-main-950 data-[state=unchecked]:bg-grey-200", {
43
+ variants: {
44
+ size: {
45
+ small: "h-5 w-9",
46
+ regular: "h-6 w-11",
47
+ },
48
+ },
49
+ defaultVariants: {
50
+ size: "regular",
51
+ },
52
+ });
53
+ exports.switchVariants = switchVariants;
54
+ const switchThumbVariants = (0, class_variance_authority_1.cva)("pointer-events-none block rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=unchecked]:translate-x-0", {
55
+ variants: {
56
+ size: {
57
+ small: "size-4 data-[state=checked]:translate-x-4",
58
+ regular: "size-5 data-[state=checked]:translate-x-5",
59
+ },
60
+ },
61
+ defaultVariants: {
62
+ size: "regular",
63
+ },
64
+ });
65
+ const Switch = React.forwardRef(({ className, size, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SwitchPrimitive.Root, { className: (0, utils_1.cn)(switchVariants({ size }), className), ...props, ref: ref, children: (0, jsx_runtime_1.jsx)(SwitchPrimitive.Thumb, { className: (0, utils_1.cn)(switchThumbVariants({ size })) }) })));
66
+ exports.Switch = Switch;
67
+ Switch.displayName = SwitchPrimitive.Root.displayName;
package/Tabs/Tabs.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
5
+ declare const tabsListVariants: (props?: ({
6
+ variant?: "default" | "outline" | null | undefined;
7
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
8
+ export interface TabsListProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>, VariantProps<typeof tabsListVariants> {
9
+ }
10
+ declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
11
+ declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
12
+ declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
package/Tabs/Tabs.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.tabsListVariants = exports.TabsContent = exports.TabsTrigger = exports.TabsList = exports.Tabs = void 0;
37
+ const jsx_runtime_1 = require("react/jsx-runtime");
38
+ const React = __importStar(require("react"));
39
+ const TabsPrimitive = __importStar(require("@radix-ui/react-tabs"));
40
+ const class_variance_authority_1 = require("class-variance-authority");
41
+ const utils_1 = require("../lib/utils");
42
+ const Tabs = TabsPrimitive.Root;
43
+ exports.Tabs = Tabs;
44
+ const tabsListVariants = (0, class_variance_authority_1.cva)("inline-flex items-center justify-center rounded-lg bg-grey-100 p-1 text-grey-500", {
45
+ variants: {
46
+ variant: {
47
+ default: "bg-grey-100",
48
+ outline: "bg-transparent border border-grey-200",
49
+ },
50
+ },
51
+ defaultVariants: {
52
+ variant: "default",
53
+ },
54
+ });
55
+ exports.tabsListVariants = tabsListVariants;
56
+ const TabsList = React.forwardRef(({ className, variant, ...props }, ref) => ((0, jsx_runtime_1.jsx)(TabsPrimitive.List, { ref: ref, className: (0, utils_1.cn)(tabsListVariants({ variant }), className), ...props })));
57
+ exports.TabsList = TabsList;
58
+ TabsList.displayName = TabsPrimitive.List.displayName;
59
+ const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(TabsPrimitive.Trigger, { ref: ref, className: (0, utils_1.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-main-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-main-950 data-[state=active]:shadow-sm", className), ...props })));
60
+ exports.TabsTrigger = TabsTrigger;
61
+ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
62
+ const TabsContent = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(TabsPrimitive.Content, { ref: ref, className: (0, utils_1.cn)("mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-main-950 focus-visible:ring-offset-2", className), ...props })));
63
+ exports.TabsContent = TabsContent;
64
+ TabsContent.displayName = TabsPrimitive.Content.displayName;
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const textareaVariants: (props?: ({
4
+ variant?: "default" | "error" | null | undefined;
5
+ resize?: "none" | "both" | "horizontal" | "vertical" | null | undefined;
6
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
+ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, VariantProps<typeof textareaVariants> {
8
+ }
9
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
10
+ export { Textarea, textareaVariants };
@@ -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.textareaVariants = exports.Textarea = 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 textareaVariants = (0, class_variance_authority_1.cva)("flex min-h-[80px] w-full rounded-lg border bg-white px-3 py-2 text-sm font-normal font-sans transition-colors placeholder:text-grey-400 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-grey-50", {
42
+ variants: {
43
+ variant: {
44
+ default: "border-grey-300 focus-visible:border-grey-300 focus-visible:ring-[3px] focus-visible:ring-grey-300/50",
45
+ error: "border-error-500 focus-visible:border-error-500 focus-visible:ring-[3px] focus-visible:ring-error-200",
46
+ },
47
+ resize: {
48
+ none: "resize-none",
49
+ vertical: "resize-y",
50
+ horizontal: "resize-x",
51
+ both: "resize",
52
+ },
53
+ },
54
+ defaultVariants: {
55
+ variant: "default",
56
+ resize: "vertical",
57
+ },
58
+ });
59
+ exports.textareaVariants = textareaVariants;
60
+ const Textarea = React.forwardRef(({ className, variant, resize, ...props }, ref) => {
61
+ return ((0, jsx_runtime_1.jsx)("textarea", { className: (0, utils_1.cn)(textareaVariants({ variant, resize }), className), ref: ref, ...props }));
62
+ });
63
+ exports.Textarea = Textarea;
64
+ Textarea.displayName = "Textarea";
@@ -0,0 +1,10 @@
1
+ import { toast, type ToasterProps } from "sonner";
2
+ export interface ToastProps extends ToasterProps {
3
+ /**
4
+ * Theme for the toaster
5
+ * @default "light"
6
+ */
7
+ theme?: "light" | "dark" | "system";
8
+ }
9
+ declare const Toaster: ({ theme, ...props }: ToastProps) => import("react/jsx-runtime").JSX.Element;
10
+ export { Toaster, toast };
package/Toast/Toast.js ADDED
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.toast = exports.Toaster = void 0;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const lucide_react_1 = require("lucide-react");
7
+ const sonner_1 = require("sonner");
8
+ Object.defineProperty(exports, "toast", { enumerable: true, get: function () { return sonner_1.toast; } });
9
+ const Toaster = ({ theme = "light", ...props }) => {
10
+ return ((0, jsx_runtime_1.jsx)(sonner_1.Toaster, { theme: theme, className: "toaster group", icons: {
11
+ success: (0, jsx_runtime_1.jsx)(lucide_react_1.CircleCheckIcon, { className: "size-4" }),
12
+ info: (0, jsx_runtime_1.jsx)(lucide_react_1.InfoIcon, { className: "size-4" }),
13
+ warning: (0, jsx_runtime_1.jsx)(lucide_react_1.TriangleAlertIcon, { className: "size-4" }),
14
+ error: (0, jsx_runtime_1.jsx)(lucide_react_1.OctagonXIcon, { className: "size-4" }),
15
+ loading: (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2Icon, { className: "size-4 animate-spin" }),
16
+ }, toastOptions: {
17
+ classNames: {
18
+ toast: "group toast group-[.toaster]:bg-white group-[.toaster]:text-main-950 group-[.toaster]:border-grey-200 group-[.toaster]:shadow-lg group-[.toaster]:rounded-lg",
19
+ description: "group-[.toast]:text-main-500",
20
+ actionButton: "group-[.toast]:bg-main-900 group-[.toast]:text-white",
21
+ cancelButton: "group-[.toast]:bg-grey-100 group-[.toast]:text-main-500",
22
+ success: "group-[.toaster]:border-success-200 group-[.toaster]:bg-success-50 group-[.toaster]:text-success-900 [&_svg]:text-success-600",
23
+ error: "group-[.toaster]:border-error-200 group-[.toaster]:bg-error-50 group-[.toaster]:text-error-900 [&_svg]:text-error-600",
24
+ warning: "group-[.toaster]:border-warning-200 group-[.toaster]:bg-warning-50 group-[.toaster]:text-warning-900 [&_svg]:text-warning-600",
25
+ info: "group-[.toaster]:border-info-200 group-[.toaster]:bg-info-50 group-[.toaster]:text-info-900 [&_svg]:text-info-600",
26
+ },
27
+ }, ...props }));
28
+ };
29
+ exports.Toaster = Toaster;
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const tooltipContentVariants: (props?: ({
5
+ variant?: "default" | "light" | null | undefined;
6
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
+ declare function TooltipProvider({ delayDuration, skipDelayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
8
+ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
9
+ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
10
+ export type TooltipContentProps = React.ComponentProps<typeof TooltipPrimitive.Content> & VariantProps<typeof tooltipContentVariants> & {
11
+ /** Whether to show the arrow */
12
+ showArrow?: boolean;
13
+ };
14
+ declare function TooltipContent({ className, sideOffset, variant, showArrow, children, ...props }: TooltipContentProps): import("react/jsx-runtime").JSX.Element;
15
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, tooltipContentVariants, };