@xqmsg/ui-core 0.22.4 → 0.23.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +2 -0
  4. package/dist/components/input/StackedPilledInput/index.d.ts +3 -0
  5. package/dist/components/input/StackedTextarea/StackedTextarea.d.ts +4 -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 +113 -0
  11. package/dist/theme/components/checkbox.d.ts +29 -0
  12. package/dist/theme/components/input.d.ts +23 -0
  13. package/dist/theme/components/select.d.ts +23 -0
  14. package/dist/theme/components/textarea.d.ts +78 -0
  15. package/dist/ui-core.cjs.development.js +336 -54
  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 +338 -57
  20. package/dist/ui-core.esm.js.map +1 -1
  21. package/package.json +1 -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 +67 -0
  26. package/src/components/input/StackedCheckbox/StackedCheckbox.tsx +12 -4
  27. package/src/components/input/StackedInput/StackedInput.tsx +11 -1
  28. package/src/components/input/StackedPilledInput/index.tsx +310 -266
  29. package/src/components/input/StackedTextarea/StackedTextarea.tsx +30 -4
  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 +25 -9
  33. package/src/components/select/index.tsx +140 -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 +28 -0
  38. package/src/theme/components/input.ts +23 -1
  39. package/src/theme/components/textarea.ts +21 -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", "label"];
805
805
  /**
806
806
  * A functional React component utilized to render the `StackedInput` component.
807
807
  */
@@ -813,13 +813,19 @@ 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,
817
+ label = _ref2.label,
816
818
  props = _objectWithoutPropertiesLoose(_ref2, _excluded);
