@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,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type JustifyContent = "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
3
|
+
type AlignItems = "start" | "center" | "end" | "baseline" | "stretch";
|
|
4
|
+
type HeaderSize = "sm" | "md" | "lg";
|
|
5
|
+
type LogoVariant = "with-text" | "no-text";
|
|
6
|
+
export type LogoVisibility = "always" | "desktop" | "none";
|
|
7
|
+
interface SectionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
gap?: number;
|
|
9
|
+
justify?: JustifyContent;
|
|
10
|
+
align?: AlignItems;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export interface HeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
bordered?: boolean;
|
|
15
|
+
size?: HeaderSize;
|
|
16
|
+
logoVariant?: LogoVariant;
|
|
17
|
+
/** Control logo visibility: "always" (default), "desktop" (hidden on mobile/tablet), "none" */
|
|
18
|
+
showLogo?: LogoVisibility;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
logoSectionGap?: number;
|
|
21
|
+
/** Fixed width for left section in percentage. If not provided, uses flex layout */
|
|
22
|
+
leftWidth?: number;
|
|
23
|
+
/** Fixed width for center section in percentage. If not provided, uses flex layout */
|
|
24
|
+
centerWidth?: number;
|
|
25
|
+
/** Fixed width for right section in percentage. If not provided, uses flex layout */
|
|
26
|
+
rightWidth?: number;
|
|
27
|
+
/** Whether center section should have full height. Default: true */
|
|
28
|
+
centerFullHeight?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const Header: {
|
|
31
|
+
(props: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
LeftContent: React.FC<SectionProps>;
|
|
33
|
+
Center: React.FC<SectionProps>;
|
|
34
|
+
Right: React.FC<SectionProps>;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculate header section widths from panel state with fallback for closed sides
|
|
3
|
+
*
|
|
4
|
+
* @param panels - Panel state object with left and right arrays containing open panels with width percentages
|
|
5
|
+
* @param widthSideFallback - Fallback width percentage when a side has no open panels (default: 20)
|
|
6
|
+
* @returns Object with leftWidth, centerWidth, and rightWidth percentages (or all undefined if no panels are open)
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* // Both panels closed
|
|
10
|
+
* calculateHeaderWidths(panels) // { leftWidth: undefined, centerWidth: undefined, rightWidth: undefined }
|
|
11
|
+
*
|
|
12
|
+
* // Left closed, right open at 33%
|
|
13
|
+
* calculateHeaderWidths(panels, 20) // { leftWidth: 20, centerWidth: 47, rightWidth: 33 }
|
|
14
|
+
*
|
|
15
|
+
* // Both open at 25% and 33%
|
|
16
|
+
* calculateHeaderWidths(panels) // { leftWidth: 25, centerWidth: 42, rightWidth: 33 }
|
|
17
|
+
*/
|
|
18
|
+
export declare function calculateHeaderWidths(panels: {
|
|
19
|
+
left: Array<{
|
|
20
|
+
open: boolean;
|
|
21
|
+
width: number;
|
|
22
|
+
}>;
|
|
23
|
+
right: Array<{
|
|
24
|
+
open: boolean;
|
|
25
|
+
width: number;
|
|
26
|
+
}>;
|
|
27
|
+
}, widthSideFallback?: number): {
|
|
28
|
+
leftWidth?: number;
|
|
29
|
+
centerWidth?: number;
|
|
30
|
+
rightWidth?: number;
|
|
31
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the shape for a single header tab's data
|
|
3
|
+
*/
|
|
4
|
+
export interface HeaderTabItem {
|
|
5
|
+
id: number | string;
|
|
6
|
+
label: string;
|
|
7
|
+
/** Whether this tab can be closed/removed */
|
|
8
|
+
closeable?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Props for the HeaderTabs component
|
|
12
|
+
*/
|
|
13
|
+
export interface HeaderTabsProps {
|
|
14
|
+
/** Array of tab objects to be rendered */
|
|
15
|
+
tabs: HeaderTabItem[];
|
|
16
|
+
/** Optional custom classes for the container */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** The index of the selected tab */
|
|
19
|
+
selectedIndex?: number;
|
|
20
|
+
/** Callback fired when a tab is selected */
|
|
21
|
+
onChange?: (index: number) => void;
|
|
22
|
+
/** Callback fired when the add button is clicked */
|
|
23
|
+
onAddTab?: () => void;
|
|
24
|
+
/** Callback fired when the arrow right button is clicked */
|
|
25
|
+
onArrowRightClick?: () => void;
|
|
26
|
+
/** Callback fired when a tab close is requested */
|
|
27
|
+
onCloseTab?: (index: number) => void;
|
|
28
|
+
/** Fixed width for each tab in pixels. If not provided, tabs will be flex */
|
|
29
|
+
tabWidth?: number;
|
|
30
|
+
/** Distance in pixels to scroll when clicking pagination arrows. Default: 300 */
|
|
31
|
+
scrollDistance?: number;
|
|
32
|
+
}
|
|
33
|
+
export declare const HeaderTabs: {
|
|
34
|
+
({ tabs, className, selectedIndex, onChange, onAddTab, onArrowRightClick, onCloseTab, tabWidth, scrollDistance, }: HeaderTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type IconSize = 'xs' | 'sm' | 'sm-md' | 'md' | 'md-lg' | 'lg' | 'xl' | '2xl';
|
|
3
|
+
/**
|
|
4
|
+
* Defines the public API for the Icon component.
|
|
5
|
+
*/
|
|
6
|
+
export interface IconProps {
|
|
7
|
+
/** The size of the icon or image. Can be a predefined size or a custom number in pixels. */
|
|
8
|
+
size?: IconSize | number;
|
|
9
|
+
/** Icon component to render (from iconsax-react or similar). */
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/** Color to apply to the icon (only for icon components, not images). */
|
|
12
|
+
color?: string;
|
|
13
|
+
/** Image URL to display instead of an icon component. */
|
|
14
|
+
imageUrl?: string;
|
|
15
|
+
/** Alt text for the image (only applies when imageUrl is provided). */
|
|
16
|
+
alt?: string;
|
|
17
|
+
/** Optional custom CSS classes. */
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @file A versatile icon component that supports both icon components and images.
|
|
22
|
+
* @description This component can render either:
|
|
23
|
+
* 1. Icon components (from iconsax-react) with configurable size and color
|
|
24
|
+
* 2. Images with configurable size and fixed 12px border-radius
|
|
25
|
+
*
|
|
26
|
+
* If an image fails to load, it falls back to the InfoCircle icon.
|
|
27
|
+
* If neither children nor imageUrl is provided, it renders InfoCircle as default.
|
|
28
|
+
*
|
|
29
|
+
* @param {IconSize} [size='md'] - The size of the icon or image.
|
|
30
|
+
* @param {React.ReactNode} [children] - The icon component to render.
|
|
31
|
+
* @param {string} [color='currentColor'] - The color to apply to icon components.
|
|
32
|
+
* @param {string} [imageUrl] - URL of the image to display.
|
|
33
|
+
* @param {string} [alt='Icon'] - Alt text for images.
|
|
34
|
+
* @param {string} [className] - Additional CSS classes.
|
|
35
|
+
* @returns {JSX.Element | null} The rendered Icon element.
|
|
36
|
+
*/
|
|
37
|
+
export declare const Icon: ({ size, children, color, imageUrl, alt, className, }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Icon';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ImageUploaderVariant = 'default';
|
|
3
|
+
export type ImageUploaderSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
/**
|
|
5
|
+
* Defines the public API for the ImageUploader component.
|
|
6
|
+
*/
|
|
7
|
+
export interface ImageUploaderProps {
|
|
8
|
+
/** Callback fired when an image is selected. */
|
|
9
|
+
onImageSelected: (file: File) => void;
|
|
10
|
+
/** The visual variant of the image uploader. */
|
|
11
|
+
variant?: ImageUploaderVariant;
|
|
12
|
+
/** The size of the image uploader. */
|
|
13
|
+
size?: ImageUploaderSize;
|
|
14
|
+
/** Optional custom CSS classes for additional styling. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** The accepted file types for the input. */
|
|
17
|
+
acceptedFileTypes?: string;
|
|
18
|
+
/** Maximum file size in bytes. */
|
|
19
|
+
maxFileSize?: number;
|
|
20
|
+
/** Helper text or an error message displayed below the uploader. */
|
|
21
|
+
hint?: string;
|
|
22
|
+
/** If true, the uploader will be non-interactive. */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Preview image URL to display initially. */
|
|
25
|
+
initialPreviewUrl?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @file A reusable image uploader component with drag-and-drop functionality and preview.
|
|
29
|
+
* @description This component provides an intuitive interface for uploading images with
|
|
30
|
+
* both drag-and-drop and file browser capabilities. It includes image preview and follows
|
|
31
|
+
* the same design patterns as other components in the codebase.
|
|
32
|
+
*
|
|
33
|
+
* @param {ImageUploaderVariant} [variant='default'] - The layout variant of the uploader.
|
|
34
|
+
* @param {ImageUploaderSize} [size='md'] - The size of the uploader.
|
|
35
|
+
* @param {(file: File) => void} onImageSelected - Callback fired when an image is selected.
|
|
36
|
+
* @returns {JSX.Element} The rendered ImageUploader element.
|
|
37
|
+
*/
|
|
38
|
+
export declare const ImageUploader: React.FC<ImageUploaderProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ImageUploader';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type InfoLabelVariant = 'default' | 'danger' | 'success';
|
|
3
|
+
export interface InfoLabelProps {
|
|
4
|
+
/** The variant of the info label */
|
|
5
|
+
variant?: InfoLabelVariant;
|
|
6
|
+
/** The title text */
|
|
7
|
+
title: string;
|
|
8
|
+
/** The description text */
|
|
9
|
+
description: string;
|
|
10
|
+
/** Custom icon component (defaults to InfoCircle) */
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
/** Additional CSS classes */
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @file An informational label component with customizable variants.
|
|
17
|
+
* @description This component displays an icon, title, and description in a styled container.
|
|
18
|
+
* It supports different visual states through the variant prop.
|
|
19
|
+
*
|
|
20
|
+
* @param {InfoLabelVariant} [variant='default'] - The visual variant of the info label.
|
|
21
|
+
* @param {string} title - The title text to display.
|
|
22
|
+
* @param {string} description - The description text to display.
|
|
23
|
+
* @param {React.ReactNode} [icon] - Custom icon component (defaults to InfoCircle from iconsax).
|
|
24
|
+
* @param {string} [className] - Additional CSS classes for custom styling.
|
|
25
|
+
* @returns {JSX.Element} The rendered InfoLabel element.
|
|
26
|
+
*/
|
|
27
|
+
export declare const InfoLabel: ({ variant, title, description, icon, className, }: InfoLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type InputFieldVariant = 'default' | 'outlined' | 'danger' | 'success';
|
|
3
|
+
type HintIconVariant = 'Bold' | 'Outline' | 'TwoTone' | 'Bulk' | 'Broken';
|
|
4
|
+
export type InputFieldSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
/**
|
|
6
|
+
* Defines the public API for the InputField component, extending standard input element attributes.
|
|
7
|
+
*/
|
|
8
|
+
export interface InputFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
9
|
+
variant?: InputFieldVariant;
|
|
10
|
+
size?: InputFieldSize;
|
|
11
|
+
hintIconVariant?: HintIconVariant;
|
|
12
|
+
label?: string;
|
|
13
|
+
hint?: string;
|
|
14
|
+
leadingIcon?: React.ReactNode;
|
|
15
|
+
trailingIcon?: React.ReactNode;
|
|
16
|
+
leadingIconColor?: string;
|
|
17
|
+
trailingIconColor?: string;
|
|
18
|
+
customBackground?: string;
|
|
19
|
+
placeholderColor?: string;
|
|
20
|
+
multiline?: boolean;
|
|
21
|
+
customFontWeight?: number;
|
|
22
|
+
/** Optional font size override. Accepts Tailwind size classes (e.g., 'xs', 'sm', 'md', 'lg') or pixel values (e.g., '12px', '16px'). */
|
|
23
|
+
fontSize?: string;
|
|
24
|
+
/** Optional custom font size override. Accepts Tailwind size classes (e.g., 'xs', 'sm', 'md', 'lg') or pixel values (e.g., '12px', '16px'). Alias for fontSize. */
|
|
25
|
+
customFontSize?: string;
|
|
26
|
+
/** Optional callback executed when clicking anywhere on the field. Prevents default input focus behavior. */
|
|
27
|
+
onInputClick?: () => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @file A versatile and themeable input field component for forms.
|
|
31
|
+
* @description This component renders a complete input field unit, including a label,
|
|
32
|
+
* the input itself, optional leading/trailing icons, and hint text. Its appearance is
|
|
33
|
+
* controlled by the `variant` prop, which pulls styles from a centralized configuration object.
|
|
34
|
+
* For password fields (type="password"), a toggle visibility button is automatically added.
|
|
35
|
+
*
|
|
36
|
+
* @param {InputFieldVariant} [variant='default'] - The visual variant of the input field (default, outlined, danger, success).
|
|
37
|
+
* @param {InputFieldSize} [size='md'] - The size variant of the input field (sm, md, lg).
|
|
38
|
+
* @param {string} [label] - The text label displayed above the input.
|
|
39
|
+
* @param {string} [hint] - Helper text or an error message displayed below the input.
|
|
40
|
+
* @param {React.ReactNode} [leadingIcon] - An optional icon to display at the start of the input.
|
|
41
|
+
* @param {React.ReactNode} [trailingIcon] - An optional icon to display at the end of the input.
|
|
42
|
+
* @param {string} [leadingIconColor] - Custom color class for the leading icon (e.g., 'text-high-em', 'text-primary-900').
|
|
43
|
+
* @param {string} [trailingIconColor] - Custom color class for the trailing icon (e.g., 'text-high-em', 'text-primary-900').
|
|
44
|
+
* @param {string} [customBackground] - Custom background color (supports CSS color values or CSS variable names like 'gray-50', 'med-em').
|
|
45
|
+
* @param {string} [placeholderColor] - Custom placeholder color class.
|
|
46
|
+
* @param {boolean} [multiline] - If true, renders as a textarea with auto-resize.
|
|
47
|
+
* @param {number} [customFontWeight] - Custom font weight (numeric value like 400, 500, 600, 700, etc.). Overrides default weight.
|
|
48
|
+
* @param {string} [fontSize] - Optional font size override. Accepts Tailwind size classes (e.g., 'xs', 'sm', 'md', 'lg') or pixel values (e.g., '12px', '16px').
|
|
49
|
+
* @param {string} [customFontSize] - Optional custom font size override. Accepts Tailwind size classes (e.g., 'xs', 'sm', 'md', 'lg') or pixel values (e.g., '12px', '16px'). Alias for fontSize.
|
|
50
|
+
* @param {() => void} [onInputClick] - Optional callback executed when clicking anywhere on the field container. Prevents default input focus behavior. Changes cursor to pointer when defined.
|
|
51
|
+
* @param {boolean} [disabled] - If true, the input will be visually disabled and non-interactive.
|
|
52
|
+
* @returns {JSX.Element} The rendered InputField element.
|
|
53
|
+
*/
|
|
54
|
+
export declare const InputField: React.ForwardRefExoticComponent<InputFieldProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputField, type InputFieldProps, type InputFieldSize } from './InputField';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the InputSearch component
|
|
4
|
+
*/
|
|
5
|
+
export interface InputSearchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
6
|
+
/** Callback triggered when a search is initiated (Enter key or search icon click) */
|
|
7
|
+
onSearch?: (value: string) => void;
|
|
8
|
+
/** Milliseconds for search debouncing (default: 300ms) */
|
|
9
|
+
debounceMs?: number;
|
|
10
|
+
/** Indicates if the input is in a loading state */
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
/** If true, shows a button to clear the input */
|
|
13
|
+
showClearButton?: boolean;
|
|
14
|
+
/** Error message to show conditionally */
|
|
15
|
+
errorMessage?: string;
|
|
16
|
+
/** Array of search suggestions for autocomplete */
|
|
17
|
+
suggestions?: string[];
|
|
18
|
+
/** Callback triggered when a suggestion is clicked */
|
|
19
|
+
onSuggestionClick?: (suggestion: string) => void;
|
|
20
|
+
/** Placeholder for the search input (default: "Search...") */
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
/** Value of the input */
|
|
23
|
+
value?: string;
|
|
24
|
+
/** Handler for changes */
|
|
25
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
26
|
+
/** Default value: false */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/** Standard input attributes */
|
|
29
|
+
id?: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
autoComplete?: string;
|
|
32
|
+
maxLength?: number;
|
|
33
|
+
required?: boolean;
|
|
34
|
+
/** Validation events */
|
|
35
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
36
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
37
|
+
onInvalid?: (e: React.FormEvent<HTMLInputElement>) => void;
|
|
38
|
+
/** Default value: "Search" */
|
|
39
|
+
"aria-label"?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* InputSearch component with search, debounce, and autocomplete functionality
|
|
43
|
+
*/
|
|
44
|
+
export declare const InputSearch: React.ForwardRefExoticComponent<InputSearchProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputSearch, type InputSearchProps } from './InputSearch';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type KbdSize = 'sm' | 'md';
|
|
3
|
+
export interface KbdProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
size?: KbdSize;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const Kbd: ({ children, size, className }: KbdProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconSize } from '@/shared/ui/Icon/Icon';
|
|
3
|
+
export type LabelSize = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
4
|
+
export interface LabelIconProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** The icon component or element to display */
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
/** The label text to display */
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
/** Gap between icon and label (Tailwind spacing: 1-12) */
|
|
10
|
+
gap?: number;
|
|
11
|
+
/** Alignment of items */
|
|
12
|
+
align?: 'start' | 'center' | 'end';
|
|
13
|
+
/** Icon size using Icon component sizes */
|
|
14
|
+
iconSize?: IconSize;
|
|
15
|
+
/** Label size - Tailwind text size class */
|
|
16
|
+
labelSize?: LabelSize;
|
|
17
|
+
/** Icon color class (e.g., 'text-low-em', 'text-high-em') */
|
|
18
|
+
iconColorClass?: string;
|
|
19
|
+
/** Label color class (e.g., 'text-low-em', 'text-high-em') */
|
|
20
|
+
labelColorClass?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A modular component for displaying an icon with a label.
|
|
24
|
+
* Completely customizable via className and composition.
|
|
25
|
+
*/
|
|
26
|
+
export declare const LabelIcon: ({ icon, label, gap, align, iconSize, labelSize, iconColorClass, labelColorClass, className, children, ...props }: LabelIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LabelWithIconProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
/** The icon component to display on the left. */
|
|
4
|
+
icon: React.ReactNode;
|
|
5
|
+
/** The text label to display on the right. */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/** If true, applies styles for an active/selected state. */
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
/** Optional custom font size override. Accepts Tailwind size classes (e.g., 'xs', 'sm', 'md', 'lg') or pixel values (e.g., '12px', '16px'). */
|
|
10
|
+
customFontSize?: string;
|
|
11
|
+
/** Optional custom icon size override. Accepts numeric values (e.g., 16, 20, 24). */
|
|
12
|
+
customIconSize?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @file An interactive component that pairs an icon with a text label.
|
|
16
|
+
* @description This component renders a clickable button, typically used as a list item
|
|
17
|
+
* in navigation menus or sidebars. It supports an active state to indicate the
|
|
18
|
+
* current selection and allows for customizable spacing between the icon and text.
|
|
19
|
+
*
|
|
20
|
+
* @param {React.ReactNode} icon - The icon component to display.
|
|
21
|
+
* @param {React.ReactNode} children - The text label for the item.
|
|
22
|
+
* @param {boolean} [isActive=false] - If true, applies the active/selected styles.
|
|
23
|
+
* @param {string} [customFontSize] - Optional custom font size override. Accepts Tailwind size classes (e.g., 'xs', 'sm', 'md', 'lg') or pixel values (e.g., '12px', '16px').
|
|
24
|
+
* @param {number} [customIconSize] - Optional custom icon size override. Accepts numeric values (e.g., 16, 20, 24).
|
|
25
|
+
* @returns {JSX.Element} The rendered LabelWithIcon element.
|
|
26
|
+
*/
|
|
27
|
+
export declare const LabelWithIcon: ({ icon, children, isActive, className, customFontSize, customIconSize, ...props }: LabelWithIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LabelWithIcon, type LabelWithIconProps } from './LabelWithIcon';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the public API for the LabelWithTooltip component.
|
|
4
|
+
*/
|
|
5
|
+
export interface LabelWithTooltipProps {
|
|
6
|
+
/** The label text content. */
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
/** The content to display inside the tooltip. */
|
|
9
|
+
tooltipContent: React.ReactNode;
|
|
10
|
+
/** The icon to trigger the tooltip. Defaults to a question mark icon. */
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
/** Optional custom Tailwind CSS class for the icon's color (e.g., 'text-danger-500'). */
|
|
13
|
+
iconColor?: string;
|
|
14
|
+
/** Optional custom classes for the label text. */
|
|
15
|
+
labelClassName?: string;
|
|
16
|
+
/** Optional custom classes for the container. */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Optional custom font size override. Accepts Tailwind size classes (e.g., 'xs', 'sm', 'md', 'lg') or pixel values (e.g., '12px', '16px'). */
|
|
19
|
+
customFontSize?: string;
|
|
20
|
+
/** Optional custom icon size override. Accepts numeric values (e.g., 16, 20, 24). */
|
|
21
|
+
customIconSize?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @file A simple label with an adjacent tooltip icon.
|
|
25
|
+
* @description This component displays a text label with a small tooltip icon next to it.
|
|
26
|
+
* When the user hovers over the icon, a tooltip with additional information appears.
|
|
27
|
+
* Built on top of Radix UI's Tooltip for robust accessibility and positioning.
|
|
28
|
+
*
|
|
29
|
+
* Designed to be used inline with form fields, headings, or any text that needs contextual help.
|
|
30
|
+
*
|
|
31
|
+
* @param {React.ReactNode} children - The label text.
|
|
32
|
+
* @param {React.ReactNode} tooltipContent - The content to be shown inside the tooltip.
|
|
33
|
+
* @param {React.ReactNode} [icon] - An optional custom icon component to trigger the tooltip.
|
|
34
|
+
* @param {string} [iconColor='text-low-em'] - An optional Tailwind CSS class to customize the icon's color.
|
|
35
|
+
* @param {string} [labelClassName] - Optional custom classes for the label text.
|
|
36
|
+
* @param {string} [className] - Optional custom classes for the container.
|
|
37
|
+
* @param {string} [customFontSize] - Optional custom font size override. Accepts Tailwind size classes (e.g., 'xs', 'sm', 'md', 'lg') or pixel values (e.g., '12px', '16px').
|
|
38
|
+
* @param {number} [customIconSize] - Optional custom icon size override. Accepts numeric values (e.g., 16, 20, 24).
|
|
39
|
+
* @returns {JSX.Element} The rendered LabelWithTooltip element.
|
|
40
|
+
*/
|
|
41
|
+
export declare const LabelWithTooltip: ({ children, tooltipContent, icon, iconColor, labelClassName, className, customFontSize, customIconSize, }: LabelWithTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LabelWithTooltip, type LabelWithTooltipProps } from './LabelWithTooltip';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type LinkVariant = 'neutral' | 'info';
|
|
3
|
+
type LinkSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
|
+
type TrailingIconPosition = 'inline' | 'end';
|
|
5
|
+
export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
6
|
+
variant?: LinkVariant;
|
|
7
|
+
size?: LinkSize;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
leadingIcon?: React.ReactNode;
|
|
10
|
+
trailingIcon?: React.ReactNode;
|
|
11
|
+
/** If true, shows the leading icon */
|
|
12
|
+
showLeadingIcon?: boolean;
|
|
13
|
+
/** If true, shows the trailing icon */
|
|
14
|
+
showTrailingIcon?: boolean;
|
|
15
|
+
/** Position of the trailing icon: 'inline' (next to text) or 'end' (aligned to container end) */
|
|
16
|
+
trailingIconPosition?: TrailingIconPosition;
|
|
17
|
+
/** If true, disables the underline that appears on hover */
|
|
18
|
+
disableUnderline?: boolean;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @file A styled link component for navigation and actions.
|
|
23
|
+
* @description This component renders a semantic `<a>` tag with support for different themes,
|
|
24
|
+
* sizes, and states. It features optional leading and trailing icons.
|
|
25
|
+
*
|
|
26
|
+
* @param {LinkVariant} [variant='neutral'] - The color theme of the link.
|
|
27
|
+
* @param {LinkSize} [size='md'] - The font size and spacing of the link.
|
|
28
|
+
* @param {boolean} [disabled=false] - If true, the link will be visually disabled and non-interactive.
|
|
29
|
+
* @param {React.ReactNode} [leadingIcon] - Custom leading icon component.
|
|
30
|
+
* @param {React.ReactNode} [trailingIcon] - Custom trailing icon component.
|
|
31
|
+
* @param {boolean} [showLeadingIcon=true] - If true, shows the leading icon.
|
|
32
|
+
* @param {boolean} [showTrailingIcon=true] - If true, shows the trailing icon.
|
|
33
|
+
* @param {TrailingIconPosition} [trailingIconPosition='inline'] - Position of trailing icon: 'inline' (next to text) or 'end' (aligned to container end).
|
|
34
|
+
* @param {boolean} [disableUnderline=false] - If true, disables the underline that appears on hover.
|
|
35
|
+
* @param {React.ReactNode} children - The text content of the link.
|
|
36
|
+
* @returns {JSX.Element} The rendered Link element.
|
|
37
|
+
*/
|
|
38
|
+
export declare const Link: ({ variant, size, disabled, leadingIcon, trailingIcon, showLeadingIcon, showTrailingIcon, trailingIconPosition, disableUnderline, children, className, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Link } from './Link';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TagProps } from '../Tag/Tag';
|
|
3
|
+
export type ListItemSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
|
+
/**
|
|
5
|
+
* Defines the public API for the ListItem component
|
|
6
|
+
*/
|
|
7
|
+
export interface ListItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'title'> {
|
|
8
|
+
/** The size of the list item */
|
|
9
|
+
size?: ListItemSize;
|
|
10
|
+
/** If true, the list item will be non-interactive */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Show/hide optional elements (all default to true) */
|
|
13
|
+
showCheckbox?: boolean;
|
|
14
|
+
showLeadingImage?: boolean;
|
|
15
|
+
showLeadingIcon?: boolean;
|
|
16
|
+
showDescription?: boolean;
|
|
17
|
+
showTrailingIcon?: boolean;
|
|
18
|
+
showTag?: boolean;
|
|
19
|
+
showTrailingText?: boolean;
|
|
20
|
+
/** Content props */
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
/** Custom color class for title (e.g., 'text-low-em', 'text-success-main') */
|
|
24
|
+
customTitleColor?: string;
|
|
25
|
+
/** Custom background color class (e.g., 'bg-surface-1', 'bg-success-accent-1') */
|
|
26
|
+
customBackgroundColor?: string;
|
|
27
|
+
/** Custom hover background color class (e.g., 'hover:bg-surface-2', 'hover:bg-success-accent-2') */
|
|
28
|
+
customHoverColor?: string;
|
|
29
|
+
/** Custom color for leading icon (e.g., 'var(--danger-em)', '#DE2424') */
|
|
30
|
+
customLeadingIconColor?: string;
|
|
31
|
+
/** Checkbox props */
|
|
32
|
+
checked?: boolean;
|
|
33
|
+
indeterminate?: boolean;
|
|
34
|
+
onCheckboxChange?: (checked: boolean) => void;
|
|
35
|
+
/** Icon/Image props */
|
|
36
|
+
leadingImageUrl?: string;
|
|
37
|
+
leadingImageAlt?: string;
|
|
38
|
+
leadingIcon?: React.ReactNode;
|
|
39
|
+
trailingIcon?: React.ReactNode;
|
|
40
|
+
/** Tag props */
|
|
41
|
+
tagContent?: string;
|
|
42
|
+
tagVariant?: TagProps['variant'];
|
|
43
|
+
/** Trailing text */
|
|
44
|
+
trailingText?: string;
|
|
45
|
+
/** Custom className for middle container */
|
|
46
|
+
middleContainerClassName?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @file A versatile list item component that composes multiple UI elements
|
|
50
|
+
* @description This component renders a horizontal list item that can contain:
|
|
51
|
+
* - Optional checkbox
|
|
52
|
+
* - Optional leading image or icon
|
|
53
|
+
* - Title and description (title required)
|
|
54
|
+
* - Optional trailing icon
|
|
55
|
+
* - Optional tag
|
|
56
|
+
* - Optional trailing text
|
|
57
|
+
*
|
|
58
|
+
* The component is always rendered as a button and handles hover/active/disabled states automatically.
|
|
59
|
+
*
|
|
60
|
+
* @param {ListItemSize} [size='md'] - The size of the list item (affects height and all child components)
|
|
61
|
+
* @param {boolean} [disabled=false] - If true, the list item will be non-interactive
|
|
62
|
+
* @param {string} title - The main title text (required)
|
|
63
|
+
* @param {string} [description] - Optional description text below the title
|
|
64
|
+
* @param {boolean} [showCheckbox=true] - Show/hide checkbox
|
|
65
|
+
* @param {boolean} [showLeadingImage=true] - Show/hide leading image
|
|
66
|
+
* @param {boolean} [showLeadingIcon=true] - Show/hide leading icon
|
|
67
|
+
* @param {boolean} [showTrailingIcon=true] - Show/hide trailing icon
|
|
68
|
+
* @param {boolean} [showTag=true] - Show/hide tag
|
|
69
|
+
* @param {boolean} [showTrailingText=true] - Show/hide trailing text
|
|
70
|
+
* @returns {JSX.Element} The rendered ListItem element
|
|
71
|
+
*/
|
|
72
|
+
export declare const ListItem: ({ size, disabled, showCheckbox, showLeadingImage, showLeadingIcon, showDescription, showTrailingIcon, showTag, showTrailingText, title, description, customTitleColor, customBackgroundColor, customHoverColor, customLeadingIconColor, checked, indeterminate, onCheckboxChange, leadingImageUrl, leadingImageAlt, leadingIcon, trailingIcon, tagContent, tagVariant, trailingText, className, middleContainerClassName, onClick, ...props }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|