@spothero/ui 22.4.0 → 22.5.2

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.
package/dist/index.cjs.js CHANGED
@@ -47460,7 +47460,6 @@ var controlStyles = {
47460
47460
  },
47461
47461
  _invalid: {
47462
47462
  '&:focus': {
47463
- borderBottomRadius: 0,
47464
47463
  borderColor: 'primary.default'
47465
47464
  },
47466
47465
  '&:focus + label': {
@@ -47510,7 +47509,9 @@ var controlStyles = {
47510
47509
  margin: 0,
47511
47510
  marginLeft: '1px'
47512
47511
  // marginTop: 2
47513
- })
47512
+ }),
47513
+ // Styling for async select
47514
+ '.chakra-input__group:has(.fe-ui-async-select__single-value) label': _objectSpread2$1({}, activeLabelStyles)
47514
47515
  },
47515
47516
  _focusWithin: {
47516
47517
  label: _objectSpread2$1({}, activeLabelStyles),
@@ -47775,422 +47776,117 @@ Button.propTypes = {
47775
47776
  buttonValue: PropTypes__default.default.string
47776
47777
  };
47777
47778
 
47778
- var _excluded$c = ["defaultChecked", "isChecked", "isDisabled", "value", "helperText", "children", "size"];
47779
- var Radio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
47780
- var defaultChecked = _ref.defaultChecked,
47781
- isChecked = _ref.isChecked,
47782
- isDisabled = _ref.isDisabled,
47783
- value = _ref.value,
47784
- helperText = _ref.helperText,
47785
- children = _ref.children,
47786
- _ref$size = _ref.size,
47787
- size = _ref$size === void 0 ? 'md' : _ref$size,
47788
- props = _objectWithoutProperties$1(_ref, _excluded$c);
47789
- var helperTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
47790
- return /*#__PURE__*/React__namespace.default.createElement(Radio$1, _extends$K({
47791
- ref: ref,
47792
- defaultChecked: defaultChecked,
47793
- isChecked: isChecked,
47794
- isDisabled: isDisabled,
47795
- isFocusable: !isDisabled,
47796
- value: value,
47797
- size: size
47798
- }, props), children, helperText && /*#__PURE__*/React__namespace.default.createElement(Box, {
47799
- color: "gray.600",
47800
- fontSize: helperTextSize
47801
- }, helperText));
47802
- });
47803
- Radio.propTypes = {
47804
- children: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]).isRequired,
47805
- defaultChecked: PropTypes__default.default.bool,
47806
- isChecked: PropTypes__default.default.bool,
47807
- isDisabled: PropTypes__default.default.bool,
47808
- value: PropTypes__default.default.string.isRequired,
47809
- helperText: PropTypes__default.default.string,
47810
- size: PropTypes__default.default.oneOf(['sm', 'md', 'lg'])
47779
+ var isBrowser$2 = typeof document !== 'undefined';
47780
+ var syncFallback = function syncFallback(create) {
47781
+ return create();
47811
47782
  };
47783
+ var useInsertionEffect = React__namespace['useInsertion' + 'Effect'] ? React__namespace['useInsertion' + 'Effect'] : false;
47784
+ var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
47785
+ var useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;
47812
47786
 
47813
- var _excluded$b = ["label", "errorMessage", "defaultValue", "isDisabled", "isInvalid", "isRequired", "name", "onChange", "value", "children", "direction"];
47814
- var RadioGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
47815
- var label = _ref.label,
47816
- errorMessage = _ref.errorMessage,
47817
- defaultValue = _ref.defaultValue,
47818
- isDisabled = _ref.isDisabled,
47819
- isInvalid = _ref.isInvalid,
47820
- isRequired = _ref.isRequired,
47821
- name = _ref.name,
47822
- onChange = _ref.onChange,
47823
- value = _ref.value,
47824
- children = _ref.children,
47825
- direction = _ref.direction,
47826
- props = _objectWithoutProperties$1(_ref, _excluded$b);
47827
- return /*#__PURE__*/React__namespace.default.createElement(FormControl$1, {
47828
- isInvalid: isInvalid,
47829
- isDisabled: isDisabled,
47830
- isRequired: isRequired,
47831
- errorMessage: errorMessage,
47832
- label: label,
47833
- inputId: props.id,
47834
- isFieldset: true
47835
- }, /*#__PURE__*/React__namespace.default.createElement(RadioGroup$1, _extends$K({
47836
- ref: ref,
47837
- defaultValue: defaultValue,
47838
- name: name,
47839
- onChange: onChange,
47840
- value: value
47841
- }, props), /*#__PURE__*/React__namespace.default.createElement(Stack, {
47842
- direction: direction ? direction : 'column',
47843
- spacing: direction === 'row' ? 8 : 4
47844
- }, children)));
47845
- });
47846
- RadioGroup.propTypes = {
47847
- children: PropTypes__default.default.node,
47848
- defaultValue: PropTypes__default.default.string,
47849
- id: PropTypes__default.default.string.isRequired,
47850
- label: PropTypes__default.default.string,
47851
- errorMessage: PropTypes__default.default.string,
47852
- isDisabled: PropTypes__default.default.bool,
47853
- isInvalid: PropTypes__default.default.bool,
47854
- isRequired: PropTypes__default.default.bool,
47855
- name: PropTypes__default.default.string,
47856
- onChange: PropTypes__default.default.func,
47857
- value: PropTypes__default.default.string,
47858
- direction: PropTypes__default.default.oneOf(['row', 'column'])
47787
+ var isBrowser$1 = typeof document !== 'undefined';
47788
+ var hasOwnProperty = {}.hasOwnProperty;
47789
+ var EmotionCacheContext = /* #__PURE__ */React.createContext(
47790
+ // we're doing this to avoid preconstruct's dead code elimination in this one case
47791
+ // because this module is primarily intended for the browser and node
47792
+ // but it's also required in react native and similar environments sometimes
47793
+ // and we could have a special build just for that
47794
+ // but this is much easier and the native packages
47795
+ // might use a different theme context in the future anyway
47796
+ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
47797
+ key: 'css'
47798
+ }) : null);
47799
+ if (process.env.NODE_ENV !== 'production') {
47800
+ EmotionCacheContext.displayName = 'EmotionCacheContext';
47801
+ }
47802
+ EmotionCacheContext.Provider;
47803
+ var withEmotionCache = function withEmotionCache(func) {
47804
+ // $FlowFixMe
47805
+ return /*#__PURE__*/React.forwardRef(function (props, ref) {
47806
+ // the cache will never be null in the browser
47807
+ var cache = React.useContext(EmotionCacheContext);
47808
+ return func(props, cache, ref);
47809
+ });
47810
+ };
47811
+ if (!isBrowser$1) {
47812
+ withEmotionCache = function withEmotionCache(func) {
47813
+ return function (props) {
47814
+ var cache = React.useContext(EmotionCacheContext);
47815
+ if (cache === null) {
47816
+ // yes, we're potentially creating this on every render
47817
+ // it doesn't actually matter though since it's only on the server
47818
+ // so there will only every be a single render
47819
+ // that could change in the future because of suspense and etc. but for now,
47820
+ // this works and i don't want to optimise for a future thing that we aren't sure about
47821
+ cache = createCache({
47822
+ key: 'css'
47823
+ });
47824
+ return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {
47825
+ value: cache
47826
+ }, func(props, cache));
47827
+ } else {
47828
+ return func(props, cache);
47829
+ }
47830
+ };
47831
+ };
47832
+ }
47833
+ var ThemeContext = /* #__PURE__ */React.createContext({});
47834
+ if (process.env.NODE_ENV !== 'production') {
47835
+ ThemeContext.displayName = 'EmotionThemeContext';
47836
+ }
47837
+ var getLastPart = function getLastPart(functionName) {
47838
+ // The match may be something like 'Object.createEmotionProps' or
47839
+ // 'Loader.prototype.render'
47840
+ var parts = functionName.split('.');
47841
+ return parts[parts.length - 1];
47859
47842
  };
