@xqmsg/ui-core 0.12.0 → 0.14.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.
- package/dist/components/form/Form.stories.d.ts +1 -1
- package/dist/components/form/hooks/useFormHandler.d.ts +1 -1
- package/dist/components/input/Input.stories.d.ts +1 -0
- package/dist/components/input/StackedSelect/StackedSelect.d.ts +1 -0
- package/dist/components/input/index.d.ts +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/theme/components/form-error.d.ts +2 -0
- package/dist/theme/components/form.d.ts +2 -0
- package/dist/theme/components/table.d.ts +4 -1
- package/dist/theme/foundations/colors.d.ts +1 -1
- package/dist/ui-core.cjs.development.js +127 -95
- 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 +238 -207
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +8 -7
- package/src/components/banner/index.tsx +1 -1
- package/src/components/form/Form.stories.tsx +4 -4
- package/src/components/form/hooks/useFormHandler.tsx +2 -2
- package/src/components/form/section/FormSection.stories.tsx +1 -1
- package/src/components/form/section/index.tsx +4 -3
- package/src/components/input/Input.stories.tsx +9 -1
- package/src/components/input/StackedPilledInput/index.tsx +12 -1
- package/src/components/input/StackedSelect/StackedSelect.tsx +21 -4
- package/src/components/input/StackedSwitch/index.tsx +0 -2
- package/src/components/input/components/dropdown/index.tsx +1 -1
- package/src/components/input/components/label/index.tsx +1 -1
- package/src/components/input/components/token/index.tsx +2 -2
- package/src/components/input/index.tsx +8 -9
- package/src/components/table/components/text/index.tsx +1 -1
- package/src/components/table/index.tsx +2 -1
- package/src/index.tsx +3 -0
- package/src/theme/components/form-error.ts +2 -0
- package/src/theme/components/form.ts +2 -0
- package/src/theme/components/table.ts +5 -5
- package/src/theme/foundations/colors.ts +1 -1
- package/src/theme/provider/index.tsx +6 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormEvent } from 'react';
|
|
2
2
|
import { DeepPartial, FieldValues, UseFormReturn, ValidationMode } from 'react-hook-form';
|
|
3
3
|
import * as Yup from 'yup';
|
|
4
|
-
import { ErrorResponse } from 'src/components/form/utils/formErrors';
|
|
4
|
+
import { ErrorResponse } from '../../../../src/components/form/utils/formErrors';
|
|
5
5
|
export declare type FormHandler<T extends FieldValues> = {
|
|
6
6
|
form: UseFormReturn<T, any>;
|
|
7
7
|
error?: ErrorResponse;
|
|
@@ -7,6 +7,7 @@ interface StoryFormSchema {
|
|
|
7
7
|
prop3?: string;
|
|
8
8
|
prop4?: string;
|
|
9
9
|
prop5?: string;
|
|
10
|
+
prop6?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export default meta;
|
|
12
13
|
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, InputProps<StoryFormSchema>>;
|
|
@@ -6,6 +6,7 @@ export interface StackedSelectProps extends StackedInputProps {
|
|
|
6
6
|
options: FieldOptions;
|
|
7
7
|
setValue: UseFormSetValue<FieldValues>;
|
|
8
8
|
control: Control<FieldValues, any>;
|
|
9
|
+
handleOnChange: (value?: string) => void;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
12
|
* A functional React component utilized to render the `StackedSelect` component.
|
|
@@ -12,10 +12,10 @@ export interface InputProps<T extends FieldValues> extends ValidationProps {
|
|
|
12
12
|
options?: FieldOptions;
|
|
13
13
|
maxLength?: number;
|
|
14
14
|
helperText?: React.ReactNode;
|
|
15
|
-
control
|
|
16
|
-
onChange?: (
|
|
15
|
+
control: Control<T, any>;
|
|
16
|
+
onChange?: (value?: string) => void;
|
|
17
17
|
disabled?: boolean;
|
|
18
|
-
setValue
|
|
18
|
+
setValue: UseFormSetValue<T>;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* A functional React component utilized to render the `Input` component. Utilizes a switch statement
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
parts: string[];
|
|
3
3
|
baseStyle: {
|
|
4
|
+
thead: {
|
|
5
|
+
bg: string;
|
|
6
|
+
};
|
|
4
7
|
th: {
|
|
5
8
|
height: string;
|
|
6
9
|
width: string;
|
|
@@ -15,7 +18,7 @@ declare const _default: {
|
|
|
15
18
|
height: string;
|
|
16
19
|
borderRadius: string;
|
|
17
20
|
_odd: {
|
|
18
|
-
|
|
21
|
+
bg: string;
|
|
19
22
|
};
|
|
20
23
|
};
|
|
21
24
|
td: {
|
|
@@ -7,78 +7,19 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var React__default = _interopDefault(React);
|
|
9
9
|
var react = require('@chakra-ui/react');
|
|
10
|
-
var colors$1 = _interopDefault(require('src/theme/foundations/colors'));
|
|
11
10
|
var reactHookForm = require('react-hook-form');
|
|
12
11
|
var icons = require('@chakra-ui/icons');
|
|
13
12
|
var hi = require('react-icons/hi');
|
|
14
13
|
var themeTools = require('@chakra-ui/theme-tools');
|
|
15
14
|
var system = require('@chakra-ui/system');
|
|
16
15
|
|
|
17
|
-
var ErrorIcon = "
|
|
16
|
+
var ErrorIcon = "data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5.5%205.5L8.5%208.5M8.5%205.5L5.5%208.5M13%207C13%2010.3137%2010.3137%2013%207%2013C3.68629%2013%201%2010.3137%201%207C1%203.68629%203.68629%201%207%201C10.3137%201%2013%203.68629%2013%207Z%22%20stroke%3D%22%23F96057%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
|
|
18
17
|
|
|
19
|
-
var PositiveIcon = "
|
|
18
|
+
var PositiveIcon = "data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%207.5L6.5%209L9%205.5M13%207C13%2010.3137%2010.3137%2013%207%2013C3.68629%2013%201%2010.3137%201%207C1%203.68629%203.68629%201%207%201C10.3137%201%2013%203.68629%2013%207Z%22%20stroke%3D%22%2334C759%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
|
|
20
19
|
|
|
21
|
-
var NeutralIcon = "
|
|
20
|
+
var NeutralIcon = "data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7%204.5V4C6.72386%204%206.5%204.22386%206.5%204.5H7ZM7.005%204.5H7.505C7.505%204.22386%207.28114%204%207.005%204V4.5ZM7.005%204.505V5.005C7.28114%205.005%207.505%204.78114%207.505%204.505H7.005ZM7%204.505H6.5C6.5%204.78114%206.72386%205.005%207%205.005V4.505ZM6.27639%206.05279C6.0294%206.17628%205.92929%206.47662%206.05279%206.72361C6.17628%206.9706%206.47662%207.07071%206.72361%206.94721L6.27639%206.05279ZM6.52766%206.48617L6.30405%206.03896L6.52766%206.48617ZM7.23634%207.05465L7.72141%207.17592L7.23634%207.05465ZM6.76366%208.94535L6.27859%208.82408L6.76366%208.94535ZM7.47234%209.51383L7.69595%209.96104L7.69595%209.96104L7.47234%209.51383ZM7.72361%209.94721C7.9706%209.82371%208.07071%209.52337%207.94721%209.27639C7.82371%209.0294%207.52337%208.92929%207.27639%209.05279L7.72361%209.94721ZM12.5%207C12.5%2010.0376%2010.0376%2012.5%207%2012.5V13.5C10.5899%2013.5%2013.5%2010.5899%2013.5%207H12.5ZM7%2012.5C3.96243%2012.5%201.5%2010.0376%201.5%207H0.5C0.5%2010.5899%203.41015%2013.5%207%2013.5V12.5ZM1.5%207C1.5%203.96243%203.96243%201.5%207%201.5V0.5C3.41015%200.5%200.5%203.41015%200.5%207H1.5ZM7%201.5C10.0376%201.5%2012.5%203.96243%2012.5%207H13.5C13.5%203.41015%2010.5899%200.5%207%200.5V1.5ZM7%205H7.005V4H7V5ZM6.505%204.5V4.505H7.505V4.5H6.505ZM7.005%204.005H7V5.005H7.005V4.005ZM7.5%204.505V4.5H6.5V4.505H7.5ZM6.72361%206.94721L6.75127%206.93338L6.30405%206.03896L6.27639%206.05279L6.72361%206.94721ZM6.75127%206.93338L6.27859%208.82408L7.24873%209.06662L7.72141%207.17592L6.75127%206.93338ZM7.69595%209.96104L7.72361%209.94721L7.27639%209.05279L7.24873%209.06662L7.69595%209.96104ZM6.27859%208.82408C6.07138%209.65293%206.93179%2010.3431%207.69595%209.96104L7.24873%209.06662L6.27859%208.82408ZM6.75127%206.93338L7.72141%207.17592C7.92862%206.34708%207.06821%205.65688%206.30405%206.03896L6.75127%206.93338Z%22%20fill%3D%22%233C3C43%22%20fill-opacity%3D%220.6%22%2F%3E%3C%2Fsvg%3E";
|
|
22
21
|
|
|
23
|
-
var WarningIcon = "
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* A functional React component utilized to render the `Banner` component
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
var Banner = function Banner(_ref) {
|
|
30
|
-
var variant = _ref.variant,
|
|
31
|
-
message = _ref.message,
|
|
32
|
-
buttonText = _ref.buttonText,
|
|
33
|
-
onClick = _ref.onClick;
|
|
34
|
-
var Icon = React.useMemo(function () {
|
|
35
|
-
switch (variant) {
|
|
36
|
-
case 'error':
|
|
37
|
-
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
38
|
-
src: ErrorIcon,
|
|
39
|
-
alt: "error",
|
|
40
|
-
boxSize: "16px"
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
case 'neutral':
|
|
44
|
-
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
45
|
-
src: NeutralIcon,
|
|
46
|
-
alt: "neutral",
|
|
47
|
-
boxSize: "16px"
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
case 'positive':
|
|
51
|
-
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
52
|
-
src: PositiveIcon,
|
|
53
|
-
alt: "positive",
|
|
54
|
-
boxSize: "16px"
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
case 'warning':
|
|
58
|
-
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
59
|
-
src: WarningIcon,
|
|
60
|
-
alt: "warning",
|
|
61
|
-
boxSize: "16px"
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
default:
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
}, [variant]);
|
|
68
|
-
return /*#__PURE__*/React__default.createElement(react.Alert, {
|
|
69
|
-
variant: variant
|
|
70
|
-
}, /*#__PURE__*/React__default.createElement(react.AlertDescription, null, /*#__PURE__*/React__default.createElement(react.Box, {
|
|
71
|
-
pb: "8px"
|
|
72
|
-
}, Icon), message, onClick && buttonText && /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
73
|
-
pt: "8px",
|
|
74
|
-
justifyContent: "flex-end"
|
|
75
|
-
}, /*#__PURE__*/React__default.createElement(react.Button, {
|
|
76
|
-
size: "sm",
|
|
77
|
-
bg: "white",
|
|
78
|
-
color: colors$1.fill.action,
|
|
79
|
-
onClick: onClick
|
|
80
|
-
}, buttonText))));
|
|
81
|
-
};
|
|
22
|
+
var WarningIcon = "data:image/svg+xml,%3Csvg%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2014%2014%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7%205V7.5M13%207C13%2010.3137%2010.3137%2013%207%2013C3.68629%2013%201%2010.3137%201%207C1%203.68629%203.68629%201%207%201C10.3137%201%2013%203.68629%2013%207ZM7%209.5H7.005V9.505H7V9.5Z%22%20stroke%3D%22%23F8CE52%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
|
|
82
23
|
|
|
83
24
|
var blue = {
|
|
84
25
|
50: 'hsl(209, 100%, 95%)',
|
|
@@ -215,6 +156,64 @@ var colors = {
|
|
|
215
156
|
blue: blue
|
|
216
157
|
};
|
|
217
158
|
|
|
159
|
+
/**
|
|
160
|
+
* A functional React component utilized to render the `Banner` component
|
|
161
|
+
*/
|
|
162
|
+
|
|
163
|
+
var Banner = function Banner(_ref) {
|
|
164
|
+
var variant = _ref.variant,
|
|
165
|
+
message = _ref.message,
|
|
166
|
+
buttonText = _ref.buttonText,
|
|
167
|
+
onClick = _ref.onClick;
|
|
168
|
+
var Icon = React.useMemo(function () {
|
|
169
|
+
switch (variant) {
|
|
170
|
+
case 'error':
|
|
171
|
+
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
172
|
+
src: ErrorIcon,
|
|
173
|
+
alt: "error",
|
|
174
|
+
boxSize: "16px"
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
case 'neutral':
|
|
178
|
+
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
179
|
+
src: NeutralIcon,
|
|
180
|
+
alt: "neutral",
|
|
181
|
+
boxSize: "16px"
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
case 'positive':
|
|
185
|
+
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
186
|
+
src: PositiveIcon,
|
|
187
|
+
alt: "positive",
|
|
188
|
+
boxSize: "16px"
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
case 'warning':
|
|
192
|
+
return /*#__PURE__*/React__default.createElement(react.Image, {
|
|
193
|
+
src: WarningIcon,
|
|
194
|
+
alt: "warning",
|
|
195
|
+
boxSize: "16px"
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
default:
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
}, [variant]);
|
|
202
|
+
return /*#__PURE__*/React__default.createElement(react.Alert, {
|
|
203
|
+
variant: variant
|
|
204
|
+
}, /*#__PURE__*/React__default.createElement(react.AlertDescription, null, /*#__PURE__*/React__default.createElement(react.Box, {
|
|
205
|
+
pb: "8px"
|
|
206
|
+
}, Icon), message, onClick && buttonText && /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
207
|
+
pt: "8px",
|
|
208
|
+
justifyContent: "flex-end"
|
|
209
|
+
}, /*#__PURE__*/React__default.createElement(react.Button, {
|
|
210
|
+
size: "sm",
|
|
211
|
+
bg: "white",
|
|
212
|
+
color: colors.fill.action,
|
|
213
|
+
onClick: onClick
|
|
214
|
+
}, buttonText))));
|
|
215
|
+
};
|
|
216
|
+
|
|
218
217
|
/**
|
|
219
218
|
* A functional React component utilized to render the `Icon` for the `Breadcrumbs` component.
|
|
220
219
|
*/
|
|
@@ -328,7 +327,7 @@ var Button = function Button(_ref) {
|
|
|
328
327
|
}, text);
|
|
329
328
|
};
|
|
330
329
|
|
|
331
|
-
var GoogleLogo = "
|
|
330
|
+
var GoogleLogo = "data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20533.5%20544.3%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20%20%20%20d%3D%22M533.5%20278.4c0-18.5-1.5-37.1-4.7-55.3H272.1v104.8h147c-6.1%2033.8-25.7%2063.7-54.4%2082.7v68h87.7c51.5-47.4%2081.1-117.4%2081.1-200.2z%22%20%20%20%20fill%3D%22%234285f4%22%20%20%2F%3E%3Cpath%20%20%20%20d%3D%22M272.1%20544.3c73.4%200%20135.3-24.1%20180.4-65.7l-87.7-68c-24.4%2016.6-55.9%2026-92.6%2026-71%200-131.2-47.9-152.8-112.3H28.9v70.1c46.2%2091.9%20140.3%20149.9%20243.2%20149.9z%22%20%20%20%20fill%3D%22%2334a853%22%20%20%2F%3E%3Cpath%20%20%20%20d%3D%22M119.3%20324.3c-11.4-33.8-11.4-70.4%200-104.2V150H28.9c-38.6%2076.9-38.6%20167.5%200%20244.4l90.4-70.1z%22%20%20%20%20fill%3D%22%23fbbc04%22%20%20%2F%3E%3Cpath%20%20%20%20d%3D%22M272.1%20107.7c38.8-.6%2076.3%2014%20104.4%2040.8l77.7-77.7C405%2024.6%20339.7-.8%20272.1%200%20169.2%200%2075.1%2058%2028.9%20150l90.4%2070.1c21.5-64.5%2081.8-112.4%20152.8-112.4z%22%20%20%20%20fill%3D%22%23ea4335%22%20%20%2F%3E%3C%2Fsvg%3E";
|
|
332
331
|
|
|
333
332
|
/**
|
|
334
333
|
* A functional React component utilized to render the `GoogleButton` component
|
|
@@ -496,7 +495,7 @@ var StackedRadioGroup = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
496
495
|
})));
|
|
497
496
|
});
|
|
498
497
|
|
|
499
|
-
var SubtractIcon = "
|
|
498
|
+
var SubtractIcon = "data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M2%2012C0.89543%2012%20-3.91405e-08%2011.1046%20-8.74228e-08%2010L-4.37114e-07%202C-4.85396e-07%200.895431%200.89543%20-3.91405e-08%202%20-8.74228e-08L10%20-4.37114e-07C11.1046%20-4.85396e-07%2012%200.89543%2012%202L12%2010C12%2011.1046%2011.1046%2012%2010%2012L2%2012ZM6%202.5C6.13261%202.5%206.25979%202.55268%206.35355%202.64645L7.85355%204.14645C8.04881%204.34171%208.04881%204.65829%207.85355%204.85355C7.65829%205.04882%207.34171%205.04882%207.14645%204.85355L6%203.70711L4.85355%204.85355C4.65829%205.04882%204.34171%205.04882%204.14645%204.85355C3.95118%204.65829%203.95118%204.34171%204.14645%204.14645L5.64645%202.64645C5.74021%202.55268%205.86739%202.5%206%202.5ZM5.64645%209.35355C5.74021%209.44732%205.86739%209.5%206%209.5C6.13261%209.5%206.25978%209.44732%206.35355%209.35355L7.85355%207.85355C8.04882%207.65829%208.04882%207.34171%207.85355%207.14645C7.65829%206.95118%207.34171%206.95118%207.14645%207.14645L6%208.29289L4.85355%207.14645C4.65829%206.95118%204.34171%206.95118%204.14645%207.14645C3.95118%207.34171%203.95118%207.65829%204.14645%207.85355L5.64645%209.35355Z%22%20fill%3D%22%230082FF%22%2F%3E%3C%2Fsvg%3E";
|
|
500
499
|
|
|
501
500
|
/**
|
|
502
501
|
* A functional React component utilized to render the `Dropdown` component
|
|
@@ -508,14 +507,14 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
508
507
|
var DropdownContent = React.useMemo(function () {
|
|
509
508
|
return options.map(function (option, idx) {
|
|
510
509
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, option.value === 'section_header' && options[idx + 1] && options[idx + 1].value !== 'section_header' && /*#__PURE__*/React__default.createElement(react.Box, {
|
|
511
|
-
color: colors
|
|
510
|
+
color: colors.label.secondary.light,
|
|
512
511
|
fontSize: "13px",
|
|
513
512
|
fontWeight: "bold",
|
|
514
513
|
px: "8px"
|
|
515
514
|
}, idx > 0 && /*#__PURE__*/React__default.createElement(react.Box, {
|
|
516
515
|
my: "3px",
|
|
517
516
|
borderTop: "2px solid",
|
|
518
|
-
borderColor: colors
|
|
517
|
+
borderColor: colors.border["default"]
|
|
519
518
|
}), option.label), option.value !== 'section_header' && /*#__PURE__*/React__default.createElement(react.Box, {
|
|
520
519
|
cursor: "pointer",
|
|
521
520
|
borderRadius: "inherit",
|
|
@@ -526,17 +525,17 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
526
525
|
fontSize: "13px",
|
|
527
526
|
px: "8px",
|
|
528
527
|
py: "4px",
|
|
529
|
-
color: colors
|
|
528
|
+
color: colors.label.primary.light,
|
|
530
529
|
_hover: {
|
|
531
|
-
color: colors
|
|
532
|
-
bg: colors
|
|
530
|
+
color: colors.label.primary.dark,
|
|
531
|
+
bg: colors.fill.action,
|
|
533
532
|
borderRadius: '4px'
|
|
534
533
|
}
|
|
535
534
|
}, option.label));
|
|
536
535
|
});
|
|
537
536
|
}, [onSelectItem, options]);
|
|
538
537
|
return /*#__PURE__*/React__default.createElement(react.Box, {
|
|
539
|
-
bg: colors
|
|
538
|
+
bg: colors.fill.light.quaternary,
|
|
540
539
|
backdropFilter: "blur(64px)",
|
|
541
540
|
borderRadius: "4px",
|
|
542
541
|
mt: "3px",
|
|
@@ -550,16 +549,20 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
550
549
|
}, DropdownContent);
|
|
551
550
|
};
|
|
552
551
|
|
|
553
|
-
var _excluded$1 = ["isRequired", "options", "name", "setValue", "
|
|
552
|
+
var _excluded$1 = ["isRequired", "options", "name", "setValue", "handleOnChange", "defaultValue"];
|
|
554
553
|
/**
|
|
555
554
|
* A functional React component utilized to render the `StackedSelect` component.
|
|
556
555
|
*/
|
|
557
556
|
|
|
558
557
|
var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
558
|
+
var _options$find$label, _options$find;
|
|
559
|
+
|
|
559
560
|
var isRequired = _ref2.isRequired,
|
|
560
561
|
options = _ref2.options,
|
|
561
562
|
name = _ref2.name,
|
|
562
563
|
setValue = _ref2.setValue,
|
|
564
|
+
handleOnChange = _ref2.handleOnChange,
|
|
565
|
+
defaultValue = _ref2.defaultValue,
|
|
563
566
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
|
|
564
567
|
|
|
565
568
|
var dropdownRef = React.useRef(null);
|
|
@@ -568,7 +571,9 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
568
571
|
isFocussed = _useState[0],
|
|
569
572
|
setIsFocussed = _useState[1];
|
|
570
573
|
|
|
571
|
-
var _useState2 = React.useState(
|
|
574
|
+
var _useState2 = React.useState((_options$find$label = (_options$find = options.find(function (option) {
|
|
575
|
+
return option.value === defaultValue;
|
|
576
|
+
})) == null ? void 0 : _options$find.label) != null ? _options$find$label : ''),
|
|
572
577
|
selectedOption = _useState2[0],
|
|
573
578
|
setSelectedOption = _useState2[1];
|
|
574
579
|
|
|
@@ -580,6 +585,10 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
580
585
|
});
|
|
581
586
|
|
|
582
587
|
var handleOnSelectItem = function handleOnSelectItem(option) {
|
|
588
|
+
if (handleOnChange) {
|
|
589
|
+
handleOnChange(option.value);
|
|
590
|
+
}
|
|
591
|
+
|
|
583
592
|
setValue(name, option.value);
|
|
584
593
|
setSelectedOption(option.label);
|
|
585
594
|
setIsFocussed(false);
|
|
@@ -598,7 +607,7 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
598
607
|
cursor: "pointer",
|
|
599
608
|
color: "transparent",
|
|
600
609
|
fontSize: "13px",
|
|
601
|
-
textShadow: "0 0 0 " + colors
|
|
610
|
+
textShadow: "0 0 0 " + colors.label.primary.light,
|
|
602
611
|
value: selectedOption
|
|
603
612
|
})), /*#__PURE__*/React__default.createElement(react.InputRightElement, {
|
|
604
613
|
cursor: "pointer",
|
|
@@ -629,7 +638,7 @@ var StackedTextarea = /*#__PURE__*/React__default.forwardRef(function (_ref2, _r
|
|
|
629
638
|
}, props));
|
|
630
639
|
});
|
|
631
640
|
|
|
632
|
-
var CloseIcon = "
|
|
641
|
+
var CloseIcon = "data:image/svg+xml,%3Csvg%20width%3D%2256%22%20height%3D%2256%22%20viewBox%3D%220%200%2056%2056%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M27.9995%2056C43.4635%2056%2055.9995%2043.464%2055.9995%2028C55.9995%2012.536%2043.4635%200%2027.9995%200C12.5355%200%20-0.000488281%2012.536%20-0.000488281%2028C-0.000488281%2043.464%2012.5355%2056%2027.9995%2056ZM21.9807%2018.2688C20.9555%2017.2437%2019.2935%2017.2437%2018.2684%2018.2688C17.2432%2019.294%2017.2432%2020.956%2018.2684%2021.9812L24.2872%2028L18.2684%2034.0188C17.2432%2035.044%2017.2432%2036.706%2018.2684%2037.7312C19.2935%2038.7563%2020.9555%2038.7563%2021.9807%2037.7312L27.9995%2031.7123L34.0184%2037.7312C35.0435%2038.7563%2036.7055%2038.7563%2037.7307%2037.7312C38.7558%2036.706%2038.7558%2035.044%2037.7307%2034.0188L31.7118%2028L37.7307%2021.9812C38.7558%2020.956%2038.7558%2019.294%2037.7307%2018.2688C36.7055%2017.2437%2035.0435%2017.2437%2034.0184%2018.2688L27.9995%2024.2877L21.9807%2018.2688Z%22%20fill%3D%22%233C3C43%22%20fill-opacity%3D%220.6%22%2F%3E%3C%2Fsvg%3E";
|
|
633
642
|
|
|
634
643
|
var Token = function Token(_ref) {
|
|
635
644
|
var label = _ref.label,
|
|
@@ -639,12 +648,12 @@ var Token = function Token(_ref) {
|
|
|
639
648
|
borderRadius: "full",
|
|
640
649
|
backgroundColor: "#7676801F",
|
|
641
650
|
alignItems: "center",
|
|
642
|
-
width
|
|
651
|
+
// width="100%"
|
|
643
652
|
pl: "8px",
|
|
644
653
|
pr: "4px",
|
|
645
654
|
py: "2px"
|
|
646
655
|
}, /*#__PURE__*/React__default.createElement(react.Text, {
|
|
647
|
-
color: colors
|
|
656
|
+
color: colors.label.primary.light,
|
|
648
657
|
fontSize: "13px"
|
|
649
658
|
}, label), /*#__PURE__*/React__default.createElement(react.Image, {
|
|
650
659
|
pl: "4px",
|
|
@@ -957,7 +966,14 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
957
966
|
}, /*#__PURE__*/React__default.createElement(react.Flex, {
|
|
958
967
|
height: "28px",
|
|
959
968
|
alignItems: "center",
|
|
960
|
-
width
|
|
969
|
+
// width="fit-content"
|
|
970
|
+
// maxW="70%"
|
|
971
|
+
overflowX: "auto",
|
|
972
|
+
style: {
|
|
973
|
+
scrollbarWidth: 'none'
|
|
974
|
+
/* Firefox */
|
|
975
|
+
|
|
976
|
+
}
|
|
961
977
|
}, lastestFormValueToArray.length ? lastestFormValueToArray.map(function (label, index) {
|
|
962
978
|
return /*#__PURE__*/React__default.createElement(react.Box, {
|
|
963
979
|
mr: "4px",
|
|
@@ -965,7 +981,9 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
965
981
|
borderRadius: "full",
|
|
966
982
|
onClick: function onClick() {
|
|
967
983
|
return setTokenIndex(index);
|
|
968
|
-
}
|
|
984
|
+
},
|
|
985
|
+
// width="fit-content"
|
|
986
|
+
width: "100%"
|
|
969
987
|
}, /*#__PURE__*/React__default.createElement(Token, {
|
|
970
988
|
label: label,
|
|
971
989
|
onDelete: function onDelete(e) {
|
|
@@ -1009,7 +1027,6 @@ var StackedSwitch = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1009
1027
|
var isRequired = _ref2.isRequired,
|
|
1010
1028
|
_onChange = _ref2.onChange,
|
|
1011
1029
|
value = _ref2.value;
|
|
1012
|
-
if (value === undefined) return null;
|
|
1013
1030
|
return /*#__PURE__*/React__default.createElement(react.Switch, {
|
|
1014
1031
|
size: "lg",
|
|
1015
1032
|
ref: _ref,
|
|
@@ -1031,7 +1048,7 @@ var Label$1 = function Label(_ref) {
|
|
|
1031
1048
|
label = _ref.label;
|
|
1032
1049
|
return /*#__PURE__*/React__default.createElement(react.FormLabel, null, label, isRequired && /*#__PURE__*/React__default.createElement(react.Box, {
|
|
1033
1050
|
ml: 1,
|
|
1034
|
-
color: colors
|
|
1051
|
+
color: colors.label.error
|
|
1035
1052
|
}, "*"));
|
|
1036
1053
|
};
|
|
1037
1054
|
|
|
@@ -1082,7 +1099,6 @@ function Input(_ref) {
|
|
|
1082
1099
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1083
1100
|
name: name,
|
|
1084
1101
|
id: name,
|
|
1085
|
-
isRequired: isRequired,
|
|
1086
1102
|
isInvalid: isInvalid,
|
|
1087
1103
|
options: options,
|
|
1088
1104
|
onChange: onChange,
|
|
@@ -1100,13 +1116,14 @@ function Input(_ref) {
|
|
|
1100
1116
|
isRequired: isRequired,
|
|
1101
1117
|
isInvalid: isInvalid,
|
|
1102
1118
|
options: options,
|
|
1103
|
-
|
|
1119
|
+
handleOnChange: onChange,
|
|
1104
1120
|
onBlur: onBlur,
|
|
1105
1121
|
setValue: setValue,
|
|
1106
1122
|
control: control,
|
|
1107
1123
|
ref: ref,
|
|
1108
1124
|
disabled: disabled,
|
|
1109
1125
|
value: value,
|
|
1126
|
+
defaultValue: defaultValue,
|
|
1110
1127
|
placeholder: placeholder
|
|
1111
1128
|
});
|
|
1112
1129
|
|
|
@@ -1116,7 +1133,6 @@ function Input(_ref) {
|
|
|
1116
1133
|
name: name,
|
|
1117
1134
|
id: name,
|
|
1118
1135
|
maxLength: maxLength,
|
|
1119
|
-
isRequired: isRequired,
|
|
1120
1136
|
isInvalid: isInvalid,
|
|
1121
1137
|
onChange: onChange,
|
|
1122
1138
|
onBlur: onBlur,
|
|
@@ -1130,7 +1146,6 @@ function Input(_ref) {
|
|
|
1130
1146
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1131
1147
|
name: name,
|
|
1132
1148
|
id: name,
|
|
1133
|
-
isRequired: isRequired,
|
|
1134
1149
|
isInvalid: isInvalid,
|
|
1135
1150
|
options: options,
|
|
1136
1151
|
onChange: onChange,
|
|
@@ -1188,7 +1203,7 @@ function Input(_ref) {
|
|
|
1188
1203
|
default:
|
|
1189
1204
|
return null;
|
|
1190
1205
|
}
|
|
1191
|
-
}, [ariaLabel, className, control, disabled, inputType, isInvalid, isRequired, maxLength, name, options, placeholder, setValue]);
|
|
1206
|
+
}, [ariaLabel, className, control, defaultValue, disabled, inputType, isInvalid, isRequired, maxLength, name, options, placeholder, setValue]);
|
|
1192
1207
|
return /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
1193
1208
|
control: control,
|
|
1194
1209
|
name: name,
|
|
@@ -1196,6 +1211,8 @@ function Input(_ref) {
|
|
|
1196
1211
|
rules: {
|
|
1197
1212
|
required: isRequired
|
|
1198
1213
|
},
|
|
1214
|
+
|
|
1215
|
+
/** @ts-ignore: issues with implicit */
|
|
1199
1216
|
render: function render(_ref2) {
|
|
1200
1217
|
var _ref2$field = _ref2.field,
|
|
1201
1218
|
onBlur = _ref2$field.onBlur,
|
|
@@ -1206,7 +1223,7 @@ function Input(_ref) {
|
|
|
1206
1223
|
id: name,
|
|
1207
1224
|
isInvalid: isInvalid,
|
|
1208
1225
|
position: "relative",
|
|
1209
|
-
py: label ? 6 : 0
|
|
1226
|
+
py: label || helperText || isInvalid ? 6 : 0
|
|
1210
1227
|
}, label && /*#__PURE__*/React__default.createElement(Label$1, {
|
|
1211
1228
|
label: label,
|
|
1212
1229
|
isRequired: isRequired
|
|
@@ -1258,7 +1275,8 @@ function FormSection(_ref) {
|
|
|
1258
1275
|
isRequired: isRequired,
|
|
1259
1276
|
maxLength: maxLength,
|
|
1260
1277
|
isInvalid: !!form.formState.errors[name],
|
|
1261
|
-
defaultValue: defaultValue
|
|
1278
|
+
defaultValue: defaultValue,
|
|
1279
|
+
setValue: form.setValue
|
|
1262
1280
|
});
|
|
1263
1281
|
}));
|
|
1264
1282
|
}
|
|
@@ -1506,7 +1524,11 @@ function Table(_ref) {
|
|
|
1506
1524
|
borderTopRightRadius: borderTopRadius ? 'md' : 0
|
|
1507
1525
|
}, /*#__PURE__*/React__default.createElement(react.Table, {
|
|
1508
1526
|
variant: "unstyled"
|
|
1509
|
-
}, /*#__PURE__*/React__default.createElement(react.Thead, null, /*#__PURE__*/React__default.createElement(react.Tr,
|
|
1527
|
+
}, /*#__PURE__*/React__default.createElement(react.Thead, null, /*#__PURE__*/React__default.createElement(react.Tr, {
|
|
1528
|
+
_odd: {
|
|
1529
|
+
bg: colors.label.primary.dark
|
|
1530
|
+
}
|
|
1531
|
+
}, columnsAsConst.map(function (column) {
|
|
1510
1532
|
return (
|
|
1511
1533
|
/*#__PURE__*/
|
|
1512
1534
|
// @ts-ignore
|
|
@@ -1822,9 +1844,11 @@ function baseStyleRequiredIndicator() {
|
|
|
1822
1844
|
|
|
1823
1845
|
function baseStyleHelperText() {
|
|
1824
1846
|
return {
|
|
1847
|
+
position: 'absolute',
|
|
1825
1848
|
color: colors.label.secondary.light,
|
|
1826
1849
|
mt: 1,
|
|
1827
1850
|
ml: 1,
|
|
1851
|
+
bottom: 0,
|
|
1828
1852
|
fontSize: '13px'
|
|
1829
1853
|
};
|
|
1830
1854
|
}
|
|
@@ -1846,6 +1870,8 @@ var parts$2 = ['text', 'icon'];
|
|
|
1846
1870
|
function baseStyleText() {
|
|
1847
1871
|
return {
|
|
1848
1872
|
color: colors.label.error,
|
|
1873
|
+
position: 'absolute',
|
|
1874
|
+
bottom: 0,
|
|
1849
1875
|
mt: 1,
|
|
1850
1876
|
ml: 1,
|
|
1851
1877
|
fontSize: '13px'
|
|
@@ -2363,10 +2389,13 @@ var Switch = {
|
|
|
2363
2389
|
defaultProps: defaultProps$7
|
|
2364
2390
|
};
|
|
2365
2391
|
|
|
2366
|
-
var parts$7 = ['th', 'td', 'tr', 'body'];
|
|
2392
|
+
var parts$7 = ['th', 'td', 'tr', 'body', 'thead'];
|
|
2367
2393
|
var baseStyle$c = {
|
|
2394
|
+
thead: {
|
|
2395
|
+
bg: colors.label.primary.dark
|
|
2396
|
+
},
|
|
2368
2397
|
th: {
|
|
2369
|
-
height: '
|
|
2398
|
+
height: '100%',
|
|
2370
2399
|
width: '100%',
|
|
2371
2400
|
bg: colors.label.primary.dark,
|
|
2372
2401
|
padding: '5px 8px !important'
|
|
@@ -2376,10 +2405,10 @@ var baseStyle$c = {
|
|
|
2376
2405
|
display: 'flex',
|
|
2377
2406
|
alignItems: 'center',
|
|
2378
2407
|
width: '100%',
|
|
2379
|
-
height: '
|
|
2408
|
+
height: '100%',
|
|
2380
2409
|
borderRadius: 'md',
|
|
2381
2410
|
_odd: {
|
|
2382
|
-
|
|
2411
|
+
bg: colors.fill.light.tertiary
|
|
2383
2412
|
}
|
|
2384
2413
|
},
|
|
2385
2414
|
td: {
|
|
@@ -2744,10 +2773,12 @@ var customXQChakraTheme = /*#__PURE__*/react.extendTheme( /*#__PURE__*/_extends(
|
|
|
2744
2773
|
*/
|
|
2745
2774
|
|
|
2746
2775
|
var XQThemeProvider = function XQThemeProvider(_ref) {
|
|
2747
|
-
var children = _ref.children
|
|
2776
|
+
var children = _ref.children,
|
|
2777
|
+
cssVarsRoot = _ref.cssVarsRoot;
|
|
2748
2778
|
return /*#__PURE__*/React__default.createElement(react.ChakraProvider, {
|
|
2749
2779
|
theme: customXQChakraTheme,
|
|
2750
|
-
resetCSS: true
|
|
2780
|
+
resetCSS: true,
|
|
2781
|
+
cssVarsRoot: cssVarsRoot
|
|
2751
2782
|
}, children);
|
|
2752
2783
|
};
|
|
2753
2784
|
|
|
@@ -2791,5 +2822,6 @@ exports.Table = Table;
|
|
|
2791
2822
|
exports.TabsWrapper = TabsWrapper;
|
|
2792
2823
|
exports.Text = Text;
|
|
2793
2824
|
exports.XQThemeProvider = XQThemeProvider;
|
|
2825
|
+
exports.colors = colors;
|
|
2794
2826
|
exports.formatErrorResponse = formatErrorResponse;
|
|
2795
2827
|
//# sourceMappingURL=ui-core.cjs.development.js.map
|