@spothero/ui 22.4.0 → 22.5.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.
package/dist/index.cjs.js CHANGED
@@ -47510,7 +47510,9 @@ var controlStyles = {
47510
47510
  margin: 0,
47511
47511
  marginLeft: '1px'
47512
47512
  // marginTop: 2
47513
- })
47513
+ }),
47514
+ // Styling for async select
47515
+ '.chakra-input__group:has(.fe-ui-async-select__single-value) label': _objectSpread2$1({}, activeLabelStyles)
47514
47516
  },
47515
47517
  _focusWithin: {
47516
47518
  label: _objectSpread2$1({}, activeLabelStyles),
@@ -47775,422 +47777,117 @@ Button.propTypes = {
47775
47777
  buttonValue: PropTypes__default.default.string
47776
47778
  };
47777
47779
 
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'])
47780
+ var isBrowser$2 = typeof document !== 'undefined';
47781
+ var syncFallback = function syncFallback(create) {
47782
+ return create();
47811
47783
  };
47784
+ var useInsertionEffect = React__namespace['useInsertion' + 'Effect'] ? React__namespace['useInsertion' + 'Effect'] : false;
47785
+ var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
47786
+ var useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;
47812
47787
 
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'])
47788
+ var isBrowser$1 = typeof document !== 'undefined';
47789
+ var hasOwnProperty = {}.hasOwnProperty;
47790
+ var EmotionCacheContext = /* #__PURE__ */React.createContext(
47791
+ // we're doing this to avoid preconstruct's dead code elimination in this one case
47792
+ // because this module is primarily intended for the browser and node
47793
+ // but it's also required in react native and similar environments sometimes
47794
+ // and we could have a special build just for that
47795
+ // but this is much easier and the native packages
47796
+ // might use a different theme context in the future anyway
47797
+ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
47798
+ key: 'css'
47799
+ }) : null);
47800
+ if (process.env.NODE_ENV !== 'production') {
47801
+ EmotionCacheContext.displayName = 'EmotionCacheContext';
47802
+ }
47803
+ EmotionCacheContext.Provider;
47804
+ var withEmotionCache = function withEmotionCache(func) {
47805
+ // $FlowFixMe
47806
+ return /*#__PURE__*/React.forwardRef(function (props, ref) {
47807
+ // the cache will never be null in the browser
47808
+ var cache = React.useContext(EmotionCacheContext);
47809
+ return func(props, cache, ref);
47810
+ });
47811
+ };
47812
+ if (!isBrowser$1) {
47813
+ withEmotionCache = function withEmotionCache(func) {
47814
+ return function (props) {
47815
+ var cache = React.useContext(EmotionCacheContext);
47816
+ if (cache === null) {
47817
+ // yes, we're potentially creating this on every render
47818
+ // it doesn't actually matter though since it's only on the server
47819
+ // so there will only every be a single render
47820
+ // that could change in the future because of suspense and etc. but for now,
47821
+ // this works and i don't want to optimise for a future thing that we aren't sure about
47822
+ cache = createCache({
47823
+ key: 'css'
47824
+ });
47825
+ return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {
47826
+ value: cache
47827
+ }, func(props, cache));
47828
+ } else {
47829
+ return func(props, cache);
47830
+ }
47831
+ };
47832
+ };
47833
+ }
47834
+ var ThemeContext = /* #__PURE__ */React.createContext({});
47835
+ if (process.env.NODE_ENV !== 'production') {
47836
+ ThemeContext.displayName = 'EmotionThemeContext';
47837
+ }
47838
+ var getLastPart = function getLastPart(functionName) {
47839
+ // The match may be something like 'Object.createEmotionProps' or
47840
+ // 'Loader.prototype.render'
47841
+ var parts = functionName.split('.');
47842
+ return parts[parts.length - 1];
47859
47843
  };
47844
+ var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
47845
+ // V8
47846
+ var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
47847
+ if (match) return getLastPart(match[1]); // Safari / Firefox
47860
47848
 
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'])
47849
+ match = /^([A-Za-z0-9$.]+)@/.exec(line);
47850
+ if (match) return getLastPart(match[1]);
47851
+ return undefined;
47919
47852
  };
