@xqmsg/ui-core 0.9.3 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/components/button/index.d.ts +3 -7
  2. package/dist/components/input/Input.stories.d.ts +4 -0
  3. package/dist/components/input/InputTypes.d.ts +5 -3
  4. package/dist/components/input/StackedInput/StackedInput.d.ts +0 -3
  5. package/dist/components/input/StackedMultiSelect/index.d.ts +1 -1
  6. package/dist/components/input/StackedSelect/StackedSelect.d.ts +7 -3
  7. package/dist/components/input/components/dropdown/index.d.ts +10 -0
  8. package/dist/components/input/components/label/index.d.ts +9 -0
  9. package/dist/components/input/components/token/Token.stories.d.ts +5 -0
  10. package/dist/components/input/components/token/index.d.ts +7 -0
  11. package/dist/components/input/index.d.ts +1 -3
  12. package/dist/theme/components/button.d.ts +68 -207
  13. package/dist/theme/components/form-error.d.ts +3 -3
  14. package/dist/theme/components/form-label.d.ts +4 -6
  15. package/dist/theme/components/form.d.ts +3 -3
  16. package/dist/theme/components/input.d.ts +32 -161
  17. package/dist/theme/components/select.d.ts +27 -153
  18. package/dist/theme/components/textarea.d.ts +10 -117
  19. package/dist/theme/foundations/colors.d.ts +68 -16
  20. package/dist/ui-core.cjs.development.js +594 -860
  21. package/dist/ui-core.cjs.development.js.map +1 -1
  22. package/dist/ui-core.cjs.production.min.js +1 -1
  23. package/dist/ui-core.cjs.production.min.js.map +1 -1
  24. package/dist/ui-core.esm.js +598 -864
  25. package/dist/ui-core.esm.js.map +1 -1
  26. package/package.json +1 -2
  27. package/src/components/banner/index.tsx +7 -1
  28. package/src/components/button/Button.stories.tsx +19 -7
  29. package/src/components/button/index.tsx +7 -19
  30. package/src/components/button/spinner/index.tsx +2 -7
  31. package/src/components/input/Input.stories.tsx +60 -58
  32. package/src/components/input/InputTypes.ts +7 -1
  33. package/src/components/input/StackedInput/StackedInput.tsx +3 -15
  34. package/src/components/input/StackedMultiSelect/components/MultiValue/index.tsx +2 -2
  35. package/src/components/input/StackedMultiSelect/index.tsx +88 -92
  36. package/src/components/input/StackedPilledInput/index.tsx +139 -56
  37. package/src/components/input/StackedSelect/StackedSelect.tsx +63 -20
  38. package/src/components/input/StackedSelect/assets/svg/subtract.svg +3 -0
  39. package/src/components/input/components/dropdown/index.tsx +80 -0
  40. package/src/components/input/components/label/index.tsx +24 -0
  41. package/src/components/input/components/token/Token.stories.tsx +22 -0
  42. package/src/components/input/components/token/assets/svg/close.svg +3 -0
  43. package/src/components/input/components/token/index.tsx +37 -0
  44. package/src/components/input/index.tsx +7 -20
  45. package/src/components/loading/index.tsx +1 -1
  46. package/src/components/table/Table.stories.tsx +9 -1
  47. package/src/components/table/index.tsx +1 -1
  48. package/src/components/table/loading/index.tsx +2 -2
  49. package/src/components/tabs/index.tsx +1 -1
  50. package/src/components/text/index.tsx +1 -1
  51. package/src/theme/components/alert.ts +4 -4
  52. package/src/theme/components/button.ts +45 -186
  53. package/src/theme/components/form-error.ts +11 -14
  54. package/src/theme/components/form-label.ts +8 -8
  55. package/src/theme/components/form.ts +10 -13
  56. package/src/theme/components/input.ts +17 -191
  57. package/src/theme/components/link.ts +2 -1
  58. package/src/theme/components/select.ts +5 -10
  59. package/src/theme/components/tabs.ts +3 -3
  60. package/src/theme/components/textarea.ts +2 -38
  61. package/src/theme/customXQChakraTheme.ts +0 -2
  62. package/src/theme/foundations/colors.ts +31 -10
  63. package/src/theme/foundations/shadows.ts +3 -3
  64. package/dist/components/input/components/InputTag/index.d.ts +0 -7
  65. package/dist/theme/components/menu.d.ts +0 -48
  66. package/src/components/input/components/InputTag/index.tsx +0 -24
  67. package/src/theme/components/menu.ts +0 -70
@@ -1,10 +1,11 @@
1
- import React, { useMemo, useCallback, useState, useEffect, useRef } from 'react';
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, Select as Select$1, Textarea as Textarea$1, Tag, TagLabel, TagCloseButton, Switch as Switch$1, FormControl, FormLabel as FormLabel$1, FormErrorMessage, FormHelperText, SimpleGrid, useMediaQuery, Grid, GridItem, IconButton, Collapse, TableContainer, Table as Table$1, Thead, Tr, Th, Tbody, Td, TableCaption, Tabs as Tabs$1, TabList, Tab, extendTheme, ChakraProvider } from '@chakra-ui/react';
1
+ import React, { useMemo, useCallback, useRef, useState, useEffect } from 'react';
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$1, 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';
3
4
  import { FormProvider, useWatch, Controller } from 'react-hook-form';
4
- import ReactSelect from 'react-select';
5
- import { CloseIcon, HamburgerIcon } from '@chakra-ui/icons';
5
+ import { CloseIcon as CloseIcon$1, HamburgerIcon } from '@chakra-ui/icons';
6
6
  import { HiOutlineRefresh } from 'react-icons/hi';
7
7
  import { createBreakpoints, transparentize, mode, getColor } from '@chakra-ui/theme-tools';
8
+ import { defineStyle } from '@chakra-ui/system';
8
9
 
9
10
  var ErrorIcon = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M5.5 5.5L8.5 8.5M8.5 5.5L5.5 8.5M13 7C13 10.3137 10.3137 13 7 13C3.68629 13 1 10.3137 1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7Z\" stroke=\"#F96057\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>";
10
11
 
@@ -67,43 +68,11 @@ var Banner = function Banner(_ref) {
67
68
  }, /*#__PURE__*/React.createElement(Button$2, {
68
69
  size: "sm",
69
70
  bg: "white",
70
- color: "blue.500",
71
+ color: colors$1.fill.action,
71
72
  onClick: onClick
72
73
  }, buttonText))));
73
74
  };
74
75
 
75
- function _extends() {
76
- _extends = Object.assign ? Object.assign.bind() : function (target) {
77
- for (var i = 1; i < arguments.length; i++) {
78
- var source = arguments[i];
79
-
80
- for (var key in source) {
81
- if (Object.prototype.hasOwnProperty.call(source, key)) {
82
- target[key] = source[key];
83
- }
84
- }
85
- }
86
-
87
- return target;
88
- };
89
- return _extends.apply(this, arguments);
90
- }
91
-
92
- function _objectWithoutPropertiesLoose(source, excluded) {
93
- if (source == null) return {};
94
- var target = {};
95
- var sourceKeys = Object.keys(source);
96
- var key, i;
97
-
98
- for (i = 0; i < sourceKeys.length; i++) {
99
- key = sourceKeys[i];
100
- if (excluded.indexOf(key) >= 0) continue;
101
- target[key] = source[key];
102
- }
103
-
104
- return target;
105
- }
106
-
107
76
  var blue = {
108
77
  50: 'hsl(209, 100%, 95%)',
109
78
  100: 'hsl(209, 100%, 90%)',
@@ -152,20 +121,43 @@ var green = {
152
121
  800: 'hsl(141, 42%, 24%)',
153
122
  900: 'hsl(138, 42%, 6%)'
154
123
  };
155
- var aliases = {
156
- primary: blue,
157
- success: green,
158
- warning: orange,
159
- danger: red
160
- };
161
124
  var label = {
162
125
  primary: {
163
126
  light: '#000000',
164
127
  dark: '#FFFFFF'
165
- }
166
- };
167
-
168
- var colors = /*#__PURE__*/_extends({
128
+ },
129
+ secondary: {
130
+ light: '#3C3C4399'
131
+ },
132
+ error: '#FF0000'
133
+ };
134
+ var border = {
135
+ focus: '#3A6CD980',
136
+ "default": '#9999991A'
137
+ };
138
+ var fill = {
139
+ light: {
140
+ primary: '#74748033',
141
+ secondary: '#74748029',
142
+ tertiary: '#7474801F',
143
+ quaternary: ':#7474800D'
144
+ },
145
+ success: '#d8f1b8',
146
+ error: '#ffbdb9',
147
+ warning: '#ffefb4',
148
+ action: '#0082ff'
149
+ };
150
+ var semantic = {
151
+ action: '#488ef7',
152
+ success: '#5fcf65',
153
+ warning: '#f8c352',
154
+ error: '#f96057'
155
+ };
156
+ var colors = {
157
+ label: label,
158
+ border: border,
159
+ fill: fill,
160
+ semantic: semantic,
169
161
  transparent: 'transparent',
170
162
  current: 'currentColor',
171
163
  black: '#000000',
@@ -173,9 +165,7 @@ var colors = /*#__PURE__*/_extends({
173
165
  lightBlue: '#29abe2',
174
166
  coolGray: '#F6F7FB',
175
167
  darkBlue: '#292f4c',
176
- backdrop: '#fbfcff'
177
- }, aliases, {
178
- label: label,
168
+ backdrop: '#fbfcff',
179
169
  whiteAlpha: {
180
170
  50: 'rgba(255, 255, 255, 0.04)',
181
171
  100: 'rgba(255, 255, 255, 0.06)',
@@ -216,7 +206,7 @@ var colors = /*#__PURE__*/_extends({
216
206
  orange: orange,
217
207
  green: green,
218
208
  blue: blue
219
- });
209
+ };
220
210
 
221
211
  /**
222
212
  * A functional React component utilized to render the `Icon` for the `Breadcrumbs` component.
@@ -305,7 +295,6 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
305
295
  }));
306
296
  };
307
297
 
308
- var _excluded = ["onClick", "text", "type", "ariaLabel", "variant", "colorScheme", "style", "size", "disabled", "className"];
309
298
  /**
310
299
  * A functional React component utilized to render the `Button` component
311
300
  */
@@ -313,30 +302,23 @@ var _excluded = ["onClick", "text", "type", "ariaLabel", "variant", "colorScheme
313
302
  var Button = function Button(_ref) {
314
303
  var onClick = _ref.onClick,
315
304
  text = _ref.text,
316
- type = _ref.type,
305
+ _ref$type = _ref.type,
306
+ type = _ref$type === void 0 ? 'button' : _ref$type,
317
307
  ariaLabel = _ref.ariaLabel,
318
308
  _ref$variant = _ref.variant,
319
309
  variant = _ref$variant === void 0 ? 'solid' : _ref$variant,
320
- _ref$colorScheme = _ref.colorScheme,
321
- colorScheme = _ref$colorScheme === void 0 ? 'primary' : _ref$colorScheme,
322
- style = _ref.style,
323
- _ref$size = _ref.size,
324
- size = _ref$size === void 0 ? 'md' : _ref$size,
325
310
  disabled = _ref.disabled,
326
311
  className = _ref.className,
327
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
328
-
329
- return /*#__PURE__*/React.createElement(Button$2, Object.assign({
312
+ width = _ref.width;
313
+ return /*#__PURE__*/React.createElement(Button$2, {
330
314
  onClick: onClick,
331
315
  type: type,
332
316
  variant: variant,
333
- colorScheme: colorScheme,
334
- size: size,
335
317
  disabled: disabled,
336
318
  "aria-label": ariaLabel,
337
- style: style,
338
- className: className
339
- }, props), text);
319
+ className: className,
320
+ width: width === 'variable' ? '100%' : 'fit-content'
321
+ }, text);
340
322
  };
341
323
 
342
324
  var GoogleLogo = "<svg viewBox=\"0 0 533.5 544.3\" xmlns=\"http://www.w3.org/2000/svg\"><path\n d=\"M533.5 278.4c0-18.5-1.5-37.1-4.7-55.3H272.1v104.8h147c-6.1 33.8-25.7 63.7-54.4 82.7v68h87.7c51.5-47.4 81.1-117.4 81.1-200.2z\"\n fill=\"#4285f4\"\n /><path\n d=\"M272.1 544.3c73.4 0 135.3-24.1 180.4-65.7l-87.7-68c-24.4 16.6-55.9 26-92.6 26-71 0-131.2-47.9-152.8-112.3H28.9v70.1c46.2 91.9 140.3 149.9 243.2 149.9z\"\n fill=\"#34a853\"\n /><path\n d=\"M119.3 324.3c-11.4-33.8-11.4-70.4 0-104.2V150H28.9c-38.6 76.9-38.6 167.5 0 244.4l90.4-70.1z\"\n fill=\"#fbbc04\"\n /><path\n d=\"M272.1 107.7c38.8-.6 76.3 14 104.4 40.8l77.7-77.7C405 24.6 339.7-.8 272.1 0 169.2 0 75.1 58 28.9 150l90.4 70.1c21.5-64.5 81.8-112.4 152.8-112.4z\"\n fill=\"#ea4335\"\n /></svg>";
@@ -381,28 +363,20 @@ var SpinnerButton = function SpinnerButton(_ref) {
381
363
  onClick = _ref.onClick,
382
364
  type = _ref.type,
383
365
  ariaLabel = _ref.ariaLabel,
384
- style = _ref.style,
385
366
  _ref$variant = _ref.variant,
386
367
  variant = _ref$variant === void 0 ? 'solid' : _ref$variant,
387
- _ref$colorScheme = _ref.colorScheme,
388
- colorScheme = _ref$colorScheme === void 0 ? 'primary' : _ref$colorScheme,
389
- _ref$size = _ref.size,
390
- size = _ref$size === void 0 ? 'md' : _ref$size,
391
368
  disabled = _ref.disabled,
392
369
  className = _ref.className;
393
370
  return /*#__PURE__*/React.createElement(Button$2, {
394
371
  spinner: /*#__PURE__*/React.createElement(Spinner, {
395
- size: size
372
+ size: 'md'
396
373
  }),
397
374
  isLoading: isLoading,
398
375
  onClick: onClick,
399
376
  type: type,
400
377
  variant: variant,
401
- colorScheme: colorScheme,
402
- size: size,
403
378
  disabled: disabled,
404
379
  "aria-label": ariaLabel,
405
- style: style,
406
380
  className: className
407
381
  }, text);
408
382
  };
@@ -441,7 +415,39 @@ var StackedCheckboxGroup = /*#__PURE__*/React.forwardRef(function (_ref2, _ref)
441
415
  }));
442
416
  });
443
417
 
444
- var _excluded$1 = ["type", "isRequired", "leftElement", "rightElement"];
418
+ function _extends() {
419
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
420
+ for (var i = 1; i < arguments.length; i++) {
421
+ var source = arguments[i];
422
+
423
+ for (var key in source) {
424
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
425
+ target[key] = source[key];
426
+ }
427
+ }
428
+ }
429
+
430
+ return target;
431
+ };
432
+ return _extends.apply(this, arguments);
433
+ }
434
+
435
+ function _objectWithoutPropertiesLoose(source, excluded) {
436
+ if (source == null) return {};
437
+ var target = {};
438
+ var sourceKeys = Object.keys(source);
439
+ var key, i;
440
+
441
+ for (i = 0; i < sourceKeys.length; i++) {
442
+ key = sourceKeys[i];
443
+ if (excluded.indexOf(key) >= 0) continue;
444
+ target[key] = source[key];
445
+ }
446
+
447
+ return target;
448
+ }
449
+
450
+ var _excluded = ["type", "isRequired"];
445
451
  /**
446
452
  * A functional React component utilized to render the `StackedInput` component.
447
453
  */
