@luscii-healthtech/web-ui 2.0.0 → 2.3.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 (57) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +10 -0
  2. package/dist/components/Accordion/AccordionItem.d.ts +9 -0
  3. package/dist/components/Form/Form.d.ts +9 -0
  4. package/dist/components/Form/FormFieldDecorator.d.ts +8 -0
  5. package/dist/components/Form/FormInput.d.ts +3 -0
  6. package/dist/components/Form/FormRadioGroup.d.ts +3 -0
  7. package/dist/components/Form/FormSelect.d.ts +3 -0
  8. package/dist/components/Form/form.transformer.d.ts +20 -0
  9. package/dist/components/Form/form.types.d.ts +54 -0
  10. package/dist/components/Input/Input.d.ts +8 -7
  11. package/dist/components/Input/SearchInput.d.ts +1 -1
  12. package/dist/components/List/List.d.ts +1 -1
  13. package/dist/components/List/List.types.d.ts +1 -0
  14. package/dist/components/List/ListItemSkeleton.d.ts +2 -0
  15. package/dist/components/List/ListSkeleton.d.ts +7 -0
  16. package/dist/components/Radio/Radio.d.ts +3 -0
  17. package/dist/components/Radio/RadioV2.d.ts +17 -0
  18. package/dist/components/RadioGroup/RadioGroup.d.ts +3 -0
  19. package/dist/components/RadioGroup/RadioGroupV2.d.ts +9 -0
  20. package/dist/components/Select/Select.d.ts +3 -0
  21. package/dist/components/Select/SelectV2.d.ts +31 -0
  22. package/dist/index.d.ts +2 -0
  23. package/dist/web-ui-tailwind.css +50 -0
  24. package/dist/web-ui.cjs.development.js +604 -40
  25. package/dist/web-ui.cjs.development.js.map +1 -1
  26. package/dist/web-ui.cjs.production.min.js +1 -1
  27. package/dist/web-ui.cjs.production.min.js.map +1 -1
  28. package/dist/web-ui.esm.js +604 -41
  29. package/dist/web-ui.esm.js.map +1 -1
  30. package/package.json +6 -3
  31. package/src/components/Accordion/Accordion.tsx +33 -0
  32. package/src/components/Accordion/AccordionItem.tsx +50 -0
  33. package/src/components/Form/Form.tsx +106 -0
  34. package/src/components/Form/FormFieldDecorator.tsx +66 -0
  35. package/src/components/Form/FormInput.tsx +47 -0
  36. package/src/components/Form/FormRadioGroup.tsx +23 -0
  37. package/src/components/Form/FormSelect.tsx +32 -0
  38. package/src/components/Form/form.transformer.ts +9 -0
  39. package/src/components/Form/form.types.ts +132 -0
  40. package/src/components/Input/Input.tsx +160 -165
  41. package/src/components/Input/SearchInput.tsx +13 -3
  42. package/src/components/List/List.tsx +13 -9
  43. package/src/components/List/List.types.ts +1 -0
  44. package/src/components/List/ListItemSkeleton.tsx +26 -0
  45. package/src/components/List/ListSkeleton.scss +5 -0
  46. package/src/components/List/ListSkeleton.tsx +30 -0
  47. package/src/components/Radio/Radio.js +3 -0
  48. package/src/components/Radio/RadioV2.css +15 -0
  49. package/src/components/Radio/RadioV2.tsx +87 -0
  50. package/src/components/RadioGroup/RadioGroup.js +3 -0
  51. package/src/components/RadioGroup/RadioGroupV2.tsx +35 -0
  52. package/src/components/Select/Select.tsx +38 -12
  53. package/src/components/Select/SelectV2.tsx +171 -0
  54. package/src/index.tsx +3 -0
  55. package/src/styles/_skeleton.scss +63 -0
  56. package/src/types/general.types.ts +1 -1
  57. package/src/components/Select/Select.examples.md +0 -161
@@ -26,6 +26,8 @@ var reactDraftWysiwyg = require('react-draft-wysiwyg');
26
26
  var draftToHtml = _interopDefault(require('draftjs-to-html'));
27
27
  var htmlToDraft = _interopDefault(require('html-to-draftjs'));
28
28
  require('react-draft-wysiwyg/dist/react-draft-wysiwyg.css');
29
+ var reactHookForm = require('react-hook-form');
30
+ var errorMessage = require('@hookform/error-message');
29
31
 
30
32
  function styleInject(css, ref) {
31
33
  if ( ref === void 0 ) ref = {};
@@ -1862,7 +1864,7 @@ var CrossIcon = function CrossIcon(props) {
1862
1864
  var css_248z$c = ".input::-ms-clear {\n display: none;\n}";
1863
1865
  styleInject(css_248z$c);
1864
1866
 
1865
- var _excluded$6 = ["withSuffix", "withPrefix", "className", "clearable", "type", "isDisabled", "icon", "setRef", "name", "value", "onChange"];
1867
+ var _excluded$6 = ["withSuffix", "withPrefix", "className", "clearable", "type", "isDisabled", "icon", "name", "value", "onChange", "isError"];
1866
1868
  // Don't know why yet but it can be fixed later.
1867
1869
 
1868
1870
  var INPUT_TYPES = {
@@ -1871,8 +1873,7 @@ var INPUT_TYPES = {
1871
1873
  PASSWORD: "password",
1872
1874
  TEXT: "text"
1873
1875
  };
1874
-
1875
- var Input = function Input(_ref) {
1876
+ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
1876
1877
  var _ref$withSuffix = _ref.withSuffix,
1877
1878
  withSuffix = _ref$withSuffix === void 0 ? "" : _ref$withSuffix,
1878
1879
  _ref$withPrefix = _ref.withPrefix,
@@ -1885,10 +1886,11 @@ var Input = function Input(_ref) {
1885
1886
  _ref$isDisabled = _ref.isDisabled,
1886
1887
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
1887
1888
  icon = _ref.icon,
1888
- setRef = _ref.setRef,
1889
1889
  name = _ref.name,
1890
- value = _ref.value,
1890
+ _ref$value = _ref.value,
1891
+ value = _ref$value === void 0 ? "" : _ref$value,
1891
1892
  onChange = _ref.onChange,
1893
+ isError = _ref.isError,
1892
1894
  otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$6);
1893
1895
 
1894
1896
  var hasNoExtraContent = withPrefix === "" && withSuffix === "";
@@ -1897,7 +1899,6 @@ var Input = function Input(_ref) {
1897
1899
  innerValue = _useState[0],
1898
1900
  setInnerValue = _useState[1];
1899
1901
 
1900
- var inputRef = React.useRef(null);
1901
1902
  React.useEffect(function () {
1902
1903
  setInnerValue(value);
1903
1904
  }, [value]);
@@ -1939,13 +1940,13 @@ var Input = function Input(_ref) {
1939
1940
  }, /*#__PURE__*/React__default.createElement("div", {
1940
1941
  className: "flex flex-row"
1941
1942
  }, /*#__PURE__*/React__default.createElement("span", {
1942
- className: classNames("h-11", {
1943
+ className: classNames("h-11 border-t border-b border-solid border-input-border", {
1943
1944
  hidden: hasNoExtraContent,
1944
1945
  "order-1": withPrefix !== "",
1945
1946
  "order-2": withSuffix !== "",
1946
1947
  "rounded-l border-l": withPrefix !== "",
1947
1948
  "rounded-r border-r": withSuffix !== ""
1948
- }, "border-t border-b border-solid border-input-border", "flex flex-col items-center p-3", "text-sm", "text-slate-500", "bg-main-background")
1949
+ }, "flex flex-col items-center p-3", "text-sm", "text-slate-500", "bg-main-background")
1949
1950
  }, withSuffix || withPrefix), icon && /*#__PURE__*/React__default.createElement("div", {
1950
1951
  className: "absolute top-1/2 left-4",
1951
1952
  style: {
@@ -1958,10 +1959,7 @@ var Input = function Input(_ref) {
1958
1959
  name: name,
1959
1960
  value: innerValue,
1960
1961
  onChange: handleChangeEvent,
1961
- ref: function ref(element) {
1962
- inputRef.current = element;
1963
- element && (setRef == null ? void 0 : setRef(element));
1964
- },
1962
+ ref: ref,
1965
1963
  size: otherProps.maxLength,
1966
1964
  type: type,
1967
1965
  disabled: isDisabled,
@@ -1971,10 +1969,14 @@ var Input = function Input(_ref) {
1971
1969
  }, {
1972
1970
  "text-slate-400 bg-slate-50": isDisabled,
1973
1971
  "text-slate-700": !isDisabled,
1974
- "border-input-border": !isDisabled,
1972
+ "border-input-border": !isDisabled && !isError,
1975
1973
  "hover:border-input-border-dark": !isDisabled,
1974
+ "border-red-700": isError,
1975
+ "focus:outline-negative": isError,
1976
+ "focus:border-blue-800": !isError,
1977
+ "focus:outline-primary": !isError,
1976
1978
  "bg-white": !isDisabled
1977
- }, "h-11", "p-2", "border", "text-sm", "placeholder-slate-500", "border-solid", "focus:outline-primary", "transition-colors", "duration-300", "focus:border-blue-800", {
1979
+ }, "h-11", "p-2", "border", "text-sm", "placeholder-slate-500", "border-solid", "transition-colors", "duration-300", {
1978
1980
  "z-10": withSuffix !== "" || withPrefix !== "",
1979
1981
  rounded: hasNoExtraContent,
1980
1982
  "rounded-l": withSuffix !== "",
@@ -1994,7 +1996,7 @@ var Input = function Input(_ref) {
1994
1996
  }),
1995
1997
  onClick: clearField
1996
1998
  }))));
1997
- };
1999
+ });
1998
2000
 
1999
2001
  var Line = function Line(_ref) {
2000
2002
  var left = _ref.left,
@@ -2338,6 +2340,10 @@ function generateCustomStyles(hasError, isIE11) {
2338
2340
  }
2339
2341
  };
2340
2342
  }
2343
+ /**
2344
+ * @deprecated: use SelectV2 instead
2345
+ */
2346
+
2341
2347
 
2342
2348
  var CustomSelect = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
2343
2349
  var className = props.className,
@@ -2720,6 +2726,69 @@ var ListItem = function ListItem(_ref) {
2720
2726
  }), accessories);
