@m5kdev/web-ui 0.1.5 → 0.3.0
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/dist/src/components/AvatarUpload.js +4 -4
- package/dist/src/components/CardsSelect.js +2 -2
- package/dist/src/components/CollapsibleSidebarMenuItem.js +2 -2
- package/dist/src/components/CropDialog.js +3 -3
- package/dist/src/components/FileDropzone.js +3 -3
- package/dist/src/components/MultiSelectDropdown.js +3 -3
- package/dist/src/components/PageAlert.d.ts +1 -1
- package/dist/src/components/PageAlert.js +1 -1
- package/dist/src/components/SidebarItem.js +1 -1
- package/dist/src/components/Steps.js +3 -3
- package/dist/src/components/app-header.js +3 -3
- package/dist/src/components/blur-card.js +2 -2
- package/dist/src/components/features-section-demo-2.js +1 -1
- package/dist/src/components/features-section-demo-3.js +1 -1
- package/dist/src/components/mode-toggle.js +3 -3
- package/dist/src/components/nav-main.js +2 -2
- package/dist/src/components/pricing-cards.js +3 -3
- package/dist/src/components/shared/ButtonCopy.d.ts +1 -1
- package/dist/src/components/shared/ButtonCopy.js +2 -2
- package/dist/src/components/team-switcher.js +2 -2
- package/dist/src/components/ui/alert-dialog.js +2 -2
- package/dist/src/components/ui/alert.js +1 -1
- package/dist/src/components/ui/avatar.js +1 -1
- package/dist/src/components/ui/badge.d.ts +1 -1
- package/dist/src/components/ui/badge.js +1 -1
- package/dist/src/components/ui/bento-grid.js +1 -1
- package/dist/src/components/ui/bento-grid2.js +2 -2
- package/dist/src/components/ui/breadcrumb.js +1 -1
- package/dist/src/components/ui/button.d.ts +1 -1
- package/dist/src/components/ui/button.js +1 -1
- package/dist/src/components/ui/card.js +1 -1
- package/dist/src/components/ui/checkbox.js +1 -1
- package/dist/src/components/ui/dialog.js +1 -1
- package/dist/src/components/ui/dropdown-menu.js +1 -1
- package/dist/src/components/ui/floating-navbar.js +1 -1
- package/dist/src/components/ui/form.js +2 -2
- package/dist/src/components/ui/image.js +1 -1
- package/dist/src/components/ui/input.js +1 -1
- package/dist/src/components/ui/label.js +1 -1
- package/dist/src/components/ui/pagination.d.ts +1 -1
- package/dist/src/components/ui/pagination.js +2 -2
- package/dist/src/components/ui/progress.js +1 -1
- package/dist/src/components/ui/resizable-navbar.js +1 -1
- package/dist/src/components/ui/segment-control.js +2 -2
- package/dist/src/components/ui/select.js +1 -1
- package/dist/src/components/ui/separator.js +1 -1
- package/dist/src/components/ui/sheet.d.ts +1 -1
- package/dist/src/components/ui/sheet.js +1 -1
- package/dist/src/components/ui/sidebar.d.ts +3 -3
- package/dist/src/components/ui/sidebar.js +8 -8
- package/dist/src/components/ui/skeleton.js +1 -1
- package/dist/src/components/ui/slider.js +1 -1
- package/dist/src/components/ui/spinner.js +1 -1
- package/dist/src/components/ui/switch.js +1 -1
- package/dist/src/components/ui/table.js +1 -1
- package/dist/src/components/ui/tabs.js +1 -1
- package/dist/src/components/ui/textarea.js +1 -1
- package/dist/src/components/ui/toast.js +1 -1
- package/dist/src/components/ui/tooltip.js +1 -1
- package/dist/src/components/ui/typewriter-effect.js +1 -1
- package/dist/src/hooks/useDialog.d.ts +1 -1
- package/dist/src/hooks/useDialog.js +1 -1
- package/dist/src/modules/app/components/AppShell.d.ts +1 -1
- package/dist/src/modules/app/components/AppShell.js +1 -1
- package/dist/src/modules/app/components/AppSidebar.js +1 -1
- package/dist/src/modules/app/components/AppSidebarContent.js +2 -2
- package/dist/src/modules/app/components/AppSidebarUser.js +3 -3
- package/dist/src/modules/auth/components/AdminUserManagement.d.ts +1 -1
- package/dist/src/modules/auth/components/AdminWaitlist.d.ts +1 -1
- package/dist/src/modules/auth/components/AuthProviders.js +3 -3
- package/dist/src/modules/auth/components/AuthRouter.d.ts +1 -1
- package/dist/src/modules/auth/components/AuthRouter.js +7 -7
- package/dist/src/modules/auth/components/ClaimAccountRoute.d.ts +1 -1
- package/dist/src/modules/auth/components/ClaimAccountRoute.js +3 -3
- package/dist/src/modules/auth/components/ForgotPasswordRoute.js +1 -1
- package/dist/src/modules/auth/components/InviteFriends.d.ts +1 -1
- package/dist/src/modules/auth/components/InviteFriends.js +1 -1
- package/dist/src/modules/auth/components/LastUsedBadge.d.ts +1 -1
- package/dist/src/modules/auth/components/OrganizationSwitcher.js +2 -2
- package/dist/src/modules/auth/components/ProfileRoute.js +2 -2
- package/dist/src/modules/auth/components/ResetPasswordRoute.js +1 -1
- package/dist/src/modules/auth/components/SignupRoute.d.ts +1 -1
- package/dist/src/modules/auth/components/SignupRoute.js +1 -1
- package/dist/src/modules/auth/components/WaitlistCard.d.ts +1 -1
- package/dist/src/modules/auth/components/WaitlistCodeValidation.d.ts +1 -1
- package/dist/src/modules/billing/components/BillingBetaPage.js +4 -4
- package/dist/src/modules/billing/components/BillingInvoicePage.d.ts +1 -1
- package/dist/src/modules/billing/components/BillingPlanSelect.js +1 -1
- package/dist/src/modules/billing/components/BillingRouter.d.ts +1 -1
- package/dist/src/modules/billing/components/BillingRouter.js +1 -1
- package/dist/src/modules/billing/components/BillingSinglePlanSelect.js +3 -3
- package/dist/src/modules/table/components/ColumnOrderAndVisibility.js +1 -1
- package/dist/src/modules/table/components/NuqsTable.js +2 -2
- package/dist/src/modules/table/components/TableFiltering.js +1 -1
- package/dist/src/modules/table/components/TablePagination.js +2 -2
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +5 -22
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
3
|
function Skeleton({ className, ...props }) {
|
|
4
4
|
return _jsx("div", { className: cn("animate-pulse rounded-md bg-primary/10", className), ...props });
|
|
5
5
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { cn } from "
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
5
|
const Slider = React.forwardRef(({ className, ...props }, ref) => (_jsxs(SliderPrimitive.Root, { ref: ref, className: cn("relative flex w-full touch-none select-none items-center", className), ...props, children: [_jsx(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: _jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }), _jsx(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })] })));
|
|
6
6
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
7
7
|
export { Slider };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { Loader2 } from "lucide-react";
|
|
4
|
-
import { cn } from "
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
5
|
const spinnerVariants = cva("flex-col items-center justify-center", {
|
|
6
6
|
variants: {
|
|
7
7
|
show: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { cn } from "
|
|
4
|
+
import { cn } from "../../lib/utils";
|
|
5
5
|
const Switch = React.forwardRef(({ className, ...props }, ref) => (_jsx(SwitchPrimitives.Root, { className: cn("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className), ...props, ref: ref, children: _jsx(SwitchPrimitives.Thumb, { className: cn("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") }) })));
|
|
6
6
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
7
7
|
export { Switch };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
3
|
function Table({ className, ...props }) {
|
|
4
4
|
return (_jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: _jsx("table", { "data-slot": "table", className: cn("w-full caption-bottom text-sm", className), ...props }) }));
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
4
|
function Tabs({ className, ...props }) {
|
|
5
5
|
return (_jsx(TabsPrimitive.Root, { "data-slot": "tabs", className: cn("flex flex-col gap-2", className), ...props }));
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
3
|
function Textarea({ className, ...props }) {
|
|
4
4
|
return (_jsx("textarea", { "data-slot": "textarea", className: cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className), ...props }));
|
|
5
5
|
}
|
|
@@ -3,7 +3,7 @@ import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { X } from "lucide-react";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import { cn } from "
|
|
6
|
+
import { cn } from "../../lib/utils";
|
|
7
7
|
const ToastProvider = ToastPrimitives.Provider;
|
|
8
8
|
const ToastViewport = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToastPrimitives.Viewport, { ref: ref, className: cn("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]", className), ...props })));
|
|
9
9
|
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "../../lib/utils";
|
|
4
4
|
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
5
5
|
return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }));
|
|
6
6
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { motion, stagger, useAnimate, useInView } from "motion/react";
|
|
4
4
|
import { useEffect } from "react";
|
|
5
|
-
import { cn } from "
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
6
|
export const TypewriterEffect = ({ words, className, cursorClassName, }) => {
|
|
7
7
|
// split text inside of words into array of characters
|
|
8
8
|
const wordsArray = words.map((word) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DialogProps, useDialog } from "
|
|
1
|
+
import { type DialogProps, useDialog } from "../components/DialogProvider";
|
|
2
2
|
export { useDialog };
|
|
3
3
|
export declare const useConfirmDialog: () => (props: DialogProps) => void;
|
|
4
4
|
export declare const useAlertDialog: () => (props: DialogProps) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { SidebarInset, SidebarProvider } from "@m5kdev/web-ui/components/ui/sidebar";
|
|
3
3
|
import { Outlet } from "react-router";
|
|
4
|
-
import { AppSidebar } from "
|
|
4
|
+
import { AppSidebar } from "./AppSidebar";
|
|
5
5
|
export function AppShell({ header, sidebar }) {
|
|
6
6
|
return (_jsxs(SidebarProvider, { children: [header, _jsx(AppSidebar, { ...sidebar }), _jsx(SidebarInset, { children: _jsx(Outlet, {}) })] }));
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarRail, } from "
|
|
2
|
+
import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarRail, } from "../../../components/ui/sidebar";
|
|
3
3
|
export function AppSidebar({ header, content, footer }) {
|
|
4
4
|
return (_jsxs(Sidebar, { collapsible: "icon", children: [_jsx(SidebarHeader, { children: header }), _jsx(SidebarContent, { children: content }), _jsx(SidebarFooter, { children: footer }), _jsx(SidebarRail, {})] }));
|
|
5
5
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Link } from "react-router";
|
|
3
|
-
import { CollapsibleSidebarMenuItem } from "
|
|
4
|
-
import { SidebarGroup, SidebarMenu, SidebarMenuButton, SidebarMenuItem, } from "
|
|
3
|
+
import { CollapsibleSidebarMenuItem } from "../../../components/CollapsibleSidebarMenuItem";
|
|
4
|
+
import { SidebarGroup, SidebarMenu, SidebarMenuButton, SidebarMenuItem, } from "../../../components/ui/sidebar";
|
|
5
5
|
export function AppSidebarContent({ navigationItems, navigationState, onNavigationStateChange, }) {
|
|
6
6
|
return (_jsx(SidebarGroup, { children: _jsx(SidebarMenu, { children: navigationItems.map((item) => item.subItems ? (_jsx(CollapsibleSidebarMenuItem, { defaultOpen: item.defaultOpen, open: navigationState[item.label], label: item.label, icon: item.icon, link: item.link, badge: item.badge, onOpenChange: (open) => onNavigationStateChange({ ...navigationState, [item.label]: open }), children: item.subItems.map((subItem) => (_jsx(SidebarMenuItem, { children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { to: subItem.link, children: [subItem.icon, _jsx("span", { children: subItem.label })] }) }) }, subItem.label))) }, item.label)) : (_jsx(SidebarMenuItem, { children: _jsx(SidebarMenuButton, { asChild: true, children: _jsxs(Link, { to: item.link, children: [item.icon, _jsx("span", { children: item.label })] }) }) }, item.label))) }) }));
|
|
7
7
|
}
|
|
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Building2, ChevronsUpDown, CreditCard, LogOut, Settings, Sparkles, User } from "lucide-react";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import { Link } from "react-router";
|
|
5
|
-
import { Avatar, AvatarFallback, AvatarImage } from "
|
|
6
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "
|
|
7
|
-
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar, } from "
|
|
5
|
+
import { Avatar, AvatarFallback, AvatarImage } from "../../../components/ui/avatar";
|
|
6
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "../../../components/ui/dropdown-menu";
|
|
7
|
+
import { SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar, } from "../../../components/ui/sidebar";
|
|
8
8
|
export function AppSidebarUser({ user, onSignOut, organizationSettingsPath }) {
|
|
9
9
|
const { name = "User", email = "email@example.com", image, role } = user || {};
|
|
10
10
|
const isAdmin = role === "admin";
|
|
@@ -3,9 +3,9 @@ import { Button } from "@heroui/react";
|
|
|
3
3
|
import { authClient } from "@m5kdev/frontend/modules/auth/auth.lib";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import { toast } from "sonner";
|
|
6
|
-
import { GoogleIcon } from "
|
|
7
|
-
import { LinkedInIcon } from "
|
|
8
|
-
import { MicrosoftIcon } from "
|
|
6
|
+
import { GoogleIcon } from "../../../icons/GoogleIcon";
|
|
7
|
+
import { LinkedInIcon } from "../../../icons/LinkedInIcon";
|
|
8
|
+
import { MicrosoftIcon } from "../../../icons/MicrosoftIcon";
|
|
9
9
|
import { LastUsedBadge } from "./LastUsedBadge";
|
|
10
10
|
export function AuthProviders({ providers, lastMethod, code, requestSignUp = false, }) {
|
|
11
11
|
const { t } = useTranslation();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Route } from "react-router";
|
|
3
|
-
import { AuthLayout } from "
|
|
4
|
-
import { ClaimAccountRoute } from "
|
|
5
|
-
import { ErrorAuthRoute } from "
|
|
6
|
-
import { ForgotPasswordRoute } from "
|
|
7
|
-
import { LoginRoute } from "
|
|
8
|
-
import { ResetPasswordRoute } from "
|
|
9
|
-
import { SignupRoute } from "
|
|
3
|
+
import { AuthLayout } from "./AuthLayout";
|
|
4
|
+
import { ClaimAccountRoute } from "./ClaimAccountRoute";
|
|
5
|
+
import { ErrorAuthRoute } from "./ErrorAuthRoute";
|
|
6
|
+
import { ForgotPasswordRoute } from "./ForgotPasswordRoute";
|
|
7
|
+
import { LoginRoute } from "./LoginRoute";
|
|
8
|
+
import { ResetPasswordRoute } from "./ResetPasswordRoute";
|
|
9
|
+
import { SignupRoute } from "./SignupRoute";
|
|
10
10
|
export function AuthRouter({ header, providers, useTRPC }) {
|
|
11
11
|
return (_jsxs(Route, { element: _jsx(AuthLayout, { header: header }), children: [_jsx(Route, { path: "/login", element: _jsx(LoginRoute, { providers: providers }) }), _jsx(Route, { path: "/signup", element: _jsx(SignupRoute, { providers: providers, useTRPC: useTRPC }) }), _jsx(Route, { path: "/forgot-password", element: _jsx(ForgotPasswordRoute, {}) }), _jsx(Route, { path: "/reset-password", element: _jsx(ResetPasswordRoute, {}) }), _jsx(Route, { path: "/claim-account", element: _jsx(ClaimAccountRoute, { useTRPC: useTRPC }) }), _jsx(Route, { path: "/error-auth", element: _jsx(ErrorAuthRoute, {}) })] }));
|
|
12
12
|
}
|
|
@@ -5,9 +5,9 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
|
5
5
|
import { useEffect, useMemo, useState } from "react";
|
|
6
6
|
import { useLocation, useNavigate } from "react-router";
|
|
7
7
|
import { toast } from "sonner";
|
|
8
|
-
import { GoogleIcon } from "
|
|
9
|
-
import { LinkedInIcon } from "
|
|
10
|
-
import { MicrosoftIcon } from "
|
|
8
|
+
import { GoogleIcon } from "../../../icons/GoogleIcon";
|
|
9
|
+
import { LinkedInIcon } from "../../../icons/LinkedInIcon";
|
|
10
|
+
import { MicrosoftIcon } from "../../../icons/MicrosoftIcon";
|
|
11
11
|
export function ClaimAccountRoute({ useTRPC }) {
|
|
12
12
|
const { data: session, registerSession } = useSession();
|
|
13
13
|
const navigate = useNavigate();
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Card, CardBody, CardHeader } from "@heroui/react";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import { Link } from "react-router";
|
|
5
|
-
import { ForgotPasswordForm } from "
|
|
5
|
+
import { ForgotPasswordForm } from "./ForgotPasswordForm";
|
|
6
6
|
export function ForgotPasswordRoute() {
|
|
7
7
|
const { t } = useTranslation();
|
|
8
8
|
return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "text-center flex flex-col gap-1", children: [_jsx("p", { className: "text-xl font-semibold", children: t("web-ui:auth.forgotPassword.title") }), _jsx("p", { className: "text-sm text-default-600", children: t("web-ui:auth.forgotPassword.description") })] }), _jsx(CardBody, { children: _jsx(ForgotPasswordForm, {}) })] }), _jsxs("div", { className: "text-center text-xs text-muted-foreground", children: [t("web-ui:auth.forgotPassword.rememberPassword"), " ", _jsx(Link, { to: "/login", className: "underline underline-offset-4 hover:text-primary", children: t("web-ui:auth.login.button") })] })] }));
|
|
@@ -5,7 +5,7 @@ import { CheckCircle2, Link2Icon, Mail, Send, Ticket, Users, Zap } from "lucide-
|
|
|
5
5
|
import { useMemo, useState } from "react";
|
|
6
6
|
import { toast } from "sonner";
|
|
7
7
|
import { z } from "zod";
|
|
8
|
-
import { CopyButton } from "
|
|
8
|
+
import { CopyButton } from "../../../components/CopyButton";
|
|
9
9
|
export function InviteFriends({ useTRPC }) {
|
|
10
10
|
const trpc = useTRPC();
|
|
11
11
|
const queryClient = useQueryClient();
|
|
@@ -2,4 +2,4 @@ import { type BadgeProps } from "@heroui/react";
|
|
|
2
2
|
export declare function LastUsedBadge({ lastMethod, method, children, ...props }: BadgeProps & {
|
|
3
3
|
lastMethod?: string | null;
|
|
4
4
|
method?: string | null;
|
|
5
|
-
}): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> |
|
|
5
|
+
}): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | null | undefined;
|
|
@@ -8,8 +8,8 @@ import { useCallback, useMemo, useState } from "react";
|
|
|
8
8
|
import { useTranslation } from "react-i18next";
|
|
9
9
|
import { Link } from "react-router";
|
|
10
10
|
import { toast } from "sonner";
|
|
11
|
-
import { useSidebar } from "
|
|
12
|
-
import { cn } from "
|
|
11
|
+
import { useSidebar } from "../../../components/ui/sidebar";
|
|
12
|
+
import { cn } from "../../../lib/utils";
|
|
13
13
|
export function OrganizationSwitcher({ onInvalidateScopedQueries, managerRoles = ["admin", "owner"], managerPath = "/organization/members", fallbackPath = "/", }) {
|
|
14
14
|
const { t } = useTranslation();
|
|
15
15
|
const { data: session, registerSession } = useSession();
|
|
@@ -6,8 +6,8 @@ import { useForm } from "react-hook-form";
|
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
7
7
|
import { toast } from "sonner";
|
|
8
8
|
import { z } from "zod";
|
|
9
|
-
import { AvatarUpload } from "
|
|
10
|
-
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage, } from "
|
|
9
|
+
import { AvatarUpload } from "../../../components/AvatarUpload";
|
|
10
|
+
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage, } from "../../../components/ui/form";
|
|
11
11
|
const profileSchema = z.object({
|
|
12
12
|
name: z.string().min(2, "Name must be at least 2 characters"),
|
|
13
13
|
image: z.string().nullable(),
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Card, CardBody, CardHeader } from "@heroui/react";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import { Link } from "react-router";
|
|
5
|
-
import { ResetPasswordForm } from "
|
|
5
|
+
import { ResetPasswordForm } from "./ResetPasswordForm";
|
|
6
6
|
export function ResetPasswordRoute() {
|
|
7
7
|
const { t } = useTranslation();
|
|
8
8
|
return (_jsxs("div", { className: "flex flex-col gap-6", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "text-center flex flex-col gap-1", children: [_jsx("h2", { className: "text-xl font-semibold", children: t("web-ui:auth.resetPassword.title") }), _jsx("p", { className: "text-sm text-default-600", children: t("web-ui:auth.resetPassword.description") })] }), _jsx(CardBody, { children: _jsx(ResetPasswordForm, {}) })] }), _jsxs("div", { className: "text-center text-xs text-muted-foreground", children: [t("web-ui:auth.forgotPassword.rememberPassword"), " ", _jsx(Link, { to: "/login", className: "underline underline-offset-4 hover:text-primary", children: t("web-ui:auth.login.button") })] })] }));
|
|
@@ -3,7 +3,7 @@ import { Card, CardBody, CardHeader } from "@heroui/react";
|
|
|
3
3
|
import { useQueryState } from "nuqs";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import { Link } from "react-router";
|
|
6
|
-
import { SignupForm } from "
|
|
6
|
+
import { SignupForm } from "./SignupFormRoute";
|
|
7
7
|
import { AuthProviders } from "./AuthProviders";
|
|
8
8
|
import { WaitlistCard } from "./WaitlistCard";
|
|
9
9
|
import { WaitlistCodeValidation } from "./WaitlistCodeValidation";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Bell, CheckCircle2, Clock3, Sparkles } from "lucide-react";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { Badge } from "
|
|
5
|
-
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "
|
|
6
|
-
import { Separator } from "
|
|
7
|
-
import { cn } from "
|
|
4
|
+
import { Badge } from "../../../components/ui/badge";
|
|
5
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../../../components/ui/card";
|
|
6
|
+
import { Separator } from "../../../components/ui/separator";
|
|
7
|
+
import { cn } from "../../../lib/utils";
|
|
8
8
|
export function BillingBetaPage({ appName, className, footer }) {
|
|
9
9
|
const { t } = useTranslation("web-ui");
|
|
10
10
|
return (_jsxs("div", { className: cn("mx-auto max-w-5xl px-4 py-12 md:py-16", className), children: [_jsxs("div", { className: "flex flex-col items-center text-center gap-4", children: [_jsx(Badge, { variant: "secondary", className: "uppercase tracking-wide", children: t("billing.beta.badge") }), _jsxs("div", { className: "space-y-3", children: [_jsx("h1", { className: "text-3xl md:text-4xl font-semibold tracking-tight", children: t("billing.title") }), _jsx("p", { className: "text-muted-foreground max-w-2xl", children: t("billing.subtitle", { appName }) })] })] }), _jsx(Separator, { className: "my-8" }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-6", children: [_jsxs(Card, { children: [_jsxs(CardHeader, { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center gap-2 text-green-600 dark:text-green-500", children: [_jsx(Sparkles, { className: "h-5 w-5 shrink-0" }), _jsx(CardTitle, { children: t("billing.card.free.title") })] }), _jsx(CardDescription, { children: t("billing.card.free.description") })] }), _jsxs(CardContent, { children: [_jsxs("div", { className: "flex items-baseline gap-2", children: [_jsx("span", { className: "text-4xl font-bold tracking-tight", children: t("billing.card.free.price") }), _jsx("span", { className: "text-muted-foreground", children: t("billing.card.free.priceSuffix") })] }), _jsxs("ul", { className: "mt-4 space-y-2 text-sm", children: [_jsxs("li", { className: "flex items-center gap-2", children: [_jsx(CheckCircle2, { className: "h-4 w-4 shrink-0 text-green-600" }), " ", t("billing.card.free.feature.fullAccess")] }), _jsxs("li", { className: "flex items-center gap-2", children: [_jsx(CheckCircle2, { className: "h-4 w-4 shrink-0 text-green-600" }), " ", t("billing.card.free.feature.noCard")] }), _jsxs("li", { className: "flex items-center gap-2", children: [_jsx(CheckCircle2, { className: "h-4 w-4 shrink-0 text-green-600" }), " ", t("billing.card.free.feature.riskFree")] })] })] })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center gap-2 text-blue-600 dark:text-blue-500", children: [_jsx(Clock3, { className: "h-5 w-5 shrink-0" }), _jsx(CardTitle, { children: t("billing.card.progress.title") })] }), _jsx(CardDescription, { children: t("billing.card.progress.description") })] }), _jsx(CardContent, { children: _jsxs("ul", { className: "space-y-2 text-sm", children: [_jsxs("li", { className: "flex items-center gap-2", children: [_jsx(CheckCircle2, { className: "h-4 w-4 shrink-0 text-blue-600" }), " ", t("billing.card.progress.feature.transparentPlans")] }), _jsxs("li", { className: "flex items-center gap-2", children: [_jsx(CheckCircle2, { className: "h-4 w-4 shrink-0 text-blue-600" }), " ", t("billing.card.progress.feature.fairValue")] }), _jsxs("li", { className: "flex items-center gap-2", children: [_jsx(CheckCircle2, { className: "h-4 w-4 shrink-0 text-blue-600" }), " ", t("billing.card.progress.feature.simpleBilling")] })] }) })] }), _jsxs(Card, { children: [_jsxs(CardHeader, { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center gap-2 text-amber-600 dark:text-amber-500", children: [_jsx(Bell, { className: "h-5 w-5 shrink-0" }), _jsx(CardTitle, { children: t("billing.card.notice.title") })] }), _jsx(CardDescription, { children: t("billing.card.notice.description") })] }), _jsx(CardContent, { children: _jsxs("ul", { className: "space-y-2 text-sm", children: [_jsxs("li", { className: "flex items-center gap-2", children: [_jsx(CheckCircle2, { className: "h-4 w-4 shrink-0 text-amber-600" }), " ", t("billing.card.notice.feature.timeToDecide")] }), _jsxs("li", { className: "flex items-center gap-2", children: [_jsx(CheckCircle2, { className: "h-4 w-4 shrink-0 text-amber-600" }), " ", t("billing.card.notice.feature.safeData")] }), _jsxs("li", { className: "flex items-center gap-2", children: [_jsx(CheckCircle2, { className: "h-4 w-4 shrink-0 text-amber-600" }), " ", t("billing.card.notice.feature.autoFreeTier")] })] }) })] })] }), footer] }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { BillingSinglePlanSelect } from "
|
|
2
|
+
import { BillingSinglePlanSelect } from "./BillingSinglePlanSelect";
|
|
3
3
|
export function BillingPlanSelect({ plans }) {
|
|
4
4
|
if (plans.length === 1) {
|
|
5
5
|
return _jsx(BillingSinglePlanSelect, { plan: plans[0] });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Route } from "react-router";
|
|
3
|
-
import { BillingInvoicePage } from "
|
|
3
|
+
import { BillingInvoicePage } from "./BillingInvoicePage";
|
|
4
4
|
export function BillingRouter({ useTRPC, serverUrl }) {
|
|
5
5
|
if (!useTRPC)
|
|
6
6
|
return null;
|
|
@@ -5,9 +5,9 @@ import { Check, LogOut } from "lucide-react";
|
|
|
5
5
|
import { useState } from "react";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
7
7
|
import { Link, useNavigate } from "react-router";
|
|
8
|
-
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "
|
|
9
|
-
import { Tabs, TabsList, TabsTrigger } from "
|
|
10
|
-
import { cn } from "
|
|
8
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "../../../components/ui/card";
|
|
9
|
+
import { Tabs, TabsList, TabsTrigger } from "../../../components/ui/tabs";
|
|
10
|
+
import { cn } from "../../../lib/utils";
|
|
11
11
|
export function BillingSinglePlanSelect({ plan, termsOfServiceUrl, features = [
|
|
12
12
|
"Unlimited access to all features",
|
|
13
13
|
"Priority support",
|
|
@@ -4,7 +4,7 @@ import { arrayMove, SortableContext, sortableKeyboardCoordinates, useSortable, v
|
|
|
4
4
|
import { CSS } from "@dnd-kit/utilities";
|
|
5
5
|
import { EyeIcon, EyeOffIcon, GripVertical } from "lucide-react";
|
|
6
6
|
import { useCallback, useState } from "react";
|
|
7
|
-
import { Button } from "
|
|
7
|
+
import { Button } from "../../../components/ui/button";
|
|
8
8
|
const ColumnOrderAndVisibilityItem = ({ column, onChangeVisibilityState, }) => {
|
|
9
9
|
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({
|
|
10
10
|
id: column.id,
|
|
@@ -3,8 +3,8 @@ import { Checkbox, Popover, PopoverContent, PopoverTrigger } from "@heroui/react
|
|
|
3
3
|
import { flexRender, getCoreRowModel, getPaginationRowModel, useReactTable, } from "@tanstack/react-table";
|
|
4
4
|
import { ChevronDown, ChevronUp } from "lucide-react";
|
|
5
5
|
import { useEffect, useMemo, useState } from "react";
|
|
6
|
-
import { Button } from "
|
|
7
|
-
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "
|
|
6
|
+
import { Button } from "../../../components/ui/button";
|
|
7
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "../../../components/ui/table";
|
|
8
8
|
import { ColumnOrderAndVisibility } from "./ColumnOrderAndVisibility";
|
|
9
9
|
import { TableFiltering } from "./TableFiltering";
|
|
10
10
|
import { TablePagination } from "./TablePagination";
|
|
@@ -3,7 +3,7 @@ import { DatePicker, DateRangePicker, Input, Select, SelectItem, } from "@heroui
|
|
|
3
3
|
import { getLocalTimeZone, today } from "@internationalized/date";
|
|
4
4
|
import { PlusIcon, XIcon } from "lucide-react";
|
|
5
5
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
6
|
-
import { Button } from "
|
|
6
|
+
import { Button } from "../../../components/ui/button";
|
|
7
7
|
import { transformFiltersFromHeroUI, transformFiltersToHeroUI, } from "../filterTransformers";
|
|
8
8
|
const componentForFilterMethod = {
|
|
9
9
|
text: (value, onChange) => (_jsx(Input, { size: "sm", "aria-label": "Select Value", className: "flex-1 min-w-0 text-sm", value: value ?? "", onChange: (e) => onChange(e.target.value) })),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Input } from "
|
|
3
|
-
import { Pagination, PaginationContent, PaginationNext, PaginationPrevious, } from "
|
|
2
|
+
import { Input } from "../../../components/ui/input";
|
|
3
|
+
import { Pagination, PaginationContent, PaginationNext, PaginationPrevious, } from "../../../components/ui/pagination";
|
|
4
4
|
export const TablePagination = ({ pageCount, page = 1, limit = 10, setPagination, }) => {
|
|
5
5
|
const isFirstPage = page === 1;
|
|
6
6
|
const isLastPage = page >= pageCount;
|