@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.
@@ -100556,23 +100556,23 @@ var MobileDrawerLocaleButton = /*#__PURE__*/createStyled("button", true ? {
100556
100556
  } : 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));
100557
100557
  // EXTERNAL MODULE: ./node_modules/@nuskin/foundation-ui-components/dist/index.js
100558
100558
  var dist = __webpack_require__(4814);
100559
- ;// ./src/components/brand/Brand.styled.jsx
100559
+ ;// ./src/components/brand/Brand.styled.js
100560
100560
 
100561
100561
  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)."; }
100562
100562
  var BrandRoot = /*#__PURE__*/createStyled("div", true ? {
100563
- target: "eum1fxs3"
100563
+ target: "e1tne4ou3"
100564
100564
  } : 0)("display:flex;position:relative;", function (_ref) {
100565
100565
  var isEditing = _ref.isEditing;
100566
100566
  return isEditing && "\n & > * {\n pointer-events: none;\n }\n ";
100567
100567
  }, ";" + ( true ? "" : 0));
100568
100568
  var BrandLogoLink = /*#__PURE__*/createStyled("a", true ? {
100569
- target: "eum1fxs2"
100569
+ target: "e1tne4ou2"
100570
100570
  } : 0)( true ? {
100571
100571
  name: "1puv40q",
100572
100572
  styles: "display:inline-flex;align-items:center;line-height:0;text-decoration:none"
100573
100573
  } : 0);
100574
100574
  var ResponsiveBrandWrapper = /*#__PURE__*/createStyled("div", true ? {
100575
- target: "eum1fxs1"
100575
+ target: "e1tne4ou1"
100576
100576
  } : 0)("display:flex;align-items:center;", function (_ref2) {
100577
100577
  var mobileWidth = _ref2.mobileWidth,
100578
100578
  desktopWidth = _ref2.desktopWidth,
@@ -100581,7 +100581,7 @@ var ResponsiveBrandWrapper = /*#__PURE__*/createStyled("div", true ? {
100581
100581
  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 ");
100582
100582
  }, ";" + ( true ? "" : 0));
100583
100583
  var BrandLogoImg = /*#__PURE__*/createStyled("img", true ? {
100584
- target: "eum1fxs0"
100584
+ target: "e1tne4ou0"
100585
100585
  } : 0)( true ? {
100586
100586
  name: "kmohbm",
100587
100587
  styles: "display:block;width:auto;height:24px"
@@ -103229,10 +103229,10 @@ HeaderAccountRegion.propTypes = {
103229
103229
  sign_in_url: external_prop_types_["default"].object
103230
103230
  })
103231
103231
  };
103232
- ;// ./src/components/cart/Cart.styled.jsx
103232
+ ;// ./src/components/cart/Cart.styled.js
103233
103233
 
103234
103234
  var CartIconWrapper = /*#__PURE__*/createStyled("div", true ? {
103235
- target: "ein8udj0"
103235
+ target: "e1157io20"
103236
103236
  } : 0)("display:flex;align-items:center;position:relative;background:none;border:none;padding:0;font:inherit;", function (_ref) {
103237
103237
  var isEditing = _ref.isEditing;
103238
103238
  return isEditing && "\n & > * {\n pointer-events: none;\n }\n ";
@@ -103245,6 +103245,7 @@ var DEFAULT_ITEM_COUNT = 0;
103245
103245
  var DEFAULT_ARIA_LABEL = "Shopping cart";
103246
103246
  var DEFAULT_SHOW_CART_ICON = true;
103247
103247
  var DEFAULT_SHOW_CART_COUNT = true;
103248
+ var MOBILE_BREAKPOINT = 768;
103248
103249
  // EXTERNAL MODULE: ./node_modules/pubsub-js/src/pubsub.js
103249
103250
  var pubsub = __webpack_require__(3224);
103250
103251
  var pubsub_default = /*#__PURE__*/__webpack_require__.n(pubsub);
@@ -103291,7 +103292,9 @@ var PUBSUB = {
103291
103292
  // [RESERVED] For future auth/logout flows
103292
103293
  SIGN_OUT: 'SignOut',
103293
103294
  // [RESERVED] For cross-MFE navigation
103294
- INTERNAL_ROUTING: 'InternalRouting'
103295
+ INTERNAL_ROUTING: 'InternalRouting',
103296
+ // [ACTIVE] Header MFE publishes when cart clicked from checkout page
103297
+ NAVIGATE_TO_VIEW_CART: 'NavigateToViewCart'
103295
103298
  };
103296
103299
  ;// ./src/components/cart/Cart.jsx
103297
103300
  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); }
@@ -103343,6 +103346,27 @@ function Cart(_ref) {
103343
103346
  if (editing) {
103344
103347
  return;
103345
103348
  }
103349
+ if (typeof window !== 'undefined') {
103350
+ var pathname = window.location.pathname;
103351
+ var isMobile = window.innerWidth < MOBILE_BREAKPOINT;
103352
+ var isViewCartPage = pathname.includes('/viewCart');
103353
+ var isCheckoutPage = pathname.includes('/checkout') || pathname.includes('/expressCheckout') || pathname.includes('/subscriptionCheckout');
103354
+ if (isViewCartPage) {
103355
+ return;
103356
+ }
103357
+ if (isMobile) {
103358
+ publish(PUBSUB.NAVIGATE_TO_VIEW_CART, {
103359
+ fromMobile: true
103360
+ });
103361
+ return;
103362
+ }
103363
+ if (isCheckoutPage) {
103364
+ publish(PUBSUB.NAVIGATE_TO_VIEW_CART, {
103365
+ fromCheckout: true
103366
+ });
103367
+ return;
103368
+ }
103369
+ }
103346
103370
  publish(PUBSUB.TOGGLE_MINI_CART, {
103347
103371
  isVisible: true
103348
103372
  });
@@ -106265,7 +106289,7 @@ CancelButton.propTypes = {
106265
106289
  showIcon: external_prop_types_["default"].bool,
106266
106290
  parent$: external_prop_types_["default"].object
106267
106291
  };
106268
- ;// ./src/components/modal/SearchModal.styled.jsx
106292
+ ;// ./src/components/modal/SearchModal.styled.js
106269
106293
 
106270
106294
  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)."; }
106271
106295
  var SearchModal_styled_colors = {
@@ -106275,61 +106299,61 @@ var SearchModal_styled_colors = {
106275
106299
  muted: "#6b7280"
106276
106300
  };
106277
106301
  var MobileSearchButton = /*#__PURE__*/createStyled("button", true ? {
106278
- target: "etuykaq13"
106302
+ target: "ehota0013"
106279
106303
  } : 0)( true ? {
106280
106304
  name: "1ff2nft",
106281
106305
  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;}"
106282
106306
  } : 0);
106283
106307
  var DesktopSearchWrapper = /*#__PURE__*/createStyled("button", true ? {
106284
- target: "etuykaq12"
106308
+ target: "ehota0012"
106285
106309
  } : 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) {
106286
106310
  var $sizeVariant = _ref.$sizeVariant;
106287
106311
  return $sizeVariant === "full" ? "100%" : "min(100%, 320px)";
106288
106312
  }, ";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));
106289
106313
  var DesktopTriggerInput = /*#__PURE__*/createStyled("span", true ? {
106290
- target: "etuykaq11"
106314
+ target: "ehota0011"
106291
106315
  } : 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));
106292
106316
  var DesktopTriggerSparkleSlot = /*#__PURE__*/createStyled("span", true ? {
106293
- target: "etuykaq10"
106317
+ target: "ehota0010"
106294
106318
  } : 0)( true ? {
106295
106319
  name: "q79a68",
106296
106320
  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;}"
106297
106321
  } : 0);
