@juspay/blend-design-system 0.0.35-beta.2 → 0.0.35-beta.3
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/Inputs/utils/InputLabels/InputLabels.d.ts +0 -9
- package/dist/components/InputsV2/TextInputV2/TextInputV2.d.ts +25 -0
- package/dist/components/InputsV2/TextInputV2/TextInputV2.dark.tokens.d.ts +3 -0
- package/dist/components/InputsV2/TextInputV2/TextInputV2.light.tokens.d.ts +3 -0
- package/dist/components/InputsV2/TextInputV2/TextInputV2.tokens.d.ts +136 -0
- package/dist/components/InputsV2/TextInputV2/TextInputV2.types.d.ts +26 -0
- package/dist/components/InputsV2/TextInputV2/index.d.ts +3 -0
- package/dist/components/InputsV2/TextInputV2/utils.d.ts +20 -0
- package/dist/components/InputsV2/inputV2.types.d.ts +15 -0
- package/dist/components/InputsV2/utils/FloatingLabelsV2/FloatingLabelsV2.d.ts +34 -0
- package/dist/components/InputsV2/utils/InputFooter/InputFooterV2.d.ts +43 -0
- package/dist/components/InputsV2/utils/InputLabels/InputLabelsV2.d.ts +60 -0
- package/dist/components/InputsV2/utils/InputSlots/InputSlots.d.ts +18 -0
- package/dist/components/Primitives/PrimitiveText/PrimitiveText.d.ts +9 -1
- package/dist/components/Sidebar/SidebarContent.d.ts +2 -1
- package/dist/components/Sidebar/SidebarFooter.d.ts +2 -1
- package/dist/components/Sidebar/types.d.ts +1 -0
- package/dist/components/SingleSelect/SingleSelectMenu.d.ts +2 -2
- package/dist/context/ThemeContext.d.ts +2 -0
- package/dist/context/useComponentToken.d.ts +2 -1
- package/dist/global-utils/GlobalUtils.d.ts +1 -0
- package/dist/hooks/useInputSlotPadding.d.ts +14 -0
- package/dist/main.js +19113 -18254
- package/package.json +1 -1
|
@@ -36,14 +36,5 @@ type InputLabelsProps<TTokens extends InputLabelTokens = InputLabelTokens> = {
|
|
|
36
36
|
tokens?: Partial<TTokens>;
|
|
37
37
|
labelId?: string;
|
|
38
38
|
};
|
|
39
|
-
/**
|
|
40
|
-
* @description InputLabels is a component that displays a label and sublabel for an input field.
|
|
41
|
-
* @param {string} label - The label for the input field.
|
|
42
|
-
* @param {string} sublabel - The sublabel for the input field.
|
|
43
|
-
* @param {boolean} disabled - Whether the input field is disabled.
|
|
44
|
-
* @param {string} helpIconHintText - The hint text for the help icon.
|
|
45
|
-
* @param {string} inputId - Unique ID for proper label association (WCAG 3.3.2).
|
|
46
|
-
* @param {boolean} required - Whether the input field is required.
|
|
47
|
-
*/
|
|
48
39
|
declare const InputLabels: <TTokens extends InputLabelTokens>({ label, sublabel, helpIconHintText, name, inputId, required, tokens, labelId, }: InputLabelsProps<TTokens>) => "" | import("react/jsx-runtime").JSX.Element | undefined;
|
|
49
40
|
export default InputLabels;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { InputSizeV2 } from '../inputV2.types';
|
|
2
|
+
declare const TextInputV2: import('react').ForwardRefExoticComponent<{
|
|
3
|
+
value: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
subLabel?: string;
|
|
6
|
+
size?: InputSizeV2;
|
|
7
|
+
error?: {
|
|
8
|
+
show: boolean;
|
|
9
|
+
message?: string;
|
|
10
|
+
};
|
|
11
|
+
hintText?: string;
|
|
12
|
+
helpIconText?: {
|
|
13
|
+
text: string;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
};
|
|
16
|
+
leftSlot?: {
|
|
17
|
+
slot: import('react').ReactElement;
|
|
18
|
+
maxHeight?: import('styled-components').CSSObject["maxHeight"];
|
|
19
|
+
};
|
|
20
|
+
rightSlot?: {
|
|
21
|
+
slot: import('react').ReactElement;
|
|
22
|
+
maxHeight?: import('styled-components').CSSObject["maxHeight"];
|
|
23
|
+
};
|
|
24
|
+
} & Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "size" | "style" | "className"> & import('react').RefAttributes<HTMLInputElement>>;
|
|
25
|
+
export default TextInputV2;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { InputSizeV2, InputStateV2 } from '../inputV2.types';
|
|
3
|
+
import { BreakpointType } from '../../../breakpoints/breakPoints';
|
|
4
|
+
import { FoundationTokenType } from '../../../tokens/theme.token';
|
|
5
|
+
import { Theme } from '../../../context/theme.enum';
|
|
6
|
+
export type TextInputV2TokensType = {
|
|
7
|
+
gap: CSSObject['gap'];
|
|
8
|
+
topContainer: {
|
|
9
|
+
label: {
|
|
10
|
+
fontSize: {
|
|
11
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
12
|
+
};
|
|
13
|
+
fontWeight: {
|
|
14
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
15
|
+
};
|
|
16
|
+
lineHeight: {
|
|
17
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
18
|
+
};
|
|
19
|
+
color: {
|
|
20
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
subLabel: {
|
|
24
|
+
fontSize: {
|
|
25
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
26
|
+
};
|
|
27
|
+
fontWeight: {
|
|
28
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
29
|
+
};
|
|
30
|
+
lineHeight: {
|
|
31
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
32
|
+
};
|
|
33
|
+
color: {
|
|
34
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
required: {
|
|
38
|
+
color: CSSObject['color'];
|
|
39
|
+
};
|
|
40
|
+
helpIcon: {
|
|
41
|
+
width: {
|
|
42
|
+
[key in InputSizeV2]: CSSObject['width'];
|
|
43
|
+
};
|
|
44
|
+
color: {
|
|
45
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
inputContainer: {
|
|
50
|
+
gap: CSSObject['gap'];
|
|
51
|
+
placeholder: {
|
|
52
|
+
color: {
|
|
53
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
54
|
+
};
|
|
55
|
+
fontSize: {
|
|
56
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
57
|
+
};
|
|
58
|
+
fontWeight: {
|
|
59
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
60
|
+
};
|
|
61
|
+
lineHeight: {
|
|
62
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
inputText: {
|
|
66
|
+
fontSize: {
|
|
67
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
68
|
+
};
|
|
69
|
+
fontWeight: {
|
|
70
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
71
|
+
};
|
|
72
|
+
lineHeight: {
|
|
73
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
74
|
+
};
|
|
75
|
+
color: {
|
|
76
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
borderRadius: {
|
|
80
|
+
[key in InputSizeV2]: CSSObject['borderRadius'];
|
|
81
|
+
};
|
|
82
|
+
boxShadow: CSSObject['boxShadow'];
|
|
83
|
+
padding: {
|
|
84
|
+
top: {
|
|
85
|
+
[key in InputSizeV2]: CSSObject['padding'];
|
|
86
|
+
};
|
|
87
|
+
right: {
|
|
88
|
+
[key in InputSizeV2]: CSSObject['padding'];
|
|
89
|
+
};
|
|
90
|
+
bottom: {
|
|
91
|
+
[key in InputSizeV2]: CSSObject['padding'];
|
|
92
|
+
};
|
|
93
|
+
left: {
|
|
94
|
+
[key in InputSizeV2]: CSSObject['padding'];
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
border: {
|
|
98
|
+
[key in InputStateV2]: CSSObject['border'];
|
|
99
|
+
};
|
|
100
|
+
backgroundColor: {
|
|
101
|
+
[key in InputStateV2]: CSSObject['backgroundColor'];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
bottomContainer: {
|
|
105
|
+
hintText: {
|
|
106
|
+
fontSize: {
|
|
107
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
108
|
+
};
|
|
109
|
+
fontWeight: {
|
|
110
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
111
|
+
};
|
|
112
|
+
lineHeight: {
|
|
113
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
114
|
+
};
|
|
115
|
+
color: {
|
|
116
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
errorMessage: {
|
|
120
|
+
fontSize: {
|
|
121
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
122
|
+
};
|
|
123
|
+
fontWeight: {
|
|
124
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
125
|
+
};
|
|
126
|
+
lineHeight: {
|
|
127
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
128
|
+
};
|
|
129
|
+
color: CSSObject['color'];
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
export type ResponsiveTextInputV2Tokens = {
|
|
134
|
+
[key in keyof BreakpointType]: TextInputV2TokensType;
|
|
135
|
+
};
|
|
136
|
+
export declare const getTextInputV2Tokens: (foundationToken: FoundationTokenType, theme?: Theme | string) => ResponsiveTextInputV2Tokens;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
import { InputSizeV2 } from '../inputV2.types';
|
|
4
|
+
export type TextInputV2Props = {
|
|
5
|
+
value: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
subLabel?: string;
|
|
8
|
+
size?: InputSizeV2;
|
|
9
|
+
error?: {
|
|
10
|
+
show: boolean;
|
|
11
|
+
message?: string;
|
|
12
|
+
};
|
|
13
|
+
hintText?: string;
|
|
14
|
+
helpIconText?: {
|
|
15
|
+
text: string;
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
};
|
|
18
|
+
leftSlot?: {
|
|
19
|
+
slot: ReactElement;
|
|
20
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
21
|
+
};
|
|
22
|
+
rightSlot?: {
|
|
23
|
+
slot: ReactElement;
|
|
24
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
25
|
+
};
|
|
26
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'style' | 'className'>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AnyRef, InputStateV2 } from '../inputV2.types';
|
|
2
|
+
export declare const FOCUS_RING_STYLES: {
|
|
3
|
+
readonly boxShadow: "0 0 0 3px #EFF6FF";
|
|
4
|
+
readonly backgroundColor: "rgba(239, 246, 255, 0.15)";
|
|
5
|
+
};
|
|
6
|
+
export declare const TRANSITION = "border 200ms ease-in-out, box-shadow 200ms ease-in-out, background-color 200ms ease-in-out";
|
|
7
|
+
export declare const getInteractionState: (state: InputStateV2) => "default" | "hover" | "disabled" | "focus" | "error";
|
|
8
|
+
export declare const getInputState: (error?: {
|
|
9
|
+
show: boolean;
|
|
10
|
+
} | null, disabled?: boolean) => InputStateV2;
|
|
11
|
+
export declare const getVerticalInputPadding: ({ isSmallScreenWithLargeSize, inputFocusedOrWithValue, paddingTop, paddingBottom, }: {
|
|
12
|
+
isSmallScreenWithLargeSize: boolean;
|
|
13
|
+
inputFocusedOrWithValue: boolean;
|
|
14
|
+
paddingTop: number;
|
|
15
|
+
paddingBottom: number;
|
|
16
|
+
}) => {
|
|
17
|
+
top: number;
|
|
18
|
+
bottom: number;
|
|
19
|
+
};
|
|
20
|
+
export declare const setExternalRef: <T>(ref: AnyRef<T>, value: T | null) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum InputSizeV2 {
|
|
2
|
+
SM = "sm",
|
|
3
|
+
MD = "md",
|
|
4
|
+
LG = "lg"
|
|
5
|
+
}
|
|
6
|
+
export declare enum InputStateV2 {
|
|
7
|
+
DEFAULT = "default",
|
|
8
|
+
HOVER = "hover",
|
|
9
|
+
FOCUS = "focus",
|
|
10
|
+
ERROR = "error",
|
|
11
|
+
DISABLED = "disabled"
|
|
12
|
+
}
|
|
13
|
+
export type AnyRef<T> = ((instance: T | null) => void) | {
|
|
14
|
+
current: T | null;
|
|
15
|
+
} | null | undefined;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { InputSizeV2, InputStateV2 } from '../../inputV2.types';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
export type FloatingLabelsV2Tokens = {
|
|
4
|
+
placeholder: {
|
|
5
|
+
color: {
|
|
6
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
7
|
+
};
|
|
8
|
+
fontSize: {
|
|
9
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
10
|
+
};
|
|
11
|
+
fontWeight: {
|
|
12
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
13
|
+
};
|
|
14
|
+
lineHeight: {
|
|
15
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
required: {
|
|
19
|
+
color: CSSObject['color'];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
declare const FloatingLabelsV2: ({ label, required, name, inputId, isInputFocusedOrWithValue, topPadding, leftPadding, tokens, size, state, }: {
|
|
23
|
+
label: string;
|
|
24
|
+
required: boolean;
|
|
25
|
+
name: string;
|
|
26
|
+
inputId: string;
|
|
27
|
+
isInputFocusedOrWithValue: boolean;
|
|
28
|
+
topPadding: number;
|
|
29
|
+
leftPadding: number;
|
|
30
|
+
tokens: FloatingLabelsV2Tokens;
|
|
31
|
+
size: InputSizeV2;
|
|
32
|
+
state: InputStateV2;
|
|
33
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export default FloatingLabelsV2;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { InputSizeV2, InputStateV2 } from '../../inputV2.types';
|
|
3
|
+
type InputFooterV2Tokens = {
|
|
4
|
+
hintText: {
|
|
5
|
+
fontSize: {
|
|
6
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
7
|
+
};
|
|
8
|
+
fontWeight: {
|
|
9
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
10
|
+
};
|
|
11
|
+
lineHeight: {
|
|
12
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
13
|
+
};
|
|
14
|
+
color: {
|
|
15
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
errorMessage: {
|
|
19
|
+
fontSize: {
|
|
20
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
21
|
+
};
|
|
22
|
+
fontWeight: {
|
|
23
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
24
|
+
};
|
|
25
|
+
lineHeight: {
|
|
26
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
27
|
+
};
|
|
28
|
+
color: CSSObject['color'];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
type InputFooterV2Props = {
|
|
32
|
+
error?: boolean;
|
|
33
|
+
errorMessage?: string;
|
|
34
|
+
hintText?: string;
|
|
35
|
+
errorId?: string;
|
|
36
|
+
hintId?: string;
|
|
37
|
+
tokens?: InputFooterV2Tokens;
|
|
38
|
+
hintTextId?: string;
|
|
39
|
+
errorMessageId?: string;
|
|
40
|
+
size?: InputSizeV2;
|
|
41
|
+
};
|
|
42
|
+
declare const InputFooterV2: ({ error, errorMessage, hintText, errorId, hintId, tokens, hintTextId, errorMessageId, size, }: InputFooterV2Props) => "" | import("react/jsx-runtime").JSX.Element | undefined;
|
|
43
|
+
export default InputFooterV2;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { InputSizeV2, InputStateV2 } from '../../inputV2.types';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
export type InputLabelsV2Tokens = {
|
|
4
|
+
label: {
|
|
5
|
+
fontSize: {
|
|
6
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
7
|
+
};
|
|
8
|
+
fontWeight: {
|
|
9
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
10
|
+
};
|
|
11
|
+
lineHeight: {
|
|
12
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
13
|
+
};
|
|
14
|
+
color: {
|
|
15
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
subLabel: {
|
|
19
|
+
fontSize: {
|
|
20
|
+
[key in InputSizeV2]: CSSObject['fontSize'];
|
|
21
|
+
};
|
|
22
|
+
fontWeight: {
|
|
23
|
+
[key in InputSizeV2]: CSSObject['fontWeight'];
|
|
24
|
+
};
|
|
25
|
+
lineHeight: {
|
|
26
|
+
[key in InputSizeV2]: CSSObject['lineHeight'];
|
|
27
|
+
};
|
|
28
|
+
color: {
|
|
29
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
required: {
|
|
33
|
+
color: CSSObject['color'];
|
|
34
|
+
};
|
|
35
|
+
helpIcon: {
|
|
36
|
+
width: {
|
|
37
|
+
[key in InputSizeV2]: CSSObject['width'];
|
|
38
|
+
};
|
|
39
|
+
color: {
|
|
40
|
+
[key in InputStateV2]: CSSObject['color'];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type InputLabelsV2Props = {
|
|
45
|
+
label?: string;
|
|
46
|
+
sublabel?: string;
|
|
47
|
+
helpIconText?: {
|
|
48
|
+
text: string;
|
|
49
|
+
onClick?: () => void;
|
|
50
|
+
};
|
|
51
|
+
name?: string;
|
|
52
|
+
inputId?: string;
|
|
53
|
+
required?: boolean;
|
|
54
|
+
tokens?: InputLabelsV2Tokens;
|
|
55
|
+
labelId?: string;
|
|
56
|
+
size?: InputSizeV2;
|
|
57
|
+
state?: InputStateV2;
|
|
58
|
+
};
|
|
59
|
+
declare const InputLabelsV2: ({ label, sublabel, helpIconText, name, inputId, required, tokens, labelId, size, state, }: InputLabelsV2Props) => "" | import("react/jsx-runtime").JSX.Element | undefined;
|
|
60
|
+
export default InputLabelsV2;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
type InputSlotPosition = 'left' | 'right';
|
|
3
|
+
type InputSlotProps = {
|
|
4
|
+
position: InputSlotPosition;
|
|
5
|
+
slotRef: React.RefObject<HTMLDivElement | null>;
|
|
6
|
+
top: number;
|
|
7
|
+
bottom: number;
|
|
8
|
+
left: number;
|
|
9
|
+
right: number;
|
|
10
|
+
dataElement: string;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
maxHeight?: CSSObject['maxHeight'];
|
|
13
|
+
};
|
|
14
|
+
declare const InputSlots: {
|
|
15
|
+
({ position, slotRef, top, bottom, left, right, dataElement, children, }: InputSlotProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
export default InputSlots;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { default as React, JSX } from 'react';
|
|
2
2
|
import { CSSObject } from 'styled-components';
|
|
3
3
|
export type SemanticTagType = keyof Pick<JSX.IntrinsicElements, 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'code' | 'q' | 'small' | 'label'>;
|
|
4
|
-
|
|
4
|
+
type StateStyles = {
|
|
5
|
+
_hover?: BasePrimitiveTextProps;
|
|
6
|
+
_focus?: BasePrimitiveTextProps;
|
|
7
|
+
_active?: BasePrimitiveTextProps;
|
|
8
|
+
_disabled?: BasePrimitiveTextProps;
|
|
9
|
+
_focusVisible?: BasePrimitiveTextProps;
|
|
10
|
+
};
|
|
11
|
+
export type BasePrimitiveTextProps = {
|
|
5
12
|
fontWeight?: CSSObject['fontWeight'];
|
|
6
13
|
color?: CSSObject['color'];
|
|
7
14
|
textAlign?: CSSObject['textAlign'];
|
|
@@ -27,6 +34,7 @@ export type PrimitiveTextProps = {
|
|
|
27
34
|
bottom?: CSSObject['bottom'];
|
|
28
35
|
right?: CSSObject['right'];
|
|
29
36
|
};
|
|
37
|
+
export type PrimitiveTextProps = BasePrimitiveTextProps & StateStyles;
|
|
30
38
|
export type TextProps = PrimitiveTextProps & Omit<React.HTMLAttributes<HTMLElement>, 'color'> & {
|
|
31
39
|
children: React.ReactNode;
|
|
32
40
|
as?: SemanticTagType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DirectoryData } from '../Directory/types';
|
|
3
|
-
import { SidebarMerchantInfo } from './types';
|
|
3
|
+
import { SidebarMerchantInfo, SidebarStateChangeType } from './types';
|
|
4
4
|
export type SidebarContentProps = {
|
|
5
5
|
sidebarTopSlot?: React.ReactNode;
|
|
6
6
|
merchantInfo?: SidebarMerchantInfo;
|
|
@@ -19,6 +19,7 @@ export type SidebarContentProps = {
|
|
|
19
19
|
iconOnlyMode?: boolean;
|
|
20
20
|
footer?: React.ReactNode;
|
|
21
21
|
setIsHovering?: (isHovering: boolean) => void;
|
|
22
|
+
sidebarState?: SidebarStateChangeType;
|
|
22
23
|
};
|
|
23
24
|
declare const SidebarContent: React.FC<SidebarContentProps>;
|
|
24
25
|
export default SidebarContent;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { SidebarStateChangeType } from './types';
|
|
2
3
|
type SidebarFooterProps = {
|
|
3
4
|
footer?: React.ReactNode;
|
|
4
|
-
|
|
5
|
+
sidebarState: SidebarStateChangeType;
|
|
5
6
|
};
|
|
6
7
|
declare const SidebarFooter: React.FC<SidebarFooterProps>;
|
|
7
8
|
export default SidebarFooter;
|
|
@@ -59,6 +59,7 @@ export type SidebarProps = {
|
|
|
59
59
|
activeItem?: string | null;
|
|
60
60
|
onActiveItemChange?: (item: string | null) => void;
|
|
61
61
|
defaultActiveItem?: string | null;
|
|
62
|
+
onHoveringChange?: (isHovering: boolean) => void;
|
|
62
63
|
};
|
|
63
64
|
export type MobileNavigationItem = NavbarItem & {
|
|
64
65
|
sectionLabel?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { SelectMenuSize, SelectMenuVariant, SingleSelectSkeletonProps } from './types';
|
|
2
|
+
import { SelectMenuGroupType } from '../Select';
|
|
3
|
+
import { SelectMenuAlignment, SelectMenuSide, SelectMenuSize, SelectMenuVariant, SingleSelectSkeletonProps } from './types';
|
|
4
4
|
type SingleSelectMenuProps = {
|
|
5
5
|
items: SelectMenuGroupType[];
|
|
6
6
|
selected: string;
|
|
@@ -50,6 +50,7 @@ import { ResponsiveAlertV2Tokens } from '../components/AlertV2/alertV2.tokens';
|
|
|
50
50
|
import { ResponsiveAccordionV2Tokens } from '../components/AccordionV2/accordionV2.tokens';
|
|
51
51
|
import { ResponsiveSnackbarV2Tokens } from '../components/SnackbarV2/snackbarV2.tokens';
|
|
52
52
|
import { ResponsiveSwitchV2Tokens } from '../components/SwitchV2/switchV2.tokens';
|
|
53
|
+
import { ResponsiveTextInputV2Tokens } from '../components/InputsV2/TextInputV2/TextInputV2.tokens';
|
|
53
54
|
export type ComponentTokenType = {
|
|
54
55
|
TAGS?: ResponsiveTagTokens;
|
|
55
56
|
SEARCH_INPUT?: ResponsiveSearchInputTokens;
|
|
@@ -100,6 +101,7 @@ export type ComponentTokenType = {
|
|
|
100
101
|
ACCORDIONV2?: ResponsiveAccordionV2Tokens;
|
|
101
102
|
SNACKBARV2?: ResponsiveSnackbarV2Tokens;
|
|
102
103
|
SWITCHV2?: ResponsiveSwitchV2Tokens;
|
|
104
|
+
TEXT_INPUTV2?: ResponsiveTextInputV2Tokens;
|
|
103
105
|
};
|
|
104
106
|
type ThemeContextType = {
|
|
105
107
|
foundationTokens: ThemeType;
|
|
@@ -48,4 +48,5 @@ import { ResponsiveAlertV2Tokens } from '../components/AlertV2';
|
|
|
48
48
|
import { ResponsiveAccordionV2Tokens } from '../components/AccordionV2';
|
|
49
49
|
import { ResponsiveSnackbarV2Tokens } from '../components/SnackbarV2';
|
|
50
50
|
import { ResponsiveSwitchV2Tokens } from '../components/SwitchV2/switchV2.tokens';
|
|
51
|
-
|
|
51
|
+
import { ResponsiveTextInputV2Tokens } from '../components/InputsV2/TextInputV2/TextInputV2.tokens';
|
|
52
|
+
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;
|
|
@@ -9,3 +9,4 @@ export declare const getTruncatedText: (text: string, limit?: number) => {
|
|
|
9
9
|
export declare const formatTextWithLineBreaks: (content: ReactNode | string) => ReactNode;
|
|
10
10
|
export declare const addPxToValue: (value?: number | string) => string;
|
|
11
11
|
export declare const flattenChildren: (children: React.ReactNode) => React.ReactElement<unknown>[];
|
|
12
|
+
export declare const useAutofillDetection: (inputRef: React.RefObject<HTMLInputElement | null>, setIsAutofilled: (value: boolean) => void) => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export type UseInputSlotPaddingParams = {
|
|
3
|
+
leftSlotRef: RefObject<HTMLDivElement | null>;
|
|
4
|
+
rightSlotRef: RefObject<HTMLDivElement | null>;
|
|
5
|
+
hasLeftSlot: boolean;
|
|
6
|
+
hasRightSlot: boolean;
|
|
7
|
+
paddingLeft: number;
|
|
8
|
+
paddingRight: number;
|
|
9
|
+
gap: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function useInputSlotPadding({ leftSlotRef, rightSlotRef, hasLeftSlot, hasRightSlot, paddingLeft, paddingRight, gap, }: UseInputSlotPaddingParams): {
|
|
12
|
+
calculatedLeftInputPadding: number;
|
|
13
|
+
calculatedRightInputPadding: number;
|
|
14
|
+
};
|