@a2v2ai/uikit 0.0.28 → 0.0.30

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 (76) hide show
  1. package/Alert/Alert.d.ts +1 -1
  2. package/Alert/Alert.js +9 -48
  3. package/AlertDialog/AlertDialog.d.ts +3 -3
  4. package/AlertDialog/AlertDialog.js +19 -69
  5. package/Avatar/Avatar.d.ts +1 -1
  6. package/Avatar/Avatar.js +10 -49
  7. package/Badge/Badge.d.ts +1 -1
  8. package/Badge/Badge.js +7 -10
  9. package/Breadcrumb/Breadcrumb.js +14 -56
  10. package/Button/Button.d.ts +1 -1
  11. package/Button/Button.js +9 -46
  12. package/Calendar/Calendar.js +43 -79
  13. package/Card/Card.d.ts +1 -1
  14. package/Card/Card.js +12 -54
  15. package/Carousel/Carousel.d.ts +5 -5
  16. package/Carousel/Carousel.js +20 -67
  17. package/ChatBubble/ChatBubble.d.ts +2 -2
  18. package/ChatBubble/ChatBubble.js +9 -47
  19. package/Checkbox/Checkbox.d.ts +1 -1
  20. package/Checkbox/Checkbox.js +9 -46
  21. package/DataTable/DataTable.d.ts +21 -0
  22. package/DataTable/DataTable.js +20 -0
  23. package/Drawer/Drawer.d.ts +2 -2
  24. package/Drawer/Drawer.js +20 -34
  25. package/DropdownMenu/DropdownMenu.js +15 -65
  26. package/ErrorMessage/ErrorMessage.js +6 -7
  27. package/Flex/Flex.d.ts +1 -1
  28. package/Flex/Flex.js +7 -44
  29. package/IconButton/IconButton.d.ts +1 -1
  30. package/IconButton/IconButton.js +9 -46
  31. package/Input/Input.d.ts +1 -1
  32. package/Input/Input.js +12 -48
  33. package/InputOTP/InputOTP.d.ts +2 -2
  34. package/InputOTP/InputOTP.js +15 -56
  35. package/Label/Label.d.ts +1 -1
  36. package/Label/Label.js +11 -48
  37. package/Loader/Loader.d.ts +1 -1
  38. package/Loader/Loader.js +10 -47
  39. package/Menubar/Menubar.js +22 -71
  40. package/Menubar/index.js +1 -20
  41. package/Popover/Popover.js +6 -45
  42. package/Progress/Progress.d.ts +2 -2
  43. package/Progress/Progress.js +9 -47
  44. package/RadioGroup/RadioGroup.d.ts +1 -1
  45. package/RadioGroup/RadioGroup.js +10 -48
  46. package/ScrollArea/ScrollArea.js +8 -45
  47. package/Select/Select.d.ts +1 -1
  48. package/Select/Select.js +20 -65
  49. package/Separator/Separator.js +6 -42
  50. package/Sidebar/Sidebar.d.ts +2 -2
  51. package/Sidebar/Sidebar.js +22 -67
  52. package/Sidebar/index.js +1 -17
  53. package/Skeleton/Skeleton.js +5 -6
  54. package/Slider/Slider.js +6 -42
  55. package/Spinner/Spinner.d.ts +1 -1
  56. package/Spinner/Spinner.js +7 -44
  57. package/Switch/Switch.d.ts +1 -1
  58. package/Switch/Switch.js +9 -46
  59. package/Table/Table.js +12 -55
  60. package/Tabs/Tabs.d.ts +1 -1
  61. package/Tabs/Tabs.js +10 -50
  62. package/Textarea/Textarea.d.ts +1 -1
  63. package/Textarea/Textarea.js +9 -45
  64. package/Toast/Toast.js +10 -14
  65. package/Tooltip/Tooltip.d.ts +1 -1
  66. package/Tooltip/Tooltip.js +11 -50
  67. package/Typography/Typography.d.ts +1 -1
  68. package/Typography/Typography.js +12 -15
  69. package/helpers.js +4 -12
  70. package/icons.js +1 -17
  71. package/index.d.ts +1 -0
  72. package/index.js +41 -233
  73. package/lib/typography-types.js +2 -5
  74. package/lib/utils.js +5 -9
  75. package/package.json +2 -1
  76. package/tmpclaude-2407-cwd +1 -0
