fina-react-ds 1.0.48 → 1.0.50
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.
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
declare function Empty({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const emptyMediaVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "icon" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof emptyMediaVariants>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function EmptyDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s=Object.defineProperty;var n=(e,t)=>s(e,"name",{value:t,configurable:!0});import{jsx as a}from"react/jsx-runtime";import{cva as m}from"class-variance-authority";import{cn as r}from"../lib/utils.js";function u({className:e,...t}){return a("div",{"data-slot":"empty",className:r("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",e),...t})}n(u,"Empty");function p({className:e,...t}){return a("div",{"data-slot":"empty-header",className:r("flex max-w-sm flex-col items-center gap-2 text-center",e),...t})}n(p,"EmptyHeader");const o=m("flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"bg-accent text-accent-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"}},defaultVariants:{variant:"default"}});function x({className:e,variant:t="default",...i}){return a("div",{"data-slot":"empty-icon","data-variant":t,className:r(o({variant:t,className:e})),...i})}n(x,"EmptyMedia");function y({className:e,...t}){return a("div",{"data-slot":"empty-title",className:r("text-lg font-medium tracking-tight",e),...t})}n(y,"EmptyTitle");function g({className:e,...t}){return a("div",{"data-slot":"empty-description",className:r("text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",e),...t})}n(g,"EmptyDescription");function v({className:e,...t}){return a("div",{"data-slot":"empty-content",className:r("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance",e),...t})}n(v,"EmptyContent");export{u as Empty,v as EmptyContent,g as EmptyDescription,p as EmptyHeader,x as EmptyMedia,y as EmptyTitle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var z=Object.defineProperty;var o=(i,l)=>z(i,"name",{value:l,configurable:!0});import{jsxs as r,jsx as e,Fragment as f}from"react/jsx-runtime";import{useState as j,useCallback as p,useImperativeHandle as k}from"react";import{FileIcon as F,UploadIcon as C}from"lucide-react";import{useDropzone as D}from"react-dropzone";import{cn as c}from"../lib/utils.js";import{Button as I}from"./button.js";function H({onChange:i,"aria-invalid":l,fileTypes:x,ref:b}){const[a,d]=j([]),v=p(n=>{d(n),i?.(n.length>0?n[0]:null)},[i]),{getRootProps:g,getInputProps:h,acceptedFiles:u,open:y,rootRef:t}=D({maxFiles:1,noClick:!0,onDrop:v,onFileDialogCancel:o(()=>{t?.current&&t.current.focus()},"onFileDialogCancel")});k(b,()=>({focus:o(()=>{t?.current&&t.current.focus()},"focus")}));const N=p(n=>{let s=0,m="ko";return s=n.size/1e3,s>1e3&&(s/=1e3,m="mo"),s.toFixed(2)+" "+m},[]);return r("div",{...g(),className:c("bg-input border border-input-border flex flex-col h-50 flex-2 rounded-md px-3 py-1 text-base shadow-xs items-center justify-center md:text-sm outline-none","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"),"aria-invalid":l,children:[a.length>0&&r(f,{children:[e("div",{className:c("bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"),children:e(F,{className:"size-4"})}),r("div",{className:"mb-4 text-center",children:[u[0].name,e("br",{}),N(u[0])]}),e(I,{type:"button",color:"destructive",variant:"ghost",onClick:o(()=>{d([]),i?.(null),t?.current?.focus()},"onClick"),children:"Supprimer"})]}),a.length===0&&r(f,{children:[e("div",{className:c("bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"),children:e(C,{className:"size-4"})}),r("div",{className:"mb-4",children:["Glisser-déposer ou"," ",e("span",{className:"font-bold underline cursor-pointer",onClick:y,children:"Choisir un fichier"})," ","à uploader"]}),r("div",{className:"text-center text-sm md:text-xs",children:["Formats acceptés : ",Object.keys(x).join(", "),e("br",{}),"Taille max : 5Mo"]})]}),e("input",{...h()})]})}o(H,"FileUploader");export{H as FileUploader};
|
|
@@ -45,3 +45,4 @@ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription,
|
|
|
45
45
|
export { ThemeProvider, useTheme } from "../providers/theme-provider";
|
|
46
46
|
export { LoaderProvider, useLoader } from "../providers/loader-provider";
|
|
47
47
|
export { HtmlInput } from "./html-input";
|
|
48
|
+
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, } from "./empty";
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AlertDialog as r,AlertDialogAction as t,AlertDialogCancel as a,AlertDialogContent as i,AlertDialogDescription as n,AlertDialogFooter as p,AlertDialogHeader as l,AlertDialogOverlay as m,AlertDialogPortal as d,AlertDialogTitle as g,AlertDialogTrigger as
|
|
1
|
+
import{AlertDialog as r,AlertDialogAction as t,AlertDialogCancel as a,AlertDialogContent as i,AlertDialogDescription as n,AlertDialogFooter as p,AlertDialogHeader as l,AlertDialogOverlay as m,AlertDialogPortal as d,AlertDialogTitle as g,AlertDialogTrigger as x}from"./alert-dialog.js";import{Alert as S,AlertDescription as b,AlertTitle as f}from"./alert.js";import{Badge as T}from"./badge.js";import{Button as s,buttonVariants as F}from"./button.js";import{Avatar as c,AvatarFallback as P,AvatarImage as A}from"./avatar.js";import{Calendar as h}from"./calendar.js";import{Card as I,CardAction as H,CardContent as y,CardDescription as k,CardFooter as L,CardHeader as B,CardTitle as E}from"./card.js";import{Checkbox as R}from"./checkbox.js";import{DatePicker as O}from"./date-picker.js";import{Dialog as V,DialogClose as j,DialogContent as q,DialogDescription as z,DialogFooter as J,DialogHeader as K,DialogOverlay as Q,DialogPortal as W,DialogTitle as X,DialogTrigger as Y}from"./dialog.js";import{DataLoader as _}from"./data-loader.js";import{DropdownMenu as ee,DropdownMenuCheckboxItem as oe,DropdownMenuContent as re,DropdownMenuGroup as te,DropdownMenuItem as ae,DropdownMenuLabel as ie,DropdownMenuPortal as ne,DropdownMenuRadioGroup as pe,DropdownMenuRadioItem as le,DropdownMenuSeparator as me,DropdownMenuShortcut as de,DropdownMenuSub as ge,DropdownMenuSubContent as xe,DropdownMenuSubTrigger as ue,DropdownMenuTrigger as Se}from"./dropdown-menu.js";import{FileUploader as fe}from"./file-uploader.js";import{ImageUploader as Te}from"./image-uploader.js";import{HoverCard as se,HoverCardContent as Fe,HoverCardTrigger as Me}from"./hover-card.js";import{Input as Pe}from"./input.js";import{Label as we}from"./label.js";import{ModeToggle as ve}from"./mode-toggle.js";import{Pagination as He,PaginationContent as ye,PaginationEllipsis as ke,PaginationItem as Le,PaginationLink as Be,PaginationNext as Ee,PaginationPrevious as Ge}from"./pagination.js";import{PasswordRulesChecker as Ue}from"./password-rules-checker.js";import{Popover as Ne,PopoverAnchor as Ve,PopoverContent as je,PopoverTrigger as qe}from"./popover.js";import{Select as Je}from"./select.js";import{Separator as Qe}from"./separator.js";import{Sheet as Xe,SheetBody as Ye,SheetClose as Ze,SheetContent as _e,SheetDescription as $e,SheetFooter as eo,SheetHeader as oo,SheetTitle as ro,SheetTrigger as to}from"./sheet.js";import{Sidebar as io,SidebarContent as no,SidebarFooter as po,SidebarGroup as lo,SidebarGroupAction as mo,SidebarGroupContent as go,SidebarGroupLabel as xo,SidebarHeader as uo,SidebarInput as So,SidebarInset as bo,SidebarMenu as fo,SidebarMenuAction as Do,SidebarMenuBadge as To,SidebarMenuButton as Co,SidebarMenuItem as so,SidebarMenuSkeleton as Fo,SidebarMenuSub as Mo,SidebarMenuSubButton as co,SidebarMenuSubItem as Po,SidebarProvider as Ao,SidebarRail as wo,SidebarSeparator as ho,SidebarTrigger as vo,useSidebar as Io}from"./sidebar.js";import{SimplePagination as yo}from"./simple-pagination.js";import{SimpleTooltip as Lo}from"./simple-tooltip.js";import{Skeleton as Eo}from"./skeleton.js";import{Switch as Ro}from"./switch.js";import{Toaster as Oo}from"./sonner.js";import{Table as Vo,TableBody as jo,TableCaption as qo,TableCell as zo,TableFooter as Jo,TableHead as Ko,TableHeader as Qo,TableRow as Wo}from"./table.js";import{Tabs as Yo,TabsContent as Zo,TabsList as _o,TabsTrigger as $o}from"./tabs.js";import{Textarea as or}from"./textarea.js";import{Tooltip as tr,TooltipContent as ar,TooltipProvider as ir,TooltipTrigger as nr}from"./tooltip.js";import{FormDate as lr}from"./form-date.js";import{FormColorPicker as dr}from"./form-color-picker.js";import{FormFileUploader as xr}from"./form-file-uploader.js";import{FormInput as Sr}from"./form-input.js";import{FormSelect as fr}from"./form-select.js";import{FormSwitch as Tr}from"./form-switch.js";import{FormTextarea as sr}from"./form-textarea.js";import{FormImageUploader as Mr}from"./form-image-uploader.js";import{FormHtmlInput as Pr}from"./form-html-input.js";import{Form as wr,FormControl as hr,FormDescription as vr,FormField as Ir,FormItem as Hr,FormLabel as yr,FormMessage as kr,useFormField as Lr}from"./form.js";import{ThemeProvider as Er,useTheme as Gr}from"../providers/theme-provider.js";import{LoaderProvider as Ur,useLoader as Or}from"../providers/loader-provider.js";import{HtmlInput as Vr}from"./html-input.js";import{Empty as qr,EmptyContent as zr,EmptyDescription as Jr,EmptyHeader as Kr,EmptyMedia as Qr,EmptyTitle as Wr}from"./empty.js";export{S as Alert,b as AlertDescription,r as AlertDialog,t as AlertDialogAction,a as AlertDialogCancel,i as AlertDialogContent,n as AlertDialogDescription,p as AlertDialogFooter,l as AlertDialogHeader,m as AlertDialogOverlay,d as AlertDialogPortal,g as AlertDialogTitle,x as AlertDialogTrigger,f as AlertTitle,c as Avatar,P as AvatarFallback,A as AvatarImage,T as Badge,s as Button,h as Calendar,I as Card,H as CardAction,y as CardContent,k as CardDescription,L as CardFooter,B as CardHeader,E as CardTitle,R as Checkbox,_ as DataLoader,O as DatePicker,V as Dialog,j as DialogClose,q as DialogContent,z as DialogDescription,J as DialogFooter,K as DialogHeader,Q as DialogOverlay,W as DialogPortal,X as DialogTitle,Y as DialogTrigger,ee as DropdownMenu,oe as DropdownMenuCheckboxItem,re as DropdownMenuContent,te as DropdownMenuGroup,ae as DropdownMenuItem,ie as DropdownMenuLabel,ne as DropdownMenuPortal,pe as DropdownMenuRadioGroup,le as DropdownMenuRadioItem,me as DropdownMenuSeparator,de as DropdownMenuShortcut,ge as DropdownMenuSub,xe as DropdownMenuSubContent,ue as DropdownMenuSubTrigger,Se as DropdownMenuTrigger,qr as Empty,zr as EmptyContent,Jr as EmptyDescription,Kr as EmptyHeader,Qr as EmptyMedia,Wr as EmptyTitle,fe as FileUploader,wr as Form,dr as FormColorPicker,hr as FormControl,lr as FormDate,vr as FormDescription,Ir as FormField,xr as FormFileUploader,Pr as FormHtmlInput,Mr as FormImageUploader,Sr as FormInput,Hr as FormItem,yr as FormLabel,kr as FormMessage,fr as FormSelect,Tr as FormSwitch,sr as FormTextarea,se as HoverCard,Fe as HoverCardContent,Me as HoverCardTrigger,Vr as HtmlInput,Te as ImageUploader,Pe as Input,we as Label,Ur as LoaderProvider,ve as ModeToggle,He as Pagination,ye as PaginationContent,ke as PaginationEllipsis,Le as PaginationItem,Be as PaginationLink,Ee as PaginationNext,Ge as PaginationPrevious,Ue as PasswordRulesChecker,Ne as Popover,Ve as PopoverAnchor,je as PopoverContent,qe as PopoverTrigger,Je as Select,Qe as Separator,Xe as Sheet,Ye as SheetBody,Ze as SheetClose,_e as SheetContent,$e as SheetDescription,eo as SheetFooter,oo as SheetHeader,ro as SheetTitle,to as SheetTrigger,io as Sidebar,no as SidebarContent,po as SidebarFooter,lo as SidebarGroup,mo as SidebarGroupAction,go as SidebarGroupContent,xo as SidebarGroupLabel,uo as SidebarHeader,So as SidebarInput,bo as SidebarInset,fo as SidebarMenu,Do as SidebarMenuAction,To as SidebarMenuBadge,Co as SidebarMenuButton,so as SidebarMenuItem,Fo as SidebarMenuSkeleton,Mo as SidebarMenuSub,co as SidebarMenuSubButton,Po as SidebarMenuSubItem,Ao as SidebarProvider,wo as SidebarRail,ho as SidebarSeparator,vo as SidebarTrigger,yo as SimplePagination,Lo as SimpleTooltip,Eo as Skeleton,Ro as Switch,Vo as Table,jo as TableBody,qo as TableCaption,zo as TableCell,Jo as TableFooter,Ko as TableHead,Qo as TableHeader,Wo as TableRow,Yo as Tabs,Zo as TabsContent,_o as TabsList,$o as TabsTrigger,or as Textarea,Er as ThemeProvider,Oo as Toaster,tr as Tooltip,ar as TooltipContent,ir as TooltipProvider,nr as TooltipTrigger,F as buttonVariants,Lr as useFormField,Or as useLoader,Io as useSidebar,Gr as useTheme};
|