@xqmsg/ui-core 0.12.1 → 0.14.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/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 +84 -36
- 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 +203 -156
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +8 -7
- package/src/components/form/hooks/useFormHandler.tsx +2 -2
- 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 +18 -2
- package/src/components/input/StackedSwitch/index.tsx +0 -2
- package/src/components/input/components/dropdown/index.tsx +1 -1
- package/src/components/input/components/token/index.tsx +2 -2
- package/src/components/input/index.tsx +148 -166
- 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,19 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { useMemo, useCallback, useRef, useEffect, useState } 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
3
|
import { FormProvider, useWatch, Controller } from 'react-hook-form';
|
|
4
|
-
import colors$1 from 'src/theme/foundations/colors';
|
|
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 = "
|
|
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";
|
|
17
16
|
|
|
18
17
|
var blue = {
|
|
19
18
|
50: 'hsl(209, 100%, 95%)',
|
|
@@ -162,28 +161,28 @@ var Banner = function Banner(_ref) {
|
|
|
162
161
|
var Icon = useMemo(function () {
|
|
163
162
|
switch (variant) {
|
|
164
163
|
case 'error':
|
|
165
|
-
return /*#__PURE__*/
|
|
164
|
+
return /*#__PURE__*/React__default.createElement(Image, {
|
|
166
165
|
src: ErrorIcon,
|
|
167
166
|
alt: "error",
|
|
168
167
|
boxSize: "16px"
|
|
169
168
|
});
|
|
170
169
|
|
|
171
170
|
case 'neutral':
|
|
172
|
-
return /*#__PURE__*/
|
|
171
|
+
return /*#__PURE__*/React__default.createElement(Image, {
|
|
173
172
|
src: NeutralIcon,
|
|
174
173
|
alt: "neutral",
|
|
175
174
|
boxSize: "16px"
|
|
176
175
|
});
|
|
177
176
|
|
|
178
177
|
case 'positive':
|
|
179
|
-
return /*#__PURE__*/
|
|
178
|
+
return /*#__PURE__*/React__default.createElement(Image, {
|
|
180
179
|
src: PositiveIcon,
|
|
181
180
|
alt: "positive",
|
|
182
181
|
boxSize: "16px"
|
|
183
182
|
});
|
|
184
183
|
|
|
185
184
|
case 'warning':
|
|
186
|
-
return /*#__PURE__*/
|
|
185
|
+
return /*#__PURE__*/React__default.createElement(Image, {
|
|
187
186
|
src: WarningIcon,
|
|
188
187
|
alt: "warning",
|
|
189
188
|
boxSize: "16px"
|
|
@@ -193,14 +192,14 @@ var Banner = function Banner(_ref) {
|
|
|
193
192
|
return null;
|
|
194
193
|
}
|
|
195
194
|
}, [variant]);
|
|
196
|
-
return /*#__PURE__*/
|
|
195
|
+
return /*#__PURE__*/React__default.createElement(Alert$1, {
|
|
197
196
|
variant: variant
|
|
198
|
-
}, /*#__PURE__*/
|
|
197
|
+
}, /*#__PURE__*/React__default.createElement(AlertDescription, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
199
198
|
pb: "8px"
|
|
200
|
-
}, Icon), message, onClick && buttonText && /*#__PURE__*/
|
|
199
|
+
}, Icon), message, onClick && buttonText && /*#__PURE__*/React__default.createElement(Flex, {
|
|
201
200
|
pt: "8px",
|
|
202
201
|
justifyContent: "flex-end"
|
|
203
|
-
}, /*#__PURE__*/
|
|
202
|
+
}, /*#__PURE__*/React__default.createElement(Button$2, {
|
|
204
203
|
size: "sm",
|
|
205
204
|
bg: "white",
|
|
206
205
|
color: colors.fill.action,
|
|
@@ -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,27 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
543
542
|
}, DropdownContent);
|
|
544
543
|
};
|
|
545
544
|
|
|
546
|
-
var
|
|
545
|
+
var useDidMountEffect = function useDidMountEffect(func, deps) {
|
|
546
|
+
var didMount = useRef(false);
|
|
547
|
+
useEffect(function () {
|
|
548
|
+
if (didMount.current) func();else didMount.current = true; // eslint-disable-next-line
|
|
549
|
+
}, deps);
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
var _excluded$1 = ["isRequired", "options", "name", "setValue", "handleOnChange", "value"];
|
|
547
553
|
/**
|
|
548
554
|
* A functional React component utilized to render the `StackedSelect` component.
|
|
549
555
|
*/
|
|
550
556
|
|
|
551
|
-
var StackedSelect = /*#__PURE__*/
|
|
557
|
+
var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
558
|
+
var _options$find$label, _options$find;
|
|
559
|
+
|
|
552
560
|
var isRequired = _ref2.isRequired,
|
|
553
561
|
options = _ref2.options,
|
|
554
562
|
name = _ref2.name,
|
|
555
563
|
setValue = _ref2.setValue,
|
|
564
|
+
handleOnChange = _ref2.handleOnChange,
|
|
565
|
+
value = _ref2.value,
|
|
556
566
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
|
|
557
567
|
|
|
558
568
|
var dropdownRef = useRef(null);
|
|
@@ -561,10 +571,19 @@ var StackedSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
561
571
|
isFocussed = _useState[0],
|
|
562
572
|
setIsFocussed = _useState[1];
|
|
563
573
|
|
|
564
|
-
var _useState2 = useState(
|
|
574
|
+
var _useState2 = useState((_options$find$label = (_options$find = options.find(function (option) {
|
|
575
|
+
return option.value === value;
|
|
576
|
+
})) == null ? void 0 : _options$find.label) != null ? _options$find$label : ''),
|
|
565
577
|
selectedOption = _useState2[0],
|
|
566
578
|
setSelectedOption = _useState2[1];
|
|
567
579
|
|
|
580
|
+
useDidMountEffect(function () {
|
|
581
|
+
var _options$find$label2, _options$find2;
|
|
582
|
+
|
|
583
|
+
setSelectedOption((_options$find$label2 = (_options$find2 = options.find(function (option) {
|
|
584
|
+
return option.value === value;
|
|
585
|
+
})) == null ? void 0 : _options$find2.label) != null ? _options$find$label2 : '');
|
|
586
|
+
}, [value]);
|
|
568
587
|
useOutsideClick({
|
|
569
588
|
ref: dropdownRef,
|
|
570
589
|
handler: function handler() {
|
|
@@ -573,15 +592,19 @@ var StackedSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
573
592
|
});
|
|
574
593
|
|
|
575
594
|
var handleOnSelectItem = function handleOnSelectItem(option) {
|
|
595
|
+
if (handleOnChange) {
|
|
596
|
+
handleOnChange(option.value);
|
|
597
|
+
}
|
|
598
|
+
|
|
576
599
|
setValue(name, option.value);
|
|
577
600
|
setSelectedOption(option.label);
|
|
578
601
|
setIsFocussed(false);
|
|
579
602
|
};
|
|
580
603
|
|
|
581
|
-
return /*#__PURE__*/
|
|
604
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
582
605
|
ref: dropdownRef,
|
|
583
606
|
position: "relative"
|
|
584
|
-
}, /*#__PURE__*/
|
|
607
|
+
}, /*#__PURE__*/React__default.createElement(InputGroup, null, /*#__PURE__*/React__default.createElement(Input$2, Object.assign({
|
|
585
608
|
isRequired: isRequired
|
|
586
609
|
}, props, {
|
|
587
610
|
ref: _ref,
|
|
@@ -593,16 +616,16 @@ var StackedSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
593
616
|
fontSize: "13px",
|
|
594
617
|
textShadow: "0 0 0 " + colors.label.primary.light,
|
|
595
618
|
value: selectedOption
|
|
596
|
-
})), /*#__PURE__*/
|
|
619
|
+
})), /*#__PURE__*/React__default.createElement(InputRightElement, {
|
|
597
620
|
cursor: "pointer",
|
|
598
621
|
onClick: function onClick() {
|
|
599
622
|
return setIsFocussed(!isFocussed);
|
|
600
623
|
}
|
|
601
|
-
}, /*#__PURE__*/
|
|
624
|
+
}, /*#__PURE__*/React__default.createElement(Image, {
|
|
602
625
|
src: SubtractIcon,
|
|
603
626
|
alt: "subtract",
|
|
604
627
|
boxSize: "16px"
|
|
605
|
-
}))), isFocussed && /*#__PURE__*/
|
|
628
|
+
}))), isFocussed && /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
606
629
|
onSelectItem: function onSelectItem(option) {
|
|
607
630
|
return handleOnSelectItem(option);
|
|
608
631
|
},
|
|
@@ -614,32 +637,32 @@ var StackedSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
614
637
|
* A functional React component utilized to render the `StackedTextarea` component.
|
|
615
638
|
*/
|
|
616
639
|
|
|
617
|
-
var StackedTextarea = /*#__PURE__*/
|
|
640
|
+
var StackedTextarea = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
618
641
|
var props = _extends({}, _ref2);
|
|
619
642
|
|
|
620
|
-
return /*#__PURE__*/
|
|
643
|
+
return /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
|
|
621
644
|
ref: _ref
|
|
622
645
|
}, props));
|
|
623
646
|
});
|
|
624
647
|
|
|
625
|
-
var CloseIcon = "
|
|
648
|
+
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
649
|
|
|
627
650
|
var Token = function Token(_ref) {
|
|
628
651
|
var label = _ref.label,
|
|
629
652
|
onDelete = _ref.onDelete;
|
|
630
|
-
return /*#__PURE__*/
|
|
653
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
631
654
|
key: label,
|
|
632
655
|
borderRadius: "full",
|
|
633
656
|
backgroundColor: "#7676801F",
|
|
634
657
|
alignItems: "center",
|
|
635
|
-
width
|
|
658
|
+
// width="100%"
|
|
636
659
|
pl: "8px",
|
|
637
660
|
pr: "4px",
|
|
638
661
|
py: "2px"
|
|
639
|
-
}, /*#__PURE__*/
|
|
640
|
-
color: colors
|
|
662
|
+
}, /*#__PURE__*/React__default.createElement(Text$2, {
|
|
663
|
+
color: colors.label.primary.light,
|
|
641
664
|
fontSize: "13px"
|
|
642
|
-
}, label), /*#__PURE__*/
|
|
665
|
+
}, label), /*#__PURE__*/React__default.createElement(Image, {
|
|
643
666
|
pl: "4px",
|
|
644
667
|
boxSize: "16px",
|
|
645
668
|
src: CloseIcon,
|
|
@@ -652,7 +675,7 @@ var Token = function Token(_ref) {
|
|
|
652
675
|
* A functional React component utilized to render the `StackedMultiSelect` component.
|
|
653
676
|
*/
|
|
654
677
|
|
|
655
|
-
var StackedMultiSelect = /*#__PURE__*/
|
|
678
|
+
var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
656
679
|
var options = _ref2.options,
|
|
657
680
|
setValue = _ref2.setValue,
|
|
658
681
|
control = _ref2.control,
|
|
@@ -740,10 +763,10 @@ var StackedMultiSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
740
763
|
});
|
|
741
764
|
};
|
|
742
765
|
|
|
743
|
-
return /*#__PURE__*/
|
|
766
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
744
767
|
ref: dropdownRef,
|
|
745
768
|
position: "relative"
|
|
746
|
-
}, /*#__PURE__*/
|
|
769
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
747
770
|
fontSize: "13px",
|
|
748
771
|
border: isFocussed ? '2px solid' : '1px solid',
|
|
749
772
|
borderColor: isFocussed ? colors.border.focus : colors.border["default"],
|
|
@@ -757,30 +780,30 @@ var StackedMultiSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
757
780
|
},
|
|
758
781
|
bg: disabled ? colors.fill.light.quaternary : '#ffffff',
|
|
759
782
|
cursor: disabled ? 'not-allowed' : 'pointer'
|
|
760
|
-
}, /*#__PURE__*/
|
|
783
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
761
784
|
height: "28px",
|
|
762
785
|
alignItems: "center"
|
|
763
786
|
}, localValues.length ? localValues.map(function (option) {
|
|
764
|
-
return /*#__PURE__*/
|
|
787
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
765
788
|
mr: "4px"
|
|
766
|
-
}, /*#__PURE__*/
|
|
789
|
+
}, /*#__PURE__*/React__default.createElement(Token, {
|
|
767
790
|
label: option.label,
|
|
768
791
|
onDelete: function onDelete() {
|
|
769
792
|
return handleDelete(option);
|
|
770
793
|
}
|
|
771
794
|
}));
|
|
772
|
-
}) : /*#__PURE__*/
|
|
795
|
+
}) : /*#__PURE__*/React__default.createElement(Text$2, {
|
|
773
796
|
color: colors.label.secondary.light,
|
|
774
797
|
fontSize: "13px"
|
|
775
|
-
}, placeholder)), /*#__PURE__*/
|
|
798
|
+
}, placeholder)), /*#__PURE__*/React__default.createElement(Flex, {
|
|
776
799
|
width: "39px",
|
|
777
800
|
justifyContent: "center",
|
|
778
801
|
alignItems: "center"
|
|
779
|
-
}, /*#__PURE__*/
|
|
802
|
+
}, /*#__PURE__*/React__default.createElement(Image, {
|
|
780
803
|
src: SubtractIcon,
|
|
781
804
|
alt: "subtract",
|
|
782
805
|
boxSize: "16px"
|
|
783
|
-
}))), isFocussed && /*#__PURE__*/
|
|
806
|
+
}))), isFocussed && /*#__PURE__*/React__default.createElement(Dropdown, {
|
|
784
807
|
onSelectItem: function onSelectItem(option) {
|
|
785
808
|
return handleChange(option);
|
|
786
809
|
},
|
|
@@ -792,7 +815,7 @@ var StackedMultiSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
792
815
|
* A functional React component utilized to render the `StackedPilledInput` component.
|
|
793
816
|
*/
|
|
794
817
|
|
|
795
|
-
var StackedPilledInput = /*#__PURE__*/
|
|
818
|
+
var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
796
819
|
var name = _ref2.name,
|
|
797
820
|
setValue = _ref2.setValue,
|
|
798
821
|
control = _ref2.control,
|
|
@@ -926,9 +949,9 @@ var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
926
949
|
ref: inputWrapperRef,
|
|
927
950
|
handler: onBlur
|
|
928
951
|
});
|
|
929
|
-
return /*#__PURE__*/
|
|
952
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
930
953
|
position: "relative"
|
|
931
|
-
}, /*#__PURE__*/
|
|
954
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
932
955
|
fontSize: "13px",
|
|
933
956
|
border: isFocussed ? '2px solid' : '1px solid',
|
|
934
957
|
borderColor: isFocussed ? colors.border.focus : colors.border["default"],
|
|
@@ -947,19 +970,28 @@ var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
947
970
|
bg: disabled ? colors.fill.light.quaternary : '#ffffff',
|
|
948
971
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
949
972
|
ref: inputWrapperRef
|
|
950
|
-
}, /*#__PURE__*/
|
|
973
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
951
974
|
height: "28px",
|
|
952
975
|
alignItems: "center",
|
|
953
|
-
width
|
|
976
|
+
// width="fit-content"
|
|
977
|
+
// maxW="70%"
|
|
978
|
+
overflowX: "auto",
|
|
979
|
+
style: {
|
|
980
|
+
scrollbarWidth: 'none'
|
|
981
|
+
/* Firefox */
|
|
982
|
+
|
|
983
|
+
}
|
|
954
984
|
}, lastestFormValueToArray.length ? lastestFormValueToArray.map(function (label, index) {
|
|
955
|
-
return /*#__PURE__*/
|
|
985
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
956
986
|
mr: "4px",
|
|
957
987
|
border: tokenIndex === index ? "2px solid " + colors.border.focus : 'none',
|
|
958
988
|
borderRadius: "full",
|
|
959
989
|
onClick: function onClick() {
|
|
960
990
|
return setTokenIndex(index);
|
|
961
|
-
}
|
|
962
|
-
|
|
991
|
+
},
|
|
992
|
+
// width="fit-content"
|
|
993
|
+
width: "100%"
|
|
994
|
+
}, /*#__PURE__*/React__default.createElement(Token, {
|
|
963
995
|
label: label,
|
|
964
996
|
onDelete: function onDelete(e) {
|
|
965
997
|
e.stopPropagation();
|
|
@@ -967,12 +999,12 @@ var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
967
999
|
onRemoveTag(index);
|
|
968
1000
|
}
|
|
969
1001
|
}));
|
|
970
|
-
}) : /*#__PURE__*/
|
|
1002
|
+
}) : /*#__PURE__*/React__default.createElement(Text$2, {
|
|
971
1003
|
color: colors.label.secondary.light,
|
|
972
1004
|
fontSize: "13px"
|
|
973
|
-
}, placeholder)), /*#__PURE__*/
|
|
1005
|
+
}, placeholder)), /*#__PURE__*/React__default.createElement(Flex, {
|
|
974
1006
|
flex: 1
|
|
975
|
-
}, /*#__PURE__*/
|
|
1007
|
+
}, /*#__PURE__*/React__default.createElement(Input$2, {
|
|
976
1008
|
onKeyDown: onHandleKeyDown,
|
|
977
1009
|
type: "text",
|
|
978
1010
|
padding: 0,
|
|
@@ -998,12 +1030,11 @@ var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
998
1030
|
* A functional React component utilized to render the `StackedSwitch` component.
|
|
999
1031
|
*/
|
|
1000
1032
|
|
|
1001
|
-
var StackedSwitch = /*#__PURE__*/
|
|
1033
|
+
var StackedSwitch = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
1002
1034
|
var isRequired = _ref2.isRequired,
|
|
1003
1035
|
_onChange = _ref2.onChange,
|
|
1004
1036
|
value = _ref2.value;
|
|
1005
|
-
|
|
1006
|
-
return /*#__PURE__*/React.createElement(Switch$1, {
|
|
1037
|
+
return /*#__PURE__*/React__default.createElement(Switch$1, {
|
|
1007
1038
|
size: "lg",
|
|
1008
1039
|
ref: _ref,
|
|
1009
1040
|
isRequired: isRequired,
|
|
@@ -1022,7 +1053,7 @@ var StackedSwitch = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
|
|
|
1022
1053
|
var Label$1 = function Label(_ref) {
|
|
1023
1054
|
var isRequired = _ref.isRequired,
|
|
1024
1055
|
label = _ref.label;
|
|
1025
|
-
return /*#__PURE__*/
|
|
1056
|
+
return /*#__PURE__*/React__default.createElement(FormLabel$1, null, label, isRequired && /*#__PURE__*/React__default.createElement(Box, {
|
|
1026
1057
|
ml: 1,
|
|
1027
1058
|
color: colors.label.error
|
|
1028
1059
|
}, "*"));
|
|
@@ -1051,10 +1082,11 @@ function Input(_ref) {
|
|
|
1051
1082
|
disabled = _ref.disabled,
|
|
1052
1083
|
onChange = _ref.onChange,
|
|
1053
1084
|
setValue = _ref.setValue;
|
|
1054
|
-
|
|
1085
|
+
|
|
1086
|
+
var selectedInputField = function selectedInputField(onChange, onBlur, ref, value) {
|
|
1055
1087
|
switch (inputType) {
|
|
1056
1088
|
case 'text':
|
|
1057
|
-
return /*#__PURE__*/
|
|
1089
|
+
return /*#__PURE__*/React__default.createElement(StackedInput, {
|
|
1058
1090
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1059
1091
|
"aria-label": ariaLabel,
|
|
1060
1092
|
name: name,
|
|
@@ -1071,11 +1103,10 @@ function Input(_ref) {
|
|
|
1071
1103
|
});
|
|
1072
1104
|
|
|
1073
1105
|
case 'radio':
|
|
1074
|
-
return /*#__PURE__*/
|
|
1106
|
+
return /*#__PURE__*/React__default.createElement(StackedRadioGroup, {
|
|
1075
1107
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1076
1108
|
name: name,
|
|
1077
1109
|
id: name,
|
|
1078
|
-
isRequired: isRequired,
|
|
1079
1110
|
isInvalid: isInvalid,
|
|
1080
1111
|
options: options,
|
|
1081
1112
|
onChange: onChange,
|
|
@@ -1086,30 +1117,30 @@ function Input(_ref) {
|
|
|
1086
1117
|
});
|
|
1087
1118
|
|
|
1088
1119
|
case 'select':
|
|
1089
|
-
return /*#__PURE__*/
|
|
1120
|
+
return /*#__PURE__*/React__default.createElement(StackedSelect, {
|
|
1090
1121
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1091
1122
|
name: name,
|
|
1092
1123
|
id: name,
|
|
1093
1124
|
isRequired: isRequired,
|
|
1094
1125
|
isInvalid: isInvalid,
|
|
1095
1126
|
options: options,
|
|
1096
|
-
|
|
1127
|
+
handleOnChange: onChange,
|
|
1097
1128
|
onBlur: onBlur,
|
|
1098
1129
|
setValue: setValue,
|
|
1099
1130
|
control: control,
|
|
1100
1131
|
ref: ref,
|
|
1101
1132
|
disabled: disabled,
|
|
1102
1133
|
value: value,
|
|
1134
|
+
defaultValue: defaultValue,
|
|
1103
1135
|
placeholder: placeholder
|
|
1104
1136
|
});
|
|
1105
1137
|
|
|
1106
1138
|
case 'textarea':
|
|
1107
|
-
return /*#__PURE__*/
|
|
1139
|
+
return /*#__PURE__*/React__default.createElement(StackedTextarea, {
|
|
1108
1140
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1109
1141
|
name: name,
|
|
1110
1142
|
id: name,
|
|
1111
1143
|
maxLength: maxLength,
|
|
1112
|
-
isRequired: isRequired,
|
|
1113
1144
|
isInvalid: isInvalid,
|
|
1114
1145
|
onChange: onChange,
|
|
1115
1146
|
onBlur: onBlur,
|
|
@@ -1119,11 +1150,10 @@ function Input(_ref) {
|
|
|
1119
1150
|
});
|
|
1120
1151
|
|
|
1121
1152
|
case 'checkbox':
|
|
1122
|
-
return /*#__PURE__*/
|
|
1153
|
+
return /*#__PURE__*/React__default.createElement(StackedCheckboxGroup, {
|
|
1123
1154
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1124
1155
|
name: name,
|
|
1125
1156
|
id: name,
|
|
1126
|
-
isRequired: isRequired,
|
|
1127
1157
|
isInvalid: isInvalid,
|
|
1128
1158
|
options: options,
|
|
1129
1159
|
onChange: onChange,
|
|
@@ -1134,7 +1164,7 @@ function Input(_ref) {
|
|
|
1134
1164
|
});
|
|
1135
1165
|
|
|
1136
1166
|
case 'multi-select':
|
|
1137
|
-
return /*#__PURE__*/
|
|
1167
|
+
return /*#__PURE__*/React__default.createElement(StackedMultiSelect, {
|
|
1138
1168
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1139
1169
|
name: name,
|
|
1140
1170
|
id: name,
|
|
@@ -1151,7 +1181,7 @@ function Input(_ref) {
|
|
|
1151
1181
|
});
|
|
1152
1182
|
|
|
1153
1183
|
case 'pilled-text':
|
|
1154
|
-
return /*#__PURE__*/
|
|
1184
|
+
return /*#__PURE__*/React__default.createElement(StackedPilledInput, {
|
|
1155
1185
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1156
1186
|
"aria-label": ariaLabel,
|
|
1157
1187
|
name: name,
|
|
@@ -1167,7 +1197,7 @@ function Input(_ref) {
|
|
|
1167
1197
|
});
|
|
1168
1198
|
|
|
1169
1199
|
case 'switch':
|
|
1170
|
-
return /*#__PURE__*/
|
|
1200
|
+
return /*#__PURE__*/React__default.createElement(StackedSwitch, {
|
|
1171
1201
|
className: "input-" + inputType + " " + (className != null ? className : ''),
|
|
1172
1202
|
name: name,
|
|
1173
1203
|
id: name,
|
|
@@ -1181,29 +1211,32 @@ function Input(_ref) {
|
|
|
1181
1211
|
default:
|
|
1182
1212
|
return null;
|
|
1183
1213
|
}
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1214
|
+
};
|
|
1215
|
+
|
|
1216
|
+
return /*#__PURE__*/React__default.createElement(Controller, {
|
|
1186
1217
|
control: control,
|
|
1187
1218
|
name: name,
|
|
1188
1219
|
defaultValue: defaultValue,
|
|
1189
1220
|
rules: {
|
|
1190
1221
|
required: isRequired
|
|
1191
1222
|
},
|
|
1223
|
+
|
|
1224
|
+
/** @ts-ignore: issues with implicit */
|
|
1192
1225
|
render: function render(_ref2) {
|
|
1193
1226
|
var _ref2$field = _ref2.field,
|
|
1194
1227
|
onBlur = _ref2$field.onBlur,
|
|
1195
1228
|
fieldOnChange = _ref2$field.onChange,
|
|
1196
1229
|
ref = _ref2$field.ref,
|
|
1197
1230
|
value = _ref2$field.value;
|
|
1198
|
-
return /*#__PURE__*/
|
|
1231
|
+
return /*#__PURE__*/React__default.createElement(FormControl, {
|
|
1199
1232
|
id: name,
|
|
1200
1233
|
isInvalid: isInvalid,
|
|
1201
1234
|
position: "relative",
|
|
1202
|
-
py: label ? 6 : 0
|
|
1203
|
-
}, label && /*#__PURE__*/
|
|
1235
|
+
py: label || helperText || isInvalid ? 6 : 0
|
|
1236
|
+
}, label && /*#__PURE__*/React__default.createElement(Label$1, {
|
|
1204
1237
|
label: label,
|
|
1205
1238
|
isRequired: isRequired
|
|
1206
|
-
}), selectedInputField(onChange ? onChange : fieldOnChange, onBlur, ref, value), isInvalid ? /*#__PURE__*/
|
|
1239
|
+
}), selectedInputField(onChange ? onChange : fieldOnChange, onBlur, ref, value), isInvalid ? /*#__PURE__*/React__default.createElement(FormErrorMessage, null, errorText) : helperText && /*#__PURE__*/React__default.createElement(FormHelperText, null, helperText));
|
|
1207
1240
|
}
|
|
1208
1241
|
});
|
|
1209
1242
|
}
|
|
@@ -1226,7 +1259,7 @@ function FormSection(_ref) {
|
|
|
1226
1259
|
columns = _ref$columns === void 0 ? 1 : _ref$columns,
|
|
1227
1260
|
_ref$spacing = _ref.spacing,
|
|
1228
1261
|
spacing = _ref$spacing === void 0 ? 0 : _ref$spacing;
|
|
1229
|
-
return /*#__PURE__*/
|
|
1262
|
+
return /*#__PURE__*/React__default.createElement(SimpleGrid, {
|
|
1230
1263
|
columns: columns,
|
|
1231
1264
|
spacing: spacing,
|
|
1232
1265
|
className: "form-section " + (className != null ? className : '')
|
|
@@ -1240,7 +1273,7 @@ function FormSection(_ref) {
|
|
|
1240
1273
|
ariaLabel = _ref2.ariaLabel,
|
|
1241
1274
|
disabled = _ref2.disabled,
|
|
1242
1275
|
defaultValue = _ref2.defaultValue;
|
|
1243
|
-
return /*#__PURE__*/
|
|
1276
|
+
return /*#__PURE__*/React__default.createElement(Input, {
|
|
1244
1277
|
control: form.control,
|
|
1245
1278
|
label: label,
|
|
1246
1279
|
inputType: inputType,
|
|
@@ -1251,7 +1284,8 @@ function FormSection(_ref) {
|
|
|
1251
1284
|
isRequired: isRequired,
|
|
1252
1285
|
maxLength: maxLength,
|
|
1253
1286
|
isInvalid: !!form.formState.errors[name],
|
|
1254
|
-
defaultValue: defaultValue
|
|
1287
|
+
defaultValue: defaultValue,
|
|
1288
|
+
setValue: form.setValue
|
|
1255
1289
|
});
|
|
1256
1290
|
}));
|
|
1257
1291
|
}
|
|
@@ -1265,7 +1299,7 @@ var BorderedBox = function BorderedBox(_ref) {
|
|
|
1265
1299
|
boxShadow = _ref.boxShadow,
|
|
1266
1300
|
_ref$borderRadius = _ref.borderRadius,
|
|
1267
1301
|
borderRadius = _ref$borderRadius === void 0 ? 'none' : _ref$borderRadius;
|
|
1268
|
-
return /*#__PURE__*/
|
|
1302
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
1269
1303
|
boxShadow: boxShadow,
|
|
1270
1304
|
borderRadius: borderRadius,
|
|
1271
1305
|
bg: "white",
|
|
@@ -1294,7 +1328,7 @@ var Layout = function Layout(_ref) {
|
|
|
1294
1328
|
show = _useState[0],
|
|
1295
1329
|
setShow = _useState[1];
|
|
1296
1330
|
|
|
1297
|
-
return /*#__PURE__*/
|
|
1331
|
+
return /*#__PURE__*/React__default.createElement(Grid, {
|
|
1298
1332
|
templateAreas: isLargerThan1200 ? "\"nav header\" \"nav main\"" : "\"header\" \"main\"",
|
|
1299
1333
|
gridTemplateRows: "auto 1fr",
|
|
1300
1334
|
gridTemplateColumns: isLargerThan1200 ? navbarWidth + " 1fr" : '100% 1fr',
|
|
@@ -1302,23 +1336,23 @@ var Layout = function Layout(_ref) {
|
|
|
1302
1336
|
width: "100%",
|
|
1303
1337
|
gap: "4",
|
|
1304
1338
|
bg: "#f5f5f5"
|
|
1305
|
-
}, /*#__PURE__*/
|
|
1339
|
+
}, /*#__PURE__*/React__default.createElement(GridItem, {
|
|
1306
1340
|
area: "header",
|
|
1307
1341
|
p: "20px 20px 10px 10px",
|
|
1308
1342
|
minHeight: "100px"
|
|
1309
|
-
}, /*#__PURE__*/
|
|
1343
|
+
}, /*#__PURE__*/React__default.createElement(BorderedBox, {
|
|
1310
1344
|
borderRadius: "md",
|
|
1311
1345
|
boxShadow: "rgba(235,237,238,.75) 8px 0 30px 10px"
|
|
1312
|
-
}, /*#__PURE__*/
|
|
1346
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
1313
1347
|
flexDirection: "column",
|
|
1314
1348
|
justifyContent: "center",
|
|
1315
1349
|
width: "100%",
|
|
1316
1350
|
pl: '32px',
|
|
1317
1351
|
py: 5
|
|
1318
|
-
}, /*#__PURE__*/
|
|
1352
|
+
}, /*#__PURE__*/React__default.createElement(Flex, {
|
|
1319
1353
|
justifyContent: "space-between",
|
|
1320
1354
|
alignItems: "center"
|
|
1321
|
-
}, Header, !isLargerThan1200 && /*#__PURE__*/
|
|
1355
|
+
}, Header, !isLargerThan1200 && /*#__PURE__*/React__default.createElement(IconButton, {
|
|
1322
1356
|
size: "md",
|
|
1323
1357
|
variant: "unstyled",
|
|
1324
1358
|
alignSelf: "flex-start",
|
|
@@ -1327,23 +1361,23 @@ var Layout = function Layout(_ref) {
|
|
|
1327
1361
|
onClick: function onClick() {
|
|
1328
1362
|
return setShow(!show);
|
|
1329
1363
|
},
|
|
1330
|
-
icon: show ? /*#__PURE__*/
|
|
1364
|
+
icon: show ? /*#__PURE__*/React__default.createElement(CloseIcon$1, null) : /*#__PURE__*/React__default.createElement(HamburgerIcon, null),
|
|
1331
1365
|
_focus: {
|
|
1332
1366
|
boxShadow: 'none'
|
|
1333
1367
|
}
|
|
1334
|
-
})), !isLargerThan1200 && /*#__PURE__*/
|
|
1368
|
+
})), !isLargerThan1200 && /*#__PURE__*/React__default.createElement(Collapse, {
|
|
1335
1369
|
"in": show
|
|
1336
|
-
}, /*#__PURE__*/
|
|
1370
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
1337
1371
|
marginTop: 5
|
|
1338
|
-
}, Navigation))))), isLargerThan1200 && /*#__PURE__*/
|
|
1372
|
+
}, Navigation))))), isLargerThan1200 && /*#__PURE__*/React__default.createElement(GridItem, {
|
|
1339
1373
|
area: "nav",
|
|
1340
1374
|
width: navbarWidth
|
|
1341
|
-
}, /*#__PURE__*/
|
|
1375
|
+
}, /*#__PURE__*/React__default.createElement(BorderedBox, {
|
|
1342
1376
|
boxShadow: "rgba(0, 0, 0, 0.035) 0px 2px 10px"
|
|
1343
|
-
}, Navigation)), /*#__PURE__*/
|
|
1377
|
+
}, Navigation)), /*#__PURE__*/React__default.createElement(GridItem, {
|
|
1344
1378
|
area: "main",
|
|
1345
1379
|
p: "0 20px 20px 10px"
|
|
1346
|
-
}, /*#__PURE__*/
|
|
1380
|
+
}, /*#__PURE__*/React__default.createElement(BorderedBox, {
|
|
1347
1381
|
borderRadius: "md",
|
|
1348
1382
|
boxShadow: "rgba(0, 0, 0, 0.035) 0px 2px 10px"
|
|
1349
1383
|
}, MainContent)));
|
|
@@ -1363,19 +1397,19 @@ var LoadingIndicator = function LoadingIndicator(_ref) {
|
|
|
1363
1397
|
_ref$speed = _ref.speed,
|
|
1364
1398
|
speed = _ref$speed === void 0 ? '0.5s' : _ref$speed,
|
|
1365
1399
|
className = _ref.className;
|
|
1366
|
-
return /*#__PURE__*/
|
|
1400
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
1367
1401
|
flexDirection: "column",
|
|
1368
1402
|
alignItems: "center",
|
|
1369
1403
|
"aria-label": "loading-indicator",
|
|
1370
1404
|
className: "loading-indicator " + (className != null ? className : '')
|
|
1371
|
-
}, /*#__PURE__*/
|
|
1405
|
+
}, /*#__PURE__*/React__default.createElement(Spinner, {
|
|
1372
1406
|
size: size,
|
|
1373
1407
|
color: colors.fill.action,
|
|
1374
1408
|
flex: "none",
|
|
1375
1409
|
thickness: thickness,
|
|
1376
1410
|
speed: speed,
|
|
1377
1411
|
mb: 2
|
|
1378
|
-
}), text && /*#__PURE__*/
|
|
1412
|
+
}), text && /*#__PURE__*/React__default.createElement(Text$2, {
|
|
1379
1413
|
fontSize: size,
|
|
1380
1414
|
lineHeight: "shorter",
|
|
1381
1415
|
fontWeight: "semibold"
|
|
@@ -1452,19 +1486,19 @@ var typography = {
|
|
|
1452
1486
|
var TableLoadingRows = function TableLoadingRows(_ref) {
|
|
1453
1487
|
var isLoading = _ref.isLoading,
|
|
1454
1488
|
onLoadMore = _ref.onLoadMore;
|
|
1455
|
-
return /*#__PURE__*/
|
|
1489
|
+
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
1456
1490
|
width: "full",
|
|
1457
1491
|
direction: "column",
|
|
1458
1492
|
justifyContent: "center",
|
|
1459
1493
|
alignItems: "center",
|
|
1460
1494
|
height: 20,
|
|
1461
1495
|
borderTopColor: colors.fill.light.quaternary
|
|
1462
|
-
}, isLoading ? /*#__PURE__*/
|
|
1496
|
+
}, isLoading ? /*#__PURE__*/React__default.createElement(Spinner, {
|
|
1463
1497
|
size: "lg",
|
|
1464
1498
|
color: colors.fill.action
|
|
1465
|
-
}) : /*#__PURE__*/
|
|
1499
|
+
}) : /*#__PURE__*/React__default.createElement(IconButton, {
|
|
1466
1500
|
"aria-label": "Fetch more rows",
|
|
1467
|
-
icon: /*#__PURE__*/
|
|
1501
|
+
icon: /*#__PURE__*/React__default.createElement(HiOutlineRefresh, null),
|
|
1468
1502
|
fontSize: typography.fontSizes['3xl'],
|
|
1469
1503
|
bg: "transparent",
|
|
1470
1504
|
shadow: "none",
|
|
@@ -1490,32 +1524,36 @@ function Table(_ref) {
|
|
|
1490
1524
|
borderTopRadius = _ref$borderTopRadius === void 0 ? true : _ref$borderTopRadius,
|
|
1491
1525
|
loadMore = _ref.loadMore;
|
|
1492
1526
|
var columnsAsConst = generateTableColumnsAsConst(columns);
|
|
1493
|
-
return /*#__PURE__*/
|
|
1527
|
+
return /*#__PURE__*/React__default.createElement(TableContainer, {
|
|
1494
1528
|
border: "none",
|
|
1495
1529
|
overflowX: "auto",
|
|
1496
1530
|
bg: "white",
|
|
1497
1531
|
borderRadius: "md",
|
|
1498
1532
|
borderTopLeftRadius: borderTopRadius ? 'md' : 0,
|
|
1499
1533
|
borderTopRightRadius: borderTopRadius ? 'md' : 0
|
|
1500
|
-
}, /*#__PURE__*/
|
|
1534
|
+
}, /*#__PURE__*/React__default.createElement(Table$2, {
|
|
1501
1535
|
variant: "unstyled"
|
|
1502
|
-
}, /*#__PURE__*/
|
|
1536
|
+
}, /*#__PURE__*/React__default.createElement(Thead, null, /*#__PURE__*/React__default.createElement(Tr, {
|
|
1537
|
+
_odd: {
|
|
1538
|
+
bg: colors.label.primary.dark
|
|
1539
|
+
}
|
|
1540
|
+
}, columnsAsConst.map(function (column) {
|
|
1503
1541
|
return (
|
|
1504
1542
|
/*#__PURE__*/
|
|
1505
1543
|
// @ts-ignore
|
|
1506
|
-
|
|
1544
|
+
React__default.createElement(Th, null, headers[column])
|
|
1507
1545
|
);
|
|
1508
|
-
}))), /*#__PURE__*/
|
|
1509
|
-
return /*#__PURE__*/
|
|
1546
|
+
}))), /*#__PURE__*/React__default.createElement(Tbody, null, body.map(function (row) {
|
|
1547
|
+
return /*#__PURE__*/React__default.createElement(Tr, null, columnsAsConst.map(function (column) {
|
|
1510
1548
|
return (
|
|
1511
1549
|
/*#__PURE__*/
|
|
1512
1550
|
// @ts-ignore
|
|
1513
|
-
|
|
1551
|
+
React__default.createElement(Td, null, row[column])
|
|
1514
1552
|
);
|
|
1515
1553
|
}));
|
|
1516
|
-
})), !body.length && /*#__PURE__*/
|
|
1554
|
+
})), !body.length && /*#__PURE__*/React__default.createElement(TableCaption, {
|
|
1517
1555
|
py: 10
|
|
1518
|
-
}, placeholder), ' '), loadMore && loading !== undefined && /*#__PURE__*/
|
|
1556
|
+
}, placeholder), ' '), loadMore && loading !== undefined && /*#__PURE__*/React__default.createElement(TableLoadingRows, {
|
|
1519
1557
|
isLoading: loading,
|
|
1520
1558
|
onLoadMore: loadMore
|
|
1521
1559
|
}));
|
|
@@ -1530,12 +1568,12 @@ var TabsWrapper = function TabsWrapper(_ref) {
|
|
|
1530
1568
|
navItems = _ref.navItems,
|
|
1531
1569
|
navIndex = _ref.navIndex,
|
|
1532
1570
|
setNavIndex = _ref.setNavIndex;
|
|
1533
|
-
return /*#__PURE__*/
|
|
1571
|
+
return /*#__PURE__*/React__default.createElement(Tabs$1, {
|
|
1534
1572
|
size: "lg",
|
|
1535
1573
|
variant: "simple",
|
|
1536
1574
|
index: navIndex,
|
|
1537
1575
|
onChange: setNavIndex
|
|
1538
|
-
}, /*#__PURE__*/
|
|
1576
|
+
}, /*#__PURE__*/React__default.createElement(TabList, {
|
|
1539
1577
|
flexDirection: {
|
|
1540
1578
|
base: 'column',
|
|
1541
1579
|
sm: 'row'
|
|
@@ -1548,7 +1586,7 @@ var TabsWrapper = function TabsWrapper(_ref) {
|
|
|
1548
1586
|
borderBottomLeftRadius: 0,
|
|
1549
1587
|
borderBottomRightRadius: 0
|
|
1550
1588
|
}, navItems.map(function (navItem) {
|
|
1551
|
-
return /*#__PURE__*/
|
|
1589
|
+
return /*#__PURE__*/React__default.createElement(Tab, null, navItem);
|
|
1552
1590
|
})), children);
|
|
1553
1591
|
};
|
|
1554
1592
|
|
|
@@ -1568,7 +1606,7 @@ var Text = function Text(_ref) {
|
|
|
1568
1606
|
_ref$color = _ref.color,
|
|
1569
1607
|
color = _ref$color === void 0 ? colors.label.primary.light : _ref$color,
|
|
1570
1608
|
className = _ref.className;
|
|
1571
|
-
return /*#__PURE__*/
|
|
1609
|
+
return /*#__PURE__*/React__default.createElement(Text$2, {
|
|
1572
1610
|
fontSize: fontSize,
|
|
1573
1611
|
lineHeight: lineHeight,
|
|
1574
1612
|
letterSpacing: letterSpacing,
|
|
@@ -1815,9 +1853,11 @@ function baseStyleRequiredIndicator() {
|
|
|
1815
1853
|
|
|
1816
1854
|
function baseStyleHelperText() {
|
|
1817
1855
|
return {
|
|
1856
|
+
position: 'absolute',
|
|
1818
1857
|
color: colors.label.secondary.light,
|
|
1819
1858
|
mt: 1,
|
|
1820
1859
|
ml: 1,
|
|
1860
|
+
bottom: 0,
|
|
1821
1861
|
fontSize: '13px'
|
|
1822
1862
|
};
|
|
1823
1863
|
}
|
|
@@ -1839,6 +1879,8 @@ var parts$2 = ['text', 'icon'];
|
|
|
1839
1879
|
function baseStyleText() {
|
|
1840
1880
|
return {
|
|
1841
1881
|
color: colors.label.error,
|
|
1882
|
+
position: 'absolute',
|
|
1883
|
+
bottom: 0,
|
|
1842
1884
|
mt: 1,
|
|
1843
1885
|
ml: 1,
|
|
1844
1886
|
fontSize: '13px'
|
|
@@ -2356,10 +2398,13 @@ var Switch = {
|
|
|
2356
2398
|
defaultProps: defaultProps$7
|
|
2357
2399
|
};
|
|
2358
2400
|
|
|
2359
|
-
var parts$7 = ['th', 'td', 'tr', 'body'];
|
|
2401
|
+
var parts$7 = ['th', 'td', 'tr', 'body', 'thead'];
|
|
2360
2402
|
var baseStyle$c = {
|
|
2403
|
+
thead: {
|
|
2404
|
+
bg: colors.label.primary.dark
|
|
2405
|
+
},
|
|
2361
2406
|
th: {
|
|
2362
|
-
height: '
|
|
2407
|
+
height: '100%',
|
|
2363
2408
|
width: '100%',
|
|
2364
2409
|
bg: colors.label.primary.dark,
|
|
2365
2410
|
padding: '5px 8px !important'
|
|
@@ -2369,10 +2414,10 @@ var baseStyle$c = {
|
|
|
2369
2414
|
display: 'flex',
|
|
2370
2415
|
alignItems: 'center',
|
|
2371
2416
|
width: '100%',
|
|
2372
|
-
height: '
|
|
2417
|
+
height: '100%',
|
|
2373
2418
|
borderRadius: 'md',
|
|
2374
2419
|
_odd: {
|
|
2375
|
-
|
|
2420
|
+
bg: colors.fill.light.tertiary
|
|
2376
2421
|
}
|
|
2377
2422
|
},
|
|
2378
2423
|
td: {
|
|
@@ -2737,10 +2782,12 @@ var customXQChakraTheme = /*#__PURE__*/extendTheme( /*#__PURE__*/_extends({
|
|
|
2737
2782
|
*/
|
|
2738
2783
|
|
|
2739
2784
|
var XQThemeProvider = function XQThemeProvider(_ref) {
|
|
2740
|
-
var children = _ref.children
|
|
2741
|
-
|
|
2785
|
+
var children = _ref.children,
|
|
2786
|
+
cssVarsRoot = _ref.cssVarsRoot;
|
|
2787
|
+
return /*#__PURE__*/React__default.createElement(ChakraProvider, {
|
|
2742
2788
|
theme: customXQChakraTheme,
|
|
2743
|
-
resetCSS: true
|
|
2789
|
+
resetCSS: true,
|
|
2790
|
+
cssVarsRoot: cssVarsRoot
|
|
2744
2791
|
}, children);
|
|
2745
2792
|
};
|
|
2746
2793
|
|
|
@@ -2770,5 +2817,5 @@ function formatErrorResponse(error) {
|
|
|
2770
2817
|
};
|
|
2771
2818
|
}
|
|
2772
2819
|
|
|
2773
|
-
export { Banner, Breadcrumbs, Button, Form, FormSection, GoogleButton, Input, Layout, LoadingIndicator, SpinnerButton, Table, TabsWrapper, Text, XQThemeProvider, formatErrorResponse };
|
|
2820
|
+
export { Banner, Breadcrumbs, Button, Form, FormSection, GoogleButton, Input, Layout, LoadingIndicator, SpinnerButton, Table, TabsWrapper, Text, XQThemeProvider, colors, formatErrorResponse };
|
|
2774
2821
|
//# sourceMappingURL=ui-core.esm.js.map
|