@a2v2ai/uikit 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/Alert/Alert.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 +90 -0
  13. package/Calendar/Calendar.stories.tsx +207 -0
  14. package/Calendar/Calendar.tsx +232 -0
  15. package/Card/Card.stories.tsx +136 -0
  16. package/Card/Card.tsx +96 -0
  17. package/ChatBubble/ChatBubble.stories.tsx +307 -0
  18. package/ChatBubble/ChatBubble.tsx +167 -0
  19. package/Checkbox/Checkbox.stories.tsx +137 -0
  20. package/Checkbox/Checkbox.tsx +53 -0
  21. package/Drawer/Drawer.stories.tsx +721 -0
  22. package/Drawer/Drawer.tsx +201 -0
  23. package/DropdownMenu/DropdownMenu.stories.tsx +251 -0
  24. package/DropdownMenu/DropdownMenu.tsx +199 -0
  25. package/ErrorMessage/ErrorMessage.stories.tsx +159 -0
  26. package/ErrorMessage/ErrorMessage.tsx +55 -0
  27. package/Flex/Flex.tsx +102 -0
  28. package/IconButton/IconButton.stories.tsx +566 -0
  29. package/IconButton/IconButton.tsx +95 -0
  30. package/Input/Input.stories.tsx +456 -0
  31. package/Input/Input.tsx +129 -0
  32. package/InputOTP/InputOTP.stories.tsx +246 -0
  33. package/InputOTP/InputOTP.tsx +127 -0
  34. package/Label/Label.stories.tsx +105 -0
  35. package/Label/Label.tsx +43 -0
  36. package/Loader/Loader.stories.tsx +170 -0
  37. package/Loader/Loader.tsx +62 -0
  38. package/Popover/Popover.stories.tsx +133 -0
  39. package/Popover/Popover.tsx +31 -0
  40. package/Progress/Progress.stories.tsx +146 -0
  41. package/Progress/Progress.tsx +67 -0
  42. package/README.md +12 -12
  43. package/RadioGroup/RadioGroup.stories.tsx +159 -0
  44. package/RadioGroup/RadioGroup.tsx +68 -0
  45. package/ScrollArea/ScrollArea.stories.tsx +136 -0
  46. package/ScrollArea/ScrollArea.tsx +46 -0
  47. package/Select/Select.stories.tsx +242 -0
  48. package/Select/Select.tsx +180 -0
  49. package/Separator/Separator.stories.tsx +110 -0
  50. package/Separator/Separator.tsx +29 -0
  51. package/Skeleton/Skeleton.stories.tsx +117 -0
  52. package/Skeleton/Skeleton.tsx +16 -0
  53. package/Spinner/Spinner.stories.tsx +210 -0
  54. package/Spinner/Spinner.tsx +78 -0
  55. package/Switch/Switch.stories.tsx +146 -0
  56. package/Switch/Switch.tsx +59 -0
  57. package/Tabs/Tabs.stories.tsx +197 -0
  58. package/Tabs/Tabs.tsx +74 -0
  59. package/Textarea/Textarea.stories.tsx +170 -0
  60. package/Textarea/Textarea.tsx +51 -0
  61. package/Toast/Toast.stories.tsx +285 -0
  62. package/Toast/Toast.tsx +59 -0
  63. package/Tooltip/Tooltip.stories.tsx +463 -0
  64. package/Tooltip/Tooltip.tsx +96 -0
  65. package/Typography/Typography.stories.tsx +235 -0
  66. package/Typography/Typography.tsx +171 -0
  67. package/helpers.ts +5 -0
  68. package/icons.ts +2 -0
  69. package/index.ts +136 -0
  70. package/lib/utils.ts +15 -0
  71. package/package.json +4 -1
  72. package/tsconfig.json +24 -0
  73. package/Alert/Alert.d.ts +0 -11
  74. package/Alert/Alert.js +0 -64
  75. package/AlertDialog/AlertDialog.d.ts +0 -35
  76. package/AlertDialog/AlertDialog.js +0 -121
  77. package/Avatar/Avatar.d.ts +0 -12
  78. package/Avatar/Avatar.js +0 -64
  79. package/Badge/Badge.d.ts +0 -9
  80. package/Badge/Badge.js +0 -26
  81. package/Breadcrumb/Breadcrumb.d.ts +0 -19
  82. package/Breadcrumb/Breadcrumb.js +0 -65
  83. package/Button/Button.d.ts +0 -14
  84. package/Button/Button.js +0 -75
  85. package/Calendar/Calendar.d.ts +0 -16
  86. package/Calendar/Calendar.js +0 -113
  87. package/Card/Card.d.ts +0 -14
  88. package/Card/Card.js +0 -70
  89. package/ChatBubble/ChatBubble.d.ts +0 -29
  90. package/ChatBubble/ChatBubble.js +0 -133
  91. package/Checkbox/Checkbox.d.ts +0 -10
  92. package/Checkbox/Checkbox.js +0 -57
  93. package/Dialog/Dialog.d.ts +0 -35
  94. package/Dialog/Dialog.js +0 -130
  95. package/Drawer/Drawer.d.ts +0 -31
  96. package/Drawer/Drawer.js +0 -69
  97. package/DropdownMenu/DropdownMenu.d.ts +0 -27
  98. package/DropdownMenu/DropdownMenu.js +0 -85
  99. package/ErrorMessage/ErrorMessage.d.ts +0 -27
  100. package/ErrorMessage/ErrorMessage.js +0 -15
  101. package/Flex/Flex.d.ts +0 -23
  102. package/Flex/Flex.js +0 -101
  103. package/IconButton/IconButton.d.ts +0 -17
  104. package/IconButton/IconButton.js +0 -85
  105. package/Input/Input.d.ts +0 -16
  106. package/Input/Input.js +0 -75
  107. package/InputOTP/InputOTP.d.ts +0 -18
  108. package/InputOTP/InputOTP.js +0 -85
  109. package/Label/Label.d.ts +0 -10
  110. package/Label/Label.js +0 -57
  111. package/Loader/Loader.d.ts +0 -18
  112. package/Loader/Loader.js +0 -67
  113. package/Popover/Popover.d.ts +0 -7
  114. package/Popover/Popover.js +0 -49
  115. package/Progress/Progress.d.ts +0 -13
  116. package/Progress/Progress.js +0 -71
  117. package/RadioGroup/RadioGroup.d.ts +0 -11
  118. package/RadioGroup/RadioGroup.js +0 -64
  119. package/ScrollArea/ScrollArea.d.ts +0 -5
  120. package/ScrollArea/ScrollArea.js +0 -48
  121. package/Select/Select.d.ts +0 -19
  122. package/Select/Select.js +0 -85
  123. package/Separator/Separator.d.ts +0 -4
  124. package/Separator/Separator.js +0 -43
  125. package/Skeleton/Skeleton.d.ts +0 -4
  126. package/Skeleton/Skeleton.js +0 -8
  127. package/Spinner/Spinner.d.ts +0 -15
  128. package/Spinner/Spinner.js +0 -68
  129. package/Switch/Switch.d.ts +0 -10
  130. package/Switch/Switch.js +0 -67
  131. package/Tabs/Tabs.d.ts +0 -13
  132. package/Tabs/Tabs.js +0 -64
  133. package/Textarea/Textarea.d.ts +0 -10
  134. package/Textarea/Textarea.js +0 -64
  135. package/Toast/Toast.d.ts +0 -10
  136. package/Toast/Toast.js +0 -29
  137. package/Tooltip/Tooltip.d.ts +0 -15
  138. package/Tooltip/Tooltip.js +0 -68
  139. package/Typography/Typography.d.ts +0 -15
  140. package/Typography/Typography.js +0 -125
  141. package/helpers.d.ts +0 -4
  142. package/helpers.js +0 -13
  143. package/icons.d.ts +0 -1
  144. package/icons.js +0 -18
  145. package/index.d.ts +0 -35
  146. package/index.js +0 -183
  147. package/lib/utils.d.ts +0 -3
  148. package/lib/utils.js +0 -18
