@xqmsg/ui-core 0.22.4 → 0.23.1-rc.1
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/form/FormTypes.d.ts +2 -0
- package/dist/components/input/StackedCheckbox/StackedCheckbox.d.ts +3 -2
- package/dist/components/input/StackedInput/StackedInput.d.ts +2 -0
- package/dist/components/input/StackedPilledInput/index.d.ts +3 -0
- package/dist/components/input/StackedTextarea/StackedTextarea.d.ts +4 -0
- package/dist/components/input/components/token/index.d.ts +1 -0
- package/dist/components/input/index.d.ts +3 -2
- package/dist/components/select/index.d.ts +27 -0
- package/dist/index.d.ts +1 -0
- package/dist/theme/components/button.d.ts +113 -0
- package/dist/theme/components/checkbox.d.ts +29 -0
- package/dist/theme/components/input.d.ts +23 -0
- package/dist/theme/components/select.d.ts +23 -0
- package/dist/theme/components/textarea.d.ts +78 -0
- package/dist/ui-core.cjs.development.js +336 -54
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +338 -57
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/button/Button.stories.tsx +92 -27
- package/src/components/form/FormTypes.ts +2 -0
- package/src/components/form/section/index.tsx +2 -0
- package/src/components/input/Input.stories.tsx +67 -0
- package/src/components/input/StackedCheckbox/StackedCheckbox.tsx +12 -4
- package/src/components/input/StackedInput/StackedInput.tsx +11 -1
- package/src/components/input/StackedPilledInput/index.tsx +310 -266
- package/src/components/input/StackedTextarea/StackedTextarea.tsx +30 -4
- package/src/components/input/components/dropdown/index.tsx +1 -1
- package/src/components/input/components/token/index.tsx +6 -5
- package/src/components/input/index.tsx +25 -9
- package/src/components/select/index.tsx +140 -0
- package/src/components/tabs/TabsWrapper.stories.tsx +1 -1
- package/src/index.tsx +3 -0
- package/src/theme/components/button.ts +67 -0
- package/src/theme/components/checkbox.ts +28 -0
- package/src/theme/components/input.ts +23 -1
- package/src/theme/components/textarea.ts +21 -0
- package/src/theme/customXQChakraTheme.ts +2 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface StackedCheckboxProps extends
|
|
2
|
+
import { InputFieldProps } from '../InputTypes';
|
|
3
|
+
export interface StackedCheckboxProps extends InputFieldProps {
|
|
4
4
|
label: string;
|
|
5
|
+
variant: string;
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* A functional React component utilized to render the `StackedCheckbox` component.
|
|
@@ -5,6 +5,8 @@ export interface StackedInputProps extends InputFieldProps {
|
|
|
5
5
|
allowDefault?: boolean;
|
|
6
6
|
leftElement?: React.ReactNode;
|
|
7
7
|
rightElement?: React.ReactNode;
|
|
8
|
+
variant?: string;
|
|
9
|
+
label?: string;
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
12
|
* A functional React component utilized to render the `StackedInput` component.
|
|
@@ -6,6 +6,9 @@ export interface StackedPilledInputProps extends InputFieldProps {
|
|
|
6
6
|
setError: UseFormSetError<FieldValues>;
|
|
7
7
|
clearErrors: UseFormClearErrors<FieldValues>;
|
|
8
8
|
control: Control<FieldValues, any>;
|
|
9
|
+
separators?: string[];
|
|
10
|
+
variant?: string;
|
|
11
|
+
label?: string;
|
|
9
12
|
}
|
|
10
13
|
/**
|
|
11
14
|
* A functional React component utilized to render the `StackedPilledInput` component.
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextareaFieldProps } from '../InputTypes';
|
|
3
3
|
export interface StackedTextareaProps extends TextareaFieldProps {
|
|
4
|
+
isRequired?: boolean;
|
|
5
|
+
allowDefault?: boolean;
|
|
6
|
+
variant: string;
|
|
7
|
+
label?: string;
|
|
4
8
|
}
|
|
5
9
|
/**
|
|
6
10
|
* A functional React component utilized to render the `StackedTextarea` component.
|
|
@@ -13,7 +13,7 @@ export interface InputProps<T extends FieldValues> extends ValidationProps {
|
|
|
13
13
|
fullOptions?: FieldOptions;
|
|
14
14
|
maxLength?: number;
|
|
15
15
|
helperText?: React.ReactNode;
|
|
16
|
-
control: Control<T,
|
|
16
|
+
control: Control<T, unknown>;
|
|
17
17
|
onChange?: (value?: string) => void;
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
tooltipText?: string;
|
|
@@ -23,9 +23,10 @@ export interface InputProps<T extends FieldValues> extends ValidationProps {
|
|
|
23
23
|
leftElement?: React.ReactNode;
|
|
24
24
|
allowDefault?: boolean;
|
|
25
25
|
rightElement?: React.ReactNode;
|
|
26
|
+
variant: string;
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* A functional React component utilized to render the `Input` component. Utilizes a switch statement
|
|
29
30
|
* to render the correct input based on the `inputType`.
|
|
30
31
|
*/
|
|
31
|
-
export declare function Input<T extends FieldValues>({ inputType, label, ariaLabel, className, placeholder, name, helperText, options, tooltipText, isInvalid, errorText, isRequired, maxLength, defaultValue, fullOptions, control, disabled, rightElement, leftElement, allowDefault, onChange, setValue, setError, clearErrors, }: InputProps<T>): React.JSX.Element;
|
|
32
|
+
export declare function Input<T extends FieldValues>({ inputType, label, ariaLabel, className, placeholder, name, helperText, options, tooltipText, isInvalid, errorText, isRequired, maxLength, defaultValue, fullOptions, control, disabled, rightElement, leftElement, allowDefault, variant, onChange, setValue, setError, clearErrors, }: InputProps<T>): React.JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Control, FieldValues, UseFormClearErrors, UseFormSetError, UseFormSetValue } from 'react-hook-form';
|
|
3
|
+
import { FieldOptions, ValidationProps } from 'src/components/input/InputTypes';
|
|
4
|
+
export interface SelectNativeProps<T extends FieldValues> extends ValidationProps {
|
|
5
|
+
isRequired: boolean;
|
|
6
|
+
name: string;
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
options?: FieldOptions;
|
|
13
|
+
fullOptions?: FieldOptions;
|
|
14
|
+
helperText?: React.ReactNode;
|
|
15
|
+
control: Control<T, unknown>;
|
|
16
|
+
onChange?: (value?: string) => void;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
tooltipText?: string;
|
|
19
|
+
setValue: UseFormSetValue<T>;
|
|
20
|
+
setError: UseFormSetError<T>;
|
|
21
|
+
clearErrors: UseFormClearErrors<T>;
|
|
22
|
+
allowDefault?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A functional React component utilized to render the `SelectNative` component.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SelectNative: React.FC<SelectNativeProps<HTMLSelectElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './components/form';
|
|
|
10
10
|
export * from './components/form/section';
|
|
11
11
|
export * from './components/icons';
|
|
12
12
|
export * from './components/input';
|
|
13
|
+
export { SelectNative } from './components/select';
|
|
13
14
|
export * from './components/layout';
|
|
14
15
|
export { Link } from './components/link';
|
|
15
16
|
export * from './components/loading';
|
|
@@ -120,6 +120,119 @@ declare const _default: {
|
|
|
120
120
|
bgGradient: string;
|
|
121
121
|
shadow: string;
|
|
122
122
|
};
|
|
123
|
+
'flat-primary': {
|
|
124
|
+
bg: string;
|
|
125
|
+
bgGradient: null;
|
|
126
|
+
minWidth: string;
|
|
127
|
+
padding: string;
|
|
128
|
+
borderRadius: string;
|
|
129
|
+
border: string;
|
|
130
|
+
gap: string;
|
|
131
|
+
height: string;
|
|
132
|
+
fontSize: string;
|
|
133
|
+
fontWeight: string;
|
|
134
|
+
lineHeight: string;
|
|
135
|
+
letterSpacing: string;
|
|
136
|
+
textAlign: string;
|
|
137
|
+
boxShadow: string;
|
|
138
|
+
color: string;
|
|
139
|
+
h: string;
|
|
140
|
+
px: string;
|
|
141
|
+
py: string;
|
|
142
|
+
shadow: string;
|
|
143
|
+
_disabled: {
|
|
144
|
+
backgroundColor: string;
|
|
145
|
+
borderColor: string;
|
|
146
|
+
color: string;
|
|
147
|
+
pointerEvents: string;
|
|
148
|
+
};
|
|
149
|
+
_hover: {
|
|
150
|
+
bg: string;
|
|
151
|
+
};
|
|
152
|
+
_active: {
|
|
153
|
+
color: string;
|
|
154
|
+
bg: string;
|
|
155
|
+
bgGradient: string;
|
|
156
|
+
};
|
|
157
|
+
_focus: {
|
|
158
|
+
outline: string;
|
|
159
|
+
outlineOffset: string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
'flat-secondary': {
|
|
163
|
+
fontWeight: string;
|
|
164
|
+
color: string;
|
|
165
|
+
bg: string;
|
|
166
|
+
_hover: {
|
|
167
|
+
bg: string;
|
|
168
|
+
};
|
|
169
|
+
_active: {
|
|
170
|
+
color: string;
|
|
171
|
+
bg: string;
|
|
172
|
+
bgGradient: string;
|
|
173
|
+
};
|
|
174
|
+
_focus: {
|
|
175
|
+
bg: string;
|
|
176
|
+
};
|
|
177
|
+
bgGradient: null;
|
|
178
|
+
minWidth: string;
|
|
179
|
+
padding: string;
|
|
180
|
+
borderRadius: string;
|
|
181
|
+
border: string;
|
|
182
|
+
gap: string;
|
|
183
|
+
height: string;
|
|
184
|
+
fontSize: string;
|
|
185
|
+
lineHeight: string;
|
|
186
|
+
letterSpacing: string;
|
|
187
|
+
textAlign: string;
|
|
188
|
+
boxShadow: string;
|
|
189
|
+
h: string;
|
|
190
|
+
px: string;
|
|
191
|
+
py: string;
|
|
192
|
+
shadow: string;
|
|
193
|
+
_disabled: {
|
|
194
|
+
backgroundColor: string;
|
|
195
|
+
borderColor: string;
|
|
196
|
+
color: string;
|
|
197
|
+
pointerEvents: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
'flat-tertiary': {
|
|
201
|
+
fontWeight: string;
|
|
202
|
+
color: string;
|
|
203
|
+
bg: string;
|
|
204
|
+
_hover: {
|
|
205
|
+
bg: string;
|
|
206
|
+
};
|
|
207
|
+
_active: {
|
|
208
|
+
color: string;
|
|
209
|
+
bg: string;
|
|
210
|
+
};
|
|
211
|
+
_focus: {
|
|
212
|
+
color: string;
|
|
213
|
+
bg: string;
|
|
214
|
+
};
|
|
215
|
+
_disabled: {
|
|
216
|
+
backgroundColor: string;
|
|
217
|
+
color: string;
|
|
218
|
+
};
|
|
219
|
+
bgGradient: null;
|
|
220
|
+
minWidth: string;
|
|
221
|
+
padding: string;
|
|
222
|
+
borderRadius: string;
|
|
223
|
+
border: string;
|
|
224
|
+
gap: string;
|
|
225
|
+
height: string;
|
|
226
|
+
fontSize: string;
|
|
227
|
+
lineHeight: string;
|
|
228
|
+
letterSpacing: string;
|
|
229
|
+
textAlign: string;
|
|
230
|
+
boxShadow: string;
|
|
231
|
+
h: string;
|
|
232
|
+
px: string;
|
|
233
|
+
py: string;
|
|
234
|
+
shadow: string;
|
|
235
|
+
};
|
|
123
236
|
};
|
|
124
237
|
defaultProps: {
|
|
125
238
|
variant: string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
baseStyle?: Partial<Record<"container" | "icon" | "label" | "control", import("@chakra-ui/styled-system").RecursiveCSSObject<import("@chakra-ui/styled-system").CSSWithMultiValues>>> | import("@chakra-ui/styled-system").PartsStyleFunction<{
|
|
3
|
+
keys: ("container" | "icon" | "label" | "control")[];
|
|
4
|
+
}> | undefined;
|
|
5
|
+
sizes?: {
|
|
6
|
+
[key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{
|
|
7
|
+
keys: ("container" | "icon" | "label" | "control")[];
|
|
8
|
+
}>;
|
|
9
|
+
} | undefined;
|
|
10
|
+
variants?: {
|
|
11
|
+
mobile: {
|
|
12
|
+
control: {};
|
|
13
|
+
label: {
|
|
14
|
+
fontSize: string;
|
|
15
|
+
fontWeight: number;
|
|
16
|
+
lineHeight: string;
|
|
17
|
+
padding: string;
|
|
18
|
+
};
|
|
19
|
+
height: string;
|
|
20
|
+
};
|
|
21
|
+
} | undefined;
|
|
22
|
+
defaultProps?: {
|
|
23
|
+
size?: string | number | undefined;
|
|
24
|
+
variant?: "mobile" | undefined;
|
|
25
|
+
colorScheme?: string | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
parts: ("container" | "icon" | "label" | "control")[];
|
|
28
|
+
};
|
|
29
|
+
export default _default;
|
|
@@ -24,6 +24,9 @@ declare const _default: {
|
|
|
24
24
|
border: string;
|
|
25
25
|
borderColor: string;
|
|
26
26
|
};
|
|
27
|
+
_placeholder: {
|
|
28
|
+
color: string;
|
|
29
|
+
};
|
|
27
30
|
};
|
|
28
31
|
};
|
|
29
32
|
variants: {
|
|
@@ -51,6 +54,26 @@ declare const _default: {
|
|
|
51
54
|
border: string;
|
|
52
55
|
borderColor: string;
|
|
53
56
|
};
|
|
57
|
+
_placeholder: {
|
|
58
|
+
color: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
mobile: {
|
|
63
|
+
field: {
|
|
64
|
+
fontSize: string;
|
|
65
|
+
py: string;
|
|
66
|
+
px: string;
|
|
67
|
+
cursor: string;
|
|
68
|
+
lineHeight: string;
|
|
69
|
+
fontWeight: number;
|
|
70
|
+
borderRadius: number;
|
|
71
|
+
height: string;
|
|
72
|
+
padding: string;
|
|
73
|
+
border: string;
|
|
74
|
+
borderColor: string;
|
|
75
|
+
borderLeft: string;
|
|
76
|
+
borderRight: string;
|
|
54
77
|
};
|
|
55
78
|
};
|
|
56
79
|
};
|
|
@@ -29,6 +29,9 @@ declare const _default: {
|
|
|
29
29
|
border: string;
|
|
30
30
|
borderColor: string;
|
|
31
31
|
};
|
|
32
|
+
_placeholder: {
|
|
33
|
+
color: string;
|
|
34
|
+
};
|
|
32
35
|
};
|
|
33
36
|
icon: {
|
|
34
37
|
color: string;
|
|
@@ -63,6 +66,26 @@ declare const _default: {
|
|
|
63
66
|
border: string;
|
|
64
67
|
borderColor: string;
|
|
65
68
|
};
|
|
69
|
+
_placeholder: {
|
|
70
|
+
color: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
mobile: {
|
|
75
|
+
field: {
|
|
76
|
+
fontSize: string;
|
|
77
|
+
py: string;
|
|
78
|
+
px: string;
|
|
79
|
+
cursor: string;
|
|
80
|
+
lineHeight: string;
|
|
81
|
+
fontWeight: number;
|
|
82
|
+
borderRadius: number;
|
|
83
|
+
height: string;
|
|
84
|
+
padding: string;
|
|
85
|
+
border: string;
|
|
86
|
+
borderColor: string;
|
|
87
|
+
borderLeft: string;
|
|
88
|
+
borderRight: string;
|
|
66
89
|
};
|
|
67
90
|
};
|
|
68
91
|
};
|
|
@@ -27,6 +27,84 @@ declare const _default: {
|
|
|
27
27
|
border: string;
|
|
28
28
|
borderColor: string;
|
|
29
29
|
};
|
|
30
|
+
_placeholder: {
|
|
31
|
+
color: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
variants: {
|
|
35
|
+
default: {
|
|
36
|
+
fontSize: string;
|
|
37
|
+
display: string;
|
|
38
|
+
paddingY: string;
|
|
39
|
+
paddingX: string;
|
|
40
|
+
height: string;
|
|
41
|
+
lineHeight: string;
|
|
42
|
+
h: string;
|
|
43
|
+
'::placeholder': {
|
|
44
|
+
color: string;
|
|
45
|
+
};
|
|
46
|
+
py: string;
|
|
47
|
+
px: string;
|
|
48
|
+
border: string;
|
|
49
|
+
borderColor: string;
|
|
50
|
+
_disabled: {
|
|
51
|
+
opacity: number;
|
|
52
|
+
cursor: string;
|
|
53
|
+
bg: string;
|
|
54
|
+
color: string;
|
|
55
|
+
border: string;
|
|
56
|
+
borderColor: string;
|
|
57
|
+
};
|
|
58
|
+
_focus: {
|
|
59
|
+
bg: string;
|
|
60
|
+
border: string;
|
|
61
|
+
borderColor: string;
|
|
62
|
+
};
|
|
63
|
+
_placeholder: {
|
|
64
|
+
color: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
mobile: {
|
|
68
|
+
border: string;
|
|
69
|
+
borderRadius: number;
|
|
70
|
+
paddingY: string;
|
|
71
|
+
paddingX: string;
|
|
72
|
+
cursor: string;
|
|
73
|
+
lineHeight: string;
|
|
74
|
+
fontWeight: number;
|
|
75
|
+
resize: string;
|
|
76
|
+
overflowY: string;
|
|
77
|
+
fontSize: string;
|
|
78
|
+
minHeight: string;
|
|
79
|
+
py: string;
|
|
80
|
+
px: string;
|
|
81
|
+
height: string;
|
|
82
|
+
padding: string;
|
|
83
|
+
borderColor: string;
|
|
84
|
+
borderLeft: string;
|
|
85
|
+
borderRight: string;
|
|
86
|
+
display: string;
|
|
87
|
+
h: string;
|
|
88
|
+
'::placeholder': {
|
|
89
|
+
color: string;
|
|
90
|
+
};
|
|
91
|
+
_disabled: {
|
|
92
|
+
opacity: number;
|
|
93
|
+
cursor: string;
|
|
94
|
+
bg: string;
|
|
95
|
+
color: string;
|
|
96
|
+
border: string;
|
|
97
|
+
borderColor: string;
|
|
98
|
+
};
|
|
99
|
+
_focus: {
|
|
100
|
+
bg: string;
|
|
101
|
+
border: string;
|
|
102
|
+
borderColor: string;
|
|
103
|
+
};
|
|
104
|
+
_placeholder: {
|
|
105
|
+
color: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
30
108
|
};
|
|
31
109
|
defaultProps: {
|
|
32
110
|
variant: string;
|