@sakaniui/react 0.1.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/LICENSE +21 -0
- package/README.md +131 -0
- package/dist/components/Accordion/Accordion.d.ts +18 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Alert/Alert.d.ts +13 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/ActivityFeed/ActivityFeed.d.ts +27 -0
- package/dist/components/ApplicationComponents/ActivityFeed/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/Announcement/Announcement.d.ts +15 -0
- package/dist/components/ApplicationComponents/Announcement/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/AvatarUpload/AvatarUpload.d.ts +20 -0
- package/dist/components/ApplicationComponents/AvatarUpload/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/Balance/Balance.d.ts +21 -0
- package/dist/components/ApplicationComponents/Balance/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/CodeSnippet/CodeSnippet.d.ts +16 -0
- package/dist/components/ApplicationComponents/CodeSnippet/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/Expenses/Expenses.d.ts +18 -0
- package/dist/components/ApplicationComponents/Expenses/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/InlineHint/InlineHint.d.ts +9 -0
- package/dist/components/ApplicationComponents/InlineHint/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/Modal/Modal.d.ts +43 -0
- package/dist/components/ApplicationComponents/Modal/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/NotificationItem/NotificationItem.d.ts +19 -0
- package/dist/components/ApplicationComponents/NotificationItem/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/ProgressItem/ProgressItem.d.ts +15 -0
- package/dist/components/ApplicationComponents/ProgressItem/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/ProgressStat/ProgressStat.d.ts +11 -0
- package/dist/components/ApplicationComponents/ProgressStat/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/RichSeparator/RichSeparator.d.ts +10 -0
- package/dist/components/ApplicationComponents/RichSeparator/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/SpendingBalance/SpendingBalance.d.ts +11 -0
- package/dist/components/ApplicationComponents/SpendingBalance/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/StockMarket/StockMarket.d.ts +22 -0
- package/dist/components/ApplicationComponents/StockMarket/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/Tags/Tags.d.ts +9 -0
- package/dist/components/ApplicationComponents/Tags/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/Ticker/Ticker.d.ts +14 -0
- package/dist/components/ApplicationComponents/Ticker/index.d.ts +2 -0
- package/dist/components/ApplicationComponents/Transactions/Transactions.d.ts +18 -0
- package/dist/components/ApplicationComponents/Transactions/index.d.ts +2 -0
- package/dist/components/AreaChart/AreaChart.d.ts +21 -0
- package/dist/components/AreaChart/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +17 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +17 -0
- package/dist/components/AvatarGroup/index.d.ts +2 -0
- package/dist/components/Badge/Badge.d.ts +15 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/BarChart/BarChart.d.ts +19 -0
- package/dist/components/BarChart/index.d.ts +2 -0
- package/dist/components/BoardCard/BoardCard.d.ts +26 -0
- package/dist/components/BoardCard/index.d.ts +2 -0
- package/dist/components/BoardColumn/BoardColumn.d.ts +17 -0
- package/dist/components/BoardColumn/index.d.ts +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +13 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +19 -0
- package/dist/components/Button/index.d.ts +9 -0
- package/dist/components/Calendar/Calendar.d.ts +24 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +13 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/CardMetaItem/CardMetaItem.d.ts +9 -0
- package/dist/components/CardMetaItem/index.d.ts +2 -0
- package/dist/components/ChatComposer/ChatComposer-simple.d.ts +15 -0
- package/dist/components/ChatComposer/ChatComposer.d.ts +22 -0
- package/dist/components/ChatComposer/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Combobox/Combobox.d.ts +27 -0
- package/dist/components/Combobox/index.d.ts +2 -0
- package/dist/components/ConversationItem/ConversationItem.d.ts +17 -0
- package/dist/components/ConversationItem/index.d.ts +2 -0
- package/dist/components/Divider/Divider.d.ts +10 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/DonutChart/DonutChart.d.ts +19 -0
- package/dist/components/DonutChart/index.d.ts +2 -0
- package/dist/components/EmptyState/EmptyState.d.ts +15 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/FileUpload/FileUpload.d.ts +14 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/FilterChip/FilterChip.d.ts +13 -0
- package/dist/components/FilterChip/index.d.ts +2 -0
- package/dist/components/FunnelChart/FunnelChart.d.ts +13 -0
- package/dist/components/FunnelChart/index.d.ts +2 -0
- package/dist/components/HeatmapChart/HeatmapChart.d.ts +14 -0
- package/dist/components/HeatmapChart/index.d.ts +2 -0
- package/dist/components/IconButton/IconButton.d.ts +14 -0
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +19 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Kbd/Kbd.d.ts +7 -0
- package/dist/components/Kbd/index.d.ts +2 -0
- package/dist/components/Label/Label.d.ts +8 -0
- package/dist/components/Label/index.d.ts +2 -0
- package/dist/components/LineChart/LineChart.d.ts +25 -0
- package/dist/components/LineChart/index.d.ts +2 -0
- package/dist/components/Link/Link.d.ts +8 -0
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/ListItem/ListItem.d.ts +13 -0
- package/dist/components/ListItem/index.d.ts +2 -0
- package/dist/components/Menu/Menu.d.ts +12 -0
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/MenuItem/MenuItem.d.ts +15 -0
- package/dist/components/MenuItem/index.d.ts +2 -0
- package/dist/components/MessageBubble/MessageBubble.d.ts +25 -0
- package/dist/components/MessageBubble/index.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +13 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/PieChart/PieChart.d.ts +18 -0
- package/dist/components/PieChart/index.d.ts +2 -0
- package/dist/components/Popover/Popover.d.ts +15 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Progress/Progress.d.ts +12 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/RadarChart/RadarChart.d.ts +19 -0
- package/dist/components/RadarChart/index.d.ts +2 -0
- package/dist/components/RadialChart/RadialChart.d.ts +18 -0
- package/dist/components/RadialChart/index.d.ts +2 -0
- package/dist/components/Radio/Radio.d.ts +7 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +16 -0
- package/dist/components/SegmentedControl/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +25 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.d.ts +8 -0
- package/dist/components/Sidebar/index.d.ts +2 -0
- package/dist/components/SidebarDivider/SidebarDivider.d.ts +3 -0
- package/dist/components/SidebarDivider/index.d.ts +1 -0
- package/dist/components/SidebarFooter/SidebarFooter.d.ts +16 -0
- package/dist/components/SidebarFooter/index.d.ts +2 -0
- package/dist/components/SidebarGroupLabel/SidebarGroupLabel.d.ts +6 -0
- package/dist/components/SidebarGroupLabel/index.d.ts +2 -0
- package/dist/components/SidebarHeader/SidebarHeader.d.ts +16 -0
- package/dist/components/SidebarHeader/index.d.ts +2 -0
- package/dist/components/SidebarItem/SidebarItem.d.ts +24 -0
- package/dist/components/SidebarItem/index.d.ts +2 -0
- package/dist/components/SidebarPromo/SidebarPromo.d.ts +14 -0
- package/dist/components/SidebarPromo/index.d.ts +2 -0
- package/dist/components/SidebarSearch/SidebarSearch.d.ts +11 -0
- package/dist/components/SidebarSearch/index.d.ts +2 -0
- package/dist/components/SidebarSubItem/SidebarSubItem.d.ts +10 -0
- package/dist/components/SidebarSubItem/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.d.ts +12 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Slider/Slider.d.ts +10 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Spinner/Spinner.d.ts +10 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/StatCard/StatCard.d.ts +28 -0
- package/dist/components/StatCard/index.d.ts +2 -0
- package/dist/components/Stepper/Stepper.d.ts +24 -0
- package/dist/components/Stepper/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +7 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +32 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +27 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Textarea/Textarea.d.ts +8 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Toast/Toast.d.ts +13 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +15 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/TopBar/TopBar.d.ts +37 -0
- package/dist/components/TopBar/index.d.ts +2 -0
- package/dist/components/TopBarMobile/TopBarMobile.d.ts +16 -0
- package/dist/components/TopBarMobile/index.d.ts +2 -0
- package/dist/favicon.svg +1 -0
- package/dist/icons.svg +24 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +98 -0
- package/dist/index.mjs +6107 -0
- package/dist/style.css +2 -0
- package/package.json +85 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface MenuProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
/** Accessible label for the menu. */
|
|
5
|
+
'aria-label'?: string;
|
|
6
|
+
/** Minimum width in px. Defaults to 208 (matches Figma). */
|
|
7
|
+
minWidth?: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Menu: React.FC<MenuProps>;
|
|
11
|
+
export declare const MenuDivider: React.FC;
|
|
12
|
+
export default Menu;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type MenuItemState = 'default' | 'checked' | 'disabled' | 'destructive';
|
|
3
|
+
export interface MenuItemProps {
|
|
4
|
+
/** Visual state. Maps to Figma State axis. */
|
|
5
|
+
state?: MenuItemState;
|
|
6
|
+
/** Leading icon (any 16px Lucide icon). */
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
/** Keyboard shortcut hint, right-aligned (e.g. "⌘E"). */
|
|
9
|
+
shortcut?: string;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
onSelect?: () => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const MenuItem: React.FC<MenuItemProps>;
|
|
15
|
+
export default MenuItem;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type MessageBubbleType = 'received' | 'sent' | 'system';
|
|
3
|
+
export type MessageBubbleContent = 'text' | 'image' | 'file';
|
|
4
|
+
export interface MessageBubbleProps {
|
|
5
|
+
type?: MessageBubbleType;
|
|
6
|
+
content?: MessageBubbleContent;
|
|
7
|
+
/** Author avatar (received only). */
|
|
8
|
+
avatar?: React.ReactNode;
|
|
9
|
+
authorName?: React.ReactNode;
|
|
10
|
+
timestamp?: React.ReactNode;
|
|
11
|
+
/** Text body, image node, or file meta depending on content. */
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
/** Image source (content="image"). */
|
|
14
|
+
image?: React.ReactNode;
|
|
15
|
+
/** File meta (content="file"). */
|
|
16
|
+
fileName?: string;
|
|
17
|
+
fileSize?: string;
|
|
18
|
+
/** Reaction node (received only). */
|
|
19
|
+
reactions?: React.ReactNode;
|
|
20
|
+
/** Show read receipt (sent only). */
|
|
21
|
+
read?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const MessageBubble: React.FC<MessageBubbleProps>;
|
|
25
|
+
export default MessageBubble;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface PaginationProps {
|
|
3
|
+
/** Total number of pages. */
|
|
4
|
+
total: number;
|
|
5
|
+
/** Current page (1-based). */
|
|
6
|
+
page: number;
|
|
7
|
+
onPageChange: (page: number) => void;
|
|
8
|
+
/** How many page numbers to show around the current page. */
|
|
9
|
+
siblings?: number;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Pagination: React.FC<PaginationProps>;
|
|
13
|
+
export default Pagination;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ChartSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export type PieChartVariant = 'pie' | 'pie-no-separator' | 'label' | 'custom-label' | 'label-list' | 'donut' | 'donut-active' | 'donut-with-text' | 'stacked' | 'interactive';
|
|
4
|
+
export interface PieDatum {
|
|
5
|
+
label: string;
|
|
6
|
+
value: number;
|
|
7
|
+
}
|
|
8
|
+
export interface PieChartProps {
|
|
9
|
+
data: PieDatum[];
|
|
10
|
+
variant?: PieChartVariant;
|
|
11
|
+
size?: ChartSize;
|
|
12
|
+
/** Big number shown in the center. Only rendered for "donut-with-text". */
|
|
13
|
+
centerValue?: string;
|
|
14
|
+
centerCaption?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const PieChart: React.FC<PieChartProps>;
|
|
18
|
+
export default PieChart;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type PopoverPlacement = 'bottom' | 'top' | 'bottom-start' | 'bottom-end';
|
|
3
|
+
export interface PopoverProps {
|
|
4
|
+
/** The clickable element that toggles the popover. */
|
|
5
|
+
trigger: React.ReactNode;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Footer actions (1-3 buttons). */
|
|
9
|
+
actions?: React.ReactNode;
|
|
10
|
+
placement?: PopoverPlacement;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const Popover: React.FC<PopoverProps>;
|
|
15
|
+
export default Popover;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ProgressSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface ProgressProps {
|
|
4
|
+
/** 0–100. Omit for indeterminate mode. */
|
|
5
|
+
value?: number;
|
|
6
|
+
size?: ProgressSize;
|
|
7
|
+
/** Accessible label */
|
|
8
|
+
label?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const Progress: React.FC<ProgressProps>;
|
|
12
|
+
export default Progress;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ChartSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export type RadarChartVariant = 'default' | 'dots' | 'dots-grid-none' | 'lines-only' | 'circle-grid' | 'circle-grid-no-lines' | 'grid-custom' | 'grid-filled' | 'circle-grid-filled' | 'multiple' | 'custom-label';
|
|
4
|
+
export interface RadarDatum {
|
|
5
|
+
label: string;
|
|
6
|
+
value: number;
|
|
7
|
+
/** Second series (variant="multiple"). */
|
|
8
|
+
value2?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface RadarChartProps {
|
|
11
|
+
data: RadarDatum[];
|
|
12
|
+
variant?: RadarChartVariant;
|
|
13
|
+
size?: ChartSize;
|
|
14
|
+
/** Legend labels for `value` / `value2`, shown for "multiple". */
|
|
15
|
+
seriesLabels?: [string, string?];
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const RadarChart: React.FC<RadarChartProps>;
|
|
19
|
+
export default RadarChart;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ChartSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export type RadialChartVariant = 'multi' | 'grid' | 'text' | 'shape' | 'gauge-tick' | 'stacked' | 'stacked-3-layers' | 'stacked-label';
|
|
4
|
+
export interface RadialDatum {
|
|
5
|
+
label: string;
|
|
6
|
+
value: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface RadialChartProps {
|
|
10
|
+
data: RadialDatum[];
|
|
11
|
+
variant?: RadialChartVariant;
|
|
12
|
+
size?: ChartSize;
|
|
13
|
+
centerValue?: string;
|
|
14
|
+
centerCaption?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const RadialChart: React.FC<RadialChartProps>;
|
|
18
|
+
export default RadialChart;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
3
|
+
label?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export default Radio;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SegmentedOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface SegmentedControlProps {
|
|
7
|
+
options: SegmentedOption[];
|
|
8
|
+
value?: string;
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
onChange?: (value: string) => void;
|
|
11
|
+
/** Stretch the track to fill its container; segments then share the width equally. */
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const SegmentedControl: React.FC<SegmentedControlProps>;
|
|
16
|
+
export default SegmentedControl;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type SelectSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SelectProps {
|
|
9
|
+
label?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
size?: SelectSize;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
options: SelectOption[];
|
|
15
|
+
/** Controlled value. */
|
|
16
|
+
value?: string;
|
|
17
|
+
/** Uncontrolled initial value. */
|
|
18
|
+
defaultValue?: string;
|
|
19
|
+
onChange?: (value: string) => void;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
id?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const Select: React.FC<SelectProps>;
|
|
25
|
+
export default Select;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SidebarDivider, default } from './SidebarDivider';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type SidebarFooterType = 'user' | 'user-menu' | 'actions';
|
|
3
|
+
export interface SidebarFooterProps {
|
|
4
|
+
type?: SidebarFooterType;
|
|
5
|
+
title?: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
/** Avatar image URL (passed to the system Avatar component). */
|
|
8
|
+
avatarSrc?: string;
|
|
9
|
+
/** Avatar initials fallback (passed to the system Avatar component). */
|
|
10
|
+
avatarInitials?: string;
|
|
11
|
+
collapsed?: boolean;
|
|
12
|
+
onMenu?: () => void;
|
|
13
|
+
onSignOut?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const SidebarFooter: React.FC<SidebarFooterProps>;
|
|
16
|
+
export default SidebarFooter;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
export type SidebarHeaderType = 'brand' | 'workspace' | 'brand-toggle';
|
|
4
|
+
export interface SidebarHeaderProps {
|
|
5
|
+
type?: SidebarHeaderType;
|
|
6
|
+
title: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
/** Logo/brand mark (Lucide icon or any node). */
|
|
9
|
+
logo?: React.ReactNode;
|
|
10
|
+
collapsed?: boolean;
|
|
11
|
+
onToggle?: () => void;
|
|
12
|
+
/** Icon for the toggle button. Defaults to PanelLeftClose. */
|
|
13
|
+
toggleIcon?: LucideIcon;
|
|
14
|
+
}
|
|
15
|
+
export declare const SidebarHeader: React.FC<SidebarHeaderProps>;
|
|
16
|
+
export default SidebarHeader;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
export interface SidebarItemProps {
|
|
4
|
+
icon?: LucideIcon;
|
|
5
|
+
label: string;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
/** Only matters when `active` and not `collapsed` (collapsed is always
|
|
8
|
+
* indicator-styled, matching Figma). true (default) = bg/surface card +
|
|
9
|
+
* shadow + left accent bar ("Active - Indicator"). false = flat bg/subtle
|
|
10
|
+
* tint, no bar, no shadow ("Active - Default"). */
|
|
11
|
+
activeIndicator?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
badge?: string;
|
|
14
|
+
hasSubmenu?: boolean;
|
|
15
|
+
collapsed?: boolean;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
href?: string;
|
|
18
|
+
/** Native title-attribute tooltip on collapse. Defaults to true; set
|
|
19
|
+
* false when the caller already wraps this in its own Tooltip component
|
|
20
|
+
* to avoid the two competing on hover. */
|
|
21
|
+
nativeTooltip?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const SidebarItem: React.FC<SidebarItemProps>;
|
|
24
|
+
export default SidebarItem;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
export interface SidebarPromoProps {
|
|
4
|
+
type?: 'upgrade' | 'announcement';
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Full-width CTA button label. */
|
|
8
|
+
ctaLabel?: string;
|
|
9
|
+
onCta?: () => void;
|
|
10
|
+
onDismiss?: () => void;
|
|
11
|
+
icon?: LucideIcon;
|
|
12
|
+
}
|
|
13
|
+
export declare const SidebarPromo: React.FC<SidebarPromoProps>;
|
|
14
|
+
export default SidebarPromo;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SidebarSearchProps {
|
|
3
|
+
type?: 'field' | 'command';
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
collapsed?: boolean;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (v: string) => void;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const SidebarSearch: React.FC<SidebarSearchProps>;
|
|
11
|
+
export default SidebarSearch;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SidebarSubItemProps {
|
|
3
|
+
label: string;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
href?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SidebarSubItem: React.FC<SidebarSubItemProps>;
|
|
10
|
+
export default SidebarSubItem;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type SkeletonVariant = 'text' | 'rect' | 'circle';
|
|
3
|
+
export interface SkeletonProps {
|
|
4
|
+
variant?: SkeletonVariant;
|
|
5
|
+
/** Width — defaults to 100% for rect/text, size for circle */
|
|
6
|
+
width?: string | number;
|
|
7
|
+
/** Height — defaults to 1em for text, 100% for rect, size for circle */
|
|
8
|
+
height?: string | number;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const Skeleton: React.FC<SkeletonProps>;
|
|
12
|
+
export default Skeleton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
3
|
+
label?: string;
|
|
4
|
+
/** Show the current value to the right of the label. */
|
|
5
|
+
showValue?: boolean;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
+
export default Slider;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type SpinnerSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface SpinnerProps {
|
|
4
|
+
size?: SpinnerSize;
|
|
5
|
+
/** Accessible label for screen readers */
|
|
6
|
+
label?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Spinner: React.FC<SpinnerProps>;
|
|
10
|
+
export default Spinner;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
import { BadgeVariant } from '../Badge';
|
|
4
|
+
export type StatCardStyle = 'minimal' | 'icon' | 'featured';
|
|
5
|
+
export type StatCardTrend = 'up' | 'down' | 'flat';
|
|
6
|
+
export interface StatCardProps {
|
|
7
|
+
title: string;
|
|
8
|
+
value: string;
|
|
9
|
+
/** Supporting line under the delta (Figma: description). */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** Data points for the inline sparkline (Figma: Sparkline toggle). */
|
|
12
|
+
sparkline?: number[];
|
|
13
|
+
/** e.g. "+12.5%" — colored by trend. */
|
|
14
|
+
delta?: string;
|
|
15
|
+
trend?: StatCardTrend;
|
|
16
|
+
/** Overrides the trend-derived badge color (e.g. a "down" delta that
|
|
17
|
+
* Figma still wants shown as warning, not danger, for a given card). */
|
|
18
|
+
badgeVariant?: BadgeVariant;
|
|
19
|
+
variant?: StatCardStyle;
|
|
20
|
+
/** Leading icon (shown for Icon/Featured styles). */
|
|
21
|
+
icon?: LucideIcon;
|
|
22
|
+
/** Show a trailing menu button. */
|
|
23
|
+
showMenu?: boolean;
|
|
24
|
+
onMenu?: () => void;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const StatCard: React.FC<StatCardProps>;
|
|
28
|
+
export default StatCard;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type StepState = 'completed' | 'current' | 'upcoming';
|
|
3
|
+
export interface Step {
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface StepperProps {
|
|
8
|
+
steps: Step[];
|
|
9
|
+
/** Index of the current (active) step, 0-based. */
|
|
10
|
+
current: number;
|
|
11
|
+
/** Orientation. Defaults to horizontal. */
|
|
12
|
+
orientation?: 'horizontal' | 'vertical';
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Single step — exported so it can be used standalone (mirrors Figma "Stepper Step"). */
|
|
16
|
+
export declare const StepperStep: React.FC<{
|
|
17
|
+
index: number;
|
|
18
|
+
state: StepState;
|
|
19
|
+
label: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
orientation?: 'horizontal' | 'vertical';
|
|
22
|
+
}>;
|
|
23
|
+
export declare const Stepper: React.FC<StepperProps>;
|
|
24
|
+
export default Stepper;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
3
|
+
/** Optional label rendered to the right of the switch. */
|
|
4
|
+
label?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export default Switch;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TableColumn<T> {
|
|
3
|
+
key: keyof T & string;
|
|
4
|
+
header: string;
|
|
5
|
+
render?: (row: T) => React.ReactNode;
|
|
6
|
+
align?: 'left' | 'center' | 'right';
|
|
7
|
+
width?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TableProps<T> {
|
|
10
|
+
columns: TableColumn<T>[];
|
|
11
|
+
rows: T[];
|
|
12
|
+
selectable?: boolean;
|
|
13
|
+
selectedRows?: number[];
|
|
14
|
+
onSelectionChange?: (indices: number[]) => void;
|
|
15
|
+
rowKey?: (row: T, index: number) => string | number;
|
|
16
|
+
/** Enable drag-to-reorder on rows. Fires with the new row order. */
|
|
17
|
+
reorderable?: boolean;
|
|
18
|
+
onReorder?: (rows: T[]) => void;
|
|
19
|
+
/** Draws the table's own container border/radius. Defaults to true; set
|
|
20
|
+
* false when nesting inside a card that already has its own border
|
|
21
|
+
* (Figma: some Table instances sit borderless inside a Panel). */
|
|
22
|
+
bordered?: boolean;
|
|
23
|
+
/** Matches Figma's "Responsive" variant (Default / Stacked).
|
|
24
|
+
* - 'auto' (default): renders as a normal table, and switches to the
|
|
25
|
+
* stacked card layout automatically below --bp-sm (640px).
|
|
26
|
+
* - 'default' / 'stacked': force one layout regardless of viewport —
|
|
27
|
+
* useful for Storybook, tests, or a deliberately narrow container. */
|
|
28
|
+
responsive?: 'auto' | 'default' | 'stacked';
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function Table<T>({ columns, rows, selectable, selectedRows, onSelectionChange, rowKey, reorderable, onReorder, bordered, responsive, className, }: TableProps<T>): React.JSX.Element;
|
|
32
|
+
export default Table;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
export interface TabItem {
|
|
4
|
+
/** Unique key/value for the tab. */
|
|
5
|
+
value: string;
|
|
6
|
+
/** Visible label. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Optional 16px leading glyph (Figma "Tab Item": icon adds a leading glyph). */
|
|
9
|
+
icon?: LucideIcon;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface TabsProps {
|
|
13
|
+
items: TabItem[];
|
|
14
|
+
/** Controlled active value. */
|
|
15
|
+
value?: string;
|
|
16
|
+
/** Uncontrolled initial value. */
|
|
17
|
+
defaultValue?: string;
|
|
18
|
+
onChange?: (value: string) => void;
|
|
19
|
+
/** Bottom border under the whole track. Defaults to true. */
|
|
20
|
+
bordered?: boolean;
|
|
21
|
+
/** Stretch every tab to share the row's width equally, like a segmented
|
|
22
|
+
* control, instead of each tab hugging its own label. Defaults to false. */
|
|
23
|
+
fill?: boolean;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const Tabs: React.FC<TabsProps>;
|
|
27
|
+
export default Tabs;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
8
|
+
export default Textarea;
|