noorui-rtl 0.9.0 → 0.11.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/CHANGELOG.md CHANGED
@@ -5,13 +5,39 @@ All notable changes to Noor UI will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.10.0] - 2026-03-14
9
+
10
+ ### Added
11
+ - **Carousel component**: Direction-aware swipeable content carousel using `react-swipeable` + `framer-motion`. Generic `<T>` typing with `renderItem` pattern for content-agnostic slides. Features: auto-play with pause on hover/focus, arrow and dot navigation, swipe gestures (touch + mouse), keyboard navigation (ArrowLeft/Right, Home, End — all RTL-aware), looping toggle, `dotSize` prop (`'sm'` | `'lg'`) for WCAG 2.5.8 touch target compliance. Accessible with `role="region"`, `aria-roledescription="carousel"`, `aria-live="polite"` announcements, `role="tab"` dot indicators, `prefers-reduced-motion` support, and Eastern Arabic numerals in RTL mode.
12
+ - **Timeline component**: Vertical event timeline with connecting lines, status-based styling (complete/current/upcoming), custom icons, date labels, and alternating layout. Supports compact mode for sidebar use, card wrapping for changelogs, and full RTL support via CSS logical properties. Accessible with `role="list"`, unique `aria-label`, and sr-only status text.
13
+ - **Chart component**: Unified charting component with line, bar, area, and donut variants. Built on Chart.js for proper canvas rendering. Fully RTL-aware with automatic axis flipping, Arabic-Indic numeral formatting, and theme-aware colors. Includes configurable `strokeWidth`, `fontSize`, `thickness` (donut), and `direction` override prop. Accessible with visually hidden data tables, `role="img"` figure wrappers, locale-aware sr-only summaries, multi-series dash patterns (WCAG 1.4.1), and `prefers-reduced-motion` support.
14
+
15
+ ### Changed
16
+ - **DataTable i18n overhaul (BREAKING)**: Removed language-specific props (`headerAr`, `searchPlaceholderAr`, `emptyMessageAr`) in favor of a language-agnostic API. Consumers now pass a single localized string per prop (e.g., `header`, `searchPlaceholder`, `emptyMessage`) resolved from their own i18n system. This makes the component usable with any language, not just English and Arabic.
17
+ - **DataTable removed English defaults**: `searchPlaceholder`, `emptyMessage`, `nextLabel`, `previousLabel`, `pageLabel` no longer fall back to hardcoded English strings. Pass explicit values for all UI text.
18
+
19
+ ### Added
20
+ - **DataTable `clearSearchLabel` prop**: Accessible label for the clear search button (`<span className="sr-only">`). Required for screen reader accessibility when search is enabled.
21
+ - **DataTable pagination a11y**: Added `aria-live="polite" aria-atomic="true"` to the pagination label so page changes are announced to screen readers.
22
+
8
23
  ## [0.9.0] - 2026-03-07
9
24
 
10
25
  ### Added
11
26
  - **Form auto-id pairing**: `FormField` generates a unique id via `React.useId()` and provides it through shared context. `FormLabel` auto-reads `htmlFor` and `Input`, `Textarea`, `SelectTrigger`, `Checkbox`, `Switch` auto-read `id` — no manual id/htmlFor needed inside FormField
12
27
  - **New file `lib/form-field-context.ts`**: Shared `FormFieldIdContext` consumed by form and input components
28
+ - **Calendar Arabic numerals**: Eastern Arabic numerals (٧، ٨، ٩) for day numbers, Hijri dates, event legend, and header year when `locale="ar"`
29
+ - **Calendar Hijri-primary mode**: When `locale="ar"` + `showHijri`, Hijri month/year becomes the primary heading with Arabic month names (رمضان، شعبان، etc.) and Gregorian as subtitle
30
+ - **Calendar Arabic Hijri month names**: Full Arabic names for all 12 Hijri months
31
+ - **Calendar weekday abbreviations**: Single-character weekday headers with `<abbr>` + `aria-label` for accessibility
32
+ - **Calendar container query header**: Responsive layout using `@container` — stacks at narrow widths, inline at ≥20rem
33
+ - **Calendar a11y**: `aria-labelledby` on root, `aria-label` on prev/next buttons, `role="columnheader"` on weekday headers
13
34
 
14
35
  ### Changed
