@financinha/ui 0.13.1 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -319,6 +319,7 @@ declare const SIZE: {
319
319
  default: string;
320
320
  lg: string;
321
321
  };
322
+ type BankAvatarTone = "neutral" | "success";
322
323
  type BankAvatarProps = Omit<React$1.ComponentProps<"span">, "children"> & {
323
324
  /** Nome do banco. Vira a descrição para leitor de tela e a base das iniciais. */
324
325
  name: string;
@@ -326,6 +327,13 @@ type BankAvatarProps = Omit<React$1.ComponentProps<"span">, "children"> & {
326
327
  src?: string;
327
328
  /** Iniciais no lugar das geradas a partir do nome. */
328
329
  initials?: string;
330
+ /**
331
+ * Ícone no lugar das iniciais, para o que não é um banco (dinheiro em espécie, carteira). Aparece quando não há logo.
332
+ * Aceita um ícone do lucide ou um emoji, como "💵" no dinheiro em espécie.
333
+ */
334
+ icon?: React$1.ReactNode;
335
+ /** Fundo do quadrado sem logo e sem `color`: `neutral` (cinza do DS) ou `success` (verde, como o dinheiro em espécie). */
336
+ tone?: BankAvatarTone;
329
337
  /** Cor de fundo das iniciais (a cor do banco). Sem ela, usa o cinza do DS. */
330
338
  color?: string;
331
339
  /** Cor das iniciais sobre `color`. */
@@ -347,7 +355,7 @@ type BankAvatarProps = Omit<React$1.ComponentProps<"span">, "children"> & {
347
355
  *
348
356
  * Ele é uma única imagem para leitor de tela, que ouve o nome do banco, o status e o dono.
349
357
  */
350
- declare function BankAvatar({ name, src, initials, color, textColor, size, status, statusLabel, owner, ownerLabel, className, ...props }: BankAvatarProps): React$1.JSX.Element;
358
+ declare function BankAvatar({ name, src, initials, icon, tone, color, textColor, size, status, statusLabel, owner, ownerLabel, className, ...props }: BankAvatarProps): React$1.JSX.Element;
351
359
 
352
360
  type AmountTone = "neutral" | "income" | "expense" | "auto" | "balance";
353
361
  type AmountProps = Omit<React$1.ComponentProps<"span">, "children"> & {
@@ -902,4 +910,4 @@ declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...p
902
910
  isActive?: boolean;
903
911
  }): React$1.JSX.Element;
904
912
 
905
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertModal, AlertModalAction, AlertModalCancel, AlertModalContent, AlertModalDescription, AlertModalFooter, AlertModalHeader, AlertModalOverlay, AlertModalPanel, AlertModalPortal, AlertModalTitle, AlertModalTrigger, AlertTitle, Amount, type AmountProps, type AmountTone, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, type BadgeProps, type BadgeVariant, BankAvatar, type BankAvatarOwner, type BankAvatarProps, type BankAvatarStatus, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardBrand, type CardBrandProps, CardContent, CardDescription, CardFooter, CardHeader, CardIcon, CardTitle, Checkbox, CheckboxCard, type CheckboxCardProps, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorScheme, DangerZoneCard, type DangerZoneCardProps, DangerZoneItem, type DangerZoneItemProps, DatePicker, type DatePickerProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FileUpload, type FileUploadProps, type FileUploadRejection, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InsightCard, type InsightCardProps, InsightItem, type InsightItemProps, type InsightSize, type InsightTone, Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemMedia, ItemTitle, Label, Link, type LinkProps, MetricCard, type MetricCardProps, type MetricCardTone, Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, Multiselect, type MultiselectOption, type MultiselectProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverConfirm, type PopoverConfirmProps, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioCard, type RadioCardProps, RadioGroup, RadioGroupCard, RadioGroupItem, ScrollArea, ScrollBar, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, cardVariants, headingStyle, itemVariants, modalContentVariants, navigationMenuTriggerStyle, tagVariants, textStyle, toggleVariants, useColorScheme, useIsMobile, useSidebar };
913
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertModal, AlertModalAction, AlertModalCancel, AlertModalContent, AlertModalDescription, AlertModalFooter, AlertModalHeader, AlertModalOverlay, AlertModalPanel, AlertModalPortal, AlertModalTitle, AlertModalTrigger, AlertTitle, Amount, type AmountProps, type AmountTone, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, type BadgeProps, type BadgeVariant, BankAvatar, type BankAvatarOwner, type BankAvatarProps, type BankAvatarStatus, type BankAvatarTone, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardBrand, type CardBrandProps, CardContent, CardDescription, CardFooter, CardHeader, CardIcon, CardTitle, Checkbox, CheckboxCard, type CheckboxCardProps, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorScheme, DangerZoneCard, type DangerZoneCardProps, DangerZoneItem, type DangerZoneItemProps, DatePicker, type DatePickerProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FileUpload, type FileUploadProps, type FileUploadRejection, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InsightCard, type InsightCardProps, InsightItem, type InsightItemProps, type InsightSize, type InsightTone, Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemMedia, ItemTitle, Label, Link, type LinkProps, MetricCard, type MetricCardProps, type MetricCardTone, Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, Multiselect, type MultiselectOption, type MultiselectProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverConfirm, type PopoverConfirmProps, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioCard, type RadioCardProps, RadioGroup, RadioGroupCard, RadioGroupItem, ScrollArea, ScrollBar, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, cardVariants, headingStyle, itemVariants, modalContentVariants, navigationMenuTriggerStyle, tagVariants, textStyle, toggleVariants, useColorScheme, useIsMobile, useSidebar };
package/dist/index.d.ts CHANGED
@@ -319,6 +319,7 @@ declare const SIZE: {
319
319
  default: string;
320
320
  lg: string;
321
321
  };
