@xqmsg/ui-core 0.10.0 → 0.12.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 (44) hide show
  1. package/dist/components/button/index.d.ts +3 -7
  2. package/dist/components/input/Input.stories.d.ts +4 -0
  3. package/dist/components/table/TableTypes.d.ts +0 -1
  4. package/dist/components/table/{loading → components/loading}/index.d.ts +0 -0
  5. package/dist/components/table/components/text/index.d.ts +9 -0
  6. package/dist/components/table/index.d.ts +2 -4
  7. package/dist/theme/components/button.d.ts +68 -207
  8. package/dist/theme/components/table.d.ts +28 -0
  9. package/dist/theme/foundations/colors.d.ts +44 -22
  10. package/dist/ui-core.cjs.development.js +188 -390
  11. package/dist/ui-core.cjs.development.js.map +1 -1
  12. package/dist/ui-core.cjs.production.min.js +1 -1
  13. package/dist/ui-core.cjs.production.min.js.map +1 -1
  14. package/dist/ui-core.esm.js +190 -392
  15. package/dist/ui-core.esm.js.map +1 -1
  16. package/package.json +1 -2
  17. package/src/components/banner/index.tsx +7 -1
  18. package/src/components/button/Button.stories.tsx +19 -7
  19. package/src/components/button/index.tsx +7 -19
  20. package/src/components/button/spinner/index.tsx +2 -7
  21. package/src/components/input/Input.stories.tsx +45 -59
  22. package/src/components/input/StackedMultiSelect/index.tsx +11 -11
  23. package/src/components/input/StackedPilledInput/index.tsx +6 -12
  24. package/src/components/input/components/dropdown/index.tsx +3 -2
  25. package/src/components/input/index.tsx +0 -1
  26. package/src/components/loading/index.tsx +1 -1
  27. package/src/components/table/Table.stories.tsx +5 -3
  28. package/src/components/table/TableTypes.ts +0 -20
  29. package/src/components/table/{loading → components/loading}/index.tsx +8 -5
  30. package/src/components/table/components/text/index.tsx +23 -0
  31. package/src/components/table/index.tsx +4 -10
  32. package/src/components/tabs/index.tsx +1 -1
  33. package/src/components/text/index.tsx +1 -1
  34. package/src/theme/components/alert.ts +2 -2
  35. package/src/theme/components/button.ts +45 -186
  36. package/src/theme/components/input.ts +1 -1
  37. package/src/theme/components/link.ts +2 -1
  38. package/src/theme/components/table.ts +34 -0
  39. package/src/theme/components/tabs.ts +3 -3
  40. package/src/theme/customXQChakraTheme.ts +2 -2
  41. package/src/theme/foundations/colors.ts +19 -14
  42. package/src/theme/foundations/shadows.ts +3 -3
  43. package/dist/theme/components/menu.d.ts +0 -48
  44. package/src/theme/components/menu.ts +0 -70
@@ -1,20 +1,16 @@
1
1
  import React from 'react';
2
- import { ButtonProps as ChakraButtonProps } from '@chakra-ui/react';
3
2
  import buttonTheme from '../../theme/components/button';
4
3
  export interface ButtonProps {
5
4
  text: string;
6
5
  onClick?: () => void;
6
+ width: 'variable' | 'fixed';
7
7
  variant?: keyof typeof buttonTheme.variants;
8
- colorScheme?: string;
9
- type: 'button' | 'submit' | 'reset' | undefined;
8
+ type?: 'button' | 'submit' | 'reset';
10
9
  ariaLabel: string;
11
- size?: 'sm' | 'md' | 'lg' | 'xs';
12
10
  disabled?: boolean;
13
11
  className?: string;
14
- style?: React.CSSProperties;
15
- width?: string | number;
16
12
  }
17
13
  /**
18
14
  * A functional React component utilized to render the `Button` component
19
15
  */
20
- export declare const Button: React.FC<ButtonProps & ChakraButtonProps>;
16
+ export declare const Button: React.FC<ButtonProps>;
@@ -3,6 +3,10 @@ import { InputProps } from '.';
3
3
  declare const meta: Meta<InputProps<StoryFormSchema>>;
4
4
  interface StoryFormSchema {
5
5
  prop?: string;
6
+ prop2?: string;
7
+ prop3?: string;
8
+ prop4?: string;
9
+ prop5?: string;
6
10
  }