36
+ - **Calendar today indicator**: Dims to subtle gray ring when another date is selected, preventing visual competition with the selection
37
+ - **Calendar selected hover**: Uses `bg-primary/90` instead of `hover:bg-muted` for a cohesive hover state on selected dates
38
+ - **Calendar Hijri selected color**: Hijri sub-number uses `text-primary-foreground/70` when the day is selected
39
+ - **Calendar UI text**: Now follows the `locale` prop for button labels (Today, aria-labels) instead of the global direction provider locale
40
+ - **Calendar day cell height**: `h-9` (non-Hijri) / `h-14` (Hijri) for better balance across widths
15
41
  - **Cursor UX overhaul**: Added `cursor-pointer` to all interactive elements (Button, Label, Accordion trigger, Tabs trigger, Calendar days, Command items, Context/Dropdown menu items, Dialog/Sheet close, Collapsible trigger, Toast actions, Radio group, Rich text editor toolbar, Slider thumb). Changed `disabled:pointer-events-none` to `disabled:cursor-not-allowed` so disabled elements show the correct cursor instead of swallowing clicks silently
16
42
  - **RadioGroup touch target**: Expanded hit area with `after:absolute after:-inset-[4px]` pseudo-element
17
43
  - **Slider thumb spacing**: Added `py-2` to Slider root for thumb breathing room
package/README.md CHANGED
@@ -15,7 +15,7 @@ Beautiful RTL-first React components for bilingual applications. Built with Radi
15
15
  ## ✨ Features
16
16
 
17
17
  - 🌍 **RTL-First**: Perfect Arabic/Persian support with logical properties
18
- - 🎨 **74+ Components**: Complete UI toolkit for modern applications
18
+ - 🎨 **77+ Components**: Complete UI toolkit for modern applications
19
19
  - ♿ **Accessible**: WCAG AA compliant with full keyboard navigation
20
20
  - 🎯 **TypeScript**: Full type safety and IntelliSense support
21
21
  - 🎭 **Themeable**: Light/dark mode with customizable design tokens
