@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
package/dist/ui-core.esm.js
CHANGED
|
@@ -1,77 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { 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';
|
|
5
4
|
import { CloseIcon as CloseIcon$1, HamburgerIcon } from '@chakra-ui/icons';
|
|
6
5
|
import { HiOutlineRefresh } from 'react-icons/hi';
|
|
7
6
|
import { createBreakpoints, transparentize, mode, getColor } from '@chakra-ui/theme-tools';
|
|
8
7
|
import { defineStyle } from '@chakra-ui/system';
|
|
9
8
|
|
|
10
|
-
var ErrorIcon = "
|
|
9
|
+
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";
|
|
11
10
|
|
|
12
|
-
var PositiveIcon = "
|
|
11
|
+
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";
|
|
13
12
|
|
|
14
|
-
var NeutralIcon = "
|
|
13
|
+
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";
|
|
15
14
|
|
|
16
|
-
var WarningIcon = "
|
|
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
|
-
};
|
|
15
|
+
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";
|
|
75
16
|
|
|
76
17
|
var blue = {
|
|
77
18
|
50: 'hsl(209, 100%, 95%)',
|
|
@@ -208,6 +149,64 @@ var colors = {
|
|
|
208
149
|
blue: blue
|
|
209
150
|
};
|
|
210
151
|
|
|
152
|
+
/**
|
|
153
|
+
* A functional React component utilized to render the `Banner` component
|
|
154
|
+
*/
|
|
155
|
+
|
|
156
|
+
var Banner = function Banner(_ref) {
|
|
157
|
+
var variant = _ref.variant,
|
|
158
|
+
message = _ref.message,
|
|
159
|
+
buttonText = _ref.buttonText,
|
|
160
|
+
onClick = _ref.onClick;
|
|
161
|
+
var Icon = useMemo(function () {
|
|
162
|
+
switch (variant) {
|
|
163
|
+
case 'error':
|
|
164
|
+
return /*#__PURE__*/React__default.createElement(Image, {
|
|
165
|
+
src: ErrorIcon,
|
|
166
|
+
alt: "error",
|
|
167
|
+
boxSize: "16px"
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
case 'neutral':
|
|
171
|
+
return /*#__PURE__*/React__default.createElement(Image, {
|
|
172
|
+
src: NeutralIcon,
|
|
173
|
+
alt: "neutral",
|
|
174
|
+
boxSize: "16px"
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
case 'positive':
|
|
178
|
+
return /*#__PURE__*/React__default.createElement(Image, {
|
|
179
|
+
src: PositiveIcon,
|
|
180
|
+
alt: "positive",
|
|
181
|
+
boxSize: "16px"
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
case 'warning':
|
|
185
|
+
return /*#__PURE__*/React__default.createElement(Image, {
|
|
186
|
+
src: WarningIcon,
|
|
187
|
+
alt: "warning",
|
|
188
|
+
boxSize: "16px"
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
default:
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
}, [variant]);
|
|
195
|
+
return /*#__PURE__*/React__default.createElement(Alert$1, {
|
|
196
|
+
variant: variant
|
|
197
|
+
}, /*#__PURE__*/React__default.createElement(AlertDescription, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
198
|
+
pb: "8px"
|
|
199
|
+
}, Icon), message, onClick && buttonText && /*#__PURE__*/React__default.createElement(Flex, {
|
|
200
|
+
pt: "8px",
|
|
201
|
+
justifyContent: "flex-end"
|
|
202
|
+
}, /*#__PURE__*/React__default.createElement(Button$2, {
|
|
203
|
+
size: "sm",
|
|
204
|
+
bg: "white",
|
|
205
|
+
color: colors.fill.action,
|
|
206
|
+
onClick: onClick
|
|
207
|
+
}, buttonText))));
|
|
208
|
+
};
|
|
209
|
+
|
|
211
210
|
/**
|
|
212
211
|
* A functional React component utilized to render the `Icon` for the `Breadcrumbs` component.
|
|
213
212
|
*/
|
|
@@ -236,13 +235,13 @@ var Icon = function Icon(_ref) {
|
|
|
236
235
|
};
|
|
237
236
|
}
|
|
238
237
|
}, [status]);
|
|
239
|
-
return /*#__PURE__*/
|
|
238
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
240
239
|
boxSize: "20px",
|
|
241
240
|
bg: getColors.bg,
|
|
242
241
|
borderRadius: "100%",
|
|
243
242
|
alignItems: "center",
|
|
244
243
|
justifyContent: "center"
|
|
245
|
-
}, /*#__PURE__*/
|
|
244
|
+
}, /*#__PURE__*/React__default.createElement(Text$2, {
|
|
246
245
|
fontSize: "12px",
|
|
247
246
|
color: getColors.color
|
|
248
247
|
}, step));
|
|
@@ -254,9 +253,9 @@ var Icon = function Icon(_ref) {
|
|
|
254
253
|
|
|
255
254
|
var Label = function Label(_ref) {
|
|
256
255
|
var label = _ref.label;
|
|
257
|
-
return /*#__PURE__*/
|
|
256
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
258
257
|
pl: "8px"
|
|
259
|
-
}, /*#__PURE__*/
|
|
258
|
+
}, /*#__PURE__*/React__default.createElement(Text$2, {
|
|
260
259
|
color: colors.label.primary.light,
|
|
261
260
|
fontSize: "13px"
|
|
262
261
|
}, label));
|
|
@@ -279,17 +278,17 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
279
278
|
if (activeStepIndex < stepIndex) return 'inactive';
|
|
280
279
|
return 'active';
|
|
281
280
|
}, [activeStepIndex]);
|
|
282
|
-
return /*#__PURE__*/
|
|
281
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
283
282
|
flexDir: orientation === 'horizontal' ? 'row' : 'column'
|
|
284
283
|
}, steps.map(function (step, idx) {
|
|
285
|
-
return /*#__PURE__*/
|
|
284
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
286
285
|
alignItems: "center",
|
|
287
286
|
pr: orientation === 'horizontal' ? '16px' : 0,
|
|
288
287
|
py: "4px"
|
|
289
|
-
}, /*#__PURE__*/
|
|
288
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
|
290
289
|
step: idx + 1,
|
|
291
290
|
status: getStatus(idx)
|
|
292
|
-
}), /*#__PURE__*/
|
|
291
|
+
}), /*#__PURE__*/React__default.createElement(Label, {
|
|
293
292
|
label: step
|
|
294
293
|
}));
|
|
295
294
|
}));
|
|
@@ -310,7 +309,7 @@ var Button = function Button(_ref) {
|
|
|
310
309
|
disabled = _ref.disabled,
|
|
311
310
|
className = _ref.className,
|
|
312
311
|
width = _ref.width;
|
|
313
|
-
return /*#__PURE__*/
|
|
312
|
+
return /*#__PURE__*/React__default.createElement(Button$2, {
|
|
314
313
|
onClick: onClick,
|
|
315
314
|
type: type,
|
|
316
315
|
variant: variant,
|
|
@@ -321,7 +320,7 @@ var Button = function Button(_ref) {
|
|
|
321
320
|
}, text);
|
|
322
321
|
};
|
|
323
322
|
|
|
324
|
-
var GoogleLogo = "
|
|
323
|
+
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";
|
|
325
324
|
|
|
326
325
|
/**
|
|
327
326
|
* A functional React component utilized to render the `GoogleButton` component
|
|
@@ -329,7 +328,7 @@ var GoogleLogo = "<svg viewBox=\"0 0 533.5 544.3\" xmlns=\"http://www.w3.org/200
|
|
|
329
328
|
|
|
330
329
|
var GoogleButton = function GoogleButton(_ref) {
|
|
331
330
|
var onClick = _ref.onClick;
|
|
332
|
-
return /*#__PURE__*/
|
|
331
|
+
return /*#__PURE__*/React__default.createElement(Button$2, {
|
|
333
332
|
onClick: onClick,
|
|
334
333
|
variant: "plain",
|
|
335
334
|
size: "lg",
|
|
@@ -337,7 +336,7 @@ var GoogleButton = function GoogleButton(_ref) {
|
|
|
337
336
|
"aria-label": "google-login-button",
|
|
338
337
|
className: "google-button",
|
|
339
338
|
px: 4,
|
|
340
|
-
leftIcon: /*#__PURE__*/
|
|
339
|
+
leftIcon: /*#__PURE__*/React__default.createElement(Icon$1, {
|
|
341
340
|
as: GoogleLogo,
|
|
342
341
|
width: 18,
|
|
343
342
|
height: 18,
|
|
@@ -348,7 +347,7 @@ var GoogleButton = function GoogleButton(_ref) {
|
|
|
348
347
|
fontSize: 14,
|
|
349
348
|
backgroundColor: "white",
|
|
350
349
|
boxShadow: "rgba(0, 0, 0, 0.24) 0px 0px 1px 0px, rgba(0, 0, 0, 0.24) 0px 2px 2px 0px"
|
|
351
|
-
}, /*#__PURE__*/
|
|
350
|
+
}, /*#__PURE__*/React__default.createElement(Text$2, {
|
|
352
351
|
color: "rgba(0, 0, 0, 0.54)"
|
|
353
352
|
}, 'Sign in with Google'));
|
|
354
353
|
};
|
|
@@ -367,8 +366,8 @@ var SpinnerButton = function SpinnerButton(_ref) {
|
|
|
367
366
|
variant = _ref$variant === void 0 ? 'solid' : _ref$variant,
|
|
368
367
|
disabled = _ref.disabled,
|
|
369
368
|
className = _ref.className;
|
|
370
|
-
return /*#__PURE__*/
|
|
371
|
-
spinner: /*#__PURE__*/
|
|
369
|
+
return /*#__PURE__*/React__default.createElement(Button$2, {
|
|
370
|
+
spinner: /*#__PURE__*/React__default.createElement(Spinner, {
|
|
372
371
|
size: 'md'
|
|
373
372
|
}),
|
|
374
373
|
isLoading: isLoading,
|
|
@@ -392,7 +391,7 @@ function Form(_ref) {
|
|
|
392
391
|
children = _ref.children;
|
|
393
392
|
var form = formHandler.form,
|
|
394
393
|
onSubmit = formHandler.onSubmit;
|
|
395
|
-
return /*#__PURE__*/
|
|
394
|
+
return /*#__PURE__*/React__default.createElement(FormProvider, Object.assign({}, form), /*#__PURE__*/React__default.createElement("form", {
|
|
396
395
|
onSubmit: onSubmit
|
|
397
396
|
}, children));
|
|
398
397
|
}
|
|
@@ -401,14 +400,14 @@ function Form(_ref) {
|
|
|
401
400
|
* A functional React component utilized to render the `StackedCheckbox` component.
|
|
402
401
|
*/
|
|
403
402
|
|
|
404
|
-
var StackedCheckboxGroup = /*#__PURE__*/
|
|
403
|
+
var StackedCheckboxGroup = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
405
404
|
var options = _ref2.options;
|
|
406
|
-
return /*#__PURE__*/
|
|
407
|
-
return /*#__PURE__*/
|
|
405
|
+
return /*#__PURE__*/React__default.createElement(InputGroup, null, options.map(function (option) {
|
|
406
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
408
407
|
mr: "30px",
|
|
409
408
|
alignItems: "center",
|
|
410
409
|
key: option.value
|
|
411
|
-
}, /*#__PURE__*/
|
|
410
|
+
}, /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
412
411
|
ref: _ref,
|
|
413
412
|
value: option.value
|
|
414
413
|
}, option.label));
|
|
@@ -452,13 +451,13 @@ var _excluded = ["type", "isRequired"];
|
|
|
452
451
|
* A functional React component utilized to render the `StackedInput` component.
|
|
453
452
|
*/
|
|
454
453
|
|
|
455
|
-
var StackedInput = /*#__PURE__*/
|
|
454
|
+
var StackedInput = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
456
455
|
var _ref2$type = _ref2.type,
|
|
457
456
|
type = _ref2$type === void 0 ? 'text' : _ref2$type,
|
|
458
457
|
isRequired = _ref2.isRequired,
|
|
459
458
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
460
459
|
|
|
461
|
-
return /*#__PURE__*/
|
|
460
|
+
return /*#__PURE__*/React__default.createElement(Input$2, Object.assign({
|
|
462
461
|
ref: _ref,
|
|
463
462
|
type: type,
|
|
464
463
|
isRequired: isRequired
|
|
@@ -469,27 +468,27 @@ var StackedInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
469
468
|
* A functional React component utilized to render the `StackedRadio` component.
|
|
470
469
|
*/
|
|
471
470
|
|
|
472
|
-
var StackedRadioGroup = /*#__PURE__*/
|
|
471
|
+
var StackedRadioGroup = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
473
472
|
var id = _ref2.id,
|
|
474
473
|
_ref2$flexDirection = _ref2.flexDirection,
|
|
475
474
|
flexDirection = _ref2$flexDirection === void 0 ? 'row' : _ref2$flexDirection,
|
|
476
475
|
options = _ref2.options;
|
|
477
|
-
return /*#__PURE__*/
|
|
476
|
+
return /*#__PURE__*/React__default.createElement(InputGroup, null, /*#__PURE__*/React__default.createElement(RadioGroup, {
|
|
478
477
|
name: id
|
|
479
478
|
}, options.map(function (option) {
|
|
480
|
-
return /*#__PURE__*/
|
|
479
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
481
480
|
mr: "30px",
|
|
482
481
|
alignItems: "center",
|
|
483
482
|
key: option.value,
|
|
484
483
|
flexDirection: flexDirection
|
|
485
|
-
}, /*#__PURE__*/
|
|
484
|
+
}, /*#__PURE__*/React__default.createElement(Radio, {
|
|
486
485
|
ref: _ref,
|
|
487
486
|
value: option.value
|
|
488
487
|
}, option.label));
|
|
489
488
|
})));
|
|
490
489
|
});
|
|
491
490
|
|
|
492
|
-
var SubtractIcon = "
|
|
491
|
+
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";
|
|
493
492
|
|
|
494
493
|
/**
|
|
495
494
|
* A functional React component utilized to render the `Dropdown` component
|
|
@@ -500,16 +499,16 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
500
499
|
options = _ref.options;
|
|
501
500
|
var DropdownContent = useMemo(function () {
|
|
502
501
|
return options.map(function (option, idx) {
|
|
503
|
-
return /*#__PURE__*/
|
|
504
|
-
color: colors
|
|
502
|
+
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(Box, {
|
|
503
|
+
color: colors.label.secondary.light,
|
|
505
504
|
fontSize: "13px",
|
|
506
505
|
fontWeight: "bold",
|
|
507
506
|
px: "8px"
|
|
508
|
-
}, idx > 0 && /*#__PURE__*/
|
|
507
|
+
}, idx > 0 && /*#__PURE__*/React__default.createElement(Box, {
|
|
509
508
|
my: "3px",
|
|
510
509
|
borderTop: "2px solid",
|
|
511
|
-
borderColor: colors
|
|
512
|
-
}), option.label), option.value !== 'section_header' && /*#__PURE__*/
|
|
510
|
+
borderColor: colors.border["default"]
|
|
511
|
+
}), option.label), option.value !== 'section_header' && /*#__PURE__*/React__default.createElement(Box, {
|
|
513
512
|
cursor: "pointer",
|
|
514
513
|
borderRadius: "inherit",
|
|
515
514
|
onClick: function onClick() {
|
|
@@ -519,17 +518,17 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
519
518
|
fontSize: "13px",
|
|
520
519
|
px: "8px",
|
|
521
520
|
py: "4px",
|
|
522
|
-
color: colors
|
|
521
|
+
color: colors.label.primary.light,
|
|
523
522
|
_hover: {
|
|
524
|
-
color: colors
|
|
525
|
-
bg: colors
|
|
523
|
+
color: colors.label.primary.dark,
|
|
524
|
+
bg: colors.fill.action,
|
|
526
525
|
borderRadius: '4px'
|
|
527
526
|
}
|
|
528
527
|
}, option.label));
|
|
529
528
|
});
|
|
530
529
|
}, [onSelectItem, options]);
|
|
531
|
-
return /*#__PURE__*/
|
|
532
|
-
bg: colors
|
|
530
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
531
|
+
bg: colors.fill.light.quaternary,
|
|
533
532
|
backdropFilter: "blur(64px)",
|
|
534
533
|
borderRadius: "4px",
|
|
535
534
|
mt: "3px",
|
|
@@ -543,16 +542,20 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
543
542
|
}, DropdownContent);
|
|
544
543
|
};
|
|
545
544
|
|
|
546
|
-
var _excluded$1 = ["isRequired", "options", "name", "setValue", "
|
|
545
|
+
var _excluded$1 = ["isRequired", "options", "name", "setValue", "handleOnChange", "defaultValue"];
|
|
547
546
|
/**
|
|
548
547
|
* A functional React component utilized to render the `StackedSelect` component.
|
|
549
548
|
*/
|
|
550
549
|
|
|
551
|
-
var StackedSelect = /*#__PURE__*/
|
|
550
|
+
var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
551
|
+
var _options$find$label, _options$find;
|
|
552
|
+
|
|
552
553
|
var isRequired = _ref2.isRequired,
|
|
553
554
|
options = _ref2.options,
|
|
554
555
|
name = _ref2.name,
|
|
555
556
|
setValue = _ref2.setValue,
|
|
557
|
+
handleOnChange = _ref2.handleOnChange,
|
|
558
|
+
defaultValue = _ref2.defaultValue,
|
|
556
559
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
|
|
557
560
|
|
|
558
561
|
var dropdownRef = useRef(null);
|
|
@@ -561,7 +564,9 @@ var StackedSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
561
564
|
isFocussed = _useState[0],
|
|
562
565
|
setIsFocussed = _useState[1];
|
|
563
566
|
|
|
564
|
-
var _useState2 = useState(
|
|
567
|
+
var _useState2 = useState((_options$find$label = (_options$find = options.find(function (option) {
|
|
568
|
+
return option.value === defaultValue;
|
|
569
|
+
})) == null ? void 0 : _options$find.label) != null ? _options$find$label : ''),
|
|
565
570
|
selectedOption = _useState2[0],
|
|
566
571
|
setSelectedOption = _useState2[1];
|
|
567
572
|
|
|
@@ -573,15 +578,19 @@ var StackedSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
573
578
|
});
|
|
574
579
|
|
|
575
580
|
var handleOnSelectItem = function handleOnSelectItem(option) {
|
|
581
|
+
if (handleOnChange) {
|
|
582
|
+
handleOnChange(option.value);
|
|
583
|
+
}
|
|
584
|
+
|
|
576
585
|
setValue(name, option.value);
|
|
577
586
|
setSelectedOption(option.label);
|
|
578
587
|
setIsFocussed(false);
|
|
579
588
|
};
|
|
580
589
|
|
|
581
|
-
return /*#__PURE__*/
|
|
590
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
582
591
|
ref: dropdownRef,
|
|
583
592
|
position: "relative"
|
|
584
|
-
}, /*#__PURE__*/
|
|
593
|
+
}, /*#__PURE__*/React__default.createElement(InputGroup, null, /*#__PURE__*/React__default.createElement(Input$2, Object.assign({
|
|
585
594
|
isRequired: isRequired
|
|
586
595
|
}, props, {
|
|
587
596
|
ref: _ref,
|
|
@@ -591,18 +600,18 @@ var StackedSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
591
600
|
cursor: "pointer",
|
|
592
601
|
color: "transparent",
|
|
593
602
|
fontSize: "13px",
|
|
594
|
-
textShadow: "0 0 0 " + colors
|
|
603
|
+
textShadow: "0 0 0 " + colors.label.primary.light,
|
|
595
604
|
value: selectedOption
|
|
596
|
-
})), /*#__PURE__*/
|
|
605
|
+
})), /*#__PURE__*/React__default.createElement(InputRightElement, {
|
|
597
606
|
cursor: "pointer",
|
|
598
607
|
onClick: function onClick() {
|
|
599
608
|
return setIsFocussed(!isFocussed);
|
|
600
609
|
}
|
|
601
|
-
}, /*#__PURE__*/
|
|
610
|
+
}, /*#__PURE__*/React__default.createElement(Image, {
|
|
602
611
|
src: SubtractIcon,
|
|
603
612
|
alt: "subtract",
|
|
604
613
|
boxSize: "16px"
|
|
605
|
-
}))), isFocussed && /*#__PURE__*/
|
|
614
|
+
}))), isFocussed && /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
606
615
|
onSelectItem: function onSelectItem(option) {
|
|
607
616
|
return handleOnSelectItem(option);
|
|
608
617
|
},
|
|
@@ -614,32 +623,32 @@ var StackedSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
614
623
|
* A functional React component utilized to render the `StackedTextarea` component.
|
|
615
624
|
*/
|
|
616
625
|
|
|
617
|
-
var StackedTextarea = /*#__PURE__*/
|
|
626
|
+
var StackedTextarea = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
618
627
|
var props = _extends({}, _ref2);
|
|
619
628
|
|
|
620
|
-
return /*#__PURE__*/
|
|
629
|
+
return /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
|
|
621
630
|
ref: _ref
|
|
622
631
|
}, props));
|
|
623
632
|
});
|
|
624
633
|
|
|
625
|
-
var CloseIcon = "
|
|
634
|
+
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";
|
|
626
635
|
|
|
627
636
|
var Token = function Token(_ref) {
|
|
628
637
|
var label = _ref.label,
|
|
629
638
|
onDelete = _ref.onDelete;
|
|
630
|
-
return /*#__PURE__*/
|
|
639
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
631
640
|
key: label,
|
|
632
641
|
borderRadius: "full",
|
|
633
642
|
backgroundColor: "#7676801F",
|
|
634
643
|
alignItems: "center",
|
|
635
|
-
width
|
|
644
|
+
// width="100%"
|
|
636
645
|
pl: "8px",
|
|
637
646
|
pr: "4px",
|
|
638
647
|
py: "2px"
|
|
639
|
-
}, /*#__PURE__*/
|
|
640
|
-
color: colors
|
|
648
|
+
}, /*#__PURE__*/React__default.createElement(Text$2, {
|
|
649
|
+
color: colors.label.primary.light,
|
|
641
650
|
fontSize: "13px"
|
|
642
|
-
}, label), /*#__PURE__*/
|
|
651
|
+
}, label), /*#__PURE__*/React__default.createElement(Image, {
|
|
643
652
|
pl: "4px",
|
|
644
653
|
boxSize: "16px",
|
|
645
654
|
src: CloseIcon,
|
|
@@ -652,7 +661,7 @@ var Token = function Token(_ref) {
|
|
|
652
661
|
* A functional React component utilized to render the `StackedMultiSelect` component.
|
|
653
662
|
*/
|
|
654
663
|
|
|
655
|
-
var StackedMultiSelect = /*#__PURE__*/
|
|
664
|
+
var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
656
665
|
var options = _ref2.options,
|
|
657
666
|
setValue = _ref2.setValue,
|
|
658
667
|
control = _ref2.control,
|
|
@@ -740,10 +749,10 @@ var StackedMultiSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
740
749
|
});
|
|
741
750
|
};
|
|
742
751
|
|
|
743
|
-
return /*#__PURE__*/
|
|
752
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
744
753
|
ref: dropdownRef,
|
|
745
754
|
position: "relative"
|
|
746
|
-
}, /*#__PURE__*/
|
|
755
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
747
756
|
fontSize: "13px",
|
|
748
757
|
border: isFocussed ? '2px solid' : '1px solid',
|
|
749
758
|
borderColor: isFocussed ? colors.border.focus : colors.border["default"],
|
|
@@ -757,30 +766,30 @@ var StackedMultiSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
757
766
|
},
|
|
758
767
|
bg: disabled ? colors.fill.light.quaternary : '#ffffff',
|
|
759
768
|
cursor: disabled ? 'not-allowed' : 'pointer'
|
|
760
|
-
}, /*#__PURE__*/
|
|
769
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
761
770
|
height: "28px",
|
|
762
771
|
alignItems: "center"
|
|
763
772
|
}, localValues.length ? localValues.map(function (option) {
|
|
764
|
-
return /*#__PURE__*/
|
|
773
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
765
774
|
mr: "4px"
|
|
766
|
-
}, /*#__PURE__*/
|
|
775
|
+
}, /*#__PURE__*/React__default.createElement(Token, {
|
|
767
776
|
label: option.label,
|
|
768
777
|
onDelete: function onDelete() {
|
|
769
778
|
return handleDelete(option);
|
|
770
779
|
}
|
|
771
780
|
}));
|
|
772
|
-
}) : /*#__PURE__*/
|
|
781
|
+
}) : /*#__PURE__*/React__default.createElement(Text$2, {
|
|
773
782
|
color: colors.label.secondary.light,
|
|
774
783
|
fontSize: "13px"
|
|
775
|
-
}, placeholder)), /*#__PURE__*/
|
|
784
|
+
}, placeholder)), /*#__PURE__*/React__default.createElement(Flex, {
|
|
776
785
|
width: "39px",
|
|
777
786
|
justifyContent: "center",
|
|
778
787
|
alignItems: "center"
|
|
779
|
-
}, /*#__PURE__*/
|
|
788
|
+
}, /*#__PURE__*/React__default.createElement(Image, {
|
|
780
789
|
src: SubtractIcon,
|
|
781
790
|
alt: "subtract",
|
|
782
791
|
boxSize: "16px"
|
|
783
|
-
}))), isFocussed && /*#__PURE__*/
|
|
792
|
+
}))), isFocussed && /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
784
793
|
onSelectItem: function onSelectItem(option) {
|
|
785
794
|
return handleChange(option);
|
|
786
795
|
},
|
|
@@ -792,7 +801,7 @@ var StackedMultiSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
792
801
|
* A functional React component utilized to render the `StackedPilledInput` component.
|
|
793
802
|
*/
|
|
794
803
|
|
|
795
|
-
var StackedPilledInput = /*#__PURE__*/
|
|
804
|
+
var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
796
805
|
var name = _ref2.name,
|
|
797
806
|
setValue = _ref2.setValue,
|
|
798
807
|
control = _ref2.control,
|
|
@@ -926,9 +935,9 @@ var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
926
935
|
ref: inputWrapperRef,
|
|
927
936
|
handler: onBlur
|
|
928
937
|
});
|
|
929
|
-
return /*#__PURE__*/
|
|
938
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
930
939
|
position: "relative"
|
|
931
|
-
}, /*#__PURE__*/
|
|
940
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
932
941
|
fontSize: "13px",
|
|
933
942
|
border: isFocussed ? '2px solid' : '1px solid',
|
|
934
943
|
borderColor: isFocussed ? colors.border.focus : colors.border["default"],
|
|
@@ -947,19 +956,28 @@ var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
947
956
|
bg: disabled ? colors.fill.light.quaternary : '#ffffff',
|
|
948
957
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
949
958
|
ref: inputWrapperRef
|
|
950
|
-
}, /*#__PURE__*/
|
|
959
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
951
960
|
height: "28px",
|
|
952
961
|
alignItems: "center",
|
|
953
|
-
width
|
|
962
|
+
// width="fit-content"
|
|
963
|
+
// maxW="70%"
|
|
964
|
+
overflowX: "auto",
|
|
965
|
+
style: {
|
|
966
|
+
scrollbarWidth: 'none'
|
|
967
|
+
/* Firefox */
|
|
968
|
+
|
|
969
|
+
}
|
|
954
970
|
}, lastestFormValueToArray.length ? lastestFormValueToArray.map(function (label, index) {
|
|
955
|
-
return /*#__PURE__*/
|
|
971
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
956
972
|
mr: "4px",
|
|
957
973
|
border: tokenIndex === index ? "2px solid " + colors.border.focus : 'none',
|
|
958
974
|
borderRadius: "full",
|
|
959
975
|
onClick: function onClick() {
|
|
960
976
|
return setTokenIndex(index);
|
|
961
|
-
}
|
|
962
|
-
|
|
977
|
+
},
|
|
978
|
+
// width="fit-content"
|
|
979
|
+
width: "100%"
|
|
980
|
+
}, /*#__PURE__*/React__default.createElement(Token, {
|
|
963
981
|
label: label,
|
|
964
982
|
onDelete: function onDelete(e) {
|
|
965
983
|
e.stopPropagation();
|
|
@@ -967,12 +985,12 @@ var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
967
985
|
onRemoveTag(index);
|
|
968
986
|
}
|
|
969
987
|
}));
|
|
970
|
-
}) : /*#__PURE__*/
|
|
988
|
+
}) : /*#__PURE__*/React__default.createElement(Text$2, {
|
|
971
989
|
color: colors.label.secondary.light,
|
|
972
990
|
fontSize: "13px"
|
|
973
|
-
}, placeholder)), /*#__PURE__*/
|
|
991
|
+
}, placeholder)), /*#__PURE__*/React__default.createElement(Flex, {
|
|
974
992
|
flex: 1
|
|
975
|
-
}, /*#__PURE__*/
|
|
993
|
+
}, /*#__PURE__*/React__default.createElement(Input$2, {
|
|
976
994
|
onKeyDown: onHandleKeyDown,
|
|
977
995
|
type: "text",
|
|
978
996
|
padding: 0,
|
|
@@ -998,12 +1016,11 @@ var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
998
1016
|
* A functional React component utilized to render the `StackedSwitch` component.
|
|
999
1017
|
*/
|
|
1000
1018
|
|
|
1001
|
-
var StackedSwitch = /*#__PURE__*/
|
|
1019
|
+
var StackedSwitch = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
1002
1020
|
var isRequired = _ref2.isRequired,
|
|
1003
1021
|
_onChange = _ref2.onChange,
|
|
1004
1022
|
value = _ref2.value;
|
|
1005
|
-
|
|
1006
|
-
return /*#__PURE__*/React.createElement(Switch$1, {
|
|
1023
|
+
return /*#__PURE__*/React__default.createElement(Switch$1, {
|
|
1007
1024
|
size: "lg",
|
|
1008
1025
|
ref: _ref,
|
|
1009
1026
|
isRequired: isRequired,
|
|
@@ -1022,9 +1039,9 @@ var StackedSwitch = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
1022
1039
|
var Label$1 = function Label(_ref) {
|
|
1023
1040
|
var isRequired = _ref.isRequired,
|
|
1024
1041
|
label = _ref.label;
|
|
1025
|
-
return /*#__PURE__*/
|
|
1042
|
+
return /*#__PURE__*/React__default.createElement(FormLabel$1, null, label, isRequired && /*#__PURE__*/React__default.createElement(Box, {
|
|
1026
1043
|
ml: 1,
|
|
1027
|
-
color: colors
|
|
1044
|
+
color: colors.label.error
|
|
1028
1045
|
}, "*"));
|
|
1029
1046
|
};
|
|
1030
1047
|
|
|
@@ -1054,7 +1071,7 @@ function Input(_ref) {
|
|
|
1054
1071
|
var selectedInputField = useCallback(function (onChange, onBlur, ref, value) {
|
|
1055
1072
|
switch (inputType) {
|
|
1056
1073
|
case 'text':
|
|
1057
|
-
return /*#__PURE__*/
|
|
1074
|
+
return /*#__PURE__*/React__default.createElement(StackedInput, {
|
|
1058
1075
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1059
1076
|
"aria-label": ariaLabel,
|
|
1060
1077
|
name: name,
|
|
@@ -1071,11 +1088,10 @@ function Input(_ref) {
|
|
|
1071
1088
|
});
|
|
1072
1089
|
|
|
1073
1090
|
case 'radio':
|
|
1074
|
-
return /*#__PURE__*/
|
|
1091
|
+
return /*#__PURE__*/React__default.createElement(StackedRadioGroup, {
|
|
1075
1092
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1076
1093
|
name: name,
|
|
1077
1094
|
id: name,
|
|
1078
|
-
isRequired: isRequired,
|
|
1079
1095
|
isInvalid: isInvalid,
|
|
1080
1096
|
options: options,
|
|
1081
1097
|
onChange: onChange,
|
|
@@ -1086,30 +1102,30 @@ function Input(_ref) {
|
|
|
1086
1102
|
});
|
|
1087
1103
|
|
|
1088
1104
|
case 'select':
|
|
1089
|
-
return /*#__PURE__*/
|
|
1105
|
+
return /*#__PURE__*/React__default.createElement(StackedSelect, {
|
|
1090
1106
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1091
1107
|
name: name,
|
|
1092
1108
|
id: name,
|
|
1093
1109
|
isRequired: isRequired,
|
|
1094
1110
|
isInvalid: isInvalid,
|
|
1095
1111
|
options: options,
|
|
1096
|
-
|
|
1112
|
+
handleOnChange: onChange,
|
|
1097
1113
|
onBlur: onBlur,
|
|
1098
1114
|
setValue: setValue,
|
|
1099
1115
|
control: control,
|
|
1100
1116
|
ref: ref,
|
|
1101
1117
|
disabled: disabled,
|
|
1102
1118
|
value: value,
|
|
1119
|
+
defaultValue: defaultValue,
|
|
1103
1120
|
placeholder: placeholder
|
|
1104
1121
|
});
|
|
1105
1122
|
|
|
1106
1123
|
case 'textarea':
|
|
1107
|
-
return /*#__PURE__*/
|
|
1124
|
+
return /*#__PURE__*/React__default.createElement(StackedTextarea, {
|
|
1108
1125
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1109
1126
|
name: name,
|
|
1110
1127
|
id: name,
|
|
1111
1128
|
maxLength: maxLength,
|
|
1112
|
-
isRequired: isRequired,
|
|
1113
1129
|
isInvalid: isInvalid,
|
|
1114
1130
|
onChange: onChange,
|
|
1115
1131
|
onBlur: onBlur,
|
|
@@ -1119,11 +1135,10 @@ function Input(_ref) {
|
|
|
1119
1135
|
});
|
|
1120
1136
|
|
|
1121
1137
|
case 'checkbox':
|
|
1122
|
-
return /*#__PURE__*/
|
|
1138
|
+
return /*#__PURE__*/React__default.createElement(StackedCheckboxGroup, {
|
|
1123
1139
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1124
1140
|
name: name,
|
|
1125
1141
|
id: name,
|
|
1126
|
-
isRequired: isRequired,
|
|
1127
1142
|
isInvalid: isInvalid,
|
|
1128
1143
|
options: options,
|
|
1129
1144
|
onChange: onChange,
|
|
@@ -1134,7 +1149,7 @@ function Input(_ref) {
|
|
|
1134
1149
|
});
|
|
1135
1150
|
|
|
1136
1151
|
case 'multi-select':
|
|
1137
|
-
return /*#__PURE__*/
|
|
1152
|
+
return /*#__PURE__*/React__default.createElement(StackedMultiSelect, {
|
|
1138
1153
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1139
1154
|
name: name,
|
|
1140
1155
|
id: name,
|
|
@@ -1151,7 +1166,7 @@ function Input(_ref) {
|
|
|
1151
1166
|
});
|
|
1152
1167
|
|
|
1153
1168
|
case 'pilled-text':
|
|
1154
|
-
return /*#__PURE__*/
|
|
1169
|
+
return /*#__PURE__*/React__default.createElement(StackedPilledInput, {
|
|
1155
1170
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1156
1171
|
"aria-label": ariaLabel,
|
|
1157
1172
|
name: name,
|
|
@@ -1167,7 +1182,7 @@ function Input(_ref) {
|
|
|
1167
1182
|
});
|
|
1168
1183
|
|
|
1169
1184
|
case 'switch':
|
|
1170
|
-
return /*#__PURE__*/
|
|
1185
|
+
return /*#__PURE__*/React__default.createElement(StackedSwitch, {
|
|
1171
1186
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1172
1187
|
name: name,
|
|
1173
1188
|
id: name,
|
|
@@ -1181,29 +1196,31 @@ function Input(_ref) {
|
|
|
1181
1196
|
default:
|
|
1182
1197
|
return null;
|
|
1183
1198
|
}
|
|
1184
|
-
}, [ariaLabel, className, control, disabled, inputType, isInvalid, isRequired, maxLength, name, options, placeholder, setValue]);
|
|
1185
|
-
return /*#__PURE__*/
|
|
1199
|
+
}, [ariaLabel, className, control, defaultValue, disabled, inputType, isInvalid, isRequired, maxLength, name, options, placeholder, setValue]);
|
|
1200
|
+
return /*#__PURE__*/React__default.createElement(Controller, {
|
|
1186
1201
|
control: control,
|
|
1187
1202
|
name: name,
|
|
1188
1203
|
defaultValue: defaultValue,
|
|
1189
1204
|
rules: {
|
|
1190
1205
|
required: isRequired
|
|
1191
1206
|
},
|
|
1207
|
+
|
|
1208
|
+
/** @ts-ignore: issues with implicit */
|
|
1192
1209
|
render: function render(_ref2) {
|
|
1193
1210
|
var _ref2$field = _ref2.field,
|
|
1194
1211
|
onBlur = _ref2$field.onBlur,
|
|
1195
1212
|
fieldOnChange = _ref2$field.onChange,
|
|
1196
1213
|
ref = _ref2$field.ref,
|
|
1197
1214
|
value = _ref2$field.value;
|
|
1198
|
-
return /*#__PURE__*/
|
|
1215
|
+
return /*#__PURE__*/React__default.createElement(FormControl, {
|
|
1199
1216
|
id: name,
|
|
1200
1217
|
isInvalid: isInvalid,
|
|
1201
1218
|
position: "relative",
|
|
1202
|
-
py: label ? 6 : 0
|
|
1203
|
-
}, label && /*#__PURE__*/
|
|
1219
|
+
py: label || helperText || isInvalid ? 6 : 0
|
|
1220
|
+
}, label && /*#__PURE__*/React__default.createElement(Label$1, {
|
|
1204
1221
|
label: label,
|
|
1205
1222
|
isRequired: isRequired
|
|
1206
|
-
}), selectedInputField(onChange ? onChange : fieldOnChange, onBlur, ref, value), isInvalid ? /*#__PURE__*/
|
|
1223
|
+
}), selectedInputField(onChange ? onChange : fieldOnChange, onBlur, ref, value), isInvalid ? /*#__PURE__*/React__default.createElement(FormErrorMessage, null, errorText) : helperText && /*#__PURE__*/React__default.createElement(FormHelperText, null, helperText));
|
|
1207
1224
|
}
|
|
1208
1225
|
});
|
|
1209
1226
|
}
|
|
@@ -1226,7 +1243,7 @@ function FormSection(_ref) {
|
|
|
1226
1243
|
columns = _ref$columns === void 0 ? 1 : _ref$columns,
|
|
1227
1244
|
_ref$spacing = _ref.spacing,
|
|
1228
1245
|
spacing = _ref$spacing === void 0 ? 0 : _ref$spacing;
|
|
1229
|
-
return /*#__PURE__*/
|
|
1246
|
+
return /*#__PURE__*/React__default.createElement(SimpleGrid, {
|
|
1230
1247
|
columns: columns,
|
|
1231
1248
|
spacing: spacing,
|
|
1232
1249
|
className: "form-section " + (className != null ? className : '')
|
|
@@ -1240,7 +1257,7 @@ function FormSection(_ref) {
|
|
|
1240
1257
|
ariaLabel = _ref2.ariaLabel,
|
|
1241
1258
|
disabled = _ref2.disabled,
|
|
1242
1259
|
defaultValue = _ref2.defaultValue;
|
|
1243
|
-
return /*#__PURE__*/
|
|
1260
|
+
return /*#__PURE__*/React__default.createElement(Input, {
|
|
1244
1261
|
control: form.control,
|
|
1245
1262
|
label: label,
|
|
1246
1263
|
inputType: inputType,
|
|
@@ -1251,7 +1268,8 @@ function FormSection(_ref) {
|
|
|
1251
1268
|
isRequired: isRequired,
|
|
1252
1269
|
maxLength: maxLength,
|
|
1253
1270
|
isInvalid: !!form.formState.errors[name],
|
|
1254
|
-
defaultValue: defaultValue
|
|
1271
|
+
defaultValue: defaultValue,
|
|
1272
|
+
setValue: form.setValue
|
|
1255
1273
|
});
|
|
1256
1274
|
}));
|
|
1257
1275
|
}
|
|
@@ -1265,7 +1283,7 @@ var BorderedBox = function BorderedBox(_ref) {
|
|
|
1265
1283
|
boxShadow = _ref.boxShadow,
|
|
1266
1284
|
_ref$borderRadius = _ref.borderRadius,
|
|
1267
1285
|
borderRadius = _ref$borderRadius === void 0 ? 'none' : _ref$borderRadius;
|
|
1268
|
-
return /*#__PURE__*/
|
|
1286
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
1269
1287
|
boxShadow: boxShadow,
|
|
1270
1288
|
borderRadius: borderRadius,
|
|
1271
1289
|
bg: "white",
|
|
@@ -1294,7 +1312,7 @@ var Layout = function Layout(_ref) {
|
|
|
1294
1312
|
show = _useState[0],
|
|
1295
1313
|
setShow = _useState[1];
|
|
1296
1314
|
|
|
1297
|
-
return /*#__PURE__*/
|
|
1315
|
+
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
1298
1316
|
templateAreas: isLargerThan1200 ? "\"nav header\" \"nav main\"" : "\"header\" \"main\"",
|
|
1299
1317
|
gridTemplateRows: "auto 1fr",
|
|
1300
1318
|
gridTemplateColumns: isLargerThan1200 ? navbarWidth + " 1fr" : '100% 1fr',
|
|
@@ -1302,23 +1320,23 @@ var Layout = function Layout(_ref) {
|
|
|
1302
1320
|
width: "100%",
|
|
1303
1321
|
gap: "4",
|
|
1304
1322
|
bg: "#f5f5f5"
|
|
1305
|
-
}, /*#__PURE__*/
|
|
1323
|
+
}, /*#__PURE__*/React__default.createElement(GridItem, {
|
|
1306
1324
|
area: "header",
|
|
1307
1325
|
p: "20px 20px 10px 10px",
|
|
1308
1326
|
minHeight: "100px"
|
|
1309
|
-
}, /*#__PURE__*/
|
|
1327
|
+
}, /*#__PURE__*/React__default.createElement(BorderedBox, {
|
|
1310
1328
|
borderRadius: "md",
|
|
1311
1329
|
boxShadow: "rgba(235,237,238,.75) 8px 0 30px 10px"
|
|
1312
|
-
}, /*#__PURE__*/
|
|
1330
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
1313
1331
|
flexDirection: "column",
|
|
1314
1332
|
justifyContent: "center",
|
|
1315
1333
|
width: "100%",
|
|
1316
1334
|
pl: '32px',
|
|
1317
1335
|
py: 5
|
|
1318
|
-
}, /*#__PURE__*/
|
|
1336
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
1319
1337
|
justifyContent: "space-between",
|
|
1320
1338
|
alignItems: "center"
|
|
1321
|
-
}, Header, !isLargerThan1200 && /*#__PURE__*/
|
|
1339
|
+
}, Header, !isLargerThan1200 && /*#__PURE__*/React__default.createElement(IconButton, {
|
|
1322
1340
|
size: "md",
|
|
1323
1341
|
variant: "unstyled",
|
|
1324
1342
|
alignSelf: "flex-start",
|
|
@@ -1327,23 +1345,23 @@ var Layout = function Layout(_ref) {
|
|
|
1327
1345
|
onClick: function onClick() {
|
|
1328
1346
|
return setShow(!show);
|
|
1329
1347
|
},
|
|
1330
|
-
icon: show ? /*#__PURE__*/
|
|
1348
|
+
icon: show ? /*#__PURE__*/React__default.createElement(CloseIcon$1, null) : /*#__PURE__*/React__default.createElement(HamburgerIcon, null),
|
|
1331
1349
|
_focus: {
|
|
1332
1350
|
boxShadow: 'none'
|
|
1333
1351
|
}
|
|
1334
|
-
})), !isLargerThan1200 && /*#__PURE__*/
|
|
1352
|
+
})), !isLargerThan1200 && /*#__PURE__*/React__default.createElement(Collapse, {
|
|
1335
1353
|
"in": show
|
|
1336
|
-
}, /*#__PURE__*/
|
|
1354
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
1337
1355
|
marginTop: 5
|
|
1338
|
-
}, Navigation))))), isLargerThan1200 && /*#__PURE__*/
|
|
1356
|
+
}, Navigation))))), isLargerThan1200 && /*#__PURE__*/React__default.createElement(GridItem, {
|
|
1339
1357
|
area: "nav",
|
|
1340
1358
|
width: navbarWidth
|
|
1341
|
-
}, /*#__PURE__*/
|
|
1359
|
+
}, /*#__PURE__*/React__default.createElement(BorderedBox, {
|
|
1342
1360
|
boxShadow: "rgba(0, 0, 0, 0.035) 0px 2px 10px"
|
|
1343
|
-
}, Navigation)), /*#__PURE__*/
|
|
1361
|
+
}, Navigation)), /*#__PURE__*/React__default.createElement(GridItem, {
|
|
1344
1362
|
area: "main",
|
|
1345
1363
|
p: "0 20px 20px 10px"
|
|
1346
|
-
}, /*#__PURE__*/
|
|
1364
|
+
}, /*#__PURE__*/React__default.createElement(BorderedBox, {
|
|
1347
1365
|
borderRadius: "md",
|
|
1348
1366
|
boxShadow: "rgba(0, 0, 0, 0.035) 0px 2px 10px"
|
|
1349
1367
|
}, MainContent)));
|
|
@@ -1363,19 +1381,19 @@ var LoadingIndicator = function LoadingIndicator(_ref) {
|
|
|
1363
1381
|
_ref$speed = _ref.speed,
|
|
1364
1382
|
speed = _ref$speed === void 0 ? '0.5s' : _ref$speed,
|
|
1365
1383
|
className = _ref.className;
|
|
1366
|
-
return /*#__PURE__*/
|
|
1384
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
1367
1385
|
flexDirection: "column",
|
|
1368
1386
|
alignItems: "center",
|
|
1369
1387
|
"aria-label": "loading-indicator",
|
|
1370
1388
|
className: "loading-indicator " + (className != null ? className : '')
|
|
1371
|
-
}, /*#__PURE__*/
|
|
1389
|
+
}, /*#__PURE__*/React__default.createElement(Spinner, {
|
|
1372
1390
|
size: size,
|
|
1373
1391
|
color: colors.fill.action,
|
|
1374
1392
|
flex: "none",
|
|
1375
1393
|
thickness: thickness,
|
|
1376
1394
|
speed: speed,
|
|
1377
1395
|
mb: 2
|
|
1378
|
-
}), text && /*#__PURE__*/
|
|
1396
|
+
}), text && /*#__PURE__*/React__default.createElement(Text$2, {
|
|
1379
1397
|
fontSize: size,
|
|
1380
1398
|
lineHeight: "shorter",
|
|
1381
1399
|
fontWeight: "semibold"
|
|
@@ -1452,19 +1470,19 @@ var typography = {
|
|
|
1452
1470
|
var TableLoadingRows = function TableLoadingRows(_ref) {
|
|
1453
1471
|
var isLoading = _ref.isLoading,
|
|
1454
1472
|
onLoadMore = _ref.onLoadMore;
|
|
1455
|
-
return /*#__PURE__*/
|
|
1473
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
1456
1474
|
width: "full",
|
|
1457
1475
|
direction: "column",
|
|
1458
1476
|
justifyContent: "center",
|
|
1459
1477
|
alignItems: "center",
|
|
1460
1478
|
height: 20,
|
|
1461
1479
|
borderTopColor: colors.fill.light.quaternary
|
|
1462
|
-
}, isLoading ? /*#__PURE__*/
|
|
1480
|
+
}, isLoading ? /*#__PURE__*/React__default.createElement(Spinner, {
|
|
1463
1481
|
size: "lg",
|
|
1464
1482
|
color: colors.fill.action
|
|
1465
|
-
}) : /*#__PURE__*/
|
|
1483
|
+
}) : /*#__PURE__*/React__default.createElement(IconButton, {
|
|
1466
1484
|
"aria-label": "Fetch more rows",
|
|
1467
|
-
icon: /*#__PURE__*/
|
|
1485
|
+
icon: /*#__PURE__*/React__default.createElement(HiOutlineRefresh, null),
|
|
1468
1486
|
fontSize: typography.fontSizes['3xl'],
|
|
1469
1487
|
bg: "transparent",
|
|
1470
1488
|
shadow: "none",
|
|
@@ -1490,32 +1508,36 @@ function Table(_ref) {
|
|
|
1490
1508
|
borderTopRadius = _ref$borderTopRadius === void 0 ? true : _ref$borderTopRadius,
|
|
1491
1509
|
loadMore = _ref.loadMore;
|
|
1492
1510
|
var columnsAsConst = generateTableColumnsAsConst(columns);
|
|
1493
|
-
return /*#__PURE__*/
|
|
1511
|
+
return /*#__PURE__*/React__default.createElement(TableContainer, {
|
|
1494
1512
|
border: "none",
|
|
1495
1513
|
overflowX: "auto",
|
|
1496
1514
|
bg: "white",
|
|
1497
1515
|
borderRadius: "md",
|
|
1498
1516
|
borderTopLeftRadius: borderTopRadius ? 'md' : 0,
|
|
1499
1517
|
borderTopRightRadius: borderTopRadius ? 'md' : 0
|
|
1500
|
-
}, /*#__PURE__*/
|
|
1518
|
+
}, /*#__PURE__*/React__default.createElement(Table$2, {
|
|
1501
1519
|
variant: "unstyled"
|
|
1502
|
-
}, /*#__PURE__*/
|
|
1520
|
+
}, /*#__PURE__*/React__default.createElement(Thead, null, /*#__PURE__*/React__default.createElement(Tr, {
|
|
1521
|
+
_odd: {
|
|
1522
|
+
bg: colors.label.primary.dark
|
|
1523
|
+
}
|
|
1524
|
+
}, columnsAsConst.map(function (column) {
|
|
1503
1525
|
return (
|
|
1504
1526
|
/*#__PURE__*/
|
|
1505
1527
|
// @ts-ignore
|
|
1506
|
-
|
|
1528
|
+
React__default.createElement(Th, null, headers[column])
|
|
1507
1529
|
);
|
|
1508
|
-
}))), /*#__PURE__*/
|
|
1509
|
-
return /*#__PURE__*/
|
|
1530
|
+
}))), /*#__PURE__*/React__default.createElement(Tbody, null, body.map(function (row) {
|
|
1531
|
+
return /*#__PURE__*/React__default.createElement(Tr, null, columnsAsConst.map(function (column) {
|
|
1510
1532
|
return (
|
|
1511
1533
|
/*#__PURE__*/
|
|
1512
1534
|
// @ts-ignore
|
|
1513
|
-
|
|
1535
|
+
React__default.createElement(Td, null, row[column])
|
|
1514
1536
|
);
|
|
1515
1537
|
}));
|
|
1516
|
-
})), !body.length && /*#__PURE__*/
|
|
1538
|
+
})), !body.length && /*#__PURE__*/React__default.createElement(TableCaption, {
|
|
1517
1539
|
py: 10
|
|
1518
|
-
}, placeholder), ' '), loadMore && loading !== undefined && /*#__PURE__*/
|
|
1540
|
+
}, placeholder), ' '), loadMore && loading !== undefined && /*#__PURE__*/React__default.createElement(TableLoadingRows, {
|
|
1519
1541
|
isLoading: loading,
|
|
1520
1542
|
onLoadMore: loadMore
|
|
1521
1543
|
}));
|
|
@@ -1530,12 +1552,12 @@ var TabsWrapper = function TabsWrapper(_ref) {
|
|
|
1530
1552
|
navItems = _ref.navItems,
|
|
1531
1553
|
navIndex = _ref.navIndex,
|
|
1532
1554
|
setNavIndex = _ref.setNavIndex;
|
|
1533
|
-
return /*#__PURE__*/
|
|
1555
|
+
return /*#__PURE__*/React__default.createElement(Tabs$1, {
|
|
1534
1556
|
size: "lg",
|
|
1535
1557
|
variant: "simple",
|
|
1536
1558
|
index: navIndex,
|
|
1537
1559
|
onChange: setNavIndex
|
|
1538
|
-
}, /*#__PURE__*/
|
|
1560
|
+
}, /*#__PURE__*/React__default.createElement(TabList, {
|
|
1539
1561
|
flexDirection: {
|
|
1540
1562
|
base: 'column',
|
|
1541
1563
|
sm: 'row'
|
|
@@ -1548,7 +1570,7 @@ var TabsWrapper = function TabsWrapper(_ref) {
|
|
|
1548
1570
|
borderBottomLeftRadius: 0,
|
|
1549
1571
|
borderBottomRightRadius: 0
|
|
1550
1572
|
}, navItems.map(function (navItem) {
|
|
1551
|
-
return /*#__PURE__*/
|
|
1573
|
+
return /*#__PURE__*/React__default.createElement(Tab, null, navItem);
|
|
1552
1574
|
})), children);
|
|
1553
1575
|
};
|
|
1554
1576
|
|
|
@@ -1568,7 +1590,7 @@ var Text = function Text(_ref) {
|
|
|
1568
1590
|
_ref$color = _ref.color,
|
|
1569
1591
|
color = _ref$color === void 0 ? colors.label.primary.light : _ref$color,
|
|
1570
1592
|
className = _ref.className;
|
|
1571
|
-
return /*#__PURE__*/
|
|
1593
|
+
return /*#__PURE__*/React__default.createElement(Text$2, {
|
|
1572
1594
|
fontSize: fontSize,
|
|
1573
1595
|
lineHeight: lineHeight,
|
|
1574
1596
|
letterSpacing: letterSpacing,
|
|
@@ -1815,9 +1837,11 @@ function baseStyleRequiredIndicator() {
|
|
|
1815
1837
|
|
|
1816
1838
|
function baseStyleHelperText() {
|
|
1817
1839
|
return {
|
|
1840
|
+
position: 'absolute',
|
|
1818
1841
|
color: colors.label.secondary.light,
|
|
1819
1842
|
mt: 1,
|
|
1820
1843
|
ml: 1,
|
|
1844
|
+
bottom: 0,
|
|
1821
1845
|
fontSize: '13px'
|
|
1822
1846
|
};
|
|
1823
1847
|
}
|
|
@@ -1839,6 +1863,8 @@ var parts$2 = ['text', 'icon'];
|
|
|
1839
1863
|
function baseStyleText() {
|
|
1840
1864
|
return {
|
|
1841
1865
|
color: colors.label.error,
|
|
1866
|
+
position: 'absolute',
|
|
1867
|
+
bottom: 0,
|
|
1842
1868
|
mt: 1,
|
|
1843
1869
|
ml: 1,
|
|
1844
1870
|
fontSize: '13px'
|
|
@@ -2356,10 +2382,13 @@ var Switch = {
|
|
|
2356
2382
|
defaultProps: defaultProps$7
|
|
2357
2383
|
};
|
|
2358
2384
|
|
|
2359
|
-
var parts$7 = ['th', 'td', 'tr', 'body'];
|
|
2385
|
+
var parts$7 = ['th', 'td', 'tr', 'body', 'thead'];
|
|
2360
2386
|
var baseStyle$c = {
|
|
2387
|
+
thead: {
|
|
2388
|
+
bg: colors.label.primary.dark
|
|
2389
|
+
},
|
|
2361
2390
|
th: {
|
|
2362
|
-
height: '
|
|
2391
|
+
height: '100%',
|
|
2363
2392
|
width: '100%',
|
|
2364
2393
|
bg: colors.label.primary.dark,
|
|
2365
2394
|
padding: '5px 8px !important'
|
|
@@ -2369,10 +2398,10 @@ var baseStyle$c = {
|
|
|
2369
2398
|
display: 'flex',
|
|
2370
2399
|
alignItems: 'center',
|
|
2371
2400
|
width: '100%',
|
|
2372
|
-
height: '
|
|
2401
|
+
height: '100%',
|
|
2373
2402
|
borderRadius: 'md',
|
|
2374
2403
|
_odd: {
|
|
2375
|
-
|
|
2404
|
+
bg: colors.fill.light.tertiary
|
|
2376
2405
|
}
|
|
2377
2406
|
},
|
|
2378
2407
|
td: {
|
|
@@ -2737,10 +2766,12 @@ var customXQChakraTheme = /*#__PURE__*/extendTheme( /*#__PURE__*/_extends({
|
|
|
2737
2766
|
*/
|
|
2738
2767
|
|
|
2739
2768
|
var XQThemeProvider = function XQThemeProvider(_ref) {
|
|
2740
|
-
var children = _ref.children
|
|
2741
|
-
|
|
2769
|
+
var children = _ref.children,
|
|
2770
|
+
cssVarsRoot = _ref.cssVarsRoot;
|
|
2771
|
+
return /*#__PURE__*/React__default.createElement(ChakraProvider, {
|
|
2742
2772
|
theme: customXQChakraTheme,
|
|
2743
|
-
resetCSS: true
|
|
2773
|
+
resetCSS: true,
|
|
2774
|
+
cssVarsRoot: cssVarsRoot
|
|
2744
2775
|
}, children);
|
|
2745
2776
|
};
|
|
2746
2777
|
|
|
@@ -2770,5 +2801,5 @@ function formatErrorResponse(error) {
|
|
|
2770
2801
|
};
|
|
2771
2802
|
}
|
|
2772
2803
|
|
|
2773
|
-
export { Banner, Breadcrumbs, Button, Form, FormSection, GoogleButton, Input, Layout, LoadingIndicator, SpinnerButton, Table, TabsWrapper, Text, XQThemeProvider, formatErrorResponse };
|
|
2804
|
+
export { Banner, Breadcrumbs, Button, Form, FormSection, GoogleButton, Input, Layout, LoadingIndicator, SpinnerButton, Table, TabsWrapper, Text, XQThemeProvider, colors, formatErrorResponse };
|
|
2774
2805
|
//# sourceMappingURL=ui-core.esm.js.map
|