@godxjp/ui 0.1.1 → 0.2.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/index.d.ts +84 -4
- package/dist/index.js +391 -2
- package/dist/index.js.map +1 -1
- package/package.json +27 -2
package/dist/index.d.ts
CHANGED
|
@@ -113,7 +113,7 @@ declare function AccordionContent({ className, children, ...props }: React$1.Com
|
|
|
113
113
|
type UIColor = 'primary' | 'destructive' | 'success' | 'warning' | 'info';
|
|
114
114
|
|
|
115
115
|
declare const alertVariants: (props?: ({
|
|
116
|
-
variant?: "
|
|
116
|
+
variant?: "default" | "destructive" | "soft" | null | undefined;
|
|
117
117
|
color?: "primary" | "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
118
118
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
119
119
|
interface AlertProps extends React$1.ComponentProps<"div">, Omit<VariantProps<typeof alertVariants>, "color"> {
|
|
@@ -292,7 +292,7 @@ type AvatarFallbackProps = React$1.ComponentProps<typeof AvatarPrimitive.Fallbac
|
|
|
292
292
|
declare function AvatarFallback({ className, ...props }: AvatarFallbackProps): react_jsx_runtime.JSX.Element;
|
|
293
293
|
|
|
294
294
|
declare const badgeVariants: (props?: ({
|
|
295
|
-
variant?: "
|
|
295
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | "soft" | null | undefined;
|
|
296
296
|
color?: "primary" | "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
297
297
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
298
298
|
interface BadgeProps extends React$1.ComponentProps<"span">, Omit<VariantProps<typeof badgeVariants>, "color"> {
|
|
@@ -394,7 +394,7 @@ declare function BreadcrumbSeparator({ children, className, ...props }: React$1.
|
|
|
394
394
|
declare function BreadcrumbEllipsis({ className, ...props }: React$1.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
395
395
|
|
|
396
396
|
declare const buttonVariants: (props?: ({
|
|
397
|
-
variant?: "link" | "
|
|
397
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "soft" | "ghost" | null | undefined;
|
|
398
398
|
color?: "primary" | "destructive" | "success" | "warning" | "info" | null | undefined;
|
|
399
399
|
size?: "default" | "xs" | "sm" | "lg" | "xl" | "icon" | null | undefined;
|
|
400
400
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -1916,6 +1916,14 @@ declare function ResizableHandle({ withHandle, className, ...props }: React$1.Co
|
|
|
1916
1916
|
withHandle?: boolean;
|
|
1917
1917
|
}): react_jsx_runtime.JSX.Element;
|
|
1918
1918
|
|
|
1919
|
+
interface RichTextEditorProps {
|
|
1920
|
+
value?: string;
|
|
1921
|
+
onChange?: (html: string) => void;
|
|
1922
|
+
editable?: boolean;
|
|
1923
|
+
className?: string;
|
|
1924
|
+
}
|
|
1925
|
+
declare function RichTextEditor({ value, onChange, editable, className, }: RichTextEditorProps): react_jsx_runtime.JSX.Element;
|
|
1926
|
+
|
|
1919
1927
|
/**
|
|
1920
1928
|
* Custom scrollable container with styled scrollbar built on Radix ScrollArea.
|
|
1921
1929
|
*
|
|
@@ -2191,6 +2199,38 @@ type SliderProps = React$1.ComponentProps<typeof SliderPrimitive.Root>;
|
|
|
2191
2199
|
*/
|
|
2192
2200
|
declare function Slider({ className, defaultValue, value, min, max, ...props }: SliderProps): react_jsx_runtime.JSX.Element;
|
|
2193
2201
|
|
|
2202
|
+
interface SlugInputLabels {
|
|
2203
|
+
/** Label text above the slug input field. */
|
|
2204
|
+
slug: string;
|
|
2205
|
+
/** Helper text below the slug input. */
|
|
2206
|
+
autoGenerated: string;
|
|
2207
|
+
/** Placeholder shown inside the slug input. */
|
|
2208
|
+
placeholder: string;
|
|
2209
|
+
}
|
|
2210
|
+
interface SlugInputProps {
|
|
2211
|
+
/** Source title string from which the slug is auto-generated. */
|
|
2212
|
+
title: string;
|
|
2213
|
+
/** Current slug value. */
|
|
2214
|
+
slug: string;
|
|
2215
|
+
/** Callback fired when the slug changes (auto-generated or manually edited). */
|
|
2216
|
+
onSlugChange: (slug: string) => void;
|
|
2217
|
+
/** Whether auto-generation from title is disabled and slug is manually editable only. */
|
|
2218
|
+
disabled?: boolean;
|
|
2219
|
+
/** Override default label strings for localization. */
|
|
2220
|
+
labels?: Partial<SlugInputLabels>;
|
|
2221
|
+
/**
|
|
2222
|
+
* Single-string validation error. When set, the inner input gets
|
|
2223
|
+
* `aria-invalid` and a red error message is rendered below.
|
|
2224
|
+
*/
|
|
2225
|
+
error?: string;
|
|
2226
|
+
}
|
|
2227
|
+
/**
|
|
2228
|
+
* Generates a URL-friendly slug from a text string.
|
|
2229
|
+
* Handles Vietnamese diacritics, Japanese punctuation, and other special characters.
|
|
2230
|
+
*/
|
|
2231
|
+
declare function generateSlug(text: string): string;
|
|
2232
|
+
declare function SlugInput({ title, slug, onSlugChange, disabled, labels: labelOverrides, error, }: SlugInputProps): react_jsx_runtime.JSX.Element;
|
|
2233
|
+
|
|
2194
2234
|
/**
|
|
2195
2235
|
* Toast notification container powered by the Sonner library.
|
|
2196
2236
|
* Renders toast messages at a configurable position on screen.
|
|
@@ -2211,6 +2251,12 @@ declare const Toaster: ({ ...props }: ToasterProps) => react_jsx_runtime.JSX.Ele
|
|
|
2211
2251
|
|
|
2212
2252
|
declare function Spinner({ className, ...props }: React.ComponentProps<"svg">): react_jsx_runtime.JSX.Element;
|
|
2213
2253
|
|
|
2254
|
+
interface StatusBadgeProps {
|
|
2255
|
+
status: string;
|
|
2256
|
+
className?: string;
|
|
2257
|
+
}
|
|
2258
|
+
declare function StatusBadge({ status, className }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
|
|
2259
|
+
|
|
2214
2260
|
type SwitchProps = React$1.ComponentProps<typeof SwitchPrimitives.Root>;
|
|
2215
2261
|
/**
|
|
2216
2262
|
* Toggle switch for boolean on/off states, styled as a sliding pill.
|
|
@@ -2326,6 +2372,31 @@ declare function TabsTrigger({ className, ...props }: React$1.ComponentProps<typ
|
|
|
2326
2372
|
/** Content panel shown when its `value` matches the active tab. */
|
|
2327
2373
|
declare function TabsContent({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
2328
2374
|
|
|
2375
|
+
interface TagInputProps {
|
|
2376
|
+
/** Array of current tag strings. */
|
|
2377
|
+
value?: string[];
|
|
2378
|
+
/** Callback fired when the tags array changes. */
|
|
2379
|
+
onChange?: (tags: string[]) => void;
|
|
2380
|
+
/** Placeholder text shown when there are no tags. */
|
|
2381
|
+
placeholder?: string;
|
|
2382
|
+
/** Additional CSS class for the outer container. */
|
|
2383
|
+
className?: string;
|
|
2384
|
+
/** Whether the tag input is disabled. */
|
|
2385
|
+
disabled?: boolean;
|
|
2386
|
+
/** Maximum number of tags allowed. */
|
|
2387
|
+
maxTags?: number;
|
|
2388
|
+
/** Whether duplicate tag values are allowed. Defaults to `false`. */
|
|
2389
|
+
allowDuplicates?: boolean;
|
|
2390
|
+
/** Character or pattern used to split pasted text into tags. Defaults to `","`. */
|
|
2391
|
+
delimiter?: string | RegExp;
|
|
2392
|
+
/**
|
|
2393
|
+
* Single-string validation error. When set, the wrapper gets a destructive
|
|
2394
|
+
* border, the inner input gets `aria-invalid`, and the message renders below.
|
|
2395
|
+
*/
|
|
2396
|
+
error?: string;
|
|
2397
|
+
}
|
|
2398
|
+
declare function TagInput({ value, onChange, placeholder, className, disabled, maxTags, allowDuplicates, delimiter, error, }: TagInputProps): react_jsx_runtime.JSX.Element;
|
|
2399
|
+
|
|
2329
2400
|
type NativeTextareaProps = Omit<React$1.ComponentProps<'textarea'>, 'value' | 'onChange'>;
|
|
2330
2401
|
interface StandardTextareaProps extends NativeTextareaProps {
|
|
2331
2402
|
/** Translatable mode disabled (default). */
|
|
@@ -2548,6 +2619,15 @@ interface TranslatableFieldProps {
|
|
|
2548
2619
|
*/
|
|
2549
2620
|
declare function TranslatableField({ config, value, onChange, children, className, errors, }: TranslatableFieldProps): react_jsx_runtime.JSX.Element;
|
|
2550
2621
|
|
|
2622
|
+
interface TranslatableRichTextProps {
|
|
2623
|
+
value: TranslatableValue;
|
|
2624
|
+
onChange: (value: TranslatableValue) => void;
|
|
2625
|
+
/** Per-locale error map. Truthy string for a locale code marks it invalid. */
|
|
2626
|
+
errors?: Partial<Record<string, string>>;
|
|
2627
|
+
className?: string;
|
|
2628
|
+
}
|
|
2629
|
+
declare function TranslatableRichText({ value, onChange, errors, className, }: TranslatableRichTextProps): react_jsx_runtime.JSX.Element;
|
|
2630
|
+
|
|
2551
2631
|
interface UIProviderProps {
|
|
2552
2632
|
children: ReactNode;
|
|
2553
2633
|
/**
|
|
@@ -2647,4 +2727,4 @@ declare function useTimezone(): {
|
|
|
2647
2727
|
*/
|
|
2648
2728
|
declare function resolveTranslatableConfig(translatable: TranslatableConfig, providerLocales: UILocaleConfig | undefined): UILocaleConfig | undefined;
|
|
2649
2729
|
|
|
2650
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, type FileUploadProps, type FileUploadVariant, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FullWidthPageContainer, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, type LabelProps, type LocaleCode, type LocaleMap, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MultiCombobox, type MultiComboboxProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageContainer, type PageContainerProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, type ProgressProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, Rating, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, SplitPageContainer, StandardPageContainer, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, type Theme, TimeInput, TimePicker, Toaster, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TranslatableConfig, TranslatableField, type TranslatableRenderProps, type TranslatableValue, type UILocaleConfig, UIProvider, badgeVariants, buttonVariants, inputVariants, navigationMenuTriggerStyle, resolveTranslatableConfig, toggleVariants, useFormField, useLocale, useSidebar, useTheme, useTimezone, useUILocales };
|
|
2730
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, type FileUploadProps, type FileUploadVariant, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FullWidthPageContainer, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, type LabelProps, type LocaleCode, type LocaleMap, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MultiCombobox, type MultiComboboxProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageContainer, type PageContainerProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, type PasswordInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, type ProgressProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, Rating, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTextEditor, type RichTextEditorProps, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, type SkeletonProps, Slider, type SliderProps, SlugInput, type SlugInputLabels, type SlugInputProps, Spinner, SplitPageContainer, StandardPageContainer, StatusBadge, type StatusBadgeProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagInput, type TagInputProps, Textarea, type TextareaProps, type Theme, TimeInput, TimePicker, Toaster, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TranslatableConfig, TranslatableField, type TranslatableRenderProps, TranslatableRichText, type TranslatableRichTextProps, type TranslatableValue, type UILocaleConfig, UIProvider, badgeVariants, buttonVariants, generateSlug, inputVariants, navigationMenuTriggerStyle, resolveTranslatableConfig, toggleVariants, useFormField, useLocale, useSidebar, useTheme, useTimezone, useUILocales };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
-
import { CheckIcon, XIcon, EyeOff, Eye, ChevronDownIcon, ChevronDown, CornerDownLeft, ChevronRight, MoreHorizontal, ChevronLeftIcon, ChevronRightIcon, ArrowLeft, ArrowRight, Check, SearchIcon, X, ChevronsUpDown, CircleIcon, Calendar as Calendar$1, ImagePlus, Upload, Paperclip, Plus, MinusIcon, MoreHorizontalIcon, Star, GripVerticalIcon, ChevronUpIcon, PanelLeftIcon, Loader2Icon, Clock, FileImage, FileVideo, FileText, File } from 'lucide-react';
|
|
3
|
+
import { CheckIcon, XIcon, EyeOff, Eye, ChevronDownIcon, ChevronDown, CornerDownLeft, ChevronRight, MoreHorizontal, ChevronLeftIcon, ChevronRightIcon, ArrowLeft, ArrowRight, Check, SearchIcon, X, ChevronsUpDown, CircleIcon, Calendar as Calendar$1, ImagePlus, Upload, Paperclip, Plus, MinusIcon, MoreHorizontalIcon, Star, GripVerticalIcon, Bold, Italic, Strikethrough, Code, Heading1, Heading2, Heading3, List, ListOrdered, Quote, Undo2, Redo2, ChevronUpIcon, PanelLeftIcon, Loader2Icon, Clock, FileImage, FileVideo, FileText, File } from 'lucide-react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -32,6 +32,8 @@ import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
|
32
32
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
33
33
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
34
34
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
35
|
+
import { useEditor, EditorContent } from '@tiptap/react';
|
|
36
|
+
import StarterKit from '@tiptap/starter-kit';
|
|
35
37
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
36
38
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
37
39
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
@@ -3776,6 +3778,196 @@ function ResizableHandle({
|
|
|
3776
3778
|
}
|
|
3777
3779
|
);
|
|
3778
3780
|
}
|
|
3781
|
+
function RichTextEditor({
|
|
3782
|
+
value,
|
|
3783
|
+
onChange,
|
|
3784
|
+
editable = true,
|
|
3785
|
+
className
|
|
3786
|
+
}) {
|
|
3787
|
+
const editor = useEditor({
|
|
3788
|
+
extensions: [StarterKit],
|
|
3789
|
+
content: value ?? "",
|
|
3790
|
+
editable,
|
|
3791
|
+
immediatelyRender: false,
|
|
3792
|
+
editorProps: {
|
|
3793
|
+
attributes: {
|
|
3794
|
+
class: cn(
|
|
3795
|
+
"prose prose-sm dark:prose-invert max-w-none min-h-32 px-3 py-2",
|
|
3796
|
+
"focus:outline-none",
|
|
3797
|
+
"[&_p]:my-1 [&_h1]:mt-3 [&_h2]:mt-3 [&_h3]:mt-2"
|
|
3798
|
+
)
|
|
3799
|
+
}
|
|
3800
|
+
},
|
|
3801
|
+
onUpdate: ({ editor: editor2 }) => {
|
|
3802
|
+
onChange?.(editor2.getHTML());
|
|
3803
|
+
}
|
|
3804
|
+
});
|
|
3805
|
+
if (!editor) {
|
|
3806
|
+
return /* @__PURE__ */ jsx(
|
|
3807
|
+
"div",
|
|
3808
|
+
{
|
|
3809
|
+
"data-slot": "rich-text-editor",
|
|
3810
|
+
className: cn(
|
|
3811
|
+
"rounded-md border border-input bg-background",
|
|
3812
|
+
"h-40 animate-pulse",
|
|
3813
|
+
className
|
|
3814
|
+
)
|
|
3815
|
+
}
|
|
3816
|
+
);
|
|
3817
|
+
}
|
|
3818
|
+
return /* @__PURE__ */ jsxs(
|
|
3819
|
+
"div",
|
|
3820
|
+
{
|
|
3821
|
+
"data-slot": "rich-text-editor",
|
|
3822
|
+
className: cn(
|
|
3823
|
+
"rounded-md border border-input bg-background",
|
|
3824
|
+
"focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50",
|
|
3825
|
+
className
|
|
3826
|
+
),
|
|
3827
|
+
children: [
|
|
3828
|
+
editable ? /* @__PURE__ */ jsx(EditorToolbar, { editor }) : null,
|
|
3829
|
+
/* @__PURE__ */ jsx(EditorContent, { editor })
|
|
3830
|
+
]
|
|
3831
|
+
}
|
|
3832
|
+
);
|
|
3833
|
+
}
|
|
3834
|
+
function EditorToolbar({ editor }) {
|
|
3835
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-0.5 border-b border-border px-1.5 py-1", children: [
|
|
3836
|
+
/* @__PURE__ */ jsx(
|
|
3837
|
+
ToolbarButton,
|
|
3838
|
+
{
|
|
3839
|
+
onClick: () => editor.chain().focus().toggleBold().run(),
|
|
3840
|
+
active: editor.isActive("bold"),
|
|
3841
|
+
label: "Bold",
|
|
3842
|
+
children: /* @__PURE__ */ jsx(Bold, { className: "size-3.5" })
|
|
3843
|
+
}
|
|
3844
|
+
),
|
|
3845
|
+
/* @__PURE__ */ jsx(
|
|
3846
|
+
ToolbarButton,
|
|
3847
|
+
{
|
|
3848
|
+
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
3849
|
+
active: editor.isActive("italic"),
|
|
3850
|
+
label: "Italic",
|
|
3851
|
+
children: /* @__PURE__ */ jsx(Italic, { className: "size-3.5" })
|
|
3852
|
+
}
|
|
3853
|
+
),
|
|
3854
|
+
/* @__PURE__ */ jsx(
|
|
3855
|
+
ToolbarButton,
|
|
3856
|
+
{
|
|
3857
|
+
onClick: () => editor.chain().focus().toggleStrike().run(),
|
|
3858
|
+
active: editor.isActive("strike"),
|
|
3859
|
+
label: "Strikethrough",
|
|
3860
|
+
children: /* @__PURE__ */ jsx(Strikethrough, { className: "size-3.5" })
|
|
3861
|
+
}
|
|
3862
|
+
),
|
|
3863
|
+
/* @__PURE__ */ jsx(
|
|
3864
|
+
ToolbarButton,
|
|
3865
|
+
{
|
|
3866
|
+
onClick: () => editor.chain().focus().toggleCode().run(),
|
|
3867
|
+
active: editor.isActive("code"),
|
|
3868
|
+
label: "Inline code",
|
|
3869
|
+
children: /* @__PURE__ */ jsx(Code, { className: "size-3.5" })
|
|
3870
|
+
}
|
|
3871
|
+
),
|
|
3872
|
+
/* @__PURE__ */ jsx(Separator4, { orientation: "vertical", className: "mx-1 h-5" }),
|
|
3873
|
+
/* @__PURE__ */ jsx(
|
|
3874
|
+
ToolbarButton,
|
|
3875
|
+
{
|
|
3876
|
+
onClick: () => editor.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
3877
|
+
active: editor.isActive("heading", { level: 1 }),
|
|
3878
|
+
label: "Heading 1",
|
|
3879
|
+
children: /* @__PURE__ */ jsx(Heading1, { className: "size-3.5" })
|
|
3880
|
+
}
|
|
3881
|
+
),
|
|
3882
|
+
/* @__PURE__ */ jsx(
|
|
3883
|
+
ToolbarButton,
|
|
3884
|
+
{
|
|
3885
|
+
onClick: () => editor.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
3886
|
+
active: editor.isActive("heading", { level: 2 }),
|
|
3887
|
+
label: "Heading 2",
|
|
3888
|
+
children: /* @__PURE__ */ jsx(Heading2, { className: "size-3.5" })
|
|
3889
|
+
}
|
|
3890
|
+
),
|
|
3891
|
+
/* @__PURE__ */ jsx(
|
|
3892
|
+
ToolbarButton,
|
|
3893
|
+
{
|
|
3894
|
+
onClick: () => editor.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
3895
|
+
active: editor.isActive("heading", { level: 3 }),
|
|
3896
|
+
label: "Heading 3",
|
|
3897
|
+
children: /* @__PURE__ */ jsx(Heading3, { className: "size-3.5" })
|
|
3898
|
+
}
|
|
3899
|
+
),
|
|
3900
|
+
/* @__PURE__ */ jsx(Separator4, { orientation: "vertical", className: "mx-1 h-5" }),
|
|
3901
|
+
/* @__PURE__ */ jsx(
|
|
3902
|
+
ToolbarButton,
|
|
3903
|
+
{
|
|
3904
|
+
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
3905
|
+
active: editor.isActive("bulletList"),
|
|
3906
|
+
label: "Bullet list",
|
|
3907
|
+
children: /* @__PURE__ */ jsx(List, { className: "size-3.5" })
|
|
3908
|
+
}
|
|
3909
|
+
),
|
|
3910
|
+
/* @__PURE__ */ jsx(
|
|
3911
|
+
ToolbarButton,
|
|
3912
|
+
{
|
|
3913
|
+
onClick: () => editor.chain().focus().toggleOrderedList().run(),
|
|
3914
|
+
active: editor.isActive("orderedList"),
|
|
3915
|
+
label: "Ordered list",
|
|
3916
|
+
children: /* @__PURE__ */ jsx(ListOrdered, { className: "size-3.5" })
|
|
3917
|
+
}
|
|
3918
|
+
),
|
|
3919
|
+
/* @__PURE__ */ jsx(
|
|
3920
|
+
ToolbarButton,
|
|
3921
|
+
{
|
|
3922
|
+
onClick: () => editor.chain().focus().toggleBlockquote().run(),
|
|
3923
|
+
active: editor.isActive("blockquote"),
|
|
3924
|
+
label: "Quote",
|
|
3925
|
+
children: /* @__PURE__ */ jsx(Quote, { className: "size-3.5" })
|
|
3926
|
+
}
|
|
3927
|
+
),
|
|
3928
|
+
/* @__PURE__ */ jsx(Separator4, { orientation: "vertical", className: "mx-1 h-5" }),
|
|
3929
|
+
/* @__PURE__ */ jsx(
|
|
3930
|
+
ToolbarButton,
|
|
3931
|
+
{
|
|
3932
|
+
onClick: () => editor.chain().focus().undo().run(),
|
|
3933
|
+
disabled: !editor.can().undo(),
|
|
3934
|
+
label: "Undo",
|
|
3935
|
+
children: /* @__PURE__ */ jsx(Undo2, { className: "size-3.5" })
|
|
3936
|
+
}
|
|
3937
|
+
),
|
|
3938
|
+
/* @__PURE__ */ jsx(
|
|
3939
|
+
ToolbarButton,
|
|
3940
|
+
{
|
|
3941
|
+
onClick: () => editor.chain().focus().redo().run(),
|
|
3942
|
+
disabled: !editor.can().redo(),
|
|
3943
|
+
label: "Redo",
|
|
3944
|
+
children: /* @__PURE__ */ jsx(Redo2, { className: "size-3.5" })
|
|
3945
|
+
}
|
|
3946
|
+
)
|
|
3947
|
+
] });
|
|
3948
|
+
}
|
|
3949
|
+
function ToolbarButton({
|
|
3950
|
+
onClick,
|
|
3951
|
+
active,
|
|
3952
|
+
disabled,
|
|
3953
|
+
label,
|
|
3954
|
+
children
|
|
3955
|
+
}) {
|
|
3956
|
+
return /* @__PURE__ */ jsx(
|
|
3957
|
+
Button,
|
|
3958
|
+
{
|
|
3959
|
+
type: "button",
|
|
3960
|
+
variant: "ghost",
|
|
3961
|
+
size: "xs",
|
|
3962
|
+
"aria-label": label,
|
|
3963
|
+
"aria-pressed": active,
|
|
3964
|
+
disabled,
|
|
3965
|
+
onClick,
|
|
3966
|
+
className: cn("size-6 p-0", active && "bg-muted text-foreground"),
|
|
3967
|
+
children
|
|
3968
|
+
}
|
|
3969
|
+
);
|
|
3970
|
+
}
|
|
3779
3971
|
function ScrollArea({
|
|
3780
3972
|
className,
|
|
3781
3973
|
children,
|
|
@@ -4819,6 +5011,43 @@ function Slider({
|
|
|
4819
5011
|
}
|
|
4820
5012
|
);
|
|
4821
5013
|
}
|
|
5014
|
+
var defaultLabels = {
|
|
5015
|
+
slug: "Slug",
|
|
5016
|
+
autoGenerated: "Auto-generated from title",
|
|
5017
|
+
placeholder: "enter-slug-here"
|
|
5018
|
+
};
|
|
5019
|
+
function generateSlug(text) {
|
|
5020
|
+
return text.toLowerCase().replace(/[àáạảãâầấậẩẫăằắặẳẵ]/g, "a").replace(/[èéẹẻẽêềếệểễ]/g, "e").replace(/[ìíịỉĩ]/g, "i").replace(/[òóọỏõôồốộổỗơờớợởỡ]/g, "o").replace(/[ùúụủũưừứựửữ]/g, "u").replace(/[ỳýỵỷỹ]/g, "y").replace(/đ/g, "d").replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
5021
|
+
}
|
|
5022
|
+
function SlugInput({
|
|
5023
|
+
title,
|
|
5024
|
+
slug,
|
|
5025
|
+
onSlugChange,
|
|
5026
|
+
disabled = false,
|
|
5027
|
+
labels: labelOverrides,
|
|
5028
|
+
error
|
|
5029
|
+
}) {
|
|
5030
|
+
const labels = { ...defaultLabels, ...labelOverrides };
|
|
5031
|
+
useEffect(() => {
|
|
5032
|
+
if (!disabled && title) {
|
|
5033
|
+
onSlugChange(generateSlug(title));
|
|
5034
|
+
}
|
|
5035
|
+
}, [title, disabled, onSlugChange]);
|
|
5036
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "slug-input", children: [
|
|
5037
|
+
/* @__PURE__ */ jsx(Label3, { children: labels.slug }),
|
|
5038
|
+
/* @__PURE__ */ jsx(
|
|
5039
|
+
Input,
|
|
5040
|
+
{
|
|
5041
|
+
value: slug,
|
|
5042
|
+
onChange: (e) => onSlugChange(e.target.value),
|
|
5043
|
+
placeholder: labels.placeholder,
|
|
5044
|
+
"aria-invalid": error ? true : void 0,
|
|
5045
|
+
className: "h-element-sm mt-1 font-mono text-sm"
|
|
5046
|
+
}
|
|
5047
|
+
),
|
|
5048
|
+
error ? /* @__PURE__ */ jsx("p", { className: "text-[11px] text-red-500 mt-1", children: error }) : /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: labels.autoGenerated })
|
|
5049
|
+
] });
|
|
5050
|
+
}
|
|
4822
5051
|
var Toaster = ({ ...props }) => {
|
|
4823
5052
|
return /* @__PURE__ */ jsx(
|
|
4824
5053
|
Toaster$1,
|
|
@@ -4837,6 +5066,35 @@ var Toaster = ({ ...props }) => {
|
|
|
4837
5066
|
function Spinner({ className, ...props }) {
|
|
4838
5067
|
return /* @__PURE__ */ jsx(Loader2Icon, { role: "status", "aria-label": "Loading", className: cn("size-4 animate-spin", className), ...props });
|
|
4839
5068
|
}
|
|
5069
|
+
var statusStyles = {
|
|
5070
|
+
draft: "border-transparent bg-muted text-muted-foreground",
|
|
5071
|
+
pending: "border-transparent bg-amber-50 text-amber-700",
|
|
5072
|
+
approved: "border-transparent bg-blue-50 text-blue-700",
|
|
5073
|
+
active: "border-transparent bg-green-50 text-green-700",
|
|
5074
|
+
inactive: "border-transparent bg-muted text-muted-foreground",
|
|
5075
|
+
rejected: "border-transparent bg-red-50 text-red-700",
|
|
5076
|
+
deleted: "border-transparent bg-red-50 text-red-400 line-through",
|
|
5077
|
+
completed: "border-transparent bg-green-50 text-green-700",
|
|
5078
|
+
cancelled: "border-transparent bg-muted text-muted-foreground line-through",
|
|
5079
|
+
hidden: "border-transparent bg-amber-50 text-amber-700",
|
|
5080
|
+
visible: "border-transparent bg-green-50 text-green-700",
|
|
5081
|
+
in_progress: "border-transparent bg-blue-50 text-blue-700",
|
|
5082
|
+
in_transit: "border-transparent bg-blue-50 text-blue-700",
|
|
5083
|
+
pending_approval: "border-transparent bg-amber-50 text-amber-700"
|
|
5084
|
+
};
|
|
5085
|
+
function StatusBadge({ status, className }) {
|
|
5086
|
+
const style = statusStyles[status] ?? statusStyles.draft;
|
|
5087
|
+
const label = status.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
5088
|
+
return /* @__PURE__ */ jsx(
|
|
5089
|
+
Badge,
|
|
5090
|
+
{
|
|
5091
|
+
"data-slot": "status-badge",
|
|
5092
|
+
variant: "outline",
|
|
5093
|
+
className: `h-5 px-1.5 text-xs font-medium ${style} ${className ?? ""}`,
|
|
5094
|
+
children: label
|
|
5095
|
+
}
|
|
5096
|
+
);
|
|
5097
|
+
}
|
|
4840
5098
|
function Switch({
|
|
4841
5099
|
className,
|
|
4842
5100
|
...props
|
|
@@ -5022,6 +5280,107 @@ function TabsContent({
|
|
|
5022
5280
|
}
|
|
5023
5281
|
);
|
|
5024
5282
|
}
|
|
5283
|
+
function TagInput({
|
|
5284
|
+
value = [],
|
|
5285
|
+
onChange,
|
|
5286
|
+
placeholder = "Type and press Enter...",
|
|
5287
|
+
className,
|
|
5288
|
+
disabled,
|
|
5289
|
+
maxTags,
|
|
5290
|
+
allowDuplicates = false,
|
|
5291
|
+
delimiter = ",",
|
|
5292
|
+
error
|
|
5293
|
+
}) {
|
|
5294
|
+
const [inputValue, setInputValue] = React2.useState("");
|
|
5295
|
+
const inputRef = React2.useRef(null);
|
|
5296
|
+
const handleInputChange = (e) => {
|
|
5297
|
+
setInputValue(e.target.value);
|
|
5298
|
+
};
|
|
5299
|
+
const addTag = (tag) => {
|
|
5300
|
+
const trimmedTag = tag.trim();
|
|
5301
|
+
if (!trimmedTag) return;
|
|
5302
|
+
if (maxTags && value.length >= maxTags) return;
|
|
5303
|
+
if (!allowDuplicates && value.includes(trimmedTag)) return;
|
|
5304
|
+
onChange?.([...value, trimmedTag]);
|
|
5305
|
+
setInputValue("");
|
|
5306
|
+
};
|
|
5307
|
+
const handleKeyDown = (e) => {
|
|
5308
|
+
if (e.key === "Enter" || e.key === delimiter) {
|
|
5309
|
+
e.preventDefault();
|
|
5310
|
+
addTag(inputValue);
|
|
5311
|
+
} else if (e.key === "Backspace" && !inputValue && value.length > 0) {
|
|
5312
|
+
onChange?.(value.slice(0, -1));
|
|
5313
|
+
}
|
|
5314
|
+
};
|
|
5315
|
+
const handlePaste = (e) => {
|
|
5316
|
+
e.preventDefault();
|
|
5317
|
+
const pastedText = e.clipboardData.getData("text");
|
|
5318
|
+
const tags = pastedText.split(delimiter).map((tag) => tag.trim()).filter(Boolean);
|
|
5319
|
+
const newTags = allowDuplicates ? tags : tags.filter((tag) => !value.includes(tag));
|
|
5320
|
+
const tagsToAdd = maxTags ? newTags.slice(0, maxTags - value.length) : newTags;
|
|
5321
|
+
onChange?.([...value, ...tagsToAdd]);
|
|
5322
|
+
setInputValue("");
|
|
5323
|
+
};
|
|
5324
|
+
const removeTag = (index) => {
|
|
5325
|
+
onChange?.(value.filter((_, i) => i !== index));
|
|
5326
|
+
};
|
|
5327
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "tag-input-wrapper", children: [
|
|
5328
|
+
/* @__PURE__ */ jsxs(
|
|
5329
|
+
"div",
|
|
5330
|
+
{
|
|
5331
|
+
"data-slot": "tag-input",
|
|
5332
|
+
className: cn(
|
|
5333
|
+
"flex flex-wrap gap-2 p-2 border rounded-lg bg-background min-h-[42px] cursor-text",
|
|
5334
|
+
disabled && "opacity-50 cursor-not-allowed bg-muted",
|
|
5335
|
+
error && "border-destructive ring-2 ring-destructive/20",
|
|
5336
|
+
className
|
|
5337
|
+
),
|
|
5338
|
+
onClick: () => !disabled && inputRef.current?.focus(),
|
|
5339
|
+
children: [
|
|
5340
|
+
value.map((tag, index) => /* @__PURE__ */ jsxs(
|
|
5341
|
+
Badge,
|
|
5342
|
+
{
|
|
5343
|
+
variant: "secondary",
|
|
5344
|
+
className: "gap-1 pl-2 pr-1 py-1 h-auto",
|
|
5345
|
+
children: [
|
|
5346
|
+
/* @__PURE__ */ jsx("span", { children: tag }),
|
|
5347
|
+
!disabled && /* @__PURE__ */ jsx(
|
|
5348
|
+
"button",
|
|
5349
|
+
{
|
|
5350
|
+
type: "button",
|
|
5351
|
+
onClick: (e) => {
|
|
5352
|
+
e.stopPropagation();
|
|
5353
|
+
removeTag(index);
|
|
5354
|
+
},
|
|
5355
|
+
className: "rounded-full hover:bg-muted-foreground/30 p-0.5 transition-colors",
|
|
5356
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
|
|
5357
|
+
}
|
|
5358
|
+
)
|
|
5359
|
+
]
|
|
5360
|
+
},
|
|
5361
|
+
index
|
|
5362
|
+
)),
|
|
5363
|
+
/* @__PURE__ */ jsx(
|
|
5364
|
+
"input",
|
|
5365
|
+
{
|
|
5366
|
+
ref: inputRef,
|
|
5367
|
+
type: "text",
|
|
5368
|
+
value: inputValue,
|
|
5369
|
+
onChange: handleInputChange,
|
|
5370
|
+
onKeyDown: handleKeyDown,
|
|
5371
|
+
onPaste: handlePaste,
|
|
5372
|
+
disabled: disabled || (maxTags ? value.length >= maxTags : false),
|
|
5373
|
+
placeholder: value.length === 0 ? placeholder : "",
|
|
5374
|
+
"aria-invalid": error ? true : void 0,
|
|
5375
|
+
className: "flex-1 outline-none bg-transparent min-w-[120px] text-sm disabled:cursor-not-allowed"
|
|
5376
|
+
}
|
|
5377
|
+
)
|
|
5378
|
+
]
|
|
5379
|
+
}
|
|
5380
|
+
),
|
|
5381
|
+
error ? /* @__PURE__ */ jsx("p", { className: "text-[11px] text-red-500 mt-1", children: error }) : null
|
|
5382
|
+
] });
|
|
5383
|
+
}
|
|
5025
5384
|
var textareaClass = "resize-none 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 dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-input-background px-3 py-2 text-base transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm";
|
|
5026
5385
|
var Textarea = React2.forwardRef(
|
|
5027
5386
|
(props, ref) => {
|
|
@@ -5288,6 +5647,36 @@ function ToggleGroupItem({
|
|
|
5288
5647
|
}
|
|
5289
5648
|
);
|
|
5290
5649
|
}
|
|
5650
|
+
function TranslatableRichText({
|
|
5651
|
+
value,
|
|
5652
|
+
onChange,
|
|
5653
|
+
errors,
|
|
5654
|
+
className
|
|
5655
|
+
}) {
|
|
5656
|
+
const config = useUILocales();
|
|
5657
|
+
if (!config) {
|
|
5658
|
+
const firstKey = Object.keys(value)[0] ?? "";
|
|
5659
|
+
return /* @__PURE__ */ jsx(
|
|
5660
|
+
RichTextEditor,
|
|
5661
|
+
{
|
|
5662
|
+
value: value[firstKey] ?? "",
|
|
5663
|
+
onChange: (html) => onChange({ ...value, [firstKey]: html }),
|
|
5664
|
+
className
|
|
5665
|
+
}
|
|
5666
|
+
);
|
|
5667
|
+
}
|
|
5668
|
+
return /* @__PURE__ */ jsx(
|
|
5669
|
+
TranslatableField,
|
|
5670
|
+
{
|
|
5671
|
+
config,
|
|
5672
|
+
value,
|
|
5673
|
+
onChange,
|
|
5674
|
+
errors,
|
|
5675
|
+
className,
|
|
5676
|
+
children: ({ value: localeValue, onChange: localeChange }) => /* @__PURE__ */ jsx(RichTextEditor, { value: localeValue, onChange: localeChange })
|
|
5677
|
+
}
|
|
5678
|
+
);
|
|
5679
|
+
}
|
|
5291
5680
|
function loadSavedTheme() {
|
|
5292
5681
|
if (typeof window === "undefined") return "system";
|
|
5293
5682
|
const saved = localStorage.getItem("omnify_theme");
|
|
@@ -5366,6 +5755,6 @@ function UIProvider({
|
|
|
5366
5755
|
return /* @__PURE__ */ jsx(UIContext.Provider, { value: { theme, setTheme, locale, currentLocale, setLocale, dateFnsLocale, timezone, setTimezone }, children });
|
|
5367
5756
|
}
|
|
5368
5757
|
|
|
5369
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FullWidthPageContainer, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label3 as Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MultiCombobox, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageContainer, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup4 as RadioGroup, RadioGroupItem, Rating, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator4 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, SplitPageContainer, StandardPageContainer, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, TimeInput, TimePicker, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TranslatableField, UIProvider, badgeVariants, buttonVariants, inputVariants, navigationMenuTriggerStyle, resolveTranslatableConfig, toggleVariants, useFormField, useLocale, useSidebar, useTheme, useTimezone, useUILocales };
|
|
5758
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FullWidthPageContainer, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Label3 as Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MultiCombobox, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageContainer, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup4 as RadioGroup, RadioGroupItem, Rating, ResizableHandle, ResizablePanel, ResizablePanelGroup, RichTextEditor, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator4 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, SlugInput, Spinner, SplitPageContainer, StandardPageContainer, StatusBadge, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagInput, Textarea, TimeInput, TimePicker, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TranslatableField, TranslatableRichText, UIProvider, badgeVariants, buttonVariants, generateSlug, inputVariants, navigationMenuTriggerStyle, resolveTranslatableConfig, toggleVariants, useFormField, useLocale, useSidebar, useTheme, useTimezone, useUILocales };
|
|
5370
5759
|
//# sourceMappingURL=index.js.map
|
|
5371
5760
|
//# sourceMappingURL=index.js.map
|