@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.esm.js CHANGED
@@ -47485,7 +47485,9 @@ var controlStyles = {
47485
47485
  margin: 0,
47486
47486
  marginLeft: '1px'
47487
47487
  // marginTop: 2
47488
- })
47488
+ }),
47489
+ // Styling for async select
47490
+ '.chakra-input__group:has(.fe-ui-async-select__single-value) label': _objectSpread2$1({}, activeLabelStyles)
47489
47491
  },
47490
47492
  _focusWithin: {
47491
47493
  label: _objectSpread2$1({}, activeLabelStyles),
@@ -47750,422 +47752,117 @@ Button.propTypes = {
47750
47752
  buttonValue: PropTypes.string
47751
47753
  };
47752
47754
 
47753
- var _excluded$c = ["defaultChecked", "isChecked", "isDisabled", "value", "helperText", "children", "size"];
47754
- var Radio = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
47755
- var defaultChecked = _ref.defaultChecked,
47756
- isChecked = _ref.isChecked,
47757
- isDisabled = _ref.isDisabled,
47758
- value = _ref.value,
47759
- helperText = _ref.helperText,
47760
- children = _ref.children,
47761
- _ref$size = _ref.size,
47762
- size = _ref$size === void 0 ? 'md' : _ref$size,
47763
- props = _objectWithoutProperties$1(_ref, _excluded$c);
47764
- var helperTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
47765
- return /*#__PURE__*/React__default.createElement(Radio$1, _extends$K({
47766
- ref: ref,
47767
- defaultChecked: defaultChecked,
47768
- isChecked: isChecked,
47769
- isDisabled: isDisabled,
47770
- isFocusable: !isDisabled,
47771
- value: value,
47772
- size: size
47773
- }, props), children, helperText && /*#__PURE__*/React__default.createElement(Box, {
47774
- color: "gray.600",
47775
- fontSize: helperTextSize
47776
- }, helperText));
47777
- });
47778
- Radio.propTypes = {
47779
- children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
47780
- defaultChecked: PropTypes.bool,
47781
- isChecked: PropTypes.bool,
47782
- isDisabled: PropTypes.bool,
47783
- value: PropTypes.string.isRequired,
47784
- helperText: PropTypes.string,
47785
- size: PropTypes.oneOf(['sm', 'md', 'lg'])
47755
+ var isBrowser$2 = typeof document !== 'undefined';
47756
+ var syncFallback = function syncFallback(create) {
47757
+ return create();
47786
47758
  };
47759
+ var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;
47760
+ var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
47761
+ var useInsertionEffectWithLayoutFallback = useInsertionEffect || useLayoutEffect;
47787
47762
 
47788
- var _excluded$b = ["label", "errorMessage", "defaultValue", "isDisabled", "isInvalid", "isRequired", "name", "onChange", "value", "children", "direction"];
47789
- var RadioGroup = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
47790
- var label = _ref.label,
47791
- errorMessage = _ref.errorMessage,
47792
- defaultValue = _ref.defaultValue,
47793
- isDisabled = _ref.isDisabled,
47794
- isInvalid = _ref.isInvalid,
47795
- isRequired = _ref.isRequired,
47796
- name = _ref.name,
47797
- onChange = _ref.onChange,
47798
- value = _ref.value,
47799
- children = _ref.children,
47800
- direction = _ref.direction,
47801
- props = _objectWithoutProperties$1(_ref, _excluded$b);
47802
- return /*#__PURE__*/React__default.createElement(FormControl$1, {
47803
- isInvalid: isInvalid,
47804
- isDisabled: isDisabled,
47805
- isRequired: isRequired,
47806
- errorMessage: errorMessage,
47807
- label: label,
47808
- inputId: props.id,
47809
- isFieldset: true
47810
- }, /*#__PURE__*/React__default.createElement(RadioGroup$1, _extends$K({
47811
- ref: ref,
47812
- defaultValue: defaultValue,
47813
- name: name,
47814
- onChange: onChange,
47815
- value: value
47816
- }, props), /*#__PURE__*/React__default.createElement(Stack, {
47817
- direction: direction ? direction : 'column',
47818
- spacing: direction === 'row' ? 8 : 4
47819
- }, children)));
47820
- });
47821
- RadioGroup.propTypes = {
47822
- children: PropTypes.node,
47823
- defaultValue: PropTypes.string,
47824
- id: PropTypes.string.isRequired,
47825
- label: PropTypes.string,
47826
- errorMessage: PropTypes.string,
47827
- isDisabled: PropTypes.bool,
47828
- isInvalid: PropTypes.bool,
47829
- isRequired: PropTypes.bool,
47830
- name: PropTypes.string,
47831
- onChange: PropTypes.func,
47832
- value: PropTypes.string,
47833
- direction: PropTypes.oneOf(['row', 'column'])
47763
+ var isBrowser$1 = typeof document !== 'undefined';
47764
+ var hasOwnProperty = {}.hasOwnProperty;
47765
+ var EmotionCacheContext = /* #__PURE__ */createContext$1(
47766
+ // we're doing this to avoid preconstruct's dead code elimination in this one case
47767
+ // because this module is primarily intended for the browser and node
47768
+ // but it's also required in react native and similar environments sometimes
47769
+ // and we could have a special build just for that
47770
+ // but this is much easier and the native packages
47771
+ // might use a different theme context in the future anyway
47772
+ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
47773
+ key: 'css'
47774
+ }) : null);
47775
+ if (process.env.NODE_ENV !== 'production') {
47776
+ EmotionCacheContext.displayName = 'EmotionCacheContext';
47777
+ }
47778
+ EmotionCacheContext.Provider;
47779
+ var withEmotionCache = function withEmotionCache(func) {
47780
+ // $FlowFixMe
47781
+ return /*#__PURE__*/forwardRef$1(function (props, ref) {
47782
+ // the cache will never be null in the browser
47783
+ var cache = useContext(EmotionCacheContext);
47784
+ return func(props, cache, ref);
47785
+ });
47786
+ };
47787
+ if (!isBrowser$1) {
47788
+ withEmotionCache = function withEmotionCache(func) {
47789
+ return function (props) {
47790
+ var cache = useContext(EmotionCacheContext);
47791
+ if (cache === null) {
47792
+ // yes, we're potentially creating this on every render
47793
+ // it doesn't actually matter though since it's only on the server
47794
+ // so there will only every be a single render
47795
+ // that could change in the future because of suspense and etc. but for now,
47796
+ // this works and i don't want to optimise for a future thing that we aren't sure about
47797
+ cache = createCache({
47798
+ key: 'css'
47799
+ });
47800
+ return /*#__PURE__*/createElement(EmotionCacheContext.Provider, {
47801
+ value: cache
47802
+ }, func(props, cache));
47803
+ } else {
47804
+ return func(props, cache);
47805
+ }
47806
+ };
47807
+ };
47808
+ }
47809
+ var ThemeContext = /* #__PURE__ */createContext$1({});
47810
+ if (process.env.NODE_ENV !== 'production') {
47811
+ ThemeContext.displayName = 'EmotionThemeContext';
47812
+ }
47813
+ var getLastPart = function getLastPart(functionName) {
47814
+ // The match may be something like 'Object.createEmotionProps' or
47815
+ // 'Loader.prototype.render'
47816
+ var parts = functionName.split('.');
47817
+ return parts[parts.length - 1];
47834
47818
  };
