@codefast/ui 0.3.16-canary.2 → 0.3.16-canary.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 (223) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +1 -1
  3. package/dist/components/accordion.mjs +2 -2
  4. package/dist/components/alert-dialog.d.mts +1 -1
  5. package/dist/components/alert-dialog.mjs +4 -4
  6. package/dist/components/alert.d.mts +3 -13
  7. package/dist/components/alert.mjs +3 -23
  8. package/dist/components/badge.d.mts +3 -15
  9. package/dist/components/badge.mjs +2 -44
  10. package/dist/components/breadcrumb.mjs +1 -1
  11. package/dist/components/button-group.d.mts +3 -13
  12. package/dist/components/button-group.mjs +3 -24
  13. package/dist/components/button.d.mts +3 -25
  14. package/dist/components/button.mjs +2 -72
  15. package/dist/components/calendar.mjs +2 -1
  16. package/dist/components/carousel.d.mts +1 -2
  17. package/dist/components/chart.d.mts +2 -4
  18. package/dist/components/checkbox.mjs +2 -2
  19. package/dist/components/context-menu.mjs +2 -2
  20. package/dist/components/dialog.d.mts +1 -1
  21. package/dist/components/dialog.mjs +4 -4
  22. package/dist/components/drawer.d.mts +1 -1
  23. package/dist/components/drawer.mjs +2 -2
  24. package/dist/components/dropdown-menu.mjs +2 -2
  25. package/dist/components/empty.d.mts +3 -13
  26. package/dist/components/empty.mjs +3 -18
  27. package/dist/components/field.d.mts +3 -14
  28. package/dist/components/field.mjs +3 -32
  29. package/dist/components/form.d.mts +2 -4
  30. package/dist/components/hover-card.mjs +1 -1
  31. package/dist/components/input-group.d.mts +4 -31
  32. package/dist/components/input-group.mjs +3 -90
  33. package/dist/components/input-number.mjs +4 -4
  34. package/dist/components/input-otp.mjs +2 -2
  35. package/dist/components/input.mjs +1 -1
  36. package/dist/components/item.d.mts +4 -29
  37. package/dist/components/item.mjs +3 -56
  38. package/dist/components/menubar.mjs +2 -2
  39. package/dist/components/native-select.mjs +1 -1
  40. package/dist/components/navigation-menu.d.mts +1 -6
  41. package/dist/components/navigation-menu.mjs +8 -15
  42. package/dist/components/pagination.d.mts +1 -1
  43. package/dist/components/pagination.mjs +1 -1
  44. package/dist/components/popover.mjs +1 -1
  45. package/dist/components/progress-circle.d.mts +3 -47
  46. package/dist/components/progress-circle.mjs +2 -47
  47. package/dist/components/progress.mjs +1 -1
  48. package/dist/components/radio-group.mjs +1 -1
  49. package/dist/components/radio.mjs +1 -1
  50. package/dist/components/scroll-area.d.mts +3 -19
  51. package/dist/components/scroll-area.mjs +4 -61
  52. package/dist/components/select.d.mts +1 -1
  53. package/dist/components/select.mjs +3 -3
  54. package/dist/components/separator.d.mts +3 -18
  55. package/dist/components/separator.mjs +3 -23
  56. package/dist/components/sheet.d.mts +6 -18
  57. package/dist/components/sheet.mjs +6 -49
  58. package/dist/components/sidebar.d.mts +4 -19
  59. package/dist/components/sidebar.mjs +10 -46
  60. package/dist/components/skeleton.mjs +1 -1
  61. package/dist/components/slider.mjs +1 -1
  62. package/dist/components/spinner.mjs +1 -1
  63. package/dist/components/switch.mjs +2 -2
  64. package/dist/components/table.mjs +1 -1
  65. package/dist/components/tabs.mjs +1 -1
  66. package/dist/components/textarea.mjs +1 -1
  67. package/dist/components/toggle-group.d.mts +3 -2
  68. package/dist/components/toggle-group.mjs +1 -1
  69. package/dist/components/toggle.d.mts +2 -21
  70. package/dist/components/toggle.mjs +2 -39
  71. package/dist/components/tooltip.mjs +1 -1
  72. package/dist/index.d.mts +31 -16
  73. package/dist/index.mjs +30 -15
  74. package/dist/lib/utils.d.mts +1 -12
  75. package/dist/lib/utils.mjs +1 -9
  76. package/dist/primitives/checkbox-group.d.mts +1 -2
  77. package/dist/primitives/input-number.d.mts +1 -2
  78. package/dist/primitives/input.d.mts +1 -2
  79. package/dist/primitives/progress-circle.d.mts +1 -2
  80. package/dist/variants/alert.d.mts +18 -0
  81. package/dist/variants/alert.mjs +25 -0
  82. package/dist/variants/badge.d.mts +20 -0
  83. package/dist/variants/badge.mjs +46 -0
  84. package/dist/variants/button-group.d.mts +18 -0
  85. package/dist/variants/button-group.mjs +26 -0
  86. package/dist/variants/button.d.mts +30 -0
  87. package/dist/variants/button.mjs +76 -0
  88. package/dist/variants/empty.d.mts +18 -0
  89. package/dist/variants/empty.mjs +20 -0
  90. package/dist/variants/field.d.mts +19 -0
  91. package/dist/variants/field.mjs +34 -0
  92. package/dist/variants/input-group.d.mts +43 -0
  93. package/dist/variants/input-group.mjs +93 -0
  94. package/dist/variants/item.d.mts +37 -0
  95. package/dist/variants/item.mjs +60 -0
  96. package/dist/variants/navigation-menu.d.mts +13 -0
  97. package/dist/variants/navigation-menu.mjs +12 -0
  98. package/dist/variants/progress-circle.d.mts +52 -0
  99. package/dist/variants/progress-circle.mjs +49 -0
  100. package/dist/variants/scroll-area.d.mts +24 -0
  101. package/dist/variants/scroll-area.mjs +63 -0
  102. package/dist/variants/separator.d.mts +23 -0
  103. package/dist/variants/separator.mjs +25 -0
  104. package/dist/variants/sheet.d.mts +20 -0
  105. package/dist/variants/sheet.mjs +50 -0
  106. package/dist/variants/sidebar.d.mts +23 -0
  107. package/dist/variants/sidebar.mjs +42 -0
  108. package/dist/variants/toggle.d.mts +23 -0
  109. package/dist/variants/toggle.mjs +43 -0
  110. package/package.json +168 -20
  111. package/src/components/accordion.tsx +156 -0
  112. package/src/components/alert-dialog.tsx +314 -0
  113. package/src/components/alert.tsx +86 -0
  114. package/src/components/aspect-ratio.tsx +28 -0
  115. package/src/components/avatar.tsx +84 -0
  116. package/src/components/badge.tsx +38 -0
  117. package/src/components/breadcrumb.tsx +197 -0
  118. package/src/components/button-group.tsx +107 -0
  119. package/src/components/button.tsx +66 -0
  120. package/src/components/calendar.tsx +277 -0
  121. package/src/components/card.tsx +175 -0
  122. package/src/components/carousel.tsx +367 -0
  123. package/src/components/chart.tsx +587 -0
  124. package/src/components/checkbox-cards.tsx +92 -0
  125. package/src/components/checkbox-group.tsx +83 -0
  126. package/src/components/checkbox.tsx +65 -0
  127. package/src/components/collapsible.tsx +60 -0
  128. package/src/components/command.tsx +311 -0
  129. package/src/components/context-menu.tsx +489 -0
  130. package/src/components/dialog.tsx +295 -0
  131. package/src/components/drawer.tsx +271 -0
  132. package/src/components/dropdown-menu.tsx +498 -0
  133. package/src/components/empty.tsx +169 -0
  134. package/src/components/field.tsx +362 -0
  135. package/src/components/form.tsx +300 -0
  136. package/src/components/hover-card.tsx +116 -0
  137. package/src/components/input-group.tsx +224 -0
  138. package/src/components/input-number.tsx +161 -0
  139. package/src/components/input-otp.tsx +151 -0
  140. package/src/components/input-password.tsx +74 -0
  141. package/src/components/input-search.tsx +98 -0
  142. package/src/components/input.tsx +52 -0
  143. package/src/components/item.tsx +280 -0
  144. package/src/components/kbd.tsx +59 -0
  145. package/src/components/label.tsx +44 -0
  146. package/src/components/menubar.tsx +531 -0
  147. package/src/components/native-select.tsx +96 -0
  148. package/src/components/navigation-menu.tsx +295 -0
  149. package/src/components/pagination.tsx +204 -0
  150. package/src/components/popover.tsx +139 -0
  151. package/src/components/progress-circle.tsx +203 -0
  152. package/src/components/progress.tsx +54 -0
  153. package/src/components/radio-cards.tsx +85 -0
  154. package/src/components/radio-group.tsx +79 -0
  155. package/src/components/radio.tsx +61 -0
  156. package/src/components/resizable.tsx +99 -0
  157. package/src/components/scroll-area.tsx +115 -0
  158. package/src/components/select.tsx +319 -0
  159. package/src/components/separator.tsx +74 -0
  160. package/src/components/sheet.tsx +278 -0
  161. package/src/components/sidebar.tsx +1056 -0
  162. package/src/components/skeleton.tsx +37 -0
  163. package/src/components/slider.tsx +95 -0
  164. package/src/components/sonner.tsx +47 -0
  165. package/src/components/spinner.tsx +75 -0
  166. package/src/components/switch.tsx +66 -0
  167. package/src/components/table.tsx +200 -0
  168. package/src/components/tabs.tsx +128 -0
  169. package/src/components/textarea.tsx +49 -0
  170. package/src/components/toggle-group.tsx +141 -0
  171. package/src/components/toggle.tsx +39 -0
  172. package/src/components/tooltip.tsx +141 -0
  173. package/src/css/amber.css +59 -22
  174. package/src/css/blue.css +59 -22
  175. package/src/css/cyan.css +59 -22
  176. package/src/css/emerald.css +59 -22
  177. package/src/css/fuchsia.css +59 -22
  178. package/src/css/gray.css +59 -22
  179. package/src/css/green.css +59 -22
  180. package/src/css/indigo.css +59 -22
  181. package/src/css/lime.css +59 -22
  182. package/src/css/neutral.css +59 -22
  183. package/src/css/orange.css +59 -22
  184. package/src/css/pink.css +59 -22
  185. package/src/css/preset.css +32 -13
  186. package/src/css/purple.css +59 -22
  187. package/src/css/red.css +59 -22
  188. package/src/css/rose.css +59 -22
  189. package/src/css/sky.css +59 -22
  190. package/src/css/slate.css +59 -22
  191. package/src/css/stone.css +59 -22
  192. package/src/css/teal.css +59 -22
  193. package/src/css/violet.css +59 -22
  194. package/src/css/yellow.css +59 -22
  195. package/src/css/zinc.css +59 -22
  196. package/src/hooks/use-animated-value.ts +97 -0
  197. package/src/hooks/use-copy-to-clipboard.ts +63 -0
  198. package/src/hooks/use-is-mobile.ts +27 -0
  199. package/src/hooks/use-media-query.ts +71 -0
  200. package/src/hooks/use-mutation-observer.ts +54 -0
  201. package/src/hooks/use-pagination.ts +166 -0
  202. package/src/index.ts +720 -0
  203. package/src/lib/utils.ts +5 -0
  204. package/src/primitives/checkbox-group.tsx +360 -0
  205. package/src/primitives/input-number.tsx +1013 -0
  206. package/src/primitives/input.tsx +243 -0
  207. package/src/primitives/progress-circle.tsx +537 -0
  208. package/src/variants/alert.ts +45 -0
  209. package/src/variants/badge.ts +66 -0
  210. package/src/variants/button-group.ts +49 -0
  211. package/src/variants/button.ts +93 -0
  212. package/src/variants/empty.ts +43 -0
  213. package/src/variants/field.ts +50 -0
  214. package/src/variants/input-group.ts +132 -0
  215. package/src/variants/item.ts +90 -0
  216. package/src/variants/navigation-menu.ts +32 -0
  217. package/src/variants/progress-circle.ts +47 -0
  218. package/src/variants/scroll-area.ts +79 -0
  219. package/src/variants/separator.ts +41 -0
  220. package/src/variants/sheet.ts +70 -0
  221. package/src/variants/sidebar.ts +61 -0
  222. package/src/variants/toggle.ts +59 -0
  223. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/clsx.d.mts +0 -6