@@ -247,7 +247,7 @@ export default function App() {
247
247
 
248
248
  ## 📚 Components
249
249
 
250
- ### Core UI (69 components)
250
+ ### Core UI (71 components)
251
251
 
252
252
  **Forms**: Button, Input, Label, Textarea, Checkbox, Radio, Select, Switch, Slider, Form
253
253
 
@@ -259,9 +259,9 @@ export default function App() {
259
259
 
260
260
  **Overlays**: Dialog, Sheet, Popover, Tooltip, Dropdown Menu, Context Menu
261
261
 
262
- **Data**: Table, DataTable, Stats Card, Feature Card, Empty State, Listing Card
262
+ **Data**: Table, DataTable, Chart, Stats Card, Feature Card, Empty State, Listing Card
263
263
 
264
- **Advanced**: File Upload, Rich Text Editor, Date Picker, Time Picker, Number Input, Dashboard Shell, User Menu, Notification Center, Stepper
264
+ **Advanced**: File Upload, Rich Text Editor, Date Picker, Time Picker, Number Input, Dashboard Shell, User Menu, Notification Center, Stepper, Timeline
265
265
 
266
266
  ### GCC-Specific (5 components)
267
267
 
@@ -422,8 +422,8 @@ Full documentation, examples, and guides available at **[noorui.com](https://noo
422
422
  - [Components](https://noorui.com/components)
423
423
  - [Storybook](https://storybook.noorui.com) - **Interactive component playground with 749 stories**
424
424
  - [RTL Guide](https://noorui.com/rtl-guide)
425
+ - [Utilities & Hooks](https://noorui.com/utilities)
425
426
  - [Examples](https://noorui.com/examples)
426
- - [Starters](https://noorui.com/starters)
427
427
  - [Design Tokens](https://noorui.com/tokens)
428
428
 
429
429
  ## 🤝 Contributing
package/dist/index.d.mts CHANGED
@@ -92,7 +92,7 @@ declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimi
92
92
  declare const badgeVariants: (props?: ({
93
93
  variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
94
94
  } & class_variance_authority_types.ClassProp) | undefined) => string;
95
- interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
95
+ interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
96
96
  /**
97
97
  * ARIA role for the badge. Use "status" for status indicators
98
98
  * that should be announced by screen readers.
@@ -260,6 +260,8 @@ interface CalendarProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'on
260
260
  getHijriDate?: (date: Date) => {
261
261
  hijri: string;
262
262
  hijriDay: string;
263
+ hijriMonthIndex?: number;
264
+ hijriYear?: number;
263
265
  };
264
266
  }
265
267
  declare const Calendar: React$1.ForwardRefExoticComponent<CalendarProps & React$1.RefAttributes<HTMLDivElement>>;
@@ -305,6 +307,30 @@ declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAtt
305
307
  declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
306
308
  declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
307
309
 
310
+ interface CarouselProps<T = unknown> {
311
+ /** Array of items to display */
312
+ items: T[];
313
+ /** Render function for each item */
314
+ renderItem: (item: T, index: number) => React$1.ReactNode;
315
+ /** Auto-advance slides (milliseconds between slides, or false to disable) */
316
+ autoPlay?: number | false;
317
+ /** Show dot indicators below the carousel */
318
+ showDots?: boolean;
319
+ /** Show left/right arrow buttons */
320
+ showArrows?: boolean;
321
+ /** Loop back to first item after last */
322
+ loop?: boolean;
323
+ /** Accessible label for the carousel region */
324
+ 'aria-label'?: string;
325
+ /** Additional class name for the outer container */
326
+ className?: string;
327
+ /** Additional class name for the slide area */
328
+ slideClassName?: string;
329
+ /** Dot indicator size — 'sm' (default) for subtle dots, 'lg' for touch-friendly 24px targets */
330
+ dotSize?: 'sm' | 'lg';
331
+ }
332
+ declare function Carousel<T>({ items, renderItem, autoPlay, showDots, showArrows, loop, 'aria-label': ariaLabel, className, slideClassName, dotSize, }: CarouselProps<T>): React$1.JSX.Element | null;
333
+
308
334
  declare const chatMessageVariants: (props?: ({
309
335
  role?: "user" | "assistant" | "system" | null | undefined;
310
336
  variant?: "default" | "compact" | null | undefined;
@@ -357,7 +383,7 @@ declare const ChatMessage: React$1.ForwardRefExoticComponent<ChatMessageProps &
357
383
  declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
358
384
 
359
385
  declare const Collapsible: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React$1.RefAttributes<HTMLDivElement>>;
360
- declare const CollapsibleTrigger: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
386
+ declare const CollapsibleTrigger: React$1.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
361
387
  declare const CollapsibleContent: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & React$1.RefAttributes<HTMLDivElement>>;
362
388
 
363
389
  declare const Command: React$1.ForwardRefExoticComponent<Omit<{
@@ -658,7 +684,6 @@ type SortDirection = 'asc' | 'desc' | null;
658
684
  interface ColumnDef<T> {
659
685
  id: string;
660
686
  header: string;
661
- headerAr?: string;
662
687
  accessorKey: keyof T;
663
688
  cell?: (row: T) => React$1.ReactNode;
664
689
  sortable?: boolean;
@@ -681,10 +706,11 @@ interface DataTableProps<T> {
681
706
  defaultSortDirection?: SortDirection;
682
707
  searchable?: boolean;
683
708
  searchPlaceholder?: string;
684
- searchPlaceholderAr?: string;
685
709
  searchValue?: string;
686
710
  onSearchChange?: (value: string) => void;
687
711
  filterBy?: (keyof T)[];
712
+ /** Accessible label for the clear search button (e.g., "Clear search" / "مسح البحث") */
713
+ clearSearchLabel?: string;
688
714
  pagination?: boolean;
689
715
  currentPage?: number;
690
716
  totalPages?: number;
@@ -697,13 +723,12 @@ interface DataTableProps<T> {
697
723
  /** Show sort buttons on mobile cards */
698
724
  mobileSorting?: boolean;
699
725
  emptyMessage?: string;
700
- emptyMessageAr?: string;
701
726
  className?: string;
702
727
  striped?: boolean;
703
728
  hoverable?: boolean;
704
729
  compact?: boolean;
705
730
  }
706
- declare function DataTable<T>({ data, columns, isLoading, sortBy: externalSortBy, sortDirection: externalSortDirection, onSort: externalOnSort, enableSorting, defaultSortBy, defaultSortDirection, searchable, searchPlaceholder, searchPlaceholderAr, searchValue, onSearchChange, pagination, currentPage, totalPages, pageSize, onPageChange, nextLabel, previousLabel, pageLabel, mobileView, mobileSorting, emptyMessage, emptyMessageAr, className, striped, hoverable, compact, }: DataTableProps<T>): React$1.JSX.Element;
731
+ declare function DataTable<T>({ data, columns, isLoading, sortBy: externalSortBy, sortDirection: externalSortDirection, onSort: externalOnSort, enableSorting, defaultSortBy, defaultSortDirection, searchable, searchPlaceholder, searchValue, onSearchChange, clearSearchLabel, pagination, currentPage, totalPages, pageSize, onPageChange, nextLabel, previousLabel, pageLabel, mobileView, mobileSorting, emptyMessage, className, striped, hoverable, compact, }: DataTableProps<T>): React$1.JSX.Element;
707
732
 
708
733
  interface DatePickerProps {
709
734
  date?: Date;
@@ -1479,6 +1504,61 @@ interface RangeSliderProps {
1479
1504
  }
1480
1505
  declare const RangeSlider: React$1.ForwardRefExoticComponent<RangeSliderProps & React$1.RefAttributes<HTMLDivElement>>;
1481
1506
 
1507
+ declare const chartVariants: (props?: ({
1508
+ size?: "sm" | "md" | "lg" | null | undefined;
1509
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1510
+ interface ChartDataItem {
1511
+ [key: string]: string | number;
1512
+ }
1513
+ interface ChartBaseProps extends VariantProps<typeof chartVariants> {
1514
+ /** Data array — each item needs at least a category key and a value key */
1515
+ data: ChartDataItem[];
1516
+ /** The key in each data item used for X axis / category labels */
1517
+ categoryKey?: string;
1518
+ /** The key(s) in each data item used for values. String for single series, array for multi-series */
1519
+ valueKey?: string | string[];
1520
+ /** Custom colors for series — CSS color strings or CSS var references */
1521
+ colors?: string[];
1522
+ /** Locale for number formatting on axes */
1523
+ locale?: 'en' | 'ar';
1524
+ /** Override text direction (defaults to direction provider) */
1525
+ direction?: 'ltr' | 'rtl';
1526
+ /** Show grid lines */
1527
+ showGrid?: boolean;
1528
+ /** Show X axis */
1529
+ showXAxis?: boolean;
1530
+ /** Show Y axis */
1531
+ showYAxis?: boolean;
1532
+ /** Format Y axis tick values */
1533
+ yAxisFormatter?: (value: number) => string;
1534
+ /** Format X axis tick values */
1535
+ xAxisFormatter?: (value: string) => string;
1536
+ /** Stroke width for lines (line/area charts) and bar border */
1537
+ strokeWidth?: number;
1538
+ /** Font size for axis labels in pixels */
1539
+ fontSize?: number;
1540
+ /** Accessible label describing the chart content */
1541
+ 'aria-label'?: string;
1542
+ /** Additional class name */
1543
+ className?: string;
1544
+ }
1545
+ interface LineBarAreaChartProps extends ChartBaseProps {
1546
+ type: 'line' | 'bar' | 'area';
1547
+ }
1548
+ interface DonutChartProps extends ChartBaseProps {
1549
+ type: 'donut';
1550
+ /** Value to display (0-100 for percentage) */
1551
+ value?: number;
1552
+ /** Inner label — displayed in center of donut */
1553
+ innerLabel?: string;
1554
+ /** Inner sub-label — smaller text below label */
1555
+ innerSubLabel?: string;
1556
+ /** Arc thickness */
1557
+ thickness?: 'thin' | 'default' | 'thick';
1558
+ }
1559
+ type ChartProps = LineBarAreaChartProps | DonutChartProps;
1560
+ declare function Chart(props: ChartProps): React$1.JSX.Element;
1561
+
1482
1562
  interface StatsCardProps {
1483
1563
  icon: React.ReactNode;
1484
1564
  label: string;
@@ -1572,6 +1652,40 @@ interface ThinkingIndicatorProps extends React$1.HTMLAttributes<HTMLDivElement>,
1572
1652
  }
1573
1653
  declare const ThinkingIndicator: React$1.ForwardRefExoticComponent<ThinkingIndicatorProps & React$1.RefAttributes<HTMLDivElement>>;
1574
1654
 
1655
+ interface TimelineItem {
1656
+ /** Custom icon to display in the timeline node */
1657
+ icon?: React$1.ReactNode;
1658
+ /** Title of the timeline event */
1659
+ title: string;
1660
+ /** Arabic title (shown when direction is RTL) */
1661
+ titleAr?: string;
1662
+ /** Description / details for the event */
1663
+ description?: string;
1664
+ /** Arabic description */
1665
+ descriptionAr?: string;
1666
+ /** Date or time label */
1667
+ date?: string;
1668
+ /** Arabic date label */
1669
+ dateAr?: string;
1670
+ /** Status determines node styling */
1671
+ status: 'complete' | 'current' | 'upcoming';
1672
+ }
1673
+ interface TimelineProps {
1674
+ /** Array of timeline events */
1675
+ items: TimelineItem[];
1676
+ /** Layout variant */
1677
+ variant?: 'default' | 'alternating';
1678
+ /** Compact mode for inline use — smaller nodes and tighter spacing */
1679
+ compact?: boolean;
1680
+ /** Wrap each item's content in a card container */
1681
+ cards?: boolean;
1682
+ /** Accessible label for the timeline — useful when multiple timelines appear on a page */
1683
+ 'aria-label'?: string;
1684
+ /** Additional class name */
1685
+ className?: string;
1686
+ }
1687
+ declare function Timeline({ items, variant, compact, cards, 'aria-label': ariaLabel, className, }: TimelineProps): React$1.JSX.Element;
1688
+
1575
1689
  interface Time {
1576
1690
  hours: number;
1577
1691
  minutes: number;
@@ -1918,4 +2032,4 @@ declare function useRelativeTime(date: Date | string, locale?: string, options?:
1918
2032
  */
1919
2033
  declare function cn(...inputs: ClassValue[]): string;
1920
2034
 
1921
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, ArabicNumber, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Blockquote, type BlockquoteProps, Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, type BuiltInTheme, Button, ButtonArrow, type ButtonArrowProps, type ButtonProps, Calendar, Callout, type CalloutProps, type CalloutType, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatMessage, Checkbox, ClientProviders, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColumnDef, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContentRenderer, type ContentRendererProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ConversationHistory, DashboardShell, DataTable, type DataTableProps, DatePicker, DesignSystemProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorCallout, FeatureCard, FileUpload, Form, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormProps, HijriDate, type IconComponent, InfoCallout, Input, type InputProps, Kbd, type KbdProps, Label, ListingCard, LoadingSpinner, MessageActions, ModelSelector, NotificationCenter, NumberInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, ParameterSlider, Popover, PopoverContent, PopoverTrigger, PrayerTimes, Progress, PromptInput, PullQuote, type PullQuoteProps, RadioGroup, RadioGroupItem, RangeSlider, type Reaction, ReactionPicker, type ReactionPickerProps, RichTextEditor, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, type SortDirection, StatsCard, type StatsCardProps, type Step, Stepper, type StepperProps, StreamingText, SuccessCallout, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThinkingIndicator, TimePicker, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, TokenCounter, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserBadge, type UserBadgeProps, type UserBadgeVariant, UserMenu, WarningCallout, WorkflowCanvas, WorkflowNode, ZakatCalculator, badgeVariants, buttonVariants, cn, useDesignSystem, useDirection, useRelativeTime, workflowNodeTypes };
2035
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, ArabicNumber, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Blockquote, type BlockquoteProps, Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, type BuiltInTheme, Button, ButtonArrow, type ButtonArrowProps, type ButtonProps, Calendar, Callout, type CalloutProps, type CalloutType, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselProps, Chart, type ChartProps, ChatMessage, Checkbox, ClientProviders, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColumnDef, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContentRenderer, type ContentRendererProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ConversationHistory, DashboardShell, DataTable, type DataTableProps, DatePicker, DesignSystemProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorCallout, FeatureCard, FileUpload, Form, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormProps, HijriDate, type IconComponent, InfoCallout, Input, type InputProps, Kbd, type KbdProps, Label, ListingCard, LoadingSpinner, MessageActions, ModelSelector, NotificationCenter, NumberInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, ParameterSlider, Popover, PopoverContent, PopoverTrigger, PrayerTimes, Progress, PromptInput, PullQuote, type PullQuoteProps, RadioGroup, RadioGroupItem, RangeSlider, type Reaction, ReactionPicker, type ReactionPickerProps, RichTextEditor, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, type SortDirection, StatsCard, type StatsCardProps, type Step, Stepper, type StepperProps, StreamingText, SuccessCallout, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThinkingIndicator, TimePicker, Timeline, type TimelineItem, type TimelineProps, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, TokenCounter, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserBadge, type UserBadgeProps, type UserBadgeVariant, UserMenu, WarningCallout, WorkflowCanvas, WorkflowNode, ZakatCalculator, badgeVariants, buttonVariants, cn, useDesignSystem, useDirection, useRelativeTime, workflowNodeTypes };
package/dist/index.d.ts CHANGED
@@ -92,7 +92,7 @@ declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimi
92
92
  declare const badgeVariants: (props?: ({
93
93
  variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
94
94
  } & class_variance_authority_types.ClassProp) | undefined) => string;
95
- interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
95
+ interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
96
96
  /**
97
97
  * ARIA role for the badge. Use "status" for status indicators
98
98
  * that should be announced by screen readers.
@@ -260,6 +260,8 @@ interface CalendarProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, 'on
260
260
  getHijriDate?: (date: Date) => {
261
261
  hijri: string;
262
262
  hijriDay: string;
263
+ hijriMonthIndex?: number;
264
+ hijriYear?: number;
263
265
  };
264
266
  }
265
267
  declare const Calendar: React$1.ForwardRefExoticComponent<CalendarProps & React$1.RefAttributes<HTMLDivElement>>;
@@ -305,6 +307,30 @@ declare const CardDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAtt
305
307
  declare const CardContent: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
306
308
  declare const CardFooter: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
307
309
 
310
+ interface CarouselProps<T = unknown> {
311
+ /** Array of items to display */
312
+ items: T[];
313
+ /** Render function for each item */
314
+ renderItem: (item: T, index: number) => React$1.ReactNode;
315
+ /** Auto-advance slides (milliseconds between slides, or false to disable) */
316
+ autoPlay?: number | false;
317
+ /** Show dot indicators below the carousel */
318
+ showDots?: boolean;
319
+ /** Show left/right arrow buttons */
320
+ showArrows?: boolean;
321
+ /** Loop back to first item after last */
322
+ loop?: boolean;
323
+ /** Accessible label for the carousel region */
324
+ 'aria-label'?: string;
325
+ /** Additional class name for the outer container */
326
+ className?: string;
327
+ /** Additional class name for the slide area */
328
+ slideClassName?: string;
329
+ /** Dot indicator size — 'sm' (default) for subtle dots, 'lg' for touch-friendly 24px targets */
330
+ dotSize?: 'sm' | 'lg';
331
+ }
332
+ declare function Carousel<T>({ items, renderItem, autoPlay, showDots, showArrows, loop, 'aria-label': ariaLabel, className, slideClassName, dotSize, }: CarouselProps<T>): React$1.JSX.Element | null;
333
+
308
334
  declare const chatMessageVariants: (props?: ({
309
335
  role?: "user" | "assistant" | "system" | null | undefined;
310
336
  variant?: "default" | "compact" | null | undefined;
@@ -357,7 +383,7 @@ declare const ChatMessage: React$1.ForwardRefExoticComponent<ChatMessageProps &
357
383
  declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
358
384
 
359
385
  declare const Collapsible: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React$1.RefAttributes<HTMLDivElement>>;
360
- declare const CollapsibleTrigger: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
386
+ declare const CollapsibleTrigger: React$1.ForwardRefExoticComponent<Omit<CollapsiblePrimitive.CollapsibleTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
361
387
  declare const CollapsibleContent: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & React$1.RefAttributes<HTMLDivElement>>;
362
388
 
363
389
  declare const Command: React$1.ForwardRefExoticComponent<Omit<{
@@ -658,7 +684,6 @@ type SortDirection = 'asc' | 'desc' | null;
658
684
  interface ColumnDef<T> {
659
685
  id: string;
660
686
  header: string;
661
- headerAr?: string;
662
687
  accessorKey: keyof T;
663
688
  cell?: (row: T) => React$1.ReactNode;
664
689
  sortable?: boolean;
@@ -681,10 +706,11 @@ interface DataTableProps<T> {
681
706
  defaultSortDirection?: SortDirection;
682
707
  searchable?: boolean;
683
708
  searchPlaceholder?: string;
684
- searchPlaceholderAr?: string;
685
709
  searchValue?: string;
686
710
  onSearchChange?: (value: string) => void;
687
711
  filterBy?: (keyof T)[];
712
+ /** Accessible label for the clear search button (e.g., "Clear search" / "مسح البحث") */
713
+ clearSearchLabel?: string;
688
714
  pagination?: boolean;
689
715
  currentPage?: number;
690
716
  totalPages?: number;
@@ -697,13 +723,12 @@ interface DataTableProps<T> {
697
723
  /** Show sort buttons on mobile cards */
698
724
  mobileSorting?: boolean;
699
725
  emptyMessage?: string;
700
- emptyMessageAr?: string;
701
726
  className?: string;
702
727
  striped?: boolean;
703
728
  hoverable?: boolean;
704
729
  compact?: boolean;
705
730
  }
706
- declare function DataTable<T>({ data, columns, isLoading, sortBy: externalSortBy, sortDirection: externalSortDirection, onSort: externalOnSort, enableSorting, defaultSortBy, defaultSortDirection, searchable, searchPlaceholder, searchPlaceholderAr, searchValue, onSearchChange, pagination, currentPage, totalPages, pageSize, onPageChange, nextLabel, previousLabel, pageLabel, mobileView, mobileSorting, emptyMessage, emptyMessageAr, className, striped, hoverable, compact, }: DataTableProps<T>): React$1.JSX.Element;
731
+ declare function DataTable<T>({ data, columns, isLoading, sortBy: externalSortBy, sortDirection: externalSortDirection, onSort: externalOnSort, enableSorting, defaultSortBy, defaultSortDirection, searchable, searchPlaceholder, searchValue, onSearchChange, clearSearchLabel, pagination, currentPage, totalPages, pageSize, onPageChange, nextLabel, previousLabel, pageLabel, mobileView, mobileSorting, emptyMessage, className, striped, hoverable, compact, }: DataTableProps<T>): React$1.JSX.Element;
707
732
 
708
733
  interface DatePickerProps {
709
734
  date?: Date;
@@ -1479,6 +1504,61 @@ interface RangeSliderProps {
1479
1504
  }
1480
1505
  declare const RangeSlider: React$1.ForwardRefExoticComponent<RangeSliderProps & React$1.RefAttributes<HTMLDivElement>>;
1481
1506
 
1507
+ declare const chartVariants: (props?: ({
1508
+ size?: "sm" | "md" | "lg" | null | undefined;
1509
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1510
+ interface ChartDataItem {
1511
+ [key: string]: string | number;
1512
+ }
1513
+ interface ChartBaseProps extends VariantProps<typeof chartVariants> {
1514
+ /** Data array — each item needs at least a category key and a value key */
1515
+ data: ChartDataItem[];
1516
+ /** The key in each data item used for X axis / category labels */
1517
+ categoryKey?: string;
1518
+ /** The key(s) in each data item used for values. String for single series, array for multi-series */
1519
+ valueKey?: string | string[];
1520
+ /** Custom colors for series — CSS color strings or CSS var references */
1521
+ colors?: string[];
1522
+ /** Locale for number formatting on axes */
1523
+ locale?: 'en' | 'ar';
1524
+ /** Override text direction (defaults to direction provider) */
1525
+ direction?: 'ltr' | 'rtl';
1526
+ /** Show grid lines */
1527
+ showGrid?: boolean;
1528
+ /** Show X axis */
1529
+ showXAxis?: boolean;
1530
+ /** Show Y axis */
1531
+ showYAxis?: boolean;
1532
+ /** Format Y axis tick values */
1533
+ yAxisFormatter?: (value: number) => string;
1534
+ /** Format X axis tick values */
1535
+ xAxisFormatter?: (value: string) => string;
1536
+ /** Stroke width for lines (line/area charts) and bar border */
1537
+ strokeWidth?: number;
1538
+ /** Font size for axis labels in pixels */
1539
+ fontSize?: number;
1540
+ /** Accessible label describing the chart content */
1541
+ 'aria-label'?: string;
1542
+ /** Additional class name */
1543
+ className?: string;
1544
+ }
1545
+ interface LineBarAreaChartProps extends ChartBaseProps {
1546
+ type: 'line' | 'bar' | 'area';
1547
+ }
1548
+ interface DonutChartProps extends ChartBaseProps {
1549
+ type: 'donut';
1550
+ /** Value to display (0-100 for percentage) */
1551
+ value?: number;
1552
+ /** Inner label — displayed in center of donut */
1553
+ innerLabel?: string;
1554
+ /** Inner sub-label — smaller text below label */
1555
+ innerSubLabel?: string;
1556
+ /** Arc thickness */
1557
+ thickness?: 'thin' | 'default' | 'thick';
1558
+ }
1559
+ type ChartProps = LineBarAreaChartProps | DonutChartProps;
1560
+ declare function Chart(props: ChartProps): React$1.JSX.Element;
1561
+
1482
1562
  interface StatsCardProps {
1483
1563
  icon: React.ReactNode;
1484
1564
  label: string;
@@ -1572,6 +1652,40 @@ interface ThinkingIndicatorProps extends React$1.HTMLAttributes<HTMLDivElement>,
1572
1652
  }
1573
1653
  declare const ThinkingIndicator: React$1.ForwardRefExoticComponent<ThinkingIndicatorProps & React$1.RefAttributes<HTMLDivElement>>;
1574
1654
 
1655
+ interface TimelineItem {
1656
+ /** Custom icon to display in the timeline node */
1657
+ icon?: React$1.ReactNode;
1658
+ /** Title of the timeline event */
1659
+ title: string;
1660
+ /** Arabic title (shown when direction is RTL) */
1661
+ titleAr?: string;
1662
+ /** Description / details for the event */
1663
+ description?: string;
1664
+ /** Arabic description */
1665
+ descriptionAr?: string;
1666
+ /** Date or time label */
1667
+ date?: string;
1668
+ /** Arabic date label */
1669
+ dateAr?: string;
1670
+ /** Status determines node styling */
1671
+ status: 'complete' | 'current' | 'upcoming';
1672
+ }
1673
+ interface TimelineProps {
1674
+ /** Array of timeline events */
1675
+ items: TimelineItem[];
1676
+ /** Layout variant */
1677
+ variant?: 'default' | 'alternating';
1678
+ /** Compact mode for inline use — smaller nodes and tighter spacing */
1679
+ compact?: boolean;
1680
+ /** Wrap each item's content in a card container */
1681
+ cards?: boolean;
1682
+ /** Accessible label for the timeline — useful when multiple timelines appear on a page */
1683
+ 'aria-label'?: string;
1684
+ /** Additional class name */
1685
+ className?: string;
1686
+ }
1687
+ declare function Timeline({ items, variant, compact, cards, 'aria-label': ariaLabel, className, }: TimelineProps): React$1.JSX.Element;
1688
+
1575
1689
  interface Time {
1576
1690
  hours: number;
1577
1691
  minutes: number;
@@ -1918,4 +2032,4 @@ declare function useRelativeTime(date: Date | string, locale?: string, options?:
1918
2032
  */
1919
2033
  declare function cn(...inputs: ClassValue[]): string;
1920
2034
 
1921
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, ArabicNumber, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Blockquote, type BlockquoteProps, Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, type BuiltInTheme, Button, ButtonArrow, type ButtonArrowProps, type ButtonProps, Calendar, Callout, type CalloutProps, type CalloutType, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatMessage, Checkbox, ClientProviders, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColumnDef, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContentRenderer, type ContentRendererProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ConversationHistory, DashboardShell, DataTable, type DataTableProps, DatePicker, DesignSystemProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorCallout, FeatureCard, FileUpload, Form, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormProps, HijriDate, type IconComponent, InfoCallout, Input, type InputProps, Kbd, type KbdProps, Label, ListingCard, LoadingSpinner, MessageActions, ModelSelector, NotificationCenter, NumberInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, ParameterSlider, Popover, PopoverContent, PopoverTrigger, PrayerTimes, Progress, PromptInput, PullQuote, type PullQuoteProps, RadioGroup, RadioGroupItem, RangeSlider, type Reaction, ReactionPicker, type ReactionPickerProps, RichTextEditor, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, type SortDirection, StatsCard, type StatsCardProps, type Step, Stepper, type StepperProps, StreamingText, SuccessCallout, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThinkingIndicator, TimePicker, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, TokenCounter, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserBadge, type UserBadgeProps, type UserBadgeVariant, UserMenu, WarningCallout, WorkflowCanvas, WorkflowNode, ZakatCalculator, badgeVariants, buttonVariants, cn, useDesignSystem, useDirection, useRelativeTime, workflowNodeTypes };
2035
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, ArabicNumber, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Blockquote, type BlockquoteProps, Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, type BuiltInTheme, Button, ButtonArrow, type ButtonArrowProps, type ButtonProps, Calendar, Callout, type CalloutProps, type CalloutType, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselProps, Chart, type ChartProps, ChatMessage, Checkbox, ClientProviders, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColumnDef, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContentRenderer, type ContentRendererProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ConversationHistory, DashboardShell, DataTable, type DataTableProps, DatePicker, DesignSystemProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorCallout, FeatureCard, FileUpload, Form, FormDescription, FormField, FormItem, FormLabel, FormMessage, type FormProps, HijriDate, type IconComponent, InfoCallout, Input, type InputProps, Kbd, type KbdProps, Label, ListingCard, LoadingSpinner, MessageActions, ModelSelector, NotificationCenter, NumberInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, ParameterSlider, Popover, PopoverContent, PopoverTrigger, PrayerTimes, Progress, PromptInput, PullQuote, type PullQuoteProps, RadioGroup, RadioGroupItem, RangeSlider, type Reaction, ReactionPicker, type ReactionPickerProps, RichTextEditor, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, type SortDirection, StatsCard, type StatsCardProps, type Step, Stepper, type StepperProps, StreamingText, SuccessCallout, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThinkingIndicator, TimePicker, Timeline, type TimelineItem, type TimelineProps, Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, TokenCounter, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserBadge, type UserBadgeProps, type UserBadgeVariant, UserMenu, WarningCallout, WorkflowCanvas, WorkflowNode, ZakatCalculator, badgeVariants, buttonVariants, cn, useDesignSystem, useDirection, useRelativeTime, workflowNodeTypes };