47819
+ var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
47820
+ // V8
47821
+ var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
47822
+ if (match) return getLastPart(match[1]); // Safari / Firefox
47835
47823
 
47836
- var _excluded$a = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size"];
47837
- var SelectionCard = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
47838
- var isChecked = _ref.isChecked,
47839
- isDisabled = _ref.isDisabled,
47840
- value = _ref.value,
47841
- helperText = _ref.helperText,
47842
- expandableChildren = _ref.expandableChildren,
47843
- defaultChecked = _ref.defaultChecked,
47844
- isRadio = _ref.isRadio,
47845
- label = _ref.label,
47846
- isExpandable = _ref.isExpandable,
47847
- _ref$size = _ref.size,
47848
- size = _ref$size === void 0 ? 'md' : _ref$size,
47849
- props = _objectWithoutProperties$1(_ref, _excluded$a);
47850
- var Component = isRadio ? Radio : Checkbox;
47851
- var expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
47852
- var hasExpandableContent = isExpandable && isChecked && expandableChildren;
47853
- return /*#__PURE__*/React__default.createElement(Box, {
47854
- paddingBottom: hasExpandableContent ? 3 : 0,
47855
- borderRadius: "lg",
47856
- borderColor: isChecked ? 'primary.default' : 'gray.medium',
47857
- borderWidth: "1px",
47858
- _hover: {
47859
- borderColor: isDisabled ? 'gray.medium' : 'primary.default'
47860
- }
47861
- }, /*#__PURE__*/React__default.createElement(Box, {
47862
- borderColor: "gray.medium",
47863
- borderBottomWidth: hasExpandableContent ? '1px' : 0
47864
- }, /*#__PURE__*/React__default.createElement(Component, _extends$K({
47865
- ref: ref,
47866
- isChecked: isChecked,
47867
- isDisabled: isDisabled,
47868
- isFocusable: !isDisabled,
47869
- value: value,
47870
- defaultChecked: defaultChecked,
47871
- helperText: helperText,
47872
- size: size,
47873
- width: "100%",
47874
- paddingX: 4,
47875
- paddingY: 3
47876
- }, props), label)), hasExpandableContent && /*#__PURE__*/React__default.createElement(Box, {
47877
- color: "gray.600",
47878
- fontSize: expandableTextSize,
47879
- paddingTop: 3,
47880
- paddingX: 4
47881
- }, expandableChildren));
47882
- });
47883
- SelectionCard.propTypes = {
47884
- label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
47885
- expandableChildren: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
47886
- defaultChecked: PropTypes.bool,
47887
- isChecked: PropTypes.bool,
47888
- isDisabled: PropTypes.bool,
47889
- value: PropTypes.string.isRequired,
47890
- helperText: PropTypes.string,
47891
- isRadio: PropTypes.bool,
47892
- isExpandable: PropTypes.bool,
47893
- size: PropTypes.oneOf(['sm', 'md', 'lg'])
47824
+ match = /^([A-Za-z0-9$.]+)@/.exec(line);
47825
+ if (match) return getLastPart(match[1]);
47826
+ return undefined;
47894
47827
  };
47828
+ var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
47829
+ // identifiers, thus we only need to replace what is a valid character for JS,
47830
+ // but not for CSS.
47895
47831
 
47896
- var _excluded$9 = ["variant", "colorScheme"];
47897
- var Divider = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
47898
- var variant = _ref.variant,
47899
- borderColor = _ref.colorScheme,
47900
- props = _objectWithoutProperties$1(_ref, _excluded$9);
47901
- return /*#__PURE__*/React__default.createElement(Divider$1, _extends$K({}, colorScheme[borderColor], {
47902
- variant: variant
47903
- }, props, {
47904
- ref: ref
47905
- }));
47906
- });
47907
- Divider.propTypes = {
47908
- /** Color scheme used */
47909
- colorScheme: PropTypes.oneOf(['low', 'medium']),
47910
- /** The styling that will be applied to the HR tag */
47911
- variant: PropTypes.oneOf(['solid', 'dashed'])
47832
+ var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
47833
+ return identifier.replace(/\$/g, '-');
47912
47834
  };
47913
- Divider.defaultProps = {
47914
- variant: 'solid',
47915
- colorScheme: 'medium'
47835
+ var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
47836
+ if (!stackTrace) return undefined;
47837
+ var lines = stackTrace.split('\n');
47838
+ for (var i = 0; i < lines.length; i++) {
47839
+ var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
47840
+
47841
+ if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
47842
+
47843
+ if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
47844
+ // uppercase letter
47845
+
47846
+ if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
47847
+ }
47848
+ return undefined;
47916
47849
  };