@@ -0,0 +1,93 @@
1
+ import type { VariantProps } from "#/lib/utils";
2
+
3
+ import { tv } from "#/lib/utils";
4
+
5
+ /* -----------------------------------------------------------------------------
6
+ * Variant: Button
7
+ * -------------------------------------------------------------------------- */
8
+
9
+ /**
10
+ * @since 0.3.16-canary.0
11
+ */
12
+ const buttonVariants = tv({
13
+ base: [
14
+ "inline-flex shrink-0 items-center justify-center gap-2",
15
+ "rounded-lg outline-hidden",
16
+ "text-sm font-medium whitespace-nowrap",
17
+ "transition duration-150 ease-snappy select-none",
18
+ "motion-reduce:transition-none motion-reduce:duration-0",
19
+ "active:not-disabled:translate-y-px",
20
+ "focus-visible:ring-3",
21
+ "disabled:opacity-50",
22
+ "[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
23
+ ],
24
+ defaultVariants: {
25
+ size: "md",
26
+ variant: "default",
27
+ },
28
+ variants: {
29
+ size: {
30
+ "icon-sm": "size-8", // 32px
31
+ icon: "size-9", // 36px
32
+ "icon-lg": "size-10", // 40px
33
+
34
+ sm: ["h-8 px-3", "has-[>svg]:px-2.5"], // 32px
35
+ md: ["h-9 px-4", "has-[>svg]:px-3"], // 36px
36
+ lg: ["h-10 px-6", "has-[>svg]:px-4"], // 40px
37
+ },
38
+ variant: {
39
+ default: [
40
+ "bg-primary text-primary-foreground",
41
+ "hover:not-disabled:bg-primary/80",
42
+ "focus-visible:ring-primary/20",
43
+ "dark:focus-visible:ring-primary/40",
44
+ ],
45
+ destructive: [
46
+ "bg-destructive text-white",
47
+ "hover:not-disabled:bg-destructive/90",
48
+ "focus-visible:ring-destructive/20",
49
+ "dark:bg-destructive/60",
50
+ "dark:focus-visible:ring-destructive/40",
51
+ ],
52
+ ghost: [
53
+ "hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground",
54
+ "focus-visible:ring-ring/50",
55
+ "dark:hover:not-disabled:bg-secondary/50",
56
+ ],
57
+ link: [
58
+ "text-primary underline-offset-4",
59
+ "hover:not-disabled:underline",
60
+ "focus-visible:ring-ring/50",
61
+ ],
62
+ outline: [
63
+ "border border-input shadow-xs",
64
+ "hover:not-disabled:border-ring/60 hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground",
65
+ "focus-visible:border-ring focus-visible:ring-ring/50",
66
+ "aria-invalid:border-destructive",
67
+ "focus-within:aria-invalid:ring-destructive/20",
68
+ "hover:not-disabled:aria-invalid:border-destructive/60",
69
+ "dark:bg-input/30",
70
+ "dark:hover:not-disabled:bg-input/50",
71
+ "dark:aria-invalid:border-destructive/70",
72
+ "dark:focus-within:aria-invalid:ring-destructive/40",
73
+ ],
74
+ secondary: [
75
+ "bg-secondary text-secondary-foreground",
76
+ "hover:not-disabled:bg-secondary/80",
77
+ "focus-visible:ring-ring/50",
78
+ ],
79
+ },
80
+ },
81
+ });
82
+
83
+ /**
84
+ * @since 0.3.16-canary.0
85
+ */
86
+ type ButtonVariants = VariantProps<typeof buttonVariants>;
87
+
88
+ /* -----------------------------------------------------------------------------
89
+ * Exports
90
+ * -------------------------------------------------------------------------- */
91
+
92
+ export { buttonVariants };
93
+ export type { ButtonVariants };
@@ -0,0 +1,43 @@
1
+ import type { VariantProps } from "#/lib/utils";
2
+
3
+ import { tv } from "#/lib/utils";
4
+
5
+ /* -----------------------------------------------------------------------------
6
+ * Variant: EmptyMedia
7
+ * -------------------------------------------------------------------------- */
8
+
9
+ /**
10
+ * @since 0.3.16-canary.0
11
+ */
12
+ const emptyMediaVariants = tv({
13
+ base: [
14
+ "mb-2 flex shrink-0 items-center justify-center",
15
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0",
16
+ ],
17
+ defaultVariants: {
18
+ variant: "default",
19
+ },
20
+ variants: {
21
+ variant: {
22
+ default: "bg-transparent",
23
+ icon: [
24
+ "flex size-10 shrink-0 items-center justify-center",
25
+ "rounded-xl",
26
+ "bg-muted text-foreground",
27
+ "[&_svg:not([class*='size-'])]:size-6",
28
+ ],
29
+ },
30
+ },
31
+ });
32
+
33
+ /**
34
+ * @since 0.3.16-canary.0
35
+ */
36
+ type EmptyMediaVariants = VariantProps<typeof emptyMediaVariants>;
37
+
38
+ /* -----------------------------------------------------------------------------
39
+ * Exports
40
+ * -------------------------------------------------------------------------- */
41
+
42
+ export { emptyMediaVariants };
43
+ export type { EmptyMediaVariants };
@@ -0,0 +1,50 @@
1
+ import type { VariantProps } from "#/lib/utils";
2
+
3
+ import { tv } from "#/lib/utils";
4
+
5
+ /* -----------------------------------------------------------------------------
6
+ * Variant: Field
7
+ * -------------------------------------------------------------------------- */
8
+
9
+ /**
10
+ * @since 0.3.16-canary.0
11
+ */
12
+ const fieldVariants = tv({
13
+ base: ["group/field flex w-full gap-3", "data-[invalid=true]:text-destructive"],
14
+ defaultVariants: {
15
+ orientation: "vertical",
16
+ },
17
+ variants: {
18
+ orientation: {
19
+ horizontal: [
20
+ "flex-row items-center",
21
+ "has-[>[data-slot=field-content]]:items-start",
22
+ "[&>[data-slot=field-label]]:flex-auto",
23
+ "has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
24
+ ],
25
+ responsive: [
26
+ "flex-col",
27
+ "@md/field-group:flex-row @md/field-group:items-center",
28
+ "@md/field-group:has-[>[data-slot=field-content]]:items-start",
29
+ "[&>*]:w-full",
30
+ "@md/field-group:[&>*]:w-auto",
31
+ "[&>.sr-only]:w-auto",
32
+ "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
33
+ "@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
34
+ ],
35
+ vertical: ["flex-col", "[&>*]:w-full", "[&>.sr-only]:w-auto"],
36
+ },
37
+ },
38
+ });
39
+
40
+ /**
41
+ * @since 0.3.16-canary.0
42
+ */
43
+ type FieldVariants = VariantProps<typeof fieldVariants>;
44
+
45
+ /* -----------------------------------------------------------------------------
46
+ * Exports
47
+ * -------------------------------------------------------------------------- */
48
+
49
+ export { fieldVariants };
50
+ export type { FieldVariants };
@@ -0,0 +1,132 @@
1
+ import type { VariantProps } from "#/lib/utils";
2
+
3
+ import { tv } from "#/lib/utils";
4
+
5
+ /* -----------------------------------------------------------------------------
6
+ * Variant: InputGroup
7
+ * -------------------------------------------------------------------------- */
8
+
9
+ /**
10
+ * @since 0.3.16-canary.0
11
+ */
12
+ const inputGroupVariants = tv({
13
+ base: [
14
+ "group/input-group relative flex h-9 w-full min-w-0 items-center",
15
+ "rounded-lg border border-input shadow-xs outline-none",
16
+ "transition-[color,box-shadow]",
17
+ "motion-reduce:transition-none",
18
+ "dark:bg-input/30",
19
+ "has-[>textarea]:h-auto",
20
+ "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col",
21
+ "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col",
22
+ "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50",
23
+ "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20",
24
+ "dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
25
+ "has-[>[data-align=block-end]]:[&>[data-slot=input-group-control]]:pt-3",
26
+ "has-[>[data-align=block-start]]:[&>[data-slot=input-group-control]]:pb-3",
27
+ "has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-2",
28
+ "has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-2",
29
+ ],
30
+ });
31
+
32
+ /* -----------------------------------------------------------------------------
33
+ * Variant: InputGroupAddon
34
+ * -------------------------------------------------------------------------- */
35
+
36
+ /**
37
+ * @since 0.3.16-canary.0
38
+ */
39
+ const inputGroupAddonVariants = tv({
40
+ base: [
41
+ "flex h-auto items-center justify-center gap-2 py-1.5",
42
+ "text-sm font-medium text-muted-foreground",
43
+ "cursor-text select-none",
44
+ "group-data-disabled/input-group:opacity-50",
45
+ "[&>kbd]:rounded-[calc(var(--radius)-5px)]",
46
+ "[&>svg:not([class*='size-'])]:size-4",
47
+ ],
48
+ defaultVariants: {
49
+ align: "inline-start",
50
+ },
51
+ variants: {
52
+ align: {
53
+ "block-end": [
54
+ "order-last w-full justify-start px-3 pb-3",
55
+ "group-has-[>input]/input-group:pb-2.5",
56
+ "[.border-t]:pt-3",
57
+ ],
58
+ "block-start": [
59
+ "order-first w-full justify-start px-3 pt-3",
60
+ "group-has-[>input]/input-group:pt-2.5",
61
+ "[.border-b]:pb-3",
62
+ ],
63
+ "inline-end": [
64
+ "order-last",
65
+ "pr-3",
66
+ "has-[>button]:mr-[-0.45rem]",
67
+ "has-[>kbd]:mr-[-0.35rem]",
68
+ ],
69
+ "inline-start": [
70
+ "order-first",
71
+ "pl-3",
72
+ "has-[>button]:ml-[-0.45rem]",
73
+ "has-[>kbd]:ml-[-0.35rem]",
74
+ ],
75
+ },
76
+ },
77
+ });
78
+
79
+ /* -----------------------------------------------------------------------------
80
+ * Variant: InputGroupButton
81
+ * -------------------------------------------------------------------------- */
82
+
83
+ /**
84
+ * @since 0.3.16-canary.0
85
+ */
86
+ const inputGroupButtonVariants = tv({
87
+ base: [
88
+ "flex items-center gap-2",
89
+ "shadow-none",
90
+ "text-sm",
91
+ "[&>svg:not([class*='size-'])]:size-4",
92
+ ],
93
+ defaultVariants: {
94
+ size: "xs",
95
+ },
96
+ variants: {
97
+ size: {
98
+ "icon-xs": ["size-6 p-0", "rounded-[calc(var(--radius)-5px)]", "has-[>svg]:p-0"],
99
+ "icon-sm": ["size-8 p-0", "has-[>svg]:p-0"],
100
+
101
+ xs: [
102
+ "h-6 gap-1 px-2",
103
+ "rounded-[calc(var(--radius)-5px)]",
104
+ "has-[>svg]:px-2",
105
+ "[&>svg]:size-3.5",
106
+ ],
107
+ sm: ["h-8 gap-1.5 px-2.5", "rounded-md", "has-[>svg]:px-2.5"],
108
+ },
109
+ },
110
+ });
111
+
112
+ /**
113
+ * @since 0.3.16-canary.0
114
+ */
115
+ type InputGroupVariants = VariantProps<typeof inputGroupVariants>;
116
+
117
+ /**
118
+ * @since 0.3.16-canary.0
119
+ */
120
+ type InputGroupAddonVariants = VariantProps<typeof inputGroupAddonVariants>;
121
+
122
+ /**
123
+ * @since 0.3.16-canary.0
124
+ */
125
+ type InputGroupButtonVariants = VariantProps<typeof inputGroupButtonVariants>;
126
+
127
+ /* -----------------------------------------------------------------------------
128
+ * Exports
129
+ * -------------------------------------------------------------------------- */
130
+
131
+ export { inputGroupAddonVariants, inputGroupButtonVariants, inputGroupVariants };
132
+ export type { InputGroupAddonVariants, InputGroupButtonVariants, InputGroupVariants };
@@ -0,0 +1,90 @@
1
+ import type { VariantProps } from "#/lib/utils";
2
+
3
+ import { tv } from "#/lib/utils";
4
+
5
+ /* -----------------------------------------------------------------------------
6
+ * Variant: Item
7
+ * -------------------------------------------------------------------------- */
8
+
9
+ /**
10
+ * @since 0.3.16-canary.0
11
+ */
12
+ const itemVariants = tv({
13
+ base: [
14
+ "group/item flex flex-wrap items-center",
15
+ "rounded-lg border border-transparent outline-hidden",
16
+ "text-sm",
17
+ "transition-colors duration-100",
18
+ "motion-reduce:transition-none motion-reduce:duration-0",
19
+ "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50",
20
+ "[a]:transition-colors",
21
+ "[a]:motion-reduce:transition-none",
22
+ "[a]:hover:bg-accent/50",
23
+ ],
24
+ defaultVariants: {
25
+ size: "default",
26
+ variant: "default",
27
+ },
28
+ variants: {
29
+ size: {
30
+ default: ["gap-4", "p-4"],
31
+ sm: ["gap-2.5", "px-4 py-3"],
32
+ },
33
+ variant: {
34
+ default: "bg-transparent",
35
+ muted: "bg-muted/50",
36
+ outline: "border-border",
37
+ },
38
+ },
39
+ });
40
+
41
+ /* -----------------------------------------------------------------------------
42
+ * Variant: ItemMedia
43
+ * -------------------------------------------------------------------------- */
44
+
45
+ /**
46
+ * @since 0.3.16-canary.0
47
+ */
48
+ const itemMediaVariants = tv({
49
+ base: [
50
+ "flex shrink-0 items-center justify-center gap-2",
51
+ "group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start",
52
+ "[&_svg]:pointer-events-none",
53
+ ],
54
+ defaultVariants: {
55
+ variant: "default",
56
+ },
57
+ variants: {
58
+ variant: {
59
+ default: "bg-transparent",
60
+ icon: [
61
+ "size-8 shrink-0",
62
+ "rounded-md border",
63
+ "bg-muted",
64
+ "[&_svg:not([class*='size-'])]:size-4",
65
+ ],
66
+ image: [
67
+ "size-10 shrink-0 overflow-hidden",
68
+ "rounded-md",
69
+ "[&_img]:size-full [&_img]:object-cover",
70
+ ],
71
+ },
72
+ },
73
+ });
74
+
75
+ /**
76
+ * @since 0.3.16-canary.0
77
+ */
78
+ type ItemVariants = VariantProps<typeof itemVariants>;
79
+
80
+ /**
81
+ * @since 0.3.16-canary.0
82
+ */
83
+ type ItemMediaVariants = VariantProps<typeof itemMediaVariants>;
84
+
85
+ /* -----------------------------------------------------------------------------
86
+ * Exports
87
+ * -------------------------------------------------------------------------- */
88
+
89
+ export { itemMediaVariants, itemVariants };
90
+ export type { ItemMediaVariants, ItemVariants };
@@ -0,0 +1,32 @@
1
+ import type { VariantProps } from "#/lib/utils";
2
+
3
+ import { tv } from "#/lib/utils";
4
+
5
+ import { buttonVariants } from "#/variants/button";
6
+
7
+ /* -----------------------------------------------------------------------------
8
+ * Style: NavigationMenuTrigger
9
+ * -------------------------------------------------------------------------- */
10
+
11
+ /**
12
+ * @since 0.3.16-canary.0
13
+ */
14
+ const navigationMenuTriggerVariants = tv({
15
+ base: buttonVariants({
16
+ className:
17
+ "data-open:bg-secondary/50 data-open:text-secondary-foreground group/navigation-menu-trigger focus-visible:bg-secondary dark:hover:not-disabled:bg-secondary",
18
+ variant: "ghost",
19
+ }),
20
+ });
21
+
22
+ /**
23
+ * @since 0.3.16-canary.0
24
+ */
25
+ type NavigationMenuTriggerVariants = VariantProps<typeof navigationMenuTriggerVariants>;
26
+
27
+ /* -----------------------------------------------------------------------------
28
+ * Exports
29
+ * -------------------------------------------------------------------------- */
30
+
31
+ export { navigationMenuTriggerVariants };
32
+ export type { NavigationMenuTriggerVariants };
@@ -0,0 +1,47 @@
1
+ import type { VariantProps } from "#/lib/utils";
2
+
3
+ import { tv } from "#/lib/utils";
4
+
5
+ /* -----------------------------------------------------------------------------
6
+ * Variant: ProgressCircle
7
+ * -------------------------------------------------------------------------- */
8
+
9
+ /**
10
+ * @since 0.3.16-canary.0
11
+ */
12
+ const progressCircleVariants = tv({
13
+ defaultVariants: { size: "md", thickness: "regular", variant: "default" },
14
+ slots: {
15
+ indicator: "origin-center",
16
+ label: ["absolute flex items-center justify-center", "inset-0", "text-xs font-medium"],
17
+ root: "relative inline-flex items-center justify-center",
18
+ svg: "size-full",
19
+ track: "origin-center",
20
+ },
21
+ variants: {
22
+ size: {
23
+ sm: { label: "text-[0.625rem]" },
24
+ md: { label: "text-xs" },
25
+ lg: { label: "text-sm" },
26
+ xl: { label: "text-base" },
27
+ "2xl": { label: "text-lg" },
28
+ },
29
+ thickness: { regular: {}, thick: {}, thin: {} },
30
+ variant: {
31
+ default: { indicator: "text-primary", track: "text-primary/20" },
32
+ destructive: { indicator: "text-destructive", track: "text-destructive/20" },
33
+ },
34
+ },
35
+ });
36
+
37
+ /**
38
+ * @since 0.3.16-canary.0
39
+ */
40
+ type ProgressCircleVariants = VariantProps<typeof progressCircleVariants>;
41
+
42
+ /* -----------------------------------------------------------------------------
43
+ * Exports
44
+ * -------------------------------------------------------------------------- */
45
+
46
+ export { progressCircleVariants };
47
+ export type { ProgressCircleVariants };
@@ -0,0 +1,79 @@
1
+ import type { VariantProps } from "#/lib/utils";
2
+
3
+ import { tv } from "#/lib/utils";
4
+
5
+ /* -----------------------------------------------------------------------------
6
+ * Variant: ScrollAreaScrollbar
7
+ * -------------------------------------------------------------------------- */
8
+
9
+ /**
10
+ * @since 0.3.16-canary.0
11
+ */
12
+ const scrollAreaScrollbarVariants = tv({
13
+ base: [
14
+ "flex",
15
+ "p-px",
16
+ "touch-none transition-colors select-none",
17
+ "motion-reduce:transition-none motion-reduce:duration-0",
18
+ ],
19
+ compoundVariants: [
20
+ {
21
+ className: "w-1.5",
22
+ orientation: "vertical",
23
+ size: "sm",
24
+ },
25
+ {
26
+ className: "w-2",
27
+ orientation: "vertical",
28
+ size: "md",
29
+ },
30
+ {
31
+ className: "w-2.5",
32
+ orientation: "vertical",
33
+ size: "lg",
34
+ },
35
+ {
36
+ className: "h-1.5",
37
+ orientation: "horizontal",
38
+ size: "sm",
39
+ },
40
+ {
41
+ className: "h-2",
42
+ orientation: "horizontal",
43
+ size: "md",
44
+ },
45
+ {
46
+ className: "h-2.5",
47
+ orientation: "horizontal",
48
+ size: "lg",
49
+ },
50
+ ],
51
+ defaultVariants: {
52
+ orientation: "vertical",
53
+ size: "md",
54
+ },
55
+ variants: {
56
+ orientation: {
57
+ horizontal: ["w-full flex-col", "border-t border-t-transparent"],
58
+ vertical: ["h-full flex-row", "border-l border-l-transparent"],
59
+ },
60
+ size: {
61
+ none: "",
62
+ sm: "",
63
+ md: "",
64
+ lg: "",
65
+ },
66
+ },
67
+ });
68
+
69
+ /**
70
+ * @since 0.3.16-canary.0
71
+ */
72
+ type ScrollAreaScrollbarVariants = VariantProps<typeof scrollAreaScrollbarVariants>;
73
+
74
+ /* -----------------------------------------------------------------------------
75
+ * Exports
76
+ * -------------------------------------------------------------------------- */
77
+
78
+ export { scrollAreaScrollbarVariants };
79
+ export type { ScrollAreaScrollbarVariants };
@@ -0,0 +1,41 @@
1
+ import type { VariantProps } from "#/lib/utils";
2
+
3
+ import { tv } from "#/lib/utils";
4
+
5
+ /* -----------------------------------------------------------------------------
6
+ * Variant: Separator
7
+ * -------------------------------------------------------------------------- */
8
+
9
+ /**
10
+ * @since 0.3.16-canary.0
11
+ */
12
+ const separatorVariants = tv({
13
+ base: ["relative flex shrink-0 items-center", "bg-border"],
14
+ defaultVariants: {
15
+ align: "center",
16
+ orientation: "horizontal",
17
+ },
18
+ variants: {
19
+ align: {
20
+ center: "justify-center",
21
+ end: "justify-end",
22
+ start: "justify-start",
23
+ },
24
+ orientation: {
25
+ horizontal: "h-px w-full",
26
+ vertical: "h-full w-px flex-col",
27
+ },
28
+ },
29
+ });
30
+
31
+ /**
32
+ * @since 0.3.16-canary.0
33
+ */
34
+ type SeparatorVariants = VariantProps<typeof separatorVariants>;
35
+
36
+ /* -----------------------------------------------------------------------------
37
+ * Exports
38
+ * -------------------------------------------------------------------------- */
39
+
40
+ export { separatorVariants };
41
+ export type { SeparatorVariants };
@@ -0,0 +1,70 @@
1
+ import type { VariantProps } from "#/lib/utils";
2
+
3
+ import { tv } from "#/lib/utils";
4
+
5
+ /* -----------------------------------------------------------------------------
6
+ * Variant: SheetContent
7
+ * -------------------------------------------------------------------------- */
8
+
9
+ /**
10
+ * @since 0.3.16-canary.0
11
+ */
12
+ const sheetContentVariants = tv({
13
+ base: [
14
+ "fixed z-50 flex flex-col overflow-auto",
15
+ "bg-background shadow-lg",
16
+ "ease-ui data-open:animate-in data-open:animation-duration-500",
17
+ "data-closed:animate-out data-closed:animation-duration-500",
18
+ "motion-reduce:animate-none motion-reduce:transition-none motion-reduce:duration-0",
19
+ ],
20
+ defaultVariants: {
21
+ side: "right",
22
+ },
23
+ variants: {
24
+ side: {
25
+ bottom: [
26
+ "max-h-[80dvh]",
27
+ "inset-x-0 bottom-0",
28
+ "rounded-t-2xl border-t",
29
+ "pb-[env(safe-area-inset-bottom)]",
30
+ "data-open:slide-in-from-bottom",
31
+ "data-closed:slide-out-to-bottom",
32
+ ],
33
+ left: [
34
+ "h-full w-3/4",
35
+ "inset-y-0 left-0",
36
+ "border-r",
37
+ "sm:max-w-sm",
38
+ "data-open:slide-in-from-left",
39
+ "data-closed:slide-out-to-left",
40
+ ],
41
+ right: [
42
+ "h-full w-3/4",
43
+ "inset-y-0 right-0",
44
+ "border-l",
45
+ "sm:max-w-sm",
46
+ "data-open:slide-in-from-right",
47
+ "data-closed:slide-out-to-right",
48
+ ],
49
+ top: [
50
+ "max-h-[80vh]",
51
+ "inset-x-0 top-0",
52
+ "border-b",
53
+ "data-open:slide-in-from-top",
54
+ "data-closed:slide-out-to-top",
55
+ ],
56
+ },
57
+ },
58
+ });
59
+
60
+ /**
61
+ * @since 0.3.16-canary.0
62
+ */
63
+ type SheetContentVariants = VariantProps<typeof sheetContentVariants>;
64
+
65
+ /* -----------------------------------------------------------------------------
66
+ * Exports
67
+ * -------------------------------------------------------------------------- */
68
+
69
+ export { sheetContentVariants };
70
+ export type { SheetContentVariants };