@a2v2ai/uikit 0.0.38 → 0.0.39

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 (183) hide show
  1. package/Alert/Alert.d.ts +13 -0
  2. package/Alert/Alert.js +25 -0
  3. package/AlertDialog/AlertDialog.d.ts +43 -0
  4. package/AlertDialog/AlertDialog.js +71 -0
  5. package/Avatar/Avatar.d.ts +14 -0
  6. package/Avatar/Avatar.js +25 -0
  7. package/Badge/Badge.d.ts +11 -0
  8. package/Badge/Badge.js +23 -0
  9. package/Breadcrumb/Breadcrumb.d.ts +19 -0
  10. package/Breadcrumb/Breadcrumb.js +23 -0
  11. package/Button/Button.d.ts +23 -0
  12. package/Button/Button.js +52 -0
  13. package/Calendar/Calendar.d.ts +20 -0
  14. package/Calendar/Calendar.js +78 -0
  15. package/Card/Card.d.ts +16 -0
  16. package/Card/Card.js +28 -0
  17. package/Carousel/Carousel.d.ts +37 -0
  18. package/Carousel/Carousel.js +132 -0
  19. package/ChatBubble/ChatBubble.d.ts +33 -0
  20. package/ChatBubble/ChatBubble.js +107 -0
  21. package/Checkbox/Checkbox.d.ts +12 -0
  22. package/Checkbox/Checkbox.js +20 -0
  23. package/DataTable/DataTable.d.ts +35 -0
  24. package/DataTable/DataTable.js +51 -0
  25. package/Drawer/Drawer.d.ts +33 -0
  26. package/Drawer/Drawer.js +55 -0
  27. package/DropdownMenu/DropdownMenu.d.ts +27 -0
  28. package/DropdownMenu/DropdownMenu.js +35 -0
  29. package/ErrorMessage/ErrorMessage.d.ts +27 -0
  30. package/ErrorMessage/ErrorMessage.js +14 -0
  31. package/Flex/Flex.d.ts +31 -0
  32. package/Flex/Flex.js +64 -0
  33. package/IconButton/IconButton.d.ts +23 -0
  34. package/IconButton/IconButton.js +48 -0
  35. package/Input/Input.d.ts +27 -0
  36. package/Input/Input.js +42 -0
  37. package/InputOTP/InputOTP.d.ts +20 -0
  38. package/InputOTP/InputOTP.js +44 -0
  39. package/Label/Label.d.ts +13 -0
  40. package/Label/Label.js +19 -0
  41. package/Loader/Loader.d.ts +21 -0
  42. package/Loader/Loader.js +30 -0
  43. package/Menubar/Menubar.d.ts +26 -0
  44. package/Menubar/Menubar.js +54 -0
  45. package/Menubar/index.d.ts +1 -0
  46. package/Menubar/index.js +1 -0
  47. package/Pagination/Pagination.d.ts +35 -0
  48. package/Pagination/Pagination.js +37 -0
  49. package/Popover/Popover.d.ts +7 -0
  50. package/Popover/Popover.js +10 -0
  51. package/Progress/Progress.d.ts +17 -0
  52. package/Progress/Progress.js +33 -0
  53. package/RadioGroup/RadioGroup.d.ts +13 -0
  54. package/RadioGroup/RadioGroup.js +26 -0
  55. package/ScrollArea/ScrollArea.d.ts +5 -0
  56. package/ScrollArea/ScrollArea.js +11 -0
  57. package/Select/Select.d.ts +29 -0
  58. package/Select/Select.js +50 -0
  59. package/Separator/Separator.d.ts +4 -0
  60. package/Separator/Separator.js +7 -0
  61. package/Sidebar/Sidebar.d.ts +48 -0
  62. package/Sidebar/Sidebar.js +116 -0
  63. package/Sidebar/index.d.ts +2 -0
  64. package/Sidebar/index.js +1 -0
  65. package/Skeleton/Skeleton.d.ts +4 -0
  66. package/Skeleton/Skeleton.js +7 -0
  67. package/Slider/Slider.d.ts +6 -0
  68. package/Slider/Slider.js +7 -0
  69. package/Spinner/Spinner.d.ts +19 -0
  70. package/Spinner/Spinner.js +31 -0
  71. package/Switch/Switch.d.ts +12 -0
  72. package/Switch/Switch.js +30 -0
  73. package/Table/Table.d.ts +10 -0
  74. package/Table/Table.js +20 -0
  75. package/Tabs/Tabs.d.ts +15 -0
  76. package/Tabs/Tabs.js +24 -0
  77. package/Textarea/Textarea.d.ts +19 -0
  78. package/Textarea/Textarea.js +31 -0
  79. package/Toast/Toast.d.ts +12 -0
  80. package/Toast/Toast.js +25 -0
  81. package/Tooltip/Tooltip.d.ts +17 -0
  82. package/Tooltip/Tooltip.js +29 -0
  83. package/Typography/Typography.d.ts +20 -0
  84. package/Typography/Typography.js +71 -0
  85. package/helpers.d.ts +4 -0
  86. package/helpers.js +5 -0
  87. package/icons.d.ts +1 -0
  88. package/{icons.ts → icons.js} +1 -1
  89. package/index.css +68 -0
  90. package/index.d.ts +42 -0
  91. package/index.js +45 -0
  92. package/lib/typography-types.d.ts +4 -0
  93. package/lib/typography-types.js +118 -0
  94. package/lib/utils.d.ts +3 -0
  95. package/lib/utils.js +14 -0
  96. package/package.json +1 -1
  97. package/Alert/Alert.stories.tsx +0 -121
  98. package/Alert/Alert.tsx +0 -71
  99. package/AlertDialog/AlertDialog.stories.tsx +0 -665
  100. package/AlertDialog/AlertDialog.tsx +0 -241
  101. package/Avatar/Avatar.stories.tsx +0 -128
  102. package/Avatar/Avatar.tsx +0 -71
  103. package/Badge/Badge.stories.tsx +0 -76
  104. package/Badge/Badge.tsx +0 -39
  105. package/Breadcrumb/Breadcrumb.stories.tsx +0 -231
  106. package/Breadcrumb/Breadcrumb.tsx +0 -114
  107. package/Button/Button.stories.tsx +0 -684
  108. package/Button/Button.tsx +0 -107
  109. package/Calendar/Calendar.stories.tsx +0 -291
  110. package/Calendar/Calendar.tsx +0 -246
  111. package/Card/Card.stories.tsx +0 -136
  112. package/Card/Card.tsx +0 -96
  113. package/Carousel/Carousel.stories.tsx +0 -256
  114. package/Carousel/Carousel.tsx +0 -301
  115. package/ChatBubble/ChatBubble.stories.tsx +0 -339
  116. package/ChatBubble/ChatBubble.tsx +0 -179
  117. package/Checkbox/Checkbox.stories.tsx +0 -137
  118. package/Checkbox/Checkbox.tsx +0 -53
  119. package/DataTable/DataTable.stories.tsx +0 -400
  120. package/DataTable/DataTable.tsx +0 -207
  121. package/Drawer/Drawer.stories.tsx +0 -721
  122. package/Drawer/Drawer.tsx +0 -201
  123. package/DropdownMenu/DropdownMenu.stories.tsx +0 -251
  124. package/DropdownMenu/DropdownMenu.tsx +0 -199
  125. package/ErrorMessage/ErrorMessage.stories.tsx +0 -159
  126. package/ErrorMessage/ErrorMessage.tsx +0 -55
  127. package/Flex/Flex.stories.tsx +0 -390
  128. package/Flex/Flex.tsx +0 -102
  129. package/IconButton/IconButton.stories.tsx +0 -566
  130. package/IconButton/IconButton.tsx +0 -95
  131. package/Input/Input.stories.tsx +0 -566
  132. package/Input/Input.tsx +0 -168
  133. package/InputOTP/InputOTP.stories.tsx +0 -246
  134. package/InputOTP/InputOTP.tsx +0 -127
  135. package/Label/Label.stories.tsx +0 -110
  136. package/Label/Label.tsx +0 -44
  137. package/Loader/Loader.stories.tsx +0 -170
  138. package/Loader/Loader.tsx +0 -62
  139. package/Menubar/Menubar.stories.tsx +0 -382
  140. package/Menubar/Menubar.tsx +0 -274
  141. package/Menubar/index.ts +0 -18
  142. package/Pagination/Pagination.stories.tsx +0 -196
  143. package/Pagination/Pagination.tsx +0 -122
  144. package/Popover/Popover.stories.tsx +0 -133
  145. package/Popover/Popover.tsx +0 -31
  146. package/Progress/Progress.stories.tsx +0 -146
  147. package/Progress/Progress.tsx +0 -67
  148. package/RadioGroup/RadioGroup.stories.tsx +0 -159
  149. package/RadioGroup/RadioGroup.tsx +0 -68
  150. package/ScrollArea/ScrollArea.stories.tsx +0 -136
  151. package/ScrollArea/ScrollArea.tsx +0 -46
  152. package/Select/Select.stories.tsx +0 -378
  153. package/Select/Select.tsx +0 -230
  154. package/Separator/Separator.stories.tsx +0 -110
  155. package/Separator/Separator.tsx +0 -29
  156. package/Sidebar/Sidebar.stories.tsx +0 -340
  157. package/Sidebar/Sidebar.tsx +0 -414
  158. package/Sidebar/index.ts +0 -28
  159. package/Skeleton/Skeleton.stories.tsx +0 -117
  160. package/Skeleton/Skeleton.tsx +0 -16
  161. package/Slider/Slider.stories.tsx +0 -216
  162. package/Slider/Slider.tsx +0 -29
  163. package/Spinner/Spinner.stories.tsx +0 -210
  164. package/Spinner/Spinner.tsx +0 -78
  165. package/Switch/Switch.stories.tsx +0 -146
  166. package/Switch/Switch.tsx +0 -59
  167. package/Table/Table.stories.tsx +0 -510
  168. package/Table/Table.tsx +0 -114
  169. package/Tabs/Tabs.stories.tsx +0 -197
  170. package/Tabs/Tabs.tsx +0 -74
  171. package/Textarea/Textarea.stories.tsx +0 -187
  172. package/Textarea/Textarea.tsx +0 -73
  173. package/Toast/Toast.stories.tsx +0 -285
  174. package/Toast/Toast.tsx +0 -59
  175. package/Tooltip/Tooltip.stories.tsx +0 -463
  176. package/Tooltip/Tooltip.tsx +0 -96
  177. package/Typography/Typography.stories.tsx +0 -425
  178. package/Typography/Typography.tsx +0 -106
  179. package/helpers.ts +0 -5
  180. package/index.ts +0 -217
  181. package/lib/typography-types.ts +0 -223
  182. package/lib/utils.ts +0 -15
  183. package/tsconfig.json +0 -22
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ type AlertVariant = "default" | "destructive" | "success" | "warning" | "info";
3
+ declare const alertVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "success" | "warning" | "info" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ variant?: AlertVariant;
8
+ }
9
+ declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
10
+ declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
11
+ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
12
+ export { Alert, AlertTitle, AlertDescription, alertVariants };
13
+ export type { AlertVariant };
package/Alert/Alert.js ADDED
@@ -0,0 +1,25 @@
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 alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-current [&>svg~*]:pl-7", {
6
+ variants: {
7
+ variant: {
8
+ default: "bg-white text-main-950 border-grey-200",
9
+ destructive: "border-error-200 bg-error-50 text-error-700 [&>svg]:text-error-600",
10
+ success: "border-success-200 bg-success-50 text-success-700 [&>svg]:text-success-600",
11
+ warning: "border-warning-200 bg-warning-50 text-warning-700 [&>svg]:text-warning-600",
12
+ info: "border-accent-200 bg-accent-50 text-accent-700 [&>svg]:text-accent-600",
13
+ },
14
+ },
15
+ defaultVariants: {
16
+ variant: "default",
17
+ },
18
+ });
19
+ const Alert = React.forwardRef(({ className, variant, ...props }, ref) => (_jsx("div", { ref: ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props })));
20
+ Alert.displayName = "Alert";
21
+ const AlertTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("h5", { ref: ref, className: cn("mb-1 font-medium leading-none tracking-tight", className), ...props })));
22
+ AlertTitle.displayName = "AlertTitle";
23
+ const AlertDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props })));
24
+ AlertDescription.displayName = "AlertDescription";
25
+ export { Alert, AlertTitle, AlertDescription, alertVariants };
@@ -0,0 +1,43 @@
1
+ import * as React from "react";
2
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
+ type AlertDialogContentType = "desktop" | "mobile";
4
+ type AlertDialogHeaderType = "header" | "close-only" | "icon-button-close";
5
+ type AlertDialogFooterType = "buttons-right" | "full-width" | "single-full-width";
6
+ type AlertDialogCloseButtonVariant = "default" | "icon-button";
7
+ declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
8
+ declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
10
+ declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const alertDialogContentVariants: (props?: ({
12
+ type?: "desktop" | "mobile" | null | undefined;
13
+ scrollable?: boolean | null | undefined;
14
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
+ export interface AlertDialogContentProps extends React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> {
16
+ type?: AlertDialogContentType;
17
+ scrollable?: boolean;
18
+ showCloseButton?: boolean;
19
+ closeButtonVariant?: AlertDialogCloseButtonVariant;
20
+ loading?: boolean;
21
+ }
22
+ declare const AlertDialogContent: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
23
+ declare const alertDialogHeaderVariants: (props?: ({
24
+ type?: "header" | "close-only" | "icon-button-close" | null | undefined;
25
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
26
+ export interface AlertDialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
27
+ type?: AlertDialogHeaderType;
28
+ }
29
+ declare const AlertDialogHeader: React.ForwardRefExoticComponent<AlertDialogHeaderProps & React.RefAttributes<HTMLDivElement>>;
30
+ declare const alertDialogFooterVariants: (props?: ({
31
+ type?: "buttons-right" | "full-width" | "single-full-width" | null | undefined;
32
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
33
+ export interface AlertDialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {
34
+ type?: AlertDialogFooterType;
35
+ }
36
+ declare const AlertDialogFooter: React.ForwardRefExoticComponent<AlertDialogFooterProps & React.RefAttributes<HTMLDivElement>>;
37
+ declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
38
+ declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
39
+ declare const AlertDialogBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
40
+ declare const AlertDialogAction: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
41
+ declare const AlertDialogCancel: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
42
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogBody, AlertDialogAction, AlertDialogCancel, alertDialogContentVariants, alertDialogHeaderVariants, alertDialogFooterVariants, };
43
+ export type { AlertDialogContentType, AlertDialogHeaderType, AlertDialogFooterType, AlertDialogCloseButtonVariant };
@@ -0,0 +1,71 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
4
+ import { X, Loader2 } from "lucide-react";
5
+ import { cva } from "class-variance-authority";
6
+ import { Button } from "../Button/Button";
7
+ import { cn } from "../lib/utils";
8
+ const AlertDialog = AlertDialogPrimitive.Root;
9
+ const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
10
+ const AlertDialogPortal = AlertDialogPrimitive.Portal;
11
+ const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Overlay, { ref: ref, className: cn("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props })));
12
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
13
+ const alertDialogContentVariants = cva("fixed z-50 grid gap-4 bg-white border border-grey-200 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", {
14
+ variants: {
15
+ type: {
16
+ desktop: "left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] w-full max-w-[640px] rounded-lg",
17
+ mobile: "left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] w-full max-w-[320px] rounded-lg",
18
+ },
19
+ scrollable: {
20
+ true: "max-h-[80vh] overflow-y-auto",
21
+ false: "",
22
+ },
23
+ },
24
+ defaultVariants: {
25
+ type: "desktop",
26
+ scrollable: false,
27
+ },
28
+ });
29
+ const AlertDialogContent = React.forwardRef(({ className, children, type, scrollable, showCloseButton = true, closeButtonVariant = "default", loading = false, ...props }, ref) => (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsxs(AlertDialogPrimitive.Content, { ref: ref, className: cn(alertDialogContentVariants({ type, scrollable, className })), ...props, children: [loading && (_jsx("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-white/80 rounded-lg", children: _jsx(Loader2, { className: "size-8 text-main-600 animate-spin" }) })), children, showCloseButton && closeButtonVariant === "default" && !loading && (_jsxs(AlertDialogPrimitive.Cancel, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:shadow-[0_0_0_3px_#d4d4d4] disabled:pointer-events-none cursor-pointer", children: [_jsx(X, { className: "size-4 text-grey-600" }), _jsx("span", { className: "sr-only", children: "Close" })] })), showCloseButton && closeButtonVariant === "icon-button" && !loading && (_jsx(AlertDialogPrimitive.Cancel, { asChild: true, children: _jsxs(Button, { variant: "ghost", size: "small", className: "absolute right-2 top-2 size-9 p-0", children: [_jsx(X, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }) }))] })] })));
30
+ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
31
+ const alertDialogHeaderVariants = cva("flex p-4", {
32
+ variants: {
33
+ type: {
34
+ header: "flex-row items-center justify-between",
35
+ "close-only": "flex-col items-end",
36
+ "icon-button-close": "flex-col items-end justify-center pr-0",
37
+ },
38
+ },
39
+ defaultVariants: {
40
+ type: "header",
41
+ },
42
+ });
43
+ const AlertDialogHeader = React.forwardRef(({ className, type, ...props }, ref) => (_jsx("div", { ref: ref, className: cn(alertDialogHeaderVariants({ type, className })), ...props })));
44
+ AlertDialogHeader.displayName = "AlertDialogHeader";
45
+ const alertDialogFooterVariants = cva("flex gap-2 p-4", {
46
+ variants: {
47
+ type: {
48
+ "buttons-right": "flex-row items-center justify-end",
49
+ "full-width": "flex-row items-start",
50
+ "single-full-width": "flex-row items-start",
51
+ },
52
+ },
53
+ defaultVariants: {
54
+ type: "buttons-right",
55
+ },
56
+ });
57
+ const AlertDialogFooter = React.forwardRef(({ className, type, children, ...props }, ref) => (_jsx("div", { ref: ref, className: cn(alertDialogFooterVariants({ type, className })), ...props, children: type === "full-width" || type === "single-full-width" ? (_jsx("div", { className: "flex gap-2 w-full", children: React.Children.map(children, (child) => React.isValidElement(child)
58
+ ? React.cloneElement(child, {
59
+ className: cn("flex-1", child.props.className),
60
+ })
61
+ : child) })) : (children) })));
62
+ AlertDialogFooter.displayName = "AlertDialogFooter";
63
+ const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Title, { ref: ref, className: cn("text-2xl font-bold leading-[1.2] tracking-tight text-main-950 font-display", className), ...props })));
64
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
65
+ const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Description, { ref: ref, className: cn("text-sm text-grey-600", className), ...props })));
66
+ AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
67
+ const AlertDialogBody = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex-1 px-4 py-2", className), ...props })));
68
+ AlertDialogBody.displayName = "AlertDialogBody";
69
+ const AlertDialogAction = AlertDialogPrimitive.Action;
70
+ const AlertDialogCancel = AlertDialogPrimitive.Cancel;
71
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogBody, AlertDialogAction, AlertDialogCancel, alertDialogContentVariants, alertDialogHeaderVariants, alertDialogFooterVariants, };
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
+ type AvatarSize = "small" | "regular" | "large" | "xlarge";
4
+ declare const avatarVariants: (props?: ({
5
+ size?: "small" | "regular" | "large" | "xlarge" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export interface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> {
8
+ size?: AvatarSize;
9
+ }
10
+ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
11
+ declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
12
+ declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
13
+ export { Avatar, AvatarImage, AvatarFallback, avatarVariants };
14
+ export type { AvatarSize };
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../lib/utils";
6
+ const avatarVariants = cva("relative flex shrink-0 overflow-hidden rounded-full", {
7
+ variants: {
8
+ size: {
9
+ small: "size-8",
10
+ regular: "size-10",
11
+ large: "size-12",
12
+ xlarge: "size-16",
13
+ },
14
+ },
15
+ defaultVariants: {
16
+ size: "regular",
17
+ },
18
+ });
19
+ const Avatar = React.forwardRef(({ className, size, ...props }, ref) => (_jsx(AvatarPrimitive.Root, { ref: ref, className: cn(avatarVariants({ size }), className), ...props })));
20
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
21
+ const AvatarImage = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Image, { ref: ref, className: cn("aspect-square h-full w-full", className), ...props })));
22
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
23
+ const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Fallback, { ref: ref, className: cn("flex h-full w-full items-center justify-center rounded-full bg-grey-100 text-grey-600 font-medium", className), ...props })));
24
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
25
+ export { Avatar, AvatarImage, AvatarFallback, avatarVariants };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ type BadgeVariant = "default" | "secondary" | "outline" | "destructive" | "success" | "warning";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "success" | "warning" | "secondary" | "outline" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ variant?: BadgeVariant;
8
+ }
9
+ declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
10
+ export { Badge, badgeVariants };
11
+ export type { BadgeVariant };
package/Badge/Badge.js ADDED
@@ -0,0 +1,23 @@
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 badgeVariants = cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-accent-600 focus:ring-offset-2", {
6
+ variants: {
7
+ variant: {
8
+ default: "border-transparent bg-accent-600 text-white",
9
+ secondary: "border-transparent bg-grey-100 text-main-950",
10
+ outline: "border-grey-300 text-main-950",
11
+ destructive: "border-transparent bg-error-600 text-white",
12
+ success: "border-transparent bg-success-600 text-white",
13
+ warning: "border-transparent bg-warning-500 text-white",
14
+ },
15
+ },
16
+ defaultVariants: {
17
+ variant: "default",
18
+ },
19
+ });
20
+ function Badge({ className, variant, ...props }) {
21
+ return (_jsx("div", { className: cn(badgeVariants({ variant }), className), ...props }));
22
+ }
23
+ export { Badge, badgeVariants };
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
3
+ separator?: React.ReactNode;
4
+ } & React.RefAttributes<HTMLElement>>;
5
+ declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
+ declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
7
+ declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
8
+ asChild?: boolean;
9
+ } & React.RefAttributes<HTMLAnchorElement>>;
10
+ declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
11
+ declare const BreadcrumbSeparator: {
12
+ ({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ declare const BreadcrumbEllipsis: {
16
+ ({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
17
+ displayName: string;
18
+ };
19
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { ChevronRight, MoreHorizontal } from "lucide-react";
5
+ import { cn } from "../lib/utils";
6
+ const Breadcrumb = React.forwardRef(({ ...props }, ref) => _jsx("nav", { ref: ref, "aria-label": "breadcrumb", ...props }));
7
+ Breadcrumb.displayName = "Breadcrumb";
8
+ const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => (_jsx("ol", { ref: ref, className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-grey-500 sm:gap-2.5", className), ...props })));
9
+ BreadcrumbList.displayName = "BreadcrumbList";
10
+ const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => (_jsx("li", { ref: ref, className: cn("inline-flex items-center gap-1.5", className), ...props })));
11
+ BreadcrumbItem.displayName = "BreadcrumbItem";
12
+ const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
13
+ const Comp = asChild ? Slot : "a";
14
+ return (_jsx(Comp, { ref: ref, className: cn("transition-colors hover:text-main-950", className), ...props }));
15
+ });
16
+ BreadcrumbLink.displayName = "BreadcrumbLink";
17
+ const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: ref, role: "link", "aria-disabled": "true", "aria-current": "page", className: cn("font-normal text-main-950", className), ...props })));
18
+ BreadcrumbPage.displayName = "BreadcrumbPage";
19
+ const BreadcrumbSeparator = ({ children, className, ...props }) => (_jsx("li", { role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:size-3.5", className), ...props, children: children ?? _jsx(ChevronRight, {}) }));
20
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
21
+ const BreadcrumbEllipsis = ({ className, ...props }) => (_jsxs("span", { role: "presentation", "aria-hidden": "true", className: cn("flex h-9 w-9 items-center justify-center", className), ...props, children: [_jsx(MoreHorizontal, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More" })] }));
22
+ BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
23
+ export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -0,0 +1,23 @@
1
+ import * as React from "react";
2
+ type ButtonVariant = "primary" | "secondary" | "outline" | "ghost" | "ghost-muted" | "destructive";
3
+ type ButtonSize = "mini" | "small" | "regular" | "large";
4
+ type ButtonRoundness = "default" | "round";
5
+ type ButtonTextVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "body3" | "caption";
6
+ declare const buttonVariants: (props?: ({
7
+ variant?: "destructive" | "secondary" | "outline" | "primary" | "ghost" | "ghost-muted" | null | undefined;
8
+ size?: "small" | "regular" | "large" | "mini" | null | undefined;
9
+ roundness?: "default" | "round" | null | undefined;
10
+ textVariant?: "h5" | "h2" | "h3" | "caption" | "h1" | "h4" | "h6" | "subtitle1" | "subtitle2" | "body1" | "body2" | "body3" | null | undefined;
11
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
13
+ variant?: ButtonVariant;
14
+ size?: ButtonSize;
15
+ roundness?: ButtonRoundness;
16
+ textVariant?: ButtonTextVariant;
17
+ asChild?: boolean;
18
+ leftIcon?: React.ReactNode;
19
+ rightIcon?: React.ReactNode;
20
+ }
21
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
22
+ export { Button, buttonVariants };
23
+ export type { ButtonVariant, ButtonSize, ButtonRoundness, ButtonTextVariant };
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } 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 buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap font-normal font-sans cursor-pointer transition-colors focus-visible:outline-none focus-visible:shadow-[0_0_0_3px_#d4d4d4] disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:shrink-0", {
7
+ variants: {
8
+ variant: {
9
+ primary: "bg-accent-600 text-white hover:bg-accent-700",
10
+ secondary: "bg-main-100 text-main-950 hover:bg-main-200",
11
+ outline: "border border-main-300 bg-transparent text-main-950 hover:bg-main-100",
12
+ ghost: "bg-transparent text-main-600 hover:bg-main-100 hover:text-main-950",
13
+ "ghost-muted": "bg-transparent text-main-400 hover:bg-main-100 hover:text-main-600",
14
+ destructive: "bg-error-600 text-white hover:bg-error-700",
15
+ },
16
+ size: {
17
+ mini: "h-6 px-3 text-xs rounded-md [&_svg]:size-3",
18
+ small: "h-8 px-3 text-sm rounded-md [&_svg]:size-3.5",
19
+ regular: "h-9 px-4 text-sm rounded-lg [&_svg]:size-4",
20
+ large: "h-10 px-4 text-base rounded-lg [&_svg]:size-5",
21
+ },
22
+ roundness: {
23
+ default: "",
24
+ round: "!rounded-full",
25
+ },
26
+ textVariant: {
27
+ h1: "text-[64px] font-extrabold",
28
+ h2: "text-[48px] font-bold",
29
+ h3: "text-[32px] font-bold",
30
+ h4: "text-[24px] font-bold",
31
+ h5: "text-[20px] font-bold",
32
+ h6: "text-[20px] font-semibold",
33
+ subtitle1: "text-[20px] font-semibold",
34
+ subtitle2: "text-[18px] font-semibold",
35
+ body1: "text-[16px] font-normal",
36
+ body2: "text-[14px] font-normal",
37
+ body3: "text-[12px] font-normal",
38
+ caption: "text-[12px] font-light",
39
+ },
40
+ },
41
+ defaultVariants: {
42
+ variant: "primary",
43
+ size: "regular",
44
+ roundness: "default",
45
+ },
46
+ });
47
+ const Button = React.forwardRef(({ className, variant, size, roundness, textVariant, asChild = false, leftIcon, rightIcon, children, ...props }, ref) => {
48
+ const Comp = asChild ? Slot : "button";
49
+ return (_jsxs(Comp, { className: cn(buttonVariants({ variant, size, roundness, textVariant, className })), ref: ref, ...props, children: [leftIcon && _jsx("span", { className: "shrink-0", children: leftIcon }), children, rightIcon && _jsx("span", { className: "shrink-0", children: rightIcon })] }));
50
+ });
51
+ Button.displayName = "Button";
52
+ export { Button, buttonVariants };
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import { DayButton, DayPicker } from "react-day-picker";
3
+ import { Button } from "../Button/Button";
4
+ export type CalendarProps = React.ComponentProps<typeof DayPicker> & {
5
+ /**
6
+ * Variant for navigation buttons
7
+ * @default "ghost"
8
+ */
9
+ buttonVariant?: React.ComponentProps<typeof Button>["variant"];
10
+ /**
11
+ * Error message to display below the calendar
12
+ */
13
+ error?: string;
14
+ };
15
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, error, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
16
+ declare namespace Calendar {
17
+ var displayName: string;
18
+ }
19
+ declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
20
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,78 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, } from "lucide-react";
5
+ import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker";
6
+ import { cn } from "../lib/utils";
7
+ import { Button, buttonVariants } from "../Button/Button";
8
+ import { Typography } from "../Typography/Typography";
9
+ function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", formatters, components, error, ...props }) {
10
+ const defaultClassNames = getDefaultClassNames();
11
+ return (_jsxs("div", { className: "flex flex-col w-fit", children: [_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn("bg-white group/calendar p-3 rounded-lg border", error ? "border-error-500" : "border-grey-200", className), captionLayout: captionLayout, formatters: {
12
+ formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
13
+ ...formatters,
14
+ }, classNames: {
15
+ root: cn("w-fit", defaultClassNames.root),
16
+ months: cn("flex gap-4 flex-col md:flex-row relative", defaultClassNames.months),
17
+ month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
18
+ nav: cn("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between", defaultClassNames.nav),
19
+ button_previous: cn(buttonVariants({ variant: buttonVariant, size: "small" }), "size-8 aria-disabled:opacity-50 p-0 select-none", defaultClassNames.button_previous),
20
+ button_next: cn(buttonVariants({ variant: buttonVariant, size: "small" }), "size-8 aria-disabled:opacity-50 p-0 select-none", defaultClassNames.button_next),
21
+ month_caption: cn("flex items-center justify-center h-8 w-full px-8", defaultClassNames.month_caption),
22
+ dropdowns: cn("w-full flex items-center text-sm font-medium justify-center h-8 gap-1.5", defaultClassNames.dropdowns),
23
+ dropdown_root: cn("relative has-focus:border-grey-400 border border-grey-300 shadow-xs has-focus:ring-grey-300/50 has-focus:ring-[3px] rounded-md", defaultClassNames.dropdown_root),
24
+ dropdown: cn("absolute bg-white inset-0 opacity-0", defaultClassNames.dropdown),
25
+ caption_label: cn("select-none font-medium text-main-900", captionLayout === "label"
26
+ ? "text-sm"
27
+ : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-main-400 [&>svg]:size-3.5", defaultClassNames.caption_label),
28
+ table: "w-full border-collapse",
29
+ weekdays: cn("flex", defaultClassNames.weekdays),
30
+ weekday: cn("text-main-500 rounded-md flex-1 font-normal text-[0.8rem] select-none w-8 h-8 flex items-center justify-center", defaultClassNames.weekday),
31
+ week: cn("flex w-full mt-2", defaultClassNames.week),
32
+ week_number_header: cn("select-none w-8", defaultClassNames.week_number_header),
33
+ week_number: cn("text-[0.8rem] select-none text-main-400", defaultClassNames.week_number),
34
+ day: cn("relative w-8 h-8 p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day select-none", props.showWeekNumber
35
+ ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md"
36
+ : "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day),
37
+ range_start: cn("rounded-l-md bg-main-100", defaultClassNames.range_start),
38
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
39
+ range_end: cn("rounded-r-md bg-main-100", defaultClassNames.range_end),
40
+ today: cn("bg-main-100 text-main-900 rounded-md data-[selected=true]:rounded-none", defaultClassNames.today),
41
+ outside: cn("text-main-300 aria-selected:text-main-400", defaultClassNames.outside),
42
+ disabled: cn("text-main-300 opacity-50", defaultClassNames.disabled),
43
+ hidden: cn("invisible", defaultClassNames.hidden),
44
+ ...classNames,
45
+ }, components: {
46
+ Root: ({ className, rootRef, ...props }) => {
47
+ return (_jsx("div", { "data-slot": "calendar", ref: rootRef, className: cn(className), ...props }));
48
+ },
49
+ Chevron: ({ className, orientation, ...props }) => {
50
+ if (orientation === "left") {
51
+ return (_jsx(ChevronLeftIcon, { className: cn("size-4", className), ...props }));
52
+ }
53
+ if (orientation === "right") {
54
+ return (_jsx(ChevronRightIcon, { className: cn("size-4", className), ...props }));
55
+ }
56
+ return (_jsx(ChevronDownIcon, { className: cn("size-4", className), ...props }));
57
+ },
58
+ DayButton: CalendarDayButton,
59
+ WeekNumber: ({ children, ...props }) => {
60
+ return (_jsx("td", { ...props, children: _jsx("div", { className: "flex size-8 items-center justify-center text-center", children: children }) }));
61
+ },
62
+ ...components,
63
+ }, ...props }), error && (_jsx(Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
64
+ }
65
+ function CalendarDayButton({ className, day, modifiers, ...props }) {
66
+ const defaultClassNames = getDefaultClassNames();
67
+ const ref = React.useRef(null);
68
+ React.useEffect(() => {
69
+ if (modifiers.focused)
70
+ ref.current?.focus();
71
+ }, [modifiers.focused]);
72
+ return (_jsx(Button, { ref: ref, variant: "ghost", size: "small", "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected &&
73
+ !modifiers.range_start &&
74
+ !modifiers.range_end &&
75
+ !modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn("size-8 p-0 font-normal", "data-[selected-single=true]:bg-main-900 data-[selected-single=true]:text-white", "data-[range-middle=true]:bg-main-100 data-[range-middle=true]:text-main-900", "data-[range-start=true]:bg-main-900 data-[range-start=true]:text-white", "data-[range-end=true]:bg-main-900 data-[range-end=true]:text-white", "group-data-[focused=true]/day:border-grey-400 group-data-[focused=true]/day:ring-grey-300/50", "hover:bg-main-100 hover:text-main-900", "group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px]", "data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md", "data-[range-middle=true]:rounded-none", "data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md", defaultClassNames.day, className), ...props }));
76
+ }
77
+ Calendar.displayName = "Calendar";
78
+ export { Calendar, CalendarDayButton };
package/Card/Card.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ type CardVariant = "default" | "outline";
3
+ declare const cardVariants: (props?: ({
4
+ variant?: "default" | "outline" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ variant?: CardVariant;
8
+ }
9
+ declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
10
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, cardVariants };
16
+ export type { CardVariant };
package/Card/Card.js ADDED
@@ -0,0 +1,28 @@
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 cardVariants = cva("rounded-xl border bg-white text-main-950 shadow-sm", {
6
+ variants: {
7
+ variant: {
8
+ default: "border-grey-200",
9
+ outline: "border-grey-300 shadow-none",
10
+ },
11
+ },
12
+ defaultVariants: {
13
+ variant: "default",
14
+ },
15
+ });
16
+ const Card = React.forwardRef(({ className, variant, ...props }, ref) => (_jsx("div", { ref: ref, className: cn(cardVariants({ variant }), className), ...props })));
17
+ Card.displayName = "Card";
18
+ const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })));
19
+ CardHeader.displayName = "CardHeader";
20
+ const CardTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("font-semibold leading-none tracking-tight", className), ...props })));
21
+ CardTitle.displayName = "CardTitle";
22
+ const CardDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("text-sm text-grey-500", className), ...props })));
23
+ CardDescription.displayName = "CardDescription";
24
+ const CardContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("p-6 pt-0", className), ...props })));
25
+ CardContent.displayName = "CardContent";
26
+ const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex items-center p-6 pt-0", className), ...props })));
27
+ CardFooter.displayName = "CardFooter";
28
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, cardVariants };
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ import useEmblaCarousel, { type UseEmblaCarouselType } from "embla-carousel-react";
3
+ type CarouselApi = UseEmblaCarouselType[1];
4
+ type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
5
+ type CarouselOptions = UseCarouselParameters[0];
6
+ type CarouselPlugin = UseCarouselParameters[1];
7
+ type CarouselOrientation = "horizontal" | "vertical";
8
+ type CarouselContextProps = {
9
+ carouselRef: ReturnType<typeof useEmblaCarousel>[0];
10
+ api: ReturnType<typeof useEmblaCarousel>[1];
11
+ scrollPrev: () => void;
12
+ scrollNext: () => void;
13
+ canScrollPrev: boolean;
14
+ canScrollNext: boolean;
15
+ } & CarouselProps;
16
+ declare function useCarousel(): CarouselContextProps;
17
+ declare const carouselVariants: (props?: ({
18
+ orientation?: "horizontal" | "vertical" | null | undefined;
19
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
20
+ declare const carouselContentVariants: (props?: ({
21
+ orientation?: "horizontal" | "vertical" | null | undefined;
22
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
23
+ declare const carouselItemVariants: (props?: ({
24
+ orientation?: "horizontal" | "vertical" | null | undefined;
25
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
26
+ interface CarouselProps {
27
+ opts?: CarouselOptions;
28
+ plugins?: CarouselPlugin;
29
+ orientation?: CarouselOrientation;
30
+ setApi?: (api: CarouselApi) => void;
31
+ }
32
+ declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
33
+ declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
34
+ declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
35
+ declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import("..").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
36
+ declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import("..").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
37
+ export { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, carouselVariants, carouselContentVariants, carouselItemVariants, useCarousel, type CarouselApi, type CarouselProps, type CarouselOptions, type CarouselPlugin, type CarouselOrientation, };