322
+ type BankAvatarTone = "neutral" | "success";
322
323
  type BankAvatarProps = Omit<React$1.ComponentProps<"span">, "children"> & {
323
324
  /** Nome do banco. Vira a descrição para leitor de tela e a base das iniciais. */
324
325
  name: string;
@@ -326,6 +327,13 @@ type BankAvatarProps = Omit<React$1.ComponentProps<"span">, "children"> & {
326
327
  src?: string;
327
328
  /** Iniciais no lugar das geradas a partir do nome. */
328
329
  initials?: string;
330
+ /**
331
+ * Ícone no lugar das iniciais, para o que não é um banco (dinheiro em espécie, carteira). Aparece quando não há logo.
332
+ * Aceita um ícone do lucide ou um emoji, como "💵" no dinheiro em espécie.
333
+ */
334
+ icon?: React$1.ReactNode;
335
+ /** Fundo do quadrado sem logo e sem `color`: `neutral` (cinza do DS) ou `success` (verde, como o dinheiro em espécie). */
336
+ tone?: BankAvatarTone;
329
337
  /** Cor de fundo das iniciais (a cor do banco). Sem ela, usa o cinza do DS. */
330
338
  color?: string;
331
339
  /** Cor das iniciais sobre `color`. */
@@ -347,7 +355,7 @@ type BankAvatarProps = Omit<React$1.ComponentProps<"span">, "children"> & {
347
355
  *
348
356
  * Ele é uma única imagem para leitor de tela, que ouve o nome do banco, o status e o dono.
349
357
  */
350
- declare function BankAvatar({ name, src, initials, color, textColor, size, status, statusLabel, owner, ownerLabel, className, ...props }: BankAvatarProps): React$1.JSX.Element;
358
+ declare function BankAvatar({ name, src, initials, icon, tone, color, textColor, size, status, statusLabel, owner, ownerLabel, className, ...props }: BankAvatarProps): React$1.JSX.Element;
351
359
 
352
360
  type AmountTone = "neutral" | "income" | "expense" | "auto" | "balance";
353
361
  type AmountProps = Omit<React$1.ComponentProps<"span">, "children"> & {
@@ -902,4 +910,4 @@ declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...p
902
910
  isActive?: boolean;
903
911
  }): React$1.JSX.Element;
904
912
 
905
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertModal, AlertModalAction, AlertModalCancel, AlertModalContent, AlertModalDescription, AlertModalFooter, AlertModalHeader, AlertModalOverlay, AlertModalPanel, AlertModalPortal, AlertModalTitle, AlertModalTrigger, AlertTitle, Amount, type AmountProps, type AmountTone, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, type BadgeProps, type BadgeVariant, BankAvatar, type BankAvatarOwner, type BankAvatarProps, type BankAvatarStatus, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardBrand, type CardBrandProps, CardContent, CardDescription, CardFooter, CardHeader, CardIcon, CardTitle, Checkbox, CheckboxCard, type CheckboxCardProps, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorScheme, DangerZoneCard, type DangerZoneCardProps, DangerZoneItem, type DangerZoneItemProps, DatePicker, type DatePickerProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FileUpload, type FileUploadProps, type FileUploadRejection, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InsightCard, type InsightCardProps, InsightItem, type InsightItemProps, type InsightSize, type InsightTone, Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemMedia, ItemTitle, Label, Link, type LinkProps, MetricCard, type MetricCardProps, type MetricCardTone, Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, Multiselect, type MultiselectOption, type MultiselectProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverConfirm, type PopoverConfirmProps, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioCard, type RadioCardProps, RadioGroup, RadioGroupCard, RadioGroupItem, ScrollArea, ScrollBar, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, cardVariants, headingStyle, itemVariants, modalContentVariants, navigationMenuTriggerStyle, tagVariants, textStyle, toggleVariants, useColorScheme, useIsMobile, useSidebar };
913
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertModal, AlertModalAction, AlertModalCancel, AlertModalContent, AlertModalDescription, AlertModalFooter, AlertModalHeader, AlertModalOverlay, AlertModalPanel, AlertModalPortal, AlertModalTitle, AlertModalTrigger, AlertTitle, Amount, type AmountProps, type AmountTone, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, type BadgeProps, type BadgeVariant, BankAvatar, type BankAvatarOwner, type BankAvatarProps, type BankAvatarStatus, type BankAvatarTone, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardAction, CardBrand, type CardBrandProps, CardContent, CardDescription, CardFooter, CardHeader, CardIcon, CardTitle, Checkbox, CheckboxCard, type CheckboxCardProps, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorScheme, DangerZoneCard, type DangerZoneCardProps, DangerZoneItem, type DangerZoneItemProps, DatePicker, type DatePickerProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FileUpload, type FileUploadProps, type FileUploadRejection, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InsightCard, type InsightCardProps, InsightItem, type InsightItemProps, type InsightSize, type InsightTone, Item, ItemActions, ItemContent, ItemDescription, ItemGroup, ItemMedia, ItemTitle, Label, Link, type LinkProps, MetricCard, type MetricCardProps, type MetricCardTone, Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, Multiselect, type MultiselectOption, type MultiselectProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHeader, type PageHeaderProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverConfirm, type PopoverConfirmProps, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioCard, type RadioCardProps, RadioGroup, RadioGroupCard, RadioGroupItem, ScrollArea, ScrollBar, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, cardVariants, headingStyle, itemVariants, modalContentVariants, navigationMenuTriggerStyle, tagVariants, textStyle, toggleVariants, useColorScheme, useIsMobile, useSidebar };
package/dist/index.js CHANGED
@@ -2648,6 +2648,25 @@ var SIZE = {
2648
2648
  default: "size-10 text-sm",
2649
2649
  lg: "size-12 text-base"
2650
2650
  };