2721
2727
  };
2722
2728
 
2729
+ var css_248z$g = ".list-skeleton .skeleton-box {\n display: inline-block;\n height: 1em;\n position: relative;\n overflow: hidden;\n background-color: #cbd5e1;\n border-radius: 3px;\n}\n\n.list-skeleton .skeleton-box::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transform: translateX(-100%);\n background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0));\n animation: shimmer 800ms infinite;\n content: \"\";\n}\n\n.list-skeleton .skeleton-box.is-circle {\n border-radius: 50%;\n}\n\n.list-skeleton .skeleton-box.is-button {\n background-color: #e2e8f0;\n border-radius: 9999px;\n}\n\n.list-skeleton .skeleton-box.is-button::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transform: translateX(-100%);\n background-image: linear-gradient(90deg, rgba(221, 221, 221, 0) 0, rgba(221, 221, 221, 0.2) 20%, rgba(221, 221, 221, 0.5) 60%, rgba(221, 221, 221, 0));\n animation: shimmer 800ms infinite;\n content: \"\";\n}\n\n@keyframes shimmer {\n 100% {\n transform: translateX(100%);\n }\n}\n";
2730
+ styleInject(css_248z$g);
2731
+
2732
+ var ListItemSkeleton = function ListItemSkeleton() {
2733
+ return /*#__PURE__*/React__default.createElement("div", {
2734
+ className: "flex flex-row items-center p-4"
2735
+ }, /*#__PURE__*/React__default.createElement("div", {
2736
+ className: "skeleton-box is-circle mr-2",
2737
+ style: {
2738
+ width: 32 + "px",
2739
+ height: 32 + "px"
2740
+ }
2741
+ }), /*#__PURE__*/React__default.createElement("div", {
2742
+ className: "flex flex-col"
2743
+ }, /*#__PURE__*/React__default.createElement("div", {
2744
+ className: "skeleton-box mb-1",
2745
+ style: {
2746
+ width: 160 + "px",
2747
+ height: 14 + "px"
2748
+ }
2749
+ }), /*#__PURE__*/React__default.createElement("div", {
2750
+ className: "skeleton-box",
2751
+ style: {
2752
+ width: 110 + "px",
2753
+ height: 14 + "px"
2754
+ }
2755
+ })), /*#__PURE__*/React__default.createElement("div", {
2756
+ className: "skeleton-box is-button ml-auto rounded-full",
2757
+ style: {
2758
+ width: 24 + "px",
2759
+ height: 24 + "px"
2760
+ }
2761
+ }));
2762
+ };
2763
+
2764
+ var ListSkeleton = function ListSkeleton(_ref) {
2765
+ var items = _ref.items;
2766
+ var skeletonItems = Array.from({
2767
+ length: items || 5
2768
+ }, function (_, i) {
2769
+ return /*#__PURE__*/React__default.createElement(ListItemSkeleton, {
2770
+ key: i
2771
+ });
2772
+ });
2773
+ return /*#__PURE__*/React__default.createElement("div", {
2774
+ className: "flex flex-col divide-y divide-slate-200 bg-white border-slate-50 border rounded-lg shadow list-skeleton"
2775
+ }, /*#__PURE__*/React__default.createElement("div", {
2776
+ className: "flex flex-row items-center px-4 py-2"
2777
+ }, /*#__PURE__*/React__default.createElement("div", {
2778
+ className: "skeleton-box",
2779
+ style: {
2780
+ width: 160 + "px",
2781
+ height: 14 + "px"
2782
+ }
2783
+ }), /*#__PURE__*/React__default.createElement("div", {
2784
+ className: "skeleton-box is-button ml-auto",
2785
+ style: {
2786
+ width: 110 + "px",
2787
+ height: 44 + "px"
2788
+ }
2789
+ })), skeletonItems);
2790
+ };
2791
+
2723
2792
  var List = function List(_ref) {
2724
2793
  var title = _ref.title,
2725
2794
  headerButton = _ref.headerButton,
@@ -2727,7 +2796,8 @@ var List = function List(_ref) {
2727
2796
  items = _ref.items,
2728
2797
  onAssetLoadError = _ref.onAssetLoadError,
2729
2798
  onDragEnd = _ref.onDragEnd,
2730
- emptyStateMessage = _ref.emptyStateMessage;
2799
+ emptyStateMessage = _ref.emptyStateMessage,
2800
+ isLoading = _ref.isLoading;
2731
2801
  var listRef = React.useRef(null);
2732
2802
  var dragulaRef = React.useRef(null);
2733
2803
  var hasHeader = !!(title || headerButton);
@@ -2777,6 +2847,13 @@ var List = function List(_ref) {
2777
2847
  };
2778
2848
 
2779
2849
  var roundTop = !hasHeader || hasHeader && headerTransparent;
2850
+
2851
+ if (isLoading) {
2852
+ return /*#__PURE__*/React__default.createElement(ListSkeleton, {
2853
+ items: items.length
2854
+ });
2855
+ }
2856
+
2780
2857
  return /*#__PURE__*/React__default.createElement("div", {
2781
2858
  "data-test-id": "list-component"
2782
2859
  }, (title || headerButton) && /*#__PURE__*/React__default.createElement("div", {
@@ -3081,8 +3158,8 @@ function handleImplicitSelect(implicitSelected, event, list, property) {
3081
3158
  return newList;
3082
3159
  }
3083
3160
 
3084
- var css_248z$g = ".cweb-multiselect {\n display: flex;\n}\n\n.cweb-multiselect .cweb-multiselect-checkbox {\n margin-bottom: 0px;\n margin-top: 0.5rem;\n width: 100%;\n text-transform: capitalize;\n}\n\n.cweb-multiselect .cweb-switch-wrapper {\n display: flex;\n}\n\n.cweb-multiselect .cweb-switch-wrapper .cweb-multiselect-switch {\n width: 50px;\n}\n\n.cweb-multiselect .cweb-switch-wrapper .cweb-multiselect-switch .cweb-checkbox.type-switch.is-checked .cweb-checkbox-icon-container {\n background-color: #6abfa5;\n}\n\n.cweb-multiselect .cweb-switch-wrapper .cweb-switch-title {\n width: 100px;\n color: #737373;\n font-size: 16px;\n line-height: 1.8em;\n}\n";
3085
- styleInject(css_248z$g);
3161
+ var css_248z$h = ".cweb-multiselect {\n display: flex;\n}\n\n.cweb-multiselect .cweb-multiselect-checkbox {\n margin-bottom: 0px;\n margin-top: 0.5rem;\n width: 100%;\n text-transform: capitalize;\n}\n\n.cweb-multiselect .cweb-switch-wrapper {\n display: flex;\n}\n\n.cweb-multiselect .cweb-switch-wrapper .cweb-multiselect-switch {\n width: 50px;\n}\n\n.cweb-multiselect .cweb-switch-wrapper .cweb-multiselect-switch .cweb-checkbox.type-switch.is-checked .cweb-checkbox-icon-container {\n background-color: #6abfa5;\n}\n\n.cweb-multiselect .cweb-switch-wrapper .cweb-switch-title {\n width: 100px;\n color: #737373;\n font-size: 16px;\n line-height: 1.8em;\n}\n";
3162
+ styleInject(css_248z$h);
3086
3163
 
3087
3164
  function MultiSelect(_ref) {
3088
3165
  var checkboxList = _ref.checkboxList,
@@ -3428,8 +3505,8 @@ NotificationBanner.defaultProps = {
3428
3505
  onButtonClick: undefined
3429
3506
  };
3430
3507
 
3431
- var css_248z$h = ".cweb-page {\n width: 100%;\n max-width: 1140px;\n margin: 32px auto 0 auto;\n}\n\n.cweb-page .cweb-page-breadcrumbs {\n margin-bottom: 16px;\n}\n\n.cweb-page .page-spinner {\n margin-left: 8px;\n margin-bottom: 4px;\n}\n\n.cweb-page .page-spinner img {\n width: 21px;\n}\n\n.cweb-page .cweb-page-header {\n display: flex;\n align-items: center;\n width: 100%;\n flex-grow: 0;\n}\n\n.cweb-page .cweb-page-header .cweb-page-title {\n display: inline;\n}\n\n.cweb-page .cweb-page-header.accessory-right {\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n\n.cweb-page .cweb-page-header.accessory-bottom {\n flex-direction: column;\n align-items: flex-start;\n}\n\n@media screen and (max-width: 426px) {\n .cweb-page .cweb-page-header.accessory-bottom {\n max-width: 75vw;\n }\n\n .cweb-page .cweb-page-header.accessory-bottom img {\n max-width: 10vw;\n }\n\n .cweb-page .cweb-page-header.accessory-bottom button p {\n font-size: 4vw;\n }\n}\n\n.cweb-page .cweb-page-header.accessory-bottom .cweb-page-title {\n margin-bottom: 8px;\n display: inline;\n}\n";
3432
- styleInject(css_248z$h);
3508
+ var css_248z$i = ".cweb-page {\n width: 100%;\n max-width: 1140px;\n margin: 32px auto 0 auto;\n}\n\n.cweb-page .cweb-page-breadcrumbs {\n margin-bottom: 16px;\n}\n\n.cweb-page .page-spinner {\n margin-left: 8px;\n margin-bottom: 4px;\n}\n\n.cweb-page .page-spinner img {\n width: 21px;\n}\n\n.cweb-page .cweb-page-header {\n display: flex;\n align-items: center;\n width: 100%;\n flex-grow: 0;\n}\n\n.cweb-page .cweb-page-header .cweb-page-title {\n display: inline;\n}\n\n.cweb-page .cweb-page-header.accessory-right {\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n\n.cweb-page .cweb-page-header.accessory-bottom {\n flex-direction: column;\n align-items: flex-start;\n}\n\n@media screen and (max-width: 426px) {\n .cweb-page .cweb-page-header.accessory-bottom {\n max-width: 75vw;\n }\n\n .cweb-page .cweb-page-header.accessory-bottom img {\n max-width: 10vw;\n }\n\n .cweb-page .cweb-page-header.accessory-bottom button p {\n font-size: 4vw;\n }\n}\n\n.cweb-page .cweb-page-header.accessory-bottom .cweb-page-title {\n margin-bottom: 8px;\n display: inline;\n}\n";
3509
+ styleInject(css_248z$i);
3433
3510
 
3434
3511
  /**
3435
3512
  * Renders page's content, if `isLoading` is false otherwise shows loading indicator.
@@ -3609,8 +3686,8 @@ var Steps = function Steps(_ref) {
3609
3686
  }, renderedSteps);
3610
3687
  };
3611
3688
 
3612
- var css_248z$i = ".cweb-crud-page {\n width: 100%;\n margin: 36px auto 0;\n}\n\n.cweb-crud-page-form-container {\n background-color: #fff;\n border-radius: 8px;\n padding: 24px;\n margin-top: 16px;\n}\n\n.cweb-crud-page-button-line {\n border-top: 1px solid #eeeeee;\n padding-top: 16px;\n margin-top: 16px;\n}\n\n.cweb-crud-page-loading-container {\n height: 90vh;\n /* puting this in 100vh causes an overflow bug */\n overflow-y: hidden;\n position: relative;\n}\n\n.cweb-crud-page-loading-container .crud-page-loader {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n";
3613
- styleInject(css_248z$i);
3689
+ var css_248z$j = ".cweb-crud-page {\n width: 100%;\n margin: 36px auto 0;\n}\n\n.cweb-crud-page-form-container {\n background-color: #fff;\n border-radius: 8px;\n padding: 24px;\n margin-top: 16px;\n}\n\n.cweb-crud-page-button-line {\n border-top: 1px solid #eeeeee;\n padding-top: 16px;\n margin-top: 16px;\n}\n\n.cweb-crud-page-loading-container {\n height: 90vh;\n /* puting this in 100vh causes an overflow bug */\n overflow-y: hidden;\n position: relative;\n}\n\n.cweb-crud-page-loading-container .crud-page-loader {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n";
3690
+ styleInject(css_248z$j);
3614
3691
 
3615
3692
  function CRUDPage(_ref) {
3616
3693
  var _ref$dataTestId = _ref.dataTestId,
@@ -3816,8 +3893,12 @@ var PreviewPhone = function PreviewPhone(_ref) {
3816
3893
  }))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
3817
3894
  };
3818
3895
 
3819
- var css_248z$j = ".cweb-radio {\n outline: none;\n}\n\n.cweb-radio .cweb-radio-input {\n -webkit-appearance: none;\n height: 1px;\n opacity: 0;\n width: 1px;\n}\n\n.cweb-radio .cweb-radio-label-text {\n margin-left: 8px;\n -ms-user-select: none;\n user-select: none;\n text-align: left;\n}\n\n.cweb-radio .cweb-radio-label {\n display: flex;\n align-items: center;\n margin-bottom: 0;\n}\n\n.cweb-radio .cweb-radio-icon-container {\n width: 16px;\n height: 16px;\n position: relative;\n border: 1px solid #cccccc;\n border-radius: 50%;\n transition: background-color 0.3s ease-in-out;\n}\n\n.cweb-radio .cweb-radio-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: block;\n}\n\n.cweb-radio.is-focused .cweb-radio-icon-container {\n border-color: #0074dd;\n}\n\n.cweb-radio.is-checked .cweb-radio-icon {\n width: 5px;\n height: 5px;\n background-color: #ffffff;\n border-radius: 50%;\n}\n";
3820
- styleInject(css_248z$j);
3896
+ var css_248z$k = ".cweb-radio {\n outline: none;\n}\n\n.cweb-radio .cweb-radio-input {\n -webkit-appearance: none;\n height: 1px;\n opacity: 0;\n width: 1px;\n}\n\n.cweb-radio .cweb-radio-label-text {\n margin-left: 8px;\n -ms-user-select: none;\n user-select: none;\n text-align: left;\n}\n\n.cweb-radio .cweb-radio-label {\n display: flex;\n align-items: center;\n margin-bottom: 0;\n}\n\n.cweb-radio .cweb-radio-icon-container {\n width: 16px;\n height: 16px;\n position: relative;\n border: 1px solid #cccccc;\n border-radius: 50%;\n transition: background-color 0.3s ease-in-out;\n}\n\n.cweb-radio .cweb-radio-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: block;\n}\n\n.cweb-radio.is-focused .cweb-radio-icon-container {\n border-color: #0074dd;\n}\n\n.cweb-radio.is-checked .cweb-radio-icon {\n width: 5px;\n height: 5px;\n background-color: #ffffff;\n border-radius: 50%;\n}\n";
3897
+ styleInject(css_248z$k);
3898
+
3899
+ /**
3900
+ * @deprecated: use RadioV2 instead
3901
+ */
3821
3902
 
3822
3903
  var Radio = /*#__PURE__*/function (_PureComponent) {
3823
3904
  _inheritsLoose(Radio, _PureComponent);
@@ -3915,10 +3996,13 @@ Radio.propTypes = {
3915
3996
  onChange: PropTypes.func
3916
3997
  };
3917
3998
 
3918
- var css_248z$k = ".cweb-radio-group {\n display: flex;\n justify-content: flex-start;\n flex-direction: row;\n align-items: center;\n}\n\n.cweb-radio-group > .cweb-radio {\n flex: 0 0 auto;\n margin-right: 8px;\n}\n\n.cweb-radio-group .cweb-form-field {\n margin-bottom: 12px;\n}\n\n.cweb-radio-group .cweb-form-info-text {\n margin-left: 1.5rem;\n}\n\n.cweb-radio-group.vertical {\n display: flex;\n justify-content: flex-start;\n flex-direction: column;\n align-items: flex-start;\n}\n\n.cweb-radio-group.vertical .cweb-form-field:not(:last-child) {\n margin-bottom: 8px;\n}\n\n.cweb-radio-group.vertical > .cweb-radio {\n flex: 0 0 auto;\n margin-bottom: 8px;\n}\n\n.cweb-radio-group.hasError > .cweb-radio .cweb-radio-icon-container {\n border: 1px solid #ff6266 !important;\n}\n";
3919
- styleInject(css_248z$k);
3999
+ var css_248z$l = ".cweb-radio-group {\n display: flex;\n justify-content: flex-start;\n flex-direction: row;\n align-items: center;\n}\n\n.cweb-radio-group > .cweb-radio {\n flex: 0 0 auto;\n margin-right: 8px;\n}\n\n.cweb-radio-group .cweb-form-field {\n margin-bottom: 12px;\n}\n\n.cweb-radio-group .cweb-form-info-text {\n margin-left: 1.5rem;\n}\n\n.cweb-radio-group.vertical {\n display: flex;\n justify-content: flex-start;\n flex-direction: column;\n align-items: flex-start;\n}\n\n.cweb-radio-group.vertical .cweb-form-field:not(:last-child) {\n margin-bottom: 8px;\n}\n\n.cweb-radio-group.vertical > .cweb-radio {\n flex: 0 0 auto;\n margin-bottom: 8px;\n}\n\n.cweb-radio-group.hasError > .cweb-radio .cweb-radio-icon-container {\n border: 1px solid #ff6266 !important;\n}\n";
4000
+ styleInject(css_248z$l);
3920
4001
 
3921
4002
  var _excluded$b = ["className", "radioClassName", "name", "selectedOption", "isVertical", "radioOptions", "onChange", "error", "isDisabled"];
4003
+ /**
4004
+ * @deprecated: use RadioV2 instead
4005
+ */
3922
4006
 
3923
4007
  function RadioGroup(_ref) {
3924
4008
  var className = _ref.className,
@@ -3973,8 +4057,8 @@ RadioGroup.propTypes = {
3973
4057
  onChange: PropTypes.func
3974
4058
  };
3975
4059
 
3976
- var css_248z$l = ".cweb-section .cweb-button:last-of-type {\n margin-right: 24px;\n}\n\n.cweb-section .cweb-button:not(:last-of-type) {\n margin-right: 8px;\n}\n\n.cweb-section .cweb-button.add-button, .cweb-section .cweb-button.edit-button, .cweb-section .cweb-button.delete-button {\n margin-left: auto;\n width: 32px;\n height: 32px;\n}\n\n.cweb-section .cweb-button.add-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle cx%3D%2222%22 cy%3D%2222%22 r%3D%2222%22 fill%3D%22white%22%2F%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23009FE3%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M22 32C23.1046 32 24 31.1046 24 30L24 24H30C31.1046 24 32 23.1046 32 22C32 20.8954 31.1046 20 30 20H24L24 14C24 12.8954 23.1046 12 22 12C20.8954 12 20 12.8954 20 14L20 20H14C12.8954 20 12 20.8954 12 22C12 23.1046 12.8954 24 14 24H20L20 30C20 31.1046 20.8954 32 22 32Z%22 fill%3D%22%23009FE3%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-section .cweb-button.add-button:hover, .cweb-section .cweb-button.add-button:active, .cweb-section .cweb-button.add-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%230A78B2%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M21 12C19.8954 12 19 12.8954 19 14V19L14 19C12.8954 19 12 19.8954 12 21V23C12 24.1046 12.8954 25 14 25H19V30C19 31.1046 19.8954 32 21 32H23C24.1046 32 25 31.1046 25 30V25H30C31.1046 25 32 24.1046 32 23V21C32 19.8954 31.1046 19 30 19L25 19V14C25 12.8954 24.1046 12 23 12H21Z%22 fill%3D%22%23007BBB%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-section .cweb-button.edit-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M13.5643 27.1001C13.4169 26.9527 13.1433 27.0159 13.1012 27.2266L12.0065 31.6507C11.9644 31.8614 12.1328 32.051 12.3433 31.9878L16.7851 30.9134C16.9956 30.8712 17.0799 30.5973 16.9114 30.4499L13.5643 27.1001Z%22 fill%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M26.2161 14.1222C26.1109 14.0169 25.9214 14.0169 25.8161 14.1222L14.4484 25.4987C14.3432 25.604 14.3432 25.7936 14.4484 25.8989L18.1114 29.5647C18.2166 29.67 18.4061 29.67 18.5113 29.5647L29.879 18.1882C29.9843 18.0829 29.9843 17.8933 29.879 17.788L26.2161 14.1222Z%22 fill%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M31.1633 12.8374C30.0475 11.7209 28.2161 11.7209 27.1004 12.8374C27.0583 12.8796 27.0583 12.9217 27.1004 12.9638L31.037 16.9035C31.0791 16.9456 31.1212 16.9456 31.1633 16.9035C32.279 15.7869 32.279 13.954 31.1633 12.8374Z%22 fill%3D%22%23009FE3%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-section .cweb-button.edit-button:hover, .cweb-section .cweb-button.edit-button:active, .cweb-section .cweb-button.edit-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23007BBB%22%2F%3E%3Cpath d%3D%22M13.5643 27.1001C13.4169 26.9527 13.1433 27.0159 13.1012 27.2266L12.0065 31.6507C11.9644 31.8614 12.1328 32.051 12.3433 31.9878L16.7851 30.9134C16.9956 30.8712 17.0799 30.5973 16.9114 30.4499L13.5643 27.1001Z%22 fill%3D%22%230A78B2%22%2F%3E%3Cpath d%3D%22M26.2161 14.1222C26.1109 14.0169 25.9214 14.0169 25.8161 14.1222L14.4484 25.4987C14.3432 25.604 14.3432 25.7936 14.4484 25.8989L18.1114 29.5647C18.2166 29.67 18.4061 29.67 18.5113 29.5647L29.879 18.1882C29.9843 18.0829 29.9843 17.8933 29.879 17.788L26.2161 14.1222Z%22 fill%3D%22%230A78B2%22%2F%3E%3Cpath d%3D%22M31.1633 12.8374C30.0475 11.7209 28.2161 11.7209 27.1004 12.8374C27.0583 12.8796 27.0583 12.9217 27.1004 12.9638L31.037 16.9035C31.0791 16.9456 31.1212 16.9456 31.1633 16.9035C32.279 15.7869 32.279 13.954 31.1633 12.8374Z%22 fill%3D%22%230A78B2%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-section .cweb-button.delete-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23FF6266%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 12C12.4477 12 12 12.4477 12 13C12 13.5523 12.4477 14 13 14H31C31.5523 14 32 13.5523 32 13C32 12.4477 31.5523 12 31 12H13ZM14 16H30V30C30 31.1046 29.1046 32 28 32H16C14.8954 32 14 31.1046 14 30V16ZM17 18H19V30H17V18ZM21 18H23V30H21V18ZM27 18H25V30H27V18Z%22 fill%3D%22%23FF6266%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-section .cweb-button.delete-button:hover, .cweb-section .cweb-button.delete-button:active, .cweb-section .cweb-button.delete-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 12C12.4477 12 12 12.4477 12 13C12 13.5523 12.4477 14 13 14H31C31.5523 14 32 13.5523 32 13C32 12.4477 31.5523 12 31 12H13ZM14 16H30V30C30 31.1046 29.1046 32 28 32H16C14.8954 32 14 31.1046 14 30V16ZM17 18H19V30H17V18ZM21 18H23V30H21V18ZM27 18H25V30H27V18Z%22 fill%3D%22%23FC494E%22%2F%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23FC494E%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-section > .cweb-section-header {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n border-bottom: 1px solid #eeeeee;\n width: 100%;\n padding: 18px 24px;\n}\n\n.cweb-section > .cweb-section-footer {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n border-top: 1px solid #eeeeee;\n width: 100%;\n padding: 1rem 24px 1rem 24px;\n}\n\n.cweb-section > .cweb-section-footer img {\n width: 32px;\n height: 32px;\n}\n";
3977
- styleInject(css_248z$l);
4060
+ var css_248z$m = ".cweb-section .cweb-button:last-of-type {\n margin-right: 24px;\n}\n\n.cweb-section .cweb-button:not(:last-of-type) {\n margin-right: 8px;\n}\n\n.cweb-section .cweb-button.add-button, .cweb-section .cweb-button.edit-button, .cweb-section .cweb-button.delete-button {\n margin-left: auto;\n width: 32px;\n height: 32px;\n}\n\n.cweb-section .cweb-button.add-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle cx%3D%2222%22 cy%3D%2222%22 r%3D%2222%22 fill%3D%22white%22%2F%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23009FE3%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M22 32C23.1046 32 24 31.1046 24 30L24 24H30C31.1046 24 32 23.1046 32 22C32 20.8954 31.1046 20 30 20H24L24 14C24 12.8954 23.1046 12 22 12C20.8954 12 20 12.8954 20 14L20 20H14C12.8954 20 12 20.8954 12 22C12 23.1046 12.8954 24 14 24H20L20 30C20 31.1046 20.8954 32 22 32Z%22 fill%3D%22%23009FE3%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-section .cweb-button.add-button:hover, .cweb-section .cweb-button.add-button:active, .cweb-section .cweb-button.add-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%230A78B2%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M21 12C19.8954 12 19 12.8954 19 14V19L14 19C12.8954 19 12 19.8954 12 21V23C12 24.1046 12.8954 25 14 25H19V30C19 31.1046 19.8954 32 21 32H23C24.1046 32 25 31.1046 25 30V25H30C31.1046 25 32 24.1046 32 23V21C32 19.8954 31.1046 19 30 19L25 19V14C25 12.8954 24.1046 12 23 12H21Z%22 fill%3D%22%23007BBB%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-section .cweb-button.edit-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M13.5643 27.1001C13.4169 26.9527 13.1433 27.0159 13.1012 27.2266L12.0065 31.6507C11.9644 31.8614 12.1328 32.051 12.3433 31.9878L16.7851 30.9134C16.9956 30.8712 17.0799 30.5973 16.9114 30.4499L13.5643 27.1001Z%22 fill%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M26.2161 14.1222C26.1109 14.0169 25.9214 14.0169 25.8161 14.1222L14.4484 25.4987C14.3432 25.604 14.3432 25.7936 14.4484 25.8989L18.1114 29.5647C18.2166 29.67 18.4061 29.67 18.5113 29.5647L29.879 18.1882C29.9843 18.0829 29.9843 17.8933 29.879 17.788L26.2161 14.1222Z%22 fill%3D%22%23009FE3%22%2F%3E%3Cpath d%3D%22M31.1633 12.8374C30.0475 11.7209 28.2161 11.7209 27.1004 12.8374C27.0583 12.8796 27.0583 12.9217 27.1004 12.9638L31.037 16.9035C31.0791 16.9456 31.1212 16.9456 31.1633 16.9035C32.279 15.7869 32.279 13.954 31.1633 12.8374Z%22 fill%3D%22%23009FE3%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-section .cweb-button.edit-button:hover, .cweb-section .cweb-button.edit-button:active, .cweb-section .cweb-button.edit-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23007BBB%22%2F%3E%3Cpath d%3D%22M13.5643 27.1001C13.4169 26.9527 13.1433 27.0159 13.1012 27.2266L12.0065 31.6507C11.9644 31.8614 12.1328 32.051 12.3433 31.9878L16.7851 30.9134C16.9956 30.8712 17.0799 30.5973 16.9114 30.4499L13.5643 27.1001Z%22 fill%3D%22%230A78B2%22%2F%3E%3Cpath d%3D%22M26.2161 14.1222C26.1109 14.0169 25.9214 14.0169 25.8161 14.1222L14.4484 25.4987C14.3432 25.604 14.3432 25.7936 14.4484 25.8989L18.1114 29.5647C18.2166 29.67 18.4061 29.67 18.5113 29.5647L29.879 18.1882C29.9843 18.0829 29.9843 17.8933 29.879 17.788L26.2161 14.1222Z%22 fill%3D%22%230A78B2%22%2F%3E%3Cpath d%3D%22M31.1633 12.8374C30.0475 11.7209 28.2161 11.7209 27.1004 12.8374C27.0583 12.8796 27.0583 12.9217 27.1004 12.9638L31.037 16.9035C31.0791 16.9456 31.1212 16.9456 31.1633 16.9035C32.279 15.7869 32.279 13.954 31.1633 12.8374Z%22 fill%3D%22%230A78B2%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-section .cweb-button.delete-button {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23FF6266%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 12C12.4477 12 12 12.4477 12 13C12 13.5523 12.4477 14 13 14H31C31.5523 14 32 13.5523 32 13C32 12.4477 31.5523 12 31 12H13ZM14 16H30V30C30 31.1046 29.1046 32 28 32H16C14.8954 32 14 31.1046 14 30V16ZM17 18H19V30H17V18ZM21 18H23V30H21V18ZM27 18H25V30H27V18Z%22 fill%3D%22%23FF6266%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-section .cweb-button.delete-button:hover, .cweb-section .cweb-button.delete-button:active, .cweb-section .cweb-button.delete-button:focus {\n background: url(\"data:image/svg+xml,%3Csvg width%3D%2244%22 height%3D%2244%22 viewBox%3D%220 0 44 44%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M13 12C12.4477 12 12 12.4477 12 13C12 13.5523 12.4477 14 13 14H31C31.5523 14 32 13.5523 32 13C32 12.4477 31.5523 12 31 12H13ZM14 16H30V30C30 31.1046 29.1046 32 28 32H16C14.8954 32 14 31.1046 14 30V16ZM17 18H19V30H17V18ZM21 18H23V30H21V18ZM27 18H25V30H27V18Z%22 fill%3D%22%23FC494E%22%2F%3E%3Crect x%3D%220.5%22 y%3D%220.5%22 width%3D%2243%22 height%3D%2243%22 rx%3D%2221.5%22 stroke%3D%22%23FC494E%22%2F%3E%3C%2Fsvg%3E\") no-repeat center;\n background-size: contain;\n}\n\n.cweb-section > .cweb-section-header {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n border-bottom: 1px solid #eeeeee;\n width: 100%;\n padding: 18px 24px;\n}\n\n.cweb-section > .cweb-section-footer {\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n align-items: center;\n border-top: 1px solid #eeeeee;\n width: 100%;\n padding: 1rem 24px 1rem 24px;\n}\n\n.cweb-section > .cweb-section-footer img {\n width: 32px;\n height: 32px;\n}\n";
4061
+ styleInject(css_248z$m);
3978
4062
 
3979
4063
  var _excluded$c = ["title", "buttons", "footer", "children", "className", "isLoading", "loadingIndicatorProps"];
3980
4064
  function Section(_ref) {
@@ -4014,8 +4098,8 @@ function Section(_ref) {
4014
4098
  }, footer));
4015
4099
  }
4016
4100
 
4017
- var css_248z$m = ".cweb-list-item {\n display: flex;\n justify-content: flex-start;\n flex-direction: row;\n align-items: center;\n padding: 16px 0 16px 0;\n border-bottom: 1px solid #eeeeee;\n}\n\n.cweb-list-item:last-child {\n border-bottom: none;\n}\n\n.cweb-list-item.cweb-list-item-clickable {\n cursor: pointer;\n}\n\n.cweb-list-item.cweb-list-item-clickable:hover {\n background-color: #f2fafd;\n}\n";
4018
- styleInject(css_248z$m);
4101
+ var css_248z$n = ".cweb-list-item {\n display: flex;\n justify-content: flex-start;\n flex-direction: row;\n align-items: center;\n padding: 16px 0 16px 0;\n border-bottom: 1px solid #eeeeee;\n}\n\n.cweb-list-item:last-child {\n border-bottom: none;\n}\n\n.cweb-list-item.cweb-list-item-clickable {\n cursor: pointer;\n}\n\n.cweb-list-item.cweb-list-item-clickable:hover {\n background-color: #f2fafd;\n}\n";
4102
+ styleInject(css_248z$n);
4019
4103
 
4020
4104
  var _excluded$d = ["children", "className", "onClick"];
4021
4105
  var SectionItem = function SectionItem(props) {
@@ -4163,8 +4247,8 @@ var SettingsMenuButton = function SettingsMenuButton(props) {
4163
4247
  })));
4164
4248
  };
4165
4249
 
4166
- var css_248z$n = ".cweb-switcher-item {\n display: flex;\n justify-content: center;\n flex-direction: row;\n align-items: center;\n}\n\n.cweb-switcher-item .cweb-switcher-item-link {\n display: flex;\n align-items: center;\n text-decoration: none;\n padding: 0.5rem 1rem;\n cursor: pointer;\n}\n\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon {\n display: flex;\n align-items: center;\n}\n\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-default,\n .cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active {\n width: 20px;\n height: 20px;\n}\n\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active {\n display: none;\n}\n\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-text {\n color: #737373;\n transition: color 0.4s ease;\n padding-bottom: 0;\n}\n\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon + .cweb-switcher-item-link-text {\n margin-left: 8px;\n padding: 0;\n}\n\n.cweb-switcher-item.is-selected, .cweb-switcher-item:hover, .cweb-switcher-item:active {\n border-color: #0074dd;\n z-index: 1;\n}\n\n.cweb-switcher-item.is-selected .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-default, .cweb-switcher-item:hover .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-default, .cweb-switcher-item:active .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-default {\n display: none;\n}\n\n.cweb-switcher-item.is-selected .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active, .cweb-switcher-item:hover .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active, .cweb-switcher-item:active .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active {\n display: inherit;\n}\n\n.cweb-switcher-item.is-selected .cweb-switcher-item-link .cweb-switcher-item-link-text, .cweb-switcher-item:hover .cweb-switcher-item-link .cweb-switcher-item-link-text, .cweb-switcher-item:active .cweb-switcher-item-link .cweb-switcher-item-link-text {\n color: #0074dd;\n}\n\n.cweb-switcher-item.is-disabled {\n pointer-events: none;\n}\n";
4167
- styleInject(css_248z$n);
4250
+ var css_248z$o = ".cweb-switcher-item {\n display: flex;\n justify-content: center;\n flex-direction: row;\n align-items: center;\n}\n\n.cweb-switcher-item .cweb-switcher-item-link {\n display: flex;\n align-items: center;\n text-decoration: none;\n padding: 0.5rem 1rem;\n cursor: pointer;\n}\n\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon {\n display: flex;\n align-items: center;\n}\n\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-default,\n .cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active {\n width: 20px;\n height: 20px;\n}\n\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active {\n display: none;\n}\n\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-text {\n color: #737373;\n transition: color 0.4s ease;\n padding-bottom: 0;\n}\n\n.cweb-switcher-item .cweb-switcher-item-link .cweb-switcher-item-link-icon + .cweb-switcher-item-link-text {\n margin-left: 8px;\n padding: 0;\n}\n\n.cweb-switcher-item.is-selected, .cweb-switcher-item:hover, .cweb-switcher-item:active {\n border-color: #0074dd;\n z-index: 1;\n}\n\n.cweb-switcher-item.is-selected .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-default, .cweb-switcher-item:hover .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-default, .cweb-switcher-item:active .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-default {\n display: none;\n}\n\n.cweb-switcher-item.is-selected .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active, .cweb-switcher-item:hover .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active, .cweb-switcher-item:active .cweb-switcher-item-link .cweb-switcher-item-link-icon .cweb-switcher-item-link-icon-active {\n display: inherit;\n}\n\n.cweb-switcher-item.is-selected .cweb-switcher-item-link .cweb-switcher-item-link-text, .cweb-switcher-item:hover .cweb-switcher-item-link .cweb-switcher-item-link-text, .cweb-switcher-item:active .cweb-switcher-item-link .cweb-switcher-item-link-text {\n color: #0074dd;\n}\n\n.cweb-switcher-item.is-disabled {\n pointer-events: none;\n}\n";
4251
+ styleInject(css_248z$o);
4168
4252
 
4169
4253
  SwitcherItem.propTypes = {
4170
4254
  name: PropTypes.string,
@@ -4497,8 +4581,8 @@ var TagGroup = function TagGroup(_ref) {
4497
4581
  }));
