@xqmsg/ui-core 0.22.4 → 0.23.1-rc.0

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.
Files changed (40) hide show
  1. package/dist/components/form/FormTypes.d.ts +2 -0
  2. package/dist/components/input/StackedCheckbox/StackedCheckbox.d.ts +3 -2
  3. package/dist/components/input/StackedInput/StackedInput.d.ts +1 -0
  4. package/dist/components/input/StackedPilledInput/index.d.ts +2 -0
  5. package/dist/components/input/StackedTextarea/StackedTextarea.d.ts +3 -0
  6. package/dist/components/input/components/token/index.d.ts +1 -0
  7. package/dist/components/input/index.d.ts +3 -2
  8. package/dist/components/select/index.d.ts +27 -0
  9. package/dist/index.d.ts +1 -0
  10. package/dist/theme/components/button.d.ts +116 -0
  11. package/dist/theme/components/checkbox.d.ts +28 -0
  12. package/dist/theme/components/input.d.ts +12 -0
  13. package/dist/theme/components/select.d.ts +12 -0
  14. package/dist/theme/components/textarea.d.ts +66 -0
  15. package/dist/ui-core.cjs.development.js +328 -53
  16. package/dist/ui-core.cjs.development.js.map +1 -1
  17. package/dist/ui-core.cjs.production.min.js +1 -1
  18. package/dist/ui-core.cjs.production.min.js.map +1 -1
  19. package/dist/ui-core.esm.js +330 -56
  20. package/dist/ui-core.esm.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/components/button/Button.stories.tsx +92 -27
  23. package/src/components/form/FormTypes.ts +2 -0
  24. package/src/components/form/section/index.tsx +2 -0
  25. package/src/components/input/Input.stories.tsx +66 -0
  26. package/src/components/input/StackedCheckbox/StackedCheckbox.tsx +12 -4
  27. package/src/components/input/StackedInput/StackedInput.tsx +5 -0
  28. package/src/components/input/StackedPilledInput/index.tsx +286 -266
  29. package/src/components/input/StackedTextarea/StackedTextarea.tsx +29 -5
  30. package/src/components/input/components/dropdown/index.tsx +1 -1
  31. package/src/components/input/components/token/index.tsx +6 -5
  32. package/src/components/input/index.tsx +22 -9
  33. package/src/components/select/index.tsx +184 -0
  34. package/src/components/tabs/TabsWrapper.stories.tsx +1 -1
  35. package/src/index.tsx +3 -0
  36. package/src/theme/components/button.ts +67 -0
  37. package/src/theme/components/checkbox.ts +25 -0
  38. package/src/theme/components/input.ts +15 -1
  39. package/src/theme/components/textarea.ts +20 -0
  40. package/src/theme/customXQChakraTheme.ts +2 -0
@@ -10,6 +10,8 @@ export interface FormInput {
10
10
  maxLength?: number;
11
11
  disabled?: boolean;
12
12
  defaultValue?: string;
13
+ variant?: string;
14
+ separators?: string[];
13
15
  }
