@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.
- package/component-meta.json +163 -12
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.d.ts +16 -4
- package/dist/blocks/data-table.d.ts.map +1 -1
- package/dist/blocks/data-table.js +57 -53
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts +7 -1
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +82 -81
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +18 -7
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +143 -136
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts +14 -2
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +37 -37
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +3 -3
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +2 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +24 -3
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +121 -117
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts +11 -0
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +43 -38
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +12 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +235 -230
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +5 -0
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +207 -206
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +10 -0
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +96 -96
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +7 -2
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +38 -30
- package/dist/drawer.d.ts +2 -2
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +5 -0
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +15 -7
- package/dist/index.cjs +1 -1
- package/dist/index.js +178 -178
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.d.ts +7 -1
- package/dist/input-chip.d.ts.map +1 -1
- package/dist/input-chip.js +131 -130
- package/dist/input-group.d.ts +1 -1
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts +10 -0
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +108 -106
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +1 -1
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +36 -37
- package/dist/list.d.ts +1 -1
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts +6 -1
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +25 -22
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts +17 -2
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +32 -26
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +29 -3
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +26 -25
- package/dist/rating.cjs +1 -1
- package/dist/rating.d.ts +6 -0
- package/dist/rating.d.ts.map +1 -1
- package/dist/rating.js +27 -19
- package/dist/resizable.d.ts +1 -1
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +7 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +52 -51
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +16 -4
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +38 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +6 -1
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +42 -41
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +5 -0
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +13 -11
- package/dist/text-reveal-motion.cjs +1 -1
- package/dist/text-reveal-motion.d.ts +5 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/text-reveal-motion.js +111 -110
- package/dist/typography.cjs +1 -1
- package/dist/typography.d.ts +1 -2
- package/dist/typography.d.ts.map +1 -1
- package/dist/typography.js +49 -50
- package/package.json +2 -3
- package/src/blocks/data-table.tsx +26 -9
- package/src/blocks/input-list.tsx +12 -1
- package/src/blocks/sidebar.tsx +43 -21
- package/src/components/breadcrumb.tsx +43 -26
- package/src/components/callout.tsx +5 -4
- package/src/components/carousel.tsx +33 -4
- package/src/components/chip.tsx +22 -2
- package/src/components/combobox.tsx +18 -3
- package/src/components/command.tsx +7 -1
- package/src/components/date-picker.tsx +17 -3
- package/src/components/dialog.tsx +17 -4
- package/src/components/drawer.tsx +2 -2
- package/src/components/global-layout.tsx +15 -2
- package/src/components/input-chip.tsx +12 -1
- package/src/components/input-password.tsx +73 -49
- package/src/components/link.tsx +29 -17
- package/src/components/logo.tsx +10 -2
- package/src/components/map.tsx +23 -0
- package/src/components/pagination.tsx +44 -11
- package/src/components/rating.tsx +20 -2
- package/src/components/select.tsx +9 -1
- package/src/components/separator.tsx +40 -25
- package/src/components/sheet.tsx +28 -20
- package/src/components/skeleton.tsx +13 -2
- package/src/components/text-reveal-motion.tsx +7 -1
- 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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
27
|
-
import { GlobalLayout as wr, GlobalLayoutContent as Br, GlobalLayoutContentBody as Gr, GlobalLayoutContentHeader as Rr, GlobalLayoutMobileHeader as vr, GlobalLayoutSidebar as
|
|
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
|
|
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
|
|
39
|
-
import { Menubar as
|
|
40
|
-
import { NavigationMenu as
|
|
41
|
-
import { Pagination as
|
|
42
|
-
import { DEFAULT_STRENGTH_LEVELS as
|
|
43
|
-
import { Popover as
|
|
44
|
-
import { Progress as
|
|
45
|
-
import { RadioGroup as
|
|
46
|
-
import { Rating as
|
|
47
|
-
import { ResizableHandle as
|
|
48
|
-
import { ScrollArea as
|
|
49
|
-
import { Select as
|
|
50
|
-
import { Separator as
|
|
51
|
-
import { Sheet as
|
|
52
|
-
import { Skeleton as
|
|
53
|
-
import { Slider as
|
|
54
|
-
import { Sonner as
|
|
55
|
-
import { SplitLayout as
|
|
56
|
-
import { Switch as
|
|
57
|
-
import { Table as
|
|
58
|
-
import { Tabs as
|
|
59
|
-
import { TextRevealMotion as
|
|
60
|
-
import { Textarea as
|
|
61
|
-
import { Toggle as
|
|
62
|
-
import { ToggleGroup as
|
|
63
|
-
import { Tooltip as
|
|
64
|
-
import { TypographyBlockquote as
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
85
|
+
M as AlertDialogContent,
|
|
86
86
|
D as AlertDialogDescription,
|
|
87
|
-
|
|
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
|
-
|
|
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
|
-
|
|
142
|
+
Me as ChartStyle,
|
|
143
143
|
De as ChartTooltip,
|
|
144
|
-
|
|
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
|
-
|
|
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
|
-
|
|
179
|
+
Mo as ContextMenuLabel,
|
|
180
180
|
Do as ContextMenuPortal,
|
|
181
|
-
|
|
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
|
-
|
|
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
|
-
|
|
212
|
-
|
|
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
|
-
|
|
247
|
+
Mr as FieldContent,
|
|
248
248
|
Dr as FieldDescription,
|
|
249
|
-
|
|
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
|
-
|
|
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
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
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
|
-
|
|
291
|
+
Mt as ItemContent,
|
|
292
292
|
Dt as ItemDescription,
|
|
293
|
-
|
|
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
|
-
|
|
309
|
-
|
|
308
|
+
Ht as MapPopover,
|
|
309
|
+
kt as MapPopoverAnchor,
|
|
310
310
|
Vt as MapPopoverContent,
|
|
311
|
-
|
|
312
|
-
Ot as
|
|
313
|
-
_t as
|
|
314
|
-
zt as
|
|
315
|
-
Wt as
|
|
316
|
-
Xt as
|
|
317
|
-
Yt as
|
|
318
|
-
Ut as
|
|
319
|
-
qt as
|
|
320
|
-
jt as
|
|
321
|
-
Jt as
|
|
322
|
-
Kt as
|
|
323
|
-
Qt as
|
|
324
|
-
Zt as
|
|
325
|
-
|
|
326
|
-
oa as
|
|
327
|
-
ra as
|
|
328
|
-
ta as
|
|
329
|
-
aa as
|
|
330
|
-
na as
|
|
331
|
-
ia as
|
|
332
|
-
pa as
|
|
333
|
-
|
|
334
|
-
da as
|
|
335
|
-
ba as
|
|
336
|
-
Ca as
|
|
337
|
-
ma as
|
|
338
|
-
ga as
|
|
339
|
-
Sa as
|
|
340
|
-
sa as
|
|
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
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
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
|
-
|
|
359
|
+
Ha as RadioGroup,
|
|
359
360
|
ka as RadioGroupItem,
|
|
360
|
-
|
|
361
|
+
Ea as Rating,
|
|
361
362
|
ul as Rectangle,
|
|
362
363
|
dl as ReferenceLine,
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
364
|
+
Na as ResizableHandle,
|
|
365
|
+
Oa as ResizablePanel,
|
|
366
|
+
_a as ResizablePanelGroup,
|
|
366
367
|
bl as ResponsiveContainer,
|
|
367
|
-
|
|
368
|
-
|
|
368
|
+
Wa as ScrollArea,
|
|
369
|
+
Xa as ScrollBar,
|
|
369
370
|
Cl as Sector,
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
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
|
-
|
|
424
|
+
Mp as SidebarMenuSubVariant,
|
|
424
425
|
Dp as SidebarProvider,
|
|
425
|
-
|
|
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
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
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
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
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
|
-
|
|
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
|
-
|
|
493
|
-
|
|
494
|
-
|
|
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
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
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
|
};
|
package/dist/input-chip.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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=_;
|
package/dist/input-chip.d.ts
CHANGED
|
@@ -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
|
package/dist/input-chip.d.ts.map
CHANGED
|
@@ -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,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,oDAAoD;IACpD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACnD,sEAAsE;IACtE,gBAAgB,EAAE,MAAM,CAAC;IACzB,iCAAiC;IACjC,mB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