@spothero/ui 25.5.1 → 25.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +242 -54
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +240 -54
- package/dist/index.esm.js.map +1 -1
- package/package.json +13 -11
package/dist/index.d.ts
CHANGED
|
@@ -178,6 +178,9 @@ export const RadioGroup: React.ComponentType<any>;
|
|
|
178
178
|
// AutoSuggestSelect (Phase 4d - not yet converted)
|
|
179
179
|
export const AutoSuggestSelect: React.ComponentType<any>;
|
|
180
180
|
|
|
181
|
+
// FilterSelect (Phase 4d - not yet converted)
|
|
182
|
+
export const FilterSelect: React.ComponentType<any>;
|
|
183
|
+
|
|
181
184
|
// Badge (Phase 2b - not yet converted)
|
|
182
185
|
export const Badge: React.ComponentType<any>;
|
|
183
186
|
|
package/dist/index.esm.js
CHANGED
|
@@ -10,8 +10,8 @@ import template from 'lodash/template';
|
|
|
10
10
|
import cn from 'classnames';
|
|
11
11
|
import AsyncSelect from 'react-select/async';
|
|
12
12
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
13
|
+
import Select$3, { components as components$1 } from 'react-select';
|
|
13
14
|
import Creatable from 'react-select/creatable';
|
|
14
|
-
import { components as components$1 } from 'react-select';
|
|
15
15
|
|
|
16
16
|
function _defineProperty(e, r, t) {
|
|
17
17
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
@@ -1008,7 +1008,7 @@ const props = {
|
|
|
1008
1008
|
variant: PropTypes.oneOf(Object.keys(variants$d))
|
|
1009
1009
|
};
|
|
1010
1010
|
|
|
1011
|
-
const _excluded$
|
|
1011
|
+
const _excluded$r = ["asAnchor", "isExternal", "height"];
|
|
1012
1012
|
const anchorProps = function () {
|
|
1013
1013
|
let isExternal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
1014
1014
|
return _objectSpread2({
|
|
@@ -1025,7 +1025,7 @@ const Button$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1025
1025
|
isExternal,
|
|
1026
1026
|
height = 'md'
|
|
1027
1027
|
} = _ref,
|
|
1028
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1028
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
1029
1029
|
return /*#__PURE__*/React__default.createElement(Button$2, _extends$6({
|
|
1030
1030
|
iconSpacing: 2
|
|
1031
1031
|
}, props, heightProps(height), (asAnchor || props.as === 'a') && anchorProps(isExternal), {
|
|
@@ -1038,7 +1038,7 @@ Button$1.defaultProps = {
|
|
|
1038
1038
|
type: 'button'
|
|
1039
1039
|
};
|
|
1040
1040
|
|
|
1041
|
-
const _excluded$
|
|
1041
|
+
const _excluded$q = ["header", "drawerCloseButton", "children", "headerProps"];
|
|
1042
1042
|
const Drawer = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
1043
1043
|
let {
|
|
1044
1044
|
header,
|
|
@@ -1046,7 +1046,7 @@ const Drawer = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1046
1046
|
children,
|
|
1047
1047
|
headerProps
|
|
1048
1048
|
} = _ref,
|
|
1049
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1049
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
1050
1050
|
return /*#__PURE__*/React__default.createElement(Drawer$1, _extends$6({
|
|
1051
1051
|
placement: "right"
|
|
1052
1052
|
}, props, {
|
|
@@ -1178,7 +1178,7 @@ var SvgCheckmarkCircleFilled = function SvgCheckmarkCircleFilled(props, ref) {
|
|
|
1178
1178
|
};
|
|
1179
1179
|
var ForwardRef$2 = /*#__PURE__*/forwardRef(SvgCheckmarkCircleFilled);
|
|
1180
1180
|
|
|
1181
|
-
const _excluded$
|
|
1181
|
+
const _excluded$p = ["status", "title", "buttonProps", "buttonText", "buttonOnBottom", "showDismiss", "onDismissClick", "showIcon", "description", "icon"];
|
|
1182
1182
|
const statusIconMapping = {
|
|
1183
1183
|
[NOTIFICATION_STATUSES.WARNING]: ForwardRef$3,
|
|
1184
1184
|
[NOTIFICATION_STATUSES.SUCCESS]: ForwardRef$2,
|
|
@@ -1198,7 +1198,7 @@ const Alert = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
1198
1198
|
description,
|
|
1199
1199
|
icon
|
|
1200
1200
|
} = _ref,
|
|
1201
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1201
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
1202
1202
|
const IconVariant = icon || statusIconMapping[status];
|
|
1203
1203
|
// the issue with storybook breaking with hooks is still a problem, but once that's resolved this should be memoized
|
|
1204
1204
|
const style = merge(_objectSpread2({}, theme$2.components.Alert.baseStyle), notificationBaseStyle, notificationStatusStyles(status), notificationSizeStyles(props.size));
|
|
@@ -1357,7 +1357,7 @@ const combineSizeWithVariant = _ref => {
|
|
|
1357
1357
|
return styleProps;
|
|
1358
1358
|
};
|
|
1359
1359
|
|
|
1360
|
-
const _excluded$
|
|
1360
|
+
const _excluded$o = ["size"];
|
|
1361
1361
|
const sizeMapping = {
|
|
1362
1362
|
[SIZE_SMALL]: 'sm',
|
|
1363
1363
|
[SIZE_BODY]: 'md',
|
|
@@ -1367,7 +1367,7 @@ const Tabs = forwardRef$1((_ref, ref) => {
|
|
|
1367
1367
|
let {
|
|
1368
1368
|
size
|
|
1369
1369
|
} = _ref,
|
|
1370
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1370
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
1371
1371
|
return /*#__PURE__*/React__default.createElement(Tabs$1, _extends$6({
|
|
1372
1372
|
size: sizeMapping[size]
|
|
1373
1373
|
}, props, combineSizeWithVariant({
|
|
@@ -2609,7 +2609,7 @@ var jsxRuntimeExports = requireJsxRuntime();
|
|
|
2609
2609
|
const FormControl$1 = forwardRef(({ children, label, inputId, helperText, errorMessage, isFieldset, isOptional, customRequiredText, ...props }, ref) => (jsxRuntimeExports.jsxs(FormControl$2, { ...props, ref: ref, as: isFieldset ? 'fieldset' : 'div', borderWidth: "0", children: [label && (jsxRuntimeExports.jsx(FormLabel, { color: "gray.600", fontWeight: "semibold", marginBottom: helperText ? 0 : 1, fontSize: "sm", htmlFor: inputId, as: isFieldset ? 'legend' : 'label', requiredIndicator: props?.isRequired && customRequiredText ? (jsxRuntimeExports.jsx(Text$1, { marginLeft: 1, as: "span", variant: "caption", color: "text.secondary.light", children: customRequiredText })) : null, optionalIndicator: isOptional && !props?.isRequired ? (jsxRuntimeExports.jsx(Text$1, { marginLeft: 1, as: "span", variant: "caption", color: "text.secondary.light", children: "Optional" })) : null, children: label })), helperText && (jsxRuntimeExports.jsx(FormHelperText, { color: "gray.600", marginBottom: 1, fontSize: "xs", children: helperText })), children, jsxRuntimeExports.jsx(FormErrorMessage, { color: "error", mt: 1, fontSize: "xs", children: errorMessage })] })));
|
|
2610
2610
|
FormControl$1.displayName = 'FormControl';
|
|
2611
2611
|
|
|
2612
|
-
const _excluded$
|
|
2612
|
+
const _excluded$n = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional"];
|
|
2613
2613
|
const Select$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
2614
2614
|
let {
|
|
2615
2615
|
label,
|
|
@@ -2620,7 +2620,7 @@ const Select$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
2620
2620
|
isRequired,
|
|
2621
2621
|
isOptional
|
|
2622
2622
|
} = _ref,
|
|
2623
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2623
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
2624
2624
|
const classes = cn({
|
|
2625
2625
|
'FormElement-contains-error': isInvalid
|
|
2626
2626
|
});
|
|
@@ -2655,7 +2655,7 @@ Select$1.propTypes = {
|
|
|
2655
2655
|
isOptional: PropTypes.bool
|
|
2656
2656
|
};
|
|
2657
2657
|
|
|
2658
|
-
const _excluded$
|
|
2658
|
+
const _excluded$m = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired"];
|
|
2659
2659
|
const Switch = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
2660
2660
|
let {
|
|
2661
2661
|
label,
|
|
@@ -2665,7 +2665,7 @@ const Switch = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
2665
2665
|
isDisabled,
|
|
2666
2666
|
isRequired
|
|
2667
2667
|
} = _ref,
|
|
2668
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2668
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
2669
2669
|
const classes = cn({
|
|
2670
2670
|
'FormElement-contains-error': isInvalid
|
|
2671
2671
|
});
|
|
@@ -2813,13 +2813,13 @@ const combineAsWithVariant = _ref => {
|
|
|
2813
2813
|
return styleProps;
|
|
2814
2814
|
};
|
|
2815
2815
|
|
|
2816
|
-
const _excluded$
|
|
2816
|
+
const _excluded$l = ["as", "variant"];
|
|
2817
2817
|
const Text = forwardRef$1((_ref, ref) => {
|
|
2818
2818
|
let {
|
|
2819
2819
|
as,
|
|
2820
2820
|
variant
|
|
2821
2821
|
} = _ref,
|
|
2822
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2822
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
2823
2823
|
return /*#__PURE__*/React__default.createElement(Text$1, _extends$6({
|
|
2824
2824
|
variant: variant,
|
|
2825
2825
|
as: as
|
|
@@ -2855,12 +2855,12 @@ const compactStyles = {
|
|
|
2855
2855
|
gap: 4
|
|
2856
2856
|
};
|
|
2857
2857
|
|
|
2858
|
-
const _excluded$
|
|
2858
|
+
const _excluded$k = ["isCompact"];
|
|
2859
2859
|
const Grid = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
2860
2860
|
let {
|
|
2861
2861
|
isCompact
|
|
2862
2862
|
} = _ref,
|
|
2863
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2863
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
2864
2864
|
return /*#__PURE__*/React__default.createElement(Grid$1, _extends$6({}, baseStyles, isCompact && compactStyles, props, {
|
|
2865
2865
|
ref: ref
|
|
2866
2866
|
}));
|
|
@@ -2884,7 +2884,7 @@ const GridItem = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__def
|
|
|
2884
2884
|
ref: ref
|
|
2885
2885
|
})));
|
|
2886
2886
|
|
|
2887
|
-
const _excluded$
|
|
2887
|
+
const _excluded$j = ["type"];
|
|
2888
2888
|
const unorderedProps = {
|
|
2889
2889
|
as: 'ul',
|
|
2890
2890
|
styleType: 'disc'
|
|
@@ -2920,7 +2920,7 @@ const List = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
2920
2920
|
let {
|
|
2921
2921
|
type
|
|
2922
2922
|
} = _ref,
|
|
2923
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2923
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
2924
2924
|
return /*#__PURE__*/React__default.createElement(List$1, _extends$6({}, getListProps(type), props, {
|
|
2925
2925
|
ref: ref
|
|
2926
2926
|
}));
|
|
@@ -3964,12 +3964,12 @@ var index$1 = merge(theme$2.components.Badge, {
|
|
|
3964
3964
|
defaultProps: defaultProps$2
|
|
3965
3965
|
});
|
|
3966
3966
|
|
|
3967
|
-
const _excluded$
|
|
3967
|
+
const _excluded$i = ["hasFooter"];
|
|
3968
3968
|
const body = _ref => {
|
|
3969
3969
|
let {
|
|
3970
3970
|
hasFooter
|
|
3971
3971
|
} = _ref;
|
|
3972
|
-
_objectWithoutProperties(_ref, _excluded$
|
|
3972
|
+
_objectWithoutProperties(_ref, _excluded$i);
|
|
3973
3973
|
return {
|
|
3974
3974
|
overflowY: 'auto',
|
|
3975
3975
|
padding: 6,
|
|
@@ -4383,7 +4383,7 @@ const baseConfig = {
|
|
|
4383
4383
|
};
|
|
4384
4384
|
var THEME = extendTheme(extendedTheme, baseConfig);
|
|
4385
4385
|
|
|
4386
|
-
const _excluded$
|
|
4386
|
+
const _excluded$h = ["theme", "useLegacyOverrides", "disableExternalFonts", "children"];
|
|
4387
4387
|
const ThemeProvider = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
4388
4388
|
let {
|
|
4389
4389
|
theme,
|
|
@@ -4391,7 +4391,7 @@ const ThemeProvider = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4391
4391
|
disableExternalFonts = false,
|
|
4392
4392
|
children
|
|
4393
4393
|
} = _ref,
|
|
4394
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4394
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
4395
4395
|
return /*#__PURE__*/React__default.createElement(ChakraProvider, _extends$6({}, props, {
|
|
4396
4396
|
ref: ref,
|
|
4397
4397
|
theme: merge({}, THEME, theme)
|
|
@@ -4413,7 +4413,7 @@ ThemeProvider.propTypes = {
|
|
|
4413
4413
|
const Card = forwardRef((props, ref) => (jsxRuntimeExports.jsx(Box, { position: "relative", padding: 4, bgColor: "background.white", borderRadius: "lg", boxShadow: "md", ...props, ref: ref })));
|
|
4414
4414
|
Card.displayName = 'Card';
|
|
4415
4415
|
|
|
4416
|
-
const _excluded$
|
|
4416
|
+
const _excluded$g = ["isSSR", "cloudinaryImageId", "cloudinaryTemplate", "cloudinaryCloudName", "htmlWidth", "htmlHeight", "quality", "lazyLoad"];
|
|
4417
4417
|
|
|
4418
4418
|
// This code is copied from fe-utils https://github.com/spothero/fe-monorepo/blob/a0e06482e74dcb5502b21c5fbf0a679752a1f8ce/packages/fe-utils/src/environment/environment.js#L391
|
|
4419
4419
|
function isHighDensityDisplay() {
|
|
@@ -4452,7 +4452,7 @@ const Image = _ref2 => {
|
|
|
4452
4452
|
quality,
|
|
4453
4453
|
lazyLoad
|
|
4454
4454
|
} = _ref2,
|
|
4455
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded$
|
|
4455
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded$g);
|
|
4456
4456
|
const hasValidCloudinarySrc = (cloudinaryImageId || cloudinaryTemplate) && Boolean(htmlWidth) && Boolean(htmlHeight);
|
|
4457
4457
|
let cloudinarySrc;
|
|
4458
4458
|
if (hasValidCloudinarySrc) {
|
|
@@ -4502,7 +4502,7 @@ Image.defaultProps = {
|
|
|
4502
4502
|
cloudinaryCloudName: 'spothero'
|
|
4503
4503
|
};
|
|
4504
4504
|
|
|
4505
|
-
const _excluded$
|
|
4505
|
+
const _excluded$f = ["color", "loaderBackgroundColor", "isInfinite", "size", "thickness", "trackColor", "value"];
|
|
4506
4506
|
const Loader = _ref => {
|
|
4507
4507
|
let {
|
|
4508
4508
|
color = 'success',
|
|
@@ -4513,7 +4513,7 @@ const Loader = _ref => {
|
|
|
4513
4513
|
trackColor = 'gray.medium',
|
|
4514
4514
|
value = 0
|
|
4515
4515
|
} = _ref,
|
|
4516
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4516
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
4517
4517
|
/* -------------------------------------------------------------------- *\
|
|
4518
4518
|
Note: Since most of the props for this component control multiple
|
|
4519
4519
|
styles at a time, it was decided that it made the most sense to set
|
|
@@ -4568,12 +4568,12 @@ Loader.propTypes = {
|
|
|
4568
4568
|
value: PropTypes.number
|
|
4569
4569
|
};
|
|
4570
4570
|
|
|
4571
|
-
const _excluded$
|
|
4571
|
+
const _excluded$e = ["isRounded"];
|
|
4572
4572
|
const Progress = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
4573
4573
|
let {
|
|
4574
4574
|
isRounded
|
|
4575
4575
|
} = _ref,
|
|
4576
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4576
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
4577
4577
|
// Passing `isRounded` in as a prop throws a 'React does not recognize the X prop on a DOM element' error. Passing `isRounded` through `sx` instead, allows for the prop to be utilized by the theme without being set on the DOM element, avoiding the error.
|
|
4578
4578
|
return /*#__PURE__*/React__default.createElement(Progress$1, _extends$6({
|
|
4579
4579
|
ref: ref,
|
|
@@ -4617,7 +4617,7 @@ Progress.defaultProps = {
|
|
|
4617
4617
|
variant: 'solid'
|
|
4618
4618
|
};
|
|
4619
4619
|
|
|
4620
|
-
const _excluded$
|
|
4620
|
+
const _excluded$d = ["defaultChecked", "isChecked", "isDisabled", "value", "helperText", "children", "size"];
|
|
4621
4621
|
const Checkbox = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
4622
4622
|
let {
|
|
4623
4623
|
defaultChecked,
|
|
@@ -4628,7 +4628,7 @@ const Checkbox = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4628
4628
|
children,
|
|
4629
4629
|
size = 'md'
|
|
4630
4630
|
} = _ref,
|
|
4631
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4631
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
4632
4632
|
const helperTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
4633
4633
|
return /*#__PURE__*/React__default.createElement(Checkbox$1, _extends$6({
|
|
4634
4634
|
ref: ref,
|
|
@@ -4654,7 +4654,7 @@ Checkbox.propTypes = {
|
|
|
4654
4654
|
size: PropTypes.oneOf(['sm', 'md', 'lg'])
|
|
4655
4655
|
};
|
|
4656
4656
|
|
|
4657
|
-
const _excluded$
|
|
4657
|
+
const _excluded$c = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
|
|
4658
4658
|
const Input$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
4659
4659
|
let {
|
|
4660
4660
|
label,
|
|
@@ -4666,7 +4666,7 @@ const Input$1 = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4666
4666
|
isOptional,
|
|
4667
4667
|
customRequiredText
|
|
4668
4668
|
} = _ref,
|
|
4669
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4669
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
4670
4670
|
const classes = cn({
|
|
4671
4671
|
'FormElement-contains-error': isInvalid
|
|
4672
4672
|
});
|
|
@@ -4697,7 +4697,7 @@ Input$1.propTypes = {
|
|
|
4697
4697
|
customRequiredText: PropTypes.string
|
|
4698
4698
|
};
|
|
4699
4699
|
|
|
4700
|
-
const _excluded$
|
|
4700
|
+
const _excluded$b = ["label", "helperText", "errorMessage", "id", "children", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles"];
|
|
4701
4701
|
|
|
4702
4702
|
// No clue how to move these into the style file so just co-located to keep from slowing down
|
|
4703
4703
|
// Chakra V2 will heavily impact this component
|
|
@@ -4821,7 +4821,7 @@ const FormControl = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4821
4821
|
rightElementStyles,
|
|
4822
4822
|
leftElementStyles
|
|
4823
4823
|
} = _ref,
|
|
4824
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4824
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
4825
4825
|
return /*#__PURE__*/React__default.createElement(FormControl$2, _extends$6({}, props, {
|
|
4826
4826
|
ref: ref
|
|
4827
4827
|
}, controlStyles), /*#__PURE__*/React__default.createElement(InputGroup, null, leftElement && /*#__PURE__*/React__default.createElement(InputLeftElement, _extends$6({
|
|
@@ -4863,7 +4863,7 @@ FormControl.propTypes = {
|
|
|
4863
4863
|
isInvalid: PropTypes.bool
|
|
4864
4864
|
};
|
|
4865
4865
|
|
|
4866
|
-
const _excluded$
|
|
4866
|
+
const _excluded$a = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "placeholder"];
|
|
4867
4867
|
|
|
4868
4868
|
/**
|
|
4869
4869
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -4884,7 +4884,7 @@ const Input = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4884
4884
|
leftElementStyles,
|
|
4885
4885
|
placeholder = ' '
|
|
4886
4886
|
} = _ref,
|
|
4887
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4887
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
4888
4888
|
const classes = cn({
|
|
4889
4889
|
'FormElement-contains-error': isInvalid
|
|
4890
4890
|
}); //Historic carry over
|
|
@@ -4927,7 +4927,7 @@ Input.propTypes = {
|
|
|
4927
4927
|
leftElementStyles: PropTypes.object
|
|
4928
4928
|
};
|
|
4929
4929
|
|
|
4930
|
-
const _excluded$
|
|
4930
|
+
const _excluded$9 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "formControlStyles"];
|
|
4931
4931
|
|
|
4932
4932
|
//For select left is static arrow,
|
|
4933
4933
|
/**
|
|
@@ -4951,7 +4951,7 @@ const Select = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
4951
4951
|
leftElementStyles,
|
|
4952
4952
|
formControlStyles
|
|
4953
4953
|
} = _ref,
|
|
4954
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4954
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
4955
4955
|
const classes = cn({
|
|
4956
4956
|
'FormElement-contains-error': isInvalid
|
|
4957
4957
|
});
|
|
@@ -4992,7 +4992,7 @@ Select.propTypes = {
|
|
|
4992
4992
|
rightElementStyles: PropTypes.object
|
|
4993
4993
|
};
|
|
4994
4994
|
|
|
4995
|
-
const _excluded$
|
|
4995
|
+
const _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isHighlighted", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
|
|
4996
4996
|
|
|
4997
4997
|
/**
|
|
4998
4998
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -5016,7 +5016,7 @@ const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5016
5016
|
leftElementStyles,
|
|
5017
5017
|
buttonValue
|
|
5018
5018
|
} = _ref,
|
|
5019
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5019
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
5020
5020
|
const classes = cn({
|
|
5021
5021
|
'FormElement-contains-error': isInvalid
|
|
5022
5022
|
}); //Historic carry over
|
|
@@ -5260,7 +5260,7 @@ AutoSuggestSelect$1.propTypes = {
|
|
|
5260
5260
|
leftElementStyles: PropTypes.object
|
|
5261
5261
|
};
|
|
5262
5262
|
|
|
5263
|
-
const _excluded$
|
|
5263
|
+
const _excluded$7 = ["defaultChecked", "isChecked", "isDisabled", "value", "helperText", "children", "size"];
|
|
5264
5264
|
const Radio = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5265
5265
|
let {
|
|
5266
5266
|
defaultChecked,
|
|
@@ -5271,7 +5271,7 @@ const Radio = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5271
5271
|
children,
|
|
5272
5272
|
size = 'md'
|
|
5273
5273
|
} = _ref,
|
|
5274
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5274
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
5275
5275
|
const helperTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
5276
5276
|
return /*#__PURE__*/React__default.createElement(Radio$1, _extends$6({
|
|
5277
5277
|
ref: ref,
|
|
@@ -5296,7 +5296,7 @@ Radio.propTypes = {
|
|
|
5296
5296
|
size: PropTypes.oneOf(['sm', 'md', 'lg'])
|
|
5297
5297
|
};
|
|
5298
5298
|
|
|
5299
|
-
const _excluded$
|
|
5299
|
+
const _excluded$6 = ["label", "errorMessage", "defaultValue", "isDisabled", "isInvalid", "isRequired", "name", "onChange", "value", "children", "direction"];
|
|
5300
5300
|
const RadioGroup = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5301
5301
|
let {
|
|
5302
5302
|
label,
|
|
@@ -5311,7 +5311,7 @@ const RadioGroup = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5311
5311
|
children,
|
|
5312
5312
|
direction
|
|
5313
5313
|
} = _ref,
|
|
5314
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5314
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
5315
5315
|
return /*#__PURE__*/React__default.createElement(FormControl$1, {
|
|
5316
5316
|
isInvalid: isInvalid,
|
|
5317
5317
|
isDisabled: isDisabled,
|
|
@@ -5346,7 +5346,7 @@ RadioGroup.propTypes = {
|
|
|
5346
5346
|
direction: PropTypes.oneOf(['row', 'column'])
|
|
5347
5347
|
};
|
|
5348
5348
|
|
|
5349
|
-
const _excluded$
|
|
5349
|
+
const _excluded$5 = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size", "expandableChildrenStyles", "topChild", "expandableContentKey"];
|
|
5350
5350
|
const SelectionCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5351
5351
|
let {
|
|
5352
5352
|
isChecked,
|
|
@@ -5363,7 +5363,7 @@ const SelectionCard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5363
5363
|
topChild,
|
|
5364
5364
|
expandableContentKey = 'selection-card-content'
|
|
5365
5365
|
} = _ref,
|
|
5366
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5366
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
5367
5367
|
const Component = isRadio ? Radio : Checkbox;
|
|
5368
5368
|
const expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
5369
5369
|
const hasExpandableContent = isExpandable && isChecked && expandableChildren;
|
|
@@ -5450,7 +5450,7 @@ const Divider = forwardRef(({ variant = 'solid', colorScheme: borderColor = 'med
|
|
|
5450
5450
|
});
|
|
5451
5451
|
Divider.displayName = 'Divider';
|
|
5452
5452
|
|
|
5453
|
-
const _excluded$
|
|
5453
|
+
const _excluded$4 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
|
|
5454
5454
|
const Textarea = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
5455
5455
|
let {
|
|
5456
5456
|
label,
|
|
@@ -5462,7 +5462,7 @@ const Textarea = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
5462
5462
|
isOptional,
|
|
5463
5463
|
customRequiredText
|
|
5464
5464
|
} = _ref,
|
|
5465
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5465
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
5466
5466
|
const classes = cn({
|
|
5467
5467
|
'FormElement-contains-error': isInvalid
|
|
5468
5468
|
});
|
|
@@ -5493,12 +5493,12 @@ Textarea.propTypes = {
|
|
|
5493
5493
|
customRequiredText: PropTypes.string
|
|
5494
5494
|
};
|
|
5495
5495
|
|
|
5496
|
-
const _excluded$
|
|
5496
|
+
const _excluded$3 = ["children"];
|
|
5497
5497
|
const Popover = /*#__PURE__*/forwardRef((props, ref) => {
|
|
5498
5498
|
const {
|
|
5499
5499
|
children
|
|
5500
5500
|
} = props,
|
|
5501
|
-
rest = _objectWithoutProperties(props, _excluded$
|
|
5501
|
+
rest = _objectWithoutProperties(props, _excluded$3);
|
|
5502
5502
|
return /*#__PURE__*/React__default.createElement(Popover$1, _extends$6({}, rest, {
|
|
5503
5503
|
ref: ref
|
|
5504
5504
|
}), Children.toArray(children).map((child, index) => /*#__PURE__*/cloneElement(child, {
|
|
@@ -5557,7 +5557,7 @@ const PopoverCloseButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
5557
5557
|
}, props, closeButtonStyles(props)));
|
|
5558
5558
|
});
|
|
5559
5559
|
|
|
5560
|
-
const _excluded$
|
|
5560
|
+
const _excluded$2 = ["header", "variant", "children", "hideCloseButton", "hideArrow", "popoverBodyProps"];
|
|
5561
5561
|
const PopoverContent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
5562
5562
|
const {
|
|
5563
5563
|
header,
|
|
@@ -5567,7 +5567,7 @@ const PopoverContent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
5567
5567
|
hideArrow,
|
|
5568
5568
|
popoverBodyProps
|
|
5569
5569
|
} = props,
|
|
5570
|
-
rest = _objectWithoutProperties(props, _excluded$
|
|
5570
|
+
rest = _objectWithoutProperties(props, _excluded$2);
|
|
5571
5571
|
return /*#__PURE__*/React__default.createElement(PopoverContent$1, _extends$6({}, rest, {
|
|
5572
5572
|
ref: ref
|
|
5573
5573
|
}), hideArrow ? null : /*#__PURE__*/React__default.createElement(PopoverArrow, {
|
|
@@ -5751,6 +5751,192 @@ AutoSuggestSelect.propTypes = {
|
|
|
5751
5751
|
innerProps: PropTypes.object
|
|
5752
5752
|
};
|
|
5753
5753
|
|
|
5754
|
+
const _excluded$1 = ["id", "label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "options", "onChange", "iconSrc", "placeholder", "defaultValue", "innerRef", "noOptionsMessage"];
|
|
5755
|
+
const DropdownIndicator$1 = props => {
|
|
5756
|
+
const {
|
|
5757
|
+
sizes
|
|
5758
|
+
} = useTheme();
|
|
5759
|
+
return /*#__PURE__*/React__default.createElement(components$1.DropdownIndicator, props, /*#__PURE__*/React__default.createElement(Icon, {
|
|
5760
|
+
className: "FilterSelect-dropdown-icon",
|
|
5761
|
+
as: ForwardRef$1,
|
|
5762
|
+
boxSize: sizes['2.5']
|
|
5763
|
+
}));
|
|
5764
|
+
};
|
|
5765
|
+
const FilterSelectNode = _ref => {
|
|
5766
|
+
let {
|
|
5767
|
+
id,
|
|
5768
|
+
label,
|
|
5769
|
+
helperText,
|
|
5770
|
+
errorMessage,
|
|
5771
|
+
isInvalid,
|
|
5772
|
+
isDisabled,
|
|
5773
|
+
isRequired,
|
|
5774
|
+
options = [],
|
|
5775
|
+
onChange,
|
|
5776
|
+
iconSrc,
|
|
5777
|
+
placeholder,
|
|
5778
|
+
defaultValue = null,
|
|
5779
|
+
innerRef,
|
|
5780
|
+
noOptionsMessage = 'No Options'
|
|
5781
|
+
} = _ref,
|
|
5782
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
5783
|
+
const {
|
|
5784
|
+
colors,
|
|
5785
|
+
fontSizes,
|
|
5786
|
+
sizes
|
|
5787
|
+
} = useTheme();
|
|
5788
|
+
const handleChange = selectedOption => {
|
|
5789
|
+
onChange(selectedOption);
|
|
5790
|
+
};
|
|
5791
|
+
const icon = function () {
|
|
5792
|
+
let color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transparent';
|
|
5793
|
+
return {
|
|
5794
|
+
alignItems: 'center',
|
|
5795
|
+
display: 'flex',
|
|
5796
|
+
':before': {
|
|
5797
|
+
backgroundColor: color,
|
|
5798
|
+
content: '" "',
|
|
5799
|
+
display: 'block',
|
|
5800
|
+
marginRight: sizes['3'],
|
|
5801
|
+
height: sizes['4'],
|
|
5802
|
+
width: sizes['5'],
|
|
5803
|
+
mask: "url(".concat(iconSrc, ") no-repeat 50% 50%"),
|
|
5804
|
+
maskSize: 'contain'
|
|
5805
|
+
}
|
|
5806
|
+
};
|
|
5807
|
+
};
|
|
5808
|
+
const baseText = {
|
|
5809
|
+
fontSize: fontSizes.base,
|
|
5810
|
+
color: colors.black
|
|
5811
|
+
};
|
|
5812
|
+
const customStyles = {
|
|
5813
|
+
menu: provided => _objectSpread2(_objectSpread2({}, provided), baseText),
|
|
5814
|
+
control: (provided, state) => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5815
|
+
borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary.default : colors.gray['200'],
|
|
5816
|
+
borderWidth: '1px',
|
|
5817
|
+
boxShadow: 'none',
|
|
5818
|
+
'&:hover': {
|
|
5819
|
+
borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary.default : colors.gray['200']
|
|
5820
|
+
}
|
|
5821
|
+
}),
|
|
5822
|
+
input: (provided, state) => _objectSpread2(_objectSpread2(_objectSpread2({}, provided), baseText), {}, {
|
|
5823
|
+
padding: sizes['2'],
|
|
5824
|
+
backgroundColor: state.isDisabled ? colors.gray['200'] : 'transparent'
|
|
5825
|
+
}, iconSrc && icon(colors.gray['600'])),
|
|
5826
|
+
placeholder: provided => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5827
|
+
padding: sizes['2'],
|
|
5828
|
+
fontSize: fontSizes.base,
|
|
5829
|
+
color: colors.gray['600']
|
|
5830
|
+
}, iconSrc && icon()),
|
|
5831
|
+
singleValue: provided => _objectSpread2(_objectSpread2(_objectSpread2({}, provided), baseText), {}, {
|
|
5832
|
+
padding: sizes['2']
|
|
5833
|
+
}, iconSrc && icon()),
|
|
5834
|
+
option: (provided, state) => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5835
|
+
backgroundColor: state.isSelected ? colors.gray['200'] : state.isFocused ? colors.gray['50'] : 'transparent',
|
|
5836
|
+
color: colors.black
|
|
5837
|
+
}),
|
|
5838
|
+
clearIndicator: provided => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5839
|
+
color: colors.gray['400'],
|
|
5840
|
+
'&:hover': {
|
|
5841
|
+
color: colors.gray['600']
|
|
5842
|
+
}
|
|
5843
|
+
}),
|
|
5844
|
+
dropdownIndicator: provided => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5845
|
+
color: colors.brandBlue,
|
|
5846
|
+
'&:hover': {
|
|
5847
|
+
color: colors.brandBlue
|
|
5848
|
+
}
|
|
5849
|
+
}),
|
|
5850
|
+
indicatorSeparator: provided => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5851
|
+
display: 'none'
|
|
5852
|
+
})
|
|
5853
|
+
};
|
|
5854
|
+
return /*#__PURE__*/React__default.createElement(FormControl$1, {
|
|
5855
|
+
errorMessage: errorMessage,
|
|
5856
|
+
isRequired: isRequired,
|
|
5857
|
+
helperText: helperText,
|
|
5858
|
+
label: label,
|
|
5859
|
+
inputId: id,
|
|
5860
|
+
isInvalid: isInvalid
|
|
5861
|
+
}, /*#__PURE__*/React__default.createElement(Select$3, _extends$6({
|
|
5862
|
+
ref: innerRef,
|
|
5863
|
+
classNamePrefix: "fe-ui-filter-select",
|
|
5864
|
+
closeMenuOnSelect: true,
|
|
5865
|
+
isClearable: true,
|
|
5866
|
+
components: {
|
|
5867
|
+
DropdownIndicator: DropdownIndicator$1
|
|
5868
|
+
},
|
|
5869
|
+
openMenuOnClick: true,
|
|
5870
|
+
options: options,
|
|
5871
|
+
onChange: handleChange,
|
|
5872
|
+
isDisabled: isDisabled,
|
|
5873
|
+
inputId: id,
|
|
5874
|
+
placeholder: placeholder,
|
|
5875
|
+
defaultValue: defaultValue,
|
|
5876
|
+
styles: customStyles,
|
|
5877
|
+
noOptionsMessage: () => noOptionsMessage
|
|
5878
|
+
}, props)));
|
|
5879
|
+
};
|
|
5880
|
+
const FilterSelect = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(FilterSelectNode, _extends$6({
|
|
5881
|
+
innerRef: ref
|
|
5882
|
+
}, props)));
|
|
5883
|
+
FilterSelect.propTypes = {
|
|
5884
|
+
/** ID applied to the select and label */
|
|
5885
|
+
id: PropTypes.string.isRequired,
|
|
5886
|
+
/** Label that describes the select */
|
|
5887
|
+
label: PropTypes.string,
|
|
5888
|
+
/** Text to use as placeholder in the input */
|
|
5889
|
+
placeholder: PropTypes.string,
|
|
5890
|
+
/** Optional helper text displayed below the select */
|
|
5891
|
+
helperText: PropTypes.string,
|
|
5892
|
+
/** Error message that would display under the select */
|
|
5893
|
+
errorMessage: PropTypes.string,
|
|
5894
|
+
/** Boolean that sets whether the select is valid */
|
|
5895
|
+
isInvalid: PropTypes.bool,
|
|
5896
|
+
/** Boolean that sets whether the select is disabled */
|
|
5897
|
+
isDisabled: PropTypes.bool,
|
|
5898
|
+
/** Boolean that sets whether the select is required */
|
|
5899
|
+
isRequired: PropTypes.bool,
|
|
5900
|
+
/** List of available options */
|
|
5901
|
+
options: PropTypes.arrayOf(PropTypes.shape({
|
|
5902
|
+
label: PropTypes.string.isRequired,
|
|
5903
|
+
value: PropTypes.any.isRequired
|
|
5904
|
+
})).isRequired,
|
|
5905
|
+
/** Function that is called when an option is selected, it returns the selected option */
|
|
5906
|
+
onChange: PropTypes.func.isRequired,
|
|
5907
|
+
/** Optional src to SVG to use as search icon */
|
|
5908
|
+
iconSrc: PropTypes.string,
|
|
5909
|
+
/** Optional default option for uncontrolled usage */
|
|
5910
|
+
defaultValue: PropTypes.shape({
|
|
5911
|
+
label: PropTypes.string,
|
|
5912
|
+
value: PropTypes.any
|
|
5913
|
+
}),
|
|
5914
|
+
/** Optional message to display when there are no options */
|
|
5915
|
+
noOptionsMessage: PropTypes.string
|
|
5916
|
+
};
|
|
5917
|
+
FilterSelectNode.propTypes = {
|
|
5918
|
+
id: PropTypes.string.isRequired,
|
|
5919
|
+
label: PropTypes.string,
|
|
5920
|
+
placeholder: PropTypes.string,
|
|
5921
|
+
helperText: PropTypes.string,
|
|
5922
|
+
errorMessage: PropTypes.string,
|
|
5923
|
+
isInvalid: PropTypes.bool,
|
|
5924
|
+
isDisabled: PropTypes.bool,
|
|
5925
|
+
isRequired: PropTypes.bool,
|
|
5926
|
+
options: PropTypes.arrayOf(PropTypes.shape({
|
|
5927
|
+
label: PropTypes.string.isRequired,
|
|
5928
|
+
value: PropTypes.any.isRequired
|
|
5929
|
+
})).isRequired,
|
|
5930
|
+
onChange: PropTypes.func.isRequired,
|
|
5931
|
+
iconSrc: PropTypes.string,
|
|
5932
|
+
defaultValue: PropTypes.shape({
|
|
5933
|
+
label: PropTypes.string,
|
|
5934
|
+
value: PropTypes.any
|
|
5935
|
+
}),
|
|
5936
|
+
innerRef: PropTypes.object,
|
|
5937
|
+
noOptionsMessage: PropTypes.string
|
|
5938
|
+
};
|
|
5939
|
+
|
|
5754
5940
|
const defaultStyles = {
|
|
5755
5941
|
border: 0,
|
|
5756
5942
|
borderRadius: '4px',
|
|
@@ -5979,5 +6165,5 @@ Menu.propTypes = {
|
|
|
5979
6165
|
children: PropTypes.node
|
|
5980
6166
|
};
|
|
5981
6167
|
|
|
5982
|
-
export { AccordionActionButton, Alert, AlwaysMountedModal, AutoSuggestSelect, Button$1 as Button, Card, Checkbox, Container, CreatableSelect$1 as CreatableSelect, Divider, Drawer, Grid, GridItem, Heading, Image, Input$1 as Input, List, Loader, Menu, Modal, Popover, PopoverArrow, PopoverContent, Progress, Radio, RadioGroup, AutoSuggestSelect$1 as RefreshedAutoSuggestSelect, Button as RefreshedButtonInput, FormControl as RefreshedFormControl, Input as RefreshedInput, Select as RefreshedSelectInput, Select$1 as Select, SelectionCard, Spinner, Switch, Tabs, Text, Textarea, ThemeProvider, ToggleButtonGroup };
|
|
6168
|
+
export { AccordionActionButton, Alert, AlwaysMountedModal, AutoSuggestSelect, Button$1 as Button, Card, Checkbox, Container, CreatableSelect$1 as CreatableSelect, Divider, Drawer, FilterSelect, Grid, GridItem, Heading, Image, Input$1 as Input, List, Loader, Menu, Modal, Popover, PopoverArrow, PopoverContent, Progress, Radio, RadioGroup, AutoSuggestSelect$1 as RefreshedAutoSuggestSelect, Button as RefreshedButtonInput, FormControl as RefreshedFormControl, Input as RefreshedInput, Select as RefreshedSelectInput, Select$1 as Select, SelectionCard, Spinner, Switch, Tabs, Text, Textarea, ThemeProvider, ToggleButtonGroup };
|
|
5983
6169
|
//# sourceMappingURL=index.esm.js.map
|