@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/Flex/Flex.tsx ADDED
@@ -0,0 +1,102 @@
1
+ import * as React from "react"
2
+ import { cva } from "class-variance-authority"
3
+ import { cn } from "../lib/utils"
4
+
5
+ type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse"
6
+ type FlexAlign = "start" | "center" | "end" | "stretch" | "baseline"
7
+ type FlexJustify = "start" | "center" | "end" | "between" | "around" | "evenly"
8
+ type FlexWrap = "nowrap" | "wrap" | "wrap-reverse"
9
+ type FlexGap = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48
10
+
11
+ const flexVariants = cva("flex", {
12
+ variants: {
13
+ direction: {
14
+ row: "flex-row",
15
+ column: "flex-col",
16
+ "row-reverse": "flex-row-reverse",
17
+ "column-reverse": "flex-col-reverse",
18
+ },
19
+ align: {
20
+ start: "items-start",
21
+ center: "items-center",
22
+ end: "items-end",
23
+ stretch: "items-stretch",
24
+ baseline: "items-baseline",
25
+ },
26
+ justify: {
27
+ start: "justify-start",
28
+ center: "justify-center",
29
+ end: "justify-end",
30
+ between: "justify-between",
31
+ around: "justify-around",
32
+ evenly: "justify-evenly",
33
+ },
34
+ wrap: {
35
+ nowrap: "flex-nowrap",
36
+ wrap: "flex-wrap",
37
+ "wrap-reverse": "flex-wrap-reverse",
38
+ },
39
+ gap: {
40
+ 0: "gap-0",
41
+ 1: "gap-1",
42
+ 2: "gap-2",
43
+ 3: "gap-3",
44
+ 4: "gap-4",
45
+ 5: "gap-5",
46
+ 6: "gap-6",
47
+ 8: "gap-8",
48
+ 10: "gap-10",
49
+ 12: "gap-12",
50
+ 16: "gap-16",
51
+ 20: "gap-20",
52
+ 24: "gap-24",
53
+ 32: "gap-32",
54
+ 40: "gap-40",
55
+ 48: "gap-48",
56
+ },
57
+ },
58
+ defaultVariants: {
59
+ direction: "column",
60
+ align: "start",
61
+ justify: "start",
62
+ wrap: "nowrap",
63
+ gap: 0,
64
+ },
65
+ })
66
+
67
+ type FlexProps = React.HTMLAttributes<HTMLDivElement> & {
68
+ direction?: FlexDirection
69
+ align?: FlexAlign
70
+ justify?: FlexJustify
71
+ wrap?: FlexWrap
72
+ gap?: FlexGap
73
+ as?: React.ElementType
74
+ }
75
+
76
+ const Flex = React.forwardRef<HTMLDivElement, FlexProps>(
77
+ (
78
+ {
79
+ className,
80
+ direction,
81
+ align,
82
+ justify,
83
+ wrap,
84
+ gap,
85
+ as: Component = "div",
86
+ ...props
87
+ },
88
+ ref
89
+ ) => {
90
+ return (
91
+ <Component
92
+ ref={ref}
93
+ className={cn(flexVariants({ direction, align, justify, wrap, gap, className }))}
94
+ {...props}
95
+ />
96
+ )
97
+ }
98
+ )
99
+ Flex.displayName = "Flex"
100
+
101
+ export { Flex, flexVariants }
102
+ export type { FlexProps, FlexDirection, FlexAlign, FlexJustify, FlexWrap, FlexGap }