47917
-
47918
- var _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
47919
- var Textarea = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
47920
- var label = _ref.label,
47921
- helperText = _ref.helperText,
47922
- errorMessage = _ref.errorMessage,
47923
- isInvalid = _ref.isInvalid,
47924
- isDisabled = _ref.isDisabled,
47925
- isRequired = _ref.isRequired,
47926
- isOptional = _ref.isOptional,
47927
- customRequiredText = _ref.customRequiredText,
47928
- props = _objectWithoutProperties$1(_ref, _excluded$8);
47929
- var classes = cn({
47930
- 'FormElement-contains-error': isInvalid
47931
- });
47932
- return /*#__PURE__*/React__default.createElement(FormControl$1, {
47933
- isInvalid: isInvalid,
47934
- isDisabled: isDisabled,
47935
- isRequired: isRequired,
47936
- isOptional: isOptional,
47937
- errorMessage: errorMessage,
47938
- helperText: helperText,
47939
- label: label,
47940
- inputId: props.id,
47941
- customRequiredText: customRequiredText
47942
- }, /*#__PURE__*/React__default.createElement(Textarea$1, _extends$K({
47943
- ref: ref,
47944
- className: classes
47945
- }, props)));
47946
- });
47947
- Textarea.propTypes = {
47948
- id: PropTypes.string.isRequired,
47949
- label: PropTypes.string,
47950
- helperText: PropTypes.string,
47951
- errorMessage: PropTypes.string,
47952
- isInvalid: PropTypes.bool,
47953
- isDisabled: PropTypes.bool,
47954
- isRequired: PropTypes.bool,
47955
- isOptional: PropTypes.bool,
47956
- customRequiredText: PropTypes.string
47957
- };
47958
-
47959
- var _excluded$7 = ["children"];
47960
- var Popover = /*#__PURE__*/forwardRef$1(function (props, ref) {
47961
- var children = props.children,
47962
- rest = _objectWithoutProperties$1(props, _excluded$7);
47963
- return /*#__PURE__*/React__default.createElement(Popover$1, _extends$K({}, rest, {
47964
- ref: ref
47965
- }), Children.toArray(children).map(function (child, index) {
47966
- return /*#__PURE__*/cloneElement(child, {
47967
- ref: ref,
47968
- variant: props.variant,
47969
- key: "Popover-child-".concat(index)
47970
- });
47971
- }));
47972
- });
47973
- Popover.propTypes = {
47974
- /** React children */
47975
- children: PropTypes.node,
47976
- /** Styles the Popover */
47977
- variant: PropTypes.oneOf(['light', 'dark'])
47978
- };
47979
-
47980
- var arrowStyles = function arrowStyles(_ref) {
47981
- var variant = _ref.variant;
47982
- return {
47983
- backgroundColor: variant === 'dark' ? 'secondary.default' : 'white'
47984
- };
47985
- };
47986
-
47987
- var PopoverArrow = /*#__PURE__*/forwardRef$1(function (props, ref) {
47988
- return /*#__PURE__*/React__default.createElement(PopoverArrow$1, _extends$K({
47989
- ref: ref
47990
- }, props, arrowStyles(props)));
47991
- });
47992
-
47993
- var pseudoStyles = function pseudoStyles(variant) {
47994
- return {
47995
- bgColor: variant === 'dark' ? 'gray.600' : 'gray.50'
47996
- };
47997
- };
47998
- var closeButtonStyles = function closeButtonStyles(_ref) {
47999
- var variant = _ref.variant;
48000
- return {
48001
- color: variant === 'dark' ? 'white' : 'black',
48002
- fontSize: '0.5rem',
48003
- position: 'absolute',
48004
- top: 0,
48005
- right: 0,
48006
- padding: 4,
48007
- borderTopRightRadius: 4,
48008
- _hover: pseudoStyles(variant),
48009
- _focus: _objectSpread2$1(_objectSpread2$1({}, pseudoStyles(variant)), {}, {
48010
- boxShadow: 'outline'
48011
- })
48012
- };
48013
- };
48014
-
48015
- var PopoverCloseButton = /*#__PURE__*/forwardRef$1(function (props, ref) {
48016
- return /*#__PURE__*/React__default.createElement(PopoverCloseButton$1, _extends$K({
48017
- ref: ref
48018
- }, props, closeButtonStyles(props)));
48019
- });
48020
-
48021
- var _excluded$6 = ["header", "variant", "children", "hideCloseButton", "hideArrow", "popoverBodyProps"];
48022
- var PopoverContent = /*#__PURE__*/forwardRef$1(function (props, ref) {
48023
- var header = props.header,
48024
- variant = props.variant,
48025
- children = props.children,
48026
- hideCloseButton = props.hideCloseButton,
48027
- hideArrow = props.hideArrow,
48028
- popoverBodyProps = props.popoverBodyProps,
48029
- rest = _objectWithoutProperties$1(props, _excluded$6);
48030
- return /*#__PURE__*/React__default.createElement(PopoverContent$1, _extends$K({}, rest, {
48031
- ref: ref
48032
- }), hideArrow ? null : /*#__PURE__*/React__default.createElement(PopoverArrow, {
48033
- variant: variant
48034
- }), hideCloseButton ? null : /*#__PURE__*/React__default.createElement(PopoverCloseButton, {
48035
- variant: variant
48036
- }), header ? /*#__PURE__*/React__default.createElement(PopoverHeader, null, header) : null, /*#__PURE__*/React__default.createElement(PopoverBody, popoverBodyProps, children));
48037
- });
48038
- PopoverContent.propTypes = {
48039
- /** React children */
48040
- children: PropTypes.node,
48041
- /** Whether or not to hide the close button */
48042
- hideCloseButton: PropTypes.bool,
48043
- /** Whether or not to hide the arrow */
48044
- hideArrow: PropTypes.bool,
48045
- /** Styles the Popover */
48046
- variant: PropTypes.oneOf(['light', 'dark']),
48047
- /** The string or node for the header (optional) */
48048
- header: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
48049
- /** Props to pass to the PopoverBody */
48050
- popoverBodyProps: PropTypes.object
48051
- };
48052
- PopoverContent.defaultProps = {
48053
- variant: 'light',
48054
- hideCloseButton: false,
48055
- hideArrow: false
48056
- };
48057
-
48058
- var isBrowser$2 = typeof document !== 'undefined';
48059
- var syncFallback = function syncFallback(create) {
48060
- return create();
48061
- };
48062
- var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;
48063
- var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
48064
- var useInsertionEffectWithLayoutFallback = useInsertionEffect || useLayoutEffect;
48065
-
48066
- var isBrowser$1 = typeof document !== 'undefined';
48067
- var hasOwnProperty = {}.hasOwnProperty;
48068
- var EmotionCacheContext = /* #__PURE__ */createContext$1(
48069
- // we're doing this to avoid preconstruct's dead code elimination in this one case
48070
- // because this module is primarily intended for the browser and node
48071
- // but it's also required in react native and similar environments sometimes
48072
- // and we could have a special build just for that
48073
- // but this is much easier and the native packages
48074
- // might use a different theme context in the future anyway
48075
- typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
48076
- key: 'css'
48077
- }) : null);
48078
- if (process.env.NODE_ENV !== 'production') {
48079
- EmotionCacheContext.displayName = 'EmotionCacheContext';
48080
- }
48081
- EmotionCacheContext.Provider;
48082
- var withEmotionCache = function withEmotionCache(func) {
48083
- // $FlowFixMe
48084
- return /*#__PURE__*/forwardRef$1(function (props, ref) {
48085
- // the cache will never be null in the browser
48086
- var cache = useContext(EmotionCacheContext);
48087
- return func(props, cache, ref);
48088
- });
48089
- };
48090
- if (!isBrowser$1) {
48091
- withEmotionCache = function withEmotionCache(func) {
48092
- return function (props) {
48093
- var cache = useContext(EmotionCacheContext);
48094
- if (cache === null) {
48095
- // yes, we're potentially creating this on every render
48096
- // it doesn't actually matter though since it's only on the server
48097
- // so there will only every be a single render
48098
- // that could change in the future because of suspense and etc. but for now,
48099
- // this works and i don't want to optimise for a future thing that we aren't sure about
48100
- cache = createCache({
48101
- key: 'css'
48102
- });
48103
- return /*#__PURE__*/createElement(EmotionCacheContext.Provider, {
48104
- value: cache
48105
- }, func(props, cache));
48106
- } else {
48107
- return func(props, cache);
48108
- }
48109
- };
48110
- };
48111
- }
48112
- var ThemeContext = /* #__PURE__ */createContext$1({});
48113
- if (process.env.NODE_ENV !== 'production') {
48114
- ThemeContext.displayName = 'EmotionThemeContext';
48115
- }
48116
- var getLastPart = function getLastPart(functionName) {
48117
- // The match may be something like 'Object.createEmotionProps' or
48118
- // 'Loader.prototype.render'
48119
- var parts = functionName.split('.');
48120
- return parts[parts.length - 1];
48121
- };
48122
- var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
48123
- // V8
48124
- var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
48125
- if (match) return getLastPart(match[1]); // Safari / Firefox
48126
-
48127
- match = /^([A-Za-z0-9$.]+)@/.exec(line);
48128
- if (match) return getLastPart(match[1]);
48129
- return undefined;
48130
- };
48131
- var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
48132
- // identifiers, thus we only need to replace what is a valid character for JS,
48133
- // but not for CSS.
48134
-
48135
- var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
48136
- return identifier.replace(/\$/g, '-');
48137
- };
48138
- var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
48139
- if (!stackTrace) return undefined;
48140
- var lines = stackTrace.split('\n');
48141
- for (var i = 0; i < lines.length; i++) {
48142
- var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
48143
-
48144
- if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
48145
-
48146
- if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
48147
- // uppercase letter
48148
-
48149
- if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
48150
- }
48151
- return undefined;
48152
- };
48153
- var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
48154
- var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
48155
- var createEmotionProps = function createEmotionProps(type, props) {
48156
- if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' &&
48157
- // check if there is a css declaration
48158
- props.css.indexOf(':') !== -1) {
48159
- 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 + "`");
48160
- }
48161
- var newProps = {};
48162
- for (var key in props) {
48163
- if (hasOwnProperty.call(props, key)) {
48164
- newProps[key] = props[key];
48165
- }
48166
- }
48167
- newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
48168
- // the label hasn't already been computed
47850
+ var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
47851
+ var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
47852
+ var createEmotionProps = function createEmotionProps(type, props) {
47853
+ if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' &&
47854
+ // check if there is a css declaration
47855
+ props.css.indexOf(':') !== -1) {
47856
+ 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 + "`");
47857
+ }
47858
+ var newProps = {};
47859
+ for (var key in props) {
47860
+ if (hasOwnProperty.call(props, key)) {
47861
+ newProps[key] = props[key];
47862
+ }
47863
+ }
47864
+ newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
47865
+ // the label hasn't already been computed
48169
47866
 
