@nuskin/nextgen-header 1.33.0 → 1.34.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.
@@ -100971,23 +100971,23 @@ var MobileDrawerLocaleButton = /*#__PURE__*/createStyled("button", true ? {
100971
100971
  } : 0)("display:inline-flex;align-items:center;gap:0.5rem;margin:15px 18px;padding:7px;border:1px solid ", colors.border, ";border-radius:24px;background:transparent;font-size:0.875rem;color:", colors.text, ";cursor:pointer;justify-content:center;transition:all 0.15s ease;&:hover{background:rgba(0, 0, 0, 0.03);border-color:", colors.text, ";}svg{flex-shrink:0;color:", colors.muted, ";width:16px;height:16px;}" + ( true ? "" : 0));
100972
100972
  // EXTERNAL MODULE: ./node_modules/@nuskin/foundation-ui-components/dist/index.js
100973
100973
  var dist = __webpack_require__(4814);
100974
- ;// ./src/components/brand/Brand.styled.jsx
100974
+ ;// ./src/components/brand/Brand.styled.js
100975
100975
 
100976
100976
  function Brand_styled_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
100977
100977
  var BrandRoot = /*#__PURE__*/createStyled("div", true ? {
100978
- target: "eum1fxs3"
100978
+ target: "e1tne4ou3"
100979
100979
  } : 0)("display:flex;position:relative;", function (_ref) {
100980
100980
  var isEditing = _ref.isEditing;
100981
100981
  return isEditing && "\n & > * {\n pointer-events: none;\n }\n ";
100982
100982
  }, ";" + ( true ? "" : 0));
100983
100983
  var BrandLogoLink = /*#__PURE__*/createStyled("a", true ? {
100984
- target: "eum1fxs2"
100984
+ target: "e1tne4ou2"
100985
100985
  } : 0)( true ? {
100986
100986
  name: "1puv40q",
100987
100987
  styles: "display:inline-flex;align-items:center;line-height:0;text-decoration:none"
100988
100988
  } : 0);