@@ -0,0 +1,235 @@
1
+ import type { Meta, StoryObj } from "@storybook/react"
2
+ import { Flex } from "../Flex/Flex"
3
+ import { Typography } from "./Typography"
4
+
5
+ const meta: Meta<typeof Typography> = {
6
+ title: "Components/Typography",
7
+ component: Typography,
8
+ parameters: {
9
+ layout: "padded",
10
+ },
11
+ tags: ["autodocs"],
12
+ argTypes: {
13
+ variant: {
14
+ control: "select",
15
+ options: [
16
+ "h1",
17
+ "h2",
18
+ "h3",
19
+ "h4",
20
+ "h5",
21
+ "h6",
22
+ "subtitle1",
23
+ "subtitle2",
24
+ "body1",
25
+ "body2",
26
+ "body3",
27
+ "caption",
28
+ ],
29
+ },
30
+ color: {
31
+ control: "select",
32
+ options: [
33
+ "default",
34
+ "main-50", "main-100", "main-200", "main-300", "main-400", "main-500", "main-600", "main-700", "main-800", "main-900", "main-950",
35
+ "success-50", "success-100", "success-200", "success-300", "success-400", "success-500", "success-600", "success-700", "success-800", "success-900", "success-950",
36
+ "accent-50", "accent-100", "accent-200", "accent-300", "accent-400", "accent-500", "accent-600", "accent-700", "accent-800", "accent-900", "accent-950",
37
+ "error-50", "error-100", "error-200", "error-300", "error-400", "error-500", "error-600", "error-700", "error-800", "error-900", "error-950",
38
+ "warning-50", "warning-100", "warning-200", "warning-300", "warning-400", "warning-500", "warning-600", "warning-700", "warning-800", "warning-900", "warning-950",
39
+ "grey-50", "grey-100", "grey-200", "grey-300", "grey-400", "grey-500", "grey-600", "grey-700", "grey-800", "grey-900", "grey-950",
40
+ ],
41
+ },
42
+ },
43
+ }
44
+
45
+ export default meta
46
+ type Story = StoryObj<typeof Typography>
47
+
48
+ export const Default: Story = {
49
+ args: {
50
+ variant: "body1",
51
+ color: "default",
52
+ children: "The quick brown fox jumps over the lazy dog",
53
+ },
54
+ }
55
+
56
+ export const AllVariants: Story = {
57
+ render: () => (
58
+ <Flex direction="column" gap={6}>
59
+ <Typography variant="h1">Typography / h1</Typography>
60
+ <Typography variant="h2">Typography / h2</Typography>
61
+ <Typography variant="h3">Typography / h3</Typography>
62
+ <Typography variant="h4">Typography / h4</Typography>
63
+ <Typography variant="h5">Typography / h5</Typography>
64
+ <Typography variant="h6">Typography / h6</Typography>
65
+ <Typography variant="subtitle1">Typography / Subtitle 1</Typography>
66
+ <Typography variant="subtitle2">Typography / Subtitle 2</Typography>
67
+ <Typography variant="body1">Typography / Body 1</Typography>
68
+ <Typography variant="body2">Typography / Body 2</Typography>
69
+ <Typography variant="body3">Typography / Body 3</Typography>
70
+ <Typography variant="caption">Typography / Caption</Typography>
71
+ </Flex>
72
+ ),
73
+ }
74
+
75
+ export const Colors: Story = {
76
+ render: () => (
77
+ <Flex direction="column" gap={8}>
78
+ {/* Default / Foreground */}
79
+ <Flex direction="column" gap={2}>
80
+ <Typography variant="h5">Default (Foreground)</Typography>
81
+ <Typography variant="body1" color="default">
82
+ The quick brown fox jumps over the lazy dog
83
+ </Typography>
84
+ </Flex>
85
+
86
+ {/* Main Colors */}
87
+ <Flex direction="column" gap={2}>
88
+ <Typography variant="h5">Main Colors</Typography>
89
+ <Flex direction="column" gap={1}>
90
+ <Typography variant="body1" color="main-950">Main 950</Typography>
91
+ <Typography variant="body1" color="main-900">Main 900</Typography>
92
+ <Typography variant="body1" color="main-800">Main 800</Typography>
93
+ <Typography variant="body1" color="main-700">Main 700</Typography>
94
+ <Typography variant="body1" color="main-600">Main 600</Typography>
95
+ <Typography variant="body1" color="main-500">Main 500</Typography>
96
+ </Flex>
97
+ </Flex>
98
+
99
+ {/* Success Colors */}
100
+ <Flex direction="column" gap={2}>
101
+ <Typography variant="h5">Success Colors</Typography>
102
+ <Flex direction="column" gap={1}>
103
+ <Typography variant="body1" color="success-700">Success 700</Typography>
104
+ <Typography variant="body1" color="success-600">Success 600</Typography>
105
+ <Typography variant="body1" color="success-500">Success 500</Typography>
106
+ </Flex>
107
+ </Flex>
108
+
109
+ {/* Accent Colors */}
110
+ <Flex direction="column" gap={2}>
111
+ <Typography variant="h5">Accent Colors</Typography>
112
+ <Flex direction="column" gap={1}>
113
+ <Typography variant="body1" color="accent-700">Accent 700</Typography>
114
+ <Typography variant="body1" color="accent-600">Accent 600</Typography>
115
+ <Typography variant="body1" color="accent-500">Accent 500</Typography>
116
+ </Flex>
117
+ </Flex>
118
+
119
+ {/* Error Colors */}
120
+ <Flex direction="column" gap={2}>
121
+ <Typography variant="h5">Error Colors</Typography>
122
+ <Flex direction="column" gap={1}>
123
+ <Typography variant="body1" color="error-700">Error 700</Typography>
124
+ <Typography variant="body1" color="error-600">Error 600</Typography>
125
+ <Typography variant="body1" color="error-500">Error 500</Typography>
126
+ </Flex>
127
+ </Flex>
128
+
129
+ {/* Warning Colors */}
130
+ <Flex direction="column" gap={2}>
131
+ <Typography variant="h5">Warning Colors</Typography>
132
+ <Flex direction="column" gap={1}>
133
+ <Typography variant="body1" color="warning-700">Warning 700</Typography>
134
+ <Typography variant="body1" color="warning-600">Warning 600</Typography>
135
+ <Typography variant="body1" color="warning-500">Warning 500</Typography>
136
+ </Flex>
137
+ </Flex>
138
+
139
+ {/* Grey Colors */}
140
+ <Flex direction="column" gap={2}>
141
+ <Typography variant="h5">Grey Colors</Typography>
142
+ <Flex direction="column" gap={1}>
143
+ <Typography variant="body1" color="grey-900">Grey 900</Typography>
144
+ <Typography variant="body1" color="grey-700">Grey 700</Typography>
145
+ <Typography variant="body1" color="grey-500">Grey 500</Typography>
146
+ <Typography variant="body1" color="grey-400">Grey 400</Typography>
147
+ </Flex>
148
+ </Flex>
149
+ </Flex>
150
+ ),
151
+ }
152
+
153
+ export const H1: Story = {
154
+ args: {
155
+ variant: "h1",
156
+ children: "Heading 1",
157
+ },
158
+ }
159
+
160
+ export const H2: Story = {
161
+ args: {
162
+ variant: "h2",
163
+ children: "Heading 2",
164
+ },
165
+ }
166
+
167
+ export const H3: Story = {
168
+ args: {
169
+ variant: "h3",
170
+ children: "Heading 3",
171
+ },
172
+ }
173
+
174
+ export const H4: Story = {
175
+ args: {
176
+ variant: "h4",
177
+ children: "Heading 4",
178
+ },
179
+ }
180
+
181
+ export const H5: Story = {
182
+ args: {
183
+ variant: "h5",
184
+ children: "Heading 5",
185
+ },
186
+ }
187
+
188
+ export const H6: Story = {
189
+ args: {
190
+ variant: "h6",
191
+ children: "Heading 6",
192
+ },
193
+ }
194
+
195
+ export const Subtitle1: Story = {
196
+ args: {
197
+ variant: "subtitle1",
198
+ children: "Subtitle 1",
199
+ },
200
+ }
201
+
202
+ export const Subtitle2: Story = {
203
+ args: {
204
+ variant: "subtitle2",
205
+ children: "Subtitle 2",
206
+ },
207
+ }
208
+
209
+ export const Body1: Story = {
210
+ args: {
211
+ variant: "body1",
212
+ children: "Body 1 - The quick brown fox jumps over the lazy dog",
213
+ },
214
+ }
215
+
216
+ export const Body2: Story = {
217
+ args: {
218
+ variant: "body2",
219
+ children: "Body 2 - The quick brown fox jumps over the lazy dog",
220
+ },
221
+ }
222
+
223
+ export const Body3: Story = {
224
+ args: {
225
+ variant: "body3",
226
+ children: "Body 3 - The quick brown fox jumps over the lazy dog",
227
+ },
228
+ }
229
+
230
+ export const Caption: Story = {
231
+ args: {
232
+ variant: "caption",
233
+ children: "Caption - The quick brown fox jumps over the lazy dog",
234
+ },
235
+ }
@@ -0,0 +1,171 @@
1
+ import * as React from "react"
2
+ import { Slot } from "@radix-ui/react-slot"
3
+ import { cva } from "class-variance-authority"
4
+
5
+ import { cn } from "../lib/utils"
6
+
7
+ const typographyVariants = cva("", {
8
+ variants: {
9
+ variant: {
10
+ h1: "font-extrabold text-[64px] leading-none tracking-normal font-sans",
11
+ h2: "font-bold text-[48px] leading-none tracking-normal font-sans",
12
+ h3: "font-bold text-[32px] leading-none tracking-normal font-sans",
13
+ h4: "font-bold text-[24px] leading-[1.2] tracking-[-0.48px] font-sans",
14
+ h5: "font-bold text-[20px] leading-none tracking-normal font-sans",
15
+ h6: "font-semibold text-[20px] leading-none tracking-normal font-sans",
16
+ subtitle1: "font-semibold text-[20px] leading-none tracking-normal font-sans",
17
+ subtitle2: "font-semibold text-[18px] leading-none tracking-normal font-sans",
18
+ body1: "font-normal text-[16px] leading-none tracking-normal font-sans",
19
+ body2: "font-normal text-[14px] leading-none tracking-normal font-sans",
20
+ body3: "font-normal text-[12px] leading-none tracking-normal font-sans",
21
+ caption: "font-light text-[12px] leading-none tracking-normal font-sans",
22
+ },
23
+ color: {
24
+ default: "text-foreground",
25
+ // Main colors
26
+ "main-50": "text-main-50",
27
+ "main-100": "text-main-100",
28
+ "main-200": "text-main-200",
29
+ "main-300": "text-main-300",
30
+ "main-400": "text-main-400",
31
+ "main-500": "text-main-500",
32
+ "main-600": "text-main-600",
33
+ "main-700": "text-main-700",
34
+ "main-800": "text-main-800",
35
+ "main-900": "text-main-900",
36
+ "main-950": "text-main-950",
37
+ // Success colors
38
+ "success-50": "text-success-50",
39
+ "success-100": "text-success-100",
40
+ "success-200": "text-success-200",
41
+ "success-300": "text-success-300",
42
+ "success-400": "text-success-400",
43
+ "success-500": "text-success-500",
44
+ "success-600": "text-success-600",
45
+ "success-700": "text-success-700",
46
+ "success-800": "text-success-800",
47
+ "success-900": "text-success-900",
48
+ "success-950": "text-success-950",
49
+ // Accent colors
50
+ "accent-50": "text-accent-50",
51
+ "accent-100": "text-accent-100",
52
+ "accent-200": "text-accent-200",
53
+ "accent-300": "text-accent-300",
54
+ "accent-400": "text-accent-400",
55
+ "accent-500": "text-accent-500",
56
+ "accent-600": "text-accent-600",
57
+ "accent-700": "text-accent-700",
58
+ "accent-800": "text-accent-800",
59
+ "accent-900": "text-accent-900",
60
+ "accent-950": "text-accent-950",
61
+ // Error colors
62
+ "error-50": "text-error-50",
63
+ "error-100": "text-error-100",
64
+ "error-200": "text-error-200",
65
+ "error-300": "text-error-300",
66
+ "error-400": "text-error-400",
67
+ "error-500": "text-error-500",
68
+ "error-600": "text-error-600",
69
+ "error-700": "text-error-700",
70
+ "error-800": "text-error-800",
71
+ "error-900": "text-error-900",
72
+ "error-950": "text-error-950",
73
+ // Warning colors
74
+ "warning-50": "text-warning-50",
75
+ "warning-100": "text-warning-100",
76
+ "warning-200": "text-warning-200",
77
+ "warning-300": "text-warning-300",
78
+ "warning-400": "text-warning-400",
79
+ "warning-500": "text-warning-500",
80
+ "warning-600": "text-warning-600",
81
+ "warning-700": "text-warning-700",
82
+ "warning-800": "text-warning-800",
83
+ "warning-900": "text-warning-900",
84
+ "warning-950": "text-warning-950",
85
+ // Grey colors
86
+ "grey-50": "text-grey-50",
87
+ "grey-100": "text-grey-100",
88
+ "grey-200": "text-grey-200",
89
+ "grey-300": "text-grey-300",
90
+ "grey-400": "text-grey-400",
91
+ "grey-500": "text-grey-500",
92
+ "grey-600": "text-grey-600",
93
+ "grey-700": "text-grey-700",
94
+ "grey-800": "text-grey-800",
95
+ "grey-900": "text-grey-900",
96
+ "grey-950": "text-grey-950",
97
+ },
98
+ },
99
+ defaultVariants: {
100
+ variant: "body1",
101
+ color: "default",
102
+ },
103
+ })
104
+
105
+ type TypographyVariant =
106
+ | "h1"
107
+ | "h2"
108
+ | "h3"
109
+ | "h4"
110
+ | "h5"
111
+ | "h6"
112
+ | "subtitle1"
113
+ | "subtitle2"
114
+ | "body1"
115
+ | "body2"
116
+ | "body3"
117
+ | "caption"
118
+
119
+ type TypographyColor =
120
+ | "default"
121
+ | "main-50" | "main-100" | "main-200" | "main-300" | "main-400" | "main-500" | "main-600" | "main-700" | "main-800" | "main-900" | "main-950"
122
+ | "success-50" | "success-100" | "success-200" | "success-300" | "success-400" | "success-500" | "success-600" | "success-700" | "success-800" | "success-900" | "success-950"
123
+ | "accent-50" | "accent-100" | "accent-200" | "accent-300" | "accent-400" | "accent-500" | "accent-600" | "accent-700" | "accent-800" | "accent-900" | "accent-950"
124
+ | "error-50" | "error-100" | "error-200" | "error-300" | "error-400" | "error-500" | "error-600" | "error-700" | "error-800" | "error-900" | "error-950"
125
+ | "warning-50" | "warning-100" | "warning-200" | "warning-300" | "warning-400" | "warning-500" | "warning-600" | "warning-700" | "warning-800" | "warning-900" | "warning-950"
126
+ | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-400" | "grey-500" | "grey-600" | "grey-700" | "grey-800" | "grey-900" | "grey-950"
127
+
128
+ const variantElementMap: Record<TypographyVariant, keyof React.JSX.IntrinsicElements> = {
129
+ h1: "h1",
130
+ h2: "h2",
131
+ h3: "h3",
132
+ h4: "h4",
133
+ h5: "h5",
134
+ h6: "h6",
135
+ subtitle1: "p",
136
+ subtitle2: "p",
137
+ body1: "p",
138
+ body2: "p",
139
+ body3: "p",
140
+ caption: "span",
141
+ }
142
+
143
+ type TypographyProps<T extends React.ElementType = "p"> = {
144
+ as?: T
145
+ asChild?: boolean
146
+ variant?: TypographyVariant
147
+ color?: TypographyColor
148
+ } & Omit<React.ComponentPropsWithoutRef<T>, "as" | "asChild" | "color" | "variant">
149
+
150
+ function Typography<T extends React.ElementType = "p">({
151
+ className,
152
+ variant = "body1",
153
+ color = "default",
154
+ as,
155
+ asChild = false,
156
+ ...props
157
+ }: TypographyProps<T>) {
158
+ const defaultElement = variant ? variantElementMap[variant] : "p"
159
+ const Component = asChild ? Slot : (as ?? defaultElement)
160
+
161
+ return (
162
+ <Component
163
+ data-slot="typography"
164
+ className={cn(typographyVariants({ variant, color, className }))}
165
+ {...props}
166
+ />
167
+ )
168
+ }
169
+
170
+ export { Typography, typographyVariants }
171
+ export type { TypographyVariant, TypographyColor }
package/helpers.ts ADDED
@@ -0,0 +1,5 @@
1
+ // Helpers (re-exported utilities)
2
+ export { cn, copyToClipboard } from "./lib/utils"
3
+ export { clsx, type ClassValue } from "clsx"
4
+ export { twMerge } from "tailwind-merge"
5
+ export { cva, type VariantProps } from "class-variance-authority"
package/icons.ts ADDED
@@ -0,0 +1,2 @@
1
+ // Re-export all icons from lucide-react
2
+ export * from "lucide-react"
package/index.ts ADDED
@@ -0,0 +1,136 @@
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 { ChatBubble, chatBubbleVariants, bubbleContentVariants, type ChatBubbleProps, type ChatBubbleSide, type ChatBubbleColor, type ChatBubbleTheme, type ChatBubbleSize } from "./ChatBubble/ChatBubble"
21
+ export { Checkbox, checkboxVariants, type CheckboxProps, type CheckboxSize } from "./Checkbox/Checkbox"
22
+ export {
23
+ AlertDialog,
24
+ AlertDialogPortal,
25
+ AlertDialogOverlay,
26
+ AlertDialogTrigger,
27
+ AlertDialogContent,
28
+ AlertDialogHeader,
29
+ AlertDialogFooter,
30
+ AlertDialogTitle,
31
+ AlertDialogDescription,
32
+ AlertDialogBody,
33
+ AlertDialogAction,
34
+ AlertDialogCancel,
35
+ alertDialogContentVariants,
36
+ alertDialogHeaderVariants,
37
+ alertDialogFooterVariants,
38
+ type AlertDialogContentProps,
39
+ type AlertDialogHeaderProps,
40
+ type AlertDialogFooterProps,
41
+ type AlertDialogContentType,
42
+ type AlertDialogHeaderType,
43
+ type AlertDialogFooterType,
44
+ type AlertDialogCloseButtonVariant,
45
+ } from "./AlertDialog/AlertDialog"
46
+ export {
47
+ Drawer,
48
+ DrawerPortal,
49
+ DrawerOverlay,
50
+ DrawerTrigger,
51
+ DrawerClose,
52
+ DrawerContent,
53
+ DrawerHeader,
54
+ DrawerFooter,
55
+ DrawerBody,
56
+ DrawerTitle,
57
+ DrawerDescription,
58
+ drawerContentVariants,
59
+ drawerOverlayVariants,
60
+ type DrawerProps,
61
+ type DrawerContentProps,
62
+ type DrawerDirection,
63
+ } from "./Drawer/Drawer"
64
+ export {
65
+ DropdownMenu,
66
+ DropdownMenuTrigger,
67
+ DropdownMenuContent,
68
+ DropdownMenuItem,
69
+ DropdownMenuCheckboxItem,
70
+ DropdownMenuRadioItem,
71
+ DropdownMenuLabel,
72
+ DropdownMenuSeparator,
73
+ DropdownMenuShortcut,
74
+ DropdownMenuGroup,
75
+ DropdownMenuPortal,
76
+ DropdownMenuSub,
77
+ DropdownMenuSubContent,
78
+ DropdownMenuSubTrigger,
79
+ DropdownMenuRadioGroup,
80
+ } from "./DropdownMenu/DropdownMenu"
81
+ export { ErrorMessage, type ErrorMessageProps } from "./ErrorMessage/ErrorMessage"
82
+ export { Flex, flexVariants, type FlexProps, type FlexDirection, type FlexAlign, type FlexJustify, type FlexWrap, type FlexGap } from "./Flex/Flex"
83
+ export { IconButton, iconButtonVariants, type IconButtonProps, type IconButtonVariant, type IconButtonSize, type IconButtonRoundness } from "./IconButton/IconButton"
84
+ export { Input, inputVariants, type InputProps, type InputSize, type InputRoundness, type InputVariant } from "./Input/Input"
85
+ export {
86
+ InputOTP,
87
+ InputOTPGroup,
88
+ InputOTPSlot,
89
+ InputOTPSeparator,
90
+ inputOTPVariants,
91
+ inputOTPSlotVariants,
92
+ type InputOTPProps,
93
+ type InputOTPSlotProps,
94
+ type InputOTPSlotSize,
95
+ } from "./InputOTP/InputOTP"
96
+ export { Label, labelVariants, type LabelProps, type LabelVariant } from "./Label/Label"
97
+ export { Loader, loaderVariants, type LoaderProps, type LoaderSize, type LoaderColor } from "./Loader/Loader"
98
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from "./Popover/Popover"
99
+ export { Progress, progressVariants, progressIndicatorVariants, type ProgressProps, type ProgressSize, type ProgressVariant } from "./Progress/Progress"
100
+ export { RadioGroup, RadioGroupItem, radioGroupItemVariants, type RadioGroupItemProps, type RadioGroupItemSize } from "./RadioGroup/RadioGroup"
101
+ export { ScrollArea, ScrollBar } from "./ScrollArea/ScrollArea"
102
+ export {
103
+ Select,
104
+ SelectGroup,
105
+ SelectValue,
106
+ SelectTrigger,
107
+ SelectContent,
108
+ SelectLabel,
109
+ SelectItem,
110
+ SelectSeparator,
111
+ SelectScrollUpButton,
112
+ SelectScrollDownButton,
113
+ selectTriggerVariants,
114
+ type SelectTriggerProps,
115
+ type SelectTriggerSize,
116
+ } from "./Select/Select"
117
+ export { Separator } from "./Separator/Separator"
118
+ export { Skeleton, type SkeletonProps } from "./Skeleton/Skeleton"
119
+ export { Spinner, spinnerVariants, type SpinnerProps, type SpinnerSize, type SpinnerVariant } from "./Spinner/Spinner"
120
+ export { Switch, switchVariants, type SwitchProps, type SwitchSize } from "./Switch/Switch"
121
+ export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants, type TabsListProps, type TabsListVariant } from "./Tabs/Tabs"
122
+ export { Textarea, textareaVariants, type TextareaProps, type TextareaVariant, type TextareaResize } from "./Textarea/Textarea"
123
+ export { Toaster, toast, type ToastProps, type ToastTheme } from "./Toast/Toast"
124
+ export {
125
+ Tooltip,
126
+ TooltipTrigger,
127
+ TooltipContent,
128
+ TooltipProvider,
129
+ tooltipContentVariants,
130
+ type TooltipContentProps,
131
+ type TooltipContentVariant,
132
+ } from "./Tooltip/Tooltip"
133
+ export { Typography, typographyVariants, type TypographyVariant, type TypographyColor } from "./Typography/Typography"
134
+
135
+ // Utilities
136
+ export { cn, copyToClipboard } from "./lib/utils"
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@a2v2ai/uikit",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "author": "Arulraj V & abofficial1997@gmail.com",
5
5
  "description": "A React UI component library built with shadcn/ui and Tailwind CSS",