4498
4582
  };
4499
4583
 
4500
- var css_248z$o = ".cweb-textarea {\n border: 1px solid #cccccc;\n border-radius: 4px;\n outline: none;\n background-color: #ffffff;\n resize: none;\n}\n\n.cweb-textarea.has-icon {\n background-size: 24px;\n background-position: 10px 10px;\n background-repeat: no-repeat;\n padding-left: 44px;\n}\n\n.cweb-textarea.resizable {\n resize: both;\n}\n\n.cweb-textarea.resizable-x {\n resize: horizontal;\n}\n\n.cweb-textarea.resizable-y {\n resize: vertical;\n}\n\n.cweb-textarea:-ms-input-placeholder {\n color: #737373;\n}\n\n.cweb-textarea::placeholder {\n color: #737373;\n}\n\n.cweb-textarea:-ms-input-placeholder {\n color: #64748b !important;\n}\n\n.cweb-textarea::-ms-input-placeholder {\n color: #64748b;\n}\n\n.cweb-textarea:focus {\n border-color: #0074dd;\n}\n\n.cweb-textarea:disabled {\n cursor: not-allowed;\n}\n\n.cweb-textarea.has-error {\n border: 1px solid #ff6266;\n color: #ff6266;\n}\n";
4501
- styleInject(css_248z$o);
4584
+ var css_248z$p = ".cweb-textarea {\n border: 1px solid #cccccc;\n border-radius: 4px;\n outline: none;\n background-color: #ffffff;\n resize: none;\n}\n\n.cweb-textarea.has-icon {\n background-size: 24px;\n background-position: 10px 10px;\n background-repeat: no-repeat;\n padding-left: 44px;\n}\n\n.cweb-textarea.resizable {\n resize: both;\n}\n\n.cweb-textarea.resizable-x {\n resize: horizontal;\n}\n\n.cweb-textarea.resizable-y {\n resize: vertical;\n}\n\n.cweb-textarea:-ms-input-placeholder {\n color: #737373;\n}\n\n.cweb-textarea::placeholder {\n color: #737373;\n}\n\n.cweb-textarea:-ms-input-placeholder {\n color: #64748b !important;\n}\n\n.cweb-textarea::-ms-input-placeholder {\n color: #64748b;\n}\n\n.cweb-textarea:focus {\n border-color: #0074dd;\n}\n\n.cweb-textarea:disabled {\n cursor: not-allowed;\n}\n\n.cweb-textarea.has-error {\n border: 1px solid #ff6266;\n color: #ff6266;\n}\n";
4585
+ styleInject(css_248z$p);
4502
4586
 
