@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.
- package/build.config.ts +23 -0
- package/dist/components/.gitkeep +0 -0
- package/dist/components/accordion.cjs +62 -0
- package/dist/components/accordion.d.ts +7 -0
- package/dist/components/accordion.mjs +58 -0
- package/dist/components/alert-dialog.cjs +127 -0
- package/dist/components/alert-dialog.d.ts +14 -0
- package/dist/components/alert-dialog.mjs +144 -0
- package/dist/components/alert.cjs +58 -0
- package/dist/components/alert.d.ts +9 -0
- package/dist/components/alert.mjs +62 -0
- package/dist/components/aspect-ratio.cjs +19 -0
- package/dist/components/aspect-ratio.d.ts +4 -0
- package/dist/components/aspect-ratio.mjs +9 -0
- package/dist/components/avatar.cjs +44 -0
- package/dist/components/avatar.d.ts +6 -0
- package/dist/components/avatar.mjs +50 -0
- package/dist/components/badge.cjs +41 -0
- package/dist/components/badge.d.ts +9 -0
- package/dist/components/badge.mjs +37 -0
- package/dist/components/breadcrumb.cjs +106 -0
- package/dist/components/breadcrumb.d.ts +11 -0
- package/dist/components/breadcrumb.mjs +105 -0
- package/dist/components/button-group.cjs +65 -0
- package/dist/components/button-group.d.ts +12 -0
- package/dist/components/button-group.mjs +76 -0
- package/dist/components/button.cjs +57 -0
- package/dist/components/button.d.ts +10 -0
- package/dist/components/button.mjs +51 -0
- package/dist/components/calendar.cjs +143 -0
- package/dist/components/calendar.d.ts +8 -0
- package/dist/components/calendar.mjs +191 -0
- package/dist/components/card.cjs +86 -0
- package/dist/components/card.d.ts +9 -0
- package/dist/components/card.mjs +90 -0
- package/dist/components/checkbox.cjs +28 -0
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.mjs +30 -0
- package/dist/components/collapsible.cjs +37 -0
- package/dist/components/collapsible.d.ts +6 -0
- package/dist/components/collapsible.mjs +31 -0
- package/dist/components/command.cjs +125 -0
- package/dist/components/command.d.ts +18 -0
- package/dist/components/command.mjs +169 -0
- package/dist/components/context-menu.cjs +188 -0
- package/dist/components/context-menu.d.ts +25 -0
- package/dist/components/context-menu.mjs +218 -0
- package/dist/components/dialog.cjs +123 -0
- package/dist/components/dialog.d.ts +15 -0
- package/dist/components/dialog.mjs +130 -0
- package/dist/components/drawer.cjs +118 -0
- package/dist/components/drawer.d.ts +13 -0
- package/dist/components/drawer.mjs +124 -0
- package/dist/components/dropdown-menu.cjs +190 -0
- package/dist/components/dropdown-menu.d.ts +25 -0
- package/dist/components/dropdown-menu.mjs +226 -0
- package/dist/components/empty.cjs +92 -0
- package/dist/components/empty.d.ts +12 -0
- package/dist/components/empty.mjs +102 -0
- package/dist/components/field.cjs +173 -0
- package/dist/components/field.d.ts +25 -0
- package/dist/components/field.mjs +228 -0
- package/dist/components/form.cjs +143 -0
- package/dist/components/form.d.ts +23 -0
- package/dist/components/form.mjs +123 -0
- package/dist/components/hover-card.cjs +46 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/hover-card.mjs +35 -0
- package/dist/components/input-group.cjs +130 -0
- package/dist/components/input-group.d.ts +16 -0
- package/dist/components/input-group.mjs +155 -0
- package/dist/components/input-otp.cjs +69 -0
- package/dist/components/input-otp.d.ts +11 -0
- package/dist/components/input-otp.mjs +59 -0
- package/dist/components/input.cjs +22 -0
- package/dist/components/input.d.ts +3 -0
- package/dist/components/input.mjs +19 -0
- package/dist/components/item.cjs +168 -0
- package/dist/components/item.d.ts +23 -0
- package/dist/components/item.mjs +187 -0
- package/dist/components/kbd.cjs +31 -0
- package/dist/components/kbd.d.ts +4 -0
- package/dist/components/kbd.mjs +28 -0
- package/dist/components/label.cjs +22 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/label.mjs +21 -0
- package/dist/components/language-switcher.cjs +43 -0
- package/dist/components/language-switcher.d.ts +2 -0
- package/dist/components/language-switcher.mjs +30 -0
- package/dist/components/menubar.cjs +207 -0
- package/dist/components/menubar.d.ts +26 -0
- package/dist/components/menubar.mjs +246 -0
- package/dist/components/navigation-menu.cjs +113 -0
- package/dist/components/navigation-menu.d.ts +14 -0
- package/dist/components/navigation-menu.mjs +166 -0
- package/dist/components/pagination.cjs +106 -0
- package/dist/components/pagination.d.ts +15 -0
- package/dist/components/pagination.mjs +116 -0
- package/dist/components/popover.cjs +53 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.mjs +40 -0
- package/dist/components/progress.cjs +29 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/progress.mjs +30 -0
- package/dist/components/radio-group.cjs +39 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/radio-group.mjs +43 -0
- package/dist/components/scroll-area.cjs +45 -0
- package/dist/components/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area.mjs +59 -0
- package/dist/components/select.cjs +140 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.mjs +173 -0
- package/dist/components/separator.cjs +26 -0
- package/dist/components/separator.d.ts +4 -0
- package/dist/components/separator.mjs +25 -0
- package/dist/components/sheet.cjs +120 -0
- package/dist/components/sheet.d.ts +13 -0
- package/dist/components/sheet.mjs +119 -0
- package/dist/components/sidebar.cjs +508 -0
- package/dist/components/sidebar.d.ts +69 -0
- package/dist/components/sidebar.mjs +635 -0
- package/dist/components/skeleton.cjs +20 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/skeleton.mjs +13 -0
- package/dist/components/slider.cjs +43 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/slider.mjs +59 -0
- package/dist/components/sonner.cjs +49 -0
- package/dist/components/sonner.d.ts +4 -0
- package/dist/components/sonner.mjs +36 -0
- package/dist/components/spinner.cjs +22 -0
- package/dist/components/spinner.d.ts +3 -0
- package/dist/components/spinner.mjs +15 -0
- package/dist/components/switch.cjs +25 -0
- package/dist/components/switch.d.ts +4 -0
- package/dist/components/switch.mjs +30 -0
- package/dist/components/table.cjs +101 -0
- package/dist/components/table.d.ts +10 -0
- package/dist/components/table.mjs +115 -0
- package/dist/components/tabs.cjs +55 -0
- package/dist/components/tabs.d.ts +7 -0
- package/dist/components/tabs.mjs +63 -0
- package/dist/components/textarea.cjs +20 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.mjs +16 -0
- package/dist/components/toggle-group.cjs +65 -0
- package/dist/components/toggle-group.d.ts +9 -0
- package/dist/components/toggle-group.mjs +65 -0
- package/dist/components/toggle.cjs +47 -0
- package/dist/components/toggle.d.ts +9 -0
- package/dist/components/toggle.mjs +41 -0
- package/dist/components/tooltip.cjs +56 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/tooltip.mjs +49 -0
- package/dist/hooks/.gitkeep +0 -0
- package/dist/hooks/use-mobile.cjs +23 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.mjs +17 -0
- package/dist/hooks/use-user.cjs +21 -0
- package/dist/hooks/use-user.d.ts +12 -0
- package/dist/hooks/use-user.mjs +12 -0
- package/dist/index.cjs +155 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.mjs +13 -0
- package/dist/lib/utils.cjs +11 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.mjs +5 -0
- package/dist/logo.cjs +49 -0
- package/dist/logo.d.ts +15 -0
- package/dist/logo.mjs +32 -0
- package/dist/postcss.config.cjs +13 -0
- package/dist/postcss.config.d.mts +3 -0
- package/dist/postcss.config.mjs +6 -0
- package/dist/providers/auth-provider.cjs +44 -0
- package/dist/providers/auth-provider.d.ts +15 -0
- package/dist/providers/auth-provider.mjs +37 -0
- package/dist/providers/index.cjs +47 -0
- package/dist/providers/index.d.ts +7 -0
- package/dist/providers/index.mjs +33 -0
- package/dist/shared/access-denied.cjs +38 -0
- package/dist/shared/access-denied.d.ts +2 -0
- package/dist/shared/access-denied.mjs +12 -0
- package/dist/shared/loader.cjs +95 -0
- package/dist/shared/loader.d.ts +11 -0
- package/dist/shared/loader.mjs +98 -0
- package/dist/shared/page-loader.cjs +23 -0
- package/dist/shared/page-loader.d.ts +7 -0
- package/dist/shared/page-loader.mjs +6 -0
- package/dist/shared/scroll-fade-effect.cjs +21 -0
- package/dist/shared/scroll-fade-effect.d.ts +4 -0
- package/dist/shared/scroll-fade-effect.mjs +20 -0
- package/dist/styles/globals.css +1 -0
- package/package.json +58 -49
- package/scripts/switchToDist.js +55 -0
- package/scripts/switchToSrc.js +52 -0
- package/src/components/accordion.tsx +2 -2
- package/src/components/alert-dialog.tsx +1 -1
- package/src/components/alert.tsx +1 -1
- package/src/components/aspect-ratio.tsx +2 -1
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +3 -3
- package/src/components/breadcrumb.tsx +5 -3
- package/src/components/button-group.tsx +4 -2
- package/src/components/button.tsx +3 -3
- package/src/components/calendar.tsx +2 -2
- package/src/components/checkbox.tsx +2 -2
- package/src/components/collapsible.tsx +2 -1
- package/src/components/command.tsx +1 -1
- package/src/components/context-menu.tsx +2 -2
- package/src/components/dialog.tsx +2 -2
- package/src/components/dropdown-menu.tsx +2 -2
- package/src/components/empty.tsx +1 -0
- package/src/components/field.tsx +5 -2
- package/src/components/form.tsx +9 -7
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/item.tsx +3 -3
- package/src/components/kbd.tsx +1 -0
- package/src/components/label.tsx +1 -1
- package/src/components/language-switcher.tsx +16 -17
- package/src/components/menubar.tsx +2 -2
- package/src/components/navigation-menu.tsx +2 -2
- package/src/components/pagination.tsx +5 -2
- package/src/components/popover.tsx +1 -1
- package/src/components/progress.tsx +1 -1
- package/src/components/radio-group.tsx +2 -2
- package/src/components/scroll-area.tsx +1 -1
- package/src/components/select.tsx +2 -2
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +2 -2
- package/src/components/sidebar.tsx +6 -6
- package/src/components/skeleton.tsx +1 -0
- package/src/components/slider.tsx +1 -1
- package/src/components/sonner.tsx +1 -0
- package/src/components/spinner.tsx +1 -0
- package/src/components/switch.tsx +1 -1
- package/src/components/tabs.tsx +1 -1
- package/src/components/toggle-group.tsx +2 -2
- package/src/components/toggle.tsx +2 -2
- package/src/components/tooltip.tsx +1 -1
- package/src/hooks/use-user.ts +2 -2
- package/src/index.ts +8 -5
- package/src/logo.tsx +1 -0
- package/src/providers/auth-provider.tsx +7 -6
- package/src/providers/index.tsx +1 -0
- package/src/shared/access-denied.tsx +1 -0
- package/src/shared/loader.tsx +2 -1
- package/src/shared/page-loader.tsx +1 -0
- package/src/shared/scroll-fade-effect.tsx +1 -1
- package/src/styles/globals.css +258 -244
- package/biome.json +0 -38
- package/src/components/carousel.tsx +0 -241
- package/src/components/chart.tsx +0 -357
- package/tsconfig.build.json +0 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
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
|
|
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
|
|
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,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
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
|
|
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
|
|
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
|
|
package/src/components/empty.tsx
CHANGED
package/src/components/field.tsx
CHANGED
|
@@ -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
|
|
210
|
+
if (uniqueErrors?.length === 1) {
|
|
208
211
|
return uniqueErrors[0]?.message;
|
|
209
212
|
}
|
|
210
213
|
|
package/src/components/form.tsx
CHANGED
|
@@ -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({
|
|
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={
|
package/src/components/item.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
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"
|
package/src/components/kbd.tsx
CHANGED
package/src/components/label.tsx
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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 {
|
|
12
|
+
import { type Button, buttonVariants } from "./button";
|
|
10
13
|
|
|
11
14
|
function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
|
|
12
15
|
return (
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
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,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
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
|
|
package/src/components/sheet.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
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 "
|
|
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
|
package/src/components/tabs.tsx
CHANGED
|
@@ -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
|
|
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
|
|
package/src/hooks/use-user.ts
CHANGED
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("", {
|