817
- return /*#__PURE__*/React__default.createElement(InputGroup, null, leftElement && leftElement, /*#__PURE__*/React__default.createElement(Input$2, Object.assign({
819
+ var isMobile = variant === 'mobile';
820
+ var placeholder = isMobile && label ? label : undefined;
821
+ return /*#__PURE__*/React__default.createElement(InputGroup, null, leftElement && leftElement, label, /*#__PURE__*/React__default.createElement(Input$2, Object.assign({}, props, {
822
+ placeholder: placeholder,
818
823
  type: type,
819
- isRequired: isRequired
820
- }, props, {
824
+ isRequired: isRequired,
821
825
  ref: _ref,
822
826
  defaultValue: defaultValue,
827
+ fontSize: isMobile ? '17px' : '13px',
828
+ variant: variant,
823
829
  onKeyDown: function onKeyDown(e) {
824
830
  if (e.key === 'Enter' && !allowDefault) {
825
831
  e.stopPropagation();
@@ -865,7 +871,8 @@ var Dropdown = function Dropdown(_ref) {
865
871
  return options.map(function (option, idx) {
866
872
  return /*#__PURE__*/React__default.createElement(Box, {
867
873
  key: idx,
868
- width: "100%"
874
+ width: "100%",
875
+ role: "combobox"
869
876
  }, option.value === 'section_header' && options[idx + 1] && options[idx + 1].value !== 'section_header' && /*#__PURE__*/React__default.createElement(Box, {
870
877
  color: colors.label.secondary.light,
871
878
  fontSize: "13px",
@@ -1161,17 +1168,38 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
1161
1168
  }));
1162
1169
  });
1163
1170
 
1171
+ var _excluded$2 = ["isRequired", "allowDefault", "variant", "label"];
1164
1172
  /**
1165
1173
  * A functional React component utilized to render the `StackedTextarea` component.
1166
1174
  */
1167
1175
  var StackedTextarea = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
1168
- var props = _extends$6({}, (_objectDestructuringEmpty(_ref2), _ref2));
1176
+ var allowDefault = _ref2.allowDefault,
1177
+ variant = _ref2.variant,
1178
+ label = _ref2.label,
1179
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
1180
+ var isMobile = variant === 'mobile';
1181
+ if (isMobile) {
1182
+ return /*#__PURE__*/React__default.createElement(Flex, null, /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
1183
+ ref: _ref
1184
+ }, props, {
1185
+ variant: variant,
1186
+ fontSize: "17px",
1187
+ placeholder: label != null ? label : '',
1188
+ onKeyDown: function onKeyDown(e) {
1189
+ if (e.key === 'Enter' && !allowDefault) {
1190
+ e.stopPropagation();
1191
+ e.preventDefault();
1192
+ }
1193
+ }
1194
+ })));
1195
+ }
1169
1196
  return /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
1170
1197
  ref: _ref
1171
1198
  }, props, {
1199
+ variant: variant,
1172
1200
  fontSize: "13px",
1173
1201
  onKeyDown: function onKeyDown(e) {
1174
- if (e.key === 'Enter') {
1202
+ if (e.key === 'Enter' && !allowDefault) {
1175
1203
  e.stopPropagation();
1176
1204
  e.preventDefault();
1177
1205
  }
@@ -1215,15 +1243,17 @@ var Close = function Close(_ref) {
1215
1243
  // For v1 we are truncating the label at 15 characters to avoid overflow
1216
1244
  var Token = function Token(_ref) {
1217
1245
  var label = _ref.label,
1218
- onDelete = _ref.onDelete;
1246
+ onDelete = _ref.onDelete,
1247
+ _ref$isMobile = _ref.isMobile,
1248
+ isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile;
1219
1249
  return /*#__PURE__*/React__default.createElement(Flex, {
1220
1250
  key: label,
1221
- borderRadius: "full",
1251
+ borderRadius: 'full',
1222
1252
  backgroundColor: "#7676801F",
1223
1253
  alignItems: "center",
1224
1254
  width: "fit-content",
1225
1255
  w: "auto",
1226
- h: "16px",
1256
+ h: isMobile ? '18px' : '16px',
1227
1257
  pl: "6px",
1228
1258
  pr: "2px",
1229
1259
  py: "2px",
@@ -1231,13 +1261,13 @@ var Token = function Token(_ref) {
1231
1261
  }, /*#__PURE__*/React__default.createElement(Text$2, {
1232
1262
  whiteSpace: "nowrap",
1233
1263
  color: colors.label.primary.light,
1234
- fontSize: "13px",
1264
+ fontSize: isMobile ? '17px' : '13px',
1235
1265
  pr: "4px"
1236
1266
  }, truncate(label.trim(), {
1237
1267
  length: 15,
1238
1268
  omission: '...'
1239
1269
  })), /*#__PURE__*/React__default.createElement(Close, {
1240
- boxSize: "11px",
1270
+ boxSize: isMobile ? '17px' : '11px',
1241
1271
  onClick: onDelete
1242
1272
  }));
1243
1273
  };
@@ -1534,7 +1564,11 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1534
1564
  setValue = _ref2.setValue,
1535
1565
  control = _ref2.control,
1536
1566
  placeholder = _ref2.placeholder,
1537
- disabled = _ref2.disabled;
1567
+ disabled = _ref2.disabled,
1568
+ _ref2$separators = _ref2.separators,
1569
+ separators = _ref2$separators === void 0 ? ['Enter', ' ', ',', ';', 'Tab'] : _ref2$separators,
1570
+ variant = _ref2.variant,
1571
+ label = _ref2.label;
1538
1572
  var watchedValue = useWatch({
1539
1573
  control: control,
1540
1574
  name: name
@@ -1571,12 +1605,17 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1571
1605
  }
1572
1606
  }
1573
1607
  }, [latestTokenElement, watchedValue]);
1608
+ var handleOnChange = function handleOnChange(e) {
1609
+ if (tokenIndex === null) {
1610
+ setLocalValue(e.target.value.trim().replace(',', '').replace(';', '').length ? e.target.value : '');
1611
+ }
1612
+ };
1574
1613
  var onHandleKeyDown = function onHandleKeyDown(e) {
1575
1614
  if (e.key === 'Enter') {
1576
1615
  e.stopPropagation();
1577
1616
  e.preventDefault();
1578
1617
  }
1579
- if ((e.key === 'Enter' || e.key === ',' || e.key === ';' || e.key === 'Tab') && localValue.trim().length) {
1618
+ if (separators.includes(e.key)) {
1580
1619
  if (e.key === 'Enter' && !localValue.trim().length && tokenIndex !== null) {
1581
1620
  setLocalValue(lastestFormValueToArray[tokenIndex]);
1582
1621
  var _filteredUniqueValues = Array.from(new Set(lastestFormValueToArray.filter(function (value) {
@@ -1666,16 +1705,29 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1666
1705
  onBlur();
1667
1706
  }
1668
1707
  });
1708
+ var isMobile = variant === 'mobile';
1669
1709
  return /*#__PURE__*/React__default.createElement(Box, {
1670
1710
  position: "relative"
1671
1711
  }, /*#__PURE__*/React__default.createElement(Flex, {
1672
- fontSize: "13px",
1712
+ fontSize: isMobile ? '17px' : '13px',
1673
1713
  border: isFocussed ? '2px solid' : '.5px solid',
1674
1714
  borderColor: isFocussed ? colors.border.focus : colors.border["default"],
1675
1715
  pl: "8px",
1676
- borderRadius: "4px",
1716
+ borderRadius: isMobile ? '0' : '4px',
1677
1717
  alignItems: "center",
1678
1718
  justifyContent: "space-between",
1719
+ style: isMobile ? {
1720
+ cursor: 'pointer',
1721
+ height: '48px',
1722
+ fontSize: '17px',
1723
+ lineHeight: '20px',
1724
+ fontWeight: 400,
1725
+ padding: '12px 16px 12px 0px',
1726
+ borderRadius: 0,
1727
+ border: '0.5px solid rgba(153, 153, 153, 0.1)',
1728
+ borderLeft: 'none',
1729
+ borderRight: 'none'
1730
+ } : undefined,
1679
1731
  onClick: function onClick() {
1680
1732
  if (isFocussed && tokenIndex !== null) {
1681
1733
  setTokenIndex(null);
@@ -1688,7 +1740,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1688
1740
  bg: disabled ? colors.fill.light.quaternary : '#ffffff',
1689
1741
  cursor: disabled ? 'not-allowed' : 'pointer',
1690
1742
  ref: inputWrapperRef,
1691
- h: "26px"
1743
+ h: isMobile ? '48px' : '26px'
1692
1744
  }, /*#__PURE__*/React__default.createElement(Flex, {
1693
1745
  h: "100%",
1694
1746
  alignItems: "center",
@@ -1724,11 +1776,12 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1724
1776
  e.stopPropagation();
1725
1777
  e.preventDefault();
1726
1778
  onRemoveTag(index);
1727
- }
1779
+ },
1780
+ isMobile: isMobile
1728
1781
  }));
1729
1782
  }) : null, !lastestFormValueToArray.length && !isFocussed ? /*#__PURE__*/React__default.createElement(Text$2, {
1730
1783
  color: colors.label.secondary.light,
1731
- fontSize: "13px"
1784
+ fontSize: isMobile ? '17px' : '13px'
1732
1785
  }, placeholder) : null), !disabled && /*#__PURE__*/React__default.createElement(Flex, {
1733
1786
  flex: 1,
1734
1787
  minWidth: isFocussed && !tokenIndex ? '20%' : 0
@@ -1745,9 +1798,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1745
1798
  boxShadow: 'none !important'
1746
1799
  },
1747
1800
  value: localValue,
1748
- onChange: function onChange(e) {
1749
- return tokenIndex === null && setLocalValue(e.target.value.trim().replace(',', '').replace(';', '').length ? e.target.value : '');
1750
- },
1801
+ onChange: handleOnChange,
1751
1802
  ref: inputRef,
1752
1803
  onFocus: function onFocus() {
1753
1804
  return setIsFocussed(true);
@@ -1755,7 +1806,12 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1755
1806
  onBlur: function onBlur() {
1756
1807
  setIsFocussed(false);
1757
1808
  return setTokenIndex(null);
1758
- }
1809
+ },
1810
+ placeholder: isMobile && label && lastestFormValueToArray.length === 0 ? label : '',
1811
+ variant: variant,
1812
+ style: isMobile ? {
1813
+ border: 'none'
1814
+ } : undefined
1759
1815
  }))));
1760
1816
  });
1761
1817
 
@@ -1830,6 +1886,8 @@ function Input(_ref) {
1830
1886
  rightElement = _ref.rightElement,
1831
1887
  leftElement = _ref.leftElement,
1832
1888
  allowDefault = _ref.allowDefault,
1889
+ _ref$variant = _ref.variant,
1890
+ variant = _ref$variant === void 0 ? 'default' : _ref$variant,
1833
1891
  onChange = _ref.onChange,
1834
1892
  setValue = _ref.setValue,
1835
1893
  setError = _ref.setError,
@@ -1854,7 +1912,9 @@ function Input(_ref) {
1854
1912
  disabled: disabled,
1855
1913
  defaultValue: defaultValue,
1856
1914
  value: value,
1857
- allowDefault: allowDefault
1915
+ allowDefault: allowDefault,
1916
+ variant: variant,
1917
+ label: label
1858
1918
  });
1859
1919
  case 'radio':
1860
1920
  return /*#__PURE__*/React__default.createElement(StackedRadioGroup, {
@@ -1902,7 +1962,9 @@ function Input(_ref) {
1902
1962
  onBlur: onBlur,
1903
1963
  ref: ref,
1904
1964
  disabled: disabled,
1905
- value: value
1965
+ value: value,
1966
+ variant: variant,
1967
+ label: label
1906
1968
  });
1907
1969
  case 'checkbox':
1908
1970
  return /*#__PURE__*/React__default.createElement(StackedCheckbox, {
@@ -1916,7 +1978,8 @@ function Input(_ref) {
1916
1978
  value: value,
1917
1979
  defaultValue: defaultValue,
1918
1980
  label: label,
1919
- disabled: disabled
1981
+ disabled: disabled,
1982
+ variant: variant
1920
1983
  });
1921
1984
  case 'multi-select':
1922
1985
  return /*#__PURE__*/React__default.createElement(StackedMultiSelect, {
@@ -1953,7 +2016,9 @@ function Input(_ref) {
1953
2016
  setError: setError,
1954
2017
  clearErrors: clearErrors,
1955
2018
  control: control,
1956
- maxLength: maxLength
2019
+ maxLength: maxLength,
2020
+ variant: variant,
2021
+ label: label
1957
2022
  });
1958
2023
  case 'switch':
1959
2024
  return /*#__PURE__*/React__default.createElement(StackedSwitch, {
@@ -1971,6 +2036,7 @@ function Input(_ref) {
1971
2036
  return null;
1972
2037
  }
1973
2038
  };
2039
+ var nonLabeledInputs = ['checkbox'];
1974
2040
  return /*#__PURE__*/React__default.createElement(Controller, {
1975
2041
  control: control,
1976
2042
  name: name,
@@ -1989,8 +2055,8 @@ function Input(_ref) {
1989
2055
  id: name,
1990
2056
  isInvalid: isInvalid,
1991
2057
  position: "relative",
1992
- py: inputType !== 'checkbox' && label || helperText || isInvalid ? 5 : 0
1993
- }, label && inputType !== 'checkbox' && /*#__PURE__*/React__default.createElement(Label$1, {
2058
+ py: !nonLabeledInputs.includes(inputType) && variant !== 'mobile' && label || helperText || isInvalid ? 5 : 0
2059
+ }, label && !nonLabeledInputs.includes(inputType) && variant !== 'mobile' && /*#__PURE__*/React__default.createElement(Label$1, {
1994
2060
  tooltipText: tooltipText,
1995
2061
  label: label,
1996
2062
  isRequired: isRequired
@@ -2029,7 +2095,8 @@ function FormSection(_ref) {
2029
2095
  maxLength = _ref2.maxLength,
2030
2096
  ariaLabel = _ref2.ariaLabel,
2031
2097
  disabled = _ref2.disabled,
2032
- defaultValue = _ref2.defaultValue;
2098
+ defaultValue = _ref2.defaultValue,
2099
+ variant = _ref2.variant;
2033
2100
  return /*#__PURE__*/React__default.createElement(Input, {
2034
2101
  key: name,
2035
2102
  control: form.control,
@@ -2045,7 +2112,8 @@ function FormSection(_ref) {
2045
2112
  defaultValue: defaultValue,
2046
2113
  setValue: form.setValue,
2047
2114
  setError: form.setError,
2048
- clearErrors: form.clearErrors
2115
+ clearErrors: form.clearErrors,
2116
+ variant: variant ? variant : ''
2049
2117
  });
2050
2118
  }));
2051
2119
  }
@@ -2919,11 +2987,11 @@ var Task = function Task(_ref) {
2919
2987
  });
2920
2988
  };
2921
2989
 
2922
- var _excluded$2 = ["boxSize", "color"];
2990
+ var _excluded$3 = ["boxSize", "color"];
2923
2991
  var GearIcon = function GearIcon(_ref) {
2924
2992
  var boxSize = _ref.boxSize,
2925
2993
  color = _ref.color,
2926
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
2994
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
2927
2995
  return /*#__PURE__*/React__default.createElement(Box, Object.assign({}, props), /*#__PURE__*/React__default.createElement("svg", Object.assign({
2928
2996
  xmlns: "http://www.w3.org/2000/svg",
2929
2997
  width: boxSize != null ? boxSize : 16,
@@ -2941,6 +3009,94 @@ var GearIcon = function GearIcon(_ref) {
2941
3009
  })));
2942
3010
  };
2943
3011
 
3012
+ var _excluded$4 = ["label", "ariaLabel", "className", "placeholder", "name", "helperText", "options", "tooltipText", "isInvalid", "errorText", "isRequired", "defaultValue", "fullOptions", "control", "disabled", "onChange", "setValue", "setError", "clearErrors"];
3013
+ /**
3014
+ * A functional React component utilized to render the `SelectNative` component.
3015
+ */
3016
+ var SelectNative = function SelectNative(_ref) {
3017
+ var name = _ref.name,
3018
+ helperText = _ref.helperText,
3019
+ options = _ref.options,
3020
+ isInvalid = _ref.isInvalid,
3021
+ errorText = _ref.errorText,
3022
+ isRequired = _ref.isRequired,
3023
+ defaultValue = _ref.defaultValue,
3024
+ control = _ref.control,
3025
+ disabled = _ref.disabled,
3026
+ onChange = _ref.onChange,
3027
+ setValue = _ref.setValue,
3028
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
3029
+ // const [selectedOption, setSelectedOption] = useState(
3030
+ // options ? options[0] ?? '' : ''
3031
+ // );
3032
+ var style = {
3033
+ cursor: 'pointer',
3034
+ color: 'var(--chakra-colors-blue-500)',
3035
+ height: '48px',
3036
+ fontSize: '17px',
3037
+ lineHeight: '20px',
3038
+ fontWeight: 400,
3039
+ padding: '12px 16px 12px 0px',
3040
+ borderRadius: 0,
3041
+ border: '0.5px solid rgba(153, 153, 153, 0.1)',
3042
+ borderLeft: 'none',
3043
+ borderRight: 'none'
3044
+ };
3045
+ var handleOnSelectItem = function handleOnSelectItem(selectedValue) {
3046
+ var selectedOption = options == null ? void 0 : options.find(function (_ref2) {
3047
+ var val = _ref2.value;
3048
+ return selectedValue === val;
3049
+ });
3050
+ if (selectedOption) {
3051
+ if (onChange) {
3052
+ onChange(selectedOption.value);
3053
+ }
3054
+ setValue(name, selectedOption.value);
3055
+ } else {
3056
+ setValue(name, selectedValue);
3057
+ }
3058
+ };
3059
+ useEffect(function () {
3060
+ if (defaultValue) {
3061
+ handleOnSelectItem(defaultValue);
3062
+ }
3063
+ // eslint-disable-next-line react-hooks/exhaustive-deps
3064
+ }, [defaultValue]);
3065
+ return /*#__PURE__*/React__default.createElement(Controller, {
3066
+ control: control,
3067
+ name: name,
3068
+ rules: {
3069
+ required: isRequired
3070
+ },
3071
+ /** @ts-ignore: issues with implicit */
3072
+ render: function render(_ref3) {
3073
+ var _ref3$field = _ref3.field,
3074
+ ref = _ref3$field.ref,
3075
+ value = _ref3$field.value;
3076
+ return /*#__PURE__*/React__default.createElement(FormControl, {
3077
+ id: name,
3078
+ isInvalid: isInvalid,
3079
+ position: "relative",
3080
+ py: 0
3081
+ }, /*#__PURE__*/React__default.createElement(Select$1, Object.assign({}, props, {
3082
+ required: isRequired,
3083
+ ref: ref,
3084
+ value: value,
3085
+ disabled: disabled != null ? disabled : false,
3086
+ onChange: function onChange(e) {
3087
+ return handleOnSelectItem(e.target.value);
3088
+ },
3089
+ style: style
3090
+ }), options && options.map(function (i) {
3091
+ return /*#__PURE__*/React__default.createElement("option", {
3092
+ value: i.value,
3093
+ key: i.sortValue
3094
+ }, i.label);
3095
+ })), isInvalid ? /*#__PURE__*/React__default.createElement(FormErrorMessage, null, errorText) : helperText && /*#__PURE__*/React__default.createElement(FormHelperText, null, helperText));
3096
+ }
3097
+ });
3098
+ };
3099
+
2944
3100
  /**
2945
3101
  * A functional React component utilized to render the `BorderedBox` component
2946
3102
  */
@@ -3617,10 +3773,72 @@ var variantTertiary = function variantTertiary() {
3617
3773
  }
3618
3774
  });
3619
3775
  };
3776
+ var variantPrimaryFlat = function variantPrimaryFlat() {
3777
+ return _extends$6({}, baseStyle$2, {
3778
+ bg: colors.fill.action,
3779
+ bgGradient: null,
3780
+ minWidth: '172.5px',
3781
+ padding: '10px 16px',
3782
+ borderRadius: '8px',
3783
+ border: '0.5px',
3784
+ gap: '8px',
3785
+ height: '44px',
3786
+ // margin: '8px',
3787
+ fontSize: '17px',
3788
+ fontWeight: '500',
3789
+ lineHeight: '24px',
3790
+ letterSpacing: '0.02em',
3791
+ textAlign: 'center',
3792
+ boxShadow: '0px 0.5px 1px 0.5px #0000001A'
3793
+ });
3794
+ };
3795
+ var variantSecondaryFlat = function variantSecondaryFlat() {
3796
+ return _extends$6({}, variantPrimaryFlat(), {
3797
+ fontWeight: '400',
3798
+ color: colors.black,
3799
+ bg: colors.label.primary.dark,
3800
+ _hover: {
3801
+ bg: colors.label.primary.dark
3802
+ },
3803
+ _active: {
3804
+ color: colors.black,
3805
+ bg: colors.label.primary.dark,
3806
+ bgGradient: colors.fill.light.quaternary
3807
+ },
3808
+ _focus: {
3809
+ bg: colors.label.primary.dark
3810
+ }
3811
+ });
3812
+ };
3813
+ var variantTertiaryFlat = function variantTertiaryFlat() {
3814
+ return _extends$6({}, variantPrimaryFlat(), {
3815
+ fontWeight: '400',
3816
+ color: colors.label.primary.dark,
3817
+ bg: colors.blur.quaternary.dark,
3818
+ _hover: {
3819
+ bg: colors.blur.quaternary.dark
3820
+ },
3821
+ _active: {
3822
+ color: colors.label.primary.dark,
3823
+ bg: colors.blur.tertiary.dark
3824
+ },
3825
+ _focus: {
3826
+ color: colors.label.primary.dark,
3827
+ bg: colors.blur.quaternary.dark
3828
+ },
3829
+ _disabled: {
3830
+ backgroundColor: colors.blur.quaternary.dark,
3831
+ color: colors.blur.tertiary.dark
3832
+ }
3833
+ });
3834
+ };
3620
3835
  var variants$2 = {
3621
3836
  primary: /*#__PURE__*/variantPrimary(),
3622
3837
  secondary: /*#__PURE__*/variantSecondary(),
3623
- tertiary: /*#__PURE__*/variantTertiary()
3838
+ tertiary: /*#__PURE__*/variantTertiary(),
3839
+ 'flat-primary': /*#__PURE__*/variantPrimaryFlat(),
3840
+ 'flat-secondary': /*#__PURE__*/variantSecondaryFlat(),
3841
+ 'flat-tertiary': /*#__PURE__*/variantTertiaryFlat()
3624
3842
  };
3625
3843
  var defaultProps$2 = {
3626
3844
  variant: 'primary'
@@ -3631,7 +3849,29 @@ var Button$1 = {
3631
3849
  defaultProps: defaultProps$2
3632
3850
  };
3633
3851
 
3634
- var variants$3 = Badge.variants,
3852
+ var _createMultiStyleConf = /*#__PURE__*/createMultiStyleConfigHelpers(checkboxAnatomy.keys),
3853
+ definePartsStyle = _createMultiStyleConf.definePartsStyle,
3854
+ defineMultiStyleConfig = _createMultiStyleConf.defineMultiStyleConfig;
3855
+ var roundedCheckbox = /*#__PURE__*/definePartsStyle({
3856
+ control: {
3857
+ //borderRadius: 50,
3858
+ },
3859
+ label: {
3860
+ fontSize: '17px',
3861
+ fontWeight: 400,
3862
+ lineHeight: '20px',
3863
+ padding: '12px 16px 12px 0px'
3864
+ },
3865
+ height: '44px'
3866
+ });
3867
+ var variants$3 = {
3868
+ mobile: roundedCheckbox
3869
+ };
3870
+ var Checkbox = /*#__PURE__*/defineMultiStyleConfig({
3871
+ variants: variants$3
3872
+ });
3873
+
3874
+ var variants$4 = Badge.variants,
3635
3875
  defaultProps$3 = Badge.defaultProps;
3636
3876
  var baseStyle$3 = {
3637
3877
  fontFamily: 'mono',
@@ -3641,7 +3881,7 @@ var baseStyle$3 = {
3641
3881
  };
3642
3882
  var Code = {
3643
3883
  baseStyle: baseStyle$3,
3644
- variants: variants$3,
3884
+ variants: variants$4,
3645
3885
  defaultProps: defaultProps$3
3646
3886
  };
3647
3887
 
@@ -3738,11 +3978,32 @@ var baseStyle$7 = {
3738
3978
  bg: '#ffffff',
3739
3979
  border: '2px solid',
3740
3980
  borderColor: colors.border.focus
3981
+ },
3982
+ _placeholder: {
3983
+ color: colors.label.secondary.light
3741
3984
  }
3742
3985
  }
3743
3986
  };
3744
- var variants$4 = {
3745
- "default": baseStyle$7
3987
+ var mobileInputs = /*#__PURE__*/_extends$6({}, baseStyle$7, {
3988
+ field: {
3989
+ fontSize: '17px',
3990
+ py: '14px',
3991
+ px: '16px',
3992
+ cursor: 'pointer',
3993
+ lineHeight: '21px',
3994
+ fontWeight: 400,
3995
+ borderRadius: 0,
3996
+ height: '48px',
3997
+ padding: '12px 16px 12px 0px',
3998
+ border: '0.5px solid rgba(153, 153, 153, 0.1)',
3999
+ borderColor: 'rgba(153, 153, 153, 0.1)',
4000
+ borderLeft: 'none',
4001
+ borderRight: 'none'
4002
+ }
4003
+ });
4004
+ var variants$5 = {
4005
+ "default": baseStyle$7,
4006
+ mobile: mobileInputs
3746
4007
  };
3747
4008
  var defaultProps$4 = {
3748
4009
  variant: 'default'
@@ -3750,7 +4011,7 @@ var defaultProps$4 = {
3750
4011
  var Input$1 = {
3751
4012
  parts: parts$3,
3752
4013
  baseStyle: baseStyle$7,
3753
- variants: variants$4,
4014
+ variants: variants$5,
3754
4015
  defaultProps: defaultProps$4
3755
4016
  };
3756
4017
 
@@ -3847,7 +4108,7 @@ function variantNavlink(props) {
3847
4108
  }
3848
4109
  };
3849
4110
  }
3850
- var variants$5 = {
4111
+ var variants$6 = {
3851
4112
  sidebar: variantSidebar,
3852
4113
  sidebarExact: variantSidebarExact,
3853
4114
  subNavigation: variantSubNavigation,
@@ -3855,7 +4116,7 @@ var variants$5 = {
3855
4116
  };
3856
4117
  var Link$1 = {
3857
4118
  baseStyle: baseStyle$8,
3858
- variants: variants$5
4119
+ variants: variants$6
3859
4120
  };
3860
4121
 
3861
4122
  var parts$4 = ['overlay', 'dialogContainer', 'dialog', 'header', 'closeButton', 'body', 'footer'];
@@ -3895,7 +4156,7 @@ var Modal$1 = {
3895
4156
  };
3896
4157
 
3897
4158
  var defaultProps$5 = Input$1.defaultProps,
3898
- variants$6 = Input$1.variants;
4159
+ variants$7 = Input$1.variants;
3899
4160
  var parts$5 = ['field', 'icon'];
3900
4161
  function baseStyleField() {
3901
4162
  return _extends$6({}, Input$1.baseStyle.field, {
@@ -3924,7 +4185,7 @@ var baseStyle$a = function baseStyle() {
3924
4185
  var Select = {
3925
4186
  parts: parts$5,
3926
4187
  baseStyle: baseStyle$a,
3927
- variants: variants$6,
4188
+ variants: variants$7,
3928
4189
  defaultProps: defaultProps$5
3929
4190
  };
3930
4191
 
@@ -4263,7 +4524,7 @@ var variantSimple = {
4263
4524
  }
4264
4525
  }
4265
4526
  };
4266
- var variants$7 = {
4527
+ var variants$8 = {
4267
4528
  line: variantLine,
4268
4529
  enclosed: variantEnclosed,
4269
4530
  'enclosed-colored': variantEnclosedColored,
@@ -4281,7 +4542,7 @@ var Tabs = {
4281
4542
  parts: parts$8,
4282
4543
  baseStyle: baseStyle$d,
4283
4544
  sizes: sizes$1,
4284
- variants: variants$7,
4545
+ variants: variants$8,
4285
4546
  defaultProps: defaultProps$7
4286
4547
  };
4287
4548
 
@@ -4293,11 +4554,30 @@ var baseStyle$e = /*#__PURE__*/_extends$6({}, Input$1.baseStyle.field, {
4293
4554
  height: '78px',
4294
4555
  lineHeight: 'short'
4295
4556
  });
4557
+ var mobileInputs$1 = /*#__PURE__*/defineStyle$1( /*#__PURE__*/_extends$6({}, baseStyle$e, Input$1.variants.mobile.field, {
4558
+ border: 'none',
4559
+ borderRadius: 0,
4560
+ paddingY: '16px',
4561
+ paddingX: '0',
4562
+ // padding: '16px 16px',
4563
+ cursor: 'pointer',
4564
+ lineHeight: '21px',
4565
+ fontWeight: 400,
4566
+ resize: 'none',
4567
+ overflowY: 'auto',
4568
+ fontSize: '17px',
4569
+ minHeight: '208px'
4570
+ }));
4571
+ var variants$9 = {
4572
+ "default": baseStyle$e,
4573
+ mobile: mobileInputs$1
4574
+ };
4296
4575
  var defaultProps$8 = {
4297
4576
  variant: 'default'
4298
4577
  };
4299
4578
  var Textarea = {
4300
4579
  baseStyle: baseStyle$e,
4580
+ variants: variants$9,
4301
4581
  defaultProps: defaultProps$8
4302
4582
  };
4303
4583
 
@@ -4374,7 +4654,7 @@ function variantDescriptionLarge() {
4374
4654
  letterSpacing: '0.02em'
4375
4655
  };
4376
4656
  }
4377
- var variants$8 = {
4657
+ var variants$a = {
4378
4658
  'title-small': variantTitleSmall,
4379
4659
  'title-medium': variantTitleMedium,
4380
4660
  'title-large': variantTitleLarge,
@@ -4386,9 +4666,9 @@ var variants$8 = {
4386
4666
  'description-large': variantDescriptionLarge
4387
4667
  };
4388
4668
  var Text$1 = {
4389
- variants: variants$8,
4669
+ variants: variants$a,
4390
4670
  defaultProps: /*#__PURE__*/_extends$6({}, defaultProps$9, {
4391
- variant: variants$8['description-large']
4671
+ variant: variants$a['description-large']
4392
4672
  })
4393
4673
  };
4394
4674
 
@@ -4421,6 +4701,7 @@ var customXQChakraTheme = /*#__PURE__*/extendTheme( /*#__PURE__*/_extends$6({
4421
4701
  Alert: Alert,
4422
4702
  Badge: Badge,
4423
4703
  Button: Button$1,
4704
+ Checkbox: Checkbox,
4424
4705
  Code: Code,
4425
4706
  Form: Form$1,
4426
4707
  FormError: FormError,
@@ -4776,5 +5057,5 @@ function formatErrorResponse(error) {
4776
5057
  };
4777
5058
  }
4778
5059
 
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 };
5060
+ 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
5061
  //# sourceMappingURL=ui-core.esm.js.map