@xqmsg/ui-core 0.12.0 → 0.12.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/Form.stories.d.ts +1 -1
- package/dist/ui-core.cjs.development.js +61 -61
- 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 +61 -61
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/banner/index.tsx +1 -1
- package/src/components/form/Form.stories.tsx +4 -4
- package/src/components/form/section/FormSection.stories.tsx +1 -1
- package/src/components/input/StackedSelect/StackedSelect.tsx +2 -2
- package/src/components/input/components/label/index.tsx +1 -1
- package/src/components/table/components/text/index.tsx +1 -1
package/dist/ui-core.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo, useCallback, useRef, useState, useEffect } from 'react';
|
|
2
2
|
import { Image, Alert as Alert$1, AlertDescription, Box, Flex, Button as Button$2, Text as Text$2, Icon as Icon$1, Spinner, InputGroup, Checkbox, Input as Input$2, RadioGroup, Radio, useOutsideClick, InputRightElement, Textarea as Textarea$1, Switch as Switch$1, FormLabel as FormLabel$1, FormControl, FormErrorMessage, FormHelperText, SimpleGrid, useMediaQuery, Grid, GridItem, IconButton, Collapse, TableContainer, Table as Table$2, Thead, Tr, Th, Tbody, Td, TableCaption, Tabs as Tabs$1, TabList, Tab, extendTheme, ChakraProvider } from '@chakra-ui/react';
|
|
3
|
-
import colors$1 from 'src/theme/foundations/colors';
|
|
4
3
|
import { FormProvider, useWatch, Controller } from 'react-hook-form';
|
|
4
|
+
import colors$1 from 'src/theme/foundations/colors';
|
|
5
5
|
import { CloseIcon as CloseIcon$1, HamburgerIcon } from '@chakra-ui/icons';
|
|
6
6
|
import { HiOutlineRefresh } from 'react-icons/hi';
|
|
7
7
|
import { createBreakpoints, transparentize, mode, getColor } from '@chakra-ui/theme-tools';
|
|
@@ -15,64 +15,6 @@ var NeutralIcon = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"
|
|
|
15
15
|
|
|
16
16
|
var WarningIcon = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M7 5V7.5M13 7C13 10.3137 10.3137 13 7 13C3.68629 13 1 10.3137 1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7ZM7 9.5H7.005V9.505H7V9.5Z\" stroke=\"#F8CE52\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>";
|
|
17
17
|
|
|
18
|
-
/**
|
|
19
|
-
* A functional React component utilized to render the `Banner` component
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
var Banner = function Banner(_ref) {
|
|
23
|
-
var variant = _ref.variant,
|
|
24
|
-
message = _ref.message,
|
|
25
|
-
buttonText = _ref.buttonText,
|
|
26
|
-
onClick = _ref.onClick;
|
|
27
|
-
var Icon = useMemo(function () {
|
|
28
|
-
switch (variant) {
|
|
29
|
-
case 'error':
|
|
30
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
31
|
-
src: ErrorIcon,
|
|
32
|
-
alt: "error",
|
|
33
|
-
boxSize: "16px"
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
case 'neutral':
|
|
37
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
38
|
-
src: NeutralIcon,
|
|
39
|
-
alt: "neutral",
|
|
40
|
-
boxSize: "16px"
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
case 'positive':
|
|
44
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
45
|
-
src: PositiveIcon,
|
|
46
|
-
alt: "positive",
|
|
47
|
-
boxSize: "16px"
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
case 'warning':
|
|
51
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
52
|
-
src: WarningIcon,
|
|
53
|
-
alt: "warning",
|
|
54
|
-
boxSize: "16px"
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
default:
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
}, [variant]);
|
|
61
|
-
return /*#__PURE__*/React.createElement(Alert$1, {
|
|
62
|
-
variant: variant
|
|
63
|
-
}, /*#__PURE__*/React.createElement(AlertDescription, null, /*#__PURE__*/React.createElement(Box, {
|
|
64
|
-
pb: "8px"
|
|
65
|
-
}, Icon), message, onClick && buttonText && /*#__PURE__*/React.createElement(Flex, {
|
|
66
|
-
pt: "8px",
|
|
67
|
-
justifyContent: "flex-end"
|
|
68
|
-
}, /*#__PURE__*/React.createElement(Button$2, {
|
|
69
|
-
size: "sm",
|
|
70
|
-
bg: "white",
|
|
71
|
-
color: colors$1.fill.action,
|
|
72
|
-
onClick: onClick
|
|
73
|
-
}, buttonText))));
|
|
74
|
-
};
|
|
75
|
-
|
|
76
18
|
var blue = {
|
|
77
19
|
50: 'hsl(209, 100%, 95%)',
|
|
78
20
|
100: 'hsl(209, 100%, 90%)',
|
|
@@ -208,6 +150,64 @@ var colors = {
|
|
|
208
150
|
blue: blue
|
|
209
151
|
};
|
|
210
152
|
|
|
153
|
+
/**
|
|
154
|
+
* A functional React component utilized to render the `Banner` component
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
var Banner = function Banner(_ref) {
|
|
158
|
+
var variant = _ref.variant,
|
|
159
|
+
message = _ref.message,
|
|
160
|
+
buttonText = _ref.buttonText,
|
|
161
|
+
onClick = _ref.onClick;
|
|
162
|
+
var Icon = useMemo(function () {
|
|
163
|
+
switch (variant) {
|
|
164
|
+
case 'error':
|
|
165
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
166
|
+
src: ErrorIcon,
|
|
167
|
+
alt: "error",
|
|
168
|
+
boxSize: "16px"
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
case 'neutral':
|
|
172
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
173
|
+
src: NeutralIcon,
|
|
174
|
+
alt: "neutral",
|
|
175
|
+
boxSize: "16px"
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
case 'positive':
|
|
179
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
180
|
+
src: PositiveIcon,
|
|
181
|
+
alt: "positive",
|
|
182
|
+
boxSize: "16px"
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
case 'warning':
|
|
186
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
187
|
+
src: WarningIcon,
|
|
188
|
+
alt: "warning",
|
|
189
|
+
boxSize: "16px"
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
default:
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
}, [variant]);
|
|
196
|
+
return /*#__PURE__*/React.createElement(Alert$1, {
|
|
197
|
+
variant: variant
|
|
198
|
+
}, /*#__PURE__*/React.createElement(AlertDescription, null, /*#__PURE__*/React.createElement(Box, {
|
|
199
|
+
pb: "8px"
|
|
200
|
+
}, Icon), message, onClick && buttonText && /*#__PURE__*/React.createElement(Flex, {
|
|
201
|
+
pt: "8px",
|
|
202
|
+
justifyContent: "flex-end"
|
|
203
|
+
}, /*#__PURE__*/React.createElement(Button$2, {
|
|
204
|
+
size: "sm",
|
|
205
|
+
bg: "white",
|
|
206
|
+
color: colors.fill.action,
|
|
207
|
+
onClick: onClick
|
|
208
|
+
}, buttonText))));
|
|
209
|
+
};
|
|
210
|
+
|
|
211
211
|
/**
|
|
212
212
|
* A functional React component utilized to render the `Icon` for the `Breadcrumbs` component.
|
|
213
213
|
*/
|
|
@@ -591,7 +591,7 @@ var StackedSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
591
591
|
cursor: "pointer",
|
|
592
592
|
color: "transparent",
|
|
593
593
|
fontSize: "13px",
|
|
594
|
-
textShadow: "0 0 0 " + colors
|
|
594
|
+
textShadow: "0 0 0 " + colors.label.primary.light,
|
|
595
595
|
value: selectedOption
|
|
596
596
|
})), /*#__PURE__*/React.createElement(InputRightElement, {
|
|
597
597
|
cursor: "pointer",
|
|
@@ -1024,7 +1024,7 @@ var Label$1 = function Label(_ref) {
|
|
|
1024
1024
|
label = _ref.label;
|
|
1025
1025
|
return /*#__PURE__*/React.createElement(FormLabel$1, null, label, isRequired && /*#__PURE__*/React.createElement(Box, {
|
|
1026
1026
|
ml: 1,
|
|
1027
|
-
color: colors
|
|
1027
|
+
color: colors.label.error
|
|
1028
1028
|
}, "*"));
|
|
1029
1029
|
};
|
|
1030
1030
|
|