@lax-wp/design-system 0.3.113 → 0.3.115
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/dist/components/button/Button.d.ts +25 -0
- package/dist/components/button/ButtonGroup.d.ts +6 -0
- package/dist/components/button/ButtonThreeDots.d.ts +3 -0
- package/dist/components/button/IconButton.d.ts +14 -0
- package/dist/components/button/Radio.d.ts +8 -0
- package/dist/components/buttons/option-button/OptionButton.d.ts +60 -0
- package/dist/components/cards/card-header-view/CardHeaderView.d.ts +33 -0
- package/dist/components/cards/card-header-view/index.d.ts +2 -0
- package/dist/components/cards/card-main/CardMain.d.ts +25 -0
- package/dist/components/cards/card-main/index.d.ts +2 -0
- package/dist/components/cards/tab-content/TabContent.d.ts +30 -0
- package/dist/components/cards/tab-content/index.d.ts +2 -0
- package/dist/components/data-display/access-denied-modal/AccessDeniedModal.d.ts +21 -0
- package/dist/components/data-display/badge/Badge.d.ts +44 -0
- package/dist/components/data-display/banner/Banner.d.ts +37 -0
- package/dist/components/data-display/card/Card.d.ts +31 -0
- package/dist/components/data-display/code-editor/CodeEditor.d.ts +6 -0
- package/dist/components/data-display/code-editor/JsonGrid.d.ts +37 -0
- package/dist/components/data-display/code-editor/Tabs.d.ts +12 -0
- package/dist/components/data-display/comparison/Comparison.d.ts +34 -0
- package/dist/components/data-display/comparison/ComparisonContext.d.ts +36 -0
- package/dist/components/data-display/comparison/components/GridItemHandle.d.ts +7 -0
- package/dist/components/data-display/comparison/components/GridLayout.d.ts +3 -0
- package/dist/components/data-display/comparison/components/Header.d.ts +9 -0
- package/dist/components/data-display/comparison/components/NoAvailableContent.d.ts +2 -0
- package/dist/components/data-display/comparison/components/SortableItem.d.ts +7 -0
- package/dist/components/data-display/comparison/constants.d.ts +15 -0
- package/dist/components/data-display/comparison/icons/CloseIcon.d.ts +7 -0
- package/dist/components/data-display/comparison/icons/ExitIcon.d.ts +6 -0
- package/dist/components/data-display/comparison/icons/LayoutOneIcon.d.ts +6 -0
- package/dist/components/data-display/comparison/icons/LayoutThreeIcon.d.ts +6 -0
- package/dist/components/data-display/comparison/icons/LayoutTwoIcon.d.ts +6 -0
- package/dist/components/data-display/comparison/icons/SearchIcon.d.ts +8 -0
- package/dist/components/data-display/comparison/icons/index.d.ts +12 -0
- package/dist/components/data-display/comparison/index.d.ts +9 -0
- package/dist/components/data-display/comparison/utils.d.ts +15 -0
- package/dist/components/data-display/context-menu/ContextMenu.d.ts +42 -0
- package/dist/components/data-display/datatype-icon/DataTypeIcon.d.ts +104 -0
- package/dist/components/data-display/delete-modal/DeleteModal.d.ts +40 -0
- package/dist/components/data-display/diff-viewer/DiffViewer.d.ts +64 -0
- package/dist/components/data-display/divider/Divider.d.ts +21 -0
- package/dist/components/data-display/dynamic-data-modal/DynamicDataModal.d.ts +26 -0
- package/dist/components/data-display/dynamic-items-cell/DynamicItemsCell.d.ts +50 -0
- package/dist/components/data-display/empty-state/EmptyEvent.d.ts +5 -0
- package/dist/components/data-display/empty-state/NoDataFound.d.ts +27 -0
- package/dist/components/data-display/empty-state/NoDataFoundWidgets.d.ts +20 -0
- package/dist/components/data-display/empty-state/PageNotFound.d.ts +33 -0
- package/dist/components/data-display/empty-state/UserNotFound.d.ts +28 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyBarChartData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyCardChartData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyContentChart.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyCountWidgetData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyDonutChartData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyPieChatData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyTableWidgetData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/EmptyTimelineChartData.d.ts +1 -0
- package/dist/components/data-display/empty-state/empty-widget/index.d.ts +8 -0
- package/dist/components/data-display/empty-state/index.d.ts +11 -0
- package/dist/components/data-display/error-modal/ErrorModal.d.ts +22 -0
- package/dist/components/data-display/floating-element-wrapper/floating-element-dragger.d.ts +1 -0
- package/dist/components/data-display/in-progress/InProgress.d.ts +13 -0
- package/dist/components/data-display/json-grid-viewer/AddKeyModal.d.ts +7 -0
- package/dist/components/data-display/json-grid-viewer/JsonGridBulkFloatingBar.d.ts +2 -0
- package/dist/components/data-display/json-grid-viewer/JsonGridCore.d.ts +3 -0
- package/dist/components/data-display/json-grid-viewer/JsonGridViewer.d.ts +47 -0
- package/dist/components/data-display/json-grid-viewer/JsonGridViewerContext.d.ts +4 -0
- package/dist/components/data-display/json-grid-viewer/JsonValueDisplay.d.ts +8 -0
- package/dist/components/data-display/json-grid-viewer/NestedJsonGrid.d.ts +7 -0
- package/dist/components/data-display/json-grid-viewer/hooks.d.ts +6 -0
- package/dist/components/data-display/json-grid-viewer/index.d.ts +12 -0
- package/dist/components/data-display/json-grid-viewer/types.d.ts +64 -0
- package/dist/components/data-display/json-grid-viewer/utils.d.ts +4 -0
- package/dist/components/data-display/label/Label.d.ts +10 -0
- package/dist/components/data-display/label-value/LabelValue.d.ts +139 -0
- package/dist/components/data-display/lottie-animation/LottieAnimation.d.ts +34 -0
- package/dist/components/data-display/modal/Modal.d.ts +41 -0
- package/dist/components/data-display/pdf-viewer/PdfViewer.d.ts +45 -0
- package/dist/components/data-display/permission-wrapper/PermissionWrapper.d.ts +28 -0
- package/dist/components/data-display/popper/Popper.d.ts +57 -0
- package/dist/components/data-display/progress-bar/CircularProgressBar.d.ts +23 -0
- package/dist/components/data-display/progress-bar/LinearProgressBar.d.ts +27 -0
- package/dist/components/data-display/progress-bar/index.d.ts +4 -0
- package/dist/components/data-display/resizable-sidebar/ResizableSidebar.d.ts +48 -0
- package/dist/components/data-display/skeleton/Skeleton.d.ts +18 -0
- package/dist/components/data-display/status-color-mapping/StatusColorMapping.d.ts +29 -0
- package/dist/components/data-display/tag/Tag.d.ts +53 -0
- package/dist/components/data-display/text/Text.d.ts +41 -0
- package/dist/components/data-display/text-with-strike/TextWithStrike.d.ts +19 -0
- package/dist/components/data-display/typography/Typography.d.ts +15 -0
- package/dist/components/data-display/unsaved-changes-modal/UnsavedChangesModal.d.ts +30 -0
- package/dist/components/drag-and-drop/drag-overlay/DragOverlay.d.ts +25 -0
- package/dist/components/drag-and-drop/drag-overlay/index.d.ts +2 -0
- package/dist/components/drag-and-drop/draggable-container/DraggableContainer.d.ts +29 -0
- package/dist/components/drag-and-drop/draggable-container/index.d.ts +2 -0
- package/dist/components/feedback/confirmation-modal/ConfirmationModal.d.ts +38 -0
- package/dist/components/feedback/toast/Toast.d.ts +29 -0
- package/dist/components/floating-bar/FloatingBar.d.ts +91 -0
- package/dist/components/forms/base-input-field/BaseInputField.d.ts +128 -0
- package/dist/components/forms/checkbox/Checkbox.d.ts +55 -0
- package/dist/components/forms/checkbox/CheckboxComponent.d.ts +9 -0
- package/dist/components/forms/color-picker/ColorPicker.d.ts +60 -0
- package/dist/components/forms/creatable-select/CreatableSelect.d.ts +86 -0
- package/dist/components/forms/currency-input/CurrencyInputField.d.ts +110 -0
- package/dist/components/forms/currency-input/currency.constant.d.ts +13 -0
- package/dist/components/forms/customizable-select-field/CustomizableSelectField.d.ts +126 -0
- package/dist/components/forms/date-range/DateRange.d.ts +73 -0
- package/dist/components/forms/date-range/DateRange2.d.ts +72 -0
- package/dist/components/forms/date-time-field/DateTimeField.d.ts +129 -0
- package/dist/components/forms/debounce-input/DebounceInputField.d.ts +66 -0
- package/dist/components/forms/dynamic-data-input/DynamicDataInput.d.ts +64 -0
- package/dist/components/forms/dynamic-data-input/DynamicDataInputField.d.ts +118 -0
- package/dist/components/forms/field-options/FieldOptions.d.ts +5 -0
- package/dist/components/forms/field-options/Header.d.ts +7 -0
- package/dist/components/forms/field-options/Icon.d.ts +6 -0
- package/dist/components/forms/field-options/Item.d.ts +7 -0
- package/dist/components/forms/field-options/index.d.ts +2 -0
- package/dist/components/forms/field-options/types.d.ts +11 -0
- package/dist/components/forms/file-upload-dragger/FileUpload.d.ts +83 -0
- package/dist/components/forms/file-upload-dragger/icons.d.ts +12 -0
- package/dist/components/forms/formula-input/FormulaInput.d.ts +33 -0
- package/dist/components/forms/formula-input/index.d.ts +3 -0
- package/dist/components/forms/formula-input/utils.d.ts +31 -0
- package/dist/components/forms/icon-picker/IconPicker.d.ts +20 -0
- package/dist/components/forms/input-field/InputField.d.ts +62 -0
- package/dist/components/forms/master-data-input/MasterDataInputField.d.ts +135 -0
- package/dist/components/forms/md-input/MdInput.d.ts +46 -0
- package/dist/components/forms/multi-file-upload/MultiFileUpload.d.ts +78 -0
- package/dist/components/forms/number-input-field/NumberInputField.d.ts +47 -0
- package/dist/components/forms/percentage-input/PercentageInputField.d.ts +107 -0
- package/dist/components/forms/search-bar/SearchBar.d.ts +28 -0
- package/dist/components/forms/select-field/SelectField.d.ts +162 -0
- package/dist/components/forms/text-area-field/TextAreaField.d.ts +114 -0
- package/dist/components/forms/text-field/TextField.d.ts +48 -0
- package/dist/components/forms/toggle/Toggle.d.ts +108 -0
- package/dist/components/icons/AIExtractedIndicator.d.ts +7 -0
- package/dist/components/icons/AIStarIcon.d.ts +8 -0
- package/dist/components/icons/ArchivedIcon.d.ts +7 -0
- package/dist/components/icons/CheckCircle.d.ts +7 -0
- package/dist/components/icons/CheckSmallIcon.d.ts +7 -0
- package/dist/components/icons/CloseIcon.d.ts +16 -0
- package/dist/components/icons/CloseRounded.d.ts +9 -0
- package/dist/components/icons/ComingSoonIcon.d.ts +7 -0
- package/dist/components/icons/EditIcon.d.ts +7 -0
- package/dist/components/icons/HelpIcon.d.ts +6 -0
- package/dist/components/icons/InfoAlert.d.ts +7 -0
- package/dist/components/icons/InfoCircleIcon.d.ts +7 -0
- package/dist/components/icons/LaxIcon.d.ts +6 -0
- package/dist/components/icons/Required.d.ts +3 -0
- package/dist/components/icons/SearchIcon.d.ts +9 -0
- package/dist/components/layout/ComponentLoader.d.ts +20 -0
- package/dist/components/layout/CustomScrollbar.d.ts +46 -0
- package/dist/components/layout/Helmet.d.ts +29 -0
- package/dist/components/layout/HelmetTitle.d.ts +23 -0
- package/dist/components/layout/LogoLoader.d.ts +22 -0
- package/dist/components/layout/PageContainer.d.ts +51 -0
- package/dist/components/layout/index.d.ts +12 -0
- package/dist/components/modal/confirm-popup/ConfirmPopUp.d.ts +26 -0
- package/dist/components/modal/confirm-popup/index.d.ts +2 -0
- package/dist/components/modal/drawer/Drawer.d.ts +35 -0
- package/dist/components/modal/drawer/index.d.ts +2 -0
- package/dist/components/navigation/accordion/Accordion.d.ts +39 -0
- package/dist/components/navigation/accordion/index.d.ts +2 -0
- package/dist/components/navigation/breadcrumbs/BreadCrumb.d.ts +52 -0
- package/dist/components/navigation/breadcrumbs/BreadCrumbItem.d.ts +39 -0
- package/dist/components/navigation/breadcrumbs/index.d.ts +4 -0
- package/dist/components/navigation/stepper/Stepper.d.ts +45 -0
- package/dist/components/navigation/stepper/index.d.ts +2 -0
- package/dist/components/sidebar/Sidebar.d.ts +15 -0
- package/dist/components/sidebar/index.d.ts +2 -0
- package/dist/components/tooltip/Tooltip.d.ts +16 -0
- package/dist/components/user-avatar/NameInitialLogo.d.ts +15 -0
- package/dist/components/user-avatar/PersonIcon.d.ts +7 -0
- package/dist/components/user-avatar/StatusInfoRow.d.ts +5 -0
- package/dist/components/user-avatar/UserAvatar.d.ts +53 -0
- package/dist/components/user-avatar/UserAvatarPopper.d.ts +11 -0
- package/dist/components/user-avatar/UserProfilePic.d.ts +15 -0
- package/dist/components/user-avatar/constants.d.ts +8 -0
- package/dist/components/user-avatar/index.d.ts +13 -0
- package/dist/components/user-avatar/useDynamicPosition.d.ts +13 -0
- package/dist/constants/colors.d.ts +263 -0
- package/dist/constants/layout.d.ts +15 -0
- package/dist/constants/toggle.d.ts +12 -0
- package/dist/hooks/useEventListener.d.ts +4 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/dist/hooks/useModalContainer.d.ts +23 -0
- package/dist/hooks/useOS.d.ts +32 -0
- package/dist/hooks/useOutsideClick.d.ts +28 -0
- package/dist/hooks/usePythonSyntax.d.ts +28 -0
- package/dist/hooks/useScrollToTop.d.ts +5 -0
- package/dist/hooks/useTheme.d.ts +6 -0
- package/dist/index.d.ts +212 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/services/monacoManager.d.ts +28 -0
- package/dist/types/icon-picker.d.ts +2 -0
- package/dist/types/index.d.ts +70 -0
- package/dist/utils/countryFlags.d.ts +5 -0
- package/dist/utils/formatters.d.ts +24 -0
- package/dist/utils/messageConstants.d.ts +88 -0
- package/dist/utils/tagUtils.d.ts +12 -0
- package/dist/utils/utilities.d.ts +24 -0
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ItemType } from 'antd/es/menu/interface';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IButtonProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
primary?: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
id: string;
|
|
11
|
+
status?: IButtonStatus;
|
|
12
|
+
appearance?: IButtonAppearance;
|
|
13
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
14
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
15
|
+
badge?: string | number;
|
|
16
|
+
type?: 'button' | 'submit' | 'reset';
|
|
17
|
+
options?: ItemType[];
|
|
18
|
+
tooltip?: string;
|
|
19
|
+
tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';
|
|
20
|
+
theme?: 'light' | 'dark';
|
|
21
|
+
}
|
|
22
|
+
export type IButtonStatus = 'secondary-neutral' | 'primary' | 'secondary' | 'error' | 'warning' | 'success' | 'error-secondary' | 'cancel' | 'no-background' | 'publish' | 'default';
|
|
23
|
+
export type IButtonAppearance = 'filled' | 'outline' | 'ghost' | 'dashed';
|
|
24
|
+
declare const Button: React.FC<IButtonProps>;
|
|
25
|
+
export default Button;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export interface IconButtonProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
onClick?(event: React.MouseEvent<HTMLButtonElement>): void;
|
|
6
|
+
variant?: 'default' | 'secondary' | 'native' | 'ghost';
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';
|
|
10
|
+
noborder?: boolean;
|
|
11
|
+
id?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const IconButton: React.FC<IconButtonProps>;
|
|
14
|
+
export default IconButton;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type FC, type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the OptionButton component
|
|
4
|
+
*/
|
|
5
|
+
export interface OptionButtonProps {
|
|
6
|
+
/** Unique identifier for the button */
|
|
7
|
+
id?: string;
|
|
8
|
+
/** Click handler for the button */
|
|
9
|
+
onClick?(e?: any): void;
|
|
10
|
+
/** Icon to display before the text */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** Button text content */
|
|
13
|
+
text: string;
|
|
14
|
+
/** Additional CSS classes */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Whether the button is disabled */
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
/** Callback when the button is closed */
|
|
19
|
+
onClose?(): void;
|
|
20
|
+
/** Whether the button should be hidden */
|
|
21
|
+
notVisible?: boolean;
|
|
22
|
+
/** Whether to hide hover effects */
|
|
23
|
+
hideHoverEffect?: boolean;
|
|
24
|
+
/** Icon to display after the text (trailing) */
|
|
25
|
+
leadingIcon?: ReactNode;
|
|
26
|
+
/** Suffix record object for badge content lookup by text */
|
|
27
|
+
suffixRecord?: Record<string, string | number>;
|
|
28
|
+
/** Whether to stop event propagation on click */
|
|
29
|
+
stopPropagation?: boolean;
|
|
30
|
+
/** Toggle functionality callback */
|
|
31
|
+
onToggle?: () => void;
|
|
32
|
+
/** Whether the toggle is checked (if onToggle is provided) */
|
|
33
|
+
isChecked?: boolean;
|
|
34
|
+
/** Text to highlight within the button text */
|
|
35
|
+
highlight?: string;
|
|
36
|
+
/** Whether to truncate text */
|
|
37
|
+
truncateText?: boolean;
|
|
38
|
+
/** Whether to show a checkmark tick */
|
|
39
|
+
showTick?: boolean;
|
|
40
|
+
/** Custom width for the text container */
|
|
41
|
+
width?: string;
|
|
42
|
+
/** Tooltip text to display */
|
|
43
|
+
tooltip?: string;
|
|
44
|
+
/** Whether the flow is available (controls button enabled state) */
|
|
45
|
+
isFlowAvailable?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* OptionButton component provides a flexible button for lists, menus, and option selections.
|
|
49
|
+
* Based on the web portal implementation for consistency across apps.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* <OptionButton
|
|
54
|
+
* text="Save Document"
|
|
55
|
+
* icon={<SaveIcon />}
|
|
56
|
+
* onClick={() => console.log('Save clicked')}
|
|
57
|
+
* />
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare const OptionButton: FC<OptionButtonProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export type CardHeaderViewProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
/** The link destination. If not provided, no link will be shown */
|
|
5
|
+
to?: string;
|
|
6
|
+
/** Whether the user has permission to see the link. Defaults to true */
|
|
7
|
+
hasUserPermissions?: boolean;
|
|
8
|
+
/** Custom view more text. Defaults to "View More" */
|
|
9
|
+
viewMoreText?: string;
|
|
10
|
+
/** Custom link component to use instead of anchor tag (for React Router, Next.js, etc) */
|
|
11
|
+
LinkComponent?: FC<{
|
|
12
|
+
to: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
onMouseDown?: (e: React.MouseEvent) => void;
|
|
16
|
+
onTouchStart?: (e: React.TouchEvent) => void;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* CardHeaderView component for card headers with optional "View More" link
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* // With default anchor link
|
|
26
|
+
* <CardHeaderView title="Recent Items" to="/items" />
|
|
27
|
+
*
|
|
28
|
+
* // With React Router Link
|
|
29
|
+
* import { Link } from 'react-router-dom';
|
|
30
|
+
* <CardHeaderView title="Recent Items" to="/items" LinkComponent={Link} />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare const CardHeaderView: FC<CardHeaderViewProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export type CardMainProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
noPadding?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
noHeight?: boolean;
|
|
8
|
+
noBanner?: boolean;
|
|
9
|
+
noScrollbar?: boolean;
|
|
10
|
+
/** Current mode - can be 'edit', 'focusEdit', 'comparison' */
|
|
11
|
+
mode?: string | null;
|
|
12
|
+
/** Display ID to show in banner */
|
|
13
|
+
displayId?: string | null;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* CardMain component for main content areas with optional edit/comparison banners
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <CardMain title="Page Title" mode="edit" displayId="DOC-001">
|
|
21
|
+
* <div>Page content</div>
|
|
22
|
+
* </CardMain>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare const CardMain: FC<CardMainProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export type TabContentDrawerConfig = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
header: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type TabContentProps = {
|
|
9
|
+
tabs?: ReactNode | false | null;
|
|
10
|
+
title?: string;
|
|
11
|
+
content: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
noPadding?: boolean;
|
|
14
|
+
noBorder?: boolean;
|
|
15
|
+
drawerConfig?: TabContentDrawerConfig | null;
|
|
16
|
+
noBorderTopContent?: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* TabContent component for tabbed content with optional drawer
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <TabContent
|
|
24
|
+
* title="Page Title"
|
|
25
|
+
* tabs={<Tabs items={tabItems} />}
|
|
26
|
+
* content={<div>Tab content here</div>}
|
|
27
|
+
* />
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const TabContent: FC<TabContentProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
export interface AccessDeniedModalProps {
|
|
3
|
+
title: string;
|
|
4
|
+
visible: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
content: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* AccessDeniedModal component for displaying access denied messages
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <AccessDeniedModal
|
|
14
|
+
* title="Access Denied"
|
|
15
|
+
* visible={isOpen}
|
|
16
|
+
* onClose={() => setIsOpen(false)}
|
|
17
|
+
* content="You don't have permission to access this resource."
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare const AccessDeniedModal: FC<AccessDeniedModalProps>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Available badge status options
|
|
3
|
+
*/
|
|
4
|
+
export type BadgeStatus = "default" | "primary" | "warning" | "error" | "neutral" | "success" | "info";
|
|
5
|
+
/**
|
|
6
|
+
* Badge appearance variants
|
|
7
|
+
*/
|
|
8
|
+
export type BadgeAppearance = "filled" | "outline";
|
|
9
|
+
/**
|
|
10
|
+
* Badge size variants
|
|
11
|
+
*/
|
|
12
|
+
export type BadgeSize = "sm" | "md" | "lg";
|
|
13
|
+
/**
|
|
14
|
+
* Props for the Badge component
|
|
15
|
+
*/
|
|
16
|
+
export interface BadgeProps {
|
|
17
|
+
/** The badge status/color variant */
|
|
18
|
+
status?: BadgeStatus;
|
|
19
|
+
/** The text content to display */
|
|
20
|
+
children: string;
|
|
21
|
+
/** Visual appearance style */
|
|
22
|
+
appearance?: BadgeAppearance;
|
|
23
|
+
/** Size variant */
|
|
24
|
+
size?: BadgeSize;
|
|
25
|
+
/** Additional CSS classes for the wrapper */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** Whether to use rounded pill shape */
|
|
28
|
+
isRounded?: boolean;
|
|
29
|
+
/** Whether to capitalize the text */
|
|
30
|
+
capitalize?: boolean;
|
|
31
|
+
/** Custom aria-label for accessibility */
|
|
32
|
+
"aria-label"?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Badge component displays small status indicators or labels
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <Badge status="success">Active</Badge>
|
|
40
|
+
* <Badge status="error" appearance="filled">Error</Badge>
|
|
41
|
+
* <Badge status="warning" size="sm" isRounded>Warning</Badge>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Available banner status options
|
|
4
|
+
*/
|
|
5
|
+
export type BannerStatus = "success" | "error" | "warning" | "info" | "infoGrey" | "archived" | "canceled" | "queued" | "paused" | "awaiting_action" | "skipped" | "pending";
|
|
6
|
+
/**
|
|
7
|
+
* Props for the Banner component
|
|
8
|
+
*/
|
|
9
|
+
export interface BannerProps {
|
|
10
|
+
/** The main content to display */
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
/** The banner status/color variant */
|
|
13
|
+
status: BannerStatus;
|
|
14
|
+
/** Additional content to display on the right side */
|
|
15
|
+
additionalChildren?: React.ReactNode;
|
|
16
|
+
/** Component to render when expanded (for error status). Receives executionId as prop. */
|
|
17
|
+
ExpandedComponent?: React.ComponentType<{
|
|
18
|
+
executionId?: string;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
}>;
|
|
21
|
+
/** Execution ID to pass to the ExpandedComponent */
|
|
22
|
+
executionId?: string;
|
|
23
|
+
/** Additional CSS classes for the wrapper */
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Banner component displays important information with status-based styling
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <Banner status="success">Operation completed successfully</Banner>
|
|
32
|
+
* <Banner status="error" ExpandedComponent={FlowErrorBanner} executionId="123">
|
|
33
|
+
* Error occurred
|
|
34
|
+
* </Banner>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const Banner: React.ForwardRefExoticComponent<BannerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type FC, type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the Card component
|
|
4
|
+
*/
|
|
5
|
+
export interface CardProps {
|
|
6
|
+
/** Content to render inside the card */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** Additional CSS classes to apply */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Title to display in document head (via HelmetTitle) */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** Inline styles to apply */
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
/** HTML id attribute */
|
|
15
|
+
id?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Card component for displaying content in a styled container
|
|
19
|
+
*
|
|
20
|
+
* This component provides a consistent card layout with shadow, rounded corners,
|
|
21
|
+
* and proper dark mode support. It can optionally set the document title using
|
|
22
|
+
* the HelmetTitle component.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <Card title="My Card">
|
|
27
|
+
* <div>Card content</div>
|
|
28
|
+
* </Card>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare const Card: FC<CardProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JsonGrid component - Drop-in replacement for lax-web-portal's JsonGrid
|
|
3
|
+
*
|
|
4
|
+
* This is an alias for JsonGridViewer that provides 100% compatibility
|
|
5
|
+
* with the web portal's JsonGrid component implementation.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Full edit mode with add, delete, duplicate, and copy operations
|
|
9
|
+
* - Nested JSON support with expandable/collapsible nodes
|
|
10
|
+
* - Bulk selection and operations via floating bar
|
|
11
|
+
* - Add key modal for creating new JSON properties
|
|
12
|
+
* - Dark mode support
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* import { JsonGrid } from '@lax-wp/design-system';
|
|
17
|
+
*
|
|
18
|
+
* const [value, setValue] = useState('{"key": "value"}');
|
|
19
|
+
* const [allExpanded, setAllExpanded] = useState(false);
|
|
20
|
+
* const [isAddKeyModalOpen, setIsAddKeyModalOpen] = useState(false);
|
|
21
|
+
*
|
|
22
|
+
* <JsonGrid
|
|
23
|
+
* isFullScreen={false}
|
|
24
|
+
* allExpanded={allExpanded}
|
|
25
|
+
* toggleAll={() => setAllExpanded(!allExpanded)}
|
|
26
|
+
* isEditMode={true}
|
|
27
|
+
* isDarkMode={false}
|
|
28
|
+
* style={{ maxHeight: '500px' }}
|
|
29
|
+
* value={value}
|
|
30
|
+
* onChange={setValue}
|
|
31
|
+
* setIsAddKeyModalOpen={setIsAddKeyModalOpen}
|
|
32
|
+
* isAddKeyModalOpen={isAddKeyModalOpen}
|
|
33
|
+
* />
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export { JsonGridViewer as JsonGrid } from '../json-grid-viewer';
|
|
37
|
+
export type { JsonGridViewerProps as JsonGridProps } from '../json-grid-viewer';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TabsProps<T extends string> {
|
|
3
|
+
variant?: 'default' | 'switch';
|
|
4
|
+
tabs: T[];
|
|
5
|
+
activeTab: T;
|
|
6
|
+
onTabClick: (tab: T) => void;
|
|
7
|
+
size?: 'sm' | 'md' | 'lg';
|
|
8
|
+
tabIcons?: Partial<Record<T, React.ReactNode>>;
|
|
9
|
+
height?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Tabs: <T extends string>({ variant, tabs, activeTab, onTabClick, size, tabIcons, height, className }: TabsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Dispatch, ReactNode } from 'react';
|
|
2
|
+
import { ILayoutItem } from './constants';
|
|
3
|
+
export interface ComparisonProps {
|
|
4
|
+
/** Configuration for header tabs */
|
|
5
|
+
headerTabConfig?: {
|
|
6
|
+
tabs: string[];
|
|
7
|
+
tabKey: string;
|
|
8
|
+
tabState: any;
|
|
9
|
+
};
|
|
10
|
+
/** Title displayed in the header */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** Layout items for comparison panels */
|
|
13
|
+
layoutItems: ILayoutItem[];
|
|
14
|
+
/** Setter function for layout items */
|
|
15
|
+
setLayoutItems: Dispatch<React.SetStateAction<ILayoutItem[]>>;
|
|
16
|
+
/** Function to render header content for each panel */
|
|
17
|
+
layoutHeader: (id: number) => ReactNode;
|
|
18
|
+
/** Function to render main content for each panel */
|
|
19
|
+
layoutContent: (id: number) => ReactNode;
|
|
20
|
+
/** URL to navigate to when returning/exiting */
|
|
21
|
+
returnUrl?: string | number;
|
|
22
|
+
/** Callback function when user clicks return/exit button */
|
|
23
|
+
onReturn?: () => void;
|
|
24
|
+
/** Optional navigation function for back navigation */
|
|
25
|
+
onNavigateBack?: (url: string) => void;
|
|
26
|
+
/** Custom tabs component to render in the header */
|
|
27
|
+
tabsComponent?: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Comparison component for side-by-side comparison of multiple items
|
|
31
|
+
* Supports 1, 2, or 3 column layouts with drag-and-drop reordering
|
|
32
|
+
*/
|
|
33
|
+
declare const Comparison: (props: ComparisonProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export default Comparison;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Dispatch, ReactNode } from 'react';
|
|
2
|
+
import { COMPARISON_LAYOUT, ILayoutItem } from './constants';
|
|
3
|
+
export type TComparisonContext = {
|
|
4
|
+
headerTabConfig?: {
|
|
5
|
+
tabs: string[];
|
|
6
|
+
tabKey: string;
|
|
7
|
+
tabState: any;
|
|
8
|
+
};
|
|
9
|
+
title?: string;
|
|
10
|
+
layoutItems: ILayoutItem[];
|
|
11
|
+
setLayoutItems: Dispatch<React.SetStateAction<ILayoutItem[]>>;
|
|
12
|
+
layout?: number;
|
|
13
|
+
setLayout: (_layout: COMPARISON_LAYOUT) => void;
|
|
14
|
+
hideLayoutItem: (_id: number) => void;
|
|
15
|
+
layoutHeader: (id: number) => ReactNode;
|
|
16
|
+
layoutContent: (id: number) => ReactNode;
|
|
17
|
+
returnUrl?: string | number;
|
|
18
|
+
onReturn?: () => void;
|
|
19
|
+
};
|
|
20
|
+
export interface ComparisonProviderProps {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
headerTabConfig?: {
|
|
23
|
+
tabs: string[];
|
|
24
|
+
tabKey: string;
|
|
25
|
+
tabState: any;
|
|
26
|
+
};
|
|
27
|
+
title?: string;
|
|
28
|
+
layoutItems: ILayoutItem[];
|
|
29
|
+
setLayoutItems: Dispatch<React.SetStateAction<ILayoutItem[]>>;
|
|
30
|
+
layoutHeader: (id: number) => ReactNode;
|
|
31
|
+
layoutContent: (id: number) => ReactNode;
|
|
32
|
+
returnUrl?: string | number;
|
|
33
|
+
onReturn?: () => void;
|
|
34
|
+
}
|
|
35
|
+
export declare const ComparisonContext: import("react").Context<TComparisonContext>;
|
|
36
|
+
export declare const ComparisonProvider: ({ children, headerTabConfig, title, layoutItems, setLayoutItems, layoutHeader, layoutContent, returnUrl, onReturn, }: ComparisonProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useSortable } from '@dnd-kit/sortable';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface GridItemHandleProps {
|
|
4
|
+
listeners: ReturnType<typeof useSortable>['listeners'];
|
|
5
|
+
}
|
|
6
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<GridItemHandleProps & React.RefAttributes<HTMLButtonElement>>>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ComparisonHeaderProps {
|
|
3
|
+
/** Optional navigation function to go back */
|
|
4
|
+
onNavigateBack?: (url: string) => void;
|
|
5
|
+
/** Custom tabs component to render in the header */
|
|
6
|
+
tabsComponent?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: React.NamedExoticComponent<ComparisonHeaderProps>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TLabelValue } from '../../forms/select-field/SelectField';
|
|
2
|
+
export declare enum COMPARISON_LAYOUT {
|
|
3
|
+
ONE = 1,
|
|
4
|
+
TWO = 2,
|
|
5
|
+
THREE = 3
|
|
6
|
+
}
|
|
7
|
+
export interface ILayoutItem {
|
|
8
|
+
id: number;
|
|
9
|
+
visible: boolean;
|
|
10
|
+
states: any;
|
|
11
|
+
version?: TLabelValue;
|
|
12
|
+
additionalVersions?: Array<TLabelValue>;
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const DEFAULT_COMPARISON_LAYOUTS: ILayoutItem[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { ExitIcon } from './ExitIcon';
|
|
2
|
+
export type { ExitIconProps } from './ExitIcon';
|
|
3
|
+
export { LayoutOneIcon } from './LayoutOneIcon';
|
|
4
|
+
export type { LayoutOneIconProps } from './LayoutOneIcon';
|
|
5
|
+
export { LayoutTwoIcon } from './LayoutTwoIcon';
|
|
6
|
+
export type { LayoutTwoIconProps } from './LayoutTwoIcon';
|
|
7
|
+
export { LayoutThreeIcon } from './LayoutThreeIcon';
|
|
8
|
+
export type { LayoutThreeIconProps } from './LayoutThreeIcon';
|
|
9
|
+
export { CloseIcon } from './CloseIcon';
|
|
10
|
+
export type { CloseIconProps } from './CloseIcon';
|
|
11
|
+
export { SearchIcon } from './SearchIcon';
|
|
12
|
+
export type { SearchIconProps } from './SearchIcon';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as Comparison } from './Comparison';
|
|
2
|
+
export type { ComparisonProps } from './Comparison';
|
|
3
|
+
export { ComparisonContext, ComparisonProvider } from './ComparisonContext';
|
|
4
|
+
export type { TComparisonContext, ComparisonProviderProps } from './ComparisonContext';
|
|
5
|
+
export { COMPARISON_LAYOUT, DEFAULT_COMPARISON_LAYOUTS } from './constants';
|
|
6
|
+
export type { ILayoutItem } from './constants';
|
|
7
|
+
export { gridLayoutItems, filterVisibleItems, filteredOptions, getCurrentSelectValue, parseToIds } from './utils';
|
|
8
|
+
export { ExitIcon, LayoutOneIcon, LayoutTwoIcon, LayoutThreeIcon, CloseIcon, SearchIcon } from './icons';
|
|
9
|
+
export type { ExitIconProps, LayoutOneIconProps, LayoutTwoIconProps, LayoutThreeIconProps, CloseIconProps, SearchIconProps } from './icons';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ILayoutItem } from './constants';
|
|
2
|
+
export declare const gridLayoutItems: import("memoize-one").MemoizedFn<(layoutItems: Array<Pick<ILayoutItem, "id" | "visible" | "states" | "isLoading">>) => {
|
|
3
|
+
items: Pick<ILayoutItem, "id" | "visible" | "isLoading" | "states">[];
|
|
4
|
+
ids: number[];
|
|
5
|
+
}>;
|
|
6
|
+
export declare const filterVisibleItems: import("memoize-one").MemoizedFn<(layoutItems: Array<Pick<ILayoutItem, "visible">>) => number>;
|
|
7
|
+
export declare const filteredOptions: import("memoize-one").MemoizedFn<(options: Array<any>, selectedValue?: string) => any[]>;
|
|
8
|
+
export declare const getCurrentSelectValue: import("memoize-one").MemoizedFn<(options: Array<{
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}>, selectValue?: string) => {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}[]>;
|
|
15
|
+
export declare const parseToIds: import("memoize-one").MemoizedFn<(ids: string) => any>;
|