2651
+ var ICON_SIZE = {
2652
+ sm: "text-base leading-none [&>svg]:size-4",
2653
+ default: "text-xl leading-none [&>svg]:size-5",
2654
+ lg: "text-xl leading-none [&>svg]:size-5"
2655
+ };
2656
+ var OWNER_SIZE = {
2657
+ sm: { circle: "h-4 w-4", count: "h-4 min-w-4 px-1" },
2658
+ default: { circle: "h-5 w-5", count: "h-5 min-w-5 px-1" },
2659
+ lg: { circle: "h-5 w-5", count: "h-5 min-w-5 px-1" }
2660
+ };
2661
+ var STATUS_SIZE = {
2662
+ sm: "size-2.5",
2663
+ default: "size-3",
2664
+ lg: "size-3"
2665
+ };
2666
+ var TONE = {
2667
+ neutral: "bg-muted text-muted-foreground",
2668
+ success: "bg-success-50 text-success-500 dark:bg-success-800/40 dark:text-success-300"
2669
+ };
2651
2670
  var STATUS_COLOR = {
2652
2671
  success: "bg-success-400",
2653
2672
  warning: "bg-warning-400",
@@ -2663,6 +2682,8 @@ function BankAvatar({
2663
2682
  name,
2664
2683
  src,
2665
2684
  initials,
2685
+ icon,
2686
+ tone = "neutral",
2666
2687
  color,
2667
2688
  textColor,
2668
2689
  size = "default",
@@ -2696,7 +2717,8 @@ function BankAvatar({
2696
2717
  className: cn28(
2697
2718
  "flex items-center justify-center overflow-hidden rounded-lg font-semibold",
2698
2719
  SIZE[size],
2699
- showLogo ? "bg-white ring-1 ring-border" : !color && "bg-muted text-muted-foreground"
2720
+ showLogo ? "bg-white ring-1 ring-border" : !color && TONE[tone],
2721
+ !showLogo && icon != null && ICON_SIZE[size]
2700
2722
  ),
2701
2723
  style: showLogo ? void 0 : { backgroundColor: color, color: textColor },
2702
2724
  children: showLogo ? /* @__PURE__ */ jsx27(
@@ -2707,7 +2729,7 @@ function BankAvatar({
2707
2729
  className: "size-full object-contain",
2708
2730
  onError: () => setFailed(true)
2709
2731
  }
2710
- ) : initials ?? initialsOf(name)
2732
+ ) : icon ?? initials ?? initialsOf(name)
2711
2733
  }
2712
2734
  ),
2713
2735
  status ? /* @__PURE__ */ jsx27(
@@ -2716,7 +2738,8 @@ function BankAvatar({
2716
2738
  "aria-hidden": true,
2717
2739
  "data-slot": "bank-avatar-status",
2718
2740
  className: cn28(
2719
- "absolute -top-1 -right-1 size-3 rounded-full ring-2 ring-background",
2741
+ "absolute -top-1 -right-1 rounded-full ring-2 ring-background",
2742
+ STATUS_SIZE[size],
2720
2743
  STATUS_COLOR[status]
2721
2744
  )
2722
2745
  }
@@ -2729,10 +2752,10 @@ function BankAvatar({
2729
2752
  className: cn28(
2730
2753
  // Cinza escuro com texto branco, como o "+3" do Avatar group: o lilás é só da opção escolhida e
2731
2754
  // da IA, e o roxo 500 só da ação principal.
2732
- "absolute -right-1 -bottom-1 flex h-5 items-center justify-center overflow-hidden rounded-full bg-neutral-400 text-xs font-semibold text-white ring-2 ring-background dark:bg-neutral-300 dark:text-neutral-800",
2755
+ "absolute -right-1 -bottom-1 flex items-center justify-center overflow-hidden rounded-full bg-neutral-400 text-xs font-semibold text-white ring-2 ring-background dark:bg-neutral-300 dark:text-neutral-800",
2733
2756
  // Só o número cresce na largura; foto e inicial ficam num círculo fixo (sem isso a foto
2734
2757
  // esticava o selo até a largura dela).
2735
- "count" in owner ? "min-w-5 px-1" : "w-5"
2758
+ "count" in owner ? OWNER_SIZE[size].count : OWNER_SIZE[size].circle
2736
2759
  ),
2737
2760
  children: "count" in owner ? owner.count : owner.src ? /* @__PURE__ */ jsx27("img", { src: owner.src, alt: "", className: "size-full object-cover" }) : initialsOf(owner.name).charAt(0)
2738
2761
  }