100989
100989
  var ResponsiveBrandWrapper = /*#__PURE__*/createStyled("div", true ? {
100990
- target: "eum1fxs1"
100990
+ target: "e1tne4ou1"
100991
100991
  } : 0)("display:flex;align-items:center;", function (_ref2) {
100992
100992
  var mobileWidth = _ref2.mobileWidth,
100993
100993
  desktopWidth = _ref2.desktopWidth,
@@ -100996,7 +100996,7 @@ var ResponsiveBrandWrapper = /*#__PURE__*/createStyled("div", true ? {
100996
100996
  return "\n width: ".concat(mobileWidth, ";\n height: ").concat(mobileHeight, ";\n\n & > * {\n width: 100%;\n height: 100%;\n }\n\n && img,\n && svg {\n height: 100%;\n width: 100%;\n max-height: 100%;\n max-width: 100%;\n object-fit: contain;\n }\n\n @media (min-width: 1024px) {\n width: ").concat(desktopWidth, ";\n height: ").concat(desktopHeight, ";\n }\n ");
100997
100997
  }, ";" + ( true ? "" : 0));
100998
100998
  var BrandLogoImg = /*#__PURE__*/createStyled("img", true ? {
100999
- target: "eum1fxs0"
100999
+ target: "e1tne4ou0"
101000
101000
  } : 0)( true ? {
101001
101001
  name: "kmohbm",
101002
101002
  styles: "display:block;width:auto;height:24px"
@@ -103646,10 +103646,10 @@ HeaderAccountRegion.propTypes = {
103646
103646
  sign_in_url: (external_prop_types_default()).object
103647
103647
  })
103648
103648
  };
103649
- ;// ./src/components/cart/Cart.styled.jsx
103649
+ ;// ./src/components/cart/Cart.styled.js
103650
103650
 
103651
103651
  var CartIconWrapper = /*#__PURE__*/createStyled("div", true ? {
103652
- target: "ein8udj0"
103652
+ target: "e1157io20"
103653
103653
  } : 0)("display:flex;align-items:center;position:relative;background:none;border:none;padding:0;font:inherit;", function (_ref) {
103654
103654
  var isEditing = _ref.isEditing;
103655
103655
  return isEditing && "\n & > * {\n pointer-events: none;\n }\n ";
@@ -103662,6 +103662,7 @@ var DEFAULT_ITEM_COUNT = 0;
103662
103662
  var DEFAULT_ARIA_LABEL = "Shopping cart";
103663
103663
  var DEFAULT_SHOW_CART_ICON = true;
103664
103664
  var DEFAULT_SHOW_CART_COUNT = true;
103665
+ var MOBILE_BREAKPOINT = 768;
103665
103666
  // EXTERNAL MODULE: ./node_modules/pubsub-js/src/pubsub.js
103666
103667
  var pubsub = __webpack_require__(3224);
103667
103668
  var pubsub_default = /*#__PURE__*/__webpack_require__.n(pubsub);
@@ -103708,7 +103709,9 @@ var PUBSUB = {
103708
103709
  // [RESERVED] For future auth/logout flows
103709
103710
  SIGN_OUT: 'SignOut',
103710
103711
  // [RESERVED] For cross-MFE navigation
103711
- INTERNAL_ROUTING: 'InternalRouting'
103712
+ INTERNAL_ROUTING: 'InternalRouting',
103713
+ // [ACTIVE] Header MFE publishes when cart clicked from checkout page
103714
+ NAVIGATE_TO_VIEW_CART: 'NavigateToViewCart'
103712
103715
  };
103713
103716
  ;// ./src/components/cart/Cart.jsx
103714
103717
  function Cart_typeof(o) { "@babel/helpers - typeof"; return Cart_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, Cart_typeof(o); }
@@ -103760,6 +103763,27 @@ function Cart(_ref) {
103760
103763
  if (editing) {
103761
103764
  return;
103762
103765
  }
103766
+ if (typeof window !== 'undefined') {
103767
+ var pathname = window.location.pathname;
103768
+ var isMobile = window.innerWidth < MOBILE_BREAKPOINT;
103769
+ var isViewCartPage = pathname.includes('/viewCart');
103770
+ var isCheckoutPage = pathname.includes('/checkout') || pathname.includes('/expressCheckout') || pathname.includes('/subscriptionCheckout');
103771
+ if (isViewCartPage) {
103772
+ return;
103773
+ }
103774
+ if (isMobile) {
103775
+ publish(PUBSUB.NAVIGATE_TO_VIEW_CART, {
103776
+ fromMobile: true
103777
+ });
103778
+ return;
103779
+ }
103780
+ if (isCheckoutPage) {
103781
+ publish(PUBSUB.NAVIGATE_TO_VIEW_CART, {
103782
+ fromCheckout: true
103783
+ });
103784
+ return;
103785
+ }
103786
+ }
103763
103787
  publish(PUBSUB.TOGGLE_MINI_CART, {
103764
103788
  isVisible: true
103765
103789
  });
@@ -106682,7 +106706,7 @@ CancelButton.propTypes = {
106682
106706
  showIcon: (external_prop_types_default()).bool,
106683
106707
  parent$: (external_prop_types_default()).object
106684
106708
  };
106685
- ;// ./src/components/modal/SearchModal.styled.jsx
106709
+ ;// ./src/components/modal/SearchModal.styled.js
106686
106710
 
106687
106711
  function SearchModal_styled_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
106688
106712
  var SearchModal_styled_colors = {
@@ -106692,61 +106716,61 @@ var SearchModal_styled_colors = {
106692
106716
  muted: "#6b7280"
106693
106717
  };
106694
106718
  var MobileSearchButton = /*#__PURE__*/createStyled("button", true ? {
106695
- target: "etuykaq13"
106719
+ target: "ehota0013"
106696
106720
  } : 0)( true ? {
106697
106721
  name: "1ff2nft",
106698
106722
  styles: "display:flex;align-items:center;justify-content:center;width:28px;height:28px;background:none;border:none;padding:0;cursor:pointer;color:inherit;svg{width:24px;height:24px;}@media (min-width: 1024px){display:none;}"
106699
106723
  } : 0);
106700
106724
  var DesktopSearchWrapper = /*#__PURE__*/createStyled("button", true ? {
106701
- target: "etuykaq12"
106725
+ target: "ehota0012"
106702
106726
  } : 0)("display:none;align-items:center;width:100%;border:1px solid ", SearchModal_styled_colors.border, ";border-radius:999px;background:", SearchModal_styled_colors.surface, ";min-height:46px;margin-left:auto;padding:0 5px 0 3px;box-sizing:border-box;overflow:hidden;&:focus{outline:none;}&:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:999px;}@media (min-width: 1024px){display:flex;width:", function (_ref) {
106703
106727
  var $sizeVariant = _ref.$sizeVariant;
106704
106728
  return $sizeVariant === "full" ? "100%" : "min(100%, 320px)";
106705
106729
  }, ";cursor:pointer;transition:background-color 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease;min-height:32px;&:hover{background:#f3f4f6;}&:hover>[data-testid=\"search-trigger-input\"]{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;}&:focus-visible{border-color:", SearchModal_styled_colors.muted, ";box-shadow:0 0 0 1px rgba(17, 24, 39, 0.08);}}" + ( true ? "" : 0));
106706
106730
  var DesktopTriggerInput = /*#__PURE__*/createStyled("span", true ? {
106707
- target: "etuykaq11"
106731
+ target: "ehota0011"
106708
106732
  } : 0)("flex:1;min-width:0;padding:8px 0;font-size:16px;line-height:22px;color:", SearchModal_styled_colors.muted, ";cursor:pointer;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" + ( true ? "" : 0));
106709
106733
  var DesktopTriggerSparkleSlot = /*#__PURE__*/createStyled("span", true ? {
106710
- target: "etuykaq10"
106734
+ target: "ehota0010"
106711
106735
  } : 0)( true ? {
106712
106736
  name: "q79a68",
106713
106737
  styles: "flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin:0 8px 0 4px;svg,img{width:18px;height:26px;object-fit:contain;display:block;}"
106714
106738
  } : 0);
106715
106739
  var DesktopTriggerIconButton = /*#__PURE__*/createStyled("span", true ? {
106716
- target: "etuykaq9"
106740
+ target: "ehota009"
106717
106741
  } : 0)( true ? {
106718
106742
  name: "1oufgfl",
106719
106743
  styles: "flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin:0 5px 0 16px;padding:0;color:#64686f;svg,img{width:22px;height:22px;object-fit:contain;}"
106720
106744
  } : 0);
106721
106745
  var ModalOverlay = /*#__PURE__*/createStyled("div", true ? {
106722
- target: "etuykaq8"
106746
+ target: "ehota008"
106723
106747
  } : 0)( true ? {
106724
106748
  name: "15ant65",
106725
106749
  styles: "position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;align-items:stretch;overflow:hidden"
106726
106750
  } : 0);
106727
106751
  var ModalPanel = /*#__PURE__*/createStyled("dialog", true ? {
106728
- target: "etuykaq7"
106752
+ target: "ehota007"
106729
106753
  } : 0)("box-sizing:border-box;background:", SearchModal_styled_colors.surface, ";width:100%;flex:1;min-height:100%;padding:12px 16px;display:flex;flex-direction:column;gap:30px;box-shadow:0 4px 24px rgba(0, 0, 0, 0.08);border:none;margin:0;max-width:none;max-height:none;@media (max-width: 767px){padding:30px 0;}@media (min-width: 768px) and (max-width: 1023px){padding:30px 0 35px;}@media (min-width: 1024px){flex:0 0 auto;min-height:unset;padding:20px clamp(12px, 4vw, 32px) 45px;}" + ( true ? "" : 0));
106730
106754
  var ModalTopBar = /*#__PURE__*/createStyled("div", true ? {
106731
- target: "etuykaq6"
106755
+ target: "ehota006"
106732
106756
  } : 0)( true ? {
106733
106757
  name: "19ii5hn",
106734
106758
  styles: "display:none;align-items:center;justify-content:space-between;width:100%;@media (min-width: 1024px){display:flex;}"
106735
106759
  } : 0);
106736
106760
  var SearchModal_styled_LogoSlot = /*#__PURE__*/createStyled("div", true ? {
106737
- target: "etuykaq5"
106761
+ target: "ehota005"
106738
106762
  } : 0)( true ? {
106739
106763
  name: "ou8xsw",
106740
106764
  styles: "flex:0 0 auto"
106741
106765
  } : 0);
106742
106766
  var SearchRow = /*#__PURE__*/createStyled("div", true ? {
106743
- target: "etuykaq4"
106767
+ target: "ehota004"
106744
106768
  } : 0)( true ? {
106745
106769
  name: "vg66lk",
106746
106770
  styles: "display:flex;align-items:flex-start;gap:12px;width:100%;@media (max-width: 1023px){align-items:center;}"
106747
106771
  } : 0);
106748
106772
  var MobileCancelSlot = /*#__PURE__*/createStyled("div", true ? {
106749
- target: "etuykaq3"
106773
+ target: "ehota003"
106750
106774
  } : 0)( true ? {
106751
106775
  name: "kob85u",
106752
106776
  styles: "flex-shrink:0;display:flex;align-items:center;@media (min-width: 1024px){display:none;}"
@@ -106754,19 +106778,19 @@ var MobileCancelSlot = /*#__PURE__*/createStyled("div", true ? {
106754
106778
 
106755
106779
  /** Wraps the fallback search form so Cancel stays on the same row as the input (mobile). */
106756
106780
  var SearchFormGrow = /*#__PURE__*/createStyled("div", true ? {
106757
- target: "etuykaq2"
106781
+ target: "ehota002"
106758
106782
  } : 0)( true ? {
106759
106783
  name: "fxp7t8",
106760
106784
  styles: "flex:1;min-width:0"
106761
106785
  } : 0);
106762
106786
  var AutoCompleteWrapper = /*#__PURE__*/createStyled("div", true ? {
106763
- target: "etuykaq1"
106787
+ target: "ehota001"
106764
106788
  } : 0)( true ? {
106765
106789
  name: "1g4wbcn",
106766
106790
  styles: "width:100%;min-width:0;@media (min-width: 1024px){max-width:860px;margin:0 auto;}ul li span{white-space:normal;word-break:break-word;overflow-wrap:anywhere;min-width:0;}form:hover input::placeholder,form:hover [data-testid=\"autocomplete-rotating-placeholder\"]{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;}form:focus-within input,form:focus-within input::placeholder{text-decoration:none;}form:focus-within [data-testid=\"autocomplete-rotating-placeholder\"]{text-decoration:none;}"
106767
106791
  } : 0);
106768
106792
  var SearchForm = /*#__PURE__*/createStyled("form", true ? {
106769
- target: "etuykaq0"
106793
+ target: "ehota000"
106770
106794
  } : 0)( true ? {
106771
106795
  name: "1lnhxsx",
106772
106796
  styles: "box-sizing:border-box;width:100%;min-width:0;@media (min-width: 1024px){max-width:860px;margin:0 auto;}& div:focus-within [data-placeholder=\"true\"],& div:focus-within input{text-decoration:none;}& div:hover [data-placeholder=\"true\"],& div:hover input{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;}"