@harpercollins/harpercollins-design-system 1.19.0 → 1.19.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.
@@ -1,6 +1,7 @@
1
1
  interface FooterProps {
2
2
  copyright?: string;
3
+ releaseName?: string;
3
4
  children?: React.ReactNode;
4
5
  }
5
- declare function Footer({ copyright, children }: FooterProps): React.ReactElement;
6
+ declare function Footer({ copyright, releaseName, children, }: FooterProps): React.ReactElement;
6
7
  export default Footer;
@@ -10,6 +10,7 @@ interface LayoutProps {
10
10
  sidebarWidth?: number;
11
11
  collapsedSidebarWidth?: number;
12
12
  sidebarHeaderContent?: React.ReactNode;
13
+ footerReleaseName?: string;
13
14
  }
14
- declare function Layout({ children, header, theme, showSidebar, sidebarContent, sidebarWidth, collapsedSidebarWidth, sidebarHeaderContent, }: React.PropsWithChildren<LayoutProps>): import("react/jsx-runtime").JSX.Element;
15
+ declare function Layout({ children, header, theme, showSidebar, sidebarContent, sidebarWidth, collapsedSidebarWidth, sidebarHeaderContent, footerReleaseName, }: React.PropsWithChildren<LayoutProps>): import("react/jsx-runtime").JSX.Element;
15
16
  export default Layout;