47853
+ var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
47854
+ // identifiers, thus we only need to replace what is a valid character for JS,
47855
+ // but not for CSS.
47920
47856
 
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'])
47857
+ var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
47858
+ return identifier.replace(/\$/g, '-');
47937
47859
  };
47938
- Divider.defaultProps = {
47939
- variant: 'solid',
47940
- colorScheme: 'medium'
47860
+ var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
47861
+ if (!stackTrace) return undefined;
47862
+ var lines = stackTrace.split('\n');
47863
+ for (var i = 0; i < lines.length; i++) {
47864
+ var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
47865
+
47866
+ if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
47867
+
47868
+ if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
47869
+ // uppercase letter
47870
+
47871
+ if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
47872
+ }
47873
+ return undefined;
47941
47874
  };
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
47875
+ var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
47876
+ var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
47877
+ var createEmotionProps = function createEmotionProps(type, props) {
47878
+ if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' &&
47879
+ // check if there is a css declaration
47880
+ props.css.indexOf(':') !== -1) {
47881
+ 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 + "`");
47882
+ }
47883
+ var newProps = {};
47884
+ for (var key in props) {
47885
+ if (hasOwnProperty.call(props, key)) {
47886
+ newProps[key] = props[key];
47887
+ }
47888
+ }
47889
+ newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
47890
+ // the label hasn't already been computed
48194
47891
 
48195
47892
  if (process.env.NODE_ENV !== 'production' && !!props.css && (_typeof$1(props.css) !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
48196
47893
  var label = getLabelFromStackTrace(new Error().stack);
@@ -49884,7 +49581,7 @@ var GroupHeading = function GroupHeading(props) {
49884
49581
  }, className)
49885
49582
  }, innerProps));
49886
49583
  };
