@financinha/ui 0.11.0 → 0.13.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/dist/index.cjs +45 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -3
- package/dist/index.d.ts +18 -3
- package/dist/index.js +45 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -583,21 +583,36 @@ type MetricCardProps = Omit<React$1.ComponentProps<"div">, "children"> & {
|
|
|
583
583
|
declare function MetricCard({ label, value, icon, tone, trend, comparison, className, ...props }: MetricCardProps): React$1.JSX.Element;
|
|
584
584
|
|
|
585
585
|
type InsightTone = "success" | "warning" | "tip";
|
|
586
|
+
type InsightSize = "default" | "sm";
|
|
586
587
|
type InsightCardProps = Omit<React$1.ComponentProps<"div">, "title"> & {
|
|
587
588
|
/** O título do card, como "Principais insights da semana". Vem sempre com o brilho da IA antes. */
|
|
588
589
|
title: React$1.ReactNode;
|
|
589
|
-
/** Texto de apoio
|
|
590
|
+
/** Texto de apoio do título, como o período ("23 de out. – 29 de out."). */
|
|
590
591
|
meta?: React$1.ReactNode;
|
|
592
|
+
/**
|
|
593
|
+
* Onde fica o `meta`. `inline` (padrão): colado ao título, depois de " · ".
|
|
594
|
+
* `end`: na borda direita do cabeçalho, em 14 px cinza, antes da ação, como o período de um card comum no `CardAction`.
|
|
595
|
+
*/
|
|
596
|
+
metaPosition?: "inline" | "end";
|
|
591
597
|
/** Ação à direita do título, como o botão de atualizar. */
|
|
592
598
|
action?: React$1.ReactNode;
|
|
593
599
|
/** Linha embaixo do cabeçalho. Use quando o conteúdo é uma lista de `InsightItem`. */
|
|
594
600
|
divider?: boolean;
|
|
601
|
+
/** Linha entre os `InsightItem`. Padrão: sim. */
|
|
602
|
+
divided?: boolean;
|
|
603
|
+
/**
|
|
604
|
+
* `default`: título de 16 px e ícone do insight de 40 px.
|
|
605
|
+
* `sm`: denso, como os outros cards da Home (Card compacto). Títulos de 14 px, cabeçalho de 24 px alinhado ao topo,
|
|
606
|
+
* 16 px até o conteúdo, ícone do insight de 32 px e 8 px entre o ícone e o texto. A ação do cabeçalho usa
|
|
607
|
+
* `size="icon-xs"` (24 px), para não mudar a altura.
|
|
608
|
+
*/
|
|
609
|
+
size?: InsightSize;
|
|
595
610
|
};
|
|
596
611
|
/**
|
|
597
612
|
* Card da IA: superfície lilás (o único card roxo do DS; o Card comum não tem essa cor), com o brilho (Sparkles) e o título no topo.
|
|
598
613
|
* O conteúdo é livre: um texto curto, seções com listas ou uma lista de `InsightItem`.
|
|
599
614
|
*/
|
|
600
|
-
declare function InsightCard({ title, meta, action, divider, className, children, ...props }: InsightCardProps): React$1.JSX.Element;
|
|
615
|
+
declare function InsightCard({ title, meta, metaPosition, action, divider, divided, size, className, children, ...props }: InsightCardProps): React$1.JSX.Element;
|
|
601
616
|
type InsightItemProps = Omit<React$1.ComponentProps<"div">, "title"> & {
|
|
602
617
|
/** O assunto: verde (o que foi bom), amarelo (atenção) ou lilás (dica da Financinha). */
|
|
603
618
|
tone?: InsightTone;
|
|
@@ -887,4 +902,4 @@ declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...p
|
|
|
887
902
|
isActive?: boolean;
|
|
888
903
|
}): React$1.JSX.Element;
|
|
889
904
|
|
|
890
|
-
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 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -583,21 +583,36 @@ type MetricCardProps = Omit<React$1.ComponentProps<"div">, "children"> & {
|
|
|
583
583
|
declare function MetricCard({ label, value, icon, tone, trend, comparison, className, ...props }: MetricCardProps): React$1.JSX.Element;
|
|
584
584
|
|
|
585
585
|
type InsightTone = "success" | "warning" | "tip";
|
|
586
|
+
type InsightSize = "default" | "sm";
|
|
586
587
|
type InsightCardProps = Omit<React$1.ComponentProps<"div">, "title"> & {
|
|
587
588
|
/** O título do card, como "Principais insights da semana". Vem sempre com o brilho da IA antes. */
|
|
588
589
|
title: React$1.ReactNode;
|
|
589
|
-
/** Texto de apoio
|
|
590
|
+
/** Texto de apoio do título, como o período ("23 de out. – 29 de out."). */
|
|
590
591
|
meta?: React$1.ReactNode;
|
|
592
|
+
/**
|
|
593
|
+
* Onde fica o `meta`. `inline` (padrão): colado ao título, depois de " · ".
|
|
594
|
+
* `end`: na borda direita do cabeçalho, em 14 px cinza, antes da ação, como o período de um card comum no `CardAction`.
|
|
595
|
+
*/
|
|
596
|
+
metaPosition?: "inline" | "end";
|
|
591
597
|
/** Ação à direita do título, como o botão de atualizar. */
|
|
592
598
|
action?: React$1.ReactNode;
|
|
593
599
|
/** Linha embaixo do cabeçalho. Use quando o conteúdo é uma lista de `InsightItem`. */
|
|
594
600
|
divider?: boolean;
|
|
601
|
+
/** Linha entre os `InsightItem`. Padrão: sim. */
|
|
602
|
+
divided?: boolean;
|
|
603
|
+
/**
|
|
604
|
+
* `default`: título de 16 px e ícone do insight de 40 px.
|
|
605
|
+
* `sm`: denso, como os outros cards da Home (Card compacto). Títulos de 14 px, cabeçalho de 24 px alinhado ao topo,
|
|
606
|
+
* 16 px até o conteúdo, ícone do insight de 32 px e 8 px entre o ícone e o texto. A ação do cabeçalho usa
|
|
607
|
+
* `size="icon-xs"` (24 px), para não mudar a altura.
|
|
608
|
+
*/
|
|
609
|
+
size?: InsightSize;
|
|
595
610
|
};
|
|
596
611
|
/**
|
|
597
612
|
* Card da IA: superfície lilás (o único card roxo do DS; o Card comum não tem essa cor), com o brilho (Sparkles) e o título no topo.
|
|
598
613
|
* O conteúdo é livre: um texto curto, seções com listas ou uma lista de `InsightItem`.
|
|
599
614
|
*/
|
|
600
|
-
declare function InsightCard({ title, meta, action, divider, className, children, ...props }: InsightCardProps): React$1.JSX.Element;
|
|
615
|
+
declare function InsightCard({ title, meta, metaPosition, action, divider, divided, size, className, children, ...props }: InsightCardProps): React$1.JSX.Element;
|
|
601
616
|
type InsightItemProps = Omit<React$1.ComponentProps<"div">, "title"> & {
|
|
602
617
|
/** O assunto: verde (o que foi bom), amarelo (atenção) ou lilás (dica da Financinha). */
|
|
603
618
|
tone?: InsightTone;
|
|
@@ -887,4 +902,4 @@ declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...p
|
|
|
887
902
|
isActive?: boolean;
|
|
888
903
|
}): React$1.JSX.Element;
|
|
889
904
|
|
|
890
|
-
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 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 };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -3232,7 +3232,7 @@ function MetricCard({
|
|
|
3232
3232
|
}
|
|
3233
3233
|
|
|
3234
3234
|
// src/components/patterns/insight-card.tsx
|
|
3235
|
-
import "react";
|
|
3235
|
+
import * as React37 from "react";
|
|
3236
3236
|
import { cn as cn37 } from "cn";
|
|
3237
3237
|
import { SparklesIcon } from "lucide-react";
|
|
3238
3238
|
import { jsx as jsx36, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
@@ -3246,13 +3246,33 @@ var TITLE_TONE = {
|
|
|
3246
3246
|
warning: "text-warning-500 dark:text-warning-300",
|
|
3247
3247
|
tip: "text-primary-500 dark:text-primary-300"
|
|
3248
3248
|
};
|
|
3249
|
-
|
|
3249
|
+
var InsightCardContext = React37.createContext({ size: "default", divided: true });
|
|
3250
|
+
function InsightCard({
|
|
3251
|
+
title,
|
|
3252
|
+
meta,
|
|
3253
|
+
metaPosition = "inline",
|
|
3254
|
+
action,
|
|
3255
|
+
divider = false,
|
|
3256
|
+
divided = true,
|
|
3257
|
+
size = "default",
|
|
3258
|
+
className,
|
|
3259
|
+
children,
|
|
3260
|
+
...props
|
|
3261
|
+
}) {
|
|
3262
|
+
const sm = size === "sm";
|
|
3263
|
+
const metaNoFim = meta != null && metaPosition === "end";
|
|
3264
|
+
const contexto = React37.useMemo(() => ({ size, divided }), [size, divided]);
|
|
3250
3265
|
return /* @__PURE__ */ jsxs20(
|
|
3251
3266
|
Card,
|
|
3252
3267
|
{
|
|
3253
3268
|
"data-slot": "insight-card",
|
|
3269
|
+
"data-size": size,
|
|
3254
3270
|
padding: "compact",
|
|
3255
|
-
className: cn37(
|
|
3271
|
+
className: cn37(
|
|
3272
|
+
"border-primary-200 bg-primary-50 dark:border-primary-700 dark:bg-primary-800/40",
|
|
3273
|
+
sm ? "gap-4" : "gap-3",
|
|
3274
|
+
className
|
|
3275
|
+
),
|
|
3256
3276
|
...props,
|
|
3257
3277
|
children: [
|
|
3258
3278
|
/* @__PURE__ */ jsxs20(
|
|
@@ -3260,19 +3280,24 @@ function InsightCard({ title, meta, action, divider = false, className, children
|
|
|
3260
3280
|
{
|
|
3261
3281
|
"data-slot": "insight-card-header",
|
|
3262
3282
|
className: cn37(
|
|
3263
|
-
"flex
|
|
3283
|
+
"flex gap-2 px-(--card-spacing)",
|
|
3284
|
+
// sm: 24 px de altura (a do botão icon-xs), alinhado ao topo, como o cabeçalho do Card compacto.
|
|
3285
|
+
sm ? "min-h-6 items-start" : "items-center",
|
|
3264
3286
|
divider && "border-b border-inherit pb-(--card-spacing)"
|
|
3265
3287
|
),
|
|
3266
3288
|
children: [
|
|
3267
|
-
/* @__PURE__ */ jsx36(
|
|
3268
|
-
/* @__PURE__ */ jsxs20("p", { className: "
|
|
3289
|
+
/* @__PURE__ */ jsx36("span", { "aria-hidden": true, className: cn37("flex shrink-0 items-center", sm && "h-6"), children: /* @__PURE__ */ jsx36(SparklesIcon, { className: "size-5 text-primary-500 dark:text-primary-300" }) }),
|
|
3290
|
+
/* @__PURE__ */ jsxs20("p", { className: cn37("min-w-0 font-semibold text-foreground", sm ? "text-sm leading-6" : "text-base"), children: [
|
|
3269
3291
|
title,
|
|
3270
|
-
meta ? /* @__PURE__ */ jsxs20("span", { className: "font-normal text-muted-foreground", children: [
|
|
3292
|
+
meta != null && !metaNoFim ? /* @__PURE__ */ jsxs20("span", { className: "font-normal text-muted-foreground", children: [
|
|
3271
3293
|
" \xB7 ",
|
|
3272
3294
|
meta
|
|
3273
3295
|
] }) : null
|
|
3274
3296
|
] }),
|
|
3275
|
-
action ? /* @__PURE__ */
|
|
3297
|
+
metaNoFim || action ? /* @__PURE__ */ jsxs20("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
|
|
3298
|
+
metaNoFim ? /* @__PURE__ */ jsx36("p", { "data-slot": "insight-card-meta", className: "text-sm leading-6 text-muted-foreground", children: meta }) : null,
|
|
3299
|
+
action
|
|
3300
|
+
] }) : null
|
|
3276
3301
|
]
|
|
3277
3302
|
}
|
|
3278
3303
|
),
|
|
@@ -3281,7 +3306,7 @@ function InsightCard({ title, meta, action, divider = false, className, children
|
|
|
3281
3306
|
{
|
|
3282
3307
|
"data-slot": "insight-card-content",
|
|
3283
3308
|
className: "flex flex-col gap-3 px-(--card-spacing) text-sm leading-relaxed text-neutral-600 dark:text-neutral-300",
|
|
3284
|
-
children
|
|
3309
|
+
children: /* @__PURE__ */ jsx36(InsightCardContext.Provider, { value: contexto, children })
|
|
3285
3310
|
}
|
|
3286
3311
|
)
|
|
3287
3312
|
]
|
|
@@ -3289,12 +3314,16 @@ function InsightCard({ title, meta, action, divider = false, className, children
|
|
|
3289
3314
|
);
|
|
3290
3315
|
}
|
|
3291
3316
|
function InsightItem({ tone = "tip", icon, title, className, children, ...props }) {
|
|
3317
|
+
const { size, divided } = React37.useContext(InsightCardContext);
|
|
3318
|
+
const sm = size === "sm";
|
|
3292
3319
|
return /* @__PURE__ */ jsxs20(
|
|
3293
3320
|
"div",
|
|
3294
3321
|
{
|
|
3295
3322
|
"data-slot": "insight-item",
|
|
3296
3323
|
className: cn37(
|
|
3297
|
-
"flex
|
|
3324
|
+
"flex",
|
|
3325
|
+
sm ? "gap-2" : "gap-3",
|
|
3326
|
+
divided && "border-b border-primary-200 pb-3 last:border-0 last:pb-0 dark:border-primary-700",
|
|
3298
3327
|
className
|
|
3299
3328
|
),
|
|
3300
3329
|
...props,
|
|
@@ -3303,12 +3332,16 @@ function InsightItem({ tone = "tip", icon, title, className, children, ...props
|
|
|
3303
3332
|
"span",
|
|
3304
3333
|
{
|
|
3305
3334
|
"aria-hidden": true,
|
|
3306
|
-
className: cn37(
|
|
3335
|
+
className: cn37(
|
|
3336
|
+
"flex shrink-0 items-center justify-center",
|
|
3337
|
+
sm ? "size-8 rounded-md [&>svg]:size-4" : "size-10 rounded-lg [&>svg]:size-5",
|
|
3338
|
+
ICON_TONE2[tone]
|
|
3339
|
+
),
|
|
3307
3340
|
children: icon
|
|
3308
3341
|
}
|
|
3309
3342
|
) : null,
|
|
3310
3343
|
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-1", children: [
|
|
3311
|
-
/* @__PURE__ */ jsx36("p", { className: cn37("text-
|
|
3344
|
+
/* @__PURE__ */ jsx36("p", { className: cn37("font-semibold", sm ? "text-sm" : "text-base", TITLE_TONE[tone]), children: title }),
|
|
3312
3345
|
/* @__PURE__ */ jsx36("div", { children })
|
|
3313
3346
|
] })
|
|
3314
3347
|
]
|