@brightlocal/ui-components 2.11.0 → 2.12.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.
Files changed (134) hide show
  1. package/component-meta.json +163 -12
  2. package/dist/blocks/data-table.cjs +1 -1
  3. package/dist/blocks/data-table.d.ts +16 -4
  4. package/dist/blocks/data-table.d.ts.map +1 -1
  5. package/dist/blocks/data-table.js +57 -53
  6. package/dist/blocks/input-list.cjs +2 -2
  7. package/dist/blocks/input-list.d.ts +7 -1
  8. package/dist/blocks/input-list.d.ts.map +1 -1
  9. package/dist/blocks/input-list.js +82 -81
  10. package/dist/blocks/sidebar.cjs +1 -1
  11. package/dist/blocks/sidebar.d.ts +18 -7
  12. package/dist/blocks/sidebar.d.ts.map +1 -1
  13. package/dist/blocks/sidebar.js +143 -136
  14. package/dist/breadcrumb.cjs +1 -1
  15. package/dist/breadcrumb.d.ts +14 -2
  16. package/dist/breadcrumb.d.ts.map +1 -1
  17. package/dist/breadcrumb.js +37 -37
  18. package/dist/callout.cjs +1 -1
  19. package/dist/callout.d.ts +3 -3
  20. package/dist/callout.d.ts.map +1 -1
  21. package/dist/callout.js +2 -1
  22. package/dist/carousel.cjs +1 -1
  23. package/dist/carousel.d.ts +24 -3
  24. package/dist/carousel.d.ts.map +1 -1
  25. package/dist/carousel.js +121 -117
  26. package/dist/chip.cjs +1 -1
  27. package/dist/chip.d.ts +11 -0
  28. package/dist/chip.d.ts.map +1 -1
  29. package/dist/chip.js +43 -38
  30. package/dist/combobox.cjs +3 -3
  31. package/dist/combobox.d.ts +12 -2
  32. package/dist/combobox.d.ts.map +1 -1
  33. package/dist/combobox.js +235 -230
  34. package/dist/command.cjs +1 -1
  35. package/dist/command.d.ts +5 -0
  36. package/dist/command.d.ts.map +1 -1
  37. package/dist/command.js +207 -206
  38. package/dist/date-picker.cjs +1 -1
  39. package/dist/date-picker.d.ts +10 -0
  40. package/dist/date-picker.d.ts.map +1 -1
  41. package/dist/date-picker.js +96 -96
  42. package/dist/dialog.cjs +1 -1
  43. package/dist/dialog.d.ts +7 -2
  44. package/dist/dialog.d.ts.map +1 -1
  45. package/dist/dialog.js +38 -30
  46. package/dist/drawer.d.ts +2 -2
  47. package/dist/global-layout.cjs +1 -1
  48. package/dist/global-layout.d.ts +5 -0
  49. package/dist/global-layout.d.ts.map +1 -1
  50. package/dist/global-layout.js +15 -7
  51. package/dist/index.cjs +1 -1
  52. package/dist/index.js +178 -178
  53. package/dist/input-chip.cjs +1 -1
  54. package/dist/input-chip.d.ts +7 -1
  55. package/dist/input-chip.d.ts.map +1 -1
  56. package/dist/input-chip.js +131 -130
  57. package/dist/input-group.d.ts +1 -1
  58. package/dist/input-password.cjs +1 -1
  59. package/dist/input-password.d.ts +10 -0
  60. package/dist/input-password.d.ts.map +1 -1
  61. package/dist/input-password.js +108 -106
  62. package/dist/link.cjs +1 -1
  63. package/dist/link.d.ts +1 -1
  64. package/dist/link.d.ts.map +1 -1
  65. package/dist/link.js +36 -37
  66. package/dist/list.d.ts +1 -1
  67. package/dist/logo.cjs +1 -1
  68. package/dist/logo.d.ts +6 -1
  69. package/dist/logo.d.ts.map +1 -1
  70. package/dist/logo.js +25 -22
  71. package/dist/map.cjs +1 -1
  72. package/dist/map.d.ts +17 -2
  73. package/dist/map.d.ts.map +1 -1
  74. package/dist/map.js +32 -26
  75. package/dist/pagination.cjs +1 -1
  76. package/dist/pagination.d.ts +29 -3
  77. package/dist/pagination.d.ts.map +1 -1
  78. package/dist/pagination.js +26 -25
  79. package/dist/rating.cjs +1 -1
  80. package/dist/rating.d.ts +6 -0
  81. package/dist/rating.d.ts.map +1 -1
  82. package/dist/rating.js +27 -19
  83. package/dist/resizable.d.ts +1 -1
  84. package/dist/select.cjs +2 -2
  85. package/dist/select.d.ts +7 -1
  86. package/dist/select.d.ts.map +1 -1
  87. package/dist/select.js +52 -51
  88. package/dist/separator.cjs +1 -1
  89. package/dist/separator.d.ts +16 -4
  90. package/dist/separator.d.ts.map +1 -1
  91. package/dist/separator.js +38 -35
  92. package/dist/sheet.cjs +1 -1
  93. package/dist/sheet.d.ts +6 -1
  94. package/dist/sheet.d.ts.map +1 -1
  95. package/dist/sheet.js +42 -41
  96. package/dist/skeleton.cjs +1 -1
  97. package/dist/skeleton.d.ts +5 -0
  98. package/dist/skeleton.d.ts.map +1 -1
  99. package/dist/skeleton.js +13 -11
  100. package/dist/text-reveal-motion.cjs +1 -1
  101. package/dist/text-reveal-motion.d.ts +5 -0
  102. package/dist/text-reveal-motion.d.ts.map +1 -1
  103. package/dist/text-reveal-motion.js +111 -110
  104. package/dist/typography.cjs +1 -1
  105. package/dist/typography.d.ts +1 -2
  106. package/dist/typography.d.ts.map +1 -1
  107. package/dist/typography.js +49 -50
  108. package/package.json +2 -3
  109. package/src/blocks/data-table.tsx +26 -9
  110. package/src/blocks/input-list.tsx +12 -1
  111. package/src/blocks/sidebar.tsx +43 -21
  112. package/src/components/breadcrumb.tsx +43 -26
  113. package/src/components/callout.tsx +5 -4
  114. package/src/components/carousel.tsx +33 -4
  115. package/src/components/chip.tsx +22 -2
  116. package/src/components/combobox.tsx +18 -3
  117. package/src/components/command.tsx +7 -1
  118. package/src/components/date-picker.tsx +17 -3
  119. package/src/components/dialog.tsx +17 -4
  120. package/src/components/drawer.tsx +2 -2
  121. package/src/components/global-layout.tsx +15 -2
  122. package/src/components/input-chip.tsx +12 -1
  123. package/src/components/input-password.tsx +73 -49
  124. package/src/components/link.tsx +29 -17
  125. package/src/components/logo.tsx +10 -2
  126. package/src/components/map.tsx +23 -0
  127. package/src/components/pagination.tsx +44 -11
  128. package/src/components/rating.tsx +20 -2
  129. package/src/components/select.tsx +9 -1
  130. package/src/components/separator.tsx +40 -25
  131. package/src/components/sheet.tsx +28 -20
  132. package/src/components/skeleton.tsx +13 -2
  133. package/src/components/text-reveal-motion.tsx +7 -1
  134. package/src/components/typography.tsx +6 -7
package/dist/index.js CHANGED
@@ -1,30 +1,30 @@
1
1
  import { Accordion as r, AccordionContent as t, AccordionItem as a, AccordionTrigger as n } from "./accordion.js";
2
2
  import { Alert as p, AlertDescription as l, AlertDestructive as u, AlertInfo as d, AlertSuccess as b, AlertTitle as C, AlertWarning as m, alertVariants as g } from "./alert.js";
