@tradalab/lyra 2.7.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -542,7 +542,14 @@ declare function SheetDescription({ className, ...props }: React$1.ComponentProp
542
542
 
543
543
  declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): React$1.JSX.Element;
544
544
 
545
- declare function Slider({ className, defaultValue, value, min, max, ...props }: React$1.ComponentProps<typeof Slider$1.Root>): React$1.JSX.Element;
545
+ /**
546
+ * Customised (primitives.lock.json): a single-thumb slider hands its accessible name and value
547
+ * text to the thumb. The thumb is the element with role="slider" that a screen reader lands on,
548
+ * and Radix names it only from the thumb's own props, so on the root these named nothing. A range
549
+ * keeps them on the root: one name on both thumbs would read as two identical controls, and Radix
550
+ * already calls them Minimum and Maximum.
551
+ */
552
+ declare function Slider({ className, defaultValue, value, min, max, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-valuetext": ariaValuetext, ...props }: React$1.ComponentProps<typeof Slider$1.Root>): React$1.JSX.Element;
546
553
 
547
554
  declare function Spinner({ className, ...props }: React.ComponentProps<"svg">): React$1.JSX.Element;
548
555
 
package/dist/ui/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  "use client";
2
- import { Label } from '../chunk-VA6K3TP3.js';
3
- export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Label, useComboboxAnchor } from '../chunk-VA6K3TP3.js';
4
- export { NativeSelect, NativeSelectOptGroup, NativeSelectOption, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from '../chunk-AM6UJ666.js';
5
- import { Separator } from '../chunk-HN3UZUCS.js';
6
- export { AccountMenu, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ScrollArea, ScrollBar, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, defaultAccountMenuLabels, initialsOf, useSidebar } from '../chunk-HN3UZUCS.js';
2
+ import { Spinner } from '../chunk-DUWK53B5.js';
3
+ export { Alert, AlertAction, AlertDescription, AlertTitle, Badge, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Label, Progress, Spinner, Switch, badgeVariants, useComboboxAnchor } from '../chunk-DUWK53B5.js';
4
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from '../chunk-CV3UXQBT.js';
5
+ export { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from '../chunk-FHM6VOPQ.js';
6
+ export { AccountMenu, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, ScrollArea, ScrollBar, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, defaultAccountMenuLabels, initialsOf, useSidebar } from '../chunk-BTZYRWFX.js';
7
7
  import '../chunk-QYA2HGKW.js';
8
- export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '../chunk-LZZ3UOPT.js';
8
+ import { Separator } from '../chunk-XJJQAQWJ.js';
9
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Separator } from '../chunk-XJJQAQWJ.js';
9
10
  export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from '../chunk-VEWKPOMS.js';
10
11
  export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from '../chunk-VDO6PQ5L.js';
11
12
  export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from '../chunk-XWGYXLIA.js';
@@ -14,10 +15,9 @@ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGr
14
15
  import { Button, buttonVariants } from '../chunk-VGOGWZCF.js';
15
16
  export { Button, Input, buttonVariants } from '../chunk-VGOGWZCF.js';
16
17
  import { cn } from '../chunk-XH55BHUU.js';
17
- import * as React8 from 'react';
18
- import { useMemo } from 'react';
19
- import { Direction, Accordion as Accordion$1, AlertDialog as AlertDialog$1, AspectRatio as AspectRatio$1, Slot, Checkbox as Checkbox$1, Collapsible as Collapsible$1, HoverCard as HoverCard$1, Menubar as Menubar$1, NavigationMenu as NavigationMenu$1, Progress as Progress$1, RadioGroup as RadioGroup$1, Select as Select$1, Slider as Slider$1, Switch as Switch$1, Tabs as Tabs$1, Toggle as Toggle$1, ToggleGroup as ToggleGroup$1 } from 'radix-ui';
20
- import { ChevronDownIcon, ChevronUpIcon, ChevronLeftIcon, ChevronRightIcon, CheckIcon, MinusIcon, ArrowDownIcon, MoreHorizontalIcon, Loader2Icon, XIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon } from 'lucide-react';
18
+ import * as React6 from 'react';
19
+ import { Direction, Accordion as Accordion$1, AlertDialog as AlertDialog$1, AspectRatio as AspectRatio$1, Slot, Checkbox as Checkbox$1, Collapsible as Collapsible$1, HoverCard as HoverCard$1, Menubar as Menubar$1, NavigationMenu as NavigationMenu$1, RadioGroup as RadioGroup$1, Select as Select$1, Slider as Slider$1, Tabs as Tabs$1, Toggle as Toggle$1, ToggleGroup as ToggleGroup$1 } from 'radix-ui';
20
+ import { ChevronDownIcon, ChevronUpIcon, ChevronLeftIcon, ChevronRightIcon, CheckIcon, MinusIcon, ArrowDownIcon, MoreHorizontalIcon, XIcon, CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, Loader2Icon } from 'lucide-react';
21
21
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
22
22
  import { cva } from 'class-variance-authority';
23
23
  import { getDefaultClassNames, DayPicker } from 'react-day-picker';
@@ -102,77 +102,6 @@ function AccordionContent({
102
102
  }
103
103
  );
104
104
  }
105
- var alertVariants = cva(
106
- "group/alert relative grid w-full gap-0.5 rounded-none border px-2.5 py-2 text-left text-xs has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
107
- {
108
- variants: {
109
- variant: {
110
- default: "bg-card text-card-foreground",
111
- destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
112
- }
113
- },
114
- defaultVariants: {
115
- variant: "default"
116
- }
117
- }
118
- );
119
- function Alert({
120
- className,
121
- variant,
122
- ...props
123
- }) {
124
- return /* @__PURE__ */ jsx(
125
- "div",
126
- {
127
- "data-slot": "alert",
128
- role: "alert",
129
- className: cn(alertVariants({ variant }), className),
130
- ...props
131
- }
132
- );
133
- }
134
- function AlertTitle({ className, ...props }) {
135
- return /* @__PURE__ */ jsx(
136
- "div",
137
- {
138
- "data-slot": "alert-title",
139
- className: cn(
140
- "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
141
- className
142
- ),
143
- ...props
144
- }
145
- );
146
- }
147
- function AlertDescription({
148
- className,
149
- ...props
150
- }) {
151
- return /* @__PURE__ */ jsx(
152
- "div",
153
- {
154
- "data-slot": "alert-description",
155
- className: cn(
156
- "text-xs/relaxed text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-2",
157
- className
158
- ),
159
- ...props
160
- }
161
- );
162
- }
163
- function AlertAction({ className, ...props }) {
164
- return /* @__PURE__ */ jsx(
165
- "div",
166
- {
167
- "data-slot": "alert-action",
168
- className: cn(
169
- "absolute top-[calc(--spacing(1.25))] right-[calc(--spacing(1.25))]",
170
- className
171
- ),
172
- ...props
173
- }
174
- );
175
- }
176
105
  function AlertDialog({
177
106
  ...props
178
107
  }) {
@@ -516,41 +445,6 @@ function AttachmentGroup({ className, ...props }) {
516
445
  }
517
446
  );
518
447
  }
