@cerebruminc/cerebellum 16.2.0 → 16.3.0-beta.dangerous.111c016
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/lib/cjs/Button.cjs +4 -4
- package/lib/cjs/Form.cjs +2 -2
- package/lib/cjs/FormSeparator.cjs +1 -1
- package/lib/cjs/{FormStyles-CM25rbhG.js → FormStyles-zhTr63Di.js} +17 -2
- package/lib/{esm/FormStyles-CyqyMC1o.js.map → cjs/FormStyles-zhTr63Di.js.map} +1 -1
- package/lib/cjs/FormWrapper.cjs +1 -1
- package/lib/cjs/{FormikContainer-DVL86Jri.js → FormikContainer-BhowOVri.js} +6 -3
- package/lib/cjs/{FormikContainer-DVL86Jri.js.map → FormikContainer-BhowOVri.js.map} +1 -1
- package/lib/cjs/TitleGroup.cjs +1 -1
- package/lib/cjs/index.cjs +2 -2
- package/lib/esm/Button.js +4 -4
- package/lib/esm/Form.js +2 -2
- package/lib/esm/FormSeparator.js +1 -1
- package/lib/esm/{FormStyles-CyqyMC1o.js → FormStyles-DMlwBOz8.js} +17 -2
- package/lib/{cjs/FormStyles-CM25rbhG.js.map → esm/FormStyles-DMlwBOz8.js.map} +1 -1
- package/lib/esm/FormWrapper.js +1 -1
- package/lib/esm/{FormikContainer-uI5oe1px.js → FormikContainer-C2RIrqq6.js} +6 -3
- package/lib/esm/{FormikContainer-uI5oe1px.js.map → FormikContainer-C2RIrqq6.js.map} +1 -1
- package/lib/esm/TitleGroup.js +1 -1
- package/lib/esm/index.js +3 -3
- package/lib/types/src/components/Button/types.d.ts +3 -0
- package/package.json +1 -1
package/lib/cjs/Button.cjs
CHANGED
|
@@ -127,8 +127,8 @@ var Text = styled.styled.span(templateObject_5 || (templateObject_5 = _tslib.__m
|
|
|
127
127
|
var $boxed = _a.$boxed, $boxedOutline = _a.$boxedOutline, $textButton = _a.$textButton;
|
|
128
128
|
return ($boxed || $boxedOutline || $textButton ? 500 : 600);
|
|
129
129
|
}, function (_a) {
|
|
130
|
-
var $boxed = _a.$boxed, $boxedOutline = _a.$boxedOutline, textButton = _a.$textButton;
|
|
131
|
-
return ($boxed || $boxedOutline || textButton ? "0.36px" : "0.07em");
|
|
130
|
+
var $boxed = _a.$boxed, $boxedOutline = _a.$boxedOutline, $letterSpacing = _a.$letterSpacing, textButton = _a.$textButton;
|
|
131
|
+
return ($letterSpacing ? $letterSpacing : ($boxed || $boxedOutline || textButton ? "0.36px" : "0.07em"));
|
|
132
132
|
});
|
|
133
133
|
var TextButtonBackground = styled.styled.span(templateObject_6 || (templateObject_6 = _tslib.__makeTemplateObject(["\n bottom: 0;\n display: block;\n background-color: ", ";\n left: 0;\n position: absolute;\n pointer-events: none;\n right: 0;\n top: 0;\n transition: transform 300ms ease-out 50ms;\n transform: translate3d(0, ", "px, 0);\n ", ":hover & {\n transform: translate3d(0, 0, 0);\n }\n ", ":focus-visible & {\n opacity: 0;\n }\n"], ["\n bottom: 0;\n display: block;\n background-color: ", ";\n left: 0;\n position: absolute;\n pointer-events: none;\n right: 0;\n top: 0;\n transition: transform 300ms ease-out 50ms;\n transform: translate3d(0, ", "px, 0);\n ", ":hover & {\n transform: translate3d(0, 0, 0);\n }\n ", ":focus-visible & {\n opacity: 0;\n }\n"])), function (_a) {
|
|
134
134
|
var $colorGroup = _a.$colorGroup;
|
|
@@ -253,7 +253,7 @@ var getLoadingOffset = function (_a) {
|
|
|
253
253
|
|
|
254
254
|
var Button = function (props) {
|
|
255
255
|
var _a, _b, _c, _d;
|
|
256
|
-
var borderRadius = props.borderRadius, _e = props.boxed, boxed = _e === void 0 ? false : _e, _f = props.boxedOutline, boxedOutline = _f === void 0 ? false : _f, buttonHeight = props.buttonHeight, _g = props.buttonType, buttonType = _g === void 0 ? "button" : _g, buttonWidth = props.buttonWidth, _h = props.backButton, backButton = _h === void 0 ? false : _h, _j = props.caret, caret = _j === void 0 ? false : _j, caretGap = props.caretGap, _k = props.clickable, clickable = _k === void 0 ? true : _k, _l = props.colorFamily, colorFamily = _l === void 0 ? ButtonColorFamilyEnum.ButtonColorFamilyEnum.Blue : _l, colorFamilyOverride = props.colorFamilyOverride, directionalButtonGap = props.directionalButtonGap, _m = props.disabled, disabled = _m === void 0 ? false : _m, disabledBackgroundColor = props.disabledBackgroundColor, disabledTextColor = props.disabledTextColor, focus = props.focus, focusOutlineBorderRadius = props.focusOutlineBorderRadius, focusOutlineOffsetBottom = props.focusOutlineOffsetBottom, focusOutlineOffsetLeft = props.focusOutlineOffsetLeft, focusOutlineOffsetRight = props.focusOutlineOffsetRight, focusOutlineOffsetTop = props.focusOutlineOffsetTop, href = props.href, Icon = props.Icon, iconGap = props.iconGap, iconSize = props.iconSize, justifyContent = props.justifyContent, _o = props.loading, loading = _o === void 0 ? false : _o, loadingConfiguration = props.loadingConfiguration, name = props.name, _p = props.nextButton, nextButton = _p === void 0 ? false : _p, onClick = props.onClick, _q = props.outline, outline = _q === void 0 ? false : _q, outlineButtonShade = props.outlineButtonShade, paddingString = props.paddingString, innerRef = props.innerRef, _r = props.secondary, secondary = _r === void 0 ? false : _r, target = props.target, text = props.text, _s = props.textButton, textButton = _s === void 0 ? false : _s, textFontSize = props.textFontSize, _t = props.shadow, shadow = _t === void 0 ? false : _t, spaceBetween = props.spaceBetween, useA = props.useA, value = props.value, _u = props.white, white = _u === void 0 ? false : _u;
|
|
256
|
+
var borderRadius = props.borderRadius, _e = props.boxed, boxed = _e === void 0 ? false : _e, _f = props.boxedOutline, boxedOutline = _f === void 0 ? false : _f, buttonHeight = props.buttonHeight, _g = props.buttonType, buttonType = _g === void 0 ? "button" : _g, buttonWidth = props.buttonWidth, _h = props.backButton, backButton = _h === void 0 ? false : _h, _j = props.caret, caret = _j === void 0 ? false : _j, caretGap = props.caretGap, _k = props.clickable, clickable = _k === void 0 ? true : _k, _l = props.colorFamily, colorFamily = _l === void 0 ? ButtonColorFamilyEnum.ButtonColorFamilyEnum.Blue : _l, colorFamilyOverride = props.colorFamilyOverride, directionalButtonGap = props.directionalButtonGap, _m = props.disabled, disabled = _m === void 0 ? false : _m, disabledBackgroundColor = props.disabledBackgroundColor, disabledTextColor = props.disabledTextColor, focus = props.focus, focusOutlineBorderRadius = props.focusOutlineBorderRadius, focusOutlineOffsetBottom = props.focusOutlineOffsetBottom, focusOutlineOffsetLeft = props.focusOutlineOffsetLeft, focusOutlineOffsetRight = props.focusOutlineOffsetRight, focusOutlineOffsetTop = props.focusOutlineOffsetTop, href = props.href, Icon = props.Icon, iconGap = props.iconGap, iconSize = props.iconSize, justifyContent = props.justifyContent, letterSpacing = props.letterSpacing, _o = props.loading, loading = _o === void 0 ? false : _o, loadingConfiguration = props.loadingConfiguration, name = props.name, _p = props.nextButton, nextButton = _p === void 0 ? false : _p, onClick = props.onClick, _q = props.outline, outline = _q === void 0 ? false : _q, outlineButtonShade = props.outlineButtonShade, paddingString = props.paddingString, innerRef = props.innerRef, _r = props.secondary, secondary = _r === void 0 ? false : _r, target = props.target, text = props.text, _s = props.textButton, textButton = _s === void 0 ? false : _s, textFontSize = props.textFontSize, _t = props.shadow, shadow = _t === void 0 ? false : _t, spaceBetween = props.spaceBetween, useA = props.useA, value = props.value, _u = props.white, white = _u === void 0 ? false : _u;
|
|
257
257
|
var buttonRef = innerRef || React.useRef(null);
|
|
258
258
|
React.useEffect(function () {
|
|
259
259
|
var _a;
|
|
@@ -281,7 +281,7 @@ var Button = function (props) {
|
|
|
281
281
|
setTimeout(function () { return setIsActive(false); }, 100);
|
|
282
282
|
}
|
|
283
283
|
};
|
|
284
|
-
return (jsxRuntime.jsxs(ButtonBox, { children: [jsxRuntime.jsxs(ButtonElement, _tslib.__assign({}, (useA && href ? { href: href } : {}), (useA && target ? { target: target } : {}), { as: useA ? "a" : "button", ref: buttonRef, "$backButton": backButton, "$borderRadius": borderRadius, "$boxedOutline": boxedOutline, "$boxed": boxed, "$clickable": clickable && !loading, "$colorGroup": colorGroup, "$buttonHeight": buttonHeight, "$buttonWidth": buttonWidth, "$displayBlock": !!buttonWidth && !textButton, disabled: disabled, "$disabledBackgroundColor": disabledBackgroundColor, "$disabledTextColor": disabledTextColor, "$focusOutlineBorderRadius": focusOutlineBorderRadius, "$focusOutlineOffsetBottom": focusOutlineOffsetBottom, "$focusOutlineOffsetLeft": focusOutlineOffsetLeft, "$focusOutlineOffsetRight": focusOutlineOffsetRight, "$focusOutlineOffsetTop": focusOutlineOffsetTop, "$hasIcon": hasIcon, "$isActive": isActive, name: name, "$nextButton": nextButton, onClick: function (event) { return onClick === null || onClick === void 0 ? void 0 : onClick(event); }, onKeyPress: handleEnter, "$outline": outline, "$outlineButtonShade": outlineButtonShade, "$paddingString": paddingString, "$primary": primary, "$secondary": secondary, "$spaceBetween": spaceBetween, "$textButton": textButton, type: buttonType, "$shadow": shadow, value: value, tabIndex: clickable ? 0 : -1, "$white": white && !textButton, children: [loading && (jsxRuntime.jsx(LoadingBox, { "$loadingOffset": textButton ? getLoadingOffset(loadingOffsetParams) : 0, children: jsxRuntime.jsx(LoadingEllipsis.LoadingEllipsis, _tslib.__assign({}, loadingStyleFormat)) })), jsxRuntime.jsxs(HiddenLoadingBox, { "$hide": loading, "$justifyContent": justifyContent, children: [backButton && !nextButton && !Icon && (jsxRuntime.jsx(BackIconBox, { "data-testid": "backIcon", "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$iconGap": confirmedIconGap, "$size": autoIconSize, children: jsxRuntime.jsx(ArrowLong.ArrowLong, { fill: iconColor }) })), Icon && (jsxRuntime.jsx(IconBox, { "data-testid": "icon", "$disabled": disabled, "$iconGap": confirmedIconGap, "$disabledTextColor": disabledTextColor, "$size": iconSize || autoIconSize, children: jsxRuntime.jsx(Icon, { fill: iconColor }) })), jsxRuntime.jsx(Text, { "$boxed": boxed, "$boxedOutline": boxedOutline, "$colorGroup": colorGroup, "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$primary": !(!primary || white), "$textButton": textButton, "$textFontSize": textFontSize, "data-sentry-unmask": true, children: text }), nextButton && !Icon && (jsxRuntime.jsx(NextIconBox, { "data-testid": "nextIcon", "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$iconGap": confirmedIconGap, "$size": autoIconSize, children: jsxRuntime.jsx(ArrowLong.ArrowLong, { fill: iconColor }) })), caret && !backButton && !nextButton && !Icon && (jsxRuntime.jsx(NextIconBox, { "data-testid": "caret", "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$iconGap": confirmedCaretGap, "$size": autoIconSize - (boxed || boxedOutline ? 8 : 5), children: boxed || boxedOutline ? (jsxRuntime.jsx(IndicatorDown.IndicatorDown, { fill: primary && !white ? colorGroup.medium : colorGroup.dark })) : (jsxRuntime.jsx(CaretDown.CaretDown, { fill: primary && !white ? colorGroup.medium : colorGroup.dark })) })), textButton && jsxRuntime.jsx(TextButtonBackground, { "$colorGroup": colorGroup, "$textFontSize": textFontSize })] })] })), textButton && (jsxRuntime.jsx(TextButtonUnderline, { "$colorGroup": colorGroup, "$disabled": disabled, "$hasIcon": hasIcon, "$iconGap": confirmedIconGap, "$nextButton": nextButton || caret, "$size": iconSize || autoIconSize }))] }));
|
|
284
|
+
return (jsxRuntime.jsxs(ButtonBox, { children: [jsxRuntime.jsxs(ButtonElement, _tslib.__assign({}, (useA && href ? { href: href } : {}), (useA && target ? { target: target } : {}), { as: useA ? "a" : "button", ref: buttonRef, "$backButton": backButton, "$borderRadius": borderRadius, "$boxedOutline": boxedOutline, "$boxed": boxed, "$clickable": clickable && !loading, "$colorGroup": colorGroup, "$buttonHeight": buttonHeight, "$buttonWidth": buttonWidth, "$displayBlock": !!buttonWidth && !textButton, disabled: disabled, "$disabledBackgroundColor": disabledBackgroundColor, "$disabledTextColor": disabledTextColor, "$focusOutlineBorderRadius": focusOutlineBorderRadius, "$focusOutlineOffsetBottom": focusOutlineOffsetBottom, "$focusOutlineOffsetLeft": focusOutlineOffsetLeft, "$focusOutlineOffsetRight": focusOutlineOffsetRight, "$focusOutlineOffsetTop": focusOutlineOffsetTop, "$hasIcon": hasIcon, "$isActive": isActive, name: name, "$nextButton": nextButton, onClick: function (event) { return onClick === null || onClick === void 0 ? void 0 : onClick(event); }, onKeyPress: handleEnter, "$outline": outline, "$outlineButtonShade": outlineButtonShade, "$paddingString": paddingString, "$primary": primary, "$secondary": secondary, "$spaceBetween": spaceBetween, "$textButton": textButton, type: buttonType, "$shadow": shadow, value: value, tabIndex: clickable ? 0 : -1, "$white": white && !textButton, children: [loading && (jsxRuntime.jsx(LoadingBox, { "$loadingOffset": textButton ? getLoadingOffset(loadingOffsetParams) : 0, children: jsxRuntime.jsx(LoadingEllipsis.LoadingEllipsis, _tslib.__assign({}, loadingStyleFormat)) })), jsxRuntime.jsxs(HiddenLoadingBox, { "$hide": loading, "$justifyContent": justifyContent, children: [backButton && !nextButton && !Icon && (jsxRuntime.jsx(BackIconBox, { "data-testid": "backIcon", "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$iconGap": confirmedIconGap, "$size": iconSize || autoIconSize, children: jsxRuntime.jsx(ArrowLong.ArrowLong, { fill: iconColor }) })), Icon && (jsxRuntime.jsx(IconBox, { "data-testid": "icon", "$disabled": disabled, "$iconGap": confirmedIconGap, "$disabledTextColor": disabledTextColor, "$size": iconSize || autoIconSize, children: jsxRuntime.jsx(Icon, { fill: iconColor }) })), jsxRuntime.jsx(Text, { "$boxed": boxed, "$boxedOutline": boxedOutline, "$colorGroup": colorGroup, "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$letterSpacing": letterSpacing, "$primary": !(!primary || white), "$textButton": textButton, "$textFontSize": textFontSize, "data-sentry-unmask": true, children: text }), nextButton && !Icon && (jsxRuntime.jsx(NextIconBox, { "data-testid": "nextIcon", "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$iconGap": confirmedIconGap, "$size": iconSize || autoIconSize, children: jsxRuntime.jsx(ArrowLong.ArrowLong, { fill: iconColor }) })), caret && !backButton && !nextButton && !Icon && (jsxRuntime.jsx(NextIconBox, { "data-testid": "caret", "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$iconGap": confirmedCaretGap, "$size": (iconSize || autoIconSize) - (boxed || boxedOutline ? 8 : 5), children: boxed || boxedOutline ? (jsxRuntime.jsx(IndicatorDown.IndicatorDown, { fill: primary && !white ? colorGroup.medium : colorGroup.dark })) : (jsxRuntime.jsx(CaretDown.CaretDown, { fill: primary && !white ? colorGroup.medium : colorGroup.dark })) })), textButton && jsxRuntime.jsx(TextButtonBackground, { "$colorGroup": colorGroup, "$textFontSize": textFontSize })] })] })), textButton && (jsxRuntime.jsx(TextButtonUnderline, { "$colorGroup": colorGroup, "$disabled": disabled, "$hasIcon": hasIcon, "$iconGap": confirmedIconGap, "$nextButton": nextButton || caret, "$size": iconSize || autoIconSize }))] }));
|
|
285
285
|
};
|
|
286
286
|
|
|
287
287
|
exports.Button = Button;
|
package/lib/cjs/Form.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var FormWrapper = require('./FormStyles-
|
|
4
|
-
var FormikContainer = require('./FormikContainer-
|
|
3
|
+
var FormWrapper = require('./FormStyles-zhTr63Di.js');
|
|
4
|
+
var FormikContainer = require('./FormikContainer-BhowOVri.js');
|
|
5
5
|
var FormFieldTypeEnum = require('./FormFieldTypeEnum.cjs');
|
|
6
6
|
require('./_tslib-ByDtMVOd.js');
|
|
7
7
|
require('styled-components');
|
|
@@ -7,7 +7,7 @@ require('./BodyLEmphasis.cjs');
|
|
|
7
7
|
require('./Loading.cjs');
|
|
8
8
|
require('./Scroller.cjs');
|
|
9
9
|
require('./Inputs-IaHMnBKw.js');
|
|
10
|
-
var FormWrapper = require('./FormStyles-
|
|
10
|
+
var FormWrapper = require('./FormStyles-zhTr63Di.js');
|
|
11
11
|
require('react/jsx-runtime');
|
|
12
12
|
require('./IconComponentStyles-oUWNoaaH.js');
|
|
13
13
|
require('./CheckboxStyles-CAzemGXD.js');
|
|
@@ -190,6 +190,9 @@ var formatValidationInternals = function (_a) {
|
|
|
190
190
|
else if (FormFieldTypeEnum.isCheckbox(field)) {
|
|
191
191
|
validationInternals[name_6] = validationFunction || yup__namespace.boolean();
|
|
192
192
|
}
|
|
193
|
+
else if (FormFieldTypeEnum.isToggle(field)) {
|
|
194
|
+
validationInternals[name_6] = validationFunction || yup__namespace.boolean();
|
|
195
|
+
}
|
|
193
196
|
else if (FormFieldTypeEnum.isCheckboxGroup(field)) {
|
|
194
197
|
var _h = field.requiredMessage, requiredMessage = _h === void 0 ? "Please select at least one" : _h;
|
|
195
198
|
validationInternals[name_6] =
|
|
@@ -357,12 +360,24 @@ var formatValidationInternals = function (_a) {
|
|
|
357
360
|
(required && allowRequired && !disabled
|
|
358
361
|
? yup__namespace
|
|
359
362
|
.string()
|
|
363
|
+
.transform(function (value) {
|
|
364
|
+
return typeof value === "string"
|
|
365
|
+
? value.trim().replace(/-/g, "")
|
|
366
|
+
: value;
|
|
367
|
+
})
|
|
360
368
|
.matches(SSN_REGEX, {
|
|
361
369
|
excludeEmptyString: true,
|
|
362
370
|
message: validationMessage,
|
|
363
371
|
})
|
|
364
372
|
.required(requiredMessage)
|
|
365
|
-
: yup__namespace
|
|
373
|
+
: yup__namespace
|
|
374
|
+
.string()
|
|
375
|
+
.transform(function (value) {
|
|
376
|
+
return typeof value === "string"
|
|
377
|
+
? value.trim().replace(/-/g, "")
|
|
378
|
+
: value;
|
|
379
|
+
})
|
|
380
|
+
.matches(SSN_REGEX, {
|
|
366
381
|
excludeEmptyString: true,
|
|
367
382
|
message: validationMessage,
|
|
368
383
|
}));
|
|
@@ -771,4 +786,4 @@ exports.formHasValues = formHasValues;
|
|
|
771
786
|
exports.formatInitialValues = formatInitialValues;
|
|
772
787
|
exports.formatValidation = formatValidation;
|
|
773
788
|
exports.shouldFade = shouldFade;
|
|
774
|
-
//# sourceMappingURL=FormStyles-
|
|
789
|
+
//# sourceMappingURL=FormStyles-zhTr63Di.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormStyles-
|
|
1
|
+
{"version":3,"file":"FormStyles-zhTr63Di.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/cjs/FormWrapper.cjs
CHANGED
|
@@ -7,7 +7,7 @@ require('./BodyLEmphasis.cjs');
|
|
|
7
7
|
require('./Loading.cjs');
|
|
8
8
|
require('./Scroller.cjs');
|
|
9
9
|
require('./Inputs-IaHMnBKw.js');
|
|
10
|
-
var FormWrapper = require('./FormStyles-
|
|
10
|
+
var FormWrapper = require('./FormStyles-zhTr63Di.js');
|
|
11
11
|
require('react/jsx-runtime');
|
|
12
12
|
require('./IconComponentStyles-oUWNoaaH.js');
|
|
13
13
|
require('./CheckboxStyles-CAzemGXD.js');
|
|
@@ -20,7 +20,7 @@ var useMeasure = require('./useMeasure-CDq3dPfD.js');
|
|
|
20
20
|
var usePrevious = require('./usePrevious.cjs');
|
|
21
21
|
require('./Loading.cjs');
|
|
22
22
|
var Scroller = require('./Scroller.cjs');
|
|
23
|
-
var FormWrapper = require('./FormStyles-
|
|
23
|
+
var FormWrapper = require('./FormStyles-zhTr63Di.js');
|
|
24
24
|
var AddressInput = require('./AddressInput-BwC_Fa3a.js');
|
|
25
25
|
var Inputs = require('./Inputs-IaHMnBKw.js');
|
|
26
26
|
var ReactDOM = require('react-dom');
|
|
@@ -1597,7 +1597,10 @@ var FormikContainer = function (props) {
|
|
|
1597
1597
|
return (jsxRuntime.jsx(formik.Formik, { enableReinitialize: enableReinitialize, initialValues: FormWrapper.formatInitialValues(fields), innerRef: innerRef, onSubmit: function (values, formikHelpers) {
|
|
1598
1598
|
var resetForm = formikHelpers.resetForm;
|
|
1599
1599
|
setSubmitAttempt(false);
|
|
1600
|
-
|
|
1600
|
+
// Cast values through the validation schema so transforms (e.g., trim) apply on submit
|
|
1601
|
+
var schema = FormWrapper.formatValidation(fields, configurableInputFieldActiveIds);
|
|
1602
|
+
var castValues = schema.cast(values);
|
|
1603
|
+
submit(castValues, formikHelpers);
|
|
1601
1604
|
if (resetOnSubmit) {
|
|
1602
1605
|
resetForm({});
|
|
1603
1606
|
setHasValues(false);
|
|
@@ -1610,4 +1613,4 @@ var FormikContainer = function (props) {
|
|
|
1610
1613
|
exports.FormikContainer = FormikContainer;
|
|
1611
1614
|
exports.NationalityDropdown = NationalityDropdown;
|
|
1612
1615
|
exports.nationalityList = nationalityList;
|
|
1613
|
-
//# sourceMappingURL=FormikContainer-
|
|
1616
|
+
//# sourceMappingURL=FormikContainer-BhowOVri.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikContainer-
|
|
1
|
+
{"version":3,"file":"FormikContainer-BhowOVri.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/cjs/TitleGroup.cjs
CHANGED
|
@@ -7,7 +7,7 @@ require('./BodyLEmphasis.cjs');
|
|
|
7
7
|
require('./Loading.cjs');
|
|
8
8
|
require('./Scroller.cjs');
|
|
9
9
|
require('./Inputs-IaHMnBKw.js');
|
|
10
|
-
var FormWrapper = require('./FormStyles-
|
|
10
|
+
var FormWrapper = require('./FormStyles-zhTr63Di.js');
|
|
11
11
|
require('react/jsx-runtime');
|
|
12
12
|
require('./IconComponentStyles-oUWNoaaH.js');
|
|
13
13
|
require('./CheckboxStyles-CAzemGXD.js');
|
package/lib/cjs/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var styled = require('styled-components');
|
|
7
7
|
var Drawer = require('./Drawer-BC6y1uIn.js');
|
|
8
|
-
var FormWrapper = require('./FormStyles-
|
|
8
|
+
var FormWrapper = require('./FormStyles-zhTr63Di.js');
|
|
9
9
|
var AlertCount = require('./AlertCount-C_v9uCu1.js');
|
|
10
10
|
var AddressInput = require('./AddressInput-BwC_Fa3a.js');
|
|
11
11
|
var Avatar = require('./Avatar-DU_VdLGv.js');
|
|
@@ -44,7 +44,7 @@ var helpers$1 = require('./helpers-BBAfnycp.js');
|
|
|
44
44
|
var DrawerDivider = require('./DrawerDivider-Dk2WXbXa.js');
|
|
45
45
|
var EmailInput = require('./EmailInput-iV9AVBtl.js');
|
|
46
46
|
var Footer = require('./Footer.cjs');
|
|
47
|
-
var FormikContainer = require('./FormikContainer-
|
|
47
|
+
var FormikContainer = require('./FormikContainer-BhowOVri.js');
|
|
48
48
|
var FormFieldTypeEnum = require('./FormFieldTypeEnum.cjs');
|
|
49
49
|
var FiltersBar = require('./FiltersBar-BWs83vhr.js');
|
|
50
50
|
var HorizontalTabMenu = require('./HorizontalTabMenu-B0VfB6Jb.js');
|
package/lib/esm/Button.js
CHANGED
|
@@ -125,8 +125,8 @@ var Text = styled.span(templateObject_5 || (templateObject_5 = __makeTemplateObj
|
|
|
125
125
|
var $boxed = _a.$boxed, $boxedOutline = _a.$boxedOutline, $textButton = _a.$textButton;
|
|
126
126
|
return ($boxed || $boxedOutline || $textButton ? 500 : 600);
|
|
127
127
|
}, function (_a) {
|
|
128
|
-
var $boxed = _a.$boxed, $boxedOutline = _a.$boxedOutline, textButton = _a.$textButton;
|
|
129
|
-
return ($boxed || $boxedOutline || textButton ? "0.36px" : "0.07em");
|
|
128
|
+
var $boxed = _a.$boxed, $boxedOutline = _a.$boxedOutline, $letterSpacing = _a.$letterSpacing, textButton = _a.$textButton;
|
|
129
|
+
return ($letterSpacing ? $letterSpacing : ($boxed || $boxedOutline || textButton ? "0.36px" : "0.07em"));
|
|
130
130
|
});
|
|
131
131
|
var TextButtonBackground = styled.span(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n bottom: 0;\n display: block;\n background-color: ", ";\n left: 0;\n position: absolute;\n pointer-events: none;\n right: 0;\n top: 0;\n transition: transform 300ms ease-out 50ms;\n transform: translate3d(0, ", "px, 0);\n ", ":hover & {\n transform: translate3d(0, 0, 0);\n }\n ", ":focus-visible & {\n opacity: 0;\n }\n"], ["\n bottom: 0;\n display: block;\n background-color: ", ";\n left: 0;\n position: absolute;\n pointer-events: none;\n right: 0;\n top: 0;\n transition: transform 300ms ease-out 50ms;\n transform: translate3d(0, ", "px, 0);\n ", ":hover & {\n transform: translate3d(0, 0, 0);\n }\n ", ":focus-visible & {\n opacity: 0;\n }\n"])), function (_a) {
|
|
132
132
|
var $colorGroup = _a.$colorGroup;
|
|
@@ -251,7 +251,7 @@ var getLoadingOffset = function (_a) {
|
|
|
251
251
|
|
|
252
252
|
var Button = function (props) {
|
|
253
253
|
var _a, _b, _c, _d;
|
|
254
|
-
var borderRadius = props.borderRadius, _e = props.boxed, boxed = _e === void 0 ? false : _e, _f = props.boxedOutline, boxedOutline = _f === void 0 ? false : _f, buttonHeight = props.buttonHeight, _g = props.buttonType, buttonType = _g === void 0 ? "button" : _g, buttonWidth = props.buttonWidth, _h = props.backButton, backButton = _h === void 0 ? false : _h, _j = props.caret, caret = _j === void 0 ? false : _j, caretGap = props.caretGap, _k = props.clickable, clickable = _k === void 0 ? true : _k, _l = props.colorFamily, colorFamily = _l === void 0 ? ButtonColorFamilyEnum.Blue : _l, colorFamilyOverride = props.colorFamilyOverride, directionalButtonGap = props.directionalButtonGap, _m = props.disabled, disabled = _m === void 0 ? false : _m, disabledBackgroundColor = props.disabledBackgroundColor, disabledTextColor = props.disabledTextColor, focus = props.focus, focusOutlineBorderRadius = props.focusOutlineBorderRadius, focusOutlineOffsetBottom = props.focusOutlineOffsetBottom, focusOutlineOffsetLeft = props.focusOutlineOffsetLeft, focusOutlineOffsetRight = props.focusOutlineOffsetRight, focusOutlineOffsetTop = props.focusOutlineOffsetTop, href = props.href, Icon = props.Icon, iconGap = props.iconGap, iconSize = props.iconSize, justifyContent = props.justifyContent, _o = props.loading, loading = _o === void 0 ? false : _o, loadingConfiguration = props.loadingConfiguration, name = props.name, _p = props.nextButton, nextButton = _p === void 0 ? false : _p, onClick = props.onClick, _q = props.outline, outline = _q === void 0 ? false : _q, outlineButtonShade = props.outlineButtonShade, paddingString = props.paddingString, innerRef = props.innerRef, _r = props.secondary, secondary = _r === void 0 ? false : _r, target = props.target, text = props.text, _s = props.textButton, textButton = _s === void 0 ? false : _s, textFontSize = props.textFontSize, _t = props.shadow, shadow = _t === void 0 ? false : _t, spaceBetween = props.spaceBetween, useA = props.useA, value = props.value, _u = props.white, white = _u === void 0 ? false : _u;
|
|
254
|
+
var borderRadius = props.borderRadius, _e = props.boxed, boxed = _e === void 0 ? false : _e, _f = props.boxedOutline, boxedOutline = _f === void 0 ? false : _f, buttonHeight = props.buttonHeight, _g = props.buttonType, buttonType = _g === void 0 ? "button" : _g, buttonWidth = props.buttonWidth, _h = props.backButton, backButton = _h === void 0 ? false : _h, _j = props.caret, caret = _j === void 0 ? false : _j, caretGap = props.caretGap, _k = props.clickable, clickable = _k === void 0 ? true : _k, _l = props.colorFamily, colorFamily = _l === void 0 ? ButtonColorFamilyEnum.Blue : _l, colorFamilyOverride = props.colorFamilyOverride, directionalButtonGap = props.directionalButtonGap, _m = props.disabled, disabled = _m === void 0 ? false : _m, disabledBackgroundColor = props.disabledBackgroundColor, disabledTextColor = props.disabledTextColor, focus = props.focus, focusOutlineBorderRadius = props.focusOutlineBorderRadius, focusOutlineOffsetBottom = props.focusOutlineOffsetBottom, focusOutlineOffsetLeft = props.focusOutlineOffsetLeft, focusOutlineOffsetRight = props.focusOutlineOffsetRight, focusOutlineOffsetTop = props.focusOutlineOffsetTop, href = props.href, Icon = props.Icon, iconGap = props.iconGap, iconSize = props.iconSize, justifyContent = props.justifyContent, letterSpacing = props.letterSpacing, _o = props.loading, loading = _o === void 0 ? false : _o, loadingConfiguration = props.loadingConfiguration, name = props.name, _p = props.nextButton, nextButton = _p === void 0 ? false : _p, onClick = props.onClick, _q = props.outline, outline = _q === void 0 ? false : _q, outlineButtonShade = props.outlineButtonShade, paddingString = props.paddingString, innerRef = props.innerRef, _r = props.secondary, secondary = _r === void 0 ? false : _r, target = props.target, text = props.text, _s = props.textButton, textButton = _s === void 0 ? false : _s, textFontSize = props.textFontSize, _t = props.shadow, shadow = _t === void 0 ? false : _t, spaceBetween = props.spaceBetween, useA = props.useA, value = props.value, _u = props.white, white = _u === void 0 ? false : _u;
|
|
255
255
|
var buttonRef = innerRef || useRef(null);
|
|
256
256
|
useEffect(function () {
|
|
257
257
|
var _a;
|
|
@@ -279,7 +279,7 @@ var Button = function (props) {
|
|
|
279
279
|
setTimeout(function () { return setIsActive(false); }, 100);
|
|
280
280
|
}
|
|
281
281
|
};
|
|
282
|
-
return (jsxs(ButtonBox, { children: [jsxs(ButtonElement, __assign({}, (useA && href ? { href: href } : {}), (useA && target ? { target: target } : {}), { as: useA ? "a" : "button", ref: buttonRef, "$backButton": backButton, "$borderRadius": borderRadius, "$boxedOutline": boxedOutline, "$boxed": boxed, "$clickable": clickable && !loading, "$colorGroup": colorGroup, "$buttonHeight": buttonHeight, "$buttonWidth": buttonWidth, "$displayBlock": !!buttonWidth && !textButton, disabled: disabled, "$disabledBackgroundColor": disabledBackgroundColor, "$disabledTextColor": disabledTextColor, "$focusOutlineBorderRadius": focusOutlineBorderRadius, "$focusOutlineOffsetBottom": focusOutlineOffsetBottom, "$focusOutlineOffsetLeft": focusOutlineOffsetLeft, "$focusOutlineOffsetRight": focusOutlineOffsetRight, "$focusOutlineOffsetTop": focusOutlineOffsetTop, "$hasIcon": hasIcon, "$isActive": isActive, name: name, "$nextButton": nextButton, onClick: function (event) { return onClick === null || onClick === void 0 ? void 0 : onClick(event); }, onKeyPress: handleEnter, "$outline": outline, "$outlineButtonShade": outlineButtonShade, "$paddingString": paddingString, "$primary": primary, "$secondary": secondary, "$spaceBetween": spaceBetween, "$textButton": textButton, type: buttonType, "$shadow": shadow, value: value, tabIndex: clickable ? 0 : -1, "$white": white && !textButton, children: [loading && (jsx(LoadingBox, { "$loadingOffset": textButton ? getLoadingOffset(loadingOffsetParams) : 0, children: jsx(LoadingEllipsis, __assign({}, loadingStyleFormat)) })), jsxs(HiddenLoadingBox, { "$hide": loading, "$justifyContent": justifyContent, children: [backButton && !nextButton && !Icon && (jsx(BackIconBox, { "data-testid": "backIcon", "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$iconGap": confirmedIconGap, "$size": autoIconSize, children: jsx(ArrowLong, { fill: iconColor }) })), Icon && (jsx(IconBox, { "data-testid": "icon", "$disabled": disabled, "$iconGap": confirmedIconGap, "$disabledTextColor": disabledTextColor, "$size": iconSize || autoIconSize, children: jsx(Icon, { fill: iconColor }) })), jsx(Text, { "$boxed": boxed, "$boxedOutline": boxedOutline, "$colorGroup": colorGroup, "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$primary": !(!primary || white), "$textButton": textButton, "$textFontSize": textFontSize, "data-sentry-unmask": true, children: text }), nextButton && !Icon && (jsx(NextIconBox, { "data-testid": "nextIcon", "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$iconGap": confirmedIconGap, "$size": autoIconSize, children: jsx(ArrowLong, { fill: iconColor }) })), caret && !backButton && !nextButton && !Icon && (jsx(NextIconBox, { "data-testid": "caret", "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$iconGap": confirmedCaretGap, "$size": autoIconSize - (boxed || boxedOutline ? 8 : 5), children: boxed || boxedOutline ? (jsx(IndicatorDown, { fill: primary && !white ? colorGroup.medium : colorGroup.dark })) : (jsx(CaretDown, { fill: primary && !white ? colorGroup.medium : colorGroup.dark })) })), textButton && jsx(TextButtonBackground, { "$colorGroup": colorGroup, "$textFontSize": textFontSize })] })] })), textButton && (jsx(TextButtonUnderline, { "$colorGroup": colorGroup, "$disabled": disabled, "$hasIcon": hasIcon, "$iconGap": confirmedIconGap, "$nextButton": nextButton || caret, "$size": iconSize || autoIconSize }))] }));
|
|
282
|
+
return (jsxs(ButtonBox, { children: [jsxs(ButtonElement, __assign({}, (useA && href ? { href: href } : {}), (useA && target ? { target: target } : {}), { as: useA ? "a" : "button", ref: buttonRef, "$backButton": backButton, "$borderRadius": borderRadius, "$boxedOutline": boxedOutline, "$boxed": boxed, "$clickable": clickable && !loading, "$colorGroup": colorGroup, "$buttonHeight": buttonHeight, "$buttonWidth": buttonWidth, "$displayBlock": !!buttonWidth && !textButton, disabled: disabled, "$disabledBackgroundColor": disabledBackgroundColor, "$disabledTextColor": disabledTextColor, "$focusOutlineBorderRadius": focusOutlineBorderRadius, "$focusOutlineOffsetBottom": focusOutlineOffsetBottom, "$focusOutlineOffsetLeft": focusOutlineOffsetLeft, "$focusOutlineOffsetRight": focusOutlineOffsetRight, "$focusOutlineOffsetTop": focusOutlineOffsetTop, "$hasIcon": hasIcon, "$isActive": isActive, name: name, "$nextButton": nextButton, onClick: function (event) { return onClick === null || onClick === void 0 ? void 0 : onClick(event); }, onKeyPress: handleEnter, "$outline": outline, "$outlineButtonShade": outlineButtonShade, "$paddingString": paddingString, "$primary": primary, "$secondary": secondary, "$spaceBetween": spaceBetween, "$textButton": textButton, type: buttonType, "$shadow": shadow, value: value, tabIndex: clickable ? 0 : -1, "$white": white && !textButton, children: [loading && (jsx(LoadingBox, { "$loadingOffset": textButton ? getLoadingOffset(loadingOffsetParams) : 0, children: jsx(LoadingEllipsis, __assign({}, loadingStyleFormat)) })), jsxs(HiddenLoadingBox, { "$hide": loading, "$justifyContent": justifyContent, children: [backButton && !nextButton && !Icon && (jsx(BackIconBox, { "data-testid": "backIcon", "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$iconGap": confirmedIconGap, "$size": iconSize || autoIconSize, children: jsx(ArrowLong, { fill: iconColor }) })), Icon && (jsx(IconBox, { "data-testid": "icon", "$disabled": disabled, "$iconGap": confirmedIconGap, "$disabledTextColor": disabledTextColor, "$size": iconSize || autoIconSize, children: jsx(Icon, { fill: iconColor }) })), jsx(Text, { "$boxed": boxed, "$boxedOutline": boxedOutline, "$colorGroup": colorGroup, "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$letterSpacing": letterSpacing, "$primary": !(!primary || white), "$textButton": textButton, "$textFontSize": textFontSize, "data-sentry-unmask": true, children: text }), nextButton && !Icon && (jsx(NextIconBox, { "data-testid": "nextIcon", "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$iconGap": confirmedIconGap, "$size": iconSize || autoIconSize, children: jsx(ArrowLong, { fill: iconColor }) })), caret && !backButton && !nextButton && !Icon && (jsx(NextIconBox, { "data-testid": "caret", "$disabled": disabled, "$disabledTextColor": disabledTextColor, "$iconGap": confirmedCaretGap, "$size": (iconSize || autoIconSize) - (boxed || boxedOutline ? 8 : 5), children: boxed || boxedOutline ? (jsx(IndicatorDown, { fill: primary && !white ? colorGroup.medium : colorGroup.dark })) : (jsx(CaretDown, { fill: primary && !white ? colorGroup.medium : colorGroup.dark })) })), textButton && jsx(TextButtonBackground, { "$colorGroup": colorGroup, "$textFontSize": textFontSize })] })] })), textButton && (jsx(TextButtonUnderline, { "$colorGroup": colorGroup, "$disabled": disabled, "$hasIcon": hasIcon, "$iconGap": confirmedIconGap, "$nextButton": nextButton || caret, "$size": iconSize || autoIconSize }))] }));
|
|
283
283
|
};
|
|
284
284
|
|
|
285
285
|
export { Button };
|
package/lib/esm/Form.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { F as FormWrapper } from './FormStyles-
|
|
2
|
-
export { F as Form } from './FormikContainer-
|
|
1
|
+
export { F as FormWrapper } from './FormStyles-DMlwBOz8.js';
|
|
2
|
+
export { F as Form } from './FormikContainer-C2RIrqq6.js';
|
|
3
3
|
export { FormFieldTypeEnum, RemovableFieldTypeEnum, isAddress, isCheckbox, isCheckboxGroup, isColorPicker, isConfigurableInput, isCountrySelect, isCountySelect, isCreditCard, isCurrency, isDatePicker, isDescriptiveDropdownInput, isEmail, isFormFieldType, isImagePicker, isMultiSelect, isNationalitySelect, isNumber, isPassword, isPhone, isRadioGroup, isRemovable, isSectionHeader, isSelect, isSocialSecurity, isSplitLine, isStateSelect, isTextarea, isToggle, isToggleGroup, isZipCode } from './FormFieldTypeEnum.js';
|
|
4
4
|
import './_tslib-CcAXazg4.js';
|
|
5
5
|
import 'styled-components';
|
package/lib/esm/FormSeparator.js
CHANGED
|
@@ -5,7 +5,7 @@ import './BodyLEmphasis.js';
|
|
|
5
5
|
import './Loading.js';
|
|
6
6
|
import './Scroller.js';
|
|
7
7
|
import './Inputs-C6OWHviY.js';
|
|
8
|
-
export { u as AddButtonBox, A as AddButtonGroup, B as ButtonGroup, w as CancelButton, C as CenterCheckbox, o as CenterToggle, s as ClearFormButtonWrap, e as FieldBox, p as FormGroup, a as FormSeparator, q as FormTitleGroup, F as FormWrapper, H as HelperTextGrid, n as InlineFieldCell, m as InlineFieldGrid, I as InputBox, f as LeftGutter, g as LeftLabel, L as LoadingBase, b as LoadingBox, d as LoadingInput, c as LoadingLabel, k as RemovableButtonBox, i as RemovableFieldBox, j as RemoveButtonWrapper, R as RightGutter, S as SubHeader, v as SubmitButton, l as Text, r as Title, T as TitleGroup, V as ValidationTextGrid } from './FormStyles-
|
|
8
|
+
export { u as AddButtonBox, A as AddButtonGroup, B as ButtonGroup, w as CancelButton, C as CenterCheckbox, o as CenterToggle, s as ClearFormButtonWrap, e as FieldBox, p as FormGroup, a as FormSeparator, q as FormTitleGroup, F as FormWrapper, H as HelperTextGrid, n as InlineFieldCell, m as InlineFieldGrid, I as InputBox, f as LeftGutter, g as LeftLabel, L as LoadingBase, b as LoadingBox, d as LoadingInput, c as LoadingLabel, k as RemovableButtonBox, i as RemovableFieldBox, j as RemoveButtonWrapper, R as RightGutter, S as SubHeader, v as SubmitButton, l as Text, r as Title, T as TitleGroup, V as ValidationTextGrid } from './FormStyles-DMlwBOz8.js';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
10
|
import './IconComponentStyles-BwczcTS4.js';
|
|
11
11
|
import './CheckboxStyles-Cx6hCn3t.js';
|
|
@@ -168,6 +168,9 @@ var formatValidationInternals = function (_a) {
|
|
|
168
168
|
else if (isCheckbox(field)) {
|
|
169
169
|
validationInternals[name_6] = validationFunction || yup.boolean();
|
|
170
170
|
}
|
|
171
|
+
else if (isToggle(field)) {
|
|
172
|
+
validationInternals[name_6] = validationFunction || yup.boolean();
|
|
173
|
+
}
|
|
171
174
|
else if (isCheckboxGroup(field)) {
|
|
172
175
|
var _h = field.requiredMessage, requiredMessage = _h === void 0 ? "Please select at least one" : _h;
|
|
173
176
|
validationInternals[name_6] =
|
|
@@ -335,12 +338,24 @@ var formatValidationInternals = function (_a) {
|
|
|
335
338
|
(required && allowRequired && !disabled
|
|
336
339
|
? yup
|
|
337
340
|
.string()
|
|
341
|
+
.transform(function (value) {
|
|
342
|
+
return typeof value === "string"
|
|
343
|
+
? value.trim().replace(/-/g, "")
|
|
344
|
+
: value;
|
|
345
|
+
})
|
|
338
346
|
.matches(SSN_REGEX, {
|
|
339
347
|
excludeEmptyString: true,
|
|
340
348
|
message: validationMessage,
|
|
341
349
|
})
|
|
342
350
|
.required(requiredMessage)
|
|
343
|
-
: yup
|
|
351
|
+
: yup
|
|
352
|
+
.string()
|
|
353
|
+
.transform(function (value) {
|
|
354
|
+
return typeof value === "string"
|
|
355
|
+
? value.trim().replace(/-/g, "")
|
|
356
|
+
: value;
|
|
357
|
+
})
|
|
358
|
+
.matches(SSN_REGEX, {
|
|
344
359
|
excludeEmptyString: true,
|
|
345
360
|
message: validationMessage,
|
|
346
361
|
}));
|
|
@@ -714,4 +729,4 @@ var LoadingInput = styled.div(templateObject_32 || (templateObject_32 = __makeTe
|
|
|
714
729
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32;
|
|
715
730
|
|
|
716
731
|
export { AddButtonGroup as A, ButtonGroup as B, CenterCheckbox as C, DefaultPixelWidth as D, FormWrapper as F, HelperTextGrid as H, InputBox as I, LoadingBase as L, RightGutter as R, SubHeader as S, TitleGroup as T, ValidationTextGrid as V, FormSeparator as a, LoadingBox as b, LoadingLabel as c, LoadingInput as d, FieldBox as e, LeftGutter as f, LeftLabel as g, formHasValues as h, RemovableFieldBox as i, RemoveButtonWrapper as j, RemovableButtonBox as k, Text as l, InlineFieldGrid as m, InlineFieldCell as n, CenterToggle as o, FormGroup as p, FormTitleGroup as q, Title as r, ClearFormButtonWrap as s, shouldFade as t, AddButtonBox as u, SubmitButton as v, CancelButton as w, formatValidation as x, formatInitialValues as y };
|
|
717
|
-
//# sourceMappingURL=FormStyles-
|
|
732
|
+
//# sourceMappingURL=FormStyles-DMlwBOz8.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormStyles-
|
|
1
|
+
{"version":3,"file":"FormStyles-DMlwBOz8.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/esm/FormWrapper.js
CHANGED
|
@@ -5,7 +5,7 @@ import './BodyLEmphasis.js';
|
|
|
5
5
|
import './Loading.js';
|
|
6
6
|
import './Scroller.js';
|
|
7
7
|
import './Inputs-C6OWHviY.js';
|
|
8
|
-
export { u as AddButtonBox, A as AddButtonGroup, B as ButtonGroup, w as CancelButton, C as CenterCheckbox, o as CenterToggle, s as ClearFormButtonWrap, e as FieldBox, p as FormGroup, a as FormSeparator, q as FormTitleGroup, F as FormWrapper, H as HelperTextGrid, n as InlineFieldCell, m as InlineFieldGrid, I as InputBox, f as LeftGutter, g as LeftLabel, L as LoadingBase, b as LoadingBox, d as LoadingInput, c as LoadingLabel, k as RemovableButtonBox, i as RemovableFieldBox, j as RemoveButtonWrapper, R as RightGutter, S as SubHeader, v as SubmitButton, l as Text, r as Title, T as TitleGroup, V as ValidationTextGrid } from './FormStyles-
|
|
8
|
+
export { u as AddButtonBox, A as AddButtonGroup, B as ButtonGroup, w as CancelButton, C as CenterCheckbox, o as CenterToggle, s as ClearFormButtonWrap, e as FieldBox, p as FormGroup, a as FormSeparator, q as FormTitleGroup, F as FormWrapper, H as HelperTextGrid, n as InlineFieldCell, m as InlineFieldGrid, I as InputBox, f as LeftGutter, g as LeftLabel, L as LoadingBase, b as LoadingBox, d as LoadingInput, c as LoadingLabel, k as RemovableButtonBox, i as RemovableFieldBox, j as RemoveButtonWrapper, R as RightGutter, S as SubHeader, v as SubmitButton, l as Text, r as Title, T as TitleGroup, V as ValidationTextGrid } from './FormStyles-DMlwBOz8.js';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
10
|
import './IconComponentStyles-BwczcTS4.js';
|
|
11
11
|
import './CheckboxStyles-Cx6hCn3t.js';
|
|
@@ -18,7 +18,7 @@ import { u as useMeasure } from './useMeasure-D89v6c_A.js';
|
|
|
18
18
|
import { usePrevious } from './usePrevious.js';
|
|
19
19
|
import './Loading.js';
|
|
20
20
|
import { ShortScroller } from './Scroller.js';
|
|
21
|
-
import { L as LoadingBase, b as LoadingBox, c as LoadingLabel, d as LoadingInput, e as FieldBox, f as LeftGutter, g as LeftLabel, H as HelperTextGrid, I as InputBox, R as RightGutter, V as ValidationTextGrid, h as formHasValues, D as DefaultPixelWidth, i as RemovableFieldBox, j as RemoveButtonWrapper, k as RemovableButtonBox, a as FormSeparator, T as TitleGroup, l as Text, S as SubHeader, m as InlineFieldGrid, n as InlineFieldCell, C as CenterCheckbox, o as CenterToggle, p as FormGroup, q as FormTitleGroup, r as Title, s as ClearFormButtonWrap, t as shouldFade, A as AddButtonGroup, u as AddButtonBox, B as ButtonGroup, v as SubmitButton, w as CancelButton, x as formatValidation, y as formatInitialValues } from './FormStyles-
|
|
21
|
+
import { L as LoadingBase, b as LoadingBox, c as LoadingLabel, d as LoadingInput, e as FieldBox, f as LeftGutter, g as LeftLabel, H as HelperTextGrid, I as InputBox, R as RightGutter, V as ValidationTextGrid, h as formHasValues, D as DefaultPixelWidth, i as RemovableFieldBox, j as RemoveButtonWrapper, k as RemovableButtonBox, a as FormSeparator, T as TitleGroup, l as Text, S as SubHeader, m as InlineFieldGrid, n as InlineFieldCell, C as CenterCheckbox, o as CenterToggle, p as FormGroup, q as FormTitleGroup, r as Title, s as ClearFormButtonWrap, t as shouldFade, A as AddButtonGroup, u as AddButtonBox, B as ButtonGroup, v as SubmitButton, w as CancelButton, x as formatValidation, y as formatInitialValues } from './FormStyles-DMlwBOz8.js';
|
|
22
22
|
import { A as AddressInput } from './AddressInput-OGU58AzF.js';
|
|
23
23
|
import { A as Asterisk } from './Inputs-C6OWHviY.js';
|
|
24
24
|
import { flushSync } from 'react-dom';
|
|
@@ -1595,7 +1595,10 @@ var FormikContainer = function (props) {
|
|
|
1595
1595
|
return (jsx(Formik, { enableReinitialize: enableReinitialize, initialValues: formatInitialValues(fields), innerRef: innerRef, onSubmit: function (values, formikHelpers) {
|
|
1596
1596
|
var resetForm = formikHelpers.resetForm;
|
|
1597
1597
|
setSubmitAttempt(false);
|
|
1598
|
-
|
|
1598
|
+
// Cast values through the validation schema so transforms (e.g., trim) apply on submit
|
|
1599
|
+
var schema = formatValidation(fields, configurableInputFieldActiveIds);
|
|
1600
|
+
var castValues = schema.cast(values);
|
|
1601
|
+
submit(castValues, formikHelpers);
|
|
1599
1602
|
if (resetOnSubmit) {
|
|
1600
1603
|
resetForm({});
|
|
1601
1604
|
setHasValues(false);
|
|
@@ -1606,4 +1609,4 @@ var FormikContainer = function (props) {
|
|
|
1606
1609
|
};
|
|
1607
1610
|
|
|
1608
1611
|
export { FormikContainer as F, NationalityDropdown as N, nationalityList as n };
|
|
1609
|
-
//# sourceMappingURL=FormikContainer-
|
|
1612
|
+
//# sourceMappingURL=FormikContainer-C2RIrqq6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikContainer-
|
|
1
|
+
{"version":3,"file":"FormikContainer-C2RIrqq6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/esm/TitleGroup.js
CHANGED
|
@@ -5,7 +5,7 @@ import './BodyLEmphasis.js';
|
|
|
5
5
|
import './Loading.js';
|
|
6
6
|
import './Scroller.js';
|
|
7
7
|
import './Inputs-C6OWHviY.js';
|
|
8
|
-
export { u as AddButtonBox, A as AddButtonGroup, B as ButtonGroup, w as CancelButton, C as CenterCheckbox, o as CenterToggle, s as ClearFormButtonWrap, e as FieldBox, p as FormGroup, a as FormSeparator, q as FormTitleGroup, F as FormWrapper, H as HelperTextGrid, n as InlineFieldCell, m as InlineFieldGrid, I as InputBox, f as LeftGutter, g as LeftLabel, L as LoadingBase, b as LoadingBox, d as LoadingInput, c as LoadingLabel, k as RemovableButtonBox, i as RemovableFieldBox, j as RemoveButtonWrapper, R as RightGutter, S as SubHeader, v as SubmitButton, l as Text, r as Title, T as TitleGroup, V as ValidationTextGrid } from './FormStyles-
|
|
8
|
+
export { u as AddButtonBox, A as AddButtonGroup, B as ButtonGroup, w as CancelButton, C as CenterCheckbox, o as CenterToggle, s as ClearFormButtonWrap, e as FieldBox, p as FormGroup, a as FormSeparator, q as FormTitleGroup, F as FormWrapper, H as HelperTextGrid, n as InlineFieldCell, m as InlineFieldGrid, I as InputBox, f as LeftGutter, g as LeftLabel, L as LoadingBase, b as LoadingBox, d as LoadingInput, c as LoadingLabel, k as RemovableButtonBox, i as RemovableFieldBox, j as RemoveButtonWrapper, R as RightGutter, S as SubHeader, v as SubmitButton, l as Text, r as Title, T as TitleGroup, V as ValidationTextGrid } from './FormStyles-DMlwBOz8.js';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
10
|
import './IconComponentStyles-BwczcTS4.js';
|
|
11
11
|
import './CheckboxStyles-Cx6hCn3t.js';
|
package/lib/esm/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
|
3
3
|
import React__default, { useState, Fragment, useRef, useEffect } from 'react';
|
|
4
4
|
import styled$1, { styled, useTheme } from 'styled-components';
|
|
5
5
|
import { D as Drawer } from './Drawer-B8Q-IadJ.js';
|
|
6
|
-
import { a as FormSeparator, T as TitleGroup } from './FormStyles-
|
|
7
|
-
export { F as FormWrapper } from './FormStyles-
|
|
6
|
+
import { a as FormSeparator, T as TitleGroup } from './FormStyles-DMlwBOz8.js';
|
|
7
|
+
export { F as FormWrapper } from './FormStyles-DMlwBOz8.js';
|
|
8
8
|
export { A as AlertCount } from './AlertCount-6XKYJp6w.js';
|
|
9
9
|
import { c as commonjsGlobal, A as AddressInput } from './AddressInput-OGU58AzF.js';
|
|
10
10
|
export { A as Avatar } from './Avatar-BGVmo-FE.js';
|
|
@@ -44,7 +44,7 @@ import { A as ASTERISK_OFFSET_SPACE } from './helpers-NrTaiexf.js';
|
|
|
44
44
|
export { D as DrawerDivider } from './DrawerDivider-kh5ebsLE.js';
|
|
45
45
|
export { E as EmailInput } from './EmailInput-favlDAD3.js';
|
|
46
46
|
export { Footer } from './Footer.js';
|
|
47
|
-
export { F as Form, N as NationalityDropdown, n as nationalityList } from './FormikContainer-
|
|
47
|
+
export { F as Form, N as NationalityDropdown, n as nationalityList } from './FormikContainer-C2RIrqq6.js';
|
|
48
48
|
export { FormFieldTypeEnum, RemovableFieldTypeEnum, isAddress, isCheckbox, isCheckboxGroup, isConfigurableInput, isCountrySelect, isCountySelect, isCreditCard, isCurrency, isDatePicker, isDescriptiveDropdownInput, isEmail, isFormFieldType, isImagePicker, isMultiSelect, isNationalitySelect, isNumber, isPassword, isPhone, isRadioGroup, isRemovable, isSectionHeader, isSelect, isSocialSecurity, isSplitLine, isStateSelect, isTextarea, isToggle, isToggleGroup, isZipCode } from './FormFieldTypeEnum.js';
|
|
49
49
|
export { F as FiltersBar } from './FiltersBar-DiF5ZpHq.js';
|
|
50
50
|
export { H as HorizontalTabMenu } from './HorizontalTabMenu-RXe2DFNL.js';
|
|
@@ -58,6 +58,8 @@ export interface ButtonType {
|
|
|
58
58
|
innerRef?: any;
|
|
59
59
|
/** Align the content in the button. This works with `buttonWidth` and `paddingString`, but does nothing by itself. It should usually not be necessary */
|
|
60
60
|
justifyContent?: "flex-start" | "flex-end" | "center" | "space-around" | "space-between";
|
|
61
|
+
/** The letter spacing for the button text. THEME PROP: default is "0.36px" for TextButton, OutlineButton, and BoxedOutlineButton. "0.07em" for all others */
|
|
62
|
+
letterSpacing?: string;
|
|
61
63
|
/** Displays a loading animation in the button when true */
|
|
62
64
|
loading?: boolean;
|
|
63
65
|
/** LoadingEllipsis props */
|
|
@@ -155,6 +157,7 @@ export interface TextProps {
|
|
|
155
157
|
$colorGroup: ColorFamilyType;
|
|
156
158
|
$disabled?: boolean;
|
|
157
159
|
$disabledTextColor?: string;
|
|
160
|
+
$letterSpacing?: string;
|
|
158
161
|
$primary: boolean;
|
|
159
162
|
$textButton?: boolean;
|
|
160
163
|
$textFontSize?: number;
|