3
- import { AlertDialog as s, AlertDialogAction as x, AlertDialogCancel as T, AlertDialogContent as c, AlertDialogDescription as D, AlertDialogFooter as M, AlertDialogHeader as f, AlertDialogOverlay as I, AlertDialogPortal as L, AlertDialogTitle as P, AlertDialogTrigger as h } from "./alert-dialog.js";
3
+ import { AlertDialog as s, AlertDialogAction as x, AlertDialogCancel as T, AlertDialogContent as M, AlertDialogDescription as D, AlertDialogFooter as c, AlertDialogHeader as f, AlertDialogOverlay as I, AlertDialogPortal as L, AlertDialogTitle as P, AlertDialogTrigger as h } from "./alert-dialog.js";
4
4
  import { AspectRatio as A } from "./aspect-ratio.js";
5
5
  import { Avatar as B, AvatarFallback as G, AvatarImage as R } from "./avatar.js";
6
- import { Badge as k } from "./badge.js";
6
+ import { Badge as H } from "./badge.js";
7
7
  import { Breadcrumb as V, BreadcrumbEllipsis as E, BreadcrumbItem as F, BreadcrumbLink as N, BreadcrumbList as O, BreadcrumbPage as _, BreadcrumbSeparator as z } from "./breadcrumb.js";
8
8
  import { Button as X, ButtonVariants as Y } from "./button.js";
9
9
  import { Calendar as q, CalendarDayButton as j } from "./calendar.js";
10
10
  import { Callout as K, CalloutCitation as Q, CalloutHeading as Z, calloutVariants as $ } from "./callout.js";
11
11
  import { Card as oe, CardAction as re, CardContent as te, CardDescription as ae, CardFooter as ne, CardHeader as ie, CardTitle as pe } from "./card.js";
12
12
  import { Carousel as ue, CarouselContent as de, CarouselDots as be, CarouselItem as Ce, CarouselNext as me, CarouselPrevious as ge } from "./carousel.js";
13
- import { ChartContainer as se, ChartLegend as xe, ChartLegendContent as Te, ChartStyle as ce, ChartTooltip as De, ChartTooltipContent as Me } from "./chart.js";
13
+ import { ChartContainer as se, ChartLegend as xe, ChartLegendContent as Te, ChartStyle as Me, ChartTooltip as De, ChartTooltipContent as ce } from "./chart.js";
14
14
  import { CentredLayout as Ie, CentredLayoutContent as Le, CentredLayoutHeader as Pe } from "./centred-layout.js";
15
15
  import { Checkbox as ye } from "./checkbox.js";
16
16
  import { Chip as we, chipVariants as Be } from "./chip.js";
17
- import { Collapsible as Re, CollapsibleContent as ve, CollapsibleTrigger as ke } from "./collapsible.js";
17
+ import { Collapsible as Re, CollapsibleContent as ve, CollapsibleTrigger as He } from "./collapsible.js";
18
18
  import { Combobox as Ve, ComboboxContent as Ee, ComboboxEmpty as Fe, ComboboxGroup as Ne, ComboboxInput as Oe, ComboboxItem as _e, ComboboxList as ze, ComboboxLoading as We, ComboboxSeparator as Xe, ComboboxTrigger as Ye, ComboboxValue as Ue, ComboboxVirtualList as qe } from "./combobox.js";
19
19
  import { Command as Je, CommandEmpty as Ke, CommandGroup as Qe, CommandInput as Ze, CommandItem as $e, CommandList as eo, CommandSeparator as oo, CommandShortcut as ro, CommandVirtualItem as to, CommandVirtualList as ao } from "./command.js";
20
20
  import { DEFAULT_DATE_PRESETS as io, DatePickerCalendar as po, DatePickerContent as lo, DatePickerPresets as uo, DatePickerRoot as bo, DatePickerTrigger as Co } from "./date-picker.js";
21
- import { ContextMenu as go, ContextMenuCheckboxItem as So, ContextMenuContent as so, ContextMenuGroup as xo, ContextMenuItem as To, ContextMenuLabel as co, ContextMenuPortal as Do, ContextMenuRadioGroup as Mo, ContextMenuRadioItem as fo, ContextMenuSeparator as Io, ContextMenuShortcut as Lo, ContextMenuSub as Po, ContextMenuSubContent as ho, ContextMenuSubTrigger as yo, ContextMenuTrigger as Ao } from "./context-menu.js";
21
+ import { ContextMenu as go, ContextMenuCheckboxItem as So, ContextMenuContent as so, ContextMenuGroup as xo, ContextMenuItem as To, ContextMenuLabel as Mo, ContextMenuPortal as Do, ContextMenuRadioGroup as co, ContextMenuRadioItem as fo, ContextMenuSeparator as Io, ContextMenuShortcut as Lo, ContextMenuSub as Po, ContextMenuSubContent as ho, ContextMenuSubTrigger as yo, ContextMenuTrigger as Ao } from "./context-menu.js";
22
22
  import { Description as Bo } from "./description.js";
23
- import { Dialog as Ro, DialogClose as vo, DialogContent as ko, DialogDescription as Ho, DialogFooter as Vo, DialogHeader as Eo, DialogOverlay as Fo, DialogPortal as No, DialogTitle as Oo, DialogTrigger as _o } from "./dialog.js";
23
+ import { Dialog as Ro, DialogClose as vo, DialogContent as Ho, DialogDescription as ko, DialogFooter as Vo, DialogHeader as Eo, DialogOverlay as Fo, DialogPortal as No, DialogTitle as Oo, DialogTrigger as _o } from "./dialog.js";
24
24
  import { Drawer as Wo, DrawerBody as Xo, DrawerClose as Yo, DrawerContent as Uo, DrawerDescription as qo, DrawerFooter as jo, DrawerHeader as Jo, DrawerOverlay as Ko, DrawerPortal as Qo, DrawerTitle as Zo, DrawerTrigger as $o } from "./drawer.js";
25
25
  import { DropdownMenu as or, DropdownMenuCheckboxItem as rr, DropdownMenuContent as tr, DropdownMenuGroup as ar, DropdownMenuItem as nr, DropdownMenuLabel as ir, DropdownMenuPortal as pr, DropdownMenuRadioGroup as lr, DropdownMenuRadioItem as ur, DropdownMenuSeparator as dr, DropdownMenuShortcut as br, DropdownMenuSub as Cr, DropdownMenuSubContent as mr, DropdownMenuSubTrigger as gr, DropdownMenuTrigger as Sr, DropdownMenuTriggerAvatar as sr } from "./dropdown-menu.js";
26
- import { Field as Tr, FieldContent as cr, FieldDescription as Dr, FieldError as Mr, FieldErrorIcon as fr, FieldGroup as Ir, FieldLabel as Lr, FieldLegend as Pr, FieldSet as hr, fieldLegendVariants as yr } from "./field.js";
27
- import { GlobalLayout as wr, GlobalLayoutContent as Br, GlobalLayoutContentBody as Gr, GlobalLayoutContentHeader as Rr, GlobalLayoutMobileHeader as vr, GlobalLayoutSidebar as kr } from "./global-layout.js";
26
+ import { Field as Tr, FieldContent as Mr, FieldDescription as Dr, FieldError as cr, FieldErrorIcon as fr, FieldGroup as Ir, FieldLabel as Lr, FieldLegend as Pr, FieldSet as hr, fieldLegendVariants as yr } from "./field.js";
27
+ import { GlobalLayout as wr, GlobalLayoutContent as Br, GlobalLayoutContentBody as Gr, GlobalLayoutContentHeader as Rr, GlobalLayoutMobileHeader as vr, GlobalLayoutSidebar as Hr } from "./global-layout.js";
28
28
  import { Header as Vr } from "./header.js";
