@cerebruminc/cerebellum 15.19.0 → 16.0.0-beta.dangerous.b7d6505

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.
@@ -16,12 +16,22 @@ var TextButton = require('./TextButton.cjs');
16
16
  var Modal = require('./Modal-Bi8DWB7O.js');
17
17
  var BodyLEmphasis = require('./BodyLEmphasis.cjs');
18
18
 
19
- var BoundingBox = styled.styled.div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n width: 100%;\n max-width: ", "px;\n min-height: 165px;\n"], ["\n width: 100%;\n max-width: ", "px;\n min-height: 165px;\n"])), function (_a) {
19
+ var BoundingBox = styled.styled.div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n\talign-items: ", ";\n\tdisplay: flex;\n\tflex-direction: column;\n\tmax-width: ", "px;\n\tmin-height: 165px;\n\twidth: 100%;\n"], ["\n\talign-items: ", ";\n\tdisplay: flex;\n\tflex-direction: column;\n\tmax-width: ", "px;\n\tmin-height: 165px;\n\twidth: 100%;\n"])), function (_a) {
20
+ var $themeOverride = _a.$themeOverride, theme = _a.theme;
21
+ var textAlign = ($themeOverride === null || $themeOverride === void 0 ? void 0 : $themeOverride.textAlign) || theme.confirmModal.textAlign;
22
+ if (textAlign === "center") {
23
+ return "center";
24
+ }
25
+ if (textAlign === "right") {
26
+ return "flex-end";
27
+ }
28
+ return "flex-start";
29
+ }, function (_a) {
20
30
  var $fixedWidth = _a.$fixedWidth;
21
31
  return $fixedWidth;
22
32
  });
