@xqmsg/ui-core 0.22.3 → 0.23.1-rc.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 (40) hide show
  1. package/dist/components/form/FormTypes.d.ts +2 -0
  2. package/dist/components/input/StackedCheckbox/StackedCheckbox.d.ts +3 -2
  3. package/dist/components/input/StackedInput/StackedInput.d.ts +1 -0
  4. package/dist/components/input/StackedPilledInput/index.d.ts +2 -0
  5. package/dist/components/input/StackedTextarea/StackedTextarea.d.ts +3 -0
  6. package/dist/components/input/components/token/index.d.ts +1 -0
  7. package/dist/components/input/index.d.ts +3 -2
  8. package/dist/components/select/index.d.ts +27 -0
  9. package/dist/index.d.ts +1 -0
  10. package/dist/theme/components/button.d.ts +116 -0
  11. package/dist/theme/components/checkbox.d.ts +28 -0
  12. package/dist/theme/components/input.d.ts +12 -0
  13. package/dist/theme/components/select.d.ts +12 -0
  14. package/dist/theme/components/textarea.d.ts +66 -0
  15. package/dist/ui-core.cjs.development.js +330 -55
  16. package/dist/ui-core.cjs.development.js.map +1 -1
  17. package/dist/ui-core.cjs.production.min.js +1 -1
  18. package/dist/ui-core.cjs.production.min.js.map +1 -1
  19. package/dist/ui-core.esm.js +332 -58
  20. package/dist/ui-core.esm.js.map +1 -1
  21. package/package.json +2 -1
  22. package/src/components/button/Button.stories.tsx +92 -27
  23. package/src/components/form/FormTypes.ts +2 -0
  24. package/src/components/form/section/index.tsx +2 -0
  25. package/src/components/input/Input.stories.tsx +66 -0
  26. package/src/components/input/StackedCheckbox/StackedCheckbox.tsx +12 -4
  27. package/src/components/input/StackedInput/StackedInput.tsx +5 -0
  28. package/src/components/input/StackedPilledInput/index.tsx +287 -251
  29. package/src/components/input/StackedTextarea/StackedTextarea.tsx +29 -5
  30. package/src/components/input/components/dropdown/index.tsx +1 -1
  31. package/src/components/input/components/token/index.tsx +6 -5
  32. package/src/components/input/index.tsx +22 -9
  33. package/src/components/select/index.tsx +184 -0
  34. package/src/components/tabs/TabsWrapper.stories.tsx +1 -1
  35. package/src/index.tsx +3 -0
  36. package/src/theme/components/button.ts +67 -0
  37. package/src/theme/components/checkbox.ts +25 -0
  38. package/src/theme/components/input.ts +15 -1
  39. package/src/theme/components/textarea.ts +20 -0
  40. package/src/theme/customXQChakraTheme.ts +2 -0
@@ -1,5 +1,5 @@
1
1
  import React__default, { memo, forwardRef, createElement, useMemo, useCallback, Children, useEffect, useRef, useState } from 'react';
2
- import { Box, Button as Button$2, Alert as Alert$1, AlertDescription, Flex, Text as Text$2, Spinner, Checkbox, InputGroup, Input as Input$2, RadioGroup, Radio, InputRightElement, Textarea as Textarea$1, useOutsideClick, Switch as Switch$1, FormLabel as FormLabel$1, Tooltip, FormControl, FormErrorMessage, FormHelperText, SimpleGrid, Image as Image$1, useMediaQuery, Grid, GridItem, IconButton, Collapse, Modal as Modal$2, ModalOverlay, ModalContent, ModalHeader, ModalBody, ModalFooter, Link as Link$2, Table as Table$2, Tbody, Tr, Td, TableContainer, Thead, Th, Tabs as Tabs$1, TabList, Tab, extendTheme, useToast as useToast$1 } from '@chakra-ui/react';
2
+ import { Box, Button as Button$2, Alert as Alert$1, AlertDescription, Flex, Text as Text$2, Spinner, Checkbox as Checkbox$1, InputGroup, Input as Input$2, RadioGroup, Radio, InputRightElement, Textarea as Textarea$1, useOutsideClick, Switch as Switch$1, FormLabel as FormLabel$1, Tooltip, FormControl, FormErrorMessage, FormHelperText, SimpleGrid, Image as Image$1, Select as Select$1, useMediaQuery, Grid, GridItem, IconButton, Collapse, Modal as Modal$2, ModalOverlay, ModalContent, ModalHeader, ModalBody, ModalFooter, Link as Link$2, Table as Table$2, Tbody, Tr, Td, TableContainer, Thead, Th, Tabs as Tabs$1, TabList, Tab, createMultiStyleConfigHelpers, defineStyle as defineStyle$1, extendTheme, useToast as useToast$1 } from '@chakra-ui/react';
3
3
  import { FormProvider, useWatch, Controller } from 'react-hook-form';
4
4
  import { debounce, truncate } from 'lodash-es';
5
5
  import { QuestionOutlineIcon, CloseIcon, HamburgerIcon } from '@chakra-ui/icons';
@@ -8,6 +8,7 @@ import { HiOutlineRefresh } from 'react-icons/hi';
8
8
  import { ChakraProvider } from '@chakra-ui/provider';
9
9
  import { createBreakpoints, transparentize, mode, getColor } from '@chakra-ui/theme-tools';
10
10
  import { defineStyle } from '@chakra-ui/system';
