@a2v2ai/uikit 0.0.37 → 0.0.38

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 (182) hide show
  1. package/Alert/Alert.stories.tsx +121 -0
  2. package/Alert/Alert.tsx +71 -0
  3. package/AlertDialog/AlertDialog.stories.tsx +665 -0
  4. package/AlertDialog/AlertDialog.tsx +241 -0
  5. package/Avatar/Avatar.stories.tsx +128 -0
  6. package/Avatar/Avatar.tsx +71 -0
  7. package/Badge/Badge.stories.tsx +76 -0
  8. package/Badge/Badge.tsx +39 -0
  9. package/Breadcrumb/Breadcrumb.stories.tsx +231 -0
  10. package/Breadcrumb/Breadcrumb.tsx +114 -0
  11. package/Button/Button.stories.tsx +684 -0
  12. package/Button/Button.tsx +107 -0
  13. package/Calendar/Calendar.stories.tsx +291 -0
  14. package/Calendar/Calendar.tsx +246 -0
  15. package/Card/Card.stories.tsx +136 -0
  16. package/Card/Card.tsx +96 -0
  17. package/Carousel/Carousel.stories.tsx +256 -0
  18. package/Carousel/Carousel.tsx +301 -0
  19. package/ChatBubble/ChatBubble.stories.tsx +339 -0
  20. package/ChatBubble/ChatBubble.tsx +179 -0
  21. package/Checkbox/Checkbox.stories.tsx +137 -0
  22. package/Checkbox/Checkbox.tsx +53 -0
  23. package/DataTable/DataTable.stories.tsx +400 -0
  24. package/DataTable/DataTable.tsx +207 -0
  25. package/Drawer/Drawer.stories.tsx +721 -0
  26. package/Drawer/Drawer.tsx +201 -0
  27. package/DropdownMenu/DropdownMenu.stories.tsx +251 -0
  28. package/DropdownMenu/DropdownMenu.tsx +199 -0
  29. package/ErrorMessage/ErrorMessage.stories.tsx +159 -0
  30. package/ErrorMessage/ErrorMessage.tsx +55 -0
  31. package/Flex/Flex.stories.tsx +390 -0
  32. package/Flex/Flex.tsx +102 -0
  33. package/IconButton/IconButton.stories.tsx +566 -0
  34. package/IconButton/IconButton.tsx +95 -0
  35. package/Input/Input.stories.tsx +566 -0
  36. package/Input/Input.tsx +168 -0
  37. package/InputOTP/InputOTP.stories.tsx +246 -0
  38. package/InputOTP/InputOTP.tsx +127 -0
  39. package/Label/Label.stories.tsx +110 -0
  40. package/Label/Label.tsx +44 -0
  41. package/Loader/Loader.stories.tsx +170 -0
  42. package/Loader/Loader.tsx +62 -0
  43. package/Menubar/Menubar.stories.tsx +382 -0
  44. package/Menubar/Menubar.tsx +274 -0
  45. package/Menubar/index.ts +18 -0
  46. package/Pagination/Pagination.stories.tsx +196 -0
  47. package/Pagination/Pagination.tsx +122 -0
  48. package/Popover/Popover.stories.tsx +133 -0
  49. package/Popover/Popover.tsx +31 -0
  50. package/Progress/Progress.stories.tsx +146 -0
  51. package/Progress/Progress.tsx +67 -0
  52. package/RadioGroup/RadioGroup.stories.tsx +159 -0
  53. package/RadioGroup/RadioGroup.tsx +68 -0
  54. package/ScrollArea/ScrollArea.stories.tsx +136 -0
  55. package/ScrollArea/ScrollArea.tsx +46 -0
  56. package/Select/Select.stories.tsx +378 -0
  57. package/Select/Select.tsx +230 -0
  58. package/Separator/Separator.stories.tsx +110 -0
  59. package/Separator/Separator.tsx +29 -0
  60. package/Sidebar/Sidebar.stories.tsx +340 -0
  61. package/Sidebar/Sidebar.tsx +414 -0
  62. package/Sidebar/index.ts +28 -0
  63. package/Skeleton/Skeleton.stories.tsx +117 -0
  64. package/Skeleton/Skeleton.tsx +16 -0
  65. package/Slider/Slider.stories.tsx +216 -0
  66. package/Slider/Slider.tsx +29 -0
  67. package/Spinner/Spinner.stories.tsx +210 -0
  68. package/Spinner/Spinner.tsx +78 -0
  69. package/Switch/Switch.stories.tsx +146 -0
  70. package/Switch/Switch.tsx +59 -0
  71. package/Table/Table.stories.tsx +510 -0
  72. package/Table/Table.tsx +114 -0
  73. package/Tabs/Tabs.stories.tsx +197 -0
  74. package/Tabs/Tabs.tsx +74 -0
  75. package/Textarea/Textarea.stories.tsx +187 -0
  76. package/Textarea/Textarea.tsx +73 -0
  77. package/Toast/Toast.stories.tsx +285 -0
  78. package/Toast/Toast.tsx +59 -0
  79. package/Tooltip/Tooltip.stories.tsx +463 -0
  80. package/Tooltip/Tooltip.tsx +96 -0
  81. package/Typography/Typography.stories.tsx +425 -0
  82. package/Typography/Typography.tsx +106 -0
  83. package/helpers.ts +5 -0
  84. package/{icons.js → icons.ts} +1 -1
  85. package/index.ts +217 -0
  86. package/lib/typography-types.ts +223 -0
  87. package/lib/utils.ts +15 -0
  88. package/package.json +5 -2
  89. package/tsconfig.json +22 -0
  90. package/Alert/Alert.d.ts +0 -13
  91. package/Alert/Alert.js +0 -25
  92. package/AlertDialog/AlertDialog.d.ts +0 -43
  93. package/AlertDialog/AlertDialog.js +0 -71
  94. package/Avatar/Avatar.d.ts +0 -14
  95. package/Avatar/Avatar.js +0 -25
  96. package/Badge/Badge.d.ts +0 -11
  97. package/Badge/Badge.js +0 -23
  98. package/Breadcrumb/Breadcrumb.d.ts +0 -19
  99. package/Breadcrumb/Breadcrumb.js +0 -23
  100. package/Button/Button.d.ts +0 -23
  101. package/Button/Button.js +0 -52
  102. package/Calendar/Calendar.d.ts +0 -20
  103. package/Calendar/Calendar.js +0 -78
  104. package/Card/Card.d.ts +0 -16
  105. package/Card/Card.js +0 -28
  106. package/Carousel/Carousel.d.ts +0 -37
  107. package/Carousel/Carousel.js +0 -132
  108. package/ChatBubble/ChatBubble.d.ts +0 -33
  109. package/ChatBubble/ChatBubble.js +0 -107
  110. package/Checkbox/Checkbox.d.ts +0 -12
  111. package/Checkbox/Checkbox.js +0 -20
  112. package/DataTable/DataTable.d.ts +0 -35
  113. package/DataTable/DataTable.js +0 -51
  114. package/Drawer/Drawer.d.ts +0 -33
  115. package/Drawer/Drawer.js +0 -55
  116. package/DropdownMenu/DropdownMenu.d.ts +0 -27
  117. package/DropdownMenu/DropdownMenu.js +0 -35
  118. package/ErrorMessage/ErrorMessage.d.ts +0 -27
  119. package/ErrorMessage/ErrorMessage.js +0 -14
  120. package/Flex/Flex.d.ts +0 -31
  121. package/Flex/Flex.js +0 -64
  122. package/IconButton/IconButton.d.ts +0 -23
  123. package/IconButton/IconButton.js +0 -48
  124. package/Input/Input.d.ts +0 -27
  125. package/Input/Input.js +0 -42
  126. package/InputOTP/InputOTP.d.ts +0 -20
  127. package/InputOTP/InputOTP.js +0 -44
  128. package/Label/Label.d.ts +0 -13
  129. package/Label/Label.js +0 -19
  130. package/Loader/Loader.d.ts +0 -21
  131. package/Loader/Loader.js +0 -30
  132. package/Menubar/Menubar.d.ts +0 -26
  133. package/Menubar/Menubar.js +0 -54
  134. package/Menubar/index.d.ts +0 -1
  135. package/Menubar/index.js +0 -1
  136. package/Pagination/Pagination.d.ts +0 -35
  137. package/Pagination/Pagination.js +0 -37
  138. package/Popover/Popover.d.ts +0 -7
  139. package/Popover/Popover.js +0 -10
  140. package/Progress/Progress.d.ts +0 -17
  141. package/Progress/Progress.js +0 -33
  142. package/RadioGroup/RadioGroup.d.ts +0 -13
  143. package/RadioGroup/RadioGroup.js +0 -26
  144. package/ScrollArea/ScrollArea.d.ts +0 -5
  145. package/ScrollArea/ScrollArea.js +0 -11
  146. package/Select/Select.d.ts +0 -29
  147. package/Select/Select.js +0 -50
  148. package/Separator/Separator.d.ts +0 -4
  149. package/Separator/Separator.js +0 -7
  150. package/Sidebar/Sidebar.d.ts +0 -48
  151. package/Sidebar/Sidebar.js +0 -116
  152. package/Sidebar/index.d.ts +0 -2
  153. package/Sidebar/index.js +0 -1
  154. package/Skeleton/Skeleton.d.ts +0 -4
  155. package/Skeleton/Skeleton.js +0 -7
  156. package/Slider/Slider.d.ts +0 -6
  157. package/Slider/Slider.js +0 -7
  158. package/Spinner/Spinner.d.ts +0 -19
  159. package/Spinner/Spinner.js +0 -31
  160. package/Switch/Switch.d.ts +0 -12
  161. package/Switch/Switch.js +0 -30
  162. package/Table/Table.d.ts +0 -10
  163. package/Table/Table.js +0 -20
  164. package/Tabs/Tabs.d.ts +0 -15
  165. package/Tabs/Tabs.js +0 -24
  166. package/Textarea/Textarea.d.ts +0 -19
  167. package/Textarea/Textarea.js +0 -31
  168. package/Toast/Toast.d.ts +0 -12
  169. package/Toast/Toast.js +0 -25
  170. package/Tooltip/Tooltip.d.ts +0 -17
  171. package/Tooltip/Tooltip.js +0 -29
  172. package/Typography/Typography.d.ts +0 -20
  173. package/Typography/Typography.js +0 -43
  174. package/helpers.d.ts +0 -4
  175. package/helpers.js +0 -5
  176. package/icons.d.ts +0 -1
  177. package/index.d.ts +0 -42
  178. package/index.js +0 -45
  179. package/lib/typography-types.d.ts +0 -4
  180. package/lib/typography-types.js +0 -90
  181. package/lib/utils.d.ts +0 -3
  182. package/lib/utils.js +0 -14