@@ -0,0 +1,21 @@
1
+ import type { ReactNode } from "react";
2
+ export interface DataTableColumn<T> {
3
+ key: string;
4
+ title: string;
5
+ titleRender?: () => ReactNode;
6
+ dataIndex?: keyof T;
7
+ width?: string | number;
8
+ render?: (value: unknown, record: T, index: number) => ReactNode;
9
+ className?: string;
10
+ }
11
+ export interface DataTableProps<T extends object> {
12
+ columns: DataTableColumn<T>[];
13
+ dataSource: T[];
14
+ rowKey: keyof T | ((record: T) => string);
15
+ className?: string;
16
+ }
17
+ declare const DataTable: {
18
+ <T extends object>({ columns, dataSource, rowKey, className, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
19
+ displayName: string;
20
+ };
21
+ export { DataTable };
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "../Table/Table";
3
+ const DataTable = ({ columns, dataSource, rowKey, className, }) => {
4
+ const getRowKey = (record) => {
5
+ if (typeof rowKey === "function") {
6
+ return rowKey(record);
7
+ }
8
+ return String(record[rowKey]);
9
+ };
10
+ const getCellValue = (record, column, index) => {
11
+ const value = column.dataIndex ? record[column.dataIndex] : undefined;
12
+ if (column.render) {
13
+ return column.render(value, record, index);
14
+ }
15
+ return value;
16
+ };
17
+ return (_jsxs(Table, { className: className, children: [_jsx(TableHeader, { children: _jsx(TableRow, { children: columns.map((column) => (_jsx(TableHead, { className: column.className, style: { width: column.width }, children: column.titleRender ? column.titleRender() : column.title }, column.key))) }) }), _jsx(TableBody, { children: dataSource.map((record, index) => (_jsx(TableRow, { children: columns.map((column) => (_jsx(TableCell, { children: getCellValue(record, column, index) }, column.key))) }, getRowKey(record)))) })] }));
18
+ };
19
+ DataTable.displayName = "DataTable";
20
+ export { DataTable };
@@ -3,8 +3,8 @@ import { Drawer as DrawerPrimitive } from "vaul";
3
3
  type DrawerDirection = "bottom" | "top" | "left" | "right";
4
4
  declare const drawerContentVariants: (props?: ({
5
5
  direction?: "left" | "right" | "bottom" | "top" | null | undefined;
6
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
- declare const drawerOverlayVariants: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare const drawerOverlayVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
8
8
  export type DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root> & {
9
9
  /** Direction the drawer slides in from */
10
10
  direction?: DrawerDirection;
package/Drawer/Drawer.js CHANGED
@@ -1,23 +1,10 @@
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", {
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Drawer as DrawerPrimitive } from "vaul";
4
+ import { cva } from "class-variance-authority";
5
+ import { Loader } from "../Loader/Loader";
6
+ import { cn } from "../lib/utils";
7
+ const drawerContentVariants = cva("group/drawer-content fixed z-50 flex h-auto flex-col bg-white", {
21
8
  variants: {
22
9
  direction: {
23
10
  bottom: "inset-x-0 bottom-0 mt-24 max-h-[80vh] rounded-t-[10px]",
@@ -30,40 +17,39 @@ const drawerContentVariants = (0, class_variance_authority_1.cva)("group/drawer-
30
17
  direction: "bottom",
31
18
  },
32
19
  });
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;
20
+ const drawerOverlayVariants = 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");
36
21
  function Drawer({ direction = "bottom", dismissible = true, ...props }) {
37
- return ((0, jsx_runtime_1.jsx)(vaul_1.Drawer.Root, { direction: direction, dismissible: dismissible, ...props }));
22
+ return (_jsx(DrawerPrimitive.Root, { direction: direction, dismissible: dismissible, ...props }));
38
23
  }
39
24
  function DrawerTrigger({ ...props }) {
40
- return (0, jsx_runtime_1.jsx)(vaul_1.Drawer.Trigger, { ...props });
25
+ return _jsx(DrawerPrimitive.Trigger, { ...props });
41
26
  }
42
27
  function DrawerPortal({ ...props }) {
43
- return (0, jsx_runtime_1.jsx)(vaul_1.Drawer.Portal, { ...props });
28
+ return _jsx(DrawerPrimitive.Portal, { ...props });
44
29
  }
45
30
  function DrawerClose({ ...props }) {
46
- return (0, jsx_runtime_1.jsx)(vaul_1.Drawer.Close, { ...props });
31
+ return _jsx(DrawerPrimitive.Close, { ...props });
47
32
  }
48
33
  function DrawerOverlay({ className, ...props }) {
49
- return ((0, jsx_runtime_1.jsx)(vaul_1.Drawer.Overlay, { className: (0, utils_1.cn)(drawerOverlayVariants(), className), ...props }));
34
+ return (_jsx(DrawerPrimitive.Overlay, { className: cn(drawerOverlayVariants(), className), ...props }));
50
35
  }
51
36
  function DrawerContent({ className, children, direction = "bottom", showHandle = true, loading = false, ...props }) {
52
37
  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)] })] }));