4503
4587
  var _excluded$f = ["className", "value", "name", "placeholder", "maxLength", "rows", "resizable", "isDisabled", "icon", "onChange", "onBlur", "onFocus", "onKeyPress", "onKeyDown", "onCtrlEnter"];
4504
4588
  var RESIZE_TYPES = {
@@ -4585,8 +4669,8 @@ function Textarea(props) {
4585
4669
  }));
4586
4670
  }
4587
4671
 
4588
- var css_248z$p = ".ql-editor {\n resize: vertical;\n min-height: 10rem;\n}\n\n.ql-snow.ql-toolbar {\n display: block;\n background: #f1f5f9;\n border-top-left-radius: 0.5em;\n border-top-right-radius: 0.5em;\n margin-top: 0.5em;\n}\n";
4589
- styleInject(css_248z$p);
4672
+ var css_248z$q = ".ql-editor {\n resize: vertical;\n min-height: 10rem;\n}\n\n.ql-snow.ql-toolbar {\n display: block;\n background: #f1f5f9;\n border-top-left-radius: 0.5em;\n border-top-right-radius: 0.5em;\n margin-top: 0.5em;\n}\n";
4673
+ styleInject(css_248z$q);
4590
4674
 
4591
4675
  function TextEditor(_ref) {
4592
4676
  var defaultValue = _ref.defaultValue,
@@ -4640,8 +4724,8 @@ TextEditor.propTypes = {
4640
4724
  onValueChange: PropTypes.func.isRequired
4641
4725
  };
4642
4726
 
4643
- var css_248z$q = ".editor .rdw-editor {\n overflow-y: auto;\n}\n\n.editor .rdw-editor .rdw-link-modal {\n width: 20rem;\n height: 19rem;\n}\n\n.editor .rdw-editor .rdw-link-modal .rdw-link-modal-label,\n .editor .rdw-editor .rdw-link-modal .rdw-link-modal-target-option {\n font-weight: normal;\n}\n\n.editor .rdw-editor .rdw-link-modal .rdw-link-modal-input {\n margin-bottom: 1rem;\n font-size: 16px;\n font-weight: normal;\n line-height: 21px;\n color: #2d2d2d;\n height: 44px;\n border: 1px solid #cccccc;\n border-radius: 4px;\n outline: none;\n background-color: #ffffff;\n padding: 12px;\n caret-color: #0a78b2;\n}\n\n.editor .rdw-editor .rdw-link-modal .rdw-link-modal-buttonsection {\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n}\n\n.editor .rdw-editor .rdw-link-modal .rdw-link-modal-buttonsection .rdw-link-modal-btn {\n border-radius: 1.375rem;\n width: 6.5rem;\n height: 2.75rem;\n border: 1px solid #009fe3;\n background-color: transparent;\n color: #009fe3;\n}\n\n.editor .rdw-editor .rdw-link-modal .rdw-link-modal-buttonsection .rdw-link-modal-btn:first-child,\n .editor .rdw-editor .rdw-link-modal .rdw-link-modal-buttonsection .rdw-link-modal-btn:disabled {\n background: #009fe3;\n color: #ffffff;\n}\n\n.editor .rdw-editor .rdw-embedded-modal {\n width: 22rem;\n height: 15rem;\n}\n\n.editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-link-input,\n .editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-size-input {\n font-size: 16px;\n font-weight: normal;\n line-height: 21px;\n color: #2d2d2d;\n height: 44px;\n border: 1px solid #cccccc;\n border-radius: 4px;\n outline: none;\n background-color: #ffffff;\n padding: 12px;\n caret-color: #0a78b2;\n}\n\n.editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-link-input {\n width: 100%;\n}\n\n.editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-size-input {\n width: 90%;\n}\n\n.editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-btn-section {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-btn-section .rdw-embedded-modal-btn {\n border-radius: 1.375rem;\n width: 6.5rem;\n height: 2.75rem;\n border: 1px solid #009fe3;\n background-color: transparent;\n color: #009fe3;\n}\n\n.editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-btn-section .rdw-embedded-modal-btn:first-child,\n .editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-btn-section .rdw-embedded-modal-btn:disabled {\n background: #009fe3;\n color: #ffffff;\n}\n\n.editor .rdw-editor .rdw-editor-main {\n min-height: 14rem;\n overflow: hidden;\n}\n\n.editor .rdw-editor .rdw-editor-main .DraftEditor-root {\n margin: 0 12px;\n}\n";
4644
- styleInject(css_248z$q);
4727
+ var css_248z$r = ".editor .rdw-editor {\n overflow-y: auto;\n}\n\n.editor .rdw-editor .rdw-link-modal {\n width: 20rem;\n height: 19rem;\n}\n\n.editor .rdw-editor .rdw-link-modal .rdw-link-modal-label,\n .editor .rdw-editor .rdw-link-modal .rdw-link-modal-target-option {\n font-weight: normal;\n}\n\n.editor .rdw-editor .rdw-link-modal .rdw-link-modal-input {\n margin-bottom: 1rem;\n font-size: 16px;\n font-weight: normal;\n line-height: 21px;\n color: #2d2d2d;\n height: 44px;\n border: 1px solid #cccccc;\n border-radius: 4px;\n outline: none;\n background-color: #ffffff;\n padding: 12px;\n caret-color: #0a78b2;\n}\n\n.editor .rdw-editor .rdw-link-modal .rdw-link-modal-buttonsection {\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n}\n\n.editor .rdw-editor .rdw-link-modal .rdw-link-modal-buttonsection .rdw-link-modal-btn {\n border-radius: 1.375rem;\n width: 6.5rem;\n height: 2.75rem;\n border: 1px solid #009fe3;\n background-color: transparent;\n color: #009fe3;\n}\n\n.editor .rdw-editor .rdw-link-modal .rdw-link-modal-buttonsection .rdw-link-modal-btn:first-child,\n .editor .rdw-editor .rdw-link-modal .rdw-link-modal-buttonsection .rdw-link-modal-btn:disabled {\n background: #009fe3;\n color: #ffffff;\n}\n\n.editor .rdw-editor .rdw-embedded-modal {\n width: 22rem;\n height: 15rem;\n}\n\n.editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-link-input,\n .editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-size-input {\n font-size: 16px;\n font-weight: normal;\n line-height: 21px;\n color: #2d2d2d;\n height: 44px;\n border: 1px solid #cccccc;\n border-radius: 4px;\n outline: none;\n background-color: #ffffff;\n padding: 12px;\n caret-color: #0a78b2;\n}\n\n.editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-link-input {\n width: 100%;\n}\n\n.editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-size-input {\n width: 90%;\n}\n\n.editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-btn-section {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-btn-section .rdw-embedded-modal-btn {\n border-radius: 1.375rem;\n width: 6.5rem;\n height: 2.75rem;\n border: 1px solid #009fe3;\n background-color: transparent;\n color: #009fe3;\n}\n\n.editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-btn-section .rdw-embedded-modal-btn:first-child,\n .editor .rdw-editor .rdw-embedded-modal .rdw-embedded-modal-btn-section .rdw-embedded-modal-btn:disabled {\n background: #009fe3;\n color: #ffffff;\n}\n\n.editor .rdw-editor .rdw-editor-main {\n min-height: 14rem;\n overflow: hidden;\n}\n\n.editor .rdw-editor .rdw-editor-main .DraftEditor-root {\n margin: 0 12px;\n}\n";
4728
+ styleInject(css_248z$r);
4645
4729
 
4646
4730
  var TextEditorV2 = function TextEditorV2(_ref) {
4647
4731
  var defaultValue = _ref.defaultValue,
@@ -4783,13 +4867,492 @@ var SearchIcon = function SearchIcon(props) {
4783
4867
  }));