11
+ import { checkboxAnatomy } from '@chakra-ui/anatomy';
11
12
 
12
13
  /**
13
14
  * A functional React component utilized to render the `ActionRow` component
@@ -754,9 +755,10 @@ var StackedCheckbox = /*#__PURE__*/React__default.forwardRef(function (_ref2, _r
754
755
  var value = _ref2.value,
755
756
  label = _ref2.label,
756
757
  _onChange = _ref2.onChange,
757
- disabled = _ref2.disabled;
758
+ disabled = _ref2.disabled,
759
+ variant = _ref2.variant;
758
760
  if (value === null) return null;
759
- return /*#__PURE__*/React__default.createElement(Checkbox, {
761
+ return /*#__PURE__*/React__default.createElement(Checkbox$1, {
760
762
  ref: _ref,
761
763
  defaultChecked: Boolean(value),
762
764
  defaultValue: value,
@@ -764,9 +766,10 @@ var StackedCheckbox = /*#__PURE__*/React__default.forwardRef(function (_ref2, _r
764
766
  if (_onChange) return _onChange(e.target.checked);
765
767
  },
766
768
  isChecked: Boolean(value),
767
- disabled: disabled
769
+ disabled: disabled,
770
+ variant: variant
768
771
  }, /*#__PURE__*/React__default.createElement(Text$2, {
769
- fontSize: "13px",
772
+ fontSize: variant === 'mobile' ? '17px' : '13px',
770
773
  alignSelf: "center"
771
774
  }, label));
772
775
  });
@@ -785,9 +788,6 @@ function _extends$6() {
785
788
  };
786
789
  return _extends$6.apply(this, arguments);
787
790
  }
788
- function _objectDestructuringEmpty(obj) {
789
- if (obj == null) throw new TypeError("Cannot destructure " + obj);
790
- }
791
791
  function _objectWithoutPropertiesLoose(source, excluded) {
792
792
  if (source == null) return {};
793
793
  var target = {};
@@ -801,7 +801,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
801
801
  return target;
802
802
  }
803
803
 
804
- var _excluded = ["type", "isRequired", "rightElement", "leftElement", "defaultValue", "allowDefault"];
804
+ var _excluded = ["type", "isRequired", "rightElement", "leftElement", "defaultValue", "allowDefault", "variant"];
805
805
  /**
806
806
  * A functional React component utilized to render the `StackedInput` component.
807
807
  */
@@ -813,13 +813,16 @@ var StackedInput = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref)
813
813
  leftElement = _ref2.leftElement,
814
814
  defaultValue = _ref2.defaultValue,
815
815
  allowDefault = _ref2.allowDefault,
816
+ variant = _ref2.variant,
816
817
  props = _objectWithoutPropertiesLoose(_ref2, _excluded);
817
- return /*#__PURE__*/React__default.createElement(InputGroup, null, leftElement && leftElement, /*#__PURE__*/React__default.createElement(Input$2, Object.assign({
818
+ return /*#__PURE__*/React__default.createElement(InputGroup, null, leftElement && leftElement, variant, /*#__PURE__*/React__default.createElement(Input$2, Object.assign({
818
819
  type: type,
819
820
  isRequired: isRequired
820
821
  }, props, {
821
822
  ref: _ref,
822
823
  defaultValue: defaultValue,
824
+ fontSize: variant === 'mobile' ? '17px' : '13px',
825
+ variant: variant,
823
826
  onKeyDown: function onKeyDown(e) {
824
827
  if (e.key === 'Enter' && !allowDefault) {
825
828
  e.stopPropagation();
@@ -865,7 +868,8 @@ var Dropdown = function Dropdown(_ref) {
865
868
  return options.map(function (option, idx) {
866
869
  return /*#__PURE__*/React__default.createElement(Box, {
867
870
  key: idx,
868
- width: "100%"
871
+ width: "100%",
872
+ role: "combobox"
869
873
  }, option.value === 'section_header' && options[idx + 1] && options[idx + 1].value !== 'section_header' && /*#__PURE__*/React__default.createElement(Box, {
870
874
  color: colors.label.secondary.light,
871
875
  fontSize: "13px",
@@ -1161,17 +1165,35 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
1161
1165
  }));
1162
1166
  });
1163
1167
 
1168
+ var _excluded$2 = ["isRequired", "allowDefault", "variant"];
1164
1169
  /**
1165
1170
  * A functional React component utilized to render the `StackedTextarea` component.
1166
1171
  */
1167
1172
  var StackedTextarea = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
1168
- var props = _extends$6({}, (_objectDestructuringEmpty(_ref2), _ref2));
1173
+ var allowDefault = _ref2.allowDefault,
1174
+ variant = _ref2.variant,
1175
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
1176
+ if (variant === 'mobile') {
1177
+ return /*#__PURE__*/React__default.createElement(Flex, null, allowDefault, /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
1178
+ ref: _ref
1179
+ }, props, {
1180
+ variant: variant,
1181
+ fontSize: "17px",
1182
+ onKeyDown: function onKeyDown(e) {
1183
+ if (e.key === 'Enter' && !allowDefault) {
1184
+ e.stopPropagation();
1185
+ e.preventDefault();
1186
+ }
1187
+ }
1188
+ })));
1189
+ }
1169
1190
  return /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
1170
1191
  ref: _ref
1171
1192
  }, props, {
1172
- fontSize: "13px",
1193
+ variant: variant,
1194
+ fontSize: variant === '' ? '13px' : '17px',
1173
1195
  onKeyDown: function onKeyDown(e) {
1174
- if (e.key === 'Enter') {
1196
+ if (e.key === 'Enter' && !allowDefault) {
1175
1197
  e.stopPropagation();
1176
1198
  e.preventDefault();
1177
1199
  }
@@ -1215,15 +1237,17 @@ var Close = function Close(_ref) {
1215
1237
  // For v1 we are truncating the label at 15 characters to avoid overflow
1216
1238
  var Token = function Token(_ref) {
1217
1239
  var label = _ref.label,
1218
- onDelete = _ref.onDelete;
1240
+ onDelete = _ref.onDelete,
1241
+ _ref$isMobile = _ref.isMobile,
1242
+ isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile;
1219
1243
  return /*#__PURE__*/React__default.createElement(Flex, {
1220
1244
  key: label,
1221
- borderRadius: "full",
1245
+ borderRadius: 'full',
1222
1246
  backgroundColor: "#7676801F",
1223
1247
  alignItems: "center",
1224
1248
  width: "fit-content",
1225
1249
  w: "auto",
1226
- h: "16px",
1250
+ h: isMobile ? '18px' : '16px',
1227
1251
  pl: "6px",
1228
1252
  pr: "2px",
1229
1253
  py: "2px",
@@ -1231,13 +1255,13 @@ var Token = function Token(_ref) {
1231
1255
  }, /*#__PURE__*/React__default.createElement(Text$2, {
1232
1256
  whiteSpace: "nowrap",
1233
1257
  color: colors.label.primary.light,
1234
- fontSize: "13px",
1258
+ fontSize: isMobile ? '17px' : '13px',
1235
1259
  pr: "4px"
1236
1260
  }, truncate(label.trim(), {
1237
1261
  length: 15,
1238
1262
  omission: '...'
1239
1263
  })), /*#__PURE__*/React__default.createElement(Close, {
1240
- boxSize: "11px",
1264
+ boxSize: isMobile ? '17px' : '11px',
1241
1265
  onClick: onDelete
1242
1266
  }));
1243
1267
  };
@@ -1534,7 +1558,10 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1534
1558
  setValue = _ref2.setValue,
1535
1559
  control = _ref2.control,
1536
1560
  placeholder = _ref2.placeholder,
1537
- disabled = _ref2.disabled;
1561
+ disabled = _ref2.disabled,
1562
+ _ref2$separators = _ref2.separators,
1563
+ separators = _ref2$separators === void 0 ? ['Enter', ' ', ',', ';', 'Tab'] : _ref2$separators,
1564
+ variant = _ref2.variant;
1538
1565
  var watchedValue = useWatch({
1539
1566
  control: control,
1540
1567
  name: name
@@ -1561,7 +1588,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1561
1588
  setLatestFormValueToArray([]);
1562
1589
  }
1563
1590
  if (watchedValue !== undefined && watchedValue != null && watchedValue.length) {
1564
- setLatestFormValueToArray(watchedValue.split(',').filter(Boolean));
1591
+ setLatestFormValueToArray(watchedValue.split(';').join(',').split(',').filter(Boolean));
1565
1592
  if (latestTokenElement) {
1566
1593
  latestTokenElement.scrollIntoView({
1567
1594
  block: 'end',
@@ -1571,12 +1598,17 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1571
1598
  }
1572
1599
  }
1573
1600
  }, [latestTokenElement, watchedValue]);
1601
+ var handleOnChange = function handleOnChange(e) {
1602
+ if (tokenIndex === null) {
1603
+ setLocalValue(e.target.value.trim().replace(',', '').replace(';', '').length ? e.target.value : '');
1604
+ }
1605
+ };
1574
1606
  var onHandleKeyDown = function onHandleKeyDown(e) {
1575
1607
  if (e.key === 'Enter') {
1576
1608
  e.stopPropagation();
1577
1609
  e.preventDefault();
1578
1610
  }
1579
- if ((e.key === ' ' || e.key === 'Enter' || e.key === ',' || e.key === 'Tab') && localValue.trim().length) {
1611
+ if (separators.includes(e.key)) {
1580
1612
  if (e.key === 'Enter' && !localValue.trim().length && tokenIndex !== null) {
1581
1613
  setLocalValue(lastestFormValueToArray[tokenIndex]);
1582
1614
  var _filteredUniqueValues = Array.from(new Set(lastestFormValueToArray.filter(function (value) {
@@ -1588,7 +1620,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1588
1620
  });
1589
1621
  return setTokenIndex(null);
1590
1622
  }
1591
- var filteredUniqueValues = Array.from(new Set([].concat(lastestFormValueToArray, localValue.trim().split(','))));
1623
+ var filteredUniqueValues = Array.from(new Set([].concat(lastestFormValueToArray, localValue.trim().split(';').join(',').split(','))));
1592
1624
  setLocalValue('');
1593
1625
  return setValue(name, filteredUniqueValues.toString(), {
1594
1626
  shouldValidate: true,
@@ -1666,14 +1698,15 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1666
1698
  onBlur();
1667
1699
  }
1668
1700
  });
1701
+ var isMobile = variant === 'mobile';
1669
1702
  return /*#__PURE__*/React__default.createElement(Box, {
1670
1703
  position: "relative"
1671
1704
  }, /*#__PURE__*/React__default.createElement(Flex, {
1672
- fontSize: "13px",
1705
+ fontSize: isMobile ? '17px' : '13px',
1673
1706
  border: isFocussed ? '2px solid' : '.5px solid',
1674
1707
  borderColor: isFocussed ? colors.border.focus : colors.border["default"],
1675
1708
  pl: "8px",
1676
- borderRadius: "4px",
1709
+ borderRadius: isMobile ? '0' : '4px',
1677
1710
  alignItems: "center",
1678
1711
  justifyContent: "space-between",
1679
1712
  onClick: function onClick() {
@@ -1688,7 +1721,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1688
1721
  bg: disabled ? colors.fill.light.quaternary : '#ffffff',
1689
1722
  cursor: disabled ? 'not-allowed' : 'pointer',
1690
1723
  ref: inputWrapperRef,
1691
- h: "26px"
1724
+ h: isMobile ? '48px' : '26px'
1692
1725
  }, /*#__PURE__*/React__default.createElement(Flex, {
1693
1726
  h: "100%",
1694
1727
  alignItems: "center",
@@ -1724,11 +1757,12 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1724
1757
  e.stopPropagation();
1725
1758
  e.preventDefault();
1726
1759
  onRemoveTag(index);
1727
- }
1760
+ },
1761
+ isMobile: isMobile
1728
1762
  }));
1729
1763
  }) : null, !lastestFormValueToArray.length && !isFocussed ? /*#__PURE__*/React__default.createElement(Text$2, {
1730
1764
  color: colors.label.secondary.light,
1731
- fontSize: "13px"
1765
+ fontSize: isMobile ? '17px' : '13px'
1732
1766
  }, placeholder) : null), !disabled && /*#__PURE__*/React__default.createElement(Flex, {
1733
1767
  flex: 1,
1734
1768
  minWidth: isFocussed && !tokenIndex ? '20%' : 0
@@ -1745,9 +1779,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1745
1779
  boxShadow: 'none !important'
1746
1780
  },
1747
1781
  value: localValue,
1748
- onChange: function onChange(e) {
1749
- return tokenIndex === null && setLocalValue(e.target.value.trim().replace(',', '').length ? e.target.value : '');
1750
- },
1782
+ onChange: handleOnChange,
1751
1783
  ref: inputRef,
1752
1784
  onFocus: function onFocus() {
1753
1785
  return setIsFocussed(true);
@@ -1755,7 +1787,8 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1755
1787
  onBlur: function onBlur() {
1756
1788
  setIsFocussed(false);
1757
1789
  return setTokenIndex(null);
1758
- }
1790
+ },
1791
+ variant: variant
1759
1792
  }))));
1760
1793
  });
1761
1794
 
@@ -1830,6 +1863,8 @@ function Input(_ref) {
1830
1863
  rightElement = _ref.rightElement,
1831
1864
  leftElement = _ref.leftElement,
1832
1865
  allowDefault = _ref.allowDefault,
1866
+ _ref$variant = _ref.variant,
1867
+ variant = _ref$variant === void 0 ? 'default' : _ref$variant,
1833
1868
  onChange = _ref.onChange,
1834
1869
  setValue = _ref.setValue,
1835
1870
  setError = _ref.setError,
@@ -1854,7 +1889,8 @@ function Input(_ref) {
1854
1889
  disabled: disabled,
1855
1890
  defaultValue: defaultValue,
1856
1891
  value: value,
1857
- allowDefault: allowDefault
1892
+ allowDefault: allowDefault,
1893
+ variant: variant
1858
1894
  });
1859
1895
  case 'radio':
1860
1896
  return /*#__PURE__*/React__default.createElement(StackedRadioGroup, {
@@ -1902,7 +1938,8 @@ function Input(_ref) {
1902
1938
  onBlur: onBlur,
1903
1939
  ref: ref,
1904
1940
  disabled: disabled,
1905
- value: value
1941
+ value: value,
1942
+ variant: variant
1906
1943
  });
1907
1944
  case 'checkbox':
1908
1945
  return /*#__PURE__*/React__default.createElement(StackedCheckbox, {
@@ -1916,7 +1953,8 @@ function Input(_ref) {
1916
1953
  value: value,
1917
1954
  defaultValue: defaultValue,
1918
1955
  label: label,
1919
- disabled: disabled
1956
+ disabled: disabled,
1957
+ variant: variant
1920
1958
  });
1921
1959
  case 'multi-select':
1922
1960
  return /*#__PURE__*/React__default.createElement(StackedMultiSelect, {
@@ -1953,7 +1991,8 @@ function Input(_ref) {
1953
1991
  setError: setError,
1954
1992
  clearErrors: clearErrors,
1955
1993
  control: control,
1956
- maxLength: maxLength
1994
+ maxLength: maxLength,
1995
+ variant: variant
1957
1996
  });
1958
1997
  case 'switch':
1959
1998
  return /*#__PURE__*/React__default.createElement(StackedSwitch, {
@@ -1971,6 +2010,7 @@ function Input(_ref) {
1971
2010
  return null;
1972
2011
  }
1973
2012
  };
2013
+ var nonLabeledInputs = ['checkbox'];
1974
2014
  return /*#__PURE__*/React__default.createElement(Controller, {
1975
2015
  control: control,
1976
2016
  name: name,
@@ -1989,8 +2029,8 @@ function Input(_ref) {
1989
2029
  id: name,
1990
2030
  isInvalid: isInvalid,
1991
2031
  position: "relative",
1992
- py: inputType !== 'checkbox' && label || helperText || isInvalid ? 5 : 0
1993
- }, label && inputType !== 'checkbox' && /*#__PURE__*/React__default.createElement(Label$1, {
2032
+ py: !nonLabeledInputs.includes(inputType) && variant !== 'mobile' && label || helperText || isInvalid ? 5 : 0
2033
+ }, label && !nonLabeledInputs.includes(inputType) && variant !== 'mobile' && /*#__PURE__*/React__default.createElement(Label$1, {
1994
2034
  tooltipText: tooltipText,
1995
2035
  label: label,
1996
2036
  isRequired: isRequired
@@ -2029,7 +2069,8 @@ function FormSection(_ref) {
2029
2069
  maxLength = _ref2.maxLength,
2030
2070
  ariaLabel = _ref2.ariaLabel,
2031
2071
  disabled = _ref2.disabled,
2032
- defaultValue = _ref2.defaultValue;
2072
+ defaultValue = _ref2.defaultValue,
2073
+ variant = _ref2.variant;
2033
2074
  return /*#__PURE__*/React__default.createElement(Input, {
2034
2075
  key: name,
2035
2076
  control: form.control,
@@ -2045,7 +2086,8 @@ function FormSection(_ref) {
2045
2086
  defaultValue: defaultValue,
2046
2087
  setValue: form.setValue,
2047
2088
  setError: form.setError,
2048
- clearErrors: form.clearErrors
2089
+ clearErrors: form.clearErrors,
2090
+ variant: variant ? variant : ''
2049
2091
  });
2050
2092
  }));
2051
2093
  }
@@ -2919,11 +2961,11 @@ var Task = function Task(_ref) {
2919
2961
  });
2920
2962
  };
2921
2963
 
2922
- var _excluded$2 = ["boxSize", "color"];
2964
+ var _excluded$3 = ["boxSize", "color"];
2923
2965
  var GearIcon = function GearIcon(_ref) {
2924
2966
  var boxSize = _ref.boxSize,
2925
2967
  color = _ref.color,
2926
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
2968
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
2927
2969
  return /*#__PURE__*/React__default.createElement(Box, Object.assign({}, props), /*#__PURE__*/React__default.createElement("svg", Object.assign({
2928
2970
  xmlns: "http://www.w3.org/2000/svg",
2929
2971
  width: boxSize != null ? boxSize : 16,
@@ -2941,6 +2983,125 @@ var GearIcon = function GearIcon(_ref) {
2941
2983
  })));
2942
2984
  };
2943
2985
 
2986
+ var _excluded$4 = ["label", "ariaLabel", "className", "placeholder", "name", "helperText", "options", "tooltipText", "isInvalid", "errorText", "isRequired", "defaultValue", "fullOptions", "control", "disabled", "onChange", "setValue", "setError", "clearErrors"];
2987
+ /**
2988
+ * A functional React component utilized to render the `SelectNative` component.
2989
+ */
2990
+ var SelectNative = function SelectNative(_ref) {
2991
+ var _options$;
2992
+ var name = _ref.name,
2993
+ helperText = _ref.helperText,
2994
+ options = _ref.options,
2995
+ isInvalid = _ref.isInvalid,
2996
+ errorText = _ref.errorText,
2997
+ isRequired = _ref.isRequired,
2998
+ defaultValue = _ref.defaultValue,
2999
+ control = _ref.control,
3000
+ disabled = _ref.disabled,
3001
+ onChange = _ref.onChange,
3002
+ setValue = _ref.setValue,
3003
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
3004
+ // const [selectedOption, setSelectedOption] = useState(
3005
+ // options.find(option => option.value === value)?.label ?? ''
3006
+ // );
3007
+ var _useState = useState(options ? (_options$ = options[0]) != null ? _options$ : '' : ''),
3008
+ selectedOption = _useState[0],
3009
+ setSelectedOption = _useState[1];
3010
+ //const [selectedOption, setSelectedOption] = useState(null);
3011
+ // useEffect(() => {
3012
+ // if (defaultValue) {
3013
+ // setSelectedOption(defaultValue);
3014
+ // }
3015
+ // setSelectedOption(
3016
+ // (fullOptions || options).find(option => option.value === value)?.label ??
3017
+ // ''
3018
+ // );
3019
+ // }, [fullOptions, value]);
3020
+ var handleOnSelectItem = function handleOnSelectItem(selectedValue) {
3021
+ console.log(selectedValue);
3022
+ var selectedOption = options == null ? void 0 : options.find(function (_ref2) {
3023
+ var val = _ref2.value;
3024
+ return selectedValue === val;
3025
+ });
3026
+ console.log(selectedValue);
3027
+ setValue(name, selectedValue);
3028
+ if (selectedOption) {
3029
+ if (onChange) {
3030
+ onChange(selectedOption.value);
3031
+ }
3032
+ setSelectedOption(selectedOption);
3033
+ setValue(name, selectedOption.value);
3034
+ }
3035
+ };
3036
+ console.log(selectedOption);
3037
+ useEffect(function () {
3038
+ if (defaultValue) {
3039
+ handleOnSelectItem(defaultValue);
3040
+ }
3041
+ // eslint-disable-next-line react-hooks/exhaustive-deps
3042
+ }, [defaultValue]);
3043
+ return /*#__PURE__*/React__default.createElement(Controller, {
3044
+ control: control,
3045
+ name: name,
3046
+ // defaultValue={defaultValue as PathValue<T, Path<T>>}
3047
+ rules: {
3048
+ required: isRequired
3049
+ },
3050
+ /** @ts-ignore: issues with implicit */
3051
+ render: function render(_ref3) {
3052
+ var _ref3$field = _ref3.field,
3053
+ ref = _ref3$field.ref;
3054
+ return /*#__PURE__*/React__default.createElement(FormControl, {
3055
+ id: name,
3056
+ isInvalid: isInvalid,
3057
+ position: "relative",
3058
+ py: 0
3059
+ }, /*#__PURE__*/React__default.createElement(Box //ref={dropdownRef}
3060
+ , {
3061
+ position: "relative"
3062
+ }, /*#__PURE__*/React__default.createElement(Flex, {
3063
+ flexDirection: "column",
3064
+ //ref={dropdownRef}
3065
+ //scrollMargin="15px"
3066
+ border: "0",
3067
+ mt: "3px",
3068
+ //maxH="240px"
3069
+ overflowY: "auto",
3070
+ width: "fit-content",
3071
+ minWidth: "100%",
3072
+ zIndex: 100,
3073
+ tabIndex: -2000,
3074
+ borderTop: "0.5px solid #9999991A"
3075
+ }, /*#__PURE__*/React__default.createElement(Select$1, Object.assign({}, props, {
3076
+ required: isRequired,
3077
+ ref: ref,
3078
+ //value={selectedOption?.value ?? value}
3079
+ // textShadow={`0 0 0 ${colors.label.primary.light}`}
3080
+ disabled: disabled != null ? disabled : false,
3081
+ onChange: function onChange(e) {
3082
+ return handleOnSelectItem(e.target.value);
3083
+ },
3084
+ // onKeyDown={handleOnKeyDown}
3085
+ style: {
3086
+ cursor: 'pointer',
3087
+ color: 'var(--chakra-colors-blue-500)',
3088
+ height: '48px',
3089
+ fontSize: '17px',
3090
+ lineHeight: '20px',
3091
+ fontWeight: 400,
3092
+ padding: '12px 16px 12px 0px',
3093
+ borderRadius: 0
3094
+ }
3095
+ }), options && options.map(function (i) {
3096
+ return /*#__PURE__*/React__default.createElement("option", {
3097
+ value: i.value,
3098
+ key: i.sortValue
3099
+ }, i.label);
3100
+ })))), isInvalid ? /*#__PURE__*/React__default.createElement(FormErrorMessage, null, errorText) : helperText && /*#__PURE__*/React__default.createElement(FormHelperText, null, helperText));
3101
+ }
3102
+ });
3103
+ };
3104
+
2944
3105
  /**
2945
3106
  * A functional React component utilized to render the `BorderedBox` component
2946
3107
  */
@@ -3617,10 +3778,72 @@ var variantTertiary = function variantTertiary() {
3617
3778
  }
3618
3779
  });
3619
3780
  };
3781
+ var variantPrimaryFlat = function variantPrimaryFlat() {
3782
+ return _extends$6({}, baseStyle$2, {
3783
+ bg: colors.fill.action,
3784
+ bgGradient: null,
3785
+ minWidth: '172.5px',
3786
+ padding: '10px 16px',
3787
+ borderRadius: '8px',
3788
+ border: '0.5px',
3789
+ gap: '8px',
3790
+ height: '44px',
3791
+ margin: '8px',
3792
+ fontSize: '17px',
3793
+ fontWeight: '500',
3794
+ lineHeight: '24px',
3795
+ letterSpacing: '0.02em',
3796
+ textAlign: 'center',
3797
+ boxShadow: '0px 0.5px 1px 0.5px #0000001A'
3798
+ });
3799
+ };
3800
+ var variantSecondaryFlat = function variantSecondaryFlat() {
3801
+ return _extends$6({}, variantPrimaryFlat(), {
3802
+ fontWeight: '400',
3803
+ color: colors.black,
3804
+ bg: colors.label.primary.dark,
3805
+ _hover: {
3806
+ bg: colors.label.primary.dark
3807
+ },
3808
+ _active: {
3809
+ color: colors.black,
3810
+ bg: colors.label.primary.dark,
3811
+ bgGradient: colors.fill.light.quaternary
3812
+ },
3813
+ _focus: {
3814
+ bg: colors.label.primary.dark
3815
+ }
3816
+ });
3817
+ };
3818
+ var variantTertiaryFlat = function variantTertiaryFlat() {
3819
+ return _extends$6({}, variantPrimaryFlat(), {
3820
+ fontWeight: '400',
3821
+ color: colors.label.primary.dark,
3822
+ bg: colors.blur.quaternary.dark,
3823
+ _hover: {
3824
+ bg: colors.blur.quaternary.dark
3825
+ },
3826
+ _active: {
3827
+ color: colors.label.primary.dark,
3828
+ bg: colors.blur.tertiary.dark
3829
+ },
3830
+ _focus: {
3831
+ color: colors.label.primary.dark,
3832
+ bg: colors.blur.quaternary.dark
3833
+ },
3834
+ _disabled: {
3835
+ backgroundColor: colors.blur.quaternary.dark,
3836
+ color: colors.blur.tertiary.dark
3837
+ }
3838
+ });
3839
+ };
3620
3840
  var variants$2 = {
3621
3841
  primary: /*#__PURE__*/variantPrimary(),
3622
3842
  secondary: /*#__PURE__*/variantSecondary(),
3623
- tertiary: /*#__PURE__*/variantTertiary()
3843
+ tertiary: /*#__PURE__*/variantTertiary(),
3844
+ 'flat-primary': /*#__PURE__*/variantPrimaryFlat(),
3845
+ 'flat-secondary': /*#__PURE__*/variantSecondaryFlat(),
3846
+ 'flat-tertiary': /*#__PURE__*/variantTertiaryFlat()
3624
3847
  };
3625
3848
  var defaultProps$2 = {
3626
3849
  variant: 'primary'
@@ -3631,7 +3854,26 @@ var Button$1 = {
3631
3854
  defaultProps: defaultProps$2
3632
3855
  };
3633
3856
 
3634
- var variants$3 = Badge.variants,
3857
+ var _createMultiStyleConf = /*#__PURE__*/createMultiStyleConfigHelpers(checkboxAnatomy.keys),
3858
+ definePartsStyle = _createMultiStyleConf.definePartsStyle,
3859
+ defineMultiStyleConfig = _createMultiStyleConf.defineMultiStyleConfig;
3860
+ var roundedCheckbox = /*#__PURE__*/definePartsStyle({
3861
+ control: {
3862
+ borderRadius: 50,
3863
+ padding: 3
3864
+ },
3865
+ label: {
3866
+ fontSize: '17px'
3867
+ }
3868
+ });
3869
+ var variants$3 = {
3870
+ mobile: roundedCheckbox
3871
+ };
3872
+ var Checkbox = /*#__PURE__*/defineMultiStyleConfig({
3873
+ variants: variants$3
3874
+ });
3875
+
3876
+ var variants$4 = Badge.variants,
3635
3877
  defaultProps$3 = Badge.defaultProps;
3636
3878
  var baseStyle$3 = {
3637
3879
  fontFamily: 'mono',
@@ -3641,7 +3883,7 @@ var baseStyle$3 = {
3641
3883
  };
3642
3884
  var Code = {
3643
3885
  baseStyle: baseStyle$3,
3644
- variants: variants$3,
3886
+ variants: variants$4,
3645
3887
  defaultProps: defaultProps$3
3646
3888
  };
3647
3889
 
@@ -3741,8 +3983,21 @@ var baseStyle$7 = {
3741
3983
  }
3742
3984
  }
3743
3985
  };
3744
- var variants$4 = {
3745
- "default": baseStyle$7
3986
+ var mobileInputs = /*#__PURE__*/_extends$6({}, baseStyle$7, {
3987
+ field: {
3988
+ fontSize: '17px',
3989
+ border: 'none',
3990
+ py: '14px',
3991
+ px: '16px',
3992
+ cursor: 'pointer',
3993
+ lineHeight: '21px',
3994
+ fontWeight: 400,
3995
+ borderRadius: 0
3996
+ }
3997
+ });
3998
+ var variants$5 = {
3999
+ "default": baseStyle$7,
4000
+ mobile: mobileInputs
3746
4001
  };
3747
4002
  var defaultProps$4 = {
3748
4003
  variant: 'default'
@@ -3750,7 +4005,7 @@ var defaultProps$4 = {
3750
4005
  var Input$1 = {
3751
4006
  parts: parts$3,
3752
4007
  baseStyle: baseStyle$7,
3753
- variants: variants$4,
4008
+ variants: variants$5,
3754
4009
  defaultProps: defaultProps$4
3755
4010
  };
3756
4011
 
@@ -3847,7 +4102,7 @@ function variantNavlink(props) {
3847
4102
  }
3848
4103
  };
3849
4104
  }
3850
- var variants$5 = {
4105
+ var variants$6 = {
3851
4106
  sidebar: variantSidebar,
3852
4107
  sidebarExact: variantSidebarExact,
3853
4108
  subNavigation: variantSubNavigation,
@@ -3855,7 +4110,7 @@ var variants$5 = {
3855
4110
  };
3856
4111
  var Link$1 = {
3857
4112
  baseStyle: baseStyle$8,
3858
- variants: variants$5
4113
+ variants: variants$6
3859
4114
  };
3860
4115
 
3861
4116
  var parts$4 = ['overlay', 'dialogContainer', 'dialog', 'header', 'closeButton', 'body', 'footer'];
@@ -3895,7 +4150,7 @@ var Modal$1 = {
3895
4150
  };
3896
4151
 
3897
4152
  var defaultProps$5 = Input$1.defaultProps,
3898
- variants$6 = Input$1.variants;
4153
+ variants$7 = Input$1.variants;
3899
4154
  var parts$5 = ['field', 'icon'];
3900
4155
  function baseStyleField() {
3901
4156
  return _extends$6({}, Input$1.baseStyle.field, {
@@ -3924,7 +4179,7 @@ var baseStyle$a = function baseStyle() {
3924
4179
  var Select = {
3925
4180
  parts: parts$5,
3926
4181
  baseStyle: baseStyle$a,
3927
- variants: variants$6,
4182
+ variants: variants$7,
3928
4183
  defaultProps: defaultProps$5
3929
4184
  };
3930
4185
 
@@ -4263,7 +4518,7 @@ var variantSimple = {
4263
4518
  }
4264
4519
  }
4265
4520
  };
4266
- var variants$7 = {
4521
+ var variants$8 = {
4267
4522
  line: variantLine,
4268
4523
  enclosed: variantEnclosed,
4269
4524
  'enclosed-colored': variantEnclosedColored,
@@ -4281,7 +4536,7 @@ var Tabs = {
4281
4536
  parts: parts$8,
4282
4537
  baseStyle: baseStyle$d,
4283
4538
  sizes: sizes$1,
4284
- variants: variants$7,
4539
+ variants: variants$8,
4285
4540
  defaultProps: defaultProps$7
4286
4541
  };
4287
4542
 
@@ -4293,11 +4548,29 @@ var baseStyle$e = /*#__PURE__*/_extends$6({}, Input$1.baseStyle.field, {
4293
4548
  height: '78px',
4294
4549
  lineHeight: 'short'
4295
4550
  });
4551
+ var mobileInputs$1 = /*#__PURE__*/defineStyle$1( /*#__PURE__*/_extends$6({}, baseStyle$e, Input$1.variants.mobile.field, {
4552
+ border: 'none',
4553
+ borderRadius: 0,
4554
+ paddingY: '14px',
4555
+ paddingX: '16px',
4556
+ padding: '14px 16px',
4557
+ cursor: 'pointer',
4558
+ lineHeight: '21px',
4559
+ fontWeight: 400,
4560
+ resize: 'none',
4561
+ overflowY: 'auto',
4562
+ fontSize: '17px'
4563
+ }));
4564
+ var variants$9 = {
4565
+ "default": baseStyle$e,
4566
+ mobile: mobileInputs$1
4567
+ };
4296
4568
  var defaultProps$8 = {
4297
4569
  variant: 'default'
4298
4570
  };
4299
4571
  var Textarea = {
4300
4572
  baseStyle: baseStyle$e,
4573
+ variants: variants$9,
4301
4574
  defaultProps: defaultProps$8
4302
4575
  };
4303
4576
 
@@ -4374,7 +4647,7 @@ function variantDescriptionLarge() {
4374
4647
  letterSpacing: '0.02em'
4375
4648
  };
4376
4649
  }
4377
- var variants$8 = {
4650
+ var variants$a = {
4378
4651
  'title-small': variantTitleSmall,
4379
4652
  'title-medium': variantTitleMedium,
4380
4653
  'title-large': variantTitleLarge,
@@ -4386,9 +4659,9 @@ var variants$8 = {
4386
4659
  'description-large': variantDescriptionLarge
4387
4660
  };
4388
4661
  var Text$1 = {
4389
- variants: variants$8,
4662
+ variants: variants$a,
4390
4663
  defaultProps: /*#__PURE__*/_extends$6({}, defaultProps$9, {
4391
- variant: variants$8['description-large']
4664
+ variant: variants$a['description-large']
4392
4665
  })
4393
4666
  };
4394
4667
 
@@ -4421,6 +4694,7 @@ var customXQChakraTheme = /*#__PURE__*/extendTheme( /*#__PURE__*/_extends$6({
4421
4694
  Alert: Alert,
4422
4695
  Badge: Badge,
4423
4696
  Button: Button$1,
4697
+ Checkbox: Checkbox,
4424
4698
  Code: Code,
4425
4699
  Form: Form$1,
4426
4700
  FormError: FormError,
@@ -4776,5 +5050,5 @@ function formatErrorResponse(error) {
4776
5050
  };
4777
5051
  }
4778
5052
 
4779
- export { ActionRow, Banner, Breadcrumbs, Button, Card, Checkmark, ChevronDown, ChevronRight, Clock, Close, Dropdown$1 as Dropdown, Error$1 as Error, FileFill, FileOutline, FolderAddFill, FolderAddOutline, FolderFill, FolderOutline, Form, FormSection, GearIcon, Google, GoogleButton, GoogleDrive, Group, Home, Image, Input, Layout, Link, LoadingIndicator, Menu, Microsoft, MicrosoftButton, MicrosoftOneDrive, Modal, NavigationMenu, Neutral, Page, Positive, Question, Search, Services, Settings, SpinnerButton, Table, TableFill, TableOutline, TabsWrapper, Task, Text, Toolbar, Trash, Vault, Video, Warning, Workspace, XQThemeProvider, colors, formatErrorResponse, useToast };
5053
+ export { ActionRow, Banner, Breadcrumbs, Button, Card, Checkmark, ChevronDown, ChevronRight, Clock, Close, Dropdown$1 as Dropdown, Error$1 as Error, FileFill, FileOutline, FolderAddFill, FolderAddOutline, FolderFill, FolderOutline, Form, FormSection, GearIcon, Google, GoogleButton, GoogleDrive, Group, Home, Image, Input, Layout, Link, LoadingIndicator, Menu, Microsoft, MicrosoftButton, MicrosoftOneDrive, Modal, NavigationMenu, Neutral, Page, Positive, Question, Search, SelectNative, Services, Settings, SpinnerButton, Table, TableFill, TableOutline, TabsWrapper, Task, Text, Toolbar, Trash, Vault, Video, Warning, Workspace, XQThemeProvider, colors, formatErrorResponse, useToast };
4780
5054
  //# sourceMappingURL=ui-core.esm.js.map