@arch-cadre/ui 0.0.10 → 0.0.15

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 (256) hide show
  1. package/build.config.ts +23 -0
  2. package/dist/components/.gitkeep +0 -0
  3. package/dist/components/accordion.cjs +62 -0
  4. package/dist/components/accordion.d.ts +7 -0
  5. package/dist/components/accordion.mjs +58 -0
  6. package/dist/components/alert-dialog.cjs +127 -0
  7. package/dist/components/alert-dialog.d.ts +14 -0
  8. package/dist/components/alert-dialog.mjs +144 -0
  9. package/dist/components/alert.cjs +58 -0
  10. package/dist/components/alert.d.ts +9 -0
  11. package/dist/components/alert.mjs +62 -0
  12. package/dist/components/aspect-ratio.cjs +19 -0
  13. package/dist/components/aspect-ratio.d.ts +4 -0
  14. package/dist/components/aspect-ratio.mjs +9 -0
  15. package/dist/components/avatar.cjs +44 -0
  16. package/dist/components/avatar.d.ts +6 -0
  17. package/dist/components/avatar.mjs +50 -0
  18. package/dist/components/badge.cjs +41 -0
  19. package/dist/components/badge.d.ts +9 -0
  20. package/dist/components/badge.mjs +37 -0
  21. package/dist/components/breadcrumb.cjs +106 -0
  22. package/dist/components/breadcrumb.d.ts +11 -0
  23. package/dist/components/breadcrumb.mjs +105 -0
  24. package/dist/components/button-group.cjs +65 -0
  25. package/dist/components/button-group.d.ts +12 -0
  26. package/dist/components/button-group.mjs +76 -0
  27. package/dist/components/button.cjs +57 -0
  28. package/dist/components/button.d.ts +10 -0
  29. package/dist/components/button.mjs +51 -0
  30. package/dist/components/calendar.cjs +143 -0
  31. package/dist/components/calendar.d.ts +8 -0
  32. package/dist/components/calendar.mjs +191 -0
  33. package/dist/components/card.cjs +86 -0
  34. package/dist/components/card.d.ts +9 -0
  35. package/dist/components/card.mjs +90 -0
  36. package/dist/components/checkbox.cjs +28 -0
  37. package/dist/components/checkbox.d.ts +4 -0
  38. package/dist/components/checkbox.mjs +30 -0
  39. package/dist/components/collapsible.cjs +37 -0
  40. package/dist/components/collapsible.d.ts +6 -0
  41. package/dist/components/collapsible.mjs +31 -0
  42. package/dist/components/command.cjs +125 -0
  43. package/dist/components/command.d.ts +18 -0
  44. package/dist/components/command.mjs +169 -0
  45. package/dist/components/context-menu.cjs +188 -0
  46. package/dist/components/context-menu.d.ts +25 -0
  47. package/dist/components/context-menu.mjs +218 -0
  48. package/dist/components/dialog.cjs +123 -0
  49. package/dist/components/dialog.d.ts +15 -0
  50. package/dist/components/dialog.mjs +130 -0
  51. package/dist/components/drawer.cjs +118 -0
  52. package/dist/components/drawer.d.ts +13 -0
  53. package/dist/components/drawer.mjs +124 -0
  54. package/dist/components/dropdown-menu.cjs +190 -0
  55. package/dist/components/dropdown-menu.d.ts +25 -0
  56. package/dist/components/dropdown-menu.mjs +226 -0
  57. package/dist/components/empty.cjs +92 -0
  58. package/dist/components/empty.d.ts +12 -0
  59. package/dist/components/empty.mjs +102 -0
  60. package/dist/components/field.cjs +173 -0
  61. package/dist/components/field.d.ts +25 -0
  62. package/dist/components/field.mjs +228 -0
  63. package/dist/components/form.cjs +143 -0
  64. package/dist/components/form.d.ts +23 -0
  65. package/dist/components/form.mjs +123 -0
  66. package/dist/components/hover-card.cjs +46 -0
  67. package/dist/components/hover-card.d.ts +6 -0
  68. package/dist/components/hover-card.mjs +35 -0
  69. package/dist/components/input-group.cjs +130 -0
  70. package/dist/components/input-group.d.ts +16 -0
  71. package/dist/components/input-group.mjs +155 -0
  72. package/dist/components/input-otp.cjs +69 -0
  73. package/dist/components/input-otp.d.ts +11 -0
  74. package/dist/components/input-otp.mjs +59 -0
  75. package/dist/components/input.cjs +22 -0
  76. package/dist/components/input.d.ts +3 -0
  77. package/dist/components/input.mjs +19 -0
  78. package/dist/components/item.cjs +168 -0
  79. package/dist/components/item.d.ts +23 -0
  80. package/dist/components/item.mjs +187 -0
  81. package/dist/components/kbd.cjs +31 -0
  82. package/dist/components/kbd.d.ts +4 -0
  83. package/dist/components/kbd.mjs +28 -0
  84. package/dist/components/label.cjs +22 -0
  85. package/dist/components/label.d.ts +4 -0
  86. package/dist/components/label.mjs +21 -0
  87. package/dist/components/language-switcher.cjs +43 -0
  88. package/dist/components/language-switcher.d.ts +2 -0
  89. package/dist/components/language-switcher.mjs +30 -0
  90. package/dist/components/menubar.cjs +207 -0
  91. package/dist/components/menubar.d.ts +26 -0
  92. package/dist/components/menubar.mjs +246 -0
  93. package/dist/components/navigation-menu.cjs +113 -0
  94. package/dist/components/navigation-menu.d.ts +14 -0
  95. package/dist/components/navigation-menu.mjs +166 -0
  96. package/dist/components/pagination.cjs +106 -0
  97. package/dist/components/pagination.d.ts +15 -0
  98. package/dist/components/pagination.mjs +116 -0
  99. package/dist/components/popover.cjs +53 -0
  100. package/dist/components/popover.d.ts +7 -0
  101. package/dist/components/popover.mjs +40 -0
  102. package/dist/components/progress.cjs +29 -0
  103. package/dist/components/progress.d.ts +4 -0
  104. package/dist/components/progress.mjs +30 -0
  105. package/dist/components/radio-group.cjs +39 -0
  106. package/dist/components/radio-group.d.ts +5 -0
  107. package/dist/components/radio-group.mjs +43 -0
  108. package/dist/components/scroll-area.cjs +45 -0
  109. package/dist/components/scroll-area.d.ts +7 -0
  110. package/dist/components/scroll-area.mjs +59 -0
  111. package/dist/components/select.cjs +140 -0
  112. package/dist/components/select.d.ts +15 -0
  113. package/dist/components/select.mjs +173 -0
  114. package/dist/components/separator.cjs +26 -0
  115. package/dist/components/separator.d.ts +4 -0
  116. package/dist/components/separator.mjs +25 -0
  117. package/dist/components/sheet.cjs +120 -0
  118. package/dist/components/sheet.d.ts +13 -0
  119. package/dist/components/sheet.mjs +119 -0
  120. package/dist/components/sidebar.cjs +508 -0
  121. package/dist/components/sidebar.d.ts +69 -0
  122. package/dist/components/sidebar.mjs +635 -0
  123. package/dist/components/skeleton.cjs +20 -0
  124. package/dist/components/skeleton.d.ts +3 -0
  125. package/dist/components/skeleton.mjs +13 -0
  126. package/dist/components/slider.cjs +43 -0
  127. package/dist/components/slider.d.ts +4 -0
  128. package/dist/components/slider.mjs +59 -0
  129. package/dist/components/sonner.cjs +49 -0
  130. package/dist/components/sonner.d.ts +4 -0
  131. package/dist/components/sonner.mjs +36 -0
  132. package/dist/components/spinner.cjs +22 -0
  133. package/dist/components/spinner.d.ts +3 -0
  134. package/dist/components/spinner.mjs +15 -0
  135. package/dist/components/switch.cjs +25 -0
  136. package/dist/components/switch.d.ts +4 -0
  137. package/dist/components/switch.mjs +30 -0
  138. package/dist/components/table.cjs +101 -0
  139. package/dist/components/table.d.ts +10 -0
  140. package/dist/components/table.mjs +115 -0
  141. package/dist/components/tabs.cjs +55 -0
  142. package/dist/components/tabs.d.ts +7 -0
  143. package/dist/components/tabs.mjs +63 -0
  144. package/dist/components/textarea.cjs +20 -0
  145. package/dist/components/textarea.d.ts +3 -0
  146. package/dist/components/textarea.mjs +16 -0
  147. package/dist/components/toggle-group.cjs +65 -0
  148. package/dist/components/toggle-group.d.ts +9 -0
  149. package/dist/components/toggle-group.mjs +65 -0
  150. package/dist/components/toggle.cjs +47 -0
  151. package/dist/components/toggle.d.ts +9 -0
  152. package/dist/components/toggle.mjs +41 -0
  153. package/dist/components/tooltip.cjs +56 -0
  154. package/dist/components/tooltip.d.ts +7 -0
  155. package/dist/components/tooltip.mjs +49 -0
  156. package/dist/hooks/.gitkeep +0 -0
  157. package/dist/hooks/use-mobile.cjs +23 -0
  158. package/dist/hooks/use-mobile.d.ts +1 -0
  159. package/dist/hooks/use-mobile.mjs +17 -0
  160. package/dist/hooks/use-user.cjs +21 -0
  161. package/dist/hooks/use-user.d.ts +12 -0
  162. package/dist/hooks/use-user.mjs +12 -0
  163. package/dist/index.cjs +155 -0
  164. package/dist/index.d.ts +13 -0
  165. package/dist/index.mjs +13 -0
  166. package/dist/lib/utils.cjs +11 -0
  167. package/dist/lib/utils.d.ts +2 -0
  168. package/dist/lib/utils.mjs +5 -0
  169. package/dist/logo.cjs +49 -0
  170. package/dist/logo.d.ts +15 -0
  171. package/dist/logo.mjs +32 -0
  172. package/dist/postcss.config.cjs +13 -0
  173. package/dist/postcss.config.d.mts +3 -0
  174. package/dist/postcss.config.mjs +6 -0
  175. package/dist/providers/auth-provider.cjs +44 -0
  176. package/dist/providers/auth-provider.d.ts +15 -0
  177. package/dist/providers/auth-provider.mjs +37 -0
  178. package/dist/providers/index.cjs +47 -0
  179. package/dist/providers/index.d.ts +7 -0
  180. package/dist/providers/index.mjs +33 -0
  181. package/dist/shared/access-denied.cjs +38 -0
  182. package/dist/shared/access-denied.d.ts +2 -0
  183. package/dist/shared/access-denied.mjs +12 -0
  184. package/dist/shared/loader.cjs +95 -0
  185. package/dist/shared/loader.d.ts +11 -0
  186. package/dist/shared/loader.mjs +98 -0
  187. package/dist/shared/page-loader.cjs +23 -0
  188. package/dist/shared/page-loader.d.ts +7 -0
  189. package/dist/shared/page-loader.mjs +6 -0
  190. package/dist/shared/scroll-fade-effect.cjs +21 -0
  191. package/dist/shared/scroll-fade-effect.d.ts +4 -0
  192. package/dist/shared/scroll-fade-effect.mjs +20 -0
  193. package/dist/styles/globals.css +1 -0
  194. package/package.json +58 -49
  195. package/scripts/switchToDist.js +55 -0
  196. package/scripts/switchToSrc.js +52 -0
  197. package/src/components/accordion.tsx +2 -2
  198. package/src/components/alert-dialog.tsx +1 -1
  199. package/src/components/alert.tsx +1 -1
  200. package/src/components/aspect-ratio.tsx +2 -1
  201. package/src/components/avatar.tsx +1 -1
  202. package/src/components/badge.tsx +3 -3
  203. package/src/components/breadcrumb.tsx +5 -3
  204. package/src/components/button-group.tsx +4 -2
  205. package/src/components/button.tsx +3 -3
  206. package/src/components/calendar.tsx +2 -2
  207. package/src/components/checkbox.tsx +2 -2
  208. package/src/components/collapsible.tsx +2 -1
  209. package/src/components/command.tsx +1 -1
  210. package/src/components/context-menu.tsx +2 -2
  211. package/src/components/dialog.tsx +2 -2
  212. package/src/components/dropdown-menu.tsx +2 -2
  213. package/src/components/empty.tsx +1 -0
  214. package/src/components/field.tsx +5 -2
  215. package/src/components/form.tsx +9 -7
  216. package/src/components/hover-card.tsx +1 -1
  217. package/src/components/input-group.tsx +1 -1
  218. package/src/components/input-otp.tsx +1 -1
  219. package/src/components/item.tsx +3 -3
  220. package/src/components/kbd.tsx +1 -0
  221. package/src/components/label.tsx +1 -1
  222. package/src/components/language-switcher.tsx +16 -17
  223. package/src/components/menubar.tsx +2 -2
  224. package/src/components/navigation-menu.tsx +2 -2
  225. package/src/components/pagination.tsx +5 -2
  226. package/src/components/popover.tsx +1 -1
  227. package/src/components/progress.tsx +1 -1
  228. package/src/components/radio-group.tsx +2 -2
  229. package/src/components/scroll-area.tsx +1 -1
  230. package/src/components/select.tsx +2 -2
  231. package/src/components/separator.tsx +1 -1
  232. package/src/components/sheet.tsx +2 -2
  233. package/src/components/sidebar.tsx +6 -6
  234. package/src/components/skeleton.tsx +1 -0
  235. package/src/components/slider.tsx +1 -1
  236. package/src/components/sonner.tsx +1 -0
  237. package/src/components/spinner.tsx +1 -0
  238. package/src/components/switch.tsx +1 -1
  239. package/src/components/tabs.tsx +1 -1
  240. package/src/components/toggle-group.tsx +2 -2
  241. package/src/components/toggle.tsx +2 -2
  242. package/src/components/tooltip.tsx +1 -1
  243. package/src/hooks/use-user.ts +2 -2
  244. package/src/index.ts +8 -5
  245. package/src/logo.tsx +1 -0
  246. package/src/providers/auth-provider.tsx +7 -6
  247. package/src/providers/index.tsx +1 -0
  248. package/src/shared/access-denied.tsx +1 -0
  249. package/src/shared/loader.tsx +2 -1
  250. package/src/shared/page-loader.tsx +1 -0
  251. package/src/shared/scroll-fade-effect.tsx +1 -1
  252. package/src/styles/globals.css +258 -244
  253. package/biome.json +0 -38
  254. package/src/components/carousel.tsx +0 -241
  255. package/src/components/chart.tsx +0 -357
  256. package/tsconfig.build.json +0 -16