38
+ return (_jsxs(DrawerPortal, { children: [_jsx(DrawerOverlay, {}), _jsxs(DrawerPrimitive.Content, { className: cn(drawerContentVariants({ direction }), "shadow-lg", className), ...props, children: [showHandle && isVertical && (_jsx("div", { className: 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 ? (_jsx("div", { className: "flex flex-1 items-center justify-center p-8", children: _jsx(Loader, { size: "large", color: "grey" }) })) : (children)] })] }));
54
39
  }
55
40
  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 }));
41
+ return (_jsx("div", { className: cn("flex flex-col gap-1.5 p-4 text-center sm:text-left", className), ...props }));
57
42
  }
58
43
  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 }));
44
+ return (_jsx("div", { className: cn("mt-auto flex flex-col gap-2 p-4", className), ...props }));
60
45
  }
61
46
  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 }));
47
+ return (_jsx("div", { className: cn("flex-1 overflow-auto p-4", className), ...props }));
63
48
  }
64
49
  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 }));
50
+ return (_jsx(DrawerPrimitive.Title, { className: cn("text-lg font-semibold text-neutral-900", className), ...props }));
66
51
  }
67
52
  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 }));
53
+ return (_jsx(DrawerPrimitive.Description, { className: cn("text-sm text-neutral-500", className), ...props }));
69
54
  }
55
+ export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerBody, DrawerTitle, DrawerDescription, drawerContentVariants, drawerOverlayVariants, };
@@ -1,85 +1,35 @@
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");
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
4
+ import { Check, ChevronRight, Circle } from "lucide-react";
5
+ import { cn } from "../lib/utils";
42
6
  const DropdownMenu = DropdownMenuPrimitive.Root;
43
- exports.DropdownMenu = DropdownMenu;
44
7
  const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
45
- exports.DropdownMenuTrigger = DropdownMenuTrigger;
46
8
  const DropdownMenuGroup = DropdownMenuPrimitive.Group;
47
- exports.DropdownMenuGroup = DropdownMenuGroup;
48
9
  const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
49
- exports.DropdownMenuPortal = DropdownMenuPortal;
50
10
  const DropdownMenuSub = DropdownMenuPrimitive.Sub;
51
- exports.DropdownMenuSub = DropdownMenuSub;
52
11
  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;
12
+ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: 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, _jsx(ChevronRight, { className: "ml-auto" })] })));
56
13
  DropdownMenuSubTrigger.displayName =
57
14
  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;
15
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: 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 })));
60
16
  DropdownMenuSubContent.displayName =
61
17
  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;
18
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: 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 }) })));
64
19
  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;
20
+ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: 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 })));
67
21
  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;
22
+ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: 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: [_jsx("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "size-4" }) }) }), children] })));
70
23
  DropdownMenuCheckboxItem.displayName =
71
24
  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;
25
+ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, className: 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: [_jsx("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "size-2 fill-current" }) }) }), children] })));
74
26
  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;
27
+ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold text-main-950", inset && "pl-8", className), ...props })));
77
28
  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;
29
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-grey-100", className), ...props })));
80
30
  DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
81
31
  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 }));
32
+ return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest text-grey-400", className), ...props }));
83
33
  };
