@pelcro/react-pelcro-js 4.0.0-alpha.72 → 4.0.0-alpha.73

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
@@ -34728,12 +34728,12 @@ const PaymentMethodDeleteBack = ({
34728
34728
  t
34729
34729
  } = useTranslation("paymentMethod");
34730
34730
  const {
34731
- switchView
34731
+ switchDashboardView
34732
34732
  } = usePelcro();
34733
34733
  return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
34734
34734
  variant: "outline",
34735
34735
  onClick: () => {
34736
- switchView("dashboard");
34736
+ switchDashboardView("payment-cards");
34737
34737
  onClick === null || onClick === void 0 ? void 0 : onClick();
34738
34738
  },
34739
34739
  className: "plc-w-full"
@@ -36323,7 +36323,6 @@ const DashboardContent = ({
36323
36323
  const {
36324
36324
  switchView,
36325
36325
  dashboardView,
36326
- switchDashboardView,
36327
36326
  logout
36328
36327
  } = usePelcro();
36329
36328
  const {
@@ -36376,14 +36375,16 @@ const DashboardContent = ({
36376
36375
  dispatch({
36377
36376
  type: CLOSE_DASHBOARD
36378
36377
  });
36379
- };
36378
+ }; // useEffect(() => {
36380
36379
  // return () => {
36381
36380
  // document.removeEventListener("click", hideMenuIfClickedOutside);
36382
36381
  // };
36383
36382
  // }, []); // eslint-disable-line react-hooks/exhaustive-deps
36384
36383
 
36385
36384
 
36386
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Transition, {
36385
+ return /*#__PURE__*/React__default['default'].createElement("div", {
36386
+ className: "pelcro-modal-overlay"
36387
+ }, /*#__PURE__*/React__default['default'].createElement(Transition, {
36387
36388
  className: `plc-fixed plc-inset-y-0 plc-h-full lg:plc-w-3/12 plc-w-full plc-overflow-y-auto plc-text-left plc-bg-white plc-shadow-xl plc-z-max ${dashboardLayout == "left" ? "plc-left-0" : "plc-right-0"}`,
36388
36389
  show: isOpen,
36389
36390
  enter: "plc-transform plc-transition plc-duration-500",
@@ -36415,7 +36416,7 @@ const DashboardContent = ({
36415
36416
  }, userHasName && /*#__PURE__*/React__default['default'].createElement("p", {
36416
36417
  className: "plc-font-bold plc-break-all"
36417
36418
  }, user.first_name, " ", user.last_name), /*#__PURE__*/React__default['default'].createElement("p", {
36418
- className: `plc-m-0 plc-text-sm plc-break-all ${userHasName ? "plc-text-sm" : "plc-text-lg plc-font-bold plc-mt-auto"}`
36419
+ className: `plc-m-0 plc-break-all ${userHasName ? "plc-text-sm" : "plc-text-sm plc-font-bold plc-mt-auto"}`
36419
36420
  }, user.email)), /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(Button, {
36420
36421
  variant: "ghost",
36421
36422
  type: "button",
@@ -36436,10 +36437,10 @@ const DashboardContent = ({
36436
36437
  title: t("labels.logout"),
36437
36438
  setActiveDashboardLink: setActiveDashboardLink,
36438
36439
  activeDashboardLink: activeDashboardLink
36439
- }))), /*#__PURE__*/React__default['default'].createElement("div", {
36440
+ }))), dashboardView && isOpen && /*#__PURE__*/React__default['default'].createElement("div", {
36440
36441
  id: "pelcro-view-dashboard-submenus",
36441
36442
  className: `plc-fixed plc-inset-y-0 plc-h-full lg:plc-w-9/12 plc-w-full plc-bg-gray-100 plc-z-max plc-overflow-auto ${dashboardLayout == "left" ? "plc-right-0" : "plc-left-0"}`
36442
- }, dashboardView && isOpen && /*#__PURE__*/React__default['default'].createElement(DashboardViewController, null, subView !== null && subView !== void 0 && subView.length ? subView.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
36443
+ }, /*#__PURE__*/React__default['default'].createElement(DashboardViewController, null, subView !== null && subView !== void 0 && subView.length ? subView.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
36443
36444
  store: store$4,
36444
36445
  key: i
36445
36446
  })) : /*#__PURE__*/React__default['default'].cloneElement(subView, {
package/dist/index.esm.js CHANGED
@@ -34698,12 +34698,12 @@ const PaymentMethodDeleteBack = ({
34698
34698
  t
34699
34699
  } = useTranslation("paymentMethod");
34700
34700
  const {
34701
- switchView
34701
+ switchDashboardView
34702
34702
  } = usePelcro();
34703
34703
  return /*#__PURE__*/React__default.createElement(Button, Object.assign({
34704
34704
  variant: "outline",
34705
34705
  onClick: () => {
34706
- switchView("dashboard");
34706
+ switchDashboardView("payment-cards");
34707
34707
  onClick === null || onClick === void 0 ? void 0 : onClick();
34708
34708
  },
34709
34709
  className: "plc-w-full"
@@ -36293,7 +36293,6 @@ const DashboardContent = ({
36293
36293
  const {
36294
36294
  switchView,
36295
36295
  dashboardView,
36296
- switchDashboardView,
36297
36296
  logout
36298
36297
  } = usePelcro();
36299
36298
  const {
@@ -36346,14 +36345,16 @@ const DashboardContent = ({
36346
36345
  dispatch({
36347
36346
  type: CLOSE_DASHBOARD
36348
36347
  });
36349
- };
36348
+ }; // useEffect(() => {
36350
36349
  // return () => {
36351
36350
  // document.removeEventListener("click", hideMenuIfClickedOutside);
36352
36351
  // };
36353
36352
  // }, []); // eslint-disable-line react-hooks/exhaustive-deps
36354
36353
 
36355
36354
 
36356
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Transition, {
36355
+ return /*#__PURE__*/React__default.createElement("div", {
36356
+ className: "pelcro-modal-overlay"
36357
+ }, /*#__PURE__*/React__default.createElement(Transition, {
36357
36358
  className: `plc-fixed plc-inset-y-0 plc-h-full lg:plc-w-3/12 plc-w-full plc-overflow-y-auto plc-text-left plc-bg-white plc-shadow-xl plc-z-max ${dashboardLayout == "left" ? "plc-left-0" : "plc-right-0"}`,
36358
36359
  show: isOpen,
36359
36360
  enter: "plc-transform plc-transition plc-duration-500",
@@ -36385,7 +36386,7 @@ const DashboardContent = ({
36385
36386
  }, userHasName && /*#__PURE__*/React__default.createElement("p", {
36386
36387
  className: "plc-font-bold plc-break-all"
36387
36388
  }, user.first_name, " ", user.last_name), /*#__PURE__*/React__default.createElement("p", {
36388
- className: `plc-m-0 plc-text-sm plc-break-all ${userHasName ? "plc-text-sm" : "plc-text-lg plc-font-bold plc-mt-auto"}`
36389
+ className: `plc-m-0 plc-break-all ${userHasName ? "plc-text-sm" : "plc-text-sm plc-font-bold plc-mt-auto"}`
36389
36390
  }, user.email)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Button, {
36390
36391
  variant: "ghost",
36391
36392
  type: "button",
@@ -36406,10 +36407,10 @@ const DashboardContent = ({
36406
36407
  title: t("labels.logout"),
36407
36408
  setActiveDashboardLink: setActiveDashboardLink,
36408
36409
  activeDashboardLink: activeDashboardLink
36409
- }))), /*#__PURE__*/React__default.createElement("div", {
36410
+ }))), dashboardView && isOpen && /*#__PURE__*/React__default.createElement("div", {
36410
36411
  id: "pelcro-view-dashboard-submenus",
36411
36412
  className: `plc-fixed plc-inset-y-0 plc-h-full lg:plc-w-9/12 plc-w-full plc-bg-gray-100 plc-z-max plc-overflow-auto ${dashboardLayout == "left" ? "plc-right-0" : "plc-left-0"}`
36412
- }, dashboardView && isOpen && /*#__PURE__*/React__default.createElement(DashboardViewController, null, subView !== null && subView !== void 0 && subView.length ? subView.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
36413
+ }, /*#__PURE__*/React__default.createElement(DashboardViewController, null, subView !== null && subView !== void 0 && subView.length ? subView.map((child, i) => /*#__PURE__*/React__default.cloneElement(child, {
36413
36414
  store: store$4,
36414
36415
  key: i
36415
36416
  })) : /*#__PURE__*/React__default.cloneElement(subView, {
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": "4.0.0-alpha.72",
4
+ "version": "4.0.0-alpha.73",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "main": "dist/index.cjs.js",