@illinois-toolkit/ilw-hero 1.0.1-beta → 1.1.1

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/package.json CHANGED
@@ -2,7 +2,8 @@
2
2
  "name": "@illinois-toolkit/ilw-hero",
3
3
  "description": "Illinois Toolkit: The Hero Image component adds a large picture at the top of the page.",
4
4
  "private": false,
5
- "version": "1.0.1-beta",
5
+ "license": "MIT",
6
+ "version": "1.1.1",
6
7
  "type": "module",
7
8
  "files": [
8
9
  "src/**",
@@ -11,21 +12,37 @@
11
12
  ],
12
13
  "exports": {
13
14
  ".": {
14
- "import": "./src/ilw-hero.js",
15
- "require": "./src/ilw-hero.cjs",
16
- "default": "./src/ilw-hero.js"
15
+ "import": "./dist/ilw-hero.js",
16
+ "require": "./dist/ilw-hero.cjs",
17
+ "default": "./dist/ilw-hero.js"
18
+ },
19
+ "./ilw-hero.css": {
20
+ "import": "./dist/ilw-hero.css"
17
21
  }
18
22
  },
23
+ "main": "./dist/ilw-hero.js",
24
+ "module": "./dist/ilw-hero.js",
19
25
  "scripts": {
20
26
  "dev": "vite",
21
- "build": "vite build --config vite.build.config.js --emptyOutDir",
27
+ "build": "tsc --noEmit && vite build --config vite.transpile.config.ts --emptyOutDir && vite build --config vite.build.config.ts --emptyOutDir",
22
28
  "preview": "vite preview",
23
- "prepack": "npm run build"
29
+ "prepack": "npm run build",
30
+ "test:axe": "playwright test",
31
+ "test:axe:github": "playwright test --config=playwright.ci.config.ts",
32
+ "test": "vitest run --browser.headless",
33
+ "test:browser": "vitest watch --browser chromium"
24
34
  },
25
35
  "dependencies": {
26
36
  "lit": "3.1.3"
27
37
  },
28
38
  "devDependencies": {
29
- "vite": "^5.2.0"
39
+ "@illinois-toolkit/ilw-core": "^1.0.5",
40
+ "@playwright/test": "^1.56.1",
41
+ "@vitest/browser": "^3.2.4",
42
+ "playwright": "^1.56.1",
43
+ "typescript": "^5.9.3",
44
+ "vite": "^7.1.11",
45
+ "vite-plugin-dts": "^4.5.4",
46
+ "vitest-browser-lit": "^0.1.0"
30
47
  }
31
48
  }
package/src/ilw-hero.css CHANGED
@@ -1,8 +1,8 @@
1
1
  :root {
2
2
  --ilw-hero--height: 223px;
3
3
  --ilw-hero--font: 700 2.25rem/2.25rem var(--il-font-sans);
4
- --ilw-hero--background: var(--il-blue);
5
- --ilw-hero--text-color: white;
4
+ --ilw-hero--background: var(--ilw-color--heading);
5
+ --ilw-hero--text-color: var(--ilw-color--background);
6
6
  --ilw-hero--text-width: 40%;
7
7
  --ilw-hero--shadow-color: rgba(0, 0, 0, 1);
8
8
  }
@@ -30,20 +30,20 @@ ilw-hero h1, ilw-hero h2, ilw-hero h3 {
30
30
  }
31
31
 
32
32
  ilw-hero[theme="orange"] {
33
- --ilw-hero--background: var(--il-orange);
34
- --ilw-hero--button-background-color: var(--il-blue);
35
- --ilw-hero--focused-button-foreground-color: var(--il-blue);
33
+ --ilw-hero--background: var(--ilw-color--orange--background);
34
+ --ilw-hero--button-background-color: var(--ilw-color--orange--control-accent);
35
+ --ilw-hero--focused-button-foreground-color: var(---ilw-color--orange--control-accent);
36
36
  }
37
37
 
38
38
  ilw-hero[theme="white"] {
39
- --ilw-hero--background: white;
40
- --ilw-hero--button-background-color: white;
41
- --ilw-hero--button-foreground-color: var(--il-blue);
42
- --ilw-hero--button-border-color: var(--il-blue);
43
- --ilw-hero--focused-button-background-color: var(--il-blue);
44
- --ilw-hero--focused-button-foreground-color: white;
45
- --ilw-hero--focused-button-border-color: var(--il-blue);
46
- --ilw-hero--text-color: #252525;
39
+ --ilw-hero--background: var(--ilw-color--white--background);
40
+ --ilw-hero--button-background-color: var(--ilw-color--white--control);
41
+ --ilw-hero--button-foreground-color: var(--ilw-color--white--control-text);
42
+ --ilw-hero--button-border-color: var(--ilw-color--white--control-text);
43
+ --ilw-hero--focused-button-background-color: var(--ilw-color--white--control-text);
44
+ --ilw-hero--focused-button-foreground-color: var(--ilw-color--white--control);
45
+ --ilw-hero--focused-button-border-color: var(--ilw-color--white--control-text);
46
+ --ilw-hero--text-color: var(--ilw-color--white--text);
47
47
  --ilw-hero--shadow-color: rgba(255, 255, 255, 1);
48
48
  }