49887
- var _excluded$5 = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
49584
+ var _excluded$c = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
49888
49585
  var inputCSS = function inputCSS(_ref) {
49889
49586
  var isDisabled = _ref.isDisabled,
49890
49587
  value = _ref.value,
@@ -49941,7 +49638,7 @@ var Input = function Input(props) {
49941
49638
  isDisabled = _cleanCommonProps.isDisabled,
49942
49639
  isHidden = _cleanCommonProps.isHidden,
49943
49640
  inputClassName = _cleanCommonProps.inputClassName,
49944
- innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$5);
49641
+ innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$c);
49945
49642
  return jsx("div", {
49946
49643
  className: cx({
49947
49644
  'input-container': true
@@ -50770,10 +50467,10 @@ var createFilter = function createFilter(config) {
50770
50467
  return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;
50771
50468
  };
50772
50469
  };
50773
- var _excluded$4 = ["innerRef"];
50470
+ var _excluded$b = ["innerRef"];
50774
50471
  function DummyInput(_ref) {
50775
50472
  var innerRef = _ref.innerRef,
50776
- props = _objectWithoutProperties(_ref, _excluded$4);
50473
+ props = _objectWithoutProperties(_ref, _excluded$b);
50777
50474
 
50778
50475
  // Remove animation props not meant for HTML elements
50779
50476
  var filteredProps = removeProps(props, 'onExited', 'in', 'enter', 'exit', 'appear');
@@ -52682,7 +52379,7 @@ var Select = /*#__PURE__*/function (_Component) {
52682
52379
  }(React.Component);
52683
52380
  Select.defaultProps = defaultProps;
52684
52381
 
52685
- var _excluded$3 = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
52382
+ var _excluded$a = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
52686
52383
  function useStateManager(_ref) {
52687
52384
  var _ref$defaultInputValu = _ref.defaultInputValue,
52688
52385
  defaultInputValue = _ref$defaultInputValu === void 0 ? '' : _ref$defaultInputValu,
@@ -52697,7 +52394,7 @@ function useStateManager(_ref) {
52697
52394
  propsOnMenuClose = _ref.onMenuClose,
52698
52395
  propsOnMenuOpen = _ref.onMenuOpen,
52699
52396
  propsValue = _ref.value,
52700
- restSelectProps = _objectWithoutProperties(_ref, _excluded$3);
52397
+ restSelectProps = _objectWithoutProperties(_ref, _excluded$a);
52701
52398
  var _useState = React.useState(propsInputValue !== undefined ? propsInputValue : defaultInputValue),
52702
52399
  _useState2 = _slicedToArray(_useState, 2),
52703
52400
  stateInputValue = _useState2[0],
@@ -52749,7 +52446,7 @@ function useStateManager(_ref) {
52749
52446
  });
52750
52447
  }
52751
52448
 
52752
- var _excluded$2 = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
52449
+ var _excluded$9 = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
52753
52450
  function useAsync(_ref) {
52754
52451
  var _ref$defaultOptions = _ref.defaultOptions,
52755
52452
  propsDefaultOptions = _ref$defaultOptions === void 0 ? false : _ref$defaultOptions,
@@ -52762,7 +52459,7 @@ function useAsync(_ref) {
52762
52459
  propsOnInputChange = _ref.onInputChange,
52763
52460
  _ref$filterOption = _ref.filterOption,
52764
52461
  filterOption = _ref$filterOption === void 0 ? null : _ref$filterOption,
52765
- restSelectProps = _objectWithoutProperties(_ref, _excluded$2);
52462
+ restSelectProps = _objectWithoutProperties(_ref, _excluded$9);
52766
52463
  var propsInputValue = restSelectProps.inputValue;
52767
52464
  var lastRequest = React.useRef(undefined);
52768
52465
  var mounted = React.useRef(false);
@@ -52914,6 +52611,485 @@ var SvgXCircle = function SvgXCircle(props, ref) {
52914
52611
  };
52915
52612
  var ForwardRef = /*#__PURE__*/React.forwardRef(SvgXCircle);
52916
52613
 
52614
+ var AutoSuggestSelect$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52615
+ var id = _ref.id,
52616
+ label = _ref.label,
52617
+ helperText = _ref.helperText,
52618
+ errorMessage = _ref.errorMessage,
52619
+ isInvalid = _ref.isInvalid,
52620
+ isDisabled = _ref.isDisabled,
52621
+ isRequired = _ref.isRequired,
52622
+ getOptions = _ref.getOptions,
52623
+ onChange = _ref.onChange,
52624
+ placeholder = _ref.placeholder,
52625
+ _ref$defaultValue = _ref.defaultValue,
52626
+ defaultValue = _ref$defaultValue === void 0 ? null : _ref$defaultValue,
52627
+ leftElement = _ref.leftElement,
52628
+ leftElementStyles = _ref.leftElementStyles;
52629
+ var _useTheme = useTheme(),
52630
+ colors = _useTheme.colors,
52631
+ fontSizes = _useTheme.fontSizes,
52632
+ sizes = _useTheme.sizes;
52633
+ var handleChange = function handleChange(selectedOption) {
52634
+ onChange(selectedOption);
52635
+ };
52636
+ var baseText = {
52637
+ fontSize: fontSizes.base,
52638
+ color: colors.black
52639
+ };
52640
+
52641
+ /** 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 */
52642
+ var customStyles = {
52643
+ menu: function menu(provided) {
52644
+ return _objectSpread2$1(_objectSpread2$1({}, provided), baseText);
52645
+ },
52646
+ control: function control(provided, state) {
52647
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52648
+ borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary["default"] : colors.gray['200'],
52649
+ borderWidth: '1px',
52650
+ boxShadow: 'none',
52651
+ '&:hover': {
52652
+ borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary["default"] : colors.gray['300']
52653
+ }
52654
+ });
52655
+ },
52656
+ input: function input(provided, state) {
52657
+ return _objectSpread2$1(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, provided), baseText), {}, {
52658
+ paddingBottom: sizes['2'],
52659
+ paddingTop: sizes['5.5'],
52660
+ paddingRight: sizes['3'],
52661
+ backgroundColor: state.isDisabled ? colors.gray['200'] : 'transparent'
52662
+ }, leftElement ? {
52663
+ paddingLeft: sizes['10']
52664
+ } : {
52665
+ paddingLeft: sizes['3']
52666
+ }), {}, {
52667
+ cursor: state.isDisabled ? 'not-allowed' : !state.hasValue ? 'text' : 'auto'
52668
+ });
52669
+ },
52670
+ placeholder: function placeholder(provided) {
52671
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52672
+ padding: sizes['2'],
52673
+ fontSize: fontSizes.base,
52674
+ color: colors.gray['600']
52675
+ });
52676
+ },
52677
+ singleValue: function singleValue(provided) {
52678
+ return _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, provided), baseText), {}, {
52679
+ paddingBottom: sizes['2'],
52680
+ paddingTop: sizes['5.5'],
52681
+ paddingRight: sizes['3']
52682
+ }, leftElement ? {
52683
+ paddingLeft: sizes['10']
52684
+ } : {
52685
+ paddingLeft: sizes['3']
52686
+ });
52687
+ },
52688
+ option: function option(provided, state) {
52689
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52690
+ backgroundColor: state.isSelected ? colors.gray['200'] : state.isFocused ? colors.gray['50'] : 'transparent',
52691
+ color: colors.black
52692
+ });
52693
+ },
52694
+ clearIndicator: function clearIndicator(provided) {
52695
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52696
+ color: colors.gray['600']
52697
+ });
52698
+ },
52699
+ dropdownIndicator: function dropdownIndicator(provided) {
52700
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52701
+ color: colors.gray['600']
52702
+ });
52703
+ }
52704
+ };
52705
+ var clearIndicatorStyles = {
52706
+ width: sizes['5'],
52707
+ display: 'flex',
52708
+ marginRight: sizes['3'],
52709
+ color: colors.gray['600'],
52710
+ cursor: 'pointer'
52711
+ };
52712
+
52713
+ /** React Select allows you to override the clear indicator with your own custom component: https://react-select.com/components */
52714
+ var ClearIndicator = function ClearIndicator(_ref2) {
52715
+ var innerRef = _ref2.innerRef,
52716
+ innerProps = _ref2.innerProps;
52717
+ return /*#__PURE__*/React__namespace.default.createElement("div", _extends$K({
52718
+ style: clearIndicatorStyles,
52719
+ ref: innerRef
52720
+ }, innerProps), /*#__PURE__*/React__namespace.default.createElement(ForwardRef, null));
52721
+ };
52722
+ return /*#__PURE__*/React__namespace.default.createElement(FormControl, {
52723
+ errorMessage: errorMessage,
52724
+ isRequired: isRequired,
52725
+ helperText: helperText,
52726
+ label: label,
52727
+ inputId: id,
52728
+ leftElement: leftElement,
52729
+ leftElementStyles: leftElementStyles
52730
+ }, /*#__PURE__*/React__namespace.default.createElement(AsyncSelect, {
52731
+ classNamePrefix: "fe-ui-async-select",
52732
+ closeMenuOnSelect: true,
52733
+ isClearable: true,
52734
+ cacheOptions: true,
52735
+ components: {
52736
+ DropdownIndicator: function DropdownIndicator() {
52737
+ return null;
52738
+ },
52739
+ IndicatorSeparator: function IndicatorSeparator() {
52740
+ return null;
52741
+ },
52742
+ ClearIndicator: ClearIndicator
52743
+ },
52744
+ openMenuOnClick: false,
52745
+ loadOptions: getOptions,
52746
+ onChange: handleChange,
52747
+ isDisabled: isDisabled,
52748
+ id: id,
52749
+ placeholder: placeholder,
52750
+ defaultValue: defaultValue,
52751
+ styles: customStyles,
52752
+ ref: ref
52753
+ }));
52754
+ });
52755
+ AutoSuggestSelect$1.propTypes = {
52756
+ /** ID applied to the select and label */
52757
+ id: PropTypes__default.default.string.isRequired,
52758
+ /** Label that describes the select */
52759
+ label: PropTypes__default.default.string,
52760
+ /** Text to use as placeholder in the input */
52761
+ placeholder: PropTypes__default.default.string,
52762
+ /** Optional helper text displayed below the select */
52763
+ helperText: PropTypes__default.default.string,
52764
+ /** Error message that would display under the select */
52765
+ errorMessage: PropTypes__default.default.string,
52766
+ /** Boolean that sets whether the select is valid */
52767
+ isInvalid: PropTypes__default.default.bool,
52768
+ /** Boolean that sets whether the select is disabled */
52769
+ isDisabled: PropTypes__default.default.bool,
52770
+ /** Boolean that sets whether the select is required */
52771
+ isRequired: PropTypes__default.default.bool,
52772
+ /** Function that is called with the value typed into the input that returns a list of options for the select */
52773
+ getOptions: PropTypes__default.default.func.isRequired,
52774
+ /** Function that is called when an option is selected, it returns the label and value of the selection */
52775
+ onChange: PropTypes__default.default.func.isRequired,
52776
+ // This prop is added to work around error: 'innerRef' is missing in props validation react/prop-types
52777
+ // eslint-disable-next-line react/no-unused-prop-types
52778
+ innerRef: PropTypes__default.default.object,
52779
+ // This prop is added to work around error: 'innerProps' is missing in props validation react/prop-types
52780
+ // eslint-disable-next-line react/no-unused-prop-types
52781
+ innerProps: PropTypes__default.default.object,
52782
+ // Element to display to the left of the input
52783
+ leftElement: PropTypes__default.default.element,
52784
+ // Styling of leftElement
52785
+ leftElementStyles: PropTypes__default.default.object
52786
+ };
52787
+
52788
+ var _excluded$8 = ["defaultChecked", "isChecked", "isDisabled", "value", "helperText", "children", "size"];
52789
+ var Radio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52790
+ var defaultChecked = _ref.defaultChecked,
52791
+ isChecked = _ref.isChecked,
52792
+ isDisabled = _ref.isDisabled,
52793
+ value = _ref.value,
52794
+ helperText = _ref.helperText,
52795
+ children = _ref.children,
52796
+ _ref$size = _ref.size,
52797
+ size = _ref$size === void 0 ? 'md' : _ref$size,
52798
+ props = _objectWithoutProperties$1(_ref, _excluded$8);
52799
+ var helperTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
52800
+ return /*#__PURE__*/React__namespace.default.createElement(Radio$1, _extends$K({
52801
+ ref: ref,
52802
+ defaultChecked: defaultChecked,
52803
+ isChecked: isChecked,
52804
+ isDisabled: isDisabled,
52805
+ isFocusable: !isDisabled,
52806
+ value: value,
52807
+ size: size
52808
+ }, props), children, helperText && /*#__PURE__*/React__namespace.default.createElement(Box, {
52809
+ color: "gray.600",
52810
+ fontSize: helperTextSize
52811
+ }, helperText));
52812
+ });
52813
+ Radio.propTypes = {
52814
+ children: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]).isRequired,
52815
+ defaultChecked: PropTypes__default.default.bool,
52816
+ isChecked: PropTypes__default.default.bool,
52817
+ isDisabled: PropTypes__default.default.bool,
52818
+ value: PropTypes__default.default.string.isRequired,
52819
+ helperText: PropTypes__default.default.string,
52820
+ size: PropTypes__default.default.oneOf(['sm', 'md', 'lg'])
52821
+ };
52822
+
52823
+ var _excluded$7 = ["label", "errorMessage", "defaultValue", "isDisabled", "isInvalid", "isRequired", "name", "onChange", "value", "children", "direction"];
52824
+ var RadioGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52825
+ var label = _ref.label,
52826
+ errorMessage = _ref.errorMessage,
52827
+ defaultValue = _ref.defaultValue,
52828
+ isDisabled = _ref.isDisabled,
52829
+ isInvalid = _ref.isInvalid,
52830
+ isRequired = _ref.isRequired,
52831
+ name = _ref.name,
52832
+ onChange = _ref.onChange,
52833
+ value = _ref.value,
52834
+ children = _ref.children,
52835
+ direction = _ref.direction,
52836
+ props = _objectWithoutProperties$1(_ref, _excluded$7);
52837
+ return /*#__PURE__*/React__namespace.default.createElement(FormControl$1, {
52838
+ isInvalid: isInvalid,
52839
+ isDisabled: isDisabled,
52840
+ isRequired: isRequired,
52841
+ errorMessage: errorMessage,
52842
+ label: label,
52843
+ inputId: props.id,
52844
+ isFieldset: true
52845
+ }, /*#__PURE__*/React__namespace.default.createElement(RadioGroup$1, _extends$K({
52846
+ ref: ref,
52847
+ defaultValue: defaultValue,
52848
+ name: name,
52849
+ onChange: onChange,
52850
+ value: value
52851
+ }, props), /*#__PURE__*/React__namespace.default.createElement(Stack, {
52852
+ direction: direction ? direction : 'column',
52853
+ spacing: direction === 'row' ? 8 : 4
52854
+ }, children)));
52855
+ });
52856
+ RadioGroup.propTypes = {
52857
+ children: PropTypes__default.default.node,
52858
+ defaultValue: PropTypes__default.default.string,
52859
+ id: PropTypes__default.default.string.isRequired,
52860
+ label: PropTypes__default.default.string,
52861
+ errorMessage: PropTypes__default.default.string,
52862
+ isDisabled: PropTypes__default.default.bool,
52863
+ isInvalid: PropTypes__default.default.bool,
52864
+ isRequired: PropTypes__default.default.bool,
52865
+ name: PropTypes__default.default.string,
52866
+ onChange: PropTypes__default.default.func,
52867
+ value: PropTypes__default.default.string,
52868
+ direction: PropTypes__default.default.oneOf(['row', 'column'])
52869
+ };
52870
+
52871
+ var _excluded$6 = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size"];
52872
+ var SelectionCard = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52873
+ var isChecked = _ref.isChecked,
52874
+ isDisabled = _ref.isDisabled,
52875
+ value = _ref.value,
52876
+ helperText = _ref.helperText,
52877
+ expandableChildren = _ref.expandableChildren,
52878
+ defaultChecked = _ref.defaultChecked,
52879
+ isRadio = _ref.isRadio,
52880
+ label = _ref.label,
52881
+ isExpandable = _ref.isExpandable,
52882
+ _ref$size = _ref.size,
52883
+ size = _ref$size === void 0 ? 'md' : _ref$size,
52884
+ props = _objectWithoutProperties$1(_ref, _excluded$6);
52885
+ var Component = isRadio ? Radio : Checkbox;
52886
+ var expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
52887
+ var hasExpandableContent = isExpandable && isChecked && expandableChildren;
52888
+ return /*#__PURE__*/React__namespace.default.createElement(Box, {
52889
+ paddingBottom: hasExpandableContent ? 3 : 0,
52890
+ borderRadius: "lg",
52891
+ borderColor: isChecked ? 'primary.default' : 'gray.medium',
52892
+ borderWidth: "1px",
52893
+ _hover: {
52894
+ borderColor: isDisabled ? 'gray.medium' : 'primary.default'
52895
+ }
52896
+ }, /*#__PURE__*/React__namespace.default.createElement(Box, {
52897
+ borderColor: "gray.medium",
52898
+ borderBottomWidth: hasExpandableContent ? '1px' : 0
52899
+ }, /*#__PURE__*/React__namespace.default.createElement(Component, _extends$K({
52900
+ ref: ref,
52901
+ isChecked: isChecked,
52902
+ isDisabled: isDisabled,
52903
+ isFocusable: !isDisabled,
52904
+ value: value,
52905
+ defaultChecked: defaultChecked,
52906
+ helperText: helperText,
52907
+ size: size,
52908
+ width: "100%",
52909
+ paddingX: 4,
52910
+ paddingY: 3
52911
+ }, props), label)), hasExpandableContent && /*#__PURE__*/React__namespace.default.createElement(Box, {
52912
+ color: "gray.600",
52913
+ fontSize: expandableTextSize,
52914
+ paddingTop: 3,
52915
+ paddingX: 4
52916
+ }, expandableChildren));
52917
+ });
52918
+ SelectionCard.propTypes = {
52919
+ label: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]).isRequired,
52920
+ expandableChildren: PropTypes__default.default.oneOfType([PropTypes__default.default.string, PropTypes__default.default.element]),
52921
+ defaultChecked: PropTypes__default.default.bool,
52922
+ isChecked: PropTypes__default.default.bool,
52923
+ isDisabled: PropTypes__default.default.bool,
52924
+ value: PropTypes__default.default.string.isRequired,
52925
+ helperText: PropTypes__default.default.string,
52926
+ isRadio: PropTypes__default.default.bool,
52927
+ isExpandable: PropTypes__default.default.bool,
52928
+ size: PropTypes__default.default.oneOf(['sm', 'md', 'lg'])
52929
+ };
52930
+
52931
+ var _excluded$5 = ["variant", "colorScheme"];
52932
+ var Divider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52933
+ var variant = _ref.variant,
52934
+ borderColor = _ref.colorScheme,
52935
+ props = _objectWithoutProperties$1(_ref, _excluded$5);
52936
+ return /*#__PURE__*/React__namespace.default.createElement(Divider$1, _extends$K({}, colorScheme[borderColor], {
52937
+ variant: variant
52938
+ }, props, {
52939
+ ref: ref
52940
+ }));
52941
+ });
52942
+ Divider.propTypes = {
52943
+ /** Color scheme used */
52944
+ colorScheme: PropTypes__default.default.oneOf(['low', 'medium']),
52945
+ /** The styling that will be applied to the HR tag */
52946
+ variant: PropTypes__default.default.oneOf(['solid', 'dashed'])
52947
+ };
52948
+ Divider.defaultProps = {
52949
+ variant: 'solid',
52950
+ colorScheme: 'medium'
52951
+ };
52952
+
52953
+ var _excluded$4 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
52954
+ var Textarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52955
+ var label = _ref.label,
52956
+ helperText = _ref.helperText,
52957
+ errorMessage = _ref.errorMessage,
52958
+ isInvalid = _ref.isInvalid,
52959
+ isDisabled = _ref.isDisabled,
52960
+ isRequired = _ref.isRequired,
52961
+ isOptional = _ref.isOptional,
52962
+ customRequiredText = _ref.customRequiredText,
52963
+ props = _objectWithoutProperties$1(_ref, _excluded$4);
52964
+ var classes = cn__default.default({
52965
+ 'FormElement-contains-error': isInvalid
52966
+ });
52967
+ return /*#__PURE__*/React__namespace.default.createElement(FormControl$1, {
52968
+ isInvalid: isInvalid,
52969
+ isDisabled: isDisabled,
52970
+ isRequired: isRequired,
52971
+ isOptional: isOptional,
52972
+ errorMessage: errorMessage,
52973
+ helperText: helperText,
52974
+ label: label,
52975
+ inputId: props.id,
52976
+ customRequiredText: customRequiredText
52977
+ }, /*#__PURE__*/React__namespace.default.createElement(Textarea$1, _extends$K({
52978
+ ref: ref,
52979
+ className: classes
52980
+ }, props)));
52981
+ });
52982
+ Textarea.propTypes = {
52983
+ id: PropTypes__default.default.string.isRequired,
52984
+ label: PropTypes__default.default.string,
52985
+ helperText: PropTypes__default.default.string,
52986
+ errorMessage: PropTypes__default.default.string,
52987
+ isInvalid: PropTypes__default.default.bool,
52988
+ isDisabled: PropTypes__default.default.bool,
52989
+ isRequired: PropTypes__default.default.bool,
52990
+ isOptional: PropTypes__default.default.bool,
52991
+ customRequiredText: PropTypes__default.default.string
52992
+ };
52993
+
52994
+ var _excluded$3 = ["children"];
52995
+ var Popover = /*#__PURE__*/React.forwardRef(function (props, ref) {
52996
+ var children = props.children,
52997
+ rest = _objectWithoutProperties$1(props, _excluded$3);
52998
+ return /*#__PURE__*/React__namespace.default.createElement(Popover$1, _extends$K({}, rest, {
52999
+ ref: ref
53000
+ }), React.Children.toArray(children).map(function (child, index) {
53001
+ return /*#__PURE__*/React.cloneElement(child, {
53002
+ ref: ref,
53003
+ variant: props.variant,
53004
+ key: "Popover-child-".concat(index)
53005
+ });
53006
+ }));
53007
+ });
53008
+ Popover.propTypes = {
53009
+ /** React children */
53010
+ children: PropTypes__default.default.node,
53011
+ /** Styles the Popover */
53012
+ variant: PropTypes__default.default.oneOf(['light', 'dark'])
53013
+ };
53014
+
53015
+ var arrowStyles = function arrowStyles(_ref) {
53016
+ var variant = _ref.variant;
53017
+ return {
53018
+ backgroundColor: variant === 'dark' ? 'secondary.default' : 'white'
53019
+ };
53020
+ };
53021
+
53022
+ var PopoverArrow = /*#__PURE__*/React.forwardRef(function (props, ref) {
53023
+ return /*#__PURE__*/React__namespace.default.createElement(PopoverArrow$1, _extends$K({
53024
+ ref: ref
53025
+ }, props, arrowStyles(props)));
53026
+ });
53027
+
53028
+ var pseudoStyles = function pseudoStyles(variant) {
53029
+ return {
53030
+ bgColor: variant === 'dark' ? 'gray.600' : 'gray.50'
53031
+ };
53032
+ };
53033
+ var closeButtonStyles = function closeButtonStyles(_ref) {
53034
+ var variant = _ref.variant;
53035
+ return {
53036
+ color: variant === 'dark' ? 'white' : 'black',
53037
+ fontSize: '0.5rem',
53038
+ position: 'absolute',
53039
+ top: 0,
53040
+ right: 0,
53041
+ padding: 4,
53042
+ borderTopRightRadius: 4,
53043
+ _hover: pseudoStyles(variant),
53044
+ _focus: _objectSpread2$1(_objectSpread2$1({}, pseudoStyles(variant)), {}, {
53045
+ boxShadow: 'outline'
53046
+ })
53047
+ };
53048
+ };
53049
+
53050
+ var PopoverCloseButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
53051
+ return /*#__PURE__*/React__namespace.default.createElement(PopoverCloseButton$1, _extends$K({
53052
+ ref: ref
53053
+ }, props, closeButtonStyles(props)));
53054
+ });
53055
+
53056
+ var _excluded$2 = ["header", "variant", "children", "hideCloseButton", "hideArrow", "popoverBodyProps"];
53057
+ var PopoverContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
53058
+ var header = props.header,
53059
+ variant = props.variant,
53060
+ children = props.children,
53061
+ hideCloseButton = props.hideCloseButton,
53062
+ hideArrow = props.hideArrow,
53063
+ popoverBodyProps = props.popoverBodyProps,
53064
+ rest = _objectWithoutProperties$1(props, _excluded$2);
53065
+ return /*#__PURE__*/React__namespace.default.createElement(PopoverContent$1, _extends$K({}, rest, {
53066
+ ref: ref
53067
+ }), hideArrow ? null : /*#__PURE__*/React__namespace.default.createElement(PopoverArrow, {
53068
+ variant: variant
53069
+ }), hideCloseButton ? null : /*#__PURE__*/React__namespace.default.createElement(PopoverCloseButton, {
53070
+ variant: variant
53071
+ }), header ? /*#__PURE__*/React__namespace.default.createElement(PopoverHeader, null, header) : null, /*#__PURE__*/React__namespace.default.createElement(PopoverBody, popoverBodyProps, children));
53072
+ });
53073
+ PopoverContent.propTypes = {
53074
+ /** React children */
53075
+ children: PropTypes__default.default.node,
53076
+ /** Whether or not to hide the close button */
53077
+ hideCloseButton: PropTypes__default.default.bool,
53078
+ /** Whether or not to hide the arrow */
53079
+ hideArrow: PropTypes__default.default.bool,
53080
+ /** Styles the Popover */
53081
+ variant: PropTypes__default.default.oneOf(['light', 'dark']),
53082
+ /** The string or node for the header (optional) */
53083
+ header: PropTypes__default.default.oneOfType([PropTypes__default.default.node, PropTypes__default.default.string]),
53084
+ /** Props to pass to the PopoverBody */
53085
+ popoverBodyProps: PropTypes__default.default.object
53086
+ };
53087
+ PopoverContent.defaultProps = {
53088
+ variant: 'light',
53089
+ hideCloseButton: false,
53090
+ hideArrow: false
53091
+ };
53092
+
52917
53093
  var AutoSuggestSelect = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
52918
53094
  var id = _ref.id,
52919
53095
  label = _ref.label,
@@ -53497,6 +53673,7 @@ exports.Portal = Portal;
53497
53673
  exports.Progress = Progress;
53498
53674
  exports.Radio = Radio;
53499
53675
  exports.RadioGroup = RadioGroup;
53676
+ exports.RefreshedAutoSuggestSelect = AutoSuggestSelect$1;
53500
53677
  exports.RefreshedButtonInput = Button;
53501
53678
  exports.RefreshedFormControl = FormControl;
53502
53679
  exports.RefreshedInput = Input$1;