519
- var badgeVariants = cva(
520
- "group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-none border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
521
- {
522
- variants: {
523
- variant: {
524
- default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
525
- secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
526
- destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
527
- outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
528
- ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
529
- link: "text-primary underline-offset-4 hover:underline"
530
- }
531
- },
532
- defaultVariants: {
533
- variant: "default"
534
- }
535
- }
536
- );
537
- function Badge({
538
- className,
539
- variant = "default",
540
- asChild = false,
541
- ...props
542
- }) {
543
- const Comp = asChild ? Slot.Root : "span";
544
- return /* @__PURE__ */ jsx(
545
- Comp,
546
- {
547
- "data-slot": "badge",
548
- "data-variant": variant,
549
- className: cn(badgeVariants({ variant }), className),
550
- ...props
551
- }
552
- );
553
- }
554
448
  function BubbleGroup({ className, ...props }) {
555
449
  return /* @__PURE__ */ jsx(
556
450
  "div",
@@ -869,8 +763,8 @@ function CalendarDayButton({
869
763
  ...props
870
764
  }) {
871
765
  const defaultClassNames = getDefaultClassNames();
872
- const ref = React8.useRef(null);
873
- React8.useEffect(() => {
766
+ const ref = React6.useRef(null);
767
+ React6.useEffect(() => {
874
768
  if (modifiers.focused) ref.current?.focus();
875
769
  }, [modifiers.focused]);
876
770
  return /* @__PURE__ */ jsx(
@@ -893,9 +787,9 @@ function CalendarDayButton({
893
787
  }
894
788
  );
895
789
  }
896
- var CarouselContext = React8.createContext(null);
790
+ var CarouselContext = React6.createContext(null);
897
791
  function useCarousel() {
898
- const context = React8.useContext(CarouselContext);
792
+ const context = React6.useContext(CarouselContext);
899
793
  if (!context) {
900
794
  throw new Error("useCarousel must be used within a <Carousel />");
901
795
  }
@@ -917,20 +811,20 @@ function Carousel({
917
811
  },
918
812
  plugins
919
813
  );
920
- const [canScrollPrev, setCanScrollPrev] = React8.useState(false);
921
- const [canScrollNext, setCanScrollNext] = React8.useState(false);
922
- const onSelect = React8.useCallback((api2) => {
814
+ const [canScrollPrev, setCanScrollPrev] = React6.useState(false);
815
+ const [canScrollNext, setCanScrollNext] = React6.useState(false);
816
+ const onSelect = React6.useCallback((api2) => {
923
817
  if (!api2) return;
924
818
  setCanScrollPrev(api2.canScrollPrev());
925
819
  setCanScrollNext(api2.canScrollNext());
926
820
  }, []);
927
- const scrollPrev = React8.useCallback(() => {
821
+ const scrollPrev = React6.useCallback(() => {
928
822
  api?.scrollPrev();
929
823
  }, [api]);
930
- const scrollNext = React8.useCallback(() => {
824
+ const scrollNext = React6.useCallback(() => {
931
825
  api?.scrollNext();
932
826
  }, [api]);
933
- const handleKeyDown = React8.useCallback(
827
+ const handleKeyDown = React6.useCallback(
934
828
  (event) => {
935
829
  if (event.key === "ArrowLeft") {
936
830
  event.preventDefault();
@@ -942,11 +836,11 @@ function Carousel({
942
836
  },
943
837
  [scrollPrev, scrollNext]
944
838
  );
945
- React8.useEffect(() => {
839
+ React6.useEffect(() => {
946
840
  if (!api || !setApi) return;
947
841
  setApi(api);
948
842
  }, [api, setApi]);
949
- React8.useEffect(() => {
843
+ React6.useEffect(() => {
950
844
  if (!api) return;
951
845
  onSelect(api);
952
846
  api.on("reInit", onSelect);
@@ -1080,9 +974,9 @@ function CarouselNext({
1080
974
  }
1081
975
  var THEMES = { light: "", dark: ".dark" };
1082
976
  var INITIAL_DIMENSION = { width: 320, height: 200 };
1083
- var ChartContext = React8.createContext(null);
977
+ var ChartContext = React6.createContext(null);
1084
978
  function useChart() {
1085
- const context = React8.useContext(ChartContext);
979
+ const context = React6.useContext(ChartContext);
1086
980
  if (!context) {
1087
981
  throw new Error("useChart must be used within a <ChartContainer />");
1088
982
  }
@@ -1096,7 +990,7 @@ function ChartContainer({
1096
990
  initialDimension = INITIAL_DIMENSION,
1097
991
  ...props
1098
992
  }) {
1099
- const uniqueId = React8.useId();
993
+ const uniqueId = React6.useId();
1100
994
  const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
1101
995
  return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
1102
996
  "div",
@@ -1163,7 +1057,7 @@ function ChartTooltipContent({
1163
1057
  labelKey
1164
1058
  }) {
1165
1059
  const { config } = useChart();
1166
- const tooltipLabel = React8.useMemo(() => {
1060
+ const tooltipLabel = React6.useMemo(() => {
1167
1061
  if (hideLabel || !payload?.length) {
1168
1062
  return null;
1169
1063
  }
@@ -1578,205 +1472,6 @@ function EmptyContent({ className, ...props }) {
1578
1472
  }
1579
1473
  );
1580
1474
  }
1581
- function FieldSet({ className, ...props }) {
1582
- return /* @__PURE__ */ jsx(
1583
- "fieldset",
1584
- {
1585
- "data-slot": "field-set",
1586
- className: cn(
1587
- "flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
1588
- className
1589
- ),
1590
- ...props
1591
- }
1592
- );
1593
- }
1594
- function FieldLegend({
1595
- className,
1596
- variant = "legend",
1597
- ...props
1598
- }) {
1599
- return /* @__PURE__ */ jsx(
1600
- "legend",
1601
- {
1602
- "data-slot": "field-legend",
1603
- "data-variant": variant,
1604
- className: cn(
1605
- "mb-2.5 font-medium data-[variant=label]:text-xs data-[variant=legend]:text-sm",
1606
- className
1607
- ),
1608
- ...props
1609
- }
1610
- );
1611
- }
1612
- function FieldGroup({ className, ...props }) {
1613
- return /* @__PURE__ */ jsx(
1614
- "div",
1615
- {
1616
- "data-slot": "field-group",
1617
- className: cn(
1618
- "group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
1619
- className
1620
- ),
1621
- ...props
1622
- }
1623
- );
1624
- }
1625
- var fieldVariants = cva(
1626
- "group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
1627
- {
1628
- variants: {
1629
- orientation: {
1630
- vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
1631
- horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
1632
- responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
1633
- }
1634
- },
1635
- defaultVariants: {
1636
- orientation: "vertical"
1637
- }
1638
- }
1639
- );
1640
- function Field({
1641
- className,
1642
- orientation = "vertical",
1643
- ...props
1644
- }) {
1645
- return /* @__PURE__ */ jsx(
1646
- "div",
1647
- {
1648
- role: "group",
1649
- "data-slot": "field",
1650
- "data-orientation": orientation,
1651
- className: cn(fieldVariants({ orientation }), className),
1652
- ...props
1653
- }
1654
- );
1655
- }
1656
- function FieldContent({ className, ...props }) {
1657
- return /* @__PURE__ */ jsx(
1658
- "div",
1659
- {
1660
- "data-slot": "field-content",
1661
- className: cn(
1662
- "group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
1663
- className
1664
- ),
1665
- ...props
1666
- }
1667
- );
1668
- }
1669
- function FieldLabel({
1670
- className,
1671
- ...props
1672
- }) {
1673
- return /* @__PURE__ */ jsx(
1674
- Label,
1675
- {
1676
- "data-slot": "field-label",
1677
- className: cn(
1678
- "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-none has-[>[data-slot=field]]:border *:data-[slot=field]:p-2 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
1679
- "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
1680
- className
1681
- ),
1682
- ...props
1683
- }
1684
- );
1685
- }
1686
- function FieldTitle({ className, ...props }) {
1687
- return /* @__PURE__ */ jsx(
1688
- "div",
1689
- {
1690
- "data-slot": "field-label",
1691
- className: cn(
1692
- "flex w-fit items-center gap-2 text-xs/relaxed group-data-[disabled=true]/field:opacity-50",
1693
- className
1694
- ),
1695
- ...props
1696
- }
1697
- );
1698
- }
1699
- function FieldDescription({ className, ...props }) {
1700
- return /* @__PURE__ */ jsx(
1701
- "p",
1702
- {
1703
- "data-slot": "field-description",
1704
- className: cn(
1705
- "text-left text-xs/relaxed leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
1706
- "last:mt-0 nth-last-2:-mt-1",
1707
- "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
1708
- className
1709
- ),
1710
- ...props
1711
- }
1712
- );
1713
- }
1714
- function FieldSeparator({
1715
- children,
1716
- className,
1717
- ...props
1718
- }) {
1719
- return /* @__PURE__ */ jsxs(
1720
- "div",
1721
- {
1722
- "data-slot": "field-separator",
1723
- "data-content": !!children,
1724
- className: cn(
1725
- "relative -my-2 h-5 text-xs group-data-[variant=outline]/field-group:-mb-2",
1726
- className
1727
- ),
1728
- ...props,
1729
- children: [
1730
- /* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }),
1731
- children && /* @__PURE__ */ jsx(
1732
- "span",
1733
- {
1734
- className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
1735
- "data-slot": "field-separator-content",
1736
- children
1737
- }
1738
- )
1739
- ]
1740
- }
1741
- );
1742
- }
1743
- function FieldError({
1744
- className,
1745
- children,
1746
- errors,
1747
- ...props
1748
- }) {
1749
- const content = useMemo(() => {
1750
- if (children) {
1751
- return children;
1752
- }
1753
- if (!errors?.length) {
1754
- return null;
1755
- }
1756
- const uniqueErrors = [
1757
- ...new Map(errors.map((error) => [error?.message, error])).values()
1758
- ];
1759
- if (uniqueErrors?.length == 1) {
1760
- return uniqueErrors[0]?.message;
1761
- }
1762
- return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
1763
- (error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
1764
- ) });
1765
- }, [children, errors]);
1766
- if (!content) {
1767
- return null;
1768
- }
1769
- return /* @__PURE__ */ jsx(
1770
- "div",
1771
- {
1772
- role: "alert",
1773
- "data-slot": "field-error",
1774
- className: cn("text-xs font-normal text-destructive", className),
1775
- ...props,
1776
- children: content
1777
- }
1778
- );
1779
- }
1780
1475
  function HoverCard({
1781
1476
  ...props
1782
1477
  }) {
@@ -1844,7 +1539,7 @@ function InputOTPSlot({
1844
1539
  className,
1845
1540
  ...props
1846
1541
  }) {
1847
- const inputOTPContext = React8.useContext(OTPInputContext);
1542
+ const inputOTPContext = React6.useContext(OTPInputContext);
1848
1543
  const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
1849
1544
  return /* @__PURE__ */ jsxs(
1850
1545
  "div",
@@ -2801,31 +2496,6 @@ function PaginationEllipsis({
2801
2496
  }
2802
2497
  );
2803
2498
  }
2804
- function Progress({
2805
- className,
2806
- value,
2807
- ...props
2808
- }) {
2809
- return /* @__PURE__ */ jsx(
2810
- Progress$1.Root,
2811
- {
2812
- "data-slot": "progress",
2813
- className: cn(
2814
- "relative flex h-1 w-full items-center overflow-x-hidden rounded-none bg-muted",
2815
- className
2816
- ),
2817
- ...props,
2818
- children: /* @__PURE__ */ jsx(
2819
- Progress$1.Indicator,
2820
- {
2821
- "data-slot": "progress-indicator",
2822
- className: "size-full flex-1 bg-primary transition-all",
2823
- style: { transform: `translateX(-${100 - (value || 0)}%)` }
2824
- }
2825
- )
2826
- }
2827
- );
2828
- }
2829
2499
  function RadioGroup({
2830
2500
  className,
2831
2501
  ...props
@@ -3073,12 +2743,17 @@ function Slider({
3073
2743
  value,
3074
2744
  min = 0,
3075
2745
  max = 100,
2746
+ "aria-label": ariaLabel,
2747
+ "aria-labelledby": ariaLabelledby,
2748
+ "aria-valuetext": ariaValuetext,
3076
2749
  ...props
3077
2750
  }) {
3078
- const _values = React8.useMemo(
2751
+ const _values = React6.useMemo(
3079
2752
  () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
3080
2753
  [value, defaultValue, min, max]
3081
2754
  );
2755
+ const single = _values.length === 1;
2756
+ const naming = { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-valuetext": ariaValuetext };
3082
2757
  return /* @__PURE__ */ jsxs(
3083
2758
  Slider$1.Root,
3084
2759
  {
@@ -3091,6 +2766,7 @@ function Slider({
3091
2766
  "relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",
3092
2767
  className
3093
2768
  ),
2769
+ ...single ? {} : naming,
3094
2770
  ...props,
3095
2771
  children: [
3096
2772
  /* @__PURE__ */ jsx(
@@ -3111,6 +2787,7 @@ function Slider({
3111
2787
  Slider$1.Thumb,
3112
2788
  {
3113
2789
  "data-slot": "slider-thumb",
2790
+ ...single ? naming : {},
3114
2791
  className: "relative block size-3 shrink-0 rounded-none border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-1 focus-visible:ring-1 focus-visible:outline-hidden active:ring-1 disabled:pointer-events-none disabled:opacity-50"
3115
2792
  },
3116
2793
  index
@@ -3119,34 +2796,6 @@ function Slider({
3119
2796
  }
3120
2797
  );
3121
2798
  }
3122
- function Spinner({ className, ...props }) {
3123
- return /* @__PURE__ */ jsx(Loader2Icon, { "data-slot": "spinner", role: "status", "aria-label": "Loading", className: cn("size-4 animate-spin", className), ...props });
3124
- }
3125
- function Switch({
3126
- className,
3127
- size = "default",
3128
- ...props
3129
- }) {
3130
- return /* @__PURE__ */ jsx(
3131
- Switch$1.Root,
3132
- {
3133
- "data-slot": "switch",
3134
- "data-size": size,
3135
- className: cn(
3136
- "peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
3137
- className
3138
- ),
3139
- ...props,
3140
- children: /* @__PURE__ */ jsx(
3141
- Switch$1.Thumb,
3142
- {
3143
- "data-slot": "switch-thumb",
3144
- className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
3145
- }
3146
- )
3147
- }
3148
- );
3149
- }
3150
2799
  function Tabs({
3151
2800
  className,
3152
2801
  orientation = "horizontal",
@@ -3433,7 +3082,7 @@ function Toggle({
3433
3082
  }
3434
3083
  );
3435
3084
  }
3436
- var ToggleGroupContext = React8.createContext({
3085
+ var ToggleGroupContext = React6.createContext({
3437
3086
  size: "default",
3438
3087
  variant: "default",
3439
3088
  spacing: 2,
@@ -3479,7 +3128,7 @@ function ToggleGroupItem({
3479
3128
  size = "default",
3480
3129
  ...props
3481
3130
  }) {
3482
- const context = React8.useContext(ToggleGroupContext);
3131
+ const context = React6.useContext(ToggleGroupContext);
3483
3132
  return /* @__PURE__ */ jsx(
3484
3133
  ToggleGroup$1.Item,
3485
3134
  {
@@ -3541,6 +3190,6 @@ function Container({ as: Component = "div", maxWidth = "xl", fluid = false, cent
3541
3190
  );
3542
3191
  }
3543
3192
 
3544
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionButton, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Badge, Bubble, BubbleContent, BubbleGroup, BubbleReactions, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Container, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Marker, MarkerContent, MarkerIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Slider, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, badgeVariants, buttonGroupVariants, createToastManager, markerVariants, navigationMenuTriggerStyle, tabsListVariants, toast, toggleVariants, useCarousel, useDirection, useToastManager };
3193
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionButton, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Bubble, BubbleContent, BubbleGroup, BubbleReactions, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Container, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, HoverCard, HoverCardContent, HoverCardTrigger, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Marker, MarkerContent, MarkerIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Slider, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, buttonGroupVariants, createToastManager, markerVariants, navigationMenuTriggerStyle, tabsListVariants, toast, toggleVariants, useCarousel, useDirection, useToastManager };
3545
3194
  //# sourceMappingURL=index.js.map
3546
3195
  //# sourceMappingURL=index.js.map