@cascivo/react 0.2.1 → 0.3.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/README.md +73 -5
- package/dist/cascivo.css +1 -1
- package/dist/index.d.ts +42 -4
- package/dist/index.js +1078 -964
- package/package.json +8 -7
- package/readme.body.md +57 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,11 +5,18 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
5
5
|
variant?: 'primary' | 'secondary' | 'ghost' | 'destructive';
|
|
6
6
|
size?: 'sm' | 'md' | 'lg';
|
|
7
7
|
loading?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Render the single child element instead of a native `<button>` so the button
|
|
10
|
+
* styling lands on, e.g., a real `<a href>` (preserves middle-click / open-in-new-tab).
|
|
11
|
+
* The child owns its own content; the loading spinner is not rendered in this mode.
|
|
12
|
+
*/
|
|
13
|
+
asChild?: boolean;
|
|
8
14
|
}
|
|
9
15
|
declare function Button({
|
|
10
16
|
variant,
|
|
11
17
|
size,
|
|
12
18
|
loading,
|
|
19
|
+
asChild,
|
|
13
20
|
className,
|
|
14
21
|
disabled,
|
|
15
22
|
children,
|
|
@@ -560,11 +567,25 @@ declare function Header({
|
|
|
560
567
|
className,
|
|
561
568
|
...props
|
|
562
569
|
}: HeaderProps): import("react").JSX.Element;
|
|
563
|
-
|
|
570
|
+
type SideNavTone = 'default' | 'danger' | 'warning' | 'success';
|
|
571
|
+
/** A selectable/navigable sub-item (link when `href` is set, action when `onSelect` is set). */
|
|
572
|
+
interface SideNavLinkSubItem {
|
|
564
573
|
label: string;
|
|
565
|
-
href
|
|
574
|
+
href?: string;
|
|
575
|
+
icon?: ReactNode;
|
|
566
576
|
active?: boolean;
|
|
577
|
+
/** Shows a trailing checkmark; use for picker-style "current selection" rows. */
|
|
578
|
+
selected?: boolean;
|
|
579
|
+
/** Runs an action instead of navigating. When set without `href`, renders a `<button>`. */
|
|
580
|
+
onSelect?: () => void;
|
|
581
|
+
disabled?: boolean;
|
|
567
582
|
}
|
|
583
|
+
type SideNavSubItem = SideNavLinkSubItem | {
|
|
584
|
+
type: 'separator';
|
|
585
|
+
} | {
|
|
586
|
+
type: 'label';
|
|
587
|
+
label: string;
|
|
588
|
+
};
|
|
568
589
|
interface SideNavItem {
|
|
569
590
|
label: string;
|
|
570
591
|
href?: string;
|
|
@@ -572,6 +593,19 @@ interface SideNavItem {
|
|
|
572
593
|
active?: boolean;
|
|
573
594
|
items?: SideNavSubItem[];
|
|
574
595
|
onClick?: (e: MouseEvent<HTMLAnchorElement>) => void;
|
|
596
|
+
/** Non-interactive and visually dimmed. */
|
|
597
|
+
disabled?: boolean;
|
|
598
|
+
/** Recolors the item; `'default'` is the standard subtle color. */
|
|
599
|
+
tone?: SideNavTone;
|
|
600
|
+
/** Rendered right-aligned after the label (e.g. a Kbd hint, badge, count); hidden on the rail. */
|
|
601
|
+
trailing?: ReactNode;
|
|
602
|
+
/**
|
|
603
|
+
* Escape hatch: render arbitrary content inside the item's shell so it inherits
|
|
604
|
+
* alignment and the collapse context. When set, the item's own fields are ignored.
|
|
605
|
+
*/
|
|
606
|
+
render?: (ctx: {
|
|
607
|
+
collapsed: boolean;
|
|
608
|
+
}) => ReactNode;
|
|
575
609
|
}
|
|
576
610
|
interface SideNavGroup {
|
|
577
611
|
label?: string;
|
|
@@ -588,6 +622,8 @@ interface SideNavProps {
|
|
|
588
622
|
expandLabel?: string;
|
|
589
623
|
expandOnHover?: boolean;
|
|
590
624
|
showCollapseToggle?: boolean;
|
|
625
|
+
/** Content rendered above the items, inside the item padding context. */
|
|
626
|
+
header?: ReactNode;
|
|
591
627
|
footer?: ReactNode;
|
|
592
628
|
className?: string;
|
|
593
629
|
}
|
|
@@ -602,6 +638,7 @@ declare function SideNav({
|
|
|
602
638
|
expandLabel,
|
|
603
639
|
expandOnHover,
|
|
604
640
|
showCollapseToggle,
|
|
641
|
+
header,
|
|
605
642
|
footer,
|
|
606
643
|
className
|
|
607
644
|
}: SideNavProps): import("react").JSX.Element;
|
|
@@ -1242,7 +1279,8 @@ declare function AlertDialog({
|
|
|
1242
1279
|
interface SheetProps {
|
|
1243
1280
|
open: boolean;
|
|
1244
1281
|
onClose: () => void;
|
|
1245
|
-
|
|
1282
|
+
/** Optional heading. Accepts rich nodes; when present it labels the dialog via `aria-labelledby`. */
|
|
1283
|
+
title?: ReactNode;
|
|
1246
1284
|
children: ReactNode;
|
|
1247
1285
|
side?: 'start' | 'end' | 'top' | 'bottom';
|
|
1248
1286
|
}
|
|
@@ -2823,4 +2861,4 @@ declare function Swap({
|
|
|
2823
2861
|
className,
|
|
2824
2862
|
...aria
|
|
2825
2863
|
}: SwapProps): import("react").JSX.Element;
|
|
2826
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, Alert, AlertDialog, AlertDialogLabels, AlertDialogProps, AlertProps, AppShell, AppShellProps, AspectRatio, AspectRatioProps, Avatar, AvatarGroup, AvatarGroupLabels, AvatarGroupProps, AvatarProps, Badge, BadgeProps, Blockquote, BlockquoteProps, Breadcrumb, BreadcrumbItem, BreadcrumbProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Calendar, CalendarLabels, CalendarProps, Card, CardContent, CardContentProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, Carousel, CarouselLabels, CarouselProps, ChatBubble, ChatBubbleProps, ChatBubbleSide, Checkbox, CheckboxCard, CheckboxCardProps, CheckboxProps, Code, type CodeLang, CodeProps, CodeSnippet, CodeSnippetProps, Collapsible, CollapsibleProps, ColorPicker, ColorPickerLabels, ColorPickerProps, Column, Combobox, ComboboxLabels, ComboboxOption, ComboboxProps, CommandGroup, CommandItem, CommandMenu, CommandMenuProps, CommandPage, Comparison, ComparisonProps, ContainedList, ContainedListItem, ContainedListItemProps, ContainedListProps, ContextMenu, ContextMenuItem, ContextMenuItemProps, ContextMenuProps, CopyButton, CopyButtonProps, DataList, DataListItem, DataListProps, DataTable, DataTableLabels, DataTableProps, DatePicker, DatePickerLabels, DatePickerProps, DateRange, DateRangePicker, DateRangePickerLabels, DateRangePickerProps, DateRangePreset, Dock, DockItem, DockProps, Drawer, DrawerProps, Dropdown, DropdownItem, DropdownProps, Editable, EditableProps, EmptyState, EmptyStateProps, ErrorBoundary, Field, FieldProps, FileUploader, FileUploaderLabels, FileUploaderProps, Filter, FilterOption, FilterProps, FilterVariant, FocusScope, Form, FormConfig, FormProps, FormStore, Header, HeaderLabels, HeaderLink, HeaderPanel, HeaderPanelLabels, HeaderPanelProps, HeaderProps, Heading, HeadingLevel, HeadingProps, HeadingSize, HoverCard, HoverCardContent, HoverCardContentProps, HoverCardProps, HoverCardTrigger, HoverCardTriggerProps, IconButton, IconButtonProps, Image, ImageProps, Indicator, IndicatorPlacement, IndicatorProps, InlineLoading, InlineLoadingProps, InlineLoadingStatus, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, type InputGroupProps, InputProps, Item, ItemActions, ItemActionsProps, ItemContent, ItemContentProps, ItemDescription, ItemDescriptionProps, ItemMedia, ItemMediaProps, ItemProps, ItemTitle, ItemTitleProps, Join, JoinOrientation, JoinProps, Kbd, KbdProps, Label, LabelProps, Link, LinkProps, List, ListItem, ListItemProps, ListProps, Menu, MenuButton, MenuButtonItem, MenuButtonProps, MenuItem, MenuItemProps, MenuProps, MenuSeparator, MenuTrigger, MenuTriggerProps, Menubar, MenubarItem, MenubarMenu, MenubarProps, Modal, ModalProps, MultiSelect, MultiSelectLabels, MultiSelectOption, MultiSelectProps, NativeSelect, NativeSelectOption, NativeSelectProps, NavigationMenu, NavigationMenuItem, NavigationMenuProps, Notification, NotificationProps, NotificationVariant, NumberInput, NumberInputProps, OtpInput, OtpInputProps, OverflowMenu, OverflowMenuItem, OverflowMenuProps, Pagination, PaginationLabels, PaginationProps, PasswordInput, PasswordInputLabels, PasswordInputProps, Popover, PopoverContent, PopoverContentProps, PopoverProps, PopoverTrigger, PopoverTriggerProps, Portal, Progress, ProgressBar, ProgressBarProps, ProgressCircle, ProgressCircleProps, ProgressIndicator, ProgressIndicatorProps, ProgressProps, ProgressSize, ProgressStep, ProgressVariant, Prose, ProseProps, QrCode, QrCodeProps, RadialProgress, RadialProgressProps, RadialProgressSize, RadialProgressVariant, Radio, RadioCard, RadioCardGroup, RadioCardGroupProps, RadioCardProps, RadioGroup, RadioGroupProps, RadioProps, RatingGroup, RatingGroupLabels, RatingGroupProps, RelativeTime, RelativeTimeProps, Resizable, ResizableProps, ScrollArea, ScrollAreaProps, Search, SearchProps, SegmentedControl, SegmentedControlOption, SegmentedControlProps, Select, SelectOption, SelectProps, Separator, SeparatorProps, Sheet, SheetProps, ShellHeader, ShellHeaderAction, ShellHeaderBrand, ShellHeaderLabels, ShellHeaderNavItem, ShellHeaderNavLink, ShellHeaderNavMenu, ShellHeaderNavMenuItem, ShellHeaderProps, SideNav, SideNavGroup, SideNavItem, SideNavProps, SideNavSubItem, Skeleton, SkeletonProps, SkipNavLink, SkipNavLinkProps, SkipNavTarget, SkipNavTargetProps, Slider, SliderProps, SortDirection, SortState, Spinner, SpinnerProps, Stack, StackProps, type StandardSchemaV1, Stat, StatProps, Status, StatusProps, Step, StepState, Steps, StepsProps, StructuredList, StructuredListItem, StructuredListProps, SuspenseBoundary, Swap, SwapMode, SwapProps, Switcher, SwitcherEntry, SwitcherLink, SwitcherProps, Tabs, TabsContent, TabsContentProps, TabsList, TabsProps, TabsTrigger, TabsTriggerProps, Tag$1 as Tag, TagProps, TagsInput, TagsInputProps, Text, TextProps, Textarea, TextareaProps, Tile, TileProps, TimePicker, TimePickerProps, Timeline, TimelineItem, TimelineProps, ToastOptions, ToastProvider, ToastVariant, Toc, TocItem, TocProps, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupProps, ToggleProps, Toggletip, ToggletipPlacement, ToggletipProps, Tooltip, TooltipProps, TreeNode, TreeView, TreeViewProps, UploaderFile, type UsePopoverOptions, type UsePopoverReturn, type UseTocFromRegionOptions, User, UserProps, VisuallyHidden, VisuallyHiddenProps, createForm, dismissAllToasts, fuzzyScore, treeViewMessages, useForm, usePopover, useToast, useTocFromRegion };
|
|
2864
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, Alert, AlertDialog, AlertDialogLabels, AlertDialogProps, AlertProps, AppShell, AppShellProps, AspectRatio, AspectRatioProps, Avatar, AvatarGroup, AvatarGroupLabels, AvatarGroupProps, AvatarProps, Badge, BadgeProps, Blockquote, BlockquoteProps, Breadcrumb, BreadcrumbItem, BreadcrumbProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Calendar, CalendarLabels, CalendarProps, Card, CardContent, CardContentProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, Carousel, CarouselLabels, CarouselProps, ChatBubble, ChatBubbleProps, ChatBubbleSide, Checkbox, CheckboxCard, CheckboxCardProps, CheckboxProps, Code, type CodeLang, CodeProps, CodeSnippet, CodeSnippetProps, Collapsible, CollapsibleProps, ColorPicker, ColorPickerLabels, ColorPickerProps, Column, Combobox, ComboboxLabels, ComboboxOption, ComboboxProps, CommandGroup, CommandItem, CommandMenu, CommandMenuProps, CommandPage, Comparison, ComparisonProps, ContainedList, ContainedListItem, ContainedListItemProps, ContainedListProps, ContextMenu, ContextMenuItem, ContextMenuItemProps, ContextMenuProps, CopyButton, CopyButtonProps, DataList, DataListItem, DataListProps, DataTable, DataTableLabels, DataTableProps, DatePicker, DatePickerLabels, DatePickerProps, DateRange, DateRangePicker, DateRangePickerLabels, DateRangePickerProps, DateRangePreset, Dock, DockItem, DockProps, Drawer, DrawerProps, Dropdown, DropdownItem, DropdownProps, Editable, EditableProps, EmptyState, EmptyStateProps, ErrorBoundary, Field, FieldProps, FileUploader, FileUploaderLabels, FileUploaderProps, Filter, FilterOption, FilterProps, FilterVariant, FocusScope, Form, FormConfig, FormProps, FormStore, Header, HeaderLabels, HeaderLink, HeaderPanel, HeaderPanelLabels, HeaderPanelProps, HeaderProps, Heading, HeadingLevel, HeadingProps, HeadingSize, HoverCard, HoverCardContent, HoverCardContentProps, HoverCardProps, HoverCardTrigger, HoverCardTriggerProps, IconButton, IconButtonProps, Image, ImageProps, Indicator, IndicatorPlacement, IndicatorProps, InlineLoading, InlineLoadingProps, InlineLoadingStatus, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, type InputGroupProps, InputProps, Item, ItemActions, ItemActionsProps, ItemContent, ItemContentProps, ItemDescription, ItemDescriptionProps, ItemMedia, ItemMediaProps, ItemProps, ItemTitle, ItemTitleProps, Join, JoinOrientation, JoinProps, Kbd, KbdProps, Label, LabelProps, Link, LinkProps, List, ListItem, ListItemProps, ListProps, Menu, MenuButton, MenuButtonItem, MenuButtonProps, MenuItem, MenuItemProps, MenuProps, MenuSeparator, MenuTrigger, MenuTriggerProps, Menubar, MenubarItem, MenubarMenu, MenubarProps, Modal, ModalProps, MultiSelect, MultiSelectLabels, MultiSelectOption, MultiSelectProps, NativeSelect, NativeSelectOption, NativeSelectProps, NavigationMenu, NavigationMenuItem, NavigationMenuProps, Notification, NotificationProps, NotificationVariant, NumberInput, NumberInputProps, OtpInput, OtpInputProps, OverflowMenu, OverflowMenuItem, OverflowMenuProps, Pagination, PaginationLabels, PaginationProps, PasswordInput, PasswordInputLabels, PasswordInputProps, Popover, PopoverContent, PopoverContentProps, PopoverProps, PopoverTrigger, PopoverTriggerProps, Portal, Progress, ProgressBar, ProgressBarProps, ProgressCircle, ProgressCircleProps, ProgressIndicator, ProgressIndicatorProps, ProgressProps, ProgressSize, ProgressStep, ProgressVariant, Prose, ProseProps, QrCode, QrCodeProps, RadialProgress, RadialProgressProps, RadialProgressSize, RadialProgressVariant, Radio, RadioCard, RadioCardGroup, RadioCardGroupProps, RadioCardProps, RadioGroup, RadioGroupProps, RadioProps, RatingGroup, RatingGroupLabels, RatingGroupProps, RelativeTime, RelativeTimeProps, Resizable, ResizableProps, ScrollArea, ScrollAreaProps, Search, SearchProps, SegmentedControl, SegmentedControlOption, SegmentedControlProps, Select, SelectOption, SelectProps, Separator, SeparatorProps, Sheet, SheetProps, ShellHeader, ShellHeaderAction, ShellHeaderBrand, ShellHeaderLabels, ShellHeaderNavItem, ShellHeaderNavLink, ShellHeaderNavMenu, ShellHeaderNavMenuItem, ShellHeaderProps, SideNav, SideNavGroup, SideNavItem, SideNavLinkSubItem, SideNavProps, SideNavSubItem, SideNavTone, Skeleton, SkeletonProps, SkipNavLink, SkipNavLinkProps, SkipNavTarget, SkipNavTargetProps, Slider, SliderProps, SortDirection, SortState, Spinner, SpinnerProps, Stack, StackProps, type StandardSchemaV1, Stat, StatProps, Status, StatusProps, Step, StepState, Steps, StepsProps, StructuredList, StructuredListItem, StructuredListProps, SuspenseBoundary, Swap, SwapMode, SwapProps, Switcher, SwitcherEntry, SwitcherLink, SwitcherProps, Tabs, TabsContent, TabsContentProps, TabsList, TabsProps, TabsTrigger, TabsTriggerProps, Tag$1 as Tag, TagProps, TagsInput, TagsInputProps, Text, TextProps, Textarea, TextareaProps, Tile, TileProps, TimePicker, TimePickerProps, Timeline, TimelineItem, TimelineProps, ToastOptions, ToastProvider, ToastVariant, Toc, TocItem, TocProps, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupProps, ToggleProps, Toggletip, ToggletipPlacement, ToggletipProps, Tooltip, TooltipProps, TreeNode, TreeView, TreeViewProps, UploaderFile, type UsePopoverOptions, type UsePopoverReturn, type UseTocFromRegionOptions, User, UserProps, VisuallyHidden, VisuallyHiddenProps, createForm, dismissAllToasts, fuzzyScore, treeViewMessages, useForm, usePopover, useToast, useTocFromRegion };
|