fina-react-ds 1.0.43 → 1.0.45
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
var F=Object.defineProperty;var
|
|
1
|
+
var F=Object.defineProperty;var n=(i,c)=>F(i,"name",{value:c,configurable:!0});import{jsxs as r,jsx as e,Fragment as f}from"react/jsx-runtime";import{useState as D,useImperativeHandle as C,useCallback as p}from"react";import{FileIcon as x,DownloadIcon as I,UploadIcon as S}from"lucide-react";import{useDropzone as w}from"react-dropzone";import{cn as o}from"../lib/utils.js";import{Button as b}from"./button.js";function O({onChange:i,"aria-invalid":c,fileTypes:h,ref:v}){const[d,a]=D([]);C(v,()=>({focus:n(()=>{t?.current&&t.current.focus()},"focus")}));const g=p(l=>{a(l),i?.(l.length>0?l[0]:null)},[i]),y=n(()=>{t?.current&&t.current.focus()},"handleFileDialogCancel"),{getRootProps:N,getInputProps:z,acceptedFiles:u,open:j,rootRef:t}=w({maxFiles:1,noClick:!0,onDrop:g,onFileDialogCancel:y}),k=p(l=>{let s=0,m="ko";return s=l.size/1e3,s>1e3&&(s/=1e3,m="mo"),s.toFixed(2)+" "+m},[]);return r("div",{className:"flex space-x-2 items-center h-50",children:[r("div",{className:"flex-1 flex-col h-full shrink-0 bg-accent rounded-md flex items-center justify-center",children:[e("div",{className:o("bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"),children:e(x,{className:"size-4"})}),e("div",{className:"mb-4 text-center",children:"Mon super fichier"}),e(b,{type:"button",color:"info",size:"icon",variant:"ghost",onClick:n(()=>{a([]),i?.(null),t?.current?.focus()},"onClick"),children:e(I,{})})]}),r("div",{...N(),className:o("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":c,children:[d.length>0&&r(f,{children:[e("div",{className:o("bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"),children:e(x,{className:"size-4"})}),r("div",{className:"mb-4 text-center",children:[u[0].name,e("br",{}),k(u[0])]}),e(b,{type:"button",color:"destructive",variant:"ghost",onClick:n(()=>{a([]),i?.(null),t?.current?.focus()},"onClick"),children:"Supprimer"})]}),d.length===0&&r(f,{children:[e("div",{className:o("bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"),children:e(S,{className:"size-4"})}),r("div",{className:"mb-4",children:["Glisser-déposer ou"," ",e("span",{className:"font-bold underline cursor-pointer",onClick:j,children:"Choisir un fichier"})," ","à uploader"]}),r("div",{className:"text-center text-sm md:text-xs",children:["Formats acceptés : ",Object.keys(h).join(", "),e("br",{}),"Taille max : 5Mo"]})]}),e("input",{...z()})]})]})}n(O,"FileUploader");export{O as FileUploader};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var e=Object.defineProperty;var o=(i,r)=>e(i,"name",{value:r,configurable:!0});import{jsxs as n,jsx as t}from"react/jsx-runtime";import{cn as d}from"../lib/utils.js";import{CKEditor as s}from"@ckeditor/ckeditor5-react";import{Essentials as a,Paragraph as l,Bold as c,Italic as m,ClassicEditor as p}from"ckeditor5";import{useId as b}from"react";function w(){const i=b(),r=`
|
|
2
|
+
#${i} .ck-sticky-panel__content { border: none; }
|
|
3
|
+
#${i} .ck-content { border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; box-shadow: none; }
|
|
4
|
+
`;return n("div",{id:i,className:d("bg-input border border-input-border w-full rounded-md shadow-xs md:text-sm outline-none overflow-hidden","has-focus-visible:border-ring has-focus-visible:ring-ring/50 has-focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"),children:[t("style",{children:r}),t(s,{editor:p,config:{licenseKey:"GPL",plugins:[a,l,c,m],toolbar:["bold","italic","|","formatPainter"],initialData:"<p>Hello from CKEditor 5 in React!</p>"}})]})}o(w,"HtmlInput");export{w as HtmlInput};
|
|
@@ -12,7 +12,7 @@ export { DataLoader } from "./data-loader";
|
|
|
12
12
|
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, } from "./dropdown-menu";
|
|
13
13
|
export { FileUploader } from "./file-uploader";
|
|
14
14
|
export { ImageUploader } from "./image-uploader";
|
|
15
|
-
export { HoverCard, HoverCardTrigger, HoverCardContent
|
|
15
|
+
export { HoverCard, HoverCardTrigger, HoverCardContent } from "./hover-card";
|
|
16
16
|
export { Input } from "./input";
|
|
17
17
|
export { Label } from "./label";
|
|
18
18
|
export { ModeToggle } from "./mode-toggle";
|
|
@@ -43,3 +43,4 @@ export { FormImageUploader } from "./form-image-uploader";
|
|
|
43
43
|
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, } from "./form";
|
|
44
44
|
export { ThemeProvider, useTheme } from "../providers/theme-provider";
|
|
45
45
|
export { LoaderProvider, useLoader } from "../providers/loader-provider";
|
|
46
|
+
export { HtmlInput } from "./html-input";
|
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 d,AlertDialogPortal as m,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 d,AlertDialogPortal as m,AlertDialogTitle as g,AlertDialogTrigger as u}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 k,CardDescription as L,CardFooter as B,CardHeader as G,CardTitle as R}from"./card.js";import{Checkbox as U}from"./checkbox.js";import{DatePicker as E}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 de,DropdownMenuShortcut as me,DropdownMenuSub as ge,DropdownMenuSubContent as ue,DropdownMenuSubTrigger as xe,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 ke,PaginationEllipsis as Le,PaginationItem as Be,PaginationLink as Ge,PaginationNext as Re,PaginationPrevious as ye}from"./pagination.js";import{PasswordRulesChecker as Oe}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 uo,SidebarHeader as xo,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 ko}from"./simple-pagination.js";import{SimpleTooltip as Bo}from"./simple-tooltip.js";import{Skeleton as Ro}from"./skeleton.js";import{Switch as Uo}from"./switch.js";import{Toaster as Eo}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 mr}from"./form-color-picker.js";import{FormFileUploader as ur}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{Form as Pr,FormControl as Ar,FormDescription as wr,FormField as hr,FormItem as vr,FormLabel as Ir,FormMessage as Hr,useFormField as kr}from"./form.js";import{ThemeProvider as Br,useTheme as Gr}from"../providers/theme-provider.js";import{LoaderProvider as yr,useLoader as Ur}from"../providers/loader-provider.js";import{HtmlInput as Er}from"./html-input.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,d as AlertDialogOverlay,m as AlertDialogPortal,g as AlertDialogTitle,u 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,k as CardContent,L as CardDescription,B as CardFooter,G as CardHeader,R as CardTitle,U as Checkbox,_ as DataLoader,E 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,de as DropdownMenuSeparator,me as DropdownMenuShortcut,ge as DropdownMenuSub,ue as DropdownMenuSubContent,xe as DropdownMenuSubTrigger,Se as DropdownMenuTrigger,fe as FileUploader,Pr as Form,mr as FormColorPicker,Ar as FormControl,lr as FormDate,wr as FormDescription,hr as FormField,ur as FormFileUploader,Mr as FormImageUploader,Sr as FormInput,vr as FormItem,Ir as FormLabel,Hr as FormMessage,fr as FormSelect,Tr as FormSwitch,sr as FormTextarea,se as HoverCard,Fe as HoverCardContent,Me as HoverCardTrigger,Er as HtmlInput,Te as ImageUploader,Pe as Input,we as Label,yr as LoaderProvider,ve as ModeToggle,He as Pagination,ke as PaginationContent,Le as PaginationEllipsis,Be as PaginationItem,Ge as PaginationLink,Re as PaginationNext,ye as PaginationPrevious,Oe 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,uo as SidebarGroupLabel,xo 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,ko as SimplePagination,Bo as SimpleTooltip,Ro as Skeleton,Uo 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,Br as ThemeProvider,Eo as Toaster,tr as Tooltip,ar as TooltipContent,ir as TooltipProvider,nr as TooltipTrigger,F as buttonVariants,kr as useFormField,Ur as useLoader,Io as useSidebar,Gr as useTheme};
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "https://github.com/F1na/fina-react-ds"
|
|
6
6
|
},
|
|
7
7
|
"private": false,
|
|
8
|
-
"version": "1.0.
|
|
8
|
+
"version": "1.0.45",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"files": [
|
|
11
11
|
"dist"
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"require": "./dist/hooks/index.js"
|
|
28
28
|
},
|
|
29
29
|
"./themes/*.css": "./dist/themes/*.css",
|
|
30
|
+
"./ckeditor5.css": "./dist/ckeditor5.css",
|
|
30
31
|
"./package.json": "./package.json",
|
|
31
32
|
"./*": "./dist/*"
|
|
32
33
|
},
|