forms-reactive
Version:
Reactive Form Web Component
2 lines • 5.87 kB
JavaScript
import{r as t,h as n,H as i,e}from"./p-3e1171f6.js";import{c as o}from"./p-100c2286.js";import{g as r}from"./p-9c83f640.js";const a=":host{--background:var(--ion-color-primary, #0054e9);--color:var(--ion-color-primary-contrast, #fff);background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit)}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}.button-native{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;-webkit-padding-start:0.7em;padding-inline-start:0.7em;-webkit-padding-end:0.7em;padding-inline-end:0.7em;padding-top:0;padding-bottom:0;display:inline-block;position:relative;width:100%;height:100%;border:0;outline:none;background:transparent;cursor:pointer;appearance:none;box-sizing:border-box}.button-inner{display:flex;flex-flow:column nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%}.horizontal-wrapper{display:flex;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%}::slotted(*){flex-shrink:0}::slotted([slot=start]){-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:5px;margin-inline-end:5px;margin-top:0;margin-bottom:0}::slotted([slot=end]){-webkit-margin-start:5px;margin-inline-start:5px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0}::slotted([slot=icon-only]){padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:10px;margin-inline-end:10px;margin-top:0;margin-bottom:0;min-width:0.9em;font-size:1.8em}:host(.item-option-expandable){flex-shrink:0;transition-duration:0;transition-property:none;transition-timing-function:cubic-bezier(0.65, 0.05, 0.36, 1)}:host(.item-option-disabled){pointer-events:none}:host(.item-option-disabled) .button-native{cursor:default;opacity:0.5;pointer-events:none}:host{font-size:clamp(16px, 1rem, 35.2px)}:host(.ion-activated){background:var(--ion-color-primary-shade, #004acd)}:host(.ion-color.ion-activated){background:var(--ion-color-shade)}";const s=a;const d=":host{--background:var(--ion-color-primary, #0054e9);--color:var(--ion-color-primary-contrast, #fff);background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit)}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}.button-native{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;-webkit-padding-start:0.7em;padding-inline-start:0.7em;-webkit-padding-end:0.7em;padding-inline-end:0.7em;padding-top:0;padding-bottom:0;display:inline-block;position:relative;width:100%;height:100%;border:0;outline:none;background:transparent;cursor:pointer;appearance:none;box-sizing:border-box}.button-inner{display:flex;flex-flow:column nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%}.horizontal-wrapper{display:flex;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%}::slotted(*){flex-shrink:0}::slotted([slot=start]){-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:5px;margin-inline-end:5px;margin-top:0;margin-bottom:0}::slotted([slot=end]){-webkit-margin-start:5px;margin-inline-start:5px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0}::slotted([slot=icon-only]){padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:10px;margin-inline-end:10px;margin-top:0;margin-bottom:0;min-width:0.9em;font-size:1.8em}:host(.item-option-expandable){flex-shrink:0;transition-duration:0;transition-property:none;transition-timing-function:cubic-bezier(0.65, 0.05, 0.36, 1)}:host(.item-option-disabled){pointer-events:none}:host(.item-option-disabled) .button-native{cursor:default;opacity:0.5;pointer-events:none}:host{font-size:0.875rem;font-weight:500;text-transform:uppercase}";const l=d;const c=class{constructor(n){t(this,n);this.onClick=t=>{const n=t.target.closest("ion-item-option");if(n){t.preventDefault()}};this.color=undefined;this.disabled=false;this.download=undefined;this.expandable=false;this.href=undefined;this.rel=undefined;this.target=undefined;this.type="button"}render(){const{disabled:t,expandable:e,href:a}=this;const s=a===undefined?"button":"a";const d=r(this);const l=s==="button"?{type:this.type}:{download:this.download,href:this.href,target:this.target};return n(i,{key:"1b7708dd178dc2c9280652ca3da38c84ba7b767f",onClick:this.onClick,class:o(this.color,{[d]:true,"item-option-disabled":t,"item-option-expandable":e,"ion-activatable":true})},n(s,Object.assign({key:"d9f899f5425ad6b97071494485aa3ca90bc89d30"},l,{class:"button-native",part:"native",disabled:t}),n("span",{key:"adc2cf72b4363be9b9eeb3584723e2bfc862af20",class:"button-inner"},n("slot",{key:"e668fe8e655a74e6a35e979e0cd488506b962dbf",name:"top"}),n("div",{key:"2ddcdb92b6b19c3cc549a7aee2400d1a6eeb51f1",class:"horizontal-wrapper"},n("slot",{key:"441f13df18b72e5ed6bb51b157722e065b5847d2",name:"start"}),n("slot",{key:"425d815874b49e1628880160d7175ed3ca36ca39",name:"icon-only"}),n("slot",{key:"27437d3fa3365b12bc030704e18481fdfb14aebb"}),n("slot",{key:"bd39330771c7f85c6df10f7f9050335ee7f14ff0",name:"end"})),n("slot",{key:"440cb6dc7743d50b261d4bf61d2c24e24b89e58c",name:"bottom"})),d==="md"&&n("ion-ripple-effect",{key:"29632941464bbb34551cf64961187643f62bf755"})))}get el(){return e(this)}};c.style={ios:s,md:l};export{c as ion_item_option};
//# sourceMappingURL=p-8dc44b18.entry.js.map