PageSourceSearch

https://vex.pl/application/assets/storefront/chunk-phoenix_components_switch.vCOCgoI.js

js vex.pl collected 2026-10-02 23:25:12 UTC 4,178 bytes, 21 lines download raw bytes

1import{_ as e,a as t}from"./chunk-vendor-di.Bh23gdA.js";import{P as h,e as o,w as C,r as l,$ as c}from"./chunk-vendor-lit.NvY0u02.js";import{p as y}from"./chunk-phoenix_custom_element.-3oJuZO.js";import{c as _}from"./chunk-index.D5AUA1V.js";import{C as m,B as w,a as g}from"./chunk-control_props_sync_consumer_controller.B1LB2a5.js";import{C as b,L as u}from"./chunk-label_constants.C8KBU4E.js";import"./chunk-vendor-lodash.CWHFt7Z.js";import"./chunk-behavior_subject.BGn-8a7.js";import"./chunk-subject.nuVoBpB.js";import"./chunk-context_provider_controller.CCbkLM7.js";import"./chunk-observer.oe4_irb.js";import"./chunk-context_consumer_controller.DQ84A7A.js";const s="switch",r={switch:s,switchError:`${s}_error`,switchDisabled:`${s}_disabled`,switchReadonly:`${s}_readonly`,switchContent:`${s}__content`,switchDescription:`${s}__description`,switchControl:`${s}__control`,switchInput:`${s}__input`,switchLabel:`${s}__label`},p={label:"label",description:"description"},v={change:"change"};let i=class extends h{constructor(){super(),new m({host:this,propsToSync:[...Object.keys(w),b.checked]})}connectedCallback(){super.connectedCallback(),this.classList.add(r.switch);const a=_({[r.switchDisabled]:this.disabled,[r.switchError]:this.error,[r.switchReadonly]:this.readonly});a&&this.classList.add(a)}};e([o({type:String}),t("design:type",String)],i.prototype,"controlId",void 0);e([o({type:String}),t("design:type",String)],i.prototype,"controlName",void 0);e([o({type:Boolean}),t("design:type",Boolean)],i.prototype,"disabled",void 0);e([o({type:Boolean}),t("design:type",Boolean)],i.prototype,"required",void 0);e([o({type:Boolean}),t("design:type",Boolean)],i.prototype,"hidden",void 0);e([o({type:Boolean}),t("design:type",Boolean)],i.prototype,"readonly",void 0);e([o({type:Boolean}),t("design:type",Boolean)],i.prototype,"checked",void 0);e([o({type:Boolean}),t("design:type",Boolean)],i.prototype,"error",void 0);e([o({type:String}),t("design:type",String)],i.prototype,"value",void 0);i=e([y("h-switch"),t("design:paramtypes",[])],i);let d=class extends h{constructor(){super(),new g({host:this})}connectedCallback(){super.connectedCallback(),this.classList.add(r.switchContent)}render(){return super.render(),c`
2            <label class="${u.label}" for="${l(this.controlId)}">${this.getSlot(p.label)}</label>
3
4            ${this.hasSlot(p.description)?c` <div class="${r.switchDescription}">${this.getSlot(p.description)}</div> `:C}
5        `}};e([o({type:String}),t("design:type",String)],d.prototype,"controlId",void 0);d=e([y("h-switch-content"),t("design:paramtypes",[])],d);let n=class extends h{constructor(){super(),this._handleChangeEvent=a=>{this.emitCustomEvent(v.change,{detail:a})},new g({host:this})}connectedCallback(){super.connectedCallback(),this.classList.add(r.switchControl)}render(){return super.render(),c`
6            <input
7                type="checkbox"
8                class="${r.switchInput}"
9                id="${l(this.controlId)}"
10                name="${l(this.controlName)}"
11                value="${l(this.value)}"
12                ?disabled="${this.disabled}"
13                ?required="${this.required}"
14                ?readonly="${this.readonly}"
15                ?hidden="${this.hidden}"
16                ?checked="${this.checked}"
17                @change="${this._handleChangeEvent}"
18            />
19
20            <label class="${r.switchLabel}" for="${this.controlId}"></label>
21        `}};e([o({type:String}),t("design:type",String)],n.prototype,"controlId",void 0);e([o({type:String}),t("design:type",String)],n.prototype,"controlName",void 0);e([o({type:Boolean}),t("design:type",Boolean)],n.prototype,"disabled",void 0);e([o({type:Boolean}),t("design:type",Boolean)],n.prototype,"required",void 0);e([o({type:Boolean}),t("design:type",Boolean)],n.prototype,"hidden",void 0);e([o({type:Boolean}),t("design:type",Boolean)],n.prototype,"readonly",void 0);e([o({type:Boolean}),t("design:type",Boolean)],n.prototype,"checked",void 0);e([o({type:String}),t("design:type",String)],n.prototype,"value",void 0);n=e([y("h-switch-control"),t("design:paramtypes",[])],n);requestAnimationFrame(()=>{});
21globalThis.__phoenix_wc__=[i,d,n];

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.