@@ -450,15 +456,13 @@ var StackedInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
450
456
  var _ref2$type = _ref2.type,
451
457
  type = _ref2$type === void 0 ? 'text' : _ref2$type,
452
458
  isRequired = _ref2.isRequired,
453
- leftElement = _ref2.leftElement,
454
- rightElement = _ref2.rightElement,
455
- props = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
459
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded);
456
460
 
457
- return /*#__PURE__*/React.createElement(InputGroup, null, leftElement && leftElement, /*#__PURE__*/React.createElement(Input$2, Object.assign({
461
+ return /*#__PURE__*/React.createElement(Input$2, Object.assign({
458
462
  ref: _ref,
459
463
  type: type,
460
464
  isRequired: isRequired
461
- }, props)), rightElement && rightElement);
465
+ }, props));
462
466
  });
463
467
 
464
468
  /**
@@ -485,7 +489,61 @@ var StackedRadioGroup = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
485
489
  })));
486
490
  });
487
491
 
488
- var _excluded$2 = ["isRequired", "options", "onChange"];
492
+ var SubtractIcon = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M2 12C0.89543 12 -3.91405e-08 11.1046 -8.74228e-08 10L-4.37114e-07 2C-4.85396e-07 0.895431 0.89543 -3.91405e-08 2 -8.74228e-08L10 -4.37114e-07C11.1046 -4.85396e-07 12 0.89543 12 2L12 10C12 11.1046 11.1046 12 10 12L2 12ZM6 2.5C6.13261 2.5 6.25979 2.55268 6.35355 2.64645L7.85355 4.14645C8.04881 4.34171 8.04881 4.65829 7.85355 4.85355C7.65829 5.04882 7.34171 5.04882 7.14645 4.85355L6 3.70711L4.85355 4.85355C4.65829 5.04882 4.34171 5.04882 4.14645 4.85355C3.95118 4.65829 3.95118 4.34171 4.14645 4.14645L5.64645 2.64645C5.74021 2.55268 5.86739 2.5 6 2.5ZM5.64645 9.35355C5.74021 9.44732 5.86739 9.5 6 9.5C6.13261 9.5 6.25978 9.44732 6.35355 9.35355L7.85355 7.85355C8.04882 7.65829 8.04882 7.34171 7.85355 7.14645C7.65829 6.95118 7.34171 6.95118 7.14645 7.14645L6 8.29289L4.85355 7.14645C4.65829 6.95118 4.34171 6.95118 4.14645 7.14645C3.95118 7.34171 3.95118 7.65829 4.14645 7.85355L5.64645 9.35355Z\" fill=\"#0082FF\"/>\n</svg>";
493
+
494
+ /**
495
+ * A functional React component utilized to render the `Dropdown` component
496
+ */
497
+
498
+ var Dropdown = function Dropdown(_ref) {
499
+ var onSelectItem = _ref.onSelectItem,
500
+ options = _ref.options;
501
+ var DropdownContent = useMemo(function () {
502
+ return options.map(function (option, idx) {
503
+ return /*#__PURE__*/React.createElement(React.Fragment, null, option.value === 'section_header' && options[idx + 1] && options[idx + 1].value !== 'section_header' && /*#__PURE__*/React.createElement(Box, {
504
+ color: colors$1.label.secondary.light,
505
+ fontSize: "13px",
506
+ fontWeight: "bold",
507
+ px: "8px"
508
+ }, idx > 0 && /*#__PURE__*/React.createElement(Box, {
509
+ my: "3px",
510
+ borderTop: "2px solid",
511
+ borderColor: colors$1.border["default"]
512
+ }), option.label), option.value !== 'section_header' && /*#__PURE__*/React.createElement(Box, {
513
+ cursor: "pointer",
514
+ borderRadius: "inherit",
515
+ onClick: function onClick() {
516
+ return onSelectItem(option);
517
+ },
518
+ key: option.value,
519
+ fontSize: "13px",
520
+ px: "8px",
521
+ py: "4px",
522
+ color: colors$1.label.primary.light,
523
+ _hover: {
524
+ color: colors$1.label.primary.dark,
525
+ bg: colors$1.fill.action,
526
+ borderRadius: '4px'
527
+ }
528
+ }, option.label));
529
+ });
530
+ }, [onSelectItem, options]);
531
+ return /*#__PURE__*/React.createElement(Box, {
532
+ bg: colors$1.fill.light.quaternary,
533
+ backdropFilter: "blur(64px)",
534
+ borderRadius: "4px",
535
+ mt: "3px",
536
+ maxH: "320px",
537
+ overflowY: "auto",
538
+ px: "8px",
539
+ py: "4px",
540
+ position: "absolute",
541
+ width: "100%",
542
+ zIndex: "100"
543
+ }, DropdownContent);
544
+ };
545
+
546
+ var _excluded$1 = ["isRequired", "options", "name", "setValue", "onChange"];
489
547
  /**
490
548
  * A functional React component utilized to render the `StackedSelect` component.
491
549
  */
@@ -493,19 +551,63 @@ var _excluded$2 = ["isRequired", "options", "onChange"];
493
551
  var StackedSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
494
552
  var isRequired = _ref2.isRequired,
495
553
  options = _ref2.options,
496
- onChange = _ref2.onChange,
497
- props = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
554
+ name = _ref2.name,
555
+ setValue = _ref2.setValue,
556
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
557
+
558
+ var dropdownRef = useRef(null);
559
+
560
+ var _useState = useState(false),
561
+ isFocussed = _useState[0],
562
+ setIsFocussed = _useState[1];
563
+
564
+ var _useState2 = useState(''),
565
+ selectedOption = _useState2[0],
566
+ setSelectedOption = _useState2[1];
567
+
568
+ useOutsideClick({
569
+ ref: dropdownRef,
570
+ handler: function handler() {
571
+ return setIsFocussed(false);
572
+ }
573
+ });
498
574
 
