@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,425 +0,0 @@
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
- "subtitle3",
25
- "body1",
26
- "body2",
27
- "body3",
28
- "caption",
29
- "subtitle1Medium",
30
- "subtitle1Bold",
31
- "subtitle1SemiBold",
32
- "subtitle2Medium",
33
- "subtitle2Bold",
34
- "subtitle2SemiBold",
35
- "subtitle3Medium",
36
- "subtitle3Bold",
37
- "subtitle3SemiBold",
38
- "body1Medium",
39
- "body1Bold",
40
- "body1SemiBold",
41
- "body2Medium",
42
- "body2Bold",
43
- "body2SemiBold",
44
- "body3Medium",
45
- "body3Bold",
46
- "body3SemiBold",
47
- "captionMedium",
48
- "captionBold",
49
- "captionSemiBold",
50
- ],
51
- },
52
- color: {
53
- control: "select",
54
- options: [
55
- "default",
56
- "main-50", "main-100", "main-200", "main-300", "main-400", "main-500", "main-600", "main-700", "main-800", "main-900", "main-950",
57
- "success-50", "success-100", "success-200", "success-300", "success-400", "success-500", "success-600", "success-700", "success-800", "success-900", "success-950",
58
- "accent-50", "accent-100", "accent-200", "accent-300", "accent-400", "accent-500", "accent-600", "accent-700", "accent-800", "accent-900", "accent-950",
59
- "error-50", "error-100", "error-200", "error-300", "error-400", "error-500", "error-600", "error-700", "error-800", "error-900", "error-950",
60
- "warning-50", "warning-100", "warning-200", "warning-300", "warning-400", "warning-500", "warning-600", "warning-700", "warning-800", "warning-900", "warning-950",
61
- "grey-50", "grey-100", "grey-200", "grey-300", "grey-400", "grey-500", "grey-600", "grey-700", "grey-800", "grey-900", "grey-950",
62
- ],
63
- },
64
- },
65
- }
66
-
67
- export default meta
68
- type Story = StoryObj<typeof Typography>
69
-
70
- export const Default: Story = {
71
- args: {
72
- variant: "body1",
73
- color: "default",
74
- children: "The quick brown fox jumps over the lazy dog",
75
- },
76
- }
77
-
78
- export const AllVariants: Story = {
79
- render: () => (
80
- <Flex gap={6}>
81
- <Typography variant="h1">Typography / h1</Typography>
82
- <Typography variant="h2">Typography / h2</Typography>
83
- <Typography variant="h3">Typography / h3</Typography>
84
- <Typography variant="h4">Typography / h4</Typography>
85
- <Typography variant="h5">Typography / h5</Typography>
86
- <Typography variant="h6">Typography / h6</Typography>
87
- <Typography variant="subtitle1">Typography / Subtitle 1</Typography>
88
- <Typography variant="subtitle2">Typography / Subtitle 2</Typography>
89
- <Typography variant="body1">Typography / Body 1</Typography>
90
- <Typography variant="body2">Typography / Body 2</Typography>
91
- <Typography variant="body3">Typography / Body 3</Typography>
92
- <Typography variant="caption">Typography / Caption</Typography>
93
- <Typography variant="subtitle1Medium">Typography / Subtitle 1 Medium</Typography>
94
- <Typography variant="subtitle1Bold">Typography / Subtitle 1 Bold</Typography>
95
- <Typography variant="subtitle1SemiBold">Typography / Subtitle 1 SemiBold</Typography>
96
- <Typography variant="subtitle2Medium">Typography / Subtitle 2 Medium</Typography>
97
- <Typography variant="subtitle2Bold">Typography / Subtitle 2 Bold</Typography>
98
- <Typography variant="subtitle2SemiBold">Typography / Subtitle 2 SemiBold</Typography>
99
- <Typography variant="subtitle3Medium">Typography / Subtitle 3 Medium</Typography>
100
- <Typography variant="subtitle3Bold">Typography / Subtitle 3 Bold</Typography>
101
- <Typography variant="subtitle3SemiBold">Typography / Subtitle 3 SemiBold</Typography>
102
- <Typography variant="body1Medium">Typography / Body 1 Medium</Typography>
103
- <Typography variant="body1Bold">Typography / Body 1 Bold</Typography>
104
- <Typography variant="body1SemiBold">Typography / Body 1 SemiBold</Typography>
105
- <Typography variant="body2Medium">Typography / Body 2 Medium</Typography>
106
- <Typography variant="body2Bold">Typography / Body 2 Bold</Typography>
107
- <Typography variant="body2SemiBold">Typography / Body 2 SemiBold</Typography>
108
- <Typography variant="body3Medium">Typography / Body 3 Medium</Typography>
109
- <Typography variant="body3Bold">Typography / Body 3 Bold</Typography>
110
- <Typography variant="body3SemiBold">Typography / Body 3 SemiBold</Typography>
111
- <Typography variant="captionMedium">Typography / Caption Medium</Typography>
112
- <Typography variant="captionBold">Typography / Caption Bold</Typography>
113
- <Typography variant="captionSemiBold">Typography / Caption SemiBold</Typography>
114
- </Flex>
115
- ),
116
- }
117
-
118
- export const Colors: Story = {
119
- render: () => (
120
- <Flex gap={8}>
121
- {/* Default / Foreground */}
122
- <Flex gap={2}>
123
- <Typography variant="h5">Default (Foreground)</Typography>
124
- <Typography variant="body1" color="default">
125
- The quick brown fox jumps over the lazy dog
126
- </Typography>
127
- </Flex>
128
-
129
- {/* Main Colors */}
130
- <Flex gap={2}>
131
- <Typography variant="h5">Main Colors</Typography>
132
- <Flex gap={1}>
133
- <Typography variant="body1" color="main-950">Main 950</Typography>
134
- <Typography variant="body1" color="main-900">Main 900</Typography>
135
- <Typography variant="body1" color="main-800">Main 800</Typography>
136
- <Typography variant="body1" color="main-700">Main 700</Typography>
137
- <Typography variant="body1" color="main-600">Main 600</Typography>
138
- <Typography variant="body1" color="main-500">Main 500</Typography>
139
- </Flex>
140
- </Flex>
141
-
142
- {/* Success Colors */}
143
- <Flex gap={2}>
144
- <Typography variant="h5">Success Colors</Typography>
145
- <Flex gap={1}>
146
- <Typography variant="body1" color="success-700">Success 700</Typography>
147
- <Typography variant="body1" color="success-600">Success 600</Typography>
148
- <Typography variant="body1" color="success-500">Success 500</Typography>
149
- </Flex>
150
- </Flex>
151
-
152
- {/* Accent Colors */}
153
- <Flex gap={2}>
154
- <Typography variant="h5">Accent Colors</Typography>
155
- <Flex gap={1}>
156
- <Typography variant="body1" color="accent-700">Accent 700</Typography>
157
- <Typography variant="body1" color="accent-600">Accent 600</Typography>
158
- <Typography variant="body1" color="accent-500">Accent 500</Typography>
159
- </Flex>
160
- </Flex>
161
-
162
- {/* Error Colors */}
163
- <Flex gap={2}>
164
- <Typography variant="h5">Error Colors</Typography>
165
- <Flex gap={1}>
166
- <Typography variant="body1" color="error-700">Error 700</Typography>
167
- <Typography variant="body1" color="error-600">Error 600</Typography>
168
- <Typography variant="body1" color="error-500">Error 500</Typography>
169
- </Flex>
170
- </Flex>
171
-
172
- {/* Warning Colors */}
173
- <Flex gap={2}>
174
- <Typography variant="h5">Warning Colors</Typography>
175
- <Flex gap={1}>
176
- <Typography variant="body1" color="warning-700">Warning 700</Typography>
177
- <Typography variant="body1" color="warning-600">Warning 600</Typography>
178
- <Typography variant="body1" color="warning-500">Warning 500</Typography>
179
- </Flex>
180
- </Flex>
181
-
182
- {/* Grey Colors */}
183
- <Flex gap={2}>
184
- <Typography variant="h5">Grey Colors</Typography>
185
- <Flex gap={1}>
186
- <Typography variant="body1" color="grey-900">Grey 900</Typography>
187
- <Typography variant="body1" color="grey-700">Grey 700</Typography>
188
- <Typography variant="body1" color="grey-500">Grey 500</Typography>
189
- <Typography variant="body1" color="grey-400">Grey 400</Typography>
190
- </Flex>
191
- </Flex>
192
- </Flex>
193
- ),
194
- }
195
-
196
- export const H1: Story = {
197
- args: {
198
- variant: "h1",
199
- children: "Heading 1",
200
- },
201
- }
202
-
203
- export const H2: Story = {
204
- args: {
205
- variant: "h2",
206
- children: "Heading 2",
207
- },
208
- }
209
-
210
- export const H3: Story = {
211
- args: {
212
- variant: "h3",
213
- children: "Heading 3",
214
- },
215
- }
216
-
217
- export const H4: Story = {
218
- args: {
219
- variant: "h4",
220
- children: "Heading 4",
221
- },
222
- }
223
-
224
- export const H5: Story = {
225
- args: {
226
- variant: "h5",
227
- children: "Heading 5",
228
- },
229
- }
230
-
231
- export const H6: Story = {
232
- args: {
233
- variant: "h6",
234
- children: "Heading 6",
235
- },
236
- }
237
-
238
- export const Subtitle1: Story = {
239
- args: {
240
- variant: "subtitle1",
241
- children: "Subtitle 1",
242
- },
243
- }
244
-
245
- export const Subtitle2: Story = {
246
- args: {
247
- variant: "subtitle2",
248
- children: "Subtitle 2",
249
- },
250
- }
251
-
252
- export const Body1: Story = {
253
- args: {
254
- variant: "body1",
255
- children: "Body 1 - The quick brown fox jumps over the lazy dog",
256
- },
257
- }
258
-
259
- export const Body2: Story = {
260
- args: {
261
- variant: "body2",
262
- children: "Body 2 - The quick brown fox jumps over the lazy dog",
263
- },
264
- }
265
-
266
- export const Body3: Story = {
267
- args: {
268
- variant: "body3",
269
- children: "Body 3 - The quick brown fox jumps over the lazy dog",
270
- },
271
- }
272
-
273
- export const Caption: Story = {
274
- args: {
275
- variant: "caption",
276
- children: "Caption - The quick brown fox jumps over the lazy dog",
277
- },
278
- }
279
-
280
- export const Subtitle1Medium: Story = {
281
- args: {
282
- variant: "subtitle1Medium",
283
- children: "Subtitle 1 Medium",
284
- },
285
- }
286
-
287
- export const Subtitle1Bold: Story = {
288
- args: {
289
- variant: "subtitle1Bold",
290
- children: "Subtitle 1 Bold",
291
- },
292
- }
293
-
294
- export const Subtitle1SemiBold: Story = {
295
- args: {
296
- variant: "subtitle1SemiBold",
297
- children: "Subtitle 1 SemiBold",
298
- },
299
- }
300
-
301
- export const Subtitle2Medium: Story = {
302
- args: {
303
- variant: "subtitle2Medium",
304
- children: "Subtitle 2 Medium",
305
- },
306
- }
307
-
308
- export const Subtitle2Bold: Story = {
309
- args: {
310
- variant: "subtitle2Bold",
311
- children: "Subtitle 2 Bold",
312
- },
313
- }
314
-
315
- export const Subtitle2SemiBold: Story = {
316
- args: {
317
- variant: "subtitle2SemiBold",
318
- children: "Subtitle 2 SemiBold",
319
- },
320
- }
321
-
322
- export const Subtitle3Medium: Story = {
323
- args: {
324
- variant: "subtitle3Medium",
325
- children: "Subtitle 3 Medium",
326
- },
327
- }
328
-
329
- export const Subtitle3Bold: Story = {
330
- args: {
331
- variant: "subtitle3Bold",
332
- children: "Subtitle 3 Bold",
333
- },
334
- }
335
-
336
- export const Subtitle3SemiBold: Story = {
337
- args: {
338
- variant: "subtitle3SemiBold",
339
- children: "Subtitle 3 SemiBold",
340
- },
341
- }
342
-
343
- export const Body1Medium: Story = {
344
- args: {
345
- variant: "body1Medium",
346
- children: "Body 1 Medium - The quick brown fox jumps over the lazy dog",
347
- },
348
- }
349
-
350
- export const Body1Bold: Story = {
351
- args: {
352
- variant: "body1Bold",
353
- children: "Body 1 Bold - The quick brown fox jumps over the lazy dog",
354
- },
355
- }
356
-
357
- export const Body1SemiBold: Story = {
358
- args: {
359
- variant: "body1SemiBold",
360
- children: "Body 1 SemiBold - The quick brown fox jumps over the lazy dog",
361
- },
362
- }
363
-
364
- export const Body2Medium: Story = {
365
- args: {
366
- variant: "body2Medium",
367
- children: "Body 2 Medium - The quick brown fox jumps over the lazy dog",
368
- },
369
- }
370
-
371
- export const Body2Bold: Story = {
372
- args: {
373
- variant: "body2Bold",
374
- children: "Body 2 Bold - The quick brown fox jumps over the lazy dog",
375
- },
376
- }
377
-
378
- export const Body2SemiBold: Story = {
379
- args: {
380
- variant: "body2SemiBold",
381
- children: "Body 2 SemiBold - The quick brown fox jumps over the lazy dog",
382
- },
383
- }
384
-
385
- export const Body3Medium: Story = {
386
- args: {
387
- variant: "body3Medium",
388
- children: "Body 3 Medium - The quick brown fox jumps over the lazy dog",
389
- },
390
- }
391
-
392
- export const Body3Bold: Story = {
393
- args: {
394
- variant: "body3Bold",
395
- children: "Body 3 Bold - The quick brown fox jumps over the lazy dog",
396
- },
397
- }
398
-
399
- export const Body3SemiBold: Story = {
400
- args: {
401
- variant: "body3SemiBold",
402
- children: "Body 3 SemiBold - The quick brown fox jumps over the lazy dog",
403
- },
404
- }
405
-
406
- export const CaptionMedium: Story = {
407
- args: {
408
- variant: "captionMedium",
409
- children: "Caption Medium - The quick brown fox jumps over the lazy dog",
410
- },
411
- }
412
-
413
- export const CaptionBold: Story = {
414
- args: {
415
- variant: "captionBold",
416
- children: "Caption Bold - The quick brown fox jumps over the lazy dog",
417
- },
418
- }
419
-
420
- export const CaptionSemiBold: Story = {
421
- args: {
422
- variant: "captionSemiBold",
423
- children: "Caption SemiBold - The quick brown fox jumps over the lazy dog",
424
- },
425
- }
@@ -1,106 +0,0 @@
1
- import * as React from "react";
2
- import { Slot } from "@radix-ui/react-slot";
3
- import { cva } from "class-variance-authority";
4
- import { cn } from "../lib/utils";
5
- import {
6
- type TextVariant,
7
- type TextColor,
8
- textVariantClasses,
9
- textColorClasses,
10
- } from "../lib/typography-types";
11
-
12
- const typographyVariants = cva("", {
13
- variants: {
14
- align: {
15
- left: "text-left",
16
- center: "text-center",
17
- right: "text-right",
18
- justify: "text-justify",
19
- },
20
- variant: textVariantClasses,
21
- color: textColorClasses,
22
- },
23
- defaultVariants: {
24
- variant: "body1",
25
- color: "default",
26
- },
27
- });
28
-
29
- type TypographyVariant = TextVariant;
30
- type TypographyColor = TextColor;
31
- type TypographyAlign = "left" | "center" | "right" | "justify";
32
-
33
- const variantElementMap: Record<
34
- TypographyVariant,
35
- keyof React.JSX.IntrinsicElements
36
- > = {
37
- h1: "h1",
38
- h2: "h2",
39
- h3: "h3",
40
- h4: "h4",
41
- h5: "h5",
42
- h6: "h6",
43
- subtitle1: "p",
44
- subtitle2: "p",
45
- subtitle3: "p",
46
- body1: "p",
47
- body2: "p",
48
- body3: "p",
49
- caption: "span",
50
- subtitle1Medium: "p",
51
- subtitle1Bold: "p",
52
- subtitle1SemiBold: "p",
53
- subtitle2Medium: "p",
54
- subtitle2Bold: "p",
55
- subtitle2SemiBold: "p",
56
- subtitle3Medium: "p",
57
- subtitle3Bold: "p",
58
- subtitle3SemiBold: "p",
59
- body1Medium: "p",
60
- body1Bold: "p",
61
- body1SemiBold: "p",
62
- body2Medium: "p",
63
- body2Bold: "p",
64
- body2SemiBold: "p",
65
- body3Medium: "p",
66
- body3Bold: "p",
67
- body3SemiBold: "p",
68
- captionMedium: "span",
69
- captionBold: "span",
70
- captionSemiBold: "span",
71
- };
72
-
73
- type TypographyProps<T extends React.ElementType = "p"> = {
74
- as?: T;
75
- asChild?: boolean;
76
- variant?: TypographyVariant;
77
- color?: TypographyColor;
78
- align?: TypographyAlign;
79
- } & Omit<
80
- React.ComponentPropsWithoutRef<T>,
81
- "as" | "asChild" | "color" | "variant" | "align"
82
- >;
83
-
84
- function Typography<T extends React.ElementType = "p">({
85
- className,
86
- variant = "body1",
87
- color = "default",
88
- align,
89
- as,
90
- asChild = false,
91
- ...props
92
- }: TypographyProps<T>) {
93
- const defaultElement = variant ? variantElementMap[variant] : "p";
94
- const Component = asChild ? Slot : as ?? defaultElement;
95
-
96
- return (
97
- <Component
98
- data-slot="typography"
99
- className={cn(typographyVariants({ variant, color, align, className }))}
100
- {...props}
101
- />
102
- );
103
- }
104
-
105
- export { Typography, typographyVariants };
106
- export type { TypographyVariant, TypographyColor, TypographyAlign };
package/helpers.ts DELETED
@@ -1,5 +0,0 @@
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"