@juspay/blend-design-system 0.0.36-beta.1 → 0.0.36-beta.2
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/ChartsV2/chartV2.types.d.ts +9 -11
- package/dist/components/DataTable/dataTable.tokens.d.ts +11 -0
- package/dist/components/DataTable/types.d.ts +1 -0
- package/dist/components/KeyValuePairV2/KeyValuePairLayout.d.ts +24 -0
- package/dist/components/KeyValuePairV2/KeyValuePairV2.d.ts +23 -0
- package/dist/components/KeyValuePairV2/ResponsiveText.d.ts +20 -0
- package/dist/components/KeyValuePairV2/index.d.ts +3 -0
- package/dist/components/KeyValuePairV2/keyValuePairV2.dark.tokens.d.ts +3 -0
- package/dist/components/KeyValuePairV2/keyValuePairV2.light.tokens.d.ts +3 -0
- package/dist/components/KeyValuePairV2/keyValuePairV2.tokens.d.ts +28 -0
- package/dist/components/KeyValuePairV2/keyValuePairV2.types.d.ts +28 -0
- package/dist/components/KeyValuePairV2/responsiveTextStyles.d.ts +4 -0
- package/dist/components/KeyValuePairV2/utils.d.ts +15 -0
- package/dist/components/SelectorV2/RadioV2/RadioV2.d.ts +22 -0
- package/dist/components/SelectorV2/RadioV2/StyledRadioV2.d.ts +9 -0
- package/dist/components/SelectorV2/RadioV2/index.d.ts +3 -0
- package/dist/components/SelectorV2/RadioV2/radioV2.dark.tokens.d.ts +3 -0
- package/dist/components/SelectorV2/RadioV2/radioV2.light.tokens.d.ts +3 -0
- package/dist/components/SelectorV2/RadioV2/radioV2.tokens.d.ts +83 -0
- package/dist/components/SelectorV2/RadioV2/radioV2.types.d.ts +39 -0
- package/dist/components/SelectorV2/SwitchV2/SwitchV2.d.ts +1 -1
- package/dist/components/SelectorV2/SwitchV2/switchV2.tokens.d.ts +5 -5
- package/dist/components/SelectorV2/SwitchV2/switchV2.types.d.ts +1 -2
- package/dist/components/SelectorsContent/SelectorsContent.types.d.ts +3 -4
- package/dist/components/TooltipV2/TooltipV2.d.ts +3 -0
- package/dist/components/TooltipV2/index.d.ts +3 -0
- package/dist/components/TooltipV2/tooltipV2.animation.d.ts +1 -0
- package/dist/components/TooltipV2/tooltipV2.dark.tokens.d.ts +3 -0
- package/dist/components/TooltipV2/tooltipV2.light.tokens.d.ts +3 -0
- package/dist/components/TooltipV2/tooltipV2.tokens.d.ts +37 -0
- package/dist/components/TooltipV2/tooltipV2.types.d.ts +38 -0
- package/dist/components/common/index.d.ts +3 -0
- package/dist/context/ThemeContext.d.ts +6 -0
- package/dist/context/useComponentToken.d.ts +3 -1
- package/dist/global-utils/GlobalUtils.d.ts +5 -0
- package/dist/main.js +20542 -19600
- package/dist/tokens/theme.token.d.ts +2 -0
- package/dist/tokens/zIndex.tokens.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RefObject, ReactNode } from 'react';
|
|
1
|
+
import { RefObject, ReactNode, HTMLAttributes } from 'react';
|
|
2
2
|
import { HighchartsReactProps, HighchartsReactRefObject } from 'highcharts-react-official';
|
|
3
3
|
import { default as Highcharts } from 'highcharts';
|
|
4
4
|
import { ButtonProps } from '../Button';
|
|
@@ -41,23 +41,21 @@ export type ChartV2Axis = Highcharts.Axis;
|
|
|
41
41
|
export type ChartV2Series = Highcharts.Series;
|
|
42
42
|
export type ChartV2SeriesZonesOptionsObject = Highcharts.SeriesZonesOptionsObject;
|
|
43
43
|
export type ChartV2ReactRefObject = HighchartsReactRefObject;
|
|
44
|
-
export
|
|
44
|
+
export type ChartV2ContainerProps = {
|
|
45
45
|
children: ReactNode;
|
|
46
|
-
}
|
|
47
|
-
export
|
|
46
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style' | 'className'>;
|
|
47
|
+
export type ChartV2HeaderProps = {
|
|
48
48
|
children: ReactNode;
|
|
49
|
-
}
|
|
49
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'style' | 'className'>;
|
|
50
50
|
export type ChartV2LegendItem = Highcharts.Series | Highcharts.Point;
|
|
51
|
-
export
|
|
51
|
+
export type ChartV2CustomLegendItem = {
|
|
52
52
|
key: string;
|
|
53
53
|
name: string;
|
|
54
54
|
color?: string;
|
|
55
55
|
value?: string | number;
|
|
56
|
-
}
|
|
57
|
-
export
|
|
58
|
-
/** Single chart ref (use when legend controls one chart). */
|
|
56
|
+
};
|
|
57
|
+
export type ChartV2LegendProps = {
|
|
59
58
|
chartRef?: RefObject<ChartV2ReactRefObject | null>;
|
|
60
|
-
/** Multiple chart refs (use for shared legend; visibility and hover sync across all). */
|
|
61
59
|
chartRefs?: ReadonlyArray<RefObject<ChartV2ReactRefObject | null>>;
|
|
62
60
|
customLegendItems?: ChartV2CustomLegendItem[];
|
|
63
61
|
renderItem?: (params: {
|
|
@@ -69,4 +67,4 @@ export interface ChartV2LegendProps {
|
|
|
69
67
|
onClick: () => void;
|
|
70
68
|
}) => ReactNode;
|
|
71
69
|
layout?: 'horizontal' | 'vertical';
|
|
72
|
-
}
|
|
70
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'style' | 'className'>;
|
|
@@ -88,6 +88,17 @@ type HeaderType = {
|
|
|
88
88
|
columnManagerIcon: {
|
|
89
89
|
width: CSSObject['width'];
|
|
90
90
|
height: CSSObject['height'];
|
|
91
|
+
color: CSSObject['color'];
|
|
92
|
+
};
|
|
93
|
+
columnManagerTrigger?: {
|
|
94
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
95
|
+
opacity: CSSObject['disabledOpacity'];
|
|
96
|
+
focusVisible: {
|
|
97
|
+
outline: CSSObject['outline'];
|
|
98
|
+
outlineOffset: CSSObject['outlineOffset'];
|
|
99
|
+
borderRadius: CSSObject['borderRadius'];
|
|
100
|
+
boxShadow: CSSObject['boxShadow'];
|
|
101
|
+
};
|
|
91
102
|
};
|
|
92
103
|
};
|
|
93
104
|
};
|
|
@@ -336,6 +336,7 @@ export type DataTableProps<T extends Record<string, unknown>> = {
|
|
|
336
336
|
isRowExpandable?: (row: T, index: number) => boolean;
|
|
337
337
|
onRowExpansionChange?: (rowId: unknown, isExpanded: boolean, rowData: T) => void;
|
|
338
338
|
enableRowSelection?: boolean;
|
|
339
|
+
showBulkActionBar?: boolean;
|
|
339
340
|
onRowSelectionChange?: (selectedRowIds: string[], isSelected: boolean, rowId: string, rowData: T) => void;
|
|
340
341
|
bulkActions?: BulkActionsConfig;
|
|
341
342
|
rowActions?: RowActionsConfig<T>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type KeyValuePairLayoutProps = {
|
|
3
|
+
containerStyle: React.CSSProperties;
|
|
4
|
+
keyContainerStyle: React.CSSProperties;
|
|
5
|
+
valueContainerStyle: React.CSSProperties;
|
|
6
|
+
keySlotStyle: React.CSSProperties;
|
|
7
|
+
keyContent: React.ReactNode;
|
|
8
|
+
valueContent: React.ReactNode;
|
|
9
|
+
keySlot?: React.ReactNode;
|
|
10
|
+
valueLeftSlot?: React.ReactNode;
|
|
11
|
+
valueRightSlot?: React.ReactNode;
|
|
12
|
+
dataKeyValuePair?: string;
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
keyDataElement?: string;
|
|
15
|
+
keyDataId?: string;
|
|
16
|
+
valueDataElement?: string;
|
|
17
|
+
valueDataId?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Layout-only presentational component for KeyValuePair.
|
|
21
|
+
* Renders the structure: container > key block (content + slot) | value block (left slot + content + right slot).
|
|
22
|
+
* No tokens or business logic; receives pre-computed styles and content.
|
|
23
|
+
*/
|
|
24
|
+
export declare const KeyValuePairLayout: React.ForwardRefExoticComponent<KeyValuePairLayoutProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { KeyValuePairV2Size, KeyValuePairV2StateType } from './keyValuePairV2.types';
|
|
2
|
+
/**
|
|
3
|
+
* Orchestrator: composes tokens, layout, and ResponsiveText.
|
|
4
|
+
* Computes styles and delegates structure to KeyValuePairLayout.
|
|
5
|
+
*/
|
|
6
|
+
declare const KeyValuePairV2: import('react').ForwardRefExoticComponent<{
|
|
7
|
+
keyString: string;
|
|
8
|
+
size?: KeyValuePairV2Size;
|
|
9
|
+
value?: string;
|
|
10
|
+
slots?: {
|
|
11
|
+
key?: React.ReactNode;
|
|
12
|
+
value?: {
|
|
13
|
+
left?: React.ReactNode;
|
|
14
|
+
right?: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
keyValuePairState?: KeyValuePairV2StateType;
|
|
18
|
+
maxWidth?: string;
|
|
19
|
+
textOverflow?: import('./keyValuePairV2.types').TextOverflowMode;
|
|
20
|
+
maxLines?: number;
|
|
21
|
+
showTooltipOnTruncate?: boolean;
|
|
22
|
+
} & Omit<import('react').HTMLAttributes<HTMLDivElement>, "style" | "className" | "slot" | "onChange"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export default KeyValuePairV2;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
import { TextOverflowMode } from './responsiveTextStyles';
|
|
4
|
+
export type ResponsiveTextProps = {
|
|
5
|
+
children: string;
|
|
6
|
+
fontSize: CSSObject['fontSize'];
|
|
7
|
+
color: CSSObject['color'];
|
|
8
|
+
className?: string;
|
|
9
|
+
fontWeight?: CSSObject['fontWeight'];
|
|
10
|
+
textOverflow?: TextOverflowMode;
|
|
11
|
+
maxLines?: number;
|
|
12
|
+
showTooltipOnTruncate?: boolean;
|
|
13
|
+
as?: React.ElementType;
|
|
14
|
+
id?: string;
|
|
15
|
+
role?: string;
|
|
16
|
+
slotPresent: boolean;
|
|
17
|
+
'aria-label'?: string;
|
|
18
|
+
'aria-labelledby'?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const ResponsiveText: ({ children, fontSize, color, className, fontWeight, textOverflow, maxLines, showTooltipOnTruncate, as: Component, id, role, slotPresent, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, }: ResponsiveTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { KeyValuePairV2Size } from './keyValuePairV2.types';
|
|
3
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
5
|
+
import { Theme } from '../../context/theme.enum';
|
|
6
|
+
export type KeyValuePairV2TokensType = {
|
|
7
|
+
gap: {
|
|
8
|
+
[key in 'vertical' | 'horizontal']: CSSObject['gap'];
|
|
9
|
+
};
|
|
10
|
+
key: {
|
|
11
|
+
color: CSSObject['color'];
|
|
12
|
+
fontSize: CSSObject['fontSize'];
|
|
13
|
+
fontWeight: CSSObject['fontWeight'];
|
|
14
|
+
gap: CSSObject['gap'];
|
|
15
|
+
};
|
|
16
|
+
value: {
|
|
17
|
+
color: CSSObject['color'];
|
|
18
|
+
fontSize: {
|
|
19
|
+
[key in KeyValuePairV2Size]: CSSObject['fontSize'];
|
|
20
|
+
};
|
|
21
|
+
fontWeight: CSSObject['fontWeight'];
|
|
22
|
+
gap: CSSObject['gap'];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type ResponsiveKeyValuePairV2Tokens = {
|
|
26
|
+
[key in keyof BreakpointType]: KeyValuePairV2TokensType;
|
|
27
|
+
};
|
|
28
|
+
export declare const getKeyValuePairV2Tokens: (foundationToken: FoundationTokenType, theme?: Theme | string) => ResponsiveKeyValuePairV2Tokens;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export declare enum KeyValuePairV2StateType {
|
|
3
|
+
vertical = 0,
|
|
4
|
+
horizontal = 1
|
|
5
|
+
}
|
|
6
|
+
export declare enum KeyValuePairV2Size {
|
|
7
|
+
SM = "sm",
|
|
8
|
+
MD = "md",
|
|
9
|
+
LG = "lg"
|
|
10
|
+
}
|
|
11
|
+
export type TextOverflowMode = 'truncate' | 'wrap' | 'wrap-clamp';
|
|
12
|
+
export type KeyValuePairV2PropTypes = {
|
|
13
|
+
keyString: string;
|
|
14
|
+
size?: KeyValuePairV2Size;
|
|
15
|
+
value?: string;
|
|
16
|
+
slots?: {
|
|
17
|
+
key?: React.ReactNode;
|
|
18
|
+
value?: {
|
|
19
|
+
left?: React.ReactNode;
|
|
20
|
+
right?: React.ReactNode;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
keyValuePairState?: KeyValuePairV2StateType;
|
|
24
|
+
maxWidth?: string;
|
|
25
|
+
textOverflow?: TextOverflowMode;
|
|
26
|
+
maxLines?: number;
|
|
27
|
+
showTooltipOnTruncate?: boolean;
|
|
28
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'slot' | 'onChange'>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
export type TextOverflowMode = 'truncate' | 'wrap' | 'wrap-clamp';
|
|
3
|
+
export declare const getTextStyles: (textOverflow: TextOverflowMode, maxLines: number, slotPresent: boolean) => CSSObject;
|
|
4
|
+
export declare const getPrimitiveTextStyles: (textOverflow: TextOverflowMode) => CSSObject;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { TextOverflowMode, KeyValuePairV2StateType } from './keyValuePairV2.types';
|
|
3
|
+
import { KeyValuePairV2TokensType } from './keyValuePairV2.tokens';
|
|
4
|
+
/**
|
|
5
|
+
* Get container styles based on text overflow mode and max width
|
|
6
|
+
*/
|
|
7
|
+
export declare const getContainerStyles: (textOverflow: TextOverflowMode, maxWidth: string) => CSSObject;
|
|
8
|
+
/**
|
|
9
|
+
* Get flex direction and gap based on layout state
|
|
10
|
+
*/
|
|
11
|
+
export declare const getLayoutStyles: (keyValuePairState: KeyValuePairV2StateType, keyValuePairTokens: KeyValuePairV2TokensType) => CSSObject;
|
|
12
|
+
/**
|
|
13
|
+
* Get slot container styles
|
|
14
|
+
*/
|
|
15
|
+
export declare const getSlotStyles: (keyValuePairTokens: KeyValuePairV2TokensType) => CSSObject;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RadioV2ContentProps } from './radioV2.types';
|
|
2
|
+
import { SelectorV2Size } from '../selectorV2.types';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
declare const RadioV2: React.ForwardRefExoticComponent<{
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
onCheckedChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
error?: boolean;
|
|
9
|
+
label?: string;
|
|
10
|
+
subLabel?: string;
|
|
11
|
+
size?: SelectorV2Size;
|
|
12
|
+
slot?: {
|
|
13
|
+
slot: React.ReactElement;
|
|
14
|
+
maxHeight?: import('styled-components').CSSObject["maxHeight"];
|
|
15
|
+
};
|
|
16
|
+
maxLength?: {
|
|
17
|
+
label?: number;
|
|
18
|
+
subLabel?: number;
|
|
19
|
+
};
|
|
20
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "style" | "className" | "slot" | "children" | "maxLength"> & React.RefAttributes<HTMLInputElement>>;
|
|
21
|
+
export default RadioV2;
|
|
22
|
+
export declare const RadioV2Content: ({ uniqueId, disabled, error, required, size, label, subLabel, slot, tokens, labelMaxLength, subLabelMaxLength, subLabelId, }: RadioV2ContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SelectorV2Size } from '../selectorV2.types';
|
|
2
|
+
import { RadioV2TokensType } from './radioV2.tokens';
|
|
3
|
+
export declare const StyledRadioV2Root: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
|
|
4
|
+
size: SelectorV2Size;
|
|
5
|
+
$isDisabled: boolean;
|
|
6
|
+
$isChecked: boolean;
|
|
7
|
+
$error?: boolean;
|
|
8
|
+
$tokens: RadioV2TokensType;
|
|
9
|
+
}>> & string;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Theme } from '../../../context/theme.enum';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
import { RadioV2IndicatorState } from './radioV2.types';
|
|
4
|
+
import { BreakpointType } from '../../../breakpoints/breakPoints';
|
|
5
|
+
import { FoundationTokenType } from '../../../tokens/theme.token';
|
|
6
|
+
import { SelectorV2Size, SelectorV2InteractionState } from '../selectorV2.types';
|
|
7
|
+
export type RadioV2TokensType = {
|
|
8
|
+
gap: CSSObject['gap'];
|
|
9
|
+
group: {
|
|
10
|
+
gap: CSSObject['gap'];
|
|
11
|
+
};
|
|
12
|
+
radio: {
|
|
13
|
+
indicator: {
|
|
14
|
+
[key in RadioV2IndicatorState]: {
|
|
15
|
+
backgroundColor: {
|
|
16
|
+
[key in SelectorV2InteractionState]: CSSObject['backgroundColor'];
|
|
17
|
+
};
|
|
18
|
+
borderColor: {
|
|
19
|
+
[key in SelectorV2InteractionState]: CSSObject['borderColor'];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
activeIndicator: {
|
|
24
|
+
active: {
|
|
25
|
+
backgroundColor: {
|
|
26
|
+
[key in Exclude<SelectorV2InteractionState, 'hover' | 'error'>]: CSSObject['backgroundColor'];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
height: {
|
|
31
|
+
[key in SelectorV2Size]: CSSObject['height'];
|
|
32
|
+
};
|
|
33
|
+
borderWidth: {
|
|
34
|
+
[key in RadioV2IndicatorState]: {
|
|
35
|
+
[key in SelectorV2InteractionState]: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
content: {
|
|
40
|
+
gap: CSSObject['gap'];
|
|
41
|
+
label: {
|
|
42
|
+
gap: CSSObject['gap'];
|
|
43
|
+
color: {
|
|
44
|
+
[key in SelectorV2InteractionState]: CSSObject['color'];
|
|
45
|
+
};
|
|
46
|
+
fontSize: {
|
|
47
|
+
[key in SelectorV2Size]: CSSObject['fontSize'];
|
|
48
|
+
};
|
|
49
|
+
fontWeight: {
|
|
50
|
+
[key in SelectorV2Size]: CSSObject['fontWeight'];
|
|
51
|
+
};
|
|
52
|
+
lineHeight: {
|
|
53
|
+
[key in SelectorV2Size]: CSSObject['lineHeight'];
|
|
54
|
+
};
|
|
55
|
+
slot: {
|
|
56
|
+
maxHeight: {
|
|
57
|
+
[key in SelectorV2Size]: CSSObject['maxHeight'];
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
subLabel: {
|
|
62
|
+
color: {
|
|
63
|
+
[key in SelectorV2InteractionState]: CSSObject['color'];
|
|
64
|
+
};
|
|
65
|
+
fontSize: {
|
|
66
|
+
[key in SelectorV2Size]: CSSObject['fontSize'];
|
|
67
|
+
};
|
|
68
|
+
fontWeight: {
|
|
69
|
+
[key in SelectorV2Size]: CSSObject['fontWeight'];
|
|
70
|
+
};
|
|
71
|
+
lineHeight: {
|
|
72
|
+
[key in SelectorV2Size]: CSSObject['lineHeight'];
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
required: {
|
|
76
|
+
color: CSSObject['color'];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export type ResponsiveRadioV2Tokens = {
|
|
81
|
+
[key in keyof BreakpointType]: RadioV2TokensType;
|
|
82
|
+
};
|
|
83
|
+
export declare const getRadioV2Tokens: (foundationToken: FoundationTokenType, theme?: Theme | string) => ResponsiveRadioV2Tokens;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactElement } from 'react';
|
|
2
|
+
import { RadioV2TokensType } from './radioV2.tokens';
|
|
3
|
+
import { CSSObject } from 'styled-components';
|
|
4
|
+
import { SelectorV2Size } from '../selectorV2.types';
|
|
5
|
+
export type RadioV2IndicatorState = 'active' | 'inactive';
|
|
6
|
+
export type RadioV2ContentProps = {
|
|
7
|
+
uniqueId: string;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
error: boolean;
|
|
10
|
+
required: boolean;
|
|
11
|
+
size: SelectorV2Size;
|
|
12
|
+
label?: string;
|
|
13
|
+
subLabel?: string;
|
|
14
|
+
slot?: {
|
|
15
|
+
slot: ReactElement;
|
|
16
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
17
|
+
};
|
|
18
|
+
tokens: RadioV2TokensType;
|
|
19
|
+
labelMaxLength?: number;
|
|
20
|
+
subLabelMaxLength?: number;
|
|
21
|
+
subLabelId?: string;
|
|
22
|
+
};
|
|
23
|
+
export type RadioV2Props = {
|
|
24
|
+
checked?: boolean;
|
|
25
|
+
onCheckedChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
26
|
+
required?: boolean;
|
|
27
|
+
error?: boolean;
|
|
28
|
+
label?: string;
|
|
29
|
+
subLabel?: string;
|
|
30
|
+
size?: SelectorV2Size;
|
|
31
|
+
slot?: {
|
|
32
|
+
slot: ReactElement;
|
|
33
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
34
|
+
};
|
|
35
|
+
maxLength?: {
|
|
36
|
+
label?: number;
|
|
37
|
+
subLabel?: number;
|
|
38
|
+
};
|
|
39
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style' | 'slot' | 'size' | 'maxLength' | 'children'>;
|
|
@@ -15,5 +15,5 @@ declare const SwitchV2: import('react').ForwardRefExoticComponent<{
|
|
|
15
15
|
label?: number;
|
|
16
16
|
subLabel?: number;
|
|
17
17
|
};
|
|
18
|
-
} & Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "style" | "className" | "slot"
|
|
18
|
+
} & Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "style" | "className" | "slot"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
19
19
|
export default SwitchV2;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Theme } from '../../../context/theme.enum';
|
|
2
2
|
import { CSSObject } from 'styled-components';
|
|
3
|
-
import {
|
|
3
|
+
import { SwitchV2Variant } from './switchV2.types';
|
|
4
4
|
import { BreakpointType } from '../../../breakpoints/breakPoints';
|
|
5
5
|
import { FoundationTokenType } from '../../../tokens/theme.token';
|
|
6
|
-
import { SelectorV2Size } from '../selectorV2.types';
|
|
6
|
+
import { SelectorV2Size, SelectorV2InteractionState } from '../selectorV2.types';
|
|
7
7
|
export type SwitchV2TokensType = {
|
|
8
8
|
gap: CSSObject['gap'];
|
|
9
9
|
switch: {
|
|
@@ -15,7 +15,7 @@ export type SwitchV2TokensType = {
|
|
|
15
15
|
};
|
|
16
16
|
backgroundColor: {
|
|
17
17
|
[key in SwitchV2Variant]: {
|
|
18
|
-
[key in
|
|
18
|
+
[key in SelectorV2InteractionState]: CSSObject['backgroundColor'];
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
thumb: {
|
|
@@ -35,7 +35,7 @@ export type SwitchV2TokensType = {
|
|
|
35
35
|
label: {
|
|
36
36
|
gap: CSSObject['gap'];
|
|
37
37
|
color: {
|
|
38
|
-
[key in
|
|
38
|
+
[key in SelectorV2InteractionState]: CSSObject['color'];
|
|
39
39
|
};
|
|
40
40
|
fontSize: {
|
|
41
41
|
[key in SelectorV2Size]: CSSObject['fontSize'];
|
|
@@ -54,7 +54,7 @@ export type SwitchV2TokensType = {
|
|
|
54
54
|
};
|
|
55
55
|
subLabel: {
|
|
56
56
|
color: {
|
|
57
|
-
[key in
|
|
57
|
+
[key in SelectorV2InteractionState]: CSSObject['color'];
|
|
58
58
|
};
|
|
59
59
|
fontSize: {
|
|
60
60
|
[key in SelectorV2Size]: CSSObject['fontSize'];
|
|
@@ -2,7 +2,6 @@ import { ButtonHTMLAttributes, ReactElement } from 'react';
|
|
|
2
2
|
import { SwitchV2TokensType } from './switchV2.tokens';
|
|
3
3
|
import { CSSObject } from 'styled-components';
|
|
4
4
|
import { SelectorV2Size } from '../selectorV2.types';
|
|
5
|
-
export type SwitchV2State = 'default' | 'hover' | 'disabled' | 'error';
|
|
6
5
|
export type SwitchV2Variant = 'checked' | 'unchecked';
|
|
7
6
|
export type SwitchV2ButtonProps = {
|
|
8
7
|
id: string;
|
|
@@ -47,4 +46,4 @@ export type SwitchV2Props = {
|
|
|
47
46
|
label?: number;
|
|
48
47
|
subLabel?: number;
|
|
49
48
|
};
|
|
50
|
-
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style' | 'slot'
|
|
49
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style' | 'slot'>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SelectorV2Size } from '../SelectorV2/selectorV2.types';
|
|
1
|
+
import { SelectorV2InteractionState, SelectorV2Size } from '../SelectorV2/selectorV2.types';
|
|
3
2
|
export type SelectorsSize = SelectorV2Size;
|
|
4
3
|
export type SelectorsLabelTokensType = {
|
|
5
4
|
content: {
|
|
@@ -7,7 +6,7 @@ export type SelectorsLabelTokensType = {
|
|
|
7
6
|
fontSize: Record<SelectorsSize, string | number>;
|
|
8
7
|
fontWeight: Record<SelectorsSize, string | number>;
|
|
9
8
|
lineHeight: Record<SelectorsSize, string | number>;
|
|
10
|
-
color: Record<
|
|
9
|
+
color: Record<SelectorV2InteractionState, string>;
|
|
11
10
|
};
|
|
12
11
|
required: {
|
|
13
12
|
color: string;
|
|
@@ -20,7 +19,7 @@ export type SelectorsSubLabelTokensType = {
|
|
|
20
19
|
fontSize: Record<SelectorsSize, string | number>;
|
|
21
20
|
fontWeight: Record<SelectorsSize, string | number>;
|
|
22
21
|
lineHeight: Record<SelectorsSize, string | number>;
|
|
23
|
-
color: Record<
|
|
22
|
+
color: Record<SelectorV2InteractionState, string>;
|
|
24
23
|
};
|
|
25
24
|
};
|
|
26
25
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const tooltipV2ContentAnimations: import('styled-components').RuleSet<object>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { TooltipV2Size } from './tooltipV2.types';
|
|
3
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
5
|
+
import { Theme } from '../../context/theme.enum';
|
|
6
|
+
export type TooltipV2TokensType = {
|
|
7
|
+
background: CSSObject['backgroundColor'];
|
|
8
|
+
borderRadius: {
|
|
9
|
+
[key in TooltipV2Size]: CSSObject['borderRadius'];
|
|
10
|
+
};
|
|
11
|
+
maxWidth: {
|
|
12
|
+
[key in TooltipV2Size]: CSSObject['maxWidth'];
|
|
13
|
+
};
|
|
14
|
+
padding: {
|
|
15
|
+
[key in TooltipV2Size]: CSSObject['padding'];
|
|
16
|
+
};
|
|
17
|
+
gap: {
|
|
18
|
+
[key in TooltipV2Size]: CSSObject['gap'];
|
|
19
|
+
};
|
|
20
|
+
text: {
|
|
21
|
+
color: CSSObject['color'];
|
|
22
|
+
fontWeight: {
|
|
23
|
+
[key in TooltipV2Size]: CSSObject['fontWeight'];
|
|
24
|
+
};
|
|
25
|
+
fontSize: {
|
|
26
|
+
[key in TooltipV2Size]: CSSObject['fontSize'];
|
|
27
|
+
};
|
|
28
|
+
lineHeight: {
|
|
29
|
+
[key in TooltipV2Size]: CSSObject['lineHeight'];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
zIndex: CSSObject['zIndex'];
|
|
33
|
+
};
|
|
34
|
+
export type ResponsiveTooltipV2Tokens = {
|
|
35
|
+
[key in keyof BreakpointType]: TooltipV2TokensType;
|
|
36
|
+
};
|
|
37
|
+
export declare const getTooltipV2Tokens: (foundationToken: FoundationTokenType, theme?: Theme | string) => ResponsiveTooltipV2Tokens;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare enum TooltipV2SlotDirection {
|
|
3
|
+
LEFT = "left",
|
|
4
|
+
RIGHT = "right"
|
|
5
|
+
}
|
|
6
|
+
export declare enum TooltipV2Side {
|
|
7
|
+
TOP = "top",
|
|
8
|
+
RIGHT = "right",
|
|
9
|
+
LEFT = "left",
|
|
10
|
+
BOTTOM = "bottom"
|
|
11
|
+
}
|
|
12
|
+
export declare enum TooltipV2Align {
|
|
13
|
+
START = "start",
|
|
14
|
+
END = "end",
|
|
15
|
+
CENTER = "center"
|
|
16
|
+
}
|
|
17
|
+
export declare enum TooltipV2Size {
|
|
18
|
+
SM = "sm",
|
|
19
|
+
MD = "md",
|
|
20
|
+
LG = "lg"
|
|
21
|
+
}
|
|
22
|
+
export type TooltipV2Props = {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
content: ReactNode | string;
|
|
25
|
+
open?: boolean;
|
|
26
|
+
onOpenChange?: (open: boolean) => void;
|
|
27
|
+
side?: TooltipV2Side;
|
|
28
|
+
align?: TooltipV2Align;
|
|
29
|
+
showArrow?: boolean;
|
|
30
|
+
size?: TooltipV2Size;
|
|
31
|
+
slot?: ReactNode;
|
|
32
|
+
slotDirection?: TooltipV2SlotDirection;
|
|
33
|
+
delayDuration?: number;
|
|
34
|
+
offset?: number;
|
|
35
|
+
maxWidth?: string;
|
|
36
|
+
fullWidth?: boolean;
|
|
37
|
+
disableInteractive?: boolean;
|
|
38
|
+
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { errorShakeAnimation, getErrorShakeStyle } from './error.animations';
|
|
2
2
|
export { useErrorShake } from './useErrorShake';
|
|
3
3
|
export { TruncatedTextWithTooltip } from './TruncatedTextWithTooltip';
|
|
4
|
+
export { ResponsiveText } from '../KeyValuePairV2/ResponsiveText';
|
|
5
|
+
export type { ResponsiveTextProps } from '../KeyValuePairV2/ResponsiveText';
|
|
6
|
+
export { getTextStyles, getPrimitiveTextStyles, type TextOverflowMode, } from '../KeyValuePairV2/responsiveTextStyles';
|
|
@@ -55,6 +55,9 @@ import { ResponsiveTextInputV2Tokens } from '../components/InputsV2/TextInputV2/
|
|
|
55
55
|
import { ResponsiveChartV2Tokens } from '../components/ChartsV2/chartV2.tokens';
|
|
56
56
|
import { ResponsiveTimelineTokens } from '../components/Timeline/timeline.token';
|
|
57
57
|
import { ResponsiveCheckboxV2Tokens } from '../components/SelectorV2/CheckboxV2/checkboxV2.tokens';
|
|
58
|
+
import { ResponsiveKeyValuePairV2Tokens } from '../components/KeyValuePairV2/keyValuePairV2.tokens';
|
|
59
|
+
import { ResponsiveTooltipV2Tokens } from '../components/TooltipV2/tooltipV2.tokens';
|
|
60
|
+
import { ResponsiveRadioV2Tokens } from '../components/SelectorV2/RadioV2/radioV2.tokens';
|
|
58
61
|
export type ComponentTokenType = {
|
|
59
62
|
TAGS?: ResponsiveTagTokens;
|
|
60
63
|
SEARCH_INPUT?: ResponsiveSearchInputTokens;
|
|
@@ -110,6 +113,9 @@ export type ComponentTokenType = {
|
|
|
110
113
|
TEXT_INPUTV2?: ResponsiveTextInputV2Tokens;
|
|
111
114
|
CHARTSV2?: ResponsiveChartV2Tokens;
|
|
112
115
|
CHECKBOXV2?: ResponsiveCheckboxV2Tokens;
|
|
116
|
+
KEYVALUEPAIRV2?: ResponsiveKeyValuePairV2Tokens;
|
|
117
|
+
TOOLTIPV2?: ResponsiveTooltipV2Tokens;
|
|
118
|
+
RADIOV2?: ResponsiveRadioV2Tokens;
|
|
113
119
|
};
|
|
114
120
|
type ThemeContextType = {
|
|
115
121
|
foundationTokens: ThemeType;
|
|
@@ -53,4 +53,6 @@ import { ResponsiveTextInputV2Tokens } from '../components/InputsV2/TextInputV2/
|
|
|
53
53
|
import { ResponsiveChartV2Tokens } from '../components/ChartsV2/chartV2.tokens';
|
|
54
54
|
import { ResponsiveTimelineTokens } from '../components/Timeline/timeline.token';
|
|
55
55
|
import { ResponsiveCheckboxV2Tokens } from '../components/SelectorV2/CheckboxV2/checkboxV2.tokens';
|
|
56
|
-
|
|
56
|
+
import { ResponsiveKeyValuePairV2Tokens } from '../components/KeyValuePairV2/keyValuePairV2.tokens';
|
|
57
|
+
import { ResponsiveRadioV2Tokens } from '../components/SelectorV2/RadioV2/radioV2.tokens';
|
|
58
|
+
export declare const useComponentToken: (component: keyof ComponentTokenType) => ResponsiveSearchInputTokens | ResponsiveTagTokens | ResponsiveTextAreaTokens | ResponsiveTextInputTokens | ResponsiveNumberInputTokens | ResponsiveAlertTokens | ResponsiveRadioTokens | ResponsiveOTPInputTokens | ResponsiveUnitInputTokens | ResponsiveMultiValueInputTokens | ResponsiveSwitchTokens | ResponsiveCheckboxTokens | ResponsiveTabsTokens | ResponsiveTooltipTokens | ResponsiveDropdownInputTokens | ResponsiveModalTokens | ResponsiveBreadcrumbTokens | ResponsivePopoverTokens | ResponsiveMenuTokensType | ResponsiveMultiSelectTokens | ResponsiveSingleSelectTokens | ResponsiveTableTokens | ResponsiveCalendarTokens | ResponsiveAccordionTokens | ResponsiveStatCardTokens | ResponsiveProgressBarTokens | ResponsiveDrawerTokens | ResponsiveChartTokens | ResponsiveSnackbarTokens | ResponsiveStepperTokens | ResponsiveKeyValuePairTokens | ResponsiveCardTokens | ResponsiveSkeletonTokens | ResponsiveTopbarTokens | ResponsiveAvatarTokens | ResponsiveAvatarGroupTokens | ResponsiveSidebarTokens | ResponsiveUploadTokens | ResponsiveCodeBlockTokens | ResponsiveMobileNavigationTokens | ResponsiveDirectoryTokens | ResponsiveChatInputTokensType | ResponsiveButtonTokens | ResponsiveButtonV2Tokens | ResponsiveChatInputTokensType | ResponsiveTagV2Tokens | ResponsiveAlertV2Tokens | ResponsiveAccordionV2Tokens | ResponsiveSnackbarV2Tokens | ResponsiveSwitchV2Tokens | ResponsiveTextInputV2Tokens | ResponsiveChartV2Tokens | ResponsiveAvatarV2Tokens | ResponsiveTextInputV2Tokens | ResponsiveTimelineTokens | ResponsiveCheckboxV2Tokens | ResponsiveKeyValuePairV2Tokens | ResponsiveRadioV2Tokens | ResponsiveTextInputV2Tokens;
|