49
49
 
@@ -16,6 +16,7 @@ export default css`
16
16
  width: 100vw;
17
17
  display: block;
18
18
  container-type: inline-size;
19
+ contain: layout;
19
20
  }
20
21
 
21
22
  .background {
@@ -159,4 +160,9 @@ img {
159
160
  width: var(--ilw-hero--text-width);
160
161
  }
161
162
  }
163
+ @media (max-width: 767px) {
164
+ .always-over .content-outer {
165
+ background-color: var(--ilw-hero--background);
166
+ }
167
+ }
162
168
  `;
@@ -0,0 +1,55 @@
1
+ import { LitElement, html, css } from 'lit';
2
+ import { customElement, property } from 'lit/decorators.js';
3
+ import styles from './ilw-hero.styles';
4
+ import './ilw-hero.css';
5
+
6
+ @customElement('ilw-hero')
7
+ export default class Hero extends LitElement {
8
+ @property({ type: String })
9
+ theme: string = '';
10
+
11
+ @property({ type: String, attribute: 'focus' })
12
+ focusType: string = '';
13
+
14
+ @property({ type: Boolean })
15
+ shadow: boolean = false;
16
+
17
+ @property({ type: Boolean })
18
+ collapse: boolean = false;
19
+
20
+ @property({ type: Boolean })
21
+ alwayson: boolean = false;
22
+
23
+ @property({ type: String })
24
+ align: string = '';
25
+
26
+ @property({ type: String })
27
+ width: string = '';
28
+
29
+ static override styles = styles;
30
+
31
+ get outerWidth(): string {
32
+ return this.width === 'full' || this.width === 'auto' ? 'fixed' : '';
33
+ }
34
+
35
+ override render() {
36
+ return html`
37
+ <div class="hero ${this.outerWidth} ${this.alwayson ? 'always-over' : ''}">
38
+ <div role="presentation" class="background ${this.collapse ? 'collapse' : ''}">
39
+ <slot name="background"></slot>
40
+ </div>
41
+ <div class="content-outer">
42
+ <div class="content-inner ${this.align.replace('-', ' ')}">
43
+ <slot></slot>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ `;
48
+ }
49
+ }
50
+
51
+ declare global {
52
+ interface HTMLElementTagNameMap {
53
+ 'ilw-hero': Hero;
54
+ }
55
+ }
package/dist/ilw-hero.cjs DELETED
@@ -1,189 +0,0 @@
1
- "use strict";/**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */const T=globalThis,B=T.ShadowRoot&&(T.ShadyCSS===void 0||T.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,D=Symbol(),I=new WeakMap;let Y=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==D)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(B&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=I.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&I.set(e,t))}return t}toString(){return this.cssText}};const ot=n=>new Y(typeof n=="string"?n:n+"",void 0,D),ht=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((i,s,o)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+n[o+1],n[0]);return new Y(e,n,D)},at=(n,t)=>{if(B)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),s=T.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,n.appendChild(i)}},W=B?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return ot(e)})(n):n;/**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:lt,defineProperty:ct,getOwnPropertyDescriptor:dt,getOwnPropertyNames:pt,getOwnPropertySymbols:ut,getPrototypeOf:$t}=Object,f=globalThis,V=f.trustedTypes,gt=V?V.emptyScript:"",R=f.reactiveElementPolyfillSupport,w=(n,t)=>n,j={toAttribute(n,t){switch(t){case Boolean:n=n?gt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},tt=(n,t)=>!lt(n,t),q={attribute:!0,type:String,converter:j,reflect:!1,hasChanged:tt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),f.litPropertyMetadata??(f.litPropertyMetadata=new WeakMap);class A extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=q){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&ct(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=dt(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get(){return s==null?void 0:s.call(this)},set(r){const l=s==null?void 0:s.call(this);o.call(this,r),this.requestUpdate(t,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??q}static _$Ei(){if(this.hasOwnProperty(w("elementProperties")))return;const t=$t(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(w("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(w("properties"))){const e=this.properties,i=[...pt(e),...ut(e)];for(const s of i)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(W(s))}else t!==void 0&&e.push(W(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return at(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var o;const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const r=(((o=i.converter)==null?void 0:o.toAttribute)!==void 0?i.converter:j).toAttribute(e,i.type);this._$Em=t,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,e){var o;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const r=i.getPropertyOptions(s),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((o=r.converter)==null?void 0:o.fromAttribute)!==void 0?r.converter:j;this._$Em=s,this[s]=l.fromAttribute(e,r.type),this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??tt)(this[t],e))return;this.P(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,r]of this._$Ep)this[o]=r;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[o,r]of s)r.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],r)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(s=>{var o;return(o=s.hostUpdate)==null?void 0:o.call(s)}),this.update(e)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[w("elementProperties")]=new Map,A[w("finalized")]=new Map,R==null||R({ReactiveElement:A}),(f.reactiveElementVersions??(f.reactiveElementVersions=[])).push("2.0.4");/**
10
- * @license
11
- * Copyright 2017 Google LLC
12
- * SPDX-License-Identifier: BSD-3-Clause
13
- */const S=globalThis,N=S.trustedTypes,J=N?N.createPolicy("lit-html",{createHTML:n=>n}):void 0,et="$lit$",g=`lit$${Math.random().toFixed(9).slice(2)}$`,it="?"+g,ft=`<${it}>`,y=document,C=()=>y.createComment(""),P=n=>n===null||typeof n!="object"&&typeof n!="function",st=Array.isArray,_t=n=>st(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",M=`[
14
- \f\r]`,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,K=/-->/g,F=/>/g,_=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,G=/"/g,nt=/^(?:script|style|textarea|title)$/i,mt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),yt=mt(1),v=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Q=new WeakMap,m=y.createTreeWalker(y,129);function rt(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return J!==void 0?J.createHTML(t):t}const At=(n,t)=>{const e=n.length-1,i=[];let s,o=t===2?"<svg>":"",r=x;for(let l=0;l<e;l++){const h=n[l];let c,p,a=-1,u=0;for(;u<h.length&&(r.lastIndex=u,p=r.exec(h),p!==null);)u=r.lastIndex,r===x?p[1]==="!--"?r=K:p[1]!==void 0?r=F:p[2]!==void 0?(nt.test(p[2])&&(s=RegExp("</"+p[2],"g")),r=_):p[3]!==void 0&&(r=_):r===_?p[0]===">"?(r=s??x,a=-1):p[1]===void 0?a=-2:(a=r.lastIndex-p[2].length,c=p[1],r=p[3]===void 0?_:p[3]==='"'?G:Z):r===G||r===Z?r=_:r===K||r===F?r=x:(r=_,s=void 0);const $=r===_&&n[l+1].startsWith("/>")?" ":"";o+=r===x?h+ft:a>=0?(i.push(c),h.slice(0,a)+et+h.slice(a)+g+$):h+g+(a===-2?l:$)}return[rt(n,o+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};class U{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const l=t.length-1,h=this.parts,[c,p]=At(t,e);if(this.el=U.createElement(c,i),m.currentNode=this.el.content,e===2){const a=this.el.content.firstChild;a.replaceWith(...a.childNodes)}for(;(s=m.nextNode())!==null&&h.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(const a of s.getAttributeNames())if(a.endsWith(et)){const u=p[r++],$=s.getAttribute(a).split(g),H=/([.?@])?(.*)/.exec(u);h.push({type:1,index:o,name:H[2],strings:$,ctor:H[1]==="."?bt:H[1]==="?"?xt:H[1]==="@"?wt:O}),s.removeAttribute(a)}else a.startsWith(g)&&(h.push({type:6,index:o}),s.removeAttribute(a));if(nt.test(s.tagName)){const a=s.textContent.split(g),u=a.length-1;if(u>0){s.textContent=N?N.emptyScript:"";for(let $=0;$<u;$++)s.append(a[$],C()),m.nextNode(),h.push({type:2,index:++o});s.append(a[u],C())}}}else if(s.nodeType===8)if(s.data===it)h.push({type:2,index:o});else{let a=-1;for(;(a=s.data.indexOf(g,a+1))!==-1;)h.push({type:7,index:o}),a+=g.length-1}o++}}static createElement(t,e){const i=y.createElement("template");return i.innerHTML=t,i}}function b(n,t,e=n,i){var r,l;if(t===v)return t;let s=i!==void 0?(r=e._$Co)==null?void 0:r[i]:e._$Cl;const o=P(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==o&&((l=s==null?void 0:s._$AO)==null||l.call(s,!1),o===void 0?s=void 0:(s=new o(n),s._$AT(n,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=s:e._$Cl=s),s!==void 0&&(t=b(n,s._$AS(n,t.values),s,i)),t}class vt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=((t==null?void 0:t.creationScope)??y).importNode(e,!0);m.currentNode=s;let o=m.nextNode(),r=0,l=0,h=i[0];for(;h!==void 0;){if(r===h.index){let c;h.type===2?c=new k(o,o.nextSibling,this,t):h.type===1?c=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(c=new St(o,this,t)),this._$AV.push(c),h=i[++l]}r!==(h==null?void 0:h.index)&&(o=m.nextNode(),r++)}return m.currentNode=y,s}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class k{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=b(this,t,e),P(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==v&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):_t(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==d&&P(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=U.createElement(rt(i.h,i.h[0]),this.options)),i);if(((o=this._$AH)==null?void 0:o._$AD)===s)this._$AH.p(e);else{const r=new vt(s,this),l=r.u(this.options);r.p(e),this.T(l),this._$AH=r}}_$AC(t){let e=Q.get(t.strings);return e===void 0&&Q.set(t.strings,e=new U(t)),e}k(t){st(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new k(this.S(C()),this.S(C()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class O{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=d}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(o===void 0)t=b(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==v,r&&(this._$AH=t);else{const l=t;let h,c;for(t=o[0],h=0;h<o.length-1;h++)c=b(this,l[i+h],e,h),c===v&&(c=this._$AH[h]),r||(r=!P(c)||c!==this._$AH[h]),c===d?t=d:t!==d&&(t+=(c??"")+o[h+1]),this._$AH[h]=c}r&&!s&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class bt extends O{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class xt extends O{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class wt extends O{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=b(this,t,e,0)??d)===v)return;const i=this._$AH,s=t===d&&i!==d||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==d&&(i===d||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class St{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){b(this,t)}}const z=S.litHtmlPolyfillSupport;z==null||z(U,k),(S.litHtmlVersions??(S.litHtmlVersions=[])).push("3.1.3");const Et=(n,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const o=(e==null?void 0:e.renderBefore)??null;i._$litPart$=s=new k(t.insertBefore(C(),o),o,void 0,e??{})}return s._$AI(n),s};/**
16
- * @license
17
- * Copyright 2017 Google LLC
18
- * SPDX-License-Identifier: BSD-3-Clause
19
- */class E extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Et(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return v}}var X;E._$litElement$=!0,E.finalized=!0,(X=globalThis.litElementHydrateSupport)==null||X.call(globalThis,{LitElement:E});const L=globalThis.litElementPolyfillSupport;L==null||L({LitElement:E});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.5");const Ct=ht`
20
-
21
- .hero {
22
- position: relative;
23
- }
24
-
25
- .hero.fixed {
26
- left:50%;
27
- margin-left: -50vw;
28
- margin-right: -50vw;
29
- padding-left: 0;
30
- padding-right: 0;
31
- right: 50%;
32
- width: 100vw;
33
- display: block;
34
- container-type: inline-size;
35
- }
36
-
37
- .background {
38
- position: relative;
39
- width: 100%;
40
- height: var(--ilw-hero--height, 223px);
41
- background-color: var(--ilw-hero--background);
42
- }
43
-
44
- .always-over .background {
45
- position: absolute;
46
- width: 100%;
47
- top: 0;
48
- left: 0;
49
- z-index: 1;
50
- }
51
-
52
- .background.collapse {
53
- display: none;
54
- }
55
-
56
- img {
57
- display: block;
58
- position: relative;
59
- object-fit: cover;
60
- object-position: center;
61
- }
62
-
63
- .content-outer {
64
- background: var(--ilw-hero--background);
65
- position: relative;
66
- z-index: 100;
67
- padding: 0 20px;
68
- }
69
-
70
- .always-over .content-outer {
71
- background: transparent;
72
- height: var(--ilw-hero--height, 223px);
73
- display: flex;
74
- }
75
-
76
- .always-over .content-outer .content-inner {
77
- display: flex;
78
- flex-direction: column;
79
- max-width: 1200px;
80
- }
81
-
82
- .content-inner {
83
- padding: 18px 0 36px 0;
84
- }
85
-
86
- @media (min-width: 576px) {
87
- .content-inner {
88
- padding: 36px 0px 72px;
89
- }
90
- }
91
-
92
- @media (min-width: 767px) {
93
- .background {
94
- position: absolute;
95
- width: 100%;
96
- top: 0;
97
- left: 0;
98
- z-index: 1;
99
- }
100
- .background img {
101
- position: absolute;
102
- width: 100%;
103
- height: 100%;
104
- top: 0;
105
- left: 0;
106
- z-index: 101;
107
- }
108
- .background.collapse {
109
- display: block;
110
- }
111
-
112
-
113
- .content-outer {
114
- background: transparent;
115
- height: var(--ilw-hero--height, 223px);
116
- display: flex;
117
- }
118
-
119
- .content-inner {
120
- width: 60%;
121
- margin: auto;
122
- display: flex;
123
- flex-direction: column;
124
- text-align: center;
125
- align-items: center;
126
- max-width: 1200px;
127
- }
128
-
129
- .content-inner.left {
130
- text-align: left;
131
- align-items: flex-start;
132
- margin-left: 100px;
133
- }
134
-
135
- .content-inner.right {
136
- text-align: right;
137
- align-items: flex-end;
138
- margin-right: 100px;
139
- }
140
-
141
- .content-inner.top {
142
- margin-top: 0;
143
- }
144
-
145
- .content-inner.bottom {
146
- margin-bottom: 0;
147
- }
148
- .content-inner.top-left {
149
- text-align: left;
150
- align-items: flex-start;
151
- margin: 0 auto auto 100px;
152
- }
153
-
154
- .content-inner.top-right {
155
- text-align: left;
156
- align-items: flex-start;
157
- margin: 0 100px auto auto;
158
- }
159
-
160
- .content-inner.bottom-left {
161
- text-align: right;
162
- align-items: flex-end;
163
- margin: auto auto 0 100px;
164
- }
165
-
166
- .content-inner.bottom-right {
167
- text-align: right;
168
- align-items: flex-end;
169
- margin: auto 100px 0 auto;
170
- }
171
- }
172
-
173
- @media (min-width: 992px) {
174
- .content-inner {
175
- width: var(--ilw-hero--text-width);
176
- }
177
- }
178
- `;class Pt extends E{static get properties(){return{theme:{type:String,attribute:!0},focus:{type:String,attribute:!0},shadow:{type:Boolean,attribute:!0},collapse:{type:Boolean,attribute:!0},alwayson:{type:Boolean,attribute:!0},align:{type:String,attribute:!0},width:{type:String,attribute:!0}}}static get styles(){return Ct}constructor(){super(),this.align="",this.focus="",this.shadow=!1,this.collapse=!1,this.alwayson=!1,this.theme="",this.width=""}get outerWidth(){return this.width=="full"||this.width=="auto"?"fixed":""}render(){return yt`
179
- <div class="hero ${this.outerWidth} ${this.alwayson?"always-over":""}">
180
- <div role="presentation" class="background ${this.collapse?"collapse":""}">
181
- <slot name="background"></slot>
182
- </div>
183
- <div class="content-outer">
184
- <div class="content-inner ${this.align.replace("-"," ")}">
185
- <slot></slot>
186
- </div>
187
- </div>
188
- </div>
189
- `}}customElements.define("ilw-hero",Pt);
@@ -1,189 +0,0 @@
1
- (function(_){typeof define=="function"&&define.amd?define(_):_()})(function(){"use strict";/**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */var rt;const _=globalThis,R=_.ShadowRoot&&(_.ShadyCSS===void 0||_.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,M=Symbol(),I=new WeakMap;let W=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==M)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(R&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=I.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&I.set(e,t))}return t}toString(){return this.cssText}};const ot=n=>new W(typeof n=="string"?n:n+"",void 0,M),ht=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((i,s,o)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+n[o+1],n[0]);return new W(e,n,M)},at=(n,t)=>{if(R)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),s=_.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,n.appendChild(i)}},V=R?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return ot(e)})(n):n;/**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:lt,defineProperty:ct,getOwnPropertyDescriptor:dt,getOwnPropertyNames:pt,getOwnPropertySymbols:ut,getPrototypeOf:$t}=Object,$=globalThis,q=$.trustedTypes,gt=q?q.emptyScript:"",z=$.reactiveElementPolyfillSupport,w=(n,t)=>n,L={toAttribute(n,t){switch(t){case Boolean:n=n?gt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},J=(n,t)=>!lt(n,t),K={attribute:!0,type:String,converter:L,reflect:!1,hasChanged:J};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),$.litPropertyMetadata??($.litPropertyMetadata=new WeakMap);class v extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=K){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&ct(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=dt(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get(){return s==null?void 0:s.call(this)},set(r){const l=s==null?void 0:s.call(this);o.call(this,r),this.requestUpdate(t,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??K}static _$Ei(){if(this.hasOwnProperty(w("elementProperties")))return;const t=$t(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(w("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(w("properties"))){const e=this.properties,i=[...pt(e),...ut(e)];for(const s of i)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(V(s))}else t!==void 0&&e.push(V(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return at(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var o;const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const r=(((o=i.converter)==null?void 0:o.toAttribute)!==void 0?i.converter:L).toAttribute(e,i.type);this._$Em=t,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,e){var o;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const r=i.getPropertyOptions(s),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((o=r.converter)==null?void 0:o.fromAttribute)!==void 0?r.converter:L;this._$Em=s,this[s]=l.fromAttribute(e,r.type),this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??J)(this[t],e))return;this.P(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,r]of this._$Ep)this[o]=r;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[o,r]of s)r.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],r)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(s=>{var o;return(o=s.hostUpdate)==null?void 0:o.call(s)}),this.update(e)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[w("elementProperties")]=new Map,v[w("finalized")]=new Map,z==null||z({ReactiveElement:v}),($.reactiveElementVersions??($.reactiveElementVersions=[])).push("2.0.4");/**
10
- * @license
11
- * Copyright 2017 Google LLC
12
- * SPDX-License-Identifier: BSD-3-Clause
13
- */const S=globalThis,T=S.trustedTypes,F=T?T.createPolicy("lit-html",{createHTML:n=>n}):void 0,Z="$lit$",g=`lit$${Math.random().toFixed(9).slice(2)}$`,G="?"+g,ft=`<${G}>`,m=document,E=()=>m.createComment(""),C=n=>n===null||typeof n!="object"&&typeof n!="function",Q=Array.isArray,_t=n=>Q(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",j=`[
14
- \f\r]`,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,X=/-->/g,Y=/>/g,y=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),tt=/'/g,et=/"/g,it=/^(?:script|style|textarea|title)$/i,mt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),yt=mt(1),b=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),st=new WeakMap,A=m.createTreeWalker(m,129);function nt(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return F!==void 0?F.createHTML(t):t}const At=(n,t)=>{const e=n.length-1,i=[];let s,o=t===2?"<svg>":"",r=P;for(let l=0;l<e;l++){const h=n[l];let d,p,a=-1,u=0;for(;u<h.length&&(r.lastIndex=u,p=r.exec(h),p!==null);)u=r.lastIndex,r===P?p[1]==="!--"?r=X:p[1]!==void 0?r=Y:p[2]!==void 0?(it.test(p[2])&&(s=RegExp("</"+p[2],"g")),r=y):p[3]!==void 0&&(r=y):r===y?p[0]===">"?(r=s??P,a=-1):p[1]===void 0?a=-2:(a=r.lastIndex-p[2].length,d=p[1],r=p[3]===void 0?y:p[3]==='"'?et:tt):r===et||r===tt?r=y:r===X||r===Y?r=P:(r=y,s=void 0);const f=r===y&&n[l+1].startsWith("/>")?" ":"";o+=r===P?h+ft:a>=0?(i.push(d),h.slice(0,a)+Z+h.slice(a)+g+f):h+g+(a===-2?l:f)}return[nt(n,o+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};class U{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const l=t.length-1,h=this.parts,[d,p]=At(t,e);if(this.el=U.createElement(d,i),A.currentNode=this.el.content,e===2){const a=this.el.content.firstChild;a.replaceWith(...a.childNodes)}for(;(s=A.nextNode())!==null&&h.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(const a of s.getAttributeNames())if(a.endsWith(Z)){const u=p[r++],f=s.getAttribute(a).split(g),O=/([.?@])?(.*)/.exec(u);h.push({type:1,index:o,name:O[2],strings:f,ctor:O[1]==="."?bt:O[1]==="?"?xt:O[1]==="@"?wt:N}),s.removeAttribute(a)}else a.startsWith(g)&&(h.push({type:6,index:o}),s.removeAttribute(a));if(it.test(s.tagName)){const a=s.textContent.split(g),u=a.length-1;if(u>0){s.textContent=T?T.emptyScript:"";for(let f=0;f<u;f++)s.append(a[f],E()),A.nextNode(),h.push({type:2,index:++o});s.append(a[u],E())}}}else if(s.nodeType===8)if(s.data===G)h.push({type:2,index:o});else{let a=-1;for(;(a=s.data.indexOf(g,a+1))!==-1;)h.push({type:7,index:o}),a+=g.length-1}o++}}static createElement(t,e){const i=m.createElement("template");return i.innerHTML=t,i}}function x(n,t,e=n,i){var r,l;if(t===b)return t;let s=i!==void 0?(r=e._$Co)==null?void 0:r[i]:e._$Cl;const o=C(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==o&&((l=s==null?void 0:s._$AO)==null||l.call(s,!1),o===void 0?s=void 0:(s=new o(n),s._$AT(n,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=s:e._$Cl=s),s!==void 0&&(t=x(n,s._$AS(n,t.values),s,i)),t}class vt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=((t==null?void 0:t.creationScope)??m).importNode(e,!0);A.currentNode=s;let o=A.nextNode(),r=0,l=0,h=i[0];for(;h!==void 0;){if(r===h.index){let d;h.type===2?d=new k(o,o.nextSibling,this,t):h.type===1?d=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(d=new St(o,this,t)),this._$AV.push(d),h=i[++l]}r!==(h==null?void 0:h.index)&&(o=A.nextNode(),r++)}return A.currentNode=m,s}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class k{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=(s==null?void 0:s.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=x(this,t,e),C(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==b&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):_t(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==c&&C(this._$AH)?this._$AA.nextSibling.data=t:this.T(m.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:i}=t,s=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=U.createElement(nt(i.h,i.h[0]),this.options)),i);if(((o=this._$AH)==null?void 0:o._$AD)===s)this._$AH.p(e);else{const r=new vt(s,this),l=r.u(this.options);r.p(e),this.T(l),this._$AH=r}}_$AC(t){let e=st.get(t.strings);return e===void 0&&st.set(t.strings,e=new U(t)),e}k(t){Q(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new k(this.S(E()),this.S(E()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class N{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=c}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(o===void 0)t=x(this,t,e,0),r=!C(t)||t!==this._$AH&&t!==b,r&&(this._$AH=t);else{const l=t;let h,d;for(t=o[0],h=0;h<o.length-1;h++)d=x(this,l[i+h],e,h),d===b&&(d=this._$AH[h]),r||(r=!C(d)||d!==this._$AH[h]),d===c?t=c:t!==c&&(t+=(d??"")+o[h+1]),this._$AH[h]=d}r&&!s&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class bt extends N{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}}class xt extends N{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}}class wt extends N{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=x(this,t,e,0)??c)===b)return;const i=this._$AH,s=t===c&&i!==c||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==c&&(i===c||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class St{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){x(this,t)}}const B=S.litHtmlPolyfillSupport;B==null||B(U,k),(S.litHtmlVersions??(S.litHtmlVersions=[])).push("3.1.3");const Et=(n,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let s=i._$litPart$;if(s===void 0){const o=(e==null?void 0:e.renderBefore)??null;i._$litPart$=s=new k(t.insertBefore(E(),o),o,void 0,e??{})}return s._$AI(n),s};/**
16
- * @license
17
- * Copyright 2017 Google LLC
18
- * SPDX-License-Identifier: BSD-3-Clause
19
- */class H extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Et(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return b}}H._$litElement$=!0,H.finalized=!0,(rt=globalThis.litElementHydrateSupport)==null||rt.call(globalThis,{LitElement:H});const D=globalThis.litElementPolyfillSupport;D==null||D({LitElement:H}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.0.5");const Ct=ht`
20
-
21
- .hero {
22
- position: relative;
23
- }
24
-
25
- .hero.fixed {
26
- left:50%;
27
- margin-left: -50vw;
28
- margin-right: -50vw;
29
- padding-left: 0;
30
- padding-right: 0;
31
- right: 50%;
32
- width: 100vw;
33
- display: block;
34
- container-type: inline-size;
35
- }
36
-
37
- .background {
38
- position: relative;
39
- width: 100%;
40
- height: var(--ilw-hero--height, 223px);
41
- background-color: var(--ilw-hero--background);
42
- }
43
-
44
- .always-over .background {
45
- position: absolute;
46
- width: 100%;
47
- top: 0;
48
- left: 0;
49
- z-index: 1;
50
- }
51
-
52
- .background.collapse {
53
- display: none;
54
- }
55
-
56
- img {
57
- display: block;
58
- position: relative;
59
- object-fit: cover;
60
- object-position: center;
61
- }
62
-
63
- .content-outer {
64
- background: var(--ilw-hero--background);
65
- position: relative;
66
- z-index: 100;
67
- padding: 0 20px;
68
- }
69
-
70
- .always-over .content-outer {
71
- background: transparent;
72
- height: var(--ilw-hero--height, 223px);
73
- display: flex;
74
- }
75
-
76
- .always-over .content-outer .content-inner {
77
- display: flex;
78
- flex-direction: column;
79
- max-width: 1200px;
80
- }
81
-
82
- .content-inner {
83
- padding: 18px 0 36px 0;
84
- }
85
-
86
- @media (min-width: 576px) {
87
- .content-inner {
88
- padding: 36px 0px 72px;
89
- }
90
- }
91
-
92
- @media (min-width: 767px) {
93
- .background {
94
- position: absolute;
95
- width: 100%;
96
- top: 0;
97
- left: 0;
98
- z-index: 1;
99
- }
100
- .background img {
101
- position: absolute;
102
- width: 100%;
103
- height: 100%;
104
- top: 0;
105
- left: 0;
106
- z-index: 101;
107
- }
108
- .background.collapse {
109
- display: block;
110
- }
111
-
112
-
113
- .content-outer {
114
- background: transparent;
115
- height: var(--ilw-hero--height, 223px);
116
- display: flex;
117
- }
118
-
119
- .content-inner {
120
- width: 60%;
121
- margin: auto;
122
- display: flex;
123
- flex-direction: column;
124
- text-align: center;
125
- align-items: center;
126
- max-width: 1200px;
127
- }
128
-
129
- .content-inner.left {
130
- text-align: left;
131
- align-items: flex-start;
132
- margin-left: 100px;
133
- }
134
-
135
- .content-inner.right {
136
- text-align: right;
137
- align-items: flex-end;
138
- margin-right: 100px;
139
- }
140
-
141
- .content-inner.top {
142
- margin-top: 0;
143
- }
144
-
145
- .content-inner.bottom {
146
- margin-bottom: 0;
147
- }
148
- .content-inner.top-left {
149
- text-align: left;
150
- align-items: flex-start;
151
- margin: 0 auto auto 100px;
152
- }
153
-
154
- .content-inner.top-right {
155
- text-align: left;
156
- align-items: flex-start;
157
- margin: 0 100px auto auto;
158
- }
159
-
160
- .content-inner.bottom-left {
161
- text-align: right;
162
- align-items: flex-end;
163
- margin: auto auto 0 100px;
164
- }
165
-
166
- .content-inner.bottom-right {
167
- text-align: right;
168
- align-items: flex-end;
169
- margin: auto 100px 0 auto;
170
- }
171
- }
172
-
173
- @media (min-width: 992px) {
174
- .content-inner {
175
- width: var(--ilw-hero--text-width);
176
- }
177
- }
178
- `;class Pt extends H{static get properties(){return{theme:{type:String,attribute:!0},focus:{type:String,attribute:!0},shadow:{type:Boolean,attribute:!0},collapse:{type:Boolean,attribute:!0},alwayson:{type:Boolean,attribute:!0},align:{type:String,attribute:!0},width:{type:String,attribute:!0}}}static get styles(){return Ct}constructor(){super(),this.align="",this.focus="",this.shadow=!1,this.collapse=!1,this.alwayson=!1,this.theme="",this.width=""}get outerWidth(){return this.width=="full"||this.width=="auto"?"fixed":""}render(){return yt`
179
- <div class="hero ${this.outerWidth} ${this.alwayson?"always-over":""}">
180
- <div role="presentation" class="background ${this.collapse?"collapse":""}">
181
- <slot name="background"></slot>
182
- </div>
183
- <div class="content-outer">
184
- <div class="content-inner ${this.align.replace("-"," ")}">
185
- <slot></slot>
186
- </div>
187
- </div>
188
- </div>
189
- `}}customElements.define("ilw-hero",Pt)});
package/src/ilw-hero.js DELETED
@@ -1,54 +0,0 @@
1
- import { LitElement, html } from 'lit';
2
- import styles from './ilw-hero.styles';
3
- import './ilw-hero.css';
4
-
5
- class Hero extends LitElement {
6
-
7
- static get properties() {
8
- return {
9
- theme: { type: String, attribute: true },
10
- focus: { type: String, attribute: true },
11
- shadow: { type: Boolean, attribute: true },
12
- collapse: { type: Boolean, attribute: true },
13
- alwayson: { type: Boolean, attribute: true },
14
- align: { type: String, attribute: true },
15
- width: { type: String, attribute: true }
16
- };
17
- }
18
-
19
- static get styles() {
20
- return styles;
21
- }
22
-
23
- constructor() {
24
- super();
25
- this.align = '';
26
- this.focus = '';
27
- this.shadow = false;
28
- this.collapse = false;
29
- this.alwayson = false;
30
- this.theme = '';
31
- this.width = '';
32
- }
33
-
34
- get outerWidth() {
35
- return this.width == 'full' || this.width == 'auto' ? 'fixed' : '';
36
- }
37
-
38
- render() {
39
- return html`
40
- <div class="hero ${this.outerWidth} ${this.alwayson ? 'always-over' : ''}">
41
- <div role="presentation" class="background ${this.collapse ? 'collapse' : ''}">
42
- <slot name="background"></slot>
43
- </div>
44
- <div class="content-outer">
45
- <div class="content-inner ${this.align.replace('-', ' ')}">
46
- <slot></slot>
47
- </div>
48
- </div>
49
- </div>
50
- `;
51
- }
52
- }
53
-
54
- customElements.define('ilw-hero', Hero);