@pelcro/react-pelcro-js 3.26.1 → 3.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -4048,12 +4048,16 @@ var invoiceDetails_en = {
4048
4048
  var labels$R = {
4049
4049
  title: "Cancel subscription",
4050
4050
  cancelReason: "Cancellation reason",
4051
+ endOn: "End on",
4052
+ endImmediately: "End immediately",
4053
+ cancel: "Cancel",
4051
4054
  subCancellation: {
4052
4055
  goBack: "Go back"
4053
4056
  }
4054
4057
  };
4055
4058
  var messages$T = {
4056
4059
  subscriptionEnd: "This subscription is set to expire on",
4060
+ cancelWhen: "When would you like to cancel?",
4057
4061
  cancelNow: "Cancel Subscription Now",
4058
4062
  cancelLater: "Cancel at Period End",
4059
4063
  subCancellation: {
@@ -4916,12 +4920,16 @@ var invoiceDetails_fr = {
4916
4920
  var labels$A = {
4917
4921
  title: "Annuler l'abonnement",
4918
4922
  cancelReason: "Motif d'annulation",
4923
+ endOn: "Fin sur",
4924
+ endImmediately: "Fin immédiate",
4925
+ cancel: "Annuler",
4919
4926
  subCancellation: {
4920
4927
  goBack: "Retourner"
4921
4928
  }
4922
4929
  };
4923
4930
  var messages$B = {
4924
4931
  subscriptionEnd: "Cet abonnement doit expirer le",
4932
+ cancelWhen: "Quand voulez-vous annuler?",
4925
4933
  cancelNow: "Cancel Subscription Now",
4926
4934
  cancelLater: "Annuler l'abonnement maintenant",
4927
4935
  subCancellation: {
@@ -5890,12 +5898,16 @@ var invoiceDetails_ko = {
5890
5898
  var labels$j = {
5891
5899
  title: "구독 취소",
5892
5900
  cancelReason: "취소 사유",
5901
+ endOn: "종료",
5902
+ endImmediately: "즉시 종료",
5903
+ cancel: "취소",
5893
5904
  subCancellation: {
5894
5905
  goBack: "돌아가기"
5895
5906
  }
5896
5907
  };
5897
5908
  var messages$j = {
5898
5909
  subscriptionEnd: "이 구독은 다음 날짜에 만료되도록 설정되었습니다.",
5910
+ cancelWhen: "언제 취소하시겠습니까?",
5899
5911
  cancelNow: "지금 구독 취소",
5900
5912
  cancelLater: "기간 종료 시 취소",
5901
5913
  subCancellation: {
@@ -6750,12 +6762,16 @@ var invoiceDetails_es = {
6750
6762
  var labels$2 = {
6751
6763
  title: "Cancelar suscripción",
6752
6764
  cancelReason: "Razón de la cancelación",
6765
+ endOn: "Fin de",
6766
+ endImmediately: "Fin inmediato",
6767
+ cancel: "Cancelar",
6753
6768
  subCancellation: {
6754
6769
  goBack: "Volver"
6755
6770
  }
6756
6771
  };
6757
6772
  var messages$1 = {
6758
6773
  subscriptionEnd: "Esta suscripción expirará el",
6774
+ cancelWhen: "¿Cuándo desea cancelar?",
6759
6775
  cancelNow: "Cancelar Suscripción Ahora",
6760
6776
  cancelLater: "Cancelar al Final del Periodo",
6761
6777
  subCancellation: {
@@ -11545,21 +11561,33 @@ const initPaywalls = () => {
11545
11561
  return;
11546
11562
  }
11547
11563
  const {
11548
- switchView
11564
+ switchView,
11565
+ isAuthenticated
11549
11566
  } = usePelcro.getStore();
11550
- if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayMeterPaywall()) {
11551
- /*
11552
- showing both the meter and the entitlements notification doesn't make sense from
11553
- a product prespective + they would take half the screen on mobile devies, so we're
11554
- not showing the meter, and only showing the entitlements notification.
11555
- */
11556
- if (!didBlurContent) {
11557
- switchView("meter");
11567
+
11568
+ // eslint-disable-next-line no-inner-declarations
11569
+ function displayPaywalls() {
11570
+ if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayMeterPaywall()) {
11571
+ /*
11572
+ showing both the meter and the entitlements notification doesn't make sense from
11573
+ a product prespective + they would take half the screen on mobile devies, so we're
11574
+ not showing the meter, and only showing the entitlements notification.
11575
+ */
11576
+ if (!didBlurContent) {
11577
+ switchView("meter");
11578
+ }
11579
+ } else if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayNewsletterPaywall()) {
11580
+ switchView("newsletter");
11581
+ } else if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayPaywall()) {
11582
+ switchView("plan-select");
11558
11583
  }
11559
- } else if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayNewsletterPaywall()) {
11560
- switchView("newsletter");
11561
- } else if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayPaywall()) {
11562
- switchView("plan-select");
11584
+ }
11585
+ if ("id" in Pelcro.user.read() || !isAuthenticated()) {
11586
+ displayPaywalls();
11587
+ } else {
11588
+ addEventListener("PelcroUserLoaded", function () {
11589
+ displayPaywalls();
11590
+ }, true);
11563
11591
  }
11564
11592
  }
11565
11593
  };
@@ -12452,6 +12480,7 @@ const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
12452
12480
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
12453
12481
  const LINK_TOKEN_VERIFY = "LINK_TOKEN_VERIFY";
12454
12482
  const SET_CANCEL_SUBSCRIPTION_REASON = "SET_CANCEL_SUBSCRIPTION_REASON";
12483
+ const SET_CANCEL_SUBSCRIPTION_OPTION = "SET_CANCEL_SUBSCRIPTION_OPTION";
12455
12484
  const HANDLE_CHECKBOX_CHANGE = "HANDLE_CHECKBOX_CHANGE";
12456
12485
  const SET_SUBSCRIPTION_SUSPEND_DATE = "SET_SUBSCRIPTION_SUSPEND_DATE";
12457
12486
  const SET_EMAILS = "SET_EMAILS";
@@ -20382,7 +20411,8 @@ function SubscriptionRenewModal(_ref) {
20382
20411
  SubscriptionRenewModal.viewId = "subscription-renew";
20383
20412
 
20384
20413
  const initialState$j = {
20385
- cancelationReason: ""
20414
+ cancelationReason: "",
20415
+ cancelationOption: ""
20386
20416
  };
20387
20417
  const store$j = /*#__PURE__*/React.createContext(initialState$j);
20388
20418
  const {
@@ -20397,7 +20427,6 @@ const SubscriptionCancelContainer = _ref => {
20397
20427
  children,
20398
20428
  ...props
20399
20429
  } = _ref;
20400
- useTranslation("verifyEmail");
20401
20430
  const [state, dispatch] = useReducerWithSideEffects((state, action) => {
20402
20431
  switch (action.type) {
20403
20432
  case SET_CANCEL_SUBSCRIPTION_REASON:
@@ -20405,6 +20434,11 @@ const SubscriptionCancelContainer = _ref => {
20405
20434
  ...state,
20406
20435
  cancelationReason: action.payload
20407
20436
  });
20437
+ case SET_CANCEL_SUBSCRIPTION_OPTION:
20438
+ return lib_7({
20439
+ ...state,
20440
+ cancelationOption: action.payload
20441
+ });
20408
20442
  default:
20409
20443
  return state;
20410
20444
  }
@@ -20504,8 +20538,7 @@ const SubscriptionCancelReason = props => {
20504
20538
  t
20505
20539
  } = useTranslation("subscriptionCancel");
20506
20540
  const {
20507
- dispatch,
20508
- state
20541
+ dispatch
20509
20542
  } = React.useContext(store$j);
20510
20543
  const handleOnTextAreaBlur = e => {
20511
20544
  dispatch({
@@ -20537,7 +20570,7 @@ function SvgSubscription(props) {
20537
20570
  }))))));
20538
20571
  }
20539
20572
 
20540
- const SubscriptionCancelNowButton = _ref => {
20573
+ const SubscriptionCancelButton = _ref => {
20541
20574
  let {
20542
20575
  subscription,
20543
20576
  onClick,
@@ -20548,9 +20581,9 @@ const SubscriptionCancelNowButton = _ref => {
20548
20581
  } = usePelcro();
20549
20582
  const {
20550
20583
  state: {
20551
- cancelationReason
20552
- },
20553
- dispatch
20584
+ cancelationReason,
20585
+ cancelationOption
20586
+ }
20554
20587
  } = React.useContext(store$j);
20555
20588
  const {
20556
20589
  t
@@ -20584,10 +20617,10 @@ const SubscriptionCancelNowButton = _ref => {
20584
20617
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
20585
20618
  });
20586
20619
  };
20587
- const handleCancelNowClick = () => {
20620
+ const handleCancelClick = () => {
20588
20621
  const payload = {
20589
20622
  subscription_id: subscription.id,
20590
- mode: "now",
20623
+ mode: cancelationOption,
20591
20624
  ...(cancelationReason && {
20592
20625
  reason: cancelationReason
20593
20626
  })
@@ -20601,7 +20634,7 @@ const SubscriptionCancelNowButton = _ref => {
20601
20634
  notify$1.confirm((onSuccess, onFailure) => {
20602
20635
  cancelSubscription(payload, onSuccess, onFailure);
20603
20636
  }, {
20604
- confirmMessage: t("messages.subCancellation.isSureToCancelNow"),
20637
+ confirmMessage: cancelationOption === "now" ? t("messages.subCancellation.isSureToCancelNow") : t("messages.subCancellation.isSureToCancel"),
20605
20638
  loadingMessage: t("messages.subCancellation.loading"),
20606
20639
  successMessage: t("messages.subCancellation.success"),
20607
20640
  errorMessage: t("messages.subCancellation.error")
@@ -20610,96 +20643,89 @@ const SubscriptionCancelNowButton = _ref => {
20610
20643
  });
20611
20644
  };
20612
20645
  return /*#__PURE__*/React__default['default'].createElement(Button, {
20613
- onClick: handleCancelNowClick,
20614
- className: `${className}`
20615
- }, t("messages.cancelNow"));
20646
+ onClick: handleCancelClick,
20647
+ className: `${className}`,
20648
+ disabled: !cancelationOption
20649
+ }, t("labels.cancel"));
20616
20650
  };
20617
20651
 
20618
- const SubscriptionCancelLaterButton = _ref => {
20652
+ // New cancellation option modal
20653
+ const SubscriptionCancelOptions = _ref => {
20654
+ var _subscription$schedul;
20619
20655
  let {
20620
20656
  subscription,
20657
+ hasPhases,
20621
20658
  onClick,
20622
20659
  className
20623
20660
  } = _ref;
20624
- const {
20625
- switchView
20626
- } = usePelcro();
20627
20661
  const {
20628
20662
  state: {
20629
- cancelationReason
20663
+ cancelationOption
20630
20664
  },
20631
20665
  dispatch
20632
20666
  } = React.useContext(store$j);
20633
20667
  const {
20634
20668
  t
20635
20669
  } = useTranslation("subscriptionCancel");
20636
- const cancelSubscription = (payload, onSuccess, onFailure) => {
20637
- var _window, _window$Pelcro, _window$Pelcro$uiSett;
20638
- const enableReactGA4 = (_window = window) === null || _window === void 0 ? void 0 : (_window$Pelcro = _window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.enableReactGA4;
20639
- window.Pelcro.subscription.cancel({
20640
- auth_token: window.Pelcro.user.read().auth_token,
20641
- subscription_id: payload.subscription_id,
20642
- mode: payload.mode,
20643
- ...(payload.reason && {
20644
- reason: payload.reason
20645
- })
20646
- }, (err, res) => {
20647
- if (err) {
20648
- return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
20649
- }
20650
- if (enableReactGA4) {
20651
- ReactGA4.event("Canceled", {
20652
- nonInteraction: true
20653
- });
20654
- } else {
20655
- var _ReactGA$event;
20656
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
20657
- category: "ACTIONS",
20658
- action: "Canceled",
20659
- nonInteraction: true
20660
- });
20661
- }
20662
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
20663
- });
20664
- };
20665
- const handleCancelNowClick = () => {
20666
- const payload = {
20667
- subscription_id: subscription.id,
20668
- mode: "period_end",
20669
- ...(cancelationReason && {
20670
- reason: cancelationReason
20671
- })
20672
- };
20673
- onClick === null || onClick === void 0 ? void 0 : onClick();
20674
-
20675
- // Close the modal
20676
- switchView(null);
20677
-
20678
- // Show confirmation alert after closing the modal
20679
- notify$1.confirm((onSuccess, onFailure) => {
20680
- cancelSubscription(payload, onSuccess, onFailure);
20681
- }, {
20682
- confirmMessage: t("messages.subCancellation.isSureToCancel"),
20683
- loadingMessage: t("messages.subCancellation.loading"),
20684
- successMessage: t("messages.subCancellation.success"),
20685
- errorMessage: t("messages.subCancellation.error")
20686
- }, {
20687
- closeButtonLabel: t("labels.subCancellation.goBack")
20670
+ const phases = subscription === null || subscription === void 0 ? void 0 : (_subscription$schedul = subscription.schedule) === null || _subscription$schedul === void 0 ? void 0 : _subscription$schedul.phases;
20671
+ const lastPhase = !phases ? [] : phases[(phases === null || phases === void 0 ? void 0 : phases.length) - 1];
20672
+ const handleOptionSelect = event => {
20673
+ dispatch({
20674
+ type: SET_CANCEL_SUBSCRIPTION_OPTION,
20675
+ payload: event.target.value
20688
20676
  });
20689
20677
  };
20690
- return /*#__PURE__*/React__default['default'].createElement(Button, {
20691
- onClick: handleCancelNowClick,
20692
- className: `${className}`
20693
- }, t("messages.cancelLater"));
20678
+ return /*#__PURE__*/React__default['default'].createElement("div", {
20679
+ className: "plc-text-left plc-mr-auto plc-mb-6"
20680
+ }, /*#__PURE__*/React__default['default'].createElement("p", {
20681
+ className: "plc-mb-3"
20682
+ }, t("messages.cancelWhen")), subscription.cancel_at_period_end === 0 && hasPhases && /*#__PURE__*/React__default['default'].createElement(Radio, {
20683
+ onChange: handleOptionSelect,
20684
+ checked: cancelationOption === "period_end",
20685
+ value: "period_end"
20686
+ }, t("labels.endOn"), " ", new Date(Number(`${lastPhase === null || lastPhase === void 0 ? void 0 : lastPhase.end_date}000`)).toLocaleDateString("en-CA", {
20687
+ year: "numeric",
20688
+ month: "short",
20689
+ day: "numeric"
20690
+ })), subscription.cancel_at_period_end === 0 && /*#__PURE__*/React__default['default'].createElement(Radio, {
20691
+ onChange: handleOptionSelect,
20692
+ checked: cancelationOption === "current_period_end",
20693
+ value: "current_period_end"
20694
+ }, t("labels.endOn"), " ", new Date(subscription === null || subscription === void 0 ? void 0 : subscription.current_period_end).toLocaleDateString("en-CA", {
20695
+ year: "numeric",
20696
+ month: "short",
20697
+ day: "numeric"
20698
+ })), /*#__PURE__*/React__default['default'].createElement(Radio, {
20699
+ onChange: handleOptionSelect,
20700
+ checked: cancelationOption === "now",
20701
+ value: "now"
20702
+ }, t("labels.endImmediately")));
20694
20703
  };
20695
20704
 
20696
20705
  const SubscriptionCancelView = props => {
20706
+ var _subscriptionToCancel7, _subscriptionToCancel8;
20697
20707
  const {
20698
- subscriptionToCancel
20708
+ subscriptionToCancel,
20709
+ switchView
20699
20710
  } = usePelcro();
20700
20711
  const {
20701
20712
  t
20702
20713
  } = useTranslation("subscriptionCancel");
20714
+ const getPhases = () => {
20715
+ var _subscriptionToCancel, _subscriptionToCancel2, _subscriptionToCancel3, _subscriptionToCancel4, _subscriptionToCancel5, _subscriptionToCancel6;
20716
+ if (!subscriptionToCancel.schedule) return [];
20717
+ const currentPhaseStartDate = subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : (_subscriptionToCancel = subscriptionToCancel.schedule) === null || _subscriptionToCancel === void 0 ? void 0 : (_subscriptionToCancel2 = _subscriptionToCancel.current_phase) === null || _subscriptionToCancel2 === void 0 ? void 0 : _subscriptionToCancel2.start_date;
20718
+ const currentPhase = subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : (_subscriptionToCancel3 = subscriptionToCancel.schedule) === null || _subscriptionToCancel3 === void 0 ? void 0 : (_subscriptionToCancel4 = _subscriptionToCancel3.phases) === null || _subscriptionToCancel4 === void 0 ? void 0 : _subscriptionToCancel4.find(phase => {
20719
+ return (phase === null || phase === void 0 ? void 0 : phase.start_date) === currentPhaseStartDate;
20720
+ });
20721
+ const futurePhases = subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : (_subscriptionToCancel5 = subscriptionToCancel.schedule) === null || _subscriptionToCancel5 === void 0 ? void 0 : (_subscriptionToCancel6 = _subscriptionToCancel5.phases) === null || _subscriptionToCancel6 === void 0 ? void 0 : _subscriptionToCancel6.filter(phase => {
20722
+ return (phase === null || phase === void 0 ? void 0 : phase.start_date) > currentPhaseStartDate;
20723
+ });
20724
+ return [currentPhase, ...futurePhases];
20725
+ };
20726
+ const hasPhases = getPhases().length > 0;
20727
+ const phases = subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : (_subscriptionToCancel7 = subscriptionToCancel.schedule) === null || _subscriptionToCancel7 === void 0 ? void 0 : _subscriptionToCancel7.phases;
20728
+ const lastPhase = !phases ? [] : phases[(phases === null || phases === void 0 ? void 0 : phases.length) - 1];
20703
20729
  return /*#__PURE__*/React__default['default'].createElement("div", {
20704
20730
  id: "pelcro-subscription-cancel-view"
20705
20731
  }, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -20708,22 +20734,35 @@ const SubscriptionCancelView = props => {
20708
20734
  className: "plc-text-2xl plc-font-semibold"
20709
20735
  }, t("labels.title"), /*#__PURE__*/React__default['default'].createElement("span", {
20710
20736
  className: "plc-text-gray-400 plc-text-base plc-block"
20711
- }, "(", subscriptionToCancel.plan.nickname, ")"))), /*#__PURE__*/React__default['default'].createElement(SubscriptionCancelContainer, props, /*#__PURE__*/React__default['default'].createElement("div", {
20737
+ }, "(", subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : (_subscriptionToCancel8 = subscriptionToCancel.plan) === null || _subscriptionToCancel8 === void 0 ? void 0 : _subscriptionToCancel8.nickname, ")"))), /*#__PURE__*/React__default['default'].createElement(SubscriptionCancelContainer, props, /*#__PURE__*/React__default['default'].createElement("div", {
20712
20738
  className: "plc-flex plc-flex-col plc-items-center plc-justify-center plc-mt-4"
20713
20739
  }, /*#__PURE__*/React__default['default'].createElement(SvgSubscription, {
20714
20740
  className: "plc-w-32 plc-h-32"
20715
20741
  }), /*#__PURE__*/React__default['default'].createElement("p", {
20716
- className: "plc-mb-3 plc-text-gray-900 plc-text-center plc-whitespace-pre-line"
20717
- }, t("messages.subscriptionEnd"), " ", new Date(subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : subscriptionToCancel.current_period_end).toLocaleDateString("en-CA", {
20742
+ className: "plc-mb-3 plc-text-gray-900 plc-text-left plc-mr-auto plc-whitespace-pre-line"
20743
+ }, t("messages.subscriptionEnd"), " ", hasPhases ? new Date(Number(`${lastPhase === null || lastPhase === void 0 ? void 0 : lastPhase.end_date}000`)).toLocaleDateString("en-CA", {
20718
20744
  year: "numeric",
20719
20745
  month: "short",
20720
20746
  day: "numeric"
20721
- }), "."), /*#__PURE__*/React__default['default'].createElement(SubscriptionCancelReason, null), /*#__PURE__*/React__default['default'].createElement(SubscriptionCancelNowButton, {
20722
- className: "plc-mb-2",
20723
- subscription: subscriptionToCancel
20724
- }), subscriptionToCancel.cancel_at_period_end === 0 && /*#__PURE__*/React__default['default'].createElement(SubscriptionCancelLaterButton, {
20747
+ }) : new Date(subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : subscriptionToCancel.current_period_end).toLocaleDateString("en-CA", {
20748
+ year: "numeric",
20749
+ month: "short",
20750
+ day: "numeric"
20751
+ }), "."), /*#__PURE__*/React__default['default'].createElement(SubscriptionCancelOptions, {
20752
+ subscription: subscriptionToCancel,
20753
+ hasPhases: hasPhases
20754
+ }), /*#__PURE__*/React__default['default'].createElement(SubscriptionCancelReason, null), /*#__PURE__*/React__default['default'].createElement("div", {
20755
+ className: "plc-space-x-0 plc-space-y-3 md:plc-space-x-3 md:plc-space-y-0 plc-w-full plc-flex plc-flex-col md:plc-flex-row plc-items-center plc-justify-center"
20756
+ }, /*#__PURE__*/React__default['default'].createElement(SubscriptionCancelButton, {
20757
+ className: "plc-w-3/4 md:plc-w-2/5",
20725
20758
  subscription: subscriptionToCancel
20726
- }))));
20759
+ }), /*#__PURE__*/React__default['default'].createElement(Button, {
20760
+ variant: "outline",
20761
+ className: "plc-w-3/4 md:plc-w-2/5",
20762
+ onClick: () => {
20763
+ switchView("dashboard");
20764
+ }
20765
+ }, t("labels.subCancellation.goBack"))))));
20727
20766
  };
20728
20767
 
20729
20768
  const SubscriptionCancelModal = _ref => {
package/dist/index.esm.js CHANGED
@@ -4018,12 +4018,16 @@ var invoiceDetails_en = {
4018
4018
  var labels$R = {
4019
4019
  title: "Cancel subscription",
4020
4020
  cancelReason: "Cancellation reason",
4021
+ endOn: "End on",
4022
+ endImmediately: "End immediately",
4023
+ cancel: "Cancel",
4021
4024
  subCancellation: {
4022
4025
  goBack: "Go back"
4023
4026
  }
4024
4027
  };
4025
4028
  var messages$T = {
4026
4029
  subscriptionEnd: "This subscription is set to expire on",
4030
+ cancelWhen: "When would you like to cancel?",
4027
4031
  cancelNow: "Cancel Subscription Now",
4028
4032
  cancelLater: "Cancel at Period End",
4029
4033
  subCancellation: {
@@ -4886,12 +4890,16 @@ var invoiceDetails_fr = {
4886
4890
  var labels$A = {
4887
4891
  title: "Annuler l'abonnement",
4888
4892
  cancelReason: "Motif d'annulation",
4893
+ endOn: "Fin sur",
4894
+ endImmediately: "Fin immédiate",
4895
+ cancel: "Annuler",
4889
4896
  subCancellation: {
4890
4897
  goBack: "Retourner"
4891
4898
  }
4892
4899
  };
4893
4900
  var messages$B = {
4894
4901
  subscriptionEnd: "Cet abonnement doit expirer le",
4902
+ cancelWhen: "Quand voulez-vous annuler?",
4895
4903
  cancelNow: "Cancel Subscription Now",
4896
4904
  cancelLater: "Annuler l'abonnement maintenant",
4897
4905
  subCancellation: {
@@ -5860,12 +5868,16 @@ var invoiceDetails_ko = {
5860
5868
  var labels$j = {
5861
5869
  title: "구독 취소",
5862
5870
  cancelReason: "취소 사유",
5871
+ endOn: "종료",
5872
+ endImmediately: "즉시 종료",
5873
+ cancel: "취소",
5863
5874
  subCancellation: {
5864
5875
  goBack: "돌아가기"
5865
5876
  }
5866
5877
  };
5867
5878
  var messages$j = {
5868
5879
  subscriptionEnd: "이 구독은 다음 날짜에 만료되도록 설정되었습니다.",
5880
+ cancelWhen: "언제 취소하시겠습니까?",
5869
5881
  cancelNow: "지금 구독 취소",
5870
5882
  cancelLater: "기간 종료 시 취소",
5871
5883
  subCancellation: {
@@ -6720,12 +6732,16 @@ var invoiceDetails_es = {
6720
6732
  var labels$2 = {
6721
6733
  title: "Cancelar suscripción",
6722
6734
  cancelReason: "Razón de la cancelación",
6735
+ endOn: "Fin de",
6736
+ endImmediately: "Fin inmediato",
6737
+ cancel: "Cancelar",
6723
6738
  subCancellation: {
6724
6739
  goBack: "Volver"
6725
6740
  }
6726
6741
  };
6727
6742
  var messages$1 = {
6728
6743
  subscriptionEnd: "Esta suscripción expirará el",
6744
+ cancelWhen: "¿Cuándo desea cancelar?",
6729
6745
  cancelNow: "Cancelar Suscripción Ahora",
6730
6746
  cancelLater: "Cancelar al Final del Periodo",
6731
6747
  subCancellation: {
@@ -11515,21 +11531,33 @@ const initPaywalls = () => {
11515
11531
  return;
11516
11532
  }
11517
11533
  const {
11518
- switchView
11534
+ switchView,
11535
+ isAuthenticated
11519
11536
  } = usePelcro.getStore();
11520
- if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayMeterPaywall()) {
11521
- /*
11522
- showing both the meter and the entitlements notification doesn't make sense from
11523
- a product prespective + they would take half the screen on mobile devies, so we're
11524
- not showing the meter, and only showing the entitlements notification.
11525
- */
11526
- if (!didBlurContent) {
11527
- switchView("meter");
11537
+
11538
+ // eslint-disable-next-line no-inner-declarations
11539
+ function displayPaywalls() {
11540
+ if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayMeterPaywall()) {
11541
+ /*
11542
+ showing both the meter and the entitlements notification doesn't make sense from
11543
+ a product prespective + they would take half the screen on mobile devies, so we're
11544
+ not showing the meter, and only showing the entitlements notification.
11545
+ */
11546
+ if (!didBlurContent) {
11547
+ switchView("meter");
11548
+ }
11549
+ } else if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayNewsletterPaywall()) {
11550
+ switchView("newsletter");
11551
+ } else if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayPaywall()) {
11552
+ switchView("plan-select");
11528
11553
  }
11529
- } else if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayNewsletterPaywall()) {
11530
- switchView("newsletter");
11531
- } else if (paywallMethods !== null && paywallMethods !== void 0 && paywallMethods.displayPaywall()) {
11532
- switchView("plan-select");
11554
+ }
11555
+ if ("id" in Pelcro.user.read() || !isAuthenticated()) {
11556
+ displayPaywalls();
11557
+ } else {
11558
+ addEventListener("PelcroUserLoaded", function () {
11559
+ displayPaywalls();
11560
+ }, true);
11533
11561
  }
11534
11562
  }
11535
11563
  };
@@ -12422,6 +12450,7 @@ const GET_NEWSLETTERS_SUCCESS = "GET_NEWSLETTERS_SUCCESS";
12422
12450
  const SWITCH_TO_UPDATE = "SWITCH_TO_UPDATE";
12423
12451
  const LINK_TOKEN_VERIFY = "LINK_TOKEN_VERIFY";
12424
12452
  const SET_CANCEL_SUBSCRIPTION_REASON = "SET_CANCEL_SUBSCRIPTION_REASON";
12453
+ const SET_CANCEL_SUBSCRIPTION_OPTION = "SET_CANCEL_SUBSCRIPTION_OPTION";
12425
12454
  const HANDLE_CHECKBOX_CHANGE = "HANDLE_CHECKBOX_CHANGE";
12426
12455
  const SET_SUBSCRIPTION_SUSPEND_DATE = "SET_SUBSCRIPTION_SUSPEND_DATE";
12427
12456
  const SET_EMAILS = "SET_EMAILS";
@@ -20352,7 +20381,8 @@ function SubscriptionRenewModal(_ref) {
20352
20381
  SubscriptionRenewModal.viewId = "subscription-renew";
20353
20382
 
20354
20383
  const initialState$j = {
20355
- cancelationReason: ""
20384
+ cancelationReason: "",
20385
+ cancelationOption: ""
20356
20386
  };
20357
20387
  const store$j = /*#__PURE__*/createContext(initialState$j);
20358
20388
  const {
@@ -20367,7 +20397,6 @@ const SubscriptionCancelContainer = _ref => {
20367
20397
  children,
20368
20398
  ...props
20369
20399
  } = _ref;
20370
- useTranslation("verifyEmail");
20371
20400
  const [state, dispatch] = useReducerWithSideEffects((state, action) => {
20372
20401
  switch (action.type) {
20373
20402
  case SET_CANCEL_SUBSCRIPTION_REASON:
@@ -20375,6 +20404,11 @@ const SubscriptionCancelContainer = _ref => {
20375
20404
  ...state,
20376
20405
  cancelationReason: action.payload
20377
20406
  });
20407
+ case SET_CANCEL_SUBSCRIPTION_OPTION:
20408
+ return lib_7({
20409
+ ...state,
20410
+ cancelationOption: action.payload
20411
+ });
20378
20412
  default:
20379
20413
  return state;
20380
20414
  }
@@ -20474,8 +20508,7 @@ const SubscriptionCancelReason = props => {
20474
20508
  t
20475
20509
  } = useTranslation("subscriptionCancel");
20476
20510
  const {
20477
- dispatch,
20478
- state
20511
+ dispatch
20479
20512
  } = useContext(store$j);
20480
20513
  const handleOnTextAreaBlur = e => {
20481
20514
  dispatch({
@@ -20507,7 +20540,7 @@ function SvgSubscription(props) {
20507
20540
  }))))));
20508
20541
  }
20509
20542
 
20510
- const SubscriptionCancelNowButton = _ref => {
20543
+ const SubscriptionCancelButton = _ref => {
20511
20544
  let {
20512
20545
  subscription,
20513
20546
  onClick,
@@ -20518,9 +20551,9 @@ const SubscriptionCancelNowButton = _ref => {
20518
20551
  } = usePelcro();
20519
20552
  const {
20520
20553
  state: {
20521
- cancelationReason
20522
- },
20523
- dispatch
20554
+ cancelationReason,
20555
+ cancelationOption
20556
+ }
20524
20557
  } = useContext(store$j);
20525
20558
  const {
20526
20559
  t
@@ -20554,10 +20587,10 @@ const SubscriptionCancelNowButton = _ref => {
20554
20587
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
20555
20588
  });
20556
20589
  };
20557
- const handleCancelNowClick = () => {
20590
+ const handleCancelClick = () => {
20558
20591
  const payload = {
20559
20592
  subscription_id: subscription.id,
20560
- mode: "now",
20593
+ mode: cancelationOption,
20561
20594
  ...(cancelationReason && {
20562
20595
  reason: cancelationReason
20563
20596
  })
@@ -20571,7 +20604,7 @@ const SubscriptionCancelNowButton = _ref => {
20571
20604
  notify$1.confirm((onSuccess, onFailure) => {
20572
20605
  cancelSubscription(payload, onSuccess, onFailure);
20573
20606
  }, {
20574
- confirmMessage: t("messages.subCancellation.isSureToCancelNow"),
20607
+ confirmMessage: cancelationOption === "now" ? t("messages.subCancellation.isSureToCancelNow") : t("messages.subCancellation.isSureToCancel"),
20575
20608
  loadingMessage: t("messages.subCancellation.loading"),
20576
20609
  successMessage: t("messages.subCancellation.success"),
20577
20610
  errorMessage: t("messages.subCancellation.error")
@@ -20580,96 +20613,89 @@ const SubscriptionCancelNowButton = _ref => {
20580
20613
  });
20581
20614
  };
20582
20615
  return /*#__PURE__*/React__default.createElement(Button, {
20583
- onClick: handleCancelNowClick,
20584
- className: `${className}`
20585
- }, t("messages.cancelNow"));
20616
+ onClick: handleCancelClick,
20617
+ className: `${className}`,
20618
+ disabled: !cancelationOption
20619
+ }, t("labels.cancel"));
20586
20620
  };
20587
20621
 
20588
- const SubscriptionCancelLaterButton = _ref => {
20622
+ // New cancellation option modal
20623
+ const SubscriptionCancelOptions = _ref => {
20624
+ var _subscription$schedul;
20589
20625
  let {
20590
20626
  subscription,
20627
+ hasPhases,
20591
20628
  onClick,
20592
20629
  className
20593
20630
  } = _ref;
20594
- const {
20595
- switchView
20596
- } = usePelcro();
20597
20631
  const {
20598
20632
  state: {
20599
- cancelationReason
20633
+ cancelationOption
20600
20634
  },
20601
20635
  dispatch
20602
20636
  } = useContext(store$j);
20603
20637
  const {
20604
20638
  t
20605
20639
  } = useTranslation("subscriptionCancel");
20606
- const cancelSubscription = (payload, onSuccess, onFailure) => {
20607
- var _window, _window$Pelcro, _window$Pelcro$uiSett;
20608
- const enableReactGA4 = (_window = window) === null || _window === void 0 ? void 0 : (_window$Pelcro = _window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.enableReactGA4;
20609
- window.Pelcro.subscription.cancel({
20610
- auth_token: window.Pelcro.user.read().auth_token,
20611
- subscription_id: payload.subscription_id,
20612
- mode: payload.mode,
20613
- ...(payload.reason && {
20614
- reason: payload.reason
20615
- })
20616
- }, (err, res) => {
20617
- if (err) {
20618
- return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
20619
- }
20620
- if (enableReactGA4) {
20621
- ReactGA4.event("Canceled", {
20622
- nonInteraction: true
20623
- });
20624
- } else {
20625
- var _ReactGA$event;
20626
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
20627
- category: "ACTIONS",
20628
- action: "Canceled",
20629
- nonInteraction: true
20630
- });
20631
- }
20632
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
20633
- });
20634
- };
20635
- const handleCancelNowClick = () => {
20636
- const payload = {
20637
- subscription_id: subscription.id,
20638
- mode: "period_end",
20639
- ...(cancelationReason && {
20640
- reason: cancelationReason
20641
- })
20642
- };
20643
- onClick === null || onClick === void 0 ? void 0 : onClick();
20644
-
20645
- // Close the modal
20646
- switchView(null);
20647
-
20648
- // Show confirmation alert after closing the modal
20649
- notify$1.confirm((onSuccess, onFailure) => {
20650
- cancelSubscription(payload, onSuccess, onFailure);
20651
- }, {
20652
- confirmMessage: t("messages.subCancellation.isSureToCancel"),
20653
- loadingMessage: t("messages.subCancellation.loading"),
20654
- successMessage: t("messages.subCancellation.success"),
20655
- errorMessage: t("messages.subCancellation.error")
20656
- }, {
20657
- closeButtonLabel: t("labels.subCancellation.goBack")
20640
+ const phases = subscription === null || subscription === void 0 ? void 0 : (_subscription$schedul = subscription.schedule) === null || _subscription$schedul === void 0 ? void 0 : _subscription$schedul.phases;
20641
+ const lastPhase = !phases ? [] : phases[(phases === null || phases === void 0 ? void 0 : phases.length) - 1];
20642
+ const handleOptionSelect = event => {
20643
+ dispatch({
20644
+ type: SET_CANCEL_SUBSCRIPTION_OPTION,
20645
+ payload: event.target.value
20658
20646
  });
20659
20647
  };
20660
- return /*#__PURE__*/React__default.createElement(Button, {
20661
- onClick: handleCancelNowClick,
20662
- className: `${className}`
20663
- }, t("messages.cancelLater"));
20648
+ return /*#__PURE__*/React__default.createElement("div", {
20649
+ className: "plc-text-left plc-mr-auto plc-mb-6"
20650
+ }, /*#__PURE__*/React__default.createElement("p", {
20651
+ className: "plc-mb-3"
20652
+ }, t("messages.cancelWhen")), subscription.cancel_at_period_end === 0 && hasPhases && /*#__PURE__*/React__default.createElement(Radio, {
20653
+ onChange: handleOptionSelect,
20654
+ checked: cancelationOption === "period_end",
20655
+ value: "period_end"
20656
+ }, t("labels.endOn"), " ", new Date(Number(`${lastPhase === null || lastPhase === void 0 ? void 0 : lastPhase.end_date}000`)).toLocaleDateString("en-CA", {
20657
+ year: "numeric",
20658
+ month: "short",
20659
+ day: "numeric"
20660
+ })), subscription.cancel_at_period_end === 0 && /*#__PURE__*/React__default.createElement(Radio, {
20661
+ onChange: handleOptionSelect,
20662
+ checked: cancelationOption === "current_period_end",
20663
+ value: "current_period_end"
20664
+ }, t("labels.endOn"), " ", new Date(subscription === null || subscription === void 0 ? void 0 : subscription.current_period_end).toLocaleDateString("en-CA", {
20665
+ year: "numeric",
20666
+ month: "short",
20667
+ day: "numeric"
20668
+ })), /*#__PURE__*/React__default.createElement(Radio, {
20669
+ onChange: handleOptionSelect,
20670
+ checked: cancelationOption === "now",
20671
+ value: "now"
20672
+ }, t("labels.endImmediately")));
20664
20673
  };
20665
20674
 
20666
20675
  const SubscriptionCancelView = props => {
20676
+ var _subscriptionToCancel7, _subscriptionToCancel8;
20667
20677
  const {
20668
- subscriptionToCancel
20678
+ subscriptionToCancel,
20679
+ switchView
20669
20680
  } = usePelcro();
20670
20681
  const {
20671
20682
  t
20672
20683
  } = useTranslation("subscriptionCancel");
20684
+ const getPhases = () => {
20685
+ var _subscriptionToCancel, _subscriptionToCancel2, _subscriptionToCancel3, _subscriptionToCancel4, _subscriptionToCancel5, _subscriptionToCancel6;
20686
+ if (!subscriptionToCancel.schedule) return [];
20687
+ const currentPhaseStartDate = subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : (_subscriptionToCancel = subscriptionToCancel.schedule) === null || _subscriptionToCancel === void 0 ? void 0 : (_subscriptionToCancel2 = _subscriptionToCancel.current_phase) === null || _subscriptionToCancel2 === void 0 ? void 0 : _subscriptionToCancel2.start_date;
20688
+ const currentPhase = subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : (_subscriptionToCancel3 = subscriptionToCancel.schedule) === null || _subscriptionToCancel3 === void 0 ? void 0 : (_subscriptionToCancel4 = _subscriptionToCancel3.phases) === null || _subscriptionToCancel4 === void 0 ? void 0 : _subscriptionToCancel4.find(phase => {
20689
+ return (phase === null || phase === void 0 ? void 0 : phase.start_date) === currentPhaseStartDate;
20690
+ });
20691
+ const futurePhases = subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : (_subscriptionToCancel5 = subscriptionToCancel.schedule) === null || _subscriptionToCancel5 === void 0 ? void 0 : (_subscriptionToCancel6 = _subscriptionToCancel5.phases) === null || _subscriptionToCancel6 === void 0 ? void 0 : _subscriptionToCancel6.filter(phase => {
20692
+ return (phase === null || phase === void 0 ? void 0 : phase.start_date) > currentPhaseStartDate;
20693
+ });
20694
+ return [currentPhase, ...futurePhases];
20695
+ };
20696
+ const hasPhases = getPhases().length > 0;
20697
+ const phases = subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : (_subscriptionToCancel7 = subscriptionToCancel.schedule) === null || _subscriptionToCancel7 === void 0 ? void 0 : _subscriptionToCancel7.phases;
20698
+ const lastPhase = !phases ? [] : phases[(phases === null || phases === void 0 ? void 0 : phases.length) - 1];
20673
20699
  return /*#__PURE__*/React__default.createElement("div", {
20674
20700
  id: "pelcro-subscription-cancel-view"
20675
20701
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -20678,22 +20704,35 @@ const SubscriptionCancelView = props => {
20678
20704
  className: "plc-text-2xl plc-font-semibold"
20679
20705
  }, t("labels.title"), /*#__PURE__*/React__default.createElement("span", {
20680
20706
  className: "plc-text-gray-400 plc-text-base plc-block"
20681
- }, "(", subscriptionToCancel.plan.nickname, ")"))), /*#__PURE__*/React__default.createElement(SubscriptionCancelContainer, props, /*#__PURE__*/React__default.createElement("div", {
20707
+ }, "(", subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : (_subscriptionToCancel8 = subscriptionToCancel.plan) === null || _subscriptionToCancel8 === void 0 ? void 0 : _subscriptionToCancel8.nickname, ")"))), /*#__PURE__*/React__default.createElement(SubscriptionCancelContainer, props, /*#__PURE__*/React__default.createElement("div", {
20682
20708
  className: "plc-flex plc-flex-col plc-items-center plc-justify-center plc-mt-4"
20683
20709
  }, /*#__PURE__*/React__default.createElement(SvgSubscription, {
20684
20710
  className: "plc-w-32 plc-h-32"
20685
20711
  }), /*#__PURE__*/React__default.createElement("p", {
20686
- className: "plc-mb-3 plc-text-gray-900 plc-text-center plc-whitespace-pre-line"
20687
- }, t("messages.subscriptionEnd"), " ", new Date(subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : subscriptionToCancel.current_period_end).toLocaleDateString("en-CA", {
20712
+ className: "plc-mb-3 plc-text-gray-900 plc-text-left plc-mr-auto plc-whitespace-pre-line"
20713
+ }, t("messages.subscriptionEnd"), " ", hasPhases ? new Date(Number(`${lastPhase === null || lastPhase === void 0 ? void 0 : lastPhase.end_date}000`)).toLocaleDateString("en-CA", {
20688
20714
  year: "numeric",
20689
20715
  month: "short",
20690
20716
  day: "numeric"
20691
- }), "."), /*#__PURE__*/React__default.createElement(SubscriptionCancelReason, null), /*#__PURE__*/React__default.createElement(SubscriptionCancelNowButton, {
20692
- className: "plc-mb-2",
20693
- subscription: subscriptionToCancel
20694
- }), subscriptionToCancel.cancel_at_period_end === 0 && /*#__PURE__*/React__default.createElement(SubscriptionCancelLaterButton, {
20717
+ }) : new Date(subscriptionToCancel === null || subscriptionToCancel === void 0 ? void 0 : subscriptionToCancel.current_period_end).toLocaleDateString("en-CA", {
20718
+ year: "numeric",
20719
+ month: "short",
20720
+ day: "numeric"
20721
+ }), "."), /*#__PURE__*/React__default.createElement(SubscriptionCancelOptions, {
20722
+ subscription: subscriptionToCancel,
20723
+ hasPhases: hasPhases
20724
+ }), /*#__PURE__*/React__default.createElement(SubscriptionCancelReason, null), /*#__PURE__*/React__default.createElement("div", {
20725
+ className: "plc-space-x-0 plc-space-y-3 md:plc-space-x-3 md:plc-space-y-0 plc-w-full plc-flex plc-flex-col md:plc-flex-row plc-items-center plc-justify-center"
20726
+ }, /*#__PURE__*/React__default.createElement(SubscriptionCancelButton, {
20727
+ className: "plc-w-3/4 md:plc-w-2/5",
20695
20728
  subscription: subscriptionToCancel
20696
- }))));
20729
+ }), /*#__PURE__*/React__default.createElement(Button, {
20730
+ variant: "outline",
20731
+ className: "plc-w-3/4 md:plc-w-2/5",
20732
+ onClick: () => {
20733
+ switchView("dashboard");
20734
+ }
20735
+ }, t("labels.subCancellation.goBack"))))));
20697
20736
  };
20698
20737
 
20699
20738
  const SubscriptionCancelModal = _ref => {
package/dist/pelcro.css CHANGED
@@ -1724,6 +1724,12 @@ in order to scope selectors under pelcro-root
1724
1724
 
1725
1725
  /* utilities */
1726
1726
 
1727
+ .pelcro-root .plc-space-x-0 > :not([hidden]) ~ :not([hidden]) {
1728
+ --tw-space-x-reverse: 0;
1729
+ margin-right: calc(0px * var(--tw-space-x-reverse));
1730
+ margin-left: calc(0px * calc(1 - var(--tw-space-x-reverse)));
1731
+ }
1732
+
1727
1733
  .pelcro-root .plc-space-y-2 > :not([hidden]) ~ :not([hidden]) {
1728
1734
  --tw-space-y-reverse: 0;
1729
1735
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
@@ -1736,6 +1742,12 @@ in order to scope selectors under pelcro-root
1736
1742
  margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
1737
1743
  }
1738
1744
 
1745
+ .pelcro-root .plc-space-y-3 > :not([hidden]) ~ :not([hidden]) {
1746
+ --tw-space-y-reverse: 0;
1747
+ margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
1748
+ margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
1749
+ }
1750
+
1739
1751
  .pelcro-root .plc-space-x-3 > :not([hidden]) ~ :not([hidden]) {
1740
1752
  --tw-space-x-reverse: 0;
1741
1753
  margin-right: calc(0.75rem * var(--tw-space-x-reverse));
@@ -2320,6 +2332,10 @@ in order to scope selectors under pelcro-root
2320
2332
  margin-top: auto;
2321
2333
  }
2322
2334
 
2335
+ .pelcro-root .plc-mr-auto {
2336
+ margin-right: auto;
2337
+ }
2338
+
2323
2339
  .pelcro-root .plc-ml-auto {
2324
2340
  margin-left: auto;
2325
2341
  }
@@ -3218,6 +3234,25 @@ in order to scope selectors under pelcro-root
3218
3234
  }
3219
3235
 
3220
3236
  @media (min-width: 768px) {
3237
+ .pelcro-root .md\:plc-space-y-0 > :not([hidden]) ~ :not([hidden]) {
3238
+ --tw-space-y-reverse: 0;
3239
+ margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
3240
+ margin-bottom: calc(0px * var(--tw-space-y-reverse));
3241
+ }
3242
+
3243
+ .pelcro-root .md\:plc-space-x-3 > :not([hidden]) ~ :not([hidden]) {
3244
+ --tw-space-x-reverse: 0;
3245
+ margin-right: calc(0.75rem * var(--tw-space-x-reverse));
3246
+ margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));
3247
+ }
3248
+
3249
+ .pelcro-root .md\:plc-flex-row {
3250
+ flex-direction: row;
3251
+ }
3252
+
3253
+ .pelcro-root .md\:plc-w-2\/5 {
3254
+ width: 40%;
3255
+ }
3221
3256
  }
3222
3257
 
3223
3258
  @media (min-width: 1024px) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pelcro/react-pelcro-js",
3
3
  "description": "Pelcro's React UI Elements",
4
- "version": "3.26.1",
4
+ "version": "3.28.0",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",