@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,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type BadgeTheme = 'surface' | 'warning' | 'info' | 'success' | 'danger' | 'disabled';
|
|
3
|
+
export type BadgeSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
|
+
export type BadgeVariant = 'outlined' | 'simple' | 'status';
|
|
5
|
+
export type StatusSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
+
export type StatusState = 'success' | 'disabled' | 'danger' | 'warning';
|
|
7
|
+
/**
|
|
8
|
+
* Defines public API for Badge component.
|
|
9
|
+
*/
|
|
10
|
+
export interface BadgeProps {
|
|
11
|
+
/** The theme color of badge. */
|
|
12
|
+
theme?: BadgeTheme;
|
|
13
|
+
/** The size of badge. */
|
|
14
|
+
size?: BadgeSize;
|
|
15
|
+
/** The variant style of badge. */
|
|
16
|
+
variant?: BadgeVariant;
|
|
17
|
+
/** The content to display inside badge. */
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
/** Optional custom CSS classes to apply to the container. */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** The state for status variant (success, disabled, danger, warning). */
|
|
22
|
+
statusState?: StatusState;
|
|
23
|
+
/** The size for status variant (xs, sm, md, lg, xl). */
|
|
24
|
+
statusSize?: StatusSize;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @file A Badge component for displaying status, categories, or labels.
|
|
28
|
+
* @description This component renders a badge with various themes, sizes, and variants.
|
|
29
|
+
* It supports outlined, simple, and status-dot styles with customizable colors and sizes.
|
|
30
|
+
*
|
|
31
|
+
* @param {'primary' | 'surface' | 'secondary' | 'warning' | 'info' | 'success' | 'danger' | 'pink' | 'purple' | 'sky' | 'cyan' | 'emerald' | 'lime' | 'yellow' | 'disabled'} [theme='primary'] - The color theme of badge.
|
|
32
|
+
* @param {'xs' | 'sm' | 'md' | 'lg' } [size='sm'] - The size of badge.
|
|
33
|
+
* @param {'outlined' | 'simple' | 'status-dot' | 'status'} [variant='simple'] - The style variant of badge.
|
|
34
|
+
* @param {React.ReactNode} [children] - The content to display inside badge (not used for status variant).
|
|
35
|
+
* @param {string} [className] - Optional CSS classes for additional styling.
|
|
36
|
+
* @param {'success' | 'disabled' | 'danger' | 'warning'} [statusState='success'] - The state for status variant.
|
|
37
|
+
* @param {'xs' | 'sm' | 'md' | 'lg' | 'xl'} [statusSize='md'] - The size for status variant.
|
|
38
|
+
* @returns {JSX.Element} The rendered Badge element.
|
|
39
|
+
*/
|
|
40
|
+
export declare const Badge: ({ theme, size, variant, children, className, statusState, statusSize, }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Badge';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Breadcrumb({ ...props }: React.ComponentProps<"nav">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
interface BreadcrumbLinkProps extends React.ComponentProps<"a"> {
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function BreadcrumbLink({ asChild, className, ...props }: BreadcrumbLinkProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function BreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BreadCrumb';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ButtonVariant = 'brand' | 'neutral' | 'danger' | 'success' | 'secondary';
|
|
3
|
+
export type ButtonHierarchy = 'primary' | 'secondary' | 'tertiary' | 'quaternary';
|
|
4
|
+
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
5
|
+
export type ButtonIcons = 'both' | 'leading' | 'trailing' | 'none' | 'only';
|
|
6
|
+
/**
|
|
7
|
+
* Map of available hierarchies for each variant
|
|
8
|
+
*/
|
|
9
|
+
export declare const VARIANT_HIERARCHIES: Record<ButtonVariant, ButtonHierarchy[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Defines the public API for the Button component, extending standard button attributes.
|
|
12
|
+
*/
|
|
13
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
14
|
+
variant?: ButtonVariant;
|
|
15
|
+
hierarchy?: ButtonHierarchy;
|
|
16
|
+
size?: ButtonSize;
|
|
17
|
+
icons?: ButtonIcons;
|
|
18
|
+
leadingIcon?: React.ReactNode;
|
|
19
|
+
trailingIcon?: React.ReactNode;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
/** Toggle state for buttons that need to show different icons based on state */
|
|
22
|
+
isToggled?: boolean;
|
|
23
|
+
/** Icon to show when the button is in toggled state */
|
|
24
|
+
toggledLeadingIcon?: React.ReactNode;
|
|
25
|
+
/** Icon to show when trailing icon is in toggled state */
|
|
26
|
+
toggledTrailingIcon?: React.ReactNode;
|
|
27
|
+
borderRadius?: string;
|
|
28
|
+
color?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A versatile and themeable button component for the application's design system.
|
|
32
|
+
*
|
|
33
|
+
* This component generates its appearance by combining a `variant` (color scheme),
|
|
34
|
+
* a `hierarchy` (visual style like filled or outline), and a `size`. It includes
|
|
35
|
+
* robust support for leading, trailing, or icon-only configurations. All styles are
|
|
36
|
+
* derived from a predefined map using Tailwind CSS classes.
|
|
37
|
+
*
|
|
38
|
+
* @param {ButtonVariant} [variant='brand'] - The color theme of the button.
|
|
39
|
+
* @param {ButtonHierarchy} [hierarchy='primary'] - The visual style of the button.
|
|
40
|
+
* @param {ButtonSize} [size='xs'] - The size of the button, affecting padding, font size, and height.
|
|
41
|
+
* @param {ButtonIcons} [icons='none'] - Controls the visibility and position of icons.
|
|
42
|
+
* @param {React.ReactNode} [leadingIcon] - The icon component to display before the text.
|
|
43
|
+
* @param {React.ReactNode} [trailingIcon] - The icon component to display after the text.
|
|
44
|
+
* @param {React.ReactNode} [children] - The text or content to display inside the button.
|
|
45
|
+
* @returns {JSX.Element} The rendered button element.
|
|
46
|
+
*/
|
|
47
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the shape of a single dropdown item.
|
|
4
|
+
*/
|
|
5
|
+
export type DropdownItem = {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
onClick: () => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Defines the public API for the ButtonDropdown component.
|
|
15
|
+
*/
|
|
16
|
+
interface ButtonDropdownProps {
|
|
17
|
+
/** The button label */
|
|
18
|
+
label: string;
|
|
19
|
+
/** Leading icon for the button */
|
|
20
|
+
leadingIcon?: React.ReactNode;
|
|
21
|
+
/** Trailing icon for the button (defaults to chevron) */
|
|
22
|
+
trailingIcon?: React.ReactNode;
|
|
23
|
+
/** Array of dropdown items */
|
|
24
|
+
items: DropdownItem[];
|
|
25
|
+
/** Whether the button is active */
|
|
26
|
+
isActive?: boolean;
|
|
27
|
+
/** Custom CSS classes for the button */
|
|
28
|
+
className?: string;
|
|
29
|
+
/** Custom CSS classes for the dropdown */
|
|
30
|
+
dropdownClassName?: string;
|
|
31
|
+
/** Dropdown placement */
|
|
32
|
+
placement?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
33
|
+
/** Whether to show backdrop */
|
|
34
|
+
showBackdrop?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @file A reusable button with dropdown component.
|
|
38
|
+
* @description ButtonDropdown provides a button that opens a dropdown menu with items.
|
|
39
|
+
* It handles all the state management for open/close and click outside behavior.
|
|
40
|
+
*
|
|
41
|
+
* @param {string} label - The button text
|
|
42
|
+
* @param {React.ReactNode} [leadingIcon] - Optional leading icon
|
|
43
|
+
* @param {React.ReactNode} [trailingIcon] - Optional trailing icon (defaults to chevron)
|
|
44
|
+
* @param {DropdownItem[]} items - Array of dropdown items
|
|
45
|
+
* @param {boolean} [isActive] - Whether the button is in active state
|
|
46
|
+
* @param {string} [className] - Custom CSS classes for button
|
|
47
|
+
* @param {string} [dropdownClassName] - Custom CSS classes for dropdown
|
|
48
|
+
* @param {string} [placement] - Dropdown placement position
|
|
49
|
+
* @param {boolean} [showBackdrop] - Whether to show backdrop overlay
|
|
50
|
+
* @returns {JSX.Element} The rendered ButtonDropdown element.
|
|
51
|
+
*/
|
|
52
|
+
export declare const ButtonDropdown: ({ label, leadingIcon, trailingIcon, items, isActive, className, dropdownClassName, placement, showBackdrop }: ButtonDropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ButtonDropdown, type DropdownItem } from './ButtonDropdown';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the shape for a single option within the ButtonGroup.
|
|
4
|
+
* Each object represents one button.
|
|
5
|
+
*/
|
|
6
|
+
export interface ButtonGroupOption {
|
|
7
|
+
value: string | number;
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Defines the public API for the ButtonGroup component.
|
|
13
|
+
*/
|
|
14
|
+
export interface ButtonGroupProps {
|
|
15
|
+
/** The array of button configurations to render. */
|
|
16
|
+
options: ButtonGroupOption[];
|
|
17
|
+
/** The value of the currently selected button. */
|
|
18
|
+
value: string | number;
|
|
19
|
+
/** Callback function that is fired when a button is clicked. Receives the new value. */
|
|
20
|
+
onChange: (value: string | number) => void;
|
|
21
|
+
/** The size of the buttons in the group. */
|
|
22
|
+
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
23
|
+
/** The style variant for the button group. */
|
|
24
|
+
variant?: 'neutral' | 'brand' | 'secondary';
|
|
25
|
+
/** Optional custom classes for the container. */
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @file A controlled ButtonGroup component that functions as a segmented control.
|
|
30
|
+
* @description This component renders a group of buttons from an `options` array and manages
|
|
31
|
+
* its state through the `value` and `onChange` props, following the controlled component pattern.
|
|
32
|
+
*
|
|
33
|
+
* @param {ButtonGroupOption[]} options - The data used to generate the buttons.
|
|
34
|
+
* @param {string | number} value - The value of the currently active button.
|
|
35
|
+
* @param {(value: string | number) => void} onChange - The callback fired when a button is clicked.
|
|
36
|
+
* @param {'xs' | 'sm' | 'md' | 'lg'} [size='md'] - The size variant for the buttons.
|
|
37
|
+
* @returns {JSX.Element} The rendered ButtonGroup element.
|
|
38
|
+
*/
|
|
39
|
+
export declare const ButtonGroup: ({ options, value, onChange, size, variant, className, }: ButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ButtonGroup, type ButtonGroupOption, type ButtonGroupProps } from './ButtonGroup';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the public API for the Card component.
|
|
4
|
+
*/
|
|
5
|
+
export interface CardProps {
|
|
6
|
+
/** The icon to display at the top left. Should be an Iconsax icon component. */
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
/** The title text displayed next to the icon. */
|
|
9
|
+
title: string;
|
|
10
|
+
/** The description text displayed below the title and icon. */
|
|
11
|
+
description: string;
|
|
12
|
+
/** The text for the link at the bottom of the card. */
|
|
13
|
+
linkText?: string;
|
|
14
|
+
/** The href for the link. */
|
|
15
|
+
linkHref?: string;
|
|
16
|
+
/** Controlled checked state for the checkbox. */
|
|
17
|
+
checked?: boolean;
|
|
18
|
+
/** Callback fired when the checkbox state changes. */
|
|
19
|
+
onCheckboxChange?: (checked: boolean) => void;
|
|
20
|
+
/** Callback fired when the link is clicked. */
|
|
21
|
+
onLinkClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
22
|
+
/** Optional custom CSS classes for the card container. */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** If true, the card will be non-interactive. */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated This component has been deprecated.
|
|
29
|
+
*
|
|
30
|
+
* @file A card component for displaying content with an icon, title, description, checkbox, and link.
|
|
31
|
+
* @description This component renders a flexible card with a header section containing an icon, title, and checkbox,
|
|
32
|
+
* a description section, and a footer with a link. The card has a border and rounded corners following the design system.
|
|
33
|
+
*
|
|
34
|
+
* @param {React.ReactNode} [icon] - The icon to display (32x32px Iconsax icon).
|
|
35
|
+
* @param {string} title - The title text.
|
|
36
|
+
* @param {string} description - The description text.
|
|
37
|
+
* @param {string} [linkText='Link'] - The link text.
|
|
38
|
+
* @param {string} [linkHref='#'] - The link href.
|
|
39
|
+
* @param {boolean} [checked=false] - Checkbox checked state.
|
|
40
|
+
* @param {(checked: boolean) => void} [onCheckboxChange] - Checkbox change callback.
|
|
41
|
+
* @param {(e: React.MouseEvent<HTMLAnchorElement>) => void} [onLinkClick] - Link click callback.
|
|
42
|
+
* @param {string} [className] - Custom container classes.
|
|
43
|
+
* @param {boolean} [disabled=false] - Disabled state.
|
|
44
|
+
* @returns {JSX.Element} The rendered Card element.
|
|
45
|
+
*/
|
|
46
|
+
export declare const Card: ({ icon, title, description, linkText, linkHref, checked, onCheckboxChange, onLinkClick, className, disabled, }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ProductIconType, ProductIconSize, ProductIconVariant } from "../ProductIcon/ProductIcon";
|
|
3
|
+
import { LinkProps } from "../Link/Link";
|
|
4
|
+
export interface CardActionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
label: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
actions?: React.ReactNode;
|
|
9
|
+
iconType?: ProductIconType;
|
|
10
|
+
iconVariant?: ProductIconVariant;
|
|
11
|
+
iconSize?: ProductIconSize;
|
|
12
|
+
linkProps?: Omit<LinkProps, 'children'>;
|
|
13
|
+
/** Optional badge to display inline with the label */
|
|
14
|
+
badge?: React.ReactNode;
|
|
15
|
+
/** Optional content to display below the label/description (e.g., progress bar) */
|
|
16
|
+
bottomContent?: React.ReactNode;
|
|
17
|
+
/** Optional content to display inline next to the label (e.g., tag, chip) */
|
|
18
|
+
labelInlineContent?: React.ReactNode;
|
|
19
|
+
/** Gap between content sections. Default is 2 (8px). Accepts values 0-8. */
|
|
20
|
+
contentGap?: number;
|
|
21
|
+
/** Optional className for the actions section */
|
|
22
|
+
classNameActions?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A flexible action card/row component with optional icon, label, description, and actions.
|
|
26
|
+
* Can be used standalone or within larger containers. All sections except label are optional.
|
|
27
|
+
*/
|
|
28
|
+
export declare const CardAction: ({ className, icon, label, description, actions, iconType, iconVariant, iconSize, linkProps, badge, bottomContent, labelInlineContent, contentGap, classNameActions, ...props }: CardActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChecklistItem {
|
|
3
|
+
/**
|
|
4
|
+
* Unique identifier for the item
|
|
5
|
+
*/
|
|
6
|
+
id: string | number;
|
|
7
|
+
/**
|
|
8
|
+
* Label text to display next to the checkbox
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* Checked state of the item
|
|
13
|
+
*/
|
|
14
|
+
checked: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Optional: disable specific items
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ChatCollapsibleCheckProps {
|
|
21
|
+
/**
|
|
22
|
+
* Title displayed in the header (default: "Todo:")
|
|
23
|
+
*/
|
|
24
|
+
title?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Array of checklist items
|
|
27
|
+
*/
|
|
28
|
+
items: ChecklistItem[];
|
|
29
|
+
/**
|
|
30
|
+
* Callback when an item's checked state changes
|
|
31
|
+
*/
|
|
32
|
+
onItemChange?: (itemId: string | number, checked: boolean) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Controlled collapsed state
|
|
35
|
+
*/
|
|
36
|
+
isCollapsed?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Callback when collapse state changes
|
|
39
|
+
*/
|
|
40
|
+
onToggle?: (collapsed: boolean) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Callback when close button is clicked
|
|
43
|
+
*/
|
|
44
|
+
onClose?: () => void;
|
|
45
|
+
/**
|
|
46
|
+
* Default collapsed state (uncontrolled)
|
|
47
|
+
*/
|
|
48
|
+
defaultCollapsed?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Additional CSS classes
|
|
51
|
+
*/
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
export declare const ChatCollapsibleCheck: React.ForwardRefExoticComponent<ChatCollapsibleCheckProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChatCollapsibleContainerProps {
|
|
3
|
+
/**
|
|
4
|
+
* Title displayed in the header center (can be text or a custom component)
|
|
5
|
+
*/
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Custom content to render when expanded
|
|
9
|
+
*/
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Controlled collapsed state
|
|
13
|
+
*/
|
|
14
|
+
isCollapsed?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Callback when collapse state changes
|
|
17
|
+
*/
|
|
18
|
+
onToggle?: (collapsed: boolean) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Callback when close button is clicked
|
|
21
|
+
*/
|
|
22
|
+
onClose?: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Default collapsed state (uncontrolled)
|
|
25
|
+
*/
|
|
26
|
+
defaultCollapsed?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Additional CSS classes for the container
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const ChatCollapsibleContainer: React.ForwardRefExoticComponent<ChatCollapsibleContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ButtonProps } from '@/shared/ui/Button/Button';
|
|
3
|
+
export interface ChatCollapsibleDialogAction {
|
|
4
|
+
label: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
variant?: ButtonProps['variant'];
|
|
7
|
+
hierarchy?: ButtonProps['hierarchy'];
|
|
8
|
+
}
|
|
9
|
+
export interface ChatCollapsibleDialogProps {
|
|
10
|
+
/**
|
|
11
|
+
* Dialog title displayed in the header (can be text or a custom component)
|
|
12
|
+
*/
|
|
13
|
+
title: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Content to display in the dialog body
|
|
16
|
+
*/
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Actions to display in the footer (max 2 buttons recommended)
|
|
20
|
+
*/
|
|
21
|
+
actions?: ChatCollapsibleDialogAction[];
|
|
22
|
+
/**
|
|
23
|
+
* Controlled collapsed state
|
|
24
|
+
*/
|
|
25
|
+
isCollapsed?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Callback when collapse state changes
|
|
28
|
+
*/
|
|
29
|
+
onToggle?: (collapsed: boolean) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Callback when close button is clicked
|
|
32
|
+
*/
|
|
33
|
+
onClose?: () => void;
|
|
34
|
+
/**
|
|
35
|
+
* Default collapsed state (uncontrolled)
|
|
36
|
+
*/
|
|
37
|
+
defaultCollapsed?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Additional CSS classes
|
|
40
|
+
*/
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare const ChatCollapsibleDialog: React.ForwardRefExoticComponent<ChatCollapsibleDialogProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ChatCommandListItemSize } from '../ChatCommandListItem/ChatCommandListItem';
|
|
3
|
+
import { TagProps } from '../Tag/Tag';
|
|
4
|
+
export type ChatCommandListSize = ChatCommandListItemSize;
|
|
5
|
+
/**
|
|
6
|
+
* Represents a single item within a category
|
|
7
|
+
*/
|
|
8
|
+
export interface CategoryItem {
|
|
9
|
+
/** Unique identifier for the item */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Title of the item */
|
|
12
|
+
title: string;
|
|
13
|
+
/** Optional tag configuration */
|
|
14
|
+
tag?: {
|
|
15
|
+
content: string;
|
|
16
|
+
variant?: TagProps['variant'];
|
|
17
|
+
size?: TagProps['size'];
|
|
18
|
+
};
|
|
19
|
+
/** Optional description text */
|
|
20
|
+
description?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Represents a category with its items
|
|
24
|
+
*/
|
|
25
|
+
export interface Category {
|
|
26
|
+
/** Unique identifier for the category */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Leading tag configuration for the category */
|
|
29
|
+
leadingTag: {
|
|
30
|
+
content: string;
|
|
31
|
+
variant?: TagProps['variant'];
|
|
32
|
+
};
|
|
33
|
+
/** Title of the category */
|
|
34
|
+
title: string;
|
|
35
|
+
/** Items within this category */
|
|
36
|
+
items: CategoryItem[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Defines the public API for the ChatCommandList component
|
|
40
|
+
*/
|
|
41
|
+
export interface ChatCommandListProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> {
|
|
42
|
+
/** Array of categories with their items */
|
|
43
|
+
categories: Category[];
|
|
44
|
+
/** Size to apply to all child ChatCommandListItems */
|
|
45
|
+
size?: ChatCommandListSize;
|
|
46
|
+
/** Callback when a category is selected */
|
|
47
|
+
onCategorySelect?: (categoryId: string) => void;
|
|
48
|
+
/** Callback when an item is selected */
|
|
49
|
+
onItemSelect?: (categoryId: string, itemId: string) => void;
|
|
50
|
+
/** Callback when the close button is clicked */
|
|
51
|
+
onClose?: () => void;
|
|
52
|
+
/** If true, uses absolute positioning for dropdown behavior */
|
|
53
|
+
floating?: boolean;
|
|
54
|
+
/** Additional CSS classes for the container */
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @file A dropdown menu component for chat slash commands with category navigation
|
|
59
|
+
* @description This component renders a navigable menu with two views:
|
|
60
|
+
* - Categories view: Shows all available categories using type-1 ChatCommandListItem
|
|
61
|
+
* - Items view: Shows items within a selected category using type-2 ChatCommandListItem
|
|
62
|
+
*
|
|
63
|
+
* Features:
|
|
64
|
+
* - Internal state management for navigation
|
|
65
|
+
* - Dynamic headers based on current view
|
|
66
|
+
* - Keyboard shortcuts footer
|
|
67
|
+
* - Category and item selection callbacks
|
|
68
|
+
*
|
|
69
|
+
* @param {Category[]} categories - Array of categories with their items (required)
|
|
70
|
+
* @param {ChatCommandListSize} [size='md'] - Size to apply to all elements
|
|
71
|
+
* @param {Function} [onCategorySelect] - Callback when a category is selected
|
|
72
|
+
* @param {Function} [onItemSelect] - Callback when an item is selected
|
|
73
|
+
* @param {Function} [onClose] - Callback when close button is clicked
|
|
74
|
+
* @param {boolean} [floating=false] - If true, uses absolute positioning
|
|
75
|
+
* @param {string} [className] - Additional CSS classes
|
|
76
|
+
* @returns {JSX.Element} The rendered ChatCommandList element
|
|
77
|
+
*/
|
|
78
|
+
export declare const ChatCommandList: ({ categories, size, onCategorySelect, onItemSelect, onClose, floating, className, ...props }: ChatCommandListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TagProps } from '../Tag/Tag';
|
|
3
|
+
import { ButtonProps } from '../Button/Button';
|
|
4
|
+
export type ChatCommandListItemSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
5
|
+
export type ChatCommandListItemVariant = 'type-1' | 'type-2';
|
|
6
|
+
/**
|
|
7
|
+
* Props for leading tag (used in type-1)
|
|
8
|
+
*/
|
|
9
|
+
export interface LeadingTagProps {
|
|
10
|
+
content: string;
|
|
11
|
+
variant?: TagProps['variant'];
|
|
12
|
+
size?: TagProps['size'];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Props for trailing button (used in type-1)
|
|
16
|
+
*/
|
|
17
|
+
export interface TrailingButtonProps {
|
|
18
|
+
icon: React.ReactNode;
|
|
19
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
20
|
+
variant?: ButtonProps['variant'];
|
|
21
|
+
hierarchy?: ButtonProps['hierarchy'];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Props for inline tag (used in type-2)
|
|
25
|
+
*/
|
|
26
|
+
export interface InlineTagProps {
|
|
27
|
+
content: string;
|
|
28
|
+
variant?: TagProps['variant'];
|
|
29
|
+
size?: TagProps['size'];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Base props shared by both variants
|
|
33
|
+
*/
|
|
34
|
+
interface BaseProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'title'> {
|
|
35
|
+
/** The size of the item (affects height and child component sizes) */
|
|
36
|
+
size?: ChatCommandListItemSize;
|
|
37
|
+
/** Main text content */
|
|
38
|
+
title: string;
|
|
39
|
+
/** If true, the item will be non-interactive */
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
/** Additional CSS classes */
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Props for type-1: Tag + Text + Button
|
|
46
|
+
*/
|
|
47
|
+
interface Type1Props extends BaseProps {
|
|
48
|
+
variant: 'type-1';
|
|
49
|
+
/** Leading tag configuration */
|
|
50
|
+
leadingTag?: LeadingTagProps;
|
|
51
|
+
/** Trailing button configuration */
|
|
52
|
+
trailingButton?: TrailingButtonProps;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Props for type-2: Text + Tag (inline) + Description
|
|
56
|
+
*/
|
|
57
|
+
interface Type2Props extends BaseProps {
|
|
58
|
+
variant: 'type-2';
|
|
59
|
+
/** Inline tag next to title */
|
|
60
|
+
tag?: InlineTagProps;
|
|
61
|
+
/** Description text below title */
|
|
62
|
+
description?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Union type for all ChatCommandListItem props
|
|
66
|
+
*/
|
|
67
|
+
export type ChatCommandListItemProps = Type1Props | Type2Props;
|
|
68
|
+
/**
|
|
69
|
+
* @file A specialized component for chat slash command menu items
|
|
70
|
+
* @description This component supports two distinct layouts:
|
|
71
|
+
*
|
|
72
|
+
* **Type 1**: Tag + Text + Button with Icon
|
|
73
|
+
* - Leading tag on the left
|
|
74
|
+
* - Title text in the center
|
|
75
|
+
* - Icon-only button on the right
|
|
76
|
+
*
|
|
77
|
+
* **Type 2**: Text + Tag + Description
|
|
78
|
+
* - First row: Title with inline tag (small gap)
|
|
79
|
+
* - Second row: Description text
|
|
80
|
+
*
|
|
81
|
+
* @param {ChatCommandListItemVariant} variant - The layout variant to use
|
|
82
|
+
* @param {ChatCommandListItemSize} [size='md'] - The size of the item
|
|
83
|
+
* @param {string} title - The main title text (required)
|
|
84
|
+
* @param {boolean} [disabled=false] - If true, the item will be non-interactive
|
|
85
|
+
* @returns {JSX.Element} The rendered ChatCommandListItem element
|
|
86
|
+
*/
|
|
87
|
+
export declare const ChatCommandListItem: (props: ChatCommandListItemProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
88
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View mode for the chat interface.
|
|
3
|
+
*/
|
|
4
|
+
export type ChatView = 'chat' | 'historial';
|
|
5
|
+
/**
|
|
6
|
+
* Defines the public API for the ChatHeader component.
|
|
7
|
+
*/
|
|
8
|
+
export interface ChatHeaderProps {
|
|
9
|
+
/** Optional custom CSS classes for the container. */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Current active view */
|
|
12
|
+
activeView?: ChatView;
|
|
13
|
+
/** Callback function fired when the chat button is clicked. */
|
|
14
|
+
onChatClick?: () => void;
|
|
15
|
+
/** Callback function fired when the historial button is clicked. */
|
|
16
|
+
onHistorialClick?: () => void;
|
|
17
|
+
/** Callback function fired when the settings button is clicked. */
|
|
18
|
+
onSettingsClick?: () => void;
|
|
19
|
+
/** Callback function fired when the close button is clicked. */
|
|
20
|
+
onCloseClick?: () => void;
|
|
21
|
+
/** The width of the container */
|
|
22
|
+
containerWidth?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @file A header component for the main chat interface.
|
|
26
|
+
* @description This component renders the primary navigation (e.g., "Chat", "Historial")
|
|
27
|
+
* and action controls (e.g., "Settings", "Close") for the chat panel. It is composed
|
|
28
|
+
* of pre-styled `Button` components. Only one view can be active at a time.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} [className] - Optional CSS classes to apply to the header container.
|
|
31
|
+
* @param {ChatView} [activeView='chat'] - Current active view (chat or historial).
|
|
32
|
+
* @param {function} [onChatClick] - Callback for the chat button click event.
|
|
33
|
+
* @param {function} [onHistorialClick] - Callback for the historial button click event.
|
|
34
|
+
* @param {function} [onSettingsClick] - Callback for the settings button click event.
|
|
35
|
+
* @param {function} [onCloseClick] - Callback for the close button click event.
|
|
36
|
+
* @returns {JSX.Element} The rendered ChatHeader element.
|
|
37
|
+
*/
|
|
38
|
+
export declare const ChatHeader: ({ className, activeView, onChatClick, onHistorialClick, onSettingsClick, onCloseClick, containerWidth, }: ChatHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChatHeader, type ChatHeaderProps, type ChatView } from './ChatHeader';
|