48170
47867
  if (process.env.NODE_ENV !== 'production' && !!props.css && (_typeof$1(props.css) !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
48171
47868
  var label = getLabelFromStackTrace(new Error().stack);
@@ -49859,7 +49556,7 @@ var GroupHeading = function GroupHeading(props) {
49859
49556
  }, className)
49860
49557
  }, innerProps));
49861
49558
  };
49862
- var _excluded$5 = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
49559
+ var _excluded$c = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
49863
49560
  var inputCSS = function inputCSS(_ref) {
49864
49561
  var isDisabled = _ref.isDisabled,
49865
49562
  value = _ref.value,
@@ -49916,7 +49613,7 @@ var Input = function Input(props) {
49916
49613
  isDisabled = _cleanCommonProps.isDisabled,
49917
49614
  isHidden = _cleanCommonProps.isHidden,
49918
49615
  inputClassName = _cleanCommonProps.inputClassName,
49919
- innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$5);
49616
+ innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$c);
49920
49617
  return jsx("div", {
49921
49618
  className: cx({
49922
49619
  'input-container': true
@@ -50745,10 +50442,10 @@ var createFilter = function createFilter(config) {
50745
50442
  return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;
50746
50443
  };
50747
50444
  };
50748
- var _excluded$4 = ["innerRef"];
50445
+ var _excluded$b = ["innerRef"];
50749
50446
  function DummyInput(_ref) {
50750
50447
  var innerRef = _ref.innerRef,
50751
- props = _objectWithoutProperties(_ref, _excluded$4);
50448
+ props = _objectWithoutProperties(_ref, _excluded$b);
50752
50449
 
50753
50450
  // Remove animation props not meant for HTML elements
50754
50451
  var filteredProps = removeProps(props, 'onExited', 'in', 'enter', 'exit', 'appear');
@@ -52657,7 +52354,7 @@ var Select = /*#__PURE__*/function (_Component) {
52657
52354
  }(Component);
52658
52355
  Select.defaultProps = defaultProps;
52659
52356
 
52660
- var _excluded$3 = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
52357
+ var _excluded$a = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
52661
52358
  function useStateManager(_ref) {
52662
52359
  var _ref$defaultInputValu = _ref.defaultInputValue,
52663
52360
  defaultInputValue = _ref$defaultInputValu === void 0 ? '' : _ref$defaultInputValu,
@@ -52672,7 +52369,7 @@ function useStateManager(_ref) {
52672
52369
  propsOnMenuClose = _ref.onMenuClose,
52673
52370
  propsOnMenuOpen = _ref.onMenuOpen,
52674
52371
  propsValue = _ref.value,
52675
- restSelectProps = _objectWithoutProperties(_ref, _excluded$3);
52372
+ restSelectProps = _objectWithoutProperties(_ref, _excluded$a);
52676
52373
  var _useState = useState(propsInputValue !== undefined ? propsInputValue : defaultInputValue),
52677
52374
  _useState2 = _slicedToArray(_useState, 2),
52678
52375
  stateInputValue = _useState2[0],
@@ -52724,7 +52421,7 @@ function useStateManager(_ref) {
52724
52421
  });
52725
52422
  }
52726
52423
 
52727
- var _excluded$2 = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
52424
+ var _excluded$9 = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
52728
52425
  function useAsync(_ref) {
52729
52426
  var _ref$defaultOptions = _ref.defaultOptions,
52730
52427
  propsDefaultOptions = _ref$defaultOptions === void 0 ? false : _ref$defaultOptions,
@@ -52737,7 +52434,7 @@ function useAsync(_ref) {
52737
52434
  propsOnInputChange = _ref.onInputChange,
52738
52435
  _ref$filterOption = _ref.filterOption,
52739
52436
  filterOption = _ref$filterOption === void 0 ? null : _ref$filterOption,
52740
- restSelectProps = _objectWithoutProperties(_ref, _excluded$2);
52437
+ restSelectProps = _objectWithoutProperties(_ref, _excluded$9);
52741
52438
  var propsInputValue = restSelectProps.inputValue;
52742
52439
  var lastRequest = useRef(undefined);
52743
52440
  var mounted = useRef(false);
@@ -52889,6 +52586,485 @@ var SvgXCircle = function SvgXCircle(props, ref) {
52889
52586
  };
52890
52587
  var ForwardRef = /*#__PURE__*/forwardRef$1(SvgXCircle);
52891
52588
 
52589
+ var AutoSuggestSelect$1 = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52590
+ var id = _ref.id,
52591
+ label = _ref.label,
52592
+ helperText = _ref.helperText,
52593
+ errorMessage = _ref.errorMessage,
52594
+ isInvalid = _ref.isInvalid,
52595
+ isDisabled = _ref.isDisabled,
52596
+ isRequired = _ref.isRequired,
52597
+ getOptions = _ref.getOptions,
52598
+ onChange = _ref.onChange,
52599
+ placeholder = _ref.placeholder,
52600
+ _ref$defaultValue = _ref.defaultValue,
52601
+ defaultValue = _ref$defaultValue === void 0 ? null : _ref$defaultValue,
52602
+ leftElement = _ref.leftElement,
52603
+ leftElementStyles = _ref.leftElementStyles;
52604
+ var _useTheme = useTheme(),
52605
+ colors = _useTheme.colors,
52606
+ fontSizes = _useTheme.fontSizes,
52607
+ sizes = _useTheme.sizes;
52608
+ var handleChange = function handleChange(selectedOption) {
52609
+ onChange(selectedOption);
52610
+ };
52611
+ var baseText = {
52612
+ fontSize: fontSizes.base,
52613
+ color: colors.black
52614
+ };
52615
+
52616
+ /** 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 */
52617
+ var customStyles = {
52618
+ menu: function menu(provided) {
52619
+ return _objectSpread2$1(_objectSpread2$1({}, provided), baseText);
52620
+ },
52621
+ control: function control(provided, state) {
52622
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52623
+ borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary["default"] : colors.gray['200'],
52624
+ borderWidth: '1px',
52625
+ boxShadow: 'none',
52626
+ '&:hover': {
52627
+ borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary["default"] : colors.gray['300']
52628
+ }
52629
+ });
52630
+ },
52631
+ input: function input(provided, state) {
52632
+ return _objectSpread2$1(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, provided), baseText), {}, {
52633
+ paddingBottom: sizes['2'],
52634
+ paddingTop: sizes['5.5'],
52635
+ paddingRight: sizes['3'],
52636
+ backgroundColor: state.isDisabled ? colors.gray['200'] : 'transparent'
52637
+ }, leftElement ? {
52638
+ paddingLeft: sizes['10']
52639
+ } : {
52640
+ paddingLeft: sizes['3']
52641
+ }), {}, {
52642
+ cursor: state.isDisabled ? 'not-allowed' : !state.hasValue ? 'text' : 'auto'
52643
+ });
52644
+ },
52645
+ placeholder: function placeholder(provided) {
52646
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52647
+ padding: sizes['2'],
52648
+ fontSize: fontSizes.base,
52649
+ color: colors.gray['600']
52650
+ });
52651
+ },
52652
+ singleValue: function singleValue(provided) {
52653
+ return _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, provided), baseText), {}, {
52654
+ paddingBottom: sizes['2'],
52655
+ paddingTop: sizes['5.5'],
52656
+ paddingRight: sizes['3']
52657
+ }, leftElement ? {
52658
+ paddingLeft: sizes['10']
52659
+ } : {
52660
+ paddingLeft: sizes['3']
52661
+ });
52662
+ },
52663
+ option: function option(provided, state) {
52664
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52665
+ backgroundColor: state.isSelected ? colors.gray['200'] : state.isFocused ? colors.gray['50'] : 'transparent',
52666
+ color: colors.black
52667
+ });
52668
+ },
52669
+ clearIndicator: function clearIndicator(provided) {
52670
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52671
+ color: colors.gray['600']
52672
+ });
52673
+ },
52674
+ dropdownIndicator: function dropdownIndicator(provided) {
52675
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52676
+ color: colors.gray['600']
52677
+ });
52678
+ }
52679
+ };
52680
+ var clearIndicatorStyles = {
52681
+ width: sizes['5'],
52682
+ display: 'flex',
52683
+ marginRight: sizes['3'],
52684
+ color: colors.gray['600'],
52685
+ cursor: 'pointer'
52686
+ };
52687
+
52688
+ /** React Select allows you to override the clear indicator with your own custom component: https://react-select.com/components */
52689
+ var ClearIndicator = function ClearIndicator(_ref2) {
52690
+ var innerRef = _ref2.innerRef,
52691
+ innerProps = _ref2.innerProps;
52692
+ return /*#__PURE__*/React__default.createElement("div", _extends$K({
52693
+ style: clearIndicatorStyles,
52694
+ ref: innerRef
52695
+ }, innerProps), /*#__PURE__*/React__default.createElement(ForwardRef, null));
52696
+ };
52697
+ return /*#__PURE__*/React__default.createElement(FormControl, {
52698
+ errorMessage: errorMessage,
52699
+ isRequired: isRequired,
52700
+ helperText: helperText,
52701
+ label: label,
52702
+ inputId: id,
52703
+ leftElement: leftElement,
52704
+ leftElementStyles: leftElementStyles
52705
+ }, /*#__PURE__*/React__default.createElement(AsyncSelect, {
52706
+ classNamePrefix: "fe-ui-async-select",
52707
+ closeMenuOnSelect: true,
52708
+ isClearable: true,
52709
+ cacheOptions: true,
52710
+ components: {
52711
+ DropdownIndicator: function DropdownIndicator() {
52712
+ return null;
52713
+ },
52714
+ IndicatorSeparator: function IndicatorSeparator() {
52715
+ return null;
52716
+ },
52717
+ ClearIndicator: ClearIndicator
52718
+ },
52719
+ openMenuOnClick: false,
52720
+ loadOptions: getOptions,
52721
+ onChange: handleChange,
52722
+ isDisabled: isDisabled,
52723
+ id: id,
52724
+ placeholder: placeholder,
52725
+ defaultValue: defaultValue,
52726
+ styles: customStyles,
52727
+ ref: ref
52728
+ }));
52729
+ });
52730
+ AutoSuggestSelect$1.propTypes = {
52731
+ /** ID applied to the select and label */
52732
+ id: PropTypes.string.isRequired,
52733
+ /** Label that describes the select */
52734
+ label: PropTypes.string,
52735
+ /** Text to use as placeholder in the input */
52736
+ placeholder: PropTypes.string,
52737
+ /** Optional helper text displayed below the select */
52738
+ helperText: PropTypes.string,
52739
+ /** Error message that would display under the select */
52740
+ errorMessage: PropTypes.string,
52741
+ /** Boolean that sets whether the select is valid */
52742
+ isInvalid: PropTypes.bool,
52743
+ /** Boolean that sets whether the select is disabled */
52744
+ isDisabled: PropTypes.bool,
52745
+ /** Boolean that sets whether the select is required */
52746
+ isRequired: PropTypes.bool,
52747
+ /** Function that is called with the value typed into the input that returns a list of options for the select */
52748
+ getOptions: PropTypes.func.isRequired,
52749
+ /** Function that is called when an option is selected, it returns the label and value of the selection */
52750
+ onChange: PropTypes.func.isRequired,
52751
+ // This prop is added to work around error: 'innerRef' is missing in props validation react/prop-types
52752
+ // eslint-disable-next-line react/no-unused-prop-types
52753
+ innerRef: PropTypes.object,
52754
+ // This prop is added to work around error: 'innerProps' is missing in props validation react/prop-types
52755
+ // eslint-disable-next-line react/no-unused-prop-types
52756
+ innerProps: PropTypes.object,
52757
+ // Element to display to the left of the input
52758
+ leftElement: PropTypes.element,
52759
+ // Styling of leftElement
52760
+ leftElementStyles: PropTypes.object
52761
+ };
52762
+
52763
+ var _excluded$8 = ["defaultChecked", "isChecked", "isDisabled", "value", "helperText", "children", "size"];
52764
+ var Radio = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52765
+ var defaultChecked = _ref.defaultChecked,
52766
+ isChecked = _ref.isChecked,
52767
+ isDisabled = _ref.isDisabled,
52768
+ value = _ref.value,
52769
+ helperText = _ref.helperText,
52770
+ children = _ref.children,
52771
+ _ref$size = _ref.size,
52772
+ size = _ref$size === void 0 ? 'md' : _ref$size,
52773
+ props = _objectWithoutProperties$1(_ref, _excluded$8);
52774
+ var helperTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
52775
+ return /*#__PURE__*/React__default.createElement(Radio$1, _extends$K({
52776
+ ref: ref,
52777
+ defaultChecked: defaultChecked,
52778
+ isChecked: isChecked,
52779
+ isDisabled: isDisabled,
52780
+ isFocusable: !isDisabled,
52781
+ value: value,
52782
+ size: size
52783
+ }, props), children, helperText && /*#__PURE__*/React__default.createElement(Box, {
52784
+ color: "gray.600",
52785
+ fontSize: helperTextSize
52786
+ }, helperText));
52787
+ });
52788
+ Radio.propTypes = {
52789
+ children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
52790
+ defaultChecked: PropTypes.bool,
52791
+ isChecked: PropTypes.bool,
52792
+ isDisabled: PropTypes.bool,
52793
+ value: PropTypes.string.isRequired,
52794
+ helperText: PropTypes.string,
52795
+ size: PropTypes.oneOf(['sm', 'md', 'lg'])
52796
+ };
52797
+
52798
+ var _excluded$7 = ["label", "errorMessage", "defaultValue", "isDisabled", "isInvalid", "isRequired", "name", "onChange", "value", "children", "direction"];
52799
+ var RadioGroup = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52800
+ var label = _ref.label,
52801
+ errorMessage = _ref.errorMessage,
52802
+ defaultValue = _ref.defaultValue,
52803
+ isDisabled = _ref.isDisabled,
52804
+ isInvalid = _ref.isInvalid,
52805
+ isRequired = _ref.isRequired,
52806
+ name = _ref.name,
52807
+ onChange = _ref.onChange,
52808
+ value = _ref.value,
52809
+ children = _ref.children,
52810
+ direction = _ref.direction,
52811
+ props = _objectWithoutProperties$1(_ref, _excluded$7);
52812
+ return /*#__PURE__*/React__default.createElement(FormControl$1, {
52813
+ isInvalid: isInvalid,
52814
+ isDisabled: isDisabled,
52815
+ isRequired: isRequired,
52816
+ errorMessage: errorMessage,
52817
+ label: label,
52818
+ inputId: props.id,
52819
+ isFieldset: true
52820
+ }, /*#__PURE__*/React__default.createElement(RadioGroup$1, _extends$K({
52821
+ ref: ref,
52822
+ defaultValue: defaultValue,
52823
+ name: name,
52824
+ onChange: onChange,
52825
+ value: value
52826
+ }, props), /*#__PURE__*/React__default.createElement(Stack, {
52827
+ direction: direction ? direction : 'column',
52828
+ spacing: direction === 'row' ? 8 : 4
52829
+ }, children)));
52830
+ });
52831
+ RadioGroup.propTypes = {
52832
+ children: PropTypes.node,
52833
+ defaultValue: PropTypes.string,
52834
+ id: PropTypes.string.isRequired,
52835
+ label: PropTypes.string,
52836
+ errorMessage: PropTypes.string,
52837
+ isDisabled: PropTypes.bool,
52838
+ isInvalid: PropTypes.bool,
52839
+ isRequired: PropTypes.bool,
52840
+ name: PropTypes.string,
52841
+ onChange: PropTypes.func,
52842
+ value: PropTypes.string,
52843
+ direction: PropTypes.oneOf(['row', 'column'])
52844
+ };
52845
+
52846
+ var _excluded$6 = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size"];
52847
+ var SelectionCard = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52848
+ var isChecked = _ref.isChecked,
52849
+ isDisabled = _ref.isDisabled,
52850
+ value = _ref.value,
52851
+ helperText = _ref.helperText,
52852
+ expandableChildren = _ref.expandableChildren,
52853
+ defaultChecked = _ref.defaultChecked,
52854
+ isRadio = _ref.isRadio,
52855
+ label = _ref.label,
52856
+ isExpandable = _ref.isExpandable,
52857
+ _ref$size = _ref.size,
52858
+ size = _ref$size === void 0 ? 'md' : _ref$size,
52859
+ props = _objectWithoutProperties$1(_ref, _excluded$6);
52860
+ var Component = isRadio ? Radio : Checkbox;
52861
+ var expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
52862
+ var hasExpandableContent = isExpandable && isChecked && expandableChildren;
52863
+ return /*#__PURE__*/React__default.createElement(Box, {
52864
+ paddingBottom: hasExpandableContent ? 3 : 0,
52865
+ borderRadius: "lg",
52866
+ borderColor: isChecked ? 'primary.default' : 'gray.medium',
52867
+ borderWidth: "1px",
52868
+ _hover: {
52869
+ borderColor: isDisabled ? 'gray.medium' : 'primary.default'
52870
+ }
52871
+ }, /*#__PURE__*/React__default.createElement(Box, {
52872
+ borderColor: "gray.medium",
52873
+ borderBottomWidth: hasExpandableContent ? '1px' : 0
52874
+ }, /*#__PURE__*/React__default.createElement(Component, _extends$K({
52875
+ ref: ref,
52876
+ isChecked: isChecked,
52877
+ isDisabled: isDisabled,
52878
+ isFocusable: !isDisabled,
52879
+ value: value,
52880
+ defaultChecked: defaultChecked,
52881
+ helperText: helperText,
52882
+ size: size,
52883
+ width: "100%",
52884
+ paddingX: 4,
52885
+ paddingY: 3
52886
+ }, props), label)), hasExpandableContent && /*#__PURE__*/React__default.createElement(Box, {
52887
+ color: "gray.600",
52888
+ fontSize: expandableTextSize,
52889
+ paddingTop: 3,
52890
+ paddingX: 4
52891
+ }, expandableChildren));
52892
+ });
52893
+ SelectionCard.propTypes = {
52894
+ label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
52895
+ expandableChildren: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
52896
+ defaultChecked: PropTypes.bool,
52897
+ isChecked: PropTypes.bool,
52898
+ isDisabled: PropTypes.bool,
52899
+ value: PropTypes.string.isRequired,
52900
+ helperText: PropTypes.string,
52901
+ isRadio: PropTypes.bool,
52902
+ isExpandable: PropTypes.bool,
52903
+ size: PropTypes.oneOf(['sm', 'md', 'lg'])
52904
+ };
52905
+
52906
+ var _excluded$5 = ["variant", "colorScheme"];
52907
+ var Divider = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52908
+ var variant = _ref.variant,
52909
+ borderColor = _ref.colorScheme,
52910
+ props = _objectWithoutProperties$1(_ref, _excluded$5);
52911
+ return /*#__PURE__*/React__default.createElement(Divider$1, _extends$K({}, colorScheme[borderColor], {
52912
+ variant: variant
52913
+ }, props, {
52914
+ ref: ref
52915
+ }));
52916
+ });
52917
+ Divider.propTypes = {
52918
+ /** Color scheme used */
52919
+ colorScheme: PropTypes.oneOf(['low', 'medium']),
52920
+ /** The styling that will be applied to the HR tag */
52921
+ variant: PropTypes.oneOf(['solid', 'dashed'])
52922
+ };
52923
+ Divider.defaultProps = {
52924
+ variant: 'solid',
52925
+ colorScheme: 'medium'
52926
+ };
52927
+
52928
+ var _excluded$4 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
52929
+ var Textarea = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52930
+ var label = _ref.label,
52931
+ helperText = _ref.helperText,
52932
+ errorMessage = _ref.errorMessage,
52933
+ isInvalid = _ref.isInvalid,
52934
+ isDisabled = _ref.isDisabled,
52935
+ isRequired = _ref.isRequired,
52936
+ isOptional = _ref.isOptional,
52937
+ customRequiredText = _ref.customRequiredText,
52938
+ props = _objectWithoutProperties$1(_ref, _excluded$4);
52939
+ var classes = cn({
52940
+ 'FormElement-contains-error': isInvalid
52941
+ });
52942
+ return /*#__PURE__*/React__default.createElement(FormControl$1, {
52943
+ isInvalid: isInvalid,
52944
+ isDisabled: isDisabled,
52945
+ isRequired: isRequired,
52946
+ isOptional: isOptional,
52947
+ errorMessage: errorMessage,
52948
+ helperText: helperText,
52949
+ label: label,
52950
+ inputId: props.id,
52951
+ customRequiredText: customRequiredText
52952
+ }, /*#__PURE__*/React__default.createElement(Textarea$1, _extends$K({
52953
+ ref: ref,
52954
+ className: classes
52955
+ }, props)));
52956
+ });
52957
+ Textarea.propTypes = {
52958
+ id: PropTypes.string.isRequired,
52959
+ label: PropTypes.string,
52960
+ helperText: PropTypes.string,
52961
+ errorMessage: PropTypes.string,
52962
+ isInvalid: PropTypes.bool,
52963
+ isDisabled: PropTypes.bool,
52964
+ isRequired: PropTypes.bool,
52965
+ isOptional: PropTypes.bool,
52966
+ customRequiredText: PropTypes.string
52967
+ };
52968
+
52969
+ var _excluded$3 = ["children"];
52970
+ var Popover = /*#__PURE__*/forwardRef$1(function (props, ref) {
52971
+ var children = props.children,
52972
+ rest = _objectWithoutProperties$1(props, _excluded$3);
52973
+ return /*#__PURE__*/React__default.createElement(Popover$1, _extends$K({}, rest, {
52974
+ ref: ref
52975
+ }), Children.toArray(children).map(function (child, index) {
52976
+ return /*#__PURE__*/cloneElement(child, {
52977
+ ref: ref,
52978
+ variant: props.variant,
52979
+ key: "Popover-child-".concat(index)
52980
+ });
52981
+ }));
52982
+ });
52983
+ Popover.propTypes = {
52984
+ /** React children */
52985
+ children: PropTypes.node,
52986
+ /** Styles the Popover */
52987
+ variant: PropTypes.oneOf(['light', 'dark'])
52988
+ };
52989
+
52990
+ var arrowStyles = function arrowStyles(_ref) {
52991
+ var variant = _ref.variant;
52992
+ return {
52993
+ backgroundColor: variant === 'dark' ? 'secondary.default' : 'white'
52994
+ };
52995
+ };
52996
+
52997
+ var PopoverArrow = /*#__PURE__*/forwardRef$1(function (props, ref) {
52998
+ return /*#__PURE__*/React__default.createElement(PopoverArrow$1, _extends$K({
52999
+ ref: ref
53000
+ }, props, arrowStyles(props)));
53001
+ });
53002
+
53003
+ var pseudoStyles = function pseudoStyles(variant) {
53004
+ return {
53005
+ bgColor: variant === 'dark' ? 'gray.600' : 'gray.50'
53006
+ };
53007
+ };
53008
+ var closeButtonStyles = function closeButtonStyles(_ref) {
53009
+ var variant = _ref.variant;
53010
+ return {
53011
+ color: variant === 'dark' ? 'white' : 'black',
53012
+ fontSize: '0.5rem',
53013
+ position: 'absolute',
53014
+ top: 0,
53015
+ right: 0,
53016
+ padding: 4,
53017
+ borderTopRightRadius: 4,
53018
+ _hover: pseudoStyles(variant),
53019
+ _focus: _objectSpread2$1(_objectSpread2$1({}, pseudoStyles(variant)), {}, {
53020
+ boxShadow: 'outline'
53021
+ })
53022
+ };
53023
+ };
53024
+
53025
+ var PopoverCloseButton = /*#__PURE__*/forwardRef$1(function (props, ref) {
53026
+ return /*#__PURE__*/React__default.createElement(PopoverCloseButton$1, _extends$K({
53027
+ ref: ref
53028
+ }, props, closeButtonStyles(props)));
53029
+ });
53030
+
53031
+ var _excluded$2 = ["header", "variant", "children", "hideCloseButton", "hideArrow", "popoverBodyProps"];
53032
+ var PopoverContent = /*#__PURE__*/forwardRef$1(function (props, ref) {
53033
+ var header = props.header,
53034
+ variant = props.variant,
53035
+ children = props.children,
53036
+ hideCloseButton = props.hideCloseButton,
53037
+ hideArrow = props.hideArrow,
53038
+ popoverBodyProps = props.popoverBodyProps,
53039
+ rest = _objectWithoutProperties$1(props, _excluded$2);
53040
+ return /*#__PURE__*/React__default.createElement(PopoverContent$1, _extends$K({}, rest, {
53041
+ ref: ref
53042
+ }), hideArrow ? null : /*#__PURE__*/React__default.createElement(PopoverArrow, {
53043
+ variant: variant
53044
+ }), hideCloseButton ? null : /*#__PURE__*/React__default.createElement(PopoverCloseButton, {
53045
+ variant: variant
53046
+ }), header ? /*#__PURE__*/React__default.createElement(PopoverHeader, null, header) : null, /*#__PURE__*/React__default.createElement(PopoverBody, popoverBodyProps, children));
53047
+ });
53048
+ PopoverContent.propTypes = {
53049
+ /** React children */
53050
+ children: PropTypes.node,
53051
+ /** Whether or not to hide the close button */
53052
+ hideCloseButton: PropTypes.bool,
53053
+ /** Whether or not to hide the arrow */
53054
+ hideArrow: PropTypes.bool,
53055
+ /** Styles the Popover */
53056
+ variant: PropTypes.oneOf(['light', 'dark']),
53057
+ /** The string or node for the header (optional) */
53058
+ header: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
53059
+ /** Props to pass to the PopoverBody */
53060
+ popoverBodyProps: PropTypes.object
53061
+ };
53062
+ PopoverContent.defaultProps = {
53063
+ variant: 'light',
53064
+ hideCloseButton: false,
53065
+ hideArrow: false
53066
+ };
53067
+
52892
53068
  var AutoSuggestSelect = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52893