106298
106322
  var DesktopTriggerIconButton = /*#__PURE__*/createStyled("span", true ? {
106299
- target: "etuykaq9"
106323
+ target: "ehota009"
106300
106324
  } : 0)( true ? {
106301
106325
  name: "1oufgfl",
106302
106326
  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;}"
106303
106327
  } : 0);
106304
106328
  var ModalOverlay = /*#__PURE__*/createStyled("div", true ? {
106305
- target: "etuykaq8"
106329
+ target: "ehota008"
106306
106330
  } : 0)( true ? {
106307
106331
  name: "15ant65",
106308
106332
  styles: "position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;align-items:stretch;overflow:hidden"
106309
106333
  } : 0);
106310
106334
  var ModalPanel = /*#__PURE__*/createStyled("dialog", true ? {
106311
- target: "etuykaq7"
106335
+ target: "ehota007"
106312
106336
  } : 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));
106313
106337
  var ModalTopBar = /*#__PURE__*/createStyled("div", true ? {
106314
- target: "etuykaq6"
106338
+ target: "ehota006"
106315
106339
  } : 0)( true ? {
106316
106340
  name: "19ii5hn",
106317
106341
  styles: "display:none;align-items:center;justify-content:space-between;width:100%;@media (min-width: 1024px){display:flex;}"
106318
106342
  } : 0);
106319
106343
  var SearchModal_styled_LogoSlot = /*#__PURE__*/createStyled("div", true ? {
106320
- target: "etuykaq5"
106344
+ target: "ehota005"
106321
106345
  } : 0)( true ? {
106322
106346
  name: "ou8xsw",
106323
106347
  styles: "flex:0 0 auto"
106324
106348
  } : 0);
106325
106349
  var SearchRow = /*#__PURE__*/createStyled("div", true ? {
106326
- target: "etuykaq4"
106350
+ target: "ehota004"
106327
106351
  } : 0)( true ? {
106328
106352
  name: "vg66lk",
106329
106353
  styles: "display:flex;align-items:flex-start;gap:12px;width:100%;@media (max-width: 1023px){align-items:center;}"
106330
106354
  } : 0);
106331
106355
  var MobileCancelSlot = /*#__PURE__*/createStyled("div", true ? {
106332
- target: "etuykaq3"
106356
+ target: "ehota003"
106333
106357
  } : 0)( true ? {
106334
106358
  name: "kob85u",
106335
106359
  styles: "flex-shrink:0;display:flex;align-items:center;@media (min-width: 1024px){display:none;}"
@@ -106337,19 +106361,19 @@ var MobileCancelSlot = /*#__PURE__*/createStyled("div", true ? {
106337
106361
 
106338
106362
  /** Wraps the fallback search form so Cancel stays on the same row as the input (mobile). */
106339
106363
  var SearchFormGrow = /*#__PURE__*/createStyled("div", true ? {
106340
- target: "etuykaq2"
106364
+ target: "ehota002"
106341
106365
  } : 0)( true ? {
106342
106366
  name: "fxp7t8",
106343
106367
  styles: "flex:1;min-width:0"
106344
106368
  } : 0);
106345
106369
  var AutoCompleteWrapper = /*#__PURE__*/createStyled("div", true ? {
106346
- target: "etuykaq1"
106370
+ target: "ehota001"
106347
106371
  } : 0)( true ? {
106348
106372
  name: "1g4wbcn",
106349
106373
  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;}"
106350
106374
  } : 0);
106351
106375
  var SearchForm = /*#__PURE__*/createStyled("form", true ? {
106352
- target: "etuykaq0"
106376
+ target: "ehota000"
106353
106377
  } : 0)( true ? {
106354
106378
  name: "1lnhxsx",
106355
106379
  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;}"