@borisj74/bv-ds 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 +94 -0
- package/dist/index.cjs +33885 -0
- package/dist/index.d.cts +2715 -0
- package/dist/index.d.ts +2715 -0
- package/dist/index.js +33717 -0
- package/package.json +67 -0
- package/src/components/ActivityFeed/ActivityFeed.tsx +48 -0
- package/src/components/ActivityFeed/index.ts +2 -0
- package/src/components/ActivityGauge/ActivityGauge.tsx +155 -0
- package/src/components/ActivityGauge/index.ts +7 -0
- package/src/components/AdvancedFilterBar/AdvancedFilterBar.tsx +80 -0
- package/src/components/AdvancedFilterBar/index.ts +2 -0
- package/src/components/Alert/Alert.tsx +210 -0
- package/src/components/Alert/index.ts +2 -0
- package/src/components/Avatar/Avatar.tsx +111 -0
- package/src/components/Avatar/index.ts +2 -0
- package/src/components/AvatarAddButton/AvatarAddButton.tsx +65 -0
- package/src/components/AvatarAddButton/index.ts +5 -0
- package/src/components/AvatarGroup/AvatarGroup.tsx +79 -0
- package/src/components/AvatarGroup/index.ts +6 -0
- package/src/components/AvatarLabelGroup/AvatarLabelGroup.tsx +62 -0
- package/src/components/AvatarLabelGroup/index.ts +5 -0
- package/src/components/AvatarProfilePhoto/AvatarProfilePhoto.tsx +117 -0
- package/src/components/AvatarProfilePhoto/index.ts +5 -0
- package/src/components/Badge/ColorBadge.tsx +36 -0
- package/src/components/Badge/ModernBadge.tsx +38 -0
- package/src/components/Badge/PillBadge.tsx +36 -0
- package/src/components/Badge/badgeShared.tsx +139 -0
- package/src/components/Badge/index.ts +7 -0
- package/src/components/BadgeCloseX/BadgeCloseX.tsx +64 -0
- package/src/components/BadgeCloseX/index.ts +2 -0
- package/src/components/BadgeGroup/BadgeGroup.tsx +61 -0
- package/src/components/BadgeGroup/index.ts +7 -0
- package/src/components/BreadcrumbButtonBase/BreadcrumbButtonBase.tsx +75 -0
- package/src/components/BreadcrumbButtonBase/index.ts +5 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +62 -0
- package/src/components/Breadcrumbs/index.ts +2 -0
- package/src/components/Button/Button.tsx +71 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/ButtonCloseX/ButtonCloseX.tsx +54 -0
- package/src/components/ButtonCloseX/index.ts +2 -0
- package/src/components/ButtonDestructive/ButtonDestructive.tsx +67 -0
- package/src/components/ButtonDestructive/index.ts +6 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +28 -0
- package/src/components/ButtonGroup/index.ts +2 -0
- package/src/components/ButtonGroupSegment/ButtonGroupSegment.tsx +54 -0
- package/src/components/ButtonGroupSegment/index.ts +5 -0
- package/src/components/ButtonUtility/ButtonUtility.tsx +67 -0
- package/src/components/ButtonUtility/index.ts +6 -0
- package/src/components/CalendarCell/CalendarCell.tsx +82 -0
- package/src/components/CalendarCell/index.ts +2 -0
- package/src/components/CalendarCellDayWeekView/CalendarCellDayWeekView.tsx +56 -0
- package/src/components/CalendarCellDayWeekView/index.ts +2 -0
- package/src/components/CalendarColumnHeader/CalendarColumnHeader.tsx +45 -0
- package/src/components/CalendarColumnHeader/index.ts +5 -0
- package/src/components/CalendarDateIcon/CalendarDateIcon.tsx +25 -0
- package/src/components/CalendarDateIcon/index.ts +2 -0
- package/src/components/CalendarEvent/CalendarEvent.tsx +76 -0
- package/src/components/CalendarEvent/index.ts +2 -0
- package/src/components/CalendarEventDayWeekView/CalendarEventDayWeekView.tsx +76 -0
- package/src/components/CalendarEventDayWeekView/index.ts +2 -0
- package/src/components/CalendarHeader/CalendarHeader.tsx +47 -0
- package/src/components/CalendarHeader/index.ts +2 -0
- package/src/components/CalendarRowLabel/CalendarRowLabel.tsx +21 -0
- package/src/components/CalendarRowLabel/index.ts +2 -0
- package/src/components/CalendarTimemarker/CalendarTimemarker.tsx +46 -0
- package/src/components/CalendarTimemarker/index.ts +5 -0
- package/src/components/CalendarViewDropdown/CalendarViewDropdown.tsx +101 -0
- package/src/components/CalendarViewDropdown/index.ts +6 -0
- package/src/components/CardHeader/CardHeader.tsx +57 -0
- package/src/components/CardHeader/index.ts +2 -0
- package/src/components/CarouselArrow/CarouselArrow.tsx +47 -0
- package/src/components/CarouselArrow/index.ts +6 -0
- package/src/components/CarouselImage/CarouselImage.tsx +60 -0
- package/src/components/CarouselImage/index.ts +2 -0
- package/src/components/Change/Change.tsx +73 -0
- package/src/components/Change/index.ts +2 -0
- package/src/components/ChartLegend/ChartLegend.tsx +38 -0
- package/src/components/ChartLegend/index.ts +2 -0
- package/src/components/ChartMarker/ChartMarker.tsx +54 -0
- package/src/components/ChartMarker/index.ts +2 -0
- package/src/components/ChartMini/ChartMini.tsx +86 -0
- package/src/components/ChartMini/index.ts +2 -0
- package/src/components/ChartTooltip/ChartTooltip.tsx +44 -0
- package/src/components/ChartTooltip/index.ts +2 -0
- package/src/components/Checkbox/Checkbox.tsx +65 -0
- package/src/components/Checkbox/checkboxBase.tsx +81 -0
- package/src/components/Checkbox/index.ts +3 -0
- package/src/components/CodeSnippet/CodeSnippet.tsx +94 -0
- package/src/components/CodeSnippet/index.ts +2 -0
- package/src/components/CodeSnippetTabs/CodeSnippetTabs.tsx +44 -0
- package/src/components/CodeSnippetTabs/index.ts +2 -0
- package/src/components/CommandBar/CommandBar.tsx +80 -0
- package/src/components/CommandBar/index.ts +2 -0
- package/src/components/CommandBarFooter/CommandBarFooter.tsx +125 -0
- package/src/components/CommandBarFooter/index.ts +5 -0
- package/src/components/CommandBarMenuSection/CommandBarMenuSection.tsx +28 -0
- package/src/components/CommandBarMenuSection/index.ts +2 -0
- package/src/components/CommandBarNavigationIcon/CommandBarNavigationIcon.tsx +47 -0
- package/src/components/CommandBarNavigationIcon/index.ts +2 -0
- package/src/components/CommandDropdownMenuItem/CommandDropdownMenuItem.tsx +51 -0
- package/src/components/CommandDropdownMenuItem/index.ts +2 -0
- package/src/components/CommandInput/CommandInput.tsx +74 -0
- package/src/components/CommandInput/index.ts +2 -0
- package/src/components/CommandShortcut/CommandShortcut.tsx +26 -0
- package/src/components/CommandShortcut/index.ts +2 -0
- package/src/components/ContentDivider/ContentDivider.tsx +80 -0
- package/src/components/ContentDivider/index.ts +6 -0
- package/src/components/ContentFeatureText/ContentFeatureText.tsx +60 -0
- package/src/components/ContentFeatureText/index.ts +5 -0
- package/src/components/ContentHeading/ContentHeading.tsx +43 -0
- package/src/components/ContentHeading/index.ts +5 -0
- package/src/components/ContentParagraph/ContentParagraph.tsx +39 -0
- package/src/components/ContentParagraph/index.ts +5 -0
- package/src/components/ContentQuote/ContentQuote.tsx +114 -0
- package/src/components/ContentQuote/index.ts +6 -0
- package/src/components/ContentRule/ContentRule.tsx +31 -0
- package/src/components/ContentRule/index.ts +2 -0
- package/src/components/ContextMenu/ContextMenu.tsx +67 -0
- package/src/components/ContextMenu/index.ts +7 -0
- package/src/components/ContextMenu/useContextMenu.ts +41 -0
- package/src/components/DatePickerCell/DatePickerCell.tsx +77 -0
- package/src/components/DatePickerCell/index.ts +2 -0
- package/src/components/DatePickerListItem/DatePickerListItem.tsx +39 -0
- package/src/components/DatePickerListItem/index.ts +2 -0
- package/src/components/DatePickerMenu/DatePickerMenu.tsx +131 -0
- package/src/components/DatePickerMenu/index.ts +2 -0
- package/src/components/DropdownAccountListItem/DropdownAccountListItem.tsx +69 -0
- package/src/components/DropdownAccountListItem/index.ts +2 -0
- package/src/components/DropdownMenuFooter/DropdownMenuFooter.tsx +50 -0
- package/src/components/DropdownMenuFooter/index.ts +5 -0
- package/src/components/DropdownMenuHeader/DropdownMenuHeader.tsx +93 -0
- package/src/components/DropdownMenuHeader/index.ts +5 -0
- package/src/components/DropdownMenuItemInsetIcon/DropdownMenuItemInsetIcon.tsx +89 -0
- package/src/components/DropdownMenuItemInsetIcon/index.ts +5 -0
- package/src/components/DropdownMenuListItem/DropdownMenuListItem.tsx +84 -0
- package/src/components/DropdownMenuListItem/index.ts +2 -0
- package/src/components/EmptyState/EmptyState.tsx +65 -0
- package/src/components/EmptyState/index.ts +2 -0
- package/src/components/FeedItemBase/FeedItemBase.tsx +135 -0
- package/src/components/FeedItemBase/index.ts +2 -0
- package/src/components/FileUpload/FileUpload.tsx +112 -0
- package/src/components/FileUpload/index.ts +2 -0
- package/src/components/FileUploadBase/FileUploadBase.tsx +69 -0
- package/src/components/FileUploadBase/index.ts +2 -0
- package/src/components/FileUploadItemBase/FileUploadItemBase.tsx +190 -0
- package/src/components/FileUploadItemBase/index.ts +7 -0
- package/src/components/FilterBar/FilterBar.tsx +62 -0
- package/src/components/FilterBar/index.ts +2 -0
- package/src/components/FilterTabs/FilterTabs.tsx +41 -0
- package/src/components/FilterTabs/index.ts +2 -0
- package/src/components/FiltersDropdownMenu/FiltersDropdownMenu.tsx +104 -0
- package/src/components/FiltersDropdownMenu/index.ts +2 -0
- package/src/components/FiltersSlideoutMenu/FiltersSlideoutMenu.tsx +71 -0
- package/src/components/FiltersSlideoutMenu/index.ts +2 -0
- package/src/components/HeaderNavigation/HeaderNavigation.tsx +178 -0
- package/src/components/HeaderNavigation/index.ts +6 -0
- package/src/components/HelpIcon/HelpIcon.tsx +49 -0
- package/src/components/HelpIcon/index.ts +2 -0
- package/src/components/InputField/InputField.tsx +108 -0
- package/src/components/InputField/index.ts +3 -0
- package/src/components/InputField/inputFieldShared.tsx +68 -0
- package/src/components/LeadingInputField/LeadingInputField.tsx +60 -0
- package/src/components/LeadingInputField/index.ts +2 -0
- package/src/components/LineAndBarChart/LineAndBarChart.tsx +96 -0
- package/src/components/LineAndBarChart/index.ts +2 -0
- package/src/components/LinkMessage/LinkMessage.tsx +52 -0
- package/src/components/LinkMessage/index.ts +2 -0
- package/src/components/LoadingIndicator/LoadingIndicator.tsx +108 -0
- package/src/components/LoadingIndicator/index.ts +6 -0
- package/src/components/MediaMessage/MediaMessage.tsx +109 -0
- package/src/components/MediaMessage/index.ts +2 -0
- package/src/components/MegaInputFieldBase/MegaInputFieldBase.tsx +49 -0
- package/src/components/MegaInputFieldBase/index.ts +5 -0
- package/src/components/Message/Message.tsx +85 -0
- package/src/components/Message/index.ts +3 -0
- package/src/components/Message/messageShared.tsx +73 -0
- package/src/components/MessageAction/MessageAction.tsx +221 -0
- package/src/components/MessageAction/index.ts +2 -0
- package/src/components/MessageActionButton/MessageActionButton.tsx +36 -0
- package/src/components/MessageActionButton/index.ts +2 -0
- package/src/components/MessageActionPanel/MessageActionPanel.tsx +36 -0
- package/src/components/MessageActionPanel/index.ts +2 -0
- package/src/components/MessageReaction/MessageReaction.tsx +37 -0
- package/src/components/MessageReaction/index.ts +2 -0
- package/src/components/MessageStatusIcon/MessageStatusIcon.tsx +54 -0
- package/src/components/MessageStatusIcon/index.ts +2 -0
- package/src/components/MetricItem/MetricItem.tsx +147 -0
- package/src/components/MetricItem/index.ts +2 -0
- package/src/components/ModalActions/ModalActions.tsx +57 -0
- package/src/components/ModalActions/index.ts +2 -0
- package/src/components/ModalHeader/ModalHeader.tsx +99 -0
- package/src/components/ModalHeader/index.ts +2 -0
- package/src/components/MultiSelect/MultiSelect.tsx +118 -0
- package/src/components/MultiSelect/index.ts +2 -0
- package/src/components/NavAccountCard/NavAccountCard.tsx +124 -0
- package/src/components/NavAccountCard/index.ts +2 -0
- package/src/components/NavAccountCardMenuItem/NavAccountCardMenuItem.tsx +101 -0
- package/src/components/NavAccountCardMenuItem/index.ts +5 -0
- package/src/components/NavButton/NavButton.tsx +50 -0
- package/src/components/NavButton/index.ts +2 -0
- package/src/components/NavFeaturedCard/NavFeaturedCard.tsx +82 -0
- package/src/components/NavFeaturedCard/index.ts +2 -0
- package/src/components/NavItemBase/NavItemBase.tsx +79 -0
- package/src/components/NavItemBase/index.ts +2 -0
- package/src/components/NavItemDropdownBase/NavItemDropdownBase.tsx +74 -0
- package/src/components/NavItemDropdownBase/index.ts +2 -0
- package/src/components/NavMenuButton/NavMenuButton.tsx +47 -0
- package/src/components/NavMenuButton/index.ts +2 -0
- package/src/components/Notification/Notification.tsx +102 -0
- package/src/components/Notification/index.ts +2 -0
- package/src/components/NumberInput/NumberInput.tsx +114 -0
- package/src/components/NumberInput/index.ts +2 -0
- package/src/components/PageHeader/PageHeader.tsx +88 -0
- package/src/components/PageHeader/index.ts +2 -0
- package/src/components/Pagination/Pagination.tsx +124 -0
- package/src/components/Pagination/index.ts +2 -0
- package/src/components/PaginationButtonGroupBase/PaginationButtonGroupBase.tsx +69 -0
- package/src/components/PaginationButtonGroupBase/index.ts +5 -0
- package/src/components/PaginationCards/PaginationCards.tsx +72 -0
- package/src/components/PaginationCards/index.ts +2 -0
- package/src/components/PaginationDotGroup/PaginationDotGroup.tsx +66 -0
- package/src/components/PaginationDotGroup/index.ts +2 -0
- package/src/components/PaginationDotIndicator/PaginationDotIndicator.tsx +39 -0
- package/src/components/PaginationDotIndicator/index.ts +6 -0
- package/src/components/PaginationNumberBase/PaginationNumberBase.tsx +42 -0
- package/src/components/PaginationNumberBase/index.ts +5 -0
- package/src/components/PieChart/PieChart.tsx +73 -0
- package/src/components/PieChart/index.ts +2 -0
- package/src/components/ProgressBar/ProgressBar.tsx +75 -0
- package/src/components/ProgressBar/index.ts +2 -0
- package/src/components/ProgressCircle/ProgressCircle.tsx +89 -0
- package/src/components/ProgressCircle/index.ts +6 -0
- package/src/components/RadarChart/RadarChart.tsx +62 -0
- package/src/components/RadarChart/index.ts +2 -0
- package/src/components/Radio/Radio.tsx +55 -0
- package/src/components/Radio/index.ts +2 -0
- package/src/components/RadioGroup/RadioGroup.tsx +54 -0
- package/src/components/RadioGroup/index.ts +2 -0
- package/src/components/RadioGroupItem/RadioGroupItem.tsx +118 -0
- package/src/components/RadioGroupItem/index.ts +6 -0
- package/src/components/SectionFooter/SectionFooter.tsx +40 -0
- package/src/components/SectionFooter/index.ts +2 -0
- package/src/components/SectionHeader/SectionHeader.tsx +44 -0
- package/src/components/SectionHeader/index.ts +2 -0
- package/src/components/SectionLabel/SectionLabel.tsx +51 -0
- package/src/components/SectionLabel/index.ts +2 -0
- package/src/components/Select/Select.tsx +121 -0
- package/src/components/Select/index.ts +2 -0
- package/src/components/SelectMenuItem/SelectMenuItem.tsx +85 -0
- package/src/components/SelectMenuItem/index.ts +2 -0
- package/src/components/SidebarNavigation/SidebarNavigation.tsx +100 -0
- package/src/components/SidebarNavigation/index.ts +2 -0
- package/src/components/SlideOutMenuHeader/SlideOutMenuHeader.tsx +56 -0
- package/src/components/SlideOutMenuHeader/index.ts +2 -0
- package/src/components/Slider/Slider.tsx +125 -0
- package/src/components/Slider/index.ts +2 -0
- package/src/components/SocialButton/SocialButton.tsx +88 -0
- package/src/components/SocialButton/index.ts +2 -0
- package/src/components/StatusIcon/StatusIcon.tsx +75 -0
- package/src/components/StatusIcon/index.ts +2 -0
- package/src/components/StepBase/StepBase.tsx +90 -0
- package/src/components/StepBase/index.ts +2 -0
- package/src/components/StepIconBase/StepIconBase.tsx +65 -0
- package/src/components/StepIconBase/index.ts +7 -0
- package/src/components/TabButtonBase/TabButtonBase.tsx +88 -0
- package/src/components/TabButtonBase/index.ts +2 -0
- package/src/components/TableCell/TableCell.tsx +44 -0
- package/src/components/TableCell/index.ts +2 -0
- package/src/components/TableHeaderCell/TableHeaderCell.tsx +34 -0
- package/src/components/TableHeaderCell/index.ts +2 -0
- package/src/components/TableHeaderLabel/TableHeaderLabel.tsx +37 -0
- package/src/components/TableHeaderLabel/index.ts +2 -0
- package/src/components/Tabs/Tabs.tsx +80 -0
- package/src/components/Tabs/index.ts +2 -0
- package/src/components/Tag/Tag.tsx +91 -0
- package/src/components/Tag/index.ts +2 -0
- package/src/components/TagsInputField/TagsInputField.tsx +90 -0
- package/src/components/TagsInputField/index.ts +2 -0
- package/src/components/TextEditorToolbar/TextEditorToolbar.tsx +33 -0
- package/src/components/TextEditorToolbar/index.ts +2 -0
- package/src/components/TextEditorTooltip/TextEditorTooltip.tsx +28 -0
- package/src/components/TextEditorTooltip/index.ts +2 -0
- package/src/components/TextareaInputField/TextareaInputField.tsx +45 -0
- package/src/components/TextareaInputField/index.ts +2 -0
- package/src/components/Toggle/Toggle.tsx +87 -0
- package/src/components/Toggle/index.ts +2 -0
- package/src/components/Tooltip/Tooltip.tsx +59 -0
- package/src/components/Tooltip/index.ts +2 -0
- package/src/components/TrailingInputField/TrailingInputField.tsx +62 -0
- package/src/components/TrailingInputField/index.ts +2 -0
- package/src/components/TreeView/TreeView.tsx +86 -0
- package/src/components/TreeView/index.ts +2 -0
- package/src/components/TreeViewConnector/TreeViewConnector.tsx +36 -0
- package/src/components/TreeViewConnector/index.ts +2 -0
- package/src/components/TreeViewItem/TreeViewItem.tsx +111 -0
- package/src/components/TreeViewItem/index.ts +2 -0
- package/src/components/VerificationCodeInput/VerificationCodeInput.tsx +114 -0
- package/src/components/VerificationCodeInput/index.ts +2 -0
- package/src/illustrations/BoxIllustration.tsx +13 -0
- package/src/illustrations/CloudIllustration.tsx +18 -0
- package/src/illustrations/CreditCardIllustration.tsx +13 -0
- package/src/illustrations/DocumentsIllustration.tsx +13 -0
- package/src/illustrations/index.ts +4 -0
- package/src/index.ts +147 -0
- package/src/internal/chartTheme.ts +30 -0
- package/src/internal/ringBase.tsx +82 -0
- package/src/styles.css +3 -0
- package/tailwind-preset.js +295 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2715 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, ButtonHTMLAttributes, MouseEventHandler, HTMLAttributes, CSSProperties, InputHTMLAttributes, ElementType, TextareaHTMLAttributes, SVGProps } from 'react';
|
|
3
|
+
|
|
4
|
+
type ActivityFeedDivider = "line" | "connector" | "divider" | "none";
|
|
5
|
+
interface ActivityFeedProps {
|
|
6
|
+
/**
|
|
7
|
+
* How feed items are separated (Figma `Divider` variant):
|
|
8
|
+
* - `connector` — items butt together; each child `FeedItemBase` should set
|
|
9
|
+
* `connector` so the avatar lines join into a continuous thread.
|
|
10
|
+
* - `line` — a hairline rule between items.
|
|
11
|
+
* - `divider` — no rule added by the feed; interleave your own labelled date
|
|
12
|
+
* dividers between children.
|
|
13
|
+
* - `none` — plain spacing only.
|
|
14
|
+
*/
|
|
15
|
+
divider?: ActivityFeedDivider;
|
|
16
|
+
/** Feed rows — typically `FeedItemBase` instances. */
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
declare function ActivityFeed({ divider, children, className, }: ActivityFeedProps): react.JSX.Element;
|
|
21
|
+
|
|
22
|
+
type ActivityGaugeSize = "xs" | "sm" | "md" | "lg";
|
|
23
|
+
type ActivityGaugeLegend = "none" | "bottom" | "right";
|
|
24
|
+
interface ActivityGaugeSeries {
|
|
25
|
+
/** Series name shown in the legend. */
|
|
26
|
+
label: string;
|
|
27
|
+
/** Fill amount for this ring, 0–100. */
|
|
28
|
+
value: number;
|
|
29
|
+
/** Ring/legend color. Defaults to the brand ramp (see DEFAULT_SERIES_COLORS). */
|
|
30
|
+
color?: string;
|
|
31
|
+
}
|
|
32
|
+
interface ActivityGaugeProps {
|
|
33
|
+
/** Big centered numeral, e.g. "1,000". Pre-formatted by the caller. */
|
|
34
|
+
value: string;
|
|
35
|
+
/** Small centered label above/below the value, e.g. "Active users". */
|
|
36
|
+
label?: string;
|
|
37
|
+
/** One concentric ring per series, outermost first. */
|
|
38
|
+
series: ActivityGaugeSeries[];
|
|
39
|
+
size?: ActivityGaugeSize;
|
|
40
|
+
legend?: ActivityGaugeLegend;
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
declare function ActivityGauge({ value, label, series, size, legend, className, }: ActivityGaugeProps): react.JSX.Element;
|
|
44
|
+
|
|
45
|
+
interface AdvancedFilterBarProps {
|
|
46
|
+
/**
|
|
47
|
+
* `false` → collapsed filter trigger only. `true` → trigger plus the active
|
|
48
|
+
* filter rows and a Clear all action.
|
|
49
|
+
*/
|
|
50
|
+
active?: boolean;
|
|
51
|
+
/** Active filter rows (compose Select/Select/Input + a close button each). */
|
|
52
|
+
rows?: ReactNode;
|
|
53
|
+
/** Trigger click handler. */
|
|
54
|
+
onToggle?: () => void;
|
|
55
|
+
/** Clear-all handler (active state). */
|
|
56
|
+
onClearAll?: () => void;
|
|
57
|
+
clearLabel?: ReactNode;
|
|
58
|
+
className?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The advanced (query-builder style) filter pattern. Collapsed it shows just a
|
|
62
|
+
* filter trigger; active it shows the filter rows plus Clear all. The rows are
|
|
63
|
+
* a slot — compose `Select` + `Select` + `Input` + a close button per row.
|
|
64
|
+
*/
|
|
65
|
+
declare function AdvancedFilterBar({ active, rows, onToggle, onClearAll, clearLabel, className, }: AdvancedFilterBarProps): react.JSX.Element;
|
|
66
|
+
|
|
67
|
+
type AlertColor = "Default" | "Brand" | "Gray" | "Error" | "Warning" | "Success";
|
|
68
|
+
type AlertSize = "Floating" | "FullWidth";
|
|
69
|
+
interface AlertAction {
|
|
70
|
+
label: string;
|
|
71
|
+
onClick?: () => void;
|
|
72
|
+
}
|
|
73
|
+
interface AlertProps {
|
|
74
|
+
/** Bold heading line. */
|
|
75
|
+
title: string;
|
|
76
|
+
/** Supporting text under the title. */
|
|
77
|
+
description?: ReactNode;
|
|
78
|
+
color?: AlertColor;
|
|
79
|
+
/** Floating = padded card with link actions; FullWidth = banner with buttons. */
|
|
80
|
+
size?: AlertSize;
|
|
81
|
+
/** Glyph rendered inside the leading icon ring. Defaults to an info circle. */
|
|
82
|
+
icon?: ReactNode;
|
|
83
|
+
/** Primary action — "View changes" / "Learn more". */
|
|
84
|
+
primaryAction?: AlertAction;
|
|
85
|
+
/** Secondary action — typically "Dismiss". */
|
|
86
|
+
secondaryAction?: AlertAction;
|
|
87
|
+
/** Renders the top-right close button when provided. */
|
|
88
|
+
onClose?: () => void;
|
|
89
|
+
className?: string;
|
|
90
|
+
}
|
|
91
|
+
declare function Alert({ title, description, color, size, icon, primaryAction, secondaryAction, onClose, className, }: AlertProps): react.JSX.Element;
|
|
92
|
+
|
|
93
|
+
type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
94
|
+
interface AvatarProps {
|
|
95
|
+
size?: AvatarSize;
|
|
96
|
+
/** Image URL. Takes precedence over initials and the placeholder icon. */
|
|
97
|
+
src?: string;
|
|
98
|
+
alt?: string;
|
|
99
|
+
/** Placeholder text (initials, e.g. "OR") shown when no image is supplied. */
|
|
100
|
+
initials?: string;
|
|
101
|
+
/** Render the outer border ring (Figma `Border=True`). */
|
|
102
|
+
hasBorder?: boolean;
|
|
103
|
+
/** Show the online status dot (bottom-right). */
|
|
104
|
+
hasStatus?: boolean;
|
|
105
|
+
className?: string;
|
|
106
|
+
}
|
|
107
|
+
declare function Avatar({ size, src, alt, initials, hasBorder, hasStatus, className, }: AvatarProps): react.JSX.Element;
|
|
108
|
+
|
|
109
|
+
type AvatarAddButtonSize = "xs" | "sm" | "md";
|
|
110
|
+
interface AvatarAddButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> {
|
|
111
|
+
size?: AvatarAddButtonSize;
|
|
112
|
+
/** Tooltip text + accessible label (Figma hover shows "Add user"). */
|
|
113
|
+
label?: string;
|
|
114
|
+
}
|
|
115
|
+
declare function AvatarAddButton({ size, label, className, ...rest }: AvatarAddButtonProps): react.JSX.Element;
|
|
116
|
+
|
|
117
|
+
type AvatarGroupSize = "xs" | "sm" | "md";
|
|
118
|
+
interface AvatarGroupItem {
|
|
119
|
+
src?: string;
|
|
120
|
+
alt?: string;
|
|
121
|
+
initials?: string;
|
|
122
|
+
}
|
|
123
|
+
interface AvatarGroupProps {
|
|
124
|
+
size?: AvatarGroupSize;
|
|
125
|
+
avatars: AvatarGroupItem[];
|
|
126
|
+
/** Max avatars shown before collapsing the rest into a "+N" chip. */
|
|
127
|
+
max?: number;
|
|
128
|
+
/** Renders a trailing dashed add button when provided. */
|
|
129
|
+
onAdd?: () => void;
|
|
130
|
+
/** Tooltip/label for the add button. */
|
|
131
|
+
addLabel?: string;
|
|
132
|
+
className?: string;
|
|
133
|
+
}
|
|
134
|
+
declare function AvatarGroup({ size, avatars, max, onAdd, addLabel, className, }: AvatarGroupProps): react.JSX.Element;
|
|
135
|
+
|
|
136
|
+
type AvatarLabelGroupSize = "sm" | "md" | "lg";
|
|
137
|
+
interface AvatarLabelGroupProps {
|
|
138
|
+
size?: AvatarLabelGroupSize;
|
|
139
|
+
/** Primary line (name). */
|
|
140
|
+
name: string;
|
|
141
|
+
/** Secondary line (email / handle / role). */
|
|
142
|
+
subtitle?: string;
|
|
143
|
+
src?: string;
|
|
144
|
+
alt?: string;
|
|
145
|
+
initials?: string;
|
|
146
|
+
hasStatus?: boolean;
|
|
147
|
+
className?: string;
|
|
148
|
+
}
|
|
149
|
+
declare function AvatarLabelGroup({ size, name, subtitle, src, alt, initials, hasStatus, className, }: AvatarLabelGroupProps): react.JSX.Element;
|
|
150
|
+
|
|
151
|
+
type AvatarProfilePhotoSize = "sm" | "md" | "lg";
|
|
152
|
+
interface AvatarProfilePhotoProps {
|
|
153
|
+
size?: AvatarProfilePhotoSize;
|
|
154
|
+
src?: string;
|
|
155
|
+
alt?: string;
|
|
156
|
+
/** Placeholder initials when no image is supplied. */
|
|
157
|
+
initials?: string;
|
|
158
|
+
/** Show the verified (blue tick) badge bottom-right. */
|
|
159
|
+
verified?: boolean;
|
|
160
|
+
className?: string;
|
|
161
|
+
}
|
|
162
|
+
declare function AvatarProfilePhoto({ size, src, alt, initials, verified, className, }: AvatarProfilePhotoProps): react.JSX.Element;
|
|
163
|
+
|
|
164
|
+
type BadgeColor = "brand" | "gray" | "red" | "yellow" | "green" | "slate" | "sky" | "blue" | "indigo" | "purple" | "pink" | "orange";
|
|
165
|
+
type BadgeSize = "sm" | "md" | "lg";
|
|
166
|
+
/** Props shared by all three Badge types. */
|
|
167
|
+
interface BadgeCommonProps {
|
|
168
|
+
children: ReactNode;
|
|
169
|
+
color?: BadgeColor;
|
|
170
|
+
size?: BadgeSize;
|
|
171
|
+
/** Leading coloured dot. */
|
|
172
|
+
dot?: boolean;
|
|
173
|
+
iconLeading?: ReactNode;
|
|
174
|
+
iconTrailing?: ReactNode;
|
|
175
|
+
/** Renders a trailing X-close button when provided. */
|
|
176
|
+
onClose?: () => void;
|
|
177
|
+
className?: string;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
type PillBadgeProps = BadgeCommonProps;
|
|
181
|
+
/** Fully-rounded coloured badge (Figma Badge `Type=Pill color`). */
|
|
182
|
+
declare function PillBadge({ color, size, dot, children, iconLeading, iconTrailing, onClose, className, }: PillBadgeProps): react.JSX.Element;
|
|
183
|
+
|
|
184
|
+
type ColorBadgeProps = BadgeCommonProps;
|
|
185
|
+
/** Rounded-rectangle coloured badge (Figma Badge `Type=Badge color`). */
|
|
186
|
+
declare function ColorBadge({ color, size, dot, children, iconLeading, iconTrailing, onClose, className, }: ColorBadgeProps): react.JSX.Element;
|
|
187
|
+
|
|
188
|
+
type ModernBadgeProps = BadgeCommonProps;
|
|
189
|
+
/**
|
|
190
|
+
* Neutral white badge with a coloured leading dot (Figma Badge
|
|
191
|
+
* `Type=Badge modern`). Here `color` drives only the dot — the chrome stays
|
|
192
|
+
* neutral. The dot defaults on (it's the defining trait of this style).
|
|
193
|
+
*/
|
|
194
|
+
declare function ModernBadge({ color, size, dot, children, iconLeading, iconTrailing, onClose, className, }: ModernBadgeProps): react.JSX.Element;
|
|
195
|
+
|
|
196
|
+
type BadgeCloseXShape = "square" | "rounded";
|
|
197
|
+
interface BadgeCloseXProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color"> {
|
|
198
|
+
/**
|
|
199
|
+
* Tint for the X. Omit to inherit the parent badge's text colour
|
|
200
|
+
* (currentColor) — the usual case when composed inside a Badge.
|
|
201
|
+
*/
|
|
202
|
+
color?: BadgeColor;
|
|
203
|
+
shape?: BadgeCloseXShape;
|
|
204
|
+
}
|
|
205
|
+
declare function BadgeCloseX({ color, shape, className, ...rest }: BadgeCloseXProps): react.JSX.Element;
|
|
206
|
+
|
|
207
|
+
type BadgeGroupSize = "md" | "lg";
|
|
208
|
+
type BadgeGroupType = "pill" | "modern";
|
|
209
|
+
type BadgeGroupBadgePosition = "leading" | "trailing";
|
|
210
|
+
interface BadgeGroupProps {
|
|
211
|
+
/** Text inside the inner coloured badge (e.g. "New feature"). */
|
|
212
|
+
badgeLabel: string;
|
|
213
|
+
/** The main label alongside the badge. */
|
|
214
|
+
children: ReactNode;
|
|
215
|
+
color?: BadgeColor;
|
|
216
|
+
size?: BadgeGroupSize;
|
|
217
|
+
/** Inner badge style. */
|
|
218
|
+
type?: BadgeGroupType;
|
|
219
|
+
/** Whether the badge sits before or after the label. */
|
|
220
|
+
badgePosition?: BadgeGroupBadgePosition;
|
|
221
|
+
className?: string;
|
|
222
|
+
}
|
|
223
|
+
declare function BadgeGroup({ badgeLabel, children, color, size, type, badgePosition, className, }: BadgeGroupProps): react.JSX.Element;
|
|
224
|
+
|
|
225
|
+
type BreadcrumbButtonType = "text" | "button";
|
|
226
|
+
interface BreadcrumbButtonBaseProps {
|
|
227
|
+
/** Crumb label. Optional for an icon-only (home) crumb. */
|
|
228
|
+
children?: ReactNode;
|
|
229
|
+
/** Leading icon (e.g. a home glyph for the root crumb). */
|
|
230
|
+
icon?: ReactNode;
|
|
231
|
+
type?: BreadcrumbButtonType;
|
|
232
|
+
/** Marks the active/last crumb (brand colour, aria-current). */
|
|
233
|
+
current?: boolean;
|
|
234
|
+
/** Renders as an anchor when set, otherwise a button. */
|
|
235
|
+
href?: string;
|
|
236
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
|
237
|
+
className?: string;
|
|
238
|
+
}
|
|
239
|
+
declare function BreadcrumbButtonBase({ children, icon, type, current, href, onClick, className, }: BreadcrumbButtonBaseProps): react.JSX.Element;
|
|
240
|
+
|
|
241
|
+
type BreadcrumbsDivider = "slash" | "chevron";
|
|
242
|
+
interface BreadcrumbsProps {
|
|
243
|
+
/** Separator between crumbs. */
|
|
244
|
+
divider?: BreadcrumbsDivider;
|
|
245
|
+
/** Crumb items — typically `BreadcrumbButtonBase` instances. */
|
|
246
|
+
children: ReactNode;
|
|
247
|
+
className?: string;
|
|
248
|
+
}
|
|
249
|
+
declare function Breadcrumbs({ divider, children, className, }: BreadcrumbsProps): react.JSX.Element;
|
|
250
|
+
|
|
251
|
+
type ButtonHierarchy = "Primary" | "Secondary" | "Tertiary" | "Link color" | "Link gray";
|
|
252
|
+
type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
253
|
+
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
254
|
+
hierarchy?: ButtonHierarchy;
|
|
255
|
+
size?: ButtonSize;
|
|
256
|
+
loading?: boolean;
|
|
257
|
+
}
|
|
258
|
+
declare function Button({ hierarchy, size, loading, disabled, className, children, ...rest }: ButtonProps): react.JSX.Element;
|
|
259
|
+
|
|
260
|
+
type ButtonCloseXSize = "sm" | "md" | "lg";
|
|
261
|
+
interface ButtonCloseXProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> {
|
|
262
|
+
size?: ButtonCloseXSize;
|
|
263
|
+
/** Use the light-on-dark treatment (Figma `Dark background=True`). */
|
|
264
|
+
onDark?: boolean;
|
|
265
|
+
/** Accessible label (defaults to "Close"). */
|
|
266
|
+
label?: string;
|
|
267
|
+
}
|
|
268
|
+
declare function ButtonCloseX({ size, onDark, label, className, ...rest }: ButtonCloseXProps): react.JSX.Element;
|
|
269
|
+
|
|
270
|
+
type ButtonDestructiveHierarchy = "Primary" | "Secondary" | "Tertiary" | "Link";
|
|
271
|
+
type ButtonDestructiveSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
272
|
+
interface ButtonDestructiveProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
273
|
+
hierarchy?: ButtonDestructiveHierarchy;
|
|
274
|
+
size?: ButtonDestructiveSize;
|
|
275
|
+
loading?: boolean;
|
|
276
|
+
}
|
|
277
|
+
declare function ButtonDestructive({ hierarchy, size, loading, disabled, className, children, ...rest }: ButtonDestructiveProps): react.JSX.Element;
|
|
278
|
+
|
|
279
|
+
interface ButtonGroupProps {
|
|
280
|
+
/** Segments — typically `ButtonGroupSegment` instances. */
|
|
281
|
+
children: ReactNode;
|
|
282
|
+
className?: string;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Segmented-control wrapper. Supplies the shared outer border, rounded ends,
|
|
286
|
+
* and the dividers between segments — segments themselves render borderless.
|
|
287
|
+
*/
|
|
288
|
+
declare function ButtonGroup({ children, className }: ButtonGroupProps): react.JSX.Element;
|
|
289
|
+
|
|
290
|
+
type ButtonGroupSegmentSize = "sm" | "md";
|
|
291
|
+
interface ButtonGroupSegmentProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> {
|
|
292
|
+
size?: ButtonGroupSegmentSize;
|
|
293
|
+
/** Active/pressed segment. */
|
|
294
|
+
current?: boolean;
|
|
295
|
+
/** Leading icon (or the only content for an icon-only segment). */
|
|
296
|
+
icon?: ReactNode;
|
|
297
|
+
/** Leading success dot. */
|
|
298
|
+
dot?: boolean;
|
|
299
|
+
}
|
|
300
|
+
declare function ButtonGroupSegment({ size, current, icon, dot, children, className, ...rest }: ButtonGroupSegmentProps): react.JSX.Element;
|
|
301
|
+
|
|
302
|
+
type ButtonUtilitySize = "xs" | "sm";
|
|
303
|
+
type ButtonUtilityVariant = "outline" | "ghost";
|
|
304
|
+
interface ButtonUtilityProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> {
|
|
305
|
+
/** Required icon glyph. */
|
|
306
|
+
icon: ReactNode;
|
|
307
|
+
/** Accessible label (also used as the tooltip when `tooltip` is true). */
|
|
308
|
+
label: string;
|
|
309
|
+
size?: ButtonUtilitySize;
|
|
310
|
+
variant?: ButtonUtilityVariant;
|
|
311
|
+
/** Show the hover/focus tooltip bubble. */
|
|
312
|
+
tooltip?: boolean;
|
|
313
|
+
}
|
|
314
|
+
declare function ButtonUtility({ icon, label, size, variant, tooltip, className, ...rest }: ButtonUtilityProps): react.JSX.Element;
|
|
315
|
+
|
|
316
|
+
interface CalendarCellProps {
|
|
317
|
+
/** Day-of-month number. */
|
|
318
|
+
date: string | number;
|
|
319
|
+
/** Event chips for this day — typically `CalendarEvent` instances. */
|
|
320
|
+
children?: ReactNode;
|
|
321
|
+
/** "+N more" overflow count shown beneath the events. */
|
|
322
|
+
moreCount?: number;
|
|
323
|
+
/** Other-month / disabled styling. */
|
|
324
|
+
muted?: boolean;
|
|
325
|
+
/** Marks today (date number in brand). */
|
|
326
|
+
current?: boolean;
|
|
327
|
+
/** Renders a hover "+" add button bottom-right. */
|
|
328
|
+
onAdd?: () => void;
|
|
329
|
+
className?: string;
|
|
330
|
+
}
|
|
331
|
+
/** A single day cell in the month grid. Composes CalendarEvent chips. */
|
|
332
|
+
declare function CalendarCell({ date, children, moreCount, muted, current, onAdd, className, }: CalendarCellProps): react.JSX.Element;
|
|
333
|
+
|
|
334
|
+
interface CalendarCellDayWeekViewProps {
|
|
335
|
+
/** Event block(s) occupying the slot — typically CalendarEventDayWeekView. */
|
|
336
|
+
children?: ReactNode;
|
|
337
|
+
/** Renders a hover "+" add button bottom-right. */
|
|
338
|
+
onAdd?: () => void;
|
|
339
|
+
/** Disabled / outside-hours styling. */
|
|
340
|
+
muted?: boolean;
|
|
341
|
+
className?: string;
|
|
342
|
+
}
|
|
343
|
+
/** A time-slot cell in day/week view. Holds CalendarEventDayWeekView blocks. */
|
|
344
|
+
declare function CalendarCellDayWeekView({ children, onAdd, muted, className, }: CalendarCellDayWeekViewProps): react.JSX.Element;
|
|
345
|
+
|
|
346
|
+
type CalendarColumnHeaderOrientation = "horizontal" | "vertical";
|
|
347
|
+
interface CalendarColumnHeaderProps {
|
|
348
|
+
/** Weekday label (e.g. "Mon"). */
|
|
349
|
+
weekday: string;
|
|
350
|
+
/** Date number. */
|
|
351
|
+
date: string | number;
|
|
352
|
+
/** Active day — renders the date in a brand-solid circle. */
|
|
353
|
+
current?: boolean;
|
|
354
|
+
orientation?: CalendarColumnHeaderOrientation;
|
|
355
|
+
className?: string;
|
|
356
|
+
}
|
|
357
|
+
declare function CalendarColumnHeader({ weekday, date, current, orientation, className, }: CalendarColumnHeaderProps): react.JSX.Element;
|
|
358
|
+
|
|
359
|
+
interface CalendarDateIconProps {
|
|
360
|
+
/** Short month label (e.g. "JAN"). Rendered uppercase. */
|
|
361
|
+
month: string;
|
|
362
|
+
/** Day number. */
|
|
363
|
+
day: string | number;
|
|
364
|
+
className?: string;
|
|
365
|
+
}
|
|
366
|
+
declare function CalendarDateIcon({ month, day, className }: CalendarDateIconProps): react.JSX.Element;
|
|
367
|
+
|
|
368
|
+
type CalendarEventColor = "neutral" | "brand" | "emerald" | "blue" | "indigo" | "purple" | "pink" | "orange" | "amber";
|
|
369
|
+
interface CalendarEventProps {
|
|
370
|
+
/** Event title. */
|
|
371
|
+
title: string;
|
|
372
|
+
/** Optional time label (e.g. "9:00 AM"). */
|
|
373
|
+
time?: string;
|
|
374
|
+
color?: CalendarEventColor;
|
|
375
|
+
/** Filled colour-fill style vs the subtle white style. */
|
|
376
|
+
filled?: boolean;
|
|
377
|
+
className?: string;
|
|
378
|
+
}
|
|
379
|
+
declare function CalendarEvent({ title, time, color, filled, className, }: CalendarEventProps): react.JSX.Element;
|
|
380
|
+
|
|
381
|
+
interface CalendarEventDayWeekViewProps {
|
|
382
|
+
title: string;
|
|
383
|
+
time?: string;
|
|
384
|
+
color?: CalendarEventColor;
|
|
385
|
+
/** Filled colour-fill style vs the subtle tint. */
|
|
386
|
+
filled?: boolean;
|
|
387
|
+
className?: string;
|
|
388
|
+
}
|
|
389
|
+
declare function CalendarEventDayWeekView({ title, time, color, filled, className, }: CalendarEventDayWeekViewProps): react.JSX.Element;
|
|
390
|
+
|
|
391
|
+
interface CalendarHeaderProps {
|
|
392
|
+
/** Period title, e.g. "January 2027". */
|
|
393
|
+
title: string;
|
|
394
|
+
/** Date range subtitle, e.g. "Jan 1, 2027 – Jan 31, 2027". */
|
|
395
|
+
range?: string;
|
|
396
|
+
/** Badge beside the title (e.g. a PillBadge "Week 1"). */
|
|
397
|
+
badge?: ReactNode;
|
|
398
|
+
/** Leading date chip — typically a CalendarDateIcon. */
|
|
399
|
+
dateIcon?: ReactNode;
|
|
400
|
+
/** Trailing controls slot — nav arrows, CalendarViewDropdown, Add event, etc. */
|
|
401
|
+
actions?: ReactNode;
|
|
402
|
+
className?: string;
|
|
403
|
+
}
|
|
404
|
+
/** Top bar of the calendar composite. A layout shell — drop controls into `actions`. */
|
|
405
|
+
declare function CalendarHeader({ title, range, badge, dateIcon, actions, className, }: CalendarHeaderProps): react.JSX.Element;
|
|
406
|
+
|
|
407
|
+
interface CalendarRowLabelProps {
|
|
408
|
+
/** Time label for the row gutter (e.g. "9 AM"). */
|
|
409
|
+
label: string;
|
|
410
|
+
className?: string;
|
|
411
|
+
}
|
|
412
|
+
/** Left-gutter time label aligned to the top of a day/week-view row. */
|
|
413
|
+
declare function CalendarRowLabel({ label, className }: CalendarRowLabelProps): react.JSX.Element;
|
|
414
|
+
|
|
415
|
+
type CalendarTimemarkerAlign = "left" | "center";
|
|
416
|
+
interface CalendarTimemarkerProps {
|
|
417
|
+
/** Time label (e.g. "2:20 PM"). */
|
|
418
|
+
time: string;
|
|
419
|
+
/** Label position: leading, or centered between two line halves. */
|
|
420
|
+
align?: CalendarTimemarkerAlign;
|
|
421
|
+
className?: string;
|
|
422
|
+
}
|
|
423
|
+
declare function CalendarTimemarker({ time, align, className, }: CalendarTimemarkerProps): react.JSX.Element;
|
|
424
|
+
|
|
425
|
+
type CalendarView = "day" | "week" | "month";
|
|
426
|
+
interface CalendarViewOption {
|
|
427
|
+
value: CalendarView;
|
|
428
|
+
label: string;
|
|
429
|
+
shortcut?: string;
|
|
430
|
+
}
|
|
431
|
+
interface CalendarViewDropdownProps {
|
|
432
|
+
value: CalendarView;
|
|
433
|
+
onChange?: (value: CalendarView) => void;
|
|
434
|
+
options?: CalendarViewOption[];
|
|
435
|
+
className?: string;
|
|
436
|
+
}
|
|
437
|
+
declare function CalendarViewDropdown({ value, onChange, options, className, }: CalendarViewDropdownProps): react.JSX.Element;
|
|
438
|
+
|
|
439
|
+
interface CardHeaderProps {
|
|
440
|
+
/** Card section title. */
|
|
441
|
+
title: string;
|
|
442
|
+
/** Supporting description under the title. */
|
|
443
|
+
description?: string;
|
|
444
|
+
/** Badge beside the title (e.g. a count "10/20 seats"). */
|
|
445
|
+
badge?: ReactNode;
|
|
446
|
+
/** Leading avatar (Figma `Avatar=True`). */
|
|
447
|
+
avatar?: ReactNode;
|
|
448
|
+
/** Trailing actions slot — buttons, overflow menu, etc. */
|
|
449
|
+
actions?: ReactNode;
|
|
450
|
+
/** Bottom divider rule (default true). */
|
|
451
|
+
divider?: boolean;
|
|
452
|
+
className?: string;
|
|
453
|
+
}
|
|
454
|
+
declare function CardHeader({ title, description, badge, avatar, actions, divider, className, }: CardHeaderProps): react.JSX.Element;
|
|
455
|
+
|
|
456
|
+
type CarouselArrowDirection = "left" | "right";
|
|
457
|
+
type CarouselArrowSize = "md" | "lg";
|
|
458
|
+
interface CarouselArrowProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
459
|
+
direction?: CarouselArrowDirection;
|
|
460
|
+
size?: CarouselArrowSize;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Round carousel nav button on a translucent blurred background
|
|
464
|
+
* (`alpha-white-90` + `backdrop-blur-sm`). md = 36px / lg = 44px.
|
|
465
|
+
*/
|
|
466
|
+
declare function CarouselArrow({ direction, size, className, type, ...rest }: CarouselArrowProps): react.JSX.Element;
|
|
467
|
+
|
|
468
|
+
interface CarouselImageProps extends HTMLAttributes<HTMLDivElement> {
|
|
469
|
+
imageUrl: string;
|
|
470
|
+
size?: CarouselArrowSize;
|
|
471
|
+
/** Total slides (drives the dot pager). */
|
|
472
|
+
count?: number;
|
|
473
|
+
/** Active slide index. */
|
|
474
|
+
current?: number;
|
|
475
|
+
onPrev?: () => void;
|
|
476
|
+
onNext?: () => void;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Carousel slide — a full-bleed image with overlaid prev/next `CarouselArrow`s
|
|
480
|
+
* and a bottom-centre `PaginationDotGroup` (framed). Aspect 8:5. Composition
|
|
481
|
+
* over the arrow + dot-group primitives.
|
|
482
|
+
*/
|
|
483
|
+
declare function CarouselImage({ imageUrl, size, count, current, onPrev, onNext, className, ...rest }: CarouselImageProps): react.JSX.Element;
|
|
484
|
+
|
|
485
|
+
type ChangeType = "01" | "02" | "03";
|
|
486
|
+
type ChangeTrend = "positive" | "negative";
|
|
487
|
+
interface ChangeProps extends HTMLAttributes<HTMLDivElement> {
|
|
488
|
+
/** 01 = plain arrow · 02 = trend line · 03 = bordered pill (neutral text). */
|
|
489
|
+
type?: ChangeType;
|
|
490
|
+
trend?: ChangeTrend;
|
|
491
|
+
/** The delta value, e.g. "100%". */
|
|
492
|
+
children: ReactNode;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Trend delta chip used by `MetricItem` (and standalone). Three shapes:
|
|
496
|
+
* - **01** arrow + value, success/error tinted.
|
|
497
|
+
* - **02** trend-line + value, success/error tinted.
|
|
498
|
+
* - **03** bordered pill, diagonal arrow, **neutral** text regardless of trend.
|
|
499
|
+
*/
|
|
500
|
+
declare function Change({ type, trend, children, className, ...rest }: ChangeProps): react.JSX.Element;
|
|
501
|
+
|
|
502
|
+
interface ChartLegendItem {
|
|
503
|
+
label: ReactNode;
|
|
504
|
+
color: string;
|
|
505
|
+
}
|
|
506
|
+
interface ChartLegendProps {
|
|
507
|
+
items: ChartLegendItem[];
|
|
508
|
+
/** Layout direction — `horizontal` (top) or `vertical` (right). */
|
|
509
|
+
orientation?: "horizontal" | "vertical";
|
|
510
|
+
className?: string;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Chart legend — a row (or column) of colored-dot + label entries. Use standalone
|
|
514
|
+
* or feed Recharts' `<Legend content={...} />`. `color` is a real CSS color (the
|
|
515
|
+
* series color), matching the `CHART_COLORS` palette.
|
|
516
|
+
*/
|
|
517
|
+
declare function ChartLegend({ items, orientation, className }: ChartLegendProps): react.JSX.Element;
|
|
518
|
+
|
|
519
|
+
type ChartMarkerLine = "solid" | "dashed" | "none";
|
|
520
|
+
interface ChartMarkerProps {
|
|
521
|
+
/** Primary value shown in the bubble (e.g. "1,218"). */
|
|
522
|
+
value: string;
|
|
523
|
+
/** Optional secondary line (e.g. "Jan 10, 2027"). */
|
|
524
|
+
date?: string;
|
|
525
|
+
/** The drop line beneath the marker. */
|
|
526
|
+
line?: ChartMarkerLine;
|
|
527
|
+
/** Drop-line height. Defaults to h-32 (128px). */
|
|
528
|
+
lineHeightClass?: string;
|
|
529
|
+
className?: string;
|
|
530
|
+
}
|
|
531
|
+
declare function ChartMarker({ value, date, line, lineHeightClass, className, }: ChartMarkerProps): react.JSX.Element;
|
|
532
|
+
|
|
533
|
+
interface ChartMiniDatum {
|
|
534
|
+
value: number;
|
|
535
|
+
}
|
|
536
|
+
type ChartMiniTrend = "positive" | "negative" | "neutral";
|
|
537
|
+
interface ChartMiniProps {
|
|
538
|
+
/** Series points — only `value` is read. */
|
|
539
|
+
data: ChartMiniDatum[];
|
|
540
|
+
/**
|
|
541
|
+
* Stroke colour. A design-token name (e.g. `"utility-brand-500"`,
|
|
542
|
+
* `"utility-success-500"`) resolved to its hex, or a raw `#hex`. Defaults to
|
|
543
|
+
* the `trend` colour (`utility-brand-500` for neutral).
|
|
544
|
+
*/
|
|
545
|
+
color?: string;
|
|
546
|
+
/** Drives the default stroke colour when `color` is omitted. */
|
|
547
|
+
trend?: ChartMiniTrend;
|
|
548
|
+
/** Container size (px). Figma sparkline is 112×56. */
|
|
549
|
+
width?: number | string;
|
|
550
|
+
height?: number;
|
|
551
|
+
className?: string;
|
|
552
|
+
style?: CSSProperties;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Sparkline — a thin Recharts `LineChart` wrapper. No axes, legend, tooltip or
|
|
556
|
+
* dots: line only. Consumed by `MetricItem`'s `chart` slot. Recharts is an
|
|
557
|
+
* optional peer dependency — install it in the consuming app to use this.
|
|
558
|
+
*/
|
|
559
|
+
declare function ChartMini({ data, color, trend, width, height, className, style, }: ChartMiniProps): react.JSX.Element;
|
|
560
|
+
|
|
561
|
+
interface ChartTooltipPayloadItem {
|
|
562
|
+
name?: string;
|
|
563
|
+
value?: number | string;
|
|
564
|
+
color?: string;
|
|
565
|
+
dataKey?: string | number;
|
|
566
|
+
}
|
|
567
|
+
interface ChartTooltipProps {
|
|
568
|
+
/** Recharts passes this when the tooltip is shown. */
|
|
569
|
+
active?: boolean;
|
|
570
|
+
/** Series entries at the hovered point (Recharts shape). */
|
|
571
|
+
payload?: ChartTooltipPayloadItem[];
|
|
572
|
+
/** The category/x label at the hovered point. */
|
|
573
|
+
label?: ReactNode;
|
|
574
|
+
/** Format a value for display. */
|
|
575
|
+
formatValue?: (value: number | string | undefined) => ReactNode;
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Themed tooltip card for the Recharts chart wrappers — pass as the chart's
|
|
579
|
+
* `<Tooltip content={<ChartTooltip />} />`. Renders a `bg-primary` card with the
|
|
580
|
+
* point label and one colored-dot row per series. Returns null when inactive.
|
|
581
|
+
*/
|
|
582
|
+
declare function ChartTooltip({ active, payload, label, formatValue }: ChartTooltipProps): react.JSX.Element | null;
|
|
583
|
+
|
|
584
|
+
type CheckControlSize = "sm" | "md";
|
|
585
|
+
|
|
586
|
+
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
|
|
587
|
+
size?: CheckControlSize;
|
|
588
|
+
/** Indeterminate (mixed) visual state. */
|
|
589
|
+
indeterminate?: boolean;
|
|
590
|
+
label?: string;
|
|
591
|
+
supportingText?: string;
|
|
592
|
+
}
|
|
593
|
+
declare function Checkbox({ size, indeterminate, checked, disabled, label, supportingText, className, ...rest }: CheckboxProps): react.JSX.Element;
|
|
594
|
+
|
|
595
|
+
interface CodeSnippetProps {
|
|
596
|
+
/** Raw code string. Rendered verbatim — see the highlighting note below. */
|
|
597
|
+
code: string;
|
|
598
|
+
/** Optional language label (shown in the toolbar). */
|
|
599
|
+
language?: string;
|
|
600
|
+
/** Show the line-number gutter. */
|
|
601
|
+
showLineNumbers?: boolean;
|
|
602
|
+
/** Override the copy handler (defaults to navigator.clipboard). */
|
|
603
|
+
onCopy?: (code: string) => void;
|
|
604
|
+
className?: string;
|
|
605
|
+
}
|
|
606
|
+
declare function CodeSnippet({ code, language, showLineNumbers, onCopy, className, }: CodeSnippetProps): react.JSX.Element;
|
|
607
|
+
|
|
608
|
+
interface CodeSnippetTabsProps {
|
|
609
|
+
/** Tab labels (e.g. ["npm", "yarn", "bun"]). */
|
|
610
|
+
tabs: string[];
|
|
611
|
+
/** Currently-selected tab. */
|
|
612
|
+
value: string;
|
|
613
|
+
onChange?: (tab: string) => void;
|
|
614
|
+
className?: string;
|
|
615
|
+
}
|
|
616
|
+
/** Tab strip for CodeSnippet's "Vertical with tabs" type. */
|
|
617
|
+
declare function CodeSnippetTabs({ tabs, value, onChange, className, }: CodeSnippetTabsProps): react.JSX.Element;
|
|
618
|
+
|
|
619
|
+
interface CommandBarFooterHint {
|
|
620
|
+
/** Key cap(s) for this hint — one or more CommandBarNavigationIcon elements. */
|
|
621
|
+
keys: ReactNode;
|
|
622
|
+
/** Description shown after the keys, e.g. "to navigate". */
|
|
623
|
+
label: string;
|
|
624
|
+
}
|
|
625
|
+
interface CommandBarFooterProps {
|
|
626
|
+
/**
|
|
627
|
+
* Hint groups shown left-to-right. Defaults to the standard
|
|
628
|
+
* navigate / select / close / return-to-parent set.
|
|
629
|
+
*/
|
|
630
|
+
hints?: CommandBarFooterHint[];
|
|
631
|
+
/** When provided, renders the trailing settings button. */
|
|
632
|
+
onSettings?: () => void;
|
|
633
|
+
className?: string;
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Footer bar for a command menu — keyboard-navigation hints plus an optional
|
|
637
|
+
* settings button. Composes CommandBarNavigationIcon.
|
|
638
|
+
*/
|
|
639
|
+
declare function CommandBarFooter({ hints, onSettings, className, }: CommandBarFooterProps): react.JSX.Element;
|
|
640
|
+
|
|
641
|
+
interface CommandBarProps {
|
|
642
|
+
open?: boolean;
|
|
643
|
+
onClose?: () => void;
|
|
644
|
+
/** Search value (controlled). */
|
|
645
|
+
value?: string;
|
|
646
|
+
onValueChange?: (value: string) => void;
|
|
647
|
+
placeholder?: string;
|
|
648
|
+
/** Trailing shortcut hint in the input (e.g. a `CommandShortcut`). */
|
|
649
|
+
shortcut?: ReactNode;
|
|
650
|
+
onHelp?: () => void;
|
|
651
|
+
/** Body — typically `CommandBarMenuSection` children. */
|
|
652
|
+
children?: ReactNode;
|
|
653
|
+
/** Footer hints; omit to use the default set. `false` hides the footer. */
|
|
654
|
+
footerHints?: CommandBarFooterHint[] | false;
|
|
655
|
+
onSettings?: () => void;
|
|
656
|
+
/** Render a dimmed backdrop behind the panel (click closes). */
|
|
657
|
+
withBackdrop?: boolean;
|
|
658
|
+
className?: string;
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Command palette — thin assembly of the `Command*` primitives: `CommandInput`
|
|
662
|
+
* (search) + a scrollable body of `CommandBarMenuSection`s (`children`) +
|
|
663
|
+
* `CommandBarFooter`. Controlled via `open`; renders nothing when closed. Pass an
|
|
664
|
+
* optional `withBackdrop` for the dimmed overlay.
|
|
665
|
+
*/
|
|
666
|
+
declare function CommandBar({ open, onClose, value, onValueChange, placeholder, shortcut, onHelp, children, footerHints, onSettings, withBackdrop, className, }: CommandBarProps): react.JSX.Element | null;
|
|
667
|
+
|
|
668
|
+
interface CommandBarMenuSectionProps {
|
|
669
|
+
/** Section heading (e.g. "Recent"). */
|
|
670
|
+
label?: string;
|
|
671
|
+
/** Section rows — typically CommandDropdownMenuItem instances. */
|
|
672
|
+
children: ReactNode;
|
|
673
|
+
className?: string;
|
|
674
|
+
}
|
|
675
|
+
/** A labelled group of command-bar results. */
|
|
676
|
+
declare function CommandBarMenuSection({ label, children, className, }: CommandBarMenuSectionProps): react.JSX.Element;
|
|
677
|
+
|
|
678
|
+
interface CommandBarNavigationIconProps {
|
|
679
|
+
/**
|
|
680
|
+
* `"icon"` renders a 16px icon slot (pass the glyph as `children`);
|
|
681
|
+
* `"text"` renders a short key label such as "esc" (pass it as `label`).
|
|
682
|
+
*/
|
|
683
|
+
type?: "icon" | "text";
|
|
684
|
+
/** Icon glyph for `type="icon"`. */
|
|
685
|
+
children?: ReactNode;
|
|
686
|
+
/** Short key label for `type="text"`. */
|
|
687
|
+
label?: string;
|
|
688
|
+
className?: string;
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* A single key cap in a command-bar footer — either a 16px navigation icon
|
|
692
|
+
* (arrows, enter) or a short text key like "esc". Used by CommandBarFooter.
|
|
693
|
+
*/
|
|
694
|
+
declare function CommandBarNavigationIcon({ type, children, label, className, }: CommandBarNavigationIconProps): react.JSX.Element;
|
|
695
|
+
|
|
696
|
+
interface CommandDropdownMenuItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "title"> {
|
|
697
|
+
/** Primary label. */
|
|
698
|
+
title: string;
|
|
699
|
+
/** Secondary text shown next to the title (e.g. a @handle). */
|
|
700
|
+
subtitle?: string;
|
|
701
|
+
/** Leading slot — avatar, icon, or dot. */
|
|
702
|
+
icon?: ReactNode;
|
|
703
|
+
/** Trailing slot — typically a CommandShortcut. */
|
|
704
|
+
shortcut?: ReactNode;
|
|
705
|
+
/** Highlighted/active row. */
|
|
706
|
+
selected?: boolean;
|
|
707
|
+
}
|
|
708
|
+
/** A single result row inside a command bar menu. */
|
|
709
|
+
declare function CommandDropdownMenuItem({ title, subtitle, icon, shortcut, selected, className, ...rest }: CommandDropdownMenuItemProps): react.JSX.Element;
|
|
710
|
+
|
|
711
|
+
interface CommandInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
712
|
+
/** Trailing shortcut hint (e.g. a CommandShortcut for "⌘/"). */
|
|
713
|
+
shortcut?: ReactNode;
|
|
714
|
+
/** Renders a help (?) button before the shortcut. */
|
|
715
|
+
onHelp?: () => void;
|
|
716
|
+
}
|
|
717
|
+
/** Search/command input row — the trigger field of a command bar. */
|
|
718
|
+
declare function CommandInput({ shortcut, onHelp, className, ...rest }: CommandInputProps): react.JSX.Element;
|
|
719
|
+
|
|
720
|
+
interface CommandShortcutProps {
|
|
721
|
+
/** Keys rendered as individual kbd badges, e.g. ["⌘", "C"] or ["⌘C"]. */
|
|
722
|
+
keys: string[];
|
|
723
|
+
className?: string;
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* Keyboard-shortcut hint (kbd badges). For multi-step sequences like
|
|
727
|
+
* "⌘K then → C", render two CommandShortcut with connector text between them.
|
|
728
|
+
*/
|
|
729
|
+
declare function CommandShortcut({ keys, className }: CommandShortcutProps): react.JSX.Element;
|
|
730
|
+
|
|
731
|
+
type ContentDividerType = "heading" | "text" | "button" | "button-icon" | "button-group" | "button-group-icon";
|
|
732
|
+
type ContentDividerStyle = "single-line" | "dual-line" | "background-fill";
|
|
733
|
+
interface ContentDividerProps {
|
|
734
|
+
/** What sits in the centre of the divider. */
|
|
735
|
+
type?: ContentDividerType;
|
|
736
|
+
/** How the divider rules/background are drawn. */
|
|
737
|
+
style?: ContentDividerStyle;
|
|
738
|
+
/** Text shown for `type="heading"` / `type="text"`. */
|
|
739
|
+
label?: string;
|
|
740
|
+
/**
|
|
741
|
+
* Centre content for the button variants (`button`, `button-icon`,
|
|
742
|
+
* `button-group`, `button-group-icon`) — pass a Button / ButtonGroup etc.
|
|
743
|
+
*/
|
|
744
|
+
children?: ReactNode;
|
|
745
|
+
className?: string;
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* A horizontal section divider with a centred label, button, or button group.
|
|
749
|
+
* `style` controls whether the rules sit on the sides (single line), top &
|
|
750
|
+
* bottom (dual line), or are replaced by a filled background.
|
|
751
|
+
*/
|
|
752
|
+
declare function ContentDivider({ type, style, label, children, className, }: ContentDividerProps): react.JSX.Element;
|
|
753
|
+
|
|
754
|
+
type ContentFeatureTextSize = "sm" | "md";
|
|
755
|
+
interface ContentFeatureTextProps {
|
|
756
|
+
/** Heading shown above the body. */
|
|
757
|
+
heading?: ReactNode;
|
|
758
|
+
/** Body content — typically one or more `<p>` elements. */
|
|
759
|
+
children: ReactNode;
|
|
760
|
+
/** Type / padding scale. */
|
|
761
|
+
size?: ContentFeatureTextSize;
|
|
762
|
+
className?: string;
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* A highlighted block of feature copy (heading + body) on a filled
|
|
766
|
+
* background — used inside long-form content.
|
|
767
|
+
*/
|
|
768
|
+
declare function ContentFeatureText({ heading, children, size, className, }: ContentFeatureTextProps): react.JSX.Element;
|
|
769
|
+
|
|
770
|
+
type ContentHeadingSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
771
|
+
interface ContentHeadingProps {
|
|
772
|
+
/** Type scale. xs/sm use the body font; md/lg/xl use the display font. */
|
|
773
|
+
size?: ContentHeadingSize;
|
|
774
|
+
/** Rendered element. Defaults to `h2`. */
|
|
775
|
+
as?: ElementType;
|
|
776
|
+
children: ReactNode;
|
|
777
|
+
className?: string;
|
|
778
|
+
}
|
|
779
|
+
/** Long-form content heading (article/marketing body copy). */
|
|
780
|
+
declare function ContentHeading({ size, as: Tag, children, className, }: ContentHeadingProps): react.JSX.Element;
|
|
781
|
+
|
|
782
|
+
type ContentParagraphSize = "sm" | "md" | "lg" | "xl";
|
|
783
|
+
interface ContentParagraphProps {
|
|
784
|
+
/** Type scale. */
|
|
785
|
+
size?: ContentParagraphSize;
|
|
786
|
+
children: ReactNode;
|
|
787
|
+
className?: string;
|
|
788
|
+
}
|
|
789
|
+
/** Long-form content paragraph (article/marketing body copy). */
|
|
790
|
+
declare function ContentParagraph({ size, children, className, }: ContentParagraphProps): react.JSX.Element;
|
|
791
|
+
|
|
792
|
+
type ContentQuoteAlign = "left" | "center";
|
|
793
|
+
type ContentQuoteSize = "sm" | "md" | "lg" | "xl" | "2xl";
|
|
794
|
+
interface ContentQuoteProps {
|
|
795
|
+
/** The quotation text. */
|
|
796
|
+
quote: ReactNode;
|
|
797
|
+
/** Left-bordered (default) or centred layout. */
|
|
798
|
+
align?: ContentQuoteAlign;
|
|
799
|
+
/** Quote type scale. */
|
|
800
|
+
size?: ContentQuoteSize;
|
|
801
|
+
/** Author avatar — compose an Avatar. */
|
|
802
|
+
avatar?: ReactNode;
|
|
803
|
+
/** Author name. */
|
|
804
|
+
authorName?: ReactNode;
|
|
805
|
+
/** Author role / supporting line. */
|
|
806
|
+
authorRole?: ReactNode;
|
|
807
|
+
className?: string;
|
|
808
|
+
}
|
|
809
|
+
/** Long-form pull quote with optional author attribution. */
|
|
810
|
+
declare function ContentQuote({ quote, align, size, avatar, authorName, authorRole, className, }: ContentQuoteProps): react.JSX.Element;
|
|
811
|
+
|
|
812
|
+
type ContentRuleSize = "sm" | "md" | "lg" | "xl" | "2xl";
|
|
813
|
+
interface ContentRuleProps {
|
|
814
|
+
/** Controls the vertical breathing room around the rule. */
|
|
815
|
+
size?: ContentRuleSize;
|
|
816
|
+
className?: string;
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* A plain full-width horizontal rule for separating blocks of long-form
|
|
820
|
+
* content. Distinct from `ContentDivider`, which carries a centred
|
|
821
|
+
* label/button. `size` sets the surrounding vertical spacing.
|
|
822
|
+
*/
|
|
823
|
+
declare function ContentRule({ size, className }: ContentRuleProps): react.JSX.Element;
|
|
824
|
+
|
|
825
|
+
interface ContextMenuProps {
|
|
826
|
+
/** Whether the menu is visible. */
|
|
827
|
+
open: boolean;
|
|
828
|
+
/** Viewport x of the right-click (from useContextMenu). */
|
|
829
|
+
x: number;
|
|
830
|
+
/** Viewport y of the right-click (from useContextMenu). */
|
|
831
|
+
y: number;
|
|
832
|
+
/** Called on outside-click or Escape. */
|
|
833
|
+
onClose: () => void;
|
|
834
|
+
/** Menu rows — typically DropdownMenuListItem elements. */
|
|
835
|
+
children: ReactNode;
|
|
836
|
+
className?: string;
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* A thin positioned panel for right-click menus. Reuses the dropdown panel
|
|
840
|
+
* tokens (shadow-lg, border-secondary-alt, radius-md) and renders whatever
|
|
841
|
+
* rows you pass — compose DropdownMenuListItem children; it does NOT
|
|
842
|
+
* reimplement list items. Pair with `useContextMenu`.
|
|
843
|
+
*/
|
|
844
|
+
declare function ContextMenu({ open, x, y, onClose, children, className, }: ContextMenuProps): react.JSX.Element | null;
|
|
845
|
+
|
|
846
|
+
interface ContextMenuState {
|
|
847
|
+
open: boolean;
|
|
848
|
+
x: number;
|
|
849
|
+
y: number;
|
|
850
|
+
}
|
|
851
|
+
interface UseContextMenuReturn extends ContextMenuState {
|
|
852
|
+
/** Attach to the element that should open the menu on right-click. */
|
|
853
|
+
onContextMenu: (e: {
|
|
854
|
+
preventDefault: () => void;
|
|
855
|
+
clientX: number;
|
|
856
|
+
clientY: number;
|
|
857
|
+
}) => void;
|
|
858
|
+
/** Close the menu. */
|
|
859
|
+
close: () => void;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Captures right-click position and manages open state for a ContextMenu.
|
|
863
|
+
*
|
|
864
|
+
* ```tsx
|
|
865
|
+
* const menu = useContextMenu();
|
|
866
|
+
* <div onContextMenu={menu.onContextMenu}>…</div>
|
|
867
|
+
* <ContextMenu open={menu.open} x={menu.x} y={menu.y} onClose={menu.close}>
|
|
868
|
+
* <DropdownMenuListItem>Cut</DropdownMenuListItem>
|
|
869
|
+
* </ContextMenu>
|
|
870
|
+
* ```
|
|
871
|
+
*/
|
|
872
|
+
declare function useContextMenu(): UseContextMenuReturn;
|
|
873
|
+
|
|
874
|
+
type DatePickerCellType = "default" | "active" | "selected" | "today";
|
|
875
|
+
interface DatePickerCellProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
|
|
876
|
+
/** Day number (or any short label). */
|
|
877
|
+
date: ReactNode;
|
|
878
|
+
/** Visual role of the cell within the calendar grid. */
|
|
879
|
+
cellType?: DatePickerCellType;
|
|
880
|
+
/** Shows the small "has events" dot under the date. */
|
|
881
|
+
hasDot?: boolean;
|
|
882
|
+
/** Range-fill connector on the left edge (cell is mid/end of a range). */
|
|
883
|
+
leftConnector?: boolean;
|
|
884
|
+
/** Range-fill connector on the right edge (cell is start/mid of a range). */
|
|
885
|
+
rightConnector?: boolean;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* A single day cell in the date-picker calendar grid. Distinct from the
|
|
889
|
+
* Calendar page's own `CalendarCell` — this one is round, supports range
|
|
890
|
+
* connectors, and a selected (brand-filled) state.
|
|
891
|
+
*/
|
|
892
|
+
declare function DatePickerCell({ date, cellType, hasDot, leftConnector, rightConnector, disabled, className, ...rest }: DatePickerCellProps): react.JSX.Element;
|
|
893
|
+
|
|
894
|
+
interface DatePickerListItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
895
|
+
/** Marks the item as the current selection (filled background). */
|
|
896
|
+
selected?: boolean;
|
|
897
|
+
children: ReactNode;
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* A selectable row in a date-picker preset list (e.g. "Today", "Last 7 days").
|
|
901
|
+
* Hover and focus are handled natively; pass `selected` for the active row.
|
|
902
|
+
*/
|
|
903
|
+
declare function DatePickerListItem({ selected, children, className, ...rest }: DatePickerListItemProps): react.JSX.Element;
|
|
904
|
+
|
|
905
|
+
interface DatePickerMenuProps {
|
|
906
|
+
/** Current month label, e.g. "January 2027". */
|
|
907
|
+
monthLabel: ReactNode;
|
|
908
|
+
/** Previous-month handler. */
|
|
909
|
+
onPrevMonth?: () => void;
|
|
910
|
+
/** Next-month handler. */
|
|
911
|
+
onNextMonth?: () => void;
|
|
912
|
+
/** Weekday column headers. Defaults to Mo–Su. */
|
|
913
|
+
weekdays?: string[];
|
|
914
|
+
/**
|
|
915
|
+
* Optional row above the grid (e.g. a date input + "Today" button).
|
|
916
|
+
* Compose your own controls here.
|
|
917
|
+
*/
|
|
918
|
+
toolbar?: ReactNode;
|
|
919
|
+
/** The day grid — typically 35–42 DatePickerCell elements. */
|
|
920
|
+
children: ReactNode;
|
|
921
|
+
/** Cancel handler (renders the footer when set with onApply). */
|
|
922
|
+
onCancel?: () => void;
|
|
923
|
+
/** Apply handler (renders the footer when set with onCancel). */
|
|
924
|
+
onApply?: () => void;
|
|
925
|
+
cancelLabel?: ReactNode;
|
|
926
|
+
applyLabel?: ReactNode;
|
|
927
|
+
className?: string;
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* The calendar panel of a date picker — month navigation, weekday header,
|
|
931
|
+
* a day grid (compose DatePickerCell children), and optional toolbar/footer.
|
|
932
|
+
* Date math is the consumer's responsibility; this renders the chrome.
|
|
933
|
+
*/
|
|
934
|
+
declare function DatePickerMenu({ monthLabel, onPrevMonth, onNextMonth, weekdays, toolbar, children, onCancel, onApply, cancelLabel, applyLabel, className, }: DatePickerMenuProps): react.JSX.Element;
|
|
935
|
+
|
|
936
|
+
interface DropdownAccountListItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "name"> {
|
|
937
|
+
/** Square avatar (compose an avatar/image). */
|
|
938
|
+
avatar?: ReactNode;
|
|
939
|
+
/** Account name. */
|
|
940
|
+
name: ReactNode;
|
|
941
|
+
/** Account email / supporting line. */
|
|
942
|
+
email?: ReactNode;
|
|
943
|
+
/** Whether this account is the active selection (filled radio). */
|
|
944
|
+
selected?: boolean;
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* An account-switcher row for a dropdown menu — square avatar, name + email,
|
|
948
|
+
* and a trailing radio indicator. Hover handled natively.
|
|
949
|
+
*/
|
|
950
|
+
declare function DropdownAccountListItem({ avatar, name, email, selected, className, ...rest }: DropdownAccountListItemProps): react.JSX.Element;
|
|
951
|
+
|
|
952
|
+
type DropdownMenuFooterType = "text" | "button";
|
|
953
|
+
interface DropdownMenuFooterProps {
|
|
954
|
+
/** `text` shows a left/right caption pair; `button` hosts an action. */
|
|
955
|
+
type?: DropdownMenuFooterType;
|
|
956
|
+
/** Left caption for `type="text"`. */
|
|
957
|
+
left?: ReactNode;
|
|
958
|
+
/** Right caption for `type="text"`. */
|
|
959
|
+
right?: ReactNode;
|
|
960
|
+
/** Action content for `type="button"` — compose a Button. */
|
|
961
|
+
children?: ReactNode;
|
|
962
|
+
className?: string;
|
|
963
|
+
}
|
|
964
|
+
/** The bottom section of a dropdown menu panel. */
|
|
965
|
+
declare function DropdownMenuFooter({ type, left, right, children, className, }: DropdownMenuFooterProps): react.JSX.Element;
|
|
966
|
+
|
|
967
|
+
type DropdownMenuHeaderType = "avatar-group" | "header" | "subheading" | "search";
|
|
968
|
+
interface DropdownMenuHeaderProps {
|
|
969
|
+
/** Header layout. */
|
|
970
|
+
type?: DropdownMenuHeaderType;
|
|
971
|
+
/** Primary text (name / heading / subheading label). */
|
|
972
|
+
title?: ReactNode;
|
|
973
|
+
/** Secondary line (email / supporting text). */
|
|
974
|
+
supportingText?: ReactNode;
|
|
975
|
+
/** Avatar node for `avatar-group`. */
|
|
976
|
+
avatar?: ReactNode;
|
|
977
|
+
/** Search control for `search` (compose your own input). */
|
|
978
|
+
search?: ReactNode;
|
|
979
|
+
className?: string;
|
|
980
|
+
}
|
|
981
|
+
/** The top section of a dropdown menu panel. */
|
|
982
|
+
declare function DropdownMenuHeader({ type, title, supportingText, avatar, search, className, }: DropdownMenuHeaderProps): react.JSX.Element;
|
|
983
|
+
|
|
984
|
+
type DropdownMenuItemInsetIconType = "spacer" | "icon" | "check" | "checkbox" | "dot" | "avatar" | "integration-icon";
|
|
985
|
+
interface DropdownMenuItemInsetIconProps {
|
|
986
|
+
/** Which leading visual to render in the 16px slot. */
|
|
987
|
+
type?: DropdownMenuItemInsetIconType;
|
|
988
|
+
/** Glyph/avatar/integration content for `icon`/`avatar`/`integration-icon`. */
|
|
989
|
+
children?: ReactNode;
|
|
990
|
+
/** Checked state for `checkbox`. */
|
|
991
|
+
checked?: boolean;
|
|
992
|
+
className?: string;
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* The 16px leading-icon slot used inside a dropdown menu row. Renders one of
|
|
996
|
+
* several visuals (icon, check, checkbox, radio dot, avatar, integration icon)
|
|
997
|
+
* or an empty spacer to keep labels aligned.
|
|
998
|
+
*/
|
|
999
|
+
declare function DropdownMenuItemInsetIcon({ type, children, checked, className, }: DropdownMenuItemInsetIconProps): react.JSX.Element;
|
|
1000
|
+
|
|
1001
|
+
interface DropdownMenuListItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
|
|
1002
|
+
/** Leading visual — typically a DropdownMenuItemInsetIcon. */
|
|
1003
|
+
leadingIcon?: ReactNode;
|
|
1004
|
+
/** Trailing keyboard-shortcut hint. */
|
|
1005
|
+
shortcut?: ReactNode;
|
|
1006
|
+
/** Shows the trailing chevron (submenu affordance). */
|
|
1007
|
+
chevron?: boolean;
|
|
1008
|
+
/** Renders a divider rule instead of an interactive row. */
|
|
1009
|
+
divider?: boolean;
|
|
1010
|
+
/** Highlights the row as currently active/open. */
|
|
1011
|
+
selected?: boolean;
|
|
1012
|
+
children?: ReactNode;
|
|
1013
|
+
}
|
|
1014
|
+
/**
|
|
1015
|
+
* A single row in a dropdown menu — leading icon, label, optional shortcut and
|
|
1016
|
+
* submenu chevron. Pass `divider` to render a separator rule instead.
|
|
1017
|
+
*/
|
|
1018
|
+
declare function DropdownMenuListItem({ leadingIcon, shortcut, chevron, divider, selected, children, className, disabled, ...rest }: DropdownMenuListItemProps): react.JSX.Element;
|
|
1019
|
+
|
|
1020
|
+
type EmptyStateSize = "sm" | "md" | "lg";
|
|
1021
|
+
interface EmptyStateProps {
|
|
1022
|
+
/**
|
|
1023
|
+
* The icon/illustration area. Pass any of the 8 Figma options (featured
|
|
1024
|
+
* icon, folder, file-type, illustration, users, integrations) as a node —
|
|
1025
|
+
* EmptyState doesn't prescribe which.
|
|
1026
|
+
*/
|
|
1027
|
+
icon?: ReactNode;
|
|
1028
|
+
/** Headline. */
|
|
1029
|
+
title: ReactNode;
|
|
1030
|
+
/** Supporting copy under the title. */
|
|
1031
|
+
description?: ReactNode;
|
|
1032
|
+
/** Action buttons row — compose Button(s). */
|
|
1033
|
+
actions?: ReactNode;
|
|
1034
|
+
/** Size scale (affects title size + max text width). */
|
|
1035
|
+
size?: EmptyStateSize;
|
|
1036
|
+
className?: string;
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* Centred empty/zero state — icon, title, supporting text, and actions.
|
|
1040
|
+
* The icon area is a single slot (`icon`) per the resolved structural
|
|
1041
|
+
* decision (one component, icon slot — not split per icon type).
|
|
1042
|
+
*/
|
|
1043
|
+
declare function EmptyState({ icon, title, description, actions, size, className, }: EmptyStateProps): react.JSX.Element;
|
|
1044
|
+
|
|
1045
|
+
type FeedItemSize = "sm" | "md";
|
|
1046
|
+
interface FeedItemBaseProps {
|
|
1047
|
+
/** Display name of the actor (e.g. "Olivia Rhye"). */
|
|
1048
|
+
name: string;
|
|
1049
|
+
/** Relative timestamp shown next to the name (e.g. "2 mins ago"). */
|
|
1050
|
+
timestamp: string;
|
|
1051
|
+
/**
|
|
1052
|
+
* The activity line beneath the name — e.g. "Invited Lana Steiner to the
|
|
1053
|
+
* team". Pass a ReactNode so embedded links can use
|
|
1054
|
+
* `text-text-brand-secondary font-medium`.
|
|
1055
|
+
*/
|
|
1056
|
+
action?: ReactNode;
|
|
1057
|
+
/**
|
|
1058
|
+
* Optional supporting content rendered below the action line. In Figma this
|
|
1059
|
+
* is the `Supporting item` variant (File / Labels / Text). It's modelled as a
|
|
1060
|
+
* slot rather than a `type` prop so consumers compose the actual content —
|
|
1061
|
+
* which keeps the File sample's `Colors/Red/600` and the Labels sample's
|
|
1062
|
+
* `utility-*` color families (both flagged in figma-map.md, neither in
|
|
1063
|
+
* tailwind-preset.js) out of this base component.
|
|
1064
|
+
*/
|
|
1065
|
+
supporting?: ReactNode;
|
|
1066
|
+
/** Avatar image URL. Falls back to a neutral placeholder when omitted. */
|
|
1067
|
+
avatarSrc?: string;
|
|
1068
|
+
/** Alt text for the avatar image. */
|
|
1069
|
+
avatarAlt?: string;
|
|
1070
|
+
/** Show the online status dot on the avatar. */
|
|
1071
|
+
hasStatus?: boolean;
|
|
1072
|
+
/** Render the vertical connector line below the avatar (for stacked feeds). */
|
|
1073
|
+
connector?: boolean;
|
|
1074
|
+
/** Show the unread "new" dot in the top-right corner. */
|
|
1075
|
+
isNew?: boolean;
|
|
1076
|
+
size?: FeedItemSize;
|
|
1077
|
+
className?: string;
|
|
1078
|
+
}
|
|
1079
|
+
declare function FeedItemBase({ name, timestamp, action, supporting, avatarSrc, avatarAlt, hasStatus, connector, isNew, size, className, }: FeedItemBaseProps): react.JSX.Element;
|
|
1080
|
+
|
|
1081
|
+
interface FileUploadProps {
|
|
1082
|
+
/** Selected files (controlled). */
|
|
1083
|
+
files?: File[];
|
|
1084
|
+
onFilesChange?: (files: File[]) => void;
|
|
1085
|
+
/** Max number of files kept; extra picks are dropped. */
|
|
1086
|
+
maxFiles?: number;
|
|
1087
|
+
/** Accepted MIME types / extensions for the native picker. */
|
|
1088
|
+
accept?: string;
|
|
1089
|
+
disabled?: boolean;
|
|
1090
|
+
actionText?: ReactNode;
|
|
1091
|
+
promptText?: ReactNode;
|
|
1092
|
+
hint?: ReactNode;
|
|
1093
|
+
className?: string;
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* File upload — composes the `FileUploadBase` dropzone (click + drag/drop, via a
|
|
1097
|
+
* hidden native input) with a `FileUploadItemBase` list. Controlled through
|
|
1098
|
+
* `files`/`onFilesChange`; respects `maxFiles` and `accept`. The item rows here
|
|
1099
|
+
* are simple "complete" entries — wire `progress`/`status` per item if you need
|
|
1100
|
+
* live upload state.
|
|
1101
|
+
*/
|
|
1102
|
+
declare function FileUpload({ files, onFilesChange, maxFiles, accept, disabled, actionText, promptText, hint, className, }: FileUploadProps): react.JSX.Element;
|
|
1103
|
+
|
|
1104
|
+
interface FileUploadBaseProps extends HTMLAttributes<HTMLDivElement> {
|
|
1105
|
+
/** Emphasised action text. */
|
|
1106
|
+
actionText?: ReactNode;
|
|
1107
|
+
/** Trailing prompt after the action text. */
|
|
1108
|
+
promptText?: ReactNode;
|
|
1109
|
+
/** Constraints hint (e.g. "SVG, PNG, JPG or GIF (max. 800x400px)"). */
|
|
1110
|
+
hint?: ReactNode;
|
|
1111
|
+
/** Active drag-over styling (brand border). */
|
|
1112
|
+
dragActive?: boolean;
|
|
1113
|
+
/** Disabled styling + interaction. */
|
|
1114
|
+
disabled?: boolean;
|
|
1115
|
+
}
|
|
1116
|
+
/**
|
|
1117
|
+
* The drop-zone region of a file upload — featured upload icon, click/drag
|
|
1118
|
+
* prompt, and a constraints hint. Wire up the actual file input / drag events
|
|
1119
|
+
* on the consumer side (pass handlers via the standard div props).
|
|
1120
|
+
*/
|
|
1121
|
+
declare function FileUploadBase({ actionText, promptText, hint, dragActive, disabled, className, ...rest }: FileUploadBaseProps): react.JSX.Element;
|
|
1122
|
+
|
|
1123
|
+
type FileUploadItemStatus = "in-progress" | "complete" | "error";
|
|
1124
|
+
type FileUploadItemType = "bar" | "fill";
|
|
1125
|
+
type FileUploadItemIconType = "file-type" | "simple";
|
|
1126
|
+
interface FileUploadItemBaseProps {
|
|
1127
|
+
/** File name. */
|
|
1128
|
+
fileName: ReactNode;
|
|
1129
|
+
/** Size / supporting line (e.g. "20 KB of 200 KB"). */
|
|
1130
|
+
meta?: ReactNode;
|
|
1131
|
+
/** Upload status. */
|
|
1132
|
+
status?: FileUploadItemStatus;
|
|
1133
|
+
/** Progress 0–100 (used when `type="bar"` and not errored). */
|
|
1134
|
+
progress?: number;
|
|
1135
|
+
/** "bar" shows a progress bar row; "fill" fills the row background. */
|
|
1136
|
+
type?: FileUploadItemType;
|
|
1137
|
+
/** File-type badge icon vs a simple file glyph. */
|
|
1138
|
+
iconType?: FileUploadItemIconType;
|
|
1139
|
+
/** Short extension label for the file-type icon (e.g. "PDF"). */
|
|
1140
|
+
fileExt?: string;
|
|
1141
|
+
/** Error message (status="error"). */
|
|
1142
|
+
errorText?: ReactNode;
|
|
1143
|
+
onDelete?: () => void;
|
|
1144
|
+
onRetry?: () => void;
|
|
1145
|
+
className?: string;
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* A single file row in an upload list — file icon, name, status line, progress,
|
|
1149
|
+
* and delete/retry actions. Covers the Figma matrix (bar/fill × file-type/simple
|
|
1150
|
+
* × in-progress/complete/error) via props. The `fill` type renders progress as
|
|
1151
|
+
* a background fill (simplified vs the exact Figma overlay).
|
|
1152
|
+
*/
|
|
1153
|
+
declare function FileUploadItemBase({ fileName, meta, status, progress, type, iconType, fileExt, errorText, onDelete, onRetry, className, }: FileUploadItemBaseProps): react.JSX.Element;
|
|
1154
|
+
|
|
1155
|
+
interface FilterBarProps {
|
|
1156
|
+
/**
|
|
1157
|
+
* Filter controls on the left (compose Select / MultiSelect / etc.).
|
|
1158
|
+
* Covers the Dropdowns and Date filters types.
|
|
1159
|
+
*/
|
|
1160
|
+
filters?: ReactNode;
|
|
1161
|
+
/** Show the date-picker slot in the trailing actions. */
|
|
1162
|
+
withDatePicker?: boolean;
|
|
1163
|
+
/** Date-picker trigger node, rendered when `withDatePicker`. */
|
|
1164
|
+
datePicker?: ReactNode;
|
|
1165
|
+
/** Extra trailing actions (e.g. a "More filters" button, search icon). */
|
|
1166
|
+
actions?: ReactNode;
|
|
1167
|
+
/** When set, renders the "Clear all" button. */
|
|
1168
|
+
onClearAll?: () => void;
|
|
1169
|
+
clearLabel?: ReactNode;
|
|
1170
|
+
className?: string;
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Dropdown-driven filter bar — a row of filter controls with optional trailing
|
|
1174
|
+
* date picker and actions. A layout shell: compose the actual Select/MultiSelect
|
|
1175
|
+
* controls as `filters` and any trigger buttons as `datePicker`/`actions`.
|
|
1176
|
+
* Covers the Figma "Dropdowns", "Dropdowns and date picker" and "Date filters"
|
|
1177
|
+
* types. (The "Simple" type is just a SearchInput — use that directly.)
|
|
1178
|
+
*/
|
|
1179
|
+
declare function FilterBar({ filters, withDatePicker, datePicker, actions, onClearAll, clearLabel, className, }: FilterBarProps): react.JSX.Element;
|
|
1180
|
+
|
|
1181
|
+
interface FilterTabsProps {
|
|
1182
|
+
/** Tab strip on the left (compose your tab buttons / segmented control). */
|
|
1183
|
+
tabs?: ReactNode;
|
|
1184
|
+
/** Search input slot (the "Tabs and search" type). */
|
|
1185
|
+
search?: ReactNode;
|
|
1186
|
+
/** Date-picker trigger slot (the "Tabs and date picker" type). */
|
|
1187
|
+
datePicker?: ReactNode;
|
|
1188
|
+
/** When true, show `datePicker` in the trailing area instead of `search`. */
|
|
1189
|
+
withDatePicker?: boolean;
|
|
1190
|
+
/** Extra trailing actions (e.g. a Filters button). */
|
|
1191
|
+
actions?: ReactNode;
|
|
1192
|
+
className?: string;
|
|
1193
|
+
}
|
|
1194
|
+
/**
|
|
1195
|
+
* Tab-based filter navigation — a tab strip on the left with a trailing search
|
|
1196
|
+
* (or date picker) and optional actions. Layout shell: compose the tab control,
|
|
1197
|
+
* search input, and date picker as slots. Covers the Figma "Tabs and search"
|
|
1198
|
+
* and "Tabs and date picker" types.
|
|
1199
|
+
*/
|
|
1200
|
+
declare function FilterTabs({ tabs, search, datePicker, withDatePicker, actions, className, }: FilterTabsProps): react.JSX.Element;
|
|
1201
|
+
|
|
1202
|
+
interface FiltersDropdownMenuProps {
|
|
1203
|
+
/** Trigger label. */
|
|
1204
|
+
label?: ReactNode;
|
|
1205
|
+
/** Active-filter count — when > 0 the trigger gets the active styling + badge. */
|
|
1206
|
+
count?: number;
|
|
1207
|
+
/** Show the trailing chevron. */
|
|
1208
|
+
chevron?: boolean;
|
|
1209
|
+
disabled?: boolean;
|
|
1210
|
+
/** Whether the panel is open. */
|
|
1211
|
+
open?: boolean;
|
|
1212
|
+
onToggle?: () => void;
|
|
1213
|
+
/** Panel alignment relative to the trigger. */
|
|
1214
|
+
align?: "left" | "right";
|
|
1215
|
+
/** Panel content (the filter list) — compose your own rows. */
|
|
1216
|
+
children?: ReactNode;
|
|
1217
|
+
/** Panel footer (e.g. Reset / Apply). */
|
|
1218
|
+
footer?: ReactNode;
|
|
1219
|
+
className?: string;
|
|
1220
|
+
}
|
|
1221
|
+
/**
|
|
1222
|
+
* A "Filters" dropdown trigger button plus its panel. The trigger covers the
|
|
1223
|
+
* default/hover/focus/disabled/active states (active when `count > 0`); the
|
|
1224
|
+
* open panel content is a slot — compose the filter rows yourself.
|
|
1225
|
+
*/
|
|
1226
|
+
declare function FiltersDropdownMenu({ label, count, chevron, disabled, open, onToggle, align, children, footer, className, }: FiltersDropdownMenuProps): react.JSX.Element;
|
|
1227
|
+
|
|
1228
|
+
interface FiltersSlideoutMenuProps {
|
|
1229
|
+
/** Panel title. */
|
|
1230
|
+
title?: ReactNode;
|
|
1231
|
+
/** Supporting text under the title. */
|
|
1232
|
+
supportingText?: ReactNode;
|
|
1233
|
+
/** Close handler → renders the header close button. */
|
|
1234
|
+
onClose?: () => void;
|
|
1235
|
+
/** Filter body — compose the filter groups (Empty/Inactive/Active states). */
|
|
1236
|
+
children?: ReactNode;
|
|
1237
|
+
/** Footer actions (e.g. Reset / Apply). */
|
|
1238
|
+
footer?: ReactNode;
|
|
1239
|
+
className?: string;
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* A slide-out filter drawer — header (title + close), a scrollable filter body,
|
|
1243
|
+
* and a footer for actions. The body is a slot: compose the empty / inactive /
|
|
1244
|
+
* active filter content yourself. Structural shell (mobile/desktop differ only
|
|
1245
|
+
* in width on the consumer side).
|
|
1246
|
+
*/
|
|
1247
|
+
declare function FiltersSlideoutMenu({ title, supportingText, onClose, children, footer, className, }: FiltersSlideoutMenuProps): react.JSX.Element;
|
|
1248
|
+
|
|
1249
|
+
type HeaderNavigationType = "Simple" | "DualTier" | "Centered" | "Tabs";
|
|
1250
|
+
interface HeaderNavItem {
|
|
1251
|
+
label: ReactNode;
|
|
1252
|
+
href?: string;
|
|
1253
|
+
active?: boolean;
|
|
1254
|
+
onClick?: () => void;
|
|
1255
|
+
}
|
|
1256
|
+
interface HeaderNavigationProps {
|
|
1257
|
+
/** Layout variant. */
|
|
1258
|
+
type?: HeaderNavigationType;
|
|
1259
|
+
/** Brand mark (logo). Defaults to a text wordmark. */
|
|
1260
|
+
logo?: ReactNode;
|
|
1261
|
+
/** Primary navigation items. */
|
|
1262
|
+
items?: HeaderNavItem[];
|
|
1263
|
+
/** Right-aligned actions on desktop (search/settings/notifications/account). */
|
|
1264
|
+
actions?: ReactNode;
|
|
1265
|
+
/** Content shown at the bottom of the open mobile drawer (e.g. an account card). */
|
|
1266
|
+
mobileFooter?: ReactNode;
|
|
1267
|
+
className?: string;
|
|
1268
|
+
}
|
|
1269
|
+
/**
|
|
1270
|
+
* Application header navigation. One component with a `type` prop covering the
|
|
1271
|
+
* Simple / DualTier / Centered / Tabs layouts. Below `md` it collapses to a
|
|
1272
|
+
* logo + hamburger that opens a real (stateful) drawer.
|
|
1273
|
+
*/
|
|
1274
|
+
declare function HeaderNavigation({ type, logo, items, actions, mobileFooter, className, }: HeaderNavigationProps): react.JSX.Element;
|
|
1275
|
+
|
|
1276
|
+
type TooltipArrow = "none" | "topCenter" | "bottomCenter" | "bottomLeft" | "bottomRight" | "left" | "right";
|
|
1277
|
+
interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
1278
|
+
/** Tooltip heading text. */
|
|
1279
|
+
text?: ReactNode;
|
|
1280
|
+
children?: ReactNode;
|
|
1281
|
+
/** Secondary line below the heading. */
|
|
1282
|
+
supportingText?: ReactNode;
|
|
1283
|
+
/** Arrow position relative to the bubble. */
|
|
1284
|
+
arrow?: TooltipArrow;
|
|
1285
|
+
}
|
|
1286
|
+
/**
|
|
1287
|
+
* Presentational tooltip bubble (dark `bg-primary-solid`, white text). `text` is
|
|
1288
|
+
* the heading; `supportingText` adds a second `utility-neutral-300` line (max
|
|
1289
|
+
* 296px). `arrow` positions a small pointer on the bubble edge (rendered as a
|
|
1290
|
+
* rotated square). Positioning relative to a trigger is the caller's job.
|
|
1291
|
+
*/
|
|
1292
|
+
declare function Tooltip({ text, children, supportingText, arrow, className, ...rest }: TooltipProps): react.JSX.Element;
|
|
1293
|
+
|
|
1294
|
+
interface HelpIconProps {
|
|
1295
|
+
/** Tooltip heading text. */
|
|
1296
|
+
text?: ReactNode;
|
|
1297
|
+
/** Optional second tooltip line. */
|
|
1298
|
+
supportingText?: ReactNode;
|
|
1299
|
+
/** Tooltip arrow position (default bottomCenter — tooltip sits above). */
|
|
1300
|
+
arrow?: TooltipArrow;
|
|
1301
|
+
/** Icon box size in px (default 16). */
|
|
1302
|
+
size?: number;
|
|
1303
|
+
className?: string;
|
|
1304
|
+
"aria-label"?: string;
|
|
1305
|
+
}
|
|
1306
|
+
/**
|
|
1307
|
+
* Help "?" icon that reveals a `Tooltip` on hover/focus. A composition (icon
|
|
1308
|
+
* button + `Tooltip`), not a new primitive — the tooltip shows via CSS on
|
|
1309
|
+
* `group-hover`/`focus-within`, positioned above the icon.
|
|
1310
|
+
*/
|
|
1311
|
+
declare function HelpIcon({ text, supportingText, arrow, size, className, "aria-label": ariaLabel, }: HelpIconProps): react.JSX.Element;
|
|
1312
|
+
|
|
1313
|
+
type InputFieldSize = "sm" | "md" | "lg";
|
|
1314
|
+
|
|
1315
|
+
type InputFieldType = "default" | "password" | "date-time" | "payment";
|
|
1316
|
+
interface InputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
|
|
1317
|
+
/** Field variant — drives the native input type and default affordances. */
|
|
1318
|
+
type?: InputFieldType;
|
|
1319
|
+
size?: InputFieldSize;
|
|
1320
|
+
label?: ReactNode;
|
|
1321
|
+
hint?: ReactNode;
|
|
1322
|
+
required?: boolean;
|
|
1323
|
+
destructive?: boolean;
|
|
1324
|
+
/** Leading icon (overrides the per-type default, e.g. payment card). */
|
|
1325
|
+
leadingIcon?: ReactNode;
|
|
1326
|
+
/** Trailing icon (overrides the per-type default). */
|
|
1327
|
+
trailingIcon?: ReactNode;
|
|
1328
|
+
}
|
|
1329
|
+
/**
|
|
1330
|
+
* Standard text input. `type` covers Default / Password / Date-time / Payment —
|
|
1331
|
+
* same structural markup, differing only in the native input type and default
|
|
1332
|
+
* leading/trailing affordance (password eye toggle, date-time calendar, payment
|
|
1333
|
+
* card). Leading/trailing icons can be overridden via slots.
|
|
1334
|
+
*/
|
|
1335
|
+
declare function InputField({ type, size, label, hint, required, destructive, leadingIcon, trailingIcon, className, ...rest }: InputFieldProps): react.JSX.Element;
|
|
1336
|
+
|
|
1337
|
+
interface LeadingInputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> {
|
|
1338
|
+
/**
|
|
1339
|
+
* Left add-on — a text prefix (e.g. "https://") or a leading dropdown.
|
|
1340
|
+
* Covers the Leading text / Leading dropdown types.
|
|
1341
|
+
*/
|
|
1342
|
+
prefix?: ReactNode;
|
|
1343
|
+
size?: InputFieldSize;
|
|
1344
|
+
label?: ReactNode;
|
|
1345
|
+
hint?: ReactNode;
|
|
1346
|
+
required?: boolean;
|
|
1347
|
+
destructive?: boolean;
|
|
1348
|
+
}
|
|
1349
|
+
/** Input with a left add-on (text prefix or dropdown). */
|
|
1350
|
+
declare function LeadingInputField({ prefix, size, label, hint, required, destructive, className, ...rest }: LeadingInputFieldProps): react.JSX.Element;
|
|
1351
|
+
|
|
1352
|
+
type ChartStyle = "line" | "bar";
|
|
1353
|
+
type ChartLegendPosition = "none" | "top" | "right";
|
|
1354
|
+
interface ChartSeries {
|
|
1355
|
+
/** Key into each data row. */
|
|
1356
|
+
dataKey: string;
|
|
1357
|
+
/** Display name (legend/tooltip). Defaults to `dataKey`. */
|
|
1358
|
+
name?: string;
|
|
1359
|
+
/** Override color; defaults to the palette by index. */
|
|
1360
|
+
color?: string;
|
|
1361
|
+
}
|
|
1362
|
+
interface LineAndBarChartProps {
|
|
1363
|
+
data: Record<string, number | string>[];
|
|
1364
|
+
series: ChartSeries[];
|
|
1365
|
+
/** Key for the x-axis category. */
|
|
1366
|
+
xKey: string;
|
|
1367
|
+
type?: ChartStyle;
|
|
1368
|
+
legend?: ChartLegendPosition;
|
|
1369
|
+
axisLabels?: boolean;
|
|
1370
|
+
height?: number;
|
|
1371
|
+
className?: string;
|
|
1372
|
+
/** Tooltip value formatter. */
|
|
1373
|
+
formatValue?: (value: number | string | undefined) => ReactNode;
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Line or bar chart — a themed Recharts wrapper (not a from-scratch renderer).
|
|
1377
|
+
* `series` map to `<Line>`/`<Bar>` colored from the shared palette; `legend`
|
|
1378
|
+
* positions a `ChartLegend` top/right; `axisLabels` toggles the X/Y ticks.
|
|
1379
|
+
* Recharts is an optional peer dependency.
|
|
1380
|
+
*/
|
|
1381
|
+
declare function LineAndBarChart({ data, series, xKey, type, legend, axisLabels, height, className, formatValue, }: LineAndBarChartProps): react.JSX.Element;
|
|
1382
|
+
|
|
1383
|
+
type LinkMessageType = "minimal" | "preview";
|
|
1384
|
+
interface LinkMessageProps {
|
|
1385
|
+
/** `minimal` = link only; `preview` = open-graph image + link. */
|
|
1386
|
+
type?: LinkMessageType;
|
|
1387
|
+
/** The URL (rendered as an underlined link). */
|
|
1388
|
+
url?: string;
|
|
1389
|
+
/** Open-graph image source (preview). */
|
|
1390
|
+
image?: string;
|
|
1391
|
+
/** Optional body text shown above the link. */
|
|
1392
|
+
children?: ReactNode;
|
|
1393
|
+
author?: ReactNode;
|
|
1394
|
+
time?: ReactNode;
|
|
1395
|
+
avatar?: ReactNode;
|
|
1396
|
+
sent?: boolean;
|
|
1397
|
+
reactions?: ReactNode;
|
|
1398
|
+
className?: string;
|
|
1399
|
+
}
|
|
1400
|
+
/** A chat message that unfurls a URL — minimal (link only) or preview (with OG image). */
|
|
1401
|
+
declare function LinkMessage({ type, url, image, children, author, time, avatar, sent, reactions, className, }: LinkMessageProps): react.JSX.Element;
|
|
1402
|
+
|
|
1403
|
+
type LoadingIndicatorStyle = "line-simple" | "line-spinner" | "dot-circle";
|
|
1404
|
+
type LoadingIndicatorSize = "sm" | "md" | "lg" | "xl";
|
|
1405
|
+
interface LoadingIndicatorProps {
|
|
1406
|
+
/** Spinner style. */
|
|
1407
|
+
variant?: LoadingIndicatorStyle;
|
|
1408
|
+
/** Size scale. md = 48px (verified); sm/lg/xl inferred. */
|
|
1409
|
+
size?: LoadingIndicatorSize;
|
|
1410
|
+
/** Optional supporting text below the spinner (e.g. "Loading..."). */
|
|
1411
|
+
label?: ReactNode;
|
|
1412
|
+
className?: string;
|
|
1413
|
+
}
|
|
1414
|
+
/**
|
|
1415
|
+
* Spinner / loading indicator. `line-simple` and `line-spinner` are stroked
|
|
1416
|
+
* rings (spinner uses a round cap); `dot-circle` is a ring of fading dots.
|
|
1417
|
+
* Rendered with CSS animation rather than the Figma image asset.
|
|
1418
|
+
*/
|
|
1419
|
+
declare function LoadingIndicator({ variant, size, label, className, }: LoadingIndicatorProps): react.JSX.Element;
|
|
1420
|
+
|
|
1421
|
+
type MediaMessageType = "file" | "audio" | "video" | "image";
|
|
1422
|
+
interface MediaMessageProps {
|
|
1423
|
+
/** Attachment kind. */
|
|
1424
|
+
type?: MediaMessageType;
|
|
1425
|
+
/** File name (file/audio/video). */
|
|
1426
|
+
fileName?: ReactNode;
|
|
1427
|
+
/** Supporting line — size / duration. */
|
|
1428
|
+
meta?: ReactNode;
|
|
1429
|
+
/** Short extension label for the file-type icon (file type). */
|
|
1430
|
+
fileExt?: string;
|
|
1431
|
+
/** Image/video poster source. */
|
|
1432
|
+
src?: string;
|
|
1433
|
+
author?: ReactNode;
|
|
1434
|
+
time?: ReactNode;
|
|
1435
|
+
avatar?: ReactNode;
|
|
1436
|
+
sent?: boolean;
|
|
1437
|
+
reactions?: ReactNode;
|
|
1438
|
+
className?: string;
|
|
1439
|
+
}
|
|
1440
|
+
/** A chat message carrying an attachment — file, audio, video, or image. */
|
|
1441
|
+
declare function MediaMessage({ type, fileName, meta, fileExt, src, author, time, avatar, sent, reactions, className, }: MediaMessageProps): react.JSX.Element;
|
|
1442
|
+
|
|
1443
|
+
type MegaInputFieldBaseSize = "sm" | "md" | "lg";
|
|
1444
|
+
interface MegaInputFieldBaseProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
1445
|
+
size?: MegaInputFieldBaseSize;
|
|
1446
|
+
/** Error styling. */
|
|
1447
|
+
destructive?: boolean;
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* A single large character/code-entry cell (one digit per box) used to compose
|
|
1451
|
+
* OTP / verification inputs. `Size` (sm/md/lg) × states (placeholder/focused/
|
|
1452
|
+
* filled/disabled/error) — focus & fill are native; pass `destructive` for error.
|
|
1453
|
+
*/
|
|
1454
|
+
declare function MegaInputFieldBase({ size, destructive, disabled, className, ...rest }: MegaInputFieldBaseProps): react.JSX.Element;
|
|
1455
|
+
|
|
1456
|
+
type MessageType = "message" | "reply" | "writing";
|
|
1457
|
+
interface MessageProps {
|
|
1458
|
+
/** Bubble variant. */
|
|
1459
|
+
type?: MessageType;
|
|
1460
|
+
/** Message body text. */
|
|
1461
|
+
children?: ReactNode;
|
|
1462
|
+
/** Quoted text shown above the body for `type="reply"`. */
|
|
1463
|
+
replyTo?: ReactNode;
|
|
1464
|
+
author?: ReactNode;
|
|
1465
|
+
time?: ReactNode;
|
|
1466
|
+
avatar?: ReactNode;
|
|
1467
|
+
sent?: boolean;
|
|
1468
|
+
/** Reaction chips (compose MessageReaction). */
|
|
1469
|
+
reactions?: ReactNode;
|
|
1470
|
+
className?: string;
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* A text chat bubble. `type` covers a plain message, a reply (with a quoted
|
|
1474
|
+
* line), and the writing/typing indicator. Use `sent` for own messages
|
|
1475
|
+
* (right-aligned, brand bubble).
|
|
1476
|
+
*/
|
|
1477
|
+
declare function Message({ type, children, replyTo, author, time, avatar, sent, reactions, className, }: MessageProps): react.JSX.Element;
|
|
1478
|
+
|
|
1479
|
+
type MessageBubbleTone = "secondary" | "white" | "brand";
|
|
1480
|
+
|
|
1481
|
+
type MessageActionType = "minimal" | "textarea" | "advanced";
|
|
1482
|
+
interface MessageActionProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
1483
|
+
/** minimal = single-line + send · textarea = multiline composer · advanced = AI prompt box */
|
|
1484
|
+
type?: MessageActionType;
|
|
1485
|
+
/** Controlled value of the input/textarea. */
|
|
1486
|
+
value?: string;
|
|
1487
|
+
onValueChange?: (value: string) => void;
|
|
1488
|
+
/** Fired when the send affordance is activated. */
|
|
1489
|
+
onSend?: () => void;
|
|
1490
|
+
placeholder?: string;
|
|
1491
|
+
/** Advanced only — left-side author chip (avatar + name). */
|
|
1492
|
+
author?: ReactNode;
|
|
1493
|
+
textareaProps?: TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
1494
|
+
}
|
|
1495
|
+
/**
|
|
1496
|
+
* Message composer. Three layouts off `type`:
|
|
1497
|
+
* - **minimal** — single-line field + square send button (row).
|
|
1498
|
+
* - **textarea** — multiline box, attach/emoji + brand Send pinned bottom-right,
|
|
1499
|
+
* record button top-right.
|
|
1500
|
+
* - **advanced** — AI prompt box on `bg-secondary`; author chip + Shortcuts/Attach
|
|
1501
|
+
* footer, mic top-right, resize handle.
|
|
1502
|
+
*
|
|
1503
|
+
* Renders real `<input>`/`<textarea>` (controlled via `value`/`onValueChange`);
|
|
1504
|
+
* icons are inline SVG so the package ships no remote asset deps.
|
|
1505
|
+
*/
|
|
1506
|
+
declare function MessageAction({ type, value, onValueChange, onSend, placeholder, author, textareaProps, className, ...rest }: MessageActionProps): react.JSX.Element;
|
|
1507
|
+
|
|
1508
|
+
interface MessageActionButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1509
|
+
/** Icon glyph (16px). Use `currentColor` so the button can tint it. */
|
|
1510
|
+
icon: ReactNode;
|
|
1511
|
+
}
|
|
1512
|
+
/**
|
|
1513
|
+
* Single icon button used inside `MessageActionPanel` (the hover toolbar over a
|
|
1514
|
+
* message). Sits on the dark panel surface — icon is light, hover lifts it to
|
|
1515
|
+
* full white with a translucent backdrop. `rounded-xs` / `p-xxs` per Figma.
|
|
1516
|
+
*/
|
|
1517
|
+
declare function MessageActionButton({ icon, className, type, ...rest }: MessageActionButtonProps): react.JSX.Element;
|
|
1518
|
+
|
|
1519
|
+
interface MessageActionPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
1520
|
+
/** Action buttons — compose `MessageActionButton` elements here. */
|
|
1521
|
+
children: ReactNode;
|
|
1522
|
+
}
|
|
1523
|
+
/**
|
|
1524
|
+
* Floating dark toolbar that appears over a message on hover. Holds a row of
|
|
1525
|
+
* `MessageActionButton`s (react / reply / regenerate / copy …). Composition
|
|
1526
|
+
* shell only — the buttons are supplied as children, not reimplemented here.
|
|
1527
|
+
*
|
|
1528
|
+
* Surface uses `bg-bg-primary-solid` (#0a0a0a) for the dark floating panel;
|
|
1529
|
+
* Figma's `bg-primary_alt` dark value is #171717 (token gap — see figma-map
|
|
1530
|
+
* Pending token verification). `shadow-xl` is the Tailwind-default approximation
|
|
1531
|
+
* of Figma's 3-layer xl stack.
|
|
1532
|
+
*/
|
|
1533
|
+
declare function MessageActionPanel({ children, className, ...rest }: MessageActionPanelProps): react.JSX.Element;
|
|
1534
|
+
|
|
1535
|
+
interface MessageReactionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1536
|
+
/** Emoji glyph (defaults to a heart). */
|
|
1537
|
+
emoji?: ReactNode;
|
|
1538
|
+
/** Reaction count — hidden when undefined. */
|
|
1539
|
+
count?: number;
|
|
1540
|
+
}
|
|
1541
|
+
/** A pill reaction chip shown under a chat message. */
|
|
1542
|
+
declare function MessageReaction({ emoji, count, className, ...rest }: MessageReactionProps): react.JSX.Element;
|
|
1543
|
+
|
|
1544
|
+
type MessageStatus = "unread" | "read" | "failed";
|
|
1545
|
+
interface MessageStatusIconProps {
|
|
1546
|
+
/** Delivery status. */
|
|
1547
|
+
status?: MessageStatus;
|
|
1548
|
+
/** Tooltip shown on hover (e.g. "Read 2:20 PM"). */
|
|
1549
|
+
tooltip?: ReactNode;
|
|
1550
|
+
className?: string;
|
|
1551
|
+
}
|
|
1552
|
+
/**
|
|
1553
|
+
* Delivery status glyph for a sent message — single check (unread), double
|
|
1554
|
+
* check (read, brand), or an error circle (failed). Optional hover tooltip.
|
|
1555
|
+
*/
|
|
1556
|
+
declare function MessageStatusIcon({ status, tooltip, className, }: MessageStatusIconProps): react.JSX.Element;
|
|
1557
|
+
|
|
1558
|
+
interface MetricItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
1559
|
+
/** Metric title, e.g. "Views 24 hours". */
|
|
1560
|
+
label: ReactNode;
|
|
1561
|
+
/** Big number, e.g. "2,000". Rendered in display-sm. */
|
|
1562
|
+
value: ReactNode;
|
|
1563
|
+
/** Trend chip — compose a `Change` element here. */
|
|
1564
|
+
change?: ReactNode;
|
|
1565
|
+
/** Caption beside the change, e.g. "vs last month" (chart layout only). */
|
|
1566
|
+
changeText?: ReactNode;
|
|
1567
|
+
/** Featured-icon slot, rendered top-left (consumer supplies the badge). */
|
|
1568
|
+
icon?: ReactNode;
|
|
1569
|
+
/** Sparkline slot, rendered right of the number (e.g. a Recharts chart). */
|
|
1570
|
+
chart?: ReactNode;
|
|
1571
|
+
/** Footer action, e.g. a "View report" button — renders a divided footer. */
|
|
1572
|
+
action?: ReactNode;
|
|
1573
|
+
/** Top-right options (dots) button — rendered only when handler is given. */
|
|
1574
|
+
onMenuClick?: () => void;
|
|
1575
|
+
}
|
|
1576
|
+
/**
|
|
1577
|
+
* Metric / stat card. One component covering the Figma Simple / Icon / Chart
|
|
1578
|
+
* types via optional slots:
|
|
1579
|
+
* - bare → Simple (label + value + inline `change`).
|
|
1580
|
+
* - `icon` → Icon (featured-icon badge on top).
|
|
1581
|
+
* - `chart` → Chart (value + change/`changeText` left, sparkline right).
|
|
1582
|
+
* - `action` → divided footer with the action node.
|
|
1583
|
+
* - `onMenuClick` → dots-vertical button top-right.
|
|
1584
|
+
*
|
|
1585
|
+
* `icon` and `chart` are ReactNode slots, so the missing Figma "Featured icons"
|
|
1586
|
+
* family and the deferred `_ChartMini` (Recharts) are non-blocking — consumers
|
|
1587
|
+
* fill them. Note: Figma's Chart variant uses a text-md/semibold label; this
|
|
1588
|
+
* component standardises on text-sm/medium for all types (see figma-map).
|
|
1589
|
+
*/
|
|
1590
|
+
declare function MetricItem({ label, value, change, changeText, icon, chart, action, onMenuClick, className, ...rest }: MetricItemProps): react.JSX.Element;
|
|
1591
|
+
|
|
1592
|
+
type ModalActionsType = "horizontal-fill" | "vertical-fill" | "right-aligned";
|
|
1593
|
+
interface ModalActionsProps extends HTMLAttributes<HTMLDivElement> {
|
|
1594
|
+
/**
|
|
1595
|
+
* - `horizontal-fill` — buttons share the row, each flex-1.
|
|
1596
|
+
* - `vertical-fill` — buttons stacked full-width.
|
|
1597
|
+
* - `right-aligned` — `leading` on the left, buttons pushed right.
|
|
1598
|
+
*/
|
|
1599
|
+
type?: ModalActionsType;
|
|
1600
|
+
/** Top divider separating actions from the modal body. */
|
|
1601
|
+
divider?: boolean;
|
|
1602
|
+
/** Left-side content for `right-aligned` (e.g. a checkbox / tertiary button). */
|
|
1603
|
+
leading?: ReactNode;
|
|
1604
|
+
/** The action buttons — compose `Button` / `ButtonDestructive` here. */
|
|
1605
|
+
children: ReactNode;
|
|
1606
|
+
}
|
|
1607
|
+
/**
|
|
1608
|
+
* Modal footer button row. Layout shell only — buttons are supplied as children
|
|
1609
|
+
* (composed from the library's Button components), laid out per `type`. Fill
|
|
1610
|
+
* variants stretch their children; `right-aligned` pairs a `leading` slot with
|
|
1611
|
+
* the right-pushed actions.
|
|
1612
|
+
*/
|
|
1613
|
+
declare function ModalActions({ type, divider, leading, children, className, ...rest }: ModalActionsProps): react.JSX.Element;
|
|
1614
|
+
|
|
1615
|
+
type ModalHeaderType = "left" | "center" | "horizontal";
|
|
1616
|
+
interface ModalHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
1617
|
+
title: ReactNode;
|
|
1618
|
+
description?: ReactNode;
|
|
1619
|
+
/** Featured-icon glyph, rendered inside a 40px boxed badge. */
|
|
1620
|
+
icon?: ReactNode;
|
|
1621
|
+
/**
|
|
1622
|
+
* - `left` — icon on top, text left-aligned.
|
|
1623
|
+
* - `center` — icon on top, text centred.
|
|
1624
|
+
* - `horizontal` — icon to the left of the text.
|
|
1625
|
+
*/
|
|
1626
|
+
type?: ModalHeaderType;
|
|
1627
|
+
/** Bottom divider separating the header from the modal body. */
|
|
1628
|
+
divider?: boolean;
|
|
1629
|
+
/** Renders an x-close button top-right when provided. */
|
|
1630
|
+
onClose?: () => void;
|
|
1631
|
+
}
|
|
1632
|
+
/**
|
|
1633
|
+
* Modal header — featured-icon badge + title + supporting text, with an optional
|
|
1634
|
+
* x-close button and bottom divider. `type` controls alignment (left / centred /
|
|
1635
|
+
* icon-beside-text). The `icon` is a slot; consumer supplies the glyph.
|
|
1636
|
+
*/
|
|
1637
|
+
declare function ModalHeader({ title, description, icon, type, divider, onClose, className, ...rest }: ModalHeaderProps): react.JSX.Element;
|
|
1638
|
+
|
|
1639
|
+
interface MultiSelectOption {
|
|
1640
|
+
value: string;
|
|
1641
|
+
label: string;
|
|
1642
|
+
supportingText?: ReactNode;
|
|
1643
|
+
}
|
|
1644
|
+
interface MultiSelectProps {
|
|
1645
|
+
options: MultiSelectOption[];
|
|
1646
|
+
value?: string[];
|
|
1647
|
+
onChange?: (value: string[]) => void;
|
|
1648
|
+
open?: boolean;
|
|
1649
|
+
onToggle?: () => void;
|
|
1650
|
+
label?: ReactNode;
|
|
1651
|
+
hint?: ReactNode;
|
|
1652
|
+
placeholder?: string;
|
|
1653
|
+
/** Show the in-trigger search input (default true). */
|
|
1654
|
+
searchable?: boolean;
|
|
1655
|
+
disabled?: boolean;
|
|
1656
|
+
invalid?: boolean;
|
|
1657
|
+
className?: string;
|
|
1658
|
+
}
|
|
1659
|
+
/**
|
|
1660
|
+
* Multi-select — trigger with selected-item `Tag` chips + a search input, over a
|
|
1661
|
+
* shared dropdown of `SelectMenuItem` (`multi`) options with a search empty
|
|
1662
|
+
* state. Composes the Select-family primitives rather than reimplementing a
|
|
1663
|
+
* dropdown. Controlled: `value`/`onChange` (selection) and `open`/`onToggle`.
|
|
1664
|
+
*/
|
|
1665
|
+
declare function MultiSelect({ options, value, onChange, open, onToggle, label, hint, placeholder, searchable, disabled, invalid, className, }: MultiSelectProps): react.JSX.Element;
|
|
1666
|
+
|
|
1667
|
+
type NavAccountCardVariant = "simple" | "card";
|
|
1668
|
+
interface NavAccountCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
1669
|
+
/** `simple` = inline row + sign-out button · `card` = boxed trigger that opens a menu. */
|
|
1670
|
+
variant?: NavAccountCardVariant;
|
|
1671
|
+
/** card only — whether the dropdown menu is shown. */
|
|
1672
|
+
open?: boolean;
|
|
1673
|
+
avatar?: ReactNode;
|
|
1674
|
+
name?: ReactNode;
|
|
1675
|
+
email?: ReactNode;
|
|
1676
|
+
/** card only — toggles the dropdown (fires on trigger click). */
|
|
1677
|
+
onToggle?: () => void;
|
|
1678
|
+
/** simple only — sign-out button handler. */
|
|
1679
|
+
onSignOut?: () => void;
|
|
1680
|
+
/**
|
|
1681
|
+
* card + open — dropdown content. Compose `NavAccountCardMenuItem` rows,
|
|
1682
|
+
* dividers and an add-account / sign-out footer here.
|
|
1683
|
+
*/
|
|
1684
|
+
menu?: ReactNode;
|
|
1685
|
+
}
|
|
1686
|
+
/**
|
|
1687
|
+
* Account switcher for the bottom of a sidebar. `simple` renders an inline row
|
|
1688
|
+
* with a sign-out button; `card` renders a boxed trigger that, when `open`,
|
|
1689
|
+
* reveals a dropdown (the `menu` slot — compose `NavAccountCardMenuItem` rows).
|
|
1690
|
+
*
|
|
1691
|
+
* The active account is marked with `bg-brand-solid` (the radio inside the
|
|
1692
|
+
* account menu items). Note: Figma opens the desktop menu as a right-side
|
|
1693
|
+
* flyout; this opens it above the trigger (`bottom-full`) — a layout
|
|
1694
|
+
* simplification (see figma-map). Width defaults to 280px; override via
|
|
1695
|
+
* `className` for mobile (256px).
|
|
1696
|
+
*/
|
|
1697
|
+
declare function NavAccountCard({ variant, open, avatar, name, email, onToggle, onSignOut, menu, className, ...rest }: NavAccountCardProps): react.JSX.Element;
|
|
1698
|
+
|
|
1699
|
+
type NavAccountCardMenuItemType = "menu-item" | "account";
|
|
1700
|
+
interface NavAccountCardMenuItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "name" | "type"> {
|
|
1701
|
+
/** `menu-item` = icon + label (+ shortcut) · `account` = avatar + name/email + radio. */
|
|
1702
|
+
type?: NavAccountCardMenuItemType;
|
|
1703
|
+
/** Marks the row as the active account / current item (radio filled, hover bg). */
|
|
1704
|
+
current?: boolean;
|
|
1705
|
+
/** menu-item: leading icon (20px). */
|
|
1706
|
+
icon?: ReactNode;
|
|
1707
|
+
/** menu-item: row label. */
|
|
1708
|
+
label?: ReactNode;
|
|
1709
|
+
/** menu-item: trailing keyboard-shortcut chip. */
|
|
1710
|
+
shortcut?: ReactNode;
|
|
1711
|
+
/** account: avatar slot (40px). */
|
|
1712
|
+
avatar?: ReactNode;
|
|
1713
|
+
/** account: display name. */
|
|
1714
|
+
name?: ReactNode;
|
|
1715
|
+
/** account: secondary line (email). */
|
|
1716
|
+
email?: ReactNode;
|
|
1717
|
+
}
|
|
1718
|
+
/**
|
|
1719
|
+
* A single row inside `NavAccountCard`'s dropdown. Two shapes:
|
|
1720
|
+
* - `menu-item` — icon + label + optional shortcut chip (View profile, Settings…).
|
|
1721
|
+
* - `account` — avatar + name/email with a radio indicator; `current` fills the
|
|
1722
|
+
* radio with `bg-brand-solid` (the active-account marker).
|
|
1723
|
+
*/
|
|
1724
|
+
declare function NavAccountCardMenuItem({ type, current, icon, label, shortcut, avatar, name, email, className, ...rest }: NavAccountCardMenuItemProps): react.JSX.Element;
|
|
1725
|
+
|
|
1726
|
+
interface NavButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
1727
|
+
/** Active route — applies the selected (`bg-secondary`) background. */
|
|
1728
|
+
current?: boolean;
|
|
1729
|
+
/** Render only the leading icon (square button). */
|
|
1730
|
+
iconOnly?: boolean;
|
|
1731
|
+
/** Leading icon (20px). */
|
|
1732
|
+
icon?: ReactNode;
|
|
1733
|
+
/** Label text (hidden when `iconOnly`). */
|
|
1734
|
+
children?: ReactNode;
|
|
1735
|
+
}
|
|
1736
|
+
/**
|
|
1737
|
+
* Header-nav button (the horizontal top-bar variant, distinct from the sidebar
|
|
1738
|
+
* `NavItemBase`). Pill shape; `current` marks the active route. Focus ring uses
|
|
1739
|
+
* the brand focus colour.
|
|
1740
|
+
*/
|
|
1741
|
+
declare function NavButton({ current, iconOnly, icon, children, className, type, ...rest }: NavButtonProps): react.JSX.Element;
|
|
1742
|
+
|
|
1743
|
+
interface NavFeaturedCardProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
1744
|
+
/** Featured-icon / media slot rendered at the top. */
|
|
1745
|
+
icon?: ReactNode;
|
|
1746
|
+
title?: ReactNode;
|
|
1747
|
+
subtitle?: ReactNode;
|
|
1748
|
+
/** Body content — progress bar, list, QR code, input, etc. */
|
|
1749
|
+
children?: ReactNode;
|
|
1750
|
+
/** CTA row — compose Button(s) / link buttons. */
|
|
1751
|
+
action?: ReactNode;
|
|
1752
|
+
/** Bordered surface (`bg-primary` + border) vs subtle (`bg-secondary`). */
|
|
1753
|
+
bordered?: boolean;
|
|
1754
|
+
/** Renders an x-close button top-right. */
|
|
1755
|
+
onClose?: () => void;
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Featured card for the bottom of a sidebar — a generic shell, not 13 variants.
|
|
1759
|
+
* The Figma `Type` set (Progress bar, Upgrade CTA, Message, Current projects,
|
|
1760
|
+
* QR code, …) is expressed by filling the slots: `icon` / `title` / `subtitle`
|
|
1761
|
+
* for the header, `children` for the body (progress bar, list, QR, input…), and
|
|
1762
|
+
* `action` for the CTA row. See the stories for the 12 type recipes.
|
|
1763
|
+
*/
|
|
1764
|
+
declare function NavFeaturedCard({ icon, title, subtitle, children, action, bordered, onClose, className, ...rest }: NavFeaturedCardProps): react.JSX.Element;
|
|
1765
|
+
|
|
1766
|
+
interface NavItemBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
1767
|
+
/** Active route — selected (`bg-secondary`) background. */
|
|
1768
|
+
current?: boolean;
|
|
1769
|
+
/** Leading icon (20px). */
|
|
1770
|
+
icon?: ReactNode;
|
|
1771
|
+
label?: ReactNode;
|
|
1772
|
+
/** Leading status dot (8px, success green). */
|
|
1773
|
+
dot?: boolean;
|
|
1774
|
+
/** Trailing count badge — pass a number/string. */
|
|
1775
|
+
badge?: ReactNode;
|
|
1776
|
+
/** Trailing chevron (for expandable groups). */
|
|
1777
|
+
trailingChevron?: boolean;
|
|
1778
|
+
}
|
|
1779
|
+
/**
|
|
1780
|
+
* Base sidebar nav link (272px). `current` selects it; optional leading `dot`,
|
|
1781
|
+
* leading `icon`, trailing count `badge`, and `trailingChevron`. Brand focus ring.
|
|
1782
|
+
*/
|
|
1783
|
+
declare function NavItemBase({ current, icon, label, dot, badge, trailingChevron, className, type, ...rest }: NavItemBaseProps): react.JSX.Element;
|
|
1784
|
+
|
|
1785
|
+
interface NavItemDropdownBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
1786
|
+
/** Active group — selected (`bg-secondary`) background on the trigger. */
|
|
1787
|
+
current?: boolean;
|
|
1788
|
+
/** Expanded state — reveals the submenu. */
|
|
1789
|
+
open?: boolean;
|
|
1790
|
+
/** Trigger icon (20px). */
|
|
1791
|
+
icon?: ReactNode;
|
|
1792
|
+
label?: ReactNode;
|
|
1793
|
+
/** Toggles open/closed. */
|
|
1794
|
+
onToggle?: () => void;
|
|
1795
|
+
/** Submenu rows (rendered when `open`) — compose indented `NavItemBase`s. */
|
|
1796
|
+
children?: ReactNode;
|
|
1797
|
+
}
|
|
1798
|
+
/**
|
|
1799
|
+
* Expandable sidebar nav group (272px). The trigger mirrors `NavItemBase`; when
|
|
1800
|
+
* `open`, `children` (indented submenu rows) render below with a chevron flip.
|
|
1801
|
+
*/
|
|
1802
|
+
declare function NavItemDropdownBase({ current, open, icon, label, onToggle, children, className, type, ...rest }: NavItemDropdownBaseProps): react.JSX.Element;
|
|
1803
|
+
|
|
1804
|
+
interface NavMenuButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1805
|
+
/** Open state — swaps the hamburger for an x-close icon. */
|
|
1806
|
+
opened?: boolean;
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* Hamburger / collapse toggle for the mobile header & sidebar. Shows the
|
|
1810
|
+
* hamburger when closed, an x-close (dimmed) when `opened`. Brand focus ring.
|
|
1811
|
+
*/
|
|
1812
|
+
declare function NavMenuButton({ opened, className, type, ...rest }: NavMenuButtonProps): react.JSX.Element;
|
|
1813
|
+
|
|
1814
|
+
type NotificationVariant = "default" | "success" | "warning" | "error" | "gray";
|
|
1815
|
+
interface NotificationProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
1816
|
+
/** Colours the default featured-icon ring (ignored if `leadingMedia` set). */
|
|
1817
|
+
variant?: NotificationVariant;
|
|
1818
|
+
title: ReactNode;
|
|
1819
|
+
description?: ReactNode;
|
|
1820
|
+
/** Left media slot (icon / avatar / progress). Overrides the default ring icon. */
|
|
1821
|
+
leadingMedia?: ReactNode;
|
|
1822
|
+
/** Full-bleed image (the "Image" type) rendered below the text. */
|
|
1823
|
+
imageUrl?: string;
|
|
1824
|
+
/** Action row — compose link/text buttons. */
|
|
1825
|
+
actions?: ReactNode;
|
|
1826
|
+
/** Renders an x-close button top-right. */
|
|
1827
|
+
onDismiss?: () => void;
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* Toast / inline notification. One component: `variant` colours the default
|
|
1831
|
+
* featured-icon ring; `leadingMedia` overrides it with any node (avatar, custom
|
|
1832
|
+
* icon, progress). `imageUrl` adds the full-bleed image type, `actions` the CTA
|
|
1833
|
+
* row, `onDismiss` the x-close. `shadow-lg` approximates Figma's 3-layer lg.
|
|
1834
|
+
*/
|
|
1835
|
+
declare function Notification({ variant, title, description, leadingMedia, imageUrl, actions, onDismiss, className, ...rest }: NotificationProps): react.JSX.Element;
|
|
1836
|
+
|
|
1837
|
+
type NumberInputLayout = "horizontal" | "vertical";
|
|
1838
|
+
interface NumberInputProps {
|
|
1839
|
+
layout?: NumberInputLayout;
|
|
1840
|
+
value?: number;
|
|
1841
|
+
onChange?: (value: number) => void;
|
|
1842
|
+
min?: number;
|
|
1843
|
+
max?: number;
|
|
1844
|
+
step?: number;
|
|
1845
|
+
label?: ReactNode;
|
|
1846
|
+
hint?: ReactNode;
|
|
1847
|
+
required?: boolean;
|
|
1848
|
+
destructive?: boolean;
|
|
1849
|
+
disabled?: boolean;
|
|
1850
|
+
className?: string;
|
|
1851
|
+
"aria-label"?: string;
|
|
1852
|
+
}
|
|
1853
|
+
/**
|
|
1854
|
+
* Standalone numeric counter (NOT an `InputField` type). `horizontal` flanks the
|
|
1855
|
+
* value with −/+ buttons; `vertical` stacks up/down chevrons on the right. Reuses
|
|
1856
|
+
* the input family's `FieldWrapper` + `boxClasses`. Controlled via
|
|
1857
|
+
* `value`/`onChange`, clamped to `min`/`max` by `step`.
|
|
1858
|
+
*/
|
|
1859
|
+
declare function NumberInput({ layout, value, onChange, min, max, step, label, hint, required, destructive, disabled, className, "aria-label": ariaLabel, }: NumberInputProps): react.JSX.Element;
|
|
1860
|
+
|
|
1861
|
+
type PageHeaderStyle = "simple" | "avatar" | "bannerAvatar" | "bannerAvatarCentered" | "bannerSimpleCentered" | "bannerSimple";
|
|
1862
|
+
interface PageHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "style"> {
|
|
1863
|
+
style?: PageHeaderStyle;
|
|
1864
|
+
title: ReactNode;
|
|
1865
|
+
description?: ReactNode;
|
|
1866
|
+
/** Avatar / featured visual (avatar styles). */
|
|
1867
|
+
avatar?: ReactNode;
|
|
1868
|
+
/** Trailing actions row (buttons). */
|
|
1869
|
+
actions?: ReactNode;
|
|
1870
|
+
/** Optional breadcrumbs slot above the title. */
|
|
1871
|
+
breadcrumbs?: ReactNode;
|
|
1872
|
+
/** Banner background image (banner styles); falls back to `bg-tertiary`. */
|
|
1873
|
+
bannerUrl?: string;
|
|
1874
|
+
}
|
|
1875
|
+
/**
|
|
1876
|
+
* Page header — one component over the 6 Figma `Style`s. `banner*` styles render
|
|
1877
|
+
* a banner strip the content overlaps; `*Centered` styles centre the text;
|
|
1878
|
+
* `avatar` styles show the `avatar` slot. Breakpoint handled with Tailwind
|
|
1879
|
+
* responsive prefixes. Constrained to `container-max-width-desktop` (1280) with
|
|
1880
|
+
* container padding.
|
|
1881
|
+
*/
|
|
1882
|
+
declare function PageHeader({ style, title, description, avatar, actions, breadcrumbs, bannerUrl, className, ...rest }: PageHeaderProps): react.JSX.Element;
|
|
1883
|
+
|
|
1884
|
+
type PaginationNumberShape = "square" | "circle";
|
|
1885
|
+
interface PaginationNumberBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
1886
|
+
shape?: PaginationNumberShape;
|
|
1887
|
+
/** Active/current page — applies the selected background + text colour. */
|
|
1888
|
+
active?: boolean;
|
|
1889
|
+
children: ReactNode;
|
|
1890
|
+
}
|
|
1891
|
+
/**
|
|
1892
|
+
* Single 36px page-number cell. `shape` square (rounded-md) or circle (full);
|
|
1893
|
+
* `active` (current page) uses the hover bg + darker text. Brand focus ring.
|
|
1894
|
+
*/
|
|
1895
|
+
declare function PaginationNumberBase({ shape, active, children, className, type, ...rest }: PaginationNumberBaseProps): react.JSX.Element;
|
|
1896
|
+
|
|
1897
|
+
type PaginationType = "default" | "minimal" | "buttonGroup";
|
|
1898
|
+
interface PaginationProps extends HTMLAttributes<HTMLDivElement> {
|
|
1899
|
+
/** 1-based current page. */
|
|
1900
|
+
page: number;
|
|
1901
|
+
/** Total page count. */
|
|
1902
|
+
total: number;
|
|
1903
|
+
onPageChange?: (page: number) => void;
|
|
1904
|
+
/** default = Prev / numbers / Next · minimal = Prev / "Page x of y" / Next · buttonGroup = bordered group. */
|
|
1905
|
+
type?: PaginationType;
|
|
1906
|
+
/** Number-cell shape (default/minimal). */
|
|
1907
|
+
shape?: PaginationNumberShape;
|
|
1908
|
+
/** Max page cells before collapsing the middle with ellipsis. Default 7. */
|
|
1909
|
+
maxVisible?: number;
|
|
1910
|
+
}
|
|
1911
|
+
/**
|
|
1912
|
+
* Number/button-based pagination. `default` = Previous · number cells · Next;
|
|
1913
|
+
* `minimal` = Previous · "Page x of y" · Next; `buttonGroup` = a bordered
|
|
1914
|
+
* connected group. Composes `PaginationNumberBase` + `PaginationButtonGroupBase`.
|
|
1915
|
+
* Collapses the middle with ellipsis past `maxVisible` (always shows first/last
|
|
1916
|
+
* + current±2).
|
|
1917
|
+
*/
|
|
1918
|
+
declare function Pagination({ page, total, onPageChange, type, shape, maxVisible, className, ...rest }: PaginationProps): react.JSX.Element;
|
|
1919
|
+
|
|
1920
|
+
type PaginationButtonGroupType = "number" | "leadingIcon" | "trailingIcon" | "iconOnly";
|
|
1921
|
+
interface PaginationButtonGroupBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "children"> {
|
|
1922
|
+
/** number cell · leading/trailing icon+label · icon-only arrow. */
|
|
1923
|
+
cellType?: PaginationButtonGroupType;
|
|
1924
|
+
/** Active/current cell — applies the hover background + darker text. */
|
|
1925
|
+
active?: boolean;
|
|
1926
|
+
/** Number or label text. */
|
|
1927
|
+
children?: ReactNode;
|
|
1928
|
+
/** Override the default arrow glyph. */
|
|
1929
|
+
icon?: ReactNode;
|
|
1930
|
+
}
|
|
1931
|
+
/**
|
|
1932
|
+
* One cell of a button-group pagination bar (the bordered Page/Card-button-group
|
|
1933
|
+
* style). `cellType` picks number / leading-icon (Previous) / trailing-icon
|
|
1934
|
+
* (Next) / icon-only. Carries a right divider; `active` highlights it.
|
|
1935
|
+
*/
|
|
1936
|
+
declare function PaginationButtonGroupBase({ cellType, active, children, icon, className, ...rest }: PaginationButtonGroupBaseProps): react.JSX.Element;
|
|
1937
|
+
|
|
1938
|
+
type PaginationCardsVariant = "default" | "minimal" | "advanced";
|
|
1939
|
+
interface PaginationCardsProps extends HTMLAttributes<HTMLDivElement> {
|
|
1940
|
+
page: number;
|
|
1941
|
+
total: number;
|
|
1942
|
+
onPageChange?: (page: number) => void;
|
|
1943
|
+
/** default = arrows + dots · minimal = dots + "Page x of y" · advanced = bordered card. */
|
|
1944
|
+
variant?: PaginationCardsVariant;
|
|
1945
|
+
}
|
|
1946
|
+
/**
|
|
1947
|
+
* Card/dot-based pagination. `default` = arrow buttons flanking a dot pager;
|
|
1948
|
+
* `minimal` = dots + "Page x of y"; `advanced` = the same in a bordered card.
|
|
1949
|
+
* Composes `PaginationDotGroup`.
|
|
1950
|
+
*/
|
|
1951
|
+
declare function PaginationCards({ page, total, onPageChange, variant, className, ...rest }: PaginationCardsProps): react.JSX.Element;
|
|
1952
|
+
|
|
1953
|
+
type PaginationDotSize = "md" | "lg";
|
|
1954
|
+
type PaginationDotVariant = "dot" | "line";
|
|
1955
|
+
interface PaginationDotIndicatorProps extends HTMLAttributes<HTMLDivElement> {
|
|
1956
|
+
current?: boolean;
|
|
1957
|
+
size?: PaginationDotSize;
|
|
1958
|
+
variant?: PaginationDotVariant;
|
|
1959
|
+
}
|
|
1960
|
+
/**
|
|
1961
|
+
* Single pagination indicator — a dot or a line. `current` fills it with the
|
|
1962
|
+
* brand colour, otherwise `bg-quaternary`. Dimensions per size/variant match
|
|
1963
|
+
* Figma (dot md 8 / lg 10; line md h6 / lg h8, both 40 wide).
|
|
1964
|
+
*/
|
|
1965
|
+
declare function PaginationDotIndicator({ current, size, variant, className, ...rest }: PaginationDotIndicatorProps): react.JSX.Element;
|
|
1966
|
+
|
|
1967
|
+
interface PaginationDotGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
1968
|
+
/** Total indicators. */
|
|
1969
|
+
count?: number;
|
|
1970
|
+
/** Active index. */
|
|
1971
|
+
current?: number;
|
|
1972
|
+
size?: PaginationDotSize;
|
|
1973
|
+
variant?: PaginationDotVariant;
|
|
1974
|
+
/** Floating pill on a translucent blurred background (carousel overlay). */
|
|
1975
|
+
framed?: boolean;
|
|
1976
|
+
}
|
|
1977
|
+
/**
|
|
1978
|
+
* Row of `PaginationDotIndicator`s (carousel pager). `count`/`current` drive the
|
|
1979
|
+
* dots; `framed` wraps them in a blurred translucent pill for image overlays.
|
|
1980
|
+
* Line variant stretches indicators to fill. framed uses the
|
|
1981
|
+
* `alpha-white-90` token.
|
|
1982
|
+
*/
|
|
1983
|
+
declare function PaginationDotGroup({ count, current, size, variant, framed, className, ...rest }: PaginationDotGroupProps): react.JSX.Element;
|
|
1984
|
+
|
|
1985
|
+
type PieChartSize = "xxs" | "xs" | "sm" | "md" | "lg";
|
|
1986
|
+
interface PieSlice {
|
|
1987
|
+
name: string;
|
|
1988
|
+
value: number;
|
|
1989
|
+
color?: string;
|
|
1990
|
+
}
|
|
1991
|
+
interface PieChartProps {
|
|
1992
|
+
data: PieSlice[];
|
|
1993
|
+
size?: PieChartSize;
|
|
1994
|
+
legend?: boolean;
|
|
1995
|
+
/** Donut hole (0 = full pie, 0–1 fraction of radius). */
|
|
1996
|
+
innerRadiusRatio?: number;
|
|
1997
|
+
className?: string;
|
|
1998
|
+
formatValue?: (value: number | string | undefined) => ReactNode;
|
|
1999
|
+
}
|
|
2000
|
+
/**
|
|
2001
|
+
* Donut/pie chart — a themed Recharts `PieChart` wrapper. Slices take colors from
|
|
2002
|
+
* the shared palette (override per-slice via `color`); `size` sets the diameter,
|
|
2003
|
+
* `legend` renders a `ChartLegend` beside it. Recharts is an optional peer dep.
|
|
2004
|
+
*/
|
|
2005
|
+
declare function PieChart({ data, size, legend, innerRadiusRatio, className, formatValue, }: PieChartProps): react.JSX.Element;
|
|
2006
|
+
|
|
2007
|
+
type ProgressBarLabel = "none" | "right" | "bottom" | "topFloating" | "bottomFloating";
|
|
2008
|
+
interface ProgressBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
2009
|
+
/** 0–100. Clamped. */
|
|
2010
|
+
value: number;
|
|
2011
|
+
/** Label placement. `*Floating` shows a tooltip bubble tracking the fill. */
|
|
2012
|
+
label?: ProgressBarLabel;
|
|
2013
|
+
}
|
|
2014
|
+
/**
|
|
2015
|
+
* Progress bar — pure CSS, no chart lib. `value` (0–100) drives an animated fill
|
|
2016
|
+
* (`fg-brand-primary` on a `bg-quaternary` track). `label`: none / right (inline
|
|
2017
|
+
* %) / bottom (% under) / top|bottom-floating (tooltip bubble tracking the fill).
|
|
2018
|
+
*/
|
|
2019
|
+
declare function ProgressBar({ value, label, className, ...rest }: ProgressBarProps): react.JSX.Element;
|
|
2020
|
+
|
|
2021
|
+
type ProgressCircleSize = "xxs" | "xs" | "sm" | "md" | "lg";
|
|
2022
|
+
type ProgressCircleShape = "circle" | "half";
|
|
2023
|
+
interface ProgressCircleProps {
|
|
2024
|
+
/** 0–100. Clamped. */
|
|
2025
|
+
value: number;
|
|
2026
|
+
/** Centre label above the value (e.g. "Active users"). */
|
|
2027
|
+
label?: ReactNode;
|
|
2028
|
+
/** Override the centre value text (default `${value}%`). */
|
|
2029
|
+
valueText?: ReactNode;
|
|
2030
|
+
shape?: ProgressCircleShape;
|
|
2031
|
+
size?: ProgressCircleSize;
|
|
2032
|
+
className?: string;
|
|
2033
|
+
}
|
|
2034
|
+
/**
|
|
2035
|
+
* Circular / half-circle progress gauge. Pure SVG + CSS (no chart lib) — the ring
|
|
2036
|
+
* geometry comes from the shared `ringGeometry`/`RingPair` helper (also used by
|
|
2037
|
+
* `ActivityGauge`). `shape="half"` renders a top-semicircle gauge.
|
|
2038
|
+
*
|
|
2039
|
+
* NOTE: the half-circle is an approximation — it crops a full ring to the top
|
|
2040
|
+
* semicircle (rotate 180 + arcFraction 0.5); the centre content is positioned
|
|
2041
|
+
* for the cropped box.
|
|
2042
|
+
*/
|
|
2043
|
+
declare function ProgressCircle({ value, label, valueText, shape, size, className, }: ProgressCircleProps): react.JSX.Element;
|
|
2044
|
+
|
|
2045
|
+
type RadarLegendPosition = "none" | "right" | "bottom";
|
|
2046
|
+
interface RadarChartProps {
|
|
2047
|
+
data: Record<string, number | string>[];
|
|
2048
|
+
series: ChartSeries[];
|
|
2049
|
+
/** Key for the polar-angle axis category. */
|
|
2050
|
+
axisKey: string;
|
|
2051
|
+
legend?: RadarLegendPosition;
|
|
2052
|
+
size?: number;
|
|
2053
|
+
className?: string;
|
|
2054
|
+
}
|
|
2055
|
+
/**
|
|
2056
|
+
* Radar chart — a themed Recharts `RadarChart` wrapper. Each `series` becomes a
|
|
2057
|
+
* filled `<Radar>` colored from the shared palette; `legend` positions a
|
|
2058
|
+
* `ChartLegend` to the right or bottom. Recharts is an optional peer dependency.
|
|
2059
|
+
*/
|
|
2060
|
+
declare function RadarChart({ data, series, axisKey, legend, size, className, }: RadarChartProps): react.JSX.Element;
|
|
2061
|
+
|
|
2062
|
+
type TagsInputVariant = "inner" | "outer";
|
|
2063
|
+
interface TagsInputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
2064
|
+
/** Current tags. */
|
|
2065
|
+
tags?: string[];
|
|
2066
|
+
/** Remove handler (receives the tag index). Renders a close button per chip. */
|
|
2067
|
+
onRemoveTag?: (index: number) => void;
|
|
2068
|
+
/** `inner` keeps chips inside the field; `outer` shows them below it. */
|
|
2069
|
+
variant?: TagsInputVariant;
|
|
2070
|
+
size?: InputFieldSize;
|
|
2071
|
+
label?: ReactNode;
|
|
2072
|
+
hint?: ReactNode;
|
|
2073
|
+
required?: boolean;
|
|
2074
|
+
destructive?: boolean;
|
|
2075
|
+
}
|
|
2076
|
+
/**
|
|
2077
|
+
* Tag/chip input. `inner` renders the chips inside the field (wrapping with the
|
|
2078
|
+
* text input); `outer` renders the field on top with the chips below it.
|
|
2079
|
+
* Tag state is controlled by the consumer (`tags` + `onRemoveTag`).
|
|
2080
|
+
*/
|
|
2081
|
+
declare function TagsInputField({ tags, onRemoveTag, variant, size, label, hint, required, destructive, className, placeholder, ...rest }: TagsInputFieldProps): react.JSX.Element;
|
|
2082
|
+
|
|
2083
|
+
interface TrailingInputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
2084
|
+
/**
|
|
2085
|
+
* Right add-on — a trailing button or dropdown. Covers the Trailing button /
|
|
2086
|
+
* Trailing dropdown types.
|
|
2087
|
+
*/
|
|
2088
|
+
suffix?: ReactNode;
|
|
2089
|
+
size?: InputFieldSize;
|
|
2090
|
+
label?: ReactNode;
|
|
2091
|
+
hint?: ReactNode;
|
|
2092
|
+
required?: boolean;
|
|
2093
|
+
destructive?: boolean;
|
|
2094
|
+
}
|
|
2095
|
+
/** Input with a right add-on (trailing button or dropdown). */
|
|
2096
|
+
declare function TrailingInputField({ suffix, size, label, hint, required, destructive, className, ...rest }: TrailingInputFieldProps): react.JSX.Element;
|
|
2097
|
+
|
|
2098
|
+
interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
|
|
2099
|
+
size?: CheckControlSize;
|
|
2100
|
+
label?: string;
|
|
2101
|
+
supportingText?: string;
|
|
2102
|
+
}
|
|
2103
|
+
declare function Radio({ size, checked, disabled, label, supportingText, className, ...rest }: RadioProps): react.JSX.Element;
|
|
2104
|
+
|
|
2105
|
+
interface RadioGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
2106
|
+
/** Selected item value (controlled). */
|
|
2107
|
+
value?: string;
|
|
2108
|
+
onValueChange?: (value: string) => void;
|
|
2109
|
+
/** `RadioGroupItem` elements, each with a `value` prop. */
|
|
2110
|
+
children: ReactNode;
|
|
2111
|
+
}
|
|
2112
|
+
/**
|
|
2113
|
+
* Single-select container for `RadioGroupItem`s. Clones each child to inject
|
|
2114
|
+
* `selected` (matching `value`) and an `onClick` that fires `onValueChange` with
|
|
2115
|
+
* the child's `value`. Children control their own `type`/content.
|
|
2116
|
+
*/
|
|
2117
|
+
declare function RadioGroup({ value, onValueChange, children, className, ...rest }: RadioGroupProps): react.JSX.Element;
|
|
2118
|
+
|
|
2119
|
+
type RadioGroupItemType = "radioButton" | "checkbox" | "iconSimple" | "iconCard" | "avatar" | "paymentIcon";
|
|
2120
|
+
type RadioGroupItemSize = "sm" | "md";
|
|
2121
|
+
interface RadioGroupItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "title"> {
|
|
2122
|
+
type?: RadioGroupItemType;
|
|
2123
|
+
selected?: boolean;
|
|
2124
|
+
size?: RadioGroupItemSize;
|
|
2125
|
+
title?: ReactNode;
|
|
2126
|
+
/** Inline secondary text beside the title (e.g. "$10/month"). */
|
|
2127
|
+
subtext?: ReactNode;
|
|
2128
|
+
description?: ReactNode;
|
|
2129
|
+
/** Leading visual — featured icon / avatar / payment-method icon. */
|
|
2130
|
+
leading?: ReactNode;
|
|
2131
|
+
/** iconCard badge (top-right). */
|
|
2132
|
+
badge?: ReactNode;
|
|
2133
|
+
/** Trailing actions row (paymentIcon). */
|
|
2134
|
+
actions?: ReactNode;
|
|
2135
|
+
}
|
|
2136
|
+
/**
|
|
2137
|
+
* Selectable radio/checkbox card. One component over the 6 Figma `type`s — the
|
|
2138
|
+
* shared shell (border, padding, `radius-xl`, selected `border-brand`) is
|
|
2139
|
+
* constant; only the leading element and control placement change. `radioButton`
|
|
2140
|
+
* uses a radio (leading); `checkbox` a checkbox (leading); `iconSimple`/`avatar`/
|
|
2141
|
+
* `paymentIcon` put a `leading` visual on the left and the checkbox trailing;
|
|
2142
|
+
* `iconCard` is a vertical card (header + body + `badge`).
|
|
2143
|
+
*/
|
|
2144
|
+
declare function RadioGroupItem({ type, selected, size, title, subtext, description, leading, badge, actions, className, ...rest }: RadioGroupItemProps): react.JSX.Element;
|
|
2145
|
+
|
|
2146
|
+
type SectionFooterType = "section" | "card";
|
|
2147
|
+
interface SectionFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
2148
|
+
/** `section` = flush footer; `card` = inset with horizontal + bottom padding. */
|
|
2149
|
+
type?: SectionFooterType;
|
|
2150
|
+
/** Top divider line. */
|
|
2151
|
+
divider?: boolean;
|
|
2152
|
+
/** Left-aligned slot — button group, "Learn more" link, etc. */
|
|
2153
|
+
leading?: ReactNode;
|
|
2154
|
+
/** Right-aligned action buttons. */
|
|
2155
|
+
actions?: ReactNode;
|
|
2156
|
+
}
|
|
2157
|
+
/**
|
|
2158
|
+
* Footer row for a section or card: optional top `divider`, a left `leading`
|
|
2159
|
+
* slot (button group / link) and right-aligned `actions`. Layout shell only —
|
|
2160
|
+
* compose `Button`, `ButtonGroup`, etc. as slots, don't reimplement them.
|
|
2161
|
+
*/
|
|
2162
|
+
declare function SectionFooter({ type, divider, leading, actions, className, ...rest }: SectionFooterProps): react.JSX.Element;
|
|
2163
|
+
|
|
2164
|
+
interface SectionHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
2165
|
+
title?: ReactNode;
|
|
2166
|
+
supportingText?: ReactNode;
|
|
2167
|
+
/** Right-aligned slot — buttons, button group, or a search input. */
|
|
2168
|
+
actions?: ReactNode;
|
|
2169
|
+
/** Tabs row rendered below the title/actions, above the divider. */
|
|
2170
|
+
tabs?: ReactNode;
|
|
2171
|
+
/** Bottom divider line. */
|
|
2172
|
+
divider?: boolean;
|
|
2173
|
+
}
|
|
2174
|
+
/**
|
|
2175
|
+
* Section heading: title + supporting text on the left, an `actions` slot on the
|
|
2176
|
+
* right (buttons / button group / search), an optional `tabs` row, and a bottom
|
|
2177
|
+
* `divider`. Layout shell — pass controls as slots.
|
|
2178
|
+
*/
|
|
2179
|
+
declare function SectionHeader({ title, supportingText, actions, tabs, divider, className, ...rest }: SectionHeaderProps): react.JSX.Element;
|
|
2180
|
+
|
|
2181
|
+
type SectionLabelSize = "sm" | "md";
|
|
2182
|
+
interface SectionLabelProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
2183
|
+
size?: SectionLabelSize;
|
|
2184
|
+
title?: ReactNode;
|
|
2185
|
+
/** Append a brand-colored `*` after the title. */
|
|
2186
|
+
required?: boolean;
|
|
2187
|
+
/** Trailing help-icon slot (e.g. a help-circle with tooltip). */
|
|
2188
|
+
helpIcon?: ReactNode;
|
|
2189
|
+
supportingText?: ReactNode;
|
|
2190
|
+
/** Action buttons rendered below (used in wide form layouts). */
|
|
2191
|
+
actions?: ReactNode;
|
|
2192
|
+
}
|
|
2193
|
+
/**
|
|
2194
|
+
* Left-column label for a form section: title (+ optional `required` asterisk and
|
|
2195
|
+
* `helpIcon`), supporting text, and optional `actions`. `md` bumps the title to
|
|
2196
|
+
* `text-md`.
|
|
2197
|
+
*/
|
|
2198
|
+
declare function SectionLabel({ size, title, required, helpIcon, supportingText, actions, className, ...rest }: SectionLabelProps): react.JSX.Element;
|
|
2199
|
+
|
|
2200
|
+
type SelectType = "default" | "iconLeading" | "search" | "tags" | "avatarLeading" | "dotLeading";
|
|
2201
|
+
type SelectSize = "sm" | "md" | "lg";
|
|
2202
|
+
interface SelectProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
2203
|
+
/** Cosmetic — documents the leading-slot intent; the leading element itself is the `leading` slot. */
|
|
2204
|
+
type?: SelectType;
|
|
2205
|
+
size?: SelectSize;
|
|
2206
|
+
label?: ReactNode;
|
|
2207
|
+
/** Append a brand `*` after the label. */
|
|
2208
|
+
required?: boolean;
|
|
2209
|
+
/** Trailing label help-icon slot. */
|
|
2210
|
+
helpIcon?: ReactNode;
|
|
2211
|
+
hintText?: ReactNode;
|
|
2212
|
+
/** Leading visual inside the trigger — icon / avatar / dot / search icon. */
|
|
2213
|
+
leading?: ReactNode;
|
|
2214
|
+
/** Selected display value. Falls back to `placeholder` when empty. */
|
|
2215
|
+
value?: ReactNode;
|
|
2216
|
+
placeholder?: ReactNode;
|
|
2217
|
+
open?: boolean;
|
|
2218
|
+
disabled?: boolean;
|
|
2219
|
+
invalid?: boolean;
|
|
2220
|
+
onToggle?: () => void;
|
|
2221
|
+
/** Dropdown panel content — a list of `SelectMenuItem`. */
|
|
2222
|
+
children?: ReactNode;
|
|
2223
|
+
}
|
|
2224
|
+
/**
|
|
2225
|
+
* Select trigger + shared dropdown panel. The leading element is a `leading`
|
|
2226
|
+
* slot (the `type` prop only documents intent); the panel is the same across all
|
|
2227
|
+
* types — pass `SelectMenuItem`s as `children`. Controlled via `open`/`onToggle`;
|
|
2228
|
+
* the panel renders only when `open`.
|
|
2229
|
+
*/
|
|
2230
|
+
declare function Select({ type, size, label, required, helpIcon, hintText, leading, value, placeholder, open, disabled, invalid, onToggle, children, className, ...rest }: SelectProps): react.JSX.Element;
|
|
2231
|
+
|
|
2232
|
+
type SelectMenuItemSize = "sm" | "md" | "lg";
|
|
2233
|
+
interface SelectMenuItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "title"> {
|
|
2234
|
+
label?: ReactNode;
|
|
2235
|
+
/** Inline secondary text beside the label (e.g. "@olivia", "10 users"). */
|
|
2236
|
+
supportingText?: ReactNode;
|
|
2237
|
+
selected?: boolean;
|
|
2238
|
+
size?: SelectMenuItemSize;
|
|
2239
|
+
/** Leading visual — icon / avatar / dot. Ignored when `multi`. */
|
|
2240
|
+
leading?: ReactNode;
|
|
2241
|
+
/**
|
|
2242
|
+
* Multi-select variant: render a leading checkbox (bound to `selected`)
|
|
2243
|
+
* instead of the trailing selected-check.
|
|
2244
|
+
*/
|
|
2245
|
+
multi?: boolean;
|
|
2246
|
+
}
|
|
2247
|
+
/**
|
|
2248
|
+
* List-item primitive for `Select` and Multi-select dropdowns. One component over
|
|
2249
|
+
* both: `multi` swaps the trailing selected-check for a leading checkbox. The
|
|
2250
|
+
* shared shell is a full-width row with hover `bg-primary-hover`; `label` is
|
|
2251
|
+
* `text-primary`, `supportingText` sits inline in `text-tertiary`.
|
|
2252
|
+
*/
|
|
2253
|
+
declare function SelectMenuItem({ label, supportingText, selected, size, leading, multi, disabled, className, ...rest }: SelectMenuItemProps): react.JSX.Element;
|
|
2254
|
+
|
|
2255
|
+
type SidebarNavigationType = "simple" | "dualTier" | "sectionsDividers" | "sectionsSubheadings" | "slim";
|
|
2256
|
+
interface SidebarNavigationProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
2257
|
+
type?: SidebarNavigationType;
|
|
2258
|
+
/** Brand logo / wordmark slot (top of the rail). */
|
|
2259
|
+
logo?: ReactNode;
|
|
2260
|
+
/** Optional header content under the logo (e.g. a search input). */
|
|
2261
|
+
header?: ReactNode;
|
|
2262
|
+
/** Nav items — compose `NavItemBase` / `NavItemDropdownBase` children. */
|
|
2263
|
+
children?: ReactNode;
|
|
2264
|
+
/** Footer slot — typically `NavFeaturedCard` + `NavAccountCard`. */
|
|
2265
|
+
footer?: ReactNode;
|
|
2266
|
+
/** Controlled mobile-drawer open state. Omit to use internal state. */
|
|
2267
|
+
open?: boolean;
|
|
2268
|
+
onOpenChange?: (open: boolean) => void;
|
|
2269
|
+
}
|
|
2270
|
+
/**
|
|
2271
|
+
* Application sidebar shell. Lays out logo → header → scrollable nav → footer in
|
|
2272
|
+
* a fixed-width rail (`slim` collapses to 68px). Composes existing `Nav*`
|
|
2273
|
+
* components via slots/children — it does not reimplement nav items. On mobile
|
|
2274
|
+
* the rail is hidden behind a hamburger (`NavMenuButton`); opening it shows a
|
|
2275
|
+
* `bg-overlay` + `backdrop-blur-md` scrim and slides the rail in as a drawer.
|
|
2276
|
+
*
|
|
2277
|
+
* NOTE: `dualTier`'s icon-rail + expanding-panel split is simplified to a single
|
|
2278
|
+
* 280px column here — compose the icon rail separately if you need the two-tier
|
|
2279
|
+
* layout. (flagged)
|
|
2280
|
+
*/
|
|
2281
|
+
declare function SidebarNavigation({ type, logo, header, children, footer, open, onOpenChange, className, ...rest }: SidebarNavigationProps): react.JSX.Element;
|
|
2282
|
+
|
|
2283
|
+
interface SlideOutMenuHeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
2284
|
+
/** Featured-icon slot (left of the heading). */
|
|
2285
|
+
icon?: ReactNode;
|
|
2286
|
+
title?: ReactNode;
|
|
2287
|
+
supportingText?: ReactNode;
|
|
2288
|
+
/** Tabs row rendered below the heading (adds a bottom divider). */
|
|
2289
|
+
tabs?: ReactNode;
|
|
2290
|
+
/** Close button callback — renders an X in the top-right when set. */
|
|
2291
|
+
onClose?: () => void;
|
|
2292
|
+
}
|
|
2293
|
+
/**
|
|
2294
|
+
* Header for a slide-out / drawer panel: optional featured `icon` + `title` +
|
|
2295
|
+
* `supportingText`, a top-right close X, and an optional `tabs` row (which adds a
|
|
2296
|
+
* bottom divider). Padding follows the Figma `p-3xl` desktop spec.
|
|
2297
|
+
*/
|
|
2298
|
+
declare function SlideOutMenuHeader({ icon, title, supportingText, tabs, onClose, className, ...rest }: SlideOutMenuHeaderProps): react.JSX.Element;
|
|
2299
|
+
|
|
2300
|
+
type SliderLabel = "none" | "bottom" | "topFloating";
|
|
2301
|
+
interface SliderProps {
|
|
2302
|
+
min?: number;
|
|
2303
|
+
max?: number;
|
|
2304
|
+
step?: number;
|
|
2305
|
+
/** Single-handle value. Ignored when `values` is set. */
|
|
2306
|
+
value?: number;
|
|
2307
|
+
onChange?: (value: number) => void;
|
|
2308
|
+
/** Dual-handle range `[low, high]`. Takes precedence over `value`. */
|
|
2309
|
+
values?: [number, number];
|
|
2310
|
+
onRangeChange?: (values: [number, number]) => void;
|
|
2311
|
+
/** Value-label placement. */
|
|
2312
|
+
label?: SliderLabel;
|
|
2313
|
+
/** Format the value shown in labels (default `${v}%`). */
|
|
2314
|
+
formatLabel?: (v: number) => string;
|
|
2315
|
+
disabled?: boolean;
|
|
2316
|
+
className?: string;
|
|
2317
|
+
"aria-label"?: string;
|
|
2318
|
+
}
|
|
2319
|
+
/**
|
|
2320
|
+
* Range slider — track + draggable thumb(s), pure pointer math (no library).
|
|
2321
|
+
* Single-handle via `value`/`onChange`; dual-handle range via
|
|
2322
|
+
* `values`/`onRangeChange`. The thumb is implemented inline (not a separate
|
|
2323
|
+
* exported component). `label` shows the value below the thumb or in a floating
|
|
2324
|
+
* tooltip above it.
|
|
2325
|
+
*/
|
|
2326
|
+
declare function Slider({ min, max, step, value, onChange, values, onRangeChange, label, formatLabel, disabled, className, "aria-label": ariaLabel, }: SliderProps): react.JSX.Element;
|
|
2327
|
+
|
|
2328
|
+
type SocialBrand = "google" | "facebook" | "apple" | "twitter" | "figma" | "dribbble";
|
|
2329
|
+
type SocialButtonTheme = "color" | "gray" | "brand";
|
|
2330
|
+
type SocialButtonSize = "md" | "lg";
|
|
2331
|
+
interface SocialButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
|
|
2332
|
+
social: SocialBrand;
|
|
2333
|
+
/** `color`/`brand` = full-color logo; `gray` = monochrome. */
|
|
2334
|
+
theme?: SocialButtonTheme;
|
|
2335
|
+
size?: SocialButtonSize;
|
|
2336
|
+
/** Icon-only (no label) — renders a square button. */
|
|
2337
|
+
iconOnly?: boolean;
|
|
2338
|
+
/** Label override; defaults to "Sign in with <Brand>". */
|
|
2339
|
+
children?: ReactNode;
|
|
2340
|
+
}
|
|
2341
|
+
/**
|
|
2342
|
+
* Social-login button. All themes share the neutral white shell (border-primary,
|
|
2343
|
+
* shadow-xs, `text-secondary` label) — `theme` only controls the brand glyph:
|
|
2344
|
+
* `color`/`brand` = full color, `gray` = monochrome (CSS grayscale, flagged
|
|
2345
|
+
* approximation of UntitledUI's true single-color gray logos). `iconOnly` drops
|
|
2346
|
+
* the label for a square button.
|
|
2347
|
+
*/
|
|
2348
|
+
declare function SocialButton({ social, theme, size, iconOnly, children, className, ...rest }: SocialButtonProps): react.JSX.Element;
|
|
2349
|
+
|
|
2350
|
+
type StatusIconType = "online" | "offline" | "count" | "avatar" | "verified";
|
|
2351
|
+
interface StatusIconProps extends HTMLAttributes<HTMLSpanElement> {
|
|
2352
|
+
type?: StatusIconType;
|
|
2353
|
+
/** Number shown for `type="count"`. */
|
|
2354
|
+
count?: number;
|
|
2355
|
+
/** Image src for `type="avatar"`. */
|
|
2356
|
+
imageUrl?: string;
|
|
2357
|
+
/** Outer box size in px (default 16). */
|
|
2358
|
+
size?: number;
|
|
2359
|
+
}
|
|
2360
|
+
/**
|
|
2361
|
+
* Small overlay status badge — meant to sit on the corner of an avatar/icon.
|
|
2362
|
+
* `online`/`offline` = colored dot; `count` = error-colored numeric bubble;
|
|
2363
|
+
* `avatar` = ringed mini image; `verified` = brand verified tick (approximated
|
|
2364
|
+
* as a brand disc + check, no burst star).
|
|
2365
|
+
*/
|
|
2366
|
+
declare function StatusIcon({ type, count, imageUrl, size, className, style, ...rest }: StatusIconProps): react.JSX.Element;
|
|
2367
|
+
|
|
2368
|
+
type StepIconType = "check" | "number";
|
|
2369
|
+
type StepStatus = "incomplete" | "current" | "complete";
|
|
2370
|
+
type StepIconSize = "sm" | "md";
|
|
2371
|
+
interface StepIconBaseProps extends HTMLAttributes<HTMLDivElement> {
|
|
2372
|
+
type?: StepIconType;
|
|
2373
|
+
status?: StepStatus;
|
|
2374
|
+
size?: StepIconSize;
|
|
2375
|
+
/** Number to show when `type="number"`. */
|
|
2376
|
+
step?: ReactNode;
|
|
2377
|
+
}
|
|
2378
|
+
/**
|
|
2379
|
+
* Step indicator dot for `ProgressSteps`. `type` check (dot / brand fill / check)
|
|
2380
|
+
* or number; `status` incomplete / current (brand ring) / complete (filled +
|
|
2381
|
+
* check). Composed by `StepBase`.
|
|
2382
|
+
*/
|
|
2383
|
+
declare function StepIconBase({ type, status, size, step, className, ...rest }: StepIconBaseProps): react.JSX.Element;
|
|
2384
|
+
|
|
2385
|
+
type StepOrientation = "left" | "top";
|
|
2386
|
+
interface StepBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
|
|
2387
|
+
status?: StepStatus;
|
|
2388
|
+
size?: StepIconSize;
|
|
2389
|
+
/** Icon column position: `left` (vertical list) or `top` (horizontal list). */
|
|
2390
|
+
orientation?: StepOrientation;
|
|
2391
|
+
/** Indicator style. Ignored when `icon` (featured) is supplied. */
|
|
2392
|
+
iconType?: StepIconType;
|
|
2393
|
+
/** Step number (number indicator). */
|
|
2394
|
+
step?: ReactNode;
|
|
2395
|
+
/** Featured-icon slot — replaces the StepIconBase indicator. */
|
|
2396
|
+
icon?: ReactNode;
|
|
2397
|
+
title?: ReactNode;
|
|
2398
|
+
description?: ReactNode;
|
|
2399
|
+
/** Render a connecting line toward the next step. */
|
|
2400
|
+
connector?: boolean;
|
|
2401
|
+
}
|
|
2402
|
+
/**
|
|
2403
|
+
* One step row/column for `ProgressSteps`. Composes `StepIconBase` (or a featured
|
|
2404
|
+
* `icon` slot) + title/description, with an optional `connector` line (vertical
|
|
2405
|
+
* below for `left`, horizontal to the right for `top`). The 5 assembled Figma
|
|
2406
|
+
* layout frames are reference-only — build step lists by laying these out.
|
|
2407
|
+
*
|
|
2408
|
+
* NOTE: the connector renders on one side only (toward the next step); the last
|
|
2409
|
+
* step should set `connector={false}`.
|
|
2410
|
+
*/
|
|
2411
|
+
declare function StepBase({ status, size, orientation, iconType, step, icon, title, description, connector, className, ...rest }: StepBaseProps): react.JSX.Element;
|
|
2412
|
+
|
|
2413
|
+
type TabButtonType = "buttonBrand" | "buttonGray" | "buttonWhite" | "buttonMinimal" | "underline" | "line";
|
|
2414
|
+
type TabButtonSize = "sm" | "md";
|
|
2415
|
+
interface TabButtonBaseProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
|
|
2416
|
+
/** Visual style. Maps to the Figma `Type` axis. */
|
|
2417
|
+
variant?: TabButtonType;
|
|
2418
|
+
current?: boolean;
|
|
2419
|
+
size?: TabButtonSize;
|
|
2420
|
+
/** Leading icon slot. */
|
|
2421
|
+
icon?: ReactNode;
|
|
2422
|
+
/** Trailing badge/count slot. */
|
|
2423
|
+
badge?: ReactNode;
|
|
2424
|
+
children?: ReactNode;
|
|
2425
|
+
}
|
|
2426
|
+
/**
|
|
2427
|
+
* Single tab control consumed by `Tabs`. Six `variant`s: pill styles
|
|
2428
|
+
* (`buttonBrand`/`buttonGray`/`buttonWhite`/`buttonMinimal`), `underline`
|
|
2429
|
+
* (horizontal bottom border) and `line` (vertical left border). `current` is the
|
|
2430
|
+
* active state. The native `type` attribute is Omitted (taken over by `variant`).
|
|
2431
|
+
*/
|
|
2432
|
+
declare function TabButtonBase({ variant, current, size, icon, badge, children, className, ...rest }: TabButtonBaseProps): react.JSX.Element;
|
|
2433
|
+
|
|
2434
|
+
type TableCellSize = "sm" | "md";
|
|
2435
|
+
interface TableCellProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
2436
|
+
size?: TableCellSize;
|
|
2437
|
+
/** Leading checkbox slot (first column). */
|
|
2438
|
+
checkbox?: ReactNode;
|
|
2439
|
+
/** Hover/selected row background. */
|
|
2440
|
+
selected?: boolean;
|
|
2441
|
+
/** Cell content — any of the 14 Figma `Type` layouts (see stories). */
|
|
2442
|
+
children?: ReactNode;
|
|
2443
|
+
}
|
|
2444
|
+
/**
|
|
2445
|
+
* Generic `<td>` shell — border-bottom row cell. One component over the 14 Figma
|
|
2446
|
+
* `Type`s (Text, Avatar, Badge, Trend, Progress bar, Action icons, Star ratings,
|
|
2447
|
+
* …): the differing content goes in `children`; the shell (height, padding,
|
|
2448
|
+
* border, hover bg) is constant. Same one-shell-many-examples pattern as
|
|
2449
|
+
* `NavFeaturedCard`. `sm` = 64px row, `md` = 72px.
|
|
2450
|
+
*
|
|
2451
|
+
* NOTE: the Figma `Star ratings` cell references a raw `Colors/Yellow/400` var —
|
|
2452
|
+
* do NOT use it; substitute the `warning-primary`/`utility-yellow` token if a
|
|
2453
|
+
* star fill colour is needed.
|
|
2454
|
+
*/
|
|
2455
|
+
declare function TableCell({ size, checkbox, selected, children, className, ...rest }: TableCellProps): react.JSX.Element;
|
|
2456
|
+
|
|
2457
|
+
type TableHeaderCellSize = "sm" | "md";
|
|
2458
|
+
interface TableHeaderCellProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
2459
|
+
size?: TableHeaderCellSize;
|
|
2460
|
+
/** Leading checkbox slot (first column). */
|
|
2461
|
+
checkbox?: ReactNode;
|
|
2462
|
+
/** Label content — typically a `TableHeaderLabel`. */
|
|
2463
|
+
children?: ReactNode;
|
|
2464
|
+
}
|
|
2465
|
+
/**
|
|
2466
|
+
* `<th>` wrapper — white cell with a bottom border; composes a leading `checkbox`
|
|
2467
|
+
* slot + a `TableHeaderLabel` (`children`). `sm` = 40px row, `md` = 44px row.
|
|
2468
|
+
*/
|
|
2469
|
+
declare function TableHeaderCell({ size, checkbox, children, className, ...rest }: TableHeaderCellProps): react.JSX.Element;
|
|
2470
|
+
|
|
2471
|
+
type TableHeaderLabelArrow = "none" | "down" | "up" | "chevronSelector";
|
|
2472
|
+
interface TableHeaderLabelProps extends HTMLAttributes<HTMLDivElement> {
|
|
2473
|
+
children?: ReactNode;
|
|
2474
|
+
/** Sort indicator. */
|
|
2475
|
+
arrow?: TableHeaderLabelArrow;
|
|
2476
|
+
/** Trailing help-icon slot. */
|
|
2477
|
+
helpIcon?: ReactNode;
|
|
2478
|
+
}
|
|
2479
|
+
/**
|
|
2480
|
+
* Column-header label — `text-xs` semibold in `text-quaternary` (→ `text-tertiary`
|
|
2481
|
+
* on hover), with an optional sort `arrow` and trailing `helpIcon` slot. Consumed
|
|
2482
|
+
* by `TableHeaderCell`.
|
|
2483
|
+
*/
|
|
2484
|
+
declare function TableHeaderLabel({ children, arrow, helpIcon, className, ...rest }: TableHeaderLabelProps): react.JSX.Element;
|
|
2485
|
+
|
|
2486
|
+
type TabsOrientation = "horizontal" | "vertical";
|
|
2487
|
+
interface TabItem {
|
|
2488
|
+
value: string;
|
|
2489
|
+
label: ReactNode;
|
|
2490
|
+
icon?: ReactNode;
|
|
2491
|
+
badge?: ReactNode;
|
|
2492
|
+
disabled?: boolean;
|
|
2493
|
+
}
|
|
2494
|
+
interface TabsProps {
|
|
2495
|
+
items: TabItem[];
|
|
2496
|
+
value?: string;
|
|
2497
|
+
onValueChange?: (value: string) => void;
|
|
2498
|
+
orientation?: TabsOrientation;
|
|
2499
|
+
/** Tab style — passed to `TabButtonBase`. Defaults: horizontal→buttonBrand, vertical→line. */
|
|
2500
|
+
variant?: TabButtonType;
|
|
2501
|
+
size?: TabButtonSize;
|
|
2502
|
+
/** Stretch tabs to fill the row (horizontal only). */
|
|
2503
|
+
fullWidth?: boolean;
|
|
2504
|
+
className?: string;
|
|
2505
|
+
"aria-label"?: string;
|
|
2506
|
+
}
|
|
2507
|
+
/**
|
|
2508
|
+
* Tab bar composing `TabButtonBase`. `orientation="horizontal"` lays tabs in a
|
|
2509
|
+
* row (underline variant gets a shared bottom border); `vertical` stacks them
|
|
2510
|
+
* (defaults to the `line` variant). Controlled via `value`/`onValueChange`.
|
|
2511
|
+
*/
|
|
2512
|
+
declare function Tabs({ items, value, onValueChange, orientation, variant, size, fullWidth, className, "aria-label": ariaLabel, }: TabsProps): react.JSX.Element;
|
|
2513
|
+
|
|
2514
|
+
type TagSize = "sm" | "md" | "lg";
|
|
2515
|
+
interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
2516
|
+
size?: TagSize;
|
|
2517
|
+
children?: ReactNode;
|
|
2518
|
+
/** Leading visual — dot / country flag / avatar (ReactNode slot). */
|
|
2519
|
+
icon?: ReactNode;
|
|
2520
|
+
/** Render a leading checkbox (bare bordered box, distinct from `Checkbox`). */
|
|
2521
|
+
checkbox?: boolean;
|
|
2522
|
+
checked?: boolean;
|
|
2523
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
2524
|
+
/** Trailing count value (renders a divider + number). */
|
|
2525
|
+
count?: ReactNode;
|
|
2526
|
+
/** Trailing X-close button callback. */
|
|
2527
|
+
onClose?: () => void;
|
|
2528
|
+
}
|
|
2529
|
+
/**
|
|
2530
|
+
* Compact tag/chip. One component over the Figma matrix: `icon` (dot/country/
|
|
2531
|
+
* avatar) slot, optional leading `checkbox`, trailing `count`, and an `onClose`
|
|
2532
|
+
* X button. The checkbox/count/close sub-parts are inline (not separate exported
|
|
2533
|
+
* components); `checkbox` is a bare bordered box, intentionally distinct from the
|
|
2534
|
+
* full `Checkbox`/`Radio` controls.
|
|
2535
|
+
*/
|
|
2536
|
+
declare function Tag({ size, children, icon, checkbox, checked, onCheckedChange, count, onClose, className, ...rest }: TagProps): react.JSX.Element;
|
|
2537
|
+
|
|
2538
|
+
interface TextEditorToolbarProps extends HTMLAttributes<HTMLDivElement> {
|
|
2539
|
+
/** Toolbar controls — typically `ButtonUtility` groups. */
|
|
2540
|
+
children?: ReactNode;
|
|
2541
|
+
}
|
|
2542
|
+
/**
|
|
2543
|
+
* Formatting-toolbar **chrome shell** for a rich-text editor (layout + tokens
|
|
2544
|
+
* only, no editing logic). Horizontal bar; drop your formatting buttons in as
|
|
2545
|
+
* `children` (use `TextEditorToolbarDivider` between groups). Pair with a real
|
|
2546
|
+
* editor engine (TipTap/Quill) — the deferred `Text editor` row.
|
|
2547
|
+
*/
|
|
2548
|
+
declare function TextEditorToolbar({ children, className, ...rest }: TextEditorToolbarProps): react.JSX.Element;
|
|
2549
|
+
/** Vertical divider between toolbar groups. */
|
|
2550
|
+
declare function TextEditorToolbarDivider({ className }: {
|
|
2551
|
+
className?: string;
|
|
2552
|
+
}): react.JSX.Element;
|
|
2553
|
+
|
|
2554
|
+
interface TextEditorTooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
2555
|
+
/** Inline formatting controls shown for the current selection. */
|
|
2556
|
+
children?: ReactNode;
|
|
2557
|
+
}
|
|
2558
|
+
/**
|
|
2559
|
+
* Floating selection-toolbar **chrome shell** for a rich-text editor (layout +
|
|
2560
|
+
* tokens only, no editing logic). A small elevated card meant to be positioned
|
|
2561
|
+
* over a text selection; drop inline-format buttons in as `children`. Pair with a
|
|
2562
|
+
* real editor engine — the deferred `Text editor` row.
|
|
2563
|
+
*/
|
|
2564
|
+
declare function TextEditorTooltip({ children, className, ...rest }: TextEditorTooltipProps): react.JSX.Element;
|
|
2565
|
+
|
|
2566
|
+
interface TextareaInputFieldProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> {
|
|
2567
|
+
size?: InputFieldSize;
|
|
2568
|
+
label?: ReactNode;
|
|
2569
|
+
hint?: ReactNode;
|
|
2570
|
+
required?: boolean;
|
|
2571
|
+
destructive?: boolean;
|
|
2572
|
+
}
|
|
2573
|
+
/**
|
|
2574
|
+
* Multiline text input. Reuses the Input field family's shared `FieldWrapper`
|
|
2575
|
+
* (label/required/hint/destructive) and `boxClasses`/`inputSizeClasses` — the
|
|
2576
|
+
* wrapper is NOT reimplemented. `rows` controls height (default 4).
|
|
2577
|
+
*/
|
|
2578
|
+
declare function TextareaInputField({ size, label, hint, required, destructive, rows, className, ...rest }: TextareaInputFieldProps): react.JSX.Element;
|
|
2579
|
+
|
|
2580
|
+
type ToggleType = "default" | "slim";
|
|
2581
|
+
type ToggleSize = "sm" | "md";
|
|
2582
|
+
interface ToggleProps {
|
|
2583
|
+
type?: ToggleType;
|
|
2584
|
+
size?: ToggleSize;
|
|
2585
|
+
checked?: boolean;
|
|
2586
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
2587
|
+
disabled?: boolean;
|
|
2588
|
+
label?: ReactNode;
|
|
2589
|
+
supportingText?: ReactNode;
|
|
2590
|
+
className?: string;
|
|
2591
|
+
id?: string;
|
|
2592
|
+
"aria-label"?: string;
|
|
2593
|
+
}
|
|
2594
|
+
/**
|
|
2595
|
+
* Switch toggle. `default` = filled track (`bg-brand-solid` when on); `slim` = a
|
|
2596
|
+
* thinner track with a bordered knob (uses the `toggle-slim-border-pressed`
|
|
2597
|
+
* tokens when on). The `_Toggle base` control is inline (not a separate export).
|
|
2598
|
+
* Controlled via `checked`/`onCheckedChange`; optional `label`/`supportingText`.
|
|
2599
|
+
*/
|
|
2600
|
+
declare function Toggle({ type, size, checked, onCheckedChange, disabled, label, supportingText, className, id, "aria-label": ariaLabel, }: ToggleProps): react.JSX.Element;
|
|
2601
|
+
|
|
2602
|
+
type TreeViewConnectorType = "default" | "endConnector" | "none";
|
|
2603
|
+
type TreeViewConnectorSize = "sm" | "md";
|
|
2604
|
+
interface TreeViewConnectorProps extends HTMLAttributes<HTMLSpanElement> {
|
|
2605
|
+
type?: TreeViewConnectorType;
|
|
2606
|
+
size?: TreeViewConnectorSize;
|
|
2607
|
+
}
|
|
2608
|
+
/**
|
|
2609
|
+
* Indent guide for `TreeViewItem`/`TreeView`. `default` = a full-height vertical
|
|
2610
|
+
* line (a passing-through branch); `endConnector` = an L-shape (vertical down to
|
|
2611
|
+
* centre, then a stub to the right) for the last child; `none` = empty spacer.
|
|
2612
|
+
* Drawn with borders rather than the Figma image asset.
|
|
2613
|
+
*/
|
|
2614
|
+
declare function TreeViewConnector({ type, size, className, ...rest }: TreeViewConnectorProps): react.JSX.Element;
|
|
2615
|
+
|
|
2616
|
+
type TreeViewItemSize = TreeViewConnectorSize;
|
|
2617
|
+
interface TreeViewItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "onToggle"> {
|
|
2618
|
+
size?: TreeViewItemSize;
|
|
2619
|
+
/** Nesting depth — renders this many leading connector guides. */
|
|
2620
|
+
level?: number;
|
|
2621
|
+
selected?: boolean;
|
|
2622
|
+
/** Has children → renders an expand/collapse chevron. */
|
|
2623
|
+
expandable?: boolean;
|
|
2624
|
+
open?: boolean;
|
|
2625
|
+
onToggle?: () => void;
|
|
2626
|
+
/** Leading checkbox. */
|
|
2627
|
+
checkbox?: boolean;
|
|
2628
|
+
checked?: boolean;
|
|
2629
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
2630
|
+
/** Leading icon slot (e.g. a folder). */
|
|
2631
|
+
icon?: ReactNode;
|
|
2632
|
+
/** Show a drag handle on hover. */
|
|
2633
|
+
dragHandle?: boolean;
|
|
2634
|
+
children?: ReactNode;
|
|
2635
|
+
}
|
|
2636
|
+
/**
|
|
2637
|
+
* One row of a `TreeView`. Composes `TreeViewConnector` for the `level` indent
|
|
2638
|
+
* guides, plus an optional expand chevron, `checkbox`, `icon` and label. Selected
|
|
2639
|
+
* → `bg-secondary`; hover → `bg-primary-hover`. Width is fluid (parent controls).
|
|
2640
|
+
*/
|
|
2641
|
+
declare function TreeViewItem({ size, level, selected, expandable, open, onToggle, checkbox, checked, onCheckedChange, icon, dragHandle, children, className, ...rest }: TreeViewItemProps): react.JSX.Element;
|
|
2642
|
+
|
|
2643
|
+
interface TreeNode {
|
|
2644
|
+
id: string;
|
|
2645
|
+
label: ReactNode;
|
|
2646
|
+
icon?: ReactNode;
|
|
2647
|
+
children?: TreeNode[];
|
|
2648
|
+
}
|
|
2649
|
+
interface TreeViewProps {
|
|
2650
|
+
data: TreeNode[];
|
|
2651
|
+
size?: TreeViewItemSize;
|
|
2652
|
+
/** Currently selected node id (controlled). */
|
|
2653
|
+
selectedId?: string;
|
|
2654
|
+
onSelect?: (id: string) => void;
|
|
2655
|
+
/** Node ids expanded by default (uncontrolled expand state). */
|
|
2656
|
+
defaultExpandedIds?: string[];
|
|
2657
|
+
/** Show a checkbox on every row. */
|
|
2658
|
+
checkboxes?: boolean;
|
|
2659
|
+
/** Max nesting depth rendered — guards against runaway/cyclic data. */
|
|
2660
|
+
maxDepth?: number;
|
|
2661
|
+
className?: string;
|
|
2662
|
+
"aria-label"?: string;
|
|
2663
|
+
}
|
|
2664
|
+
/**
|
|
2665
|
+
* Tree view composite — renders nested `TreeNode` data recursively as
|
|
2666
|
+
* `TreeViewItem`s (which compose `TreeViewConnector` for indent guides). Expand
|
|
2667
|
+
* state is internal (seeded by `defaultExpandedIds`); selection is controlled via
|
|
2668
|
+
* `selectedId`/`onSelect`.
|
|
2669
|
+
*/
|
|
2670
|
+
declare function TreeView({ data, size, selectedId, onSelect, defaultExpandedIds, checkboxes, maxDepth, className, "aria-label": ariaLabel, }: TreeViewProps): react.JSX.Element;
|
|
2671
|
+
|
|
2672
|
+
type VerificationCodeDigits = 4 | 6;
|
|
2673
|
+
type VerificationCodeSize = "sm" | "md" | "lg";
|
|
2674
|
+
interface VerificationCodeInputProps {
|
|
2675
|
+
digits?: VerificationCodeDigits;
|
|
2676
|
+
value?: string;
|
|
2677
|
+
onChange?: (value: string) => void;
|
|
2678
|
+
size?: VerificationCodeSize;
|
|
2679
|
+
label?: ReactNode;
|
|
2680
|
+
hint?: ReactNode;
|
|
2681
|
+
destructive?: boolean;
|
|
2682
|
+
disabled?: boolean;
|
|
2683
|
+
className?: string;
|
|
2684
|
+
"aria-label"?: string;
|
|
2685
|
+
}
|
|
2686
|
+
/**
|
|
2687
|
+
* OTP-style verification code input. `digits` 4 or 6 separate single-character
|
|
2688
|
+
* cells (6 shows a centre "-" separator); large display typography
|
|
2689
|
+
* (`display-lg`/`display-xl`). Controlled via `value`/`onChange`; auto-advances
|
|
2690
|
+
* focus on entry and steps back on backspace. Cell borders use `border-primary`
|
|
2691
|
+
* (= `utility-neutral-300` #d4d4d4, same value).
|
|
2692
|
+
*/
|
|
2693
|
+
declare function VerificationCodeInput({ digits, value, onChange, size, label, hint, destructive, disabled, className, "aria-label": ariaLabel, }: VerificationCodeInputProps): react.JSX.Element;
|
|
2694
|
+
|
|
2695
|
+
/** Line-art cloud illustration (empty-state / upload). Color via `currentColor`. */
|
|
2696
|
+
declare function CloudIllustration({ className, ...props }: SVGProps<SVGSVGElement>): react.JSX.Element;
|
|
2697
|
+
|
|
2698
|
+
/** Line-art credit-card illustration (billing / payment empty states). */
|
|
2699
|
+
declare function CreditCardIllustration({ className, ...props }: SVGProps<SVGSVGElement>): react.JSX.Element;
|
|
2700
|
+
|
|
2701
|
+
/** Line-art stacked-documents illustration (no files / empty list states). */
|
|
2702
|
+
declare function DocumentsIllustration({ className, ...props }: SVGProps<SVGSVGElement>): react.JSX.Element;
|
|
2703
|
+
|
|
2704
|
+
/** Line-art open-box illustration (empty / archived states). */
|
|
2705
|
+
declare function BoxIllustration({ className, ...props }: SVGProps<SVGSVGElement>): react.JSX.Element;
|
|
2706
|
+
|
|
2707
|
+
declare const index_BoxIllustration: typeof BoxIllustration;
|
|
2708
|
+
declare const index_CloudIllustration: typeof CloudIllustration;
|
|
2709
|
+
declare const index_CreditCardIllustration: typeof CreditCardIllustration;
|
|
2710
|
+
declare const index_DocumentsIllustration: typeof DocumentsIllustration;
|
|
2711
|
+
declare namespace index {
|
|
2712
|
+
export { index_BoxIllustration as BoxIllustration, index_CloudIllustration as CloudIllustration, index_CreditCardIllustration as CreditCardIllustration, index_DocumentsIllustration as DocumentsIllustration };
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
export { ActivityFeed, type ActivityFeedDivider, type ActivityFeedProps, ActivityGauge, type ActivityGaugeLegend, type ActivityGaugeProps, type ActivityGaugeSeries, type ActivityGaugeSize, AdvancedFilterBar, type AdvancedFilterBarProps, Alert, type AlertAction, type AlertColor, type AlertProps, type AlertSize, Avatar, AvatarAddButton, type AvatarAddButtonProps, type AvatarAddButtonSize, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupSize, AvatarLabelGroup, type AvatarLabelGroupProps, type AvatarLabelGroupSize, AvatarProfilePhoto, type AvatarProfilePhotoProps, type AvatarProfilePhotoSize, type AvatarProps, type AvatarSize, BadgeCloseX, type BadgeCloseXProps, type BadgeCloseXShape, type BadgeColor, type BadgeCommonProps, BadgeGroup, type BadgeGroupBadgePosition, type BadgeGroupProps, type BadgeGroupSize, type BadgeGroupType, type BadgeSize, BreadcrumbButtonBase, type BreadcrumbButtonBaseProps, type BreadcrumbButtonType, Breadcrumbs, type BreadcrumbsDivider, type BreadcrumbsProps, Button, ButtonCloseX, type ButtonCloseXProps, type ButtonCloseXSize, ButtonDestructive, type ButtonDestructiveHierarchy, type ButtonDestructiveProps, type ButtonDestructiveSize, ButtonGroup, type ButtonGroupProps, ButtonGroupSegment, type ButtonGroupSegmentProps, type ButtonGroupSegmentSize, type ButtonProps, ButtonUtility, type ButtonUtilityProps, type ButtonUtilitySize, type ButtonUtilityVariant, CalendarCell, CalendarCellDayWeekView, type CalendarCellDayWeekViewProps, type CalendarCellProps, CalendarColumnHeader, type CalendarColumnHeaderOrientation, type CalendarColumnHeaderProps, CalendarDateIcon, type CalendarDateIconProps, CalendarEvent, type CalendarEventColor, CalendarEventDayWeekView, type CalendarEventDayWeekViewProps, type CalendarEventProps, CalendarHeader, type CalendarHeaderProps, CalendarRowLabel, type CalendarRowLabelProps, CalendarTimemarker, type CalendarTimemarkerAlign, type CalendarTimemarkerProps, type CalendarView, CalendarViewDropdown, type CalendarViewDropdownProps, type CalendarViewOption, CardHeader, type CardHeaderProps, CarouselArrow, type CarouselArrowDirection, type CarouselArrowProps, type CarouselArrowSize, CarouselImage, type CarouselImageProps, Change, type ChangeProps, type ChangeTrend, type ChangeType, ChartLegend, type ChartLegendItem, type ChartLegendPosition, type ChartLegendProps, ChartMarker, type ChartMarkerLine, type ChartMarkerProps, ChartMini, type ChartMiniDatum, type ChartMiniProps, type ChartMiniTrend, type ChartSeries, type ChartStyle, ChartTooltip, type ChartTooltipPayloadItem, type ChartTooltipProps, type CheckControlSize, Checkbox, type CheckboxProps, CodeSnippet, type CodeSnippetProps, CodeSnippetTabs, type CodeSnippetTabsProps, ColorBadge, type ColorBadgeProps, CommandBar, CommandBarFooter, type CommandBarFooterHint, type CommandBarFooterProps, CommandBarMenuSection, type CommandBarMenuSectionProps, CommandBarNavigationIcon, type CommandBarNavigationIconProps, type CommandBarProps, CommandDropdownMenuItem, type CommandDropdownMenuItemProps, CommandInput, type CommandInputProps, CommandShortcut, type CommandShortcutProps, ContentDivider, type ContentDividerProps, type ContentDividerStyle, type ContentDividerType, ContentFeatureText, type ContentFeatureTextProps, type ContentFeatureTextSize, ContentHeading, type ContentHeadingProps, type ContentHeadingSize, ContentParagraph, type ContentParagraphProps, type ContentParagraphSize, ContentQuote, type ContentQuoteAlign, type ContentQuoteProps, type ContentQuoteSize, ContentRule, type ContentRuleProps, type ContentRuleSize, ContextMenu, type ContextMenuProps, type ContextMenuState, DatePickerCell, type DatePickerCellProps, type DatePickerCellType, DatePickerListItem, type DatePickerListItemProps, DatePickerMenu, type DatePickerMenuProps, DropdownAccountListItem, type DropdownAccountListItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, type DropdownMenuFooterType, DropdownMenuHeader, type DropdownMenuHeaderProps, type DropdownMenuHeaderType, DropdownMenuItemInsetIcon, type DropdownMenuItemInsetIconProps, type DropdownMenuItemInsetIconType, DropdownMenuListItem, type DropdownMenuListItemProps, EmptyState, type EmptyStateProps, type EmptyStateSize, FeedItemBase, type FeedItemBaseProps, type FeedItemSize, FileUpload, FileUploadBase, type FileUploadBaseProps, FileUploadItemBase, type FileUploadItemBaseProps, type FileUploadItemIconType, type FileUploadItemStatus, type FileUploadItemType, type FileUploadProps, FilterBar, type FilterBarProps, FilterTabs, type FilterTabsProps, FiltersDropdownMenu, type FiltersDropdownMenuProps, FiltersSlideoutMenu, type FiltersSlideoutMenuProps, type HeaderNavItem, HeaderNavigation, type HeaderNavigationProps, type HeaderNavigationType, HelpIcon, type HelpIconProps, InputField, type InputFieldProps, type InputFieldSize, type InputFieldType, LeadingInputField, type LeadingInputFieldProps, LineAndBarChart, type LineAndBarChartProps, LinkMessage, type LinkMessageProps, type LinkMessageType, LoadingIndicator, type LoadingIndicatorProps, type LoadingIndicatorSize, type LoadingIndicatorStyle, MediaMessage, type MediaMessageProps, type MediaMessageType, MegaInputFieldBase, type MegaInputFieldBaseProps, type MegaInputFieldBaseSize, Message, MessageAction, MessageActionButton, type MessageActionButtonProps, MessageActionPanel, type MessageActionPanelProps, type MessageActionProps, type MessageActionType, type MessageBubbleTone, type MessageProps, MessageReaction, type MessageReactionProps, type MessageStatus, MessageStatusIcon, type MessageStatusIconProps, type MessageType, MetricItem, type MetricItemProps, ModalActions, type ModalActionsProps, type ModalActionsType, ModalHeader, type ModalHeaderProps, type ModalHeaderType, ModernBadge, type ModernBadgeProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavAccountCard, NavAccountCardMenuItem, type NavAccountCardMenuItemProps, type NavAccountCardMenuItemType, type NavAccountCardProps, type NavAccountCardVariant, NavButton, type NavButtonProps, NavFeaturedCard, type NavFeaturedCardProps, NavItemBase, type NavItemBaseProps, NavItemDropdownBase, type NavItemDropdownBaseProps, NavMenuButton, type NavMenuButtonProps, Notification, type NotificationProps, type NotificationVariant, NumberInput, type NumberInputLayout, type NumberInputProps, PageHeader, type PageHeaderProps, type PageHeaderStyle, Pagination, PaginationButtonGroupBase, type PaginationButtonGroupBaseProps, type PaginationButtonGroupType, PaginationCards, type PaginationCardsProps, type PaginationCardsVariant, PaginationDotGroup, type PaginationDotGroupProps, PaginationDotIndicator, type PaginationDotIndicatorProps, type PaginationDotSize, type PaginationDotVariant, PaginationNumberBase, type PaginationNumberBaseProps, type PaginationNumberShape, type PaginationProps, type PaginationType, PieChart, type PieChartProps, type PieChartSize, type PieSlice, PillBadge, type PillBadgeProps, ProgressBar, type ProgressBarLabel, type ProgressBarProps, ProgressCircle, type ProgressCircleProps, type ProgressCircleShape, type ProgressCircleSize, RadarChart, type RadarChartProps, type RadarLegendPosition, Radio, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupItemSize, type RadioGroupItemType, type RadioGroupProps, type RadioProps, SectionFooter, type SectionFooterProps, type SectionFooterType, SectionHeader, type SectionHeaderProps, SectionLabel, type SectionLabelProps, type SectionLabelSize, Select, SelectMenuItem, type SelectMenuItemProps, type SelectMenuItemSize, type SelectProps, type SelectSize, type SelectType, SidebarNavigation, type SidebarNavigationProps, type SidebarNavigationType, SlideOutMenuHeader, type SlideOutMenuHeaderProps, Slider, type SliderLabel, type SliderProps, type SocialBrand, SocialButton, type SocialButtonProps, type SocialButtonSize, type SocialButtonTheme, StatusIcon, type StatusIconProps, type StatusIconType, StepBase, type StepBaseProps, StepIconBase, type StepIconBaseProps, type StepIconSize, type StepIconType, type StepOrientation, type StepStatus, TabButtonBase, type TabButtonBaseProps, type TabButtonSize, type TabButtonType, type TabItem, TableCell, type TableCellProps, type TableCellSize, TableHeaderCell, type TableHeaderCellProps, type TableHeaderCellSize, TableHeaderLabel, type TableHeaderLabelArrow, type TableHeaderLabelProps, Tabs, type TabsOrientation, type TabsProps, Tag, type TagProps, type TagSize, TagsInputField, type TagsInputFieldProps, type TagsInputVariant, TextEditorToolbar, TextEditorToolbarDivider, type TextEditorToolbarProps, TextEditorTooltip, type TextEditorTooltipProps, TextareaInputField, type TextareaInputFieldProps, Toggle, type ToggleProps, type ToggleSize, type ToggleType, Tooltip, type TooltipArrow, type TooltipProps, TrailingInputField, type TrailingInputFieldProps, type TreeNode, TreeView, TreeViewConnector, type TreeViewConnectorProps, type TreeViewConnectorSize, type TreeViewConnectorType, TreeViewItem, type TreeViewItemProps, type TreeViewItemSize, type TreeViewProps, type UseContextMenuReturn, type VerificationCodeDigits, VerificationCodeInput, type VerificationCodeInputProps, type VerificationCodeSize, index as illustrations, useContextMenu };
|