84
- exports.DropdownMenuShortcut = DropdownMenuShortcut;
85
34
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
35
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
@@ -1,15 +1,14 @@
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");
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Typography } from "../Typography/Typography";
4
+ import { cn } from "../lib/utils";
7
5
  function ErrorMessage({ name, errors, touched, className, color = "error-600", ...props }) {
8
6
  const hasError = errors && typeof errors[name] === "string";
9
7
  const shouldShow = touched ? hasError && touched[name] : hasError;
10
8
  if (!shouldShow) {
11
9
  return null;
12
10
  }
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] }));
11
+ return (_jsx(Typography, { variant: "caption", color: color, className: cn("mt-1", className), ...props, children: errors[name] }));
14
12
  }
15
13
  ErrorMessage.displayName = "ErrorMessage";
14
+ export { ErrorMessage };
package/Flex/Flex.d.ts CHANGED
@@ -10,7 +10,7 @@ declare const flexVariants: (props?: ({
10
10
  justify?: "center" | "start" | "end" | "between" | "around" | "evenly" | null | undefined;
11
11
  wrap?: "nowrap" | "wrap" | "wrap-reverse" | null | undefined;
12
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;
13
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
14
14
  type FlexProps = React.HTMLAttributes<HTMLDivElement> & {
15
15
  direction?: FlexDirection;
16
16
  align?: FlexAlign;
package/Flex/Flex.js CHANGED
@@ -1,44 +1,8 @@
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", {
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "../lib/utils";
5
+ const flexVariants = cva("flex", {
42
6
  variants: {
43
7
  direction: {
44
8
  row: "flex-row",
@@ -93,9 +57,8 @@ const flexVariants = (0, class_variance_authority_1.cva)("flex", {
93
57
  gap: 0,
94
58
  },
95
59
  });
96
- exports.flexVariants = flexVariants;
97
60
  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 }));
61
+ return (_jsx(Component, { ref: ref, className: cn(flexVariants({ direction, align, justify, wrap, gap, className })), ...props }));
99
62
  });
100
- exports.Flex = Flex;
101
63
  Flex.displayName = "Flex";
64
+ export { Flex, flexVariants };
@@ -6,7 +6,7 @@ declare const iconButtonVariants: (props?: ({
6
6
  variant?: "secondary" | "outline" | "primary" | "ghost" | null | undefined;
7
7
  size?: "small" | "regular" | "large" | "mini" | null | undefined;
8
8
  roundness?: "default" | "round" | null | undefined;
9
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
10
  export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
11
11
  variant?: IconButtonVariant;
12
12
  size?: IconButtonSize;
@@ -1,45 +1,9 @@
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", {
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../lib/utils";
6
+ const iconButtonVariants = 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
7
  variants: {
44
8
  variant: {
45
9
  primary: "bg-accent-600 text-white hover:bg-accent-700",
@@ -76,10 +40,9 @@ const iconButtonVariants = (0, class_variance_authority_1.cva)("inline-flex item
76
40
  roundness: "default",
77
41
  },
78
42
  });
79
- exports.iconButtonVariants = iconButtonVariants;
80
43
  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 }));
44
+ const Comp = asChild ? Slot : "button";
45
+ return (_jsx(Comp, { className: cn(iconButtonVariants({ variant, size, roundness, className })), ref: ref, ...props, children: icon || children }));
83
46
  });
84
- exports.IconButton = IconButton;
85
47
  IconButton.displayName = "IconButton";