14
16
  export declare type FormStructure<K extends string | number | symbol> = {
15
17
  [key in K]: FormInput[];
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import { SelectFieldProps } from '../InputTypes';
3
- export interface StackedCheckboxProps extends SelectFieldProps {
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,7 @@ export interface StackedInputProps extends InputFieldProps {
5
5
  allowDefault?: boolean;
6
6
  leftElement?: React.ReactNode;
7
7
  rightElement?: React.ReactNode;
8
+ variant?: string;
8
9
  }
9
10
  /**
10
11
  * A functional React component utilized to render the `StackedInput` component.
@@ -6,6 +6,8 @@ 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;
9
11
  }
10
12
  /**
11
13
  * A functional React component utilized to render the `StackedPilledInput` component.
@@ -1,6 +1,9 @@
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;
4
7
  }
5
8
  /**
6
9
  * A functional React component utilized to render the `StackedTextarea` component.
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  export interface TokenProps {
3
3
  label: any;
4
4
  onDelete: any;
5
+ isMobile?: boolean;
5
6
  }
6
7
  declare const Token: React.FC<TokenProps>;
7
8
  export default Token;
@@ -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, any>;
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,122 @@ 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
+ margin: string;
133
+ fontSize: string;
134
+ fontWeight: string;
135
+ lineHeight: string;
136
+ letterSpacing: string;
137
+ textAlign: string;
138
+ boxShadow: string;
139
+ color: string;
140
+ h: string;
141
+ px: string;
142
+ py: string;
143
+ shadow: string;
144
+ _disabled: {
145
+ backgroundColor: string;
146
+ borderColor: string;
147
+ color: string;
148
+ pointerEvents: string;
149
+ };
150
+ _hover: {
151
+ bg: string;
152
+ };
153
+ _active: {
154
+ color: string;
155
+ bg: string;
156
+ bgGradient: string;
157
+ };
158
+ _focus: {
159
+ outline: string;
160
+ outlineOffset: string;
161
+ };
162
+ };
163
+ 'flat-secondary': {
164
+ fontWeight: string;
165
+ color: string;
166
+ bg: string;
167
+ _hover: {
168
+ bg: string;
169
+ };
170
+ _active: {
171
+ color: string;
172
+ bg: string;
173
+ bgGradient: string;
174
+ };
175
+ _focus: {
176
+ bg: string;
177
+ };
178
+ bgGradient: null;
179
+ minWidth: string;
180
+ padding: string;
181
+ borderRadius: string;
182
+ border: string;
183
+ gap: string;
184
+ height: string;
185
+ margin: string;
186
+ fontSize: string;
187
+ lineHeight: string;
188
+ letterSpacing: string;
189
+ textAlign: string;
190
+ boxShadow: string;
191
+ h: string;
192
+ px: string;
193
+ py: string;
194
+ shadow: string;
195
+ _disabled: {
196
+ backgroundColor: string;
197
+ borderColor: string;
198
+ color: string;
199
+ pointerEvents: string;
200
+ };
201
+ };
202
+ 'flat-tertiary': {
203
+ fontWeight: string;
204
+ color: string;
205
+ bg: string;
206
+ _hover: {
207
+ bg: string;
208
+ };
209
+ _active: {
210
+ color: string;
211
+ bg: string;
212
+ };
213
+ _focus: {
214
+ color: string;
215
+ bg: string;
216
+ };
217
+ _disabled: {
218
+ backgroundColor: string;
219
+ color: string;
220
+ };
221
+ bgGradient: null;
222
+ minWidth: string;
223
+ padding: string;
224
+ borderRadius: string;
225
+ border: string;
226
+ gap: string;
227
+ height: string;
228
+ margin: string;
229
+ fontSize: string;
230
+ lineHeight: string;
231
+ letterSpacing: string;
232
+ textAlign: string;
233
+ boxShadow: string;
234
+ h: string;
235
+ px: string;
236
+ py: string;
237
+ shadow: string;
238
+ };
123
239
  };
124
240
  defaultProps: {
125
241
  variant: string;
@@ -0,0 +1,28 @@
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
+ borderRadius: number;
14
+ padding: number;
15
+ };
16
+ label: {
17
+ fontSize: string;
18
+ };
19
+ };
20
+ } | undefined;
21
+ defaultProps?: {
22
+ size?: string | number | undefined;
23
+ variant?: "mobile" | undefined;
24
+ colorScheme?: string | undefined;
25
+ } | undefined;
26
+ parts: ("container" | "icon" | "label" | "control")[];
27
+ };
28
+ export default _default;
@@ -53,6 +53,18 @@ declare const _default: {
53
53
  };
54
54
  };
55
55
  };
56
+ mobile: {
57
+ field: {
58
+ fontSize: string;
59
+ border: string;
60
+ py: string;
61
+ px: string;
62
+ cursor: string;
63
+ lineHeight: string;
64
+ fontWeight: number;
65
+ borderRadius: number;
66
+ };
67
+ };
56
68
  };
57
69
  defaultProps: {
58
70
  variant: string;
@@ -65,6 +65,18 @@ declare const _default: {
65
65
  };
66
66
  };
67
67
  };
68
+ mobile: {
69
+ field: {
70
+ fontSize: string;
71
+ border: string;
72
+ py: string;
73
+ px: string;
74
+ cursor: string;
75
+ lineHeight: string;
76
+ fontWeight: number;
77
+ borderRadius: number;
78
+ };
79
+ };
68
80
  };
69
81
  defaultProps: {
70
82
  variant: string;
@@ -28,6 +28,72 @@ declare const _default: {
28
28
  borderColor: string;
29
29
  };
30
30
  };
31
+ variants: {
32
+ default: {
33
+ fontSize: string;
34
+ display: string;
35
+ paddingY: string;
36
+ paddingX: string;
37
+ height: string;
38
+ lineHeight: string;
39
+ h: string;
40
+ '::placeholder': {
41
+ color: string;
42
+ };
43
+ py: string;
44
+ px: string;
45
+ border: string;
46
+ borderColor: string;
47
+ _disabled: {
48
+ opacity: number;
49
+ cursor: string;
50
+ bg: string;
51
+ color: string;
52
+ border: string;
53
+ borderColor: string;
54
+ };
55
+ _focus: {
56
+ bg: string;
57
+ border: string;
58
+ borderColor: string;
59
+ };
60
+ };
61
+ mobile: {
62
+ border: string;
63
+ borderRadius: number;
64
+ paddingY: string;
65
+ paddingX: string;
66
+ padding: string;
67
+ cursor: string;
68
+ lineHeight: string;
69
+ fontWeight: number;
70
+ resize: string;
71
+ overflowY: string;
72
+ fontSize: string;
73
+ py: string;
74
+ px: string;
75
+ display: string;
76
+ height: string;
77
+ h: string;
78
+ '::placeholder': {
79
+ color: string;
80
+ };
81
+ borderColor: string;
82
+ _disabled: {
83
+ opacity: number;
84
+ cursor: string;
85
+ bg: string;
86
+ color: string;
87
+ border: string;
88
+ borderColor: string;
89
+ };
90
+ _focus: {
91
+ bg: string;
92
+ border: string;
93
+ borderColor: string;
94
+ };
95
+ };
96
+ };
31
97
  defaultProps: {
32
98
  variant: string;
33
99
  };