499
- return /*#__PURE__*/React.createElement(InputGroup, null, /*#__PURE__*/React.createElement(Select$1, Object.assign({
575
+ var handleOnSelectItem = function handleOnSelectItem(option) {
576
+ setValue(name, option.value);
577
+ setSelectedOption(option.label);
578
+ setIsFocussed(false);
579
+ };
580
+
581
+ return /*#__PURE__*/React.createElement(Box, {
582
+ ref: dropdownRef,
583
+ position: "relative"
584
+ }, /*#__PURE__*/React.createElement(InputGroup, null, /*#__PURE__*/React.createElement(Input$2, Object.assign({
585
+ isRequired: isRequired
586
+ }, props, {
500
587
  ref: _ref,
501
- isRequired: isRequired,
502
- onChange: onChange
503
- }, props), options.map(function (option) {
504
- return /*#__PURE__*/React.createElement("option", {
505
- value: option.value,
506
- key: option.value
507
- }, option.label);
508
- })));
588
+ onClick: function onClick() {
589
+ return setIsFocussed(!isFocussed);
590
+ },
591
+ cursor: "pointer",
592
+ color: "transparent",
593
+ fontSize: "13px",
594
+ textShadow: "0 0 0 " + colors$1.label.primary.light,
595
+ value: selectedOption
596
+ })), /*#__PURE__*/React.createElement(InputRightElement, {
597
+ cursor: "pointer",
598
+ onClick: function onClick() {
599
+ return setIsFocussed(!isFocussed);
600
+ }
601
+ }, /*#__PURE__*/React.createElement(Image, {
602
+ src: SubtractIcon,
603
+ alt: "subtract",
604
+ boxSize: "16px"
605
+ }))), isFocussed && /*#__PURE__*/React.createElement(Dropdown, {
606
+ onSelectItem: function onSelectItem(option) {
607
+ return handleOnSelectItem(option);
608
+ },
609
+ options: options
610
+ }));
509
611
  });
510
612
 
