@dev-dga/react 0.9.1 → 0.10.1

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/chunk-B6ODWTVF.js +1 -0
  3. package/dist/chunk-CZCIERDM.cjs +1 -0
  4. package/dist/{chunk-M46YSH6K.cjs.map → chunk-CZCIERDM.cjs.map} +1 -1
  5. package/dist/{chunk-YJQZQS7P.js → chunk-GNL72FRN.js} +2 -2
  6. package/dist/chunk-HIZSEYQY.js +35 -0
  7. package/dist/chunk-HIZSEYQY.js.map +1 -0
  8. package/dist/chunk-J7GWUCFM.cjs +35 -0
  9. package/dist/chunk-J7GWUCFM.cjs.map +1 -0
  10. package/dist/{chunk-H4B2B4SV.cjs → chunk-KRIWNW4A.cjs} +1 -1
  11. package/dist/{chunk-H4B2B4SV.cjs.map → chunk-KRIWNW4A.cjs.map} +1 -1
  12. package/dist/{chunk-W6B7GJLN.cjs → chunk-NU3WUSG7.cjs} +2 -2
  13. package/dist/chunk-NU3WUSG7.cjs.map +1 -0
  14. package/dist/{chunk-FWGFOC2T.js → chunk-RSXDPFXK.js} +2 -2
  15. package/dist/chunk-RSXDPFXK.js.map +1 -0
  16. package/dist/{chunk-UAECZXU5.js → chunk-TXQK3BAO.js} +9 -2
  17. package/dist/{chunk-UAECZXU5.js.map → chunk-TXQK3BAO.js.map} +1 -1
  18. package/dist/{chunk-2HZGIP5V.cjs → chunk-VMAJ34DC.cjs} +3 -3
  19. package/dist/{chunk-2HZGIP5V.cjs.map → chunk-VMAJ34DC.cjs.map} +1 -1
  20. package/dist/{chunk-PAUY27WX.cjs → chunk-VYOETLZU.cjs} +9 -2
  21. package/dist/chunk-VYOETLZU.cjs.map +1 -0
  22. package/dist/{chunk-TO7F4EHC.js → chunk-WOJUO43J.js} +1 -1
  23. package/dist/chunk-WOJUO43J.js.map +1 -0
  24. package/dist/components/FileUpload/FileUpload.cjs +3 -3
  25. package/dist/components/FileUpload/FileUpload.js +2 -2
  26. package/dist/components/FileUpload/index.cjs +3 -3
  27. package/dist/components/FileUpload/index.js +2 -2
  28. package/dist/components/Pagination/index.cjs +6 -2
  29. package/dist/components/Pagination/index.cjs.map +1 -1
  30. package/dist/components/Pagination/index.js +5 -1
  31. package/dist/components/Pagination/paginationRange.cjs +7 -0
  32. package/dist/components/Pagination/paginationRange.cjs.map +1 -0
  33. package/dist/components/Pagination/paginationRange.js +7 -0
  34. package/dist/components/Pagination/paginationRange.js.map +1 -0
  35. package/dist/components/Progress/Progress.cjs +2 -2
  36. package/dist/components/Progress/Progress.js +1 -1
  37. package/dist/components/Progress/index.cjs +2 -2
  38. package/dist/components/Progress/index.js +1 -1
  39. package/dist/components/ScrollArea/ScrollArea.cjs +2 -2
  40. package/dist/components/ScrollArea/ScrollArea.js +1 -1
  41. package/dist/components/ScrollArea/index.cjs +2 -2
  42. package/dist/components/ScrollArea/index.js +1 -1
  43. package/dist/components/Sidebar/SidebarMenu.cjs +1 -1
  44. package/dist/components/Sidebar/SidebarMenu.js +1 -1
  45. package/dist/components/Sidebar/index.cjs +1 -1
  46. package/dist/components/Sidebar/index.cjs.map +1 -1
  47. package/dist/components/Sidebar/index.js +1 -1
  48. package/dist/components/Stat/Stat.cjs +2 -2
  49. package/dist/components/Stat/Stat.js +1 -1
  50. package/dist/components/Stat/index.cjs +2 -2
  51. package/dist/components/Stat/index.js +1 -1
  52. package/dist/index.cjs +30 -26
  53. package/dist/index.cjs.map +1 -1
  54. package/dist/index.d.cts +41 -1
  55. package/dist/index.d.ts +41 -1
  56. package/dist/index.js +38 -34
  57. package/package.json +3 -3
  58. package/dist/chunk-FWGFOC2T.js.map +0 -1
  59. package/dist/chunk-KPONZTP7.js +0 -1
  60. package/dist/chunk-M46YSH6K.cjs +0 -1
  61. package/dist/chunk-PAUY27WX.cjs.map +0 -1
  62. package/dist/chunk-TO7F4EHC.js.map +0 -1
  63. package/dist/chunk-W6B7GJLN.cjs.map +0 -1
  64. /package/dist/{chunk-KPONZTP7.js.map → chunk-B6ODWTVF.js.map} +0 -0
  65. /package/dist/{chunk-YJQZQS7P.js.map → chunk-GNL72FRN.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -615,6 +615,32 @@ declare function PaginationPrevious({ label, className, children, asChild, ...pr
615
615
  declare function PaginationNext({ label, className, children, asChild, ...props }: PaginationNextProps): react_jsx_runtime.JSX.Element;
616
616
  declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): react_jsx_runtime.JSX.Element;
617
617
 
618
+ type PaginationSlot = number | 'ellipsis';
619
+ interface PaginationRangeOptions {
620
+ /** Pages shown on each side of the current page. Default `1`. */
621
+ siblings?: number;
622
+ /** Pages pinned at the very start and end. Default `1`. */
623
+ boundaries?: number;
624
+ }
625
+ /**
626
+ * Compute which page slots a pager should render — page numbers interleaved with
627
+ * `'ellipsis'` markers — so consumers don't hand-roll the windowing logic.
628
+ *
629
+ * **Constant-width invariant:** once the page count exceeds the visible window
630
+ * (`boundaries * 2 + siblings * 2 + 3`), the returned array is the **same length
631
+ * for every `page`**. That keeps the pager a constant width while navigating, so
632
+ * the buttons don't shift under the cursor. When collapsing a gap would hide
633
+ * exactly one page, that page is shown instead of an `'ellipsis'` (same length).
634
+ *
635
+ * Pair it with the `Pagination*` parts (`PaginationItem` / `PaginationLink` /
636
+ * `PaginationEllipsis`).
637
+ *
638
+ * @param page Current page, 1-based (clamped to `[1, count]`).
639
+ * @param count Total number of pages.
640
+ * @returns Slots to render, e.g. `[1, 'ellipsis', 9, 10, 11, 'ellipsis', 20]`.
641
+ */
642
+ declare function paginationRange(page: number, count: number, options?: PaginationRangeOptions): PaginationSlot[];
643
+
618
644
  declare const accordionVariants: (props?: ({
619
645
  size?: "sm" | "md" | null | undefined;
620
646
  } & class_variance_authority_types.ClassProp) | undefined) => string;
@@ -1228,6 +1254,20 @@ interface StatChangeProps extends React.ComponentProps<'div'> {
1228
1254
  /** `'chip'` wraps the change in a sentiment-tinted pill. Defaults to `'text'`. */
1229
1255
  variant?: ChangeVariant;
1230
1256
  }
1257
+ /**
1258
+ * KPI / metric tile. Two ways to fill it, designed to combine:
1259
+ *
1260
+ * - **Prop mode** (the common case): pass `label` / `value` / `change` /
1261
+ * `changeLabel` / `trend` / `icon` and Stat renders the standard layout.
1262
+ * - **Compound children**: append extra content as children — it renders AFTER
1263
+ * the prop-mode rows.
1264
+ *
1265
+ * The blessed hybrid is **prop mode + a `<StatChart>` child** (a sparkline under
1266
+ * the metric). Do NOT also pass a child that duplicates a prop slot (e.g. a
1267
+ * `value` prop *and* a `<StatValue>` child) — both render and you get a
1268
+ * double. One source per slot. Stat owns its surface; use it directly (don't
1269
+ * wrap a bare `<Card>`), and lay tiles out with `<StatGroup>`.
1270
+ */
1231
1271
  declare function Stat({ variant, size, label, value, change, changeLabel, trend, sentiment, changeVariant, icon, className, children, ...props }: StatProps): react_jsx_runtime.JSX.Element;
1232
1272
  declare function StatLabel({ className, ...props }: StatLabelProps): react_jsx_runtime.JSX.Element;
1233
1273
  declare function StatValue({ className, ...props }: StatValueProps): react_jsx_runtime.JSX.Element;
@@ -2042,4 +2082,4 @@ declare function FieldMessage({ id, variant, children }: FieldMessageProps): rea
2042
2082
 
2043
2083
  declare function cn(...inputs: ClassValue[]): string;
2044
2084
 
2045
- export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, AspectRatio, type AspectRatioProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, type ButtonProps, type CalendarLabels, type CalendarSystem, Card, CardContent, CardDescription, type CardDescriptionProps, CardFooter, CardHeader, CardImage, type CardImageProps, type CardProps, type CardSectionProps, CardTitle, type CardTitleProps, Checkbox, type CheckboxProps, CircularProgress, type CircularProgressProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, ComboboxGroup, type ComboboxGroupProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionDetails, type DescriptionDetailsProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DescriptionTerm, type DescriptionTermProps, DgaProvider, type DgaProviderProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSectionProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateActions, type EmptyStateActionsProps, EmptyStateDescription, type EmptyStateDescriptionProps, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateProps, EmptyStateTitle, type EmptyStateTitleProps, type FieldA11y, FieldMessage, type FieldMessageProps, type FileRejection, type FileStatus, FileUpload, type FileUploadProps, Input, InputOTP, type InputOTPProps, type InputProps, Link, type LinkProps, List, ListItem, ListItemAction, type ListItemActionProps, ListItemContent, type ListItemContentProps, ListItemIcon, type ListItemIconProps, type ListItemProps, type ListProps, Menubar, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Modal, ModalBody, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalDescription, type ModalDescriptionProps, ModalFooter, ModalHeader, type ModalProps, type ModalSectionProps, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, NumberInput, type NumberInputProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Quote, QuoteAuthor, type QuoteAuthorProps, QuoteCaption, type QuoteCaptionProps, QuoteContent, type QuoteContentProps, type QuoteProps, QuoteSource, type QuoteSourceProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RejectionCode, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, SearchBox, type SearchBoxProps, Select, SelectItem, type SelectItemProps, type SelectProps, Sidebar, SidebarContent, type SidebarContextValue, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, type SidebarGroupDivProps, SidebarGroupLabel, SidebarHeader, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, type SidebarSectionProps, SidebarSeparator, SidebarTrigger, type SidebarTriggerProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, Stat, StatChange, type StatChangeProps, StatChart, type StatChartProps, StatGroup, type StatGroupProps, StatLabel, type StatLabelProps, type StatProps, StatValue, type StatValueProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, type StepState, StepTitle, type StepTitleProps, Steps, type StepsProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagInput, type TagInputProps, Textarea, type TextareaProps, Timeline, TimelineContent, type TimelineContentProps, TimelineDescription, type TimelineDescriptionProps, TimelineItem, type TimelineItemProps, TimelineMarker, type TimelineMarkerProps, type TimelineProps, type TimelineStatus, TimelineTime, type TimelineTimeProps, TimelineTitle, type TimelineTitleProps, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, type ToastStore, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, type UploadFile, type UseFieldA11yOptions, accordionVariants, alertVariants, avatarVariants, badgeVariants, breadcrumbVariants, buttonVariants, cardVariants, checkboxVariants, circularProgressVariants, cn, comboboxTriggerVariants, comboboxVariants, commandVariants, createToast, createToastStore, datePickerVariants, dateRangePickerTriggerVariants, dateRangePickerVariants, descriptionListVariants, dividerVariants, drawerVariants, dropdownMenuVariants, emptyStateVariants, inputOTPVariants, inputVariants, linkVariants, listVariants, menubarContentVariants, menubarTriggerVariants, modalContentVariants, numberInputVariants, paginationLinkVariants, paginationVariants, popoverContentVariants, progressVariants, quoteVariants, radioGroupVariants, radioVariants, ratingVariants, scrollAreaVariants, selectTriggerVariants, sidebarMenuButtonVariants, sidebarMenuSubButtonVariants, skeletonVariants, sliderVariants, spinnerVariants, statGroupVariants, statVariants, stepVariants, stepsVariants, switchVariants, tableVariants, tabsListVariants, tabsVariants, tagInputVariants, textareaVariants, timelineMarkerVariants, timelineVariants, toast, toastStore, toastVariants, toastViewportVariants, toggleGroupVariants, toggleVariants, tooltipContentVariants, useDga, useDir, useFieldA11y, useIsMobile, useSidebar };
2085
+ export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, AspectRatio, type AspectRatioProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, type ButtonProps, type CalendarLabels, type CalendarSystem, Card, CardContent, CardDescription, type CardDescriptionProps, CardFooter, CardHeader, CardImage, type CardImageProps, type CardProps, type CardSectionProps, CardTitle, type CardTitleProps, Checkbox, type CheckboxProps, CircularProgress, type CircularProgressProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, ComboboxGroup, type ComboboxGroupProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionDetails, type DescriptionDetailsProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DescriptionTerm, type DescriptionTermProps, DgaProvider, type DgaProviderProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSectionProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateActions, type EmptyStateActionsProps, EmptyStateDescription, type EmptyStateDescriptionProps, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateProps, EmptyStateTitle, type EmptyStateTitleProps, type FieldA11y, FieldMessage, type FieldMessageProps, type FileRejection, type FileStatus, FileUpload, type FileUploadProps, Input, InputOTP, type InputOTPProps, type InputProps, Link, type LinkProps, List, ListItem, ListItemAction, type ListItemActionProps, ListItemContent, type ListItemContentProps, ListItemIcon, type ListItemIconProps, type ListItemProps, type ListProps, Menubar, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Modal, ModalBody, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalDescription, type ModalDescriptionProps, ModalFooter, ModalHeader, type ModalProps, type ModalSectionProps, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, NumberInput, type NumberInputProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, type PaginationRangeOptions, type PaginationSlot, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Quote, QuoteAuthor, type QuoteAuthorProps, QuoteCaption, type QuoteCaptionProps, QuoteContent, type QuoteContentProps, type QuoteProps, QuoteSource, type QuoteSourceProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RejectionCode, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, SearchBox, type SearchBoxProps, Select, SelectItem, type SelectItemProps, type SelectProps, Sidebar, SidebarContent, type SidebarContextValue, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, type SidebarGroupDivProps, SidebarGroupLabel, SidebarHeader, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, type SidebarSectionProps, SidebarSeparator, SidebarTrigger, type SidebarTriggerProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, Stat, StatChange, type StatChangeProps, StatChart, type StatChartProps, StatGroup, type StatGroupProps, StatLabel, type StatLabelProps, type StatProps, StatValue, type StatValueProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, type StepState, StepTitle, type StepTitleProps, Steps, type StepsProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagInput, type TagInputProps, Textarea, type TextareaProps, Timeline, TimelineContent, type TimelineContentProps, TimelineDescription, type TimelineDescriptionProps, TimelineItem, type TimelineItemProps, TimelineMarker, type TimelineMarkerProps, type TimelineProps, type TimelineStatus, TimelineTime, type TimelineTimeProps, TimelineTitle, type TimelineTitleProps, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, type ToastStore, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, type UploadFile, type UseFieldA11yOptions, accordionVariants, alertVariants, avatarVariants, badgeVariants, breadcrumbVariants, buttonVariants, cardVariants, checkboxVariants, circularProgressVariants, cn, comboboxTriggerVariants, comboboxVariants, commandVariants, createToast, createToastStore, datePickerVariants, dateRangePickerTriggerVariants, dateRangePickerVariants, descriptionListVariants, dividerVariants, drawerVariants, dropdownMenuVariants, emptyStateVariants, inputOTPVariants, inputVariants, linkVariants, listVariants, menubarContentVariants, menubarTriggerVariants, modalContentVariants, numberInputVariants, paginationLinkVariants, paginationRange, paginationVariants, popoverContentVariants, progressVariants, quoteVariants, radioGroupVariants, radioVariants, ratingVariants, scrollAreaVariants, selectTriggerVariants, sidebarMenuButtonVariants, sidebarMenuSubButtonVariants, skeletonVariants, sliderVariants, spinnerVariants, statGroupVariants, statVariants, stepVariants, stepsVariants, switchVariants, tableVariants, tabsListVariants, tabsVariants, tagInputVariants, textareaVariants, timelineMarkerVariants, timelineVariants, toast, toastStore, toastVariants, toastViewportVariants, toggleGroupVariants, toggleVariants, tooltipContentVariants, useDga, useDir, useFieldA11y, useIsMobile, useSidebar };
package/dist/index.d.ts CHANGED
@@ -615,6 +615,32 @@ declare function PaginationPrevious({ label, className, children, asChild, ...pr
615
615
  declare function PaginationNext({ label, className, children, asChild, ...props }: PaginationNextProps): react_jsx_runtime.JSX.Element;
616
616
  declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): react_jsx_runtime.JSX.Element;
617
617
 
618
+ type PaginationSlot = number | 'ellipsis';
619
+ interface PaginationRangeOptions {
620
+ /** Pages shown on each side of the current page. Default `1`. */
621
+ siblings?: number;
622
+ /** Pages pinned at the very start and end. Default `1`. */
623
+ boundaries?: number;
624
+ }
625
+ /**
626
+ * Compute which page slots a pager should render — page numbers interleaved with
627
+ * `'ellipsis'` markers — so consumers don't hand-roll the windowing logic.
628
+ *
629
+ * **Constant-width invariant:** once the page count exceeds the visible window
630
+ * (`boundaries * 2 + siblings * 2 + 3`), the returned array is the **same length
631
+ * for every `page`**. That keeps the pager a constant width while navigating, so
632
+ * the buttons don't shift under the cursor. When collapsing a gap would hide
633
+ * exactly one page, that page is shown instead of an `'ellipsis'` (same length).
634
+ *
635
+ * Pair it with the `Pagination*` parts (`PaginationItem` / `PaginationLink` /
636
+ * `PaginationEllipsis`).
637
+ *
638
+ * @param page Current page, 1-based (clamped to `[1, count]`).
639
+ * @param count Total number of pages.
640
+ * @returns Slots to render, e.g. `[1, 'ellipsis', 9, 10, 11, 'ellipsis', 20]`.
641
+ */
642
+ declare function paginationRange(page: number, count: number, options?: PaginationRangeOptions): PaginationSlot[];
643
+
618
644
  declare const accordionVariants: (props?: ({
619
645
  size?: "sm" | "md" | null | undefined;
620
646
  } & class_variance_authority_types.ClassProp) | undefined) => string;
@@ -1228,6 +1254,20 @@ interface StatChangeProps extends React.ComponentProps<'div'> {
1228
1254
  /** `'chip'` wraps the change in a sentiment-tinted pill. Defaults to `'text'`. */
1229
1255
  variant?: ChangeVariant;
1230
1256
  }
1257
+ /**
1258
+ * KPI / metric tile. Two ways to fill it, designed to combine:
1259
+ *
1260
+ * - **Prop mode** (the common case): pass `label` / `value` / `change` /
1261
+ * `changeLabel` / `trend` / `icon` and Stat renders the standard layout.
1262
+ * - **Compound children**: append extra content as children — it renders AFTER
1263
+ * the prop-mode rows.
1264
+ *
1265
+ * The blessed hybrid is **prop mode + a `<StatChart>` child** (a sparkline under
1266
+ * the metric). Do NOT also pass a child that duplicates a prop slot (e.g. a
1267
+ * `value` prop *and* a `<StatValue>` child) — both render and you get a
1268
+ * double. One source per slot. Stat owns its surface; use it directly (don't
1269
+ * wrap a bare `<Card>`), and lay tiles out with `<StatGroup>`.
1270
+ */
1231
1271
  declare function Stat({ variant, size, label, value, change, changeLabel, trend, sentiment, changeVariant, icon, className, children, ...props }: StatProps): react_jsx_runtime.JSX.Element;
1232
1272
  declare function StatLabel({ className, ...props }: StatLabelProps): react_jsx_runtime.JSX.Element;
1233
1273
  declare function StatValue({ className, ...props }: StatValueProps): react_jsx_runtime.JSX.Element;
@@ -2042,4 +2082,4 @@ declare function FieldMessage({ id, variant, children }: FieldMessageProps): rea
2042
2082
 
2043
2083
  declare function cn(...inputs: ClassValue[]): string;
2044
2084
 
2045
- export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, AspectRatio, type AspectRatioProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, type ButtonProps, type CalendarLabels, type CalendarSystem, Card, CardContent, CardDescription, type CardDescriptionProps, CardFooter, CardHeader, CardImage, type CardImageProps, type CardProps, type CardSectionProps, CardTitle, type CardTitleProps, Checkbox, type CheckboxProps, CircularProgress, type CircularProgressProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, ComboboxGroup, type ComboboxGroupProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionDetails, type DescriptionDetailsProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DescriptionTerm, type DescriptionTermProps, DgaProvider, type DgaProviderProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSectionProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateActions, type EmptyStateActionsProps, EmptyStateDescription, type EmptyStateDescriptionProps, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateProps, EmptyStateTitle, type EmptyStateTitleProps, type FieldA11y, FieldMessage, type FieldMessageProps, type FileRejection, type FileStatus, FileUpload, type FileUploadProps, Input, InputOTP, type InputOTPProps, type InputProps, Link, type LinkProps, List, ListItem, ListItemAction, type ListItemActionProps, ListItemContent, type ListItemContentProps, ListItemIcon, type ListItemIconProps, type ListItemProps, type ListProps, Menubar, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Modal, ModalBody, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalDescription, type ModalDescriptionProps, ModalFooter, ModalHeader, type ModalProps, type ModalSectionProps, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, NumberInput, type NumberInputProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Quote, QuoteAuthor, type QuoteAuthorProps, QuoteCaption, type QuoteCaptionProps, QuoteContent, type QuoteContentProps, type QuoteProps, QuoteSource, type QuoteSourceProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RejectionCode, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, SearchBox, type SearchBoxProps, Select, SelectItem, type SelectItemProps, type SelectProps, Sidebar, SidebarContent, type SidebarContextValue, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, type SidebarGroupDivProps, SidebarGroupLabel, SidebarHeader, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, type SidebarSectionProps, SidebarSeparator, SidebarTrigger, type SidebarTriggerProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, Stat, StatChange, type StatChangeProps, StatChart, type StatChartProps, StatGroup, type StatGroupProps, StatLabel, type StatLabelProps, type StatProps, StatValue, type StatValueProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, type StepState, StepTitle, type StepTitleProps, Steps, type StepsProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagInput, type TagInputProps, Textarea, type TextareaProps, Timeline, TimelineContent, type TimelineContentProps, TimelineDescription, type TimelineDescriptionProps, TimelineItem, type TimelineItemProps, TimelineMarker, type TimelineMarkerProps, type TimelineProps, type TimelineStatus, TimelineTime, type TimelineTimeProps, TimelineTitle, type TimelineTitleProps, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, type ToastStore, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, type UploadFile, type UseFieldA11yOptions, accordionVariants, alertVariants, avatarVariants, badgeVariants, breadcrumbVariants, buttonVariants, cardVariants, checkboxVariants, circularProgressVariants, cn, comboboxTriggerVariants, comboboxVariants, commandVariants, createToast, createToastStore, datePickerVariants, dateRangePickerTriggerVariants, dateRangePickerVariants, descriptionListVariants, dividerVariants, drawerVariants, dropdownMenuVariants, emptyStateVariants, inputOTPVariants, inputVariants, linkVariants, listVariants, menubarContentVariants, menubarTriggerVariants, modalContentVariants, numberInputVariants, paginationLinkVariants, paginationVariants, popoverContentVariants, progressVariants, quoteVariants, radioGroupVariants, radioVariants, ratingVariants, scrollAreaVariants, selectTriggerVariants, sidebarMenuButtonVariants, sidebarMenuSubButtonVariants, skeletonVariants, sliderVariants, spinnerVariants, statGroupVariants, statVariants, stepVariants, stepsVariants, switchVariants, tableVariants, tabsListVariants, tabsVariants, tagInputVariants, textareaVariants, timelineMarkerVariants, timelineVariants, toast, toastStore, toastVariants, toastViewportVariants, toggleGroupVariants, toggleVariants, tooltipContentVariants, useDga, useDir, useFieldA11y, useIsMobile, useSidebar };
2085
+ export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, AspectRatio, type AspectRatioProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, type ButtonProps, type CalendarLabels, type CalendarSystem, Card, CardContent, CardDescription, type CardDescriptionProps, CardFooter, CardHeader, CardImage, type CardImageProps, type CardProps, type CardSectionProps, CardTitle, type CardTitleProps, Checkbox, type CheckboxProps, CircularProgress, type CircularProgressProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Combobox, ComboboxGroup, type ComboboxGroupProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionDetails, type DescriptionDetailsProps, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListProps, DescriptionTerm, type DescriptionTermProps, DgaProvider, type DgaProviderProps, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, DrawerHeader, type DrawerProps, type DrawerSectionProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, EmptyStateActions, type EmptyStateActionsProps, EmptyStateDescription, type EmptyStateDescriptionProps, EmptyStateMedia, type EmptyStateMediaProps, type EmptyStateProps, EmptyStateTitle, type EmptyStateTitleProps, type FieldA11y, FieldMessage, type FieldMessageProps, type FileRejection, type FileStatus, FileUpload, type FileUploadProps, Input, InputOTP, type InputOTPProps, type InputProps, Link, type LinkProps, List, ListItem, ListItemAction, type ListItemActionProps, ListItemContent, type ListItemContentProps, ListItemIcon, type ListItemIconProps, type ListItemProps, type ListProps, Menubar, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Modal, ModalBody, ModalClose, type ModalCloseProps, ModalContent, type ModalContentProps, ModalDescription, type ModalDescriptionProps, ModalFooter, ModalHeader, type ModalProps, type ModalSectionProps, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, NumberInput, type NumberInputProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, type PaginationRangeOptions, type PaginationSlot, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, Quote, QuoteAuthor, type QuoteAuthorProps, QuoteCaption, type QuoteCaptionProps, QuoteContent, type QuoteContentProps, type QuoteProps, QuoteSource, type QuoteSourceProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, type RejectionCode, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, SearchBox, type SearchBoxProps, Select, SelectItem, type SelectItemProps, type SelectProps, Sidebar, SidebarContent, type SidebarContextValue, SidebarFooter, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, type SidebarGroupDivProps, SidebarGroupLabel, SidebarHeader, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, type SidebarSectionProps, SidebarSeparator, SidebarTrigger, type SidebarTriggerProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderValue, Spinner, type SpinnerProps, Stat, StatChange, type StatChangeProps, StatChart, type StatChartProps, StatGroup, type StatGroupProps, StatLabel, type StatLabelProps, type StatProps, StatValue, type StatValueProps, Step, StepDescription, type StepDescriptionProps, StepIndicator, type StepIndicatorProps, type StepProps, type StepState, StepTitle, type StepTitleProps, Steps, type StepsProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, type TableCellProps, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagInput, type TagInputProps, Textarea, type TextareaProps, Timeline, TimelineContent, type TimelineContentProps, TimelineDescription, type TimelineDescriptionProps, TimelineItem, type TimelineItemProps, TimelineMarker, type TimelineMarkerProps, type TimelineProps, type TimelineStatus, TimelineTime, type TimelineTimeProps, TimelineTitle, type TimelineTitleProps, type ToastAction, type ToastData, type ToastOptions, type ToastPosition, type ToastStore, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, type UploadFile, type UseFieldA11yOptions, accordionVariants, alertVariants, avatarVariants, badgeVariants, breadcrumbVariants, buttonVariants, cardVariants, checkboxVariants, circularProgressVariants, cn, comboboxTriggerVariants, comboboxVariants, commandVariants, createToast, createToastStore, datePickerVariants, dateRangePickerTriggerVariants, dateRangePickerVariants, descriptionListVariants, dividerVariants, drawerVariants, dropdownMenuVariants, emptyStateVariants, inputOTPVariants, inputVariants, linkVariants, listVariants, menubarContentVariants, menubarTriggerVariants, modalContentVariants, numberInputVariants, paginationLinkVariants, paginationRange, paginationVariants, popoverContentVariants, progressVariants, quoteVariants, radioGroupVariants, radioVariants, ratingVariants, scrollAreaVariants, selectTriggerVariants, sidebarMenuButtonVariants, sidebarMenuSubButtonVariants, skeletonVariants, sliderVariants, spinnerVariants, statGroupVariants, statVariants, stepVariants, stepsVariants, switchVariants, tableVariants, tabsListVariants, tabsVariants, tagInputVariants, textareaVariants, timelineMarkerVariants, timelineVariants, toast, toastStore, toastVariants, toastViewportVariants, toggleGroupVariants, toggleVariants, tooltipContentVariants, useDga, useDir, useFieldA11y, useIsMobile, useSidebar };
package/dist/index.js CHANGED
@@ -8,6 +8,10 @@ import {
8
8
  toggleVariants
9
9
  } from "./chunk-QFHAVVXT.js";
