@sps-woodland/product-bar 8.52.0 → 8.52.2

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/lib/index.js CHANGED
@@ -1208,7 +1208,7 @@ var Kr = (e, t, r) => {
1208
1208
  for (var [g, v] of e.compoundVariants)
1209
1209
  Kr(g, o, e.defaultVariants) && (r += " " + v);
1210
1210
  return r;
1211
- }, zr = "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg110", Vr = we({ defaultClassName: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg111", variantClassNames: { fullWidth: { true: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg112", false: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg113" } }, defaultVariants: { fullWidth: !1 }, compoundVariants: [] }), Wr = we({ defaultClassName: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg114", variantClassNames: { hideNameText: { true: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg115", false: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg116" } }, defaultVariants: { hideNameText: !1 }, compoundVariants: [] }), Hr = "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg117", Ur = "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg118", jr = "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg119", Gr = "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11a", Lt = we({ defaultClassName: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11b", variantClassNames: { active: { true: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11c", false: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11d" }, disabled: { true: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11e", false: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11f" } }, defaultVariants: { active: !1, disabled: !1 }, compoundVariants: [] }), Yr = "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11g", Xr = we({ defaultClassName: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11h", variantClassNames: { priorityPlus: { true: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11i", false: "pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11j" } }, defaultVariants: { priorityPlus: !1 }, compoundVariants: [] });
1211
+ }, zr = "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg110", Vr = we({ defaultClassName: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg111", variantClassNames: { fullWidth: { true: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg112", false: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg113" } }, defaultVariants: { fullWidth: !1 }, compoundVariants: [] }), Wr = we({ defaultClassName: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg114", variantClassNames: { hideNameText: { true: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg115", false: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg116" } }, defaultVariants: { hideNameText: !1 }, compoundVariants: [] }), Hr = "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg117", Ur = "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg118", jr = "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg119", Gr = "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11a", Lt = we({ defaultClassName: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11b", variantClassNames: { active: { true: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11c", false: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11d" }, disabled: { true: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11e", false: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11f" } }, defaultVariants: { active: !1, disabled: !1 }, compoundVariants: [] }), Yr = "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11g", Xr = we({ defaultClassName: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11h", variantClassNames: { priorityPlus: { true: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11i", false: "pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11j" } }, defaultVariants: { priorityPlus: !1 }, compoundVariants: [] });
1212
1212
  function je(e) {
1213
1213
  const t = p.useRef(null), { linkProps: r } = Dr(e, t), { active: o, priority: s, ...i } = e, c = {
1214
1214
  ...i,
@@ -1253,7 +1253,7 @@ _e.set(Ge, {
1253
1253
  hideNameText: { type: "boolean", default: "false" }
1254
1254
  }
1255
1255
  });
1256
- var qr = "pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas0", Jr = "pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas1", Qr = "pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas2", Ne = "pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas3", Ie = "pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas4";
1256
+ var qr = "pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas0", Jr = "pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas1", Qr = "pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas2", Ne = "pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas3", Ie = "pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas4";
1257
1257
  function Zr({
1258
1258
  items: e,
1259
1259
  wrapperRef: t
@@ -1515,7 +1515,7 @@ _e.set(Ct, {
1515
1515
  enablePriorityPlus: { type: "boolean", default: "true" }
1516
1516
  }
1517
1517
  });
1518
- var nn = "pkg_sps-woodland_product-bar__version_8_52_0__hash_r7f8id0", on = "pkg_sps-woodland_product-bar__version_8_52_0__hash_r7f8id1";
1518
+ var nn = "pkg_sps-woodland_product-bar__version_8_52_2__hash_r7f8id0", on = "pkg_sps-woodland_product-bar__version_8_52_2__hash_r7f8id1";
1519
1519
  function xt({
1520
1520
  channelId: e,
1521
1521
  className: t,
package/lib/index.umd.cjs CHANGED
@@ -4,7 +4,7 @@
4
4
  touch-action: pan-x pan-y pinch-zoom;
5
5
  }
6
6
  }
7
- `.trim(),n.head.prepend(u)},[K]),v.useEffect(()=>{let n=I.current;return()=>{var u;P||Ne((u=n.target)!==null&&u!==void 0?u:void 0);for(let a of n.disposables)a();n.disposables=[]}},[P]),{isPressed:f||j,pressProps:se(R,te,{[ft]:!0})}}function Ie(e){return e.tagName==="A"&&e.hasAttribute("href")}function Ae(e,t){const{key:r,code:o}=e,s=t,i=s.getAttribute("role");return(r==="Enter"||r===" "||r==="Spacebar"||o==="Space")&&!(s instanceof H(s).HTMLInputElement&&!gt(s,r)||s instanceof H(s).HTMLTextAreaElement||s.isContentEditable)&&!((i==="link"||!i&&Ie(s))&&r!=="Enter")}function fr(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function pt(e,t){const r=e.changedTouches;for(let o=0;o<r.length;o++){const s=r[o];if(s.identifier===t)return s}return null}function q(e,t){let r=0,o=0;return t.targetTouches&&t.targetTouches.length===1&&(r=t.targetTouches[0].clientX,o=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:o}}function Z(e,t){let r=t.clientX,o=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:o,key:t.key}}function pr(e){let t=0,r=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?r=e.height/2:e.radiusY!==void 0&&(r=e.radiusY),{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function br(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function bt(e,t){let r=t.getBoundingClientRect(),o=pr(e);return br(r,o)}function vr(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Ie(e)}function vt(e,t){return e instanceof HTMLInputElement?!gt(e,t):vr(e)}const gr=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function gt(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":gr.has(e.type)}let de=null;const mr=new Set;let fe=new Map,ee=!1,De=!1;function Fe(e,t){for(let r of mr)r(e,t)}function hr(e){return!(e.metaKey||!ce()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Pe(e){ee=!0,!Q.isOpening&&hr(e)&&(de="keyboard",Fe("keyboard",e))}function F(e){de="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(ee=!0,Fe("pointer",e))}function mt(e){!Q.isOpening&&Oe(e)&&(ee=!0,de="virtual")}function ht(e){h(e)===window||h(e)===document||ge||!e.isTrusted||(!ee&&!De&&(de="virtual",Fe("virtual",e)),ee=!1,De=!1)}function yt(){ge||(ee=!1,De=!0)}function Pt(e){if(typeof window>"u"||typeof document>"u"||fe.get(H(e)))return;const t=H(e),r=S(e);let o=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ee=!0,o.apply(this,arguments)},r.addEventListener("keydown",Pe,!0),r.addEventListener("keyup",Pe,!0),r.addEventListener("click",mt,!0),t.addEventListener("focus",ht,!0),t.addEventListener("blur",yt,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",F,!0),r.addEventListener("pointermove",F,!0),r.addEventListener("pointerup",F,!0)):process.env.NODE_ENV==="test"&&(r.addEventListener("mousedown",F,!0),r.addEventListener("mousemove",F,!0),r.addEventListener("mouseup",F,!0)),t.addEventListener("beforeunload",()=>{$t(e)},{once:!0}),fe.set(t,{focus:o})}const $t=(e,t)=>{const r=H(e),o=S(e);t&&o.removeEventListener("DOMContentLoaded",t),fe.has(r)&&(r.HTMLElement.prototype.focus=fe.get(r).focus,o.removeEventListener("keydown",Pe,!0),o.removeEventListener("keyup",Pe,!0),o.removeEventListener("click",mt,!0),r.removeEventListener("focus",ht,!0),r.removeEventListener("blur",yt,!1),typeof PointerEvent<"u"?(o.removeEventListener("pointerdown",F,!0),o.removeEventListener("pointermove",F,!0),o.removeEventListener("pointerup",F,!0)):process.env.NODE_ENV==="test"&&(o.removeEventListener("mousedown",F,!0),o.removeEventListener("mousemove",F,!0),o.removeEventListener("mouseup",F,!0)),fe.delete(r))};function yr(e){const t=S(e);let r;return t.readyState!=="loading"?Pt(e):(r=()=>{Pt(e)},t.addEventListener("DOMContentLoaded",r)),()=>$t(e,r)}typeof document<"u"&&yr();function Pr(){return de}function $r(e){if(!e.isConnected)return;const t=S(e);if(Pr()==="virtual"){let r=ae(t);et(()=>{const o=ae(t);(o===r||o===t.body)&&e.isConnected&&ie(e)})}else ie(e)}function Tr(e){let{isDisabled:t,onFocus:r,onBlur:o,onFocusChange:s}=e;const i=v.useCallback(f=>{if(h(f)===f.currentTarget)return o&&o(f),s&&s(!1),!0},[o,s]),c=or(i),l=v.useCallback(f=>{let m=h(f);const g=S(m),P=g?ae(g):ae();m===f.currentTarget&&m===P&&(r&&r(f),s&&s(!0),c(f))},[s,r,c]);return{focusProps:{onFocus:!t&&(r||s||o)?l:void 0,onBlur:!t&&(o||s)?i:void 0}}}function Tt(e){if(!e)return;let t=!0;return r=>{let o={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(o),t&&r.stopPropagation()}}function _r(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Tt(e.onKeyDown),onKeyUp:Tt(e.onKeyUp)}}}let Er=v.createContext(null);function wr(e){let t=v.useContext(Er)||{};tt(t,e);let{ref:r,...o}=t;return o}function Br(e,t){let{focusProps:r}=Tr(e),{keyboardProps:o}=_r(e),s=se(r,o),i=wr(t),c=e.isDisabled?{}:i,l=v.useRef(e.autoFocus);v.useEffect(()=>{l.current&&t.current&&$r(t.current),l.current=!1},[t]);let f=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(f=void 0),{focusableProps:se({...s,tabIndex:f},c)}}function kr(e,t){let{elementType:r="a",onPress:o,onPressStart:s,onPressEnd:i,onClick:c,isDisabled:l,...f}=e,m;r!=="a"&&(m={role:"link",tabIndex:l?void 0:0});let{focusableProps:g}=Br(e,t),{pressProps:P,isPressed:K}=dr({onPress:o,onPressStart:s,onPressEnd:i,isDisabled:l,ref:t}),R=Kt(f,{labelable:!0}),j=se(g,P);return{isPressed:K,linkProps:se(R,{...j,...m,"aria-disabled":l||void 0,onClick:N=>{P.onClick(N),c&&(c(N),console.warn("onClick is deprecated, please use onPress"))}})}}function Sr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,o)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_t(Object(r),!0).forEach(function(o){Sr(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}var Cr=(e,t,r)=>{for(var o of Object.keys(e)){var s;if(e[o]!==((s=t[o])!==null&&s!==void 0?s:r[o]))return!1}return!0},$e=e=>t=>{var r=e.defaultClassName,o=Et(Et({},e.defaultVariants),t);for(var s in o){var i,c=(i=o[s])!==null&&i!==void 0?i:e.defaultVariants[s];if(c!=null){var l=c;typeof l=="boolean"&&(l=l===!0?"true":"false");var f=e.variantClassNames[s][l];f&&(r+=" "+f)}}for(var[m,g]of e.compoundVariants)Cr(m,o,e.defaultVariants)&&(r+=" "+g);return r},Lr="pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg110",Mr=$e({defaultClassName:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg111",variantClassNames:{fullWidth:{true:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg112",false:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg113"}},defaultVariants:{fullWidth:!1},compoundVariants:[]}),Or=$e({defaultClassName:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg114",variantClassNames:{hideNameText:{true:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg115",false:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg116"}},defaultVariants:{hideNameText:!1},compoundVariants:[]}),xr="pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg117",Nr="pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg118",Ir="pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg119",Ar="pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11a",wt=$e({defaultClassName:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11b",variantClassNames:{active:{true:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11c",false:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11d"},disabled:{true:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11e",false:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11f"}},defaultVariants:{active:!1,disabled:!1},compoundVariants:[]}),Dr="pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11g",Fr=$e({defaultClassName:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11h",variantClassNames:{priorityPlus:{true:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11i",false:"pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11j"}},defaultVariants:{priorityPlus:!1},compoundVariants:[]});function Te(e){const t=p.useRef(null),{linkProps:r}=kr(e,t),{active:o,priority:s,...i}=e,c={...i,...r,ref:t,className:k.cl(wt({active:o,disabled:!1}),e.className)},l=e.as??(e.href?"a":"span");return p.createElement(l,{...c},e.children)}k.Metadata.set(Te,{name:"Product Bar Tab",props:{active:{type:"boolean",required:!0},href:{type:"string"},priority:{type:"number"}}});const _e=p.forwardRef(function({children:t,className:r,name:o,logoSrc:s,hideNameText:i=!1,...c},l){return p.createElement(p.Fragment,null,p.createElement("a",{className:k.cl(Or({hideNameText:i}),r),...c,ref:l},s&&p.createElement("img",{className:xr,src:s,"aria-hidden":"true",alt:`${o} Logo`,title:o}),o&&p.createElement("span",{className:k.cl(Nr,i&&Ir)},o)),p.createElement("span",{className:Dr}))});k.Metadata.set(_e,{name:"ProductBarName",props:{name:{type:"string"},logoSrc:{type:"string"},hideNameText:{type:"boolean",default:"false"}}});var Kr="pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas0",Rr="pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas1",zr="pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas2",Ke="pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas3",Re="pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas4";function Vr({items:e,wrapperRef:t}){const{t:r}=je.useWoodlandLanguage();if(e.length===0)return null;const o=e.some(i=>i.props?.active),s=r("productBar.more",{defaultValue:"More"});return p.createElement("span",{ref:t},p.createElement(ne.MenuProvider,null,p.createElement(ne.MenuButton,{className:k.cl(wt({active:o,disabled:!1}),Kr),"aria-label":s},s,p.createElement(k.Icon,{icon:"chevron-down",className:Rr,"aria-hidden":"true"})),p.createElement(ne.Menu,{className:zr,gutter:4},e.map((i,c)=>{const l=i.props?.active,f=i.props?.children,m=i.props?.onPress,g=i.props?.href,P=i.props?.as,K=()=>{m&&m()};if(g&&P){const R=P;return p.createElement(ne.MenuItem,{key:c,className:k.cl(Ke,l&&Re),render:p.createElement(R,{to:g})},f)}return g?p.createElement(ne.MenuItem,{key:c,className:k.cl(Ke,l&&Re),render:p.createElement("a",{href:g})},f):p.createElement(ne.MenuItem,{key:c,className:k.cl(Ke,l&&Re),onClick:K},f)}))))}function Wr(e,t={}){const{enabled:r=!0,minVisibleItems:o=1,debounceMs:s=16}=t,i=p.useRef(null),c=p.useRef(null),l=p.useRef(null),f=p.useRef(null),m=p.useRef(null),g=p.useRef([]),P=p.useRef(0),K=p.useRef(0),R=p.useRef(!1),[j,N]=p.useState(e.length),[I,M]=p.useState(!1),z=p.useCallback(()=>{if(!i.current)return!1;const E=i.current,_=Array.from(E.children),w=l.current;w&&(P.current=w.getBoundingClientRect().width);const x=_.filter(D=>D!==w);if(x.length<e.length)return!1;if(g.current=x.map(D=>D.getBoundingClientRect().width),m.current){const D=m.current.querySelector("span:last-of-type");if(D){const O=D.getBoundingClientRect().width,V=getComputedStyle(m.current),Y=parseFloat(V.marginRight)||0,C=Math.max(0,Y-8);K.current=O+C}}return R.current=!0,!0},[e.length]),A=p.useCallback(()=>{if(!c.current)return 0;const E=c.current,_=E.getBoundingClientRect(),w=getComputedStyle(E),x=parseFloat(w.paddingLeft)+parseFloat(w.paddingRight),D=parseFloat(w.gap)||0;let O=x;const V=Array.from(E.children),Y=V.filter(C=>getComputedStyle(C).display!=="none");Y.length>1&&(O+=D*(Y.length-1));for(const C of V){if(C===i.current)continue;const W=getComputedStyle(C),te=parseFloat(W.marginLeft)+parseFloat(W.marginRight);if(C===f.current){const n=Array.from(C.children),u=getComputedStyle(C),a=parseFloat(u.gap)||0;for(const d of n){const b=getComputedStyle(d),y=parseFloat(b.marginLeft)+parseFloat(b.marginRight);O+=d.getBoundingClientRect().width+y}n.length>1&&(O+=a*(n.length-1)),O+=parseFloat(u.paddingLeft)+parseFloat(u.paddingRight),O+=te}else O+=C.getBoundingClientRect().width+te}return Math.max(0,_.width-O-2)},[]),T=p.useRef(!1),B=p.useCallback(()=>{if(!r||!R.current){M(!1),T.current=!1;return}let E=A();const _=g.current,w=P.current||100,x=K.current||0;if(T.current&&x>0&&(E-=x),_.length===0||E<=0){N(e.length),M(!1),T.current=!1;return}if(_.reduce((d,b)=>d+b,0)<=E){N(e.length),M(!1),T.current=!1;return}let O=0,V=0;const Y=E-w;for(let d=0;d<_.length;d++){const b=_[d];if(O+b<=Y)O+=b,V++;else break}const J=Math.min(o,e.length),C=Math.max(V,J),te=_.slice(0,J).reduce((d,b)=>d+b,0)+w,n=V<J&&te>E&&x>0,u=!n&&E>te+x+20;let a=T.current;n&&!T.current?a=!0:u&&T.current&&(a=!1),a!==T.current&&(T.current=a,M(a)),N(C)},[r,e.length,o,A]);p.useEffect(()=>{if(!r){N(e.length);return}R.current=!1,g.current=[],N(e.length)},[r,e.length]),p.useLayoutEffect(()=>{if(!r||!i.current)return;z()&&B()}),p.useEffect(()=>{if(!r)return;let E;const _=()=>{clearTimeout(E),E=setTimeout(()=>{R.current||z(),B()},s)},w=new ResizeObserver(_);return c.current&&w.observe(c.current),()=>{clearTimeout(E),w.disconnect()}},[r,z,B,s]);const We=r?e.slice(0,j):e,G=r&&j<e.length?e.slice(j):[];return{visibleItems:We,overflowItems:G,containerRef:i,parentRef:c,overflowButtonRef:l,contentRef:f,brandRef:m,hideProductName:I}}function Hr(e){return[...e].sort((t,r)=>{const o=t.props?.priority??1/0,s=r.props?.priority??1/0;return o===s?0:o-s})}function Ur(e,t){if(t.length===0)return{visible:e,overflow:t};const r=t.findIndex(l=>l.props?.active);if(r===-1)return{visible:e,overflow:t};const o=t[r],s=e[e.length-1],i=[...e.slice(0,-1),o],c=[...t.slice(0,r),s,...t.slice(r+1)];return{visible:i,overflow:c}}function ze({fullWidth:e,enablePriorityPlus:t=!0,children:r,className:o,...s}){const i=p.useRef(null),[c,l,f]=k.selectChildren(r,[{type:_e},{type:Te}]),m=p.useMemo(()=>t?Hr(l):l,[t,l]),{visibleItems:g,overflowItems:P,containerRef:K,parentRef:R,overflowButtonRef:j,contentRef:N,brandRef:I,hideProductName:M}=Wr(m,{enabled:t}),{visible:z,overflow:A}=p.useMemo(()=>Ur(g,P),[g,P]),T=p.useMemo(()=>{if(!t||!c||c.length===0)return c;const B=c[0];return p.isValidElement(B)?[p.cloneElement(B,{hideNameText:M,ref:I})]:c},[t,c,M,I]);return p.createElement("div",{className:k.cl(Lr,o),...s,ref:i},p.createElement("nav",{className:Mr({fullWidth:e}),ref:R},T,p.createElement("div",{className:Fr({priorityPlus:t}),ref:K},z,A.length>0&&p.createElement(Vr,{items:A,wrapperRef:j})),p.createElement("div",{className:Ar,ref:N},p.createElement(k.PortalContext.Provider,{value:{parentElementRef:i,fixed:!0}},f))))}k.Metadata.set(ze,{name:"ProductBar",props:{fullWidth:{type:"boolean"},enablePriorityPlus:{type:"boolean",default:"true"}}});var jr="pkg_sps-woodland_product-bar__version_8_52_0__hash_r7f8id0",Gr="pkg_sps-woodland_product-bar__version_8_52_0__hash_r7f8id1";function Ve({channelId:e,className:t,...r}){const{t:o}=je.useWoodlandLanguage();return p.createElement("a",{className:k.cl(jr,t),target:"_blank",rel:"noreferrer",href:`https://spscommerce.slack.com/archives/${e}`,...r},p.createElement(k.Icon,{className:Gr,icon:"conversation","aria-hidden":"true"}),p.createElement("span",null,o("slackLink.label",{defaultValue:"Chat"})))}k.Metadata.set(Ve,{name:"Slack Link",props:{channelId:{type:"string",required:!0}}});const Yr={components:[ze,_e,Te],examples:{basic:{label:"Basic",description:"Product navigation bar",examples:{basic:{react:oe.code`
7
+ `.trim(),n.head.prepend(u)},[K]),v.useEffect(()=>{let n=I.current;return()=>{var u;P||Ne((u=n.target)!==null&&u!==void 0?u:void 0);for(let a of n.disposables)a();n.disposables=[]}},[P]),{isPressed:f||j,pressProps:se(R,te,{[ft]:!0})}}function Ie(e){return e.tagName==="A"&&e.hasAttribute("href")}function Ae(e,t){const{key:r,code:o}=e,s=t,i=s.getAttribute("role");return(r==="Enter"||r===" "||r==="Spacebar"||o==="Space")&&!(s instanceof H(s).HTMLInputElement&&!gt(s,r)||s instanceof H(s).HTMLTextAreaElement||s.isContentEditable)&&!((i==="link"||!i&&Ie(s))&&r!=="Enter")}function fr(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function pt(e,t){const r=e.changedTouches;for(let o=0;o<r.length;o++){const s=r[o];if(s.identifier===t)return s}return null}function q(e,t){let r=0,o=0;return t.targetTouches&&t.targetTouches.length===1&&(r=t.targetTouches[0].clientX,o=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:o}}function Z(e,t){let r=t.clientX,o=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:r,clientY:o,key:t.key}}function pr(e){let t=0,r=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?r=e.height/2:e.radiusY!==void 0&&(r=e.radiusY),{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function br(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function bt(e,t){let r=t.getBoundingClientRect(),o=pr(e);return br(r,o)}function vr(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Ie(e)}function vt(e,t){return e instanceof HTMLInputElement?!gt(e,t):vr(e)}const gr=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function gt(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":gr.has(e.type)}let de=null;const mr=new Set;let fe=new Map,ee=!1,De=!1;function Fe(e,t){for(let r of mr)r(e,t)}function hr(e){return!(e.metaKey||!ce()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Pe(e){ee=!0,!Q.isOpening&&hr(e)&&(de="keyboard",Fe("keyboard",e))}function F(e){de="pointer","pointerType"in e&&e.pointerType,(e.type==="mousedown"||e.type==="pointerdown")&&(ee=!0,Fe("pointer",e))}function mt(e){!Q.isOpening&&Oe(e)&&(ee=!0,de="virtual")}function ht(e){h(e)===window||h(e)===document||ge||!e.isTrusted||(!ee&&!De&&(de="virtual",Fe("virtual",e)),ee=!1,De=!1)}function yt(){ge||(ee=!1,De=!0)}function Pt(e){if(typeof window>"u"||typeof document>"u"||fe.get(H(e)))return;const t=H(e),r=S(e);let o=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ee=!0,o.apply(this,arguments)},r.addEventListener("keydown",Pe,!0),r.addEventListener("keyup",Pe,!0),r.addEventListener("click",mt,!0),t.addEventListener("focus",ht,!0),t.addEventListener("blur",yt,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",F,!0),r.addEventListener("pointermove",F,!0),r.addEventListener("pointerup",F,!0)):process.env.NODE_ENV==="test"&&(r.addEventListener("mousedown",F,!0),r.addEventListener("mousemove",F,!0),r.addEventListener("mouseup",F,!0)),t.addEventListener("beforeunload",()=>{$t(e)},{once:!0}),fe.set(t,{focus:o})}const $t=(e,t)=>{const r=H(e),o=S(e);t&&o.removeEventListener("DOMContentLoaded",t),fe.has(r)&&(r.HTMLElement.prototype.focus=fe.get(r).focus,o.removeEventListener("keydown",Pe,!0),o.removeEventListener("keyup",Pe,!0),o.removeEventListener("click",mt,!0),r.removeEventListener("focus",ht,!0),r.removeEventListener("blur",yt,!1),typeof PointerEvent<"u"?(o.removeEventListener("pointerdown",F,!0),o.removeEventListener("pointermove",F,!0),o.removeEventListener("pointerup",F,!0)):process.env.NODE_ENV==="test"&&(o.removeEventListener("mousedown",F,!0),o.removeEventListener("mousemove",F,!0),o.removeEventListener("mouseup",F,!0)),fe.delete(r))};function yr(e){const t=S(e);let r;return t.readyState!=="loading"?Pt(e):(r=()=>{Pt(e)},t.addEventListener("DOMContentLoaded",r)),()=>$t(e,r)}typeof document<"u"&&yr();function Pr(){return de}function $r(e){if(!e.isConnected)return;const t=S(e);if(Pr()==="virtual"){let r=ae(t);et(()=>{const o=ae(t);(o===r||o===t.body)&&e.isConnected&&ie(e)})}else ie(e)}function Tr(e){let{isDisabled:t,onFocus:r,onBlur:o,onFocusChange:s}=e;const i=v.useCallback(f=>{if(h(f)===f.currentTarget)return o&&o(f),s&&s(!1),!0},[o,s]),c=or(i),l=v.useCallback(f=>{let m=h(f);const g=S(m),P=g?ae(g):ae();m===f.currentTarget&&m===P&&(r&&r(f),s&&s(!0),c(f))},[s,r,c]);return{focusProps:{onFocus:!t&&(r||s||o)?l:void 0,onBlur:!t&&(o||s)?i:void 0}}}function Tt(e){if(!e)return;let t=!0;return r=>{let o={...r,preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(o),t&&r.stopPropagation()}}function _r(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Tt(e.onKeyDown),onKeyUp:Tt(e.onKeyUp)}}}let Er=v.createContext(null);function wr(e){let t=v.useContext(Er)||{};tt(t,e);let{ref:r,...o}=t;return o}function Br(e,t){let{focusProps:r}=Tr(e),{keyboardProps:o}=_r(e),s=se(r,o),i=wr(t),c=e.isDisabled?{}:i,l=v.useRef(e.autoFocus);v.useEffect(()=>{l.current&&t.current&&$r(t.current),l.current=!1},[t]);let f=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(f=void 0),{focusableProps:se({...s,tabIndex:f},c)}}function kr(e,t){let{elementType:r="a",onPress:o,onPressStart:s,onPressEnd:i,onClick:c,isDisabled:l,...f}=e,m;r!=="a"&&(m={role:"link",tabIndex:l?void 0:0});let{focusableProps:g}=Br(e,t),{pressProps:P,isPressed:K}=dr({onPress:o,onPressStart:s,onPressEnd:i,isDisabled:l,ref:t}),R=Kt(f,{labelable:!0}),j=se(g,P);return{isPressed:K,linkProps:se(R,{...j,...m,"aria-disabled":l||void 0,onClick:N=>{P.onClick(N),c&&(c(N),console.warn("onClick is deprecated, please use onPress"))}})}}function Sr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,o)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_t(Object(r),!0).forEach(function(o){Sr(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}var Cr=(e,t,r)=>{for(var o of Object.keys(e)){var s;if(e[o]!==((s=t[o])!==null&&s!==void 0?s:r[o]))return!1}return!0},$e=e=>t=>{var r=e.defaultClassName,o=Et(Et({},e.defaultVariants),t);for(var s in o){var i,c=(i=o[s])!==null&&i!==void 0?i:e.defaultVariants[s];if(c!=null){var l=c;typeof l=="boolean"&&(l=l===!0?"true":"false");var f=e.variantClassNames[s][l];f&&(r+=" "+f)}}for(var[m,g]of e.compoundVariants)Cr(m,o,e.defaultVariants)&&(r+=" "+g);return r},Lr="pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg110",Mr=$e({defaultClassName:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg111",variantClassNames:{fullWidth:{true:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg112",false:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg113"}},defaultVariants:{fullWidth:!1},compoundVariants:[]}),Or=$e({defaultClassName:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg114",variantClassNames:{hideNameText:{true:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg115",false:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg116"}},defaultVariants:{hideNameText:!1},compoundVariants:[]}),xr="pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg117",Nr="pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg118",Ir="pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg119",Ar="pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11a",wt=$e({defaultClassName:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11b",variantClassNames:{active:{true:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11c",false:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11d"},disabled:{true:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11e",false:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11f"}},defaultVariants:{active:!1,disabled:!1},compoundVariants:[]}),Dr="pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11g",Fr=$e({defaultClassName:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11h",variantClassNames:{priorityPlus:{true:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11i",false:"pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11j"}},defaultVariants:{priorityPlus:!1},compoundVariants:[]});function Te(e){const t=p.useRef(null),{linkProps:r}=kr(e,t),{active:o,priority:s,...i}=e,c={...i,...r,ref:t,className:k.cl(wt({active:o,disabled:!1}),e.className)},l=e.as??(e.href?"a":"span");return p.createElement(l,{...c},e.children)}k.Metadata.set(Te,{name:"Product Bar Tab",props:{active:{type:"boolean",required:!0},href:{type:"string"},priority:{type:"number"}}});const _e=p.forwardRef(function({children:t,className:r,name:o,logoSrc:s,hideNameText:i=!1,...c},l){return p.createElement(p.Fragment,null,p.createElement("a",{className:k.cl(Or({hideNameText:i}),r),...c,ref:l},s&&p.createElement("img",{className:xr,src:s,"aria-hidden":"true",alt:`${o} Logo`,title:o}),o&&p.createElement("span",{className:k.cl(Nr,i&&Ir)},o)),p.createElement("span",{className:Dr}))});k.Metadata.set(_e,{name:"ProductBarName",props:{name:{type:"string"},logoSrc:{type:"string"},hideNameText:{type:"boolean",default:"false"}}});var Kr="pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas0",Rr="pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas1",zr="pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas2",Ke="pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas3",Re="pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas4";function Vr({items:e,wrapperRef:t}){const{t:r}=je.useWoodlandLanguage();if(e.length===0)return null;const o=e.some(i=>i.props?.active),s=r("productBar.more",{defaultValue:"More"});return p.createElement("span",{ref:t},p.createElement(ne.MenuProvider,null,p.createElement(ne.MenuButton,{className:k.cl(wt({active:o,disabled:!1}),Kr),"aria-label":s},s,p.createElement(k.Icon,{icon:"chevron-down",className:Rr,"aria-hidden":"true"})),p.createElement(ne.Menu,{className:zr,gutter:4},e.map((i,c)=>{const l=i.props?.active,f=i.props?.children,m=i.props?.onPress,g=i.props?.href,P=i.props?.as,K=()=>{m&&m()};if(g&&P){const R=P;return p.createElement(ne.MenuItem,{key:c,className:k.cl(Ke,l&&Re),render:p.createElement(R,{to:g})},f)}return g?p.createElement(ne.MenuItem,{key:c,className:k.cl(Ke,l&&Re),render:p.createElement("a",{href:g})},f):p.createElement(ne.MenuItem,{key:c,className:k.cl(Ke,l&&Re),onClick:K},f)}))))}function Wr(e,t={}){const{enabled:r=!0,minVisibleItems:o=1,debounceMs:s=16}=t,i=p.useRef(null),c=p.useRef(null),l=p.useRef(null),f=p.useRef(null),m=p.useRef(null),g=p.useRef([]),P=p.useRef(0),K=p.useRef(0),R=p.useRef(!1),[j,N]=p.useState(e.length),[I,M]=p.useState(!1),z=p.useCallback(()=>{if(!i.current)return!1;const E=i.current,_=Array.from(E.children),w=l.current;w&&(P.current=w.getBoundingClientRect().width);const x=_.filter(D=>D!==w);if(x.length<e.length)return!1;if(g.current=x.map(D=>D.getBoundingClientRect().width),m.current){const D=m.current.querySelector("span:last-of-type");if(D){const O=D.getBoundingClientRect().width,V=getComputedStyle(m.current),Y=parseFloat(V.marginRight)||0,C=Math.max(0,Y-8);K.current=O+C}}return R.current=!0,!0},[e.length]),A=p.useCallback(()=>{if(!c.current)return 0;const E=c.current,_=E.getBoundingClientRect(),w=getComputedStyle(E),x=parseFloat(w.paddingLeft)+parseFloat(w.paddingRight),D=parseFloat(w.gap)||0;let O=x;const V=Array.from(E.children),Y=V.filter(C=>getComputedStyle(C).display!=="none");Y.length>1&&(O+=D*(Y.length-1));for(const C of V){if(C===i.current)continue;const W=getComputedStyle(C),te=parseFloat(W.marginLeft)+parseFloat(W.marginRight);if(C===f.current){const n=Array.from(C.children),u=getComputedStyle(C),a=parseFloat(u.gap)||0;for(const d of n){const b=getComputedStyle(d),y=parseFloat(b.marginLeft)+parseFloat(b.marginRight);O+=d.getBoundingClientRect().width+y}n.length>1&&(O+=a*(n.length-1)),O+=parseFloat(u.paddingLeft)+parseFloat(u.paddingRight),O+=te}else O+=C.getBoundingClientRect().width+te}return Math.max(0,_.width-O-2)},[]),T=p.useRef(!1),B=p.useCallback(()=>{if(!r||!R.current){M(!1),T.current=!1;return}let E=A();const _=g.current,w=P.current||100,x=K.current||0;if(T.current&&x>0&&(E-=x),_.length===0||E<=0){N(e.length),M(!1),T.current=!1;return}if(_.reduce((d,b)=>d+b,0)<=E){N(e.length),M(!1),T.current=!1;return}let O=0,V=0;const Y=E-w;for(let d=0;d<_.length;d++){const b=_[d];if(O+b<=Y)O+=b,V++;else break}const J=Math.min(o,e.length),C=Math.max(V,J),te=_.slice(0,J).reduce((d,b)=>d+b,0)+w,n=V<J&&te>E&&x>0,u=!n&&E>te+x+20;let a=T.current;n&&!T.current?a=!0:u&&T.current&&(a=!1),a!==T.current&&(T.current=a,M(a)),N(C)},[r,e.length,o,A]);p.useEffect(()=>{if(!r){N(e.length);return}R.current=!1,g.current=[],N(e.length)},[r,e.length]),p.useLayoutEffect(()=>{if(!r||!i.current)return;z()&&B()}),p.useEffect(()=>{if(!r)return;let E;const _=()=>{clearTimeout(E),E=setTimeout(()=>{R.current||z(),B()},s)},w=new ResizeObserver(_);return c.current&&w.observe(c.current),()=>{clearTimeout(E),w.disconnect()}},[r,z,B,s]);const We=r?e.slice(0,j):e,G=r&&j<e.length?e.slice(j):[];return{visibleItems:We,overflowItems:G,containerRef:i,parentRef:c,overflowButtonRef:l,contentRef:f,brandRef:m,hideProductName:I}}function Hr(e){return[...e].sort((t,r)=>{const o=t.props?.priority??1/0,s=r.props?.priority??1/0;return o===s?0:o-s})}function Ur(e,t){if(t.length===0)return{visible:e,overflow:t};const r=t.findIndex(l=>l.props?.active);if(r===-1)return{visible:e,overflow:t};const o=t[r],s=e[e.length-1],i=[...e.slice(0,-1),o],c=[...t.slice(0,r),s,...t.slice(r+1)];return{visible:i,overflow:c}}function ze({fullWidth:e,enablePriorityPlus:t=!0,children:r,className:o,...s}){const i=p.useRef(null),[c,l,f]=k.selectChildren(r,[{type:_e},{type:Te}]),m=p.useMemo(()=>t?Hr(l):l,[t,l]),{visibleItems:g,overflowItems:P,containerRef:K,parentRef:R,overflowButtonRef:j,contentRef:N,brandRef:I,hideProductName:M}=Wr(m,{enabled:t}),{visible:z,overflow:A}=p.useMemo(()=>Ur(g,P),[g,P]),T=p.useMemo(()=>{if(!t||!c||c.length===0)return c;const B=c[0];return p.isValidElement(B)?[p.cloneElement(B,{hideNameText:M,ref:I})]:c},[t,c,M,I]);return p.createElement("div",{className:k.cl(Lr,o),...s,ref:i},p.createElement("nav",{className:Mr({fullWidth:e}),ref:R},T,p.createElement("div",{className:Fr({priorityPlus:t}),ref:K},z,A.length>0&&p.createElement(Vr,{items:A,wrapperRef:j})),p.createElement("div",{className:Ar,ref:N},p.createElement(k.PortalContext.Provider,{value:{parentElementRef:i,fixed:!0}},f))))}k.Metadata.set(ze,{name:"ProductBar",props:{fullWidth:{type:"boolean"},enablePriorityPlus:{type:"boolean",default:"true"}}});var jr="pkg_sps-woodland_product-bar__version_8_52_2__hash_r7f8id0",Gr="pkg_sps-woodland_product-bar__version_8_52_2__hash_r7f8id1";function Ve({channelId:e,className:t,...r}){const{t:o}=je.useWoodlandLanguage();return p.createElement("a",{className:k.cl(jr,t),target:"_blank",rel:"noreferrer",href:`https://spscommerce.slack.com/archives/${e}`,...r},p.createElement(k.Icon,{className:Gr,icon:"conversation","aria-hidden":"true"}),p.createElement("span",null,o("slackLink.label",{defaultValue:"Chat"})))}k.Metadata.set(Ve,{name:"Slack Link",props:{channelId:{type:"string",required:!0}}});const Yr={components:[ze,_e,Te],examples:{basic:{label:"Basic",description:"Product navigation bar",examples:{basic:{react:oe.code`
8
8
  import { ProductBar, ProductBarName, ProductBarTab } from "@sps-woodland/product-bar";
9
9
  import { Button } from "@sps-woodland/buttons";
10
10
 
package/lib/style.css CHANGED
@@ -1 +1 @@
1
- .pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg110{background-color:#fff;box-shadow:0 1px 2px #00000026;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg111{background-color:#fff;display:flex;min-height:3.75rem;padding-top:0;padding-right:2rem;padding-bottom:0;padding-left:2rem;width:1280px;align-items:center}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg112{width:100%}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg114{align-content:center;cursor:pointer;display:flex;margin-right:2rem;text-decoration:none}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg114:hover{text-decoration:none}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg115{margin-right:.5rem}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg117{align-content:center;display:flex;height:1.5rem;margin-right:.5rem;width:1.5rem}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg118{align-content:center;color:#1f282c;display:flex;font-size:1rem;font-weight:600}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg119{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11a{flex:1;text-align:right}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11b{align-items:center;color:#4b5356!important;font-size:.875rem!important;cursor:pointer;display:flex;height:3.625rem;justify-content:center;margin-top:.125rem;padding-top:0;padding-right:1rem;padding-bottom:0;padding-left:1rem;text-decoration:none}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11b:hover{text-decoration:none}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11c{box-shadow:inset 0 -.125rem #007db8}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11e{color:#d2d4d4}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11g{display:inline-block;height:2.125rem;margin-top:0;margin-right:1rem;margin-bottom:0;margin-left:0;background:#d2d4d4;width:.0625rem}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1gzyg11h{display:flex;flex-direction:row;padding-left:0;margin-bottom:0;list-style:none}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas0{background:none;border:none;font:inherit;gap:.25rem;flex-shrink:0}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas1{font-size:.75rem;transition:transform .15s ease}[aria-expanded=true] .pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas1{transform:rotate(180deg)}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas2{background:#fff;border-style:solid;border-width:.0625rem;border-radius:.25rem;border-color:#717779;box-shadow:0 2px 8px #00000026;min-width:120px;overflow-y:auto;overscroll-behavior:contain;z-index:100}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas2:focus{outline:.125rem solid #007db8ff!important;outline-offset:.125rem}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas3{align-items:center;color:#4b5356;cursor:pointer;display:flex;font-size:.875rem;font-weight:400;padding:.5rem 1rem;text-decoration:none;white-space:nowrap}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas3:hover{background:#e6f2f8;text-decoration:none}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas3:focus{background:#e6f2f8;outline:.125rem solid #007db8ff!important;outline-offset:-.125rem}.pkg_sps-woodland_product-bar__version_8_52_0__hash_1yewyas4{font-weight:600;box-shadow:inset 3px 0 #007db8}.pkg_sps-woodland_product-bar__version_8_52_0__hash_r7f8id0{align-items:center;display:inline-flex;font-size:.875rem;text-decoration:none}.pkg_sps-woodland_product-bar__version_8_52_0__hash_r7f8id0:hover{border-bottom-style:solid;border-bottom-width:.0625rem;border-bottom-color:#007db8;text-decoration:none!important}.pkg_sps-woodland_product-bar__version_8_52_0__hash_r7f8id1{font-size:1rem;margin-right:.25rem}
1
+ .pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg110{background-color:#fff;box-shadow:0 1px 2px #00000026;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg111{background-color:#fff;display:flex;min-height:3.75rem;padding-top:0;padding-right:2rem;padding-bottom:0;padding-left:2rem;width:1280px;align-items:center}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg112{width:100%}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg114{align-content:center;cursor:pointer;display:flex;margin-right:2rem;text-decoration:none}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg114:hover{text-decoration:none}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg115{margin-right:.5rem}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg117{align-content:center;display:flex;height:1.5rem;margin-right:.5rem;width:1.5rem}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg118{align-content:center;color:#1f282c;display:flex;font-size:1rem;font-weight:600}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg119{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11a{flex:1;text-align:right}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11b{align-items:center;color:#4b5356!important;font-size:.875rem!important;cursor:pointer;display:flex;height:3.625rem;justify-content:center;margin-top:.125rem;padding-top:0;padding-right:1rem;padding-bottom:0;padding-left:1rem;text-decoration:none}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11b:hover{text-decoration:none}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11c{box-shadow:inset 0 -.125rem #007db8}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11e{color:#d2d4d4}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11g{display:inline-block;height:2.125rem;margin-top:0;margin-right:1rem;margin-bottom:0;margin-left:0;background:#d2d4d4;width:.0625rem}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1gzyg11h{display:flex;flex-direction:row;padding-left:0;margin-bottom:0;list-style:none}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas0{background:none;border:none;font:inherit;gap:.25rem;flex-shrink:0}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas1{font-size:.75rem;transition:transform .15s ease}[aria-expanded=true] .pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas1{transform:rotate(180deg)}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas2{background:#fff;border-style:solid;border-width:.0625rem;border-radius:.25rem;border-color:#717779;box-shadow:0 2px 8px #00000026;min-width:120px;overflow-y:auto;overscroll-behavior:contain;z-index:100}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas2:focus{outline:.125rem solid #007db8ff!important;outline-offset:.125rem}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas3{align-items:center;color:#4b5356;cursor:pointer;display:flex;font-size:.875rem;font-weight:400;padding:.5rem 1rem;text-decoration:none;white-space:nowrap}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas3:hover{background:#e6f2f8;text-decoration:none}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas3:focus{background:#e6f2f8;outline:.125rem solid #007db8ff!important;outline-offset:-.125rem}.pkg_sps-woodland_product-bar__version_8_52_2__hash_1yewyas4{font-weight:600;box-shadow:inset 3px 0 #007db8}.pkg_sps-woodland_product-bar__version_8_52_2__hash_r7f8id0{align-items:center;display:inline-flex;font-size:.875rem;text-decoration:none}.pkg_sps-woodland_product-bar__version_8_52_2__hash_r7f8id0:hover{border-bottom-style:solid;border-bottom-width:.0625rem;border-bottom-color:#007db8;text-decoration:none!important}.pkg_sps-woodland_product-bar__version_8_52_2__hash_r7f8id1{font-size:1rem;margin-right:.25rem}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sps-woodland/product-bar",
3
3
  "description": "SPS Woodland Design System product bar component",
4
- "version": "8.52.0",
4
+ "version": "8.52.2",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/product-bar",
@@ -30,9 +30,9 @@
30
30
  "@spscommerce/utils": "^7.0.0 || ^8.0.0 || ^9.0.0",
31
31
  "react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
32
32
  "react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
33
- "@sps-woodland/core": "8.52.0",
34
- "@sps-woodland/tokens": "8.52.0",
35
- "@spscommerce/i18n": "8.52.0"
33
+ "@sps-woodland/core": "8.52.2",
34
+ "@sps-woodland/tokens": "8.52.2",
35
+ "@spscommerce/i18n": "8.52.2"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@ariakit/react": "0.4.15",
@@ -41,9 +41,9 @@
41
41
  "@vanilla-extract/recipes": "0.2.5",
42
42
  "react": "16.14.0",
43
43
  "react-dom": "16.14.0",
44
- "@sps-woodland/core": "8.52.0",
45
- "@sps-woodland/tokens": "8.52.0",
46
- "@spscommerce/i18n": "8.52.0"
44
+ "@sps-woodland/core": "8.52.2",
45
+ "@sps-woodland/tokens": "8.52.2",
46
+ "@spscommerce/i18n": "8.52.2"
47
47
  },
48
48
  "dependencies": {
49
49
  "@react-aria/link": "3.3.6"