511
613
  /**
@@ -520,36 +622,29 @@ var StackedTextarea = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
520
622
  }, props));
521
623
  });
522
624
 
523
- var InputTag = function InputTag(_ref) {
524
- var value = _ref.value,
625
+ var CloseIcon = "<svg width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M27.9995 56C43.4635 56 55.9995 43.464 55.9995 28C55.9995 12.536 43.4635 0 27.9995 0C12.5355 0 -0.000488281 12.536 -0.000488281 28C-0.000488281 43.464 12.5355 56 27.9995 56ZM21.9807 18.2688C20.9555 17.2437 19.2935 17.2437 18.2684 18.2688C17.2432 19.294 17.2432 20.956 18.2684 21.9812L24.2872 28L18.2684 34.0188C17.2432 35.044 17.2432 36.706 18.2684 37.7312C19.2935 38.7563 20.9555 38.7563 21.9807 37.7312L27.9995 31.7123L34.0184 37.7312C35.0435 38.7563 36.7055 38.7563 37.7307 37.7312C38.7558 36.706 38.7558 35.044 37.7307 34.0188L31.7118 28L37.7307 21.9812C38.7558 20.956 38.7558 19.294 37.7307 18.2688C36.7055 17.2437 35.0435 17.2437 34.0184 18.2688L27.9995 24.2877L21.9807 18.2688Z\" fill=\"#3C3C43\" fill-opacity=\"0.6\"/>\n</svg>";
626
+
627
+ var Token = function Token(_ref) {
628
+ var label = _ref.label,
525
629
  onDelete = _ref.onDelete;
526
- return /*#__PURE__*/React.createElement(Tag, {
527
- size: 'md',
528
- key: value,
630
+ return /*#__PURE__*/React.createElement(Flex, {
631
+ key: label,
529
632
  borderRadius: "full",
530
- variant: "solid",
531
- backgroundColor: "#eeeeee"
532
- }, /*#__PURE__*/React.createElement(TagLabel, {
533
- color: 'gray.700'
534
- }, value), onDelete && /*#__PURE__*/React.createElement(TagCloseButton, {
535
- color: 'gray.700',
536
- onClick: onDelete
537
- }));
538
- };
539
-
540
- /**
541
- * A functional React Component utilized to render the custom `MultiValue` component for
542
- * the `StackedMultiSelect` custom component.
543
- */
544
-
545
- var MultiValue = function MultiValue(_ref) {
546
- var children = _ref.children,
547
- clearValue = _ref.clearValue;
548
- return /*#__PURE__*/React.createElement(Box, {
549
- marginRight: "5px"
550
- }, /*#__PURE__*/React.createElement(InputTag, {
551
- value: children,
552
- onDelete: clearValue
633
+ backgroundColor: "#7676801F",
634
+ alignItems: "center",
635
+ width: "fit-content",
636
+ pl: "8px",
637
+ pr: "4px",
638
+ py: "2px"
639
+ }, /*#__PURE__*/React.createElement(Text$2, {
640
+ color: colors$1.label.primary.light,
641
+ fontSize: "13px"
642
+ }, label), /*#__PURE__*/React.createElement(Image, {
643
+ pl: "4px",
644
+ boxSize: "16px",
645
+ src: CloseIcon,
646
+ onClick: onDelete,
647
+ cursor: "pointer"
553
648
  }));
554
649
  };
555
650
 
@@ -561,131 +656,136 @@ var StackedMultiSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
561
656
  var options = _ref2.options,
562
657
  setValue = _ref2.setValue,
563
658
  control = _ref2.control,
564
- name = _ref2.name;
659
+ name = _ref2.name,
660
+ placeholder = _ref2.placeholder,
661
+ disabled = _ref2.disabled;
565
662
  var watchedValue = useWatch({
566
663
  control: control,
567
664
  name: name
568
665
  });
666
+ var dropdownRef = useRef(null);
667
+
668
+ var _useState = useState([]),
669
+ localValues = _useState[0],
670
+ setLocalValues = _useState[1];
569
671
 
570
- var _useState = useState(''),
571
- inputValue = _useState[0],
572
- setInputValue = _useState[1];
672
+ var _useState2 = useState(options),
673
+ localOptions = _useState2[0],
674
+ setLocalOptions = _useState2[1];
573
675
 
574
- var _useState2 = useState([]),
575
- localValue = _useState2[0],
576
- setLocalValue = _useState2[1]; // gets latest watched form value (common delimited) from RHF state and creates a list
676
+ var _useState3 = useState(false),
677
+ isFocussed = _useState3[0],
678
+ setIsFocussed = _useState3[1];
577
679
 
680
+ useOutsideClick({
681
+ ref: dropdownRef,
682
+ handler: function handler() {
683
+ return setIsFocussed(false);
684
+ }
685
+ }); // gets latest watched form value (common delimited) from RHF state and creates a list
578
686
 
579
687
  useEffect(function () {
580
688
  if (watchedValue !== undefined && !watchedValue.length) {
581
- setLocalValue([]);
689
+ setLocalValues([]);
582
690
  }
583
691
 
584
692
  if (watchedValue !== undefined && watchedValue != null && watchedValue.length) {
585
- setLocalValue(watchedValue.split(',').filter(Boolean).map(function (value) {
693
+ setLocalValues(watchedValue.split(',').filter(Boolean).map(function (value) {
586
694
  return options.find(function (option) {
587
695
  return option.value === value;
588
696
  });
589
697
  }));
590
698
  }
591
699
  }, [options, watchedValue]);
592
- var component = {
593
- DropdownIndicator: null,
594
- MultiValue: function MultiValue$1(props) {
595
- return /*#__PURE__*/React.createElement(MultiValue, {
596
- clearValue: function clearValue() {
597
- var arrayValue = watchedValue.split(',').filter(function (_, index) {
598
- return index !== props.index;
599
- });
600
- setLocalValue(arrayValue.map(function (value) {
601
- return options.find(function (option) {
602
- return option.value === value;
603
- });
604
- }));
605
- setValue(name, arrayValue.join(','), {
606
- shouldValidate: true,
607
- shouldDirty: true
608
- });
609
- }
610
- }, props.children);
611
- }
612
- };
613
700
 
614
- var handleChange = function handleChange(values) {
615
- setValue(name, values.map(function (_ref3) {
701
+ var handleChange = function handleChange(option) {
702
+ var newValue = [].concat(localValues, [option]).map(function (_ref3) {
616
703
  var value = _ref3.value;
617
704
  return value;
618
- }).join(','), {
705
+ }).join(',');
706
+ setValue(name, newValue, {
619
707
  shouldValidate: true,
620
708
  shouldDirty: true
621
709
  });
710
+ setLocalOptions(function (prevLocalOptions) {
711
+ return prevLocalOptions.filter(function (prevLocalOption) {
712
+ return prevLocalOption !== option;
713
+ });
714
+ });
715
+ setLocalValues(function (prevLocalValues) {
716
+ return [].concat(prevLocalValues, [option]);
717
+ });
622
718
  };
623
719
 
624
- var handleInputChange = function handleInputChange(value, action) {
625
- if (action.action === 'input-change' && action !== 'set-value') {
626
- return setInputValue(value);
627
- } // reset on select of an option
628
-
629
-
630
- return setInputValue('');
631
- };
632
-
633
- var formatGroupLabel = function formatGroupLabel(data) {
634
- return /*#__PURE__*/React.createElement(Flex, {
635
- alignItems: "center",
636
- justifyContent: "space-between"
637
- }, /*#__PURE__*/React.createElement("span", null, data.label));
720
+ var handleDelete = function handleDelete(option) {
721
+ var newValue = localValues.filter(function (localValue) {
722
+ return localValue !== option;
723
+ }).map(function (_ref4) {
724
+ var value = _ref4.value;
725
+ return value;
726
+ }).join(',');
727
+ setValue(name, newValue, {
728
+ shouldValidate: true,
729
+ shouldDirty: true
730
+ });
731
+ setLocalOptions(function (prevLocalOptions) {
732
+ return [].concat(prevLocalOptions, [option]).sort(function (a, b) {
733
+ return a.sortValue - b.sortValue;
734
+ });
735
+ });
736
+ setLocalValues(function (prevLocalValues) {
737
+ return prevLocalValues.filter(function (prevLocalValue) {
738
+ return prevLocalValue !== option;
739
+ });
740
+ });
638
741
  };
639
742
 
640
- var customStyles = {
641
- control: function control() {
642
- return {
643
- borderRadius: '6px',
644
- fontSize: '16px',
645
- color: '#202020',
646
- backgroundColor: '#FFFFFF',
647
- border: '1px solid',
648
- borderColor: colors.gray[200],
649
- minHeight: '48px',
650
- display: 'flex',
651
- padding: '2px 6px'
652
- };
653
- },
654
- menu: function menu() {
655
- return {
656
- boxShadow: '0 5px 5px 0 rgba(16, 27, 79, 0.15)',
657
- borderRadius: '6px',
658
- backgroundColor: 'white'
659
- };
743
+ return /*#__PURE__*/React.createElement(Box, {
744
+ ref: dropdownRef,
745
+ position: "relative"
746
+ }, /*#__PURE__*/React.createElement(Flex, {
747
+ fontSize: "13px",
748
+ border: isFocussed ? '2px solid' : '1px solid',
749
+ borderColor: isFocussed ? colors.border.focus : colors.border["default"],
750
+ py: "5px",
751
+ pl: "8px",
752
+ borderRadius: "4px",
753
+ alignItems: "center",
754
+ justifyContent: "space-between",
755
+ onClick: function onClick() {
756
+ return !disabled && setIsFocussed(true);
660
757
  },
661
- indicatorsContainer: function indicatorsContainer() {
662
- return {
663
- display: 'none'
664
- };
758
+ bg: disabled ? colors.fill.light.quaternary : '#ffffff',
759
+ cursor: disabled ? 'not-allowed' : 'pointer'
760
+ }, /*#__PURE__*/React.createElement(Flex, {
761
+ height: "28px",
762
+ alignItems: "center"
763
+ }, localValues.length ? localValues.map(function (option) {
764
+ return /*#__PURE__*/React.createElement(Box, {
765
+ mr: "4px"
766
+ }, /*#__PURE__*/React.createElement(Token, {
767
+ label: option.label,
768
+ onDelete: function onDelete() {
769
+ return handleDelete(option);
770
+ }
771
+ }));
772
+ }) : /*#__PURE__*/React.createElement(Text$2, {
773
+ color: colors.label.secondary.light,
774
+ fontSize: "13px"
775
+ }, placeholder)), /*#__PURE__*/React.createElement(Flex, {
776
+ width: "39px",
777
+ justifyContent: "center",
778
+ alignItems: "center"
779
+ }, /*#__PURE__*/React.createElement(Image, {
780
+ src: SubtractIcon,
781
+ alt: "subtract",
782
+ boxSize: "16px"
783
+ }))), isFocussed && /*#__PURE__*/React.createElement(Dropdown, {
784
+ onSelectItem: function onSelectItem(option) {
785
+ return handleChange(option);
665
786
  },
666
- placeholder: function placeholder() {
667
- return {
668
- color: '#CBCDCF',
669
- fontSize: '16px'
670
- };
671
- }
672
- };
673
- return /*#__PURE__*/React.createElement(ReactSelect, {
674
- components: component,
675
- inputValue: inputValue,
676
- value: localValue,
677
- isClearable: true,
678
- isSearchable: true,
679
- isMulti: true,
680
- menuPortalTarget: document.body,
681
- menuPosition: 'fixed',
682
- onChange: handleChange,
683
- onInputChange: handleInputChange,
684
- styles: customStyles,
685
- options: options,
686
- placeholder: false,
687
- formatGroupLabel: formatGroupLabel
688
- });
787
+ options: localOptions
788
+ }));
689
789
  });
690
790
 
691
791
  /**
@@ -695,7 +795,9 @@ var StackedMultiSelect = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
695
795
  var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
696
796
  var name = _ref2.name,
697
797
  setValue = _ref2.setValue,
698
- control = _ref2.control;
798
+ control = _ref2.control,
799
+ placeholder = _ref2.placeholder,
800
+ disabled = _ref2.disabled;
699
801
  var watchedValue = useWatch({
700
802
  control: control,
701
803
  name: name
@@ -706,14 +808,19 @@ var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
706
808
  setLatestFormValueToArray = _useState[1];
707
809
 
708
810
  var inputRef = useRef(null);
811
+ var inputWrapperRef = useRef(null);
812
+
813
+ var _useState2 = useState(null),
814
+ tokenIndex = _useState2[0],
815
+ setTokenIndex = _useState2[1];
709
816
 
710
- var _useState2 = useState(false),
711
- isInputFocused = _useState2[0],
712
- setInputFocused = _useState2[1];
817
+ var _useState3 = useState(false),
818
+ isFocussed = _useState3[0],
819
+ setIsFocussed = _useState3[1];
713
820
 
714
- var _useState3 = useState(''),
715
- localValue = _useState3[0],
716
- setLocalValue = _useState3[1]; // gets latest watched form value (common delimited) from RHF state and creates a list
821
+ var _useState4 = useState(''),
822
+ localValue = _useState4[0],
823
+ setLocalValue = _useState4[1]; // gets latest watched form value (common delimited) from RHF state and creates a list
717
824
 
718
825
 
719
826
  useEffect(function () {
@@ -724,17 +831,24 @@ var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
724
831
  if (watchedValue !== undefined && watchedValue != null && watchedValue.length) {
725
832
  setLatestFormValueToArray(watchedValue.split(',').filter(Boolean));
726
833
  }
727
- }, [watchedValue]); // ensures after value addition that the input field is wiped
728
-
729
- useEffect(function () {
730
- if (localValue === ' ' || localValue.trim() === ',') {
731
- setLocalValue('');
732
- }
733
- }, [localValue]);
834
+ }, [watchedValue]);
734
835
 
735
836
  var onHandleKeyDown = function onHandleKeyDown(e) {
736
837
  if (e.key === ' ' || e.key === 'Enter' || e.key === ',') {
737
- if (!localValue.trim() || localValue.trim() === ',') return setLocalValue('');
838
+ if (e.key === 'Enter' && !localValue.trim().length && tokenIndex !== null) {
839
+ setLocalValue(lastestFormValueToArray[tokenIndex]);
840
+
841
+ var _filteredUniqueValues = Array.from(new Set(lastestFormValueToArray.filter(function (value) {
842
+ return value !== lastestFormValueToArray[tokenIndex];
843
+ })));
844
+
845
+ setValue(name, _filteredUniqueValues.toString().replace(/\s/g, ''), {
846
+ shouldValidate: true,
847
+ shouldDirty: true
848
+ });
849
+ return setTokenIndex(null);
850
+ }
851
+
738
852
  var filteredUniqueValues = Array.from(new Set([].concat(lastestFormValueToArray, localValue.trim().split(','))));
739
853
  setLocalValue('');
740
854
  return setValue(name, filteredUniqueValues.toString().replace(/\s/g, ''), {
@@ -742,6 +856,46 @@ var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
742
856
  shouldDirty: true
743
857
  });
744
858
  }
859
+
860
+ if (!localValue.trim().length && lastestFormValueToArray.length) {
861
+ if (e.key === 'Backspace' && tokenIndex !== null) {
862
+ setLocalValue(lastestFormValueToArray[tokenIndex].substring(0, lastestFormValueToArray[tokenIndex].length));
863
+
864
+ var _filteredUniqueValues2 = Array.from(new Set([].concat(lastestFormValueToArray).filter(function (value) {
865
+ return value !== lastestFormValueToArray[tokenIndex];
866
+ })));
867
+
868
+ setValue(name, _filteredUniqueValues2.toString().replace(/\s/g, ''), {
869
+ shouldValidate: true,
870
+ shouldDirty: true
871
+ });
872
+ return setTokenIndex(null);
873
+ }
874
+
875
+ if (e.key === 'ArrowLeft') {
876
+ if (tokenIndex === 0) return;
877
+
878
+ if (!tokenIndex) {
879
+ return setTokenIndex(lastestFormValueToArray.length - 1);
880
+ }
881
+
882
+ return setTokenIndex(function (prevTokenIndex) {
883
+ return prevTokenIndex - 1;
884
+ });
885
+ }
886
+
887
+ if (e.key === 'ArrowRight') {
888
+ if (tokenIndex === null) return;
889
+
890
+ if (tokenIndex === lastestFormValueToArray.length - 1) {
891
+ return setTokenIndex(null);
892
+ }
893
+
894
+ return setTokenIndex(function (prevTokenIndex) {
895
+ return prevTokenIndex + 1;
896
+ });
897
+ }
898
+ }
745
899
  };
746
900
 
747
901
  var onRemoveTag = function onRemoveTag(index) {
@@ -765,65 +919,77 @@ var StackedPilledInput = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
765
919
  setLocalValue('');
766
920
  }
767
921
 
768
- setInputFocused(false);
922
+ setIsFocussed(false);
769
923
  };
770
924
 
771
- return /*#__PURE__*/React.createElement(Flex, {
772
- position: "relative",
773
- width: "100%"
774
- }, /*#__PURE__*/React.createElement(Box, {
775
- outline: isInputFocused ? '2px solid rgba(0, 122, 255, 255)' : '',
776
- borderRadius: isInputFocused ? 'md' : '',
777
- width: "100%"
925
+ useOutsideClick({
926
+ ref: inputWrapperRef,
927
+ handler: onBlur
928
+ });
929
+ return /*#__PURE__*/React.createElement(Box, {
930
+ position: "relative"
778
931
  }, /*#__PURE__*/React.createElement(Flex, {
779
- background: "rgba(255, 255, 255, 0.8)",
780
- border: "1px solid",
781
- borderColor: colors.gray[200],
782
- borderRadius: "6px",
783
- fontWeight: "400",
784
- fontSize: "12px",
785
- lineHeight: "12px",
786
- minHeight: "48px",
787
- letterSpacing: "0.02em",
788
- padding: "0 12px",
789
- pt: lastestFormValueToArray.length ? '12px' : '0px',
932
+ fontSize: "13px",
933
+ border: isFocussed ? '2px solid' : '1px solid',
934
+ borderColor: isFocussed ? colors.border.focus : colors.border["default"],
935
+ py: "5px",
936
+ pl: "8px",
937
+ borderRadius: "4px",
790
938
  alignItems: "center",
791
- flexWrap: "wrap",
792
- gap: "0.5em",
793
- width: "100%",
939
+ justifyContent: "space-between",
794
940
  onClick: function onClick() {
795
- var _inputRef$current;
941
+ if (!disabled) {
942
+ var _inputRef$current;
796
943
 
797
- return (_inputRef$current = inputRef.current) == null ? void 0 : _inputRef$current.focus();
798
- }
799
- }, lastestFormValueToArray.map(function (tag, index) {
800
- return /*#__PURE__*/React.createElement(InputTag, {
801
- value: tag,
802
- key: tag,
944
+ (_inputRef$current = inputRef.current) == null ? void 0 : _inputRef$current.focus();
945
+ }
946
+ },
947
+ bg: disabled ? colors.fill.light.quaternary : '#ffffff',
948
+ cursor: disabled ? 'not-allowed' : 'pointer',
949
+ ref: inputWrapperRef
950
+ }, /*#__PURE__*/React.createElement(Flex, {
951
+ height: "28px",
952
+ alignItems: "center",
953
+ width: "fit-content"
954
+ }, lastestFormValueToArray.length ? lastestFormValueToArray.map(function (label, index) {
955
+ return /*#__PURE__*/React.createElement(Box, {
956
+ mr: "4px",
957
+ border: tokenIndex === index ? "2px solid " + colors.border.focus : 'none',
958
+ borderRadius: "full",
959
+ onClick: function onClick() {
960
+ return setTokenIndex(index);
961
+ }
962
+ }, /*#__PURE__*/React.createElement(Token, {
963
+ label: label,
803
964
  onDelete: function onDelete(e) {
804
965
  e.stopPropagation();
805
966
  e.preventDefault();
806
967
  onRemoveTag(index);
807
968
  }
808
- });
809
- }), /*#__PURE__*/React.createElement(Input$2, {
969
+ }));
970
+ }) : /*#__PURE__*/React.createElement(Text$2, {
971
+ color: colors.label.secondary.light,
972
+ fontSize: "13px"
973
+ }, placeholder)), /*#__PURE__*/React.createElement(Flex, {
974
+ flex: 1
975
+ }, /*#__PURE__*/React.createElement(Input$2, {
810
976
  onKeyDown: onHandleKeyDown,
811
977
  type: "text",
812
- padding: isInputFocused ? '0.5em 0' : '0px',
813
- height: isInputFocused ? '46px' : '0px',
978
+ padding: 0,
814
979
  width: "100%",
815
980
  border: "none",
981
+ height: "26px",
982
+ color: tokenIndex !== null ? 'transparent' : colors.label.primary,
816
983
  _focus: {
817
984
  boxShadow: 'none !important'
818
985
  },
819
986
  value: localValue,
820
- onBlur: onBlur,
821
987
  onChange: function onChange(e) {
822
- return setLocalValue(e.target.value);
988
+ return tokenIndex === null && setLocalValue(e.target.value);
823
989
  },
824
990
  ref: inputRef,
825
991
  onFocus: function onFocus() {
826
- return setInputFocused(true);
992
+ return setIsFocussed(true);
827
993
  }
828
994
  }))));
829
995
  });
@@ -849,6 +1015,19 @@ var StackedSwitch = /*#__PURE__*/React.forwardRef(function (_ref2, _ref) {
849
1015
  });
850
1016
  });
851
1017
 
1018
+ /**
1019
+ * A functional React component utilized to render the `Label` component
1020
+ */
1021
+
1022
+ var Label$1 = function Label(_ref) {
1023
+ var isRequired = _ref.isRequired,
1024
+ label = _ref.label;
1025
+ return /*#__PURE__*/React.createElement(FormLabel$1, null, label, isRequired && /*#__PURE__*/React.createElement(Box, {
1026
+ ml: 1,
1027
+ color: colors$1.label.error
1028
+ }, "*"));
1029
+ };
1030
+
852
1031
  /**
853
1032
  * A functional React component utilized to render the `Input` component. Utilizes a switch statement
854
1033
  * to render the correct input based on the `inputType`.
@@ -862,8 +1041,6 @@ function Input(_ref) {
862
1041
  placeholder = _ref.placeholder,
863
1042
  name = _ref.name,
864
1043
  helperText = _ref.helperText,
865
- leftElement = _ref.leftElement,
866
- rightElement = _ref.rightElement,
867
1044
  options = _ref.options,
868
1045
  isInvalid = _ref.isInvalid,
869
1046
  errorText = _ref.errorText,
@@ -885,8 +1062,6 @@ function Input(_ref) {
885
1062
  placeholder: placeholder,
886
1063
  maxLength: maxLength,
887
1064
  isRequired: isRequired,
888
- leftElement: leftElement,
889
- rightElement: rightElement,
890
1065
  isInvalid: isInvalid,
891
1066
  onChange: onChange,
892
1067
  onBlur: onBlur,
@@ -920,9 +1095,12 @@ function Input(_ref) {
920
1095
  options: options,
921
1096
  onChange: onChange,
922
1097
  onBlur: onBlur,
1098
+ setValue: setValue,
1099
+ control: control,
923
1100
  ref: ref,
924
1101
  disabled: disabled,
925
- value: value
1102
+ value: value,
1103
+ placeholder: placeholder
926
1104
  });
927
1105
 
928
1106
  case 'textarea':
@@ -968,7 +1146,8 @@ function Input(_ref) {
968
1146
  disabled: disabled,
969
1147
  value: value,
970
1148
  setValue: setValue,
971
- control: control
1149
+ control: control,
1150
+ placeholder: placeholder
972
1151
  });
973
1152
 
974
1153
  case 'pilled-text':
@@ -1002,7 +1181,7 @@ function Input(_ref) {
1002
1181
  default:
1003
1182
  return null;
1004
1183
  }
1005
- }, [ariaLabel, className, control, disabled, inputType, isInvalid, isRequired, leftElement, maxLength, name, options, placeholder, rightElement, setValue]);
1184
+ }, [ariaLabel, className, control, disabled, inputType, isInvalid, isRequired, maxLength, name, options, placeholder, setValue]);
1006
1185
  return /*#__PURE__*/React.createElement(Controller, {
1007
1186
  control: control,
1008
1187
  name: name,
@@ -1021,14 +1200,10 @@ function Input(_ref) {
1021
1200
  isInvalid: isInvalid,
1022
1201
  position: "relative",
1023
1202
  py: label ? 6 : 0
1024
- }, label && /*#__PURE__*/React.createElement(FormLabel$1, {
1025
- position: "absolute",
1026
- top: 0,
1027
- display: "flex"
1028
- }, label, isRequired && /*#__PURE__*/React.createElement(Box, {
1029
- ml: 1,
1030
- color: "red.500"
1031
- }, "*")), selectedInputField(onChange ? onChange : fieldOnChange, onBlur, ref, value), isInvalid ? /*#__PURE__*/React.createElement(FormErrorMessage, null, errorText) : helperText && /*#__PURE__*/React.createElement(FormHelperText, null, helperText));
1203
+ }, label && /*#__PURE__*/React.createElement(Label$1, {
1204
+ label: label,
1205
+ isRequired: isRequired
1206
+ }), selectedInputField(onChange ? onChange : fieldOnChange, onBlur, ref, value), isInvalid ? /*#__PURE__*/React.createElement(FormErrorMessage, null, errorText) : helperText && /*#__PURE__*/React.createElement(FormHelperText, null, helperText));
1032
1207
  }
1033
1208
  });
1034
1209
  }
@@ -1152,7 +1327,7 @@ var Layout = function Layout(_ref) {
1152
1327
  onClick: function onClick() {
1153
1328
  return setShow(!show);
1154
1329
  },
1155
- icon: show ? /*#__PURE__*/React.createElement(CloseIcon, null) : /*#__PURE__*/React.createElement(HamburgerIcon, null),
1330
+ icon: show ? /*#__PURE__*/React.createElement(CloseIcon$1, null) : /*#__PURE__*/React.createElement(HamburgerIcon, null),
1156
1331
  _focus: {
1157
1332
  boxShadow: 'none'
1158
1333
  }
@@ -1195,7 +1370,7 @@ var LoadingIndicator = function LoadingIndicator(_ref) {
1195
1370
  className: "loading-indicator " + (className != null ? className : '')
1196
1371
  }, /*#__PURE__*/React.createElement(Spinner, {
1197
1372
  size: size,
1198
- color: colors.blue[500],
1373
+ color: colors.fill.action,
1199
1374
  flex: "none",
1200
1375
  thickness: thickness,
1201
1376
  speed: speed,
@@ -1283,10 +1458,10 @@ var TableLoadingRows = function TableLoadingRows(_ref) {
1283
1458
  justifyContent: "center",
1284
1459
  alignItems: "center",
1285
1460
  height: 20,
1286
- borderTopColor: colors.gray[100]
1461
+ borderTopColor: colors.fill.light.quaternary
1287
1462
  }, isLoading ? /*#__PURE__*/React.createElement(Spinner, {
1288
1463
  size: "lg",
1289
- color: colors.blue[500]
1464
+ color: colors.fill.action
1290
1465
  }) : /*#__PURE__*/React.createElement(IconButton, {
1291
1466
  "aria-label": "Fetch more rows",
1292
1467
  icon: /*#__PURE__*/React.createElement(HiOutlineRefresh, null),
@@ -1317,7 +1492,7 @@ function Table(_ref) {
1317
1492
  var columnsAsConst = generateTableColumnsAsConst(columns);
1318
1493
  return /*#__PURE__*/React.createElement(TableContainer, {
1319
1494
  border: "1px",
1320
- borderColor: colors.gray[100],
1495
+ borderColor: colors.fill.light.quaternary,
1321
1496
  overflowX: "auto",
1322
1497
  bg: "white",
1323
1498
  borderRadius: "md",
@@ -1368,7 +1543,7 @@ var TabsWrapper = function TabsWrapper(_ref) {
1368
1543
  sm: 'row'
1369
1544
  },
1370
1545
  border: "1px",
1371
- borderColor: colors.gray[100],
1546
+ borderColor: colors.fill.light.quaternary,
1372
1547
  bg: "white",
1373
1548
  borderRadius: "md",
1374
1549
  borderBottom: 0,
@@ -1393,7 +1568,7 @@ var Text = function Text(_ref) {
1393
1568
  fontWeight = _ref.fontWeight,
1394
1569
  variant = _ref.variant,
1395
1570
  _ref$color = _ref.color,
1396
- color = _ref$color === void 0 ? colors.black : _ref$color,
1571
+ color = _ref$color === void 0 ? colors.label.primary.light : _ref$color,
1397
1572
  className = _ref.className;
1398
1573
  return /*#__PURE__*/React.createElement(Text$2, {
1399
1574
  fontSize: fontSize,
@@ -1426,9 +1601,9 @@ var shadows = {
1426
1601
  lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
1427
1602
  xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
1428
1603
  '2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)',
1429
- insetOutline: "inset 0 0 0 2px " + colors.blue[200],
1430
- outline: "0 0 0 2px " + colors.blue[200],
1431
- outlineDanger600: "0 0 0 2px " + colors.red[600],
1604
+ insetOutline: "inset 0 0 0 2px " + colors.fill.action,
1605
+ outline: "0 0 0 2px " + colors.fill.action,
1606
+ outlineDanger600: "0 0 0 2px " + colors.fill.error,
1432
1607
  inner: 'inset 0 2px 4px 0 rgba(0,0,0,0.06)',
1433
1608
  none: 'none',
1434
1609
  'dark-lg': 'rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px'
@@ -1452,7 +1627,7 @@ var baseStyle = {
1452
1627
  function variantPositive() {
1453
1628
  return {
1454
1629
  container: {
1455
- bg: '#d8f1b8'
1630
+ bg: colors.fill.success
1456
1631
  }
1457
1632
  };
1458
1633
  }
@@ -1460,7 +1635,7 @@ function variantPositive() {
1460
1635
  function variantWarning() {
1461
1636
  return {
1462
1637
  container: {
1463
- bg: '#ffefb4'
1638
+ bg: colors.fill.warning
1464
1639
  }
1465
1640
  };
1466
1641
  }
@@ -1468,7 +1643,7 @@ function variantWarning() {
1468
1643
  function variantError() {
1469
1644
  return {
1470
1645
  container: {
1471
- bg: '#ffbdb9'
1646
+ bg: colors.fill.error
1472
1647
  }
1473
1648
  };
1474
1649
  }
@@ -1476,7 +1651,7 @@ function variantError() {
1476
1651
  function variantNeutral() {
1477
1652
  return {
1478
1653
  container: {
1479
- bg: '#7474800D'
1654
+ bg: colors.fill.light.tertiary
1480
1655
  }
1481
1656
  };
1482
1657
  }
@@ -1552,223 +1727,68 @@ var Badge = {
1552
1727
  defaultProps: defaultProps$1
1553
1728
  };
1554
1729
 
1555
- var baseStyle$2 = {
1556
- lineHeight: 1,
1557
- borderRadius: 'md',
1558
- fontWeight: 'bold',
1559
- _focus: {
1560
- boxShadow: 'outline'
1561
- },
1730
+ var baseStyle$2 = /*#__PURE__*/defineStyle({
1731
+ borderRadius: '4px',
1732
+ fontSize: '18px',
1733
+ bg: colors.fill.action,
1734
+ color: colors.label.primary.dark,
1735
+ px: '8px',
1736
+ py: '4px',
1737
+ bgGradient: 'linear-gradient(#FFFFFF29, #FFFFFF00)',
1738
+ shadow: '1px 0.5px #0000001A',
1562
1739
  _disabled: {
1563
- opacity: 0.4,
1564
- cursor: 'not-allowed',
1565
- boxShadow: 'none'
1566
- }
1567
- };
1568
-
1569
- var focusShadow = function focusShadow(color) {
1570
- return "0 0 0 3px " + color;
1571
- };
1572
-
1573
- function variantGhost(props) {
1574
- var c = props.colorScheme,
1575
- theme = props.theme;
1576
-
1577
- if (c === 'gray') {
1578
- var _focusColor = getColor(theme, 'gray.100');
1579
-
1580
- return {
1581
- color: mode("gray.500", "whiteAlpha.900")(props),
1582
- _hover: {
1583
- bg: mode("gray.50", "whiteAlpha.200")(props)
1584
- },
1585
- _active: {
1586
- bg: mode("gray.200", "whiteAlpha.300")(props)
1587
- },
1588
- _focus: {
1589
- boxShadow: focusShadow(_focusColor)
1590
- }
1591
- };
1592
- }
1593
-
1594
- var darkHoverBg = transparentize(c + ".200", 0.12)(theme);
1595
- var darkActiveBg = transparentize(c + ".200", 0.24)(theme);
1596
- var focusColor = getColor(theme, c + ".200");
1597
- return {
1598
- color: mode(c + ".500", c + ".200")(props),
1599
- bg: 'transparent',
1600
- _hover: {
1601
- bg: mode(c + ".50", darkHoverBg)(props)
1602
- },
1603
- _active: {
1604
- bg: mode(c + ".100", darkActiveBg)(props)
1605
- },
1606
- _focus: {
1607
- boxShadow: focusShadow(focusColor)
1608
- }
1609
- };
1610
- }
1611
-
1612
- function variantOutline$1(props) {
1613
- var c = props.colorScheme;
1614
- var borderColor = mode("gray.200", "whiteAlpha.300")(props);
1615
- return _extends({
1616
- border: '1px solid',
1617
- borderColor: c === 'gray' ? borderColor : 'currentColor'
1618
- }, variantGhost(props));
1619
- }
1620
- /** Accessible color overrides for less accessible colors. */
1621
-
1622
-
1623
- var accessibleColorMap = {
1624
- yellow: {
1625
- bg: 'yellow.400',
1626
- color: 'black',
1627
- hoverBg: 'yellow.500',
1628
- activeBg: 'yellow.600'
1740
+ backgroundColor: 'gray.100',
1741
+ borderColor: 'gray.100',
1742
+ color: 'gray.500',
1743
+ pointerEvents: 'none'
1744
+ },
1745
+ _hover: {
1746
+ bg: colors.fill.action
1747
+ },
1748
+ _active: {
1749
+ color: colors.label.primary.dark,
1750
+ bg: colors.fill.action,
1751
+ bgGradient: colors.fill.light.quaternary
1629
1752
  },
1630
- cyan: {
1631
- bg: 'cyan.400',
1632
- color: 'black',
1633
- hoverBg: 'cyan.500',
1634
- activeBg: 'cyan.600'
1753
+ _focus: {
1754
+ bg: colors.fill.action,
1755
+ border: "2px solid " + colors.border.focus
1635
1756
  }
1636
- };
1637
-
1638
- function variantSolid$1(props) {
1639
- var c = props.colorScheme,
1640
- theme = props.theme;
1641
- if (c === 'gray') return {
1642
- color: 'gray.500',
1643
- bg: mode("gray.50", "whiteAlpha.200")(props),
1644
- _hover: {
1645
- bg: mode("gray.100", "whiteAlpha.300")(props)
1646
- },
1647
- _active: {
1648
- bg: mode("gray.200", "whiteAlpha.400")(props)
1649
- }
1650
- };
1651
- if (c === 'darkgray') return {
1652
- color: 'white',
1653
- bg: 'gray.400',
1654
- _hover: {
1655
- bg: 'gray.600'
1656
- },
1657
- _active: {
1658
- bg: 'gray.700'
1659
- }
1660
- };
1757
+ });
1661
1758
 
1662
- var _ref = accessibleColorMap[c] || {},
1663
- _ref$bg = _ref.bg,
1664
- bg = _ref$bg === void 0 ? c + ".500" : _ref$bg,
1665
- _ref$color = _ref.color,
1666
- color = _ref$color === void 0 ? 'white' : _ref$color,
1667
- _ref$hoverBg = _ref.hoverBg,
1668
- hoverBg = _ref$hoverBg === void 0 ? c + ".600" : _ref$hoverBg,
1669
- _ref$activeBg = _ref.activeBg,
1670
- activeBg = _ref$activeBg === void 0 ? c + ".700" : _ref$activeBg;
1759
+ var variantSolid$1 = function variantSolid() {
1760
+ return _extends({}, baseStyle$2);
1761
+ };
1671
1762
 
1672
- var focusColor = getColor(theme, c + ".200");
1673
- return {
1674
- bg: mode(bg, c + ".200")(props),
1675
- color: mode(color, "gray.800")(props),
1763
+ var variantOutline$1 = function variantOutline() {
1764
+ return _extends({}, baseStyle$2, {
1765
+ color: colors.fill.action,
1766
+ bg: colors.label.primary.dark,
1767
+ border: 'none',
1676
1768
  _hover: {
1677
- bg: mode(hoverBg, c + ".300")(props)
1769
+ bg: colors.label.primary.dark
1678
1770
  },
1679
1771
  _active: {
1680
- bg: mode(activeBg, c + ".400")(props)
1772
+ color: colors.fill.action,
1773
+ bg: colors.label.primary.dark,
1774
+ bgGradient: colors.fill.light.quaternary
1681
1775
  },
1682
1776
  _focus: {
1683
- boxShadow: focusShadow(focusColor)
1777
+ bg: colors.label.primary.dark
1684
1778
  }
1685
- };
1686
- }
1687
- /**
1688
- * A variant that displays a solid variant when an active CSS class is
1689
- * detected, otherwise display a ghost variant. This is useful for pill nav filters.
1690
- */
1691
-
1692
-
1693
- function variantActiveSolid(props) {
1694
- return _extends({}, variantGhost(_extends({}, props, {
1695
- colorScheme: 'gray'
1696
- })), {
1697
- '&.active': _extends({}, variantSolid$1(props))
1698
1779
  });
1699
- }
1700
-
1701
- function variantLink(props) {
1702
- var c = props.colorScheme;
1703
- return {
1704
- padding: 0,
1705
- height: 'auto',
1706
- lineHeight: 'normal',
1707
- color: mode(c + ".500", c + ".200")(props),
1708
- _hover: {
1709
- textDecoration: 'underline'
1710
- },
1711
- _active: {
1712
- color: mode(c + ".700", c + ".500")(props)
1713
- }
1714
- };
1715
- }
1716
-
1717
- var variantUnstyled = {
1718
- bg: 'none',
1719
- color: 'inherit',
1720
- display: 'inline',
1721
- lineHeight: 'inherit',
1722
- m: 0,
1723
- p: 0
1724
1780
  };
1781
+
1725
1782
  var variants$2 = {
1726
- ghost: variantGhost,
1727
- outline: variantOutline$1,
1728
- solid: variantSolid$1,
1729
- activeSolid: variantActiveSolid,
1730
- link: variantLink,
1731
- unstyled: variantUnstyled
1732
- };
1733
- var sizes = {
1734
- lg: {
1735
- borderRadius: 'full',
1736
- h: 12,
1737
- minW: 20,
1738
- fontSize: 'lg',
1739
- px: 6
1740
- },
1741
- md: {
1742
- borderRadius: 'full',
1743
- h: 10,
1744
- minW: 20,
1745
- fontSize: 'md',
1746
- px: 4
1747
- },
1748
- sm: {
1749
- borderRadius: 'full',
1750
- h: 8,
1751
- minW: 8,
1752
- fontSize: 'sm',
1753
- px: 3
1754
- },
1755
- xs: {
1756
- borderRadius: 'full',
1757
- h: 6,
1758
- minW: 6,
1759
- fontSize: 'xs',
1760
- px: 2
1761
- }
1783
+ solid: /*#__PURE__*/variantSolid$1(),
1784
+ outline: /*#__PURE__*/variantOutline$1()
1762
1785
  };
1763
1786
  var defaultProps$2 = {
1764
- variant: 'solid',
1765
- size: 'md',
1766
- colorScheme: 'primary'
1787
+ solid: 'solid'
1767
1788
  };
1768
1789
  var Button$1 = {
1769
1790
  baseStyle: baseStyle$2,
1770
1791
  variants: variants$2,
1771
- sizes: sizes,
1772
1792
  defaultProps: defaultProps$2
1773
1793
  };
1774
1794
 
@@ -1788,26 +1808,26 @@ var Code = {
1788
1808
 
1789
1809
  var parts$1 = ['requiredIndicator', 'helperText'];
1790
1810
 
1791
- function baseStyleRequiredIndicator(props) {
1811
+ function baseStyleRequiredIndicator() {
1792
1812
  return {
1793
1813
  ml: 1,
1794
- color: mode('red.500', 'red.300')(props)
1814
+ color: colors.label.error
1795
1815
  };
1796
1816
  }
1797
1817
 
1798
- function baseStyleHelperText(props) {
1818
+ function baseStyleHelperText() {
1799
1819
  return {
1820
+ color: colors.label.secondary.light,
1800
1821
  mt: 1,
1801
- color: mode('gray.400', 'whiteAlpha.600')(props),
1802
- lineHeight: 'normal',
1803
- fontSize: 'sm'
1822
+ ml: 1,
1823
+ fontSize: '13px'
1804
1824
  };
1805
1825
  }
1806
1826
 
1807
- var baseStyle$4 = function baseStyle(props) {
1827
+ var baseStyle$4 = function baseStyle() {
1808
1828
  return {
1809
- requiredIndicator: baseStyleRequiredIndicator(props),
1810
- helperText: baseStyleHelperText(props)
1829
+ requiredIndicator: baseStyleRequiredIndicator(),
1830
+ helperText: baseStyleHelperText()
1811
1831
  };
1812
1832
  };
1813
1833
 
@@ -1818,26 +1838,26 @@ var Form$1 = {
1818
1838
 
1819
1839
  var parts$2 = ['text', 'icon'];
1820
1840
 
1821
- function baseStyleText(props) {
1841
+ function baseStyleText() {
1822
1842
  return {
1823
- color: mode('red.500', 'red.300')(props),
1843
+ color: colors.label.error,
1824
1844
  mt: 1,
1825
- lineHeight: 'normal',
1826
- fontSize: 'sm'
1845
+ ml: 1,
1846
+ fontSize: '13px'
1827
1847
  };
1828
1848
  }
1829
1849
 
1830
- function baseStyleIcon(props) {
1850
+ function baseStyleIcon() {
1831
1851
  return {
1832
- mr: '0.5em',
1833
- color: mode('red.500', 'red.300')(props)
1852
+ ml: 1,
1853
+ color: colors.label.error
1834
1854
  };
1835
1855
  }
1836
1856
 
1837
- var baseStyle$5 = function baseStyle(props) {
1857
+ var baseStyle$5 = function baseStyle() {
1838
1858
  return {
1839
- text: baseStyleText(props),
1840
- icon: baseStyleIcon(props)
1859
+ text: baseStyleText(),
1860
+ icon: baseStyleIcon()
1841
1861
  };
1842
1862
  };
1843
1863
 
@@ -1847,234 +1867,57 @@ var FormError = {
1847
1867
  };
1848
1868
 
1849
1869
  var baseStyle$6 = {
1850
- fontSize: 'md',
1851
- mr: 3,
1870
+ fontSize: '13px',
1871
+ position: 'absolute',
1872
+ top: 0,
1873
+ display: 'flex',
1874
+ ml: 1,
1852
1875
  mb: 1,
1853
- fontWeight: 'bold',
1854
- color: 'gray.700',
1855
- transition: 'all 0.2s',
1856
- opacity: 1,
1857
- _disabled: {
1858
- opacity: 0.4
1859
- }
1876
+ color: colors.label.primary.light,
1877
+ opacity: 1
1860
1878
  };
1861
1879
  var FormLabel = {
1862
1880
  baseStyle: baseStyle$6
1863
1881
  };
1864
1882
 
1865
- var parts$3 = ['field', 'addon'];
1883
+ var parts$3 = ['field'];
1866
1884
  var baseStyle$7 = {
1867
1885
  field: {
1868
- width: '100%',
1869
- outline: 0,
1870
- position: 'relative',
1871
- appearance: 'none',
1872
- transition: 'all 0.2s',
1886
+ fontSize: '13px',
1873
1887
  '::placeholder': {
1874
- color: 'gray.300'
1875
- }
1876
- }
1877
- };
1878
- var size = {
1879
- lg: {
1880
- fontSize: 'md',
1881
- pl: 3,
1882
- pr: 3,
1883
- h: 12,
1884
- borderRadius: 'md'
1885
- },
1886
- md: {
1887
- fontSize: 'md',
1888
- pl: 3,
1889
- pr: 3,
1890
- h: 10,
1891
- borderRadius: 'md'
1892
- },
1893
- sm: {
1894
- fontSize: 'sm',
1895
- pl: 3,
1896
- pr: 3,
1897
- h: 8,
1898
- borderRadius: 'sm'
1899
- }
1900
- };
1901
- var sizes$1 = {
1902
- lg: {
1903
- field: size.lg,
1904
- addon: size.lg
1905
- },
1906
- md: {
1907
- field: size.md,
1908
- addon: size.md
1909
- },
1910
- sm: {
1911
- field: size.sm,
1912
- addon: size.sm
1913
- }
1914
- };
1915
-
1916
- function getDefaults(props) {
1917
- var fc = props.focusBorderColor,
1918
- ec = props.errorBorderColor;
1919
- return {
1920
- focusBorderColor: fc || mode('blue.500', 'blue.300')(props),
1921
- errorBorderColor: ec || mode('red.500', 'red.300')(props)
1922
- };
1923
- }
1924
-
1925
- function variantOutline$2(props) {
1926
- var theme = props.theme;
1927
-
1928
- var _getDefaults = getDefaults(props),
1929
- fc = _getDefaults.focusBorderColor,
1930
- ec = _getDefaults.errorBorderColor;
1931
-
1932
- return {
1933
- field: {
1934
- border: '1px solid',
1935
- borderColor: 'inherit',
1936
- bg: 'white',
1937
- _hover: {
1938
- borderColor: mode('gray.300', 'whiteAlpha.400')(props)
1939
- },
1940
- _readOnly: {
1941
- boxShadow: 'none !important',
1942
- userSelect: 'all'
1943
- },
1944
- _disabled: {
1945
- opacity: 0.4,
1946
- cursor: 'not-allowed'
1947
- },
1948
- _focus: {
1949
- zIndex: 1,
1950
- borderColor: getColor(theme, fc),
1951
- boxShadow: "0 0 0 2px " + transparentize(fc, 0.3)(theme)
1952
- },
1953
- _invalid: {
1954
- borderColor: getColor(theme, ec),
1955
- boxShadow: 'none',
1956
- _focus: {
1957
- boxShadow: "0 0 0 2px " + transparentize(ec, 0.3)(theme)
1958
- }
1959
- }
1888
+ color: colors.label.secondary.light
1960
1889
  },
1961
- addon: {
1962
- border: '1px solid',
1963
- borderColor: mode('inherit', 'whiteAlpha.50')(props),
1964
- bg: mode('gray.100', 'whiteAlpha.300')(props)
1965
- }
1966
- };
1967
- }
1968
-
1969
- function variantFilled(props) {
1970
- var theme = props.theme;
1971
-
1972
- var _getDefaults2 = getDefaults(props),
1973
- fc = _getDefaults2.focusBorderColor,
1974
- ec = _getDefaults2.errorBorderColor;
1975
-
1976
- return {
1977
- field: {
1978
- border: '2px solid',
1979
- borderColor: 'transparent',
1980
- bg: mode('gray.50', 'whiteAlpha.50')(props),
1981
- _hover: {
1982
- bg: mode('gray.100', 'whiteAlpha.100')(props)
1983
- },
1984
- _readOnly: {
1985
- boxShadow: 'none !important',
1986
- userSelect: 'all'
1987
- },
1988
- _disabled: {
1989
- opacity: 0.4,
1990
- cursor: 'not-allowed'
1991
- },
1992
- _focus: {
1993
- bg: 'transparent',
1994
- borderColor: getColor(theme, fc)
1995
- },
1996
- _invalid: {
1997
- borderColor: getColor(theme, ec)
1998
- }
1890
+ py: '5px',
1891
+ px: '8px',
1892
+ border: '1px solid',
1893
+ borderColor: colors.border["default"],
1894
+ _disabled: {
1895
+ cursor: 'not-allowed',
1896
+ bg: colors.fill.light.quaternary,
1897
+ color: colors.label.secondary.light
1999
1898
  },
2000
- addon: {
1899
+ _focus: {
1900
+ bg: '#ffffff',
2001
1901
  border: '2px solid',
2002
- borderColor: 'transparent',
2003
- bg: mode('gray.100', 'whiteAlpha.50')(props)
1902
+ borderColor: colors.border.focus
2004
1903
  }
2005
- };
2006
- }
2007
-
2008
- function variantFlushed(props) {
2009
- var theme = props.theme;
2010
-
2011
- var _getDefaults3 = getDefaults(props),
2012
- fc = _getDefaults3.focusBorderColor,
2013
- ec = _getDefaults3.errorBorderColor;
2014
-
2015
- return {
2016
- field: {
2017
- borderBottom: '1px solid inherit',
2018
- borderRadius: 0,
2019
- pl: 0,
2020
- pr: 0,
2021
- bg: 'transparent',
2022
- _readOnly: {
2023
- boxShadow: 'none !important',
2024
- userSelect: 'all'
2025
- },
2026
- _focus: {
2027
- borderColor: getColor(theme, fc),
2028
- boxShadow: "0px 1px 0px 0px " + getColor(theme, fc)
2029
- },
2030
- _invalid: {
2031
- borderColor: getColor(theme, ec)
2032
- }
2033
- },
2034
- addon: {
2035
- borderBottom: '2px solid',
2036
- borderColor: 'inherit',
2037
- borderRadius: 0,
2038
- paddingX: 0,
2039
- bg: 'transparent'
2040
- }
2041
- };
2042
- }
2043
-
2044
- var variantUnstyled$1 = {
2045
- field: {
2046
- bg: 'transparent',
2047
- pl: 0,
2048
- pr: 0,
2049
- height: 'auto'
2050
- },
2051
- addon: {
2052
- bg: 'transparent',
2053
- pl: 0,
2054
- pr: 0,
2055
- height: 'auto'
2056
1904
  }
2057
1905
  };
2058
1906
  var variants$4 = {
2059
- outline: variantOutline$2,
2060
- filled: variantFilled,
2061
- flushed: variantFlushed,
2062
- unstyled: variantUnstyled$1
1907
+ "default": baseStyle$7
2063
1908
  };
2064
1909
  var defaultProps$4 = {
2065
- size: 'lg',
2066
- variant: 'outline'
1910
+ variant: 'default'
2067
1911
  };
2068
1912
  var Input$1 = {
2069
1913
  parts: parts$3,
2070
1914
  baseStyle: baseStyle$7,
2071
- sizes: sizes$1,
2072
1915
  variants: variants$4,
2073
1916
  defaultProps: defaultProps$4
2074
1917
  };
2075
1918
 
2076
1919
  var baseStyle$8 = {
2077
- color: 'blue.500',
1920
+ color: colors.fill.action,
2078
1921
  textDecoration: 'underline',
2079
1922
  transition: 'none',
2080
1923
  _hover: {
@@ -2181,72 +2024,7 @@ var Link = {
2181
2024
  variants: variants$5
2182
2025
  };
2183
2026
 
2184
- var parts$4 = ['item', 'command', 'list', 'button', 'groupTitle'];
2185
-
2186
- function baseStyleList(props) {
2187
- return {
2188
- bg: mode("#fff", "gray.700")(props),
2189
- boxShadow: mode("2xl", "dark-lg")(props),
2190
- color: 'inherit',
2191
- minW: '3xs',
2192
- py: 2,
2193
- zIndex: 'docked',
2194
- borderRadius: 'md',
2195
- borderWidth: 0,
2196
- overflow: 'hidden'
2197
- };
2198
- }
2199
-
2200
- function baseStyleItem(props) {
2201
- return {
2202
- fontSize: 'sm',
2203
- py: 2,
2204
- px: 4,
2205
- transition: 'background 50ms ease-in 0s',
2206
- _focus: {
2207
- bg: mode("blue.50", "whiteAlpha.200")(props)
2208
- },
2209
- _hover: {
2210
- bg: mode("blue.50", "whiteAlpha.200")(props)
2211
- },
2212
- _active: {
2213
- bg: mode("gray.200", "whiteAlpha.200")(props)
2214
- },
2215
- _expanded: {
2216
- bg: mode("gray.100", "whiteAlpha.100")(props)
2217
- },
2218
- _disabled: {
2219
- opacity: 0.4,
2220
- cursor: 'not-allowed'
2221
- }
2222
- };
2223
- }
2224
-
2225
- var baseStyleGroupTitle = {
2226
- mx: 4,
2227
- my: 2,
2228
- fontWeight: 'semibold',
2229
- fontSize: 'sm'
2230
- };
2231
- var baseStyleCommand = {
2232
- opacity: 0.6
2233
- };
2234
-
2235
- var baseStyle$9 = function baseStyle(props) {
2236
- return {
2237
- list: baseStyleList(props),
2238
- item: baseStyleItem(props),
2239
- groupTitle: baseStyleGroupTitle,
2240
- command: baseStyleCommand
2241
- };
2242
- };
2243
-
2244
- var Menu = {
2245
- parts: parts$4,
2246
- baseStyle: baseStyle$9
2247
- };
2248
-
2249
- var parts$5 = ['overlay', 'dialogContainer', 'dialog', 'header', 'closeButton', 'body', 'footer'];
2027
+ var parts$4 = ['overlay', 'dialogContainer', 'dialog', 'header', 'closeButton', 'body', 'footer'];
2250
2028
  var baseStyleOverlay = {
2251
2029
  bg: 'blackAlpha.600',
2252
2030
  zIndex: 'modal'
@@ -2320,7 +2098,7 @@ var baseStyleFooter = {
2320
2098
  pb: 16
2321
2099
  };
2322
2100
 
2323
- var baseStyle$a = function baseStyle(props) {
2101
+ var baseStyle$9 = function baseStyle(props) {
2324
2102
  return {
2325
2103
  overlay: baseStyleOverlay,
2326
2104
  dialogContainer: baseStyleDialogContainer(props),
@@ -2413,7 +2191,7 @@ function getSize(value) {
2413
2191
  };
2414
2192
  }
2415
2193
 
2416
- var sizes$2 = {
2194
+ var sizes = {
2417
2195
  xs: /*#__PURE__*/getSize('xs'),
2418
2196
  sm: /*#__PURE__*/getSize('sm'),
2419
2197
  md: /*#__PURE__*/getSize('md'),
@@ -2444,26 +2222,24 @@ var defaultProps$5 = {
2444
2222
  isCentered: true
2445
2223
  };
2446
2224
  var Modal = {
2447
- parts: parts$5,
2448
- baseStyle: baseStyle$a,
2449
- sizes: sizes$2,
2225
+ parts: parts$4,
2226
+ baseStyle: baseStyle$9,
2227
+ sizes: sizes,
2450
2228
  variants: variants$6,
2451
2229
  defaultProps: defaultProps$5
2452
2230
  };
2453
2231
 
2454
- var sizes$3 = Input$1.sizes,
2455
- defaultProps$6 = Input$1.defaultProps,
2232
+ var defaultProps$6 = Input$1.defaultProps,
2456
2233
  variants$7 = Input$1.variants;
2457
- var parts$6 = ['field', 'icon'];
2234
+ var parts$5 = ['field', 'icon'];
2458
2235
 
2459
- function baseStyleField(props) {
2236
+ function baseStyleField() {
2460
2237
  return _extends({}, Input$1.baseStyle.field, {
2461
2238
  appearance: 'none',
2462
2239
  paddingBottom: '1px',
2463
2240
  lineHeight: 'normal',
2464
2241
  bg: 'white',
2465
- '> option': {
2466
- bg: mode('white', 'gray.700')(props)
2242
+ '> option': {// bg: mode('white', 'gray.700')(props),
2467
2243
  }
2468
2244
  });
2469
2245
  }
@@ -2476,22 +2252,21 @@ var baseStyleInput = {
2476
2252
  }
2477
2253
  };
2478
2254
 
2479
- var baseStyle$b = function baseStyle(props) {
2255
+ var baseStyle$a = function baseStyle() {
2480
2256
  return {
2481
- field: baseStyleField(props),
2257
+ field: baseStyleField(),
2482
2258
  icon: baseStyleInput
2483
2259
  };
2484
2260
  };
2485
2261
 
2486
2262
  var Select = {
2487
- parts: parts$6,
2488
- baseStyle: baseStyle$b,
2489
- sizes: sizes$3,
2263
+ parts: parts$5,
2264
+ baseStyle: baseStyle$a,
2490
2265
  variants: variants$7,
2491
2266
  defaultProps: defaultProps$6
2492
2267
  };
2493
2268
 
2494
- var parts$7 = ['track', 'thumb'];
2269
+ var parts$6 = ['track', 'thumb'];
2495
2270
 
2496
2271
  function baseStyleTrack(props) {
2497
2272
  var c = props.colorScheme,
@@ -2524,14 +2299,14 @@ var baseStyleThumb = {
2524
2299
  transform: 'translateX(0)'
2525
2300
  };
2526
2301
 
2527
- var baseStyle$c = function baseStyle(props) {
2302
+ var baseStyle$b = function baseStyle(props) {
2528
2303
  return {
2529
2304
  track: baseStyleTrack(props),
2530
2305
  thumb: baseStyleThumb
2531
2306
  };
2532
2307
  };
2533
2308
 
2534
- var sizes$4 = {
2309
+ var sizes$1 = {
2535
2310
  sm: {
2536
2311
  track: {
2537
2312
  w: '1.375rem',
@@ -2577,13 +2352,13 @@ var defaultProps$7 = {
2577
2352
  colorScheme: 'blue'
2578
2353
  };
2579
2354
  var Switch = {
2580
- parts: parts$7,
2581
- baseStyle: baseStyle$c,
2582
- sizes: sizes$4,
2355
+ parts: parts$6,
2356
+ baseStyle: baseStyle$b,
2357
+ sizes: sizes$1,
2583
2358
  defaultProps: defaultProps$7
2584
2359
  };
2585
2360
 
2586
- var parts$8 = ['root', 'tablist', 'tab', 'tabpanel', 'indicator'];
2361
+ var parts$7 = ['root', 'tablist', 'tab', 'tabpanel', 'indicator'];
2587
2362
 
2588
2363
  function baseStyleRoot(props) {
2589
2364
  var orientation = props.orientation;
@@ -2623,7 +2398,7 @@ var baseStyleTabpanel = {
2623
2398
  p: 4
2624
2399
  };
2625
2400
 
2626
- var baseStyle$d = function baseStyle(props) {
2401
+ var baseStyle$c = function baseStyle(props) {
2627
2402
  return {
2628
2403
  root: baseStyleRoot(props),
2629
2404
  tab: baseStyleTab(props),
@@ -2632,7 +2407,7 @@ var baseStyle$d = function baseStyle(props) {
2632
2407
  };
2633
2408
  };
2634
2409
 
2635
- var sizes$5 = {
2410
+ var sizes$2 = {
2636
2411
  sm: {
2637
2412
  tab: {
2638
2413
  py: '0.25rem',
@@ -2773,18 +2548,18 @@ function variantSolidRounded(props) {
2773
2548
  };
2774
2549
  }
2775
2550
 
2776
- var variantUnstyled$2 = {};
2551
+ var variantUnstyled = {};
2777
2552
  var variantSimple = {
2778
2553
  tab: {
2779
2554
  position: 'relative',
2780
2555
  borderColor: 'transparent',
2781
2556
  '&.active': {
2782
- color: colors.blue[500],
2557
+ color: colors.fill.action,
2783
2558
  bg: 'transparent',
2784
- borderBottom: '1px solid blue.500'
2559
+ borderBottom: "1px solid " + colors.fill.action
2785
2560
  },
2786
2561
  _selected: {
2787
- color: colors.blue[500],
2562
+ color: colors.fill.action,
2788
2563
  bg: 'transparent',
2789
2564
  _after: {
2790
2565
  content: '""',
@@ -2808,7 +2583,7 @@ var variants$8 = {
2808
2583
  'enclosed-colored': variantEnclosedColored,
2809
2584
  'soft-rounded': variantSoftRounded,
2810
2585
  'solid-rounded': variantSolidRounded,
2811
- unstyled: variantUnstyled$2,
2586
+ unstyled: variantUnstyled,
2812
2587
  simple: variantSimple
2813
2588
  };
2814
2589
  var defaultProps$8 = {
@@ -2817,70 +2592,30 @@ var defaultProps$8 = {
2817
2592
  colorScheme: 'blue'
2818
2593
  };
2819
2594
  var Tabs = {
2820
- parts: parts$8,
2821
- baseStyle: baseStyle$d,
2822
- sizes: sizes$5,
2595
+ parts: parts$7,
2596
+ baseStyle: baseStyle$c,
2597
+ sizes: sizes$2,
2823
2598
  variants: variants$8,
2824
2599
  defaultProps: defaultProps$8
2825
2600
  };
2826
2601
 
2827
- var baseStyle$e = /*#__PURE__*/_extends({}, Input$1.baseStyle.field, {
2602
+ var baseStyle$d = /*#__PURE__*/_extends({}, Input$1.baseStyle.field, {
2828
2603
  display: 'block',
2829
2604
  paddingY: '8px',
2830
- minHeight: '80px',
2605
+ height: '80px',
2831
2606
  lineHeight: 'short'
2832
2607
  });
2833
2608
 
2834
- var codeVariant = function codeVariant(props) {
2835
- var _focus = Input$1.variants.outline(props).field._focus;
2836
-
2837
- return {
2838
- bg: 'blue.900',
2839
- color: 'white',
2840
- fontFamily: 'mono',
2841
- fontSize: 'sm',
2842
- border: '1px',
2843
- borderColor: 'blue.900',
2844
- borderRadius: 'lg',
2845
- p: 6,
2846
- wordBreak: 'break-all',
2847
- _focus: _focus
2848
- };
2849
- };
2850
-
2851
- var variants$9 = {
2852
- outline: function outline(props) {
2853
- return Input$1.variants.outline(props).field;
2854
- },
2855
- flushed: function flushed(props) {
2856
- return Input$1.variants.flushed(props).field;
2857
- },
2858
- filled: function filled(props) {
2859
- return Input$1.variants.filled(props).field;
2860
- },
2861
- code: function code(props) {
2862
- return codeVariant(props);
2863
- },
2864
- unstyled: Input$1.variants.unstyled.field
2865
- };
2866
- var sizes$6 = {
2867
- sm: Input$1.sizes.sm.field,
2868
- md: Input$1.sizes.md.field,
2869
- lg: Input$1.sizes.lg.field
2870
- };
2871
2609
  var defaultProps$9 = {
2872
- size: 'lg',
2873
- variant: 'outline'
2610
+ variant: 'default'
2874
2611
  };
2875
2612
  var Textarea = {
2876
- baseStyle: baseStyle$e,
2877
- sizes: sizes$6,
2878
- variants: variants$9,
2613
+ baseStyle: baseStyle$d,
2879
2614
  defaultProps: defaultProps$9
2880
2615
  };
2881
2616
 
2882
2617
  var defaultProps$a = Text$2.defaultProps;
2883
- var baseStyle$f = {
2618
+ var baseStyle$e = {
2884
2619
  fontWeight: typography.fontWeights.normal,
2885
2620
  fontFamily: typography.fonts.base,
2886
2621
  fontSize: typography.fontSizes.sm,
@@ -2889,7 +2624,7 @@ var baseStyle$f = {
2889
2624
  };
2890
2625
 
2891
2626
  function variantHeader() {
2892
- return _extends({}, baseStyle$f, {
2627
+ return _extends({}, baseStyle$e, {
2893
2628
  fontWeight: typography.fontWeights.bold,
2894
2629
  fontSize: typography.fontSizes['3xl'],
2895
2630
  lineHeight: typography.lineHeights[8],
@@ -2898,7 +2633,7 @@ function variantHeader() {
2898
2633
  }
2899
2634
 
2900
2635
  function variantSubheader() {
2901
- return _extends({}, baseStyle$f, {
2636
+ return _extends({}, baseStyle$e, {
2902
2637
  fontWeight: typography.fontWeights.semibold,
2903
2638
  fontSize: typography.fontSizes['lg'],
2904
2639
  lineHeight: typography.lineHeights[5],
@@ -2907,19 +2642,19 @@ function variantSubheader() {
2907
2642
  }
2908
2643
 
2909
2644
  function variantParagraph() {
2910
- return baseStyle$f;
2645
+ return baseStyle$e;
2911
2646
  }
2912
2647
 
2913
- var variants$a = {
2648
+ var variants$9 = {
2914
2649
  header: variantHeader,
2915
2650
  subheader: variantSubheader,
2916
2651
  paragraph: variantParagraph
2917
2652
  };
2918
2653
  var Text$1 = {
2919
- baseStyle: baseStyle$f,
2920
- variants: variants$a,
2654
+ baseStyle: baseStyle$e,
2655
+ variants: variants$9,
2921
2656
  defaultProps: /*#__PURE__*/_extends({}, defaultProps$a, {
2922
- variant: variants$a.paragraph
2657
+ variant: variants$9.paragraph
2923
2658
  })
2924
2659
  };
2925
2660
 
@@ -2958,7 +2693,6 @@ var customXQChakraTheme = /*#__PURE__*/extendTheme( /*#__PURE__*/_extends({
2958
2693
  FormLabel: FormLabel,
2959
2694
  Input: Input$1,
2960
2695
  Link: Link,
2961
- Menu: Menu,
2962
2696
  Modal: Modal,
2963
2697
  Select: Select,
2964
2698
  Switch: Switch,