@spothero/ui 22.4.0 → 22.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -47435,7 +47435,6 @@ var controlStyles = {
47435
47435
  },
47436
47436
  _invalid: {
47437
47437
  '&:focus': {
47438
- borderBottomRadius: 0,
47439
47438
  borderColor: 'primary.default'
47440
47439
  },
47441
47440
  '&:focus + label': {
@@ -47485,7 +47484,9 @@ var controlStyles = {
47485
47484
  margin: 0,
47486
47485
  marginLeft: '1px'
47487
47486
  // marginTop: 2
47488
- })
47487
+ }),
47488
+ // Styling for async select
47489
+ '.chakra-input__group:has(.fe-ui-async-select__single-value) label': _objectSpread2$1({}, activeLabelStyles)
47489
47490
  },
47490
47491
  _focusWithin: {
47491
47492
  label: _objectSpread2$1({}, activeLabelStyles),
@@ -47750,422 +47751,117 @@ Button.propTypes = {
47750
47751
  buttonValue: PropTypes.string
47751
47752
  };
47752
47753
 
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'])
47754
+ var isBrowser$2 = typeof document !== 'undefined';
47755
+ var syncFallback = function syncFallback(create) {
47756
+ return create();
47786
47757
  };
47758
+ var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;
47759
+ var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
47760
+ var useInsertionEffectWithLayoutFallback = useInsertionEffect || useLayoutEffect;
47787
47761
 
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'])
47762
+ var isBrowser$1 = typeof document !== 'undefined';
47763
+ var hasOwnProperty = {}.hasOwnProperty;
47764
+ var EmotionCacheContext = /* #__PURE__ */createContext$1(
47765
+ // we're doing this to avoid preconstruct's dead code elimination in this one case
47766
+ // because this module is primarily intended for the browser and node
47767
+ // but it's also required in react native and similar environments sometimes
47768
+ // and we could have a special build just for that
47769
+ // but this is much easier and the native packages
47770
+ // might use a different theme context in the future anyway
47771
+ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
47772
+ key: 'css'
47773
+ }) : null);
47774
+ if (process.env.NODE_ENV !== 'production') {
47775
+ EmotionCacheContext.displayName = 'EmotionCacheContext';
47776
+ }
47777
+ EmotionCacheContext.Provider;
47778
+ var withEmotionCache = function withEmotionCache(func) {
47779
+ // $FlowFixMe
47780
+ return /*#__PURE__*/forwardRef$1(function (props, ref) {
47781
+ // the cache will never be null in the browser
47782
+ var cache = useContext(EmotionCacheContext);
47783
+ return func(props, cache, ref);
47784
+ });
47785
+ };
47786
+ if (!isBrowser$1) {
47787
+ withEmotionCache = function withEmotionCache(func) {
47788
+ return function (props) {
47789
+ var cache = useContext(EmotionCacheContext);
47790
+ if (cache === null) {
47791
+ // yes, we're potentially creating this on every render
47792
+ // it doesn't actually matter though since it's only on the server
47793
+ // so there will only every be a single render
47794
+ // that could change in the future because of suspense and etc. but for now,
47795
+ // this works and i don't want to optimise for a future thing that we aren't sure about
47796
+ cache = createCache({
47797
+ key: 'css'
47798
+ });
47799
+ return /*#__PURE__*/createElement(EmotionCacheContext.Provider, {
47800
+ value: cache
47801
+ }, func(props, cache));
47802
+ } else {
47803
+ return func(props, cache);
47804
+ }
47805
+ };
47806
+ };
47807
+ }
47808
+ var ThemeContext = /* #__PURE__ */createContext$1({});
47809
+ if (process.env.NODE_ENV !== 'production') {
47810
+ ThemeContext.displayName = 'EmotionThemeContext';
47811
+ }
47812
+ var getLastPart = function getLastPart(functionName) {
47813
+ // The match may be something like 'Object.createEmotionProps' or
47814
+ // 'Loader.prototype.render'
47815
+ var parts = functionName.split('.');
47816
+ return parts[parts.length - 1];
47834
47817
  };