@@ -1,6 +1,6 @@
1
- import * as React from "react";
2
- import { Slot } from "@radix-ui/react-slot";
1
+ import { Slot as SlotPrimitive } from "radix-ui";
3
2
  import { ChevronRight, MoreHorizontal } from "lucide-react";
3
+ import * as React from "react";
4
4
 
5
5
  import { cn } from "../lib/utils";
6
6
 
@@ -38,7 +38,7 @@ function BreadcrumbLink({
38
38
  }: React.ComponentProps<"a"> & {
39
39
  asChild?: boolean;
40
40
  }) {
41
- const Comp = asChild ? Slot : "a";
41
+ const Comp = asChild ? SlotPrimitive.Slot : "a";
42
42
 
43
43
  return (
44
44
  <Comp
@@ -51,6 +51,8 @@ function BreadcrumbLink({
51
51
 
52
52
  function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
53
53
  return (
54
+ // biome-ignore lint/a11y/useSemanticElements: <explanation>
55
+ // biome-ignore lint/a11y/useFocusableInteractive: <explanation>
54
56
  <span
55
57
  data-slot="breadcrumb-page"
56
58
  role="link"
@@ -1,5 +1,7 @@
1
- import { Slot } from "@radix-ui/react-slot";
1
+ /** biome-ignore-all lint/a11y/useSemanticElements: <explanation> */
2
+ import { Slot as SlotPrimitive } from "radix-ui";
2
3
  import { cva, type VariantProps } from "class-variance-authority";
4
+ import * as React from "react";
3
5
 
4
6
  import { cn } from "../lib/utils";
5
7
  import { Separator } from "./separator";
@@ -44,7 +46,7 @@ function ButtonGroupText({
44
46
  }: React.ComponentProps<"div"> & {
45
47
  asChild?: boolean;
46
48
  }) {
47
- const Comp = asChild ? Slot : "div";
49
+ const Comp = asChild ? SlotPrimitive.Slot : "div";
48
50
 
49
51
  return (
50
52
  <Comp
@@ -1,6 +1,6 @@
1
- import * as React from "react";
2
- import { Slot } from "@radix-ui/react-slot";
1
+ import { Slot as SlotPrimitive } from "radix-ui";
3
2
  import { cva, type VariantProps } from "class-variance-authority";
3
+ import * as React from "react";
4
4
 
5
5
  import { cn } from "../lib/utils";
6
6
 
@@ -46,7 +46,7 @@ function Button({
46
46
  VariantProps<typeof buttonVariants> & {
47
47
  asChild?: boolean;
48
48
  }) {
49
- const Comp = asChild ? Slot : "button";
49
+ const Comp = asChild ? SlotPrimitive.Slot : "button";
50
50
 
51
51
  return (
52
52
  <Comp
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
3
  import {
5
4
  ChevronDownIcon,
6
5
  ChevronLeftIcon,
7
6
  ChevronRightIcon,
8
7
  } from "lucide-react";
8
+ import * as React from "react";
9
9
  import {
10
+ type DayButton,
10
11
  DayPicker,
11
12
  getDefaultClassNames,
12
- type DayButton,
13
13
  } from "react-day-picker";
14
14
 
15
15
  import { cn } from "../lib/utils";
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
+ import { Checkbox as CheckboxPrimitive } from "radix-ui";
5
4
  import { CheckIcon } from "lucide-react";
5
+ import * as React from "react";
6
6
 
7
7
  import { cn } from "../lib/utils";
8
8
 
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
 
3
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
3
+ import { Collapsible as CollapsiblePrimitive } from "radix-ui";
4
+ import * as React from "react";
4
5
 
5
6
  function Collapsible({
6
7
  ...props
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
3
  import { Command as CommandPrimitive } from "cmdk";
5
4
  import { SearchIcon } from "lucide-react";
5
+ import * as React from "react";
6
6
 
7
7
  import { cn } from "../lib/utils";
8
8
  import {
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
- import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
3
+ import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
5
4
  import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
5
+ import * as React from "react";
6
6
 
7
7
  import { cn } from "../lib/utils";
8
8
 
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
- import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ import { Dialog as DialogPrimitive } from "radix-ui";
5
4
  import { XIcon } from "lucide-react";
5
+ import * as React from "react";
6
6
 
7
7
  import { cn } from "../lib/utils";
8
8
 
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
- import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
5
4
  import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
5
+ import * as React from "react";
6
6
 
7
7
  import { cn } from "../lib/utils";
8
8
 
@@ -1,4 +1,5 @@
1
1
  import { cva, type VariantProps } from "class-variance-authority";
2
+ import * as React from "react";
2
3
 
3
4
  import { cn } from "../lib/utils";
4
5
 
@@ -1,7 +1,10 @@
1
+ /** biome-ignore-all lint/a11y/useSemanticElements: <explanation> */
2
+ /** biome-ignore-all lint/suspicious/noArrayIndexKey: <explanation> */
1
3
  "use client";
2
4
 
3
- import { useMemo } from "react";
4
5
  import { cva, type VariantProps } from "class-variance-authority";
6
+ import * as React from "react";
7
+ import { useMemo } from "react";
5
8
 
6
9
  import { cn } from "../lib/utils";
7
10
  import { Label } from "./label";
@@ -204,7 +207,7 @@ function FieldError({
204
207
  ...new Map(errors.map((error) => [error?.message, error])).values(),
205
208
  ];
206
209
 
207
- if (uniqueErrors?.length == 1) {
210
+ if (uniqueErrors?.length === 1) {
208
211
  return uniqueErrors[0]?.message;
209
212
  }
210
213
 
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
 
3
+ import { type Label as LabelPrimitive, Slot as SlotPrimitive } from "radix-ui";
4
+
3
5
  import * as React from "react";
4
- import type * as LabelPrimitive from "@radix-ui/react-label";
5
- import { Slot } from "@radix-ui/react-slot";
6
6
  import {
7
7
  Controller,
8
- FormProvider,
9
- useFormContext,
10
- useFormState,
11
8
  type ControllerProps,
12
9
  type FieldPath,
13
10
  type FieldValues,
11
+ FormProvider,
12
+ useFormContext,
13
+ useFormState,
14
14
  } from "react-hook-form";
15
15
 
16
16
  import { cn } from "../lib/utils";
@@ -104,12 +104,14 @@ function FormLabel({
104
104
  );
105
105
  }
106
106
 
107
- function FormControl({ ...props }: React.ComponentProps<typeof Slot>) {
107
+ function FormControl({
108
+ ...props
109
+ }: React.ComponentProps<typeof SlotPrimitive.Slot>) {
108
110
  const { error, formItemId, formDescriptionId, formMessageId } =
109
111
  useFormField();
110
112
 
111
113
  return (
112
- <Slot
114
+ <SlotPrimitive.Slot
113
115
  data-slot="form-control"
114
116
  id={formItemId}
115
117
  aria-describedby={
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
+ import { HoverCard as HoverCardPrimitive } from "radix-ui";
3
4
  import * as React from "react";
4
- import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
5
5
 
6
6
  import { cn } from "../lib/utils";
7
7
 
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
3
  import { cva, type VariantProps } from "class-variance-authority";
4
+ import * as React from "react";
5
5
 
6
6
  import { cn } from "../lib/utils";
7
7
  import { Button } from "./button";
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
3
  import { OTPInput, OTPInputContext } from "input-otp";
5
4
  import { MinusIcon } from "lucide-react";
5
+ import * as React from "react";
6
6
 
7
7
  import { cn } from "../lib/utils";
8
8
 
@@ -1,6 +1,6 @@
1
- import * as React from "react";
2
- import { Slot } from "@radix-ui/react-slot";
1
+ import { Slot as SlotPrimitive } from "radix-ui";
3
2
  import { cva, type VariantProps } from "class-variance-authority";
3
+ import * as React from "react";
4
4
 
5
5
  import { cn } from "../lib/utils";
6
6
  import { Separator } from "./separator";
@@ -59,7 +59,7 @@ function Item({
59
59
  ...props
60
60
  }: React.ComponentProps<"div"> &
61
61
  VariantProps<typeof itemVariants> & { asChild?: boolean }) {
62
- const Comp = asChild ? Slot : "div";
62
+ const Comp = asChild ? SlotPrimitive.Slot : "div";
63
63
  return (
64
64
  <Comp
65
65
  data-slot="item"
@@ -1,3 +1,4 @@
1
+ import * as React from "react";
1
2
  import { cn } from "../lib/utils";
2
3
 
3
4
  function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
+ import { Label as LabelPrimitive } from "radix-ui";
3
4
  import * as React from "react";
4
- import * as LabelPrimitive from "@radix-ui/react-label";
5
5
 
6
6
  import { cn } from "../lib/utils";
7
7
 
@@ -1,7 +1,9 @@
1
1
  "use client";
2
2
 
3
- import React from "react";
4
- import { useLocale } from "@arch-cadre/intl";
3
+ import { LOCALES, useLocale, useTranslation } from "@arch-cadre/intl";
4
+ import { Languages } from "lucide-react";
5
+ import { useRouter } from "next/navigation";
6
+ import * as React from "react";
5
7
  import { Button } from "./button";
6
8
  import {
7
9
  DropdownMenu,
@@ -9,15 +11,15 @@ import {
9
11
  DropdownMenuItem,
10
12
  DropdownMenuTrigger,
11
13
  } from "./dropdown-menu";
12
- import { Languages } from "lucide-react";
13
- import { useRouter } from "next/navigation";
14
14
 
15
15
  export function LanguageSwitcher() {
16
16
  const locale = useLocale();
17
17
  const router = useRouter();
18
+ const { t } = useTranslation();
18
19
 
19
20
  const handleLanguageChange = (newLocale: string) => {
20
21
  // Set cookie
22
+ // biome-ignore lint/suspicious/noDocumentCookie: <we want to set a cookie here>
21
23
  document.cookie = `NEXT_LOCALE=${newLocale}; path=/; max-age=31536000; SameSite=Lax`;
22
24
  // Refresh page to apply changes
23
25
  router.refresh();
@@ -28,22 +30,19 @@ export function LanguageSwitcher() {
28
30
  <DropdownMenuTrigger asChild>
29
31
  <Button variant="ghost" size="icon" className="size-9">
30
32
  <Languages className="size-4" />
31
- <span className="sr-only">Switch language</span>
33
+ <span className="sr-only">{t("Switch language")}</span>
32
34
  </Button>
33
35
  </DropdownMenuTrigger>
34
36
  <DropdownMenuContent align="end">
35
- <DropdownMenuItem
36
- onClick={() => handleLanguageChange("pl")}
37
- className={locale === "pl" ? "font-bold" : ""}
38
- >
39
- Polski
40
- </DropdownMenuItem>
41
- <DropdownMenuItem
42
- onClick={() => handleLanguageChange("en")}
43
- className={locale === "en" ? "font-bold" : ""}
44
- >
45
- English
46
- </DropdownMenuItem>
37
+ {LOCALES.map((loc) => (
38
+ <DropdownMenuItem
39
+ key={loc}
40
+ onClick={() => handleLanguageChange(loc)}
41
+ className={locale === loc ? "font-bold" : ""}
42
+ >
43
+ {loc}
44
+ </DropdownMenuItem>
45
+ ))}
47
46
  </DropdownMenuContent>
48
47
  </DropdownMenu>
49
48
  );
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
- import * as MenubarPrimitive from "@radix-ui/react-menubar";
3
+ import { Menubar as MenubarPrimitive } from "radix-ui";
5
4
  import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
5
+ import * as React from "react";
6
6
 
7
7
  import { cn } from "../lib/utils";
8
8
 
@@ -1,7 +1,7 @@
1
- import * as React from "react";
2
- import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
1
+ import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui";
3
2
  import { cva } from "class-variance-authority";
4
3
  import { ChevronDownIcon } from "lucide-react";
4
+ import * as React from "react";
5
5
 
6
6
  import { cn } from "../lib/utils";
7
7
 
@@ -1,12 +1,15 @@
1
- import * as React from "react";
1
+ /** biome-ignore-all lint/a11y/noRedundantRoles: <explanation> */
2
+ /** biome-ignore-all lint/a11y/useSemanticElements: <explanation> */
3
+
2
4
  import {
3
5
  ChevronLeftIcon,
4
6
  ChevronRightIcon,
5
7
  MoreHorizontalIcon,
6
8
  } from "lucide-react";
9
+ import * as React from "react";
7
10
 
8
11
  import { cn } from "../lib/utils";
9
- import { buttonVariants, type Button } from "./button";
12
+ import { type Button, buttonVariants } from "./button";
10
13
 
11
14
  function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
12
15
  return (
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
+ import { Popover as PopoverPrimitive } from "radix-ui";
3
4
  import * as React from "react";
4
- import * as PopoverPrimitive from "@radix-ui/react-popover";
5
5
 
6
6
  import { cn } from "../lib/utils";
7
7
 
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
+ import { Progress as ProgressPrimitive } from "radix-ui";
3
4
  import * as React from "react";
4
- import * as ProgressPrimitive from "@radix-ui/react-progress";
5
5
 
6
6
  import { cn } from "../lib/utils";
7
7
 
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
+ import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
5
4
  import { CircleIcon } from "lucide-react";
5
+ import * as React from "react";
6
6
 
7
7
  import { cn } from "../lib/utils";
8
8
 
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
+ import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
3
4
  import * as React from "react";
4
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
5
5
 
6
6
  import { cn } from "../lib/utils";
7
7
 
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
- import * as SelectPrimitive from "@radix-ui/react-select";
3
+ import { Select as SelectPrimitive } from "radix-ui";
5
4
  import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
5
+ import * as React from "react";
6
6
 
7
7
  import { cn } from "../lib/utils";
8
8
 
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
+ import { Separator as SeparatorPrimitive } from "radix-ui";
3
4
  import * as React from "react";
4
- import * as SeparatorPrimitive from "@radix-ui/react-separator";
5
5
 
6
6
  import { cn } from "../lib/utils";
7
7
 
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
- import * as SheetPrimitive from "@radix-ui/react-dialog";
3
+ import { Dialog as SheetPrimitive } from "radix-ui";
5
4
  import { XIcon } from "lucide-react";
5
+ import * as React from "react";
6
6
 
7
7
  import { cn } from "../lib/utils";
8
8
 
@@ -1,7 +1,7 @@
1
1
  /** biome-ignore-all lint/correctness/useExhaustiveDependencies: <any> */
2
2
  "use client";
3
3
 
4
- import { Slot } from "@radix-ui/react-slot";
4
+ import { Slot as SlotPrimitive } from "radix-ui";
5
5
  import { cva, type VariantProps } from "class-variance-authority";
6
6
  import { PanelLeftIcon } from "lucide-react";
7
7
  import * as React from "react";
@@ -398,7 +398,7 @@ function SidebarGroupLabel({
398
398
  asChild = false,
399
399
  ...props
400
400
  }: React.ComponentProps<"div"> & { asChild?: boolean }) {
401
- const Comp = asChild ? Slot : "div";
401
+ const Comp = asChild ? SlotPrimitive.Slot : "div";
402
402
 
403
403
  return (
404
404
  <Comp
@@ -419,7 +419,7 @@ function SidebarGroupAction({
419
419
  asChild = false,
420
420
  ...props
421
421
  }: React.ComponentProps<"button"> & { asChild?: boolean }) {
422
- const Comp = asChild ? Slot : "button";
422
+ const Comp = asChild ? SlotPrimitive.Slot : "button";
423
423
 
424
424
  return (
425
425
  <Comp
@@ -508,7 +508,7 @@ function SidebarMenuButton({
508
508
  isActive?: boolean;
509
509
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
510
510
  } & VariantProps<typeof sidebarMenuButtonVariants>) {
511
- const Comp = asChild ? Slot : "button";
511
+ const Comp = asChild ? SlotPrimitive.Slot : "button";
512
512
  const { isMobile, state } = useSidebar();
513
513
 
514
514
  const button = (
@@ -554,7 +554,7 @@ function SidebarMenuAction({
554
554
  asChild?: boolean;
555
555
  showOnHover?: boolean;
556
556
  }) {
557
- const Comp = asChild ? Slot : "button";
557
+ const Comp = asChild ? SlotPrimitive.Slot : "button";
558
558
 
559
559
  return (
560
560
  <Comp
@@ -677,7 +677,7 @@ function SidebarMenuSubButton({
677
677
  size?: "sm" | "md";
678
678
  isActive?: boolean;
679
679
  }) {
680
- const Comp = asChild ? Slot : "a";
680
+ const Comp = asChild ? SlotPrimitive.Slot : "a";
681
681
 
682
682
  return (
683
683
  <Comp
@@ -1,3 +1,4 @@
1
+ import * as React from "react";
1
2
  import { cn } from "../lib/utils";
2
3
 
3
4
  function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
+ import { Slider as SliderPrimitive } from "radix-ui";
3
4
  import * as React from "react";
4
- import * as SliderPrimitive from "@radix-ui/react-slider";
5
5
 
6
6
  import { cn } from "../lib/utils";
7
7
 
@@ -8,6 +8,7 @@ import {
8
8
  TriangleAlertIcon,
9
9
  } from "lucide-react";
10
10
  import { useTheme } from "next-themes";
11
+ import * as React from "react";
11
12
  import { Toaster as Sonner, type ToasterProps } from "sonner";
12
13
 
13
14
  const Toaster = ({ ...props }: ToasterProps) => {
@@ -1,4 +1,5 @@
1
1
  import { Loader2Icon } from "lucide-react";
2
+ import * as React from "react";
2
3
 
3
4
  import { cn } from "../lib/utils";
4
5
 
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
+ import { Switch as SwitchPrimitive } from "radix-ui";
3
4
  import * as React from "react";
4
- import * as SwitchPrimitive from "@radix-ui/react-switch";
5
5
 
6
6
  import { cn } from "../lib/utils";
7
7
 
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
+ import { Tabs as TabsPrimitive } from "radix-ui";
3
4
  import * as React from "react";
4
- import * as TabsPrimitive from "@radix-ui/react-tabs";
5
5
 
6
6
  import { cn } from "../lib/utils";
7
7
 
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
+ import { ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
4
+ import type { VariantProps } from "class-variance-authority";
3
5
  import * as React from "react";
4
- import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
5
- import { type VariantProps } from "class-variance-authority";
6
6
 
7
7
  import { cn } from "../lib/utils";
8
8
  import { toggleVariants } from "./toggle";
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
- import * as React from "react";
4
- import * as TogglePrimitive from "@radix-ui/react-toggle";
3
+ import { Toggle as TogglePrimitive } from "radix-ui";
5
4
  import { cva, type VariantProps } from "class-variance-authority";
5
+ import * as React from "react";
6
6
 
7
7
  import { cn } from "../lib/utils";
8
8
 
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
+ import { Tooltip as TooltipPrimitive } from "radix-ui";
3
4
  import * as React from "react";
4
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
5
5
 
6
6
  import { cn } from "../lib/utils";
7
7
 
@@ -1,7 +1,7 @@
1
1
  "use client";
2
-
3
- import { AuthContext } from "../providers/auth-provider";
2
+ import * as React from "react";
4
3
  import { useContext } from "react";
4
+ import { AuthContext } from "../providers/auth-provider";
5
5
 
6
6
  /**
7
7
  * Hook for user management.
package/src/index.ts CHANGED
@@ -1,11 +1,14 @@
1
+ export { Icon } from "@iconify/react";
2
+ export { toast } from "sonner";
3
+
4
+ export * from "./components/badge";
1
5
  export * from "./components/button";
2
- export * from "./components/dropdown-menu";
3
6
  export * from "./components/card";
4
- export * from "./components/input";
5
- export * from "./components/textarea";
6
- export * from "./components/table";
7
7
  export * from "./components/checkbox";
8
+ export * from "./components/dropdown-menu";
9
+ export * from "./components/input";
8
10
  export * from "./components/label";
9
- export * from "./components/badge";
10
11
  export * from "./components/language-switcher";
12
+ export * from "./components/table";
13
+ export * from "./components/textarea";
11
14
  export * from "./lib/utils";
package/src/logo.tsx CHANGED
@@ -2,6 +2,7 @@ import { Slot } from "@radix-ui/react-slot";
2
2
  import type { VariantProps } from "class-variance-authority";
3
3
  import { cva } from "class-variance-authority";
4
4
  import Image from "next/image";
5
+ import * as React from "react";
5
6
  import { cn } from "./lib/utils";
6
7
 
7
8
  const variants = cva("", {