47843
+ var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
47844
+ // V8
47845
+ var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
47846
+ if (match) return getLastPart(match[1]); // Safari / Firefox
47860
47847
 
47861
- var _excluded$a = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size"];
47862
- var SelectionCard = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
47863
- var isChecked = _ref.isChecked,
47864
- isDisabled = _ref.isDisabled,
47865
- value = _ref.value,
47866
- helperText = _ref.helperText,
47867
- expandableChildren = _ref.expandableChildren,
47868
- defaultChecked = _ref.defaultChecked,
47869
- isRadio = _ref.isRadio,
47870
- label = _ref.label,
47871
- isExpandable = _ref.isExpandable,
47872
- _ref$size = _ref.size,
47873
- size = _ref$size === void 0 ? 'md' : _ref$size,
47874
- props = _objectWithoutProperties$1(_ref, _excluded$a);
47875
- var Component = isRadio ? Radio : Checkbox;
47876
- var expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
47877
- var hasExpandableContent = isExpandable && isChecked && expandableChildren;
47878
- return /*#__PURE__*/React__namespace.default.createElement(Box, {
47879
- paddingBottom: hasExpandableContent ? 3 : 0,
47880
- borderRadius: "lg",
47881
- borderColor: isChecked ? 'primary.default' : 'gray.medium',
47882
- borderWidth: "1px",
47883
- _hover: {
47884
- borderColor: isDisabled ? 'gray.medium' : 'primary.default'
47885
- }
47886
- }, /*#__PURE__*/React__namespace.default.createElement(Box, {
47887
- borderColor: "gray.medium",
47888
- borderBottomWidth: hasExpandableContent ? '1px' : 0
47889
- }, /*#__PURE__*/React__namespace.default.createElement(Component, _extends$K({
47890
- ref: ref,
47891
- isChecked: isChecked,
47892
- isDisabled: isDisabled,
47893
- isFocusable: !isDisabled,
47894
- value: value,
47895
- defaultChecked: defaultChecked,
47896
- helperText: helperText,
47897
- size: size,
47898
- width: "100%",
47899
- paddingX: 4,
47900
- paddingY: 3
47901
- }, props), label)), hasExpandableContent && /*#__PURE__*/React__namespace.default.createElement(Box, {
47902
- color: "gray.600",
47903
- fontSize: expandableTextSize,
47904
- paddingTop: 3,
47905
- paddingX: 4
47906
- }, expandableChildren));
47907
- });
47908
- SelectionCard.propTypes = {
47909
- label: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]).isRequired,
47910
- expandableChildren: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]),
47911
- defaultChecked: PropTypes__default.default.bool,
47912
- isChecked: PropTypes__default.default.bool,
47913
- isDisabled: PropTypes__default.default.bool,
47914
- value: PropTypes__default.default.string.isRequired,
47915
- helperText: PropTypes__default.default.string,
47916
- isRadio: PropTypes__default.default.bool,
47917
- isExpandable: PropTypes__default.default.bool,
47918
- size: PropTypes__default.default.oneOf(['sm', 'md', 'lg'])
47848
+ match = /^([A-Za-z0-9$.]+)@/.exec(line);
47849
+ if (match) return getLastPart(match[1]);
47850
+ return undefined;
47919
47851
  };
47852
+ var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
47853
+ // identifiers, thus we only need to replace what is a valid character for JS,
47854
+ // but not for CSS.
47920
47855
 
47921
- var _excluded$9 = ["variant", "colorScheme"];
47922
- var Divider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
47923
- var variant = _ref.variant,
47924
- borderColor = _ref.colorScheme,
47925
- props = _objectWithoutProperties$1(_ref, _excluded$9);
47926
- return /*#__PURE__*/React__namespace.default.createElement(Divider$1, _extends$K({}, colorScheme[borderColor], {
47927
- variant: variant
47928
- }, props, {
47929
- ref: ref
47930
- }));
47931
- });
47932
- Divider.propTypes = {
47933
- /** Color scheme used */
47934
- colorScheme: PropTypes__default.default.oneOf(['low', 'medium']),
47935
- /** The styling that will be applied to the HR tag */
47936
- variant: PropTypes__default.default.oneOf(['solid', 'dashed'])
47856
+ var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
47857
+ return identifier.replace(/\$/g, '-');
47937
47858
  };
47938
- Divider.defaultProps = {
47939
- variant: 'solid',
47940
- colorScheme: 'medium'
47859
+ var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
47860
+ if (!stackTrace) return undefined;
47861
+ var lines = stackTrace.split('\n');
47862
+ for (var i = 0; i < lines.length; i++) {
47863
+ var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
47864
+
47865
+ if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
47866
+
47867
+ if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
47868
+ // uppercase letter
47869
+
47870
+ if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
47871
+ }
47872
+ return undefined;
47941
47873
  };
