@a2v2ai/uikit 0.0.3 → 0.0.5

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 (148) hide show
  1. package/Alert/Alert.d.ts +13 -0
  2. package/Alert/Alert.js +64 -0
  3. package/AlertDialog/AlertDialog.d.ts +43 -0
  4. package/AlertDialog/AlertDialog.js +121 -0
  5. package/Avatar/Avatar.d.ts +14 -0
  6. package/Avatar/Avatar.js +64 -0
  7. package/Badge/Badge.d.ts +11 -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 +20 -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 +16 -0
  16. package/Card/Card.js +70 -0
  17. package/ChatBubble/ChatBubble.d.ts +33 -0
  18. package/ChatBubble/ChatBubble.js +133 -0
  19. package/Checkbox/Checkbox.d.ts +12 -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 +33 -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 +31 -0
  30. package/Flex/Flex.js +101 -0
  31. package/IconButton/IconButton.d.ts +23 -0
  32. package/IconButton/IconButton.js +85 -0
  33. package/Input/Input.d.ts +22 -0
  34. package/Input/Input.js +75 -0
  35. package/InputOTP/InputOTP.d.ts +20 -0
  36. package/InputOTP/InputOTP.js +85 -0
  37. package/Label/Label.d.ts +12 -0
  38. package/Label/Label.js +57 -0
  39. package/Loader/Loader.d.ts +21 -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 +17 -0
  44. package/Progress/Progress.js +71 -0
  45. package/RadioGroup/RadioGroup.d.ts +13 -0
  46. package/RadioGroup/RadioGroup.js +64 -0
  47. package/ScrollArea/ScrollArea.d.ts +5 -0
  48. package/ScrollArea/ScrollArea.js +48 -0
  49. package/Select/Select.d.ts +21 -0
  50. package/Select/Select.js +85 -0
  51. package/Separator/Separator.d.ts +4 -0
  52. package/Separator/Separator.js +43 -0
  53. package/Skeleton/Skeleton.d.ts +4 -0
  54. package/Skeleton/Skeleton.js +8 -0
  55. package/Spinner/Spinner.d.ts +19 -0
  56. package/Spinner/Spinner.js +68 -0
  57. package/Switch/Switch.d.ts +12 -0
  58. package/Switch/Switch.js +67 -0
  59. package/Tabs/Tabs.d.ts +15 -0
  60. package/Tabs/Tabs.js +64 -0
  61. package/Textarea/Textarea.d.ts +14 -0
  62. package/Textarea/Textarea.js +64 -0
  63. package/Toast/Toast.d.ts +12 -0
  64. package/Toast/Toast.js +29 -0
  65. package/Tooltip/Tooltip.d.ts +17 -0
  66. package/Tooltip/Tooltip.js +68 -0
  67. package/Typography/Typography.d.ts +19 -0
  68. package/Typography/Typography.js +131 -0
  69. package/helpers.d.ts +4 -0
  70. package/helpers.js +13 -0
  71. package/icons.d.ts +1 -0
  72. package/icons.js +18 -0
  73. package/index.css +21 -0
  74. package/index.d.ts +35 -0
  75. package/index.js +183 -0
  76. package/lib/utils.d.ts +3 -0
  77. package/lib/utils.js +18 -0
  78. package/package.json +1 -1
  79. package/Alert/Alert.stories.tsx +0 -121
  80. package/Alert/Alert.tsx +0 -71
  81. package/AlertDialog/AlertDialog.stories.tsx +0 -665
  82. package/AlertDialog/AlertDialog.tsx +0 -241
  83. package/Avatar/Avatar.stories.tsx +0 -128
  84. package/Avatar/Avatar.tsx +0 -71
  85. package/Badge/Badge.stories.tsx +0 -76
  86. package/Badge/Badge.tsx +0 -39
  87. package/Breadcrumb/Breadcrumb.stories.tsx +0 -231
  88. package/Breadcrumb/Breadcrumb.tsx +0 -114
  89. package/Button/Button.stories.tsx +0 -684
  90. package/Button/Button.tsx +0 -90
  91. package/Calendar/Calendar.stories.tsx +0 -207
  92. package/Calendar/Calendar.tsx +0 -232
  93. package/Card/Card.stories.tsx +0 -136
  94. package/Card/Card.tsx +0 -96
  95. package/ChatBubble/ChatBubble.stories.tsx +0 -307
  96. package/ChatBubble/ChatBubble.tsx +0 -167
  97. package/Checkbox/Checkbox.stories.tsx +0 -137
  98. package/Checkbox/Checkbox.tsx +0 -53
  99. package/Drawer/Drawer.stories.tsx +0 -721
  100. package/Drawer/Drawer.tsx +0 -201
  101. package/DropdownMenu/DropdownMenu.stories.tsx +0 -251
  102. package/DropdownMenu/DropdownMenu.tsx +0 -199
  103. package/ErrorMessage/ErrorMessage.stories.tsx +0 -159
  104. package/ErrorMessage/ErrorMessage.tsx +0 -55
  105. package/Flex/Flex.tsx +0 -102
  106. package/IconButton/IconButton.stories.tsx +0 -566
  107. package/IconButton/IconButton.tsx +0 -95
  108. package/Input/Input.stories.tsx +0 -456
  109. package/Input/Input.tsx +0 -129
  110. package/InputOTP/InputOTP.stories.tsx +0 -246
  111. package/InputOTP/InputOTP.tsx +0 -127
  112. package/Label/Label.stories.tsx +0 -105
  113. package/Label/Label.tsx +0 -43
  114. package/Loader/Loader.stories.tsx +0 -170
  115. package/Loader/Loader.tsx +0 -62
  116. package/Popover/Popover.stories.tsx +0 -133
  117. package/Popover/Popover.tsx +0 -31
  118. package/Progress/Progress.stories.tsx +0 -146
  119. package/Progress/Progress.tsx +0 -67
  120. package/RadioGroup/RadioGroup.stories.tsx +0 -159
  121. package/RadioGroup/RadioGroup.tsx +0 -68
  122. package/ScrollArea/ScrollArea.stories.tsx +0 -136
  123. package/ScrollArea/ScrollArea.tsx +0 -46
  124. package/Select/Select.stories.tsx +0 -242
  125. package/Select/Select.tsx +0 -180
  126. package/Separator/Separator.stories.tsx +0 -110
  127. package/Separator/Separator.tsx +0 -29
  128. package/Skeleton/Skeleton.stories.tsx +0 -117
  129. package/Skeleton/Skeleton.tsx +0 -16
  130. package/Spinner/Spinner.stories.tsx +0 -210
  131. package/Spinner/Spinner.tsx +0 -78
  132. package/Switch/Switch.stories.tsx +0 -146
  133. package/Switch/Switch.tsx +0 -59
  134. package/Tabs/Tabs.stories.tsx +0 -197
  135. package/Tabs/Tabs.tsx +0 -74
  136. package/Textarea/Textarea.stories.tsx +0 -170
  137. package/Textarea/Textarea.tsx +0 -51
  138. package/Toast/Toast.stories.tsx +0 -285
  139. package/Toast/Toast.tsx +0 -59
  140. package/Tooltip/Tooltip.stories.tsx +0 -463
  141. package/Tooltip/Tooltip.tsx +0 -96
  142. package/Typography/Typography.stories.tsx +0 -235
  143. package/Typography/Typography.tsx +0 -171
  144. package/helpers.ts +0 -5
  145. package/icons.ts +0 -2
  146. package/index.ts +0 -136
  147. package/lib/utils.ts +0 -15
  148. package/tsconfig.json +0 -24
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.drawerOverlayVariants = exports.drawerContentVariants = void 0;
4
+ exports.Drawer = Drawer;
5
+ exports.DrawerPortal = DrawerPortal;
6
+ exports.DrawerOverlay = DrawerOverlay;
7
+ exports.DrawerTrigger = DrawerTrigger;
8
+ exports.DrawerClose = DrawerClose;
9
+ exports.DrawerContent = DrawerContent;
10
+ exports.DrawerHeader = DrawerHeader;
11
+ exports.DrawerFooter = DrawerFooter;
12
+ exports.DrawerBody = DrawerBody;
13
+ exports.DrawerTitle = DrawerTitle;
14
+ exports.DrawerDescription = DrawerDescription;
15
+ const jsx_runtime_1 = require("react/jsx-runtime");
16
+ const vaul_1 = require("vaul");
17
+ const class_variance_authority_1 = require("class-variance-authority");
18
+ const Loader_1 = require("../Loader/Loader");
19
+ const utils_1 = require("../lib/utils");
20
+ const drawerContentVariants = (0, class_variance_authority_1.cva)("group/drawer-content fixed z-50 flex h-auto flex-col bg-white", {
21
+ variants: {
22
+ direction: {
23
+ bottom: "inset-x-0 bottom-0 mt-24 max-h-[80vh] rounded-t-[10px]",
24
+ top: "inset-x-0 top-0 mb-24 max-h-[80vh] rounded-b-[10px]",
25
+ left: "inset-y-0 left-0 w-3/4 sm:max-w-sm rounded-r-[10px]",
26
+ right: "inset-y-0 right-0 w-3/4 sm:max-w-sm rounded-l-[10px]",
27
+ },
28
+ },
29
+ defaultVariants: {
30
+ direction: "bottom",
31
+ },
32
+ });
33
+ exports.drawerContentVariants = drawerContentVariants;
34
+ const drawerOverlayVariants = (0, class_variance_authority_1.cva)("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0");
35
+ exports.drawerOverlayVariants = drawerOverlayVariants;
36
+ function Drawer({ direction = "bottom", dismissible = true, ...props }) {
37
+ return ((0, jsx_runtime_1.jsx)(vaul_1.Drawer.Root, { direction: direction, dismissible: dismissible, ...props }));
38
+ }
39
+ function DrawerTrigger({ ...props }) {
40
+ return (0, jsx_runtime_1.jsx)(vaul_1.Drawer.Trigger, { ...props });
41
+ }
42
+ function DrawerPortal({ ...props }) {
43
+ return (0, jsx_runtime_1.jsx)(vaul_1.Drawer.Portal, { ...props });
44
+ }
45
+ function DrawerClose({ ...props }) {
46
+ return (0, jsx_runtime_1.jsx)(vaul_1.Drawer.Close, { ...props });
47
+ }
48
+ function DrawerOverlay({ className, ...props }) {
49
+ return ((0, jsx_runtime_1.jsx)(vaul_1.Drawer.Overlay, { className: (0, utils_1.cn)(drawerOverlayVariants(), className), ...props }));
50
+ }
51
+ function DrawerContent({ className, children, direction = "bottom", showHandle = true, loading = false, ...props }) {
52
+ const isVertical = direction === "bottom" || direction === "top";
53
+ return ((0, jsx_runtime_1.jsxs)(DrawerPortal, { children: [(0, jsx_runtime_1.jsx)(DrawerOverlay, {}), (0, jsx_runtime_1.jsxs)(vaul_1.Drawer.Content, { className: (0, utils_1.cn)(drawerContentVariants({ direction }), "shadow-lg", className), ...props, children: [showHandle && isVertical && ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("mx-auto shrink-0 rounded-full bg-neutral-200", direction === "bottom" ? "mt-2 mb-4" : "mb-2 mt-4", "h-[3px] w-[50px]") })), loading ? ((0, jsx_runtime_1.jsx)("div", { className: "flex flex-1 items-center justify-center p-8", children: (0, jsx_runtime_1.jsx)(Loader_1.Loader, { size: "large", color: "grey" }) })) : (children)] })] }));
54
+ }
55
+ function DrawerHeader({ className, ...props }) {
56
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("flex flex-col gap-1.5 p-4 text-center sm:text-left", className), ...props }));
57
+ }
58
+ function DrawerFooter({ className, ...props }) {
59
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("mt-auto flex flex-col gap-2 p-4", className), ...props }));
60
+ }
61
+ function DrawerBody({ className, ...props }) {
62
+ return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("flex-1 overflow-auto p-4", className), ...props }));
63
+ }
64
+ function DrawerTitle({ className, ...props }) {
65
+ return ((0, jsx_runtime_1.jsx)(vaul_1.Drawer.Title, { className: (0, utils_1.cn)("text-lg font-semibold text-neutral-900", className), ...props }));
66
+ }
67
+ function DrawerDescription({ className, ...props }) {
68
+ return ((0, jsx_runtime_1.jsx)(vaul_1.Drawer.Description, { className: (0, utils_1.cn)("text-sm text-neutral-500", className), ...props }));
69
+ }
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean;
16
+ } & React.RefAttributes<HTMLDivElement>>;
17
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const DropdownMenuShortcut: {
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
@@ -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.DropdownMenuRadioGroup = exports.DropdownMenuSubTrigger = exports.DropdownMenuSubContent = exports.DropdownMenuSub = exports.DropdownMenuPortal = exports.DropdownMenuGroup = exports.DropdownMenuShortcut = exports.DropdownMenuSeparator = exports.DropdownMenuLabel = exports.DropdownMenuRadioItem = exports.DropdownMenuCheckboxItem = exports.DropdownMenuItem = exports.DropdownMenuContent = exports.DropdownMenuTrigger = exports.DropdownMenu = void 0;
37
+ const jsx_runtime_1 = require("react/jsx-runtime");
38
+ const React = __importStar(require("react"));
39
+ const DropdownMenuPrimitive = __importStar(require("@radix-ui/react-dropdown-menu"));
40
+ const lucide_react_1 = require("lucide-react");
41
+ const utils_1 = require("../lib/utils");
42
+ const DropdownMenu = DropdownMenuPrimitive.Root;
43
+ exports.DropdownMenu = DropdownMenu;
44
+ const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
45
+ exports.DropdownMenuTrigger = DropdownMenuTrigger;
46
+ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
47
+ exports.DropdownMenuGroup = DropdownMenuGroup;
48
+ const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
49
+ exports.DropdownMenuPortal = DropdownMenuPortal;
50
+ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
51
+ exports.DropdownMenuSub = DropdownMenuSub;
52
+ const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
53
+ exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
54
+ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: (0, utils_1.cn)("flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none focus:bg-grey-100 data-[state=open]:bg-grey-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className), ...props, children: [children, (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "ml-auto" })] })));
55
+ exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
56
+ DropdownMenuSubTrigger.displayName =
57
+ DropdownMenuPrimitive.SubTrigger.displayName;
58
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.SubContent, { ref: ref, className: (0, utils_1.cn)("z-50 min-w-[8rem] overflow-hidden rounded-lg border border-grey-200 bg-white p-1 text-main-950 shadow-lg 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", className), ...props })));
59
+ exports.DropdownMenuSubContent = DropdownMenuSubContent;
60
+ DropdownMenuSubContent.displayName =
61
+ DropdownMenuPrimitive.SubContent.displayName;
62
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Portal, { children: (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: (0, utils_1.cn)("z-50 min-w-[8rem] overflow-hidden rounded-lg border border-grey-200 bg-white p-1 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", className), ...props }) })));
63
+ exports.DropdownMenuContent = DropdownMenuContent;
64
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
65
+ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Item, { ref: ref, className: (0, utils_1.cn)("relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none transition-colors focus:bg-grey-100 focus:text-main-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", inset && "pl-8", className), ...props })));
66
+ exports.DropdownMenuItem = DropdownMenuItem;
67
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
68
+ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: (0, utils_1.cn)("relative flex cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-grey-100 focus:text-main-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), checked: checked, ...props, children: [(0, jsx_runtime_1.jsx)("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { className: "size-4" }) }) }), children] })));
69
+ exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
70
+ DropdownMenuCheckboxItem.displayName =
71
+ DropdownMenuPrimitive.CheckboxItem.displayName;
72
+ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(DropdownMenuPrimitive.RadioItem, { ref: ref, className: (0, utils_1.cn)("relative flex cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-colors 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 left-2 flex size-3.5 items-center justify-center", children: (0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(lucide_react_1.Circle, { className: "size-2 fill-current" }) }) }), children] })));
73
+ exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
74
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
75
+ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Label, { ref: ref, className: (0, utils_1.cn)("px-2 py-1.5 text-sm font-semibold text-main-950", inset && "pl-8", className), ...props })));
76
+ exports.DropdownMenuLabel = DropdownMenuLabel;
77
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
78
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(DropdownMenuPrimitive.Separator, { ref: ref, className: (0, utils_1.cn)("-mx-1 my-1 h-px bg-grey-100", className), ...props })));
79
+ exports.DropdownMenuSeparator = DropdownMenuSeparator;
80
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
81
+ const DropdownMenuShortcut = ({ className, ...props }) => {
82
+ return ((0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)("ml-auto text-xs tracking-widest text-grey-400", className), ...props }));
83
+ };
84
+ exports.DropdownMenuShortcut = DropdownMenuShortcut;
85
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import { type TypographyColor } from "../Typography/Typography";
3
+ export interface ErrorMessageProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "color"> {
4
+ /**
5
+ * The field name to check for errors
6
+ */
7
+ name: string;
8
+ /**
9
+ * Object containing error messages keyed by field name
10
+ */
11
+ errors: Record<string, string | undefined>;
12
+ /**
13
+ * Optional object containing touched state keyed by field name
14
+ * If provided, error is only shown when field is touched
15
+ */
16
+ touched?: Record<string, boolean | undefined>;
17
+ /**
18
+ * Color variant for the error message
19
+ * @default "error-600"
20
+ */
21
+ color?: TypographyColor;
22
+ }
23
+ declare function ErrorMessage({ name, errors, touched, className, color, ...props }: ErrorMessageProps): import("react/jsx-runtime").JSX.Element | null;
24
+ declare namespace ErrorMessage {
25
+ var displayName: string;
26
+ }
27
+ export { ErrorMessage };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ErrorMessage = ErrorMessage;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Typography_1 = require("../Typography/Typography");
6
+ const utils_1 = require("../lib/utils");
7
+ function ErrorMessage({ name, errors, touched, className, color = "error-600", ...props }) {
8
+ const hasError = errors && typeof errors[name] === "string";
9
+ const shouldShow = touched ? hasError && touched[name] : hasError;
10
+ if (!shouldShow) {
11
+ return null;
12
+ }
13
+ return ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: color, className: (0, utils_1.cn)("mt-1", className), ...props, children: errors[name] }));
14
+ }
15
+ ErrorMessage.displayName = "ErrorMessage";
package/Flex/Flex.d.ts ADDED
@@ -0,0 +1,31 @@
1
+ import * as React from "react";
2
+ type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
3
+ type FlexAlign = "start" | "center" | "end" | "stretch" | "baseline";
4
+ type FlexJustify = "start" | "center" | "end" | "between" | "around" | "evenly";
5
+ type FlexWrap = "nowrap" | "wrap" | "wrap-reverse";
6
+ type FlexGap = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48;
7
+ declare const flexVariants: (props?: ({
8
+ direction?: "row" | "column" | "row-reverse" | "column-reverse" | null | undefined;
9
+ align?: "center" | "start" | "end" | "stretch" | "baseline" | null | undefined;
10
+ justify?: "center" | "start" | "end" | "between" | "around" | "evenly" | null | undefined;
11
+ wrap?: "nowrap" | "wrap" | "wrap-reverse" | null | undefined;
12
+ gap?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | null | undefined;
13
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
14
+ type FlexProps = React.HTMLAttributes<HTMLDivElement> & {
15
+ direction?: FlexDirection;
16
+ align?: FlexAlign;
17
+ justify?: FlexJustify;
18
+ wrap?: FlexWrap;
19
+ gap?: FlexGap;
20
+ as?: React.ElementType;
21
+ };
22
+ declare const Flex: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
23
+ direction?: FlexDirection;
24
+ align?: FlexAlign;
25
+ justify?: FlexJustify;
26
+ wrap?: FlexWrap;
27
+ gap?: FlexGap;
28
+ as?: React.ElementType;
29
+ } & React.RefAttributes<HTMLDivElement>>;
30
+ export { Flex, flexVariants };
31
+ export type { FlexProps, FlexDirection, FlexAlign, FlexJustify, FlexWrap, FlexGap };
package/Flex/Flex.js ADDED
@@ -0,0 +1,101 @@
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.flexVariants = exports.Flex = 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 flexVariants = (0, class_variance_authority_1.cva)("flex", {
42
+ variants: {
43
+ direction: {
44
+ row: "flex-row",
45
+ column: "flex-col",
46
+ "row-reverse": "flex-row-reverse",
47
+ "column-reverse": "flex-col-reverse",
48
+ },
49
+ align: {
50
+ start: "items-start",
51
+ center: "items-center",
52
+ end: "items-end",
53
+ stretch: "items-stretch",
54
+ baseline: "items-baseline",
55
+ },
56
+ justify: {
57
+ start: "justify-start",
58
+ center: "justify-center",
59
+ end: "justify-end",
60
+ between: "justify-between",
61
+ around: "justify-around",
62
+ evenly: "justify-evenly",
63
+ },
64
+ wrap: {
65
+ nowrap: "flex-nowrap",
66
+ wrap: "flex-wrap",
67
+ "wrap-reverse": "flex-wrap-reverse",
68
+ },
69
+ gap: {
70
+ 0: "gap-0",
71
+ 1: "gap-1",
72
+ 2: "gap-2",
73
+ 3: "gap-3",
74
+ 4: "gap-4",
75
+ 5: "gap-5",
76
+ 6: "gap-6",
77
+ 8: "gap-8",
78
+ 10: "gap-10",
79
+ 12: "gap-12",
80
+ 16: "gap-16",
81
+ 20: "gap-20",
82
+ 24: "gap-24",
83
+ 32: "gap-32",
84
+ 40: "gap-40",
85
+ 48: "gap-48",
86
+ },
87
+ },
88
+ defaultVariants: {
89
+ direction: "column",
90
+ align: "stretch",
91
+ justify: "start",
92
+ wrap: "nowrap",
93
+ gap: 0,
94
+ },
95
+ });
96
+ exports.flexVariants = flexVariants;
97
+ const Flex = React.forwardRef(({ className, direction, align, justify, wrap, gap, as: Component = "div", ...props }, ref) => {
98
+ return ((0, jsx_runtime_1.jsx)(Component, { ref: ref, className: (0, utils_1.cn)(flexVariants({ direction, align, justify, wrap, gap, className })), ...props }));
99
+ });
100
+ exports.Flex = Flex;
101
+ Flex.displayName = "Flex";
@@ -0,0 +1,23 @@
1
+ import * as React from "react";
2
+ type IconButtonVariant = "primary" | "secondary" | "outline" | "ghost";
3
+ type IconButtonSize = "mini" | "small" | "regular" | "large";
4
+ type IconButtonRoundness = "default" | "round";
5
+ declare const iconButtonVariants: (props?: ({
6
+ variant?: "secondary" | "outline" | "primary" | "ghost" | null | undefined;
7
+ size?: "small" | "regular" | "large" | "mini" | null | undefined;
8
+ roundness?: "default" | "round" | null | undefined;
9
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
+ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
11
+ variant?: IconButtonVariant;
12
+ size?: IconButtonSize;
13
+ roundness?: IconButtonRoundness;
14
+ /** Use the Slot component to render a different element */
15
+ asChild?: boolean;
16
+ /** The icon to render inside the button */
17
+ icon?: React.ReactNode;
18
+ /** Accessible label for screen readers */
19
+ "aria-label": string;
20
+ }
21
+ declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
22
+ export { IconButton, iconButtonVariants };
23
+ export type { IconButtonVariant, IconButtonSize, IconButtonRoundness };
@@ -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.iconButtonVariants = exports.IconButton = 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 iconButtonVariants = (0, class_variance_authority_1.cva)("inline-flex items-center justify-center shrink-0 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
+ },
50
+ size: {
51
+ mini: "size-6 [&_svg]:size-3",
52
+ small: "size-8 [&_svg]:size-4",
53
+ regular: "size-9 [&_svg]:size-4",
54
+ large: "size-10 [&_svg]:size-5",
55
+ },
56
+ roundness: {
57
+ default: "rounded-lg",
58
+ round: "rounded-full",
59
+ },
60
+ },
61
+ compoundVariants: [
62
+ {
63
+ size: "mini",
64
+ roundness: "default",
65
+ className: "rounded-md",
66
+ },
67
+ {
68
+ size: "small",
69
+ roundness: "default",
70
+ className: "rounded-md",
71
+ },
72
+ ],
73
+ defaultVariants: {
74
+ variant: "primary",
75
+ size: "regular",
76
+ roundness: "default",
77
+ },
78
+ });
79
+ exports.iconButtonVariants = iconButtonVariants;
80
+ const IconButton = React.forwardRef(({ className, variant, size, roundness, asChild = false, icon, children, ...props }, ref) => {
81
+ const Comp = asChild ? react_slot_1.Slot : "button";
82
+ return ((0, jsx_runtime_1.jsx)(Comp, { className: (0, utils_1.cn)(iconButtonVariants({ variant, size, roundness, className })), ref: ref, ...props, children: icon || children }));
83
+ });
84
+ exports.IconButton = IconButton;
85
+ IconButton.displayName = "IconButton";
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ type InputSize = "mini" | "small" | "regular" | "large";
3
+ type InputRoundness = "default" | "round";
4
+ type InputVariant = "default" | "error";
5
+ declare const inputVariants: (props?: ({
6
+ size?: "small" | "regular" | "large" | "mini" | null | undefined;
7
+ roundness?: "default" | "round" | null | undefined;
8
+ variant?: "default" | "error" | null | undefined;
9
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
+ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
11
+ size?: InputSize;
12
+ roundness?: InputRoundness;
13
+ variant?: InputVariant;
14
+ leftIcon?: React.ReactNode;
15
+ rightIcon?: React.ReactNode;
16
+ leftAddon?: React.ReactNode;
17
+ rightAddon?: React.ReactNode;
18
+ rightElement?: React.ReactNode;
19
+ }
20
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
21
+ export { Input, inputVariants };
22
+ export type { InputSize, InputRoundness, InputVariant };
package/Input/Input.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.inputVariants = exports.Input = 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 inputVariants = (0, class_variance_authority_1.cva)("flex w-full bg-white border font-normal font-sans transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-grey-400 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-grey-50", {
42
+ variants: {
43
+ size: {
44
+ mini: "h-6 px-3 text-xs rounded-md",
45
+ small: "h-8 px-3 text-sm rounded-md",
46
+ regular: "h-9 px-3 text-sm rounded-lg",
47
+ large: "h-10 px-3 text-base rounded-lg",
48
+ },
49
+ roundness: {
50
+ default: "",
51
+ round: "!rounded-full",
52
+ },
53
+ variant: {
54
+ default: "border-grey-300 focus-visible:border-grey-300 focus-visible:ring-[3px] focus-visible:ring-grey-300/50",
55
+ error: "border-error-500 focus-visible:border-error-500 focus-visible:ring-[3px] focus-visible:ring-error-200",
56
+ },
57
+ },
58
+ defaultVariants: {
59
+ size: "regular",
60
+ roundness: "default",
61
+ variant: "default",
62
+ },
63
+ });
64
+ exports.inputVariants = inputVariants;
65
+ const Input = React.forwardRef(({ className, type = "text", size, roundness, variant, leftIcon, rightIcon, leftAddon, rightAddon, rightElement, ...props }, ref) => {
66
+ const hasAddons = leftIcon || rightIcon || leftAddon || rightAddon || rightElement;
67
+ if (hasAddons) {
68
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("flex items-center gap-2 bg-white border font-sans transition-colors", "focus-within:ring-[3px]", variant === "error"
69
+ ? "border-error-500 focus-within:border-error-500 focus-within:ring-error-200"
70
+ : "border-grey-300 focus-within:border-grey-300 focus-within:ring-grey-300/50", size === "mini" && "h-6 pl-3 pr-0.5 text-xs rounded-md", size === "small" && "h-8 pl-3 pr-0.5 text-sm rounded-md", size === "regular" && "h-9 pl-3 pr-0.5 text-sm rounded-lg", size === "large" && "h-10 pl-3 pr-0.5 text-base rounded-lg", !size && "h-9 pl-3 pr-0.5 text-sm rounded-lg", !rightElement && "pr-3", roundness === "round" && "!rounded-full", props.disabled && "opacity-50 cursor-not-allowed bg-grey-50", className), children: [leftIcon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500 [&_svg]:size-4", children: leftIcon })), leftAddon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500", children: leftAddon })), (0, jsx_runtime_1.jsx)("input", { type: type, className: (0, utils_1.cn)("flex-1 min-w-0 bg-transparent border-0 outline-none placeholder:text-grey-400", "disabled:cursor-not-allowed"), ref: ref, ...props }), rightAddon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500", children: rightAddon })), rightIcon && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0 text-grey-500 [&_svg]:size-4", children: rightIcon })), rightElement && ((0, jsx_runtime_1.jsx)("span", { className: "shrink-0", children: rightElement }))] }));
71
+ }
72
+ return ((0, jsx_runtime_1.jsx)("input", { type: type, className: (0, utils_1.cn)(inputVariants({ size, roundness, variant, className })), ref: ref, ...props }));
73
+ });
74
+ exports.Input = Input;
75
+ Input.displayName = "Input";
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import { OTPInput } from "input-otp";
3
+ type InputOTPSlotSize = "sm" | "default" | "lg";
4
+ declare const inputOTPVariants: (props?: ({} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
5
+ export interface InputOTPProps extends Omit<React.ComponentPropsWithoutRef<typeof OTPInput>, "render"> {
6
+ children?: React.ReactNode;
7
+ }
8
+ declare const InputOTP: React.ForwardRefExoticComponent<InputOTPProps & React.RefAttributes<HTMLInputElement>>;
9
+ declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const inputOTPSlotVariants: (props?: ({
11
+ slotSize?: "default" | "sm" | "lg" | null | undefined;
12
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
13
+ export interface InputOTPSlotProps extends React.ComponentPropsWithoutRef<"div"> {
14
+ index: number;
15
+ slotSize?: InputOTPSlotSize;
16
+ }
17
+ declare const InputOTPSlot: React.ForwardRefExoticComponent<InputOTPSlotProps & React.RefAttributes<HTMLDivElement>>;
18
+ declare const InputOTPSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, inputOTPVariants, inputOTPSlotVariants, };
20
+ export type { InputOTPSlotSize };