@mesob/ui 0.2.4 → 0.2.5
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/components.d.ts +123 -3
- package/dist/components.js +1795 -365
- package/dist/components.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/locale.d.ts +37 -0
- package/dist/lib/locale.js +55 -0
- package/dist/lib/locale.js.map +1 -0
- package/package.json +21 -1
package/dist/components.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import { ReactNode, ComponentType } from 'react';
|
|
4
4
|
export { u as useEntityPagination, a as useEntityParams } from './use-entity-params-nqD69tdX.js';
|
|
5
|
+
import * as react_hook_form from 'react-hook-form';
|
|
6
|
+
import { Control, UseFormRegister, ControllerRenderProps, FieldError as FieldError$1, FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
7
|
+
import { Locale } from './lib/locale.js';
|
|
8
|
+
import { Editor } from '@tiptap/react';
|
|
5
9
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
6
10
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
7
11
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -21,8 +25,6 @@ import { ColumnDef, SortingState, ColumnFiltersState, VisibilityState, Column, T
|
|
|
21
25
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
22
26
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
23
27
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
24
|
-
import * as react_hook_form from 'react-hook-form';
|
|
25
|
-
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
26
28
|
import { Slot } from '@radix-ui/react-slot';
|
|
27
29
|
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
28
30
|
import { OTPInput } from 'input-otp';
|
|
@@ -43,7 +45,9 @@ import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
|
43
45
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
44
46
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
45
47
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
48
|
+
import * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';
|
|
46
49
|
import 'nuqs';
|
|
50
|
+
import 'zod';
|
|
47
51
|
|
|
48
52
|
type BreadcrumbItemData = {
|
|
49
53
|
label: string;
|
|
@@ -344,6 +348,57 @@ type ShellProps = {
|
|
|
344
348
|
};
|
|
345
349
|
declare function Shell({ sidebar, headerActions, children, showToaster, contentClassName, }: ShellProps): react_jsx_runtime.JSX.Element;
|
|
346
350
|
|
|
351
|
+
type LocaleInputRichTextProps = {
|
|
352
|
+
label?: string;
|
|
353
|
+
required?: boolean;
|
|
354
|
+
field: string;
|
|
355
|
+
control: Control<any>;
|
|
356
|
+
errors?: Record<string, unknown>;
|
|
357
|
+
className?: string;
|
|
358
|
+
enabledControllers?: string[];
|
|
359
|
+
placeholder?: string;
|
|
360
|
+
mode?: 'small' | 'large';
|
|
361
|
+
};
|
|
362
|
+
declare function LocaleInputRichText({ label, required, field, control, errors, className, enabledControllers, placeholder, mode, }: LocaleInputRichTextProps): react_jsx_runtime.JSX.Element;
|
|
363
|
+
|
|
364
|
+
type LocaleInputTextProps = {
|
|
365
|
+
label?: string;
|
|
366
|
+
required?: boolean;
|
|
367
|
+
field: string;
|
|
368
|
+
register: UseFormRegister<any>;
|
|
369
|
+
errors?: Record<string, unknown>;
|
|
370
|
+
placeholder?: string;
|
|
371
|
+
className?: string;
|
|
372
|
+
disabled?: boolean;
|
|
373
|
+
};
|
|
374
|
+
declare function LocaleInputText({ label, required, field, register, errors, placeholder, className, disabled, }: LocaleInputTextProps): react_jsx_runtime.JSX.Element;
|
|
375
|
+
|
|
376
|
+
type LocaleInputTextareaProps = {
|
|
377
|
+
label?: string;
|
|
378
|
+
required?: boolean;
|
|
379
|
+
field: string;
|
|
380
|
+
register: UseFormRegister<any>;
|
|
381
|
+
errors?: Record<string, unknown>;
|
|
382
|
+
placeholder?: string;
|
|
383
|
+
className?: string;
|
|
384
|
+
disabled?: boolean;
|
|
385
|
+
rows?: number;
|
|
386
|
+
};
|
|
387
|
+
declare function LocaleInputTextarea({ label, required, field, register, errors, placeholder, className, disabled, rows, }: LocaleInputTextareaProps): react_jsx_runtime.JSX.Element;
|
|
388
|
+
|
|
389
|
+
type LocaleRichTextProps = {
|
|
390
|
+
text?: Locale;
|
|
391
|
+
defaultLocale?: string;
|
|
392
|
+
className?: string;
|
|
393
|
+
};
|
|
394
|
+
declare function LocaleRichText({ text, defaultLocale, className, }: LocaleRichTextProps): react_jsx_runtime.JSX.Element | null;
|
|
395
|
+
|
|
396
|
+
type LocaleTextProps = {
|
|
397
|
+
text?: Locale;
|
|
398
|
+
defaultLocale?: string;
|
|
399
|
+
};
|
|
400
|
+
declare function LocaleText({ text, defaultLocale }: LocaleTextProps): react_jsx_runtime.JSX.Element | null;
|
|
401
|
+
|
|
347
402
|
type MesobLogoProps = {
|
|
348
403
|
width?: number;
|
|
349
404
|
height?: number;
|
|
@@ -359,6 +414,50 @@ type PoweredByProps = {
|
|
|
359
414
|
};
|
|
360
415
|
declare function PoweredBy({ className }: PoweredByProps): react_jsx_runtime.JSX.Element;
|
|
361
416
|
|
|
417
|
+
type RichTextDisplayProps = {
|
|
418
|
+
content: string | {
|
|
419
|
+
[key: string]: string;
|
|
420
|
+
};
|
|
421
|
+
className?: string;
|
|
422
|
+
};
|
|
423
|
+
declare function RichTextDisplay({ content, className }: RichTextDisplayProps): react_jsx_runtime.JSX.Element | null;
|
|
424
|
+
|
|
425
|
+
type RichTextEditorContextValue = {
|
|
426
|
+
editor: Editor | null;
|
|
427
|
+
};
|
|
428
|
+
declare const useRichTextEditorContext: () => RichTextEditorContextValue;
|
|
429
|
+
type RichTextEditorProps = {
|
|
430
|
+
editor: Editor | null;
|
|
431
|
+
children: React$1.ReactNode;
|
|
432
|
+
className?: string;
|
|
433
|
+
};
|
|
434
|
+
declare function RichTextEditor({ editor, children, className, }: RichTextEditorProps): react_jsx_runtime.JSX.Element;
|
|
435
|
+
type RichTextEditorToolbarProps = React$1.ComponentProps<'div'> & {
|
|
436
|
+
sticky?: boolean;
|
|
437
|
+
stickyOffset?: number;
|
|
438
|
+
};
|
|
439
|
+
declare function RichTextEditorToolbar({ children, className, sticky, stickyOffset, ...props }: RichTextEditorToolbarProps): react_jsx_runtime.JSX.Element;
|
|
440
|
+
declare function RichTextEditorContent({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
441
|
+
type RichTextEditorControlsGroupProps = React$1.ComponentProps<'div'>;
|
|
442
|
+
declare function RichTextEditorControlsGroup({ children, className, ...props }: RichTextEditorControlsGroupProps): react_jsx_runtime.JSX.Element;
|
|
443
|
+
type RichTextEditorControlProps = React$1.ComponentProps<'button'> & {
|
|
444
|
+
active?: boolean;
|
|
445
|
+
};
|
|
446
|
+
declare function RichTextEditorControl({ children, className, active, disabled, ...props }: RichTextEditorControlProps): react_jsx_runtime.JSX.Element;
|
|
447
|
+
|
|
448
|
+
type RichTextInputProps = {
|
|
449
|
+
field: ControllerRenderProps<any, any>;
|
|
450
|
+
label?: React$1.ReactNode;
|
|
451
|
+
error?: FieldError$1;
|
|
452
|
+
className?: string;
|
|
453
|
+
withAsterisk?: boolean;
|
|
454
|
+
enabledControllers?: string[];
|
|
455
|
+
mode?: 'small' | 'large';
|
|
456
|
+
withOnUpdate?: boolean;
|
|
457
|
+
placeholder?: string;
|
|
458
|
+
};
|
|
459
|
+
declare function RichTextInput({ field, label, error, className, withAsterisk, enabledControllers, mode, withOnUpdate, placeholder, }: RichTextInputProps): react_jsx_runtime.JSX.Element;
|
|
460
|
+
|
|
362
461
|
type SpotlightItem = {
|
|
363
462
|
id: string;
|
|
364
463
|
title: string;
|
|
@@ -812,6 +911,25 @@ declare function MenubarSubTrigger({ className, inset, children, ...props }: Rea
|
|
|
812
911
|
}): react_jsx_runtime.JSX.Element;
|
|
813
912
|
declare function MenubarSubContent({ className, ...props }: React$1.ComponentProps<typeof MenubarPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
814
913
|
|
|
914
|
+
type CurrencyOption = {
|
|
915
|
+
label: string;
|
|
916
|
+
value: string;
|
|
917
|
+
symbol?: string;
|
|
918
|
+
};
|
|
919
|
+
type MoneyInputProps = {
|
|
920
|
+
value?: number;
|
|
921
|
+
currency?: string;
|
|
922
|
+
onValueChange?: (value: number, currency: string) => void;
|
|
923
|
+
currencies?: CurrencyOption[];
|
|
924
|
+
fractionDigits?: number;
|
|
925
|
+
disabled?: boolean;
|
|
926
|
+
placeholder?: string;
|
|
927
|
+
className?: string;
|
|
928
|
+
size?: 'sm' | 'md' | 'lg';
|
|
929
|
+
id?: string;
|
|
930
|
+
};
|
|
931
|
+
declare const MoneyInput: React$1.ForwardRefExoticComponent<MoneyInputProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
932
|
+
|
|
815
933
|
declare function NavigationMenu({ className, children, viewport, ...props }: React$1.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
816
934
|
viewport?: boolean;
|
|
817
935
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -989,4 +1107,6 @@ declare function ToggleGroup({ className, variant, size, spacing, children, ...p
|
|
|
989
1107
|
}): react_jsx_runtime.JSX.Element;
|
|
990
1108
|
declare function ToggleGroupItem({ className, children, variant, size, ...props }: React$1.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
|
|
991
1109
|
|
|
992
|
-
|
|
1110
|
+
declare function VisuallyHidden({ ...props }: React$1.ComponentProps<typeof VisuallyHiddenPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
1111
|
+
|
|
1112
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, type AnimatedTabItem, AnimatedTabs, AppBreadcrumbs, AppHeaderActions, AppSidebar, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbContext, type BreadcrumbContextValue, BreadcrumbEllipsis, BreadcrumbItem, type BreadcrumbItemData, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbProvider, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CurrencyOption, DataTable, DataTableAction, DataTableColumnHeader, DataTablePagination, DataTableViewOptions, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, EntityBulkActions, EntityDetailHeader, EntityDrawer, EntityDrawerTrigger, EntityEmptyState, EntityFilter, EntityFormActions, EntityHeader, EntityLoadingState, EntitySearch, EntitySort, EntityViewToggle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, LocaleInputRichText, type LocaleInputRichTextProps, LocaleInputText, type LocaleInputTextProps, LocaleInputTextarea, type LocaleInputTextareaProps, LocaleRichText, type LocaleRichTextProps, LocaleText, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MesobLogo, MoneyInput, type MoneyInputProps, type NavItem, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageBody, PageContainer, PageGoBack, PageSection, PageSubTitle, PageTitle, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PoweredBy, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTextDisplay, RichTextEditor, RichTextEditorContent, RichTextEditorControl, RichTextEditorControlsGroup, RichTextEditorToolbar, RichTextInput, ScrollArea, ScrollBar, Section, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Shell, Sidebar, SidebarContent, SidebarContext, type SidebarContextProps, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, SpotlightSearch, Switch, type TabItem, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VisuallyHidden, badgeVariants, buttonGroupVariants, buttonVariants, navigationMenuTriggerStyle, toggleVariants, useBreadcrumbs, useFormField, useRichTextEditorContext, useSidebar };
|