47942
-
47943
- var _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
47944
- var Textarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
47945
- var label = _ref.label,
47946
- helperText = _ref.helperText,
47947
- errorMessage = _ref.errorMessage,
47948
- isInvalid = _ref.isInvalid,
47949
- isDisabled = _ref.isDisabled,
47950
- isRequired = _ref.isRequired,
47951
- isOptional = _ref.isOptional,
47952
- customRequiredText = _ref.customRequiredText,
47953
- props = _objectWithoutProperties$1(_ref, _excluded$8);
47954
- var classes = cn__default.default({
47955
- 'FormElement-contains-error': isInvalid
47956
- });
47957
- return /*#__PURE__*/React__namespace.default.createElement(FormControl$1, {
47958
- isInvalid: isInvalid,
47959
- isDisabled: isDisabled,
47960
- isRequired: isRequired,
47961
- isOptional: isOptional,
47962
- errorMessage: errorMessage,
47963
- helperText: helperText,
47964
- label: label,
47965
- inputId: props.id,
47966
- customRequiredText: customRequiredText
47967
- }, /*#__PURE__*/React__namespace.default.createElement(Textarea$1, _extends$K({
47968
- ref: ref,
47969
- className: classes
47970
- }, props)));
47971
- });
47972
- Textarea.propTypes = {
47973
- id: PropTypes__default.default.string.isRequired,
47974
- label: PropTypes__default.default.string,
47975
- helperText: PropTypes__default.default.string,
47976
- errorMessage: PropTypes__default.default.string,
47977
- isInvalid: PropTypes__default.default.bool,
47978
- isDisabled: PropTypes__default.default.bool,
47979
- isRequired: PropTypes__default.default.bool,
47980
- isOptional: PropTypes__default.default.bool,
47981
- customRequiredText: PropTypes__default.default.string
47982
- };
47983
-
47984
- var _excluded$7 = ["children"];
47985
- var Popover = /*#__PURE__*/React.forwardRef(function (props, ref) {
47986
- var children = props.children,
47987
- rest = _objectWithoutProperties$1(props, _excluded$7);
47988
- return /*#__PURE__*/React__namespace.default.createElement(Popover$1, _extends$K({}, rest, {
47989
- ref: ref
47990
- }), React.Children.toArray(children).map(function (child, index) {
47991
- return /*#__PURE__*/React.cloneElement(child, {
47992
- ref: ref,
47993
- variant: props.variant,
47994
- key: "Popover-child-".concat(index)
47995
- });
47996
- }));
47997
- });
47998
- Popover.propTypes = {
47999
- /** React children */
48000
- children: PropTypes__default.default.node,
48001
- /** Styles the Popover */
48002
- variant: PropTypes__default.default.oneOf(['light', 'dark'])
48003
- };
48004
-
48005
- var arrowStyles = function arrowStyles(_ref) {
48006
- var variant = _ref.variant;
48007
- return {
48008
- backgroundColor: variant === 'dark' ? 'secondary.default' : 'white'
48009
- };
48010
- };
48011
-
48012
- var PopoverArrow = /*#__PURE__*/React.forwardRef(function (props, ref) {
48013
- return /*#__PURE__*/React__namespace.default.createElement(PopoverArrow$1, _extends$K({
48014
- ref: ref
48015
- }, props, arrowStyles(props)));
48016
- });
48017
-
48018
- var pseudoStyles = function pseudoStyles(variant) {
48019
- return {
48020
- bgColor: variant === 'dark' ? 'gray.600' : 'gray.50'
48021
- };
48022
- };
48023
- var closeButtonStyles = function closeButtonStyles(_ref) {
48024
- var variant = _ref.variant;
48025
- return {
48026
- color: variant === 'dark' ? 'white' : 'black',
48027
- fontSize: '0.5rem',
48028
- position: 'absolute',
48029
- top: 0,
48030
- right: 0,
48031
- padding: 4,
48032
- borderTopRightRadius: 4,
48033
- _hover: pseudoStyles(variant),
48034
- _focus: _objectSpread2$1(_objectSpread2$1({}, pseudoStyles(variant)), {}, {
48035
- boxShadow: 'outline'
48036
- })
48037
- };
48038
- };
48039
-
48040
- var PopoverCloseButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
48041
- return /*#__PURE__*/React__namespace.default.createElement(PopoverCloseButton$1, _extends$K({
48042
- ref: ref
48043
- }, props, closeButtonStyles(props)));
48044
- });
48045
-
48046
- var _excluded$6 = ["header", "variant", "children", "hideCloseButton", "hideArrow", "popoverBodyProps"];
48047
- var PopoverContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
48048
- var header = props.header,
48049
- variant = props.variant,
48050
- children = props.children,
48051
- hideCloseButton = props.hideCloseButton,
48052
- hideArrow = props.hideArrow,
48053
- popoverBodyProps = props.popoverBodyProps,
48054
- rest = _objectWithoutProperties$1(props, _excluded$6);
48055
- return /*#__PURE__*/React__namespace.default.createElement(PopoverContent$1, _extends$K({}, rest, {
48056
- ref: ref
48057
- }), hideArrow ? null : /*#__PURE__*/React__namespace.default.createElement(PopoverArrow, {
48058
- variant: variant
48059
- }), hideCloseButton ? null : /*#__PURE__*/React__namespace.default.createElement(PopoverCloseButton, {
48060
- variant: variant
48061
- }), header ? /*#__PURE__*/React__namespace.default.createElement(PopoverHeader, null, header) : null, /*#__PURE__*/React__namespace.default.createElement(PopoverBody, popoverBodyProps, children));
48062
- });
48063
- PopoverContent.propTypes = {
48064
- /** React children */
48065
- children: PropTypes__default.default.node,
48066
- /** Whether or not to hide the close button */
48067
- hideCloseButton: PropTypes__default.default.bool,
48068
- /** Whether or not to hide the arrow */
48069
- hideArrow: PropTypes__default.default.bool,
48070
- /** Styles the Popover */
48071
- variant: PropTypes__default.default.oneOf(['light', 'dark']),
48072
- /** The string or node for the header (optional) */
48073
- header: PropTypes__default.default.oneOfType([PropTypes__default.default.node, PropTypes__default.default.string]),
48074
- /** Props to pass to the PopoverBody */
48075
- popoverBodyProps: PropTypes__default.default.object
48076
- };
48077
- PopoverContent.defaultProps = {
48078
- variant: 'light',
48079
- hideCloseButton: false,
48080
- hideArrow: false
48081
- };
48082
-
48083
- var isBrowser$2 = typeof document !== 'undefined';
48084
- var syncFallback = function syncFallback(create) {
48085
- return create();
48086
- };
48087
- var useInsertionEffect = React__namespace['useInsertion' + 'Effect'] ? React__namespace['useInsertion' + 'Effect'] : false;
48088
- var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
48089
- var useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;
48090
-
48091
- var isBrowser$1 = typeof document !== 'undefined';
48092
- var hasOwnProperty = {}.hasOwnProperty;
48093
- var EmotionCacheContext = /* #__PURE__ */React.createContext(
48094
- // we're doing this to avoid preconstruct's dead code elimination in this one case
48095
- // because this module is primarily intended for the browser and node
48096
- // but it's also required in react native and similar environments sometimes
48097
- // and we could have a special build just for that
48098
- // but this is much easier and the native packages
48099
- // might use a different theme context in the future anyway
48100
- typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
48101
- key: 'css'
48102
- }) : null);
48103
- if (process.env.NODE_ENV !== 'production') {
48104
- EmotionCacheContext.displayName = 'EmotionCacheContext';
48105
- }
48106
- EmotionCacheContext.Provider;
48107
- var withEmotionCache = function withEmotionCache(func) {
48108
- // $FlowFixMe
48109
- return /*#__PURE__*/React.forwardRef(function (props, ref) {
48110
- // the cache will never be null in the browser
48111
- var cache = React.useContext(EmotionCacheContext);
48112
- return func(props, cache, ref);
48113
- });
48114
- };
48115
- if (!isBrowser$1) {
48116
- withEmotionCache = function withEmotionCache(func) {
48117
- return function (props) {
48118
- var cache = React.useContext(EmotionCacheContext);
48119
- if (cache === null) {
48120
- // yes, we're potentially creating this on every render
48121
- // it doesn't actually matter though since it's only on the server
48122
- // so there will only every be a single render
48123
- // that could change in the future because of suspense and etc. but for now,
48124
- // this works and i don't want to optimise for a future thing that we aren't sure about
48125
- cache = createCache({
48126
- key: 'css'
48127
- });
48128
- return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {
48129
- value: cache
48130
- }, func(props, cache));
48131
- } else {
48132
- return func(props, cache);
48133
- }
48134
- };
48135
- };
48136
- }
48137
- var ThemeContext = /* #__PURE__ */React.createContext({});
48138
- if (process.env.NODE_ENV !== 'production') {
48139
- ThemeContext.displayName = 'EmotionThemeContext';
48140
- }
48141
- var getLastPart = function getLastPart(functionName) {
48142
- // The match may be something like 'Object.createEmotionProps' or
48143
- // 'Loader.prototype.render'
48144
- var parts = functionName.split('.');
48145
- return parts[parts.length - 1];
48146
- };
48147
- var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
48148
- // V8
48149
- var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
48150
- if (match) return getLastPart(match[1]); // Safari / Firefox
48151
-
48152
- match = /^([A-Za-z0-9$.]+)@/.exec(line);
48153
- if (match) return getLastPart(match[1]);
48154
- return undefined;
48155
- };
48156
- var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
48157
- // identifiers, thus we only need to replace what is a valid character for JS,
48158
- // but not for CSS.
48159
-
48160
- var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
48161
- return identifier.replace(/\$/g, '-');
48162
- };
48163
- var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
48164
- if (!stackTrace) return undefined;
48165
- var lines = stackTrace.split('\n');
48166
- for (var i = 0; i < lines.length; i++) {
48167
- var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
48168
-
48169
- if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
48170
-
48171
- if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
48172
- // uppercase letter
48173
-
48174
- if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
48175
- }
48176
- return undefined;
48177
- };
48178
- var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
48179
- var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
48180
- var createEmotionProps = function createEmotionProps(type, props) {
48181
- if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' &&
48182
- // check if there is a css declaration
48183
- props.css.indexOf(':') !== -1) {
48184
- throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`" + props.css + "`");
48185
- }
48186
- var newProps = {};
48187
- for (var key in props) {
48188
- if (hasOwnProperty.call(props, key)) {
48189
- newProps[key] = props[key];
48190
- }
48191
- }
48192
- newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
48193
- // the label hasn't already been computed
47874
+ var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
47875
+ var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
47876
+ var createEmotionProps = function createEmotionProps(type, props) {
47877
+ if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' &&
47878
+ // check if there is a css declaration
47879
+ props.css.indexOf(':') !== -1) {
47880
+ throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`" + props.css + "`");
47881
+ }
47882
+ var newProps = {};
47883
+ for (var key in props) {
47884
+ if (hasOwnProperty.call(props, key)) {
47885
+ newProps[key] = props[key];
47886
+ }
47887
+ }
47888
+ newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
47889
+ // the label hasn't already been computed
48194
47890
 
