@bigbinary/neetoui 5.1.10 → 5.1.11
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/formik.cjs.js +178 -66
- package/formik.cjs.js.map +1 -1
- package/formik.js +178 -66
- package/formik.js.map +1 -1
- package/index.cjs.js +168 -133
- package/index.cjs.js.map +1 -1
- package/index.js +168 -133
- package/index.js.map +1 -1
- package/package.json +1 -1
package/formik.cjs.js
CHANGED
|
@@ -9900,10 +9900,10 @@ visualElement({
|
|
|
9900
9900
|
},
|
|
9901
9901
|
});
|
|
9902
9902
|
|
|
9903
|
-
var _excluded$
|
|
9903
|
+
var _excluded$t = ["children"];
|
|
9904
9904
|
var Portal$1 = function Portal(_ref, ref) {
|
|
9905
9905
|
var children = _ref.children,
|
|
9906
|
-
otherProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
9906
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$t);
|
|
9907
9907
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$2({
|
|
9908
9908
|
"data-testid": "neeto-backdrop",
|
|
9909
9909
|
ref: ref
|
|
@@ -13911,7 +13911,7 @@ var index$1 = /*#__PURE__*/forwardRef( /*#__PURE__*/TippyGenerator(tippy));
|
|
|
13911
13911
|
|
|
13912
13912
|
var ARROW = "<svg width='12' height='6' viewBox='0 0 10 5' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M10 5H0.926697L3.95208 1.63847C4.74227 0.760478 6.11722 0.754951 6.91445 1.62656L10 5Z' /></svg>";
|
|
13913
13913
|
|
|
13914
|
-
var _excluded$
|
|
13914
|
+
var _excluded$s = ["content", "children", "theme", "disabled", "position", "interactive", "hideAfter", "hideOnTargetExit"];
|
|
13915
13915
|
var Tooltip = function Tooltip(_ref) {
|
|
13916
13916
|
var content = _ref.content,
|
|
13917
13917
|
children = _ref.children,
|
|
@@ -13927,7 +13927,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
13927
13927
|
hideAfter = _ref$hideAfter === void 0 ? -1 : _ref$hideAfter,
|
|
13928
13928
|
_ref$hideOnTargetExit = _ref.hideOnTargetExit,
|
|
13929
13929
|
hideOnTargetExit = _ref$hideOnTargetExit === void 0 ? false : _ref$hideOnTargetExit,
|
|
13930
|
-
otherProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
13930
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$s);
|
|
13931
13931
|
var _useState = React.useState(null),
|
|
13932
13932
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
13933
13933
|
instance = _useState2[0],
|
|
@@ -13970,7 +13970,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
13970
13970
|
}, localProps, otherProps), /*#__PURE__*/React__default["default"].isValidElement(children) ? children : /*#__PURE__*/React__default["default"].createElement("span", null, children));
|
|
13971
13971
|
};
|
|
13972
13972
|
|
|
13973
|
-
var _excluded$
|
|
13973
|
+
var _excluded$r = ["icon", "iconPosition", "iconSize", "label", "loading", "onClick", "to", "type", "style", "fullWidth", "className", "disabled", "size", "href", "tooltipProps", "children"];
|
|
13974
13974
|
var BUTTON_STYLES = {
|
|
13975
13975
|
primary: "primary",
|
|
13976
13976
|
secondary: "secondary",
|
|
@@ -13979,7 +13979,7 @@ var BUTTON_STYLES = {
|
|
|
13979
13979
|
text: "text",
|
|
13980
13980
|
link: "link"
|
|
13981
13981
|
};
|
|
13982
|
-
var SIZES$
|
|
13982
|
+
var SIZES$6 = {
|
|
13983
13983
|
small: "small",
|
|
13984
13984
|
medium: "medium",
|
|
13985
13985
|
large: "large"
|
|
@@ -14019,13 +14019,13 @@ var Button = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
14019
14019
|
_ref$disabled = _ref.disabled,
|
|
14020
14020
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
14021
14021
|
_ref$size = _ref.size,
|
|
14022
|
-
size = _ref$size === void 0 ? SIZES$
|
|
14022
|
+
size = _ref$size === void 0 ? SIZES$6.medium : _ref$size,
|
|
14023
14023
|
_ref$href = _ref.href,
|
|
14024
14024
|
href = _ref$href === void 0 ? "" : _ref$href,
|
|
14025
14025
|
_ref$tooltipProps = _ref.tooltipProps,
|
|
14026
14026
|
tooltipProps = _ref$tooltipProps === void 0 ? null : _ref$tooltipProps,
|
|
14027
14027
|
children = _ref.children,
|
|
14028
|
-
otherProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
14028
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$r);
|
|
14029
14029
|
var Parent, elementSpecificProps;
|
|
14030
14030
|
var renderLabel = label || children;
|
|
14031
14031
|
if (to) {
|
|
@@ -14067,8 +14067,8 @@ var Button = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
14067
14067
|
"neeto-ui-btn--style-danger-text": style === BUTTON_STYLES.danger_text,
|
|
14068
14068
|
"neeto-ui-btn--style-text": style === BUTTON_STYLES.text,
|
|
14069
14069
|
"neeto-ui-btn--style-link": style === BUTTON_STYLES.link,
|
|
14070
|
-
"neeto-ui-btn--size-medium": size === SIZES$
|
|
14071
|
-
"neeto-ui-btn--size-large": size === SIZES$
|
|
14070
|
+
"neeto-ui-btn--size-medium": size === SIZES$6.medium,
|
|
14071
|
+
"neeto-ui-btn--size-large": size === SIZES$6.large,
|
|
14072
14072
|
"neeto-ui-btn--width-full": fullWidth,
|
|
14073
14073
|
"neeto-ui-btn--icon-left": iconPosition === ICON_POSITIONS.left,
|
|
14074
14074
|
"neeto-ui-btn--icon-only": !renderLabel,
|
|
@@ -14115,10 +14115,10 @@ var Button = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, r
|
|
|
14115
14115
|
});
|
|
14116
14116
|
Button.displayName = "Button";
|
|
14117
14117
|
|
|
14118
|
-
var _excluded$
|
|
14118
|
+
var _excluded$q = ["disabled"];
|
|
14119
14119
|
var FormikButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
14120
14120
|
var disabled = _ref.disabled,
|
|
14121
|
-
otherProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
14121
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$q);
|
|
14122
14122
|
var _useFormikContext = formik.useFormikContext(),
|
|
14123
14123
|
handleSubmit = _useFormikContext.handleSubmit,
|
|
14124
14124
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
@@ -16734,7 +16734,7 @@ var Footer = function Footer(_ref) {
|
|
|
16734
16734
|
}, children);
|
|
16735
16735
|
};
|
|
16736
16736
|
|
|
16737
|
-
var _excluded$
|
|
16737
|
+
var _excluded$p = ["style", "weight", "lineHeight", "component", "children", "textTransform", "className"];
|
|
16738
16738
|
var FONT_WEIGHTS = {
|
|
16739
16739
|
thin: "thin",
|
|
16740
16740
|
extralight: "extralight",
|
|
@@ -16746,7 +16746,7 @@ var FONT_WEIGHTS = {
|
|
|
16746
16746
|
extrabold: "extrabold",
|
|
16747
16747
|
black: "black"
|
|
16748
16748
|
};
|
|
16749
|
-
var STYLES$
|
|
16749
|
+
var STYLES$2 = {
|
|
16750
16750
|
h1: "h1",
|
|
16751
16751
|
h2: "h2",
|
|
16752
16752
|
h3: "h3",
|
|
@@ -16822,22 +16822,22 @@ var Typography = /*#__PURE__*/React__default["default"].forwardRef(function (_re
|
|
|
16822
16822
|
textTransform = _ref.textTransform,
|
|
16823
16823
|
_ref$className = _ref.className,
|
|
16824
16824
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
16825
|
-
otherProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
16825
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$p);
|
|
16826
16826
|
var Component = component ? COMPONENTS[component] : style ? DEFAULT_COMPONENTS[style] : "p";
|
|
16827
16827
|
return /*#__PURE__*/React__default["default"].createElement(Component, _extends$2({
|
|
16828
16828
|
ref: ref,
|
|
16829
16829
|
className: classnames$1(_defineProperty$1({
|
|
16830
16830
|
"neeto-ui-typography": true,
|
|
16831
|
-
"neeto-ui-text-h1": style === STYLES$
|
|
16832
|
-
"neeto-ui-text-h2": style === STYLES$
|
|
16833
|
-
"neeto-ui-text-h3": style === STYLES$
|
|
16834
|
-
"neeto-ui-text-h4": style === STYLES$
|
|
16835
|
-
"neeto-ui-text-h5": style === STYLES$
|
|
16836
|
-
"neeto-ui-text-h6": style === STYLES$
|
|
16837
|
-
"neeto-ui-text-body1": style === STYLES$
|
|
16838
|
-
"neeto-ui-text-body2": style === STYLES$
|
|
16839
|
-
"neeto-ui-text-body3": style === STYLES$
|
|
16840
|
-
"neeto-ui-text-nano": style === STYLES$
|
|
16831
|
+
"neeto-ui-text-h1": style === STYLES$2.h1,
|
|
16832
|
+
"neeto-ui-text-h2": style === STYLES$2.h2,
|
|
16833
|
+
"neeto-ui-text-h3": style === STYLES$2.h3,
|
|
16834
|
+
"neeto-ui-text-h4": style === STYLES$2.h4,
|
|
16835
|
+
"neeto-ui-text-h5": style === STYLES$2.h5,
|
|
16836
|
+
"neeto-ui-text-h6": style === STYLES$2.h6,
|
|
16837
|
+
"neeto-ui-text-body1": style === STYLES$2.body1,
|
|
16838
|
+
"neeto-ui-text-body2": style === STYLES$2.body2,
|
|
16839
|
+
"neeto-ui-text-body3": style === STYLES$2.body3,
|
|
16840
|
+
"neeto-ui-text-nano": style === STYLES$2.nano,
|
|
16841
16841
|
"neeto-ui-text-transform-none": textTransform === TEXT_TRANSFORM.none,
|
|
16842
16842
|
"neeto-ui-text-transform-capitalize": textTransform === TEXT_TRANSFORM.capitalize,
|
|
16843
16843
|
"neeto-ui-text-transform-uppercase": textTransform === TEXT_TRANSFORM.uppercase,
|
|
@@ -16882,8 +16882,8 @@ var Header = function Header(_ref) {
|
|
|
16882
16882
|
}, description)));
|
|
16883
16883
|
};
|
|
16884
16884
|
|
|
16885
|
-
var _excluded$
|
|
16886
|
-
var SIZES$
|
|
16885
|
+
var _excluded$o = ["size", "isOpen", "onClose", "children", "finalFocusRef", "initialFocusRef", "className", "closeOnEsc", "closeButton", "backdropClassName", "blockScrollOnMount", "closeOnOutsideClick"];
|
|
16886
|
+
var SIZES$5 = {
|
|
16887
16887
|
small: "small",
|
|
16888
16888
|
medium: "medium",
|
|
16889
16889
|
large: "large",
|
|
@@ -16891,7 +16891,7 @@ var SIZES$4 = {
|
|
|
16891
16891
|
};
|
|
16892
16892
|
var Modal = function Modal(_ref) {
|
|
16893
16893
|
var _ref$size = _ref.size,
|
|
16894
|
-
size = _ref$size === void 0 ? SIZES$
|
|
16894
|
+
size = _ref$size === void 0 ? SIZES$5.medium : _ref$size,
|
|
16895
16895
|
_ref$isOpen = _ref.isOpen,
|
|
16896
16896
|
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
16897
16897
|
_ref$onClose = _ref.onClose,
|
|
@@ -16911,7 +16911,7 @@ var Modal = function Modal(_ref) {
|
|
|
16911
16911
|
blockScrollOnMount = _ref$blockScrollOnMou === void 0 ? true : _ref$blockScrollOnMou,
|
|
16912
16912
|
_ref$closeOnOutsideCl = _ref.closeOnOutsideClick,
|
|
16913
16913
|
closeOnOutsideClick = _ref$closeOnOutsideCl === void 0 ? true : _ref$closeOnOutsideCl,
|
|
16914
|
-
otherProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
16914
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$o);
|
|
16915
16915
|
var _useState = React.useState(false),
|
|
16916
16916
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
16917
16917
|
hasTransitionCompleted = _useState2[0],
|
|
@@ -16952,7 +16952,7 @@ var Modal = function Modal(_ref) {
|
|
|
16952
16952
|
key: "modal-backdrop",
|
|
16953
16953
|
ref: backdropRef,
|
|
16954
16954
|
className: classnames$1("neeto-ui-modal__backdrop", {
|
|
16955
|
-
"neeto-ui-modal__backdrop--fullscreen": size === SIZES$
|
|
16955
|
+
"neeto-ui-modal__backdrop--fullscreen": size === SIZES$5.fullScreen
|
|
16956
16956
|
}, backdropClassName)
|
|
16957
16957
|
}, /*#__PURE__*/React__default["default"].createElement("div", _extends$2({
|
|
16958
16958
|
"aria-modal": true,
|
|
@@ -16960,10 +16960,10 @@ var Modal = function Modal(_ref) {
|
|
|
16960
16960
|
ref: modalWrapper,
|
|
16961
16961
|
role: "dialog",
|
|
16962
16962
|
className: classnames$1("neeto-ui-modal__wrapper", _defineProperty$1({
|
|
16963
|
-
"neeto-ui-modal__wrapper--small": size === SIZES$
|
|
16964
|
-
"neeto-ui-modal__wrapper--medium": size === SIZES$
|
|
16965
|
-
"neeto-ui-modal__wrapper--large": size === SIZES$
|
|
16966
|
-
"neeto-ui-modal__wrapper--fullscreen": size === SIZES$
|
|
16963
|
+
"neeto-ui-modal__wrapper--small": size === SIZES$5.small,
|
|
16964
|
+
"neeto-ui-modal__wrapper--medium": size === SIZES$5.medium,
|
|
16965
|
+
"neeto-ui-modal__wrapper--large": size === SIZES$5.large,
|
|
16966
|
+
"neeto-ui-modal__wrapper--fullscreen": size === SIZES$5.fullScreen
|
|
16967
16967
|
}, className, className))
|
|
16968
16968
|
}, otherProps), closeButton && /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
16969
16969
|
"aria-label": "Close",
|
|
@@ -16981,7 +16981,7 @@ Modal.Header = Header;
|
|
|
16981
16981
|
Modal.Body = Body;
|
|
16982
16982
|
Modal.Footer = Footer;
|
|
16983
16983
|
|
|
16984
|
-
var SIZES$
|
|
16984
|
+
var SIZES$4 = {
|
|
16985
16985
|
small: "small",
|
|
16986
16986
|
medium: "medium",
|
|
16987
16987
|
large: "large"
|
|
@@ -16992,7 +16992,7 @@ var FOCUSABLE_ELEMENTS = {
|
|
|
16992
16992
|
};
|
|
16993
16993
|
var Alert = function Alert(_ref) {
|
|
16994
16994
|
var _ref$size = _ref.size,
|
|
16995
|
-
size = _ref$size === void 0 ? SIZES$
|
|
16995
|
+
size = _ref$size === void 0 ? SIZES$4.medium : _ref$size,
|
|
16996
16996
|
_ref$isOpen = _ref.isOpen,
|
|
16997
16997
|
isOpen = _ref$isOpen === void 0 ? false : _ref$isOpen,
|
|
16998
16998
|
_ref$isSubmitting = _ref.isSubmitting,
|
|
@@ -17228,8 +17228,8 @@ function useId(idFromProps) {
|
|
|
17228
17228
|
return id != null ? String(id) : undefined;
|
|
17229
17229
|
}
|
|
17230
17230
|
|
|
17231
|
-
var _excluded$
|
|
17232
|
-
_excluded2 = ["onClick", "icon", "tooltipProps", "className"];
|
|
17231
|
+
var _excluded$n = ["children", "className", "required", "helpIconProps"],
|
|
17232
|
+
_excluded2$1 = ["onClick", "icon", "tooltipProps", "className"];
|
|
17233
17233
|
var Label = function Label(_ref) {
|
|
17234
17234
|
var children = _ref.children,
|
|
17235
17235
|
_ref$className = _ref.className,
|
|
@@ -17238,13 +17238,13 @@ var Label = function Label(_ref) {
|
|
|
17238
17238
|
required = _ref$required === void 0 ? false : _ref$required,
|
|
17239
17239
|
_ref$helpIconProps = _ref.helpIconProps,
|
|
17240
17240
|
helpIconProps = _ref$helpIconProps === void 0 ? null : _ref$helpIconProps,
|
|
17241
|
-
otherProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
17241
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$n);
|
|
17242
17242
|
var _ref2 = helpIconProps || {},
|
|
17243
17243
|
onClick = _ref2.onClick,
|
|
17244
17244
|
icon = _ref2.icon,
|
|
17245
17245
|
tooltipProps = _ref2.tooltipProps,
|
|
17246
17246
|
helpIconClassName = _ref2.className,
|
|
17247
|
-
otherHelpIconProps = _objectWithoutProperties$1(_ref2, _excluded2);
|
|
17247
|
+
otherHelpIconProps = _objectWithoutProperties$1(_ref2, _excluded2$1);
|
|
17248
17248
|
var HelpIcon = icon || neetoIcons.Info;
|
|
17249
17249
|
return /*#__PURE__*/React__default["default"].createElement("label", _extends$2({
|
|
17250
17250
|
className: classnames$1("neeto-ui-label neeto-ui-flex neeto-ui-items-center", className)
|
|
@@ -17260,7 +17260,7 @@ var Label = function Label(_ref) {
|
|
|
17260
17260
|
}, otherHelpIconProps)))));
|
|
17261
17261
|
};
|
|
17262
17262
|
|
|
17263
|
-
var _excluded$
|
|
17263
|
+
var _excluded$m = ["label", "error", "className", "required", "labelProps", "children"];
|
|
17264
17264
|
var Checkbox$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
17265
17265
|
var _ref$label = _ref.label,
|
|
17266
17266
|
label = _ref$label === void 0 ? "" : _ref$label,
|
|
@@ -17272,7 +17272,7 @@ var Checkbox$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
17272
17272
|
required = _ref$required === void 0 ? false : _ref$required,
|
|
17273
17273
|
labelProps = _ref.labelProps,
|
|
17274
17274
|
children = _ref.children,
|
|
17275
|
-
otherProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
17275
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$m);
|
|
17276
17276
|
var id = useId(otherProps.id);
|
|
17277
17277
|
var errorId = "error_".concat(id);
|
|
17278
17278
|
var renderLabel = label || children;
|
|
@@ -17300,10 +17300,10 @@ var Checkbox$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
17300
17300
|
});
|
|
17301
17301
|
Checkbox$1.displayName = "Checkbox";
|
|
17302
17302
|
|
|
17303
|
-
var _excluded$
|
|
17303
|
+
var _excluded$l = ["name"];
|
|
17304
17304
|
var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
17305
17305
|
var name = _ref.name,
|
|
17306
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
17306
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$l);
|
|
17307
17307
|
return /*#__PURE__*/React__default["default"].createElement(formik.Field, {
|
|
17308
17308
|
name: name
|
|
17309
17309
|
}, function (_ref2) {
|
|
@@ -17756,7 +17756,7 @@ var ScrollToErrorField = function ScrollToErrorField(_ref) {
|
|
|
17756
17756
|
return null;
|
|
17757
17757
|
};
|
|
17758
17758
|
|
|
17759
|
-
var _excluded$
|
|
17759
|
+
var _excluded$k = ["values", "validateForm", "setErrors", "setTouched"];
|
|
17760
17760
|
var FormWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
17761
17761
|
var className = _ref.className,
|
|
17762
17762
|
formProps = _ref.formProps,
|
|
@@ -17768,7 +17768,7 @@ var FormWrapper = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
17768
17768
|
validateForm = _useFormikContext.validateForm,
|
|
17769
17769
|
setErrors = _useFormikContext.setErrors,
|
|
17770
17770
|
setTouched = _useFormikContext.setTouched,
|
|
17771
|
-
formikBag = _objectWithoutProperties$1(_useFormikContext, _excluded$
|
|
17771
|
+
formikBag = _objectWithoutProperties$1(_useFormikContext, _excluded$k);
|
|
17772
17772
|
var isFormDirty = formikBag.dirty,
|
|
17773
17773
|
isSubmitting = formikBag.isSubmitting;
|
|
17774
17774
|
var formRefForScrollToErrorField = React.useRef();
|
|
@@ -17891,8 +17891,8 @@ Form.propTypes = {
|
|
|
17891
17891
|
scrollToErrorField: propTypes.exports.bool
|
|
17892
17892
|
};
|
|
17893
17893
|
|
|
17894
|
-
var _excluded$
|
|
17895
|
-
var SIZES$
|
|
17894
|
+
var _excluded$j = ["size", "type", "label", "error", "suffix", "prefix", "disabled", "helpText", "className", "nakedInput", "contentSize", "required", "maxLength", "unlimitedChars", "labelProps", "rejectCharsRegex"];
|
|
17895
|
+
var SIZES$3 = {
|
|
17896
17896
|
small: "small",
|
|
17897
17897
|
medium: "medium",
|
|
17898
17898
|
large: "large"
|
|
@@ -17900,7 +17900,7 @@ var SIZES$2 = {
|
|
|
17900
17900
|
var Input$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
17901
17901
|
var _ref2, _otherProps$value, _classnames;
|
|
17902
17902
|
var _ref$size = _ref.size,
|
|
17903
|
-
size = _ref$size === void 0 ? SIZES$
|
|
17903
|
+
size = _ref$size === void 0 ? SIZES$3.medium : _ref$size,
|
|
17904
17904
|
_ref$type = _ref.type,
|
|
17905
17905
|
type = _ref$type === void 0 ? "text" : _ref$type,
|
|
17906
17906
|
_ref$label = _ref.label,
|
|
@@ -17928,7 +17928,7 @@ var Input$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
17928
17928
|
unlimitedChars = _ref$unlimitedChars === void 0 ? false : _ref$unlimitedChars,
|
|
17929
17929
|
labelProps = _ref.labelProps,
|
|
17930
17930
|
rejectCharsRegex = _ref.rejectCharsRegex,
|
|
17931
|
-
otherProps = _objectWithoutProperties$1(_ref, _excluded$
|
|
17931
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$j);
|
|
17932
17932
|
var _useState = React.useState(otherProps.value),
|
|
17933
17933
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
17934
17934
|
valueInternal = _useState2[0],
|
|
@@ -18006,10 +18006,10 @@ var Input$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
18006
18006
|
});
|
|
18007
18007
|
Input$1.displayName = "Input";
|
|
18008
18008
|
|
|
18009
|
-
var _excluded$
|
|
18009
|
+
var _excluded$i = ["name"];
|
|
18010
18010
|
var FormikInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
18011
18011
|
var name = _ref.name,
|
|
18012
|
-
rest = _objectWithoutProperties$1(_ref, _excluded$
|
|
18012
|
+
rest = _objectWithoutProperties$1(_ref, _excluded$i);
|
|
18013
18013
|
return /*#__PURE__*/React__default["default"].createElement(formik.Field, {
|
|
18014
18014
|
name: name
|
|
18015
18015
|
}, function (_ref2) {
|
|
@@ -21626,7 +21626,7 @@ var GroupHeading = function GroupHeading(props) {
|
|
|
21626
21626
|
}, innerProps));
|
|
21627
21627
|
};
|
|
21628
21628
|
|
|
21629
|
-
var _excluded$
|
|
21629
|
+
var _excluded$h = ["innerRef", "isDisabled", "isHidden", "inputClassName"];
|
|
21630
21630
|
var inputCSS = function inputCSS(_ref) {
|
|
21631
21631
|
var isDisabled = _ref.isDisabled,
|
|
21632
21632
|
value = _ref.value,
|
|
@@ -21683,7 +21683,7 @@ var Input = function Input(props) {
|
|
|
21683
21683
|
isDisabled = _cleanCommonProps.isDisabled,
|
|
21684
21684
|
isHidden = _cleanCommonProps.isHidden,
|
|
21685
21685
|
inputClassName = _cleanCommonProps.inputClassName,
|
|
21686
|
-
innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$
|
|
21686
|
+
innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$h);
|
|
21687
21687
|
return jsx("div", {
|
|
21688
21688
|
className: cx({
|
|
21689
21689
|
'input-container': true
|
|
@@ -22506,10 +22506,10 @@ var createFilter = function createFilter(config) {
|
|
|
22506
22506
|
};
|
|
22507
22507
|
};
|
|
22508
22508
|
|
|
22509
|
-
var _excluded$
|
|
22509
|
+
var _excluded$g = ["innerRef"];
|
|
22510
22510
|
function DummyInput(_ref) {
|
|
22511
22511
|
var innerRef = _ref.innerRef,
|
|
22512
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
22512
|
+
props = _objectWithoutProperties(_ref, _excluded$g);
|
|
22513
22513
|
// Remove animation props not meant for HTML elements
|
|
22514
22514
|
var filteredProps = removeProps(props, 'onExited', 'in', 'enter', 'exit', 'appear');
|
|
22515
22515
|
return jsx("input", _extends({
|
|
@@ -24505,7 +24505,7 @@ var Select$1 = /*#__PURE__*/function (_Component) {
|
|
|
24505
24505
|
}(React.Component);
|
|
24506
24506
|
Select$1.defaultProps = defaultProps;
|
|
24507
24507
|
|
|
24508
|
-
var _excluded$
|
|
24508
|
+
var _excluded$f = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
24509
24509
|
function useStateManager(_ref) {
|
|
24510
24510
|
var _ref$defaultInputValu = _ref.defaultInputValue,
|
|
24511
24511
|
defaultInputValue = _ref$defaultInputValu === void 0 ? '' : _ref$defaultInputValu,
|
|
@@ -24520,7 +24520,7 @@ function useStateManager(_ref) {
|
|
|
24520
24520
|
propsOnMenuClose = _ref.onMenuClose,
|
|
24521
24521
|
propsOnMenuOpen = _ref.onMenuOpen,
|
|
24522
24522
|
propsValue = _ref.value,
|
|
24523
|
-
restSelectProps = _objectWithoutProperties(_ref, _excluded$
|
|
24523
|
+
restSelectProps = _objectWithoutProperties(_ref, _excluded$f);
|
|
24524
24524
|
var _useState = React.useState(propsInputValue !== undefined ? propsInputValue : defaultInputValue),
|
|
24525
24525
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24526
24526
|
stateInputValue = _useState2[0],
|
|
@@ -24572,7 +24572,7 @@ function useStateManager(_ref) {
|
|
|
24572
24572
|
});
|
|
24573
24573
|
}
|
|
24574
24574
|
|
|
24575
|
-
var _excluded$
|
|
24575
|
+
var _excluded$e = ["allowCreateWhileLoading", "createOptionPosition", "formatCreateLabel", "isValidNewOption", "getNewOptionData", "onCreateOption", "options", "onChange"];
|
|
24576
24576
|
var compareOption = function compareOption() {
|
|
24577
24577
|
var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
24578
24578
|
var option = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -24616,7 +24616,7 @@ function useCreatable(_ref) {
|
|
|
24616
24616
|
_ref$options = _ref.options,
|
|
24617
24617
|
propsOptions = _ref$options === void 0 ? [] : _ref$options,
|
|
24618
24618
|
propsOnChange = _ref.onChange,
|
|
24619
|
-
restSelectProps = _objectWithoutProperties(_ref, _excluded$
|
|
24619
|
+
restSelectProps = _objectWithoutProperties(_ref, _excluded$e);
|
|
24620
24620
|
var _restSelectProps$getO = restSelectProps.getOptionValue,
|
|
24621
24621
|
getOptionValue$1$1 = _restSelectProps$getO === void 0 ? getOptionValue$1 : _restSelectProps$getO,
|
|
24622
24622
|
_restSelectProps$getO2 = restSelectProps.getOptionLabel,
|
|
@@ -24668,6 +24668,10 @@ var CreatableSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
24668
24668
|
}, selectProps));
|
|
24669
24669
|
});
|
|
24670
24670
|
|
|
24671
|
+
function _toArray(arr) {
|
|
24672
|
+
return _arrayWithHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableRest$1();
|
|
24673
|
+
}
|
|
24674
|
+
|
|
24671
24675
|
var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
24672
24676
|
var baseSelectProps = useStateManager(props);
|
|
24673
24677
|
return /*#__PURE__*/React__namespace.createElement(Select$1, _extends({
|
|
@@ -24675,7 +24679,85 @@ var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
24675
24679
|
}, baseSelectProps));
|
|
24676
24680
|
});
|
|
24677
24681
|
|
|
24678
|
-
var _excluded$
|
|
24682
|
+
var _excluded$d = ["style", "indicatorStyle", "label", "icon", "className", "onClose", "disabled", "size", "type", "children"];
|
|
24683
|
+
var SIZES$2 = {
|
|
24684
|
+
small: "small",
|
|
24685
|
+
large: "large"
|
|
24686
|
+
};
|
|
24687
|
+
var TYPES = {
|
|
24688
|
+
outline: "outline",
|
|
24689
|
+
solid: "solid"
|
|
24690
|
+
};
|
|
24691
|
+
var STYLES$1 = {
|
|
24692
|
+
primary: "primary",
|
|
24693
|
+
secondary: "secondary",
|
|
24694
|
+
info: "info",
|
|
24695
|
+
success: "success",
|
|
24696
|
+
warning: "warning",
|
|
24697
|
+
danger: "danger"
|
|
24698
|
+
};
|
|
24699
|
+
var Tag = function Tag(_ref) {
|
|
24700
|
+
var _ref$style = _ref.style,
|
|
24701
|
+
style = _ref$style === void 0 ? STYLES$1.primary : _ref$style,
|
|
24702
|
+
indicatorStyle = _ref.indicatorStyle,
|
|
24703
|
+
_ref$label = _ref.label,
|
|
24704
|
+
label = _ref$label === void 0 ? "" : _ref$label,
|
|
24705
|
+
_ref$icon = _ref.icon,
|
|
24706
|
+
icon = _ref$icon === void 0 ? null : _ref$icon,
|
|
24707
|
+
_ref$className = _ref.className,
|
|
24708
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
24709
|
+
_ref$onClose = _ref.onClose,
|
|
24710
|
+
onClose = _ref$onClose === void 0 ? null : _ref$onClose,
|
|
24711
|
+
_ref$disabled = _ref.disabled,
|
|
24712
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
24713
|
+
_ref$size = _ref.size,
|
|
24714
|
+
size = _ref$size === void 0 ? SIZES$2.small : _ref$size,
|
|
24715
|
+
_ref$type = _ref.type,
|
|
24716
|
+
type = _ref$type === void 0 ? TYPES.outline : _ref$type,
|
|
24717
|
+
children = _ref.children,
|
|
24718
|
+
otherProps = _objectWithoutProperties$1(_ref, _excluded$d);
|
|
24719
|
+
var Icon = typeof icon === "string" ? function () {
|
|
24720
|
+
return /*#__PURE__*/React__default["default"].createElement("i", {
|
|
24721
|
+
className: icon
|
|
24722
|
+
});
|
|
24723
|
+
} : icon || React.Fragment;
|
|
24724
|
+
var renderLabel = label || children;
|
|
24725
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends$2({
|
|
24726
|
+
"data-testid": "tag-container",
|
|
24727
|
+
className: classnames$1("neeto-ui-tag", {
|
|
24728
|
+
"neeto-ui-tag--size-large": size === SIZES$2.large,
|
|
24729
|
+
"neeto-ui-tag--size-small": size === SIZES$2.small,
|
|
24730
|
+
"neeto-ui-tag--type-outline": type === TYPES.outline,
|
|
24731
|
+
"neeto-ui-tag--type-solid": type === TYPES.solid,
|
|
24732
|
+
"neeto-ui-tag--style-primary": style === STYLES$1.primary,
|
|
24733
|
+
"neeto-ui-tag--style-secondary": style === STYLES$1.secondary,
|
|
24734
|
+
"neeto-ui-tag--style-success": style === STYLES$1.success,
|
|
24735
|
+
"neeto-ui-tag--style-info": style === STYLES$1.info,
|
|
24736
|
+
"neeto-ui-tag--style-warning": style === STYLES$1.warning,
|
|
24737
|
+
"neeto-ui-tag--style-danger": style === STYLES$1.danger
|
|
24738
|
+
}, className)
|
|
24739
|
+
}, otherProps), indicatorStyle && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
24740
|
+
"data-testid": "tag-indicator",
|
|
24741
|
+
className: classnames$1("neeto-ui-tag__indicator", {
|
|
24742
|
+
"neeto-ui-bg-error-500": indicatorStyle === STYLES$1.danger,
|
|
24743
|
+
"neeto-ui-bg-info-500": indicatorStyle === STYLES$1.info,
|
|
24744
|
+
"neeto-ui-bg-warning-500": indicatorStyle === STYLES$1.warning,
|
|
24745
|
+
"neeto-ui-bg-success-500": indicatorStyle === STYLES$1.success,
|
|
24746
|
+
"neeto-ui-bg-primary-500": indicatorStyle === STYLES$1.primary,
|
|
24747
|
+
"neeto-ui-bg-gray-500": indicatorStyle === STYLES$1.secondary
|
|
24748
|
+
})
|
|
24749
|
+
}), icon && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
24750
|
+
className: "neeto-ui-tag__icon",
|
|
24751
|
+
"data-testid": "class-icon"
|
|
24752
|
+
}, /*#__PURE__*/React__default["default"].createElement(Icon, null)), renderLabel, onClose && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
24753
|
+
className: "neeto-ui-tag__close",
|
|
24754
|
+
"data-testid": "tag-close-button",
|
|
24755
|
+
onClick: !disabled ? onClose : null
|
|
24756
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Close, null)));
|
|
24757
|
+
};
|
|
24758
|
+
|
|
24759
|
+
var _excluded$c = ["children"],
|
|
24760
|
+
_excluded2 = ["children"];
|
|
24679
24761
|
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24680
24762
|
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$3(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24681
24763
|
var STYLES = {
|
|
@@ -24707,13 +24789,30 @@ var MultiValueRemove = function MultiValueRemove(props) {
|
|
|
24707
24789
|
size: 16
|
|
24708
24790
|
}));
|
|
24709
24791
|
};
|
|
24792
|
+
var CustomValueContainer = function CustomValueContainer(_ref2) {
|
|
24793
|
+
var children = _ref2.children,
|
|
24794
|
+
props = _objectWithoutProperties$1(_ref2, _excluded2);
|
|
24795
|
+
var getValue = props.getValue,
|
|
24796
|
+
_props$selectProps = props.selectProps,
|
|
24797
|
+
isFocused = _props$selectProps.isFocused,
|
|
24798
|
+
visibleEmailsCount = _props$selectProps.visibleEmailsCount;
|
|
24799
|
+
var value = getValue();
|
|
24800
|
+
var _children = _toArray(children),
|
|
24801
|
+
firstChild = _children[0],
|
|
24802
|
+
rest = _children.slice(1);
|
|
24803
|
+
var shouldCollapse = !isFocused && value.length > visibleEmailsCount;
|
|
24804
|
+
return /*#__PURE__*/React__default["default"].createElement(components.ValueContainer, props, shouldCollapse ? firstChild.slice(0, visibleEmailsCount) : firstChild, shouldCollapse && /*#__PURE__*/React__default["default"].createElement(Tag, {
|
|
24805
|
+
label: "".concat(value.length - visibleEmailsCount, " more"),
|
|
24806
|
+
style: "secondary"
|
|
24807
|
+
}), rest);
|
|
24808
|
+
};
|
|
24710
24809
|
var EMAIL_REGEX = new RegExp("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}$", "i");
|
|
24711
24810
|
var UNSTRICT_EMAIL_REGEX = /(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/g;
|
|
24712
24811
|
var EMAIL_SEPARATION_REGEX = /[^\s,]+/g;
|
|
24713
24812
|
var CUSTOM_STYLES = {
|
|
24714
24813
|
input: assoc("overflow", "hidden"),
|
|
24715
|
-
multiValue: function multiValue(styles,
|
|
24716
|
-
var valid =
|
|
24814
|
+
multiValue: function multiValue(styles, _ref3) {
|
|
24815
|
+
var valid = _ref3.data.valid;
|
|
24717
24816
|
return _objectSpread$3(_objectSpread$3({}, styles), {}, {
|
|
24718
24817
|
border: valid ? STYLES.border["default"] : STYLES.border.error,
|
|
24719
24818
|
color: valid ? STYLES.color["default"] : STYLES.color.error
|
|
@@ -24724,7 +24823,8 @@ var CUSTOM_COMPONENTS = {
|
|
|
24724
24823
|
DropdownIndicator: CustomDropdownIndicator,
|
|
24725
24824
|
ClearIndicator: null,
|
|
24726
24825
|
Control: CustomControl,
|
|
24727
|
-
MultiValueRemove: MultiValueRemove
|
|
24826
|
+
MultiValueRemove: MultiValueRemove,
|
|
24827
|
+
ValueContainer: CustomValueContainer
|
|
24728
24828
|
};
|
|
24729
24829
|
|
|
24730
24830
|
var formatEmailInputOptions = function formatEmailInputOptions(label) {
|
|
@@ -24753,7 +24853,7 @@ var renderDefaultText = function renderDefaultText(count) {
|
|
|
24753
24853
|
return count === 1 ? "email" : "emails";
|
|
24754
24854
|
};
|
|
24755
24855
|
|
|
24756
|
-
var _excluded$b = ["label", "placeholder", "helpText", "value", "onChange", "error", "onBlur", "filterInvalidEmails", "counter", "disabled", "maxHeight", "required", "labelProps"];
|
|
24856
|
+
var _excluded$b = ["label", "placeholder", "helpText", "value", "onChange", "error", "onBlur", "filterInvalidEmails", "counter", "disabled", "maxHeight", "required", "labelProps", "visibleEmailsCount"];
|
|
24757
24857
|
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24758
24858
|
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24759
24859
|
var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
@@ -24780,11 +24880,17 @@ var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24780
24880
|
_ref$required = _ref.required,
|
|
24781
24881
|
required = _ref$required === void 0 ? false : _ref$required,
|
|
24782
24882
|
labelProps = _ref.labelProps,
|
|
24883
|
+
_ref$visibleEmailsCou = _ref.visibleEmailsCount,
|
|
24884
|
+
visibleEmailsCount = _ref$visibleEmailsCou === void 0 ? 3 : _ref$visibleEmailsCou,
|
|
24783
24885
|
otherProps = _objectWithoutProperties$1(_ref, _excluded$b);
|
|
24784
24886
|
var _useState = React.useState(""),
|
|
24785
24887
|
_useState2 = _slicedToArray$1(_useState, 2),
|
|
24786
24888
|
inputValue = _useState2[0],
|
|
24787
24889
|
setInputValue = _useState2[1];
|
|
24890
|
+
var _useState3 = React.useState(false),
|
|
24891
|
+
_useState4 = _slicedToArray$1(_useState3, 2),
|
|
24892
|
+
isFocused = _useState4[0],
|
|
24893
|
+
setIsFocused = _useState4[1];
|
|
24788
24894
|
var isCounterVisible = !!counter && (!counter.startsFrom || getValidEmailsCount(value) >= counter.startsFrom);
|
|
24789
24895
|
var isOptionsPresent = !!otherProps.options;
|
|
24790
24896
|
var handleFilterEmails = function handleFilterEmails() {
|
|
@@ -24826,7 +24932,8 @@ var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24826
24932
|
otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$onCreateO = otherProps.onCreateOption) === null || _otherProps$onCreateO === void 0 ? void 0 : _otherProps$onCreateO.call(otherProps, input);
|
|
24827
24933
|
};
|
|
24828
24934
|
var handleBlur = function handleBlur(event) {
|
|
24829
|
-
|
|
24935
|
+
inputValue ? handleEmailChange() : onBlur(event);
|
|
24936
|
+
setIsFocused(false);
|
|
24830
24937
|
};
|
|
24831
24938
|
var overrideProps = {};
|
|
24832
24939
|
if (isOptionsPresent) {
|
|
@@ -24863,9 +24970,11 @@ var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24863
24970
|
components: CUSTOM_COMPONENTS,
|
|
24864
24971
|
inputValue: inputValue,
|
|
24865
24972
|
isDisabled: disabled,
|
|
24973
|
+
isFocused: isFocused,
|
|
24866
24974
|
placeholder: placeholder,
|
|
24867
24975
|
ref: ref,
|
|
24868
24976
|
value: value,
|
|
24977
|
+
visibleEmailsCount: visibleEmailsCount,
|
|
24869
24978
|
className: classnames$1("neeto-ui-react-select__container neeto-ui-email-input__select", {
|
|
24870
24979
|
"neeto-ui-react-select__container--error": !!error
|
|
24871
24980
|
}),
|
|
@@ -24877,6 +24986,9 @@ var MultiEmailInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24877
24986
|
}),
|
|
24878
24987
|
onBlur: handleBlur,
|
|
24879
24988
|
onChange: onChange,
|
|
24989
|
+
onFocus: function onFocus() {
|
|
24990
|
+
return setIsFocused(true);
|
|
24991
|
+
},
|
|
24880
24992
|
onInputChange: function onInputChange(inputValue) {
|
|
24881
24993
|
return setInputValue(inputValue);
|
|
24882
24994
|
},
|