PageSourceSearch

https://chilewich.com/cdn/shop/t/334/assets/component-header.js?v=92586311779958975441790255856

js chilewich.com collected 2026-09-25 20:49:53 UTC 2,902 bytes, 49 lines download raw bytes

1import{LitElement,css,html}from"@lit";class NovaHeader extends LitElement{static properties={isSticky:{type:Boolean,attribute:"is-sticky"},isTransparent:{type:Boolean,attribute:"is-transparent"},isScrolled:{type:Boolean,reflect:!0,attribute:"is-scrolled"},isHovered:{type:Boolean,reflect:!0,attribute:"is-hovered"},isDrawerOpen:{type:Boolean,reflect:!0,attribute:"is-drawer-open"}};constructor(){super(),this.isScrolled=!1,this.isHovered=!1,this.isDrawerOpen=!1}connectedCallback(){super.connectedCallback(),this.isSticky&&this.parentElement.classList.add("is-sticky"),window.addEventListener("scroll",this.onScrollHandler),this.addEventListener("mouseover",this.onHoverHandler),this.addEventListener("mouseout",this.offHoverHandler),window.addEventListener("nova:header-drawer:open",this.headerDrawerOpen),window.addEventListener("nova:header-drawer:close",this.headerDrawerClose)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.onScrollHandler),this.removeEventListener("mouseover",this.onHoverHandler),this.removeEventListener("mouseout",this.offHoverHandler),window.removeEventListener("nova:header-drawer:open",this.headerDrawerOpen),window.removeEventListener("nova:header-drawer:close",this.headerDrawerClose)}onScrollHandler=()=>{(window.pageYOffset||document.documentElement.scrollTop)>0?this.isScrolled||(this.isScrolled=!0):this.isScrolled&&(this.isScrolled=!1)};onHoverHandler=()=>{this.isHovered||(this.isHovered=!0)};offHoverHandler=()=>{this.isHovered&&(this.isHovered=!1)};headerDrawerOpen=()=>{this.isDrawerOpen||(this.isDrawerOpen=!0)};headerDrawerClose=()=>{this.isDrawerOpen&&(this.isDrawerOpen=!1)};render(){return html`
2      <div class="container">
3        <slot></slot>
4      </div>
5    `}static styles=css`
6    :host {
7      display: block;
8      position: relative;
9      background-color: var(--header-bg-color);
10      transition: background-color 250ms;
11      z-index: var(--nova-z-index-sticky);
12    }
13
14    :host([is-sticky]) {
15      position: sticky;
16      top: 0;
17      left: 0;
18      right: 0;
19    }
20
21    :host([is-transparent]) {
22      position: absolute;
23      top: 0;
24      left: 0;
25      right: 0;
26    }
27
28    :host([is-sticky][is-transparent]) {
29      position: fixed;
30    }
31
32    :host([is-transparent][is-sticky][is-scrolled]),
33    :host([is-transparent][is-sticky][is-hovered]),
34    :host([is-transparent][is-sticky][is-drawer-open]) {
35      background-color: var(--nova-brand-reverse);
36    }
37
38    .container {
39      background-color: var(--nova-background, transparent);
40      left: 0;
41      top: 0;
42      transform: translateY(0);
43      transition: transform var(--nova-duration-long, 1000ms);
44      width: 100%;
45      z-index: 10;
46      position: relative;
47    }
48  `}customElements.define("nova-header",NovaHeader);
49//# sourceMappingURL=/cdn/shop/t/334/assets/component-header.js.map?v=92586311779958975441790255856

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.