@lax-wp/design-system 0.3.95 → 0.3.97
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/data-display/code-editor/JsonGrid.d.ts +37 -14
- package/dist/components/data-display/comparison/Comparison.d.ts +36 -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 +7 -0
- package/dist/components/data-display/comparison/components/Header.d.ts +11 -0
- package/dist/components/data-display/comparison/components/NoAvailableContent.d.ts +7 -0
- package/dist/components/data-display/comparison/components/SortableItem.d.ts +9 -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/empty-state/EmptyEvent.d.ts +5 -0
- package/dist/components/data-display/empty-state/NoDataFoundWidgets.d.ts +20 -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 +5 -0
- package/dist/components/data-display/floating-element-wrapper/floating-element-dragger.d.ts +1 -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/floating-bar/FloatingBar.d.ts +28 -84
- package/dist/components/forms/field-options/FieldOptions.d.ts +10 -0
- package/dist/components/forms/field-options/Header.d.ts +9 -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 +3 -0
- package/dist/components/forms/field-options/types.d.ts +11 -0
- package/dist/components/forms/file-upload-dragger/{FileUploadDragger.d.ts → FileUpload.d.ts} +1 -1
- 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/index.d.ts +15 -5
- package/dist/index.es.js +19274 -18825
- package/dist/index.umd.js +88 -80
- package/package.json +12 -7
|
@@ -1,14 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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,36 @@
|
|
|
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
|
+
/** Translation function - if not provided, strings will be used as-is */
|
|
25
|
+
t?: (key: string) => string;
|
|
26
|
+
/** Optional navigation function for back navigation */
|
|
27
|
+
onNavigateBack?: (url: string) => void;
|
|
28
|
+
/** Custom tabs component to render in the header */
|
|
29
|
+
tabsComponent?: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Comparison component for side-by-side comparison of multiple items
|
|
33
|
+
* Supports 1, 2, or 3 column layouts with drag-and-drop reordering
|
|
34
|
+
*/
|
|
35
|
+
declare const Comparison: (props: ComparisonProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
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,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface GridLayoutProps {
|
|
3
|
+
/** Translation function - if not provided, strings will be used as-is */
|
|
4
|
+
t?: (key: string) => string;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: React.NamedExoticComponent<GridLayoutProps>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ComparisonHeaderProps {
|
|
3
|
+
/** Translation function - if not provided, strings will be used as-is */
|
|
4
|
+
t?: (key: string) => string;
|
|
5
|
+
/** Optional navigation function to go back */
|
|
6
|
+
onNavigateBack?: (url: string) => void;
|
|
7
|
+
/** Custom tabs component to render in the header */
|
|
8
|
+
tabsComponent?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: React.NamedExoticComponent<ComparisonHeaderProps>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface NoAvailableContentProps {
|
|
3
|
+
/** Translation function - if not provided, strings will be used as-is */
|
|
4
|
+
t?: (key: string) => string;
|
|
5
|
+
}
|
|
6
|
+
declare const NoAvailableContent: React.FC<NoAvailableContentProps>;
|
|
7
|
+
export default NoAvailableContent;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ILayoutItem } from '../constants';
|
|
3
|
+
export interface SortableItemProps {
|
|
4
|
+
item: ILayoutItem;
|
|
5
|
+
/** Translation function - if not provided, strings will be used as-is */
|
|
6
|
+
t?: (key: string) => string;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: React.NamedExoticComponent<SortableItemProps>;
|
|
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>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface NoDataFoundWidgetsProps {
|
|
3
|
+
/** Widget type to determine which illustration to show */
|
|
4
|
+
widgetType?: string;
|
|
5
|
+
/** Custom CSS class name */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Test ID for testing */
|
|
8
|
+
'data-testid'?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* NoDataFoundWidgets component displays an empty state for various widget types
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <NoDataFoundWidgets widgetType="BAR_CHART" />
|
|
16
|
+
* <NoDataFoundWidgets widgetType="PIE_CHART" />
|
|
17
|
+
* <NoDataFoundWidgets widgetType="TABLE" />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare const NoDataFoundWidgets: FC<NoDataFoundWidgetsProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EmptyBarChartData: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EmptyCardListChartData: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EmptyContentChartData: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EmptyCountWidgetData: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EmptyDonutChartData: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EmptyPieChatData: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EmptyTableWidgetData: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EmptyTimelineChartData: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './EmptyBarChartData';
|
|
2
|
+
export * from './EmptyCountWidgetData';
|
|
3
|
+
export * from './EmptyCardChartData';
|
|
4
|
+
export * from './EmptyPieChatData';
|
|
5
|
+
export * from './EmptyDonutChartData';
|
|
6
|
+
export * from './EmptyTimelineChartData';
|
|
7
|
+
export * from './EmptyTableWidgetData';
|
|
8
|
+
export * from './EmptyContentChart';
|
|
@@ -4,3 +4,8 @@ export { PageNotFound } from './PageNotFound';
|
|
|
4
4
|
export type { PageNotFoundProps } from './PageNotFound';
|
|
5
5
|
export { UserNotFound } from './UserNotFound';
|
|
6
6
|
export type { UserNotFoundProps } from './UserNotFound';
|
|
7
|
+
export { EmptyEvent } from './EmptyEvent';
|
|
8
|
+
export type { EmptyEventProps } from './EmptyEvent';
|
|
9
|
+
export { NoDataFoundWidgets } from './NoDataFoundWidgets';
|
|
10
|
+
export type { NoDataFoundWidgetsProps } from './NoDataFoundWidgets';
|
|
11
|
+
export { EmptyBarChartData, EmptyCardListChartData, EmptyContentChartData, EmptyCountWidgetData, EmptyDonutChartData, EmptyPieChatData, EmptyTableWidgetData, EmptyTimelineChartData, } from './empty-widget';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FloatingElementWrapper: ({ children, showAsModal, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface CircularProgressBarProps {
|
|
3
|
+
/** Target value to animate to */
|
|
4
|
+
value: number;
|
|
5
|
+
/** Maximum value for the progress */
|
|
6
|
+
max?: number;
|
|
7
|
+
/** Size of the circular progress bar in pixels */
|
|
8
|
+
size?: number;
|
|
9
|
+
/** Width of the stroke in pixels */
|
|
10
|
+
strokeWidth?: number;
|
|
11
|
+
/** Color of the progress arc */
|
|
12
|
+
color?: string;
|
|
13
|
+
/** Animation duration in milliseconds */
|
|
14
|
+
duration?: number;
|
|
15
|
+
/** Callback to receive the animated display value during animation */
|
|
16
|
+
setAnimatedDisplayValue?: (value: number) => void;
|
|
17
|
+
/** Children to render in the center of the circle */
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* CircularProgressBar component that animates from 0 to a target value
|
|
22
|
+
*/
|
|
23
|
+
export declare const CircularProgressBar: React.FC<CircularProgressBarProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface LinearProgressBarProps {
|
|
3
|
+
/** Target value to animate to (0-100 by default, or based on max) */
|
|
4
|
+
stopAt?: number;
|
|
5
|
+
/** Maximum value for the progress bar */
|
|
6
|
+
max?: number;
|
|
7
|
+
/** Height of the progress bar in pixels */
|
|
8
|
+
height?: number;
|
|
9
|
+
/** Single color for the progress bar */
|
|
10
|
+
color?: string;
|
|
11
|
+
/** Start color for gradient (requires toColor) */
|
|
12
|
+
fromColor?: string;
|
|
13
|
+
/** End color for gradient (requires fromColor) */
|
|
14
|
+
toColor?: string;
|
|
15
|
+
/** Animation duration in milliseconds */
|
|
16
|
+
duration?: number;
|
|
17
|
+
/** Callback to receive the animated display value during animation */
|
|
18
|
+
setAnimatedDisplayValue?: (value: number) => void;
|
|
19
|
+
/** Children to render below the progress bar */
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
/** Additional CSS classes */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* LinearProgressBar component that animates from 0 to a target value
|
|
26
|
+
*/
|
|
27
|
+
export declare const LinearProgressBar: React.FC<LinearProgressBarProps>;
|
|
@@ -1,28 +1,14 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
/**
|
|
3
|
-
* Available floating bar sizes
|
|
4
|
-
*/
|
|
5
|
-
export type FloatingBarSize = "small" | "medium" | "large";
|
|
6
|
-
/**
|
|
7
|
-
* Available floating bar positions
|
|
8
|
-
*/
|
|
9
|
-
export type FloatingBarPosition = "top" | "bottom";
|
|
10
|
-
/**
|
|
11
|
-
* Available floating bar themes
|
|
12
|
-
*/
|
|
13
|
-
export type FloatingBarTheme = "primary" | "dark" | "light";
|
|
1
|
+
import { type FC, type ReactNode } from "react";
|
|
14
2
|
/**
|
|
15
3
|
* Configuration for action buttons in the floating bar
|
|
16
4
|
*/
|
|
17
|
-
export
|
|
18
|
-
/** Unique identifier for the action */
|
|
19
|
-
id: string;
|
|
5
|
+
export type ButtonConfig = {
|
|
20
6
|
/** Button label text */
|
|
21
7
|
label?: string;
|
|
22
8
|
/** Icon element to display */
|
|
23
9
|
icon: ReactNode;
|
|
24
10
|
/** Click handler for the action */
|
|
25
|
-
onClick?: (
|
|
11
|
+
onClick?: () => void;
|
|
26
12
|
/** Icon for dropdown mode */
|
|
27
13
|
dropdownIcon?: ReactNode;
|
|
28
14
|
/** Whether the action is visible */
|
|
@@ -35,86 +21,41 @@ export interface FloatingBarActionConfig {
|
|
|
35
21
|
hideLabel?: boolean;
|
|
36
22
|
/** Action type */
|
|
37
23
|
type?: "button" | "dropdown";
|
|
24
|
+
/** Dropdown trigger mode */
|
|
25
|
+
dropdownTrigger?: "click" | "hover";
|
|
38
26
|
/** Dropdown menu items */
|
|
39
27
|
dropdownItems?: Array<{
|
|
40
28
|
label: ReactNode;
|
|
41
29
|
key: string;
|
|
42
30
|
disabled?: boolean;
|
|
43
|
-
onClick?: () => void;
|
|
44
31
|
}>;
|
|
45
|
-
|
|
46
|
-
className?: string;
|
|
47
|
-
/** Test ID for testing */
|
|
48
|
-
"data-testid"?: string;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Configuration for the delete action
|
|
52
|
-
*/
|
|
53
|
-
export interface FloatingBarDeleteConfig {
|
|
54
|
-
/** Delete button label */
|
|
55
|
-
label?: string;
|
|
56
|
-
/** Whether delete is disabled */
|
|
57
|
-
disabled?: boolean;
|
|
58
|
-
/** Delete action handler */
|
|
59
|
-
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
60
|
-
/** Custom icon for delete */
|
|
61
|
-
icon?: ReactNode;
|
|
62
|
-
/** Delete confirmation required */
|
|
63
|
-
confirmRequired?: boolean;
|
|
64
|
-
/** Confirmation message */
|
|
65
|
-
confirmMessage?: string;
|
|
66
|
-
}
|
|
32
|
+
};
|
|
67
33
|
/**
|
|
68
34
|
* Props for the FloatingBar component
|
|
69
35
|
*/
|
|
70
|
-
export
|
|
36
|
+
export type TFloatingBar = {
|
|
71
37
|
/** Whether the floating bar is visible */
|
|
72
38
|
show?: boolean;
|
|
73
39
|
/** Close handler */
|
|
74
40
|
onClose: () => void;
|
|
41
|
+
/** Whether this is used in flow dashboard layout */
|
|
42
|
+
isFlowDashboard?: boolean;
|
|
75
43
|
/** Array of action configurations */
|
|
76
|
-
actionItems:
|
|
44
|
+
actionItems: ButtonConfig[];
|
|
77
45
|
/** Number of selected items */
|
|
78
46
|
selectedItemsCount?: number;
|
|
79
47
|
/** Delete action configuration */
|
|
80
|
-
deleteConfig?:
|
|
48
|
+
deleteConfig?: {
|
|
49
|
+
label?: string;
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
onClick?: () => void;
|
|
52
|
+
};
|
|
81
53
|
/** Whether to show action background */
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
size?: FloatingBarSize;
|
|
85
|
-
/** Floating bar position */
|
|
86
|
-
position?: FloatingBarPosition;
|
|
87
|
-
/** Floating bar theme */
|
|
88
|
-
theme?: FloatingBarTheme;
|
|
89
|
-
/** Custom width */
|
|
90
|
-
width?: string | number;
|
|
91
|
-
/** Custom CSS classes */
|
|
92
|
-
className?: string;
|
|
93
|
-
/** Custom selected text */
|
|
94
|
-
selectedText?: string;
|
|
95
|
-
/** Custom actions text for collapsed mode */
|
|
96
|
-
actionsText?: string;
|
|
97
|
-
/** Whether to auto-hide on small screens */
|
|
98
|
-
autoHide?: boolean;
|
|
99
|
-
/** Maximum items before collapsing */
|
|
100
|
-
maxVisibleItems?: number;
|
|
101
|
-
/** Animation duration in seconds */
|
|
102
|
-
animationDuration?: number;
|
|
103
|
-
/** Custom aria-label */
|
|
104
|
-
"aria-label"?: string;
|
|
105
|
-
/** Test ID for testing */
|
|
106
|
-
"data-testid"?: string;
|
|
107
|
-
/** Error state */
|
|
108
|
-
error?: boolean;
|
|
109
|
-
/** Loading state */
|
|
110
|
-
loading?: boolean;
|
|
111
|
-
/** Error message */
|
|
112
|
-
errorMessage?: string;
|
|
113
|
-
/** Callback when actions overflow */
|
|
114
|
-
onOverflow?: (isOverflowing: boolean) => void;
|
|
115
|
-
}
|
|
54
|
+
showActionBg?: boolean;
|
|
55
|
+
};
|
|
116
56
|
/**
|
|
117
|
-
* FloatingBar component provides a floating action bar for bulk operations
|
|
57
|
+
* FloatingBar component provides a floating action bar for bulk operations.
|
|
58
|
+
* Drop-in replacement matching the lax-web-portal implementation.
|
|
118
59
|
*
|
|
119
60
|
* @example
|
|
120
61
|
* ```tsx
|
|
@@ -124,24 +65,27 @@ export interface FloatingBarProps {
|
|
|
124
65
|
* selectedItemsCount={selectedItems.length}
|
|
125
66
|
* actionItems={[
|
|
126
67
|
* {
|
|
127
|
-
* id: "edit",
|
|
128
68
|
* label: "Edit",
|
|
129
|
-
* icon: <EditIcon />,
|
|
69
|
+
* icon: <EditIcon size={16} />,
|
|
130
70
|
* onClick: handleEdit,
|
|
131
71
|
* },
|
|
132
72
|
* {
|
|
133
|
-
* id: "archive",
|
|
134
73
|
* label: "Archive",
|
|
135
|
-
* icon: <ArchiveIcon />,
|
|
74
|
+
* icon: <ArchiveIcon size={16} />,
|
|
136
75
|
* onClick: handleArchive,
|
|
137
76
|
* },
|
|
138
77
|
* ]}
|
|
139
78
|
* deleteConfig={{
|
|
140
79
|
* label: "Delete",
|
|
141
80
|
* onClick: handleDelete,
|
|
142
|
-
* confirmRequired: true,
|
|
143
81
|
* }}
|
|
144
82
|
* />
|
|
145
83
|
* ```
|
|
146
84
|
*/
|
|
147
|
-
export declare const FloatingBar:
|
|
85
|
+
export declare const FloatingBar: FC<TFloatingBar>;
|
|
86
|
+
export type { ButtonConfig as FloatingBarActionConfig };
|
|
87
|
+
export type FloatingBarDeleteConfig = TFloatingBar["deleteConfig"];
|
|
88
|
+
export type FloatingBarProps = TFloatingBar;
|
|
89
|
+
export type FloatingBarSize = "small" | "medium" | "large";
|
|
90
|
+
export type FloatingBarPosition = "top" | "bottom";
|
|
91
|
+
export type FloatingBarTheme = "primary" | "dark" | "light";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import { type TFieldOptionsProps } from './types';
|
|
3
|
+
export interface FieldOptionsProps extends TFieldOptionsProps {
|
|
4
|
+
/** Translation function - if not provided, strings will be used as-is */
|
|
5
|
+
t?: (key: string) => string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* FieldOptions component for managing a list of field values with drag-and-drop sorting
|
|
9
|
+
*/
|
|
10
|
+
export declare const FieldOptions: FC<FieldOptionsProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import { type TFieldOptionsProps } from './types';
|
|
3
|
+
type TProps = Pick<TFieldOptionsProps, 'value' | 'onOptionChange' | 'onSaveOption' | 'onDeleteAll' | 'required' | 'errorMessage'> & {
|
|
4
|
+
hasChoices: boolean;
|
|
5
|
+
/** Translation function - if not provided, strings will be used as-is */
|
|
6
|
+
t?: (key: string) => string;
|
|
7
|
+
};
|
|
8
|
+
export declare const Header: FC<TProps>;
|
|
9
|
+
export {};
|