@harpercollins/harpercollins-design-system 1.11.8 → 1.11.9

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.
@@ -24,6 +24,7 @@ interface AppBarProps {
24
24
  displayName: string;
25
25
  avatarUrl: string;
26
26
  } | null;
27
+ logoUrl?: string;
27
28
  }
28
- declare function AppBar({ apps, currentApp, leftSide, rightSide, myAccountMenu, workspaces, workspacesMenu, currentWorkspace, helpButton, mobileMenuPrimary, mobileMenuSecondary, user, }: AppBarProps): import("react/jsx-runtime").JSX.Element;
29
+ declare function AppBar({ apps, currentApp, leftSide, rightSide, myAccountMenu, workspaces, workspacesMenu, currentWorkspace, helpButton, mobileMenuPrimary, mobileMenuSecondary, user, logoUrl, }: AppBarProps): import("react/jsx-runtime").JSX.Element;
29
30
  export default AppBar;
package/dist/esm/index.js CHANGED
@@ -401,7 +401,7 @@ function Os(e,t){const n=Ss(e,t);return"production"!==process.env.NODE_ENV?(...t
401
401
  opacity: 1;
402
402
  }
403
403
  }
404
- `;function eC({apps:o,currentApp:a,leftSide:i,rightSide:l,myAccountMenu:s,workspaces:c,workspacesMenu:d,currentWorkspace:u,helpButton:p,mobileMenuPrimary:f,mobileMenuSecondary:m,user:g}){const[h,v]=r.useState([{isOpen:!1,id:"primary"},{isOpen:!1,id:"secondary"}]),b=(e,t)=>{v(h?.map((n=>n.id===e?{...n,isOpen:t}:n)))},y=e=>h.find((t=>t.id===e))?.isOpen,x=f?t(n,{children:[e(Zw,{onClick:()=>b("primary",!0),children:e(ki,{icon:ln,size:"md"})}),e(Lw,{open:y("primary"),onClose:()=>{b("primary",!1)},side:"left",disableGutters:!0,size:"lg",showCloseButton:!0,children:e(Rb,{role:"presentation",onClick:()=>b("primary",!1),onKeyDown:()=>b("primary",!1),children:f})})]}):null,w=Array.isArray(c)&&c.length>0?e("div",{style:c.length<=1?{pointerEvents:"none"}:void 0,children:t(ww,{children:[e(Yw,{size:"sm",onClick:e=>{e.preventDefault(),e.stopPropagation()},children:u}),t(Vw,{placement:"bottom-start",children:[e(_w,{sticky:!0,children:"Workspaces"}),d]})]})}):null,C=t(Uw,{children:[l,w,p?e(ww,{children:e(Yw,{size:"sm",href:p.href,component:p.as,"aria-label":p.text,startDecorator:e(ki,{icon:xw,size:"sm"}),children:p.text||"Help"})}):null,s?t(ww,{children:[e(Yw,{size:"sm",startDecorator:e(ki,{icon:yw,size:"sm"}),children:g?.displayName?g.displayName:"My Account"}),s]}):null]}),S=t(Rb,{sx:{display:{xs:"flex",md:"none"}},children:[e(Zw,{onClick:()=>b("secondary",!0),color:"neutral",children:e(ki,{icon:pn,size:"md"})}),e(Lw,{open:y("secondary"),onClose:()=>{b("secondary",!1)},side:"right",disableGutters:!0,size:"lg",showCloseButton:!0,children:e(Rb,{role:"presentation",onClick:()=>b("secondary",!1),onKeyDown:()=>b("secondary",!1),children:m})})]});return t(Gw,{children:[t(Rb,{sx:{display:"flex",alignItems:"center",gap:"1rem"},children:[e(Rb,{sx:{display:{xs:"flex",md:"none"}},children:x}),t(qw,{href:"/",children:[e(Rb,{sx:{display:{xs:"none",md:"flex"}},children:e(Bw,{fillColour:"white"})}),e(Rb,{sx:{display:{xs:"flex",md:"none"}},children:e(Ww,{fillColour:"white"})})]}),e(Qw,{apps:o,currentApp:a})]}),t(Rb,{sx:{display:"flex"},children:[e(Kw,{children:i}),e(Rb,{sx:{display:{xs:"none",md:"flex"}},children:C}),m&&S]})]})}function tC({id:o,options:a,onChange:i,name:l,...s}){const[c,d]=r.useState(s.defaultValue),[u,p]=r.useState(s.defaultValue?.value);return t(n,{children:[e(db,{...s,sx:{"--Input-minHeight":"2.6rem"},id:o,options:a,onChange:(e,t,n)=>{d(t),p(t?t?.value:""),i&&i(e,t,n)},getOptionLabel:e=>e.label,isOptionEqualToValue:(e,t)=>e.value===t.value,value:c,renderOption:s.renderOption,name:""}),e(Sv,{name:l,value:u,type:"hidden",sx:{display:"none"}})]})}function nC(t){return e(Ug,{...t})}const oC=nn.button`
404
+ `;function eC({apps:o,currentApp:a,leftSide:i,rightSide:l,myAccountMenu:s,workspaces:c,workspacesMenu:d,currentWorkspace:u,helpButton:p,mobileMenuPrimary:f,mobileMenuSecondary:m,user:g,logoUrl:h}){const[v,b]=r.useState([{isOpen:!1,id:"primary"},{isOpen:!1,id:"secondary"}]),y=(e,t)=>{b(v?.map((n=>n.id===e?{...n,isOpen:t}:n)))},x=e=>v.find((t=>t.id===e))?.isOpen,w=f?t(n,{children:[e(Zw,{onClick:()=>y("primary",!0),children:e(ki,{icon:ln,size:"md"})}),e(Lw,{open:x("primary"),onClose:()=>{y("primary",!1)},side:"left",disableGutters:!0,size:"lg",showCloseButton:!0,children:e(Rb,{role:"presentation",onClick:()=>y("primary",!1),onKeyDown:()=>y("primary",!1),children:f})})]}):null,C=Array.isArray(c)&&c.length>0?e("div",{style:c.length<=1?{pointerEvents:"none"}:void 0,children:t(ww,{children:[e(Yw,{size:"sm",onClick:e=>{e.preventDefault(),e.stopPropagation()},children:u}),t(Vw,{placement:"bottom-start",children:[e(_w,{sticky:!0,children:"Workspaces"}),d]})]})}):null,S=t(Uw,{children:[l,C,p?e(ww,{children:e(Yw,{size:"sm",href:p.href,component:p.as,"aria-label":p.text,startDecorator:e(ki,{icon:xw,size:"sm"}),children:p.text||"Help"})}):null,s?t(ww,{children:[e(Yw,{size:"sm",startDecorator:e(ki,{icon:yw,size:"sm"}),children:g?.displayName?g.displayName:"My Account"}),s]}):null]}),k=t(Rb,{sx:{display:{xs:"flex",md:"none"}},children:[e(Zw,{onClick:()=>y("secondary",!0),color:"neutral",children:e(ki,{icon:pn,size:"md"})}),e(Lw,{open:x("secondary"),onClose:()=>{y("secondary",!1)},side:"right",disableGutters:!0,size:"lg",showCloseButton:!0,children:e(Rb,{role:"presentation",onClick:()=>y("secondary",!1),onKeyDown:()=>y("secondary",!1),children:m})})]});return t(Gw,{children:[t(Rb,{sx:{display:"flex",alignItems:"center",gap:"1rem"},children:[e(Rb,{sx:{display:{xs:"flex",md:"none"}},children:w}),t(qw,{href:h||"/",children:[e(Rb,{sx:{display:{xs:"none",md:"flex"}},children:e(Bw,{fillColour:"white"})}),e(Rb,{sx:{display:{xs:"flex",md:"none"}},children:e(Ww,{fillColour:"white"})})]}),e(Qw,{apps:o,currentApp:a})]}),t(Rb,{sx:{display:"flex"},children:[e(Kw,{children:i}),e(Rb,{sx:{display:{xs:"none",md:"flex"}},children:S}),m&&k]})]})}function tC({id:o,options:a,onChange:i,name:l,...s}){const[c,d]=r.useState(s.defaultValue),[u,p]=r.useState(s.defaultValue?.value);return t(n,{children:[e(db,{...s,sx:{"--Input-minHeight":"2.6rem"},id:o,options:a,onChange:(e,t,n)=>{d(t),p(t?t?.value:""),i&&i(e,t,n)},getOptionLabel:e=>e.label,isOptionEqualToValue:(e,t)=>e.value===t.value,value:c,renderOption:s.renderOption,name:""}),e(Sv,{name:l,value:u,type:"hidden",sx:{display:"none"}})]})}function nC(t){return e(Ug,{...t})}const oC=nn.button`
405
405
  float: right;
406
406
  border: none;
407
407
  background: none;
@@ -434,7 +434,6 @@ function Os(e,t){const n=Ss(e,t);return"production"!==process.env.NODE_ENV?(...t
434
434
  overflow: hidden;
435
435
  text-overflow: ellipsis;
436
436
  white-space: nowrap;
437
- max-width: 400px;
438
437
 
439
438
  &:not(:last-child) {
440
439
  &:after {