23
33
  var IconBox = styled.styled.div(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n height: 38px;\n margin-bottom: 17px;\n width: 38px;\n"], ["\n height: 38px;\n margin-bottom: 17px;\n width: 38px;\n"])));
24
- var Header = styled.styled(BodyLEmphasis.HeadingH1)(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n color: ", ";\n font-size: ", "px;\n padding-bottom: ", "px;\n text-align: ", ";\n white-space: normal;\n word-break: break-word;\n"], ["\n color: ", ";\n font-size: ", "px;\n padding-bottom: ", "px;\n text-align: ", ";\n white-space: normal;\n word-break: break-word;\n"])), function (_a) {
34
+ var Header = styled.styled(BodyLEmphasis.HeadingH1)(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n color: ", ";\n font-size: ", "px;\n padding-bottom: ", "px;\n\ttext-align: ", ";\n white-space: normal;\n word-break: break-word;\n"], ["\n color: ", ";\n font-size: ", "px;\n padding-bottom: ", "px;\n\ttext-align: ", ";\n white-space: normal;\n word-break: break-word;\n"])), function (_a) {
25
35
  var $themeOverride = _a.$themeOverride, theme = _a.theme;
26
36
  return ($themeOverride === null || $themeOverride === void 0 ? void 0 : $themeOverride.headerColor) || theme.confirmModal.headerColor;
27
37
  }, function (_a) {
@@ -32,14 +42,17 @@ var Header = styled.styled(BodyLEmphasis.HeadingH1)(templateObject_3 || (templat
32
42
  return ($textBelow ? 15 : 0);
33
43
  }, function (_a) {
34
44
  var $themeOverride = _a.$themeOverride, theme = _a.theme;
35
- return ($themeOverride === null || $themeOverride === void 0 ? void 0 : $themeOverride.titleAlign) || theme.confirmModal.titleAlign;
45
+ return ($themeOverride === null || $themeOverride === void 0 ? void 0 : $themeOverride.textAlign) || theme.confirmModal.textAlign;
36
46
  });
37
- var Text = styled.styled(BodyLEmphasis.BodyMPrimary)(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n color: ", ";\n font-size: ", "px;\n padding-bottom: ", "px;\n text-align: ", ";\n white-space: normal;\n word-break: break-word;\n"], ["\n color: ", ";\n font-size: ", "px;\n padding-bottom: ", "px;\n text-align: ", ";\n white-space: normal;\n word-break: break-word;\n"])), function (_a) {
47
+ var Text = styled.styled(BodyLEmphasis.BodyMPrimary)(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n color: ", ";\n font-size: ", "px;\n max-width: ", ";\n padding-bottom: ", "px;\n\ttext-align: ", ";\n white-space: normal;\n word-break: break-word;\n"], ["\n color: ", ";\n font-size: ", "px;\n max-width: ", ";\n padding-bottom: ", "px;\n\ttext-align: ", ";\n white-space: normal;\n word-break: break-word;\n"])), function (_a) {
38
48
  var $themeOverride = _a.$themeOverride, theme = _a.theme;
39
49
  return ($themeOverride === null || $themeOverride === void 0 ? void 0 : $themeOverride.textColor) || theme.confirmModal.textColor;
40
50
  }, function (_a) {
41
51
  var $themeOverride = _a.$themeOverride, theme = _a.theme;
42
52
  return ($themeOverride === null || $themeOverride === void 0 ? void 0 : $themeOverride.textFontSize) || theme.confirmModal.textFontSize;
53
+ }, function (_a) {
54
+ var $themeOverride = _a.$themeOverride; _a.theme;
55
+ return (($themeOverride === null || $themeOverride === void 0 ? void 0 : $themeOverride.textMaxWidth) ? "".concat($themeOverride.textMaxWidth, "px") : "none");
43
56
  }, function (_a) {
44
57
  var $childrenBelow = _a.$childrenBelow;
45
58
  return ($childrenBelow ? 15 : 0);
@@ -78,8 +91,8 @@ var ConfirmModal = function (_a) {
78
91
  var modalPaddingString = "".concat(topPadding, "px ").concat(sidePadding, "px ").concat(bottomPadding, "px");
79
92
  var textSpace = modalWidth - sidePadding * 2;
80
93
  var buttonWidth = (textSpace - buttonGap) / 2;
81
- return (jsxRuntime.jsx(Modal.Modal, { borderRadius: (_b = themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.borderRadius) !== null && _b !== void 0 ? _b : theme.confirmModal.borderRadius, closeFunction: show ? onXClick : undefined, show: show, minWidth: modalWidth, mobileBreakpoint: modalWidth + 20, paddingString: modalPaddingString, showBoxShadow: (_c = themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.showBoxShadow) !== null && _c !== void 0 ? _c : theme.confirmModal.showBoxShadow, showOverflow: (_d = themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.showOverflow) !== null && _d !== void 0 ? _d : theme.confirmModal.showOverflow, slideDown: (_e = themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.slideDown) !== null && _e !== void 0 ? _e : theme.confirmModal.slideDown, xColor: (_f = themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.xColor) !== null && _f !== void 0 ? _f : theme.confirmModal.xColor, children: jsxRuntime.jsxs(BoundingBox, { "$fixedWidth": modalWidth, children: [Icon && (jsxRuntime.jsx(IconBox, { children: jsxRuntime.jsx(Icon, { fill: primaryColorGroup.hover }) })), jsxRuntime.jsx(Header, { "$textBelow": !!text, "$themeOverride": themeOverride, "data-sentry-unmask": sentryUnmask || undefined, children: header }), jsxRuntime.jsx(Text, { "$childrenBelow": !!children, "$themeOverride": themeOverride, "data-sentry-unmask": sentryUnmask || undefined, children: text }), children, jsxRuntime.jsxs(ButtonGroup, { "$secondaryAsText": secondaryAsText, "$themeOverride": themeOverride, children: [onSecondaryClick && !secondaryAsText && (jsxRuntime.jsx(OutlineButton.OutlineButton, { buttonHeight: (themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.buttonHeight) || theme.confirmModal.buttonHeight, buttonWidth: (themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.secondaryButtonWidth) || buttonWidth, disabled: !show || secondaryButtonDisabled, colorFamily: secondaryColorFamily || (secondaryAsText ? ButtonColorFamilyEnum.ButtonColorFamilyEnum.CoolGrey : ButtonColorFamilyEnum.ButtonColorFamilyEnum.Blue), colorFamilyOverride: secondaryColorFamilyOverride, onClick: onSecondaryClick, text: secondaryButtonText || "", loading: secondaryButtonLoading })), onSecondaryClick && secondaryAsText && (jsxRuntime.jsx(TextButtonSleeve, { children: jsxRuntime.jsx(TextButton.TextButton, { buttonWidth: buttonWidth, disabled: !show || secondaryButtonDisabled, colorFamily: secondaryColorFamily || (secondaryAsText ? ButtonColorFamilyEnum.ButtonColorFamilyEnum.CoolGrey : ButtonColorFamilyEnum.ButtonColorFamilyEnum.Blue), colorFamilyOverride: secondaryColorFamilyOverride, onClick: onSecondaryClick, text: secondaryButtonText || "", loading: secondaryButtonLoading }) })), onPrimaryClick && (jsxRuntime.jsx(PrimaryButton.PrimaryButton, { disabled: !show || primaryButtonDisabled, colorFamily: primaryColorFamily, colorFamilyOverride: primaryColorFamilyOverride, onClick: onPrimaryClick, text: primaryButtonText || "", buttonHeight: (themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.buttonHeight) || theme.confirmModal.buttonHeight, buttonWidth: (themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.primaryButtonWidth) || buttonWidth, shadow: (_g = themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.primaryButtonShadow) !== null && _g !== void 0 ? _g : theme.confirmModal.primaryButtonShadow, loading: primaryButtonLoading }))] })] }) }));
94
+ return (jsxRuntime.jsx(Modal.Modal, { borderRadius: (_b = themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.borderRadius) !== null && _b !== void 0 ? _b : theme.confirmModal.borderRadius, closeFunction: show ? onXClick : undefined, show: show, minWidth: modalWidth, mobileBreakpoint: modalWidth + 20, paddingString: modalPaddingString, showBoxShadow: (_c = themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.showBoxShadow) !== null && _c !== void 0 ? _c : theme.confirmModal.showBoxShadow, showOverflow: (_d = themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.showOverflow) !== null && _d !== void 0 ? _d : theme.confirmModal.showOverflow, slideDown: (_e = themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.slideDown) !== null && _e !== void 0 ? _e : theme.confirmModal.slideDown, xColor: (_f = themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.xColor) !== null && _f !== void 0 ? _f : theme.confirmModal.xColor, children: jsxRuntime.jsxs(BoundingBox, { "$fixedWidth": modalWidth, "$themeOverride": themeOverride, children: [Icon && (jsxRuntime.jsx(IconBox, { children: jsxRuntime.jsx(Icon, { fill: primaryColorGroup.hover }) })), jsxRuntime.jsx(Header, { "$textBelow": !!text, "$themeOverride": themeOverride, "data-sentry-unmask": sentryUnmask || undefined, children: header }), jsxRuntime.jsx(Text, { "$childrenBelow": !!children, "$themeOverride": themeOverride, "data-sentry-unmask": sentryUnmask || undefined, children: text }), children, jsxRuntime.jsxs(ButtonGroup, { "$secondaryAsText": secondaryAsText, "$themeOverride": themeOverride, children: [onSecondaryClick && !secondaryAsText && (jsxRuntime.jsx(OutlineButton.OutlineButton, { buttonHeight: (themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.buttonHeight) || theme.confirmModal.buttonHeight, buttonWidth: (themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.secondaryButtonWidth) || buttonWidth, disabled: !show || secondaryButtonDisabled, colorFamily: secondaryColorFamily || (secondaryAsText ? ButtonColorFamilyEnum.ButtonColorFamilyEnum.CoolGrey : ButtonColorFamilyEnum.ButtonColorFamilyEnum.Blue), colorFamilyOverride: secondaryColorFamilyOverride, onClick: onSecondaryClick, text: secondaryButtonText || "", loading: secondaryButtonLoading })), onSecondaryClick && secondaryAsText && (jsxRuntime.jsx(TextButtonSleeve, { children: jsxRuntime.jsx(TextButton.TextButton, { buttonWidth: buttonWidth, disabled: !show || secondaryButtonDisabled, colorFamily: secondaryColorFamily || (secondaryAsText ? ButtonColorFamilyEnum.ButtonColorFamilyEnum.CoolGrey : ButtonColorFamilyEnum.ButtonColorFamilyEnum.Blue), colorFamilyOverride: secondaryColorFamilyOverride, onClick: onSecondaryClick, text: secondaryButtonText || "", loading: secondaryButtonLoading }) })), onPrimaryClick && (jsxRuntime.jsx(PrimaryButton.PrimaryButton, { disabled: !show || primaryButtonDisabled, colorFamily: primaryColorFamily, colorFamilyOverride: primaryColorFamilyOverride, onClick: onPrimaryClick, text: primaryButtonText || "", buttonHeight: (themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.buttonHeight) || theme.confirmModal.buttonHeight, buttonWidth: (themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.primaryButtonWidth) || buttonWidth, shadow: (_g = themeOverride === null || themeOverride === void 0 ? void 0 : themeOverride.primaryButtonShadow) !== null && _g !== void 0 ? _g : theme.confirmModal.primaryButtonShadow, loading: primaryButtonLoading }))] })] }) }));
82
95
  };
83
96
 
84
97
  exports.ConfirmModal = ConfirmModal;
85
- //# sourceMappingURL=ConfirmModal-DoOploLb.js.map
98
+ //# sourceMappingURL=ConfirmModal-DRAHS2B-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmModal-DRAHS2B-.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var ConfirmModal = require('./ConfirmModal-DoOploLb.js');
3
+ var ConfirmModal = require('./ConfirmModal-DRAHS2B-.js');
4
4
  require('react/jsx-runtime');
5
5
  require('styled-components');
6
6
  require('./_tslib-ByDtMVOd.js');
@@ -155,7 +155,6 @@ var cerebellumTheme = {
155
155
  textAlign: "left",
156
156
  textColor: colors.colors.COOL_GREY_100,
157
157
  textFontSize: 16,
158
- titleAlign: "left",
159
158
  xColor: colors.colors.COOL_GREY_95,
160
159
  mobileBreakpoint: 600,
161
160
  },
@@ -1 +1 @@
1
- {"version":3,"file":"cerebellumTheme.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/lib/cjs/index.cjs CHANGED
@@ -26,7 +26,7 @@ var ClickOutHandler = require('./ClickOutHandler-b5mI7kuA.js');
26
26
  var ColorButton = require('./ColorButton-D-6cr8t2.js');
27
27
  var ColorPickerMenu = require('./ColorPickerMenu-8kShEqlx.js');
28
28
  var ConfigurableInput = require('./ConfigurableInput-naz2E_Pb.js');
29
- var ConfirmModal = require('./ConfirmModal-DoOploLb.js');
29
+ var ConfirmModal = require('./ConfirmModal-DRAHS2B-.js');
30
30
  var CreditCardInput = require('./CreditCardInput-bMyCXnqF.js');
31
31
  var CurrencyInput = require('./CurrencyInput-D_QGbxkC.js');
32
32
  var DatePicker = require('./DatePicker.cjs');
@@ -18096,9 +18096,10 @@ function AddressField(props) {
18096
18096
  var country = properties.country;
18097
18097
  var handleChange = function (key, value, fullAddress) {
18098
18098
  var _a;
18099
+ var _b, _c;
18099
18100
  var newFormData = _tslib.__assign(_tslib.__assign({}, formData), (_a = {}, _a[key] = value, _a));
18100
18101
  if (fullAddress) {
18101
- newFormData = _tslib.__assign(_tslib.__assign({}, newFormData), { postalCode: fullAddress === null || fullAddress === void 0 ? void 0 : fullAddress.postalCode, state: fullAddress.state, city: fullAddress.city });
18102
+ newFormData = _tslib.__assign(_tslib.__assign({}, newFormData), { address: ((_c = (_b = fullAddress === null || fullAddress === void 0 ? void 0 : fullAddress.rawAddressObject) === null || _b === void 0 ? void 0 : _b.formattedSuggestion) === null || _c === void 0 ? void 0 : _c.mainText) || (fullAddress === null || fullAddress === void 0 ? void 0 : fullAddress.street), postalCode: fullAddress === null || fullAddress === void 0 ? void 0 : fullAddress.postalCode, state: fullAddress.state, city: fullAddress.city });
18102
18103
  }
18103
18104
  onChange(newFormData);
18104
18105
  };