29
29
  import { HoverCard as Fr, HoverCardContent as Nr, HoverCardTrigger as Or } from "./hover-card.js";
30
30
  import { Input as zr, inputVariants as Wr } from "./input.js";
@@ -33,40 +33,40 @@ import { InputGroup as Kr, InputGroupAddon as Qr, InputGroupButton as Zr, InputG
33
33
  import { InputOTP as tt, InputOTPDigitsOnly as at, InputOTPGroup as nt, InputOTPSeparator as it, InputOTPSimple as pt, InputOTPSlot as lt, InputOTPWithSeparator as ut, InputOTPWithSpacing as dt } from "./input-otp.js";
34
34
  import { Label as Ct, labelVariants as mt } from "./label.js";
35
35
  import { Link as St } from "./link.js";
36
- import { Item as xt, ItemActions as Tt, ItemContent as ct, ItemDescription as Dt, ItemMedia as Mt, ItemTitle as ft, List as It, itemVariants as Lt } from "./list.js";
36
+ import { Item as xt, ItemActions as Tt, ItemContent as Mt, ItemDescription as Dt, ItemMedia as ct, ItemTitle as ft, List as It, itemVariants as Lt } from "./list.js";
37
37
  import { Logo as ht } from "./logo.js";
38
- import { MapControlButton as At, MapErrorState as wt, MapGridPin as Bt, MapLegend as Gt, MapLoadingState as Rt, MapLocationPin as vt, MapPopover as kt, MapPopoverAnchor as Ht, MapPopoverContent as Vt, useMapPopoverHover as Et } from "./map.js";
39
- import { Menubar as Nt, MenubarCheckboxItem as Ot, MenubarContent as _t, MenubarItem as zt, MenubarLabel as Wt, MenubarMenu as Xt, MenubarRadioGroup as Yt, MenubarRadioItem as Ut, MenubarSeparator as qt, MenubarShortcut as jt, MenubarSub as Jt, MenubarSubContent as Kt, MenubarSubTrigger as Qt, MenubarTrigger as Zt } from "./menubar.js";
40
- import { NavigationMenu as ea, NavigationMenuContent as oa, NavigationMenuIndicator as ra, NavigationMenuItem as ta, NavigationMenuLink as aa, NavigationMenuList as na, NavigationMenuTrigger as ia, NavigationMenuViewport as pa } from "./navigation-menu.js";
41
- import { Pagination as ua, PaginationButton as da, PaginationContent as ba, PaginationEllipsis as Ca, PaginationItem as ma, PaginationLink as ga, PaginationNext as Sa, PaginationPrevious as sa, usePagination as xa } from "./pagination.js";
42
- import { DEFAULT_STRENGTH_LEVELS as ca, InputPasswordField as Da, InputPasswordRoot as Ma, InputPasswordStrength as fa, InputPasswordToggle as Ia, calculatePasswordStrength as La } from "./input-password.js";
43
- import { Popover as ha, PopoverAnchor as ya, PopoverContent as Aa, PopoverTrigger as wa } from "./popover.js";
44
- import { Progress as Ga } from "./progress.js";
45
- import { RadioGroup as va, RadioGroupItem as ka } from "./radio-group.js";
46
- import { Rating as Va } from "./rating.js";
47
- import { ResizableHandle as Fa, ResizablePanel as Na, ResizablePanelGroup as Oa } from "./resizable.js";
48
- import { ScrollArea as za, ScrollBar as Wa } from "./scroll-area.js";
49
- import { Select as Ya, SelectContent as Ua, SelectGroup as qa, SelectItem as ja, SelectLabel as Ja, SelectScrollDownButton as Ka, SelectScrollUpButton as Qa, SelectSeparator as Za, SelectTrigger as $a, SelectValue as en } from "./select.js";
50
- import { Separator as rn, SeparatorWithText as tn } from "./separator.js";
51
- import { Sheet as nn, SheetClose as pn, SheetContent as ln, SheetDescription as un, SheetFooter as dn, SheetHeader as bn, SheetOverlay as Cn, SheetPortal as mn, SheetTitle as gn, SheetTrigger as Sn } from "./sheet.js";
52
- import { Skeleton as xn } from "./skeleton.js";
53
- import { Slider as cn } from "./slider.js";
54
- import { Sonner as Mn, sonner as fn } from "./sonner.js";
55
- import { SplitLayout as Ln, SplitLayoutContentLeft as Pn, SplitLayoutContentRight as hn, SplitLayoutHeader as yn, SplitLayoutImage as An } from "./split-layout.js";
56
- import { Switch as Bn } from "./switch.js";
57
- import { Table as Rn, TableBody as vn, TableCaption as kn, TableCell as Hn, TableFooter as Vn, TableHead as En, TableHeader as Fn, TableRow as Nn } from "./table.js";
58
- import { Tabs as _n, TabsContent as zn, TabsList as Wn, TabsTrigger as Xn } from "./tabs.js";
59
- import { TextRevealMotion as Un } from "./text-reveal-motion.js";
60
- import { Textarea as jn } from "./textarea.js";
61
- import { Toggle as Kn, toggleVariants as Qn } from "./toggle.js";
62
- import { ToggleGroup as $n, ToggleGroupItem as ei } from "./toggle-group.js";
63
- import { Tooltip as ri, TooltipContent as ti, TooltipProvider as ai, TooltipTrigger as ni } from "./tooltip.js";
64
- import { TypographyBlockquote as pi, TypographyCode as li, TypographyH1 as ui, TypographyH2 as di, TypographyH3 as bi, TypographyH4 as Ci, TypographyInlineCode as mi, TypographyLarge as gi, TypographyLead as Si, TypographyList as si, TypographyMuted as xi, TypographyP as Ti, TypographySmall as ci, blockquoteVariants as Di } from "./typography.js";
65
- import { DataTable as fi, DataTableColumnHeader as Ii, DataTablePagination as Li, DataTablePaginationNav as Pi, DataTablePaginationRowCount as hi, DataTableSearch as yi, DataTableSelectAllCheckbox as Ai, DataTableSelectRowCheckbox as wi, DataTableToolbar as Bi, DataTableToolbarLeft as Gi, DataTableToolbarRight as Ri, VirtualizedDataTable as vi, useDataTable as ki } from "./blocks/data-table.js";
38
+ import { MapControlButton as At, MapErrorState as wt, MapGridPin as Bt, MapLegend as Gt, MapLoadingState as Rt, MapLocationPin as vt, MapPopover as Ht, MapPopoverAnchor as kt, MapPopoverContent as Vt, MapTypeId as Et, useMapPopoverHover as Ft } from "./map.js";
39
+ import { Menubar as Ot, MenubarCheckboxItem as _t, MenubarContent as zt, MenubarItem as Wt, MenubarLabel as Xt, MenubarMenu as Yt, MenubarRadioGroup as Ut, MenubarRadioItem as qt, MenubarSeparator as jt, MenubarShortcut as Jt, MenubarSub as Kt, MenubarSubContent as Qt, MenubarSubTrigger as Zt, MenubarTrigger as $t } from "./menubar.js";
40
+ import { NavigationMenu as oa, NavigationMenuContent as ra, NavigationMenuIndicator as ta, NavigationMenuItem as aa, NavigationMenuLink as na, NavigationMenuList as ia, NavigationMenuTrigger as pa, NavigationMenuViewport as la } from "./navigation-menu.js";
41
+ import { Pagination as da, PaginationButton as ba, PaginationContent as Ca, PaginationEllipsis as ma, PaginationItem as ga, PaginationLink as Sa, PaginationNext as sa, PaginationPrevious as xa, usePagination as Ta } from "./pagination.js";
42
+ import { DEFAULT_STRENGTH_LEVELS as Da, InputPasswordField as ca, InputPasswordRoot as fa, InputPasswordStrength as Ia, InputPasswordToggle as La, calculatePasswordStrength as Pa } from "./input-password.js";
43
+ import { Popover as ya, PopoverAnchor as Aa, PopoverContent as wa, PopoverTrigger as Ba } from "./popover.js";
44
+ import { Progress as Ra } from "./progress.js";
45
+ import { RadioGroup as Ha, RadioGroupItem as ka } from "./radio-group.js";
46
+ import { Rating as Ea } from "./rating.js";
47
+ import { ResizableHandle as Na, ResizablePanel as Oa, ResizablePanelGroup as _a } from "./resizable.js";
48
+ import { ScrollArea as Wa, ScrollBar as Xa } from "./scroll-area.js";
49
+ import { Select as Ua, SelectContent as qa, SelectGroup as ja, SelectItem as Ja, SelectLabel as Ka, SelectScrollDownButton as Qa, SelectScrollUpButton as Za, SelectSeparator as $a, SelectTrigger as en, SelectValue as on } from "./select.js";
50
+ import { Separator as tn, SeparatorWithText as an } from "./separator.js";
51
+ import { Sheet as pn, SheetClose as ln, SheetContent as un, SheetDescription as dn, SheetFooter as bn, SheetHeader as Cn, SheetOverlay as mn, SheetPortal as gn, SheetTitle as Sn, SheetTrigger as sn } from "./sheet.js";
52
+ import { Skeleton as Tn } from "./skeleton.js";
53
+ import { Slider as Dn } from "./slider.js";
54
+ import { Sonner as fn, sonner as In } from "./sonner.js";
55
+ import { SplitLayout as Pn, SplitLayoutContentLeft as hn, SplitLayoutContentRight as yn, SplitLayoutHeader as An, SplitLayoutImage as wn } from "./split-layout.js";
56
+ import { Switch as Gn } from "./switch.js";
57
+ import { Table as vn, TableBody as Hn, TableCaption as kn, TableCell as Vn, TableFooter as En, TableHead as Fn, TableHeader as Nn, TableRow as On } from "./table.js";
58
+ import { Tabs as zn, TabsContent as Wn, TabsList as Xn, TabsTrigger as Yn } from "./tabs.js";
59
+ import { TextRevealMotion as qn } from "./text-reveal-motion.js";
60
+ import { Textarea as Jn } from "./textarea.js";
61
+ import { Toggle as Qn, toggleVariants as Zn } from "./toggle.js";
62
+ import { ToggleGroup as ei, ToggleGroupItem as oi } from "./toggle-group.js";
63
+ import { Tooltip as ti, TooltipContent as ai, TooltipProvider as ni, TooltipTrigger as ii } from "./tooltip.js";
64
+ import { TypographyBlockquote as li, TypographyCode as ui, TypographyH1 as di, TypographyH2 as bi, TypographyH3 as Ci, TypographyH4 as mi, TypographyInlineCode as gi, TypographyLarge as Si, TypographyLead as si, TypographyList as xi, TypographyMuted as Ti, TypographyP as Mi, TypographySmall as Di } from "./typography.js";
65
+ import { DataTable as fi, DataTableColumnHeader as Ii, DataTablePagination as Li, DataTablePaginationNav as Pi, DataTablePaginationRowCount as hi, DataTableSearch as yi, DataTableSelectAllCheckbox as Ai, DataTableSelectRowCheckbox as wi, DataTableToolbar as Bi, DataTableToolbarLeft as Gi, DataTableToolbarRight as Ri, VirtualizedDataTable as vi, useDataTable as Hi } from "./blocks/data-table.js";
66
66
  import { InputList as Vi, InputListAddButton as Ei, InputListInput as Fi, InputListItems as Ni, useInputListContext as Oi } from "./blocks/input-list.js";
67
- import { Sidebar as zi, SidebarCollapseIcon as Wi, SidebarCollapseIconType as Xi, SidebarCollapsible as Yi, SidebarContent as Ui, SidebarDrawer as qi, SidebarFooter as ji, SidebarGroup as Ji, SidebarGroupAction as Ki, SidebarGroupContent as Qi, SidebarGroupLabel as Zi, SidebarGroupLabelSize as $i, SidebarGroupLabelVariant as ep, SidebarHeader as op, SidebarInput as rp, SidebarInset as tp, SidebarMenu as ap, SidebarMenuAction as np, SidebarMenuBadge as ip, SidebarMenuButton as pp, SidebarMenuButtonSize as lp, SidebarMenuButtonVariant as up, SidebarMenuCollapsible as dp, SidebarMenuCollapsibleContent as bp, SidebarMenuCollapsibleTrigger as Cp, SidebarMenuItem as mp, SidebarMenuSkeleton as gp, SidebarMenuSub as Sp, SidebarMenuSubButton as sp, SidebarMenuSubButtonSize as xp, SidebarMenuSubItem as Tp, SidebarMenuSubVariant as cp, SidebarProvider as Dp, SidebarRail as Mp, SidebarSeparator as fp, SidebarSide as Ip, SidebarTrigger as Lp, SidebarVariant as Pp, useSidebar as hp } from "./blocks/sidebar.js";
67
+ import { Sidebar as zi, SidebarCollapseIcon as Wi, SidebarCollapseIconType as Xi, SidebarCollapsible as Yi, SidebarContent as Ui, SidebarDrawer as qi, SidebarFooter as ji, SidebarGroup as Ji, SidebarGroupAction as Ki, SidebarGroupContent as Qi, SidebarGroupLabel as Zi, SidebarGroupLabelSize as $i, SidebarGroupLabelVariant as ep, SidebarHeader as op, SidebarInput as rp, SidebarInset as tp, SidebarMenu as ap, SidebarMenuAction as np, SidebarMenuBadge as ip, SidebarMenuButton as pp, SidebarMenuButtonSize as lp, SidebarMenuButtonVariant as up, SidebarMenuCollapsible as dp, SidebarMenuCollapsibleContent as bp, SidebarMenuCollapsibleTrigger as Cp, SidebarMenuItem as mp, SidebarMenuSkeleton as gp, SidebarMenuSub as Sp, SidebarMenuSubButton as sp, SidebarMenuSubButtonSize as xp, SidebarMenuSubItem as Tp, SidebarMenuSubVariant as Mp, SidebarProvider as Dp, SidebarRail as cp, SidebarSeparator as fp, SidebarSide as Ip, SidebarTrigger as Lp, SidebarVariant as Pp, useSidebar as hp } from "./blocks/sidebar.js";
68
68
  import { useDebounce as Ap } from "./hooks/use-debounce.js";
69
- import { getBreakpointValue as Bp, getBreakpointValue as Gp, isBelowBreakpoint as Rp, isBelowBreakpoint as vp, useIsBelowBreakpoint as kp, useIsBelowBreakpoint as Hp } from "./hooks/use-breakpoint.js";
69
+ import { getBreakpointValue as Bp, getBreakpointValue as Gp, isBelowBreakpoint as Rp, isBelowBreakpoint as vp, useIsBelowBreakpoint as Hp, useIsBelowBreakpoint as kp } from "./hooks/use-breakpoint.js";
70
70
  import { usePrefersReducedMotion as Ep } from "./hooks/use-prefers-reduced-motion.js";
71
71
  import { cn as Np } from "./lib/utils.js";
72
72
  import { Area as _p, AreaChart as zp, Bar as Wp, BarChart as Xp, CartesianGrid as Yp, Cell as Up, Label as qp, Legend as jp, Tooltip as Jp, Customized as Kp, LabelList as Qp, Line as Zp, LineChart as $p, Pie as el, PieChart as ol, PolarAngleAxis as rl, PolarGrid as tl, PolarRadiusAxis as al, Radar as nl, RadarChart as il, RadialBar as pl, RadialBarChart as ll, Rectangle as ul, ReferenceLine as dl, ResponsiveContainer as bl, Sector as Cl, XAxis as ml, YAxis as gl } from "recharts";
@@ -82,9 +82,9 @@ export {
82
82
  s as AlertDialog,
83
83
  x as AlertDialogAction,
84
84
  T as AlertDialogCancel,
85
- c as AlertDialogContent,
85
+ M as AlertDialogContent,
86
86
  D as AlertDialogDescription,
87
- M as AlertDialogFooter,
87
+ c as AlertDialogFooter,
88
88
  f as AlertDialogHeader,
89
89
  I as AlertDialogOverlay,
90
90
  L as AlertDialogPortal,
@@ -100,7 +100,7 @@ export {
100
100
  B as Avatar,
101
101
  G as AvatarFallback,
102
102
  R as AvatarImage,
103
- k as Badge,
103
+ H as Badge,
104
104
  Wp as Bar,
105
105
  Xp as BarChart,
106
106
  V as Breadcrumb,
@@ -139,16 +139,16 @@ export {
139
139
  qp as ChartLabel,
140
140
  xe as ChartLegend,
141
141
  Te as ChartLegendContent,
142
- ce as ChartStyle,
142
+ Me as ChartStyle,
143
143
  De as ChartTooltip,
144
- Me as ChartTooltipContent,
144
+ ce as ChartTooltipContent,
145
145
  jp as ChartsLegend,
146
146
  Jp as ChartsTooltip,
147
147
  ye as Checkbox,
148
148
  we as Chip,
149
149
  Re as Collapsible,
150
150
  ve as CollapsibleContent,
151
- ke as CollapsibleTrigger,
151
+ He as CollapsibleTrigger,
152
152
  Ve as Combobox,
153
153
  Ee as ComboboxContent,
154
154
  Fe as ComboboxEmpty,
@@ -176,9 +176,9 @@ export {
176
176
  so as ContextMenuContent,
177
177
  xo as ContextMenuGroup,
178
178
  To as ContextMenuItem,
179
- co as ContextMenuLabel,
179
+ Mo as ContextMenuLabel,
180
180
  Do as ContextMenuPortal,
181
- Mo as ContextMenuRadioGroup,
181
+ co as ContextMenuRadioGroup,
182
182
  fo as ContextMenuRadioItem,
183
183
  Io as ContextMenuSeparator,
184
184
  Lo as ContextMenuShortcut,
@@ -188,7 +188,7 @@ export {
188
188
  Ao as ContextMenuTrigger,
189
189
  Kp as Customized,
190
190
  io as DEFAULT_DATE_PRESETS,
191
- ca as DEFAULT_STRENGTH_LEVELS,
191
+ Da as DEFAULT_STRENGTH_LEVELS,
192
192
  fi as DataTable,
193
193
  Ii as DataTableColumnHeader,
194
194
  Li as DataTablePagination,
@@ -208,8 +208,8 @@ export {
208
208
  Bo as Description,
209
209
  Ro as Dialog,
210
210
  vo as DialogClose,
211
- ko as DialogContent,
212
- Ho as DialogDescription,
211
+ Ho as DialogContent,
212
+ ko as DialogDescription,
213
213
  Vo as DialogFooter,
214
214
  Eo as DialogHeader,
215
215
  Fo as DialogOverlay,
@@ -244,9 +244,9 @@ export {
244
244
  Sr as DropdownMenuTrigger,
245
245
  sr as DropdownMenuTriggerAvatar,
246
246
  Tr as Field,
247
- cr as FieldContent,
247
+ Mr as FieldContent,
248
248
  Dr as FieldDescription,
249
- Mr as FieldError,
249
+ cr as FieldError,
250
250
  fr as FieldErrorIcon,
251
251
  Ir as FieldGroup,
252
252
  Lr as FieldLabel,
@@ -257,7 +257,7 @@ export {
257
257
  Gr as GlobalLayoutContentBody,
258
258
  Rr as GlobalLayoutContentHeader,
259
259
  vr as GlobalLayoutMobileHeader,
260
- kr as GlobalLayoutSidebar,
260
+ Hr as GlobalLayoutSidebar,
261
261
  Vr as Header,
262
262
  Fr as HoverCard,
263
263
  Nr as HoverCardContent,
@@ -282,15 +282,15 @@ export {
282
282
  lt as InputOTPSlot,
283
283
  ut as InputOTPWithSeparator,
284
284
  dt as InputOTPWithSpacing,
285
- Da as InputPasswordField,
286
- Ma as InputPasswordRoot,
287
- fa as InputPasswordStrength,
288
- Ia as InputPasswordToggle,
285
+ ca as InputPasswordField,
286
+ fa as InputPasswordRoot,
287
+ Ia as InputPasswordStrength,
288
+ La as InputPasswordToggle,
289
289
  xt as Item,
290
290
  Tt as ItemActions,
291
- ct as ItemContent,
291
+ Mt as ItemContent,
292
292
  Dt as ItemDescription,
293
- Mt as ItemMedia,
293
+ ct as ItemMedia,
294
294
  ft as ItemTitle,
295
295
  Ct as Label,
296
296
  Qp as LabelList,
@@ -305,49 +305,50 @@ export {
305
305
  Gt as MapLegend,
306
306
  Rt as MapLoadingState,
307
307
  vt as MapLocationPin,
308
- kt as MapPopover,
309
- Ht as MapPopoverAnchor,
308
+ Ht as MapPopover,
309
+ kt as MapPopoverAnchor,
310
310
  Vt as MapPopoverContent,
311
- Nt as Menubar,
312
- Ot as MenubarCheckboxItem,
313
- _t as MenubarContent,
314
- zt as MenubarItem,
315
- Wt as MenubarLabel,
316
- Xt as MenubarMenu,
317
- Yt as MenubarRadioGroup,
318
- Ut as MenubarRadioItem,
319
- qt as MenubarSeparator,
320
- jt as MenubarShortcut,
321
- Jt as MenubarSub,
322
- Kt as MenubarSubContent,
323
- Qt as MenubarSubTrigger,
324
- Zt as MenubarTrigger,
325
- ea as NavigationMenu,
326
- oa as NavigationMenuContent,
327
- ra as NavigationMenuIndicator,
328
- ta as NavigationMenuItem,
329
- aa as NavigationMenuLink,
330
- na as NavigationMenuList,
331
- ia as NavigationMenuTrigger,
332
- pa as NavigationMenuViewport,
333
- ua as Pagination,
334
- da as PaginationButton,
335
- ba as PaginationContent,
336
- Ca as PaginationEllipsis,
337
- ma as PaginationItem,
338
- ga as PaginationLink,
339
- Sa as PaginationNext,
340
- sa as PaginationPrevious,
311
+ Et as MapTypeId,
312
+ Ot as Menubar,
313
+ _t as MenubarCheckboxItem,
314
+ zt as MenubarContent,
315
+ Wt as MenubarItem,
316
+ Xt as MenubarLabel,
317
+ Yt as MenubarMenu,
318
+ Ut as MenubarRadioGroup,
319
+ qt as MenubarRadioItem,
320
+ jt as MenubarSeparator,
321
+ Jt as MenubarShortcut,
322
+ Kt as MenubarSub,
323
+ Qt as MenubarSubContent,
324
+ Zt as MenubarSubTrigger,
325
+ $t as MenubarTrigger,
326
+ oa as NavigationMenu,
327
+ ra as NavigationMenuContent,
328
+ ta as NavigationMenuIndicator,
329
+ aa as NavigationMenuItem,
330
+ na as NavigationMenuLink,
331
+ ia as NavigationMenuList,
332
+ pa as NavigationMenuTrigger,
333
+ la as NavigationMenuViewport,
334
+ da as Pagination,
335
+ ba as PaginationButton,
336
+ Ca as PaginationContent,
337
+ ma as PaginationEllipsis,
338
+ ga as PaginationItem,
339
+ Sa as PaginationLink,
340
+ sa as PaginationNext,
341
+ xa as PaginationPrevious,
341
342
  el as Pie,
342
343
  ol as PieChart,
343
344
  rl as PolarAngleAxis,
344
345
  tl as PolarGrid,
345
346
  al as PolarRadiusAxis,
346
- ha as Popover,
347
- ya as PopoverAnchor,
348
- Aa as PopoverContent,
349
- wa as PopoverTrigger,
350
- Ga as Progress,
347
+ ya as Popover,
348
+ Aa as PopoverAnchor,
349
+ wa as PopoverContent,
350
+ Ba as PopoverTrigger,
351
+ Ra as Progress,
351
352
  sl as REGEXP_ONLY_CHARS,
352
353
  xl as REGEXP_ONLY_DIGITS,
353
354
  Tl as REGEXP_ONLY_DIGITS_AND_CHARS,
@@ -355,40 +356,40 @@ export {
355
356
  il as RadarChart,
356
357
  pl as RadialBar,
357
358
  ll as RadialBarChart,
358
- va as RadioGroup,
359
+ Ha as RadioGroup,
359
360
  ka as RadioGroupItem,
360
- Va as Rating,
361
+ Ea as Rating,
361
362
  ul as Rectangle,
362
363
  dl as ReferenceLine,
363
- Fa as ResizableHandle,
364
- Na as ResizablePanel,
365
- Oa as ResizablePanelGroup,
364
+ Na as ResizableHandle,
365
+ Oa as ResizablePanel,
366
+ _a as ResizablePanelGroup,
366
367
  bl as ResponsiveContainer,
367
- za as ScrollArea,
368
- Wa as ScrollBar,
368
+ Wa as ScrollArea,
369
+ Xa as ScrollBar,
369
370
  Cl as Sector,
370
- Ya as Select,
371
- Ua as SelectContent,
372
- qa as SelectGroup,
373
- ja as SelectItem,
374
- Ja as SelectLabel,
375
- Ka as SelectScrollDownButton,
376
- Qa as SelectScrollUpButton,
377
- Za as SelectSeparator,
378
- $a as SelectTrigger,
379
- en as SelectValue,
380
- rn as Separator,
381
- tn as SeparatorWithText,
382
- nn as Sheet,
383
- pn as SheetClose,
384
- ln as SheetContent,
385
- un as SheetDescription,
386
- dn as SheetFooter,
387
- bn as SheetHeader,
388
- Cn as SheetOverlay,
389
- mn as SheetPortal,
390
- gn as SheetTitle,
391
- Sn as SheetTrigger,
371
+ Ua as Select,
372
+ qa as SelectContent,
373
+ ja as SelectGroup,
374
+ Ja as SelectItem,
375
+ Ka as SelectLabel,
376
+ Qa as SelectScrollDownButton,
377
+ Za as SelectScrollUpButton,
378
+ $a as SelectSeparator,
379
+ en as SelectTrigger,
380
+ on as SelectValue,
381
+ tn as Separator,
382
+ an as SeparatorWithText,
383
+ pn as Sheet,
384
+ ln as SheetClose,
385
+ un as SheetContent,
386
+ dn as SheetDescription,
387
+ bn as SheetFooter,
388
+ Cn as SheetHeader,
389
+ mn as SheetOverlay,
390
+ gn as SheetPortal,
391
+ Sn as SheetTitle,
392
+ sn as SheetTrigger,
392
393
  zi as Sidebar,
393
394
  Wi as SidebarCollapseIcon,
394
395
  Xi as SidebarCollapseIconType,
@@ -420,62 +421,61 @@ export {
420
421
  sp as SidebarMenuSubButton,
421
422
  xp as SidebarMenuSubButtonSize,
422
423
  Tp as SidebarMenuSubItem,
423
- cp as SidebarMenuSubVariant,
424
+ Mp as SidebarMenuSubVariant,
424
425
  Dp as SidebarProvider,
425
- Mp as SidebarRail,
426
+ cp as SidebarRail,
426
427
  fp as SidebarSeparator,
427
428
  Ip as SidebarSide,
428
429
  Lp as SidebarTrigger,
429
430
  Pp as SidebarVariant,
430
- xn as Skeleton,
431
- cn as Slider,
432
- Mn as Sonner,
433
- Ln as SplitLayout,
434
- Pn as SplitLayoutContentLeft,
435
- hn as SplitLayoutContentRight,
436
- yn as SplitLayoutHeader,
437
- An as SplitLayoutImage,
438
- Bn as Switch,
439
- Rn as Table,
440
- vn as TableBody,
431
+ Tn as Skeleton,
432
+ Dn as Slider,
433
+ fn as Sonner,
434
+ Pn as SplitLayout,
435
+ hn as SplitLayoutContentLeft,
436
+ yn as SplitLayoutContentRight,
437
+ An as SplitLayoutHeader,
438
+ wn as SplitLayoutImage,
439
+ Gn as Switch,
440
+ vn as Table,
441
+ Hn as TableBody,
441
442
  kn as TableCaption,
442
- Hn as TableCell,
443
- Vn as TableFooter,
444
- En as TableHead,
445
- Fn as TableHeader,
446
- Nn as TableRow,
447
- _n as Tabs,
448
- zn as TabsContent,
449
- Wn as TabsList,
450
- Xn as TabsTrigger,
451
- Un as TextRevealMotion,
452
- jn as Textarea,
453
- Kn as Toggle,
454
- $n as ToggleGroup,
455
- ei as ToggleGroupItem,
456
- ri as Tooltip,
457
- ti as TooltipContent,
458
- ai as TooltipProvider,
459
- ni as TooltipTrigger,
460
- pi as TypographyBlockquote,
461
- li as TypographyCode,
462
- ui as TypographyH1,
463
- di as TypographyH2,
464
- bi as TypographyH3,
465
- Ci as TypographyH4,
466
- mi as TypographyInlineCode,
467
- gi as TypographyLarge,
468
- Si as TypographyLead,
469
- si as TypographyList,
470
- xi as TypographyMuted,
471
- Ti as TypographyP,
472
- ci as TypographySmall,
443
+ Vn as TableCell,
444
+ En as TableFooter,
445
+ Fn as TableHead,
446
+ Nn as TableHeader,
447
+ On as TableRow,
448
+ zn as Tabs,
449
+ Wn as TabsContent,
450
+ Xn as TabsList,
451
+ Yn as TabsTrigger,
452
+ qn as TextRevealMotion,
453
+ Jn as Textarea,
454
+ Qn as Toggle,
455
+ ei as ToggleGroup,
456
+ oi as ToggleGroupItem,
457
+ ti as Tooltip,
458
+ ai as TooltipContent,
459
+ ni as TooltipProvider,
460
+ ii as TooltipTrigger,
461
+ li as TypographyBlockquote,
462
+ ui as TypographyCode,
463
+ di as TypographyH1,
464
+ bi as TypographyH2,
465
+ Ci as TypographyH3,
466
+ mi as TypographyH4,
467
+ gi as TypographyInlineCode,
468
+ Si as TypographyLarge,
469
+ si as TypographyLead,
470
+ xi as TypographyList,
471
+ Ti as TypographyMuted,
472
+ Mi as TypographyP,
473
+ Di as TypographySmall,
473
474
  vi as VirtualizedDataTable,
474
475
  ml as XAxis,
475
476
  gl as YAxis,
476
477
  g as alertVariants,
477
- Di as blockquoteVariants,
478
- La as calculatePasswordStrength,
478
+ Pa as calculatePasswordStrength,
479
479
  $ as calloutVariants,
480
480
  Be as chipVariants,
481
481
  Np as cn,
@@ -489,16 +489,16 @@ export {
489
489
  vp as isMobileViewport,
490
490
  Lt as itemVariants,
491
491
  mt as labelVariants,
492
- fn as sonner,
493
- Qn as toggleVariants,
494
- ki as useDataTable,
492
+ In as sonner,
493
+ Zn as toggleVariants,
494
+ Hi as useDataTable,
495
495
  Ap as useDebounce,
496
496
  jr as useInputChipContext,
497
497
  Oi as useInputListContext,
498
- kp as useIsBelowBreakpoint,
499
- Hp as useIsMobile,
500
- Et as useMapPopoverHover,
501
- xa as usePagination,
498
+ Hp as useIsBelowBreakpoint,
499
+ kp as useIsMobile,
500
+ Ft as useMapPopoverHover,
501
+ Ta as usePagination,
502
502
  Ep as usePrefersReducedMotion,
503
503
  hp as useSidebar
504
504
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),$=require("react"),B=require("class-variance-authority"),j=require("@brightlocal/ui-components/lib/utils"),K=require("@brightlocal/ui-components/chip");function L(n){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const u=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(f,o,u.get?u:{enumerable:!0,get:()=>n[o]})}}return f.default=n,Object.freeze(f)}const t=L($),A=t.createContext(null),F=t.createContext(null),O=t.createContext(null);function E(){const n=t.useContext(A);if(!n)throw new Error("InputChip components must be used within an <InputChip>");return n}function S(){const n=t.useContext(F);if(!n)throw new Error("InputChip components must be used within an <InputChip>");return n}function P(){const n=t.useContext(O);if(!n)throw new Error("InputChip components must be used within an <InputChip>");return n}function T(){const n=E(),{value:f,disabled:o}=S(),{inputValue:u,focusedChipIndex:s}=P();return{...n,value:f,disabled:o,inputValue:u,focusedChipIndex:s}}function _({value:n,defaultValue:f=[],onValueChange:o,disabled:u=!1,allowDuplicates:s=!1,children:h}){const[l,m]=t.useState(f),[i,w]=t.useState(""),[C,x]=t.useState(-1),r=t.useRef(null),e=t.useRef([]),c=n!==void 0,a=c?n:l,b=t.useRef(a),g=t.useRef(o),R=t.useRef(u);t.useLayoutEffect(()=>{b.current=a,g.current=o,R.current=u}),t.useEffect(()=>{e.current.length>a.length&&(e.current.length=a.length),C>=a.length&&x(-1)},[a.length,C]);const p=t.useCallback(y=>{c||m(y),g.current?.(y)},[c]),k=t.useCallback(y=>{if(R.current)return;const V=y.trim();V&&(s||!b.current.includes(V))&&(p([...b.current,V]),w(""))},[s,p]),D=t.useCallback(y=>{R.current||p(b.current.filter((V,N)=>N!==y))},[p]),d=t.useMemo(()=>({onValueChange:p,setInputValue:w,addItem:k,removeItem:D,inputRef:r,setFocusedChipIndex:x,chipRefs:e}),[p,k,D]),I=t.useMemo(()=>({value:a,disabled:u}),[a,u]),M=t.useMemo(()=>({inputValue:i,focusedChipIndex:C}),[i,C]);return v.jsx(A.Provider,{value:d,children:v.jsx(F.Provider,{value:I,children:v.jsx(O.Provider,{value:M,children:h})})})}const H=B.cva(["relative flex w-full flex-wrap items-center gap-1","min-h-9 rounded-sm border border-input bg-background","px-3 py-2","has-[:focus-visible]:border-ring has-[:focus-visible]:bg-background","has-[:focus-visible]:shadow-default","has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50","transition-[color,box-shadow,border-color]","duration-150","ease-in-out"],{variants:{error:{true:["border-destructive-40","has-[:focus-visible]:border-destructive-40 has-[:focus-visible]:shadow-destructive"],false:""}},defaultVariants:{error:!1}}),W=["flex-1 min-w-20","bg-transparent","border-0 outline-none","text-base font-sans","text-foreground","placeholder:text-muted-foreground","focus:outline-none focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50"],q=t.forwardRef(({className:n,error:f=!1,dataHook:o,trackingEl:u,trackingLabel:s,placeholder:h,inputId:l,"aria-label":m,"aria-labelledby":i,children:w,...C},x)=>{const{setInputValue:r,addItem:e,inputRef:c,setFocusedChipIndex:a,chipRefs:b}=E(),{value:g,disabled:R}=S(),{inputValue:p}=P(),k=d=>{r(d.target.value)},D=d=>{if(d.key==="Enter"&&p.trim()&&(d.preventDefault(),e(p)),d.key==="ArrowLeft"&&!p&&g.length>0){d.preventDefault();const I=g.length-1;a(I),b.current[I]?.focus()}if(d.key==="Backspace"&&!p&&g.length>0){d.preventDefault();const I=g.length-1;a(I),b.current[I]?.focus()}};return v.jsxs("div",{ref:x,className:j.cn(H({error:f}),n),"data-hook":o,"data-slot":"input-chip","data-tracking-el":u,"data-tracking-label":s,...C,children:[w,v.jsx("input",{ref:c,"aria-label":m,"aria-labelledby":i,className:j.cn(W),"data-slot":"input-chip-input",disabled:R,id:l,placeholder:h,type:"text",value:p,onChange:k,onKeyDown:D})]})});q.displayName="InputChipInput";function z({className:n,dataHookPrefix:f="chip"}){const{removeItem:o,inputRef:u,setFocusedChipIndex:s,chipRefs:h}=E(),{value:l,disabled:m}=S(),i=t.useRef(null);t.useEffect(()=>{if(i.current!==null){if(i.current==="input")u.current?.focus();else{const r=i.current;r>=0&&r<l.length?h.current[r]?.focus():l.length>0?h.current[l.length-1]?.focus():u.current?.focus()}i.current=null}},[l.length,u,h]);const w=(r,e)=>{if(!m)switch(r.key){case"ArrowLeft":r.preventDefault(),e>0&&(s(e-1),h.current[e-1]?.focus());break;case"ArrowRight":r.preventDefault(),e<l.length-1?(s(e+1),h.current[e+1]?.focus()):(s(-1),u.current?.focus());break;case"Backspace":case"Delete":{r.preventDefault();const c=l.length-1;if(c===0)s(-1),i.current="input",o(e);else if(e>=c){const a=c-1;s(a),i.current=a,o(e)}else s(e),i.current=e,o(e);break}case"Home":r.preventDefault(),l.length>0&&(s(0),h.current[0]?.focus());break;case"End":r.preventDefault(),s(-1),u.current?.focus();break}},C=r=>{s(r)},x=r=>{const e=r.relatedTarget;e&&(e.closest('[data-slot="chip"]')!==null||e.dataset.slot==="input-chip-input")||s(-1)};return l.length===0?null:v.jsx("div",{className:j.cn("contents",n),"data-slot":"input-chip-items",children:l.map((r,e)=>v.jsx(K.Chip,{ref:c=>{h.current[e]=c},"aria-label":`${r}, press Delete to remove`,dataHook:`${f}-${e}`,disabled:m,role:"group",tabIndex:-1,onBlur:x,onFocus:()=>C(e),onKeyDown:c=>w(c,e),onRemove:()=>o(e),children:r},`${r}-${e}`))})}exports.InputChip=_;exports.InputChipInput=q;exports.InputChipItems=z;exports.useInputChipContext=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),$=require("react"),B=require("class-variance-authority"),j=require("@brightlocal/ui-components/lib/utils"),K=require("@brightlocal/ui-components/chip");function T(r){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const o in r)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(f,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}return f.default=r,Object.freeze(f)}const n=T($),F=n.createContext(null),O=n.createContext(null),P=n.createContext(null);function E(){const r=n.useContext(F);if(!r)throw new Error("InputChip components must be used within an <InputChip>");return r}function S(){const r=n.useContext(O);if(!r)throw new Error("InputChip components must be used within an <InputChip>");return r}function q(){const r=n.useContext(P);if(!r)throw new Error("InputChip components must be used within an <InputChip>");return r}function _(){const r=E(),{value:f,disabled:o}=S(),{inputValue:s,focusedChipIndex:l}=q();return{...r,value:f,disabled:o,inputValue:s,focusedChipIndex:l}}function L({value:r,defaultValue:f=[],onValueChange:o,disabled:s=!1,allowDuplicates:l=!1,children:c}){const[h,a]=n.useState(f),[g,i]=n.useState(""),[b,w]=n.useState(-1),y=n.useRef(null),t=n.useRef([]),e=r!==void 0,u=e?r:h,d=n.useRef(u),I=n.useRef(o),R=n.useRef(s);n.useLayoutEffect(()=>{d.current=u,I.current=o,R.current=s}),n.useEffect(()=>{t.current.length>u.length&&(t.current.length=u.length),b>=u.length&&w(-1)},[u.length,b]);const p=n.useCallback(x=>{e||a(x),I.current?.(x)},[e]),k=n.useCallback(x=>{if(R.current)return;const V=x.trim();V&&(l||!d.current.includes(V))&&(p([...d.current,V]),i(""))},[l,p]),D=n.useCallback(x=>{R.current||p(d.current.filter((V,N)=>N!==x))},[p]),C=n.useMemo(()=>({onValueChange:p,setInputValue:i,addItem:k,removeItem:D,inputRef:y,setFocusedChipIndex:w,chipRefs:t}),[p,k,D]),v=n.useMemo(()=>({value:u,disabled:s}),[u,s]),M=n.useMemo(()=>({inputValue:g,focusedChipIndex:b}),[g,b]);return m.jsx(F.Provider,{value:C,children:m.jsx(O.Provider,{value:v,children:m.jsx(P.Provider,{value:M,children:c})})})}const H=B.cva(["relative flex w-full flex-wrap items-center gap-1","min-h-9 rounded-sm border border-input bg-background","px-3 py-2","has-[:focus-visible]:border-ring has-[:focus-visible]:bg-background","has-[:focus-visible]:shadow-default","has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50","transition-[color,box-shadow,border-color]","duration-150","ease-in-out"],{variants:{error:{true:["border-destructive-40","has-[:focus-visible]:border-destructive-40 has-[:focus-visible]:shadow-destructive"],false:""}},defaultVariants:{error:!1}}),W=["flex-1 min-w-20","bg-transparent","border-0 outline-none","text-base font-sans","text-foreground","placeholder:text-muted-foreground","focus:outline-none focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50"],A=n.forwardRef(({className:r,error:f=!1,dataHook:o,trackingEl:s,trackingLabel:l,placeholder:c,inputId:h,"aria-label":a,"aria-labelledby":g,children:i,...b},w)=>{const{setInputValue:y,addItem:t,inputRef:e,setFocusedChipIndex:u,chipRefs:d}=E(),{value:I,disabled:R}=S(),{inputValue:p}=q(),k=C=>{y(C.target.value)},D=C=>{if(C.key==="Enter"&&p.trim()&&(C.preventDefault(),t(p)),C.key==="ArrowLeft"&&!p&&I.length>0){C.preventDefault();const v=I.length-1;u(v),d.current[v]?.focus()}if(C.key==="Backspace"&&!p&&I.length>0){C.preventDefault();const v=I.length-1;u(v),d.current[v]?.focus()}};return m.jsxs("div",{ref:w,className:j.cn(H({error:f}),r),"data-hook":o,"data-slot":"input-chip","data-tracking-el":s,"data-tracking-label":l,...b,children:[i,m.jsx("input",{ref:e,"aria-label":a,"aria-labelledby":g,className:j.cn(W),"data-slot":"input-chip-input",disabled:R,id:h,placeholder:c,type:"text",value:p,onChange:k,onKeyDown:D})]})});A.displayName="InputChipInput";function z({className:r,dataHookPrefix:f="chip",itemAriaLabel:o}){const{removeItem:s,inputRef:l,setFocusedChipIndex:c,chipRefs:h}=E(),{value:a,disabled:g}=S(),i=n.useRef(null);n.useEffect(()=>{if(i.current!==null){if(i.current==="input")l.current?.focus();else{const t=i.current;t>=0&&t<a.length?h.current[t]?.focus():a.length>0?h.current[a.length-1]?.focus():l.current?.focus()}i.current=null}},[a.length,l,h]);const b=(t,e)=>{if(!g)switch(t.key){case"ArrowLeft":t.preventDefault(),e>0&&(c(e-1),h.current[e-1]?.focus());break;case"ArrowRight":t.preventDefault(),e<a.length-1?(c(e+1),h.current[e+1]?.focus()):(c(-1),l.current?.focus());break;case"Backspace":case"Delete":{t.preventDefault();const u=a.length-1;if(u===0)c(-1),i.current="input",s(e);else if(e>=u){const d=u-1;c(d),i.current=d,s(e)}else c(e),i.current=e,s(e);break}case"Home":t.preventDefault(),a.length>0&&(c(0),h.current[0]?.focus());break;case"End":t.preventDefault(),c(-1),l.current?.focus();break}},w=t=>{c(t)},y=t=>{const e=t.relatedTarget;e&&(e.closest('[data-slot="chip"]')!==null||e.dataset.slot==="input-chip-input")||c(-1)};return a.length===0?null:m.jsx("div",{className:j.cn("contents",r),"data-slot":"input-chip-items",children:a.map((t,e)=>m.jsx(K.Chip,{ref:u=>{h.current[e]=u},"aria-label":o?o.replace("{item}",t):`${t}, press Delete to remove`,dataHook:`${f}-${e}`,disabled:g,role:"group",tabIndex:-1,onBlur:y,onFocus:()=>w(e),onKeyDown:u=>b(u,e),onRemove:()=>s(e),children:t},`${t}-${e}`))})}exports.InputChip=L;exports.InputChipInput=A;exports.InputChipItems=z;exports.useInputChipContext=_;
@@ -104,11 +104,17 @@ export interface InputChipItemsProps {
104
104
  className?: string;
105
105
  /** Data hook prefix for chips */
106
106
  dataHookPrefix?: string;
107
+ /**
108
+ * Accessible label for each chip item.
109
+ * Supports `{item}` placeholder for interpolation.
110
+ * @default "{item}, press Delete to remove"
111
+ */
112
+ itemAriaLabel?: string;
107
113
  }
108
114
  /**
109
115
  * Auto-renders chips from the InputChip value array.
110
116
  * Must be used within an InputChip component.
111
117
  */
112
- declare function InputChipItems({ className, dataHookPrefix, }: InputChipItemsProps): import("react/jsx-runtime").JSX.Element | null;
118
+ declare function InputChipItems({ className, dataHookPrefix, itemAriaLabel, }: InputChipItemsProps): import("react/jsx-runtime").JSX.Element | null;
113
119
  export { InputChip, InputChipInput, InputChipItems, useInputChipContext };
114
120
  //# sourceMappingURL=input-chip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-chip.d.ts","sourceRoot":"","sources":["../../src/components/input-chip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AASlE,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC,UA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