7
11
  export default meta;
8
12
  export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputProps<StoryFormSchema>>;
@@ -8,4 +8,3 @@ export declare type TableRow<K extends ReadonlyTableColumns> = {
8
8
  [k in K[number]]: ReactNode;
9
9
  };
10
10
  export declare type TableBody<R extends ReadonlyTableColumns> = TableRow<R>[];
11
- export declare type TableColorScheme = 'blue' | 'cyan' | 'gray' | 'green' | 'orange' | 'pink' | 'purple' | 'red' | 'teal' | 'yellow' | 'whiteAlpha' | 'blackAlpha' | 'linkedin' | 'facebook' | 'messenger' | 'whatsapp' | 'twitter' | 'telegram';
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export interface TableTextProps {
3
+ primaryText: string;
4
+ secondaryText?: string;
5
+ }
6
+ /**
7
+ * A functional React component utilized to render the `TableText` component
8
+ */
9
+ export declare const TableText: React.FC<TableTextProps>;
@@ -1,12 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { ReadonlyTableColumns, TableBody, TableColorScheme, TableColumns, TableHeaders } from './TableTypes';
2
+ import { ReadonlyTableColumns, TableBody, TableColumns, TableHeaders } from './TableTypes';
3
3
  export interface TableProps<T extends ReadonlyTableColumns> {
4
4
  columns: TableColumns;
5
5
  headers: TableHeaders<T>;
6
6
  body: TableBody<T>;
7
7
  loading?: boolean;
8
- variant: 'simple' | 'striped' | 'unstyled';
9
- colorScheme?: TableColorScheme;
10
8
  borderTopRadius?: boolean;
11
9
  loadMore?: () => void;
12
10
  placeholder?: string;
@@ -14,4 +12,4 @@ export interface TableProps<T extends ReadonlyTableColumns> {
14
12
  /**
15
13
  * A React component utilized to render the `Table` component
16
14
  */
17
- export declare function Table<T extends ReadonlyTableColumns>({ columns, headers, body, placeholder, loading, variant, colorScheme, borderTopRadius, loadMore, }: TableProps<T>): JSX.Element;
15
+ export declare function Table<T extends ReadonlyTableColumns>({ columns, headers, body, placeholder, loading, borderTopRadius, loadMore, }: TableProps<T>): JSX.Element;
@@ -1,231 +1,92 @@
1
- declare type Dict = Record<string, any>;
2
- declare function variantGhost(props: Dict): {
3
- color: string;
4
- _hover: {
5
- bg: string;
6
- };
7
- _active: {
8
- bg: string;
9
- };
10
- _focus: {
11
- boxShadow: string;
12
- };
13
- bg?: undefined;
14
- } | {
15
- color: string;
16
- bg: string;
17
- _hover: {
18
- bg: string;
19
- };
20
- _active: {
21
- bg: string;
22
- };
23
- _focus: {
24
- boxShadow: string;
25
- };
26
- };
27
- declare function variantOutline(props: Dict): {
28
- color: string;
29
- _hover: {
30
- bg: string;
31
- };
32
- _active: {
33
- bg: string;
34
- };
35
- _focus: {
36
- boxShadow: string;
37
- };
38
- bg?: undefined;
39
- border: string;
40
- borderColor: string;
41
- } | {
42
- color: string;
43
- bg: string;
44
- _hover: {
45
- bg: string;
46
- };
47
- _active: {
48
- bg: string;
49
- };
50
- _focus: {
51
- boxShadow: string;
52
- };
53
- border: string;
54
- borderColor: string;
55
- };
56
- declare function variantSolid(props: Dict): {
57
- color: string;
58
- bg: string;
59
- _hover: {
60
- bg: string;
61
- };
62
- _active: {
63
- bg: string;
64
- };
65
- _focus?: undefined;
66
- } | {
67
- bg: string;
68
- color: string;
69
- _hover: {
70
- bg: string;
71
- };
72
- _active: {
1
+ declare const _default: {
2
+ baseStyle: {
3
+ borderRadius: string;
4
+ fontSize: string;
73
5
  bg: string;
74
- };
75
- _focus: {
76
- boxShadow: string;
77
- };
78
- };
79
- /**
80
- * A variant that displays a solid variant when an active CSS class is
81
- * detected, otherwise display a ghost variant. This is useful for pill nav filters.
82
- */
83
- declare function variantActiveSolid(props: Dict): {
84
- '&.active': {
85
6
  color: string;
86
- bg: string;
87
- _hover: {
88
- bg: string;
89
- };
90
- _active: {
91
- bg: string;
7
+ px: string;
8
+ py: string;
9
+ bgGradient: string;
10
+ shadow: string;
11
+ _disabled: {
12
+ backgroundColor: string;
13
+ borderColor: string;
14
+ color: string;
15
+ pointerEvents: string;
92
16
  };
93
- _focus?: undefined;
94
- } | {
95
- bg: string;
96
- color: string;
97
17
  _hover: {
98
18
  bg: string;
99
19
  };
100
20
  _active: {
21
+ color: string;
101
22
  bg: string;
23
+ bgGradient: string;
102
24
  };
103
25
  _focus: {
104
- boxShadow: string;
105
- };
106
- };
107
- color: string;
108
- _hover: {
109
- bg: string;
110
- };
111
- _active: {
112
- bg: string;
113
- };
114
- _focus: {
115
- boxShadow: string;
116
- };
117
- bg?: undefined;
118
- } | {
119
- '&.active': {
120
- color: string;
121
- bg: string;
122
- _hover: {
123
- bg: string;
124
- };
125
- _active: {
126
26
  bg: string;
127
- };
128
- _focus?: undefined;
129
- } | {
130
- bg: string;
131
- color: string;
132
- _hover: {
133
- bg: string;
134
- };
135
- _active: {
136
- bg: string;
137
- };
138
- _focus: {
139
- boxShadow: string;
140
- };
141
- };
142
- color: string;
143
- bg: string;
144
- _hover: {
145
- bg: string;
146
- };
147
- _active: {
148
- bg: string;
149
- };
150
- _focus: {
151
- boxShadow: string;
152
- };
153
- };
154
- declare function variantLink(props: Dict): {
155
- padding: number;
156
- height: string;
157
- lineHeight: string;
158
- color: string;
159
- _hover: {
160
- textDecoration: string;
161
- };
162
- _active: {
163
- color: string;
164
- };
165
- };
166
- declare const _default: {
167
- baseStyle: {
168
- lineHeight: number;
169
- borderRadius: string;
170
- fontWeight: string;
171
- _focus: {
172
- boxShadow: string;
173
- };
174
- _disabled: {
175
- opacity: number;
176
- cursor: string;
177
- boxShadow: string;
27
+ border: string;
178
28
  };
179
29
  };
180
30
  variants: {
181
- ghost: typeof variantGhost;
182
- outline: typeof variantOutline;
183
- solid: typeof variantSolid;
184
- activeSolid: typeof variantActiveSolid;
185
- link: typeof variantLink;
186
- unstyled: {
187
- bg: string;
188
- color: string;
189
- display: string;
190
- lineHeight: string;
191
- m: number;
192
- p: number;
193
- };
194
- };
195
- sizes: {
196
- lg: {
197
- borderRadius: string;
198
- h: number;
199
- minW: number;
200
- fontSize: string;
201
- px: number;
202
- };
203
- md: {
204
- borderRadius: string;
205
- h: number;
206
- minW: number;
207
- fontSize: string;
208
- px: number;
209
- };
210
- sm: {
31
+ solid: {
211
32
  borderRadius: string;
212
- h: number;
213
- minW: number;
214
33
  fontSize: string;
215
- px: number;
216
- };
217
- xs: {
34
+ bg: string;
35
+ color: string;
36
+ px: string;
37
+ py: string;
38
+ bgGradient: string;
39
+ shadow: string;
40
+ _disabled: {
41
+ backgroundColor: string;
42
+ borderColor: string;
43
+ color: string;
44
+ pointerEvents: string;
45
+ };
46
+ _hover: {
47
+ bg: string;
48
+ };
49
+ _active: {
50
+ color: string;
51
+ bg: string;
52
+ bgGradient: string;
53
+ };
54
+ _focus: {
55
+ bg: string;
56
+ border: string;
57
+ };
58
+ };
59
+ outline: {
60
+ color: string;
61
+ bg: string;
62
+ border: string;
63
+ _hover: {
64
+ bg: string;
65
+ };
66
+ _active: {
67
+ color: string;
68
+ bg: string;
69
+ bgGradient: string;
70
+ };
71
+ _focus: {
72
+ bg: string;
73
+ };
218
74
  borderRadius: string;
219
- h: number;
220
- minW: number;
221
75
  fontSize: string;
222
- px: number;
76
+ px: string;
77
+ py: string;
78
+ bgGradient: string;
79
+ shadow: string;
80
+ _disabled: {
81
+ backgroundColor: string;
82
+ borderColor: string;
83
+ color: string;
84
+ pointerEvents: string;
85
+ };
223
86
  };
224
87
  };
225
88
  defaultProps: {
226
- variant: string;
227
- size: string;
228
- colorScheme: string;
89
+ solid: string;
229
90
  };
230
91
  };
231
92
  export default _default;
@@ -0,0 +1,28 @@
1
+ declare const _default: {
2
+ parts: string[];
3
+ baseStyle: {
4
+ th: {
5
+ height: string;
6
+ width: string;
7
+ bg: string;
8
+ padding: string;
9
+ };
10
+ tr: {
11
+ fontSize: string;
12
+ display: string;
13
+ alignItems: string;
14
+ width: string;
15
+ height: string;
16
+ borderRadius: string;
17
+ _odd: {
18
+ background: string;
19
+ };
20
+ };
21
+ td: {
22
+ padding: string;
23
+ borderRadius: string;
24
+ width: string;
25
+ };
26
+ };
27
+ };
28
+ export default _default;
@@ -26,12 +26,31 @@ declare const colors: {
26
26
  default: string;
27
27
  };
28
28
  fill: {
29
- light: string;
30
- positive: string;
29
+ light: {
30
+ primary: string;
31
+ secondary: string;
32
+ tertiary: string;
33
+ quaternary: string;
34
+ };
35
+ success: string;
31
36
  error: string;
32
37
  warning: string;
33
- blue: string;
38
+ action: string;
34
39
  };
40
+ semantic: {
41
+ action: string;
42
+ success: string;
43
+ warning: string;
44
+ error: string;
45
+ };
46
+ transparent: string;
47
+ current: string;
48
+ black: string;
49
+ white: string;
50
+ lightBlue: string;
51
+ coolGray: string;
52
+ darkBlue: string;
53
+ backdrop: string;
35
54
  whiteAlpha: {
36
55
  50: string;
37
56
  100: string;
@@ -72,14 +91,6 @@ declare const colors: {
72
91
  orange: ColorHues;
73
92
  green: ColorHues;
74
93
  blue: ColorHues;
75
- transparent: string;
76
- current: string;
77
- black: string;
78
- white: string;
79
- lightBlue: string;
80
- coolGray: string;
81
- darkBlue: string;
82
- backdrop: string;
83
94
  };
84
95
  export declare type Colors = typeof colors;
85
96
  declare const _default: {
@@ -98,12 +109,31 @@ declare const _default: {
98
109
  default: string;
99
110
  };
100
111
  fill: {
101
- light: string;
102
- positive: string;
112
+ light: {
113
+ primary: string;
114
+ secondary: string;
115
+ tertiary: string;
116
+ quaternary: string;
117
+ };
118
+ success: string;
103
119
  error: string;
104
120
  warning: string;
105
- blue: string;
121
+ action: string;
106
122
  };
123
+ semantic: {
124
+ action: string;
125
+ success: string;
126
+ warning: string;
127
+ error: string;
128
+ };
129
+ transparent: string;
130
+ current: string;
131
+ black: string;
132
+ white: string;
133
+ lightBlue: string;
134
+ coolGray: string;
135
+ darkBlue: string;
136
+ backdrop: string;
107
137
  whiteAlpha: {
108
138
  50: string;
109
139
  100: string;
@@ -144,13 +174,5 @@ declare const _default: {
144
174
  orange: ColorHues;
145
175
  green: ColorHues;
146
176
  blue: ColorHues;
147
- transparent: string;
148
- current: string;
149
- black: string;
150
- white: string;
151
- lightBlue: string;
152
- coolGray: string;
153
- darkBlue: string;
154
- backdrop: string;
155
177
  };
156
178
  export default _default;