@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
@@ -1,121 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react"
2
- import { AlertCircle, CheckCircle2, Info as InfoIcon, AlertTriangle } from "../icons"
3
-
4
- import { Flex } from "../Flex/Flex"
5
- import { Typography } from "../Typography/Typography"
6
- import { Alert, AlertTitle, AlertDescription } from "./Alert"
7
-
8
- const meta: Meta<typeof Alert> = {
9
- title: "Components/Alert",
10
- component: Alert,
11
- parameters: {
12
- layout: "centered",
13
- },
14
- argTypes: {
15
- variant: {
16
- control: "select",
17
- options: ["default", "destructive", "success", "warning", "info"],
18
- description: "The visual variant of the alert",
19
- },
20
- },
21
- tags: ["autodocs"],
22
- }
23
-
24
- export default meta
25
- type Story = StoryObj<typeof meta>
26
-
27
- export const Default: Story = {
28
- render: () => (
29
- <Alert className="w-[400px]">
30
- <AlertTitle>Heads up!</AlertTitle>
31
- <AlertDescription>
32
- You can add components to your app using the cli.
33
- </AlertDescription>
34
- </Alert>
35
- ),
36
- }
37
-
38
- export const Destructive: Story = {
39
- render: () => (
40
- <Alert variant="destructive" className="w-[400px]">
41
- <AlertCircle className="size-4" />
42
- <AlertTitle>Error</AlertTitle>
43
- <AlertDescription>
44
- Your session has expired. Please log in again.
45
- </AlertDescription>
46
- </Alert>
47
- ),
48
- }
49
-
50
- export const Success: Story = {
51
- render: () => (
52
- <Alert variant="success" className="w-[400px]">
53
- <CheckCircle2 className="size-4" />
54
- <AlertTitle>Success</AlertTitle>
55
- <AlertDescription>
56
- Your changes have been saved successfully.
57
- </AlertDescription>
58
- </Alert>
59
- ),
60
- }
61
-
62
- export const Warning: Story = {
63
- render: () => (
64
- <Alert variant="warning" className="w-[400px]">
65
- <AlertTriangle className="size-4" />
66
- <AlertTitle>Warning</AlertTitle>
67
- <AlertDescription>
68
- Your account is about to expire. Please renew your subscription.
69
- </AlertDescription>
70
- </Alert>
71
- ),
72
- }
73
-
74
- export const InfoAlert: Story = {
75
- render: () => (
76
- <Alert variant="info" className="w-[400px]">
77
- <InfoIcon className="size-4" />
78
- <AlertTitle>Information</AlertTitle>
79
- <AlertDescription>
80
- A new version is available. Update now for new features.
81
- </AlertDescription>
82
- </Alert>
83
- ),
84
- }
85
-
86
- export const AllVariants: Story = {
87
- render: () => (
88
- <Flex gap={4} className="w-[400px]">
89
- <Typography variant="h4" className="text-white">Alert Variants</Typography>
90
-
91
- <Alert>
92
- <AlertTitle>Default</AlertTitle>
93
- <AlertDescription>This is a default alert message.</AlertDescription>
94
- </Alert>
95
-
96
- <Alert variant="destructive">
97
- <AlertCircle className="size-4" />
98
- <AlertTitle>Destructive</AlertTitle>
99
- <AlertDescription>This is a destructive alert message.</AlertDescription>
100
- </Alert>
101
-
102
- <Alert variant="success">
103
- <CheckCircle2 className="size-4" />
104
- <AlertTitle>Success</AlertTitle>
105
- <AlertDescription>This is a success alert message.</AlertDescription>
106
- </Alert>
107
-
108
- <Alert variant="warning">
109
- <AlertTriangle className="size-4" />
110
- <AlertTitle>Warning</AlertTitle>
111
- <AlertDescription>This is a warning alert message.</AlertDescription>
112
- </Alert>
113
-
114
- <Alert variant="info">
115
- <InfoIcon className="size-4" />
116
- <AlertTitle>Info</AlertTitle>
117
- <AlertDescription>This is an info alert message.</AlertDescription>
118
- </Alert>
119
- </Flex>
120
- ),
121
- }
package/Alert/Alert.tsx DELETED
@@ -1,71 +0,0 @@
1
- import * as React from "react"
2
- import { cva } from "class-variance-authority"
3
-
4
- import { cn } from "../lib/utils"
5
-
6
- type AlertVariant = "default" | "destructive" | "success" | "warning" | "info"
7
-
8
- const alertVariants = cva(
9
- "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",
10
- {
11
- variants: {
12
- variant: {
13
- default: "bg-white text-main-950 border-grey-200",
14
- destructive:
15
- "border-error-200 bg-error-50 text-error-700 [&>svg]:text-error-600",
16
- success:
17
- "border-success-200 bg-success-50 text-success-700 [&>svg]:text-success-600",
18
- warning:
19
- "border-warning-200 bg-warning-50 text-warning-700 [&>svg]:text-warning-600",
20
- info: "border-accent-200 bg-accent-50 text-accent-700 [&>svg]:text-accent-600",
21
- },
22
- },
23
- defaultVariants: {
24
- variant: "default",
25
- },
26
- }
27
- )
28
-
29
- export interface AlertProps
30
- extends React.HTMLAttributes<HTMLDivElement> {
31
- variant?: AlertVariant
32
- }
33
-
34
- const Alert = React.forwardRef<HTMLDivElement, AlertProps>(
35
- ({ className, variant, ...props }, ref) => (
36
- <div
37
- ref={ref}
38
- role="alert"
39
- className={cn(alertVariants({ variant }), className)}
40
- {...props}
41
- />
42
- )
43
- )
44
- Alert.displayName = "Alert"
45
-
46
- const AlertTitle = React.forwardRef<
47
- HTMLParagraphElement,
48
- React.HTMLAttributes<HTMLHeadingElement>
49
- >(({ className, ...props }, ref) => (
50
- <h5
51
- ref={ref}
52
- className={cn("mb-1 font-medium leading-none tracking-tight", className)}
53
- {...props}
54
- />
55
- ))
56
- AlertTitle.displayName = "AlertTitle"
57
-
58
- const AlertDescription = React.forwardRef<
59
- HTMLParagraphElement,
60
- React.HTMLAttributes<HTMLParagraphElement>
61
- >(({ className, ...props }, ref) => (
62
- <div
63
- ref={ref}
64
- className={cn("text-sm [&_p]:leading-relaxed", className)}
65
- {...props}
66
- />
67
- ))
68
- AlertDescription.displayName = "AlertDescription"
69
-
70
- export { Alert, AlertTitle, AlertDescription, alertVariants }
71
- export type { AlertVariant }