48
+ export { IconButton, iconButtonVariants };
package/Input/Input.d.ts CHANGED
@@ -7,7 +7,7 @@ declare const inputVariants: (props?: ({
7
7
  size?: "small" | "regular" | "large" | "mini" | null | undefined;
8
8
  roundness?: "default" | "round" | null | undefined;
9
9
  variant?: "default" | "error" | null | undefined;
10
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
11
  export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
12
12
  size?: InputSize;
13
13
  roundness?: InputRoundness;
package/Input/Input.js CHANGED
@@ -1,46 +1,11 @@
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 Typography_1 = require("../Typography/Typography");
42
- const Label_1 = require("../Label/Label");
43
- 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", {
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "../lib/utils";
5
+ import { Typography } from "../Typography/Typography";
6
+ import { Label } from "../Label/Label";
7
+ import {} from "../lib/typography-types";
8
+ const inputVariants = 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", {
44
9
  variants: {
45
10
  size: {
46
11
  mini: "h-6 px-3 text-xs rounded-md",
@@ -63,16 +28,15 @@ const inputVariants = (0, class_variance_authority_1.cva)("flex w-full bg-white
63
28
  variant: "default",
64
29
  },
65
30
  });
66
- exports.inputVariants = inputVariants;
67
31
  const Input = React.forwardRef(({ className, type = "text", size, roundness, variant, label, labelVariant = "body2", labelColor = "main-800", leftIcon, rightIcon, leftAddon, rightAddon, rightElement, error, id, ...props }, ref) => {
68
32
  const hasAddons = leftIcon || rightIcon || leftAddon || rightAddon || rightElement;
69
33
  const computedVariant = error ? "error" : variant;
70
34
  if (hasAddons) {
71
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsxs)("div", { className: (0, utils_1.cn)("flex items-center gap-2 bg-white border font-sans transition-colors w-full", "focus-within:ring-[3px]", computedVariant === "error"
35
+ return (_jsxs("div", { className: "flex flex-col gap-2 w-full", children: [label && (_jsx(Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), _jsxs("div", { className: cn("flex items-center gap-2 bg-white border font-sans transition-colors w-full", "focus-within:ring-[3px]", computedVariant === "error"
72
36
  ? "border-error-500 focus-within:border-error-500 focus-within:ring-error-200"
73
- : "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, id: id, 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 }))] }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
37
+ : "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 && (_jsx("span", { className: "shrink-0 text-grey-500 [&_svg]:size-4", children: leftIcon })), leftAddon && (_jsx("span", { className: "shrink-0 text-grey-500", children: leftAddon })), _jsx("input", { type: type, id: id, className: cn("flex-1 min-w-0 bg-transparent border-0 outline-none placeholder:text-grey-400", "disabled:cursor-not-allowed"), ref: ref, ...props }), rightAddon && (_jsx("span", { className: "shrink-0 text-grey-500", children: rightAddon })), rightIcon && (_jsx("span", { className: "shrink-0 text-grey-500 [&_svg]:size-4", children: rightIcon })), rightElement && (_jsx("span", { className: "shrink-0", children: rightElement }))] }), error && (_jsx(Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
74
38
  }
75
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsx)("input", { type: type, id: id, className: (0, utils_1.cn)(inputVariants({ size, roundness, variant: computedVariant, className })), ref: ref, ...props }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
39
+ return (_jsxs("div", { className: "flex flex-col gap-2 w-full", children: [label && (_jsx(Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), _jsx("input", { type: type, id: id, className: cn(inputVariants({ size, roundness, variant: computedVariant, className })), ref: ref, ...props }), error && (_jsx(Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
76
40
  });
77
- exports.Input = Input;
78
41
  Input.displayName = "Input";
42
+ export { Input, inputVariants };
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { OTPInput } from "input-otp";
3
3
  type InputOTPSlotSize = "sm" | "default" | "lg";
4
- declare const inputOTPVariants: (props?: ({} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
4
+ declare const inputOTPVariants: (props?: ({} & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
5
  export interface InputOTPProps extends Omit<React.ComponentPropsWithoutRef<typeof OTPInput>, "render"> {
6
6
  children?: React.ReactNode;
7
7
  }
@@ -9,7 +9,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<InputOTPProps & React.Re
9
9
  declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
10
  declare const inputOTPSlotVariants: (props?: ({
11
11
  slotSize?: "default" | "sm" | "lg" | null | undefined;
12
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
13
  export interface InputOTPSlotProps extends React.ComponentPropsWithoutRef<"div"> {
14
14
  index: number;
15
15
  slotSize?: InputOTPSlotSize;