package/index.ts ADDED
@@ -0,0 +1,217 @@
1
+ // Styles
2
+ import "./index.css"
3
+
4
+ // Components
5
+ export { Alert, AlertTitle, AlertDescription, alertVariants, type AlertProps, type AlertVariant } from "./Alert/Alert"
6
+ export { Avatar, AvatarImage, AvatarFallback, avatarVariants, type AvatarProps, type AvatarSize } from "./Avatar/Avatar"
7
+ export { Badge, badgeVariants, type BadgeProps, type BadgeVariant } from "./Badge/Badge"
8
+ export {
9
+ Breadcrumb,
10
+ BreadcrumbList,
11
+ BreadcrumbItem,
12
+ BreadcrumbLink,
13
+ BreadcrumbPage,
14
+ BreadcrumbSeparator,
15
+ BreadcrumbEllipsis,
16
+ } from "./Breadcrumb/Breadcrumb"
17
+ export { Button, buttonVariants, type ButtonProps, type ButtonVariant, type ButtonSize, type ButtonRoundness } from "./Button/Button"
18
+ export { Calendar, CalendarDayButton, type CalendarProps } from "./Calendar/Calendar"
19
+ export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, cardVariants, type CardProps, type CardVariant } from "./Card/Card"
20
+ export {
21
+ Carousel,
22
+ CarouselContent,
23
+ CarouselItem,
24
+ CarouselPrevious,
25
+ CarouselNext,
26
+ carouselVariants,
27
+ carouselContentVariants,
28
+ carouselItemVariants,
29
+ useCarousel,
30
+ type CarouselApi,
31
+ type CarouselProps,
32
+ type CarouselOptions,
33
+ type CarouselPlugin,
34
+ type CarouselOrientation,
35
+ } from "./Carousel/Carousel"
36
+ export { ChatBubble, chatBubbleVariants, bubbleContentVariants, type ChatBubbleProps, type ChatBubbleSide, type ChatBubbleColor, type ChatBubbleTheme, type ChatBubbleSize } from "./ChatBubble/ChatBubble"
37
+ export { Checkbox, checkboxVariants, type CheckboxProps, type CheckboxSize } from "./Checkbox/Checkbox"
38
+ export {
39
+ AlertDialog,
40
+ AlertDialogPortal,
41
+ AlertDialogOverlay,
42
+ AlertDialogTrigger,
43
+ AlertDialogContent,
44
+ AlertDialogHeader,
45
+ AlertDialogFooter,
46
+ AlertDialogTitle,
47
+ AlertDialogDescription,
48
+ AlertDialogBody,
49
+ AlertDialogAction,
50
+ AlertDialogCancel,
51
+ alertDialogContentVariants,
52
+ alertDialogHeaderVariants,
53
+ alertDialogFooterVariants,
54
+ type AlertDialogContentProps,
55
+ type AlertDialogHeaderProps,
56
+ type AlertDialogFooterProps,
57
+ type AlertDialogContentType,
58
+ type AlertDialogHeaderType,
59
+ type AlertDialogFooterType,
60
+ type AlertDialogCloseButtonVariant,
61
+ } from "./AlertDialog/AlertDialog"
62
+ export {
63
+ Drawer,
64
+ DrawerPortal,
65
+ DrawerOverlay,
66
+ DrawerTrigger,
67
+ DrawerClose,
68
+ DrawerContent,
69
+ DrawerHeader,
70
+ DrawerFooter,
71
+ DrawerBody,
72
+ DrawerTitle,
73
+ DrawerDescription,
74
+ drawerContentVariants,
75
+ drawerOverlayVariants,
76
+ type DrawerProps,
77
+ type DrawerContentProps,
78
+ type DrawerDirection,
79
+ } from "./Drawer/Drawer"
80
+ export {
81
+ DropdownMenu,
82
+ DropdownMenuTrigger,
83
+ DropdownMenuContent,
84
+ DropdownMenuItem,
85
+ DropdownMenuCheckboxItem,
86
+ DropdownMenuRadioItem,
87
+ DropdownMenuLabel,
88
+ DropdownMenuSeparator,
89
+ DropdownMenuShortcut,
90
+ DropdownMenuGroup,
91
+ DropdownMenuPortal,
92
+ DropdownMenuSub,
93
+ DropdownMenuSubContent,
94
+ DropdownMenuSubTrigger,
95
+ DropdownMenuRadioGroup,
96
+ } from "./DropdownMenu/DropdownMenu"
97
+ export { ErrorMessage, type ErrorMessageProps } from "./ErrorMessage/ErrorMessage"
98
+ export { Flex, flexVariants, type FlexProps, type FlexDirection, type FlexAlign, type FlexJustify, type FlexWrap, type FlexGap } from "./Flex/Flex"
99
+ export { IconButton, iconButtonVariants, type IconButtonProps, type IconButtonVariant, type IconButtonSize, type IconButtonRoundness } from "./IconButton/IconButton"
100
+ export { Input, inputVariants, type InputProps, type InputSize, type InputRoundness, type InputVariant } from "./Input/Input"
101
+ export {
102
+ InputOTP,
103
+ InputOTPGroup,
104
+ InputOTPSlot,
105
+ InputOTPSeparator,
106
+ inputOTPVariants,
107
+ inputOTPSlotVariants,
108
+ type InputOTPProps,
109
+ type InputOTPSlotProps,
110
+ type InputOTPSlotSize,
111
+ } from "./InputOTP/InputOTP"
112
+ export { Label, labelVariants, type LabelProps } from "./Label/Label"
113
+ export { Loader, loaderVariants, type LoaderProps, type LoaderSize, type LoaderColor } from "./Loader/Loader"
114
+ export {
115
+ Menubar,
116
+ MenubarPortal,
117
+ MenubarMenu,
118
+ MenubarTrigger,
119
+ MenubarContent,
120
+ MenubarGroup,
121
+ MenubarSeparator,
122
+ MenubarLabel,
123
+ MenubarItem,
124
+ MenubarShortcut,
125
+ MenubarCheckboxItem,
126
+ MenubarRadioGroup,
127
+ MenubarRadioItem,
128
+ MenubarSub,
129
+ MenubarSubTrigger,
130
+ MenubarSubContent,
131
+ } from "./Menubar/Menubar"
132
+ export {
133
+ Pagination,
134
+ PaginationContent,
135
+ PaginationLink,
136
+ PaginationItem,
137
+ PaginationPrevious,
138
+ PaginationNext,
139
+ PaginationEllipsis,
140
+ type PaginationLinkProps,
141
+ } from "./Pagination/Pagination"
142
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from "./Popover/Popover"
143
+ export { Progress, progressVariants, progressIndicatorVariants, type ProgressProps, type ProgressSize, type ProgressVariant } from "./Progress/Progress"
144
+ export { RadioGroup, RadioGroupItem, radioGroupItemVariants, type RadioGroupItemProps, type RadioGroupItemSize } from "./RadioGroup/RadioGroup"
145
+ export { ScrollArea, ScrollBar } from "./ScrollArea/ScrollArea"
146
+ export {
147
+ Sidebar,
148
+ SidebarHeader,
149
+ SidebarContent,
150
+ SidebarFooter,
151
+ SidebarGroup,
152
+ SidebarGroupLabel,
153
+ SidebarMenuItem,
154
+ SidebarSubMenuItem,
155
+ SidebarSeparator,
156
+ SidebarToggle,
157
+ useSidebar,
158
+ sidebarMenuItemVariants,
159
+ sidebarSubMenuItemVariants,
160
+ type SidebarProps,
161
+ type SidebarHeaderProps,
162
+ type SidebarContentProps,
163
+ type SidebarFooterProps,
164
+ type SidebarGroupProps,
165
+ type SidebarGroupLabelProps,
166
+ type SidebarMenuItemProps,
167
+ type SidebarSubMenuItemProps,
168
+ type SidebarSeparatorProps,
169
+ type SidebarToggleProps,
170
+ } from "./Sidebar/Sidebar"
171
+ export {
172
+ Select,
173
+ SelectGroup,
174
+ SelectValue,
175
+ SelectTrigger,
176
+ SelectContent,
177
+ SelectLabel,
178
+ SelectItem,
179
+ SelectSeparator,
180
+ SelectScrollUpButton,
181
+ SelectScrollDownButton,
182
+ selectTriggerVariants,
183
+ type SelectTriggerProps,
184
+ type SelectTriggerSize,
185
+ } from "./Select/Select"
186
+ export { Separator } from "./Separator/Separator"
187
+ export { Skeleton, type SkeletonProps } from "./Skeleton/Skeleton"
188
+ export { Slider, type SliderProps } from "./Slider/Slider"
189
+ export { Spinner, spinnerVariants, type SpinnerProps, type SpinnerSize, type SpinnerVariant } from "./Spinner/Spinner"
190
+ export { Switch, switchVariants, type SwitchProps, type SwitchSize } from "./Switch/Switch"
191
+ export {
192
+ Table,
193
+ TableHeader,
194
+ TableBody,
195
+ TableFooter,
196
+ TableHead,
197
+ TableRow,
198
+ TableCell,
199
+ TableCaption,
200
+ } from "./Table/Table"
201
+ export { DataTable, type DataTableColumn, type DataTableProps, type DataTablePagination, type DataTableScroll } from "./DataTable/DataTable"
202
+ export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants, type TabsListProps, type TabsListVariant } from "./Tabs/Tabs"
203
+ export { Textarea, textareaVariants, type TextareaProps, type TextareaVariant, type TextareaResize } from "./Textarea/Textarea"
204
+ export { Toaster, toast, type ToastProps, type ToastTheme } from "./Toast/Toast"
205
+ export {
206
+ Tooltip,
207
+ TooltipTrigger,
208
+ TooltipContent,
209
+ TooltipProvider,
210
+ tooltipContentVariants,
211
+ type TooltipContentProps,
212
+ type TooltipContentVariant,
213
+ } from "./Tooltip/Tooltip"
214
+ export { Typography, typographyVariants, type TypographyVariant, type TypographyColor } from "./Typography/Typography"
215
+
216
+ // Utilities
217
+ export { cn, copyToClipboard } from "./lib/utils"
@@ -0,0 +1,223 @@
1
+ export type TextVariant =
2
+ | "h1"
3
+ | "h2"
4
+ | "h3"
5
+ | "h4"
6
+ | "h5"
7
+ | "h6"
8
+ | "subtitle1"
9
+ | "subtitle2"
10
+ | "subtitle3"
11
+ | "body1"
12
+ | "body2"
13
+ | "body3"
14
+ | "caption"
15
+ | "subtitle1Medium"
16
+ | "subtitle1Bold"
17
+ | "subtitle1SemiBold"
18
+ | "subtitle2Medium"
19
+ | "subtitle2Bold"
20
+ | "subtitle2SemiBold"
21
+ | "subtitle3Medium"
22
+ | "subtitle3Bold"
23
+ | "subtitle3SemiBold"
24
+ | "body1Medium"
25
+ | "body1Bold"
26
+ | "body1SemiBold"
27
+ | "body2Medium"
28
+ | "body2Bold"
29
+ | "body2SemiBold"
30
+ | "body3Medium"
31
+ | "body3Bold"
32
+ | "body3SemiBold"
33
+ | "captionMedium"
34
+ | "captionBold"
35
+ | "captionSemiBold"
36
+
37
+ export type TextColor =
38
+ | "default"
39
+ // Main colors
40
+ | "main-50"
41
+ | "main-100"
42
+ | "main-200"
43
+ | "main-300"
44
+ | "main-400"
45
+ | "main-500"
46
+ | "main-600"
47
+ | "main-700"
48
+ | "main-800"
49
+ | "main-900"
50
+ | "main-950"
51
+ // Success colors
52
+ | "success-50"
53
+ | "success-100"
54
+ | "success-200"
55
+ | "success-300"
56
+ | "success-400"
57
+ | "success-500"
58
+ | "success-600"
59
+ | "success-700"
60
+ | "success-800"
61
+ | "success-900"
62
+ | "success-950"
63
+ // Accent colors
64
+ | "accent-50"
65
+ | "accent-100"
66
+ | "accent-200"
67
+ | "accent-300"
68
+ | "accent-400"
69
+ | "accent-500"
70
+ | "accent-600"
71
+ | "accent-700"
72
+ | "accent-800"
73
+ | "accent-900"
74
+ | "accent-950"
75
+ // Error colors
76
+ | "error-50"
77
+ | "error-100"
78
+ | "error-200"
79
+ | "error-300"
80
+ | "error-400"
81
+ | "error-500"
82
+ | "error-600"
83
+ | "error-700"
84
+ | "error-800"
85
+ | "error-900"
86
+ | "error-950"
87
+ // Warning colors
88
+ | "warning-50"
89
+ | "warning-100"
90
+ | "warning-200"
91
+ | "warning-300"
92
+ | "warning-400"
93
+ | "warning-500"
94
+ | "warning-600"
95
+ | "warning-700"
96
+ | "warning-800"
97
+ | "warning-900"
98
+ | "warning-950"
99
+ // Grey colors
100
+ | "grey-50"
101
+ | "grey-100"
102
+ | "grey-200"
103
+ | "grey-300"
104
+ | "grey-400"
105
+ | "grey-500"
106
+ | "grey-600"
107
+ | "grey-700"
108
+ | "grey-800"
109
+ | "grey-900"
110
+ | "grey-950"
111
+
112
+ export const textVariantClasses: Record<TextVariant, string> = {
113
+ h1: "font-extrabold text-[64px] leading-none tracking-normal font-sans",
114
+ h2: "font-bold text-[48px] leading-none tracking-normal font-sans",
115
+ h3: "font-bold text-[32px] leading-none tracking-normal font-sans",
116
+ h4: "font-bold text-[24px] leading-[1.2] tracking-[-0.48px] font-sans",
117
+ h5: "font-bold text-[20px] leading-none tracking-normal font-sans",
118
+ h6: "font-semibold text-[20px] leading-none tracking-normal font-sans",
119
+ subtitle1: "font-semibold text-[20px] leading-none tracking-normal font-sans",
120
+ subtitle2: "font-semibold text-[18px] leading-none tracking-normal font-sans",
121
+ subtitle3: "font-semibold text-[16px] leading-none tracking-normal font-sans",
122
+ body1: "font-normal text-[16px] leading-none tracking-normal font-sans",
123
+ body2: "font-normal text-[14px] leading-none tracking-normal font-sans",
124
+ body3: "font-normal text-[12px] leading-none tracking-normal font-sans",
125
+ caption: "font-light text-[12px] leading-none tracking-normal font-sans",
126
+ subtitle1Medium: "font-medium text-[20px] leading-none tracking-normal font-sans",
127
+ subtitle1Bold: "font-bold text-[20px] leading-none tracking-normal font-sans",
128
+ subtitle1SemiBold: "font-semibold text-[20px] leading-none tracking-normal font-sans",
129
+ subtitle2Medium: "font-medium text-[18px] leading-none tracking-normal font-sans",
130
+ subtitle2Bold: "font-bold text-[18px] leading-none tracking-normal font-sans",
131
+ subtitle2SemiBold: "font-semibold text-[18px] leading-none tracking-normal font-sans",
132
+ subtitle3Medium: "font-medium text-[16px] leading-none tracking-normal font-sans",
133
+ subtitle3Bold: "font-bold text-[16px] leading-none tracking-normal font-sans",
134
+ subtitle3SemiBold: "font-semibold text-[16px] leading-none tracking-normal font-sans",
135
+ body1Medium: "font-medium text-[16px] leading-none tracking-normal font-sans",
136
+ body1Bold: "font-bold text-[16px] leading-none tracking-normal font-sans",
137
+ body1SemiBold: "font-semibold text-[16px] leading-none tracking-normal font-sans",
138
+ body2Medium: "font-medium text-[14px] leading-none tracking-normal font-sans",
139
+ body2Bold: "font-bold text-[14px] leading-none tracking-normal font-sans",
140
+ body2SemiBold: "font-semibold text-[14px] leading-none tracking-normal font-sans",
141
+ body3Medium: "font-medium text-[12px] leading-none tracking-normal font-sans",
142
+ body3Bold: "font-bold text-[12px] leading-none tracking-normal font-sans",
143
+ body3SemiBold: "font-semibold text-[12px] leading-none tracking-normal font-sans",
144
+ captionMedium: "font-medium text-[12px] leading-none tracking-normal font-sans",
145
+ captionBold: "font-bold text-[12px] leading-none tracking-normal font-sans",
146
+ captionSemiBold: "font-semibold text-[12px] leading-none tracking-normal font-sans",
147
+ }
148
+
149
+ export const textColorClasses: Record<TextColor, string> = {
150
+ default: "text-main-800",
151
+ // Main colors
152
+ "main-50": "text-main-50",
153
+ "main-100": "text-main-100",
154
+ "main-200": "text-main-200",
155
+ "main-300": "text-main-300",
156
+ "main-400": "text-main-400",
157
+ "main-500": "text-main-500",
158
+ "main-600": "text-main-600",
159
+ "main-700": "text-main-700",
160
+ "main-800": "text-main-800",
161
+ "main-900": "text-main-900",
162
+ "main-950": "text-main-950",
163
+ // Success colors
164
+ "success-50": "text-success-50",
165
+ "success-100": "text-success-100",
166
+ "success-200": "text-success-200",
167
+ "success-300": "text-success-300",
168
+ "success-400": "text-success-400",
169
+ "success-500": "text-success-500",
170
+ "success-600": "text-success-600",
171
+ "success-700": "text-success-700",
172
+ "success-800": "text-success-800",
173
+ "success-900": "text-success-900",
174
+ "success-950": "text-success-950",
175
+ // Accent colors
176
+ "accent-50": "text-accent-50",
177
+ "accent-100": "text-accent-100",
178
+ "accent-200": "text-accent-200",
179
+ "accent-300": "text-accent-300",
180
+ "accent-400": "text-accent-400",
181
+ "accent-500": "text-accent-500",
182
+ "accent-600": "text-accent-600",
183
+ "accent-700": "text-accent-700",
184
+ "accent-800": "text-accent-800",
185
+ "accent-900": "text-accent-900",
186
+ "accent-950": "text-accent-950",
187
+ // Error colors
188
+ "error-50": "text-error-50",
189
+ "error-100": "text-error-100",
190
+ "error-200": "text-error-200",
191
+ "error-300": "text-error-300",
192
+ "error-400": "text-error-400",
193
+ "error-500": "text-error-500",
194
+ "error-600": "text-error-600",
195
+ "error-700": "text-error-700",
196
+ "error-800": "text-error-800",
197
+ "error-900": "text-error-900",
198
+ "error-950": "text-error-950",
199
+ // Warning colors
200
+ "warning-50": "text-warning-50",
201
+ "warning-100": "text-warning-100",
202
+ "warning-200": "text-warning-200",
203
+ "warning-300": "text-warning-300",
204
+ "warning-400": "text-warning-400",
205
+ "warning-500": "text-warning-500",
206
+ "warning-600": "text-warning-600",
207
+ "warning-700": "text-warning-700",
208
+ "warning-800": "text-warning-800",
209
+ "warning-900": "text-warning-900",
210
+ "warning-950": "text-warning-950",
211
+ // Grey colors
212
+ "grey-50": "text-grey-50",
213
+ "grey-100": "text-grey-100",
214
+ "grey-200": "text-grey-200",
215
+ "grey-300": "text-grey-300",
216
+ "grey-400": "text-grey-400",
217
+ "grey-500": "text-grey-500",
218
+ "grey-600": "text-grey-600",
219
+ "grey-700": "text-grey-700",
220
+ "grey-800": "text-grey-800",
221
+ "grey-900": "text-grey-900",
222
+ "grey-950": "text-grey-950",
223
+ }
package/lib/utils.ts ADDED
@@ -0,0 +1,15 @@
1
+ import { type ClassValue, clsx } from "clsx"
2
+ import { twMerge } from "tailwind-merge"
3
+
4
+ export function cn(...inputs: ClassValue[]) {
5
+ return twMerge(clsx(inputs))
6
+ }
7
+
8
+ export async function copyToClipboard(text: string): Promise<boolean> {
9
+ try {
10
+ await navigator.clipboard.writeText(text)
11
+ return true
12
+ } catch {
13
+ return false
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,16 +1,19 @@
1
1
  {
2
2
  "name": "@a2v2ai/uikit",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
4
4
  "type": "module",
5
5
  "author": "Arulraj V & abofficial1997@gmail.com",
6
6
  "description": "A React UI component library built with shadcn/ui and Tailwind CSS",
7
7
  "license": "MIT",
8
+ "publishConfig": {
9
+ "registry": "https://registry.npmjs.org/"
10
+ },
8
11
  "scripts": {
9
12
  "check:types": "tsc --noEmit",
10
13
  "clean": "node -e \"require('fs').rmSync('../dist', { recursive: true, force: true })\"",
11
14
  "build": "tsc",
12
15
  "postbuild": "cpy ./package.json ../dist/ && cpy ./README.md ../dist/ && cpy ./index.css ../dist/",
13
- "publish": "npm publish --access public"
16
+ "release": "npm publish --access public"
14
17
  },
15
18
  "keywords": [
16
19
  "react",
package/tsconfig.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "module": "ESNext",
5
+ "lib": ["esnext", "dom"],
6
+ "jsx": "react-jsx",
7
+ "declaration": true,
8
+ "outDir": "../dist",
9
+ "rootDir": "./",
10
+ "noEmit": false,
11
+ "strict": true,
12
+ "noUnusedLocals": true,
13
+ "noUnusedParameters": true,
14
+ "moduleResolution": "bundler",
15
+ "esModuleInterop": true,
16
+ "skipLibCheck": true,
17
+ "forceConsistentCasingInFileNames": true,
18
+ "resolveJsonModule": true,
19
+ "verbatimModuleSyntax": true
20
+ },
21
+ "exclude": ["node_modules", "**/*.stories.tsx"]
22
+ }
package/Alert/Alert.d.ts DELETED
@@ -1,13 +0,0 @@
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 DELETED
@@ -1,25 +0,0 @@
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 };
@@ -1,43 +0,0 @@
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 };
@@ -1,71 +0,0 @@
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, };