1import{b as r,c as a,i as t,_ as o,t as e}from"../tslib.es6-4.2.1.js";import{S as i}from"../slot-controller-4.2.1.js";import{n}from"../property-4.2.1.js";import{e as d}from"../class-map-4.2.1.js";import{x as h}from"../lit-html-4.2.1.js";import{c as l}from"../color-palettes-4.2.1.js";import{t as s}from"../themable-4.2.1.js";import"../directive-4.2.1.js";import"../logger-4.2.1.js";var p;const m=r`:host{display:block;container-name:card;container-type:inline-size;width:100%;height:max-content}#body.empty,#footer.empty,#header.empty,#image.empty{display:none!important}::slotted(*){line-height:inherit}::slotted(a){color:var(--rh-color-interactive-primary-default)}::slotted(a:hover){color:var(--rh-color-interactive-primary-hover)}::slotted(a:focus-within){color:var(--rh-color-interactive-primary-focus)}::slotted(a:active){color:var(--rh-color-interactive-primary-active)}::slotted(a:visited){color:var(--rh-color-interactive-primary-visited-default)}::slotted(a:visited:hover){color:var(--rh-color-interactive-primary-visited-hover)}::slotted(a:visited:focus-within){color:var(--rh-color-interactive-primary-visited-focus)}::slotted(a:visited:active){color:var(--rh-color-interactive-primary-visited-active)}#container{--_header-bg:light-dark(var(--rh-card-header-background-on-light,#0000),var(--rh-card-header-background-on-dark,#0000));align-self:stretch;display:flex;flex-direction:column;justify-items:flex-start;overflow:hidden;border-radius:var( 2 --_border-radius,var(--rh-border-radius-default,3px) 3 );font-family:var(--rh-font-family-body-text,RedHatText,"Red Hat Text",Helvetica,Arial,sans-serif)!important;line-height:var(--rh-line-height-body-text,1.5);border-style:solid;border-width:var(--rh-border-width-sm,1px);border-color:var(--rh-color-border-subtle);width:100%;height:100%;background-color:light-dark(var(--_card-background,var(--rh-color-surface-lightest,#fff)),var(--_card-background,var(--rh-color-surface-darkest,#151515)));color:var(--rh-color-text-primary)}#container.dark,#container.darker,#container.darkest,#container.light,#container.lighter,#container.lightest{--_card-background:var(--rh-color-surface)}#body,#footer,#header{margin-inline:var(--rh-space-xl,24px)}#body ::slotted(:is(h1,h2,h3,h4,h5,h6)),#header ::slotted(:is(h1,h2,h3,h4,h5,h6)){font-family:var(--rh-font-family-heading,RedHatDisplay,"Red Hat Display",Helvetica,Arial,sans-serif)}#image ::slotted(*){display:block;max-width:100%}#header{display:flex;flex-direction:column;gap:var(--rh-space-lg,16px);box-sizing:border-box;font-family:var(--rh-card-heading-font-family,var(--rh-font-family-heading,RedHatDisplay,"Red Hat Display",Helvetica,Arial,sans-serif))!important;font-size:var(--rh-card-heading-font-size,var(--rh-font-size-heading-sm,1.5rem));font-weight:var(--rh-card-heading-font-weight,var(--rh-font-weight-body-text-medium,500))!important;margin-block-start:var(--rh-space-xl,24px);background-color:var(--_header-bg,#0000)}#body{margin-block:var(--rh-space-2xl,32px) var(--rh-space-xl,24px)}#body:has(+.empty){margin-block-end:var(--rh-space-2xl,32px)}#footer{display:flex;gap:.5em;margin-block:auto var(--rh-space-xl,24px)}#container #body ::slotted(:is(h1,h2,h3,h4,h5,h6)),#container #header ::slotted(:is(h1,h2,h3,h4,h5,h6)){font-family:inherit!important;font-weight:inherit!important;line-height:var(--rh-line-height-heading,1.3)!important}#header ::slotted(:is(h1,h2,h3,h4,h5,h6)){font-size:inherit!important;margin:unset!important}#body ::slotted(:is(h1,h2,h3,h4,h5,h6)){font-size:var(--rh-card-heading-font-size,var(--rh-font-size-heading-sm,1.5rem))!important}#body ::slotted(:not([slot]):first-child){margin-block-start:0}#body ::slotted(:not([slot]):last-child){margin-block-end:0}@container card (max-width: 767px){#body{margin-block:var(--rh-space-xl,24px)}}@container card (min-width: 768px){#body,#footer,#header{margin-inline:var(--rh-space-2xl,32px)}#body,#header{margin-block-start:var(--rh-space-2xl,32px)}#footer{margin-block-end:var(--rh-space-2xl,32px)}}:host([variant=promo]){display:block;container-name:card promo}
3#container.promo{--_promo-heading-font-weight:var(--rh-card-heading-font-weight,var(--rh-font-weight-body-text-medium,500));--_promo-heading-size:var(--rh-card-heading-font-size,var(--rh-font-size-heading-xs,1.25rem));--_promo-paragraph-font-size:var(--rh-font-size-body-text-lg,1.125rem);--_promo-paragraph-margin-block-end:var(--rh-space-lg,16px);--_promo-standard-inline-padding:var(--rh-space-2xl,32px);background-color:light-dark(var(--rh-color-surface-lightest,#fff),var(--rh-color-surface-darkest,#151515));height:auto}#container.promo:not(.standard,.image){grid-template-columns:auto}.promo #body{margin:var(--rh-space-2xl,32px)}.promo.image #body{order:-5}.promo.header #header{margin:0;margin-block-end:var(--rh-space-lg,16px)}.promo.footer #footer{margin-block:var(--rh-space-xl,24px) 0;margin-inline:0}.promo #header ::slotted(*){font-family:var(--rh-card-heading-font-family,var(--rh-font-family-heading,RedHatDisplay,"Red Hat Display",Helvetica,Arial,sans-serif))!important;font-size:var(--_promo-heading-size)!important;font-weight:var(--_promo-heading-font-weight)!important;margin-block:0 var(--_promo-heading-margin-block-end)!important}.promo:is(.image,.header) #body ::slotted(p){font-size:var(--_promo-paragraph-font-size)!important;margin-block-end:var(--_promo-paragraph-margin-block-end)!important}#container.promo.standard{background-color:light-dark(var(--rh-color-surface-lighter,#f2f2f2),var(--rh-color-surface-darker,#1f1f1f));display:flex;padding:var(--_promo-standard-inline-padding);width:auto}.promo.standard #body{display:contents}.promo.standard #body ::slotted(:not([slot])){font-family:var(--rh-card-heading-font-family,var(--rh-font-family-heading,RedHatDisplay,"Red Hat Display",Helvetica,Arial,sans-serif))!important;font-size:var(--rh-font-size-body-text-xl,1.25rem)!important;font-weight:var(--rh-font-weight-body-text-medium,500);line-height:var(--rh-line-height-heading,1.3)!important}:host([variant=promo][full-width]) #container{border-color:#0000;padding-block:var(--rh-space-4xl,64px);padding-inline:var(--rh-space-lg,16px);width:auto}:host([variant=promo][full-width]) #body{margin:0}:host([variant=promo][full-width]) #body ::slotted(p){--_promo-paragraph-font-size:var(--rh-font-size-body-text-md,1rem)}:host([variant=promo][full-width]) #header ::slotted(*){--_promo-heading-size:var(--rh-card-heading-font-size,var(--rh-font-size-body-text-2xl,1.5rem))}:host([variant=promo][full-width]) .image #footer{margin-block-end:var(--rh-space-2xl,32px)}@container promo (min-width: 768px){#container.promo{align-items:center;display:grid;grid-template-columns:2fr 1fr;min-height:250px}.promo #image{justify-self:end}.promo #body{margin:var(--rh-space-3xl,48px);max-width:70ch}.promo #header ::slotted(*){--_promo-heading-size:var(--rh-card-heading-font-size,var(--rh-font-size-heading-sm,1.5rem))}#container.promo.standard{--_promo-standard-inline-padding:var(--rh-space-3xl,48px);column-gap:var(--rh-space-xl,24px);flex-direction:row;justify-content:space-between;min-height:auto}.promo.standard #footer{flex:0 0 auto;margin-block:0}:host([variant=promo][full-width]) #container{column-gap:var(--rh-space-2xl,32px);min-height:auto;padding-inline:var(--rh-space-4xl,64px)}:host([variant=promo][full-width]) #body ::slotted(p){--_promo-paragraph-font-size:var(--rh-font-size-body-text-lg,1.125rem)}:host([variant=promo][full-width]) #header ::slotted(*){--_promo-heading-size:var(--rh-card-heading-font-size,var(--rh-font-size-heading-md,1.75rem))}:host([variant=promo][full-width]) .image #footer{margin-block-end:0}}@container promo (min-width: 1200px){:host([variant=promo][full-width]) #container{padding-inline:var(--rh-space-7xl,128px)}}`,c=/(er|est)+/g;let f=class extends t{constructor(){super(...arguments),this.fullWidth=!1,p.set(this,new i(this,"header","image",null,"footer"))}render(){const r="promo"===this.variant,a=r&&o(this,p,"f").hasSlotted(null)&&o(this,p,"f").isEmpty("image")&&o(this,p,"f").isEmpty("header");let t;t=a?`${`${this.colorPalette??"lightest"}`.replace(c,"")}er`:r?`${`${this.colorPalette??"lightest"}`.replace(c,"")}est`:this.colorPalette;const e="promo"===this.variant,i=a,{variant:n=""}=this,l=o(this,p,"f").hasSlotted("header"),s=o(this,p,"f").hasSlotted("footer"),m=o(this,p,"f").hasSlotted("image"),f=o(this,p,"f").hasSlotted(null),g=h` 4 5 <div id="header" 6 part="header" 7 class="${d({empty:!l})}"> 8 9 <slot name="header"></slot> 10 </div>`,v=h` 11 12 <div id="footer" 13 part="footer" 14 class="${d({empty:!s})}"> 15 16 <slot name="footer"></slot> 17 </div>`;return h` 18 19 <div id="container" 20 part="container" 21 class="${d({standard:i,body:f,header:l,footer:s,image:m,[n]:!!n,[t??""]:!!t})}">${e?"":g} 22 23 <div id="image" 24 part="image" 25 class="${d({empty:!m})}"> 26 27 <slot name="image"></slot> 28 </div> 29 30 <div id="body" 31 part="body" 32 class="${d({empty:!f})}"> 33 ${e?g:""} 34 35 <slot></slot> 36 ${e?v:""} 37 </div> 38 ${e?"":v} 39 </div> 40 `}};p=new WeakMap,f.styles=[m],a([n({reflect:!0,attribute:"color-palette"})],f.prototype,"colorPalette",void 0),a([n({reflect:!0})],f.prototype,"variant",void 0),a([n({reflect:!0,attribute:"full-width",type:Boolean})],f.prototype,"fullWidth",void 0),f=a([e("rh-card"),l,s],f);export{f as RhCard};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.