@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
@@ -15,6 +15,7 @@ var hi = require('react-icons/hi');
15
15
  var provider = require('@chakra-ui/provider');
16
16
  var themeTools = require('@chakra-ui/theme-tools');
17
17
  var system = require('@chakra-ui/system');
18
+ var anatomy = require('@chakra-ui/anatomy');
18
19
 
19
20
  /**
20
21
  * A functional React component utilized to render the `ActionRow` component
@@ -761,7 +762,8 @@ var StackedCheckbox = /*#__PURE__*/React__default.forwardRef(function (_ref2, _r
761
762
  var value = _ref2.value,
762
763
  label = _ref2.label,
763
764
  _onChange = _ref2.onChange,
764
- disabled = _ref2.disabled;
765
+ disabled = _ref2.disabled,
766
+ variant = _ref2.variant;
765
767
  if (value === null) return null;
766
768
  return /*#__PURE__*/React__default.createElement(react.Checkbox, {
767
769
  ref: _ref,
@@ -771,9 +773,10 @@ var StackedCheckbox = /*#__PURE__*/React__default.forwardRef(function (_ref2, _r
771
773
  if (_onChange) return _onChange(e.target.checked);
772
774
  },
773
775
  isChecked: Boolean(value),
774
- disabled: disabled
776
+ disabled: disabled,
777
+ variant: variant
775
778
  }, /*#__PURE__*/React__default.createElement(react.Text, {
776
- fontSize: "13px",
779
+ fontSize: variant === 'mobile' ? '17px' : '13px',
777
780
  alignSelf: "center"
778
781
  }, label));
779
782
  });
@@ -792,9 +795,6 @@ function _extends$6() {
792
795
  };
793
796
  return _extends$6.apply(this, arguments);
794
797
  }
795
- function _objectDestructuringEmpty(obj) {
796
- if (obj == null) throw new TypeError("Cannot destructure " + obj);
797
- }
798
798
  function _objectWithoutPropertiesLoose(source, excluded) {
799
799
  if (source == null) return {};
800
800
  var target = {};
@@ -808,7 +808,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
808
808
  return target;
809
809
  }
810
810
 
811
- var _excluded = ["type", "isRequired", "rightElement", "leftElement", "defaultValue", "allowDefault"];
811
+ var _excluded = ["type", "isRequired", "rightElement", "leftElement", "defaultValue", "allowDefault", "variant", "label"];
812
812
  /**
813
813
  * A functional React component utilized to render the `StackedInput` component.
814
814
  */
@@ -820,13 +820,19 @@ var StackedInput = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref)
820
820
  leftElement = _ref2.leftElement,
821
821
  defaultValue = _ref2.defaultValue,
822
822
  allowDefault = _ref2.allowDefault,
823
+ variant = _ref2.variant,
824
+ label = _ref2.label,
823
825
  props = _objectWithoutPropertiesLoose(_ref2, _excluded);