4784
4868
  };
4785
4869
 
4786
- var SearchInput = function SearchInput(props) {
4870
+ var SearchInput = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
4787
4871
  return /*#__PURE__*/React__default.createElement(Input, Object.assign({}, props, {
4788
4872
  icon: SearchIcon,
4789
4873
  type: "text",
4790
- clearable: true
4874
+ clearable: true,
4875
+ ref: ref
4876
+ }));
4877
+ });
4878
+
4879
+ /**
4880
+ * Decorator for any input component. Adds a label and additional information to be shown.
4881
+ *
4882
+ * Includes the default error handling from react-hook-form.
4883
+ */
4884
+
4885
+ function FormFieldDecorator(_ref) {
4886
+ var name = _ref.name,
4887
+ children = _ref.children,
4888
+ label = _ref.label,
4889
+ fieldRequired = _ref.fieldRequired,
4890
+ info = _ref.info,
4891
+ fieldErrors = _ref.fieldErrors,
4892
+ decoratorClassname = _ref.decoratorClassname;
4893
+ return /*#__PURE__*/React__default.createElement("div", {
4894
+ className: classNames(decoratorClassname)
4895
+ }, label && /*#__PURE__*/React__default.createElement("label", {
4896
+ className: "cweb-form-field-label block mb-1",
4897
+ htmlFor: name,
4898
+ "data-is-required": fieldRequired
4899
+ }, /*#__PURE__*/React__default.createElement(Text, {
4900
+ className: "cweb-form-field-label-text",
4901
+ inline: true,
4902
+ text: label
4903
+ })), /*#__PURE__*/React__default.createElement("fieldset", {
4904
+ className: "cweb-form-fieldset"
4905
+ }, children), info && /*#__PURE__*/React__default.createElement(Text, {
4906
+ className: "mt-1 cweb-form-info-text",
4907
+ type: "sm",
4908
+ color: "slate-500",
4909
+ text: info
4910
+ }), /*#__PURE__*/React__default.createElement(errorMessage.ErrorMessage, {
4911
+ errors: fieldErrors,
4912
+ name: name,
4913
+ render: function render(_ref2) {
4914
+ var messages = _ref2.messages;
4915
+ return messages && Object.entries(messages).map(function (_ref3) {
4916
+ var key = _ref3[0],
4917
+ message = _ref3[1];
4918
+ return /*#__PURE__*/React__default.createElement(Text, {
4919
+ key: key,
4920
+ className: "mt-1",
4921
+ text: message,
4922
+ color: "red"
4923
+ });
4924
+ });
4925
+ }
4791
4926
  }));
4927
+ }
4928
+
4929
+ var hasError = function hasError(name, errors) {
4930
+ return !!(name && errors && name in errors);
4792
4931
  };
