@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.cjs.js
CHANGED
|
@@ -10,8 +10,8 @@ var template = require('lodash/template');
|
|
|
10
10
|
var cn = require('classnames');
|
|
11
11
|
var AsyncSelect = require('react-select/async');
|
|
12
12
|
var framerMotion = require('framer-motion');
|
|
13
|
+
var Select$2 = require('react-select');
|
|
13
14
|
var Creatable = require('react-select/creatable');
|
|
14
|
-
var reactSelect = require('react-select');
|
|
15
15
|
|
|
16
16
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
17
|
|
|
@@ -39,6 +39,7 @@ var merge__default = /*#__PURE__*/_interopDefault(merge);
|
|
|
39
39
|
var template__default = /*#__PURE__*/_interopDefault(template);
|
|
40
40
|
var cn__default = /*#__PURE__*/_interopDefault(cn);
|
|
41
41
|
var AsyncSelect__default = /*#__PURE__*/_interopDefault(AsyncSelect);
|
|
42
|
+
var Select__default = /*#__PURE__*/_interopDefault(Select$2);
|
|
42
43
|
var Creatable__default = /*#__PURE__*/_interopDefault(Creatable);
|
|
43
44
|
|
|
44
45
|
function _defineProperty(e, r, t) {
|
|
@@ -1036,7 +1037,7 @@ const props = {
|
|
|
1036
1037
|
variant: PropTypes__default.default.oneOf(Object.keys(variants$d))
|
|
1037
1038
|
};
|
|
1038
1039
|
|
|
1039
|
-
const _excluded$
|
|
1040
|
+
const _excluded$r = ["asAnchor", "isExternal", "height"];
|
|
1040
1041
|
const anchorProps = function () {
|
|
1041
1042
|
let isExternal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
1042
1043
|
return _objectSpread2({
|
|
@@ -1053,7 +1054,7 @@ const Button$1 = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1053
1054
|
isExternal,
|
|
1054
1055
|
height = 'md'
|
|
1055
1056
|
} = _ref,
|
|
1056
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1057
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
1057
1058
|
return /*#__PURE__*/React__namespace.default.createElement(react.Button, _extends$6({
|
|
1058
1059
|
iconSpacing: 2
|
|
1059
1060
|
}, props, heightProps(height), (asAnchor || props.as === 'a') && anchorProps(isExternal), {
|
|
@@ -1066,7 +1067,7 @@ Button$1.defaultProps = {
|
|
|
1066
1067
|
type: 'button'
|
|
1067
1068
|
};
|
|
1068
1069
|
|
|
1069
|
-
const _excluded$
|
|
1070
|
+
const _excluded$q = ["header", "drawerCloseButton", "children", "headerProps"];
|
|
1070
1071
|
const Drawer = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1071
1072
|
let {
|
|
1072
1073
|
header,
|
|
@@ -1074,7 +1075,7 @@ const Drawer = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1074
1075
|
children,
|
|
1075
1076
|
headerProps
|
|
1076
1077
|
} = _ref,
|
|
1077
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1078
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
1078
1079
|
return /*#__PURE__*/React__namespace.default.createElement(react.Drawer, _extends$6({
|
|
1079
1080
|
placement: "right"
|
|
1080
1081
|
}, props, {
|
|
@@ -1206,7 +1207,7 @@ var SvgCheckmarkCircleFilled = function SvgCheckmarkCircleFilled(props, ref) {
|
|
|
1206
1207
|
};
|
|
1207
1208
|
var ForwardRef$2 = /*#__PURE__*/React.forwardRef(SvgCheckmarkCircleFilled);
|
|
1208
1209
|
|
|
1209
|
-
const _excluded$
|
|
1210
|
+
const _excluded$p = ["status", "title", "buttonProps", "buttonText", "buttonOnBottom", "showDismiss", "onDismissClick", "showIcon", "description", "icon"];
|
|
1210
1211
|
const statusIconMapping = {
|
|
1211
1212
|
[NOTIFICATION_STATUSES.WARNING]: ForwardRef$3,
|
|
1212
1213
|
[NOTIFICATION_STATUSES.SUCCESS]: ForwardRef$2,
|
|
@@ -1226,7 +1227,7 @@ const Alert = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1226
1227
|
description,
|
|
1227
1228
|
icon
|
|
1228
1229
|
} = _ref,
|
|
1229
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1230
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
1230
1231
|
const IconVariant = icon || statusIconMapping[status];
|
|
1231
1232
|
// the issue with storybook breaking with hooks is still a problem, but once that's resolved this should be memoized
|
|
1232
1233
|
const style = merge__default.default(_objectSpread2({}, react.theme.components.Alert.baseStyle), notificationBaseStyle, notificationStatusStyles(status), notificationSizeStyles(props.size));
|
|
@@ -1385,7 +1386,7 @@ const combineSizeWithVariant = _ref => {
|
|
|
1385
1386
|
return styleProps;
|
|
1386
1387
|
};
|
|
1387
1388
|
|
|
1388
|
-
const _excluded$
|
|
1389
|
+
const _excluded$o = ["size"];
|
|
1389
1390
|
const sizeMapping = {
|
|
1390
1391
|
[SIZE_SMALL]: 'sm',
|
|
1391
1392
|
[SIZE_BODY]: 'md',
|
|
@@ -1395,7 +1396,7 @@ const Tabs = react.forwardRef((_ref, ref) => {
|
|
|
1395
1396
|
let {
|
|
1396
1397
|
size
|
|
1397
1398
|
} = _ref,
|
|
1398
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1399
|
+
props = _objectWithoutProperties(_ref, _excluded$o);
|
|
1399
1400
|
return /*#__PURE__*/React__namespace.default.createElement(react.Tabs, _extends$6({
|
|
1400
1401
|
size: sizeMapping[size]
|
|
1401
1402
|
}, props, combineSizeWithVariant({
|
|
@@ -2637,7 +2638,7 @@ var jsxRuntimeExports = requireJsxRuntime();
|
|
|
2637
2638
|
const FormControl$1 = React.forwardRef(({ children, label, inputId, helperText, errorMessage, isFieldset, isOptional, customRequiredText, ...props }, ref) => (jsxRuntimeExports.jsxs(react.FormControl, { ...props, ref: ref, as: isFieldset ? 'fieldset' : 'div', borderWidth: "0", children: [label && (jsxRuntimeExports.jsx(react.FormLabel, { color: "gray.600", fontWeight: "semibold", marginBottom: helperText ? 0 : 1, fontSize: "sm", htmlFor: inputId, as: isFieldset ? 'legend' : 'label', requiredIndicator: props?.isRequired && customRequiredText ? (jsxRuntimeExports.jsx(react.Text, { marginLeft: 1, as: "span", variant: "caption", color: "text.secondary.light", children: customRequiredText })) : null, optionalIndicator: isOptional && !props?.isRequired ? (jsxRuntimeExports.jsx(react.Text, { marginLeft: 1, as: "span", variant: "caption", color: "text.secondary.light", children: "Optional" })) : null, children: label })), helperText && (jsxRuntimeExports.jsx(react.FormHelperText, { color: "gray.600", marginBottom: 1, fontSize: "xs", children: helperText })), children, jsxRuntimeExports.jsx(react.FormErrorMessage, { color: "error", mt: 1, fontSize: "xs", children: errorMessage })] })));
|
|
2638
2639
|
FormControl$1.displayName = 'FormControl';
|
|
2639
2640
|
|
|
2640
|
-
const _excluded$
|
|
2641
|
+
const _excluded$n = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional"];
|
|
2641
2642
|
const Select$1 = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
2642
2643
|
let {
|
|
2643
2644
|
label,
|
|
@@ -2648,7 +2649,7 @@ const Select$1 = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2648
2649
|
isRequired,
|
|
2649
2650
|
isOptional
|
|
2650
2651
|
} = _ref,
|
|
2651
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2652
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
2652
2653
|
const classes = cn__default.default({
|
|
2653
2654
|
'FormElement-contains-error': isInvalid
|
|
2654
2655
|
});
|
|
@@ -2683,7 +2684,7 @@ Select$1.propTypes = {
|
|
|
2683
2684
|
isOptional: PropTypes__default.default.bool
|
|
2684
2685
|
};
|
|
2685
2686
|
|
|
2686
|
-
const _excluded$
|
|
2687
|
+
const _excluded$m = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired"];
|
|
2687
2688
|
const Switch = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
2688
2689
|
let {
|
|
2689
2690
|
label,
|
|
@@ -2693,7 +2694,7 @@ const Switch = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2693
2694
|
isDisabled,
|
|
2694
2695
|
isRequired
|
|
2695
2696
|
} = _ref,
|
|
2696
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2697
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
2697
2698
|
const classes = cn__default.default({
|
|
2698
2699
|
'FormElement-contains-error': isInvalid
|
|
2699
2700
|
});
|
|
@@ -2841,13 +2842,13 @@ const combineAsWithVariant = _ref => {
|
|
|
2841
2842
|
return styleProps;
|
|
2842
2843
|
};
|
|
2843
2844
|
|
|
2844
|
-
const _excluded$
|
|
2845
|
+
const _excluded$l = ["as", "variant"];
|
|
2845
2846
|
const Text = react.forwardRef((_ref, ref) => {
|
|
2846
2847
|
let {
|
|
2847
2848
|
as,
|
|
2848
2849
|
variant
|
|
2849
2850
|
} = _ref,
|
|
2850
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2851
|
+
props = _objectWithoutProperties(_ref, _excluded$l);
|
|
2851
2852
|
return /*#__PURE__*/React__namespace.default.createElement(react.Text, _extends$6({
|
|
2852
2853
|
variant: variant,
|
|
2853
2854
|
as: as
|
|
@@ -2883,12 +2884,12 @@ const compactStyles = {
|
|
|
2883
2884
|
gap: 4
|
|
2884
2885
|
};
|
|
2885
2886
|
|
|
2886
|
-
const _excluded$
|
|
2887
|
+
const _excluded$k = ["isCompact"];
|
|
2887
2888
|
const Grid = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
2888
2889
|
let {
|
|
2889
2890
|
isCompact
|
|
2890
2891
|
} = _ref,
|
|
2891
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2892
|
+
props = _objectWithoutProperties(_ref, _excluded$k);
|
|
2892
2893
|
return /*#__PURE__*/React__namespace.default.createElement(react.Grid, _extends$6({}, baseStyles, isCompact && compactStyles, props, {
|
|
2893
2894
|
ref: ref
|
|
2894
2895
|
}));
|
|
@@ -2912,7 +2913,7 @@ const GridItem = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/Reac
|
|
|
2912
2913
|
ref: ref
|
|
2913
2914
|
})));
|
|
2914
2915
|
|
|
2915
|
-
const _excluded$
|
|
2916
|
+
const _excluded$j = ["type"];
|
|
2916
2917
|
const unorderedProps = {
|
|
2917
2918
|
as: 'ul',
|
|
2918
2919
|
styleType: 'disc'
|
|
@@ -2948,7 +2949,7 @@ const List = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2948
2949
|
let {
|
|
2949
2950
|
type
|
|
2950
2951
|
} = _ref,
|
|
2951
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2952
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
2952
2953
|
return /*#__PURE__*/React__namespace.default.createElement(react.List, _extends$6({}, getListProps(type), props, {
|
|
2953
2954
|
ref: ref
|
|
2954
2955
|
}));
|
|
@@ -3992,12 +3993,12 @@ var index$1 = merge__default.default(react.theme.components.Badge, {
|
|
|
3992
3993
|
defaultProps: defaultProps$2
|
|
3993
3994
|
});
|
|
3994
3995
|
|
|
3995
|
-
const _excluded$
|
|
3996
|
+
const _excluded$i = ["hasFooter"];
|
|
3996
3997
|
const body = _ref => {
|
|
3997
3998
|
let {
|
|
3998
3999
|
hasFooter
|
|
3999
4000
|
} = _ref;
|
|
4000
|
-
_objectWithoutProperties(_ref, _excluded$
|
|
4001
|
+
_objectWithoutProperties(_ref, _excluded$i);
|
|
4001
4002
|
return {
|
|
4002
4003
|
overflowY: 'auto',
|
|
4003
4004
|
padding: 6,
|
|
@@ -4411,7 +4412,7 @@ const baseConfig = {
|
|
|
4411
4412
|
};
|
|
4412
4413
|
var THEME = react.extendTheme(extendedTheme, baseConfig);
|
|
4413
4414
|
|
|
4414
|
-
const _excluded$
|
|
4415
|
+
const _excluded$h = ["theme", "useLegacyOverrides", "disableExternalFonts", "children"];
|
|
4415
4416
|
const ThemeProvider = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
4416
4417
|
let {
|
|
4417
4418
|
theme,
|
|
@@ -4419,7 +4420,7 @@ const ThemeProvider = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4419
4420
|
disableExternalFonts = false,
|
|
4420
4421
|
children
|
|
4421
4422
|
} = _ref,
|
|
4422
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4423
|
+
props = _objectWithoutProperties(_ref, _excluded$h);
|
|
4423
4424
|
return /*#__PURE__*/React__namespace.default.createElement(react.ChakraProvider, _extends$6({}, props, {
|
|
4424
4425
|
ref: ref,
|
|
4425
4426
|
theme: merge__default.default({}, THEME, theme)
|
|
@@ -4441,7 +4442,7 @@ ThemeProvider.propTypes = {
|
|
|
4441
4442
|
const Card = React.forwardRef((props, ref) => (jsxRuntimeExports.jsx(react.Box, { position: "relative", padding: 4, bgColor: "background.white", borderRadius: "lg", boxShadow: "md", ...props, ref: ref })));
|
|
4442
4443
|
Card.displayName = 'Card';
|
|
4443
4444
|
|
|
4444
|
-
const _excluded$
|
|
4445
|
+
const _excluded$g = ["isSSR", "cloudinaryImageId", "cloudinaryTemplate", "cloudinaryCloudName", "htmlWidth", "htmlHeight", "quality", "lazyLoad"];
|
|
4445
4446
|
|
|
4446
4447
|
// This code is copied from fe-utils https://github.com/spothero/fe-monorepo/blob/a0e06482e74dcb5502b21c5fbf0a679752a1f8ce/packages/fe-utils/src/environment/environment.js#L391
|
|
4447
4448
|
function isHighDensityDisplay() {
|
|
@@ -4480,7 +4481,7 @@ const Image = _ref2 => {
|
|
|
4480
4481
|
quality,
|
|
4481
4482
|
lazyLoad
|
|
4482
4483
|
} = _ref2,
|
|
4483
|
-
otherProps = _objectWithoutProperties(_ref2, _excluded$
|
|
4484
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded$g);
|
|
4484
4485
|
const hasValidCloudinarySrc = (cloudinaryImageId || cloudinaryTemplate) && Boolean(htmlWidth) && Boolean(htmlHeight);
|
|
4485
4486
|
let cloudinarySrc;
|
|
4486
4487
|
if (hasValidCloudinarySrc) {
|
|
@@ -4530,7 +4531,7 @@ Image.defaultProps = {
|
|
|
4530
4531
|
cloudinaryCloudName: 'spothero'
|
|
4531
4532
|
};
|
|
4532
4533
|
|
|
4533
|
-
const _excluded$
|
|
4534
|
+
const _excluded$f = ["color", "loaderBackgroundColor", "isInfinite", "size", "thickness", "trackColor", "value"];
|
|
4534
4535
|
const Loader = _ref => {
|
|
4535
4536
|
let {
|
|
4536
4537
|
color = 'success',
|
|
@@ -4541,7 +4542,7 @@ const Loader = _ref => {
|
|
|
4541
4542
|
trackColor = 'gray.medium',
|
|
4542
4543
|
value = 0
|
|
4543
4544
|
} = _ref,
|
|
4544
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4545
|
+
props = _objectWithoutProperties(_ref, _excluded$f);
|
|
4545
4546
|
/* -------------------------------------------------------------------- *\
|
|
4546
4547
|
Note: Since most of the props for this component control multiple
|
|
4547
4548
|
styles at a time, it was decided that it made the most sense to set
|
|
@@ -4596,12 +4597,12 @@ Loader.propTypes = {
|
|
|
4596
4597
|
value: PropTypes__default.default.number
|
|
4597
4598
|
};
|
|
4598
4599
|
|
|
4599
|
-
const _excluded$
|
|
4600
|
+
const _excluded$e = ["isRounded"];
|
|
4600
4601
|
const Progress = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
4601
4602
|
let {
|
|
4602
4603
|
isRounded
|
|
4603
4604
|
} = _ref,
|
|
4604
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4605
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
4605
4606
|
// 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.
|
|
4606
4607
|
return /*#__PURE__*/React__namespace.default.createElement(react.Progress, _extends$6({
|
|
4607
4608
|
ref: ref,
|
|
@@ -4645,7 +4646,7 @@ Progress.defaultProps = {
|
|
|
4645
4646
|
variant: 'solid'
|
|
4646
4647
|
};
|
|
4647
4648
|
|
|
4648
|
-
const _excluded$
|
|
4649
|
+
const _excluded$d = ["defaultChecked", "isChecked", "isDisabled", "value", "helperText", "children", "size"];
|
|
4649
4650
|
const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
4650
4651
|
let {
|
|
4651
4652
|
defaultChecked,
|
|
@@ -4656,7 +4657,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4656
4657
|
children,
|
|
4657
4658
|
size = 'md'
|
|
4658
4659
|
} = _ref,
|
|
4659
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4660
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
4660
4661
|
const helperTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
4661
4662
|
return /*#__PURE__*/React__namespace.default.createElement(react.Checkbox, _extends$6({
|
|
4662
4663
|
ref: ref,
|
|
@@ -4682,7 +4683,7 @@ Checkbox.propTypes = {
|
|
|
4682
4683
|
size: PropTypes__default.default.oneOf(['sm', 'md', 'lg'])
|
|
4683
4684
|
};
|
|
4684
4685
|
|
|
4685
|
-
const _excluded$
|
|
4686
|
+
const _excluded$c = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
|
|
4686
4687
|
const Input$1 = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
4687
4688
|
let {
|
|
4688
4689
|
label,
|
|
@@ -4694,7 +4695,7 @@ const Input$1 = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4694
4695
|
isOptional,
|
|
4695
4696
|
customRequiredText
|
|
4696
4697
|
} = _ref,
|
|
4697
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4698
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
4698
4699
|
const classes = cn__default.default({
|
|
4699
4700
|
'FormElement-contains-error': isInvalid
|
|
4700
4701
|
});
|
|
@@ -4725,7 +4726,7 @@ Input$1.propTypes = {
|
|
|
4725
4726
|
customRequiredText: PropTypes__default.default.string
|
|
4726
4727
|
};
|
|
4727
4728
|
|
|
4728
|
-
const _excluded$
|
|
4729
|
+
const _excluded$b = ["label", "helperText", "errorMessage", "id", "children", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles"];
|
|
4729
4730
|
|
|
4730
4731
|
// No clue how to move these into the style file so just co-located to keep from slowing down
|
|
4731
4732
|
// Chakra V2 will heavily impact this component
|
|
@@ -4849,7 +4850,7 @@ const FormControl = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4849
4850
|
rightElementStyles,
|
|
4850
4851
|
leftElementStyles
|
|
4851
4852
|
} = _ref,
|
|
4852
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4853
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
4853
4854
|
return /*#__PURE__*/React__namespace.default.createElement(react.FormControl, _extends$6({}, props, {
|
|
4854
4855
|
ref: ref
|
|
4855
4856
|
}, controlStyles), /*#__PURE__*/React__namespace.default.createElement(react.InputGroup, null, leftElement && /*#__PURE__*/React__namespace.default.createElement(react.InputLeftElement, _extends$6({
|
|
@@ -4891,7 +4892,7 @@ FormControl.propTypes = {
|
|
|
4891
4892
|
isInvalid: PropTypes__default.default.bool
|
|
4892
4893
|
};
|
|
4893
4894
|
|
|
4894
|
-
const _excluded$
|
|
4895
|
+
const _excluded$a = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "placeholder"];
|
|
4895
4896
|
|
|
4896
4897
|
/**
|
|
4897
4898
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -4912,7 +4913,7 @@ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4912
4913
|
leftElementStyles,
|
|
4913
4914
|
placeholder = ' '
|
|
4914
4915
|
} = _ref,
|
|
4915
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4916
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
4916
4917
|
const classes = cn__default.default({
|
|
4917
4918
|
'FormElement-contains-error': isInvalid
|
|
4918
4919
|
}); //Historic carry over
|
|
@@ -4955,7 +4956,7 @@ Input.propTypes = {
|
|
|
4955
4956
|
leftElementStyles: PropTypes__default.default.object
|
|
4956
4957
|
};
|
|
4957
4958
|
|
|
4958
|
-
const _excluded$
|
|
4959
|
+
const _excluded$9 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "formControlStyles"];
|
|
4959
4960
|
|
|
4960
4961
|
//For select left is static arrow,
|
|
4961
4962
|
/**
|
|
@@ -4979,7 +4980,7 @@ const Select = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4979
4980
|
leftElementStyles,
|
|
4980
4981
|
formControlStyles
|
|
4981
4982
|
} = _ref,
|
|
4982
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
4983
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
4983
4984
|
const classes = cn__default.default({
|
|
4984
4985
|
'FormElement-contains-error': isInvalid
|
|
4985
4986
|
});
|
|
@@ -5020,7 +5021,7 @@ Select.propTypes = {
|
|
|
5020
5021
|
rightElementStyles: PropTypes__default.default.object
|
|
5021
5022
|
};
|
|
5022
5023
|
|
|
5023
|
-
const _excluded$
|
|
5024
|
+
const _excluded$8 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isHighlighted", "rightElement", "leftElement", "rightElementStyles", "leftElementStyles", "buttonValue"];
|
|
5024
5025
|
|
|
5025
5026
|
/**
|
|
5026
5027
|
* A component used in the homepage/midfunnel refresh of 2024
|
|
@@ -5044,7 +5045,7 @@ const Button = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
5044
5045
|
leftElementStyles,
|
|
5045
5046
|
buttonValue
|
|
5046
5047
|
} = _ref,
|
|
5047
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5048
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
5048
5049
|
const classes = cn__default.default({
|
|
5049
5050
|
'FormElement-contains-error': isInvalid
|
|
5050
5051
|
}); //Historic carry over
|
|
@@ -5288,7 +5289,7 @@ AutoSuggestSelect$1.propTypes = {
|
|
|
5288
5289
|
leftElementStyles: PropTypes__default.default.object
|
|
5289
5290
|
};
|
|
5290
5291
|
|
|
5291
|
-
const _excluded$
|
|
5292
|
+
const _excluded$7 = ["defaultChecked", "isChecked", "isDisabled", "value", "helperText", "children", "size"];
|
|
5292
5293
|
const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
5293
5294
|
let {
|
|
5294
5295
|
defaultChecked,
|
|
@@ -5299,7 +5300,7 @@ const Radio = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
5299
5300
|
children,
|
|
5300
5301
|
size = 'md'
|
|
5301
5302
|
} = _ref,
|
|
5302
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5303
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
5303
5304
|
const helperTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
5304
5305
|
return /*#__PURE__*/React__namespace.default.createElement(react.Radio, _extends$6({
|
|
5305
5306
|
ref: ref,
|
|
@@ -5324,7 +5325,7 @@ Radio.propTypes = {
|
|
|
5324
5325
|
size: PropTypes__default.default.oneOf(['sm', 'md', 'lg'])
|
|
5325
5326
|
};
|
|
5326
5327
|
|
|
5327
|
-
const _excluded$
|
|
5328
|
+
const _excluded$6 = ["label", "errorMessage", "defaultValue", "isDisabled", "isInvalid", "isRequired", "name", "onChange", "value", "children", "direction"];
|
|
5328
5329
|
const RadioGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
5329
5330
|
let {
|
|
5330
5331
|
label,
|
|
@@ -5339,7 +5340,7 @@ const RadioGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
5339
5340
|
children,
|
|
5340
5341
|
direction
|
|
5341
5342
|
} = _ref,
|
|
5342
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5343
|
+
props = _objectWithoutProperties(_ref, _excluded$6);
|
|
5343
5344
|
return /*#__PURE__*/React__namespace.default.createElement(FormControl$1, {
|
|
5344
5345
|
isInvalid: isInvalid,
|
|
5345
5346
|
isDisabled: isDisabled,
|
|
@@ -5374,7 +5375,7 @@ RadioGroup.propTypes = {
|
|
|
5374
5375
|
direction: PropTypes__default.default.oneOf(['row', 'column'])
|
|
5375
5376
|
};
|
|
5376
5377
|
|
|
5377
|
-
const _excluded$
|
|
5378
|
+
const _excluded$5 = ["isChecked", "isDisabled", "value", "helperText", "expandableChildren", "defaultChecked", "isRadio", "label", "isExpandable", "size", "expandableChildrenStyles", "topChild", "expandableContentKey"];
|
|
5378
5379
|
const SelectionCard = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
5379
5380
|
let {
|
|
5380
5381
|
isChecked,
|
|
@@ -5391,7 +5392,7 @@ const SelectionCard = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
5391
5392
|
topChild,
|
|
5392
5393
|
expandableContentKey = 'selection-card-content'
|
|
5393
5394
|
} = _ref,
|
|
5394
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5395
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
5395
5396
|
const Component = isRadio ? Radio : Checkbox;
|
|
5396
5397
|
const expandableTextSize = size === 'sm' || size === 'md' ? 'xs' : 'sm';
|
|
5397
5398
|
const hasExpandableContent = isExpandable && isChecked && expandableChildren;
|
|
@@ -5478,7 +5479,7 @@ const Divider = React.forwardRef(({ variant = 'solid', colorScheme: borderColor
|
|
|
5478
5479
|
});
|
|
5479
5480
|
Divider.displayName = 'Divider';
|
|
5480
5481
|
|
|
5481
|
-
const _excluded$
|
|
5482
|
+
const _excluded$4 = ["label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "isOptional", "customRequiredText"];
|
|
5482
5483
|
const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
5483
5484
|
let {
|
|
5484
5485
|
label,
|
|
@@ -5490,7 +5491,7 @@ const Textarea = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
5490
5491
|
isOptional,
|
|
5491
5492
|
customRequiredText
|
|
5492
5493
|
} = _ref,
|
|
5493
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5494
|
+
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
5494
5495
|
const classes = cn__default.default({
|
|
5495
5496
|
'FormElement-contains-error': isInvalid
|
|
5496
5497
|
});
|
|
@@ -5521,12 +5522,12 @@ Textarea.propTypes = {
|
|
|
5521
5522
|
customRequiredText: PropTypes__default.default.string
|
|
5522
5523
|
};
|
|
5523
5524
|
|
|
5524
|
-
const _excluded$
|
|
5525
|
+
const _excluded$3 = ["children"];
|
|
5525
5526
|
const Popover = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
5526
5527
|
const {
|
|
5527
5528
|
children
|
|
5528
5529
|
} = props,
|
|
5529
|
-
rest = _objectWithoutProperties(props, _excluded$
|
|
5530
|
+
rest = _objectWithoutProperties(props, _excluded$3);
|
|
5530
5531
|
return /*#__PURE__*/React__namespace.default.createElement(react.Popover, _extends$6({}, rest, {
|
|
5531
5532
|
ref: ref
|
|
5532
5533
|
}), React.Children.toArray(children).map((child, index) => /*#__PURE__*/React.cloneElement(child, {
|
|
@@ -5585,7 +5586,7 @@ const PopoverCloseButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
5585
5586
|
}, props, closeButtonStyles(props)));
|
|
5586
5587
|
});
|
|
5587
5588
|
|
|
5588
|
-
const _excluded$
|
|
5589
|
+
const _excluded$2 = ["header", "variant", "children", "hideCloseButton", "hideArrow", "popoverBodyProps"];
|
|
5589
5590
|
const PopoverContent = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
5590
5591
|
const {
|
|
5591
5592
|
header,
|
|
@@ -5595,7 +5596,7 @@ const PopoverContent = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
5595
5596
|
hideArrow,
|
|
5596
5597
|
popoverBodyProps
|
|
5597
5598
|
} = props,
|
|
5598
|
-
rest = _objectWithoutProperties(props, _excluded$
|
|
5599
|
+
rest = _objectWithoutProperties(props, _excluded$2);
|
|
5599
5600
|
return /*#__PURE__*/React__namespace.default.createElement(react.PopoverContent, _extends$6({}, rest, {
|
|
5600
5601
|
ref: ref
|
|
5601
5602
|
}), hideArrow ? null : /*#__PURE__*/React__namespace.default.createElement(PopoverArrow, {
|
|
@@ -5779,6 +5780,192 @@ AutoSuggestSelect.propTypes = {
|
|
|
5779
5780
|
innerProps: PropTypes__default.default.object
|
|
5780
5781
|
};
|
|
5781
5782
|
|
|
5783
|
+
const _excluded$1 = ["id", "label", "helperText", "errorMessage", "isInvalid", "isDisabled", "isRequired", "options", "onChange", "iconSrc", "placeholder", "defaultValue", "innerRef", "noOptionsMessage"];
|
|
5784
|
+
const DropdownIndicator$1 = props => {
|
|
5785
|
+
const {
|
|
5786
|
+
sizes
|
|
5787
|
+
} = react.useTheme();
|
|
5788
|
+
return /*#__PURE__*/React__namespace.default.createElement(Select$2.components.DropdownIndicator, props, /*#__PURE__*/React__namespace.default.createElement(react.Icon, {
|
|
5789
|
+
className: "FilterSelect-dropdown-icon",
|
|
5790
|
+
as: ForwardRef$1,
|
|
5791
|
+
boxSize: sizes['2.5']
|
|
5792
|
+
}));
|
|
5793
|
+
};
|
|
5794
|
+
const FilterSelectNode = _ref => {
|
|
5795
|
+
let {
|
|
5796
|
+
id,
|
|
5797
|
+
label,
|
|
5798
|
+
helperText,
|
|
5799
|
+
errorMessage,
|
|
5800
|
+
isInvalid,
|
|
5801
|
+
isDisabled,
|
|
5802
|
+
isRequired,
|
|
5803
|
+
options = [],
|
|
5804
|
+
onChange,
|
|
5805
|
+
iconSrc,
|
|
5806
|
+
placeholder,
|
|
5807
|
+
defaultValue = null,
|
|
5808
|
+
innerRef,
|
|
5809
|
+
noOptionsMessage = 'No Options'
|
|
5810
|
+
} = _ref,
|
|
5811
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
5812
|
+
const {
|
|
5813
|
+
colors,
|
|
5814
|
+
fontSizes,
|
|
5815
|
+
sizes
|
|
5816
|
+
} = react.useTheme();
|
|
5817
|
+
const handleChange = selectedOption => {
|
|
5818
|
+
onChange(selectedOption);
|
|
5819
|
+
};
|
|
5820
|
+
const icon = function () {
|
|
5821
|
+
let color = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transparent';
|
|
5822
|
+
return {
|
|
5823
|
+
alignItems: 'center',
|
|
5824
|
+
display: 'flex',
|
|
5825
|
+
':before': {
|
|
5826
|
+
backgroundColor: color,
|
|
5827
|
+
content: '" "',
|
|
5828
|
+
display: 'block',
|
|
5829
|
+
marginRight: sizes['3'],
|
|
5830
|
+
height: sizes['4'],
|
|
5831
|
+
width: sizes['5'],
|
|
5832
|
+
mask: "url(".concat(iconSrc, ") no-repeat 50% 50%"),
|
|
5833
|
+
maskSize: 'contain'
|
|
5834
|
+
}
|
|
5835
|
+
};
|
|
5836
|
+
};
|
|
5837
|
+
const baseText = {
|
|
5838
|
+
fontSize: fontSizes.base,
|
|
5839
|
+
color: colors.black
|
|
5840
|
+
};
|
|
5841
|
+
const customStyles = {
|
|
5842
|
+
menu: provided => _objectSpread2(_objectSpread2({}, provided), baseText),
|
|
5843
|
+
control: (provided, state) => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5844
|
+
borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary.default : colors.gray['200'],
|
|
5845
|
+
borderWidth: '1px',
|
|
5846
|
+
boxShadow: 'none',
|
|
5847
|
+
'&:hover': {
|
|
5848
|
+
borderColor: isInvalid ? colors.error : state.isFocused ? colors.primary.default : colors.gray['200']
|
|
5849
|
+
}
|
|
5850
|
+
}),
|
|
5851
|
+
input: (provided, state) => _objectSpread2(_objectSpread2(_objectSpread2({}, provided), baseText), {}, {
|
|
5852
|
+
padding: sizes['2'],
|
|
5853
|
+
backgroundColor: state.isDisabled ? colors.gray['200'] : 'transparent'
|
|
5854
|
+
}, iconSrc && icon(colors.gray['600'])),
|
|
5855
|
+
placeholder: provided => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5856
|
+
padding: sizes['2'],
|
|
5857
|
+
fontSize: fontSizes.base,
|
|
5858
|
+
color: colors.gray['600']
|
|
5859
|
+
}, iconSrc && icon()),
|
|
5860
|
+
singleValue: provided => _objectSpread2(_objectSpread2(_objectSpread2({}, provided), baseText), {}, {
|
|
5861
|
+
padding: sizes['2']
|
|
5862
|
+
}, iconSrc && icon()),
|
|
5863
|
+
option: (provided, state) => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5864
|
+
backgroundColor: state.isSelected ? colors.gray['200'] : state.isFocused ? colors.gray['50'] : 'transparent',
|
|
5865
|
+
color: colors.black
|
|
5866
|
+
}),
|
|
5867
|
+
clearIndicator: provided => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5868
|
+
color: colors.gray['400'],
|
|
5869
|
+
'&:hover': {
|
|
5870
|
+
color: colors.gray['600']
|
|
5871
|
+
}
|
|
5872
|
+
}),
|
|
5873
|
+
dropdownIndicator: provided => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5874
|
+
color: colors.brandBlue,
|
|
5875
|
+
'&:hover': {
|
|
5876
|
+
color: colors.brandBlue
|
|
5877
|
+
}
|
|
5878
|
+
}),
|
|
5879
|
+
indicatorSeparator: provided => _objectSpread2(_objectSpread2({}, provided), {}, {
|
|
5880
|
+
display: 'none'
|
|
5881
|
+
})
|
|
5882
|
+
};
|
|
5883
|
+
return /*#__PURE__*/React__namespace.default.createElement(FormControl$1, {
|
|
5884
|
+
errorMessage: errorMessage,
|
|
5885
|
+
isRequired: isRequired,
|
|
5886
|
+
helperText: helperText,
|
|
5887
|
+
label: label,
|
|
5888
|
+
inputId: id,
|
|
5889
|
+
isInvalid: isInvalid
|
|
5890
|
+
}, /*#__PURE__*/React__namespace.default.createElement(Select__default.default, _extends$6({
|
|
5891
|
+
ref: innerRef,
|
|
5892
|
+
classNamePrefix: "fe-ui-filter-select",
|
|
5893
|
+
closeMenuOnSelect: true,
|
|
5894
|
+
isClearable: true,
|
|
5895
|
+
components: {
|
|
5896
|
+
DropdownIndicator: DropdownIndicator$1
|
|
5897
|
+
},
|
|
5898
|
+
openMenuOnClick: true,
|
|
5899
|
+
options: options,
|
|
5900
|
+
onChange: handleChange,
|
|
5901
|
+
isDisabled: isDisabled,
|
|
5902
|
+
inputId: id,
|
|
5903
|
+
placeholder: placeholder,
|
|
5904
|
+
defaultValue: defaultValue,
|
|
5905
|
+
styles: customStyles,
|
|
5906
|
+
noOptionsMessage: () => noOptionsMessage
|
|
5907
|
+
}, props)));
|
|
5908
|
+
};
|
|
5909
|
+
const FilterSelect = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__namespace.default.createElement(FilterSelectNode, _extends$6({
|
|
5910
|
+
innerRef: ref
|
|
5911
|
+
}, props)));
|
|
5912
|
+
FilterSelect.propTypes = {
|
|
5913
|
+
/** ID applied to the select and label */
|
|
5914
|
+
id: PropTypes__default.default.string.isRequired,
|
|
5915
|
+
/** Label that describes the select */
|
|
5916
|
+
label: PropTypes__default.default.string,
|
|
5917
|
+
/** Text to use as placeholder in the input */
|
|
5918
|
+
placeholder: PropTypes__default.default.string,
|
|
5919
|
+
/** Optional helper text displayed below the select */
|
|
5920
|
+
helperText: PropTypes__default.default.string,
|
|
5921
|
+
/** Error message that would display under the select */
|
|
5922
|
+
errorMessage: PropTypes__default.default.string,
|
|
5923
|
+
/** Boolean that sets whether the select is valid */
|
|
5924
|
+
isInvalid: PropTypes__default.default.bool,
|
|
5925
|
+
/** Boolean that sets whether the select is disabled */
|
|
5926
|
+
isDisabled: PropTypes__default.default.bool,
|
|
5927
|
+
/** Boolean that sets whether the select is required */
|
|
5928
|
+
isRequired: PropTypes__default.default.bool,
|
|
5929
|
+
/** List of available options */
|
|
5930
|
+
options: PropTypes__default.default.arrayOf(PropTypes__default.default.shape({
|
|
5931
|
+
label: PropTypes__default.default.string.isRequired,
|
|
5932
|
+
value: PropTypes__default.default.any.isRequired
|
|
5933
|
+
})).isRequired,
|
|
5934
|
+
/** Function that is called when an option is selected, it returns the selected option */
|
|
5935
|
+
onChange: PropTypes__default.default.func.isRequired,
|
|
5936
|
+
/** Optional src to SVG to use as search icon */
|
|
5937
|
+
iconSrc: PropTypes__default.default.string,
|
|
5938
|
+
/** Optional default option for uncontrolled usage */
|
|
5939
|
+
defaultValue: PropTypes__default.default.shape({
|
|
5940
|
+
label: PropTypes__default.default.string,
|
|
5941
|
+
value: PropTypes__default.default.any
|
|
5942
|
+
}),
|
|
5943
|
+
/** Optional message to display when there are no options */
|
|
5944
|
+
noOptionsMessage: PropTypes__default.default.string
|
|
5945
|
+
};
|
|
5946
|
+
FilterSelectNode.propTypes = {
|
|
5947
|
+
id: PropTypes__default.default.string.isRequired,
|
|
5948
|
+
label: PropTypes__default.default.string,
|
|
5949
|
+
placeholder: PropTypes__default.default.string,
|
|
5950
|
+
helperText: PropTypes__default.default.string,
|
|
5951
|
+
errorMessage: PropTypes__default.default.string,
|
|
5952
|
+
isInvalid: PropTypes__default.default.bool,
|
|
5953
|
+
isDisabled: PropTypes__default.default.bool,
|
|
5954
|
+
isRequired: PropTypes__default.default.bool,
|
|
5955
|
+
options: PropTypes__default.default.arrayOf(PropTypes__default.default.shape({
|
|
5956
|
+
label: PropTypes__default.default.string.isRequired,
|
|
5957
|
+
value: PropTypes__default.default.any.isRequired
|
|
5958
|
+
})).isRequired,
|
|
5959
|
+
onChange: PropTypes__default.default.func.isRequired,
|
|
5960
|
+
iconSrc: PropTypes__default.default.string,
|
|
5961
|
+
defaultValue: PropTypes__default.default.shape({
|
|
5962
|
+
label: PropTypes__default.default.string,
|
|
5963
|
+
value: PropTypes__default.default.any
|
|
5964
|
+
}),
|
|
5965
|
+
innerRef: PropTypes__default.default.object,
|
|
5966
|
+
noOptionsMessage: PropTypes__default.default.string
|
|
5967
|
+
};
|
|
5968
|
+
|
|
5782
5969
|
const defaultStyles = {
|
|
5783
5970
|
border: 0,
|
|
5784
5971
|
borderRadius: '4px',
|
|
@@ -5872,7 +6059,7 @@ const DropdownIndicator = props => {
|
|
|
5872
6059
|
const {
|
|
5873
6060
|
sizes
|
|
5874
6061
|
} = react.useTheme();
|
|
5875
|
-
return /*#__PURE__*/React__namespace.default.createElement(
|
|
6062
|
+
return /*#__PURE__*/React__namespace.default.createElement(Select$2.components.DropdownIndicator, props, /*#__PURE__*/React__namespace.default.createElement(react.Icon, {
|
|
5876
6063
|
className: "CreatableSelect-dropdown-icon",
|
|
5877
6064
|
as: ForwardRef$1,
|
|
5878
6065
|
boxSize: sizes['2.5']
|
|
@@ -6382,6 +6569,7 @@ exports.Container = Container;
|
|
|
6382
6569
|
exports.CreatableSelect = CreatableSelect$1;
|
|
6383
6570
|
exports.Divider = Divider;
|
|
6384
6571
|
exports.Drawer = Drawer;
|
|
6572
|
+
exports.FilterSelect = FilterSelect;
|
|
6385
6573
|
exports.Grid = Grid;
|
|
6386
6574
|
exports.GridItem = GridItem;
|
|
6387
6575
|
exports.Heading = Heading;
|