package/dist/esm/index.js CHANGED
@@ -746,18 +746,18 @@ function Jt(e,t){const n=Pt(e,t);return"production"!==process.env.NODE_ENV?(...t
746
746
  max-width: 600px;
747
747
  `;function iR(){return e(rR,{children:e(oR,{children:t(aR,{children:[e(QC,{icon:dx,size:"xl",colour:"danger"}),e(px,{as:"h1",children:"Something went wrong"}),e("p",{children:"There was a problem with that request. Please try again, if the problem persists, please contact support."}),e(iD,{type:"link",href:"/",children:"Back to homepage"})]})})})}function lR(t){return e(fg,{...t})}_E('/* http://meyerweb.com/eric/tools/css/reset/\n v2.0 | 20110126\n License: none (public domain)\n*/\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n vertical-align: baseline;\n}\n/* HTML5 display-role reset for older browsers */\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\nsection {\n display: block;\n}\nbody {\n line-height: 1;\n}\nol,\nul {\n list-style: none;\n}\nblockquote,\nq {\n quotes: none;\n}\nblockquote:before,\nblockquote:after,\nq:before,\nq:after {\n content: "";\n content: none;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n');function sR(t){return e(Rm,{sx:{"--Input-minHeight":"2.6rem","--joy-fontSize-xl4":"2rem"},...t})}_E(':root {\n --color--black: #000000;\n --color--grey-dark: #262626;\n --color--grey: #5c5c5c;\n --color--grey-light: #a8aab7;\n --color--grey-lighter: #f5f5f5;\n --color--grey-lightest: #f3f6fa;\n --color--grey-borders: #d7d7d7;\n --color--grey-line: #e0e0e0;\n --color--grey-hover: #f9f9f9;\n --color--white: #fff;\n\n --color--teal: #007d7e;\n --color--teal-light: #00b0b1;\n --color--teal-tint: #f2fcfc;\n\n --color--red: #d9303e;\n --color--red-dark: #c02330;\n --color--red-light: #f7dbdd;\n --color--red-tint: #ffdddf;\n\n --color--amber: #e9b04d;\n --color--amber-tint: #faecd5;\n --color--orange: #f5a623;\n --color--orange-dark: #eb6f00;\n --color--orange-light: #f2c06f;\n\n --color--green: #29c889;\n --color--green-dark: #1c874c;\n --color--green-light: #afe7d0;\n --color--indigo: #2e1f5e;\n --color--lemon: #ffe60b;\n --color--focus-outline: #fcc726;\n\n --color--danger: var(--color--red);\n --color--danger-light: var(--color--red-light);\n --color--warning: var(--color--orange);\n --color--warning-light: var(--color--orange-light);\n --color--success: var(--color--green);\n\n --color--dark-blue: #192a3c;\n --color--blue-light: #d6e3fa;\n\n --color--debug: #663399;\n --color--debug-light: #663399db;\n --color--debug-very-light: #6633991a;\n\n /* Fonts */\n --font-family--sans-serif:\n system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu,\n "Helvetica Neue", Oxygen, Cantarell, sans-serif;\n\n --font-family--monospace:\n source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;\n\n /* Spacing */\n --spacing--xxxsmall: 0.1rem;\n --spacing--xxsmall: 0.2rem;\n --spacing--xsmall: 0.3rem;\n --spacing--small: 0.5rem;\n --spacing--medium: 1rem;\n --spacing--large: 2rem;\n --spacing--xlarge: 4rem;\n\n /* Font sizes */\n --font-size--xxsmall: 0.6rem;\n --font-size--xsmall: 0.75rem;\n --font-size--small: 0.875rem;\n --font-size--medium: 1rem;\n --font-size--large: 1.25rem;\n --font-size--xlarge: 1.5rem;\n --font-size--xxlarge: 2rem;\n --font-size--xxxlarge: 3rem;\n\n /* Line heights */\n --line-height--small: 1.2rem;\n --line-height--medium: 1.4rem;\n --line-height--large: 1.4rem;\n\n /* Font weights */\n --font-weight--thin: 200;\n --font-weight--light: 300;\n --font-weight--regular: 400;\n --font-weight--medium: 500;\n --font-weight--bold: 700;\n\n /* Border radius */\n --border-radius--small: 0.25rem;\n --border-radius--medium: 0.5rem;\n --border-radius--large: 1rem;\n --border-radius--xlarge: 2rem;\n\n /* Box shadows */\n --box-shadow--medium: 0px 2px 6px 0px rgba(0, 0, 0, 0.1);\n\n /* Breakpoints */\n --breakpoint--small: 480px;\n --breakpoint--medium: 768px;\n --breakpoint--large: 1024px;\n --breakpoint--xlarge: 1200px;\n --breakpoint--xxlarge: 1440px;\n --breakpoint--xxxlarge: 1920px;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n* {\n margin: 0;\n}\n\na {\n color: var(--color--primary);\n text-decoration: none;\n\n &:hover,\n &:focus {\n text-decoration: underline;\n }\n}\n\nbody,\nbutton {\n font-family: var(--font-family--sans-serif);\n font-weight: var(--font-weight--regular);\n font-style: normal;\n}\n\nbody {\n background-color: var(--color--grey-lightest);\n line-height: 1.5;\n -webkit-font-smoothing: antialiased;\n color: var(--color--grey-dark);\n -webkit-print-color-adjust: exact !important;\n print-color-adjust: exact !important;\n}\n\nb {\n font-weight: var(--font-weight--bold);\n}\n\n*:focus-visible {\n outline: 3px solid var(--color--focus-outline);\n}\n\ninput,\nbutton,\ntextarea,\nselect {\n font: inherit;\n}\n\ntextarea {\n border: 1px solid var(--color--grey-borders);\n border-radius: var(--border-radius--small);\n background-color: var(--color--grey-lighter);\n padding: var(--spacing--medium);\n}\n\np,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n overflow-wrap: break-word;\n}\n\np {\n font-size: var(--font-size--medium);\n margin-bottom: var(--spacing--medium);\n}\n\nul {\n list-style-type: disc;\n}\n\nol {\n list-style-type: decimal;\n}\n\n#root,\n#__next {\n isolation: isolate;\n}\n\nsmall {\n font-size: 80%;\n color: var(--color--grey);\n}\n');const cR=jw.footer`
748
748
  flex-shrink: 0;
749
- padding: 0 1rem;
749
+ padding: 1rem;
750
750
  height: 64px;
751
751
  display: flex;
752
752
  align-items: center;
753
753
  justify-content: center;
754
754
  margin-top: auto;
755
- `;function dR({copyright:n,children:r}){return e(cR,{children:t(km,{children:[r,e(sR,{sx:{fontSize:"xs",my:.5,textAlign:"center"},children:n||"Copyright © 2025 HarperCollins Publishers Ltd. All rights\n reserved. HarperCollins Publishers Ltd, Registered in Scotland, Company\n No. 27389 Registered Address: 1 Robroyston Gate, Robroyston, Glasgow, G33 1JN"})]})})}function uR({sidebarOpen:n=!0,onSidebarToggle:o,headerContent:a,footerContent:i,sidebarContent:l,sidebarWidth:s,collapsedSidebarWidth:c}){const d=r.isValidElement(l)?r.cloneElement(l,{sidebarOpen:n,onSidebarToggle:o}):l,u=r.isValidElement(a)?r.cloneElement(a,{sidebarOpen:n,onSidebarToggle:o}):a;return t(uv,{component:"aside",sx:{backgroundColor:"background.body",width:{xs:0,md:n?`${s}px`:`${c}px`,xl:n&&s?1.25*s+"px":`${c}px`},transition:"width 0.3s ease",flex:"0 0 auto",borderRight:"1px solid",borderColor:"divider",overflow:"hidden",flexDirection:"column",height:"100vh",position:"sticky",top:0,display:{xs:"none",md:"flex"}},children:[a?e(km,{sx:{height:64,display:"flex",alignItems:"center",justifyContent:"flex-start",px:1,borderBottom:"1px solid",borderColor:"divider",flexShrink:0},children:u}):null,e(km,{sx:{flexGrow:1,display:"flex",flexDirection:"column",overflowY:"auto",overflowX:"hidden",minHeight:0,paddingBottom:"110px","&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:"neutral.300",borderRadius:"3px","&:hover":{backgroundColor:"neutral.400"}}},children:d}),i?e(km,{sx:{height:64,display:"flex",alignItems:"center",justifyContent:n?"flex-start":"center",px:1,borderTop:"1px solid",borderColor:"divider",flexShrink:0,position:"fixed",bottom:0},children:i}):null,e($p,{variant:"plain",onClick:o,sx:{backgroundColor:"background.surface",height:50,display:"flex",alignItems:"center",justifyContent:n?"flex-end":"center",px:2,borderTop:"1px solid",borderRight:"1px solid",borderColor:"divider",flexShrink:0,borderRadius:0,position:"fixed",bottom:0,width:"inherit"},children:e(QC,{icon:n?tx:Zw})})]})}const pR=jw.div`
755
+ `;function dR({copyright:n,releaseName:r,children:o}){return e(cR,{children:t(km,{children:[o,e(sR,{sx:{fontSize:"xs",my:.5,textAlign:"center"},children:n||"Copyright © 2025 HarperCollins Publishers Ltd. All rights\n reserved. HarperCollins Publishers Ltd, Registered in Scotland, Company\n No. 27389 Registered Address: 1 Robroyston Gate, Robroyston, Glasgow, G33 1JN"}),r?e(sR,{sx:{fontSize:"xs",my:.5,textAlign:"center"},children:r}):null]})})}function uR({sidebarOpen:n=!0,onSidebarToggle:o,headerContent:a,footerContent:i,sidebarContent:l,sidebarWidth:s,collapsedSidebarWidth:c}){const d=r.isValidElement(l)?r.cloneElement(l,{sidebarOpen:n,onSidebarToggle:o}):l,u=r.isValidElement(a)?r.cloneElement(a,{sidebarOpen:n,onSidebarToggle:o}):a;return t(uv,{component:"aside",sx:{backgroundColor:"background.body",width:{xs:0,md:n?`${s}px`:`${c}px`,xl:n&&s?1.25*s+"px":`${c}px`},transition:"width 0.3s ease",flex:"0 0 auto",borderRight:"1px solid",borderColor:"divider",overflow:"hidden",flexDirection:"column",height:"100vh",position:"sticky",top:0,display:{xs:"none",md:"flex"}},children:[a?e(km,{sx:{backgroundColor:"var(--palette-primary-800)",color:"var(--palette-common-white)",display:"flex",alignItems:"center",justifyContent:"center",p:1,borderBottom:"1px solid",borderColor:"divider",flexShrink:0},children:u}):null,e(km,{sx:{flexGrow:1,display:"flex",flexDirection:"column",overflowY:"auto",overflowX:"hidden",minHeight:0,paddingBottom:"110px","&::-webkit-scrollbar":{width:"6px"},"&::-webkit-scrollbar-track":{backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:"neutral.300",borderRadius:"3px","&:hover":{backgroundColor:"neutral.400"}}},children:d}),i?e(km,{sx:{height:64,display:"flex",alignItems:"center",justifyContent:n?"flex-start":"center",px:1,borderTop:"1px solid",borderColor:"divider",flexShrink:0,position:"fixed",bottom:0},children:i}):null,e($p,{variant:"plain",onClick:o,sx:{backgroundColor:"background.surface",height:50,display:"flex",alignItems:"center",justifyContent:n?"flex-end":"center",px:2,borderTop:"1px solid",borderRight:"1px solid",borderColor:"divider",flexShrink:0,borderRadius:0,position:"fixed",bottom:0,width:"inherit"},children:e(QC,{icon:n?tx:Zw})})]})}const pR=jw.div`
756
756
  display: flex;
757
757
  flex-direction: column;
758
758
  height: 100vh;
759
759
  width: 100%;
760
- `;function fR({children:n,header:o,theme:a="light_internal",showSidebar:i,sidebarContent:l,sidebarWidth:s=260,collapsedSidebarWidth:c=60,sidebarHeaderContent:d}){const[u,p]=r.useState(!0);return e(rR,{theme:a,children:t(pR,{children:[o,t("div",{style:{display:"flex",flex:1},children:[i?e(uR,{sidebarOpen:u,onSidebarToggle:()=>{p(!u)},sidebarContent:l,sidebarWidth:s,collapsedSidebarWidth:c,headerContent:d}):null,t(uv,{component:"main",sx:{transition:"margin-left 0.3s ease",display:"flex",flexDirection:"column",padding:"1.4rem 1rem",flex:"1 1 auto",width:{xs:"100%",md:`calc(100% - ${u?s:c}px)`,xl:`calc(100% - ${u?1.25*s:c}px)`}},children:[n,e(dR,{})]})]})]})})}const mR=jw(Bg)`
760
+ `;function fR({children:n,header:o,theme:a="light_internal",showSidebar:i,sidebarContent:l,sidebarWidth:s=240,collapsedSidebarWidth:c=60,sidebarHeaderContent:d,footerReleaseName:u}){const[p,f]=r.useState(!0);return e(rR,{theme:a,children:t(pR,{children:[o,t("div",{style:{display:"flex",flex:1},children:[i?e(uR,{sidebarOpen:p,onSidebarToggle:()=>{f(!p)},sidebarContent:l,sidebarWidth:s,collapsedSidebarWidth:c,headerContent:d}):null,t(uv,{component:"main",id:"main",sx:{transition:"margin-left 0.3s ease",display:"flex",flexDirection:"column",padding:"1.4rem 1rem",flex:"1 1 auto",width:{xs:"100%",md:`calc(100% - ${p?s:c}px)`,xl:`calc(100% - ${p?1.25*s:c}px)`}},children:[n,e(dR,{releaseName:u})]})]})]})})}const mR=jw(Bg)`
761
761
  a,
762
762
  button {
763
763
  color: initial;