4932
+ var isRequired = function isRequired(options) {
4933
+ return !!(options && "required" in options);
4934
+ };
4935
+
4936
+ var _excluded$h = ["name", "fieldErrors", "fieldRequired", "label", "info", "decoratorClassname"];
4937
+ /**
4938
+ * Input field that can be used in any react-hook-form context.
4939
+ */
4940
+
4941
+ var FormInputInner = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
4942
+ var name = _ref.name,
4943
+ fieldErrors = _ref.fieldErrors,
4944
+ fieldRequired = _ref.fieldRequired,
4945
+ label = _ref.label,
4946
+ info = _ref.info,
4947
+ decoratorClassname = _ref.decoratorClassname,
4948
+ fieldProps = _objectWithoutPropertiesLoose(_ref, _excluded$h);
4949
+
4950
+ return /*#__PURE__*/React__default.createElement(FormFieldDecorator, {
4951
+ name: name,
4952
+ fieldErrors: fieldErrors,
4953
+ fieldRequired: fieldRequired,
4954
+ label: label,
4955
+ info: info,
4956
+ decoratorClassname: decoratorClassname
4957
+ }, /*#__PURE__*/React__default.createElement(Input, Object.assign({}, fieldProps, {
4958
+ isError: hasError(name, fieldErrors),
4959
+ ref: ref,
4960
+ name: name
4961
+ })));
4962
+ });
4963
+ var FormInput = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
4964
+ return /*#__PURE__*/React__default.createElement(FormInputInner, Object.assign({}, props, {
4965
+ ref: ref
4966
+ }));
4967
+ });
4968
+
4969
+ var css_248z$s = ".radio-form-field-label input[type=\"radio\"]:checked + .radio-circle {\n --bg-opacity: 1;\n background-color: #0074DD;\n background-color: rgba(0, 116, 221, var(--bg-opacity));\n}\n\n.radio-form-field-label[data-has-error=\"true\"] .radio-circle {\n --border-opacity: 1;\n border-color: #c53030;\n border-color: rgba(197, 48, 48, var(--border-opacity));\n outline: 4px solid rgba(255, 98, 102, 0.3);\n outline-offset: 0;\n}\n\n.radio-form-field-label\n input[type=\"radio\"]:checked\n + .radio-circle\n .radio-inner-circle {\n --bg-opacity: 1;\n background-color: #fff;\n background-color: rgba(255, 255, 255, var(--bg-opacity));\n}\n";
4970
+ styleInject(css_248z$s);
4971
+
4972
+ var _excluded$i = ["text", "info", "isError", "innerRef", "className"];
4973
+
4974
+ function RadioInner(_ref) {
4975
+ var text = _ref.text,
4976
+ info = _ref.info,
4977
+ isError = _ref.isError,
4978
+ innerRef = _ref.innerRef,
4979
+ className = _ref.className,
4980
+ otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$i);
4981
+
4982
+ var value = otherProps.value,
4983
+ disabled = otherProps.disabled;
4984
+ var nameHtmlFor = "field-" + value;
4985
+ return /*#__PURE__*/React__default.createElement("label", {
4986
+ className: "radio-form-field-label leading-tight",
4987
+ htmlFor: nameHtmlFor,
4988
+ "data-has-error": isError,
4989
+ "data-test-id": nameHtmlFor
4990
+ }, /*#__PURE__*/React__default.createElement("div", {
4991
+ className: "flex flex-row items-center "
4992
+ }, /*#__PURE__*/React__default.createElement("input", Object.assign({}, otherProps, {
4993
+ className: classNames("appearance-none", className),
4994
+ ref: innerRef,
4995
+ type: "radio",
4996
+ id: nameHtmlFor,
4997
+ disabled: disabled
4998
+ })), /*#__PURE__*/React__default.createElement("span", {
4999
+ className: classNames("flex flex-col items-center justify-center w-4 h-4 transition-colors duration-300 ease-in-out border radio-circle rounded-xl border-slate-300")
5000
+ }, /*#__PURE__*/React__default.createElement("span", {
5001
+ className: "block transition-colors duration-300 ease-in-out radio-inner-circle w-1.5 h-1.5 rounded-xl"
5002
+ })), text && /*#__PURE__*/React__default.createElement("div", {
5003
+ className: "ml-2"
5004
+ }, /*#__PURE__*/React__default.createElement(Text, {
5005
+ inline: true,
5006
+ text: text,
5007
+ type: "base",
5008
+ color: disabled ? "slate-500" : undefined
5009
+ }))), info && /*#__PURE__*/React__default.createElement(Text, {
5010
+ inline: true,
5011
+ className: "ml-6",
5012
+ text: info,
5013
+ type: "sm",
5014
+ color: disabled ? "slate-200" : "slate-500"
5015
+ }));
5016
+ }
5017
+ /**
5018
+ * TODO: The CSS styling is all messed up, including isError
5019
+ * Warning: don't use this prop before this is resolved
5020
+ * Issue to track: https://github.com/Luscii/web-ui/issues/57
5021
+ * TODO: remove this comment once this is resolved
5022
+ */
5023
+
5024
+
5025
+ var RadioV2 = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
5026
+ return /*#__PURE__*/React__default.createElement(RadioInner, Object.assign({}, props, {
5027
+ innerRef: ref
5028
+ }));
5029
+ });
5030
+
5031
+ var _excluded$j = ["innerRef", "options"];
5032
+
5033
+ function RadioGroupInner(_ref) {
5034
+ var innerRef = _ref.innerRef,
5035
+ options = _ref.options,
5036
+ registerProps = _objectWithoutPropertiesLoose(_ref, _excluded$j);
5037
+
5038
+ return /*#__PURE__*/React__default.createElement("div", {
5039
+ className: classNames("flex flex-col space-y-2")
5040
+ }, options.map(function (option) {
5041
+ return /*#__PURE__*/React__default.createElement(RadioV2, Object.assign({
5042
+ key: option.value
5043
+ }, option, registerProps, {
5044
+ ref: innerRef
5045
+ }));
5046
+ }));
5047
+ }
5048
+
5049
+ var RadioGroupV2 = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
5050
+ return /*#__PURE__*/React__default.createElement(RadioGroupInner, Object.assign({}, props, {
5051
+ innerRef: ref
5052
+ }));
5053
+ });
5054
+
5055
+ var _excluded$k = ["innerRef", "name", "fieldErrors", "fieldRequired", "label", "info", "decoratorClassname"];
5056
+ /**
5057
+ * Input field that can be used in any react-hook-form context.
5058
+ */
5059
+
5060
+ function FormRadioGroupInner(_ref) {
5061
+ var innerRef = _ref.innerRef,
5062
+ name = _ref.name,
5063
+ fieldErrors = _ref.fieldErrors,
5064
+ fieldRequired = _ref.fieldRequired,
5065
+ label = _ref.label,
5066
+ info = _ref.info,
5067
+ decoratorClassname = _ref.decoratorClassname,
5068
+ fieldProps = _objectWithoutPropertiesLoose(_ref, _excluded$k);
5069
+
5070
+ return /*#__PURE__*/React__default.createElement(FormFieldDecorator, {
5071
+ name: name,
5072
+ fieldErrors: fieldErrors,
5073
+ fieldRequired: fieldRequired,
5074
+ label: label,
5075
+ info: info,
5076
+ decoratorClassname: decoratorClassname
5077
+ }, /*#__PURE__*/React__default.createElement(RadioGroupV2, Object.assign({}, fieldProps, {
5078
+ isError: hasError(name, fieldErrors),
5079
+ ref: innerRef,
5080
+ name: name
5081
+ })));
5082
+ }
5083
+
5084
+ var FormRadioGroup = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
5085
+ return /*#__PURE__*/React__default.createElement(FormRadioGroupInner, Object.assign({}, props, {
5086
+ innerRef: ref
5087
+ }));
5088
+ });
5089
+
5090
+ var _excluded$l = ["isError", "styles", "options", "onChange", "value", "isMulti", "className"];
5091
+
5092
+ function generateCustomStyles$1(hasError, isIE11) {
5093
+ return {
5094
+ option: function option(baseStyles, state) {
5095
+ return _extends({}, baseStyles, {
5096
+ fontWeight: state.isSelected ? "bold" : "normal",
5097
+ fontSize: "14px",
5098
+ backgroundColor: "none",
5099
+ color: "inherit",
5100
+ position: "relative",
5101
+ padding: "0.75rem",
5102
+ opacity: state.isDisabled ? "0.5" : 1,
5103
+ "&:after": {
5104
+ visibility: state.isSelected ? "visible" : "hidden"
5105
+ },
5106
+ transition: "background-color 0.3s ease-in-out",
5107
+ "&:hover": {
5108
+ // tailwind blue-50
5109
+ backgroundColor: state.isSelected ? "transparent" : "#F2FAFD"
5110
+ },
5111
+ pointerEvents: state.isDisabled ? "none" : "auto"
5112
+ });
5113
+ },
5114
+ container: function container(baseStyles) {
5115
+ return _extends({}, baseStyles, {
5116
+ flexGrow: isIE11 ? 0.5 : "initial"
5117
+ });
5118
+ },
5119
+ control: function control(baseStyles, state) {
5120
+ var defaultBorderColor = state.isFocused ? "#045baa" : "#D1D5DB";
5121
+ var validatedBorderColor = hasError ? "#c53030" : defaultBorderColor;
5122
+ var defaultOutline = hasError ? "rgba(255, 98, 102, 0.3)" : "rgba(0, 159, 227, 0.3)";
5123
+ var validatedOutline = "4px solid " + (state.isFocused ? defaultOutline : "transparent");
5124
+ return _extends({}, baseStyles, {
5125
+ fontSize: "14px",
5126
+ transition: "border 0.3s ease-in-out",
5127
+ height: isIE11 ? "50px" : "2.75rem",
5128
+ // primary outline
5129
+ outline: validatedOutline,
5130
+ borderColor: validatedBorderColor,
5131
+ borderWidth: "1px !important",
5132
+ borderStyle: "solid",
5133
+ borderRadius: "4px",
5134
+ boxShadow: "0px 1px 2px rgba(0, 0, 0, 0.05)",
5135
+ "&:hover": {
5136
+ borderColor: "#9CA3AF",
5137
+ // selector for the chevron
5138
+ "> [class*=\"IndicatorsContainer\"]": {
5139
+ opacity: 1
5140
+ }
5141
+ }
5142
+ });
5143
+ },
5144
+ // The placeholder has the following css prop: grid-area: 1/1/2/3;
5145
+ // And grid-area doesn't work on IE11, so we need to style it slightly different.
5146
+ placeholder: function placeholder(baseStyles) {
5147
+ return _extends({}, baseStyles, {
5148
+ fontWeight: 100,
5149
+ color: "#6B7280",
5150
+ paddingTop: isIE11 ? "1.2rem" : undefined
5151
+ });
5152
+ },
5153
+ singleValue: function singleValue(baseStyles) {
5154
+ return _extends({}, baseStyles, {
5155
+ paddingTop: isIE11 ? "1.2rem" : undefined,
5156
+ fontSize: "14px"
5157
+ });
5158
+ },
5159
+ indicatorSeparator: function indicatorSeparator() {
5160
+ return {
5161
+ display: "none"
5162
+ };
5163
+ },
5164
+ menu: function menu(baseStyles) {
5165
+ return _extends({}, baseStyles, {
5166
+ zIndex: 20
5167
+ });
5168
+ }
5169
+ };
5170
+ }
5171
+ /**
5172
+ * A wrapper around react-select to style it according to our design specification.
5173
+ *
5174
+ * In addition, the value is taken out of the option, instead of returning the complete option.
5175
+ *
5176
+ * Care when using grouped options: the value of the options overspanning all groups need to be unique!
5177
+ * For instance, if you have an option with value "chocolate" in both the groups "flavor" and "dip", then you get unforeseen errors.
5178
+ * This is a problem within react-select itself, not our wrapper.
5179
+ *
5180
+ * Care when using defaultValue: this still requires the complete Option (instead of the value of the Option).
5181
+ * So far there wasn't a use-case for this.
5182
+ */
5183
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5184
+
5185
+
5186
+ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef) {
5187
+ var _ref$isError = _ref.isError,
5188
+ isError = _ref$isError === void 0 ? false : _ref$isError,
5189
+ styles = _ref.styles,
5190
+ options = _ref.options,
5191
+ onChange = _ref.onChange,
5192
+ value = _ref.value,
5193
+ isMulti = _ref.isMulti,
5194
+ className = _ref.className,
5195
+ otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$l);
5196
+
5197
+ var isIE11 = "MSInputMethodContext" in window && "documentMode" in document;
5198
+ var customStyles = generateCustomStyles$1(isError, isIE11);
5199
+ var mergedStyles = ReactSelect.mergeStyles(customStyles, styles); // the options can be either a list of options or a grouped list of options
5200
+ // this is a typechecker to verify it is the case.
5201
+
5202
+ var isOptionsGrouped = !options ? false : options.reduce(function (acc, o) {
5203
+ return acc || "options" in o && !("values" in o);
5204
+ }, false); // we subsequently flatmap to ensure it's always a list of options
5205
+
5206
+ var flatmappedOptions = !options ? [] : isOptionsGrouped ? options.flatMap(function (g) {
5207
+ return g.options;
5208
+ }) : options; // based on: https://stackoverflow.com/a/70022957
5209
+
5210
+ var onChangeWrapped = !onChange ? undefined : isMulti ? function (val, a) {
5211
+ return onChange(val.map(function (v) {
5212
+ return v.value;
5213
+ }), a);
5214
+ } : function (val, a) {
5215
+ return onChange(val == null ? void 0 : val.value, a);
5216
+ }; // TODO: how can we report the error if a value was given that is not within the options?
5217
+
5218
+ var valueWrapped = !value || !options ? value : isMulti ? flatmappedOptions.filter(function (o) {
5219
+ return value.includes(o.value);
5220
+ }) : flatmappedOptions.find(function (o) {
5221
+ return o.value === value;
5222
+ });
5223
+ return /*#__PURE__*/React__default.createElement(ReactSelect__default, Object.assign({}, otherProps, {
5224
+ ref: innerRef,
5225
+ styles: mergedStyles,
5226
+ options: options,
5227
+ onChange: onChangeWrapped,
5228
+ value: valueWrapped,
5229
+ isMulti: isMulti,
5230
+ className: classNames("customized-select", className)
5231
+ }));
5232
+ });
5233
+
5234
+ var _excluded$m = ["control", "name", "rules", "fieldErrors", "fieldRequired", "label", "info", "decoratorClassname"];
5235
+
5236
+ var FormSelect = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef) {
5237
+ var control = _ref.control,
5238
+ name = _ref.name,
5239
+ rules = _ref.rules,
5240
+ fieldErrors = _ref.fieldErrors,
5241
+ fieldRequired = _ref.fieldRequired,
5242
+ label = _ref.label,
5243
+ info = _ref.info,
5244
+ decoratorClassname = _ref.decoratorClassname,
5245
+ selectProps = _objectWithoutPropertiesLoose(_ref, _excluded$m);
5246
+
5247
+ return /*#__PURE__*/React__default.createElement(FormFieldDecorator, {
5248
+ name: name,
5249
+ fieldErrors: fieldErrors,
5250
+ fieldRequired: fieldRequired,
5251
+ label: label,
5252
+ info: info,
5253
+ decoratorClassname: decoratorClassname
5254
+ }, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
5255
+ name: name,
5256
+ control: control,
5257
+ rules: rules,
5258
+ render: function render(_ref2) {
5259
+ var field = _ref2.field;
5260
+ return /*#__PURE__*/React__default.createElement(Select, Object.assign({}, selectProps, field, {
5261
+ isError: hasError(name, fieldErrors),
5262
+ ref: innerRef
5263
+ }));
5264
+ }
5265
+ }));
5266
+ });
5267
+
5268
+ var _excluded$n = ["type", "name", "options", "fieldProps"];
5269
+ /**
5270
+ * Create a straight forward Form.
5271
+ *
5272
+ * TODO: wrap this in some Page component to style the div and buttons
5273
+ * WARNING: don't use this component before some styling errors are resolved.
5274
+ */
5275
+
5276
+ function Form(_ref) {
5277
+ var fields = _ref.fields,
5278
+ onValid = _ref.onValid,
5279
+ onError = _ref.onError,
5280
+ defaultValues = _ref.defaultValues;
5281
+
5282
+ var _useForm = reactHookForm.useForm({
5283
+ criteriaMode: "all",
5284
+ defaultValues: defaultValues
5285
+ }),
5286
+ register = _useForm.register,
5287
+ handleSubmit = _useForm.handleSubmit,
5288
+ control = _useForm.control,
5289
+ errors = _useForm.formState.errors;
5290
+
5291
+ var fieldMapper = function fieldMapper(_ref2) {
5292
+ var type = _ref2.type,
5293
+ name = _ref2.name,
5294
+ options = _ref2.options,
5295
+ _ref2$fieldProps = _ref2.fieldProps,
5296
+ fieldProps = _ref2$fieldProps === void 0 ? {} : _ref2$fieldProps,
5297
+ decoratorProps = _objectWithoutPropertiesLoose(_ref2, _excluded$n);
5298
+
5299
+ switch (type) {
5300
+ case "text":
5301
+ case "number":
5302
+ case "email":
5303
+ case "password":
5304
+ return /*#__PURE__*/React__default.createElement(FormInput, Object.assign({
5305
+ key: name
5306
+ }, decoratorProps, {
5307
+ fieldRequired: isRequired(options),
5308
+ fieldErrors: errors
5309
+ }, fieldProps, register(name, options), {
5310
+ type: type || "text"
5311
+ }));
5312
+
5313
+ case "select":
5314
+ return /*#__PURE__*/React__default.createElement(FormSelect, Object.assign({
5315
+ key: name
5316
+ }, decoratorProps, {
5317
+ fieldRequired: isRequired(options),
5318
+ fieldErrors: errors
5319
+ }, fieldProps, {
5320
+ control: control,
5321
+ rules: options,
5322
+ name: name
5323
+ }));
5324
+
5325
+ case "radioGroup":
5326
+ return /*#__PURE__*/React__default.createElement(FormRadioGroup, Object.assign({
5327
+ key: name
5328
+ }, decoratorProps, {
5329
+ fieldRequired: isRequired(options),
5330
+ fieldErrors: errors
5331
+ }, fieldProps, register(name, options)));
5332
+
5333
+ default:
5334
+ return undefined;
5335
+ }
5336
+ };
5337
+
5338
+ return /*#__PURE__*/React__default.createElement("div", {
5339
+ className: "space-y-4"
5340
+ }, fields.map(function (props) {
5341
+ if (props.type === "row") {
5342
+ var rowFields = props.fields,
5343
+ key = props.key;
5344
+ return /*#__PURE__*/React__default.createElement("div", {
5345
+ className: "flex flex-row",
5346
+ key: key
5347
+ }, rowFields.map(fieldMapper));
5348
+ }
5349
+
5350
+ return fieldMapper(props);
5351
+ }), /*#__PURE__*/React__default.createElement(PrimaryButton, {
5352
+ onClick: handleSubmit(onValid, onError),
5353
+ text: "submit"
5354
+ }));
5355
+ }
4793
5356
 
4794
5357
  var AlertsIcon = function AlertsIcon(props) {
4795
5358
  return /*#__PURE__*/React__default.createElement("svg", {
@@ -5592,6 +6155,7 @@ exports.EmptyStateDashboardIcon = EmptyStateDashboardIcon;
5592
6155
  exports.ErrorBlock = ErrorBlock;
5593
6156
  exports.ExclamationMarkIcon = ExclamationMarkIcon;
5594
6157
  exports.EyeIcon = EyeIcon;
6158
+ exports.Form = Form;
5595
6159
  exports.GearIcon = GearIcon;
5596
6160
  exports.GroupIcon = GroupIcon;
5597
6161
  exports.HamburgerIcon = HamburgerIcon;