@true-tech-team/react-components 0.0.4 → 0.0.6
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/index.css +1 -1
- package/index.d.ts +10 -0
- package/index.js +1 -1
- package/index.mjs +15961 -6871
- package/lib/components/buttons/ButtonToggleGroup/ButtonToggleGroup.d.ts +79 -0
- package/lib/components/buttons/ButtonToggleGroup/ButtonToggleGroupContext.d.ts +38 -0
- package/lib/components/buttons/ButtonToggleGroup/ButtonToggleGroupItem.d.ts +37 -0
- package/lib/components/buttons/ButtonToggleGroup/index.d.ts +7 -0
- package/lib/components/buttons/ToggleButton/ToggleButton.d.ts +96 -0
- package/lib/components/buttons/ToggleButton/index.d.ts +3 -0
- package/lib/components/display/Icon/icons/BookmarkFilled.d.ts +3 -0
- package/lib/components/display/Icon/icons/ChevronsLeft.d.ts +3 -0
- package/lib/components/display/Icon/icons/ChevronsRight.d.ts +3 -0
- package/lib/components/display/Icon/icons/HeartFilled.d.ts +3 -0
- package/lib/components/display/Icon/icons/More.d.ts +3 -0
- package/lib/components/display/Icon/icons/StarFilled.d.ts +3 -0
- package/lib/components/display/Icon/icons/ThumbsUpFilled.d.ts +3 -0
- package/lib/components/display/Icon/icons/index.d.ts +15 -1
- package/lib/components/display/List/List.d.ts +6 -0
- package/lib/components/display/List/ListContext.d.ts +15 -0
- package/lib/components/display/List/ListEmpty.d.ts +25 -0
- package/lib/components/display/List/ListGroup.d.ts +36 -0
- package/lib/components/display/List/ListHeader.d.ts +62 -0
- package/lib/components/display/List/ListItem.d.ts +19 -0
- package/lib/components/display/List/ListSearch.d.ts +32 -0
- package/lib/components/display/List/ListSkeleton.d.ts +27 -0
- package/lib/components/display/List/hooks/index.d.ts +5 -0
- package/lib/components/display/List/hooks/useListExpand.d.ts +6 -0
- package/lib/components/display/List/hooks/useListFilter.d.ts +6 -0
- package/lib/components/display/List/hooks/useListGroups.d.ts +6 -0
- package/lib/components/display/List/hooks/useListKeyboardNav.d.ts +6 -0
- package/lib/components/display/List/hooks/useListSelection.d.ts +6 -0
- package/lib/components/display/List/index.d.ts +11 -0
- package/lib/components/display/List/types.d.ts +485 -0
- package/lib/components/display/List/utils.d.ts +47 -0
- package/lib/components/display/OverflowText/OverflowText.d.ts +81 -0
- package/lib/components/display/OverflowText/index.d.ts +2 -0
- package/lib/components/display/ScrollArea/ScrollArea.d.ts +112 -0
- package/lib/components/display/ScrollArea/index.d.ts +3 -0
- package/lib/components/display/Table/Table.d.ts +6 -0
- package/lib/components/display/Table/TableBody.d.ts +4 -0
- package/lib/components/display/Table/TableCell.d.ts +12 -0
- package/lib/components/display/Table/TableContext.d.ts +10 -0
- package/lib/components/display/Table/TableHeader.d.ts +4 -0
- package/lib/components/display/Table/TableRow.d.ts +9 -0
- package/lib/components/display/Table/TableSearch.d.ts +32 -0
- package/lib/components/display/Table/TableSkeleton.d.ts +12 -0
- package/lib/components/display/Table/hooks/index.d.ts +10 -0
- package/lib/components/display/Table/hooks/useInfiniteScroll.d.ts +11 -0
- package/lib/components/display/Table/hooks/useTableExpand.d.ts +10 -0
- package/lib/components/display/Table/hooks/useTableFilter.d.ts +22 -0
- package/lib/components/display/Table/hooks/useTableSelection.d.ts +16 -0
- package/lib/components/display/Table/hooks/useTableSort.d.ts +11 -0
- package/lib/components/display/Table/index.d.ts +13 -0
- package/lib/components/display/Table/types.d.ts +295 -0
- package/lib/components/display/Table/utils.d.ts +37 -0
- package/lib/components/display/Tabs/Tab.d.ts +41 -0
- package/lib/components/display/Tabs/TabList.d.ts +27 -0
- package/lib/components/display/Tabs/TabPanel.d.ts +31 -0
- package/lib/components/display/Tabs/Tabs.d.ts +90 -0
- package/lib/components/display/Tabs/TabsContext.d.ts +63 -0
- package/lib/components/display/Tabs/index.d.ts +11 -0
- package/lib/components/display/TruncatedList/TruncatedList.d.ts +69 -0
- package/lib/components/display/TruncatedList/index.d.ts +2 -0
- package/lib/components/display/index.d.ts +4 -0
- package/lib/components/dnd/DndProvider/DndContext.d.ts +91 -0
- package/lib/components/dnd/DndProvider/DndProvider.d.ts +37 -0
- package/lib/components/dnd/DndProvider/index.d.ts +3 -0
- package/lib/components/dnd/DragHandle/DragHandle.d.ts +41 -0
- package/lib/components/dnd/DragHandle/index.d.ts +2 -0
- package/lib/components/dnd/DragOverlay/DragOverlay.d.ts +39 -0
- package/lib/components/dnd/DragOverlay/index.d.ts +2 -0
- package/lib/components/dnd/KanbanBoard/KanbanBoard.d.ts +126 -0
- package/lib/components/dnd/KanbanBoard/KanbanBoardContext.d.ts +62 -0
- package/lib/components/dnd/KanbanBoard/KanbanCard.d.ts +76 -0
- package/lib/components/dnd/KanbanBoard/KanbanColumn.d.ts +43 -0
- package/lib/components/dnd/KanbanBoard/index.d.ts +5 -0
- package/lib/components/dnd/ResizablePanels/ResizablePanel.d.ts +53 -0
- package/lib/components/dnd/ResizablePanels/ResizablePanels.d.ts +43 -0
- package/lib/components/dnd/ResizablePanels/ResizablePanelsContext.d.ts +64 -0
- package/lib/components/dnd/ResizablePanels/ResizeHandle.d.ts +28 -0
- package/lib/components/dnd/ResizablePanels/index.d.ts +5 -0
- package/lib/components/dnd/SortableGrid/SortableGrid.d.ts +76 -0
- package/lib/components/dnd/SortableGrid/SortableGridItem.d.ts +47 -0
- package/lib/components/dnd/SortableGrid/index.d.ts +3 -0
- package/lib/components/dnd/SortableList/SortableItem.d.ts +76 -0
- package/lib/components/dnd/SortableList/SortableList.d.ts +98 -0
- package/lib/components/dnd/SortableList/SortableListContext.d.ts +42 -0
- package/lib/components/dnd/SortableList/index.d.ts +4 -0
- package/lib/components/dnd/hooks/index.d.ts +3 -0
- package/lib/components/dnd/hooks/useDraggable.d.ts +66 -0
- package/lib/components/dnd/hooks/useDroppable.d.ts +73 -0
- package/lib/components/dnd/hooks/useSortable.d.ts +94 -0
- package/lib/components/dnd/index.d.ts +8 -0
- package/lib/components/filters/FilterContext.d.ts +34 -0
- package/lib/components/filters/core/ActiveFilters/ActiveFilters.d.ts +16 -0
- package/lib/components/filters/core/ActiveFilters/index.d.ts +2 -0
- package/lib/components/filters/core/FilterField/FilterField.d.ts +17 -0
- package/lib/components/filters/core/FilterField/index.d.ts +2 -0
- package/lib/components/filters/core/FilterProvider/FilterProvider.d.ts +4 -0
- package/lib/components/filters/core/FilterProvider/index.d.ts +2 -0
- package/lib/components/filters/core/FilterSection/FilterSection.d.ts +16 -0
- package/lib/components/filters/core/FilterSection/index.d.ts +2 -0
- package/lib/components/filters/core/index.d.ts +7 -0
- package/lib/components/filters/fields/CheckboxFilter.d.ts +17 -0
- package/lib/components/filters/fields/DateFilter.d.ts +21 -0
- package/lib/components/filters/fields/DateRangeFilter.d.ts +19 -0
- package/lib/components/filters/fields/ListSelectFilter.d.ts +19 -0
- package/lib/components/filters/fields/MultiSelectFilter.d.ts +19 -0
- package/lib/components/filters/fields/NumberFilter.d.ts +19 -0
- package/lib/components/filters/fields/NumberRangeFilter.d.ts +19 -0
- package/lib/components/filters/fields/RatingFilter.d.ts +19 -0
- package/lib/components/filters/fields/SelectFilter.d.ts +21 -0
- package/lib/components/filters/fields/TextFilter.d.ts +21 -0
- package/lib/components/filters/fields/ToggleFilter.d.ts +17 -0
- package/lib/components/filters/fields/index.d.ts +25 -0
- package/lib/components/filters/hooks/index.d.ts +9 -0
- package/lib/components/filters/hooks/useFilter.d.ts +57 -0
- package/lib/components/filters/hooks/useFilterDependencies.d.ts +40 -0
- package/lib/components/filters/hooks/useFilterOptions.d.ts +70 -0
- package/lib/components/filters/index.d.ts +43 -0
- package/lib/components/filters/layouts/FilterAccordion/FilterAccordion.d.ts +15 -0
- package/lib/components/filters/layouts/FilterAccordion/index.d.ts +2 -0
- package/lib/components/filters/layouts/FilterBar/FilterBar.d.ts +18 -0
- package/lib/components/filters/layouts/FilterBar/index.d.ts +2 -0
- package/lib/components/filters/layouts/FilterModal/FilterModal.d.ts +24 -0
- package/lib/components/filters/layouts/FilterModal/index.d.ts +2 -0
- package/lib/components/filters/layouts/FilterPopover/FilterPopover.d.ts +19 -0
- package/lib/components/filters/layouts/FilterPopover/index.d.ts +2 -0
- package/lib/components/filters/layouts/FilterSidebar/FilterSidebar.d.ts +20 -0
- package/lib/components/filters/layouts/FilterSidebar/index.d.ts +2 -0
- package/lib/components/filters/layouts/index.d.ts +8 -0
- package/lib/components/filters/types.d.ts +937 -0
- package/lib/components/index.d.ts +52 -0
- package/lib/components/inputs/Checkbox/Checkbox.d.ts +2 -2
- package/lib/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +122 -0
- package/lib/components/inputs/CheckboxGroup/CheckboxGroupContext.d.ts +42 -0
- package/lib/components/inputs/CheckboxGroup/CheckboxGroupItem.d.ts +50 -0
- package/lib/components/inputs/CheckboxGroup/index.d.ts +7 -0
- package/lib/components/inputs/NumberInput/NumberInput.d.ts +3 -1
- package/lib/components/layout/AdaptiveGrid/AdaptiveGrid.d.ts +100 -0
- package/lib/components/layout/AdaptiveGrid/index.d.ts +2 -0
- package/lib/components/layout/MasonryLayout/MasonryLayout.d.ts +74 -0
- package/lib/components/layout/MasonryLayout/index.d.ts +2 -0
- package/lib/components/layout/Panes/Pane.d.ts +72 -0
- package/lib/components/layout/Panes/Panes.d.ts +75 -0
- package/lib/components/layout/Panes/PanesContext.d.ts +60 -0
- package/lib/components/layout/Panes/index.d.ts +6 -0
- package/lib/components/layout/ResponsiveStack/ResponsiveStack.d.ts +99 -0
- package/lib/components/layout/ResponsiveStack/index.d.ts +2 -0
- package/lib/components/layout/index.d.ts +4 -0
- package/lib/components/navigation/BottomNavigation/BottomNavigation.d.ts +53 -0
- package/lib/components/navigation/BottomNavigation/BottomNavigationContext.d.ts +27 -0
- package/lib/components/navigation/BottomNavigation/BottomNavigationItem.d.ts +59 -0
- package/lib/components/navigation/BottomNavigation/index.d.ts +7 -0
- package/lib/components/navigation/Breadcrumbs/BreadcrumbItem.d.ts +37 -0
- package/lib/components/navigation/Breadcrumbs/BreadcrumbSeparator.d.ts +22 -0
- package/lib/components/navigation/Breadcrumbs/Breadcrumbs.d.ts +96 -0
- package/lib/components/navigation/Breadcrumbs/index.d.ts +9 -0
- package/lib/components/navigation/Breadcrumbs/useBreadcrumbsFromPath.d.ts +73 -0
- package/lib/components/navigation/CollapsibleSidebar/CollapsibleSidebar.d.ts +113 -0
- package/lib/components/navigation/CollapsibleSidebar/index.d.ts +2 -0
- package/lib/components/navigation/NavLink/NavLink.d.ts +74 -0
- package/lib/components/navigation/NavLink/index.d.ts +3 -0
- package/lib/components/navigation/Navbar/Navbar.d.ts +81 -0
- package/lib/components/navigation/Navbar/NavbarActions.d.ts +21 -0
- package/lib/components/navigation/Navbar/NavbarBrand.d.ts +29 -0
- package/lib/components/navigation/Navbar/NavbarCollapse.d.ts +26 -0
- package/lib/components/navigation/Navbar/NavbarContext.d.ts +50 -0
- package/lib/components/navigation/Navbar/NavbarNav.d.ts +22 -0
- package/lib/components/navigation/Navbar/NavbarToggle.d.ts +21 -0
- package/lib/components/navigation/Navbar/index.d.ts +15 -0
- package/lib/components/navigation/Pagination/Pagination.d.ts +99 -0
- package/lib/components/navigation/Pagination/index.d.ts +3 -0
- package/lib/components/navigation/SideNav/SideNav.d.ts +89 -0
- package/lib/components/navigation/SideNav/SideNavContext.d.ts +43 -0
- package/lib/components/navigation/SideNav/SideNavDivider.d.ts +22 -0
- package/lib/components/navigation/SideNav/SideNavGroup.d.ts +44 -0
- package/lib/components/navigation/SideNav/SideNavItem.d.ts +71 -0
- package/lib/components/navigation/SideNav/index.d.ts +11 -0
- package/lib/components/navigation/Stepper/Step.d.ts +57 -0
- package/lib/components/navigation/Stepper/Stepper.d.ts +80 -0
- package/lib/components/navigation/Stepper/StepperContext.d.ts +58 -0
- package/lib/components/navigation/Stepper/index.d.ts +7 -0
- package/lib/components/navigation/index.d.ts +16 -0
- package/lib/components/overlays/Alert/Alert.d.ts +102 -0
- package/lib/components/overlays/Alert/AlertContext.d.ts +94 -0
- package/lib/components/overlays/Alert/AlertPresets.d.ts +42 -0
- package/lib/components/overlays/Alert/AlertProvider.d.ts +40 -0
- package/lib/components/overlays/Alert/index.d.ts +11 -0
- package/lib/components/overlays/Dialog/Dialog.d.ts +197 -0
- package/lib/components/overlays/Dialog/DialogContext.d.ts +75 -0
- package/lib/components/overlays/Dialog/DialogProvider.d.ts +30 -0
- package/lib/components/overlays/Dialog/index.d.ts +9 -0
- package/lib/components/overlays/Toast/Toast.d.ts +103 -0
- package/lib/components/overlays/Toast/ToastContainer.d.ts +37 -0
- package/lib/components/overlays/Toast/ToastContext.d.ts +126 -0
- package/lib/components/overlays/Toast/ToastProvider.d.ts +71 -0
- package/lib/components/overlays/Toast/index.d.ts +11 -0
- package/lib/hooks/index.d.ts +10 -0
- package/lib/hooks/useAlert/index.d.ts +2 -0
- package/lib/hooks/useAlert/useAlert.d.ts +99 -0
- package/lib/hooks/useAsyncToast/index.d.ts +2 -0
- package/lib/hooks/useAsyncToast/useAsyncToast.d.ts +93 -0
- package/lib/hooks/useDialog/index.d.ts +2 -0
- package/lib/hooks/useDialog/useDialog.d.ts +58 -0
- package/lib/hooks/useResizeObserver/index.d.ts +2 -0
- package/lib/hooks/useResizeObserver/useResizeObserver.d.ts +69 -0
- package/lib/hooks/useToast/index.d.ts +2 -0
- package/lib/hooks/useToast/useToast.d.ts +97 -0
- package/lib/providers/GlobalProvider/GlobalProvider.d.ts +16 -1
- package/package.json +1 -1
- package/README.md +0 -688
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface SideNavContextValue {
|
|
2
|
+
/**
|
|
3
|
+
* Unique ID for this SideNav instance
|
|
4
|
+
*/
|
|
5
|
+
sideNavId: string;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the sidebar is collapsed (icon-only mode)
|
|
8
|
+
*/
|
|
9
|
+
collapsed: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Currently selected item value
|
|
12
|
+
*/
|
|
13
|
+
selectedValue: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Select an item
|
|
16
|
+
*/
|
|
17
|
+
onSelect: (value: string) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Position of the sidebar
|
|
20
|
+
*/
|
|
21
|
+
position: 'left' | 'right';
|
|
22
|
+
/**
|
|
23
|
+
* Set of expanded group IDs
|
|
24
|
+
*/
|
|
25
|
+
expandedGroups: Set<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Toggle a group's expanded state
|
|
28
|
+
*/
|
|
29
|
+
toggleGroup: (groupId: string) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Register a group as expanded by default
|
|
32
|
+
*/
|
|
33
|
+
registerDefaultExpanded: (groupId: string) => void;
|
|
34
|
+
}
|
|
35
|
+
export declare const SideNavContext: import('react').Context<SideNavContextValue | null>;
|
|
36
|
+
/**
|
|
37
|
+
* Hook to access SideNav context (returns null if outside SideNav)
|
|
38
|
+
*/
|
|
39
|
+
export declare function useSideNavContext(): SideNavContextValue | null;
|
|
40
|
+
/**
|
|
41
|
+
* Hook to access SideNav context (throws if outside SideNav)
|
|
42
|
+
*/
|
|
43
|
+
export declare function useSideNavContextStrict(): SideNavContextValue;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BaseComponentProps } from '../../../types';
|
|
3
|
+
export interface SideNavDividerProps extends Omit<BaseComponentProps, 'children'> {
|
|
4
|
+
/**
|
|
5
|
+
* Optional label for the divider
|
|
6
|
+
*/
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* SideNavDivider - Visual separator for SideNav
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* // Simple divider
|
|
15
|
+
* <SideNavDivider />
|
|
16
|
+
*
|
|
17
|
+
* // With label
|
|
18
|
+
* <SideNavDivider label="Settings" />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare const SideNavDivider: React.ForwardRefExoticComponent<SideNavDividerProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export default SideNavDivider;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BaseComponentProps } from '../../../types';
|
|
3
|
+
import { IconName } from '../../display/Icon';
|
|
4
|
+
export interface SideNavGroupProps extends BaseComponentProps {
|
|
5
|
+
/**
|
|
6
|
+
* Unique identifier for this group
|
|
7
|
+
*/
|
|
8
|
+
groupId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Group label
|
|
11
|
+
*/
|
|
12
|
+
label: string;
|
|
13
|
+
/**
|
|
14
|
+
* Icon for the group header
|
|
15
|
+
*/
|
|
16
|
+
icon?: React.ReactNode | IconName;
|
|
17
|
+
/**
|
|
18
|
+
* Controlled expanded state
|
|
19
|
+
*/
|
|
20
|
+
expanded?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Default expanded state
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
defaultExpanded?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Nested navigation items
|
|
28
|
+
*/
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* SideNavGroup - Grouped/nested navigation items
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <SideNavGroup groupId="settings" label="Settings" icon="Settings">
|
|
37
|
+
* <SideNavItem value="profile" label="Profile" />
|
|
38
|
+
* <SideNavItem value="security" label="Security" />
|
|
39
|
+
* <SideNavItem value="notifications" label="Notifications" />
|
|
40
|
+
* </SideNavGroup>
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare const SideNavGroup: React.ForwardRefExoticComponent<SideNavGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
44
|
+
export default SideNavGroup;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BaseComponentProps } from '../../../types';
|
|
3
|
+
import { IconName } from '../../display/Icon';
|
|
4
|
+
export interface SideNavItemProps extends BaseComponentProps {
|
|
5
|
+
/**
|
|
6
|
+
* Unique identifier for this item
|
|
7
|
+
*/
|
|
8
|
+
value: string;
|
|
9
|
+
/**
|
|
10
|
+
* Icon to display
|
|
11
|
+
*/
|
|
12
|
+
icon?: React.ReactNode | IconName;
|
|
13
|
+
/**
|
|
14
|
+
* Label text
|
|
15
|
+
*/
|
|
16
|
+
label: string;
|
|
17
|
+
/**
|
|
18
|
+
* Tooltip text (shown when collapsed, defaults to label)
|
|
19
|
+
*/
|
|
20
|
+
tooltip?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether item is disabled
|
|
23
|
+
*/
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Link href (renders as anchor tag)
|
|
27
|
+
*/
|
|
28
|
+
href?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Click handler
|
|
31
|
+
*/
|
|
32
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Badge content
|
|
35
|
+
*/
|
|
36
|
+
badge?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* End adornment (icon, badge, etc.)
|
|
39
|
+
*/
|
|
40
|
+
endAdornment?: React.ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Nesting level (set automatically by SideNavGroup)
|
|
43
|
+
*/
|
|
44
|
+
level?: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* SideNavItem - Individual navigation item for SideNav
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <SideNavItem value="home" icon="Home" label="Home" />
|
|
52
|
+
*
|
|
53
|
+
* // With badge
|
|
54
|
+
* <SideNavItem
|
|
55
|
+
* value="notifications"
|
|
56
|
+
* icon="Bell"
|
|
57
|
+
* label="Notifications"
|
|
58
|
+
* badge={<Badge>5</Badge>}
|
|
59
|
+
* />
|
|
60
|
+
*
|
|
61
|
+
* // As link
|
|
62
|
+
* <SideNavItem
|
|
63
|
+
* value="settings"
|
|
64
|
+
* icon="Settings"
|
|
65
|
+
* label="Settings"
|
|
66
|
+
* href="/settings"
|
|
67
|
+
* />
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare const SideNavItem: React.ForwardRefExoticComponent<SideNavItemProps & React.RefAttributes<HTMLElement>>;
|
|
71
|
+
export default SideNavItem;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { SideNav } from './SideNav';
|
|
2
|
+
export type { SideNavProps } from './SideNav';
|
|
3
|
+
export { default } from './SideNav';
|
|
4
|
+
export { SideNavItem } from './SideNavItem';
|
|
5
|
+
export type { SideNavItemProps } from './SideNavItem';
|
|
6
|
+
export { SideNavGroup } from './SideNavGroup';
|
|
7
|
+
export type { SideNavGroupProps } from './SideNavGroup';
|
|
8
|
+
export { SideNavDivider } from './SideNavDivider';
|
|
9
|
+
export type { SideNavDividerProps } from './SideNavDivider';
|
|
10
|
+
export { SideNavContext, useSideNavContext, useSideNavContextStrict } from './SideNavContext';
|
|
11
|
+
export type { SideNavContextValue } from './SideNavContext';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BaseComponentProps } from '../../../types';
|
|
3
|
+
import { IconName } from '../../display/Icon';
|
|
4
|
+
export interface StepProps extends BaseComponentProps {
|
|
5
|
+
/**
|
|
6
|
+
* Step title
|
|
7
|
+
*/
|
|
8
|
+
title: string;
|
|
9
|
+
/**
|
|
10
|
+
* Step description
|
|
11
|
+
*/
|
|
12
|
+
description?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Custom icon (for 'icon' variant)
|
|
15
|
+
*/
|
|
16
|
+
icon?: React.ReactNode | IconName;
|
|
17
|
+
/**
|
|
18
|
+
* Whether step is optional
|
|
19
|
+
*/
|
|
20
|
+
optional?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether step has error
|
|
23
|
+
*/
|
|
24
|
+
error?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Error message
|
|
27
|
+
*/
|
|
28
|
+
errorMessage?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Step content (for vertical orientation)
|
|
31
|
+
*/
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Step index (injected by Stepper parent)
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
_stepIndex?: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Step - Individual step in a Stepper
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* <Step title="Account" description="Create your account" />
|
|
45
|
+
*
|
|
46
|
+
* // With custom icon
|
|
47
|
+
* <Step title="Shipping" icon="Truck" />
|
|
48
|
+
*
|
|
49
|
+
* // Optional step
|
|
50
|
+
* <Step title="Extras" optional />
|
|
51
|
+
*
|
|
52
|
+
* // With error
|
|
53
|
+
* <Step title="Payment" error errorMessage="Please fix payment details" />
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare const Step: React.ForwardRefExoticComponent<StepProps & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
export default Step;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BaseComponentProps, ComponentSize } from '../../../types';
|
|
3
|
+
import { StepperVariant, StepperOrientation } from './StepperContext';
|
|
4
|
+
export interface StepperProps extends BaseComponentProps {
|
|
5
|
+
/**
|
|
6
|
+
* Current active step (0-indexed)
|
|
7
|
+
*/
|
|
8
|
+
currentStep: number;
|
|
9
|
+
/**
|
|
10
|
+
* Callback when step is clicked
|
|
11
|
+
*/
|
|
12
|
+
onStepChange?: (step: number) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Orientation
|
|
15
|
+
* @default 'horizontal'
|
|
16
|
+
*/
|
|
17
|
+
orientation?: StepperOrientation;
|
|
18
|
+
/**
|
|
19
|
+
* Visual variant
|
|
20
|
+
* @default 'numbered'
|
|
21
|
+
*/
|
|
22
|
+
variant?: StepperVariant;
|
|
23
|
+
/**
|
|
24
|
+
* Size
|
|
25
|
+
* @default 'md'
|
|
26
|
+
*/
|
|
27
|
+
size?: ComponentSize;
|
|
28
|
+
/**
|
|
29
|
+
* Allow clicking on steps to navigate
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
allowStepClick?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Only allow clicking previous steps
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
onlyPreviousClickable?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Completed steps (for non-linear steppers)
|
|
40
|
+
*/
|
|
41
|
+
completedSteps?: number[];
|
|
42
|
+
/**
|
|
43
|
+
* Step components
|
|
44
|
+
*/
|
|
45
|
+
children: React.ReactNode;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Stepper - Wizard-style step navigation
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```tsx
|
|
52
|
+
* // Basic usage
|
|
53
|
+
* <Stepper currentStep={currentStep} onStepChange={setCurrentStep}>
|
|
54
|
+
* <Step title="Account" description="Create your account" />
|
|
55
|
+
* <Step title="Profile" description="Set up your profile" />
|
|
56
|
+
* <Step title="Review" description="Review and confirm" />
|
|
57
|
+
* </Stepper>
|
|
58
|
+
*
|
|
59
|
+
* // With clickable steps
|
|
60
|
+
* <Stepper
|
|
61
|
+
* currentStep={currentStep}
|
|
62
|
+
* onStepChange={setCurrentStep}
|
|
63
|
+
* allowStepClick
|
|
64
|
+
* onlyPreviousClickable
|
|
65
|
+
* >
|
|
66
|
+
* <Step title="Step 1" />
|
|
67
|
+
* <Step title="Step 2" />
|
|
68
|
+
* <Step title="Step 3" />
|
|
69
|
+
* </Stepper>
|
|
70
|
+
*
|
|
71
|
+
* // Vertical orientation
|
|
72
|
+
* <Stepper currentStep={currentStep} orientation="vertical">
|
|
73
|
+
* <Step title="Step 1">Step 1 content</Step>
|
|
74
|
+
* <Step title="Step 2">Step 2 content</Step>
|
|
75
|
+
* <Step title="Step 3">Step 3 content</Step>
|
|
76
|
+
* </Stepper>
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
|
|
80
|
+
export default Stepper;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ComponentSize } from '../../../types';
|
|
2
|
+
export type StepperVariant = 'numbered' | 'dot' | 'icon';
|
|
3
|
+
export type StepperOrientation = 'horizontal' | 'vertical';
|
|
4
|
+
export interface StepperContextValue {
|
|
5
|
+
/**
|
|
6
|
+
* Unique ID for this stepper instance
|
|
7
|
+
*/
|
|
8
|
+
stepperId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Current active step (0-indexed)
|
|
11
|
+
*/
|
|
12
|
+
currentStep: number;
|
|
13
|
+
/**
|
|
14
|
+
* Total number of steps
|
|
15
|
+
*/
|
|
16
|
+
totalSteps: number;
|
|
17
|
+
/**
|
|
18
|
+
* Orientation
|
|
19
|
+
*/
|
|
20
|
+
orientation: StepperOrientation;
|
|
21
|
+
/**
|
|
22
|
+
* Visual variant
|
|
23
|
+
*/
|
|
24
|
+
variant: StepperVariant;
|
|
25
|
+
/**
|
|
26
|
+
* Size
|
|
27
|
+
*/
|
|
28
|
+
size: ComponentSize;
|
|
29
|
+
/**
|
|
30
|
+
* Set of completed step indices
|
|
31
|
+
*/
|
|
32
|
+
completedSteps: Set<number>;
|
|
33
|
+
/**
|
|
34
|
+
* Click handler for steps
|
|
35
|
+
*/
|
|
36
|
+
onStepClick?: (step: number) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Whether step clicking is allowed
|
|
39
|
+
*/
|
|
40
|
+
allowStepClick: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Only allow clicking previous steps
|
|
43
|
+
*/
|
|
44
|
+
onlyPreviousClickable: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Register a step and get its index
|
|
47
|
+
*/
|
|
48
|
+
registerStep: () => number;
|
|
49
|
+
}
|
|
50
|
+
export declare const StepperContext: import('react').Context<StepperContextValue | null>;
|
|
51
|
+
/**
|
|
52
|
+
* Hook to access Stepper context (returns null if outside Stepper)
|
|
53
|
+
*/
|
|
54
|
+
export declare function useStepperContext(): StepperContextValue | null;
|
|
55
|
+
/**
|
|
56
|
+
* Hook to access Stepper context (throws if outside Stepper)
|
|
57
|
+
*/
|
|
58
|
+
export declare function useStepperContextStrict(): StepperContextValue;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Stepper } from './Stepper';
|
|
2
|
+
export type { StepperProps } from './Stepper';
|
|
3
|
+
export { default } from './Stepper';
|
|
4
|
+
export { Step } from './Step';
|
|
5
|
+
export type { StepProps } from './Step';
|
|
6
|
+
export { StepperContext, useStepperContext, useStepperContextStrict } from './StepperContext';
|
|
7
|
+
export type { StepperContextValue, StepperVariant, StepperOrientation } from './StepperContext';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { CollapsibleSidebar } from './CollapsibleSidebar';
|
|
2
|
+
export type { CollapsibleSidebarProps } from './CollapsibleSidebar';
|
|
3
|
+
export { NavLink } from './NavLink';
|
|
4
|
+
export type { NavLinkProps, NavLinkVariant } from './NavLink';
|
|
5
|
+
export { Navbar, NavbarBrand, NavbarNav, NavbarActions, NavbarToggle, NavbarCollapse, NavbarContext, useNavbarContext, useNavbarContextStrict, } from './Navbar';
|
|
6
|
+
export type { NavbarProps, NavbarBrandProps, NavbarNavProps, NavbarActionsProps, NavbarToggleProps, NavbarCollapseProps, NavbarContextValue, NavbarVariant, NavbarPosition, } from './Navbar';
|
|
7
|
+
export { SideNav, SideNavItem, SideNavGroup, SideNavDivider, SideNavContext, useSideNavContext, useSideNavContextStrict, } from './SideNav';
|
|
8
|
+
export type { SideNavProps, SideNavItemProps, SideNavGroupProps, SideNavDividerProps, SideNavContextValue, } from './SideNav';
|
|
9
|
+
export { Breadcrumbs, BreadcrumbItem, BreadcrumbSeparator, useBreadcrumbsFromPath, } from './Breadcrumbs';
|
|
10
|
+
export type { BreadcrumbsProps, BreadcrumbItemProps, BreadcrumbItemConfig, BreadcrumbSeparatorProps, UseBreadcrumbsFromPathOptions, } from './Breadcrumbs';
|
|
11
|
+
export { Pagination } from './Pagination';
|
|
12
|
+
export type { PaginationProps, PaginationVariant, PaginationShape } from './Pagination';
|
|
13
|
+
export { Stepper, Step, StepperContext, useStepperContext, useStepperContextStrict, } from './Stepper';
|
|
14
|
+
export type { StepperProps, StepProps, StepperContextValue, StepperVariant, StepperOrientation, } from './Stepper';
|
|
15
|
+
export { BottomNavigation, BottomNavigationItem, BottomNavigationContext, useBottomNavigationContext, useBottomNavigationContextStrict, } from './BottomNavigation';
|
|
16
|
+
export type { BottomNavigationProps, BottomNavigationItemProps, BottomNavigationContextValue, } from './BottomNavigation';
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
import { DialogProps, DialogSize } from '../Dialog';
|
|
3
|
+
import { IconName } from '../../display/Icon/icons';
|
|
4
|
+
import { AlertVariant } from './AlertPresets';
|
|
5
|
+
/**
|
|
6
|
+
* Alert props - extends Dialog with preset configurations
|
|
7
|
+
*/
|
|
8
|
+
export interface AlertProps extends Omit<DialogProps, 'actions' | 'renderHeader' | 'renderFooter'> {
|
|
9
|
+
/**
|
|
10
|
+
* Alert variant (determines icon, colors, default buttons)
|
|
11
|
+
* @default 'info'
|
|
12
|
+
*/
|
|
13
|
+
variant?: AlertVariant;
|
|
14
|
+
/**
|
|
15
|
+
* Alert icon (overrides variant default)
|
|
16
|
+
*/
|
|
17
|
+
icon?: IconName | ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Hide the icon
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
hideIcon?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Description/message content
|
|
25
|
+
*/
|
|
26
|
+
description?: ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Confirm button text
|
|
29
|
+
* @default 'OK' (or 'Confirm' for confirm variant)
|
|
30
|
+
*/
|
|
31
|
+
confirmText?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Cancel button text (only shown for confirm variant or when explicitly provided)
|
|
34
|
+
*/
|
|
35
|
+
cancelText?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Callback when confirm is clicked
|
|
38
|
+
*/
|
|
39
|
+
onConfirm?: () => void | Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Callback when cancel is clicked
|
|
42
|
+
*/
|
|
43
|
+
onCancel?: () => void;
|
|
44
|
+
/**
|
|
45
|
+
* Whether confirm button is loading
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
loading?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Whether confirm button is disabled
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
confirmDisabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Confirm button variant
|
|
56
|
+
*/
|
|
57
|
+
confirmVariant?: 'primary' | 'danger' | 'success' | 'warning';
|
|
58
|
+
/**
|
|
59
|
+
* Additional actions to render
|
|
60
|
+
*/
|
|
61
|
+
extraActions?: ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* Override default size for alerts
|
|
64
|
+
* @default 'sm'
|
|
65
|
+
*/
|
|
66
|
+
size?: DialogSize;
|
|
67
|
+
/**
|
|
68
|
+
* Show cancel button
|
|
69
|
+
* @default true for confirm variant, false for others
|
|
70
|
+
*/
|
|
71
|
+
showCancel?: boolean;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Alert component
|
|
75
|
+
* A dialog variant with preset configurations for common alert types
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```tsx
|
|
79
|
+
* // Simple info alert
|
|
80
|
+
* <Alert
|
|
81
|
+
* isOpen={isOpen}
|
|
82
|
+
* onClose={() => setIsOpen(false)}
|
|
83
|
+
* variant="info"
|
|
84
|
+
* title="Information"
|
|
85
|
+
* description="This is an informational message."
|
|
86
|
+
* />
|
|
87
|
+
*
|
|
88
|
+
* // Confirmation alert
|
|
89
|
+
* <Alert
|
|
90
|
+
* isOpen={isOpen}
|
|
91
|
+
* onClose={() => setIsOpen(false)}
|
|
92
|
+
* variant="confirm"
|
|
93
|
+
* title="Delete Item"
|
|
94
|
+
* description="Are you sure you want to delete this item?"
|
|
95
|
+
* onConfirm={handleDelete}
|
|
96
|
+
* onCancel={() => setIsOpen(false)}
|
|
97
|
+
* confirmVariant="danger"
|
|
98
|
+
* />
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
102
|
+
export default Alert;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { AlertProps } from './Alert';
|
|
2
|
+
/**
|
|
3
|
+
* Alert queue item representing a pending alert
|
|
4
|
+
*/
|
|
5
|
+
export interface AlertQueueItem {
|
|
6
|
+
/**
|
|
7
|
+
* Unique alert ID
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* Alert props (excluding isOpen which is managed by context)
|
|
12
|
+
*/
|
|
13
|
+
props: Omit<AlertProps, 'isOpen' | 'onConfirm' | 'onCancel'>;
|
|
14
|
+
/**
|
|
15
|
+
* Resolve function for promise-based alert
|
|
16
|
+
* Resolves with true if confirmed, false if cancelled
|
|
17
|
+
*/
|
|
18
|
+
resolve: (confirmed: boolean) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Alert context value
|
|
22
|
+
*/
|
|
23
|
+
export interface AlertContextValue {
|
|
24
|
+
/**
|
|
25
|
+
* Current alert queue
|
|
26
|
+
*/
|
|
27
|
+
alerts: AlertQueueItem[];
|
|
28
|
+
/**
|
|
29
|
+
* Show an alert and wait for user response
|
|
30
|
+
* @returns Promise<boolean> - true if confirmed, false if cancelled
|
|
31
|
+
*/
|
|
32
|
+
alert: (props: Omit<AlertProps, 'isOpen' | 'onConfirm' | 'onCancel'>) => Promise<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* Show a confirmation alert
|
|
35
|
+
* @param title - Alert title
|
|
36
|
+
* @param description - Alert description
|
|
37
|
+
* @param options - Additional alert options
|
|
38
|
+
* @returns Promise<boolean> - true if confirmed, false if cancelled
|
|
39
|
+
*/
|
|
40
|
+
confirm: (title: string, description?: string, options?: Partial<Omit<AlertProps, 'isOpen' | 'onConfirm' | 'onCancel' | 'title' | 'description'>>) => Promise<boolean>;
|
|
41
|
+
/**
|
|
42
|
+
* Show an error alert
|
|
43
|
+
* @param title - Alert title
|
|
44
|
+
* @param description - Alert description
|
|
45
|
+
* @param options - Additional alert options
|
|
46
|
+
* @returns Promise<boolean> - true when dismissed
|
|
47
|
+
*/
|
|
48
|
+
error: (title: string, description?: string, options?: Partial<Omit<AlertProps, 'isOpen' | 'onConfirm' | 'onCancel' | 'title' | 'description'>>) => Promise<boolean>;
|
|
49
|
+
/**
|
|
50
|
+
* Show a success alert
|
|
51
|
+
* @param title - Alert title
|
|
52
|
+
* @param description - Alert description
|
|
53
|
+
* @param options - Additional alert options
|
|
54
|
+
* @returns Promise<boolean> - true when dismissed
|
|
55
|
+
*/
|
|
56
|
+
success: (title: string, description?: string, options?: Partial<Omit<AlertProps, 'isOpen' | 'onConfirm' | 'onCancel' | 'title' | 'description'>>) => Promise<boolean>;
|
|
57
|
+
/**
|
|
58
|
+
* Show a warning alert
|
|
59
|
+
* @param title - Alert title
|
|
60
|
+
* @param description - Alert description
|
|
61
|
+
* @param options - Additional alert options
|
|
62
|
+
* @returns Promise<boolean> - true when dismissed
|
|
63
|
+
*/
|
|
64
|
+
warning: (title: string, description?: string, options?: Partial<Omit<AlertProps, 'isOpen' | 'onConfirm' | 'onCancel' | 'title' | 'description'>>) => Promise<boolean>;
|
|
65
|
+
/**
|
|
66
|
+
* Show an info alert
|
|
67
|
+
* @param title - Alert title
|
|
68
|
+
* @param description - Alert description
|
|
69
|
+
* @param options - Additional alert options
|
|
70
|
+
* @returns Promise<boolean> - true when dismissed
|
|
71
|
+
*/
|
|
72
|
+
info: (title: string, description?: string, options?: Partial<Omit<AlertProps, 'isOpen' | 'onConfirm' | 'onCancel' | 'title' | 'description'>>) => Promise<boolean>;
|
|
73
|
+
/**
|
|
74
|
+
* Dismiss current alert (resolves with false)
|
|
75
|
+
*/
|
|
76
|
+
dismiss: () => void;
|
|
77
|
+
/**
|
|
78
|
+
* Dismiss all alerts
|
|
79
|
+
*/
|
|
80
|
+
dismissAll: () => void;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Alert context
|
|
84
|
+
*/
|
|
85
|
+
export declare const AlertContext: import('react').Context<AlertContextValue | null>;
|
|
86
|
+
/**
|
|
87
|
+
* Hook to access alert context (returns null if not in provider)
|
|
88
|
+
*/
|
|
89
|
+
export declare function useAlertContext(): AlertContextValue | null;
|
|
90
|
+
/**
|
|
91
|
+
* Hook to access alert context (throws if not in provider)
|
|
92
|
+
* @throws Error if used outside of AlertProvider
|
|
93
|
+
*/
|
|
94
|
+
export declare function useAlertContextStrict(): AlertContextValue;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IconName } from '../../display/Icon/icons';
|
|
2
|
+
/**
|
|
3
|
+
* Alert variant types
|
|
4
|
+
*/
|
|
5
|
+
export type AlertVariant = 'info' | 'success' | 'warning' | 'error' | 'confirm';
|
|
6
|
+
/**
|
|
7
|
+
* Alert preset configuration
|
|
8
|
+
*/
|
|
9
|
+
export interface AlertPreset {
|
|
10
|
+
/**
|
|
11
|
+
* Variant identifier
|
|
12
|
+
*/
|
|
13
|
+
variant: AlertVariant;
|
|
14
|
+
/**
|
|
15
|
+
* Default icon for the variant
|
|
16
|
+
*/
|
|
17
|
+
icon: IconName;
|
|
18
|
+
/**
|
|
19
|
+
* Default title for the variant
|
|
20
|
+
*/
|
|
21
|
+
title: string;
|
|
22
|
+
/**
|
|
23
|
+
* Default confirm button text
|
|
24
|
+
*/
|
|
25
|
+
confirmText: string;
|
|
26
|
+
/**
|
|
27
|
+
* Default cancel button text (only for confirm variant)
|
|
28
|
+
*/
|
|
29
|
+
cancelText?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Confirm button variant
|
|
32
|
+
*/
|
|
33
|
+
confirmVariant: 'primary' | 'danger' | 'success' | 'warning';
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Preset configurations for each alert variant
|
|
37
|
+
*/
|
|
38
|
+
export declare const ALERT_PRESETS: Record<AlertVariant, AlertPreset>;
|
|
39
|
+
/**
|
|
40
|
+
* Get preset configuration for a variant
|
|
41
|
+
*/
|
|
42
|
+
export declare function getAlertPreset(variant: AlertVariant): AlertPreset;
|