@parto-system-design/ui 1.0.4 → 1.1.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.cjs +1164 -1021
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +78 -347
- package/dist/index.d.cts +54 -25
- package/dist/index.d.ts +54 -25
- package/dist/index.js +1181 -1041
- package/dist/index.js.map +1 -1
- package/package.json +21 -4
- package/tailwind.config.ts +13 -297
package/dist/index.d.ts
CHANGED
|
@@ -46,24 +46,6 @@ import { BarSvgProps } from '@nivo/bar';
|
|
|
46
46
|
import { PieSvgProps } from '@nivo/pie';
|
|
47
47
|
import { HeatMapSvgProps } from '@nivo/heatmap';
|
|
48
48
|
|
|
49
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
50
|
-
/**
|
|
51
|
-
* Format number to Instagram-style short format
|
|
52
|
-
* @example formatNumber(123456, 'short') => '123K'
|
|
53
|
-
* @example formatNumber(123456, 'exact') => '123,456'
|
|
54
|
-
*/
|
|
55
|
-
declare function formatNumber(num: number | undefined, format?: 'exact' | 'short'): string;
|
|
56
|
-
/**
|
|
57
|
-
* Format date to relative time with absolute on hover (Persian)
|
|
58
|
-
* @example formatRelativeTime(new Date()) => '۲ ساعت پیش'
|
|
59
|
-
*/
|
|
60
|
-
declare function formatRelativeTime(date: Date | string | number): string;
|
|
61
|
-
/**
|
|
62
|
-
* Format date to absolute format (Persian)
|
|
63
|
-
* @example formatAbsoluteTime(new Date()) => '۱۵ دی ۱۴۰۳، ۱۵:۳۰'
|
|
64
|
-
*/
|
|
65
|
-
declare function formatAbsoluteTime(date: Date | string | number): string;
|
|
66
|
-
|
|
67
49
|
/**
|
|
68
50
|
* Persian/Farsi month names
|
|
69
51
|
*/
|
|
@@ -91,7 +73,7 @@ declare function toEnglishDigits(str: string): string;
|
|
|
91
73
|
/**
|
|
92
74
|
* Format a Date object to Persian/Jalali date string
|
|
93
75
|
*/
|
|
94
|
-
declare function formatJalaliDate(date: Date,
|
|
76
|
+
declare function formatJalaliDate(date: Date, formatStr?: string): string;
|
|
95
77
|
/**
|
|
96
78
|
* Get Persian month name from a Date object
|
|
97
79
|
*/
|
|
@@ -139,23 +121,44 @@ declare function getPersianYearsForDropdown(fromYear: number, toYear: number): A
|
|
|
139
121
|
label: string;
|
|
140
122
|
}>;
|
|
141
123
|
|
|
124
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
125
|
+
/**
|
|
126
|
+
* Format number to Instagram-style short format
|
|
127
|
+
* @example formatNumber(123456, 'short') => '123K'
|
|
128
|
+
* @example formatNumber(123456, 'exact') => '123,456'
|
|
129
|
+
*/
|
|
130
|
+
declare function formatNumber(num: number | undefined, format?: 'exact' | 'short'): string;
|
|
131
|
+
/**
|
|
132
|
+
* Format date to relative time with absolute on hover (Persian)
|
|
133
|
+
* @example formatRelativeTime(new Date()) => '۲ ساعت پیش'
|
|
134
|
+
*/
|
|
135
|
+
declare function formatRelativeTime(date: Date | string | number): string;
|
|
136
|
+
/**
|
|
137
|
+
* Format date to absolute Jalali (Persian calendar) date string.
|
|
138
|
+
* Uses moment-jalaali for accurate Gregorian → Jalali conversion.
|
|
139
|
+
* @example formatAbsoluteTime(new Date()) => '۱۵ دی ۱۴۰۳، ۱۵:۳۰'
|
|
140
|
+
*/
|
|
141
|
+
declare function formatAbsoluteTime(date: Date | string | number): string;
|
|
142
|
+
|
|
142
143
|
type Icon = LucideIcon;
|
|
143
144
|
/**
|
|
144
145
|
* Icon Collection for Parto Design System
|
|
145
146
|
*
|
|
146
147
|
* RTL Support Guidelines:
|
|
147
148
|
* ----------------------
|
|
148
|
-
* Directional icons (arrows, chevrons) should be flipped in RTL contexts when they
|
|
149
|
+
* Directional icons (arrows, chevrons) should be flipped in RTL contexts when they
|
|
150
|
+
* indicate navigation direction. Use Tailwind's built-in `rtl:` variant:
|
|
149
151
|
*
|
|
150
|
-
*
|
|
151
|
-
* -
|
|
152
|
-
* - For UI direction: <Icons.chevronRight className="rtl:rotate-180" />
|
|
152
|
+
* - <Icons.arrowRight className="rtl:rotate-180" /> ← navigation/directional
|
|
153
|
+
* - <Icons.chevronRight className="rtl:rotate-180" /> ← submenu indicators
|
|
153
154
|
*
|
|
154
155
|
* Icons that should NOT be flipped:
|
|
155
156
|
* - Non-directional icons (check, close, settings, etc.)
|
|
156
157
|
* - Icons representing real-world objects
|
|
157
158
|
*/
|
|
158
|
-
|
|
159
|
+
/** Strongly-typed list of all icon names in the Parto Design System */
|
|
160
|
+
type IconName = 'logo' | 'parto' | 'alertCircle' | 'alertTriangle' | 'arrowRight' | 'arrowLeft' | 'bold' | 'building' | 'calendar' | 'check' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'circle' | 'clock' | 'close' | 'copy' | 'download' | 'eye' | 'eyeOff' | 'file' | 'fileText' | 'gitHub' | 'heart' | 'home' | 'image' | 'images' | 'inbox' | 'info' | 'instagram' | 'italic' | 'loader' | 'menu' | 'messageCircle' | 'moon' | 'moreHorizontal' | 'moreVertical' | 'plus' | 'rocket' | 'search' | 'settings' | 'share' | 'sparkles' | 'sun' | 'trash' | 'twitter' | 'underline' | 'user' | 'users' | 'video' | 'userCheck' | 'trendingUp' | 'award' | 'crown' | 'minus' | 'imageOff' | 'externalLink' | 'gripVertical' | 'panelLeft' | 'xCircle';
|
|
161
|
+
declare const Icons: Record<IconName, React$1.FC<React$1.SVGProps<SVGSVGElement>> | LucideIcon>;
|
|
159
162
|
|
|
160
163
|
declare function Accordion({ ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
161
164
|
declare function AccordionItem({ className, ...props }: React$1.ComponentProps<typeof AccordionPrimitive.Item>): react_jsx_runtime.JSX.Element;
|
|
@@ -768,6 +771,32 @@ declare const InputVariants: (props?: ({
|
|
|
768
771
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
769
772
|
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
770
773
|
|
|
774
|
+
declare const tagInputVariants: (props?: ({
|
|
775
|
+
variant?: "default" | "secondary" | null | undefined;
|
|
776
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
777
|
+
interface TagInputProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, VariantProps<typeof tagInputVariants> {
|
|
778
|
+
value?: string[];
|
|
779
|
+
defaultValue?: string[];
|
|
780
|
+
onChange?: (value: string[]) => void;
|
|
781
|
+
placeholder?: string;
|
|
782
|
+
disabled?: boolean;
|
|
783
|
+
maxTags?: number;
|
|
784
|
+
}
|
|
785
|
+
declare const TagInput: React$1.ForwardRefExoticComponent<TagInputProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
786
|
+
|
|
787
|
+
declare const hashtagInputVariants: (props?: ({
|
|
788
|
+
variant?: "default" | "secondary" | null | undefined;
|
|
789
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
790
|
+
interface HashtagInputProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">, VariantProps<typeof hashtagInputVariants> {
|
|
791
|
+
value?: string[];
|
|
792
|
+
defaultValue?: string[];
|
|
793
|
+
onChange?: (value: string[]) => void;
|
|
794
|
+
placeholder?: string;
|
|
795
|
+
disabled?: boolean;
|
|
796
|
+
maxTags?: number;
|
|
797
|
+
}
|
|
798
|
+
declare const HashtagInput: React$1.ForwardRefExoticComponent<HashtagInputProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
799
|
+
|
|
771
800
|
interface InputGroupProps extends React$1.ComponentProps<"div"> {
|
|
772
801
|
/**
|
|
773
802
|
* Direction of the input group.
|
|
@@ -1387,4 +1416,4 @@ declare function PartoWordCloud({ words, width, height, className, minFontSize,
|
|
|
1387
1416
|
|
|
1388
1417
|
declare function useIsMobile(): boolean;
|
|
1389
1418
|
|
|
1390
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, type AspectRatioType, Autocomplete, type AutocompleteItem, type AutocompleteProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, type ButtonVariantProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommentCard, type CommentCardProps, type CommentTag, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, type DatePickerProps, DateRangePicker, DateRangePickerInline, type DateRangePickerProps, 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, EmptyDescription, EmptyIcon, EmptyTitle, EngagementRate, EngagementRateBar, type EngagementRateBarProps, type EngagementRateProps, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, type Icon, Icons, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, InputVariants, InstagramPost, type InstagramPostProps, type InstagramProfileInfo, Kbd, KbdGroup, Label, type LoadingVariantProps, type MediaItem, type MediaType, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MetricCard, MetricCardContent, MetricCardDifferential, MetricCardHeader, MetricCardLabel, MetricCardSparkline, MetricCardValue, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NumberFormat, PERSIAN_MONTHS, PERSIAN_MONTHS_SHORT, PERSIAN_WEEKDAYS, PERSIAN_WEEKDAYS_SHORT, Pagination, PaginationContent, PaginationControlled, type PaginationControlledProps, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PartoBarChart, type PartoBarChartProps, PartoHeatMap, type PartoHeatMapProps, PartoLineChart, type PartoLineChartProps, PartoPieChart, type PartoPieChartProps, PartoWordCloud, type PartoWordCloudProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PostStats, ProfileCard, type ProfileCardProps, ProfileInfo, type ProfileInfoProps, Progress, type ProgressProps, RadioCardDescription, RadioCardItem, RadioCardTitle, RadioCards, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, SONNER_DEFAULT_DURATION, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, 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, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TimeFormat, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserAutocomplete, type UserAutocompleteProps, type UserItem, type WordData, badgeVariants, buttonGroupVariants, buttonVariants, cn, formatAbsoluteTime, formatJalaliDate, formatNumber, formatPersianDateRange, formatRelativeTime, getPersianDay, getPersianMonth, getPersianMonthName, getPersianMonthNameShort, getPersianMonthsForDropdown, getPersianWeekdayName, getPersianYear, getPersianYearsForDropdown, instagramPostVariants, jalaliToGregorian, navigationMenuTriggerStyle, toEnglishDigits, toPersianDigits, toggleVariants, useFormField, useIsMobile, useSidebar };
|
|
1419
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, type AspectRatioType, Autocomplete, type AutocompleteItem, type AutocompleteProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, type ButtonVariantProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommentCard, type CommentCardProps, type CommentTag, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DatePicker, type DatePickerProps, DateRangePicker, DateRangePickerInline, type DateRangePickerProps, 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, EmptyDescription, EmptyIcon, EmptyTitle, EngagementRate, EngagementRateBar, type EngagementRateBarProps, type EngagementRateProps, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HashtagInput, type HashtagInputProps, HoverCard, HoverCardContent, HoverCardTrigger, type Icon, type IconName, Icons, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, InputVariants, InstagramPost, type InstagramPostProps, type InstagramProfileInfo, Kbd, KbdGroup, Label, type LoadingVariantProps, type MediaItem, type MediaType, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MetricCard, MetricCardContent, MetricCardDifferential, MetricCardHeader, MetricCardLabel, MetricCardSparkline, MetricCardValue, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, type NumberFormat, PERSIAN_MONTHS, PERSIAN_MONTHS_SHORT, PERSIAN_WEEKDAYS, PERSIAN_WEEKDAYS_SHORT, Pagination, PaginationContent, PaginationControlled, type PaginationControlledProps, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PartoBarChart, type PartoBarChartProps, PartoHeatMap, type PartoHeatMapProps, PartoLineChart, type PartoLineChartProps, PartoPieChart, type PartoPieChartProps, PartoWordCloud, type PartoWordCloudProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, type PostStats, ProfileCard, type ProfileCardProps, ProfileInfo, type ProfileInfoProps, Progress, type ProgressProps, RadioCardDescription, RadioCardItem, RadioCardTitle, RadioCards, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, SONNER_DEFAULT_DURATION, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, 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, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagInput, type TagInputProps, Textarea, type TimeFormat, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserAutocomplete, type UserAutocompleteProps, type UserItem, type WordData, badgeVariants, buttonGroupVariants, buttonVariants, cn, formatAbsoluteTime, formatJalaliDate, formatNumber, formatPersianDateRange, formatRelativeTime, getPersianDay, getPersianMonth, getPersianMonthName, getPersianMonthNameShort, getPersianMonthsForDropdown, getPersianWeekdayName, getPersianYear, getPersianYearsForDropdown, hashtagInputVariants, instagramPostVariants, jalaliToGregorian, navigationMenuTriggerStyle, tagInputVariants, toEnglishDigits, toPersianDigits, toggleVariants, useFormField, useIsMobile, useSidebar };
|