48195
47891
  if (process.env.NODE_ENV !== 'production' && !!props.css && (_typeof$1(props.css) !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
48196
47892
  var label = getLabelFromStackTrace(new Error().stack);
@@ -49884,7 +49580,7 @@ var GroupHeading = function GroupHeading(props) {
49884
49580
  }, className)
49885
49581
  }, innerProps));
49886
49582
  };
49887
- var _excluded$5 = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
49583
+ var _excluded$c = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
49888
49584
  var inputCSS = function inputCSS(_ref) {
49889
49585
  var isDisabled = _ref.isDisabled,
49890
49586
  value = _ref.value,
@@ -49941,7 +49637,7 @@ var Input = function Input(props) {
49941
49637
  isDisabled = _cleanCommonProps.isDisabled,
49942
49638
  isHidden = _cleanCommonProps.isHidden,
49943
49639
  inputClassName = _cleanCommonProps.inputClassName,
49944
- innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$5);
49640
+ innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$c);
49945
49641
  return jsx("div", {
49946
49642
  className: cx({
49947
49643
  'input-container': true
@@ -50770,10 +50466,10 @@ var createFilter = function createFilter(config) {
50770
50466
  return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;
50771
50467
  };
50772
50468
  };
50773
- var _excluded$4 = ["innerRef"];
50469
+ var _excluded$b = ["innerRef"];
50774
50470
  function DummyInput(_ref) {
50775
50471
  var innerRef = _ref.innerRef,
50776
- props = _objectWithoutProperties(_ref, _excluded$4);
50472
+ props = _objectWithoutProperties(_ref, _excluded$b);
50777
50473
 
50778
50474
  // Remove animation props not meant for HTML elements
50779
50475
  var filteredProps = removeProps(props, 'onExited', 'in', 'enter', 'exit', 'appear');
@@ -52682,7 +52378,7 @@ var Select = /*#__PURE__*/function (_Component) {
52682
52378
  }(React.Component);
52683
52379
  Select.defaultProps = defaultProps;
52684
52380
 
52685
- var _excluded$3 = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
52381
+ var _excluded$a = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
52686
52382
  function useStateManager(_ref) {
52687
52383
  var _ref$defaultInputValu = _ref.defaultInputValue,
52688
52384
  defaultInputValue = _ref$defaultInputValu === void 0 ? '' : _ref$defaultInputValu,
@@ -52697,7 +52393,7 @@ function useStateManager(_ref) {
52697
52393
  propsOnMenuClose = _ref.onMenuClose,
52698
52394
  propsOnMenuOpen = _ref.onMenuOpen,
52699
52395
  propsValue = _ref.value,
52700
- restSelectProps = _objectWithoutProperties(_ref, _excluded$3);
52396
+ restSelectProps = _objectWithoutProperties(_ref, _excluded$a);
52701
52397
  var _useState = React.useState(propsInputValue !== undefined ? propsInputValue : defaultInputValue),
52702
52398
  _useState2 = _slicedToArray(_useState, 2),
52703
52399
  stateInputValue = _useState2[0],
@@ -52749,7 +52445,7 @@ function useStateManager(_ref) {
52749
52445
  });
52750
52446
  }
52751
52447
 
52752
- var _excluded$2 = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
52448
+ var _excluded$9 = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
52753
52449
  function useAsync(_ref) {
52754
52450
  var _ref$defaultOptions = _ref.defaultOptions,
52755
52451
  propsDefaultOptions = _ref$defaultOptions === void 0 ? false : _ref$defaultOptions,
@@ -52762,7 +52458,7 @@ function useAsync(_ref) {
52762
52458
  propsOnInputChange = _ref.onInputChange,
52763
52459
  _ref$filterOption = _ref.filterOption,
52764
52460
  filterOption = _ref$filterOption === void 0 ? null : _ref$filterOption,
52765
- restSelectProps = _objectWithoutProperties(_ref, _excluded$2);
52461
+ restSelectProps = _objectWithoutProperties(_ref, _excluded$9);
52766
52462
  var propsInputValue = restSelectProps.inputValue;
52767
52463
  var lastRequest = React.useRef(undefined);
52768
52464
  var mounted = React.useRef(false);
@@ -52914,6 +52610,491 @@ var SvgXCircle = function SvgXCircle(props, ref) {
52914
52610
  };
52915
52611
  var ForwardRef = /*#__PURE__*/React.forwardRef(SvgXCircle);
52916
52612
 
52613
+ var AutoSuggestSelect$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52614
+ var id = _ref.id,
52615
+ label = _ref.label,
52616
+ helperText = _ref.helperText,
52617
+ errorMessage = _ref.errorMessage,
52618
+ isInvalid = _ref.isInvalid,
52619
+ isDisabled = _ref.isDisabled,
52620
+ isRequired = _ref.isRequired,
52621
+ getOptions = _ref.getOptions,
52622
+ onChange = _ref.onChange,
52623
+ placeholder = _ref.placeholder,
52624
+ _ref$defaultValue = _ref.defaultValue,
52625
+ defaultValue = _ref$defaultValue === void 0 ? null : _ref$defaultValue,
52626
+ leftElement = _ref.leftElement,
52627
+ leftElementStyles = _ref.leftElementStyles;
52628
+ var _useTheme = useTheme(),
52629
+ colors = _useTheme.colors,
52630
+ fontSizes = _useTheme.fontSizes,
52631
+ sizes = _useTheme.sizes;
52632
+ var handleChange = function handleChange(selectedOption) {
52633
+ onChange(selectedOption);
52634
+ };
52635
+ var baseText = {
52636
+ fontSize: fontSizes.base,
52637
+ color: colors.black
52638
+ };
52639
+
52640
+ /** React Select doesn't use Chakra but it does use Emotion so it's not too difficult to use values from our Chakra theme. Here is the documentation for React Select styling: https://react-select.com/styles */
52641
+ var customStyles = {
52642
+ menu: function menu(provided) {
52643
+ return _objectSpread2$1(_objectSpread2$1({}, provided), baseText);
52644
+ },
52645
+ control: function control(provided, state) {
52646
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52647
+ borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary["default"] : colors.gray['200'],
52648
+ borderWidth: '1px',
52649
+ boxShadow: 'none',
52650
+ '&:hover': {
52651
+ borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary["default"] : colors.gray['300']
52652
+ }
52653
+ });
52654
+ },
52655
+ input: function input(provided, state) {
52656
+ return _objectSpread2$1(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, provided), baseText), {}, {
52657
+ paddingBottom: sizes['2'],
52658
+ paddingTop: sizes['5.5'],
52659
+ paddingRight: sizes['3'],
52660
+ backgroundColor: state.isDisabled ? colors.gray['200'] : 'transparent'
52661
+ }, leftElement ? {
52662
+ paddingLeft: sizes['10']
52663
+ } : {
52664
+ paddingLeft: sizes['3']
52665
+ }), {}, {
52666
+ cursor: state.isDisabled ? 'not-allowed' : !state.hasValue ? 'text' : 'auto'
52667
+ });
52668
+ },
52669
+ placeholder: function placeholder(provided) {
52670
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52671
+ padding: sizes['2'],
52672
+ fontSize: fontSizes.base,
52673
+ color: colors.gray['600']
52674
+ });
52675
+ },
52676
+ singleValue: function singleValue(provided) {
52677
+ return _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, provided), baseText), {}, {
52678
+ paddingBottom: sizes['2'],
52679
+ paddingTop: sizes['5.5'],
52680
+ paddingRight: sizes['3']
52681
+ }, leftElement ? {
52682
+ paddingLeft: sizes['10']
52683
+ } : {
52684
+ paddingLeft: sizes['3']
52685
+ });
52686
+ },
52687
+ option: function option(provided, state) {
52688
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52689
+ backgroundColor: state.isSelected ? colors.gray['200'] : state.isFocused ? colors.gray['50'] : 'transparent',
52690
+ color: colors.black
52691
+ });
52692
+ },
52693
+ clearIndicator: function clearIndicator(provided) {
52694
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52695
+ color: colors.gray['600']
52696
+ });
52697
+ },
52698
+ dropdownIndicator: function dropdownIndicator(provided) {
52699
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52700
+ color: colors.gray['600']
52701
+ });
52702
+ }
52703
+ };
52704
+ var clearIndicatorStyles = {
52705
+ width: sizes['5'],
52706
+ display: 'flex',
52707
+ marginRight: sizes['3'],
52708
+ color: colors.gray['600'],
52709
+ cursor: 'pointer'
52710
+ };
52711
+
52712
+ /** React Select allows you to override the clear indicator with your own custom component: https://react-select.com/components */
52713
+ var ClearIndicator = function ClearIndicator(_ref2) {
52714
+ var innerRef = _ref2.innerRef,
52715
+ innerProps = _ref2.innerProps;
52716
+ return /*#__PURE__*/React__namespace.default.createElement("div", _extends$K({
52717
+ style: clearIndicatorStyles,
52718
+ ref: innerRef
52719
+ }, innerProps), /*#__PURE__*/React__namespace.default.createElement(ForwardRef, null));
52720
+ };
52721
+ return /*#__PURE__*/React__namespace.default.createElement(Box, {
52722
+ sx: isInvalid ? {
52723
+ label: {
52724
+ color: 'error'
52725
+ }
52726
+ } : {}
52727
+ }, /*#__PURE__*/React__namespace.default.createElement(FormControl, {
52728
+ errorMessage: errorMessage,
52729
+ isRequired: isRequired,
52730
+ helperText: helperText,
52731
+ label: label,
52732
+ inputId: id,
52733
+ leftElement: leftElement,
52734
+ leftElementStyles: leftElementStyles
52735
+ }, /*#__PURE__*/React__namespace.default.createElement(AsyncSelect, {
52736
+ classNamePrefix: "fe-ui-async-select",
52737
+ closeMenuOnSelect: true,
52738
+ isClearable: true,
52739
+ cacheOptions: true,
52740
+ components: {
52741
+ DropdownIndicator: function DropdownIndicator() {
52742
+ return null;
52743
+ },
52744
+ IndicatorSeparator: function IndicatorSeparator() {
52745
+ return null;
52746
+ },
52747
+ ClearIndicator: ClearIndicator
52748
+ },
52749
+ openMenuOnClick: false,
52750
+ loadOptions: getOptions,
52751
+ onChange: handleChange,
52752
+ isDisabled: isDisabled,
52753
+ id: id,
52754
+ placeholder: placeholder,
52755
+ defaultValue: defaultValue,
52756
+ styles: customStyles,
52757
+ ref: ref
52758
+ })));
52759
+ });
52760
+ AutoSuggestSelect$1.propTypes = {
52761
+ /** ID applied to the select and label */
52762
+ id: PropTypes__default.default.string.isRequired,
52763
+ /** Label that describes the select */
52764
+ label: PropTypes__default.default.string,
52765
+ /** Text to use as placeholder in the input */
52766
+ placeholder: PropTypes__default.default.string,
52767
+ /** Optional helper text displayed below the select */
52768
+ helperText: PropTypes__default.default.string,
52769
+ /** Error message that would display under the select */
52770
+ errorMessage: PropTypes__default.default.string,
52771
+ /** Boolean that sets whether the select is valid */
52772
+ isInvalid: PropTypes__default.default.bool,
52773
+ /** Boolean that sets whether the select is disabled */
52774
+ isDisabled: PropTypes__default.default.bool,
52775
+ /** Boolean that sets whether the select is required */
52776
+ isRequired: PropTypes__default.default.bool,
52777
+ /** Function that is called with the value typed into the input that returns a list of options for the select */
52778
+ getOptions: PropTypes__default.default.func.isRequired,
52779
+ /** Function that is called when an option is selected, it returns the label and value of the selection */
52780
+ onChange: PropTypes__default.default.func.isRequired,
52781
+ // This prop is added to work around error: 'innerRef' is missing in props validation react/prop-types
52782
+ // eslint-disable-next-line react/no-unused-prop-types
52783
+ innerRef: PropTypes__default.default.object,
52784
+ // This prop is added to work around error: 'innerProps' is missing in props validation react/prop-types
52785
+ // eslint-disable-next-line react/no-unused-prop-types
52786
+ innerProps: PropTypes__default.default.object,
52787
+ // Element to display to the left of the input
52788
+ leftElement: PropTypes__default.default.element,
52789
+ // Styling of leftElement
52790
+ leftElementStyles: PropTypes__default.default.object
52791
+ };
52792
+
52793
+ var _excluded$8 = ["defaultChecked", "isChecked", "isDisabled", "value", "helperText", "children", "size"];
52794
+ var Radio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52795
+ var defaultChecked = _ref.defaultChecked,
52796
+ isChecked = _ref.isChecked,
52797
+ isDisabled = _ref.isDisabled,
52798
+ value = _ref.value,
52799
+ helperText = _ref.helperText,
52800
+ children = _ref.children,
52801
+ _ref$size = _ref.size,
52802
+ size = _ref$size === void 0 ? 'md' : _ref$size,
52803
+ props = _objectWithoutProperties$1(_ref, _excluded$8);
52804
+ var helperTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
52805
+ return /*#__PURE__*/React__namespace.default.createElement(Radio$1, _extends$K({
52806
+ ref: ref,
52807
+ defaultChecked: defaultChecked,
52808
+ isChecked: isChecked,
52809
+ isDisabled: isDisabled,
52810
+ isFocusable: !isDisabled,
52811
+ value: value,
52812
+ size: size
52813
+ }, props), children, helperText && /*#__PURE__*/React__namespace.default.createElement(Box, {
52814
+ color: "gray.600",
52815
+ fontSize: helperTextSize
52816
+ }, helperText));
52817
+ });
52818
+ Radio.propTypes = {
52819
+ children: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]).isRequired,
52820
+ defaultChecked: PropTypes__default.default.bool,
52821
+ isChecked: PropTypes__default.default.bool,
52822
+ isDisabled: PropTypes__default.default.bool,
52823
+ value: PropTypes__default.default.string.isRequired,
52824
+ helperText: PropTypes__default.default.string,
52825
+ size: PropTypes__default.default.oneOf(['sm', 'md', 'lg'])
52826
+ };
52827
+
52828
+ var _excluded$7 = ["label", "errorMessage", "defaultValue", "isDisabled", "isInvalid", "isRequired", "name", "onChange", "value", "children", "direction"];
52829
+ var RadioGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52830
+ var label = _ref.label,
52831
+ errorMessage = _ref.errorMessage,
52832
+ defaultValue = _ref.defaultValue,
52833
+ isDisabled = _ref.isDisabled,
52834
+ isInvalid = _ref.isInvalid,
52835
+ isRequired = _ref.isRequired,
52836
+ name = _ref.name,
52837
+ onChange = _ref.onChange,
52838
+ value = _ref.value,
52839
+ children = _ref.children,
52840
+ direction = _ref.direction,
52841
+ props = _objectWithoutProperties$1(_ref, _excluded$7);
52842
+ return /*#__PURE__*/React__namespace.default.createElement(FormControl$1, {
52843
+ isInvalid: isInvalid,
52844
+ isDisabled: isDisabled,
52845
+ isRequired: isRequired,
52846
+ errorMessage: errorMessage,
52847
+ label: label,
52848
+ inputId: props.id,
52849
+ isFieldset: true
52850
+ }, /*#__PURE__*/React__namespace.default.createElement(RadioGroup$1, _extends$K({
52851
+ ref: ref,
52852
+ defaultValue: defaultValue,
52853
+ name: name,
52854
+ onChange: onChange,
52855
+ value: value
52856
+ }, props), /*#__PURE__*/React__namespace.default.createElement(Stack, {
52857
+ direction: direction ? direction : 'column',
52858
+ spacing: direction === 'row' ? 8 : 4
52859
+ }, children)));
52860
+ });
52861
+ RadioGroup.propTypes = {
52862
+ children: PropTypes__default.default.node,
52863
+ defaultValue: PropTypes__default.default.string,
52864
+ id: PropTypes__default.default.string.isRequired,
52865
+ label: PropTypes__default.default.string,
52866
+ errorMessage: PropTypes__default.default.string,
52867
+ isDisabled: PropTypes__default.default.bool,
52868
+ isInvalid: PropTypes__default.default.bool,
52869
+ isRequired: PropTypes__default.default.bool,
52870
+ name: PropTypes__default.default.string,
52871
+ onChange: PropTypes__default.default.func,
52872
+ value: PropTypes__default.default.string,
52873
+ direction: PropTypes__default.default.oneOf(['row', 'column'])
52874
+ };
52875
+
52876
+ var _excluded$6 = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size"];
52877
+ var SelectionCard = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52878
+ var isChecked = _ref.isChecked,
52879
+ isDisabled = _ref.isDisabled,
52880
+ value = _ref.value,
52881
+ helperText = _ref.helperText,
52882
+ expandableChildren = _ref.expandableChildren,
52883
+ defaultChecked = _ref.defaultChecked,
52884
+ isRadio = _ref.isRadio,
52885
+ label = _ref.label,
52886
+ isExpandable = _ref.isExpandable,
52887
+ _ref$size = _ref.size,
52888
+ size = _ref$size === void 0 ? 'md' : _ref$size,
52889
+ props = _objectWithoutProperties$1(_ref, _excluded$6);
52890
+ var Component = isRadio ? Radio : Checkbox;
52891
+ var expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
52892
+ var hasExpandableContent = isExpandable && isChecked && expandableChildren;
52893
+ return /*#__PURE__*/React__namespace.default.createElement(Box, {
52894
+ paddingBottom: hasExpandableContent ? 3 : 0,
52895
+ borderRadius: "lg",
52896
+ borderColor: isChecked ? 'primary.default' : 'gray.medium',
52897
+ borderWidth: "1px",
52898
+ _hover: {
52899
+ borderColor: isDisabled ? 'gray.medium' : 'primary.default'
52900
+ }
52901
+ }, /*#__PURE__*/React__namespace.default.createElement(Box, {
52902
+ borderColor: "gray.medium",
52903
+ borderBottomWidth: hasExpandableContent ? '1px' : 0
52904
+ }, /*#__PURE__*/React__namespace.default.createElement(Component, _extends$K({
52905
+ ref: ref,
52906
+ isChecked: isChecked,
52907
+ isDisabled: isDisabled,
52908
+ isFocusable: !isDisabled,
52909
+ value: value,
52910
+ defaultChecked: defaultChecked,
52911
+ helperText: helperText,
52912
+ size: size,
52913
+ width: "100%",
52914
+ paddingX: 4,
52915
+ paddingY: 3
52916
+ }, props), label)), hasExpandableContent && /*#__PURE__*/React__namespace.default.createElement(Box, {
52917
+ color: "gray.600",
52918
+ fontSize: expandableTextSize,
52919
+ paddingTop: 3,
52920
+ paddingX: 4
52921
+ }, expandableChildren));
52922
+ });
52923
+ SelectionCard.propTypes = {
52924
+ label: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]).isRequired,
52925
+ expandableChildren: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]),
52926
+ defaultChecked: PropTypes__default.default.bool,
52927
+ isChecked: PropTypes__default.default.bool,
52928
+ isDisabled: PropTypes__default.default.bool,
52929
+ value: PropTypes__default.default.string.isRequired,
52930
+ helperText: PropTypes__default.default.string,
52931
+ isRadio: PropTypes__default.default.bool,
52932
+ isExpandable: PropTypes__default.default.bool,
52933
+ size: PropTypes__default.default.oneOf(['sm', 'md', 'lg'])
52934
+ };
52935
+
52936
+ var _excluded$5 = ["variant", "colorScheme"];
52937
+ var Divider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52938
+ var variant = _ref.variant,
52939
+ borderColor = _ref.colorScheme,
52940
+ props = _objectWithoutProperties$1(_ref, _excluded$5);
52941
+ return /*#__PURE__*/React__namespace.default.createElement(Divider$1, _extends$K({}, colorScheme[borderColor], {
52942
+ variant: variant
52943
+ }, props, {
52944
+ ref: ref
52945
+ }));
52946
+ });
52947
+ Divider.propTypes = {
52948
+ /** Color scheme used */
52949
+ colorScheme: PropTypes__default.default.oneOf(['low', 'medium']),
52950
+ /** The styling that will be applied to the HR tag */
52951
+ variant: PropTypes__default.default.oneOf(['solid', 'dashed'])
52952
+ };
52953
+ Divider.defaultProps = {
52954
+ variant: 'solid',
52955
+ colorScheme: 'medium'
52956
+ };
52957
+
52958
+ var _excluded$4 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
52959
+ var Textarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52960
+ var label = _ref.label,
52961
+ helperText = _ref.helperText,
52962
+ errorMessage = _ref.errorMessage,
52963
+ isInvalid = _ref.isInvalid,
52964
+ isDisabled = _ref.isDisabled,
52965
+ isRequired = _ref.isRequired,
52966
+ isOptional = _ref.isOptional,
52967
+ customRequiredText = _ref.customRequiredText,
52968
+ props = _objectWithoutProperties$1(_ref, _excluded$4);
52969
+ var classes = cn__default.default({
52970
+ 'FormElement-contains-error': isInvalid
52971
+ });
52972
+ return /*#__PURE__*/React__namespace.default.createElement(FormControl$1, {
52973
+ isInvalid: isInvalid,
52974
+ isDisabled: isDisabled,
52975
+ isRequired: isRequired,
52976
+ isOptional: isOptional,
52977
+ errorMessage: errorMessage,
52978
+ helperText: helperText,
52979
+ label: label,
52980
+ inputId: props.id,
52981
+ customRequiredText: customRequiredText
52982
+ }, /*#__PURE__*/React__namespace.default.createElement(Textarea$1, _extends$K({
52983
+ ref: ref,
52984
+ className: classes
52985
+ }, props)));
52986
+ });
52987
+ Textarea.propTypes = {
52988
+ id: PropTypes__default.default.string.isRequired,
52989
+ label: PropTypes__default.default.string,
52990
+ helperText: PropTypes__default.default.string,
52991
+ errorMessage: PropTypes__default.default.string,
52992
+ isInvalid: PropTypes__default.default.bool,
52993
+ isDisabled: PropTypes__default.default.bool,
52994
+ isRequired: PropTypes__default.default.bool,
52995
+ isOptional: PropTypes__default.default.bool,
52996
+ customRequiredText: PropTypes__default.default.string
52997
+ };
52998
+
52999
+ var _excluded$3 = ["children"];
53000
+ var Popover = /*#__PURE__*/React.forwardRef(function (props, ref) {
53001
+ var children = props.children,
53002
+ rest = _objectWithoutProperties$1(props, _excluded$3);
53003
+ return /*#__PURE__*/React__namespace.default.createElement(Popover$1, _extends$K({}, rest, {
53004
+ ref: ref
53005
+ }), React.Children.toArray(children).map(function (child, index) {
53006
+ return /*#__PURE__*/React.cloneElement(child, {
53007
+ ref: ref,
53008
+ variant: props.variant,
53009
+ key: "Popover-child-".concat(index)
53010
+ });
53011
+ }));
53012
+ });
53013
+ Popover.propTypes = {
53014
+ /** React children */
53015
+ children: PropTypes__default.default.node,
53016
+ /** Styles the Popover */
53017
+ variant: PropTypes__default.default.oneOf(['light', 'dark'])
53018
+ };
53019
+
53020
+ var arrowStyles = function arrowStyles(_ref) {
53021
+ var variant = _ref.variant;
53022
+ return {
53023
+ backgroundColor: variant === 'dark' ? 'secondary.default' : 'white'
53024
+ };
53025
+ };
53026
+
53027
+ var PopoverArrow = /*#__PURE__*/React.forwardRef(function (props, ref) {
53028
+ return /*#__PURE__*/React__namespace.default.createElement(PopoverArrow$1, _extends$K({
53029
+ ref: ref
53030
+ }, props, arrowStyles(props)));
53031
+ });
53032
+
53033
+ var pseudoStyles = function pseudoStyles(variant) {
53034
+ return {
53035
+ bgColor: variant === 'dark' ? 'gray.600' : 'gray.50'
53036
+ };
53037
+ };
53038
+ var closeButtonStyles = function closeButtonStyles(_ref) {
53039
+ var variant = _ref.variant;
53040
+ return {
53041
+ color: variant === 'dark' ? 'white' : 'black',
53042
+ fontSize: '0.5rem',
53043
+ position: 'absolute',
53044
+ top: 0,
53045
+ right: 0,
53046
+ padding: 4,
53047
+ borderTopRightRadius: 4,
53048
+ _hover: pseudoStyles(variant),
53049
+ _focus: _objectSpread2$1(_objectSpread2$1({}, pseudoStyles(variant)), {}, {
53050
+ boxShadow: 'outline'
53051
+ })
53052
+ };
53053
+ };
53054
+
53055
+ var PopoverCloseButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
53056
+ return /*#__PURE__*/React__namespace.default.createElement(PopoverCloseButton$1, _extends$K({
53057
+ ref: ref
53058
+ }, props, closeButtonStyles(props)));
53059
+ });
53060
+
53061
+ var _excluded$2 = ["header", "variant", "children", "hideCloseButton", "hideArrow", "popoverBodyProps"];
53062
+ var PopoverContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
53063
+ var header = props.header,
53064
+ variant = props.variant,
53065
+ children = props.children,
53066
+ hideCloseButton = props.hideCloseButton,
53067
+ hideArrow = props.hideArrow,
53068
+ popoverBodyProps = props.popoverBodyProps,
53069
+ rest = _objectWithoutProperties$1(props, _excluded$2);
53070
+ return /*#__PURE__*/React__namespace.default.createElement(PopoverContent$1, _extends$K({}, rest, {
53071
+ ref: ref
53072
+ }), hideArrow ? null : /*#__PURE__*/React__namespace.default.createElement(PopoverArrow, {
53073
+ variant: variant
53074
+ }), hideCloseButton ? null : /*#__PURE__*/React__namespace.default.createElement(PopoverCloseButton, {
53075
+ variant: variant
53076
+ }), header ? /*#__PURE__*/React__namespace.default.createElement(PopoverHeader, null, header) : null, /*#__PURE__*/React__namespace.default.createElement(PopoverBody, popoverBodyProps, children));
53077
+ });
53078
+ PopoverContent.propTypes = {
53079
+ /** React children */
53080
+ children: PropTypes__default.default.node,
53081
+ /** Whether or not to hide the close button */
53082
+ hideCloseButton: PropTypes__default.default.bool,
53083
+ /** Whether or not to hide the arrow */
53084
+ hideArrow: PropTypes__default.default.bool,
53085
+ /** Styles the Popover */
53086
+ variant: PropTypes__default.default.oneOf(['light', 'dark']),
53087
+ /** The string or node for the header (optional) */
53088
+ header: PropTypes__default.default.oneOfType([PropTypes__default.default.node, PropTypes__default.default.string]),
53089
+ /** Props to pass to the PopoverBody */
53090
+ popoverBodyProps: PropTypes__default.default.object
53091
+ };
53092
+ PopoverContent.defaultProps = {
53093
+ variant: 'light',
53094
+ hideCloseButton: false,
53095
+ hideArrow: false
53096
+ };
53097
+
52917
53098
  var AutoSuggestSelect = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52918
53099
  var id = _ref.id,
52919
53100
  label = _ref.label,
@@ -53497,6 +53678,7 @@ exports.Portal = Portal;
53497
53678
  exports.Progress = Progress;
53498
53679
  exports.Radio = Radio;
53499
53680
  exports.RadioGroup = RadioGroup;
53681
+ exports.RefreshedAutoSuggestSelect = AutoSuggestSelect$1;
53500
53682
  exports.RefreshedButtonInput = Button;
53501
53683
  exports.RefreshedFormControl = FormControl;
53502
53684
  exports.RefreshedInput = Input$1;