6
6
  "license": "MIT",
@@ -25,5 +25,8 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "cpy-cli": "^6.0.0"
28
+ },
29
+ "devDependencies": {
30
+ "typescript": "~5.9.3"
28
31
  }
29
32
  }
package/tsconfig.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
4
+ "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
5
+ "lib": [
6
+ "esnext",
7
+ "dom"
8
+ ] /* Specify library files to be included in the compilation. */,
9
+ "jsx": "react-jsx" /* Specify JSX code generation: 'preserve', 'react-native', 'react', or 'react-jsx'. */,
10
+ "declaration": true, /* Generates corresponding '.d.ts' file. */
11
+ "outDir": "../dist", /* Redirect output structure to the directory. */
12
+ "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
13
+ "noEmit": false /* Do not emit outputs. */,
14
+ "strict": true /* Enable all strict type-checking options. */,
15
+ "noUnusedLocals": true /* Report errors on unused locals. */,
16
+ "noUnusedParameters": true /* Report errors on unused parameters. */,
17
+ "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
18
+ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
19
+ "skipLibCheck": true,
20
+ "forceConsistentCasingInFileNames": true,
21
+ "resolveJsonModule": true
22
+ },
23
+ "exclude": ["node_modules", "**/*.stories.tsx"]
24
+ }
package/Alert/Alert.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import * as React from "react";
2
- import { type VariantProps } from "class-variance-authority";
3
- declare const alertVariants: (props?: ({
4
- variant?: "default" | "destructive" | "success" | "warning" | "info" | null | undefined;
5
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
- export interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
7
- }
8
- declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
9
- declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
10
- declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
11
- export { Alert, AlertTitle, AlertDescription, alertVariants };