47818
+ var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
47819
+ // V8
47820
+ var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
47821
+ if (match) return getLastPart(match[1]); // Safari / Firefox
47835
47822
 
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'])
47823
+ match = /^([A-Za-z0-9$.]+)@/.exec(line);
47824
+ if (match) return getLastPart(match[1]);
47825
+ return undefined;
47894
47826
  };
47827
+ var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
47828
+ // identifiers, thus we only need to replace what is a valid character for JS,
47829
+ // but not for CSS.
47895
47830
 
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'])
47831
+ var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
47832
+ return identifier.replace(/\$/g, '-');
47912
47833
  };
47913
- Divider.defaultProps = {
47914
- variant: 'solid',
47915
- colorScheme: 'medium'
47834
+ var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
47835
+ if (!stackTrace) return undefined;
47836
+ var lines = stackTrace.split('\n');
47837
+ for (var i = 0; i < lines.length; i++) {
47838
+ var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
47839
+
47840
+ if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
47841
+
47842
+ if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
47843
+ // uppercase letter
47844
+
47845
+ if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
47846
+ }
47847
+ return undefined;
47916
47848
  };
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
47849
+ var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
47850
+ var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
47851
+ var createEmotionProps = function createEmotionProps(type, props) {
47852
+ if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' &&
47853
+ // check if there is a css declaration
47854
+ props.css.indexOf(':') !== -1) {
47855
+ 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 + "`");
47856
+ }
47857
+ var newProps = {};
47858
+ for (var key in props) {
47859
+ if (hasOwnProperty.call(props, key)) {
47860
+ newProps[key] = props[key];
47861
+ }
47862
+ }
47863
+ newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
47864
+ // the label hasn't already been computed
48169
47865
 
48170
47866
  if (process.env.NODE_ENV !== 'production' && !!props.css && (_typeof$1(props.css) !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
48171
47867
  var label = getLabelFromStackTrace(new Error().stack);
@@ -49859,7 +49555,7 @@ var GroupHeading = function GroupHeading(props) {
49859
49555
  }, className)
49860
49556
  }, innerProps));
49861
49557
  };
