@cascivo/react 0.3.1 → 0.3.3
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 +17 -1
- package/dist/cascivo.css +1 -1
- package/dist/index.d.ts +200 -1
- package/dist/index.js +1358 -917
- package/package.json +2 -2
- package/readme.body.md +17 -1
package/dist/index.d.ts
CHANGED
|
@@ -465,6 +465,52 @@ declare function AccordionItem({
|
|
|
465
465
|
}: AccordionItemProps): import("react").JSX.Element;
|
|
466
466
|
declare function AccordionTrigger(props: HTMLAttributes<HTMLButtonElement>): import("react").JSX.Element;
|
|
467
467
|
declare function AccordionContent(props: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
468
|
+
interface ActionSheetAction {
|
|
469
|
+
label: ReactNode;
|
|
470
|
+
onSelect: () => void;
|
|
471
|
+
/** Render in the destructive (danger) style. */
|
|
472
|
+
destructive?: boolean;
|
|
473
|
+
disabled?: boolean;
|
|
474
|
+
}
|
|
475
|
+
interface ActionSheetProps {
|
|
476
|
+
/** Controlled open state. */
|
|
477
|
+
open?: boolean;
|
|
478
|
+
/** Initial open state for uncontrolled use. */
|
|
479
|
+
defaultOpen?: boolean;
|
|
480
|
+
/** Called whenever the open state should change (selection, cancel, Escape, outside press). */
|
|
481
|
+
onOpenChange?: (open: boolean) => void;
|
|
482
|
+
/** The choices presented, top to bottom. */
|
|
483
|
+
actions: ActionSheetAction[];
|
|
484
|
+
/** Optional heading shown above the actions; also labels the menu. */
|
|
485
|
+
title?: ReactNode;
|
|
486
|
+
/** Optional supporting message under the title. */
|
|
487
|
+
description?: ReactNode;
|
|
488
|
+
/** Show the separate Cancel button. Default true. */
|
|
489
|
+
showCancel?: boolean;
|
|
490
|
+
labels?: {
|
|
491
|
+
cancel?: string;
|
|
492
|
+
label?: string;
|
|
493
|
+
};
|
|
494
|
+
className?: string;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Bottom-rising sheet of discrete actions (iOS action-sheet pattern). Renders a
|
|
498
|
+
* role="menu" of menuitems with vertical roving focus (Arrow keys, Home/End, wraps);
|
|
499
|
+
* Escape and outside press dismiss it, and a separate Cancel button gives an explicit
|
|
500
|
+
* non-destructive exit. Body scroll is not locked — the sheet is transient. Reuses the
|
|
501
|
+
* overlay primitives and CSS-only slide; no animation library.
|
|
502
|
+
*/
|
|
503
|
+
declare function ActionSheet({
|
|
504
|
+
open,
|
|
505
|
+
defaultOpen,
|
|
506
|
+
onOpenChange,
|
|
507
|
+
actions,
|
|
508
|
+
title,
|
|
509
|
+
description,
|
|
510
|
+
showCancel,
|
|
511
|
+
labels,
|
|
512
|
+
className
|
|
513
|
+
}: ActionSheetProps): import("react").JSX.Element;
|
|
468
514
|
interface KbdProps extends HTMLAttributes<HTMLElement> {
|
|
469
515
|
size?: 'sm' | 'md';
|
|
470
516
|
}
|
|
@@ -751,6 +797,50 @@ declare function EmptyState({
|
|
|
751
797
|
className,
|
|
752
798
|
...props
|
|
753
799
|
}: EmptyStateProps): import("react").JSX.Element;
|
|
800
|
+
interface FabAction {
|
|
801
|
+
/** Accessible name and visible label for the speed-dial item. */
|
|
802
|
+
label: string;
|
|
803
|
+
icon: ReactNode;
|
|
804
|
+
onSelect: () => void;
|
|
805
|
+
disabled?: boolean;
|
|
806
|
+
}
|
|
807
|
+
interface FabProps {
|
|
808
|
+
/** The main button icon. */
|
|
809
|
+
children: ReactNode;
|
|
810
|
+
/** Accessible name for the main button (it is icon-only). */
|
|
811
|
+
label: string;
|
|
812
|
+
/** Called on press when there is no speed-dial. Ignored when `actions` is set. */
|
|
813
|
+
onClick?: () => void;
|
|
814
|
+
/** Speed-dial actions revealed above the button when opened. */
|
|
815
|
+
actions?: FabAction[];
|
|
816
|
+
/** Screen corner to anchor to. */
|
|
817
|
+
position?: 'bottom-end' | 'bottom-start';
|
|
818
|
+
/** Controlled speed-dial open state. */
|
|
819
|
+
open?: boolean;
|
|
820
|
+
/** Initial speed-dial open state for uncontrolled use. */
|
|
821
|
+
defaultOpen?: boolean;
|
|
822
|
+
/** Called whenever the speed-dial open state should change. */
|
|
823
|
+
onOpenChange?: (open: boolean) => void;
|
|
824
|
+
className?: string;
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Floating action button anchored to a screen corner. On its own it is a single
|
|
828
|
+
* fixed button; given `actions` it becomes a speed-dial whose main button toggles a
|
|
829
|
+
* role="menu" of secondary actions (vertical roving focus, Escape / outside press to
|
|
830
|
+
* collapse, focus returns to the button). Fixed position honours the safe-area insets;
|
|
831
|
+
* CSS-only motion, no animation library.
|
|
832
|
+
*/
|
|
833
|
+
declare function Fab({
|
|
834
|
+
children,
|
|
835
|
+
label,
|
|
836
|
+
onClick,
|
|
837
|
+
actions,
|
|
838
|
+
position,
|
|
839
|
+
open,
|
|
840
|
+
defaultOpen,
|
|
841
|
+
onOpenChange,
|
|
842
|
+
className
|
|
843
|
+
}: FabProps): import("react").JSX.Element;
|
|
754
844
|
interface OverflowMenuItem {
|
|
755
845
|
label: string;
|
|
756
846
|
value: string;
|
|
@@ -1291,6 +1381,56 @@ declare function Sheet({
|
|
|
1291
1381
|
children,
|
|
1292
1382
|
side
|
|
1293
1383
|
}: SheetProps): import("react").JSX.Element;
|
|
1384
|
+
interface BottomSheetProps {
|
|
1385
|
+
/** Controlled open state. */
|
|
1386
|
+
open?: boolean;
|
|
1387
|
+
/** Initial open state for uncontrolled use. */
|
|
1388
|
+
defaultOpen?: boolean;
|
|
1389
|
+
/** Called whenever the open state should change (drag-dismiss, Escape, outside press). */
|
|
1390
|
+
onOpenChange?: (open: boolean) => void;
|
|
1391
|
+
/**
|
|
1392
|
+
* Detent heights as fractions of the viewport (0–1), ascending. The sheet snaps
|
|
1393
|
+
* between these; dragging below the lowest dismisses it. Defaults to half + near-full.
|
|
1394
|
+
*/
|
|
1395
|
+
snapPoints?: number[];
|
|
1396
|
+
/** Controlled active detent index into `snapPoints`. */
|
|
1397
|
+
activeSnap?: number;
|
|
1398
|
+
/** Initial active detent index for uncontrolled use. Defaults to the lowest detent. */
|
|
1399
|
+
defaultSnap?: number;
|
|
1400
|
+
/** Called when the active detent changes via drag. */
|
|
1401
|
+
onSnapChange?: (index: number) => void;
|
|
1402
|
+
/** Accessible title shown in the header and used to label the dialog. */
|
|
1403
|
+
title?: ReactNode;
|
|
1404
|
+
/** Optional supporting description shown under the title. */
|
|
1405
|
+
description?: ReactNode;
|
|
1406
|
+
children?: ReactNode;
|
|
1407
|
+
labels?: {
|
|
1408
|
+
close?: string;
|
|
1409
|
+
handle?: string;
|
|
1410
|
+
};
|
|
1411
|
+
className?: string;
|
|
1412
|
+
}
|
|
1413
|
+
/**
|
|
1414
|
+
* Mobile bottom sheet with drag-to-resize detents. The panel is sized to its tallest
|
|
1415
|
+
* detent and translated down to reveal only the active one; dragging the grab handle
|
|
1416
|
+
* moves it and, on release, snaps to the nearest detent (projected by fling velocity)
|
|
1417
|
+
* or dismisses past the lowest. Body scroll is locked, focus is trapped, and Escape /
|
|
1418
|
+
* outside press dismiss it. CSS translate only — no animation library.
|
|
1419
|
+
*/
|
|
1420
|
+
declare function BottomSheet({
|
|
1421
|
+
open,
|
|
1422
|
+
defaultOpen,
|
|
1423
|
+
onOpenChange,
|
|
1424
|
+
snapPoints,
|
|
1425
|
+
activeSnap,
|
|
1426
|
+
defaultSnap,
|
|
1427
|
+
onSnapChange,
|
|
1428
|
+
title,
|
|
1429
|
+
description,
|
|
1430
|
+
children,
|
|
1431
|
+
labels,
|
|
1432
|
+
className
|
|
1433
|
+
}: BottomSheetProps): import("react").JSX.Element;
|
|
1294
1434
|
interface ContextMenuProps {
|
|
1295
1435
|
children: ReactNode;
|
|
1296
1436
|
}
|
|
@@ -1850,6 +1990,35 @@ declare function Prose({
|
|
|
1850
1990
|
children,
|
|
1851
1991
|
...props
|
|
1852
1992
|
}: ProseProps): import("react").JSX.Element;
|
|
1993
|
+
interface PullToRefreshProps {
|
|
1994
|
+
/** Invoked when the pull passes the threshold; the spinner shows until it settles. */
|
|
1995
|
+
onRefresh: () => Promise<unknown> | unknown;
|
|
1996
|
+
children: ReactNode;
|
|
1997
|
+
/** Pull distance (px) required to trigger a refresh. Default 64. */
|
|
1998
|
+
threshold?: number;
|
|
1999
|
+
disabled?: boolean;
|
|
2000
|
+
labels?: {
|
|
2001
|
+
pull?: string;
|
|
2002
|
+
release?: string;
|
|
2003
|
+
refreshing?: string;
|
|
2004
|
+
};
|
|
2005
|
+
className?: string;
|
|
2006
|
+
}
|
|
2007
|
+
/**
|
|
2008
|
+
* Wraps a vertically scrollable region and triggers `onRefresh` when the user pulls
|
|
2009
|
+
* down past a threshold while scrolled to the top. The gesture is damped (rubber-band),
|
|
2010
|
+
* shows a spinner while the returned promise settles, then springs back. Pointer logic
|
|
2011
|
+
* runs in `useSignalEffect`; CSS translate only, no animation library. Pull is only armed
|
|
2012
|
+
* at scrollTop 0, so normal scrolling is untouched.
|
|
2013
|
+
*/
|
|
2014
|
+
declare function PullToRefresh({
|
|
2015
|
+
onRefresh,
|
|
2016
|
+
children,
|
|
2017
|
+
threshold,
|
|
2018
|
+
disabled,
|
|
2019
|
+
labels,
|
|
2020
|
+
className
|
|
2021
|
+
}: PullToRefreshProps): import("react").JSX.Element;
|
|
1853
2022
|
/**
|
|
1854
2023
|
* Minimal QR Code encoder (byte mode, versions 1–40, EC levels L/M/Q/H).
|
|
1855
2024
|
*
|
|
@@ -2861,4 +3030,34 @@ declare function Swap({
|
|
|
2861
3030
|
className,
|
|
2862
3031
|
...aria
|
|
2863
3032
|
}: SwapProps): import("react").JSX.Element;
|
|
2864
|
-
|
|
3033
|
+
interface SwipeAction {
|
|
3034
|
+
/** Accessible name and visible label. */
|
|
3035
|
+
label: string;
|
|
3036
|
+
icon?: ReactNode;
|
|
3037
|
+
onSelect: () => void;
|
|
3038
|
+
/** Render in the destructive (danger) style. */
|
|
3039
|
+
destructive?: boolean;
|
|
3040
|
+
}
|
|
3041
|
+
interface SwipeItemProps {
|
|
3042
|
+
/** The row content. */
|
|
3043
|
+
children: ReactNode;
|
|
3044
|
+
/** Actions revealed by dragging the row toward its end edge (shown on the start edge). */
|
|
3045
|
+
leadingActions?: SwipeAction[];
|
|
3046
|
+
/** Actions revealed by dragging the row toward its start edge (shown on the end edge). */
|
|
3047
|
+
trailingActions?: SwipeAction[];
|
|
3048
|
+
className?: string;
|
|
3049
|
+
}
|
|
3050
|
+
/**
|
|
3051
|
+
* A list row whose leading/trailing actions are revealed by a horizontal drag, snapping
|
|
3052
|
+
* open or closed on release (projected by fling velocity). The action buttons are always
|
|
3053
|
+
* in the DOM and the a11y tree — never gesture-only — and focusing one (keyboard) reveals
|
|
3054
|
+
* its side, so the row is fully operable without a pointer. Escape closes it. The drag is
|
|
3055
|
+
* physical-axis (tuned for LTR); CSS translate only, no animation library.
|
|
3056
|
+
*/
|
|
3057
|
+
declare function SwipeItem({
|
|
3058
|
+
children,
|
|
3059
|
+
leadingActions,
|
|
3060
|
+
trailingActions,
|
|
3061
|
+
className
|
|
3062
|
+
}: SwipeItemProps): import("react").JSX.Element;
|
|
3063
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, ActionSheet, ActionSheetAction, ActionSheetProps, Alert, AlertDialog, AlertDialogLabels, AlertDialogProps, AlertProps, AppShell, AppShellProps, AspectRatio, AspectRatioProps, Avatar, AvatarGroup, AvatarGroupLabels, AvatarGroupProps, AvatarProps, Badge, BadgeProps, Blockquote, BlockquoteProps, BottomSheet, BottomSheetProps, 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, Fab, FabAction, FabProps, 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, PullToRefresh, PullToRefreshProps, 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, SwipeAction, SwipeItem, SwipeItemProps, 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 };
|