@skalar-saas/design-system 0.1.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -0
- package/dist/design-system.css +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useDebounce.d.ts +7 -0
- package/dist/index-CVAu6nrM.cjs +15 -0
- package/dist/index-CVAu6nrM.cjs.map +1 -0
- package/dist/index-D9hMGhK3.js +6790 -0
- package/dist/index-D9hMGhK3.js.map +1 -0
- package/dist/index.d.ts +130 -0
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +11508 -0
- package/dist/index.mjs.map +1 -0
- package/dist/layout/Container/Container.d.ts +62 -0
- package/dist/layout/Container/index.d.ts +2 -0
- package/dist/layout/PanelLayout/Panel.d.ts +20 -0
- package/dist/layout/PanelLayout/PanelContext.d.ts +10 -0
- package/dist/layout/PanelLayout/PanelLayout.d.ts +28 -0
- package/dist/layout/PanelLayout/PanelLayout.types.d.ts +146 -0
- package/dist/layout/PanelLayout/PanelMain.d.ts +19 -0
- package/dist/layout/PanelLayout/index.d.ts +6 -0
- package/dist/layout/PanelLayout/panelUtils.d.ts +74 -0
- package/dist/layout/PanelLayout/usePanelState.d.ts +25 -0
- package/dist/layout/Section/Section.d.ts +20 -0
- package/dist/layout/Section/index.d.ts +2 -0
- package/dist/layout/SplitPanelLayout/SplitPanelLayout.d.ts +57 -0
- package/dist/layout/SplitPanelLayout/index.d.ts +2 -0
- package/dist/layout/constants.d.ts +348 -0
- package/dist/layout/index.d.ts +31 -0
- package/dist/shared/icons/AICommentaryIcon.d.ts +11 -0
- package/dist/shared/icons/AIMessage.d.ts +2 -0
- package/dist/shared/icons/Add2Icon.d.ts +12 -0
- package/dist/shared/icons/AddIcon.d.ts +7 -0
- package/dist/shared/icons/ArrowNarrowDownIcon.d.ts +6 -0
- package/dist/shared/icons/BookOutlined.d.ts +10 -0
- package/dist/shared/icons/Box2Icon.d.ts +6 -0
- package/dist/shared/icons/BoxIcon.d.ts +11 -0
- package/dist/shared/icons/CalendarIcon.d.ts +11 -0
- package/dist/shared/icons/CalendarIcon2.d.ts +12 -0
- package/dist/shared/icons/ChatIcon.d.ts +11 -0
- package/dist/shared/icons/ChevronDownIcon.d.ts +6 -0
- package/dist/shared/icons/ChevronUpIcon.d.ts +6 -0
- package/dist/shared/icons/CircleIcon.d.ts +6 -0
- package/dist/shared/icons/CopyIcon.d.ts +12 -0
- package/dist/shared/icons/DataArrowsOutlined.d.ts +10 -0
- package/dist/shared/icons/Edit2Icon.d.ts +12 -0
- package/dist/shared/icons/EyeIcon.d.ts +12 -0
- package/dist/shared/icons/EyeOffIcon.d.ts +12 -0
- package/dist/shared/icons/FilterFunnel02Icon.d.ts +6 -0
- package/dist/shared/icons/FlashIcon.d.ts +12 -0
- package/dist/shared/icons/GridIcon.d.ts +12 -0
- package/dist/shared/icons/InfoIcon.d.ts +12 -0
- package/dist/shared/icons/LayerIcon.d.ts +12 -0
- package/dist/shared/icons/LeftArrowIcon.d.ts +5 -0
- package/dist/shared/icons/MaximizeIcon.d.ts +12 -0
- package/dist/shared/icons/MessageProgrammingOutlined.d.ts +10 -0
- package/dist/shared/icons/MoreIcon.d.ts +12 -0
- package/dist/shared/icons/PlusCircleIcon.d.ts +6 -0
- package/dist/shared/icons/ProgrammingArrowsOutlined.d.ts +10 -0
- package/dist/shared/icons/QuestionCircle.d.ts +11 -0
- package/dist/shared/icons/RightArrowIcon.d.ts +5 -0
- package/dist/shared/icons/ShareIcon.d.ts +6 -0
- package/dist/shared/icons/SkalarLogo.d.ts +13 -0
- package/dist/shared/icons/SkalarLogoNoText.d.ts +13 -0
- package/dist/shared/icons/SlashIcon.d.ts +5 -0
- package/dist/shared/icons/SliderPointerDown.d.ts +10 -0
- package/dist/shared/icons/SliderPointerUp.d.ts +10 -0
- package/dist/shared/icons/SliderThumbIcon.d.ts +10 -0
- package/dist/shared/icons/StraightInfoIcon.d.ts +11 -0
- package/dist/shared/icons/TrashIcon.d.ts +12 -0
- package/dist/shared/icons/UnionIcon.d.ts +12 -0
- package/dist/shared/icons/UploadImageIcon.d.ts +10 -0
- package/dist/shared/icons/VideoPlayOutlined.d.ts +10 -0
- package/dist/shared/icons/XMark.d.ts +11 -0
- package/dist/shared/icons/XMarkAlert.d.ts +11 -0
- package/dist/shared/icons/index.d.ts +83 -0
- package/dist/shared/ui/Alert/Alert.d.ts +95 -0
- package/dist/shared/ui/Alert/index.d.ts +1 -0
- package/dist/shared/ui/AttachmentMessage/AttachmentMessage.d.ts +29 -0
- package/dist/shared/ui/AttachmentMessage/index.d.ts +1 -0
- package/dist/shared/ui/AuthActionWidget/AuthActionWidget.d.ts +18 -0
- package/dist/shared/ui/AuthActionWidget/index.d.ts +2 -0
- package/dist/shared/ui/AuthFormWidget/AuthFormWidget.d.ts +27 -0
- package/dist/shared/ui/AuthFormWidget/index.d.ts +2 -0
- package/dist/shared/ui/AuthSocialOptionsWidget/AuthSocialOptionsWidget.d.ts +25 -0
- package/dist/shared/ui/AuthSocialOptionsWidget/index.d.ts +2 -0
- package/dist/shared/ui/Avatar/Avatar.d.ts +38 -0
- package/dist/shared/ui/Avatar/index.d.ts +1 -0
- package/dist/shared/ui/AvatarGroup/AvatarGroup.d.ts +39 -0
- package/dist/shared/ui/AvatarGroup/index.d.ts +1 -0
- package/dist/shared/ui/Badge/Badge.d.ts +40 -0
- package/dist/shared/ui/Badge/index.d.ts +1 -0
- package/dist/shared/ui/BreadCrumb/BreadCrumb.d.ts +12 -0
- package/dist/shared/ui/BreadCrumb/index.d.ts +1 -0
- package/dist/shared/ui/Button/Button.d.ts +47 -0
- package/dist/shared/ui/Button/index.d.ts +1 -0
- package/dist/shared/ui/ButtonDropdown/ButtonDropdown.d.ts +53 -0
- package/dist/shared/ui/ButtonDropdown/index.d.ts +1 -0
- package/dist/shared/ui/ButtonGroup/ButtonGroup.d.ts +39 -0
- package/dist/shared/ui/ButtonGroup/index.d.ts +1 -0
- package/dist/shared/ui/Card/Card.d.ts +46 -0
- package/dist/shared/ui/Card/index.d.ts +2 -0
- package/dist/shared/ui/CardAction/CardAction.d.ts +28 -0
- package/dist/shared/ui/CardAction/index.d.ts +2 -0
- package/dist/shared/ui/ChatCollapsibleCheck/ChatCollapsibleCheck.d.ts +54 -0
- package/dist/shared/ui/ChatCollapsibleCheck/index.d.ts +2 -0
- package/dist/shared/ui/ChatCollapsibleContainer/ChatCollapsibleContainer.d.ts +32 -0
- package/dist/shared/ui/ChatCollapsibleContainer/index.d.ts +2 -0
- package/dist/shared/ui/ChatCollapsibleDialog/ChatCollapsibleDialog.d.ts +43 -0
- package/dist/shared/ui/ChatCollapsibleDialog/index.d.ts +2 -0
- package/dist/shared/ui/ChatCommandList/ChatCommandList.d.ts +78 -0
- package/dist/shared/ui/ChatCommandList/index.d.ts +2 -0
- package/dist/shared/ui/ChatCommandListItem/ChatCommandListItem.d.ts +88 -0
- package/dist/shared/ui/ChatCommandListItem/index.d.ts +2 -0
- package/dist/shared/ui/ChatHeader/ChatHeader.d.ts +38 -0
- package/dist/shared/ui/ChatHeader/index.d.ts +1 -0
- package/dist/shared/ui/ChatHistorial/ChatHistorial.d.ts +49 -0
- package/dist/shared/ui/ChatHistorial/index.d.ts +2 -0
- package/dist/shared/ui/ChatHistorialItem/ChatHistorialItem.d.ts +33 -0
- package/dist/shared/ui/ChatHistorialItem/index.d.ts +2 -0
- package/dist/shared/ui/ChatInputText/ChatInputText.d.ts +36 -0
- package/dist/shared/ui/ChatInputText/index.d.ts +1 -0
- package/dist/shared/ui/ChatMessage/ChatMessage.d.ts +27 -0
- package/dist/shared/ui/ChatMessage/index.d.ts +2 -0
- package/dist/shared/ui/ChatMessageOptions/ChatMessageOptions.d.ts +30 -0
- package/dist/shared/ui/ChatMessageOptions/index.d.ts +2 -0
- package/dist/shared/ui/ChatPanel/ChatPanel.d.ts +57 -0
- package/dist/shared/ui/ChatPanel/ChatPanel.types.d.ts +171 -0
- package/dist/shared/ui/ChatPanel/index.d.ts +2 -0
- package/dist/shared/ui/ChatTypingIndicator/ChatTypingIndicator.d.ts +17 -0
- package/dist/shared/ui/ChatTypingIndicator/index.d.ts +1 -0
- package/dist/shared/ui/Checkbox/Checkbox.d.ts +26 -0
- package/dist/shared/ui/Checkbox/index.d.ts +1 -0
- package/dist/shared/ui/Chip/Chip.d.ts +35 -0
- package/dist/shared/ui/Chip/index.d.ts +1 -0
- package/dist/shared/ui/ColorPalette/ColorPalette.d.ts +9 -0
- package/dist/shared/ui/ColumnHandler/ColumnHandler.d.ts +17 -0
- package/dist/shared/ui/ColumnHandler/PanelHandle.d.ts +32 -0
- package/dist/shared/ui/ColumnHandler/index.d.ts +4 -0
- package/dist/shared/ui/ComboBox/ComboBox.d.ts +69 -0
- package/dist/shared/ui/ComboBox/index.d.ts +1 -0
- package/dist/shared/ui/ContextualMenu/ContextualMenu.d.ts +47 -0
- package/dist/shared/ui/ContextualMenu/index.d.ts +2 -0
- package/dist/shared/ui/DateRangePicker/DateRangePicker.d.ts +47 -0
- package/dist/shared/ui/DateRangePicker/index.d.ts +1 -0
- package/dist/shared/ui/Divider/Divider.d.ts +8 -0
- package/dist/shared/ui/Divider/index.d.ts +1 -0
- package/dist/shared/ui/DragAndDropListItem/DragAndDropListItem.d.ts +54 -0
- package/dist/shared/ui/DragAndDropListItem/index.d.ts +2 -0
- package/dist/shared/ui/DropMenu/DropMenu.d.ts +58 -0
- package/dist/shared/ui/DropMenu/index.d.ts +1 -0
- package/dist/shared/ui/DropZone/DropZone.d.ts +47 -0
- package/dist/shared/ui/DropZone/index.d.ts +2 -0
- package/dist/shared/ui/Dropdown/Dropdown.d.ts +66 -0
- package/dist/shared/ui/Dropdown/index.d.ts +1 -0
- package/dist/shared/ui/DropdownMenu/DropdownMenu.d.ts +37 -0
- package/dist/shared/ui/ErrorBoundary/ErrorBoundary.d.ts +46 -0
- package/dist/shared/ui/ErrorBoundary/index.d.ts +2 -0
- package/dist/shared/ui/ErrorState/ErrorState.d.ts +51 -0
- package/dist/shared/ui/ErrorState/index.d.ts +2 -0
- package/dist/shared/ui/FloatingBar/FloatingBar.d.ts +92 -0
- package/dist/shared/ui/FloatingBar/index.d.ts +1 -0
- package/dist/shared/ui/FormFieldGroup/FormFieldGroup.d.ts +9 -0
- package/dist/shared/ui/FormFieldGroup/index.d.ts +2 -0
- package/dist/shared/ui/GridDraggableItem/GridDraggableItem.d.ts +45 -0
- package/dist/shared/ui/GridDraggableItem/index.d.ts +2 -0
- package/dist/shared/ui/Header/Header.d.ts +36 -0
- package/dist/shared/ui/Header/index.d.ts +2 -0
- package/dist/shared/ui/Header/useCalculateHeaderWidths.d.ts +31 -0
- package/dist/shared/ui/HeaderTabs/HeaderTabs.d.ts +36 -0
- package/dist/shared/ui/HeaderTabs/index.d.ts +2 -0
- package/dist/shared/ui/Icon/Icon.d.ts +37 -0
- package/dist/shared/ui/Icon/index.d.ts +1 -0
- package/dist/shared/ui/ImageUploader/ImageUploader.d.ts +38 -0
- package/dist/shared/ui/ImageUploader/index.d.ts +1 -0
- package/dist/shared/ui/InfoLabel/InfoLabel.d.ts +28 -0
- package/dist/shared/ui/InfoLabel/index.d.ts +2 -0
- package/dist/shared/ui/InputField/InputField.d.ts +55 -0
- package/dist/shared/ui/InputField/index.d.ts +1 -0
- package/dist/shared/ui/InputSearch/InputSearch.d.ts +44 -0
- package/dist/shared/ui/InputSearch/index.d.ts +1 -0
- package/dist/shared/ui/Kbd/Kbd.d.ts +8 -0
- package/dist/shared/ui/Kbd/index.d.ts +2 -0
- package/dist/shared/ui/LabelIcon/LabelIcon.d.ts +26 -0
- package/dist/shared/ui/LabelIcon/index.d.ts +2 -0
- package/dist/shared/ui/LabelWithIcon/LabelWithIcon.d.ts +27 -0
- package/dist/shared/ui/LabelWithIcon/index.d.ts +1 -0
- package/dist/shared/ui/LabelWithTooltip/LabelWithTooltip.d.ts +41 -0
- package/dist/shared/ui/LabelWithTooltip/index.d.ts +1 -0
- package/dist/shared/ui/Link/Link.d.ts +39 -0
- package/dist/shared/ui/Link/index.d.ts +1 -0
- package/dist/shared/ui/ListItem/ListItem.d.ts +72 -0
- package/dist/shared/ui/ListItem/index.d.ts +2 -0
- package/dist/shared/ui/Modal/Modal.d.ts +203 -0
- package/dist/shared/ui/Modal/index.d.ts +1 -0
- package/dist/shared/ui/ModuleCard/ModuleCard.d.ts +51 -0
- package/dist/shared/ui/ModuleCard/index.d.ts +1 -0
- package/dist/shared/ui/ModuleFieldItem/ModuleFieldItem.d.ts +53 -0
- package/dist/shared/ui/ModuleFieldItem/index.d.ts +1 -0
- package/dist/shared/ui/PanelHeader/PanelHeader.d.ts +37 -0
- package/dist/shared/ui/PanelHeader/index.d.ts +1 -0
- package/dist/shared/ui/PasswordResetWidget/PasswordResetWidget.d.ts +19 -0
- package/dist/shared/ui/PasswordResetWidget/index.d.ts +2 -0
- package/dist/shared/ui/ProductIcon/ProductIcon.d.ts +25 -0
- package/dist/shared/ui/ProductIcon/index.d.ts +1 -0
- package/dist/shared/ui/Progress/Progress.d.ts +29 -0
- package/dist/shared/ui/Progress/index.d.ts +1 -0
- package/dist/shared/ui/ProgressBar/ProgressBar.d.ts +21 -0
- package/dist/shared/ui/ProgressBar/index.d.ts +1 -0
- package/dist/shared/ui/ProgressCircle/ProgressCircle.d.ts +44 -0
- package/dist/shared/ui/ProgressCircle/index.d.ts +1 -0
- package/dist/shared/ui/ProgressCustomTooltip/ProgressCustomTooltip.d.ts +47 -0
- package/dist/shared/ui/ProgressCustomTooltip/index.d.ts +1 -0
- package/dist/shared/ui/ProgressTracker/ProgressTracker.d.ts +36 -0
- package/dist/shared/ui/ProgressTracker/index.d.ts +1 -0
- package/dist/shared/ui/ProjectActionCard/ProjectActionCard.d.ts +23 -0
- package/dist/shared/ui/ProjectActionCard/index.d.ts +2 -0
- package/dist/shared/ui/ProjectCard/ProjectCard.d.ts +46 -0
- package/dist/shared/ui/ProjectCard/index.d.ts +2 -0
- package/dist/shared/ui/ProjectCardPlan/ProjectCardPlan.d.ts +27 -0
- package/dist/shared/ui/ProjectCardPlan/index.d.ts +2 -0
- package/dist/shared/ui/Radio/Radio.d.ts +24 -0
- package/dist/shared/ui/Radio/index.d.ts +1 -0
- package/dist/shared/ui/RecoveryWidget/RecoveryWidget.d.ts +26 -0
- package/dist/shared/ui/RecoveryWidget/index.d.ts +2 -0
- package/dist/shared/ui/RelatedDataCard/RelatedDataCard.d.ts +47 -0
- package/dist/shared/ui/RelatedDataCard/index.d.ts +1 -0
- package/dist/shared/ui/SettingsCard/SettingsCard.d.ts +24 -0
- package/dist/shared/ui/SettingsCard/index.d.ts +2 -0
- package/dist/shared/ui/SidePanel/SidePanel.d.ts +26 -0
- package/dist/shared/ui/SidePanel/SidePanel.types.d.ts +27 -0
- package/dist/shared/ui/SidePanel/index.d.ts +2 -0
- package/dist/shared/ui/SupportCard/SupportCard.d.ts +19 -0
- package/dist/shared/ui/SupportCard/index.d.ts +2 -0
- package/dist/shared/ui/Switcher/Switcher.d.ts +41 -0
- package/dist/shared/ui/Switcher/index.d.ts +1 -0
- package/dist/shared/ui/Table/Table.d.ts +136 -0
- package/dist/shared/ui/Table/TableBody.d.ts +13 -0
- package/dist/shared/ui/Table/TableCell.d.ts +6 -0
- package/dist/shared/ui/Table/TableColumnFilter.d.ts +11 -0
- package/dist/shared/ui/Table/TableColumnHeader.d.ts +6 -0
- package/dist/shared/ui/Table/TableColumnVisibility.d.ts +7 -0
- package/dist/shared/ui/Table/TableContext.d.ts +31 -0
- package/dist/shared/ui/Table/TableEmptyState.d.ts +16 -0
- package/dist/shared/ui/Table/TableHeader.d.ts +5 -0
- package/dist/shared/ui/Table/TablePagination.d.ts +9 -0
- package/dist/shared/ui/Table/TableRoot.d.ts +6 -0
- package/dist/shared/ui/Table/TableRow.d.ts +8 -0
- package/dist/shared/ui/Table/configParser.d.ts +18 -0
- package/dist/shared/ui/Table/index.d.ts +15 -0
- package/dist/shared/ui/Table/mockData.d.ts +33 -0
- package/dist/shared/ui/Table/types.d.ts +66 -0
- package/dist/shared/ui/Tabs/Tabs.d.ts +59 -0
- package/dist/shared/ui/Tabs/index.d.ts +1 -0
- package/dist/shared/ui/Tag/Tag.d.ts +29 -0
- package/dist/shared/ui/Tag/index.d.ts +1 -0
- package/dist/shared/ui/TextArea/TextArea.d.ts +28 -0
- package/dist/shared/ui/TextArea/index.d.ts +1 -0
- package/dist/shared/ui/ThemeToggle/ThemeToggle.d.ts +29 -0
- package/dist/shared/ui/ThemeToggle/index.d.ts +1 -0
- package/dist/shared/ui/Toast/Toast.d.ts +54 -0
- package/dist/shared/ui/Toast/index.d.ts +2 -0
- package/dist/shared/ui/Toggle/Toggle.d.ts +24 -0
- package/dist/shared/ui/Toggle/index.d.ts +1 -0
- package/dist/shared/ui/Tooltip/Tooltip.d.ts +103 -0
- package/dist/shared/ui/Tooltip/index.d.ts +1 -0
- package/dist/shared/ui/TypesPanel/TypesPanel.d.ts +28 -0
- package/dist/shared/ui/TypesPanel/index.d.ts +2 -0
- package/dist/shared/ui/TypesPanelBodyGrid/TypesPanelBodyGrid.d.ts +45 -0
- package/dist/shared/ui/TypesPanelBodyGrid/index.d.ts +2 -0
- package/dist/shared/ui/TypesPanelBodyList/TypesPanelBodyList.d.ts +45 -0
- package/dist/shared/ui/TypesPanelBodyList/index.d.ts +2 -0
- package/dist/shared/ui/TypesPanelHeader/TypesPanelHeader.d.ts +27 -0
- package/dist/shared/ui/TypesPanelHeader/index.d.ts +2 -0
- package/dist/shared/ui/TypesPanelHeaderSearch/TypesPanelHeaderSearch.d.ts +44 -0
- package/dist/shared/ui/TypesPanelHeaderSearch/index.d.ts +1 -0
- package/dist/shared/ui/UserMenu/UserMenu.d.ts +78 -0
- package/dist/shared/ui/UserMenu/index.d.ts +1 -0
- package/dist/shared/ui/VisualComposer/VisualComposer.d.ts +36 -0
- package/dist/shared/ui/VisualComposer/index.d.ts +2 -0
- package/dist/shared/ui/WidgetBuilderItemHoverAction/WidgetBuilderItemHoverAction.d.ts +15 -0
- package/dist/shared/ui/WidgetBuilderItemHoverAction/index.d.ts +2 -0
- package/dist/shared/ui/WidgetContainer/WidgetContainer.d.ts +23 -0
- package/dist/shared/ui/WidgetContainer/index.d.ts +2 -0
- package/dist/shared/ui/WidgetSidebar/WidgetSidebar.d.ts +70 -0
- package/dist/shared/ui/WidgetSidebar/index.d.ts +2 -0
- package/dist/shared/ui/WorkspaceSettings/WorkspaceSettings.d.ts +22 -0
- package/dist/shared/ui/WorkspaceSettings/index.d.ts +2 -0
- package/dist/shared/ui/index.d.ts +1 -0
- package/dist/shared/ui/slider/Slider.d.ts +96 -0
- package/dist/shared/ui/slider/index.d.ts +2 -0
- package/dist/shared/utils/index.d.ts +1 -0
- package/dist/shared/utils/tailwind.d.ts +9 -0
- package/package.json +112 -0
- package/tailwind.preset.js +278 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { Table, type TableProps, type TableColumn, type TableAction, type SortDirection } from './Table';
|
|
2
|
+
export { TableRoot, type TableRootProps } from './TableRoot';
|
|
3
|
+
export { TableHeader, type TableHeaderProps } from './TableHeader';
|
|
4
|
+
export { TableBody, type TableBodyProps } from './TableBody';
|
|
5
|
+
export { TableRow, type TableRowProps } from './TableRow';
|
|
6
|
+
export { TableCell, type TableCellProps } from './TableCell';
|
|
7
|
+
export { TableColumnHeader, type TableColumnHeaderProps } from './TableColumnHeader';
|
|
8
|
+
export { TableEmptyState, type TableEmptyStateProps } from './TableEmptyState';
|
|
9
|
+
export { TableProvider, useTableContext, type TableContextValue, type TableLayoutOptions } from './TableContext';
|
|
10
|
+
export { TablePagination } from './TablePagination';
|
|
11
|
+
export { TableColumnFilter } from './TableColumnFilter';
|
|
12
|
+
export { TableColumnVisibility } from './TableColumnVisibility';
|
|
13
|
+
export type { TableConfig, TableColumnConfig, TableApiResponse, ColumnDataType, FilterType } from './types';
|
|
14
|
+
export { parseTableConfig, parseColumnConfig, addSelectionColumn } from './configParser';
|
|
15
|
+
export * from './mockData';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mock data simulating API responses for the Table component
|
|
3
|
+
* This demonstrates how the table would receive configuration and data from the backend
|
|
4
|
+
*/
|
|
5
|
+
import type { TableApiResponse, TableConfig } from './types';
|
|
6
|
+
export interface ApiUser extends Record<string, unknown> {
|
|
7
|
+
id: number;
|
|
8
|
+
avatar: string;
|
|
9
|
+
name: string;
|
|
10
|
+
email: string;
|
|
11
|
+
status: 'active' | 'inactive' | 'pending';
|
|
12
|
+
role: string;
|
|
13
|
+
department: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
loginCount: number;
|
|
16
|
+
isVerified: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const usersTableConfig: TableConfig;
|
|
19
|
+
export declare const usersTableData: ApiUser[];
|
|
20
|
+
export declare const usersApiResponse: TableApiResponse<ApiUser>;
|
|
21
|
+
export interface Product extends Record<string, unknown> {
|
|
22
|
+
id: number;
|
|
23
|
+
name: string;
|
|
24
|
+
category: string;
|
|
25
|
+
price: number;
|
|
26
|
+
stock: number;
|
|
27
|
+
isActive: boolean;
|
|
28
|
+
lastUpdated: string;
|
|
29
|
+
sku: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const productsTableConfig: TableConfig;
|
|
32
|
+
export declare const productsTableData: Product[];
|
|
33
|
+
export declare const productsApiResponse: TableApiResponse<Product>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for JSON-based table configuration
|
|
3
|
+
* These types represent the structure that would come from the API
|
|
4
|
+
*/
|
|
5
|
+
export type ColumnDataType = 'text' | 'number' | 'date' | 'boolean' | 'avatar' | 'tag' | 'email' | 'custom';
|
|
6
|
+
export type FilterType = 'text' | 'select' | 'date' | 'number' | 'boolean' | 'multiselect';
|
|
7
|
+
/**
|
|
8
|
+
* Column configuration from API
|
|
9
|
+
*/
|
|
10
|
+
export interface TableColumnConfig {
|
|
11
|
+
/** Unique identifier for the column */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Header label */
|
|
14
|
+
header: string;
|
|
15
|
+
/** Data type for automatic rendering */
|
|
16
|
+
dataType: ColumnDataType;
|
|
17
|
+
/** Enable sorting for this column */
|
|
18
|
+
sortable?: boolean;
|
|
19
|
+
/** Enable filtering for this column */
|
|
20
|
+
filterable?: boolean;
|
|
21
|
+
/** Filter configuration */
|
|
22
|
+
filterConfig?: {
|
|
23
|
+
type: FilterType;
|
|
24
|
+
options?: Array<{
|
|
25
|
+
label: string;
|
|
26
|
+
value: string | number;
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
/** Column width (optional) */
|
|
30
|
+
width?: string;
|
|
31
|
+
/** Component-specific props */
|
|
32
|
+
componentProps?: Record<string, unknown>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Complete table configuration from API
|
|
36
|
+
*/
|
|
37
|
+
export interface TableConfig {
|
|
38
|
+
/** Table metadata */
|
|
39
|
+
title: string;
|
|
40
|
+
/** Column definitions */
|
|
41
|
+
columns: TableColumnConfig[];
|
|
42
|
+
/** Feature flags */
|
|
43
|
+
features?: {
|
|
44
|
+
selectable?: boolean;
|
|
45
|
+
virtualized?: boolean;
|
|
46
|
+
pagination?: boolean;
|
|
47
|
+
sorting?: boolean;
|
|
48
|
+
filtering?: boolean;
|
|
49
|
+
};
|
|
50
|
+
/** Pagination config */
|
|
51
|
+
pagination?: {
|
|
52
|
+
itemsPerPage: number;
|
|
53
|
+
currentPage: number;
|
|
54
|
+
totalPages: number;
|
|
55
|
+
totalItems: number;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* API response structure
|
|
60
|
+
*/
|
|
61
|
+
export interface TableApiResponse<T = unknown> {
|
|
62
|
+
/** Table configuration */
|
|
63
|
+
config: TableConfig;
|
|
64
|
+
/** Actual data rows */
|
|
65
|
+
data: T[];
|
|
66
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type TabVariant = "line" | "line-icons" | "line-full-width" | "pill" | "only-icon";
|
|
3
|
+
/**
|
|
4
|
+
* Defines the shape for a single tab's data, including its label,
|
|
5
|
+
* icon (optional), and the content to be displayed.
|
|
6
|
+
*/
|
|
7
|
+
export interface TabItem {
|
|
8
|
+
id: number | string;
|
|
9
|
+
label: string;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
selectedIcon?: React.ReactNode;
|
|
12
|
+
content: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Defines the public API for the Tabs component.
|
|
16
|
+
*/
|
|
17
|
+
export interface TabsProps {
|
|
18
|
+
/** The visual style of the tabs. */
|
|
19
|
+
variant?: TabVariant;
|
|
20
|
+
/** An array of tab objects to be rendered. */
|
|
21
|
+
tabs: TabItem[];
|
|
22
|
+
/** Optional custom classes for the container. */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** The index of the selected tab. */
|
|
25
|
+
selectedIndex?: number;
|
|
26
|
+
/** Callback fired when a tab is selected. */
|
|
27
|
+
onChange?: (index: number) => void;
|
|
28
|
+
/** Optional custom padding bottom for tab buttons. Accepts any CSS value (e.g., '8px', '12px', '1rem'). */
|
|
29
|
+
customPaddingBottom?: string;
|
|
30
|
+
/** Controls the spacing between tabs and content. Accepts size names or pixel values. Default is 'sm' (16px). */
|
|
31
|
+
contentSpacing?: "xs" | "sm" | "md" | "lg" | "xl" | "none" | number;
|
|
32
|
+
/** Enable full height mode with flex layout. Useful for tabs that need to fill parent container. Default is false. */
|
|
33
|
+
fullHeight?: boolean;
|
|
34
|
+
/** Controls the gap between icon and label in tabs. Default is 4 (16px). Accepts values 0-8. */
|
|
35
|
+
iconLabelGap?: number;
|
|
36
|
+
/** Controls the size of icons in tabs. Default is 20px. */
|
|
37
|
+
iconSize?: number;
|
|
38
|
+
/** Show border on line variants. Default is true. */
|
|
39
|
+
showBorder?: boolean;
|
|
40
|
+
/** Fixed height for the tab list header in pixels. When set, tabs are vertically centered (e.g., 56 for 56px). */
|
|
41
|
+
headerHeight?: number;
|
|
42
|
+
/** Horizontal padding for individual tab buttons in pixels (e.g., 16 for 16px). */
|
|
43
|
+
tabPaddingX?: number;
|
|
44
|
+
/** Optional custom classes for the tab list. */
|
|
45
|
+
tabListClassName?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @file An accessible and themeable tabs component for content navigation.
|
|
49
|
+
* @description This component renders a set of tabs and their corresponding content panels.
|
|
50
|
+
* It is built on top of Headless UI for robust accessibility, keyboard navigation, and state management.
|
|
51
|
+
* The visual appearance is controlled by the `variant` prop, which selects a style from a centralized configuration.
|
|
52
|
+
*
|
|
53
|
+
* @param {TabVariant} [variant='line'] - The visual style of the tabs.
|
|
54
|
+
* @param {TabItem[]} tabs - An array of objects, where each object defines a tab's label, icon, and content.
|
|
55
|
+
* @param {string} [className] - Optional CSS classes for additional styling on the main container.
|
|
56
|
+
* @returns {JSX.Element} The rendered Tabs element.
|
|
57
|
+
*/
|
|
58
|
+
export declare const Tabs: ({ variant, tabs, className, selectedIndex, onChange, customPaddingBottom, contentSpacing, fullHeight, iconLabelGap, iconSize, showBorder, headerHeight, tabPaddingX, tabListClassName, }: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tabs, type TabsProps, type TabItem } from './Tabs';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type TagVariant = "primary" | "secondary" | "tertiary" | "quaternary" | "success" | "danger" | "warning" | "info";
|
|
3
|
+
type TagSize = "xs" | "sm";
|
|
4
|
+
/**
|
|
5
|
+
* Defines the public API for the Tag component, extending standard button element attributes.
|
|
6
|
+
*/
|
|
7
|
+
export interface TagProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
|
+
variant?: TagVariant;
|
|
9
|
+
size?: TagSize;
|
|
10
|
+
leadingIcon?: React.ReactNode | boolean;
|
|
11
|
+
trailingIcon?: React.ReactNode | boolean;
|
|
12
|
+
onTrailingIconClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @file A styled Tag component that functions as an interactive button.
|
|
17
|
+
* @description This component is typically used for filters, categories, or actions that might
|
|
18
|
+
* open a dropdown. It features a configurable leading icon and a fixed trailing icon.
|
|
19
|
+
* Its appearance is determined by a combination of `variant` and `size` props.
|
|
20
|
+
*
|
|
21
|
+
* @param {TagVariant} [variant='primary'] - The color theme of the tag.
|
|
22
|
+
* @param {TagSize} [size='sm'] - The size of the tag.
|
|
23
|
+
* @param {React.ReactNode | boolean} [leadingIcon=true] - If `true`, shows a default icon. Can also accept a custom icon component.
|
|
24
|
+
* @param {React.ReactNode} children - The text content of the tag.
|
|
25
|
+
* @param {boolean} [disabled] - If true, the tag will be non-interactive.
|
|
26
|
+
* @returns {JSX.Element} The rendered Tag element.
|
|
27
|
+
*/
|
|
28
|
+
export declare const Tag: ({ variant, size, leadingIcon, trailingIcon, onTrailingIconClick, children, className, disabled, ...props }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tag } from './Tag';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type TextAreaVariant = 'default' | 'danger';
|
|
3
|
+
type TextAreaResize = 'none' | 'vertical' | 'horizontal' | 'both';
|
|
4
|
+
export interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
5
|
+
variant?: TextAreaVariant;
|
|
6
|
+
label?: string;
|
|
7
|
+
hint?: string;
|
|
8
|
+
resize?: TextAreaResize;
|
|
9
|
+
customFontWeight?: number;
|
|
10
|
+
customBackground?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @file A styled multi-line text input component for forms.
|
|
14
|
+
* @description This component provides a complete textarea unit, including a label, hint text,
|
|
15
|
+
* and different visual states. Its appearance is controlled by the `variant` prop, which
|
|
16
|
+
* pulls styles from a centralized configuration object for easy theming and maintenance.
|
|
17
|
+
*
|
|
18
|
+
* @param {TextAreaVariant} [variant='default'] - The visual variant of the textarea.
|
|
19
|
+
* @param {string} [label] - The text label displayed above the textarea.
|
|
20
|
+
* @param {string} [hint] - Helper text or an error message displayed below.
|
|
21
|
+
* @param {TextAreaResize} [resize='vertical'] - Controls if and how the textarea can be resized.
|
|
22
|
+
* @param {number} [customFontWeight] - Custom font weight (numeric value like 400, 500, 600, 700, etc.). Overrides default weight.
|
|
23
|
+
* @param {string} [customBackground] - Custom background color (supports CSS color values or CSS variable names like 'med-em').
|
|
24
|
+
* @param {boolean} [disabled] - If true, the textarea will be non-interactive.
|
|
25
|
+
* @returns {JSX.Element} The rendered TextArea element.
|
|
26
|
+
*/
|
|
27
|
+
export declare const TextArea: ({ variant, label, hint, disabled, resize, className, customFontWeight, customBackground, ...props }: TextAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextArea } from './TextArea';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface ThemeToggleProps {
|
|
2
|
+
/** Current theme: 'dark' or 'light' */
|
|
3
|
+
theme?: 'dark' | 'light';
|
|
4
|
+
/** Callback to toggle theme */
|
|
5
|
+
onToggle: () => void;
|
|
6
|
+
/** Optional custom class name */
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A simple theme toggle button component.
|
|
11
|
+
* This component is framework-agnostic and doesn't manage theme state internally.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* // With next-themes
|
|
16
|
+
* import { useTheme } from 'next-themes';
|
|
17
|
+
*
|
|
18
|
+
* function MyComponent() {
|
|
19
|
+
* const { theme, setTheme } = useTheme();
|
|
20
|
+
* return (
|
|
21
|
+
* <ThemeToggle
|
|
22
|
+
* theme={theme as 'dark' | 'light'}
|
|
23
|
+
* onToggle={() => setTheme(theme === 'dark' ? 'light' : 'dark')}
|
|
24
|
+
* />
|
|
25
|
+
* );
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function ThemeToggle({ theme, onToggle, className }: ThemeToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThemeToggle } from './ThemeToggle';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface ToastProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
variant?: "default" | "danger" | "success" | "warning" | "custom";
|
|
6
|
+
action?: {
|
|
7
|
+
label: string;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
};
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
duration?: number;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
className?: string;
|
|
15
|
+
iconSize?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const ToastComponent: import("react").ForwardRefExoticComponent<ToastProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
18
|
+
/**
|
|
19
|
+
* Hook to access toast functionality.
|
|
20
|
+
* @throws {Error} If used outside of ToastProvider
|
|
21
|
+
* @returns {ToastContextValue} Toast context value
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* const { toast } = useToast();
|
|
25
|
+
* // Example usage:
|
|
26
|
+
* toast({
|
|
27
|
+
* title: "Notification",
|
|
28
|
+
* description: "This is a toast notification",
|
|
29
|
+
* variant: "success",
|
|
30
|
+
* action: {
|
|
31
|
+
* label: "Undo",
|
|
32
|
+
* onClick: () => console.log("Undo clicked"),
|
|
33
|
+
* },
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
export declare const useToast: () => {
|
|
38
|
+
toast: (options: Omit<ToastProps, "children" | "onOpenChange">) => void;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Provides a context for toast functionality.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* <ToastProvider>
|
|
45
|
+
* <MyComponent />
|
|
46
|
+
* </ToastProvider>
|
|
47
|
+
*
|
|
48
|
+
* @param {ReactNode} children - The children elements to render inside the provider.
|
|
49
|
+
*
|
|
50
|
+
* @returns {ReactElement} - The rendered provider element.
|
|
51
|
+
*/
|
|
52
|
+
export declare const ToastProvider: ({ children }: {
|
|
53
|
+
children: ReactNode;
|
|
54
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ToggleSize = 'small' | 'medium' | 'large';
|
|
3
|
+
/**
|
|
4
|
+
* Defines the public API for the Toggle component, omitting the native 'size'
|
|
5
|
+
* attribute to avoid conflicts with the custom size prop.
|
|
6
|
+
*/
|
|
7
|
+
export interface ToggleProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
8
|
+
/** The size of the toggle switch. */
|
|
9
|
+
size?: ToggleSize;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @file A customizable toggle switch component for binary state selection.
|
|
13
|
+
* @description This component renders a visually styled toggle that wraps a native,
|
|
14
|
+
* accessible checkbox input. It uses the `peer` utility from Tailwind CSS to react
|
|
15
|
+
* to the state of the hidden checkbox.
|
|
16
|
+
*
|
|
17
|
+
* @param {'small' | 'medium' | 'large'} [size='medium'] - The size of the toggle switch.
|
|
18
|
+
* @param {boolean} [checked] - The controlled state of the toggle (on/off).
|
|
19
|
+
* @param {boolean} [disabled] - If true, the toggle will be non-interactive.
|
|
20
|
+
* @param {function} [onChange] - The callback function fired when the toggle state changes.
|
|
21
|
+
* @returns {JSX.Element} The rendered Toggle element.
|
|
22
|
+
*/
|
|
23
|
+
export declare const Toggle: ({ size, checked, disabled, className, ...props }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toggle } from './Toggle';
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonVariant, ButtonHierarchy, ButtonSize } from '../Button/Button';
|
|
3
|
+
/**
|
|
4
|
+
* Tooltip positioning
|
|
5
|
+
*/
|
|
6
|
+
export type TooltipSide = 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for a button in the tooltip
|
|
9
|
+
*/
|
|
10
|
+
export interface TooltipButtonConfig {
|
|
11
|
+
/** The text to display on the button */
|
|
12
|
+
text: string;
|
|
13
|
+
/** Click handler for the button */
|
|
14
|
+
onClick: () => void;
|
|
15
|
+
/** Button variant. Defaults to 'neutral'. */
|
|
16
|
+
variant?: ButtonVariant;
|
|
17
|
+
/** Button hierarchy. Defaults to 'secondary'. */
|
|
18
|
+
hierarchy?: ButtonHierarchy;
|
|
19
|
+
/** Button size. Defaults to 'xs'. */
|
|
20
|
+
size?: ButtonSize;
|
|
21
|
+
/** Whether the button is disabled. Defaults to false. */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Defines the public API for the Tooltip component.
|
|
26
|
+
*/
|
|
27
|
+
export interface TooltipProps {
|
|
28
|
+
/** The element that triggers the tooltip on hover. */
|
|
29
|
+
children: React.ReactElement;
|
|
30
|
+
/** The content to display inside the tooltip. */
|
|
31
|
+
content: React.ReactNode;
|
|
32
|
+
/** The preferred side of the trigger to render against. Defaults to 'top'. */
|
|
33
|
+
side?: TooltipSide;
|
|
34
|
+
/** The distance in pixels from the trigger. Defaults to 5. */
|
|
35
|
+
sideOffset?: number;
|
|
36
|
+
/** Whether to show the tooltip arrow. Defaults to true. */
|
|
37
|
+
showArrow?: boolean;
|
|
38
|
+
/** Optional custom classes for the tooltip content. */
|
|
39
|
+
className?: string;
|
|
40
|
+
/** Optional custom max width. Defaults to 'max-w-xs'. */
|
|
41
|
+
maxWidth?: string;
|
|
42
|
+
/** Optional delay duration in milliseconds before showing tooltip. */
|
|
43
|
+
delayDuration?: number;
|
|
44
|
+
/** Whether the tooltip is disabled. Defaults to false. */
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
/** Optional primary button configuration */
|
|
47
|
+
primaryButton?: TooltipButtonConfig;
|
|
48
|
+
/** Optional secondary button configuration */
|
|
49
|
+
secondaryButton?: TooltipButtonConfig;
|
|
50
|
+
/** Optional custom background color. Overrides default white background. */
|
|
51
|
+
customBackground?: string;
|
|
52
|
+
/** Optional custom text color. Overrides default text-high-em. */
|
|
53
|
+
customTextColor?: string;
|
|
54
|
+
/** Optional custom font size. Overrides default text-xs. */
|
|
55
|
+
customFontSize?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @file A reusable tooltip component for providing contextual information.
|
|
59
|
+
* @description This component wraps any trigger element and displays a tooltip with additional
|
|
60
|
+
* information on hover. Built on top of Radix UI's Tooltip primitive for robust accessibility
|
|
61
|
+
* and positioning.
|
|
62
|
+
*
|
|
63
|
+
* Designed to be used with any element that needs contextual help or additional information.
|
|
64
|
+
*
|
|
65
|
+
* **Important:** This component requires a `TooltipProvider` to be present in the component tree.
|
|
66
|
+
* Add `<TooltipProvider>` at your app root or page level:
|
|
67
|
+
*
|
|
68
|
+
* ```tsx
|
|
69
|
+
* import { TooltipProvider } from '@radix-ui/react-tooltip';
|
|
70
|
+
*
|
|
71
|
+
* function App() {
|
|
72
|
+
* return (
|
|
73
|
+
* <TooltipProvider delayDuration={200}>
|
|
74
|
+
* <YourComponents />
|
|
75
|
+
* </TooltipProvider>
|
|
76
|
+
* );
|
|
77
|
+
* }
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* @param {React.ReactElement} children - The element that triggers the tooltip.
|
|
81
|
+
* @param {React.ReactNode} content - The content to be shown inside the tooltip.
|
|
82
|
+
* @param {TooltipVariant} [variant='neutral'] - The visual variant (neutral, success, danger, warning, info).
|
|
83
|
+
* @param {TooltipSide} [side='top'] - The preferred side to render the tooltip.
|
|
84
|
+
* @param {number} [sideOffset=5] - The distance in pixels from the trigger.
|
|
85
|
+
* @param {boolean} [showArrow=true] - Whether to display the tooltip arrow.
|
|
86
|
+
* @param {string} [className] - Optional custom classes for the tooltip content.
|
|
87
|
+
* @param {string} [maxWidth='max-w-xs'] - Optional custom max width class.
|
|
88
|
+
* @param {number} [delayDuration] - Optional delay before showing tooltip (inherited from provider if not set).
|
|
89
|
+
* @param {boolean} [disabled=false] - Whether the tooltip is disabled.
|
|
90
|
+
* @returns {JSX.Element} The rendered Tooltip element.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```tsx
|
|
94
|
+
* <Tooltip content="This is helpful information">
|
|
95
|
+
* <Button>Hover me</Button>
|
|
96
|
+
* </Tooltip>
|
|
97
|
+
*
|
|
98
|
+
* <Tooltip content="Additional info" side="right">
|
|
99
|
+
* <Icon name="info" />
|
|
100
|
+
* </Tooltip>
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
export declare const Tooltip: ({ children, content, side, sideOffset, showArrow, className, maxWidth, delayDuration, disabled, primaryButton, secondaryButton, customBackground, customTextColor, customFontSize, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tooltip, type TooltipProps, type TooltipSide, type TooltipButtonConfig } from './Tooltip';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the TypesPanel component
|
|
4
|
+
*/
|
|
5
|
+
export interface TypesPanelProps {
|
|
6
|
+
/**
|
|
7
|
+
* Content to be rendered inside the panel
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Additional CSS classes to apply to the panel container
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Which side should have a border
|
|
16
|
+
* - 'left': Left border
|
|
17
|
+
* - 'right': Right border
|
|
18
|
+
* - 'none': No border
|
|
19
|
+
*/
|
|
20
|
+
borderSide?: 'left' | 'right' | 'none';
|
|
21
|
+
/**
|
|
22
|
+
* Border color style from design system
|
|
23
|
+
* - 'surface-3': Lighter border (default)
|
|
24
|
+
* - 'surface-4': Darker border
|
|
25
|
+
*/
|
|
26
|
+
borderStyle?: 'surface-3' | 'surface-4';
|
|
27
|
+
}
|
|
28
|
+
export declare const TypesPanel: React.NamedExoticComponent<TypesPanelProps>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Field type item structure
|
|
4
|
+
*/
|
|
5
|
+
export interface FieldType {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
icon: React.ReactNode;
|
|
9
|
+
category: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Category structure
|
|
13
|
+
*/
|
|
14
|
+
export interface Category {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
items: FieldType[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Props interface for the TypesPanelBodyGrid component.
|
|
21
|
+
*/
|
|
22
|
+
export interface TypesPanelBodyGridProps {
|
|
23
|
+
/**
|
|
24
|
+
* Array of categories with items to display
|
|
25
|
+
* Component will render these categories in grid layout
|
|
26
|
+
*/
|
|
27
|
+
categories?: Category[];
|
|
28
|
+
/**
|
|
29
|
+
* Optional callback when an item is clicked
|
|
30
|
+
*/
|
|
31
|
+
onItemClick?: (itemId: string) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Optional custom render function for each item
|
|
34
|
+
* Allows consumers to wrap items with custom behavior (e.g., drag & drop)
|
|
35
|
+
* If not provided, uses default GridDraggableItem rendering
|
|
36
|
+
*/
|
|
37
|
+
renderItem?: (item: FieldType, options: {
|
|
38
|
+
onClick: () => void;
|
|
39
|
+
}) => React.ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Optional custom CSS classes
|
|
42
|
+
*/
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare const TypesPanelBodyGrid: React.FC<TypesPanelBodyGridProps>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Field type item structure
|
|
4
|
+
*/
|
|
5
|
+
export interface FieldType {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
icon: React.ReactNode;
|
|
9
|
+
category: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Category structure
|
|
13
|
+
*/
|
|
14
|
+
export interface Category {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
items: FieldType[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Props interface for the TypesPanelBodyList component.
|
|
21
|
+
*/
|
|
22
|
+
export interface TypesPanelBodyListProps {
|
|
23
|
+
/**
|
|
24
|
+
* Array of categories with items to display
|
|
25
|
+
* Component will render these categories in list layout
|
|
26
|
+
*/
|
|
27
|
+
categories?: Category[];
|
|
28
|
+
/**
|
|
29
|
+
* Optional callback when an item is clicked
|
|
30
|
+
*/
|
|
31
|
+
onItemClick?: (itemId: string) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Optional custom render function for each item
|
|
34
|
+
* Allows consumers to wrap items with custom behavior (e.g., drag & drop)
|
|
35
|
+
* If not provided, uses default DragAndDropListItem rendering
|
|
36
|
+
*/
|
|
37
|
+
renderItem?: (item: FieldType, options: {
|
|
38
|
+
onClick: () => void;
|
|
39
|
+
}) => React.ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Optional custom CSS classes
|
|
42
|
+
*/
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare const TypesPanelBodyList: React.FC<TypesPanelBodyListProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props interface for the TypesPanelHeader component.
|
|
4
|
+
*/
|
|
5
|
+
export interface TypesPanelHeaderProps {
|
|
6
|
+
/**
|
|
7
|
+
* Optional custom CSS classes
|
|
8
|
+
*/
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Selected category type (controlled)
|
|
12
|
+
*/
|
|
13
|
+
selectedType?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Callback when category type changes
|
|
16
|
+
*/
|
|
17
|
+
onTypeChange?: (type: string) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Selected view mode (list/grid)
|
|
20
|
+
*/
|
|
21
|
+
selectedView?: string | number;
|
|
22
|
+
/**
|
|
23
|
+
* Callback when view mode changes
|
|
24
|
+
*/
|
|
25
|
+
onViewChange?: (view: string | number) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const TypesPanelHeader: React.FC<TypesPanelHeaderProps>;
|