10
10
  import "./chunk-ZCO5QKH2.js";
11
+ import {
12
+ TagInput,
13
+ tagInputVariants
14
+ } from "./chunk-BTP7G7WR.js";
11
15
  import "./chunk-ZY5XXYXJ.js";
12
16
  import {
13
17
  Textarea,
@@ -38,6 +42,15 @@ import {
38
42
  toastStore
39
43
  } from "./chunk-ZKYBLXU7.js";
40
44
  import "./chunk-OSUT5FH5.js";
45
+ import {
46
+ Step,
47
+ StepDescription,
48
+ StepIndicator,
49
+ StepTitle,
50
+ Steps,
51
+ stepVariants,
52
+ stepsVariants
53
+ } from "./chunk-EJHBW4AK.js";
41
54
  import "./chunk-DPHQAA3B.js";
42
55
  import {
43
56
  Switch,
@@ -64,10 +77,6 @@ import {
64
77
  tabsListVariants,
65
78
  tabsVariants
66
79
  } from "./chunk-UXGJ6NTD.js";
67
- import {
68
- TagInput,
69
- tagInputVariants
70
- } from "./chunk-BTP7G7WR.js";
71
80
  import "./chunk-JVUANKS3.js";
72
81
  import {
73
82
  Slider,
@@ -81,20 +90,12 @@ import {
81
90
  StatLabel,
82
91
  StatValue,
83
92
  statVariants
84
- } from "./chunk-TO7F4EHC.js";
93
+ } from "./chunk-WOJUO43J.js";
85
94
  import {
86
95
  StatGroup,
87
96
  statGroupVariants
88
97
  } from "./chunk-DKRLAJZE.js";
89
- import {
90
- Step,
91
- StepDescription,
92
- StepIndicator,
93
- StepTitle,
94
- Steps,
95
- stepVariants,
96
- stepsVariants
97
- } from "./chunk-EJHBW4AK.js";
98
+ import "./chunk-KGXGTWUL.js";
98
99
  import "./chunk-R2JNRNK4.js";
99
100
  import {
100
101
  Sidebar,
@@ -133,17 +134,18 @@ import {
133
134
  TooltipTrigger,
134
135
  tooltipContentVariants
135
136
  } from "./chunk-IFB53HNO.js";
137
+ import "./chunk-WY4KTEIL.js";
136
138
  import {
137
139
  useSidebar
138
140
  } from "./chunk-F7NPGAKU.js";
139
141
  import {
140
142
  useIsMobile
141
143
  } from "./chunk-QHCXQQ2J.js";
142
- import "./chunk-WY4KTEIL.js";
143
144
  import {
144
145
  Skeleton,
145
146
  skeletonVariants
146
147
  } from "./chunk-RZEJPDIW.js";
148
+ import "./chunk-QPH2NCJF.js";
147
149
  import "./chunk-TQYLAWHW.js";
148
150
  import {
149
151
  Rating,
@@ -153,12 +155,11 @@ import "./chunk-JQJSYOJP.js";
153
155
  import {
154
156
  ScrollArea,
155
157
  scrollAreaVariants
156
- } from "./chunk-UAECZXU5.js";
158
+ } from "./chunk-TXQK3BAO.js";
157
159
  import "./chunk-HBCSQSOP.js";
158
160
  import {
159
161
  SearchBox
160
162
  } from "./chunk-FI65HI2H.js";
161
- import "./chunk-KGXGTWUL.js";
162
163
  import {
163
164
  Select,
164
165
  SelectItem,
@@ -182,7 +183,6 @@ import {
182
183
  QuoteSource,
183
184
  quoteVariants
184
185
  } from "./chunk-LQ4PCHBP.js";
185
- import "./chunk-QPH2NCJF.js";
186
186
  import {
187
187
  Radio,
188
188
  RadioGroup,
@@ -226,7 +226,10 @@ import {
226
226
  NumberInput,
227
227
  numberInputVariants
228
228
  } from "./chunk-NJIMQWBC.js";
229
- import "./chunk-KPONZTP7.js";
229
+ import "./chunk-B6ODWTVF.js";
230
+ import {
231
+ paginationRange
232
+ } from "./chunk-HIZSEYQY.js";
230
233
  import {
231
234
  Pagination,
232
235
  PaginationContent,
@@ -262,6 +265,19 @@ import {
262
265
  ListItemIcon,
263
266
  listVariants
264
267
  } from "./chunk-5QC5N3OO.js";
268
+ import "./chunk-O6AFVTKN.js";
269
+ import {
270
+ Drawer,
271
+ DrawerBody,
272
+ DrawerClose,
273
+ DrawerContent,
274
+ DrawerDescription,
275
+ DrawerFooter,
276
+ DrawerHeader,
277
+ DrawerTitle,
278
+ DrawerTrigger,
279
+ drawerVariants
280
+ } from "./chunk-VAF6PKVY.js";
265
281
  import "./chunk-2PESUXE3.js";
266
282
  import {
267
283
  DropdownMenu,
@@ -279,19 +295,6 @@ import {
279
295
  DropdownMenuTrigger,
280
296
  dropdownMenuVariants
281
297
  } from "./chunk-XCR3TPXT.js";
282
- import "./chunk-O6AFVTKN.js";
283
- import {
284
- Drawer,
285
- DrawerBody,
286
- DrawerClose,
287
- DrawerContent,
288
- DrawerDescription,
289
- DrawerFooter,
290
- DrawerHeader,
291
- DrawerTitle,
292
- DrawerTrigger,
293
- drawerVariants
294
- } from "./chunk-VAF6PKVY.js";
295
298
  import "./chunk-AMRMIZNY.js";
296
299
  import {
297
300
  EmptyState,
@@ -304,14 +307,14 @@ import {
304
307
  import "./chunk-MZALAXZZ.js";
305
308
  import {
306
309
  FileUpload
307
- } from "./chunk-YJQZQS7P.js";
310
+ } from "./chunk-GNL72FRN.js";
308
311
  import "./chunk-IW7UX7SA.js";
309
312
  import {
310
313
  CircularProgress,
311
314
  Progress,
312
315
  circularProgressVariants,
313
316
  progressVariants
314
- } from "./chunk-FWGFOC2T.js";
317
+ } from "./chunk-RSXDPFXK.js";
315
318
  import "./chunk-4SDRJW3D.js";
316
319
  import {
317
320
  DatePicker,
@@ -691,6 +694,7 @@ export {
691
694
  modalContentVariants,
692
695
  numberInputVariants,
693
696
  paginationLinkVariants,
697
+ paginationRange,
694
698
  paginationVariants,
695
699
  popoverContentVariants,
696
700
  progressVariants,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-dga/react",
3
- "version": "0.9.1",
3
+ "version": "0.10.1",
4
4
  "description": "React 19 components for the DGA (Digital Government Authority) design system , accessible, RTL-native, dark-mode ready.",
5
5
  "keywords": [
6
6
  "react",
@@ -56,12 +56,12 @@
56
56
  "cmdk": "^1.1.1",
57
57
  "radix-ui": "^1.0.0",
58
58
  "react-aria-components": "^1.17.0",
59
- "@dev-dga/tokens": "0.9.1"
59
+ "@dev-dga/tokens": "0.10.1"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "react": "^19.0.0",
63
63
  "react-dom": "^19.0.0",
64
- "@dev-dga/css": "0.9.1"
64
+ "@dev-dga/css": "0.10.1"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@storybook/react-vite": "^10.2.15",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/Progress/Progress.tsx"],"sourcesContent":["'use client';\n\nimport { Progress as ProgressPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\n\n// ─── 1. Variants ─── //\n\nconst progressVariants = cva('ddga-progress', {\n variants: {\n size: {\n sm: 'ddga-progress--sm',\n md: 'ddga-progress--md',\n lg: 'ddga-progress--lg',\n },\n color: {\n primary: 'ddga-progress--primary',\n success: 'ddga-progress--success',\n warning: 'ddga-progress--warning',\n destructive: 'ddga-progress--destructive',\n },\n },\n defaultVariants: {\n size: 'md',\n color: 'primary',\n },\n});\n\nconst circularProgressVariants = cva('ddga-circular-progress', {\n variants: {\n size: {\n sm: 'ddga-circular-progress--sm',\n md: 'ddga-circular-progress--md',\n lg: 'ddga-circular-progress--lg',\n },\n color: {\n primary: 'ddga-circular-progress--primary',\n success: 'ddga-circular-progress--success',\n warning: 'ddga-circular-progress--warning',\n destructive: 'ddga-circular-progress--destructive',\n },\n },\n defaultVariants: {\n size: 'md',\n color: 'primary',\n },\n});\n\n// ─── 2. Linear Progress (Radix) ─── //\n\ntype ProgressOwnProps = VariantProps<typeof progressVariants> & {\n /**\n * Current progress. `null` (or omitted) renders the indeterminate animation.\n * Otherwise clamp yourself to `[0, max]` — Radix Progress assumes the value\n * is in range.\n */\n value?: number | null;\n /** Maximum value. Defaults to 100. */\n max?: number;\n /**\n * Accessible label for the progressbar. Required for assistive tech —\n * Radix logs a warning if neither `aria-label` nor `aria-labelledby` is set.\n */\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n};\n\ntype ProgressProps = ProgressOwnProps &\n Omit<React.ComponentProps<typeof ProgressPrimitive.Root>, keyof ProgressOwnProps>;\n\nfunction Progress({ value = null, max = 100, size, color, className, ...props }: ProgressProps) {\n const isIndeterminate = value === null;\n const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, (value / max) * 100));\n\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n value={value}\n max={max}\n className={cn(progressVariants({ size, color }), className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"ddga-progress__indicator\"\n style={isIndeterminate ? undefined : { transform: `translateX(${pct - 100}%)` }}\n />\n </ProgressPrimitive.Root>\n );\n}\n\n// ─── 3. Circular Progress (custom SVG) ─── //\n\ntype CircularProgressOwnProps = VariantProps<typeof circularProgressVariants> & {\n value?: number | null;\n max?: number;\n /** Stroke width in px. Defaults to 4 (sm) / 5 (md) / 6 (lg). */\n thickness?: number;\n /**\n * Render the ring as `segments` discrete arcs (a radial stepper) instead of a\n * continuous arc. Pass an integer `>= 2`; values below that fall back to the\n * continuous ring. The number of filled segments is `round(pct × segments)`,\n * so `value={3} max={5} segments={5}` fills 3. Segmented mode is determinate —\n * a `null` value renders 0 filled (no spinner).\n */\n segments?: number;\n /** Render the label inside the ring (`%`, or `filled/segments` when segmented). */\n showLabel?: boolean;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n};\n\ntype CircularProgressProps = CircularProgressOwnProps &\n Omit<React.ComponentProps<'div'>, keyof CircularProgressOwnProps>;\n\nconst CIRCULAR_SIZES = { sm: 32, md: 48, lg: 72 } as const;\nconst CIRCULAR_DEFAULT_THICKNESS = { sm: 4, md: 5, lg: 6 } as const;\n// Fraction of each segment's angular slot left as the gap between segments.\nconst SEGMENT_GAP_FRACTION = 0.16;\n\nfunction CircularProgress({\n value = null,\n max = 100,\n size,\n color,\n thickness,\n segments,\n showLabel = false,\n className,\n ...props\n}: CircularProgressProps) {\n if (process.env.NODE_ENV === 'development' && !props['aria-label'] && !props['aria-labelledby']) {\n // Linear Progress inherits Radix's no-label warning; CircularProgress is a\n // hand-built `role=\"progressbar\"`, so it needs its own. The ring `showLabel`\n // is aria-hidden decoration, not an accessible name.\n console.warn(\n '[dga/Progress] <CircularProgress> has no accessible name. Pass `aria-label` or ' +\n '`aria-labelledby` so screen-reader users know what the progress represents.',\n );\n }\n\n const isIndeterminate = value === null;\n const isSegmented = typeof segments === 'number' && segments >= 2;\n const sizeKey = size ?? 'md';\n const diameter = CIRCULAR_SIZES[sizeKey];\n const strokeWidth = thickness ?? CIRCULAR_DEFAULT_THICKNESS[sizeKey];\n const radius = (diameter - strokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n const center = diameter / 2;\n\n const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, (value / max) * 100));\n const dashOffset = isIndeterminate ? circumference * 0.75 : circumference * (1 - pct / 100);\n\n // Mirror Radix Progress's data-state vocabulary so CSS can use a single\n // selector across linear + circular.\n const state = isIndeterminate ? 'indeterminate' : value >= max ? 'complete' : 'loading';\n\n // Segmented (radial-stepper) geometry: split the ring into `segments` arcs\n // with gaps. Each segment is a single dash of `segLen`, rotated into its slot;\n // the gap is centered so segments stay evenly spaced. Determinate-only.\n const segmentEls =\n isSegmented && segments\n ? (() => {\n const filled = isIndeterminate ? 0 : Math.round((pct / 100) * segments);\n const segAngle = 360 / segments;\n const gapAngle = segAngle * SEGMENT_GAP_FRACTION;\n const segLen = circumference * ((1 - SEGMENT_GAP_FRACTION) / segments);\n return Array.from({ length: segments }, (_, i) => (\n <circle\n key={i}\n className={cn(\n 'ddga-circular-progress__segment',\n i < filled && 'ddga-circular-progress__segment--filled',\n )}\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n // Butt caps, not round: round caps extend strokeWidth/2 past each\n // arc end and would swallow the gap (overlapping at small sizes).\n strokeLinecap=\"butt\"\n strokeDasharray={`${segLen} ${circumference}`}\n transform={`rotate(${-90 + i * segAngle + gapAngle / 2} ${center} ${center})`}\n />\n ));\n })()\n : null;\n\n const labelText = isSegmented\n ? `${segments ? Math.round((pct / 100) * segments) : 0}/${segments}`\n : `${Math.round(pct)}%`;\n\n return (\n <div\n data-slot=\"circular-progress\"\n data-state={state}\n data-segmented={isSegmented ? '' : undefined}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={isIndeterminate ? undefined : value}\n className={cn(circularProgressVariants({ size, color }), className)}\n style={{ inlineSize: diameter, blockSize: diameter }}\n {...props}\n >\n <svg\n className=\"ddga-circular-progress__svg\"\n viewBox={`0 0 ${diameter} ${diameter}`}\n width={diameter}\n height={diameter}\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n {isSegmented ? (\n segmentEls\n ) : (\n <>\n <circle\n className=\"ddga-circular-progress__track\"\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n />\n <circle\n className=\"ddga-circular-progress__indicator\"\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={dashOffset}\n transform={`rotate(-90 ${center} ${center})`}\n />\n </>\n )}\n </svg>\n {showLabel && !isIndeterminate ? (\n <span className=\"ddga-circular-progress__label\" aria-hidden=\"true\">\n {labelText}\n </span>\n ) : null}\n </div>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport { Progress, CircularProgress, progressVariants, circularProgressVariants };\nexport type { ProgressProps, CircularProgressProps };\n"],"mappings":";;;;;AAEA,SAAS,YAAY,yBAAyB;AAC9C,SAAS,WAA8B;AA+EjC,SAuII,UAvIJ,KAuII,YAvIJ;AA1EN,IAAM,mBAAmB,IAAI,iBAAiB;AAAA,EAC5C,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,MACT,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AACF,CAAC;AAED,IAAM,2BAA2B,IAAI,0BAA0B;AAAA,EAC7D,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,IACA,OAAO;AAAA,MACL,SAAS;AAAA,MACT,SAAS;AAAA,MACT,SAAS;AAAA,MACT,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AACF,CAAC;AAwBD,SAAS,SAAS,EAAE,QAAQ,MAAM,MAAM,KAAK,MAAM,OAAO,WAAW,GAAG,MAAM,GAAkB;AAC9F,QAAM,kBAAkB,UAAU;AAClC,QAAM,MAAM,kBAAkB,IAAI,KAAK,IAAI,KAAK,KAAK,IAAI,GAAI,QAAQ,MAAO,GAAG,CAAC;AAEhF,SACE;AAAA,IAAC,kBAAkB;AAAA,IAAlB;AAA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YAET,wBACC,aAEA,iCACE;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,IAAI;AAAA,kBACJ,IAAI;AAAA,kBACJ,GAAG;AAAA,kBACH,MAAK;AAAA,kBACL;AAAA;AAAA,cACF;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,IAAI;AAAA,kBACJ,IAAI;AAAA,kBACJ,GAAG;AAAA,kBACH,MAAK;AAAA,kBACL;AAAA,kBACA,eAAc;AAAA,kBACd,iBAAiB;AAAA,kBACjB,kBAAkB;AAAA,kBAClB,WAAW,cAAc,MAAM,IAAI,MAAM;AAAA;AAAA,cAC3C;AAAA,eACF;AAAA;AAAA,QAEJ;AAAA,QACC,aAAa,CAAC,kBACb,oBAAC,UAAK,WAAU,iCAAgC,eAAY,QACzD,qBACH,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-KPONZTP7.js.map
@@ -1 +0,0 @@
1
- "use strict";//# sourceMappingURL=chunk-M46YSH6K.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-PAUY27WX.cjs","../src/components/ScrollArea/ScrollArea.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACFA,mCAAkD;AAClD,kEAAuC;AA0EnC,+CAAA;AAnEJ,IAAM,mBAAA,EAAqB,yCAAA,kBAAsB,CAAA;AAEjD,SAAS,gBAAA,CAAiB,SAAA,EAAoB,cAAA,EAAyB;AACrE,EAAA,GAAA,CAAI,OAAA,CAAQ,GAAA,CAAI,SAAA,IAAa,YAAA,EAAc,MAAA;AAC3C,EAAA,GAAA,CAAI,UAAA,GAAa,cAAA,EAAgB,MAAA;AAEjC,EAAA,OAAA,CAAQ,IAAA;AAAA,IACN;AAAA,EAIF,CAAA;AACF;AAkCO,SAAS,UAAA,CAAW;AA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AG,iBAAA;AAAA,YAEH;AAAA,UAAA;AAAA,QACH,CAAA;AAAA,QACC,aAAA,kBACC,6BAAA;AAAA,UAAC,mBAAA,CAAoB,SAAA;AAAA,UAApB;AAAA,YACC,WAAA,EAAU,uBAAA;AAAA,YACV,WAAA,EAAY,UAAA;AAAA,YACZ,SAAA,EAAU,6BAAA;AAAA,YAEV,QAAA,kBAAA,6BAAA;AAAA,cAAC,mBAAA,CAAoB,KAAA;AAAA,cAApB;AAAA,gBACC,WAAA,EAAU,mBAAA;AAAA,gBACV,SAAA,EAAU;AAAA,cAAA;AAAA,YACZ;AAAA,UAAA;AAAA,QACF,EAAA,EACE,IAAA;AAAA,QACH,eAAA,kBACC,6BAAA;AAAA,UAAC,mBAAA,CAAoB,SAAA;AAAA,UAApB;AAAA,YACC,WAAA,EAAU,uBAAA;AAAA,YACV,WAAA,EAAY,YAAA;AAAA,YACZ,SAAA,EAAU,6BAAA;AAAA,YAEV,QAAA,kBAAA,6BAAA;AAAA,cAAC,mBAAA,CAAoB,KAAA;AAAA,cAApB;AAAA,gBACC,WAAA,EAAU,mBAAA;AAAA,gBACV,SAAA,EAAU;AAAA,cAAA;AAAA,YACZ;AAAA,UAAA;AAAA,QACF,EAAA,EACE,IAAA;AAAA,QACH,YAAA,IAAgB,OAAA,kBACf,6BAAA;AAAA,UAAC,mBAAA,CAAoB,MAAA;AAAA,UAApB;AAAA,YACC,WAAA,EAAU,oBAAA;AAAA,YACV,SAAA,EAAU;AAAA,UAAA;AAAA,QACZ,EAAA,EACE;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,CAAA;AAEJ;AD/BA;AACA;AACE;AACA;AACF,iFAAC","file":"/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-PAUY27WX.cjs","sourcesContent":[null,"'use client';\n\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\n\n// Orientation is driven by which scrollbar(s) render, NOT by a modifier class —\n// so the cva carries only the base class. (It previously emitted dead\n// `--vertical/--horizontal/--both` classes that no stylesheet matched.) Kept as\n// a cva and exported for API compatibility.\nconst scrollAreaVariants = cva('ddga-scroll-area');\n\nfunction warnMissingLabel(ariaLabel?: string, ariaLabelledby?: string) {\n if (process.env.NODE_ENV === 'production') return;\n if (ariaLabel || ariaLabelledby) return;\n // Warn on every render (dev only) — mirrors the Popover sibling's a11y warning.\n console.warn(\n '[dga/ScrollArea] <ScrollArea> has no accessible name. The scroll viewport is ' +\n 'keyboard-focusable; pass `aria-label` or `aria-labelledby` so screen-reader users ' +\n 'know what region they are scrolling. If the content is itself focusable (e.g. a list ' +\n 'of links) and you do not want a labelled region, pass `viewportProps={{ tabIndex: -1 }}`.',\n );\n}\n\ntype ScrollAreaOrientation = 'vertical' | 'horizontal' | 'both';\n\nexport interface ScrollAreaProps\n extends\n Omit<React.ComponentProps<typeof ScrollAreaPrimitive.Root>, 'asChild' | 'orientation'>,\n Omit<VariantProps<typeof scrollAreaVariants>, 'orientation'> {\n /** Which scrollbar(s) to render. Default `'vertical'`. */\n orientation?: ScrollAreaOrientation;\n /** Ref to the scrollable viewport — use for programmatic scrolling. */\n viewportRef?: React.Ref<HTMLDivElement>;\n /**\n * Extra props forwarded to the viewport element (use `viewportRef` for the ref).\n * To drop the extra tab stop when the scrolled content is itself fully focusable\n * (e.g. a list of links), pass `viewportProps={{ tabIndex: -1 }}`.\n */\n viewportProps?: Omit<React.ComponentProps<'div'>, 'ref'>;\n /** Names the scroll region. Warns (dev only) if neither this nor `aria-labelledby` is set. */\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n}\n\n/**\n * Cross-browser, design-system-styled scroll container (wraps Radix ScrollArea).\n *\n * Set the bounding size (height / max-height) on the element via `className` /\n * `style` — without a bounded size nothing scrolls, exactly like native overflow.\n * The viewport is keyboard-focusable (`tabIndex={0}`) so keyboard users can scroll\n * with the arrow / Page keys; pass `aria-label` to name the region.\n *\n * Does not support `asChild`: it is a structural wrapper composing several Radix\n * parts, and the meaningful node — the viewport — is exposed via `viewportRef`.\n */\nexport function ScrollArea({\n className,\n orientation = 'vertical',\n type = 'hover',\n scrollHideDelay = 600,\n viewportRef,\n viewportProps,\n children,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...props\n}: ScrollAreaProps) {\n warnMissingLabel(ariaLabel, ariaLabelledby);\n\n const hasLabel = Boolean(ariaLabel || ariaLabelledby);\n const showVertical = orientation === 'vertical' || orientation === 'both';\n const showHorizontal = orientation === 'horizontal' || orientation === 'both';\n\n const { className: viewportClassName, ...restViewportProps } = viewportProps ?? {};\n\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n type={type}\n scrollHideDelay={scrollHideDelay}\n className={cn(scrollAreaVariants(), className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className={cn('ddga-scroll-area__viewport', viewportClassName)}\n ref={viewportRef}\n tabIndex={0}\n role={hasLabel ? 'region' : undefined}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n {...restViewportProps}\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n {showVertical ? (\n <ScrollAreaPrimitive.Scrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation=\"vertical\"\n className=\"ddga-scroll-area__scrollbar\"\n >\n <ScrollAreaPrimitive.Thumb\n data-slot=\"scroll-area-thumb\"\n className=\"ddga-scroll-area__thumb\"\n />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n {showHorizontal ? (\n <ScrollAreaPrimitive.Scrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation=\"horizontal\"\n className=\"ddga-scroll-area__scrollbar\"\n >\n <ScrollAreaPrimitive.Thumb\n data-slot=\"scroll-area-thumb\"\n className=\"ddga-scroll-area__thumb\"\n />\n </ScrollAreaPrimitive.Scrollbar>\n ) : null}\n {orientation === 'both' ? (\n <ScrollAreaPrimitive.Corner\n data-slot=\"scroll-area-corner\"\n className=\"ddga-scroll-area__corner\"\n />\n ) : null}\n </ScrollAreaPrimitive.Root>\n );\n}\n\nexport { scrollAreaVariants };\nexport type { ScrollAreaOrientation };\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/Stat/Stat.tsx"],"sourcesContent":["'use client';\n\nimport { type ReactNode } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\nimport { CaretUp, CaretDown, Minus } from '../../internal/icons';\n\n// ─── 1. Variants (cva) ─── //\n\nconst statVariants = cva('ddga-stat', {\n variants: {\n variant: {\n flat: 'ddga-stat--flat',\n elevated: 'ddga-stat--elevated',\n accent: 'ddga-stat--accent',\n // Soft sentiment-tinted gradient surface (reuses the accent tint vars).\n gradient: 'ddga-stat--gradient',\n },\n size: {\n sm: 'ddga-stat--sm',\n md: 'ddga-stat--md',\n lg: 'ddga-stat--lg',\n // Hero/display size for headline KPIs (display-scale value).\n xl: 'ddga-stat--xl',\n },\n },\n defaultVariants: {\n variant: 'flat',\n size: 'md',\n },\n});\n\ntype ChangeVariant = 'text' | 'chip';\n\ntype Trend = 'up' | 'down' | 'flat';\ntype Sentiment = 'positive' | 'negative' | 'neutral';\n\n// trend → caret icon (carried aria-hidden; carets are RTL-neutral).\nconst TREND_ICONS: Record<Trend, ReactNode> = {\n up: <CaretUp aria-hidden=\"true\" />,\n down: <CaretDown aria-hidden=\"true\" />,\n flat: <Minus aria-hidden=\"true\" />,\n};\n\n// Default sentiment when none is given explicitly.\nconst TREND_SENTIMENT: Record<Trend, Sentiment> = {\n up: 'positive',\n down: 'negative',\n flat: 'neutral',\n};\n\n// Explicit sentiment wins; else derive from trend; else undefined (no color).\nfunction resolveSentiment(trend?: Trend, sentiment?: Sentiment): Sentiment | undefined {\n if (sentiment) return sentiment;\n if (trend) return TREND_SENTIMENT[trend];\n return undefined;\n}\n\n// ─── 2. Types ─── //\n\ninterface StatProps extends React.ComponentProps<'div'>, VariantProps<typeof statVariants> {\n /** Small, muted label above the value. */\n label?: ReactNode;\n /** The metric, pre-formatted by the consumer (e.g. \"3,204\", \"SAR 1.2M\"). */\n value?: ReactNode;\n /** Change text — include the sign (e.g. \"+12.5%\") so AT conveys direction. */\n change?: ReactNode;\n /** Muted context beside the change (e.g. \"vs last month\"). */\n changeLabel?: ReactNode;\n /** Arrow direction: up → CaretUp, down → CaretDown, flat → Minus. */\n trend?: Trend;\n /** Change color. Omitted → derived from `trend`. Explicit always wins. */\n sentiment?: Sentiment;\n /**\n * How the change renders: `'text'` (default — colored text + caret) or\n * `'chip'` (the same, wrapped in a sentiment-tinted pill). Threaded to the\n * inner `StatChange`.\n */\n changeVariant?: ChangeVariant;\n /** Optional icon at the inline-end of the label row (decorative). */\n icon?: ReactNode;\n}\n\ntype StatLabelProps = React.ComponentProps<'div'>;\ntype StatValueProps = React.ComponentProps<'div'>;\ntype StatChartProps = React.ComponentProps<'div'>;\ninterface StatChangeProps extends React.ComponentProps<'div'> {\n trend?: Trend;\n sentiment?: Sentiment;\n /** `'chip'` wraps the change in a sentiment-tinted pill. Defaults to `'text'`. */\n variant?: ChangeVariant;\n}\n\n// ─── 3. Components ─── //\n\nfunction Stat({\n variant,\n size,\n label,\n value,\n change,\n changeLabel,\n trend,\n sentiment,\n changeVariant,\n icon,\n className,\n children,\n ...props\n}: StatProps) {\n const resolvedSentiment = resolveSentiment(trend, sentiment);\n return (\n <div\n data-slot=\"stat\"\n data-variant={variant ?? 'flat'}\n data-trend={trend}\n data-sentiment={resolvedSentiment}\n className={cn(statVariants({ variant, size }), className)}\n {...props}\n >\n {label || icon ? (\n <div className=\"ddga-stat__label-row\">\n {label ? <StatLabel>{label}</StatLabel> : null}\n {icon ? (\n <span className=\"ddga-stat__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n ) : null}\n </div>\n ) : null}\n {value ? <StatValue>{value}</StatValue> : null}\n {change || changeLabel ? (\n <div className=\"ddga-stat__change-row\">\n {change ? (\n <StatChange trend={trend} sentiment={sentiment} variant={changeVariant}>\n {change}\n </StatChange>\n ) : null}\n {changeLabel ? <span className=\"ddga-stat__change-label\">{changeLabel}</span> : null}\n </div>\n ) : null}\n {children}\n </div>\n );\n}\n\nfunction StatLabel({ className, ...props }: StatLabelProps) {\n return <div data-slot=\"stat-label\" className={cn('ddga-stat__label', className)} {...props} />;\n}\n\nfunction StatValue({ className, ...props }: StatValueProps) {\n return <div data-slot=\"stat-value\" className={cn('ddga-stat__value', className)} {...props} />;\n}\n\n/**\n * Styled slot for a consumer-supplied sparkline / mini-chart. The library ships\n * no charting dependency — drop your own `<svg>`/chart in here and it gets a\n * consistent height + spacing, stretched to the tile width.\n */\nfunction StatChart({ className, ...props }: StatChartProps) {\n return <div data-slot=\"stat-chart\" className={cn('ddga-stat__chart', className)} {...props} />;\n}\n\nfunction StatChange({ trend, sentiment, variant, className, children, ...props }: StatChangeProps) {\n const resolvedSentiment = resolveSentiment(trend, sentiment);\n return (\n <div\n data-slot=\"stat-change\"\n data-trend={trend}\n data-sentiment={resolvedSentiment}\n className={cn(\n 'ddga-stat__change',\n resolvedSentiment ? `ddga-stat__change--${resolvedSentiment}` : null,\n variant === 'chip' && 'ddga-stat__change--chip',\n className,\n )}\n {...props}\n >\n {trend ? <span className=\"ddga-stat__change-icon\">{TREND_ICONS[trend]}</span> : null}\n {children}\n </div>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport { Stat, StatLabel, StatValue, StatChart, StatChange, statVariants };\nexport type { StatProps, StatLabelProps, StatValueProps, StatChartProps, StatChangeProps };\n"],"mappings":";;;;;;;;;;AAEA,OAA+B;AAC/B,SAAS,WAA8B;AAoCjC,cAkFE,YAlFF;AA9BN,IAAM,eAAe,IAAI,aAAa;AAAA,EACpC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,MACV,QAAQ;AAAA;AAAA,MAER,UAAU;AAAA,IACZ;AAAA,IACA,MAAM;AAAA,MACJ,IAAI;AA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AAS,eACtD,kBACH,IACE;AAAA,UACH,cAAc,oBAAC,UAAK,WAAU,2BAA2B,uBAAY,IAAU;AAAA,WAClF,IACE;AAAA,QACH;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAAmB;AAC1D,SAAO,oBAAC,SAAI,aAAU,cAAa,WAAW,GAAG,oBAAoB,SAAS,GAAI,GAAG,OAAO;AAC9F;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAAmB;AAC1D,SAAO,oBAAC,SAAI,aAAU,cAAa,WAAW,GAAG,oBAAoB,SAAS,GAAI,GAAG,OAAO;AAC9F;AAOA,SAAS,UAAU,EAAE,WAAW,GAAG,MAAM,GAAmB;AAC1D,SAAO,oBAAC,SAAI,aAAU,cAAa,WAAW,GAAG,oBAAoB,SAAS,GAAI,GAAG,OAAO;AAC9F;AAEA,SAAS,WAAW,EAAE,OAAO,WAAW,SAAS,WAAW,UAAU,GAAG,MAAM,GAAoB;AACjG,QAAM,oBAAoB,iBAAiB,OAAO,SAAS;AAC3D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,cAAY;AAAA,MACZ,kBAAgB;AAAA,MAChB,WAAW;AAAA,QACT;AAAA,QACA,oBAAoB,sBAAsB,iBAAiB,KAAK;AAAA,QAChE,YAAY,UAAU;AAAA,QACtB;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA,gBAAQ,oBAAC,UAAK,WAAU,0BAA0B,sBAAY,KAAK,GAAE,IAAU;AAAA,QAC/E;AAAA;AAAA;AAAA,EACH;AAEJ;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-W6B7GJLN.cjs","../src/components/Progress/Progress.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACFA,mCAA8C;AAC9C,kEAAuC;AA+EjC,+CAAA;AA1EN,I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BAAA;AACA,kBAAA;AACA,kBAAA;AACA,kBAAA;AAAyC,gBAAA;AAC3C,cAAA;AACF,YAAA;AAAA,UAAA;AAEJ,QAAA;AACe,QAAA;AAIX,MAAA;AAAA,IAAA;AACN,EAAA;AAEJ;ADnE0B;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/devdhaif/work/react/dga-dev/packages/react/dist/chunk-W6B7GJLN.cjs","sourcesContent":[null,"'use client';\n\nimport { Progress as ProgressPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../utils/cn';\n\n// ─── 1. Variants ─── //\n\nconst progressVariants = cva('ddga-progress', {\n variants: {\n size: {\n sm: 'ddga-progress--sm',\n md: 'ddga-progress--md',\n lg: 'ddga-progress--lg',\n },\n color: {\n primary: 'ddga-progress--primary',\n success: 'ddga-progress--success',\n warning: 'ddga-progress--warning',\n destructive: 'ddga-progress--destructive',\n },\n },\n defaultVariants: {\n size: 'md',\n color: 'primary',\n },\n});\n\nconst circularProgressVariants = cva('ddga-circular-progress', {\n variants: {\n size: {\n sm: 'ddga-circular-progress--sm',\n md: 'ddga-circular-progress--md',\n lg: 'ddga-circular-progress--lg',\n },\n color: {\n primary: 'ddga-circular-progress--primary',\n success: 'ddga-circular-progress--success',\n warning: 'ddga-circular-progress--warning',\n destructive: 'ddga-circular-progress--destructive',\n },\n },\n defaultVariants: {\n size: 'md',\n color: 'primary',\n },\n});\n\n// ─── 2. Linear Progress (Radix) ─── //\n\ntype ProgressOwnProps = VariantProps<typeof progressVariants> & {\n /**\n * Current progress. `null` (or omitted) renders the indeterminate animation.\n * Otherwise clamp yourself to `[0, max]` — Radix Progress assumes the value\n * is in range.\n */\n value?: number | null;\n /** Maximum value. Defaults to 100. */\n max?: number;\n /**\n * Accessible label for the progressbar. Required for assistive tech —\n * Radix logs a warning if neither `aria-label` nor `aria-labelledby` is set.\n */\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n};\n\ntype ProgressProps = ProgressOwnProps &\n Omit<React.ComponentProps<typeof ProgressPrimitive.Root>, keyof ProgressOwnProps>;\n\nfunction Progress({ value = null, max = 100, size, color, className, ...props }: ProgressProps) {\n const isIndeterminate = value === null;\n const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, (value / max) * 100));\n\n return (\n <ProgressPrimitive.Root\n data-slot=\"progress\"\n value={value}\n max={max}\n className={cn(progressVariants({ size, color }), className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className=\"ddga-progress__indicator\"\n style={isIndeterminate ? undefined : { transform: `translateX(${pct - 100}%)` }}\n />\n </ProgressPrimitive.Root>\n );\n}\n\n// ─── 3. Circular Progress (custom SVG) ─── //\n\ntype CircularProgressOwnProps = VariantProps<typeof circularProgressVariants> & {\n value?: number | null;\n max?: number;\n /** Stroke width in px. Defaults to 4 (sm) / 5 (md) / 6 (lg). */\n thickness?: number;\n /**\n * Render the ring as `segments` discrete arcs (a radial stepper) instead of a\n * continuous arc. Pass an integer `>= 2`; values below that fall back to the\n * continuous ring. The number of filled segments is `round(pct × segments)`,\n * so `value={3} max={5} segments={5}` fills 3. Segmented mode is determinate —\n * a `null` value renders 0 filled (no spinner).\n */\n segments?: number;\n /** Render the label inside the ring (`%`, or `filled/segments` when segmented). */\n showLabel?: boolean;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n};\n\ntype CircularProgressProps = CircularProgressOwnProps &\n Omit<React.ComponentProps<'div'>, keyof CircularProgressOwnProps>;\n\nconst CIRCULAR_SIZES = { sm: 32, md: 48, lg: 72 } as const;\nconst CIRCULAR_DEFAULT_THICKNESS = { sm: 4, md: 5, lg: 6 } as const;\n// Fraction of each segment's angular slot left as the gap between segments.\nconst SEGMENT_GAP_FRACTION = 0.16;\n\nfunction CircularProgress({\n value = null,\n max = 100,\n size,\n color,\n thickness,\n segments,\n showLabel = false,\n className,\n ...props\n}: CircularProgressProps) {\n if (process.env.NODE_ENV === 'development' && !props['aria-label'] && !props['aria-labelledby']) {\n // Linear Progress inherits Radix's no-label warning; CircularProgress is a\n // hand-built `role=\"progressbar\"`, so it needs its own. The ring `showLabel`\n // is aria-hidden decoration, not an accessible name.\n console.warn(\n '[dga/Progress] <CircularProgress> has no accessible name. Pass `aria-label` or ' +\n '`aria-labelledby` so screen-reader users know what the progress represents.',\n );\n }\n\n const isIndeterminate = value === null;\n const isSegmented = typeof segments === 'number' && segments >= 2;\n const sizeKey = size ?? 'md';\n const diameter = CIRCULAR_SIZES[sizeKey];\n const strokeWidth = thickness ?? CIRCULAR_DEFAULT_THICKNESS[sizeKey];\n const radius = (diameter - strokeWidth) / 2;\n const circumference = 2 * Math.PI * radius;\n const center = diameter / 2;\n\n const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, (value / max) * 100));\n const dashOffset = isIndeterminate ? circumference * 0.75 : circumference * (1 - pct / 100);\n\n // Mirror Radix Progress's data-state vocabulary so CSS can use a single\n // selector across linear + circular.\n const state = isIndeterminate ? 'indeterminate' : value >= max ? 'complete' : 'loading';\n\n // Segmented (radial-stepper) geometry: split the ring into `segments` arcs\n // with gaps. Each segment is a single dash of `segLen`, rotated into its slot;\n // the gap is centered so segments stay evenly spaced. Determinate-only.\n const segmentEls =\n isSegmented && segments\n ? (() => {\n const filled = isIndeterminate ? 0 : Math.round((pct / 100) * segments);\n const segAngle = 360 / segments;\n const gapAngle = segAngle * SEGMENT_GAP_FRACTION;\n const segLen = circumference * ((1 - SEGMENT_GAP_FRACTION) / segments);\n return Array.from({ length: segments }, (_, i) => (\n <circle\n key={i}\n className={cn(\n 'ddga-circular-progress__segment',\n i < filled && 'ddga-circular-progress__segment--filled',\n )}\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n // Butt caps, not round: round caps extend strokeWidth/2 past each\n // arc end and would swallow the gap (overlapping at small sizes).\n strokeLinecap=\"butt\"\n strokeDasharray={`${segLen} ${circumference}`}\n transform={`rotate(${-90 + i * segAngle + gapAngle / 2} ${center} ${center})`}\n />\n ));\n })()\n : null;\n\n const labelText = isSegmented\n ? `${segments ? Math.round((pct / 100) * segments) : 0}/${segments}`\n : `${Math.round(pct)}%`;\n\n return (\n <div\n data-slot=\"circular-progress\"\n data-state={state}\n data-segmented={isSegmented ? '' : undefined}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={isIndeterminate ? undefined : value}\n className={cn(circularProgressVariants({ size, color }), className)}\n style={{ inlineSize: diameter, blockSize: diameter }}\n {...props}\n >\n <svg\n className=\"ddga-circular-progress__svg\"\n viewBox={`0 0 ${diameter} ${diameter}`}\n width={diameter}\n height={diameter}\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n {isSegmented ? (\n segmentEls\n ) : (\n <>\n <circle\n className=\"ddga-circular-progress__track\"\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n />\n <circle\n className=\"ddga-circular-progress__indicator\"\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circumference}\n strokeDashoffset={dashOffset}\n transform={`rotate(-90 ${center} ${center})`}\n />\n </>\n )}\n </svg>\n {showLabel && !isIndeterminate ? (\n <span className=\"ddga-circular-progress__label\" aria-hidden=\"true\">\n {labelText}\n </span>\n ) : null}\n </div>\n );\n}\n\n// ─── 4. Exports ─── //\n\nexport { Progress, CircularProgress, progressVariants, circularProgressVariants };\nexport type { ProgressProps, CircularProgressProps };\n"]}