824
- return /*#__PURE__*/React__default.createElement(react.InputGroup, null, leftElement && leftElement, /*#__PURE__*/React__default.createElement(react.Input, Object.assign({
826
+ var isMobile = variant === 'mobile';
827
+ var placeholder = isMobile && label ? label : undefined;
828
+ return /*#__PURE__*/React__default.createElement(react.InputGroup, null, leftElement && leftElement, label, /*#__PURE__*/React__default.createElement(react.Input, Object.assign({}, props, {
829
+ placeholder: placeholder,
825
830
  type: type,
826
- isRequired: isRequired
827
- }, props, {
831
+ isRequired: isRequired,
828
832
  ref: _ref,
829
833
  defaultValue: defaultValue,
834
+ fontSize: isMobile ? '17px' : '13px',
835
+ variant: variant,
830
836
  onKeyDown: function onKeyDown(e) {
831
837
  if (e.key === 'Enter' && !allowDefault) {
832
838
  e.stopPropagation();
@@ -872,7 +878,8 @@ var Dropdown = function Dropdown(_ref) {
872
878
  return options.map(function (option, idx) {
873
879
  return /*#__PURE__*/React__default.createElement(react.Box, {
874
880
  key: idx,
875
- width: "100%"
881
+ width: "100%",
882
+ role: "combobox"
876
883
  }, option.value === 'section_header' && options[idx + 1] && options[idx + 1].value !== 'section_header' && /*#__PURE__*/React__default.createElement(react.Box, {
877
884
  color: colors.label.secondary.light,
878
885
  fontSize: "13px",
@@ -1168,17 +1175,38 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
1168
1175
  }));
1169
1176
  });
1170
1177
 
1178
+ var _excluded$2 = ["isRequired", "allowDefault", "variant", "label"];
1171
1179
  /**
1172
1180
  * A functional React component utilized to render the `StackedTextarea` component.
1173
1181
  */
1174
1182
  var StackedTextarea = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
1175
- var props = _extends$6({}, (_objectDestructuringEmpty(_ref2), _ref2));
1183
+ var allowDefault = _ref2.allowDefault,
1184
+ variant = _ref2.variant,
1185
+ label = _ref2.label,
1186
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
1187
+ var isMobile = variant === 'mobile';
1188
+ if (isMobile) {
1189
+ return /*#__PURE__*/React__default.createElement(react.Flex, null, /*#__PURE__*/React__default.createElement(react.Textarea, Object.assign({
1190
+ ref: _ref
1191
+ }, props, {
1192
+ variant: variant,
1193
+ fontSize: "17px",
1194
+ placeholder: label != null ? label : '',
1195
+ onKeyDown: function onKeyDown(e) {
1196
+ if (e.key === 'Enter' && !allowDefault) {
1197
+ e.stopPropagation();
1198
+ e.preventDefault();
1199
+ }
1200
+ }
1201
+ })));
1202
+ }
1176
1203
  return /*#__PURE__*/React__default.createElement(react.Textarea, Object.assign({
1177
1204
  ref: _ref
1178
1205
  }, props, {
1206
+ variant: variant,
1179
1207
  fontSize: "13px",
1180
1208
  onKeyDown: function onKeyDown(e) {
1181
- if (e.key === 'Enter') {
1209
+ if (e.key === 'Enter' && !allowDefault) {
1182
1210
  e.stopPropagation();
1183
1211
  e.preventDefault();
1184
1212
  }
@@ -1222,15 +1250,17 @@ var Close = function Close(_ref) {
1222
1250
  // For v1 we are truncating the label at 15 characters to avoid overflow
1223
1251
  var Token = function Token(_ref) {
1224
1252
  var label = _ref.label,
1225
- onDelete = _ref.onDelete;
1253
+ onDelete = _ref.onDelete,
1254
+ _ref$isMobile = _ref.isMobile,
1255
+ isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile;
1226
1256
  return /*#__PURE__*/React__default.createElement(react.Flex, {
1227
1257
  key: label,
1228
- borderRadius: "full",
1258
+ borderRadius: 'full',
1229
1259
  backgroundColor: "#7676801F",
1230
1260
  alignItems: "center",
1231
1261
  width: "fit-content",
1232
1262
  w: "auto",
1233
- h: "16px",
1263
+ h: isMobile ? '18px' : '16px',
1234
1264
  pl: "6px",
1235
1265
  pr: "2px",
1236
1266
  py: "2px",
@@ -1238,13 +1268,13 @@ var Token = function Token(_ref) {
1238
1268
  }, /*#__PURE__*/React__default.createElement(react.Text, {
1239
1269
  whiteSpace: "nowrap",
1240
1270
  color: colors.label.primary.light,
1241
- fontSize: "13px",
1271
+ fontSize: isMobile ? '17px' : '13px',
1242
1272
  pr: "4px"
1243
1273
  }, lodash.truncate(label.trim(), {
1244
1274
  length: 15,
1245
1275
  omission: '...'
1246
1276
  })), /*#__PURE__*/React__default.createElement(Close, {
1247
- boxSize: "11px",
1277
+ boxSize: isMobile ? '17px' : '11px',
1248
1278
  onClick: onDelete
1249
1279
  }));
1250
1280
  };
@@ -1541,7 +1571,11 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1541
1571
  setValue = _ref2.setValue,
1542
1572
  control = _ref2.control,
1543
1573
  placeholder = _ref2.placeholder,
1544
- disabled = _ref2.disabled;
1574
+ disabled = _ref2.disabled,
1575
+ _ref2$separators = _ref2.separators,
1576
+ separators = _ref2$separators === void 0 ? ['Enter', ' ', ',', ';', 'Tab'] : _ref2$separators,
1577
+ variant = _ref2.variant,
1578
+ label = _ref2.label;
1545
1579
  var watchedValue = reactHookForm.useWatch({
1546
1580
  control: control,
1547
1581
  name: name
@@ -1578,12 +1612,17 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1578
1612
  }
1579
1613
  }
1580
1614
  }, [latestTokenElement, watchedValue]);
1615
+ var handleOnChange = function handleOnChange(e) {
1616
+ if (tokenIndex === null) {
1617
+ setLocalValue(e.target.value.trim().replace(',', '').replace(';', '').length ? e.target.value : '');
1618
+ }
1619
+ };
1581
1620
  var onHandleKeyDown = function onHandleKeyDown(e) {
1582
1621
  if (e.key === 'Enter') {
1583
1622
  e.stopPropagation();
1584
1623
  e.preventDefault();
1585
1624
  }
1586
- if ((e.key === 'Enter' || e.key === ',' || e.key === ';' || e.key === 'Tab') && localValue.trim().length) {
1625
+ if (separators.includes(e.key)) {
1587
1626
  if (e.key === 'Enter' && !localValue.trim().length && tokenIndex !== null) {
1588
1627
  setLocalValue(lastestFormValueToArray[tokenIndex]);
1589
1628
  var _filteredUniqueValues = Array.from(new Set(lastestFormValueToArray.filter(function (value) {
@@ -1673,16 +1712,29 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1673
1712
  onBlur();
1674
1713
  }
1675
1714
  });
1715
+ var isMobile = variant === 'mobile';
1676
1716
  return /*#__PURE__*/React__default.createElement(react.Box, {
1677
1717
  position: "relative"
1678
1718
  }, /*#__PURE__*/React__default.createElement(react.Flex, {
1679
- fontSize: "13px",
1719
+ fontSize: isMobile ? '17px' : '13px',
1680
1720
  border: isFocussed ? '2px solid' : '.5px solid',
1681
1721
  borderColor: isFocussed ? colors.border.focus : colors.border["default"],
1682
1722
  pl: "8px",
1683
- borderRadius: "4px",
1723
+ borderRadius: isMobile ? '0' : '4px',
1684
1724
  alignItems: "center",
1685
1725
  justifyContent: "space-between",
1726
+ style: isMobile ? {
1727
+ cursor: 'pointer',
1728
+ height: '48px',
1729
+ fontSize: '17px',
1730
+ lineHeight: '20px',
1731
+ fontWeight: 400,
1732
+ padding: '12px 16px 12px 0px',
1733
+ borderRadius: 0,
1734
+ border: '0.5px solid rgba(153, 153, 153, 0.1)',
1735
+ borderLeft: 'none',
1736
+ borderRight: 'none'
1737
+ } : undefined,
1686
1738
  onClick: function onClick() {
1687
1739
  if (isFocussed && tokenIndex !== null) {
1688
1740
  setTokenIndex(null);
@@ -1695,7 +1747,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1695
1747
  bg: disabled ? colors.fill.light.quaternary : '#ffffff',
1696
1748
  cursor: disabled ? 'not-allowed' : 'pointer',
1697
1749
  ref: inputWrapperRef,
1698
- h: "26px"
1750
+ h: isMobile ? '48px' : '26px'
1699
1751
  }, /*#__PURE__*/React__default.createElement(react.Flex, {
1700
1752
  h: "100%",
1701
1753
  alignItems: "center",
@@ -1731,11 +1783,12 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1731
1783
  e.stopPropagation();
1732
1784
  e.preventDefault();
1733
1785
  onRemoveTag(index);
1734
- }
1786
+ },
1787
+ isMobile: isMobile
1735
1788
  }));
1736
1789
  }) : null, !lastestFormValueToArray.length && !isFocussed ? /*#__PURE__*/React__default.createElement(react.Text, {
1737
1790
  color: colors.label.secondary.light,
1738
- fontSize: "13px"
1791
+ fontSize: isMobile ? '17px' : '13px'
1739
1792
  }, placeholder) : null), !disabled && /*#__PURE__*/React__default.createElement(react.Flex, {
1740
1793
  flex: 1,
1741
1794
  minWidth: isFocussed && !tokenIndex ? '20%' : 0
@@ -1752,9 +1805,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1752
1805
  boxShadow: 'none !important'
1753
1806
  },
1754
1807
  value: localValue,
1755
- onChange: function onChange(e) {
1756
- return tokenIndex === null && setLocalValue(e.target.value.trim().replace(',', '').replace(';', '').length ? e.target.value : '');
1757
- },
1808
+ onChange: handleOnChange,
1758
1809
  ref: inputRef,
1759
1810
  onFocus: function onFocus() {
1760
1811
  return setIsFocussed(true);
@@ -1762,7 +1813,12 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1762
1813
  onBlur: function onBlur() {
1763
1814
  setIsFocussed(false);
1764
1815
  return setTokenIndex(null);
1765
- }
1816
+ },
1817
+ placeholder: isMobile && label && lastestFormValueToArray.length === 0 ? label : '',
1818
+ variant: variant,
1819
+ style: isMobile ? {
1820
+ border: 'none'
1821
+ } : undefined
1766
1822
  }))));
1767
1823
  });
1768
1824
 
@@ -1837,6 +1893,8 @@ function Input(_ref) {
1837
1893
  rightElement = _ref.rightElement,
1838
1894
  leftElement = _ref.leftElement,
1839
1895
  allowDefault = _ref.allowDefault,
1896
+ _ref$variant = _ref.variant,
1897
+ variant = _ref$variant === void 0 ? 'default' : _ref$variant,
1840
1898
  onChange = _ref.onChange,
1841
1899
  setValue = _ref.setValue,
1842
1900
  setError = _ref.setError,
@@ -1861,7 +1919,9 @@ function Input(_ref) {
1861
1919
  disabled: disabled,
1862
1920
  defaultValue: defaultValue,
1863
1921
  value: value,
1864
- allowDefault: allowDefault
1922
+ allowDefault: allowDefault,
1923
+ variant: variant,
1924
+ label: label
1865
1925
  });
1866
1926
  case 'radio':
1867
1927
  return /*#__PURE__*/React__default.createElement(StackedRadioGroup, {
@@ -1909,7 +1969,9 @@ function Input(_ref) {
1909
1969
  onBlur: onBlur,
1910
1970
  ref: ref,
1911
1971
  disabled: disabled,
1912
- value: value
1972
+ value: value,
1973
+ variant: variant,
1974
+ label: label
1913
1975
  });
1914
1976
  case 'checkbox':
1915
1977
  return /*#__PURE__*/React__default.createElement(StackedCheckbox, {
@@ -1923,7 +1985,8 @@ function Input(_ref) {
1923
1985
  value: value,
1924
1986
  defaultValue: defaultValue,
1925
1987
  label: label,
1926
- disabled: disabled
1988
+ disabled: disabled,
1989
+ variant: variant
1927
1990
  });
1928
1991
  case 'multi-select':
1929
1992
  return /*#__PURE__*/React__default.createElement(StackedMultiSelect, {
@@ -1960,7 +2023,9 @@ function Input(_ref) {
1960
2023
  setError: setError,
1961
2024
  clearErrors: clearErrors,
1962
2025
  control: control,
1963
- maxLength: maxLength
2026
+ maxLength: maxLength,
2027
+ variant: variant,
2028
+ label: label
1964
2029
  });
1965
2030
  case 'switch':
1966
2031
  return /*#__PURE__*/React__default.createElement(StackedSwitch, {
@@ -1978,6 +2043,7 @@ function Input(_ref) {
1978
2043
  return null;
1979
2044
  }
1980
2045
  };
2046
+ var nonLabeledInputs = ['checkbox'];
1981
2047
  return /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
1982
2048
  control: control,
1983
2049
  name: name,
@@ -1996,8 +2062,8 @@ function Input(_ref) {
1996
2062
  id: name,
1997
2063
  isInvalid: isInvalid,
1998
2064
  position: "relative",
1999
- py: inputType !== 'checkbox' && label || helperText || isInvalid ? 5 : 0
2000
- }, label && inputType !== 'checkbox' && /*#__PURE__*/React__default.createElement(Label$1, {
2065
+ py: !nonLabeledInputs.includes(inputType) && variant !== 'mobile' && label || helperText || isInvalid ? 5 : 0
2066
+ }, label && !nonLabeledInputs.includes(inputType) && variant !== 'mobile' && /*#__PURE__*/React__default.createElement(Label$1, {
2001
2067
  tooltipText: tooltipText,
2002
2068
  label: label,
2003
2069
  isRequired: isRequired
@@ -2036,7 +2102,8 @@ function FormSection(_ref) {
2036
2102
  maxLength = _ref2.maxLength,
2037
2103
  ariaLabel = _ref2.ariaLabel,
2038
2104
  disabled = _ref2.disabled,
2039
- defaultValue = _ref2.defaultValue;
2105
+ defaultValue = _ref2.defaultValue,
2106
+ variant = _ref2.variant;
2040
2107
  return /*#__PURE__*/React__default.createElement(Input, {
2041
2108
  key: name,
2042
2109
  control: form.control,
@@ -2052,7 +2119,8 @@ function FormSection(_ref) {
2052
2119
  defaultValue: defaultValue,
2053
2120
  setValue: form.setValue,
2054
2121
  setError: form.setError,
2055
- clearErrors: form.clearErrors
2122
+ clearErrors: form.clearErrors,
2123
+ variant: variant ? variant : ''
2056
2124
  });
2057
2125
  }));
2058
2126
  }
@@ -2926,11 +2994,11 @@ var Task = function Task(_ref) {
2926
2994
  });
2927
2995
  };
2928
2996
 
2929
- var _excluded$2 = ["boxSize", "color"];
2997
+ var _excluded$3 = ["boxSize", "color"];
2930
2998
  var GearIcon = function GearIcon(_ref) {
2931
2999
  var boxSize = _ref.boxSize,
2932
3000
  color = _ref.color,
2933
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
3001
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
2934
3002
  return /*#__PURE__*/React__default.createElement(react.Box, Object.assign({}, props), /*#__PURE__*/React__default.createElement("svg", Object.assign({
2935
3003
  xmlns: "http://www.w3.org/2000/svg",
2936
3004
  width: boxSize != null ? boxSize : 16,
@@ -2948,6 +3016,94 @@ var GearIcon = function GearIcon(_ref) {
2948
3016
  })));
2949
3017
  };
2950
3018
 
3019
+ var _excluded$4 = ["label", "ariaLabel", "className", "placeholder", "name", "helperText", "options", "tooltipText", "isInvalid", "errorText", "isRequired", "defaultValue", "fullOptions", "control", "disabled", "onChange", "setValue", "setError", "clearErrors"];
3020
+ /**
3021
+ * A functional React component utilized to render the `SelectNative` component.
3022
+ */
3023
+ var SelectNative = function SelectNative(_ref) {
3024
+ var name = _ref.name,
3025
+ helperText = _ref.helperText,
3026
+ options = _ref.options,
3027
+ isInvalid = _ref.isInvalid,
3028
+ errorText = _ref.errorText,
3029
+ isRequired = _ref.isRequired,
3030
+ defaultValue = _ref.defaultValue,
3031
+ control = _ref.control,
3032
+ disabled = _ref.disabled,
3033
+ onChange = _ref.onChange,
3034
+ setValue = _ref.setValue,
3035
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
3036
+ // const [selectedOption, setSelectedOption] = useState(
3037
+ // options ? options[0] ?? '' : ''
3038
+ // );
3039
+ var style = {
3040
+ cursor: 'pointer',
3041
+ color: 'var(--chakra-colors-blue-500)',
3042
+ height: '48px',
3043
+ fontSize: '17px',
3044
+ lineHeight: '20px',
3045
+ fontWeight: 400,
3046
+ padding: '12px 16px 12px 0px',
3047
+ borderRadius: 0,
3048
+ border: '0.5px solid rgba(153, 153, 153, 0.1)',
3049
+ borderLeft: 'none',
3050
+ borderRight: 'none'
3051
+ };
3052
+ var handleOnSelectItem = function handleOnSelectItem(selectedValue) {
3053
+ var selectedOption = options == null ? void 0 : options.find(function (_ref2) {
3054
+ var val = _ref2.value;
3055
+ return selectedValue === val;
3056
+ });
3057
+ if (selectedOption) {
3058
+ if (onChange) {
3059
+ onChange(selectedOption.value);
3060
+ }
3061
+ setValue(name, selectedOption.value);
3062
+ } else {
3063
+ setValue(name, selectedValue);
3064
+ }
3065
+ };
3066
+ React.useEffect(function () {
3067
+ if (defaultValue) {
3068
+ handleOnSelectItem(defaultValue);
3069
+ }
3070
+ // eslint-disable-next-line react-hooks/exhaustive-deps
3071
+ }, [defaultValue]);
3072
+ return /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
3073
+ control: control,
3074
+ name: name,
3075
+ rules: {
3076
+ required: isRequired
3077
+ },
3078
+ /** @ts-ignore: issues with implicit */
3079
+ render: function render(_ref3) {
3080
+ var _ref3$field = _ref3.field,
3081
+ ref = _ref3$field.ref,
3082
+ value = _ref3$field.value;
3083
+ return /*#__PURE__*/React__default.createElement(react.FormControl, {
3084
+ id: name,
3085
+ isInvalid: isInvalid,
3086
+ position: "relative",
3087
+ py: 0
3088
+ }, /*#__PURE__*/React__default.createElement(react.Select, Object.assign({}, props, {
3089
+ required: isRequired,
3090
+ ref: ref,
3091
+ value: value,
3092
+ disabled: disabled != null ? disabled : false,
3093
+ onChange: function onChange(e) {
3094
+ return handleOnSelectItem(e.target.value);
3095
+ },
3096
+ style: style
3097
+ }), options && options.map(function (i) {
3098
+ return /*#__PURE__*/React__default.createElement("option", {
3099
+ value: i.value,
3100
+ key: i.sortValue
3101
+ }, i.label);
3102
+ })), isInvalid ? /*#__PURE__*/React__default.createElement(react.FormErrorMessage, null, errorText) : helperText && /*#__PURE__*/React__default.createElement(react.FormHelperText, null, helperText));
3103
+ }
3104
+ });
3105
+ };
3106
+
2951
3107
  /**
2952
3108
  * A functional React component utilized to render the `BorderedBox` component
2953
3109
  */
@@ -3624,10 +3780,72 @@ var variantTertiary = function variantTertiary() {
3624
3780
  }
3625
3781
  });
3626
3782
  };
3783
+ var variantPrimaryFlat = function variantPrimaryFlat() {
3784
+ return _extends$6({}, baseStyle$2, {
3785
+ bg: colors.fill.action,
3786
+ bgGradient: null,
3787
+ minWidth: '172.5px',
3788
+ padding: '10px 16px',
3789
+ borderRadius: '8px',
3790
+ border: '0.5px',
3791
+ gap: '8px',
3792
+ height: '44px',
3793
+ // margin: '8px',
3794
+ fontSize: '17px',
3795
+ fontWeight: '500',
3796
+ lineHeight: '24px',
3797
+ letterSpacing: '0.02em',
3798
+ textAlign: 'center',
3799
+ boxShadow: '0px 0.5px 1px 0.5px #0000001A'
3800
+ });
3801
+ };
3802
+ var variantSecondaryFlat = function variantSecondaryFlat() {
3803
+ return _extends$6({}, variantPrimaryFlat(), {
3804
+ fontWeight: '400',
3805
+ color: colors.black,
3806
+ bg: colors.label.primary.dark,
3807
+ _hover: {
3808
+ bg: colors.label.primary.dark
3809
+ },
3810
+ _active: {
3811
+ color: colors.black,
3812
+ bg: colors.label.primary.dark,
3813
+ bgGradient: colors.fill.light.quaternary
3814
+ },
3815
+ _focus: {
3816
+ bg: colors.label.primary.dark
3817
+ }
3818
+ });
3819
+ };
3820
+ var variantTertiaryFlat = function variantTertiaryFlat() {
3821
+ return _extends$6({}, variantPrimaryFlat(), {
3822
+ fontWeight: '400',
3823
+ color: colors.label.primary.dark,
3824
+ bg: colors.blur.quaternary.dark,
3825
+ _hover: {
3826
+ bg: colors.blur.quaternary.dark
3827
+ },
3828
+ _active: {
3829
+ color: colors.label.primary.dark,
3830
+ bg: colors.blur.tertiary.dark
3831
+ },
3832
+ _focus: {
3833
+ color: colors.label.primary.dark,
3834
+ bg: colors.blur.quaternary.dark
3835
+ },
3836
+ _disabled: {
3837
+ backgroundColor: colors.blur.quaternary.dark,
3838
+ color: colors.blur.tertiary.dark
3839
+ }
3840
+ });
3841
+ };
3627
3842
  var variants$2 = {
3628
3843
  primary: /*#__PURE__*/variantPrimary(),
3629
3844
  secondary: /*#__PURE__*/variantSecondary(),
3630
- tertiary: /*#__PURE__*/variantTertiary()
3845
+ tertiary: /*#__PURE__*/variantTertiary(),
3846
+ 'flat-primary': /*#__PURE__*/variantPrimaryFlat(),
3847
+ 'flat-secondary': /*#__PURE__*/variantSecondaryFlat(),
3848
+ 'flat-tertiary': /*#__PURE__*/variantTertiaryFlat()
3631
3849
  };
3632
3850
  var defaultProps$2 = {
3633
3851
  variant: 'primary'
@@ -3638,7 +3856,29 @@ var Button$1 = {
3638
3856
  defaultProps: defaultProps$2
3639
3857
  };
3640
3858
 
3641
- var variants$3 = Badge.variants,
3859
+ var _createMultiStyleConf = /*#__PURE__*/react.createMultiStyleConfigHelpers(anatomy.checkboxAnatomy.keys),
3860
+ definePartsStyle = _createMultiStyleConf.definePartsStyle,
3861
+ defineMultiStyleConfig = _createMultiStyleConf.defineMultiStyleConfig;
3862
+ var roundedCheckbox = /*#__PURE__*/definePartsStyle({
3863
+ control: {
3864
+ //borderRadius: 50,
3865
+ },
3866
+ label: {
3867
+ fontSize: '17px',
3868
+ fontWeight: 400,
3869
+ lineHeight: '20px',
3870
+ padding: '12px 16px 12px 0px'
3871
+ },
3872
+ height: '44px'
3873
+ });
3874
+ var variants$3 = {
3875
+ mobile: roundedCheckbox
3876
+ };
3877
+ var Checkbox = /*#__PURE__*/defineMultiStyleConfig({
3878
+ variants: variants$3
3879
+ });
3880
+
3881
+ var variants$4 = Badge.variants,
3642
3882
  defaultProps$3 = Badge.defaultProps;
3643
3883
  var baseStyle$3 = {
3644
3884
  fontFamily: 'mono',
@@ -3648,7 +3888,7 @@ var baseStyle$3 = {
3648
3888
  };
3649
3889
  var Code = {
3650
3890
  baseStyle: baseStyle$3,
3651
- variants: variants$3,
3891
+ variants: variants$4,
3652
3892
  defaultProps: defaultProps$3
3653
3893
  };
3654
3894
 
@@ -3745,11 +3985,32 @@ var baseStyle$7 = {
3745
3985
  bg: '#ffffff',
3746
3986
  border: '2px solid',
3747
3987
  borderColor: colors.border.focus
3988
+ },
3989
+ _placeholder: {
3990
+ color: colors.label.secondary.light
3748
3991
  }
3749
3992
  }
3750
3993
  };
3751
- var variants$4 = {
3752
- "default": baseStyle$7
3994
+ var mobileInputs = /*#__PURE__*/_extends$6({}, baseStyle$7, {
3995
+ field: {
3996
+ fontSize: '17px',
3997
+ py: '14px',
3998
+ px: '16px',
3999
+ cursor: 'pointer',
4000
+ lineHeight: '21px',
4001
+ fontWeight: 400,
4002
+ borderRadius: 0,
4003
+ height: '48px',
4004
+ padding: '12px 16px 12px 0px',
4005
+ border: '0.5px solid rgba(153, 153, 153, 0.1)',
4006
+ borderColor: 'rgba(153, 153, 153, 0.1)',
4007
+ borderLeft: 'none',
4008
+ borderRight: 'none'
4009
+ }
4010
+ });
4011
+ var variants$5 = {
4012
+ "default": baseStyle$7,
4013
+ mobile: mobileInputs
3753
4014
  };
3754
4015
  var defaultProps$4 = {
3755
4016
  variant: 'default'
@@ -3757,7 +4018,7 @@ var defaultProps$4 = {
3757
4018
  var Input$1 = {
3758
4019
  parts: parts$3,
3759
4020
  baseStyle: baseStyle$7,
3760
- variants: variants$4,
4021
+ variants: variants$5,
3761
4022
  defaultProps: defaultProps$4
3762
4023
  };
3763
4024
 
@@ -3854,7 +4115,7 @@ function variantNavlink(props) {
3854
4115
  }
3855
4116
  };
3856
4117
  }
3857
- var variants$5 = {
4118
+ var variants$6 = {
3858
4119
  sidebar: variantSidebar,
3859
4120
  sidebarExact: variantSidebarExact,
3860
4121
  subNavigation: variantSubNavigation,
@@ -3862,7 +4123,7 @@ var variants$5 = {
3862
4123
  };
3863
4124
  var Link$1 = {
3864
4125
  baseStyle: baseStyle$8,
3865
- variants: variants$5
4126
+ variants: variants$6
3866
4127
  };
3867
4128
 
3868
4129
  var parts$4 = ['overlay', 'dialogContainer', 'dialog', 'header', 'closeButton', 'body', 'footer'];
@@ -3902,7 +4163,7 @@ var Modal$1 = {
3902
4163
  };
3903
4164
 
3904
4165
  var defaultProps$5 = Input$1.defaultProps,
3905
- variants$6 = Input$1.variants;
4166
+ variants$7 = Input$1.variants;
3906
4167
  var parts$5 = ['field', 'icon'];
3907
4168
  function baseStyleField() {
3908
4169
  return _extends$6({}, Input$1.baseStyle.field, {
@@ -3931,7 +4192,7 @@ var baseStyle$a = function baseStyle() {
3931
4192
  var Select = {
3932
4193
  parts: parts$5,
3933
4194
  baseStyle: baseStyle$a,
3934
- variants: variants$6,
4195
+ variants: variants$7,
3935
4196
  defaultProps: defaultProps$5
3936
4197
  };
3937
4198
 
@@ -4270,7 +4531,7 @@ var variantSimple = {
4270
4531
  }
4271
4532
  }
4272
4533
  };
4273
- var variants$7 = {
4534
+ var variants$8 = {
4274
4535
  line: variantLine,
4275
4536
  enclosed: variantEnclosed,
4276
4537
  'enclosed-colored': variantEnclosedColored,
@@ -4288,7 +4549,7 @@ var Tabs = {
4288
4549
  parts: parts$8,
4289
4550
  baseStyle: baseStyle$d,
4290
4551
  sizes: sizes$1,
4291
- variants: variants$7,
4552
+ variants: variants$8,
4292
4553
  defaultProps: defaultProps$7
4293
4554
  };
4294
4555
 
@@ -4300,11 +4561,30 @@ var baseStyle$e = /*#__PURE__*/_extends$6({}, Input$1.baseStyle.field, {
4300
4561
  height: '78px',
4301
4562
  lineHeight: 'short'
4302
4563
  });
4564
+ var mobileInputs$1 = /*#__PURE__*/react.defineStyle( /*#__PURE__*/_extends$6({}, baseStyle$e, Input$1.variants.mobile.field, {
4565
+ border: 'none',
4566
+ borderRadius: 0,
4567
+ paddingY: '16px',
4568
+ paddingX: '0',
4569
+ // padding: '16px 16px',
4570
+ cursor: 'pointer',
4571
+ lineHeight: '21px',
4572
+ fontWeight: 400,
4573
+ resize: 'none',
4574
+ overflowY: 'auto',
4575
+ fontSize: '17px',
4576
+ minHeight: '208px'
4577
+ }));
4578
+ var variants$9 = {
4579
+ "default": baseStyle$e,
4580
+ mobile: mobileInputs$1
4581
+ };
4303
4582
  var defaultProps$8 = {
4304
4583
  variant: 'default'
4305
4584
  };
4306
4585
  var Textarea = {
4307
4586
  baseStyle: baseStyle$e,
4587
+ variants: variants$9,
4308
4588
  defaultProps: defaultProps$8
4309
4589
  };
4310
4590
 
@@ -4381,7 +4661,7 @@ function variantDescriptionLarge() {
4381
4661
  letterSpacing: '0.02em'
4382
4662
  };
4383
4663
  }
4384
- var variants$8 = {
4664
+ var variants$a = {
4385
4665
  'title-small': variantTitleSmall,
4386
4666
  'title-medium': variantTitleMedium,
4387
4667
  'title-large': variantTitleLarge,
@@ -4393,9 +4673,9 @@ var variants$8 = {
4393
4673
  'description-large': variantDescriptionLarge
4394
4674
  };
4395
4675
  var Text$1 = {
4396
- variants: variants$8,
4676
+ variants: variants$a,
4397
4677
  defaultProps: /*#__PURE__*/_extends$6({}, defaultProps$9, {
4398
- variant: variants$8['description-large']
4678
+ variant: variants$a['description-large']
4399
4679
  })
4400
4680
  };
4401
4681
 
@@ -4428,6 +4708,7 @@ var customXQChakraTheme = /*#__PURE__*/react.extendTheme( /*#__PURE__*/_extends$
4428
4708
  Alert: Alert,
4429
4709
  Badge: Badge,
4430
4710
  Button: Button$1,
4711
+ Checkbox: Checkbox,
4431
4712
  Code: Code,
4432
4713
  Form: Form$1,
4433
4714
  FormError: FormError,
@@ -4825,6 +5106,7 @@ exports.Page = Page;
4825
5106
  exports.Positive = Positive;
4826
5107
  exports.Question = Question;
4827
5108
  exports.Search = Search;
5109
+ exports.SelectNative = SelectNative;
4828
5110
  exports.Services = Services;
4829
5111
  exports.Settings = Settings;
4830
5112
  exports.SpinnerButton = SpinnerButton;