53069
  var id = _ref.id,
52894
53070
  label = _ref.label,
@@ -53394,5 +53570,5 @@ Menu.propTypes = {
53394
53570
  children: PropTypes.node
53395
53571
  };
53396
53572
 
53397
- export { Accordion, AccordionActionButton, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Alert, AspectRatio, AutoSuggestSelect, Badge$1 as Badge, Input$4 as BasicInput, Textarea$1 as BasicTextarea, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button$1 as Button, ButtonGroup, Card, Center, Checkbox, CheckboxGroup, Circle$1 as Circle, Code, Collapse, Container, CreatableSelect$1 as CreatableSelect, Divider, Drawer, ModalBody as DrawerBody, ModalCloseButton as DrawerCloseButton, Drawer$1 as DrawerContainer, DrawerContent, ModalFooter as DrawerFooter, ModalHeader as DrawerHeader, ModalOverlay as DrawerOverlay, Fade, Flex, Grid, GridItem, HStack, Heading, Icon, Image$1 as Image, Input$2 as Input, InputGroup, InputLeftAddon, InputLeftElement, InputRightAddon, InputRightElement, Kbd, Link, LinkBox, LinkOverlay, List, ListItem, Loader, Menu, MenuButton, MenuDivider, MenuGroup, MenuItem, MenuItemOption, MenuList$1 as MenuList, MenuOptionGroup, Modal, ModalBody, ModalFooter, ModalHeader, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, Portal, Progress, Radio, RadioGroup, Button as RefreshedButtonInput, FormControl as RefreshedFormControl, Input$1 as RefreshedInput, Select$1 as RefreshedSelectInput, ScaleFade, Select$2 as Select, SelectionCard, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, Slide, SlideFade, Spinner, Square, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, TableContainer, Tabs, Tbody, Td, Text, Textarea, Tfoot, Th, Thead, ThemeProvider, ToggleButtonGroup, Tooltip, Tr, VStack, createIcon, keyframes$3 as keyframes, useBreakpointValue, useClipboard, useControllableProp, useControllableState, useDisclosure, useMediaQuery, usePopper, usePrefersReducedMotion, useStyleConfig, useTheme, useToast, useToken };
53573
+ export { Accordion, AccordionActionButton, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Alert, AspectRatio, AutoSuggestSelect, Badge$1 as Badge, Input$4 as BasicInput, Textarea$1 as BasicTextarea, Box, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Button$1 as Button, ButtonGroup, Card, Center, Checkbox, CheckboxGroup, Circle$1 as Circle, Code, Collapse, Container, CreatableSelect$1 as CreatableSelect, Divider, Drawer, ModalBody as DrawerBody, ModalCloseButton as DrawerCloseButton, Drawer$1 as DrawerContainer, DrawerContent, ModalFooter as DrawerFooter, ModalHeader as DrawerHeader, ModalOverlay as DrawerOverlay, Fade, Flex, Grid, GridItem, HStack, Heading, Icon, Image$1 as Image, Input$2 as Input, InputGroup, InputLeftAddon, InputLeftElement, InputRightAddon, InputRightElement, Kbd, Link, LinkBox, LinkOverlay, List, ListItem, Loader, Menu, MenuButton, MenuDivider, MenuGroup, MenuItem, MenuItemOption, MenuList$1 as MenuList, MenuOptionGroup, Modal, ModalBody, ModalFooter, ModalHeader, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, Portal, Progress, Radio, RadioGroup, AutoSuggestSelect$1 as RefreshedAutoSuggestSelect, Button as RefreshedButtonInput, FormControl as RefreshedFormControl, Input$1 as RefreshedInput, Select$1 as RefreshedSelectInput, ScaleFade, Select$2 as Select, SelectionCard, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, Slide, SlideFade, Spinner, Square, Switch, Tab, TabList, TabPanel, TabPanels, Table, TableCaption, TableContainer, Tabs, Tbody, Td, Text, Textarea, Tfoot, Th, Thead, ThemeProvider, ToggleButtonGroup, Tooltip, Tr, VStack, createIcon, keyframes$3 as keyframes, useBreakpointValue, useClipboard, useControllableProp, useControllableState, useDisclosure, useMediaQuery, usePopper, usePrefersReducedMotion, useStyleConfig, useTheme, useToast, useToken };
53398
53574
  //# sourceMappingURL=index.esm.js.map