49862
- var _excluded$5 = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
49558
+ var _excluded$c = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
49863
49559
  var inputCSS = function inputCSS(_ref) {
49864
49560
  var isDisabled = _ref.isDisabled,
49865
49561
  value = _ref.value,
@@ -49916,7 +49612,7 @@ var Input = function Input(props) {
49916
49612
  isDisabled = _cleanCommonProps.isDisabled,
49917
49613
  isHidden = _cleanCommonProps.isHidden,
49918
49614
  inputClassName = _cleanCommonProps.inputClassName,
49919
- innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$5);
49615
+ innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$c);
49920
49616
  return jsx("div", {
49921
49617
  className: cx({
49922
49618
  'input-container': true
@@ -50745,10 +50441,10 @@ var createFilter = function createFilter(config) {
50745
50441
  return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;
50746
50442
  };
50747
50443
  };
50748
- var _excluded$4 = ["innerRef"];
50444
+ var _excluded$b = ["innerRef"];
50749
50445
  function DummyInput(_ref) {
50750
50446
  var innerRef = _ref.innerRef,
50751
- props = _objectWithoutProperties(_ref, _excluded$4);
50447
+ props = _objectWithoutProperties(_ref, _excluded$b);
50752
50448
 
50753
50449
  // Remove animation props not meant for HTML elements
50754
50450
  var filteredProps = removeProps(props, 'onExited', 'in', 'enter', 'exit', 'appear');
@@ -52657,7 +52353,7 @@ var Select = /*#__PURE__*/function (_Component) {
52657
52353
  }(Component);
52658
52354
  Select.defaultProps = defaultProps;
52659
52355
 
52660
- var _excluded$3 = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
52356
+ var _excluded$a = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
52661
52357
  function useStateManager(_ref) {
52662
52358
  var _ref$defaultInputValu = _ref.defaultInputValue,
52663
52359
  defaultInputValue = _ref$defaultInputValu === void 0 ? '' : _ref$defaultInputValu,
@@ -52672,7 +52368,7 @@ function useStateManager(_ref) {
52672
52368
  propsOnMenuClose = _ref.onMenuClose,
52673
52369
  propsOnMenuOpen = _ref.onMenuOpen,
52674
52370
  propsValue = _ref.value,
52675
- restSelectProps = _objectWithoutProperties(_ref, _excluded$3);
52371
+ restSelectProps = _objectWithoutProperties(_ref, _excluded$a);
52676
52372
  var _useState = useState(propsInputValue !== undefined ? propsInputValue : defaultInputValue),
52677
52373
  _useState2 = _slicedToArray(_useState, 2),
52678
52374
  stateInputValue = _useState2[0],
@@ -52724,7 +52420,7 @@ function useStateManager(_ref) {
52724
52420
  });
52725
52421
  }
52726
52422
 
52727
- var _excluded$2 = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
52423
+ var _excluded$9 = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
52728
52424
  function useAsync(_ref) {
52729
52425
  var _ref$defaultOptions = _ref.defaultOptions,
52730
52426
  propsDefaultOptions = _ref$defaultOptions === void 0 ? false : _ref$defaultOptions,
@@ -52737,7 +52433,7 @@ function useAsync(_ref) {
52737
52433
  propsOnInputChange = _ref.onInputChange,
52738
52434
  _ref$filterOption = _ref.filterOption,
52739
52435
  filterOption = _ref$filterOption === void 0 ? null : _ref$filterOption,
52740
- restSelectProps = _objectWithoutProperties(_ref, _excluded$2);
52436
+ restSelectProps = _objectWithoutProperties(_ref, _excluded$9);
52741
52437
  var propsInputValue = restSelectProps.inputValue;
52742
52438
  var lastRequest = useRef(undefined);
52743
52439
  var mounted = useRef(false);
@@ -52889,6 +52585,491 @@ var SvgXCircle = function SvgXCircle(props, ref) {
52889
52585
  };
52890
52586
  var ForwardRef = /*#__PURE__*/forwardRef$1(SvgXCircle);
52891
52587
 
52588
+ var AutoSuggestSelect$1 = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52589
+ var id = _ref.id,
52590
+ label = _ref.label,
52591
+ helperText = _ref.helperText,
52592
+ errorMessage = _ref.errorMessage,
52593
+ isInvalid = _ref.isInvalid,
52594
+ isDisabled = _ref.isDisabled,
52595
+ isRequired = _ref.isRequired,
52596
+ getOptions = _ref.getOptions,
52597
+ onChange = _ref.onChange,
52598
+ placeholder = _ref.placeholder,
52599
+ _ref$defaultValue = _ref.defaultValue,
52600
+ defaultValue = _ref$defaultValue === void 0 ? null : _ref$defaultValue,
52601
+ leftElement = _ref.leftElement,
52602
+ leftElementStyles = _ref.leftElementStyles;
52603
+ var _useTheme = useTheme(),
52604
+ colors = _useTheme.colors,
52605
+ fontSizes = _useTheme.fontSizes,
52606
+ sizes = _useTheme.sizes;
52607
+ var handleChange = function handleChange(selectedOption) {
52608
+ onChange(selectedOption);
52609
+ };
52610
+ var baseText = {
52611
+ fontSize: fontSizes.base,
52612
+ color: colors.black
52613
+ };
52614
+
52615
+ /** 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 */
52616
+ var customStyles = {
52617
+ menu: function menu(provided) {
52618
+ return _objectSpread2$1(_objectSpread2$1({}, provided), baseText);
52619
+ },
52620
+ control: function control(provided, state) {
52621
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52622
+ borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary["default"] : colors.gray['200'],
52623
+ borderWidth: '1px',
52624
+ boxShadow: 'none',
52625
+ '&:hover': {
52626
+ borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary["default"] : colors.gray['300']
52627
+ }
52628
+ });
52629
+ },
52630
+ input: function input(provided, state) {
52631
+ return _objectSpread2$1(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, provided), baseText), {}, {
52632
+ paddingBottom: sizes['2'],
52633
+ paddingTop: sizes['5.5'],
52634
+ paddingRight: sizes['3'],
52635
+ backgroundColor: state.isDisabled ? colors.gray['200'] : 'transparent'
52636
+ }, leftElement ? {
52637
+ paddingLeft: sizes['10']
52638
+ } : {
52639
+ paddingLeft: sizes['3']
52640
+ }), {}, {
52641
+ cursor: state.isDisabled ? 'not-allowed' : !state.hasValue ? 'text' : 'auto'
52642
+ });
52643
+ },
52644
+ placeholder: function placeholder(provided) {
52645
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52646
+ padding: sizes['2'],
52647
+ fontSize: fontSizes.base,
52648
+ color: colors.gray['600']
52649
+ });
52650
+ },
52651
+ singleValue: function singleValue(provided) {
52652
+ return _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, provided), baseText), {}, {
52653
+ paddingBottom: sizes['2'],
52654
+ paddingTop: sizes['5.5'],
52655
+ paddingRight: sizes['3']
52656
+ }, leftElement ? {
52657
+ paddingLeft: sizes['10']
52658
+ } : {
52659
+ paddingLeft: sizes['3']
52660
+ });
52661
+ },
52662
+ option: function option(provided, state) {
52663
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52664
+ backgroundColor: state.isSelected ? colors.gray['200'] : state.isFocused ? colors.gray['50'] : 'transparent',
52665
+ color: colors.black
52666
+ });
52667
+ },
52668
+ clearIndicator: function clearIndicator(provided) {
52669
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52670
+ color: colors.gray['600']
52671
+ });
52672
+ },
52673
+ dropdownIndicator: function dropdownIndicator(provided) {
52674
+ return _objectSpread2$1(_objectSpread2$1({}, provided), {}, {
52675
+ color: colors.gray['600']
52676
+ });
52677
+ }
52678
+ };
52679
+ var clearIndicatorStyles = {
52680
+ width: sizes['5'],
52681
+ display: 'flex',
52682
+ marginRight: sizes['3'],
52683
+ color: colors.gray['600'],
52684
+ cursor: 'pointer'
52685
+ };
52686
+
52687
+ /** React Select allows you to override the clear indicator with your own custom component: https://react-select.com/components */
52688
+ var ClearIndicator = function ClearIndicator(_ref2) {
52689
+ var innerRef = _ref2.innerRef,
52690
+ innerProps = _ref2.innerProps;
52691
+ return /*#__PURE__*/React__default.createElement("div", _extends$K({
52692
+ style: clearIndicatorStyles,
52693
+ ref: innerRef
52694
+ }, innerProps), /*#__PURE__*/React__default.createElement(ForwardRef, null));
52695
+ };
52696
+ return /*#__PURE__*/React__default.createElement(Box, {
52697
+ sx: isInvalid ? {
52698
+ label: {
52699
+ color: 'error'
52700
+ }
52701
+ } : {}
52702
+ }, /*#__PURE__*/React__default.createElement(FormControl, {
52703
+ errorMessage: errorMessage,
52704
+ isRequired: isRequired,
52705
+ helperText: helperText,
52706
+ label: label,
52707
+ inputId: id,
52708
+ leftElement: leftElement,
52709
+ leftElementStyles: leftElementStyles
52710
+ }, /*#__PURE__*/React__default.createElement(AsyncSelect, {
52711
+ classNamePrefix: "fe-ui-async-select",
52712
+ closeMenuOnSelect: true,
52713
+ isClearable: true,
52714
+ cacheOptions: true,
52715
+ components: {
52716
+ DropdownIndicator: function DropdownIndicator() {
52717
+ return null;
52718
+ },
52719
+ IndicatorSeparator: function IndicatorSeparator() {
52720
+ return null;
52721
+ },
52722
+ ClearIndicator: ClearIndicator
52723
+ },
52724
+ openMenuOnClick: false,
52725
+ loadOptions: getOptions,
52726
+ onChange: handleChange,
52727
+ isDisabled: isDisabled,
52728
+ id: id,
52729
+ placeholder: placeholder,
52730
+ defaultValue: defaultValue,
52731
+ styles: customStyles,
52732
+ ref: ref
52733
+ })));
52734
+ });
52735
+ AutoSuggestSelect$1.propTypes = {
52736
+ /** ID applied to the select and label */
52737
+ id: PropTypes.string.isRequired,
52738
+ /** Label that describes the select */
52739
+ label: PropTypes.string,
52740
+ /** Text to use as placeholder in the input */
52741
+ placeholder: PropTypes.string,
52742
+ /** Optional helper text displayed below the select */
52743
+ helperText: PropTypes.string,
52744
+ /** Error message that would display under the select */
52745
+ errorMessage: PropTypes.string,
52746
+ /** Boolean that sets whether the select is valid */
52747
+ isInvalid: PropTypes.bool,
52748
+ /** Boolean that sets whether the select is disabled */
52749
+ isDisabled: PropTypes.bool,
52750
+ /** Boolean that sets whether the select is required */
52751
+ isRequired: PropTypes.bool,
52752
+ /** Function that is called with the value typed into the input that returns a list of options for the select */
52753
+ getOptions: PropTypes.func.isRequired,
52754
+ /** Function that is called when an option is selected, it returns the label and value of the selection */
52755
+ onChange: PropTypes.func.isRequired,
52756
+ // This prop is added to work around error: 'innerRef' is missing in props validation react/prop-types
52757
+ // eslint-disable-next-line react/no-unused-prop-types
52758
+ innerRef: PropTypes.object,
52759
+ // This prop is added to work around error: 'innerProps' is missing in props validation react/prop-types
52760
+ // eslint-disable-next-line react/no-unused-prop-types
52761
+ innerProps: PropTypes.object,
52762
+ // Element to display to the left of the input
52763
+ leftElement: PropTypes.element,
52764
+ // Styling of leftElement
52765
+ leftElementStyles: PropTypes.object
52766
+ };
52767
+
52768
+ var _excluded$8 = ["defaultChecked", "isChecked", "isDisabled", "value", "helperText", "children", "size"];
52769
+ var Radio = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52770
+ var defaultChecked = _ref.defaultChecked,
52771
+ isChecked = _ref.isChecked,
52772
+ isDisabled = _ref.isDisabled,
52773
+ value = _ref.value,
52774
+ helperText = _ref.helperText,
52775
+ children = _ref.children,
52776
+ _ref$size = _ref.size,
52777
+ size = _ref$size === void 0 ? 'md' : _ref$size,
52778
+ props = _objectWithoutProperties$1(_ref, _excluded$8);
52779
+ var helperTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
52780
+ return /*#__PURE__*/React__default.createElement(Radio$1, _extends$K({
52781
+ ref: ref,
52782
+ defaultChecked: defaultChecked,
52783
+ isChecked: isChecked,
52784
+ isDisabled: isDisabled,
52785
+ isFocusable: !isDisabled,
52786
+ value: value,
52787
+ size: size
52788
+ }, props), children, helperText && /*#__PURE__*/React__default.createElement(Box, {
52789
+ color: "gray.600",
52790
+ fontSize: helperTextSize
52791
+ }, helperText));
52792
+ });
52793
+ Radio.propTypes = {
52794
+ children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
52795
+ defaultChecked: PropTypes.bool,
52796
+ isChecked: PropTypes.bool,
52797
+ isDisabled: PropTypes.bool,
52798
+ value: PropTypes.string.isRequired,
52799
+ helperText: PropTypes.string,
52800
+ size: PropTypes.oneOf(['sm', 'md', 'lg'])
52801
+ };
52802
+
52803
+ var _excluded$7 = ["label", "errorMessage", "defaultValue", "isDisabled", "isInvalid", "isRequired", "name", "onChange", "value", "children", "direction"];
52804
+ var RadioGroup = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52805
+ var label = _ref.label,
52806
+ errorMessage = _ref.errorMessage,
52807
+ defaultValue = _ref.defaultValue,
52808
+ isDisabled = _ref.isDisabled,
52809
+ isInvalid = _ref.isInvalid,
52810
+ isRequired = _ref.isRequired,
52811
+ name = _ref.name,
52812
+ onChange = _ref.onChange,
52813
+ value = _ref.value,
52814
+ children = _ref.children,
52815
+ direction = _ref.direction,
52816
+ props = _objectWithoutProperties$1(_ref, _excluded$7);
52817
+ return /*#__PURE__*/React__default.createElement(FormControl$1, {
52818
+ isInvalid: isInvalid,
52819
+ isDisabled: isDisabled,
52820
+ isRequired: isRequired,
52821
+ errorMessage: errorMessage,
52822
+ label: label,
52823
+ inputId: props.id,
52824
+ isFieldset: true
52825
+ }, /*#__PURE__*/React__default.createElement(RadioGroup$1, _extends$K({
52826
+ ref: ref,
52827
+ defaultValue: defaultValue,
52828
+ name: name,
52829
+ onChange: onChange,
52830
+ value: value
52831
+ }, props), /*#__PURE__*/React__default.createElement(Stack, {
52832
+ direction: direction ? direction : 'column',
52833
+ spacing: direction === 'row' ? 8 : 4
52834
+ }, children)));
52835
+ });
52836
+ RadioGroup.propTypes = {
52837
+ children: PropTypes.node,
52838
+ defaultValue: PropTypes.string,
52839
+ id: PropTypes.string.isRequired,
52840
+ label: PropTypes.string,
52841
+ errorMessage: PropTypes.string,
52842
+ isDisabled: PropTypes.bool,
52843
+ isInvalid: PropTypes.bool,
52844
+ isRequired: PropTypes.bool,
52845
+ name: PropTypes.string,
52846
+ onChange: PropTypes.func,
52847
+ value: PropTypes.string,
52848
+ direction: PropTypes.oneOf(['row', 'column'])
52849
+ };
52850
+
52851
+ var _excluded$6 = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size"];
52852
+ var SelectionCard = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52853
+ var isChecked = _ref.isChecked,
52854
+ isDisabled = _ref.isDisabled,
52855
+ value = _ref.value,
52856
+ helperText = _ref.helperText,
52857
+ expandableChildren = _ref.expandableChildren,
52858
+ defaultChecked = _ref.defaultChecked,
52859
+ isRadio = _ref.isRadio,
52860
+ label = _ref.label,
52861
+ isExpandable = _ref.isExpandable,
52862
+ _ref$size = _ref.size,
52863
+ size = _ref$size === void 0 ? 'md' : _ref$size,
52864
+ props = _objectWithoutProperties$1(_ref, _excluded$6);
52865
+ var Component = isRadio ? Radio : Checkbox;
52866
+ var expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
52867
+ var hasExpandableContent = isExpandable && isChecked && expandableChildren;
52868
+ return /*#__PURE__*/React__default.createElement(Box, {
52869
+ paddingBottom: hasExpandableContent ? 3 : 0,
52870
+ borderRadius: "lg",
52871
+ borderColor: isChecked ? 'primary.default' : 'gray.medium',
52872
+ borderWidth: "1px",
52873
+ _hover: {
52874
+ borderColor: isDisabled ? 'gray.medium' : 'primary.default'
52875
+ }
52876
+ }, /*#__PURE__*/React__default.createElement(Box, {
52877
+ borderColor: "gray.medium",
52878
+ borderBottomWidth: hasExpandableContent ? '1px' : 0
52879
+ }, /*#__PURE__*/React__default.createElement(Component, _extends$K({
52880
+ ref: ref,
52881
+ isChecked: isChecked,
52882
+ isDisabled: isDisabled,
52883
+ isFocusable: !isDisabled,
52884
+ value: value,
52885
+ defaultChecked: defaultChecked,
52886
+ helperText: helperText,
52887
+ size: size,
52888
+ width: "100%",
52889
+ paddingX: 4,
52890
+ paddingY: 3
52891
+ }, props), label)), hasExpandableContent && /*#__PURE__*/React__default.createElement(Box, {
52892
+ color: "gray.600",
52893
+ fontSize: expandableTextSize,
52894
+ paddingTop: 3,
52895
+ paddingX: 4
52896
+ }, expandableChildren));
52897
+ });
52898
+ SelectionCard.propTypes = {
52899
+ label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
52900
+ expandableChildren: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
52901
+ defaultChecked: PropTypes.bool,
52902
+ isChecked: PropTypes.bool,
52903
+ isDisabled: PropTypes.bool,
52904
+ value: PropTypes.string.isRequired,
52905
+ helperText: PropTypes.string,
52906
+ isRadio: PropTypes.bool,
52907
+ isExpandable: PropTypes.bool,
52908
+ size: PropTypes.oneOf(['sm', 'md', 'lg'])
52909
+ };
52910
+
52911
+ var _excluded$5 = ["variant", "colorScheme"];
52912
+ var Divider = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52913
+ var variant = _ref.variant,
52914
+ borderColor = _ref.colorScheme,
52915
+ props = _objectWithoutProperties$1(_ref, _excluded$5);
52916
+ return /*#__PURE__*/React__default.createElement(Divider$1, _extends$K({}, colorScheme[borderColor], {
52917
+ variant: variant
52918
+ }, props, {
52919
+ ref: ref
52920
+ }));
52921
+ });
52922
+ Divider.propTypes = {
52923
+ /** Color scheme used */
52924
+ colorScheme: PropTypes.oneOf(['low', 'medium']),
52925
+ /** The styling that will be applied to the HR tag */
52926
+ variant: PropTypes.oneOf(['solid', 'dashed'])
52927
+ };
52928
+ Divider.defaultProps = {
52929
+ variant: 'solid',
52930
+ colorScheme: 'medium'
52931
+ };
52932
+
52933
+ var _excluded$4 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
52934
+ var Textarea = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52935
+ var label = _ref.label,
52936
+ helperText = _ref.helperText,
52937
+ errorMessage = _ref.errorMessage,
52938
+ isInvalid = _ref.isInvalid,
52939
+ isDisabled = _ref.isDisabled,
52940
+ isRequired = _ref.isRequired,
52941
+ isOptional = _ref.isOptional,
52942
+ customRequiredText = _ref.customRequiredText,
52943
+ props = _objectWithoutProperties$1(_ref, _excluded$4);
52944
+ var classes = cn({
52945
+ 'FormElement-contains-error': isInvalid
52946
+ });
52947
+ return /*#__PURE__*/React__default.createElement(FormControl$1, {
52948
+ isInvalid: isInvalid,
52949
+ isDisabled: isDisabled,
52950
+ isRequired: isRequired,
52951
+ isOptional: isOptional,
52952
+ errorMessage: errorMessage,
52953
+ helperText: helperText,
52954
+ label: label,
52955
+ inputId: props.id,
52956
+ customRequiredText: customRequiredText
52957
+ }, /*#__PURE__*/React__default.createElement(Textarea$1, _extends$K({
52958
+ ref: ref,
52959
+ className: classes
52960
+ }, props)));
52961
+ });
52962
+ Textarea.propTypes = {
52963
+ id: PropTypes.string.isRequired,
52964
+ label: PropTypes.string,
52965
+ helperText: PropTypes.string,
52966
+ errorMessage: PropTypes.string,
52967
+ isInvalid: PropTypes.bool,
52968
+ isDisabled: PropTypes.bool,
52969
+ isRequired: PropTypes.bool,
52970
+ isOptional: PropTypes.bool,
52971
+ customRequiredText: PropTypes.string
52972
+ };
52973
+
52974
+ var _excluded$3 = ["children"];
52975
+ var Popover = /*#__PURE__*/forwardRef$1(function (props, ref) {
52976
+ var children = props.children,
52977
+ rest = _objectWithoutProperties$1(props, _excluded$3);
52978
+ return /*#__PURE__*/React__default.createElement(Popover$1, _extends$K({}, rest, {
52979
+ ref: ref
52980
+ }), Children.toArray(children).map(function (child, index) {
52981
+ return /*#__PURE__*/cloneElement(child, {
52982
+ ref: ref,
52983
+ variant: props.variant,
52984
+ key: "Popover-child-".concat(index)
52985
+ });
52986
+ }));
52987
+ });
52988
+ Popover.propTypes = {
52989
+ /** React children */
52990
+ children: PropTypes.node,
52991
+ /** Styles the Popover */
52992
+ variant: PropTypes.oneOf(['light', 'dark'])
52993
+ };
52994
+
52995
+ var arrowStyles = function arrowStyles(_ref) {
52996
+ var variant = _ref.variant;
52997
+ return {
52998
+ backgroundColor: variant === 'dark' ? 'secondary.default' : 'white'
52999
+ };
53000
+ };
53001
+
53002
+ var PopoverArrow = /*#__PURE__*/forwardRef$1(function (props, ref) {
53003
+ return /*#__PURE__*/React__default.createElement(PopoverArrow$1, _extends$K({
53004
+ ref: ref
53005
+ }, props, arrowStyles(props)));
53006
+ });
53007
+
53008
+ var pseudoStyles = function pseudoStyles(variant) {
53009
+ return {
53010
+ bgColor: variant === 'dark' ? 'gray.600' : 'gray.50'
53011
+ };
53012
+ };
53013
+ var closeButtonStyles = function closeButtonStyles(_ref) {
53014
+ var variant = _ref.variant;
53015
+ return {
53016
+ color: variant === 'dark' ? 'white' : 'black',
53017
+ fontSize: '0.5rem',
53018
+ position: 'absolute',
53019
+ top: 0,
53020
+ right: 0,
53021
+ padding: 4,
53022
+ borderTopRightRadius: 4,
53023
+ _hover: pseudoStyles(variant),
53024
+ _focus: _objectSpread2$1(_objectSpread2$1({}, pseudoStyles(variant)), {}, {
53025
+ boxShadow: 'outline'
53026
+ })
53027
+ };
53028
+ };
53029
+
53030
+ var PopoverCloseButton = /*#__PURE__*/forwardRef$1(function (props, ref) {
53031
+ return /*#__PURE__*/React__default.createElement(PopoverCloseButton$1, _extends$K({
53032
+ ref: ref
53033
+ }, props, closeButtonStyles(props)));
53034
+ });
53035
+
53036
+ var _excluded$2 = ["header", "variant", "children", "hideCloseButton", "hideArrow", "popoverBodyProps"];
53037
+ var PopoverContent = /*#__PURE__*/forwardRef$1(function (props, ref) {
53038
+ var header = props.header,
53039
+ variant = props.variant,
53040
+ children = props.children,
53041
+ hideCloseButton = props.hideCloseButton,
53042
+ hideArrow = props.hideArrow,
53043
+ popoverBodyProps = props.popoverBodyProps,
53044
+ rest = _objectWithoutProperties$1(props, _excluded$2);
53045
+ return /*#__PURE__*/React__default.createElement(PopoverContent$1, _extends$K({}, rest, {
53046
+ ref: ref
53047
+ }), hideArrow ? null : /*#__PURE__*/React__default.createElement(PopoverArrow, {
53048
+ variant: variant
53049
+ }), hideCloseButton ? null : /*#__PURE__*/React__default.createElement(PopoverCloseButton, {
53050
+ variant: variant
53051
+ }), header ? /*#__PURE__*/React__default.createElement(PopoverHeader, null, header) : null, /*#__PURE__*/React__default.createElement(PopoverBody, popoverBodyProps, children));
53052
+ });
53053
+ PopoverContent.propTypes = {
53054
+ /** React children */
53055
+ children: PropTypes.node,
53056
+ /** Whether or not to hide the close button */
53057
+ hideCloseButton: PropTypes.bool,
53058
+ /** Whether or not to hide the arrow */
53059
+ hideArrow: PropTypes.bool,
53060
+ /** Styles the Popover */
53061
+ variant: PropTypes.oneOf(['light', 'dark']),
53062
+ /** The string or node for the header (optional) */
53063
+ header: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
53064
+ /** Props to pass to the PopoverBody */
53065
+ popoverBodyProps: PropTypes.object
53066
+ };
53067
+ PopoverContent.defaultProps = {
53068
+ variant: 'light',
53069
+ hideCloseButton: false,
53070
+ hideArrow: false
53071
+ };
53072
+
52892
53073
  var AutoSuggestSelect = /*#__PURE__*/forwardRef$1(function (_ref, ref) {
52893
53074
  var id = _ref.id,
52894
53075
  label = _ref.label,
@@ -53394,5 +53575,5 @@ Menu.propTypes = {
53394
53575
  children: PropTypes.node
53395
53576
  };
53396
53577
 
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 };
53578
+ 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
53579
  //# sourceMappingURL=index.esm.js.map