@juspay/blend-design-system 0.0.27-beta → 0.0.28-beta
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/assets/main.css +1 -1
- package/dist/components/Card/types.d.ts +8 -0
- package/dist/components/Charts/SankeyChartWrapper.d.ts +25 -0
- package/dist/components/Charts/SankeyLink.d.ts +4 -0
- package/dist/components/Charts/SankeyNode.d.ts +4 -0
- package/dist/components/Charts/index.d.ts +2 -0
- package/dist/components/Charts/renderChart.d.ts +1 -1
- package/dist/components/Charts/types.d.ts +59 -1
- package/dist/components/Checkbox/types.d.ts +4 -0
- package/dist/components/DataTable/TableHeader/DraggableColumnHeader.d.ts +5 -1
- package/dist/components/DateRangePicker/utils.d.ts +10 -13
- package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelectTrigger.d.ts +3 -1
- package/dist/components/MultiSelect/types.d.ts +2 -0
- package/dist/components/Primitives/PrimitiveButton/PrimitiveButton.d.ts +4 -0
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/Radio/types.d.ts +4 -0
- package/dist/components/Radio/utils.d.ts +0 -10
- package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
- package/dist/components/SingleSelect/SingleSelectTrigger.d.ts +3 -1
- package/dist/components/SingleSelect/types.d.ts +2 -0
- package/dist/components/StatCard/StatCard.d.ts +1 -1
- package/dist/components/StatCard/types.d.ts +8 -0
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/types.d.ts +5 -1
- package/dist/components/Tabs/utils.d.ts +18 -3
- package/dist/global-utils/GlobalUtils.d.ts +5 -0
- package/dist/main.js +27177 -25861
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ButtonProps } from '../Button/types';
|
|
3
|
+
import { SkeletonVariant } from '../Skeleton';
|
|
3
4
|
export declare enum CardVariant {
|
|
4
5
|
DEFAULT = "default",
|
|
5
6
|
ALIGNED = "aligned",
|
|
@@ -40,6 +41,12 @@ export type CustomCardProps = {
|
|
|
40
41
|
variant: CardVariant.CUSTOM;
|
|
41
42
|
children: ReactNode;
|
|
42
43
|
};
|
|
44
|
+
export type CardSkeletonProps = {
|
|
45
|
+
variant: SkeletonVariant;
|
|
46
|
+
show: boolean;
|
|
47
|
+
height?: string;
|
|
48
|
+
width?: string;
|
|
49
|
+
};
|
|
43
50
|
export type CardProps = {
|
|
44
51
|
maxWidth?: string;
|
|
45
52
|
/**
|
|
@@ -53,4 +60,5 @@ export type CardProps = {
|
|
|
53
60
|
* Useful when you want the card to grow with content but maintain a minimum height.
|
|
54
61
|
*/
|
|
55
62
|
minHeight?: string;
|
|
63
|
+
skeleton?: CardSkeletonProps;
|
|
56
64
|
} & (DefaultCardProps | AlignedCardProps | CustomCardProps);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface SankeyChartWrapperProps {
|
|
3
|
+
chartName?: string;
|
|
4
|
+
transformedData: {
|
|
5
|
+
nodes: {
|
|
6
|
+
name: string;
|
|
7
|
+
}[];
|
|
8
|
+
links: {
|
|
9
|
+
source: number;
|
|
10
|
+
target: number;
|
|
11
|
+
value: number;
|
|
12
|
+
color?: string;
|
|
13
|
+
hoverColor?: string;
|
|
14
|
+
sourceName?: string;
|
|
15
|
+
targetName?: string;
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
18
|
+
nodeColors: string[];
|
|
19
|
+
linkColors: string[];
|
|
20
|
+
sankeyWidth: number;
|
|
21
|
+
sankeyHeight: number;
|
|
22
|
+
isSmallScreen: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare const SankeyChartWrapper: React.FC<SankeyChartWrapperProps>;
|
|
25
|
+
export default SankeyChartWrapper;
|
|
@@ -3,4 +3,6 @@ export { default as CoreChart } from './CoreChart';
|
|
|
3
3
|
export { default as ChartContainer } from './ChartContainer';
|
|
4
4
|
export { default as ChartHeader } from './ChartHeader';
|
|
5
5
|
export { default as ChartLegends } from './ChartLegend';
|
|
6
|
+
export { default as SankeyNode } from './SankeyNode';
|
|
7
|
+
export { default as SankeyLink } from './SankeyLink';
|
|
6
8
|
export * from './types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RenderChartProps } from './types';
|
|
2
|
-
export declare const renderChart: ({ chartName, flattenedData, chartType, hoveredKey, lineKeys, colors, setHoveredKey, data: originalData, selectedKeys, isSmallScreen, barsize, xAxis, yAxis, noData, }: RenderChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const renderChart: ({ chartName, flattenedData, chartType, hoveredKey, lineKeys, colors, setHoveredKey, data: originalData, selectedKeys, isSmallScreen, barsize, xAxis, yAxis, noData, height, }: RenderChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -25,7 +25,8 @@ export declare enum ChartType {
|
|
|
25
25
|
LINE = "line",
|
|
26
26
|
BAR = "bar",
|
|
27
27
|
PIE = "pie",
|
|
28
|
-
SCATTER = "scatter"
|
|
28
|
+
SCATTER = "scatter",
|
|
29
|
+
SANKEY = "sankey"
|
|
29
30
|
}
|
|
30
31
|
export declare enum LegendsChangeType {
|
|
31
32
|
INCREASE = "increase",
|
|
@@ -104,6 +105,7 @@ export type RenderChartProps = {
|
|
|
104
105
|
xAxis?: XAxisConfig;
|
|
105
106
|
yAxis?: YAxisConfig;
|
|
106
107
|
noData?: NoDataProps;
|
|
108
|
+
height?: number | string;
|
|
107
109
|
};
|
|
108
110
|
export type CoreChartProps = {
|
|
109
111
|
chartType?: ChartType;
|
|
@@ -183,3 +185,59 @@ export type CustomTooltipProps = TooltipProps<ValueType, NameType> & {
|
|
|
183
185
|
xAxis?: XAxisConfig;
|
|
184
186
|
yAxis?: YAxisConfig;
|
|
185
187
|
};
|
|
188
|
+
export type SankeyNode = {
|
|
189
|
+
name: string;
|
|
190
|
+
id?: string;
|
|
191
|
+
color?: string;
|
|
192
|
+
};
|
|
193
|
+
export type SankeyLink = {
|
|
194
|
+
source: number | string;
|
|
195
|
+
target: number | string;
|
|
196
|
+
value: number;
|
|
197
|
+
color?: string;
|
|
198
|
+
hoverColor?: string;
|
|
199
|
+
};
|
|
200
|
+
export type SankeyData = {
|
|
201
|
+
nodes: SankeyNode[];
|
|
202
|
+
links: SankeyLink[];
|
|
203
|
+
};
|
|
204
|
+
export type SankeyTooltipData = {
|
|
205
|
+
payload: {
|
|
206
|
+
name?: string;
|
|
207
|
+
value?: number;
|
|
208
|
+
source?: number | string;
|
|
209
|
+
target?: number | string;
|
|
210
|
+
sourceName?: string;
|
|
211
|
+
targetName?: string;
|
|
212
|
+
color?: string;
|
|
213
|
+
hoverColor?: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
export type SankeyNodeProps = {
|
|
217
|
+
x?: number;
|
|
218
|
+
y?: number;
|
|
219
|
+
width?: number;
|
|
220
|
+
height?: number;
|
|
221
|
+
index?: number;
|
|
222
|
+
payload?: SankeyNode & {
|
|
223
|
+
value?: number;
|
|
224
|
+
};
|
|
225
|
+
containerWidth?: number;
|
|
226
|
+
nodeColors?: string[];
|
|
227
|
+
onMouseEnter?: (data: SankeyTooltipData, event: React.MouseEvent) => void;
|
|
228
|
+
onMouseLeave?: () => void;
|
|
229
|
+
};
|
|
230
|
+
export type SankeyLinkProps = {
|
|
231
|
+
sourceX?: number;
|
|
232
|
+
targetX?: number;
|
|
233
|
+
sourceY?: number;
|
|
234
|
+
targetY?: number;
|
|
235
|
+
sourceControlX?: number;
|
|
236
|
+
targetControlX?: number;
|
|
237
|
+
linkWidth?: number;
|
|
238
|
+
index?: number;
|
|
239
|
+
payload?: SankeyLink;
|
|
240
|
+
linkColors?: string[];
|
|
241
|
+
onMouseEnter?: (data: SankeyTooltipData, event: React.MouseEvent) => void;
|
|
242
|
+
onMouseLeave?: () => void;
|
|
243
|
+
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { useSortable } from '@dnd-kit/sortable';
|
|
1
2
|
interface DraggableColumnHeaderProps {
|
|
2
3
|
id: string;
|
|
3
|
-
children:
|
|
4
|
+
children: (dragHandleProps: {
|
|
5
|
+
listeners?: ReturnType<typeof useSortable>['listeners'];
|
|
6
|
+
attributes?: ReturnType<typeof useSortable>['attributes'];
|
|
7
|
+
}) => React.ReactNode;
|
|
4
8
|
style?: React.CSSProperties;
|
|
5
9
|
disabled?: boolean;
|
|
6
10
|
'data-table-column-heading'?: string;
|
|
@@ -578,10 +578,7 @@ export declare const CUSTOM_FORMAT_EXAMPLES: {
|
|
|
578
578
|
* @param type The type of haptic feedback to trigger
|
|
579
579
|
*/
|
|
580
580
|
export declare const triggerHapticFeedback: (type?: HapticFeedbackType) => void;
|
|
581
|
-
|
|
582
|
-
* Optimized Apple Calendar-style haptic manager
|
|
583
|
-
*/
|
|
584
|
-
export declare class AppleCalendarHapticManager {
|
|
581
|
+
export declare class calendarHapticManager {
|
|
585
582
|
private lastHapticTime;
|
|
586
583
|
private lastHapticIndex;
|
|
587
584
|
private readonly hapticCooldown;
|
|
@@ -596,19 +593,19 @@ export declare class AppleCalendarHapticManager {
|
|
|
596
593
|
destroy(): void;
|
|
597
594
|
}
|
|
598
595
|
export declare const MOBILE_CALENDAR_CONSTANTS: {
|
|
599
|
-
readonly SNAP_DURATION:
|
|
600
|
-
readonly MOMENTUM_THRESHOLD: 0.
|
|
596
|
+
readonly SNAP_DURATION: 340;
|
|
597
|
+
readonly MOMENTUM_THRESHOLD: 0.01;
|
|
601
598
|
readonly DECELERATION_RATE: 0.95;
|
|
602
|
-
readonly MIN_VELOCITY: 0.
|
|
603
|
-
readonly MAX_MOMENTUM_DISTANCE:
|
|
604
|
-
readonly VELOCITY_MULTIPLIER: 0.
|
|
605
|
-
readonly VELOCITY_SMOOTHING: 0.
|
|
606
|
-
readonly SCROLL_RESISTANCE: 0.
|
|
599
|
+
readonly MIN_VELOCITY: 0.005;
|
|
600
|
+
readonly MAX_MOMENTUM_DISTANCE: 50;
|
|
601
|
+
readonly VELOCITY_MULTIPLIER: 0.8;
|
|
602
|
+
readonly VELOCITY_SMOOTHING: 0.7;
|
|
603
|
+
readonly SCROLL_RESISTANCE: 0.95;
|
|
607
604
|
readonly SCALE_SELECTED: 1.02;
|
|
608
605
|
readonly SCALE_UNSELECTED: 0.98;
|
|
609
606
|
readonly OPACITY_SELECTED: 1;
|
|
610
607
|
readonly OPACITY_UNSELECTED: 0.9;
|
|
611
|
-
readonly TRANSITION_DURATION: "
|
|
608
|
+
readonly TRANSITION_DURATION: "220ms";
|
|
612
609
|
readonly EASING: "cubic-bezier(0.25, 0.46, 0.45, 0.94)";
|
|
613
610
|
readonly ANIMATION_FRAME_LIMIT: 60;
|
|
614
611
|
readonly VELOCITY_HISTORY_SIZE: 3;
|
|
@@ -616,7 +613,7 @@ export declare const MOBILE_CALENDAR_CONSTANTS: {
|
|
|
616
613
|
export declare const MOBILE_PICKER_CONSTANTS: {
|
|
617
614
|
readonly ITEM_HEIGHT: 44;
|
|
618
615
|
readonly VISIBLE_ITEMS: 3;
|
|
619
|
-
readonly SCROLL_DEBOUNCE:
|
|
616
|
+
readonly SCROLL_DEBOUNCE: 130;
|
|
620
617
|
};
|
|
621
618
|
/**
|
|
622
619
|
* Safely gets an item from an array with comprehensive bounds checking
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MultiSelectProps } from './types';
|
|
2
|
-
declare const MultiSelect: ({ selectedValues, onChange, items, label, sublabel, disabled, helpIconHintText, name, required, variant, selectionTagType, slot, hintText, placeholder, size, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, customTrigger, useDrawerOnMobile, minMenuWidth, maxMenuWidth, maxMenuHeight, alignment, side, sideOffset, alignOffset, inline, onBlur, onFocus, error, errorMessage, showActionButtons, primaryAction, secondaryAction, showItemDividers, showHeaderBorder, fullWidth, enableVirtualization, virtualListItemHeight, virtualListOverscan, itemsToRender, onEndReached, endReachedThreshold, hasMore, loadingComponent, skeleton, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const MultiSelect: ({ selectedValues, onChange, items, label, sublabel, disabled, helpIconHintText, name, required, variant, selectionTagType, slot, hintText, placeholder, size, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, customTrigger, useDrawerOnMobile, minMenuWidth, maxMenuWidth, maxMenuHeight, alignment, side, sideOffset, alignOffset, inline, onBlur, onFocus, error, errorMessage, showActionButtons, primaryAction, secondaryAction, showItemDividers, showHeaderBorder, fullWidth, enableVirtualization, virtualListItemHeight, virtualListOverscan, itemsToRender, onEndReached, endReachedThreshold, hasMore, loadingComponent, skeleton, maxTriggerWidth, minTriggerWidth, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MultiSelect;
|
|
@@ -20,6 +20,8 @@ export type MultiSelectTriggerProps = {
|
|
|
20
20
|
inline?: boolean;
|
|
21
21
|
error?: boolean;
|
|
22
22
|
disabled?: boolean;
|
|
23
|
+
maxTriggerWidth?: number;
|
|
24
|
+
minTriggerWidth?: number;
|
|
23
25
|
};
|
|
24
|
-
declare const MultiSelectTrigger: ({ selectedValues, slot, variant, size, isSmallScreen, onChange, name, label, placeholder, required, selectionTagType, valueLabelMap, open, onClick, multiSelectTokens, inline, error, disabled, }: MultiSelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare const MultiSelectTrigger: ({ selectedValues, slot, variant, size, isSmallScreen, onChange, name, label, placeholder, required, selectionTagType, valueLabelMap, open, onClick, multiSelectTokens, inline, error, disabled, maxTriggerWidth, minTriggerWidth, }: MultiSelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
27
|
export default MultiSelectTrigger;
|
|
@@ -77,6 +77,8 @@ export type MultiSelectProps = {
|
|
|
77
77
|
maxSelections?: number;
|
|
78
78
|
customTrigger?: React.ReactNode;
|
|
79
79
|
useDrawerOnMobile?: boolean;
|
|
80
|
+
maxTriggerWidth?: number;
|
|
81
|
+
minTriggerWidth?: number;
|
|
80
82
|
minMenuWidth?: number;
|
|
81
83
|
maxMenuWidth?: number;
|
|
82
84
|
maxMenuHeight?: number;
|
|
@@ -60,6 +60,8 @@ type PrimitiveButtonProps = StateStyles & {
|
|
|
60
60
|
outlineStyle?: CSSObject['outlineStyle'];
|
|
61
61
|
outlineWidth?: CSSObject['outlineWidth'];
|
|
62
62
|
outlineColor?: CSSObject['outlineColor'];
|
|
63
|
+
transform?: CSSObject['transform'];
|
|
64
|
+
transition?: CSSObject['transition'];
|
|
63
65
|
disabled?: boolean;
|
|
64
66
|
fontWeight?: CSSObject['fontWeight'];
|
|
65
67
|
fontSize?: CSSObject['fontSize'];
|
|
@@ -122,6 +124,8 @@ declare const PrimitiveButton: React.ForwardRefExoticComponent<StateStyles & {
|
|
|
122
124
|
outlineStyle?: CSSObject["outlineStyle"];
|
|
123
125
|
outlineWidth?: CSSObject["outlineWidth"];
|
|
124
126
|
outlineColor?: CSSObject["outlineColor"];
|
|
127
|
+
transform?: CSSObject["transform"];
|
|
128
|
+
transition?: CSSObject["transition"];
|
|
125
129
|
disabled?: boolean;
|
|
126
130
|
fontWeight?: CSSObject["fontWeight"];
|
|
127
131
|
fontSize?: CSSObject["fontSize"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RadioProps } from './types';
|
|
2
2
|
export declare const Radio: {
|
|
3
|
-
({ id,
|
|
3
|
+
({ id, checked, defaultChecked, onChange, disabled, required, error, size, children, subtext, slot, name, maxLength, ...rest }: RadioProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
export default Radio;
|
|
@@ -6,16 +6,6 @@ export declare const getSpacingBySize: (size: RadioSize) => {
|
|
|
6
6
|
marginLeft: string;
|
|
7
7
|
marginTop: string;
|
|
8
8
|
};
|
|
9
|
-
export declare const isControlledRadio: (checked: boolean | undefined) => boolean;
|
|
10
|
-
export declare const createRadioInputProps: (checked: boolean | undefined, defaultChecked: boolean) => {
|
|
11
|
-
checked: boolean | undefined;
|
|
12
|
-
defaultChecked?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
defaultChecked: boolean;
|
|
15
|
-
checked?: undefined;
|
|
16
|
-
};
|
|
17
|
-
export declare const getCurrentCheckedState: (checked: boolean | undefined, defaultChecked: boolean) => boolean;
|
|
18
|
-
export declare const createRadioChangeHandler: (disabled: boolean, onChange?: (checked: boolean) => void) => (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
19
9
|
export declare const isRadioElement: (child: React.ReactElement, RadioComponent: React.ComponentType<RadioProps>) => child is React.ReactElement<RadioProps>;
|
|
20
10
|
export declare const shouldRadioBeChecked: (groupValue: string | undefined, groupDefaultValue: string | undefined, radioValue: string) => boolean;
|
|
21
11
|
export declare const createGroupChangeHandler: (onChange?: (value: string) => void) => (isChecked: boolean, childValue: string) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SingleSelectProps } from './types';
|
|
2
|
-
declare const SingleSelect: ({ label, subLabel, hintText, required, helpIconText, placeholder, error, errorMessage, size, items, name, variant, disabled, selected, onSelect, enableSearch, searchPlaceholder, slot, customTrigger, useDrawerOnMobile, alignment, side, sideOffset, alignOffset, minMenuWidth, maxMenuWidth, maxMenuHeight, onBlur, onFocus, inline, fullWidth, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, loadingComponent, skeleton, }: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const SingleSelect: ({ label, subLabel, hintText, required, helpIconText, placeholder, error, errorMessage, size, items, name, variant, disabled, selected, onSelect, enableSearch, searchPlaceholder, slot, customTrigger, useDrawerOnMobile, alignment, side, sideOffset, alignOffset, minMenuWidth, maxMenuWidth, maxMenuHeight, onBlur, onFocus, inline, fullWidth, enableVirtualization, virtualListItemHeight, virtualListOverscan, onEndReached, endReachedThreshold, hasMore, loadingComponent, skeleton, maxTriggerWidth, minTriggerWidth, }: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SingleSelect;
|
|
@@ -20,6 +20,8 @@ export type SingleSelectTriggerProps = {
|
|
|
20
20
|
error?: boolean;
|
|
21
21
|
errorMessage?: string;
|
|
22
22
|
disabled?: boolean;
|
|
23
|
+
maxTriggerWidth?: number;
|
|
24
|
+
minTriggerWidth?: number;
|
|
23
25
|
};
|
|
24
|
-
declare const SingleSelectTrigger: ({ size, selected, label, name, placeholder, required, valueLabelMap, open, onClick, slot, variant, isSmallScreenWithLargeSize, isItemSelected, singleSelectTokens, inline, error, disabled, }: SingleSelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare const SingleSelectTrigger: ({ maxTriggerWidth, minTriggerWidth, size, selected, label, name, placeholder, required, valueLabelMap, open, onClick, slot, variant, isSmallScreenWithLargeSize, isItemSelected, singleSelectTokens, inline, error, disabled, }: SingleSelectTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
27
|
export default SingleSelectTrigger;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StatCardProps } from './types';
|
|
2
2
|
declare const StatCard: {
|
|
3
|
-
({ title, value, valueTooltip, change, subtitle, variant, chartData, progressValue, titleIcon, actionIcon, helpIconText, dropdownProps, minWidth, maxWidth, xAxis, yAxis, valueFormatter, height, direction, ...props }: StatCardProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
({ title, value, valueTooltip, change, subtitle, variant, chartData, progressValue, titleIcon, actionIcon, helpIconText, dropdownProps, minWidth, maxWidth, xAxis, yAxis, valueFormatter, height, direction, skeleton, ...props }: StatCardProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
export default StatCard;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SingleSelectProps } from '../SingleSelect';
|
|
3
3
|
import { AxisType } from '../Charts/types';
|
|
4
|
+
import { SkeletonVariant } from '../Skeleton';
|
|
5
|
+
export type StatCardSkeletonProps = {
|
|
6
|
+
variant: SkeletonVariant;
|
|
7
|
+
show: boolean;
|
|
8
|
+
height?: string;
|
|
9
|
+
width?: string;
|
|
10
|
+
};
|
|
4
11
|
export declare enum StatCardVariant {
|
|
5
12
|
LINE = "line",
|
|
6
13
|
PROGRESS_BAR = "progress",
|
|
@@ -59,4 +66,5 @@ export type StatCardProps = {
|
|
|
59
66
|
valueFormatter?: AxisType;
|
|
60
67
|
height?: string;
|
|
61
68
|
direction?: StatCardDirection;
|
|
69
|
+
skeleton?: StatCardSkeletonProps;
|
|
62
70
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SwitchProps } from './types';
|
|
2
2
|
export declare const Switch: {
|
|
3
|
-
({ id, checked, defaultChecked, onChange, disabled, required, error, size, label, subtext, slot, name, value, ...rest }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
({ id, checked, defaultChecked, onChange, disabled, required, error, size, label, subtext, slot, name, value, maxLength, ...rest }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -13,10 +13,14 @@ export type SwitchProps = {
|
|
|
13
13
|
error?: boolean;
|
|
14
14
|
size?: SwitchSize;
|
|
15
15
|
label?: string;
|
|
16
|
-
subtext?:
|
|
16
|
+
subtext?: string;
|
|
17
17
|
slot?: ReactNode;
|
|
18
18
|
name?: string;
|
|
19
19
|
value?: string;
|
|
20
|
+
maxLength?: {
|
|
21
|
+
label?: number;
|
|
22
|
+
subtext?: number;
|
|
23
|
+
};
|
|
20
24
|
};
|
|
21
25
|
export type SwitchGroupProps = {
|
|
22
26
|
id?: string;
|
|
@@ -28,16 +28,17 @@ export declare const createTabsFromSelection: <T extends {
|
|
|
28
28
|
/**
|
|
29
29
|
* Prepares items for SingleSelect dropdown (all tabs including scrolled-out)
|
|
30
30
|
*/
|
|
31
|
-
export declare const prepareDropdownItems: (tabs: TabItem[]) => {
|
|
31
|
+
export declare const prepareDropdownItems: (tabs: TabItem[], originalItems?: TabItem[]) => {
|
|
32
32
|
items: {
|
|
33
33
|
value: string;
|
|
34
34
|
label: string;
|
|
35
35
|
}[];
|
|
36
36
|
}[];
|
|
37
37
|
/**
|
|
38
|
-
* Returns
|
|
38
|
+
* Returns tabs for display, limited by maxDisplayTabs if provided.
|
|
39
|
+
* When limited, shows tabs centered around the active tab to ensure it's always visible.
|
|
39
40
|
*/
|
|
40
|
-
export declare const getDisplayTabs: (tabs: TabItem[]) => TabItem[];
|
|
41
|
+
export declare const getDisplayTabs: (tabs: TabItem[], maxDisplayTabs?: number, activeTab?: string) => TabItem[];
|
|
41
42
|
/**
|
|
42
43
|
* Calculates the position and width for the tab indicator
|
|
43
44
|
*/
|
|
@@ -58,3 +59,17 @@ export declare const calculateTransitionDimensions: (oldTab: HTMLButtonElement,
|
|
|
58
59
|
finalLeft: number;
|
|
59
60
|
finalWidth: number;
|
|
60
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Determines the actual tab value from a potentially concatenated value
|
|
64
|
+
* Concatenated tabs use underscore as separator, but we need to distinguish
|
|
65
|
+
* from single tabs that naturally have underscores in their values
|
|
66
|
+
*/
|
|
67
|
+
export declare const getActualTabValue: (processedValue: string, originalTabValues: Set<string>) => string;
|
|
68
|
+
/**
|
|
69
|
+
* Checks if a concatenated tab value should trigger multiple close events
|
|
70
|
+
*/
|
|
71
|
+
export declare const isConcatenatedTab: (tabValue: string, originalTabValues: Set<string>) => boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Extracts original values from a concatenated tab value
|
|
74
|
+
*/
|
|
75
|
+
export declare const extractOriginalValues: (concatenatedValue: string) => string[];
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
export declare const toPixels: (value: string | number | undefined) => number;
|
|
2
2
|
export declare const capitalizeFirstLetter: (string: string) => string;
|
|
3
|
+
export declare const getTruncatedText: (text: string, limit?: number) => {
|
|
4
|
+
truncatedValue: string;
|
|
5
|
+
fullValue: string;
|
|
6
|
+
isTruncated: boolean;
|
|
7
|
+
};
|